@absolutejs/absolute 0.19.0-beta.875 → 0.19.0-beta.876

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/dist/index.js CHANGED
@@ -9832,12 +9832,12 @@ __export(exports_hmrInjectionPlugin, {
9832
9832
  });
9833
9833
  import { readFile as readFile5 } from "fs/promises";
9834
9834
  import { relative as relative6, resolve as resolve15 } from "path";
9835
- var ENTITY_DECORATOR_RE, IMPORT_RE, extractImportedLocalNames = (jsSource) => {
9835
+ var ENTITY_DECORATOR_RE, IMPORT_RE, TOP_LEVEL_DECL_RE, extractAllTopLevelNames = (jsSource) => {
9836
9836
  const names = new Set;
9837
9837
  IMPORT_RE.lastIndex = 0;
9838
- let match;
9839
- while ((match = IMPORT_RE.exec(jsSource)) !== null) {
9840
- const [, , nsName, defaultName, namedAfterDefault, named] = match;
9838
+ let importMatch;
9839
+ while ((importMatch = IMPORT_RE.exec(jsSource)) !== null) {
9840
+ const [, , nsName, defaultName, namedAfterDefault, named] = importMatch;
9841
9841
  if (nsName)
9842
9842
  names.add(nsName);
9843
9843
  if (defaultName)
@@ -9855,6 +9855,13 @@ var ENTITY_DECORATOR_RE, IMPORT_RE, extractImportedLocalNames = (jsSource) => {
9855
9855
  }
9856
9856
  }
9857
9857
  }
9858
+ TOP_LEVEL_DECL_RE.lastIndex = 0;
9859
+ let declMatch;
9860
+ while ((declMatch = TOP_LEVEL_DECL_RE.exec(jsSource)) !== null) {
9861
+ const name = declMatch[1];
9862
+ if (name)
9863
+ names.add(name);
9864
+ }
9858
9865
  return [...names];
9859
9866
  }, buildHmrTail = (className, encodedIdLiteral) => `
9860
9867
 
@@ -9977,8 +9984,8 @@ var ENTITY_DECORATOR_RE, IMPORT_RE, extractImportedLocalNames = (jsSource) => {
9977
9984
  const id = `${projectRel}@${className}`;
9978
9985
  return buildHmrTail(className, JSON.stringify(id));
9979
9986
  }).join("");
9980
- const importedLocalNames = extractImportedLocalNames(text);
9981
- const depsKeys = importedLocalNames.filter((n) => !classNames.includes(n)).join(", ");
9987
+ const topLevelNames = extractAllTopLevelNames(text);
9988
+ const depsKeys = topLevelNames.filter((n) => !classNames.includes(n)).join(", ");
9982
9989
  const depsBlock = classNames.length > 0 && depsKeys ? `
9983
9990
 
9984
9991
  // absolutejs HMR \u2014 Tier 1a class-deps registry
@@ -9993,6 +10000,7 @@ var ENTITY_DECORATOR_RE, IMPORT_RE, extractImportedLocalNames = (jsSource) => {
9993
10000
  var init_hmrInjectionPlugin = __esm(() => {
9994
10001
  ENTITY_DECORATOR_RE = /([A-Z][A-Za-z0-9_$]*)\s*=\s*__legacyDecorateClassTS[A-Za-z0-9_$]*\s*\(\s*\[[\s\S]*?\b(?:Component|Directive|Pipe|Injectable)[A-Za-z0-9_$]*\s*\(/g;
9995
10002
  IMPORT_RE = /^\s*import\s+(?:(?:(\*)\s+as\s+([A-Za-z_$][\w$]*)\s+from)|(?:([A-Za-z_$][\w$]*)(?:\s*,\s*\{([^}]*)\})?\s+from)|(?:\{([^}]*)\}\s+from))\s*['"][^'"]+['"]/gm;
10003
+ TOP_LEVEL_DECL_RE = /^(?:export\s+)?(?:const|let|var|function|class)\s+([A-Za-z_$][\w$]*)/gm;
9996
10004
  });
9997
10005
 
9998
10006
  // src/utils/cleanStaleOutputs.ts
@@ -30466,5 +30474,5 @@ export {
30466
30474
  ANGULAR_INIT_TIMEOUT_MS
30467
30475
  };
30468
30476
 
30469
- //# debugId=A56696228D787EEA64756E2164756E21
30477
+ //# debugId=A11C9EA489CC1BAB64756E2164756E21
30470
30478
  //# sourceMappingURL=index.js.map