@absolutejs/absolute 0.19.0-beta.1022 → 0.19.0-beta.1024

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 (38) hide show
  1. package/dist/angular/browser.js +13 -17
  2. package/dist/angular/browser.js.map +3 -3
  3. package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
  4. package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
  5. package/dist/angular/index.js +595 -267
  6. package/dist/angular/index.js.map +11 -8
  7. package/dist/angular/server.js +577 -249
  8. package/dist/angular/server.js.map +11 -8
  9. package/dist/build.js +865 -755
  10. package/dist/build.js.map +12 -11
  11. package/dist/cli/config/server.js +49 -42
  12. package/dist/client/index.js +34 -20
  13. package/dist/client/index.js.map +6 -6
  14. package/dist/index.js +922 -805
  15. package/dist/index.js.map +13 -12
  16. package/dist/islands/index.js +416 -95
  17. package/dist/islands/index.js.map +10 -7
  18. package/dist/react/browser.js +13 -17
  19. package/dist/react/browser.js.map +3 -3
  20. package/dist/react/index.js +484 -156
  21. package/dist/react/index.js.map +12 -9
  22. package/dist/react/server.js +69 -62
  23. package/dist/react/server.js.map +5 -5
  24. package/dist/src/client/preserveIslandMarkup.d.ts +4 -1
  25. package/dist/src/core/angularServerModule.d.ts +1 -0
  26. package/dist/svelte/index.js +389 -61
  27. package/dist/svelte/index.js.map +11 -8
  28. package/dist/svelte/server.js +50 -43
  29. package/dist/svelte/server.js.map +3 -3
  30. package/dist/types/angular.d.ts +3 -0
  31. package/dist/types/globals.d.ts +0 -1
  32. package/dist/vue/browser.js +13 -17
  33. package/dist/vue/browser.js.map +3 -3
  34. package/dist/vue/index.js +477 -153
  35. package/dist/vue/index.js.map +12 -9
  36. package/dist/vue/server.js +50 -43
  37. package/dist/vue/server.js.map +3 -3
  38. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -6839,9 +6839,12 @@ var initDominoAdapter = (platformServer) => {
6839
6839
  return {
6840
6840
  APP_BASE_HREF: common.APP_BASE_HREF,
6841
6841
  bootstrapApplication: platformBrowser.bootstrapApplication,
6842
+ Component: core.Component,
6842
6843
  DomSanitizer: platformBrowser.DomSanitizer,
6843
6844
  ENVIRONMENT_INITIALIZER: core.ENVIRONMENT_INITIALIZER,
6844
6845
  inject: core.inject,
6846
+ InjectionToken: core.InjectionToken,
6847
+ NgComponentOutlet: common.NgComponentOutlet,
6845
6848
  provideClientHydration: platformBrowser.provideClientHydration,
6846
6849
  provideServerRendering: platformServer.provideServerRendering,
6847
6850
  provideZonelessChangeDetection: core.provideZonelessChangeDetection,
@@ -7097,9 +7100,8 @@ var angularIslandSelector = "abs-angular-island", isAngularComponent = (value) =
7097
7100
  const componentName = typeof component.name === "string" && component.name.length > 0 ? component.name : "AngularIsland";
7098
7101
  return `${componentName}:${JSON.stringify(props)}`;
7099
7102
  }, buildAngularIslandWrapperMetadata = async (component, islandId, wrapperKey) => {
7100
- const { Component, InjectionToken, inject } = await import("@angular/core");
7101
- const { NgComponentOutlet } = await import("@angular/common");
7102
7103
  const deps = await getAngularDeps();
7104
+ const { Component, InjectionToken, NgComponentOutlet, inject } = deps;
7103
7105
  const selector = getAngularIslandSelector(islandId);
7104
7106
  const propsToken = new InjectionToken(`${wrapperKey}:props`);
7105
7107
 
@@ -7205,7 +7207,15 @@ var init_islands2 = __esm(() => {
7205
7207
  var renderAngularIslandToHtmlInternal = async (component, props, islandId) => {
7206
7208
  const { renderAngularIslandToHtml: renderAngularIslandToHtml2 } = await Promise.resolve().then(() => (init_islands2(), exports_islands));
7207
7209
  return renderAngularIslandToHtml2(component, props, islandId);
7208
- }, 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 }) => {
7210
+ }, renderAngularIslandToHtml2, LEADING_HOISTED_RESOURCE_RE, stripLeadingHoistedResources = (html) => {
7211
+ let result = html;
7212
+ let match = LEADING_HOISTED_RESOURCE_RE.exec(result);
7213
+ while (match) {
7214
+ result = result.slice(match[0].length);
7215
+ match = LEADING_HOISTED_RESOURCE_RE.exec(result);
7216
+ }
7217
+ return result.trimStart();
7218
+ }, renderReactIslandToHtml = (component, props) => import("react").then(({ createElement }) => import("react-dom/server").then(({ renderToString }) => stripLeadingHoistedResources(renderToString(createElement(component, props))))), renderSvelteIslandToHtml = (component, props) => import("svelte/server").then(({ render }) => {
7209
7219
  const { body } = render(component, { props });
7210
7220
  return body;
7211
7221
  }), renderVueIslandToHtml = (component, props) => import("vue").then(({ createSSRApp, h: createVueVNode }) => {
@@ -7216,10 +7226,311 @@ var renderAngularIslandToHtmlInternal = async (component, props, islandId) => {
7216
7226
  });
7217
7227
  var init_islandSsr = __esm(() => {
7218
7228
  renderAngularIslandToHtml2 = renderAngularIslandToHtmlInternal;
7229
+ LEADING_HOISTED_RESOURCE_RE = /^\s*(?:<link\b[^>]*\/?>|<meta\b[^>]*\/?>|<title\b[^>]*>[\s\S]*?<\/title>|<style\b[^>]*>[\s\S]*?<\/style>|<script\b[^>]*>[\s\S]*?<\/script>)/i;
7230
+ });
7231
+
7232
+ // src/build/nativeRewrite.ts
7233
+ import { dlopen, FFIType, ptr } from "bun:ffi";
7234
+ import { platform, arch } from "os";
7235
+ import { resolve as resolve5 } from "path";
7236
+ var ffiDefinition, nativeLib = null, loadNative = () => {
7237
+ if (nativeLib !== null)
7238
+ return nativeLib;
7239
+ const osPlatform = platform();
7240
+ const cpu = arch();
7241
+ const platformMap = {
7242
+ "darwin-arm64": "darwin-arm64/fast_ops.dylib",
7243
+ "darwin-x64": "darwin-x64/fast_ops.dylib",
7244
+ "linux-arm64": "linux-arm64/fast_ops.so",
7245
+ "linux-x64": "linux-x64/fast_ops.so",
7246
+ "win32-arm64": "windows-arm64/fast_ops.dll",
7247
+ "win32-x64": "windows-x64/fast_ops.dll"
7248
+ };
7249
+ const libPath = platformMap[`${osPlatform}-${cpu}`];
7250
+ if (!libPath)
7251
+ return null;
7252
+ try {
7253
+ const fullPath = resolve5(import.meta.dir, "../../native/packages", libPath);
7254
+ const lib = dlopen(fullPath, ffiDefinition);
7255
+ nativeLib = lib.symbols;
7256
+ return nativeLib;
7257
+ } catch {
7258
+ return null;
7259
+ }
7260
+ }, nativeRewriteImports = (content, replacements) => {
7261
+ const lib = loadNative();
7262
+ if (!lib)
7263
+ return null;
7264
+ const jsonStr = JSON.stringify(replacements);
7265
+ const contentBuf = Buffer.from(content);
7266
+ const jsonBuf = Buffer.from(jsonStr);
7267
+ const outBuf = Buffer.alloc(content.length * 2);
7268
+ const outLenBuf = new BigUint64Array([BigInt(outBuf.length)]);
7269
+ const result = lib.rewrite_imports(ptr(contentBuf), contentBuf.length, ptr(jsonBuf), jsonBuf.length, ptr(outBuf), ptr(new Uint8Array(outLenBuf.buffer)));
7270
+ if (result < 0)
7271
+ return null;
7272
+ if (result === 0)
7273
+ return content;
7274
+ const outLen = Number(outLenBuf[0]);
7275
+ return outBuf.subarray(0, outLen).toString("utf-8");
7276
+ };
7277
+ var init_nativeRewrite = __esm(() => {
7278
+ ffiDefinition = {
7279
+ rewrite_imports: {
7280
+ args: [
7281
+ FFIType.ptr,
7282
+ FFIType.u64,
7283
+ FFIType.ptr,
7284
+ FFIType.u64,
7285
+ FFIType.ptr,
7286
+ FFIType.ptr
7287
+ ],
7288
+ returns: FFIType.i32
7289
+ }
7290
+ };
7291
+ });
7292
+
7293
+ // src/build/rewriteImportsPlugin.ts
7294
+ var exports_rewriteImportsPlugin = {};
7295
+ __export(exports_rewriteImportsPlugin, {
7296
+ rewriteVendorDirectories: () => rewriteVendorDirectories,
7297
+ rewriteImportsInContent: () => rewriteImportsInContent,
7298
+ rewriteBuildOutputsWith: () => rewriteBuildOutputsWith,
7299
+ rewriteBuildOutputs: () => rewriteBuildOutputs,
7300
+ jsRewriteImports: () => jsRewriteImports,
7301
+ fixMissingReExportNamespacesInContent: () => fixMissingReExportNamespacesInContent,
7302
+ buildWithImportRewrite: () => buildWithImportRewrite
7303
+ });
7304
+ import { readdir } from "fs/promises";
7305
+ import { join as join5 } from "path";
7306
+ var escapeRegex = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), jsRewriteImports = (content, replacements) => {
7307
+ let result = content;
7308
+ for (const [specifier, webPath] of replacements) {
7309
+ const escaped = escapeRegex(specifier);
7310
+ const fromRegex = new RegExp(`(from\\s*["'])${escaped}(["'])`, "g");
7311
+ const sideEffectRegex = new RegExp(`(import\\s*["'])${escaped}(["'])`, "g");
7312
+ const dynamicRegex = new RegExp(`(import\\s*\\(\\s*["'])${escaped}(["']\\s*\\))`, "g");
7313
+ result = result.replace(fromRegex, `$1${webPath}$2`);
7314
+ result = result.replace(sideEffectRegex, `$1${webPath}$2`);
7315
+ result = result.replace(dynamicRegex, `$1${webPath}$2`);
7316
+ }
7317
+ return result;
7318
+ }, rewriteImportsInContent = (content, vendorPaths) => {
7319
+ if (Object.keys(vendorPaths).length === 0)
7320
+ return content;
7321
+ const replacements = Object.entries(vendorPaths).sort(([keyA], [keyB]) => keyB.length - keyA.length);
7322
+ const native = nativeRewriteImports(content, replacements);
7323
+ return native ?? jsRewriteImports(content, replacements);
7324
+ }, fixMissingReExportNamespacesInContent = (content) => {
7325
+ const REEXPORT_PATTERN = /__reExport\(\s*[A-Za-z_$][\w$]*\s*,\s*([A-Za-z_$][\w$]*)\s*\)/g;
7326
+ REEXPORT_PATTERN.lastIndex = 0;
7327
+ const missing = [];
7328
+ let match;
7329
+ while ((match = REEXPORT_PATTERN.exec(content)) !== null) {
7330
+ const ident = match[1];
7331
+ if (!ident)
7332
+ continue;
7333
+ const nsImportRe = new RegExp(`\\bimport\\s*\\*\\s*as\\s+${ident}\\s+from\\b`);
7334
+ if (nsImportRe.test(content))
7335
+ continue;
7336
+ const declRe = new RegExp(`\\b(?:const|let|var|function|class)\\s+${ident}\\b`);
7337
+ if (declRe.test(content))
7338
+ continue;
7339
+ const namedImportRe = new RegExp(`\\bimport\\s*\\{[^}]*\\b${ident}\\b[^}]*\\}\\s*from\\b`);
7340
+ if (namedImportRe.test(content))
7341
+ continue;
7342
+ const importPathRe = /(?:from\s+|import\s*)["']([^"']+)["']/g;
7343
+ let pathMatch;
7344
+ let sourcePath;
7345
+ while ((pathMatch = importPathRe.exec(content)) !== null) {
7346
+ const p2 = pathMatch[1];
7347
+ if (!p2)
7348
+ continue;
7349
+ const base = p2.split("/").pop()?.replace(/\.[mc]?js$/, "");
7350
+ if (!base)
7351
+ continue;
7352
+ const normalized = base.startsWith("_") ? base.slice(1) : base;
7353
+ if (normalized === ident || normalized.endsWith(`_${ident}`)) {
7354
+ sourcePath = p2;
7355
+ break;
7356
+ }
7357
+ }
7358
+ if (sourcePath)
7359
+ missing.push({ ident, path: sourcePath });
7360
+ }
7361
+ if (missing.length === 0)
7362
+ return content;
7363
+ const seen = new Set;
7364
+ const unique = missing.filter((entry) => {
7365
+ if (seen.has(entry.ident))
7366
+ return false;
7367
+ seen.add(entry.ident);
7368
+ return true;
7369
+ });
7370
+ const inserts = unique.map((entry) => `import * as ${entry.ident} from "${entry.path}";`).join(`
7371
+ `);
7372
+ return `${inserts}
7373
+ ${content}`;
7374
+ }, isReadableArtifact = (artifact) => artifact.path.endsWith(".js"), rewriteBuildOutputs = async (outputs, vendorPaths) => {
7375
+ if (Object.keys(vendorPaths).length === 0)
7376
+ return;
7377
+ await Promise.all(outputs.filter(isReadableArtifact).map(async (artifact) => {
7378
+ let original;
7379
+ try {
7380
+ original = await artifact.text();
7381
+ } catch (err) {
7382
+ const code = err.code;
7383
+ if (code === "ENOENT")
7384
+ return;
7385
+ throw err;
7386
+ }
7387
+ const rewritten = rewriteImportsInContent(original, vendorPaths);
7388
+ if (rewritten === original)
7389
+ return;
7390
+ try {
7391
+ await Bun.write(artifact.path, rewritten);
7392
+ } catch (err) {
7393
+ const code = err.code;
7394
+ if (code === "ENOENT")
7395
+ return;
7396
+ throw err;
7397
+ }
7398
+ }));
7399
+ }, rewriteBuildOutputsWith = async (outputs, resolveVendorPaths) => {
7400
+ await Promise.all(outputs.filter(isReadableArtifact).map(async (artifact) => {
7401
+ const vendorPaths = resolveVendorPaths(artifact);
7402
+ if (Object.keys(vendorPaths).length === 0)
7403
+ return;
7404
+ let original;
7405
+ try {
7406
+ original = await artifact.text();
7407
+ } catch (err) {
7408
+ const code = err.code;
7409
+ if (code === "ENOENT")
7410
+ return;
7411
+ throw err;
7412
+ }
7413
+ const rewritten = rewriteImportsInContent(original, vendorPaths);
7414
+ if (rewritten === original)
7415
+ return;
7416
+ try {
7417
+ await Bun.write(artifact.path, rewritten);
7418
+ } catch (err) {
7419
+ const code = err.code;
7420
+ if (code === "ENOENT")
7421
+ return;
7422
+ throw err;
7423
+ }
7424
+ }));
7425
+ }, rewriteVendorDirectories = async (vendorDirs, vendorPaths) => {
7426
+ if (Object.keys(vendorPaths).length === 0)
7427
+ return;
7428
+ const allFiles = [];
7429
+ for (const dir of vendorDirs) {
7430
+ try {
7431
+ const entries = await readdir(dir);
7432
+ for (const entry of entries) {
7433
+ if (entry.endsWith(".js"))
7434
+ allFiles.push(join5(dir, entry));
7435
+ }
7436
+ } catch {}
7437
+ }
7438
+ await Promise.all(allFiles.map(async (filePath) => {
7439
+ let original;
7440
+ try {
7441
+ original = await Bun.file(filePath).text();
7442
+ } catch (err) {
7443
+ const code = err.code;
7444
+ if (code === "ENOENT")
7445
+ return;
7446
+ throw err;
7447
+ }
7448
+ let next = rewriteImportsInContent(original, vendorPaths);
7449
+ next = fixMissingReExportNamespacesInContent(next);
7450
+ if (next === original)
7451
+ return;
7452
+ try {
7453
+ await Bun.write(filePath, next);
7454
+ } catch (err) {
7455
+ const code = err.code;
7456
+ if (code === "ENOENT")
7457
+ return;
7458
+ throw err;
7459
+ }
7460
+ }));
7461
+ }, buildWithImportRewrite = async (pendingBuild, vendorPaths) => {
7462
+ const result = await pendingBuild;
7463
+ if (result.outputs.length > 0) {
7464
+ await rewriteBuildOutputs(result.outputs, vendorPaths);
7465
+ }
7466
+ return result;
7467
+ };
7468
+ var init_rewriteImportsPlugin = __esm(() => {
7469
+ init_nativeRewrite();
7470
+ });
7471
+
7472
+ // src/core/angularServerModule.ts
7473
+ import { mkdir as mkdir2 } from "fs/promises";
7474
+ import { dirname as dirname5, join as join6, relative as relative2 } from "path";
7475
+ var serverCacheRoot, compiledModuleCache, ANGULAR_SPECIFIER_RE, getCachedModulePath = (sourcePath) => {
7476
+ const relativeSourcePath = relative2(process.cwd(), sourcePath).replace(/\\/g, "/");
7477
+ const normalizedSourcePath = relativeSourcePath.startsWith("..") ? sourcePath.replace(/[:\\/]/g, "_") : relativeSourcePath;
7478
+ return join6(serverCacheRoot, `${normalizedSourcePath}.server.js`);
7479
+ }, collectVendorPaths = (code) => {
7480
+ const vendorPaths = {};
7481
+ if (!isProductionRuntime()) {
7482
+ return vendorPaths;
7483
+ }
7484
+ const specifiers = new Set([...code.matchAll(ANGULAR_SPECIFIER_RE)].map((match) => match[1]));
7485
+ specifiers.forEach((specifier) => {
7486
+ if (!specifier)
7487
+ return;
7488
+ const resolved = resolveAngularRuntimePath(specifier);
7489
+ if (resolved === specifier)
7490
+ return;
7491
+ vendorPaths[specifier] = resolved;
7492
+ });
7493
+ return vendorPaths;
7494
+ }, buildAngularServerModule = async (sourcePath) => {
7495
+ const result = await Bun.build({
7496
+ entrypoints: [sourcePath],
7497
+ format: "esm",
7498
+ packages: "external",
7499
+ target: "bun",
7500
+ throw: false
7501
+ });
7502
+ const entry = result.outputs.find((output) => output.kind === "entry-point");
7503
+ if (!result.success || !entry) {
7504
+ const message = result.logs.map((log) => String(log)).join(`
7505
+ `);
7506
+ throw new Error(`Failed to compile Angular island server module for "${sourcePath}":
7507
+ ${message}`);
7508
+ }
7509
+ const code = await entry.text();
7510
+ const rewritten = rewriteImportsInContent(code, collectVendorPaths(code));
7511
+ const modulePath = getCachedModulePath(sourcePath);
7512
+ await mkdir2(dirname5(modulePath), { recursive: true });
7513
+ await Bun.write(modulePath, rewritten);
7514
+ return modulePath;
7515
+ }, compileAngularServerModule = (sourcePath) => {
7516
+ const cached = compiledModuleCache.get(sourcePath);
7517
+ if (cached) {
7518
+ return cached;
7519
+ }
7520
+ const compiledModulePromise = buildAngularServerModule(sourcePath);
7521
+ compiledModuleCache.set(sourcePath, compiledModulePromise);
7522
+ return compiledModulePromise;
7523
+ };
7524
+ var init_angularServerModule = __esm(() => {
7525
+ init_resolveAngularPackage();
7526
+ init_rewriteImportsPlugin();
7527
+ serverCacheRoot = join6(process.cwd(), ".absolutejs", "islands", "angular");
7528
+ compiledModuleCache = new Map;
7529
+ ANGULAR_SPECIFIER_RE = /["'](@angular\/[^"']+)["']/g;
7219
7530
  });
7220
7531
 
7221
7532
  // src/build/resolvePackageImport.ts
7222
- import { resolve as resolve5, join as join5 } from "path";
7533
+ import { resolve as resolve6, join as join7 } from "path";
7223
7534
  import { existsSync as existsSync5, readFileSync as readFileSync5 } from "fs";
7224
7535
  var resolveExportPath = (entry, conditions) => {
7225
7536
  if (typeof entry === "string")
@@ -7241,11 +7552,11 @@ var resolveExportPath = (entry, conditions) => {
7241
7552
  const packageName = isScoped ? `${parts[0]}/${parts[1]}` : parts[0];
7242
7553
  const subpath = isScoped ? parts.slice(2).join("/") : parts.slice(1).join("/");
7243
7554
  const exportKey = subpath ? `./${subpath}` : ".";
7244
- const currentPackageJsonPath = resolve5(process.cwd(), "package.json");
7555
+ const currentPackageJsonPath = resolve6(process.cwd(), "package.json");
7245
7556
  const currentPackageJson = existsSync5(currentPackageJsonPath) ? JSON.parse(readFileSync5(currentPackageJsonPath, "utf-8")) : null;
7246
7557
  const currentPackageDir = currentPackageJson?.name === packageName ? process.cwd() : null;
7247
- const packageDir = currentPackageDir ?? resolve5(process.cwd(), "node_modules", packageName ?? "");
7248
- const packageJsonPath = join5(packageDir, "package.json");
7558
+ const packageDir = currentPackageDir ?? resolve6(process.cwd(), "node_modules", packageName ?? "");
7559
+ const packageJsonPath = join7(packageDir, "package.json");
7249
7560
  if (!existsSync5(packageJsonPath))
7250
7561
  return null;
7251
7562
  try {
@@ -7260,12 +7571,12 @@ var resolveExportPath = (entry, conditions) => {
7260
7571
  if (!importPath)
7261
7572
  return null;
7262
7573
  if (currentPackageDir && importPath.startsWith("./dist/")) {
7263
- const sourceCandidate = resolve5(packageDir, importPath.replace(/^\.\/dist\//, "./src/"));
7574
+ const sourceCandidate = resolve6(packageDir, importPath.replace(/^\.\/dist\//, "./src/"));
7264
7575
  if (existsSync5(sourceCandidate)) {
7265
7576
  return sourceCandidate;
7266
7577
  }
7267
7578
  }
7268
- const resolved = resolve5(packageDir, importPath);
7579
+ const resolved = resolve6(packageDir, importPath);
7269
7580
  return existsSync5(resolved) ? resolved : null;
7270
7581
  } catch {
7271
7582
  return null;
@@ -7398,14 +7709,14 @@ var init_lowerAwaitSlotSyntax = __esm(() => {
7398
7709
  });
7399
7710
 
7400
7711
  // src/core/svelteServerModule.ts
7401
- import { mkdir as mkdir2, readdir } from "fs/promises";
7402
- import { basename, dirname as dirname5, extname as extname2, join as join6, relative as relative2, resolve as resolve6 } from "path";
7403
- var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, ensureRelativeImportPath = (from, target) => {
7404
- const importPath = relative2(dirname5(from), target).replace(/\\/g, "/");
7712
+ import { mkdir as mkdir3, readdir as readdir2 } from "fs/promises";
7713
+ import { basename, dirname as dirname6, extname as extname2, join as join8, relative as relative3, resolve as resolve7 } from "path";
7714
+ var serverCacheRoot2, compiledModuleCache2, originalSourcePathCache, transpiler, ensureRelativeImportPath = (from, target) => {
7715
+ const importPath = relative3(dirname6(from), target).replace(/\\/g, "/");
7405
7716
  return importPath.startsWith(".") ? importPath : `./${importPath}`;
7406
7717
  }, processDirectoryEntries = (entries, dir, targetFileName, stack) => {
7407
7718
  for (const entry of entries) {
7408
- const entryPath = join6(dir, entry.name);
7719
+ const entryPath = join8(dir, entry.name);
7409
7720
  if (entry.isDirectory())
7410
7721
  stack.push(entryPath);
7411
7722
  if (entry.isFile() && entry.name === targetFileName) {
@@ -7419,7 +7730,7 @@ var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, e
7419
7730
  const nextStack = [];
7420
7731
  const dirEntries = await Promise.all(dirs.map(async (dir) => ({
7421
7732
  dir,
7422
- entries: await readdir(dir, {
7733
+ entries: await readdir2(dir, {
7423
7734
  encoding: "utf-8",
7424
7735
  withFileTypes: true
7425
7736
  })
@@ -7435,11 +7746,11 @@ var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, e
7435
7746
  if (cachedPath !== undefined) {
7436
7747
  return cachedPath;
7437
7748
  }
7438
- if (!sourcePath.includes(`${join6(process.cwd(), "build")}${process.platform === "win32" ? "" : "/"}`) && !sourcePath.includes("/build/")) {
7749
+ if (!sourcePath.includes(`${join8(process.cwd(), "build")}${process.platform === "win32" ? "" : "/"}`) && !sourcePath.includes("/build/")) {
7439
7750
  originalSourcePathCache.set(sourcePath, sourcePath);
7440
7751
  return sourcePath;
7441
7752
  }
7442
- const resolvedSourcePath = await findSourceFileByBasename(join6(process.cwd(), "src"), normalizeBuiltSvelteFileName(sourcePath));
7753
+ const resolvedSourcePath = await findSourceFileByBasename(join8(process.cwd(), "src"), normalizeBuiltSvelteFileName(sourcePath));
7443
7754
  const nextPath = resolvedSourcePath ?? sourcePath;
7444
7755
  originalSourcePathCache.set(sourcePath, nextPath);
7445
7756
  return nextPath;
@@ -7447,7 +7758,7 @@ var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, e
7447
7758
  if (!spec.startsWith(".")) {
7448
7759
  return null;
7449
7760
  }
7450
- const basePath = resolve6(dirname5(from), spec);
7761
+ const basePath = resolve7(dirname6(from), spec);
7451
7762
  const candidates = [
7452
7763
  basePath,
7453
7764
  `${basePath}.ts`,
@@ -7455,19 +7766,19 @@ var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, e
7455
7766
  `${basePath}.mjs`,
7456
7767
  `${basePath}.cjs`,
7457
7768
  `${basePath}.json`,
7458
- join6(basePath, "index.ts"),
7459
- join6(basePath, "index.js"),
7460
- join6(basePath, "index.mjs"),
7461
- join6(basePath, "index.cjs"),
7462
- join6(basePath, "index.json")
7769
+ join8(basePath, "index.ts"),
7770
+ join8(basePath, "index.js"),
7771
+ join8(basePath, "index.mjs"),
7772
+ join8(basePath, "index.cjs"),
7773
+ join8(basePath, "index.json")
7463
7774
  ];
7464
7775
  const existResults = await Promise.all(candidates.map((candidate) => Bun.file(candidate).exists()));
7465
7776
  const foundIndex = existResults.indexOf(true);
7466
7777
  return foundIndex >= 0 ? candidates[foundIndex] ?? null : null;
7467
- }, getCachedModulePath = (sourcePath) => {
7468
- const relativeSourcePath = relative2(process.cwd(), sourcePath).replace(/\\/g, "/");
7778
+ }, getCachedModulePath2 = (sourcePath) => {
7779
+ const relativeSourcePath = relative3(process.cwd(), sourcePath).replace(/\\/g, "/");
7469
7780
  const normalizedSourcePath = relativeSourcePath.startsWith("..") ? sourcePath.replace(/[:\\/]/g, "_") : relativeSourcePath;
7470
- return join6(serverCacheRoot, `${normalizedSourcePath}.server.js`);
7781
+ return join8(serverCacheRoot2, `${normalizedSourcePath}.server.js`);
7471
7782
  }, resolveSvelteImport = async (spec, from) => {
7472
7783
  if (!spec.startsWith(".") && !spec.startsWith("/")) {
7473
7784
  const resolved = resolvePackageImport(spec);
@@ -7479,7 +7790,7 @@ var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, e
7479
7790
  if (!spec.startsWith(".")) {
7480
7791
  return null;
7481
7792
  }
7482
- const explicitPath = resolve6(dirname5(from), spec);
7793
+ const explicitPath = resolve7(dirname6(from), spec);
7483
7794
  if (extname2(explicitPath) === ".svelte") {
7484
7795
  return explicitPath;
7485
7796
  }
@@ -7499,7 +7810,7 @@ var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, e
7499
7810
  }
7500
7811
  await Bun.write(path, content);
7501
7812
  }, compileSvelteServerModule = async (sourcePath) => {
7502
- const cachedModulePath = compiledModuleCache.get(sourcePath);
7813
+ const cachedModulePath = compiledModuleCache2.get(sourcePath);
7503
7814
  if (cachedModulePath) {
7504
7815
  return cachedModulePath;
7505
7816
  }
@@ -7538,7 +7849,7 @@ var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, e
7538
7849
  continue;
7539
7850
  if (resolvedChildModules[index])
7540
7851
  continue;
7541
- rewrittenModulePaths.set(spec, ensureRelativeImportPath(getCachedModulePath(sourcePath), resolvedModuleImport));
7852
+ rewrittenModulePaths.set(spec, ensureRelativeImportPath(getCachedModulePath2(sourcePath), resolvedModuleImport));
7542
7853
  }
7543
7854
  for (const [spec, resolvedModuleImport] of rewrittenModulePaths) {
7544
7855
  transpiled = transpiled.replaceAll(spec, resolvedModuleImport);
@@ -7552,15 +7863,15 @@ var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, e
7552
7863
  generate: "server"
7553
7864
  }).js.code;
7554
7865
  for (const [spec, compiledChildPath] of childModulePaths) {
7555
- compiledCode = compiledCode.replaceAll(spec, ensureRelativeImportPath(getCachedModulePath(sourcePath), compiledChildPath));
7866
+ compiledCode = compiledCode.replaceAll(spec, ensureRelativeImportPath(getCachedModulePath2(sourcePath), compiledChildPath));
7556
7867
  }
7557
7868
  for (const [spec, resolvedModuleImport] of rewrittenModulePaths) {
7558
7869
  compiledCode = compiledCode.replaceAll(spec, resolvedModuleImport);
7559
7870
  }
7560
- const compiledModulePath = getCachedModulePath(sourcePath);
7561
- await mkdir2(dirname5(compiledModulePath), { recursive: true });
7871
+ const compiledModulePath = getCachedModulePath2(sourcePath);
7872
+ await mkdir3(dirname6(compiledModulePath), { recursive: true });
7562
7873
  await writeIfChanged(compiledModulePath, compiledCode);
7563
- compiledModuleCache.set(sourcePath, compiledModulePath);
7874
+ compiledModuleCache2.set(sourcePath, compiledModulePath);
7564
7875
  return compiledModulePath;
7565
7876
  };
7566
7877
  var init_svelteServerModule = __esm(() => {
@@ -7568,8 +7879,8 @@ var init_svelteServerModule = __esm(() => {
7568
7879
  init_lowerIslandSyntax();
7569
7880
  init_lowerAwaitSlotSyntax();
7570
7881
  init_stylePreprocessor();
7571
- serverCacheRoot = join6(process.cwd(), ".absolutejs", "islands", "svelte");
7572
- compiledModuleCache = new Map;
7882
+ serverCacheRoot2 = join8(process.cwd(), ".absolutejs", "islands", "svelte");
7883
+ compiledModuleCache2 = new Map;
7573
7884
  originalSourcePathCache = new Map;
7574
7885
  transpiler = new Bun.Transpiler({
7575
7886
  loader: "ts",
@@ -7579,16 +7890,16 @@ var init_svelteServerModule = __esm(() => {
7579
7890
 
7580
7891
  // src/core/vueServerModule.ts
7581
7892
  import { existsSync as existsSync6, readFileSync as readFileSync6, realpathSync } from "fs";
7582
- import { mkdir as mkdir3 } from "fs/promises";
7583
- import { dirname as dirname6, join as join7, relative as relative3, resolve as resolve7 } from "path";
7893
+ import { mkdir as mkdir4 } from "fs/promises";
7894
+ import { dirname as dirname7, join as join9, relative as relative4, resolve as resolve8 } from "path";
7584
7895
  var {Transpiler } = globalThis.Bun;
7585
- var ISLAND_COMPONENT_ID_LENGTH = 8, serverCacheRoot2, compiledModuleCache2, transpiler2, ensureRelativeImportPath2 = (from, target) => {
7586
- const importPath = relative3(dirname6(from), target).replace(/\\/g, "/");
7896
+ var ISLAND_COMPONENT_ID_LENGTH = 8, serverCacheRoot3, compiledModuleCache3, transpiler2, ensureRelativeImportPath2 = (from, target) => {
7897
+ const importPath = relative4(dirname7(from), target).replace(/\\/g, "/");
7587
7898
  return importPath.startsWith(".") ? importPath : `./${importPath}`;
7588
- }, getCachedModulePath2 = (sourcePath) => {
7589
- const relativeSourcePath = relative3(process.cwd(), sourcePath).replace(/\\/g, "/");
7899
+ }, getCachedModulePath3 = (sourcePath) => {
7900
+ const relativeSourcePath = relative4(process.cwd(), sourcePath).replace(/\\/g, "/");
7590
7901
  const normalizedSourcePath = relativeSourcePath.startsWith("..") ? sourcePath.replace(/[:\\/]/g, "_") : relativeSourcePath;
7591
- return join7(serverCacheRoot2, `${normalizedSourcePath}.server.js`);
7902
+ return join9(serverCacheRoot3, `${normalizedSourcePath}.server.js`);
7592
7903
  }, writeIfChanged2 = async (path, content) => {
7593
7904
  const targetFile = Bun.file(path);
7594
7905
  if (await targetFile.exists()) {
@@ -7615,7 +7926,7 @@ var ISLAND_COMPONENT_ID_LENGTH = 8, serverCacheRoot2, compiledModuleCache2, tran
7615
7926
  `) : nonVueLines.join(`
7616
7927
  `);
7617
7928
  }, extractRelativeVueImports = (sourceCode) => Array.from(sourceCode.matchAll(/import\s+[\s\S]+?['"]([^'"]+)['"]/g)).map((match) => match[1]).filter((importPath) => typeof importPath === "string" && importPath.startsWith(".") && importPath.endsWith(".vue")), compileVueServerModule = async (sourcePath) => {
7618
- const cachedModulePath = compiledModuleCache2.get(sourcePath);
7929
+ const cachedModulePath = compiledModuleCache3.get(sourcePath);
7619
7930
  if (cachedModulePath)
7620
7931
  return cachedModulePath;
7621
7932
  const compiler = await import("@vue/compiler-sfc");
@@ -7648,7 +7959,7 @@ var ISLAND_COMPONENT_ID_LENGTH = 8, serverCacheRoot2, compiledModuleCache2, tran
7648
7959
  }).code : "const ssrRender = () => {};";
7649
7960
  const childImportPaths = extractRelativeVueImports(compiledScript.content);
7650
7961
  const compiledChildren = await Promise.all(childImportPaths.map(async (relativeImport) => ({
7651
- compiledPath: await compileVueServerModule(resolve7(dirname6(sourcePath), relativeImport)),
7962
+ compiledPath: await compileVueServerModule(resolve8(dirname7(sourcePath), relativeImport)),
7652
7963
  spec: relativeImport
7653
7964
  })));
7654
7965
  const strippedScript = stripExports(compiledScript.content);
@@ -7660,20 +7971,20 @@ var ISLAND_COMPONENT_ID_LENGTH = 8, serverCacheRoot2, compiledModuleCache2, tran
7660
7971
  "export default script;"
7661
7972
  ].join(`
7662
7973
  `));
7663
- const compiledModulePath = getCachedModulePath2(sourcePath);
7974
+ const compiledModulePath = getCachedModulePath3(sourcePath);
7664
7975
  let rewritten = assembled;
7665
7976
  for (const child of compiledChildren) {
7666
7977
  rewritten = rewritten.replaceAll(child.spec, ensureRelativeImportPath2(compiledModulePath, child.compiledPath));
7667
7978
  }
7668
- await mkdir3(dirname6(compiledModulePath), { recursive: true });
7979
+ await mkdir4(dirname7(compiledModulePath), { recursive: true });
7669
7980
  await writeIfChanged2(compiledModulePath, rewritten);
7670
- compiledModuleCache2.set(sourcePath, compiledModulePath);
7981
+ compiledModuleCache3.set(sourcePath, compiledModulePath);
7671
7982
  return compiledModulePath;
7672
7983
  };
7673
7984
  var init_vueServerModule = __esm(() => {
7674
7985
  init_constants();
7675
- serverCacheRoot2 = join7(process.cwd(), ".absolutejs", "islands", "vue");
7676
- compiledModuleCache2 = new Map;
7986
+ serverCacheRoot3 = join9(process.cwd(), ".absolutejs", "islands", "vue");
7987
+ compiledModuleCache3 = new Map;
7677
7988
  transpiler2 = new Transpiler({ loader: "ts", target: "browser" });
7678
7989
  });
7679
7990
 
@@ -7768,8 +8079,17 @@ var islandSequence = 0, resolvedServerComponentCache, resolvedServerBuildCompone
7768
8079
  throw new Error("Resolved Vue island is not a valid Vue component.");
7769
8080
  }
7770
8081
  return resolvedComponent;
8082
+ }, loadAngularServerBuildComponent = async (buildReferencePath, exportName) => {
8083
+ const serverModulePath = await compileAngularServerModule(buildReferencePath);
8084
+ const loadedModule = await import(serverModulePath);
8085
+ if (exportName && exportName !== "default" && exportName in loadedModule) {
8086
+ return loadedModule[exportName];
8087
+ }
8088
+ return "default" in loadedModule ? loadedModule.default : loadedModule;
7771
8089
  }, resolveAngularServerIslandComponent = async (component) => {
7772
- const resolvedComponent = await resolveServerIslandComponent(component);
8090
+ const buildReference = getIslandBuildReference(component);
8091
+ const buildReferencePath = buildReference?.source ? resolveBuildReferencePath(buildReference.source, import.meta.url) : null;
8092
+ const resolvedComponent = buildReferencePath ? await loadAngularServerBuildComponent(buildReferencePath, buildReference?.export) : await resolveServerIslandComponent(component);
7773
8093
  if (!isAngularServerIslandComponent(resolvedComponent)) {
7774
8094
  throw new Error("Resolved Angular island is not a valid Angular component.");
7775
8095
  }
@@ -7825,6 +8145,7 @@ var islandSequence = 0, resolvedServerComponentCache, resolvedServerBuildCompone
7825
8145
  };
7826
8146
  var init_renderIslandMarkup = __esm(() => {
7827
8147
  init_islandSsr();
8148
+ init_angularServerModule();
7828
8149
  init_svelteServerModule();
7829
8150
  init_vueServerModule();
7830
8151
  init_islandMarkupAttributes();
@@ -7835,7 +8156,7 @@ var init_renderIslandMarkup = __esm(() => {
7835
8156
 
7836
8157
  // src/build/islandEntries.ts
7837
8158
  import { mkdirSync, rmSync, writeFileSync as writeFileSync2 } from "fs";
7838
- import { dirname as dirname7, extname as extname3, join as join8, relative as relative4, resolve as resolve8 } from "path";
8159
+ import { dirname as dirname8, extname as extname3, join as join10, relative as relative5, resolve as resolve9 } from "path";
7839
8160
  import ts from "typescript";
7840
8161
  var frameworks, isRecord4 = (value) => typeof value === "object" && value !== null, resolveRegistryExport = (mod) => {
7841
8162
  if (isRecord4(mod.islandRegistry))
@@ -7844,13 +8165,13 @@ var frameworks, isRecord4 = (value) => typeof value === "object" && value !== nu
7844
8165
  return mod.default;
7845
8166
  throw new Error("Island registry module must export `islandRegistry` or a default registry object.");
7846
8167
  }, hasSvelteImport = (source) => /from\s+['"][^'"]+\.svelte['"]/.test(source), normalizeImportPath = (wrapperPath, targetPath) => {
7847
- const importPath = relative4(dirname7(wrapperPath), targetPath).replace(/\\/g, "/");
8168
+ const importPath = relative5(dirname8(wrapperPath), targetPath).replace(/\\/g, "/");
7848
8169
  return importPath.startsWith(".") ? importPath : `./${importPath}`;
7849
8170
  }, isIdentifier = (value) => /^[A-Za-z_$][A-Za-z0-9_$]*$/.test(value), resolveIslandSourcePath = (registryPath, sourcePath) => {
7850
8171
  if (sourcePath.startsWith("file://")) {
7851
8172
  return new URL(sourcePath).pathname;
7852
8173
  }
7853
- return resolve8(dirname7(registryPath), sourcePath);
8174
+ return resolve9(dirname8(registryPath), sourcePath);
7854
8175
  }, getObjectPropertyName = (name) => {
7855
8176
  if (ts.isIdentifier(name) || ts.isStringLiteral(name)) {
7856
8177
  return name.text;
@@ -8068,16 +8389,16 @@ export default component;
8068
8389
  buildPath,
8069
8390
  clientPathMaps = {}
8070
8391
  }) => {
8071
- const generatedRoot = join8(buildPath, "_island_entries");
8392
+ const generatedRoot = join10(buildPath, "_island_entries");
8072
8393
  rmSync(generatedRoot, { force: true, recursive: true });
8073
8394
  const entries = [];
8074
8395
  for (const definition of buildInfo.definitions) {
8075
- const entryPath = join8(generatedRoot, "islands", definition.framework, `${definition.component}.ts`);
8396
+ const entryPath = join10(generatedRoot, "islands", definition.framework, `${definition.component}.ts`);
8076
8397
  const { buildReference } = definition;
8077
8398
  const source = buildReference ? resolveIslandSourcePath(buildInfo.resolvedRegistryPath, buildReference.source) : null;
8078
8399
  const compiledSourcePath = source && shouldUseCompiledClientPath(definition.framework, source) ? clientPathMaps[definition.framework]?.get(source) : undefined;
8079
8400
  const entrySource = source && (compiledSourcePath || !shouldUseCompiledClientPath(definition.framework, source)) ? createDirectEntrySource(entryPath, compiledSourcePath ?? source, compiledSourcePath ? undefined : buildReference?.export) : createRegistryEntrySource(entryPath, buildInfo.resolvedRegistryPath, buildInfo.hasNamedExport, definition.framework, definition.component);
8080
- mkdirSync(dirname7(entryPath), { recursive: true });
8401
+ mkdirSync(dirname8(entryPath), { recursive: true });
8081
8402
  writeFileSync2(entryPath, entrySource);
8082
8403
  entries.push({
8083
8404
  component: definition.component,
@@ -8090,7 +8411,7 @@ export default component;
8090
8411
  generatedRoot
8091
8412
  };
8092
8413
  }, loadIslandRegistryBuildInfo = async (registryPath) => {
8093
- const resolvedRegistryPath = resolve8(registryPath);
8414
+ const resolvedRegistryPath = resolve9(registryPath);
8094
8415
  const registrySource = Bun.file(resolvedRegistryPath);
8095
8416
  const registrySourceText = await registrySource.text();
8096
8417
  const parsedInfo = parseIslandRegistryBuildInfo(registrySourceText, resolvedRegistryPath);
@@ -8357,7 +8678,7 @@ __export(exports_loadConfig, {
8357
8678
  isWorkspaceConfig: () => isWorkspaceConfig,
8358
8679
  getWorkspaceServices: () => getWorkspaceServices
8359
8680
  });
8360
- import { resolve as resolve9 } from "path";
8681
+ import { resolve as resolve10 } from "path";
8361
8682
  var RESERVED_TOP_LEVEL_KEYS, isObject = (value) => typeof value === "object" && value !== null, isCommandService = (service) => service.kind === "command" || Array.isArray(service.command), isServiceCandidate = (value) => isObject(value) && (typeof value.entry === "string" || Array.isArray(value.command)), isWorkspaceConfig = (config) => {
8362
8683
  if (!isObject(config)) {
8363
8684
  return false;
@@ -8408,7 +8729,7 @@ var RESERVED_TOP_LEVEL_KEYS, isObject = (value) => typeof value === "object" &&
8408
8729
  }
8409
8730
  return config;
8410
8731
  }, loadRawConfig = async (configPath) => {
8411
- const resolved = resolve9(configPath ?? process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
8732
+ const resolved = resolve10(configPath ?? process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
8412
8733
  const mod = await import(resolved);
8413
8734
  const config = mod.default ?? mod.config;
8414
8735
  if (!config) {
@@ -8551,7 +8872,7 @@ var init_sourceMetadata = __esm(() => {
8551
8872
 
8552
8873
  // src/islands/pageMetadata.ts
8553
8874
  import { readFileSync as readFileSync8 } from "fs";
8554
- import { dirname as dirname8, resolve as resolve11 } from "path";
8875
+ import { dirname as dirname9, resolve as resolve12 } from "path";
8555
8876
  var pagePatterns, getPageDirs = (config) => [
8556
8877
  { dir: config.angularDirectory, framework: "angular" },
8557
8878
  { dir: config.emberDirectory, framework: "ember" },
@@ -8571,15 +8892,15 @@ var pagePatterns, getPageDirs = (config) => [
8571
8892
  const source = definition.buildReference?.source;
8572
8893
  if (!source)
8573
8894
  continue;
8574
- const resolvedSource = source.startsWith("file://") ? new URL(source).pathname : resolve11(dirname8(buildInfo.resolvedRegistryPath), source);
8575
- lookup.set(`${definition.framework}:${definition.component}`, resolve11(resolvedSource));
8895
+ const resolvedSource = source.startsWith("file://") ? new URL(source).pathname : resolve12(dirname9(buildInfo.resolvedRegistryPath), source);
8896
+ lookup.set(`${definition.framework}:${definition.component}`, resolve12(resolvedSource));
8576
8897
  }
8577
8898
  return lookup;
8578
8899
  }, getCurrentPageIslandMetadata = () => globalThis.__absolutePageIslandMetadata ?? new Map, metadataUsesSource = (metadata2, target) => metadata2.islands.some((usage) => {
8579
8900
  const candidate = usage.source;
8580
- return candidate ? resolve11(candidate) === target : false;
8901
+ return candidate ? resolve12(candidate) === target : false;
8581
8902
  }), getPagesUsingIslandSource = (sourcePath) => {
8582
- const target = resolve11(sourcePath);
8903
+ const target = resolve12(sourcePath);
8583
8904
  return [...getCurrentPageIslandMetadata().values()].filter((metadata2) => metadataUsesSource(metadata2, target)).map((metadata2) => metadata2.pagePath);
8584
8905
  }, resolveIslandUsages = (islands, islandSourceLookup) => islands.map((usage) => {
8585
8906
  const sourcePath = islandSourceLookup.get(`${usage.framework}:${usage.component}`);
@@ -8591,13 +8912,13 @@ var pagePatterns, getPageDirs = (config) => [
8591
8912
  const pattern = pagePatterns[entry.framework];
8592
8913
  if (!pattern)
8593
8914
  return;
8594
- const files = await scanEntryPoints(resolve11(entry.dir), pattern);
8915
+ const files = await scanEntryPoints(resolve12(entry.dir), pattern);
8595
8916
  for (const filePath of files) {
8596
8917
  const source = readFileSync8(filePath, "utf-8");
8597
8918
  const islands = extractIslandUsagesFromSource(source);
8598
- pageMetadata.set(resolve11(filePath), {
8919
+ pageMetadata.set(resolve12(filePath), {
8599
8920
  islands: resolveIslandUsages(islands, islandSourceLookup),
8600
- pagePath: resolve11(filePath)
8921
+ pagePath: resolve12(filePath)
8601
8922
  });
8602
8923
  }
8603
8924
  }, loadPageIslandMetadata = async (config) => {
@@ -8839,12 +9160,12 @@ var init_startupBanner = __esm(() => {
8839
9160
  // src/utils/logger.ts
8840
9161
  var colors2, frameworkColors, formatPath = (filePath) => {
8841
9162
  const cwd = process.cwd();
8842
- let relative5 = filePath.startsWith(cwd) ? filePath.slice(cwd.length + 1) : filePath;
8843
- relative5 = relative5.replace(/\\/g, "/");
8844
- if (!relative5.startsWith("/")) {
8845
- relative5 = `/${relative5}`;
9163
+ let relative6 = filePath.startsWith(cwd) ? filePath.slice(cwd.length + 1) : filePath;
9164
+ relative6 = relative6.replace(/\\/g, "/");
9165
+ if (!relative6.startsWith("/")) {
9166
+ relative6 = `/${relative6}`;
8846
9167
  }
8847
- return relative5;
9168
+ return relative6;
8848
9169
  }, getFrameworkColor = (framework) => frameworkColors[framework] || colors2.white, log = (action, options) => {
8849
9170
  const timestamp = `${colors2.dim}${formatTimestamp()}${colors2.reset}`;
8850
9171
  const tag = `${colors2.cyan}[hmr]${colors2.reset}`;
@@ -8947,9 +9268,9 @@ var getManifestKey = (folder, pascalName, isClientComponent, isReact, isVue, isS
8947
9268
  }, generateManifest = (outputs, buildPath) => outputs.reduce((manifest, artifact) => {
8948
9269
  const normalizedArtifactPath = normalizePath(artifact.path);
8949
9270
  const normalizedBuildPath = normalizePath(buildPath);
8950
- let relative5 = normalizedArtifactPath.startsWith(normalizedBuildPath) ? normalizedArtifactPath.slice(normalizedBuildPath.length) : normalizedArtifactPath;
8951
- relative5 = relative5.replace(/^\/+/, "");
8952
- const segments = relative5.split("/");
9271
+ let relative6 = normalizedArtifactPath.startsWith(normalizedBuildPath) ? normalizedArtifactPath.slice(normalizedBuildPath.length) : normalizedArtifactPath;
9272
+ relative6 = relative6.replace(/^\/+/, "");
9273
+ const segments = relative6.split("/");
8953
9274
  const fileWithHash = segments.pop();
8954
9275
  if (!fileWithHash)
8955
9276
  return manifest;
@@ -8963,15 +9284,15 @@ var getManifestKey = (folder, pascalName, isClientComponent, isReact, isVue, isS
8963
9284
  if (segments.includes("server"))
8964
9285
  return manifest;
8965
9286
  const cssKey = getCssKey(pascalName, segments);
8966
- if (manifest[cssKey] && manifest[cssKey] !== `/${relative5}`)
8967
- logWarn(`Duplicate manifest key "${cssKey}" \u2014 "${manifest[cssKey]}" will be overwritten by "/${relative5}". Use unique page names across frameworks.`);
8968
- manifest[cssKey] = `/${relative5}`;
9287
+ if (manifest[cssKey] && manifest[cssKey] !== `/${relative6}`)
9288
+ logWarn(`Duplicate manifest key "${cssKey}" \u2014 "${manifest[cssKey]}" will be overwritten by "/${relative6}". Use unique page names across frameworks.`);
9289
+ manifest[cssKey] = `/${relative6}`;
8969
9290
  return manifest;
8970
9291
  }
8971
9292
  const frameworkSegment = islandIndex > UNFOUND_INDEX ? segments[islandIndex + 1] : undefined;
8972
9293
  if (frameworkSegment === "react" || frameworkSegment === "svelte" || frameworkSegment === "vue" || frameworkSegment === "angular") {
8973
9294
  const manifestKey2 = getIslandManifestKey(frameworkSegment, pascalName);
8974
- manifest[manifestKey2] = `/${relative5}`;
9295
+ manifest[manifestKey2] = `/${relative6}`;
8975
9296
  return manifest;
8976
9297
  }
8977
9298
  const idx = segments.findIndex((seg) => seg === "indexes" || seg === "pages" || seg === "client");
@@ -8982,10 +9303,10 @@ var getManifestKey = (folder, pascalName, isClientComponent, isReact, isVue, isS
8982
9303
  const isAngular = segments.some((seg) => seg === "angular");
8983
9304
  const isClientComponent = segments.includes("client");
8984
9305
  const manifestKey = getManifestKey(folder, pascalName, isClientComponent, isReact, isVue, isSvelte, isAngular);
8985
- if (manifest[manifestKey] && manifest[manifestKey] !== `/${relative5}`) {
8986
- logWarn(`Duplicate manifest key "${manifestKey}" \u2014 "${manifest[manifestKey]}" will be overwritten by "/${relative5}". Use unique page names across frameworks.`);
9306
+ if (manifest[manifestKey] && manifest[manifestKey] !== `/${relative6}`) {
9307
+ logWarn(`Duplicate manifest key "${manifestKey}" \u2014 "${manifest[manifestKey]}" will be overwritten by "/${relative6}". Use unique page names across frameworks.`);
8987
9308
  }
8988
- manifest[manifestKey] = `/${relative5}`;
9309
+ manifest[manifestKey] = `/${relative6}`;
8989
9310
  return manifest;
8990
9311
  }, {});
8991
9312
  var init_generateManifest = __esm(() => {
@@ -8994,7 +9315,7 @@ var init_generateManifest = __esm(() => {
8994
9315
  });
8995
9316
 
8996
9317
  // src/build/verifyAngularCoreUniqueness.ts
8997
- import { resolve as resolve12 } from "path";
9318
+ import { resolve as resolve13 } from "path";
8998
9319
  var ANGULAR_CORE_IMPORT_RE, ANGULAR_CORE_PACKAGE_RE, classifySpecifier = (specifier, artifactPath, serverOutDir) => {
8999
9320
  if (!ANGULAR_CORE_PACKAGE_RE.test(specifier))
9000
9321
  return null;
@@ -9004,9 +9325,9 @@ var ANGULAR_CORE_IMPORT_RE, ANGULAR_CORE_PACKAGE_RE, classifySpecifier = (specif
9004
9325
  if (specifier.startsWith("/")) {
9005
9326
  absolute = specifier;
9006
9327
  } else if (specifier.startsWith(".")) {
9007
- absolute = resolve12(artifactPath, "..", specifier);
9328
+ absolute = resolve13(artifactPath, "..", specifier);
9008
9329
  } else {
9009
- absolute = serverOutDir ? resolve12(serverOutDir, specifier) : resolve12(artifactPath, "..", specifier);
9330
+ absolute = serverOutDir ? resolve13(serverOutDir, specifier) : resolve13(artifactPath, "..", specifier);
9010
9331
  }
9011
9332
  return {
9012
9333
  kind: "resolved",
@@ -9070,19 +9391,19 @@ var init_verifyAngularCoreUniqueness = __esm(() => {
9070
9391
 
9071
9392
  // src/build/generateReactIndexes.ts
9072
9393
  import { existsSync as existsSync8, mkdirSync as mkdirSync2 } from "fs";
9073
- import { readdir as readdir2, rm, writeFile } from "fs/promises";
9074
- import { basename as basename3, join as join9, relative as relative5, resolve as resolve13, sep } from "path";
9394
+ import { readdir as readdir3, rm, writeFile } from "fs/promises";
9395
+ import { basename as basename3, join as join11, relative as relative6, resolve as resolve14, sep } from "path";
9075
9396
  var {Glob: Glob2 } = globalThis.Bun;
9076
9397
  var indexContentCache, resolveDevClientDir = () => {
9077
9398
  const projectRoot = process.cwd();
9078
- const fromSource = resolve13(import.meta.dir, "../dev/client");
9399
+ const fromSource = resolve14(import.meta.dir, "../dev/client");
9079
9400
  if (existsSync8(fromSource) && fromSource.startsWith(projectRoot)) {
9080
9401
  return fromSource;
9081
9402
  }
9082
- const fromNodeModules = resolve13(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
9403
+ const fromNodeModules = resolve14(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
9083
9404
  if (existsSync8(fromNodeModules))
9084
9405
  return fromNodeModules;
9085
- return resolve13(import.meta.dir, "./dev/client");
9406
+ return resolve14(import.meta.dir, "./dev/client");
9086
9407
  }, devClientDir, errorOverlayPath, hmrClientPath, refreshSetupPath, reactRefreshRuntimePath, generateReactIndexFiles = async (reactPagesDirectory, reactIndexesDirectory, isDev2 = false) => {
9087
9408
  if (!existsSync8(reactIndexesDirectory)) {
9088
9409
  mkdirSync2(reactIndexesDirectory, { recursive: true });
@@ -9097,20 +9418,20 @@ var indexContentCache, resolveDevClientDir = () => {
9097
9418
  }
9098
9419
  const currentPageNames = new Set(files.map((file2) => basename3(file2).split(".")[0]));
9099
9420
  const emptyStringArray = [];
9100
- const existingIndexes = await readdir2(reactIndexesDirectory).catch(() => emptyStringArray);
9421
+ const existingIndexes = await readdir3(reactIndexesDirectory).catch(() => emptyStringArray);
9101
9422
  const staleIndexes = existingIndexes.filter((indexFile) => {
9102
9423
  const indexName = indexFile.replace(/\.tsx$/, "");
9103
9424
  return indexName !== "_refresh" && !currentPageNames.has(indexName);
9104
9425
  });
9105
9426
  if (staleIndexes.length > 0) {
9106
9427
  await Promise.all(staleIndexes.map((indexFile) => {
9107
- indexContentCache.delete(join9(reactIndexesDirectory, indexFile));
9108
- return rm(join9(reactIndexesDirectory, indexFile), {
9428
+ indexContentCache.delete(join11(reactIndexesDirectory, indexFile));
9429
+ return rm(join11(reactIndexesDirectory, indexFile), {
9109
9430
  force: true
9110
9431
  });
9111
9432
  }));
9112
9433
  }
9113
- const pagesRelPath = relative5(resolve13(reactIndexesDirectory), resolve13(reactPagesDirectory)).split(sep).join("/");
9434
+ const pagesRelPath = relative6(resolve14(reactIndexesDirectory), resolve14(reactPagesDirectory)).split(sep).join("/");
9114
9435
  const promises = files.map(async (file2) => {
9115
9436
  const fileName = basename3(file2);
9116
9437
  const componentName = fileName.split(".")[0];
@@ -9384,11 +9705,11 @@ var indexContentCache, resolveDevClientDir = () => {
9384
9705
  `
9385
9706
  // Pre-warm: import the page module from the module server`,
9386
9707
  `// immediately so the browser caches all /@src/ URLs.`,
9387
- `import('/@src/${relative5(process.cwd(), resolve13(reactPagesDirectory, `${componentName}.tsx`)).replace(/\\/g, "/")}').catch(() => {});`
9708
+ `import('/@src/${relative6(process.cwd(), resolve14(reactPagesDirectory, `${componentName}.tsx`)).replace(/\\/g, "/")}').catch(() => {});`
9388
9709
  ] : []
9389
9710
  ].join(`
9390
9711
  `);
9391
- const indexPath = join9(reactIndexesDirectory, `${componentName}.tsx`);
9712
+ const indexPath = join11(reactIndexesDirectory, `${componentName}.tsx`);
9392
9713
  const hasher = new Bun.CryptoHasher("md5");
9393
9714
  hasher.update(content);
9394
9715
  const contentHash = hasher.digest("hex");
@@ -9402,7 +9723,7 @@ var indexContentCache, resolveDevClientDir = () => {
9402
9723
  if (!isDev2) {
9403
9724
  return;
9404
9725
  }
9405
- const refreshPath = join9(reactIndexesDirectory, "_refresh.tsx");
9726
+ const refreshPath = join11(reactIndexesDirectory, "_refresh.tsx");
9406
9727
  if (!existsSync8(refreshPath)) {
9407
9728
  await writeFile(refreshPath, `import '${refreshSetupPath}';
9408
9729
  import 'react';
@@ -9413,10 +9734,10 @@ import 'react-dom/client';
9413
9734
  var init_generateReactIndexes = __esm(() => {
9414
9735
  indexContentCache = new Map;
9415
9736
  devClientDir = resolveDevClientDir();
9416
- errorOverlayPath = join9(devClientDir, "errorOverlay.ts").replace(/\\/g, "/");
9417
- hmrClientPath = join9(devClientDir, "hmrClient.ts").replace(/\\/g, "/");
9418
- refreshSetupPath = join9(devClientDir, "reactRefreshSetup.ts").replace(/\\/g, "/");
9419
- reactRefreshRuntimePath = join9(devClientDir, "vendor", "reactRefreshRuntime.js").replace(/\\/g, "/");
9737
+ errorOverlayPath = join11(devClientDir, "errorOverlay.ts").replace(/\\/g, "/");
9738
+ hmrClientPath = join11(devClientDir, "hmrClient.ts").replace(/\\/g, "/");
9739
+ refreshSetupPath = join11(devClientDir, "reactRefreshSetup.ts").replace(/\\/g, "/");
9740
+ reactRefreshRuntimePath = join11(devClientDir, "vendor", "reactRefreshRuntime.js").replace(/\\/g, "/");
9420
9741
  });
9421
9742
 
9422
9743
  // src/build/wrapHTMLScript.ts
@@ -9533,7 +9854,7 @@ var init_scanConventions = __esm(() => {
9533
9854
 
9534
9855
  // src/build/scanRouteRegistrations.ts
9535
9856
  import { readdirSync, readFileSync as readFileSync9 } from "fs";
9536
- import { join as join10 } from "path";
9857
+ import { join as join12 } from "path";
9537
9858
  import ts2 from "typescript";
9538
9859
  var ELYSIA_ROUTE_METHODS, SKIP_DIRS, SOURCE_EXTENSIONS, getScriptKind = (filePath) => {
9539
9860
  if (filePath.endsWith(".tsx"))
@@ -9570,9 +9891,9 @@ var ELYSIA_ROUTE_METHODS, SKIP_DIRS, SOURCE_EXTENSIONS, getScriptKind = (filePat
9570
9891
  continue;
9571
9892
  if (entry.name.startsWith("."))
9572
9893
  continue;
9573
- stack.push(join10(dir, entry.name));
9894
+ stack.push(join12(dir, entry.name));
9574
9895
  } else if (entry.isFile() && hasSourceExtension(entry.name)) {
9575
- out.push(join10(dir, entry.name));
9896
+ out.push(join12(dir, entry.name));
9576
9897
  }
9577
9898
  }
9578
9899
  }
@@ -9656,7 +9977,7 @@ var init_scanRouteRegistrations = __esm(() => {
9656
9977
 
9657
9978
  // src/angular/staticAnalyzeSpaRoutes.ts
9658
9979
  import { existsSync as existsSync10, promises as fs } from "fs";
9659
- import { join as join11 } from "path";
9980
+ import { join as join13 } from "path";
9660
9981
  import ts3 from "typescript";
9661
9982
  var DYNAMIC_SEGMENT_PATTERN, pathHasDynamic = (path) => path.split("/").some((seg) => DYNAMIC_SEGMENT_PATTERN.test(seg) || seg === "**"), importsSymbolFrom = (sf, localName, moduleSpecifier) => {
9662
9983
  for (const statement of sf.statements) {
@@ -9854,7 +10175,7 @@ var DYNAMIC_SEGMENT_PATTERN, pathHasDynamic = (path) => path.split("/").some((se
9854
10175
  continue;
9855
10176
  if (item.name.startsWith("."))
9856
10177
  continue;
9857
- const full = join11(dir, item.name);
10178
+ const full = join13(dir, item.name);
9858
10179
  if (item.isDirectory()) {
9859
10180
  await walkTsFiles(full, out);
9860
10181
  } else if (item.isFile() && item.name.endsWith(".ts") && !item.name.endsWith(".d.ts")) {
@@ -9884,7 +10205,7 @@ var init_staticAnalyzeSpaRoutes = __esm(() => {
9884
10205
 
9885
10206
  // src/react/staticAnalyzeSpaRoutes.ts
9886
10207
  import { existsSync as existsSync11, promises as fs2 } from "fs";
9887
- import { join as join12 } from "path";
10208
+ import { join as join14 } from "path";
9888
10209
  import ts4 from "typescript";
9889
10210
  var DYNAMIC_SEGMENT_PATTERN2, pathHasDynamic2 = (path) => path.split("/").some((seg) => DYNAMIC_SEGMENT_PATTERN2.test(seg) || seg === "**"), readStringLiteral2 = (expression) => {
9890
10211
  if (ts4.isStringLiteral(expression) || ts4.isNoSubstitutionTemplateLiteral(expression)) {
@@ -10064,7 +10385,7 @@ var DYNAMIC_SEGMENT_PATTERN2, pathHasDynamic2 = (path) => path.split("/").some((
10064
10385
  for (const item of items) {
10065
10386
  if (item.name === "node_modules" || item.name.startsWith("."))
10066
10387
  continue;
10067
- const full = join12(dir, item.name);
10388
+ const full = join14(dir, item.name);
10068
10389
  if (item.isDirectory()) {
10069
10390
  await walkSourceFiles(full, out);
10070
10391
  } else if (item.isFile() && (item.name.endsWith(".tsx") || item.name.endsWith(".ts") || item.name.endsWith(".jsx") || item.name.endsWith(".js")) && !item.name.endsWith(".d.ts")) {
@@ -10094,7 +10415,7 @@ var init_staticAnalyzeSpaRoutes2 = __esm(() => {
10094
10415
 
10095
10416
  // src/svelte/staticAnalyzeSpaRoutes.ts
10096
10417
  import { existsSync as existsSync12, promises as fs3 } from "fs";
10097
- import { join as join13 } from "path";
10418
+ import { join as join15 } from "path";
10098
10419
  var DYNAMIC_SEGMENT_PATTERN3, pathHasDynamic3 = (path) => path.split("/").some((seg) => DYNAMIC_SEGMENT_PATTERN3.test(seg) || seg === "**"), joinSegments3 = (parent, child) => {
10099
10420
  if (!child)
10100
10421
  return parent;
@@ -10166,7 +10487,7 @@ var DYNAMIC_SEGMENT_PATTERN3, pathHasDynamic3 = (path) => path.split("/").some((
10166
10487
  for (const item of items) {
10167
10488
  if (item.name === "node_modules" || item.name.startsWith("."))
10168
10489
  continue;
10169
- const full = join13(dir, item.name);
10490
+ const full = join15(dir, item.name);
10170
10491
  if (item.isDirectory()) {
10171
10492
  await walkSvelteFiles(full, out);
10172
10493
  } else if (item.isFile() && item.name.endsWith(".svelte")) {
@@ -10198,7 +10519,7 @@ var init_staticAnalyzeSpaRoutes3 = __esm(() => {
10198
10519
 
10199
10520
  // src/vue/staticAnalyzeSpaRoutes.ts
10200
10521
  import { existsSync as existsSync13, promises as fs4 } from "fs";
10201
- import { join as join14 } from "path";
10522
+ import { join as join16 } from "path";
10202
10523
  import ts5 from "typescript";
10203
10524
  var DYNAMIC_SEGMENT_PATTERN4, pathHasDynamic4 = (path) => path.split("/").some((seg) => DYNAMIC_SEGMENT_PATTERN4.test(seg) || seg === "**"), readStringLiteral3 = (expression) => {
10204
10525
  if (ts5.isStringLiteral(expression) || ts5.isNoSubstitutionTemplateLiteral(expression)) {
@@ -10404,7 +10725,7 @@ var DYNAMIC_SEGMENT_PATTERN4, pathHasDynamic4 = (path) => path.split("/").some((
10404
10725
  for (const item of items) {
10405
10726
  if (item.name === "node_modules" || item.name.startsWith("."))
10406
10727
  continue;
10407
- const full = join14(dir, item.name);
10728
+ const full = join16(dir, item.name);
10408
10729
  if (item.isDirectory()) {
10409
10730
  await walkSourceFiles2(full, out);
10410
10731
  } else if (item.isFile() && (item.name.endsWith(".ts") || item.name.endsWith(".js") || item.name.endsWith(".vue")) && !item.name.endsWith(".d.ts")) {
@@ -10686,7 +11007,7 @@ var init_scanCssEntryPoints = __esm(() => {
10686
11007
 
10687
11008
  // src/utils/imageProcessing.ts
10688
11009
  import { existsSync as existsSync15, mkdirSync as mkdirSync3, readFileSync as readFileSync10, writeFileSync as writeFileSync4 } from "fs";
10689
- import { join as join15, resolve as resolve14 } from "path";
11010
+ import { join as join17, resolve as resolve15 } from "path";
10690
11011
  var DEFAULT_DEVICE_SIZES, DEFAULT_IMAGE_SIZES, DEFAULT_QUALITY, OPTIMIZATION_ENDPOINT = "/_absolute/image", BLUR_DEVIATION = 20, sharpModule = undefined, sharpLoaded = false, sharpWarned = false, snapToSize = (target, sizes) => {
10691
11012
  for (const size of sizes) {
10692
11013
  if (size >= target)
@@ -10736,7 +11057,7 @@ var DEFAULT_DEVICE_SIZES, DEFAULT_IMAGE_SIZES, DEFAULT_QUALITY, OPTIMIZATION_END
10736
11057
  const image2 = config?.imageSizes ?? DEFAULT_IMAGE_SIZES;
10737
11058
  return [...device, ...image2].sort((left, right) => left - right);
10738
11059
  }, getCacheDir = (buildDir) => {
10739
- const dir = join15(buildDir, ".cache", "images");
11060
+ const dir = join17(buildDir, ".cache", "images");
10740
11061
  if (!existsSync15(dir))
10741
11062
  mkdirSync3(dir, { recursive: true });
10742
11063
  return dir;
@@ -10817,8 +11138,8 @@ var DEFAULT_DEVICE_SIZES, DEFAULT_IMAGE_SIZES, DEFAULT_QUALITY, OPTIMIZATION_END
10817
11138
  throw err;
10818
11139
  }
10819
11140
  }, readFromCache = (cacheDir, cacheKey) => {
10820
- const metaPath = join15(cacheDir, `${cacheKey}.meta`);
10821
- const dataPath = join15(cacheDir, `${cacheKey}.data`);
11141
+ const metaPath = join17(cacheDir, `${cacheKey}.meta`);
11142
+ const dataPath = join17(cacheDir, `${cacheKey}.data`);
10822
11143
  if (!existsSync15(metaPath) || !existsSync15(dataPath))
10823
11144
  return null;
10824
11145
  try {
@@ -10833,7 +11154,7 @@ var DEFAULT_DEVICE_SIZES, DEFAULT_IMAGE_SIZES, DEFAULT_QUALITY, OPTIMIZATION_END
10833
11154
  return sharpModule;
10834
11155
  sharpLoaded = true;
10835
11156
  try {
10836
- const sharpPath = resolve14(process.cwd(), "node_modules/sharp");
11157
+ const sharpPath = resolve15(process.cwd(), "node_modules/sharp");
10837
11158
  const mod = await import(sharpPath);
10838
11159
  sharpModule = mod.default ?? mod;
10839
11160
  return sharpModule;
@@ -10845,8 +11166,8 @@ var DEFAULT_DEVICE_SIZES, DEFAULT_IMAGE_SIZES, DEFAULT_QUALITY, OPTIMIZATION_END
10845
11166
  return null;
10846
11167
  }
10847
11168
  }, writeToCache = (cacheDir, cacheKey, buffer, meta) => {
10848
- const metaPath = join15(cacheDir, `${cacheKey}.meta`);
10849
- const dataPath = join15(cacheDir, `${cacheKey}.data`);
11169
+ const metaPath = join17(cacheDir, `${cacheKey}.meta`);
11170
+ const dataPath = join17(cacheDir, `${cacheKey}.data`);
10850
11171
  writeFileSync4(dataPath, buffer);
10851
11172
  writeFileSync4(metaPath, JSON.stringify(meta));
10852
11173
  };
@@ -10934,7 +11255,7 @@ var init_optimizeHtmlImages = __esm(() => {
10934
11255
  // src/cli/scripts/telemetry.ts
10935
11256
  import { existsSync as existsSync16, mkdirSync as mkdirSync4, readFileSync as readFileSync11, writeFileSync as writeFileSync5 } from "fs";
10936
11257
  import { homedir } from "os";
10937
- import { join as join16 } from "path";
11258
+ import { join as join18 } from "path";
10938
11259
  var configDir, configPath, getTelemetryConfig = () => {
10939
11260
  try {
10940
11261
  if (!existsSync16(configPath))
@@ -10947,14 +11268,14 @@ var configDir, configPath, getTelemetryConfig = () => {
10947
11268
  }
10948
11269
  };
10949
11270
  var init_telemetry = __esm(() => {
10950
- configDir = join16(homedir(), ".absolutejs");
10951
- configPath = join16(configDir, "telemetry.json");
11271
+ configDir = join18(homedir(), ".absolutejs");
11272
+ configPath = join18(configDir, "telemetry.json");
10952
11273
  });
10953
11274
 
10954
11275
  // src/cli/telemetryEvent.ts
10955
11276
  import { existsSync as existsSync17, readFileSync as readFileSync12 } from "fs";
10956
- import { arch, platform } from "os";
10957
- import { dirname as dirname9, join as join17, parse } from "path";
11277
+ import { arch as arch2, platform as platform2 } from "os";
11278
+ import { dirname as dirname10, join as join19, parse } from "path";
10958
11279
  var checkCandidate = (candidate) => {
10959
11280
  if (!existsSync17(candidate)) {
10960
11281
  return null;
@@ -10974,12 +11295,12 @@ var checkCandidate = (candidate) => {
10974
11295
  }, findPackageVersion = () => {
10975
11296
  let { dir } = import.meta;
10976
11297
  while (dir !== parse(dir).root) {
10977
- const candidate = join17(dir, "package.json");
11298
+ const candidate = join19(dir, "package.json");
10978
11299
  const version = checkCandidate(candidate);
10979
11300
  if (version) {
10980
11301
  return version;
10981
11302
  }
10982
- dir = dirname9(dir);
11303
+ dir = dirname10(dir);
10983
11304
  }
10984
11305
  return "unknown";
10985
11306
  }, sendTelemetryEvent = (event, payload) => {
@@ -10991,10 +11312,10 @@ var checkCandidate = (candidate) => {
10991
11312
  return;
10992
11313
  const body = {
10993
11314
  anonymousId: config.anonymousId,
10994
- arch: arch(),
11315
+ arch: arch2(),
10995
11316
  bunVersion: Bun.version,
10996
11317
  event,
10997
- os: platform(),
11318
+ os: platform2(),
10998
11319
  payload,
10999
11320
  timestamp: new Date().toISOString(),
11000
11321
  version: getVersion()
@@ -11072,18 +11393,18 @@ __export(exports_buildHMRClient, {
11072
11393
  buildHMRClient: () => buildHMRClient
11073
11394
  });
11074
11395
  import { existsSync as existsSync18 } from "fs";
11075
- import { resolve as resolve15 } from "path";
11396
+ import { resolve as resolve16 } from "path";
11076
11397
  var {build: bunBuild } = globalThis.Bun;
11077
11398
  var resolveHmrClientPath = () => {
11078
11399
  const projectRoot = process.cwd();
11079
- const fromSource = resolve15(import.meta.dir, "client/hmrClient.ts");
11400
+ const fromSource = resolve16(import.meta.dir, "client/hmrClient.ts");
11080
11401
  if (existsSync18(fromSource) && fromSource.startsWith(projectRoot)) {
11081
11402
  return fromSource;
11082
11403
  }
11083
- const fromNodeModules = resolve15(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client/hmrClient.ts");
11404
+ const fromNodeModules = resolve16(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client/hmrClient.ts");
11084
11405
  if (existsSync18(fromNodeModules))
11085
11406
  return fromNodeModules;
11086
- return resolve15(import.meta.dir, "dev/client/hmrClient.ts");
11407
+ return resolve16(import.meta.dir, "dev/client/hmrClient.ts");
11087
11408
  }, hmrClientPath2, buildHMRClient = async () => {
11088
11409
  const entryPoint = hmrClientPath2;
11089
11410
  const result = await bunBuild({
@@ -11096,83 +11417,22 @@ var resolveHmrClientPath = () => {
11096
11417
  console.error("Failed to build HMR client:", result.logs);
11097
11418
  sendTelemetryEvent("hmr:client-build-failed", {
11098
11419
  logCount: result.logs.length,
11099
- message: result.logs.map((log2) => log2.message).join("; ")
11100
- });
11101
- return "// HMR client build failed";
11102
- }
11103
- const [firstOutput] = result.outputs;
11104
- if (!firstOutput)
11105
- return "// HMR client build failed";
11106
- return firstOutput.text();
11107
- };
11108
- var init_buildHMRClient = __esm(() => {
11109
- init_telemetryEvent();
11110
- hmrClientPath2 = resolveHmrClientPath();
11111
- });
11112
-
11113
- // src/build/nativeRewrite.ts
11114
- import { dlopen, FFIType, ptr } from "bun:ffi";
11115
- import { platform as platform2, arch as arch2 } from "os";
11116
- import { resolve as resolve16 } from "path";
11117
- var ffiDefinition, nativeLib = null, loadNative = () => {
11118
- if (nativeLib !== null)
11119
- return nativeLib;
11120
- const osPlatform = platform2();
11121
- const cpu = arch2();
11122
- const platformMap = {
11123
- "darwin-arm64": "darwin-arm64/fast_ops.dylib",
11124
- "darwin-x64": "darwin-x64/fast_ops.dylib",
11125
- "linux-arm64": "linux-arm64/fast_ops.so",
11126
- "linux-x64": "linux-x64/fast_ops.so",
11127
- "win32-arm64": "windows-arm64/fast_ops.dll",
11128
- "win32-x64": "windows-x64/fast_ops.dll"
11129
- };
11130
- const libPath = platformMap[`${osPlatform}-${cpu}`];
11131
- if (!libPath)
11132
- return null;
11133
- try {
11134
- const fullPath = resolve16(import.meta.dir, "../../native/packages", libPath);
11135
- const lib = dlopen(fullPath, ffiDefinition);
11136
- nativeLib = lib.symbols;
11137
- return nativeLib;
11138
- } catch {
11139
- return null;
11140
- }
11141
- }, nativeRewriteImports = (content, replacements) => {
11142
- const lib = loadNative();
11143
- if (!lib)
11144
- return null;
11145
- const jsonStr = JSON.stringify(replacements);
11146
- const contentBuf = Buffer.from(content);
11147
- const jsonBuf = Buffer.from(jsonStr);
11148
- const outBuf = Buffer.alloc(content.length * 2);
11149
- const outLenBuf = new BigUint64Array([BigInt(outBuf.length)]);
11150
- const result = lib.rewrite_imports(ptr(contentBuf), contentBuf.length, ptr(jsonBuf), jsonBuf.length, ptr(outBuf), ptr(new Uint8Array(outLenBuf.buffer)));
11151
- if (result < 0)
11152
- return null;
11153
- if (result === 0)
11154
- return content;
11155
- const outLen = Number(outLenBuf[0]);
11156
- return outBuf.subarray(0, outLen).toString("utf-8");
11157
- };
11158
- var init_nativeRewrite = __esm(() => {
11159
- ffiDefinition = {
11160
- rewrite_imports: {
11161
- args: [
11162
- FFIType.ptr,
11163
- FFIType.u64,
11164
- FFIType.ptr,
11165
- FFIType.u64,
11166
- FFIType.ptr,
11167
- FFIType.ptr
11168
- ],
11169
- returns: FFIType.i32
11170
- }
11171
- };
11420
+ message: result.logs.map((log2) => log2.message).join("; ")
11421
+ });
11422
+ return "// HMR client build failed";
11423
+ }
11424
+ const [firstOutput] = result.outputs;
11425
+ if (!firstOutput)
11426
+ return "// HMR client build failed";
11427
+ return firstOutput.text();
11428
+ };
11429
+ var init_buildHMRClient = __esm(() => {
11430
+ init_telemetryEvent();
11431
+ hmrClientPath2 = resolveHmrClientPath();
11172
11432
  });
11173
11433
 
11174
11434
  // src/build/rewriteReactImports.ts
11175
- var escapeRegex = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), rewriterCache, cacheKey = (vendorPaths) => {
11435
+ var escapeRegex2 = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), rewriterCache, cacheKey = (vendorPaths) => {
11176
11436
  const entries = Object.entries(vendorPaths).sort(([left], [right]) => left.localeCompare(right));
11177
11437
  let key = "";
11178
11438
  for (const [k2, v2] of entries) {
@@ -11186,7 +11446,7 @@ var escapeRegex = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), rewriterC
11186
11446
  return cached;
11187
11447
  const replacements = Object.entries(vendorPaths).sort(([keyA], [keyB]) => keyB.length - keyA.length);
11188
11448
  const lookup = new Map(replacements);
11189
- const alt = replacements.map(([spec]) => escapeRegex(spec)).join("|");
11449
+ const alt = replacements.map(([spec]) => escapeRegex2(spec)).join("|");
11190
11450
  const fromRegex = new RegExp(`(from\\s*["'])(${alt})(["'])`, "g");
11191
11451
  const sideEffectRegex = new RegExp(`(import\\s*["'])(${alt})(["']\\s*;?)`, "g");
11192
11452
  const dynamicRegex = new RegExp(`(import\\s*\\(\\s*["'])(${alt})(["']\\s*\\))`, "g");
@@ -11277,7 +11537,7 @@ var devVendorPaths = null, getDevVendorPaths = () => devVendorPaths, setDevVendo
11277
11537
 
11278
11538
  // src/build/angularLinkerPlugin.ts
11279
11539
  import { existsSync as existsSync19, mkdirSync as mkdirSync5, readFileSync as readFileSync13, writeFileSync as writeFileSync6 } from "fs";
11280
- import { dirname as dirname10, join as join18, relative as relative6, resolve as resolve17 } from "path";
11540
+ import { dirname as dirname11, join as join20, relative as relative7, resolve as resolve17 } from "path";
11281
11541
  import { createHash as createHash3 } from "crypto";
11282
11542
  var CACHE_ROOT, ANGULAR_LINKER_CANDIDATE_RE, createAngularLinkerPlugin = (linkerJitMode) => ({
11283
11543
  name: "angular-linker",
@@ -11285,7 +11545,7 @@ var CACHE_ROOT, ANGULAR_LINKER_CANDIDATE_RE, createAngularLinkerPlugin = (linker
11285
11545
  let needsLinking;
11286
11546
  let babelTransform;
11287
11547
  let linkerPlugin;
11288
- const cacheDir = join18(CACHE_ROOT, linkerJitMode ? "jit" : "aot");
11548
+ const cacheDir = join20(CACHE_ROOT, linkerJitMode ? "jit" : "aot");
11289
11549
  bld.onLoad({ filter: ANGULAR_LINKER_CANDIDATE_RE }, async (args) => {
11290
11550
  const source = await Bun.file(args.path).text();
11291
11551
  if (!needsLinking) {
@@ -11298,7 +11558,7 @@ var CACHE_ROOT, ANGULAR_LINKER_CANDIDATE_RE, createAngularLinkerPlugin = (linker
11298
11558
  return;
11299
11559
  }
11300
11560
  const hash = createHash3("md5").update(source).digest("hex");
11301
- const cachePath = join18(cacheDir, `${hash}.js`);
11561
+ const cachePath = join20(cacheDir, `${hash}.js`);
11302
11562
  if (existsSync19(cachePath)) {
11303
11563
  return {
11304
11564
  contents: readFileSync13(cachePath, "utf-8"),
@@ -11315,10 +11575,10 @@ var CACHE_ROOT, ANGULAR_LINKER_CANDIDATE_RE, createAngularLinkerPlugin = (linker
11315
11575
  const mod = await import(linkerSpecifier);
11316
11576
  linkerPlugin = mod.createEs2015LinkerPlugin({
11317
11577
  fileSystem: {
11318
- dirname: dirname10,
11578
+ dirname: dirname11,
11319
11579
  exists: existsSync19,
11320
11580
  readFile: readFileSync13,
11321
- relative: relative6,
11581
+ relative: relative7,
11322
11582
  resolve: resolve17
11323
11583
  },
11324
11584
  linkerJitMode,
@@ -11357,7 +11617,7 @@ var init_angularLinkerPlugin = __esm(() => {
11357
11617
 
11358
11618
  // src/build/externalAssetPlugin.ts
11359
11619
  import { copyFileSync, existsSync as existsSync20, mkdirSync as mkdirSync6, statSync } from "fs";
11360
- import { basename as basename5, dirname as dirname11, join as join19, resolve as resolve18 } from "path";
11620
+ import { basename as basename5, dirname as dirname12, join as join21, resolve as resolve18 } from "path";
11361
11621
  var createExternalAssetPlugin = (outDir, userSourceRoots = []) => ({
11362
11622
  name: "absolute-external-asset",
11363
11623
  setup(bld) {
@@ -11372,7 +11632,7 @@ var createExternalAssetPlugin = (outDir, userSourceRoots = []) => ({
11372
11632
  return;
11373
11633
  urlPattern.lastIndex = 0;
11374
11634
  let match;
11375
- const sourceDir = dirname11(args.path);
11635
+ const sourceDir = dirname12(args.path);
11376
11636
  while ((match = urlPattern.exec(source)) !== null) {
11377
11637
  const relPath = match[1];
11378
11638
  if (!relPath)
@@ -11382,10 +11642,10 @@ var createExternalAssetPlugin = (outDir, userSourceRoots = []) => ({
11382
11642
  continue;
11383
11643
  if (!statSync(assetPath).isFile())
11384
11644
  continue;
11385
- const targetPath = join19(outDir, basename5(assetPath));
11645
+ const targetPath = join21(outDir, basename5(assetPath));
11386
11646
  if (existsSync20(targetPath))
11387
11647
  continue;
11388
- mkdirSync6(dirname11(targetPath), { recursive: true });
11648
+ mkdirSync6(dirname12(targetPath), { recursive: true });
11389
11649
  copyFileSync(assetPath, targetPath);
11390
11650
  }
11391
11651
  return;
@@ -11593,7 +11853,7 @@ __export(exports_hmrInjectionPlugin, {
11593
11853
  applyAngularHmrInjection: () => applyAngularHmrInjection
11594
11854
  });
11595
11855
  import { readFile as readFile5 } from "fs/promises";
11596
- import { relative as relative7, resolve as resolve19 } from "path";
11856
+ import { relative as relative8, resolve as resolve19 } from "path";
11597
11857
  var ENTITY_DECORATOR_RE, IMPORT_RE, TOP_LEVEL_DECL_RE, extractAllTopLevelNames = (jsSource) => {
11598
11858
  const names = new Set;
11599
11859
  IMPORT_RE.lastIndex = 0;
@@ -11773,9 +12033,9 @@ var ENTITY_DECORATOR_RE, IMPORT_RE, TOP_LEVEL_DECL_RE, extractAllTopLevelNames =
11773
12033
  }
11774
12034
  if (classNames.length === 0)
11775
12035
  return;
11776
- const relFromGenRoot = relative7(generatedAngularRoot, componentJsAbsPath).replace(/\\/g, "/");
12036
+ const relFromGenRoot = relative8(generatedAngularRoot, componentJsAbsPath).replace(/\\/g, "/");
11777
12037
  const userTsPath = resolve19(userAngularRoot, relFromGenRoot.replace(/\.js$/, ".ts"));
11778
- const projectRel = relative7(projectRoot, userTsPath).replace(/\\/g, "/");
12038
+ const projectRel = relative8(projectRoot, userTsPath).replace(/\\/g, "/");
11779
12039
  const tail = classNames.map((className) => {
11780
12040
  const id = `${projectRel}@${className}`;
11781
12041
  return buildHmrTail(className, JSON.stringify(id));
@@ -11815,11 +12075,11 @@ var HASHED_FILE_PATTERN, cleanStaleOutputs = async (buildPath, currentOutputPath
11815
12075
  const currentPaths = new Set(currentOutputPaths.map((path) => resolve20(path)));
11816
12076
  const glob = new Glob5("**/*");
11817
12077
  const removals = [];
11818
- for (const relative8 of glob.scanSync({ cwd: buildPath })) {
11819
- const absolute = resolve20(buildPath, relative8);
12078
+ for (const relative9 of glob.scanSync({ cwd: buildPath })) {
12079
+ const absolute = resolve20(buildPath, relative9);
11820
12080
  if (currentPaths.has(absolute))
11821
12081
  continue;
11822
- if (!HASHED_FILE_PATTERN.test(relative8))
12082
+ if (!HASHED_FILE_PATTERN.test(relative9))
11823
12083
  continue;
11824
12084
  removals.push(rm2(absolute, { force: true }));
11825
12085
  }
@@ -11835,20 +12095,20 @@ __export(exports_generatedDir, {
11835
12095
  getGeneratedRoot: () => getGeneratedRoot,
11836
12096
  getFrameworkGeneratedDir: () => getFrameworkGeneratedDir
11837
12097
  });
11838
- import { join as join20 } from "path";
11839
- var GENERATED_DIR_NAME = "generated", ABSOLUTE_CACHE_DIR_NAME = ".absolutejs", getGeneratedRoot = (projectRoot = process.cwd()) => join20(projectRoot, ABSOLUTE_CACHE_DIR_NAME, GENERATED_DIR_NAME), getFrameworkGeneratedDir = (framework, projectRoot = process.cwd()) => join20(getGeneratedRoot(projectRoot), framework);
12098
+ import { join as join22 } from "path";
12099
+ var GENERATED_DIR_NAME = "generated", ABSOLUTE_CACHE_DIR_NAME = ".absolutejs", getGeneratedRoot = (projectRoot = process.cwd()) => join22(projectRoot, ABSOLUTE_CACHE_DIR_NAME, GENERATED_DIR_NAME), getFrameworkGeneratedDir = (framework, projectRoot = process.cwd()) => join22(getGeneratedRoot(projectRoot), framework);
11840
12100
  var init_generatedDir = () => {};
11841
12101
 
11842
12102
  // src/utils/cleanup.ts
11843
12103
  import { rm as rm3 } from "fs/promises";
11844
- import { join as join21 } from "path";
12104
+ import { join as join23 } from "path";
11845
12105
  var removeIfExists = (path) => rm3(path, { force: true, recursive: true }), cleanFramework = (framework, frameworkDir, skipGenerated = false) => {
11846
12106
  const tasks = [];
11847
12107
  if (!skipGenerated) {
11848
12108
  tasks.push(removeIfExists(getFrameworkGeneratedDir(framework)));
11849
12109
  }
11850
12110
  if (frameworkDir)
11851
- tasks.push(removeIfExists(join21(frameworkDir, "generated")));
12111
+ tasks.push(removeIfExists(join23(frameworkDir, "generated")));
11852
12112
  return Promise.all(tasks);
11853
12113
  }, cleanup = async ({
11854
12114
  angularDir,
@@ -11887,7 +12147,7 @@ var init_commonAncestor = () => {};
11887
12147
 
11888
12148
  // src/utils/buildDirectoryLock.ts
11889
12149
  import { mkdirSync as mkdirSync7, unlinkSync, writeFileSync as writeFileSync7, readFileSync as readFileSync14 } from "fs";
11890
- import { dirname as dirname12, join as join22 } from "path";
12150
+ import { dirname as dirname13, join as join24 } from "path";
11891
12151
  var heldLocks, HELD_LOCKS_ENV = "ABSOLUTE_HELD_BUILD_DIRECTORY_LOCKS", exitHandlersRegistered = false, registerExitHandlersOnce = () => {
11892
12152
  if (exitHandlersRegistered)
11893
12153
  return;
@@ -11913,7 +12173,7 @@ var heldLocks, HELD_LOCKS_ENV = "ABSOLUTE_HELD_BUILD_DIRECTORY_LOCKS", exitHandl
11913
12173
  releaseAllSync();
11914
12174
  throw err;
11915
12175
  });
11916
- }, isAlreadyExistsError = (error) => error instanceof Error && ("code" in error) && error.code === "EEXIST", lockPathForBuildDirectory = (buildDirectory) => join22(dirname12(buildDirectory), ".absolutejs", "build.lock"), readHeldLockEnv = () => new Set((process.env[HELD_LOCKS_ENV] ?? "").split(`
12176
+ }, isAlreadyExistsError = (error) => error instanceof Error && ("code" in error) && error.code === "EEXIST", lockPathForBuildDirectory = (buildDirectory) => join24(dirname13(buildDirectory), ".absolutejs", "build.lock"), readHeldLockEnv = () => new Set((process.env[HELD_LOCKS_ENV] ?? "").split(`
11917
12177
  `).filter((entry) => entry.length > 0)), writeHeldLockEnv = (locks) => {
11918
12178
  if (locks.size === 0) {
11919
12179
  delete process.env[HELD_LOCKS_ENV];
@@ -11930,7 +12190,7 @@ var heldLocks, HELD_LOCKS_ENV = "ABSOLUTE_HELD_BUILD_DIRECTORY_LOCKS", exitHandl
11930
12190
  locks.delete(buildDirectory);
11931
12191
  writeHeldLockEnv(locks);
11932
12192
  }, writeLockFileSync = (lockPath, metadata2) => {
11933
- mkdirSync7(dirname12(lockPath), { recursive: true });
12193
+ mkdirSync7(dirname13(lockPath), { recursive: true });
11934
12194
  writeFileSync7(lockPath, JSON.stringify(metadata2, null, 2), { flag: "wx" });
11935
12195
  }, readLockMetadata = (lockPath) => {
11936
12196
  try {
@@ -12050,11 +12310,11 @@ var init_buildDirectoryLock = __esm(() => {
12050
12310
  });
12051
12311
 
12052
12312
  // src/utils/validateSafePath.ts
12053
- import { resolve as resolve21, relative as relative8 } from "path";
12313
+ import { resolve as resolve21, relative as relative9 } from "path";
12054
12314
  var validateSafePath = (targetPath, baseDirectory) => {
12055
12315
  const absoluteBase = resolve21(baseDirectory);
12056
12316
  const absoluteTarget = resolve21(baseDirectory, targetPath);
12057
- const relativePath = normalizePath(relative8(absoluteBase, absoluteTarget));
12317
+ const relativePath = normalizePath(relative9(absoluteBase, absoluteTarget));
12058
12318
  if (relativePath.startsWith("../") || relativePath === "..") {
12059
12319
  throw new Error(`Unsafe path: ${targetPath}`);
12060
12320
  }
@@ -12068,7 +12328,7 @@ __export(exports_scanVueSsrOnlyPages, {
12068
12328
  scanVueSsrOnlyPages: () => scanVueSsrOnlyPages
12069
12329
  });
12070
12330
  import { readdirSync as readdirSync2, readFileSync as readFileSync15 } from "fs";
12071
- import { join as join23 } from "path";
12331
+ import { join as join25 } from "path";
12072
12332
  import ts7 from "typescript";
12073
12333
  var SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind2 = (filePath) => {
12074
12334
  if (filePath.endsWith(".tsx"))
@@ -12101,9 +12361,9 @@ var SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind2 = (filePath) => {
12101
12361
  continue;
12102
12362
  if (entry.name.startsWith("."))
12103
12363
  continue;
12104
- stack.push(join23(dir, entry.name));
12364
+ stack.push(join25(dir, entry.name));
12105
12365
  } else if (entry.isFile() && hasSourceExtension2(entry.name)) {
12106
- out.push(join23(dir, entry.name));
12366
+ out.push(join25(dir, entry.name));
12107
12367
  }
12108
12368
  }
12109
12369
  }
@@ -12215,7 +12475,7 @@ var init_scanVueSsrOnlyPages = __esm(() => {
12215
12475
 
12216
12476
  // src/build/scanAngularHandlerCalls.ts
12217
12477
  import { readdirSync as readdirSync3, readFileSync as readFileSync16 } from "fs";
12218
- import { join as join24 } from "path";
12478
+ import { join as join26 } from "path";
12219
12479
  import ts8 from "typescript";
12220
12480
  var ELYSIA_ROUTE_METHODS2, SKIP_DIRS3, SOURCE_EXTENSIONS3, getScriptKind3 = (filePath) => {
12221
12481
  if (filePath.endsWith(".tsx"))
@@ -12248,9 +12508,9 @@ var ELYSIA_ROUTE_METHODS2, SKIP_DIRS3, SOURCE_EXTENSIONS3, getScriptKind3 = (fil
12248
12508
  continue;
12249
12509
  if (entry.name.startsWith("."))
12250
12510
  continue;
12251
- stack.push(join24(dir, entry.name));
12511
+ stack.push(join26(dir, entry.name));
12252
12512
  } else if (entry.isFile() && hasSourceExtension3(entry.name)) {
12253
- out.push(join24(dir, entry.name));
12513
+ out.push(join26(dir, entry.name));
12254
12514
  }
12255
12515
  }
12256
12516
  }
@@ -12365,7 +12625,7 @@ var init_scanAngularHandlerCalls = __esm(() => {
12365
12625
 
12366
12626
  // src/build/scanAngularPageRoutes.ts
12367
12627
  import { readdirSync as readdirSync4, readFileSync as readFileSync17 } from "fs";
12368
- import { basename as basename7, join as join25 } from "path";
12628
+ import { basename as basename7, join as join27 } from "path";
12369
12629
  import ts9 from "typescript";
12370
12630
  var SOURCE_EXTENSIONS4, SKIP_DIRS4, hasSourceExtension4 = (filePath) => {
12371
12631
  const idx = filePath.lastIndexOf(".");
@@ -12405,9 +12665,9 @@ var SOURCE_EXTENSIONS4, SKIP_DIRS4, hasSourceExtension4 = (filePath) => {
12405
12665
  continue;
12406
12666
  if (entry.name.startsWith("."))
12407
12667
  continue;
12408
- stack.push(join25(dir, entry.name));
12668
+ stack.push(join27(dir, entry.name));
12409
12669
  } else if (entry.isFile() && isPageFile(entry.name)) {
12410
- out.push(join25(dir, entry.name));
12670
+ out.push(join27(dir, entry.name));
12411
12671
  }
12412
12672
  }
12413
12673
  }
@@ -12484,7 +12744,7 @@ __export(exports_parseAngularConfigImports, {
12484
12744
  parseAngularProvidersImport: () => parseAngularProvidersImport
12485
12745
  });
12486
12746
  import { existsSync as existsSync21, readFileSync as readFileSync18 } from "fs";
12487
- import { dirname as dirname13, isAbsolute as isAbsolute3, join as join26 } from "path";
12747
+ import { dirname as dirname14, isAbsolute as isAbsolute3, join as join28 } from "path";
12488
12748
  import ts10 from "typescript";
12489
12749
  var findDefineConfigCall = (sf) => {
12490
12750
  let result = null;
@@ -12539,15 +12799,15 @@ var findDefineConfigCall = (sf) => {
12539
12799
  }, resolveConfigPath = (projectRoot) => {
12540
12800
  const envOverride = process.env.ABSOLUTE_CONFIG;
12541
12801
  if (envOverride) {
12542
- const resolved = isAbsolute3(envOverride) ? envOverride : join26(projectRoot, envOverride);
12802
+ const resolved = isAbsolute3(envOverride) ? envOverride : join28(projectRoot, envOverride);
12543
12803
  if (existsSync21(resolved))
12544
12804
  return resolved;
12545
12805
  }
12546
12806
  const candidates = [
12547
- join26(projectRoot, "absolute.config.ts"),
12548
- join26(projectRoot, "absolute.config.mts"),
12549
- join26(projectRoot, "absolute.config.js"),
12550
- join26(projectRoot, "absolute.config.mjs")
12807
+ join28(projectRoot, "absolute.config.ts"),
12808
+ join28(projectRoot, "absolute.config.mts"),
12809
+ join28(projectRoot, "absolute.config.js"),
12810
+ join28(projectRoot, "absolute.config.mjs")
12551
12811
  ];
12552
12812
  for (const candidate of candidates) {
12553
12813
  if (existsSync21(candidate))
@@ -12579,8 +12839,8 @@ var findDefineConfigCall = (sf) => {
12579
12839
  const importInfo = findImportForBinding(sf, binding);
12580
12840
  if (!importInfo)
12581
12841
  return null;
12582
- const configDir2 = dirname13(configPath2);
12583
- const absolutePath = importInfo.source.startsWith(".") ? join26(configDir2, importInfo.source).replace(/\.[cm]?[tj]sx?$/, "") : isAbsolute3(importInfo.source) ? importInfo.source.replace(/\.[cm]?[tj]sx?$/, "") : importInfo.source;
12842
+ const configDir2 = dirname14(configPath2);
12843
+ const absolutePath = importInfo.source.startsWith(".") ? join28(configDir2, importInfo.source).replace(/\.[cm]?[tj]sx?$/, "") : isAbsolute3(importInfo.source) ? importInfo.source.replace(/\.[cm]?[tj]sx?$/, "") : importInfo.source;
12584
12844
  return {
12585
12845
  absolutePath,
12586
12846
  bindingName: binding,
@@ -12652,14 +12912,14 @@ __export(exports_compileSvelte, {
12652
12912
  clearSvelteCompilerCache: () => clearSvelteCompilerCache
12653
12913
  });
12654
12914
  import { existsSync as existsSync22 } from "fs";
12655
- import { mkdir as mkdir4, stat as stat2 } from "fs/promises";
12915
+ import { mkdir as mkdir5, stat as stat2 } from "fs/promises";
12656
12916
  import {
12657
- dirname as dirname14,
12658
- join as join27,
12917
+ dirname as dirname15,
12918
+ join as join29,
12659
12919
  basename as basename8,
12660
12920
  extname as extname5,
12661
12921
  resolve as resolve22,
12662
- relative as relative9,
12922
+ relative as relative10,
12663
12923
  sep as sep2
12664
12924
  } from "path";
12665
12925
  import { env as env2 } from "process";
@@ -12703,7 +12963,7 @@ var resolveDevClientDir2 = () => {
12703
12963
  }, resolveRelativeModule2 = async (spec, from) => {
12704
12964
  if (!spec.startsWith("."))
12705
12965
  return null;
12706
- const basePath = resolve22(dirname14(from), spec);
12966
+ const basePath = resolve22(dirname15(from), spec);
12707
12967
  const candidates = [
12708
12968
  basePath,
12709
12969
  `${basePath}.ts`,
@@ -12714,14 +12974,14 @@ var resolveDevClientDir2 = () => {
12714
12974
  `${basePath}.svelte`,
12715
12975
  `${basePath}.svelte.ts`,
12716
12976
  `${basePath}.svelte.js`,
12717
- join27(basePath, "index.ts"),
12718
- join27(basePath, "index.js"),
12719
- join27(basePath, "index.mjs"),
12720
- join27(basePath, "index.cjs"),
12721
- join27(basePath, "index.json"),
12722
- join27(basePath, "index.svelte"),
12723
- join27(basePath, "index.svelte.ts"),
12724
- join27(basePath, "index.svelte.js")
12977
+ join29(basePath, "index.ts"),
12978
+ join29(basePath, "index.js"),
12979
+ join29(basePath, "index.mjs"),
12980
+ join29(basePath, "index.cjs"),
12981
+ join29(basePath, "index.json"),
12982
+ join29(basePath, "index.svelte"),
12983
+ join29(basePath, "index.svelte.ts"),
12984
+ join29(basePath, "index.svelte.js")
12725
12985
  ];
12726
12986
  const checks = await Promise.all(candidates.map(exists));
12727
12987
  return candidates.find((_2, index) => checks[index]) ?? null;
@@ -12730,7 +12990,7 @@ var resolveDevClientDir2 = () => {
12730
12990
  const resolved = resolvePackageImport(spec);
12731
12991
  return resolved && /\.svelte(\.(?:ts|js))?$/.test(resolved) ? resolved : null;
12732
12992
  }
12733
- const basePath = resolve22(dirname14(from), spec);
12993
+ const basePath = resolve22(dirname15(from), spec);
12734
12994
  const explicit = /\.(svelte|svelte\.(?:ts|js))$/.test(basePath);
12735
12995
  if (!explicit) {
12736
12996
  const extensions = [".svelte", ".svelte.ts", ".svelte.js"];
@@ -12751,8 +13011,8 @@ var resolveDevClientDir2 = () => {
12751
13011
  return jsPath;
12752
13012
  return null;
12753
13013
  }, addModuleRewrite = (rewrites, rawSpec, resolvedModule, ssrOutputDir, clientOutputDir) => {
12754
- const toServer = relative9(ssrOutputDir, resolvedModule).replace(/\\/g, "/");
12755
- const toClient = relative9(clientOutputDir, resolvedModule).replace(/\\/g, "/");
13014
+ const toServer = relative10(ssrOutputDir, resolvedModule).replace(/\\/g, "/");
13015
+ const toClient = relative10(clientOutputDir, resolvedModule).replace(/\\/g, "/");
12756
13016
  rewrites.set(rawSpec, {
12757
13017
  client: toClient.startsWith(".") || toClient.startsWith("/") ? toClient : `./${toClient}`,
12758
13018
  server: toServer.startsWith(".") ? toServer : `./${toServer}`
@@ -12760,10 +13020,10 @@ var resolveDevClientDir2 = () => {
12760
13020
  }, compileSvelte = async (entryPoints, svelteRoot, cache = new Map, isDev2 = false, stylePreprocessors) => {
12761
13021
  const { compile, compileModule, preprocess } = await import("svelte/compiler");
12762
13022
  const generatedDir = getFrameworkGeneratedDir("svelte");
12763
- const clientDir = join27(generatedDir, "client");
12764
- const indexDir = join27(generatedDir, "indexes");
12765
- const serverDir = join27(generatedDir, "server");
12766
- await Promise.all([clientDir, indexDir, serverDir].map((dir) => mkdir4(dir, { recursive: true })));
13023
+ const clientDir = join29(generatedDir, "client");
13024
+ const indexDir = join29(generatedDir, "indexes");
13025
+ const serverDir = join29(generatedDir, "server");
13026
+ await Promise.all([clientDir, indexDir, serverDir].map((dir) => mkdir5(dir, { recursive: true })));
12767
13027
  const dev = env2.NODE_ENV !== "production";
12768
13028
  const build2 = async (src) => {
12769
13029
  const memoized = cache.get(src);
@@ -12790,8 +13050,8 @@ var resolveDevClientDir2 = () => {
12790
13050
  const preprocessedClient = isModule ? loweredClientSource.code : (await preprocess(loweredClientSource.code, svelteStylePreprocessor)).code;
12791
13051
  const transpiledServer = src.endsWith(".ts") || src.endsWith(".svelte.ts") ? transpiler3.transformSync(preprocessedServer) : preprocessedServer;
12792
13052
  const transpiledClient = src.endsWith(".ts") || src.endsWith(".svelte.ts") ? transpiler3.transformSync(preprocessedClient) : preprocessedClient;
12793
- const rawRel = dirname14(relative9(svelteRoot, src)).replace(/\\/g, "/");
12794
- const relDir = rawRel.startsWith("..") ? `_ext/${relative9(process.cwd(), dirname14(src)).replace(/\\/g, "/")}` : rawRel;
13053
+ const rawRel = dirname15(relative10(svelteRoot, src)).replace(/\\/g, "/");
13054
+ const relDir = rawRel.startsWith("..") ? `_ext/${relative10(process.cwd(), dirname15(src)).replace(/\\/g, "/")}` : rawRel;
12795
13055
  const baseName = basename8(src).replace(/\.svelte(\.(ts|js))?$/, "");
12796
13056
  const importPaths = Array.from(transpiledServer.matchAll(/from\s+['"]([^'"]+)['"]/g)).map((match) => match[1]).filter((path) => path !== undefined);
12797
13057
  const resolvedModuleImports = await Promise.all(importPaths.map((importPath) => resolveRelativeModule2(importPath, src)));
@@ -12800,8 +13060,8 @@ var resolveDevClientDir2 = () => {
12800
13060
  const childBuilt = await Promise.all(childSources.map((child) => build2(child)));
12801
13061
  const hasAwaitSlotFromChildren = childBuilt.some((child) => child.hasAwaitSlot);
12802
13062
  const externalRewrites = new Map;
12803
- const ssrOutputDir = dirname14(join27(serverDir, relDir, `${baseName}.js`));
12804
- const clientOutputDir = dirname14(join27(clientDir, relDir, `${baseName}.js`));
13063
+ const ssrOutputDir = dirname15(join29(serverDir, relDir, `${baseName}.js`));
13064
+ const clientOutputDir = dirname15(join29(clientDir, relDir, `${baseName}.js`));
12805
13065
  for (let idx = 0;idx < importPaths.length; idx++) {
12806
13066
  const rawSpec = importPaths[idx];
12807
13067
  if (!rawSpec)
@@ -12812,15 +13072,15 @@ var resolveDevClientDir2 = () => {
12812
13072
  addModuleRewrite(externalRewrites, rawSpec, resolvedModule, ssrOutputDir, clientOutputDir);
12813
13073
  if (!resolved)
12814
13074
  continue;
12815
- const childRel = relative9(svelteRoot, resolved).replace(/\\/g, "/");
13075
+ const childRel = relative10(svelteRoot, resolved).replace(/\\/g, "/");
12816
13076
  if (!childRel.startsWith(".."))
12817
13077
  continue;
12818
13078
  const childBuilt2 = cache.get(resolved);
12819
13079
  if (!childBuilt2)
12820
13080
  continue;
12821
13081
  const origSpec = rawSpec.replace(/\.svelte(?:\.(?:ts|js))?$/, ".js");
12822
- const toServer = relative9(ssrOutputDir, childBuilt2.ssr).replace(/\\/g, "/");
12823
- const toClient = relative9(clientOutputDir, childBuilt2.client).replace(/\\/g, "/");
13082
+ const toServer = relative10(ssrOutputDir, childBuilt2.ssr).replace(/\\/g, "/");
13083
+ const toClient = relative10(clientOutputDir, childBuilt2.client).replace(/\\/g, "/");
12824
13084
  externalRewrites.set(origSpec, {
12825
13085
  client: toClient.startsWith(".") ? toClient : `./${toClient}`,
12826
13086
  server: toServer.startsWith(".") ? toServer : `./${toServer}`
@@ -12854,7 +13114,7 @@ var resolveDevClientDir2 = () => {
12854
13114
  }).js;
12855
13115
  let code = compiledJs.code.replace(/\.svelte(?:\.(?:ts|js))?(['"])/g, ".js$1");
12856
13116
  if (mode === "client" && isDev2) {
12857
- const moduleKey = `/@src/${relative9(process.cwd(), src).replace(/\\/g, "/")}`;
13117
+ const moduleKey = `/@src/${relative10(process.cwd(), src).replace(/\\/g, "/")}`;
12858
13118
  code = code.replace(/if\s*\(import\.meta\.hot\)\s*\{/, `if (typeof window !== "undefined") {
12859
13119
  if (!window.__SVELTE_HMR_ACCEPT__) window.__SVELTE_HMR_ACCEPT__ = {};
12860
13120
  var __hmr_accept = function(cb) { window.__SVELTE_HMR_ACCEPT__[${JSON.stringify(moduleKey)}] = cb; };`);
@@ -12866,11 +13126,11 @@ var resolveDevClientDir2 = () => {
12866
13126
  code += islandMetadataExports;
12867
13127
  return { code, map: compiledJs.map };
12868
13128
  };
12869
- const ssrPath = join27(serverDir, relDir, `${baseName}.js`);
12870
- const clientPath = join27(clientDir, relDir, `${baseName}.js`);
13129
+ const ssrPath = join29(serverDir, relDir, `${baseName}.js`);
13130
+ const clientPath = join29(clientDir, relDir, `${baseName}.js`);
12871
13131
  await Promise.all([
12872
- mkdir4(dirname14(ssrPath), { recursive: true }),
12873
- mkdir4(dirname14(clientPath), { recursive: true })
13132
+ mkdir5(dirname15(ssrPath), { recursive: true }),
13133
+ mkdir5(dirname15(clientPath), { recursive: true })
12874
13134
  ]);
12875
13135
  const inlineMap = (map) => map ? `
12876
13136
  //# sourceMappingURL=data:application/json;base64,${Buffer.from(JSON.stringify(map)).toString("base64")}
@@ -12903,10 +13163,10 @@ var resolveDevClientDir2 = () => {
12903
13163
  };
12904
13164
  const roots = await Promise.all(entryPoints.map(build2));
12905
13165
  await Promise.all(roots.map(async ({ client: client2, hasAwaitSlot }) => {
12906
- const relClientDir = dirname14(relative9(clientDir, client2));
13166
+ const relClientDir = dirname15(relative10(clientDir, client2));
12907
13167
  const name = basename8(client2, extname5(client2));
12908
- const indexPath = join27(indexDir, relClientDir, `${name}.js`);
12909
- const importRaw = relative9(dirname14(indexPath), client2).split(sep2).join("/");
13168
+ const indexPath = join29(indexDir, relClientDir, `${name}.js`);
13169
+ const importRaw = relative10(dirname15(indexPath), client2).split(sep2).join("/");
12910
13170
  const importPath = importRaw.startsWith(".") || importRaw.startsWith("/") ? importRaw : `./${importRaw}`;
12911
13171
  const hmrImports = isDev2 ? `window.__HMR_FRAMEWORK__ = "svelte";
12912
13172
  import "${hmrClientPath3}";
@@ -12977,14 +13237,14 @@ if (typeof window !== "undefined") {
12977
13237
  setTimeout(releaseStreamingSlots, 0);
12978
13238
  }
12979
13239
  }`;
12980
- await mkdir4(dirname14(indexPath), { recursive: true });
13240
+ await mkdir5(dirname15(indexPath), { recursive: true });
12981
13241
  return write2(indexPath, bootstrap);
12982
13242
  }));
12983
13243
  return {
12984
13244
  svelteClientPaths: roots.map(({ client: client2 }) => client2),
12985
13245
  svelteIndexPaths: roots.map(({ client: client2 }) => {
12986
- const rel = dirname14(relative9(clientDir, client2));
12987
- return join27(indexDir, rel, basename8(client2));
13246
+ const rel = dirname15(relative10(clientDir, client2));
13247
+ return join29(indexDir, rel, basename8(client2));
12988
13248
  }),
12989
13249
  svelteServerPaths: roots.map(({ ssr }) => ssr)
12990
13250
  };
@@ -12999,7 +13259,7 @@ var init_compileSvelte = __esm(() => {
12999
13259
  init_lowerAwaitSlotSyntax();
13000
13260
  init_renderToReadableStream();
13001
13261
  devClientDir2 = resolveDevClientDir2();
13002
- hmrClientPath3 = join27(devClientDir2, "hmrClient.ts").replace(/\\/g, "/");
13262
+ hmrClientPath3 = join29(devClientDir2, "hmrClient.ts").replace(/\\/g, "/");
13003
13263
  persistentCache = new Map;
13004
13264
  sourceHashCache = new Map;
13005
13265
  transpiler3 = new Transpiler2({ loader: "ts", target: "browser" });
@@ -13411,13 +13671,13 @@ __export(exports_compileVue, {
13411
13671
  clearVueHmrCaches: () => clearVueHmrCaches
13412
13672
  });
13413
13673
  import { existsSync as existsSync23, readFileSync as readFileSync20, realpathSync as realpathSync2 } from "fs";
13414
- import { mkdir as mkdir5 } from "fs/promises";
13674
+ import { mkdir as mkdir6 } from "fs/promises";
13415
13675
  import {
13416
13676
  basename as basename9,
13417
- dirname as dirname15,
13677
+ dirname as dirname16,
13418
13678
  isAbsolute as isAbsolute4,
13419
- join as join28,
13420
- relative as relative10,
13679
+ join as join30,
13680
+ relative as relative11,
13421
13681
  resolve as resolve23
13422
13682
  } from "path";
13423
13683
  var {file: file3, write: write3, Transpiler: Transpiler3 } = globalThis.Bun;
@@ -13469,14 +13729,14 @@ var resolveDevClientDir3 = () => {
13469
13729
  return "template-only";
13470
13730
  }
13471
13731
  return "full";
13472
- }, generateVueHmrId = (sourceFilePath, vueRootDir) => relative10(vueRootDir, sourceFilePath).replace(/\\/g, "/").replace(/\.vue$/, ""), extractImports = (sourceCode) => Array.from(sourceCode.matchAll(/import\s+[\s\S]+?['"]([^'"]+)['"]/g)).map((match) => match[1]).filter((importPath) => importPath !== undefined), inlineCssImports = (cssContent, cssFilePath, visited = new Set) => {
13732
+ }, generateVueHmrId = (sourceFilePath, vueRootDir) => relative11(vueRootDir, sourceFilePath).replace(/\\/g, "/").replace(/\.vue$/, ""), extractImports = (sourceCode) => Array.from(sourceCode.matchAll(/import\s+[\s\S]+?['"]([^'"]+)['"]/g)).map((match) => match[1]).filter((importPath) => importPath !== undefined), inlineCssImports = (cssContent, cssFilePath, visited = new Set) => {
13473
13733
  const resolved = realpathSync2(cssFilePath);
13474
13734
  if (visited.has(resolved))
13475
13735
  return "";
13476
13736
  visited.add(resolved);
13477
13737
  const importRegex = /@import\s+(?:url\(\s*)?(['"])(\.{1,2}\/[^'"]+)\1\s*\)?\s*;?/g;
13478
13738
  return cssContent.replace(importRegex, (match, _quote, relPath) => {
13479
- const importedPath = resolve23(dirname15(cssFilePath), relPath);
13739
+ const importedPath = resolve23(dirname16(cssFilePath), relPath);
13480
13740
  if (!existsSync23(importedPath))
13481
13741
  return match;
13482
13742
  const importedContent = readFileSync20(importedPath, "utf-8");
@@ -13533,7 +13793,7 @@ var resolveDevClientDir3 = () => {
13533
13793
  const cachedResult = cacheMap.get(sourceFilePath);
13534
13794
  if (cachedResult)
13535
13795
  return cachedResult;
13536
- const relativeFilePath = relative10(vueRootDir, sourceFilePath).replace(/\\/g, "/");
13796
+ const relativeFilePath = relative11(vueRootDir, sourceFilePath).replace(/\\/g, "/");
13537
13797
  const relativeWithoutExtension = relativeFilePath.replace(/\.vue$/, "");
13538
13798
  const fileBaseName = basename9(sourceFilePath, ".vue");
13539
13799
  const componentId = toKebab(fileBaseName);
@@ -13572,12 +13832,12 @@ var resolveDevClientDir3 = () => {
13572
13832
  const childComponentPaths = importPaths.filter((path) => path.startsWith(".") && path.endsWith(".vue"));
13573
13833
  const packageComponentPaths = Array.from(resolvedPackageVueImports.entries());
13574
13834
  const helperModulePaths = importPaths.filter((path) => path.startsWith(".") && !path.endsWith(".vue") && !isStylePath(path));
13575
- const stylePathsImported = importPaths.filter((path) => (path.startsWith(".") || isAbsolute4(path)) && isStylePath(path)).map((path) => isAbsolute4(path) ? path : resolve23(dirname15(sourceFilePath), path));
13835
+ const stylePathsImported = importPaths.filter((path) => (path.startsWith(".") || isAbsolute4(path)) && isStylePath(path)).map((path) => isAbsolute4(path) ? path : resolve23(dirname16(sourceFilePath), path));
13576
13836
  for (const stylePath of stylePathsImported) {
13577
13837
  addStyleImporter(sourceFilePath, stylePath);
13578
13838
  }
13579
13839
  const childBuildResults = await Promise.all([
13580
- ...childComponentPaths.map((relativeChildPath) => compileVueFile(resolve23(dirname15(sourceFilePath), relativeChildPath), outputDirs, cacheMap, false, vueRootDir, compiler, stylePreprocessors)),
13840
+ ...childComponentPaths.map((relativeChildPath) => compileVueFile(resolve23(dirname16(sourceFilePath), relativeChildPath), outputDirs, cacheMap, false, vueRootDir, compiler, stylePreprocessors)),
13581
13841
  ...packageComponentPaths.map(([, absolutePath]) => compileVueFile(absolutePath, outputDirs, cacheMap, false, vueRootDir, compiler, stylePreprocessors))
13582
13842
  ]);
13583
13843
  const hasScript = descriptor.script || descriptor.scriptSetup;
@@ -13592,7 +13852,7 @@ var resolveDevClientDir3 = () => {
13592
13852
  sourceMap: true
13593
13853
  }) : { bindings: {}, content: "export default {};", map: undefined };
13594
13854
  const strippedScript = stripExports2(compiledScript.content);
13595
- const sourceDir = dirname15(sourceFilePath);
13855
+ const sourceDir = dirname16(sourceFilePath);
13596
13856
  const transpiledScript = transpiler4.transformSync(strippedScript).replace(/(['"])(\.{1,2}\/[^'"]+)(['"])/g, (_2, quoteStart, relativeImport, quoteEnd) => `${quoteStart}${toJs(relativeImport, sourceDir)}${quoteEnd}`);
13597
13857
  const packageImportRewrites = new Map;
13598
13858
  for (const [bareImport, absolutePath] of packageComponentPaths) {
@@ -13637,8 +13897,8 @@ var resolveDevClientDir3 = () => {
13637
13897
  ];
13638
13898
  let cssOutputPaths = [];
13639
13899
  if (isEntryPoint && allCss.length) {
13640
- const cssOutputFile = join28(outputDirs.css, `${toKebab(fileBaseName)}-compiled.css`);
13641
- await mkdir5(dirname15(cssOutputFile), { recursive: true });
13900
+ const cssOutputFile = join30(outputDirs.css, `${toKebab(fileBaseName)}-compiled.css`);
13901
+ await mkdir6(dirname16(cssOutputFile), { recursive: true });
13642
13902
  await write3(cssOutputFile, allCss.join(`
13643
13903
  `));
13644
13904
  cssOutputPaths = [cssOutputFile];
@@ -13668,21 +13928,21 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
13668
13928
  };
13669
13929
  const clientCode = assembleModule(generateRenderFunction(false), "render", true) + islandMetadataExports;
13670
13930
  const serverCode = assembleModule(generateRenderFunction(true), "ssrRender", false) + islandMetadataExports;
13671
- const clientOutputPath = join28(outputDirs.client, `${relativeWithoutExtension}.js`);
13672
- const serverOutputPath = join28(outputDirs.server, `${relativeWithoutExtension}.js`);
13931
+ const clientOutputPath = join30(outputDirs.client, `${relativeWithoutExtension}.js`);
13932
+ const serverOutputPath = join30(outputDirs.server, `${relativeWithoutExtension}.js`);
13673
13933
  const rewritePackageImports = (code, outputPath, mode) => {
13674
13934
  let result2 = code;
13675
13935
  for (const [bareImport, paths] of packageImportRewrites) {
13676
13936
  const targetPath = mode === "server" ? paths.server : paths.client;
13677
- let rel = relative10(dirname15(outputPath), targetPath).replace(/\\/g, "/");
13937
+ let rel = relative11(dirname16(outputPath), targetPath).replace(/\\/g, "/");
13678
13938
  if (!rel.startsWith("."))
13679
13939
  rel = `./${rel}`;
13680
13940
  result2 = result2.replaceAll(bareImport, rel);
13681
13941
  }
13682
13942
  return result2;
13683
13943
  };
13684
- await mkdir5(dirname15(clientOutputPath), { recursive: true });
13685
- await mkdir5(dirname15(serverOutputPath), { recursive: true });
13944
+ await mkdir6(dirname16(clientOutputPath), { recursive: true });
13945
+ await mkdir6(dirname16(serverOutputPath), { recursive: true });
13686
13946
  const clientFinal = rewritePackageImports(clientCode, clientOutputPath, "client");
13687
13947
  const serverFinal = rewritePackageImports(serverCode, serverOutputPath, "server");
13688
13948
  const inlineSourceMapFor = (finalContent) => {
@@ -13705,7 +13965,7 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
13705
13965
  serverPath: serverOutputPath,
13706
13966
  spaRoutes: spaRoutes.length > 0 ? spaRoutes : undefined,
13707
13967
  tsHelperPaths: [
13708
- ...helperModulePaths.map((helper) => resolveHelperTsPath(dirname15(sourceFilePath), helper)),
13968
+ ...helperModulePaths.map((helper) => resolveHelperTsPath(dirname16(sourceFilePath), helper)),
13709
13969
  ...childBuildResults.flatMap((child) => child.tsHelperPaths)
13710
13970
  ]
13711
13971
  };
@@ -13715,15 +13975,15 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
13715
13975
  }, compileVue = async (entryPoints, vueRootDir, isDev2 = false, stylePreprocessors, ssrOnlyEntries) => {
13716
13976
  const compiler = await import("@vue/compiler-sfc");
13717
13977
  const generatedDir = getFrameworkGeneratedDir("vue");
13718
- const clientOutputDir = join28(generatedDir, "client");
13719
- const indexOutputDir = join28(generatedDir, "indexes");
13720
- const serverOutputDir = join28(generatedDir, "server");
13721
- const cssOutputDir = join28(generatedDir, "compiled");
13978
+ const clientOutputDir = join30(generatedDir, "client");
13979
+ const indexOutputDir = join30(generatedDir, "indexes");
13980
+ const serverOutputDir = join30(generatedDir, "server");
13981
+ const cssOutputDir = join30(generatedDir, "compiled");
13722
13982
  await Promise.all([
13723
- mkdir5(clientOutputDir, { recursive: true }),
13724
- mkdir5(indexOutputDir, { recursive: true }),
13725
- mkdir5(serverOutputDir, { recursive: true }),
13726
- mkdir5(cssOutputDir, { recursive: true })
13983
+ mkdir6(clientOutputDir, { recursive: true }),
13984
+ mkdir6(indexOutputDir, { recursive: true }),
13985
+ mkdir6(serverOutputDir, { recursive: true }),
13986
+ mkdir6(cssOutputDir, { recursive: true })
13727
13987
  ]);
13728
13988
  const buildCache = new Map;
13729
13989
  const allTsHelperPaths = new Set;
@@ -13746,16 +14006,16 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
13746
14006
  };
13747
14007
  }
13748
14008
  const entryBaseName = basename9(entryPath, ".vue");
13749
- const indexOutputFile = join28(indexOutputDir, `${entryBaseName}.js`);
13750
- const clientOutputFile = join28(clientOutputDir, relative10(vueRootDir, entryPath).replace(/\\/g, "/").replace(/\.vue$/, ".js"));
13751
- await mkdir5(dirname15(indexOutputFile), { recursive: true });
14009
+ const indexOutputFile = join30(indexOutputDir, `${entryBaseName}.js`);
14010
+ const clientOutputFile = join30(clientOutputDir, relative11(vueRootDir, entryPath).replace(/\\/g, "/").replace(/\.vue$/, ".js"));
14011
+ await mkdir6(dirname16(indexOutputFile), { recursive: true });
13752
14012
  const vueHmrImports = isDev2 ? [
13753
14013
  `window.__HMR_FRAMEWORK__ = "vue";`,
13754
14014
  `import "${hmrClientPath4}";`
13755
14015
  ] : [];
13756
14016
  await write3(indexOutputFile, [
13757
14017
  ...vueHmrImports,
13758
- `import Comp, * as PageModule from "${relative10(dirname15(indexOutputFile), clientOutputFile).replace(/\\/g, "/")}";`,
14018
+ `import Comp, * as PageModule from "${relative11(dirname16(indexOutputFile), clientOutputFile).replace(/\\/g, "/")}";`,
13759
14019
  'import { createSSRApp, createApp } from "vue";',
13760
14020
  "",
13761
14021
  "// HMR State Preservation: Check for preserved state from HMR",
@@ -13904,7 +14164,7 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
13904
14164
  if (!tsPath)
13905
14165
  continue;
13906
14166
  const sourceCode = await file3(tsPath).text();
13907
- const helperDir = dirname15(tsPath);
14167
+ const helperDir = dirname16(tsPath);
13908
14168
  for (const dep of extractImports(sourceCode)) {
13909
14169
  if (!dep.startsWith(".") || isStylePath(dep) || dep.endsWith(".vue")) {
13910
14170
  continue;
@@ -13921,11 +14181,11 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
13921
14181
  await Promise.all(Array.from(allTsHelperPaths).map(async (tsPath) => {
13922
14182
  const sourceCode = await file3(tsPath).text();
13923
14183
  const transpiledCode = transpiler4.transformSync(sourceCode);
13924
- const relativeJsPath = relative10(vueRootDir, tsPath).replace(/\.ts$/, ".js");
13925
- const outClientPath = join28(clientOutputDir, relativeJsPath);
13926
- const outServerPath = join28(serverOutputDir, relativeJsPath);
13927
- await mkdir5(dirname15(outClientPath), { recursive: true });
13928
- await mkdir5(dirname15(outServerPath), { recursive: true });
14184
+ const relativeJsPath = relative11(vueRootDir, tsPath).replace(/\.ts$/, ".js");
14185
+ const outClientPath = join30(clientOutputDir, relativeJsPath);
14186
+ const outServerPath = join30(serverOutputDir, relativeJsPath);
14187
+ await mkdir6(dirname16(outClientPath), { recursive: true });
14188
+ await mkdir6(dirname16(outServerPath), { recursive: true });
13929
14189
  await write3(outClientPath, transpiledCode);
13930
14190
  await write3(outServerPath, transpiledCode);
13931
14191
  }));
@@ -13955,7 +14215,7 @@ var init_compileVue = __esm(() => {
13955
14215
  init_vueAutoRouterTransform();
13956
14216
  init_stylePreprocessor();
13957
14217
  devClientDir3 = resolveDevClientDir3();
13958
- hmrClientPath4 = join28(devClientDir3, "hmrClient.ts").replace(/\\/g, "/");
14218
+ hmrClientPath4 = join30(devClientDir3, "hmrClient.ts").replace(/\\/g, "/");
13959
14219
  transpiler4 = new Transpiler3({ loader: "ts", target: "browser" });
13960
14220
  scriptCache = new Map;
13961
14221
  scriptSetupCache = new Map;
@@ -14437,7 +14697,7 @@ __export(exports_compileAngular, {
14437
14697
  compileAngular: () => compileAngular
14438
14698
  });
14439
14699
  import { existsSync as existsSync24, readFileSync as readFileSync21, promises as fs5 } from "fs";
14440
- import { join as join29, basename as basename10, sep as sep3, dirname as dirname16, resolve as resolve24, relative as relative11 } from "path";
14700
+ import { join as join31, basename as basename10, sep as sep3, dirname as dirname17, resolve as resolve24, relative as relative12 } from "path";
14441
14701
  var {Glob: Glob6 } = globalThis.Bun;
14442
14702
  import ts11 from "typescript";
14443
14703
  var traceAngularPhase = async (name, fn2, metadata2) => {
@@ -14480,10 +14740,10 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14480
14740
  `${candidate}.tsx`,
14481
14741
  `${candidate}.js`,
14482
14742
  `${candidate}.jsx`,
14483
- join29(candidate, "index.ts"),
14484
- join29(candidate, "index.tsx"),
14485
- join29(candidate, "index.js"),
14486
- join29(candidate, "index.jsx")
14743
+ join31(candidate, "index.ts"),
14744
+ join31(candidate, "index.tsx"),
14745
+ join31(candidate, "index.js"),
14746
+ join31(candidate, "index.jsx")
14487
14747
  ];
14488
14748
  return candidates.find((file4) => existsSync24(file4));
14489
14749
  }, createLegacyAngularAnimationUsageResolver = (rootDir) => {
@@ -14555,7 +14815,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14555
14815
  if (scan.usesLegacyAnimations)
14556
14816
  return true;
14557
14817
  for (const specifier of scan.imports) {
14558
- const importedPath = resolveLocalImport(specifier, dirname16(resolved));
14818
+ const importedPath = resolveLocalImport(specifier, dirname17(resolved));
14559
14819
  if (importedPath && await visit(importedPath, visited)) {
14560
14820
  return true;
14561
14821
  }
@@ -14614,7 +14874,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14614
14874
  return `${path.replace(/\.ts$/, ".js")}${query}`;
14615
14875
  if (hasJsLikeExtension(path))
14616
14876
  return `${path}${query}`;
14617
- const importerDir = dirname16(importerOutputPath);
14877
+ const importerDir = dirname17(importerOutputPath);
14618
14878
  const fileCandidate = resolve24(importerDir, `${path}.js`);
14619
14879
  if (outputFiles?.has(fileCandidate) || existsSync24(fileCandidate)) {
14620
14880
  return `${path}.js${query}`;
@@ -14647,16 +14907,16 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14647
14907
  }, resolveLocalTsImport = (fromFile, specifier) => {
14648
14908
  if (!isRelativeModuleSpecifier(specifier))
14649
14909
  return null;
14650
- const basePath = resolve24(dirname16(fromFile), specifier);
14910
+ const basePath = resolve24(dirname17(fromFile), specifier);
14651
14911
  const candidates = /\.[cm]?[tj]sx?$/.test(basePath) ? [basePath] : [
14652
14912
  `${basePath}.ts`,
14653
14913
  `${basePath}.tsx`,
14654
14914
  `${basePath}.mts`,
14655
14915
  `${basePath}.cts`,
14656
- join29(basePath, "index.ts"),
14657
- join29(basePath, "index.tsx"),
14658
- join29(basePath, "index.mts"),
14659
- join29(basePath, "index.cts")
14916
+ join31(basePath, "index.ts"),
14917
+ join31(basePath, "index.tsx"),
14918
+ join31(basePath, "index.mts"),
14919
+ join31(basePath, "index.cts")
14660
14920
  ];
14661
14921
  return candidates.map((candidate) => resolve24(candidate)).find((candidate) => existsSync24(candidate) && !candidate.endsWith(".d.ts")) ?? null;
14662
14922
  }, readFileForAotTransform = async (fileName, readFile6) => {
@@ -14682,15 +14942,15 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14682
14942
  const paths = [];
14683
14943
  const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
14684
14944
  if (templateUrlMatch?.[1])
14685
- paths.push(join29(fileDir, templateUrlMatch[1]));
14945
+ paths.push(join31(fileDir, templateUrlMatch[1]));
14686
14946
  const styleUrlMatch = findUncommentedMatch(source, /styleUrl\s*:\s*['"]([^'"]+)['"]/);
14687
14947
  if (styleUrlMatch?.[1])
14688
- paths.push(join29(fileDir, styleUrlMatch[1]));
14948
+ paths.push(join31(fileDir, styleUrlMatch[1]));
14689
14949
  const styleUrlsMatch = findUncommentedMatch(source, /styleUrls\s*:\s*\[([^\]]+)\]/);
14690
14950
  const urlMatches = styleUrlsMatch?.[1]?.match(/['"]([^'"]+)['"]/g);
14691
14951
  if (urlMatches) {
14692
14952
  for (const urlMatch of urlMatches) {
14693
- paths.push(join29(fileDir, urlMatch.replace(/['"]/g, "")));
14953
+ paths.push(join31(fileDir, urlMatch.replace(/['"]/g, "")));
14694
14954
  }
14695
14955
  }
14696
14956
  return paths.map((path) => resolve24(path));
@@ -14705,13 +14965,13 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14705
14965
  return null;
14706
14966
  }
14707
14967
  }, writeResourceCacheFile = async (cachePath, source) => {
14708
- await fs5.mkdir(dirname16(cachePath), { recursive: true });
14968
+ await fs5.mkdir(dirname17(cachePath), { recursive: true });
14709
14969
  await fs5.writeFile(cachePath, JSON.stringify({
14710
14970
  source,
14711
14971
  version: 1
14712
14972
  }), "utf-8");
14713
14973
  }, resolveResourceTransformCachePath = async (filePath, source, stylePreprocessors) => {
14714
- const resourcePaths = collectAngularResourcePaths(source, dirname16(filePath));
14974
+ const resourcePaths = collectAngularResourcePaths(source, dirname17(filePath));
14715
14975
  const resourceContents = await Promise.all(resourcePaths.map(async (resourcePath) => {
14716
14976
  const content = await fs5.readFile(resourcePath, "utf-8");
14717
14977
  return `${resourcePath}\x00${content}`;
@@ -14724,7 +14984,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14724
14984
  safeStableStringify(stylePreprocessors ?? null)
14725
14985
  ].join("\x00");
14726
14986
  const cacheKey2 = Bun.hash(cacheInput).toString(BASE_36_RADIX);
14727
- return join29(process.cwd(), ".absolutejs", "cache", "angular-resources", `${cacheKey2}.json`);
14987
+ return join31(process.cwd(), ".absolutejs", "cache", "angular-resources", `${cacheKey2}.json`);
14728
14988
  }, precomputeAotResourceTransforms = async (inputPaths, readFile6, stylePreprocessors) => {
14729
14989
  const transformedSources = new Map;
14730
14990
  const visited = new Set;
@@ -14751,7 +15011,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14751
15011
  transformedSource = cached.source;
14752
15012
  } else {
14753
15013
  stats.cacheMisses += 1;
14754
- const transformed = await inlineResources(source, dirname16(resolvedPath), stylePreprocessors);
15014
+ const transformed = await inlineResources(source, dirname17(resolvedPath), stylePreprocessors);
14755
15015
  transformedSource = transformed.source;
14756
15016
  await writeResourceCacheFile(cachePath, transformedSource);
14757
15017
  }
@@ -14770,7 +15030,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14770
15030
  return { stats, transformedSources };
14771
15031
  }, compileAngularFiles = async (inputPaths, outDir, stylePreprocessors) => {
14772
15032
  const islandMetadataByOutputPath = await traceAngularPhase("aot/island-metadata", () => new Map(inputPaths.map((inputPath) => {
14773
- const outputPath = resolve24(join29(outDir, relative11(process.cwd(), resolve24(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
15033
+ const outputPath = resolve24(join31(outDir, relative12(process.cwd(), resolve24(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
14774
15034
  return [
14775
15035
  outputPath,
14776
15036
  buildIslandMetadataExports(readFileSync21(inputPath, "utf-8"))
@@ -14780,7 +15040,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14780
15040
  const { readConfiguration, performCompilation, EmitFlags } = await traceAngularPhase("aot/import-compiler-cli", () => import("@angular/compiler-cli"));
14781
15041
  const tsLibDir = await traceAngularPhase("aot/resolve-typescript-lib", () => {
14782
15042
  const tsPath = __require.resolve("typescript");
14783
- const tsRootDir = dirname16(tsPath);
15043
+ const tsRootDir = dirname17(tsPath);
14784
15044
  return tsRootDir.endsWith("lib") ? tsRootDir : resolve24(tsRootDir, "lib");
14785
15045
  });
14786
15046
  const config = await traceAngularPhase("aot/read-configuration", () => readConfiguration("./tsconfig.json"));
@@ -14817,7 +15077,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14817
15077
  const originalGetSourceFile = host.getSourceFile;
14818
15078
  host.getSourceFile = (fileName, languageVersion, onError) => {
14819
15079
  if (fileName.startsWith("lib.") && fileName.endsWith(".d.ts") && tsLibDir) {
14820
- const resolvedPath = join29(tsLibDir, fileName);
15080
+ const resolvedPath = join31(tsLibDir, fileName);
14821
15081
  return originalGetSourceFile?.call(host, resolvedPath, languageVersion, onError);
14822
15082
  }
14823
15083
  return originalGetSourceFile?.call(host, fileName, languageVersion, onError);
@@ -14872,7 +15132,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14872
15132
  const entries = await traceAngularPhase("aot/postprocess-emitted-js", () => {
14873
15133
  const rawEntries = Object.entries(emitted).filter(([fileName]) => fileName.endsWith(".js")).map(([fileName, content]) => ({
14874
15134
  content,
14875
- target: join29(outDir, fileName)
15135
+ target: join31(outDir, fileName)
14876
15136
  }));
14877
15137
  const outputFiles = new Set(rawEntries.map(({ target }) => resolve24(target)));
14878
15138
  return rawEntries.map(({ content, target }) => {
@@ -14894,7 +15154,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14894
15154
  });
14895
15155
  });
14896
15156
  await traceAngularPhase("aot/write-output", () => Promise.all(entries.map(async ({ target, content }) => {
14897
- await fs5.mkdir(dirname16(target), { recursive: true });
15157
+ await fs5.mkdir(dirname17(target), { recursive: true });
14898
15158
  await fs5.writeFile(target, content, "utf-8");
14899
15159
  })), { outputs: entries.length });
14900
15160
  return await traceAngularPhase("aot/collect-output-paths", () => entries.map(({ target }) => target), { outputs: entries.length });
@@ -15049,7 +15309,7 @@ ${fields}
15049
15309
  }, inlineTemplateAndLowerDefer = async (source, fileDir) => {
15050
15310
  const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
15051
15311
  if (templateUrlMatch?.[1]) {
15052
- const templatePath = join29(fileDir, templateUrlMatch[1]);
15312
+ const templatePath = join31(fileDir, templateUrlMatch[1]);
15053
15313
  if (!existsSync24(templatePath)) {
15054
15314
  throw new Error(`Unable to inline Angular templateUrl "${templateUrlMatch[1]}": file not found at ${templatePath}`);
15055
15315
  }
@@ -15080,7 +15340,7 @@ ${fields}
15080
15340
  }, inlineTemplateAndLowerDeferSync = (source, fileDir) => {
15081
15341
  const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
15082
15342
  if (templateUrlMatch?.[1]) {
15083
- const templatePath = join29(fileDir, templateUrlMatch[1]);
15343
+ const templatePath = join31(fileDir, templateUrlMatch[1]);
15084
15344
  if (!existsSync24(templatePath)) {
15085
15345
  throw new Error(`Unable to inline Angular templateUrl "${templateUrlMatch[1]}": file not found at ${templatePath}`);
15086
15346
  }
@@ -15117,7 +15377,7 @@ ${fields}
15117
15377
  return source;
15118
15378
  const stylePromises = urlMatches.map((urlMatch) => {
15119
15379
  const styleUrl = urlMatch.replace(/['"]/g, "");
15120
- return readAndEscapeFile(join29(fileDir, styleUrl), stylePreprocessors);
15380
+ return readAndEscapeFile(join31(fileDir, styleUrl), stylePreprocessors);
15121
15381
  });
15122
15382
  const results = await Promise.all(stylePromises);
15123
15383
  const inlinedStyles = results.filter(Boolean).map((escaped) => `\`${escaped}\``);
@@ -15128,7 +15388,7 @@ ${fields}
15128
15388
  const styleUrlMatch = findUncommentedMatch(source, /styleUrl\s*:\s*['"]([^'"]+)['"]/);
15129
15389
  if (!styleUrlMatch?.[1])
15130
15390
  return source;
15131
- const escaped = await readAndEscapeFile(join29(fileDir, styleUrlMatch[1]), stylePreprocessors);
15391
+ const escaped = await readAndEscapeFile(join31(fileDir, styleUrlMatch[1]), stylePreprocessors);
15132
15392
  if (!escaped)
15133
15393
  return source;
15134
15394
  return source.slice(0, styleUrlMatch.index) + `styles: [\`${escaped}\`]` + source.slice(styleUrlMatch.index + styleUrlMatch[0].length);
@@ -15164,10 +15424,10 @@ ${fields}
15164
15424
  `${candidate}.js`,
15165
15425
  `${candidate}.jsx`,
15166
15426
  `${candidate}.json`,
15167
- join29(candidate, "index.ts"),
15168
- join29(candidate, "index.tsx"),
15169
- join29(candidate, "index.js"),
15170
- join29(candidate, "index.jsx")
15427
+ join31(candidate, "index.ts"),
15428
+ join31(candidate, "index.tsx"),
15429
+ join31(candidate, "index.js"),
15430
+ join31(candidate, "index.jsx")
15171
15431
  ];
15172
15432
  return candidates.find((file4) => existsSync24(file4));
15173
15433
  };
@@ -15191,13 +15451,13 @@ ${fields}
15191
15451
  }
15192
15452
  };
15193
15453
  const toOutputPath = (sourcePath) => {
15194
- const inputDir = dirname16(sourcePath);
15454
+ const inputDir = dirname17(sourcePath);
15195
15455
  const fileBase = basename10(sourcePath).replace(/\.[cm]?[tj]sx?$/, ".js");
15196
15456
  if (inputDir === outDir || inputDir.startsWith(`${outDir}${sep3}`)) {
15197
- return join29(inputDir, fileBase);
15457
+ return join31(inputDir, fileBase);
15198
15458
  }
15199
15459
  const relativeDir = inputDir.startsWith(baseDir) ? inputDir.substring(baseDir.length + 1) : inputDir;
15200
- return join29(outDir, relativeDir, fileBase);
15460
+ return join31(outDir, relativeDir, fileBase);
15201
15461
  };
15202
15462
  const withCacheBuster = (specifier) => {
15203
15463
  if (!cacheBuster)
@@ -15245,10 +15505,10 @@ ${fields}
15245
15505
  return;
15246
15506
  visited.add(resolved);
15247
15507
  if (resolved.endsWith(".json") && existsSync24(resolved)) {
15248
- const inputDir2 = dirname16(resolved);
15508
+ const inputDir2 = dirname17(resolved);
15249
15509
  const relativeDir2 = inputDir2.startsWith(baseDir) ? inputDir2.substring(baseDir.length + 1) : inputDir2;
15250
- const targetDir2 = join29(outDir, relativeDir2);
15251
- const targetPath2 = join29(targetDir2, basename10(resolved));
15510
+ const targetDir2 = join31(outDir, relativeDir2);
15511
+ const targetPath2 = join31(targetDir2, basename10(resolved));
15252
15512
  await fs5.mkdir(targetDir2, { recursive: true });
15253
15513
  await fs5.copyFile(resolved, targetPath2);
15254
15514
  allOutputs.push(targetPath2);
@@ -15260,13 +15520,13 @@ ${fields}
15260
15520
  if (!existsSync24(actualPath))
15261
15521
  return;
15262
15522
  let sourceCode = await fs5.readFile(actualPath, "utf-8");
15263
- const inlined = await inlineResources(sourceCode, dirname16(actualPath), stylePreprocessors);
15264
- sourceCode = inlineTemplateAndLowerDeferSync(inlined.source, dirname16(actualPath)).source;
15265
- const inputDir = dirname16(actualPath);
15523
+ const inlined = await inlineResources(sourceCode, dirname17(actualPath), stylePreprocessors);
15524
+ sourceCode = inlineTemplateAndLowerDeferSync(inlined.source, dirname17(actualPath)).source;
15525
+ const inputDir = dirname17(actualPath);
15266
15526
  const fileBase = basename10(actualPath).replace(/\.[cm]?[tj]sx?$/, ".js");
15267
15527
  const targetPath = toOutputPath(actualPath);
15268
- const targetDir = dirname16(targetPath);
15269
- const relativeDir = relative11(outDir, targetDir).replace(/\\/g, "/");
15528
+ const targetDir = dirname17(targetPath);
15529
+ const relativeDir = relative12(outDir, targetDir).replace(/\\/g, "/");
15270
15530
  const localImports = [];
15271
15531
  const importRewrites = new Map;
15272
15532
  const fromRegex = /(?:from|import)\s+['"]([^'".][^'"]*|\.\.?\/[^'"]+)['"]/g;
@@ -15287,7 +15547,7 @@ ${fields}
15287
15547
  const resolved2 = resolveLocalImport(specifier, inputDir);
15288
15548
  if (!resolved2)
15289
15549
  return null;
15290
- const relativeImport = relative11(targetDir, toOutputPath(resolved2)).replace(/\\/g, "/").replace(/\.js$/, "");
15550
+ const relativeImport = relative12(targetDir, toOutputPath(resolved2)).replace(/\\/g, "/").replace(/\.js$/, "");
15291
15551
  const relativeRewrite = relativeImport.startsWith(".") ? relativeImport : `./${relativeImport}`;
15292
15552
  importRewrites.set(specifier, relativeRewrite);
15293
15553
  return resolved2;
@@ -15326,7 +15586,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
15326
15586
  return { clientPaths: [...emptyPaths], serverPaths: [...emptyPaths] };
15327
15587
  }
15328
15588
  const compiledRoot = compiledParent;
15329
- const indexesDir = join29(compiledParent, "indexes");
15589
+ const indexesDir = join31(compiledParent, "indexes");
15330
15590
  await traceAngularPhase("setup/create-indexes-dir", () => fs5.mkdir(indexesDir, { recursive: true }));
15331
15591
  const aotOutputs = hmr ? [] : await traceAngularPhase("aot/compile-files", () => compileAngularFiles(entryPoints.map((entry) => resolve24(entry)), compiledRoot, stylePreprocessors), { entries: entryPoints.length });
15332
15592
  if (!hmr) {
@@ -15340,10 +15600,10 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
15340
15600
  absolute: false,
15341
15601
  cwd: angularSrcDir
15342
15602
  })) {
15343
- const sourcePath = join29(angularSrcDir, rel);
15344
- const cwdRel = relative11(cwd, sourcePath);
15345
- const targetPath = join29(compiledRoot, cwdRel);
15346
- await fs5.mkdir(dirname16(targetPath), { recursive: true });
15603
+ const sourcePath = join31(angularSrcDir, rel);
15604
+ const cwdRel = relative12(cwd, sourcePath);
15605
+ const targetPath = join31(compiledRoot, cwdRel);
15606
+ await fs5.mkdir(dirname17(targetPath), { recursive: true });
15347
15607
  await fs5.copyFile(sourcePath, targetPath);
15348
15608
  }
15349
15609
  });
@@ -15351,7 +15611,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
15351
15611
  const usesLegacyAngularAnimations = await traceAngularPhase("setup/legacy-animation-resolver", () => createLegacyAngularAnimationUsageResolver(outRoot));
15352
15612
  const compileTasks = entryPoints.map(async (entry) => {
15353
15613
  const resolvedEntry = resolve24(entry);
15354
- const relativeEntry = relative11(outRoot, resolvedEntry).replace(/\.[tj]s$/, ".js");
15614
+ const relativeEntry = relative12(outRoot, resolvedEntry).replace(/\.[tj]s$/, ".js");
15355
15615
  const compileEntry = () => compileAngularFileJIT(resolvedEntry, compiledRoot, outRoot, stylePreprocessors);
15356
15616
  let outputs = hmr ? await traceAngularPhase("jit/compile-entry", compileEntry, {
15357
15617
  entry: resolvedEntry
@@ -15359,9 +15619,9 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
15359
15619
  const fileBase = basename10(resolvedEntry).replace(/\.[tj]s$/, "");
15360
15620
  const jsName = `${fileBase}.js`;
15361
15621
  const compiledFallbackPaths = [
15362
- join29(compiledRoot, relativeEntry),
15363
- join29(compiledRoot, "pages", jsName),
15364
- join29(compiledRoot, jsName)
15622
+ join31(compiledRoot, relativeEntry),
15623
+ join31(compiledRoot, "pages", jsName),
15624
+ join31(compiledRoot, jsName)
15365
15625
  ].map((file4) => resolve24(file4));
15366
15626
  const resolveRawServerFile = (candidatePaths) => {
15367
15627
  const normalizedCandidates = [
@@ -15423,7 +15683,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
15423
15683
  })() : "no-providers";
15424
15684
  const serverContentHash = `${Bun.hash(original).toString(BASE_36_RADIX)}.${Bun.hash(providersHashInput).toString(BASE_36_RADIX)}`;
15425
15685
  const cachedWrapper = wrapperOutputCache.get(resolvedEntry);
15426
- const clientFile = join29(indexesDir, jsName);
15686
+ const clientFile = join31(indexesDir, jsName);
15427
15687
  if (hmr && cachedWrapper && cachedWrapper.serverHash === serverContentHash && existsSync24(clientFile) && (usesLegacyAnimations || !original.includes("__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__")) && (!usesLegacyAnimations || original.includes("__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__"))) {
15428
15688
  return {
15429
15689
  clientPath: clientFile,
@@ -15457,11 +15717,11 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
15457
15717
  const compiledAppProvidersPath = (() => {
15458
15718
  const angularDirAbs = resolve24(outRoot);
15459
15719
  const appSourceAbs = resolve24(providersInjection.appProvidersSource);
15460
- const rel = relative11(angularDirAbs, appSourceAbs).replace(/\\/g, "/");
15461
- return join29(compiledParent, rel).replace(/\.[cm]?[tj]sx?$/, ".js");
15720
+ const rel = relative12(angularDirAbs, appSourceAbs).replace(/\\/g, "/");
15721
+ return join31(compiledParent, rel).replace(/\.[cm]?[tj]sx?$/, ".js");
15462
15722
  })();
15463
15723
  const appProvidersSpec = (() => {
15464
- const rel = relative11(dirname16(rawServerFile), compiledAppProvidersPath).replace(/\\/g, "/");
15724
+ const rel = relative12(dirname17(rawServerFile), compiledAppProvidersPath).replace(/\\/g, "/");
15465
15725
  return rel.startsWith(".") ? rel : `./${rel}`;
15466
15726
  })();
15467
15727
  importLines.push(`import { appProviders as __abs_globalProviders } from "${appProvidersSpec}";`);
@@ -15486,7 +15746,7 @@ export const providers = [${fragments.join(", ")}];
15486
15746
  }
15487
15747
  }
15488
15748
  await traceAngularPhase("wrapper/write-server-output", () => fs5.writeFile(rawServerFile, rewritten, "utf-8"), { entry: resolvedEntry });
15489
- const relativePath = relative11(indexesDir, rawServerFile).replace(/\\/g, "/");
15749
+ const relativePath = relative12(indexesDir, rawServerFile).replace(/\\/g, "/");
15490
15750
  const normalizedImportPath = relativePath.startsWith(".") ? relativePath : `./${relativePath}`;
15491
15751
  const hmrPreamble = hmr ? `window.__HMR_FRAMEWORK__ = "angular";
15492
15752
  import "${hmrClientPath5}";
@@ -15682,7 +15942,7 @@ var init_compileAngular = __esm(() => {
15682
15942
  init_stylePreprocessor();
15683
15943
  init_generatedDir();
15684
15944
  devClientDir4 = resolveDevClientDir4();
15685
- hmrClientPath5 = join29(devClientDir4, "hmrClient.ts").replace(/\\/g, "/");
15945
+ hmrClientPath5 = join31(devClientDir4, "hmrClient.ts").replace(/\\/g, "/");
15686
15946
  jitContentCache = new Map;
15687
15947
  wrapperOutputCache = new Map;
15688
15948
  });
@@ -16406,7 +16666,7 @@ __export(exports_fastHmrCompiler, {
16406
16666
  invalidateFingerprintCache: () => invalidateFingerprintCache
16407
16667
  });
16408
16668
  import { existsSync as existsSync25, readFileSync as readFileSync22, statSync as statSync2 } from "fs";
16409
- import { dirname as dirname17, extname as extname6, relative as relative12, resolve as resolve25 } from "path";
16669
+ import { dirname as dirname18, extname as extname6, relative as relative13, resolve as resolve25 } from "path";
16410
16670
  import ts15 from "typescript";
16411
16671
  var fail = (reason, detail, location) => ({
16412
16672
  ok: false,
@@ -16517,7 +16777,7 @@ var fail = (reason, detail, location) => ({
16517
16777
  })();
16518
16778
  if (!decoratorName)
16519
16779
  continue;
16520
- const projectRel = relative12(process.cwd(), componentFilePath).replace(/\\/g, "/");
16780
+ const projectRel = relative13(process.cwd(), componentFilePath).replace(/\\/g, "/");
16521
16781
  const id = encodeURIComponent(`${projectRel}@${className}`);
16522
16782
  if (decoratorName === "Component") {
16523
16783
  const componentDecorator = decorators.find((d2) => {
@@ -16534,7 +16794,7 @@ var fail = (reason, detail, location) => ({
16534
16794
  continue;
16535
16795
  const decoratorMeta = readDecoratorMeta(args);
16536
16796
  const { inputs, outputs } = extractInputsAndOutputs(stmt, null);
16537
- const componentDir = dirname17(componentFilePath);
16797
+ const componentDir = dirname18(componentFilePath);
16538
16798
  const fingerprint = extractFingerprint(stmt, className, decoratorMeta, inputs, outputs, sourceFile, componentDir);
16539
16799
  fingerprintCache.set(id, fingerprint);
16540
16800
  } else {
@@ -17494,7 +17754,7 @@ var fail = (reason, detail, location) => ({
17494
17754
  });
17495
17755
  if (!names.includes(className))
17496
17756
  continue;
17497
- const nextDts = resolveDtsFromSpec(fromPath, dirname17(startDtsPath));
17757
+ const nextDts = resolveDtsFromSpec(fromPath, dirname18(startDtsPath));
17498
17758
  if (!nextDts)
17499
17759
  continue;
17500
17760
  const found = findDtsContainingClass(nextDts, className, visited);
@@ -17504,7 +17764,7 @@ var fail = (reason, detail, location) => ({
17504
17764
  const starReExportRe = /export\s*\*\s*from\s*["']([^"']+)["']/g;
17505
17765
  while ((m = starReExportRe.exec(content)) !== null) {
17506
17766
  const fromPath = m[1] || "";
17507
- const nextDts = resolveDtsFromSpec(fromPath, dirname17(startDtsPath));
17767
+ const nextDts = resolveDtsFromSpec(fromPath, dirname18(startDtsPath));
17508
17768
  if (!nextDts)
17509
17769
  continue;
17510
17770
  const found = findDtsContainingClass(nextDts, className, visited);
@@ -18082,7 +18342,7 @@ ${block}
18082
18342
  }
18083
18343
  const kind = params.kind ?? "component";
18084
18344
  if (kind !== "component") {
18085
- const entityId = encodeURIComponent(`${relative12(projectRoot, componentFilePath).replace(/\\/g, "/")}@${className}`);
18345
+ const entityId = encodeURIComponent(`${relative13(projectRoot, componentFilePath).replace(/\\/g, "/")}@${className}`);
18086
18346
  const currentEntityFingerprint = extractEntityFingerprint(classNode, className, sourceFile);
18087
18347
  const cachedEntityFingerprint = entityFingerprintCache.get(entityId);
18088
18348
  if (cachedEntityFingerprint !== undefined && !entityFingerprintsEqual(cachedEntityFingerprint, currentEntityFingerprint)) {
@@ -18101,7 +18361,7 @@ ${block}
18101
18361
  rebootstrapRequired: false
18102
18362
  };
18103
18363
  }
18104
- if (inheritsDecoratedClass(classNode, sourceFile, dirname17(componentFilePath), projectRoot)) {
18364
+ if (inheritsDecoratedClass(classNode, sourceFile, dirname18(componentFilePath), projectRoot)) {
18105
18365
  return fail("inherits-decorated-class");
18106
18366
  }
18107
18367
  const decorator = findComponentDecorator(classNode);
@@ -18113,7 +18373,7 @@ ${block}
18113
18373
  const projectDefaults = readProjectAngularCompilerOptions(projectRoot);
18114
18374
  const decoratorMeta = readDecoratorMeta(decoratorArgs, projectDefaults);
18115
18375
  const advancedMetadata = extractAdvancedMetadata(classNode, decoratorArgs, compiler);
18116
- const componentDir = dirname17(componentFilePath);
18376
+ const componentDir = dirname18(componentFilePath);
18117
18377
  let templateText;
18118
18378
  let templatePath;
18119
18379
  if (decoratorMeta.template !== null) {
@@ -18166,7 +18426,7 @@ ${block}
18166
18426
  return fail("class-not-found", "anonymous class");
18167
18427
  const wrappedClass = new compiler.WrappedNodeExpr(className_);
18168
18428
  const { inputs, outputs, hasDecoratorIO, hasSignalIO } = extractInputsAndOutputs(classNode, compiler);
18169
- const projectRelPath = relative12(projectRoot, componentFilePath).replace(/\\/g, "/");
18429
+ const projectRelPath = relative13(projectRoot, componentFilePath).replace(/\\/g, "/");
18170
18430
  const fingerprintId = encodeURIComponent(`${projectRelPath}@${className}`);
18171
18431
  const currentFingerprint = extractFingerprint(classNode, className, decoratorMeta, inputs, outputs, sourceFile, componentDir);
18172
18432
  const cachedFingerprint = fingerprintCache.get(fingerprintId);
@@ -18874,7 +19134,7 @@ __export(exports_compileEmber, {
18874
19134
  getEmberServerCompiledDir: () => getEmberServerCompiledDir,
18875
19135
  getEmberCompiledRoot: () => getEmberCompiledRoot,
18876
19136
  getEmberClientCompiledDir: () => getEmberClientCompiledDir,
18877
- dirname: () => dirname18,
19137
+ dirname: () => dirname19,
18878
19138
  compileEmberFileSource: () => compileEmberFileSource,
18879
19139
  compileEmberFile: () => compileEmberFile,
18880
19140
  compileEmber: () => compileEmber,
@@ -18882,8 +19142,8 @@ __export(exports_compileEmber, {
18882
19142
  basename: () => basename11
18883
19143
  });
18884
19144
  import { existsSync as existsSync26 } from "fs";
18885
- import { mkdir as mkdir6, rm as rm4 } from "fs/promises";
18886
- import { basename as basename11, dirname as dirname18, extname as extname7, join as join30, resolve as resolve26 } from "path";
19145
+ import { mkdir as mkdir7, rm as rm4 } from "fs/promises";
19146
+ import { basename as basename11, dirname as dirname19, extname as extname7, join as join32, resolve as resolve26 } from "path";
18887
19147
  var {build: bunBuild2, Transpiler: Transpiler4, write: write4, file: file4 } = globalThis.Bun;
18888
19148
  var cachedPreprocessor = null, getPreprocessor = async () => {
18889
19149
  if (cachedPreprocessor)
@@ -18979,7 +19239,7 @@ export const importSync = (specifier) => {
18979
19239
  const originalImporter = stagedSourceMap.get(args.importer);
18980
19240
  if (!originalImporter)
18981
19241
  return;
18982
- const candidateBase = resolve26(dirname18(originalImporter), args.path);
19242
+ const candidateBase = resolve26(dirname19(originalImporter), args.path);
18983
19243
  const extensionsToTry = ["", ".gts", ".gjs", ".ts", ".js"];
18984
19244
  for (const ext of extensionsToTry) {
18985
19245
  const candidate = candidateBase + ext;
@@ -19002,7 +19262,7 @@ export const importSync = (specifier) => {
19002
19262
  build2.onResolve({ filter: /^@(?:ember|glimmer|simple-dom)\// }, (args) => {
19003
19263
  if (standalonePackages.has(args.path))
19004
19264
  return;
19005
- const internal = join30(cwd, "node_modules/ember-source/dist/packages", args.path, "index.js");
19265
+ const internal = join32(cwd, "node_modules/ember-source/dist/packages", args.path, "index.js");
19006
19266
  if (existsSync26(internal))
19007
19267
  return { path: internal };
19008
19268
  return;
@@ -19050,16 +19310,16 @@ export default PageComponent;
19050
19310
  }
19051
19311
  const transpiled = transpiler5.transformSync(preprocessed);
19052
19312
  const baseName = basename11(resolvedEntry).replace(/\.(gjs|gts|ts|js)$/, "");
19053
- const tmpDir = join30(compiledRoot, "_tmp");
19054
- const serverDir = join30(compiledRoot, "server");
19055
- const clientDir = join30(compiledRoot, "client");
19313
+ const tmpDir = join32(compiledRoot, "_tmp");
19314
+ const serverDir = join32(compiledRoot, "server");
19315
+ const clientDir = join32(compiledRoot, "client");
19056
19316
  await Promise.all([
19057
- mkdir6(tmpDir, { recursive: true }),
19058
- mkdir6(serverDir, { recursive: true }),
19059
- mkdir6(clientDir, { recursive: true })
19317
+ mkdir7(tmpDir, { recursive: true }),
19318
+ mkdir7(serverDir, { recursive: true }),
19319
+ mkdir7(clientDir, { recursive: true })
19060
19320
  ]);
19061
- const tmpPagePath = resolve26(join30(tmpDir, `${baseName}.module.js`));
19062
- const tmpHarnessPath = resolve26(join30(tmpDir, `${baseName}.harness.js`));
19321
+ const tmpPagePath = resolve26(join32(tmpDir, `${baseName}.module.js`));
19322
+ const tmpHarnessPath = resolve26(join32(tmpDir, `${baseName}.harness.js`));
19063
19323
  await Promise.all([
19064
19324
  write4(tmpPagePath, transpiled),
19065
19325
  write4(tmpHarnessPath, generateServerHarness(tmpPagePath))
@@ -19067,7 +19327,7 @@ export default PageComponent;
19067
19327
  const stagedSourceMap = new Map([
19068
19328
  [tmpPagePath, resolvedEntry]
19069
19329
  ]);
19070
- const serverPath = join30(serverDir, `${baseName}.js`);
19330
+ const serverPath = join32(serverDir, `${baseName}.js`);
19071
19331
  const buildResult = await bunBuild2({
19072
19332
  entrypoints: [tmpHarnessPath],
19073
19333
  format: "esm",
@@ -19084,7 +19344,7 @@ export default PageComponent;
19084
19344
  console.warn(`\u26A0\uFE0F Ember server build for ${baseName} had errors:`, buildResult.logs);
19085
19345
  }
19086
19346
  await rm4(tmpDir, { force: true, recursive: true });
19087
- const clientPath = join30(clientDir, `${baseName}.js`);
19347
+ const clientPath = join32(clientDir, `${baseName}.js`);
19088
19348
  await write4(clientPath, transpiled);
19089
19349
  return { clientPath, serverPath };
19090
19350
  }, compileEmber = async (entries, emberDir, cwd = process.cwd(), _hmr = false) => {
@@ -19112,7 +19372,7 @@ export default PageComponent;
19112
19372
  preprocessed = rewriteTemplateEvalToScope(result.code);
19113
19373
  }
19114
19374
  return transpiler5.transformSync(preprocessed);
19115
- }, clearEmberCompilerCache = () => {}, getEmberCompiledRoot = (_emberDir) => getFrameworkGeneratedDir("ember"), getEmberServerCompiledDir = (emberDir) => join30(getEmberCompiledRoot(emberDir), "server"), getEmberClientCompiledDir = (emberDir) => join30(getEmberCompiledRoot(emberDir), "client");
19375
+ }, clearEmberCompilerCache = () => {}, getEmberCompiledRoot = (_emberDir) => getFrameworkGeneratedDir("ember"), getEmberServerCompiledDir = (emberDir) => join32(getEmberCompiledRoot(emberDir), "server"), getEmberClientCompiledDir = (emberDir) => join32(getEmberCompiledRoot(emberDir), "client");
19116
19376
  var init_compileEmber = __esm(() => {
19117
19377
  init_generatedDir();
19118
19378
  transpiler5 = new Transpiler4({
@@ -19134,7 +19394,7 @@ __export(exports_buildReactVendor, {
19134
19394
  buildReactVendor: () => buildReactVendor
19135
19395
  });
19136
19396
  import { existsSync as existsSync27, mkdirSync as mkdirSync8 } from "fs";
19137
- import { join as join31, resolve as resolve27 } from "path";
19397
+ import { join as join33, resolve as resolve27 } from "path";
19138
19398
  import { rm as rm5 } from "fs/promises";
19139
19399
  var {build: bunBuild3 } = globalThis.Bun;
19140
19400
  var resolveJsxDevRuntimeCompatPath = () => {
@@ -19176,14 +19436,14 @@ var resolveJsxDevRuntimeCompatPath = () => {
19176
19436
  `)}
19177
19437
  `;
19178
19438
  }, buildReactVendor = async (buildDir) => {
19179
- const vendorDir = join31(buildDir, "react", "vendor");
19439
+ const vendorDir = join33(buildDir, "react", "vendor");
19180
19440
  mkdirSync8(vendorDir, { recursive: true });
19181
- const tmpDir = join31(buildDir, "_vendor_tmp");
19441
+ const tmpDir = join33(buildDir, "_vendor_tmp");
19182
19442
  mkdirSync8(tmpDir, { recursive: true });
19183
19443
  const specifiers = reactSpecifiers;
19184
19444
  const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
19185
19445
  const safeName = toSafeFileName(specifier);
19186
- const entryPath = join31(tmpDir, `${safeName}.ts`);
19446
+ const entryPath = join33(tmpDir, `${safeName}.ts`);
19187
19447
  const source = await generateEntrySource(specifier);
19188
19448
  await Bun.write(entryPath, source);
19189
19449
  return entryPath;
@@ -19248,7 +19508,7 @@ __export(exports_buildAngularVendor, {
19248
19508
  buildAngularServerVendor: () => buildAngularServerVendor
19249
19509
  });
19250
19510
  import { mkdirSync as mkdirSync9 } from "fs";
19251
- import { join as join32 } from "path";
19511
+ import { join as join34 } from "path";
19252
19512
  import { rm as rm6 } from "fs/promises";
19253
19513
  var {build: bunBuild4, Glob: Glob7 } = globalThis.Bun;
19254
19514
  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) => {
@@ -19345,14 +19605,14 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
19345
19605
  await collectTransitiveAngularSpecs([...angular, ...transitiveRoots], angular);
19346
19606
  return Array.from(angular).filter(isResolvable);
19347
19607
  }, buildAngularVendor = async (buildDir, directories = [], linkerJitMode = false, depVendorSpecifiers = []) => {
19348
- const vendorDir = join32(buildDir, "angular", "vendor");
19608
+ const vendorDir = join34(buildDir, "angular", "vendor");
19349
19609
  mkdirSync9(vendorDir, { recursive: true });
19350
- const tmpDir = join32(buildDir, "_angular_vendor_tmp");
19610
+ const tmpDir = join34(buildDir, "_angular_vendor_tmp");
19351
19611
  mkdirSync9(tmpDir, { recursive: true });
19352
19612
  const specifiers = await resolveAngularSpecifiers(directories, linkerJitMode);
19353
19613
  const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
19354
19614
  const safeName = toSafeFileName2(specifier);
19355
- const entryPath = join32(tmpDir, `${safeName}.ts`);
19615
+ const entryPath = join34(tmpDir, `${safeName}.ts`);
19356
19616
  await Bun.write(entryPath, await generateVendorEntrySource(specifier));
19357
19617
  return entryPath;
19358
19618
  }));
@@ -19383,9 +19643,9 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
19383
19643
  const specifiers = await resolveAngularSpecifiers(directories, linkerJitMode);
19384
19644
  return computeAngularVendorPaths(specifiers);
19385
19645
  }, buildAngularServerVendor = async (buildDir, directories = [], linkerJitMode = false) => {
19386
- const vendorDir = join32(buildDir, "angular", "vendor", "server");
19646
+ const vendorDir = join34(buildDir, "angular", "vendor", "server");
19387
19647
  mkdirSync9(vendorDir, { recursive: true });
19388
- const tmpDir = join32(buildDir, "_angular_server_vendor_tmp");
19648
+ const tmpDir = join34(buildDir, "_angular_server_vendor_tmp");
19389
19649
  mkdirSync9(tmpDir, { recursive: true });
19390
19650
  const browserSpecs = await resolveAngularSpecifiers(directories, linkerJitMode);
19391
19651
  const allSpecs = new Set(browserSpecs);
@@ -19396,7 +19656,7 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
19396
19656
  const specifiers = Array.from(allSpecs);
19397
19657
  const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
19398
19658
  const safeName = toSafeFileName2(specifier);
19399
- const entryPath = join32(tmpDir, `${safeName}.ts`);
19659
+ const entryPath = join34(tmpDir, `${safeName}.ts`);
19400
19660
  await Bun.write(entryPath, await generateVendorEntrySource(specifier));
19401
19661
  return entryPath;
19402
19662
  }));
@@ -19418,9 +19678,9 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
19418
19678
  return specifiers;
19419
19679
  }, computeAngularServerVendorPaths = (buildDir, specifiers) => {
19420
19680
  const paths = {};
19421
- const vendorDir = join32(buildDir, "angular", "vendor", "server");
19681
+ const vendorDir = join34(buildDir, "angular", "vendor", "server");
19422
19682
  for (const specifier of specifiers) {
19423
- paths[specifier] = join32(vendorDir, `${toSafeFileName2(specifier)}.js`);
19683
+ paths[specifier] = join34(vendorDir, `${toSafeFileName2(specifier)}.js`);
19424
19684
  }
19425
19685
  return paths;
19426
19686
  }, computeAngularServerVendorPathsAsync = async (buildDir, directories = [], linkerJitMode = true) => {
@@ -19476,17 +19736,17 @@ __export(exports_buildVueVendor, {
19476
19736
  buildVueVendor: () => buildVueVendor
19477
19737
  });
19478
19738
  import { mkdirSync as mkdirSync10 } from "fs";
19479
- import { join as join33 } from "path";
19739
+ import { join as join35 } from "path";
19480
19740
  import { rm as rm7 } from "fs/promises";
19481
19741
  var {build: bunBuild5 } = globalThis.Bun;
19482
19742
  var vueSpecifiers, toSafeFileName3 = (specifier) => specifier.replace(/\//g, "_"), buildVueVendor = async (buildDir) => {
19483
- const vendorDir = join33(buildDir, "vue", "vendor");
19743
+ const vendorDir = join35(buildDir, "vue", "vendor");
19484
19744
  mkdirSync10(vendorDir, { recursive: true });
19485
- const tmpDir = join33(buildDir, "_vue_vendor_tmp");
19745
+ const tmpDir = join35(buildDir, "_vue_vendor_tmp");
19486
19746
  mkdirSync10(tmpDir, { recursive: true });
19487
19747
  const entrypoints = await Promise.all(vueSpecifiers.map(async (specifier) => {
19488
19748
  const safeName = toSafeFileName3(specifier);
19489
- const entryPath = join33(tmpDir, `${safeName}.ts`);
19749
+ const entryPath = join35(tmpDir, `${safeName}.ts`);
19490
19750
  await Bun.write(entryPath, `export * from '${specifier}';
19491
19751
  `);
19492
19752
  return entryPath;
@@ -19514,7 +19774,7 @@ var vueSpecifiers, toSafeFileName3 = (specifier) => specifier.replace(/\//g, "_"
19514
19774
  const { readFileSync: readFileSync23, writeFileSync: writeFileSync9, readdirSync: readdirSync5 } = await import("fs");
19515
19775
  const files = readdirSync5(vendorDir).filter((f2) => f2.endsWith(".js"));
19516
19776
  for (const file5 of files) {
19517
- const filePath = join33(vendorDir, file5);
19777
+ const filePath = join35(vendorDir, file5);
19518
19778
  const content = readFileSync23(filePath, "utf-8");
19519
19779
  if (!content.includes("__VUE_HMR_RUNTIME__"))
19520
19780
  continue;
@@ -19541,7 +19801,7 @@ __export(exports_buildSvelteVendor, {
19541
19801
  buildSvelteVendor: () => buildSvelteVendor
19542
19802
  });
19543
19803
  import { mkdirSync as mkdirSync11 } from "fs";
19544
- import { join as join34 } from "path";
19804
+ import { join as join36 } from "path";
19545
19805
  import { rm as rm8 } from "fs/promises";
19546
19806
  var {build: bunBuild6 } = globalThis.Bun;
19547
19807
  var svelteSpecifiers, isResolvable2 = (specifier) => {
@@ -19555,13 +19815,13 @@ var svelteSpecifiers, isResolvable2 = (specifier) => {
19555
19815
  const specifiers = resolveVendorSpecifiers();
19556
19816
  if (specifiers.length === 0)
19557
19817
  return;
19558
- const vendorDir = join34(buildDir, "svelte", "vendor");
19818
+ const vendorDir = join36(buildDir, "svelte", "vendor");
19559
19819
  mkdirSync11(vendorDir, { recursive: true });
19560
- const tmpDir = join34(buildDir, "_svelte_vendor_tmp");
19820
+ const tmpDir = join36(buildDir, "_svelte_vendor_tmp");
19561
19821
  mkdirSync11(tmpDir, { recursive: true });
19562
19822
  const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
19563
19823
  const safeName = toSafeFileName4(specifier);
19564
- const entryPath = join34(tmpDir, `${safeName}.ts`);
19824
+ const entryPath = join36(tmpDir, `${safeName}.ts`);
19565
19825
  await Bun.write(entryPath, `export * from '${specifier}';
19566
19826
  `);
19567
19827
  return entryPath;
@@ -19599,185 +19859,6 @@ var init_buildSvelteVendor = __esm(() => {
19599
19859
  ];
19600
19860
  });
19601
19861
 
19602
- // src/build/rewriteImportsPlugin.ts
19603
- var exports_rewriteImportsPlugin = {};
19604
- __export(exports_rewriteImportsPlugin, {
19605
- rewriteVendorDirectories: () => rewriteVendorDirectories,
19606
- rewriteImportsInContent: () => rewriteImportsInContent,
19607
- rewriteBuildOutputsWith: () => rewriteBuildOutputsWith,
19608
- rewriteBuildOutputs: () => rewriteBuildOutputs,
19609
- jsRewriteImports: () => jsRewriteImports,
19610
- fixMissingReExportNamespacesInContent: () => fixMissingReExportNamespacesInContent,
19611
- buildWithImportRewrite: () => buildWithImportRewrite
19612
- });
19613
- import { readdir as readdir3 } from "fs/promises";
19614
- import { join as join35 } from "path";
19615
- var escapeRegex2 = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), jsRewriteImports = (content, replacements) => {
19616
- let result = content;
19617
- for (const [specifier, webPath] of replacements) {
19618
- const escaped = escapeRegex2(specifier);
19619
- const fromRegex = new RegExp(`(from\\s*["'])${escaped}(["'])`, "g");
19620
- const sideEffectRegex = new RegExp(`(import\\s*["'])${escaped}(["'])`, "g");
19621
- const dynamicRegex = new RegExp(`(import\\s*\\(\\s*["'])${escaped}(["']\\s*\\))`, "g");
19622
- result = result.replace(fromRegex, `$1${webPath}$2`);
19623
- result = result.replace(sideEffectRegex, `$1${webPath}$2`);
19624
- result = result.replace(dynamicRegex, `$1${webPath}$2`);
19625
- }
19626
- return result;
19627
- }, rewriteImportsInContent = (content, vendorPaths) => {
19628
- if (Object.keys(vendorPaths).length === 0)
19629
- return content;
19630
- const replacements = Object.entries(vendorPaths).sort(([keyA], [keyB]) => keyB.length - keyA.length);
19631
- const native = nativeRewriteImports(content, replacements);
19632
- return native ?? jsRewriteImports(content, replacements);
19633
- }, fixMissingReExportNamespacesInContent = (content) => {
19634
- const REEXPORT_PATTERN = /__reExport\(\s*[A-Za-z_$][\w$]*\s*,\s*([A-Za-z_$][\w$]*)\s*\)/g;
19635
- REEXPORT_PATTERN.lastIndex = 0;
19636
- const missing = [];
19637
- let match;
19638
- while ((match = REEXPORT_PATTERN.exec(content)) !== null) {
19639
- const ident = match[1];
19640
- if (!ident)
19641
- continue;
19642
- const nsImportRe = new RegExp(`\\bimport\\s*\\*\\s*as\\s+${ident}\\s+from\\b`);
19643
- if (nsImportRe.test(content))
19644
- continue;
19645
- const declRe = new RegExp(`\\b(?:const|let|var|function|class)\\s+${ident}\\b`);
19646
- if (declRe.test(content))
19647
- continue;
19648
- const namedImportRe = new RegExp(`\\bimport\\s*\\{[^}]*\\b${ident}\\b[^}]*\\}\\s*from\\b`);
19649
- if (namedImportRe.test(content))
19650
- continue;
19651
- const importPathRe = /(?:from\s+|import\s*)["']([^"']+)["']/g;
19652
- let pathMatch;
19653
- let sourcePath;
19654
- while ((pathMatch = importPathRe.exec(content)) !== null) {
19655
- const p2 = pathMatch[1];
19656
- if (!p2)
19657
- continue;
19658
- const base = p2.split("/").pop()?.replace(/\.[mc]?js$/, "");
19659
- if (!base)
19660
- continue;
19661
- const normalized = base.startsWith("_") ? base.slice(1) : base;
19662
- if (normalized === ident || normalized.endsWith(`_${ident}`)) {
19663
- sourcePath = p2;
19664
- break;
19665
- }
19666
- }
19667
- if (sourcePath)
19668
- missing.push({ ident, path: sourcePath });
19669
- }
19670
- if (missing.length === 0)
19671
- return content;
19672
- const seen = new Set;
19673
- const unique = missing.filter((entry) => {
19674
- if (seen.has(entry.ident))
19675
- return false;
19676
- seen.add(entry.ident);
19677
- return true;
19678
- });
19679
- const inserts = unique.map((entry) => `import * as ${entry.ident} from "${entry.path}";`).join(`
19680
- `);
19681
- return `${inserts}
19682
- ${content}`;
19683
- }, isReadableArtifact = (artifact) => artifact.path.endsWith(".js"), rewriteBuildOutputs = async (outputs, vendorPaths) => {
19684
- if (Object.keys(vendorPaths).length === 0)
19685
- return;
19686
- await Promise.all(outputs.filter(isReadableArtifact).map(async (artifact) => {
19687
- let original;
19688
- try {
19689
- original = await artifact.text();
19690
- } catch (err) {
19691
- const code = err.code;
19692
- if (code === "ENOENT")
19693
- return;
19694
- throw err;
19695
- }
19696
- const rewritten = rewriteImportsInContent(original, vendorPaths);
19697
- if (rewritten === original)
19698
- return;
19699
- try {
19700
- await Bun.write(artifact.path, rewritten);
19701
- } catch (err) {
19702
- const code = err.code;
19703
- if (code === "ENOENT")
19704
- return;
19705
- throw err;
19706
- }
19707
- }));
19708
- }, rewriteBuildOutputsWith = async (outputs, resolveVendorPaths) => {
19709
- await Promise.all(outputs.filter(isReadableArtifact).map(async (artifact) => {
19710
- const vendorPaths = resolveVendorPaths(artifact);
19711
- if (Object.keys(vendorPaths).length === 0)
19712
- return;
19713
- let original;
19714
- try {
19715
- original = await artifact.text();
19716
- } catch (err) {
19717
- const code = err.code;
19718
- if (code === "ENOENT")
19719
- return;
19720
- throw err;
19721
- }
19722
- const rewritten = rewriteImportsInContent(original, vendorPaths);
19723
- if (rewritten === original)
19724
- return;
19725
- try {
19726
- await Bun.write(artifact.path, rewritten);
19727
- } catch (err) {
19728
- const code = err.code;
19729
- if (code === "ENOENT")
19730
- return;
19731
- throw err;
19732
- }
19733
- }));
19734
- }, rewriteVendorDirectories = async (vendorDirs, vendorPaths) => {
19735
- if (Object.keys(vendorPaths).length === 0)
19736
- return;
19737
- const allFiles = [];
19738
- for (const dir of vendorDirs) {
19739
- try {
19740
- const entries = await readdir3(dir);
19741
- for (const entry of entries) {
19742
- if (entry.endsWith(".js"))
19743
- allFiles.push(join35(dir, entry));
19744
- }
19745
- } catch {}
19746
- }
19747
- await Promise.all(allFiles.map(async (filePath) => {
19748
- let original;
19749
- try {
19750
- original = await Bun.file(filePath).text();
19751
- } catch (err) {
19752
- const code = err.code;
19753
- if (code === "ENOENT")
19754
- return;
19755
- throw err;
19756
- }
19757
- let next = rewriteImportsInContent(original, vendorPaths);
19758
- next = fixMissingReExportNamespacesInContent(next);
19759
- if (next === original)
19760
- return;
19761
- try {
19762
- await Bun.write(filePath, next);
19763
- } catch (err) {
19764
- const code = err.code;
19765
- if (code === "ENOENT")
19766
- return;
19767
- throw err;
19768
- }
19769
- }));
19770
- }, buildWithImportRewrite = async (pendingBuild, vendorPaths) => {
19771
- const result = await pendingBuild;
19772
- if (result.outputs.length > 0) {
19773
- await rewriteBuildOutputs(result.outputs, vendorPaths);
19774
- }
19775
- return result;
19776
- };
19777
- var init_rewriteImportsPlugin = __esm(() => {
19778
- init_nativeRewrite();
19779
- });
19780
-
19781
19862
  // src/core/build.ts
19782
19863
  import {
19783
19864
  copyFileSync as copyFileSync2,
@@ -19789,7 +19870,7 @@ import {
19789
19870
  statSync as statSync3,
19790
19871
  writeFileSync as writeFileSync9
19791
19872
  } from "fs";
19792
- import { basename as basename12, dirname as dirname19, extname as extname8, join as join36, relative as relative13, resolve as resolve28 } from "path";
19873
+ import { basename as basename12, dirname as dirname20, extname as extname8, join as join37, relative as relative14, resolve as resolve28 } from "path";
19793
19874
  import { cwd, env as env3, exit } from "process";
19794
19875
  var {
19795
19876
  build: bunBuild7,
@@ -19870,8 +19951,8 @@ var isDev2, isBuildTraceEnabled = () => {
19870
19951
  mkdirSync12(htmxDestDir, { recursive: true });
19871
19952
  const glob = new Glob8("htmx*.min.js");
19872
19953
  for (const relPath of glob.scanSync({ cwd: htmxDir })) {
19873
- const src = join36(htmxDir, relPath);
19874
- const dest = join36(htmxDestDir, "htmx.min.js");
19954
+ const src = join37(htmxDir, relPath);
19955
+ const dest = join37(htmxDestDir, "htmx.min.js");
19875
19956
  copyFileSync2(src, dest);
19876
19957
  return;
19877
19958
  }
@@ -19946,7 +20027,7 @@ var isDev2, isBuildTraceEnabled = () => {
19946
20027
  vuePagesPath
19947
20028
  }) => {
19948
20029
  const { readdirSync: readDir } = await import("fs");
19949
- const devIndexDir = join36(buildPath, "_src_indexes");
20030
+ const devIndexDir = join37(buildPath, "_src_indexes");
19950
20031
  mkdirSync12(devIndexDir, { recursive: true });
19951
20032
  if (reactIndexesPath && reactPagesPath) {
19952
20033
  copyReactDevIndexes(reactIndexesPath, reactPagesPath, devIndexDir, readDir);
@@ -19962,37 +20043,37 @@ var isDev2, isBuildTraceEnabled = () => {
19962
20043
  return;
19963
20044
  }
19964
20045
  const indexFiles = readDir(reactIndexesPath).filter((file5) => file5.endsWith(".tsx"));
19965
- const pagesRel = relative13(process.cwd(), resolve28(reactPagesPath)).replace(/\\/g, "/");
20046
+ const pagesRel = relative14(process.cwd(), resolve28(reactPagesPath)).replace(/\\/g, "/");
19966
20047
  for (const file5 of indexFiles) {
19967
- let content = readFileSync23(join36(reactIndexesPath, file5), "utf-8");
20048
+ let content = readFileSync23(join37(reactIndexesPath, file5), "utf-8");
19968
20049
  content = content.replace(/from\s*['"]([^'"]*\/pages\/([^'"]+))['"]/g, (_match, _fullPath, componentName) => `from '/@src/${pagesRel}/${componentName}'`);
19969
- writeFileSync9(join36(devIndexDir, file5), content);
20050
+ writeFileSync9(join37(devIndexDir, file5), content);
19970
20051
  }
19971
20052
  }, copySvelteDevIndexes = (svelteDir, sveltePagesPath, svelteEntries, devIndexDir) => {
19972
- const svelteIndexDir = join36(getFrameworkGeneratedDir("svelte"), "indexes");
20053
+ const svelteIndexDir = join37(getFrameworkGeneratedDir("svelte"), "indexes");
19973
20054
  const sveltePageEntries = svelteEntries.filter((file5) => resolve28(file5).startsWith(resolve28(sveltePagesPath)));
19974
20055
  for (const entry of sveltePageEntries) {
19975
20056
  const name = basename12(entry).replace(/\.svelte(\.(ts|js))?$/, "");
19976
- const indexFile = join36(svelteIndexDir, "pages", `${name}.js`);
20057
+ const indexFile = join37(svelteIndexDir, "pages", `${name}.js`);
19977
20058
  if (!existsSync28(indexFile))
19978
20059
  continue;
19979
20060
  let content = readFileSync23(indexFile, "utf-8");
19980
- const srcRel = relative13(process.cwd(), resolve28(entry)).replace(/\\/g, "/");
20061
+ const srcRel = relative14(process.cwd(), resolve28(entry)).replace(/\\/g, "/");
19981
20062
  content = content.replace(/import\s+Component\s+from\s+['"]([^'"]+)['"]/, `import Component from "/@src/${srcRel}"`);
19982
- writeFileSync9(join36(devIndexDir, `${name}.svelte.js`), content);
20063
+ writeFileSync9(join37(devIndexDir, `${name}.svelte.js`), content);
19983
20064
  }
19984
20065
  }, copyVueDevIndexes = (vueDir, vuePagesPath, vueEntries, devIndexDir) => {
19985
- const vueIndexDir = join36(getFrameworkGeneratedDir("vue"), "indexes");
20066
+ const vueIndexDir = join37(getFrameworkGeneratedDir("vue"), "indexes");
19986
20067
  const vuePageEntries = vueEntries.filter((file5) => resolve28(file5).startsWith(resolve28(vuePagesPath)));
19987
20068
  for (const entry of vuePageEntries) {
19988
20069
  const name = basename12(entry, ".vue");
19989
- const indexFile = join36(vueIndexDir, `${name}.js`);
20070
+ const indexFile = join37(vueIndexDir, `${name}.js`);
19990
20071
  if (!existsSync28(indexFile))
19991
20072
  continue;
19992
20073
  let content = readFileSync23(indexFile, "utf-8");
19993
- const srcRel = relative13(process.cwd(), resolve28(entry)).replace(/\\/g, "/");
20074
+ const srcRel = relative14(process.cwd(), resolve28(entry)).replace(/\\/g, "/");
19994
20075
  content = content.replace(/import\s+Comp(?:\s*,\s*\*\s+as\s+\w+)?\s+from\s+['"]([^'"]+)['"]/, (match) => match.replace(/from\s+['"][^'"]+['"]/, `from "/@src/${srcRel}"`));
19995
- writeFileSync9(join36(devIndexDir, `${name}.vue.js`), content);
20076
+ writeFileSync9(join37(devIndexDir, `${name}.vue.js`), content);
19996
20077
  }
19997
20078
  }, resolveVueRuntimeId = (content, firstUseName, outputPath, projectRoot) => {
19998
20079
  const varIdx = content.indexOf(`var ${firstUseName} =`);
@@ -20065,7 +20146,7 @@ ${content.slice(firstUseIdx)}`;
20065
20146
  }, buildDevUrlFileMap = (urlReferencedFiles, projectRoot) => {
20066
20147
  const urlFileMap = new Map;
20067
20148
  for (const srcPath of urlReferencedFiles) {
20068
- const rel = relative13(projectRoot, srcPath).replace(/\\/g, "/");
20149
+ const rel = relative14(projectRoot, srcPath).replace(/\\/g, "/");
20069
20150
  const name = basename12(srcPath);
20070
20151
  const mtime = Math.round(statSync3(srcPath).mtimeMs);
20071
20152
  const url = `/@src/${rel}?v=${mtime}`;
@@ -20080,7 +20161,7 @@ ${content.slice(firstUseIdx)}`;
20080
20161
  const output = nonReactClientOutputs.find((artifact) => basename12(artifact.path).startsWith(`${srcBase}.`));
20081
20162
  if (!output)
20082
20163
  continue;
20083
- urlFileMap.set(basename12(srcPath), `/${relative13(buildPath, output.path).replace(/\\/g, "/")}`);
20164
+ urlFileMap.set(basename12(srcPath), `/${relative14(buildPath, output.path).replace(/\\/g, "/")}`);
20084
20165
  }
20085
20166
  return urlFileMap;
20086
20167
  }, buildUrlFileMap = (urlReferencedFiles, hmr, projectRoot, buildPath, nonReactClientOutputs) => {
@@ -20215,10 +20296,10 @@ ${content.slice(firstUseIdx)}`;
20215
20296
  restoreTracePhase();
20216
20297
  return;
20217
20298
  }
20218
- const traceDir = join36(buildPath2, ".absolute-trace");
20299
+ const traceDir = join37(buildPath2, ".absolute-trace");
20219
20300
  const timestamp = new Date().toISOString().replace(/[:.]/g, "-");
20220
20301
  mkdirSync12(traceDir, { recursive: true });
20221
- writeFileSync9(join36(traceDir, `build-trace-${timestamp}.json`), JSON.stringify({
20302
+ writeFileSync9(join37(traceDir, `build-trace-${timestamp}.json`), JSON.stringify({
20222
20303
  events: traceEvents,
20223
20304
  frameworks: traceFrameworkNames,
20224
20305
  generatedAt: new Date().toISOString(),
@@ -20249,15 +20330,15 @@ ${content.slice(firstUseIdx)}`;
20249
20330
  const stylesPath = typeof stylesConfig === "string" ? stylesConfig : stylesConfig?.path;
20250
20331
  const stylesIgnore = typeof stylesConfig === "object" ? stylesConfig.ignore : undefined;
20251
20332
  const stylesDir = stylesPath && validateSafePath(stylesPath, projectRoot);
20252
- const reactIndexesPath = reactDir && join36(getFrameworkGeneratedDir("react"), "indexes");
20253
- const reactPagesPath = reactDir && join36(reactDir, "pages");
20254
- const htmlPagesPath = htmlDir && join36(htmlDir, "pages");
20255
- const htmlScriptsPath = htmlDir && join36(htmlDir, "scripts");
20256
- const sveltePagesPath = svelteDir && join36(svelteDir, "pages");
20257
- const vuePagesPath = vueDir && join36(vueDir, "pages");
20258
- const htmxPagesPath = htmxDir && join36(htmxDir, "pages");
20259
- const angularPagesPath = angularDir && join36(angularDir, "pages");
20260
- const emberPagesPath = emberDir && join36(emberDir, "pages");
20333
+ const reactIndexesPath = reactDir && join37(getFrameworkGeneratedDir("react"), "indexes");
20334
+ const reactPagesPath = reactDir && join37(reactDir, "pages");
20335
+ const htmlPagesPath = htmlDir && join37(htmlDir, "pages");
20336
+ const htmlScriptsPath = htmlDir && join37(htmlDir, "scripts");
20337
+ const sveltePagesPath = svelteDir && join37(svelteDir, "pages");
20338
+ const vuePagesPath = vueDir && join37(vueDir, "pages");
20339
+ const htmxPagesPath = htmxDir && join37(htmxDir, "pages");
20340
+ const angularPagesPath = angularDir && join37(angularDir, "pages");
20341
+ const emberPagesPath = emberDir && join37(emberDir, "pages");
20261
20342
  const frontends = [
20262
20343
  reactDir,
20263
20344
  htmlDir,
@@ -20288,7 +20369,7 @@ ${content.slice(firstUseIdx)}`;
20288
20369
  const sourceClientRoots = [
20289
20370
  htmlDir,
20290
20371
  htmxDir,
20291
- islandBootstrapPath && dirname19(islandBootstrapPath)
20372
+ islandBootstrapPath && dirname20(islandBootstrapPath)
20292
20373
  ].filter((dir) => Boolean(dir));
20293
20374
  const usesGenerated = Boolean(reactDir) || Boolean(svelteDir) || Boolean(vueDir) || Boolean(angularDir);
20294
20375
  if (usesGenerated)
@@ -20316,8 +20397,8 @@ ${content.slice(firstUseIdx)}`;
20316
20397
  const [firstEntry] = serverDirMap;
20317
20398
  if (!firstEntry)
20318
20399
  throw new Error("Expected at least one server directory entry");
20319
- serverRoot = join36(firstEntry.dir, firstEntry.subdir);
20320
- serverOutDir = join36(buildPath, basename12(firstEntry.dir));
20400
+ serverRoot = join37(firstEntry.dir, firstEntry.subdir);
20401
+ serverOutDir = join37(buildPath, basename12(firstEntry.dir));
20321
20402
  } else if (serverDirMap.length > 1) {
20322
20403
  serverRoot = commonAncestor(serverDirMap.map((entry) => entry.dir), projectRoot);
20323
20404
  serverOutDir = buildPath;
@@ -20345,7 +20426,7 @@ ${content.slice(firstUseIdx)}`;
20345
20426
  await tracePhase("react/index-generation", () => generateReactIndexFiles(reactPagesPath, reactIndexesPath, hmr));
20346
20427
  }
20347
20428
  if (assetsPath && (!isIncremental || normalizedIncrementalFiles?.some((f2) => f2.includes("/assets/")))) {
20348
- await tracePhase("assets/copy", () => cpSync(assetsPath, join36(buildPath, "assets"), {
20429
+ await tracePhase("assets/copy", () => cpSync(assetsPath, join37(buildPath, "assets"), {
20349
20430
  force: true,
20350
20431
  recursive: true
20351
20432
  }));
@@ -20455,11 +20536,11 @@ ${content.slice(firstUseIdx)}`;
20455
20536
  }
20456
20537
  }
20457
20538
  if (htmlDefaults.error || htmlDefaults.notFound || htmlDefaults.loading || Object.keys(htmlPages).length > 0) {
20458
- const htmlConventionsOutDir = join36(buildPath, "conventions", "html");
20539
+ const htmlConventionsOutDir = join37(buildPath, "conventions", "html");
20459
20540
  mkdirSync12(htmlConventionsOutDir, { recursive: true });
20460
20541
  const htmlPathRemap = new Map;
20461
20542
  for (const sourcePath of htmlConventionSources) {
20462
- const dest = join36(htmlConventionsOutDir, basename12(sourcePath));
20543
+ const dest = join37(htmlConventionsOutDir, basename12(sourcePath));
20463
20544
  cpSync(sourcePath, dest, { force: true });
20464
20545
  htmlPathRemap.set(sourcePath, dest);
20465
20546
  }
@@ -20502,7 +20583,7 @@ ${content.slice(firstUseIdx)}`;
20502
20583
  const reactEntries = isIncremental && reactIndexesPath && reactPagesPath ? filterToIncrementalEntries(allReactEntries, (entry) => {
20503
20584
  if (entry.startsWith(resolve28(reactIndexesPath))) {
20504
20585
  const pageName = basename12(entry, ".tsx");
20505
- return join36(reactPagesPath, `${pageName}.tsx`);
20586
+ return join37(reactPagesPath, `${pageName}.tsx`);
20506
20587
  }
20507
20588
  return null;
20508
20589
  }) : allReactEntries;
@@ -20621,14 +20702,14 @@ ${content.slice(firstUseIdx)}`;
20621
20702
  try {
20622
20703
  const { primeComponentFingerprint: primeComponentFingerprint2 } = await Promise.resolve().then(() => (init_fastHmrCompiler(), exports_fastHmrCompiler));
20623
20704
  const { readdir: readdir4 } = await import("fs/promises");
20624
- const { join: join37 } = await import("path");
20705
+ const { join: join38 } = await import("path");
20625
20706
  const walk = async (dir) => {
20626
20707
  const entries = await readdir4(dir, {
20627
20708
  withFileTypes: true
20628
20709
  });
20629
20710
  const out = [];
20630
20711
  for (const entry of entries) {
20631
- const full = join37(dir, entry.name);
20712
+ const full = join38(dir, entry.name);
20632
20713
  if (entry.isDirectory()) {
20633
20714
  out.push(...await walk(full));
20634
20715
  } else if (entry.isFile() && entry.name.endsWith(".ts") && !entry.name.endsWith(".d.ts")) {
@@ -20693,7 +20774,7 @@ ${content.slice(firstUseIdx)}`;
20693
20774
  const compileReactConventions = async () => {
20694
20775
  if (reactConventionSources.length === 0)
20695
20776
  return emptyStringArray;
20696
- const destDir = join36(buildPath, "conventions", "react");
20777
+ const destDir = join37(buildPath, "conventions", "react");
20697
20778
  rmSync2(destDir, { force: true, recursive: true });
20698
20779
  mkdirSync12(destDir, { recursive: true });
20699
20780
  const destPaths = [];
@@ -20709,7 +20790,7 @@ ${content.slice(firstUseIdx)}`;
20709
20790
  naming: `${idx}-[name].[ext]`,
20710
20791
  outdir: destDir,
20711
20792
  plugins: [stylePreprocessorPlugin2],
20712
- root: dirname19(source),
20793
+ root: dirname20(source),
20713
20794
  target: "bun",
20714
20795
  throw: false,
20715
20796
  tsconfig: "./tsconfig.json"
@@ -20737,7 +20818,7 @@ ${content.slice(firstUseIdx)}`;
20737
20818
  angularConventionSources.length > 0 && angularDir ? tracePhase("compile/convention-angular", () => Promise.resolve().then(() => (init_compileAngular(), exports_compileAngular)).then((mod) => mod.compileAngular(angularConventionSources, angularDir, hmr, styleTransformConfig))) : { serverPaths: emptyStringArray }
20738
20819
  ]);
20739
20820
  const bundleConventionFiles = async (framework, compiledPaths) => {
20740
- const destDir = join36(buildPath, "conventions", framework);
20821
+ const destDir = join37(buildPath, "conventions", framework);
20741
20822
  rmSync2(destDir, { force: true, recursive: true });
20742
20823
  mkdirSync12(destDir, { recursive: true });
20743
20824
  const destPaths = [];
@@ -20811,7 +20892,7 @@ ${content.slice(firstUseIdx)}`;
20811
20892
  }
20812
20893
  })) : {
20813
20894
  entries: [],
20814
- generatedRoot: join36(buildPath, "_island_entries")
20895
+ generatedRoot: join37(buildPath, "_island_entries")
20815
20896
  };
20816
20897
  const islandClientEntryPoints = islandEntryResult.entries.map((entry) => entry.entryPath);
20817
20898
  if (serverEntryPoints.length === 0 && reactClientEntryPoints.length === 0 && nonReactClientEntryPoints.length === 0 && islandClientEntryPoints.length === 0 && htmxDir === undefined && htmlDir === undefined) {
@@ -20847,7 +20928,7 @@ ${content.slice(firstUseIdx)}`;
20847
20928
  return {};
20848
20929
  }
20849
20930
  if (hmr && reactIndexesPath && reactClientEntryPoints.length > 0) {
20850
- const refreshEntry = join36(reactIndexesPath, "_refresh.tsx");
20931
+ const refreshEntry = join37(reactIndexesPath, "_refresh.tsx");
20851
20932
  if (!reactClientEntryPoints.includes(refreshEntry))
20852
20933
  reactClientEntryPoints.push(refreshEntry);
20853
20934
  }
@@ -20857,6 +20938,12 @@ ${content.slice(firstUseIdx)}`;
20857
20938
  vendorPaths = computeVendorPaths2();
20858
20939
  setDevVendorPaths(vendorPaths);
20859
20940
  }
20941
+ if (!hmr && reactDir) {
20942
+ const { buildReactVendor: buildReactVendor2, computeVendorPaths: computeVendorPaths2 } = await Promise.resolve().then(() => (init_buildReactVendor(), exports_buildReactVendor));
20943
+ await buildReactVendor2(buildPath);
20944
+ vendorPaths = computeVendorPaths2();
20945
+ setDevVendorPaths(vendorPaths);
20946
+ }
20860
20947
  let angularVendorPaths2 = getAngularVendorPaths();
20861
20948
  if (!angularVendorPaths2 && hmr && angularDir) {
20862
20949
  const { computeAngularVendorPaths: computeAngularVendorPaths2 } = await Promise.resolve().then(() => (init_buildAngularVendor(), exports_buildAngularVendor));
@@ -20897,12 +20984,24 @@ ${content.slice(firstUseIdx)}`;
20897
20984
  vueVendorPaths2 = computeVueVendorPaths2();
20898
20985
  setVueVendorPaths(vueVendorPaths2);
20899
20986
  }
20987
+ if (!hmr && vueDir) {
20988
+ const { buildVueVendor: buildVueVendor2, computeVueVendorPaths: computeVueVendorPaths2 } = await Promise.resolve().then(() => (init_buildVueVendor(), exports_buildVueVendor));
20989
+ await buildVueVendor2(buildPath);
20990
+ vueVendorPaths2 = computeVueVendorPaths2();
20991
+ setVueVendorPaths(vueVendorPaths2);
20992
+ }
20900
20993
  let svelteVendorPaths2 = getSvelteVendorPaths();
20901
20994
  if (!svelteVendorPaths2 && hmr && svelteDir) {
20902
20995
  const { computeSvelteVendorPaths: computeSvelteVendorPaths2 } = await Promise.resolve().then(() => (init_buildSvelteVendor(), exports_buildSvelteVendor));
20903
20996
  svelteVendorPaths2 = computeSvelteVendorPaths2();
20904
20997
  setSvelteVendorPaths(svelteVendorPaths2);
20905
20998
  }
20999
+ if (!hmr && svelteDir) {
21000
+ const { buildSvelteVendor: buildSvelteVendor2, computeSvelteVendorPaths: computeSvelteVendorPaths2 } = await Promise.resolve().then(() => (init_buildSvelteVendor(), exports_buildSvelteVendor));
21001
+ await buildSvelteVendor2(buildPath);
21002
+ svelteVendorPaths2 = computeSvelteVendorPaths2();
21003
+ setSvelteVendorPaths(svelteVendorPaths2);
21004
+ }
20906
21005
  const depVendorPaths = hmr && globalThis.__depVendorPaths ? globalThis.__depVendorPaths : {};
20907
21006
  const reactExternalPaths = {
20908
21007
  ...vendorPaths ?? {},
@@ -20965,19 +21064,19 @@ ${content.slice(firstUseIdx)}`;
20965
21064
  throw: false
20966
21065
  }, resolveBunBuildOverride(bunBuildConfig, "reactClient")) : undefined;
20967
21066
  if (reactDir && reactClientEntryPoints.length > 0) {
20968
- rmSync2(join36(buildPath, "react", "generated", "indexes"), {
21067
+ rmSync2(join37(buildPath, "react", "generated", "indexes"), {
20969
21068
  force: true,
20970
21069
  recursive: true
20971
21070
  });
20972
21071
  }
20973
21072
  if (angularDir && angularClientPaths.length > 0) {
20974
- rmSync2(join36(buildPath, "angular", "indexes"), {
21073
+ rmSync2(join37(buildPath, "angular", "indexes"), {
20975
21074
  force: true,
20976
21075
  recursive: true
20977
21076
  });
20978
21077
  }
20979
21078
  if (islandClientEntryPoints.length > 0) {
20980
- rmSync2(join36(buildPath, "islands"), {
21079
+ rmSync2(join37(buildPath, "islands"), {
20981
21080
  force: true,
20982
21081
  recursive: true
20983
21082
  });
@@ -21069,7 +21168,7 @@ ${content.slice(firstUseIdx)}`;
21069
21168
  globalCssEntries.length > 0 ? tracePhase("bun/global-css", () => bunBuild7(mergeBunBuildConfig({
21070
21169
  entrypoints: globalCssEntries,
21071
21170
  naming: `[dir]/[name].[hash].[ext]`,
21072
- outdir: stylesDir ? join36(buildPath, basename12(stylesDir)) : buildPath,
21171
+ outdir: stylesDir ? join37(buildPath, basename12(stylesDir)) : buildPath,
21073
21172
  plugins: [stylePreprocessorPlugin2],
21074
21173
  root: stylesDir || clientRoot,
21075
21174
  target: "browser",
@@ -21078,7 +21177,7 @@ ${content.slice(firstUseIdx)}`;
21078
21177
  vueCssPaths.length > 0 ? tracePhase("bun/vue-css", () => bunBuild7(mergeBunBuildConfig({
21079
21178
  entrypoints: vueCssPaths,
21080
21179
  naming: `[name].[hash].[ext]`,
21081
- outdir: join36(buildPath, assetsPath ? basename12(assetsPath) : "assets", "css"),
21180
+ outdir: join37(buildPath, assetsPath ? basename12(assetsPath) : "assets", "css"),
21082
21181
  target: "browser",
21083
21182
  throw: false
21084
21183
  }, resolveBunBuildOverride(bunBuildConfig, "vueCss")))) : undefined
@@ -21152,10 +21251,10 @@ ${content.slice(firstUseIdx)}`;
21152
21251
  if (serverOutputs.length > 0 && angularServerVendorPaths2 && Object.keys(angularServerVendorPaths2).length > 0) {
21153
21252
  const { rewriteBuildOutputsWith: rewriteBuildOutputsWith2 } = await Promise.resolve().then(() => (init_rewriteImportsPlugin(), exports_rewriteImportsPlugin));
21154
21253
  await tracePhase("postprocess/server-angular-vendor-imports", () => rewriteBuildOutputsWith2(serverOutputs, (artifact) => {
21155
- const fileDir = dirname19(artifact.path);
21254
+ const fileDir = dirname20(artifact.path);
21156
21255
  const relativePaths = {};
21157
21256
  for (const [specifier, absolute] of Object.entries(angularServerVendorPaths2)) {
21158
- const rel = relative13(fileDir, absolute);
21257
+ const rel = relative14(fileDir, absolute);
21159
21258
  relativePaths[specifier] = rel.startsWith(".") ? rel : `./${rel}`;
21160
21259
  }
21161
21260
  return relativePaths;
@@ -21260,7 +21359,7 @@ ${content.slice(firstUseIdx)}`;
21260
21359
  const parentArtifact = serverJsByPascalName.get(parentName);
21261
21360
  if (!parentArtifact)
21262
21361
  return;
21263
- const sourceDir = dirname19(source);
21362
+ const sourceDir = dirname20(source);
21264
21363
  const entries = routes.flatMap(({ path, importPath }) => {
21265
21364
  const childSourcePath = resolve28(sourceDir, importPath);
21266
21365
  const childName = basename12(childSourcePath, ".vue");
@@ -21285,7 +21384,7 @@ ${content.slice(firstUseIdx)}`;
21285
21384
  if (skipAngularClientBundle) {
21286
21385
  for (const clientPath of angularClientPaths) {
21287
21386
  const fileBase = basename12(clientPath, ".js");
21288
- const relFromCwd = relative13(projectRoot, clientPath).replace(/\\/g, "/");
21387
+ const relFromCwd = relative14(projectRoot, clientPath).replace(/\\/g, "/");
21289
21388
  manifest[`${toPascal(fileBase)}Index`] = `/@src/${relFromCwd}`;
21290
21389
  }
21291
21390
  }
@@ -21310,7 +21409,7 @@ ${content.slice(firstUseIdx)}`;
21310
21409
  const processHtmlPages = async () => {
21311
21410
  if (!(htmlDir && htmlPagesPath))
21312
21411
  return;
21313
- const outputHtmlPages = isSingle ? join36(buildPath, "pages") : join36(buildPath, basename12(htmlDir), "pages");
21412
+ const outputHtmlPages = isSingle ? join37(buildPath, "pages") : join37(buildPath, basename12(htmlDir), "pages");
21314
21413
  mkdirSync12(outputHtmlPages, { recursive: true });
21315
21414
  cpSync(htmlPagesPath, outputHtmlPages, {
21316
21415
  force: true,
@@ -21335,14 +21434,14 @@ ${content.slice(firstUseIdx)}`;
21335
21434
  const processHtmxPages = async () => {
21336
21435
  if (!(htmxDir && htmxPagesPath))
21337
21436
  return;
21338
- const outputHtmxPages = isSingle ? join36(buildPath, "pages") : join36(buildPath, basename12(htmxDir), "pages");
21437
+ const outputHtmxPages = isSingle ? join37(buildPath, "pages") : join37(buildPath, basename12(htmxDir), "pages");
21339
21438
  mkdirSync12(outputHtmxPages, { recursive: true });
21340
21439
  cpSync(htmxPagesPath, outputHtmxPages, {
21341
21440
  force: true,
21342
21441
  recursive: true
21343
21442
  });
21344
21443
  if (shouldCopyHtmx) {
21345
- const htmxDestDir = isSingle ? buildPath : join36(buildPath, basename12(htmxDir));
21444
+ const htmxDestDir = isSingle ? buildPath : join37(buildPath, basename12(htmxDir));
21346
21445
  copyHtmxVendor(htmxDir, htmxDestDir);
21347
21446
  }
21348
21447
  if (shouldUpdateHtmxAssetPaths) {
@@ -21409,9 +21508,9 @@ ${content.slice(firstUseIdx)}`;
21409
21508
  writeBuildTrace(buildPath);
21410
21509
  return { conventions: conventionsMap, manifest };
21411
21510
  }
21412
- writeFileSync9(join36(buildPath, "manifest.json"), JSON.stringify(manifest, null, "\t"));
21511
+ writeFileSync9(join37(buildPath, "manifest.json"), JSON.stringify(manifest, null, "\t"));
21413
21512
  if (Object.keys(conventionsMap).length > 0) {
21414
- writeFileSync9(join36(buildPath, "conventions.json"), JSON.stringify(conventionsMap, null, "\t"));
21513
+ writeFileSync9(join37(buildPath, "conventions.json"), JSON.stringify(conventionsMap, null, "\t"));
21415
21514
  }
21416
21515
  writeBuildTrace(buildPath);
21417
21516
  if (mode === "production") {
@@ -21534,7 +21633,7 @@ var init_build = __esm(() => {
21534
21633
 
21535
21634
  // src/build/buildEmberVendor.ts
21536
21635
  import { mkdirSync as mkdirSync13, existsSync as existsSync29 } from "fs";
21537
- import { join as join37 } from "path";
21636
+ import { join as join38 } from "path";
21538
21637
  import { rm as rm9 } from "fs/promises";
21539
21638
  var {build: bunBuild8 } = globalThis.Bun;
21540
21639
  var toSafeFileName5 = (specifier) => specifier.replace(/^@/, "").replace(/\//g, "_"), generateMacrosShim = () => `// Generated shim for @embroider/macros \u2014 provides minimal runtime
@@ -21586,7 +21685,7 @@ export const importSync = (specifier) => {
21586
21685
  if (standaloneSpecifiers.has(specifier)) {
21587
21686
  return { resolveTo: specifier, specifier };
21588
21687
  }
21589
- const emberInternalPath = join37(cwd2, "node_modules/ember-source/dist/packages", specifier, "index.js");
21688
+ const emberInternalPath = join38(cwd2, "node_modules/ember-source/dist/packages", specifier, "index.js");
21590
21689
  if (!existsSync29(emberInternalPath)) {
21591
21690
  throw new Error(`Ember vendor build: cannot find ${specifier} at ${emberInternalPath}. ` + `Is ember-source installed and at least 6.12?`);
21592
21691
  }
@@ -21618,7 +21717,7 @@ export const importSync = (specifier) => {
21618
21717
  if (standalonePackages.has(args.path)) {
21619
21718
  return;
21620
21719
  }
21621
- const internal = join37(cwd2, "node_modules/ember-source/dist/packages", args.path, "index.js");
21720
+ const internal = join38(cwd2, "node_modules/ember-source/dist/packages", args.path, "index.js");
21622
21721
  if (existsSync29(internal)) {
21623
21722
  return { path: internal };
21624
21723
  }
@@ -21626,16 +21725,16 @@ export const importSync = (specifier) => {
21626
21725
  });
21627
21726
  }
21628
21727
  }), buildEmberVendor = async (buildDir, cwd2 = process.cwd()) => {
21629
- const vendorDir = join37(buildDir, "ember", "vendor");
21728
+ const vendorDir = join38(buildDir, "ember", "vendor");
21630
21729
  mkdirSync13(vendorDir, { recursive: true });
21631
- const tmpDir = join37(buildDir, "_ember_vendor_tmp");
21730
+ const tmpDir = join38(buildDir, "_ember_vendor_tmp");
21632
21731
  mkdirSync13(tmpDir, { recursive: true });
21633
- const macrosShimPath = join37(tmpDir, "embroider_macros_shim.js");
21732
+ const macrosShimPath = join38(tmpDir, "embroider_macros_shim.js");
21634
21733
  await Bun.write(macrosShimPath, generateMacrosShim());
21635
21734
  const resolutions = REQUIRED_EMBER_SPECIFIERS.map((specifier) => resolveEmberSpecifier(specifier, cwd2));
21636
21735
  const entrypoints = await Promise.all(resolutions.map(async (resolution) => {
21637
21736
  const safeName = toSafeFileName5(resolution.specifier);
21638
- const entryPath = join37(tmpDir, `${safeName}.js`);
21737
+ const entryPath = join38(tmpDir, `${safeName}.js`);
21639
21738
  const source = resolution.specifier === "@embroider/macros" ? `export * from ${JSON.stringify(macrosShimPath)};
21640
21739
  ` : generateVendorEntrySource2(resolution);
21641
21740
  await Bun.write(entryPath, source);
@@ -22011,7 +22110,7 @@ var init_clientManager = __esm(() => {
22011
22110
 
22012
22111
  // src/dev/pathUtils.ts
22013
22112
  import { existsSync as existsSync31, readdirSync as readdirSync5, readFileSync as readFileSync25 } from "fs";
22014
- import { dirname as dirname20, resolve as resolve31 } from "path";
22113
+ import { dirname as dirname21, resolve as resolve31 } from "path";
22015
22114
  var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
22016
22115
  if (shouldIgnorePath(filePath, resolved)) {
22017
22116
  return "ignored";
@@ -22139,10 +22238,10 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
22139
22238
  refs.push(strMatch[1]);
22140
22239
  }
22141
22240
  }
22142
- const componentDir = dirname20(full);
22241
+ const componentDir = dirname21(full);
22143
22242
  for (const ref of refs) {
22144
22243
  const refAbs = normalizePath(resolve31(componentDir, ref));
22145
- const refDir = normalizePath(dirname20(refAbs));
22244
+ const refDir = normalizePath(dirname21(refAbs));
22146
22245
  if (refDir === angularRootNormalized || refDir.startsWith(angularRootNormalized + "/")) {
22147
22246
  continue;
22148
22247
  }
@@ -22270,7 +22369,7 @@ var init_pathUtils = __esm(() => {
22270
22369
  // src/dev/fileWatcher.ts
22271
22370
  import { watch } from "fs";
22272
22371
  import { existsSync as existsSync32, readdirSync as readdirSync6, statSync as statSync4 } from "fs";
22273
- import { dirname as dirname21, join as join38, resolve as resolve32 } from "path";
22372
+ import { dirname as dirname22, join as join39, resolve as resolve32 } from "path";
22274
22373
  var safeRemoveFromGraph = (graph, fullPath) => {
22275
22374
  try {
22276
22375
  removeFileFromGraph(graph, fullPath);
@@ -22303,7 +22402,7 @@ var safeRemoveFromGraph = (graph, fullPath) => {
22303
22402
  for (const name of entries) {
22304
22403
  if (shouldSkipFilename(name, isStylesDir))
22305
22404
  continue;
22306
- const child = join38(eventDir, name).replace(/\\/g, "/");
22405
+ const child = join39(eventDir, name).replace(/\\/g, "/");
22307
22406
  let st2;
22308
22407
  try {
22309
22408
  st2 = statSync4(child);
@@ -22328,12 +22427,12 @@ var safeRemoveFromGraph = (graph, fullPath) => {
22328
22427
  return;
22329
22428
  if (shouldSkipFilename(filename, isStylesDir)) {
22330
22429
  if (event === "rename") {
22331
- const eventDir = dirname21(join38(absolutePath, filename)).replace(/\\/g, "/");
22430
+ const eventDir = dirname22(join39(absolutePath, filename)).replace(/\\/g, "/");
22332
22431
  atomicRecoveryScan(eventDir);
22333
22432
  }
22334
22433
  return;
22335
22434
  }
22336
- const fullPath = join38(absolutePath, filename).replace(/\\/g, "/");
22435
+ const fullPath = join39(absolutePath, filename).replace(/\\/g, "/");
22337
22436
  if (shouldIgnorePath(fullPath, state.resolvedPaths)) {
22338
22437
  return;
22339
22438
  }
@@ -22703,7 +22802,7 @@ __export(exports_resolveOwningComponents, {
22703
22802
  invalidateResourceIndex: () => invalidateResourceIndex
22704
22803
  });
22705
22804
  import { readdirSync as readdirSync7, readFileSync as readFileSync27, statSync as statSync5 } from "fs";
22706
- import { dirname as dirname22, extname as extname9, join as join39, resolve as resolve36 } from "path";
22805
+ import { dirname as dirname23, extname as extname9, join as join40, resolve as resolve36 } from "path";
22707
22806
  import ts16 from "typescript";
22708
22807
  var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") || file5.endsWith(".tsx"), walkAngularSourceFiles = (root) => {
22709
22808
  const out = [];
@@ -22718,7 +22817,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
22718
22817
  if (entry.name.startsWith(".") || entry.name === "node_modules") {
22719
22818
  continue;
22720
22819
  }
22721
- const full = join39(dir, entry.name);
22820
+ const full = join40(dir, entry.name);
22722
22821
  if (entry.isDirectory()) {
22723
22822
  visit(full);
22724
22823
  } else if (entry.isFile() && isAngularSourceFile(entry.name)) {
@@ -22857,7 +22956,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
22857
22956
  return null;
22858
22957
  }
22859
22958
  const sf = ts16.createSourceFile(childFilePath, source, ts16.ScriptTarget.ES2022, true, ts16.ScriptKind.TS);
22860
- const childDir = dirname22(childFilePath);
22959
+ const childDir = dirname23(childFilePath);
22861
22960
  for (const stmt of sf.statements) {
22862
22961
  if (!ts16.isImportDeclaration(stmt))
22863
22962
  continue;
@@ -22914,7 +23013,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
22914
23013
  const parentFile = new Map;
22915
23014
  for (const tsPath of walkAngularSourceFiles(userAngularRoot)) {
22916
23015
  const classes = parseDecoratedClasses(tsPath);
22917
- const componentDir = dirname22(tsPath);
23016
+ const componentDir = dirname23(tsPath);
22918
23017
  for (const cls of classes) {
22919
23018
  const entity = {
22920
23019
  className: cls.className,
@@ -23091,8 +23190,8 @@ __export(exports_moduleServer, {
23091
23190
  SRC_URL_PREFIX: () => SRC_URL_PREFIX
23092
23191
  });
23093
23192
  import { existsSync as existsSync33, readFileSync as readFileSync28, realpathSync as realpathSync3, statSync as statSync6 } from "fs";
23094
- import { basename as basename14, dirname as dirname23, extname as extname10, join as join40, resolve as resolve37, relative as relative14 } from "path";
23095
- var SRC_PREFIX = "/@src/", jsTranspiler2, tsTranspiler2, tsxTranspiler, TRANSPILABLE, ALL_EXPORTS_RE, STRING_CONTENTS_RE, preserveTypeExports = (originalSource, transpiled, valueExports) => {
23193
+ import { basename as basename14, dirname as dirname24, extname as extname10, join as join41, resolve as resolve37, relative as relative15 } from "path";
23194
+ var SRC_PREFIX = "/@src/", jsTranspiler2, legacyDecoratorTsconfig, tsTranspiler2, tsxTranspiler, TRANSPILABLE, ALL_EXPORTS_RE, STRING_CONTENTS_RE, preserveTypeExports = (originalSource, transpiled, valueExports) => {
23096
23195
  const codeOnly = originalSource.replace(STRING_CONTENTS_RE, '""');
23097
23196
  const allExports = [];
23098
23197
  let match;
@@ -23144,11 +23243,11 @@ ${stubs}
23144
23243
  }
23145
23244
  }, resolveRelativeImport = (relPath, fileDir, projectRoot, extensions) => {
23146
23245
  const absPath = resolve37(fileDir, relPath);
23147
- const rel = relative14(projectRoot, absPath);
23246
+ const rel = relative15(projectRoot, absPath);
23148
23247
  const extension = extname10(rel);
23149
23248
  let srcPath = RESOLVED_MODULE_EXTENSIONS.has(extension) ? rel : resolveRelativeExtension(rel, projectRoot, extensions);
23150
23249
  if (extname10(srcPath) === ".svelte") {
23151
- srcPath = relative14(projectRoot, resolveSvelteModulePath(resolve37(projectRoot, srcPath)));
23250
+ srcPath = relative15(projectRoot, resolveSvelteModulePath(resolve37(projectRoot, srcPath)));
23152
23251
  }
23153
23252
  return srcUrl(srcPath, projectRoot);
23154
23253
  }, NODE_BUILTIN_RE, resolveAbsoluteSpecifier = (specifier, projectRoot) => {
@@ -23160,7 +23259,7 @@ ${stubs}
23160
23259
  "import"
23161
23260
  ]);
23162
23261
  if (fromExports)
23163
- return relative14(projectRoot, fromExports);
23262
+ return relative15(projectRoot, fromExports);
23164
23263
  try {
23165
23264
  const isScoped = specifier.startsWith("@");
23166
23265
  const parts = specifier.split("/");
@@ -23168,19 +23267,19 @@ ${stubs}
23168
23267
  const subpath = isScoped ? parts.slice(2).join("/") : parts.slice(1).join("/");
23169
23268
  if (!subpath) {
23170
23269
  const pkgDir = resolve37(projectRoot, "node_modules", packageName ?? "");
23171
- const pkgJsonPath = join40(pkgDir, "package.json");
23270
+ const pkgJsonPath = join41(pkgDir, "package.json");
23172
23271
  if (existsSync33(pkgJsonPath)) {
23173
23272
  const pkg = JSON.parse(readFileSync28(pkgJsonPath, "utf-8"));
23174
23273
  const esmEntry = typeof pkg.module === "string" && pkg.module || typeof pkg.browser === "string" && pkg.browser;
23175
23274
  if (esmEntry) {
23176
23275
  const resolved = resolve37(pkgDir, esmEntry);
23177
23276
  if (existsSync33(resolved))
23178
- return relative14(projectRoot, resolved);
23277
+ return relative15(projectRoot, resolved);
23179
23278
  }
23180
23279
  }
23181
23280
  }
23182
23281
  } catch {}
23183
- return relative14(projectRoot, Bun.resolveSync(specifier, projectRoot));
23282
+ return relative15(projectRoot, Bun.resolveSync(specifier, projectRoot));
23184
23283
  } catch {
23185
23284
  return;
23186
23285
  }
@@ -23205,28 +23304,28 @@ ${stubs}
23205
23304
  };
23206
23305
  result = result.replace(/^((?:import\s+[^"'`;]+?\s+from|export\s+[^"'`;]+?\s+from|import)\s*["'])([^"'./][^"']*)(["'])/gm, stubReplace);
23207
23306
  result = result.replace(/(import\s*\(\s*["'])([^"'./][^"']*)(["']\s*\))/g, stubReplace);
23208
- const fileDir = dirname23(filePath);
23307
+ const fileDir = dirname24(filePath);
23209
23308
  result = result.replace(/(from\s*["'])(\.\.?\/[^"']+)(["'])/g, (_match, prefix, relPath, suffix) => `${prefix}${resolveRelativeImport(relPath, fileDir, projectRoot, IMPORT_EXTENSIONS)}${suffix}`);
23210
23309
  result = result.replace(/(import\s*\(\s*["'])(\.\.?\/[^"']+)(["']\s*\))/g, (_match, prefix, relPath, suffix) => `${prefix}${resolveRelativeImport(relPath, fileDir, projectRoot, IMPORT_EXTENSIONS)}${suffix}`);
23211
23310
  result = result.replace(/(import\s*["'])(\.\.?\/[^"']+)(["']\s*;?)/g, (_match, prefix, relPath, suffix) => `${prefix}${resolveRelativeImport(relPath, fileDir, projectRoot, SIDE_EFFECT_EXTENSIONS)}${suffix}`);
23212
23311
  const rewriteAbsoluteToSrc = (_match, prefix, absPath, _ext, suffix) => {
23213
23312
  if (absPath.startsWith(projectRoot)) {
23214
- const rel2 = relative14(projectRoot, absPath).replace(/\\/g, "/");
23313
+ const rel2 = relative15(projectRoot, absPath).replace(/\\/g, "/");
23215
23314
  return `${prefix}${srcUrl(rel2, projectRoot)}${suffix}`;
23216
23315
  }
23217
- const rel = relative14(projectRoot, absPath).replace(/\\/g, "/");
23316
+ const rel = relative15(projectRoot, absPath).replace(/\\/g, "/");
23218
23317
  return `${prefix}${srcUrl(rel, projectRoot)}${suffix}`;
23219
23318
  };
23220
23319
  result = result.replace(/((?:from|import)\s*["'])(\/[^"']+\.(tsx?|jsx?|ts))(["'])/g, rewriteAbsoluteToSrc);
23221
23320
  result = result.replace(/(import\s*\(\s*["'])(\/[^"']+\.(tsx?|jsx?|ts))(["']\s*\))/g, rewriteAbsoluteToSrc);
23222
23321
  result = result.replace(/new\s+URL\(\s*["'](\.\.?\/[^"']+)["']\s*,\s*import\.meta\.url\s*\)/g, (_match, relPath) => {
23223
23322
  const absPath = resolve37(fileDir, relPath);
23224
- const rel = relative14(projectRoot, absPath);
23323
+ const rel = relative15(projectRoot, absPath);
23225
23324
  return `new URL('${srcUrl(rel, projectRoot)}', import.meta.url)`;
23226
23325
  });
23227
23326
  result = result.replace(/import\.meta\.resolve\(\s*["'](\.\.?\/[^"']+)["']\s*\)/g, (_match, relPath) => {
23228
23327
  const absPath = resolve37(fileDir, relPath);
23229
- const rel = relative14(projectRoot, absPath);
23328
+ const rel = relative15(projectRoot, absPath);
23230
23329
  return `'${srcUrl(rel, projectRoot)}'`;
23231
23330
  });
23232
23331
  return result;
@@ -23282,7 +23381,7 @@ ${code}`;
23282
23381
  transpiled = `var $RefreshReg$ = window.$RefreshReg$ || function(){};
23283
23382
  ` + `var $RefreshSig$ = window.$RefreshSig$ || function(){ return function(t){ return t; }; };
23284
23383
  ${transpiled}`;
23285
- const relPath = relative14(projectRoot, filePath).replace(/\\/g, "/");
23384
+ const relPath = relative15(projectRoot, filePath).replace(/\\/g, "/");
23286
23385
  transpiled = transpiled.replace(/\binput\.tsx:/g, `${relPath}:`);
23287
23386
  transpiled += buildIslandMetadataExports(raw);
23288
23387
  return rewriteImports(transpiled, filePath, projectRoot, rewriter);
@@ -23443,11 +23542,11 @@ ${code}`;
23443
23542
  if (compiled.css?.code) {
23444
23543
  const cssPath = `${filePath}.css`;
23445
23544
  svelteExternalCss.set(cssPath, compiled.css.code);
23446
- const cssUrl = srcUrl(relative14(projectRoot, cssPath), projectRoot);
23545
+ const cssUrl = srcUrl(relative15(projectRoot, cssPath), projectRoot);
23447
23546
  code = `import "${cssUrl}";
23448
23547
  ${code}`;
23449
23548
  }
23450
- const moduleUrl = `${SRC_PREFIX}${relative14(projectRoot, filePath).replace(/\\/g, "/")}`;
23549
+ const moduleUrl = `${SRC_PREFIX}${relative15(projectRoot, filePath).replace(/\\/g, "/")}`;
23451
23550
  code = code.replace(/if\s*\(import\.meta\.hot\)\s*\{/, `if (typeof window !== "undefined") {
23452
23551
  ` + ` if (!window.__SVELTE_HMR_ACCEPT__) window.__SVELTE_HMR_ACCEPT__ = {};
23453
23552
  ` + ` var __hmr_accept = function(cb) { window.__SVELTE_HMR_ACCEPT__[${JSON.stringify(moduleUrl)}] = cb; };`);
@@ -23548,7 +23647,7 @@ ${code}`;
23548
23647
  return rewriteImports(code, filePath, projectRoot, rewriter);
23549
23648
  }, injectVueHmr = (code, filePath, projectRoot, vueDir) => {
23550
23649
  const hmrBase = vueDir ? resolve37(vueDir) : projectRoot;
23551
- const hmrId = relative14(hmrBase, filePath).replace(/\\/g, "/").replace(/\.vue$/, "");
23650
+ const hmrId = relative15(hmrBase, filePath).replace(/\\/g, "/").replace(/\.vue$/, "");
23552
23651
  let result = code.replace(/export\s+default\s+/, "var __hmr_comp__ = ");
23553
23652
  result += [
23554
23653
  "",
@@ -23894,13 +23993,21 @@ var init_moduleServer = __esm(() => {
23894
23993
  loader: "js",
23895
23994
  trimUnusedImports: true
23896
23995
  });
23996
+ legacyDecoratorTsconfig = JSON.stringify({
23997
+ compilerOptions: {
23998
+ emitDecoratorMetadata: true,
23999
+ experimentalDecorators: true
24000
+ }
24001
+ });
23897
24002
  tsTranspiler2 = new Bun.Transpiler({
23898
24003
  loader: "ts",
23899
- trimUnusedImports: true
24004
+ trimUnusedImports: true,
24005
+ tsconfig: legacyDecoratorTsconfig
23900
24006
  });
23901
24007
  tsxTranspiler = new Bun.Transpiler({
23902
24008
  loader: "tsx",
23903
- trimUnusedImports: true
24009
+ trimUnusedImports: true,
24010
+ tsconfig: legacyDecoratorTsconfig
23904
24011
  });
23905
24012
  TRANSPILABLE = new Set([".ts", ".tsx", ".js", ".jsx", ".mjs"]);
23906
24013
  ALL_EXPORTS_RE = /export\s+(?:type|interface|const|let|var|function|class|enum|abstract\s+class)\s+(\w+)/g;
@@ -23959,6 +24066,9 @@ export function __legacyMetadataTS(k, v) {
23959
24066
  return Reflect.metadata(k, v);
23960
24067
  }
23961
24068
  }
24069
+ export function __legacyDecorateParamTS(paramIndex, decorator) {
24070
+ return function (target, key) { decorator(target, key, paramIndex); };
24071
+ }
23962
24072
  `.trim();
23963
24073
  SRC_IMPORT_RE = /\/@src\/([^"'?\s]+)/g;
23964
24074
  SRC_URL_PREFIX = SRC_PREFIX;
@@ -24010,7 +24120,7 @@ __export(exports_hmrCompiler, {
24010
24120
  getApplyMetadataModule: () => getApplyMetadataModule,
24011
24121
  encodeHmrComponentId: () => encodeHmrComponentId
24012
24122
  });
24013
- import { dirname as dirname24, relative as relative15, resolve as resolve38 } from "path";
24123
+ import { dirname as dirname25, relative as relative16, resolve as resolve38 } from "path";
24014
24124
  import { performance as performance2 } from "perf_hooks";
24015
24125
  var getApplyMetadataModule = async (encodedId) => {
24016
24126
  const decoded = decodeURIComponent(encodedId);
@@ -24020,7 +24130,7 @@ var getApplyMetadataModule = async (encodedId) => {
24020
24130
  const filePathRel = decoded.slice(0, at2);
24021
24131
  const className = decoded.slice(at2 + 1);
24022
24132
  const componentFilePath = resolve38(process.cwd(), filePathRel);
24023
- const projectRelPath = relative15(process.cwd(), componentFilePath).replace(/\\/g, "/");
24133
+ const projectRelPath = relative16(process.cwd(), componentFilePath).replace(/\\/g, "/");
24024
24134
  const cacheKey2 = encodeURIComponent(`${projectRelPath}@${className}`);
24025
24135
  const { takePendingModule: takePendingModule2 } = await Promise.resolve().then(() => (init_fastHmrCompiler(), exports_fastHmrCompiler));
24026
24136
  const cached = takePendingModule2(cacheKey2);
@@ -24030,7 +24140,7 @@ var getApplyMetadataModule = async (encodedId) => {
24030
24140
  const { resolveOwningComponents: resolveOwningComponents2 } = await Promise.resolve().then(() => (init_resolveOwningComponents(), exports_resolveOwningComponents));
24031
24141
  const owners = resolveOwningComponents2({
24032
24142
  changedFilePath: componentFilePath,
24033
- userAngularRoot: dirname24(componentFilePath)
24143
+ userAngularRoot: dirname25(componentFilePath)
24034
24144
  });
24035
24145
  const owner = owners.find((o3) => o3.className === className);
24036
24146
  const kind = owner?.kind ?? "component";
@@ -24042,7 +24152,7 @@ var getApplyMetadataModule = async (encodedId) => {
24042
24152
  }
24043
24153
  return null;
24044
24154
  }, encodeHmrComponentId = (absoluteFilePath, className) => {
24045
- const projectRel = relative15(process.cwd(), absoluteFilePath).replace(/\\/g, "/");
24155
+ const projectRel = relative16(process.cwd(), absoluteFilePath).replace(/\\/g, "/");
24046
24156
  return `${projectRel}@${className}`;
24047
24157
  };
24048
24158
  var init_hmrCompiler = __esm(() => {
@@ -24238,7 +24348,7 @@ var init_simpleHTMXHMR = () => {};
24238
24348
 
24239
24349
  // src/dev/rebuildTrigger.ts
24240
24350
  import { existsSync as existsSync34, rmSync as rmSync3 } from "fs";
24241
- import { basename as basename15, dirname as dirname25, join as join41, relative as relative16, resolve as resolve41, sep as sep4 } from "path";
24351
+ import { basename as basename15, dirname as dirname26, join as join42, relative as relative17, resolve as resolve41, sep as sep4 } from "path";
24242
24352
  var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequentially = (items, action) => items.reduce((chain, item) => chain.then(() => action(item)), Promise.resolve()), getStyleTransformConfig = (config) => createStyleTransformConfig(config.stylePreprocessors, config.postcss), recompileTailwindForFastPath = async (state, config, files) => {
24243
24353
  if (!config.tailwind)
24244
24354
  return;
@@ -24355,8 +24465,8 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24355
24465
  const relJs = `${rel.slice(0, -ext[0].length)}.js`;
24356
24466
  const generatedDir = getFrameworkGeneratedDir(framework, cwd2);
24357
24467
  for (const candidate of [
24358
- join41(generatedDir, relJs),
24359
- `${join41(generatedDir, relJs)}.map`
24468
+ join42(generatedDir, relJs),
24469
+ `${join42(generatedDir, relJs)}.map`
24360
24470
  ]) {
24361
24471
  try {
24362
24472
  rmSync3(candidate, { force: true });
@@ -24560,15 +24670,15 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24560
24670
  const relFromDir = normalizedSource.slice(normalizedDir.length + 1);
24561
24671
  const buildDir = state.resolvedPaths.buildDir;
24562
24672
  const destPath = resolve41(buildDir, urlPrefix ? `${urlPrefix}/${relFromDir}` : relFromDir);
24563
- const { mkdir: mkdir7, copyFile, readFile: readFile6 } = await import("fs/promises");
24564
- const { dirname: dirname26 } = await import("path");
24565
- await mkdir7(dirname26(destPath), { recursive: true });
24673
+ const { mkdir: mkdir8, copyFile, readFile: readFile6 } = await import("fs/promises");
24674
+ const { dirname: dirname27 } = await import("path");
24675
+ await mkdir8(dirname27(destPath), { recursive: true });
24566
24676
  await copyFile(absSource, destPath);
24567
24677
  const bytes = await readFile6(destPath);
24568
24678
  const webPath = urlPrefix ? `/${urlPrefix}/${relFromDir}` : `/${relFromDir}`;
24569
24679
  state.assetStore.set(webPath, new Uint8Array(bytes));
24570
24680
  state.fileHashes.set(absSource, currentHash);
24571
- logHmrUpdate(relative16(process.cwd(), filePath));
24681
+ logHmrUpdate(relative17(process.cwd(), filePath));
24572
24682
  broadcastToClients(state, {
24573
24683
  data: {
24574
24684
  framework: urlPrefix || "public",
@@ -24586,7 +24696,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24586
24696
  return;
24587
24697
  if (framework === "unknown") {
24588
24698
  invalidate(resolve41(filePath));
24589
- const relPath = relative16(process.cwd(), filePath);
24699
+ const relPath = relative17(process.cwd(), filePath);
24590
24700
  logHmrUpdate(relPath);
24591
24701
  const angularDir = state.resolvedPaths.angularDir;
24592
24702
  let hasAngularDependent = false;
@@ -24761,7 +24871,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24761
24871
  const keepByDir = new Map;
24762
24872
  const prefixByDir = new Map;
24763
24873
  for (const artifact of freshOutputs) {
24764
- const dir = dirname25(artifact.path);
24874
+ const dir = dirname26(artifact.path);
24765
24875
  const name = basename15(artifact.path);
24766
24876
  const [prefix] = name.split(".");
24767
24877
  if (!prefix)
@@ -25174,7 +25284,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25174
25284
  try {
25175
25285
  const { invalidateModule: invalidateModule2 } = await Promise.resolve().then(() => (init_moduleServer(), exports_moduleServer));
25176
25286
  for (const tsFile of tsFilesToRefresh) {
25177
- const rel = relative16(angularDirAbs, tsFile).replace(/\\/g, "/").replace(/\.[tj]sx?$/, ".js");
25287
+ const rel = relative17(angularDirAbs, tsFile).replace(/\\/g, "/").replace(/\.[tj]sx?$/, ".js");
25178
25288
  const compiledFile = resolve41(compiledRoot, rel);
25179
25289
  invalidateModule2(compiledFile);
25180
25290
  }
@@ -25215,12 +25325,12 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25215
25325
  try {
25216
25326
  const { primeComponentFingerprint: primeComponentFingerprint2 } = await Promise.resolve().then(() => (init_fastHmrCompiler(), exports_fastHmrCompiler));
25217
25327
  const { readdir: readdir5 } = await import("fs/promises");
25218
- const { join: join42 } = await import("path");
25328
+ const { join: join43 } = await import("path");
25219
25329
  const walk = async (dir) => {
25220
25330
  const entries = await readdir5(dir, { withFileTypes: true });
25221
25331
  const files = [];
25222
25332
  for (const entry of entries) {
25223
- const full = join42(dir, entry.name);
25333
+ const full = join43(dir, entry.name);
25224
25334
  if (entry.isDirectory()) {
25225
25335
  files.push(...await walk(full));
25226
25336
  } else if (entry.isFile() && entry.name.endsWith(".ts") && !entry.name.endsWith(".d.ts")) {
@@ -25320,7 +25430,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25320
25430
  }, getModuleUrl = async (pageFile) => {
25321
25431
  const { invalidateModule: invalidateModule2, warmCache: warmCache2, SRC_URL_PREFIX: SRC_URL_PREFIX2 } = await Promise.resolve().then(() => (init_moduleServer(), exports_moduleServer));
25322
25432
  invalidateModule2(pageFile);
25323
- const rel = relative16(process.cwd(), pageFile).replace(/\\/g, "/");
25433
+ const rel = relative17(process.cwd(), pageFile).replace(/\\/g, "/");
25324
25434
  const url = `${SRC_URL_PREFIX2}${rel}`;
25325
25435
  warmCache2(url);
25326
25436
  return url;
@@ -25351,7 +25461,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25351
25461
  const pageModuleUrl = await getReactModuleUrl(broadcastTarget);
25352
25462
  if (pageModuleUrl) {
25353
25463
  const serverDuration = Date.now() - startTime;
25354
- state.lastHmrPath = relative16(process.cwd(), primaryFile).replace(/\\/g, "/");
25464
+ state.lastHmrPath = relative17(process.cwd(), primaryFile).replace(/\\/g, "/");
25355
25465
  state.lastHmrFramework = "react";
25356
25466
  broadcastToClients(state, {
25357
25467
  data: {
@@ -25686,7 +25796,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25686
25796
  const { vueServerPaths, vueIndexPaths, vueClientPaths, vueCssPaths } = await compileVue2(vueFiles, vueDir, true, getStyleTransformConfig(state.config));
25687
25797
  const serverEntries = [...vueServerPaths];
25688
25798
  const clientEntries = [...vueIndexPaths, ...vueClientPaths];
25689
- const cssOutDir = join41(buildDir, state.resolvedPaths.assetsDir ? basename15(state.resolvedPaths.assetsDir) : "assets", "css");
25799
+ const cssOutDir = join42(buildDir, state.resolvedPaths.assetsDir ? basename15(state.resolvedPaths.assetsDir) : "assets", "css");
25690
25800
  const { serverRoot, serverOutDir } = await computeServerOutPaths(state.resolvedPaths, "vue");
25691
25801
  const [serverResult, clientResult, cssResult] = await Promise.all([
25692
25802
  serverEntries.length > 0 ? bunBuild9({
@@ -25842,7 +25952,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25842
25952
  const duration = Date.now() - startTime;
25843
25953
  const [primary] = emberFiles;
25844
25954
  if (primary) {
25845
- state.lastHmrPath = relative16(process.cwd(), primary).replace(/\\/g, "/");
25955
+ state.lastHmrPath = relative17(process.cwd(), primary).replace(/\\/g, "/");
25846
25956
  state.lastHmrFramework = "ember";
25847
25957
  logHmrUpdate(primary, "ember", duration);
25848
25958
  }
@@ -25927,7 +26037,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25927
26037
  if (!buildReference?.source) {
25928
26038
  return;
25929
26039
  }
25930
- const sourcePath = buildReference.source.startsWith("file://") ? new URL(buildReference.source).pathname : resolve41(dirname25(buildInfo.resolvedRegistryPath), buildReference.source);
26040
+ const sourcePath = buildReference.source.startsWith("file://") ? new URL(buildReference.source).pathname : resolve41(dirname26(buildInfo.resolvedRegistryPath), buildReference.source);
25931
26041
  islandFiles.add(resolve41(sourcePath));
25932
26042
  }, resolveIslandSourceFiles = async (config) => {
25933
26043
  const registryPath = config.islands?.registry;
@@ -26085,7 +26195,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
26085
26195
  const baseName = fileName.replace(/\.vue$/, "");
26086
26196
  const pascalName = toPascal(baseName);
26087
26197
  const vueRoot = config.vueDirectory;
26088
- const hmrId = vueRoot ? relative16(vueRoot, vuePagePath).replace(/\\/g, "/").replace(/\.vue$/, "") : baseName;
26198
+ const hmrId = vueRoot ? relative17(vueRoot, vuePagePath).replace(/\\/g, "/").replace(/\.vue$/, "") : baseName;
26089
26199
  const cssKey = `${pascalName}CSS`;
26090
26200
  const cssUrl = manifest[cssKey] || null;
26091
26201
  const { vueHmrMetadata: vueHmrMetadata2 } = await Promise.resolve().then(() => (init_compileVue(), exports_compileVue));
@@ -26681,7 +26791,7 @@ __export(exports_buildDepVendor, {
26681
26791
  buildDepVendor: () => buildDepVendor
26682
26792
  });
26683
26793
  import { mkdirSync as mkdirSync14 } from "fs";
26684
- import { join as join42 } from "path";
26794
+ import { join as join43 } from "path";
26685
26795
  import { rm as rm10 } from "fs/promises";
26686
26796
  var {build: bunBuild9, Glob: Glob10 } = globalThis.Bun;
26687
26797
  var toSafeFileName6 = (specifier) => {
@@ -26792,7 +26902,7 @@ var toSafeFileName6 = (specifier) => {
26792
26902
  }), buildDepVendorPass = async (specifiers, vendorDir, tmpDir) => {
26793
26903
  const entries = await Promise.all(specifiers.map(async (specifier) => {
26794
26904
  const safeName = toSafeFileName6(specifier);
26795
- const entryPath = join42(tmpDir, `${safeName}.ts`);
26905
+ const entryPath = join43(tmpDir, `${safeName}.ts`);
26796
26906
  await Bun.write(entryPath, await generateVendorEntrySource(specifier));
26797
26907
  return { entryPath, specifier };
26798
26908
  }));
@@ -26853,9 +26963,9 @@ var toSafeFileName6 = (specifier) => {
26853
26963
  const { dep: initialSpecs, framework: frameworkRoots } = await scanBareImports(directories);
26854
26964
  if (initialSpecs.length === 0 && frameworkRoots.length === 0)
26855
26965
  return {};
26856
- const vendorDir = join42(buildDir, "vendor");
26966
+ const vendorDir = join43(buildDir, "vendor");
26857
26967
  mkdirSync14(vendorDir, { recursive: true });
26858
- const tmpDir = join42(buildDir, "_dep_vendor_tmp");
26968
+ const tmpDir = join43(buildDir, "_dep_vendor_tmp");
26859
26969
  mkdirSync14(tmpDir, { recursive: true });
26860
26970
  const allSpecs = new Set(initialSpecs);
26861
26971
  const alreadyScanned = new Set;
@@ -27556,12 +27666,12 @@ __export(exports_devtoolsJson, {
27556
27666
  devtoolsJson: () => devtoolsJson
27557
27667
  });
27558
27668
  import { existsSync as existsSync35, mkdirSync as mkdirSync15, readFileSync as readFileSync29, writeFileSync as writeFileSync10 } from "fs";
27559
- import { dirname as dirname26, join as join43, resolve as resolve43 } from "path";
27669
+ import { dirname as dirname27, join as join44, resolve as resolve43 } from "path";
27560
27670
  import { Elysia as Elysia3 } from "elysia";
27561
27671
  var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_KEY = "__absoluteDevtoolsWorkspaceUuid", getGlobalUuid = () => Reflect.get(globalThis, UUID_CACHE_KEY), setGlobalUuid = (uuid) => {
27562
27672
  Reflect.set(globalThis, UUID_CACHE_KEY, uuid);
27563
27673
  return uuid;
27564
- }, isUuidV4 = (value) => /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(value), resolveDevtoolsUuidCachePath = (buildDir, uuidCachePath) => resolve43(uuidCachePath ?? join43(buildDir, ".absolute", "chrome-devtools-workspace-uuid")), readCachedUuid = (cachePath) => {
27674
+ }, isUuidV4 = (value) => /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(value), resolveDevtoolsUuidCachePath = (buildDir, uuidCachePath) => resolve43(uuidCachePath ?? join44(buildDir, ".absolute", "chrome-devtools-workspace-uuid")), readCachedUuid = (cachePath) => {
27565
27675
  if (!existsSync35(cachePath))
27566
27676
  return null;
27567
27677
  try {
@@ -27583,7 +27693,7 @@ var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_K
27583
27693
  if (cachedUuid)
27584
27694
  return setGlobalUuid(cachedUuid);
27585
27695
  const uuid = crypto.randomUUID();
27586
- mkdirSync15(dirname26(cachePath), { recursive: true });
27696
+ mkdirSync15(dirname27(cachePath), { recursive: true });
27587
27697
  writeFileSync10(cachePath, uuid, "utf-8");
27588
27698
  return setGlobalUuid(uuid);
27589
27699
  }, devtoolsJson = (buildDir, options = {}) => {
@@ -27600,11 +27710,11 @@ var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_K
27600
27710
  if (process.env.WSL_DISTRO_NAME) {
27601
27711
  const distro = process.env.WSL_DISTRO_NAME;
27602
27712
  const withoutLeadingSlash = root.replace(/^\//, "");
27603
- return join43("\\\\wsl.localhost", distro, withoutLeadingSlash).replace(/\//g, "\\");
27713
+ return join44("\\\\wsl.localhost", distro, withoutLeadingSlash).replace(/\//g, "\\");
27604
27714
  }
27605
27715
  if (process.env.DOCKER_DESKTOP && !root.startsWith("\\\\")) {
27606
27716
  const withoutLeadingSlash = root.replace(/^\//, "");
27607
- return join43("\\\\wsl.localhost", "docker-desktop-data", withoutLeadingSlash).replace(/\//g, "\\");
27717
+ return join44("\\\\wsl.localhost", "docker-desktop-data", withoutLeadingSlash).replace(/\//g, "\\");
27608
27718
  }
27609
27719
  return root;
27610
27720
  };
@@ -27836,7 +27946,7 @@ __export(exports_prerender, {
27836
27946
  PRERENDER_BYPASS_HEADER: () => PRERENDER_BYPASS_HEADER
27837
27947
  });
27838
27948
  import { mkdirSync as mkdirSync16, readFileSync as readFileSync30 } from "fs";
27839
- import { join as join44 } from "path";
27949
+ import { join as join45 } from "path";
27840
27950
  var SERVER_OUTPUT_LIMIT = 4000, STARTUP_POLL_INTERVAL_MS = 100, DEFAULT_STARTUP_TIMEOUT_MS = 30000, PRERENDER_BYPASS_HEADER = "X-Absolute-Prerender-Bypass", routeToFilename = (route) => route === "/" ? "index.html" : `${route.slice(1).replace(/\//g, "-")}.html`, writeTimestamp = async (htmlPath) => {
27841
27951
  const metaPath = htmlPath.replace(/\.html$/, ".meta");
27842
27952
  await Bun.write(metaPath, String(Date.now()));
@@ -27902,7 +28012,7 @@ var SERVER_OUTPUT_LIMIT = 4000, STARTUP_POLL_INTERVAL_MS = 100, DEFAULT_STARTUP_
27902
28012
  return false;
27903
28013
  const html = await res.text();
27904
28014
  const fileName = routeToFilename(route);
27905
- const filePath = join44(prerenderDir, fileName);
28015
+ const filePath = join45(prerenderDir, fileName);
27906
28016
  await Bun.write(filePath, html);
27907
28017
  await writeTimestamp(filePath);
27908
28018
  return true;
@@ -27928,13 +28038,13 @@ var SERVER_OUTPUT_LIMIT = 4000, STARTUP_POLL_INTERVAL_MS = 100, DEFAULT_STARTUP_
27928
28038
  }
27929
28039
  const html = await res.text();
27930
28040
  const fileName = routeToFilename(route);
27931
- const filePath = join44(prerenderDir, fileName);
28041
+ const filePath = join45(prerenderDir, fileName);
27932
28042
  await Bun.write(filePath, html);
27933
28043
  await writeTimestamp(filePath);
27934
28044
  result.routes.set(route, filePath);
27935
28045
  log2?.(` Pre-rendered ${route} \u2192 ${fileName} (${html.length} bytes)`);
27936
28046
  }, prerender = async (port, outDir, staticConfig, log2) => {
27937
- const prerenderDir = join44(outDir, "_prerendered");
28047
+ const prerenderDir = join45(outDir, "_prerendered");
27938
28048
  mkdirSync16(prerenderDir, { recursive: true });
27939
28049
  const baseUrl = `http://localhost:${port}`;
27940
28050
  let routes;
@@ -28036,7 +28146,7 @@ __export(exports_serverEntryWatcher, {
28036
28146
  });
28037
28147
  import { existsSync as existsSync39, statSync as statSync8, watch as watch2 } from "fs";
28038
28148
  import { createRequire as createRequire2 } from "module";
28039
- import { dirname as dirname27, join as join48, resolve as resolve46 } from "path";
28149
+ import { dirname as dirname28, join as join49, resolve as resolve46 } from "path";
28040
28150
  var ATOMIC_RECOVERY_WINDOW_MS = 1000, RELOAD_DEBOUNCE_MS = 80, ATOMIC_WRITE_TEMP_PATTERNS2, isAtomicWriteTemp = (filename) => filename.endsWith(".tmp") || filename.includes(".tmp.") || filename.endsWith("~") || filename.startsWith(".#") || ATOMIC_WRITE_TEMP_PATTERNS2.some((re2) => re2.test(filename)), startServerEntryWatcher = () => {
28041
28151
  if (globalThis.__absoluteEntryWatcherStarted)
28042
28152
  return;
@@ -28045,10 +28155,10 @@ var ATOMIC_RECOVERY_WINDOW_MS = 1000, RELOAD_DEBOUNCE_MS = 80, ATOMIC_WRITE_TEMP
28045
28155
  return;
28046
28156
  globalThis.__absoluteEntryWatcherStarted = true;
28047
28157
  const entryPath = resolve46(main);
28048
- const entryDir = dirname27(entryPath);
28158
+ const entryDir = dirname28(entryPath);
28049
28159
  const entryBase = entryPath.slice(entryDir.length + 1);
28050
28160
  const configPath2 = resolve46(process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
28051
- const configDir2 = dirname27(configPath2);
28161
+ const configDir2 = dirname28(configPath2);
28052
28162
  const configBase = configPath2.slice(configDir2.length + 1);
28053
28163
  const recentlyHandled = new Map;
28054
28164
  let entryReloadTimer = null;
@@ -28139,7 +28249,7 @@ var ATOMIC_RECOVERY_WINDOW_MS = 1000, RELOAD_DEBOUNCE_MS = 80, ATOMIC_WRITE_TEMP
28139
28249
  continue;
28140
28250
  let st2;
28141
28251
  try {
28142
- st2 = statSync8(join48(dir, entry.name));
28252
+ st2 = statSync8(join49(dir, entry.name));
28143
28253
  } catch {
28144
28254
  continue;
28145
28255
  }
@@ -28397,7 +28507,6 @@ init_staticIslandPages();
28397
28507
  var {file } = globalThis.Bun;
28398
28508
 
28399
28509
  // src/core/islandPageContext.ts
28400
- init_constants();
28401
28510
  var BOOTSTRAP_MANIFEST_KEY = "BootstrapClient";
28402
28511
  var ISLAND_MARKER = 'data-island="true"';
28403
28512
  var MANIFEST_MARKER = "__ABSOLUTE_MANIFEST__";
@@ -28518,61 +28627,69 @@ var pipeStreamWithHeadInjection = (stream, markup) => {
28518
28627
  var pipeStreamWithIslandMarkerDetection = (stream, markup) => {
28519
28628
  const encoder = new TextEncoder;
28520
28629
  const decoder = new TextDecoder;
28521
- const lookbehind = Math.max(ISLAND_MARKER.length, BYTES_PER_KILOBYTE);
28522
- const processPending = (controller, pending, injected) => {
28523
- if (injected) {
28524
- controller.enqueue(encoder.encode(pending));
28525
- return { injected, pending: "" };
28630
+ const headLookbehind = CLOSING_HEAD_TAG2.length - 1;
28631
+ const enqueue = (controller, text) => {
28632
+ if (text.length > 0) {
28633
+ controller.enqueue(encoder.encode(text));
28526
28634
  }
28527
- const markerIndex = pending.indexOf(ISLAND_MARKER);
28528
- if (markerIndex >= 0) {
28529
- const tagStart = pending.lastIndexOf("<", markerIndex);
28530
- const injectAt = tagStart >= 0 ? tagStart : markerIndex;
28531
- const next = `${pending.slice(0, injectAt)}${markup}${pending.slice(injectAt)}`;
28532
- controller.enqueue(encoder.encode(next));
28533
- return { injected: true, pending: "" };
28635
+ };
28636
+ const processHolding = (controller, held) => {
28637
+ if (!held.includes(ISLAND_MARKER)) {
28638
+ return { held, injected: false, pending: "", sawHead: true };
28534
28639
  }
28535
- return {
28536
- injected,
28537
- pending: flushSafePendingText(controller, encoder, pending, lookbehind)
28538
- };
28640
+ enqueue(controller, `${markup}${held}`);
28641
+ return { held: "", injected: true, pending: "", sawHead: true };
28539
28642
  };
28540
- const finishIslandMarkerStream = (controller, pending) => {
28541
- const finalPending = pending + decoder.decode();
28542
- if (finalPending.length > 0) {
28543
- controller.enqueue(encoder.encode(finalPending));
28643
+ const processHead = (controller, pending) => {
28644
+ const headIndex = pending.indexOf(CLOSING_HEAD_TAG2);
28645
+ if (headIndex < 0) {
28646
+ return {
28647
+ held: "",
28648
+ injected: false,
28649
+ pending: flushSafePendingText(controller, encoder, pending, headLookbehind),
28650
+ sawHead: false
28651
+ };
28544
28652
  }
28545
- controller.close();
28653
+ enqueue(controller, pending.slice(0, headIndex));
28654
+ return processHolding(controller, pending.slice(headIndex));
28546
28655
  };
28547
- const consumeIslandChunk = async (controller, reader, pending, injected) => {
28548
- const { done, value } = await readStreamChunk(reader);
28549
- if (done || !value) {
28550
- return { done, injected, pending };
28656
+ const processChunk = (controller, state, chunk) => {
28657
+ if (state.injected) {
28658
+ enqueue(controller, chunk);
28659
+ return state;
28551
28660
  }
28552
- const processed = processPending(controller, pending + streamChunkToString2(value, decoder), injected);
28553
- return {
28554
- done,
28555
- injected: processed.injected,
28556
- pending: processed.pending
28557
- };
28661
+ if (!state.sawHead) {
28662
+ return processHead(controller, state.pending + chunk);
28663
+ }
28664
+ return processHolding(controller, state.held + chunk);
28558
28665
  };
28559
- const runIslandMarkerLoop = async (controller, reader) => {
28560
- const consumeNextIslandChunk = async (injected, pending) => {
28561
- const consumed = await consumeIslandChunk(controller, reader, pending, injected);
28562
- const nextState = updateInjectedState(consumed, injected, pending);
28563
- if (nextState.done) {
28564
- return { injected, pending };
28666
+ const finishMarkerStream = (controller, state) => {
28667
+ const tail = decoder.decode();
28668
+ const remainder = state.injected ? tail : (state.sawHead ? state.held : state.pending) + tail;
28669
+ enqueue(controller, remainder);
28670
+ controller.close();
28671
+ };
28672
+ const runMarkerLoop = (controller, reader) => {
28673
+ const consumeNext = async (state) => {
28674
+ const { done, value } = await readStreamChunk(reader);
28675
+ if (done || !value) {
28676
+ return state;
28565
28677
  }
28566
- return consumeNextIslandChunk(nextState.injected, nextState.pending);
28678
+ return consumeNext(processChunk(controller, state, streamChunkToString2(value, decoder)));
28567
28679
  };
28568
- return consumeNextIslandChunk(false, "");
28680
+ return consumeNext({
28681
+ held: "",
28682
+ injected: false,
28683
+ pending: "",
28684
+ sawHead: false
28685
+ });
28569
28686
  };
28570
28687
  return new ReadableStream({
28571
28688
  async start(controller) {
28572
28689
  const reader = stream.getReader();
28573
28690
  try {
28574
- const { pending } = await runIslandMarkerLoop(controller, reader);
28575
- finishIslandMarkerStream(controller, pending);
28691
+ const finalState = await runMarkerLoop(controller, reader);
28692
+ finishMarkerStream(controller, finalState);
28576
28693
  } catch (error) {
28577
28694
  controller.error(error);
28578
28695
  }
@@ -28695,12 +28812,12 @@ var handleHTMXPageRequest = async (pagePath) => {
28695
28812
  // src/core/prepare.ts
28696
28813
  init_loadConfig();
28697
28814
  import { existsSync as existsSync37, readdirSync as readdirSync8, readFileSync as readFileSync31 } from "fs";
28698
- import { basename as basename16, join as join45, relative as relative17, resolve as resolve45 } from "path";
28815
+ import { basename as basename16, join as join46, relative as relative18, resolve as resolve45 } from "path";
28699
28816
  import { Elysia as Elysia5 } from "elysia";
28700
28817
 
28701
28818
  // src/core/loadIslandRegistry.ts
28702
28819
  init_islandEntries();
28703
- import { resolve as resolve10 } from "path";
28820
+ import { resolve as resolve11 } from "path";
28704
28821
  var isRecord6 = (value) => typeof value === "object" && value !== null;
28705
28822
  var resolveRegistryExport2 = (mod) => {
28706
28823
  if (isRecord6(mod.islandRegistry))
@@ -28712,7 +28829,7 @@ var resolveRegistryExport2 = (mod) => {
28712
28829
  var isRegistryModuleExport = (value) => isRecord6(value);
28713
28830
  var isIslandRegistryInput = (value) => isRecord6(value);
28714
28831
  var loadIslandRegistry = async (registryPath) => {
28715
- const resolvedRegistryPath = resolve10(registryPath);
28832
+ const resolvedRegistryPath = resolve11(registryPath);
28716
28833
  const buildInfo = await loadIslandRegistryBuildInfo(resolvedRegistryPath);
28717
28834
  if (buildInfo.definitions.length > 0) {
28718
28835
  return buildInfo.registry;
@@ -29068,7 +29185,7 @@ var warmPrewarmDirs = async (prewarmDirs, warmCache2, SRC_URL_PREFIX2) => {
29068
29185
  for (const file5 of files) {
29069
29186
  if (file5.includes("/node_modules/"))
29070
29187
  continue;
29071
- const rel = relative17(process.cwd(), file5).replace(/\\/g, "/");
29188
+ const rel = relative18(process.cwd(), file5).replace(/\\/g, "/");
29072
29189
  warmCache2(`${SRC_URL_PREFIX2}${rel}`);
29073
29190
  }
29074
29191
  };
@@ -29096,7 +29213,7 @@ var patchManifestIndexes = (manifest, devIndexDir, SRC_URL_PREFIX2) => {
29096
29213
  const srcPath = resolve45(devIndexDir, fileName);
29097
29214
  if (!existsSync37(srcPath))
29098
29215
  continue;
29099
- const rel = relative17(process.cwd(), srcPath).replace(/\\/g, "/");
29216
+ const rel = relative18(process.cwd(), srcPath).replace(/\\/g, "/");
29100
29217
  manifest[key] = `${SRC_URL_PREFIX2}${rel}`;
29101
29218
  }
29102
29219
  };
@@ -29215,7 +29332,7 @@ var loadPrerenderMap = (prerenderDir) => {
29215
29332
  continue;
29216
29333
  const name = basename16(entry, ".html");
29217
29334
  const route = name === "index" ? "/" : `/${name}`;
29218
- map.set(route, join45(prerenderDir, entry));
29335
+ map.set(route, join46(prerenderDir, entry));
29219
29336
  }
29220
29337
  return map;
29221
29338
  };
@@ -29275,7 +29392,7 @@ var prepare = async (configOrPath) => {
29275
29392
  setCurrentPageIslandMetadata(await loadPageIslandMetadata(config));
29276
29393
  recordStep("load production manifest and island metadata", stepStartedAt);
29277
29394
  stepStartedAt = performance.now();
29278
- const conventionsPath = join45(buildDir, "conventions.json");
29395
+ const conventionsPath = join46(buildDir, "conventions.json");
29279
29396
  if (existsSync37(conventionsPath)) {
29280
29397
  const conventions2 = JSON.parse(readFileSync31(conventionsPath, "utf-8"));
29281
29398
  setConventions(conventions2);
@@ -29289,12 +29406,12 @@ var prepare = async (configOrPath) => {
29289
29406
  prefix: "",
29290
29407
  staticLimit: MAX_STATIC_ROUTE_COUNT
29291
29408
  });
29292
- const generatedAssetsRoot = join45(buildDir, ".absolutejs");
29409
+ const generatedAssetsRoot = join46(buildDir, ".absolutejs");
29293
29410
  const generatedAssetsPlugin = new Elysia5({
29294
29411
  name: "absolutejs-generated-assets"
29295
29412
  }).get("/.absolutejs/*", async ({ params, set }) => {
29296
29413
  const requestedPath = resolve45(generatedAssetsRoot, params["*"]);
29297
- if (relative17(generatedAssetsRoot, requestedPath).startsWith("..")) {
29414
+ if (relative18(generatedAssetsRoot, requestedPath).startsWith("..")) {
29298
29415
  set.status = 404;
29299
29416
  return "Not Found";
29300
29417
  }
@@ -29308,7 +29425,7 @@ var prepare = async (configOrPath) => {
29308
29425
  });
29309
29426
  recordStep("create static plugin", stepStartedAt);
29310
29427
  stepStartedAt = performance.now();
29311
- const prerenderDir = join45(buildDir, "_prerendered");
29428
+ const prerenderDir = join46(buildDir, "_prerendered");
29312
29429
  const prerenderMap = loadPrerenderMap(prerenderDir);
29313
29430
  recordStep("load prerender map", stepStartedAt);
29314
29431
  if (prerenderMap.size > 0) {
@@ -29373,10 +29490,10 @@ import {
29373
29490
  readFileSync as readFileSync32,
29374
29491
  rmSync as rmSync4
29375
29492
  } from "fs";
29376
- import { join as join46 } from "path";
29377
- var CERT_DIR = join46(process.cwd(), ".absolutejs");
29378
- var CERT_PATH = join46(CERT_DIR, "cert.pem");
29379
- var KEY_PATH = join46(CERT_DIR, "key.pem");
29493
+ import { join as join47 } from "path";
29494
+ var CERT_DIR = join47(process.cwd(), ".absolutejs");
29495
+ var CERT_PATH = join47(CERT_DIR, "cert.pem");
29496
+ var KEY_PATH = join47(CERT_DIR, "key.pem");
29380
29497
  var CERT_VALIDITY_DAYS = 365;
29381
29498
  var devLog = (msg) => console.log(`\x1B[2m${new Date().toLocaleTimeString()}\x1B[0m \x1B[36m[dev]\x1B[0m ${msg}`);
29382
29499
  var devWarn = (msg) => console.log(`\x1B[2m${new Date().toLocaleTimeString()}\x1B[0m \x1B[33m[dev]\x1B[0m \x1B[33m${msg}\x1B[0m`);
@@ -29496,12 +29613,12 @@ import {
29496
29613
  writeFileSync as writeFileSync11
29497
29614
  } from "fs";
29498
29615
  import { homedir as homedir2 } from "os";
29499
- import { basename as basename17, join as join47 } from "path";
29616
+ import { basename as basename17, join as join48 } from "path";
29500
29617
  var registeredPids = new Set;
29501
29618
  var exitHandlerRegistered = false;
29502
- var instanceFilePath = (pid) => join47(instanceRegistryDir(), `${pid}.json`);
29503
- var instanceLogPath = (pid) => join47(instanceRegistryDir(), `${pid}.log`);
29504
- var instanceRegistryDir = () => join47(homedir2(), ".absolutejs", "instances");
29619
+ var instanceFilePath = (pid) => join48(instanceRegistryDir(), `${pid}.json`);
29620
+ var instanceLogPath = (pid) => join48(instanceRegistryDir(), `${pid}.log`);
29621
+ var instanceRegistryDir = () => join48(homedir2(), ".absolutejs", "instances");
29505
29622
  var removeInstanceFilesSync = (pid) => {
29506
29623
  try {
29507
29624
  unlinkSync2(instanceFilePath(pid));
@@ -29536,7 +29653,7 @@ var registerInstance = (record) => {
29536
29653
  return record;
29537
29654
  };
29538
29655
  var resolveProjectName = (cwd2) => {
29539
- const parsed = readJsonFile(join47(cwd2, "package.json"));
29656
+ const parsed = readJsonFile(join48(cwd2, "package.json"));
29540
29657
  if (parsed !== null && typeof parsed === "object" && typeof parsed.name === "string" && parsed.name.trim().length > 0) {
29541
29658
  return parsed.name;
29542
29659
  }
@@ -35913,7 +36030,7 @@ var getEnv = (key) => {
35913
36030
  };
35914
36031
  // src/utils/projectRoot.ts
35915
36032
  import { existsSync as existsSync41 } from "fs";
35916
- import { dirname as dirname28, resolve as resolve48 } from "path";
36033
+ import { dirname as dirname29, resolve as resolve48 } from "path";
35917
36034
  var CONFIG_CANDIDATES = [
35918
36035
  "absolute.config.ts",
35919
36036
  "absolute.config.js",
@@ -35933,7 +36050,7 @@ var findProjectRoot = () => {
35933
36050
  if (packageRoot === null && existsSync41(resolve48(dir, "package.json"))) {
35934
36051
  packageRoot = dir;
35935
36052
  }
35936
- const parent = dirname28(dir);
36053
+ const parent = dirname29(dir);
35937
36054
  if (parent === dir) {
35938
36055
  return packageRoot ?? start;
35939
36056
  }
@@ -36169,5 +36286,5 @@ export {
36169
36286
  ANGULAR_INIT_TIMEOUT_MS
36170
36287
  };
36171
36288
 
36172
- //# debugId=7F42073740D508FC64756E2164756E21
36289
+ //# debugId=C5D7127FA2204C7B64756E2164756E21
36173
36290
  //# sourceMappingURL=index.js.map