@absolutejs/absolute 0.19.0-beta.844 → 0.19.0-beta.846

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.
Files changed (35) hide show
  1. package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
  2. package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
  3. package/dist/angular/index.js +29 -21
  4. package/dist/angular/index.js.map +10 -9
  5. package/dist/angular/server.js +29 -21
  6. package/dist/angular/server.js.map +10 -9
  7. package/dist/build.js +984 -508
  8. package/dist/build.js.map +16 -13
  9. package/dist/cli/index.js +547 -286
  10. package/dist/client/index.js +16 -9
  11. package/dist/client/index.js.map +6 -5
  12. package/dist/dev/client/handlers/angular.ts +309 -19
  13. package/dist/dev/client/handlers/angularRuntime.ts +468 -0
  14. package/dist/dev/client/hmrToast.ts +150 -0
  15. package/dist/index.js +1031 -555
  16. package/dist/index.js.map +17 -14
  17. package/dist/islands/index.js +16 -9
  18. package/dist/islands/index.js.map +6 -5
  19. package/dist/react/index.js +16 -9
  20. package/dist/react/index.js.map +6 -5
  21. package/dist/src/build/rewriteImports.d.ts +6 -14
  22. package/dist/src/build/rewriteImportsPlugin.d.ts +48 -0
  23. package/dist/src/dev/angular/editTypeDetection.d.ts +8 -0
  24. package/dist/src/dev/pathUtils.d.ts +3 -0
  25. package/dist/src/utils/buildDirectoryLock.d.ts +26 -3
  26. package/dist/src/utils/loadConfig.d.ts +5 -0
  27. package/dist/src/utils/resolveDevPort.d.ts +21 -0
  28. package/dist/src/utils/runtimeMode.d.ts +3 -0
  29. package/dist/svelte/index.js +16 -9
  30. package/dist/svelte/index.js.map +6 -5
  31. package/dist/types/build.d.ts +15 -0
  32. package/dist/types/globals.d.ts +12 -0
  33. package/dist/vue/index.js +16 -9
  34. package/dist/vue/index.js.map +6 -5
  35. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  var __require = import.meta.require;
3
3
 
4
- // .angular-partial-tmp-ZyPMt7/src/core/streamingSlotRegistrar.ts
4
+ // .angular-partial-tmp-0XSiIl/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-ZyPMt7/src/core/streamingSlotRegistrar.ts
4
+ // .angular-partial-tmp-0XSiIl/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-ZyPMt7/src/core/streamingSlotRegistry.ts
51
+ // .angular-partial-tmp-0XSiIl/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";
@@ -274,6 +274,9 @@ var resolveAngularPackageDir = (specifier) => {
274
274
  };
275
275
  var init_resolveAngularPackage = () => {};
276
276
 
277
+ // src/utils/runtimeMode.ts
278
+ var ENV_VAR = "NODE_ENV", isProductionRuntime = () => process.env[ENV_VAR] === "production", isDevelopmentRuntime = () => process.env[ENV_VAR] === "development";
279
+
277
280
  // src/angular/angularPatch.ts
278
281
  var exports_angularPatch = {};
279
282
  __export(exports_angularPatch, {
@@ -356,7 +359,8 @@ var ensureHead = (doc) => {
356
359
  }
357
360
  layoutPatchApplied = true;
358
361
  }, applyPatches = async () => {
359
- const { \u{275}DominoAdapter } = await import(resolveAngularRuntimePath("@angular/platform-server"));
362
+ const spec = isProductionRuntime() ? resolveAngularRuntimePath("@angular/platform-server") : "@angular/platform-server";
363
+ const { \u{275}DominoAdapter } = await import(spec);
360
364
  if (!\u{275}DominoAdapter?.prototype) {
361
365
  console.warn("[Angular Patch] \u0275DominoAdapter not found, skipping patches");
362
366
  return false;
@@ -423,18 +427,21 @@ var initDominoAdapter = (platformServer) => {
423
427
  console.error("Failed to initialize DominoAdapter:", err);
424
428
  }
425
429
  }, loadAngularDeps = async () => {
426
- if (true) {
427
- await import(resolveAngularRuntimePath("@angular/compiler"));
430
+ if (!isProductionRuntime()) {
431
+ await import("@angular/compiler");
428
432
  }
429
433
  const { applyPatches: applyPatches2 } = await Promise.resolve().then(() => (init_angularPatch(), exports_angularPatch));
430
434
  await applyPatches2();
435
+ const useBareSpecifiers = !isProductionRuntime();
431
436
  const [platformBrowser, platformServer, common, core] = await Promise.all([
432
- import(resolveAngularRuntimePath("@angular/platform-browser")),
433
- import(resolveAngularRuntimePath("@angular/platform-server")),
434
- import(resolveAngularRuntimePath("@angular/common")),
435
- import(resolveAngularRuntimePath("@angular/core"))
437
+ useBareSpecifiers ? import("@angular/platform-browser") : import(resolveAngularRuntimePath("@angular/platform-browser")),
438
+ useBareSpecifiers ? import("@angular/platform-server") : import(resolveAngularRuntimePath("@angular/platform-server")),
439
+ useBareSpecifiers ? import("@angular/common") : import(resolveAngularRuntimePath("@angular/common")),
440
+ useBareSpecifiers ? import("@angular/core") : import(resolveAngularRuntimePath("@angular/core"))
436
441
  ]);
437
- if (false) {}
442
+ if (!isDevelopmentRuntime()) {
443
+ core.enableProdMode();
444
+ }
438
445
  initDominoAdapter(platformServer);
439
446
  return {
440
447
  APP_BASE_HREF: common.APP_BASE_HREF,
@@ -3444,16 +3451,16 @@ var traceAngularPhase = async (name, fn, metadata) => {
3444
3451
  return fromNodeModules;
3445
3452
  return resolve5(import.meta.dir, "./dev/client");
3446
3453
  }, devClientDir, hmrClientPath, hmrRuntimePath, injectHMRRegistration = (content, sourceId) => {
3447
- const componentClassRegex = /(?:export\s+)?class\s+(\w+Component)\s/g;
3448
- const componentNames = [];
3454
+ const entityClassRegex = /(?:export\s+)?class\s+(\w+(?:Component|Service|Directive|Pipe))\s/g;
3455
+ const entityNames = [];
3449
3456
  let match;
3450
- while ((match = componentClassRegex.exec(content)) !== null) {
3457
+ while ((match = entityClassRegex.exec(content)) !== null) {
3451
3458
  if (match[1])
3452
- componentNames.push(match[1]);
3459
+ entityNames.push(match[1]);
3453
3460
  }
3454
- if (componentNames.length === 0)
3461
+ if (entityNames.length === 0)
3455
3462
  return content;
3456
- const registrations = componentNames.map((name) => ` if (typeof ${name} === 'function') window.__ANGULAR_HMR__.register('${sourceId}#${name}', ${name});`).join(`
3463
+ const registrations = entityNames.map((name) => ` if (typeof ${name} === 'function') window.__ANGULAR_HMR__.register('${sourceId}#${name}', ${name});`).join(`
3457
3464
  `);
3458
3465
  const hmrBlock = `
3459
3466
  // Angular HMR Runtime Layer (Level 3) \u2014 Auto-registration
@@ -14079,7 +14086,8 @@ init_angularDeps();
14079
14086
  init_resolveAngularPackage();
14080
14087
  var noopAnimationProvidersPromise = null;
14081
14088
  var loadNoopAnimationProviders = async () => {
14082
- const animations = await import(resolveAngularRuntimePath("@angular/platform-browser/animations"));
14089
+ const spec = isProductionRuntime() ? resolveAngularRuntimePath("@angular/platform-browser/animations") : "@angular/platform-browser/animations";
14090
+ const animations = await import(spec);
14083
14091
  return animations.provideNoopAnimations();
14084
14092
  };
14085
14093
  var buildServerAnimationProviders = (usesLegacyAnimations) => {
@@ -14128,7 +14136,8 @@ var buildRedirectEventHandler = (responseInit, routerModule) => {
14128
14136
  var buildRouterRedirectProviders = async (deps, responseInit) => {
14129
14137
  let routerModule;
14130
14138
  try {
14131
- routerModule = await import(resolveAngularRuntimePath("@angular/router"));
14139
+ const spec = isProductionRuntime() ? resolveAngularRuntimePath("@angular/router") : "@angular/router";
14140
+ routerModule = await import(spec);
14132
14141
  } catch {
14133
14142
  return [];
14134
14143
  }
@@ -14397,7 +14406,6 @@ var runWithStreamingSlotWarningScope = (task, metadata) => ensureWarningStorage(
14397
14406
  // src/angular/pageHandler.ts
14398
14407
  init_ssrCache();
14399
14408
  init_ssrRender();
14400
- init_resolveAngularPackage();
14401
14409
  var lastSelector = "angular-page";
14402
14410
  var isRecord5 = (value) => typeof value === "object" && value !== null;
14403
14411
  var isAngularComponent2 = (value) => typeof value === "function";
@@ -14418,10 +14426,10 @@ var resolvePageComponent = (pageModule) => {
14418
14426
  };
14419
14427
  var compilerImportPromise = null;
14420
14428
  var ensureAngularCompiler = () => {
14421
- if (false)
14422
- ;
14429
+ if (isProductionRuntime())
14430
+ return Promise.resolve();
14423
14431
  if (!compilerImportPromise) {
14424
- compilerImportPromise = import(resolveAngularRuntimePath("@angular/compiler"));
14432
+ compilerImportPromise = import("@angular/compiler");
14425
14433
  }
14426
14434
  return compilerImportPromise;
14427
14435
  };
@@ -14982,5 +14990,5 @@ export {
14982
14990
  ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER
14983
14991
  };
14984
14992
 
14985
- //# debugId=3A516C93259CE34264756E2164756E21
14993
+ //# debugId=E5F22015FF64AAA164756E2164756E21
14986
14994
  //# sourceMappingURL=index.js.map