infernoflow 0.10.7 → 0.10.9

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.
@@ -1,36 +1,30 @@
1
- name: infernoflow-check
2
-
3
- on:
4
- pull_request:
5
- push:
6
- branches: [main, master]
7
-
8
- jobs:
9
- inferno:
10
- runs-on: ubuntu-latest
11
- steps:
12
- - name: Checkout
13
- uses: actions/checkout@v4
14
- with:
15
- fetch-depth: 0
16
-
17
- - name: Setup Node
18
- uses: actions/setup-node@v4
19
- with:
20
- node-version: "20"
21
-
22
- - name: Install dependencies
23
- run: npm ci --ignore-scripts || npm install --ignore-scripts
24
-
25
- - name: Inferno PR impact
26
- run: npx infernoflow pr-impact --json
27
- env:
28
- BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}
29
- HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
30
-
31
- - name: Inferno check
32
- run: npx infernoflow check --json
33
- env:
34
- BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}
35
- HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
36
-
1
+ name: infernoflow-check
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches: [main, master]
7
+
8
+ jobs:
9
+ inferno:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - name: Checkout
13
+ uses: actions/checkout@v4
14
+ with:
15
+ fetch-depth: 0
16
+
17
+ - name: Setup Node
18
+ uses: actions/setup-node@v4
19
+ with:
20
+ node-version: "20"
21
+
22
+ - name: Install dependencies
23
+ run: npm ci --ignore-scripts || npm install --ignore-scripts
24
+
25
+ - name: Inferno one-command run (headless prompt mode)
26
+ run: npx infernoflow run "sync check" --provider prompt --json
27
+ env:
28
+ BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}
29
+ HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
30
+
@@ -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 check --skip-doc-gate"
18
- npx infernoflow check --skip-doc-gate
19
- `;
20
-
21
- const prePush = `#!/bin/sh
22
- echo "[inferno hooks] pre-push: infernoflow doc-gate"
23
- npx infernoflow doc-gate
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 --provider auto --dry-run"
18
+ npx infernoflow run "sync check" --provider auto --dry-run
19
+ `;
20
+
21
+ const prePush = `#!/bin/sh
22
+ echo "[inferno hooks] pre-push: infernoflow run --provider auto --json"
23
+ npx infernoflow run "sync check" --provider auto --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
+