@angular/platform-server 22.0.0-next.11 → 22.0.0-next.12
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 +17 -17
- package/fesm2022/init.mjs +1 -1
- package/fesm2022/platform-server.mjs +41 -6
- 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.map +1 -1
- package/types/init.d.ts +1 -1
- package/types/platform-server.d.ts +15 -3
- package/types/testing.d.ts +1 -1
package/types/init.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v22.0.0-next.
|
|
2
|
+
* @license Angular v22.0.0-next.12
|
|
3
3
|
* (c) 2010-2026 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -127,13 +127,14 @@ declare const SERVER_CONTEXT: InjectionToken<string>;
|
|
|
127
127
|
* as a reference to the `document` instance.
|
|
128
128
|
* - `url` - the URL for the current render request.
|
|
129
129
|
* - `extraProviders` - set of platform level providers for the current render request.
|
|
130
|
-
*
|
|
130
|
+
* - `allowedHosts` - the allowed hosts list for host validation in server-side rendering.
|
|
131
131
|
* @publicApi
|
|
132
132
|
*/
|
|
133
133
|
declare function renderModule<T>(moduleType: Type<T>, options: {
|
|
134
134
|
document?: string | Document;
|
|
135
135
|
url?: string;
|
|
136
136
|
extraProviders?: StaticProvider[];
|
|
137
|
+
allowedHosts?: Readonly<string>[];
|
|
137
138
|
}): Promise<string>;
|
|
138
139
|
/**
|
|
139
140
|
* Bootstraps an instance of an Angular application and renders it to a string.
|
|
@@ -160,6 +161,7 @@ declare function renderModule<T>(moduleType: Type<T>, options: {
|
|
|
160
161
|
* as a reference to the `document` instance.
|
|
161
162
|
* - `url` - the URL for the current render request.
|
|
162
163
|
* - `platformProviders` - the platform level providers for the current render request.
|
|
164
|
+
* - `allowedHosts` - the allowed hosts list for host validation in server-side rendering.
|
|
163
165
|
*
|
|
164
166
|
* @returns A Promise, that returns serialized (to a string) rendered page, once resolved.
|
|
165
167
|
*
|
|
@@ -169,7 +171,17 @@ declare function renderApplication(bootstrap: (context: BootstrapContext) => Pro
|
|
|
169
171
|
document?: string | Document;
|
|
170
172
|
url?: string;
|
|
171
173
|
platformProviders?: Provider[];
|
|
174
|
+
allowedHosts?: Readonly<string>[];
|
|
172
175
|
}): Promise<string>;
|
|
176
|
+
/**
|
|
177
|
+
* Checks if the hostname is allowed.
|
|
178
|
+
* @param hostname - The hostname to check.
|
|
179
|
+
* @param allowedHosts - A set of allowed hostnames.
|
|
180
|
+
* @returns `true` if the hostname is allowed, `false` otherwise.
|
|
181
|
+
* @note Used also in `@angular/ssr`.
|
|
182
|
+
* @private
|
|
183
|
+
*/
|
|
184
|
+
declare function isHostAllowed(hostname: string, allowedHosts: ReadonlySet<string>): boolean;
|
|
173
185
|
|
|
174
186
|
/**
|
|
175
187
|
* DOM Adapter for the server platform based on https://github.com/fgnass/domino.
|
|
@@ -201,5 +213,5 @@ declare class DominoAdapter extends _BrowserDomAdapter {
|
|
|
201
213
|
*/
|
|
202
214
|
declare const VERSION: Version;
|
|
203
215
|
|
|
204
|
-
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 };
|
|
216
|
+
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 };
|
|
205
217
|
export type { PlatformConfig };
|
package/types/testing.d.ts
CHANGED