@absolutejs/absolute 0.19.0-beta.386 → 0.19.0-beta.387

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -174210,7 +174210,7 @@ var isDev2, collectConventionSourceFiles = (entry) => {
174210
174210
  copyReactDevIndexes(reactIndexesPath, reactPagesPath, devIndexDir, readDir);
174211
174211
  }
174212
174212
  if (svelteDir && sveltePagesPath) {
174213
- copySvelteDevIndexes(svelteDir, sveltePagesPath, svelteEntries, devIndexDir);
174213
+ copySvelteDevIndexes(buildPath, svelteDir, sveltePagesPath, svelteEntries, devIndexDir, readDir);
174214
174214
  }
174215
174215
  if (vueDir && vuePagesPath) {
174216
174216
  copyVueDevIndexes(vueDir, vuePagesPath, vueEntries, devIndexDir);
@@ -174223,8 +174223,10 @@ var isDev2, collectConventionSourceFiles = (entry) => {
174223
174223
  content = content.replace(/from\s*['"]([^'"]*\/pages\/([^'"]+))['"]/g, (_match, _fullPath, componentName) => `from '/@src/${pagesRel}/${componentName}'`);
174224
174224
  writeFileSync7(join18(devIndexDir, file4), content);
174225
174225
  }
174226
- }, copySvelteDevIndexes = (svelteDir, sveltePagesPath, svelteEntries, devIndexDir) => {
174226
+ }, copySvelteDevIndexes = (buildPath, svelteDir, sveltePagesPath, svelteEntries, devIndexDir, readDir) => {
174227
174227
  const svelteIndexDir = join18(svelteDir, "generated", "indexes");
174228
+ const sourceGeneratedClientDir = join18(svelteDir, "generated", "client");
174229
+ const builtGeneratedClientDir = join18(buildPath, "svelte", "generated", "client");
174228
174230
  const sveltePageEntries = svelteEntries.filter((file4) => resolve19(file4).startsWith(resolve19(sveltePagesPath)));
174229
174231
  for (const entry of sveltePageEntries) {
174230
174232
  const name = basename8(entry).replace(/\.svelte(\.(ts|js))?$/, "");
@@ -174234,7 +174236,12 @@ var isDev2, collectConventionSourceFiles = (entry) => {
174234
174236
  let content = readFileSync10(indexFile, "utf-8");
174235
174237
  content = content.replace(/import\s+Component\s+from\s+['"]([^'"]+)['"]/, (_match, importPath) => {
174236
174238
  const resolvedImport = resolve19(dirname10(indexFile), String(importPath));
174237
- const importUrl = `/@src/${relative9(process.cwd(), resolvedImport).replace(/\\/g, "/")}`;
174239
+ const clientRel = relative9(sourceGeneratedClientDir, resolvedImport).replace(/\\/g, "/");
174240
+ const builtDir = dirname10(join18(builtGeneratedClientDir, clientRel));
174241
+ const builtBaseName = basename8(clientRel).replace(/\.[^.]+$/, "");
174242
+ const builtMatch = existsSync16(builtDir) ? readDir(builtDir).find((file4) => file4.startsWith(`${builtBaseName}.`) && file4.endsWith(".js")) : undefined;
174243
+ const builtImport = builtMatch ? join18(builtDir, builtMatch) : resolvedImport;
174244
+ const importUrl = `/@src/${relative9(process.cwd(), builtImport).replace(/\\/g, "/")}`;
174238
174245
  return `import Component from ${JSON.stringify(importUrl)}`;
174239
174246
  });
174240
174247
  writeFileSync7(join18(devIndexDir, `${name}.svelte.js`), content);
@@ -179291,18 +179298,75 @@ var init_hmr = __esm(() => {
179291
179298
  init_webSocket();
179292
179299
  });
179293
179300
 
179301
+ // src/plugins/devtoolsJson.ts
179302
+ var exports_devtoolsJson = {};
179303
+ __export(exports_devtoolsJson, {
179304
+ normalizeDevtoolsWorkspaceRoot: () => normalizeDevtoolsWorkspaceRoot,
179305
+ devtoolsJson: () => devtoolsJson
179306
+ });
179307
+ import { existsSync as existsSync21, mkdirSync as mkdirSync12, readFileSync as readFileSync14, writeFileSync as writeFileSync8 } from "fs";
179308
+ import { join as join22, resolve as resolve31 } from "path";
179309
+ import { Elysia } from "elysia";
179310
+ var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_KEY = "__absoluteDevtoolsWorkspaceUuid", getGlobalUuid = () => Reflect.get(globalThis, UUID_CACHE_KEY), setGlobalUuid = (uuid) => {
179311
+ Reflect.set(globalThis, UUID_CACHE_KEY, uuid);
179312
+ return uuid;
179313
+ }, 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), getUuidCachePath = (buildDir) => join22(buildDir, ".absolute", "chrome-devtools-workspace-uuid"), readCachedUuid = (cachePath) => {
179314
+ if (!existsSync21(cachePath))
179315
+ return null;
179316
+ try {
179317
+ const value = readFileSync14(cachePath, "utf-8").trim();
179318
+ return isUuidV4(value) ? value : null;
179319
+ } catch {
179320
+ return null;
179321
+ }
179322
+ }, getOrCreateUuid = (buildDir) => {
179323
+ const globalUuid = getGlobalUuid();
179324
+ if (typeof globalUuid === "string" && isUuidV4(globalUuid)) {
179325
+ return globalUuid;
179326
+ }
179327
+ const cachePath = getUuidCachePath(buildDir);
179328
+ const cachedUuid = readCachedUuid(cachePath);
179329
+ if (cachedUuid)
179330
+ return setGlobalUuid(cachedUuid);
179331
+ const uuid = crypto.randomUUID();
179332
+ mkdirSync12(join22(buildDir, ".absolute"), { recursive: true });
179333
+ writeFileSync8(cachePath, uuid, "utf-8");
179334
+ return setGlobalUuid(uuid);
179335
+ }, normalizeDevtoolsWorkspaceRoot = (root) => {
179336
+ if (process.env.WSL_DISTRO_NAME) {
179337
+ const distro = process.env.WSL_DISTRO_NAME;
179338
+ const withoutLeadingSlash = root.replace(/^\//, "");
179339
+ return join22("\\\\wsl.localhost", distro, withoutLeadingSlash).replace(/\//g, "\\");
179340
+ }
179341
+ if (process.env.DOCKER_DESKTOP && !root.startsWith("\\\\")) {
179342
+ const withoutLeadingSlash = root.replace(/^\//, "");
179343
+ return join22("\\\\wsl.localhost", "docker-desktop-data", withoutLeadingSlash).replace(/\//g, "\\");
179344
+ }
179345
+ return root;
179346
+ }, devtoolsJson = (buildDir, projectRoot = process.cwd()) => {
179347
+ const root = normalizeDevtoolsWorkspaceRoot(resolve31(projectRoot));
179348
+ const uuid = getOrCreateUuid(buildDir);
179349
+ return new Elysia({ name: "absolute-devtools-json" }).get(ENDPOINT, () => ({
179350
+ workspace: {
179351
+ root,
179352
+ uuid
179353
+ }
179354
+ }));
179355
+ };
179356
+ var init_devtoolsJson = () => {};
179357
+
179294
179358
  // src/plugins/imageOptimizer.ts
179295
179359
  var exports_imageOptimizer = {};
179296
179360
  __export(exports_imageOptimizer, {
179297
179361
  imageOptimizer: () => imageOptimizer
179298
179362
  });
179299
- import { existsSync as existsSync21 } from "fs";
179300
- import { resolve as resolve31 } from "path";
179301
- import { Elysia } from "elysia";
179363
+ import { existsSync as existsSync22 } from "fs";
179364
+ import { resolve as resolve32 } from "path";
179365
+ import { Elysia as Elysia2 } from "elysia";
179302
179366
  var DEFAULT_CACHE_TTL_SECONDS = 60, MS_PER_SECOND = 1000, MAX_QUALITY = 100, avifInProgress, safeResolve = (path, baseDir) => {
179303
179367
  try {
179304
179368
  const resolved = validateSafePath(path, baseDir);
179305
- if (existsSync21(resolved))
179369
+ if (existsSync22(resolved))
179306
179370
  return resolved;
179307
179371
  return null;
179308
179372
  } catch {
@@ -179310,7 +179374,7 @@ var DEFAULT_CACHE_TTL_SECONDS = 60, MS_PER_SECOND = 1000, MAX_QUALITY = 100, avi
179310
179374
  }
179311
179375
  }, resolveLocalImage = (url, buildDir) => {
179312
179376
  const cleanPath = url.startsWith("/") ? url.slice(1) : url;
179313
- return safeResolve(cleanPath, buildDir) ?? safeResolve(cleanPath, resolve31(process.cwd()));
179377
+ return safeResolve(cleanPath, buildDir) ?? safeResolve(cleanPath, resolve32(process.cwd()));
179314
179378
  }, parseQueryParams = (query, allowedSizes, defaultQuality) => {
179315
179379
  const url = typeof query["url"] === "string" ? query["url"] : undefined;
179316
179380
  const wParam = typeof query["w"] === "string" ? query["w"] : undefined;
@@ -179426,7 +179490,7 @@ var DEFAULT_CACHE_TTL_SECONDS = 60, MS_PER_SECOND = 1000, MAX_QUALITY = 100, avi
179426
179490
  const configuredFormats = config?.formats ?? ["webp"];
179427
179491
  const remotePatterns = config?.remotePatterns ?? [];
179428
179492
  const cacheDir = getCacheDir(buildDir);
179429
- const plugin = new Elysia({ name: "image-optimizer" }).get(endpointPath, async ({ query, request }) => {
179493
+ const plugin = new Elysia2({ name: "image-optimizer" }).get(endpointPath, async ({ query, request }) => {
179430
179494
  const parsed = parseQueryParams(query, allowedSizes, defaultQuality);
179431
179495
  if ("error" in parsed)
179432
179496
  return parsed.error;
@@ -179601,15 +179665,15 @@ __export(exports_prerender, {
179601
179665
  prerender: () => prerender,
179602
179666
  PRERENDER_BYPASS_HEADER: () => PRERENDER_BYPASS_HEADER
179603
179667
  });
179604
- import { mkdirSync as mkdirSync12, readFileSync as readFileSync14 } from "fs";
179605
- import { join as join22 } from "path";
179668
+ import { mkdirSync as mkdirSync13, readFileSync as readFileSync15 } from "fs";
179669
+ import { join as join23 } from "path";
179606
179670
  var MAX_STARTUP_ATTEMPTS = 50, STARTUP_POLL_INTERVAL_MS = 100, PRERENDER_BYPASS_HEADER = "X-Absolute-Prerender-Bypass", routeToFilename = (route) => route === "/" ? "index.html" : `${route.slice(1).replace(/\//g, "-")}.html`, writeTimestamp = async (htmlPath) => {
179607
179671
  const metaPath = htmlPath.replace(/\.html$/, ".meta");
179608
179672
  await Bun.write(metaPath, String(Date.now()));
179609
179673
  }, readTimestamp = (htmlPath) => {
179610
179674
  const metaPath = htmlPath.replace(/\.html$/, ".meta");
179611
179675
  try {
179612
- const content = readFileSync14(metaPath, "utf-8");
179676
+ const content = readFileSync15(metaPath, "utf-8");
179613
179677
  return Number(content) || 0;
179614
179678
  } catch {
179615
179679
  return 0;
@@ -179658,7 +179722,7 @@ var MAX_STARTUP_ATTEMPTS = 50, STARTUP_POLL_INTERVAL_MS = 100, PRERENDER_BYPASS_
179658
179722
  return false;
179659
179723
  const html = await res.text();
179660
179724
  const fileName = routeToFilename(route);
179661
- const filePath = join22(prerenderDir, fileName);
179725
+ const filePath = join23(prerenderDir, fileName);
179662
179726
  await Bun.write(filePath, html);
179663
179727
  await writeTimestamp(filePath);
179664
179728
  return true;
@@ -179677,14 +179741,14 @@ var MAX_STARTUP_ATTEMPTS = 50, STARTUP_POLL_INTERVAL_MS = 100, PRERENDER_BYPASS_
179677
179741
  }
179678
179742
  const html = await res.text();
179679
179743
  const fileName = routeToFilename(route);
179680
- const filePath = join22(prerenderDir, fileName);
179744
+ const filePath = join23(prerenderDir, fileName);
179681
179745
  await Bun.write(filePath, html);
179682
179746
  await writeTimestamp(filePath);
179683
179747
  result.routes.set(route, filePath);
179684
179748
  log2?.(` Pre-rendered ${route} \u2192 ${fileName} (${html.length} bytes)`);
179685
179749
  }, prerender = async (port, outDir, staticConfig, log2) => {
179686
- const prerenderDir = join22(outDir, "_prerendered");
179687
- mkdirSync12(prerenderDir, { recursive: true });
179750
+ const prerenderDir = join23(outDir, "_prerendered");
179751
+ mkdirSync13(prerenderDir, { recursive: true });
179688
179752
  const baseUrl = `http://localhost:${port}`;
179689
179753
  let routes;
179690
179754
  if (staticConfig.routes === "all") {
@@ -179737,12 +179801,12 @@ __export(exports_devCert, {
179737
179801
  hasCert: () => hasCert,
179738
179802
  ensureDevCert: () => ensureDevCert
179739
179803
  });
179740
- import { existsSync as existsSync23, mkdirSync as mkdirSync13, readFileSync as readFileSync16, rmSync as rmSync3 } from "fs";
179804
+ import { existsSync as existsSync24, mkdirSync as mkdirSync14, readFileSync as readFileSync17, rmSync as rmSync3 } from "fs";
179741
179805
  import { platform as platform3 } from "os";
179742
- import { join as join24 } from "path";
179743
- var CERT_DIR, CERT_PATH, KEY_PATH, CERT_VALIDITY_DAYS = 365, devLog = (msg) => console.log(`\x1B[2m${new Date().toLocaleTimeString()}\x1B[0m \x1B[36m[dev]\x1B[0m ${msg}`), devWarn = (msg) => console.log(`\x1B[2m${new Date().toLocaleTimeString()}\x1B[0m \x1B[33m[dev]\x1B[0m \x1B[33m${msg}\x1B[0m`), certFilesExist = () => existsSync23(CERT_PATH) && existsSync23(KEY_PATH), isCertExpired = () => {
179806
+ import { join as join25 } from "path";
179807
+ var CERT_DIR, CERT_PATH, KEY_PATH, CERT_VALIDITY_DAYS = 365, devLog = (msg) => console.log(`\x1B[2m${new Date().toLocaleTimeString()}\x1B[0m \x1B[36m[dev]\x1B[0m ${msg}`), devWarn = (msg) => console.log(`\x1B[2m${new Date().toLocaleTimeString()}\x1B[0m \x1B[33m[dev]\x1B[0m \x1B[33m${msg}\x1B[0m`), certFilesExist = () => existsSync24(CERT_PATH) && existsSync24(KEY_PATH), isCertExpired = () => {
179744
179808
  try {
179745
- const certPem = readFileSync16(CERT_PATH, "utf-8");
179809
+ const certPem = readFileSync17(CERT_PATH, "utf-8");
179746
179810
  const proc = Bun.spawnSync(["openssl", "x509", "-enddate", "-noout"], {
179747
179811
  stdin: new TextEncoder().encode(certPem)
179748
179812
  });
@@ -179811,7 +179875,7 @@ var CERT_DIR, CERT_PATH, KEY_PATH, CERT_VALIDITY_DAYS = 365, devLog = (msg) => c
179811
179875
  generateSelfSigned();
179812
179876
  }
179813
179877
  }, ensureDevCert = () => {
179814
- mkdirSync13(CERT_DIR, { recursive: true });
179878
+ mkdirSync14(CERT_DIR, { recursive: true });
179815
179879
  if (hasCert()) {
179816
179880
  return { cert: CERT_PATH, key: KEY_PATH };
179817
179881
  }
@@ -179831,8 +179895,8 @@ var CERT_DIR, CERT_PATH, KEY_PATH, CERT_VALIDITY_DAYS = 365, devLog = (msg) => c
179831
179895
  return null;
179832
179896
  try {
179833
179897
  return {
179834
- cert: readFileSync16(paths.cert, "utf-8"),
179835
- key: readFileSync16(paths.key, "utf-8")
179898
+ cert: readFileSync17(paths.cert, "utf-8"),
179899
+ key: readFileSync17(paths.key, "utf-8")
179836
179900
  };
179837
179901
  } catch {
179838
179902
  return null;
@@ -179938,16 +180002,16 @@ var CERT_DIR, CERT_PATH, KEY_PATH, CERT_VALIDITY_DAYS = 365, devLog = (msg) => c
179938
180002
  }
179939
180003
  rmSync3(CERT_PATH, { force: true });
179940
180004
  rmSync3(KEY_PATH, { force: true });
179941
- mkdirSync13(CERT_DIR, { recursive: true });
180005
+ mkdirSync14(CERT_DIR, { recursive: true });
179942
180006
  generateWithMkcert();
179943
180007
  console.log("");
179944
180008
  devLog("mkcert installed \u2014 HTTPS certificates are now locally trusted");
179945
180009
  return true;
179946
180010
  };
179947
180011
  var init_devCert = __esm(() => {
179948
- CERT_DIR = join24(process.cwd(), ".absolutejs");
179949
- CERT_PATH = join24(CERT_DIR, "cert.pem");
179950
- KEY_PATH = join24(CERT_DIR, "key.pem");
180012
+ CERT_DIR = join25(process.cwd(), ".absolutejs");
180013
+ CERT_PATH = join25(CERT_DIR, "cert.pem");
180014
+ KEY_PATH = join25(CERT_DIR, "key.pem");
179951
180015
  });
179952
180016
 
179953
180017
  // src/core/streamingSlotRegistrar.ts
@@ -180759,8 +180823,8 @@ var handleStaticPageRequest = async (pagePath) => {
180759
180823
  var handleHTMLPageRequest = (pagePath) => handleStaticPageRequest(pagePath);
180760
180824
  var handleHTMXPageRequest = (pagePath) => handleStaticPageRequest(pagePath);
180761
180825
  // src/core/prepare.ts
180762
- import { existsSync as existsSync22, readdirSync as readdirSync2, readFileSync as readFileSync15 } from "fs";
180763
- import { basename as basename14, join as join23, relative as relative12, resolve as resolve32 } from "path";
180826
+ import { existsSync as existsSync23, readdirSync as readdirSync2, readFileSync as readFileSync16 } from "fs";
180827
+ import { basename as basename14, join as join24, relative as relative12, resolve as resolve33 } from "path";
180764
180828
 
180765
180829
  // src/utils/loadConfig.ts
180766
180830
  import { resolve as resolve6 } from "path";
@@ -180829,7 +180893,7 @@ var collectPrewarmFiles = async (prewarmDirs) => {
180829
180893
  for (const { dir, pattern } of prewarmDirs) {
180830
180894
  const glob = new Glob9(pattern);
180831
180895
  const matches = [
180832
- ...glob.scanSync({ absolute: true, cwd: resolve32(dir) })
180896
+ ...glob.scanSync({ absolute: true, cwd: resolve33(dir) })
180833
180897
  ];
180834
180898
  files.push(...matches);
180835
180899
  }
@@ -180865,8 +180929,8 @@ var patchManifestIndexes = (manifest, devIndexDir, SRC_URL_PREFIX2) => {
180865
180929
  const fileName = resolveDevIndexFileName(manifest[key], baseName);
180866
180930
  if (!fileName)
180867
180931
  continue;
180868
- const srcPath = resolve32(devIndexDir, fileName);
180869
- if (!existsSync22(srcPath))
180932
+ const srcPath = resolve33(devIndexDir, fileName);
180933
+ if (!existsSync23(srcPath))
180870
180934
  continue;
180871
180935
  const rel = relative12(process.cwd(), srcPath).replace(/\\/g, "/");
180872
180936
  manifest[key] = `${SRC_URL_PREFIX2}${rel}`;
@@ -180914,7 +180978,8 @@ var prepareDev = async (config, buildDir) => {
180914
180978
  };
180915
180979
  }
180916
180980
  const hmrPlugin = hmr2(result.hmrState, result.manifest, moduleHandler);
180917
- const devIndexDir = resolve32(buildDir, "_src_indexes");
180981
+ const { devtoolsJson: devtoolsJson2 } = await Promise.resolve().then(() => (init_devtoolsJson(), exports_devtoolsJson));
180982
+ const devIndexDir = resolve33(buildDir, "_src_indexes");
180918
180983
  patchManifestIndexes(result.manifest, devIndexDir, SRC_URL_PREFIX2);
180919
180984
  if (result.conventions)
180920
180985
  setConventions(result.conventions);
@@ -180926,7 +180991,7 @@ var prepareDev = async (config, buildDir) => {
180926
180991
  const { imageOptimizer: imageOptimizer2 } = await Promise.resolve().then(() => (init_imageOptimizer(), exports_imageOptimizer));
180927
180992
  return {
180928
180993
  manifest: result.manifest,
180929
- absolutejs: (app) => addNotFoundHook(addSitemapHook(hmrPlugin(app.use(imageOptimizer2(config.images, buildDir)).use(staticPlugin({
180994
+ absolutejs: (app) => addNotFoundHook(addSitemapHook(hmrPlugin(app.use(devtoolsJson2(buildDir)).use(imageOptimizer2(config.images, buildDir)).use(staticPlugin({
180930
180995
  assets: buildDir,
180931
180996
  directive: "no-cache",
180932
180997
  maxAge: null,
@@ -180936,7 +181001,7 @@ var prepareDev = async (config, buildDir) => {
180936
181001
  };
180937
181002
  var loadPrerenderMap = (prerenderDir) => {
180938
181003
  const map = new Map;
180939
- if (!existsSync22(prerenderDir))
181004
+ if (!existsSync23(prerenderDir))
180940
181005
  return map;
180941
181006
  let entries;
180942
181007
  try {
@@ -180949,7 +181014,7 @@ var loadPrerenderMap = (prerenderDir) => {
180949
181014
  continue;
180950
181015
  const name = basename14(entry, ".html");
180951
181016
  const route = name === "index" ? "/" : `/${name}`;
180952
- map.set(route, join23(prerenderDir, entry));
181017
+ map.set(route, join24(prerenderDir, entry));
180953
181018
  }
180954
181019
  return map;
180955
181020
  };
@@ -180971,31 +181036,31 @@ var prepare = async (configOrPath) => {
180971
181036
  const config = await loadConfig(configOrPath);
180972
181037
  const nodeEnv = process.env["NODE_ENV"];
180973
181038
  const isDev3 = nodeEnv === "development";
180974
- const buildDir = resolve32(isDev3 ? config.buildDirectory ?? "build" : process.env.ABSOLUTE_BUILD_DIR ?? config.buildDirectory ?? "build");
181039
+ const buildDir = resolve33(isDev3 ? config.buildDirectory ?? "build" : process.env.ABSOLUTE_BUILD_DIR ?? config.buildDirectory ?? "build");
180975
181040
  if (isDev3)
180976
181041
  return prepareDev(config, buildDir);
180977
- const manifest = JSON.parse(readFileSync15(`${buildDir}/manifest.json`, "utf-8"));
181042
+ const manifest = JSON.parse(readFileSync16(`${buildDir}/manifest.json`, "utf-8"));
180978
181043
  setCurrentIslandManifest(manifest);
180979
181044
  if (config.islands?.registry) {
180980
181045
  setCurrentIslandRegistry(await loadIslandRegistry(config.islands.registry));
180981
181046
  }
180982
181047
  setCurrentPageIslandMetadata(await loadPageIslandMetadata(config));
180983
- const conventionsPath = join23(buildDir, "conventions.json");
180984
- if (existsSync22(conventionsPath)) {
180985
- const conventions2 = JSON.parse(readFileSync15(conventionsPath, "utf-8"));
181048
+ const conventionsPath = join24(buildDir, "conventions.json");
181049
+ if (existsSync23(conventionsPath)) {
181050
+ const conventions2 = JSON.parse(readFileSync16(conventionsPath, "utf-8"));
180986
181051
  setConventions(conventions2);
180987
181052
  }
180988
181053
  const { staticPlugin } = await import("@elysiajs/static");
180989
181054
  const staticFiles = staticPlugin({ assets: buildDir, prefix: "" });
180990
- const prerenderDir = join23(buildDir, "_prerendered");
181055
+ const prerenderDir = join24(buildDir, "_prerendered");
180991
181056
  const prerenderMap = loadPrerenderMap(prerenderDir);
180992
181057
  if (prerenderMap.size > 0) {
180993
- const { Elysia: Elysia2 } = await import("elysia");
181058
+ const { Elysia: Elysia3 } = await import("elysia");
180994
181059
  const { PRERENDER_BYPASS_HEADER: PRERENDER_BYPASS_HEADER2, readTimestamp: readTimestamp2, rerenderRoute: rerenderRoute2 } = await Promise.resolve().then(() => (init_prerender(), exports_prerender));
180995
181060
  const revalidateMs = config.static?.revalidate ? config.static.revalidate * MS_PER_SECOND2 : 0;
180996
181061
  const port = Number(process.env.PORT) || DEFAULT_PORT2;
180997
181062
  const rerendering = new Set;
180998
- const prerenderPlugin = new Elysia2({
181063
+ const prerenderPlugin = new Elysia3({
180999
181064
  name: "prerendered-pages"
181000
181065
  }).onRequest(({ request }) => {
181001
181066
  const url = new URL(request.url);
@@ -181242,8 +181307,8 @@ var jsonLd2 = (schema) => {
181242
181307
  };
181243
181308
  // src/utils/defineEnv.ts
181244
181309
  var {env: bunEnv } = globalThis.Bun;
181245
- import { existsSync as existsSync24, readFileSync as readFileSync17 } from "fs";
181246
- import { resolve as resolve33 } from "path";
181310
+ import { existsSync as existsSync25, readFileSync as readFileSync18 } from "fs";
181311
+ import { resolve as resolve34 } from "path";
181247
181312
 
181248
181313
  // node_modules/@sinclair/typebox/build/esm/type/guard/value.mjs
181249
181314
  var exports_value = {};
@@ -187278,19 +187343,19 @@ ${lines.join(`
187278
187343
  };
187279
187344
  var checkEnvFileSecurity = (properties) => {
187280
187345
  const cwd2 = process.cwd();
187281
- const envPath = resolve33(cwd2, ".env");
187282
- if (!existsSync24(envPath))
187346
+ const envPath = resolve34(cwd2, ".env");
187347
+ if (!existsSync25(envPath))
187283
187348
  return;
187284
187349
  const sensitiveKeys = Object.keys(properties).filter(isSensitive);
187285
187350
  if (sensitiveKeys.length === 0)
187286
187351
  return;
187287
- const envContent = readFileSync17(envPath, "utf-8");
187352
+ const envContent = readFileSync18(envPath, "utf-8");
187288
187353
  const presentKeys = sensitiveKeys.filter((key) => envContent.includes(`${key}=`));
187289
187354
  if (presentKeys.length === 0)
187290
187355
  return;
187291
- const gitignorePath = resolve33(cwd2, ".gitignore");
187292
- if (existsSync24(gitignorePath)) {
187293
- const gitignore = readFileSync17(gitignorePath, "utf-8");
187356
+ const gitignorePath = resolve34(cwd2, ".gitignore");
187357
+ if (existsSync25(gitignorePath)) {
187358
+ const gitignore = readFileSync18(gitignorePath, "utf-8");
187294
187359
  if (gitignore.split(`
187295
187360
  `).some((line) => line.trim() === ".env"))
187296
187361
  return;
@@ -187486,5 +187551,5 @@ export {
187486
187551
  ANGULAR_INIT_TIMEOUT_MS
187487
187552
  };
187488
187553
 
187489
- //# debugId=E1B30AC4E489750764756E2164756E21
187554
+ //# debugId=683AF83777003BDD64756E2164756E21
187490
187555
  //# sourceMappingURL=index.js.map