@savvy-web/cli 3.7.9 → 3.7.11
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/savvy.js +1 -2
- package/cli/index.js +1 -2
- package/commands/changeset/commands/check.js +1 -2
- package/commands/changeset/commands/config-validate.js +1 -2
- package/commands/changeset/commands/deps-detect.js +1 -2
- package/commands/changeset/commands/deps-regen.js +1 -2
- package/commands/changeset/commands/init.js +1 -2
- package/commands/changeset/commands/lint.js +1 -2
- package/commands/changeset/commands/transform.js +1 -2
- package/commands/changeset/commands/validate-file.js +1 -2
- package/commands/changeset/commands/version.js +1 -2
- package/commands/changeset/index.js +1 -2
- package/commands/changeset/utils/config-gate.js +1 -2
- package/commands/check-section.js +1 -2
- package/commands/check.js +1 -2
- package/commands/clean/progress.js +1 -2
- package/commands/clean/view.js +1 -2
- package/commands/clean.js +1 -2
- package/commands/commit/check.js +1 -2
- package/commands/commit/commitlint-invocation.js +1 -2
- package/commands/commit/constants.js +1 -2
- package/commands/commit/hook.js +1 -2
- package/commands/commit/hooks/post-commit-verify.js +1 -2
- package/commands/commit/hooks/pre-commit-message.js +1 -2
- package/commands/commit/hooks/session-start.js +1 -2
- package/commands/commit/index.js +1 -2
- package/commands/commit/init.js +1 -2
- package/commands/commit/lint.js +1 -2
- package/commands/init.js +1 -2
- package/commands/lint/biome-version.js +2 -3
- package/commands/lint/check.js +1 -2
- package/commands/lint/fmt.js +1 -2
- package/commands/lint/index.js +1 -2
- package/commands/lint/init.js +1 -2
- package/commands/lint/text.js +1 -2
- package/commands/repos/commands/add.js +1 -2
- package/commands/repos/commands/deregister.js +1 -2
- package/commands/repos/commands/note.js +1 -2
- package/commands/repos/commands/pin.js +1 -2
- package/commands/repos/commands/remove.js +1 -2
- package/commands/repos/commands/rename.js +1 -2
- package/commands/repos/commands/restore.js +1 -2
- package/commands/repos/commands/status.js +1 -2
- package/commands/repos/commands/sync.js +1 -2
- package/commands/repos/index.js +1 -2
- package/commands/repos/shared.js +1 -2
- package/index.d.ts +0 -34
- package/internal/command-error.js +1 -2
- package/internal/confirm.js +1 -2
- package/internal/failure-line.js +1 -2
- package/internal/report.js +1 -2
- package/internal/version-line.js +1 -2
- package/main.d.ts +0 -2
- package/main.js +1 -2
- package/package.json +17 -15
- package/version.js +2 -3
package/bin/savvy.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { main } from "../main.js";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/bin.ts
|
|
5
5
|
/**
|
|
6
6
|
* The `savvy` bin. Imports `main` and calls it. Nothing else, ever.
|
|
7
7
|
* @internal
|
|
@@ -10,5 +10,4 @@ import { main } from "../main.js";
|
|
|
10
10
|
main();
|
|
11
11
|
/* v8 ignore stop */
|
|
12
12
|
|
|
13
|
-
//#endregion
|
|
14
13
|
export { };
|
package/cli/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import { ManagedSection } from "@effected/templates";
|
|
|
15
15
|
import { ToolDiscovery } from "@effected/commands";
|
|
16
16
|
import * as NodeServices from "@effect/platform-node/NodeServices";
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
// src/cli/index.ts
|
|
19
19
|
/**
|
|
20
20
|
* Root `savvy` CLI entry point using `effect/cli`.
|
|
21
21
|
*
|
|
@@ -148,5 +148,4 @@ const CliConfigLive = CliConfig.layer({ builtIns: [
|
|
|
148
148
|
const CliPlatform = NodeServices.layer;
|
|
149
149
|
/* v8 ignore stop */
|
|
150
150
|
|
|
151
|
-
//#endregion
|
|
152
151
|
export { AppLive, CliConfigLive, CliPlatform, rootCommand };
|
|
@@ -5,7 +5,7 @@ import { CliExit, Doc } from "@effected/cli";
|
|
|
5
5
|
import { Changesets } from "@savvy-web/silk-effects";
|
|
6
6
|
import { Effect } from "effect";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/commands/changeset/commands/check.ts
|
|
9
9
|
/**
|
|
10
10
|
* Check command -- full validation pipeline with human-readable output.
|
|
11
11
|
*
|
|
@@ -132,5 +132,4 @@ function runChangesetCheck(dir) {
|
|
|
132
132
|
/* v8 ignore next 3 -- CLI registration; handler tested via runChangesetCheck */
|
|
133
133
|
const checkCommand = Command.make("check", { dir: dirArg }, ({ dir }) => runChangesetCheck(dir)).pipe(Command.withDescription("Full changeset validation with summary"));
|
|
134
134
|
|
|
135
|
-
//#endregion
|
|
136
135
|
export { changesetCheckSection, checkCommand, runChangesetCheck };
|
|
@@ -5,7 +5,7 @@ import { CliExit } from "@effected/cli";
|
|
|
5
5
|
import { Changesets } from "@savvy-web/silk-effects";
|
|
6
6
|
import { Effect } from "effect";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/commands/changeset/commands/config-validate.ts
|
|
9
9
|
/**
|
|
10
10
|
* `config validate` command -- validate-only mode for `.changeset/config.json`.
|
|
11
11
|
*
|
|
@@ -64,5 +64,4 @@ function runConfigValidate(dir) {
|
|
|
64
64
|
/* v8 ignore next 5 -- CLI registration */
|
|
65
65
|
const configValidateCommand = Command.make("validate", { dir: dirArg }, ({ dir }) => runConfigValidate(dir)).pipe(Command.withDescription("Validate .changeset/config.json without rendering it"));
|
|
66
66
|
|
|
67
|
-
//#endregion
|
|
68
67
|
export { configValidateCommand, runConfigValidate };
|
|
@@ -5,7 +5,7 @@ import { CliExit } from "@effected/cli";
|
|
|
5
5
|
import { Changesets } from "@savvy-web/silk-effects";
|
|
6
6
|
import { Console, Effect, Option } from "effect";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/commands/changeset/commands/deps-detect.ts
|
|
9
9
|
/**
|
|
10
10
|
* `deps detect` command — read-only dependency-diff inspection.
|
|
11
11
|
*
|
|
@@ -85,5 +85,4 @@ const depsDetectCommand = Command.make("detect", {
|
|
|
85
85
|
markdown: markdownOption
|
|
86
86
|
}, ({ from, to, cwd, package: pkg, json, markdown }) => runDepsDetect(cwd, from, to, pkg, json, markdown).pipe(Effect.provide(Changesets.makeDepsRegenDefault({ cwd: resolve(cwd) })))).pipe(Command.withDescription("Compute the dependency diff between two refs"));
|
|
87
87
|
|
|
88
|
-
//#endregion
|
|
89
88
|
export { depsDetectCommand, renderMarkdownBlocks, runDepsDetect };
|
|
@@ -5,7 +5,7 @@ import { CliExit, Doc } from "@effected/cli";
|
|
|
5
5
|
import { Changesets } from "@savvy-web/silk-effects";
|
|
6
6
|
import { Console, Effect, Option } from "effect";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/commands/changeset/commands/deps-regen.ts
|
|
9
9
|
/**
|
|
10
10
|
* `deps regen` command — delete all pure dependency changesets and
|
|
11
11
|
* write fresh single-package, patch-bump changesets reflecting the
|
|
@@ -185,5 +185,4 @@ const depsRegenCommand = Command.make("regen", {
|
|
|
185
185
|
json: jsonOption
|
|
186
186
|
}, ({ cwd, base, package: pkg, dryRun, json }) => runDepsRegen(cwd, base, pkg, dryRun, json).pipe(Effect.provide(Changesets.makeDepsRegenDefault({ cwd: resolve(cwd) })))).pipe(Command.withDescription("Delete pure dependency changesets and regenerate them from the current diff"));
|
|
187
187
|
|
|
188
|
-
//#endregion
|
|
189
188
|
export { depsRegenCommand, runDepsRegen };
|
|
@@ -10,7 +10,7 @@ import { Git } from "@effected/git";
|
|
|
10
10
|
import { Jsonc, JsoncEdit, JsoncModifier } from "@effected/jsonc";
|
|
11
11
|
import { WorkspaceRoot } from "@effected/workspaces";
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
// src/commands/changeset/commands/init.ts
|
|
14
14
|
/**
|
|
15
15
|
* Init command -- bootstrap a repository for \@savvy-web/changesets.
|
|
16
16
|
*
|
|
@@ -651,5 +651,4 @@ function runChangesetInit(opts) {
|
|
|
651
651
|
})));
|
|
652
652
|
}
|
|
653
653
|
|
|
654
|
-
//#endregion
|
|
655
654
|
export { InitError, InitErrorBase, checkBaseMarkdownlint, checkChangesetDir, checkChangesetMarkdownlint, checkConfig, detectGitHubRepo, detectLegacyVersionFiles, ensureChangesetDir, findMarkdownlintConfig, handleBaseMarkdownlint, handleChangesetMarkdownlint, handleConfig, legacyVersionFilesWarning, resolveWorkspaceRoot, runChangesetInit, runChangesetInitOrFail, warnIfLegacyVersionFiles };
|
|
@@ -4,7 +4,7 @@ import { CliExit } from "@effected/cli";
|
|
|
4
4
|
import { Changesets } from "@savvy-web/silk-effects";
|
|
5
5
|
import { Console, Effect } from "effect";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/commands/changeset/commands/lint.ts
|
|
8
8
|
/**
|
|
9
9
|
* Lint command -- validate changeset files with machine-readable output.
|
|
10
10
|
*
|
|
@@ -59,5 +59,4 @@ const lintCommand = Command.make("lint", {
|
|
|
59
59
|
quiet: quietOption
|
|
60
60
|
}, ({ dir, quiet }) => runLint(dir, quiet)).pipe(Command.withDescription("Validate changeset files"));
|
|
61
61
|
|
|
62
|
-
//#endregion
|
|
63
62
|
export { lintCommand, runLint };
|
|
@@ -7,7 +7,7 @@ import { Changesets } from "@savvy-web/silk-effects";
|
|
|
7
7
|
import { Effect } from "effect";
|
|
8
8
|
import { readFileSync, writeFileSync } from "node:fs";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// src/commands/changeset/commands/transform.ts
|
|
11
11
|
/**
|
|
12
12
|
* Transform command -- post-process CHANGELOG.md.
|
|
13
13
|
*
|
|
@@ -160,5 +160,4 @@ const transformCommand = Command.make("transform", {
|
|
|
160
160
|
check: checkOption
|
|
161
161
|
}, ({ file, dryRun, check }) => runTransform(file, dryRun, check)).pipe(Command.withDescription("Post-process CHANGELOG.md"));
|
|
162
162
|
|
|
163
|
-
//#endregion
|
|
164
163
|
export { driftReport, driftWindow, runTransform, transformCommand };
|
|
@@ -5,7 +5,7 @@ import { CliExit } from "@effected/cli";
|
|
|
5
5
|
import { Changesets } from "@savvy-web/silk-effects";
|
|
6
6
|
import { Effect } from "effect";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/commands/changeset/commands/validate-file.ts
|
|
9
9
|
/**
|
|
10
10
|
* Validate-file command — validate a single changeset file.
|
|
11
11
|
*
|
|
@@ -51,5 +51,4 @@ function runValidateFile(filePath) {
|
|
|
51
51
|
/* v8 ignore next 3 -- CLI registration; handler tested via runValidateFile */
|
|
52
52
|
const validateFileCommand = Command.make("validate-file", { file: fileArg }, ({ file }) => runValidateFile(file)).pipe(Command.withDescription("Validate a single changeset file"));
|
|
53
53
|
|
|
54
|
-
//#endregion
|
|
55
54
|
export { runValidateFile, validateFileCommand };
|
|
@@ -5,7 +5,7 @@ import { Doc } from "@effected/cli";
|
|
|
5
5
|
import { Changesets } from "@savvy-web/silk-effects";
|
|
6
6
|
import { Effect } from "effect";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/commands/changeset/commands/version.ts
|
|
9
9
|
/* v8 ignore start -- CLI option definitions; handler tested via runVersion */
|
|
10
10
|
const dryRunOption = Flag.Boolean("dry-run").pipe(Flag.withAlias("n"), Flag.withDescription("Compute and report the release without writing anything"), Flag.withDefault(false));
|
|
11
11
|
/* v8 ignore stop */
|
|
@@ -73,5 +73,4 @@ const versionFileBlocks = (updates, dryRun) => updates.map((u) => Report.detail(
|
|
|
73
73
|
/* v8 ignore next 4 -- CLI registration; handler tested via runVersion */
|
|
74
74
|
const versionCommand = Command.make("version", { dryRun: dryRunOption }, ({ dryRun }) => runVersion(dryRun)).pipe(Command.withDescription("Apply pending changesets: bump versions and transform CHANGELOGs"));
|
|
75
75
|
|
|
76
|
-
//#endregion
|
|
77
76
|
export { runVersion, versionCommand };
|
|
@@ -9,7 +9,7 @@ import { versionCommand } from "./commands/version.js";
|
|
|
9
9
|
import { runChangesetInit, runChangesetInitOrFail } from "./commands/init.js";
|
|
10
10
|
import { Command } from "effect/cli";
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
// src/commands/changeset/index.ts
|
|
13
13
|
/* v8 ignore start -- CLI registration; each command tested via exported handler */
|
|
14
14
|
const configGroup = Command.make("config").pipe(Command.withSubcommands([configValidateCommand]), Command.withDescription("Inspect or validate .changeset/config.json"));
|
|
15
15
|
const depsGroup = Command.make("deps").pipe(Command.withSubcommands([depsDetectCommand, depsRegenCommand]), Command.withDescription("Generate or regenerate dependency changesets"));
|
|
@@ -39,5 +39,4 @@ const _changesetCommand = Command.make("changeset").pipe(Command.withSubcommands
|
|
|
39
39
|
*/
|
|
40
40
|
const changesetCommand = _changesetCommand;
|
|
41
41
|
|
|
42
|
-
//#endregion
|
|
43
42
|
export { changesetCheckSection, changesetCommand, runChangesetCheck, runChangesetInit };
|
|
@@ -4,7 +4,7 @@ import { Changesets } from "@savvy-web/silk-effects";
|
|
|
4
4
|
import { Effect } from "effect";
|
|
5
5
|
import { existsSync } from "node:fs";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/commands/changeset/utils/config-gate.ts
|
|
8
8
|
/**
|
|
9
9
|
* Shared "refuse on bad config" gate for CLI commands that must not run
|
|
10
10
|
* with an invalid `.changeset/config.json`.
|
|
@@ -58,5 +58,4 @@ function requireValidConfig(cwd) {
|
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
//#endregion
|
|
62
61
|
export { requireValidConfig };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Doc, Status } from "@effected/cli";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/commands/check-section.ts
|
|
4
4
|
/**
|
|
5
5
|
* A status cell for a hook table: the glyph and the state, e.g. `✓ up-to-date`.
|
|
6
6
|
* `not installed` is advisory (`↷`); `outdated`/`missing` are findings (`✗`).
|
|
@@ -30,5 +30,4 @@ const hookTable = (rows) => Doc.table([
|
|
|
30
30
|
stateCell(state)
|
|
31
31
|
]));
|
|
32
32
|
|
|
33
|
-
//#endregion
|
|
34
33
|
export { hookTable, stateCell };
|
package/commands/check.js
CHANGED
|
@@ -7,7 +7,7 @@ import { Command, Flag } from "effect/cli";
|
|
|
7
7
|
import { CliExit, Doc } from "@effected/cli";
|
|
8
8
|
import { Effect, Result } from "effect";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// src/commands/check.ts
|
|
11
11
|
/* v8 ignore start -- CLI option definitions; orchestration logic tested via runCheck */
|
|
12
12
|
const changesetDirOption = Flag.String("changeset-dir").pipe(Flag.withDescription("Path to the changeset directory"), Flag.withDefault(".changeset"));
|
|
13
13
|
const quietOption = Flag.Boolean("quiet").pipe(Flag.withAlias("q"), Flag.withDescription("Only output warnings from lint check"), Flag.withDefault(false));
|
|
@@ -80,5 +80,4 @@ const _checkCommand = Command.make("check", {
|
|
|
80
80
|
*/
|
|
81
81
|
const checkCommand = _checkCommand;
|
|
82
82
|
|
|
83
|
-
//#endregion
|
|
84
83
|
export { checkCommand, runCheck };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Doc, Status } from "@effected/cli";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/commands/clean/progress.ts
|
|
4
4
|
/** The state before a run starts. */
|
|
5
5
|
const initialCleanState = {
|
|
6
6
|
phase: "idle",
|
|
@@ -67,5 +67,4 @@ const progressDoc = (state, spinner) => [Doc.line([Doc.text(spinner, "accent"),
|
|
|
67
67
|
/** The committed summary: the counts, then any failures as a table. */
|
|
68
68
|
const summaryDoc = (state) => [counts(state), ...failures(state.failed)];
|
|
69
69
|
|
|
70
|
-
//#endregion
|
|
71
70
|
export { initialCleanState, progressDoc, reduceClean, summaryDoc };
|
package/commands/clean/view.js
CHANGED
|
@@ -2,7 +2,7 @@ import { initialCleanState, progressDoc, reduceClean, summaryDoc } from "./progr
|
|
|
2
2
|
import { DocView, useGlyphs } from "@effected/cli/ui";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/commands/clean/view.tsx
|
|
6
6
|
/** Draws the run: progress while it goes, the summary once it has ended. */
|
|
7
7
|
const CleanProgress = ({ state, frame }) => {
|
|
8
8
|
const glyphs = useGlyphs();
|
|
@@ -22,5 +22,4 @@ const cleanView = {
|
|
|
22
22
|
isTerminal: (event) => event._tag === "Ended"
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
//#endregion
|
|
26
25
|
export { cleanView };
|
package/commands/clean.js
CHANGED
|
@@ -8,7 +8,7 @@ import { WorkspaceDiscovery } from "@effected/workspaces";
|
|
|
8
8
|
import { glob, realpath, rm } from "node:fs/promises";
|
|
9
9
|
import { CliUi } from "@effected/cli/ui";
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
// src/commands/clean.ts
|
|
12
12
|
/**
|
|
13
13
|
* `savvy clean` — remove build/cache artifacts across a silk workspace.
|
|
14
14
|
*
|
|
@@ -244,5 +244,4 @@ const _cleanCommand = Command.make("clean", {
|
|
|
244
244
|
*/
|
|
245
245
|
const cleanCommand = _cleanCommand;
|
|
246
246
|
|
|
247
|
-
//#endregion
|
|
248
247
|
export { cleanCommand, collectTargets, parseGlobs, removeTargets, runClean };
|
package/commands/commit/check.js
CHANGED
|
@@ -8,7 +8,7 @@ import { Effect, FileSystem, Option } from "effect";
|
|
|
8
8
|
import { VersioningStrategy } from "@effected/workspaces";
|
|
9
9
|
import { CheckOutcome, ManagedSection } from "@effected/templates";
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
// src/commands/commit/check.ts
|
|
12
12
|
/** Possible commitlint configuration file names, in priority order. */
|
|
13
13
|
const CONFIG_FILES = [
|
|
14
14
|
"commitlint.config.ts",
|
|
@@ -191,5 +191,4 @@ function runCommitCheck() {
|
|
|
191
191
|
});
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
//#endregion
|
|
195
194
|
export { commitCheckSection, runCommitCheck };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/commands/commit/commitlint-invocation.ts
|
|
2
2
|
/**
|
|
3
3
|
* Build the `commitlint` invocation for the detected package manager.
|
|
4
4
|
*
|
|
@@ -39,5 +39,4 @@ function buildCommitlintInvocation(pm, configPath, tail) {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
//#endregion
|
|
43
42
|
export { buildCommitlintInvocation };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/commands/commit/constants.ts
|
|
2
2
|
/**
|
|
3
3
|
* Shared constants for CLI commands.
|
|
4
4
|
*
|
|
@@ -13,5 +13,4 @@ const POST_MERGE_HOOK_PATH = ".husky/post-merge";
|
|
|
13
13
|
/** Husky post-commit hook path (savvy-hooks hygiene). */
|
|
14
14
|
const POST_COMMIT_HOOK_PATH = ".husky/post-commit";
|
|
15
15
|
|
|
16
|
-
//#endregion
|
|
17
16
|
export { HUSKY_HOOK_PATH, POST_CHECKOUT_HOOK_PATH, POST_COMMIT_HOOK_PATH, POST_MERGE_HOOK_PATH };
|
package/commands/commit/hook.js
CHANGED
|
@@ -3,7 +3,7 @@ import { preCommitMessageCommand } from "./hooks/pre-commit-message.js";
|
|
|
3
3
|
import { sessionStartCommand } from "./hooks/session-start.js";
|
|
4
4
|
import { Command } from "effect/cli";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/commands/commit/hook.ts
|
|
7
7
|
/**
|
|
8
8
|
* `savvy commit hook` parent command — internal CLI surface used by the
|
|
9
9
|
* commitlint plugin's bash hooks.
|
|
@@ -16,5 +16,4 @@ const hookCommand = Command.make("hook").pipe(Command.withSubcommands([
|
|
|
16
16
|
postCommitVerifyCommand
|
|
17
17
|
])).pipe(Command.withDescription("Internal hook handlers used by the @savvy-web/commitlint plugin"));
|
|
18
18
|
|
|
19
|
-
//#endregion
|
|
20
19
|
export { hookCommand };
|
|
@@ -6,7 +6,7 @@ import { Git } from "@effected/git";
|
|
|
6
6
|
import { promisify } from "node:util";
|
|
7
7
|
import { execFile } from "node:child_process";
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
// src/commands/commit/hooks/post-commit-verify.ts
|
|
10
10
|
/**
|
|
11
11
|
* `savvy commit hook post-commit-verify` — replays commitlint, checks the
|
|
12
12
|
* signature, and verifies the closes trailer if the branch implies one.
|
|
@@ -69,5 +69,4 @@ const postCommitVerifyCommand = Command.make("post-commit-verify", {}, () => Eff
|
|
|
69
69
|
if (advice !== null) yield* Effect.sync(() => process.stdout.write(`${JSON.stringify(Commitlint.postToolUseAdvise(advice))}\n`));
|
|
70
70
|
}).pipe(Effect.provide(Commitlint.HookSilencer))).pipe(Command.withDescription("Verify the most recent commit (commitlint replay + signature + closes trailer)"));
|
|
71
71
|
|
|
72
|
-
//#endregion
|
|
73
72
|
export { buildPostCommitAdvice, postCommitVerifyCommand };
|
|
@@ -2,7 +2,7 @@ import { Command } from "effect/cli";
|
|
|
2
2
|
import { Commitlint } from "@savvy-web/silk-effects";
|
|
3
3
|
import { Effect, Schema } from "effect";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/commands/commit/hooks/pre-commit-message.ts
|
|
6
6
|
/**
|
|
7
7
|
* `savvy commit hook pre-commit-message` — reads a PreToolUse envelope on
|
|
8
8
|
* stdin and emits deny/advise/silent output for the bash hook.
|
|
@@ -61,5 +61,4 @@ async function readStdin() {
|
|
|
61
61
|
return Buffer.concat(chunks).toString("utf8");
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
//#endregion
|
|
65
64
|
export { evaluateMessage, preCommitMessageCommand };
|
|
@@ -2,7 +2,7 @@ import { Command } from "effect/cli";
|
|
|
2
2
|
import { Commitlint } from "@savvy-web/silk-effects";
|
|
3
3
|
import { Effect } from "effect";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/commands/commit/hooks/session-start.ts
|
|
6
6
|
/**
|
|
7
7
|
* `savvy commit hook session-start` — emits the additionalContext block
|
|
8
8
|
* the SessionStart hook injects into the agent's context.
|
|
@@ -64,5 +64,4 @@ function buildSigningBlock(d) {
|
|
|
64
64
|
return lines.join("\n");
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
//#endregion
|
|
68
67
|
export { sessionStartCommand };
|
package/commands/commit/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { hookCommand } from "./hook.js";
|
|
|
4
4
|
import { lintCommand } from "./lint.js";
|
|
5
5
|
import { Command } from "effect/cli";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/commands/commit/index.ts
|
|
8
8
|
/* v8 ignore start -- CLI registration; each command tested via exported handler */
|
|
9
9
|
const _commitCommand = Command.make("commit").pipe(Command.withSubcommands([hookCommand, lintCommand]), Command.withDescription("Commit standards: config, checks, and Claude hook handlers"));
|
|
10
10
|
/**
|
|
@@ -17,5 +17,4 @@ const _commitCommand = Command.make("commit").pipe(Command.withSubcommands([hook
|
|
|
17
17
|
*/
|
|
18
18
|
const commitCommand = _commitCommand;
|
|
19
19
|
|
|
20
|
-
//#endregion
|
|
21
20
|
export { commitCommand, runCommitCheck, runCommitInit };
|
package/commands/commit/init.js
CHANGED
|
@@ -7,7 +7,7 @@ import { Effect, FileSystem } from "effect";
|
|
|
7
7
|
import { CommentStyle, ManagedSection, SectionId } from "@effected/templates";
|
|
8
8
|
import { chmod } from "node:fs/promises";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// src/commands/commit/init.ts
|
|
11
11
|
/**
|
|
12
12
|
* Init command - bootstrap commitlint configuration.
|
|
13
13
|
*
|
|
@@ -131,5 +131,4 @@ function runCommitInit(opts) {
|
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
//#endregion
|
|
135
134
|
export { SECTION_DEF, runCommitInit, savvyCommitBlock };
|
package/commands/commit/lint.js
CHANGED
|
@@ -7,7 +7,7 @@ import { Git } from "@effected/git";
|
|
|
7
7
|
import { promisify } from "node:util";
|
|
8
8
|
import { execFile } from "node:child_process";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// src/commands/commit/lint.ts
|
|
11
11
|
/**
|
|
12
12
|
* `savvy commit lint <file>` — validate a CANDIDATE commit-message file
|
|
13
13
|
* against the real Silk commitlint preset BEFORE committing.
|
|
@@ -84,5 +84,4 @@ const fileArg = Argument.File("file", { mustExist: true });
|
|
|
84
84
|
/* v8 ignore next 3 -- CLI registration; handler tested via runCommitLint */
|
|
85
85
|
const lintCommand = Command.make("lint", { file: fileArg }, ({ file }) => runCommitLint(file)).pipe(Command.withDescription("Validate a candidate commit-message file against the Silk commitlint preset"));
|
|
86
86
|
|
|
87
|
-
//#endregion
|
|
88
87
|
export { lintCommand, runCommitLint };
|
package/commands/init.js
CHANGED
|
@@ -11,7 +11,7 @@ import { Lint } from "@savvy-web/silk-effects";
|
|
|
11
11
|
import { Effect, FileSystem } from "effect";
|
|
12
12
|
import { CliUi, Select } from "@effected/cli/ui";
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
// src/commands/init.ts
|
|
15
15
|
const DEFAULT_COMMIT_CONFIG = "lib/configs/commitlint.config.ts";
|
|
16
16
|
const DEFAULT_LINT_CONFIG = "lib/configs/lint-staged.config.ts";
|
|
17
17
|
/* v8 ignore start -- CLI option definitions; orchestration logic tested via runInit */
|
|
@@ -172,5 +172,4 @@ const _initCommand = Command.make("init", {
|
|
|
172
172
|
*/
|
|
173
173
|
const initCommand = _initCommand;
|
|
174
174
|
|
|
175
|
-
//#endregion
|
|
176
175
|
export { confirmForce, forceTargets, initCommand, initFailure, lintPresetOption, runInit };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/commands/lint/biome-version.ts
|
|
2
2
|
/**
|
|
3
3
|
* Pinned Biome version targeted by the lint schema-sync commands.
|
|
4
4
|
*
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
*
|
|
20
20
|
* @internal
|
|
21
21
|
*/
|
|
22
|
-
const BIOME_VERSION = "2.
|
|
22
|
+
const BIOME_VERSION = "2.6.2";
|
|
23
23
|
|
|
24
|
-
//#endregion
|
|
25
24
|
export { BIOME_VERSION };
|
package/commands/lint/check.js
CHANGED
|
@@ -9,7 +9,7 @@ import { CheckOutcome, ManagedSection } from "@effected/templates";
|
|
|
9
9
|
import { isDeepStrictEqual } from "node:util";
|
|
10
10
|
import { Tool, ToolDiscovery } from "@effected/commands";
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
// src/commands/lint/check.ts
|
|
13
13
|
/**
|
|
14
14
|
* Check command - validate current lint-staged setup.
|
|
15
15
|
*
|
|
@@ -310,5 +310,4 @@ function runLintCheck(opts) {
|
|
|
310
310
|
});
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
-
//#endregion
|
|
314
313
|
export { lintCheckSection, runLintCheck };
|
package/commands/lint/fmt.js
CHANGED
|
@@ -4,7 +4,7 @@ import { Effect, Option } from "effect";
|
|
|
4
4
|
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { Yaml } from "@effected/yaml";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/commands/lint/fmt.ts
|
|
8
8
|
/**
|
|
9
9
|
* Fmt command - format files in-place for lint-staged staging.
|
|
10
10
|
*
|
|
@@ -67,5 +67,4 @@ const _fmtCommand = Command.make("fmt").pipe(Command.withSubcommands([
|
|
|
67
67
|
*/
|
|
68
68
|
const fmtCommand = _fmtCommand;
|
|
69
69
|
|
|
70
|
-
//#endregion
|
|
71
70
|
export { fmtCommand };
|
package/commands/lint/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { fmtCommand } from "./fmt.js";
|
|
|
4
4
|
import { runLintText, textCommand } from "./text.js";
|
|
5
5
|
import { Command } from "effect/cli";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/commands/lint/index.ts
|
|
8
8
|
/* v8 ignore start -- CLI registration; each command tested via exported handler */
|
|
9
9
|
const _lintCommand = Command.make("lint").pipe(Command.withSubcommands([fmtCommand, textCommand]), Command.withDescription("Code-quality: lint-staged config, checks, and in-place formatting"));
|
|
10
10
|
/**
|
|
@@ -17,5 +17,4 @@ const _lintCommand = Command.make("lint").pipe(Command.withSubcommands([fmtComma
|
|
|
17
17
|
*/
|
|
18
18
|
const lintCommand = _lintCommand;
|
|
19
19
|
|
|
20
|
-
//#endregion
|
|
21
20
|
export { lintCommand, runLintCheck, runLintInit };
|
package/commands/lint/init.js
CHANGED
|
@@ -10,7 +10,7 @@ import { ManagedSection } from "@effected/templates";
|
|
|
10
10
|
import { chmod } from "node:fs/promises";
|
|
11
11
|
import { isDeepStrictEqual } from "node:util";
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
// src/commands/lint/init.ts
|
|
14
14
|
/**
|
|
15
15
|
* Init command - bootstrap lint-staged configuration.
|
|
16
16
|
*
|
|
@@ -300,5 +300,4 @@ function runLintInit(opts) {
|
|
|
300
300
|
});
|
|
301
301
|
}
|
|
302
302
|
|
|
303
|
-
//#endregion
|
|
304
303
|
export { runLintInit, syncBiomeSchemas };
|
package/commands/lint/text.js
CHANGED
|
@@ -4,7 +4,7 @@ import { CliExit, Doc } from "@effected/cli";
|
|
|
4
4
|
import { Lint } from "@savvy-web/silk-effects";
|
|
5
5
|
import { Effect, Path } from "effect";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/commands/lint/text.ts
|
|
8
8
|
/**
|
|
9
9
|
* `savvy lint text` — fail when a source file is not grep-visible text.
|
|
10
10
|
*
|
|
@@ -82,5 +82,4 @@ const textCommand = Command.make("text", {
|
|
|
82
82
|
staged: stagedFlag
|
|
83
83
|
}, ({ files, staged }) => runLintText(files, { staged })).pipe(Command.withDescription("Fail when a source file contains a NUL byte or is not valid UTF-8 (grep-invisible)"));
|
|
84
84
|
|
|
85
|
-
//#endregion
|
|
86
85
|
export { runLintText, textCommand };
|
|
@@ -5,7 +5,7 @@ import { CliPrompt } from "@effected/cli";
|
|
|
5
5
|
import { Repos } from "@savvy-web/silk-effects";
|
|
6
6
|
import { Effect, Option } from "effect";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/commands/repos/commands/add.ts
|
|
9
9
|
/**
|
|
10
10
|
* `repos add` command -- vendor a new reference repo under `.repos/`.
|
|
11
11
|
*
|
|
@@ -69,5 +69,4 @@ const addCommand = Command.make("add", {
|
|
|
69
69
|
})).pipe(Command.withDescription("Vendor a new reference repo under .repos/; stages the change without committing"));
|
|
70
70
|
/* v8 ignore stop */
|
|
71
71
|
|
|
72
|
-
//#endregion
|
|
73
72
|
export { addCommand, runReposAdd };
|
|
@@ -6,7 +6,7 @@ import { Repos } from "@savvy-web/silk-effects";
|
|
|
6
6
|
import { Effect, Option } from "effect";
|
|
7
7
|
import { CliUi, Select } from "@effected/cli/ui";
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
// src/commands/repos/commands/deregister.ts
|
|
10
10
|
/**
|
|
11
11
|
* `repos deregister` command -- clear a stale submodule registration from the
|
|
12
12
|
* superproject's LOCAL git config.
|
|
@@ -82,5 +82,4 @@ const deregisterCommand = Command.make("deregister", {
|
|
|
82
82
|
}, ({ section, cwd }) => runReposDeregister(cwd, Option.getOrUndefined(section))).pipe(Command.withDescription("Clear a stale submodule registration (a submodule.<section> section matching no manifest entry) from the local git config"));
|
|
83
83
|
/* v8 ignore stop */
|
|
84
84
|
|
|
85
|
-
//#endregion
|
|
86
85
|
export { deregisterCommand, runReposDeregister };
|
|
@@ -5,7 +5,7 @@ import { Repos } from "@savvy-web/silk-effects";
|
|
|
5
5
|
import { Effect, Option } from "effect";
|
|
6
6
|
import { CliUi, Select } from "@effected/cli/ui";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/commands/repos/commands/note.ts
|
|
9
9
|
/**
|
|
10
10
|
* `repos note` command group -- agent notes for a vendored `.repos/` repo.
|
|
11
11
|
*
|
|
@@ -152,5 +152,4 @@ const _noteCommand = _noteGroup.pipe(Command.withSubcommands([
|
|
|
152
152
|
const noteCommand = _noteCommand;
|
|
153
153
|
/* v8 ignore stop */
|
|
154
154
|
|
|
155
|
-
//#endregion
|
|
156
155
|
export { noteCommand, runReposNote };
|
|
@@ -5,7 +5,7 @@ import { CliInteractive, Doc } from "@effected/cli";
|
|
|
5
5
|
import { Repos } from "@savvy-web/silk-effects";
|
|
6
6
|
import { Effect, Option } from "effect";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/commands/repos/commands/pin.ts
|
|
9
9
|
/**
|
|
10
10
|
* `repos pin` command -- re-pin a vendored `.repos/` submodule to a new ref.
|
|
11
11
|
*
|
|
@@ -78,5 +78,4 @@ const pinCommand = Command.make("pin", {
|
|
|
78
78
|
}, ({ name, ref, cwd }) => runReposPin(cwd, Option.getOrUndefined(name), Option.getOrUndefined(ref))).pipe(Command.withDescription("Re-pin a vendored repo to a new ref; stages the change without committing"));
|
|
79
79
|
/* v8 ignore stop */
|
|
80
80
|
|
|
81
|
-
//#endregion
|
|
82
81
|
export { pinCommand, runReposPin };
|
|
@@ -6,7 +6,7 @@ import { Doc } from "@effected/cli";
|
|
|
6
6
|
import { Repos } from "@savvy-web/silk-effects";
|
|
7
7
|
import { Effect, Option } from "effect";
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
// src/commands/repos/commands/remove.ts
|
|
10
10
|
/* v8 ignore start -- CLI option/arg definitions */
|
|
11
11
|
const nameArg = Argument.String("name").pipe(Argument.optional);
|
|
12
12
|
const cwdOption = Flag.Directory("cwd").pipe(Flag.withDescription("Repo root to remove within"), Flag.withDefault("."));
|
|
@@ -44,5 +44,4 @@ const removeCommand = Command.make("remove", {
|
|
|
44
44
|
}, ({ name, yes, cwd }) => runReposRemove(cwd, Option.getOrUndefined(name), { yes })).pipe(Command.withDescription("Unvendor a repo under .repos/; stages the removal without committing"));
|
|
45
45
|
/* v8 ignore stop */
|
|
46
46
|
|
|
47
|
-
//#endregion
|
|
48
47
|
export { removeCommand, runReposRemove };
|
|
@@ -5,7 +5,7 @@ import { Doc } from "@effected/cli";
|
|
|
5
5
|
import { Repos } from "@savvy-web/silk-effects";
|
|
6
6
|
import { Effect, Option } from "effect";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/commands/repos/commands/rename.ts
|
|
9
9
|
/**
|
|
10
10
|
* `repos rename` command -- rename a vendored `.repos/` submodule's manifest
|
|
11
11
|
* key and worktree.
|
|
@@ -77,5 +77,4 @@ const renameCommand = Command.make("rename", {
|
|
|
77
77
|
}, ({ oldName, newName, cwd }) => runReposRename(cwd, Option.getOrUndefined(oldName), Option.getOrUndefined(newName))).pipe(Command.withDescription("Rename a vendored repo's manifest key and worktree; stages the change without committing"));
|
|
78
78
|
/* v8 ignore stop */
|
|
79
79
|
|
|
80
|
-
//#endregion
|
|
81
80
|
export { renameCommand, runReposRename };
|
|
@@ -6,7 +6,7 @@ import { CliExit, CliInteractive } from "@effected/cli";
|
|
|
6
6
|
import { Repos } from "@savvy-web/silk-effects";
|
|
7
7
|
import { Effect } from "effect";
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
// src/commands/repos/commands/restore.ts
|
|
10
10
|
/* v8 ignore start -- CLI option/arg definitions */
|
|
11
11
|
const namesArg = Argument.String("name").pipe(Argument.variadic());
|
|
12
12
|
const cwdOption = Flag.Directory("cwd").pipe(Flag.withDescription("Repo root to restore within"), Flag.withDefault("."));
|
|
@@ -60,5 +60,4 @@ const restoreCommand = Command.make("restore", {
|
|
|
60
60
|
}, ({ names, yes, cwd }) => runReposRestore(cwd, names, { yes })).pipe(Command.withDescription("Hard-reset vendored repos to their pinned commit; DESTRUCTIVE to uncommitted worktree edits. Given no names, restores every dirty repo (asks first at a terminal)"));
|
|
61
61
|
/* v8 ignore stop */
|
|
62
62
|
|
|
63
|
-
//#endregion
|
|
64
63
|
export { restoreCommand, runReposRestore };
|
|
@@ -5,7 +5,7 @@ import { CliExit, Doc, Status } from "@effected/cli";
|
|
|
5
5
|
import { Repos } from "@savvy-web/silk-effects";
|
|
6
6
|
import { Console, Effect } from "effect";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/commands/repos/commands/status.ts
|
|
9
9
|
/** The human status report: a table of repos, and one of drifts under `--drift`. */
|
|
10
10
|
var ReposStatusView = class {
|
|
11
11
|
constructor() {}
|
|
@@ -92,5 +92,4 @@ const statusCommand = Command.make("status", {
|
|
|
92
92
|
}, ({ json, drift, cwd }) => runReposStatus(cwd, json, drift)).pipe(Command.withDescription("Drift report: gitlink vs manifest ref, dirty and unsynced submodules"));
|
|
93
93
|
/* v8 ignore stop */
|
|
94
94
|
|
|
95
|
-
//#endregion
|
|
96
95
|
export { runReposStatus, statusCommand };
|
|
@@ -4,7 +4,7 @@ import { Command, Flag } from "effect/cli";
|
|
|
4
4
|
import { Repos } from "@savvy-web/silk-effects";
|
|
5
5
|
import { Effect } from "effect";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/commands/repos/commands/sync.ts
|
|
8
8
|
/* v8 ignore start -- CLI option definitions */
|
|
9
9
|
const cwdOption = Flag.Directory("cwd").pipe(Flag.withDescription("Repo root to sync"), Flag.withDefault("."));
|
|
10
10
|
/* v8 ignore stop */
|
|
@@ -28,5 +28,4 @@ const runReposSync = (cwd) => Effect.gen(function* () {
|
|
|
28
28
|
const syncCommand = Command.make("sync", { cwd: cwdOption }, ({ cwd }) => runReposSync(cwd)).pipe(Command.withDescription("Reconcile vendored submodules with the manifest: init missing, apply sparse, clear locks"));
|
|
29
29
|
/* v8 ignore stop */
|
|
30
30
|
|
|
31
|
-
//#endregion
|
|
32
31
|
export { runReposSync, syncCommand };
|
package/commands/repos/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import { runReposStatus, statusCommand } from "./commands/status.js";
|
|
|
9
9
|
import { runReposSync, syncCommand } from "./commands/sync.js";
|
|
10
10
|
import { Command } from "effect/cli";
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
// src/commands/repos/index.ts
|
|
13
13
|
/* v8 ignore start -- CLI registration; each command tested via exported handler */
|
|
14
14
|
const _reposCommand = Command.make("repos").pipe(Command.withSubcommands([
|
|
15
15
|
statusCommand,
|
|
@@ -49,5 +49,4 @@ const _reposCommand = Command.make("repos").pipe(Command.withSubcommands([
|
|
|
49
49
|
*/
|
|
50
50
|
const reposCommand = _reposCommand;
|
|
51
51
|
|
|
52
|
-
//#endregion
|
|
53
52
|
export { reposCommand, runReposStatus, runReposSync };
|
package/commands/repos/shared.js
CHANGED
|
@@ -7,7 +7,7 @@ import { Repos } from "@savvy-web/silk-effects";
|
|
|
7
7
|
import { Effect } from "effect";
|
|
8
8
|
import { CliUi, MultiSelect, Select, TextInput } from "@effected/cli/ui";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// src/commands/repos/shared.ts
|
|
11
11
|
/** What a person can do about each repos failure. */
|
|
12
12
|
const hints = {
|
|
13
13
|
ReposConfigError: "fix .repos/config.json (it is versioned: git diff / git checkout it), then run `savvy repos status`",
|
|
@@ -125,5 +125,4 @@ var ReposCli = class ReposCli {
|
|
|
125
125
|
};
|
|
126
126
|
};
|
|
127
127
|
|
|
128
|
-
//#endregion
|
|
129
128
|
export { ReposCli };
|
package/index.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ import { ManagedSection, SectionFileError, SectionParseError, SectionRenderError
|
|
|
10
10
|
import { PlatformError } from "effect/PlatformError";
|
|
11
11
|
import { ToolDiscovery } from "@effected/commands";
|
|
12
12
|
import { JsoncModificationError, JsoncParseError } from "@effected/jsonc";
|
|
13
|
-
//#region src/internal/command-error.d.ts
|
|
14
13
|
/** What {@link CommandError} carries besides its tag. */
|
|
15
14
|
interface CommandErrorFields {
|
|
16
15
|
/** One line saying what failed, e.g. `could not read .changeset/config.json`. */
|
|
@@ -64,12 +63,8 @@ declare class CommandError extends CommandError_base<CommandErrorFields> impleme
|
|
|
64
63
|
static readonly from: (error: unknown, options: CommandErrorFromOptions) => CommandError;
|
|
65
64
|
[CliDoc](): Document;
|
|
66
65
|
}
|
|
67
|
-
//#endregion
|
|
68
|
-
//#region src/internal/report.d.ts
|
|
69
66
|
/** What {@link Report.print} reads to pick a renderer: the audience, the terminal, the theme and editor links. */
|
|
70
67
|
type ReportEnv = CliTheme | TerminalEnv | Audience | CliLinks;
|
|
71
|
-
//#endregion
|
|
72
|
-
//#region src/commands/check-section.d.ts
|
|
73
68
|
/**
|
|
74
69
|
* A tool's verdict: `failure` when it found a misconfiguration (exit 1),
|
|
75
70
|
* `warning` when it only has advice, `success` otherwise.
|
|
@@ -92,8 +87,6 @@ interface CheckSection {
|
|
|
92
87
|
/** Whether `savvy init` is the remediation for what was found. */
|
|
93
88
|
readonly fixedByInit: boolean;
|
|
94
89
|
}
|
|
95
|
-
//#endregion
|
|
96
|
-
//#region src/commands/changeset/commands/check.d.ts
|
|
97
90
|
/**
|
|
98
91
|
* Run the check validation pipeline on all changeset files in `dir` and
|
|
99
92
|
* print {@link changesetCheckSection}'s blocks (no title heading: the
|
|
@@ -106,8 +99,6 @@ interface CheckSection {
|
|
|
106
99
|
* @internal
|
|
107
100
|
*/
|
|
108
101
|
export declare function runChangesetCheck(dir: string): Effect.Effect<void, Error, CliExit | ReportEnv>;
|
|
109
|
-
//#endregion
|
|
110
|
-
//#region src/commands/changeset/commands/init.d.ts
|
|
111
102
|
/**
|
|
112
103
|
* Run the changeset init as one step of the orchestrated `savvy init`: a
|
|
113
104
|
* failure is reported, not propagated, so the commit and lint steps still
|
|
@@ -134,8 +125,6 @@ export declare function runChangesetInit(opts: {
|
|
|
134
125
|
skipMarkdownlint: boolean;
|
|
135
126
|
check: boolean;
|
|
136
127
|
}): Effect.Effect<void, never, WorkspaceRoot | Git | CliExit | ReportEnv>;
|
|
137
|
-
//#endregion
|
|
138
|
-
//#region src/commands/changeset/index.d.ts
|
|
139
128
|
/**
|
|
140
129
|
* The `savvy changeset` command group for use in Task B7 root assembly.
|
|
141
130
|
*
|
|
@@ -152,8 +141,6 @@ export declare function runChangesetInit(opts: {
|
|
|
152
141
|
* the group's `R`, which the root assembly discharges via `AppLive`.
|
|
153
142
|
*/
|
|
154
143
|
export declare const changesetCommand: Command.Command<"changeset", Record<string, never>, Record<string, never>, CommandError | Error | Changesets.ReleasePlanError | Cause.UnknownError | Changesets.DepsRegenPlanError, ChildProcessSpawner.ChildProcessSpawner | Changesets.ConfigInspector | FileSystem.FileSystem | Path.Path | Changesets.ReleasePlanner | CliExit | ReportEnv>;
|
|
155
|
-
//#endregion
|
|
156
|
-
//#region src/commands/check.d.ts
|
|
157
144
|
/**
|
|
158
145
|
* Run the three checks without short-circuiting and print them as one
|
|
159
146
|
* document.
|
|
@@ -186,8 +173,6 @@ export declare const checkCommand: Command.Command<"check", {
|
|
|
186
173
|
readonly changesetDir: string;
|
|
187
174
|
readonly quiet: boolean;
|
|
188
175
|
}, {}, Error | import("@effected/jsonc").JsoncParseError | import("effect/PlatformError").PlatformError | import("@effected/templates").SectionFileError | import("@effected/templates").SectionParseError, import("@effected/env").Audience | import("@savvy-web/silk-effects").ChangesetConfigReader | CliExit | import("@effected/cli").CliLinks | import("@effected/cli").CliTheme | import("@savvy-web/silk-effects").ConfigDiscovery | import("effect/FileSystem").FileSystem | import("@effected/templates").ManagedSection | import("@effected/workspaces").PublishabilityDetector | import("@effected/env").TerminalEnv | import("@effected/commands").ToolDiscovery | import("@effected/workspaces").WorkspaceDiscovery>;
|
|
189
|
-
//#endregion
|
|
190
|
-
//#region src/commands/commit/check.d.ts
|
|
191
176
|
/** What {@link commitCheckSection} needs from the environment. */
|
|
192
177
|
type CommitCheckRequirements = ManagedSection | FileSystem.FileSystem | ChangesetConfigReader | PublishabilityDetector | WorkspaceDiscovery;
|
|
193
178
|
/**
|
|
@@ -199,8 +184,6 @@ type CommitCheckRequirements = ManagedSection | FileSystem.FileSystem | Changese
|
|
|
199
184
|
* @internal
|
|
200
185
|
*/
|
|
201
186
|
export declare function runCommitCheck(): Effect.Effect<void, SectionParseError | SectionFileError | PlatformError, CommitCheckRequirements | ReportEnv | CliExit>;
|
|
202
|
-
//#endregion
|
|
203
|
-
//#region src/commands/commit/init.d.ts
|
|
204
187
|
/**
|
|
205
188
|
* Run the full init pipeline.
|
|
206
189
|
*
|
|
@@ -216,8 +199,6 @@ export declare function runCommitInit(opts: {
|
|
|
216
199
|
force: boolean;
|
|
217
200
|
config: string;
|
|
218
201
|
}): Effect.Effect<void, CommandError | SectionParseError | SectionRenderError | SectionFileError | PlatformError, ManagedSection | FileSystem.FileSystem | ReportEnv>;
|
|
219
|
-
//#endregion
|
|
220
|
-
//#region src/commands/commit/index.d.ts
|
|
221
202
|
/**
|
|
222
203
|
* The `savvy commit` command group for use in Task B7 root assembly.
|
|
223
204
|
*
|
|
@@ -227,8 +208,6 @@ export declare function runCommitInit(opts: {
|
|
|
227
208
|
* as `Command.withSubcommands([commitCommand])` — the cast is for declaration emit only.
|
|
228
209
|
*/
|
|
229
210
|
export declare const commitCommand: Command.Command<"commit", {}, {}, import("effect/cli/CliError").UserError, import("effect/process/ChildProcessSpawner").ChildProcessSpawner | import("@effected/git").Git | ReportEnv>;
|
|
230
|
-
//#endregion
|
|
231
|
-
//#region src/commands/init.d.ts
|
|
232
211
|
/** The lint-staged presets `--lint-preset` accepts. */
|
|
233
212
|
type LintPreset = "minimal" | "standard" | "silk";
|
|
234
213
|
/**
|
|
@@ -261,8 +240,6 @@ export declare const initCommand: Command.Command<"init", {
|
|
|
261
240
|
readonly lintConfig: string;
|
|
262
241
|
readonly lintPreset: LintPreset;
|
|
263
242
|
}, {}, Cancelled | CommandError, import("@savvy-web/silk-effects").BiomeSchemaSync | import("@effected/cli").CliExit | FileSystem.FileSystem | import("@effected/git").Git | import("@effected/templates").ManagedSection | import("@effected/workspaces").WorkspaceDiscovery | import("@effected/workspaces").WorkspaceRoot | ReportEnv>;
|
|
264
|
-
//#endregion
|
|
265
|
-
//#region src/commands/lint/check.d.ts
|
|
266
243
|
/** What {@link lintCheckSection} needs from the environment. */
|
|
267
244
|
type LintCheckRequirements = ManagedSection | FileSystem.FileSystem | ToolDiscovery | ConfigDiscovery;
|
|
268
245
|
/**
|
|
@@ -278,8 +255,6 @@ type LintCheckRequirements = ManagedSection | FileSystem.FileSystem | ToolDiscov
|
|
|
278
255
|
export declare function runLintCheck(opts: {
|
|
279
256
|
quiet: boolean;
|
|
280
257
|
}): Effect.Effect<void, JsoncParseError | SectionParseError | SectionFileError | PlatformError, LintCheckRequirements | ReportEnv | CliExit>;
|
|
281
|
-
//#endregion
|
|
282
|
-
//#region src/commands/lint/init.d.ts
|
|
283
258
|
/**
|
|
284
259
|
* Run the full lint init pipeline.
|
|
285
260
|
*
|
|
@@ -300,8 +275,6 @@ export declare function runLintInit(opts: {
|
|
|
300
275
|
config: string;
|
|
301
276
|
preset: "minimal" | "standard" | "silk";
|
|
302
277
|
}): Effect.Effect<void, CommandError | JsoncParseError | JsoncModificationError | SectionParseError | SectionRenderError | SectionFileError | PlatformError, ManagedSection | FileSystem.FileSystem | BiomeSchemaSync | WorkspaceDiscovery | ReportEnv>;
|
|
303
|
-
//#endregion
|
|
304
|
-
//#region src/commands/lint/index.d.ts
|
|
305
278
|
/**
|
|
306
279
|
* The `savvy lint` command group for use in Task B7 root assembly.
|
|
307
280
|
*
|
|
@@ -311,24 +284,18 @@ export declare function runLintInit(opts: {
|
|
|
311
284
|
* as `Command.withSubcommands([lintCommand])` — the cast is for declaration emit only.
|
|
312
285
|
*/
|
|
313
286
|
export declare const lintCommand: Command.Command<"lint", {}, {}, import("@effected/git").GitCommandError | import("@effected/git").NotARepositoryError | import("effect/PlatformError").PlatformError | import("@effected/git").UnknownRefError | import("@effected/yaml").YamlParseError, import("effect/process/ChildProcessSpawner").ChildProcessSpawner | import("@effected/cli").CliExit | import("effect/FileSystem").FileSystem | import("@effected/git").Git | import("effect/Path").Path | ReportEnv>;
|
|
314
|
-
//#endregion
|
|
315
|
-
//#region src/commands/repos/commands/status.d.ts
|
|
316
287
|
/**
|
|
317
288
|
* Drift report handler; exported for tests.
|
|
318
289
|
*
|
|
319
290
|
* @internal
|
|
320
291
|
*/
|
|
321
292
|
export declare const runReposStatus: (cwd: string, json: boolean, drift?: boolean) => Effect.Effect<void, CommandError, CliExit | Repos.ReposDrift | Repos.ReposManager | ReportEnv>;
|
|
322
|
-
//#endregion
|
|
323
|
-
//#region src/commands/repos/commands/sync.d.ts
|
|
324
293
|
/**
|
|
325
294
|
* Sync handler; exported for tests.
|
|
326
295
|
*
|
|
327
296
|
* @internal
|
|
328
297
|
*/
|
|
329
298
|
export declare const runReposSync: (cwd: string) => Effect.Effect<void, CommandError, Repos.ReposManager | ReportEnv>;
|
|
330
|
-
//#endregion
|
|
331
|
-
//#region src/commands/repos/index.d.ts
|
|
332
299
|
/**
|
|
333
300
|
* The `savvy repos` command group.
|
|
334
301
|
*
|
|
@@ -355,6 +322,5 @@ export declare const runReposSync: (cwd: string) => Effect.Effect<void, CommandE
|
|
|
355
322
|
* a picker or a confirm is the kit's `Cancelled` (exit 130).
|
|
356
323
|
*/
|
|
357
324
|
export declare const reposCommand: Command.Command<"repos", Record<string, never>, Record<string, never>, CommandError | CliError.ShowHelp | Cancelled, Repos.ReposManager | Repos.ReposDrift | CliExit | ReportEnv>;
|
|
358
|
-
//#endregion
|
|
359
325
|
export {};
|
|
360
326
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -2,7 +2,7 @@ import { FailureLine } from "./failure-line.js";
|
|
|
2
2
|
import { CliDoc, Doc, Status } from "@effected/cli";
|
|
3
3
|
import { Data } from "effect";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/internal/command-error.ts
|
|
6
6
|
/**
|
|
7
7
|
* A command's failure that draws itself: a failure status line, indented
|
|
8
8
|
* detail lines, and an optional remediation as a tip callout.
|
|
@@ -56,5 +56,4 @@ var CommandError = class CommandError extends Data.TaggedError("CommandError") {
|
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
58
|
|
|
59
|
-
//#endregion
|
|
60
59
|
export { CommandError };
|
package/internal/confirm.js
CHANGED
|
@@ -2,7 +2,7 @@ import { Flag } from "effect/cli";
|
|
|
2
2
|
import { Effect } from "effect";
|
|
3
3
|
import { CliUi, Confirm } from "@effected/cli/ui";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/internal/confirm.ts
|
|
6
6
|
/**
|
|
7
7
|
* `--yes` / `-y`: answer yes to a destructive command's confirmation.
|
|
8
8
|
*
|
|
@@ -48,5 +48,4 @@ const confirmDestructive = (options) => options.yes ? Effect.succeed(true) : Cli
|
|
|
48
48
|
toggles: {}
|
|
49
49
|
} }).pipe(Effect.map((result) => result.confirmed), Effect.catchTag("NotInteractive", () => Effect.succeed(true)));
|
|
50
50
|
|
|
51
|
-
//#endregion
|
|
52
51
|
export { confirmDestructive, yesFlag };
|
package/internal/failure-line.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CliDoc } from "@effected/cli";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/internal/failure-line.ts
|
|
4
4
|
/** Where a defect report asks to be filed; mirrors `package.json#bugs.url`. */
|
|
5
5
|
const ISSUES_URL = "https://github.com/savvy-web/systems/issues";
|
|
6
6
|
const HIDDEN = /* @__PURE__ */ new Set([
|
|
@@ -76,5 +76,4 @@ var FailureLine = class {
|
|
|
76
76
|
static describe = (error) => describe(error);
|
|
77
77
|
};
|
|
78
78
|
|
|
79
|
-
//#endregion
|
|
80
79
|
export { FailureLine };
|
package/internal/report.js
CHANGED
|
@@ -2,7 +2,7 @@ import { Doc, Status } from "@effected/cli";
|
|
|
2
2
|
import { Effect } from "effect";
|
|
3
3
|
import { TerminalEnv } from "@effected/env";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/internal/report.ts
|
|
6
6
|
/** A status line, with any detail lines muted and indented under it. */
|
|
7
7
|
const item = (status, text, detail) => {
|
|
8
8
|
const head = [
|
|
@@ -97,5 +97,4 @@ var Report = class {
|
|
|
97
97
|
static print = (doc) => Effect.flatMap(TerminalEnv, (terminal) => Doc.print(doc, terminal.stdout.isTerminal ? {} : { width: Number.POSITIVE_INFINITY }));
|
|
98
98
|
};
|
|
99
99
|
|
|
100
|
-
//#endregion
|
|
101
100
|
export { Report };
|
package/internal/version-line.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { distributionSuffix } from "@effected/engine";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/internal/version-line.ts
|
|
4
4
|
/**
|
|
5
5
|
* Renders the `savvy --version` line: the same `<name> v<version>` shape
|
|
6
6
|
* `effect/cli`'s default formatter prints, plus the
|
|
@@ -15,5 +15,4 @@ var VersionLine = class {
|
|
|
15
15
|
static format = (name, version, distribution) => `${name} v${version}${distributionSuffix(distribution)}`;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
//#endregion
|
|
19
18
|
export { VersionLine };
|
package/main.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Distribution } from "@effected/engine";
|
|
2
|
-
//#region src/main.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Options for {@link main}.
|
|
5
4
|
*
|
|
@@ -19,5 +18,4 @@ export interface MainOptions {
|
|
|
19
18
|
* @public
|
|
20
19
|
*/
|
|
21
20
|
export declare const main: (options?: MainOptions) => void;
|
|
22
|
-
//#endregion
|
|
23
21
|
//# sourceMappingURL=main.d.ts.map
|
package/main.js
CHANGED
|
@@ -7,7 +7,7 @@ import { Effect, Layer, Option } from "effect";
|
|
|
7
7
|
import * as NodeRuntime from "@effect/platform-node/NodeRuntime";
|
|
8
8
|
import { CurrentDistribution } from "@effected/engine";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// src/main.ts
|
|
11
11
|
/**
|
|
12
12
|
* Owns the process. `index.ts` must stay importable without side effects;
|
|
13
13
|
* never import this module from the barrel.
|
|
@@ -53,5 +53,4 @@ const main = (options = {}) => {
|
|
|
53
53
|
};
|
|
54
54
|
/* v8 ignore stop */
|
|
55
55
|
|
|
56
|
-
//#endregion
|
|
57
56
|
export { main };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@savvy-web/cli",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.11",
|
|
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,20 +36,22 @@
|
|
|
36
36
|
"savvy": "bin/savvy.js"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@effect/platform-node": "^4.0.
|
|
40
|
-
"@effected/cli": "^0.
|
|
41
|
-
"@effected/commands": "^0.
|
|
42
|
-
"@effected/
|
|
43
|
-
"@effected/
|
|
44
|
-
"@effected/
|
|
45
|
-
"@effected/
|
|
46
|
-
"@effected/
|
|
47
|
-
"@effected/
|
|
48
|
-
"@effected/
|
|
49
|
-
"@effected/
|
|
50
|
-
"@effected/
|
|
51
|
-
"@
|
|
52
|
-
"
|
|
39
|
+
"@effect/platform-node": "^4.0.6",
|
|
40
|
+
"@effected/cli": "^0.20.0",
|
|
41
|
+
"@effected/commands": "^0.15.0",
|
|
42
|
+
"@effected/config-file": "^0.18.0",
|
|
43
|
+
"@effected/engine": "^0.8.0",
|
|
44
|
+
"@effected/env": "^0.5.0",
|
|
45
|
+
"@effected/git": "^0.24.0",
|
|
46
|
+
"@effected/glob": "^0.14.0",
|
|
47
|
+
"@effected/jsonc": "^0.19.0",
|
|
48
|
+
"@effected/templates": "^0.14.0",
|
|
49
|
+
"@effected/toml": "^0.15.0",
|
|
50
|
+
"@effected/walker": "^0.19.0",
|
|
51
|
+
"@effected/workspaces": "^0.36.1",
|
|
52
|
+
"@effected/yaml": "^0.23.0",
|
|
53
|
+
"@savvy-web/silk-effects": "^9.6.0",
|
|
54
|
+
"effect": "^4.0.6",
|
|
53
55
|
"ink": "^8.0.0",
|
|
54
56
|
"react": "^19.3.1"
|
|
55
57
|
}
|
package/version.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/version.ts
|
|
2
2
|
/**
|
|
3
3
|
* The package version, replaced at build time by the bundler's
|
|
4
4
|
* `process.env.__PACKAGE_VERSION__` define; `0.0.0` in an unbuilt source run.
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
* @packageDocumentation
|
|
8
8
|
*/
|
|
9
9
|
/** @internal */
|
|
10
|
-
const CLI_VERSION = "3.7.
|
|
10
|
+
const CLI_VERSION = "3.7.11";
|
|
11
11
|
|
|
12
|
-
//#endregion
|
|
13
12
|
export { CLI_VERSION };
|