@vesk/vesk-cli 0.2.82 → 0.2.83

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 +114 -105
  2. package/package.json +5 -5
package/dist/cli.js CHANGED
@@ -37650,15 +37650,24 @@ export const createHash = () => ({ update: () => {}, digest: () => '' });
37650
37650
  outfile,
37651
37651
  minify: false,
37652
37652
  sourcemap: false,
37653
- // Node targets run from a real deployment root: leave bare packages to the
37654
- // platform's dependency tracer instead of inlining them. Bundling CJS
37655
- // packages into the ESM handler turned their `require('events')` and
37656
- // friends into esbuild's throwing `__require` shim (slintorm's pg driver
37657
- // failed with "Dynamic require of \"events\" is not supported"), and it
37658
- // inflated the single function file to millions of lines — the cold-start
37659
- // memory spike behind the SIGKILLs. Edge targets have no node_modules, so
37660
- // they keep bundling everything.
37661
- packages: nodeBuiltins ? "external" : void 0,
37653
+ // Edge targets have no node_modules so every package is bundled. Node
37654
+ // targets bundle everything too — self-contained functions avoid the
37655
+ // "Cannot find package" failures that externalization causes on hosts that
37656
+ // don't install dependencies for Build Output API functions.
37657
+ // Bundled CJS modules (e.g. pg's internals via slintorm) call
37658
+ // require('events') etc. esbuild rewrites those into its `__require`
37659
+ // shim, which throws 'Dynamic require of "events" is not supported' in
37660
+ // ESM output. Define a real `require` anchored at the bundle URL before
37661
+ // the shim initializes so Node loads builtins and node_modules for real.
37662
+ // `node:module` stays external (platform: 'node'), so Node resolves it
37663
+ // natively at runtime. Edge targets keep the empty-node builtin stubs and
37664
+ // must not get this banner (it would collide with their stubbed
37665
+ // `createRequire`).
37666
+ ...nodeBuiltins ? {
37667
+ banner: {
37668
+ js: 'import { createRequire } from "node:module";\nconst require = createRequire(import.meta.url);\n'
37669
+ }
37670
+ } : {},
37662
37671
  logOverride: { "direct-eval": "silent" },
37663
37672
  plugins
37664
37673
  });
@@ -42405,7 +42414,7 @@ __export(typecheck_exports, {
42405
42414
  formatTypecheckWarnings: () => formatTypecheckWarnings,
42406
42415
  typecheckProject: () => typecheckProject
42407
42416
  });
42408
- import { readFileSync as readFileSync42, readdirSync as readdirSync15, statSync as statSync23 } from "node:fs";
42417
+ import { readFileSync as readFileSync43, readdirSync as readdirSync15, statSync as statSync23 } from "node:fs";
42409
42418
  import { join as join29, dirname as dirname28, normalize, relative as relative10, resolve as resolve40, sep as sep7 } from "node:path";
42410
42419
  import * as ts8 from "typescript";
42411
42420
  function walkProjectFiles(projectRoot) {
@@ -42637,7 +42646,7 @@ function typecheckProject(projectRoot, opts = {}) {
42637
42646
  }
42638
42647
  }
42639
42648
  if (f.endsWith(".vsk")) {
42640
- const src2 = readFileSync42(f, "utf-8");
42649
+ const src2 = readFileSync43(f, "utf-8");
42641
42650
  try {
42642
42651
  parse4(src2);
42643
42652
  } catch (e) {
@@ -48776,7 +48785,7 @@ __export(codemods_exports, {
48776
48785
  applicableCodemods: () => applicableCodemods,
48777
48786
  compareCore: () => compareCore
48778
48787
  });
48779
- import { readFileSync as readFileSync43, existsSync as existsSync44 } from "node:fs";
48788
+ import { readFileSync as readFileSync44, existsSync as existsSync44 } from "node:fs";
48780
48789
  import { join as join30 } from "node:path";
48781
48790
  import { walk as walk8 } from "zimmerframe";
48782
48791
  function safeParse(source, filePath) {
@@ -48802,7 +48811,7 @@ function typesPackageExports(projectDir) {
48802
48811
  ].filter((p) => typeof p === "string" && existsSync44(p));
48803
48812
  for (const path of candidates) {
48804
48813
  try {
48805
- const src2 = readFileSync43(path, "utf-8");
48814
+ const src2 = readFileSync44(path, "utf-8");
48806
48815
  const names = /* @__PURE__ */ new Set();
48807
48816
  for (const line of src2.split("\n")) {
48808
48817
  const m = /^export\s+(?:declare\s+)?(?:abstract\s+)?(?:interface|class|type|enum|const|function|let|var|namespace)\s+([A-Za-z_$][\w$]*)/.exec(line);
@@ -48926,14 +48935,14 @@ __export(migrate_exports, {
48926
48935
  detectInstalledVersion: () => detectInstalledVersion,
48927
48936
  runMigrate: () => runMigrate
48928
48937
  });
48929
- import { readFileSync as readFileSync44, writeFileSync as writeFileSync22, existsSync as existsSync45, statSync as statSync24, readdirSync as readdirSync16 } from "node:fs";
48938
+ import { readFileSync as readFileSync45, writeFileSync as writeFileSync22, existsSync as existsSync45, statSync as statSync24, readdirSync as readdirSync16 } from "node:fs";
48930
48939
  import { join as join31, relative as relative11, extname as extname8 } from "node:path";
48931
48940
  function detectInstalledVersion(projectDir, cliVersion) {
48932
48941
  for (const pkg of ["@vesk/vesk-cli", "@vesk/adapter", "@vesk/compiler"]) {
48933
48942
  const p = join31(projectDir, "node_modules", pkg, "package.json");
48934
48943
  if (!existsSync45(p)) continue;
48935
48944
  try {
48936
- const version2 = JSON.parse(readFileSync44(p, "utf-8")).version;
48945
+ const version2 = JSON.parse(readFileSync45(p, "utf-8")).version;
48937
48946
  if (typeof version2 === "string" && version2) return { version: version2, source: pkg };
48938
48947
  } catch {
48939
48948
  }
@@ -48990,7 +48999,7 @@ function runMigrate(options) {
48990
48999
  if (!existsSync45(abs)) continue;
48991
49000
  let source;
48992
49001
  try {
48993
- source = readFileSync44(abs, "utf-8");
49002
+ source = readFileSync45(abs, "utf-8");
48994
49003
  } catch (e) {
48995
49004
  report.skipped.push(`${relPath}: unreadable (${e.message})`);
48996
49005
  continue;
@@ -49030,7 +49039,7 @@ var init_migrate = __esm({
49030
49039
  });
49031
49040
 
49032
49041
  // src/index.ts
49033
- import { readFileSync as readFileSync45, writeFileSync as writeFileSync23, mkdirSync as mkdirSync20, existsSync as existsSync46 } from "fs";
49042
+ import { readFileSync as readFileSync46, writeFileSync as writeFileSync23, mkdirSync as mkdirSync20, existsSync as existsSync46 } from "fs";
49034
49043
  import { resolve as resolve41, join as join32 } from "path";
49035
49044
  import { fileURLToPath as fileURLToPath9 } from "url";
49036
49045
  import { createRequire as createRequire8 } from "module";
@@ -49611,7 +49620,7 @@ function setRuntimeModule2(mod) {
49611
49620
  }
49612
49621
 
49613
49622
  // ../adapter/dist/index.js
49614
- import { mkdirSync as mkdirSync11, writeFileSync as writeFileSync12, existsSync as existsSync22, readFileSync as readFileSync23 } from "node:fs";
49623
+ import { mkdirSync as mkdirSync11, writeFileSync as writeFileSync12, existsSync as existsSync22, readFileSync as readFileSync24 } from "node:fs";
49615
49624
  import { resolve as resolve21, dirname as dirname17, relative as relative4, basename as basename3, join as join16 } from "node:path";
49616
49625
  import { fileURLToPath as fileURLToPath5 } from "node:url";
49617
49626
 
@@ -54093,7 +54102,7 @@ async function build2(appDir, options) {
54093
54102
  markPhase("config+dirs");
54094
54103
  const cssSourcePath = resolveUserCssPath(appDir);
54095
54104
  if (cssSourcePath !== null) {
54096
- const cssContent = readFileSync23(cssSourcePath, "utf-8");
54105
+ const cssContent = readFileSync24(cssSourcePath, "utf-8");
54097
54106
  const cssTarget = resolve21(outDir, "static", "global.css");
54098
54107
  const tailwindActive = isTailwindPlugin(pluginsPipelines);
54099
54108
  let finalCss = cssContent;
@@ -54186,7 +54195,7 @@ async function build2(appDir, options) {
54186
54195
  const mwChain2 = collectMiddlewareChain2(routeTree, node.fullPath, appDir);
54187
54196
  let mwCode = null;
54188
54197
  if (mwChain2.length > 0) {
54189
- const mwSources = mwChain2.map((m) => readFileSync23(m.sourcePath, "utf-8"));
54198
+ const mwSources = mwChain2.map((m) => readFileSync24(m.sourcePath, "utf-8"));
54190
54199
  mwCode = compileMiddlewareCode(mwSources);
54191
54200
  }
54192
54201
  const ssrAncestorLayouts = isStandalone ? [] : ancestorLayouts;
@@ -54194,14 +54203,14 @@ async function build2(appDir, options) {
54194
54203
  writeFileSync12(funcPath, funcCode, "utf-8");
54195
54204
  const pagePath = resolve21(appDir, node.sourceDir, "page.vsk");
54196
54205
  if (existsSync22(pagePath)) {
54197
- const src2 = readFileSync23(pagePath, "utf-8");
54206
+ const src2 = readFileSync24(pagePath, "utf-8");
54198
54207
  const actionIds = collectActionIds(src2);
54199
54208
  if (node.layout) {
54200
- const layoutSrc = readFileSync23(resolve21(appDir, node.sourceDir, "layout.vsk"), "utf-8");
54209
+ const layoutSrc = readFileSync24(resolve21(appDir, node.sourceDir, "layout.vsk"), "utf-8");
54201
54210
  actionIds.push(...collectActionIds(layoutSrc));
54202
54211
  }
54203
54212
  for (const a of ssrAncestorLayouts) {
54204
- const ancestorSrc = readFileSync23(resolve21(appDir, a.sourceDir, "layout.vsk"), "utf-8");
54213
+ const ancestorSrc = readFileSync24(resolve21(appDir, a.sourceDir, "layout.vsk"), "utf-8");
54205
54214
  actionIds.push(...collectActionIds(ancestorSrc));
54206
54215
  }
54207
54216
  for (const id of actionIds) {
@@ -54294,7 +54303,7 @@ async function build2(appDir, options) {
54294
54303
  const manifest = generateManifest(routeTree, ssrRoutes, apiRoutes, prerenderedRoutes, middlewareEnabled, actionMap, pluginHeadExtra, hasEvents);
54295
54304
  const buildId3 = emittedAssets.map((a) => a.hash).join("-");
54296
54305
  manifest.buildId = buildId3.slice(0, 32);
54297
- manifest.veskVersion = JSON.parse(readFileSync23(join16(PACKAGES_DIR_SELF(), "package.json"), "utf-8")).version;
54306
+ manifest.veskVersion = JSON.parse(readFileSync24(join16(PACKAGES_DIR_SELF(), "package.json"), "utf-8")).version;
54298
54307
  manifest.assets = {
54299
54308
  hashed,
54300
54309
  client: { file: clientFileName, url: clientUrl, hash: clientAsset.hash, bytes: clientAsset.bytes, integrity: clientAsset.integrity },
@@ -54348,7 +54357,7 @@ vesk build: done (${outDir})`);
54348
54357
  init_seo_audit();
54349
54358
 
54350
54359
  // src/dev-server.ts
54351
- 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";
54360
+ import { readFileSync as readFileSync42, watch, statSync as statSync22, existsSync as existsSync43, mkdirSync as mkdirSync19, readdirSync as readdirSync14, writeFileSync as writeFileSync21, renameSync as renameSync2 } from "node:fs";
54352
54361
  import { createHash as createHash3 } from "node:crypto";
54353
54362
  import { resolve as resolve39, extname as extname7, join as join28, dirname as dirname27, relative as relative9 } from "node:path";
54354
54363
  import { createServer as createServer2 } from "node:http";
@@ -57259,7 +57268,7 @@ init_parser();
57259
57268
  init_tokens();
57260
57269
  init_scan();
57261
57270
  init_strip_ts();
57262
- import { readdirSync as readdirSync8, statSync as statSync13, existsSync as existsSync23, readFileSync as readFileSync24 } from "fs";
57271
+ import { readdirSync as readdirSync8, statSync as statSync13, existsSync as existsSync23, readFileSync as readFileSync25 } from "fs";
57263
57272
  import { join as join17, relative as relative5, basename as basename4 } from "path";
57264
57273
  function collapseSlashes2(p) {
57265
57274
  let out = "";
@@ -57280,7 +57289,7 @@ function isStandaloneLayoutFile(layoutPath) {
57280
57289
  try {
57281
57290
  if (!existsSync23(layoutPath))
57282
57291
  return false;
57283
- const src2 = readFileSync24(layoutPath, "utf-8");
57292
+ const src2 = readFileSync25(layoutPath, "utf-8");
57284
57293
  if (!src2.includes("standalone"))
57285
57294
  return false;
57286
57295
  try {
@@ -58333,7 +58342,7 @@ async function runEventHandlers(handlers, name, ctx2) {
58333
58342
  }
58334
58343
 
58335
58344
  // ../compiler/dist/md-inline.js
58336
- import { readFileSync as readFileSync25, existsSync as existsSync27 } from "node:fs";
58345
+ import { readFileSync as readFileSync26, existsSync as existsSync27 } from "node:fs";
58337
58346
  import { dirname as dirname18, join as join20, resolve as resolve23 } from "node:path";
58338
58347
  var MD_EXT_MARKER2 = ".md";
58339
58348
  function looksLikeMarkdownPath2(value) {
@@ -58377,7 +58386,7 @@ function inlineMdContentAttrs2(source, importerDir, mdRoots = []) {
58377
58386
  if (abs !== null) {
58378
58387
  let contents;
58379
58388
  try {
58380
- contents = readFileSync25(abs, "utf-8");
58389
+ contents = readFileSync26(abs, "utf-8");
58381
58390
  } catch {
58382
58391
  out += source[i];
58383
58392
  i++;
@@ -58439,7 +58448,7 @@ function guessProjectRoots2(dir) {
58439
58448
  }
58440
58449
 
58441
58450
  // ../adapter/dist/client-bundle.js
58442
- 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";
58451
+ import { readFileSync as readFileSync27, existsSync as existsSync28, writeFileSync as writeFileSync13, unlinkSync as unlinkSync4, statSync as statSync15, rmSync as rmSync4, mkdtempSync as mkdtempSync2, mkdirSync as mkdirSync12 } from "node:fs";
58443
58452
  import { resolve as resolve24, join as join21, dirname as dirname19, relative as relative6, sep as sep3 } from "node:path";
58444
58453
  import { fileURLToPath as fileURLToPath6 } from "node:url";
58445
58454
  import { tmpdir as tmpdir3 } from "node:os";
@@ -58716,7 +58725,7 @@ function runtimeImportsOf2(filePath, seen = /* @__PURE__ */ new Set()) {
58716
58725
  seen.add(filePath);
58717
58726
  let text;
58718
58727
  try {
58719
- text = readFileSync26(filePath, "utf8");
58728
+ text = readFileSync27(filePath, "utf8");
58720
58729
  } catch {
58721
58730
  return [];
58722
58731
  }
@@ -59067,11 +59076,11 @@ async function generateClientBundle2(routeTree, appDir, componentMap, options) {
59067
59076
  return removeCompiledNodes2(code, isVskImport2);
59068
59077
  }
59069
59078
  function resolveVskImports(filePath, compile) {
59070
- const src2 = readFileSync26(filePath, "utf-8");
59079
+ const src2 = readFileSync27(filePath, "utf-8");
59071
59080
  const resolved = [];
59072
59081
  for (const importPath of collectVskImportPaths(vskImportLines(src2), filePath)) {
59073
59082
  try {
59074
- readFileSync26(importPath);
59083
+ readFileSync27(importPath);
59075
59084
  } catch {
59076
59085
  continue;
59077
59086
  }
@@ -59133,7 +59142,7 @@ async function generateClientBundle2(routeTree, appDir, componentMap, options) {
59133
59142
  compiledFiles++;
59134
59143
  __stats.compiled++;
59135
59144
  __stats.distinct.add(filePath);
59136
- let src2 = readFileSync26(filePath, "utf-8");
59145
+ let src2 = readFileSync27(filePath, "utf-8");
59137
59146
  if (/content=["'][^"']*\.md["']/i.test(src2)) {
59138
59147
  src2 = inlineMdContentAttrs(src2, dirname19(filePath), guessProjectRoots(appDir));
59139
59148
  }
@@ -59526,7 +59535,7 @@ A module-scope statement runs the moment the browser evaluates the chunk, so a s
59526
59535
  if (seen.has(filePath))
59527
59536
  return;
59528
59537
  seen.add(filePath);
59529
- const src2 = readFileSync26(filePath, "utf-8");
59538
+ const src2 = readFileSync27(filePath, "utf-8");
59530
59539
  resolveVskImports(filePath, (p, n) => compileFileMono2(p, n || ""));
59531
59540
  for (const cn of vskComponentNames(src2, filePath))
59532
59541
  componentOwners.claim(cn, filePath);
@@ -59621,7 +59630,7 @@ function buildRuntimeCode2(runtimeDir) {
59621
59630
  for (const f of runtimeFiles) {
59622
59631
  const p = join21(runtimeDir, f);
59623
59632
  if (existsSync28(p)) {
59624
- let src2 = readFileSync26(p, "utf-8");
59633
+ let src2 = readFileSync27(p, "utf-8");
59625
59634
  src2 = stripTypes2(src2);
59626
59635
  src2 = src2.replace(/^import\s+[\s\S]*?from\s+['"](?:\.\/.*?|@vesk\/runtime\/src\/.*?)['"];?\n?/gm, "");
59627
59636
  src2 = src2.replace(/^import\s+['"](?:\.\/.*?|@vesk\/runtime\/src\/.*?)['"];?\n?/gm, "");
@@ -59633,7 +59642,7 @@ ${src2}
59633
59642
  `;
59634
59643
  }
59635
59644
  }
59636
- const indexSrc = readFileSync26(join21(runtimeDir, "index-client.js"), "utf-8");
59645
+ const indexSrc = readFileSync27(join21(runtimeDir, "index-client.js"), "utf-8");
59637
59646
  const exportNames = stripTypes2(indexSrc).match(/export\s*\{\s*([^}]+)\s*\}\s*from/g)?.flatMap((m) => m.replace(/export\s*\{\s*|\s*\}\s*from/g, "").split(",").map((s) => s.trim())) || [];
59638
59647
  code += "// --- exports ---\n";
59639
59648
  for (const name of [...new Set(exportNames)]) {
@@ -59644,7 +59653,7 @@ ${src2}
59644
59653
  return code;
59645
59654
  }
59646
59655
  function runtimeExportNames2(runtimeDir) {
59647
- const indexSrc = readFileSync26(join21(runtimeDir, "index-client.js"), "utf-8");
59656
+ const indexSrc = readFileSync27(join21(runtimeDir, "index-client.js"), "utf-8");
59648
59657
  const names = /* @__PURE__ */ new Set();
59649
59658
  for (const m of indexSrc.matchAll(/export\s*\{([^}]+)\}\s*from/g)) {
59650
59659
  for (const raw2 of m[1].split(",")) {
@@ -59833,7 +59842,7 @@ if (typeof document !== 'undefined') __router.start();
59833
59842
 
59834
59843
  // ../adapter/dist/paths.js
59835
59844
  import { resolve as resolve25, sep as sep4 } from "node:path";
59836
- import { existsSync as existsSync29, statSync as statSync16, readFileSync as readFileSync27 } from "node:fs";
59845
+ import { existsSync as existsSync29, statSync as statSync16, readFileSync as readFileSync28 } from "node:fs";
59837
59846
  function resolveWithin2(baseDir, relPath) {
59838
59847
  const base = resolve25(baseDir);
59839
59848
  const target = resolve25(baseDir, relPath);
@@ -59857,7 +59866,7 @@ function installMdReadHook2(publicDirs) {
59857
59866
  if (!lower2.endsWith(".md") && !lower2.endsWith(".markdown"))
59858
59867
  continue;
59859
59868
  if (existsSync29(abs) && statSync16(abs).isFile())
59860
- return readFileSync27(abs, "utf8");
59869
+ return readFileSync28(abs, "utf8");
59861
59870
  } catch {
59862
59871
  }
59863
59872
  }
@@ -59924,12 +59933,12 @@ function urlAuthority3(url) {
59924
59933
  }
59925
59934
 
59926
59935
  // ../adapter/dist/dev-api.js
59927
- import { readFileSync as readFileSync30, statSync as statSync18, existsSync as existsSync32, readdirSync as readdirSync10 } from "node:fs";
59936
+ import { readFileSync as readFileSync31, statSync as statSync18, existsSync as existsSync32, readdirSync as readdirSync10 } from "node:fs";
59928
59937
  import { resolve as resolve28 } from "node:path";
59929
59938
 
59930
59939
  // ../adapter/dist/plugins.js
59931
59940
  init_paths();
59932
- import { readFileSync as readFileSync28, writeFileSync as writeFileSync14, existsSync as existsSync30, mkdirSync as mkdirSync13, statSync as statSync17 } from "node:fs";
59941
+ import { readFileSync as readFileSync29, writeFileSync as writeFileSync14, existsSync as existsSync30, mkdirSync as mkdirSync13, statSync as statSync17 } from "node:fs";
59933
59942
  import { resolve as resolve26, dirname as dirname20, join as join22, extname as extname6, basename as basename6 } from "node:path";
59934
59943
  import { createRequire as createRequire6 } from "node:module";
59935
59944
  import { spawn as spawn2 } from "node:child_process";
@@ -59953,7 +59962,7 @@ function readPluginState2(veskDir) {
59953
59962
  return defaultState2();
59954
59963
  let raw2;
59955
59964
  try {
59956
- raw2 = JSON.parse(readFileSync28(file, "utf-8"));
59965
+ raw2 = JSON.parse(readFileSync29(file, "utf-8"));
59957
59966
  } catch {
59958
59967
  return defaultState2();
59959
59968
  }
@@ -60045,7 +60054,7 @@ function localDir2(base, pkg) {
60045
60054
  function readJsonFile2(file) {
60046
60055
  try {
60047
60056
  if (existsSync30(file))
60048
- return JSON.parse(readFileSync28(file, "utf-8"));
60057
+ return JSON.parse(readFileSync29(file, "utf-8"));
60049
60058
  } catch {
60050
60059
  }
60051
60060
  return null;
@@ -60767,7 +60776,7 @@ function introspectPlugin2(appDir, name) {
60767
60776
  const pkgName = str2(pkgJson.name) ?? name;
60768
60777
  const exportsMap = flattenPackageExports2(pkgJson.exports);
60769
60778
  const dtsPath = resolveDtsPath2(probe, pkgJson);
60770
- const dtsExports = dtsPath ? parseDtsExports2(readFileSync28(dtsPath, "utf-8")) : [];
60779
+ const dtsExports = dtsPath ? parseDtsExports2(readFileSync29(dtsPath, "utf-8")) : [];
60771
60780
  return {
60772
60781
  ok: true,
60773
60782
  name: pkgName,
@@ -60905,7 +60914,7 @@ var __internals2 = {
60905
60914
  };
60906
60915
 
60907
60916
  // ../adapter/dist/dev-config.js
60908
- import { existsSync as existsSync31, readFileSync as readFileSync29, writeFileSync as writeFileSync15, mkdirSync as mkdirSync14, mkdtempSync as mkdtempSync3, rmSync as rmSync5 } from "node:fs";
60917
+ import { existsSync as existsSync31, readFileSync as readFileSync30, writeFileSync as writeFileSync15, mkdirSync as mkdirSync14, mkdtempSync as mkdtempSync3, rmSync as rmSync5 } from "node:fs";
60909
60918
  import { tmpdir as tmpdir4 } from "node:os";
60910
60919
  import { resolve as resolve27, dirname as dirname21, join as join23 } from "node:path";
60911
60920
  init_parser();
@@ -60964,7 +60973,7 @@ async function readConfig2(projectDir) {
60964
60973
  const { path, isTs } = findConfigFile2(projectDir);
60965
60974
  if (!path)
60966
60975
  return { path: null, exists: false, source: "", config: {} };
60967
- const source = readFileSync29(path, "utf-8");
60976
+ const source = readFileSync30(path, "utf-8");
60968
60977
  const config = await parseConfigSource(source, isTs, projectDir);
60969
60978
  return { path, exists: true, source, config };
60970
60979
  }
@@ -61806,7 +61815,7 @@ export default defineConfig({
61806
61815
  await writeConfigSource2(projectDir, source);
61807
61816
  return;
61808
61817
  }
61809
- source = readFileSync29(path, "utf-8");
61818
+ source = readFileSync30(path, "utf-8");
61810
61819
  const existingImport = findPluginImportAst(source, pkg);
61811
61820
  let importName;
61812
61821
  if (existingImport) {
@@ -61886,7 +61895,7 @@ async function removePluginFromConfig2(projectDir, pkg) {
61886
61895
  const { path } = findConfigFile2(projectDir);
61887
61896
  if (!path)
61888
61897
  return false;
61889
- let source = readFileSync29(path, "utf-8");
61898
+ let source = readFileSync30(path, "utf-8");
61890
61899
  const original = source;
61891
61900
  const existingImport = findPluginImportAst(source, pkg);
61892
61901
  let importName = existingImport ? existingImport.name : null;
@@ -62007,7 +62016,7 @@ function createDevApiRouter2(opts) {
62007
62016
  return badRequest2("no vesk.config file to edit");
62008
62017
  if (!isTs)
62009
62018
  return badRequest2("single-key toggle edits only apply to vesk.config.ts (use the source editor for .js)");
62010
- const patched = applyConfigToggle2(readFileSync30(path, "utf-8"), b.key, b.value);
62019
+ const patched = applyConfigToggle2(readFileSync31(path, "utf-8"), b.key, b.value);
62011
62020
  if (patched === null)
62012
62021
  return badRequest2("could not safely edit the config object; use the source editor");
62013
62022
  const cfg = await writeConfigSource2(projectDir, patched);
@@ -62053,7 +62062,7 @@ function createDevApiRouter2(opts) {
62053
62062
  return jsonStatus(200, { ok: true, path: target, directory: true, entries });
62054
62063
  }
62055
62064
  if (statSync18(resolved).isFile()) {
62056
- return jsonStatus(200, { ok: true, path: target, directory: false, content: readFileSync30(resolved, "utf-8") });
62065
+ return jsonStatus(200, { ok: true, path: target, directory: false, content: readFileSync31(resolved, "utf-8") });
62057
62066
  }
62058
62067
  return badRequest2("unsupported file type");
62059
62068
  } catch (e) {
@@ -62189,7 +62198,7 @@ function createDevApiRouter2(opts) {
62189
62198
  return {
62190
62199
  status: 200,
62191
62200
  headers: { "Content-Type": icon.mime, "Cache-Control": "private, max-age=60" },
62192
- body: readFileSync30(icon.file).toString("base64"),
62201
+ body: readFileSync31(icon.file).toString("base64"),
62193
62202
  encoding: "base64"
62194
62203
  };
62195
62204
  }
@@ -62246,7 +62255,7 @@ function produceDiagnostics(input) {
62246
62255
  }
62247
62256
 
62248
62257
  // ../agentic/dist/checkpoints.js
62249
- 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";
62258
+ import { existsSync as existsSync33, mkdirSync as mkdirSync15, readFileSync as readFileSync32, writeFileSync as writeFileSync16, statSync as statSync19, unlinkSync as unlinkSync5, rmSync as rmSync6, renameSync } from "node:fs";
62250
62259
  import { join as join24, resolve as resolve29, dirname as dirname22, sep as sep5 } from "node:path";
62251
62260
  import { randomUUID as nodeRandomUUID } from "node:crypto";
62252
62261
  function generateId() {
@@ -62398,7 +62407,7 @@ function readJson(filePath, fallback) {
62398
62407
  try {
62399
62408
  if (!existsSync33(filePath))
62400
62409
  return fallback;
62401
- const raw2 = readFileSync31(filePath, "utf-8");
62410
+ const raw2 = readFileSync32(filePath, "utf-8");
62402
62411
  if (raw2.trim() === "")
62403
62412
  return fallback;
62404
62413
  return JSON.parse(raw2);
@@ -62518,7 +62527,7 @@ function rollback(projectDir, id) {
62518
62527
  }
62519
62528
 
62520
62529
  // ../agentic/dist/config.js
62521
- import { readFileSync as readFileSync32, writeFileSync as writeFileSync17, existsSync as existsSync34, mkdirSync as mkdirSync16, chmodSync } from "node:fs";
62530
+ import { readFileSync as readFileSync33, writeFileSync as writeFileSync17, existsSync as existsSync34, mkdirSync as mkdirSync16, chmodSync } from "node:fs";
62522
62531
  import { resolve as resolve30, dirname as dirname23 } from "node:path";
62523
62532
  var DEFAULT_CONFIG = {
62524
62533
  provider: "openai",
@@ -62567,7 +62576,7 @@ function readDotenvValue(projectDir, key, def = null) {
62567
62576
  const p = dotenvPath(projectDir);
62568
62577
  if (!existsSync34(p))
62569
62578
  return def;
62570
- const content = readFileSync32(p, "utf-8");
62579
+ const content = readFileSync33(p, "utf-8");
62571
62580
  for (const rawLine of content.split("\n")) {
62572
62581
  const line = rawLine.trim();
62573
62582
  if (!line || line.startsWith("#"))
@@ -62595,7 +62604,7 @@ function writeDotenvValue(projectDir, key, value) {
62595
62604
  let out = "";
62596
62605
  let replaced = false;
62597
62606
  if (existsSync34(p)) {
62598
- const lines = readFileSync32(p, "utf-8").split("\n");
62607
+ const lines = readFileSync33(p, "utf-8").split("\n");
62599
62608
  for (const rawLine of lines) {
62600
62609
  const trimmed = rawLine.trim();
62601
62610
  const eq = trimmed.indexOf("=");
@@ -62625,7 +62634,7 @@ function loadAgenticConfig(projectDir) {
62625
62634
  let cfg = { ...DEFAULT_CONFIG };
62626
62635
  try {
62627
62636
  if (existsSync34(p))
62628
- cfg = { ...cfg, ...JSON.parse(readFileSync32(p, "utf-8")) };
62637
+ cfg = { ...cfg, ...JSON.parse(readFileSync33(p, "utf-8")) };
62629
62638
  } catch {
62630
62639
  }
62631
62640
  let hasKey = false;
@@ -62668,7 +62677,7 @@ function getProviderSpecificKey(projectDir, provider) {
62668
62677
  try {
62669
62678
  const pp2 = providerKeyPath(projectDir, prov);
62670
62679
  if (existsSync34(pp2)) {
62671
- const v = readFileSync32(pp2, "utf-8").trim();
62680
+ const v = readFileSync33(pp2, "utf-8").trim();
62672
62681
  if (v)
62673
62682
  return v;
62674
62683
  }
@@ -62716,7 +62725,7 @@ function getApiKey(projectDir, provider) {
62716
62725
  try {
62717
62726
  const pp2 = providerKeyPath(projectDir, prov);
62718
62727
  if (existsSync34(pp2)) {
62719
- const v = readFileSync32(pp2, "utf-8").trim();
62728
+ const v = readFileSync33(pp2, "utf-8").trim();
62720
62729
  if (v)
62721
62730
  return v;
62722
62731
  }
@@ -62739,7 +62748,7 @@ function getApiKey(projectDir, provider) {
62739
62748
  }
62740
62749
 
62741
62750
  // ../agentic/dist/dev-api.js
62742
- import { existsSync as existsSync35, readFileSync as readFileSync33 } from "node:fs";
62751
+ import { existsSync as existsSync35, readFileSync as readFileSync34 } from "node:fs";
62743
62752
  import { resolve as resolve31 } from "node:path";
62744
62753
 
62745
62754
  // ../agentic/dist/providers/openai.js
@@ -63112,7 +63121,7 @@ function getPerProviderKeyRaw(projectDir, provider) {
63112
63121
  try {
63113
63122
  const p = resolve31(projectDir, ".vesk", "agentic", "keys", `${sanitizeProviderName(prov)}.key`);
63114
63123
  if (existsSync35(p)) {
63115
- const v = readFileSync33(p, "utf-8").trim();
63124
+ const v = readFileSync34(p, "utf-8").trim();
63116
63125
  if (v)
63117
63126
  return v;
63118
63127
  }
@@ -63973,7 +63982,7 @@ var Agent = class {
63973
63982
  };
63974
63983
 
63975
63984
  // ../agentic/dist/tools/vesk.js
63976
- import { existsSync as existsSync36, readFileSync as readFileSync34, writeFileSync as writeFileSync18, mkdirSync as mkdirSync17, readdirSync as readdirSync11, statSync as statSync20 } from "node:fs";
63985
+ import { existsSync as existsSync36, readFileSync as readFileSync35, writeFileSync as writeFileSync18, mkdirSync as mkdirSync17, readdirSync as readdirSync11, statSync as statSync20 } from "node:fs";
63977
63986
  import { resolve as resolve32, join as join25, dirname as dirname24, sep as sep6 } from "node:path";
63978
63987
  function resolveWithin3(baseDir, relPath) {
63979
63988
  const base = resolve32(baseDir);
@@ -63992,7 +64001,7 @@ function readPluginState3(veskDir) {
63992
64001
  if (!existsSync36(file))
63993
64002
  return { version: 1, plugins: [] };
63994
64003
  try {
63995
- const raw2 = JSON.parse(readFileSync34(file, "utf-8"));
64004
+ const raw2 = JSON.parse(readFileSync35(file, "utf-8"));
63996
64005
  if (!raw2 || typeof raw2 !== "object")
63997
64006
  return { version: 1, plugins: [] };
63998
64007
  if (raw2.version !== 1)
@@ -64192,7 +64201,7 @@ function createVeskTools(deps) {
64192
64201
  if (cfgInfo.path && existsSync36(cfgInfo.path)) {
64193
64202
  configExists = true;
64194
64203
  try {
64195
- configSource = readFileSync34(cfgInfo.path, "utf-8").slice(0, 8e3);
64204
+ configSource = readFileSync35(cfgInfo.path, "utf-8").slice(0, 8e3);
64196
64205
  } catch {
64197
64206
  configSource = null;
64198
64207
  }
@@ -64201,7 +64210,7 @@ function createVeskTools(deps) {
64201
64210
  const pkgPath = resolve32(projectDir, "package.json");
64202
64211
  if (existsSync36(pkgPath)) {
64203
64212
  try {
64204
- packageJson = JSON.parse(readFileSync34(pkgPath, "utf-8"));
64213
+ packageJson = JSON.parse(readFileSync35(pkgPath, "utf-8"));
64205
64214
  } catch {
64206
64215
  packageJson = null;
64207
64216
  }
@@ -64289,7 +64298,7 @@ function createVeskTools(deps) {
64289
64298
  return jsonOk({ ok: true, path: rel, directory: true, entries: entries.slice(0, 200) });
64290
64299
  }
64291
64300
  if (st.isFile()) {
64292
- const content = readFileSync34(resolved, "utf-8");
64301
+ const content = readFileSync35(resolved, "utf-8");
64293
64302
  const capped = content.length > 2e4 ? content.slice(0, 2e4) + "\n/* truncated */" : content;
64294
64303
  return jsonOk({ ok: true, path: rel, directory: false, content: capped, size: content.length });
64295
64304
  }
@@ -64325,7 +64334,7 @@ function createVeskTools(deps) {
64325
64334
  if (!info.path || !existsSync36(info.path)) {
64326
64335
  return jsonOk({ ok: true, path: null, exists: false, source: "", config: {} });
64327
64336
  }
64328
- const source = readFileSync34(info.path, "utf-8");
64337
+ const source = readFileSync35(info.path, "utf-8");
64329
64338
  return jsonOk({ ok: true, path: info.path, exists: true, source, config: null });
64330
64339
  } catch (e) {
64331
64340
  return jsonError(e instanceof Error ? e.message : String(e));
@@ -64383,7 +64392,7 @@ function createVeskTools(deps) {
64383
64392
  const contained = resolveWithin3(projectDir, info.path.slice(projectDir.length + 1));
64384
64393
  if (!contained)
64385
64394
  return jsonError("path escapes project root");
64386
- const current3 = readFileSync34(info.path, "utf-8");
64395
+ const current3 = readFileSync35(info.path, "utf-8");
64387
64396
  const patched = applySimpleConfigToggle(current3, key, a.value);
64388
64397
  if (patched === null)
64389
64398
  return jsonError("could not safely edit the config object; use the source editor");
@@ -64706,7 +64715,7 @@ function createVeskTools(deps) {
64706
64715
  return jsonError("path escapes project root");
64707
64716
  if (!existsSync36(file))
64708
64717
  return jsonError(`checkpoint not found: ${checkpointId}`, { checkpointId });
64709
- const raw2 = readFileSync34(file, "utf-8");
64718
+ const raw2 = readFileSync35(file, "utf-8");
64710
64719
  let data2;
64711
64720
  try {
64712
64721
  data2 = JSON.parse(raw2);
@@ -64789,7 +64798,7 @@ function renderDefaultNotFoundPage2(opts = {}) {
64789
64798
  }
64790
64799
 
64791
64800
  // ../adapter/dist/ssr-function.js
64792
- import { readFileSync as readFileSync35, existsSync as existsSync37 } from "node:fs";
64801
+ import { readFileSync as readFileSync36, existsSync as existsSync37 } from "node:fs";
64793
64802
  import { resolve as resolve33, relative as relative7, join as join26 } from "node:path";
64794
64803
  init_default_pages();
64795
64804
  function resolveBoundaryFileForUrl2(pathname, appDir, file) {
@@ -64804,7 +64813,7 @@ function resolveBoundaryFileForUrl2(pathname, appDir, file) {
64804
64813
  }
64805
64814
 
64806
64815
  // ../adapter/dist/css.js
64807
- import { readFileSync as readFileSync36, existsSync as existsSync38 } from "node:fs";
64816
+ import { readFileSync as readFileSync37, existsSync as existsSync38 } from "node:fs";
64808
64817
  import { resolve as resolve34 } from "node:path";
64809
64818
  var GLOBAL_CSS_URL2 = "/_vesk/static/global.css";
64810
64819
  function resolveUserCssPath2(appDir) {
@@ -64831,7 +64840,7 @@ function resolveCssUrls2(opts) {
64831
64840
  // ../adapter/dist/hmr.js
64832
64841
  init_client_codegen();
64833
64842
  import { WebSocketServer } from "ws";
64834
- import { readFileSync as readFileSync37, existsSync as existsSync39, writeFileSync as writeFileSync19 } from "node:fs";
64843
+ import { readFileSync as readFileSync38, existsSync as existsSync39, writeFileSync as writeFileSync19 } from "node:fs";
64835
64844
  import { resolve as resolve35, dirname as dirname25 } from "node:path";
64836
64845
  import { fileURLToPath as fileURLToPath7 } from "node:url";
64837
64846
  init_default_pages();
@@ -65075,7 +65084,7 @@ function buildErrorPayload(error, filename, opts = {}) {
65075
65084
  for (const absPath of candidates) {
65076
65085
  try {
65077
65086
  if (existsSync39(absPath)) {
65078
- src2 = readFileSync37(absPath, "utf-8");
65087
+ src2 = readFileSync38(absPath, "utf-8");
65079
65088
  resolvedAbsPath = absPath;
65080
65089
  break;
65081
65090
  }
@@ -65123,7 +65132,7 @@ function buildErrorPayload(error, filename, opts = {}) {
65123
65132
  }
65124
65133
 
65125
65134
  // ../adapter/dist/ssr-error.js
65126
- import { existsSync as existsSync40, readFileSync as readFileSync38 } from "node:fs";
65135
+ import { existsSync as existsSync40, readFileSync as readFileSync39 } from "node:fs";
65127
65136
  import { relative as relative8, resolve as resolve36 } from "node:path";
65128
65137
 
65129
65138
  // ../adapter/dist/error-codeframe.js
@@ -65354,7 +65363,7 @@ function readIfFile(absPath) {
65354
65363
  try {
65355
65364
  if (!existsSync40(absPath))
65356
65365
  return null;
65357
- return readFileSync38(absPath, "utf-8");
65366
+ return readFileSync39(absPath, "utf-8");
65358
65367
  } catch {
65359
65368
  return null;
65360
65369
  }
@@ -65502,7 +65511,7 @@ function renderDevErrorPage(payload, opts) {
65502
65511
 
65503
65512
  // src/build-packages.ts
65504
65513
  import { spawnSync as spawnSync2 } from "node:child_process";
65505
- 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";
65514
+ import { cpSync as cpSync2, existsSync as existsSync41, mkdirSync as mkdirSync18, readFileSync as readFileSync40, readdirSync as readdirSync12, statSync as statSync21, writeFileSync as writeFileSync20 } from "node:fs";
65506
65515
  import { createRequire as createRequire7 } from "node:module";
65507
65516
  import { dirname as dirname26, join as join27, resolve as resolve37 } from "node:path";
65508
65517
  import { fileURLToPath as fileURLToPath8 } from "node:url";
@@ -65594,7 +65603,7 @@ function buildPackages(force = false) {
65594
65603
  mkdirSync18(dirname26(to), { recursive: true });
65595
65604
  cpSync2(join27(pkgDir, c.from), to, { recursive: true });
65596
65605
  }
65597
- const srcPkg = JSON.parse(readFileSync39(join27(pkgDir, "package.json"), "utf-8"));
65606
+ const srcPkg = JSON.parse(readFileSync40(join27(pkgDir, "package.json"), "utf-8"));
65598
65607
  if (pkg === "lucide-vesk") {
65599
65608
  const lucideDistPkg = {
65600
65609
  name: srcPkg.name,
@@ -65623,7 +65632,7 @@ if (process.argv[1] && resolve37(process.argv[1]) === fileURLToPath8(import.meta
65623
65632
  }
65624
65633
 
65625
65634
  // src/action-handler.ts
65626
- import { existsSync as existsSync42, readFileSync as readFileSync40, readdirSync as readdirSync13 } from "node:fs";
65635
+ import { existsSync as existsSync42, readFileSync as readFileSync41, readdirSync as readdirSync13 } from "node:fs";
65627
65636
  import { resolve as resolve38 } from "node:path";
65628
65637
 
65629
65638
  // ../compiler/dist/server-cookies.js
@@ -65753,7 +65762,7 @@ function candidateSources(appDirPath, routeTree) {
65753
65762
  function registerSource(sourcePath2) {
65754
65763
  if (!existsSync42(sourcePath2)) return;
65755
65764
  try {
65756
- compileFile(readFileSync40(sourcePath2, "utf-8"), { sourcePath: sourcePath2 });
65765
+ compileFile(readFileSync41(sourcePath2, "utf-8"), { sourcePath: sourcePath2 });
65757
65766
  } catch {
65758
65767
  }
65759
65768
  }
@@ -65792,14 +65801,14 @@ async function renderPageHtml(pagePathname, params, ctx2) {
65792
65801
  const pageFilePath = resolve38(ctx2.appDirPath, node.sourceDir, "page.vsk");
65793
65802
  const layoutFilePath = resolve38(ctx2.appDirPath, node.sourceDir, "layout.vsk");
65794
65803
  if (i === chain.length - 1 && node.page && existsSync42(pageFilePath)) {
65795
- const src3 = readFileSync40(pageFilePath, "utf-8");
65804
+ const src3 = readFileSync41(pageFilePath, "utf-8");
65796
65805
  const compName2 = resolveComponentName(src3) || node.page;
65797
65806
  const result = await renderPage(src3, compName2, { params }, /* @__PURE__ */ new Map(), { hydrate: true, sourcePath: pageFilePath });
65798
65807
  body = result.body;
65799
65808
  head = result.head || "";
65800
65809
  }
65801
65810
  if (node.layout && existsSync42(layoutFilePath)) {
65802
- const src3 = readFileSync40(layoutFilePath, "utf-8");
65811
+ const src3 = readFileSync41(layoutFilePath, "utf-8");
65803
65812
  const compName2 = resolveComponentName(src3) || node.layout;
65804
65813
  const result = await renderPage(src3, compName2, { children: body }, /* @__PURE__ */ new Map(), { hydrate: true, sourcePath: layoutFilePath });
65805
65814
  body = result.body;
@@ -65830,7 +65839,7 @@ ${prettifyHtml(body)}
65830
65839
  }
65831
65840
  const leaf2 = chain.find((n) => n.page);
65832
65841
  if (!leaf2) return null;
65833
- const src2 = readFileSync40(resolve38(ctx2.appDirPath, leaf2.sourceDir, "page.vsk"), "utf-8");
65842
+ const src2 = readFileSync41(resolve38(ctx2.appDirPath, leaf2.sourceDir, "page.vsk"), "utf-8");
65834
65843
  const compName = resolveComponentName(src2) || leaf2.page;
65835
65844
  const html = await renderFullPage(src2, compName, { params }, /* @__PURE__ */ new Map(), { hydrate: true, clientScriptUrl: "/_vesk/client.js", cssUrls: actionCssUrls(ctx2.appDirPath), security: ctx2.security, sourcePath: resolve38(ctx2.appDirPath, leaf2.sourceDir, "page.vsk"), plugins: ctx2.plugins });
65836
65845
  return applyHtmlPlugins(html.replace("</body>", ' <script type="module" src="/_vesk/hmr.js"></script>\n</body>'), ctx2.plugins, { sourcePath: ctx2.url.pathname });
@@ -66003,7 +66012,7 @@ function buildDevErrorPayload(input) {
66003
66012
  payload.column = colMatch ? parseInt(colMatch[1], 10) : 1;
66004
66013
  if (fileExists && payload.line > 0) {
66005
66014
  try {
66006
- const src2 = readFileSync41(fullPath, "utf-8");
66015
+ const src2 = readFileSync42(fullPath, "utf-8");
66007
66016
  const cf = buildCodeframe2(src2, payload.line, payload.column);
66008
66017
  if (cf) {
66009
66018
  cf.file = payload.file || filename;
@@ -66486,13 +66495,13 @@ async function startDevServer(port, projectDir, config, host) {
66486
66495
  let devCssSource = "";
66487
66496
  if (existsSync43(appCssPath)) {
66488
66497
  devCssSource = appCssPath;
66489
- rawCss = readFileSync41(appCssPath, "utf-8");
66498
+ rawCss = readFileSync42(appCssPath, "utf-8");
66490
66499
  } else if (existsSync43(cssPath)) {
66491
66500
  devCssSource = cssPath;
66492
- rawCss = readFileSync41(cssPath, "utf-8");
66501
+ rawCss = readFileSync42(cssPath, "utf-8");
66493
66502
  } else if (existsSync43(altCssPath)) {
66494
66503
  devCssSource = altCssPath;
66495
- rawCss = readFileSync41(altCssPath, "utf-8");
66504
+ rawCss = readFileSync42(altCssPath, "utf-8");
66496
66505
  }
66497
66506
  if (rawCss) {
66498
66507
  const activeAtStart = getActiveDevPlugins();
@@ -66570,7 +66579,7 @@ async function startDevServer(port, projectDir, config, host) {
66570
66579
  };
66571
66580
  walk9(appDirPath);
66572
66581
  try {
66573
- parts.push(`compiler:${readFileSync41(join28(process.cwd(), "node_modules", "@vesk", "compiler", "package.json"), "utf8")}`);
66582
+ parts.push(`compiler:${readFileSync42(join28(process.cwd(), "node_modules", "@vesk", "compiler", "package.json"), "utf8")}`);
66574
66583
  } catch {
66575
66584
  }
66576
66585
  return createHash3("sha256").update(parts.join("\n")).digest("hex").slice(0, 32);
@@ -66578,7 +66587,7 @@ async function startDevServer(port, projectDir, config, host) {
66578
66587
  function readDevBundleCache() {
66579
66588
  try {
66580
66589
  const file = join28(devCacheDir(), "client-bundle.json");
66581
- const parsed = JSON.parse(readFileSync41(file, "utf8"));
66590
+ const parsed = JSON.parse(readFileSync42(file, "utf8"));
66582
66591
  if (parsed.key !== devCacheKey() || typeof parsed.main !== "string" || !Array.isArray(parsed.chunks)) return null;
66583
66592
  return { main: parsed.main, chunks: parsed.chunks };
66584
66593
  } catch {
@@ -66984,7 +66993,7 @@ async function startDevServer(port, projectDir, config, host) {
66984
66993
  debounceTimer = setTimeout(async () => {
66985
66994
  const t0 = Date.now();
66986
66995
  try {
66987
- const current3 = fileExists ? readFileSync41(fullPath, "utf-8") : null;
66996
+ const current3 = fileExists ? readFileSync42(fullPath, "utf-8") : null;
66988
66997
  if (eventType !== "rename" && current3 !== null && lastSeenContent.get(fullPath) === current3) {
66989
66998
  LOG.info(`skipped unchanged (${filename})`);
66990
66999
  return;
@@ -67043,7 +67052,7 @@ Object.defineProperty(__components, ${JSON.stringify(cname)}, { get: () => __com
67043
67052
  if (compCode.trim()) fnSources = { _raw: compCode };
67044
67053
  } else if (fileExists && !bundleError) {
67045
67054
  try {
67046
- const src2 = readFileSync41(fullPath, "utf-8");
67055
+ const src2 = readFileSync42(fullPath, "utf-8");
67047
67056
  let compCode = buildHmrEvalSnippet2(
67048
67057
  compileClient2(src2, null, { forceClient: true, sourcePath: fullPath, mdRoots: [projectDir] })
67049
67058
  );
@@ -67127,7 +67136,7 @@ Object.defineProperty(__components, ${JSON.stringify(cname)}, { get: () => __com
67127
67136
  cssDebounceTimer = setTimeout(async () => {
67128
67137
  try {
67129
67138
  if (fileExists) {
67130
- rawCss = readFileSync41(fullPath, "utf-8");
67139
+ rawCss = readFileSync42(fullPath, "utf-8");
67131
67140
  }
67132
67141
  const cssChanged = await rebuildTailwindCss();
67133
67142
  if (cssChanged && typeof globalThis.__vesk_broadcastHmr === "function") {
@@ -67290,7 +67299,7 @@ Object.defineProperty(__components, ${JSON.stringify(cname)}, { get: () => __com
67290
67299
  }
67291
67300
  if (url.pathname === "/_vesk/hmr" || url.pathname === "/_vesk/hmr.js") {
67292
67301
  if (hmrClientPath) {
67293
- let hmrContent = readFileSync41(hmrClientPath, "utf-8");
67302
+ let hmrContent = readFileSync42(hmrClientPath, "utf-8");
67294
67303
  if (hmrClientPath.endsWith(".ts")) {
67295
67304
  hmrContent = stripCodeTypes2(hmrContent);
67296
67305
  }
@@ -67341,7 +67350,7 @@ Object.defineProperty(__components, ${JSON.stringify(cname)}, { get: () => __com
67341
67350
  if (staticPath && existsSync43(staticPath) && statSync22(staticPath).isFile()) {
67342
67351
  const ext = extname7(staticPath);
67343
67352
  res.writeHead(200, { "Content-Type": MIME2[ext] || "application/octet-stream" });
67344
- res.end(readFileSync41(staticPath));
67353
+ res.end(readFileSync42(staticPath));
67345
67354
  return;
67346
67355
  }
67347
67356
  }
@@ -67442,7 +67451,7 @@ Object.defineProperty(__components, ${JSON.stringify(cname)}, { get: () => __com
67442
67451
  const nfPath = resolveBoundaryFileForUrl2(url.pathname, appDirPath, "not-found.vsk");
67443
67452
  if (nfPath) {
67444
67453
  try {
67445
- const nfSrc = readFileSync41(nfPath, "utf-8");
67454
+ const nfSrc = readFileSync42(nfPath, "utf-8");
67446
67455
  const nfCompName = extractCompName2(nfSrc) || "NotFound";
67447
67456
  notFoundHtml = await renderFullPage(nfSrc, nfCompName, { params: {}, url: url.pathname }, /* @__PURE__ */ new Map(), { hydrate: true, cssUrls: activeCssUrls(), security, externalDataScript: storeDataScript, sourcePath: nfPath, cached: cachedSsrCompile(ssrCompileCache, nfSrc, nfPath), plugins: getActiveDevPlugins() });
67448
67457
  } catch {
@@ -67486,7 +67495,7 @@ Object.defineProperty(__components, ${JSON.stringify(cname)}, { get: () => __com
67486
67495
  const pageFilePath = resolve39(appDirPath, node.sourceDir, "page.vsk");
67487
67496
  const layoutFilePath = resolve39(appDirPath, node.sourceDir, "layout.vsk");
67488
67497
  if (i === chain.length - 1 && node.page && existsSync43(pageFilePath)) {
67489
- const src2 = readFileSync41(pageFilePath, "utf-8");
67498
+ const src2 = readFileSync42(pageFilePath, "utf-8");
67490
67499
  const compName = extractCompName2(src2) || node.page;
67491
67500
  const result = await renderPage(src2, compName, { params: matched.params }, /* @__PURE__ */ new Map(), { hydrate: true, sourcePath: pageFilePath, cached: cachedSsrCompile(ssrCompileCache, src2, pageFilePath) });
67492
67501
  body = result.body;
@@ -67494,7 +67503,7 @@ Object.defineProperty(__components, ${JSON.stringify(cname)}, { get: () => __com
67494
67503
  props = result.props;
67495
67504
  }
67496
67505
  if (node.layout && existsSync43(layoutFilePath)) {
67497
- const src2 = readFileSync41(layoutFilePath, "utf-8");
67506
+ const src2 = readFileSync42(layoutFilePath, "utf-8");
67498
67507
  const compName = extractCompName2(src2) || node.layout;
67499
67508
  const result = await renderPage(src2, compName, { children: body }, /* @__PURE__ */ new Map(), { hydrate: true, sourcePath: layoutFilePath, cached: cachedSsrCompile(ssrCompileCache, src2, layoutFilePath) });
67500
67509
  body = result.body;
@@ -67539,7 +67548,7 @@ ${prettifyHtml(body)}
67539
67548
  } else {
67540
67549
  const leaf2 = chain.find((n) => n.page);
67541
67550
  if (leaf2) {
67542
- const src2 = readFileSync41(resolve39(appDirPath, leaf2.sourceDir, "page.vsk"), "utf-8");
67551
+ const src2 = readFileSync42(resolve39(appDirPath, leaf2.sourceDir, "page.vsk"), "utf-8");
67543
67552
  const compName = extractCompName2(src2) || leaf2.page;
67544
67553
  html = await renderFullPage(src2, compName, { params: matched.params }, /* @__PURE__ */ new Map(), { hydrate: true, clientScriptUrl: "/_vesk/client.js", cssUrls: activeCssUrls(), security, externalDataScript: storeDataScript, sourcePath: resolve39(appDirPath, leaf2.sourceDir, "page.vsk"), cached: cachedSsrCompile(ssrCompileCache, src2, resolve39(appDirPath, leaf2.sourceDir, "page.vsk")), plugins: getActiveDevPlugins() });
67545
67554
  html = html.replace("</body>", ' <script type="module" src="/_vesk/hmr.js"></script>\n</body>');
@@ -67568,7 +67577,7 @@ ${prettifyHtml(body)}
67568
67577
  if (!hasLayout) {
67569
67578
  const leaf2 = chain.find((n) => n.page);
67570
67579
  if (leaf2) {
67571
- const src2 = readFileSync41(resolve39(appDirPath, leaf2.sourceDir, "page.vsk"), "utf-8");
67580
+ const src2 = readFileSync42(resolve39(appDirPath, leaf2.sourceDir, "page.vsk"), "utf-8");
67572
67581
  const compName = extractCompName2(src2) || leaf2.page;
67573
67582
  yield* renderPageStream(src2, compName, { params: matched.params }, /* @__PURE__ */ new Map(), { hydrate: true, clientScriptUrl: "/_vesk/client.js", cssUrls: activeCssUrls(), security, externalDataScript: storeDataScript, sourcePath: resolve39(appDirPath, leaf2.sourceDir, "page.vsk"), cached: cachedSsrCompile(ssrCompileCache, src2, resolve39(appDirPath, leaf2.sourceDir, "page.vsk")), plugins: getActiveDevPlugins() });
67574
67583
  } else {
@@ -67584,7 +67593,7 @@ ${prettifyHtml(body)}
67584
67593
  const pageFilePath = resolve39(appDirPath, node.sourceDir, "page.vsk");
67585
67594
  const layoutFilePath = resolve39(appDirPath, node.sourceDir, "layout.vsk");
67586
67595
  if (i === chain.length - 1 && node.page && existsSync43(pageFilePath)) {
67587
- const src2 = readFileSync41(pageFilePath, "utf-8");
67596
+ const src2 = readFileSync42(pageFilePath, "utf-8");
67588
67597
  const compName = extractCompName2(src2) || node.page;
67589
67598
  const result = await renderPage(src2, compName, { params: matched.params }, /* @__PURE__ */ new Map(), { hydrate: true, sourcePath: pageFilePath, cached: cachedSsrCompile(ssrCompileCache, src2, pageFilePath) });
67590
67599
  body = result.body;
@@ -67592,7 +67601,7 @@ ${prettifyHtml(body)}
67592
67601
  props = result.props;
67593
67602
  }
67594
67603
  if (node.layout && existsSync43(layoutFilePath)) {
67595
- const src2 = readFileSync41(layoutFilePath, "utf-8");
67604
+ const src2 = readFileSync42(layoutFilePath, "utf-8");
67596
67605
  const compName = extractCompName2(src2) || node.layout;
67597
67606
  const result = await renderPage(src2, compName, { children: body }, /* @__PURE__ */ new Map(), { hydrate: true, sourcePath: layoutFilePath, cached: cachedSsrCompile(ssrCompileCache, src2, layoutFilePath) });
67598
67607
  body = result.body;
@@ -67736,7 +67745,7 @@ ${prettifyHtml(body)}
67736
67745
  const nfPath = resolve39(appDirPath, node.sourceDir, "not-found.vsk");
67737
67746
  if (existsSync43(nfPath)) {
67738
67747
  try {
67739
- const nfSrc = readFileSync41(nfPath, "utf-8");
67748
+ const nfSrc = readFileSync42(nfPath, "utf-8");
67740
67749
  const nfCompName = extractCompName2(nfSrc) || node.notFound;
67741
67750
  const html = await renderFullPage(nfSrc, nfCompName, { params: match.params, url: url.pathname }, /* @__PURE__ */ new Map(), { hydrate: true, cssUrls: activeCssUrls(), security, externalDataScript: storeDataScript, sourcePath: nfPath, cached: cachedSsrCompile(ssrCompileCache, nfSrc, nfPath), plugins: getActiveDevPlugins() });
67742
67751
  notFoundHtml = injectDevScripts(html);
@@ -67782,7 +67791,7 @@ ${prettifyHtml(body)}
67782
67791
  const errPath = resolve39(appDirPath, node.sourceDir, "error.vsk");
67783
67792
  if (existsSync43(errPath)) {
67784
67793
  try {
67785
- const errSrc = readFileSync41(errPath, "utf-8");
67794
+ const errSrc = readFileSync42(errPath, "utf-8");
67786
67795
  const errCompName = extractCompName2(errSrc) || node.error;
67787
67796
  const errProps = {
67788
67797
  error: err.message,
@@ -68187,7 +68196,7 @@ function loadEnvFiles(projectDir) {
68187
68196
  ];
68188
68197
  for (const filePath of files) {
68189
68198
  if (!existsSync46(filePath)) continue;
68190
- const content = readFileSync45(filePath, "utf-8");
68199
+ const content = readFileSync46(filePath, "utf-8");
68191
68200
  for (const line of content.split("\n")) {
68192
68201
  const trimmed = line.trim();
68193
68202
  if (!trimmed || trimmed.startsWith("#")) continue;
@@ -68401,7 +68410,7 @@ if (cmd === "migrate") {
68401
68410
  const projectDir = process.cwd();
68402
68411
  const { runMigrate: runMigrate2 } = await Promise.resolve().then(() => (init_migrate(), migrate_exports));
68403
68412
  const { CODEMODS: CODEMODS2 } = await Promise.resolve().then(() => (init_codemods(), codemods_exports));
68404
- const { version: cliVersion } = JSON.parse(readFileSync45(join32(__dirname10, "..", "package.json"), "utf-8"));
68413
+ const { version: cliVersion } = JSON.parse(readFileSync46(join32(__dirname10, "..", "package.json"), "utf-8"));
68405
68414
  if (args.includes("--list")) {
68406
68415
  console.error("vesk migrate: available codemods");
68407
68416
  for (const c of CODEMODS2) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vesk/vesk-cli",
3
- "version": "0.2.82",
3
+ "version": "0.2.83",
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.82",
12
- "@vesk/compiler": "^0.2.82",
13
- "@vesk/plugin-tailwind": "^0.2.82",
14
- "@vesk/runtime": "^0.2.82",
11
+ "@vesk/adapter": "^0.2.83",
12
+ "@vesk/compiler": "^0.2.83",
13
+ "@vesk/plugin-tailwind": "^0.2.83",
14
+ "@vesk/runtime": "^0.2.83",
15
15
  "esrap": "^2.3.0",
16
16
  "typescript": "^5.8.0",
17
17
  "ws": "^8.18.0",