@absolutejs/absolute 0.19.0-beta.385 → 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,15 +174223,27 @@ 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))?$/, "");
174231
174233
  const indexFile = join18(svelteIndexDir, "pages", `${name}.js`);
174232
174234
  if (!existsSync16(indexFile))
174233
174235
  continue;
174234
- const content = readFileSync10(indexFile, "utf-8");
174236
+ let content = readFileSync10(indexFile, "utf-8");
174237
+ content = content.replace(/import\s+Component\s+from\s+['"]([^'"]+)['"]/, (_match, importPath) => {
174238
+ const resolvedImport = resolve19(dirname10(indexFile), String(importPath));
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, "/")}`;
174245
+ return `import Component from ${JSON.stringify(importUrl)}`;
174246
+ });
174235
174247
  writeFileSync7(join18(devIndexDir, `${name}.svelte.js`), content);
174236
174248
  }
174237
174249
  }, copyVueDevIndexes = (vueDir, vuePagesPath, vueEntries, devIndexDir) => {
@@ -179286,18 +179298,75 @@ var init_hmr = __esm(() => {
179286
179298
  init_webSocket();
179287
179299
  });
179288
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
+
179289
179358
  // src/plugins/imageOptimizer.ts
179290
179359
  var exports_imageOptimizer = {};
179291
179360
  __export(exports_imageOptimizer, {
179292
179361
  imageOptimizer: () => imageOptimizer
179293
179362
  });
179294
- import { existsSync as existsSync21 } from "fs";
179295
- import { resolve as resolve31 } from "path";
179296
- 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";
179297
179366
  var DEFAULT_CACHE_TTL_SECONDS = 60, MS_PER_SECOND = 1000, MAX_QUALITY = 100, avifInProgress, safeResolve = (path, baseDir) => {
179298
179367
  try {
179299
179368
  const resolved = validateSafePath(path, baseDir);
179300
- if (existsSync21(resolved))
179369
+ if (existsSync22(resolved))
179301
179370
  return resolved;
179302
179371
  return null;
179303
179372
  } catch {
@@ -179305,7 +179374,7 @@ var DEFAULT_CACHE_TTL_SECONDS = 60, MS_PER_SECOND = 1000, MAX_QUALITY = 100, avi
179305
179374
  }
179306
179375
  }, resolveLocalImage = (url, buildDir) => {
179307
179376
  const cleanPath = url.startsWith("/") ? url.slice(1) : url;
179308
- return safeResolve(cleanPath, buildDir) ?? safeResolve(cleanPath, resolve31(process.cwd()));
179377
+ return safeResolve(cleanPath, buildDir) ?? safeResolve(cleanPath, resolve32(process.cwd()));
179309
179378
  }, parseQueryParams = (query, allowedSizes, defaultQuality) => {
179310
179379
  const url = typeof query["url"] === "string" ? query["url"] : undefined;
179311
179380
  const wParam = typeof query["w"] === "string" ? query["w"] : undefined;
@@ -179421,7 +179490,7 @@ var DEFAULT_CACHE_TTL_SECONDS = 60, MS_PER_SECOND = 1000, MAX_QUALITY = 100, avi
179421
179490
  const configuredFormats = config?.formats ?? ["webp"];
179422
179491
  const remotePatterns = config?.remotePatterns ?? [];
179423
179492
  const cacheDir = getCacheDir(buildDir);
179424
- 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 }) => {
179425
179494
  const parsed = parseQueryParams(query, allowedSizes, defaultQuality);
179426
179495
  if ("error" in parsed)
179427
179496
  return parsed.error;
@@ -179596,15 +179665,15 @@ __export(exports_prerender, {
179596
179665
  prerender: () => prerender,
179597
179666
  PRERENDER_BYPASS_HEADER: () => PRERENDER_BYPASS_HEADER
179598
179667
  });
179599
- import { mkdirSync as mkdirSync12, readFileSync as readFileSync14 } from "fs";
179600
- import { join as join22 } from "path";
179668
+ import { mkdirSync as mkdirSync13, readFileSync as readFileSync15 } from "fs";
179669
+ import { join as join23 } from "path";
179601
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) => {
179602
179671
  const metaPath = htmlPath.replace(/\.html$/, ".meta");
179603
179672
  await Bun.write(metaPath, String(Date.now()));
179604
179673
  }, readTimestamp = (htmlPath) => {
179605
179674
  const metaPath = htmlPath.replace(/\.html$/, ".meta");
179606
179675
  try {
179607
- const content = readFileSync14(metaPath, "utf-8");
179676
+ const content = readFileSync15(metaPath, "utf-8");
179608
179677
  return Number(content) || 0;
179609
179678
  } catch {
179610
179679
  return 0;
@@ -179653,7 +179722,7 @@ var MAX_STARTUP_ATTEMPTS = 50, STARTUP_POLL_INTERVAL_MS = 100, PRERENDER_BYPASS_
179653
179722
  return false;
179654
179723
  const html = await res.text();
179655
179724
  const fileName = routeToFilename(route);
179656
- const filePath = join22(prerenderDir, fileName);
179725
+ const filePath = join23(prerenderDir, fileName);
179657
179726
  await Bun.write(filePath, html);
179658
179727
  await writeTimestamp(filePath);
179659
179728
  return true;
@@ -179672,14 +179741,14 @@ var MAX_STARTUP_ATTEMPTS = 50, STARTUP_POLL_INTERVAL_MS = 100, PRERENDER_BYPASS_
179672
179741
  }
179673
179742
  const html = await res.text();
179674
179743
  const fileName = routeToFilename(route);
179675
- const filePath = join22(prerenderDir, fileName);
179744
+ const filePath = join23(prerenderDir, fileName);
179676
179745
  await Bun.write(filePath, html);
179677
179746
  await writeTimestamp(filePath);
179678
179747
  result.routes.set(route, filePath);
179679
179748
  log2?.(` Pre-rendered ${route} \u2192 ${fileName} (${html.length} bytes)`);
179680
179749
  }, prerender = async (port, outDir, staticConfig, log2) => {
179681
- const prerenderDir = join22(outDir, "_prerendered");
179682
- mkdirSync12(prerenderDir, { recursive: true });
179750
+ const prerenderDir = join23(outDir, "_prerendered");
179751
+ mkdirSync13(prerenderDir, { recursive: true });
179683
179752
  const baseUrl = `http://localhost:${port}`;
179684
179753
  let routes;
179685
179754
  if (staticConfig.routes === "all") {
@@ -179732,12 +179801,12 @@ __export(exports_devCert, {
179732
179801
  hasCert: () => hasCert,
179733
179802
  ensureDevCert: () => ensureDevCert
179734
179803
  });
179735
- 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";
179736
179805
  import { platform as platform3 } from "os";
179737
- import { join as join24 } from "path";
179738
- 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 = () => {
179739
179808
  try {
179740
- const certPem = readFileSync16(CERT_PATH, "utf-8");
179809
+ const certPem = readFileSync17(CERT_PATH, "utf-8");
179741
179810
  const proc = Bun.spawnSync(["openssl", "x509", "-enddate", "-noout"], {
179742
179811
  stdin: new TextEncoder().encode(certPem)
179743
179812
  });
@@ -179806,7 +179875,7 @@ var CERT_DIR, CERT_PATH, KEY_PATH, CERT_VALIDITY_DAYS = 365, devLog = (msg) => c
179806
179875
  generateSelfSigned();
179807
179876
  }
179808
179877
  }, ensureDevCert = () => {
179809
- mkdirSync13(CERT_DIR, { recursive: true });
179878
+ mkdirSync14(CERT_DIR, { recursive: true });
179810
179879
  if (hasCert()) {
179811
179880
  return { cert: CERT_PATH, key: KEY_PATH };
179812
179881
  }
@@ -179826,8 +179895,8 @@ var CERT_DIR, CERT_PATH, KEY_PATH, CERT_VALIDITY_DAYS = 365, devLog = (msg) => c
179826
179895
  return null;
179827
179896
  try {
179828
179897
  return {
179829
- cert: readFileSync16(paths.cert, "utf-8"),
179830
- key: readFileSync16(paths.key, "utf-8")
179898
+ cert: readFileSync17(paths.cert, "utf-8"),
179899
+ key: readFileSync17(paths.key, "utf-8")
179831
179900
  };
179832
179901
  } catch {
179833
179902
  return null;
@@ -179933,16 +180002,16 @@ var CERT_DIR, CERT_PATH, KEY_PATH, CERT_VALIDITY_DAYS = 365, devLog = (msg) => c
179933
180002
  }
179934
180003
  rmSync3(CERT_PATH, { force: true });
179935
180004
  rmSync3(KEY_PATH, { force: true });
179936
- mkdirSync13(CERT_DIR, { recursive: true });
180005
+ mkdirSync14(CERT_DIR, { recursive: true });
179937
180006
  generateWithMkcert();
179938
180007
  console.log("");
179939
180008
  devLog("mkcert installed \u2014 HTTPS certificates are now locally trusted");
179940
180009
  return true;
179941
180010
  };
179942
180011
  var init_devCert = __esm(() => {
179943
- CERT_DIR = join24(process.cwd(), ".absolutejs");
179944
- CERT_PATH = join24(CERT_DIR, "cert.pem");
179945
- 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");
179946
180015
  });
179947
180016
 
179948
180017
  // src/core/streamingSlotRegistrar.ts
@@ -180754,8 +180823,8 @@ var handleStaticPageRequest = async (pagePath) => {
180754
180823
  var handleHTMLPageRequest = (pagePath) => handleStaticPageRequest(pagePath);
180755
180824
  var handleHTMXPageRequest = (pagePath) => handleStaticPageRequest(pagePath);
180756
180825
  // src/core/prepare.ts
180757
- import { existsSync as existsSync22, readdirSync as readdirSync2, readFileSync as readFileSync15 } from "fs";
180758
- 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";
180759
180828
 
180760
180829
  // src/utils/loadConfig.ts
180761
180830
  import { resolve as resolve6 } from "path";
@@ -180824,7 +180893,7 @@ var collectPrewarmFiles = async (prewarmDirs) => {
180824
180893
  for (const { dir, pattern } of prewarmDirs) {
180825
180894
  const glob = new Glob9(pattern);
180826
180895
  const matches = [
180827
- ...glob.scanSync({ absolute: true, cwd: resolve32(dir) })
180896
+ ...glob.scanSync({ absolute: true, cwd: resolve33(dir) })
180828
180897
  ];
180829
180898
  files.push(...matches);
180830
180899
  }
@@ -180860,8 +180929,8 @@ var patchManifestIndexes = (manifest, devIndexDir, SRC_URL_PREFIX2) => {
180860
180929
  const fileName = resolveDevIndexFileName(manifest[key], baseName);
180861
180930
  if (!fileName)
180862
180931
  continue;
180863
- const srcPath = resolve32(devIndexDir, fileName);
180864
- if (!existsSync22(srcPath))
180932
+ const srcPath = resolve33(devIndexDir, fileName);
180933
+ if (!existsSync23(srcPath))
180865
180934
  continue;
180866
180935
  const rel = relative12(process.cwd(), srcPath).replace(/\\/g, "/");
180867
180936
  manifest[key] = `${SRC_URL_PREFIX2}${rel}`;
@@ -180909,7 +180978,8 @@ var prepareDev = async (config, buildDir) => {
180909
180978
  };
180910
180979
  }
180911
180980
  const hmrPlugin = hmr2(result.hmrState, result.manifest, moduleHandler);
180912
- 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");
180913
180983
  patchManifestIndexes(result.manifest, devIndexDir, SRC_URL_PREFIX2);
180914
180984
  if (result.conventions)
180915
180985
  setConventions(result.conventions);
@@ -180921,7 +180991,7 @@ var prepareDev = async (config, buildDir) => {
180921
180991
  const { imageOptimizer: imageOptimizer2 } = await Promise.resolve().then(() => (init_imageOptimizer(), exports_imageOptimizer));
180922
180992
  return {
180923
180993
  manifest: result.manifest,
180924
- 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({
180925
180995
  assets: buildDir,
180926
180996
  directive: "no-cache",
180927
180997
  maxAge: null,
@@ -180931,7 +181001,7 @@ var prepareDev = async (config, buildDir) => {
180931
181001
  };
180932
181002
  var loadPrerenderMap = (prerenderDir) => {
180933
181003
  const map = new Map;
180934
- if (!existsSync22(prerenderDir))
181004
+ if (!existsSync23(prerenderDir))
180935
181005
  return map;
180936
181006
  let entries;
180937
181007
  try {
@@ -180944,7 +181014,7 @@ var loadPrerenderMap = (prerenderDir) => {
180944
181014
  continue;
180945
181015
  const name = basename14(entry, ".html");
180946
181016
  const route = name === "index" ? "/" : `/${name}`;
180947
- map.set(route, join23(prerenderDir, entry));
181017
+ map.set(route, join24(prerenderDir, entry));
180948
181018
  }
180949
181019
  return map;
180950
181020
  };
@@ -180966,31 +181036,31 @@ var prepare = async (configOrPath) => {
180966
181036
  const config = await loadConfig(configOrPath);
180967
181037
  const nodeEnv = process.env["NODE_ENV"];
180968
181038
  const isDev3 = nodeEnv === "development";
180969
- 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");
180970
181040
  if (isDev3)
180971
181041
  return prepareDev(config, buildDir);
180972
- const manifest = JSON.parse(readFileSync15(`${buildDir}/manifest.json`, "utf-8"));
181042
+ const manifest = JSON.parse(readFileSync16(`${buildDir}/manifest.json`, "utf-8"));
180973
181043
  setCurrentIslandManifest(manifest);
180974
181044
  if (config.islands?.registry) {
180975
181045
  setCurrentIslandRegistry(await loadIslandRegistry(config.islands.registry));
180976
181046
  }
180977
181047
  setCurrentPageIslandMetadata(await loadPageIslandMetadata(config));
180978
- const conventionsPath = join23(buildDir, "conventions.json");
180979
- if (existsSync22(conventionsPath)) {
180980
- 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"));
180981
181051
  setConventions(conventions2);
180982
181052
  }
180983
181053
  const { staticPlugin } = await import("@elysiajs/static");
180984
181054
  const staticFiles = staticPlugin({ assets: buildDir, prefix: "" });
180985
- const prerenderDir = join23(buildDir, "_prerendered");
181055
+ const prerenderDir = join24(buildDir, "_prerendered");
180986
181056
  const prerenderMap = loadPrerenderMap(prerenderDir);
180987
181057
  if (prerenderMap.size > 0) {
180988
- const { Elysia: Elysia2 } = await import("elysia");
181058
+ const { Elysia: Elysia3 } = await import("elysia");
180989
181059
  const { PRERENDER_BYPASS_HEADER: PRERENDER_BYPASS_HEADER2, readTimestamp: readTimestamp2, rerenderRoute: rerenderRoute2 } = await Promise.resolve().then(() => (init_prerender(), exports_prerender));
180990
181060
  const revalidateMs = config.static?.revalidate ? config.static.revalidate * MS_PER_SECOND2 : 0;
180991
181061
  const port = Number(process.env.PORT) || DEFAULT_PORT2;
180992
181062
  const rerendering = new Set;
180993
- const prerenderPlugin = new Elysia2({
181063
+ const prerenderPlugin = new Elysia3({
180994
181064
  name: "prerendered-pages"
180995
181065
  }).onRequest(({ request }) => {
180996
181066
  const url = new URL(request.url);
@@ -181237,8 +181307,8 @@ var jsonLd2 = (schema) => {
181237
181307
  };
181238
181308
  // src/utils/defineEnv.ts
181239
181309
  var {env: bunEnv } = globalThis.Bun;
181240
- import { existsSync as existsSync24, readFileSync as readFileSync17 } from "fs";
181241
- import { resolve as resolve33 } from "path";
181310
+ import { existsSync as existsSync25, readFileSync as readFileSync18 } from "fs";
181311
+ import { resolve as resolve34 } from "path";
181242
181312
 
181243
181313
  // node_modules/@sinclair/typebox/build/esm/type/guard/value.mjs
181244
181314
  var exports_value = {};
@@ -187273,19 +187343,19 @@ ${lines.join(`
187273
187343
  };
187274
187344
  var checkEnvFileSecurity = (properties) => {
187275
187345
  const cwd2 = process.cwd();
187276
- const envPath = resolve33(cwd2, ".env");
187277
- if (!existsSync24(envPath))
187346
+ const envPath = resolve34(cwd2, ".env");
187347
+ if (!existsSync25(envPath))
187278
187348
  return;
187279
187349
  const sensitiveKeys = Object.keys(properties).filter(isSensitive);
187280
187350
  if (sensitiveKeys.length === 0)
187281
187351
  return;
187282
- const envContent = readFileSync17(envPath, "utf-8");
187352
+ const envContent = readFileSync18(envPath, "utf-8");
187283
187353
  const presentKeys = sensitiveKeys.filter((key) => envContent.includes(`${key}=`));
187284
187354
  if (presentKeys.length === 0)
187285
187355
  return;
187286
- const gitignorePath = resolve33(cwd2, ".gitignore");
187287
- if (existsSync24(gitignorePath)) {
187288
- const gitignore = readFileSync17(gitignorePath, "utf-8");
187356
+ const gitignorePath = resolve34(cwd2, ".gitignore");
187357
+ if (existsSync25(gitignorePath)) {
187358
+ const gitignore = readFileSync18(gitignorePath, "utf-8");
187289
187359
  if (gitignore.split(`
187290
187360
  `).some((line) => line.trim() === ".env"))
187291
187361
  return;
@@ -187481,5 +187551,5 @@ export {
187481
187551
  ANGULAR_INIT_TIMEOUT_MS
187482
187552
  };
187483
187553
 
187484
- //# debugId=A0906D9B6FC12A5964756E2164756E21
187554
+ //# debugId=683AF83777003BDD64756E2164756E21
187485
187555
  //# sourceMappingURL=index.js.map