@angular/platform-server 22.2.0-rc.0 → 22.2.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/fesm2022/_server-chunk.mjs +31 -20
- package/fesm2022/_server-chunk.mjs.map +1 -1
- package/fesm2022/init.mjs +1 -1
- package/fesm2022/platform-server.mjs +2 -2
- package/fesm2022/platform-server.mjs.map +1 -1
- package/fesm2022/testing.mjs +5 -5
- package/package.json +5 -5
- package/third_party/domino/bundled-domino.mjs +178 -81
- package/third_party/domino/bundled-domino.mjs.map +1 -1
- package/types/init.d.ts +1 -1
- package/types/platform-server.d.ts +1 -1
- package/types/testing.d.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v22.2.
|
|
2
|
+
* @license Angular v22.2.1
|
|
3
3
|
* (c) 2010-2026 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -109,7 +109,7 @@ class PlatformState {
|
|
|
109
109
|
}
|
|
110
110
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
111
111
|
minVersion: "12.0.0",
|
|
112
|
-
version: "22.2.
|
|
112
|
+
version: "22.2.1",
|
|
113
113
|
ngImport: i0,
|
|
114
114
|
type: PlatformState,
|
|
115
115
|
deps: [{
|
|
@@ -119,14 +119,14 @@ class PlatformState {
|
|
|
119
119
|
});
|
|
120
120
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
121
121
|
minVersion: "12.0.0",
|
|
122
|
-
version: "22.2.
|
|
122
|
+
version: "22.2.1",
|
|
123
123
|
ngImport: i0,
|
|
124
124
|
type: PlatformState
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
127
|
i0.ɵɵngDeclareClassMetadata({
|
|
128
128
|
minVersion: "12.0.0",
|
|
129
|
-
version: "22.2.
|
|
129
|
+
version: "22.2.1",
|
|
130
130
|
ngImport: i0,
|
|
131
131
|
type: PlatformState,
|
|
132
132
|
decorators: [{
|
|
@@ -162,6 +162,9 @@ function resolveUrl(urlStr, origin, options = {}) {
|
|
|
162
162
|
allowOriginChange = true
|
|
163
163
|
} = options;
|
|
164
164
|
if (resolved) {
|
|
165
|
+
if (isDisallowedProtocolRelative(resolved, allowProtocolRelative)) {
|
|
166
|
+
throwProtocolRelativeUrlError(urlStr);
|
|
167
|
+
}
|
|
165
168
|
if (originUrl && !isSafeOriginChange(resolved, originUrl, urlStr, allowOriginChange)) {
|
|
166
169
|
throwSuspiciousUrlError(urlStr);
|
|
167
170
|
}
|
|
@@ -175,16 +178,25 @@ function resolveUrl(urlStr, origin, options = {}) {
|
|
|
175
178
|
}
|
|
176
179
|
if (urlStr.startsWith('//')) {
|
|
177
180
|
if (!allowProtocolRelative) {
|
|
178
|
-
|
|
181
|
+
throwProtocolRelativeUrlError(urlStr);
|
|
179
182
|
}
|
|
180
183
|
return new URL(urlStr, origin);
|
|
181
184
|
}
|
|
182
185
|
resolved = new URL(urlStr, origin);
|
|
186
|
+
if (isDisallowedProtocolRelative(resolved, allowProtocolRelative)) {
|
|
187
|
+
throwProtocolRelativeUrlError(urlStr);
|
|
188
|
+
}
|
|
183
189
|
if (!isSafeOriginChange(resolved, originUrl, urlStr, allowOriginChange)) {
|
|
184
190
|
throwSuspiciousUrlError(urlStr);
|
|
185
191
|
}
|
|
186
192
|
return resolved;
|
|
187
193
|
}
|
|
194
|
+
function isDisallowedProtocolRelative(resolved, allowProtocolRelative) {
|
|
195
|
+
return !allowProtocolRelative && resolved.pathname.startsWith('//');
|
|
196
|
+
}
|
|
197
|
+
function throwProtocolRelativeUrlError(urlStr) {
|
|
198
|
+
throw new _RuntimeError(5702, typeof ngDevMode === 'undefined' || ngDevMode ? `Protocol relative URLs are not allowed in this context. URL: ${urlStr}` : urlStr);
|
|
199
|
+
}
|
|
188
200
|
function throwSuspiciousUrlError(urlStr) {
|
|
189
201
|
throw new _RuntimeError(-5703, typeof ngDevMode === 'undefined' || ngDevMode ? `URL ${urlStr} changed origin unexpectedly. This is suspicious and may indicate a security bypass attempt.` : urlStr);
|
|
190
202
|
}
|
|
@@ -220,7 +232,7 @@ class ServerXhr {
|
|
|
220
232
|
}
|
|
221
233
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
222
234
|
minVersion: "12.0.0",
|
|
223
|
-
version: "22.2.
|
|
235
|
+
version: "22.2.1",
|
|
224
236
|
ngImport: i0,
|
|
225
237
|
type: ServerXhr,
|
|
226
238
|
deps: [],
|
|
@@ -228,14 +240,14 @@ class ServerXhr {
|
|
|
228
240
|
});
|
|
229
241
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
230
242
|
minVersion: "12.0.0",
|
|
231
|
-
version: "22.2.
|
|
243
|
+
version: "22.2.1",
|
|
232
244
|
ngImport: i0,
|
|
233
245
|
type: ServerXhr
|
|
234
246
|
});
|
|
235
247
|
}
|
|
236
248
|
i0.ɵɵngDeclareClassMetadata({
|
|
237
249
|
minVersion: "12.0.0",
|
|
238
|
-
version: "22.2.
|
|
250
|
+
version: "22.2.1",
|
|
239
251
|
ngImport: i0,
|
|
240
252
|
type: ServerXhr,
|
|
241
253
|
decorators: [{
|
|
@@ -244,8 +256,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
244
256
|
});
|
|
245
257
|
const URL_SCHEMA_REGEXP = /^(?:[a-zA-Z][a-zA-Z0-9+\-.]*:)/;
|
|
246
258
|
function relativeUrlsTransformerInterceptorFn(request, next) {
|
|
247
|
-
|
|
248
|
-
if (URL_SCHEMA_REGEXP.test(trimmedUrl) && !HTTP_OR_HTTPS_NO_AUTHORITY_REGEXP.test(trimmedUrl)) {
|
|
259
|
+
if (URL_SCHEMA_REGEXP.test(request.url) && !HTTP_OR_HTTPS_NO_AUTHORITY_REGEXP.test(request.url)) {
|
|
249
260
|
return next(request);
|
|
250
261
|
}
|
|
251
262
|
const platformLocation = inject(PlatformLocation);
|
|
@@ -377,7 +388,7 @@ class ServerPlatformLocation {
|
|
|
377
388
|
}
|
|
378
389
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
379
390
|
minVersion: "12.0.0",
|
|
380
|
-
version: "22.2.
|
|
391
|
+
version: "22.2.1",
|
|
381
392
|
ngImport: i0,
|
|
382
393
|
type: ServerPlatformLocation,
|
|
383
394
|
deps: [],
|
|
@@ -385,14 +396,14 @@ class ServerPlatformLocation {
|
|
|
385
396
|
});
|
|
386
397
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
387
398
|
minVersion: "12.0.0",
|
|
388
|
-
version: "22.2.
|
|
399
|
+
version: "22.2.1",
|
|
389
400
|
ngImport: i0,
|
|
390
401
|
type: ServerPlatformLocation
|
|
391
402
|
});
|
|
392
403
|
}
|
|
393
404
|
i0.ɵɵngDeclareClassMetadata({
|
|
394
405
|
minVersion: "12.0.0",
|
|
395
|
-
version: "22.2.
|
|
406
|
+
version: "22.2.1",
|
|
396
407
|
ngImport: i0,
|
|
397
408
|
type: ServerPlatformLocation,
|
|
398
409
|
decorators: [{
|
|
@@ -415,7 +426,7 @@ class ServerEventManagerPlugin extends EventManagerPlugin {
|
|
|
415
426
|
}
|
|
416
427
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
417
428
|
minVersion: "12.0.0",
|
|
418
|
-
version: "22.2.
|
|
429
|
+
version: "22.2.1",
|
|
419
430
|
ngImport: i0,
|
|
420
431
|
type: ServerEventManagerPlugin,
|
|
421
432
|
deps: [{
|
|
@@ -425,14 +436,14 @@ class ServerEventManagerPlugin extends EventManagerPlugin {
|
|
|
425
436
|
});
|
|
426
437
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
427
438
|
minVersion: "12.0.0",
|
|
428
|
-
version: "22.2.
|
|
439
|
+
version: "22.2.1",
|
|
429
440
|
ngImport: i0,
|
|
430
441
|
type: ServerEventManagerPlugin
|
|
431
442
|
});
|
|
432
443
|
}
|
|
433
444
|
i0.ɵɵngDeclareClassMetadata({
|
|
434
445
|
minVersion: "12.0.0",
|
|
435
|
-
version: "22.2.
|
|
446
|
+
version: "22.2.1",
|
|
436
447
|
ngImport: i0,
|
|
437
448
|
type: ServerEventManagerPlugin,
|
|
438
449
|
decorators: [{
|
|
@@ -542,7 +553,7 @@ const PLATFORM_SERVER_PROVIDERS = [TRANSFER_STATE_SERIALIZATION_PROVIDERS, SERVE
|
|
|
542
553
|
class ServerModule {
|
|
543
554
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
544
555
|
minVersion: "12.0.0",
|
|
545
|
-
version: "22.2.
|
|
556
|
+
version: "22.2.1",
|
|
546
557
|
ngImport: i0,
|
|
547
558
|
type: ServerModule,
|
|
548
559
|
deps: [],
|
|
@@ -550,14 +561,14 @@ class ServerModule {
|
|
|
550
561
|
});
|
|
551
562
|
static ɵmod = i0.ɵɵngDeclareNgModule({
|
|
552
563
|
minVersion: "14.0.0",
|
|
553
|
-
version: "22.2.
|
|
564
|
+
version: "22.2.1",
|
|
554
565
|
ngImport: i0,
|
|
555
566
|
type: ServerModule,
|
|
556
567
|
exports: [BrowserModule]
|
|
557
568
|
});
|
|
558
569
|
static ɵinj = i0.ɵɵngDeclareInjector({
|
|
559
570
|
minVersion: "12.0.0",
|
|
560
|
-
version: "22.2.
|
|
571
|
+
version: "22.2.1",
|
|
561
572
|
ngImport: i0,
|
|
562
573
|
type: ServerModule,
|
|
563
574
|
providers: PLATFORM_SERVER_PROVIDERS,
|
|
@@ -566,7 +577,7 @@ class ServerModule {
|
|
|
566
577
|
}
|
|
567
578
|
i0.ɵɵngDeclareClassMetadata({
|
|
568
579
|
minVersion: "12.0.0",
|
|
569
|
-
version: "22.2.
|
|
580
|
+
version: "22.2.1",
|
|
570
581
|
ngImport: i0,
|
|
571
582
|
type: ServerModule,
|
|
572
583
|
decorators: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_server-chunk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/platform-server/src/domino_adapter.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/platform-server/src/tokens.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/platform-server/src/platform_state.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/platform-server/src/url.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/platform-server/src/http.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/platform-server/src/location.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/platform-server/src/server_events.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/platform-server/src/transfer_state.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/platform-server/src/server.ts"],"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 */\n\nimport {ɵsetRootDomAdapter as setRootDomAdapter} from '@angular/common';\nimport {ɵRuntimeError as RuntimeError} from '@angular/core';\nimport {ɵBrowserDomAdapter as BrowserDomAdapter} from '@angular/platform-browser';\n\nimport {RuntimeErrorCode} from './errors';\n\n// g3-only import domino from 'domino';\nimport domino from '../third_party/domino/bundled-domino'; // 3p-only\n\nexport function setDomTypes() {\n // Make all Domino types available in the global env.\n // NB: Any changes here should also be done in `packages/platform-server/init/src/shims.ts`.\n Object.assign(globalThis, domino.impl);\n (globalThis as any)['KeyboardEvent'] = domino.impl.Event;\n}\n\n/**\n * Parses a document string to a Document object.\n */\nexport function parseDocument(html: string, url = '/') {\n let window = domino.createWindow(html, url);\n let doc = window.document;\n return doc;\n}\n\n/**\n * Serializes a document to string.\n */\nexport function serializeDocument(doc: Document): string {\n return (doc as any).serialize();\n}\n\n/**\n * DOM Adapter for the server platform based on https://github.com/fgnass/domino.\n */\nexport class DominoAdapter extends BrowserDomAdapter {\n static override makeCurrent() {\n setDomTypes();\n setRootDomAdapter(new DominoAdapter());\n }\n\n override readonly supportsDOMEvents = false;\n private static defaultDoc: Document;\n\n override createHtmlDocument(): Document {\n return parseDocument('<html><head><title>fakeTitle</title></head><body></body></html>');\n }\n\n override getDefaultDocument(): Document {\n if (!DominoAdapter.defaultDoc) {\n DominoAdapter.defaultDoc = domino.createDocument();\n }\n return DominoAdapter.defaultDoc;\n }\n\n override isElementNode(node: any): boolean {\n return node ? node.nodeType === DominoAdapter.defaultDoc.ELEMENT_NODE : false;\n }\n override isShadowRoot(node: any): boolean {\n return node.shadowRoot == node;\n }\n\n /** @deprecated No longer being used in Ivy code. To be removed in version 14. */\n override getGlobalEventTarget(doc: Document, target: string): EventTarget | null {\n if (target === 'window') {\n return doc.defaultView;\n }\n if (target === 'document') {\n return doc;\n }\n if (target === 'body') {\n return doc.body;\n }\n return null;\n }\n\n override getBaseHref(doc: Document): string {\n const length = doc.head.children.length;\n\n // The `<base>` can only be a direct child of `<head>` so we can save some\n // execution time by looking through them directly instead of querying for it.\n // See: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/base\n // Note that we can't cache the `href` value itself, because this method gets called with a\n // different document every time which means that in theory the value can be different too.\n for (let i = 0; i < length; i++) {\n const child = doc.head.children[i];\n\n // Tag names are always uppercase for HTML nodes.\n if (child.tagName === 'BASE') {\n // TODO(alxhub): Need relative path logic from BrowserDomAdapter here?\n return child.getAttribute('href') || '';\n }\n }\n\n return '';\n }\n\n override dispatchEvent(el: Node, evt: any) {\n el.dispatchEvent(evt);\n\n // Dispatch the event to the window also.\n const doc = el.ownerDocument || el;\n const win = (doc as any).defaultView;\n if (win) {\n win.dispatchEvent(evt);\n }\n }\n\n override getUserAgent(): string {\n return 'Fake user agent';\n }\n\n override getCookie(name: string): string {\n throw new RuntimeError(\n RuntimeErrorCode.GET_COOKIE_NOT_IMPLEMENTED,\n (typeof ngDevMode === 'undefined' || ngDevMode) && 'getCookie has not been implemented',\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\nimport {InjectionToken} from '@angular/core';\n\n/**\n * Config object passed to initialize the platform.\n *\n * @publicApi\n */\nexport interface PlatformConfig {\n /**\n * The initial DOM to use to bootstrap the server application.\n * @default create a new DOM using Domino\n */\n document?: string;\n /**\n * The URL for the current application state. This is used for initializing\n * the platform's location. `protocol`, `hostname`, and `port`.\n */\n url?: string;\n}\n\n/**\n * The DI token for setting the initial config for the platform.\n *\n * @publicApi\n */\nexport const INITIAL_CONFIG = new InjectionToken<PlatformConfig>('Server.INITIAL_CONFIG');\n\n/**\n * A function that will be executed when calling `renderApplication` or\n * `renderModule` just before current platform state is rendered to string.\n *\n * @publicApi\n */\nexport const BEFORE_APP_SERIALIZED = new InjectionToken<ReadonlyArray<() => void | Promise<void>>>(\n 'Server.RENDER_MODULE_HOOK',\n);\n\nexport const ENABLE_DOM_EMULATION = new InjectionToken<boolean>('ENABLE_DOM_EMULATION');\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\nimport {DOCUMENT} from '@angular/common';\nimport {\n inject,\n Inject,\n Injectable,\n Injector,\n ɵstartMeasuring as startMeasuring,\n ɵstopMeasuring as stopMeasuring,\n ɵRuntimeError as RuntimeError,\n} from '@angular/core';\n\nimport {RuntimeErrorCode} from './errors';\nimport {serializeDocument} from './domino_adapter';\nimport {ENABLE_DOM_EMULATION} from './tokens';\n\n/**\n * Representation of the current platform state.\n *\n * @publicApi\n */\n@Injectable()\nexport class PlatformState {\n /* @internal */\n _enableDomEmulation = enableDomEmulation(inject(Injector));\n\n constructor(@Inject(DOCUMENT) private _doc: any) {}\n\n /**\n * Renders the current state of the platform to string.\n */\n renderToString(): string {\n if (ngDevMode && !this._enableDomEmulation && !window?.document) {\n throw new RuntimeError(\n RuntimeErrorCode.DISABLED_DOM_EMULATION_IN_NON_BROWSER,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n 'Disabled DOM emulation should only run in browser environments',\n );\n }\n\n const measuringLabel = 'renderToString';\n startMeasuring(measuringLabel);\n const rendered = this._enableDomEmulation\n ? serializeDocument(this._doc)\n : // In the case we run/test the platform-server in a browser environment\n this._doc.documentElement.outerHTML;\n stopMeasuring(measuringLabel);\n return rendered;\n }\n\n /**\n * Returns the current DOM state.\n */\n getDocument(): any {\n return this._doc;\n }\n}\n\nexport function enableDomEmulation(injector: Injector): boolean {\n return injector.get(ENABLE_DOM_EMULATION, true);\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\nimport {ɵRuntimeError as RuntimeError} from '@angular/core';\n\nimport {RuntimeErrorCode} from './errors';\n\n/**\n * Matches http: or https:\n */\nconst HTTP_OR_HTTPS_PROTOCOL_REGEXP = /^https?:/i;\n\n/**\n * Matches an HTTP or HTTPS URL that does not have an authority (i.e. missing `//` or `\\\\`).\n * In the WHATWG standard, when resolved against a base of the same scheme, these URLs are relative.\n * @internal\n */\nexport const HTTP_OR_HTTPS_NO_AUTHORITY_REGEXP = /^https?:(?![/\\\\]{2})/i;\n\n/**\n * Options for {@link resolveUrl}.\n */\nexport interface ResolveUrlOptions {\n /**\n * Allow protocol-relative URLs (e.g. `//example.com`).\n * @default false\n */\n allowProtocolRelative?: boolean;\n /**\n * Allow origin changes.\n * @default true\n */\n allowOriginChange?: boolean;\n}\n\n/**\n * Resolves a URL string.\n *\n * If an origin is provided, the URL is resolved against it. Otherwise, the URL is parsed as-is.\n * @param urlStr The URL to resolve.\n * @param origin The origin to resolve the URL against.\n * @param options Options for resolving the URL.\n * @returns A resolved URL object.\n */\nexport function resolveUrl(urlStr: string | undefined): URL | null;\nexport function resolveUrl(\n urlStr: string | undefined,\n origin: string | URL,\n options?: ResolveUrlOptions,\n): URL;\nexport function resolveUrl(\n urlStr: string | undefined,\n origin?: string | URL,\n options: ResolveUrlOptions = {},\n): URL | null {\n const originUrl = typeof origin === 'string' ? new URL('/', origin) : origin;\n\n if (!urlStr) {\n return originUrl || null;\n }\n\n // Fast-path: if the URL is a valid, standard absolute URL, parse and return it immediately.\n // URLs with no authority (e.g. `http:/path` or `http:path`) must be resolved against the origin when one is provided.\n let resolved: URL | undefined;\n if (!originUrl || !HTTP_OR_HTTPS_NO_AUTHORITY_REGEXP.test(urlStr)) {\n try {\n resolved = new URL(urlStr);\n } catch {}\n }\n const {allowProtocolRelative = false, allowOriginChange = true} = options;\n\n if (resolved) {\n if (originUrl && !isSafeOriginChange(resolved, originUrl, urlStr, allowOriginChange)) {\n throwSuspiciousUrlError(urlStr);\n }\n\n return resolved;\n }\n\n // We identify and throw on malformed absolute URLs (like double port).\n // Per the WHATWG URL standard, parsing an input starting with a scheme (like 'http:') against\n // a standard base (like 'http://fake') ignores the base argument and parses strictly as an\n // absolute URL. Since it is malformed, the native URL constructor will throw a validation\n // error. Standard relative/protocol-relative paths parse successfully, allowing the flow to continue.\n if (!URL.canParse(urlStr, 'http://fake')) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_URL,\n typeof ngDevMode === 'undefined' || ngDevMode ? `Invalid URL: ${urlStr}` : urlStr,\n );\n }\n\n if (!originUrl) {\n return null;\n }\n\n // Check if we have a legitimate protocol-relative URL (starts with '//' and not a duplicate/backslash bypass)\n // and we are configured to allow and preserve standard cross-origin protocol-relative requests.\n if (urlStr.startsWith('//')) {\n if (!allowProtocolRelative) {\n throw new RuntimeError(\n RuntimeErrorCode.PROTOCOL_RELATIVE_URL_NOT_ALLOWED,\n typeof ngDevMode === 'undefined' || ngDevMode\n ? `Protocol relative URLs are not allowed in this context. URL: ${urlStr}`\n : urlStr,\n );\n }\n\n return new URL(urlStr, origin);\n }\n\n resolved = new URL(urlStr, origin);\n\n if (!isSafeOriginChange(resolved, originUrl, urlStr, allowOriginChange)) {\n throwSuspiciousUrlError(urlStr);\n }\n\n return resolved;\n}\n\n/**\n * Throws a suspicious URL error indicating a security bypass attempt.\n */\nfunction throwSuspiciousUrlError(urlStr: string): never {\n throw new RuntimeError(\n RuntimeErrorCode.SUSPICIOUS_URL_CHANGE_ORIGIN,\n typeof ngDevMode === 'undefined' || ngDevMode\n ? `URL ${urlStr} changed origin unexpectedly. This is suspicious and may indicate a security bypass attempt.`\n : urlStr,\n );\n}\n\n/**\n * Checks if the origin has changed in a safe way.\n *\n * @param resolved The resolved URL.\n * @param origin The origin URL.\n * @param urlStr The URL string.\n * @param allowOriginChange Whether to allow origin changes.\n * @returns True if the origin has changed in a safe way, false otherwise.\n */\nfunction isSafeOriginChange(\n resolved: URL,\n origin: URL,\n urlStr: string,\n allowOriginChange: boolean,\n): boolean {\n if (origin.origin === resolved.origin) {\n return true;\n }\n\n if (!allowOriginChange) {\n return false;\n }\n\n return (\n HTTP_OR_HTTPS_PROTOCOL_REGEXP.test(urlStr) && !HTTP_OR_HTTPS_NO_AUTHORITY_REGEXP.test(urlStr)\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\nimport {PlatformLocation, XhrFactory} from '@angular/common';\nimport {\n ɵHTTP_ROOT_INTERCEPTOR_FNS as HTTP_ROOT_INTERCEPTOR_FNS,\n HttpEvent,\n HttpHandlerFn,\n HttpRequest,\n} from '@angular/common/http';\nimport {inject, Injectable, Provider, ɵRuntimeError as RuntimeError} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nimport {RuntimeErrorCode} from './errors';\nimport {HTTP_OR_HTTPS_NO_AUTHORITY_REGEXP, resolveUrl} from './url';\n\n@Injectable()\n/**\n * @deprecated Use the HttpClient fetch backend instead. Intent to remove in Angular 23.\n * XHR support in `@angular/platform-server` is deprecated because the underlying `xhr2`\n * library does not safely handle redirects (e.g. it can forward `Authorization` headers\n * on cross-origin redirects and is susceptible to denial-of-service (DoS) via redirect loops).\n */\nexport class ServerXhr implements XhrFactory {\n private xhrImpl: typeof import('xhr2') | undefined;\n\n // The `xhr2` dependency has a side-effect of accessing and modifying a\n // global scope. Loading `xhr2` dynamically allows us to delay the loading\n // and start the process once the global scope is established by the underlying\n // server platform (via shims, etc).\n private async ɵloadImpl(): Promise<void> {\n if (!this.xhrImpl) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n console.warn(\n 'XHR support in `@angular/platform-server` is deprecated and will be removed ' +\n 'in Angular 23. It has known security and performance issues in server ' +\n 'environments, such as forwarding `Authorization` headers on cross-origin ' +\n 'redirects and susceptibility to denial-of-service (DoS) via redirect loops. ' +\n 'Please use the HttpClient fetch backend instead, which is the default since Angular 22.',\n );\n }\n\n const {default: xhr} = await import('xhr2');\n this.xhrImpl = xhr;\n }\n }\n\n build(): XMLHttpRequest {\n const impl = this.xhrImpl;\n if (!impl) {\n throw new RuntimeError(\n RuntimeErrorCode.XHR_NOT_LOADED,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n 'Unexpected state in ServerXhr: XHR implementation is not loaded.',\n );\n }\n\n return new impl.XMLHttpRequest();\n }\n}\n\n/**\n * Regex to match a URL schema.\n */\nconst URL_SCHEMA_REGEXP = /^(?:[a-zA-Z][a-zA-Z0-9+\\-.]*:)/;\n\nfunction relativeUrlsTransformerInterceptorFn(\n request: HttpRequest<unknown>,\n next: HttpHandlerFn,\n): Observable<HttpEvent<unknown>> {\n const trimmedUrl = request.url.trim();\n if (URL_SCHEMA_REGEXP.test(trimmedUrl) && !HTTP_OR_HTTPS_NO_AUTHORITY_REGEXP.test(trimmedUrl)) {\n // URLs with a schema (and an authority for http(s)) should be left unchanged.\n return next(request);\n }\n\n const platformLocation = inject(PlatformLocation);\n const {href, protocol, hostname, port} = platformLocation;\n if (!protocol.startsWith('http')) {\n return next(request);\n }\n\n let urlPrefix = `${protocol}//${hostname}`;\n if (port) {\n urlPrefix += `:${port}`;\n }\n\n const baseHref = platformLocation.getBaseHrefFromDOM() || href;\n const baseUrl = new URL(baseHref, urlPrefix);\n\n const parsedUrl = resolveUrl(request.url, baseUrl, {\n allowProtocolRelative: true,\n });\n\n return next(request.clone({url: parsedUrl.toString()}));\n}\n\nexport const SERVER_HTTP_PROVIDERS: Provider[] = [\n {provide: XhrFactory, useClass: ServerXhr},\n {\n provide: HTTP_ROOT_INTERCEPTOR_FNS,\n useValue: relativeUrlsTransformerInterceptorFn,\n multi: true,\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\nimport {\n DOCUMENT,\n LocationChangeEvent,\n LocationChangeListener,\n PlatformLocation,\n ɵgetDOM as getDOM,\n} from '@angular/common';\nimport {inject, Injectable, ɵWritable as Writable} from '@angular/core';\nimport {Subject} from 'rxjs';\n\nimport {INITIAL_CONFIG} from './tokens';\nimport {resolveUrl} from './url';\n\n/**\n * Server-side implementation of URL state. Implements `pathname`, `search`, and `hash`\n * but not the state stack.\n */\n@Injectable()\nexport class ServerPlatformLocation implements PlatformLocation {\n public readonly href: string = '/';\n public readonly hostname: string = '/';\n public readonly protocol: string = '/';\n public readonly port: string = '/';\n public readonly pathname: string = '/';\n public readonly search: string = '';\n public readonly hash: string = '';\n private _hashUpdate = new Subject<LocationChangeEvent>();\n private readonly _doc = inject(DOCUMENT);\n private readonly origin = this._doc.location.origin;\n\n constructor() {\n const config = inject(INITIAL_CONFIG, {optional: true});\n if (!config) {\n return;\n }\n if (config.url) {\n const {protocol, hostname, port, pathname, search, hash, href, origin} = resolveUrl(\n config.url,\n this.origin,\n );\n this.protocol = protocol;\n this.hostname = hostname;\n this.port = port;\n this.pathname = pathname;\n this.search = search;\n this.hash = hash;\n this.href = href;\n this.origin = origin;\n }\n }\n\n getBaseHrefFromDOM(): string {\n return getDOM().getBaseHref(this._doc)!;\n }\n\n onPopState(fn: LocationChangeListener): VoidFunction {\n // No-op: a state stack is not implemented, so\n // no events will ever come.\n return () => {};\n }\n\n onHashChange(fn: LocationChangeListener): VoidFunction {\n const subscription = this._hashUpdate.subscribe(fn);\n return () => subscription.unsubscribe();\n }\n\n get url(): string {\n return `${this.pathname}${this.search}${this.hash}`;\n }\n\n private setHash(value: string, oldUrl: string) {\n if (this.hash === value) {\n // Don't fire events if the hash has not changed.\n return;\n }\n (this as Writable<this>).hash = value;\n const newUrl = this.url;\n queueMicrotask(() =>\n this._hashUpdate.next({\n type: 'hashchange',\n state: null,\n oldUrl,\n newUrl,\n } as LocationChangeEvent),\n );\n }\n\n replaceState(state: any, title: string, newUrl: string): void {\n const oldUrl = this.url;\n const {pathname, search, hash, href, protocol} = resolveUrl(newUrl, this.origin, {\n allowOriginChange: false,\n });\n const writableThis = this as Writable<this>;\n writableThis.pathname = pathname;\n writableThis.search = search;\n writableThis.href = href;\n writableThis.protocol = protocol;\n this.setHash(hash, oldUrl);\n }\n\n pushState(state: any, title: string, newUrl: string): void {\n this.replaceState(state, title, newUrl);\n }\n\n forward(): void {\n throw new Error('Not implemented');\n }\n\n back(): void {\n throw new Error('Not implemented');\n }\n\n // History API isn't available on server, therefore return undefined\n getState(): unknown {\n return undefined;\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\nimport {DOCUMENT, ɵgetDOM as getDOM} from '@angular/common';\nimport {Inject, Injectable, type ListenerOptions} from '@angular/core';\nimport {EventManagerPlugin} from '@angular/platform-browser';\n\n@Injectable()\nexport class ServerEventManagerPlugin extends EventManagerPlugin {\n constructor(@Inject(DOCUMENT) private doc: any) {\n super(doc);\n }\n\n // Handle all events on the server.\n override supports(eventName: string) {\n return true;\n }\n\n override addEventListener(\n element: HTMLElement,\n eventName: string,\n handler: Function,\n options?: ListenerOptions,\n ): Function {\n return getDOM().onAndCancel(element, eventName, handler, options);\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\nimport {DOCUMENT} from '@angular/common';\nimport {\n APP_ID,\n inject,\n InjectionToken,\n Injector,\n Provider,\n TransferState,\n ɵstartMeasuring as startMeasuring,\n ɵstopMeasuring as stopMeasuring,\n} from '@angular/core';\n\nimport {BEFORE_APP_SERIALIZED} from './tokens';\n\n/** Tracks whether the server-side application transfer state has already been serialized. */\nconst TRANSFER_STATE_STATUS = new InjectionToken<{serialized: boolean}>(\n typeof ngDevMode === 'undefined' || ngDevMode ? 'TRANSFER_STATE_STATUS' : '',\n {\n factory: () => ({serialized: false}),\n },\n);\n\nexport const TRANSFER_STATE_SERIALIZATION_PROVIDERS: Provider[] = [\n {\n provide: BEFORE_APP_SERIALIZED,\n useFactory: serializeTransferStateFactory,\n multi: true,\n },\n];\n\n/** TODO: Move this to a utils folder and convert to use SafeValues. */\nexport function createScript(\n doc: Document,\n textContent: string,\n nonce: string | null,\n): HTMLScriptElement {\n const script = doc.createElement('script');\n script.textContent = textContent;\n if (nonce) {\n script.setAttribute('nonce', nonce);\n }\n\n return script;\n}\n\nfunction warnIfStateTransferHappened(injector: Injector): void {\n const transferStateStatus = injector.get(TRANSFER_STATE_STATUS);\n\n if (transferStateStatus.serialized) {\n console.warn(\n `Angular detected an incompatible configuration, which causes duplicate serialization of the server-side application state.\\n\\n` +\n `This can happen if the server providers have been provided more than once using different mechanisms. For example:\\n\\n` +\n ` imports: [ServerModule], // Registers server providers\\n` +\n ` providers: [provideServerRendering()] // Also registers server providers\\n\\n` +\n `To fix this, ensure that the \\`provideServerRendering()\\` function is the only provider used and remove the other(s).`,\n );\n }\n\n transferStateStatus.serialized = true;\n}\n\nfunction serializeTransferStateFactory() {\n const doc = inject(DOCUMENT);\n const appId = inject(APP_ID);\n const transferStore = inject(TransferState);\n const injector = inject(Injector);\n\n return () => {\n const measuringLabel = 'serializeTransferStateFactory';\n startMeasuring(measuringLabel);\n // The `.toJSON` here causes the `onSerialize` callbacks to be called.\n // These callbacks can be used to provide the value for a given key.\n const content = transferStore.toJson();\n\n if (transferStore.isEmpty) {\n // The state is empty, nothing to transfer,\n // avoid creating an extra `<script>` tag in this case.\n return;\n }\n\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n warnIfStateTransferHappened(injector);\n }\n\n const script = createScript(\n doc,\n content,\n /**\n * `nonce` is not required for 'application/json'\n * See: https://html.spec.whatwg.org/multipage/scripting.html#attr-script-type\n */\n null,\n );\n script.id = appId + '-state';\n script.setAttribute('type', 'application/json');\n\n // It is intentional that we add the script at the very bottom. Angular CLI script tags for\n // bundles are always `type=\"module\"`. These are deferred by default and cause the\n // transfer data to be queried only after the browser has finished parsing the DOM.\n doc.body.appendChild(script);\n stopMeasuring(measuringLabel);\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\nimport {\n DOCUMENT,\n PlatformLocation,\n ViewportScroller,\n ɵgetDOM as getDOM,\n ɵNullViewportScroller as NullViewportScroller,\n ɵPLATFORM_SERVER_ID as PLATFORM_SERVER_ID,\n} from '@angular/common';\nimport {\n createPlatformFactory,\n Injector,\n NgModule,\n PLATFORM_ID,\n PLATFORM_INITIALIZER,\n platformCore,\n PlatformRef,\n Provider,\n Testability,\n ɵsetDocument,\n ɵTESTABILITY as TESTABILITY,\n inject,\n StaticProvider,\n} from '@angular/core';\nimport {\n BrowserModule,\n EVENT_MANAGER_PLUGINS,\n ɵBrowserDomAdapter as BrowserDomAdapter,\n} from '@angular/platform-browser';\n\nimport {DominoAdapter, parseDocument} from './domino_adapter';\nimport {SERVER_HTTP_PROVIDERS} from './http';\nimport {resolveUrl} from './url';\nimport {ServerPlatformLocation} from './location';\nimport {enableDomEmulation, PlatformState} from './platform_state';\nimport {ServerEventManagerPlugin} from './server_events';\nimport {INITIAL_CONFIG, PlatformConfig} from './tokens';\nimport {TRANSFER_STATE_SERIALIZATION_PROVIDERS} from './transfer_state';\n\nexport const INTERNAL_SERVER_PLATFORM_PROVIDERS: StaticProvider[] = [\n {provide: DOCUMENT, useFactory: _document},\n {provide: PLATFORM_ID, useValue: PLATFORM_SERVER_ID},\n {provide: PLATFORM_INITIALIZER, useFactory: initDominoAdapter, multi: true},\n {\n provide: PlatformLocation,\n useClass: ServerPlatformLocation,\n deps: [],\n },\n {provide: PlatformState, deps: [DOCUMENT]},\n];\n\nfunction initDominoAdapter() {\n const injector = inject(Injector);\n const _enableDomEmulation = enableDomEmulation(injector);\n return () => {\n if (_enableDomEmulation) {\n DominoAdapter.makeCurrent();\n } else {\n BrowserDomAdapter.makeCurrent();\n }\n };\n}\n\nexport const SERVER_RENDER_PROVIDERS: Provider[] = [\n {provide: EVENT_MANAGER_PLUGINS, multi: true, useClass: ServerEventManagerPlugin},\n];\n\nexport const PLATFORM_SERVER_PROVIDERS: Provider[] = [\n TRANSFER_STATE_SERIALIZATION_PROVIDERS,\n SERVER_RENDER_PROVIDERS,\n SERVER_HTTP_PROVIDERS,\n {provide: Testability, useValue: null}, // Keep for backwards-compatibility.\n {provide: TESTABILITY, useValue: null},\n {provide: ViewportScroller, useClass: NullViewportScroller},\n];\n\n/**\n * The ng module for the server.\n *\n * @publicApi\n */\n@NgModule({\n exports: [BrowserModule],\n providers: PLATFORM_SERVER_PROVIDERS,\n})\nexport class ServerModule {}\n\nfunction _document() {\n const injector = inject(Injector);\n const config: PlatformConfig | null = injector.get(INITIAL_CONFIG, null);\n const _enableDomEmulation = enableDomEmulation(injector);\n let document: Document;\n if (config && config.document) {\n document =\n typeof config.document === 'string'\n ? _enableDomEmulation\n ? parseDocument(\n config.document,\n config.url !== undefined\n ? resolveUrl(config.url, 'http://localhost').href\n : undefined,\n )\n : window.document\n : config.document;\n } else {\n document = getDOM().createHtmlDocument();\n }\n // Tell ivy about the global document\n ɵsetDocument(document);\n return document;\n}\n\n/**\n * Creates a server-side instance of an Angular platform.\n *\n * This platform should be used when performing server-side rendering of an Angular application.\n * Standalone applications can be bootstrapped on the server using the `bootstrapApplication`\n * function from `@angular/platform-browser`. When using `bootstrapApplication`, the `platformServer`\n * should be created first and passed to the bootstrap function using the `BootstrapContext`.\n *\n * @publicApi\n */\nexport function platformServer(extraProviders?: StaticProvider[] | undefined): PlatformRef {\n const noServerModeSet = typeof ngServerMode === 'undefined';\n if (noServerModeSet) {\n globalThis['ngServerMode'] = true;\n }\n\n const platform = createPlatformFactory(\n platformCore,\n 'server',\n INTERNAL_SERVER_PLATFORM_PROVIDERS,\n )(extraProviders);\n\n if (noServerModeSet) {\n platform.onDestroy(() => {\n globalThis['ngServerMode'] = undefined;\n });\n }\n\n return platform;\n}\n"],"names":["BrowserDomAdapter","setRootDomAdapter","RuntimeError","startMeasuring","stopMeasuring","HTTP_ROOT_INTERCEPTOR_FNS","getDOM","PLATFORM_SERVER_ID","TESTABILITY","NullViewportScroller","ɵsetDocument"],"mappings":";;;;;;;;;;;;;;SAiBgB,WAAW,GAAA;EAGzB,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC;EACrC,UAAkB,CAAC,eAAe,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK;AAC1D;SAKgB,aAAa,CAAC,IAAY,EAAE,GAAG,GAAG,GAAG,EAAA;EACnD,IAAI,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC;AAC3C,EAAA,IAAI,GAAG,GAAG,MAAM,CAAC,QAAQ;AACzB,EAAA,OAAO,GAAG;AACZ;AAKM,SAAU,iBAAiB,CAAC,GAAa,EAAA;AAC7C,EAAA,OAAQ,GAAW,CAAC,SAAS,EAAE;AACjC;AAKM,MAAO,aAAc,SAAQA,kBAAiB,CAAA;AAClD,EAAA,OAAgB,WAAW,GAAA;AACzB,IAAA,WAAW,EAAE;AACb,IAAAC,kBAAiB,CAAC,IAAI,aAAa,EAAE,CAAC;A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AQ;AACvB,EAAA,CAAA,MAAO;AACL,IAAA,QAAQ,GAAGH,OAAM,EAAE,CAAC,kBAAkB,EAAE;AAC1C,EAAA;EAEAI,YAAY,CAAC,QAAQ,CAAC;AACtB,EAAA,OAAO,QAAQ;AACjB;AAYM,SAAU,cAAc,CAAC,cAA6C,EAAA;AAC1E,EAAA,MAAM,eAAe,GAAG,OAAO,YAAY,KAAK,WAAW;AAC3D,EAAA,IAAI,eAAe,EAAE;AACnB,IAAA,UAAU,CAAC,cAAc,CAAC,GAAG,IAAI;AACnC,EAAA;AAEA,EAAA,MAAM,QAAQ,GAAG,qBAAqB,CACpC,YAAY,EACZ,QAAQ,EACR,kCAAkC,CACnC,CAAC,cAAc,CAAC;AAEjB,EAAA,IAAI,eAAe,EAAE;IACnB,QAAQ,CAAC,SAAS,CAAC,MAAK;AACtB,MAAA,UAAU,CAAC,cAAc,CAAC,GAAG,SAAS;AACxC,IAAA,CAAC,CAAC;AACJ,EAAA;AAEA,EAAA,OAAO,QAAQ;AACjB;;"}
|
|
1
|
+
{"version":3,"file":"_server-chunk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/platform-server/src/domino_adapter.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/platform-server/src/tokens.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/platform-server/src/platform_state.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/platform-server/src/url.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/platform-server/src/http.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/platform-server/src/location.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/platform-server/src/server_events.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/platform-server/src/transfer_state.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/platform-server/src/server.ts"],"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 */\n\nimport {ɵsetRootDomAdapter as setRootDomAdapter} from '@angular/common';\nimport {ɵRuntimeError as RuntimeError} from '@angular/core';\nimport {ɵBrowserDomAdapter as BrowserDomAdapter} from '@angular/platform-browser';\n\nimport {RuntimeErrorCode} from './errors';\n\n// g3-only import domino from 'domino';\nimport domino from '../third_party/domino/bundled-domino'; // 3p-only\n\nexport function setDomTypes() {\n // Make all Domino types available in the global env.\n // NB: Any changes here should also be done in `packages/platform-server/init/src/shims.ts`.\n Object.assign(globalThis, domino.impl);\n (globalThis as any)['KeyboardEvent'] = domino.impl.Event;\n}\n\n/**\n * Parses a document string to a Document object.\n */\nexport function parseDocument(html: string, url = '/') {\n let window = domino.createWindow(html, url);\n let doc = window.document;\n return doc;\n}\n\n/**\n * Serializes a document to string.\n */\nexport function serializeDocument(doc: Document): string {\n return (doc as any).serialize();\n}\n\n/**\n * DOM Adapter for the server platform based on https://github.com/fgnass/domino.\n */\nexport class DominoAdapter extends BrowserDomAdapter {\n static override makeCurrent() {\n setDomTypes();\n setRootDomAdapter(new DominoAdapter());\n }\n\n override readonly supportsDOMEvents = false;\n private static defaultDoc: Document;\n\n override createHtmlDocument(): Document {\n return parseDocument('<html><head><title>fakeTitle</title></head><body></body></html>');\n }\n\n override getDefaultDocument(): Document {\n if (!DominoAdapter.defaultDoc) {\n DominoAdapter.defaultDoc = domino.createDocument();\n }\n return DominoAdapter.defaultDoc;\n }\n\n override isElementNode(node: any): boolean {\n return node ? node.nodeType === DominoAdapter.defaultDoc.ELEMENT_NODE : false;\n }\n override isShadowRoot(node: any): boolean {\n return node.shadowRoot == node;\n }\n\n /** @deprecated No longer being used in Ivy code. To be removed in version 14. */\n override getGlobalEventTarget(doc: Document, target: string): EventTarget | null {\n if (target === 'window') {\n return doc.defaultView;\n }\n if (target === 'document') {\n return doc;\n }\n if (target === 'body') {\n return doc.body;\n }\n return null;\n }\n\n override getBaseHref(doc: Document): string {\n const length = doc.head.children.length;\n\n // The `<base>` can only be a direct child of `<head>` so we can save some\n // execution time by looking through them directly instead of querying for it.\n // See: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/base\n // Note that we can't cache the `href` value itself, because this method gets called with a\n // different document every time which means that in theory the value can be different too.\n for (let i = 0; i < length; i++) {\n const child = doc.head.children[i];\n\n // Tag names are always uppercase for HTML nodes.\n if (child.tagName === 'BASE') {\n // TODO(alxhub): Need relative path logic from BrowserDomAdapter here?\n return child.getAttribute('href') || '';\n }\n }\n\n return '';\n }\n\n override dispatchEvent(el: Node, evt: any) {\n el.dispatchEvent(evt);\n\n // Dispatch the event to the window also.\n const doc = el.ownerDocument || el;\n const win = (doc as any).defaultView;\n if (win) {\n win.dispatchEvent(evt);\n }\n }\n\n override getUserAgent(): string {\n return 'Fake user agent';\n }\n\n override getCookie(name: string): string {\n throw new RuntimeError(\n RuntimeErrorCode.GET_COOKIE_NOT_IMPLEMENTED,\n (typeof ngDevMode === 'undefined' || ngDevMode) && 'getCookie has not been implemented',\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\nimport {InjectionToken} from '@angular/core';\n\n/**\n * Config object passed to initialize the platform.\n *\n * @publicApi\n */\nexport interface PlatformConfig {\n /**\n * The initial DOM to use to bootstrap the server application.\n * @default create a new DOM using Domino\n */\n document?: string;\n /**\n * The URL for the current application state. This is used for initializing\n * the platform's location. `protocol`, `hostname`, and `port`.\n */\n url?: string;\n}\n\n/**\n * The DI token for setting the initial config for the platform.\n *\n * @publicApi\n */\nexport const INITIAL_CONFIG = new InjectionToken<PlatformConfig>('Server.INITIAL_CONFIG');\n\n/**\n * A function that will be executed when calling `renderApplication` or\n * `renderModule` just before current platform state is rendered to string.\n *\n * @publicApi\n */\nexport const BEFORE_APP_SERIALIZED = new InjectionToken<ReadonlyArray<() => void | Promise<void>>>(\n 'Server.RENDER_MODULE_HOOK',\n);\n\nexport const ENABLE_DOM_EMULATION = new InjectionToken<boolean>('ENABLE_DOM_EMULATION');\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\nimport {DOCUMENT} from '@angular/common';\nimport {\n inject,\n Inject,\n Injectable,\n Injector,\n ɵstartMeasuring as startMeasuring,\n ɵstopMeasuring as stopMeasuring,\n ɵRuntimeError as RuntimeError,\n} from '@angular/core';\n\nimport {RuntimeErrorCode} from './errors';\nimport {serializeDocument} from './domino_adapter';\nimport {ENABLE_DOM_EMULATION} from './tokens';\n\n/**\n * Representation of the current platform state.\n *\n * @publicApi\n */\n@Injectable()\nexport class PlatformState {\n /* @internal */\n _enableDomEmulation = enableDomEmulation(inject(Injector));\n\n constructor(@Inject(DOCUMENT) private _doc: any) {}\n\n /**\n * Renders the current state of the platform to string.\n */\n renderToString(): string {\n if (ngDevMode && !this._enableDomEmulation && !window?.document) {\n throw new RuntimeError(\n RuntimeErrorCode.DISABLED_DOM_EMULATION_IN_NON_BROWSER,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n 'Disabled DOM emulation should only run in browser environments',\n );\n }\n\n const measuringLabel = 'renderToString';\n startMeasuring(measuringLabel);\n const rendered = this._enableDomEmulation\n ? serializeDocument(this._doc)\n : // In the case we run/test the platform-server in a browser environment\n this._doc.documentElement.outerHTML;\n stopMeasuring(measuringLabel);\n return rendered;\n }\n\n /**\n * Returns the current DOM state.\n */\n getDocument(): any {\n return this._doc;\n }\n}\n\nexport function enableDomEmulation(injector: Injector): boolean {\n return injector.get(ENABLE_DOM_EMULATION, true);\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\nimport {ɵRuntimeError as RuntimeError} from '@angular/core';\n\nimport {RuntimeErrorCode} from './errors';\n\n/**\n * Matches http: or https:\n */\nconst HTTP_OR_HTTPS_PROTOCOL_REGEXP = /^https?:/i;\n\n/**\n * Matches an HTTP or HTTPS URL that does not have an authority (i.e. missing `//` or `\\\\`).\n * In the WHATWG standard, when resolved against a base of the same scheme, these URLs are relative.\n * @internal\n */\nexport const HTTP_OR_HTTPS_NO_AUTHORITY_REGEXP = /^https?:(?![/\\\\]{2})/i;\n\n/**\n * Options for {@link resolveUrl}.\n */\nexport interface ResolveUrlOptions {\n /**\n * Allow protocol-relative URLs (e.g. `//example.com`).\n * @default false\n */\n allowProtocolRelative?: boolean;\n /**\n * Allow origin changes.\n * @default true\n */\n allowOriginChange?: boolean;\n}\n\n/**\n * Resolves a URL string.\n *\n * If an origin is provided, the URL is resolved against it. Otherwise, the URL is parsed as-is.\n * @param urlStr The URL to resolve.\n * @param origin The origin to resolve the URL against.\n * @param options Options for resolving the URL.\n * @returns A resolved URL object.\n */\nexport function resolveUrl(urlStr: string | undefined): URL | null;\nexport function resolveUrl(\n urlStr: string | undefined,\n origin: string | URL,\n options?: ResolveUrlOptions,\n): URL;\nexport function resolveUrl(\n urlStr: string | undefined,\n origin?: string | URL,\n options: ResolveUrlOptions = {},\n): URL | null {\n const originUrl = typeof origin === 'string' ? new URL('/', origin) : origin;\n\n if (!urlStr) {\n return originUrl || null;\n }\n\n // Fast-path: if the URL is a valid, standard absolute URL, parse and return it immediately.\n // URLs with no authority (e.g. `http:/path` or `http:path`) must be resolved against the origin when one is provided.\n let resolved: URL | undefined;\n if (!originUrl || !HTTP_OR_HTTPS_NO_AUTHORITY_REGEXP.test(urlStr)) {\n try {\n resolved = new URL(urlStr);\n } catch {}\n }\n const {allowProtocolRelative = false, allowOriginChange = true} = options;\n\n if (resolved) {\n if (isDisallowedProtocolRelative(resolved, allowProtocolRelative)) {\n throwProtocolRelativeUrlError(urlStr);\n }\n\n if (originUrl && !isSafeOriginChange(resolved, originUrl, urlStr, allowOriginChange)) {\n throwSuspiciousUrlError(urlStr);\n }\n\n return resolved;\n }\n\n // We identify and throw on malformed absolute URLs (like double port).\n // Per the WHATWG URL standard, parsing an input starting with a scheme (like 'http:') against\n // a standard base (like 'http://fake') ignores the base argument and parses strictly as an\n // absolute URL. Since it is malformed, the native URL constructor will throw a validation\n // error. Standard relative/protocol-relative paths parse successfully, allowing the flow to continue.\n if (!URL.canParse(urlStr, 'http://fake')) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_URL,\n typeof ngDevMode === 'undefined' || ngDevMode ? `Invalid URL: ${urlStr}` : urlStr,\n );\n }\n\n if (!originUrl) {\n return null;\n }\n\n // Check if we have a legitimate protocol-relative URL (starts with '//' and not a duplicate/backslash bypass)\n // and we are configured to allow and preserve standard cross-origin protocol-relative requests.\n if (urlStr.startsWith('//')) {\n if (!allowProtocolRelative) {\n throwProtocolRelativeUrlError(urlStr);\n }\n\n return new URL(urlStr, origin);\n }\n\n resolved = new URL(urlStr, origin);\n\n if (isDisallowedProtocolRelative(resolved, allowProtocolRelative)) {\n throwProtocolRelativeUrlError(urlStr);\n }\n\n if (!isSafeOriginChange(resolved, originUrl, urlStr, allowOriginChange)) {\n throwSuspiciousUrlError(urlStr);\n }\n\n return resolved;\n}\n\n/**\n * Checks if the resolved URL has a disallowed protocol-relative path.\n *\n * @param resolved The resolved URL.\n * @param allowProtocolRelative Whether protocol-relative URLs are allowed.\n * @returns True if the URL has a disallowed protocol-relative path, false otherwise.\n */\nfunction isDisallowedProtocolRelative(resolved: URL, allowProtocolRelative: boolean): boolean {\n return !allowProtocolRelative && resolved.pathname.startsWith('//');\n}\n\n/**\n * Throws a protocol-relative URL error indicating that protocol-relative URLs are not allowed.\n */\nfunction throwProtocolRelativeUrlError(urlStr: string): never {\n throw new RuntimeError(\n RuntimeErrorCode.PROTOCOL_RELATIVE_URL_NOT_ALLOWED,\n typeof ngDevMode === 'undefined' || ngDevMode\n ? `Protocol relative URLs are not allowed in this context. URL: ${urlStr}`\n : urlStr,\n );\n}\n\n/**\n * Throws a suspicious URL error indicating a security bypass attempt.\n */\nfunction throwSuspiciousUrlError(urlStr: string): never {\n throw new RuntimeError(\n RuntimeErrorCode.SUSPICIOUS_URL_CHANGE_ORIGIN,\n typeof ngDevMode === 'undefined' || ngDevMode\n ? `URL ${urlStr} changed origin unexpectedly. This is suspicious and may indicate a security bypass attempt.`\n : urlStr,\n );\n}\n\n/**\n * Checks if the origin has changed in a safe way.\n *\n * @param resolved The resolved URL.\n * @param origin The origin URL.\n * @param urlStr The URL string.\n * @param allowOriginChange Whether to allow origin changes.\n * @returns True if the origin has changed in a safe way, false otherwise.\n */\nfunction isSafeOriginChange(\n resolved: URL,\n origin: URL,\n urlStr: string,\n allowOriginChange: boolean,\n): boolean {\n if (origin.origin === resolved.origin) {\n return true;\n }\n\n if (!allowOriginChange) {\n return false;\n }\n\n return (\n HTTP_OR_HTTPS_PROTOCOL_REGEXP.test(urlStr) && !HTTP_OR_HTTPS_NO_AUTHORITY_REGEXP.test(urlStr)\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\nimport {PlatformLocation, XhrFactory} from '@angular/common';\nimport {\n ɵHTTP_ROOT_INTERCEPTOR_FNS as HTTP_ROOT_INTERCEPTOR_FNS,\n HttpEvent,\n HttpHandlerFn,\n HttpRequest,\n} from '@angular/common/http';\nimport {inject, Injectable, Provider, ɵRuntimeError as RuntimeError} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nimport {RuntimeErrorCode} from './errors';\nimport {HTTP_OR_HTTPS_NO_AUTHORITY_REGEXP, resolveUrl} from './url';\n\n@Injectable()\n/**\n * @deprecated Use the HttpClient fetch backend instead. Intent to remove in Angular 23.\n * XHR support in `@angular/platform-server` is deprecated because the underlying `xhr2`\n * library does not safely handle redirects (e.g. it can forward `Authorization` headers\n * on cross-origin redirects and is susceptible to denial-of-service (DoS) via redirect loops).\n */\nexport class ServerXhr implements XhrFactory {\n private xhrImpl: typeof import('xhr2') | undefined;\n\n // The `xhr2` dependency has a side-effect of accessing and modifying a\n // global scope. Loading `xhr2` dynamically allows us to delay the loading\n // and start the process once the global scope is established by the underlying\n // server platform (via shims, etc).\n private async ɵloadImpl(): Promise<void> {\n if (!this.xhrImpl) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n console.warn(\n 'XHR support in `@angular/platform-server` is deprecated and will be removed ' +\n 'in Angular 23. It has known security and performance issues in server ' +\n 'environments, such as forwarding `Authorization` headers on cross-origin ' +\n 'redirects and susceptibility to denial-of-service (DoS) via redirect loops. ' +\n 'Please use the HttpClient fetch backend instead, which is the default since Angular 22.',\n );\n }\n\n const {default: xhr} = await import('xhr2');\n this.xhrImpl = xhr;\n }\n }\n\n build(): XMLHttpRequest {\n const impl = this.xhrImpl;\n if (!impl) {\n throw new RuntimeError(\n RuntimeErrorCode.XHR_NOT_LOADED,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n 'Unexpected state in ServerXhr: XHR implementation is not loaded.',\n );\n }\n\n return new impl.XMLHttpRequest();\n }\n}\n\n/**\n * Regex to match a URL schema.\n */\nconst URL_SCHEMA_REGEXP = /^(?:[a-zA-Z][a-zA-Z0-9+\\-.]*:)/;\n\nfunction relativeUrlsTransformerInterceptorFn(\n request: HttpRequest<unknown>,\n next: HttpHandlerFn,\n): Observable<HttpEvent<unknown>> {\n if (URL_SCHEMA_REGEXP.test(request.url) && !HTTP_OR_HTTPS_NO_AUTHORITY_REGEXP.test(request.url)) {\n // URLs with a schema (and an authority for http(s)) should be left unchanged.\n return next(request);\n }\n\n const platformLocation = inject(PlatformLocation);\n const {href, protocol, hostname, port} = platformLocation;\n if (!protocol.startsWith('http')) {\n return next(request);\n }\n\n let urlPrefix = `${protocol}//${hostname}`;\n if (port) {\n urlPrefix += `:${port}`;\n }\n\n const baseHref = platformLocation.getBaseHrefFromDOM() || href;\n const baseUrl = new URL(baseHref, urlPrefix);\n\n const parsedUrl = resolveUrl(request.url, baseUrl, {\n allowProtocolRelative: true,\n });\n\n return next(request.clone({url: parsedUrl.toString()}));\n}\n\nexport const SERVER_HTTP_PROVIDERS: Provider[] = [\n {provide: XhrFactory, useClass: ServerXhr},\n {\n provide: HTTP_ROOT_INTERCEPTOR_FNS,\n useValue: relativeUrlsTransformerInterceptorFn,\n multi: true,\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\nimport {\n DOCUMENT,\n LocationChangeEvent,\n LocationChangeListener,\n PlatformLocation,\n ɵgetDOM as getDOM,\n} from '@angular/common';\nimport {inject, Injectable, ɵWritable as Writable} from '@angular/core';\nimport {Subject} from 'rxjs';\n\nimport {INITIAL_CONFIG} from './tokens';\nimport {resolveUrl} from './url';\n\n/**\n * Server-side implementation of URL state. Implements `pathname`, `search`, and `hash`\n * but not the state stack.\n */\n@Injectable()\nexport class ServerPlatformLocation implements PlatformLocation {\n public readonly href: string = '/';\n public readonly hostname: string = '/';\n public readonly protocol: string = '/';\n public readonly port: string = '/';\n public readonly pathname: string = '/';\n public readonly search: string = '';\n public readonly hash: string = '';\n private _hashUpdate = new Subject<LocationChangeEvent>();\n private readonly _doc = inject(DOCUMENT);\n private readonly origin = this._doc.location.origin;\n\n constructor() {\n const config = inject(INITIAL_CONFIG, {optional: true});\n if (!config) {\n return;\n }\n if (config.url) {\n const {protocol, hostname, port, pathname, search, hash, href, origin} = resolveUrl(\n config.url,\n this.origin,\n );\n this.protocol = protocol;\n this.hostname = hostname;\n this.port = port;\n this.pathname = pathname;\n this.search = search;\n this.hash = hash;\n this.href = href;\n this.origin = origin;\n }\n }\n\n getBaseHrefFromDOM(): string {\n return getDOM().getBaseHref(this._doc)!;\n }\n\n onPopState(fn: LocationChangeListener): VoidFunction {\n // No-op: a state stack is not implemented, so\n // no events will ever come.\n return () => {};\n }\n\n onHashChange(fn: LocationChangeListener): VoidFunction {\n const subscription = this._hashUpdate.subscribe(fn);\n return () => subscription.unsubscribe();\n }\n\n get url(): string {\n return `${this.pathname}${this.search}${this.hash}`;\n }\n\n private setHash(value: string, oldUrl: string) {\n if (this.hash === value) {\n // Don't fire events if the hash has not changed.\n return;\n }\n (this as Writable<this>).hash = value;\n const newUrl = this.url;\n queueMicrotask(() =>\n this._hashUpdate.next({\n type: 'hashchange',\n state: null,\n oldUrl,\n newUrl,\n } as LocationChangeEvent),\n );\n }\n\n replaceState(state: any, title: string, newUrl: string): void {\n const oldUrl = this.url;\n const {pathname, search, hash, href, protocol} = resolveUrl(newUrl, this.origin, {\n allowOriginChange: false,\n });\n const writableThis = this as Writable<this>;\n writableThis.pathname = pathname;\n writableThis.search = search;\n writableThis.href = href;\n writableThis.protocol = protocol;\n this.setHash(hash, oldUrl);\n }\n\n pushState(state: any, title: string, newUrl: string): void {\n this.replaceState(state, title, newUrl);\n }\n\n forward(): void {\n throw new Error('Not implemented');\n }\n\n back(): void {\n throw new Error('Not implemented');\n }\n\n // History API isn't available on server, therefore return undefined\n getState(): unknown {\n return undefined;\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\nimport {DOCUMENT, ɵgetDOM as getDOM} from '@angular/common';\nimport {Inject, Injectable, type ListenerOptions} from '@angular/core';\nimport {EventManagerPlugin} from '@angular/platform-browser';\n\n@Injectable()\nexport class ServerEventManagerPlugin extends EventManagerPlugin {\n constructor(@Inject(DOCUMENT) private doc: any) {\n super(doc);\n }\n\n // Handle all events on the server.\n override supports(eventName: string) {\n return true;\n }\n\n override addEventListener(\n element: HTMLElement,\n eventName: string,\n handler: Function,\n options?: ListenerOptions,\n ): Function {\n return getDOM().onAndCancel(element, eventName, handler, options);\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\nimport {DOCUMENT} from '@angular/common';\nimport {\n APP_ID,\n inject,\n InjectionToken,\n Injector,\n Provider,\n TransferState,\n ɵstartMeasuring as startMeasuring,\n ɵstopMeasuring as stopMeasuring,\n} from '@angular/core';\n\nimport {BEFORE_APP_SERIALIZED} from './tokens';\n\n/** Tracks whether the server-side application transfer state has already been serialized. */\nconst TRANSFER_STATE_STATUS = new InjectionToken<{serialized: boolean}>(\n typeof ngDevMode === 'undefined' || ngDevMode ? 'TRANSFER_STATE_STATUS' : '',\n {\n factory: () => ({serialized: false}),\n },\n);\n\nexport const TRANSFER_STATE_SERIALIZATION_PROVIDERS: Provider[] = [\n {\n provide: BEFORE_APP_SERIALIZED,\n useFactory: serializeTransferStateFactory,\n multi: true,\n },\n];\n\n/** TODO: Move this to a utils folder and convert to use SafeValues. */\nexport function createScript(\n doc: Document,\n textContent: string,\n nonce: string | null,\n): HTMLScriptElement {\n const script = doc.createElement('script');\n script.textContent = textContent;\n if (nonce) {\n script.setAttribute('nonce', nonce);\n }\n\n return script;\n}\n\nfunction warnIfStateTransferHappened(injector: Injector): void {\n const transferStateStatus = injector.get(TRANSFER_STATE_STATUS);\n\n if (transferStateStatus.serialized) {\n console.warn(\n `Angular detected an incompatible configuration, which causes duplicate serialization of the server-side application state.\\n\\n` +\n `This can happen if the server providers have been provided more than once using different mechanisms. For example:\\n\\n` +\n ` imports: [ServerModule], // Registers server providers\\n` +\n ` providers: [provideServerRendering()] // Also registers server providers\\n\\n` +\n `To fix this, ensure that the \\`provideServerRendering()\\` function is the only provider used and remove the other(s).`,\n );\n }\n\n transferStateStatus.serialized = true;\n}\n\nfunction serializeTransferStateFactory() {\n const doc = inject(DOCUMENT);\n const appId = inject(APP_ID);\n const transferStore = inject(TransferState);\n const injector = inject(Injector);\n\n return () => {\n const measuringLabel = 'serializeTransferStateFactory';\n startMeasuring(measuringLabel);\n // The `.toJSON` here causes the `onSerialize` callbacks to be called.\n // These callbacks can be used to provide the value for a given key.\n const content = transferStore.toJson();\n\n if (transferStore.isEmpty) {\n // The state is empty, nothing to transfer,\n // avoid creating an extra `<script>` tag in this case.\n return;\n }\n\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n warnIfStateTransferHappened(injector);\n }\n\n const script = createScript(\n doc,\n content,\n /**\n * `nonce` is not required for 'application/json'\n * See: https://html.spec.whatwg.org/multipage/scripting.html#attr-script-type\n */\n null,\n );\n script.id = appId + '-state';\n script.setAttribute('type', 'application/json');\n\n // It is intentional that we add the script at the very bottom. Angular CLI script tags for\n // bundles are always `type=\"module\"`. These are deferred by default and cause the\n // transfer data to be queried only after the browser has finished parsing the DOM.\n doc.body.appendChild(script);\n stopMeasuring(measuringLabel);\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\nimport {\n DOCUMENT,\n PlatformLocation,\n ViewportScroller,\n ɵgetDOM as getDOM,\n ɵNullViewportScroller as NullViewportScroller,\n ɵPLATFORM_SERVER_ID as PLATFORM_SERVER_ID,\n} from '@angular/common';\nimport {\n createPlatformFactory,\n Injector,\n NgModule,\n PLATFORM_ID,\n PLATFORM_INITIALIZER,\n platformCore,\n PlatformRef,\n Provider,\n Testability,\n ɵsetDocument,\n ɵTESTABILITY as TESTABILITY,\n inject,\n StaticProvider,\n} from '@angular/core';\nimport {\n BrowserModule,\n EVENT_MANAGER_PLUGINS,\n ɵBrowserDomAdapter as BrowserDomAdapter,\n} from '@angular/platform-browser';\n\nimport {DominoAdapter, parseDocument} from './domino_adapter';\nimport {SERVER_HTTP_PROVIDERS} from './http';\nimport {resolveUrl} from './url';\nimport {ServerPlatformLocation} from './location';\nimport {enableDomEmulation, PlatformState} from './platform_state';\nimport {ServerEventManagerPlugin} from './server_events';\nimport {INITIAL_CONFIG, PlatformConfig} from './tokens';\nimport {TRANSFER_STATE_SERIALIZATION_PROVIDERS} from './transfer_state';\n\nexport const INTERNAL_SERVER_PLATFORM_PROVIDERS: StaticProvider[] = [\n {provide: DOCUMENT, useFactory: _document},\n {provide: PLATFORM_ID, useValue: PLATFORM_SERVER_ID},\n {provide: PLATFORM_INITIALIZER, useFactory: initDominoAdapter, multi: true},\n {\n provide: PlatformLocation,\n useClass: ServerPlatformLocation,\n deps: [],\n },\n {provide: PlatformState, deps: [DOCUMENT]},\n];\n\nfunction initDominoAdapter() {\n const injector = inject(Injector);\n const _enableDomEmulation = enableDomEmulation(injector);\n return () => {\n if (_enableDomEmulation) {\n DominoAdapter.makeCurrent();\n } else {\n BrowserDomAdapter.makeCurrent();\n }\n };\n}\n\nexport const SERVER_RENDER_PROVIDERS: Provider[] = [\n {provide: EVENT_MANAGER_PLUGINS, multi: true, useClass: ServerEventManagerPlugin},\n];\n\nexport const PLATFORM_SERVER_PROVIDERS: Provider[] = [\n TRANSFER_STATE_SERIALIZATION_PROVIDERS,\n SERVER_RENDER_PROVIDERS,\n SERVER_HTTP_PROVIDERS,\n {provide: Testability, useValue: null}, // Keep for backwards-compatibility.\n {provide: TESTABILITY, useValue: null},\n {provide: ViewportScroller, useClass: NullViewportScroller},\n];\n\n/**\n * The ng module for the server.\n *\n * @publicApi\n */\n@NgModule({\n exports: [BrowserModule],\n providers: PLATFORM_SERVER_PROVIDERS,\n})\nexport class ServerModule {}\n\nfunction _document() {\n const injector = inject(Injector);\n const config: PlatformConfig | null = injector.get(INITIAL_CONFIG, null);\n const _enableDomEmulation = enableDomEmulation(injector);\n let document: Document;\n if (config && config.document) {\n document =\n typeof config.document === 'string'\n ? _enableDomEmulation\n ? parseDocument(\n config.document,\n config.url !== undefined\n ? resolveUrl(config.url, 'http://localhost').href\n : undefined,\n )\n : window.document\n : config.document;\n } else {\n document = getDOM().createHtmlDocument();\n }\n // Tell ivy about the global document\n ɵsetDocument(document);\n return document;\n}\n\n/**\n * Creates a server-side instance of an Angular platform.\n *\n * This platform should be used when performing server-side rendering of an Angular application.\n * Standalone applications can be bootstrapped on the server using the `bootstrapApplication`\n * function from `@angular/platform-browser`. When using `bootstrapApplication`, the `platformServer`\n * should be created first and passed to the bootstrap function using the `BootstrapContext`.\n *\n * @publicApi\n */\nexport function platformServer(extraProviders?: StaticProvider[] | undefined): PlatformRef {\n const noServerModeSet = typeof ngServerMode === 'undefined';\n if (noServerModeSet) {\n globalThis['ngServerMode'] = true;\n }\n\n const platform = createPlatformFactory(\n platformCore,\n 'server',\n INTERNAL_SERVER_PLATFORM_PROVIDERS,\n )(extraProviders);\n\n if (noServerModeSet) {\n platform.onDestroy(() => {\n globalThis['ngServerMode'] = undefined;\n });\n }\n\n return platform;\n}\n"],"names":["BrowserDomAdapter","setRootDomAdapter","RuntimeError","startMeasuring","stopMeasuring","HTTP_ROOT_INTERCEPTOR_FNS","getDOM","PLATFORM_SERVER_ID","TESTABILITY","NullViewportScroller","ɵsetDocument"],"mappings":";;;;;;;;;;;;;;SAiBgB,WAAW,GAAA;EAGzB,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC;EACrC,UAAkB,CAAC,eAAe,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK;AAC1D;SAKgB,aAAa,CAAC,IAAY,EAAE,GAAG,GAAG,GAAG,EAAA;EACnD,IAAI,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC;AAC3C,EAAA,IAAI,GAAG,GAAG,MAAM,CAAC,QAAQ;AACzB,EAAA,OAAO,GAAG;AACZ;AAKM,SAAU,iBAAiB,CAAC,GAAa,EAAA;AAC7C,EAAA,OAAQ,GAAW,CAAC,SAAS,EAAE;AACjC;AAKM,MAAO,aAAc,SAAQA,kBAAiB,CAAA;AAClD,EAAA,OAAgB,WAAW,GAAA;AACzB,IAAA,WAAW,EAAE;AACb,IAAAC,kBAAiB,CAAC,IAAI,aAAa,EAAE,CAAC;AACxC,EAAA;AAEkB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226,7 +226,7 @@ function isHostAllowed(hostname, allowedHosts) {
|
|
|
226
226
|
return false;
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
-
const VERSION = /* @__PURE__ */new Version('22.2.
|
|
229
|
+
const VERSION = /* @__PURE__ */new Version('22.2.1');
|
|
230
230
|
|
|
231
231
|
export { BEFORE_APP_SERIALIZED, INITIAL_CONFIG, PlatformState, VERSION, platformServer, provideServerRendering, renderApplication, renderModule, SERVER_CONTEXT as ɵSERVER_CONTEXT, isHostAllowed as ɵisHostAllowed, renderInternal as ɵrenderInternal };
|
|
232
232
|
//# sourceMappingURL=platform-server.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-server.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/platform-server/src/provide_server.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/platform-server/src/utils.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/platform-server/src/version.ts"],"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 */\n\nimport {EnvironmentProviders, makeEnvironmentProviders} from '@angular/core';\n\nimport {ɵHTTP_FETCH_MAX_RESPONSE_SIZE as HTTP_FETCH_MAX_RESPONSE_SIZE} from '@angular/common/http';\nimport {PLATFORM_SERVER_PROVIDERS} from './server';\n\n/**\n * Sets up providers necessary to enable server rendering functionality for the application.\n *\n * @param options An object to configure the server providers. Currently supports the following options:\n * - `maxResponseBodySize`: The maximum allowed response body size when using the Fetch API.\n *\n * @usageNotes\n *\n * Basic example of how you can add server support to your application:\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [provideServerRendering()]\n * });\n * ```\n *\n * @publicApi\n * @returns A set of providers to setup the server.\n */\nexport function provideServerRendering(options?: {\n maxResponseBodySize: number;\n}): EnvironmentProviders {\n if (typeof ngServerMode === 'undefined') {\n globalThis['ngServerMode'] = true;\n }\n\n const providers = [...PLATFORM_SERVER_PROVIDERS];\n if (options?.maxResponseBodySize) {\n providers.push({provide: HTTP_FETCH_MAX_RESPONSE_SIZE, useValue: options.maxResponseBodySize});\n }\n\n return makeEnvironmentProviders(providers);\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\nimport {\n APP_ID,\n ApplicationRef,\n CSP_NONCE,\n InjectionToken,\n PlatformRef,\n Provider,\n Renderer2,\n StaticProvider,\n Type,\n ɵannotateForHydration as annotateForHydration,\n ɵINTERNAL_APPLICATION_ERROR_HANDLER as INTERNAL_APPLICATION_ERROR_HANDLER,\n ɵIS_HYDRATION_DOM_REUSE_ENABLED as IS_HYDRATION_DOM_REUSE_ENABLED,\n ɵSSR_CONTENT_INTEGRITY_MARKER as SSR_CONTENT_INTEGRITY_MARKER,\n ɵstartMeasuring as startMeasuring,\n ɵstopMeasuring as stopMeasuring,\n ɵRuntimeError as RuntimeError,\n} from '@angular/core';\nimport {BootstrapContext} from '@angular/platform-browser';\n\nimport {RuntimeErrorCode} from './errors';\nimport {platformServer} from './server';\nimport {PlatformState} from './platform_state';\nimport {BEFORE_APP_SERIALIZED, INITIAL_CONFIG, PlatformConfig} from './tokens';\nimport {createScript} from './transfer_state';\nimport {resolveUrl} from './url';\n\n/**\n * Event dispatch (JSAction) script is inlined into the HTML by the build\n * process to avoid extra blocking request on a page. The script looks like this:\n * ```html\n * <script type=\"text/javascript\" id=\"ng-event-dispatch-contract\">...</script>\n * ```\n * This const represents the \"id\" attribute value.\n */\nexport const EVENT_DISPATCH_SCRIPT_ID = 'ng-event-dispatch-contract';\n\ninterface PlatformOptions extends Omit<PlatformConfig, 'document'> {\n document?: string | Document;\n platformProviders?: Provider[];\n}\n\n/**\n * Creates an instance of a server platform (with or without JIT compiler support\n * depending on the `ngJitMode` global const value), using provided options.\n */\nfunction createServerPlatform(options: PlatformOptions): PlatformRef {\n const extraProviders = options.platformProviders ?? [];\n const measuringLabel = 'createServerPlatform';\n startMeasuring(measuringLabel);\n const {document, url} = options;\n\n const platform = platformServer([\n {\n provide: INITIAL_CONFIG,\n useValue: {\n document,\n url,\n },\n },\n extraProviders,\n ]);\n\n stopMeasuring(measuringLabel);\n return platform;\n}\n\n/**\n * Finds and returns inlined event dispatch script if it exists.\n * See the `EVENT_DISPATCH_SCRIPT_ID` const docs for additional info.\n */\nfunction findEventDispatchScript(doc: Document) {\n return doc.getElementById(EVENT_DISPATCH_SCRIPT_ID);\n}\n\n/**\n * Removes inlined event dispatch script if it exists.\n * See the `EVENT_DISPATCH_SCRIPT_ID` const docs for additional info.\n */\nfunction removeEventDispatchScript(doc: Document) {\n findEventDispatchScript(doc)?.remove();\n}\n\n/**\n * Annotate nodes for hydration and remove event dispatch script when not needed.\n */\nfunction prepareForHydration(platformState: PlatformState, applicationRef: ApplicationRef): void {\n const measuringLabel = 'prepareForHydration';\n startMeasuring(measuringLabel);\n const environmentInjector = applicationRef.injector;\n const doc = platformState.getDocument();\n\n if (!environmentInjector.get(IS_HYDRATION_DOM_REUSE_ENABLED, false)) {\n // Hydration is diabled, remove inlined event dispatch script.\n // (which was injected by the build process) from the HTML.\n removeEventDispatchScript(doc);\n\n return;\n }\n\n appendSsrContentIntegrityMarker(doc);\n\n const eventTypesToReplay = annotateForHydration(applicationRef, doc);\n if (eventTypesToReplay.regular.size || eventTypesToReplay.capture.size) {\n insertEventRecordScript(\n environmentInjector.get(APP_ID),\n doc,\n eventTypesToReplay,\n environmentInjector.get(CSP_NONCE, null),\n );\n } else {\n // No events to replay, we should remove inlined event dispatch script\n // (which was injected by the build process) from the HTML.\n removeEventDispatchScript(doc);\n }\n stopMeasuring(measuringLabel);\n}\n\n/**\n * Creates a marker comment node and append it into the `<body>`.\n * Some CDNs have mechanisms to remove all comment node from HTML.\n * This behaviour breaks hydration, so we'll detect on the client side if this\n * marker comment is still available or else throw an error\n */\nfunction appendSsrContentIntegrityMarker(doc: Document) {\n // Adding a ng hydration marker comment\n const comment = doc.createComment(SSR_CONTENT_INTEGRITY_MARKER);\n doc.body.firstChild\n ? doc.body.insertBefore(comment, doc.body.firstChild)\n : doc.body.append(comment);\n}\n\n/**\n * Adds the `ng-server-context` attribute to host elements of all bootstrapped components\n * within a given application.\n */\nfunction appendServerContextInfo(applicationRef: ApplicationRef) {\n const injector = applicationRef.injector;\n let serverContext = sanitizeServerContext(injector.get(SERVER_CONTEXT, DEFAULT_SERVER_CONTEXT));\n applicationRef.components.forEach((componentRef) => {\n const renderer = componentRef.injector.get(Renderer2);\n const element = componentRef.location.nativeElement;\n if (element) {\n renderer.setAttribute(element, 'ng-server-context', serverContext);\n }\n });\n}\n\nfunction insertEventRecordScript(\n appId: string,\n doc: Document,\n eventTypesToReplay: {regular: Set<string>; capture: Set<string>},\n nonce: string | null,\n): void {\n const measuringLabel = 'insertEventRecordScript';\n startMeasuring(measuringLabel);\n const {regular, capture} = eventTypesToReplay;\n const eventDispatchScript = findEventDispatchScript(doc);\n\n // Note: this is only true when build with the CLI tooling, which inserts the script in the HTML\n if (eventDispatchScript) {\n // This is defined in packages/core/primitives/event-dispatch/contract_binary.ts\n const replayScriptContents =\n `window.__jsaction_bootstrap(` +\n `document.body,` +\n `\"${appId}\",` +\n `${JSON.stringify(Array.from(regular))},` +\n `${JSON.stringify(Array.from(capture))}` +\n `);`;\n\n const replayScript = createScript(doc, replayScriptContents, nonce);\n\n // Insert replay script right after inlined event dispatch script, since it\n // relies on `__jsaction_bootstrap` to be defined in the global scope.\n eventDispatchScript.after(replayScript);\n }\n stopMeasuring(measuringLabel);\n}\n\n/**\n * Renders an Angular application to a string.\n *\n * @private\n *\n * @param platformRef - Reference to the Angular platform.\n * @param applicationRef - Reference to the Angular application.\n * @returns A promise that resolves to the rendered string.\n */\nexport async function renderInternal(\n platformRef: PlatformRef,\n applicationRef: ApplicationRef,\n): Promise<string> {\n const platformState = platformRef.injector.get(PlatformState);\n prepareForHydration(platformState, applicationRef);\n appendServerContextInfo(applicationRef);\n\n // Run any BEFORE_APP_SERIALIZED callbacks just before rendering to string.\n const environmentInjector = applicationRef.injector;\n const errorHandler = environmentInjector.get(INTERNAL_APPLICATION_ERROR_HANDLER);\n const callbacks = environmentInjector.get(BEFORE_APP_SERIALIZED, null);\n if (callbacks) {\n const asyncCallbacks: Promise<void>[] = [];\n for (const callback of callbacks) {\n try {\n const callbackResult = callback();\n if (callbackResult) {\n asyncCallbacks.push(callbackResult);\n }\n } catch (e) {\n // Delegate to the application's ErrorHandler so custom handlers\n // (e.g. Sentry) are notified, rather than writing directly to console.\n errorHandler(e);\n }\n }\n\n if (asyncCallbacks.length) {\n for (const result of await Promise.allSettled(asyncCallbacks)) {\n if (result.status === 'rejected') {\n errorHandler(result.reason);\n }\n }\n }\n }\n\n return platformState.renderToString();\n}\n\n/**\n * Destroy the application in a macrotask, this allows pending promises to be settled and errors\n * to be surfaced to the users.\n */\nfunction asyncDestroyPlatform(platformRef: PlatformRef): Promise<void> {\n return new Promise<void>((resolve) => {\n setTimeout(() => {\n platformRef.destroy();\n resolve();\n }, 0);\n });\n}\n\n/**\n * Specifies the value that should be used if no server context value has been provided.\n */\nconst DEFAULT_SERVER_CONTEXT = 'other';\n\n/**\n * An internal token that allows providing extra information about the server context\n * (e.g. whether SSR or SSG was used). The value is a string and characters other\n * than [a-zA-Z0-9\\-] are removed. See the default value in `DEFAULT_SERVER_CONTEXT` const.\n */\nexport const SERVER_CONTEXT = new InjectionToken<string>('SERVER_CONTEXT');\n\n/**\n * Sanitizes provided server context:\n * - removes all characters other than a-z, A-Z, 0-9 and `-`\n * - returns `other` if nothing is provided or the string is empty after sanitization\n */\nfunction sanitizeServerContext(serverContext: string): string {\n const context = serverContext.replace(/[^a-zA-Z0-9\\-]/g, '');\n return context.length > 0 ? context : DEFAULT_SERVER_CONTEXT;\n}\n\n/**\n * Bootstraps an application using provided NgModule and serializes the page content to string.\n *\n * @param moduleType A reference to an NgModule that should be used for bootstrap.\n * @param options Additional configuration for the render operation:\n * - `document` - the document of the page to render, either as an HTML string or\n * as a reference to the `document` instance.\n * - `url` - the URL for the current render request.\n * - `extraProviders` - set of platform level providers for the current render request.\n * - `allowedHosts` - the allowed hosts list for host validation in server-side rendering.\n * @publicApi\n */\nexport async function renderModule<T>(\n moduleType: Type<T>,\n options: {\n document?: string | Document;\n url?: string;\n extraProviders?: StaticProvider[];\n allowedHosts?: Readonly<string>[];\n },\n): Promise<string> {\n const {document, url, extraProviders: platformProviders, allowedHosts} = options;\n validateAllowedHosts(url, allowedHosts);\n const platformRef = createServerPlatform({document, url, platformProviders});\n try {\n const moduleRef = await platformRef.bootstrapModule(moduleType);\n const applicationRef = moduleRef.injector.get(ApplicationRef);\n\n const measuringLabel = 'whenStable';\n startMeasuring(measuringLabel);\n // Block until application is stable.\n await applicationRef.whenStable();\n stopMeasuring(measuringLabel);\n\n return await renderInternal(platformRef, applicationRef);\n } finally {\n await asyncDestroyPlatform(platformRef);\n }\n}\n\n/**\n * Bootstraps an instance of an Angular application and renders it to a string.\n *\n * @usageNotes\n *\n * ```ts\n * import { BootstrapContext, bootstrapApplication } from '@angular/platform-browser';\n * import { renderApplication } from '@angular/platform-server';\n * import { ApplicationConfig } from '@angular/core';\n * import { AppComponent } from './app.component';\n *\n * const appConfig: ApplicationConfig = { providers: [...] };\n * const bootstrap = (context: BootstrapContext) =>\n * bootstrapApplication(AppComponent, config, context);\n * const output = await renderApplication(bootstrap);\n * ```\n *\n * @param bootstrap A method that when invoked returns a promise that returns an `ApplicationRef`\n * instance once resolved. The method is invoked with an `Injector` instance that\n * provides access to the platform-level dependency injection context.\n * @param options Additional configuration for the render operation:\n * - `document` - the document of the page to render, either as an HTML string or\n * as a reference to the `document` instance.\n * - `url` - the URL for the current render request.\n * - `platformProviders` - the platform level providers for the current render request.\n * - `allowedHosts` - the allowed hosts list for host validation in server-side rendering.\n *\n * @returns A Promise, that returns serialized (to a string) rendered page, once resolved.\n *\n * @publicApi\n */\nexport async function renderApplication(\n bootstrap: (context: BootstrapContext) => Promise<ApplicationRef>,\n options: {\n document?: string | Document;\n url?: string;\n platformProviders?: Provider[];\n allowedHosts?: Readonly<string>[];\n },\n): Promise<string> {\n const renderAppLabel = 'renderApplication';\n const bootstrapLabel = 'bootstrap';\n const _renderLabel = '_render';\n const {url, allowedHosts} = options;\n\n validateAllowedHosts(url, allowedHosts);\n\n startMeasuring(renderAppLabel);\n const platformRef = createServerPlatform(options);\n try {\n startMeasuring(bootstrapLabel);\n const applicationRef = await bootstrap({platformRef});\n stopMeasuring(bootstrapLabel);\n\n startMeasuring(_renderLabel);\n\n const measuringLabel = 'whenStable';\n startMeasuring(measuringLabel);\n // Block until application is stable.\n await applicationRef.whenStable();\n stopMeasuring(measuringLabel);\n\n const rendered = await renderInternal(platformRef, applicationRef);\n stopMeasuring(_renderLabel);\n return rendered;\n } finally {\n await asyncDestroyPlatform(platformRef);\n stopMeasuring(renderAppLabel);\n }\n}\n\nfunction validateAllowedHosts(url: string | undefined, allowedHosts: string[] | undefined) {\n if (typeof url === 'string') {\n const parsedUrl = resolveUrl(url);\n if (parsedUrl !== null) {\n const hostname = parsedUrl.hostname;\n const allowedHostsSet: ReadonlySet<string> = new Set(allowedHosts);\n if (!isHostAllowed(hostname, allowedHostsSet)) {\n throw new RuntimeError(\n RuntimeErrorCode.HOST_NOT_ALLOWED,\n typeof ngDevMode === 'undefined' || ngDevMode\n ? `Host ${url} is not allowed. You can configure \\`allowedHosts\\` option.`\n : url,\n );\n }\n }\n }\n}\n\n/**\n * Checks if the hostname is allowed.\n * @param hostname - The hostname to check.\n * @param allowedHosts - A set of allowed hostnames.\n * @returns `true` if the hostname is allowed, `false` otherwise.\n * @note Used also in `@angular/ssr`.\n * @private\n */\nexport function isHostAllowed(hostname: string, allowedHosts: ReadonlySet<string>): boolean {\n if (allowedHosts.has('*') || allowedHosts.has(hostname)) {\n return true;\n }\n\n for (const allowedHost of allowedHosts) {\n if (!allowedHost.startsWith('*.')) {\n continue;\n }\n\n const domain = allowedHost.slice(1);\n if (hostname.endsWith(domain)) {\n return true;\n }\n }\n\n return false;\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/**\n * @module\n * @description\n * Entry point for all public APIs of the platform-server package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = /* @__PURE__ */ new Version('22.2.0-rc.0');\n"],"names":["HTTP_FETCH_MAX_RESPONSE_SIZE","startMeasuring","stopMeasuring","IS_HYDRATION_DOM_REUSE_ENABLED","annotateForHydration","SSR_CONTENT_INTEGRITY_MARKER","INTERNAL_APPLICATION_ERROR_HANDLER","RuntimeError"],"mappings":";;;;;;;;;;;;;;;AA+BM,SAAU,sBAAsB,CAAC,OAEtC,EAAA;AACC,EAAA,IAAI,OAAO,YAAY,KAAK,WAAW,EAAE;AACvC,IAAA,UAAU,CAAC,cAAc,CAAC,GAAG,IAAI;AACnC,EAAA;AAEA,EAAA,MAAM,SAAS,GAAG,CAAC,GAAG,yBAAyB,CAAC;EAChD,IAAI,OAAO,EAAE,mBAAmB,EAAE;IAChC,SAAS,CAAC,IAAI,CAAC;AAAC,MAAA,OAAO,EAAEA,6BAA4B;MAAE,QAAQ,EAAE,OAAO,CAAC;AAAmB,KAAC,CAAC;AAChG,EAAA;EAEA,OAAO,wBAAwB,CAAC,SAAS,CAAC;AAC5C;;ACDO,MAAM,wBAAwB,GAAG,4BAA4B;AAWpE,SAAS,oBAAoB,CAAC,OAAwB,EAAA;AACpD,EAAA,MAAM,cAAc,GAAG,OAAO,CAAC,iBAAiB,IAAI,EAAE;EACtD,MAAM,cAAc,GAAG,sBAAsB;EAC7CC,eAAc,CAAC,cAAc,CAAC;EAC9B,MAAM;IAAC,QAAQ;AAAE,IAAA;AAAG,GAAC,GAAG,OAAO;AAE/B,E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,KAAK,QAAQ,EAAE;AAC3B,IAAA,MAAM,SAAS,GAAG,UAAU,CAAC,GAAG,CAAC;IACjC,IAAI,SAAS,KAAK,IAAI,EAAE;AACtB,MAAA,MAAM,QAAQ,GAAG,SAAS,CAAC,QAAQ;AACnC,MAAA,MAAM,eAAe,GAAwB,IAAI,GAAG,CAAC,YAAY,CAAC;AAClE,MAAA,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,eAAe,CAAC,EAAE;AAC7C,QAAA,MAAM,IAAIK,aAAY,CAAA,IAAA,EAEpB,OAAO,SAAS,KAAK,WAAW,IAAI,SAAA,GAChC,CAAA,KAAA,EAAQ,GAAG,CAAA,2DAAA,CAAA,GACX,GAAG,CACR;AACH,MAAA;AACF,IAAA;AACF,EAAA;AACF;AAUM,SAAU,aAAa,CAAC,QAAgB,EAAE,YAAiC,EAAA;AAC/E,EAAA,IAAI,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;AACvD,IAAA,OAAO,IAAI;AACb,EAAA;AAEA,EAAA,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE;AACtC,IAAA,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;AACjC,MAAA;AACF,IAAA;AAEA,IAAA,MAAM,MAAM,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;AACnC,IAAA,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;AAC7B,MAAA,OAAO,IAAI;AACb,IAAA;AACF,EAAA;AAEA,EAAA,OAAO,KAAK;AACd;;ACrZO,MAAM,OAAO,kBAAmB,IAAI,OAAO,CAAC,mBAAmB;;"}
|
|
1
|
+
{"version":3,"file":"platform-server.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/platform-server/src/provide_server.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/platform-server/src/utils.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/platform-server/src/version.ts"],"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 */\n\nimport {EnvironmentProviders, makeEnvironmentProviders} from '@angular/core';\n\nimport {ɵHTTP_FETCH_MAX_RESPONSE_SIZE as HTTP_FETCH_MAX_RESPONSE_SIZE} from '@angular/common/http';\nimport {PLATFORM_SERVER_PROVIDERS} from './server';\n\n/**\n * Sets up providers necessary to enable server rendering functionality for the application.\n *\n * @param options An object to configure the server providers. Currently supports the following options:\n * - `maxResponseBodySize`: The maximum allowed response body size when using the Fetch API.\n *\n * @usageNotes\n *\n * Basic example of how you can add server support to your application:\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [provideServerRendering()]\n * });\n * ```\n *\n * @publicApi\n * @returns A set of providers to setup the server.\n */\nexport function provideServerRendering(options?: {\n maxResponseBodySize: number;\n}): EnvironmentProviders {\n if (typeof ngServerMode === 'undefined') {\n globalThis['ngServerMode'] = true;\n }\n\n const providers = [...PLATFORM_SERVER_PROVIDERS];\n if (options?.maxResponseBodySize) {\n providers.push({provide: HTTP_FETCH_MAX_RESPONSE_SIZE, useValue: options.maxResponseBodySize});\n }\n\n return makeEnvironmentProviders(providers);\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\nimport {\n APP_ID,\n ApplicationRef,\n CSP_NONCE,\n InjectionToken,\n PlatformRef,\n Provider,\n Renderer2,\n StaticProvider,\n Type,\n ɵannotateForHydration as annotateForHydration,\n ɵINTERNAL_APPLICATION_ERROR_HANDLER as INTERNAL_APPLICATION_ERROR_HANDLER,\n ɵIS_HYDRATION_DOM_REUSE_ENABLED as IS_HYDRATION_DOM_REUSE_ENABLED,\n ɵSSR_CONTENT_INTEGRITY_MARKER as SSR_CONTENT_INTEGRITY_MARKER,\n ɵstartMeasuring as startMeasuring,\n ɵstopMeasuring as stopMeasuring,\n ɵRuntimeError as RuntimeError,\n} from '@angular/core';\nimport {BootstrapContext} from '@angular/platform-browser';\n\nimport {RuntimeErrorCode} from './errors';\nimport {platformServer} from './server';\nimport {PlatformState} from './platform_state';\nimport {BEFORE_APP_SERIALIZED, INITIAL_CONFIG, PlatformConfig} from './tokens';\nimport {createScript} from './transfer_state';\nimport {resolveUrl} from './url';\n\n/**\n * Event dispatch (JSAction) script is inlined into the HTML by the build\n * process to avoid extra blocking request on a page. The script looks like this:\n * ```html\n * <script type=\"text/javascript\" id=\"ng-event-dispatch-contract\">...</script>\n * ```\n * This const represents the \"id\" attribute value.\n */\nexport const EVENT_DISPATCH_SCRIPT_ID = 'ng-event-dispatch-contract';\n\ninterface PlatformOptions extends Omit<PlatformConfig, 'document'> {\n document?: string | Document;\n platformProviders?: Provider[];\n}\n\n/**\n * Creates an instance of a server platform (with or without JIT compiler support\n * depending on the `ngJitMode` global const value), using provided options.\n */\nfunction createServerPlatform(options: PlatformOptions): PlatformRef {\n const extraProviders = options.platformProviders ?? [];\n const measuringLabel = 'createServerPlatform';\n startMeasuring(measuringLabel);\n const {document, url} = options;\n\n const platform = platformServer([\n {\n provide: INITIAL_CONFIG,\n useValue: {\n document,\n url,\n },\n },\n extraProviders,\n ]);\n\n stopMeasuring(measuringLabel);\n return platform;\n}\n\n/**\n * Finds and returns inlined event dispatch script if it exists.\n * See the `EVENT_DISPATCH_SCRIPT_ID` const docs for additional info.\n */\nfunction findEventDispatchScript(doc: Document) {\n return doc.getElementById(EVENT_DISPATCH_SCRIPT_ID);\n}\n\n/**\n * Removes inlined event dispatch script if it exists.\n * See the `EVENT_DISPATCH_SCRIPT_ID` const docs for additional info.\n */\nfunction removeEventDispatchScript(doc: Document) {\n findEventDispatchScript(doc)?.remove();\n}\n\n/**\n * Annotate nodes for hydration and remove event dispatch script when not needed.\n */\nfunction prepareForHydration(platformState: PlatformState, applicationRef: ApplicationRef): void {\n const measuringLabel = 'prepareForHydration';\n startMeasuring(measuringLabel);\n const environmentInjector = applicationRef.injector;\n const doc = platformState.getDocument();\n\n if (!environmentInjector.get(IS_HYDRATION_DOM_REUSE_ENABLED, false)) {\n // Hydration is diabled, remove inlined event dispatch script.\n // (which was injected by the build process) from the HTML.\n removeEventDispatchScript(doc);\n\n return;\n }\n\n appendSsrContentIntegrityMarker(doc);\n\n const eventTypesToReplay = annotateForHydration(applicationRef, doc);\n if (eventTypesToReplay.regular.size || eventTypesToReplay.capture.size) {\n insertEventRecordScript(\n environmentInjector.get(APP_ID),\n doc,\n eventTypesToReplay,\n environmentInjector.get(CSP_NONCE, null),\n );\n } else {\n // No events to replay, we should remove inlined event dispatch script\n // (which was injected by the build process) from the HTML.\n removeEventDispatchScript(doc);\n }\n stopMeasuring(measuringLabel);\n}\n\n/**\n * Creates a marker comment node and append it into the `<body>`.\n * Some CDNs have mechanisms to remove all comment node from HTML.\n * This behaviour breaks hydration, so we'll detect on the client side if this\n * marker comment is still available or else throw an error\n */\nfunction appendSsrContentIntegrityMarker(doc: Document) {\n // Adding a ng hydration marker comment\n const comment = doc.createComment(SSR_CONTENT_INTEGRITY_MARKER);\n doc.body.firstChild\n ? doc.body.insertBefore(comment, doc.body.firstChild)\n : doc.body.append(comment);\n}\n\n/**\n * Adds the `ng-server-context` attribute to host elements of all bootstrapped components\n * within a given application.\n */\nfunction appendServerContextInfo(applicationRef: ApplicationRef) {\n const injector = applicationRef.injector;\n let serverContext = sanitizeServerContext(injector.get(SERVER_CONTEXT, DEFAULT_SERVER_CONTEXT));\n applicationRef.components.forEach((componentRef) => {\n const renderer = componentRef.injector.get(Renderer2);\n const element = componentRef.location.nativeElement;\n if (element) {\n renderer.setAttribute(element, 'ng-server-context', serverContext);\n }\n });\n}\n\nfunction insertEventRecordScript(\n appId: string,\n doc: Document,\n eventTypesToReplay: {regular: Set<string>; capture: Set<string>},\n nonce: string | null,\n): void {\n const measuringLabel = 'insertEventRecordScript';\n startMeasuring(measuringLabel);\n const {regular, capture} = eventTypesToReplay;\n const eventDispatchScript = findEventDispatchScript(doc);\n\n // Note: this is only true when build with the CLI tooling, which inserts the script in the HTML\n if (eventDispatchScript) {\n // This is defined in packages/core/primitives/event-dispatch/contract_binary.ts\n const replayScriptContents =\n `window.__jsaction_bootstrap(` +\n `document.body,` +\n `\"${appId}\",` +\n `${JSON.stringify(Array.from(regular))},` +\n `${JSON.stringify(Array.from(capture))}` +\n `);`;\n\n const replayScript = createScript(doc, replayScriptContents, nonce);\n\n // Insert replay script right after inlined event dispatch script, since it\n // relies on `__jsaction_bootstrap` to be defined in the global scope.\n eventDispatchScript.after(replayScript);\n }\n stopMeasuring(measuringLabel);\n}\n\n/**\n * Renders an Angular application to a string.\n *\n * @private\n *\n * @param platformRef - Reference to the Angular platform.\n * @param applicationRef - Reference to the Angular application.\n * @returns A promise that resolves to the rendered string.\n */\nexport async function renderInternal(\n platformRef: PlatformRef,\n applicationRef: ApplicationRef,\n): Promise<string> {\n const platformState = platformRef.injector.get(PlatformState);\n prepareForHydration(platformState, applicationRef);\n appendServerContextInfo(applicationRef);\n\n // Run any BEFORE_APP_SERIALIZED callbacks just before rendering to string.\n const environmentInjector = applicationRef.injector;\n const errorHandler = environmentInjector.get(INTERNAL_APPLICATION_ERROR_HANDLER);\n const callbacks = environmentInjector.get(BEFORE_APP_SERIALIZED, null);\n if (callbacks) {\n const asyncCallbacks: Promise<void>[] = [];\n for (const callback of callbacks) {\n try {\n const callbackResult = callback();\n if (callbackResult) {\n asyncCallbacks.push(callbackResult);\n }\n } catch (e) {\n // Delegate to the application's ErrorHandler so custom handlers\n // (e.g. Sentry) are notified, rather than writing directly to console.\n errorHandler(e);\n }\n }\n\n if (asyncCallbacks.length) {\n for (const result of await Promise.allSettled(asyncCallbacks)) {\n if (result.status === 'rejected') {\n errorHandler(result.reason);\n }\n }\n }\n }\n\n return platformState.renderToString();\n}\n\n/**\n * Destroy the application in a macrotask, this allows pending promises to be settled and errors\n * to be surfaced to the users.\n */\nfunction asyncDestroyPlatform(platformRef: PlatformRef): Promise<void> {\n return new Promise<void>((resolve) => {\n setTimeout(() => {\n platformRef.destroy();\n resolve();\n }, 0);\n });\n}\n\n/**\n * Specifies the value that should be used if no server context value has been provided.\n */\nconst DEFAULT_SERVER_CONTEXT = 'other';\n\n/**\n * An internal token that allows providing extra information about the server context\n * (e.g. whether SSR or SSG was used). The value is a string and characters other\n * than [a-zA-Z0-9\\-] are removed. See the default value in `DEFAULT_SERVER_CONTEXT` const.\n */\nexport const SERVER_CONTEXT = new InjectionToken<string>('SERVER_CONTEXT');\n\n/**\n * Sanitizes provided server context:\n * - removes all characters other than a-z, A-Z, 0-9 and `-`\n * - returns `other` if nothing is provided or the string is empty after sanitization\n */\nfunction sanitizeServerContext(serverContext: string): string {\n const context = serverContext.replace(/[^a-zA-Z0-9\\-]/g, '');\n return context.length > 0 ? context : DEFAULT_SERVER_CONTEXT;\n}\n\n/**\n * Bootstraps an application using provided NgModule and serializes the page content to string.\n *\n * @param moduleType A reference to an NgModule that should be used for bootstrap.\n * @param options Additional configuration for the render operation:\n * - `document` - the document of the page to render, either as an HTML string or\n * as a reference to the `document` instance.\n * - `url` - the URL for the current render request.\n * - `extraProviders` - set of platform level providers for the current render request.\n * - `allowedHosts` - the allowed hosts list for host validation in server-side rendering.\n * @publicApi\n */\nexport async function renderModule<T>(\n moduleType: Type<T>,\n options: {\n document?: string | Document;\n url?: string;\n extraProviders?: StaticProvider[];\n allowedHosts?: Readonly<string>[];\n },\n): Promise<string> {\n const {document, url, extraProviders: platformProviders, allowedHosts} = options;\n validateAllowedHosts(url, allowedHosts);\n const platformRef = createServerPlatform({document, url, platformProviders});\n try {\n const moduleRef = await platformRef.bootstrapModule(moduleType);\n const applicationRef = moduleRef.injector.get(ApplicationRef);\n\n const measuringLabel = 'whenStable';\n startMeasuring(measuringLabel);\n // Block until application is stable.\n await applicationRef.whenStable();\n stopMeasuring(measuringLabel);\n\n return await renderInternal(platformRef, applicationRef);\n } finally {\n await asyncDestroyPlatform(platformRef);\n }\n}\n\n/**\n * Bootstraps an instance of an Angular application and renders it to a string.\n *\n * @usageNotes\n *\n * ```ts\n * import { BootstrapContext, bootstrapApplication } from '@angular/platform-browser';\n * import { renderApplication } from '@angular/platform-server';\n * import { ApplicationConfig } from '@angular/core';\n * import { AppComponent } from './app.component';\n *\n * const appConfig: ApplicationConfig = { providers: [...] };\n * const bootstrap = (context: BootstrapContext) =>\n * bootstrapApplication(AppComponent, config, context);\n * const output = await renderApplication(bootstrap);\n * ```\n *\n * @param bootstrap A method that when invoked returns a promise that returns an `ApplicationRef`\n * instance once resolved. The method is invoked with an `Injector` instance that\n * provides access to the platform-level dependency injection context.\n * @param options Additional configuration for the render operation:\n * - `document` - the document of the page to render, either as an HTML string or\n * as a reference to the `document` instance.\n * - `url` - the URL for the current render request.\n * - `platformProviders` - the platform level providers for the current render request.\n * - `allowedHosts` - the allowed hosts list for host validation in server-side rendering.\n *\n * @returns A Promise, that returns serialized (to a string) rendered page, once resolved.\n *\n * @publicApi\n */\nexport async function renderApplication(\n bootstrap: (context: BootstrapContext) => Promise<ApplicationRef>,\n options: {\n document?: string | Document;\n url?: string;\n platformProviders?: Provider[];\n allowedHosts?: Readonly<string>[];\n },\n): Promise<string> {\n const renderAppLabel = 'renderApplication';\n const bootstrapLabel = 'bootstrap';\n const _renderLabel = '_render';\n const {url, allowedHosts} = options;\n\n validateAllowedHosts(url, allowedHosts);\n\n startMeasuring(renderAppLabel);\n const platformRef = createServerPlatform(options);\n try {\n startMeasuring(bootstrapLabel);\n const applicationRef = await bootstrap({platformRef});\n stopMeasuring(bootstrapLabel);\n\n startMeasuring(_renderLabel);\n\n const measuringLabel = 'whenStable';\n startMeasuring(measuringLabel);\n // Block until application is stable.\n await applicationRef.whenStable();\n stopMeasuring(measuringLabel);\n\n const rendered = await renderInternal(platformRef, applicationRef);\n stopMeasuring(_renderLabel);\n return rendered;\n } finally {\n await asyncDestroyPlatform(platformRef);\n stopMeasuring(renderAppLabel);\n }\n}\n\nfunction validateAllowedHosts(url: string | undefined, allowedHosts: string[] | undefined) {\n if (typeof url === 'string') {\n const parsedUrl = resolveUrl(url);\n if (parsedUrl !== null) {\n const hostname = parsedUrl.hostname;\n const allowedHostsSet: ReadonlySet<string> = new Set(allowedHosts);\n if (!isHostAllowed(hostname, allowedHostsSet)) {\n throw new RuntimeError(\n RuntimeErrorCode.HOST_NOT_ALLOWED,\n typeof ngDevMode === 'undefined' || ngDevMode\n ? `Host ${url} is not allowed. You can configure \\`allowedHosts\\` option.`\n : url,\n );\n }\n }\n }\n}\n\n/**\n * Checks if the hostname is allowed.\n * @param hostname - The hostname to check.\n * @param allowedHosts - A set of allowed hostnames.\n * @returns `true` if the hostname is allowed, `false` otherwise.\n * @note Used also in `@angular/ssr`.\n * @private\n */\nexport function isHostAllowed(hostname: string, allowedHosts: ReadonlySet<string>): boolean {\n if (allowedHosts.has('*') || allowedHosts.has(hostname)) {\n return true;\n }\n\n for (const allowedHost of allowedHosts) {\n if (!allowedHost.startsWith('*.')) {\n continue;\n }\n\n const domain = allowedHost.slice(1);\n if (hostname.endsWith(domain)) {\n return true;\n }\n }\n\n return false;\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/**\n * @module\n * @description\n * Entry point for all public APIs of the platform-server package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = /* @__PURE__ */ new Version('22.2.1');\n"],"names":["HTTP_FETCH_MAX_RESPONSE_SIZE","startMeasuring","stopMeasuring","IS_HYDRATION_DOM_REUSE_ENABLED","annotateForHydration","SSR_CONTENT_INTEGRITY_MARKER","INTERNAL_APPLICATION_ERROR_HANDLER","RuntimeError"],"mappings":";;;;;;;;;;;;;;;AA+BM,SAAU,sBAAsB,CAAC,OAEtC,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GAAG,CAAC,IAAI,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;AACvD,IAAA,OAAO,IAAI;AACb,EAAA;AAEA,EAAA,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE;AACtC,IAAA,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;AACjC,MAAA;AACF,IAAA;AAEA,IAAA,MAAM,MAAM,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;AACnC,IAAA,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;AAC7B,MAAA,OAAO,IAAI;AACb,IAAA;AACF,EAAA;AAEA,EAAA,OAAO,KAAK;AACd;;ACrZO,MAAM,OAAO,kBAAmB,IAAI,OAAO,CAAC,mBAAmB;;"}
|
package/fesm2022/testing.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v22.2.
|
|
2
|
+
* @license Angular v22.2.1
|
|
3
3
|
* (c) 2010-2026 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -19,7 +19,7 @@ const platformServerTesting = createPlatformFactory(platformCore, 'serverTesting
|
|
|
19
19
|
class ServerTestingModule {
|
|
20
20
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
21
21
|
minVersion: "12.0.0",
|
|
22
|
-
version: "22.2.
|
|
22
|
+
version: "22.2.1",
|
|
23
23
|
ngImport: i0,
|
|
24
24
|
type: ServerTestingModule,
|
|
25
25
|
deps: [],
|
|
@@ -27,14 +27,14 @@ class ServerTestingModule {
|
|
|
27
27
|
});
|
|
28
28
|
static ɵmod = i0.ɵɵngDeclareNgModule({
|
|
29
29
|
minVersion: "14.0.0",
|
|
30
|
-
version: "22.2.
|
|
30
|
+
version: "22.2.1",
|
|
31
31
|
ngImport: i0,
|
|
32
32
|
type: ServerTestingModule,
|
|
33
33
|
exports: [BrowserDynamicTestingModule]
|
|
34
34
|
});
|
|
35
35
|
static ɵinj = i0.ɵɵngDeclareInjector({
|
|
36
36
|
minVersion: "12.0.0",
|
|
37
|
-
version: "22.2.
|
|
37
|
+
version: "22.2.1",
|
|
38
38
|
ngImport: i0,
|
|
39
39
|
type: ServerTestingModule,
|
|
40
40
|
providers: SERVER_RENDER_PROVIDERS,
|
|
@@ -43,7 +43,7 @@ class ServerTestingModule {
|
|
|
43
43
|
}
|
|
44
44
|
i0.ɵɵngDeclareClassMetadata({
|
|
45
45
|
minVersion: "12.0.0",
|
|
46
|
-
version: "22.2.
|
|
46
|
+
version: "22.2.1",
|
|
47
47
|
ngImport: i0,
|
|
48
48
|
type: ServerTestingModule,
|
|
49
49
|
decorators: [{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/platform-server",
|
|
3
|
-
"version": "22.2.
|
|
3
|
+
"version": "22.2.1",
|
|
4
4
|
"description": "Angular - library for using Angular in Node.js",
|
|
5
5
|
"author": "angular",
|
|
6
6
|
"license": "MIT",
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
"node": "^22.22.3 || ^24.15.0 || >=26.0.0"
|
|
9
9
|
},
|
|
10
10
|
"peerDependencies": {
|
|
11
|
-
"@angular/common": "22.2.
|
|
12
|
-
"@angular/compiler": "22.2.
|
|
13
|
-
"@angular/core": "22.2.
|
|
14
|
-
"@angular/platform-browser": "22.2.
|
|
11
|
+
"@angular/common": "22.2.1",
|
|
12
|
+
"@angular/compiler": "22.2.1",
|
|
13
|
+
"@angular/core": "22.2.1",
|
|
14
|
+
"@angular/platform-browser": "22.2.1",
|
|
15
15
|
"rxjs": "^6.5.3 || ^7.4.0"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|