@savvy-web/cli 3.7.0 → 3.7.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.
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Command } from "effect/cli";
|
|
2
|
-
import { resolve } from "node:path";
|
|
3
2
|
import { Commitlint } from "@savvy-web/silk-effects";
|
|
4
3
|
import { Effect, Schema } from "effect";
|
|
5
4
|
|
|
@@ -47,7 +46,7 @@ const preCommitMessageCommand = Command.make("pre-commit-message", {}, () => Eff
|
|
|
47
46
|
if (!command) return;
|
|
48
47
|
const branchInfo = yield* Commitlint.readBranchInfo();
|
|
49
48
|
const signing = yield* Commitlint.readSigningDiagnostic();
|
|
50
|
-
const issuesPath =
|
|
49
|
+
const issuesPath = yield* Commitlint.resolveIssuesCachePath();
|
|
51
50
|
const issues = (yield* Commitlint.readOpenIssuesFromCache(issuesPath)) ?? [];
|
|
52
51
|
const out = yield* Effect.promise(() => evaluateMessage(command, {
|
|
53
52
|
branchInfo,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Command } from "effect/cli";
|
|
2
|
-
import { resolve } from "node:path";
|
|
3
2
|
import { Commitlint } from "@savvy-web/silk-effects";
|
|
4
3
|
import { Effect } from "effect";
|
|
5
4
|
|
|
@@ -13,7 +12,7 @@ import { Effect } from "effect";
|
|
|
13
12
|
const sessionStartCommand = Command.make("session-start", {}, () => Effect.gen(function* () {
|
|
14
13
|
const branch = yield* Commitlint.readBranchInfo();
|
|
15
14
|
const signing = yield* Commitlint.readSigningDiagnostic();
|
|
16
|
-
const issuesCachePath =
|
|
15
|
+
const issuesCachePath = yield* Commitlint.resolveIssuesCachePath();
|
|
17
16
|
const issues = yield* Commitlint.readOrFetchOpenIssues(issuesCachePath);
|
|
18
17
|
const blocks = [];
|
|
19
18
|
blocks.push(buildSkillDirectiveBlock());
|
package/internal/failure-line.js
CHANGED
|
@@ -48,6 +48,11 @@ const drawsItself = (error) => typeof error === "object" && error !== null && Cl
|
|
|
48
48
|
* CLI's own `CommandError`) has already said how it reads, so it gets the
|
|
49
49
|
* kit's report of that document (`details.defaultLines`), drawn for the
|
|
50
50
|
* run's audience, instead of one line.
|
|
51
|
+
* - A cancel (the person quit a prompt) or a not-interactive refusal (a
|
|
52
|
+
* prompt asked for in a pipe, an agent or CI) is neither a bug nor a
|
|
53
|
+
* typed failure of savvy's own, whichever channel it arrived through, so
|
|
54
|
+
* it gets the kit's fixed line (`details.defaultLines`) and is checked
|
|
55
|
+
* before `isDefect`: a cancel from a prompt fallback arrives as a defect.
|
|
51
56
|
* - A defect — a `die`, a thrown exception — is a bug in savvy. It gets the
|
|
52
57
|
* kit's default report (`details.defaultLines`: the status line and the
|
|
53
58
|
* program's own stack frames, drawn for the run's audience) followed by
|
|
@@ -58,6 +63,7 @@ const drawsItself = (error) => typeof error === "object" && error !== null && Cl
|
|
|
58
63
|
var FailureLine = class {
|
|
59
64
|
constructor() {}
|
|
60
65
|
static render = (error, details) => {
|
|
66
|
+
if (details.isCancelled || details.isNotInteractive) return details.defaultLines;
|
|
61
67
|
if (details.isDefect) return [...details.defaultLines, `This is a bug in savvy. Please report it with the output above at ${ISSUES_URL}`];
|
|
62
68
|
return drawsItself(error) ? details.defaultLines : describe(error);
|
|
63
69
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@savvy-web/cli",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The savvy CLI — unified commit, changeset, and lint commands for the Silk Suite",
|
|
6
6
|
"homepage": "https://github.com/savvy-web/systems/tree/main/packages/cli",
|
|
@@ -36,21 +36,21 @@
|
|
|
36
36
|
"savvy": "bin/savvy.js"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@effect/platform-node": "^4.0.
|
|
40
|
-
"@effected/cli": "^0.
|
|
39
|
+
"@effect/platform-node": "^4.0.2",
|
|
40
|
+
"@effected/cli": "^0.14.0",
|
|
41
41
|
"@effected/commands": "^0.11.0",
|
|
42
|
-
"@effected/engine": "^0.
|
|
42
|
+
"@effected/engine": "^0.4.0",
|
|
43
43
|
"@effected/env": "^0.1.0",
|
|
44
44
|
"@effected/git": "^0.20.0",
|
|
45
45
|
"@effected/glob": "^0.10.0",
|
|
46
|
-
"@effected/jsonc": "^0.15.
|
|
46
|
+
"@effected/jsonc": "^0.15.1",
|
|
47
47
|
"@effected/templates": "^0.10.0",
|
|
48
48
|
"@effected/walker": "^0.15.0",
|
|
49
|
-
"@effected/workspaces": "^0.
|
|
50
|
-
"@effected/yaml": "^0.19.
|
|
51
|
-
"@savvy-web/silk-effects": "9.
|
|
52
|
-
"effect": "^4.0.
|
|
53
|
-
"ink": "^
|
|
49
|
+
"@effected/workspaces": "^0.32.0",
|
|
50
|
+
"@effected/yaml": "^0.19.1",
|
|
51
|
+
"@savvy-web/silk-effects": "9.5.0",
|
|
52
|
+
"effect": "^4.0.2",
|
|
53
|
+
"ink": "^8.0.0",
|
|
54
54
|
"react": "^19.3.0"
|
|
55
55
|
}
|
|
56
56
|
}
|