infernoflow 0.4.1 → 0.4.3
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/bin/infernoflow.mjs +10 -19
- package/package.json +1 -1
- package/lib/infernoflow.mjs +0 -94
package/bin/infernoflow.mjs
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { bold, gray, cyan, red, orange } from "../lib/ui/output.mjs";
|
|
3
|
+
import { bold, gray, cyan, red } from "../lib/ui/output.mjs";
|
|
5
4
|
|
|
6
|
-
const VERSION = "0.
|
|
5
|
+
const VERSION = "0.4.2";
|
|
7
6
|
|
|
8
7
|
const HELP = `
|
|
9
|
-
${bold("
|
|
8
|
+
${bold("��� infernoflow")} ${gray("v" + VERSION)}
|
|
10
9
|
${gray("The forge for liquid code")}
|
|
11
10
|
|
|
12
11
|
${bold("Usage:")}
|
|
@@ -17,6 +16,7 @@ const HELP = `
|
|
|
17
16
|
check Validate contract, capabilities, scenarios, changelog
|
|
18
17
|
status Show contract health at a glance
|
|
19
18
|
doc-gate Fail if code changed but docs were not updated
|
|
19
|
+
suggest Generate AI prompt + apply capability updates
|
|
20
20
|
|
|
21
21
|
${bold("Options:")}
|
|
22
22
|
init:
|
|
@@ -26,20 +26,6 @@ const HELP = `
|
|
|
26
26
|
check:
|
|
27
27
|
--skip-doc-gate Skip the git doc-gate check
|
|
28
28
|
--json Machine-readable JSON output (for CI)
|
|
29
|
-
|
|
30
|
-
${bold("Examples:")}
|
|
31
|
-
${cyan("npx infernoflow init")}
|
|
32
|
-
${cyan("infernoflow status")}
|
|
33
|
-
${cyan("infernoflow check")}
|
|
34
|
-
${cyan("infernoflow check --json")}
|
|
35
|
-
${cyan("infernoflow doc-gate")}
|
|
36
|
-
|
|
37
|
-
${bold("CI example:")}
|
|
38
|
-
${gray("# In GitHub Actions:")}
|
|
39
|
-
${gray("- run: npx infernoflow check --json")}
|
|
40
|
-
${gray(" env:")}
|
|
41
|
-
${gray(" BASE_SHA: ${{ github.event.pull_request.base.sha }}")}
|
|
42
|
-
${gray(" HEAD_SHA: ${{ github.event.pull_request.head.sha }}")}
|
|
43
29
|
`;
|
|
44
30
|
|
|
45
31
|
const [,, cmd, ...rest] = process.argv;
|
|
@@ -54,7 +40,7 @@ if (cmd === "--version" || cmd === "-v") {
|
|
|
54
40
|
process.exit(0);
|
|
55
41
|
}
|
|
56
42
|
|
|
57
|
-
const commands = ["init", "check", "status", "doc-gate"];
|
|
43
|
+
const commands = ["init", "check", "status", "doc-gate", "suggest"];
|
|
58
44
|
|
|
59
45
|
if (!commands.includes(cmd)) {
|
|
60
46
|
console.error(red(`\nUnknown command: ${cmd}`));
|
|
@@ -80,6 +66,11 @@ switch (cmd) {
|
|
|
80
66
|
.then(m => m.statusCommand(args))
|
|
81
67
|
.catch(err => { console.error(red("\nError: ") + err.message); process.exit(1); });
|
|
82
68
|
break;
|
|
69
|
+
case "suggest":
|
|
70
|
+
import("../lib/commands/suggest.mjs")
|
|
71
|
+
.then(m => m.suggestCommand(args))
|
|
72
|
+
.catch(err => { console.error(red("\nError: ") + err.message); process.exit(1); });
|
|
73
|
+
break;
|
|
83
74
|
case "doc-gate":
|
|
84
75
|
import("../lib/commands/docGate.mjs")
|
|
85
76
|
.then(m => m.docGateCommand())
|
package/package.json
CHANGED
package/lib/infernoflow.mjs
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { parseArgs } from "node:util";
|
|
4
|
-
import { bold, gray, cyan, red, orange } from "../lib/ui/output.mjs";
|
|
5
|
-
|
|
6
|
-
const VERSION = "0.1.0";
|
|
7
|
-
|
|
8
|
-
const HELP = `
|
|
9
|
-
${bold("🔥 infernoflow")} ${gray("v" + VERSION)}
|
|
10
|
-
${gray("The forge for liquid code")}
|
|
11
|
-
|
|
12
|
-
${bold("Usage:")}
|
|
13
|
-
infernoflow <command> [options]
|
|
14
|
-
|
|
15
|
-
${bold("Commands:")}
|
|
16
|
-
init Scaffold inferno/ in your project (interactive)
|
|
17
|
-
check Validate contract, capabilities, scenarios, changelog
|
|
18
|
-
status Show contract health at a glance
|
|
19
|
-
doc-gate Fail if code changed but docs were not updated
|
|
20
|
-
suggest Generate AI prompt + apply capability updates
|
|
21
|
-
|
|
22
|
-
${bold("Options:")}
|
|
23
|
-
init:
|
|
24
|
-
--force, -f Overwrite existing files
|
|
25
|
-
--yes, -y Skip prompts, use defaults
|
|
26
|
-
|
|
27
|
-
check:
|
|
28
|
-
--skip-doc-gate Skip the git doc-gate check
|
|
29
|
-
--json Machine-readable JSON output (for CI)
|
|
30
|
-
|
|
31
|
-
${bold("Examples:")}
|
|
32
|
-
${cyan("npx infernoflow init")}
|
|
33
|
-
${cyan("infernoflow status")}
|
|
34
|
-
${cyan("infernoflow check")}
|
|
35
|
-
${cyan("infernoflow check --json")}
|
|
36
|
-
${cyan("infernoflow doc-gate")}
|
|
37
|
-
|
|
38
|
-
${bold("CI example:")}
|
|
39
|
-
${gray("# In GitHub Actions:")}
|
|
40
|
-
${gray("- run: npx infernoflow check --json")}
|
|
41
|
-
${gray(" env:")}
|
|
42
|
-
${gray(" BASE_SHA: ${{ github.event.pull_request.base.sha }}")}
|
|
43
|
-
${gray(" HEAD_SHA: ${{ github.event.pull_request.head.sha }}")}
|
|
44
|
-
`;
|
|
45
|
-
|
|
46
|
-
const [,, cmd, ...rest] = process.argv;
|
|
47
|
-
|
|
48
|
-
if (!cmd || cmd === "--help" || cmd === "-h") {
|
|
49
|
-
console.log(HELP);
|
|
50
|
-
process.exit(0);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
if (cmd === "--version" || cmd === "-v") {
|
|
54
|
-
console.log(VERSION);
|
|
55
|
-
process.exit(0);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
const commands = ["init", "check", "status", "doc-gate", "suggest"];
|
|
59
|
-
|
|
60
|
-
if (!commands.includes(cmd)) {
|
|
61
|
-
console.error(red(`\nUnknown command: ${cmd}`));
|
|
62
|
-
console.error(gray("Run: infernoflow --help\n"));
|
|
63
|
-
process.exit(1);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
const args = [cmd, ...rest];
|
|
67
|
-
|
|
68
|
-
switch (cmd) {
|
|
69
|
-
case "init":
|
|
70
|
-
import("../lib/commands/init.mjs")
|
|
71
|
-
.then(m => m.initCommand(args))
|
|
72
|
-
.catch(err => { console.error(red("\nError: ") + err.message); process.exit(1); });
|
|
73
|
-
break;
|
|
74
|
-
case "check":
|
|
75
|
-
import("../lib/commands/check.mjs")
|
|
76
|
-
.then(m => m.checkCommand(args))
|
|
77
|
-
.catch(err => { console.error(red("\nError: ") + err.message); process.exit(1); });
|
|
78
|
-
break;
|
|
79
|
-
case "status":
|
|
80
|
-
import("../lib/commands/status.mjs")
|
|
81
|
-
.then(m => m.statusCommand(args))
|
|
82
|
-
.catch(err => { console.error(red("\nError: ") + err.message); process.exit(1); });
|
|
83
|
-
break;
|
|
84
|
-
case "suggest":
|
|
85
|
-
import("../lib/commands/suggest.mjs")
|
|
86
|
-
.then(m => m.suggestCommand(args))
|
|
87
|
-
.catch(err => { console.error(red("\nError: ") + err.message); process.exit(1); });
|
|
88
|
-
break;
|
|
89
|
-
case "doc-gate":
|
|
90
|
-
import("../lib/commands/docGate.mjs")
|
|
91
|
-
.then(m => m.docGateCommand())
|
|
92
|
-
.catch(err => { console.error(red("\nError: ") + err.message); process.exit(1); });
|
|
93
|
-
break;
|
|
94
|
-
}
|