@angular/platform-server 19.2.20 → 19.2.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/init.mjs.map +1 -1
- package/fesm2022/platform-server.mjs +51 -8
- package/fesm2022/platform-server.mjs.map +1 -1
- package/fesm2022/{server-hHJ05Ji8.mjs → server-AMcurffX.mjs} +47 -41
- package/fesm2022/server-AMcurffX.mjs.map +1 -0
- package/fesm2022/testing.mjs +6 -6
- package/fesm2022/testing.mjs.map +1 -1
- 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/server-hHJ05Ji8.mjs.map +0 -1
package/fesm2022/testing.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v19.2.
|
|
2
|
+
* @license Angular v19.2.22
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -8,7 +8,7 @@ import * as i0 from '@angular/core';
|
|
|
8
8
|
import { createPlatformFactory, platformCore, NgModule } from '@angular/core';
|
|
9
9
|
import { ɵINTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS as _INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS } from '@angular/platform-browser-dynamic';
|
|
10
10
|
import { BrowserDynamicTestingModule } from '@angular/platform-browser-dynamic/testing';
|
|
11
|
-
import { INTERNAL_SERVER_PLATFORM_PROVIDERS, SERVER_RENDER_PROVIDERS } from './server-
|
|
11
|
+
import { INTERNAL_SERVER_PLATFORM_PROVIDERS, SERVER_RENDER_PROVIDERS } from './server-AMcurffX.mjs';
|
|
12
12
|
import '@angular/common';
|
|
13
13
|
import '@angular/platform-browser';
|
|
14
14
|
import '@angular/common/http';
|
|
@@ -30,11 +30,11 @@ const platformServerTesting = createPlatformFactory(platformCore, 'serverTesting
|
|
|
30
30
|
* @publicApi
|
|
31
31
|
*/
|
|
32
32
|
class ServerTestingModule {
|
|
33
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
34
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.
|
|
35
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.
|
|
33
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.22", ngImport: i0, type: ServerTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
34
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.22", ngImport: i0, type: ServerTestingModule, exports: [BrowserDynamicTestingModule] });
|
|
35
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.22", ngImport: i0, type: ServerTestingModule, providers: SERVER_RENDER_PROVIDERS, imports: [BrowserDynamicTestingModule] });
|
|
36
36
|
}
|
|
37
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.22", ngImport: i0, type: ServerTestingModule, decorators: [{
|
|
38
38
|
type: NgModule,
|
|
39
39
|
args: [{
|
|
40
40
|
exports: [BrowserDynamicTestingModule],
|
package/fesm2022/testing.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.mjs","sources":["../../../../../
|
|
1
|
+
{"version":3,"file":"testing.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-2d99d9656325/bin/packages/platform-server/testing/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 {\n createPlatformFactory,\n NgModule,\n platformCore,\n PlatformRef,\n StaticProvider,\n} from '@angular/core';\nimport {ɵINTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS as INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS} from '@angular/platform-browser-dynamic';\nimport {BrowserDynamicTestingModule} from '@angular/platform-browser-dynamic/testing';\nimport {\n ɵINTERNAL_SERVER_PLATFORM_PROVIDERS as INTERNAL_SERVER_PLATFORM_PROVIDERS,\n ɵSERVER_RENDER_PROVIDERS as SERVER_RENDER_PROVIDERS,\n} from '../../index';\n\nconst INTERNAL_SERVER_DYNAMIC_PLATFORM_TESTING_PROVIDERS: StaticProvider[] = [\n ...INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,\n ...INTERNAL_SERVER_PLATFORM_PROVIDERS,\n];\n\n/**\n * Platform for testing\n *\n * @publicApi\n */\nexport const platformServerTesting: (extraProviders?: StaticProvider[]) => PlatformRef =\n createPlatformFactory(\n platformCore,\n 'serverTesting',\n INTERNAL_SERVER_DYNAMIC_PLATFORM_TESTING_PROVIDERS,\n );\n\n/**\n * NgModule for testing.\n *\n * @publicApi\n */\n@NgModule({\n exports: [BrowserDynamicTestingModule],\n providers: SERVER_RENDER_PROVIDERS,\n})\nexport class ServerTestingModule {}\n"],"names":["INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS"],"mappings":";;;;;;;;;;;;;;;;AAsBA,MAAM,kDAAkD,GAAqB;AAC3E,IAAA,GAAGA,4CAA2C;AAC9C,IAAA,GAAG,kCAAkC;CACtC;AAED;;;;AAIG;AACI,MAAM,qBAAqB,GAChC,qBAAqB,CACnB,YAAY,EACZ,eAAe,EACf,kDAAkD;AAGtD;;;;AAIG;MAKU,mBAAmB,CAAA;kHAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAnB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,mBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAHpB,2BAA2B,CAAA,EAAA,CAAA;mHAG1B,mBAAmB,EAAA,SAAA,EAFnB,uBAAuB,EAAA,OAAA,EAAA,CADxB,2BAA2B,CAAA,EAAA,CAAA;;sGAG1B,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,2BAA2B,CAAC;AACtC,oBAAA,SAAS,EAAE,uBAAuB;AACnC,iBAAA;;;;;"}
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v19.2.
|
|
2
|
+
* @license Angular v19.2.22
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
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": "19.2.
|
|
3
|
+
"version": "19.2.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": "^18.19.1 || ^20.11.1 || >=22.0.0"
|
|
9
9
|
},
|
|
10
10
|
"peerDependencies": {
|
|
11
|
-
"@angular/common": "19.2.
|
|
12
|
-
"@angular/compiler": "19.2.
|
|
13
|
-
"@angular/core": "19.2.
|
|
14
|
-
"@angular/platform-browser": "19.2.
|
|
11
|
+
"@angular/common": "19.2.22",
|
|
12
|
+
"@angular/compiler": "19.2.22",
|
|
13
|
+
"@angular/core": "19.2.22",
|
|
14
|
+
"@angular/platform-browser": "19.2.22",
|
|
15
15
|
"rxjs": "^6.5.3 || ^7.4.0"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
package/testing/index.d.ts
CHANGED