@absolutejs/absolute 0.19.0-beta.1030 → 0.19.0-beta.1032

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 (74) hide show
  1. package/dist/angular/browser.js +18 -16
  2. package/dist/angular/browser.js.map +5 -5
  3. package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
  4. package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
  5. package/dist/angular/hmrPreserveCore.ts +83 -118
  6. package/dist/angular/index.js +49 -49
  7. package/dist/angular/index.js.map +12 -12
  8. package/dist/angular/server.js +34 -34
  9. package/dist/angular/server.js.map +10 -10
  10. package/dist/build.js +135 -135
  11. package/dist/build.js.map +26 -26
  12. package/dist/cli/config/client.js +1 -1
  13. package/dist/cli/config/server.js +43 -43
  14. package/dist/cli/index.js +247 -168
  15. package/dist/client/index.js +9 -9
  16. package/dist/client/index.js.map +8 -8
  17. package/dist/dev/client/errorOverlay.ts +4 -4
  18. package/dist/dev/client/handlers/angularHmrShim.ts +17 -17
  19. package/dist/dev/client/handlers/angularRemount.ts +6 -4
  20. package/dist/dev/client/handlers/angularRemountWiring.ts +1 -1
  21. package/dist/dev/client/hmrToast.ts +18 -18
  22. package/dist/index.js +149 -150
  23. package/dist/index.js.map +31 -31
  24. package/dist/islands/browser.js.map +1 -1
  25. package/dist/islands/index.js +5 -5
  26. package/dist/islands/index.js.map +6 -6
  27. package/dist/react/browser.js.map +1 -1
  28. package/dist/react/components/index.js +2 -2
  29. package/dist/react/components/index.js.map +3 -3
  30. package/dist/react/hooks/index.js.map +1 -1
  31. package/dist/react/index.js +21 -21
  32. package/dist/react/index.js.map +9 -9
  33. package/dist/react/server.js +17 -17
  34. package/dist/react/server.js.map +5 -5
  35. package/dist/src/angular/hmrPreserveCore.d.ts +5 -18
  36. package/dist/src/angular/islands.d.ts +1 -1
  37. package/dist/src/cli/config/packageJson/editPackageJson.d.ts +2 -2
  38. package/dist/src/cli/config/schema/fromJsonSchema.d.ts +1 -1
  39. package/dist/src/client/hydrators/react.d.ts +1 -1
  40. package/dist/src/client/hydrators/svelte.d.ts +1 -1
  41. package/dist/src/client/hydrators/vue.d.ts +1 -1
  42. package/dist/src/client/islandStore.d.ts +3 -3
  43. package/dist/src/core/devRouteRegistrationCallsite.d.ts +1 -5
  44. package/dist/src/dev/angular/fastHmrCompiler.d.ts +2 -2
  45. package/dist/src/dev/angular/hmrCompiler.d.ts +1 -1
  46. package/dist/src/dev/angular/resolveOwningComponents.d.ts +1 -1
  47. package/dist/src/svelte/router/hashMode.d.ts +1 -6
  48. package/dist/src/svelte/router/matchPath.d.ts +2 -22
  49. package/dist/src/svelte/router/page.svelte.d.ts +1 -10
  50. package/dist/src/svelte/router/prefetchCache.d.ts +2 -6
  51. package/dist/src/utils/generatedDir.d.ts +1 -1
  52. package/dist/src/utils/inlinePageCss.d.ts +1 -3
  53. package/dist/src/utils/jsonLd.d.ts +1 -1
  54. package/dist/src/utils/loadConfig.d.ts +2 -3
  55. package/dist/src/utils/resolveConvention.d.ts +1 -1
  56. package/dist/src/utils/runtimeMode.d.ts +1 -1
  57. package/dist/src/vue/defineVuePage.d.ts +1 -11
  58. package/dist/svelte/browser.js.map +1 -1
  59. package/dist/svelte/index.js +26 -26
  60. package/dist/svelte/index.js.map +9 -9
  61. package/dist/svelte/router/hashMode.ts +6 -12
  62. package/dist/svelte/router/matchPath.ts +23 -45
  63. package/dist/svelte/router/page.d.ts +1 -10
  64. package/dist/svelte/router/page.js +6 -6
  65. package/dist/svelte/router/prefetchCache.ts +12 -20
  66. package/dist/svelte/server.js +22 -22
  67. package/dist/svelte/server.js.map +5 -5
  68. package/dist/vue/browser.js +2 -2
  69. package/dist/vue/browser.js.map +4 -4
  70. package/dist/vue/index.js +29 -29
  71. package/dist/vue/index.js.map +11 -11
  72. package/dist/vue/server.js +24 -24
  73. package/dist/vue/server.js.map +6 -6
  74. package/package.json +38 -38
package/dist/build.js CHANGED
@@ -1867,7 +1867,7 @@ var resolveAngularPackageDir = (specifier) => {
1867
1867
  var init_resolveAngularPackage = () => {};
1868
1868
 
1869
1869
  // src/utils/runtimeMode.ts
1870
- var ENV_VAR = "NODE_ENV", isProductionRuntime = () => process.env[ENV_VAR] === "production", isDevelopmentRuntime = () => process.env[ENV_VAR] === "development";
1870
+ var ENV_VAR = "NODE_ENV", isDevelopmentRuntime = () => process.env[ENV_VAR] === "development", isProductionRuntime = () => process.env[ENV_VAR] === "production";
1871
1871
 
1872
1872
  // src/angular/angularPatch.ts
1873
1873
  var exports_angularPatch = {};
@@ -2245,7 +2245,7 @@ __export(exports_islands, {
2245
2245
  isAngularComponent: () => isAngularComponent,
2246
2246
  getAngularIslandSelector: () => getAngularIslandSelector
2247
2247
  });
2248
- var angularIslandSelector = "abs-angular-island", isAngularComponent = (value) => typeof value === "function", getAngularIslandSelector = (_islandId) => angularIslandSelector, getSelectorFromRenderedIsland = (rootElement) => {
2248
+ var angularIslandSelector = "abs-angular-island", getAngularIslandSelector = (_islandId) => angularIslandSelector, isAngularComponent = (value) => typeof value === "function", getSelectorFromRenderedIsland = (rootElement) => {
2249
2249
  const firstChild = rootElement.firstElementChild;
2250
2250
  if (!(firstChild instanceof HTMLElement)) {
2251
2251
  return null;
@@ -3742,8 +3742,8 @@ var ISLAND_COMPONENT_ID_LENGTH = 8, serverCacheRoot3, compiledModuleCache3, tran
3742
3742
  const compiledScript = hasScript ? compiler.compileScript(descriptor, {
3743
3743
  fs: {
3744
3744
  fileExists: existsSync5,
3745
- readFile: (file) => existsSync5(file) ? readFileSync4(file, "utf-8") : undefined,
3746
- realpath: realpathSync
3745
+ realpath: realpathSync,
3746
+ readFile: (file) => existsSync5(file) ? readFileSync4(file, "utf-8") : undefined
3747
3747
  },
3748
3748
  id: componentId,
3749
3749
  inlineTemplate: false
@@ -4408,6 +4408,12 @@ import { Elysia } from "elysia";
4408
4408
  var ROUTE_CALLSITE_STORAGE_KEY, ROUTE_CALLSITE_PATCHED_KEY, ROUTE_METHOD_NAMES, PAGE_HANDLER_NAMES, pageHandlerWrappers, handlerSourceMentionsPageHelper = (handler) => {
4409
4409
  const source = handler.toString();
4410
4410
  return PAGE_HANDLER_NAMES.some((name) => source.includes(name));
4411
+ }, getOriginalPageHandlerSource = (handler) => {
4412
+ if (typeof handler !== "function")
4413
+ return;
4414
+ const fn = handler;
4415
+ const info = pageHandlerWrappers.get(fn);
4416
+ return (info?.originalHandler ?? fn).toString();
4411
4417
  }, isPageHandler = (handler) => {
4412
4418
  if (typeof handler !== "function")
4413
4419
  return false;
@@ -4415,12 +4421,6 @@ var ROUTE_CALLSITE_STORAGE_KEY, ROUTE_CALLSITE_PATCHED_KEY, ROUTE_METHOD_NAMES,
4415
4421
  if (pageHandlerWrappers.has(fn))
4416
4422
  return true;
4417
4423
  return handlerSourceMentionsPageHelper(fn);
4418
- }, getOriginalPageHandlerSource = (handler) => {
4419
- if (typeof handler !== "function")
4420
- return;
4421
- const fn = handler;
4422
- const info = pageHandlerWrappers.get(fn);
4423
- return (info?.originalHandler ?? fn).toString();
4424
4424
  }, isObjectRecord = (value) => Boolean(value) && typeof value === "object", isAsyncLocalStorage = (value) => isObjectRecord(value) && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function", isRouteMethod = (value) => typeof value === "function", getRouteCallsiteStorage = () => {
4425
4425
  const value = Reflect.get(globalThis, ROUTE_CALLSITE_STORAGE_KEY);
4426
4426
  if (value === null || typeof value === "undefined") {
@@ -4529,7 +4529,7 @@ var DYNAMIC_SEGMENT_PATTERN, pathHasDynamic = (path) => path.split("/").some((se
4529
4529
  return null;
4530
4530
  }, readPropertyKey = (property) => {
4531
4531
  if (ts3.isPropertyAssignment(property)) {
4532
- const name = property.name;
4532
+ const { name } = property;
4533
4533
  if (ts3.isIdentifier(name) || ts3.isStringLiteral(name))
4534
4534
  return name.text;
4535
4535
  }
@@ -4740,7 +4740,7 @@ var DYNAMIC_SEGMENT_PATTERN2, pathHasDynamic2 = (path) => path.split("/").some((
4740
4740
  return null;
4741
4741
  }, readPropertyKey2 = (property) => {
4742
4742
  if (ts4.isPropertyAssignment(property)) {
4743
- const name = property.name;
4743
+ const { name } = property;
4744
4744
  if (ts4.isIdentifier(name) || ts4.isStringLiteral(name))
4745
4745
  return name.text;
4746
4746
  }
@@ -5054,7 +5054,7 @@ var DYNAMIC_SEGMENT_PATTERN4, pathHasDynamic4 = (path) => path.split("/").some((
5054
5054
  return null;
5055
5055
  }, readPropertyKey3 = (property) => {
5056
5056
  if (ts5.isPropertyAssignment(property)) {
5057
- const name = property.name;
5057
+ const { name } = property;
5058
5058
  if (ts5.isIdentifier(name) || ts5.isStringLiteral(name))
5059
5059
  return name.text;
5060
5060
  }
@@ -10806,6 +10806,7 @@ var DEFAULT_DEVICE_SIZES, DEFAULT_IMAGE_SIZES, DEFAULT_QUALITY, OPTIMIZATION_END
10806
10806
  case "webp":
10807
10807
  return pipeline.webp({ quality }).toBuffer();
10808
10808
  }
10809
+ throw new Error(`Unsupported image format: ${format}`);
10809
10810
  }, optimizeWithSharp = async (sharpRef, buffer, width, quality, format) => {
10810
10811
  const pipeline = sharpRef(buffer).rotate().resize(width, undefined, { withoutEnlargement: true });
10811
10812
  switch (format) {
@@ -10821,6 +10822,7 @@ var DEFAULT_DEVICE_SIZES, DEFAULT_IMAGE_SIZES, DEFAULT_QUALITY, OPTIMIZATION_END
10821
10822
  case "webp":
10822
10823
  return pipeline.webp({ quality }).toBuffer();
10823
10824
  }
10825
+ throw new Error(`Unsupported image format: ${format}`);
10824
10826
  }, optimizeImage = async (buffer, width, quality, format) => {
10825
10827
  const input = toBuffer(buffer);
10826
10828
  try {
@@ -11715,7 +11717,7 @@ var ENTITY_DECORATOR_RE, IMPORT_RE, TOP_LEVEL_DECL_RE, extractAllTopLevelNames =
11715
11717
  const { generatedAngularRoot, userAngularRoot, projectRoot } = params;
11716
11718
  const normalizedGenRoot = resolve16(generatedAngularRoot).replace(/\\/g, "/");
11717
11719
  const normalizedPath = componentJsAbsPath.replace(/\\/g, "/");
11718
- if (!normalizedPath.startsWith(normalizedGenRoot + "/"))
11720
+ if (!normalizedPath.startsWith(`${normalizedGenRoot}/`))
11719
11721
  return;
11720
11722
  const seen = new Set;
11721
11723
  const classNames = [];
@@ -11742,8 +11744,8 @@ var ENTITY_DECORATOR_RE, IMPORT_RE, TOP_LEVEL_DECL_RE, extractAllTopLevelNames =
11742
11744
  const depsBlock = classNames.length > 0 && depsKeys ? `
11743
11745
 
11744
11746
  // absolutejs HMR \u2014 Tier 1a class-deps registry
11745
- ` + classNames.map((c) => `try { ${c}.__abs_deps = { ${depsKeys} }; } catch {}`).join(`
11746
- `) + `
11747
+ ${classNames.map((c) => `try { ${c}.__abs_deps = { ${depsKeys} }; } catch {}`).join(`
11748
+ `)}
11747
11749
  ` : "";
11748
11750
  return jsSource + tail + depsBlock;
11749
11751
  }, createAngularHmrInjectionPlugin = (params) => ({
@@ -11793,7 +11795,7 @@ __export(exports_generatedDir, {
11793
11795
  getFrameworkGeneratedDir: () => getFrameworkGeneratedDir
11794
11796
  });
11795
11797
  import { join as join21 } from "path";
11796
- var GENERATED_DIR_NAME = "generated", ABSOLUTE_CACHE_DIR_NAME = ".absolutejs", getGeneratedRoot = (projectRoot = process.cwd()) => join21(projectRoot, ABSOLUTE_CACHE_DIR_NAME, GENERATED_DIR_NAME), getFrameworkGeneratedDir = (framework, projectRoot = process.cwd()) => join21(getGeneratedRoot(projectRoot), framework);
11798
+ var GENERATED_DIR_NAME = "generated", ABSOLUTE_CACHE_DIR_NAME = ".absolutejs", getFrameworkGeneratedDir = (framework, projectRoot = process.cwd()) => join21(getGeneratedRoot(projectRoot), framework), getGeneratedRoot = (projectRoot = process.cwd()) => join21(projectRoot, ABSOLUTE_CACHE_DIR_NAME, GENERATED_DIR_NAME);
11797
11799
  var init_generatedDir = () => {};
11798
11800
 
11799
11801
  // src/utils/cleanup.ts
@@ -11907,7 +11909,7 @@ var heldLocks, HELD_LOCKS_ENV = "ABSOLUTE_HELD_BUILD_DIRECTORY_LOCKS", exitHandl
11907
11909
  process.kill(pid, 0);
11908
11910
  return true;
11909
11911
  } catch (err) {
11910
- const code = err.code;
11912
+ const { code } = err;
11911
11913
  if (code === "ESRCH")
11912
11914
  return false;
11913
11915
  if (code === "EPERM")
@@ -16514,8 +16516,9 @@ var fail = (reason, detail, location) => ({
16514
16516
  if (a.schemasSig !== b2.schemasSig)
16515
16517
  return false;
16516
16518
  return true;
16517
- }, recordFingerprint = (id, fp) => {
16518
- fingerprintCache.set(id, fp);
16519
+ }, invalidateFingerprintCache = () => {
16520
+ fingerprintCache.clear();
16521
+ entityFingerprintCache.clear();
16519
16522
  }, primeComponentFingerprint = async (componentFilePath) => {
16520
16523
  let source;
16521
16524
  try {
@@ -16578,9 +16581,8 @@ var fail = (reason, detail, location) => ({
16578
16581
  } catch {}
16579
16582
  }
16580
16583
  }
16581
- }, invalidateFingerprintCache = () => {
16582
- fingerprintCache.clear();
16583
- entityFingerprintCache.clear();
16584
+ }, recordFingerprint = (id, fp) => {
16585
+ fingerprintCache.set(id, fp);
16584
16586
  }, entityFingerprintCache, entityFingerprintsEqual = (a, b2) => {
16585
16587
  if (a.className !== b2.className)
16586
16588
  return false;
@@ -16640,13 +16642,13 @@ var fail = (reason, detail, location) => ({
16640
16642
  break;
16641
16643
  }
16642
16644
  return {
16645
+ arrowFieldSig: extractArrowFieldSig(cls),
16643
16646
  className,
16644
- decoratorArgsText,
16645
16647
  ctorParamTypes,
16646
- topLevelImports: extractTopLevelImports(sourceFile),
16648
+ decoratorArgsText,
16647
16649
  memberDecoratorSig: extractMemberDecoratorSig(cls),
16648
- arrowFieldSig: extractArrowFieldSig(cls),
16649
- propertyFieldNames: extractPropertyFieldNames(cls)
16650
+ propertyFieldNames: extractPropertyFieldNames(cls),
16651
+ topLevelImports: extractTopLevelImports(sourceFile)
16650
16652
  };
16651
16653
  }, findClassDeclaration = (sourceFile, className) => {
16652
16654
  let found = null;
@@ -16791,7 +16793,7 @@ var fail = (reason, detail, location) => ({
16791
16793
  continue;
16792
16794
  if (member.modifiers?.some((m) => m.kind === ts15.SyntaxKind.StaticKeyword))
16793
16795
  continue;
16794
- const name = member.name;
16796
+ const { name } = member;
16795
16797
  if (name === undefined)
16796
16798
  continue;
16797
16799
  const nameText = ts15.isIdentifier(name) ? name.text : name.getText();
@@ -16910,10 +16912,10 @@ var fail = (reason, detail, location) => ({
16910
16912
  return {
16911
16913
  classPropertyName,
16912
16914
  meta: {
16913
- classPropertyName,
16914
16915
  bindingPropertyName,
16915
- required,
16916
+ classPropertyName,
16916
16917
  isSignal: false,
16918
+ required,
16917
16919
  transformFunction
16918
16920
  }
16919
16921
  };
@@ -16953,10 +16955,10 @@ var fail = (reason, detail, location) => ({
16953
16955
  return {
16954
16956
  classPropertyName,
16955
16957
  meta: {
16956
- classPropertyName,
16957
16958
  bindingPropertyName,
16958
- required,
16959
+ classPropertyName,
16959
16960
  isSignal: true,
16961
+ required,
16960
16962
  transformFunction
16961
16963
  }
16962
16964
  };
@@ -16974,7 +16976,7 @@ var fail = (reason, detail, location) => ({
16974
16976
  const arg = expr.arguments[0];
16975
16977
  if (arg && ts15.isStringLiteral(arg))
16976
16978
  bindingName = arg.text;
16977
- return { classPropertyName, bindingName };
16979
+ return { bindingName, classPropertyName };
16978
16980
  }
16979
16981
  return null;
16980
16982
  }, isOutputSignalCall = (init) => {
@@ -16999,7 +17001,7 @@ var fail = (reason, detail, location) => ({
16999
17001
  if (aliasNode !== null)
17000
17002
  bindingName = aliasNode;
17001
17003
  }
17002
- return { classPropertyName, bindingName };
17004
+ return { bindingName, classPropertyName };
17003
17005
  }, extractInputsAndOutputs = (cls, compiler) => {
17004
17006
  const inputs = {};
17005
17007
  const outputs = {};
@@ -17032,7 +17034,7 @@ var fail = (reason, detail, location) => ({
17032
17034
  hasSignalIO = true;
17033
17035
  }
17034
17036
  }
17035
- return { inputs, outputs, hasDecoratorIO, hasSignalIO };
17037
+ return { hasDecoratorIO, hasSignalIO, inputs, outputs };
17036
17038
  }, ATTR_BINDING_RE, EVENT_BINDING_RE, emptyHost = () => ({
17037
17039
  attributes: {},
17038
17040
  listeners: {},
@@ -17097,7 +17099,7 @@ var fail = (reason, detail, location) => ({
17097
17099
  continue;
17098
17100
  const event = eventArg.text;
17099
17101
  const argsArg = expr.arguments[1];
17100
- let argsList = [];
17102
+ const argsList = [];
17101
17103
  if (argsArg && ts15.isArrayLiteralExpression(argsArg)) {
17102
17104
  for (const el of argsArg.elements) {
17103
17105
  if (ts15.isStringLiteral(el))
@@ -17118,7 +17120,7 @@ var fail = (reason, detail, location) => ({
17118
17120
  descendants = getBooleanProperty(opts, "descendants") ?? true;
17119
17121
  emitDistinctChangesOnly = getBooleanProperty(opts, "emitDistinctChangesOnly") ?? true;
17120
17122
  }
17121
- return { static_, descendants, emitDistinctChangesOnly };
17123
+ return { descendants, emitDistinctChangesOnly, static_ };
17122
17124
  }, queryPredicateFromArg = (arg, compiler) => {
17123
17125
  if (ts15.isStringLiteral(arg)) {
17124
17126
  return arg.text.split(",").map((s2) => s2.trim()).filter(Boolean);
@@ -17158,14 +17160,14 @@ var fail = (reason, detail, location) => ({
17158
17160
  }
17159
17161
  }
17160
17162
  const meta = {
17161
- propertyName,
17162
- first: fn2.text === "ViewChild" || fn2.text === "ContentChild",
17163
- predicate,
17164
17163
  descendants,
17165
17164
  emitDistinctChangesOnly,
17165
+ first: fn2.text === "ViewChild" || fn2.text === "ContentChild",
17166
+ isSignal: false,
17167
+ predicate,
17168
+ propertyName,
17166
17169
  read,
17167
- static: static_,
17168
- isSignal: false
17170
+ static: static_
17169
17171
  };
17170
17172
  if (fn2.text === "ViewChild" || fn2.text === "ViewChildren") {
17171
17173
  viewQueries.push(meta);
@@ -17181,7 +17183,7 @@ var fail = (reason, detail, location) => ({
17181
17183
  for (const member of cls.members) {
17182
17184
  if (!ts15.isPropertyDeclaration(member) || !member.initializer)
17183
17185
  continue;
17184
- let init = member.initializer;
17186
+ const init = member.initializer;
17185
17187
  if (!ts15.isCallExpression(init))
17186
17188
  continue;
17187
17189
  let queryName;
@@ -17212,14 +17214,14 @@ var fail = (reason, detail, location) => ({
17212
17214
  read = new compiler.WrappedNodeExpr(readNode);
17213
17215
  }
17214
17216
  const meta = {
17215
- propertyName,
17216
- first: runtime.first,
17217
- predicate,
17218
17217
  descendants,
17219
17218
  emitDistinctChangesOnly: true,
17219
+ first: runtime.first,
17220
+ isSignal: true,
17221
+ predicate,
17222
+ propertyName,
17220
17223
  read,
17221
- static: false,
17222
- isSignal: true
17224
+ static: false
17223
17225
  };
17224
17226
  if (runtime.isView)
17225
17227
  viewQueries.push(meta);
@@ -17252,11 +17254,11 @@ var fail = (reason, detail, location) => ({
17252
17254
  if (ts15.isIdentifier(el)) {
17253
17255
  out.push({
17254
17256
  directive: {
17255
- value: new compiler.WrappedNodeExpr(el),
17256
- type: new compiler.WrappedNodeExpr(el)
17257
+ type: new compiler.WrappedNodeExpr(el),
17258
+ value: new compiler.WrappedNodeExpr(el)
17257
17259
  },
17258
- isForwardReference: false,
17259
17260
  inputs: null,
17261
+ isForwardReference: false,
17260
17262
  outputs: null
17261
17263
  });
17262
17264
  continue;
@@ -17283,11 +17285,11 @@ var fail = (reason, detail, location) => ({
17283
17285
  };
17284
17286
  out.push({
17285
17287
  directive: {
17286
- value: new compiler.WrappedNodeExpr(directiveNode),
17287
- type: new compiler.WrappedNodeExpr(directiveNode)
17288
+ type: new compiler.WrappedNodeExpr(directiveNode),
17289
+ value: new compiler.WrappedNodeExpr(directiveNode)
17288
17290
  },
17289
- isForwardReference: false,
17290
17291
  inputs: collectMap(inputsNode),
17292
+ isForwardReference: false,
17291
17293
  outputs: collectMap(outputsNode)
17292
17294
  });
17293
17295
  }
@@ -17313,14 +17315,14 @@ var fail = (reason, detail, location) => ({
17313
17315
  const animationsNode = getProperty(decoratorArgs, "animations");
17314
17316
  const animations = animationsNode ? new compiler.WrappedNodeExpr(animationsNode) : null;
17315
17317
  return {
17316
- host,
17318
+ animations,
17317
17319
  contentQueries,
17318
- viewQueries,
17319
17320
  exportAs: extractExportAs(decoratorArgs),
17321
+ host,
17322
+ hostDirectives: extractHostDirectives(decoratorArgs, compiler),
17320
17323
  providers,
17321
17324
  viewProviders,
17322
- animations,
17323
- hostDirectives: extractHostDirectives(decoratorArgs, compiler)
17325
+ viewQueries
17324
17326
  };
17325
17327
  }, childComponentInfoCache, getChildComponentInfoFromTsSource = (filePath, className) => {
17326
17328
  const cacheKey2 = `ts:${filePath}:${className}`;
@@ -17768,7 +17770,7 @@ var fail = (reason, detail, location) => ({
17768
17770
  const spec = moduleSpec.text;
17769
17771
  if (!spec.startsWith(".") && !spec.startsWith("/"))
17770
17772
  continue;
17771
- const importClause = stmt.importClause;
17773
+ const { importClause } = stmt;
17772
17774
  if (!importClause)
17773
17775
  continue;
17774
17776
  let matches = false;
@@ -17829,7 +17831,7 @@ var fail = (reason, detail, location) => ({
17829
17831
  if (!ts15.isPropertyDeclaration(member) && !ts15.isMethodDeclaration(member) && !ts15.isGetAccessorDeclaration(member) && !ts15.isSetAccessorDeclaration(member)) {
17830
17832
  continue;
17831
17833
  }
17832
- const name = member.name;
17834
+ const { name } = member;
17833
17835
  if (name === undefined)
17834
17836
  continue;
17835
17837
  const text = ts15.isIdentifier(name) ? name.text : ts15.isStringLiteral(name) || ts15.isNoSubstitutionTemplateLiteral(name) ? name.text : name.getText();
@@ -18052,10 +18054,10 @@ ${transpiled}
18052
18054
  for (const url of urls) {
18053
18055
  const css = resolveAndReadStyleResource(componentDir, url);
18054
18056
  if (css === null)
18055
- return { styles, missing: url };
18057
+ return { missing: url, styles };
18056
18058
  styles.push(css);
18057
18059
  }
18058
- return { styles, missing: null };
18060
+ return { missing: null, styles };
18059
18061
  }, buildSimpleEntityModule = (classNode, className) => {
18060
18062
  const block = buildFreshClassMethodsBlock(classNode, className);
18061
18063
  if (!block) {
@@ -18189,9 +18191,9 @@ ${block}
18189
18191
  const lineTextValue = typeof lineIndex === "number" && lineIndex >= 0 ? templateText.split(/\r?\n/)[lineIndex] ?? undefined : undefined;
18190
18192
  return fail("template-parse-error", parsed.errors.map((e) => e.toString()).join(`
18191
18193
  `), {
18194
+ column: typeof colIndex === "number" ? colIndex + 1 : undefined,
18192
18195
  file: templatePath,
18193
18196
  line: typeof lineIndex === "number" ? lineIndex + 1 : undefined,
18194
- column: typeof colIndex === "number" ? colIndex + 1 : undefined,
18195
18197
  lineText: lineTextValue
18196
18198
  });
18197
18199
  }
@@ -18219,44 +18221,44 @@ ${block}
18219
18221
  type: new compiler.WrappedNodeExpr(entry.identifier)
18220
18222
  }));
18221
18223
  const meta = {
18222
- name: className,
18223
- type: { value: wrappedClass, type: wrappedClass },
18224
- typeArgumentCount: 0,
18225
- typeSourceSpan,
18224
+ animations: advancedMetadata.animations,
18225
+ changeDetection: decoratorMeta.changeDetection,
18226
+ controlCreate: extractControlCreate(classNode),
18227
+ declarationListEmitMode: declarations.length > 0 ? 1 : 0,
18228
+ declarations,
18229
+ defer: { dependenciesFn: null, mode: 1 },
18226
18230
  deps: null,
18227
- selector: decoratorMeta.selector,
18228
- queries: advancedMetadata.contentQueries,
18229
- viewQueries: advancedMetadata.viewQueries,
18231
+ encapsulation: decoratorMeta.encapsulation,
18232
+ exportAs: advancedMetadata.exportAs,
18233
+ hasDirectiveDependencies: declarations.length > 0,
18230
18234
  host: advancedMetadata.host,
18235
+ hostDirectives: advancedMetadata.hostDirectives,
18236
+ i18nUseExternalIds: projectDefaults.i18nUseExternalIds ?? false,
18237
+ inputs,
18238
+ isSignal: (hasSignalIO || advancedMetadata.contentQueries.some((q2) => q2.isSignal) || advancedMetadata.viewQueries.some((q2) => q2.isSignal)) && !hasDecoratorIO && !advancedMetadata.contentQueries.some((q2) => !q2.isSignal) && !advancedMetadata.viewQueries.some((q2) => !q2.isSignal),
18239
+ isStandalone: decoratorMeta.standalone,
18231
18240
  lifecycle: {
18232
18241
  usesOnChanges: classNode.members.some((m) => ts15.isMethodDeclaration(m) && m.name !== undefined && ts15.isIdentifier(m.name) && m.name.text === "ngOnChanges")
18233
18242
  },
18234
- inputs,
18243
+ name: className,
18235
18244
  outputs,
18236
- usesInheritance: false,
18237
- controlCreate: extractControlCreate(classNode),
18238
- exportAs: advancedMetadata.exportAs,
18239
18245
  providers: advancedMetadata.providers,
18240
- isStandalone: decoratorMeta.standalone,
18241
- isSignal: (hasSignalIO || advancedMetadata.contentQueries.some((q2) => q2.isSignal) || advancedMetadata.viewQueries.some((q2) => q2.isSignal)) && !hasDecoratorIO && !advancedMetadata.contentQueries.some((q2) => !q2.isSignal) && !advancedMetadata.viewQueries.some((q2) => !q2.isSignal),
18242
- hostDirectives: advancedMetadata.hostDirectives,
18246
+ queries: advancedMetadata.contentQueries,
18247
+ relativeContextFilePath: projectRelPath,
18248
+ relativeTemplatePath: null,
18249
+ selector: decoratorMeta.selector,
18250
+ styles,
18243
18251
  template: {
18244
- nodes: parsed.nodes,
18245
18252
  ngContentSelectors: parsed.ngContentSelectors ?? [],
18253
+ nodes: parsed.nodes,
18246
18254
  preserveWhitespaces: decoratorMeta.preserveWhitespaces
18247
18255
  },
18248
- declarations,
18249
- defer: { dependenciesFn: null, mode: 1 },
18250
- declarationListEmitMode: declarations.length > 0 ? 1 : 0,
18251
- styles,
18252
- encapsulation: decoratorMeta.encapsulation,
18253
- animations: advancedMetadata.animations,
18256
+ type: { type: wrappedClass, value: wrappedClass },
18257
+ typeArgumentCount: 0,
18258
+ typeSourceSpan,
18259
+ usesInheritance: false,
18254
18260
  viewProviders: advancedMetadata.viewProviders,
18255
- relativeContextFilePath: projectRelPath,
18256
- i18nUseExternalIds: projectDefaults.i18nUseExternalIds ?? false,
18257
- changeDetection: decoratorMeta.changeDetection,
18258
- relativeTemplatePath: null,
18259
- hasDirectiveDependencies: declarations.length > 0
18261
+ viewQueries: advancedMetadata.viewQueries
18260
18262
  };
18261
18263
  let compiled;
18262
18264
  try {
@@ -18264,20 +18266,20 @@ ${block}
18264
18266
  const bindingParser = compiler.makeBindingParser();
18265
18267
  compiled = compiler.compileComponentFromMetadata(meta, pool, bindingParser);
18266
18268
  const namespaceDependencies = [
18267
- { moduleName: "@angular/core", assignedName: "\u0275hmr0" }
18269
+ { assignedName: "\u0275hmr0", moduleName: "@angular/core" }
18268
18270
  ];
18269
18271
  const callback = compiler.compileHmrUpdateCallback([
18270
18272
  {
18271
- name: "\u0275cmp",
18272
18273
  initializer: compiled.expression,
18274
+ name: "\u0275cmp",
18273
18275
  statements: compiled.statements ?? []
18274
18276
  }
18275
18277
  ], pool.statements, {
18276
- type: wrappedClass,
18277
18278
  className,
18278
18279
  filePath: projectRelPath,
18280
+ localDependencies: [],
18279
18281
  namespaceDependencies,
18280
- localDependencies: []
18282
+ type: wrappedClass
18281
18283
  });
18282
18284
  const namespaceMap = new Map;
18283
18285
  for (const dep of namespaceDependencies) {
@@ -18380,7 +18382,7 @@ ${block}
18380
18382
  if (fnOpeningIdx >= 0 && (methodsBlock || depsDestructure)) {
18381
18383
  const insertAt = fnOpeningIdx + fnOpening.length;
18382
18384
  moduleText = moduleText.slice(0, insertAt) + depsDestructure + (methodsBlock ? `
18383
- ` + methodsBlock + `
18385
+ ${methodsBlock}
18384
18386
  ` : "") + moduleText.slice(insertAt);
18385
18387
  }
18386
18388
  if (methodsBlock) {
@@ -18448,10 +18450,10 @@ var init_fastHmrCompiler = __esm(() => {
18448
18450
  "ContentChildren"
18449
18451
  ]);
18450
18452
  SIGNAL_QUERY_TO_RUNTIME = {
18451
- viewChild: { isView: true, first: true },
18452
- viewChildren: { isView: true, first: false },
18453
- contentChild: { isView: false, first: true },
18454
- contentChildren: { isView: false, first: false }
18453
+ contentChild: { first: true, isView: false },
18454
+ contentChildren: { first: false, isView: false },
18455
+ viewChild: { first: true, isView: true },
18456
+ viewChildren: { first: false, isView: true }
18455
18457
  };
18456
18458
  childComponentInfoCache = new Map;
18457
18459
  INPUT_OUTPUT_DECORATORS = new Set(["Input", "Output"]);
@@ -20036,7 +20038,7 @@ ${content.slice(firstUseIdx)}`;
20036
20038
  };
20037
20039
  const tracePhase = async (name, fn2, metadata) => {
20038
20040
  if (!traceEnabled)
20039
- return await fn2();
20041
+ return fn2();
20040
20042
  const phaseStart = performance.now();
20041
20043
  try {
20042
20044
  const result = await fn2();
@@ -21312,7 +21314,7 @@ ${content.slice(firstUseIdx)}`;
21312
21314
  }, build = async (config) => {
21313
21315
  const projectRoot = cwd();
21314
21316
  const buildPath = validateSafePath(config.buildDirectory ?? "build", projectRoot);
21315
- return await withBuildDirectoryLock(buildPath, () => buildUnlocked(config));
21317
+ return withBuildDirectoryLock(buildPath, () => buildUnlocked(config));
21316
21318
  };
21317
21319
  var init_build = __esm(() => {
21318
21320
  init_constants();
@@ -22016,7 +22018,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
22016
22018
  for (const ref of refs) {
22017
22019
  const refAbs = normalizePath(resolve28(componentDir, ref));
22018
22020
  const refDir = normalizePath(dirname19(refAbs));
22019
- if (refDir === angularRootNormalized || refDir.startsWith(angularRootNormalized + "/")) {
22021
+ if (refDir === angularRootNormalized || refDir.startsWith(`${angularRootNormalized}/`)) {
22020
22022
  continue;
22021
22023
  }
22022
22024
  out.add(refDir);
@@ -22740,10 +22742,10 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file4) => file4.endsWith(".ts") ||
22740
22742
  }
22741
22743
  const entry = {
22742
22744
  className: node.name.text,
22745
+ extendsName,
22743
22746
  kind,
22744
22747
  styleUrls: [],
22745
- templateUrls: [],
22746
- extendsName
22748
+ templateUrls: []
22747
22749
  };
22748
22750
  const arg = expr.arguments[0];
22749
22751
  if (arg && ts16.isObjectLiteralExpression(arg) && kind === "component") {
@@ -22893,7 +22895,9 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file4) => file4.endsWith(".ts") ||
22893
22895
  const bundle = { parentFile, resource };
22894
22896
  indexByRoot.set(userAngularRoot, bundle);
22895
22897
  return bundle;
22896
- }, getOrBuildResourceIndex = (userAngularRoot) => getOrBuildIndexes(userAngularRoot).resource, resolveDescendantsOfParent = (params) => {
22898
+ }, getOrBuildResourceIndex = (userAngularRoot) => getOrBuildIndexes(userAngularRoot).resource, invalidateResourceIndex = () => {
22899
+ indexByRoot.clear();
22900
+ }, resolveDescendantsOfParent = (params) => {
22897
22901
  const norm = safeNormalize(params.changedFilePath);
22898
22902
  let rootStat;
22899
22903
  try {
@@ -22905,15 +22909,13 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file4) => file4.endsWith(".ts") ||
22905
22909
  return [];
22906
22910
  const bundle = getOrBuildIndexes(params.userAngularRoot);
22907
22911
  return bundle.parentFile.get(norm) ?? [];
22908
- }, invalidateResourceIndex = () => {
22909
- indexByRoot.clear();
22910
22912
  };
22911
22913
  var init_resolveOwningComponents = __esm(() => {
22912
22914
  ENTITY_DECORATORS = {
22913
22915
  Component: "component",
22914
22916
  Directive: "directive",
22915
- Pipe: "pipe",
22916
- Injectable: "service"
22917
+ Injectable: "service",
22918
+ Pipe: "pipe"
22917
22919
  };
22918
22920
  indexByRoot = new Map;
22919
22921
  });
@@ -22959,9 +22961,7 @@ var trySendMessage = (client, messageStr) => {
22959
22961
  ...message,
22960
22962
  timestamp: Date.now()
22961
22963
  });
22962
- const shouldRemove = (client) => {
22963
- return !trySendMessage(client, messageStr);
22964
- };
22964
+ const shouldRemove = (client) => !trySendMessage(client, messageStr);
22965
22965
  const clientsToRemove = [];
22966
22966
  state.connectedClients.forEach((client) => {
22967
22967
  if (shouldRemove(client))
@@ -23550,8 +23550,8 @@ ${code}`;
23550
23550
  compilerOptions: {
23551
23551
  bindingMetadata: compiledScript.bindings,
23552
23552
  expressionPlugins: ["typescript"],
23553
- isCustomElement: (tag) => tag === "absolute-island",
23554
- prefixIdentifiers: true
23553
+ prefixIdentifiers: true,
23554
+ isCustomElement: (tag) => tag === "absolute-island"
23555
23555
  },
23556
23556
  filename: filePath,
23557
23557
  id: componentId,
@@ -23607,8 +23607,8 @@ ${code}`;
23607
23607
  const compiledScript = hasScript ? vueCompiler.compileScript(descriptor, {
23608
23608
  fs: {
23609
23609
  fileExists: existsSync32,
23610
- readFile: (file4) => existsSync32(file4) ? readFileSync27(file4, "utf-8") : undefined,
23611
- realpath: realpathSync3
23610
+ realpath: realpathSync3,
23611
+ readFile: (file4) => existsSync32(file4) ? readFileSync27(file4, "utf-8") : undefined
23612
23612
  },
23613
23613
  id: componentId,
23614
23614
  inlineTemplate: false
@@ -23819,9 +23819,9 @@ export default {};
23819
23819
  const { getFrameworkGeneratedDir: getFrameworkGeneratedDir2 } = await Promise.resolve().then(() => (init_generatedDir(), exports_generatedDir));
23820
23820
  const generatedAngularRoot = getFrameworkGeneratedDir2("angular").replace(/\\/g, "/");
23821
23821
  const normalized = filePath.replace(/\\/g, "/");
23822
- if (normalized.startsWith(generatedAngularRoot + "/") || normalized.startsWith(generatedAngularRoot)) {
23822
+ if (normalized.startsWith(`${generatedAngularRoot}/`) || normalized.startsWith(generatedAngularRoot)) {
23823
23823
  const tail = normalized.slice(generatedAngularRoot.length + 1);
23824
- const absoluteCandidate = "/" + tail.replace(/^\/+/, "");
23824
+ const absoluteCandidate = `/${tail.replace(/^\/+/, "")}`;
23825
23825
  const candidates = [
23826
23826
  absoluteCandidate,
23827
23827
  resolve36(projectRoot, tail)
@@ -24099,7 +24099,10 @@ __export(exports_hmrCompiler, {
24099
24099
  });
24100
24100
  import { dirname as dirname24, relative as relative16, resolve as resolve37 } from "path";
24101
24101
  import { performance as performance2 } from "perf_hooks";
24102
- var getApplyMetadataModule = async (encodedId) => {
24102
+ var encodeHmrComponentId = (absoluteFilePath, className) => {
24103
+ const projectRel = relative16(process.cwd(), absoluteFilePath).replace(/\\/g, "/");
24104
+ return `${projectRel}@${className}`;
24105
+ }, getApplyMetadataModule = async (encodedId) => {
24103
24106
  const decoded = decodeURIComponent(encodedId);
24104
24107
  const at2 = decoded.lastIndexOf("@");
24105
24108
  if (at2 === -1)
@@ -24128,9 +24131,6 @@ var getApplyMetadataModule = async (encodedId) => {
24128
24131
  return fast.moduleText;
24129
24132
  }
24130
24133
  return null;
24131
- }, encodeHmrComponentId = (absoluteFilePath, className) => {
24132
- const projectRel = relative16(process.cwd(), absoluteFilePath).replace(/\\/g, "/");
24133
- return `${projectRel}@${className}`;
24134
24134
  };
24135
24135
  var init_hmrCompiler = __esm(() => {
24136
24136
  init_logger();
@@ -24225,7 +24225,7 @@ var resolveRequestPathname = (request) => {
24225
24225
  }, buildHtmlShell = (headTag, bodyContent, indexPath, props) => {
24226
24226
  const propsScript = `window.__INITIAL_PROPS__=${JSON.stringify(props ?? {})};`;
24227
24227
  const indexImport = indexPath ? `<script type="module" src="${indexPath}"></script>` : "";
24228
- return `<!DOCTYPE html><html>${headTag}<body>` + `<div id="ember-root">${bodyContent}</div>` + `<script>${propsScript}</script>` + indexImport + `</body></html>`;
24228
+ return `<!DOCTYPE html><html>${headTag}<body>` + `<div id="ember-root">${bodyContent}</div>` + `<script>${propsScript}</script>${indexImport}</body></html>`;
24229
24229
  }, handleEmberPageRequest = async (input) => {
24230
24230
  const { indexPath, pagePath, headTag } = input;
24231
24231
  const userProps = input.props;
@@ -24425,7 +24425,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24425
24425
  }
24426
24426
  return { ...parsed, framework: detectedFw };
24427
24427
  }, isValidDeletedAffectedFile = (affectedFile, deletedPathResolved, processedFiles) => affectedFile !== deletedPathResolved && !processedFiles.has(affectedFile) && existsSync33(affectedFile), FRAMEWORK_DIR_KEYS_FOR_CLEANUP, removeStaleGenerated = (state, deletedFile) => {
24428
- const config = state.config;
24428
+ const { config } = state;
24429
24429
  const cwd2 = process.cwd();
24430
24430
  const absDeleted = resolve40(deletedFile).replace(/\\/g, "/");
24431
24431
  for (const { configKey, framework } of FRAMEWORK_DIR_KEYS_FOR_CLEANUP) {
@@ -24596,7 +24596,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24596
24596
  }
24597
24597
  enqueueAngularOwningComponentForStyle(state, changedStylePath);
24598
24598
  }, enqueueAngularOwningComponentForStyle = (state, changedStylePath) => {
24599
- const angularDir = state.resolvedPaths.angularDir;
24599
+ const { angularDir } = state.resolvedPaths;
24600
24600
  if (!angularDir)
24601
24601
  return;
24602
24602
  const visited = new Set;
@@ -24635,17 +24635,17 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24635
24635
  if (!hasFileChanged(filePath, currentHash, state.fileHashes)) {
24636
24636
  return;
24637
24637
  }
24638
- const publicDir = state.resolvedPaths.publicDir;
24639
- const assetsDir = state.resolvedPaths.assetsDir;
24638
+ const { publicDir } = state.resolvedPaths;
24639
+ const { assetsDir } = state.resolvedPaths;
24640
24640
  const handleStaticMirror = async (sourceDir, urlPrefix) => {
24641
24641
  const absSource = resolve40(filePath);
24642
24642
  const normalizedSource = absSource.replace(/\\/g, "/");
24643
24643
  const normalizedDir = sourceDir.replace(/\\/g, "/");
24644
- if (!normalizedSource.startsWith(normalizedDir + "/"))
24644
+ if (!normalizedSource.startsWith(`${normalizedDir}/`))
24645
24645
  return false;
24646
24646
  try {
24647
24647
  const relFromDir = normalizedSource.slice(normalizedDir.length + 1);
24648
- const buildDir = state.resolvedPaths.buildDir;
24648
+ const { buildDir } = state.resolvedPaths;
24649
24649
  const destPath = resolve40(buildDir, urlPrefix ? `${urlPrefix}/${relFromDir}` : relFromDir);
24650
24650
  const { mkdir: mkdir8, copyFile, readFile: readFile6 } = await import("fs/promises");
24651
24651
  const { dirname: dirname26 } = await import("path");
@@ -24675,7 +24675,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24675
24675
  invalidate(resolve40(filePath));
24676
24676
  const relPath = relative17(process.cwd(), filePath);
24677
24677
  logHmrUpdate(relPath);
24678
- const angularDir = state.resolvedPaths.angularDir;
24678
+ const { angularDir } = state.resolvedPaths;
24679
24679
  let hasAngularDependent = false;
24680
24680
  if (angularDir && state.dependencyGraph) {
24681
24681
  try {
@@ -24915,8 +24915,8 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24915
24915
  createStylePreprocessorPlugin(getStyleTransformConfig(state.config)),
24916
24916
  createAngularHmrInjectionPlugin2({
24917
24917
  generatedAngularRoot,
24918
- userAngularRoot,
24919
- projectRoot: process.cwd()
24918
+ projectRoot: process.cwd(),
24919
+ userAngularRoot
24920
24920
  })
24921
24921
  ],
24922
24922
  root: clientRoot,
@@ -25037,7 +25037,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25037
25037
  if (owners.length === 0 && (editedFile.endsWith(".ts") || editedFile.endsWith(".json")) && !editedFile.endsWith(".d.ts")) {
25038
25038
  const normalized = editedFile.replace(/\\/g, "/");
25039
25039
  const angularDirAbs = resolve40(angularDir).replace(/\\/g, "/");
25040
- if (normalized.startsWith(angularDirAbs + "/")) {
25040
+ if (normalized.startsWith(`${angularDirAbs}/`)) {
25041
25041
  return {
25042
25042
  kind: "rebootstrap",
25043
25043
  reason: `non-decorated angular file edited (${editedFile}) \u2014 consumers may hold stale resolved values`,
@@ -25090,9 +25090,9 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25090
25090
  }
25091
25091
  }
25092
25092
  const breakdown = {
25093
+ compileMs: Math.round(totalCompileMs),
25093
25094
  importsMs: Math.round(importsMs),
25094
- resolveMs: Math.round(totalResolveMs),
25095
- compileMs: Math.round(totalCompileMs)
25095
+ resolveMs: Math.round(totalResolveMs)
25096
25096
  };
25097
25097
  if (rebootstrapClassName !== null) {
25098
25098
  return {
@@ -27473,5 +27473,5 @@ export {
27473
27473
  build
27474
27474
  };
27475
27475
 
27476
- //# debugId=25EB7439F55390E664756E2164756E21
27476
+ //# debugId=0C6295BE693393DC64756E2164756E21
27477
27477
  //# sourceMappingURL=build.js.map