@coana-tech/cli 14.12.171 → 14.12.173
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 +193 -115
- package/package.json +1 -1
- package/reachability-analyzers-cli.mjs +5 -4
- 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
|
@@ -13839,7 +13839,7 @@ var require_has_flag = __commonJS({
|
|
|
13839
13839
|
var require_supports_color = __commonJS({
|
|
13840
13840
|
"../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js"(exports2, module2) {
|
|
13841
13841
|
"use strict";
|
|
13842
|
-
var
|
|
13842
|
+
var os3 = __require("os");
|
|
13843
13843
|
var tty2 = __require("tty");
|
|
13844
13844
|
var hasFlag = require_has_flag();
|
|
13845
13845
|
var { env } = process;
|
|
@@ -13896,7 +13896,7 @@ var require_supports_color = __commonJS({
|
|
|
13896
13896
|
return min;
|
|
13897
13897
|
}
|
|
13898
13898
|
if (process.platform === "win32") {
|
|
13899
|
-
const osRelease =
|
|
13899
|
+
const osRelease = os3.release().split(".");
|
|
13900
13900
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
13901
13901
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
13902
13902
|
}
|
|
@@ -14866,8 +14866,8 @@ var require_utils = __commonJS({
|
|
|
14866
14866
|
exports2.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/");
|
|
14867
14867
|
exports2.isWindows = () => {
|
|
14868
14868
|
if (typeof navigator !== "undefined" && navigator.platform) {
|
|
14869
|
-
const
|
|
14870
|
-
return
|
|
14869
|
+
const platform10 = navigator.platform.toLowerCase();
|
|
14870
|
+
return platform10 === "win32" || platform10 === "windows";
|
|
14871
14871
|
}
|
|
14872
14872
|
if (typeof process !== "undefined" && process.platform) {
|
|
14873
14873
|
return process.platform === "win32";
|
|
@@ -16282,7 +16282,7 @@ var require_has_flag2 = __commonJS({
|
|
|
16282
16282
|
var require_supports_colors = __commonJS({
|
|
16283
16283
|
"../../node_modules/.pnpm/@colors+colors@1.6.0/node_modules/@colors/colors/lib/system/supports-colors.js"(exports2, module2) {
|
|
16284
16284
|
"use strict";
|
|
16285
|
-
var
|
|
16285
|
+
var os3 = __require("os");
|
|
16286
16286
|
var hasFlag = require_has_flag2();
|
|
16287
16287
|
var env = process.env;
|
|
16288
16288
|
var forceColor = void 0;
|
|
@@ -16320,7 +16320,7 @@ var require_supports_colors = __commonJS({
|
|
|
16320
16320
|
}
|
|
16321
16321
|
var min = forceColor ? 1 : 0;
|
|
16322
16322
|
if (process.platform === "win32") {
|
|
16323
|
-
var osRelease =
|
|
16323
|
+
var osRelease = os3.release().split(".");
|
|
16324
16324
|
if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
16325
16325
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
16326
16326
|
}
|
|
@@ -21554,7 +21554,7 @@ var require_winston_transport = __commonJS({
|
|
|
21554
21554
|
var require_console = __commonJS({
|
|
21555
21555
|
"../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/transports/console.js"(exports2, module2) {
|
|
21556
21556
|
"use strict";
|
|
21557
|
-
var
|
|
21557
|
+
var os3 = __require("os");
|
|
21558
21558
|
var { LEVEL, MESSAGE } = require_triple_beam();
|
|
21559
21559
|
var TransportStream = require_winston_transport();
|
|
21560
21560
|
module2.exports = class Console extends TransportStream {
|
|
@@ -21568,7 +21568,7 @@ var require_console = __commonJS({
|
|
|
21568
21568
|
this.name = options.name || "console";
|
|
21569
21569
|
this.stderrLevels = this._stringArrayToSet(options.stderrLevels);
|
|
21570
21570
|
this.consoleWarnLevels = this._stringArrayToSet(options.consoleWarnLevels);
|
|
21571
|
-
this.eol = typeof options.eol === "string" ? options.eol :
|
|
21571
|
+
this.eol = typeof options.eol === "string" ? options.eol : os3.EOL;
|
|
21572
21572
|
this.forceConsole = options.forceConsole || false;
|
|
21573
21573
|
this._consoleLog = console.log.bind(console);
|
|
21574
21574
|
this._consoleWarn = console.warn.bind(console);
|
|
@@ -24582,7 +24582,7 @@ var require_file = __commonJS({
|
|
|
24582
24582
|
var { Stream: Stream2, PassThrough } = require_readable();
|
|
24583
24583
|
var TransportStream = require_winston_transport();
|
|
24584
24584
|
var debug = require_node3()("winston:file");
|
|
24585
|
-
var
|
|
24585
|
+
var os3 = __require("os");
|
|
24586
24586
|
var tailFile = require_tail_file();
|
|
24587
24587
|
module2.exports = class File extends TransportStream {
|
|
24588
24588
|
/**
|
|
@@ -24620,7 +24620,7 @@ var require_file = __commonJS({
|
|
|
24620
24620
|
this.rotationFormat = options.rotationFormat || false;
|
|
24621
24621
|
this.zippedArchive = options.zippedArchive || false;
|
|
24622
24622
|
this.maxFiles = options.maxFiles || null;
|
|
24623
|
-
this.eol = typeof options.eol === "string" ? options.eol :
|
|
24623
|
+
this.eol = typeof options.eol === "string" ? options.eol : os3.EOL;
|
|
24624
24624
|
this.tailable = options.tailable || false;
|
|
24625
24625
|
this.lazy = options.lazy || false;
|
|
24626
24626
|
this._size = 0;
|
|
@@ -25401,7 +25401,7 @@ var require_stream2 = __commonJS({
|
|
|
25401
25401
|
"use strict";
|
|
25402
25402
|
var isStream3 = require_is_stream();
|
|
25403
25403
|
var { MESSAGE } = require_triple_beam();
|
|
25404
|
-
var
|
|
25404
|
+
var os3 = __require("os");
|
|
25405
25405
|
var TransportStream = require_winston_transport();
|
|
25406
25406
|
module2.exports = class Stream extends TransportStream {
|
|
25407
25407
|
/**
|
|
@@ -25417,7 +25417,7 @@ var require_stream2 = __commonJS({
|
|
|
25417
25417
|
this._stream = options.stream;
|
|
25418
25418
|
this._stream.setMaxListeners(Infinity);
|
|
25419
25419
|
this.isObjectMode = options.stream._writableState.objectMode;
|
|
25420
|
-
this.eol = typeof options.eol === "string" ? options.eol :
|
|
25420
|
+
this.eol = typeof options.eol === "string" ? options.eol : os3.EOL;
|
|
25421
25421
|
}
|
|
25422
25422
|
/**
|
|
25423
25423
|
* Core logging method exposed to Winston.
|
|
@@ -25800,7 +25800,7 @@ var require_exception_stream = __commonJS({
|
|
|
25800
25800
|
var require_exception_handler = __commonJS({
|
|
25801
25801
|
"../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/exception-handler.js"(exports2, module2) {
|
|
25802
25802
|
"use strict";
|
|
25803
|
-
var
|
|
25803
|
+
var os3 = __require("os");
|
|
25804
25804
|
var asyncForEach2 = require_forEach();
|
|
25805
25805
|
var debug = require_node3()("winston:exception");
|
|
25806
25806
|
var once9 = require_one_time();
|
|
@@ -25895,8 +25895,8 @@ var require_exception_handler = __commonJS({
|
|
|
25895
25895
|
*/
|
|
25896
25896
|
getOsInfo() {
|
|
25897
25897
|
return {
|
|
25898
|
-
loadavg:
|
|
25899
|
-
uptime:
|
|
25898
|
+
loadavg: os3.loadavg(),
|
|
25899
|
+
uptime: os3.uptime()
|
|
25900
25900
|
};
|
|
25901
25901
|
}
|
|
25902
25902
|
/**
|
|
@@ -26038,7 +26038,7 @@ var require_rejection_stream = __commonJS({
|
|
|
26038
26038
|
var require_rejection_handler = __commonJS({
|
|
26039
26039
|
"../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/rejection-handler.js"(exports2, module2) {
|
|
26040
26040
|
"use strict";
|
|
26041
|
-
var
|
|
26041
|
+
var os3 = __require("os");
|
|
26042
26042
|
var asyncForEach2 = require_forEach();
|
|
26043
26043
|
var debug = require_node3()("winston:rejection");
|
|
26044
26044
|
var once9 = require_one_time();
|
|
@@ -26135,8 +26135,8 @@ var require_rejection_handler = __commonJS({
|
|
|
26135
26135
|
*/
|
|
26136
26136
|
getOsInfo() {
|
|
26137
26137
|
return {
|
|
26138
|
-
loadavg:
|
|
26139
|
-
uptime:
|
|
26138
|
+
loadavg: os3.loadavg(),
|
|
26139
|
+
uptime: os3.uptime()
|
|
26140
26140
|
};
|
|
26141
26141
|
}
|
|
26142
26142
|
/**
|
|
@@ -33617,7 +33617,7 @@ var require_ansi_styles = __commonJS({
|
|
|
33617
33617
|
var require_supports_color2 = __commonJS({
|
|
33618
33618
|
"../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(exports2, module2) {
|
|
33619
33619
|
"use strict";
|
|
33620
|
-
var
|
|
33620
|
+
var os3 = __require("os");
|
|
33621
33621
|
var tty2 = __require("tty");
|
|
33622
33622
|
var hasFlag = require_has_flag();
|
|
33623
33623
|
var { env } = process;
|
|
@@ -33665,7 +33665,7 @@ var require_supports_color2 = __commonJS({
|
|
|
33665
33665
|
return min;
|
|
33666
33666
|
}
|
|
33667
33667
|
if (process.platform === "win32") {
|
|
33668
|
-
const osRelease =
|
|
33668
|
+
const osRelease = os3.release().split(".");
|
|
33669
33669
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
33670
33670
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
33671
33671
|
}
|
|
@@ -55383,15 +55383,15 @@ var require_bole = __commonJS({
|
|
|
55383
55383
|
var individual = require_individual()("$$bole", { fastTime: false });
|
|
55384
55384
|
var format6 = require_format2();
|
|
55385
55385
|
var levels = "debug info warn error".split(" ");
|
|
55386
|
-
var
|
|
55386
|
+
var os3 = __require("os");
|
|
55387
55387
|
var pid = process.pid;
|
|
55388
55388
|
var hasObjMode = false;
|
|
55389
55389
|
var scache = [];
|
|
55390
55390
|
var hostname;
|
|
55391
55391
|
try {
|
|
55392
|
-
hostname =
|
|
55392
|
+
hostname = os3.hostname();
|
|
55393
55393
|
} catch (e) {
|
|
55394
|
-
hostname =
|
|
55394
|
+
hostname = os3.version().indexOf("Windows 7 ") === 0 ? "windows7" : "hostname-unknown";
|
|
55395
55395
|
}
|
|
55396
55396
|
var hostnameSt = _stringify(hostname);
|
|
55397
55397
|
for (const level of levels) {
|
|
@@ -56426,8 +56426,8 @@ var require_path_key = __commonJS({
|
|
|
56426
56426
|
"use strict";
|
|
56427
56427
|
var pathKey = (options = {}) => {
|
|
56428
56428
|
const environment = options.env || process.env;
|
|
56429
|
-
const
|
|
56430
|
-
if (
|
|
56429
|
+
const platform10 = options.platform || process.platform;
|
|
56430
|
+
if (platform10 !== "win32") {
|
|
56431
56431
|
return "PATH";
|
|
56432
56432
|
}
|
|
56433
56433
|
return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
|
|
@@ -57273,7 +57273,7 @@ var require_stdio = __commonJS({
|
|
|
57273
57273
|
var require_kill = __commonJS({
|
|
57274
57274
|
"../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/kill.js"(exports2, module2) {
|
|
57275
57275
|
"use strict";
|
|
57276
|
-
var
|
|
57276
|
+
var os3 = __require("os");
|
|
57277
57277
|
var onExit = require_signal_exit();
|
|
57278
57278
|
var DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5;
|
|
57279
57279
|
var spawnedKill = (kill, signal = "SIGTERM", options = {}) => {
|
|
@@ -57297,7 +57297,7 @@ var require_kill = __commonJS({
|
|
|
57297
57297
|
return isSigterm(signal) && forceKillAfterTimeout !== false && killResult;
|
|
57298
57298
|
};
|
|
57299
57299
|
var isSigterm = (signal) => {
|
|
57300
|
-
return signal ===
|
|
57300
|
+
return signal === os3.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM";
|
|
57301
57301
|
};
|
|
57302
57302
|
var getForceKillAfterTimeout = ({ forceKillAfterTimeout = true }) => {
|
|
57303
57303
|
if (forceKillAfterTimeout === true) {
|
|
@@ -63205,7 +63205,7 @@ var require_ip = __commonJS({
|
|
|
63205
63205
|
"../../node_modules/.pnpm/ip@2.0.0/node_modules/ip/lib/ip.js"(exports2) {
|
|
63206
63206
|
var ip = exports2;
|
|
63207
63207
|
var { Buffer: Buffer3 } = __require("buffer");
|
|
63208
|
-
var
|
|
63208
|
+
var os3 = __require("os");
|
|
63209
63209
|
ip.toBuffer = function(ip2, buff, offset) {
|
|
63210
63210
|
offset = ~~offset;
|
|
63211
63211
|
let result;
|
|
@@ -63455,7 +63455,7 @@ var require_ip = __commonJS({
|
|
|
63455
63455
|
return family === "ipv4" ? "127.0.0.1" : "fe80::1";
|
|
63456
63456
|
};
|
|
63457
63457
|
ip.address = function(name2, family) {
|
|
63458
|
-
const interfaces =
|
|
63458
|
+
const interfaces = os3.networkInterfaces();
|
|
63459
63459
|
family = _normalizeFamily(family);
|
|
63460
63460
|
if (name2 && name2 !== "private" && name2 !== "public") {
|
|
63461
63461
|
const res = interfaces[name2].filter((details) => {
|
|
@@ -69910,7 +69910,7 @@ var require_lockfile = __commonJS({
|
|
|
69910
69910
|
}
|
|
69911
69911
|
const file = _ref22;
|
|
69912
69912
|
if (yield exists2(file)) {
|
|
69913
|
-
return
|
|
69913
|
+
return readFile39(file);
|
|
69914
69914
|
}
|
|
69915
69915
|
}
|
|
69916
69916
|
return null;
|
|
@@ -69929,7 +69929,7 @@ var require_lockfile = __commonJS({
|
|
|
69929
69929
|
})();
|
|
69930
69930
|
let readJsonAndFile = exports3.readJsonAndFile = (() => {
|
|
69931
69931
|
var _ref24 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (loc) {
|
|
69932
|
-
const file = yield
|
|
69932
|
+
const file = yield readFile39(loc);
|
|
69933
69933
|
try {
|
|
69934
69934
|
return {
|
|
69935
69935
|
object: (0, (_map || _load_map()).default)(JSON.parse(stripBOM2(file))),
|
|
@@ -70169,7 +70169,7 @@ var require_lockfile = __commonJS({
|
|
|
70169
70169
|
};
|
|
70170
70170
|
})();
|
|
70171
70171
|
exports3.copy = copy;
|
|
70172
|
-
exports3.readFile =
|
|
70172
|
+
exports3.readFile = readFile39;
|
|
70173
70173
|
exports3.readFileRaw = readFileRaw;
|
|
70174
70174
|
exports3.normalizeOS = normalizeOS;
|
|
70175
70175
|
var _fs;
|
|
@@ -70267,7 +70267,7 @@ var require_lockfile = __commonJS({
|
|
|
70267
70267
|
});
|
|
70268
70268
|
});
|
|
70269
70269
|
}
|
|
70270
|
-
function
|
|
70270
|
+
function readFile39(loc) {
|
|
70271
70271
|
return _readFile(loc, "utf8").then(normalizeOS);
|
|
70272
70272
|
}
|
|
70273
70273
|
function readFileRaw(loc) {
|
|
@@ -70287,7 +70287,7 @@ var require_lockfile = __commonJS({
|
|
|
70287
70287
|
value: true
|
|
70288
70288
|
});
|
|
70289
70289
|
exports3.getPathKey = getPathKey;
|
|
70290
|
-
const
|
|
70290
|
+
const os3 = __webpack_require__(36);
|
|
70291
70291
|
const path9 = __webpack_require__(0);
|
|
70292
70292
|
const userHome = __webpack_require__(45).default;
|
|
70293
70293
|
var _require = __webpack_require__(171);
|
|
@@ -70311,9 +70311,9 @@ var require_lockfile = __commonJS({
|
|
|
70311
70311
|
function getPreferredCacheDirectories() {
|
|
70312
70312
|
const preferredCacheDirectories = [getCacheDir()];
|
|
70313
70313
|
if (process.getuid) {
|
|
70314
|
-
preferredCacheDirectories.push(path9.join(
|
|
70314
|
+
preferredCacheDirectories.push(path9.join(os3.tmpdir(), `.yarn-cache-${process.getuid()}`));
|
|
70315
70315
|
}
|
|
70316
|
-
preferredCacheDirectories.push(path9.join(
|
|
70316
|
+
preferredCacheDirectories.push(path9.join(os3.tmpdir(), `.yarn-cache`));
|
|
70317
70317
|
return preferredCacheDirectories;
|
|
70318
70318
|
}
|
|
70319
70319
|
const PREFERRED_MODULE_CACHE_DIRECTORIES = exports3.PREFERRED_MODULE_CACHE_DIRECTORIES = getPreferredCacheDirectories();
|
|
@@ -70346,9 +70346,9 @@ var require_lockfile = __commonJS({
|
|
|
70346
70346
|
const SINGLE_INSTANCE_PORT = exports3.SINGLE_INSTANCE_PORT = 31997;
|
|
70347
70347
|
const SINGLE_INSTANCE_FILENAME = exports3.SINGLE_INSTANCE_FILENAME = ".yarn-single-instance";
|
|
70348
70348
|
const ENV_PATH_KEY = exports3.ENV_PATH_KEY = getPathKey(process.platform, process.env);
|
|
70349
|
-
function getPathKey(
|
|
70349
|
+
function getPathKey(platform10, env) {
|
|
70350
70350
|
let pathKey = "PATH";
|
|
70351
|
-
if (
|
|
70351
|
+
if (platform10 === "win32") {
|
|
70352
70352
|
pathKey = "Path";
|
|
70353
70353
|
for (const key in env) {
|
|
70354
70354
|
if (key.toLowerCase() === "path") {
|
|
@@ -99844,11 +99844,11 @@ var require_command3 = __commonJS({
|
|
|
99844
99844
|
};
|
|
99845
99845
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
99846
99846
|
exports2.issue = exports2.issueCommand = void 0;
|
|
99847
|
-
var
|
|
99847
|
+
var os3 = __importStar(__require("os"));
|
|
99848
99848
|
var utils_1 = require_utils6();
|
|
99849
99849
|
function issueCommand(command, properties, message2) {
|
|
99850
99850
|
const cmd = new Command2(command, properties, message2);
|
|
99851
|
-
process.stdout.write(cmd.toString() +
|
|
99851
|
+
process.stdout.write(cmd.toString() + os3.EOL);
|
|
99852
99852
|
}
|
|
99853
99853
|
exports2.issueCommand = issueCommand;
|
|
99854
99854
|
function issue(name2, message2 = "") {
|
|
@@ -100260,7 +100260,7 @@ var require_file_command = __commonJS({
|
|
|
100260
100260
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
100261
100261
|
exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0;
|
|
100262
100262
|
var fs11 = __importStar(__require("fs"));
|
|
100263
|
-
var
|
|
100263
|
+
var os3 = __importStar(__require("os"));
|
|
100264
100264
|
var uuid_1 = (init_esm_node(), __toCommonJS(esm_node_exports));
|
|
100265
100265
|
var utils_1 = require_utils6();
|
|
100266
100266
|
function issueFileCommand(command, message2) {
|
|
@@ -100271,7 +100271,7 @@ var require_file_command = __commonJS({
|
|
|
100271
100271
|
if (!fs11.existsSync(filePath)) {
|
|
100272
100272
|
throw new Error(`Missing file at path: ${filePath}`);
|
|
100273
100273
|
}
|
|
100274
|
-
fs11.appendFileSync(filePath, `${utils_1.toCommandValue(message2)}${
|
|
100274
|
+
fs11.appendFileSync(filePath, `${utils_1.toCommandValue(message2)}${os3.EOL}`, {
|
|
100275
100275
|
encoding: "utf8"
|
|
100276
100276
|
});
|
|
100277
100277
|
}
|
|
@@ -100285,7 +100285,7 @@ var require_file_command = __commonJS({
|
|
|
100285
100285
|
if (convertedValue.includes(delimiter)) {
|
|
100286
100286
|
throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`);
|
|
100287
100287
|
}
|
|
100288
|
-
return `${key}<<${delimiter}${
|
|
100288
|
+
return `${key}<<${delimiter}${os3.EOL}${convertedValue}${os3.EOL}${delimiter}`;
|
|
100289
100289
|
}
|
|
100290
100290
|
exports2.prepareKeyValueMessage = prepareKeyValueMessage;
|
|
100291
100291
|
}
|
|
@@ -118575,7 +118575,7 @@ var require_core4 = __commonJS({
|
|
|
118575
118575
|
var command_1 = require_command3();
|
|
118576
118576
|
var file_command_1 = require_file_command();
|
|
118577
118577
|
var utils_1 = require_utils6();
|
|
118578
|
-
var
|
|
118578
|
+
var os3 = __importStar(__require("os"));
|
|
118579
118579
|
var path9 = __importStar(__require("path"));
|
|
118580
118580
|
var oidc_utils_1 = require_oidc_utils();
|
|
118581
118581
|
var ExitCode;
|
|
@@ -118643,7 +118643,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
|
|
|
118643
118643
|
if (filePath) {
|
|
118644
118644
|
return file_command_1.issueFileCommand("OUTPUT", file_command_1.prepareKeyValueMessage(name2, value2));
|
|
118645
118645
|
}
|
|
118646
|
-
process.stdout.write(
|
|
118646
|
+
process.stdout.write(os3.EOL);
|
|
118647
118647
|
command_1.issueCommand("set-output", { name: name2 }, utils_1.toCommandValue(value2));
|
|
118648
118648
|
}
|
|
118649
118649
|
exports2.setOutput = setOutput;
|
|
@@ -118677,7 +118677,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
|
|
|
118677
118677
|
}
|
|
118678
118678
|
exports2.notice = notice;
|
|
118679
118679
|
function info(message2) {
|
|
118680
|
-
process.stdout.write(message2 +
|
|
118680
|
+
process.stdout.write(message2 + os3.EOL);
|
|
118681
118681
|
}
|
|
118682
118682
|
exports2.info = info;
|
|
118683
118683
|
function startGroup(name2) {
|
|
@@ -121394,16 +121394,16 @@ var require_rimraf2 = __commonJS({
|
|
|
121394
121394
|
var require_tmp = __commonJS({
|
|
121395
121395
|
"../../node_modules/.pnpm/tmp@0.2.1/node_modules/tmp/lib/tmp.js"(exports2, module2) {
|
|
121396
121396
|
var fs11 = __require("fs");
|
|
121397
|
-
var
|
|
121397
|
+
var os3 = __require("os");
|
|
121398
121398
|
var path9 = __require("path");
|
|
121399
121399
|
var crypto7 = __require("crypto");
|
|
121400
|
-
var _c = { fs: fs11.constants, os:
|
|
121400
|
+
var _c = { fs: fs11.constants, os: os3.constants };
|
|
121401
121401
|
var rimraf = require_rimraf2();
|
|
121402
121402
|
var RANDOM_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
|
121403
121403
|
var TEMPLATE_PATTERN = /XXXXXX/;
|
|
121404
121404
|
var DEFAULT_TRIES = 3;
|
|
121405
121405
|
var CREATE_FLAGS = (_c.O_CREAT || _c.fs.O_CREAT) | (_c.O_EXCL || _c.fs.O_EXCL) | (_c.O_RDWR || _c.fs.O_RDWR);
|
|
121406
|
-
var IS_WIN32 =
|
|
121406
|
+
var IS_WIN32 = os3.platform() === "win32";
|
|
121407
121407
|
var EBADF = _c.EBADF || _c.os.errno.EBADF;
|
|
121408
121408
|
var ENOENT2 = _c.ENOENT || _c.os.errno.ENOENT;
|
|
121409
121409
|
var DIR_MODE = 448;
|
|
@@ -121687,7 +121687,7 @@ var require_tmp = __commonJS({
|
|
|
121687
121687
|
_gracefulCleanup = true;
|
|
121688
121688
|
}
|
|
121689
121689
|
function _getTmpDir(options) {
|
|
121690
|
-
return path9.resolve(_sanitizeName(options && options.tmpdir ||
|
|
121690
|
+
return path9.resolve(_sanitizeName(options && options.tmpdir || os3.tmpdir()));
|
|
121691
121691
|
}
|
|
121692
121692
|
process.addListener(EXIT, _garbageCollector);
|
|
121693
121693
|
Object.defineProperty(module2.exports, "tmpdir", {
|
|
@@ -155022,9 +155022,9 @@ var require_path = __commonJS({
|
|
|
155022
155022
|
"use strict";
|
|
155023
155023
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
155024
155024
|
exports2.convertPosixPathToPattern = exports2.convertWindowsPathToPattern = exports2.convertPathToPattern = exports2.escapePosixPath = exports2.escapeWindowsPath = exports2.escape = exports2.removeLeadingDotSegment = exports2.makeAbsolute = exports2.unixify = void 0;
|
|
155025
|
-
var
|
|
155025
|
+
var os3 = __require("os");
|
|
155026
155026
|
var path9 = __require("path");
|
|
155027
|
-
var IS_WINDOWS_PLATFORM =
|
|
155027
|
+
var IS_WINDOWS_PLATFORM = os3.platform() === "win32";
|
|
155028
155028
|
var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
|
|
155029
155029
|
var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;
|
|
155030
155030
|
var WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g;
|
|
@@ -157494,8 +157494,8 @@ var require_settings4 = __commonJS({
|
|
|
157494
157494
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
157495
157495
|
exports2.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
|
|
157496
157496
|
var fs11 = __require("fs");
|
|
157497
|
-
var
|
|
157498
|
-
var CPU_COUNT = Math.max(
|
|
157497
|
+
var os3 = __require("os");
|
|
157498
|
+
var CPU_COUNT = Math.max(os3.cpus().length, 1);
|
|
157499
157499
|
exports2.DEFAULT_FILE_SYSTEM_ADAPTER = {
|
|
157500
157500
|
lstat: fs11.lstat,
|
|
157501
157501
|
lstatSync: fs11.lstatSync,
|
|
@@ -176205,7 +176205,7 @@ var require_client_metadata = __commonJS({
|
|
|
176205
176205
|
"use strict";
|
|
176206
176206
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
176207
176207
|
exports2.getFAASEnv = exports2.makeClientMetadata = exports2.LimitedSizeDocument = void 0;
|
|
176208
|
-
var
|
|
176208
|
+
var os3 = __require("os");
|
|
176209
176209
|
var process2 = __require("process");
|
|
176210
176210
|
var bson_1 = require_bson2();
|
|
176211
176211
|
var error_1 = require_error5();
|
|
@@ -176243,7 +176243,7 @@ var require_client_metadata = __commonJS({
|
|
|
176243
176243
|
const name3 = Buffer.byteLength(appName, "utf8") <= 128 ? options.appName : Buffer.from(appName, "utf8").subarray(0, 128).toString("utf8");
|
|
176244
176244
|
metadataDocument.ifItFitsItSits("application", { name: name3 });
|
|
176245
176245
|
}
|
|
176246
|
-
const { name: name2 = "", version: version4 = "", platform:
|
|
176246
|
+
const { name: name2 = "", version: version4 = "", platform: platform10 = "" } = options.driverInfo;
|
|
176247
176247
|
const driverInfo = {
|
|
176248
176248
|
name: name2.length > 0 ? `nodejs|${name2}` : "nodejs",
|
|
176249
176249
|
version: version4.length > 0 ? `${NODE_DRIVER_VERSION}|${version4}` : NODE_DRIVER_VERSION
|
|
@@ -176252,13 +176252,13 @@ var require_client_metadata = __commonJS({
|
|
|
176252
176252
|
throw new error_1.MongoInvalidArgumentError("Unable to include driverInfo name and version, metadata cannot exceed 512 bytes");
|
|
176253
176253
|
}
|
|
176254
176254
|
let runtimeInfo = getRuntimeInfo();
|
|
176255
|
-
if (
|
|
176256
|
-
runtimeInfo = `${runtimeInfo}|${
|
|
176255
|
+
if (platform10.length > 0) {
|
|
176256
|
+
runtimeInfo = `${runtimeInfo}|${platform10}`;
|
|
176257
176257
|
}
|
|
176258
176258
|
if (!metadataDocument.ifItFitsItSits("platform", runtimeInfo)) {
|
|
176259
176259
|
throw new error_1.MongoInvalidArgumentError("Unable to include driverInfo platform, metadata cannot exceed 512 bytes");
|
|
176260
176260
|
}
|
|
176261
|
-
const osInfo = (/* @__PURE__ */ new Map()).set("name", process2.platform).set("architecture", process2.arch).set("version",
|
|
176261
|
+
const osInfo = (/* @__PURE__ */ new Map()).set("name", process2.platform).set("architecture", process2.arch).set("version", os3.release()).set("type", os3.type());
|
|
176262
176262
|
if (!metadataDocument.ifItFitsItSits("os", osInfo)) {
|
|
176263
176263
|
for (const key of osInfo.keys()) {
|
|
176264
176264
|
osInfo.delete(key);
|
|
@@ -176330,13 +176330,13 @@ var require_client_metadata = __commonJS({
|
|
|
176330
176330
|
function getRuntimeInfo() {
|
|
176331
176331
|
if ("Deno" in globalThis) {
|
|
176332
176332
|
const version4 = typeof Deno?.version?.deno === "string" ? Deno?.version?.deno : "0.0.0-unknown";
|
|
176333
|
-
return `Deno v${version4}, ${
|
|
176333
|
+
return `Deno v${version4}, ${os3.endianness()}`;
|
|
176334
176334
|
}
|
|
176335
176335
|
if ("Bun" in globalThis) {
|
|
176336
176336
|
const version4 = typeof Bun?.version === "string" ? Bun?.version : "0.0.0-unknown";
|
|
176337
|
-
return `Bun v${version4}, ${
|
|
176337
|
+
return `Bun v${version4}, ${os3.endianness()}`;
|
|
176338
176338
|
}
|
|
176339
|
-
return `Node.js ${process2.version}, ${
|
|
176339
|
+
return `Node.js ${process2.version}, ${os3.endianness()}`;
|
|
176340
176340
|
}
|
|
176341
176341
|
}
|
|
176342
176342
|
});
|
|
@@ -192261,10 +192261,10 @@ var require_indent_string = __commonJS({
|
|
|
192261
192261
|
var require_clean_stack = __commonJS({
|
|
192262
192262
|
"../../node_modules/.pnpm/clean-stack@2.2.0/node_modules/clean-stack/index.js"(exports2, module2) {
|
|
192263
192263
|
"use strict";
|
|
192264
|
-
var
|
|
192264
|
+
var os3 = __require("os");
|
|
192265
192265
|
var extractPathRegex = /\s+at.*(?:\(|\s)(.*)\)?/;
|
|
192266
192266
|
var pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/;
|
|
192267
|
-
var homeDir = typeof
|
|
192267
|
+
var homeDir = typeof os3.homedir === "undefined" ? "" : os3.homedir();
|
|
192268
192268
|
module2.exports = (stack2, options) => {
|
|
192269
192269
|
options = Object.assign({ pretty: false }, options);
|
|
192270
192270
|
return stack2.replace(/\\/g, "/").split("\n").filter((line) => {
|
|
@@ -194903,14 +194903,14 @@ var require_axios = __commonJS({
|
|
|
194903
194903
|
navigator: _navigator2,
|
|
194904
194904
|
origin: origin2
|
|
194905
194905
|
});
|
|
194906
|
-
var
|
|
194906
|
+
var platform10 = {
|
|
194907
194907
|
...utils,
|
|
194908
194908
|
...platform$1
|
|
194909
194909
|
};
|
|
194910
194910
|
function toURLEncodedForm2(data2, options) {
|
|
194911
|
-
return toFormData3(data2, new
|
|
194911
|
+
return toFormData3(data2, new platform10.classes.URLSearchParams(), {
|
|
194912
194912
|
visitor: function(value2, key, path9, helpers) {
|
|
194913
|
-
if (
|
|
194913
|
+
if (platform10.isNode && utils$1.isBuffer(value2)) {
|
|
194914
194914
|
this.append(key, value2.toString("base64"));
|
|
194915
194915
|
return false;
|
|
194916
194916
|
}
|
|
@@ -195059,8 +195059,8 @@ var require_axios = __commonJS({
|
|
|
195059
195059
|
maxContentLength: -1,
|
|
195060
195060
|
maxBodyLength: -1,
|
|
195061
195061
|
env: {
|
|
195062
|
-
FormData:
|
|
195063
|
-
Blob:
|
|
195062
|
+
FormData: platform10.classes.FormData,
|
|
195063
|
+
Blob: platform10.classes.Blob
|
|
195064
195064
|
},
|
|
195065
195065
|
validateStatus: function validateStatus2(status) {
|
|
195066
195066
|
return status >= 200 && status < 300;
|
|
@@ -195401,7 +195401,7 @@ var require_axios = __commonJS({
|
|
|
195401
195401
|
}
|
|
195402
195402
|
var DATA_URL_PATTERN2 = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;
|
|
195403
195403
|
function fromDataURI2(uri, asBlob, options) {
|
|
195404
|
-
const _Blob = options && options.Blob ||
|
|
195404
|
+
const _Blob = options && options.Blob || platform10.classes.Blob;
|
|
195405
195405
|
const protocol = parseProtocol2(uri);
|
|
195406
195406
|
if (asBlob === void 0 && _Blob) {
|
|
195407
195407
|
asBlob = true;
|
|
@@ -195551,7 +195551,7 @@ var require_axios = __commonJS({
|
|
|
195551
195551
|
}
|
|
195552
195552
|
};
|
|
195553
195553
|
var readBlob$1 = readBlob2;
|
|
195554
|
-
var BOUNDARY_ALPHABET2 =
|
|
195554
|
+
var BOUNDARY_ALPHABET2 = platform10.ALPHABET.ALPHA_DIGIT + "-_";
|
|
195555
195555
|
var textEncoder2 = typeof TextEncoder === "function" ? new TextEncoder() : new util__default["default"].TextEncoder();
|
|
195556
195556
|
var CRLF2 = "\r\n";
|
|
195557
195557
|
var CRLF_BYTES2 = textEncoder2.encode(CRLF2);
|
|
@@ -195594,7 +195594,7 @@ var require_axios = __commonJS({
|
|
|
195594
195594
|
const {
|
|
195595
195595
|
tag = "form-data-boundary",
|
|
195596
195596
|
size = 25,
|
|
195597
|
-
boundary = tag + "-" +
|
|
195597
|
+
boundary = tag + "-" + platform10.generateString(size, BOUNDARY_ALPHABET2)
|
|
195598
195598
|
} = options || {};
|
|
195599
195599
|
if (!utils$1.isFormData(form)) {
|
|
195600
195600
|
throw TypeError("FormData instance required");
|
|
@@ -195818,7 +195818,7 @@ var require_axios = __commonJS({
|
|
|
195818
195818
|
var isBrotliSupported2 = utils$1.isFunction(zlib__default["default"].createBrotliDecompress);
|
|
195819
195819
|
var { http: httpFollow2, https: httpsFollow2 } = followRedirects__default["default"];
|
|
195820
195820
|
var isHttps2 = /https:?/;
|
|
195821
|
-
var supportedProtocols2 =
|
|
195821
|
+
var supportedProtocols2 = platform10.protocols.map((protocol) => {
|
|
195822
195822
|
return protocol + ":";
|
|
195823
195823
|
});
|
|
195824
195824
|
var flushOnFinish2 = (stream6, [throttled, flush]) => {
|
|
@@ -195945,7 +195945,7 @@ var require_axios = __commonJS({
|
|
|
195945
195945
|
}
|
|
195946
195946
|
}
|
|
195947
195947
|
const fullPath = buildFullPath2(config3.baseURL, config3.url, config3.allowAbsoluteUrls);
|
|
195948
|
-
const parsed = new URL(fullPath,
|
|
195948
|
+
const parsed = new URL(fullPath, platform10.hasBrowserEnv ? platform10.origin : void 0);
|
|
195949
195949
|
const protocol = parsed.protocol || supportedProtocols2[0];
|
|
195950
195950
|
if (protocol === "data:") {
|
|
195951
195951
|
if (config3.maxContentLength > -1) {
|
|
@@ -196317,14 +196317,14 @@ var require_axios = __commonJS({
|
|
|
196317
196317
|
}
|
|
196318
196318
|
});
|
|
196319
196319
|
};
|
|
196320
|
-
var isURLSameOrigin =
|
|
196321
|
-
url3 = new URL(url3,
|
|
196320
|
+
var isURLSameOrigin = platform10.hasStandardBrowserEnv ? /* @__PURE__ */ ((origin3, isMSIE) => (url3) => {
|
|
196321
|
+
url3 = new URL(url3, platform10.origin);
|
|
196322
196322
|
return origin3.protocol === url3.protocol && origin3.host === url3.host && (isMSIE || origin3.port === url3.port);
|
|
196323
196323
|
})(
|
|
196324
|
-
new URL(
|
|
196325
|
-
|
|
196324
|
+
new URL(platform10.origin),
|
|
196325
|
+
platform10.navigator && /(msie|trident)/i.test(platform10.navigator.userAgent)
|
|
196326
196326
|
) : () => true;
|
|
196327
|
-
var cookies =
|
|
196327
|
+
var cookies = platform10.hasStandardBrowserEnv ? (
|
|
196328
196328
|
// Standard browser envs support document.cookie
|
|
196329
196329
|
{
|
|
196330
196330
|
write(name2, value2, expires, path9, domain, secure) {
|
|
@@ -196445,7 +196445,7 @@ var require_axios = __commonJS({
|
|
|
196445
196445
|
);
|
|
196446
196446
|
}
|
|
196447
196447
|
if (utils$1.isFormData(data2)) {
|
|
196448
|
-
if (
|
|
196448
|
+
if (platform10.hasStandardBrowserEnv || platform10.hasStandardBrowserWebWorkerEnv) {
|
|
196449
196449
|
headers.setContentType(void 0);
|
|
196450
196450
|
} else if (utils$1.isFunction(data2.getHeaders)) {
|
|
196451
196451
|
const formHeaders = data2.getHeaders();
|
|
@@ -196457,7 +196457,7 @@ var require_axios = __commonJS({
|
|
|
196457
196457
|
});
|
|
196458
196458
|
}
|
|
196459
196459
|
}
|
|
196460
|
-
if (
|
|
196460
|
+
if (platform10.hasStandardBrowserEnv) {
|
|
196461
196461
|
withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
|
|
196462
196462
|
if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin(newConfig.url)) {
|
|
196463
196463
|
const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
|
|
@@ -196589,7 +196589,7 @@ var require_axios = __commonJS({
|
|
|
196589
196589
|
}
|
|
196590
196590
|
}
|
|
196591
196591
|
const protocol = parseProtocol2(_config.url);
|
|
196592
|
-
if (protocol &&
|
|
196592
|
+
if (protocol && platform10.protocols.indexOf(protocol) === -1) {
|
|
196593
196593
|
reject(new AxiosError3("Unsupported protocol " + protocol + ":", AxiosError3.ERR_BAD_REQUEST, config3));
|
|
196594
196594
|
return;
|
|
196595
196595
|
}
|
|
@@ -196735,7 +196735,7 @@ var require_axios = __commonJS({
|
|
|
196735
196735
|
const encodeText = isFetchSupported && (typeof TextEncoder$1 === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder$1()) : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
|
|
196736
196736
|
const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test2(() => {
|
|
196737
196737
|
let duplexAccessed = false;
|
|
196738
|
-
const hasContentType = new Request(
|
|
196738
|
+
const hasContentType = new Request(platform10.origin, {
|
|
196739
196739
|
body: new ReadableStream$1(),
|
|
196740
196740
|
method: "POST",
|
|
196741
196741
|
get duplex() {
|
|
@@ -196768,7 +196768,7 @@ var require_axios = __commonJS({
|
|
|
196768
196768
|
return body.size;
|
|
196769
196769
|
}
|
|
196770
196770
|
if (utils$1.isSpecCompliantForm(body)) {
|
|
196771
|
-
const _request = new Request(
|
|
196771
|
+
const _request = new Request(platform10.origin, {
|
|
196772
196772
|
method: "POST",
|
|
196773
196773
|
body
|
|
196774
196774
|
});
|
|
@@ -198721,13 +198721,13 @@ var require_instrument = __commonJS({
|
|
|
198721
198721
|
};
|
|
198722
198722
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
198723
198723
|
exports2.getUserAgent = exports2.addAppMetadata = void 0;
|
|
198724
|
-
var
|
|
198724
|
+
var os3 = __importStar(__require("os"));
|
|
198725
198725
|
var path_1 = __require("path");
|
|
198726
198726
|
var packageJson = require_package4();
|
|
198727
198727
|
function replaceSlashes(s6) {
|
|
198728
198728
|
return s6.replace("/", ":");
|
|
198729
198729
|
}
|
|
198730
|
-
var baseUserAgent = `${replaceSlashes(packageJson.name)}/${packageJson.version} ${(0, path_1.basename)(process.title)}/${process.version.replace("v", "")} ${
|
|
198730
|
+
var baseUserAgent = `${replaceSlashes(packageJson.name)}/${packageJson.version} ${(0, path_1.basename)(process.title)}/${process.version.replace("v", "")} ${os3.platform()}/${os3.release()}`;
|
|
198731
198731
|
var appMetadata = {};
|
|
198732
198732
|
function addAppMetadata({ name: name2, version: version4 }) {
|
|
198733
198733
|
appMetadata[replaceSlashes(name2)] = version4;
|
|
@@ -199895,7 +199895,7 @@ var {
|
|
|
199895
199895
|
} = import_index.default;
|
|
199896
199896
|
|
|
199897
199897
|
// dist/index.js
|
|
199898
|
-
import { mkdir as mkdir7, mkdtemp as mkdtemp2, readFile as
|
|
199898
|
+
import { mkdir as mkdir7, mkdtemp as mkdtemp2, readFile as readFile38, rm as rm3, writeFile as writeFile17 } from "fs/promises";
|
|
199899
199899
|
import { tmpdir as tmpdir5 } from "os";
|
|
199900
199900
|
import { dirname as dirname26, join as join35, resolve as resolve44 } from "path";
|
|
199901
199901
|
|
|
@@ -204418,13 +204418,14 @@ function parseComputeArtifactsResponse(responseData) {
|
|
|
204418
204418
|
// There should always only be one metadata object
|
|
204419
204419
|
};
|
|
204420
204420
|
}
|
|
204421
|
-
async function createSocketTier1Scan(cliOptions, coanaCliVersion) {
|
|
204421
|
+
async function createSocketTier1Scan(cliOptions, coanaCliVersion, systemInformation) {
|
|
204422
204422
|
try {
|
|
204423
204423
|
const url2 = getSocketApiUrl("tier1-reachability-scan");
|
|
204424
204424
|
const data2 = {
|
|
204425
204425
|
cli_options: cliOptions,
|
|
204426
204426
|
coana_cli_version: coanaCliVersion,
|
|
204427
|
-
socket_cli_version: process.env.SOCKET_CLI_VERSION
|
|
204427
|
+
socket_cli_version: process.env.SOCKET_CLI_VERSION,
|
|
204428
|
+
system_information: systemInformation
|
|
204428
204429
|
};
|
|
204429
204430
|
return (await axios2.put(url2, data2, { headers: getAuthHeaders() })).data;
|
|
204430
204431
|
} catch (error) {
|
|
@@ -211817,13 +211818,13 @@ async function getNodeExecutable(overridePath) {
|
|
|
211817
211818
|
logger.debug("Extracting Node.js binary for spawned processes...");
|
|
211818
211819
|
extractedNodePath = (async () => {
|
|
211819
211820
|
const extractedPath = await extractTool("nodejs-binaries", "nodejs-binaries");
|
|
211820
|
-
const { platform:
|
|
211821
|
+
const { platform: platform10, arch } = process;
|
|
211821
211822
|
const nodeArch = arch === "arm" ? "arm64" : arch;
|
|
211822
|
-
const isWindows4 =
|
|
211823
|
-
const binaryName = isWindows4 ? `node-${
|
|
211823
|
+
const isWindows4 = platform10 === "win32";
|
|
211824
|
+
const binaryName = isWindows4 ? `node-${platform10}-${nodeArch}.exe.gz` : `node-${platform10}-${nodeArch}.gz`;
|
|
211824
211825
|
const compressedBinaryPath = join5(extractedPath, binaryName);
|
|
211825
211826
|
if (!await exists(compressedBinaryPath)) {
|
|
211826
|
-
throw new Error(`Node.js binary not found: ${compressedBinaryPath}. Platform: ${
|
|
211827
|
+
throw new Error(`Node.js binary not found: ${compressedBinaryPath}. Platform: ${platform10}-${nodeArch}`);
|
|
211827
211828
|
}
|
|
211828
211829
|
const tmpDir = join5(getExtractionBaseDir(), "node-runtime");
|
|
211829
211830
|
await mkdir4(tmpDir, { recursive: true });
|
|
@@ -212046,13 +212047,13 @@ async function getUvExecutable() {
|
|
|
212046
212047
|
logger.debug("uv not found on system, extracting embedded uv...");
|
|
212047
212048
|
extractedUvPath = (async () => {
|
|
212048
212049
|
const extractedPath = await extractTool("uv-binaries", "uv-binaries");
|
|
212049
|
-
const { platform:
|
|
212050
|
+
const { platform: platform10, arch } = process;
|
|
212050
212051
|
const nodeArch = arch === "arm" ? "arm64" : arch;
|
|
212051
|
-
const isWindows4 =
|
|
212052
|
-
const binaryName = isWindows4 ? `uv-${
|
|
212052
|
+
const isWindows4 = platform10 === "win32";
|
|
212053
|
+
const binaryName = isWindows4 ? `uv-${platform10}-${nodeArch}.exe.gz` : `uv-${platform10}-${nodeArch}.gz`;
|
|
212053
212054
|
const compressedBinaryPath = join5(extractedPath, binaryName);
|
|
212054
212055
|
if (!await exists(compressedBinaryPath)) {
|
|
212055
|
-
throw new Error(`uv binary not found: ${compressedBinaryPath}. Platform: ${
|
|
212056
|
+
throw new Error(`uv binary not found: ${compressedBinaryPath}. Platform: ${platform10}-${nodeArch}`);
|
|
212056
212057
|
}
|
|
212057
212058
|
const tmpDir = join5(getExtractionBaseDir(), "uv-runtime");
|
|
212058
212059
|
await mkdir4(tmpDir, { recursive: true });
|
|
@@ -223336,7 +223337,7 @@ var Pattern = class _Pattern {
|
|
|
223336
223337
|
#isUNC;
|
|
223337
223338
|
#isAbsolute;
|
|
223338
223339
|
#followGlobstar = true;
|
|
223339
|
-
constructor(patternList, globList, index2,
|
|
223340
|
+
constructor(patternList, globList, index2, platform10) {
|
|
223340
223341
|
if (!isPatternList(patternList)) {
|
|
223341
223342
|
throw new TypeError("empty pattern list");
|
|
223342
223343
|
}
|
|
@@ -223353,7 +223354,7 @@ var Pattern = class _Pattern {
|
|
|
223353
223354
|
this.#patternList = patternList;
|
|
223354
223355
|
this.#globList = globList;
|
|
223355
223356
|
this.#index = index2;
|
|
223356
|
-
this.#platform =
|
|
223357
|
+
this.#platform = platform10;
|
|
223357
223358
|
if (this.#index === 0) {
|
|
223358
223359
|
if (this.isUNC()) {
|
|
223359
223360
|
const [p0, p1, p22, p3, ...prest] = this.#patternList;
|
|
@@ -223495,12 +223496,12 @@ var Ignore = class {
|
|
|
223495
223496
|
absoluteChildren;
|
|
223496
223497
|
platform;
|
|
223497
223498
|
mmopts;
|
|
223498
|
-
constructor(ignored, { nobrace, nocase, noext, noglobstar, platform:
|
|
223499
|
+
constructor(ignored, { nobrace, nocase, noext, noglobstar, platform: platform10 = defaultPlatform2 }) {
|
|
223499
223500
|
this.relative = [];
|
|
223500
223501
|
this.absolute = [];
|
|
223501
223502
|
this.relativeChildren = [];
|
|
223502
223503
|
this.absoluteChildren = [];
|
|
223503
|
-
this.platform =
|
|
223504
|
+
this.platform = platform10;
|
|
223504
223505
|
this.mmopts = {
|
|
223505
223506
|
dot: true,
|
|
223506
223507
|
nobrace,
|
|
@@ -223508,7 +223509,7 @@ var Ignore = class {
|
|
|
223508
223509
|
noext,
|
|
223509
223510
|
noglobstar,
|
|
223510
223511
|
optimizationLevel: 2,
|
|
223511
|
-
platform:
|
|
223512
|
+
platform: platform10,
|
|
223512
223513
|
nocomment: true,
|
|
223513
223514
|
nonegate: true
|
|
223514
223515
|
};
|
|
@@ -234623,7 +234624,7 @@ var kleur_default = $;
|
|
|
234623
234624
|
|
|
234624
234625
|
// dist/cli-core.js
|
|
234625
234626
|
var import_lodash15 = __toESM(require_lodash(), 1);
|
|
234626
|
-
import
|
|
234627
|
+
import os2 from "os";
|
|
234627
234628
|
import { join as join34, relative as relative20, resolve as resolve42 } from "path";
|
|
234628
234629
|
|
|
234629
234630
|
// ../utils/src/dashboard-api/shared-api.ts
|
|
@@ -234638,12 +234639,12 @@ var DashboardAPI = class {
|
|
|
234638
234639
|
this.coanaAPI = getCoanaAPI();
|
|
234639
234640
|
this.socketAPI = getSocketAPI();
|
|
234640
234641
|
}
|
|
234641
|
-
async createReport(repoUrl, projectName, cliVersion2, commitSha, branchName, cliOptions, apiKey, cliRunEnv) {
|
|
234642
|
+
async createReport(repoUrl, projectName, cliVersion2, commitSha, branchName, cliOptions, apiKey, cliRunEnv, systemInformation) {
|
|
234642
234643
|
if (this.disableAnalyticsSharing) {
|
|
234643
234644
|
return;
|
|
234644
234645
|
}
|
|
234645
234646
|
if (this.socketMode) {
|
|
234646
|
-
return (await this.socketAPI.createSocketTier1Scan(cliOptions, cliVersion2)).tier1_reachability_scan_id;
|
|
234647
|
+
return (await this.socketAPI.createSocketTier1Scan(cliOptions, cliVersion2, systemInformation)).tier1_reachability_scan_id;
|
|
234647
234648
|
} else {
|
|
234648
234649
|
return await this.coanaAPI.createCoanaReport(
|
|
234649
234650
|
repoUrl,
|
|
@@ -234782,6 +234783,31 @@ var DashboardAPI = class {
|
|
|
234782
234783
|
}
|
|
234783
234784
|
};
|
|
234784
234785
|
|
|
234786
|
+
// ../utils/src/system-info.ts
|
|
234787
|
+
import os from "os";
|
|
234788
|
+
function getSystemInformation() {
|
|
234789
|
+
const platform10 = process.platform;
|
|
234790
|
+
const info = {
|
|
234791
|
+
operatingSystem: platform10,
|
|
234792
|
+
nodeVersion: process.versions.node,
|
|
234793
|
+
osVersion: os.version(),
|
|
234794
|
+
totalMemory: os.totalmem()
|
|
234795
|
+
};
|
|
234796
|
+
if (platform10 === "linux") {
|
|
234797
|
+
info.kernelVersion = os.release();
|
|
234798
|
+
}
|
|
234799
|
+
if (typeof process.constrainedMemory === "function") {
|
|
234800
|
+
const constrained = process.constrainedMemory();
|
|
234801
|
+
if (constrained === 0) {
|
|
234802
|
+
info.constrainedMemory = "unlimited";
|
|
234803
|
+
}
|
|
234804
|
+
if (constrained > 0) {
|
|
234805
|
+
info.constrainedMemory = constrained;
|
|
234806
|
+
}
|
|
234807
|
+
}
|
|
234808
|
+
return info;
|
|
234809
|
+
}
|
|
234810
|
+
|
|
234785
234811
|
// ../utils/src/dashboard-api/batched-http-log-streamer.ts
|
|
234786
234812
|
var BatchedHttpLogStreamer = class {
|
|
234787
234813
|
reportId;
|
|
@@ -235275,12 +235301,63 @@ var bgMagentaBright = format5(105, 49);
|
|
|
235275
235301
|
var bgCyanBright = format5(106, 49);
|
|
235276
235302
|
var bgWhiteBright = format5(107, 49);
|
|
235277
235303
|
|
|
235304
|
+
// dist/internal/check-system-requirements.js
|
|
235305
|
+
import { readFile as readFile34 } from "fs/promises";
|
|
235306
|
+
import { platform as platform9 } from "process";
|
|
235307
|
+
var VM_MAX_MAP_COUNT_PATH = "/proc/sys/vm/max_map_count";
|
|
235308
|
+
async function checkSystemRequirements(memoryLimitInMb, socketMode) {
|
|
235309
|
+
if (platform9 !== "linux" || !socketMode) {
|
|
235310
|
+
return;
|
|
235311
|
+
}
|
|
235312
|
+
await checkVmMaxMapCount(memoryLimitInMb);
|
|
235313
|
+
}
|
|
235314
|
+
async function checkVmMaxMapCount(memoryLimitInMb) {
|
|
235315
|
+
if (!memoryLimitInMb || memoryLimitInMb <= 0 || !isFinite(memoryLimitInMb)) {
|
|
235316
|
+
logger.warn(`Invalid memory limit: ${memoryLimitInMb}. Skipping vm.max_map_count check.`);
|
|
235317
|
+
return;
|
|
235318
|
+
}
|
|
235319
|
+
let vmMaxMapCountStr;
|
|
235320
|
+
try {
|
|
235321
|
+
vmMaxMapCountStr = await readFile34(VM_MAX_MAP_COUNT_PATH, "utf-8");
|
|
235322
|
+
} catch (error) {
|
|
235323
|
+
const requiredValue = memoryLimitInMb * 4;
|
|
235324
|
+
logger.warn(`Unable to read ${VM_MAX_MAP_COUNT_PATH} (${error}). Skipping vm.max_map_count check. If you encounter memory-related issues, ensure vm.max_map_count is at least ${requiredValue}.`);
|
|
235325
|
+
return;
|
|
235326
|
+
}
|
|
235327
|
+
const vmMaxMapCount = parseInt(vmMaxMapCountStr.trim(), 10);
|
|
235328
|
+
if (isNaN(vmMaxMapCount)) {
|
|
235329
|
+
logger.warn(`Unable to parse vm.max_map_count. Value was: "${vmMaxMapCountStr.trim()}". Skipping check.`);
|
|
235330
|
+
return;
|
|
235331
|
+
}
|
|
235332
|
+
const requiredVmMaxMapCount = memoryLimitInMb * 4;
|
|
235333
|
+
if (vmMaxMapCount < requiredVmMaxMapCount) {
|
|
235334
|
+
throw new Error(`System requirement not met: vm.max_map_count is too low.
|
|
235335
|
+
|
|
235336
|
+
Current value: ${vmMaxMapCount}
|
|
235337
|
+
Required value: at least ${requiredVmMaxMapCount} (for --memory-limit ${memoryLimitInMb} MB)
|
|
235338
|
+
|
|
235339
|
+
The reachability analysis may create many memory mappings, and the current
|
|
235340
|
+
vm.max_map_count limit will cause the analysis to fail.
|
|
235341
|
+
|
|
235342
|
+
To fix this, run one of the following commands:
|
|
235343
|
+
|
|
235344
|
+
Temporary (until reboot):
|
|
235345
|
+
sudo sysctl -w vm.max_map_count=${requiredVmMaxMapCount}
|
|
235346
|
+
|
|
235347
|
+
Permanent (survives reboot):
|
|
235348
|
+
echo 'vm.max_map_count=${requiredVmMaxMapCount}' | sudo tee -a /etc/sysctl.conf
|
|
235349
|
+
sudo sysctl -p
|
|
235350
|
+
|
|
235351
|
+
Alternatively, you can reduce the --memory-limit option to require fewer mappings.`);
|
|
235352
|
+
}
|
|
235353
|
+
}
|
|
235354
|
+
|
|
235278
235355
|
// dist/internal/constants.js
|
|
235279
235356
|
var DEFAULT_REPORT_FILENAME_BASE = "coana-report";
|
|
235280
235357
|
|
|
235281
235358
|
// dist/internal/exclude-dirs-from-configuration-files.js
|
|
235282
235359
|
import { existsSync as existsSync25 } from "fs";
|
|
235283
|
-
import { readFile as
|
|
235360
|
+
import { readFile as readFile35 } from "fs/promises";
|
|
235284
235361
|
import { basename as basename10, resolve as resolve41 } from "path";
|
|
235285
235362
|
var import_yaml2 = __toESM(require_dist11(), 1);
|
|
235286
235363
|
async function inferExcludeDirsFromConfigurationFiles(rootWorkingDir) {
|
|
@@ -235294,7 +235371,7 @@ async function inferExcludeDirsFromConfigurationFiles(rootWorkingDir) {
|
|
|
235294
235371
|
}
|
|
235295
235372
|
async function inferExcludeDirsFromSocketConfig(socketConfigFile) {
|
|
235296
235373
|
try {
|
|
235297
|
-
const config3 = (0, import_yaml2.parse)(await
|
|
235374
|
+
const config3 = (0, import_yaml2.parse)(await readFile35(socketConfigFile, "utf8"));
|
|
235298
235375
|
const version4 = config3.version;
|
|
235299
235376
|
const ignorePaths = config3[version4 === 1 ? "ignore" : "projectIgnorePaths"];
|
|
235300
235377
|
if (!ignorePaths)
|
|
@@ -235311,7 +235388,7 @@ async function inferExcludeDirsFromSocketConfig(socketConfigFile) {
|
|
|
235311
235388
|
// dist/internal/manifest-upload.js
|
|
235312
235389
|
var import_fast_glob = __toESM(require_out4(), 1);
|
|
235313
235390
|
var import_ignore3 = __toESM(require_ignore(), 1);
|
|
235314
|
-
import { readFile as
|
|
235391
|
+
import { readFile as readFile36 } from "fs/promises";
|
|
235315
235392
|
import { join as join31 } from "path";
|
|
235316
235393
|
var DEFAULT_IGNORE_PATTERNS = [
|
|
235317
235394
|
"**/node_modules/**",
|
|
@@ -235327,7 +235404,7 @@ var DEFAULT_IGNORE_PATTERNS = [
|
|
|
235327
235404
|
async function loadGitignore(rootDir) {
|
|
235328
235405
|
try {
|
|
235329
235406
|
const gitignorePath = join31(rootDir, ".gitignore");
|
|
235330
|
-
const content = await
|
|
235407
|
+
const content = await readFile36(gitignorePath, "utf-8");
|
|
235331
235408
|
return (0, import_ignore3.default)().add(content);
|
|
235332
235409
|
} catch {
|
|
235333
235410
|
return void 0;
|
|
@@ -236454,7 +236531,7 @@ function toSocketFactsSocketDependencyTree(artifacts, vulnerabilities, tier1Reac
|
|
|
236454
236531
|
}
|
|
236455
236532
|
|
|
236456
236533
|
// dist/internal/vulnerability-scanning.js
|
|
236457
|
-
import { readFile as
|
|
236534
|
+
import { readFile as readFile37 } from "fs/promises";
|
|
236458
236535
|
|
|
236459
236536
|
// ../security-auditor/security-auditor-builder/src/mongo-connection.ts
|
|
236460
236537
|
var import_mongodb = __toESM(require_lib31(), 1);
|
|
@@ -251323,7 +251400,7 @@ async function scanForVulnerabilities(dependencyTree, offlineVulnerabilityScanne
|
|
|
251323
251400
|
}
|
|
251324
251401
|
async function offlineScan(dependencyTree, offlineVulnerabilityScannerDBPath) {
|
|
251325
251402
|
logger.info("using offline vulnerability scanner db");
|
|
251326
|
-
const offlineVulnerabilityScannerDB = JSON.parse(await
|
|
251403
|
+
const offlineVulnerabilityScannerDB = JSON.parse(await readFile37(offlineVulnerabilityScannerDBPath, "utf-8"));
|
|
251327
251404
|
const { ecosystemToUrlToVulnerabilityDetails, vulnerabilityDatabase } = offlineVulnerabilityScannerDB;
|
|
251328
251405
|
const coanaSupportedVulnerabilitiesLoader = CoanaSupportedVulnerabilitiesLoader.create(ecosystemToUrlToVulnerabilityDetails);
|
|
251329
251406
|
const vulnerabilityAccessPathLoader = CoanaSupportedVulnerabilitiesLoader.create(ecosystemToUrlToVulnerabilityDetails);
|
|
@@ -251341,7 +251418,7 @@ async function onlineScan(dependencyTree, apiKey, timeout) {
|
|
|
251341
251418
|
}
|
|
251342
251419
|
|
|
251343
251420
|
// dist/version.js
|
|
251344
|
-
var version3 = "14.12.
|
|
251421
|
+
var version3 = "14.12.173";
|
|
251345
251422
|
|
|
251346
251423
|
// dist/cli-core.js
|
|
251347
251424
|
var { mapValues, omit, partition, pickBy: pickBy2 } = import_lodash15.default;
|
|
@@ -251482,7 +251559,7 @@ var CliCore = class {
|
|
|
251482
251559
|
try {
|
|
251483
251560
|
if (this.shareWithDashboard && this.apiKey.type === "present" || this.options.socketMode) {
|
|
251484
251561
|
const gitData = await getGitDataToMetadataIfAvailable(this.rootWorkingDirectory);
|
|
251485
|
-
this.reportId = await this.dashboardAPI.createReport(this.options.repoUrl, this.options.projectName, version3, gitData?.sha, gitData?.branchName, omit(this.options, "apiKey", "print-report", "repoUrl", "projectName", "writeReportToFile"), this.apiKey, this.options.runEnv);
|
|
251562
|
+
this.reportId = await this.dashboardAPI.createReport(this.options.repoUrl, this.options.projectName, version3, gitData?.sha, gitData?.branchName, omit(this.options, "apiKey", "print-report", "repoUrl", "projectName", "writeReportToFile"), this.apiKey, this.options.runEnv, getSystemInformation());
|
|
251486
251563
|
if (this.options.socketMode && this.reportId) {
|
|
251487
251564
|
const batchedLogStreamer = new BatchedHttpLogStreamer({
|
|
251488
251565
|
reportId: this.reportId,
|
|
@@ -251788,6 +251865,7 @@ Subproject: ${subproject}`);
|
|
|
251788
251865
|
logger.info(`Coana CLI version ${version3} scan initiated on ${this.rootWorkingDirectory}`);
|
|
251789
251866
|
logger.info("Complete logs (including debug info) written to: ", this.coanaLogPath);
|
|
251790
251867
|
this.verifyOptions();
|
|
251868
|
+
await checkSystemRequirements(this.analysisMemoryLimitInMb, Boolean(this.options.socketMode));
|
|
251791
251869
|
if (!this.options.excludeDirs)
|
|
251792
251870
|
this.options.excludeDirs = await inferExcludeDirsFromConfigurationFiles(this.rootWorkingDirectory);
|
|
251793
251871
|
logger.info("using options", JSON.stringify(pickBy2(this.options, (value2, key) => {
|
|
@@ -251804,7 +251882,7 @@ Subproject: ${subproject}`);
|
|
|
251804
251882
|
"useOnlyPregeneratedSboms"
|
|
251805
251883
|
].includes(key) && value2 !== void 0 && value2 !== false;
|
|
251806
251884
|
}), null, 2));
|
|
251807
|
-
logger.debug("available memory: %i MiB",
|
|
251885
|
+
logger.debug("available memory: %i MiB", os2.freemem() / (1024 * 1024));
|
|
251808
251886
|
try {
|
|
251809
251887
|
const limits = await Promise.all([
|
|
251810
251888
|
["stack", "-s"],
|
|
@@ -252417,7 +252495,7 @@ async function initializeComputeFixesAndUpgradePurls(path9, options) {
|
|
|
252417
252495
|
var compareReportsCommand = new Command();
|
|
252418
252496
|
compareReportsCommand.name("compare-reports").argument("<baselineReportPath>", "Path to the baseline report").argument("<newReportPath>", "Path to the new report").option("--api-key <key>", "Set the Coana dashboard API key.").option("-d, --debug", "Enable debug logging", false).option("--no-pr-comment", "Disable pull request comments (only relevant when run from a PR)", true).option("--no-block", "Do not fail with a non-zero exit code when new reachable vulnerabilities are detected", true).option("--ignore-undeterminable-reachability", "Ignore vulnerabilities with undeterminable reachability", false).action(async (baselineReportPath, newReportPath, options) => {
|
|
252419
252497
|
async function readReport(reportPath) {
|
|
252420
|
-
return JSON.parse(await
|
|
252498
|
+
return JSON.parse(await readFile38(reportPath, "utf-8"));
|
|
252421
252499
|
}
|
|
252422
252500
|
const baselineReport = await readReport(baselineReportPath);
|
|
252423
252501
|
const newReport = await readReport(newReportPath);
|
package/package.json
CHANGED
|
@@ -80432,13 +80432,14 @@ function getAuthHeaders() {
|
|
|
80432
80432
|
Authorization: `Basic ${Buffer.from(`${process.env.SOCKET_CLI_API_TOKEN}:`).toString("base64")}`
|
|
80433
80433
|
};
|
|
80434
80434
|
}
|
|
80435
|
-
async function createSocketTier1Scan(cliOptions, coanaCliVersion) {
|
|
80435
|
+
async function createSocketTier1Scan(cliOptions, coanaCliVersion, systemInformation) {
|
|
80436
80436
|
try {
|
|
80437
80437
|
const url2 = getSocketApiUrl("tier1-reachability-scan");
|
|
80438
80438
|
const data2 = {
|
|
80439
80439
|
cli_options: cliOptions,
|
|
80440
80440
|
coana_cli_version: coanaCliVersion,
|
|
80441
|
-
socket_cli_version: process.env.SOCKET_CLI_VERSION
|
|
80441
|
+
socket_cli_version: process.env.SOCKET_CLI_VERSION,
|
|
80442
|
+
system_information: systemInformation
|
|
80442
80443
|
};
|
|
80443
80444
|
return (await axios2.put(url2, data2, { headers: getAuthHeaders() })).data;
|
|
80444
80445
|
} catch (error) {
|
|
@@ -80727,12 +80728,12 @@ var DashboardAPI = class {
|
|
|
80727
80728
|
this.coanaAPI = getCoanaAPI();
|
|
80728
80729
|
this.socketAPI = getSocketAPI();
|
|
80729
80730
|
}
|
|
80730
|
-
async createReport(repoUrl, projectName, cliVersion2, commitSha, branchName, cliOptions, apiKey3, cliRunEnv) {
|
|
80731
|
+
async createReport(repoUrl, projectName, cliVersion2, commitSha, branchName, cliOptions, apiKey3, cliRunEnv, systemInformation) {
|
|
80731
80732
|
if (this.disableAnalyticsSharing) {
|
|
80732
80733
|
return;
|
|
80733
80734
|
}
|
|
80734
80735
|
if (this.socketMode) {
|
|
80735
|
-
return (await this.socketAPI.createSocketTier1Scan(cliOptions, cliVersion2)).tier1_reachability_scan_id;
|
|
80736
|
+
return (await this.socketAPI.createSocketTier1Scan(cliOptions, cliVersion2, systemInformation)).tier1_reachability_scan_id;
|
|
80736
80737
|
} else {
|
|
80737
80738
|
return await this.coanaAPI.createCoanaReport(
|
|
80738
80739
|
repoUrl,
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|