reposets 3.1.5 → 3.1.6

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.
Files changed (50) hide show
  1. package/bin/reposets.js +2 -3
  2. package/cli/commands/credentials.js +1 -2
  3. package/cli/commands/doctor.js +1 -2
  4. package/cli/commands/drift.js +1 -2
  5. package/cli/commands/history.js +1 -2
  6. package/cli/commands/init.js +1 -2
  7. package/cli/commands/list.js +1 -2
  8. package/cli/commands/nuke.js +1 -2
  9. package/cli/commands/sync.js +1 -2
  10. package/cli/commands/validate.js +1 -2
  11. package/cli/flags.js +1 -2
  12. package/cli/views/sync-progress-model.js +1 -2
  13. package/cli/views/sync-progress-view.js +1 -2
  14. package/cli/views/sync-progress.js +1 -2
  15. package/index.d.ts +0 -4
  16. package/lib/config-refs.js +1 -2
  17. package/lib/credential-labels.js +0 -0
  18. package/lib/fingerprint.js +1 -2
  19. package/lib/org-only.js +1 -2
  20. package/package.json +14 -14
  21. package/schemas/annotations.js +1 -2
  22. package/schemas/common.js +1 -2
  23. package/schemas/config.js +1 -2
  24. package/schemas/credentials.js +1 -2
  25. package/schemas/environment.js +1 -2
  26. package/schemas/hosted.js +1 -2
  27. package/schemas/ruleset.js +1 -2
  28. package/services/ConfigFiles.js +1 -2
  29. package/services/CredentialResolver.js +1 -2
  30. package/services/Invocation.js +1 -2
  31. package/services/OnePasswordClient.js +1 -2
  32. package/services/SyncLogger.js +1 -2
  33. package/store/AppliedState.js +0 -0
  34. package/store/RepoCache.js +1 -2
  35. package/store/SyncJournal.js +1 -2
  36. package/store/files.js +1 -2
  37. package/store/migrations.js +1 -2
  38. package/sync/SyncEngine.js +1 -2
  39. package/sync/decide.js +1 -2
  40. package/sync/phase.js +1 -2
  41. package/sync/phases/cleanup.js +1 -2
  42. package/sync/phases/code-scanning.js +1 -2
  43. package/sync/phases/environments.js +1 -2
  44. package/sync/phases/index.js +1 -2
  45. package/sync/phases/resource.js +1 -2
  46. package/sync/phases/rulesets.js +1 -2
  47. package/sync/phases/secrets.js +1 -2
  48. package/sync/phases/security.js +1 -2
  49. package/sync/phases/settings.js +1 -2
  50. package/sync/phases/variables.js +1 -2
package/bin/reposets.js CHANGED
@@ -20,7 +20,7 @@ import { NodeRuntime, NodeServices } from "@effect/platform-node";
20
20
  import { CliAudience, CliRuntime, ConfigIssueRenderer, Fmt } from "@effected/cli";
21
21
  import { Command } from "effect/cli";
22
22
 
23
- //#region src/cli/index.ts
23
+ // src/cli/index.ts
24
24
  /**
25
25
  * The build's version.
26
26
  *
@@ -32,7 +32,7 @@ import { Command } from "effect/cli";
32
32
  * `0.0.0 (dev build)` from every build until the version was threaded down
33
33
  * from here through {@link Invocation}.
34
34
  */
35
- const VERSION = "3.1.5";
35
+ const VERSION = "3.1.6";
36
36
  /**
37
37
  * The application's directories: XDG resolution and the `reposets` namespace
38
38
  * under it.
@@ -188,5 +188,4 @@ NodeRuntime.runMain(CliRuntime.main(CliAudience.run(cli, { version: VERSION }),
188
188
  helpOnUsageError: "stderr"
189
189
  }));
190
190
 
191
- //#endregion
192
191
  export { };
@@ -6,7 +6,7 @@ import { CliError, Command, Flag } from "effect/cli";
6
6
  import { CliUi, Select, TextInput } from "@effected/cli/ui";
7
7
  import { AppDirs } from "@effected/xdg";
8
8
 
9
- //#region src/cli/commands/credentials.ts
9
+ // src/cli/commands/credentials.ts
10
10
  const EMPTY = { profiles: {} };
11
11
  /**
12
12
  * Optional on both `create` and `delete`: an interactive run asks for a
@@ -393,5 +393,4 @@ const credentialsCommand = Command.make("credentials", {}, () => Effect.void).pi
393
393
  deleteCommand
394
394
  ]));
395
395
 
396
- //#endregion
397
396
  export { createHandler, credentialsCommand, deleteHandler, listHandler };
@@ -13,7 +13,7 @@ import { AppDirs } from "@effected/xdg";
13
13
  import { GitHubClient } from "@effected/github";
14
14
  import { Toml } from "@effected/toml";
15
15
 
16
- //#region src/cli/commands/doctor.ts
16
+ // src/cli/commands/doctor.ts
17
17
  const KNOWN_CONFIG_KEYS = /* @__PURE__ */ new Set([
18
18
  "settings",
19
19
  "secrets",
@@ -440,5 +440,4 @@ const doctorCommand = Command.make("doctor", {}, () => Effect.gen(function* () {
440
440
  yield* doctorHandler(Option.getOrUndefined(flag));
441
441
  })).pipe(Command.withDescription("Diagnose the config: unknown keys, credential posture, required token permissions"));
442
442
 
443
- //#endregion
444
443
  export { describeIdentity, doctorCommand, doctorHandler };
@@ -2,7 +2,7 @@ import { syncHandler } from "./sync.js";
2
2
  import { Option } from "effect";
3
3
  import { Command, Flag } from "effect/cli";
4
4
 
5
- //#region src/cli/commands/drift.ts
5
+ // src/cli/commands/drift.ts
6
6
  /**
7
7
  * `reposets drift` — report resources changed outside reposets, and change
8
8
  * nothing.
@@ -48,5 +48,4 @@ const driftCommand = Command.make("drift", {
48
48
  debug: input.debug
49
49
  })).pipe(Command.withDescription("Report resources changed outside reposets, without changing anything"));
50
50
 
51
- //#endregion
52
51
  export { driftCommand };
@@ -4,7 +4,7 @@ import { CliInteractive, CliMessage, Doc, Fmt, Status } from "@effected/cli";
4
4
  import { CliError, Command, Flag } from "effect/cli";
5
5
  import { CliUi, Select } from "@effected/cli/ui";
6
6
 
7
- //#region src/cli/commands/history.ts
7
+ // src/cli/commands/history.ts
8
8
  const limitFlag = Flag.Int("limit").pipe(Flag.withDefault(20), Flag.withDescription("How many runs to show, newest first"));
9
9
  const repoFlag = Flag.String("repo").pipe(Flag.optional, Flag.withDescription("Only runs that touched this repository, as \"owner/name\""));
10
10
  /**
@@ -340,5 +340,4 @@ const historyCommand = Command.make("history", {
340
340
  Command.make("clear", {}, () => clearHandler()).pipe(Command.withDescription("Delete every run from the journal"))
341
341
  ]));
342
342
 
343
- //#endregion
344
343
  export { clearHandler, historyCommand, historyHandler, pruneHandler, showHandler };
@@ -7,7 +7,7 @@ import { Command, Flag } from "effect/cli";
7
7
  import { CliUi, Select } from "@effected/cli/ui";
8
8
  import { AppDirs } from "@effected/xdg";
9
9
 
10
- //#region src/cli/commands/init.ts
10
+ // src/cli/commands/init.ts
11
11
  /**
12
12
  * `--project` scaffolds into the working directory, `--no-project` (or
13
13
  * `--project=false`) into the XDG config directory.
@@ -206,5 +206,4 @@ const initHandler = (project) => Effect.gen(function* () {
206
206
  */
207
207
  const initCommand = Command.make("init", { project: projectFlag }, ({ project }) => initHandler(Option.getOrUndefined(project))).pipe(Command.withDescription("Scaffold reposets.config.toml and reposets.credentials.toml"));
208
208
 
209
- //#endregion
210
209
  export { initCommand, initHandler };
@@ -4,7 +4,7 @@ import { Effect } from "effect";
4
4
  import { CliExit, CliMessage, Doc } from "@effected/cli";
5
5
  import { Command } from "effect/cli";
6
6
 
7
- //#region src/cli/commands/list.ts
7
+ // src/cli/commands/list.ts
8
8
  /** `secrets` and `variables` render the same way; only the scope names differ. */
9
9
  const scopeParts = (scopes) => {
10
10
  if (scopes === void 0) return [];
@@ -81,5 +81,4 @@ const listHandler = Effect.gen(function* () {
81
81
  */
82
82
  const listCommand = Command.make("list", {}, () => listHandler).pipe(Command.withDescription("Show a summary of the config: groups, repos and their assigned resources"));
83
83
 
84
- //#endregion
85
84
  export { listCommand, listHandler };
@@ -7,7 +7,7 @@ import { CliError, Command, Flag } from "effect/cli";
7
7
  import { CliUi, Confirm, MultiSelect } from "@effected/cli/ui";
8
8
  import { AppDirs, Xdg } from "@effected/xdg";
9
9
 
10
- //#region src/cli/commands/nuke.ts
10
+ // src/cli/commands/nuke.ts
11
11
  const forceFlag = Flag.Boolean("force").pipe(Flag.withDefault(false), Flag.withDescription("Delete without asking. Intended for scripts; there is no undo"));
12
12
  /**
13
13
  * The suffixes SQLite gives a database's companion files.
@@ -356,5 +356,4 @@ const nukeHandler = (force) => Effect.gen(function* () {
356
356
  */
357
357
  const nukeCommand = Command.make("nuke", { force: forceFlag }, ({ force }) => nukeHandler(force)).pipe(Command.withDescription("Delete every reposets file on this machine. Nothing on GitHub is touched"));
358
358
 
359
- //#endregion
360
359
  export { nukeCommand, nukeHandler };
@@ -17,7 +17,7 @@ import { CliError, Command, Flag } from "effect/cli";
17
17
  import { CliUi } from "@effected/cli/ui";
18
18
  import { CodeScanning, DeploymentEnvironment, GitHubClient, GitHubRepository, RepositorySecret, RepositorySecurity, RepositoryVariable, Ruleset, WorkflowDispatch } from "@effected/github";
19
19
 
20
- //#region src/cli/commands/sync.ts
20
+ // src/cli/commands/sync.ts
21
21
  const isPhaseName = (value) => PHASE_NAMES.includes(value);
22
22
  const phaseSet = (values) => new Set(values.filter(isPhaseName));
23
23
  /**
@@ -292,5 +292,4 @@ const syncCommand = Command.make("sync", {
292
292
  debug: input.debug
293
293
  })).pipe(Command.withDescription("Apply the config to every repository in a group, or all groups"));
294
294
 
295
- //#endregion
296
295
  export { partitionByProfile, runUnderSyncView, selectedRepoCount, syncCommand, syncHandler };
@@ -6,7 +6,7 @@ import { Effect } from "effect";
6
6
  import { CliExit, CliMessage, Doc, Status } from "@effected/cli";
7
7
  import { Command } from "effect/cli";
8
8
 
9
- //#region src/cli/commands/validate.ts
9
+ // src/cli/commands/validate.ts
10
10
  /**
11
11
  * Findings grouped by the group that references them, as a document.
12
12
  *
@@ -91,5 +91,4 @@ const validateHandler = Effect.gen(function* () {
91
91
  */
92
92
  const validateCommand = Command.make("validate", {}, () => validateHandler).pipe(Command.withDescription("Validate reposets.config.toml against the schema"));
93
93
 
94
- //#endregion
95
94
  export { validateCommand, validateHandler };
package/cli/flags.js CHANGED
@@ -2,7 +2,7 @@ import { makeConfigFilesLive } from "../services/ConfigFiles.js";
2
2
  import { Effect, Layer, Option } from "effect";
3
3
  import { Flag, GlobalFlag } from "effect/cli";
4
4
 
5
- //#region src/cli/flags.ts
5
+ // src/cli/flags.ts
6
6
  /**
7
7
  * `--config`, as a global flag.
8
8
  *
@@ -32,5 +32,4 @@ const ConfigFlag = GlobalFlag.Setting("config")({ flag: Flag.String("config").pi
32
32
  */
33
33
  const ConfigLive = Layer.unwrap(Effect.map(ConfigFlag, (flag) => makeConfigFilesLive(Option.getOrUndefined(flag))));
34
34
 
35
- //#endregion
36
35
  export { ConfigFlag, ConfigLive };
@@ -1,6 +1,6 @@
1
1
  import { Doc, Status } from "@effected/cli";
2
2
 
3
- //#region src/cli/views/sync-progress-model.ts
3
+ // src/cli/views/sync-progress-model.ts
4
4
  /**
5
5
  * The state before any event.
6
6
  *
@@ -139,5 +139,4 @@ const syncSummaryBlock = (state) => Doc.counts({
139
139
  ]
140
140
  });
141
141
 
142
- //#endregion
143
142
  export { initialSyncProgress, isSyncRunEnd, isSyncRunStart, reduceSyncProgress, syncSummaryBlock };
@@ -1,7 +1,7 @@
1
1
  import { initialSyncProgress, isSyncRunEnd, isSyncRunStart, reduceSyncProgress } from "./sync-progress-model.js";
2
2
  import { CliUi } from "@effected/cli/ui";
3
3
 
4
- //#region src/cli/views/sync-progress-view.ts
4
+ // src/cli/views/sync-progress-view.ts
5
5
  /**
6
6
  * The sync progress view: every `CliUi.live` option but `events`.
7
7
  *
@@ -28,5 +28,4 @@ const syncProgressView = {
28
28
  mode: "hosted"
29
29
  };
30
30
 
31
- //#endregion
32
31
  export { syncProgressView };
@@ -4,7 +4,7 @@ import { DocView, Styled, useGlyphs } from "@effected/cli/ui";
4
4
  import { Box, Text } from "ink";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
 
7
- //#region src/cli/views/sync-progress.tsx
7
+ // src/cli/views/sync-progress.tsx
8
8
  /**
9
9
  * The redrawing footer of an interactive `sync` or `drift`.
10
10
  *
@@ -51,5 +51,4 @@ const syncProgressRender = (state, frame) => /* @__PURE__ */ jsx(SyncProgress, {
51
51
  frame
52
52
  });
53
53
 
54
- //#endregion
55
54
  export { syncProgressRender };
package/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { FileSystem, Layer, Path, Schema } from "effect";
2
2
  import { AppDirs, Xdg } from "@effected/xdg";
3
- //#region src/schemas/config.d.ts
4
3
  /**
5
4
  * The whole `reposets.config.toml` document.
6
5
  *
@@ -324,8 +323,6 @@ export declare const ConfigSchema: Schema.Struct<{
324
323
  * @public
325
324
  */
326
325
  type Config = typeof ConfigSchema.Type;
327
- //#endregion
328
- //#region src/services/ConfigFiles.d.ts
329
326
  /**
330
327
  * The config file's fixed name, in every tier of the resolver chain.
331
328
  *
@@ -751,6 +748,5 @@ export declare class ConfigFlagMissingConfig extends ConfigFlagMissingConfig_bas
751
748
  * @public
752
749
  */
753
750
  export declare const makeConfigFilesLive: (configFlag: string | undefined) => Layer.Layer<ReposetsConfigFile, ConfigFlagNotFound | ConfigFlagMissingConfig, FileSystem.FileSystem | Path.Path | AppDirs | Xdg>;
754
- //#endregion
755
751
  export type { Config };
756
752
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
- //#region src/lib/config-refs.ts
1
+ // src/lib/config-refs.ts
2
2
  /**
3
3
  * Every reference in `[groups.*]` that points at a section which is not defined.
4
4
  *
@@ -72,5 +72,4 @@ const danglingReferences = (config) => {
72
72
  return found;
73
73
  };
74
74
 
75
- //#endregion
76
75
  export { danglingReferences };
Binary file
@@ -1,6 +1,6 @@
1
1
  import blakejs from "blakejs";
2
2
 
3
- //#region src/lib/fingerprint.ts
3
+ // src/lib/fingerprint.ts
4
4
  const { blake2bHex } = blakejs;
5
5
  /**
6
6
  * Serializes a value to JSON with object keys sorted at every depth.
@@ -48,5 +48,4 @@ const DIGEST_BYTES = 32;
48
48
  */
49
49
  const fingerprint = (value) => blake2bHex(canonical(value), void 0, DIGEST_BYTES);
50
50
 
51
- //#endregion
52
51
  export { fingerprint };
package/lib/org-only.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { profileOwner } from "../schemas/credentials.js";
2
2
 
3
- //#region src/lib/org-only.ts
3
+ // src/lib/org-only.ts
4
4
  /**
5
5
  * Organization-only constructs assigned to personal-account groups.
6
6
  *
@@ -57,5 +57,4 @@ const orgOnlyViolations = (config, credentials) => {
57
57
  return violations;
58
58
  };
59
59
 
60
- //#endregion
61
60
  export { orgOnlyViolations };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reposets",
3
- "version": "3.1.5",
3
+ "version": "3.1.6",
4
4
  "private": false,
5
5
  "description": "CLI tool to sync GitHub repo settings, secrets and rulesets across personal repositories",
6
6
  "keywords": [
@@ -48,20 +48,20 @@
48
48
  },
49
49
  "dependencies": {
50
50
  "@1password/sdk": "^0.5.0",
51
- "@effect/platform-node": "^4.0.5",
52
- "@effected/app": "^0.24.0",
53
- "@effected/cli": "^0.19.0",
54
- "@effected/config-file": "^0.17.0",
55
- "@effected/env": "^0.4.0",
56
- "@effected/github": "^0.21.0",
57
- "@effected/glob": "^0.13.0",
58
- "@effected/schemastore": "^0.24.0",
59
- "@effected/store": "^0.16.0",
60
- "@effected/toml": "^0.14.0",
61
- "@effected/walker": "^0.18.0",
62
- "@effected/xdg": "^0.12.0",
51
+ "@effect/platform-node": "^4.0.6",
52
+ "@effected/app": "^0.25.0",
53
+ "@effected/cli": "^0.20.0",
54
+ "@effected/config-file": "^0.18.0",
55
+ "@effected/env": "^0.5.0",
56
+ "@effected/github": "^0.23.0",
57
+ "@effected/glob": "^0.14.0",
58
+ "@effected/schemastore": "^0.25.0",
59
+ "@effected/store": "^0.17.0",
60
+ "@effected/toml": "^0.15.0",
61
+ "@effected/walker": "^0.19.0",
62
+ "@effected/xdg": "^0.13.0",
63
63
  "blakejs": "^1.2.1",
64
- "effect": "^4.0.5",
64
+ "effect": "^4.0.6",
65
65
  "ink": "^8.0.0",
66
66
  "react": "^19.3.1"
67
67
  },
@@ -1,4 +1,4 @@
1
- //#region src/schemas/annotations.ts
1
+ // src/schemas/annotations.ts
2
2
  /**
3
3
  * Build the `x-taplo` annotation key from typed options.
4
4
  *
@@ -77,5 +77,4 @@ const tombi = (options) => {
77
77
  */
78
78
  const docs = (page) => `https://github.com/spencerbeggs/reposets/blob/main/docs/${page}`;
79
79
 
80
- //#endregion
81
80
  export { docs, taplo, tombi };
package/schemas/common.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { docs, taplo, tombi } from "./annotations.js";
2
2
  import { Effect, Schema } from "effect";
3
3
 
4
- //#region src/schemas/common.ts
4
+ // src/schemas/common.ts
5
5
  const ResourceFileKind = Schema.Struct({ file: Schema.Record(Schema.String, Schema.String).annotate({
6
6
  ...tombi({ additionalKeyLabel: "name" }),
7
7
  title: "File entries",
@@ -161,5 +161,4 @@ const CleanupSchema = Schema.Struct({
161
161
  description: "Controls deletion of resources not declared in config. All disabled by default."
162
162
  });
163
163
 
164
- //#endregion
165
164
  export { CleanupSchema, CleanupScopeSchema, SecretGroupSchema, VariableGroupSchema };
package/schemas/config.js CHANGED
@@ -4,7 +4,7 @@ import { EnvironmentSchema } from "./environment.js";
4
4
  import { RulesetSchema } from "./ruleset.js";
5
5
  import { Effect, Schema } from "effect";
6
6
 
7
- //#region src/schemas/config.ts
7
+ // src/schemas/config.ts
8
8
  /**
9
9
  * Which secret groups apply to which GitHub secret scopes.
10
10
  *
@@ -467,5 +467,4 @@ const ConfigSchema = Schema.Struct({
467
467
  description: "Configuration for syncing GitHub repository settings, secrets, variables, rulesets, deployment environments, advanced security toggles, and CodeQL default setup"
468
468
  });
469
469
 
470
- //#endregion
471
470
  export { CodeScanningGroupSchema, CodeScanningLanguageSchema, ConfigSchema, GroupSchema, SecretScopesSchema, SecurityGroupSchema, SettingsGroupSchema, VariableScopesSchema };
@@ -1,7 +1,7 @@
1
1
  import { docs, taplo, tombi } from "./annotations.js";
2
2
  import { Effect, Schema } from "effect";
3
3
 
4
- //#region src/schemas/credentials.ts
4
+ // src/schemas/credentials.ts
5
5
  const CREDENTIALS_DOCS = docs("04-credentials.md");
6
6
  /**
7
7
  * A 1Password secret reference.
@@ -210,5 +210,4 @@ const CredentialsSchema = Schema.Struct({ profiles: Schema.Record(Schema.String,
210
210
  description: "Credential references for reposets. Contains no secret values."
211
211
  });
212
212
 
213
- //#endregion
214
213
  export { CredentialProfileSchema, CredentialSourceSchema, CredentialsSchema, EnvReferenceSchema, OpReferenceSchema, ResolveSectionSchema, profileOwner };
@@ -1,7 +1,7 @@
1
1
  import { docs, taplo, tombi } from "./annotations.js";
2
2
  import { Effect, Schema } from "effect";
3
3
 
4
- //#region src/schemas/environment.ts
4
+ // src/schemas/environment.ts
5
5
  const ReviewerTypeSchema = Schema.Literals(["User", "Team"]).annotate({
6
6
  title: "Reviewer type",
7
7
  description: "Whether the reviewer is an individual user or a team"
@@ -72,5 +72,4 @@ const EnvironmentSchema = Schema.Struct({
72
72
  description: "Configuration for a GitHub deployment environment"
73
73
  });
74
74
 
75
- //#endregion
76
75
  export { EnvironmentSchema };
package/schemas/hosted.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { HostedSchema } from "@effected/schemastore";
2
2
 
3
- //#region src/schemas/hosted.ts
3
+ // src/schemas/hosted.ts
4
4
  /**
5
5
  * The version label both published JSON Schema documents carry.
6
6
  *
@@ -75,5 +75,4 @@ const credentialsSchemaHost = HostedSchema.github({
75
75
  */
76
76
  const schemaDirective = (host) => `#:schema ${host.$id}\n\n`;
77
77
 
78
- //#endregion
79
78
  export { configSchemaHost, credentialsSchemaHost, schemaDirective };
@@ -1,7 +1,7 @@
1
1
  import { docs, taplo, tombi } from "./annotations.js";
2
2
  import { Effect, Schema } from "effect";
3
3
 
4
- //#region src/schemas/ruleset.ts
4
+ // src/schemas/ruleset.ts
5
5
  /**
6
6
  * A reference to a named value in the active credential profile.
7
7
  *
@@ -640,5 +640,4 @@ function buildRulesetPayload(ruleset) {
640
640
  };
641
641
  }
642
642
 
643
- //#endregion
644
643
  export { BranchRulesetSchema, BypassActorSchema, RefNameConditionSchema, ResolvedRefSchema, RulesetConditionsSchema, RulesetSchema, TagRulesetSchema, buildRulesetPayload };
@@ -4,7 +4,7 @@ import { Data, Effect, FileSystem, Layer, Path } from "effect";
4
4
  import { AppConfig } from "@effected/app";
5
5
  import { ConfigFile, ConfigResolver, TomlCodec } from "@effected/config-file";
6
6
 
7
- //#region src/services/ConfigFiles.ts
7
+ // src/services/ConfigFiles.ts
8
8
  /**
9
9
  * The config file's fixed name, in every tier of the resolver chain.
10
10
  *
@@ -177,5 +177,4 @@ const makeConfigFilesLive = (configFlag) => Layer.unwrap(Effect.map(resolversFor
177
177
  parseOptions: STRICT_KEYS
178
178
  })));
179
179
 
180
- //#endregion
181
180
  export { CONFIG_FILENAME, CREDENTIALS_FILENAME, ConfigFlagMissingConfig, ConfigFlagNotFound, CredentialsFilesLive, ReposetsConfigFile, ReposetsCredentialsFile, makeConfigFilesLive };
@@ -3,7 +3,7 @@ import { Config, Context, Data, Effect, Layer, Option, Redacted } from "effect";
3
3
  import { readFileSync } from "node:fs";
4
4
  import { isAbsolute, resolve } from "node:path";
5
5
 
6
- //#region src/services/CredentialResolver.ts
6
+ // src/services/CredentialResolver.ts
7
7
  /**
8
8
  * A credential could not be resolved.
9
9
  *
@@ -112,5 +112,4 @@ var CredentialResolver = class extends Context.Service()("reposets/CredentialRes
112
112
  */
113
113
  const CredentialResolverLive = Layer.effect(CredentialResolver, CredentialResolver.make);
114
114
 
115
- //#endregion
116
115
  export { CredentialResolver, CredentialResolverLive, ResolveError };
@@ -1,6 +1,6 @@
1
1
  import { Context, Layer } from "effect";
2
2
 
3
- //#region src/services/Invocation.ts
3
+ // src/services/Invocation.ts
4
4
  /**
5
5
  * The facts about this process a command needs, read once at the entrypoint.
6
6
  *
@@ -34,5 +34,4 @@ var Invocation = class extends Context.Service()("reposets/Invocation") {
34
34
  static layer = (value) => Layer.succeed(this, value);
35
35
  };
36
36
 
37
- //#endregion
38
37
  export { Invocation };
@@ -1,6 +1,6 @@
1
1
  import { Config, Context, Data, Effect, Layer, Option, Redacted } from "effect";
2
2
 
3
- //#region src/services/OnePasswordClient.ts
3
+ // src/services/OnePasswordClient.ts
4
4
  /**
5
5
  * The environment variable the 1Password SDK is authenticated from.
6
6
  *
@@ -110,5 +110,4 @@ var OnePasswordClient = class OnePasswordClient extends Context.Service()("repos
110
110
  */
111
111
  const OnePasswordClientLive = Layer.effect(OnePasswordClient, OnePasswordClient.make);
112
112
 
113
- //#endregion
114
113
  export { OP_SERVICE_ACCOUNT_TOKEN, OnePasswordClient, OnePasswordClientLive, OnePasswordError };
@@ -2,7 +2,7 @@ import { Console, Context, Effect, Layer, PubSub, Ref } from "effect";
2
2
  import { CliLog, CliTheme, Fmt, Status } from "@effected/cli";
3
3
  import { Audience } from "@effected/env";
4
4
 
5
- //#region src/services/SyncLogger.ts
5
+ // src/services/SyncLogger.ts
6
6
  /** Plural forms the naive `+ "s"` gets wrong. */
7
7
  function pluralize(resource, count) {
8
8
  if (count === 1) return resource;
@@ -225,5 +225,4 @@ function SyncLoggerLive(config) {
225
225
  }));
226
226
  }
227
227
 
228
- //#endregion
229
228
  export { SyncLogger, SyncLoggerLive };
Binary file
@@ -1,7 +1,7 @@
1
1
  import { Context, Duration, Effect, Layer, Schema } from "effect";
2
2
  import { Cache } from "@effected/store";
3
3
 
4
- //#region src/store/RepoCache.ts
4
+ // src/store/RepoCache.ts
5
5
  /**
6
6
  * Team ids effectively never change: a team keeps its id across renames, and a
7
7
  * deleted team's id is never reissued.
@@ -82,5 +82,4 @@ var RepoCache = class extends Context.Service()("reposets/RepoCache", { make: Ef
82
82
  */
83
83
  const RepoCacheLive = Layer.effect(RepoCache, RepoCache.make);
84
84
 
85
- //#endregion
86
85
  export { RepoCache, RepoCacheLive };
@@ -1,7 +1,7 @@
1
1
  import { Context, Crypto, DateTime, Effect, Layer } from "effect";
2
2
  import { Store } from "@effected/store";
3
3
 
4
- //#region src/store/SyncJournal.ts
4
+ // src/store/SyncJournal.ts
5
5
  /**
6
6
  * Append-only record of what each sync run did.
7
7
  *
@@ -89,5 +89,4 @@ var SyncJournal = class extends Context.Service()("reposets/SyncJournal", { make
89
89
  */
90
90
  const SyncJournalLive = Layer.effect(SyncJournal, SyncJournal.make);
91
91
 
92
- //#endregion
93
92
  export { SyncJournal, SyncJournalLive };
package/store/files.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/store/files.ts
1
+ // src/store/files.ts
2
2
  /**
3
3
  * The state database's file name, under the XDG state directory.
4
4
  *
@@ -21,5 +21,4 @@ const STATE_DB_FILENAME = "store.db";
21
21
  */
22
22
  const CACHE_DB_FILENAME = "cache.db";
23
23
 
24
- //#endregion
25
24
  export { CACHE_DB_FILENAME, STATE_DB_FILENAME };
@@ -1,6 +1,6 @@
1
1
  import { Effect } from "effect";
2
2
 
3
- //#region src/store/migrations.ts
3
+ // src/store/migrations.ts
4
4
  /**
5
5
  * The sync journal: one row per run, plus one row per resource the run changed.
6
6
  *
@@ -82,5 +82,4 @@ const drift = {
82
82
  */
83
83
  const migrations = [journal, drift];
84
84
 
85
- //#endregion
86
85
  export { migrations };
@@ -7,7 +7,7 @@ import { emptyResult, mergeResults, selectPhases } from "./phase.js";
7
7
  import { Context, Effect, Layer } from "effect";
8
8
  import { GitHubRepository, Repo, RepoRef } from "@effected/github";
9
9
 
10
- //#region src/sync/SyncEngine.ts
10
+ // src/sync/SyncEngine.ts
11
11
  /**
12
12
  * Runs the configured phases over every selected repository.
13
13
  *
@@ -152,5 +152,4 @@ function SyncEngineLive(makePhases) {
152
152
  }));
153
153
  }
154
154
 
155
- //#endregion
156
155
  export { SyncEngine, SyncEngineLive };
package/sync/decide.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/sync/decide.ts
1
+ // src/sync/decide.ts
2
2
  /**
3
3
  * Decides what to do about one resource from three fingerprints.
4
4
  *
@@ -52,5 +52,4 @@ const needsApply = (decision) => decision._tag === "ConfigChanged" || (decision.
52
52
  */
53
53
  const isDrift = (decision) => decision._tag === "Drift";
54
54
 
55
- //#endregion
56
55
  export { decide, isDrift, needsApply };
package/sync/phase.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Effect } from "effect";
2
2
 
3
- //#region src/sync/phase.ts
3
+ // src/sync/phase.ts
4
4
  /** A phase that touched nothing and failed at nothing. */
5
5
  const emptyResult = {
6
6
  changes: [],
@@ -51,5 +51,4 @@ const mergeResults = (results) => ({
51
51
  errors: results.flatMap((r) => r.errors)
52
52
  });
53
53
 
54
- //#endregion
55
54
  export { PHASE_NAMES, emptyResult, mergeResults, selectPhases };
@@ -5,7 +5,7 @@ import { capture, declaredNames, read } from "./resource.js";
5
5
  import { Effect } from "effect";
6
6
  import { DeploymentEnvironment, RepositorySecret, RepositoryVariable, Ruleset } from "@effected/github";
7
7
 
8
- //#region src/sync/phases/cleanup.ts
8
+ // src/sync/phases/cleanup.ts
9
9
  /** The secret stores that live on the repository rather than an environment. */
10
10
  const SECRET_SCOPES = [
11
11
  "actions",
@@ -216,5 +216,4 @@ const cleanupPhase = Effect.gen(function* () {
216
216
  };
217
217
  });
218
218
 
219
- //#endregion
220
219
  export { cleanupPhase };
@@ -7,7 +7,7 @@ import { decide, isDrift, needsApply } from "../decide.js";
7
7
  import { Effect, Option } from "effect";
8
8
  import { CodeScanning, WorkflowDispatch } from "@effected/github";
9
9
 
10
- //#region src/sync/phases/code-scanning.ts
10
+ // src/sync/phases/code-scanning.ts
11
11
  /**
12
12
  * Stands in for live state this phase cannot read.
13
13
  *
@@ -183,5 +183,4 @@ const codeScanningPhase = Effect.gen(function* () {
183
183
  };
184
184
  });
185
185
 
186
- //#endregion
187
186
  export { codeScanningPhase };
@@ -5,7 +5,7 @@ import { decide, isDrift, needsApply } from "../decide.js";
5
5
  import { Effect, Option } from "effect";
6
6
  import { DeploymentEnvironment } from "@effected/github";
7
7
 
8
- //#region src/sync/phases/environments.ts
8
+ // src/sync/phases/environments.ts
9
9
  /**
10
10
  * Stands in for live state this phase cannot read.
11
11
  *
@@ -102,5 +102,4 @@ const environmentsPhase = Effect.gen(function* () {
102
102
  };
103
103
  });
104
104
 
105
- //#endregion
106
105
  export { environmentsPhase };
@@ -9,7 +9,7 @@ import { settingsPhase } from "./settings.js";
9
9
  import { variablesPhase } from "./variables.js";
10
10
  import { Effect } from "effect";
11
11
 
12
- //#region src/sync/phases/index.ts
12
+ // src/sync/phases/index.ts
13
13
  /**
14
14
  * Every phase, in `PHASE_NAMES` order.
15
15
  *
@@ -35,5 +35,4 @@ const allPhases = Effect.all([
35
35
  cleanupPhase
36
36
  ]);
37
37
 
38
- //#endregion
39
38
  export { allPhases };
@@ -2,7 +2,7 @@ import { Effect, Redacted } from "effect";
2
2
  import { readFileSync } from "node:fs";
3
3
  import { isAbsolute, resolve } from "node:path";
4
4
 
5
- //#region src/sync/phases/resource.ts
5
+ // src/sync/phases/resource.ts
6
6
  /**
7
7
  * Resolve one secret or variable group into named values.
8
8
  *
@@ -145,5 +145,4 @@ const capture = (context, effect) => effect.pipe(Effect.as(void 0), Effect.catch
145
145
  message: error.message ?? String(error)
146
146
  })));
147
147
 
148
- //#endregion
149
148
  export { capture, declaredNames, read, resolveGroups };
@@ -8,7 +8,7 @@ import { decide, isDrift, needsApply } from "../decide.js";
8
8
  import { Effect, Option, Redacted } from "effect";
9
9
  import { Ruleset } from "@effected/github";
10
10
 
11
- //#region src/sync/phases/rulesets.ts
11
+ // src/sync/phases/rulesets.ts
12
12
  const KIND = "ruleset";
13
13
  /** Stands in for a ruleset that is not on the repository at all. */
14
14
  const ABSENT = " absent";
@@ -182,5 +182,4 @@ const rulesetsPhase = Effect.gen(function* () {
182
182
  };
183
183
  });
184
184
 
185
- //#endregion
186
185
  export { rulesetsPhase };
@@ -6,7 +6,7 @@ import { decide, isDrift, needsApply } from "../decide.js";
6
6
  import { Effect, Option, Redacted } from "effect";
7
7
  import { RepositorySecret } from "@effected/github";
8
8
 
9
- //#region src/sync/phases/secrets.ts
9
+ // src/sync/phases/secrets.ts
10
10
  const KIND = "secret";
11
11
  /** The three repository-level stores, each with its own keys and its own paths. */
12
12
  const SCOPES = [
@@ -134,5 +134,4 @@ const secretsPhase = Effect.gen(function* () {
134
134
  };
135
135
  });
136
136
 
137
- //#endregion
138
137
  export { secretsPhase };
@@ -5,7 +5,7 @@ import { decide, isDrift, needsApply } from "../decide.js";
5
5
  import { Effect, Option } from "effect";
6
6
  import { RepositorySecurity } from "@effected/github";
7
7
 
8
- //#region src/sync/phases/security.ts
8
+ // src/sync/phases/security.ts
9
9
  const KIND = "security";
10
10
  /** The three toggles, and the merged config field each reads. */
11
11
  const TOGGLES = [
@@ -125,5 +125,4 @@ const securityPhase = Effect.gen(function* () {
125
125
  };
126
126
  });
127
127
 
128
- //#endregion
129
128
  export { securityPhase };
@@ -7,7 +7,7 @@ import { decide, isDrift, needsApply } from "../decide.js";
7
7
  import { Effect, Option } from "effect";
8
8
  import { GitHubRepository, Ruleset } from "@effected/github";
9
9
 
10
- //#region src/sync/phases/settings.ts
10
+ // src/sync/phases/settings.ts
11
11
  /**
12
12
  * Stands in for live state this phase cannot read.
13
13
  *
@@ -270,5 +270,4 @@ const settingsPhase = Effect.gen(function* () {
270
270
  };
271
271
  });
272
272
 
273
- //#endregion
274
273
  export { settingsPhase };
@@ -6,7 +6,7 @@ import { decide, isDrift, needsApply } from "../decide.js";
6
6
  import { Effect, Option, Redacted } from "effect";
7
7
  import { RepositoryVariable } from "@effected/github";
8
8
 
9
- //#region src/sync/phases/variables.ts
9
+ // src/sync/phases/variables.ts
10
10
  const KIND = "variable";
11
11
  /**
12
12
  * Stands in for a variable that is not on the repository at all.
@@ -128,5 +128,4 @@ const variablesPhase = Effect.gen(function* () {
128
128
  };
129
129
  });
130
130
 
131
- //#endregion
132
131
  export { variablesPhase };