pnpm-catalog-updates 1.2.0 → 1.3.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/index.js +67 -22
- package/dist/index.js.map +1 -1
- package/package.json +3 -4
- package/src/cli/commandRegistrar.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -28,6 +28,8 @@ var ConcurrentProgressTracker = class {
|
|
|
28
28
|
this.reporter = reporter;
|
|
29
29
|
this.total = total;
|
|
30
30
|
}
|
|
31
|
+
reporter;
|
|
32
|
+
total;
|
|
31
33
|
completed = 0;
|
|
32
34
|
lock = new Mutex();
|
|
33
35
|
/**
|
|
@@ -9067,6 +9069,8 @@ var RateLimiter = class {
|
|
|
9067
9069
|
this.tokens = maxBurst;
|
|
9068
9070
|
this.lastRefill = Date.now();
|
|
9069
9071
|
}
|
|
9072
|
+
tokensPerSecond;
|
|
9073
|
+
maxBurst;
|
|
9070
9074
|
tokens;
|
|
9071
9075
|
lastRefill;
|
|
9072
9076
|
/**
|
|
@@ -13371,6 +13375,8 @@ var CatalogCheckService = class {
|
|
|
13371
13375
|
this.workspaceRepository = workspaceRepository;
|
|
13372
13376
|
this.registryService = registryService;
|
|
13373
13377
|
}
|
|
13378
|
+
workspaceRepository;
|
|
13379
|
+
registryService;
|
|
13374
13380
|
/**
|
|
13375
13381
|
* Check for outdated catalog dependencies
|
|
13376
13382
|
*/
|
|
@@ -14208,13 +14214,13 @@ var NpmRegistryService = class _NpmRegistryService {
|
|
|
14208
14214
|
}
|
|
14209
14215
|
try {
|
|
14210
14216
|
const auditData = {
|
|
14211
|
-
|
|
14212
|
-
|
|
14213
|
-
|
|
14214
|
-
|
|
14217
|
+
query: {
|
|
14218
|
+
name: packageName,
|
|
14219
|
+
version
|
|
14220
|
+
}
|
|
14215
14221
|
};
|
|
14216
14222
|
const authConfig = this.getAuthConfig(registryUrl);
|
|
14217
|
-
const response = await npmRegistryFetch("
|
|
14223
|
+
const response = await npmRegistryFetch("/v1/advisories/bulk", {
|
|
14218
14224
|
method: "POST",
|
|
14219
14225
|
body: JSON.stringify(auditData),
|
|
14220
14226
|
headers: {
|
|
@@ -14227,17 +14233,20 @@ var NpmRegistryService = class _NpmRegistryService {
|
|
|
14227
14233
|
const auditResult = await response.json();
|
|
14228
14234
|
const vulnerabilities = [];
|
|
14229
14235
|
if (auditResult.advisories) {
|
|
14230
|
-
for (const
|
|
14231
|
-
|
|
14232
|
-
|
|
14233
|
-
|
|
14234
|
-
|
|
14235
|
-
|
|
14236
|
-
|
|
14237
|
-
|
|
14238
|
-
|
|
14239
|
-
|
|
14240
|
-
|
|
14236
|
+
for (const [_pkgName, advisories] of Object.entries(auditResult.advisories)) {
|
|
14237
|
+
const advisoryList = Array.isArray(advisories) ? advisories : [advisories];
|
|
14238
|
+
for (const advisory of advisoryList) {
|
|
14239
|
+
vulnerabilities.push({
|
|
14240
|
+
id: advisory.id.toString(),
|
|
14241
|
+
title: advisory.title,
|
|
14242
|
+
severity: advisory.severity,
|
|
14243
|
+
description: advisory.overview,
|
|
14244
|
+
reference: advisory.url,
|
|
14245
|
+
vulnerable_versions: advisory.vulnerable_versions,
|
|
14246
|
+
patched_versions: advisory.patched_versions,
|
|
14247
|
+
recommendation: advisory.recommendation
|
|
14248
|
+
});
|
|
14249
|
+
}
|
|
14241
14250
|
}
|
|
14242
14251
|
}
|
|
14243
14252
|
const securityReport = {
|
|
@@ -14431,6 +14440,7 @@ var ImpactAnalysisService = class {
|
|
|
14431
14440
|
constructor(registryService) {
|
|
14432
14441
|
this.registryService = registryService;
|
|
14433
14442
|
}
|
|
14443
|
+
registryService;
|
|
14434
14444
|
/**
|
|
14435
14445
|
* Analyze security impact of version change
|
|
14436
14446
|
*/
|
|
@@ -14459,12 +14469,11 @@ var ImpactAnalysisService = class {
|
|
|
14459
14469
|
};
|
|
14460
14470
|
} catch (error) {
|
|
14461
14471
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
14462
|
-
|
|
14463
|
-
|
|
14464
|
-
|
|
14465
|
-
|
|
14466
|
-
|
|
14467
|
-
});
|
|
14472
|
+
const isTransient = errorMessage.includes("timeout") || errorMessage.includes("ECONNREFUSED") || errorMessage.includes("ETIMEDOUT") || errorMessage.toLowerCase().includes("network");
|
|
14473
|
+
if (!isTransient) {
|
|
14474
|
+
logger.error(`Non-transient security analysis error for ${packageName}: ${errorMessage}`);
|
|
14475
|
+
}
|
|
14476
|
+
logger.warn(`Security analysis error for ${packageName}: ${errorMessage}`);
|
|
14468
14477
|
return {
|
|
14469
14478
|
hasVulnerabilities: false,
|
|
14470
14479
|
fixedVulnerabilities: 0,
|
|
@@ -14552,6 +14561,9 @@ var UpdateExecutorService = class {
|
|
|
14552
14561
|
this.registryService = registryService;
|
|
14553
14562
|
this.backupService = backupService;
|
|
14554
14563
|
}
|
|
14564
|
+
workspaceRepository;
|
|
14565
|
+
registryService;
|
|
14566
|
+
backupService;
|
|
14555
14567
|
/**
|
|
14556
14568
|
* Execute catalog dependency updates
|
|
14557
14569
|
*/
|
|
@@ -14727,6 +14739,9 @@ var UpdatePlanService = class {
|
|
|
14727
14739
|
this.registryService = registryService;
|
|
14728
14740
|
this.checkService = checkService;
|
|
14729
14741
|
}
|
|
14742
|
+
workspaceRepository;
|
|
14743
|
+
registryService;
|
|
14744
|
+
checkService;
|
|
14730
14745
|
/**
|
|
14731
14746
|
* Plan catalog dependency updates
|
|
14732
14747
|
*/
|
|
@@ -14957,6 +14972,7 @@ var CatalogUpdateService = class _CatalogUpdateService {
|
|
|
14957
14972
|
this.executorService = deps.executorService ?? new UpdateExecutorService(workspaceRepository, registryService, backupService);
|
|
14958
14973
|
this.impactAnalysisService = deps.impactAnalysisService ?? new ImpactAnalysisService(registryService);
|
|
14959
14974
|
}
|
|
14975
|
+
workspaceRepository;
|
|
14960
14976
|
checkService;
|
|
14961
14977
|
planService;
|
|
14962
14978
|
executorService;
|
|
@@ -15150,6 +15166,7 @@ var WorkspaceService = class {
|
|
|
15150
15166
|
constructor(workspaceRepository) {
|
|
15151
15167
|
this.workspaceRepository = workspaceRepository;
|
|
15152
15168
|
}
|
|
15169
|
+
workspaceRepository;
|
|
15153
15170
|
/**
|
|
15154
15171
|
* DUP-001: Helper method to convert a Package entity to PackageInfo DTO.
|
|
15155
15172
|
* Extracted from getPackages and getPackagesUsingCatalog to eliminate duplication.
|
|
@@ -15796,6 +15813,9 @@ var CatalogReference = class {
|
|
|
15796
15813
|
this.packageName = packageName;
|
|
15797
15814
|
this.dependencyType = dependencyType;
|
|
15798
15815
|
}
|
|
15816
|
+
catalogName;
|
|
15817
|
+
packageName;
|
|
15818
|
+
dependencyType;
|
|
15799
15819
|
getCatalogName() {
|
|
15800
15820
|
return this.catalogName;
|
|
15801
15821
|
}
|
|
@@ -15815,6 +15835,9 @@ var CatalogDependency = class {
|
|
|
15815
15835
|
this.catalogName = catalogName;
|
|
15816
15836
|
this.dependencyType = dependencyType;
|
|
15817
15837
|
}
|
|
15838
|
+
packageName;
|
|
15839
|
+
catalogName;
|
|
15840
|
+
dependencyType;
|
|
15818
15841
|
getPackageName() {
|
|
15819
15842
|
return this.packageName;
|
|
15820
15843
|
}
|
|
@@ -15872,6 +15895,11 @@ var Workspace = class _Workspace {
|
|
|
15872
15895
|
this.catalogs = catalogs;
|
|
15873
15896
|
this.packages = packages;
|
|
15874
15897
|
}
|
|
15898
|
+
id;
|
|
15899
|
+
path;
|
|
15900
|
+
config;
|
|
15901
|
+
catalogs;
|
|
15902
|
+
packages;
|
|
15875
15903
|
/**
|
|
15876
15904
|
* Create a new Workspace instance
|
|
15877
15905
|
*/
|
|
@@ -17749,6 +17777,7 @@ var FileWorkspaceRepository = class {
|
|
|
17749
17777
|
constructor(fileSystemService) {
|
|
17750
17778
|
this.fileSystemService = fileSystemService;
|
|
17751
17779
|
}
|
|
17780
|
+
fileSystemService;
|
|
17752
17781
|
/**
|
|
17753
17782
|
* Find a workspace by its path
|
|
17754
17783
|
*/
|
|
@@ -18471,6 +18500,7 @@ var CIFormatter = class {
|
|
|
18471
18500
|
constructor(format) {
|
|
18472
18501
|
this.format = format;
|
|
18473
18502
|
}
|
|
18503
|
+
format;
|
|
18474
18504
|
/**
|
|
18475
18505
|
* Format outdated dependencies report for CI
|
|
18476
18506
|
*/
|
|
@@ -19271,6 +19301,7 @@ var ColorUtils = class {
|
|
|
19271
19301
|
constructor(useColor = true) {
|
|
19272
19302
|
this.useColor = useColor;
|
|
19273
19303
|
}
|
|
19304
|
+
useColor;
|
|
19274
19305
|
/**
|
|
19275
19306
|
* Apply color if color is enabled
|
|
19276
19307
|
*/
|
|
@@ -19389,6 +19420,8 @@ var VersionFormatter = class {
|
|
|
19389
19420
|
this.colorUtils = colorUtils;
|
|
19390
19421
|
this.useColor = useColor;
|
|
19391
19422
|
}
|
|
19423
|
+
colorUtils;
|
|
19424
|
+
useColor;
|
|
19392
19425
|
/**
|
|
19393
19426
|
* Parse a version string into its component parts
|
|
19394
19427
|
*/
|
|
@@ -19473,6 +19506,8 @@ var OutputFormatter = class {
|
|
|
19473
19506
|
this.colorUtils = new ColorUtils(useColor);
|
|
19474
19507
|
this.versionFormatter = new VersionFormatter(this.colorUtils, useColor);
|
|
19475
19508
|
}
|
|
19509
|
+
format;
|
|
19510
|
+
useColor;
|
|
19476
19511
|
ciFormatter = null;
|
|
19477
19512
|
colorUtils;
|
|
19478
19513
|
versionFormatter;
|
|
@@ -20779,6 +20814,10 @@ var AnalyzeCommand = class {
|
|
|
20779
20814
|
this.registryService = registryService;
|
|
20780
20815
|
this.aiService = aiService;
|
|
20781
20816
|
}
|
|
20817
|
+
catalogUpdateService;
|
|
20818
|
+
workspaceService;
|
|
20819
|
+
registryService;
|
|
20820
|
+
aiService;
|
|
20782
20821
|
/**
|
|
20783
20822
|
* Execute the analyze command
|
|
20784
20823
|
* QUAL-002/QUAL-003: Uses unified output helpers and reduced coupling
|
|
@@ -20924,6 +20963,7 @@ var CheckCommand = class {
|
|
|
20924
20963
|
constructor(catalogUpdateService) {
|
|
20925
20964
|
this.catalogUpdateService = catalogUpdateService;
|
|
20926
20965
|
}
|
|
20966
|
+
catalogUpdateService;
|
|
20927
20967
|
/**
|
|
20928
20968
|
* Execute the check command
|
|
20929
20969
|
*/
|
|
@@ -21066,6 +21106,7 @@ var GraphCommand = class {
|
|
|
21066
21106
|
constructor(workspaceService) {
|
|
21067
21107
|
this.workspaceService = workspaceService;
|
|
21068
21108
|
}
|
|
21109
|
+
workspaceService;
|
|
21069
21110
|
/**
|
|
21070
21111
|
* Execute the graph command
|
|
21071
21112
|
*/
|
|
@@ -22303,6 +22344,8 @@ var PercentageProgressBar = class _PercentageProgressBar {
|
|
|
22303
22344
|
this.style = options.style || "gradient";
|
|
22304
22345
|
this.useMultiLine = options.multiLine ?? true;
|
|
22305
22346
|
}
|
|
22347
|
+
width;
|
|
22348
|
+
options;
|
|
22306
22349
|
current = 0;
|
|
22307
22350
|
total = 0;
|
|
22308
22351
|
text = "";
|
|
@@ -22516,6 +22559,7 @@ var SecurityCommand = class {
|
|
|
22516
22559
|
constructor(outputFormatter) {
|
|
22517
22560
|
this.outputFormatter = outputFormatter;
|
|
22518
22561
|
}
|
|
22562
|
+
outputFormatter;
|
|
22519
22563
|
/**
|
|
22520
22564
|
* Execute the security command
|
|
22521
22565
|
*/
|
|
@@ -23942,6 +23986,7 @@ var WorkspaceCommand = class {
|
|
|
23942
23986
|
constructor(workspaceService) {
|
|
23943
23987
|
this.workspaceService = workspaceService;
|
|
23944
23988
|
}
|
|
23989
|
+
workspaceService;
|
|
23945
23990
|
/**
|
|
23946
23991
|
* Execute the workspace command
|
|
23947
23992
|
*/
|