@absolutejs/absolute 0.19.0-beta.1010 → 0.19.0-beta.1012

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.
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  var __require = import.meta.require;
3
3
 
4
- // .angular-partial-tmp-jXaXWU/src/core/streamingSlotRegistrar.ts
4
+ // .angular-partial-tmp-sziwrI/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-jXaXWU/src/core/streamingSlotRegistrar.ts
4
+ // .angular-partial-tmp-sziwrI/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-jXaXWU/src/core/streamingSlotRegistry.ts
51
+ // .angular-partial-tmp-sziwrI/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";
package/dist/build.js CHANGED
@@ -767,7 +767,7 @@ var indexContentCache, resolveDevClientDir = () => {
767
767
  if (existsSync(fromNodeModules))
768
768
  return fromNodeModules;
769
769
  return resolve3(import.meta.dir, "./dev/client");
770
- }, devClientDir, errorOverlayPath, hmrClientPath, refreshSetupPath, generateReactIndexFiles = async (reactPagesDirectory, reactIndexesDirectory, isDev = false) => {
770
+ }, devClientDir, errorOverlayPath, hmrClientPath, refreshSetupPath, reactRefreshRuntimePath, generateReactIndexFiles = async (reactPagesDirectory, reactIndexesDirectory, isDev = false) => {
771
771
  if (!existsSync(reactIndexesDirectory)) {
772
772
  mkdirSync2(reactIndexesDirectory, { recursive: true });
773
773
  }
@@ -1100,6 +1100,7 @@ var init_generateReactIndexes = __esm(() => {
1100
1100
  errorOverlayPath = join2(devClientDir, "errorOverlay.ts").replace(/\\/g, "/");
1101
1101
  hmrClientPath = join2(devClientDir, "hmrClient.ts").replace(/\\/g, "/");
1102
1102
  refreshSetupPath = join2(devClientDir, "reactRefreshSetup.ts").replace(/\\/g, "/");
1103
+ reactRefreshRuntimePath = join2(devClientDir, "vendor", "reactRefreshRuntime.js").replace(/\\/g, "/");
1103
1104
  });
1104
1105
 
1105
1106
  // src/build/wrapHTMLScript.ts
@@ -18727,21 +18728,9 @@ var resolveJsxDevRuntimeCompatPath = () => {
18727
18728
  }
18728
18729
  }
18729
18730
  return (candidates[0] ?? resolve24(import.meta.dir, "react", "jsxDevRuntimeCompat.js")).replace(/\\/g, "/");
18730
- }, jsxDevRuntimeCompatPath, reactSpecifiers, isResolvable = (specifier) => {
18731
- try {
18732
- Bun.resolveSync(specifier, process.cwd());
18733
- return true;
18734
- } catch {
18735
- return false;
18736
- }
18737
- }, resolveVendorSpecifiers = () => {
18738
- if (isResolvable("react-refresh/runtime")) {
18739
- return [...reactSpecifiers, "react-refresh/runtime"];
18740
- }
18741
- return reactSpecifiers;
18742
- }, toSafeFileName = (specifier) => specifier.replace(/\//g, "_"), computeVendorPaths = () => {
18731
+ }, jsxDevRuntimeCompatPath, reactSpecifiers, toSafeFileName = (specifier) => specifier.replace(/\//g, "_"), computeVendorPaths = () => {
18743
18732
  const paths = {};
18744
- for (const specifier of resolveVendorSpecifiers()) {
18733
+ for (const specifier of reactSpecifiers) {
18745
18734
  paths[specifier] = `/react/vendor/${toSafeFileName(specifier)}.js`;
18746
18735
  }
18747
18736
  return paths;
@@ -18767,7 +18756,7 @@ var resolveJsxDevRuntimeCompatPath = () => {
18767
18756
  mkdirSync8(vendorDir, { recursive: true });
18768
18757
  const tmpDir = join30(buildDir, "_vendor_tmp");
18769
18758
  mkdirSync8(tmpDir, { recursive: true });
18770
- const specifiers = resolveVendorSpecifiers();
18759
+ const specifiers = reactSpecifiers;
18771
18760
  const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
18772
18761
  const safeName = toSafeFileName(specifier);
18773
18762
  const entryPath = join30(tmpDir, `${safeName}.ts`);
@@ -18838,7 +18827,7 @@ import { mkdirSync as mkdirSync9 } from "fs";
18838
18827
  import { join as join31 } from "path";
18839
18828
  import { rm as rm6 } from "fs/promises";
18840
18829
  var {build: bunBuild4, Glob: Glob7 } = globalThis.Bun;
18841
- var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => jitMode ? [...REQUIRED_ANGULAR_SPECIFIERS_BASE, "@angular/compiler"] : REQUIRED_ANGULAR_SPECIFIERS_BASE, SERVER_ONLY_ANGULAR_SPECIFIERS, BUILD_ONLY_ANGULAR_SPECIFIER_PREFIXES, isBuildOnlyAngularSpecifier = (spec) => BUILD_ONLY_ANGULAR_SPECIFIER_PREFIXES.some((prefix) => spec === prefix || spec.startsWith(`${prefix}/`)), SCAN_SKIP_DIRS, isResolvable2 = (specifier) => {
18830
+ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => jitMode ? [...REQUIRED_ANGULAR_SPECIFIERS_BASE, "@angular/compiler"] : REQUIRED_ANGULAR_SPECIFIERS_BASE, SERVER_ONLY_ANGULAR_SPECIFIERS, BUILD_ONLY_ANGULAR_SPECIFIER_PREFIXES, isBuildOnlyAngularSpecifier = (spec) => BUILD_ONLY_ANGULAR_SPECIFIER_PREFIXES.some((prefix) => spec === prefix || spec.startsWith(`${prefix}/`)), SCAN_SKIP_DIRS, isResolvable = (specifier) => {
18842
18831
  try {
18843
18832
  Bun.resolveSync(specifier, process.cwd());
18844
18833
  return true;
@@ -18930,7 +18919,7 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
18930
18919
  angular.add(spec);
18931
18920
  }
18932
18921
  await collectTransitiveAngularSpecs([...angular, ...transitiveRoots], angular);
18933
- return Array.from(angular).filter(isResolvable2);
18922
+ return Array.from(angular).filter(isResolvable);
18934
18923
  }, buildAngularVendor = async (buildDir, directories = [], linkerJitMode = false, depVendorSpecifiers = []) => {
18935
18924
  const vendorDir = join31(buildDir, "angular", "vendor");
18936
18925
  mkdirSync9(vendorDir, { recursive: true });
@@ -18977,7 +18966,7 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
18977
18966
  const browserSpecs = await resolveAngularSpecifiers(directories, linkerJitMode);
18978
18967
  const allSpecs = new Set(browserSpecs);
18979
18968
  for (const spec of SERVER_ONLY_ANGULAR_SPECIFIERS) {
18980
- if (isResolvable2(spec))
18969
+ if (isResolvable(spec))
18981
18970
  allSpecs.add(spec);
18982
18971
  }
18983
18972
  const specifiers = Array.from(allSpecs);
@@ -19014,7 +19003,7 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
19014
19003
  const browserSpecs = await resolveAngularSpecifiers(directories, linkerJitMode);
19015
19004
  const allSpecs = new Set(browserSpecs);
19016
19005
  for (const spec of SERVER_ONLY_ANGULAR_SPECIFIERS) {
19017
- if (isResolvable2(spec))
19006
+ if (isResolvable(spec))
19018
19007
  allSpecs.add(spec);
19019
19008
  }
19020
19009
  return computeAngularServerVendorPaths(buildDir, Array.from(allSpecs));
@@ -19131,15 +19120,15 @@ import { mkdirSync as mkdirSync11 } from "fs";
19131
19120
  import { join as join33 } from "path";
19132
19121
  import { rm as rm8 } from "fs/promises";
19133
19122
  var {build: bunBuild6 } = globalThis.Bun;
19134
- var svelteSpecifiers, isResolvable3 = (specifier) => {
19123
+ var svelteSpecifiers, isResolvable2 = (specifier) => {
19135
19124
  try {
19136
19125
  __require.resolve(specifier);
19137
19126
  return true;
19138
19127
  } catch {
19139
19128
  return false;
19140
19129
  }
19141
- }, resolveVendorSpecifiers2 = () => svelteSpecifiers.filter(isResolvable3), toSafeFileName4 = (specifier) => specifier.replace(/\//g, "_"), buildSvelteVendor = async (buildDir) => {
19142
- const specifiers = resolveVendorSpecifiers2();
19130
+ }, resolveVendorSpecifiers = () => svelteSpecifiers.filter(isResolvable2), toSafeFileName4 = (specifier) => specifier.replace(/\//g, "_"), buildSvelteVendor = async (buildDir) => {
19131
+ const specifiers = resolveVendorSpecifiers();
19143
19132
  if (specifiers.length === 0)
19144
19133
  return;
19145
19134
  const vendorDir = join33(buildDir, "svelte", "vendor");
@@ -19169,7 +19158,7 @@ var svelteSpecifiers, isResolvable3 = (specifier) => {
19169
19158
  }
19170
19159
  }, computeSvelteVendorPaths = () => {
19171
19160
  const paths = {};
19172
- for (const specifier of resolveVendorSpecifiers2()) {
19161
+ for (const specifier of resolveVendorSpecifiers()) {
19173
19162
  paths[specifier] = `/svelte/vendor/${toSafeFileName4(specifier)}.js`;
19174
19163
  }
19175
19164
  return paths;
@@ -19378,7 +19367,10 @@ import {
19378
19367
  } from "fs";
19379
19368
  import { basename as basename10, dirname as dirname17, extname as extname8, join as join35, relative as relative13, resolve as resolve25 } from "path";
19380
19369
  import { cwd, env as env2, exit } from "process";
19381
- var {build: bunBuild7, Glob: Glob8 } = globalThis.Bun;
19370
+ var {
19371
+ build: bunBuild7,
19372
+ Glob: Glob8
19373
+ } = globalThis.Bun;
19382
19374
  var isDev, isBuildTraceEnabled = () => {
19383
19375
  const value = env2.ABSOLUTE_BUILD_TRACE?.toLowerCase();
19384
19376
  return value === "1" || value === "true" || value === "yes";
@@ -20521,6 +20513,14 @@ ${content.slice(firstUseIdx)}`;
20521
20513
  ];
20522
20514
  const svelteResolveConditions = svelteDir ? ["svelte", "main"] : undefined;
20523
20515
  const htmlScriptPlugin = hmr ? createHTMLScriptHMRPlugin(htmlDir, htmxDir) : undefined;
20516
+ const reactRefreshRuntimePlugin = {
20517
+ name: "absolute-react-refresh-runtime",
20518
+ setup(builder) {
20519
+ builder.onResolve({ filter: /^react-refresh\/runtime$/ }, () => ({
20520
+ path: reactRefreshRuntimePath
20521
+ }));
20522
+ }
20523
+ };
20524
20524
  const reactBuildConfig = reactClientEntryPoints.length > 0 ? mergeBunBuildConfig({
20525
20525
  entrypoints: reactClientEntryPoints,
20526
20526
  ...Object.keys(reactExternalPaths).length > 0 ? { external: Object.keys(reactExternalPaths) } : {},
@@ -20532,7 +20532,10 @@ ${content.slice(firstUseIdx)}`;
20532
20532
  jsx: { development: true },
20533
20533
  reactFastRefresh: true
20534
20534
  } : {},
20535
- plugins: [stylePreprocessorPlugin2],
20535
+ plugins: hmr ? [
20536
+ stylePreprocessorPlugin2,
20537
+ reactRefreshRuntimePlugin
20538
+ ] : [stylePreprocessorPlugin2],
20536
20539
  root: clientRoot,
20537
20540
  splitting: true,
20538
20541
  target: "browser",
@@ -26480,7 +26483,7 @@ var {build: bunBuild9, Glob: Glob10 } = globalThis.Bun;
26480
26483
  var toSafeFileName6 = (specifier) => {
26481
26484
  const prefix = specifier.startsWith("@") ? "_" : "";
26482
26485
  return prefix + specifier.replace(/\//g, "_").replace(/@/g, "").replace(/-/g, "_");
26483
- }, isResolvable4 = (specifier) => {
26486
+ }, isResolvable3 = (specifier) => {
26484
26487
  try {
26485
26488
  Bun.resolveSync(specifier, process.cwd());
26486
26489
  return true;
@@ -26524,8 +26527,8 @@ var toSafeFileName6 = (specifier) => {
26524
26527
  const transpiler6 = new Bun.Transpiler({ loader: "tsx" });
26525
26528
  await Promise.all(directories.map((dir) => collectDirSpecifiers(dir, transpiler6, dep, framework)));
26526
26529
  return {
26527
- dep: Array.from(dep).filter(isResolvable4),
26528
- framework: Array.from(framework).filter(isResolvable4)
26530
+ dep: Array.from(dep).filter(isResolvable3),
26531
+ framework: Array.from(framework).filter(isResolvable3)
26529
26532
  };
26530
26533
  }, collectTransitiveImports = async (specs, alreadyVendored, alreadyScanned) => {
26531
26534
  const { readFileSync: readFileSync28 } = await import("fs");
@@ -26563,7 +26566,7 @@ var toSafeFileName6 = (specifier) => {
26563
26566
  continue;
26564
26567
  if (alreadyVendored.has(child))
26565
26568
  continue;
26566
- if (!isResolvable4(child))
26569
+ if (!isResolvable3(child))
26567
26570
  continue;
26568
26571
  newSpecs.add(child);
26569
26572
  }
@@ -26702,7 +26705,6 @@ var init_buildDepVendor = __esm(() => {
26702
26705
  "react-dom/server",
26703
26706
  "react/jsx-runtime",
26704
26707
  "react/jsx-dev-runtime",
26705
- "react-refresh/runtime",
26706
26708
  "svelte",
26707
26709
  "svelte/internal",
26708
26710
  "svelte/internal/flags/async",
@@ -27160,5 +27162,5 @@ export {
27160
27162
  build
27161
27163
  };
27162
27164
 
27163
- //# debugId=4CD3ADB0CFF074B464756E2164756E21
27165
+ //# debugId=67AD36A4AAB4172564756E2164756E21
27164
27166
  //# sourceMappingURL=build.js.map