@paklo/core 0.12.1 → 0.13.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/dist/azure/index.d.mts +19 -31
- package/dist/azure/index.mjs +74 -68
- package/dist/azure/index.mjs.map +1 -1
- package/dist/dependabot/index.d.mts +3 -3
- package/dist/dependabot/index.mjs +3 -3
- package/dist/{dependabot-DAdoJJp4.mjs → dependabot-Epqz07Sy.mjs} +109 -25
- package/dist/dependabot-Epqz07Sy.mjs.map +1 -0
- package/dist/github/index.d.mts +1 -1
- package/dist/github/index.mjs +2 -2
- package/dist/github/index.mjs.map +1 -1
- package/dist/hono.d.mts +0 -1
- package/dist/{index-BfwWezjJ.d.mts → index-BKTxy7XU.d.mts} +1 -2
- package/dist/{index-rsiHDQ5U.d.mts → index-CviS_2Dy.d.mts} +135 -61
- package/dist/{job-ClEevC5P.mjs → job-CNRfJDsF.mjs} +15 -10
- package/dist/{job-ClEevC5P.mjs.map → job-CNRfJDsF.mjs.map} +1 -1
- package/dist/keygen.d.mts +1 -3
- package/dist/{logger-3Qfh9NUj.mjs → logger-BV4N2wBl.mjs} +1 -1
- package/dist/{logger-3Qfh9NUj.mjs.map → logger-BV4N2wBl.mjs.map} +1 -1
- package/dist/logger.d.mts +1 -2
- package/dist/logger.mjs +1 -1
- package/dist/usage.d.mts +0 -1
- package/dist/usage.mjs +1 -1
- package/package.json +6 -6
- package/dist/dependabot-DAdoJJp4.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as SecurityVulnerability } from "./index-
|
|
1
|
+
import { p as SecurityVulnerability } from "./index-BKTxy7XU.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { Hono } from "hono";
|
|
4
4
|
|
|
@@ -1214,14 +1214,25 @@ declare const DependabotSourceSchema: z.ZodObject<{
|
|
|
1214
1214
|
'api-endpoint': z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1215
1215
|
}, z.core.$strip>;
|
|
1216
1216
|
type DependabotSource = z.infer<typeof DependabotSourceSchema>;
|
|
1217
|
-
declare const
|
|
1217
|
+
declare const DependabotExistingPrDependencySchema: z.ZodObject<{
|
|
1218
1218
|
'dependency-name': z.ZodString;
|
|
1219
1219
|
'dependency-version': z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1220
1220
|
directory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1221
1221
|
removed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1222
1222
|
}, z.core.$strip>;
|
|
1223
|
-
type
|
|
1224
|
-
declare const
|
|
1223
|
+
type DependabotExistingPrDependency = z.infer<typeof DependabotExistingPrDependencySchema>;
|
|
1224
|
+
declare const DependabotExistingPrSchema: z.ZodObject<{
|
|
1225
|
+
'pr-number': z.ZodNumber;
|
|
1226
|
+
dependencies: z.ZodArray<z.ZodObject<{
|
|
1227
|
+
'dependency-name': z.ZodString;
|
|
1228
|
+
'dependency-version': z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1229
|
+
directory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1230
|
+
removed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1231
|
+
}, z.core.$strip>>;
|
|
1232
|
+
}, z.core.$strip>;
|
|
1233
|
+
type DependabotExistingPr = z.infer<typeof DependabotExistingPrSchema>;
|
|
1234
|
+
declare const DependabotExistingGroupPrSchema: z.ZodObject<{
|
|
1235
|
+
'pr-number': z.ZodNumber;
|
|
1225
1236
|
'dependency-group-name': z.ZodString;
|
|
1226
1237
|
dependencies: z.ZodArray<z.ZodObject<{
|
|
1227
1238
|
'dependency-name': z.ZodString;
|
|
@@ -1230,7 +1241,7 @@ declare const DependabotExistingGroupPRSchema: z.ZodObject<{
|
|
|
1230
1241
|
removed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1231
1242
|
}, z.core.$strip>>;
|
|
1232
1243
|
}, z.core.$strip>;
|
|
1233
|
-
type
|
|
1244
|
+
type DependabotExistingGroupPr = z.infer<typeof DependabotExistingGroupPrSchema>;
|
|
1234
1245
|
declare const DependabotAllowedSchema: z.ZodObject<{
|
|
1235
1246
|
'dependency-name': z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1236
1247
|
'dependency-type': z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1351,19 +1362,21 @@ declare const DependabotPackageManagerSchema: z.ZodEnum<{
|
|
|
1351
1362
|
opentofu: "opentofu";
|
|
1352
1363
|
}>;
|
|
1353
1364
|
type DependabotPackageManager = z.infer<typeof DependabotPackageManagerSchema>;
|
|
1354
|
-
declare const DEPENDABOT_COMMANDS: readonly ["
|
|
1365
|
+
declare const DEPENDABOT_COMMANDS: readonly ["update", "version", "recreate", "graph"];
|
|
1355
1366
|
declare const DependabotCommandSchema: z.ZodEnum<{
|
|
1356
1367
|
version: "version";
|
|
1357
|
-
|
|
1368
|
+
update: "update";
|
|
1358
1369
|
recreate: "recreate";
|
|
1370
|
+
graph: "graph";
|
|
1359
1371
|
}>;
|
|
1360
1372
|
type DependabotCommand = z.infer<typeof DependabotCommandSchema>;
|
|
1361
1373
|
declare const DependabotJobConfigSchema: z.ZodObject<{
|
|
1362
1374
|
id: z.ZodString;
|
|
1363
1375
|
command: z.ZodOptional<z.ZodEnum<{
|
|
1364
1376
|
version: "version";
|
|
1365
|
-
|
|
1377
|
+
update: "update";
|
|
1366
1378
|
recreate: "recreate";
|
|
1379
|
+
graph: "graph";
|
|
1367
1380
|
}>>;
|
|
1368
1381
|
'package-manager': z.ZodEnum<{
|
|
1369
1382
|
hex: "hex";
|
|
@@ -1417,13 +1430,17 @@ declare const DependabotJobConfigSchema: z.ZodObject<{
|
|
|
1417
1430
|
}, z.core.$strip>>>>;
|
|
1418
1431
|
dependencies: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
1419
1432
|
'dependency-group-to-refresh': z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1420
|
-
'existing-pull-requests': z.ZodArray<z.
|
|
1421
|
-
'
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1433
|
+
'existing-pull-requests': z.ZodArray<z.ZodObject<{
|
|
1434
|
+
'pr-number': z.ZodNumber;
|
|
1435
|
+
dependencies: z.ZodArray<z.ZodObject<{
|
|
1436
|
+
'dependency-name': z.ZodString;
|
|
1437
|
+
'dependency-version': z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1438
|
+
directory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1439
|
+
removed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1440
|
+
}, z.core.$strip>>;
|
|
1441
|
+
}, z.core.$strip>>;
|
|
1426
1442
|
'existing-group-pull-requests': z.ZodArray<z.ZodObject<{
|
|
1443
|
+
'pr-number': z.ZodNumber;
|
|
1427
1444
|
'dependency-group-name': z.ZodString;
|
|
1428
1445
|
dependencies: z.ZodArray<z.ZodObject<{
|
|
1429
1446
|
'dependency-name': z.ZodString;
|
|
@@ -1494,8 +1511,9 @@ declare const DependabotJobFileSchema: z.ZodObject<{
|
|
|
1494
1511
|
id: z.ZodString;
|
|
1495
1512
|
command: z.ZodOptional<z.ZodEnum<{
|
|
1496
1513
|
version: "version";
|
|
1497
|
-
|
|
1514
|
+
update: "update";
|
|
1498
1515
|
recreate: "recreate";
|
|
1516
|
+
graph: "graph";
|
|
1499
1517
|
}>>;
|
|
1500
1518
|
'package-manager': z.ZodEnum<{
|
|
1501
1519
|
hex: "hex";
|
|
@@ -1549,13 +1567,17 @@ declare const DependabotJobFileSchema: z.ZodObject<{
|
|
|
1549
1567
|
}, z.core.$strip>>>>;
|
|
1550
1568
|
dependencies: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
1551
1569
|
'dependency-group-to-refresh': z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1552
|
-
'existing-pull-requests': z.ZodArray<z.
|
|
1553
|
-
'
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1570
|
+
'existing-pull-requests': z.ZodArray<z.ZodObject<{
|
|
1571
|
+
'pr-number': z.ZodNumber;
|
|
1572
|
+
dependencies: z.ZodArray<z.ZodObject<{
|
|
1573
|
+
'dependency-name': z.ZodString;
|
|
1574
|
+
'dependency-version': z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1575
|
+
directory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1576
|
+
removed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1577
|
+
}, z.core.$strip>>;
|
|
1578
|
+
}, z.core.$strip>>;
|
|
1558
1579
|
'existing-group-pull-requests': z.ZodArray<z.ZodObject<{
|
|
1580
|
+
'pr-number': z.ZodNumber;
|
|
1559
1581
|
'dependency-group-name': z.ZodString;
|
|
1560
1582
|
dependencies: z.ZodArray<z.ZodObject<{
|
|
1561
1583
|
'dependency-name': z.ZodString;
|
|
@@ -1633,20 +1655,15 @@ type FileFetcherInput = {
|
|
|
1633
1655
|
type FileUpdaterInput = FetchedFiles & {
|
|
1634
1656
|
job: DependabotJobConfig;
|
|
1635
1657
|
};
|
|
1636
|
-
declare const DependabotPersistedPrSchema: z.
|
|
1637
|
-
'dependency-name': z.ZodString;
|
|
1638
|
-
'dependency-version': z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1639
|
-
directory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1640
|
-
removed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1641
|
-
}, z.core.$strip>>, z.ZodObject<{
|
|
1642
|
-
'dependency-group-name': z.ZodString;
|
|
1658
|
+
declare const DependabotPersistedPrSchema: z.ZodObject<{
|
|
1643
1659
|
dependencies: z.ZodArray<z.ZodObject<{
|
|
1644
1660
|
'dependency-name': z.ZodString;
|
|
1645
1661
|
'dependency-version': z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1646
1662
|
directory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1647
1663
|
removed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1648
1664
|
}, z.core.$strip>>;
|
|
1649
|
-
|
|
1665
|
+
'dependency-group-name': z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1666
|
+
}, z.core.$strip>;
|
|
1650
1667
|
type DependabotPersistedPr = z.infer<typeof DependabotPersistedPrSchema>;
|
|
1651
1668
|
//#endregion
|
|
1652
1669
|
//#region src/dependabot/branch-name.d.ts
|
|
@@ -1661,8 +1678,8 @@ declare function getBranchNameForUpdate({
|
|
|
1661
1678
|
packageEcosystem: PackageEcosystem;
|
|
1662
1679
|
targetBranchName?: string;
|
|
1663
1680
|
directory?: string;
|
|
1664
|
-
dependencyGroupName?: string;
|
|
1665
|
-
dependencies:
|
|
1681
|
+
dependencyGroupName?: string | null;
|
|
1682
|
+
dependencies: DependabotExistingPrDependency[];
|
|
1666
1683
|
separator?: string;
|
|
1667
1684
|
}): string;
|
|
1668
1685
|
declare function sanitizeRef(refParts: (string | undefined)[], separator: string): string;
|
|
@@ -1676,18 +1693,12 @@ declare function sanitizeRef(refParts: (string | undefined)[], separator: string
|
|
|
1676
1693
|
* Either a single `directory` or multiple `directories` can be specified.
|
|
1677
1694
|
*/
|
|
1678
1695
|
type MakeDirectoryKeyOptions = {
|
|
1679
|
-
/** The package ecosystem (e.g., 'npm', 'pip', 'bundler') */
|
|
1680
|
-
|
|
1681
|
-
/** Single directory path (optional if directories is provided) */
|
|
1682
|
-
directory?: string | null;
|
|
1683
|
-
/** Multiple directory paths (optional if directory is provided) */
|
|
1696
|
+
/** The package ecosystem (e.g., 'npm', 'pip', 'bundler') */ecosystem: string; /** Single directory path (optional if directories is provided) */
|
|
1697
|
+
directory?: string | null; /** Multiple directory paths (optional if directory is provided) */
|
|
1684
1698
|
directories?: string[];
|
|
1685
1699
|
} | {
|
|
1686
|
-
/** The package ecosystem using alternative naming convention */
|
|
1687
|
-
|
|
1688
|
-
/** Single directory path (optional if directories is provided) */
|
|
1689
|
-
directory?: string | null;
|
|
1690
|
-
/** Multiple directory paths (optional if directory is provided) */
|
|
1700
|
+
/** The package ecosystem using alternative naming convention */'package-ecosystem': string; /** Single directory path (optional if directories is provided) */
|
|
1701
|
+
directory?: string | null; /** Multiple directory paths (optional if directory is provided) */
|
|
1691
1702
|
directories?: string[];
|
|
1692
1703
|
};
|
|
1693
1704
|
/**
|
|
@@ -1779,19 +1790,16 @@ declare class DependabotJobBuilder {
|
|
|
1779
1790
|
experiments: DependabotExperiments;
|
|
1780
1791
|
systemAccessUser?: string;
|
|
1781
1792
|
systemAccessToken?: string;
|
|
1782
|
-
githubToken?: string;
|
|
1783
|
-
/** Determines if verbose log messages are logged */
|
|
1793
|
+
githubToken?: string; /** Determines if verbose log messages are logged */
|
|
1784
1794
|
debug: boolean;
|
|
1785
1795
|
});
|
|
1786
1796
|
/**
|
|
1787
1797
|
* Create a dependabot update job that updates nothing, but will discover the dependency list for a package ecosystem
|
|
1788
1798
|
*/
|
|
1789
1799
|
forDependenciesList({
|
|
1790
|
-
id
|
|
1791
|
-
command
|
|
1800
|
+
id
|
|
1792
1801
|
}: {
|
|
1793
1802
|
id: string;
|
|
1794
|
-
command: DependabotJobConfig['command'];
|
|
1795
1803
|
}): DependabotJobBuilderOutput;
|
|
1796
1804
|
/**
|
|
1797
1805
|
* Create a dependabot update job that updates all dependencies for a package ecosystem
|
|
@@ -1805,10 +1813,10 @@ declare class DependabotJobBuilder {
|
|
|
1805
1813
|
securityVulnerabilities
|
|
1806
1814
|
}: {
|
|
1807
1815
|
id: string;
|
|
1808
|
-
command:
|
|
1816
|
+
command: DependabotCommand;
|
|
1809
1817
|
dependencyNamesToUpdate?: string[];
|
|
1810
|
-
existingPullRequests:
|
|
1811
|
-
pullRequestToUpdate?:
|
|
1818
|
+
existingPullRequests: (DependabotExistingPr | DependabotExistingGroupPr)[];
|
|
1819
|
+
pullRequestToUpdate?: DependabotExistingPr | DependabotExistingGroupPr;
|
|
1812
1820
|
securityVulnerabilities?: SecurityVulnerability[];
|
|
1813
1821
|
}): DependabotJobBuilderOutput;
|
|
1814
1822
|
}
|
|
@@ -2108,6 +2116,7 @@ declare const DependabotRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2108
2116
|
}, z.core.$strip>>;
|
|
2109
2117
|
}, z.core.$strip>>>;
|
|
2110
2118
|
}, z.core.$strip>;
|
|
2119
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
2111
2120
|
}, z.core.$strip>;
|
|
2112
2121
|
}, z.core.$strip>, z.ZodObject<{
|
|
2113
2122
|
type: z.ZodLiteral<"record_ecosystem_versions">;
|
|
@@ -2245,19 +2254,15 @@ type CreateApiServerAppOptions = {
|
|
|
2245
2254
|
* Base path for the endpoints.
|
|
2246
2255
|
* @default `/api/update_jobs`
|
|
2247
2256
|
*/
|
|
2248
|
-
basePath?: string;
|
|
2249
|
-
/**
|
|
2250
|
-
|
|
2251
|
-
/** Function for getting a dependabot job by ID. */
|
|
2252
|
-
getJob: GetJobFunc;
|
|
2253
|
-
/** Function for getting dependabot credentials by job ID. */
|
|
2257
|
+
basePath?: string; /** Handler function for authenticating requests. */
|
|
2258
|
+
authenticate: AuthenticatorFunc; /** Function for getting a dependabot job by ID. */
|
|
2259
|
+
getJob: GetJobFunc; /** Function for getting dependabot credentials by job ID. */
|
|
2254
2260
|
getCredentials: GetCredentialsFunc;
|
|
2255
2261
|
/**
|
|
2256
2262
|
* Optional function for inspecting raw dependabot requests.
|
|
2257
2263
|
* Should only be used for troubleshooting.
|
|
2258
2264
|
* */
|
|
2259
|
-
inspect?: InspectRequestFunc;
|
|
2260
|
-
/** Handler function for processing the operations. */
|
|
2265
|
+
inspect?: InspectRequestFunc; /** Handler function for processing the operations. */
|
|
2261
2266
|
handle: HandlerFunc;
|
|
2262
2267
|
};
|
|
2263
2268
|
/**
|
|
@@ -2427,6 +2432,7 @@ declare const DependabotDependencySubmissionSchema: z.ZodObject<{
|
|
|
2427
2432
|
}, z.core.$strip>>;
|
|
2428
2433
|
}, z.core.$strip>>>;
|
|
2429
2434
|
}, z.core.$strip>;
|
|
2435
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
2430
2436
|
}, z.core.$strip>;
|
|
2431
2437
|
type DependabotDependencySubmission = z.infer<typeof DependabotDependencySubmissionSchema>;
|
|
2432
2438
|
declare const DependabotCreatePullRequestSchema: z.ZodObject<{
|
|
@@ -2694,10 +2700,10 @@ type DependabotMetric = z.infer<typeof DependabotMetricSchema>;
|
|
|
2694
2700
|
declare function normalizeFilePath(path: string): string;
|
|
2695
2701
|
declare function normalizeBranchName(branch: string): string;
|
|
2696
2702
|
declare function normalizeBranchName(branch?: string): string | undefined;
|
|
2697
|
-
declare function getDependencyNames(
|
|
2703
|
+
declare function getDependencyNames(pr: DependabotPersistedPr): string[];
|
|
2698
2704
|
declare function areEqual(a: string[], b: string[]): boolean;
|
|
2699
2705
|
declare function getPullRequestCloseReason(data: DependabotClosePullRequest): string | undefined;
|
|
2700
|
-
declare function
|
|
2706
|
+
declare function getPersistedPr(data: DependabotCreatePullRequest): DependabotPersistedPr;
|
|
2701
2707
|
declare function getPullRequestDescription({
|
|
2702
2708
|
packageManager,
|
|
2703
2709
|
body,
|
|
@@ -2709,6 +2715,74 @@ declare function getPullRequestDescription({
|
|
|
2709
2715
|
dependencies: DependabotDependency[];
|
|
2710
2716
|
maxDescriptionLength?: number;
|
|
2711
2717
|
}): string;
|
|
2718
|
+
/**
|
|
2719
|
+
* Determines if a new pull request should supersede an existing pull request.
|
|
2720
|
+
*
|
|
2721
|
+
* Follows GitHub Dependabot's superseding logic:
|
|
2722
|
+
* - **Grouped PRs**: Supersede if same group name AND any dependency version changed
|
|
2723
|
+
* - **Single dependency PRs**: Supersede if updating the exact same dependency with a different version
|
|
2724
|
+
* - **Different scopes**: PRs with different dependency sets don't supersede each other
|
|
2725
|
+
*
|
|
2726
|
+
* A new PR supersedes an old PR when:
|
|
2727
|
+
* 1. Both are for the same group (same `dependency-group-name`), OR
|
|
2728
|
+
* Both update the exact same set of dependencies (same dependency names)
|
|
2729
|
+
* 2. AND at least one dependency has a different version
|
|
2730
|
+
*
|
|
2731
|
+
* This prevents incorrect superseding when PRs update overlapping but different dependency sets.
|
|
2732
|
+
*
|
|
2733
|
+
* @param oldPr - The existing pull request's dependency data
|
|
2734
|
+
* @param newPr - The new pull request's dependency data
|
|
2735
|
+
* @returns `true` if the new PR should supersede the old PR, `false` otherwise
|
|
2736
|
+
*
|
|
2737
|
+
* @example
|
|
2738
|
+
* ```ts
|
|
2739
|
+
* // Single dependency - same dependency, different version: SUPERSEDE
|
|
2740
|
+
* const oldPr = {
|
|
2741
|
+
* 'dependency-group-name': null,
|
|
2742
|
+
* dependencies: [{ 'dependency-name': 'lodash', 'dependency-version': '4.17.20' }]
|
|
2743
|
+
* };
|
|
2744
|
+
* const newPr = {
|
|
2745
|
+
* 'dependency-group-name': null,
|
|
2746
|
+
* dependencies: [{ 'dependency-name': 'lodash', 'dependency-version': '4.17.21' }]
|
|
2747
|
+
* };
|
|
2748
|
+
* shouldSupersede(oldPr, newPr); // returns true
|
|
2749
|
+
* ```
|
|
2750
|
+
*
|
|
2751
|
+
* @example
|
|
2752
|
+
* ```ts
|
|
2753
|
+
* // Different dependency sets - overlap but different scope: DON'T SUPERSEDE
|
|
2754
|
+
* const oldPr = {
|
|
2755
|
+
* 'dependency-group-name': null,
|
|
2756
|
+
* dependencies: [
|
|
2757
|
+
* { 'dependency-name': 'lodash', 'dependency-version': '4.17.20' },
|
|
2758
|
+
* { 'dependency-name': 'express', 'dependency-version': '4.18.0' }
|
|
2759
|
+
* ]
|
|
2760
|
+
* };
|
|
2761
|
+
* const newPr = {
|
|
2762
|
+
* 'dependency-group-name': null,
|
|
2763
|
+
* dependencies: [
|
|
2764
|
+
* { 'dependency-name': 'lodash', 'dependency-version': '4.17.21' },
|
|
2765
|
+
* { 'dependency-name': 'react', 'dependency-version': '18.0.0' }
|
|
2766
|
+
* ]
|
|
2767
|
+
* };
|
|
2768
|
+
* shouldSupersede(oldPr, newPr); // returns false - different dependency sets
|
|
2769
|
+
* ```
|
|
2770
|
+
*
|
|
2771
|
+
* @example
|
|
2772
|
+
* ```ts
|
|
2773
|
+
* // Same group - version changed: SUPERSEDE
|
|
2774
|
+
* const oldPr = {
|
|
2775
|
+
* 'dependency-group-name': 'production',
|
|
2776
|
+
* dependencies: [{ 'dependency-name': 'lodash', 'dependency-version': '4.17.20' }]
|
|
2777
|
+
* };
|
|
2778
|
+
* const newPr = {
|
|
2779
|
+
* 'dependency-group-name': 'production',
|
|
2780
|
+
* dependencies: [{ 'dependency-name': 'lodash', 'dependency-version': '4.17.21' }]
|
|
2781
|
+
* };
|
|
2782
|
+
* shouldSupersede(oldPr, newPr); // returns true - same group, version changed
|
|
2783
|
+
* ```
|
|
2784
|
+
*/
|
|
2785
|
+
declare function shouldSupersede(oldPr: DependabotPersistedPr, newPr: DependabotPersistedPr): boolean;
|
|
2712
2786
|
//#endregion
|
|
2713
|
-
export {
|
|
2714
|
-
//# sourceMappingURL=index-
|
|
2787
|
+
export { createApiServerApp as $, DependabotProxyConfig as $t, DependabotMetricSchema as A, DependabotMultiEcosystemGroup as An, DependabotCredentialSchema as At, DependabotRecordUpdateJobUnknownErrorSchema as B, PackageEcosystemSchema as Bn, DependabotExperimentsSchema as Bt, DependabotIncrementMetric as C, DependabotConfigSchema as Cn, DependabotCommand as Ct, DependabotMarkAsProcessed as D, DependabotGroupSchema as Dn, DependabotCondition as Dt, DependabotJobErrorSchema as E, DependabotGroup as En, DependabotCommitOptionsSchema as Et, DependabotRecordEcosystemVersions as F, DependabotSchedule as Fn, DependabotExistingPr as Ft, DependabotUpdatePullRequest as G, parseUpdates as Gn, DependabotJobConfig as Gt, DependabotRecordUpdateJobWarningSchema as H, VersioningStrategySchema as Hn, DependabotGroupJobSchema as Ht, DependabotRecordEcosystemVersionsSchema as I, DependabotScheduleSchema as In, DependabotExistingPrDependency as It, DependabotRequest as J, convertPlaceholder as Jn, DependabotJobFileSchema as Jt, DependabotUpdatePullRequestSchema as K, validateConfiguration as Kn, DependabotJobConfigSchema as Kt, DependabotRecordUpdateJobError as L, DependabotUpdate as Ln, DependabotExistingPrDependencySchema as Lt, DependabotRecordCooldownMetaSchema as M, DependabotPullRequestBranchName as Mn, DependabotDependencySchema as Mt, DependabotRecordEcosystemMeta as N, DependabotRegistry as Nn, DependabotExistingGroupPr as Nt, DependabotMarkAsProcessedSchema as O, DependabotIgnoreCondition as On, DependabotConditionSchema as Ot, DependabotRecordEcosystemMetaSchema as P, DependabotRegistrySchema as Pn, DependabotExistingGroupPrSchema as Pt, DependabotTokenType as Q, GitAuthor as Qn, DependabotPersistedPrSchema as Qt, DependabotRecordUpdateJobErrorSchema as R, DependabotUpdateSchema as Rn, DependabotExistingPrSchema as Rt, DependabotEcosystemVersionManagerSchema as S, DependabotConfig as Sn, DependabotAllowedSchema as St, DependabotJobError as T, DependabotCooldownSchema as Tn, DependabotCommitOptions as Tt, DependabotUpdateDependencyList as U, parseDependabotConfig as Un, DependabotGroupRuleJob as Ut, DependabotRecordUpdateJobWarning as V, VersioningStrategy as Vn, DependabotGroupJob as Vt, DependabotUpdateDependencyListSchema as W, parseRegistries as Wn, DependabotGroupRuleJobSchema as Wt, DependabotRequestType as X, DEPENDABOT_DEFAULT_AUTHOR_EMAIL as Xn, DependabotPackageManagerSchema as Xt, DependabotRequestSchema as Y, extractPlaceholder as Yn, DependabotPackageManager as Yt, DependabotRequestTypeSchema as Z, DEPENDABOT_DEFAULT_AUTHOR_NAME as Zn, DependabotPersistedPr as Zt, DependabotDependencySubmission as _, CONFIG_FILE_PATHS_GITHUB as _n, sanitizeRef as _t, getPullRequestDescription as a, DependabotSecurityAdvisory as an, mapExperiments as at, DependabotEcosystemMetaSchema as b, DependabotCommitMessage as bn, DEPENDABOT_COMMANDS as bt, shouldSupersede as c, DependabotSourceProvider as cn, mapPackageEcosystemToPackageManager as ct, DependabotClosePullRequestReasonEnum as d, FetchedFiles as dn, mapVersionStrategyToRequirementsUpdateStrategy as dt, DependabotProxyConfigSchema as en, DependabotJobBuilder as et, DependabotClosePullRequestSchema as f, FileFetcherInput as fn, DEFAULT_EXPERIMENTS as ft, DependabotDependencyFileSchema as g, CONFIG_FILE_PATHS_AZURE as gn, getBranchNameForUpdate as gt, DependabotDependencyFile as h, CONFIG_FILE_NAMES as hn, makeDirectoryKey as ht, getPullRequestCloseReason as i, DependabotRequirementSourceSchema as in, mapCredentials as it, DependabotRecordCooldownMeta as j, DependabotMultiEcosystemGroupSchema as jn, DependabotDependency as jt, DependabotMetric as k, DependabotIgnoreConditionSchema as kn, DependabotCredential as kt, DependabotClosePullRequest as l, DependabotSourceProviderSchema as ln, mapSecurityAdvisories as lt, DependabotCreatePullRequestSchema as m, BETA_ECOSYSTEMS as mn, setExperiment as mt, getDependencyNames as n, DependabotRequirementSchema as nn, DependabotSourceInfo as nt, normalizeBranchName as o, DependabotSecurityAdvisorySchema as on, mapGroupsFromDependabotConfigToJobConfig as ot, DependabotCreatePullRequest as p, FileUpdaterInput as pn, parseExperiments as pt, CreateApiServerAppOptions as q, VariableFinderFn as qn, DependabotJobFile as qt, getPersistedPr as r, DependabotRequirementSource as rn, mapAllowedUpdatesFromDependabotConfigToJobConfig as rt, normalizeFilePath as s, DependabotSource as sn, mapIgnoreConditionsFromDependabotConfigToJobConfig as st, areEqual as t, DependabotRequirement as tn, DependabotJobBuilderOutput as tt, DependabotClosePullRequestReason as u, DependabotSourceSchema as un, mapSourceFromDependabotConfigToJobConfig as ut, DependabotDependencySubmissionSchema as v, DependabotAllowCondition as vn, CertificateAuthority as vt, DependabotIncrementMetricSchema as w, DependabotCooldown as wn, DependabotCommandSchema as wt, DependabotEcosystemVersionManager as x, DependabotCommitMessageSchema as xn, DependabotAllowed as xt, DependabotEcosystemMeta as y, DependabotAllowConditionSchema as yn, CertificateAuthoritySchema as yt, DependabotRecordUpdateJobUnknownError as z, PackageEcosystem as zn, DependabotExperiments as zt };
|
|
2788
|
+
//# sourceMappingURL=index-CviS_2Dy.d.mts.map
|
|
@@ -412,15 +412,19 @@ const DependabotSourceSchema = z.object({
|
|
|
412
412
|
hostname: z.string().nullish(),
|
|
413
413
|
"api-endpoint": z.string().nullish()
|
|
414
414
|
});
|
|
415
|
-
const
|
|
415
|
+
const DependabotExistingPrDependencySchema = z.object({
|
|
416
416
|
"dependency-name": z.string(),
|
|
417
417
|
"dependency-version": z.string().nullish(),
|
|
418
418
|
directory: z.string().nullish(),
|
|
419
419
|
removed: z.boolean().nullish()
|
|
420
420
|
});
|
|
421
|
-
const
|
|
421
|
+
const DependabotExistingPrSchema = z.object({
|
|
422
|
+
"pr-number": z.number(),
|
|
423
|
+
dependencies: DependabotExistingPrDependencySchema.array()
|
|
424
|
+
});
|
|
425
|
+
const DependabotExistingGroupPrSchema = DependabotExistingPrSchema.extend({
|
|
422
426
|
"dependency-group-name": z.string(),
|
|
423
|
-
dependencies:
|
|
427
|
+
dependencies: DependabotExistingPrDependencySchema.array()
|
|
424
428
|
});
|
|
425
429
|
const DependabotAllowedSchema = z.object({
|
|
426
430
|
"dependency-name": z.string().nullish(),
|
|
@@ -508,9 +512,10 @@ const DependabotPackageManagerSchema = z.enum([
|
|
|
508
512
|
"opentofu"
|
|
509
513
|
]);
|
|
510
514
|
const DEPENDABOT_COMMANDS = [
|
|
511
|
-
"
|
|
515
|
+
"update",
|
|
512
516
|
"version",
|
|
513
|
-
"recreate"
|
|
517
|
+
"recreate",
|
|
518
|
+
"graph"
|
|
514
519
|
];
|
|
515
520
|
const DependabotCommandSchema = z.enum(DEPENDABOT_COMMANDS);
|
|
516
521
|
const DependabotJobConfigSchema = z.object({
|
|
@@ -522,8 +527,8 @@ const DependabotJobConfigSchema = z.object({
|
|
|
522
527
|
"dependency-groups": DependabotGroupJobSchema.array().nullish(),
|
|
523
528
|
dependencies: z.string().array().nullable(),
|
|
524
529
|
"dependency-group-to-refresh": z.string().nullish(),
|
|
525
|
-
"existing-pull-requests":
|
|
526
|
-
"existing-group-pull-requests":
|
|
530
|
+
"existing-pull-requests": DependabotExistingPrSchema.array(),
|
|
531
|
+
"existing-group-pull-requests": DependabotExistingGroupPrSchema.array(),
|
|
527
532
|
experiments: DependabotExperimentsSchema,
|
|
528
533
|
"ignore-conditions": DependabotConditionSchema.array(),
|
|
529
534
|
"lockfile-only": z.boolean(),
|
|
@@ -546,8 +551,8 @@ const DependabotJobConfigSchema = z.object({
|
|
|
546
551
|
"exclude-paths": z.string().array().optional()
|
|
547
552
|
});
|
|
548
553
|
const DependabotJobFileSchema = z.object({ job: DependabotJobConfigSchema });
|
|
549
|
-
const DependabotPersistedPrSchema =
|
|
554
|
+
const DependabotPersistedPrSchema = DependabotExistingGroupPrSchema.omit({ "pr-number": true }).extend({ "dependency-group-name": z.string().nullish() });
|
|
550
555
|
|
|
551
556
|
//#endregion
|
|
552
|
-
export {
|
|
553
|
-
//# sourceMappingURL=job-
|
|
557
|
+
export { DependabotCommitMessageSchema as A, VersioningStrategySchema as B, DependabotSourceProviderSchema as C, CONFIG_FILE_PATHS_AZURE as D, CONFIG_FILE_NAMES as E, DependabotMultiEcosystemGroupSchema as F, convertPlaceholder as G, parseRegistries as H, DependabotRegistrySchema as I, extractPlaceholder as K, DependabotScheduleSchema as L, DependabotCooldownSchema as M, DependabotGroupSchema as N, CONFIG_FILE_PATHS_GITHUB as O, DependabotIgnoreConditionSchema as P, DependabotUpdateSchema as R, DependabotSecurityAdvisorySchema as S, BETA_ECOSYSTEMS as T, parseUpdates as U, parseDependabotConfig as V, validateConfiguration as W, DependabotPackageManagerSchema as _, DependabotCommitOptionsSchema as a, DependabotRequirementSchema as b, DependabotDependencySchema as c, DependabotExistingPrSchema as d, DependabotExperimentsSchema as f, DependabotJobFileSchema as g, DependabotJobConfigSchema as h, DependabotCommandSchema as i, DependabotConfigSchema as j, DependabotAllowConditionSchema as k, DependabotExistingGroupPrSchema as l, DependabotGroupRuleJobSchema as m, DEPENDABOT_COMMANDS as n, DependabotConditionSchema as o, DependabotGroupJobSchema as p, makeDirectoryKey as q, DependabotAllowedSchema as r, DependabotCredentialSchema as s, CertificateAuthoritySchema as t, DependabotExistingPrDependencySchema as u, DependabotPersistedPrSchema as v, DependabotSourceSchema as w, DependabotRequirementSourceSchema as x, DependabotProxyConfigSchema as y, PackageEcosystemSchema as z };
|
|
558
|
+
//# sourceMappingURL=job-CNRfJDsF.mjs.map
|