@coana-tech/cli 14.12.173 → 14.12.174
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 +64 -61
- package/package.json +1 -1
- 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/cli.mjs
CHANGED
|
@@ -14563,8 +14563,8 @@ var require_follow_redirects = __commonJS({
|
|
|
14563
14563
|
}
|
|
14564
14564
|
return parsed;
|
|
14565
14565
|
}
|
|
14566
|
-
function resolveUrl(
|
|
14567
|
-
return useNativeURL ? new URL3(
|
|
14566
|
+
function resolveUrl(relative22, base) {
|
|
14567
|
+
return useNativeURL ? new URL3(relative22, base) : parseUrl(url2.resolve(base, relative22));
|
|
14568
14568
|
}
|
|
14569
14569
|
function validateUrl(input) {
|
|
14570
14570
|
if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) {
|
|
@@ -69980,16 +69980,16 @@ var require_lockfile = __commonJS({
|
|
|
69980
69980
|
if (process.platform === "win32") {
|
|
69981
69981
|
yield fsSymlink(src, dest, "junction");
|
|
69982
69982
|
} else {
|
|
69983
|
-
let
|
|
69983
|
+
let relative22;
|
|
69984
69984
|
try {
|
|
69985
|
-
|
|
69985
|
+
relative22 = (_path2 || _load_path()).default.relative((_fs || _load_fs()).default.realpathSync((_path2 || _load_path()).default.dirname(dest)), (_fs || _load_fs()).default.realpathSync(src));
|
|
69986
69986
|
} catch (err) {
|
|
69987
69987
|
if (err.code !== "ENOENT") {
|
|
69988
69988
|
throw err;
|
|
69989
69989
|
}
|
|
69990
|
-
|
|
69990
|
+
relative22 = (_path2 || _load_path()).default.relative((_path2 || _load_path()).default.dirname(dest), src);
|
|
69991
69991
|
}
|
|
69992
|
-
yield fsSymlink(
|
|
69992
|
+
yield fsSymlink(relative22 || ".", dest);
|
|
69993
69993
|
}
|
|
69994
69994
|
});
|
|
69995
69995
|
return function symlink2(_x24, _x25) {
|
|
@@ -70016,17 +70016,17 @@ var require_lockfile = __commonJS({
|
|
|
70016
70016
|
_ref28 = _i14.value;
|
|
70017
70017
|
}
|
|
70018
70018
|
const name2 = _ref28;
|
|
70019
|
-
const
|
|
70019
|
+
const relative22 = relativeDir ? (_path2 || _load_path()).default.join(relativeDir, name2) : name2;
|
|
70020
70020
|
const loc = (_path2 || _load_path()).default.join(dir, name2);
|
|
70021
70021
|
const stat6 = yield lstat3(loc);
|
|
70022
70022
|
files.push({
|
|
70023
|
-
relative:
|
|
70023
|
+
relative: relative22,
|
|
70024
70024
|
basename: name2,
|
|
70025
70025
|
absolute: loc,
|
|
70026
70026
|
mtime: +stat6.mtime
|
|
70027
70027
|
});
|
|
70028
70028
|
if (stat6.isDirectory()) {
|
|
70029
|
-
files = files.concat(yield walk(loc,
|
|
70029
|
+
files = files.concat(yield walk(loc, relative22, ignoreBasenames));
|
|
70030
70030
|
}
|
|
70031
70031
|
}
|
|
70032
70032
|
return files;
|
|
@@ -223547,10 +223547,10 @@ var Ignore = class {
|
|
|
223547
223547
|
ignored(p3) {
|
|
223548
223548
|
const fullpath = p3.fullpath();
|
|
223549
223549
|
const fullpaths = `${fullpath}/`;
|
|
223550
|
-
const
|
|
223551
|
-
const relatives = `${
|
|
223550
|
+
const relative22 = p3.relative() || ".";
|
|
223551
|
+
const relatives = `${relative22}/`;
|
|
223552
223552
|
for (const m4 of this.relative) {
|
|
223553
|
-
if (m4.match(
|
|
223553
|
+
if (m4.match(relative22) || m4.match(relatives))
|
|
223554
223554
|
return true;
|
|
223555
223555
|
}
|
|
223556
223556
|
for (const m4 of this.absolute) {
|
|
@@ -223561,9 +223561,9 @@ var Ignore = class {
|
|
|
223561
223561
|
}
|
|
223562
223562
|
childrenIgnored(p3) {
|
|
223563
223563
|
const fullpath = p3.fullpath() + "/";
|
|
223564
|
-
const
|
|
223564
|
+
const relative22 = (p3.relative() || ".") + "/";
|
|
223565
223565
|
for (const m4 of this.relativeChildren) {
|
|
223566
|
-
if (m4.match(
|
|
223566
|
+
if (m4.match(relative22))
|
|
223567
223567
|
return true;
|
|
223568
223568
|
}
|
|
223569
223569
|
for (const m4 of this.absoluteChildren) {
|
|
@@ -226245,7 +226245,7 @@ var CargoFixingManager = class {
|
|
|
226245
226245
|
|
|
226246
226246
|
// ../fixing-management/src/fixing-management/nuget/nuget-socket-upgrade-manager.ts
|
|
226247
226247
|
var import_picomatch4 = __toESM(require_picomatch2(), 1);
|
|
226248
|
-
import { dirname as dirname16, resolve as resolve26 } from "node:path";
|
|
226248
|
+
import { dirname as dirname16, relative as relative11, resolve as resolve26 } from "node:path";
|
|
226249
226249
|
|
|
226250
226250
|
// ../utils/src/nuget-project-utils.ts
|
|
226251
226251
|
var import_parse_xml3 = __toESM(require_dist(), 1);
|
|
@@ -228318,7 +228318,10 @@ var NuGetSocketUpgradeManager = class {
|
|
|
228318
228318
|
await applyPatches("NUGET", this.rootDir, updatePatches, ctxt);
|
|
228319
228319
|
const recomputedArtifacts = updatePatches.length ? await Spinner.instance().wrap(
|
|
228320
228320
|
"Computing remaining upgrades",
|
|
228321
|
-
async () => computeSocketFactArtifacts(
|
|
228321
|
+
async () => computeSocketFactArtifacts(
|
|
228322
|
+
this.rootDir,
|
|
228323
|
+
Array.from(caseInsensitiveManifestFileMap.values()).map((p3) => relative11(this.rootDir, p3))
|
|
228324
|
+
)
|
|
228322
228325
|
) : ctxt.artifacts;
|
|
228323
228326
|
if (!recomputedArtifacts) {
|
|
228324
228327
|
ctxt.statusUpdater?.({
|
|
@@ -228697,7 +228700,7 @@ var NuGetSocketUpgradeManager = class {
|
|
|
228697
228700
|
};
|
|
228698
228701
|
|
|
228699
228702
|
// ../fixing-management/src/fixing-management/rust/cargo-socket-upgrade-manager.ts
|
|
228700
|
-
import { dirname as dirname18, relative as
|
|
228703
|
+
import { dirname as dirname18, relative as relative12, resolve as resolve28 } from "node:path";
|
|
228701
228704
|
var import_picomatch6 = __toESM(require_picomatch2(), 1);
|
|
228702
228705
|
var import_semver4 = __toESM(require_semver2(), 1);
|
|
228703
228706
|
import assert12 from "node:assert";
|
|
@@ -228849,14 +228852,14 @@ var CargoSocketUpgradeManager = class {
|
|
|
228849
228852
|
await writeFile10(path9, content);
|
|
228850
228853
|
ctxt.statusUpdater?.({
|
|
228851
228854
|
status: "success",
|
|
228852
|
-
file:
|
|
228855
|
+
file: relative12(this.rootDir, path9),
|
|
228853
228856
|
message: "File restored",
|
|
228854
228857
|
artifacts: i3(artifacts)
|
|
228855
228858
|
});
|
|
228856
228859
|
} catch (e) {
|
|
228857
228860
|
ctxt.statusUpdater?.({
|
|
228858
228861
|
status: "error",
|
|
228859
|
-
file:
|
|
228862
|
+
file: relative12(this.rootDir, path9),
|
|
228860
228863
|
message: "Could not restore file",
|
|
228861
228864
|
artifacts: i3(artifacts)
|
|
228862
228865
|
});
|
|
@@ -230253,14 +230256,14 @@ function satisfiestVersionSpecs(version4, versionSpec) {
|
|
|
230253
230256
|
}
|
|
230254
230257
|
|
|
230255
230258
|
// ../fixing-management/src/fixing-management/rubygems/rubygems-socket-upgrade-manager.ts
|
|
230256
|
-
import { dirname as dirname22, relative as
|
|
230259
|
+
import { dirname as dirname22, relative as relative14, resolve as resolve33 } from "node:path";
|
|
230257
230260
|
var import_picomatch9 = __toESM(require_picomatch2(), 1);
|
|
230258
230261
|
import assert14 from "node:assert";
|
|
230259
230262
|
|
|
230260
230263
|
// ../fixing-management/src/fixing-management/rubygems/gemfile-utils.ts
|
|
230261
230264
|
var import_good_enough_parser4 = __toESM(require_cjs(), 1);
|
|
230262
230265
|
init_ruby_lang();
|
|
230263
|
-
import { resolve as resolve32, dirname as dirname21, relative as
|
|
230266
|
+
import { resolve as resolve32, dirname as dirname21, relative as relative13 } from "node:path";
|
|
230264
230267
|
import { existsSync as existsSync18, readFileSync as readFileSync6, readdirSync as readdirSync4 } from "node:fs";
|
|
230265
230268
|
init_gemspec_utils();
|
|
230266
230269
|
var booleanQuery2 = import_good_enough_parser4.query.alt(
|
|
@@ -230369,13 +230372,13 @@ var evalGemfileQuery = import_good_enough_parser4.query.sym("eval_gemfile").join
|
|
|
230369
230372
|
ctx.exprEndOffset = void 0;
|
|
230370
230373
|
if (ctx.depth > 50) {
|
|
230371
230374
|
logger.warn(
|
|
230372
|
-
`Recursion limit hit while evaluating gemfile: ${
|
|
230375
|
+
`Recursion limit hit while evaluating gemfile: ${relative13(ctx.gemfile.rootDir, resolve32(ctx.gemfile.rootDir, ctx.gemfile.file))}`
|
|
230373
230376
|
);
|
|
230374
230377
|
return ctx;
|
|
230375
230378
|
}
|
|
230376
230379
|
if (pathEvaluated === void 0) return ctx;
|
|
230377
230380
|
const rootDir = ctx.gemfile.rootDir;
|
|
230378
|
-
const file =
|
|
230381
|
+
const file = relative13(rootDir, resolve32(rootDir, dirname21(ctx.gemfile.file), pathEvaluated));
|
|
230379
230382
|
if (!existsSync18(resolve32(rootDir, file))) return ctx;
|
|
230380
230383
|
const sourceText = readFileSync6(resolve32(rootDir, file), "utf-8");
|
|
230381
230384
|
const parser2 = import_good_enough_parser4.lang.createLang(lang3);
|
|
@@ -230428,7 +230431,7 @@ var gemspecQuery = import_good_enough_parser4.query.sym("gemspec").opt(
|
|
|
230428
230431
|
).handler((ctx) => {
|
|
230429
230432
|
if (ctx.depth > 50) {
|
|
230430
230433
|
logger.warn(
|
|
230431
|
-
`Recursion limit hit while evaluating gemspec: ${
|
|
230434
|
+
`Recursion limit hit while evaluating gemspec: ${relative13(ctx.gemfile.rootDir, resolve32(ctx.gemfile.rootDir, ctx.gemfile.file))}`
|
|
230432
230435
|
);
|
|
230433
230436
|
ctx.currentGem = void 0;
|
|
230434
230437
|
return ctx;
|
|
@@ -230467,7 +230470,7 @@ var gemspecQuery = import_good_enough_parser4.query.sym("gemspec").opt(
|
|
|
230467
230470
|
if (gemspecFiles.length === 0) return ctx;
|
|
230468
230471
|
const gemspecFile = gemspecFiles[0];
|
|
230469
230472
|
const gemspecFullPath = resolve32(searchDir, gemspecFile);
|
|
230470
|
-
const gemspecRelativePath =
|
|
230473
|
+
const gemspecRelativePath = relative13(rootDir, gemspecFullPath);
|
|
230471
230474
|
try {
|
|
230472
230475
|
const sourceText = readFileSync6(gemspecFullPath, "utf-8");
|
|
230473
230476
|
const gemspec = parseGemspec(rootDir, gemspecRelativePath, sourceText);
|
|
@@ -230843,7 +230846,7 @@ var RubygemsSocketUpgradeManager = class {
|
|
|
230843
230846
|
});
|
|
230844
230847
|
continue;
|
|
230845
230848
|
}
|
|
230846
|
-
const gemfileName =
|
|
230849
|
+
const gemfileName = relative14(this.rootDir, resolve33(this.rootDir, dirname22(mf.file), "Gemfile"));
|
|
230847
230850
|
gemfileToLockfile.set(gemfileName, mf.file);
|
|
230848
230851
|
if (pathGems.length > 0) {
|
|
230849
230852
|
const { gemspecPatches, gemfilePatches } = await this.handleGemspecDependency(
|
|
@@ -230922,14 +230925,14 @@ var RubygemsSocketUpgradeManager = class {
|
|
|
230922
230925
|
await writeFile11(path9, content);
|
|
230923
230926
|
ctxt.statusUpdater?.({
|
|
230924
230927
|
status: "success",
|
|
230925
|
-
file:
|
|
230928
|
+
file: relative14(this.rootDir, path9),
|
|
230926
230929
|
message: "File restored",
|
|
230927
230930
|
artifacts: i3(artifacts)
|
|
230928
230931
|
});
|
|
230929
230932
|
} catch (e) {
|
|
230930
230933
|
ctxt.statusUpdater?.({
|
|
230931
230934
|
status: "error",
|
|
230932
|
-
file:
|
|
230935
|
+
file: relative14(this.rootDir, path9),
|
|
230933
230936
|
message: "Could not restore file",
|
|
230934
230937
|
artifacts: i3(artifacts)
|
|
230935
230938
|
});
|
|
@@ -231194,7 +231197,7 @@ var import_lodash7 = __toESM(require_lodash(), 1);
|
|
|
231194
231197
|
var import_micromatch2 = __toESM(require_micromatch(), 1);
|
|
231195
231198
|
import { existsSync as existsSync19 } from "fs";
|
|
231196
231199
|
import { access as access4, cp as cp3, readdir as readdir4, stat as stat4 } from "fs/promises";
|
|
231197
|
-
import { basename as basename9, join as join20, relative as
|
|
231200
|
+
import { basename as basename9, join as join20, relative as relative15, resolve as resolve34 } from "path";
|
|
231198
231201
|
var { uniq: uniq2 } = import_lodash7.default;
|
|
231199
231202
|
var { isMatch: isMatch2 } = import_micromatch2.default;
|
|
231200
231203
|
function* parents2(dir) {
|
|
@@ -231767,12 +231770,12 @@ import { rmSync } from "fs";
|
|
|
231767
231770
|
import { mkdir as mkdir5, readFile as readFile32, writeFile as writeFile12 } from "fs/promises";
|
|
231768
231771
|
import assert15 from "node:assert";
|
|
231769
231772
|
import { platform as platform8 } from "os";
|
|
231770
|
-
import { join as join27, posix as posix2, relative as
|
|
231773
|
+
import { join as join27, posix as posix2, relative as relative17, sep as sep3 } from "path";
|
|
231771
231774
|
|
|
231772
231775
|
// ../utils/src/tmp-file.ts
|
|
231773
231776
|
import { rm, mkdtemp, cp as cp4, lstat as lstat2 } from "fs/promises";
|
|
231774
231777
|
import { tmpdir as tmpdir4 } from "os";
|
|
231775
|
-
import { join as join25, relative as
|
|
231778
|
+
import { join as join25, relative as relative16, sep as sep2, extname as extname2 } from "path";
|
|
231776
231779
|
async function createTmpDirectory(prefix) {
|
|
231777
231780
|
try {
|
|
231778
231781
|
const tmpDir = await mkdtemp(join25(tmpdir4(), prefix));
|
|
@@ -231809,7 +231812,7 @@ async function copyForNpmAnalysis(srcDir, prefix) {
|
|
|
231809
231812
|
verbatimSymlinks: true,
|
|
231810
231813
|
// Preserve symlinks as symlinks instead of dereferencing them
|
|
231811
231814
|
filter: async (src) => {
|
|
231812
|
-
const relativePath =
|
|
231815
|
+
const relativePath = relative16(srcDir, src);
|
|
231813
231816
|
if (relativePath === "") return true;
|
|
231814
231817
|
const pathSegments = relativePath.split(sep2);
|
|
231815
231818
|
if (pathSegments.some((segment) => EXCLUDED_DIRECTORIES.has(segment))) {
|
|
@@ -232190,7 +232193,7 @@ var OtherModulesCommunicator = class {
|
|
|
232190
232193
|
}
|
|
232191
232194
|
if (cmd === "getWorkspacePathsMultipleSubprojects")
|
|
232192
232195
|
return `${_cmdStr()}: (${packageManagerName}) ${abbreviateList(subprojects, 10)}`;
|
|
232193
|
-
return `${_cmdStr()}: (${packageManagerName}) ${
|
|
232196
|
+
return `${_cmdStr()}: (${packageManagerName}) ${relative17(this.rootWorkingDir, subprojectPath) || "."}`;
|
|
232194
232197
|
}
|
|
232195
232198
|
getSpinnerTextForReachabilityAnalyzerCommand(cmd, ecosystem, subprojectPath, workspacePath) {
|
|
232196
232199
|
function _cmdStr() {
|
|
@@ -232203,10 +232206,10 @@ var OtherModulesCommunicator = class {
|
|
|
232203
232206
|
return "Running reachability analysis on package registry package";
|
|
232204
232207
|
}
|
|
232205
232208
|
}
|
|
232206
|
-
return `${_cmdStr()}: (${ecosystem}) ${
|
|
232209
|
+
return `${_cmdStr()}: (${ecosystem}) ${relative17(this.rootWorkingDir, join27(subprojectPath, workspacePath)) || "."}`;
|
|
232207
232210
|
}
|
|
232208
232211
|
getProjectPath(subprojectPath) {
|
|
232209
|
-
return this.options.runWithoutDocker ? subprojectPath : posix2.resolve("/project",
|
|
232212
|
+
return this.options.runWithoutDocker ? subprojectPath : posix2.resolve("/project", relative17(this.rootWorkingDir, subprojectPath).replaceAll(sep3, posix2.sep));
|
|
232210
232213
|
}
|
|
232211
232214
|
// options shared between package-management and reachability-analyzers
|
|
232212
232215
|
commonOptions = once7(
|
|
@@ -232359,7 +232362,7 @@ var OtherModulesCommunicator = class {
|
|
|
232359
232362
|
"getWorkspacePathsMultipleSubprojects",
|
|
232360
232363
|
packageManagerName,
|
|
232361
232364
|
this.rootWorkingDir,
|
|
232362
|
-
subprojectPaths.map((subprojectPath) =>
|
|
232365
|
+
subprojectPaths.map((subprojectPath) => relative17(this.rootWorkingDir, subprojectPath) || ".")
|
|
232363
232366
|
);
|
|
232364
232367
|
}
|
|
232365
232368
|
async getProvidedArgsForSubproject(subprojectPath, providedOptions) {
|
|
@@ -233709,16 +233712,16 @@ function getVulnerabilitiesFromReport(report) {
|
|
|
233709
233712
|
var import_packageurl_js = __toESM(require_packageurl_js(), 1);
|
|
233710
233713
|
|
|
233711
233714
|
// dist/cli-upgrade-purl.js
|
|
233712
|
-
import { join as join30, relative as
|
|
233715
|
+
import { join as join30, relative as relative20, resolve as resolve40 } from "node:path";
|
|
233713
233716
|
var import_picomatch10 = __toESM(require_picomatch2(), 1);
|
|
233714
233717
|
|
|
233715
233718
|
// ../project-management/src/project-management/project-manager.ts
|
|
233716
|
-
import { relative as
|
|
233719
|
+
import { relative as relative19, resolve as resolve39 } from "path";
|
|
233717
233720
|
|
|
233718
233721
|
// ../project-management/src/project-management/ecosystem-management/ecosystem-manager.ts
|
|
233719
233722
|
var import_micromatch3 = __toESM(require_micromatch2(), 1);
|
|
233720
233723
|
import { readdir as readdir6 } from "fs/promises";
|
|
233721
|
-
import { join as join29, relative as
|
|
233724
|
+
import { join as join29, relative as relative18, resolve as resolve38 } from "path";
|
|
233722
233725
|
|
|
233723
233726
|
// ../project-management/src/project-management/ecosystem-management/ecosystem-specs.ts
|
|
233724
233727
|
import { existsSync as existsSync23 } from "fs";
|
|
@@ -233856,7 +233859,7 @@ var EcosystemManager = class _EcosystemManager {
|
|
|
233856
233859
|
const resolvedProjectDir = resolve38(mainProjectDir, relativeProjectDir);
|
|
233857
233860
|
if (config3.includeDirs.length > 0)
|
|
233858
233861
|
workspacePaths = workspacePaths.filter(
|
|
233859
|
-
(workspacePath) => isMatch3(
|
|
233862
|
+
(workspacePath) => isMatch3(relative18(mainProjectDir, join29(resolvedProjectDir, workspacePath)), config3.includeDirs)
|
|
233860
233863
|
);
|
|
233861
233864
|
workspacePaths.filter((workspacePath) => workspacePath !== ".").forEach((workspacePath) => projectDirsAlreadyCovered.push(resolve38(resolvedProjectDir, workspacePath)));
|
|
233862
233865
|
if (workspacePaths.length > 0)
|
|
@@ -233897,7 +233900,7 @@ var EcosystemManager = class _EcosystemManager {
|
|
|
233897
233900
|
return typeof packageManagerNameProvider === "function" ? await packageManagerNameProvider(projectDir) : packageManagerNameProvider;
|
|
233898
233901
|
} catch (e) {
|
|
233899
233902
|
if (e instanceof InvalidProjectFileError) {
|
|
233900
|
-
const projectDirRelative =
|
|
233903
|
+
const projectDirRelative = relative18(mainProjectDir, projectDir) || ".";
|
|
233901
233904
|
logger.error(
|
|
233902
233905
|
`Invalid ${e.fileName} file in ${projectDirRelative}. If the project is intentionally invalid, and you want Coana to skip it in the scan, then add "--exclude-dirs ${projectDirRelative}" to the Coana command.`
|
|
233903
233906
|
);
|
|
@@ -233989,7 +233992,7 @@ function shouldIgnoreDir(dir) {
|
|
|
233989
233992
|
return dirsToIgnore.includes(dir);
|
|
233990
233993
|
}
|
|
233991
233994
|
function shouldIgnoreDueToExcludeDirsOrChangedFiles({ mainProjectDir, excludeDirs, changedFiles }, fullPath) {
|
|
233992
|
-
const relativeToProjectDir =
|
|
233995
|
+
const relativeToProjectDir = relative18(mainProjectDir, fullPath) || ".";
|
|
233993
233996
|
return !!(isMatch3(relativeToProjectDir, excludeDirs) || changedFiles && !changedFiles.some((changedFile) => changedFile.startsWith(relativeToProjectDir)));
|
|
233994
233997
|
}
|
|
233995
233998
|
|
|
@@ -234037,7 +234040,7 @@ var ProjectManager = class _ProjectManager {
|
|
|
234037
234040
|
if (subprojects.length === 0) return void 0;
|
|
234038
234041
|
return ` ${ecosystem}:
|
|
234039
234042
|
${subprojects.map(
|
|
234040
|
-
({ subprojectPath, workspacePaths }) => ` ${
|
|
234043
|
+
({ subprojectPath, workspacePaths }) => ` ${relative19(this.projectDir, subprojectPath) || ". (Root)"}${workspacePaths.length > 1 || workspacePaths[0] !== "." ? ` (${workspacePaths.length} ${ecosystem === "MAVEN" ? "modules" : "workspaces"})` : ""}`
|
|
234041
234044
|
).join("\n")}`;
|
|
234042
234045
|
}).filter((line) => line).join("\n");
|
|
234043
234046
|
const detailsString = Object.entries(this.ecosystemToEcosystemManager).map(([ecosystem, manager]) => {
|
|
@@ -234045,7 +234048,7 @@ ${subprojects.map(
|
|
|
234045
234048
|
if (subprojects.length === 0) return void 0;
|
|
234046
234049
|
const subprojectsString = subprojects.map(({ subprojectPath, workspacePaths, packageManagerName }) => {
|
|
234047
234050
|
if (workspacePaths.length === 1 && workspacePaths[0] === ".") return void 0;
|
|
234048
|
-
return ` ${
|
|
234051
|
+
return ` ${relative19(this.projectDir, subprojectPath) || ". (Root)"}
|
|
234049
234052
|
${workspacePaths.map((ws) => ` ${ws === "." ? ". (Root)" : ws} - ${packageManagerName}`).join("\n")}`;
|
|
234050
234053
|
}).filter((line) => line).join("\n");
|
|
234051
234054
|
if (!subprojectsString) return void 0;
|
|
@@ -234201,7 +234204,7 @@ ${Array.from(upgrades).map(([idx, upgradeVersion]) => ` ${prettyPrintPurlUpgrade
|
|
|
234201
234204
|
warn: "\u26A0\uFE0F",
|
|
234202
234205
|
error: "\u274C"
|
|
234203
234206
|
};
|
|
234204
|
-
logger.info(`${statusIcons[update3.status]} ${update3.message} \u2500 ${
|
|
234207
|
+
logger.info(`${statusIcons[update3.status]} ${update3.message} \u2500 ${relative20(rootDir, resolve40(rootDir, update3.file))}`);
|
|
234205
234208
|
update3.artifacts.forEach((idx, i7) => {
|
|
234206
234209
|
logger.info(`${" ".repeat(3)}${i7 === update3.artifacts.length - 1 ? "\u2514\u2500" : "\u251C\u2500"} ${prettyPrintSocketFactArtifactUpgrade(artifacts[idx], upgrades2.get(idx))}`);
|
|
234207
234210
|
});
|
|
@@ -234255,7 +234258,7 @@ ${Array.from(upgrades).map(([idx, upgradeVersion]) => ` ${prettyPrintPurlUpgrade
|
|
|
234255
234258
|
const subprojectPromiseQueue = new PromiseQueue(Number(options.concurrency));
|
|
234256
234259
|
supportedSubprojects.forEach((subproject) => {
|
|
234257
234260
|
subprojectPromiseQueue.enqueueTask(async () => {
|
|
234258
|
-
const workspacePathsMatchingGlob = subproject.workspacePaths.filter((wsPath) => wsFilter(
|
|
234261
|
+
const workspacePathsMatchingGlob = subproject.workspacePaths.filter((wsPath) => wsFilter(relative20(rootDir, resolve40(rootDir, subproject.subprojectPath, wsPath)) || "."));
|
|
234259
234262
|
if (workspacePathsMatchingGlob.length === 0)
|
|
234260
234263
|
return;
|
|
234261
234264
|
const filterDescription = options.include !== void 0 || options.exclude !== void 0 ? `matching filters ${options.include ? `include: [${options.include.join(", ")}]` : ""}${options.include && options.exclude ? " " : ""}${options.exclude ? `exclude: [${options.exclude.join(", ")}]` : ""}` : "";
|
|
@@ -234297,7 +234300,7 @@ ${workspacePathsMatchingGlob.map((wsPath) => ` ${wsPath}`).join("\n")}`);
|
|
|
234297
234300
|
logger.info(`No dependencies matching upgrade specs found for subproject ${subproject.subprojectPath}`);
|
|
234298
234301
|
return;
|
|
234299
234302
|
}
|
|
234300
|
-
await applySecurityFixes(subproject.packageManagerName, rootDir,
|
|
234303
|
+
await applySecurityFixes(subproject.packageManagerName, rootDir, relative20(rootDir, subproject.subprojectPath) || ".", otherModulesCommunicator, workspaceToFixes, fixingData, signalFixApplied);
|
|
234301
234304
|
});
|
|
234302
234305
|
});
|
|
234303
234306
|
await subprojectPromiseQueue.onIdle();
|
|
@@ -234625,7 +234628,7 @@ var kleur_default = $;
|
|
|
234625
234628
|
// dist/cli-core.js
|
|
234626
234629
|
var import_lodash15 = __toESM(require_lodash(), 1);
|
|
234627
234630
|
import os2 from "os";
|
|
234628
|
-
import { join as join34, relative as
|
|
234631
|
+
import { join as join34, relative as relative21, resolve as resolve42 } from "path";
|
|
234629
234632
|
|
|
234630
234633
|
// ../utils/src/dashboard-api/shared-api.ts
|
|
234631
234634
|
var DashboardAPI = class {
|
|
@@ -238185,10 +238188,10 @@ function compareDocumentPosition(nodeA, nodeB) {
|
|
|
238185
238188
|
function uniqueSort(nodes) {
|
|
238186
238189
|
nodes = nodes.filter((node, i7, arr) => !arr.includes(node, i7 + 1));
|
|
238187
238190
|
nodes.sort((a4, b) => {
|
|
238188
|
-
const
|
|
238189
|
-
if (
|
|
238191
|
+
const relative22 = compareDocumentPosition(a4, b);
|
|
238192
|
+
if (relative22 & DocumentPosition.PRECEDING) {
|
|
238190
238193
|
return -1;
|
|
238191
|
-
} else if (
|
|
238194
|
+
} else if (relative22 & DocumentPosition.FOLLOWING) {
|
|
238192
238195
|
return 1;
|
|
238193
238196
|
}
|
|
238194
238197
|
return 0;
|
|
@@ -251418,7 +251421,7 @@ async function onlineScan(dependencyTree, apiKey, timeout) {
|
|
|
251418
251421
|
}
|
|
251419
251422
|
|
|
251420
251423
|
// dist/version.js
|
|
251421
|
-
var version3 = "14.12.
|
|
251424
|
+
var version3 = "14.12.174";
|
|
251422
251425
|
|
|
251423
251426
|
// dist/cli-core.js
|
|
251424
251427
|
var { mapValues, omit, partition, pickBy: pickBy2 } = import_lodash15.default;
|
|
@@ -251770,7 +251773,7 @@ var CliCore = class {
|
|
|
251770
251773
|
const { reachabilitySupport, traditionalScaSupport, noSupport } = manager.getSubprojectsWithWorkspacePaths();
|
|
251771
251774
|
await this.dashboardAPI.registerSubprojects([...reachabilitySupport, ...traditionalScaSupport, ...noSupport].map((sp) => ({
|
|
251772
251775
|
...sp,
|
|
251773
|
-
subprojectPath:
|
|
251776
|
+
subprojectPath: relative21(this.rootWorkingDirectory, sp.subprojectPath) || "."
|
|
251774
251777
|
})), this.reportId, this.apiKey);
|
|
251775
251778
|
for (const unsupported of noSupport)
|
|
251776
251779
|
logger.warn(unsupported.unsupportedMsg);
|
|
@@ -251799,7 +251802,7 @@ var CliCore = class {
|
|
|
251799
251802
|
await this.spinner.succeed();
|
|
251800
251803
|
} catch (error) {
|
|
251801
251804
|
if (this.options.ignoreFailingWorkspaces) {
|
|
251802
|
-
const relativeSubprojectPath =
|
|
251805
|
+
const relativeSubprojectPath = relative21(this.rootWorkingDirectory, subprojectAndWsPath.subprojectPath) || ".";
|
|
251803
251806
|
this.failedSubprojects.push({
|
|
251804
251807
|
subproject: relativeSubprojectPath,
|
|
251805
251808
|
error: error.message || "Unknown error"
|
|
@@ -251858,7 +251861,7 @@ Subproject: ${subproject}`);
|
|
|
251858
251861
|
}
|
|
251859
251862
|
async updateSpinnerTextOnNewSubproject(subprojectAndWsPath, numberSubprojects, index2) {
|
|
251860
251863
|
this.spinner.start();
|
|
251861
|
-
const relativeSubprojectPath =
|
|
251864
|
+
const relativeSubprojectPath = relative21(this.rootWorkingDirectory, subprojectAndWsPath.subprojectPath) || ".";
|
|
251862
251865
|
await this.spinner.setText(numberSubprojects > 1 ? `Processing subproject ${relativeSubprojectPath} (${index2 + 1}/${numberSubprojects})${+this.options.concurrency > 1 ? `. May process up to ${+this.options.concurrency - 1} other workspaces in parallel` : ""}` : `Processing ${relativeSubprojectPath}`);
|
|
251863
251866
|
}
|
|
251864
251867
|
async initialize() {
|
|
@@ -251941,7 +251944,7 @@ Subproject: ${subproject}`);
|
|
|
251941
251944
|
return workspaceToAugmentedVulnerabilities[workspacePath] !== void 0;
|
|
251942
251945
|
}).map((workspacePath) => {
|
|
251943
251946
|
return {
|
|
251944
|
-
subprojectPath:
|
|
251947
|
+
subprojectPath: relative21(this.rootWorkingDirectory, subprojectPath) || ".",
|
|
251945
251948
|
workspacePath,
|
|
251946
251949
|
directDependencies: projectInfo[workspacePath].dataForAnalysis.directDependenciesMap ?? {},
|
|
251947
251950
|
vulnerabilities: workspaceToAugmentedVulnerabilities[workspacePath],
|
|
@@ -252174,7 +252177,7 @@ Subproject: ${subproject}`);
|
|
|
252174
252177
|
async sendProgress(type, isStartEvent, subprojectPath, workspacePath) {
|
|
252175
252178
|
await this.dashboardAPI.registerCLIProgress({
|
|
252176
252179
|
type,
|
|
252177
|
-
...subprojectPath ? { subprojectPath:
|
|
252180
|
+
...subprojectPath ? { subprojectPath: relative21(this.rootWorkingDirectory, subprojectPath) || "." } : {},
|
|
252178
252181
|
...workspacePath ? { workspacePath } : {}
|
|
252179
252182
|
}, isStartEvent, this.reportId, this.apiKey);
|
|
252180
252183
|
}
|
|
@@ -252230,7 +252233,7 @@ Subproject: ${subproject}`);
|
|
|
252230
252233
|
dependencyTree: workspaceToPlainDependencyTree[workspacePath],
|
|
252231
252234
|
ecosystem: workspaceToPlainDependencyTree[workspacePath].ecosystem ?? "NPM",
|
|
252232
252235
|
workspacePath,
|
|
252233
|
-
subprojectPath:
|
|
252236
|
+
subprojectPath: relative21(rootWorkingDirectory, subprojectPath) || "."
|
|
252234
252237
|
}));
|
|
252235
252238
|
if (this.options.socketMode) {
|
|
252236
252239
|
this.reportDependencyTrees = workspacePaths.map((workspacePath) => ({
|
|
@@ -252238,7 +252241,7 @@ Subproject: ${subproject}`);
|
|
|
252238
252241
|
dependencyTree: projectInfo[workspacePath].dataForAnalysis.data.dependencyTree,
|
|
252239
252242
|
ecosystem: projectInfo[workspacePath].dataForAnalysis.data.dependencyTree.ecosystem ?? "NPM",
|
|
252240
252243
|
workspacePath,
|
|
252241
|
-
subprojectPath:
|
|
252244
|
+
subprojectPath: relative21(rootWorkingDirectory, subprojectPath) || "."
|
|
252242
252245
|
}));
|
|
252243
252246
|
}
|
|
252244
252247
|
if (this.shareWithDashboard)
|
|
@@ -252254,7 +252257,7 @@ Subproject: ${subproject}`);
|
|
|
252254
252257
|
} catch (e) {
|
|
252255
252258
|
logger.error(`Scanning for vulnerabilities failed for subproject ${subprojectPath} in workspace ${workspacePath}`);
|
|
252256
252259
|
if (this.options.ignoreFailingWorkspaces) {
|
|
252257
|
-
const relativeSubprojectPath =
|
|
252260
|
+
const relativeSubprojectPath = relative21(this.rootWorkingDirectory, subprojectPath) || ".";
|
|
252258
252261
|
this.failedWorkspaces.push({
|
|
252259
252262
|
subproject: relativeSubprojectPath,
|
|
252260
252263
|
workspace: workspacePath,
|
|
@@ -252273,7 +252276,7 @@ Subproject: ${subproject}`);
|
|
|
252273
252276
|
}
|
|
252274
252277
|
};
|
|
252275
252278
|
function getRelativeSubprojectPath(subprojectPath, projectDir) {
|
|
252276
|
-
return
|
|
252279
|
+
return relative21(projectDir, subprojectPath) || ".";
|
|
252277
252280
|
}
|
|
252278
252281
|
function getDependencyType(vulnChainDetails, codeAwareScanResults, directDependencies, reachability) {
|
|
252279
252282
|
if (reachability === "UNREACHABLE" || reachability === "UNKNOWN") {
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|