@savvy-web/cli 2.1.0 → 2.1.1
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/cli/index.js +1 -1
- package/commands/changeset/index.js +4 -0
- package/commands/lint/fmt.js +2 -7
- package/commands/repos/index.js +4 -0
- package/index.d.ts +14 -5
- package/package.json +8 -8
package/cli/index.js
CHANGED
|
@@ -68,7 +68,7 @@ const rootCommand = Command.make("savvy").pipe(Command.withSubcommands([
|
|
|
68
68
|
* CLI application: reads argv from the Stdio service provided by NodeServices.
|
|
69
69
|
* (v4's `Command.run` takes only `version` — the name comes from the root command.)
|
|
70
70
|
*/
|
|
71
|
-
const cli = Command.run(rootCommand, { version: "2.1.
|
|
71
|
+
const cli = Command.run(rootCommand, { version: "2.1.1" });
|
|
72
72
|
/**
|
|
73
73
|
* Shared workspace services from `@effected/workspaces`, wired as a
|
|
74
74
|
* self-contained unit and built ONCE (layers memoize by reference).
|
|
@@ -32,6 +32,10 @@ const _changesetCommand = Command.make("changeset").pipe(Command.withSubcommands
|
|
|
32
32
|
* reference effect's non-exported `Inspectable` module (TS4023). The
|
|
33
33
|
* annotation preserves the exact Error/Requirements channels, so the root
|
|
34
34
|
* layer graph stays compiler-validated.
|
|
35
|
+
*
|
|
36
|
+
* The requirements channel names the subcommands' services rather than `never`:
|
|
37
|
+
* `Command.withSubcommands` propagates each subcommand's requirements up into
|
|
38
|
+
* the group's `R`, which the root assembly discharges via `AppLive`.
|
|
35
39
|
*/
|
|
36
40
|
const changesetCommand = _changesetCommand;
|
|
37
41
|
|
package/commands/lint/fmt.js
CHANGED
|
@@ -2,7 +2,7 @@ import { Lint } from "@savvy-web/silk-effects";
|
|
|
2
2
|
import { Effect } from "effect";
|
|
3
3
|
import { Argument, Command } from "effect/unstable/cli";
|
|
4
4
|
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
5
|
-
import { Yaml
|
|
5
|
+
import { Yaml } from "@effected/yaml";
|
|
6
6
|
|
|
7
7
|
//#region src/commands/lint/fmt.ts
|
|
8
8
|
/**
|
|
@@ -15,11 +15,6 @@ import { Yaml, YamlStringifyOptions } from "@effected/yaml";
|
|
|
15
15
|
*
|
|
16
16
|
* @internal
|
|
17
17
|
*/
|
|
18
|
-
/** Default YAML stringify options matching PnpmWorkspace handler (plain scalars = the v3 singleQuote:false posture). */
|
|
19
|
-
const YAML_STRINGIFY_OPTIONS = YamlStringifyOptions.make({
|
|
20
|
-
indent: 2,
|
|
21
|
-
lineWidth: 0
|
|
22
|
-
});
|
|
23
18
|
/** Repeated file path arguments. */
|
|
24
19
|
const filesArg = Argument.file("files", { mustExist: true }).pipe(Argument.variadic());
|
|
25
20
|
/** Sort package.json files with sort-package-json. */
|
|
@@ -37,7 +32,7 @@ const pnpmWorkspaceCommand = Command.make("pnpm-workspace", {}, () => Effect.gen
|
|
|
37
32
|
const content = readFileSync(filepath, "utf-8");
|
|
38
33
|
const parsed = yield* Yaml.parse(content);
|
|
39
34
|
const sorted = Lint.PnpmWorkspace.sortContent(parsed);
|
|
40
|
-
writeFileSync(filepath, yield*
|
|
35
|
+
writeFileSync(filepath, yield* Effect.promise(() => Lint.PnpmWorkspace.formatContent(sorted, filepath)), "utf-8");
|
|
41
36
|
}));
|
|
42
37
|
/** Format YAML files with Prettier. */
|
|
43
38
|
const yamlCommand = Command.make("yaml", { files: filesArg }, ({ files }) => Effect.gen(function* () {
|
package/commands/repos/index.js
CHANGED
|
@@ -24,6 +24,10 @@ const _reposCommand = Command.make("repos").pipe(Command.withSubcommands([
|
|
|
24
24
|
* reference effect's non-exported `Inspectable` module (TS4023). The
|
|
25
25
|
* annotation preserves the exact Error/Requirements channels, so the root
|
|
26
26
|
* layer graph stays compiler-validated.
|
|
27
|
+
*
|
|
28
|
+
* The requirements channel names `Repos.ReposManager` rather than `never`:
|
|
29
|
+
* `Command.withSubcommands` propagates each subcommand's requirements up into
|
|
30
|
+
* the group's `R`, which the root assembly discharges via `AppLive`.
|
|
27
31
|
*/
|
|
28
32
|
const reposCommand = _reposCommand;
|
|
29
33
|
|
package/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BiomeSchemaSync, Changesets, ConfigDiscovery, ManagedSection, Repos, SectionParseError, SectionWriteError, ToolDiscovery, VersioningStrategy } from "@savvy-web/silk-effects";
|
|
2
|
-
import { Cause, Effect, FileSystem } from "effect";
|
|
2
|
+
import { Cause, Effect, FileSystem, Path } from "effect";
|
|
3
3
|
import { Command } from "effect/unstable/cli";
|
|
4
|
+
import { ChildProcessSpawner } from "effect/unstable/process";
|
|
4
5
|
import { Git } from "@effected/git";
|
|
5
6
|
import { WorkspaceDiscovery, WorkspaceRoot } from "@effected/workspaces";
|
|
6
7
|
import { PlatformError } from "effect/PlatformError";
|
|
@@ -102,8 +103,12 @@ declare function runChangesetInit(opts: {
|
|
|
102
103
|
* reference effect's non-exported `Inspectable` module (TS4023). The
|
|
103
104
|
* annotation preserves the exact Error/Requirements channels, so the root
|
|
104
105
|
* layer graph stays compiler-validated.
|
|
106
|
+
*
|
|
107
|
+
* The requirements channel names the subcommands' services rather than `never`:
|
|
108
|
+
* `Command.withSubcommands` propagates each subcommand's requirements up into
|
|
109
|
+
* the group's `R`, which the root assembly discharges via `AppLive`.
|
|
105
110
|
*/
|
|
106
|
-
declare const changesetCommand: Command.Command<"changeset", Record<string, never>, Record<string, never>, Changesets.ConfigurationError | Error | Changesets.ReleasePlanError | Cause.UnknownError | Changesets.DepsRegenPlanError,
|
|
111
|
+
declare const changesetCommand: Command.Command<"changeset", Record<string, never>, Record<string, never>, Changesets.ConfigurationError | Error | Changesets.ReleasePlanError | Cause.UnknownError | Changesets.DepsRegenPlanError, ChildProcessSpawner.ChildProcessSpawner | Changesets.ConfigInspector | FileSystem.FileSystem | Path.Path | Changesets.ReleasePlanner>;
|
|
107
112
|
//#endregion
|
|
108
113
|
//#region src/commands/check.d.ts
|
|
109
114
|
/**
|
|
@@ -175,7 +180,7 @@ declare function runCommitInit(opts: {
|
|
|
175
180
|
* errors from Effect's internal types. Task B7 should import and use this directly
|
|
176
181
|
* as `Command.withSubcommands([commitCommand])` — the cast is for declaration emit only.
|
|
177
182
|
*/
|
|
178
|
-
declare const commitCommand: Command.Command<"commit", {}, {}, import("effect/unstable/cli/CliError").UserError,
|
|
183
|
+
declare const commitCommand: Command.Command<"commit", {}, {}, import("effect/unstable/cli/CliError").UserError, import("effect/unstable/process/ChildProcessSpawner").ChildProcessSpawner | import("@effected/git").Git>;
|
|
179
184
|
//#endregion
|
|
180
185
|
//#region src/commands/init.d.ts
|
|
181
186
|
/**
|
|
@@ -251,7 +256,7 @@ declare function runLintInit(opts: {
|
|
|
251
256
|
* errors from Effect's internal types. Task B7 should import and use this directly
|
|
252
257
|
* as `Command.withSubcommands([lintCommand])` — the cast is for declaration emit only.
|
|
253
258
|
*/
|
|
254
|
-
declare const lintCommand: Command.Command<"lint", {}, {}, import("@effected/yaml").YamlParseError
|
|
259
|
+
declare const lintCommand: Command.Command<"lint", {}, {}, import("@effected/yaml").YamlParseError, never>;
|
|
255
260
|
//#endregion
|
|
256
261
|
//#region src/commands/repos/commands/status.d.ts
|
|
257
262
|
/**
|
|
@@ -280,8 +285,12 @@ declare const runReposSync: (cwd: string) => Effect.Effect<void, never, Repos.Re
|
|
|
280
285
|
* reference effect's non-exported `Inspectable` module (TS4023). The
|
|
281
286
|
* annotation preserves the exact Error/Requirements channels, so the root
|
|
282
287
|
* layer graph stays compiler-validated.
|
|
288
|
+
*
|
|
289
|
+
* The requirements channel names `Repos.ReposManager` rather than `never`:
|
|
290
|
+
* `Command.withSubcommands` propagates each subcommand's requirements up into
|
|
291
|
+
* the group's `R`, which the root assembly discharges via `AppLive`.
|
|
283
292
|
*/
|
|
284
|
-
declare const reposCommand: Command.Command<"repos", Record<string, never>, Record<string, never>, Repos.GitSubmoduleError,
|
|
293
|
+
declare const reposCommand: Command.Command<"repos", Record<string, never>, Record<string, never>, Repos.GitSubmoduleError, Repos.ReposManager>;
|
|
285
294
|
//#endregion
|
|
286
295
|
export { changesetCommand, checkCommand, commitCommand, initCommand, lintCommand, reposCommand, runChangesetCheck, runChangesetInit, runCheck, runCli, runCommitCheck, runCommitInit, runInit, runLintCheck, runLintInit, runReposStatus, runReposSync };
|
|
287
296
|
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@savvy-web/cli",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1",
|
|
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",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"savvy": "bin/savvy.js"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@effect/platform-node": "4.0.0-beta.
|
|
35
|
-
"@effected/git": "^0.4.
|
|
36
|
-
"@effected/jsonc": "^0.
|
|
37
|
-
"@effected/workspaces": "^0.4.
|
|
38
|
-
"@effected/yaml": "^0.
|
|
39
|
-
"@savvy-web/silk-effects": "4.0
|
|
40
|
-
"effect": "4.0.0-beta.
|
|
34
|
+
"@effect/platform-node": "4.0.0-beta.99",
|
|
35
|
+
"@effected/git": "^0.4.1",
|
|
36
|
+
"@effected/jsonc": "^0.4.0",
|
|
37
|
+
"@effected/workspaces": "^0.4.1",
|
|
38
|
+
"@effected/yaml": "^0.4.0",
|
|
39
|
+
"@savvy-web/silk-effects": "4.1.0",
|
|
40
|
+
"effect": "4.0.0-beta.99"
|
|
41
41
|
}
|
|
42
42
|
}
|