@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.
package/fesm2022/init.mjs 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
  */
@@ -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
  */
@@ -16151,10 +16151,10 @@ class PlatformState {
16151
16151
  getDocument() {
16152
16152
  return this._doc;
16153
16153
  }
16154
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: PlatformState, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
16155
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: PlatformState });
16154
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.4", ngImport: i0, type: PlatformState, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
16155
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.4", ngImport: i0, type: PlatformState });
16156
16156
  }
16157
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: PlatformState, decorators: [{
16157
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.4", ngImport: i0, type: PlatformState, decorators: [{
16158
16158
  type: Injectable
16159
16159
  }], ctorParameters: () => [{ type: undefined, decorators: [{
16160
16160
  type: Inject,
@@ -16183,10 +16183,10 @@ class ServerXhr {
16183
16183
  }
16184
16184
  return new impl.XMLHttpRequest();
16185
16185
  }
16186
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: ServerXhr, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
16187
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: ServerXhr });
16186
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.4", ngImport: i0, type: ServerXhr, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
16187
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.4", ngImport: i0, type: ServerXhr });
16188
16188
  }
16189
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: ServerXhr, decorators: [{
16189
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.4", ngImport: i0, type: ServerXhr, decorators: [{
16190
16190
  type: Injectable
16191
16191
  }] });
16192
16192
  function relativeUrlsTransformerInterceptorFn(request, next) {
@@ -16305,10 +16305,10 @@ class ServerPlatformLocation {
16305
16305
  getState() {
16306
16306
  return undefined;
16307
16307
  }
16308
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: ServerPlatformLocation, deps: [{ token: DOCUMENT }, { token: INITIAL_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
16309
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: ServerPlatformLocation });
16308
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.4", ngImport: i0, type: ServerPlatformLocation, deps: [{ token: DOCUMENT }, { token: INITIAL_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
16309
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.4", ngImport: i0, type: ServerPlatformLocation });
16310
16310
  }
16311
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: ServerPlatformLocation, decorators: [{
16311
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.4", ngImport: i0, type: ServerPlatformLocation, decorators: [{
16312
16312
  type: Injectable
16313
16313
  }], ctorParameters: () => [{ type: undefined, decorators: [{
16314
16314
  type: Inject,
@@ -16333,10 +16333,10 @@ class ServerEventManagerPlugin extends EventManagerPlugin {
16333
16333
  addEventListener(element, eventName, handler, options) {
16334
16334
  return _getDOM().onAndCancel(element, eventName, handler, options);
16335
16335
  }
16336
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: ServerEventManagerPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
16337
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: ServerEventManagerPlugin });
16336
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.4", ngImport: i0, type: ServerEventManagerPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
16337
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.4", ngImport: i0, type: ServerEventManagerPlugin });
16338
16338
  }
16339
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: ServerEventManagerPlugin, decorators: [{
16339
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.4", ngImport: i0, type: ServerEventManagerPlugin, decorators: [{
16340
16340
  type: Injectable
16341
16341
  }], ctorParameters: () => [{ type: undefined, decorators: [{
16342
16342
  type: Inject,
@@ -16452,11 +16452,11 @@ const PLATFORM_SERVER_PROVIDERS = [
16452
16452
  * @publicApi
16453
16453
  */
16454
16454
  class ServerModule {
16455
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: ServerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
16456
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.0-next.2", ngImport: i0, type: ServerModule, exports: [BrowserModule] });
16457
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: ServerModule, providers: PLATFORM_SERVER_PROVIDERS, imports: [BrowserModule] });
16455
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.4", ngImport: i0, type: ServerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
16456
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.0-next.4", ngImport: i0, type: ServerModule, exports: [BrowserModule] });
16457
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.0-next.4", ngImport: i0, type: ServerModule, providers: PLATFORM_SERVER_PROVIDERS, imports: [BrowserModule] });
16458
16458
  }
16459
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: ServerModule, decorators: [{
16459
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.4", ngImport: i0, type: ServerModule, decorators: [{
16460
16460
  type: NgModule,
16461
16461
  args: [{
16462
16462
  exports: [BrowserModule],
@@ -16631,14 +16631,19 @@ function insertEventRecordScript(appId, doc, eventTypesToReplay, nonce) {
16631
16631
  }
16632
16632
  _stopMeasuring(measuringLabel);
16633
16633
  }
16634
- async function _render(platformRef, applicationRef) {
16635
- const measuringLabel = 'whenStable';
16636
- _startMeasuring(measuringLabel);
16637
- // Block until application is stable.
16638
- await applicationRef.whenStable();
16639
- _stopMeasuring(measuringLabel);
16634
+ /**
16635
+ * Renders an Angular application to a string.
16636
+ *
16637
+ * @private
16638
+ *
16639
+ * @param platformRef - Reference to the Angular platform.
16640
+ * @param applicationRef - Reference to the Angular application.
16641
+ * @returns A promise that resolves to the rendered string.
16642
+ */
16643
+ async function renderInternal(platformRef, applicationRef) {
16640
16644
  const platformState = platformRef.injector.get(PlatformState);
16641
16645
  prepareForHydration(platformState, applicationRef);
16646
+ appendServerContextInfo(applicationRef);
16642
16647
  // Run any BEFORE_APP_SERIALIZED callbacks just before rendering to string.
16643
16648
  const environmentInjector = applicationRef.injector;
16644
16649
  const callbacks = environmentInjector.get(BEFORE_APP_SERIALIZED, null);
@@ -16664,7 +16669,6 @@ async function _render(platformRef, applicationRef) {
16664
16669
  }
16665
16670
  }
16666
16671
  }
16667
- appendServerContextInfo(applicationRef);
16668
16672
  return platformState.renderToString();
16669
16673
  }
16670
16674
  /**
@@ -16716,7 +16720,12 @@ async function renderModule(moduleType, options) {
16716
16720
  try {
16717
16721
  const moduleRef = await platformRef.bootstrapModule(moduleType);
16718
16722
  const applicationRef = moduleRef.injector.get(ApplicationRef);
16719
- return await _render(platformRef, applicationRef);
16723
+ const measuringLabel = 'whenStable';
16724
+ _startMeasuring(measuringLabel);
16725
+ // Block until application is stable.
16726
+ await applicationRef.whenStable();
16727
+ _stopMeasuring(measuringLabel);
16728
+ return await renderInternal(platformRef, applicationRef);
16720
16729
  }
16721
16730
  finally {
16722
16731
  await asyncDestroyPlatform(platformRef);
@@ -16753,7 +16762,12 @@ async function renderApplication(bootstrap, options) {
16753
16762
  const applicationRef = await bootstrap();
16754
16763
  _stopMeasuring(bootstrapLabel);
16755
16764
  _startMeasuring(_renderLabel);
16756
- const rendered = await _render(platformRef, applicationRef);
16765
+ const measuringLabel = 'whenStable';
16766
+ _startMeasuring(measuringLabel);
16767
+ // Block until application is stable.
16768
+ await applicationRef.whenStable();
16769
+ _stopMeasuring(measuringLabel);
16770
+ const rendered = await renderInternal(platformRef, applicationRef);
16757
16771
  _stopMeasuring(_renderLabel);
16758
16772
  return rendered;
16759
16773
  }
@@ -16771,7 +16785,7 @@ async function renderApplication(bootstrap, options) {
16771
16785
  /**
16772
16786
  * @publicApi
16773
16787
  */
16774
- const VERSION = new Version('20.0.0-next.2');
16788
+ const VERSION = new Version('20.0.0-next.4');
16775
16789
 
16776
- export { BEFORE_APP_SERIALIZED, INITIAL_CONFIG, 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 };
16790
+ export { BEFORE_APP_SERIALIZED, INITIAL_CONFIG, 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 };
16777
16791
  //# sourceMappingURL=platform-server.mjs.map