@vesk/vesk-cli 0.2.77 → 0.2.80

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 (2) hide show
  1. package/dist/cli.js +169 -178
  2. package/package.json +5 -5
package/dist/cli.js CHANGED
@@ -35728,40 +35728,40 @@ var init_paths = __esm({
35728
35728
 
35729
35729
  // ../adapter/src/platform-output.ts
35730
35730
  import {
35731
- mkdirSync as mkdirSync7,
35731
+ mkdirSync as mkdirSync6,
35732
35732
  copyFileSync as copyFileSync2,
35733
35733
  readdirSync as readdirSync4,
35734
35734
  statSync as statSync7,
35735
35735
  existsSync as existsSync15,
35736
- writeFileSync as writeFileSync8,
35736
+ writeFileSync as writeFileSync7,
35737
35737
  rmSync as rmSync2,
35738
35738
  readFileSync as readFileSync17
35739
35739
  } from "node:fs";
35740
35740
  import { resolve as resolve13, join as join11, extname as extname3, dirname as dirname11 } from "node:path";
35741
35741
  function ensureCleanDir(dir) {
35742
35742
  rmSync2(dir, { recursive: true, force: true });
35743
- mkdirSync7(dir, { recursive: true });
35743
+ mkdirSync6(dir, { recursive: true });
35744
35744
  }
35745
35745
  function copyDirContents(srcDir, destDir) {
35746
35746
  if (!existsSync15(srcDir)) return;
35747
- mkdirSync7(destDir, { recursive: true });
35747
+ mkdirSync6(destDir, { recursive: true });
35748
35748
  for (const entry of readdirSync4(srcDir)) {
35749
35749
  const srcPath = join11(srcDir, entry);
35750
35750
  const destPath = join11(destDir, entry);
35751
35751
  if (statSync7(srcPath).isDirectory()) {
35752
35752
  copyDirContents(srcPath, destPath);
35753
35753
  } else {
35754
- mkdirSync7(dirname11(destPath), { recursive: true });
35754
+ mkdirSync6(dirname11(destPath), { recursive: true });
35755
35755
  copyFileSync2(srcPath, destPath);
35756
35756
  }
35757
35757
  }
35758
35758
  }
35759
35759
  function writeFile(path, content) {
35760
- mkdirSync7(dirname11(path), { recursive: true });
35761
- writeFileSync8(path, content, "utf-8");
35760
+ mkdirSync6(dirname11(path), { recursive: true });
35761
+ writeFileSync7(path, content, "utf-8");
35762
35762
  }
35763
35763
  function writePlatformStatic(buildStaticDir, platformStaticDir) {
35764
- mkdirSync7(platformStaticDir, { recursive: true });
35764
+ mkdirSync6(platformStaticDir, { recursive: true });
35765
35765
  const publicDir = resolve13(buildStaticDir, "public");
35766
35766
  if (existsSync15(publicDir)) {
35767
35767
  copyDirContents(publicDir, platformStaticDir);
@@ -35771,7 +35771,7 @@ function writePlatformStatic(buildStaticDir, platformStaticDir) {
35771
35771
  const runtimeAlias = resolve13(platformStaticDir, "_vesk", "runtime.js");
35772
35772
  const clientPath = resolve13(buildStaticDir, "client.js");
35773
35773
  if (existsSync15(clientPath)) {
35774
- mkdirSync7(dirname11(runtimeAlias), { recursive: true });
35774
+ mkdirSync6(dirname11(runtimeAlias), { recursive: true });
35775
35775
  copyFileSync2(clientPath, runtimeAlias);
35776
35776
  }
35777
35777
  }
@@ -35861,9 +35861,9 @@ __export(plugins_exports, {
35861
35861
  });
35862
35862
  import {
35863
35863
  readFileSync as readFileSync19,
35864
- writeFileSync as writeFileSync9,
35864
+ writeFileSync as writeFileSync8,
35865
35865
  existsSync as existsSync17,
35866
- mkdirSync as mkdirSync8,
35866
+ mkdirSync as mkdirSync7,
35867
35867
  statSync as statSync9
35868
35868
  } from "node:fs";
35869
35869
  import { resolve as resolve15, dirname as dirname13, join as join12, extname as extname4, basename as basename2 } from "node:path";
@@ -35901,8 +35901,8 @@ function readPluginState(veskDir) {
35901
35901
  function writePluginState(veskDir, state) {
35902
35902
  const file = stateFilePath(veskDir);
35903
35903
  const dir = dirname13(file);
35904
- if (!existsSync17(dir)) mkdirSync8(dir, { recursive: true });
35905
- writeFileSync9(file, JSON.stringify(state, null, 2) + "\n", "utf-8");
35904
+ if (!existsSync17(dir)) mkdirSync7(dir, { recursive: true });
35905
+ writeFileSync8(file, JSON.stringify(state, null, 2) + "\n", "utf-8");
35906
35906
  }
35907
35907
  function resolvePackage(appDir, pkg) {
35908
35908
  const require3 = createRequire4(resolve15(appDir, "package.json"));
@@ -36780,15 +36780,15 @@ __export(static_exports, {
36780
36780
  generateSitemap: () => generateSitemap,
36781
36781
  generateSsgRoutes: () => generateSsgRoutes
36782
36782
  });
36783
- import { mkdirSync as mkdirSync9, copyFileSync as copyFileSync3, readdirSync as readdirSync5, statSync as statSync10, existsSync as existsSync18, writeFileSync as writeFileSync10, readFileSync as readFileSync20 } from "node:fs";
36783
+ import { mkdirSync as mkdirSync8, copyFileSync as copyFileSync3, readdirSync as readdirSync5, statSync as statSync10, existsSync as existsSync18, writeFileSync as writeFileSync9, readFileSync as readFileSync20 } from "node:fs";
36784
36784
  import { resolve as resolve16, join as join13 } from "node:path";
36785
36785
  function copyStaticAssets2(publicDir, outDir) {
36786
36786
  const targetDir = resolve16(outDir, "static", "public");
36787
- mkdirSync9(targetDir, { recursive: true });
36787
+ mkdirSync8(targetDir, { recursive: true });
36788
36788
  if (!existsSync18(publicDir))
36789
36789
  return;
36790
36790
  function copyDir(src2, dest) {
36791
- mkdirSync9(dest, { recursive: true });
36791
+ mkdirSync8(dest, { recursive: true });
36792
36792
  const entries = readdirSync5(src2);
36793
36793
  for (const entry of entries) {
36794
36794
  const srcPath = join13(src2, entry);
@@ -36806,7 +36806,7 @@ function copyStaticAssets2(publicDir, outDir) {
36806
36806
  async function generateSsgRoutes(routeTree, appDir, outDir, plugins, headExtra, cssUrls) {
36807
36807
  const { ssg: ssg2 } = await Promise.resolve().then(() => (init_server_render(), server_render_exports));
36808
36808
  const prerenderDir = resolve16(outDir, "prerendered");
36809
- mkdirSync9(prerenderDir, { recursive: true });
36809
+ mkdirSync8(prerenderDir, { recursive: true });
36810
36810
  const ssgOptions = { plugins, headExtra, cssUrls };
36811
36811
  const results = [];
36812
36812
  async function evaluateExport(src2, exportName) {
@@ -36843,8 +36843,8 @@ async function generateSsgRoutes(routeTree, appDir, outDir, plugins, headExtra,
36843
36843
  console.error(`vesk: SSG path escaped output dir \u2014 skipping ${pagePath} (path: ${urlPath})`);
36844
36844
  continue;
36845
36845
  }
36846
- mkdirSync9(resolve16(htmlPath, ".."), { recursive: true });
36847
- writeFileSync10(htmlPath, result.html);
36846
+ mkdirSync8(resolve16(htmlPath, ".."), { recursive: true });
36847
+ writeFileSync9(htmlPath, result.html);
36848
36848
  results.push({ path: urlPath, html: htmlPath, static: result.static, params });
36849
36849
  } catch (e) {
36850
36850
  const message = e instanceof Error ? e.message : String(e);
@@ -36856,8 +36856,8 @@ async function generateSsgRoutes(routeTree, appDir, outDir, plugins, headExtra,
36856
36856
  try {
36857
36857
  const result = await ssg2(src2, null, void 0, ssgOptions);
36858
36858
  const htmlPath = resolve16(prerenderDir, node.fullPath === "/" ? "index.html" : `${node.fullPath.slice(1)}.html`);
36859
- mkdirSync9(resolve16(htmlPath, ".."), { recursive: true });
36860
- writeFileSync10(htmlPath, result.html);
36859
+ mkdirSync8(resolve16(htmlPath, ".."), { recursive: true });
36860
+ writeFileSync9(htmlPath, result.html);
36861
36861
  results.push({ path: node.fullPath, html: htmlPath, static: result.static });
36862
36862
  } catch (e) {
36863
36863
  const message = e instanceof Error ? e.message : String(e);
@@ -36927,7 +36927,7 @@ __export(image_pipeline_exports, {
36927
36927
  collectImageRefs: () => collectImageRefs,
36928
36928
  optimizeImages: () => optimizeImages
36929
36929
  });
36930
- import { mkdirSync as mkdirSync10, writeFileSync as writeFileSync11, readFileSync as readFileSync21, existsSync as existsSync19, readdirSync as readdirSync6, statSync as statSync11 } from "node:fs";
36930
+ import { mkdirSync as mkdirSync9, writeFileSync as writeFileSync10, readFileSync as readFileSync21, existsSync as existsSync19, readdirSync as readdirSync6, statSync as statSync11 } from "node:fs";
36931
36931
  import { spawnSync } from "node:child_process";
36932
36932
  import { resolve as resolve17, extname as extname5, dirname as dirname14, join as join14 } from "node:path";
36933
36933
  import { createRequire as createRequire5 } from "node:module";
@@ -36957,7 +36957,7 @@ function writeProbeMemo(usable) {
36957
36957
  if (path === null)
36958
36958
  return;
36959
36959
  try {
36960
- writeFileSync11(path, JSON.stringify({ usable, at: Date.now() }), "utf-8");
36960
+ writeFileSync10(path, JSON.stringify({ usable, at: Date.now() }), "utf-8");
36961
36961
  } catch {
36962
36962
  }
36963
36963
  }
@@ -36995,8 +36995,8 @@ async function processImage(srcPath, outDir, baseName) {
36995
36995
  const written = [];
36996
36996
  for (const w of OUTPUT_WIDTHS) {
36997
36997
  const outputPath = resolve17(outDir, `${baseName}-${w}w${ext}`);
36998
- mkdirSync10(dirname14(outputPath), { recursive: true });
36999
- writeFileSync11(outputPath, original);
36998
+ mkdirSync9(dirname14(outputPath), { recursive: true });
36999
+ writeFileSync10(outputPath, original);
37000
37000
  written.push(outputPath);
37001
37001
  }
37002
37002
  return written;
@@ -37008,14 +37008,14 @@ async function processImage(srcPath, outDir, baseName) {
37008
37008
  const base = `${baseName}-${w}w`;
37009
37009
  if (w >= originalWidth) {
37010
37010
  const copyPath = resolve17(outDir, `${base}${extname5(srcPath)}`);
37011
- mkdirSync10(dirname14(copyPath), { recursive: true });
37012
- writeFileSync11(copyPath, readFileSync21(srcPath));
37011
+ mkdirSync9(dirname14(copyPath), { recursive: true });
37012
+ writeFileSync10(copyPath, readFileSync21(srcPath));
37013
37013
  generated.push(copyPath);
37014
37014
  continue;
37015
37015
  }
37016
37016
  const resized = image.clone().resize({ width: w, withoutEnlargement: true });
37017
37017
  const jpgPath = resolve17(outDir, `${base}${extname5(srcPath)}`);
37018
- mkdirSync10(dirname14(jpgPath), { recursive: true });
37018
+ mkdirSync9(dirname14(jpgPath), { recursive: true });
37019
37019
  await resized.toFile(jpgPath);
37020
37020
  generated.push(jpgPath);
37021
37021
  for (const fmt of FORMATS) {
@@ -37056,7 +37056,7 @@ function collectImageRefs(appDir) {
37056
37056
  return refs;
37057
37057
  }
37058
37058
  async function optimizeImages(appDir, outDir) {
37059
- mkdirSync10(resolve17(outDir, "static", "public"), { recursive: true });
37059
+ mkdirSync9(resolve17(outDir, "static", "public"), { recursive: true });
37060
37060
  const refs = collectImageRefs(appDir);
37061
37061
  if (refs.length === 0) {
37062
37062
  console.error("vesk images: no <Image> refs found");
@@ -37090,7 +37090,7 @@ async function optimizeImages(appDir, outDir) {
37090
37090
  }
37091
37091
  const baseName = ref2.src.replace(/^\//, "").replace(extname5(ref2.src), "");
37092
37092
  const imageOutDir = resolve17(outDir, "static", "public");
37093
- mkdirSync10(imageOutDir, { recursive: true });
37093
+ mkdirSync9(imageOutDir, { recursive: true });
37094
37094
  const files = await processImage(srcPath, imageOutDir, baseName);
37095
37095
  results.push({ src: ref2.src, baseName, files, widths: OUTPUT_WIDTHS });
37096
37096
  console.error(`vesk images: ${ref2.src} \u2192 ${files.length} variants`);
@@ -37667,7 +37667,7 @@ var platform_deploy_exports = {};
37667
37667
  __export(platform_deploy_exports, {
37668
37668
  emitPlatformOutput: () => emitPlatformOutput
37669
37669
  });
37670
- import { writeFileSync as writeFileSync12, mkdirSync as mkdirSync11, rmSync as rmSync3, cpSync } from "node:fs";
37670
+ import { writeFileSync as writeFileSync11, mkdirSync as mkdirSync10, rmSync as rmSync3, cpSync } from "node:fs";
37671
37671
  import { resolve as resolve20 } from "node:path";
37672
37672
  async function emitPlatformOutput(platform, ctx2) {
37673
37673
  if (platform === "node") return null;
@@ -37702,14 +37702,14 @@ ${inlineStaticSource(staticDir)}`;
37702
37702
  source += `
37703
37703
  ${shell.bootstrap}
37704
37704
  `;
37705
- writeFileSync12(entry, source, "utf-8");
37705
+ writeFileSync11(entry, source, "utf-8");
37706
37706
  let handlerRel;
37707
37707
  if (shell.functionFile) {
37708
37708
  const funcDir = resolve20(outRoot, shell.functionFile.dir);
37709
- mkdirSync11(funcDir, { recursive: true });
37709
+ mkdirSync10(funcDir, { recursive: true });
37710
37710
  if (shell.functionConfig) {
37711
- writeFileSync12(resolve20(funcDir, ".vc-config.json"), JSON.stringify(shell.functionConfig, null, 2), "utf-8");
37712
- writeFileSync12(resolve20(funcDir, "package.json"), JSON.stringify({ type: "module" }, null, 2) + "\n", "utf-8");
37711
+ writeFileSync11(resolve20(funcDir, ".vc-config.json"), JSON.stringify(shell.functionConfig, null, 2), "utf-8");
37712
+ writeFileSync11(resolve20(funcDir, "package.json"), JSON.stringify({ type: "module" }, null, 2) + "\n", "utf-8");
37713
37713
  }
37714
37714
  handlerRel = `${shell.functionFile.dir}/${shell.functionFile.file}`;
37715
37715
  await bundlePlatformHandler({ entry, outfile: resolve20(funcDir, shell.functionFile.file), nodeBuiltins: shell.nodeBuiltins });
@@ -37718,12 +37718,12 @@ ${shell.bootstrap}
37718
37718
  await bundlePlatformHandler({ entry, outfile: resolve20(outRoot, handlerRel), nodeBuiltins: shell.nodeBuiltins });
37719
37719
  }
37720
37720
  for (const file of shell.extraFiles || []) {
37721
- writeFileSync12(resolve20(outRoot, file.path), file.content, "utf-8");
37721
+ writeFileSync11(resolve20(outRoot, file.path), file.content, "utf-8");
37722
37722
  }
37723
37723
  if (platform === "vercel") {
37724
- writeFileSync12(resolve20(outRoot, "config.json"), vercelConfigJson(prerenderedPaths), "utf-8");
37724
+ writeFileSync11(resolve20(outRoot, "config.json"), vercelConfigJson(prerenderedPaths), "utf-8");
37725
37725
  }
37726
- writeFileSync12(resolve20(outRoot, "manifest.json"), JSON.stringify({
37726
+ writeFileSync11(resolve20(outRoot, "manifest.json"), JSON.stringify({
37727
37727
  platform,
37728
37728
  runtime: shell.nodeBuiltins ? "node" : "edge",
37729
37729
  static: shell.staticMode,
@@ -48913,7 +48913,7 @@ __export(migrate_exports, {
48913
48913
  detectInstalledVersion: () => detectInstalledVersion,
48914
48914
  runMigrate: () => runMigrate
48915
48915
  });
48916
- import { readFileSync as readFileSync44, writeFileSync as writeFileSync24, existsSync as existsSync45, statSync as statSync24, readdirSync as readdirSync16 } from "node:fs";
48916
+ import { readFileSync as readFileSync44, writeFileSync as writeFileSync22, existsSync as existsSync45, statSync as statSync24, readdirSync as readdirSync16 } from "node:fs";
48917
48917
  import { join as join31, relative as relative11, extname as extname8 } from "node:path";
48918
48918
  function detectInstalledVersion(projectDir, cliVersion) {
48919
48919
  for (const pkg of ["@vesk/vesk-cli", "@vesk/adapter", "@vesk/compiler"]) {
@@ -49002,7 +49002,7 @@ function runMigrate(options) {
49002
49002
  }
49003
49003
  if (!changed) continue;
49004
49004
  report.filesChanged.push(relPath);
49005
- if (!options.dryRun) writeFileSync24(abs, current3, "utf-8");
49005
+ if (!options.dryRun) writeFileSync22(abs, current3, "utf-8");
49006
49006
  }
49007
49007
  return report;
49008
49008
  }
@@ -49017,7 +49017,7 @@ var init_migrate = __esm({
49017
49017
  });
49018
49018
 
49019
49019
  // src/index.ts
49020
- import { readFileSync as readFileSync45, writeFileSync as writeFileSync25, mkdirSync as mkdirSync22, existsSync as existsSync46 } from "fs";
49020
+ import { readFileSync as readFileSync45, writeFileSync as writeFileSync23, mkdirSync as mkdirSync20, existsSync as existsSync46 } from "fs";
49021
49021
  import { resolve as resolve41, join as join32 } from "path";
49022
49022
  import { fileURLToPath as fileURLToPath9 } from "url";
49023
49023
  import { createRequire as createRequire8 } from "module";
@@ -49598,7 +49598,7 @@ function setRuntimeModule2(mod) {
49598
49598
  }
49599
49599
 
49600
49600
  // ../adapter/dist/index.js
49601
- import { mkdirSync as mkdirSync12, writeFileSync as writeFileSync13, existsSync as existsSync22, readFileSync as readFileSync23 } from "node:fs";
49601
+ import { mkdirSync as mkdirSync11, writeFileSync as writeFileSync12, existsSync as existsSync22, readFileSync as readFileSync23 } from "node:fs";
49602
49602
  import { resolve as resolve21, dirname as dirname17, relative as relative4, basename as basename3, join as join16 } from "node:path";
49603
49603
  import { fileURLToPath as fileURLToPath5 } from "node:url";
49604
49604
 
@@ -49830,7 +49830,7 @@ async function bundleRuntime(appDir, outDir) {
49830
49830
  }
49831
49831
 
49832
49832
  // ../adapter/src/ssr-function.ts
49833
- import { readFileSync as readFileSync7, existsSync as existsSync8, mkdirSync as mkdirSync2, writeFileSync as writeFileSync3 } from "node:fs";
49833
+ import { readFileSync as readFileSync7, existsSync as existsSync8 } from "node:fs";
49834
49834
  import { resolve as resolve7, relative, join as join5 } from "node:path";
49835
49835
 
49836
49836
  // ../compiler/src/server-codegen.ts
@@ -50034,6 +50034,9 @@ function precompilePlan(entryPath) {
50034
50034
  const src2 = readFileSync7(entryPath, "utf-8");
50035
50035
  return JSON.stringify(precompileFile(src2, entryPath));
50036
50036
  }
50037
+ function hydrateInvoke(planExpr) {
50038
+ return `(() => { try { return hydratePrecompile(${planExpr}); } catch { return null; } })()`;
50039
+ }
50037
50040
  function buildParamExtraction(node, urlParts) {
50038
50041
  const parts = [];
50039
50042
  let partIdx = Math.max(0, urlParts.length - 1);
@@ -50118,28 +50121,6 @@ function generateSsrFunction(routeNode, appDir, outDir, componentMap, options) {
50118
50121
  const middlewareCode = options?.middlewareCode || null;
50119
50122
  const headExtra = options?.headExtra || null;
50120
50123
  const pagePath = resolve7(appDir, routeNode.sourceDir, "page.vsk");
50121
- const plansDir = resolve7(outDir, "static", "ssr-plans");
50122
- mkdirSync2(plansDir, { recursive: true });
50123
- function writePlan(planKey, planJSON) {
50124
- const fileName = `plan-${planKey}.mjs`;
50125
- const planFile = resolve7(plansDir, fileName);
50126
- writeFileSync3(planFile, `export const plan = ${planJSON};
50127
- `, "utf-8");
50128
- return relative(resolve7(outDir, "server", "functions"), planFile);
50129
- }
50130
- function planGetterCode(varName, planUrl) {
50131
- return `const ${varName} = (() => {
50132
- let cache = null;
50133
- return async () => {
50134
- if (cache) return cache;
50135
- try {
50136
- const mod = await import(${JSON.stringify(planUrl)});
50137
- cache = hydratePrecompile(mod.plan);
50138
- } catch { cache = null; }
50139
- return cache;
50140
- };
50141
- })();`;
50142
- }
50143
50124
  const parts = routeNode.fullPath.split("/").filter(Boolean);
50144
50125
  const name = routeName(parts);
50145
50126
  const funcDir = resolve7(outDir, "server", "functions");
@@ -50155,15 +50136,15 @@ function generateSsrFunction(routeNode, appDir, outDir, componentMap, options) {
50155
50136
  ...routeNode.layout ? [{ sourceDir: routeNode.sourceDir, layoutCompName: routeNode.layout }] : []
50156
50137
  ];
50157
50138
  const layoutDecls = [];
50158
- for (let li = 0; li < layoutStack.length; li++) {
50159
- const entry = layoutStack[li];
50139
+ for (const entry of layoutStack) {
50160
50140
  const entryPath = resolve7(appDir, entry.sourceDir, "layout.vsk");
50161
50141
  const entrySrc = readFileSync7(entryPath, "utf-8");
50162
50142
  const entryComp = extractCompName(entrySrc) || "Layout";
50163
50143
  const plan = precompilePlan(entryPath);
50164
50144
  layoutDecls.push({
50165
50145
  comp: JSON.stringify(entryComp),
50166
- planUrl: writePlan("layout-" + name + "-" + li, plan)
50146
+ plan,
50147
+ compiled: hydrateInvoke(plan)
50167
50148
  });
50168
50149
  }
50169
50150
  const pagePlan = precompilePlan(pagePath);
@@ -50171,36 +50152,49 @@ function generateSsrFunction(routeNode, appDir, outDir, componentMap, options) {
50171
50152
  const errorPath = resolveErrorFile(routeNode.sourceDir, appDir);
50172
50153
  const errorSrc = errorPath ? readFileSync7(errorPath, "utf-8") : null;
50173
50154
  const errorComp = errorPath ? extractCompName(errorSrc) || "Error" : null;
50174
- const errorVars = errorPath ? `const _errorComp = ${JSON.stringify(errorComp)};
50175
- ${planGetterCode("_errorCompiled", writePlan("error-" + name, precompilePlan(errorPath)))}
50176
- ` : "const _errorComp = null;\nasync function _errorCompiled() { return null; }\n";
50155
+ const errorCompDecl = errorPath ? `const _errorComp = ${JSON.stringify(errorComp)};
50156
+ ` : "const _errorComp = null;\n";
50157
+ const errorPlanExpr = errorPath ? hydrateInvoke(precompilePlan(errorPath)) : "null";
50177
50158
  const notFoundPath = resolveNotFoundFile(routeNode.sourceDir, appDir);
50178
50159
  const notFoundSrc = notFoundPath ? readFileSync7(notFoundPath, "utf-8") : null;
50179
50160
  const notFoundComp = notFoundPath ? extractCompName(notFoundSrc) || "NotFound" : null;
50180
- const notFoundVars = notFoundPath ? `const _notFoundComp = ${JSON.stringify(notFoundComp)};
50181
- ${planGetterCode("_notFoundCompiled", writePlan("notfound-" + name, precompilePlan(notFoundPath)))}
50182
- ` : "const _notFoundComp = null;\nasync function _notFoundCompiled() { return null; }\n";
50183
- const pagePlanUrl = writePlan("page-" + name, pagePlan);
50161
+ const notFoundCompDecl = notFoundPath ? `const _notFoundComp = ${JSON.stringify(notFoundComp)};
50162
+ ` : "const _notFoundComp = null;\n";
50163
+ const notFoundPlanExpr = notFoundPath ? hydrateInvoke(precompilePlan(notFoundPath)) : "null";
50184
50164
  let src2 = "";
50185
50165
  if (layoutDecls.length > 0) {
50186
- const pageGetter = planGetterCode("_pageCompiled", pagePlanUrl);
50187
- const layoutGetters = layoutDecls.map(
50188
- (d, i) => planGetterCode("_layoutCompiled_" + i, d.planUrl)
50189
- );
50190
- src2 = `const _pageComp = ${JSON.stringify(pageComp)};
50166
+ src2 = errorCompDecl + notFoundCompDecl;
50167
+ src2 += `const _pageComp = ${JSON.stringify(pageComp)};
50168
+ `;
50169
+ src2 += `let _pageCompiled = null;
50170
+ function __getPageCompiled() { if (!_pageCompiled) _pageCompiled = (() => { try { return hydratePrecompile(${pagePlan}); } catch { return null; } })(); return _pageCompiled; }
50191
50171
  `;
50192
- src2 += pageGetter + "\n";
50193
- src2 += layoutGetters.join("\n") + "\n";
50194
50172
  src2 += `const _layoutCompList = [${layoutDecls.map((d) => d.comp).join(", ")}];
50195
50173
  `;
50196
- src2 += `const _layoutCompiledList = [${layoutDecls.map((_, i) => "_layoutCompiled_" + i).join(", ")}];
50174
+ src2 += `let _layoutCompiledList = null;
50175
+ function __getLayoutCompiledList() { if (!_layoutCompiledList) { _layoutCompiledList = [
50176
+ ${layoutDecls.map((d) => " " + d.compiled + ",").join("\n")}
50177
+ ]; } return _layoutCompiledList; }
50178
+ `;
50179
+ src2 += `let _errorCompiled = null;
50180
+ function __getErrorCompiled() { if (!_errorCompiled) _errorCompiled = ${errorPlanExpr}; return _errorCompiled; }
50181
+ `;
50182
+ src2 += `let _notFoundCompiled = null;
50183
+ function __getNotFoundCompiled() { if (!_notFoundCompiled) _notFoundCompiled = ${notFoundPlanExpr}; return _notFoundCompiled; }
50197
50184
  `;
50198
- src2 += errorVars + notFoundVars;
50199
50185
  } else {
50200
- src2 = `const _comp = ${JSON.stringify(pageComp)};
50186
+ src2 = errorCompDecl + notFoundCompDecl;
50187
+ src2 += `const _comp = ${JSON.stringify(pageComp)};
50188
+ `;
50189
+ src2 += `let _compiled = null;
50190
+ function __getCompiled() { if (!_compiled) _compiled = (() => { try { return hydratePrecompile(${pagePlan}); } catch { return null; } })(); return _compiled; }
50191
+ `;
50192
+ src2 += `let _errorCompiled = null;
50193
+ function __getErrorCompiled() { if (!_errorCompiled) _errorCompiled = ${errorPlanExpr}; return _errorCompiled; }
50194
+ `;
50195
+ src2 += `let _notFoundCompiled = null;
50196
+ function __getNotFoundCompiled() { if (!_notFoundCompiled) _notFoundCompiled = ${notFoundPlanExpr}; return _notFoundCompiled; }
50201
50197
  `;
50202
- src2 += planGetterCode("_compiled", pagePlanUrl) + "\n";
50203
- src2 += errorVars + notFoundVars;
50204
50198
  }
50205
50199
  const urlParts = routeNode.fullPath.split("/").filter(Boolean);
50206
50200
  const paramExprs = buildParamExtraction(routeNode, urlParts);
@@ -50214,24 +50208,21 @@ ${planGetterCode("_notFoundCompiled", writePlan("notfound-" + name, precompilePl
50214
50208
  let registryCode = "";
50215
50209
  const compRegEntries = [];
50216
50210
  const compMap = componentMap || /* @__PURE__ */ new Map();
50217
- let compCounter = 0;
50211
+ const regPlans = [];
50218
50212
  for (const [compName, compPath] of compMap) {
50219
50213
  const plan = precompilePlan(compPath);
50220
- const compPlanUrl = writePlan("comp-" + name + "-" + compCounter, plan);
50221
- const compGetter = "_compiled_" + compCounter;
50222
- compCounter++;
50223
- compRegEntries.push(` (() => {
50224
- ${planGetterCode(compGetter, compPlanUrl)}
50225
- __componentRegistry.set(${JSON.stringify(compName)}, async (props, __registry, __vesk) => {
50226
- const result = await renderPage('', ${JSON.stringify(compName)}, props, __registry, { hydrate: true, cached: await ${compGetter}() });
50214
+ regPlans.push(` __regPlans.set(${JSON.stringify(compName)}, ${JSON.stringify(plan)});`);
50215
+ compRegEntries.push(` __componentRegistry.set(${JSON.stringify(compName)}, async (props, __registry, __vesk) => {
50216
+ let _compiled = __regCompiled.get(${JSON.stringify(compName)});
50217
+ if (!_compiled) { _compiled = hydratePrecompile(__regPlans.get(${JSON.stringify(compName)})); __regCompiled.set(${JSON.stringify(compName)}, _compiled); }
50218
+ const result = await renderPage('', ${JSON.stringify(compName)}, props, __registry, { hydrate: true, cached: _compiled });
50227
50219
  return result.body;
50228
- });
50229
- })();`);
50220
+ });`);
50230
50221
  }
50231
50222
  if (compRegEntries.length > 0) {
50232
- registryCode = "const __componentRegistry = new Map();\n{\n" + compRegEntries.join("\n") + "\n}\n";
50223
+ registryCode = "const __componentRegistry = new Map();\nconst __regPlans = new Map();\nconst __regCompiled = new Map();\n{\n" + regPlans.join("\n") + "\n" + compRegEntries.join("\n") + "\n}\n";
50233
50224
  } else {
50234
- registryCode = "const __componentRegistry = new Map();\n";
50225
+ registryCode = "const __componentRegistry = new Map();\nconst __regPlans = new Map();\nconst __regCompiled = new Map();\n";
50235
50226
  }
50236
50227
  let htmlFnCode;
50237
50228
  if (layoutDecls.length > 0) {
@@ -50239,7 +50230,7 @@ ${planGetterCode(compGetter, compPlanUrl)}
50239
50230
  "async function __renderErrorBody(props) {",
50240
50231
  ' if (!_errorComp) throw props.error || new Error("Internal Server Error");',
50241
50232
  " try {",
50242
- " const result = await renderPage('', _errorComp, props, __componentRegistry, { hydrate: true, cached: await _errorCompiled() });",
50233
+ " const result = await renderPage('', _errorComp, props, __componentRegistry, { hydrate: true, cached: __getErrorCompiled() });",
50243
50234
  " return result.body;",
50244
50235
  " } catch {",
50245
50236
  ` return ${JSON.stringify(renderDefaultErrorFragment())};`,
@@ -50252,7 +50243,7 @@ ${planGetterCode(compGetter, compPlanUrl)}
50252
50243
  "async function __renderNotFoundBody(props) {",
50253
50244
  " if (!_notFoundComp) return null;",
50254
50245
  " try {",
50255
- " const result = await renderPage('', _notFoundComp, props, __componentRegistry, { hydrate: true, cached: await _notFoundCompiled() });",
50246
+ " const result = await renderPage('', _notFoundComp, props, __componentRegistry, { hydrate: true, cached: __getNotFoundCompiled() });",
50256
50247
  " return result.body;",
50257
50248
  " } catch {",
50258
50249
  " return null;",
@@ -50266,11 +50257,11 @@ ${planGetterCode(compGetter, compPlanUrl)}
50266
50257
  " let _b = body;",
50267
50258
  ' let _h = head || "";',
50268
50259
  " for (let _i = _layoutCompList.length - 1; _i > 0; _i--) {",
50269
- " const _inner = await renderPage('', _layoutCompList[_i], { params, children: _b }, __componentRegistry, { hydrate: true, cached: await _layoutCompiledList[_i]() });",
50260
+ " const _inner = await renderPage('', _layoutCompList[_i], { params, children: _b }, __componentRegistry, { hydrate: true, cached: __getLayoutCompiledList()[_i] });",
50270
50261
  " _b = _inner.body;",
50271
50262
  " if (_inner.head) _h = _inner.head + _h;",
50272
50263
  " }",
50273
- " return renderFullPage('', _layoutCompList[0], { params, children: _b }, __componentRegistry, { hydrate: true, cached: await _layoutCompiledList[0]()" + bakedOptions + clientScriptOption + dataScriptOption + ", pageHead: _h });",
50264
+ " return renderFullPage('', _layoutCompList[0], { params, children: _b }, __componentRegistry, { hydrate: true, cached: __getLayoutCompiledList()[0]" + bakedOptions + clientScriptOption + dataScriptOption + ", pageHead: _h });",
50274
50265
  "}",
50275
50266
  "",
50276
50267
  "async function __renderHtml(params, requestUrl) {",
@@ -50281,7 +50272,7 @@ ${planGetterCode(compGetter, compPlanUrl)}
50281
50272
  " let notFound = false;",
50282
50273
  " const __expose = process.env.NODE_ENV !== 'production';",
50283
50274
  " try {",
50284
- " page = await renderPage('', _pageComp, { params }, __componentRegistry, { hydrate: true, cached: await _pageCompiled() });",
50275
+ " page = await renderPage('', _pageComp, { params }, __componentRegistry, { hydrate: true, cached: __getPageCompiled() });",
50285
50276
  " } catch (err) {",
50286
50277
  " if (err && err.name === 'Redirect') throw err;",
50287
50278
  " if (err && err.name === 'NotFoundError') {",
@@ -50318,7 +50309,7 @@ ${planGetterCode(compGetter, compPlanUrl)}
50318
50309
  " const message = err && typeof err === 'object' && 'message' in err ? String(err.message) : String(err);",
50319
50310
  " const stack = err && typeof err === 'object' && 'stack' in err ? String(err.stack) : '';",
50320
50311
  " const props = { params, statusCode: 500, error: __expose ? message : 'Internal Server Error', stack: __expose ? stack : '', url: requestUrl || '' };",
50321
- " return renderFullPage('', _errorComp, props, __componentRegistry, { hydrate: true, cached: await _errorCompiled()" + bakedOptions + clientScriptOption + dataScriptOption + " });",
50312
+ " return renderFullPage('', _errorComp, props, __componentRegistry, { hydrate: true, cached: __getErrorCompiled()" + bakedOptions + clientScriptOption + dataScriptOption + " });",
50322
50313
  "}",
50323
50314
  "",
50324
50315
  "async function __renderHtml(params, requestUrl) {",
@@ -50333,7 +50324,7 @@ ${planGetterCode(compGetter, compPlanUrl)}
50333
50324
  // though it runs outside the ALS scope.
50334
50325
  " const __streamToken = globalThis.__vsk_ssr_token || '';",
50335
50326
  " try {",
50336
- " stream = renderPageStream('', _comp, { params }, __componentRegistry, { hydrate: true, cached: await _compiled()" + bakedOptions + clientScriptOption + dataScriptOption + " });",
50327
+ " stream = renderPageStream('', _comp, { params }, __componentRegistry, { hydrate: true, cached: __getCompiled()" + bakedOptions + clientScriptOption + dataScriptOption + " });",
50337
50328
  " } catch (err) {",
50338
50329
  " if (err && (err.name === 'NotFoundError' || err.name === 'Redirect')) throw err;",
50339
50330
  " const html = await __renderErrorFullPage(params, requestUrl, err);",
@@ -50407,7 +50398,7 @@ ${planGetterCode(compGetter, compPlanUrl)}
50407
50398
  " try {",
50408
50399
  " let dataPage;",
50409
50400
  " try {",
50410
- " dataPage = await renderPage('', _pageComp, { params }, __componentRegistry, { hydrate: true, cached: await _pageCompiled() });",
50401
+ " dataPage = await renderPage('', _pageComp, { params }, __componentRegistry, { hydrate: true, cached: __getPageCompiled() });",
50411
50402
  " } catch (err) {",
50412
50403
  " if (err && (err.name === 'NotFoundError' || err.name === 'Redirect')) throw err;",
50413
50404
  " const message = err && typeof err === 'object' && 'message' in err ? String(err.message) : String(err);",
@@ -50415,7 +50406,7 @@ ${planGetterCode(compGetter, compPlanUrl)}
50415
50406
  " }",
50416
50407
  " let _dataHead = dataPage.head || '';",
50417
50408
  " for (let _i = _layoutCompList.length - 1; _i >= 0; _i--) {",
50418
- " const _dl = await renderPage('', _layoutCompList[_i], { params, children: '' }, __componentRegistry, { hydrate: true, cached: await _layoutCompiledList[_i]() });",
50409
+ " const _dl = await renderPage('', _layoutCompList[_i], { params, children: '' }, __componentRegistry, { hydrate: true, cached: __getLayoutCompiledList()[_i] });",
50419
50410
  " _dataHead = (_dl.head || '') + _dataHead;",
50420
50411
  " }",
50421
50412
  " return new Response(JSON.stringify({ path: url.pathname, params, props: dataPage.props || { params }, head: _dataHead }), {",
@@ -50433,7 +50424,7 @@ ${planGetterCode(compGetter, compPlanUrl)}
50433
50424
  " try {",
50434
50425
  " let dataPage;",
50435
50426
  " try {",
50436
- " dataPage = await renderPage('', _comp, { params }, __componentRegistry, { hydrate: true, cached: await _compiled() });",
50427
+ " dataPage = await renderPage('', _comp, { params }, __componentRegistry, { hydrate: true, cached: __getCompiled() });",
50437
50428
  " } catch (err) {",
50438
50429
  " if (err && (err.name === 'NotFoundError' || err.name === 'Redirect')) throw err;",
50439
50430
  " const message = err && typeof err === 'object' && 'message' in err ? String(err.message) : String(err);",
@@ -51089,7 +51080,7 @@ ${extracted.body}
51089
51080
 
51090
51081
  // ../adapter/src/events.ts
51091
51082
  init_esbuild_fallback();
51092
- import { writeFileSync as writeFileSync4, unlinkSync as unlinkSync2, mkdirSync as mkdirSync3 } from "node:fs";
51083
+ import { writeFileSync as writeFileSync3, unlinkSync as unlinkSync2, mkdirSync as mkdirSync2 } from "node:fs";
51093
51084
  import { resolve as resolve9 } from "node:path";
51094
51085
 
51095
51086
  // ../compiler/src/events.ts
@@ -51174,9 +51165,9 @@ async function compileEvents(appDir, outDir) {
51174
51165
  const sourcePath2 = collectEventsFile(appDir);
51175
51166
  if (!sourcePath2) return false;
51176
51167
  const serverDir = resolve9(outDir, "server");
51177
- mkdirSync3(serverDir, { recursive: true });
51168
+ mkdirSync2(serverDir, { recursive: true });
51178
51169
  const entryFile = resolve9(serverDir, `.events-entry-${buildId2++}.mjs`);
51179
- writeFileSync4(entryFile, buildEventsEntry(sourcePath2), "utf-8");
51170
+ writeFileSync3(entryFile, buildEventsEntry(sourcePath2), "utf-8");
51180
51171
  try {
51181
51172
  const result = await build({
51182
51173
  entryPoints: [entryFile],
@@ -51206,7 +51197,7 @@ async function compileEvents(appDir, outDir) {
51206
51197
 
51207
51198
  // ../adapter/src/client-bundle.ts
51208
51199
  init_esbuild_fallback();
51209
- import { readFileSync as readFileSync13, existsSync as existsSync11, writeFileSync as writeFileSync5, unlinkSync as unlinkSync3, statSync as statSync4, rmSync, mkdtempSync, mkdirSync as mkdirSync4 } from "node:fs";
51200
+ import { readFileSync as readFileSync13, existsSync as existsSync11, writeFileSync as writeFileSync4, unlinkSync as unlinkSync3, statSync as statSync4, rmSync, mkdtempSync, mkdirSync as mkdirSync3 } from "node:fs";
51210
51201
  import { resolve as resolve10, join as join8, dirname as dirname9, relative as relative2, sep } from "node:path";
51211
51202
  import { fileURLToPath as fileURLToPath2 } from "node:url";
51212
51203
  import { tmpdir } from "node:os";
@@ -52248,7 +52239,7 @@ ${body}
52248
52239
  members.push(` ${JSON.stringify(source)}: m${i},`);
52249
52240
  });
52250
52241
  lines.push(`globalThis.__veskShared = { ${members.join("\n")} };`);
52251
- writeFileSync5(sharedEntry, lines.join("\n"));
52242
+ writeFileSync4(sharedEntry, lines.join("\n"));
52252
52243
  const appTsconfig = findTsconfigPath(appDir);
52253
52244
  const runtimeShim = join8(tmpBase, "runtime-shim.js");
52254
52245
  const runtimeLines = [
@@ -52263,7 +52254,7 @@ ${body}
52263
52254
  for (const name of [...sharedRuntimeNames].sort()) {
52264
52255
  runtimeLines.push(`export const ${name} = __r(${JSON.stringify(name)});`);
52265
52256
  }
52266
- writeFileSync5(runtimeShim, runtimeLines.join("\n") + "\n");
52257
+ writeFileSync4(runtimeShim, runtimeLines.join("\n") + "\n");
52267
52258
  const result = await build({
52268
52259
  entryPoints: [sharedEntry],
52269
52260
  bundle: true,
@@ -52296,7 +52287,7 @@ ${body}
52296
52287
  for (const name of [...named].sort()) {
52297
52288
  shimLines.push(`export const ${name} = m[${JSON.stringify(name)}];`);
52298
52289
  }
52299
- writeFileSync5(shim, shimLines.join("\n") + "\n");
52290
+ writeFileSync4(shim, shimLines.join("\n") + "\n");
52300
52291
  chunkAlias[source] = shim;
52301
52292
  });
52302
52293
  } catch (e) {
@@ -52324,7 +52315,7 @@ ${body}
52324
52315
  const __hydrators = globalThis.__hydrators || (globalThis.__hydrators = {});
52325
52316
  ${entry.code}
52326
52317
  `;
52327
- writeFileSync5(tmpFile, toBundle);
52318
+ writeFileSync4(tmpFile, toBundle);
52328
52319
  const serverOnlyHits = [];
52329
52320
  const driverHits = [];
52330
52321
  const eagerHits = [];
@@ -52579,14 +52570,14 @@ async function bundleRuntimeNames(runtimeDir, names, strict = false) {
52579
52570
  const unique = [...new Set(names)];
52580
52571
  try {
52581
52572
  try {
52582
- mkdirSync4(dirname9(entry), { recursive: true });
52573
+ mkdirSync3(dirname9(entry), { recursive: true });
52583
52574
  } catch {
52584
52575
  }
52585
52576
  try {
52586
52577
  rmSync(entry);
52587
52578
  } catch {
52588
52579
  }
52589
- writeFileSync5(entry, `export { ${unique.join(", ")} } from ${JSON.stringify(indexClient)};
52580
+ writeFileSync4(entry, `export { ${unique.join(", ")} } from ${JSON.stringify(indexClient)};
52590
52581
  `);
52591
52582
  const result = await build({
52592
52583
  entryPoints: [esbuildPath(entry)],
@@ -52790,14 +52781,14 @@ function generateManifest(routes, ssrRoutes, apiRoutes, staticRoutes, middleware
52790
52781
 
52791
52782
  // ../adapter/src/static.ts
52792
52783
  init_paths();
52793
- import { mkdirSync as mkdirSync5, copyFileSync, readdirSync as readdirSync3, statSync as statSync6, existsSync as existsSync13, writeFileSync as writeFileSync6, readFileSync as readFileSync15 } from "node:fs";
52784
+ import { mkdirSync as mkdirSync4, copyFileSync, readdirSync as readdirSync3, statSync as statSync6, existsSync as existsSync13, writeFileSync as writeFileSync5, readFileSync as readFileSync15 } from "node:fs";
52794
52785
  import { resolve as resolve12, join as join9 } from "node:path";
52795
52786
  function copyStaticAssets(publicDir, outDir) {
52796
52787
  const targetDir = resolve12(outDir, "static", "public");
52797
- mkdirSync5(targetDir, { recursive: true });
52788
+ mkdirSync4(targetDir, { recursive: true });
52798
52789
  if (!existsSync13(publicDir)) return;
52799
52790
  function copyDir(src2, dest) {
52800
- mkdirSync5(dest, { recursive: true });
52791
+ mkdirSync4(dest, { recursive: true });
52801
52792
  const entries = readdirSync3(src2);
52802
52793
  for (const entry of entries) {
52803
52794
  const srcPath = join9(src2, entry);
@@ -52854,7 +52845,7 @@ async function reportServerError(err, options) {
52854
52845
  init_paths();
52855
52846
 
52856
52847
  // ../adapter/src/load-config.ts
52857
- import { existsSync as existsSync14, readFileSync as readFileSync16, writeFileSync as writeFileSync7, mkdirSync as mkdirSync6 } from "node:fs";
52848
+ import { existsSync as existsSync14, readFileSync as readFileSync16, writeFileSync as writeFileSync6, mkdirSync as mkdirSync5 } from "node:fs";
52858
52849
  import { join as join10, dirname as dirname10 } from "node:path";
52859
52850
  import { pathToFileURL as pathToFileURL2 } from "node:url";
52860
52851
  import { createRequire as createRequire3 } from "node:module";
@@ -52899,8 +52890,8 @@ async function loadVeskConfig2(projectDir) {
52899
52890
  js = `const {${injectKeys.join(",")}} = globalThis.__vesk_inject;
52900
52891
  ` + js;
52901
52892
  const tmpFile = join10(projectDir, ".vesk", "config.loader.tmp.mjs");
52902
- mkdirSync6(dirname10(tmpFile), { recursive: true });
52903
- writeFileSync7(tmpFile, js, "utf-8");
52893
+ mkdirSync5(dirname10(tmpFile), { recursive: true });
52894
+ writeFileSync6(tmpFile, js, "utf-8");
52904
52895
  globalThis.__vesk_inject = inject;
52905
52896
  try {
52906
52897
  const mod = await import(`${pathToFileURL2(tmpFile).href}?t=${Date.now()}`);
@@ -54085,7 +54076,7 @@ async function build2(appDir, options) {
54085
54076
  resolve21(outDir, "prerendered")
54086
54077
  ];
54087
54078
  for (const d of dirs)
54088
- mkdirSync12(d, { recursive: true });
54079
+ mkdirSync11(d, { recursive: true });
54089
54080
  markPhase("config+dirs");
54090
54081
  const cssSourcePath = resolveUserCssPath(appDir);
54091
54082
  if (cssSourcePath !== null) {
@@ -54103,7 +54094,7 @@ async function build2(appDir, options) {
54103
54094
  }
54104
54095
  }
54105
54096
  }
54106
- writeFileSync13(cssTarget, finalCss, "utf-8");
54097
+ writeFileSync12(cssTarget, finalCss, "utf-8");
54107
54098
  if (tailwindActive) {
54108
54099
  console.error(`vesk build: css \u2192 static/global.css (${finalCss.length} bytes)`);
54109
54100
  } else {
@@ -54155,7 +54146,7 @@ async function build2(appDir, options) {
54155
54146
  const hashed = !options?.hmr;
54156
54147
  const clientAsset = describeAsset("client.js", main);
54157
54148
  const clientFileName = hashed ? clientAsset.fileName : "client.js";
54158
- writeFileSync13(resolve21(staticDir, clientFileName), main, "utf-8");
54149
+ writeFileSync12(resolve21(staticDir, clientFileName), main, "utf-8");
54159
54150
  const clientUrl = `/_vesk/static/${clientFileName}`;
54160
54151
  const mode = chunks.length > 0 ? "code-split" : "monolithic";
54161
54152
  console.error(`vesk build: client \u2192 static/${clientFileName} (${main.length} bytes, ${mode}${hashed ? `, ${clientAsset.hash}` : ""})`);
@@ -54163,7 +54154,7 @@ async function build2(appDir, options) {
54163
54154
  for (const chunk of chunks) {
54164
54155
  const asset = describeAsset(chunk.name, chunk.code);
54165
54156
  emittedAssets.push(asset);
54166
- writeFileSync13(resolve21(staticDir, hashed ? asset.fileName : chunk.name), chunk.code, "utf-8");
54157
+ writeFileSync12(resolve21(staticDir, hashed ? asset.fileName : chunk.name), chunk.code, "utf-8");
54167
54158
  console.error(`vesk build: chunk \u2192 static/${hashed ? asset.fileName : chunk.name} (${chunk.code.length} bytes${hashed ? `, ${asset.hash}` : ""})`);
54168
54159
  }
54169
54160
  const clientIntegrity = hashed ? clientAsset.integrity : void 0;
@@ -54187,7 +54178,7 @@ async function build2(appDir, options) {
54187
54178
  }
54188
54179
  const ssrAncestorLayouts = isStandalone ? [] : ancestorLayouts;
54189
54180
  const { funcPath, funcCode, name } = generateSsrFunction(node, appDir, outDir, componentMap, { ancestorLayouts: ssrAncestorLayouts, middlewareCode: mwCode, headExtra: pluginHeadExtra, clientScriptUrl: clientUrl, clientScriptIntegrity: clientIntegrity });
54190
- writeFileSync13(funcPath, funcCode, "utf-8");
54181
+ writeFileSync12(funcPath, funcCode, "utf-8");
54191
54182
  const pagePath = resolve21(appDir, node.sourceDir, "page.vsk");
54192
54183
  if (existsSync22(pagePath)) {
54193
54184
  const src2 = readFileSync23(pagePath, "utf-8");
@@ -54225,7 +54216,7 @@ async function build2(appDir, options) {
54225
54216
  for (const node of nodes) {
54226
54217
  if (node.filePath) {
54227
54218
  const { funcPath, funcCode, name } = generateApiFunction(node, apiDir, outDir);
54228
- writeFileSync13(funcPath, funcCode, "utf-8");
54219
+ writeFileSync12(funcPath, funcCode, "utf-8");
54229
54220
  apiRoutes.push(node);
54230
54221
  console.error(`vesk build: api \u2192 server/api/${name}.js (${node.fullPath})`);
54231
54222
  }
@@ -54238,7 +54229,7 @@ async function build2(appDir, options) {
54238
54229
  if (mwChain.length > 0) {
54239
54230
  const mwCode = compileMiddleware(mwChain, appDir);
54240
54231
  if (mwCode) {
54241
- writeFileSync13(resolve21(outDir, "server", "middleware.js"), mwCode, "utf-8");
54232
+ writeFileSync12(resolve21(outDir, "server", "middleware.js"), mwCode, "utf-8");
54242
54233
  middlewareEnabled = true;
54243
54234
  console.error(`vesk build: mw \u2192 server/middleware.js (${mwChain.length} middlewares)`);
54244
54235
  }
@@ -54276,13 +54267,13 @@ async function build2(appDir, options) {
54276
54267
  const sitemapOverride = resolve21(publicDirResolved, "sitemap.xml");
54277
54268
  if (!existsSync22(sitemapOverride)) {
54278
54269
  const sitemap = generateSitemap2(routeTree, ssrRoutes, prerenderedRoutes, { siteUrl });
54279
- writeFileSync13(sitemapOverride, sitemap, "utf-8");
54270
+ writeFileSync12(sitemapOverride, sitemap, "utf-8");
54280
54271
  console.error(`vesk build: seo \u2192 static/public/sitemap.xml (${sitemap.length} bytes)`);
54281
54272
  }
54282
54273
  const robotsOverride = resolve21(publicDirResolved, "robots.txt");
54283
54274
  if (!existsSync22(robotsOverride)) {
54284
54275
  const robots = generateRobotsTxt2(siteUrl);
54285
- writeFileSync13(robotsOverride, robots, "utf-8");
54276
+ writeFileSync12(robotsOverride, robots, "utf-8");
54286
54277
  console.error(`vesk build: seo \u2192 static/public/robots.txt (${robots.length} bytes)`);
54287
54278
  }
54288
54279
  }
@@ -54296,7 +54287,7 @@ async function build2(appDir, options) {
54296
54287
  client: { file: clientFileName, url: clientUrl, hash: clientAsset.hash, bytes: clientAsset.bytes, integrity: clientAsset.integrity },
54297
54288
  chunks: emittedAssets.slice(1).map((a) => ({ file: a.fileName, hash: a.hash, bytes: a.bytes, integrity: a.integrity }))
54298
54289
  };
54299
- writeFileSync13(resolve21(outDir, "config.json"), JSON.stringify(manifest, null, 2) + "\n", "utf-8");
54290
+ writeFileSync12(resolve21(outDir, "config.json"), JSON.stringify(manifest, null, 2) + "\n", "utf-8");
54300
54291
  console.error("vesk build: config \u2192 config.json");
54301
54292
  {
54302
54293
  const { detectPlatform: detectPlatform2 } = await Promise.resolve().then(() => (init_platform(), platform_exports));
@@ -54344,7 +54335,7 @@ vesk build: done (${outDir})`);
54344
54335
  init_seo_audit();
54345
54336
 
54346
54337
  // src/dev-server.ts
54347
- import { readFileSync as readFileSync41, watch, statSync as statSync22, existsSync as existsSync43, mkdirSync as mkdirSync21, readdirSync as readdirSync14, writeFileSync as writeFileSync23, renameSync as renameSync2 } from "node:fs";
54338
+ import { readFileSync as readFileSync41, watch, statSync as statSync22, existsSync as existsSync43, mkdirSync as mkdirSync19, readdirSync as readdirSync14, writeFileSync as writeFileSync21, renameSync as renameSync2 } from "node:fs";
54348
54339
  import { createHash as createHash3 } from "node:crypto";
54349
54340
  import { resolve as resolve39, extname as extname7, join as join28, dirname as dirname27, relative as relative9 } from "node:path";
54350
54341
  import { createServer as createServer2 } from "node:http";
@@ -58435,7 +58426,7 @@ function guessProjectRoots2(dir) {
58435
58426
  }
58436
58427
 
58437
58428
  // ../adapter/dist/client-bundle.js
58438
- import { readFileSync as readFileSync26, existsSync as existsSync28, writeFileSync as writeFileSync14, unlinkSync as unlinkSync4, statSync as statSync15, rmSync as rmSync4, mkdtempSync as mkdtempSync2, mkdirSync as mkdirSync13 } from "node:fs";
58429
+ import { readFileSync as readFileSync26, existsSync as existsSync28, writeFileSync as writeFileSync13, unlinkSync as unlinkSync4, statSync as statSync15, rmSync as rmSync4, mkdtempSync as mkdtempSync2, mkdirSync as mkdirSync12 } from "node:fs";
58439
58430
  import { resolve as resolve24, join as join21, dirname as dirname19, relative as relative6, sep as sep3 } from "node:path";
58440
58431
  import { fileURLToPath as fileURLToPath6 } from "node:url";
58441
58432
  import { tmpdir as tmpdir3 } from "node:os";
@@ -59334,7 +59325,7 @@ ${body}
59334
59325
  members.push(` ${JSON.stringify(source)}: m${i},`);
59335
59326
  });
59336
59327
  lines.push(`globalThis.__veskShared = { ${members.join("\n")} };`);
59337
- writeFileSync14(sharedEntry, lines.join("\n"));
59328
+ writeFileSync13(sharedEntry, lines.join("\n"));
59338
59329
  const appTsconfig = findTsconfigPath(appDir);
59339
59330
  const runtimeShim = join21(tmpBase, "runtime-shim.js");
59340
59331
  const runtimeLines = [
@@ -59350,7 +59341,7 @@ ${body}
59350
59341
  for (const name of [...sharedRuntimeNames].sort()) {
59351
59342
  runtimeLines.push(`export const ${name} = __r(${JSON.stringify(name)});`);
59352
59343
  }
59353
- writeFileSync14(runtimeShim, runtimeLines.join("\n") + "\n");
59344
+ writeFileSync13(runtimeShim, runtimeLines.join("\n") + "\n");
59354
59345
  const result = await build3({
59355
59346
  entryPoints: [sharedEntry],
59356
59347
  bundle: true,
@@ -59384,7 +59375,7 @@ ${body}
59384
59375
  for (const name of [...named].sort()) {
59385
59376
  shimLines.push(`export const ${name} = m[${JSON.stringify(name)}];`);
59386
59377
  }
59387
- writeFileSync14(shim, shimLines.join("\n") + "\n");
59378
+ writeFileSync13(shim, shimLines.join("\n") + "\n");
59388
59379
  chunkAlias[source] = shim;
59389
59380
  });
59390
59381
  } catch (e) {
@@ -59414,7 +59405,7 @@ ${body}
59414
59405
  const __hydrators = globalThis.__hydrators || (globalThis.__hydrators = {});
59415
59406
  ${entry.code}
59416
59407
  `;
59417
- writeFileSync14(tmpFile, toBundle);
59408
+ writeFileSync13(tmpFile, toBundle);
59418
59409
  const serverOnlyHits = [];
59419
59410
  const driverHits = [];
59420
59411
  const eagerHits = [];
@@ -59685,14 +59676,14 @@ async function bundleRuntimeNames2(runtimeDir, names, strict = false) {
59685
59676
  const unique = [...new Set(names)];
59686
59677
  try {
59687
59678
  try {
59688
- mkdirSync13(dirname19(entry), { recursive: true });
59679
+ mkdirSync12(dirname19(entry), { recursive: true });
59689
59680
  } catch {
59690
59681
  }
59691
59682
  try {
59692
59683
  rmSync4(entry);
59693
59684
  } catch {
59694
59685
  }
59695
- writeFileSync14(entry, `export { ${unique.join(", ")} } from ${JSON.stringify(indexClient)};
59686
+ writeFileSync13(entry, `export { ${unique.join(", ")} } from ${JSON.stringify(indexClient)};
59696
59687
  `);
59697
59688
  const result = await build3({
59698
59689
  entryPoints: [esbuildPath2(entry)],
@@ -59925,7 +59916,7 @@ import { resolve as resolve28 } from "node:path";
59925
59916
 
59926
59917
  // ../adapter/dist/plugins.js
59927
59918
  init_paths();
59928
- import { readFileSync as readFileSync28, writeFileSync as writeFileSync15, existsSync as existsSync30, mkdirSync as mkdirSync14, statSync as statSync17 } from "node:fs";
59919
+ import { readFileSync as readFileSync28, writeFileSync as writeFileSync14, existsSync as existsSync30, mkdirSync as mkdirSync13, statSync as statSync17 } from "node:fs";
59929
59920
  import { resolve as resolve26, dirname as dirname20, join as join22, extname as extname6, basename as basename6 } from "node:path";
59930
59921
  import { createRequire as createRequire6 } from "node:module";
59931
59922
  import { spawn as spawn2 } from "node:child_process";
@@ -59969,8 +59960,8 @@ function writePluginState2(veskDir, state) {
59969
59960
  const file = stateFilePath2(veskDir);
59970
59961
  const dir = dirname20(file);
59971
59962
  if (!existsSync30(dir))
59972
- mkdirSync14(dir, { recursive: true });
59973
- writeFileSync15(file, JSON.stringify(state, null, 2) + "\n", "utf-8");
59963
+ mkdirSync13(dir, { recursive: true });
59964
+ writeFileSync14(file, JSON.stringify(state, null, 2) + "\n", "utf-8");
59974
59965
  }
59975
59966
  function resolvePackage2(appDir, pkg) {
59976
59967
  const require3 = createRequire6(resolve26(appDir, "package.json"));
@@ -60901,7 +60892,7 @@ var __internals2 = {
60901
60892
  };
60902
60893
 
60903
60894
  // ../adapter/dist/dev-config.js
60904
- import { existsSync as existsSync31, readFileSync as readFileSync29, writeFileSync as writeFileSync16, mkdirSync as mkdirSync15, mkdtempSync as mkdtempSync3, rmSync as rmSync5 } from "node:fs";
60895
+ import { existsSync as existsSync31, readFileSync as readFileSync29, writeFileSync as writeFileSync15, mkdirSync as mkdirSync14, mkdtempSync as mkdtempSync3, rmSync as rmSync5 } from "node:fs";
60905
60896
  import { tmpdir as tmpdir4 } from "node:os";
60906
60897
  import { resolve as resolve27, dirname as dirname21, join as join23 } from "node:path";
60907
60898
  init_parser();
@@ -60931,11 +60922,11 @@ async function parseConfigSource(source, isTs, projectDir) {
60931
60922
  js = `const { defineConfig, definePlugin, preset } = globalThis.__vesk_inject;
60932
60923
  ` + js;
60933
60924
  }
60934
- const base = projectDir ? (mkdirSync15(join23(projectDir, ".vesk"), { recursive: true }), join23(projectDir, ".vesk")) : void 0;
60925
+ const base = projectDir ? (mkdirSync14(join23(projectDir, ".vesk"), { recursive: true }), join23(projectDir, ".vesk")) : void 0;
60935
60926
  const dir = base ? mkdtempSync3(join23(base, "cfg-")) : mkdtempSync3(join23(tmpdir4(), "vesk-cfg-"));
60936
60927
  const tmpFile = join23(dir, "config.mjs");
60937
60928
  try {
60938
- writeFileSync16(tmpFile, js, "utf-8");
60929
+ writeFileSync15(tmpFile, js, "utf-8");
60939
60930
  globalThis.__vesk_inject = {
60940
60931
  defineConfig,
60941
60932
  // Pass-through like the real definePlugin (which validates + returns
@@ -60968,8 +60959,8 @@ async function writeConfigSource2(projectDir, source) {
60968
60959
  const { path, isTs } = findConfigFile2(projectDir);
60969
60960
  const target = path || resolve27(projectDir, "vesk.config.ts");
60970
60961
  await parseConfigSource(source, isTs, projectDir);
60971
- mkdirSync15(dirname21(target), { recursive: true });
60972
- writeFileSync16(target, source, "utf-8");
60962
+ mkdirSync14(dirname21(target), { recursive: true });
60963
+ writeFileSync15(target, source, "utf-8");
60973
60964
  const config = await parseConfigSource(source, isTs, projectDir);
60974
60965
  return { path: target, exists: true, source, config };
60975
60966
  }
@@ -62242,7 +62233,7 @@ function produceDiagnostics(input) {
62242
62233
  }
62243
62234
 
62244
62235
  // ../agentic/dist/checkpoints.js
62245
- import { existsSync as existsSync33, mkdirSync as mkdirSync16, readFileSync as readFileSync31, writeFileSync as writeFileSync17, statSync as statSync19, unlinkSync as unlinkSync5, rmSync as rmSync6, renameSync } from "node:fs";
62236
+ import { existsSync as existsSync33, mkdirSync as mkdirSync15, readFileSync as readFileSync31, writeFileSync as writeFileSync16, statSync as statSync19, unlinkSync as unlinkSync5, rmSync as rmSync6, renameSync } from "node:fs";
62246
62237
  import { join as join24, resolve as resolve29, dirname as dirname22, sep as sep5 } from "node:path";
62247
62238
  import { randomUUID as nodeRandomUUID } from "node:crypto";
62248
62239
  function generateId() {
@@ -62388,7 +62379,7 @@ function getCheckpointPath(projectDir, id) {
62388
62379
  return join24(getCheckpointDir(projectDir, id), "checkpoint.json");
62389
62380
  }
62390
62381
  function ensureDir(dir) {
62391
- mkdirSync16(dir, { recursive: true });
62382
+ mkdirSync15(dir, { recursive: true });
62392
62383
  }
62393
62384
  function readJson(filePath, fallback) {
62394
62385
  try {
@@ -62405,12 +62396,12 @@ function readJson(filePath, fallback) {
62405
62396
  function writeJsonAtomic(filePath, data2) {
62406
62397
  ensureDir(dirname22(filePath));
62407
62398
  const tmp = `${filePath}.tmp`;
62408
- writeFileSync17(tmp, JSON.stringify(data2, null, 2), "utf-8");
62399
+ writeFileSync16(tmp, JSON.stringify(data2, null, 2), "utf-8");
62409
62400
  try {
62410
62401
  renameSync(tmp, filePath);
62411
62402
  } catch {
62412
62403
  try {
62413
- writeFileSync17(filePath, JSON.stringify(data2, null, 2), "utf-8");
62404
+ writeFileSync16(filePath, JSON.stringify(data2, null, 2), "utf-8");
62414
62405
  try {
62415
62406
  unlinkSync5(tmp);
62416
62407
  } catch {
@@ -62505,7 +62496,7 @@ function rollback(projectDir, id) {
62505
62496
  } else {
62506
62497
  try {
62507
62498
  ensureDir(dirname22(abs));
62508
- writeFileSync17(abs, f.before, "utf-8");
62499
+ writeFileSync16(abs, f.before, "utf-8");
62509
62500
  } catch {
62510
62501
  }
62511
62502
  }
@@ -62514,7 +62505,7 @@ function rollback(projectDir, id) {
62514
62505
  }
62515
62506
 
62516
62507
  // ../agentic/dist/config.js
62517
- import { readFileSync as readFileSync32, writeFileSync as writeFileSync18, existsSync as existsSync34, mkdirSync as mkdirSync17, chmodSync } from "node:fs";
62508
+ import { readFileSync as readFileSync32, writeFileSync as writeFileSync17, existsSync as existsSync34, mkdirSync as mkdirSync16, chmodSync } from "node:fs";
62518
62509
  import { resolve as resolve30, dirname as dirname23 } from "node:path";
62519
62510
  var DEFAULT_CONFIG = {
62520
62511
  provider: "openai",
@@ -62605,7 +62596,7 @@ function writeDotenvValue(projectDir, key, value) {
62605
62596
  }
62606
62597
  if (!replaced)
62607
62598
  out += newLine + "\n";
62608
- writeFileSync18(p, out, { mode: 384 });
62599
+ writeFileSync17(p, out, { mode: 384 });
62609
62600
  try {
62610
62601
  chmodSync(p, 384);
62611
62602
  } catch {
@@ -62644,8 +62635,8 @@ function saveAgenticConfig(projectDir, patch) {
62644
62635
  if (next.baseUrl)
62645
62636
  toWrite.baseUrl = next.baseUrl;
62646
62637
  try {
62647
- mkdirSync17(dirname23(p), { recursive: true });
62648
- writeFileSync18(p, JSON.stringify(toWrite, null, 2), "utf-8");
62638
+ mkdirSync16(dirname23(p), { recursive: true });
62639
+ writeFileSync17(p, JSON.stringify(toWrite, null, 2), "utf-8");
62649
62640
  } catch {
62650
62641
  }
62651
62642
  return next;
@@ -63969,7 +63960,7 @@ var Agent = class {
63969
63960
  };
63970
63961
 
63971
63962
  // ../agentic/dist/tools/vesk.js
63972
- import { existsSync as existsSync36, readFileSync as readFileSync34, writeFileSync as writeFileSync19, mkdirSync as mkdirSync18, readdirSync as readdirSync11, statSync as statSync20 } from "node:fs";
63963
+ import { existsSync as existsSync36, readFileSync as readFileSync34, writeFileSync as writeFileSync18, mkdirSync as mkdirSync17, readdirSync as readdirSync11, statSync as statSync20 } from "node:fs";
63973
63964
  import { resolve as resolve32, join as join25, dirname as dirname24, sep as sep6 } from "node:path";
63974
63965
  function resolveWithin3(baseDir, relPath) {
63975
63966
  const base = resolve32(baseDir);
@@ -64003,8 +63994,8 @@ function readPluginState3(veskDir) {
64003
63994
  }
64004
63995
  function writePluginState3(veskDir, state) {
64005
63996
  const file = stateFilePath3(veskDir);
64006
- mkdirSync18(dirname24(file), { recursive: true });
64007
- writeFileSync19(file, JSON.stringify(state, null, 2) + "\n", "utf-8");
63997
+ mkdirSync17(dirname24(file), { recursive: true });
63998
+ writeFileSync18(file, JSON.stringify(state, null, 2) + "\n", "utf-8");
64008
63999
  }
64009
64000
  function eqIgnoreCase3(a, b) {
64010
64001
  return String(a || "").toLowerCase() === String(b || "").toLowerCase();
@@ -64363,8 +64354,8 @@ function createVeskTools(deps) {
64363
64354
  if (!contained)
64364
64355
  return jsonError("path escapes project root");
64365
64356
  }
64366
- mkdirSync18(dirname24(target), { recursive: true });
64367
- writeFileSync19(target, source, "utf-8");
64357
+ mkdirSync17(dirname24(target), { recursive: true });
64358
+ writeFileSync18(target, source, "utf-8");
64368
64359
  return jsonOk({ ok: true, path: target, source });
64369
64360
  }
64370
64361
  if (typeof a.key === "string" && a.key) {
@@ -64385,7 +64376,7 @@ function createVeskTools(deps) {
64385
64376
  return jsonError("could not safely edit the config object; use the source editor");
64386
64377
  if (patched === current3)
64387
64378
  return jsonOk({ ok: true, path: info.path, source: patched, unchanged: true });
64388
- writeFileSync19(info.path, patched, "utf-8");
64379
+ writeFileSync18(info.path, patched, "utf-8");
64389
64380
  return jsonOk({ ok: true, path: info.path, source: patched });
64390
64381
  }
64391
64382
  return jsonError("expected { source } or { key, value }");
@@ -64645,7 +64636,7 @@ function createVeskTools(deps) {
64645
64636
  } catch {
64646
64637
  }
64647
64638
  const dir = checkpointDir(veskDir);
64648
- mkdirSync18(dir, { recursive: true });
64639
+ mkdirSync17(dir, { recursive: true });
64649
64640
  const id = `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
64650
64641
  const file = join25(dir, `${id}.json`);
64651
64642
  const check = resolveWithin3(dir, `${id}.json`);
@@ -64659,7 +64650,7 @@ function createVeskTools(deps) {
64659
64650
  appDir,
64660
64651
  veskDir
64661
64652
  };
64662
- writeFileSync19(file, JSON.stringify(payload, null, 2) + "\n", "utf-8");
64653
+ writeFileSync18(file, JSON.stringify(payload, null, 2) + "\n", "utf-8");
64663
64654
  return jsonOk({ ok: true, checkpointId: id, message: payload.message, timestamp: payload.timestamp });
64664
64655
  } catch (e) {
64665
64656
  return jsonError(e instanceof Error ? e.message : String(e));
@@ -64785,7 +64776,7 @@ function renderDefaultNotFoundPage2(opts = {}) {
64785
64776
  }
64786
64777
 
64787
64778
  // ../adapter/dist/ssr-function.js
64788
- import { readFileSync as readFileSync35, existsSync as existsSync37, mkdirSync as mkdirSync19, writeFileSync as writeFileSync20 } from "node:fs";
64779
+ import { readFileSync as readFileSync35, existsSync as existsSync37 } from "node:fs";
64789
64780
  import { resolve as resolve33, relative as relative7, join as join26 } from "node:path";
64790
64781
  init_default_pages();
64791
64782
  function resolveBoundaryFileForUrl2(pathname, appDir, file) {
@@ -64827,7 +64818,7 @@ function resolveCssUrls2(opts) {
64827
64818
  // ../adapter/dist/hmr.js
64828
64819
  init_client_codegen();
64829
64820
  import { WebSocketServer } from "ws";
64830
- import { readFileSync as readFileSync37, existsSync as existsSync39, writeFileSync as writeFileSync21 } from "node:fs";
64821
+ import { readFileSync as readFileSync37, existsSync as existsSync39, writeFileSync as writeFileSync19 } from "node:fs";
64831
64822
  import { resolve as resolve35, dirname as dirname25 } from "node:path";
64832
64823
  import { fileURLToPath as fileURLToPath7 } from "node:url";
64833
64824
  init_default_pages();
@@ -65498,7 +65489,7 @@ function renderDevErrorPage(payload, opts) {
65498
65489
 
65499
65490
  // src/build-packages.ts
65500
65491
  import { spawnSync as spawnSync2 } from "node:child_process";
65501
- import { cpSync as cpSync2, existsSync as existsSync41, mkdirSync as mkdirSync20, readFileSync as readFileSync39, readdirSync as readdirSync12, statSync as statSync21, writeFileSync as writeFileSync22 } from "node:fs";
65492
+ import { cpSync as cpSync2, existsSync as existsSync41, mkdirSync as mkdirSync18, readFileSync as readFileSync39, readdirSync as readdirSync12, statSync as statSync21, writeFileSync as writeFileSync20 } from "node:fs";
65502
65493
  import { createRequire as createRequire7 } from "node:module";
65503
65494
  import { dirname as dirname26, join as join27, resolve as resolve37 } from "node:path";
65504
65495
  import { fileURLToPath as fileURLToPath8 } from "node:url";
@@ -65587,7 +65578,7 @@ function buildPackages(force = false) {
65587
65578
  const distDir = join27(pkgDir, "dist");
65588
65579
  for (const c of cfg.copy || []) {
65589
65580
  const to = join27(distDir, c.to);
65590
- mkdirSync20(dirname26(to), { recursive: true });
65581
+ mkdirSync18(dirname26(to), { recursive: true });
65591
65582
  cpSync2(join27(pkgDir, c.from), to, { recursive: true });
65592
65583
  }
65593
65584
  const srcPkg = JSON.parse(readFileSync39(join27(pkgDir, "package.json"), "utf-8"));
@@ -65604,9 +65595,9 @@ function buildPackages(force = false) {
65604
65595
  "./package.json": "./package.json"
65605
65596
  }
65606
65597
  };
65607
- writeFileSync22(join27(distDir, "package.json"), JSON.stringify(lucideDistPkg, null, 2) + "\n");
65598
+ writeFileSync20(join27(distDir, "package.json"), JSON.stringify(lucideDistPkg, null, 2) + "\n");
65608
65599
  } else {
65609
- writeFileSync22(join27(distDir, "package.json"), distPackageJson(cfg.name, cfg.entry, cfg.serverEntry, srcPkg.version || "1.0.0"));
65600
+ writeFileSync20(join27(distDir, "package.json"), distPackageJson(cfg.name, cfg.entry, cfg.serverEntry, srcPkg.version || "1.0.0"));
65610
65601
  }
65611
65602
  console.log(`[build] ${cfg.name} -> dist`);
65612
65603
  }
@@ -66599,10 +66590,10 @@ async function startDevServer(port, projectDir, config, host) {
66599
66590
  function writeDevBundleCache(main, chunks) {
66600
66591
  try {
66601
66592
  const dir = devCacheDir();
66602
- mkdirSync21(dir, { recursive: true });
66593
+ mkdirSync19(dir, { recursive: true });
66603
66594
  const file = join28(dir, "client-bundle.json");
66604
66595
  const tmp = join28(dir, `client-bundle.${process.pid}.tmp`);
66605
- writeFileSync23(tmp, JSON.stringify({ key: devCacheKey(), main, chunks }), "utf8");
66596
+ writeFileSync21(tmp, JSON.stringify({ key: devCacheKey(), main, chunks }), "utf8");
66606
66597
  renameSync2(tmp, file);
66607
66598
  } catch {
66608
66599
  }
@@ -68381,8 +68372,8 @@ if (cmd === "init") {
68381
68372
  console.error(`vesk init: ${target} already exists \u2014 skipping`);
68382
68373
  process.exit(0);
68383
68374
  }
68384
- mkdirSync22(appDirPath, { recursive: true });
68385
- writeFileSync25(target, [
68375
+ mkdirSync20(appDirPath, { recursive: true });
68376
+ writeFileSync23(target, [
68386
68377
  `@import 'tailwindcss';`,
68387
68378
  ``,
68388
68379
  `@layer base {`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vesk/vesk-cli",
3
- "version": "0.2.77",
3
+ "version": "0.2.80",
4
4
  "type": "module",
5
5
  "description": "Vesk — compiler-first framework for the post-VDOM web. vesk dev, vesk build.",
6
6
  "bin": {
@@ -8,10 +8,10 @@
8
8
  },
9
9
  "main": "./dist/cli.js",
10
10
  "dependencies": {
11
- "@vesk/adapter": "^0.2.77",
12
- "@vesk/compiler": "^0.2.77",
13
- "@vesk/plugin-tailwind": "^0.2.77",
14
- "@vesk/runtime": "^0.2.77",
11
+ "@vesk/adapter": "^0.2.80",
12
+ "@vesk/compiler": "^0.2.80",
13
+ "@vesk/plugin-tailwind": "^0.2.80",
14
+ "@vesk/runtime": "^0.2.80",
15
15
  "esrap": "^2.3.0",
16
16
  "typescript": "^5.8.0",
17
17
  "ws": "^8.18.0",