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
-2
@@ -19,11 +19,10 @@ export declare const SERVER_APP_ENGINE_MANIFEST_FILENAME = "angular-app-engine-m
|
||||
*
|
||||
* @param i18nOptions - The internationalization options for the application build. This
|
||||
* includes settings for inlining locales and determining the output structure.
|
||||
* @param allowedHosts - A list of hosts that are allowed to access the server-side application.
|
||||
* @param baseHref - The base HREF for the application. This is used to set the base URL
|
||||
* for all relative URLs in the application.
|
||||
*/
|
||||
export declare function generateAngularServerAppEngineManifest(i18nOptions: NormalizedApplicationBuildOptions['i18nOptions'], allowedHosts: string[], baseHref: string | undefined): string;
|
||||
export declare function generateAngularServerAppEngineManifest(i18nOptions: NormalizedApplicationBuildOptions['i18nOptions'], baseHref: string | undefined): string;
|
||||
/**
|
||||
* Generates the server manifest for the standard Node.js environment.
|
||||
*
|
||||
|
||||
+1
-3
@@ -45,11 +45,10 @@ function escapeUnsafeChars(str) {
|
||||
*
|
||||
* @param i18nOptions - The internationalization options for the application build. This
|
||||
* includes settings for inlining locales and determining the output structure.
|
||||
* @param allowedHosts - A list of hosts that are allowed to access the server-side application.
|
||||
* @param baseHref - The base HREF for the application. This is used to set the base URL
|
||||
* for all relative URLs in the application.
|
||||
*/
|
||||
function generateAngularServerAppEngineManifest(i18nOptions, allowedHosts, baseHref) {
|
||||
function generateAngularServerAppEngineManifest(i18nOptions, baseHref) {
|
||||
const entryPoints = {};
|
||||
const supportedLocales = {};
|
||||
if (i18nOptions.shouldInline && !i18nOptions.flatOutput) {
|
||||
@@ -72,7 +71,6 @@ function generateAngularServerAppEngineManifest(i18nOptions, allowedHosts, baseH
|
||||
const manifestContent = `
|
||||
export default {
|
||||
basePath: '${basePath}',
|
||||
allowedHosts: ${JSON.stringify(allowedHosts, undefined, 2)},
|
||||
supportedLocales: ${JSON.stringify(supportedLocales, undefined, 2)},
|
||||
entryPoints: {
|
||||
${Object.entries(entryPoints)
|
||||
|
||||
+16
-15
@@ -51,7 +51,7 @@ async function prerenderPages(workspaceRoot, baseHref, appShellOptions, prerende
|
||||
serverBundlesSourceMaps.clear();
|
||||
const assetsReversed = {};
|
||||
for (const { source, destination } of assets) {
|
||||
assetsReversed[(0, url_1.addLeadingSlash)((0, path_1.toPosixPath)(destination))] = source;
|
||||
assetsReversed[addLeadingSlash((0, path_1.toPosixPath)(destination))] = source;
|
||||
}
|
||||
// Get routes to prerender
|
||||
const { errors: extractionErrors, serializedRouteTree: serializableRouteTreeNode, appShellRoute, } = await getAllRoutes(workspaceRoot, baseHref, outputFilesForWorker, assetsReversed, appShellOptions, prerenderOptions, sourcemap, outputMode).catch((err) => {
|
||||
@@ -126,21 +126,17 @@ async function renderPages(baseHref, sourcemap, serializableRouteTreeNode, maxTh
|
||||
hasSsrEntry: !!outputFilesForWorker['server.mjs'],
|
||||
},
|
||||
execArgv: workerExecArgv,
|
||||
env: {
|
||||
...process.env,
|
||||
'NG_ALLOWED_HOSTS': 'localhost',
|
||||
},
|
||||
});
|
||||
try {
|
||||
const renderingPromises = [];
|
||||
const appShellRouteWithLeadingSlash = appShellRoute && (0, url_1.addLeadingSlash)(appShellRoute);
|
||||
const appShellRouteWithLeadingSlash = appShellRoute && addLeadingSlash(appShellRoute);
|
||||
const baseHrefPathnameWithLeadingSlash = new URL(baseHref, 'http://localhost').pathname;
|
||||
for (const { route, redirectTo } of serializableRouteTreeNode) {
|
||||
// Remove the base href from the file output path.
|
||||
const routeWithoutBaseHref = (0, url_1.addTrailingSlash)(route).startsWith(baseHrefPathnameWithLeadingSlash)
|
||||
? (0, url_1.addLeadingSlash)(route.slice(baseHrefPathnameWithLeadingSlash.length))
|
||||
const routeWithoutBaseHref = addTrailingSlash(route).startsWith(baseHrefPathnameWithLeadingSlash)
|
||||
? addLeadingSlash(route.slice(baseHrefPathnameWithLeadingSlash.length))
|
||||
: route;
|
||||
const outPath = (0, url_1.stripLeadingSlash)(node_path_1.posix.join(routeWithoutBaseHref, 'index.html'));
|
||||
const outPath = node_path_1.posix.join(removeLeadingSlash(routeWithoutBaseHref), 'index.html');
|
||||
if (typeof redirectTo === 'string') {
|
||||
output[outPath] = { content: (0, utils_2.generateRedirectStaticPage)(redirectTo), appShellRoute: false };
|
||||
continue;
|
||||
@@ -176,7 +172,7 @@ async function getAllRoutes(workspaceRoot, baseHref, outputFilesForWorker, asset
|
||||
const routes = [];
|
||||
let appShellRoute;
|
||||
if (appShellOptions) {
|
||||
appShellRoute = (0, url_1.joinUrlParts)(baseHref, appShellOptions.route);
|
||||
appShellRoute = (0, url_1.urlJoin)(baseHref, appShellOptions.route);
|
||||
routes.push({
|
||||
renderMode: models_1.RouteRenderMode.Prerender,
|
||||
route: appShellRoute,
|
||||
@@ -187,7 +183,7 @@ async function getAllRoutes(workspaceRoot, baseHref, outputFilesForWorker, asset
|
||||
for (const route of routesFromFile) {
|
||||
routes.push({
|
||||
renderMode: models_1.RouteRenderMode.Prerender,
|
||||
route: (0, url_1.joinUrlParts)(baseHref, route.trim()),
|
||||
route: (0, url_1.urlJoin)(baseHref, route.trim()),
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -209,10 +205,6 @@ async function getAllRoutes(workspaceRoot, baseHref, outputFilesForWorker, asset
|
||||
hasSsrEntry: !!outputFilesForWorker['server.mjs'],
|
||||
},
|
||||
execArgv: workerExecArgv,
|
||||
env: {
|
||||
...process.env,
|
||||
'NG_ALLOWED_HOSTS': 'localhost',
|
||||
},
|
||||
});
|
||||
try {
|
||||
const { serializedRouteTree, appShellRoute, errors } = await renderWorker.run({});
|
||||
@@ -241,3 +233,12 @@ async function getAllRoutes(workspaceRoot, baseHref, outputFilesForWorker, asset
|
||||
void renderWorker.destroy();
|
||||
}
|
||||
}
|
||||
function addLeadingSlash(value) {
|
||||
return value[0] === '/' ? value : '/' + value;
|
||||
}
|
||||
function addTrailingSlash(url) {
|
||||
return url[url.length - 1] === '/' ? url : `${url}/`;
|
||||
}
|
||||
function removeLeadingSlash(value) {
|
||||
return value[0] === '/' ? value.slice(1) : value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user