@paklo/core 0.8.0 → 0.10.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.
@@ -1,4 +1,4 @@
1
- import { p as SecurityVulnerability } from "./index-BWftXTYB.mjs";
1
+ import { p as SecurityVulnerability } from "./index-BfwWezjJ.mjs";
2
2
  import { z } from "zod";
3
3
  import { Hono } from "hono";
4
4
 
@@ -114,10 +114,10 @@ declare const DependabotAllowConditionSchema: z.ZodObject<{
114
114
  'dependency-name': z.ZodOptional<z.ZodString>;
115
115
  'dependency-type': z.ZodOptional<z.ZodEnum<{
116
116
  production: "production";
117
+ all: "all";
118
+ development: "development";
117
119
  direct: "direct";
118
120
  indirect: "indirect";
119
- development: "development";
120
- all: "all";
121
121
  }>>;
122
122
  'update-type': z.ZodOptional<z.ZodEnum<{
123
123
  all: "all";
@@ -228,10 +228,10 @@ declare const PackageEcosystemSchema: z.ZodEnum<{
228
228
  }>;
229
229
  type PackageEcosystem = z.infer<typeof PackageEcosystemSchema>;
230
230
  declare const VersioningStrategySchema: z.ZodEnum<{
231
+ "lockfile-only": "lockfile-only";
231
232
  auto: "auto";
232
233
  increase: "increase";
233
234
  "increase-if-necessary": "increase-if-necessary";
234
- "lockfile-only": "lockfile-only";
235
235
  widen: "widen";
236
236
  }>;
237
237
  type VersioningStrategy = z.infer<typeof VersioningStrategySchema>;
@@ -279,10 +279,10 @@ declare const DependabotUpdateSchema: z.ZodPipe<z.ZodObject<{
279
279
  'dependency-name': z.ZodOptional<z.ZodString>;
280
280
  'dependency-type': z.ZodOptional<z.ZodEnum<{
281
281
  production: "production";
282
+ all: "all";
283
+ development: "development";
282
284
  direct: "direct";
283
285
  indirect: "indirect";
284
- development: "development";
285
- all: "all";
286
286
  }>>;
287
287
  'update-type': z.ZodOptional<z.ZodEnum<{
288
288
  all: "all";
@@ -380,10 +380,10 @@ declare const DependabotUpdateSchema: z.ZodPipe<z.ZodObject<{
380
380
  'target-branch': z.ZodOptional<z.ZodString>;
381
381
  vendor: z.ZodOptional<z.ZodBoolean>;
382
382
  'versioning-strategy': z.ZodOptional<z.ZodEnum<{
383
+ "lockfile-only": "lockfile-only";
383
384
  auto: "auto";
384
385
  increase: "increase";
385
386
  "increase-if-necessary": "increase-if-necessary";
386
- "lockfile-only": "lockfile-only";
387
387
  widen: "widen";
388
388
  }>>;
389
389
  patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -402,7 +402,7 @@ declare const DependabotUpdateSchema: z.ZodPipe<z.ZodObject<{
402
402
  'exclude-paths'?: string[] | undefined;
403
403
  allow?: {
404
404
  'dependency-name'?: string | undefined;
405
- 'dependency-type'?: "production" | "direct" | "indirect" | "development" | "all" | undefined;
405
+ 'dependency-type'?: "production" | "all" | "development" | "direct" | "indirect" | undefined;
406
406
  'update-type'?: "all" | "security" | undefined;
407
407
  }[] | undefined;
408
408
  assignees?: string[] | undefined;
@@ -443,7 +443,7 @@ declare const DependabotUpdateSchema: z.ZodPipe<z.ZodObject<{
443
443
  registries?: string[] | undefined;
444
444
  'target-branch'?: string | undefined;
445
445
  vendor?: boolean | undefined;
446
- 'versioning-strategy'?: "auto" | "increase" | "increase-if-necessary" | "lockfile-only" | "widen" | undefined;
446
+ 'versioning-strategy'?: "lockfile-only" | "auto" | "increase" | "increase-if-necessary" | "widen" | undefined;
447
447
  patterns?: string[] | undefined;
448
448
  'multi-ecosystem-group'?: string | undefined;
449
449
  }, {
@@ -460,7 +460,7 @@ declare const DependabotUpdateSchema: z.ZodPipe<z.ZodObject<{
460
460
  'exclude-paths'?: string[] | undefined;
461
461
  allow?: {
462
462
  'dependency-name'?: string | undefined;
463
- 'dependency-type'?: "production" | "direct" | "indirect" | "development" | "all" | undefined;
463
+ 'dependency-type'?: "production" | "all" | "development" | "direct" | "indirect" | undefined;
464
464
  'update-type'?: "all" | "security" | undefined;
465
465
  }[] | undefined;
466
466
  assignees?: string[] | undefined;
@@ -501,7 +501,7 @@ declare const DependabotUpdateSchema: z.ZodPipe<z.ZodObject<{
501
501
  registries?: string[] | undefined;
502
502
  'target-branch'?: string | undefined;
503
503
  vendor?: boolean | undefined;
504
- 'versioning-strategy'?: "auto" | "increase" | "increase-if-necessary" | "lockfile-only" | "widen" | undefined;
504
+ 'versioning-strategy'?: "lockfile-only" | "auto" | "increase" | "increase-if-necessary" | "widen" | undefined;
505
505
  patterns?: string[] | undefined;
506
506
  'multi-ecosystem-group'?: string | undefined;
507
507
  }>>;
@@ -655,10 +655,10 @@ declare const DependabotConfigSchema: z.ZodPipe<z.ZodObject<{
655
655
  'dependency-name': z.ZodOptional<z.ZodString>;
656
656
  'dependency-type': z.ZodOptional<z.ZodEnum<{
657
657
  production: "production";
658
+ all: "all";
659
+ development: "development";
658
660
  direct: "direct";
659
661
  indirect: "indirect";
660
- development: "development";
661
- all: "all";
662
662
  }>>;
663
663
  'update-type': z.ZodOptional<z.ZodEnum<{
664
664
  all: "all";
@@ -756,10 +756,10 @@ declare const DependabotConfigSchema: z.ZodPipe<z.ZodObject<{
756
756
  'target-branch': z.ZodOptional<z.ZodString>;
757
757
  vendor: z.ZodOptional<z.ZodBoolean>;
758
758
  'versioning-strategy': z.ZodOptional<z.ZodEnum<{
759
+ "lockfile-only": "lockfile-only";
759
760
  auto: "auto";
760
761
  increase: "increase";
761
762
  "increase-if-necessary": "increase-if-necessary";
762
- "lockfile-only": "lockfile-only";
763
763
  widen: "widen";
764
764
  }>>;
765
765
  patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -778,7 +778,7 @@ declare const DependabotConfigSchema: z.ZodPipe<z.ZodObject<{
778
778
  'exclude-paths'?: string[] | undefined;
779
779
  allow?: {
780
780
  'dependency-name'?: string | undefined;
781
- 'dependency-type'?: "production" | "direct" | "indirect" | "development" | "all" | undefined;
781
+ 'dependency-type'?: "production" | "all" | "development" | "direct" | "indirect" | undefined;
782
782
  'update-type'?: "all" | "security" | undefined;
783
783
  }[] | undefined;
784
784
  assignees?: string[] | undefined;
@@ -819,7 +819,7 @@ declare const DependabotConfigSchema: z.ZodPipe<z.ZodObject<{
819
819
  registries?: string[] | undefined;
820
820
  'target-branch'?: string | undefined;
821
821
  vendor?: boolean | undefined;
822
- 'versioning-strategy'?: "auto" | "increase" | "increase-if-necessary" | "lockfile-only" | "widen" | undefined;
822
+ 'versioning-strategy'?: "lockfile-only" | "auto" | "increase" | "increase-if-necessary" | "widen" | undefined;
823
823
  patterns?: string[] | undefined;
824
824
  'multi-ecosystem-group'?: string | undefined;
825
825
  }, {
@@ -836,7 +836,7 @@ declare const DependabotConfigSchema: z.ZodPipe<z.ZodObject<{
836
836
  'exclude-paths'?: string[] | undefined;
837
837
  allow?: {
838
838
  'dependency-name'?: string | undefined;
839
- 'dependency-type'?: "production" | "direct" | "indirect" | "development" | "all" | undefined;
839
+ 'dependency-type'?: "production" | "all" | "development" | "direct" | "indirect" | undefined;
840
840
  'update-type'?: "all" | "security" | undefined;
841
841
  }[] | undefined;
842
842
  assignees?: string[] | undefined;
@@ -877,7 +877,7 @@ declare const DependabotConfigSchema: z.ZodPipe<z.ZodObject<{
877
877
  registries?: string[] | undefined;
878
878
  'target-branch'?: string | undefined;
879
879
  vendor?: boolean | undefined;
880
- 'versioning-strategy'?: "auto" | "increase" | "increase-if-necessary" | "lockfile-only" | "widen" | undefined;
880
+ 'versioning-strategy'?: "lockfile-only" | "auto" | "increase" | "increase-if-necessary" | "widen" | undefined;
881
881
  patterns?: string[] | undefined;
882
882
  'multi-ecosystem-group'?: string | undefined;
883
883
  }>>>;
@@ -966,7 +966,7 @@ declare const DependabotConfigSchema: z.ZodPipe<z.ZodObject<{
966
966
  'exclude-paths'?: string[] | undefined;
967
967
  allow?: {
968
968
  'dependency-name'?: string | undefined;
969
- 'dependency-type'?: "production" | "direct" | "indirect" | "development" | "all" | undefined;
969
+ 'dependency-type'?: "production" | "all" | "development" | "direct" | "indirect" | undefined;
970
970
  'update-type'?: "all" | "security" | undefined;
971
971
  }[] | undefined;
972
972
  assignees?: string[] | undefined;
@@ -1007,7 +1007,7 @@ declare const DependabotConfigSchema: z.ZodPipe<z.ZodObject<{
1007
1007
  registries?: string[] | undefined;
1008
1008
  'target-branch'?: string | undefined;
1009
1009
  vendor?: boolean | undefined;
1010
- 'versioning-strategy'?: "auto" | "increase" | "increase-if-necessary" | "lockfile-only" | "widen" | undefined;
1010
+ 'versioning-strategy'?: "lockfile-only" | "auto" | "increase" | "increase-if-necessary" | "widen" | undefined;
1011
1011
  patterns?: string[] | undefined;
1012
1012
  'multi-ecosystem-group'?: string | undefined;
1013
1013
  }[];
@@ -1067,7 +1067,7 @@ declare const DependabotConfigSchema: z.ZodPipe<z.ZodObject<{
1067
1067
  'exclude-paths'?: string[] | undefined;
1068
1068
  allow?: {
1069
1069
  'dependency-name'?: string | undefined;
1070
- 'dependency-type'?: "production" | "direct" | "indirect" | "development" | "all" | undefined;
1070
+ 'dependency-type'?: "production" | "all" | "development" | "direct" | "indirect" | undefined;
1071
1071
  'update-type'?: "all" | "security" | undefined;
1072
1072
  }[] | undefined;
1073
1073
  assignees?: string[] | undefined;
@@ -1108,7 +1108,7 @@ declare const DependabotConfigSchema: z.ZodPipe<z.ZodObject<{
1108
1108
  registries?: string[] | undefined;
1109
1109
  'target-branch'?: string | undefined;
1110
1110
  vendor?: boolean | undefined;
1111
- 'versioning-strategy'?: "auto" | "increase" | "increase-if-necessary" | "lockfile-only" | "widen" | undefined;
1111
+ 'versioning-strategy'?: "lockfile-only" | "auto" | "increase" | "increase-if-necessary" | "widen" | undefined;
1112
1112
  patterns?: string[] | undefined;
1113
1113
  'multi-ecosystem-group'?: string | undefined;
1114
1114
  }[];
@@ -1157,11 +1157,11 @@ type DependabotConfig = z.infer<typeof DependabotConfigSchema>;
1157
1157
  declare function parseUpdates(config: DependabotConfig, configPath: string): DependabotUpdate[];
1158
1158
  declare function parseRegistries(config: DependabotConfig, variableFinder: VariableFinderFn): Promise<Record<string, DependabotRegistry>>;
1159
1159
  declare function validateConfiguration(updates: DependabotUpdate[], registries: Record<string, DependabotRegistry>): void;
1160
- /**
1161
- * Possible paths to the dependabot config file.
1162
- * Remember to prefix with a forward slash when querying API endpoints or where necessary.
1163
- */
1164
- declare const POSSIBLE_CONFIG_FILE_PATHS: string[];
1160
+ /** Possible paths to the dependabot config file for GitHub. */
1161
+ declare const CONFIG_FILE_NAMES: string[];
1162
+ declare const CONFIG_FILE_PATHS_GITHUB: string[];
1163
+ /** Possible paths to the dependabot config file for Azure. */
1164
+ declare const CONFIG_FILE_PATHS_AZURE: string[];
1165
1165
  /**
1166
1166
  * Parse the contents of a dependabot config YAML file
1167
1167
  * @returns {DependabotConfig} config - the dependabot configuration
@@ -1194,15 +1194,15 @@ declare const DependabotProxyConfigSchema: z.ZodObject<{
1194
1194
  type DependabotProxyConfig = z.infer<typeof DependabotProxyConfigSchema>;
1195
1195
  declare const DependabotSourceProviderSchema: z.ZodEnum<{
1196
1196
  azure: "azure";
1197
- gitlab: "gitlab";
1198
1197
  bitbucket: "bitbucket";
1198
+ gitlab: "gitlab";
1199
1199
  }>;
1200
1200
  type DependabotSourceProvider = z.infer<typeof DependabotSourceProviderSchema>;
1201
1201
  declare const DependabotSourceSchema: z.ZodObject<{
1202
1202
  provider: z.ZodEnum<{
1203
1203
  azure: "azure";
1204
- gitlab: "gitlab";
1205
1204
  bitbucket: "bitbucket";
1205
+ gitlab: "gitlab";
1206
1206
  }>;
1207
1207
  repo: z.ZodString;
1208
1208
  directory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -1350,6 +1350,7 @@ declare const DependabotPackageManagerSchema: z.ZodEnum<{
1350
1350
  opentofu: "opentofu";
1351
1351
  }>;
1352
1352
  type DependabotPackageManager = z.infer<typeof DependabotPackageManagerSchema>;
1353
+ declare const DEPENDABOT_COMMANDS: readonly ["graph", "version", "recreate"];
1353
1354
  declare const DependabotCommandSchema: z.ZodEnum<{
1354
1355
  version: "version";
1355
1356
  graph: "graph";
@@ -1450,8 +1451,8 @@ declare const DependabotJobConfigSchema: z.ZodObject<{
1450
1451
  source: z.ZodObject<{
1451
1452
  provider: z.ZodEnum<{
1452
1453
  azure: "azure";
1453
- gitlab: "gitlab";
1454
1454
  bitbucket: "bitbucket";
1455
+ gitlab: "gitlab";
1455
1456
  }>;
1456
1457
  repo: z.ZodString;
1457
1458
  directory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -1582,8 +1583,8 @@ declare const DependabotJobFileSchema: z.ZodObject<{
1582
1583
  source: z.ZodObject<{
1583
1584
  provider: z.ZodEnum<{
1584
1585
  azure: "azure";
1585
- gitlab: "gitlab";
1586
1586
  bitbucket: "bitbucket";
1587
+ gitlab: "gitlab";
1587
1588
  }>;
1588
1589
  repo: z.ZodString;
1589
1590
  directory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -1631,9 +1632,38 @@ type FileFetcherInput = {
1631
1632
  type FileUpdaterInput = FetchedFiles & {
1632
1633
  job: DependabotJobConfig;
1633
1634
  };
1635
+ declare const DependabotPersistedPrSchema: z.ZodUnion<[z.ZodArray<z.ZodObject<{
1636
+ 'dependency-name': z.ZodString;
1637
+ 'dependency-version': z.ZodOptional<z.ZodNullable<z.ZodString>>;
1638
+ directory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1639
+ removed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1640
+ }, z.core.$strip>>, z.ZodObject<{
1641
+ 'dependency-group-name': z.ZodString;
1642
+ dependencies: z.ZodArray<z.ZodObject<{
1643
+ 'dependency-name': z.ZodString;
1644
+ 'dependency-version': z.ZodOptional<z.ZodNullable<z.ZodString>>;
1645
+ directory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1646
+ removed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1647
+ }, z.core.$strip>>;
1648
+ }, z.core.$strip>]>;
1649
+ type DependabotPersistedPr = z.infer<typeof DependabotPersistedPrSchema>;
1634
1650
  //#endregion
1635
1651
  //#region src/dependabot/branch-name.d.ts
1636
- declare function getBranchNameForUpdate(packageEcosystem: PackageEcosystem, targetBranchName: string | undefined, directory: string | undefined, dependencyGroupName: string | undefined, dependencies: DependabotExistingPR[], separator?: string): string;
1652
+ declare function getBranchNameForUpdate({
1653
+ packageEcosystem,
1654
+ targetBranchName,
1655
+ directory,
1656
+ dependencyGroupName,
1657
+ dependencies,
1658
+ separator
1659
+ }: {
1660
+ packageEcosystem: PackageEcosystem;
1661
+ targetBranchName?: string;
1662
+ directory?: string;
1663
+ dependencyGroupName?: string;
1664
+ dependencies: DependabotExistingPR[];
1665
+ separator?: string;
1666
+ }): string;
1637
1667
  declare function sanitizeRef(refParts: (string | undefined)[], separator: string): string;
1638
1668
  //#endregion
1639
1669
  //#region src/dependabot/directory-key.d.ts
@@ -1759,7 +1789,7 @@ declare class DependabotJobBuilder {
1759
1789
  id,
1760
1790
  command
1761
1791
  }: {
1762
- id?: string;
1792
+ id: string;
1763
1793
  command: DependabotJobConfig['command'];
1764
1794
  }): DependabotJobBuilderOutput;
1765
1795
  /**
@@ -1773,11 +1803,11 @@ declare class DependabotJobBuilder {
1773
1803
  pullRequestToUpdate,
1774
1804
  securityVulnerabilities
1775
1805
  }: {
1776
- id?: string;
1806
+ id: string;
1777
1807
  command: DependabotJobConfig['command'];
1778
1808
  dependencyNamesToUpdate?: string[];
1779
- existingPullRequests: (DependabotExistingPR[] | DependabotExistingGroupPR)[];
1780
- pullRequestToUpdate?: DependabotExistingPR[] | DependabotExistingGroupPR;
1809
+ existingPullRequests: DependabotPersistedPr[];
1810
+ pullRequestToUpdate?: DependabotPersistedPr;
1781
1811
  securityVulnerabilities?: SecurityVulnerability[];
1782
1812
  }): DependabotJobBuilderOutput;
1783
1813
  }
@@ -1802,7 +1832,6 @@ declare function mapCredentials({
1802
1832
  githubToken?: string;
1803
1833
  registries?: Record<string, DependabotRegistry>;
1804
1834
  }): DependabotCredential[];
1805
- declare function makeRandomJobId(): string;
1806
1835
  //#endregion
1807
1836
  //#region src/dependabot/server.d.ts
1808
1837
  declare const DependabotRequestTypeSchema: z.ZodEnum<{
@@ -1862,9 +1891,9 @@ declare const DependabotRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1862
1891
  directory: z.ZodString;
1863
1892
  name: z.ZodString;
1864
1893
  operation: z.ZodEnum<{
1894
+ delete: "delete";
1865
1895
  update: "update";
1866
1896
  create: "create";
1867
- delete: "delete";
1868
1897
  }>;
1869
1898
  support_file: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1870
1899
  vendored_file: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
@@ -1899,9 +1928,9 @@ declare const DependabotRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1899
1928
  directory: z.ZodString;
1900
1929
  name: z.ZodString;
1901
1930
  operation: z.ZodEnum<{
1931
+ delete: "delete";
1902
1932
  update: "update";
1903
1933
  create: "create";
1904
- delete: "delete";
1905
1934
  }>;
1906
1935
  support_file: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1907
1936
  vendored_file: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
@@ -1937,6 +1966,7 @@ declare const DependabotRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1937
1966
  data: z.ZodObject<{
1938
1967
  'error-type': z.ZodString;
1939
1968
  'error-details': z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
1969
+ unknown: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1940
1970
  }, z.core.$strip>;
1941
1971
  }, z.core.$strip>, z.ZodObject<{
1942
1972
  type: z.ZodLiteral<"record_update_job_warning">;
@@ -1950,6 +1980,7 @@ declare const DependabotRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1950
1980
  data: z.ZodObject<{
1951
1981
  'error-type': z.ZodString;
1952
1982
  'error-details': z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
1983
+ unknown: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1953
1984
  }, z.core.$strip>;
1954
1985
  }, z.core.$strip>, z.ZodObject<{
1955
1986
  type: z.ZodLiteral<"mark_as_processed">;
@@ -2046,8 +2077,8 @@ declare const DependabotRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2046
2077
  indirect: "indirect";
2047
2078
  }>;
2048
2079
  scope: z.ZodEnum<{
2049
- runtime: "runtime";
2050
2080
  development: "development";
2081
+ runtime: "runtime";
2051
2082
  }>;
2052
2083
  dependencies: z.ZodArray<z.ZodObject<{
2053
2084
  name: z.ZodString;
@@ -2261,9 +2292,9 @@ declare const DependabotDependencyFileSchema: z.ZodObject<{
2261
2292
  directory: z.ZodString;
2262
2293
  name: z.ZodString;
2263
2294
  operation: z.ZodEnum<{
2295
+ delete: "delete";
2264
2296
  update: "update";
2265
2297
  create: "create";
2266
- delete: "delete";
2267
2298
  }>;
2268
2299
  support_file: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
2269
2300
  vendored_file: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
@@ -2365,8 +2396,8 @@ declare const DependabotDependencySubmissionSchema: z.ZodObject<{
2365
2396
  indirect: "indirect";
2366
2397
  }>;
2367
2398
  scope: z.ZodEnum<{
2368
- runtime: "runtime";
2369
2399
  development: "development";
2400
+ runtime: "runtime";
2370
2401
  }>;
2371
2402
  dependencies: z.ZodArray<z.ZodObject<{
2372
2403
  name: z.ZodString;
@@ -2435,9 +2466,9 @@ declare const DependabotCreatePullRequestSchema: z.ZodObject<{
2435
2466
  directory: z.ZodString;
2436
2467
  name: z.ZodString;
2437
2468
  operation: z.ZodEnum<{
2469
+ delete: "delete";
2438
2470
  update: "update";
2439
2471
  create: "create";
2440
- delete: "delete";
2441
2472
  }>;
2442
2473
  support_file: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
2443
2474
  vendored_file: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
@@ -2471,9 +2502,9 @@ declare const DependabotUpdatePullRequestSchema: z.ZodObject<{
2471
2502
  directory: z.ZodString;
2472
2503
  name: z.ZodString;
2473
2504
  operation: z.ZodEnum<{
2505
+ delete: "delete";
2474
2506
  update: "update";
2475
2507
  create: "create";
2476
- delete: "delete";
2477
2508
  }>;
2478
2509
  support_file: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
2479
2510
  vendored_file: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
@@ -2516,9 +2547,16 @@ declare const DependabotMarkAsProcessedSchema: z.ZodObject<{
2516
2547
  'base-commit-sha': z.ZodOptional<z.ZodNullable<z.ZodString>>;
2517
2548
  }, z.core.$strip>;
2518
2549
  type DependabotMarkAsProcessed = z.infer<typeof DependabotMarkAsProcessedSchema>;
2550
+ declare const DependabotJobErrorSchema: z.ZodObject<{
2551
+ 'error-type': z.ZodString;
2552
+ 'error-details': z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
2553
+ unknown: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
2554
+ }, z.core.$strip>;
2555
+ type DependabotJobError = z.infer<typeof DependabotJobErrorSchema>;
2519
2556
  declare const DependabotRecordUpdateJobErrorSchema: z.ZodObject<{
2520
2557
  'error-type': z.ZodString;
2521
2558
  'error-details': z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
2559
+ unknown: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
2522
2560
  }, z.core.$strip>;
2523
2561
  type DependabotRecordUpdateJobError = z.infer<typeof DependabotRecordUpdateJobErrorSchema>;
2524
2562
  declare const DependabotRecordUpdateJobWarningSchema: z.ZodObject<{
@@ -2530,6 +2568,7 @@ type DependabotRecordUpdateJobWarning = z.infer<typeof DependabotRecordUpdateJob
2530
2568
  declare const DependabotRecordUpdateJobUnknownErrorSchema: z.ZodObject<{
2531
2569
  'error-type': z.ZodString;
2532
2570
  'error-details': z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
2571
+ unknown: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
2533
2572
  }, z.core.$strip>;
2534
2573
  type DependabotRecordUpdateJobUnknownError = z.infer<typeof DependabotRecordUpdateJobUnknownErrorSchema>;
2535
2574
  declare const DependabotRecordEcosystemVersionsSchema: z.ZodObject<{
@@ -2650,5 +2689,25 @@ declare const DependabotMetricSchema: z.ZodObject<{
2650
2689
  }, z.core.$strip>;
2651
2690
  type DependabotMetric = z.infer<typeof DependabotMetricSchema>;
2652
2691
  //#endregion
2653
- export { mapPackageEcosystemToPackageManager as $, FileUpdaterInput as $t, DependabotRecordUpdateJobUnknownErrorSchema as A, VariableFinderFn as An, DependabotGroupJobSchema as At, DependabotRequestType as B, DependabotProxyConfigSchema as Bt, DependabotRecordEcosystemMeta as C, PackageEcosystemSchema as Cn, DependabotExistingGroupPR as Ct, DependabotRecordUpdateJobError as D, parseRegistries as Dn, DependabotExperiments as Dt, DependabotRecordEcosystemVersionsSchema as E, parseDependabotConfig as En, DependabotExistingPRSchema as Et, DependabotUpdatePullRequest as F, GitAuthor as Fn, DependabotJobFile as Ft, DependabotJobBuilderOutput as G, DependabotSecurityAdvisory as Gt, DependabotTokenType as H, DependabotRequirementSchema as Ht, DependabotUpdatePullRequestSchema as I, DependabotJobFileSchema as It, mapAllowedUpdatesFromDependabotConfigToJobConfig as J, DependabotSourceProvider as Jt, DependabotSourceInfo as K, DependabotSecurityAdvisorySchema as Kt, CreateApiServerAppOptions as L, DependabotPackageManager as Lt, DependabotRecordUpdateJobWarningSchema as M, extractPlaceholder as Mn, DependabotGroupRuleJobSchema as Mt, DependabotUpdateDependencyList as N, DEPENDABOT_DEFAULT_AUTHOR_EMAIL as Nn, DependabotJobConfig as Nt, DependabotRecordUpdateJobErrorSchema as O, parseUpdates as On, DependabotExperimentsSchema as Ot, DependabotUpdateDependencyListSchema as P, DEPENDABOT_DEFAULT_AUTHOR_NAME as Pn, DependabotJobConfigSchema as Pt, mapIgnoreConditionsFromDependabotConfigToJobConfig as Q, FileFetcherInput as Qt, DependabotRequest as R, DependabotPackageManagerSchema as Rt, DependabotRecordCooldownMetaSchema as S, PackageEcosystem as Sn, DependabotDependencySchema as St, DependabotRecordEcosystemVersions as T, VersioningStrategySchema as Tn, DependabotExistingPR as Tt, createApiServerApp as U, DependabotRequirementSource as Ut, DependabotRequestTypeSchema as V, DependabotRequirement as Vt, DependabotJobBuilder as W, DependabotRequirementSourceSchema as Wt, mapExperiments as X, DependabotSourceSchema as Xt, mapCredentials as Y, DependabotSourceProviderSchema as Yt, mapGroupsFromDependabotConfigToJobConfig as Z, FetchedFiles as Zt, DependabotMarkAsProcessed as _, DependabotSchedule as _n, DependabotCondition as _t, DependabotCreatePullRequest as a, DependabotConfigSchema as an, setExperiment as at, DependabotMetricSchema as b, DependabotUpdateSchema as bn, DependabotCredentialSchema as bt, DependabotDependencyFileSchema as c, DependabotGroup as cn, sanitizeRef as ct, DependabotEcosystemMeta as d, DependabotIgnoreConditionSchema as dn, DependabotAllowed as dt, DependabotAllowCondition as en, mapSecurityAdvisories as et, DependabotEcosystemMetaSchema as f, DependabotMultiEcosystemGroup as fn, DependabotAllowedSchema as ft, DependabotIncrementMetricSchema as g, DependabotRegistrySchema as gn, DependabotCommitOptionsSchema as gt, DependabotIncrementMetric as h, DependabotRegistry as hn, DependabotCommitOptions as ht, DependabotClosePullRequestSchema as i, DependabotConfig as in, parseExperiments as it, DependabotRecordUpdateJobWarning as j, convertPlaceholder as jn, DependabotGroupRuleJob as jt, DependabotRecordUpdateJobUnknownError as k, validateConfiguration as kn, DependabotGroupJob as kt, DependabotDependencySubmission as l, DependabotGroupSchema as ln, CertificateAuthority as lt, DependabotEcosystemVersionManagerSchema as m, DependabotPullRequestBranchName as mn, DependabotCommandSchema as mt, DependabotClosePullRequestReason as n, DependabotCommitMessage as nn, mapVersionStrategyToRequirementsUpdateStrategy as nt, DependabotCreatePullRequestSchema as o, DependabotCooldown as on, makeDirectoryKey as ot, DependabotEcosystemVersionManager as p, DependabotMultiEcosystemGroupSchema as pn, DependabotCommand as pt, makeRandomJobId as q, DependabotSource as qt, DependabotClosePullRequestReasonEnum as r, DependabotCommitMessageSchema as rn, DEFAULT_EXPERIMENTS as rt, DependabotDependencyFile as s, DependabotCooldownSchema as sn, getBranchNameForUpdate as st, DependabotClosePullRequest as t, DependabotAllowConditionSchema as tn, mapSourceFromDependabotConfigToJobConfig as tt, DependabotDependencySubmissionSchema as u, DependabotIgnoreCondition as un, CertificateAuthoritySchema as ut, DependabotMarkAsProcessedSchema as v, DependabotScheduleSchema as vn, DependabotConditionSchema as vt, DependabotRecordEcosystemMetaSchema as w, VersioningStrategy as wn, DependabotExistingGroupPRSchema as wt, DependabotRecordCooldownMeta as x, POSSIBLE_CONFIG_FILE_PATHS as xn, DependabotDependency as xt, DependabotMetric as y, DependabotUpdate as yn, DependabotCredential as yt, DependabotRequestSchema as z, DependabotProxyConfig as zt };
2654
- //# sourceMappingURL=index-bwD11mTZ.d.mts.map
2692
+ //#region src/dependabot/utils.d.ts
2693
+ declare function normalizeFilePath(path: string): string;
2694
+ declare function normalizeBranchName(branch: string): string;
2695
+ declare function normalizeBranchName(branch?: string): string | undefined;
2696
+ declare function getDependencyNames(dependencies: DependabotPersistedPr): string[];
2697
+ declare function areEqual(a: string[], b: string[]): boolean;
2698
+ declare function getPullRequestCloseReason(data: DependabotClosePullRequest): string | undefined;
2699
+ declare function getPullRequestDependencies(data: DependabotCreatePullRequest): DependabotPersistedPr;
2700
+ declare function getPullRequestDescription({
2701
+ packageManager,
2702
+ body,
2703
+ dependencies,
2704
+ maxDescriptionLength
2705
+ }: {
2706
+ packageManager: string;
2707
+ body: string | null | undefined;
2708
+ dependencies: DependabotDependency[];
2709
+ maxDescriptionLength?: number;
2710
+ }): string;
2711
+ //#endregion
2712
+ export { DependabotJobBuilder as $, DependabotRequirementSchema as $t, DependabotRecordCooldownMeta as A, DependabotRegistrySchema as An, DependabotDependency as At, DependabotRecordUpdateJobWarning as B, parseRegistries as Bn, DependabotGroupRuleJob as Bt, DependabotIncrementMetricSchema as C, DependabotGroupSchema as Cn, DependabotCommandSchema as Ct, DependabotMarkAsProcessedSchema as D, DependabotMultiEcosystemGroupSchema as Dn, DependabotConditionSchema as Dt, DependabotMarkAsProcessed as E, DependabotMultiEcosystemGroup as En, DependabotCondition as Et, DependabotRecordEcosystemVersionsSchema as F, PackageEcosystem as Fn, DependabotExistingPRSchema as Ft, DependabotUpdatePullRequestSchema as G, extractPlaceholder as Gn, DependabotJobFileSchema as Gt, DependabotUpdateDependencyList as H, validateConfiguration as Hn, DependabotJobConfig as Ht, DependabotRecordUpdateJobError as I, PackageEcosystemSchema as In, DependabotExperiments as It, DependabotRequestSchema as J, GitAuthor as Jn, DependabotPersistedPr as Jt, CreateApiServerAppOptions as K, DEPENDABOT_DEFAULT_AUTHOR_EMAIL as Kn, DependabotPackageManager as Kt, DependabotRecordUpdateJobErrorSchema as L, VersioningStrategy as Ln, DependabotExperimentsSchema as Lt, DependabotRecordEcosystemMeta as M, DependabotScheduleSchema as Mn, DependabotExistingGroupPR as Mt, DependabotRecordEcosystemMetaSchema as N, DependabotUpdate as Nn, DependabotExistingGroupPRSchema as Nt, DependabotMetric as O, DependabotPullRequestBranchName as On, DependabotCredential as Ot, DependabotRecordEcosystemVersions as P, DependabotUpdateSchema as Pn, DependabotExistingPR as Pt, createApiServerApp as Q, DependabotRequirement as Qt, DependabotRecordUpdateJobUnknownError as R, VersioningStrategySchema as Rn, DependabotGroupJob as Rt, DependabotIncrementMetric as S, DependabotGroup as Sn, DependabotCommand as St, DependabotJobErrorSchema as T, DependabotIgnoreConditionSchema as Tn, DependabotCommitOptionsSchema as Tt, DependabotUpdateDependencyListSchema as U, VariableFinderFn as Un, DependabotJobConfigSchema as Ut, DependabotRecordUpdateJobWarningSchema as V, parseUpdates as Vn, DependabotGroupRuleJobSchema as Vt, DependabotUpdatePullRequest as W, convertPlaceholder as Wn, DependabotJobFile as Wt, DependabotRequestTypeSchema as X, DependabotProxyConfig as Xt, DependabotRequestType as Y, DependabotPersistedPrSchema as Yt, DependabotTokenType as Z, DependabotProxyConfigSchema as Zt, DependabotDependencySubmissionSchema as _, DependabotCommitMessageSchema as _n, CertificateAuthority as _t, getPullRequestDescription as a, DependabotSourceProvider as an, mapGroupsFromDependabotConfigToJobConfig as at, DependabotEcosystemVersionManager as b, DependabotCooldown as bn, DependabotAllowed as bt, DependabotClosePullRequest as c, FetchedFiles as cn, mapSecurityAdvisories as ct, DependabotClosePullRequestSchema as d, CONFIG_FILE_NAMES as dn, DEFAULT_EXPERIMENTS as dt, DependabotRequirementSource as en, DependabotJobBuilderOutput as et, DependabotCreatePullRequest as f, CONFIG_FILE_PATHS_AZURE as fn, parseExperiments as ft, DependabotDependencySubmission as g, DependabotCommitMessage as gn, sanitizeRef as gt, DependabotDependencyFileSchema as h, DependabotAllowConditionSchema as hn, getBranchNameForUpdate as ht, getPullRequestDependencies as i, DependabotSource as in, mapExperiments as it, DependabotRecordCooldownMetaSchema as j, DependabotSchedule as jn, DependabotDependencySchema as jt, DependabotMetricSchema as k, DependabotRegistry as kn, DependabotCredentialSchema as kt, DependabotClosePullRequestReason as l, FileFetcherInput as ln, mapSourceFromDependabotConfigToJobConfig as lt, DependabotDependencyFile as m, DependabotAllowCondition as mn, makeDirectoryKey as mt, getDependencyNames as n, DependabotSecurityAdvisory as nn, mapAllowedUpdatesFromDependabotConfigToJobConfig as nt, normalizeBranchName as o, DependabotSourceProviderSchema as on, mapIgnoreConditionsFromDependabotConfigToJobConfig as ot, DependabotCreatePullRequestSchema as p, CONFIG_FILE_PATHS_GITHUB as pn, setExperiment as pt, DependabotRequest as q, DEPENDABOT_DEFAULT_AUTHOR_NAME as qn, DependabotPackageManagerSchema as qt, getPullRequestCloseReason as r, DependabotSecurityAdvisorySchema as rn, mapCredentials as rt, normalizeFilePath as s, DependabotSourceSchema as sn, mapPackageEcosystemToPackageManager as st, areEqual as t, DependabotRequirementSourceSchema as tn, DependabotSourceInfo as tt, DependabotClosePullRequestReasonEnum as u, FileUpdaterInput as un, mapVersionStrategyToRequirementsUpdateStrategy as ut, DependabotEcosystemMeta as v, DependabotConfig as vn, CertificateAuthoritySchema as vt, DependabotJobError as w, DependabotIgnoreCondition as wn, DependabotCommitOptions as wt, DependabotEcosystemVersionManagerSchema as x, DependabotCooldownSchema as xn, DependabotAllowedSchema as xt, DependabotEcosystemMetaSchema as y, DependabotConfigSchema as yn, DEPENDABOT_COMMANDS as yt, DependabotRecordUpdateJobUnknownErrorSchema as z, parseDependabotConfig as zn, DependabotGroupJobSchema as zt };
2713
+ //# sourceMappingURL=index-CFWMNvXg.d.mts.map
@@ -367,16 +367,11 @@ function validateConfiguration(updates, registries) {
367
367
  const missingReferences = configured.filter((el) => !referenced.includes(el));
368
368
  if (missingReferences.length > 0) throw new Error(`Registries: '${missingReferences.join(",")}' have not been referenced by any update`);
369
369
  }
370
- /**
371
- * Possible paths to the dependabot config file.
372
- * Remember to prefix with a forward slash when querying API endpoints or where necessary.
373
- */
374
- const POSSIBLE_CONFIG_FILE_PATHS = [
375
- ".azuredevops/dependabot.yml",
376
- ".azuredevops/dependabot.yaml",
377
- ".github/dependabot.yaml",
378
- ".github/dependabot.yml"
379
- ];
370
+ /** Possible paths to the dependabot config file for GitHub. */
371
+ const CONFIG_FILE_NAMES = ["dependabot.yaml", "dependabot.yml"];
372
+ const CONFIG_FILE_PATHS_GITHUB = CONFIG_FILE_NAMES.map((name) => `.github/${name}`);
373
+ /** Possible paths to the dependabot config file for Azure. */
374
+ const CONFIG_FILE_PATHS_AZURE = [...CONFIG_FILE_NAMES.map((name) => `.azuredevops/${name}`), ...CONFIG_FILE_PATHS_GITHUB];
380
375
  /**
381
376
  * Parse the contents of a dependabot config YAML file
382
377
  * @returns {DependabotConfig} config - the dependabot configuration
@@ -408,8 +403,8 @@ const DependabotProxyConfigSchema = z.object({
408
403
  });
409
404
  const DependabotSourceProviderSchema = z.enum([
410
405
  "azure",
411
- "gitlab",
412
- "bitbucket"
406
+ "bitbucket",
407
+ "gitlab"
413
408
  ]);
414
409
  const DependabotSourceSchema = z.object({
415
410
  provider: DependabotSourceProviderSchema,
@@ -516,11 +511,12 @@ const DependabotPackageManagerSchema = z.enum([
516
511
  "bazel",
517
512
  "opentofu"
518
513
  ]);
519
- const DependabotCommandSchema = z.enum([
514
+ const DEPENDABOT_COMMANDS = [
520
515
  "graph",
521
516
  "version",
522
517
  "recreate"
523
- ]);
518
+ ];
519
+ const DependabotCommandSchema = z.enum(DEPENDABOT_COMMANDS);
524
520
  const DependabotJobConfigSchema = z.object({
525
521
  id: z.string(),
526
522
  command: DependabotCommandSchema.optional(),
@@ -554,7 +550,8 @@ const DependabotJobConfigSchema = z.object({
554
550
  "exclude-paths": z.string().array().optional()
555
551
  });
556
552
  const DependabotJobFileSchema = z.object({ job: DependabotJobConfigSchema });
553
+ const DependabotPersistedPrSchema = DependabotExistingPRSchema.array().or(DependabotExistingGroupPRSchema);
557
554
 
558
555
  //#endregion
559
- export { DependabotScheduleSchema as A, extractPlaceholder as B, DependabotCommitMessageSchema as C, DependabotIgnoreConditionSchema as D, DependabotGroupSchema as E, parseDependabotConfig as F, parseRegistries as I, parseUpdates as L, POSSIBLE_CONFIG_FILE_PATHS as M, PackageEcosystemSchema as N, DependabotMultiEcosystemGroupSchema as O, VersioningStrategySchema as P, validateConfiguration as R, DependabotAllowConditionSchema as S, DependabotCooldownSchema as T, makeDirectoryKey as V, DependabotRequirementSchema as _, DependabotConditionSchema as a, DependabotSourceProviderSchema as b, DependabotExistingGroupPRSchema as c, DependabotGroupJobSchema as d, DependabotGroupRuleJobSchema as f, DependabotProxyConfigSchema as g, DependabotPackageManagerSchema as h, DependabotCommitOptionsSchema as i, DependabotUpdateSchema as j, DependabotRegistrySchema as k, DependabotExistingPRSchema as l, DependabotJobFileSchema as m, DependabotAllowedSchema as n, DependabotCredentialSchema as o, DependabotJobConfigSchema as p, DependabotCommandSchema as r, DependabotDependencySchema as s, CertificateAuthoritySchema as t, DependabotExperimentsSchema as u, DependabotRequirementSourceSchema as v, DependabotConfigSchema as w, DependabotSourceSchema as x, DependabotSecurityAdvisorySchema as y, convertPlaceholder as z };
560
- //# sourceMappingURL=job-DanO84YW.mjs.map
556
+ export { DependabotCooldownSchema as A, parseRegistries as B, DependabotSourceSchema as C, DependabotAllowConditionSchema as D, CONFIG_FILE_PATHS_GITHUB as E, DependabotScheduleSchema as F, makeDirectoryKey as G, validateConfiguration as H, DependabotUpdateSchema as I, PackageEcosystemSchema as L, DependabotIgnoreConditionSchema as M, DependabotMultiEcosystemGroupSchema as N, DependabotCommitMessageSchema as O, DependabotRegistrySchema as P, VersioningStrategySchema as R, DependabotSourceProviderSchema as S, CONFIG_FILE_PATHS_AZURE as T, convertPlaceholder as U, parseUpdates as V, extractPlaceholder as W, DependabotPersistedPrSchema as _, DependabotCommitOptionsSchema as a, DependabotRequirementSourceSchema as b, DependabotDependencySchema as c, DependabotExperimentsSchema as d, DependabotGroupJobSchema as f, DependabotPackageManagerSchema as g, DependabotJobFileSchema as h, DependabotCommandSchema as i, DependabotGroupSchema as j, DependabotConfigSchema as k, DependabotExistingGroupPRSchema as l, DependabotJobConfigSchema as m, DEPENDABOT_COMMANDS as n, DependabotConditionSchema as o, DependabotGroupRuleJobSchema as p, DependabotAllowedSchema as r, DependabotCredentialSchema as s, CertificateAuthoritySchema as t, DependabotExistingPRSchema as u, DependabotProxyConfigSchema as v, CONFIG_FILE_NAMES as w, DependabotSecurityAdvisorySchema as x, DependabotRequirementSchema as y, parseDependabotConfig as z };
557
+ //# sourceMappingURL=job-COuliaYg.mjs.map