@absolutejs/absolute 0.19.0-beta.705 → 0.19.0-beta.707

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 (41) hide show
  1. package/dist/angular/browser.js +6 -4
  2. package/dist/angular/browser.js.map +3 -3
  3. package/dist/angular/components/constants.js +1 -0
  4. package/dist/angular/index.js +17 -10
  5. package/dist/angular/index.js.map +5 -5
  6. package/dist/angular/server.js +17 -10
  7. package/dist/angular/server.js.map +5 -5
  8. package/dist/build.js +126 -66
  9. package/dist/build.js.map +12 -12
  10. package/dist/cli/index.js +186 -126
  11. package/dist/dev/client/cssUtils.ts +47 -47
  12. package/dist/dev/client/handlers/angular.ts +40 -19
  13. package/dist/dev/client/handlers/angularRuntime.ts +28 -8
  14. package/dist/dev/client/handlers/html.ts +6 -5
  15. package/dist/dev/client/handlers/htmx.ts +8 -2
  16. package/dist/dev/client/handlers/svelte.ts +16 -14
  17. package/dist/dev/client/hmrClient.ts +25 -3
  18. package/dist/dev/client/reactRefreshSetup.ts +2 -3
  19. package/dist/index.js +151 -79
  20. package/dist/index.js.map +14 -14
  21. package/dist/islands/index.js +4 -4
  22. package/dist/islands/index.js.map +4 -4
  23. package/dist/react/index.js +17 -10
  24. package/dist/react/index.js.map +5 -5
  25. package/dist/react/server.js +15 -8
  26. package/dist/react/server.js.map +4 -4
  27. package/dist/src/angular/components/constants.d.ts +1 -0
  28. package/dist/src/build/buildAngularVendor.d.ts +3 -4
  29. package/dist/src/constants.d.ts +1 -0
  30. package/dist/src/utils/imageProcessing.d.ts +1 -1
  31. package/dist/src/vue/components/Image.d.ts +1 -1
  32. package/dist/svelte/index.js +17 -10
  33. package/dist/svelte/index.js.map +5 -5
  34. package/dist/svelte/server.js +15 -8
  35. package/dist/svelte/server.js.map +4 -4
  36. package/dist/types/globals.d.ts +1 -0
  37. package/dist/vue/index.js +17 -10
  38. package/dist/vue/index.js.map +5 -5
  39. package/dist/vue/server.js +15 -8
  40. package/dist/vue/server.js.map +4 -4
  41. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -102,7 +102,7 @@ var isValidHMRClientMessage = (data) => {
102
102
  var WS_READY_STATE_OPEN = 1;
103
103
 
104
104
  // src/constants.ts
105
- var ANGULAR_INIT_TIMEOUT_MS = 500, ANSI_ESCAPE_LENGTH = 3, ASCII_SPACE = 32, BASE_36_RADIX = 36, BUN_BUILD_WARNING_SUPPRESSION = "wildcard sideEffects are not supported yet", BODY_SLICE_LENGTH = 2000, BYTES_PER_KILOBYTE = 1024, CLI_ARGS_OFFSET = 3, CSS_ERROR_RESOLVE_DELAY_MS = 50, CSS_MAX_CHECK_ATTEMPTS = 10, CSS_MAX_PARSE_TIMEOUT_MS = 500, CSS_SHEET_READY_TIMEOUT_MS = 100, DEFAULT_CHUNK_SIZE = 16384, DEFAULT_DEBOUNCE_MS = 15, DEFAULT_PORT = 3000, DEV_SERVER_RESTART_DEBOUNCE_MS = 100, DOM_UPDATE_DELAY_MS = 50, FILE_PROTOCOL_PREFIX_LENGTH = 7, FOCUS_ID_PREFIX_LENGTH = 3, FOCUS_IDX_PREFIX_LENGTH = 4, FOCUS_NAME_PREFIX_LENGTH = 5, HMR_UPDATE_TIMEOUT_MS = 2000, HOOK_SIGNATURE_LENGTH = 12, EXCLUDE_LAST_OFFSET = -1, HTTP_STATUS_OK = 200, HTTP_STATUS_BAD_REQUEST = 400, HTTP_STATUS_NOT_FOUND = 404, HOURS_IN_DAY = 24, HOURS_IN_HALF_DAY = 12, MAX_ERROR_LENGTH = 200, MAX_RECONNECT_ATTEMPTS = 60, MILLISECONDS_IN_A_SECOND = 1000, MINUTES_IN_AN_HOUR = 60, SECONDS_IN_A_MINUTE = 60, MILLISECONDS_IN_A_MINUTE, MILLISECONDS_IN_A_DAY, OVERLAY_FADE_DURATION_MS = 150, PING_INTERVAL_MS = 30000, RAF_BATCH_COUNT = 3, RANDOM_ID_END_INDEX = 11, REBUILD_BATCH_DELAY_MS = 10, REBUILD_RELOAD_DELAY_MS = 200, RECONNECT_INITIAL_DELAY_MS = 500, RECONNECT_POLL_INTERVAL_MS = 300, REACT_STREAM_SLOT_FAST_DELAY_MS = 5, REACT_STREAM_SLOT_SLOW_DELAY_MS = 20, SIGINT_EXIT_CODE = 130, SIGTERM_EXIT_CODE = 143, SVELTE_CSS_LOAD_TIMEOUT_MS = 500, TIME_PRECISION = 2, TWO_THIRDS, UNFOUND_INDEX = -1, WEBSOCKET_NORMAL_CLOSURE = 1000, WORKSPACE_COMMAND_ARGS_OFFSET = 3, WORKSPACE_FAILURE_LOG_PRINT_LIMIT = 30, WORKSPACE_FAILURE_RECENT_LOG_LIMIT = 60, WORKSPACE_READY_ATTEMPT_TIMEOUT_MS = 5000, WORKSPACE_READY_PROBE_INTERVAL_MS = 250, WORKSPACE_READY_TIMEOUT_MS = 30000, WORKSPACE_SHUTDOWN_TIMEOUT_MS = 1e4, WORKSPACE_TUI_DEFAULT_HEIGHT = 28, WORKSPACE_TUI_DEFAULT_WIDTH = 100, WORKSPACE_TUI_ESCAPE_SEQUENCE_TIMEOUT_MS = 30, WORKSPACE_TUI_FOOTER_LINE_COUNT = 3, WORKSPACE_TUI_MIN_LOG_HEIGHT = 3, WORKSPACE_TUI_MIN_SERVICE_NAME_WIDTH = 7, WORKSPACE_TUI_MIN_TARGET_WIDTH = 8, WORKSPACE_TUI_MIN_WRAP_WIDTH = 12, WORKSPACE_TUI_PROMPT_CURSOR_OFFSET = 3, WORKSPACE_TUI_RECENT_LOG_LIMIT = 40, WORKSPACE_TUI_RENDER_DEBOUNCE_MS = 16, WORKSPACE_TUI_STATUS_WIDTH = 10, WORKSPACE_TUI_TARGET_PADDING_WIDTH = 6, WORKSPACE_TUI_VISIBILITY_WIDTH = 8;
105
+ var ANGULAR_INIT_TIMEOUT_MS = 500, ANSI_ESCAPE_CODE = 27, ANSI_ESCAPE_LENGTH = 3, ASCII_SPACE = 32, BASE_36_RADIX = 36, BUN_BUILD_WARNING_SUPPRESSION = "wildcard sideEffects are not supported yet", BODY_SLICE_LENGTH = 2000, BYTES_PER_KILOBYTE = 1024, CLI_ARGS_OFFSET = 3, CSS_ERROR_RESOLVE_DELAY_MS = 50, CSS_MAX_CHECK_ATTEMPTS = 10, CSS_MAX_PARSE_TIMEOUT_MS = 500, CSS_SHEET_READY_TIMEOUT_MS = 100, DEFAULT_CHUNK_SIZE = 16384, DEFAULT_DEBOUNCE_MS = 15, DEFAULT_PORT = 3000, DEV_SERVER_RESTART_DEBOUNCE_MS = 100, DOM_UPDATE_DELAY_MS = 50, FILE_PROTOCOL_PREFIX_LENGTH = 7, FOCUS_ID_PREFIX_LENGTH = 3, FOCUS_IDX_PREFIX_LENGTH = 4, FOCUS_NAME_PREFIX_LENGTH = 5, HMR_UPDATE_TIMEOUT_MS = 2000, HOOK_SIGNATURE_LENGTH = 12, EXCLUDE_LAST_OFFSET = -1, HTTP_STATUS_OK = 200, HTTP_STATUS_BAD_REQUEST = 400, HTTP_STATUS_NOT_FOUND = 404, HOURS_IN_DAY = 24, HOURS_IN_HALF_DAY = 12, MAX_ERROR_LENGTH = 200, MAX_RECONNECT_ATTEMPTS = 60, MILLISECONDS_IN_A_SECOND = 1000, MINUTES_IN_AN_HOUR = 60, SECONDS_IN_A_MINUTE = 60, MILLISECONDS_IN_A_MINUTE, MILLISECONDS_IN_A_DAY, OVERLAY_FADE_DURATION_MS = 150, PING_INTERVAL_MS = 30000, RAF_BATCH_COUNT = 3, RANDOM_ID_END_INDEX = 11, REBUILD_BATCH_DELAY_MS = 10, REBUILD_RELOAD_DELAY_MS = 200, RECONNECT_INITIAL_DELAY_MS = 500, RECONNECT_POLL_INTERVAL_MS = 300, REACT_STREAM_SLOT_FAST_DELAY_MS = 5, REACT_STREAM_SLOT_SLOW_DELAY_MS = 20, SIGINT_EXIT_CODE = 130, SIGTERM_EXIT_CODE = 143, SVELTE_CSS_LOAD_TIMEOUT_MS = 500, TIME_PRECISION = 2, TWO_THIRDS, UNFOUND_INDEX = -1, WEBSOCKET_NORMAL_CLOSURE = 1000, WORKSPACE_COMMAND_ARGS_OFFSET = 3, WORKSPACE_FAILURE_LOG_PRINT_LIMIT = 30, WORKSPACE_FAILURE_RECENT_LOG_LIMIT = 60, WORKSPACE_READY_ATTEMPT_TIMEOUT_MS = 5000, WORKSPACE_READY_PROBE_INTERVAL_MS = 250, WORKSPACE_READY_TIMEOUT_MS = 30000, WORKSPACE_SHUTDOWN_TIMEOUT_MS = 1e4, WORKSPACE_TUI_DEFAULT_HEIGHT = 28, WORKSPACE_TUI_DEFAULT_WIDTH = 100, WORKSPACE_TUI_ESCAPE_SEQUENCE_TIMEOUT_MS = 30, WORKSPACE_TUI_FOOTER_LINE_COUNT = 3, WORKSPACE_TUI_MIN_LOG_HEIGHT = 3, WORKSPACE_TUI_MIN_SERVICE_NAME_WIDTH = 7, WORKSPACE_TUI_MIN_TARGET_WIDTH = 8, WORKSPACE_TUI_MIN_WRAP_WIDTH = 12, WORKSPACE_TUI_PROMPT_CURSOR_OFFSET = 3, WORKSPACE_TUI_RECENT_LOG_LIMIT = 40, WORKSPACE_TUI_RENDER_DEBOUNCE_MS = 16, WORKSPACE_TUI_STATUS_WIDTH = 10, WORKSPACE_TUI_TARGET_PADDING_WIDTH = 6, WORKSPACE_TUI_VISIBILITY_WIDTH = 8;
106
106
  var init_constants = __esm(() => {
107
107
  MILLISECONDS_IN_A_MINUTE = MILLISECONDS_IN_A_SECOND * SECONDS_IN_A_MINUTE;
108
108
  MILLISECONDS_IN_A_DAY = MILLISECONDS_IN_A_SECOND * SECONDS_IN_A_MINUTE * MINUTES_IN_AN_HOUR * HOURS_IN_DAY;
@@ -1367,9 +1367,9 @@ var renderAngularIslandToHtmlInternal = async (component, props, islandId) => {
1367
1367
  }, renderAngularIslandToHtml2, renderReactIslandToHtml = (component, props) => import("react").then(({ createElement }) => import("react-dom/server").then(({ renderToStaticMarkup }) => renderToStaticMarkup(createElement(component, props)))), renderSvelteIslandToHtml = (component, props) => import("svelte/server").then(({ render }) => {
1368
1368
  const { body } = render(component, { props });
1369
1369
  return body;
1370
- }), renderVueIslandToHtml = (component, props) => import("vue").then(({ createSSRApp, h }) => {
1370
+ }), renderVueIslandToHtml = (component, props) => import("vue").then(({ createSSRApp, h: createVueVNode }) => {
1371
1371
  const app = createSSRApp({
1372
- render: () => h(component, props)
1372
+ render: () => createVueVNode(component, props)
1373
1373
  });
1374
1374
  return import("vue/server-renderer").then(({ renderToString }) => renderToString(app));
1375
1375
  });
@@ -41565,9 +41565,11 @@ var DEFAULT_DEVICE_SIZES, DEFAULT_IMAGE_SIZES, DEFAULT_QUALITY = 75, OPTIMIZATIO
41565
41565
  return actual.startsWith(prefix);
41566
41566
  }
41567
41567
  return actual === pattern;
41568
- }, MIME_MAP, callSharp = (sharpRef, input) => {
41569
- const factory = sharpRef;
41570
- return factory(input);
41568
+ }, MIME_MAP, isSharpFactory = (value2) => typeof value2 === "function", callSharp = (sharpRef, input) => {
41569
+ if (!isSharpFactory(sharpRef)) {
41570
+ throw new Error("Loaded sharp module is not callable.");
41571
+ }
41572
+ return sharpRef(input);
41571
41573
  }, toBuffer = (input) => {
41572
41574
  if (Buffer.isBuffer(input))
41573
41575
  return input;
@@ -44572,13 +44574,49 @@ __export(exports_buildAngularVendor, {
44572
44574
  import { mkdirSync as mkdirSync7 } from "fs";
44573
44575
  import { join as join17 } from "path";
44574
44576
  import { rm as rm6 } from "fs/promises";
44575
- var {build: bunBuild4 } = globalThis.Bun;
44576
- var angularSpecifiers, toSafeFileName2 = (specifier) => specifier.replace(/^@/, "").replace(/\//g, "_"), buildAngularVendor = async (buildDir) => {
44577
+ var {build: bunBuild4, Glob: Glob6 } = globalThis.Bun;
44578
+ var REQUIRED_ANGULAR_SPECIFIERS, SERVER_ONLY_ANGULAR_SPECIFIERS, SCAN_SKIP_DIRS, isResolvable2 = (specifier) => {
44579
+ try {
44580
+ Bun.resolveSync(specifier, process.cwd());
44581
+ return true;
44582
+ } catch {
44583
+ return false;
44584
+ }
44585
+ }, isAngularBrowserSpecifier = (spec) => spec.startsWith("@angular/") && !SERVER_ONLY_ANGULAR_SPECIFIERS.has(spec), scanAngularSpecifiers = async (directories) => {
44586
+ const found = new Set;
44587
+ const transpiler4 = new Bun.Transpiler({ loader: "tsx" });
44588
+ const glob = new Glob6("**/*.{ts,tsx,js,jsx}");
44589
+ for (const dir of directories) {
44590
+ try {
44591
+ for await (const file4 of glob.scan({ absolute: true, cwd: dir })) {
44592
+ const rel = file4.slice(dir.length + 1);
44593
+ const [first] = rel.split("/");
44594
+ if (first && SCAN_SKIP_DIRS.has(first))
44595
+ continue;
44596
+ try {
44597
+ const content = await Bun.file(file4).text();
44598
+ for (const imp of transpiler4.scanImports(content)) {
44599
+ if (isAngularBrowserSpecifier(imp.path)) {
44600
+ found.add(imp.path);
44601
+ }
44602
+ }
44603
+ } catch {}
44604
+ }
44605
+ } catch {}
44606
+ }
44607
+ return found;
44608
+ }, toSafeFileName2 = (specifier) => specifier.replace(/^@/, "").replace(/\//g, "_"), resolveAngularSpecifiers = async (directories) => {
44609
+ const discovered = await scanAngularSpecifiers(directories);
44610
+ for (const spec of REQUIRED_ANGULAR_SPECIFIERS)
44611
+ discovered.add(spec);
44612
+ return Array.from(discovered).filter(isResolvable2);
44613
+ }, buildAngularVendor = async (buildDir, directories = []) => {
44577
44614
  const vendorDir = join17(buildDir, "angular", "vendor");
44578
44615
  mkdirSync7(vendorDir, { recursive: true });
44579
44616
  const tmpDir = join17(buildDir, "_angular_vendor_tmp");
44580
44617
  mkdirSync7(tmpDir, { recursive: true });
44581
- const entrypoints = await Promise.all(angularSpecifiers.map(async (specifier) => {
44618
+ const specifiers = await resolveAngularSpecifiers(directories);
44619
+ const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
44582
44620
  const safeName = toSafeFileName2(specifier);
44583
44621
  const entryPath = join17(tmpDir, `${safeName}.ts`);
44584
44622
  await Bun.write(entryPath, `export * from '${specifier}';
@@ -44600,22 +44638,35 @@ var angularSpecifiers, toSafeFileName2 = (specifier) => specifier.replace(/^@/,
44600
44638
  if (!result.success) {
44601
44639
  console.warn("\u26A0\uFE0F Angular vendor build had errors:", result.logs);
44602
44640
  }
44603
- }, computeAngularVendorPaths = () => {
44641
+ return specifiers;
44642
+ }, computeAngularVendorPaths = (specifiers = REQUIRED_ANGULAR_SPECIFIERS) => {
44604
44643
  const paths = {};
44605
- for (const specifier of angularSpecifiers) {
44644
+ for (const specifier of specifiers) {
44606
44645
  paths[specifier] = `/angular/vendor/${toSafeFileName2(specifier)}.js`;
44607
44646
  }
44608
44647
  return paths;
44609
44648
  };
44610
44649
  var init_buildAngularVendor = __esm(() => {
44611
44650
  init_angularLinkerPlugin();
44612
- angularSpecifiers = [
44651
+ REQUIRED_ANGULAR_SPECIFIERS = [
44613
44652
  "@angular/core",
44614
44653
  "@angular/compiler",
44615
44654
  "@angular/common",
44616
44655
  "@angular/common/http",
44617
44656
  "@angular/platform-browser"
44618
44657
  ];
44658
+ SERVER_ONLY_ANGULAR_SPECIFIERS = new Set([
44659
+ "@angular/platform-server",
44660
+ "@angular/ssr",
44661
+ "@angular/compiler-cli"
44662
+ ]);
44663
+ SCAN_SKIP_DIRS = new Set([
44664
+ "node_modules",
44665
+ "build",
44666
+ "dist",
44667
+ ".absolutejs",
44668
+ "generated"
44669
+ ]);
44619
44670
  });
44620
44671
 
44621
44672
  // src/build/buildVueVendor.ts
@@ -44693,14 +44744,14 @@ import { mkdirSync as mkdirSync9 } from "fs";
44693
44744
  import { join as join19 } from "path";
44694
44745
  import { rm as rm8 } from "fs/promises";
44695
44746
  var {build: bunBuild6 } = globalThis.Bun;
44696
- var svelteSpecifiers, isResolvable2 = (specifier) => {
44747
+ var svelteSpecifiers, isResolvable3 = (specifier) => {
44697
44748
  try {
44698
44749
  __require.resolve(specifier);
44699
44750
  return true;
44700
44751
  } catch {
44701
44752
  return false;
44702
44753
  }
44703
- }, resolveVendorSpecifiers2 = () => svelteSpecifiers.filter(isResolvable2), toSafeFileName4 = (specifier) => specifier.replace(/\//g, "_"), buildSvelteVendor = async (buildDir) => {
44754
+ }, resolveVendorSpecifiers2 = () => svelteSpecifiers.filter(isResolvable3), toSafeFileName4 = (specifier) => specifier.replace(/\//g, "_"), buildSvelteVendor = async (buildDir) => {
44704
44755
  const specifiers = resolveVendorSpecifiers2();
44705
44756
  if (specifiers.length === 0)
44706
44757
  return;
@@ -44796,7 +44847,7 @@ import {
44796
44847
  } from "fs";
44797
44848
  import { basename as basename8, dirname as dirname12, join as join20, relative as relative10, resolve as resolve21 } from "path";
44798
44849
  import { cwd, env as env3, exit } from "process";
44799
- var {build: bunBuild7, Glob: Glob6 } = globalThis.Bun;
44850
+ var {build: bunBuild7, Glob: Glob7 } = globalThis.Bun;
44800
44851
  var isDev2, collectConventionSourceFiles = (entry) => {
44801
44852
  if (!entry)
44802
44853
  return [];
@@ -44867,7 +44918,7 @@ var isDev2, collectConventionSourceFiles = (entry) => {
44867
44918
  exit(1);
44868
44919
  }, copyHtmxVendor = (htmxDir, htmxDestDir) => {
44869
44920
  mkdirSync10(htmxDestDir, { recursive: true });
44870
- const glob = new Glob6("htmx*.min.js");
44921
+ const glob = new Glob7("htmx*.min.js");
44871
44922
  for (const relPath of glob.scanSync({ cwd: htmxDir })) {
44872
44923
  const src = join20(htmxDir, relPath);
44873
44924
  const dest = join20(htmxDestDir, "htmx.min.js");
@@ -44885,15 +44936,19 @@ var isDev2, collectConventionSourceFiles = (entry) => {
44885
44936
  resolve21(import.meta.dir, "..", "..", "package.json"),
44886
44937
  resolve21(import.meta.dir, "..", "package.json")
44887
44938
  ];
44888
- for (const candidate of candidates) {
44939
+ const resolveCandidate = async (remaining) => {
44940
+ const [candidate, ...rest] = remaining;
44941
+ if (!candidate) {
44942
+ return;
44943
+ }
44889
44944
  const pkg = await tryReadPackageJson(candidate);
44890
- if (!pkg)
44891
- continue;
44892
- if (pkg.name !== "@absolutejs/absolute")
44893
- continue;
44945
+ if (!pkg || pkg.name !== "@absolutejs/absolute") {
44946
+ await resolveCandidate(rest);
44947
+ return;
44948
+ }
44894
44949
  globalThis.__absoluteVersion = pkg.version;
44895
- return;
44896
- }
44950
+ };
44951
+ await resolveCandidate(candidates);
44897
44952
  }, SKIP_DIRS, addWorkerPathIfExists = (file4, relPath, workerPaths) => {
44898
44953
  const absPath = resolve21(file4, "..", relPath);
44899
44954
  try {
@@ -44915,7 +44970,7 @@ var isDev2, collectConventionSourceFiles = (entry) => {
44915
44970
  collectWorkerPathsFromContent(content, pattern, file4, workerPaths);
44916
44971
  }
44917
44972
  }, scanWorkerReferencesInDir = async (dir, patterns, workerPaths) => {
44918
- const glob = new Glob6("**/*.{ts,tsx,js,jsx,svelte,vue}");
44973
+ const glob = new Glob7("**/*.{ts,tsx,js,jsx,svelte,vue}");
44919
44974
  for await (const file4 of glob.scan({ absolute: true, cwd: dir })) {
44920
44975
  const relToDir = file4.slice(dir.length + 1);
44921
44976
  const [firstSegment] = relToDir.split("/");
@@ -44927,9 +44982,7 @@ var isDev2, collectConventionSourceFiles = (entry) => {
44927
44982
  const urlPattern = /new\s+URL\(\s*["'](\.\.?\/[^"']+)["']\s*,\s*import\.meta\.url\s*\)/g;
44928
44983
  const resolvePattern = /import\.meta\.resolve\(\s*["'](\.\.?\/[^"']+)["']\s*\)/g;
44929
44984
  const workerPaths = new Set;
44930
- for (const dir of dirs) {
44931
- await scanWorkerReferencesInDir(dir, [urlPattern, resolvePattern], workerPaths);
44932
- }
44985
+ await dirs.reduce((chain, dir) => chain.then(() => scanWorkerReferencesInDir(dir, [urlPattern, resolvePattern], workerPaths)), Promise.resolve());
44933
44986
  return [...workerPaths];
44934
44987
  }, copyDevIndexes = async ({
44935
44988
  buildPath,
@@ -45463,7 +45516,7 @@ ${content.slice(firstUseIdx)}`;
45463
45516
  let angularVendorPaths2 = getAngularVendorPaths();
45464
45517
  if (!angularVendorPaths2 && hmr && angularDir) {
45465
45518
  const { computeAngularVendorPaths: computeAngularVendorPaths2 } = await Promise.resolve().then(() => (init_buildAngularVendor(), exports_buildAngularVendor));
45466
- angularVendorPaths2 = computeAngularVendorPaths2();
45519
+ angularVendorPaths2 = computeAngularVendorPaths2(globalThis.__angularVendorSpecifiers);
45467
45520
  setAngularVendorPaths(angularVendorPaths2);
45468
45521
  }
45469
45522
  let vueVendorPaths2 = getVueVendorPaths();
@@ -45541,16 +45594,7 @@ ${content.slice(firstUseIdx)}`;
45541
45594
  "svelte/*",
45542
45595
  "vue",
45543
45596
  "vue/*",
45544
- "@angular/core",
45545
- "@angular/core/*",
45546
- "@angular/common",
45547
- "@angular/common/*",
45548
- "@angular/compiler",
45549
- "@angular/compiler/*",
45550
- "@angular/platform-browser",
45551
- "@angular/platform-browser/*",
45552
- "@angular/platform-server",
45553
- "@angular/platform-server/*",
45597
+ "@angular/*",
45554
45598
  "typescript"
45555
45599
  ],
45556
45600
  format: "esm",
@@ -45604,9 +45648,9 @@ ${content.slice(firstUseIdx)}`;
45604
45648
  entrypoints: globalCssEntries,
45605
45649
  naming: `[dir]/[name].[hash].[ext]`,
45606
45650
  outdir: stylesDir ? join20(buildPath, basename8(stylesDir)) : buildPath,
45651
+ plugins: [stylePreprocessorPlugin2],
45607
45652
  root: stylesDir || clientRoot,
45608
45653
  target: "browser",
45609
- plugins: [stylePreprocessorPlugin2],
45610
45654
  throw: false
45611
45655
  }) : undefined,
45612
45656
  vueCssPaths.length > 0 ? bunBuild7({
@@ -45897,7 +45941,7 @@ var init_build = __esm(() => {
45897
45941
 
45898
45942
  // src/dev/dependencyGraph.ts
45899
45943
  import { existsSync as existsSync19, readFileSync as readFileSync12 } from "fs";
45900
- var {Glob: Glob7 } = globalThis.Bun;
45944
+ var {Glob: Glob8 } = globalThis.Bun;
45901
45945
  import { resolve as resolve23 } from "path";
45902
45946
  var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath) => {
45903
45947
  const lower = filePath.toLowerCase();
@@ -45959,7 +46003,7 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
45959
46003
  dependencies.forEach(addDependent);
45960
46004
  }, IGNORED_SEGMENTS, buildInitialDependencyGraph = (graph, directories) => {
45961
46005
  const processedFiles = new Set;
45962
- const glob = new Glob7("**/*.{ts,tsx,js,jsx,vue,svelte,html,htm}");
46006
+ const glob = new Glob8("**/*.{ts,tsx,js,jsx,vue,svelte,html,htm}");
45963
46007
  const resolvedDirs = directories.map((dir) => resolve23(dir)).filter((dir) => existsSync19(dir));
45964
46008
  const allFiles = resolvedDirs.flatMap((dir) => Array.from(glob.scanSync({ absolute: true, cwd: dir })));
45965
46009
  for (const file4 of allFiles) {
@@ -47886,7 +47930,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, getStyleTr
47886
47930
  if (!angVendorPaths) {
47887
47931
  const { computeAngularVendorPaths: computeAngularVendorPaths2 } = await Promise.resolve().then(() => (init_buildAngularVendor(), exports_buildAngularVendor));
47888
47932
  const { setAngularVendorPaths: setAngularVendorPaths2 } = await Promise.resolve().then(() => exports_devVendorPaths);
47889
- angVendorPaths = computeAngularVendorPaths2();
47933
+ angVendorPaths = computeAngularVendorPaths2(globalThis.__angularVendorSpecifiers);
47890
47934
  setAngularVendorPaths2(angVendorPaths);
47891
47935
  }
47892
47936
  const clientResult = await bunBuild8({
@@ -49154,15 +49198,15 @@ __export(exports_buildDepVendor, {
49154
49198
  import { mkdirSync as mkdirSync11 } from "fs";
49155
49199
  import { join as join22 } from "path";
49156
49200
  import { rm as rm9 } from "fs/promises";
49157
- var {build: bunBuild8, Glob: Glob8 } = globalThis.Bun;
49158
- var toSafeFileName5 = (specifier) => specifier.replace(/\//g, "_").replace(/@/g, "").replace(/-/g, "_"), isResolvable3 = (specifier) => {
49201
+ var {build: bunBuild8, Glob: Glob9 } = globalThis.Bun;
49202
+ var toSafeFileName5 = (specifier) => specifier.replace(/\//g, "_").replace(/@/g, "").replace(/-/g, "_"), isResolvable4 = (specifier) => {
49159
49203
  try {
49160
49204
  Bun.resolveSync(specifier, process.cwd());
49161
49205
  return true;
49162
49206
  } catch {
49163
49207
  return false;
49164
49208
  }
49165
- }, isBareSpecifier = (spec) => !spec.startsWith(".") && !spec.startsWith("/") && !spec.startsWith("@src/"), isAbsolutePackageSpecifier = (spec) => spec === "@absolutejs/absolute" || spec.startsWith("@absolutejs/absolute/"), FRAMEWORK_SPECIFIERS, isSkippedFile = (file4) => file4.includes("node_modules") || file4.includes("/build/") || file4.includes("/dist/") || file4.includes("/indexes/"), isDepSpecifier = (path2) => isBareSpecifier(path2) && !FRAMEWORK_SPECIFIERS.has(path2) && !isAbsolutePackageSpecifier(path2), readFileSpecifiers = async (file4, transpiler4) => {
49209
+ }, isBareSpecifier = (spec) => !spec.startsWith(".") && !spec.startsWith("/") && !spec.startsWith("@src/"), isAbsolutePackageSpecifier = (spec) => spec === "@absolutejs/absolute" || spec.startsWith("@absolutejs/absolute/"), FRAMEWORK_SPECIFIERS, FRAMEWORK_NAMESPACE_PREFIXES, isFrameworkSpecifier = (spec) => FRAMEWORK_SPECIFIERS.has(spec) || FRAMEWORK_NAMESPACE_PREFIXES.some((prefix) => spec.startsWith(prefix)), FRAMEWORK_EXTERNALS, isSkippedFile = (file4) => file4.includes("node_modules") || file4.includes("/build/") || file4.includes("/dist/") || file4.includes("/indexes/"), isDepSpecifier = (path2) => isBareSpecifier(path2) && !isFrameworkSpecifier(path2) && !isAbsolutePackageSpecifier(path2), readFileSpecifiers = async (file4, transpiler4) => {
49166
49210
  const empty = [];
49167
49211
  try {
49168
49212
  const content = await Bun.file(file4).text();
@@ -49172,7 +49216,7 @@ var toSafeFileName5 = (specifier) => specifier.replace(/\//g, "_").replace(/@/g,
49172
49216
  }
49173
49217
  }, scanDirFiles = async (dir) => {
49174
49218
  const empty = [];
49175
- const glob = new Glob8("**/*.{ts,tsx,js,jsx}");
49219
+ const glob = new Glob9("**/*.{ts,tsx,js,jsx}");
49176
49220
  try {
49177
49221
  const all = await Array.fromAsync(glob.scan({ absolute: true, cwd: dir }));
49178
49222
  return all.filter((file4) => !isSkippedFile(file4));
@@ -49189,7 +49233,7 @@ var toSafeFileName5 = (specifier) => specifier.replace(/\//g, "_").replace(/@/g,
49189
49233
  const specifiers = new Set;
49190
49234
  const transpiler4 = new Bun.Transpiler({ loader: "tsx" });
49191
49235
  await Promise.all(directories.map((dir) => collectDirSpecifiers(dir, transpiler4, specifiers)));
49192
- return Array.from(specifiers).filter(isResolvable3);
49236
+ return Array.from(specifiers).filter(isResolvable4);
49193
49237
  }, generateEntrySource2 = (specifier) => `export * from '${specifier}';
49194
49238
  `, rewriteVendorFiles = async (vendorDir) => {
49195
49239
  const { readdirSync: readdirSync2, readFileSync: readFileSync15, writeFileSync: writeFileSync8 } = await import("fs");
@@ -49225,7 +49269,7 @@ var toSafeFileName5 = (specifier) => specifier.replace(/\//g, "_").replace(/@/g,
49225
49269
  }));
49226
49270
  const result = await bunBuild8({
49227
49271
  entrypoints,
49228
- external: [...FRAMEWORK_SPECIFIERS],
49272
+ external: FRAMEWORK_EXTERNALS,
49229
49273
  format: "esm",
49230
49274
  minify: false,
49231
49275
  naming: "[name].[ext]",
@@ -49273,14 +49317,13 @@ var init_buildDepVendor = __esm(() => {
49273
49317
  "svelte/compiler",
49274
49318
  "vue",
49275
49319
  "vue/server-renderer",
49276
- "@vue/compiler-sfc",
49277
- "@angular/core",
49278
- "@angular/common",
49279
- "@angular/compiler",
49280
- "@angular/platform-browser",
49281
- "@angular/platform-server",
49282
- "@angular/ssr"
49320
+ "@vue/compiler-sfc"
49283
49321
  ]);
49322
+ FRAMEWORK_NAMESPACE_PREFIXES = ["@angular/"];
49323
+ FRAMEWORK_EXTERNALS = [
49324
+ ...FRAMEWORK_SPECIFIERS,
49325
+ ...FRAMEWORK_NAMESPACE_PREFIXES.map((prefix) => `${prefix}*`)
49326
+ ];
49284
49327
  });
49285
49328
 
49286
49329
  // src/core/devBuild.ts
@@ -49362,9 +49405,11 @@ var FRAMEWORK_DIR_KEYS, collectDepVendorSourceDirs = (config) => {
49362
49405
  delete target[key];
49363
49406
  }
49364
49407
  }, REBUILD_POLL_MS = 10, waitForRebuild = async (state) => {
49365
- while (state.isRebuilding) {
49366
- await Bun.sleep(REBUILD_POLL_MS);
49408
+ if (!state.isRebuilding) {
49409
+ return;
49367
49410
  }
49411
+ await Bun.sleep(REBUILD_POLL_MS);
49412
+ await waitForRebuild(state);
49368
49413
  }, rebuildManifest = async (cached) => {
49369
49414
  const state = cached.hmrState;
49370
49415
  await waitForRebuild(state);
@@ -49430,12 +49475,25 @@ var FRAMEWORK_DIR_KEYS, collectDepVendorSourceDirs = (config) => {
49430
49475
  resolve34(import.meta.dir, "..", "..", "package.json"),
49431
49476
  resolve34(import.meta.dir, "..", "package.json")
49432
49477
  ];
49433
- for (const candidate of candidates) {
49434
- const found = await tryReadPackageVersion(candidate);
49435
- if (found) {
49436
- return;
49437
- }
49478
+ const [candidate, ...remaining] = candidates;
49479
+ if (!candidate) {
49480
+ return;
49481
+ }
49482
+ const found = await tryReadPackageVersion(candidate);
49483
+ if (found) {
49484
+ return;
49485
+ }
49486
+ await resolveAbsoluteVersionFromCandidates(remaining);
49487
+ }, resolveAbsoluteVersionFromCandidates = async (candidates) => {
49488
+ const [candidate, ...remaining] = candidates;
49489
+ if (!candidate) {
49490
+ return;
49491
+ }
49492
+ const found = await tryReadPackageVersion(candidate);
49493
+ if (found) {
49494
+ return;
49438
49495
  }
49496
+ await resolveAbsoluteVersionFromCandidates(remaining);
49439
49497
  }, loadVendorFiles = async (assetStore, vendorDir, framework) => {
49440
49498
  const emptyStringArray = [];
49441
49499
  const entries = await readdir4(vendorDir).catch(() => emptyStringArray);
@@ -49452,9 +49510,10 @@ var FRAMEWORK_DIR_KEYS, collectDepVendorSourceDirs = (config) => {
49452
49510
  }
49453
49511
  const startupSteps = [];
49454
49512
  const recordStep = (label, startedAt) => {
49513
+ const durationMs = performance.now() - startedAt;
49455
49514
  startupSteps.push({
49456
- label,
49457
- durationMs: performance.now() - startedAt
49515
+ durationMs,
49516
+ label
49458
49517
  });
49459
49518
  };
49460
49519
  let stepStartedAt = performance.now();
@@ -49512,9 +49571,10 @@ var FRAMEWORK_DIR_KEYS, collectDepVendorSourceDirs = (config) => {
49512
49571
  }
49513
49572
  return true;
49514
49573
  }) : undefined;
49515
- const buildAngularVendorTask = config.angularDirectory ? buildAngularVendor(state.resolvedPaths.buildDir).then(async () => {
49574
+ const buildAngularVendorTask = config.angularDirectory ? buildAngularVendor(state.resolvedPaths.buildDir, sourceDirs).then(async (specs) => {
49516
49575
  const vendorDir = resolve34(state.resolvedPaths.buildDir, "angular", "vendor");
49517
49576
  await loadVendorFiles(state.assetStore, vendorDir, "angular");
49577
+ globalThis.__angularVendorSpecifiers = specs;
49518
49578
  return true;
49519
49579
  }) : undefined;
49520
49580
  const buildSvelteVendorTask = config.svelteDirectory ? buildSvelteVendor(state.resolvedPaths.buildDir).then(async () => {
@@ -51029,14 +51089,21 @@ var NOT_FOUND_PRIORITY = [
51029
51089
  "angular"
51030
51090
  ];
51031
51091
  var renderFirstNotFound = async () => {
51032
- for (const framework of NOT_FOUND_PRIORITY) {
51033
- if (!getMap()[framework]?.defaults?.notFound)
51034
- continue;
51092
+ const renderNext = async (frameworks2) => {
51093
+ const [framework, ...remaining] = frameworks2;
51094
+ if (!framework) {
51095
+ return null;
51096
+ }
51097
+ if (!getMap()[framework]?.defaults?.notFound) {
51098
+ return renderNext(remaining);
51099
+ }
51035
51100
  const response = await renderConventionNotFound(framework);
51036
- if (response)
51101
+ if (response) {
51037
51102
  return response;
51038
- }
51039
- return null;
51103
+ }
51104
+ return renderNext(remaining);
51105
+ };
51106
+ return renderNext(NOT_FOUND_PRIORITY);
51040
51107
  };
51041
51108
 
51042
51109
  // src/core/prepare.ts
@@ -51064,10 +51131,10 @@ var buildPrewarmDirs = (config) => {
51064
51131
  return dirs;
51065
51132
  };
51066
51133
  var collectPrewarmFiles = async (prewarmDirs) => {
51067
- const { Glob: Glob9 } = await Promise.resolve(globalThis.Bun);
51134
+ const { Glob: Glob10 } = await Promise.resolve(globalThis.Bun);
51068
51135
  const files = [];
51069
51136
  for (const { dir, pattern } of prewarmDirs) {
51070
- const glob = new Glob9(pattern);
51137
+ const glob = new Glob10(pattern);
51071
51138
  const matches = [
51072
51139
  ...glob.scanSync({ absolute: true, cwd: resolve37(dir) })
51073
51140
  ];
@@ -51115,9 +51182,10 @@ var patchManifestIndexes = (manifest, devIndexDir, SRC_URL_PREFIX2) => {
51115
51182
  var prepareDev = async (config, buildDir) => {
51116
51183
  const startupSteps = [];
51117
51184
  const recordStep = (label, startedAt) => {
51185
+ const durationMs = performance.now() - startedAt;
51118
51186
  startupSteps.push({
51119
- label,
51120
- durationMs: performance.now() - startedAt
51187
+ durationMs,
51188
+ label
51121
51189
  });
51122
51190
  };
51123
51191
  let stepStartedAt = performance.now();
@@ -51247,9 +51315,10 @@ var createNotFoundPlugin = () => new Elysia5({ name: "absolutejs-not-found" }).o
51247
51315
  var prepare = async (configOrPath) => {
51248
51316
  const startupSteps = [];
51249
51317
  const recordStep = (label, startedAt) => {
51318
+ const durationMs = performance.now() - startedAt;
51250
51319
  startupSteps.push({
51251
- label,
51252
- durationMs: performance.now() - startedAt
51320
+ durationMs,
51321
+ label
51253
51322
  });
51254
51323
  };
51255
51324
  let stepStartedAt = performance.now();
@@ -51311,7 +51380,9 @@ var prepare = async (configOrPath) => {
51311
51380
  const age = Date.now() - renderedAt;
51312
51381
  if (revalidateMs > 0 && renderedAt > 0 && age > revalidateMs) {
51313
51382
  rerendering.add(url.pathname);
51314
- rerenderRoute2(url.pathname, port, prerenderDir).catch(() => {}).finally(() => rerendering.delete(url.pathname));
51383
+ rerenderRoute2(url.pathname, port, prerenderDir).catch(() => {
51384
+ return;
51385
+ }).finally(() => rerendering.delete(url.pathname));
51315
51386
  }
51316
51387
  return new Response(Bun.file(filePath), {
51317
51388
  headers: { "content-type": "text/html; charset=utf-8" }
@@ -57954,8 +58025,9 @@ export {
57954
58025
  BASE_36_RADIX,
57955
58026
  ASCII_SPACE,
57956
58027
  ANSI_ESCAPE_LENGTH,
58028
+ ANSI_ESCAPE_CODE,
57957
58029
  ANGULAR_INIT_TIMEOUT_MS
57958
58030
  };
57959
58031
 
57960
- //# debugId=3B17CAB7CFFAB95364756E2164756E21
58032
+ //# debugId=00ECB0441FCD5AB464756E2164756E21
57961
58033
  //# sourceMappingURL=index.js.map