dotdog 0.3.4 → 0.3.5

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 +11 -3
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -3190,7 +3190,7 @@ program2.name("spec").alias("dotdog").description("CLI for structured software s
3190
3190
  program2.command("validate [dir]").action((d = ".") => {
3191
3191
  const dir = resolvePath2(d);
3192
3192
  const dirs = [join2(dir, "projects"), join2(dir, "specs")];
3193
- let found = false;
3193
+ let found = false, hasErrors = false;
3194
3194
  for (const dd of dirs) {
3195
3195
  if (!existsSync2(dd))
3196
3196
  continue;
@@ -3207,14 +3207,18 @@ program2.command("validate [dir]").action((d = ".") => {
3207
3207
  ${p} : ${files.length} .dog files, ${100 - Math.round((missing.length * 3 + optional.length) / 20 * 100)}% complete`));
3208
3208
  for (const f of files)
3209
3209
  console.log(source_default.gray(` ${f}`));
3210
- if (missing.length)
3210
+ if (missing.length) {
3211
3211
  console.log(source_default.red(` Missing required: ${missing.join(", ")}`));
3212
+ hasErrors = true;
3213
+ }
3212
3214
  if (optional.length)
3213
3215
  console.log(source_default.yellow(` Missing optional: ${optional.join(", ")}`));
3214
3216
  }
3215
3217
  }
3216
3218
  if (!found)
3217
3219
  console.log(source_default.yellow("No projects found. Run: spec init <project>"));
3220
+ if (hasErrors)
3221
+ process.exit(1);
3218
3222
  });
3219
3223
  program2.command("init <project>").option("-m, --minimal", "Only SPEC.dog + data-model.dog").action((p, opts) => {
3220
3224
  const d = join2(process.cwd(), "specs", p);
@@ -3486,7 +3490,7 @@ program2.command("analyze [dir]").description("Analyze a spec project : score, g
3486
3490
  console.log(source_default.bold(`
3487
3491
  Spec Analysis
3488
3492
  `));
3489
- let found = false;
3493
+ let found = false, hasGaps = false;
3490
3494
  for (const dd of dirs) {
3491
3495
  if (!existsSync2(dd))
3492
3496
  continue;
@@ -3560,10 +3564,14 @@ Spec Analysis
3560
3564
  } else
3561
3565
  console.log(source_default.green(`
3562
3566
  No gaps found.`));
3567
+ if (gaps.length > 0)
3568
+ hasGaps = true;
3563
3569
  }
3564
3570
  }
3565
3571
  if (!found)
3566
3572
  console.log(source_default.yellow("No spec projects found. Run: dotdog init <project>"));
3573
+ if (hasGaps)
3574
+ process.exit(1);
3567
3575
  });
3568
3576
  program2.command("generate [dir]").description("Generate missing spec files from SPEC.dog").option("-p, --project <name>").action((d = ".", opts) => {
3569
3577
  const dir = resolvePath2(d);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dotdog",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "description": "CLI tool for structured software specifications. Validate .dog files, compile .dag graphs, query via MCP.",
5
5
  "type": "module",
6
6
  "main": "dist/cli.js",