reposets 0.2.1 → 0.4.0

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/index.d.ts CHANGED
@@ -9,11 +9,12 @@
9
9
 
10
10
  import { AppDirs } from 'xdg-effect';
11
11
  import { ConfigFile } from 'xdg-effect';
12
- import type { ConfigFileService } from 'xdg-effect';
12
+ import { ConfigFileService } from 'xdg-effect';
13
13
  import { Context } from 'effect';
14
14
  import { Effect } from 'effect';
15
15
  import { FileSystem } from '@effect/platform/FileSystem';
16
- import { Layer } from 'effect';
16
+ import { Layer } from 'effect/Layer';
17
+ import { Layer as Layer_2 } from 'effect';
17
18
  import { Option } from 'effect';
18
19
  import { Ref } from 'effect';
19
20
  import { Schema } from 'effect';
@@ -110,11 +111,35 @@ export declare const CleanupScopeSchema: Schema.Union<[typeof Schema.Boolean, Sc
110
111
  preserve: Schema.Array$<typeof Schema.String>;
111
112
  }>]>;
112
113
 
114
+ declare type CodeScanningGroup = typeof CodeScanningGroupSchema.Type;
115
+
116
+ declare const CodeScanningGroupSchema: Schema.refine<{
117
+ readonly state?: "configured" | "not-configured" | undefined;
118
+ readonly languages?: readonly ("actions" | "c-cpp" | "csharp" | "go" | "java-kotlin" | "javascript-typescript" | "python" | "ruby" | "swift")[] | undefined;
119
+ readonly query_suite?: "default" | "extended" | undefined;
120
+ readonly threat_model?: "remote" | "remote_and_local" | undefined;
121
+ readonly runner_type?: "labeled" | "standard" | undefined;
122
+ readonly runner_label?: string | undefined;
123
+ }, Schema.Struct<{
124
+ state: Schema.optional<Schema.Literal<["configured", "not-configured"]>>;
125
+ languages: Schema.optional<Schema.Array$<Schema.Literal<["actions", "c-cpp", "csharp", "go", "java-kotlin", "javascript-typescript", "python", "ruby", "swift"]>>>;
126
+ query_suite: Schema.optional<Schema.Literal<["default", "extended"]>>;
127
+ threat_model: Schema.optional<Schema.Literal<["remote", "remote_and_local"]>>;
128
+ runner_type: Schema.optional<Schema.Literal<["standard", "labeled"]>>;
129
+ runner_label: Schema.optional<Schema.SchemaClass<string, string, never>>;
130
+ }>>;
131
+
113
132
  export declare type Config = typeof ConfigSchema.Type;
114
133
 
134
+ export declare const CONFIG_FILENAME = "reposets.config.toml";
135
+
115
136
  export { ConfigFile }
116
137
 
117
- export declare const ConfigFilesLive: Layer.Layer<AppDirs | ConfigFileService<any> | XdgResolver, never, FileSystem>;
138
+ /**
139
+ * Default ConfigFiles layer with no --config flag override.
140
+ * Used by CLI entrypoint when no flag is provided.
141
+ */
142
+ export declare const ConfigFilesLive: Layer<AppDirs | ConfigFileService<any> | XdgResolver, never, FileSystem>;
118
143
 
119
144
  export declare const ConfigSchema: Schema.Struct<{
120
145
  owner: Schema.optional<Schema.SchemaClass<string, string, never>>;
@@ -141,6 +166,24 @@ export declare const ConfigSchema: Schema.Struct<{
141
166
  merge_commit_message: Schema.optional<Schema.Literal<["PR_BODY", "PR_TITLE", "BLANK"]>>;
142
167
  delete_branch_on_merge: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
143
168
  web_commit_signoff_required: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
169
+ security_and_analysis: Schema.optional<Schema.Struct<{
170
+ advanced_security: Schema.optional<Schema.Literal<["enabled", "disabled"]>>;
171
+ code_security: Schema.optional<Schema.Literal<["enabled", "disabled"]>>;
172
+ secret_scanning: Schema.optional<Schema.Literal<["enabled", "disabled"]>>;
173
+ secret_scanning_push_protection: Schema.optional<Schema.Literal<["enabled", "disabled"]>>;
174
+ secret_scanning_ai_detection: Schema.optional<Schema.Literal<["enabled", "disabled"]>>;
175
+ secret_scanning_non_provider_patterns: Schema.optional<Schema.Literal<["enabled", "disabled"]>>;
176
+ secret_scanning_delegated_alert_dismissal: Schema.optional<Schema.Literal<["enabled", "disabled"]>>;
177
+ secret_scanning_delegated_bypass: Schema.optional<Schema.Literal<["enabled", "disabled"]>>;
178
+ delegated_bypass_reviewers: Schema.optional<Schema.Array$<Schema.Union<[Schema.Struct<{
179
+ team: Schema.SchemaClass<string, string, never>;
180
+ mode: Schema.optional<Schema.Literal<["ALWAYS", "EXEMPT"]>>;
181
+ }>, Schema.Struct<{
182
+ role: Schema.SchemaClass<string, string, never>;
183
+ mode: Schema.optional<Schema.Literal<["ALWAYS", "EXEMPT"]>>;
184
+ }>]>>>;
185
+ dependabot_security_updates: Schema.optional<Schema.Literal<["enabled", "disabled"]>>;
186
+ }>>;
144
187
  }, readonly [{
145
188
  readonly key: typeof Schema.String;
146
189
  readonly value: Schema.SchemaClass<unknown, unknown, never>;
@@ -383,6 +426,34 @@ export declare const ConfigSchema: Schema.Struct<{
383
426
  }>>, {
384
427
  default: () => {};
385
428
  }>;
429
+ security: Schema.optionalWith<Schema.Record$<typeof Schema.String, Schema.refine<{
430
+ readonly vulnerability_alerts?: boolean | undefined;
431
+ readonly automated_security_fixes?: boolean | undefined;
432
+ readonly private_vulnerability_reporting?: boolean | undefined;
433
+ }, Schema.Struct<{
434
+ vulnerability_alerts: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
435
+ automated_security_fixes: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
436
+ private_vulnerability_reporting: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
437
+ }>>>, {
438
+ default: () => {};
439
+ }>;
440
+ code_scanning: Schema.optionalWith<Schema.Record$<typeof Schema.String, Schema.refine<{
441
+ readonly state?: "configured" | "not-configured" | undefined;
442
+ readonly languages?: readonly ("actions" | "c-cpp" | "csharp" | "go" | "java-kotlin" | "javascript-typescript" | "python" | "ruby" | "swift")[] | undefined;
443
+ readonly query_suite?: "default" | "extended" | undefined;
444
+ readonly threat_model?: "remote" | "remote_and_local" | undefined;
445
+ readonly runner_type?: "labeled" | "standard" | undefined;
446
+ readonly runner_label?: string | undefined;
447
+ }, Schema.Struct<{
448
+ state: Schema.optional<Schema.Literal<["configured", "not-configured"]>>;
449
+ languages: Schema.optional<Schema.Array$<Schema.Literal<["actions", "c-cpp", "csharp", "go", "java-kotlin", "javascript-typescript", "python", "ruby", "swift"]>>>;
450
+ query_suite: Schema.optional<Schema.Literal<["default", "extended"]>>;
451
+ threat_model: Schema.optional<Schema.Literal<["remote", "remote_and_local"]>>;
452
+ runner_type: Schema.optional<Schema.Literal<["standard", "labeled"]>>;
453
+ runner_label: Schema.optional<Schema.SchemaClass<string, string, never>>;
454
+ }>>>, {
455
+ default: () => {};
456
+ }>;
386
457
  groups: Schema.Record$<typeof Schema.String, Schema.Struct<{
387
458
  owner: Schema.optional<Schema.SchemaClass<string, string, never>>;
388
459
  repos: Schema.Array$<typeof Schema.String>;
@@ -400,6 +471,8 @@ export declare const ConfigSchema: Schema.Struct<{
400
471
  environments: Schema.optional<Schema.Record$<typeof Schema.String, Schema.Array$<typeof Schema.String>>>;
401
472
  }>>;
402
473
  rulesets: Schema.optional<Schema.Array$<typeof Schema.String>>;
474
+ security: Schema.optional<Schema.Array$<typeof Schema.String>>;
475
+ code_scanning: Schema.optional<Schema.Array$<typeof Schema.String>>;
403
476
  cleanup: Schema.optional<Schema.Struct<{
404
477
  secrets: Schema.optionalWith<Schema.Struct<{
405
478
  actions: Schema.optionalWith<Schema.Union<[typeof Schema.Boolean, Schema.Struct<{
@@ -478,7 +551,7 @@ export declare class CredentialResolver extends CredentialResolver_base {
478
551
 
479
552
  declare const CredentialResolver_base: Context.TagClass<CredentialResolver, "CredentialResolver", CredentialResolverService>;
480
553
 
481
- export declare const CredentialResolverLive: Layer.Layer<CredentialResolver, never, OnePasswordClient>;
554
+ export declare const CredentialResolverLive: Layer_2.Layer<CredentialResolver, never, OnePasswordClient>;
482
555
 
483
556
  declare interface CredentialResolverService {
484
557
  readonly resolveAll: (profile: CredentialProfile, basePath: string) => Effect.Effect<Map<string, string>, ResolveError>;
@@ -486,6 +559,8 @@ declare interface CredentialResolverService {
486
559
 
487
560
  export declare type Credentials = typeof CredentialsSchema.Type;
488
561
 
562
+ export declare const CREDENTIALS_FILENAME = "reposets.credentials.toml";
563
+
489
564
  export declare const CredentialsSchema: Schema.Struct<{
490
565
  profiles: Schema.optionalWith<Schema.Record$<typeof Schema.String, Schema.Struct<{
491
566
  github_token: Schema.SchemaClass<string, string, never>;
@@ -527,7 +602,7 @@ export declare class GitHubClient extends GitHubClient_base {
527
602
 
528
603
  declare const GitHubClient_base: Context.TagClass<GitHubClient, "GitHubClient", GitHubClientService>;
529
604
 
530
- export declare function GitHubClientLive(token: string): Layer.Layer<GitHubClient>;
605
+ export declare function GitHubClientLive(token: string): Layer_2.Layer<GitHubClient>;
531
606
 
532
607
  declare interface GitHubClientService {
533
608
  readonly getOwnerType: (owner: string) => Effect.Effect<OwnerType, GitHubApiError>;
@@ -550,10 +625,20 @@ declare interface GitHubClientService {
550
625
  readonly deleteEnvironment: (owner: string, repo: string, name: string) => Effect.Effect<void, GitHubApiError>;
551
626
  readonly deleteEnvironmentSecret: (owner: string, repo: string, envName: string, name: string) => Effect.Effect<void, GitHubApiError>;
552
627
  readonly deleteEnvironmentVariable: (owner: string, repo: string, envName: string, name: string) => Effect.Effect<void, GitHubApiError>;
628
+ readonly getVulnerabilityAlerts: (owner: string, repo: string) => Effect.Effect<boolean, GitHubApiError>;
629
+ readonly setVulnerabilityAlerts: (owner: string, repo: string, enabled: boolean) => Effect.Effect<void, GitHubApiError>;
630
+ readonly getAutomatedSecurityFixes: (owner: string, repo: string) => Effect.Effect<boolean, GitHubApiError>;
631
+ readonly setAutomatedSecurityFixes: (owner: string, repo: string, enabled: boolean) => Effect.Effect<void, GitHubApiError>;
632
+ readonly getPrivateVulnerabilityReporting: (owner: string, repo: string) => Effect.Effect<boolean, GitHubApiError>;
633
+ readonly setPrivateVulnerabilityReporting: (owner: string, repo: string, enabled: boolean) => Effect.Effect<void, GitHubApiError>;
634
+ readonly updateCodeScanningDefaultSetup: (owner: string, repo: string, config: CodeScanningGroup) => Effect.Effect<void, GitHubApiError>;
635
+ readonly listRepoLanguages: (owner: string, repo: string) => Effect.Effect<ReadonlyArray<string>, GitHubApiError>;
636
+ readonly resolveTeamId: (org: string, slug: string) => Effect.Effect<number, GitHubApiError>;
637
+ readonly resolveRoleId: (org: string, name: string) => Effect.Effect<number, GitHubApiError>;
553
638
  }
554
639
 
555
640
  export declare function GitHubClientTest(): {
556
- layer: Layer.Layer<GitHubClient>;
641
+ layer: Layer_2.Layer<GitHubClient>;
557
642
  calls: () => RecordedCall[];
558
643
  };
559
644
 
@@ -576,6 +661,8 @@ export declare const GroupSchema: Schema.Struct<{
576
661
  environments: Schema.optional<Schema.Record$<typeof Schema.String, Schema.Array$<typeof Schema.String>>>;
577
662
  }>>;
578
663
  rulesets: Schema.optional<Schema.Array$<typeof Schema.String>>;
664
+ security: Schema.optional<Schema.Array$<typeof Schema.String>>;
665
+ code_scanning: Schema.optional<Schema.Array$<typeof Schema.String>>;
579
666
  cleanup: Schema.optional<Schema.Struct<{
580
667
  secrets: Schema.optionalWith<Schema.Struct<{
581
668
  actions: Schema.optionalWith<Schema.Union<[typeof Schema.Boolean, Schema.Struct<{
@@ -636,35 +723,31 @@ export declare const GroupSchema: Schema.Struct<{
636
723
  }>>;
637
724
  }>;
638
725
 
639
- /**
640
- * Load config using the ConfigFileService. When a --config flag is provided,
641
- * uses loadFrom with the resolved path. Otherwise uses discover to get both
642
- * the config value and the file path (for configDir derivation).
643
- *
644
- * Returns config and configDir where configDir is the directory containing
645
- * the config file.
646
- */
647
- export declare function loadConfigWithDir(configFile: ConfigFileService<Config>, configFlag: Option.Option<string>): Effect.Effect<{
648
- config: Config;
649
- configDir: string;
650
- }, XdgConfigError>;
651
-
652
726
  export declare type LogLevel = typeof LogLevelSchema.Type;
653
727
 
654
728
  export declare const LogLevelSchema: Schema.Literal<["silent", "info", "verbose", "debug"]>;
655
729
 
730
+ /**
731
+ * Creates a live Layer providing both config and credentials file services.
732
+ * When configFlag is Some and points to a directory, prepends StaticDir resolver.
733
+ * When configFlag is Some and points to a file, prepends ExplicitPath resolver.
734
+ * Always includes UpwardWalk + XdgConfigResolver as fallback resolvers.
735
+ * Passes validateConfigRefs as the validate callback on the config spec.
736
+ */
737
+ export declare function makeConfigFilesLive(configFlag: Option.Option<string>): Layer<AppDirs | ConfigFileService<any> | XdgResolver, never, FileSystem>;
738
+
656
739
  export declare class OnePasswordClient extends OnePasswordClient_base {
657
740
  }
658
741
 
659
742
  declare const OnePasswordClient_base: Context.TagClass<OnePasswordClient, "OnePasswordClient", OnePasswordClientService>;
660
743
 
661
- export declare const OnePasswordClientLive: Layer.Layer<OnePasswordClient, never, never>;
744
+ export declare const OnePasswordClientLive: Layer_2.Layer<OnePasswordClient, never, never>;
662
745
 
663
746
  declare interface OnePasswordClientService {
664
747
  readonly resolve: (reference: string, serviceAccountToken: string) => Effect.Effect<string, OnePasswordError>;
665
748
  }
666
749
 
667
- export declare function OnePasswordClientTest(stubs: Record<string, string>): Layer.Layer<OnePasswordClient>;
750
+ export declare function OnePasswordClientTest(stubs: Record<string, string>): Layer_2.Layer<OnePasswordClient>;
668
751
 
669
752
  export declare class OnePasswordError extends OnePasswordError_base<{
670
753
  readonly message: string;
@@ -682,7 +765,7 @@ export declare interface RecordedCall {
682
765
  args: Record<string, unknown>;
683
766
  }
684
767
 
685
- export declare const ReposetsConfigFile: Tag<ConfigFileService<{
768
+ export declare const ReposetsConfigFile: Tag<ConfigFileService< {
686
769
  readonly owner?: string | undefined;
687
770
  readonly log_level: "debug" | "info" | "silent" | "verbose";
688
771
  readonly settings: {
@@ -707,6 +790,24 @@ readonly merge_commit_title?: "MERGE_MESSAGE" | "PR_TITLE" | undefined;
707
790
  readonly merge_commit_message?: "BLANK" | "PR_BODY" | "PR_TITLE" | undefined;
708
791
  readonly delete_branch_on_merge?: boolean | undefined;
709
792
  readonly web_commit_signoff_required?: boolean | undefined;
793
+ readonly security_and_analysis?: {
794
+ readonly advanced_security?: "disabled" | "enabled" | undefined;
795
+ readonly code_security?: "disabled" | "enabled" | undefined;
796
+ readonly secret_scanning?: "disabled" | "enabled" | undefined;
797
+ readonly secret_scanning_push_protection?: "disabled" | "enabled" | undefined;
798
+ readonly secret_scanning_ai_detection?: "disabled" | "enabled" | undefined;
799
+ readonly secret_scanning_non_provider_patterns?: "disabled" | "enabled" | undefined;
800
+ readonly secret_scanning_delegated_alert_dismissal?: "disabled" | "enabled" | undefined;
801
+ readonly secret_scanning_delegated_bypass?: "disabled" | "enabled" | undefined;
802
+ readonly delegated_bypass_reviewers?: readonly ({
803
+ readonly team: string;
804
+ readonly mode?: "ALWAYS" | "EXEMPT" | undefined;
805
+ } | {
806
+ readonly role: string;
807
+ readonly mode?: "ALWAYS" | "EXEMPT" | undefined;
808
+ })[] | undefined;
809
+ readonly dependabot_security_updates?: "disabled" | "enabled" | undefined;
810
+ } | undefined;
710
811
  };
711
812
  };
712
813
  readonly secrets: {
@@ -937,6 +1038,23 @@ readonly type: "branch" | "tag";
937
1038
  }[] | undefined;
938
1039
  };
939
1040
  };
1041
+ readonly security: {
1042
+ readonly [x: string]: {
1043
+ readonly vulnerability_alerts?: boolean | undefined;
1044
+ readonly automated_security_fixes?: boolean | undefined;
1045
+ readonly private_vulnerability_reporting?: boolean | undefined;
1046
+ };
1047
+ };
1048
+ readonly code_scanning: {
1049
+ readonly [x: string]: {
1050
+ readonly state?: "configured" | "not-configured" | undefined;
1051
+ readonly languages?: readonly ("actions" | "c-cpp" | "csharp" | "go" | "java-kotlin" | "javascript-typescript" | "python" | "ruby" | "swift")[] | undefined;
1052
+ readonly query_suite?: "default" | "extended" | undefined;
1053
+ readonly threat_model?: "remote" | "remote_and_local" | undefined;
1054
+ readonly runner_type?: "labeled" | "standard" | undefined;
1055
+ readonly runner_label?: string | undefined;
1056
+ };
1057
+ };
940
1058
  readonly groups: {
941
1059
  readonly [x: string]: {
942
1060
  readonly owner?: string | undefined;
@@ -959,6 +1077,8 @@ readonly [x: string]: readonly string[];
959
1077
  } | undefined;
960
1078
  } | undefined;
961
1079
  readonly rulesets?: readonly string[] | undefined;
1080
+ readonly security?: readonly string[] | undefined;
1081
+ readonly code_scanning?: readonly string[] | undefined;
962
1082
  readonly cleanup?: {
963
1083
  readonly secrets: {
964
1084
  readonly actions: boolean | {
@@ -991,7 +1111,7 @@ readonly preserve: readonly string[];
991
1111
  } | undefined;
992
1112
  };
993
1113
  };
994
- }>, ConfigFileService<{
1114
+ }>, ConfigFileService< {
995
1115
  readonly owner?: string | undefined;
996
1116
  readonly log_level: "debug" | "info" | "silent" | "verbose";
997
1117
  readonly settings: {
@@ -1016,6 +1136,24 @@ readonly merge_commit_title?: "MERGE_MESSAGE" | "PR_TITLE" | undefined;
1016
1136
  readonly merge_commit_message?: "BLANK" | "PR_BODY" | "PR_TITLE" | undefined;
1017
1137
  readonly delete_branch_on_merge?: boolean | undefined;
1018
1138
  readonly web_commit_signoff_required?: boolean | undefined;
1139
+ readonly security_and_analysis?: {
1140
+ readonly advanced_security?: "disabled" | "enabled" | undefined;
1141
+ readonly code_security?: "disabled" | "enabled" | undefined;
1142
+ readonly secret_scanning?: "disabled" | "enabled" | undefined;
1143
+ readonly secret_scanning_push_protection?: "disabled" | "enabled" | undefined;
1144
+ readonly secret_scanning_ai_detection?: "disabled" | "enabled" | undefined;
1145
+ readonly secret_scanning_non_provider_patterns?: "disabled" | "enabled" | undefined;
1146
+ readonly secret_scanning_delegated_alert_dismissal?: "disabled" | "enabled" | undefined;
1147
+ readonly secret_scanning_delegated_bypass?: "disabled" | "enabled" | undefined;
1148
+ readonly delegated_bypass_reviewers?: readonly ({
1149
+ readonly team: string;
1150
+ readonly mode?: "ALWAYS" | "EXEMPT" | undefined;
1151
+ } | {
1152
+ readonly role: string;
1153
+ readonly mode?: "ALWAYS" | "EXEMPT" | undefined;
1154
+ })[] | undefined;
1155
+ readonly dependabot_security_updates?: "disabled" | "enabled" | undefined;
1156
+ } | undefined;
1019
1157
  };
1020
1158
  };
1021
1159
  readonly secrets: {
@@ -1246,6 +1384,23 @@ readonly type: "branch" | "tag";
1246
1384
  }[] | undefined;
1247
1385
  };
1248
1386
  };
1387
+ readonly security: {
1388
+ readonly [x: string]: {
1389
+ readonly vulnerability_alerts?: boolean | undefined;
1390
+ readonly automated_security_fixes?: boolean | undefined;
1391
+ readonly private_vulnerability_reporting?: boolean | undefined;
1392
+ };
1393
+ };
1394
+ readonly code_scanning: {
1395
+ readonly [x: string]: {
1396
+ readonly state?: "configured" | "not-configured" | undefined;
1397
+ readonly languages?: readonly ("actions" | "c-cpp" | "csharp" | "go" | "java-kotlin" | "javascript-typescript" | "python" | "ruby" | "swift")[] | undefined;
1398
+ readonly query_suite?: "default" | "extended" | undefined;
1399
+ readonly threat_model?: "remote" | "remote_and_local" | undefined;
1400
+ readonly runner_type?: "labeled" | "standard" | undefined;
1401
+ readonly runner_label?: string | undefined;
1402
+ };
1403
+ };
1249
1404
  readonly groups: {
1250
1405
  readonly [x: string]: {
1251
1406
  readonly owner?: string | undefined;
@@ -1268,6 +1423,8 @@ readonly [x: string]: readonly string[];
1268
1423
  } | undefined;
1269
1424
  } | undefined;
1270
1425
  readonly rulesets?: readonly string[] | undefined;
1426
+ readonly security?: readonly string[] | undefined;
1427
+ readonly code_scanning?: readonly string[] | undefined;
1271
1428
  readonly cleanup?: {
1272
1429
  readonly secrets: {
1273
1430
  readonly actions: boolean | {
@@ -1302,7 +1459,7 @@ readonly preserve: readonly string[];
1302
1459
  };
1303
1460
  }>>;
1304
1461
 
1305
- export declare const ReposetsCredentialsFile: Tag<ConfigFileService<{
1462
+ export declare const ReposetsCredentialsFile: Tag<ConfigFileService< {
1306
1463
  readonly profiles: {
1307
1464
  readonly [x: string]: {
1308
1465
  readonly github_token: string;
@@ -1322,7 +1479,7 @@ readonly [x: string]: unknown;
1322
1479
  } | undefined;
1323
1480
  };
1324
1481
  };
1325
- }>, ConfigFileService<{
1482
+ }>, ConfigFileService< {
1326
1483
  readonly profiles: {
1327
1484
  readonly [x: string]: {
1328
1485
  readonly github_token: string;
@@ -1344,12 +1501,6 @@ readonly [x: string]: unknown;
1344
1501
  };
1345
1502
  }>>;
1346
1503
 
1347
- /**
1348
- * Resolves a --config flag to a file path. If the flag points to a directory,
1349
- * appends the config filename. If omitted, returns undefined.
1350
- */
1351
- export declare function resolveConfigFlag(configFlag: Option.Option<string>): string | undefined;
1352
-
1353
1504
  export declare type ResolvedRef = typeof ResolvedRefSchema.Type;
1354
1505
 
1355
1506
  export declare const ResolvedRefSchema: Schema.Struct<{
@@ -1613,7 +1764,7 @@ export declare class SyncEngine extends SyncEngine_base {
1613
1764
 
1614
1765
  declare const SyncEngine_base: Context.TagClass<SyncEngine, "SyncEngine", SyncEngineService>;
1615
1766
 
1616
- export declare const SyncEngineLive: Layer.Layer<SyncEngine, never, CredentialResolver | GitHubClient | SyncLogger>;
1767
+ export declare const SyncEngineLive: Layer_2.Layer<SyncEngine, never, CredentialResolver | GitHubClient | SyncLogger>;
1617
1768
 
1618
1769
  declare interface SyncEngineService {
1619
1770
  readonly syncAll: (config: Config, credentials: Credentials, options: SyncOptions) => Effect.Effect<void, SyncError>;
@@ -1639,13 +1790,13 @@ export declare interface SyncLoggerConfig {
1639
1790
  readonly output?: Ref.Ref<string[]>;
1640
1791
  }
1641
1792
 
1642
- export declare function SyncLoggerLive(config: SyncLoggerConfig): Layer.Layer<SyncLogger>;
1793
+ export declare function SyncLoggerLive(config: SyncLoggerConfig): Layer_2.Layer<SyncLogger>;
1643
1794
 
1644
1795
  declare interface SyncLoggerService {
1645
1796
  readonly groupStart: (name: string, repoCount: number) => Effect.Effect<void>;
1646
1797
  readonly repoStart: (owner: string, repo: string) => Effect.Effect<void>;
1647
1798
  readonly repoSkip: (owner: string, repo: string, reason: string) => Effect.Effect<void>;
1648
- readonly syncSummary: (resource: "secret" | "variable" | "ruleset" | "environment", count: number, detail: string) => Effect.Effect<void>;
1799
+ readonly syncSummary: (resource: "secret" | "variable" | "ruleset" | "environment" | "security feature" | "code scanning", count: number, detail: string) => Effect.Effect<void>;
1649
1800
  readonly settingsApplied: () => Effect.Effect<void>;
1650
1801
  readonly cleanupSummary: (resource: string, count: number, names: string[]) => Effect.Effect<void>;
1651
1802
  readonly syncOperation: (verb: "sync" | "apply" | "delete" | "skip", resource: string, name: string, detail?: string, source?: string) => Effect.Effect<void>;
@@ -1661,6 +1812,15 @@ declare interface SyncOptions {
1661
1812
  readonly configDir: string;
1662
1813
  }
1663
1814
 
1815
+ /**
1816
+ * Validates all internal cross-references in a parsed config. Checks that
1817
+ * every group's settings, secrets, variables, rulesets, and environments
1818
+ * references point to defined top-level sections, and that environment-scoped
1819
+ * secret/variable groups reference defined environments. Collects ALL errors
1820
+ * into a single ConfigError.
1821
+ */
1822
+ export declare function validateConfigRefs(config: Config): Effect.Effect<Config, XdgConfigError>;
1823
+
1664
1824
  export declare type VariableGroup = typeof VariableGroupSchema.Type;
1665
1825
 
1666
1826
  export declare const VariableGroupSchema: Schema.Union<[Schema.Struct<{
package/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { BypassActorSchema, CleanupSchema, CleanupScopeSchema, ConfigFilesLive, ConfigSchema, CredentialProfileSchema, CredentialResolver, CredentialResolverLive, CredentialsSchema, GitHubApiError, GitHubClient, GitHubClientLive, GitHubClientTest, GroupSchema, LogLevelSchema, OnePasswordClient, OnePasswordClientLive, OnePasswordClientTest, OnePasswordError, ReposetsConfigFile, ReposetsCredentialsFile, ResolveError, ResolveSectionSchema, ResolvedRefSchema, RulesetSchema, SecretGroupSchema, SyncEngine, SyncEngineLive, SyncError, SyncLogger, SyncLoggerLive, VariableGroupSchema, buildRulesetPayload, encryptSecret, loadConfigWithDir, resolveConfigFlag } from "./500.js";
1
+ export { BypassActorSchema, CONFIG_FILENAME, CREDENTIALS_FILENAME, CleanupSchema, CleanupScopeSchema, ConfigFilesLive, ConfigSchema, CredentialProfileSchema, CredentialResolver, CredentialResolverLive, CredentialsSchema, GitHubApiError, GitHubClient, GitHubClientLive, GitHubClientTest, GroupSchema, LogLevelSchema, OnePasswordClient, OnePasswordClientLive, OnePasswordClientTest, OnePasswordError, ReposetsConfigFile, ReposetsCredentialsFile, ResolveError, ResolveSectionSchema, ResolvedRefSchema, RulesetSchema, SecretGroupSchema, SyncEngine, SyncEngineLive, SyncError, SyncLogger, SyncLoggerLive, VariableGroupSchema, buildRulesetPayload, encryptSecret, makeConfigFilesLive, validateConfigRefs } from "./500.js";
2
2
  export { AppDirs, ConfigError as XdgConfigError, ConfigFile } from "xdg-effect";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reposets",
3
- "version": "0.2.1",
3
+ "version": "0.4.0",
4
4
  "private": false,
5
5
  "description": "CLI tool to sync GitHub repo settings, secrets and rulesets across personal repositories",
6
6
  "keywords": [
@@ -47,14 +47,14 @@
47
47
  "dependencies": {
48
48
  "@1password/sdk": "^0.4.0",
49
49
  "@effect/cli": "^0.75.1",
50
- "@effect/platform": "^0.96.0",
50
+ "@effect/platform": "^0.96.1",
51
51
  "@effect/platform-node": "^0.106.0",
52
52
  "@octokit/rest": "^22.0.1",
53
53
  "blakejs": "^1.2.1",
54
54
  "effect": "^3.21.1",
55
55
  "smol-toml": ">=1.6.1",
56
56
  "tweetnacl": "^1.0.3",
57
- "xdg-effect": "^0.3.3"
57
+ "xdg-effect": "^1.0.0"
58
58
  },
59
59
  "engines": {
60
60
  "node": ">=20.0.0"
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.58.5"
8
+ "packageVersion": "7.58.7"
9
9
  }
10
10
  ]
11
11
  }