reposets 1.0.13 → 1.0.15

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/reposets.js CHANGED
@@ -79,7 +79,7 @@ const reportAndExit = (error) => Effect.gen(function* () {
79
79
  });
80
80
  /** Whether a caught value is a tagged error of a given tag. */
81
81
  const isTagged = (error, tag) => typeof error === "object" && error !== null && "_tag" in error && error._tag === tag;
82
- cli.pipe(Command.run({ version: "1.0.13" }), Effect.catch(reportAndExit), Effect.provide(MainLive), NodeRuntime.runMain);
82
+ cli.pipe(Command.run({ version: "1.0.15" }), Effect.catch(reportAndExit), Effect.provide(MainLive), NodeRuntime.runMain);
83
83
 
84
84
  //#endregion
85
85
  export { };
@@ -6,11 +6,11 @@ import { AppDirs } from "@effected/xdg";
6
6
 
7
7
  //#region src/cli/commands/credentials.ts
8
8
  const EMPTY = { profiles: {} };
9
- const profileFlag = Flag.string("profile").pipe(Flag.withDescription("Credential profile name"));
10
- const opFlag = Flag.string("op").pipe(Flag.withDescription("1Password secret reference, e.g. \"op://Vault/item/field\""), Flag.optional);
11
- const envFlag = Flag.string("env").pipe(Flag.withDescription("Name of an environment variable holding the token, e.g. \"REPOSETS_GITHUB_TOKEN\""), Flag.optional);
12
- const usernameFlag = Flag.string("username").pipe(Flag.withDescription("The personal account this profile acts as. Mutually exclusive with --org"), Flag.optional);
13
- const orgFlag = Flag.string("org").pipe(Flag.withDescription("The organization this profile acts within. Mutually exclusive with --username"), Flag.optional);
9
+ const profileFlag = Flag.String("profile").pipe(Flag.withDescription("Credential profile name"));
10
+ const opFlag = Flag.String("op").pipe(Flag.optional, Flag.withDescription("1Password secret reference, e.g. \"op://Vault/item/field\""));
11
+ const envFlag = Flag.String("env").pipe(Flag.optional, Flag.withDescription("Name of an environment variable holding the token, e.g. \"REPOSETS_GITHUB_TOKEN\""));
12
+ const usernameFlag = Flag.String("username").pipe(Flag.optional, Flag.withDescription("The personal account this profile acts as. Mutually exclusive with --org"));
13
+ const orgFlag = Flag.String("org").pipe(Flag.optional, Flag.withDescription("The organization this profile acts within. Mutually exclusive with --username"));
14
14
  /**
15
15
  * Recognisable credential prefixes, so an obvious paste-in-the-wrong-place is
16
16
  * caught rather than stored.
@@ -30,9 +30,9 @@ import { Command, Flag } from "effect/unstable/cli";
30
30
  * @public
31
31
  */
32
32
  const driftCommand = Command.make("drift", {
33
- group: Flag.string("group").pipe(Flag.withDescription("Check only this group"), Flag.optional),
34
- repo: Flag.string("repo").pipe(Flag.withDescription("Check only this repository"), Flag.optional),
35
- debug: Flag.boolean("debug").pipe(Flag.withDescription("Show the applied and live fingerprints behind each drift report"))
33
+ group: Flag.String("group").pipe(Flag.optional, Flag.withDescription("Check only this group")),
34
+ repo: Flag.String("repo").pipe(Flag.optional, Flag.withDescription("Check only this repository")),
35
+ debug: Flag.Boolean("debug").pipe(Flag.withDefault(false), Flag.withDescription("Show the applied and live fingerprints behind each drift report"))
36
36
  }, (input) => syncHandler({
37
37
  dryRun: true,
38
38
  noCleanup: true,
@@ -3,8 +3,8 @@ import { Effect } from "effect";
3
3
  import { Command, Flag } from "effect/unstable/cli";
4
4
 
5
5
  //#region src/cli/commands/history.ts
6
- const limitFlag = Flag.integer("limit").pipe(Flag.withDescription("How many runs to show, newest first"), Flag.withDefault(20));
7
- const repoFlag = Flag.string("repo").pipe(Flag.withDescription("Only runs that touched this repository, as \"owner/name\""), Flag.optional);
6
+ const limitFlag = Flag.Int("limit").pipe(Flag.withDefault(20), Flag.withDescription("How many runs to show, newest first"));
7
+ const repoFlag = Flag.String("repo").pipe(Flag.optional, Flag.withDescription("Only runs that touched this repository, as \"owner/name\""));
8
8
  /**
9
9
  * `2026-08-12 22:14` — enough to tell two runs apart, short enough to align.
10
10
  *
@@ -194,8 +194,8 @@ const historyCommand = Command.make("history", {
194
194
  limit,
195
195
  repo: repo._tag === "Some" ? repo.value : void 0
196
196
  })).pipe(Command.withDescription("Show what previous sync runs did, newest first"), Command.withSubcommands([
197
- Command.make("show", { run: Flag.string("run").pipe(Flag.withDescription("A run id, or a unique prefix")) }, ({ run }) => showHandler(run)).pipe(Command.withDescription("Show every resource one run touched")),
198
- Command.make("prune", { keep: Flag.integer("keep").pipe(Flag.withDescription("How many of the newest runs to keep"), Flag.withDefault(50)) }, ({ keep }) => pruneHandler(keep)).pipe(Command.withDescription("Delete all but the newest runs from the journal")),
197
+ Command.make("show", { run: Flag.String("run").pipe(Flag.withDescription("A run id, or a unique prefix")) }, ({ run }) => showHandler(run)).pipe(Command.withDescription("Show every resource one run touched")),
198
+ Command.make("prune", { keep: Flag.Int("keep").pipe(Flag.withDefault(50), Flag.withDescription("How many of the newest runs to keep")) }, ({ keep }) => pruneHandler(keep)).pipe(Command.withDescription("Delete all but the newest runs from the journal")),
199
199
  Command.make("clear", {}, () => clearHandler()).pipe(Command.withDescription("Delete every run from the journal"))
200
200
  ]));
201
201
 
@@ -5,7 +5,7 @@ import { AppDirs } from "@effected/xdg";
5
5
  import { cwd } from "node:process";
6
6
 
7
7
  //#region src/cli/commands/init.ts
8
- const projectFlag = Flag.boolean("project").pipe(Flag.withDescription("Scaffold into the current directory instead of the XDG config directory"));
8
+ const projectFlag = Flag.Boolean("project").pipe(Flag.withDefault(false), Flag.withDescription("Scaffold into the current directory instead of the XDG config directory"));
9
9
  const CONFIG_TEMPLATE = `# reposets configuration
10
10
  # See: https://github.com/spencerbeggs/reposets
11
11
 
@@ -4,7 +4,7 @@ import { Command, Flag, Prompt } from "effect/unstable/cli";
4
4
  import { AppDirs } from "@effected/xdg";
5
5
 
6
6
  //#region src/cli/commands/nuke.ts
7
- const forceFlag = Flag.boolean("force").pipe(Flag.withDescription("Delete without asking. Intended for scripts; there is no undo"));
7
+ const forceFlag = Flag.Boolean("force").pipe(Flag.withDefault(false), Flag.withDescription("Delete without asking. Intended for scripts; there is no undo"));
8
8
  /**
9
9
  * Everything reposets has written to this machine.
10
10
  *
@@ -98,7 +98,7 @@ const nukeHandler = (force) => Effect.gen(function* () {
98
98
  return;
99
99
  }
100
100
  yield* Effect.log("");
101
- if (!(yield* Prompt.confirm({ message: `Delete ${targets.length} file${targets.length === 1 ? "" : "s"}?` }).pipe(Effect.orElseSucceed(() => false)))) {
101
+ if (!(yield* Prompt.Confirm({ message: `Delete ${targets.length} file${targets.length === 1 ? "" : "s"}?` }).pipe(Effect.orElseSucceed(() => false)))) {
102
102
  yield* Effect.log("Nothing was deleted.");
103
103
  return;
104
104
  }
@@ -207,14 +207,14 @@ const syncHandler = (input) => Effect.gen(function* () {
207
207
  * @public
208
208
  */
209
209
  const syncCommand = Command.make("sync", {
210
- dryRun: Flag.boolean("dry-run").pipe(Flag.withDescription("Report what would change without writing anything")),
211
- noCleanup: Flag.boolean("no-cleanup").pipe(Flag.withDescription("Skip deletion of undeclared resources")),
212
- failOnDrift: Flag.boolean("fail-on-drift").pipe(Flag.withDescription("Exit non-zero when a resource was changed outside reposets")),
213
- group: Flag.string("group").pipe(Flag.withDescription("Sync only this group"), Flag.optional),
214
- repo: Flag.string("repo").pipe(Flag.withDescription("Sync only this repository"), Flag.optional),
215
- only: Flag.string("only").pipe(Flag.withDescription("Run only these phases"), (f) => Flag.atLeast(f, 0)),
216
- skip: Flag.string("skip").pipe(Flag.withDescription("Skip these phases"), (f) => Flag.atLeast(f, 0)),
217
- debug: Flag.boolean("debug").pipe(Flag.withDescription("Annotate output with value sources and the fingerprints behind a drift report"))
210
+ dryRun: Flag.Boolean("dry-run").pipe(Flag.withDefault(false), Flag.withDescription("Report what would change without writing anything")),
211
+ noCleanup: Flag.Boolean("no-cleanup").pipe(Flag.withDefault(false), Flag.withDescription("Skip deletion of undeclared resources")),
212
+ failOnDrift: Flag.Boolean("fail-on-drift").pipe(Flag.withDefault(false), Flag.withDescription("Exit non-zero when a resource was changed outside reposets")),
213
+ group: Flag.String("group").pipe(Flag.optional, Flag.withDescription("Sync only this group")),
214
+ repo: Flag.String("repo").pipe(Flag.optional, Flag.withDescription("Sync only this repository")),
215
+ only: Flag.String("only").pipe(Flag.atLeast(0), Flag.withDescription("Run only these phases")),
216
+ skip: Flag.String("skip").pipe(Flag.atLeast(0), Flag.withDescription("Skip these phases")),
217
+ debug: Flag.Boolean("debug").pipe(Flag.withDefault(false), Flag.withDescription("Annotate output with value sources and the fingerprints behind a drift report"))
218
218
  }, (input) => syncHandler({
219
219
  dryRun: input.dryRun,
220
220
  noCleanup: input.noCleanup,
package/cli/flags.js CHANGED
@@ -7,7 +7,7 @@ import { Flag, GlobalFlag } from "effect/unstable/cli";
7
7
  * `--config`, as a global flag.
8
8
  *
9
9
  * @remarks
10
- * `GlobalFlag.setting` returns a `Context.Service` carrying the parsed value,
10
+ * `GlobalFlag.Setting` returns a `Context.Service` carrying the parsed value,
11
11
  * which is the bridge between parse time and layer-construction time: a layer
12
12
  * can require the flag in `R` instead of receiving it as a constructor argument.
13
13
  *
@@ -18,7 +18,7 @@ import { Flag, GlobalFlag } from "effect/unstable/cli";
18
18
  *
19
19
  * @public
20
20
  */
21
- const ConfigFlag = GlobalFlag.setting("config")({ flag: Flag.string("config").pipe(Flag.withDescription("Path to reposets.config.toml, or a directory containing it"), Flag.optional) });
21
+ const ConfigFlag = GlobalFlag.Setting("config")({ flag: Flag.String("config").pipe(Flag.optional, Flag.withDescription("Path to reposets.config.toml, or a directory containing it")) });
22
22
  /**
23
23
  * The config-file layer, parameterized by `--config` read from the ambient flag
24
24
  * service.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reposets",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "private": false,
5
5
  "description": "CLI tool to sync GitHub repo settings, secrets and rulesets across personal repositories",
6
6
  "keywords": [
@@ -48,15 +48,15 @@
48
48
  },
49
49
  "dependencies": {
50
50
  "@1password/sdk": "^0.5.0",
51
- "@effect/platform-node": "4.0.0-rc.112",
52
- "@effected/app": "^0.15.0",
53
- "@effected/config-file": "^0.7.0",
54
- "@effected/github": "^0.9.0",
55
- "@effected/store": "^0.7.0",
56
- "@effected/toml": "^0.6.0",
57
- "@effected/xdg": "^0.4.1",
51
+ "@effect/platform-node": "4.0.0-rc.115",
52
+ "@effected/app": "^0.16.1",
53
+ "@effected/config-file": "^0.9.0",
54
+ "@effected/github": "^0.10.1",
55
+ "@effected/store": "^0.8.0",
56
+ "@effected/toml": "^0.7.0",
57
+ "@effected/xdg": "^0.5.1",
58
58
  "blakejs": "^1.2.1",
59
- "effect": "4.0.0-rc.112"
59
+ "effect": "4.0.0-rc.115"
60
60
  },
61
61
  "engines": {
62
62
  "node": ">=24.11.0"
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.59.0"
8
+ "packageVersion": "7.59.1"
9
9
  }
10
10
  ]
11
11
  }