@angular/ssr 18.2.1 → 19.0.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/private_export.mjs +10 -0
- package/esm2022/public_api.mjs +2 -1
- package/esm2022/src/app-engine.mjs +84 -0
- package/esm2022/src/app.mjs +167 -0
- package/esm2022/src/assets.mjs +44 -0
- package/esm2022/src/console.mjs +34 -0
- package/esm2022/src/hooks.mjs +94 -0
- package/esm2022/src/i18n.mjs +41 -0
- package/esm2022/src/manifest.mjs +59 -0
- package/esm2022/src/request.mjs +63 -0
- package/esm2022/src/response.mjs +58 -0
- package/esm2022/src/routes/ng-routes.mjs +157 -0
- package/esm2022/src/routes/route-tree.mjs +180 -0
- package/esm2022/src/routes/router.mjs +88 -0
- package/esm2022/src/tokens.mjs +20 -0
- package/esm2022/src/utils/ng.mjs +51 -0
- package/esm2022/src/utils/url.mjs +85 -0
- package/fesm2022/ssr.mjs +895 -4
- package/fesm2022/ssr.mjs.map +1 -1
- package/index.d.ts +336 -0
- package/package.json +13 -3
- /package/esm2022/src/{common-engine.mjs → common-engine/common-engine.mjs} +0 -0
- /package/esm2022/src/{inline-css-processor.mjs → common-engine/inline-css-processor.mjs} +0 -0
- /package/esm2022/src/{peformance-profiler.mjs → common-engine/peformance-profiler.mjs} +0 -0
package/fesm2022/ssr.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ssr.mjs","sources":["../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/inline-css-processor.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/peformance-profiler.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/common-engine.mjs"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport Critters from 'critters';\nimport { readFile } from 'node:fs/promises';\n/**\n * Pattern used to extract the media query set by Critters in an `onload` handler.\n */\nconst MEDIA_SET_HANDLER_PATTERN = /^this\\.media=[\"'](.*)[\"'];?$/;\n/**\n * Name of the attribute used to save the Critters media query so it can be re-assigned on load.\n */\nconst CSP_MEDIA_ATTR = 'ngCspMedia';\n/**\n * Script text used to change the media value of the link tags.\n *\n * NOTE:\n * We do not use `document.querySelectorAll('link').forEach((s) => s.addEventListener('load', ...)`\n * because this does not always fire on Chome.\n * See: https://github.com/angular/angular-cli/issues/26932 and https://crbug.com/1521256\n */\nconst LINK_LOAD_SCRIPT_CONTENT = [\n '(() => {',\n ` const CSP_MEDIA_ATTR = '${CSP_MEDIA_ATTR}';`,\n ' const documentElement = document.documentElement;',\n ' const listener = (e) => {',\n ' const target = e.target;',\n ` if (!target || target.tagName !== 'LINK' || !target.hasAttribute(CSP_MEDIA_ATTR)) {`,\n ' return;',\n ' }',\n ' target.media = target.getAttribute(CSP_MEDIA_ATTR);',\n ' target.removeAttribute(CSP_MEDIA_ATTR);',\n // Remove onload listener when there are no longer styles that need to be loaded.\n ' if (!document.head.querySelector(`link[${CSP_MEDIA_ATTR}]`)) {',\n ` documentElement.removeEventListener('load', listener);`,\n ' }',\n ' };',\n // We use an event with capturing (the true parameter) because load events don't bubble.\n ` documentElement.addEventListener('load', listener, true);`,\n '})();',\n].join('\\n');\nclass CrittersExtended extends Critters {\n optionsExtended;\n resourceCache;\n warnings = [];\n errors = [];\n initialEmbedLinkedStylesheet;\n addedCspScriptsDocuments = new WeakSet();\n documentNonces = new WeakMap();\n constructor(optionsExtended, resourceCache) {\n super({\n logger: {\n warn: (s) => this.warnings.push(s),\n error: (s) => this.errors.push(s),\n info: () => { },\n },\n logLevel: 'warn',\n path: optionsExtended.outputPath,\n publicPath: optionsExtended.deployUrl,\n compress: !!optionsExtended.minify,\n pruneSource: false,\n reduceInlineStyles: false,\n mergeStylesheets: false,\n // Note: if `preload` changes to anything other than `media`, the logic in\n // `embedLinkedStylesheetOverride` will have to be updated.\n preload: 'media',\n noscriptFallback: true,\n inlineFonts: true,\n });\n this.optionsExtended = optionsExtended;\n this.resourceCache = resourceCache;\n // We can't use inheritance to override `embedLinkedStylesheet`, because it's not declared in\n // the `Critters` .d.ts which means that we can't call the `super` implementation. TS doesn't\n // allow for `super` to be cast to a different type.\n this.initialEmbedLinkedStylesheet = this.embedLinkedStylesheet;\n this.embedLinkedStylesheet = this.embedLinkedStylesheetOverride;\n }\n async readFile(path) {\n let resourceContent = this.resourceCache.get(path);\n if (resourceContent === undefined) {\n resourceContent = await readFile(path, 'utf-8');\n this.resourceCache.set(path, resourceContent);\n }\n return resourceContent;\n }\n /**\n * Override of the Critters `embedLinkedStylesheet` method\n * that makes it work with Angular's CSP APIs.\n */\n embedLinkedStylesheetOverride = async (link, document) => {\n if (link.getAttribute('media') === 'print' && link.next?.name === 'noscript') {\n // Workaround for https://github.com/GoogleChromeLabs/critters/issues/64\n // NB: this is only needed for the webpack based builders.\n const media = link.getAttribute('onload')?.match(MEDIA_SET_HANDLER_PATTERN);\n if (media) {\n link.removeAttribute('onload');\n link.setAttribute('media', media[1]);\n link?.next?.remove();\n }\n }\n const returnValue = await this.initialEmbedLinkedStylesheet(link, document);\n const cspNonce = this.findCspNonce(document);\n if (cspNonce) {\n const crittersMedia = link.getAttribute('onload')?.match(MEDIA_SET_HANDLER_PATTERN);\n if (crittersMedia) {\n // If there's a Critters-generated `onload` handler and the file has an Angular CSP nonce,\n // we have to remove the handler, because it's incompatible with CSP. We save the value\n // in a different attribute and we generate a script tag with the nonce that uses\n // `addEventListener` to apply the media query instead.\n link.removeAttribute('onload');\n link.setAttribute(CSP_MEDIA_ATTR, crittersMedia[1]);\n this.conditionallyInsertCspLoadingScript(document, cspNonce, link);\n }\n // Ideally we would hook in at the time Critters inserts the `style` tags, but there isn't\n // a way of doing that at the moment so we fall back to doing it any time a `link` tag is\n // inserted. We mitigate it by only iterating the direct children of the `<head>` which\n // should be pretty shallow.\n document.head.children.forEach((child) => {\n if (child.tagName === 'style' && !child.hasAttribute('nonce')) {\n child.setAttribute('nonce', cspNonce);\n }\n });\n }\n return returnValue;\n };\n /**\n * Finds the CSP nonce for a specific document.\n */\n findCspNonce(document) {\n if (this.documentNonces.has(document)) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return this.documentNonces.get(document);\n }\n // HTML attribute are case-insensitive, but the parser used by Critters is case-sensitive.\n const nonceElement = document.querySelector('[ngCspNonce], [ngcspnonce]');\n const cspNonce = nonceElement?.getAttribute('ngCspNonce') || nonceElement?.getAttribute('ngcspnonce') || null;\n this.documentNonces.set(document, cspNonce);\n return cspNonce;\n }\n /**\n * Inserts the `script` tag that swaps the critical CSS at runtime,\n * if one hasn't been inserted into the document already.\n */\n conditionallyInsertCspLoadingScript(document, nonce, link) {\n if (this.addedCspScriptsDocuments.has(document)) {\n return;\n }\n if (document.head.textContent.includes(LINK_LOAD_SCRIPT_CONTENT)) {\n // Script was already added during the build.\n this.addedCspScriptsDocuments.add(document);\n return;\n }\n const script = document.createElement('script');\n script.setAttribute('nonce', nonce);\n script.textContent = LINK_LOAD_SCRIPT_CONTENT;\n // Prepend the script to the head since it needs to\n // run as early as possible, before the `link` tags.\n document.head.insertBefore(script, link);\n this.addedCspScriptsDocuments.add(document);\n }\n}\nexport class InlineCriticalCssProcessor {\n options;\n resourceCache = new Map();\n constructor(options) {\n this.options = options;\n }\n async process(html, options) {\n const critters = new CrittersExtended({ ...this.options, ...options }, this.resourceCache);\n const content = await critters.process(html);\n return {\n content,\n errors: critters.errors.length ? critters.errors : undefined,\n warnings: critters.warnings.length ? critters.warnings : undefined,\n };\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nconst PERFORMANCE_MARK_PREFIX = '🅰️';\nexport function printPerformanceLogs() {\n let maxWordLength = 0;\n const benchmarks = [];\n for (const { name, duration } of performance.getEntriesByType('measure')) {\n if (!name.startsWith(PERFORMANCE_MARK_PREFIX)) {\n continue;\n }\n // `🅰️:Retrieve SSG Page` -> `Retrieve SSG Page:`\n const step = name.slice(PERFORMANCE_MARK_PREFIX.length + 1) + ':';\n if (step.length > maxWordLength) {\n maxWordLength = step.length;\n }\n benchmarks.push([step, `${duration.toFixed(1)}ms`]);\n performance.clearMeasures(name);\n }\n /* eslint-disable no-console */\n console.log('********** Performance results **********');\n for (const [step, value] of benchmarks) {\n const spaces = maxWordLength - step.length + 5;\n console.log(step + ' '.repeat(spaces) + value);\n }\n console.log('*****************************************');\n /* eslint-enable no-console */\n}\nexport async function runMethodAndMeasurePerf(label, asyncMethod) {\n const labelName = `${PERFORMANCE_MARK_PREFIX}:${label}`;\n const startLabel = `start:${labelName}`;\n const endLabel = `end:${labelName}`;\n try {\n performance.mark(startLabel);\n return await asyncMethod();\n }\n finally {\n performance.mark(endLabel);\n performance.measure(labelName, startLabel, endLabel);\n performance.clearMarks(startLabel);\n performance.clearMarks(endLabel);\n }\n}\nexport function noopRunMethodAndMeasurePerf(label, asyncMethod) {\n return asyncMethod();\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { renderApplication, renderModule, ɵSERVER_CONTEXT } from '@angular/platform-server';\nimport * as fs from 'node:fs';\nimport { dirname, join, normalize, resolve } from 'node:path';\nimport { URL } from 'node:url';\nimport { InlineCriticalCssProcessor } from './inline-css-processor';\nimport { noopRunMethodAndMeasurePerf, printPerformanceLogs, runMethodAndMeasurePerf, } from './peformance-profiler';\nconst SSG_MARKER_REGEXP = /ng-server-context=[\"']\\w*\\|?ssg\\|?\\w*[\"']/;\n/**\n * A common engine to use to server render an application.\n */\nexport class CommonEngine {\n options;\n templateCache = new Map();\n inlineCriticalCssProcessor;\n pageIsSSG = new Map();\n constructor(options) {\n this.options = options;\n this.inlineCriticalCssProcessor = new InlineCriticalCssProcessor({\n minify: false,\n });\n }\n /**\n * Render an HTML document for a specific URL with specified\n * render options\n */\n async render(opts) {\n const enablePerformanceProfiler = this.options?.enablePerformanceProfiler;\n const runMethod = enablePerformanceProfiler\n ? runMethodAndMeasurePerf\n : noopRunMethodAndMeasurePerf;\n let html = await runMethod('Retrieve SSG Page', () => this.retrieveSSGPage(opts));\n if (html === undefined) {\n html = await runMethod('Render Page', () => this.renderApplication(opts));\n if (opts.inlineCriticalCss !== false) {\n const { content, errors, warnings } = await runMethod('Inline Critical CSS', () => \n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this.inlineCriticalCss(html, opts));\n html = content;\n // eslint-disable-next-line no-console\n warnings?.forEach((m) => console.warn(m));\n // eslint-disable-next-line no-console\n errors?.forEach((m) => console.error(m));\n }\n }\n if (enablePerformanceProfiler) {\n printPerformanceLogs();\n }\n return html;\n }\n inlineCriticalCss(html, opts) {\n return this.inlineCriticalCssProcessor.process(html, {\n outputPath: opts.publicPath ?? (opts.documentFilePath ? dirname(opts.documentFilePath) : ''),\n });\n }\n async retrieveSSGPage(opts) {\n const { publicPath, documentFilePath, url } = opts;\n if (!publicPath || !documentFilePath || url === undefined) {\n return undefined;\n }\n const { pathname } = new URL(url, 'resolve://');\n // Do not use `resolve` here as otherwise it can lead to path traversal vulnerability.\n // See: https://portswigger.net/web-security/file-path-traversal\n const pagePath = join(publicPath, pathname, 'index.html');\n if (this.pageIsSSG.get(pagePath)) {\n // Serve pre-rendered page.\n return fs.promises.readFile(pagePath, 'utf-8');\n }\n if (!pagePath.startsWith(normalize(publicPath))) {\n // Potential path traversal detected.\n return undefined;\n }\n if (pagePath === resolve(documentFilePath) || !(await exists(pagePath))) {\n // View matches with prerender path or file does not exist.\n this.pageIsSSG.set(pagePath, false);\n return undefined;\n }\n // Static file exists.\n const content = await fs.promises.readFile(pagePath, 'utf-8');\n const isSSG = SSG_MARKER_REGEXP.test(content);\n this.pageIsSSG.set(pagePath, isSSG);\n return isSSG ? content : undefined;\n }\n async renderApplication(opts) {\n const moduleOrFactory = this.options?.bootstrap ?? opts.bootstrap;\n if (!moduleOrFactory) {\n throw new Error('A module or bootstrap option must be provided.');\n }\n const extraProviders = [\n { provide: ɵSERVER_CONTEXT, useValue: 'ssr' },\n ...(opts.providers ?? []),\n ...(this.options?.providers ?? []),\n ];\n let document = opts.document;\n if (!document && opts.documentFilePath) {\n document = await this.getDocument(opts.documentFilePath);\n }\n const commonRenderingOptions = {\n url: opts.url,\n document,\n };\n return isBootstrapFn(moduleOrFactory)\n ? renderApplication(moduleOrFactory, {\n platformProviders: extraProviders,\n ...commonRenderingOptions,\n })\n : renderModule(moduleOrFactory, { extraProviders, ...commonRenderingOptions });\n }\n /** Retrieve the document from the cache or the filesystem */\n async getDocument(filePath) {\n let doc = this.templateCache.get(filePath);\n if (!doc) {\n doc = await fs.promises.readFile(filePath, 'utf-8');\n this.templateCache.set(filePath, doc);\n }\n return doc;\n }\n}\nasync function exists(path) {\n try {\n await fs.promises.access(path, fs.constants.F_OK);\n return true;\n }\n catch {\n return false;\n }\n}\nfunction isBootstrapFn(value) {\n // We can differentiate between a module and a bootstrap function by reading compiler-generated `ɵmod` static property:\n return typeof value === 'function' && !('ɵmod' in value);\n}\n"],"names":["ɵSERVER_CONTEXT"],"mappings":";;;;;;;AASA;AACA;AACA;AACA,MAAM,yBAAyB,GAAG,8BAA8B,CAAC;AACjE;AACA;AACA;AACA,MAAM,cAAc,GAAG,YAAY,CAAC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,wBAAwB,GAAG;AACjC,IAAI,UAAU;AACd,IAAI,CAAC,0BAA0B,EAAE,cAAc,CAAC,EAAE,CAAC;AACnD,IAAI,qDAAqD;AACzD,IAAI,6BAA6B;AACjC,IAAI,8BAA8B;AAClC,IAAI,CAAC,uFAAuF,CAAC;AAC7F,IAAI,cAAc;AAClB,IAAI,OAAO;AACX,IAAI,yDAAyD;AAC7D,IAAI,6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;AAC1D,QAAQ,OAAO,IAAI,CAAC;AACpB,KAAK;AACL,IAAI,MAAM;AACV,QAAQ,OAAO,KAAK,CAAC;AACrB,KAAK;AACL,CAAC;AACD,SAAS,aAAa,CAAC,KAAK,EAAE;AAC9B;AACA,IAAI,OAAO,OAAO,KAAK,KAAK,UAAU,IAAI,EAAE,MAAM,IAAI,KAAK,CAAC,CAAC;AAC7D;;;;"}
|
|
1
|
+
{"version":3,"file":"ssr.mjs","sources":["../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/common-engine/inline-css-processor.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/common-engine/peformance-profiler.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/common-engine/common-engine.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/console.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/utils/url.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/utils/ng.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/routes/ng-routes.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/assets.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/hooks.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/manifest.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/routes/route-tree.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/routes/router.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/tokens.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/app.mjs"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport Critters from 'critters';\nimport { readFile } from 'node:fs/promises';\n/**\n * Pattern used to extract the media query set by Critters in an `onload` handler.\n */\nconst MEDIA_SET_HANDLER_PATTERN = /^this\\.media=[\"'](.*)[\"'];?$/;\n/**\n * Name of the attribute used to save the Critters media query so it can be re-assigned on load.\n */\nconst CSP_MEDIA_ATTR = 'ngCspMedia';\n/**\n * Script text used to change the media value of the link tags.\n *\n * NOTE:\n * We do not use `document.querySelectorAll('link').forEach((s) => s.addEventListener('load', ...)`\n * because this does not always fire on Chome.\n * See: https://github.com/angular/angular-cli/issues/26932 and https://crbug.com/1521256\n */\nconst LINK_LOAD_SCRIPT_CONTENT = [\n '(() => {',\n ` const CSP_MEDIA_ATTR = '${CSP_MEDIA_ATTR}';`,\n ' const documentElement = document.documentElement;',\n ' const listener = (e) => {',\n ' const target = e.target;',\n ` if (!target || target.tagName !== 'LINK' || !target.hasAttribute(CSP_MEDIA_ATTR)) {`,\n ' return;',\n ' }',\n ' target.media = target.getAttribute(CSP_MEDIA_ATTR);',\n ' target.removeAttribute(CSP_MEDIA_ATTR);',\n // Remove onload listener when there are no longer styles that need to be loaded.\n ' if (!document.head.querySelector(`link[${CSP_MEDIA_ATTR}]`)) {',\n ` documentElement.removeEventListener('load', listener);`,\n ' }',\n ' };',\n // We use an event with capturing (the true parameter) because load events don't bubble.\n ` documentElement.addEventListener('load', listener, true);`,\n '})();',\n].join('\\n');\nclass CrittersExtended extends Critters {\n optionsExtended;\n resourceCache;\n warnings = [];\n errors = [];\n initialEmbedLinkedStylesheet;\n addedCspScriptsDocuments = new WeakSet();\n documentNonces = new WeakMap();\n constructor(optionsExtended, resourceCache) {\n super({\n logger: {\n warn: (s) => this.warnings.push(s),\n error: (s) => this.errors.push(s),\n info: () => { },\n },\n logLevel: 'warn',\n path: optionsExtended.outputPath,\n publicPath: optionsExtended.deployUrl,\n compress: !!optionsExtended.minify,\n pruneSource: false,\n reduceInlineStyles: false,\n mergeStylesheets: false,\n // Note: if `preload` changes to anything other than `media`, the logic in\n // `embedLinkedStylesheetOverride` will have to be updated.\n preload: 'media',\n noscriptFallback: true,\n inlineFonts: true,\n });\n this.optionsExtended = optionsExtended;\n this.resourceCache = resourceCache;\n // We can't use inheritance to override `embedLinkedStylesheet`, because it's not declared in\n // the `Critters` .d.ts which means that we can't call the `super` implementation. TS doesn't\n // allow for `super` to be cast to a different type.\n this.initialEmbedLinkedStylesheet = this.embedLinkedStylesheet;\n this.embedLinkedStylesheet = this.embedLinkedStylesheetOverride;\n }\n async readFile(path) {\n let resourceContent = this.resourceCache.get(path);\n if (resourceContent === undefined) {\n resourceContent = await readFile(path, 'utf-8');\n this.resourceCache.set(path, resourceContent);\n }\n return resourceContent;\n }\n /**\n * Override of the Critters `embedLinkedStylesheet` method\n * that makes it work with Angular's CSP APIs.\n */\n embedLinkedStylesheetOverride = async (link, document) => {\n if (link.getAttribute('media') === 'print' && link.next?.name === 'noscript') {\n // Workaround for https://github.com/GoogleChromeLabs/critters/issues/64\n // NB: this is only needed for the webpack based builders.\n const media = link.getAttribute('onload')?.match(MEDIA_SET_HANDLER_PATTERN);\n if (media) {\n link.removeAttribute('onload');\n link.setAttribute('media', media[1]);\n link?.next?.remove();\n }\n }\n const returnValue = await this.initialEmbedLinkedStylesheet(link, document);\n const cspNonce = this.findCspNonce(document);\n if (cspNonce) {\n const crittersMedia = link.getAttribute('onload')?.match(MEDIA_SET_HANDLER_PATTERN);\n if (crittersMedia) {\n // If there's a Critters-generated `onload` handler and the file has an Angular CSP nonce,\n // we have to remove the handler, because it's incompatible with CSP. We save the value\n // in a different attribute and we generate a script tag with the nonce that uses\n // `addEventListener` to apply the media query instead.\n link.removeAttribute('onload');\n link.setAttribute(CSP_MEDIA_ATTR, crittersMedia[1]);\n this.conditionallyInsertCspLoadingScript(document, cspNonce, link);\n }\n // Ideally we would hook in at the time Critters inserts the `style` tags, but there isn't\n // a way of doing that at the moment so we fall back to doing it any time a `link` tag is\n // inserted. We mitigate it by only iterating the direct children of the `<head>` which\n // should be pretty shallow.\n document.head.children.forEach((child) => {\n if (child.tagName === 'style' && !child.hasAttribute('nonce')) {\n child.setAttribute('nonce', cspNonce);\n }\n });\n }\n return returnValue;\n };\n /**\n * Finds the CSP nonce for a specific document.\n */\n findCspNonce(document) {\n if (this.documentNonces.has(document)) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return this.documentNonces.get(document);\n }\n // HTML attribute are case-insensitive, but the parser used by Critters is case-sensitive.\n const nonceElement = document.querySelector('[ngCspNonce], [ngcspnonce]');\n const cspNonce = nonceElement?.getAttribute('ngCspNonce') || nonceElement?.getAttribute('ngcspnonce') || null;\n this.documentNonces.set(document, cspNonce);\n return cspNonce;\n }\n /**\n * Inserts the `script` tag that swaps the critical CSS at runtime,\n * if one hasn't been inserted into the document already.\n */\n conditionallyInsertCspLoadingScript(document, nonce, link) {\n if (this.addedCspScriptsDocuments.has(document)) {\n return;\n }\n if (document.head.textContent.includes(LINK_LOAD_SCRIPT_CONTENT)) {\n // Script was already added during the build.\n this.addedCspScriptsDocuments.add(document);\n return;\n }\n const script = document.createElement('script');\n script.setAttribute('nonce', nonce);\n script.textContent = LINK_LOAD_SCRIPT_CONTENT;\n // Prepend the script to the head since it needs to\n // run as early as possible, before the `link` tags.\n document.head.insertBefore(script, link);\n this.addedCspScriptsDocuments.add(document);\n }\n}\nexport class InlineCriticalCssProcessor {\n options;\n resourceCache = new Map();\n constructor(options) {\n this.options = options;\n }\n async process(html, options) {\n const critters = new CrittersExtended({ ...this.options, ...options }, this.resourceCache);\n const content = await critters.process(html);\n return {\n content,\n errors: critters.errors.length ? critters.errors : undefined,\n warnings: critters.warnings.length ? critters.warnings : undefined,\n };\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nconst PERFORMANCE_MARK_PREFIX = '🅰️';\nexport function printPerformanceLogs() {\n let maxWordLength = 0;\n const benchmarks = [];\n for (const { name, duration } of performance.getEntriesByType('measure')) {\n if (!name.startsWith(PERFORMANCE_MARK_PREFIX)) {\n continue;\n }\n // `🅰️:Retrieve SSG Page` -> `Retrieve SSG Page:`\n const step = name.slice(PERFORMANCE_MARK_PREFIX.length + 1) + ':';\n if (step.length > maxWordLength) {\n maxWordLength = step.length;\n }\n benchmarks.push([step, `${duration.toFixed(1)}ms`]);\n performance.clearMeasures(name);\n }\n /* eslint-disable no-console */\n console.log('********** Performance results **********');\n for (const [step, value] of benchmarks) {\n const spaces = maxWordLength - step.length + 5;\n console.log(step + ' '.repeat(spaces) + value);\n }\n console.log('*****************************************');\n /* eslint-enable no-console */\n}\nexport async function runMethodAndMeasurePerf(label, asyncMethod) {\n const labelName = `${PERFORMANCE_MARK_PREFIX}:${label}`;\n const startLabel = `start:${labelName}`;\n const endLabel = `end:${labelName}`;\n try {\n performance.mark(startLabel);\n return await asyncMethod();\n }\n finally {\n performance.mark(endLabel);\n performance.measure(labelName, startLabel, endLabel);\n performance.clearMarks(startLabel);\n performance.clearMarks(endLabel);\n }\n}\nexport function noopRunMethodAndMeasurePerf(label, asyncMethod) {\n return asyncMethod();\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { renderApplication, renderModule, ɵSERVER_CONTEXT } from '@angular/platform-server';\nimport * as fs from 'node:fs';\nimport { dirname, join, normalize, resolve } from 'node:path';\nimport { URL } from 'node:url';\nimport { InlineCriticalCssProcessor } from './inline-css-processor';\nimport { noopRunMethodAndMeasurePerf, printPerformanceLogs, runMethodAndMeasurePerf, } from './peformance-profiler';\nconst SSG_MARKER_REGEXP = /ng-server-context=[\"']\\w*\\|?ssg\\|?\\w*[\"']/;\n/**\n * A common engine to use to server render an application.\n */\nexport class CommonEngine {\n options;\n templateCache = new Map();\n inlineCriticalCssProcessor;\n pageIsSSG = new Map();\n constructor(options) {\n this.options = options;\n this.inlineCriticalCssProcessor = new InlineCriticalCssProcessor({\n minify: false,\n });\n }\n /**\n * Render an HTML document for a specific URL with specified\n * render options\n */\n async render(opts) {\n const enablePerformanceProfiler = this.options?.enablePerformanceProfiler;\n const runMethod = enablePerformanceProfiler\n ? runMethodAndMeasurePerf\n : noopRunMethodAndMeasurePerf;\n let html = await runMethod('Retrieve SSG Page', () => this.retrieveSSGPage(opts));\n if (html === undefined) {\n html = await runMethod('Render Page', () => this.renderApplication(opts));\n if (opts.inlineCriticalCss !== false) {\n const { content, errors, warnings } = await runMethod('Inline Critical CSS', () => \n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this.inlineCriticalCss(html, opts));\n html = content;\n // eslint-disable-next-line no-console\n warnings?.forEach((m) => console.warn(m));\n // eslint-disable-next-line no-console\n errors?.forEach((m) => console.error(m));\n }\n }\n if (enablePerformanceProfiler) {\n printPerformanceLogs();\n }\n return html;\n }\n inlineCriticalCss(html, opts) {\n return this.inlineCriticalCssProcessor.process(html, {\n outputPath: opts.publicPath ?? (opts.documentFilePath ? dirname(opts.documentFilePath) : ''),\n });\n }\n async retrieveSSGPage(opts) {\n const { publicPath, documentFilePath, url } = opts;\n if (!publicPath || !documentFilePath || url === undefined) {\n return undefined;\n }\n const { pathname } = new URL(url, 'resolve://');\n // Do not use `resolve` here as otherwise it can lead to path traversal vulnerability.\n // See: https://portswigger.net/web-security/file-path-traversal\n const pagePath = join(publicPath, pathname, 'index.html');\n if (this.pageIsSSG.get(pagePath)) {\n // Serve pre-rendered page.\n return fs.promises.readFile(pagePath, 'utf-8');\n }\n if (!pagePath.startsWith(normalize(publicPath))) {\n // Potential path traversal detected.\n return undefined;\n }\n if (pagePath === resolve(documentFilePath) || !(await exists(pagePath))) {\n // View matches with prerender path or file does not exist.\n this.pageIsSSG.set(pagePath, false);\n return undefined;\n }\n // Static file exists.\n const content = await fs.promises.readFile(pagePath, 'utf-8');\n const isSSG = SSG_MARKER_REGEXP.test(content);\n this.pageIsSSG.set(pagePath, isSSG);\n return isSSG ? content : undefined;\n }\n async renderApplication(opts) {\n const moduleOrFactory = this.options?.bootstrap ?? opts.bootstrap;\n if (!moduleOrFactory) {\n throw new Error('A module or bootstrap option must be provided.');\n }\n const extraProviders = [\n { provide: ɵSERVER_CONTEXT, useValue: 'ssr' },\n ...(opts.providers ?? []),\n ...(this.options?.providers ?? []),\n ];\n let document = opts.document;\n if (!document && opts.documentFilePath) {\n document = await this.getDocument(opts.documentFilePath);\n }\n const commonRenderingOptions = {\n url: opts.url,\n document,\n };\n return isBootstrapFn(moduleOrFactory)\n ? renderApplication(moduleOrFactory, {\n platformProviders: extraProviders,\n ...commonRenderingOptions,\n })\n : renderModule(moduleOrFactory, { extraProviders, ...commonRenderingOptions });\n }\n /** Retrieve the document from the cache or the filesystem */\n async getDocument(filePath) {\n let doc = this.templateCache.get(filePath);\n if (!doc) {\n doc = await fs.promises.readFile(filePath, 'utf-8');\n this.templateCache.set(filePath, doc);\n }\n return doc;\n }\n}\nasync function exists(path) {\n try {\n await fs.promises.access(path, fs.constants.F_OK);\n return true;\n }\n catch {\n return false;\n }\n}\nfunction isBootstrapFn(value) {\n // We can differentiate between a module and a bootstrap function by reading compiler-generated `ɵmod` static property:\n return typeof value === 'function' && !('ɵmod' in value);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { ɵConsole } from '@angular/core';\n/**\n * Custom implementation of the Angular Console service that filters out specific log messages.\n *\n * This class extends the internal Angular `ɵConsole` class to provide customized logging behavior.\n * It overrides the `log` method to suppress logs that match certain predefined messages.\n */\nexport class Console extends ɵConsole {\n /**\n * A set of log messages that should be ignored and not printed to the console.\n */\n ignoredLogs = new Set(['Angular is running in development mode.']);\n /**\n * Logs a message to the console if it is not in the set of ignored messages.\n *\n * @param message - The message to log to the console.\n *\n * This method overrides the `log` method of the `ɵConsole` class. It checks if the\n * message is in the `ignoredLogs` set. If it is not, it delegates the logging to\n * the parent class's `log` method. Otherwise, the message is suppressed.\n */\n log(message) {\n if (!this.ignoredLogs.has(message)) {\n super.log(message);\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Removes the trailing slash from a URL if it exists.\n *\n * @param url - The URL string from which to remove the trailing slash.\n * @returns The URL string without a trailing slash.\n *\n * @example\n * ```js\n * stripTrailingSlash('path/'); // 'path'\n * stripTrailingSlash('/path'); // '/path'\n * ```\n */\nexport function stripTrailingSlash(url) {\n // Check if the last character of the URL is a slash\n return url[url.length - 1] === '/' ? url.slice(0, -1) : url;\n}\n/**\n * Joins URL parts into a single URL string.\n *\n * This function takes multiple URL segments, normalizes them by removing leading\n * and trailing slashes where appropriate, and then joins them into a single URL.\n *\n * @param parts - The parts of the URL to join. Each part can be a string with or without slashes.\n * @returns The joined URL string, with normalized slashes.\n *\n * @example\n * ```js\n * joinUrlParts('path/', '/to/resource'); // '/path/to/resource'\n * joinUrlParts('/path/', 'to/resource'); // '/path/to/resource'\n * ```\n */\nexport function joinUrlParts(...parts) {\n // Initialize an array with an empty string to always add a leading slash\n const normalizeParts = [''];\n for (const part of parts) {\n if (part === '') {\n // Skip any empty parts\n continue;\n }\n let normalizedPart = part;\n if (part[0] === '/') {\n normalizedPart = normalizedPart.slice(1);\n }\n if (part[part.length - 1] === '/') {\n normalizedPart = normalizedPart.slice(0, -1);\n }\n if (normalizedPart !== '') {\n normalizeParts.push(normalizedPart);\n }\n }\n return normalizeParts.join('/');\n}\n/**\n * Strips `/index.html` from the end of a URL's path, if present.\n *\n * This function is used to convert URLs pointing to an `index.html` file into their directory\n * equivalents. For example, it transforms a URL like `http://www.example.com/page/index.html`\n * into `http://www.example.com/page`.\n *\n * @param url - The URL object to process.\n * @returns A new URL object with `/index.html` removed from the path, if it was present.\n *\n * @example\n * ```typescript\n * const originalUrl = new URL('http://www.example.com/page/index.html');\n * const cleanedUrl = stripIndexHtmlFromURL(originalUrl);\n * console.log(cleanedUrl.href); // Output: 'http://www.example.com/page'\n * ```\n */\nexport function stripIndexHtmlFromURL(url) {\n if (url.pathname.endsWith('/index.html')) {\n const modifiedURL = new URL(url);\n // Remove '/index.html' from the pathname\n modifiedURL.pathname = modifiedURL.pathname.slice(0, /** '/index.html'.length */ -11);\n return modifiedURL;\n }\n return url;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { renderApplication, renderModule } from '@angular/platform-server';\nimport { stripIndexHtmlFromURL } from './url';\n/**\n * Renders an Angular application or module to an HTML string.\n *\n * This function determines whether the provided `bootstrap` value is an Angular module\n * or a bootstrap function and calls the appropriate rendering method (`renderModule` or\n * `renderApplication`) based on that determination.\n *\n * @param html - The HTML string to be used as the initial document content.\n * @param bootstrap - Either an Angular module type or a function that returns a promise\n * resolving to an `ApplicationRef`.\n * @param url - The URL of the application. This is used for server-side rendering to\n * correctly handle route-based rendering.\n * @param platformProviders - An array of platform providers to be used during the\n * rendering process.\n * @returns A promise that resolves to a string containing the rendered HTML.\n */\nexport function renderAngular(html, bootstrap, url, platformProviders) {\n // A request to `http://www.example.com/page/index.html` will render the Angular route corresponding to `http://www.example.com/page`.\n const urlToRender = stripIndexHtmlFromURL(url).toString();\n return isNgModule(bootstrap)\n ? renderModule(bootstrap, {\n url: urlToRender,\n document: html,\n extraProviders: platformProviders,\n })\n : renderApplication(bootstrap, {\n url: urlToRender,\n document: html,\n platformProviders,\n });\n}\n/**\n * Type guard to determine if a given value is an Angular module.\n * Angular modules are identified by the presence of the `ɵmod` static property.\n * This function helps distinguish between Angular modules and bootstrap functions.\n *\n * @param value - The value to be checked.\n * @returns True if the value is an Angular module (i.e., it has the `ɵmod` property), false otherwise.\n */\nexport function isNgModule(value) {\n return 'ɵmod' in value;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { APP_BASE_HREF, PlatformLocation } from '@angular/common';\nimport { ApplicationRef, Compiler, createPlatformFactory, platformCore, ɵwhenStable as whenStable, ɵConsole, ɵresetCompiledComponents, } from '@angular/core';\nimport { INITIAL_CONFIG, ɵINTERNAL_SERVER_PLATFORM_PROVIDERS as INTERNAL_SERVER_PLATFORM_PROVIDERS, } from '@angular/platform-server';\nimport { Router, ɵloadChildren as loadChildrenHelper } from '@angular/router';\nimport { Console } from '../console';\nimport { isNgModule } from '../utils/ng';\nimport { joinUrlParts } from '../utils/url';\n/**\n * Recursively traverses the Angular router configuration to retrieve routes.\n *\n * Iterates through the router configuration, yielding each route along with its potential\n * redirection or error status. Handles nested routes and lazy-loaded child routes.\n *\n * @param options - An object containing the parameters for traversing routes.\n * @returns An async iterator yielding `RouteResult` objects.\n */\nasync function* traverseRoutesConfig(options) {\n const { routes, compiler, parentInjector, parentRoute } = options;\n for (const route of routes) {\n const { path = '', redirectTo, loadChildren, children } = route;\n const currentRoutePath = joinUrlParts(parentRoute, path);\n yield {\n route: currentRoutePath,\n redirectTo: typeof redirectTo === 'string'\n ? resolveRedirectTo(currentRoutePath, redirectTo)\n : undefined,\n };\n if (children?.length) {\n // Recursively process child routes.\n yield* traverseRoutesConfig({\n routes: children,\n compiler,\n parentInjector,\n parentRoute: currentRoutePath,\n });\n }\n if (loadChildren) {\n // Load and process lazy-loaded child routes.\n const loadedChildRoutes = await loadChildrenHelper(route, compiler, parentInjector).toPromise();\n if (loadedChildRoutes) {\n const { routes: childRoutes, injector = parentInjector } = loadedChildRoutes;\n yield* traverseRoutesConfig({\n routes: childRoutes,\n compiler,\n parentInjector: injector,\n parentRoute: currentRoutePath,\n });\n }\n }\n }\n}\n/**\n * Resolves the `redirectTo` property for a given route.\n *\n * This function processes the `redirectTo` property to ensure that it correctly\n * resolves relative to the current route path. If `redirectTo` is an absolute path,\n * it is returned as is. If it is a relative path, it is resolved based on the current route path.\n *\n * @param routePath - The current route path.\n * @param redirectTo - The target path for redirection.\n * @returns The resolved redirect path as a string.\n */\nfunction resolveRedirectTo(routePath, redirectTo) {\n if (redirectTo[0] === '/') {\n // If the redirectTo path is absolute, return it as is.\n return redirectTo;\n }\n // Resolve relative redirectTo based on the current route path.\n const segments = routePath.split('/');\n segments.pop(); // Remove the last segment to make it relative.\n return joinUrlParts(...segments, redirectTo);\n}\n/**\n * Retrieves routes from the given Angular application.\n *\n * This function initializes an Angular platform, bootstraps the application or module,\n * and retrieves routes from the Angular router configuration. It handles both module-based\n * and function-based bootstrapping. It yields the resulting routes as `RouteResult` objects.\n *\n * @param bootstrap - A function that returns a promise resolving to an `ApplicationRef` or an Angular module to bootstrap.\n * @param document - The initial HTML document used for server-side rendering.\n * This document is necessary to render the application on the server.\n * @param url - The URL for server-side rendering. The URL is used to configure `ServerPlatformLocation`. This configuration is crucial\n * for ensuring that API requests for relative paths succeed, which is essential for accurate route extraction.\n * See:\n * - https://github.com/angular/angular/blob/d608b857c689d17a7ffa33bbb510301014d24a17/packages/platform-server/src/location.ts#L51\n * - https://github.com/angular/angular/blob/6882cc7d9eed26d3caeedca027452367ba25f2b9/packages/platform-server/src/http.ts#L44\n * @returns A promise that resolves to an object of type `AngularRouterConfigResult`.\n */\nexport async function getRoutesFromAngularRouterConfig(bootstrap, document, url) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // Need to clean up GENERATED_COMP_IDS map in `@angular/core`.\n // Otherwise an incorrect component ID generation collision detected warning will be displayed in development.\n // See: https://github.com/angular/angular-cli/issues/25924\n ɵresetCompiledComponents();\n }\n const { protocol, host } = url;\n // Create and initialize the Angular platform for server-side rendering.\n const platformRef = createPlatformFactory(platformCore, 'server', [\n {\n provide: INITIAL_CONFIG,\n useValue: { document, url: `${protocol}//${host}/` },\n },\n {\n provide: ɵConsole,\n useFactory: () => new Console(),\n },\n ...INTERNAL_SERVER_PLATFORM_PROVIDERS,\n ])();\n try {\n let applicationRef;\n if (isNgModule(bootstrap)) {\n const moduleRef = await platformRef.bootstrapModule(bootstrap);\n applicationRef = moduleRef.injector.get(ApplicationRef);\n }\n else {\n applicationRef = await bootstrap();\n }\n // Wait until the application is stable.\n await whenStable(applicationRef);\n const injector = applicationRef.injector;\n const router = injector.get(Router);\n const routesResults = [];\n if (router.config.length) {\n const compiler = injector.get(Compiler);\n // Retrieve all routes from the Angular router configuration.\n const traverseRoutes = traverseRoutesConfig({\n routes: router.config,\n compiler,\n parentInjector: injector,\n parentRoute: '',\n });\n for await (const result of traverseRoutes) {\n routesResults.push(result);\n }\n }\n else {\n routesResults.push({ route: '' });\n }\n const baseHref = injector.get(APP_BASE_HREF, null, { optional: true }) ??\n injector.get(PlatformLocation).getBaseHrefFromDOM();\n return {\n baseHref,\n routes: routesResults,\n };\n }\n finally {\n platformRef.destroy();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Manages server-side assets.\n */\nexport class ServerAssets {\n manifest;\n /**\n * Creates an instance of ServerAsset.\n *\n * @param manifest - The manifest containing the server assets.\n */\n constructor(manifest) {\n this.manifest = manifest;\n }\n /**\n * Retrieves the content of a server-side asset using its path.\n *\n * @param path - The path to the server asset.\n * @returns A promise that resolves to the asset content as a string.\n * @throws Error If the asset path is not found in the manifest, an error is thrown.\n */\n async getServerAsset(path) {\n const asset = this.manifest.assets.get(path);\n if (!asset) {\n throw new Error(`Server asset '${path}' does not exist.`);\n }\n return asset();\n }\n /**\n * Retrieves and caches the content of 'index.server.html'.\n *\n * @returns A promise that resolves to the content of 'index.server.html'.\n * @throws Error If there is an issue retrieving the asset.\n */\n getIndexServerHtml() {\n return this.getServerAsset('index.server.html');\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Manages a collection of hooks and provides methods to register and execute them.\n * Hooks are functions that can be invoked with specific arguments to allow modifications or enhancements.\n */\nexport class Hooks {\n /**\n * A map of hook names to arrays of hook functions.\n * Each hook name can have multiple associated functions, which are executed in sequence.\n */\n store = new Map();\n /**\n * Executes all hooks associated with the specified name, passing the given argument to each hook function.\n * The hooks are invoked sequentially, and the argument may be modified by each hook.\n *\n * @template Hook - The type of the hook name. It should be one of the keys of `HooksMapping`.\n * @param name - The name of the hook whose functions will be executed.\n * @param context - The input value to be passed to each hook function. The value is mutated by each hook function.\n * @returns A promise that resolves once all hook functions have been executed.\n *\n * @example\n * ```typescript\n * const hooks = new Hooks();\n * hooks.on('html:transform:pre', async (ctx) => {\n * ctx.html = ctx.html.replace(/foo/g, 'bar');\n * return ctx.html;\n * });\n * const result = await hooks.run('html:transform:pre', { html: '<div>foo</div>' });\n * console.log(result); // '<div>bar</div>'\n * ```\n * @internal\n */\n async run(name, context) {\n const hooks = this.store.get(name);\n switch (name) {\n case 'html:transform:pre': {\n if (!hooks) {\n return context.html;\n }\n const ctx = { ...context };\n for (const hook of hooks) {\n ctx.html = await hook(ctx);\n }\n return ctx.html;\n }\n default:\n throw new Error(`Running hook \"${name}\" is not supported.`);\n }\n }\n /**\n * Registers a new hook function under the specified hook name.\n * This function should be a function that takes an argument of type `T` and returns a `string` or `Promise<string>`.\n *\n * @template Hook - The type of the hook name. It should be one of the keys of `HooksMapping`.\n * @param name - The name of the hook under which the function will be registered.\n * @param handler - A function to be executed when the hook is triggered. The handler will be called with an argument\n * that may be modified by the hook functions.\n *\n * @remarks\n * - If there are existing handlers registered under the given hook name, the new handler will be added to the list.\n * - If no handlers are registered under the given hook name, a new list will be created with the handler as its first element.\n *\n * @example\n * ```typescript\n * hooks.on('html:transform:pre', async (ctx) => {\n * return ctx.html.replace(/foo/g, 'bar');\n * });\n * ```\n */\n on(name, handler) {\n const hooks = this.store.get(name);\n if (hooks) {\n hooks.push(handler);\n }\n else {\n this.store.set(name, [handler]);\n }\n }\n /**\n * Checks if there are any hooks registered under the specified name.\n *\n * @param name - The name of the hook to check.\n * @returns `true` if there are hooks registered under the specified name, otherwise `false`.\n */\n has(name) {\n return !!this.store.get(name)?.length;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * The Angular app manifest object.\n * This is used internally to store the current Angular app manifest.\n */\nlet angularAppManifest;\n/**\n * Sets the Angular app manifest.\n *\n * @param manifest - The manifest object to set for the Angular application.\n */\nexport function setAngularAppManifest(manifest) {\n angularAppManifest = manifest;\n}\n/**\n * Gets the Angular app manifest.\n *\n * @returns The Angular app manifest.\n * @throws Will throw an error if the Angular app manifest is not set.\n */\nexport function getAngularAppManifest() {\n if (!angularAppManifest) {\n throw new Error('Angular app manifest is not set. ' +\n `Please ensure you are using the '@angular/build:application' builder to build your server application.`);\n }\n return angularAppManifest;\n}\n/**\n * The Angular app engine manifest object.\n * This is used internally to store the current Angular app engine manifest.\n */\nlet angularAppEngineManifest;\n/**\n * Sets the Angular app engine manifest.\n *\n * @param manifest - The engine manifest object to set.\n */\nexport function setAngularAppEngineManifest(manifest) {\n angularAppEngineManifest = manifest;\n}\n/**\n * Gets the Angular app engine manifest.\n *\n * @returns The Angular app engine manifest.\n * @throws Will throw an error if the Angular app engine manifest is not set.\n */\nexport function getAngularAppEngineManifest() {\n if (!angularAppEngineManifest) {\n throw new Error('Angular app engine manifest is not set. ' +\n `Please ensure you are using the '@angular/build:application' builder to build your server application.`);\n }\n return angularAppEngineManifest;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { stripTrailingSlash } from '../utils/url';\n/**\n * A route tree implementation that supports efficient route matching, including support for wildcard routes.\n * This structure is useful for organizing and retrieving routes in a hierarchical manner,\n * enabling complex routing scenarios with nested paths.\n */\nexport class RouteTree {\n /**\n * The root node of the route tree.\n * All routes are stored and accessed relative to this root node.\n */\n root = this.createEmptyRouteTreeNode('');\n /**\n * A counter that tracks the order of route insertion.\n * This ensures that routes are matched in the order they were defined,\n * with earlier routes taking precedence.\n */\n insertionIndexCounter = 0;\n /**\n * Inserts a new route into the route tree.\n * The route is broken down into segments, and each segment is added to the tree.\n * Parameterized segments (e.g., :id) are normalized to wildcards (*) for matching purposes.\n *\n * @param route - The route path to insert into the tree.\n * @param metadata - Metadata associated with the route, excluding the route path itself.\n */\n insert(route, metadata) {\n let node = this.root;\n const normalizedRoute = stripTrailingSlash(route);\n const segments = normalizedRoute.split('/');\n for (const segment of segments) {\n // Replace parameterized segments (e.g., :id) with a wildcard (*) for matching\n const normalizedSegment = segment[0] === ':' ? '*' : segment;\n let childNode = node.children.get(normalizedSegment);\n if (!childNode) {\n childNode = this.createEmptyRouteTreeNode(normalizedSegment);\n node.children.set(normalizedSegment, childNode);\n }\n node = childNode;\n }\n // At the leaf node, store the full route and its associated metadata\n node.metadata = {\n ...metadata,\n route: normalizedRoute,\n };\n node.insertionIndex = this.insertionIndexCounter++;\n }\n /**\n * Matches a given route against the route tree and returns the best matching route's metadata.\n * The best match is determined by the lowest insertion index, meaning the earliest defined route\n * takes precedence.\n *\n * @param route - The route path to match against the route tree.\n * @returns The metadata of the best matching route or `undefined` if no match is found.\n */\n match(route) {\n const segments = stripTrailingSlash(route).split('/');\n return this.traverseBySegments(segments)?.metadata;\n }\n /**\n * Converts the route tree into a serialized format representation.\n * This method converts the route tree into an array of metadata objects that describe the structure of the tree.\n * The array represents the routes in a nested manner where each entry includes the route and its associated metadata.\n *\n * @returns An array of `RouteTreeNodeMetadata` objects representing the route tree structure.\n * Each object includes the `route` and associated metadata of a route.\n */\n toObject() {\n return Array.from(this.traverse());\n }\n /**\n * Constructs a `RouteTree` from an object representation.\n * This method is used to recreate a `RouteTree` instance from an array of metadata objects.\n * The array should be in the format produced by `toObject`, allowing for the reconstruction of the route tree\n * with the same routes and metadata.\n *\n * @param value - An array of `RouteTreeNodeMetadata` objects that represent the serialized format of the route tree.\n * Each object should include a `route` and its associated metadata.\n * @returns A new `RouteTree` instance constructed from the provided metadata objects.\n */\n static fromObject(value) {\n const tree = new RouteTree();\n for (const { route, ...metadata } of value) {\n tree.insert(route, metadata);\n }\n return tree;\n }\n /**\n * A generator function that recursively traverses the route tree and yields the metadata of each node.\n * This allows for easy and efficient iteration over all nodes in the tree.\n *\n * @param node - The current node to start the traversal from. Defaults to the root node of the tree.\n */\n *traverse(node = this.root) {\n if (node.metadata) {\n yield node.metadata;\n }\n for (const childNode of node.children.values()) {\n yield* this.traverse(childNode);\n }\n }\n /**\n * Recursively traverses the route tree from a given node, attempting to match the remaining route segments.\n * If the node is a leaf node (no more segments to match) and contains metadata, the node is yielded.\n *\n * This function prioritizes exact segment matches first, followed by wildcard matches (`*`),\n * and finally deep wildcard matches (`**`) that consume all segments.\n *\n * @param remainingSegments - The remaining segments of the route path to match.\n * @param node - The current node in the route tree to start traversal from.\n *\n * @returns The node that best matches the remaining segments or `undefined` if no match is found.\n */\n traverseBySegments(remainingSegments, node = this.root) {\n const { metadata, children } = node;\n // If there are no remaining segments and the node has metadata, return this node\n if (!remainingSegments?.length) {\n if (metadata) {\n return node;\n }\n return;\n }\n // If the node has no children, end the traversal\n if (!children.size) {\n return;\n }\n const [segment, ...restSegments] = remainingSegments;\n let currentBestMatchNode;\n // 1. Exact segment match\n const exactMatchNode = node.children.get(segment);\n currentBestMatchNode = this.getHigherPriorityNode(currentBestMatchNode, this.traverseBySegments(restSegments, exactMatchNode));\n // 2. Wildcard segment match (`*`)\n const wildcardNode = node.children.get('*');\n currentBestMatchNode = this.getHigherPriorityNode(currentBestMatchNode, this.traverseBySegments(restSegments, wildcardNode));\n // 3. Deep wildcard segment match (`**`)\n const deepWildcardNode = node.children.get('**');\n currentBestMatchNode = this.getHigherPriorityNode(currentBestMatchNode, deepWildcardNode);\n return currentBestMatchNode;\n }\n /**\n * Compares two nodes and returns the node with higher priority based on insertion index.\n * A node with a lower insertion index is prioritized as it was defined earlier.\n *\n * @param currentBestMatchNode - The current best match node.\n * @param candidateNode - The node being evaluated for higher priority based on insertion index.\n * @returns The node with higher priority (i.e., lower insertion index). If one of the nodes is `undefined`, the other node is returned.\n */\n getHigherPriorityNode(currentBestMatchNode, candidateNode) {\n if (!candidateNode) {\n return currentBestMatchNode;\n }\n if (!currentBestMatchNode) {\n return candidateNode;\n }\n return candidateNode.insertionIndex < currentBestMatchNode.insertionIndex\n ? candidateNode\n : currentBestMatchNode;\n }\n /**\n * Creates an empty route tree node with the specified segment.\n * This helper function is used during the tree construction.\n *\n * @param segment - The route segment that this node represents.\n * @returns A new, empty route tree node.\n */\n createEmptyRouteTreeNode(segment) {\n return {\n segment,\n insertionIndex: -1,\n children: new Map(),\n };\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { ServerAssets } from '../assets';\nimport { joinUrlParts, stripIndexHtmlFromURL } from '../utils/url';\nimport { getRoutesFromAngularRouterConfig } from './ng-routes';\nimport { RouteTree } from './route-tree';\n/**\n * Manages the application's server routing logic by building and maintaining a route tree.\n *\n * This class is responsible for constructing the route tree from the Angular application\n * configuration and using it to match incoming requests to the appropriate routes.\n */\nexport class ServerRouter {\n routeTree;\n /**\n * Creates an instance of the `ServerRouter`.\n *\n * @param routeTree - An instance of `RouteTree` that holds the routing information.\n * The `RouteTree` is used to match request URLs to the appropriate route metadata.\n */\n constructor(routeTree) {\n this.routeTree = routeTree;\n }\n /**\n * Static property to track the ongoing build promise.\n */\n static #extractionPromise;\n /**\n * Creates or retrieves a `ServerRouter` instance based on the provided manifest and URL.\n *\n * If the manifest contains pre-built routes, a new `ServerRouter` is immediately created.\n * Otherwise, it builds the router by extracting routes from the Angular configuration\n * asynchronously. This method ensures that concurrent builds are prevented by re-using\n * the same promise.\n *\n * @param manifest - An instance of `AngularAppManifest` that contains the route information.\n * @param url - The URL for server-side rendering. The URL is needed to configure `ServerPlatformLocation`.\n * This is necessary to ensure that API requests for relative paths succeed, which is crucial for correct route extraction.\n * [Reference](https://github.com/angular/angular/blob/d608b857c689d17a7ffa33bbb510301014d24a17/packages/platform-server/src/location.ts#L51)\n * @returns A promise resolving to a `ServerRouter` instance.\n */\n static from(manifest, url) {\n if (manifest.routes) {\n const routeTree = RouteTree.fromObject(manifest.routes);\n return Promise.resolve(new ServerRouter(routeTree));\n }\n // Create and store a new promise for the build process.\n // This prevents concurrent builds by re-using the same promise.\n ServerRouter.#extractionPromise ??= (async () => {\n try {\n const routeTree = new RouteTree();\n const document = await new ServerAssets(manifest).getIndexServerHtml();\n const { baseHref, routes } = await getRoutesFromAngularRouterConfig(manifest.bootstrap(), document, url);\n for (let { route, redirectTo } of routes) {\n route = joinUrlParts(baseHref, route);\n redirectTo = redirectTo === undefined ? undefined : joinUrlParts(baseHref, redirectTo);\n routeTree.insert(route, { redirectTo });\n }\n return new ServerRouter(routeTree);\n }\n finally {\n ServerRouter.#extractionPromise = undefined;\n }\n })();\n return ServerRouter.#extractionPromise;\n }\n /**\n * Matches a request URL against the route tree to retrieve route metadata.\n *\n * This method strips 'index.html' from the URL if it is present and then attempts\n * to find a match in the route tree. If a match is found, it returns the associated\n * route metadata; otherwise, it returns `undefined`.\n *\n * @param url - The URL to be matched against the route tree.\n * @returns The metadata for the matched route or `undefined` if no match is found.\n */\n match(url) {\n // Strip 'index.html' from URL if present.\n // A request to `http://www.example.com/page/index.html` will render the Angular route corresponding to `http://www.example.com/page`.\n const { pathname } = stripIndexHtmlFromURL(url);\n return this.routeTree.match(decodeURIComponent(pathname));\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { InjectionToken } from '@angular/core';\n/**\n * Injection token for the current request.\n */\nexport const REQUEST = new InjectionToken('REQUEST');\n/**\n * Injection token for the response initialization options.\n */\nexport const RESPONSE_INIT = new InjectionToken('RESPONSE_INIT');\n/**\n * Injection token for additional request context.\n */\nexport const REQUEST_CONTEXT = new InjectionToken('REQUEST_CONTEXT');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { ɵConsole, ɵresetCompiledComponents } from '@angular/core';\nimport { ɵSERVER_CONTEXT as SERVER_CONTEXT } from '@angular/platform-server';\nimport { ServerAssets } from './assets';\nimport { Console } from './console';\nimport { Hooks } from './hooks';\nimport { getAngularAppManifest } from './manifest';\nimport { ServerRouter } from './routes/router';\nimport { REQUEST, REQUEST_CONTEXT, RESPONSE_INIT } from './tokens';\nimport { renderAngular } from './utils/ng';\n/**\n * Enum representing the different contexts in which server rendering can occur.\n */\nexport var ServerRenderContext;\n(function (ServerRenderContext) {\n ServerRenderContext[\"SSR\"] = \"ssr\";\n ServerRenderContext[\"SSG\"] = \"ssg\";\n ServerRenderContext[\"AppShell\"] = \"app-shell\";\n})(ServerRenderContext || (ServerRenderContext = {}));\n/**\n * Represents a locale-specific Angular server application managed by the server application engine.\n *\n * The `AngularServerApp` class handles server-side rendering and asset management for a specific locale.\n */\nexport class AngularServerApp {\n /**\n * Hooks for extending or modifying the behavior of the server application.\n * This instance can be used to attach custom functionality to various events in the server application lifecycle.\n */\n hooks = new Hooks();\n /**\n * The manifest associated with this server application.\n */\n manifest = getAngularAppManifest();\n /**\n * An instance of ServerAsset that handles server-side asset.\n */\n assets = new ServerAssets(this.manifest);\n /**\n * The router instance used for route matching and handling.\n */\n router;\n /**\n * Renders a response for the given HTTP request using the server application.\n *\n * This method processes the request and returns a response based on the specified rendering context.\n *\n * @param request - The incoming HTTP request to be rendered.\n * @param requestContext - Optional additional context for rendering, such as request metadata.\n * @param serverContext - The rendering context.\n *\n * @returns A promise that resolves to the HTTP response object resulting from the rendering, or null if no match is found.\n */\n render(request, requestContext, serverContext = ServerRenderContext.SSR) {\n return Promise.race([\n this.createAbortPromise(request),\n this.handleRendering(request, requestContext, serverContext),\n ]);\n }\n /**\n * Creates a promise that rejects when the request is aborted.\n *\n * @param request - The HTTP request to monitor for abortion.\n * @returns A promise that never resolves but rejects with an `AbortError` if the request is aborted.\n */\n createAbortPromise(request) {\n return new Promise((_, reject) => {\n request.signal.addEventListener('abort', () => {\n const abortError = new Error(`Request for: ${request.url} was aborted.\\n${request.signal.reason}`);\n abortError.name = 'AbortError';\n reject(abortError);\n }, { once: true });\n });\n }\n /**\n * Handles the server-side rendering process for the given HTTP request.\n * This method matches the request URL to a route and performs rendering if a matching route is found.\n *\n * @param request - The incoming HTTP request to be processed.\n * @param requestContext - Optional additional context for rendering, such as request metadata.\n * @param serverContext - The rendering context. Defaults to server-side rendering (SSR).\n *\n * @returns A promise that resolves to the rendered response, or null if no matching route is found.\n */\n async handleRendering(request, requestContext, serverContext = ServerRenderContext.SSR) {\n const url = new URL(request.url);\n this.router ??= await ServerRouter.from(this.manifest, url);\n const matchedRoute = this.router.match(url);\n if (!matchedRoute) {\n // Not a known Angular route.\n return null;\n }\n const { redirectTo } = matchedRoute;\n if (redirectTo !== undefined) {\n // 302 Found is used by default for redirections\n // See: https://developer.mozilla.org/en-US/docs/Web/API/Response/redirect_static#status\n return Response.redirect(new URL(redirectTo, url), 302);\n }\n const platformProviders = [\n {\n provide: SERVER_CONTEXT,\n useValue: serverContext,\n },\n {\n // An Angular Console Provider that does not print a set of predefined logs.\n provide: ɵConsole,\n // Using `useClass` would necessitate decorating `Console` with `@Injectable`,\n // which would require switching from `ts_library` to `ng_module`. This change\n // would also necessitate various patches of `@angular/bazel` to support ESM.\n useFactory: () => new Console(),\n },\n ];\n const isSsrMode = serverContext === ServerRenderContext.SSR;\n const responseInit = {};\n if (isSsrMode) {\n platformProviders.push({\n provide: REQUEST,\n useValue: request,\n }, {\n provide: REQUEST_CONTEXT,\n useValue: requestContext,\n }, {\n provide: RESPONSE_INIT,\n useValue: responseInit,\n });\n }\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // Need to clean up GENERATED_COMP_IDS map in `@angular/core`.\n // Otherwise an incorrect component ID generation collision detected warning will be displayed in development.\n // See: https://github.com/angular/angular-cli/issues/25924\n ɵresetCompiledComponents();\n }\n const { manifest, hooks, assets } = this;\n let html = await assets.getIndexServerHtml();\n // Skip extra microtask if there are no pre hooks.\n if (hooks.has('html:transform:pre')) {\n html = await hooks.run('html:transform:pre', { html });\n }\n return new Response(await renderAngular(html, manifest.bootstrap(), new URL(request.url), platformProviders), responseInit);\n }\n}\nlet angularServerApp;\n/**\n * Retrieves or creates an instance of `AngularServerApp`.\n * - If an instance of `AngularServerApp` already exists, it will return the existing one.\n * - If no instance exists, it will create a new one with the provided options.\n * @returns The existing or newly created instance of `AngularServerApp`.\n */\nexport function getOrCreateAngularServerApp() {\n return (angularServerApp ??= new AngularServerApp());\n}\n/**\n * Destroys the existing `AngularServerApp` instance, releasing associated resources and resetting the\n * reference to `undefined`.\n *\n * This function is primarily used to enable the recreation of the `AngularServerApp` instance,\n * typically when server configuration or application state needs to be refreshed.\n */\nexport function destroyAngularServerApp() {\n angularServerApp = undefined;\n}\n"],"names":["URL","ɵSERVER_CONTEXT","ɵConsole","loadChildrenHelper","ɵresetCompiledComponents","INTERNAL_SERVER_PLATFORM_PROVIDERS","whenStable","SERVER_CONTEXT"],"mappings":";;;;;;;;;;AASA;AACA;AACA;AACA,MAAM,yBAAyB,GAAG,8BAA8B,CAAC;AACjE;AACA;AACA;AACA,MAAM,cAAc,GAAG,YAAY,CAAC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,wBAAwB,GAAG;AACjC,IAAI,UAAU;AACd,IAAI,CAAC,0BAA0B,EAAE,cAAc,CAAC,EAAE,CAAC;AACn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,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;AACnE,SAAS;AACT,QAAQ,OAAO,IAAI,QAAQ,CAAC,MAAM,aAAa,CAAC,IAAI,EAAE,QAAQ,CAAC,SAAS,EAAE,EAAE,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,iBAAiB,CAAC,EAAE,YAAY,CAAC,CAAC;AACpI,KAAK;AACL,CAAC;AACD,IAAI,gBAAgB,CAAC;AACrB;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,2BAA2B,GAAG;AAC9C,IAAI,QAAQ,gBAAgB,KAAK,IAAI,gBAAgB,EAAE,EAAE;AACzD,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,uBAAuB,GAAG;AAC1C,IAAI,gBAAgB,GAAG,SAAS,CAAC;AACjC;;;;"}
|
package/index.d.ts
CHANGED
|
@@ -2,6 +2,147 @@ import { ApplicationRef } from '@angular/core';
|
|
|
2
2
|
import { StaticProvider } from '@angular/core';
|
|
3
3
|
import { Type } from '@angular/core';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Manifest for the Angular server application engine, defining entry points.
|
|
7
|
+
*/
|
|
8
|
+
declare interface AngularAppEngineManifest {
|
|
9
|
+
/**
|
|
10
|
+
* A map of entry points for the server application.
|
|
11
|
+
* Each entry in the map consists of:
|
|
12
|
+
* - `key`: The base href for the entry point.
|
|
13
|
+
* - `value`: A function that returns a promise resolving to an object of type `EntryPointExports`.
|
|
14
|
+
*/
|
|
15
|
+
readonly entryPoints: Readonly<Map<string, () => Promise<EntryPointExports>>>;
|
|
16
|
+
/**
|
|
17
|
+
* The base path for the server application.
|
|
18
|
+
* This is used to determine the root path of the application.
|
|
19
|
+
*/
|
|
20
|
+
readonly basePath: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Manifest for a specific Angular server application, defining assets and bootstrap logic.
|
|
25
|
+
*/
|
|
26
|
+
declare interface AngularAppManifest {
|
|
27
|
+
/**
|
|
28
|
+
* A map of assets required by the server application.
|
|
29
|
+
* Each entry in the map consists of:
|
|
30
|
+
* - `key`: The path of the asset.
|
|
31
|
+
* - `value`: A function returning a promise that resolves to the file contents of the asset.
|
|
32
|
+
*/
|
|
33
|
+
readonly assets: Readonly<Map<string, () => Promise<string>>>;
|
|
34
|
+
/**
|
|
35
|
+
* The bootstrap mechanism for the server application.
|
|
36
|
+
* A function that returns a reference to an NgModule or a function returning a promise that resolves to an ApplicationRef.
|
|
37
|
+
*/
|
|
38
|
+
readonly bootstrap: () => AngularBootstrap;
|
|
39
|
+
/**
|
|
40
|
+
* Indicates whether critical CSS should be inlined into the HTML.
|
|
41
|
+
* If set to `true`, critical CSS will be inlined for faster page rendering.
|
|
42
|
+
*/
|
|
43
|
+
readonly inlineCriticalCss?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* The route tree representation for the routing configuration of the application.
|
|
46
|
+
* This represents the routing information of the application, mapping route paths to their corresponding metadata.
|
|
47
|
+
* It is used for route matching and navigation within the server application.
|
|
48
|
+
*/
|
|
49
|
+
readonly routes?: SerializableRouteTreeNode;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Represents the bootstrap mechanism for an Angular application.
|
|
54
|
+
*
|
|
55
|
+
* This type can either be:
|
|
56
|
+
* - A reference to an Angular component or module (`Type<unknown>`) that serves as the root of the application.
|
|
57
|
+
* - A function that returns a `Promise<ApplicationRef>`, which resolves with the root application reference.
|
|
58
|
+
*/
|
|
59
|
+
declare type AngularBootstrap = Type<unknown> | (() => Promise<ApplicationRef>);
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Result of extracting routes from an Angular application.
|
|
63
|
+
*/
|
|
64
|
+
declare interface AngularRouterConfigResult {
|
|
65
|
+
/**
|
|
66
|
+
* The base URL for the application.
|
|
67
|
+
* This is the base href that is used for resolving relative paths within the application.
|
|
68
|
+
*/
|
|
69
|
+
baseHref: string;
|
|
70
|
+
/**
|
|
71
|
+
* An array of `RouteResult` objects representing the application's routes.
|
|
72
|
+
*
|
|
73
|
+
* Each `RouteResult` contains details about a specific route, such as its path and any
|
|
74
|
+
* associated redirection targets. This array is asynchronously generated and
|
|
75
|
+
* provides information on how routes are structured and resolved.
|
|
76
|
+
*
|
|
77
|
+
* Example:
|
|
78
|
+
* ```typescript
|
|
79
|
+
* const result: AngularRouterConfigResult = {
|
|
80
|
+
* baseHref: '/app/',
|
|
81
|
+
* routes: [
|
|
82
|
+
* { route: '/home', redirectTo: '/welcome' },
|
|
83
|
+
* { route: '/about' },
|
|
84
|
+
* ],
|
|
85
|
+
* };
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
routes: RouteResult[];
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Represents a locale-specific Angular server application managed by the server application engine.
|
|
93
|
+
*
|
|
94
|
+
* The `AngularServerApp` class handles server-side rendering and asset management for a specific locale.
|
|
95
|
+
*/
|
|
96
|
+
declare class AngularServerApp {
|
|
97
|
+
/**
|
|
98
|
+
* Hooks for extending or modifying the behavior of the server application.
|
|
99
|
+
* This instance can be used to attach custom functionality to various events in the server application lifecycle.
|
|
100
|
+
*/
|
|
101
|
+
hooks: Hooks;
|
|
102
|
+
/**
|
|
103
|
+
* The manifest associated with this server application.
|
|
104
|
+
*/
|
|
105
|
+
private readonly manifest;
|
|
106
|
+
/**
|
|
107
|
+
* An instance of ServerAsset that handles server-side asset.
|
|
108
|
+
*/
|
|
109
|
+
private readonly assets;
|
|
110
|
+
/**
|
|
111
|
+
* The router instance used for route matching and handling.
|
|
112
|
+
*/
|
|
113
|
+
private router;
|
|
114
|
+
/**
|
|
115
|
+
* Renders a response for the given HTTP request using the server application.
|
|
116
|
+
*
|
|
117
|
+
* This method processes the request and returns a response based on the specified rendering context.
|
|
118
|
+
*
|
|
119
|
+
* @param request - The incoming HTTP request to be rendered.
|
|
120
|
+
* @param requestContext - Optional additional context for rendering, such as request metadata.
|
|
121
|
+
* @param serverContext - The rendering context.
|
|
122
|
+
*
|
|
123
|
+
* @returns A promise that resolves to the HTTP response object resulting from the rendering, or null if no match is found.
|
|
124
|
+
*/
|
|
125
|
+
render(request: Request, requestContext?: unknown, serverContext?: ɵServerRenderContext): Promise<Response | null>;
|
|
126
|
+
/**
|
|
127
|
+
* Creates a promise that rejects when the request is aborted.
|
|
128
|
+
*
|
|
129
|
+
* @param request - The HTTP request to monitor for abortion.
|
|
130
|
+
* @returns A promise that never resolves but rejects with an `AbortError` if the request is aborted.
|
|
131
|
+
*/
|
|
132
|
+
private createAbortPromise;
|
|
133
|
+
/**
|
|
134
|
+
* Handles the server-side rendering process for the given HTTP request.
|
|
135
|
+
* This method matches the request URL to a route and performs rendering if a matching route is found.
|
|
136
|
+
*
|
|
137
|
+
* @param request - The incoming HTTP request to be processed.
|
|
138
|
+
* @param requestContext - Optional additional context for rendering, such as request metadata.
|
|
139
|
+
* @param serverContext - The rendering context. Defaults to server-side rendering (SSR).
|
|
140
|
+
*
|
|
141
|
+
* @returns A promise that resolves to the rendered response, or null if no matching route is found.
|
|
142
|
+
*/
|
|
143
|
+
private handleRendering;
|
|
144
|
+
}
|
|
145
|
+
|
|
5
146
|
/**
|
|
6
147
|
* A common engine to use to server render an application.
|
|
7
148
|
*/
|
|
@@ -52,4 +193,199 @@ export declare interface CommonEngineRenderOptions {
|
|
|
52
193
|
publicPath?: string;
|
|
53
194
|
}
|
|
54
195
|
|
|
196
|
+
/**
|
|
197
|
+
* Represents the exports of an Angular server application entry point.
|
|
198
|
+
*/
|
|
199
|
+
declare interface EntryPointExports {
|
|
200
|
+
/**
|
|
201
|
+
* A reference to the function that creates an Angular server application instance.
|
|
202
|
+
*/
|
|
203
|
+
ɵgetOrCreateAngularServerApp: typeof ɵgetOrCreateAngularServerApp;
|
|
204
|
+
/**
|
|
205
|
+
* A reference to the function that destroys the `AngularServerApp` instance.
|
|
206
|
+
*/
|
|
207
|
+
ɵdestroyAngularServerApp: typeof ɵdestroyAngularServerApp;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Defines the names of available hooks for registering and triggering custom logic within the application.
|
|
212
|
+
*/
|
|
213
|
+
declare type HookName = keyof HooksMapping;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Manages a collection of hooks and provides methods to register and execute them.
|
|
217
|
+
* Hooks are functions that can be invoked with specific arguments to allow modifications or enhancements.
|
|
218
|
+
*/
|
|
219
|
+
declare class Hooks {
|
|
220
|
+
/**
|
|
221
|
+
* A map of hook names to arrays of hook functions.
|
|
222
|
+
* Each hook name can have multiple associated functions, which are executed in sequence.
|
|
223
|
+
*/
|
|
224
|
+
private readonly store;
|
|
225
|
+
/**
|
|
226
|
+
* Registers a new hook function under the specified hook name.
|
|
227
|
+
* This function should be a function that takes an argument of type `T` and returns a `string` or `Promise<string>`.
|
|
228
|
+
*
|
|
229
|
+
* @template Hook - The type of the hook name. It should be one of the keys of `HooksMapping`.
|
|
230
|
+
* @param name - The name of the hook under which the function will be registered.
|
|
231
|
+
* @param handler - A function to be executed when the hook is triggered. The handler will be called with an argument
|
|
232
|
+
* that may be modified by the hook functions.
|
|
233
|
+
*
|
|
234
|
+
* @remarks
|
|
235
|
+
* - If there are existing handlers registered under the given hook name, the new handler will be added to the list.
|
|
236
|
+
* - If no handlers are registered under the given hook name, a new list will be created with the handler as its first element.
|
|
237
|
+
*
|
|
238
|
+
* @example
|
|
239
|
+
* ```typescript
|
|
240
|
+
* hooks.on('html:transform:pre', async (ctx) => {
|
|
241
|
+
* return ctx.html.replace(/foo/g, 'bar');
|
|
242
|
+
* });
|
|
243
|
+
* ```
|
|
244
|
+
*/
|
|
245
|
+
on<Hook extends HookName>(name: Hook, handler: HooksMapping[Hook]): void;
|
|
246
|
+
/**
|
|
247
|
+
* Checks if there are any hooks registered under the specified name.
|
|
248
|
+
*
|
|
249
|
+
* @param name - The name of the hook to check.
|
|
250
|
+
* @returns `true` if there are hooks registered under the specified name, otherwise `false`.
|
|
251
|
+
*/
|
|
252
|
+
has(name: HookName): boolean;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Mapping of hook names to their corresponding handler types.
|
|
257
|
+
*/
|
|
258
|
+
declare interface HooksMapping {
|
|
259
|
+
'html:transform:pre': HtmlTransformHandler;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Handler function type for HTML transformation hooks.
|
|
265
|
+
* It takes an object containing the HTML content to be modified.
|
|
266
|
+
*
|
|
267
|
+
* @param ctx - The context object containing the HTML content.
|
|
268
|
+
* @returns The modified HTML content or a promise that resolves to the modified HTML content.
|
|
269
|
+
*/
|
|
270
|
+
declare type HtmlTransformHandler = (ctx: {
|
|
271
|
+
html: string;
|
|
272
|
+
}) => string | Promise<string>;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Represents the result of processing a route.
|
|
276
|
+
*/
|
|
277
|
+
declare interface RouteResult {
|
|
278
|
+
/**
|
|
279
|
+
* The resolved path of the route.
|
|
280
|
+
*
|
|
281
|
+
* This string represents the complete URL path for the route after it has been
|
|
282
|
+
* resolved, including any parent routes or path segments that have been joined.
|
|
283
|
+
*/
|
|
284
|
+
route: string;
|
|
285
|
+
/**
|
|
286
|
+
* The target path for route redirection, if applicable.
|
|
287
|
+
*
|
|
288
|
+
* If this route has a `redirectTo` property in the configuration, this field will
|
|
289
|
+
* contain the full resolved URL path that the route should redirect to.
|
|
290
|
+
*/
|
|
291
|
+
redirectTo?: string;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Describes metadata associated with a node in the route tree.
|
|
296
|
+
* This metadata includes information such as the route path and optional redirect instructions.
|
|
297
|
+
*/
|
|
298
|
+
declare interface RouteTreeNodeMetadata {
|
|
299
|
+
/**
|
|
300
|
+
* Optional redirect path associated with this node.
|
|
301
|
+
* This defines where to redirect if this route is matched.
|
|
302
|
+
*/
|
|
303
|
+
redirectTo?: string;
|
|
304
|
+
/**
|
|
305
|
+
* The route path for this node.
|
|
306
|
+
*
|
|
307
|
+
* A "route" is a URL path or pattern that is used to navigate to different parts of a web application.
|
|
308
|
+
* It is made up of one or more segments separated by slashes `/`. For instance, in the URL `/products/details/42`,
|
|
309
|
+
* the full route is `/products/details/42`, with segments `products`, `details`, and `42`.
|
|
310
|
+
*
|
|
311
|
+
* Routes define how URLs map to views or components in an application. Each route segment contributes to
|
|
312
|
+
* the overall path that determines which view or component is displayed.
|
|
313
|
+
*
|
|
314
|
+
* - **Static Routes**: These routes have fixed segments. For example, `/about` or `/contact`.
|
|
315
|
+
* - **Parameterized Routes**: These include dynamic segments that act as placeholders, such as `/users/:id`,
|
|
316
|
+
* where `:id` could be any user ID.
|
|
317
|
+
*
|
|
318
|
+
* In the context of `RouteTreeNodeMetadata`, the `route` property represents the complete path that this node
|
|
319
|
+
* in the route tree corresponds to. This path is used to determine how a specific URL in the browser maps to the
|
|
320
|
+
* structure and content of the application.
|
|
321
|
+
*/
|
|
322
|
+
route: string;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Represents the serialized format of a route tree as an array of node metadata objects.
|
|
328
|
+
* Each entry in the array corresponds to a specific node's metadata within the route tree.
|
|
329
|
+
*/
|
|
330
|
+
declare type SerializableRouteTreeNode = ReadonlyArray<RouteTreeNodeMetadata>;
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* Destroys the existing `AngularServerApp` instance, releasing associated resources and resetting the
|
|
334
|
+
* reference to `undefined`.
|
|
335
|
+
*
|
|
336
|
+
* This function is primarily used to enable the recreation of the `AngularServerApp` instance,
|
|
337
|
+
* typically when server configuration or application state needs to be refreshed.
|
|
338
|
+
*/
|
|
339
|
+
export declare function ɵdestroyAngularServerApp(): void;
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* Retrieves or creates an instance of `AngularServerApp`.
|
|
343
|
+
* - If an instance of `AngularServerApp` already exists, it will return the existing one.
|
|
344
|
+
* - If no instance exists, it will create a new one with the provided options.
|
|
345
|
+
* @returns The existing or newly created instance of `AngularServerApp`.
|
|
346
|
+
*/
|
|
347
|
+
export declare function ɵgetOrCreateAngularServerApp(): AngularServerApp;
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* Retrieves routes from the given Angular application.
|
|
351
|
+
*
|
|
352
|
+
* This function initializes an Angular platform, bootstraps the application or module,
|
|
353
|
+
* and retrieves routes from the Angular router configuration. It handles both module-based
|
|
354
|
+
* and function-based bootstrapping. It yields the resulting routes as `RouteResult` objects.
|
|
355
|
+
*
|
|
356
|
+
* @param bootstrap - A function that returns a promise resolving to an `ApplicationRef` or an Angular module to bootstrap.
|
|
357
|
+
* @param document - The initial HTML document used for server-side rendering.
|
|
358
|
+
* This document is necessary to render the application on the server.
|
|
359
|
+
* @param url - The URL for server-side rendering. The URL is used to configure `ServerPlatformLocation`. This configuration is crucial
|
|
360
|
+
* for ensuring that API requests for relative paths succeed, which is essential for accurate route extraction.
|
|
361
|
+
* See:
|
|
362
|
+
* - https://github.com/angular/angular/blob/d608b857c689d17a7ffa33bbb510301014d24a17/packages/platform-server/src/location.ts#L51
|
|
363
|
+
* - https://github.com/angular/angular/blob/6882cc7d9eed26d3caeedca027452367ba25f2b9/packages/platform-server/src/http.ts#L44
|
|
364
|
+
* @returns A promise that resolves to an object of type `AngularRouterConfigResult`.
|
|
365
|
+
*/
|
|
366
|
+
export declare function ɵgetRoutesFromAngularRouterConfig(bootstrap: AngularBootstrap, document: string, url: URL): Promise<AngularRouterConfigResult>;
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* Enum representing the different contexts in which server rendering can occur.
|
|
370
|
+
*/
|
|
371
|
+
export declare enum ɵServerRenderContext {
|
|
372
|
+
SSR = "ssr",
|
|
373
|
+
SSG = "ssg",
|
|
374
|
+
AppShell = "app-shell"
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* Sets the Angular app engine manifest.
|
|
379
|
+
*
|
|
380
|
+
* @param manifest - The engine manifest object to set.
|
|
381
|
+
*/
|
|
382
|
+
export declare function ɵsetAngularAppEngineManifest(manifest: AngularAppEngineManifest): void;
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Sets the Angular app manifest.
|
|
386
|
+
*
|
|
387
|
+
* @param manifest - The manifest object to set for the Angular application.
|
|
388
|
+
*/
|
|
389
|
+
export declare function ɵsetAngularAppManifest(manifest: AngularAppManifest): void;
|
|
390
|
+
|
|
55
391
|
export { }
|