@vesk/vesk-cli 0.2.11 → 0.2.12

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 +14 -3
  2. package/package.json +5 -5
package/dist/cli.js CHANGED
@@ -47791,7 +47791,8 @@ async function startDevServer(port2, projectDir2, config, host2) {
47791
47791
  error: devLastError,
47792
47792
  hasError: !!devLastError,
47793
47793
  componentCount: countPages(routeTree),
47794
- nonce: globalThis.__vesk_hmr_nonce
47794
+ nonce: globalThis.__vesk_hmr_nonce,
47795
+ agenticAvailable: isAgenticActiveMain()
47795
47796
  }),
47796
47797
  getDiagnostics: () => produceDiagnostics({ bundleBytes: devBundleBytes, configPluginNames, findings: devDiagnostics }),
47797
47798
  rebuild: () => fullRebuild(),
@@ -48639,8 +48640,8 @@ ${prettifyHtml(body)}
48639
48640
  const errCode = errorStatusCode(err);
48640
48641
  logRequest(errCode);
48641
48642
  res.writeHead(errCode, { "Content-Type": "text/html" });
48642
- res.end(errorHtml || `<!DOCTYPE html><html><body><h1>${errCode}</h1><pre>${err.message}
48643
- ${err.stack}</pre></body></html>`);
48643
+ res.end(injectSsrErrorMarker(errorHtml || `<!DOCTYPE html><html><body><h1>${errCode}</h1><pre>${err.message}
48644
+ ${err.stack}</pre></body></html>`, err));
48644
48645
  }
48645
48646
  }
48646
48647
  });
@@ -48689,6 +48690,16 @@ ${err.stack}</pre></body></html>`);
48689
48690
  });
48690
48691
  }
48691
48692
  var TAILWIND_BLOCK = /^\s*@(theme\s*\{|layer\s+(components|utilities)\s*\{|utility\s+\w+\s*\{)/;
48693
+ function injectSsrErrorMarker(html, err) {
48694
+ const msg = err instanceof Error ? err.message : String(err);
48695
+ const marker = `<!--vesk-ssr-error:${encodeURIComponent(msg || "Internal Server Error")}-->`;
48696
+ const bodyIdx = html.indexOf("<body");
48697
+ if (bodyIdx >= 0) {
48698
+ const end = html.indexOf(">", bodyIdx);
48699
+ if (end >= 0) return html.slice(0, end + 1) + marker + html.slice(end + 1);
48700
+ }
48701
+ return marker + html;
48702
+ }
48692
48703
  function stripTailwindDirectives(css) {
48693
48704
  const lines = css.split("\n");
48694
48705
  const result2 = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vesk/vesk-cli",
3
- "version": "0.2.11",
3
+ "version": "0.2.12",
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.11",
12
- "@vesk/compiler": "^0.2.11",
13
- "@vesk/plugin-tailwind": "^0.2.11",
14
- "@vesk/runtime": "^0.2.11",
11
+ "@vesk/adapter": "^0.2.12",
12
+ "@vesk/compiler": "^0.2.12",
13
+ "@vesk/plugin-tailwind": "^0.2.12",
14
+ "@vesk/runtime": "^0.2.12",
15
15
  "esrap": "^2.3.0",
16
16
  "typescript": "^5.8.0",
17
17
  "ws": "^8.18.0",