@absolutejs/absolute 0.20.0-beta.126 → 0.20.0-beta.128

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 (44) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +19 -0
  3. package/changelog.json +36 -0
  4. package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
  5. package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
  6. package/dist/angular/index.js +88 -35
  7. package/dist/angular/index.js.map +8 -7
  8. package/dist/angular/server.js +88 -35
  9. package/dist/angular/server.js.map +8 -7
  10. package/dist/build/buildWorker.js +9 -3
  11. package/dist/build.js +342 -263
  12. package/dist/build.js.map +14 -12
  13. package/dist/cli/{compile-smcnjyhb.js → compile-0epdbdcx.js} +1 -1
  14. package/dist/cli/config/server.js +91 -52
  15. package/dist/cli/{index-9q8yn5ax.js → index-54q7pxcx.js} +1 -0
  16. package/dist/cli/{index-fx42yxhy.js → index-79ppyst7.js} +1 -1
  17. package/dist/cli/index.js +4 -4
  18. package/dist/cli/{mobile-50c5tahh.js → mobile-49hyrgrj.js} +1 -1
  19. package/dist/cli/{prerender-vvrj9vjg.js → prerender-yex2zwj3.js} +1 -1
  20. package/dist/cli/{start-pdacfgcc.js → start-m0p0qbep.js} +1 -1
  21. package/dist/index.js +362 -279
  22. package/dist/index.js.map +17 -14
  23. package/dist/islands/index.js +10 -4
  24. package/dist/islands/index.js.map +5 -4
  25. package/dist/mobile/remoteMacAgentEntry.js +1 -1
  26. package/dist/react/index.js +114 -61
  27. package/dist/react/index.js.map +8 -7
  28. package/dist/react/server.js +105 -58
  29. package/dist/react/server.js.map +6 -6
  30. package/dist/src/core/requestContext.d.ts +5 -10
  31. package/dist/src/dev/restartScope.d.ts +1 -0
  32. package/dist/src/utils/index.d.ts +1 -0
  33. package/dist/src/utils/isFile.d.ts +4 -0
  34. package/dist/src/utils/isPrerendering.d.ts +5 -0
  35. package/dist/src/utils/ssrErrorPage.d.ts +3 -0
  36. package/dist/svelte/index.js +114 -61
  37. package/dist/svelte/index.js.map +8 -7
  38. package/dist/svelte/server.js +105 -58
  39. package/dist/svelte/server.js.map +6 -6
  40. package/dist/vue/index.js +114 -61
  41. package/dist/vue/index.js.map +8 -7
  42. package/dist/vue/server.js +105 -58
  43. package/dist/vue/server.js.map +6 -6
  44. package/package.json +2 -2
@@ -371,9 +371,16 @@ var init_inlinePageCss = __esm(() => {
371
371
  // src/utils/ssrErrorPage.ts
372
372
  var exports_ssrErrorPage = {};
373
373
  __export(exports_ssrErrorPage, {
374
+ buildErrorPage: () => buildErrorPage,
374
375
  ssrErrorPage: () => ssrErrorPage
375
376
  });
376
- var ssrErrorPage = (framework, error) => {
377
+ var errorPageHtml = ({
378
+ framework,
379
+ hint,
380
+ kind,
381
+ message,
382
+ script = ""
383
+ }) => {
377
384
  const frameworkColors = {
378
385
  angular: "#dd0031",
379
386
  html: "#e34c26",
@@ -384,7 +391,6 @@ var ssrErrorPage = (framework, error) => {
384
391
  };
385
392
  const accent = frameworkColors[framework] ?? "#94a3b8";
386
393
  const label = framework.charAt(0).toUpperCase() + framework.slice(1);
387
- const message = error instanceof Error ? error.message : String(error);
388
394
  return `<!DOCTYPE html>
389
395
  <html>
390
396
  <head>
@@ -412,17 +418,31 @@ body{min-height:100vh;background:linear-gradient(135deg,rgba(15,23,42,0.98) 0%,r
412
418
  <span class="brand">AbsoluteJS</span>
413
419
  <span class="badge">${label}</span>
414
420
  </div>
415
- <span class="kind">Server Render Error</span>
421
+ <span class="kind">${kind}</span>
416
422
  </div>
417
423
  <div class="content">
418
424
  <div class="label">What went wrong</div>
419
425
  <pre class="message">${message.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;")}</pre>
420
- <div class="hint">A component threw during server-side rendering. Check the terminal for the full stack trace.</div>
426
+ <div class="hint">${hint}</div>
421
427
  </div>
422
428
  </div>
429
+ ${script}
423
430
  </body>
424
431
  </html>`;
425
- };
432
+ }, RELOAD_ON_REBUILD = `<script>(()=>{const url=(location.protocol==='https:'?'wss://':'ws://')+location.host+'/hmr';let seen=false;const connect=()=>{const socket=new WebSocket(url);socket.onopen=()=>{if(seen)location.reload();seen=true;};socket.onmessage=(event)=>{try{const message=JSON.parse(event.data);const type=message&&typeof message.type==='string'?message.type:'';if(type==='rebuild-complete'||type==='server-entry-reloaded'||type.endsWith('-update'))location.reload();}catch{}};socket.onclose=()=>setTimeout(connect,500);};connect();})();</script>`, buildErrorPage = (framework, pageName, error) => errorPageHtml({
433
+ framework,
434
+ hint: "Fix the file and save. This page reloads by itself when the build succeeds.",
435
+ kind: "Build Error",
436
+ message: `${pageName || "This page"} could not be built.
437
+
438
+ ${error ?? "The dev-server terminal has the build output."}`,
439
+ script: RELOAD_ON_REBUILD
440
+ }), ssrErrorPage = (framework, error) => errorPageHtml({
441
+ framework,
442
+ hint: "A component threw during server-side rendering. Check the terminal for the full stack trace.",
443
+ kind: "Server Render Error",
444
+ message: error instanceof Error ? error.message : String(error)
445
+ });
426
446
 
427
447
  // src/utils/stringModifiers.ts
428
448
  var normalizeSlug = (str) => str.trim().replace(/\s+/g, "-").replace(/[^A-Za-z0-9\-_]+/g, "").replace(/[-_]{2,}/g, "-"), toKebab = (str) => normalizeSlug(str).replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), toPascal = (str) => {
@@ -2877,6 +2897,11 @@ var init_svelteServerModule = __esm(() => {
2877
2897
  });
2878
2898
  });
2879
2899
 
2900
+ // src/utils/isFile.ts
2901
+ import { statSync } from "fs";
2902
+ var isFile = (path) => statSync(path, { throwIfNoEntry: false })?.isFile() ?? false;
2903
+ var init_isFile = () => {};
2904
+
2880
2905
  // src/utils/vueCompiler.ts
2881
2906
  var exports_vueCompiler = {};
2882
2907
  __export(exports_vueCompiler, {
@@ -2895,7 +2920,7 @@ var createVueCompiler = async () => {
2895
2920
  };
2896
2921
 
2897
2922
  // src/core/vueServerModule.ts
2898
- import { existsSync as existsSync4, readFileSync as readFileSync4, realpathSync } from "fs";
2923
+ import { readFileSync as readFileSync4, realpathSync } from "fs";
2899
2924
  import { mkdir as mkdir3 } from "fs/promises";
2900
2925
  import { dirname as dirname4, join as join7, relative as relative4, resolve as resolve5 } from "path";
2901
2926
  var {Transpiler } = globalThis.Bun;
@@ -2942,9 +2967,9 @@ var ISLAND_COMPONENT_ID_LENGTH = 8, serverCacheRoot3, compiledModuleCache3, tran
2942
2967
  const hasScript = descriptor.script || descriptor.scriptSetup;
2943
2968
  const compiledScript = hasScript ? compiler.compileScript(descriptor, {
2944
2969
  fs: {
2945
- fileExists: existsSync4,
2970
+ fileExists: isFile,
2946
2971
  realpath: realpathSync,
2947
- readFile: (file) => existsSync4(file) ? readFileSync4(file, "utf-8") : undefined
2972
+ readFile: (file) => isFile(file) ? readFileSync4(file, "utf-8") : undefined
2948
2973
  },
2949
2974
  id: componentId,
2950
2975
  inlineTemplate: false
@@ -2989,6 +3014,7 @@ var ISLAND_COMPONENT_ID_LENGTH = 8, serverCacheRoot3, compiledModuleCache3, tran
2989
3014
  };
2990
3015
  var init_vueServerModule = __esm(() => {
2991
3016
  init_constants();
3017
+ init_isFile();
2992
3018
  serverCacheRoot3 = join7(process.cwd(), ".absolutejs", "islands", "vue");
2993
3019
  compiledModuleCache3 = new Map;
2994
3020
  transpiler2 = new Transpiler({ loader: "ts", target: "browser" });
@@ -3321,6 +3347,19 @@ var init_devRouteRegistrationCallsite = __esm(() => {
3321
3347
  });
3322
3348
 
3323
3349
  // src/core/requestContext.ts
3350
+ var exports_requestContext = {};
3351
+ __export(exports_requestContext, {
3352
+ absoluteRequestContext: () => absoluteRequestContext,
3353
+ devBuildErrorResponse: () => devBuildErrorResponse,
3354
+ getCurrentAbsoluteRequest: () => getCurrentAbsoluteRequest,
3355
+ getDevPageWarmer: () => getDevPageWarmer,
3356
+ getMissingAssets: () => getMissingAssets,
3357
+ recordMissingAsset: () => recordMissingAsset,
3358
+ resolveDeferredPageAssets: () => resolveDeferredPageAssets,
3359
+ runWithAbsoluteRequest: () => runWithAbsoluteRequest,
3360
+ setDevPageWarmer: () => setDevPageWarmer,
3361
+ withDeferredStylesheets: () => withDeferredStylesheets
3362
+ });
3324
3363
  import { AsyncLocalStorage as AsyncLocalStorage2 } from "async_hooks";
3325
3364
  import { Elysia as Elysia2 } from "elysia";
3326
3365
  var REQUEST_STORAGE_KEY, PAGE_WARMER_KEY, isAbsoluteRequestStorage = (value) => typeof value === "object" && value !== null && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function", getRequestStorage = () => {
@@ -3333,7 +3372,17 @@ var REQUEST_STORAGE_KEY, PAGE_WARMER_KEY, isAbsoluteRequestStorage = (value) =>
3333
3372
  const storage = new AsyncLocalStorage2;
3334
3373
  Reflect.set(globalThis, REQUEST_STORAGE_KEY, storage);
3335
3374
  return storage;
3336
- }, absoluteRequestContext, getCurrentAbsoluteRequest = () => getRequestStorage()?.getStore()?.request, runWithAbsoluteRequest = (request, callback) => ensureRequestStorage().run({ request }, callback), CSS_KEY_RE, isDevPageWarmer = (value) => typeof value === "object" && value !== null && ("describe" in value) && typeof value.describe === "function" && ("warm" in value) && typeof value.warm === "function" && ("lookup" in value) && typeof value.lookup === "function", getDevPageWarmer = () => {
3375
+ }, absoluteRequestContext, getCurrentAbsoluteRequest = () => getRequestStorage()?.getStore()?.request, runWithAbsoluteRequest = (request, callback) => ensureRequestStorage().run({ request }, callback), CSS_KEY_RE, isDevPageWarmer = (value) => typeof value === "object" && value !== null && ("describe" in value) && typeof value.describe === "function" && ("warm" in value) && typeof value.warm === "function" && ("lookup" in value) && typeof value.lookup === "function", devBuildErrorResponse = (framework, assets) => {
3376
+ if (!assets?.failed)
3377
+ return null;
3378
+ return new Response(buildErrorPage(framework, assets.name, assets.error), {
3379
+ headers: {
3380
+ "cache-control": "no-store",
3381
+ "content-type": "text/html; charset=utf-8"
3382
+ },
3383
+ status: 500
3384
+ });
3385
+ }, getDevPageWarmer = () => {
3337
3386
  const value = Reflect.get(globalThis, PAGE_WARMER_KEY);
3338
3387
  return isDevPageWarmer(value) ? value : undefined;
3339
3388
  }, getMissingAssets = () => {
@@ -3363,6 +3412,7 @@ var REQUEST_STORAGE_KEY, PAGE_WARMER_KEY, isAbsoluteRequestStorage = (value) =>
3363
3412
  const cssHrefs = () => cssKeys.map(lookup).filter((href) => href.length > 0 && href.startsWith("/"));
3364
3413
  const assets = {
3365
3414
  cssHrefs,
3415
+ error: failed ? warmer.lastError?.() : undefined,
3366
3416
  failed,
3367
3417
  lookup,
3368
3418
  name: described.name
@@ -5177,7 +5227,7 @@ __export(exports_compileAngular, {
5177
5227
  compileAngularFiles: () => compileAngularFiles,
5178
5228
  invalidateAngularJitCache: () => invalidateAngularJitCache
5179
5229
  });
5180
- import { existsSync as existsSync5, readFileSync as readFileSync5, promises as fs } from "fs";
5230
+ import { existsSync as existsSync4, readFileSync as readFileSync5, promises as fs } from "fs";
5181
5231
  import { join as join9, basename as basename4, sep, dirname as dirname5, resolve as resolve6, relative as relative5 } from "path";
5182
5232
  var {Glob } = globalThis.Bun;
5183
5233
  import ts from "typescript";
@@ -5234,7 +5284,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
5234
5284
  join9(candidate, "index.js"),
5235
5285
  join9(candidate, "index.jsx")
5236
5286
  ];
5237
- return candidates.find((file) => existsSync5(file));
5287
+ return candidates.find((file) => existsSync4(file));
5238
5288
  }, createLegacyAngularAnimationUsageResolver = (rootDir) => {
5239
5289
  const baseDir = resolve6(rootDir);
5240
5290
  const tsconfigAliases = readTsconfigPathAliases();
@@ -5315,11 +5365,11 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
5315
5365
  }, resolveDevClientDir = () => {
5316
5366
  const projectRoot = process.cwd();
5317
5367
  const fromSource = resolve6(import.meta.dir, "../dev/client");
5318
- if (existsSync5(fromSource) && fromSource.startsWith(projectRoot)) {
5368
+ if (existsSync4(fromSource) && fromSource.startsWith(projectRoot)) {
5319
5369
  return fromSource;
5320
5370
  }
5321
5371
  const fromNodeModules = resolve6(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
5322
- if (existsSync5(fromNodeModules))
5372
+ if (existsSync4(fromNodeModules))
5323
5373
  return fromNodeModules;
5324
5374
  return resolve6(import.meta.dir, "./dev/client");
5325
5375
  }, devClientDir, hmrClientPath, formatDiagnosticMessage = (diagnostic) => {
@@ -5365,11 +5415,11 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
5365
5415
  return `${path}${query}`;
5366
5416
  const importerDir = dirname5(importerOutputPath);
5367
5417
  const fileCandidate = resolve6(importerDir, `${path}.js`);
5368
- if (outputFiles?.has(fileCandidate) || existsSync5(fileCandidate)) {
5418
+ if (outputFiles?.has(fileCandidate) || existsSync4(fileCandidate)) {
5369
5419
  return `${path}.js${query}`;
5370
5420
  }
5371
5421
  const indexCandidate = resolve6(importerDir, path, "index.js");
5372
- if (outputFiles?.has(indexCandidate) || existsSync5(indexCandidate)) {
5422
+ if (outputFiles?.has(indexCandidate) || existsSync4(indexCandidate)) {
5373
5423
  return `${path}/index.js${query}`;
5374
5424
  }
5375
5425
  return `${path}.js${query}`;
@@ -5407,7 +5457,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
5407
5457
  join9(basePath, "index.mts"),
5408
5458
  join9(basePath, "index.cts")
5409
5459
  ];
5410
- return candidates.map((candidate) => resolve6(candidate)).find((candidate) => existsSync5(candidate) && !candidate.endsWith(".d.ts")) ?? null;
5460
+ return candidates.map((candidate) => resolve6(candidate)).find((candidate) => existsSync4(candidate) && !candidate.endsWith(".d.ts")) ?? null;
5411
5461
  }, readFileForAotTransform = async (fileName, readFile2) => {
5412
5462
  const hostSource = readFile2?.(fileName);
5413
5463
  if (typeof hostSource === "string")
@@ -5488,7 +5538,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
5488
5538
  if (visited.has(resolvedPath))
5489
5539
  return;
5490
5540
  visited.add(resolvedPath);
5491
- if (!existsSync5(resolvedPath) || resolvedPath.endsWith(".d.ts"))
5541
+ if (!existsSync4(resolvedPath) || resolvedPath.endsWith(".d.ts"))
5492
5542
  return;
5493
5543
  stats.filesVisited += 1;
5494
5544
  const source = await readFileForAotTransform(resolvedPath, readFile2);
@@ -5662,7 +5712,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
5662
5712
  return null;
5663
5713
  }, resolveAngularDeferImportSpecifier = () => {
5664
5714
  const sourceEntry = resolve6(import.meta.dir, "../angular/components/index.ts");
5665
- if (existsSync5(sourceEntry)) {
5715
+ if (existsSync4(sourceEntry)) {
5666
5716
  return sourceEntry.replace(/\\/g, "/");
5667
5717
  }
5668
5718
  return "@absolutejs/absolute/angular/components";
@@ -5790,7 +5840,7 @@ ${slot.resolvedBindings.map((binding) => ` "${binding.key}": this.__absoluteDef
5790
5840
  ${fields}
5791
5841
  `);
5792
5842
  }, readAndEscapeFile = async (filePath, stylePreprocessors) => {
5793
- if (!existsSync5(filePath)) {
5843
+ if (!existsSync4(filePath)) {
5794
5844
  throw new Error(`Unable to inline Angular style resource: file not found at ${filePath}`);
5795
5845
  }
5796
5846
  const content = await compileStyleFileIfNeeded(filePath, stylePreprocessors);
@@ -5799,7 +5849,7 @@ ${fields}
5799
5849
  const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
5800
5850
  if (templateUrlMatch?.[1]) {
5801
5851
  const templatePath = join9(fileDir, templateUrlMatch[1]);
5802
- if (!existsSync5(templatePath)) {
5852
+ if (!existsSync4(templatePath)) {
5803
5853
  throw new Error(`Unable to inline Angular templateUrl "${templateUrlMatch[1]}": file not found at ${templatePath}`);
5804
5854
  }
5805
5855
  const templateRaw2 = await fs.readFile(templatePath, "utf-8");
@@ -5830,7 +5880,7 @@ ${fields}
5830
5880
  const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
5831
5881
  if (templateUrlMatch?.[1]) {
5832
5882
  const templatePath = join9(fileDir, templateUrlMatch[1]);
5833
- if (!existsSync5(templatePath)) {
5883
+ if (!existsSync4(templatePath)) {
5834
5884
  throw new Error(`Unable to inline Angular templateUrl "${templateUrlMatch[1]}": file not found at ${templatePath}`);
5835
5885
  }
5836
5886
  const templateRaw2 = readFileSync5(templatePath, "utf-8");
@@ -5978,7 +6028,7 @@ ${fields}
5978
6028
  join9(candidate, "index.js"),
5979
6029
  join9(candidate, "index.jsx")
5980
6030
  ];
5981
- return candidates.find((file) => existsSync5(file));
6031
+ return candidates.find((file) => existsSync4(file));
5982
6032
  };
5983
6033
  const resolveLocalImport = (specifier, fromDir) => {
5984
6034
  if (specifier.startsWith(".") || specifier.startsWith("/")) {
@@ -6053,7 +6103,7 @@ ${fields}
6053
6103
  if (visited.has(resolved))
6054
6104
  return;
6055
6105
  visited.add(resolved);
6056
- if (resolved.endsWith(".json") && existsSync5(resolved)) {
6106
+ if (resolved.endsWith(".json") && existsSync4(resolved)) {
6057
6107
  const inputDir2 = dirname5(resolved);
6058
6108
  const relativeDir2 = inputDir2.startsWith(baseDir) ? inputDir2.substring(baseDir.length + 1) : inputDir2;
6059
6109
  const targetDir2 = join9(outDir, relativeDir2);
@@ -6066,7 +6116,7 @@ ${fields}
6066
6116
  let actualPath = resolved;
6067
6117
  if (!actualPath.endsWith(".ts"))
6068
6118
  actualPath += ".ts";
6069
- if (!existsSync5(actualPath))
6119
+ if (!existsSync4(actualPath))
6070
6120
  return;
6071
6121
  let sourceCode = await fs.readFile(actualPath, "utf-8");
6072
6122
  const inlined = await inlineResources(sourceCode, dirname5(actualPath), stylePreprocessors);
@@ -6104,7 +6154,7 @@ ${fields}
6104
6154
  const isEntry = resolve6(actualPath) === resolve6(entryPath);
6105
6155
  const contentHash = Bun.hash(sourceCode).toString(BASE_36_RADIX);
6106
6156
  const cacheKey2 = actualPath;
6107
- const shouldWriteFile = cacheBuster && isEntry ? true : jitContentCache.get(cacheKey2) !== contentHash || !existsSync5(targetPath);
6157
+ const shouldWriteFile = cacheBuster && isEntry ? true : jitContentCache.get(cacheKey2) !== contentHash || !existsSync4(targetPath);
6108
6158
  if (shouldWriteFile) {
6109
6159
  const processedContent = transpileAndRewrite(sourceCode, relativeDir, actualPath, importRewrites);
6110
6160
  const preservedInjection = await readPreservedInjection(targetPath);
@@ -6117,7 +6167,7 @@ ${fields}
6117
6167
  };
6118
6168
  await transpileFile(inputPath);
6119
6169
  const entryOutputPath = toOutputPath(entryPath);
6120
- if (existsSync5(entryOutputPath)) {
6170
+ if (existsSync4(entryOutputPath)) {
6121
6171
  const entryOutput = await fs.readFile(entryOutputPath, "utf-8");
6122
6172
  const withoutLegacyFlag = entryOutput.replace(/\nexport const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;\n?/g, `
6123
6173
  `);
@@ -6143,7 +6193,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
6143
6193
  await traceAngularPhase("aot/copy-json-resources", async () => {
6144
6194
  const cwd = process.cwd();
6145
6195
  const angularSrcDir = resolve6(outRoot);
6146
- if (!existsSync5(angularSrcDir))
6196
+ if (!existsSync4(angularSrcDir))
6147
6197
  return;
6148
6198
  const jsonGlob = new Glob("**/*.json");
6149
6199
  for (const rel of jsonGlob.scanSync({
@@ -6178,15 +6228,15 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
6178
6228
  ...candidatePaths.map((file) => resolve6(file)),
6179
6229
  ...compiledFallbackPaths
6180
6230
  ];
6181
- let candidate = normalizedCandidates.find((file) => existsSync5(file) && file.endsWith(`${sep}${relativeEntry}`));
6231
+ let candidate = normalizedCandidates.find((file) => existsSync4(file) && file.endsWith(`${sep}${relativeEntry}`));
6182
6232
  if (!candidate) {
6183
- candidate = normalizedCandidates.find((file) => existsSync5(file) && file.endsWith(`${sep}pages${sep}${jsName}`));
6233
+ candidate = normalizedCandidates.find((file) => existsSync4(file) && file.endsWith(`${sep}pages${sep}${jsName}`));
6184
6234
  }
6185
6235
  if (!candidate) {
6186
- candidate = normalizedCandidates.find((file) => existsSync5(file) && file.endsWith(`${sep}${jsName}`));
6236
+ candidate = normalizedCandidates.find((file) => existsSync4(file) && file.endsWith(`${sep}${jsName}`));
6187
6237
  }
6188
6238
  if (!candidate) {
6189
- candidate = normalizedCandidates.find((file) => existsSync5(file));
6239
+ candidate = normalizedCandidates.find((file) => existsSync4(file));
6190
6240
  }
6191
6241
  return candidate;
6192
6242
  };
@@ -6194,11 +6244,11 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
6194
6244
  if (!rawServerFile) {
6195
6245
  rawServerFile = await traceAngularPhase("wrapper/resolve-server-output-fallback", () => resolveRawServerFile([]), { entry: resolvedEntry });
6196
6246
  }
6197
- if (rawServerFile && !existsSync5(rawServerFile)) {
6247
+ if (rawServerFile && !existsSync4(rawServerFile)) {
6198
6248
  outputs = hmr ? await compileEntry() : aotOutputs;
6199
6249
  rawServerFile = await traceAngularPhase("wrapper/resolve-server-output-retry", () => resolveRawServerFile(outputs), { entry: resolvedEntry });
6200
6250
  }
6201
- if (!rawServerFile || !existsSync5(rawServerFile)) {
6251
+ if (!rawServerFile || !existsSync4(rawServerFile)) {
6202
6252
  throw new Error(`Compiled output not found for ${entry}. Looking for: ${jsName}. Available: ${[
6203
6253
  ...outputs,
6204
6254
  ...compiledFallbackPaths
@@ -6234,7 +6284,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
6234
6284
  const serverContentHash = `${Bun.hash(original).toString(BASE_36_RADIX)}.${Bun.hash(providersHashInput).toString(BASE_36_RADIX)}`;
6235
6285
  const cachedWrapper = wrapperOutputCache.get(resolvedEntry);
6236
6286
  const clientFile = join9(indexesDir, jsName);
6237
- if (hmr && cachedWrapper && cachedWrapper.serverHash === serverContentHash && existsSync5(clientFile) && (usesLegacyAnimations || !original.includes("__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__")) && (!usesLegacyAnimations || original.includes("__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__"))) {
6287
+ if (hmr && cachedWrapper && cachedWrapper.serverHash === serverContentHash && existsSync4(clientFile) && (usesLegacyAnimations || !original.includes("__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__")) && (!usesLegacyAnimations || original.includes("__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__"))) {
6238
6288
  return {
6239
6289
  clientPath: clientFile,
6240
6290
  indexUnchanged: true,
@@ -7192,6 +7242,9 @@ var handleAngularPageRequest = async (input) => {
7192
7242
  const requestId = `angular_${Date.now()}_${Math.random().toString(BASE_36_RADIX).substring(2, RANDOM_ID_END_INDEX)}`;
7193
7243
  const request = input.request ?? getCurrentAbsoluteRequest();
7194
7244
  const deferredAssets = input.pagePath === "" || input.indexPath === "" ? await resolveDeferredPageAssets() : null;
7245
+ const buildFailure = devBuildErrorResponse("angular", deferredAssets);
7246
+ if (buildFailure)
7247
+ return buildFailure;
7195
7248
  const deferredPagePath = deferredAssets && input.pagePath === "" ? deferredAssets.lookup(deferredAssets.name) : input.pagePath;
7196
7249
  const deferredIndexPath = deferredAssets && input.indexPath === "" ? deferredAssets.lookup(`${deferredAssets.name}Index`) : input.indexPath;
7197
7250
  const pageName = deferredAssets?.name ?? derivePageName(deferredPagePath);
@@ -7319,5 +7372,5 @@ export {
7319
7372
  withPendingTask
7320
7373
  };
7321
7374
 
7322
- //# debugId=D3825F6D3D908B1464756E2164756E21
7375
+ //# debugId=FA925CD22D8D7B2864756E2164756E21
7323
7376
  //# sourceMappingURL=server.js.map