compound-workflow 1.1.0 → 1.1.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/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"compound-workflow","version":"1.1.0","description":"Clarify → plan → execute → verify → capture. One Install action for Cursor, Claude, and OpenCode.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/cjerochim/compound-workflow.git"},"bin":{"compound-workflow":"scripts/install-cli.mjs"},"files":["src","scripts",".cursor-plugin",".claude-plugin","skills"],"engines":{"node":">=18"},"devDependencies":{"@semantic-release/git":"^10.0.1","@semantic-release/npm":"^13.1.4","semantic-release":"^25.0.3"}}
1
+ {"name":"compound-workflow","version":"1.1.1","description":"Clarify → plan → execute → verify → capture. One Install action for Cursor, Claude, and OpenCode.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/cjerochim/compound-workflow.git"},"bin":{"compound-workflow":"scripts/install-cli.mjs"},"files":["src","scripts",".cursor-plugin",".claude-plugin","skills"],"scripts":{"check:pack-readme":"node scripts/check-pack-readme.mjs"},"engines":{"node":">=18"},"devDependencies":{"@semantic-release/git":"^10.0.1","@semantic-release/npm":"^13.1.4","semantic-release":"^25.0.3"}}
@@ -0,0 +1,41 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { execFileSync } from "node:child_process";
4
+ import os from "node:os";
5
+ import path from "node:path";
6
+
7
+ const cacheDir =
8
+ process.env.npm_config_cache ?? path.join(os.tmpdir(), `npm-cache-${process.pid}`);
9
+
10
+ let output;
11
+
12
+ try {
13
+ output = execFileSync("npm", ["pack", "--dry-run", "--json", "--cache", cacheDir], {
14
+ encoding: "utf8",
15
+ });
16
+ } catch (error) {
17
+ const stderr = error?.stderr?.toString?.() ?? error.message;
18
+ console.error("Failed to run `npm pack --dry-run --json`.");
19
+ console.error(stderr);
20
+ process.exit(1);
21
+ }
22
+
23
+ let report;
24
+ try {
25
+ report = JSON.parse(output);
26
+ } catch (error) {
27
+ console.error("Failed to parse npm pack JSON output.");
28
+ console.error(error.message);
29
+ process.exit(1);
30
+ }
31
+
32
+ const files = Array.isArray(report) && report[0]?.files ? report[0].files : [];
33
+ const hasRootReadme = files.some((file) => /^readme(?:\.[^/]+)?$/i.test(file.path));
34
+
35
+ if (!hasRootReadme) {
36
+ console.error("Package guard failed: root README is missing from the packed tarball.");
37
+ console.error("Add a root README (for example `README.md`) and ensure it is not excluded.");
38
+ process.exit(1);
39
+ }
40
+
41
+ console.log("Package guard passed: root README is present in npm pack output.");