infernoflow 0.10.7 → 0.10.8
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 +46 -4
- package/bin/infernoflow.mjs +8 -0
- package/lib/ai/localProvider.mjs +88 -0
- package/lib/commands/adopt.mjs +768 -768
- package/lib/commands/implement.mjs +103 -103
- package/lib/commands/init.mjs +1 -0
- package/lib/commands/prImpact.mjs +157 -157
- package/lib/commands/run.mjs +227 -0
- package/lib/commands/suggest.mjs +42 -12
- package/lib/commands/syncAuto.mjs +96 -96
- package/package.json +2 -2
- package/templates/ci/github-inferno-check.yml +33 -36
- package/templates/scripts/inferno-install-hooks.mjs +36 -36
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import * as fs from "node:fs";
|
|
3
|
-
import * as path from "node:path";
|
|
4
|
-
|
|
5
|
-
const cwd = process.cwd();
|
|
6
|
-
const gitDir = path.join(cwd, ".git");
|
|
7
|
-
const hooksDir = path.join(gitDir, "hooks");
|
|
8
|
-
|
|
9
|
-
if (!fs.existsSync(gitDir)) {
|
|
10
|
-
console.error("[inferno hooks] .git not found. Run inside a git repository.");
|
|
11
|
-
process.exit(1);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
fs.mkdirSync(hooksDir, { recursive: true });
|
|
15
|
-
|
|
16
|
-
const preCommit = `#!/bin/sh
|
|
17
|
-
echo "[inferno hooks] pre-commit: infernoflow
|
|
18
|
-
npx infernoflow check --
|
|
19
|
-
`;
|
|
20
|
-
|
|
21
|
-
const prePush = `#!/bin/sh
|
|
22
|
-
echo "[inferno hooks] pre-push: infernoflow
|
|
23
|
-
npx infernoflow
|
|
24
|
-
`;
|
|
25
|
-
|
|
26
|
-
const writeHook = (name, content) => {
|
|
27
|
-
const filePath = path.join(hooksDir, name);
|
|
28
|
-
fs.writeFileSync(filePath, content, "utf8");
|
|
29
|
-
fs.chmodSync(filePath, 0o755);
|
|
30
|
-
console.log(`[inferno hooks] installed ${name}`);
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
writeHook("pre-commit", preCommit);
|
|
34
|
-
writeHook("pre-push", prePush);
|
|
35
|
-
console.log("[inferno hooks] done");
|
|
36
|
-
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import * as fs from "node:fs";
|
|
3
|
+
import * as path from "node:path";
|
|
4
|
+
|
|
5
|
+
const cwd = process.cwd();
|
|
6
|
+
const gitDir = path.join(cwd, ".git");
|
|
7
|
+
const hooksDir = path.join(gitDir, "hooks");
|
|
8
|
+
|
|
9
|
+
if (!fs.existsSync(gitDir)) {
|
|
10
|
+
console.error("[inferno hooks] .git not found. Run inside a git repository.");
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
fs.mkdirSync(hooksDir, { recursive: true });
|
|
15
|
+
|
|
16
|
+
const preCommit = `#!/bin/sh
|
|
17
|
+
echo "[inferno hooks] pre-commit: infernoflow run --dry-run"
|
|
18
|
+
npx infernoflow run "sync check" --dry-run
|
|
19
|
+
`;
|
|
20
|
+
|
|
21
|
+
const prePush = `#!/bin/sh
|
|
22
|
+
echo "[inferno hooks] pre-push: infernoflow run --json"
|
|
23
|
+
npx infernoflow run "sync check" --json
|
|
24
|
+
`;
|
|
25
|
+
|
|
26
|
+
const writeHook = (name, content) => {
|
|
27
|
+
const filePath = path.join(hooksDir, name);
|
|
28
|
+
fs.writeFileSync(filePath, content, "utf8");
|
|
29
|
+
fs.chmodSync(filePath, 0o755);
|
|
30
|
+
console.log(`[inferno hooks] installed ${name}`);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
writeHook("pre-commit", preCommit);
|
|
34
|
+
writeHook("pre-push", prePush);
|
|
35
|
+
console.log("[inferno hooks] done");
|
|
36
|
+
|