@prodcycle/prodcycle 0.4.0 → 0.4.2

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/README.md CHANGED
@@ -32,15 +32,21 @@ npm install @prodcycle/prodcycle
32
32
 
33
33
  ```bash
34
34
  # Scan current directory against SOC 2 and HIPAA
35
- prodcycle . --framework soc2,hipaa
35
+ prodcycle scan . --framework soc2,hipaa
36
36
 
37
37
  # Output as SARIF for GitHub Code Scanning
38
- prodcycle . --framework soc2 --format sarif --output results.sarif
38
+ prodcycle scan . --framework soc2 --format sarif --output results.sarif
39
39
 
40
40
  # Set severity threshold (only report HIGH and above)
41
- prodcycle . --framework hipaa --severity-threshold high
41
+ prodcycle scan . --framework hipaa --severity-threshold high
42
+
43
+ # Auto-configure compliance hooks/instructions for your coding agents
44
+ # (Claude Code, Cursor, Codex, OpenCode, GitHub Copilot, Gemini CLI)
45
+ prodcycle init --agent all
42
46
  ```
43
47
 
48
+ Subcommands: `scan` (full repo scan), `gate` (JSON payload from stdin), `hook` (coding-agent post-edit hook), `init` (agent setup).
49
+
44
50
  ### Programmatic API
45
51
 
46
52
  ```typescript
@@ -21,6 +21,6 @@ export declare class ComplianceApiClient {
21
21
  private apiKey;
22
22
  constructor(apiUrl?: string, apiKey?: string);
23
23
  validate(files: Record<string, string>, frameworks: string[], options?: ScanOptions): Promise<any>;
24
- hook(files: Record<string, string>, frameworks: string[]): Promise<any>;
24
+ hook(files: Record<string, string>, frameworks: string[], options?: ScanOptions): Promise<any>;
25
25
  private post;
26
26
  }
@@ -22,10 +22,15 @@ class ComplianceApiClient {
22
22
  },
23
23
  });
24
24
  }
25
- async hook(files, frameworks) {
25
+ async hook(files, frameworks, options = {}) {
26
26
  return this.post('/v1/compliance/hook', {
27
27
  files,
28
28
  frameworks,
29
+ options: {
30
+ severity_threshold: options.severityThreshold,
31
+ fail_on: options.failOn,
32
+ ...options.config,
33
+ },
29
34
  });
30
35
  }
31
36
  async post(endpoint, data) {
package/dist/cli.js CHANGED
@@ -95,10 +95,21 @@ function parseList(val) {
95
95
  .filter(Boolean);
96
96
  }
97
97
  const program = new commander_1.Command();
98
+ // Load version from package.json at runtime so CLI --version stays in sync with
99
+ // the published package version without requiring a source edit per release.
100
+ const PKG_VERSION = (() => {
101
+ try {
102
+ const pkgPath = path.join(__dirname, '..', 'package.json');
103
+ return JSON.parse(fs.readFileSync(pkgPath, 'utf-8')).version ?? '0.0.0';
104
+ }
105
+ catch {
106
+ return '0.0.0';
107
+ }
108
+ })();
98
109
  program
99
110
  .name('prodcycle')
100
111
  .description('Multi-framework policy-as-code compliance scanner for infrastructure and application code.')
101
- .version('0.4.0');
112
+ .version(PKG_VERSION);
102
113
  // ── scan ────────────────────────────────────────────────────────────────────
103
114
  program
104
115
  .command('scan [repo_path]')
package/dist/index.js CHANGED
@@ -53,7 +53,7 @@ async function scan(params) {
53
53
  async function gate(options) {
54
54
  const { files, frameworks = ['soc2'], ...scanOpts } = options;
55
55
  const client = new api_client_1.ComplianceApiClient(options.apiUrl, options.apiKey);
56
- const response = await client.hook(files, frameworks);
56
+ const response = await client.hook(files, frameworks, scanOpts);
57
57
  return {
58
58
  passed: response.passed,
59
59
  exitCode: response.passed ? 0 : 1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prodcycle/prodcycle",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "Multi-framework policy-as-code compliance scanner for infrastructure and application code.",
5
5
  "homepage": "https://docs.prodcycle.com",
6
6
  "repository": {