@angular/platform-server 20.3.20 → 20.3.22
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/init.mjs +1 -1
- package/fesm2022/platform-server.mjs +53 -7
- package/fesm2022/platform-server.mjs.map +1 -1
- package/fesm2022/server.mjs +34 -28
- package/fesm2022/server.mjs.map +1 -1
- package/fesm2022/testing.mjs +5 -5
- package/index.d.ts +15 -3
- package/init/index.d.ts +1 -1
- package/package.json +5 -5
- package/testing/index.d.ts +1 -1
package/fesm2022/testing.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v20.3.
|
|
2
|
+
* @license Angular v20.3.22
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -30,11 +30,11 @@ const platformServerTesting = createPlatformFactory(platformCore, 'serverTesting
|
|
|
30
30
|
* @deprecated from v20.0.0, use e2e testing to verify SSR behavior.
|
|
31
31
|
*/
|
|
32
32
|
class ServerTestingModule {
|
|
33
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
34
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
35
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
33
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.22", ngImport: i0, type: ServerTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
34
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.22", ngImport: i0, type: ServerTestingModule, exports: [BrowserDynamicTestingModule] });
|
|
35
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.22", ngImport: i0, type: ServerTestingModule, providers: SERVER_RENDER_PROVIDERS, imports: [BrowserDynamicTestingModule] });
|
|
36
36
|
}
|
|
37
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.22", ngImport: i0, type: ServerTestingModule, decorators: [{
|
|
38
38
|
type: NgModule,
|
|
39
39
|
args: [{
|
|
40
40
|
exports: [BrowserDynamicTestingModule],
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v20.3.
|
|
2
|
+
* @license Angular v20.3.22
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -129,13 +129,14 @@ declare const SERVER_CONTEXT: InjectionToken<string>;
|
|
|
129
129
|
* as a reference to the `document` instance.
|
|
130
130
|
* - `url` - the URL for the current render request.
|
|
131
131
|
* - `extraProviders` - set of platform level providers for the current render request.
|
|
132
|
-
*
|
|
132
|
+
* - `allowedHosts` - the allowed hosts list for host validation in server-side rendering.
|
|
133
133
|
* @publicApi
|
|
134
134
|
*/
|
|
135
135
|
declare function renderModule<T>(moduleType: Type<T>, options: {
|
|
136
136
|
document?: string | Document;
|
|
137
137
|
url?: string;
|
|
138
138
|
extraProviders?: StaticProvider[];
|
|
139
|
+
allowedHosts?: Readonly<string>[];
|
|
139
140
|
}): Promise<string>;
|
|
140
141
|
/**
|
|
141
142
|
* Bootstraps an instance of an Angular application and renders it to a string.
|
|
@@ -162,6 +163,7 @@ declare function renderModule<T>(moduleType: Type<T>, options: {
|
|
|
162
163
|
* as a reference to the `document` instance.
|
|
163
164
|
* - `url` - the URL for the current render request.
|
|
164
165
|
* - `platformProviders` - the platform level providers for the current render request.
|
|
166
|
+
* - `allowedHosts` - the allowed hosts list for host validation in server-side rendering.
|
|
165
167
|
*
|
|
166
168
|
* @returns A Promise, that returns serialized (to a string) rendered page, once resolved.
|
|
167
169
|
*
|
|
@@ -171,7 +173,17 @@ declare function renderApplication(bootstrap: (context: BootstrapContext) => Pro
|
|
|
171
173
|
document?: string | Document;
|
|
172
174
|
url?: string;
|
|
173
175
|
platformProviders?: Provider[];
|
|
176
|
+
allowedHosts?: Readonly<string>[];
|
|
174
177
|
}): Promise<string>;
|
|
178
|
+
/**
|
|
179
|
+
* Checks if the hostname is allowed.
|
|
180
|
+
* @param hostname - The hostname to check.
|
|
181
|
+
* @param allowedHosts - A set of allowed hostnames.
|
|
182
|
+
* @returns `true` if the hostname is allowed, `false` otherwise.
|
|
183
|
+
* @note Used also in `@angular/ssr`.
|
|
184
|
+
* @private
|
|
185
|
+
*/
|
|
186
|
+
declare function isHostAllowed(hostname: string, allowedHosts: ReadonlySet<string>): boolean;
|
|
175
187
|
|
|
176
188
|
/**
|
|
177
189
|
* DOM Adapter for the server platform based on https://github.com/fgnass/domino.
|
|
@@ -203,5 +215,5 @@ declare class DominoAdapter extends _BrowserDomAdapter {
|
|
|
203
215
|
*/
|
|
204
216
|
declare const VERSION: Version;
|
|
205
217
|
|
|
206
|
-
export { BEFORE_APP_SERIALIZED, INITIAL_CONFIG, PlatformState, ServerModule, VERSION, platformServer, provideServerRendering, renderApplication, renderModule, DominoAdapter as ɵDominoAdapter, ENABLE_DOM_EMULATION as ɵENABLE_DOM_EMULATION, INTERNAL_SERVER_PLATFORM_PROVIDERS as ɵINTERNAL_SERVER_PLATFORM_PROVIDERS, SERVER_CONTEXT as ɵSERVER_CONTEXT, SERVER_RENDER_PROVIDERS as ɵSERVER_RENDER_PROVIDERS, renderInternal as ɵrenderInternal };
|
|
218
|
+
export { BEFORE_APP_SERIALIZED, INITIAL_CONFIG, PlatformState, ServerModule, VERSION, platformServer, provideServerRendering, renderApplication, renderModule, DominoAdapter as ɵDominoAdapter, ENABLE_DOM_EMULATION as ɵENABLE_DOM_EMULATION, INTERNAL_SERVER_PLATFORM_PROVIDERS as ɵINTERNAL_SERVER_PLATFORM_PROVIDERS, SERVER_CONTEXT as ɵSERVER_CONTEXT, SERVER_RENDER_PROVIDERS as ɵSERVER_RENDER_PROVIDERS, isHostAllowed as ɵisHostAllowed, renderInternal as ɵrenderInternal };
|
|
207
219
|
export type { PlatformConfig };
|
package/init/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/platform-server",
|
|
3
|
-
"version": "20.3.
|
|
3
|
+
"version": "20.3.22",
|
|
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": "^20.19.0 || ^22.12.0 || >=24.0.0"
|
|
9
9
|
},
|
|
10
10
|
"peerDependencies": {
|
|
11
|
-
"@angular/common": "20.3.
|
|
12
|
-
"@angular/compiler": "20.3.
|
|
13
|
-
"@angular/core": "20.3.
|
|
14
|
-
"@angular/platform-browser": "20.3.
|
|
11
|
+
"@angular/common": "20.3.22",
|
|
12
|
+
"@angular/compiler": "20.3.22",
|
|
13
|
+
"@angular/core": "20.3.22",
|
|
14
|
+
"@angular/platform-browser": "20.3.22",
|
|
15
15
|
"rxjs": "^6.5.3 || ^7.4.0"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
package/testing/index.d.ts
CHANGED