@angular/platform-server 21.0.0-next.1 → 21.0.0-next.3
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 +17 -7
- package/fesm2022/platform-server.mjs.map +1 -1
- package/fesm2022/server.mjs +32 -28
- package/fesm2022/server.mjs.map +1 -1
- package/fesm2022/testing.mjs +5 -5
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +24 -7
- 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 v21.0.0-next.
|
|
2
|
+
* @license Angular v21.0.0-next.3
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
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: "
|
|
34
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
35
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
33
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: ServerTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
34
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.0-next.3", ngImport: i0, type: ServerTestingModule, exports: [BrowserDynamicTestingModule] });
|
|
35
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.0-next.3", ngImport: i0, type: ServerTestingModule, providers: SERVER_RENDER_PROVIDERS, imports: [BrowserDynamicTestingModule] });
|
|
36
36
|
}
|
|
37
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.3", 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-199a4f3c4e20/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 {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_SERVER_PLATFORM_PROVIDERS,\n];\n\n/**\n * Platform for testing\n *\n * @publicApi\n * @deprecated from v20.0.0, use e2e testing to verify SSR behavior.\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 * @deprecated from v20.0.0, use e2e testing to verify SSR behavior.\n */\n@NgModule({\n exports: [BrowserDynamicTestingModule],\n providers: SERVER_RENDER_PROVIDERS,\n})\nexport class ServerTestingModule {}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAqBA,MAAM,kDAAkD,GAAqB;AAC3E,IAAA,GAAG,kCAAkC;CACtC;AAED;;;;;AAKG;AACI,MAAM,qBAAqB,GAChC,qBAAqB,CACnB,YAAY,EACZ,eAAe,EACf,kDAAkD;AAGtD;;;;;AAKG;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 v21.0.0-next.
|
|
2
|
+
* @license Angular v21.0.0-next.3
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import * as i0 from '@angular/core';
|
|
8
8
|
import { EnvironmentProviders, StaticProvider, Provider, PlatformRef, InjectionToken, ApplicationRef, Type, Version } from '@angular/core';
|
|
9
9
|
import * as i1 from '@angular/platform-browser';
|
|
10
|
-
import { ɵBrowserDomAdapter as _BrowserDomAdapter } from '@angular/platform-browser';
|
|
10
|
+
import { BootstrapContext, ɵBrowserDomAdapter as _BrowserDomAdapter } from '@angular/platform-browser';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Representation of the current platform state.
|
|
@@ -59,6 +59,13 @@ declare class ServerModule {
|
|
|
59
59
|
static ɵinj: i0.ɵɵInjectorDeclaration<ServerModule>;
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
|
+
* Creates a server-side instance of an Angular platform.
|
|
63
|
+
*
|
|
64
|
+
* This platform should be used when performing server-side rendering of an Angular application.
|
|
65
|
+
* Standalone applications can be bootstrapped on the server using the `bootstrapApplication`
|
|
66
|
+
* function from `@angular/platform-browser`. When using `bootstrapApplication`, the `platformServer`
|
|
67
|
+
* should be created first and passed to the bootstrap function using the `BootstrapContext`.
|
|
68
|
+
*
|
|
62
69
|
* @publicApi
|
|
63
70
|
*/
|
|
64
71
|
declare function platformServer(extraProviders?: StaticProvider[] | undefined): PlatformRef;
|
|
@@ -132,14 +139,24 @@ declare function renderModule<T>(moduleType: Type<T>, options: {
|
|
|
132
139
|
}): Promise<string>;
|
|
133
140
|
/**
|
|
134
141
|
* Bootstraps an instance of an Angular application and renders it to a string.
|
|
135
|
-
|
|
142
|
+
*
|
|
143
|
+
* @usageNotes
|
|
144
|
+
*
|
|
136
145
|
* ```ts
|
|
137
|
-
*
|
|
138
|
-
*
|
|
146
|
+
* import { BootstrapContext, bootstrapApplication } from '@angular/platform-browser';
|
|
147
|
+
* import { renderApplication } from '@angular/platform-server';
|
|
148
|
+
* import { ApplicationConfig } from '@angular/core';
|
|
149
|
+
* import { AppComponent } from './app.component';
|
|
150
|
+
*
|
|
151
|
+
* const appConfig: ApplicationConfig = { providers: [...] };
|
|
152
|
+
* const bootstrap = (context: BootstrapContext) =>
|
|
153
|
+
* bootstrapApplication(AppComponent, config, context);
|
|
154
|
+
* const output = await renderApplication(bootstrap);
|
|
139
155
|
* ```
|
|
140
156
|
*
|
|
141
157
|
* @param bootstrap A method that when invoked returns a promise that returns an `ApplicationRef`
|
|
142
|
-
* instance once resolved.
|
|
158
|
+
* instance once resolved. The method is invoked with an `Injector` instance that
|
|
159
|
+
* provides access to the platform-level dependency injection context.
|
|
143
160
|
* @param options Additional configuration for the render operation:
|
|
144
161
|
* - `document` - the document of the page to render, either as an HTML string or
|
|
145
162
|
* as a reference to the `document` instance.
|
|
@@ -150,7 +167,7 @@ declare function renderModule<T>(moduleType: Type<T>, options: {
|
|
|
150
167
|
*
|
|
151
168
|
* @publicApi
|
|
152
169
|
*/
|
|
153
|
-
declare function renderApplication
|
|
170
|
+
declare function renderApplication(bootstrap: (context: BootstrapContext) => Promise<ApplicationRef>, options: {
|
|
154
171
|
document?: string | Document;
|
|
155
172
|
url?: string;
|
|
156
173
|
platformProviders?: Provider[];
|
package/init/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/platform-server",
|
|
3
|
-
"version": "21.0.0-next.
|
|
3
|
+
"version": "21.0.0-next.3",
|
|
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": "21.0.0-next.
|
|
12
|
-
"@angular/compiler": "21.0.0-next.
|
|
13
|
-
"@angular/core": "21.0.0-next.
|
|
14
|
-
"@angular/platform-browser": "21.0.0-next.
|
|
11
|
+
"@angular/common": "21.0.0-next.3",
|
|
12
|
+
"@angular/compiler": "21.0.0-next.3",
|
|
13
|
+
"@angular/core": "21.0.0-next.3",
|
|
14
|
+
"@angular/platform-browser": "21.0.0-next.3",
|
|
15
15
|
"rxjs": "^6.5.3 || ^7.4.0"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
package/testing/index.d.ts
CHANGED