mrvn-cli 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/marvin.js CHANGED
@@ -20046,21 +20046,22 @@ import { fileURLToPath } from "url";
20046
20046
  var __dirname = path8.dirname(fileURLToPath(import.meta.url));
20047
20047
  var cachedStyles = null;
20048
20048
  function renderStyles() {
20049
- if (!cachedStyles) {
20050
- const candidates = [
20051
- path8.join(__dirname, "..", "static", "styles.css"),
20052
- path8.resolve("src/web/static/styles.css"),
20053
- path8.resolve("dist/web/static/styles.css")
20054
- ];
20055
- for (const p of candidates) {
20056
- if (fs8.existsSync(p)) {
20057
- cachedStyles = fs8.readFileSync(p, "utf-8");
20058
- return cachedStyles;
20059
- }
20049
+ if (cachedStyles) return cachedStyles;
20050
+ const candidates = [
20051
+ path8.join(__dirname, "..", "static", "styles.css"),
20052
+ // dev source layout
20053
+ path8.join(__dirname, "web", "static", "styles.css"),
20054
+ // bundled prod layout
20055
+ path8.resolve("src/web/static/styles.css"),
20056
+ path8.resolve("dist/web/static/styles.css")
20057
+ ];
20058
+ for (const p of candidates) {
20059
+ if (fs8.existsSync(p)) {
20060
+ cachedStyles = fs8.readFileSync(p, "utf-8");
20061
+ return cachedStyles;
20060
20062
  }
20061
- throw new Error(`styles.css not found. Searched: ${candidates.join(", ")}`);
20062
20063
  }
20063
- return cachedStyles;
20064
+ throw new Error(`styles.css not found. Searched: ${candidates.join(", ")}`);
20064
20065
  }
20065
20066
 
20066
20067
  // src/web/templates/pages/documents.ts
@@ -24164,11 +24165,12 @@ function handleRequest(req, res, store, projectName, navGroups) {
24164
24165
  const navTypes = store.registeredTypes;
24165
24166
  try {
24166
24167
  if (pathname === "/styles.css") {
24168
+ const css = renderStyles();
24167
24169
  res.writeHead(200, {
24168
24170
  "Content-Type": "text/css",
24169
24171
  "Cache-Control": "public, max-age=300"
24170
24172
  });
24171
- res.end(renderStyles());
24173
+ res.end(css);
24172
24174
  return;
24173
24175
  }
24174
24176
  const oldRootMatch = pathname.match(/^\/([a-z-]+)$/);
@@ -24389,8 +24391,12 @@ function handleRequest(req, res, store, projectName, navGroups) {
24389
24391
  notFound(res, projectName, navGroups, pathname, null);
24390
24392
  } catch (err) {
24391
24393
  console.error("[marvin web] Error handling request:", err);
24392
- res.writeHead(500, { "Content-Type": "text/html" });
24393
- res.end("<h1>500 \u2014 Internal Server Error</h1>");
24394
+ if (!res.headersSent) {
24395
+ res.writeHead(500, { "Content-Type": "text/html" });
24396
+ res.end("<h1>500 \u2014 Internal Server Error</h1>");
24397
+ } else {
24398
+ res.end();
24399
+ }
24394
24400
  }
24395
24401
  }
24396
24402
  function respond(res, html) {
@@ -33134,7 +33140,7 @@ function createProgram() {
33134
33140
  const program2 = new Command();
33135
33141
  program2.name("marvin").description(
33136
33142
  "AI-powered product development assistant with Product Owner, Delivery Manager, and Technical Lead personas"
33137
- ).version("0.6.0");
33143
+ ).version("0.6.1");
33138
33144
  program2.command("init").description("Initialize a new Marvin project in the current directory").action(async () => {
33139
33145
  await initCommand();
33140
33146
  });