@absolutejs/absolute 0.19.0-beta.736 → 0.19.0-beta.738

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
@@ -44778,7 +44778,7 @@ var REQUIRED_ANGULAR_SPECIFIERS, SERVER_ONLY_ANGULAR_SPECIFIERS, SCAN_SKIP_DIRS,
44778
44778
  angular.add(spec);
44779
44779
  await collectTransitiveAngularSpecs([...angular, ...transitiveRoots], angular);
44780
44780
  return Array.from(angular).filter(isResolvable2);
44781
- }, buildAngularVendor = async (buildDir, directories = [], linkerJitMode = false) => {
44781
+ }, buildAngularVendor = async (buildDir, directories = [], linkerJitMode = false, depVendorSpecifiers = []) => {
44782
44782
  const vendorDir = join17(buildDir, "angular", "vendor");
44783
44783
  mkdirSync7(vendorDir, { recursive: true });
44784
44784
  const tmpDir = join17(buildDir, "_angular_vendor_tmp");
@@ -44792,6 +44792,7 @@ var REQUIRED_ANGULAR_SPECIFIERS, SERVER_ONLY_ANGULAR_SPECIFIERS, SCAN_SKIP_DIRS,
44792
44792
  }));
44793
44793
  const result = await bunBuild4({
44794
44794
  entrypoints,
44795
+ external: depVendorSpecifiers,
44795
44796
  format: "esm",
44796
44797
  minify: false,
44797
44798
  naming: "[name].[ext]",
@@ -45013,6 +45014,61 @@ var escapeRegex2 = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), jsRewrit
45013
45014
  } catch {}
45014
45015
  }
45015
45016
  await rewriteImports(allFiles, vendorPaths);
45017
+ await fixMissingReExportNamespaces(allFiles);
45018
+ }, fixMissingReExportNamespaces = async (files) => {
45019
+ const REEXPORT_PATTERN = /__reExport\(\s*[A-Za-z_$][\w$]*\s*,\s*([A-Za-z_$][\w$]*)\s*\)/g;
45020
+ await Promise.all(files.map(async (filePath) => {
45021
+ const content = await Bun.file(filePath).text();
45022
+ REEXPORT_PATTERN.lastIndex = 0;
45023
+ const missing = [];
45024
+ let match;
45025
+ while ((match = REEXPORT_PATTERN.exec(content)) !== null) {
45026
+ const ident = match[1];
45027
+ if (!ident)
45028
+ continue;
45029
+ const nsImportRe = new RegExp(`\\bimport\\s*\\*\\s*as\\s+${ident}\\s+from\\b`);
45030
+ if (nsImportRe.test(content))
45031
+ continue;
45032
+ const declRe = new RegExp(`\\b(?:const|let|var|function|class)\\s+${ident}\\b`);
45033
+ if (declRe.test(content))
45034
+ continue;
45035
+ const namedImportRe = new RegExp(`\\bimport\\s*\\{[^}]*\\b${ident}\\b[^}]*\\}\\s*from\\b`);
45036
+ if (namedImportRe.test(content))
45037
+ continue;
45038
+ const importPathRe = /from\s+["']([^"']+)["']/g;
45039
+ let pathMatch;
45040
+ let sourcePath;
45041
+ while ((pathMatch = importPathRe.exec(content)) !== null) {
45042
+ const p = pathMatch[1];
45043
+ if (!p)
45044
+ continue;
45045
+ const base = p.split("/").pop()?.replace(/\.[mc]?js$/, "");
45046
+ if (!base)
45047
+ continue;
45048
+ if (base === ident || base.endsWith(`_${ident}`)) {
45049
+ sourcePath = p;
45050
+ break;
45051
+ }
45052
+ }
45053
+ if (sourcePath) {
45054
+ missing.push({ ident, path: sourcePath });
45055
+ }
45056
+ }
45057
+ if (missing.length === 0)
45058
+ return;
45059
+ const seen = new Set;
45060
+ const unique = missing.filter((entry) => {
45061
+ if (seen.has(entry.ident))
45062
+ return false;
45063
+ seen.add(entry.ident);
45064
+ return true;
45065
+ });
45066
+ const inserts = unique.map((entry) => `import * as ${entry.ident} from "${entry.path}";`).join(`
45067
+ `);
45068
+ const patched = `${inserts}
45069
+ ${content}`;
45070
+ await Bun.write(filePath, patched);
45071
+ }));
45016
45072
  };
45017
45073
  var init_rewriteImports = __esm(() => {
45018
45074
  init_nativeRewrite();
@@ -49844,7 +49900,7 @@ var FRAMEWORK_DIR_KEYS, collectDepVendorSourceDirs = (config) => {
49844
49900
  const { buildDepVendor: buildDepVendor2 } = await Promise.resolve().then(() => (init_buildDepVendor(), exports_buildDepVendor));
49845
49901
  const [, angularSpecs, , , depPaths] = await Promise.all([
49846
49902
  config.reactDirectory ? buildReactVendor(state.resolvedPaths.buildDir) : Promise.resolve(undefined),
49847
- config.angularDirectory ? buildAngularVendor(state.resolvedPaths.buildDir, sourceDirs, true) : Promise.resolve(undefined),
49903
+ config.angularDirectory ? buildAngularVendor(state.resolvedPaths.buildDir, sourceDirs, true, Object.keys(globalThis.__depVendorPaths ?? {})) : Promise.resolve(undefined),
49848
49904
  config.svelteDirectory ? buildSvelteVendor(state.resolvedPaths.buildDir) : Promise.resolve(undefined),
49849
49905
  config.vueDirectory ? buildVueVendor(state.resolvedPaths.buildDir) : Promise.resolve(undefined),
49850
49906
  buildDepVendor2(state.resolvedPaths.buildDir, sourceDirs)
@@ -58326,5 +58382,5 @@ export {
58326
58382
  ANGULAR_INIT_TIMEOUT_MS
58327
58383
  };
58328
58384
 
58329
- //# debugId=2561B31C4102BB4864756E2164756E21
58385
+ //# debugId=69FC64DF6241AA5664756E2164756E21
58330
58386
  //# sourceMappingURL=index.js.map