dotdog 0.7.1 → 0.8.0

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 +15 -4
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -3609,20 +3609,31 @@ program2.command("init <project>").option("-m, --minimal", "Only SPEC.dog + data
3609
3609
  console.log(source_default.bold(`
3610
3610
  Project "${p}" initialized. Fill in SPEC.dog then run spec validate.`));
3611
3611
  });
3612
- program2.command("list").action(() => {
3612
+ program2.command("list").option("--json", "Output project names as JSON").action((opts) => {
3613
+ const entries = [];
3613
3614
  for (const d of ["projects", "specs"]) {
3614
3615
  const dd = join3(process.cwd(), d);
3615
3616
  if (!existsSync3(dd))
3616
3617
  continue;
3617
3618
  const projects = readdirSync3(dd, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => e.name);
3619
+ for (const p of projects) {
3620
+ const sp = join3(dd, p);
3621
+ const n = existsSync3(sp) ? readdirSync3(sp).filter((f) => f.endsWith(".dog")).length : 0;
3622
+ entries.push({ root: d, name: p, dogFiles: n });
3623
+ }
3624
+ }
3625
+ if (opts.json) {
3626
+ console.log(JSON.stringify(entries.map((e) => e.name)));
3627
+ return;
3628
+ }
3629
+ for (const d of ["projects", "specs"]) {
3630
+ const projects = entries.filter((e) => e.root === d);
3618
3631
  if (!projects.length)
3619
3632
  continue;
3620
3633
  console.log(source_default.bold(`
3621
3634
  ${d}/`));
3622
3635
  for (const p of projects) {
3623
- const sp = join3(dd, p);
3624
- const n = existsSync3(sp) ? readdirSync3(sp).filter((f) => f.endsWith(".dog")).length : 0;
3625
- console.log(` ${source_default.cyan(p)} : ${n} .dog files`);
3636
+ console.log(` ${source_default.cyan(p.name)} : ${p.dogFiles} .dog files`);
3626
3637
  }
3627
3638
  }
3628
3639
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dotdog",
3
- "version": "0.7.1",
3
+ "version": "0.8.0",
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",