@absolutejs/absolute 0.19.0-beta.1019 → 0.19.0-beta.1020

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,7 +1,7 @@
1
1
  // @bun
2
2
  var __require = import.meta.require;
3
3
 
4
- // .angular-partial-tmp-cSpZHM/src/core/streamingSlotRegistrar.ts
4
+ // .angular-partial-tmp-4WY08y/src/core/streamingSlotRegistrar.ts
5
5
  var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
6
6
  var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
7
7
  var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  var __require = import.meta.require;
3
3
 
4
- // .angular-partial-tmp-cSpZHM/src/core/streamingSlotRegistrar.ts
4
+ // .angular-partial-tmp-4WY08y/src/core/streamingSlotRegistrar.ts
5
5
  var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
6
6
  var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
7
7
  var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
@@ -48,7 +48,7 @@ var warnMissingStreamingSlotCollector = (primitiveName) => {
48
48
  getWarningController()?.maybeWarn(primitiveName);
49
49
  };
50
50
 
51
- // .angular-partial-tmp-cSpZHM/src/core/streamingSlotRegistry.ts
51
+ // .angular-partial-tmp-4WY08y/src/core/streamingSlotRegistry.ts
52
52
  var STREAMING_SLOT_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotAsyncLocalStorage");
53
53
  var isObjectRecord2 = (value) => Boolean(value) && typeof value === "object";
54
54
  var isAsyncLocalStorage = (value) => isObjectRecord2(value) && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function";
@@ -4497,9 +4497,11 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
4497
4497
  const pageInjectionForHash = providersInjection?.pagesByFile.get(resolvedEntry);
4498
4498
  const providersHashInput = providersInjection ? (() => {
4499
4499
  let providersSourceContent = "";
4500
- try {
4501
- providersSourceContent = readFileSync5(providersInjection.appProvidersSource, "utf-8");
4502
- } catch {}
4500
+ if (providersInjection.appProvidersSource) {
4501
+ try {
4502
+ providersSourceContent = readFileSync5(providersInjection.appProvidersSource, "utf-8");
4503
+ } catch {}
4504
+ }
4503
4505
  return JSON.stringify({
4504
4506
  basePath: pageInjectionForHash?.basePath ?? null,
4505
4507
  hasRoutes: pageInjectionForHash?.hasRoutes ?? false,
@@ -4536,20 +4538,22 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
4536
4538
  const pageInjection = providersInjection?.pagesByFile.get(resolvedEntry);
4537
4539
  rewritten = rewritten.replace(/\n\/\* __ABS_PROVIDERS_INJECTION_START \*\/[\s\S]*?\/\* __ABS_PROVIDERS_INJECTION_END \*\/\n?/g, "");
4538
4540
  if (providersInjection && pageInjection) {
4539
- const compiledAppProvidersPath = (() => {
4540
- const angularDirAbs = resolve6(outRoot);
4541
- const appSourceAbs = resolve6(providersInjection.appProvidersSource);
4542
- const rel = relative4(angularDirAbs, appSourceAbs).replace(/\\/g, "/");
4543
- return join7(compiledParent, rel).replace(/\.[cm]?[tj]sx?$/, ".js");
4544
- })();
4545
- const appProvidersSpec = (() => {
4546
- const rel = relative4(dirname4(rawServerFile), compiledAppProvidersPath).replace(/\\/g, "/");
4547
- return rel.startsWith(".") ? rel : `./${rel}`;
4548
- })();
4549
- const importLines = [
4550
- `import { appProviders as __abs_globalProviders } from "${appProvidersSpec}";`
4551
- ];
4552
- const fragments = ["...__abs_globalProviders"];
4541
+ const importLines = [];
4542
+ const fragments = [];
4543
+ if (providersInjection.appProvidersSource) {
4544
+ const compiledAppProvidersPath = (() => {
4545
+ const angularDirAbs = resolve6(outRoot);
4546
+ const appSourceAbs = resolve6(providersInjection.appProvidersSource);
4547
+ const rel = relative4(angularDirAbs, appSourceAbs).replace(/\\/g, "/");
4548
+ return join7(compiledParent, rel).replace(/\.[cm]?[tj]sx?$/, ".js");
4549
+ })();
4550
+ const appProvidersSpec = (() => {
4551
+ const rel = relative4(dirname4(rawServerFile), compiledAppProvidersPath).replace(/\\/g, "/");
4552
+ return rel.startsWith(".") ? rel : `./${rel}`;
4553
+ })();
4554
+ importLines.push(`import { appProviders as __abs_globalProviders } from "${appProvidersSpec}";`);
4555
+ fragments.push("...__abs_globalProviders");
4556
+ }
4553
4557
  if (pageInjection.hasRoutes) {
4554
4558
  importLines.push(`import { provideRouter as __abs_provideRouter, withComponentInputBinding as __abs_withComponentInputBinding, withViewTransitions as __abs_withViewTransitions } from "@angular/router";`);
4555
4559
  fragments.push("__abs_provideRouter(routes, __abs_withComponentInputBinding(), __abs_withViewTransitions())");
@@ -4558,13 +4562,15 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
4558
4562
  importLines.push(`import { APP_BASE_HREF as __abs_APP_BASE_HREF } from "@angular/common";`);
4559
4563
  fragments.push(`{ provide: __abs_APP_BASE_HREF, useValue: ${JSON.stringify(pageInjection.basePath)} }`);
4560
4564
  }
4561
- rewritten += `
4565
+ if (fragments.length > 0) {
4566
+ rewritten += `
4562
4567
  /* __ABS_PROVIDERS_INJECTION_START */
4563
4568
  ${importLines.join(`
4564
4569
  `)}
4565
4570
  export const providers = [${fragments.join(", ")}];
4566
4571
  /* __ABS_PROVIDERS_INJECTION_END */
4567
4572
  `;
4573
+ }
4568
4574
  }
4569
4575
  await traceAngularPhase("wrapper/write-server-output", () => fs.writeFile(rawServerFile, rewritten, "utf-8"), { entry: resolvedEntry });
4570
4576
  const relativePath = relative4(indexesDir, rawServerFile).replace(/\\/g, "/");
@@ -15448,5 +15454,5 @@ export {
15448
15454
  ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER
15449
15455
  };
15450
15456
 
15451
- //# debugId=63DB76F1411E86FD64756E2164756E21
15457
+ //# debugId=090E3ECBBEB6ACF464756E2164756E21
15452
15458
  //# sourceMappingURL=index.js.map