feat(planning): grille hebdomadaire complète avec API et filtres
- Connexion API via proxy Angular (résolution CORS, base path /api) - Import CSS ng-zorro global pour les modales et composants - Filtres Camion/Show câblés sur l'affichage de la grille - Camions affichés via TrucksService (linkés au show du même créneau) - Panneau de détails : spectacles + camions du jour sélectionné - Modale de création de spectacle stylisée avec fond et centrage - Positionnement précis des events à la minute dans leur créneau - Auto-scroll vers l'heure courante au chargement - Ligne "maintenant" sur la colonne du jour actuel - Régénération des services OpenAPI (nouveaux noms de types) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
-1
@@ -10,6 +10,5 @@ export type Config = {
|
||||
fetchTimeout: number;
|
||||
fetchRetries: number | undefined;
|
||||
fetchRetry: MakeFetchHappenOptions['retry'];
|
||||
userAgent?: string;
|
||||
};
|
||||
export declare const defaultConfig: Config;
|
||||
|
||||
-1
@@ -12,5 +12,4 @@ exports.defaultConfig = {
|
||||
fetchTimeout: 100000, // milliseconds
|
||||
fetchRetries: undefined,
|
||||
fetchRetry: 2,
|
||||
userAgent: '',
|
||||
};
|
||||
|
||||
-2
@@ -11,12 +11,10 @@ export declare abstract class BaseFetcher implements Fetcher {
|
||||
}
|
||||
type Retry = MakeFetchHappenOptions['retry'];
|
||||
interface FetcherOptions {
|
||||
userAgent?: string;
|
||||
timeout?: number;
|
||||
retry?: Retry;
|
||||
}
|
||||
export declare class DefaultFetcher extends BaseFetcher {
|
||||
private userAgent?;
|
||||
private timeout?;
|
||||
private retry?;
|
||||
constructor(options?: FetcherOptions);
|
||||
|
||||
-6
@@ -11,7 +11,6 @@ const util_1 = __importDefault(require("util"));
|
||||
const error_1 = require("./error");
|
||||
const tmpfile_1 = require("./utils/tmpfile");
|
||||
const log = (0, debug_1.default)('tuf:fetch');
|
||||
const USER_AGENT_HEADER = 'User-Agent';
|
||||
class BaseFetcher {
|
||||
// Download file from given URL. The file is downloaded to a temporary
|
||||
// location and then passed to the given handler. The handler is responsible
|
||||
@@ -55,21 +54,16 @@ class BaseFetcher {
|
||||
}
|
||||
exports.BaseFetcher = BaseFetcher;
|
||||
class DefaultFetcher extends BaseFetcher {
|
||||
userAgent;
|
||||
timeout;
|
||||
retry;
|
||||
constructor(options = {}) {
|
||||
super();
|
||||
this.userAgent = options.userAgent;
|
||||
this.timeout = options.timeout;
|
||||
this.retry = options.retry;
|
||||
}
|
||||
async fetch(url) {
|
||||
log('GET %s', url);
|
||||
const response = await (0, make_fetch_happen_1.default)(url, {
|
||||
headers: {
|
||||
[USER_AGENT_HEADER]: this.userAgent || '',
|
||||
},
|
||||
timeout: this.timeout,
|
||||
retry: this.retry,
|
||||
});
|
||||
|
||||
+2
-4
@@ -1,6 +1,4 @@
|
||||
export { TargetFile } from '@tufjs/models';
|
||||
export { BaseFetcher } from './fetcher';
|
||||
export { Updater } from './updater';
|
||||
export { BaseFetcher, Fetcher } from './fetcher';
|
||||
export { Updater, UpdaterOptions } from './updater';
|
||||
export type { Config } from './config';
|
||||
export type { Fetcher } from './fetcher';
|
||||
export type { UpdaterOptions } from './updater';
|
||||
|
||||
-5
@@ -41,7 +41,6 @@ const models_1 = require("@tufjs/models");
|
||||
const debug_1 = __importDefault(require("debug"));
|
||||
const fs = __importStar(require("fs"));
|
||||
const path = __importStar(require("path"));
|
||||
const package_json_1 = require("../package.json");
|
||||
const config_1 = require("./config");
|
||||
const error_1 = require("./error");
|
||||
const fetcher_1 = require("./fetcher");
|
||||
@@ -67,13 +66,9 @@ class Updater {
|
||||
const data = this.loadLocalMetadata(models_1.MetadataKind.Root);
|
||||
this.trustedSet = new store_1.TrustedMetadataStore(data);
|
||||
this.config = { ...config_1.defaultConfig, ...config };
|
||||
const userAgent = config?.userAgent
|
||||
? `${config.userAgent} tuf-js/${package_json_1.version}`
|
||||
: `tuf-js/${package_json_1.version}`;
|
||||
this.fetcher =
|
||||
fetcher ||
|
||||
new fetcher_1.DefaultFetcher({
|
||||
userAgent,
|
||||
timeout: this.config.fetchTimeout,
|
||||
retry: this.config.fetchRetries ?? this.config.fetchRetry,
|
||||
});
|
||||
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "tuf-js",
|
||||
"version": "4.1.0",
|
||||
"version": "3.1.0",
|
||||
"description": "JavaScript implementation of The Update Framework (TUF)",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
@@ -28,16 +28,16 @@
|
||||
},
|
||||
"homepage": "https://github.com/theupdateframework/tuf-js/tree/main/packages/client#readme",
|
||||
"devDependencies": {
|
||||
"@tufjs/repo-mock": "4.0.1",
|
||||
"@tufjs/repo-mock": "3.0.1",
|
||||
"@types/debug": "^4.1.12",
|
||||
"@types/make-fetch-happen": "^10.0.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tufjs/models": "4.1.0",
|
||||
"debug": "^4.4.3",
|
||||
"make-fetch-happen": "^15.0.1"
|
||||
"@tufjs/models": "3.0.1",
|
||||
"debug": "^4.4.1",
|
||||
"make-fetch-happen": "^14.0.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^20.17.0 || >=22.9.0"
|
||||
"node": "^18.17.0 || >=20.5.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user