@absolutejs/absolute 0.19.0-beta.737 → 0.19.0-beta.739

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
@@ -44437,7 +44437,8 @@ var propProviders = Object.entries(pageProps).map(function(entry) {
44437
44437
  // page module. Required so DI tokens that the component (or any service it
44438
44438
  // injects) needs are available client-side too \u2014 without these, services
44439
44439
  // that worked in SSR fail with NG0201 after hydration.
44440
- var pageProviders = Array.isArray(pageModule.providers) ? pageModule.providers : [];
44440
+ var maybePageProviders = Reflect.get(pageModule, 'providers');
44441
+ var pageProviders = Array.isArray(maybePageProviders) ? maybePageProviders : [];
44441
44442
 
44442
44443
  // Re-Bootstrap HMR with View Transitions API
44443
44444
  if (window.__ANGULAR_APP__) {
@@ -44508,7 +44509,8 @@ var propProviders = Object.entries(pageProps).map(function(entry) {
44508
44509
  // page module. Required so DI tokens that the component (or any service it
44509
44510
  // injects) needs are available client-side too \u2014 without these, services
44510
44511
  // that worked in SSR fail with NG0201 after hydration.
44511
- var pageProviders = Array.isArray(pageModule.providers) ? pageModule.providers : [];
44512
+ var maybePageProviders = Reflect.get(pageModule, 'providers');
44513
+ var pageProviders = Array.isArray(maybePageProviders) ? maybePageProviders : [];
44512
44514
 
44513
44515
  enableProdMode();
44514
44516
 
@@ -45014,6 +45016,61 @@ var escapeRegex2 = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), jsRewrit
45014
45016
  } catch {}
45015
45017
  }
45016
45018
  await rewriteImports(allFiles, vendorPaths);
45019
+ await fixMissingReExportNamespaces(allFiles);
45020
+ }, fixMissingReExportNamespaces = async (files) => {
45021
+ const REEXPORT_PATTERN = /__reExport\(\s*[A-Za-z_$][\w$]*\s*,\s*([A-Za-z_$][\w$]*)\s*\)/g;
45022
+ await Promise.all(files.map(async (filePath) => {
45023
+ const content = await Bun.file(filePath).text();
45024
+ REEXPORT_PATTERN.lastIndex = 0;
45025
+ const missing = [];
45026
+ let match;
45027
+ while ((match = REEXPORT_PATTERN.exec(content)) !== null) {
45028
+ const ident = match[1];
45029
+ if (!ident)
45030
+ continue;
45031
+ const nsImportRe = new RegExp(`\\bimport\\s*\\*\\s*as\\s+${ident}\\s+from\\b`);
45032
+ if (nsImportRe.test(content))
45033
+ continue;
45034
+ const declRe = new RegExp(`\\b(?:const|let|var|function|class)\\s+${ident}\\b`);
45035
+ if (declRe.test(content))
45036
+ continue;
45037
+ const namedImportRe = new RegExp(`\\bimport\\s*\\{[^}]*\\b${ident}\\b[^}]*\\}\\s*from\\b`);
45038
+ if (namedImportRe.test(content))
45039
+ continue;
45040
+ const importPathRe = /from\s+["']([^"']+)["']/g;
45041
+ let pathMatch;
45042
+ let sourcePath;
45043
+ while ((pathMatch = importPathRe.exec(content)) !== null) {
45044
+ const p = pathMatch[1];
45045
+ if (!p)
45046
+ continue;
45047
+ const base = p.split("/").pop()?.replace(/\.[mc]?js$/, "");
45048
+ if (!base)
45049
+ continue;
45050
+ if (base === ident || base.endsWith(`_${ident}`)) {
45051
+ sourcePath = p;
45052
+ break;
45053
+ }
45054
+ }
45055
+ if (sourcePath) {
45056
+ missing.push({ ident, path: sourcePath });
45057
+ }
45058
+ }
45059
+ if (missing.length === 0)
45060
+ return;
45061
+ const seen = new Set;
45062
+ const unique = missing.filter((entry) => {
45063
+ if (seen.has(entry.ident))
45064
+ return false;
45065
+ seen.add(entry.ident);
45066
+ return true;
45067
+ });
45068
+ const inserts = unique.map((entry) => `import * as ${entry.ident} from "${entry.path}";`).join(`
45069
+ `);
45070
+ const patched = `${inserts}
45071
+ ${content}`;
45072
+ await Bun.write(filePath, patched);
45073
+ }));
45017
45074
  };
45018
45075
  var init_rewriteImports = __esm(() => {
45019
45076
  init_nativeRewrite();
@@ -58327,5 +58384,5 @@ export {
58327
58384
  ANGULAR_INIT_TIMEOUT_MS
58328
58385
  };
58329
58386
 
58330
- //# debugId=48AA30BC1C62695364756E2164756E21
58387
+ //# debugId=A657374A198E35BF64756E2164756E21
58331
58388
  //# sourceMappingURL=index.js.map