@angular/platform-server 18.2.12 → 18.2.14

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,5 +1,5 @@
1
1
  /**
2
- * @license Angular v18.2.12
2
+ * @license Angular v18.2.14
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -22,11 +22,11 @@ const platformServerTesting = createPlatformFactory(ɵplatformCoreDynamicTesting
22
22
  * @publicApi
23
23
  */
24
24
  class ServerTestingModule {
25
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ServerTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
26
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: ServerTestingModule, imports: [NoopAnimationsModule], exports: [BrowserDynamicTestingModule] }); }
27
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ServerTestingModule, providers: ɵSERVER_RENDER_PROVIDERS, imports: [NoopAnimationsModule, BrowserDynamicTestingModule] }); }
25
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ServerTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
26
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: ServerTestingModule, imports: [NoopAnimationsModule], exports: [BrowserDynamicTestingModule] }); }
27
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ServerTestingModule, providers: ɵSERVER_RENDER_PROVIDERS, imports: [NoopAnimationsModule, BrowserDynamicTestingModule] }); }
28
28
  }
29
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ServerTestingModule, decorators: [{
29
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ServerTestingModule, decorators: [{
30
30
  type: NgModule,
31
31
  args: [{
32
32
  exports: [BrowserDynamicTestingModule],
package/index.d.ts CHANGED
@@ -1,11 +1,12 @@
1
1
  /**
2
- * @license Angular v18.2.12
2
+ * @license Angular v18.2.14
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
7
7
 
8
8
  import { ApplicationRef } from '@angular/core';
9
+ import { BootstrapContext } from '@angular/platform-browser';
9
10
  import { EnvironmentProviders } from '@angular/core';
10
11
  import * as i0 from '@angular/core';
11
12
  import * as i1 from '@angular/common/http';
@@ -54,6 +55,13 @@ export declare interface PlatformConfig {
54
55
  }
55
56
 
56
57
  /**
58
+ * Creates a server-side instance of an Angular platform.
59
+ *
60
+ * This platform should be used when performing server-side rendering of an Angular application.
61
+ * Standalone applications can be bootstrapped on the server using the `bootstrapApplication`
62
+ * function from `@angular/platform-browser`. When using `bootstrapApplication`, the `platformServer`
63
+ * should be created first and passed to the bootstrap function using the `BootstrapContext`.
64
+ *
57
65
  * @publicApi
58
66
  */
59
67
  export declare const platformServer: (extraProviders?: StaticProvider[] | undefined) => PlatformRef;
@@ -97,14 +105,24 @@ export declare function provideServerRendering(): EnvironmentProviders;
97
105
 
98
106
  /**
99
107
  * Bootstraps an instance of an Angular application and renders it to a string.
100
-
101
- * ```typescript
102
- * const bootstrap = () => bootstrapApplication(RootComponent, appConfig);
103
- * const output: string = await renderApplication(bootstrap);
108
+ *
109
+ * @usageNotes
110
+ *
111
+ * ```ts
112
+ * import { BootstrapContext, bootstrapApplication } from '@angular/platform-browser';
113
+ * import { renderApplication } from '@angular/platform-server';
114
+ * import { ApplicationConfig } from '@angular/core';
115
+ * import { AppComponent } from './app.component';
116
+ *
117
+ * const appConfig: ApplicationConfig = { providers: [...] };
118
+ * const bootstrap = (context: BootstrapContext) =>
119
+ * bootstrapApplication(AppComponent, config, context);
120
+ * const output = await renderApplication(bootstrap);
104
121
  * ```
105
122
  *
106
123
  * @param bootstrap A method that when invoked returns a promise that returns an `ApplicationRef`
107
- * instance once resolved.
124
+ * instance once resolved. The method is invoked with an `Injector` instance that
125
+ * provides access to the platform-level dependency injection context.
108
126
  * @param options Additional configuration for the render operation:
109
127
  * - `document` - the document of the page to render, either as an HTML string or
110
128
  * as a reference to the `document` instance.
@@ -115,7 +133,7 @@ export declare function provideServerRendering(): EnvironmentProviders;
115
133
  *
116
134
  * @publicApi
117
135
  */
118
- export declare function renderApplication<T>(bootstrap: () => Promise<ApplicationRef>, options: {
136
+ export declare function renderApplication(bootstrap: (context: BootstrapContext) => Promise<ApplicationRef>, options: {
119
137
  document?: string | Document;
120
138
  url?: string;
121
139
  platformProviders?: Provider[];
package/init/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v18.2.12
2
+ * @license Angular v18.2.14
3
3
  * (c) 2010-2024 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": "18.2.12",
3
+ "version": "18.2.14",
4
4
  "description": "Angular - library for using Angular in Node.js",
5
5
  "author": "angular",
6
6
  "license": "MIT",
@@ -8,11 +8,11 @@
8
8
  "node": "^18.19.1 || ^20.11.1 || >=22.0.0"
9
9
  },
10
10
  "peerDependencies": {
11
- "@angular/animations": "18.2.12",
12
- "@angular/common": "18.2.12",
13
- "@angular/compiler": "18.2.12",
14
- "@angular/core": "18.2.12",
15
- "@angular/platform-browser": "18.2.12"
11
+ "@angular/animations": "18.2.14",
12
+ "@angular/common": "18.2.14",
13
+ "@angular/compiler": "18.2.14",
14
+ "@angular/core": "18.2.14",
15
+ "@angular/platform-browser": "18.2.14"
16
16
  },
17
17
  "dependencies": {
18
18
  "tslib": "^2.3.0",
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v18.2.12
2
+ * @license Angular v18.2.14
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */