@angular/platform-server 20.0.0-next.2 → 20.0.0-next.4

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.
@@ -1,31 +1,36 @@
1
1
  /**
2
- * @license Angular v20.0.0-next.2
2
+ * @license Angular v20.0.0-next.4
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
7
7
  import * as i0 from '@angular/core';
8
- import { createPlatformFactory, NgModule } from '@angular/core';
9
- import { ɵplatformCoreDynamicTesting as _platformCoreDynamicTesting, BrowserDynamicTestingModule } from '@angular/platform-browser-dynamic/testing';
8
+ import { createPlatformFactory, platformCore, NgModule } from '@angular/core';
9
+ import { ɵINTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS as _INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS } from '@angular/platform-browser-dynamic';
10
+ import { BrowserDynamicTestingModule } from '@angular/platform-browser-dynamic/testing';
10
11
  import { ɵINTERNAL_SERVER_PLATFORM_PROVIDERS as _INTERNAL_SERVER_PLATFORM_PROVIDERS, ɵSERVER_RENDER_PROVIDERS as _SERVER_RENDER_PROVIDERS } from '@angular/platform-server';
11
12
 
13
+ const INTERNAL_SERVER_DYNAMIC_PLATFORM_TESTING_PROVIDERS = [
14
+ ..._INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
15
+ ..._INTERNAL_SERVER_PLATFORM_PROVIDERS,
16
+ ];
12
17
  /**
13
18
  * Platform for testing
14
19
  *
15
20
  * @publicApi
16
21
  */
17
- const platformServerTesting = createPlatformFactory(_platformCoreDynamicTesting, 'serverTesting', _INTERNAL_SERVER_PLATFORM_PROVIDERS);
22
+ const platformServerTesting = createPlatformFactory(platformCore, 'serverTesting', INTERNAL_SERVER_DYNAMIC_PLATFORM_TESTING_PROVIDERS);
18
23
  /**
19
24
  * NgModule for testing.
20
25
  *
21
26
  * @publicApi
22
27
  */
23
28
  class ServerTestingModule {
24
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: ServerTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
25
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.0-next.2", ngImport: i0, type: ServerTestingModule, exports: [BrowserDynamicTestingModule] });
26
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: ServerTestingModule, providers: _SERVER_RENDER_PROVIDERS, imports: [BrowserDynamicTestingModule] });
29
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.4", ngImport: i0, type: ServerTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
30
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.0-next.4", ngImport: i0, type: ServerTestingModule, exports: [BrowserDynamicTestingModule] });
31
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.0-next.4", ngImport: i0, type: ServerTestingModule, providers: _SERVER_RENDER_PROVIDERS, imports: [BrowserDynamicTestingModule] });
27
32
  }
28
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: ServerTestingModule, decorators: [{
33
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.4", ngImport: i0, type: ServerTestingModule, decorators: [{
29
34
  type: NgModule,
30
35
  args: [{
31
36
  exports: [BrowserDynamicTestingModule],
@@ -1 +1 @@
1
- {"version":3,"file":"testing.mjs","sources":["../../../../../../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 {createPlatformFactory, NgModule} from '@angular/core';\nimport {\n BrowserDynamicTestingModule,\n ɵplatformCoreDynamicTesting as platformCoreDynamicTesting,\n} 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 '@angular/platform-server';\n\n/**\n * Platform for testing\n *\n * @publicApi\n */\nexport const platformServerTesting = createPlatformFactory(\n platformCoreDynamicTesting,\n 'serverTesting',\n INTERNAL_SERVER_PLATFORM_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":["platformCoreDynamicTesting","INTERNAL_SERVER_PLATFORM_PROVIDERS","SERVER_RENDER_PROVIDERS"],"mappings":";;;;;;;;;;;AAkBA;;;;AAIG;AACI,MAAM,qBAAqB,GAAG,qBAAqB,CACxDA,2BAA0B,EAC1B,eAAe,EACfC,mCAAkC;AAGpC;;;;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,EAFnBC,wBAAuB,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,EAAEA,wBAAuB;AACnC,iBAAA;;;;;"}
1
+ {"version":3,"file":"testing.mjs","sources":["../../../../../../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 {createPlatformFactory, NgModule, platformCore, StaticProvider} 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 '@angular/platform-server';\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 = 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","INTERNAL_SERVER_PLATFORM_PROVIDERS","SERVER_RENDER_PROVIDERS"],"mappings":";;;;;;;;;;;;AAgBA,MAAM,kDAAkD,GAAqB;AAC3E,IAAA,GAAGA,4CAA2C;AAC9C,IAAA,GAAGC,mCAAkC;CACtC;AAED;;;;AAIG;AACI,MAAM,qBAAqB,GAAG,qBAAqB,CACxD,YAAY,EACZ,eAAe,EACf,kDAAkD;AAGpD;;;;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,EAFnBC,wBAAuB,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,EAAEA,wBAAuB;AACnC,iBAAA;;;;;"}
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v20.0.0-next.2
2
+ * @license Angular v20.0.0-next.4
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -96,6 +96,16 @@ declare const INITIAL_CONFIG: InjectionToken<PlatformConfig>;
96
96
  declare const BEFORE_APP_SERIALIZED: InjectionToken<readonly (() => void | Promise<void>)[]>;
97
97
  declare const ENABLE_DOM_EMULATION: InjectionToken<boolean>;
98
98
 
99
+ /**
100
+ * Renders an Angular application to a string.
101
+ *
102
+ * @private
103
+ *
104
+ * @param platformRef - Reference to the Angular platform.
105
+ * @param applicationRef - Reference to the Angular application.
106
+ * @returns A promise that resolves to the rendered string.
107
+ */
108
+ declare function renderInternal(platformRef: PlatformRef, applicationRef: ApplicationRef): Promise<string>;
99
109
  /**
100
110
  * An internal token that allows providing extra information about the server context
101
111
  * (e.g. whether SSR or SSG was used). The value is a string and characters other
@@ -156,4 +166,4 @@ declare function renderApplication<T>(bootstrap: () => Promise<ApplicationRef>,
156
166
  */
157
167
  declare const VERSION: Version;
158
168
 
159
- export { BEFORE_APP_SERIALIZED, INITIAL_CONFIG, type PlatformConfig, PlatformState, ServerModule, VERSION, platformServer, provideServerRendering, renderApplication, renderModule, 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 };
169
+ export { BEFORE_APP_SERIALIZED, INITIAL_CONFIG, type PlatformConfig, PlatformState, ServerModule, VERSION, platformServer, provideServerRendering, renderApplication, renderModule, 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 };
package/init/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v20.0.0-next.2
2
+ * @license Angular v20.0.0-next.4
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/platform-server",
3
- "version": "20.0.0-next.2",
3
+ "version": "20.0.0-next.4",
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": "20.0.0-next.2",
12
- "@angular/compiler": "20.0.0-next.2",
13
- "@angular/core": "20.0.0-next.2",
14
- "@angular/platform-browser": "20.0.0-next.2",
11
+ "@angular/common": "20.0.0-next.4",
12
+ "@angular/compiler": "20.0.0-next.4",
13
+ "@angular/core": "20.0.0-next.4",
14
+ "@angular/platform-browser": "20.0.0-next.4",
15
15
  "rxjs": "^6.5.3 || ^7.4.0"
16
16
  },
17
17
  "dependencies": {
@@ -1,10 +1,11 @@
1
1
  /**
2
- * @license Angular v20.0.0-next.2
2
+ * @license Angular v20.0.0-next.4
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
7
7
  import * as i0 from '@angular/core';
8
+ import { StaticProvider } from '@angular/core';
8
9
  import * as i1 from '@angular/platform-browser-dynamic/testing';
9
10
 
10
11
  /**
@@ -12,7 +13,7 @@ import * as i1 from '@angular/platform-browser-dynamic/testing';
12
13
  *
13
14
  * @publicApi
14
15
  */
15
- declare const platformServerTesting: (extraProviders?: i0.StaticProvider[]) => i0.PlatformRef;
16
+ declare const platformServerTesting: (extraProviders?: StaticProvider[]) => i0.PlatformRef;
16
17
  /**
17
18
  * NgModule for testing.
18
19
  *