@coana-tech/cli 14.12.205 → 14.12.207
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/cli.mjs +278 -68
- package/package.json +1 -1
- package/reachability-analyzers-cli.mjs +2994 -3000
- package/repos/coana-tech/goana/bin/goana-darwin-amd64.gz +0 -0
- package/repos/coana-tech/goana/bin/goana-darwin-arm64.gz +0 -0
- package/repos/coana-tech/goana/bin/goana-linux-amd64.gz +0 -0
- package/repos/coana-tech/goana/bin/goana-linux-arm64.gz +0 -0
- package/repos/coana-tech/javap-service/javap-service.jar +0 -0
- package/repos/coana-tech/spar/sparjs-aarch64-apple-darwin.gz +0 -0
- package/repos/coana-tech/spar/sparjs-aarch64-unknown-linux-musl.gz +0 -0
- package/repos/coana-tech/spar/sparjs-x86_64-apple-darwin.gz +0 -0
- package/repos/coana-tech/spar/sparjs-x86_64-unknown-linux-musl.gz +0 -0
package/cli.mjs
CHANGED
|
@@ -188357,16 +188357,16 @@ var require_timespan = __commonJS({
|
|
|
188357
188357
|
// ../../node_modules/.pnpm/jsonwebtoken@9.0.2/node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js
|
|
188358
188358
|
var require_asymmetricKeyDetailsSupported = __commonJS({
|
|
188359
188359
|
"../../node_modules/.pnpm/jsonwebtoken@9.0.2/node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js"(exports2, module2) {
|
|
188360
|
-
var
|
|
188361
|
-
module2.exports =
|
|
188360
|
+
var semver3 = require_semver2();
|
|
188361
|
+
module2.exports = semver3.satisfies(process.version, ">=15.7.0");
|
|
188362
188362
|
}
|
|
188363
188363
|
});
|
|
188364
188364
|
|
|
188365
188365
|
// ../../node_modules/.pnpm/jsonwebtoken@9.0.2/node_modules/jsonwebtoken/lib/rsaPssKeyDetailsSupported.js
|
|
188366
188366
|
var require_rsaPssKeyDetailsSupported = __commonJS({
|
|
188367
188367
|
"../../node_modules/.pnpm/jsonwebtoken@9.0.2/node_modules/jsonwebtoken/lib/rsaPssKeyDetailsSupported.js"(exports2, module2) {
|
|
188368
|
-
var
|
|
188369
|
-
module2.exports =
|
|
188368
|
+
var semver3 = require_semver2();
|
|
188369
|
+
module2.exports = semver3.satisfies(process.version, ">=16.9.0");
|
|
188370
188370
|
}
|
|
188371
188371
|
});
|
|
188372
188372
|
|
|
@@ -188426,8 +188426,8 @@ var require_validateAsymmetricKey = __commonJS({
|
|
|
188426
188426
|
// ../../node_modules/.pnpm/jsonwebtoken@9.0.2/node_modules/jsonwebtoken/lib/psSupported.js
|
|
188427
188427
|
var require_psSupported = __commonJS({
|
|
188428
188428
|
"../../node_modules/.pnpm/jsonwebtoken@9.0.2/node_modules/jsonwebtoken/lib/psSupported.js"(exports2, module2) {
|
|
188429
|
-
var
|
|
188430
|
-
module2.exports =
|
|
188429
|
+
var semver3 = require_semver2();
|
|
188430
|
+
module2.exports = semver3.satisfies(process.version, "^6.12.0 || >=8.0.0");
|
|
188431
188431
|
}
|
|
188432
188432
|
});
|
|
188433
188433
|
|
|
@@ -218816,7 +218816,7 @@ ${indent(1, indentationSize)}`)}
|
|
|
218816
218816
|
};
|
|
218817
218817
|
|
|
218818
218818
|
// ../fixing-management/src/fixing-management/npm/npm-socket-upgrade-manager.ts
|
|
218819
|
-
import { existsSync as
|
|
218819
|
+
import { existsSync as existsSync17 } from "fs";
|
|
218820
218820
|
import { readFile as readFile20 } from "fs/promises";
|
|
218821
218821
|
import assert10 from "node:assert";
|
|
218822
218822
|
import { dirname as dirname14, join as join14, relative as relative10, resolve as resolve24 } from "path";
|
|
@@ -225113,6 +225113,7 @@ async function getYarnType(projectDir) {
|
|
|
225113
225113
|
}
|
|
225114
225114
|
|
|
225115
225115
|
// ../fixing-management/src/fixing-management/npm/npm-fixing-manager.ts
|
|
225116
|
+
import { existsSync as existsSync13 } from "fs";
|
|
225116
225117
|
import { readFile as readFile17, writeFile as writeFile6 } from "fs/promises";
|
|
225117
225118
|
import { relative as relative6, resolve as resolve20 } from "path";
|
|
225118
225119
|
|
|
@@ -225174,6 +225175,7 @@ var NpmFixingManager = class extends NpmEcosystemFixingManager {
|
|
|
225174
225175
|
}
|
|
225175
225176
|
}
|
|
225176
225177
|
async applySecurityFixesSpecificPackageManager(fixes) {
|
|
225178
|
+
await checkForNpmOverrides(resolve20(this.rootDir, this.subprojectPath, "package.json"), fixes);
|
|
225177
225179
|
const pkgLockLocation = resolve20(this.rootDir, this.subprojectPath, "package-lock.json");
|
|
225178
225180
|
const packageLockContent = await readFile17(pkgLockLocation, "utf-8");
|
|
225179
225181
|
const getPackageName = (pkgPath) => {
|
|
@@ -225211,13 +225213,39 @@ var NpmFixingManager = class extends NpmEcosystemFixingManager {
|
|
|
225211
225213
|
);
|
|
225212
225214
|
}
|
|
225213
225215
|
};
|
|
225216
|
+
async function checkForNpmOverrides(packageJsonPath, fixes) {
|
|
225217
|
+
if (!existsSync13(packageJsonPath)) return;
|
|
225218
|
+
const content = await readFile17(packageJsonPath, "utf-8");
|
|
225219
|
+
const packageJson = JSON.parse(content);
|
|
225220
|
+
const overrides = packageJson.overrides;
|
|
225221
|
+
if (!overrides) return;
|
|
225222
|
+
for (const fix of fixes) {
|
|
225223
|
+
for (const [key, value2] of Object.entries(overrides)) {
|
|
225224
|
+
if (key === fix.dependencyName && typeof value2 === "string") {
|
|
225225
|
+
throw new Error(
|
|
225226
|
+
`Package "${fix.dependencyName}" is pinned via npm "overrides" in package.json to version "${value2}". Automatic updating of npm overrides is not yet supported. Please manually update the override to version ${fix.fixedVersion} in your package.json "overrides" field.`
|
|
225227
|
+
);
|
|
225228
|
+
}
|
|
225229
|
+
if (typeof value2 === "object" && value2 !== null) {
|
|
225230
|
+
for (const [nestedKey, nestedValue] of Object.entries(value2)) {
|
|
225231
|
+
if (nestedKey === fix.dependencyName && typeof nestedValue === "string") {
|
|
225232
|
+
throw new Error(
|
|
225233
|
+
`Package "${fix.dependencyName}" is pinned via npm "overrides" in package.json (under "overrides.${key}") to version "${nestedValue}". Automatic updating of npm overrides is not yet supported. Please manually update the override to version ${fix.fixedVersion} in your package.json "overrides" field.`
|
|
225234
|
+
);
|
|
225235
|
+
}
|
|
225236
|
+
}
|
|
225237
|
+
}
|
|
225238
|
+
}
|
|
225239
|
+
}
|
|
225240
|
+
}
|
|
225214
225241
|
|
|
225215
225242
|
// ../fixing-management/src/fixing-management/npm/pnpm-fixing-manager.ts
|
|
225243
|
+
var import_semver3 = __toESM(require_semver2(), 1);
|
|
225216
225244
|
import { readFile as readFile18, writeFile as writeFile7 } from "fs/promises";
|
|
225217
225245
|
import { relative as relative7, resolve as resolve21 } from "path";
|
|
225218
225246
|
var import_yaml = __toESM(require_dist10(), 1);
|
|
225219
225247
|
var import_lockfile_file2 = __toESM(require_lib25(), 1);
|
|
225220
|
-
import { existsSync as
|
|
225248
|
+
import { existsSync as existsSync14 } from "fs";
|
|
225221
225249
|
var PnpmFixingManager = class extends NpmEcosystemFixingManager {
|
|
225222
225250
|
pnpmMajorVersion;
|
|
225223
225251
|
async getPnpmMajorVersion() {
|
|
@@ -225308,7 +225336,9 @@ var PnpmFixingManager = class extends NpmEcosystemFixingManager {
|
|
|
225308
225336
|
);
|
|
225309
225337
|
lockFileYaml.packages = newPackages;
|
|
225310
225338
|
}
|
|
225311
|
-
|
|
225339
|
+
const hasCatalogFixes = !!lockFileYaml.catalogs;
|
|
225340
|
+
let catalogFixes = {};
|
|
225341
|
+
if (hasCatalogFixes) {
|
|
225312
225342
|
const getFixCatalog = (catalogName, catalog) => {
|
|
225313
225343
|
const fixList = [];
|
|
225314
225344
|
for (const [packageName, catalogVersion] of Object.entries(catalog)) {
|
|
@@ -225323,22 +225353,41 @@ var PnpmFixingManager = class extends NpmEcosystemFixingManager {
|
|
|
225323
225353
|
}
|
|
225324
225354
|
return fixList;
|
|
225325
225355
|
};
|
|
225326
|
-
|
|
225356
|
+
catalogFixes = Object.fromEntries(
|
|
225327
225357
|
Object.entries(lockFileYaml.catalogs).map(([catalogName, catalog]) => [
|
|
225328
225358
|
catalogName,
|
|
225329
225359
|
Object.fromEntries(getFixCatalog(catalogName, catalog))
|
|
225330
225360
|
])
|
|
225331
225361
|
);
|
|
225332
|
-
|
|
225333
|
-
|
|
225362
|
+
}
|
|
225363
|
+
const pnpmWorkspaceYamlFile = resolve21(this.rootDir, this.subprojectPath, "pnpm-workspace.yaml");
|
|
225364
|
+
if (hasCatalogFixes || existsSync14(pnpmWorkspaceYamlFile)) {
|
|
225365
|
+
if (hasCatalogFixes && !existsSync14(pnpmWorkspaceYamlFile)) {
|
|
225334
225366
|
throw new Error(
|
|
225335
225367
|
`pnpm-workspace.yaml could not be found in ${pnpmWorkspaceYamlFile}. The lockfile indicates that pnpm catalogs are used and they must be updated, which is not possible without a pnpm-workspace.yaml file`
|
|
225336
225368
|
);
|
|
225337
225369
|
}
|
|
225338
|
-
|
|
225339
|
-
|
|
225340
|
-
|
|
225370
|
+
if (existsSync14(pnpmWorkspaceYamlFile)) {
|
|
225371
|
+
const yamlAST = await readYamlFile(pnpmWorkspaceYamlFile);
|
|
225372
|
+
let modified = false;
|
|
225373
|
+
if (hasCatalogFixes) {
|
|
225374
|
+
fixCatalogVersions(yamlAST, catalogFixes);
|
|
225375
|
+
modified = true;
|
|
225376
|
+
}
|
|
225377
|
+
const overrideResult = fixWorkspaceYamlOverrides(yamlAST, fixes);
|
|
225378
|
+
if (overrideResult.modified) modified = true;
|
|
225379
|
+
if (overrideResult.nestedOverrides.length > 0) {
|
|
225380
|
+
const nested = overrideResult.nestedOverrides[0];
|
|
225381
|
+
throw new Error(
|
|
225382
|
+
`Package "${nested.packageName}" is pinned via a nested pnpm override in pnpm-workspace.yaml (under "overrides"). Automatic updating of nested overrides is not yet supported. Please manually update the override to version ${nested.fixedVersion}.`
|
|
225383
|
+
);
|
|
225384
|
+
}
|
|
225385
|
+
if (modified) {
|
|
225386
|
+
await writeYamlFile(yamlAST, pnpmWorkspaceYamlFile);
|
|
225387
|
+
}
|
|
225388
|
+
}
|
|
225341
225389
|
}
|
|
225390
|
+
await fixPackageJsonPnpmOverrides(resolve21(this.rootDir, this.subprojectPath, "package.json"), fixes);
|
|
225342
225391
|
await (0, import_lockfile_file2.writeWantedLockfile)(resolve21(this.rootDir, this.subprojectPath), lockFileYaml);
|
|
225343
225392
|
} catch (e) {
|
|
225344
225393
|
if (e.message) throw e;
|
|
@@ -225400,14 +225449,156 @@ function updateCatalog(update3, map2) {
|
|
|
225400
225449
|
}
|
|
225401
225450
|
}
|
|
225402
225451
|
}
|
|
225452
|
+
function getOverrideTargetPackageName(key) {
|
|
225453
|
+
const lastSeparatorIndex = key.lastIndexOf(">");
|
|
225454
|
+
return lastSeparatorIndex >= 0 ? key.substring(lastSeparatorIndex + 1) : key;
|
|
225455
|
+
}
|
|
225456
|
+
function computeOverrideUpdate(overrideValue, fix) {
|
|
225457
|
+
if (overrideValue.startsWith("workspace:") || overrideValue.startsWith("link:") || overrideValue.startsWith("file:") || overrideValue.startsWith("http:") || overrideValue.startsWith("https:") || overrideValue.startsWith("git:") || overrideValue.startsWith("git+")) {
|
|
225458
|
+
return null;
|
|
225459
|
+
}
|
|
225460
|
+
if (overrideValue.startsWith("npm:")) {
|
|
225461
|
+
const afterNpm = overrideValue.substring(4);
|
|
225462
|
+
const atIndex = afterNpm.lastIndexOf("@");
|
|
225463
|
+
if (atIndex === -1) return null;
|
|
225464
|
+
const prefix = "npm:" + afterNpm.substring(0, atIndex + 1);
|
|
225465
|
+
const versionPart = afterNpm.substring(atIndex + 1);
|
|
225466
|
+
const result = computeOverrideVersionUpdate(versionPart, fix);
|
|
225467
|
+
return result !== null ? `${prefix}${result}` : null;
|
|
225468
|
+
}
|
|
225469
|
+
return computeOverrideVersionUpdate(overrideValue, fix);
|
|
225470
|
+
}
|
|
225471
|
+
function computeOverrideVersionUpdate(versionValue, fix) {
|
|
225472
|
+
if (versionValue === fix.currentVersion) {
|
|
225473
|
+
return fix.fixedVersion;
|
|
225474
|
+
}
|
|
225475
|
+
if (import_semver3.default.validRange(versionValue) && import_semver3.default.valid(fix.currentVersion) && import_semver3.default.valid(fix.fixedVersion)) {
|
|
225476
|
+
if (import_semver3.default.satisfies(fix.currentVersion, versionValue)) {
|
|
225477
|
+
if (!import_semver3.default.satisfies(fix.fixedVersion, versionValue)) {
|
|
225478
|
+
return fix.fixedVersion;
|
|
225479
|
+
}
|
|
225480
|
+
logger.info(
|
|
225481
|
+
`Override for ${fix.dependencyName} uses range "${versionValue}" which already allows the fixed version ${fix.fixedVersion} \u2014 no update needed`
|
|
225482
|
+
);
|
|
225483
|
+
}
|
|
225484
|
+
}
|
|
225485
|
+
return null;
|
|
225486
|
+
}
|
|
225487
|
+
function fixWorkspaceYamlOverrides(yamlAST, fixes) {
|
|
225488
|
+
let modified = false;
|
|
225489
|
+
const nestedOverrides = [];
|
|
225490
|
+
import_yaml.CST.visit(yamlAST, (item, _path2) => {
|
|
225491
|
+
if (import_yaml.CST.isCollection(item.value) && item.value.type === "block-map") {
|
|
225492
|
+
if (import_yaml.CST.isScalar(item.key)) {
|
|
225493
|
+
const key = import_yaml.CST.resolveAsScalar(item.key).value;
|
|
225494
|
+
if (key === "overrides") {
|
|
225495
|
+
if (updateOverridesMap(item.value, fixes, nestedOverrides)) {
|
|
225496
|
+
modified = true;
|
|
225497
|
+
}
|
|
225498
|
+
}
|
|
225499
|
+
}
|
|
225500
|
+
}
|
|
225501
|
+
});
|
|
225502
|
+
return { modified, nestedOverrides };
|
|
225503
|
+
}
|
|
225504
|
+
function updateOverridesMap(map2, fixes, nestedOverrides) {
|
|
225505
|
+
const fixesByName = /* @__PURE__ */ new Map();
|
|
225506
|
+
for (const fix of fixes) {
|
|
225507
|
+
const existing = fixesByName.get(fix.dependencyName) ?? [];
|
|
225508
|
+
existing.push(fix);
|
|
225509
|
+
fixesByName.set(fix.dependencyName, existing);
|
|
225510
|
+
}
|
|
225511
|
+
let wasModified = false;
|
|
225512
|
+
for (const overrideEntry of map2.items) {
|
|
225513
|
+
if (!overrideEntry.key || !overrideEntry.value) continue;
|
|
225514
|
+
if (import_yaml.CST.isCollection(overrideEntry.value)) {
|
|
225515
|
+
const overrideKey2 = import_yaml.CST.resolveAsScalar(overrideEntry.key)?.value;
|
|
225516
|
+
if (overrideKey2) {
|
|
225517
|
+
const target = getOverrideTargetPackageName(String(overrideKey2));
|
|
225518
|
+
const matchingFixes2 = fixesByName.get(target);
|
|
225519
|
+
if (matchingFixes2) {
|
|
225520
|
+
for (const fix of matchingFixes2) {
|
|
225521
|
+
nestedOverrides.push({ packageName: fix.dependencyName, fixedVersion: fix.fixedVersion });
|
|
225522
|
+
}
|
|
225523
|
+
}
|
|
225524
|
+
}
|
|
225525
|
+
continue;
|
|
225526
|
+
}
|
|
225527
|
+
if (!import_yaml.CST.isScalar(overrideEntry.value)) continue;
|
|
225528
|
+
const overrideKey = import_yaml.CST.resolveAsScalar(overrideEntry.key)?.value;
|
|
225529
|
+
const overrideValue = import_yaml.CST.resolveAsScalar(overrideEntry.value)?.value;
|
|
225530
|
+
if (!overrideKey || !overrideValue) continue;
|
|
225531
|
+
const targetPackageName = getOverrideTargetPackageName(String(overrideKey));
|
|
225532
|
+
const matchingFixes = fixesByName.get(targetPackageName);
|
|
225533
|
+
if (!matchingFixes) continue;
|
|
225534
|
+
for (const fix of matchingFixes) {
|
|
225535
|
+
const newValue = computeOverrideUpdate(String(overrideValue), fix);
|
|
225536
|
+
if (newValue !== null) {
|
|
225537
|
+
logger.info(
|
|
225538
|
+
`Applying fix to ${fix.dependencyName} (${fix.dependencyIdentifier}) defined in pnpm-workspace.yaml overrides`
|
|
225539
|
+
);
|
|
225540
|
+
import_yaml.CST.setScalarValue(overrideEntry.value, newValue);
|
|
225541
|
+
wasModified = true;
|
|
225542
|
+
}
|
|
225543
|
+
}
|
|
225544
|
+
}
|
|
225545
|
+
return wasModified;
|
|
225546
|
+
}
|
|
225547
|
+
async function fixPackageJsonPnpmOverrides(packageJsonPath, fixes) {
|
|
225548
|
+
if (!existsSync14(packageJsonPath)) return;
|
|
225549
|
+
const content = await readFile18(packageJsonPath, "utf-8");
|
|
225550
|
+
const packageJson = JSON.parse(content);
|
|
225551
|
+
const overrides = packageJson.pnpm?.overrides;
|
|
225552
|
+
if (!overrides) return;
|
|
225553
|
+
const fixesByName = /* @__PURE__ */ new Map();
|
|
225554
|
+
for (const fix of fixes) {
|
|
225555
|
+
const existing = fixesByName.get(fix.dependencyName) ?? [];
|
|
225556
|
+
existing.push(fix);
|
|
225557
|
+
fixesByName.set(fix.dependencyName, existing);
|
|
225558
|
+
}
|
|
225559
|
+
let modified = false;
|
|
225560
|
+
for (const [key, value2] of Object.entries(overrides)) {
|
|
225561
|
+
if (typeof value2 === "object" && value2 !== null) {
|
|
225562
|
+
for (const [nestedKey, nestedValue] of Object.entries(value2)) {
|
|
225563
|
+
const nestedTarget = getOverrideTargetPackageName(nestedKey);
|
|
225564
|
+
const matchingFixes2 = fixesByName.get(nestedTarget);
|
|
225565
|
+
if (matchingFixes2 && typeof nestedValue === "string") {
|
|
225566
|
+
const fix = matchingFixes2[0];
|
|
225567
|
+
throw new Error(
|
|
225568
|
+
`Package "${fix.dependencyName}" is pinned via a nested pnpm override in package.json (under "pnpm.overrides.${key}"). Automatic updating of nested overrides is not yet supported. Please manually update the override to version ${fix.fixedVersion}.`
|
|
225569
|
+
);
|
|
225570
|
+
}
|
|
225571
|
+
}
|
|
225572
|
+
continue;
|
|
225573
|
+
}
|
|
225574
|
+
if (typeof value2 !== "string") continue;
|
|
225575
|
+
const targetPackageName = getOverrideTargetPackageName(key);
|
|
225576
|
+
const matchingFixes = fixesByName.get(targetPackageName);
|
|
225577
|
+
if (!matchingFixes) continue;
|
|
225578
|
+
for (const fix of matchingFixes) {
|
|
225579
|
+
const newValue = computeOverrideUpdate(value2, fix);
|
|
225580
|
+
if (newValue !== null) {
|
|
225581
|
+
logger.info(
|
|
225582
|
+
`Applying fix to ${fix.dependencyName} (${fix.dependencyIdentifier}) defined in package.json pnpm.overrides`
|
|
225583
|
+
);
|
|
225584
|
+
overrides[key] = newValue;
|
|
225585
|
+
modified = true;
|
|
225586
|
+
}
|
|
225587
|
+
}
|
|
225588
|
+
}
|
|
225589
|
+
if (modified) {
|
|
225590
|
+
await writeFile7(packageJsonPath, JSON.stringify(packageJson, null, 2) + "\n");
|
|
225591
|
+
}
|
|
225592
|
+
}
|
|
225403
225593
|
|
|
225404
225594
|
// ../fixing-management/src/fixing-management/npm/yarn-fixing-manager.ts
|
|
225595
|
+
import { existsSync as existsSync16 } from "fs";
|
|
225405
225596
|
import { readFile as readFile19, writeFile as writeFile8 } from "fs/promises";
|
|
225406
225597
|
import { relative as relative9, resolve as resolve23 } from "path";
|
|
225407
225598
|
|
|
225408
225599
|
// ../utils/src/package-utils.ts
|
|
225409
225600
|
import { parse as parse7, join as join13, resolve as resolve22, normalize as normalize3, dirname as dirname13, basename as basename6, relative as relative8 } from "path";
|
|
225410
|
-
import { existsSync as
|
|
225601
|
+
import { existsSync as existsSync15, readFileSync as readFileSync3, readdirSync as readdirSync3, statSync as statSync4, writeFileSync as writeFileSync2 } from "fs";
|
|
225411
225602
|
function setFieldInPackageJson(workspaceRoot, field, value2) {
|
|
225412
225603
|
const packageJSONContentObj = getPackageJsonObject2(workspaceRoot);
|
|
225413
225604
|
if (!packageJSONContentObj) return void 0;
|
|
@@ -225424,7 +225615,7 @@ function writePackageJsonContent(workspaceRoot, packageJsonContent) {
|
|
|
225424
225615
|
}
|
|
225425
225616
|
function getPackageJsonContent2(workspaceRoot) {
|
|
225426
225617
|
const packageJsonPath = getPackageJSONPath2(workspaceRoot);
|
|
225427
|
-
if (
|
|
225618
|
+
if (existsSync15(packageJsonPath)) return readFileSync3(packageJsonPath, "utf8");
|
|
225428
225619
|
return void 0;
|
|
225429
225620
|
}
|
|
225430
225621
|
function getPackageJSONPath2(workspaceRoot) {
|
|
@@ -225591,6 +225782,7 @@ var YarnFixingManager = class extends NpmEcosystemFixingManager {
|
|
|
225591
225782
|
await this.writeYarnObj(yarnLock, yarnLockLocation);
|
|
225592
225783
|
}
|
|
225593
225784
|
async applySecurityFixesSpecificPackageManager(fixes) {
|
|
225785
|
+
await checkForYarnResolutions(resolve23(this.rootDir, this.subprojectPath, "package.json"), fixes);
|
|
225594
225786
|
const yarnLockLocation = resolve23(this.rootDir, this.subprojectPath, "yarn.lock");
|
|
225595
225787
|
const yarnType = await this.getYarnType();
|
|
225596
225788
|
try {
|
|
@@ -225630,6 +225822,24 @@ var YarnFixingManager = class extends NpmEcosystemFixingManager {
|
|
|
225630
225822
|
}
|
|
225631
225823
|
}
|
|
225632
225824
|
};
|
|
225825
|
+
async function checkForYarnResolutions(packageJsonPath, fixes) {
|
|
225826
|
+
if (!existsSync16(packageJsonPath)) return;
|
|
225827
|
+
const content = await readFile19(packageJsonPath, "utf-8");
|
|
225828
|
+
const packageJson = JSON.parse(content);
|
|
225829
|
+
const resolutions = packageJson.resolutions;
|
|
225830
|
+
if (!resolutions) return;
|
|
225831
|
+
for (const fix of fixes) {
|
|
225832
|
+
for (const [key, value2] of Object.entries(resolutions)) {
|
|
225833
|
+
const parts = key.split("/");
|
|
225834
|
+
const targetPackage = parts[parts.length - 1];
|
|
225835
|
+
if (targetPackage === fix.dependencyName && typeof value2 === "string") {
|
|
225836
|
+
throw new Error(
|
|
225837
|
+
`Package "${fix.dependencyName}" is pinned via yarn "resolutions" in package.json to version "${value2}". Automatic updating of yarn resolutions is not yet supported. Please manually update the resolution to version ${fix.fixedVersion} in your package.json "resolutions" field.`
|
|
225838
|
+
);
|
|
225839
|
+
}
|
|
225840
|
+
}
|
|
225841
|
+
}
|
|
225842
|
+
}
|
|
225633
225843
|
|
|
225634
225844
|
// ../fixing-management/src/fixing-management/npm/npm-socket-upgrade-manager.ts
|
|
225635
225845
|
import { basename as basename7 } from "node:path";
|
|
@@ -225802,11 +226012,11 @@ var NpmSocketUpgradeManager = class {
|
|
|
225802
226012
|
}
|
|
225803
226013
|
getPackageManagerForDirectory(directory) {
|
|
225804
226014
|
const fullPath = resolve24(this.rootDir, directory);
|
|
225805
|
-
if (
|
|
226015
|
+
if (existsSync17(join14(fullPath, "pnpm-lock.yaml")) || existsSync17(join14(fullPath, "pnpm-lock.yml"))) {
|
|
225806
226016
|
return "PNPM";
|
|
225807
|
-
} else if (
|
|
226017
|
+
} else if (existsSync17(join14(fullPath, "yarn.lock"))) {
|
|
225808
226018
|
return "YARN";
|
|
225809
|
-
} else if (
|
|
226019
|
+
} else if (existsSync17(join14(fullPath, "package-lock.json"))) {
|
|
225810
226020
|
return "NPM";
|
|
225811
226021
|
}
|
|
225812
226022
|
throw new Error(
|
|
@@ -225815,10 +226025,10 @@ var NpmSocketUpgradeManager = class {
|
|
|
225815
226025
|
}
|
|
225816
226026
|
getLockfileName(directory) {
|
|
225817
226027
|
const fullPath = resolve24(this.rootDir, directory);
|
|
225818
|
-
if (
|
|
225819
|
-
if (
|
|
225820
|
-
if (
|
|
225821
|
-
if (
|
|
226028
|
+
if (existsSync17(join14(fullPath, "pnpm-lock.yaml"))) return "pnpm-lock.yaml";
|
|
226029
|
+
if (existsSync17(join14(fullPath, "pnpm-lock.yml"))) return "pnpm-lock.yml";
|
|
226030
|
+
if (existsSync17(join14(fullPath, "yarn.lock"))) return "yarn.lock";
|
|
226031
|
+
if (existsSync17(join14(fullPath, "package-lock.json"))) return "package-lock.json";
|
|
225822
226032
|
throw new Error(`No lockfile found in ${fullPath}`);
|
|
225823
226033
|
}
|
|
225824
226034
|
async createDirectDependencyPatches(mf, idx, upgradeVersion, ctxt) {
|
|
@@ -226203,10 +226413,10 @@ import { dirname as dirname16, relative as relative12, resolve as resolve26 } fr
|
|
|
226203
226413
|
var import_parse_xml3 = __toESM(require_dist(), 1);
|
|
226204
226414
|
import { readFile as readFile22 } from "node:fs/promises";
|
|
226205
226415
|
import { dirname as dirname15, join as join17, relative as relative11, resolve as resolve25, basename as basename8, extname } from "node:path";
|
|
226206
|
-
import { existsSync as
|
|
226416
|
+
import { existsSync as existsSync18 } from "node:fs";
|
|
226207
226417
|
|
|
226208
226418
|
// ../utils/dist/version-comparison/version-satisfies.js
|
|
226209
|
-
var
|
|
226419
|
+
var import_semver4 = __toESM(require_semver2(), 1);
|
|
226210
226420
|
|
|
226211
226421
|
// ../utils/dist/version-comparison/maven/comparable-version.js
|
|
226212
226422
|
var IntItem2 = class _IntItem {
|
|
@@ -227602,10 +227812,10 @@ function versionSatisfiesSpecifier2(ecosystem, version4, specifier) {
|
|
|
227602
227812
|
}
|
|
227603
227813
|
var ecosystemMap2 = {
|
|
227604
227814
|
NPM: {
|
|
227605
|
-
sortVersions:
|
|
227815
|
+
sortVersions: import_semver4.sort,
|
|
227606
227816
|
isPrerelease: semverIsPrerelease2,
|
|
227607
227817
|
versionSatisfiesSpecifier: semverSatisfiesSpecifier2,
|
|
227608
|
-
versionSatisfiesRelation:
|
|
227818
|
+
versionSatisfiesRelation: import_semver4.cmp,
|
|
227609
227819
|
versionSatisfiesRange: semverSatisfiesRange2
|
|
227610
227820
|
},
|
|
227611
227821
|
MAVEN: {
|
|
@@ -227628,17 +227838,17 @@ var ecosystemMap2 = {
|
|
|
227628
227838
|
versionSatisfiesRange: versionSatisfiesWithVersionComparisonFunction2(pipCompareVersions2)
|
|
227629
227839
|
},
|
|
227630
227840
|
GO: {
|
|
227631
|
-
sortVersions:
|
|
227841
|
+
sortVersions: import_semver4.sort,
|
|
227632
227842
|
isPrerelease: semverIsPrerelease2,
|
|
227633
227843
|
versionSatisfiesSpecifier: semverSatisfiesSpecifier2,
|
|
227634
|
-
versionSatisfiesRelation:
|
|
227844
|
+
versionSatisfiesRelation: import_semver4.cmp,
|
|
227635
227845
|
versionSatisfiesRange: semverSatisfiesRange2
|
|
227636
227846
|
},
|
|
227637
227847
|
RUST: {
|
|
227638
|
-
sortVersions:
|
|
227848
|
+
sortVersions: import_semver4.sort,
|
|
227639
227849
|
isPrerelease: semverIsPrerelease2,
|
|
227640
227850
|
versionSatisfiesSpecifier: (version4, specifier) => specifier.split(",").map((part) => part.trim()).every((trimmed) => semverSatisfiesSpecifier2(version4, /^\d/.test(trimmed) ? `^${trimmed}` : trimmed)),
|
|
227641
|
-
versionSatisfiesRelation:
|
|
227851
|
+
versionSatisfiesRelation: import_semver4.cmp,
|
|
227642
227852
|
versionSatisfiesRange: semverSatisfiesRange2
|
|
227643
227853
|
},
|
|
227644
227854
|
NUGET: {
|
|
@@ -227682,16 +227892,16 @@ function buildUnsupportedEcosystem2(ecosystem) {
|
|
|
227682
227892
|
};
|
|
227683
227893
|
}
|
|
227684
227894
|
function semverSatisfiesSpecifier2(version4, specifier) {
|
|
227685
|
-
return (0,
|
|
227895
|
+
return (0, import_semver4.satisfies)(version4, specifier);
|
|
227686
227896
|
}
|
|
227687
227897
|
function semverSatisfiesRange2(version4, range2) {
|
|
227688
|
-
if ((0,
|
|
227898
|
+
if ((0, import_semver4.satisfies)(version4, range2))
|
|
227689
227899
|
return true;
|
|
227690
|
-
const versionWithoutPrerelease = (0,
|
|
227691
|
-
return versionWithoutPrerelease ? (0,
|
|
227900
|
+
const versionWithoutPrerelease = (0, import_semver4.coerce)(version4)?.version;
|
|
227901
|
+
return versionWithoutPrerelease ? (0, import_semver4.satisfies)(versionWithoutPrerelease, range2) : false;
|
|
227692
227902
|
}
|
|
227693
227903
|
function semverIsPrerelease2(version4) {
|
|
227694
|
-
return (0,
|
|
227904
|
+
return (0, import_semver4.coerce)(version4)?.version !== version4;
|
|
227695
227905
|
}
|
|
227696
227906
|
var operators2 = {
|
|
227697
227907
|
lt: "<",
|
|
@@ -227756,7 +227966,7 @@ async function loadNuGetProject(rootDir, projectFile, validateFile) {
|
|
|
227756
227966
|
}
|
|
227757
227967
|
async function loadNuGetProjectOrTarget(rootDir, projectFile, mainProject, visited, validateFile) {
|
|
227758
227968
|
const validatedProjectPath = validateFile ? validateFile(resolve25(rootDir, projectFile)) : resolve25(rootDir, projectFile);
|
|
227759
|
-
if (!validatedProjectPath || !
|
|
227969
|
+
if (!validatedProjectPath || !existsSync18(validatedProjectPath)) return void 0;
|
|
227760
227970
|
if (visited.has(validatedProjectPath)) return void 0;
|
|
227761
227971
|
visited.set(validatedProjectPath);
|
|
227762
227972
|
const sourceText = await readFile22(validatedProjectPath, "utf-8");
|
|
@@ -227831,7 +228041,7 @@ async function loadNuGetProjectOrTarget(rootDir, projectFile, mainProject, visit
|
|
|
227831
228041
|
}
|
|
227832
228042
|
async function loadPackagesConfig(rootDir, file, validateFile) {
|
|
227833
228043
|
const validatedConfigPath = validateFile(resolve25(rootDir, file));
|
|
227834
|
-
if (!validatedConfigPath || !
|
|
228044
|
+
if (!validatedConfigPath || !existsSync18(validatedConfigPath)) return void 0;
|
|
227835
228045
|
const sourceText = await readFile22(validatedConfigPath, "utf-8");
|
|
227836
228046
|
const configXml = (0, import_parse_xml3.parseXml)(sourceText, { includeOffsets: true });
|
|
227837
228047
|
const packages = extractPackagesFromXml(configXml, sourceText);
|
|
@@ -227961,7 +228171,7 @@ async function handleImportElement(currentProject, importElement, mainProject, v
|
|
|
227961
228171
|
if (!importPath) return;
|
|
227962
228172
|
const resolvedPath = resolve25(dirname15(currentProject.validatedProjectPath), normalizeMSBuildPath(importPath));
|
|
227963
228173
|
const validatedPath = validateFile ? validateFile(resolvedPath) : resolvedPath;
|
|
227964
|
-
if (!validatedPath || !
|
|
228174
|
+
if (!validatedPath || !existsSync18(validatedPath)) return;
|
|
227965
228175
|
const importedProject = await loadNuGetProjectOrTarget(
|
|
227966
228176
|
currentProject.rootDir,
|
|
227967
228177
|
resolvedPath,
|
|
@@ -228654,7 +228864,7 @@ var NuGetSocketUpgradeManager = class {
|
|
|
228654
228864
|
// ../fixing-management/src/fixing-management/rust/cargo-socket-upgrade-manager.ts
|
|
228655
228865
|
import { dirname as dirname18, relative as relative13, resolve as resolve28 } from "node:path";
|
|
228656
228866
|
var import_picomatch6 = __toESM(require_picomatch2(), 1);
|
|
228657
|
-
var
|
|
228867
|
+
var import_semver5 = __toESM(require_semver2(), 1);
|
|
228658
228868
|
import assert12 from "node:assert";
|
|
228659
228869
|
import { readFile as readFile24, writeFile as writeFile10 } from "node:fs/promises";
|
|
228660
228870
|
|
|
@@ -228918,7 +229128,7 @@ var CargoSocketUpgradeManager = class {
|
|
|
228918
229128
|
* This handles Cargo's implicit caret behavior and uses semver for proper version range matching
|
|
228919
229129
|
*/
|
|
228920
229130
|
versionMatches(tomlVersion, resolvedVersion) {
|
|
228921
|
-
return
|
|
229131
|
+
return import_semver5.default.satisfies(resolvedVersion, /^\d/.test(tomlVersion) ? `^${tomlVersion}` : tomlVersion);
|
|
228922
229132
|
}
|
|
228923
229133
|
/**
|
|
228924
229134
|
* Add a new dependency to a Cargo.toml file
|
|
@@ -229365,14 +229575,14 @@ function createPep508VersionPatches(file, idx, requirement, oldVersion, upgradeV
|
|
|
229365
229575
|
}
|
|
229366
229576
|
|
|
229367
229577
|
// ../utils/src/pip-utils.ts
|
|
229368
|
-
import { existsSync as
|
|
229578
|
+
import { existsSync as existsSync19 } from "node:fs";
|
|
229369
229579
|
import { readFile as readFile26 } from "node:fs/promises";
|
|
229370
229580
|
import { dirname as dirname19, resolve as resolve30 } from "node:path";
|
|
229371
229581
|
import util4 from "node:util";
|
|
229372
229582
|
|
|
229373
229583
|
// ../utils/src/python-versions-manager.ts
|
|
229374
229584
|
var import_lodash6 = __toESM(require_lodash(), 1);
|
|
229375
|
-
var
|
|
229585
|
+
var import_semver6 = __toESM(require_semver2(), 1);
|
|
229376
229586
|
import { execFileSync } from "child_process";
|
|
229377
229587
|
import { constants as constants3 } from "fs";
|
|
229378
229588
|
import { access as access3, readFile as readFile25 } from "fs/promises";
|
|
@@ -230216,7 +230426,7 @@ import assert14 from "node:assert";
|
|
|
230216
230426
|
var import_good_enough_parser4 = __toESM(require_cjs(), 1);
|
|
230217
230427
|
init_ruby_lang();
|
|
230218
230428
|
import { resolve as resolve32, dirname as dirname21, relative as relative14 } from "node:path";
|
|
230219
|
-
import { existsSync as
|
|
230429
|
+
import { existsSync as existsSync20, readFileSync as readFileSync4, readdirSync as readdirSync4 } from "node:fs";
|
|
230220
230430
|
init_gemspec_utils();
|
|
230221
230431
|
var booleanQuery2 = import_good_enough_parser4.query.alt(
|
|
230222
230432
|
import_good_enough_parser4.query.sym(/^true|false$/, (ctx, { value: value2, offset }) => {
|
|
@@ -230331,7 +230541,7 @@ var evalGemfileQuery = import_good_enough_parser4.query.sym("eval_gemfile").join
|
|
|
230331
230541
|
if (pathEvaluated === void 0) return ctx;
|
|
230332
230542
|
const rootDir = ctx.gemfile.rootDir;
|
|
230333
230543
|
const file = relative14(rootDir, resolve32(rootDir, dirname21(ctx.gemfile.file), pathEvaluated));
|
|
230334
|
-
if (!
|
|
230544
|
+
if (!existsSync20(resolve32(rootDir, file))) return ctx;
|
|
230335
230545
|
const sourceText = readFileSync4(resolve32(rootDir, file), "utf-8");
|
|
230336
230546
|
const parser2 = import_good_enough_parser4.lang.createLang(lang3);
|
|
230337
230547
|
const cursor = parser2.parse(sourceText);
|
|
@@ -230406,7 +230616,7 @@ var gemspecQuery = import_good_enough_parser4.query.sym("gemspec").opt(
|
|
|
230406
230616
|
ctx.currentGem = void 0;
|
|
230407
230617
|
}
|
|
230408
230618
|
const searchDir = gemspecPath ? resolve32(rootDir, gemfileDir, gemspecPath) : resolve32(rootDir, gemfileDir);
|
|
230409
|
-
if (!
|
|
230619
|
+
if (!existsSync20(searchDir)) return ctx;
|
|
230410
230620
|
let gemspecFiles = [];
|
|
230411
230621
|
try {
|
|
230412
230622
|
const entries = readdirSync4(searchDir);
|
|
@@ -231130,7 +231340,7 @@ async function applySocketUpgrades(ecosystem, rootDir, ctxt) {
|
|
|
231130
231340
|
|
|
231131
231341
|
// dist/cli-apply-fix.js
|
|
231132
231342
|
var import_lodash13 = __toESM(require_lodash(), 1);
|
|
231133
|
-
import { existsSync as
|
|
231343
|
+
import { existsSync as existsSync24 } from "fs";
|
|
231134
231344
|
|
|
231135
231345
|
// ../other-modules-communicator/src/other-modules-communicator.ts
|
|
231136
231346
|
import { execFileSync as execFileSync2 } from "child_process";
|
|
@@ -231147,7 +231357,7 @@ import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
|
231147
231357
|
// ../utils/dist/file-utils.js
|
|
231148
231358
|
var import_lodash7 = __toESM(require_lodash(), 1);
|
|
231149
231359
|
var import_micromatch2 = __toESM(require_micromatch(), 1);
|
|
231150
|
-
import { existsSync as
|
|
231360
|
+
import { existsSync as existsSync21 } from "fs";
|
|
231151
231361
|
import { access as access4, cp as cp3, readdir as readdir4, stat as stat4 } from "fs/promises";
|
|
231152
231362
|
import { basename as basename9, join as join20, relative as relative16, resolve as resolve34 } from "path";
|
|
231153
231363
|
var { uniq: uniq2 } = import_lodash7.default;
|
|
@@ -231587,7 +231797,7 @@ async function detectVariantMaven(projectDir) {
|
|
|
231587
231797
|
}
|
|
231588
231798
|
|
|
231589
231799
|
// ../docker-management/src/maven/gradle-version-detector.ts
|
|
231590
|
-
import { existsSync as
|
|
231800
|
+
import { existsSync as existsSync22 } from "fs";
|
|
231591
231801
|
import { join as join23 } from "path";
|
|
231592
231802
|
import { readFile as readFile30 } from "fs/promises";
|
|
231593
231803
|
async function detectVariantGradle(projectDir) {
|
|
@@ -231595,7 +231805,7 @@ async function detectVariantGradle(projectDir) {
|
|
|
231595
231805
|
}
|
|
231596
231806
|
async function detect(projectDir) {
|
|
231597
231807
|
const gradleWrapperPropertiesPath = join23(projectDir, "gradle", "wrapper", "gradle-wrapper.properties");
|
|
231598
|
-
const gradleWrapperProperties =
|
|
231808
|
+
const gradleWrapperProperties = existsSync22(gradleWrapperPropertiesPath) ? (await readFile30(gradleWrapperPropertiesPath, "utf-8")).split("\n").map((line) => line.trim()).filter((line) => !line.startsWith("#")).filter((line) => line) : void 0;
|
|
231599
231809
|
if (!gradleWrapperProperties) return void 0;
|
|
231600
231810
|
const distributionUrlRegex = /.*gradle-(\d+(\.\d+(\.\d+)?)?)/;
|
|
231601
231811
|
for (const prop2 of gradleWrapperProperties) {
|
|
@@ -231609,7 +231819,7 @@ async function detect(projectDir) {
|
|
|
231609
231819
|
}
|
|
231610
231820
|
|
|
231611
231821
|
// ../docker-management/src/maven/sbt-version-detector.ts
|
|
231612
|
-
import { existsSync as
|
|
231822
|
+
import { existsSync as existsSync23 } from "fs";
|
|
231613
231823
|
import { join as join24 } from "path";
|
|
231614
231824
|
import { readFile as readFile31 } from "fs/promises";
|
|
231615
231825
|
async function detectVariantSbt(projectDir) {
|
|
@@ -231617,7 +231827,7 @@ async function detectVariantSbt(projectDir) {
|
|
|
231617
231827
|
}
|
|
231618
231828
|
async function detect2(projectDir) {
|
|
231619
231829
|
const sbtBuildPropertiesPath = join24(projectDir, "project", "build.properties");
|
|
231620
|
-
const sbtBuildProperties =
|
|
231830
|
+
const sbtBuildProperties = existsSync23(sbtBuildPropertiesPath) ? (await readFile31(sbtBuildPropertiesPath, "utf-8")).split("\n").map((line) => line.trim()).filter((line) => !line.startsWith("#")).filter((line) => line) : void 0;
|
|
231621
231831
|
if (!sbtBuildProperties) return void 0;
|
|
231622
231832
|
for (const prop2 of sbtBuildProperties) {
|
|
231623
231833
|
const [key, value2] = prop2.split("=");
|
|
@@ -232864,7 +233074,7 @@ async function verifyFixes(fixes, otherModulesCommunicator, rootPath) {
|
|
|
232864
233074
|
if (pathsForEachFixIdData.length !== new Set(pathsForEachFixIdData).size) {
|
|
232865
233075
|
throw new Error("Multiple fix IDs found for the same subproject, workspace and ecosystem");
|
|
232866
233076
|
}
|
|
232867
|
-
const subprojectsNotFound = uniq3(fixes.filter(({ vulnerabilityInstance: v }) => !
|
|
233077
|
+
const subprojectsNotFound = uniq3(fixes.filter(({ vulnerabilityInstance: v }) => !existsSync24(resolve37(rootPath, v.subprojectPath))).map(({ vulnerabilityInstance: v }) => `${v.subprojectPath}:${v.ecosystem}`));
|
|
232868
233078
|
if (subprojectsNotFound.length > 0) {
|
|
232869
233079
|
throw new Error(`Cannot find the following subprojects: ${subprojectsNotFound.join(", ")}`);
|
|
232870
233080
|
}
|
|
@@ -233296,7 +233506,7 @@ function getVulnReachability(c3) {
|
|
|
233296
233506
|
}
|
|
233297
233507
|
|
|
233298
233508
|
// ../web-compat-utils/src/report-utils.ts
|
|
233299
|
-
var
|
|
233509
|
+
var import_semver7 = __toESM(require_semver2(), 1);
|
|
233300
233510
|
function generateUrlToRepoSourceLocation(sourceLocation, repoUrl, commit, subprojectWorkspacePath) {
|
|
233301
233511
|
if (!repoUrl || !commit || !subprojectWorkspacePath) return void 0;
|
|
233302
233512
|
const isGithub = repoUrl.toLowerCase().includes("github");
|
|
@@ -233690,7 +233900,7 @@ import { readdir as readdir6 } from "fs/promises";
|
|
|
233690
233900
|
import { join as join29, relative as relative19, resolve as resolve38 } from "path";
|
|
233691
233901
|
|
|
233692
233902
|
// ../project-management/src/project-management/ecosystem-management/ecosystem-specs.ts
|
|
233693
|
-
import { existsSync as
|
|
233903
|
+
import { existsSync as existsSync25 } from "fs";
|
|
233694
233904
|
import { readdir as readdir5, readFile as readFile33 } from "fs/promises";
|
|
233695
233905
|
import { join as join28, sep as sep4 } from "path";
|
|
233696
233906
|
var specs = {
|
|
@@ -233767,7 +233977,7 @@ function getEcosystemSpecs(ecosystems) {
|
|
|
233767
233977
|
}
|
|
233768
233978
|
function packageManagerIfPackageJSONExistsAndValid(packageManager) {
|
|
233769
233979
|
return async (projectDir) => {
|
|
233770
|
-
if (!
|
|
233980
|
+
if (!existsSync25(join28(projectDir, "package.json"))) return void 0;
|
|
233771
233981
|
const packageJSONPath = join28(projectDir, "package.json");
|
|
233772
233982
|
try {
|
|
233773
233983
|
JSON.parse(await readFile33(packageJSONPath, "utf-8"));
|
|
@@ -234662,7 +234872,7 @@ function prettyApplyFixesTo(applyFixesToOption) {
|
|
|
234662
234872
|
|
|
234663
234873
|
// dist/cli-core.js
|
|
234664
234874
|
import assert16 from "node:assert";
|
|
234665
|
-
import { existsSync as
|
|
234875
|
+
import { existsSync as existsSync30, writeFileSync as writeFileSync3 } from "fs";
|
|
234666
234876
|
import { mkdir as mkdir6, writeFile as writeFile15 } from "fs/promises";
|
|
234667
234877
|
var import_lodash15 = __toESM(require_lodash(), 1);
|
|
234668
234878
|
import os2 from "os";
|
|
@@ -234915,7 +235125,7 @@ var BatchedHttpLogStreamer = class {
|
|
|
234915
235125
|
// ../utils/src/logging/socket-log-server.ts
|
|
234916
235126
|
import { createServer } from "net";
|
|
234917
235127
|
import { once as once8 } from "events";
|
|
234918
|
-
import { createWriteStream as createWriteStream6, existsSync as
|
|
235128
|
+
import { createWriteStream as createWriteStream6, existsSync as existsSync26 } from "fs";
|
|
234919
235129
|
import { unlink as unlink3 } from "fs/promises";
|
|
234920
235130
|
var SocketLogServer = class {
|
|
234921
235131
|
server;
|
|
@@ -234936,7 +235146,7 @@ var SocketLogServer = class {
|
|
|
234936
235146
|
this.server = createServer((socket) => this.handleConnection(socket));
|
|
234937
235147
|
}
|
|
234938
235148
|
async start() {
|
|
234939
|
-
if (
|
|
235149
|
+
if (existsSync26(this.socketPath)) {
|
|
234940
235150
|
await unlink3(this.socketPath);
|
|
234941
235151
|
}
|
|
234942
235152
|
this.server.listen(this.socketPath);
|
|
@@ -235058,7 +235268,7 @@ var SocketLogServer = class {
|
|
|
235058
235268
|
return new Promise((resolve45, reject) => {
|
|
235059
235269
|
this.server.close((serverError) => {
|
|
235060
235270
|
this.writeStream.end(() => {
|
|
235061
|
-
if (
|
|
235271
|
+
if (existsSync26(this.socketPath)) {
|
|
235062
235272
|
unlink3(this.socketPath).then(() => {
|
|
235063
235273
|
if (serverError) reject(serverError);
|
|
235064
235274
|
else resolve45();
|
|
@@ -235403,16 +235613,16 @@ Alternatively, you can reduce the --memory-limit option to require fewer mapping
|
|
|
235403
235613
|
var DEFAULT_REPORT_FILENAME_BASE = "coana-report";
|
|
235404
235614
|
|
|
235405
235615
|
// dist/internal/exclude-dirs-from-configuration-files.js
|
|
235406
|
-
import { existsSync as
|
|
235616
|
+
import { existsSync as existsSync27 } from "fs";
|
|
235407
235617
|
import { readFile as readFile35 } from "fs/promises";
|
|
235408
235618
|
import { basename as basename11, resolve as resolve41 } from "path";
|
|
235409
235619
|
var import_yaml2 = __toESM(require_dist11(), 1);
|
|
235410
235620
|
async function inferExcludeDirsFromConfigurationFiles(rootWorkingDir) {
|
|
235411
235621
|
const socketYmlConfigFile = resolve41(rootWorkingDir, "socket.yml");
|
|
235412
|
-
if (
|
|
235622
|
+
if (existsSync27(socketYmlConfigFile))
|
|
235413
235623
|
return inferExcludeDirsFromSocketConfig(socketYmlConfigFile);
|
|
235414
235624
|
const socketYamlConfigFile = resolve41(rootWorkingDir, "socket.yaml");
|
|
235415
|
-
if (
|
|
235625
|
+
if (existsSync27(socketYamlConfigFile))
|
|
235416
235626
|
return inferExcludeDirsFromSocketConfig(socketYamlConfigFile);
|
|
235417
235627
|
return void 0;
|
|
235418
235628
|
}
|
|
@@ -250136,11 +250346,11 @@ var { root: root2 } = static_exports;
|
|
|
250136
250346
|
|
|
250137
250347
|
// ../utils/src/maven-utils.ts
|
|
250138
250348
|
var import_lodash14 = __toESM(require_lodash(), 1);
|
|
250139
|
-
import { existsSync as
|
|
250349
|
+
import { existsSync as existsSync29, readdirSync as readdirSync5, statSync as statSync5 } from "fs";
|
|
250140
250350
|
import { join as join33 } from "path";
|
|
250141
250351
|
|
|
250142
250352
|
// ../utils/src/download-utils.ts
|
|
250143
|
-
import { existsSync as
|
|
250353
|
+
import { existsSync as existsSync28 } from "fs";
|
|
250144
250354
|
import { writeFile as writeFile14 } from "fs/promises";
|
|
250145
250355
|
|
|
250146
250356
|
// ../utils/src/maven-utils.ts
|
|
@@ -251508,7 +251718,7 @@ async function onlineScan(dependencyTree, apiKey, timeout) {
|
|
|
251508
251718
|
}
|
|
251509
251719
|
|
|
251510
251720
|
// dist/version.js
|
|
251511
|
-
var version3 = "14.12.
|
|
251721
|
+
var version3 = "14.12.207";
|
|
251512
251722
|
|
|
251513
251723
|
// dist/cli-core.js
|
|
251514
251724
|
var { mapValues, omit, partition, pickBy: pickBy2 } = import_lodash15.default;
|
|
@@ -252080,7 +252290,7 @@ Subproject: ${subproject}`);
|
|
|
252080
252290
|
const concurrency = Number(this.options.concurrency);
|
|
252081
252291
|
const shouldIncludeWorkspaceInLogs = concurrency > 1;
|
|
252082
252292
|
let npmProjectDirPool;
|
|
252083
|
-
const nodeModulesExists =
|
|
252293
|
+
const nodeModulesExists = existsSync30(resolve42(subprojectPath, "node_modules"));
|
|
252084
252294
|
if (ecosystem === "NPM" && concurrency > 1 && !nodeModulesExists) {
|
|
252085
252295
|
const numCopies = Math.min(concurrency, workspaces.length) - 1;
|
|
252086
252296
|
if (numCopies > 0) {
|