@coana-tech/cli 14.12.168 → 14.12.170
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 +36 -8
- package/package.json +1 -1
- package/reachability-analyzers-cli.mjs +36 -10
- 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
|
@@ -205427,7 +205427,7 @@ var TelemetryCollector = class _TelemetryCollector {
|
|
|
205427
205427
|
// ../utils/src/telemetry/analyzer-telemetry-server.ts
|
|
205428
205428
|
import { existsSync, readFileSync, watchFile, unwatchFile } from "fs";
|
|
205429
205429
|
import { unlink, writeFile } from "fs/promises";
|
|
205430
|
-
import { tmpdir } from "os";
|
|
205430
|
+
import { freemem, tmpdir } from "os";
|
|
205431
205431
|
import { join as join2 } from "path";
|
|
205432
205432
|
import { randomBytes } from "crypto";
|
|
205433
205433
|
var AnalyzerTelemetryServer = class {
|
|
@@ -205463,6 +205463,7 @@ var AnalyzerTelemetryServer = class {
|
|
|
205463
205463
|
try {
|
|
205464
205464
|
const parsed = JSON.parse(line);
|
|
205465
205465
|
const event = "data" in parsed && Object.keys(parsed).length === 1 ? parsed : { data: parsed };
|
|
205466
|
+
event.data.freeMemoryMB = freemem();
|
|
205466
205467
|
this.handler.onAnalyzerEvent(event);
|
|
205467
205468
|
} catch {
|
|
205468
205469
|
}
|
|
@@ -205685,11 +205686,37 @@ function argt(statics, ...values) {
|
|
|
205685
205686
|
if (carry !== void 0) res.push(carry);
|
|
205686
205687
|
return res;
|
|
205687
205688
|
}
|
|
205688
|
-
|
|
205689
|
-
|
|
205690
|
-
return
|
|
205691
|
-
|
|
205692
|
-
|
|
205689
|
+
function parseShellArgs(args2) {
|
|
205690
|
+
const s6 = args2.trim();
|
|
205691
|
+
if (!s6) return [];
|
|
205692
|
+
const result = [];
|
|
205693
|
+
let currentToken = "";
|
|
205694
|
+
let quoteChar = null;
|
|
205695
|
+
for (let i7 = 0; i7 < s6.length; i7++) {
|
|
205696
|
+
const char = s6[i7];
|
|
205697
|
+
if (quoteChar !== null) {
|
|
205698
|
+
if (quoteChar === '"' && char === "\\" && s6[i7 + 1] === '"') {
|
|
205699
|
+
currentToken += '"';
|
|
205700
|
+
i7++;
|
|
205701
|
+
} else if (char === quoteChar)
|
|
205702
|
+
quoteChar = null;
|
|
205703
|
+
else
|
|
205704
|
+
currentToken += char;
|
|
205705
|
+
} else {
|
|
205706
|
+
if (char === '"' || char === "'")
|
|
205707
|
+
quoteChar = char;
|
|
205708
|
+
else if (/\s/.test(char)) {
|
|
205709
|
+
if (currentToken.length) {
|
|
205710
|
+
result.push(currentToken);
|
|
205711
|
+
currentToken = "";
|
|
205712
|
+
}
|
|
205713
|
+
} else
|
|
205714
|
+
currentToken += char;
|
|
205715
|
+
}
|
|
205716
|
+
}
|
|
205717
|
+
if (quoteChar !== null) throw new Error(`Unclosed ${quoteChar} quote`);
|
|
205718
|
+
if (currentToken.length) result.push(currentToken);
|
|
205719
|
+
return result;
|
|
205693
205720
|
}
|
|
205694
205721
|
|
|
205695
205722
|
// ../utils/src/file-utils.ts
|
|
@@ -224700,7 +224727,7 @@ var TelemetryCollector2 = class _TelemetryCollector {
|
|
|
224700
224727
|
// ../utils/dist/telemetry/analyzer-telemetry-server.js
|
|
224701
224728
|
import { existsSync as existsSync10, readFileSync as readFileSync3, watchFile as watchFile2, unwatchFile as unwatchFile2 } from "fs";
|
|
224702
224729
|
import { unlink as unlink2, writeFile as writeFile5 } from "fs/promises";
|
|
224703
|
-
import { tmpdir as tmpdir3 } from "os";
|
|
224730
|
+
import { freemem as freemem2, tmpdir as tmpdir3 } from "os";
|
|
224704
224731
|
import { join as join10 } from "path";
|
|
224705
224732
|
import { randomBytes as randomBytes3 } from "crypto";
|
|
224706
224733
|
var AnalyzerTelemetryServer2 = class {
|
|
@@ -224739,6 +224766,7 @@ var AnalyzerTelemetryServer2 = class {
|
|
|
224739
224766
|
try {
|
|
224740
224767
|
const parsed = JSON.parse(line);
|
|
224741
224768
|
const event = "data" in parsed && Object.keys(parsed).length === 1 ? parsed : { data: parsed };
|
|
224769
|
+
event.data.freeMemoryMB = freemem2();
|
|
224742
224770
|
this.handler.onAnalyzerEvent(event);
|
|
224743
224771
|
} catch {
|
|
224744
224772
|
}
|
|
@@ -251307,7 +251335,7 @@ async function onlineScan(dependencyTree, apiKey, timeout) {
|
|
|
251307
251335
|
}
|
|
251308
251336
|
|
|
251309
251337
|
// dist/version.js
|
|
251310
|
-
var version3 = "14.12.
|
|
251338
|
+
var version3 = "14.12.170";
|
|
251311
251339
|
|
|
251312
251340
|
// dist/cli-core.js
|
|
251313
251341
|
var { mapValues, omit, partition, pickBy: pickBy2 } = import_lodash15.default;
|
package/package.json
CHANGED
|
@@ -81107,7 +81107,7 @@ var TelemetryCollector = class _TelemetryCollector {
|
|
|
81107
81107
|
// ../utils/src/telemetry/analyzer-telemetry-server.ts
|
|
81108
81108
|
import { existsSync, readFileSync, watchFile, unwatchFile } from "fs";
|
|
81109
81109
|
import { unlink, writeFile as writeFile2 } from "fs/promises";
|
|
81110
|
-
import { tmpdir } from "os";
|
|
81110
|
+
import { freemem, tmpdir } from "os";
|
|
81111
81111
|
import { join as join2 } from "path";
|
|
81112
81112
|
import { randomBytes } from "crypto";
|
|
81113
81113
|
var AnalyzerTelemetryServer = class {
|
|
@@ -81143,6 +81143,7 @@ var AnalyzerTelemetryServer = class {
|
|
|
81143
81143
|
try {
|
|
81144
81144
|
const parsed = JSON.parse(line);
|
|
81145
81145
|
const event = "data" in parsed && Object.keys(parsed).length === 1 ? parsed : { data: parsed };
|
|
81146
|
+
event.data.freeMemoryMB = freemem();
|
|
81146
81147
|
this.handler.onAnalyzerEvent(event);
|
|
81147
81148
|
} catch {
|
|
81148
81149
|
}
|
|
@@ -81373,11 +81374,37 @@ function argt(statics, ...values) {
|
|
|
81373
81374
|
if (carry !== void 0) res.push(carry);
|
|
81374
81375
|
return res;
|
|
81375
81376
|
}
|
|
81376
|
-
|
|
81377
|
-
|
|
81378
|
-
return
|
|
81379
|
-
|
|
81380
|
-
|
|
81377
|
+
function parseShellArgs(args) {
|
|
81378
|
+
const s2 = args.trim();
|
|
81379
|
+
if (!s2) return [];
|
|
81380
|
+
const result = [];
|
|
81381
|
+
let currentToken = "";
|
|
81382
|
+
let quoteChar = null;
|
|
81383
|
+
for (let i4 = 0; i4 < s2.length; i4++) {
|
|
81384
|
+
const char = s2[i4];
|
|
81385
|
+
if (quoteChar !== null) {
|
|
81386
|
+
if (quoteChar === '"' && char === "\\" && s2[i4 + 1] === '"') {
|
|
81387
|
+
currentToken += '"';
|
|
81388
|
+
i4++;
|
|
81389
|
+
} else if (char === quoteChar)
|
|
81390
|
+
quoteChar = null;
|
|
81391
|
+
else
|
|
81392
|
+
currentToken += char;
|
|
81393
|
+
} else {
|
|
81394
|
+
if (char === '"' || char === "'")
|
|
81395
|
+
quoteChar = char;
|
|
81396
|
+
else if (/\s/.test(char)) {
|
|
81397
|
+
if (currentToken.length) {
|
|
81398
|
+
result.push(currentToken);
|
|
81399
|
+
currentToken = "";
|
|
81400
|
+
}
|
|
81401
|
+
} else
|
|
81402
|
+
currentToken += char;
|
|
81403
|
+
}
|
|
81404
|
+
}
|
|
81405
|
+
if (quoteChar !== null) throw new Error(`Unclosed ${quoteChar} quote`);
|
|
81406
|
+
if (currentToken.length) result.push(currentToken);
|
|
81407
|
+
return result;
|
|
81381
81408
|
}
|
|
81382
81409
|
|
|
81383
81410
|
// ../utils/src/command-utils-with-debug-logging.ts
|
|
@@ -110075,7 +110102,7 @@ import { existsSync as existsSync8, readdirSync as readdirSync4, statSync as sta
|
|
|
110075
110102
|
import { join as join13 } from "path";
|
|
110076
110103
|
var { memoize } = import_lodash7.default;
|
|
110077
110104
|
var memoizedParseShellArgs = memoize(parseShellArgs);
|
|
110078
|
-
|
|
110105
|
+
function getMavenCLIOpts() {
|
|
110079
110106
|
const opts = process.env.MAVEN_CLI_OPTS;
|
|
110080
110107
|
return opts ? memoizedParseShellArgs(opts) : [];
|
|
110081
110108
|
}
|
|
@@ -110090,7 +110117,7 @@ async function isMavenInstalled() {
|
|
|
110090
110117
|
async function findLocalRepository() {
|
|
110091
110118
|
try {
|
|
110092
110119
|
return await runCommandResolveStdOut2(
|
|
110093
|
-
cmdt`mvn ${
|
|
110120
|
+
cmdt`mvn ${getMavenCLIOpts()} help:evaluate -Dexpression=settings.localRepository -q -DforceStdout`
|
|
110094
110121
|
);
|
|
110095
110122
|
} catch (e) {
|
|
110096
110123
|
return void 0;
|
|
@@ -111006,7 +111033,6 @@ async function runJellyAnalysis(mainProjectRoot, projectRoot, jellyOptions, reac
|
|
|
111006
111033
|
await writeFile7(vulnerabilitiesFile, JSON.stringify(vulnerabilitiesInJellyFormat));
|
|
111007
111034
|
const useLazy = experiment === "LAZY_EXPERIMENT" || reachabilityAnalysisOptions.lazy;
|
|
111008
111035
|
const { includePackages } = jellyOptions;
|
|
111009
|
-
const additionalFlags = process.env.JELLY_ADDITIONAL_FLAGS?.split(/\s+/).filter(Boolean) ?? [];
|
|
111010
111036
|
const jellyCmd = cmdt`
|
|
111011
111037
|
${await getNodeExecutable(ToolPathResolver.nodeExecutablePath)} --max-old-space-size=${reachabilityAnalysisOptions.memoryLimitInMB ?? 8192}
|
|
111012
111038
|
${logFile && // Enable verbose GC tracing if log file is requested
|
|
@@ -111023,7 +111049,7 @@ async function runJellyAnalysis(mainProjectRoot, projectRoot, jellyOptions, reac
|
|
|
111023
111049
|
${!!includePackages && (includePackages.length ? ["--include-packages", ...includePackages] : ["--ignore-dependencies"])}
|
|
111024
111050
|
${jellyOptions.approx && "--approx"}
|
|
111025
111051
|
--callstacks-json ${callStackFile}
|
|
111026
|
-
${
|
|
111052
|
+
${parseShellArgs(process.env.JELLY_ADDITIONAL_FLAGS ?? "")}
|
|
111027
111053
|
${filesToAnalyze}
|
|
111028
111054
|
`;
|
|
111029
111055
|
if (PRINT_JELLY_COMMAND)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|