@angular/platform-server 16.0.0-next.1 → 16.0.0-next.2
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/esm2020/src/http.mjs +3 -3
- package/esm2020/src/location.mjs +3 -3
- package/esm2020/src/platform-server.mjs +2 -2
- package/esm2020/src/platform_state.mjs +3 -3
- package/esm2020/src/server.mjs +4 -4
- package/esm2020/src/server_events.mjs +3 -3
- package/esm2020/src/server_renderer.mjs +3 -3
- package/esm2020/src/styles_host.mjs +3 -3
- package/esm2020/src/tokens.mjs +2 -2
- package/esm2020/src/transfer_state.mjs +4 -4
- package/esm2020/src/utils.mjs +15 -60
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/server.mjs +4 -4
- package/fesm2015/init.mjs +1 -1
- package/fesm2015/platform-server.mjs +43 -88
- package/fesm2015/platform-server.mjs.map +1 -1
- package/fesm2015/testing.mjs +5 -5
- package/fesm2020/init.mjs +1 -1
- package/fesm2020/platform-server.mjs +43 -88
- package/fesm2020/platform-server.mjs.map +1 -1
- package/fesm2020/testing.mjs +5 -5
- package/index.d.ts +33 -29
- package/init/index.d.ts +1 -1
- package/package.json +7 -7
- package/testing/index.d.ts +1 -1
package/fesm2020/testing.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v16.0.0-next.
|
|
2
|
+
* @license Angular v16.0.0-next.2
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -23,10 +23,10 @@ const platformServerTesting = createPlatformFactory(ɵplatformCoreDynamicTesting
|
|
|
23
23
|
*/
|
|
24
24
|
class ServerTestingModule {
|
|
25
25
|
}
|
|
26
|
-
ServerTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
27
|
-
ServerTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.
|
|
28
|
-
ServerTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
26
|
+
ServerTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ServerTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
27
|
+
ServerTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.2", ngImport: i0, type: ServerTestingModule, imports: [NoopAnimationsModule], exports: [BrowserDynamicTestingModule] });
|
|
28
|
+
ServerTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ServerTestingModule, providers: ɵSERVER_RENDER_PROVIDERS, imports: [NoopAnimationsModule, BrowserDynamicTestingModule] });
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.2", ngImport: i0, type: ServerTestingModule, decorators: [{
|
|
30
30
|
type: NgModule,
|
|
31
31
|
args: [{
|
|
32
32
|
exports: [BrowserDynamicTestingModule],
|
package/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v16.0.0-next.
|
|
2
|
+
* @license Angular v16.0.0-next.2
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
|
|
8
|
+
import { ApplicationRef } from '@angular/core';
|
|
8
9
|
import { EnvironmentProviders } from '@angular/core';
|
|
9
10
|
import { EventManager } from '@angular/platform-browser';
|
|
10
11
|
import * as i0 from '@angular/core';
|
|
@@ -12,7 +13,6 @@ import * as i1 from '@angular/common/http';
|
|
|
12
13
|
import * as i2 from '@angular/platform-browser/animations';
|
|
13
14
|
import * as i3 from '@angular/platform-browser';
|
|
14
15
|
import { InjectionToken } from '@angular/core';
|
|
15
|
-
import { NgModuleFactory } from '@angular/core';
|
|
16
16
|
import { NgZone } from '@angular/core';
|
|
17
17
|
import { PlatformRef } from '@angular/core';
|
|
18
18
|
import { Provider } from '@angular/core';
|
|
@@ -25,7 +25,7 @@ import { Version } from '@angular/core';
|
|
|
25
25
|
import { ɵSharedStylesHost } from '@angular/platform-browser';
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
* A function that will be executed when calling `renderApplication
|
|
28
|
+
* A function that will be executed when calling `renderApplication` or
|
|
29
29
|
* `renderModule` just before current platform state is rendered to string.
|
|
30
30
|
*
|
|
31
31
|
* @publicApi
|
|
@@ -105,11 +105,38 @@ export declare class PlatformState {
|
|
|
105
105
|
static ɵprov: i0.ɵɵInjectableDeclaration<PlatformState>;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
+
/**
|
|
109
|
+
* Bootstraps an instance of an Angular application and renders it to a string.
|
|
110
|
+
|
|
111
|
+
* ```typescript
|
|
112
|
+
* const bootstrap = () => bootstrapApplication(RootComponent, appConfig);
|
|
113
|
+
* const output: string = await renderApplication(bootstrap);
|
|
114
|
+
* ```
|
|
115
|
+
*
|
|
116
|
+
* @param bootstrap A method that when invoked returns a promise that returns an `ApplicationRef`
|
|
117
|
+
* instance once resolved.
|
|
118
|
+
* @param options Additional configuration for the render operation:
|
|
119
|
+
* - `document` - the document of the page to render, either as an HTML string or
|
|
120
|
+
* as a reference to the `document` instance.
|
|
121
|
+
* - `url` - the URL for the current render request.
|
|
122
|
+
* - `platformProviders` - the platform level providers for the current render request.
|
|
123
|
+
*
|
|
124
|
+
* @returns A Promise, that returns serialized (to a string) rendered page, once resolved.
|
|
125
|
+
*
|
|
126
|
+
* @publicApi
|
|
127
|
+
* @developerPreview
|
|
128
|
+
*/
|
|
129
|
+
export declare function renderApplication<T>(bootstrap: () => Promise<ApplicationRef>, options: {
|
|
130
|
+
document?: string | Document;
|
|
131
|
+
url?: string;
|
|
132
|
+
platformProviders?: Provider[];
|
|
133
|
+
}): Promise<string>;
|
|
134
|
+
|
|
108
135
|
/**
|
|
109
136
|
* Bootstraps an instance of an Angular application and renders it to a string.
|
|
110
137
|
*
|
|
111
|
-
* Note: the root component passed into this function *must* be a standalone one (should have
|
|
112
|
-
* `standalone: true` flag in the `@Component` decorator config).
|
|
138
|
+
* Note: the root component passed into this function *must* be a standalone one (should have
|
|
139
|
+
* the `standalone: true` flag in the `@Component` decorator config).
|
|
113
140
|
*
|
|
114
141
|
* ```typescript
|
|
115
142
|
* @Component({
|
|
@@ -138,6 +165,7 @@ export declare class PlatformState {
|
|
|
138
165
|
* @developerPreview
|
|
139
166
|
*/
|
|
140
167
|
export declare function renderApplication<T>(rootComponent: Type<T>, options: {
|
|
168
|
+
/** @deprecated use `APP_ID` token to set the application ID. */
|
|
141
169
|
appId: string;
|
|
142
170
|
document?: string | Document;
|
|
143
171
|
url?: string;
|
|
@@ -163,30 +191,6 @@ export declare function renderModule<T>(moduleType: Type<T>, options: {
|
|
|
163
191
|
extraProviders?: StaticProvider[];
|
|
164
192
|
}): Promise<string>;
|
|
165
193
|
|
|
166
|
-
/**
|
|
167
|
-
* Bootstraps an application using provided {@link NgModuleFactory} and serializes the page content
|
|
168
|
-
* to string.
|
|
169
|
-
*
|
|
170
|
-
* @param moduleFactory An instance of the {@link NgModuleFactory} that should be used for
|
|
171
|
-
* bootstrap.
|
|
172
|
-
* @param options Additional configuration for the render operation:
|
|
173
|
-
* - `document` - the document of the page to render, either as an HTML string or
|
|
174
|
-
* as a reference to the `document` instance.
|
|
175
|
-
* - `url` - the URL for the current render request.
|
|
176
|
-
* - `extraProviders` - set of platform level providers for the current render request.
|
|
177
|
-
*
|
|
178
|
-
* @publicApi
|
|
179
|
-
*
|
|
180
|
-
* @deprecated
|
|
181
|
-
* This symbol is no longer necessary as of Angular v13.
|
|
182
|
-
* Use {@link renderModule} API instead.
|
|
183
|
-
*/
|
|
184
|
-
export declare function renderModuleFactory<T>(moduleFactory: NgModuleFactory<T>, options: {
|
|
185
|
-
document?: string;
|
|
186
|
-
url?: string;
|
|
187
|
-
extraProviders?: StaticProvider[];
|
|
188
|
-
}): Promise<string>;
|
|
189
|
-
|
|
190
194
|
/**
|
|
191
195
|
* The ng module for the server.
|
|
192
196
|
*
|
package/init/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/platform-server",
|
|
3
|
-
"version": "16.0.0-next.
|
|
3
|
+
"version": "16.0.0-next.2",
|
|
4
4
|
"description": "Angular - library for using Angular in Node.js",
|
|
5
5
|
"author": "angular",
|
|
6
6
|
"license": "MIT",
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
"node": "^16.13.0 || >=18.10.0"
|
|
9
9
|
},
|
|
10
10
|
"peerDependencies": {
|
|
11
|
-
"@angular/animations": "16.0.0-next.
|
|
12
|
-
"@angular/common": "16.0.0-next.
|
|
13
|
-
"@angular/compiler": "16.0.0-next.
|
|
14
|
-
"@angular/core": "16.0.0-next.
|
|
15
|
-
"@angular/platform-browser": "16.0.0-next.
|
|
16
|
-
"@angular/platform-browser-dynamic": "16.0.0-next.
|
|
11
|
+
"@angular/animations": "16.0.0-next.2",
|
|
12
|
+
"@angular/common": "16.0.0-next.2",
|
|
13
|
+
"@angular/compiler": "16.0.0-next.2",
|
|
14
|
+
"@angular/core": "16.0.0-next.2",
|
|
15
|
+
"@angular/platform-browser": "16.0.0-next.2",
|
|
16
|
+
"@angular/platform-browser-dynamic": "16.0.0-next.2"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"tslib": "^2.3.0",
|
package/testing/index.d.ts
CHANGED