@coana-tech/cli 14.12.98 → 14.12.100
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 +685 -123
- package/package.json +1 -1
- package/reachability-analyzers-cli.mjs +423 -49
- 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
|
@@ -17555,9 +17555,9 @@ var require_logform = __commonJS({
|
|
|
17555
17555
|
}
|
|
17556
17556
|
});
|
|
17557
17557
|
|
|
17558
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
17558
|
+
// ../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/common.js
|
|
17559
17559
|
var require_common2 = __commonJS({
|
|
17560
|
-
"../../node_modules/.pnpm/winston@3.
|
|
17560
|
+
"../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/common.js"(exports2) {
|
|
17561
17561
|
"use strict";
|
|
17562
17562
|
var { format: format6 } = __require("util");
|
|
17563
17563
|
exports2.warn = {
|
|
@@ -17592,13 +17592,13 @@ var require_common2 = __commonJS({
|
|
|
17592
17592
|
}
|
|
17593
17593
|
});
|
|
17594
17594
|
|
|
17595
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
17595
|
+
// ../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/package.json
|
|
17596
17596
|
var require_package = __commonJS({
|
|
17597
|
-
"../../node_modules/.pnpm/winston@3.
|
|
17597
|
+
"../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/package.json"(exports2, module2) {
|
|
17598
17598
|
module2.exports = {
|
|
17599
17599
|
name: "winston",
|
|
17600
17600
|
description: "A logger for just about everything.",
|
|
17601
|
-
version: "3.
|
|
17601
|
+
version: "3.16.0",
|
|
17602
17602
|
author: "Charlie Robbins <charlie.robbins@gmail.com>",
|
|
17603
17603
|
maintainers: [
|
|
17604
17604
|
"David Hyde <dabh@alumni.stanford.edu>"
|
|
@@ -17645,7 +17645,7 @@ var require_package = __commonJS({
|
|
|
17645
17645
|
eslint: "^8.57.0",
|
|
17646
17646
|
hock: "^1.4.1",
|
|
17647
17647
|
mocha: "^10.3.0",
|
|
17648
|
-
nyc: "^
|
|
17648
|
+
nyc: "^17.1.0",
|
|
17649
17649
|
rimraf: "5.0.1",
|
|
17650
17650
|
split2: "^4.1.0",
|
|
17651
17651
|
"std-mocks": "^2.0.0",
|
|
@@ -18489,7 +18489,7 @@ var require_end_of_stream = __commonJS({
|
|
|
18489
18489
|
"../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(exports2, module2) {
|
|
18490
18490
|
"use strict";
|
|
18491
18491
|
var ERR_STREAM_PREMATURE_CLOSE = require_errors2().codes.ERR_STREAM_PREMATURE_CLOSE;
|
|
18492
|
-
function
|
|
18492
|
+
function once9(callback) {
|
|
18493
18493
|
var called = false;
|
|
18494
18494
|
return function() {
|
|
18495
18495
|
if (called) return;
|
|
@@ -18508,7 +18508,7 @@ var require_end_of_stream = __commonJS({
|
|
|
18508
18508
|
function eos(stream5, opts, callback) {
|
|
18509
18509
|
if (typeof opts === "function") return eos(stream5, null, opts);
|
|
18510
18510
|
if (!opts) opts = {};
|
|
18511
|
-
callback =
|
|
18511
|
+
callback = once9(callback || noop4);
|
|
18512
18512
|
var readable = opts.readable || opts.readable !== false && stream5.readable;
|
|
18513
18513
|
var writable = opts.writable || opts.writable !== false && stream5.writable;
|
|
18514
18514
|
var onlegacyfinish = function onlegacyfinish2() {
|
|
@@ -20361,9 +20361,9 @@ var require_winston_transport = __commonJS({
|
|
|
20361
20361
|
}
|
|
20362
20362
|
});
|
|
20363
20363
|
|
|
20364
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
20364
|
+
// ../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/transports/console.js
|
|
20365
20365
|
var require_console = __commonJS({
|
|
20366
|
-
"../../node_modules/.pnpm/winston@3.
|
|
20366
|
+
"../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/transports/console.js"(exports2, module2) {
|
|
20367
20367
|
"use strict";
|
|
20368
20368
|
var os2 = __require("os");
|
|
20369
20369
|
var { LEVEL, MESSAGE } = require_triple_beam();
|
|
@@ -20673,8 +20673,8 @@ var require_once = __commonJS({
|
|
|
20673
20673
|
Object.defineProperty(exports2, "__esModule", {
|
|
20674
20674
|
value: true
|
|
20675
20675
|
});
|
|
20676
|
-
exports2.default =
|
|
20677
|
-
function
|
|
20676
|
+
exports2.default = once9;
|
|
20677
|
+
function once9(fn2) {
|
|
20678
20678
|
function wrapper(...args2) {
|
|
20679
20679
|
if (fn2 === null) return;
|
|
20680
20680
|
var callFn = fn2;
|
|
@@ -21125,7 +21125,7 @@ var require_pipeline = __commonJS({
|
|
|
21125
21125
|
"../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/pipeline.js"(exports2, module2) {
|
|
21126
21126
|
"use strict";
|
|
21127
21127
|
var eos;
|
|
21128
|
-
function
|
|
21128
|
+
function once9(callback) {
|
|
21129
21129
|
var called = false;
|
|
21130
21130
|
return function() {
|
|
21131
21131
|
if (called) return;
|
|
@@ -21143,7 +21143,7 @@ var require_pipeline = __commonJS({
|
|
|
21143
21143
|
return stream5.setHeader && typeof stream5.abort === "function";
|
|
21144
21144
|
}
|
|
21145
21145
|
function destroyer(stream5, reading, writing, callback) {
|
|
21146
|
-
callback =
|
|
21146
|
+
callback = once9(callback);
|
|
21147
21147
|
var closed = false;
|
|
21148
21148
|
stream5.on("close", function() {
|
|
21149
21149
|
closed = true;
|
|
@@ -23286,9 +23286,9 @@ var require_node3 = __commonJS({
|
|
|
23286
23286
|
}
|
|
23287
23287
|
});
|
|
23288
23288
|
|
|
23289
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
23289
|
+
// ../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/tail-file.js
|
|
23290
23290
|
var require_tail_file = __commonJS({
|
|
23291
|
-
"../../node_modules/.pnpm/winston@3.
|
|
23291
|
+
"../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/tail-file.js"(exports2, module2) {
|
|
23292
23292
|
"use strict";
|
|
23293
23293
|
var fs11 = __require("fs");
|
|
23294
23294
|
var { StringDecoder: StringDecoder2 } = __require("string_decoder");
|
|
@@ -23381,9 +23381,9 @@ var require_tail_file = __commonJS({
|
|
|
23381
23381
|
}
|
|
23382
23382
|
});
|
|
23383
23383
|
|
|
23384
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
23384
|
+
// ../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/transports/file.js
|
|
23385
23385
|
var require_file = __commonJS({
|
|
23386
|
-
"../../node_modules/.pnpm/winston@3.
|
|
23386
|
+
"../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/transports/file.js"(exports2, module2) {
|
|
23387
23387
|
"use strict";
|
|
23388
23388
|
var fs11 = __require("fs");
|
|
23389
23389
|
var path9 = __require("path");
|
|
@@ -23975,9 +23975,9 @@ var require_file = __commonJS({
|
|
|
23975
23975
|
}
|
|
23976
23976
|
});
|
|
23977
23977
|
|
|
23978
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
23978
|
+
// ../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/transports/http.js
|
|
23979
23979
|
var require_http = __commonJS({
|
|
23980
|
-
"../../node_modules/.pnpm/winston@3.
|
|
23980
|
+
"../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/transports/http.js"(exports2, module2) {
|
|
23981
23981
|
"use strict";
|
|
23982
23982
|
var http2 = __require("http");
|
|
23983
23983
|
var https2 = __require("https");
|
|
@@ -24206,9 +24206,9 @@ var require_is_stream = __commonJS({
|
|
|
24206
24206
|
}
|
|
24207
24207
|
});
|
|
24208
24208
|
|
|
24209
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
24209
|
+
// ../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/transports/stream.js
|
|
24210
24210
|
var require_stream2 = __commonJS({
|
|
24211
|
-
"../../node_modules/.pnpm/winston@3.
|
|
24211
|
+
"../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/transports/stream.js"(exports2, module2) {
|
|
24212
24212
|
"use strict";
|
|
24213
24213
|
var isStream3 = require_is_stream();
|
|
24214
24214
|
var { MESSAGE } = require_triple_beam();
|
|
@@ -24255,9 +24255,9 @@ var require_stream2 = __commonJS({
|
|
|
24255
24255
|
}
|
|
24256
24256
|
});
|
|
24257
24257
|
|
|
24258
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
24258
|
+
// ../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/transports/index.js
|
|
24259
24259
|
var require_transports = __commonJS({
|
|
24260
|
-
"../../node_modules/.pnpm/winston@3.
|
|
24260
|
+
"../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/transports/index.js"(exports2) {
|
|
24261
24261
|
"use strict";
|
|
24262
24262
|
Object.defineProperty(exports2, "Console", {
|
|
24263
24263
|
configurable: true,
|
|
@@ -24290,9 +24290,9 @@ var require_transports = __commonJS({
|
|
|
24290
24290
|
}
|
|
24291
24291
|
});
|
|
24292
24292
|
|
|
24293
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
24293
|
+
// ../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/config/index.js
|
|
24294
24294
|
var require_config2 = __commonJS({
|
|
24295
|
-
"../../node_modules/.pnpm/winston@3.
|
|
24295
|
+
"../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/config/index.js"(exports2) {
|
|
24296
24296
|
"use strict";
|
|
24297
24297
|
var logform = require_logform();
|
|
24298
24298
|
var { configs } = require_triple_beam();
|
|
@@ -24567,9 +24567,9 @@ var require_stack_trace = __commonJS({
|
|
|
24567
24567
|
}
|
|
24568
24568
|
});
|
|
24569
24569
|
|
|
24570
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
24570
|
+
// ../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/exception-stream.js
|
|
24571
24571
|
var require_exception_stream = __commonJS({
|
|
24572
|
-
"../../node_modules/.pnpm/winston@3.
|
|
24572
|
+
"../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/exception-stream.js"(exports2, module2) {
|
|
24573
24573
|
"use strict";
|
|
24574
24574
|
var { Writable } = require_readable();
|
|
24575
24575
|
module2.exports = class ExceptionStream extends Writable {
|
|
@@ -24607,14 +24607,14 @@ var require_exception_stream = __commonJS({
|
|
|
24607
24607
|
}
|
|
24608
24608
|
});
|
|
24609
24609
|
|
|
24610
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
24610
|
+
// ../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/exception-handler.js
|
|
24611
24611
|
var require_exception_handler = __commonJS({
|
|
24612
|
-
"../../node_modules/.pnpm/winston@3.
|
|
24612
|
+
"../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/exception-handler.js"(exports2, module2) {
|
|
24613
24613
|
"use strict";
|
|
24614
24614
|
var os2 = __require("os");
|
|
24615
24615
|
var asyncForEach2 = require_forEach();
|
|
24616
24616
|
var debug = require_node3()("winston:exception");
|
|
24617
|
-
var
|
|
24617
|
+
var once9 = require_one_time();
|
|
24618
24618
|
var stackTrace = require_stack_trace();
|
|
24619
24619
|
var ExceptionStream = require_exception_stream();
|
|
24620
24620
|
module2.exports = class ExceptionHandler {
|
|
@@ -24772,7 +24772,7 @@ var require_exception_handler = __commonJS({
|
|
|
24772
24772
|
return process.nextTick(gracefulExit);
|
|
24773
24773
|
}
|
|
24774
24774
|
asyncForEach2(handlers, (handler, next2) => {
|
|
24775
|
-
const done =
|
|
24775
|
+
const done = once9(next2);
|
|
24776
24776
|
const transport = handler.transport || handler;
|
|
24777
24777
|
function onDone(event) {
|
|
24778
24778
|
return () => {
|
|
@@ -24805,9 +24805,9 @@ var require_exception_handler = __commonJS({
|
|
|
24805
24805
|
}
|
|
24806
24806
|
});
|
|
24807
24807
|
|
|
24808
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
24808
|
+
// ../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/rejection-stream.js
|
|
24809
24809
|
var require_rejection_stream = __commonJS({
|
|
24810
|
-
"../../node_modules/.pnpm/winston@3.
|
|
24810
|
+
"../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/rejection-stream.js"(exports2, module2) {
|
|
24811
24811
|
"use strict";
|
|
24812
24812
|
var { Writable } = require_readable();
|
|
24813
24813
|
module2.exports = class RejectionStream extends Writable {
|
|
@@ -24845,14 +24845,14 @@ var require_rejection_stream = __commonJS({
|
|
|
24845
24845
|
}
|
|
24846
24846
|
});
|
|
24847
24847
|
|
|
24848
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
24848
|
+
// ../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/rejection-handler.js
|
|
24849
24849
|
var require_rejection_handler = __commonJS({
|
|
24850
|
-
"../../node_modules/.pnpm/winston@3.
|
|
24850
|
+
"../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/rejection-handler.js"(exports2, module2) {
|
|
24851
24851
|
"use strict";
|
|
24852
24852
|
var os2 = __require("os");
|
|
24853
24853
|
var asyncForEach2 = require_forEach();
|
|
24854
24854
|
var debug = require_node3()("winston:rejection");
|
|
24855
|
-
var
|
|
24855
|
+
var once9 = require_one_time();
|
|
24856
24856
|
var stackTrace = require_stack_trace();
|
|
24857
24857
|
var RejectionStream = require_rejection_stream();
|
|
24858
24858
|
module2.exports = class RejectionHandler {
|
|
@@ -25014,7 +25014,7 @@ var require_rejection_handler = __commonJS({
|
|
|
25014
25014
|
asyncForEach2(
|
|
25015
25015
|
handlers,
|
|
25016
25016
|
(handler, next2) => {
|
|
25017
|
-
const done =
|
|
25017
|
+
const done = once9(next2);
|
|
25018
25018
|
const transport = handler.transport || handler;
|
|
25019
25019
|
function onDone(event) {
|
|
25020
25020
|
return () => {
|
|
@@ -25049,9 +25049,9 @@ var require_rejection_handler = __commonJS({
|
|
|
25049
25049
|
}
|
|
25050
25050
|
});
|
|
25051
25051
|
|
|
25052
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
25052
|
+
// ../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/profiler.js
|
|
25053
25053
|
var require_profiler = __commonJS({
|
|
25054
|
-
"../../node_modules/.pnpm/winston@3.
|
|
25054
|
+
"../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/profiler.js"(exports2, module2) {
|
|
25055
25055
|
"use strict";
|
|
25056
25056
|
var Profiler = class {
|
|
25057
25057
|
/**
|
|
@@ -25091,9 +25091,9 @@ var require_profiler = __commonJS({
|
|
|
25091
25091
|
}
|
|
25092
25092
|
});
|
|
25093
25093
|
|
|
25094
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
25094
|
+
// ../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/logger.js
|
|
25095
25095
|
var require_logger = __commonJS({
|
|
25096
|
-
"../../node_modules/.pnpm/winston@3.
|
|
25096
|
+
"../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/logger.js"(exports2, module2) {
|
|
25097
25097
|
"use strict";
|
|
25098
25098
|
var { Stream: Stream2, Transform } = require_readable();
|
|
25099
25099
|
var asyncForEach2 = require_forEach();
|
|
@@ -25280,6 +25280,7 @@ var require_logger = __commonJS({
|
|
|
25280
25280
|
});
|
|
25281
25281
|
if (meta.message) info.message = `${info.message} ${meta.message}`;
|
|
25282
25282
|
if (meta.stack) info.stack = meta.stack;
|
|
25283
|
+
if (meta.cause) info.cause = meta.cause;
|
|
25283
25284
|
this.write(info);
|
|
25284
25285
|
return this;
|
|
25285
25286
|
}
|
|
@@ -25610,9 +25611,9 @@ var require_logger = __commonJS({
|
|
|
25610
25611
|
}
|
|
25611
25612
|
});
|
|
25612
25613
|
|
|
25613
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
25614
|
+
// ../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/create-logger.js
|
|
25614
25615
|
var require_create_logger = __commonJS({
|
|
25615
|
-
"../../node_modules/.pnpm/winston@3.
|
|
25616
|
+
"../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/create-logger.js"(exports2, module2) {
|
|
25616
25617
|
"use strict";
|
|
25617
25618
|
var { LEVEL } = require_triple_beam();
|
|
25618
25619
|
var config3 = require_config2();
|
|
@@ -25666,9 +25667,9 @@ var require_create_logger = __commonJS({
|
|
|
25666
25667
|
}
|
|
25667
25668
|
});
|
|
25668
25669
|
|
|
25669
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
25670
|
+
// ../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/container.js
|
|
25670
25671
|
var require_container = __commonJS({
|
|
25671
|
-
"../../node_modules/.pnpm/winston@3.
|
|
25672
|
+
"../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston/container.js"(exports2, module2) {
|
|
25672
25673
|
"use strict";
|
|
25673
25674
|
var createLogger3 = require_create_logger();
|
|
25674
25675
|
module2.exports = class Container {
|
|
@@ -25762,9 +25763,9 @@ var require_container = __commonJS({
|
|
|
25762
25763
|
}
|
|
25763
25764
|
});
|
|
25764
25765
|
|
|
25765
|
-
// ../../node_modules/.pnpm/winston@3.
|
|
25766
|
+
// ../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston.js
|
|
25766
25767
|
var require_winston = __commonJS({
|
|
25767
|
-
"../../node_modules/.pnpm/winston@3.
|
|
25768
|
+
"../../node_modules/.pnpm/winston@3.16.0/node_modules/winston/lib/winston.js"(exports2) {
|
|
25768
25769
|
"use strict";
|
|
25769
25770
|
var logform = require_logform();
|
|
25770
25771
|
var { warn } = require_common2();
|
|
@@ -29943,7 +29944,7 @@ var require_lodash = __commonJS({
|
|
|
29943
29944
|
return !predicate.apply(this, args2);
|
|
29944
29945
|
};
|
|
29945
29946
|
}
|
|
29946
|
-
function
|
|
29947
|
+
function once9(func) {
|
|
29947
29948
|
return before2(2, func);
|
|
29948
29949
|
}
|
|
29949
29950
|
var overArgs = castRest(function(func, transforms) {
|
|
@@ -31064,7 +31065,7 @@ var require_lodash = __commonJS({
|
|
|
31064
31065
|
lodash16.nthArg = nthArg;
|
|
31065
31066
|
lodash16.omit = omit2;
|
|
31066
31067
|
lodash16.omitBy = omitBy;
|
|
31067
|
-
lodash16.once =
|
|
31068
|
+
lodash16.once = once9;
|
|
31068
31069
|
lodash16.orderBy = orderBy;
|
|
31069
31070
|
lodash16.over = over;
|
|
31070
31071
|
lodash16.overArgs = overArgs;
|
|
@@ -63349,7 +63350,7 @@ var require_dist4 = __commonJS({
|
|
|
63349
63350
|
"../../node_modules/.pnpm/@tootallnate+once@2.0.0/node_modules/@tootallnate/once/dist/index.js"(exports2) {
|
|
63350
63351
|
"use strict";
|
|
63351
63352
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
63352
|
-
function
|
|
63353
|
+
function once9(emitter, name2, { signal } = {}) {
|
|
63353
63354
|
return new Promise((resolve45, reject) => {
|
|
63354
63355
|
function cleanup() {
|
|
63355
63356
|
signal === null || signal === void 0 ? void 0 : signal.removeEventListener("abort", cleanup);
|
|
@@ -63369,7 +63370,7 @@ var require_dist4 = __commonJS({
|
|
|
63369
63370
|
emitter.on("error", onError);
|
|
63370
63371
|
});
|
|
63371
63372
|
}
|
|
63372
|
-
exports2.default =
|
|
63373
|
+
exports2.default = once9;
|
|
63373
63374
|
}
|
|
63374
63375
|
});
|
|
63375
63376
|
|
|
@@ -88691,12 +88692,12 @@ var require_lockfile = __commonJS({
|
|
|
88691
88692
|
/***/
|
|
88692
88693
|
function(module3, exports3, __webpack_require__) {
|
|
88693
88694
|
var wrappy = __webpack_require__(123);
|
|
88694
|
-
module3.exports = wrappy(
|
|
88695
|
+
module3.exports = wrappy(once9);
|
|
88695
88696
|
module3.exports.strict = wrappy(onceStrict);
|
|
88696
|
-
|
|
88697
|
+
once9.proto = once9(function() {
|
|
88697
88698
|
Object.defineProperty(Function.prototype, "once", {
|
|
88698
88699
|
value: function() {
|
|
88699
|
-
return
|
|
88700
|
+
return once9(this);
|
|
88700
88701
|
},
|
|
88701
88702
|
configurable: true
|
|
88702
88703
|
});
|
|
@@ -88707,7 +88708,7 @@ var require_lockfile = __commonJS({
|
|
|
88707
88708
|
configurable: true
|
|
88708
88709
|
});
|
|
88709
88710
|
});
|
|
88710
|
-
function
|
|
88711
|
+
function once9(fn2) {
|
|
88711
88712
|
var f6 = function() {
|
|
88712
88713
|
if (f6.called) return f6.value;
|
|
88713
88714
|
f6.called = true;
|
|
@@ -88840,7 +88841,7 @@ var require_lockfile = __commonJS({
|
|
|
88840
88841
|
var util5 = __webpack_require__(2);
|
|
88841
88842
|
var childrenIgnored = common.childrenIgnored;
|
|
88842
88843
|
var isIgnored = common.isIgnored;
|
|
88843
|
-
var
|
|
88844
|
+
var once9 = __webpack_require__(61);
|
|
88844
88845
|
function glob2(pattern, options, cb) {
|
|
88845
88846
|
if (typeof options === "function") cb = options, options = {};
|
|
88846
88847
|
if (!options) options = {};
|
|
@@ -88899,7 +88900,7 @@ var require_lockfile = __commonJS({
|
|
|
88899
88900
|
var n2 = this.minimatch.set.length;
|
|
88900
88901
|
this.matches = new Array(n2);
|
|
88901
88902
|
if (typeof cb === "function") {
|
|
88902
|
-
cb =
|
|
88903
|
+
cb = once9(cb);
|
|
88903
88904
|
this.on("error", cb);
|
|
88904
88905
|
this.on("end", function(matches) {
|
|
88905
88906
|
cb(null, matches);
|
|
@@ -90905,11 +90906,11 @@ ${indent3}`);
|
|
|
90905
90906
|
const open = (0, (_promise || _load_promise()).promisify)((_fs || _load_fs()).default.open);
|
|
90906
90907
|
const futimes = (0, (_promise || _load_promise()).promisify)((_fs || _load_fs()).default.futimes);
|
|
90907
90908
|
const write = (0, (_promise || _load_promise()).promisify)((_fs || _load_fs()).default.write);
|
|
90908
|
-
const
|
|
90909
|
+
const unlink2 = exports3.unlink = (0, (_promise || _load_promise()).promisify)(__webpack_require__(233));
|
|
90909
90910
|
const copyFile2 = exports3.copyFile = (() => {
|
|
90910
90911
|
var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data2, cleanup) {
|
|
90911
90912
|
try {
|
|
90912
|
-
yield
|
|
90913
|
+
yield unlink2(data2.dest);
|
|
90913
90914
|
yield copyFilePoly(data2.src, data2.dest, 0, data2);
|
|
90914
90915
|
} finally {
|
|
90915
90916
|
if (cleanup) {
|
|
@@ -93033,7 +93034,7 @@ ${indent3}`);
|
|
|
93033
93034
|
function(module3, exports3, __webpack_require__) {
|
|
93034
93035
|
var wrappy = __webpack_require__(123);
|
|
93035
93036
|
var reqs = /* @__PURE__ */ Object.create(null);
|
|
93036
|
-
var
|
|
93037
|
+
var once9 = __webpack_require__(61);
|
|
93037
93038
|
module3.exports = wrappy(inflight);
|
|
93038
93039
|
function inflight(key, cb) {
|
|
93039
93040
|
if (reqs[key]) {
|
|
@@ -93045,7 +93046,7 @@ ${indent3}`);
|
|
|
93045
93046
|
}
|
|
93046
93047
|
}
|
|
93047
93048
|
function makeres(key) {
|
|
93048
|
-
return
|
|
93049
|
+
return once9(function RES() {
|
|
93049
93050
|
var cbs = reqs[key];
|
|
93050
93051
|
var len = cbs.length;
|
|
93051
93052
|
var args2 = slice2(arguments);
|
|
@@ -125423,12 +125424,12 @@ var require_wrappy = __commonJS({
|
|
|
125423
125424
|
var require_once2 = __commonJS({
|
|
125424
125425
|
"../../node_modules/.pnpm/once@1.4.0/node_modules/once/once.js"(exports2, module2) {
|
|
125425
125426
|
var wrappy = require_wrappy();
|
|
125426
|
-
module2.exports = wrappy(
|
|
125427
|
+
module2.exports = wrappy(once9);
|
|
125427
125428
|
module2.exports.strict = wrappy(onceStrict);
|
|
125428
|
-
|
|
125429
|
+
once9.proto = once9(function() {
|
|
125429
125430
|
Object.defineProperty(Function.prototype, "once", {
|
|
125430
125431
|
value: function() {
|
|
125431
|
-
return
|
|
125432
|
+
return once9(this);
|
|
125432
125433
|
},
|
|
125433
125434
|
configurable: true
|
|
125434
125435
|
});
|
|
@@ -125439,7 +125440,7 @@ var require_once2 = __commonJS({
|
|
|
125439
125440
|
configurable: true
|
|
125440
125441
|
});
|
|
125441
125442
|
});
|
|
125442
|
-
function
|
|
125443
|
+
function once9(fn2) {
|
|
125443
125444
|
var f6 = function() {
|
|
125444
125445
|
if (f6.called) return f6.value;
|
|
125445
125446
|
f6.called = true;
|
|
@@ -125468,7 +125469,7 @@ var require_inflight = __commonJS({
|
|
|
125468
125469
|
"../../node_modules/.pnpm/inflight@1.0.6/node_modules/inflight/inflight.js"(exports2, module2) {
|
|
125469
125470
|
var wrappy = require_wrappy();
|
|
125470
125471
|
var reqs = /* @__PURE__ */ Object.create(null);
|
|
125471
|
-
var
|
|
125472
|
+
var once9 = require_once2();
|
|
125472
125473
|
module2.exports = wrappy(inflight);
|
|
125473
125474
|
function inflight(key, cb) {
|
|
125474
125475
|
if (reqs[key]) {
|
|
@@ -125480,7 +125481,7 @@ var require_inflight = __commonJS({
|
|
|
125480
125481
|
}
|
|
125481
125482
|
}
|
|
125482
125483
|
function makeres(key) {
|
|
125483
|
-
return
|
|
125484
|
+
return once9(function RES() {
|
|
125484
125485
|
var cbs = reqs[key];
|
|
125485
125486
|
var len = cbs.length;
|
|
125486
125487
|
var args2 = slice2(arguments);
|
|
@@ -125529,7 +125530,7 @@ var require_glob = __commonJS({
|
|
|
125529
125530
|
var util5 = __require("util");
|
|
125530
125531
|
var childrenIgnored = common.childrenIgnored;
|
|
125531
125532
|
var isIgnored = common.isIgnored;
|
|
125532
|
-
var
|
|
125533
|
+
var once9 = require_once2();
|
|
125533
125534
|
function glob2(pattern, options, cb) {
|
|
125534
125535
|
if (typeof options === "function") cb = options, options = {};
|
|
125535
125536
|
if (!options) options = {};
|
|
@@ -125588,7 +125589,7 @@ var require_glob = __commonJS({
|
|
|
125588
125589
|
var n2 = this.minimatch.set.length;
|
|
125589
125590
|
this.matches = new Array(n2);
|
|
125590
125591
|
if (typeof cb === "function") {
|
|
125591
|
-
cb =
|
|
125592
|
+
cb = once9(cb);
|
|
125592
125593
|
this.on("error", cb);
|
|
125593
125594
|
this.on("end", function(matches) {
|
|
125594
125595
|
cb(null, matches);
|
|
@@ -152641,6 +152642,193 @@ var require_micromatch2 = __commonJS({
|
|
|
152641
152642
|
}
|
|
152642
152643
|
});
|
|
152643
152644
|
|
|
152645
|
+
// ../../node_modules/.pnpm/winston-transport@4.9.0/node_modules/winston-transport/modern.js
|
|
152646
|
+
var require_modern2 = __commonJS({
|
|
152647
|
+
"../../node_modules/.pnpm/winston-transport@4.9.0/node_modules/winston-transport/modern.js"(exports2, module2) {
|
|
152648
|
+
"use strict";
|
|
152649
|
+
var util5 = __require("util");
|
|
152650
|
+
var Writable = require_stream_writable();
|
|
152651
|
+
var { LEVEL } = require_triple_beam();
|
|
152652
|
+
var TransportStream = module2.exports = function TransportStream2(options = {}) {
|
|
152653
|
+
Writable.call(this, { objectMode: true, highWaterMark: options.highWaterMark });
|
|
152654
|
+
this.format = options.format;
|
|
152655
|
+
this.level = options.level;
|
|
152656
|
+
this.handleExceptions = options.handleExceptions;
|
|
152657
|
+
this.handleRejections = options.handleRejections;
|
|
152658
|
+
this.silent = options.silent;
|
|
152659
|
+
if (options.log) this.log = options.log;
|
|
152660
|
+
if (options.logv) this.logv = options.logv;
|
|
152661
|
+
if (options.close) this.close = options.close;
|
|
152662
|
+
this.once("pipe", (logger4) => {
|
|
152663
|
+
this.levels = logger4.levels;
|
|
152664
|
+
this.parent = logger4;
|
|
152665
|
+
});
|
|
152666
|
+
this.once("unpipe", (src) => {
|
|
152667
|
+
if (src === this.parent) {
|
|
152668
|
+
this.parent = null;
|
|
152669
|
+
if (this.close) {
|
|
152670
|
+
this.close();
|
|
152671
|
+
}
|
|
152672
|
+
}
|
|
152673
|
+
});
|
|
152674
|
+
};
|
|
152675
|
+
util5.inherits(TransportStream, Writable);
|
|
152676
|
+
TransportStream.prototype._write = function _write2(info, enc, callback) {
|
|
152677
|
+
if (this.silent || info.exception === true && !this.handleExceptions) {
|
|
152678
|
+
return callback(null);
|
|
152679
|
+
}
|
|
152680
|
+
const level = this.level || this.parent && this.parent.level;
|
|
152681
|
+
if (!level || this.levels[level] >= this.levels[info[LEVEL]]) {
|
|
152682
|
+
if (info && !this.format) {
|
|
152683
|
+
return this.log(info, callback);
|
|
152684
|
+
}
|
|
152685
|
+
let errState;
|
|
152686
|
+
let transformed;
|
|
152687
|
+
try {
|
|
152688
|
+
transformed = this.format.transform(Object.assign({}, info), this.format.options);
|
|
152689
|
+
} catch (err) {
|
|
152690
|
+
errState = err;
|
|
152691
|
+
}
|
|
152692
|
+
if (errState || !transformed) {
|
|
152693
|
+
callback();
|
|
152694
|
+
if (errState) throw errState;
|
|
152695
|
+
return;
|
|
152696
|
+
}
|
|
152697
|
+
return this.log(transformed, callback);
|
|
152698
|
+
}
|
|
152699
|
+
this._writableState.sync = false;
|
|
152700
|
+
return callback(null);
|
|
152701
|
+
};
|
|
152702
|
+
TransportStream.prototype._writev = function _writev(chunks, callback) {
|
|
152703
|
+
if (this.logv) {
|
|
152704
|
+
const infos = chunks.filter(this._accept, this);
|
|
152705
|
+
if (!infos.length) {
|
|
152706
|
+
return callback(null);
|
|
152707
|
+
}
|
|
152708
|
+
return this.logv(infos, callback);
|
|
152709
|
+
}
|
|
152710
|
+
for (let i7 = 0; i7 < chunks.length; i7++) {
|
|
152711
|
+
if (!this._accept(chunks[i7])) continue;
|
|
152712
|
+
if (chunks[i7].chunk && !this.format) {
|
|
152713
|
+
this.log(chunks[i7].chunk, chunks[i7].callback);
|
|
152714
|
+
continue;
|
|
152715
|
+
}
|
|
152716
|
+
let errState;
|
|
152717
|
+
let transformed;
|
|
152718
|
+
try {
|
|
152719
|
+
transformed = this.format.transform(
|
|
152720
|
+
Object.assign({}, chunks[i7].chunk),
|
|
152721
|
+
this.format.options
|
|
152722
|
+
);
|
|
152723
|
+
} catch (err) {
|
|
152724
|
+
errState = err;
|
|
152725
|
+
}
|
|
152726
|
+
if (errState || !transformed) {
|
|
152727
|
+
chunks[i7].callback();
|
|
152728
|
+
if (errState) {
|
|
152729
|
+
callback(null);
|
|
152730
|
+
throw errState;
|
|
152731
|
+
}
|
|
152732
|
+
} else {
|
|
152733
|
+
this.log(transformed, chunks[i7].callback);
|
|
152734
|
+
}
|
|
152735
|
+
}
|
|
152736
|
+
return callback(null);
|
|
152737
|
+
};
|
|
152738
|
+
TransportStream.prototype._accept = function _accept(write) {
|
|
152739
|
+
const info = write.chunk;
|
|
152740
|
+
if (this.silent) {
|
|
152741
|
+
return false;
|
|
152742
|
+
}
|
|
152743
|
+
const level = this.level || this.parent && this.parent.level;
|
|
152744
|
+
if (info.exception === true || !level || this.levels[level] >= this.levels[info[LEVEL]]) {
|
|
152745
|
+
if (this.handleExceptions || info.exception !== true) {
|
|
152746
|
+
return true;
|
|
152747
|
+
}
|
|
152748
|
+
}
|
|
152749
|
+
return false;
|
|
152750
|
+
};
|
|
152751
|
+
TransportStream.prototype._nop = function _nop() {
|
|
152752
|
+
return void 0;
|
|
152753
|
+
};
|
|
152754
|
+
}
|
|
152755
|
+
});
|
|
152756
|
+
|
|
152757
|
+
// ../../node_modules/.pnpm/winston-transport@4.9.0/node_modules/winston-transport/legacy.js
|
|
152758
|
+
var require_legacy2 = __commonJS({
|
|
152759
|
+
"../../node_modules/.pnpm/winston-transport@4.9.0/node_modules/winston-transport/legacy.js"(exports2, module2) {
|
|
152760
|
+
"use strict";
|
|
152761
|
+
var util5 = __require("util");
|
|
152762
|
+
var { LEVEL } = require_triple_beam();
|
|
152763
|
+
var TransportStream = require_modern2();
|
|
152764
|
+
var LegacyTransportStream = module2.exports = function LegacyTransportStream2(options = {}) {
|
|
152765
|
+
TransportStream.call(this, options);
|
|
152766
|
+
if (!options.transport || typeof options.transport.log !== "function") {
|
|
152767
|
+
throw new Error("Invalid transport, must be an object with a log method.");
|
|
152768
|
+
}
|
|
152769
|
+
this.transport = options.transport;
|
|
152770
|
+
this.level = this.level || options.transport.level;
|
|
152771
|
+
this.handleExceptions = this.handleExceptions || options.transport.handleExceptions;
|
|
152772
|
+
this._deprecated();
|
|
152773
|
+
function transportError(err) {
|
|
152774
|
+
this.emit("error", err, this.transport);
|
|
152775
|
+
}
|
|
152776
|
+
if (!this.transport.__winstonError) {
|
|
152777
|
+
this.transport.__winstonError = transportError.bind(this);
|
|
152778
|
+
this.transport.on("error", this.transport.__winstonError);
|
|
152779
|
+
}
|
|
152780
|
+
};
|
|
152781
|
+
util5.inherits(LegacyTransportStream, TransportStream);
|
|
152782
|
+
LegacyTransportStream.prototype._write = function _write2(info, enc, callback) {
|
|
152783
|
+
if (this.silent || info.exception === true && !this.handleExceptions) {
|
|
152784
|
+
return callback(null);
|
|
152785
|
+
}
|
|
152786
|
+
if (!this.level || this.levels[this.level] >= this.levels[info[LEVEL]]) {
|
|
152787
|
+
this.transport.log(info[LEVEL], info.message, info, this._nop);
|
|
152788
|
+
}
|
|
152789
|
+
callback(null);
|
|
152790
|
+
};
|
|
152791
|
+
LegacyTransportStream.prototype._writev = function _writev(chunks, callback) {
|
|
152792
|
+
for (let i7 = 0; i7 < chunks.length; i7++) {
|
|
152793
|
+
if (this._accept(chunks[i7])) {
|
|
152794
|
+
this.transport.log(
|
|
152795
|
+
chunks[i7].chunk[LEVEL],
|
|
152796
|
+
chunks[i7].chunk.message,
|
|
152797
|
+
chunks[i7].chunk,
|
|
152798
|
+
this._nop
|
|
152799
|
+
);
|
|
152800
|
+
chunks[i7].callback();
|
|
152801
|
+
}
|
|
152802
|
+
}
|
|
152803
|
+
return callback(null);
|
|
152804
|
+
};
|
|
152805
|
+
LegacyTransportStream.prototype._deprecated = function _deprecated() {
|
|
152806
|
+
console.error([
|
|
152807
|
+
`${this.transport.name} is a legacy winston transport. Consider upgrading: `,
|
|
152808
|
+
"- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"
|
|
152809
|
+
].join("\n"));
|
|
152810
|
+
};
|
|
152811
|
+
LegacyTransportStream.prototype.close = function close() {
|
|
152812
|
+
if (this.transport.close) {
|
|
152813
|
+
this.transport.close();
|
|
152814
|
+
}
|
|
152815
|
+
if (this.transport.__winstonError) {
|
|
152816
|
+
this.transport.removeListener("error", this.transport.__winstonError);
|
|
152817
|
+
this.transport.__winstonError = null;
|
|
152818
|
+
}
|
|
152819
|
+
};
|
|
152820
|
+
}
|
|
152821
|
+
});
|
|
152822
|
+
|
|
152823
|
+
// ../../node_modules/.pnpm/winston-transport@4.9.0/node_modules/winston-transport/index.js
|
|
152824
|
+
var require_winston_transport2 = __commonJS({
|
|
152825
|
+
"../../node_modules/.pnpm/winston-transport@4.9.0/node_modules/winston-transport/index.js"(exports2, module2) {
|
|
152826
|
+
"use strict";
|
|
152827
|
+
module2.exports = require_modern2();
|
|
152828
|
+
module2.exports.LegacyTransportStream = require_legacy2();
|
|
152829
|
+
}
|
|
152830
|
+
});
|
|
152831
|
+
|
|
152644
152832
|
// ../../node_modules/.pnpm/yaml@2.2.2/node_modules/yaml/dist/nodes/Node.js
|
|
152645
152833
|
var require_Node2 = __commonJS({
|
|
152646
152834
|
"../../node_modules/.pnpm/yaml@2.2.2/node_modules/yaml/dist/nodes/Node.js"(exports2) {
|
|
@@ -183378,7 +183566,7 @@ var require_server = __commonJS({
|
|
|
183378
183566
|
[common_1.STATE_CLOSING]: [common_1.STATE_CLOSING, common_1.STATE_CLOSED]
|
|
183379
183567
|
});
|
|
183380
183568
|
var kMonitor = Symbol("monitor");
|
|
183381
|
-
var
|
|
183569
|
+
var Server2 = class _Server extends mongo_types_1.TypedEventEmitter {
|
|
183382
183570
|
/**
|
|
183383
183571
|
* Create a server
|
|
183384
183572
|
*/
|
|
@@ -183595,14 +183783,14 @@ var require_server = __commonJS({
|
|
|
183595
183783
|
return this.s.operationCount += 1;
|
|
183596
183784
|
}
|
|
183597
183785
|
};
|
|
183598
|
-
|
|
183599
|
-
|
|
183600
|
-
|
|
183601
|
-
|
|
183602
|
-
|
|
183603
|
-
|
|
183604
|
-
|
|
183605
|
-
exports2.Server =
|
|
183786
|
+
Server2.SERVER_HEARTBEAT_STARTED = constants_1.SERVER_HEARTBEAT_STARTED;
|
|
183787
|
+
Server2.SERVER_HEARTBEAT_SUCCEEDED = constants_1.SERVER_HEARTBEAT_SUCCEEDED;
|
|
183788
|
+
Server2.SERVER_HEARTBEAT_FAILED = constants_1.SERVER_HEARTBEAT_FAILED;
|
|
183789
|
+
Server2.CONNECT = constants_1.CONNECT;
|
|
183790
|
+
Server2.DESCRIPTION_RECEIVED = constants_1.DESCRIPTION_RECEIVED;
|
|
183791
|
+
Server2.CLOSED = constants_1.CLOSED;
|
|
183792
|
+
Server2.ENDED = constants_1.ENDED;
|
|
183793
|
+
exports2.Server = Server2;
|
|
183606
183794
|
function calculateRoundTripTime(oldRtt, duration) {
|
|
183607
183795
|
if (oldRtt === -1) {
|
|
183608
183796
|
return duration;
|
|
@@ -183617,7 +183805,7 @@ var require_server = __commonJS({
|
|
|
183617
183805
|
if (error instanceof error_1.MongoNetworkError && !(error instanceof error_1.MongoNetworkTimeoutError)) {
|
|
183618
183806
|
server[kMonitor]?.reset();
|
|
183619
183807
|
}
|
|
183620
|
-
server.emit(
|
|
183808
|
+
server.emit(Server2.DESCRIPTION_RECEIVED, new server_description_1.ServerDescription(server.description.hostAddress, void 0, { error }));
|
|
183621
183809
|
}
|
|
183622
183810
|
function isPinnableCommand(cmd, session) {
|
|
183623
183811
|
if (session) {
|
|
@@ -190819,7 +191007,7 @@ var require_lodash8 = __commonJS({
|
|
|
190819
191007
|
return result;
|
|
190820
191008
|
};
|
|
190821
191009
|
}
|
|
190822
|
-
function
|
|
191010
|
+
function once9(func) {
|
|
190823
191011
|
return before2(2, func);
|
|
190824
191012
|
}
|
|
190825
191013
|
function isObject2(value2) {
|
|
@@ -190865,7 +191053,7 @@ var require_lodash8 = __commonJS({
|
|
|
190865
191053
|
var isBinary = reIsBinary.test(value2);
|
|
190866
191054
|
return isBinary || reIsOctal.test(value2) ? freeParseInt(value2.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value2) ? NAN : +value2;
|
|
190867
191055
|
}
|
|
190868
|
-
module2.exports =
|
|
191056
|
+
module2.exports = once9;
|
|
190869
191057
|
}
|
|
190870
191058
|
});
|
|
190871
191059
|
|
|
@@ -190882,7 +191070,7 @@ var require_sign2 = __commonJS({
|
|
|
190882
191070
|
var isNumber4 = require_lodash5();
|
|
190883
191071
|
var isPlainObject2 = require_lodash6();
|
|
190884
191072
|
var isString2 = require_lodash7();
|
|
190885
|
-
var
|
|
191073
|
+
var once9 = require_lodash8();
|
|
190886
191074
|
var { KeyObject, createSecretKey, createPrivateKey } = __require("crypto");
|
|
190887
191075
|
var SUPPORTED_ALGS = ["RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "HS256", "HS384", "HS512", "none"];
|
|
190888
191076
|
if (PS_SUPPORTED) {
|
|
@@ -191071,7 +191259,7 @@ var require_sign2 = __commonJS({
|
|
|
191071
191259
|
});
|
|
191072
191260
|
const encoding = options.encoding || "utf8";
|
|
191073
191261
|
if (typeof callback === "function") {
|
|
191074
|
-
callback = callback &&
|
|
191262
|
+
callback = callback && once9(callback);
|
|
191075
191263
|
jws.createSign({
|
|
191076
191264
|
header,
|
|
191077
191265
|
privateKey: secretOrPrivateKey,
|
|
@@ -195108,16 +195296,16 @@ var require_eventemitter3 = __commonJS({
|
|
|
195108
195296
|
Events.prototype = /* @__PURE__ */ Object.create(null);
|
|
195109
195297
|
if (!new Events().__proto__) prefix = false;
|
|
195110
195298
|
}
|
|
195111
|
-
function EE3(fn2, context2,
|
|
195299
|
+
function EE3(fn2, context2, once9) {
|
|
195112
195300
|
this.fn = fn2;
|
|
195113
195301
|
this.context = context2;
|
|
195114
|
-
this.once =
|
|
195302
|
+
this.once = once9 || false;
|
|
195115
195303
|
}
|
|
195116
|
-
function addListener(emitter, event, fn2, context2,
|
|
195304
|
+
function addListener(emitter, event, fn2, context2, once9) {
|
|
195117
195305
|
if (typeof fn2 !== "function") {
|
|
195118
195306
|
throw new TypeError("The listener must be a function");
|
|
195119
195307
|
}
|
|
195120
|
-
var listener = new EE3(fn2, context2 || emitter,
|
|
195308
|
+
var listener = new EE3(fn2, context2 || emitter, once9), evt = prefix ? prefix + event : event;
|
|
195121
195309
|
if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;
|
|
195122
195310
|
else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);
|
|
195123
195311
|
else emitter._events[evt] = [emitter._events[evt], listener];
|
|
@@ -195211,10 +195399,10 @@ var require_eventemitter3 = __commonJS({
|
|
|
195211
195399
|
EventEmitter3.prototype.on = function on(event, fn2, context2) {
|
|
195212
195400
|
return addListener(this, event, fn2, context2, false);
|
|
195213
195401
|
};
|
|
195214
|
-
EventEmitter3.prototype.once = function
|
|
195402
|
+
EventEmitter3.prototype.once = function once9(event, fn2, context2) {
|
|
195215
195403
|
return addListener(this, event, fn2, context2, true);
|
|
195216
195404
|
};
|
|
195217
|
-
EventEmitter3.prototype.removeListener = function removeListener(event, fn2, context2,
|
|
195405
|
+
EventEmitter3.prototype.removeListener = function removeListener(event, fn2, context2, once9) {
|
|
195218
195406
|
var evt = prefix ? prefix + event : event;
|
|
195219
195407
|
if (!this._events[evt]) return this;
|
|
195220
195408
|
if (!fn2) {
|
|
@@ -195223,12 +195411,12 @@ var require_eventemitter3 = __commonJS({
|
|
|
195223
195411
|
}
|
|
195224
195412
|
var listeners = this._events[evt];
|
|
195225
195413
|
if (listeners.fn) {
|
|
195226
|
-
if (listeners.fn === fn2 && (!
|
|
195414
|
+
if (listeners.fn === fn2 && (!once9 || listeners.once) && (!context2 || listeners.context === context2)) {
|
|
195227
195415
|
clearEvent(this, evt);
|
|
195228
195416
|
}
|
|
195229
195417
|
} else {
|
|
195230
195418
|
for (var i7 = 0, events = [], length = listeners.length; i7 < length; i7++) {
|
|
195231
|
-
if (listeners[i7].fn !== fn2 ||
|
|
195419
|
+
if (listeners[i7].fn !== fn2 || once9 && !listeners[i7].once || context2 && listeners[i7].context !== context2) {
|
|
195232
195420
|
events.push(listeners[i7]);
|
|
195233
195421
|
}
|
|
195234
195422
|
}
|
|
@@ -199267,16 +199455,16 @@ var require_eventemitter32 = __commonJS({
|
|
|
199267
199455
|
Events.prototype = /* @__PURE__ */ Object.create(null);
|
|
199268
199456
|
if (!new Events().__proto__) prefix = false;
|
|
199269
199457
|
}
|
|
199270
|
-
function EE3(fn2, context2,
|
|
199458
|
+
function EE3(fn2, context2, once9) {
|
|
199271
199459
|
this.fn = fn2;
|
|
199272
199460
|
this.context = context2;
|
|
199273
|
-
this.once =
|
|
199461
|
+
this.once = once9 || false;
|
|
199274
199462
|
}
|
|
199275
|
-
function addListener(emitter, event, fn2, context2,
|
|
199463
|
+
function addListener(emitter, event, fn2, context2, once9) {
|
|
199276
199464
|
if (typeof fn2 !== "function") {
|
|
199277
199465
|
throw new TypeError("The listener must be a function");
|
|
199278
199466
|
}
|
|
199279
|
-
var listener = new EE3(fn2, context2 || emitter,
|
|
199467
|
+
var listener = new EE3(fn2, context2 || emitter, once9), evt = prefix ? prefix + event : event;
|
|
199280
199468
|
if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;
|
|
199281
199469
|
else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);
|
|
199282
199470
|
else emitter._events[evt] = [emitter._events[evt], listener];
|
|
@@ -199370,10 +199558,10 @@ var require_eventemitter32 = __commonJS({
|
|
|
199370
199558
|
EventEmitter3.prototype.on = function on(event, fn2, context2) {
|
|
199371
199559
|
return addListener(this, event, fn2, context2, false);
|
|
199372
199560
|
};
|
|
199373
|
-
EventEmitter3.prototype.once = function
|
|
199561
|
+
EventEmitter3.prototype.once = function once9(event, fn2, context2) {
|
|
199374
199562
|
return addListener(this, event, fn2, context2, true);
|
|
199375
199563
|
};
|
|
199376
|
-
EventEmitter3.prototype.removeListener = function removeListener(event, fn2, context2,
|
|
199564
|
+
EventEmitter3.prototype.removeListener = function removeListener(event, fn2, context2, once9) {
|
|
199377
199565
|
var evt = prefix ? prefix + event : event;
|
|
199378
199566
|
if (!this._events[evt]) return this;
|
|
199379
199567
|
if (!fn2) {
|
|
@@ -199382,12 +199570,12 @@ var require_eventemitter32 = __commonJS({
|
|
|
199382
199570
|
}
|
|
199383
199571
|
var listeners = this._events[evt];
|
|
199384
199572
|
if (listeners.fn) {
|
|
199385
|
-
if (listeners.fn === fn2 && (!
|
|
199573
|
+
if (listeners.fn === fn2 && (!once9 || listeners.once) && (!context2 || listeners.context === context2)) {
|
|
199386
199574
|
clearEvent(this, evt);
|
|
199387
199575
|
}
|
|
199388
199576
|
} else {
|
|
199389
199577
|
for (var i7 = 0, events = [], length = listeners.length; i7 < length; i7++) {
|
|
199390
|
-
if (listeners[i7].fn !== fn2 ||
|
|
199578
|
+
if (listeners[i7].fn !== fn2 || once9 && !listeners[i7].once || context2 && listeners[i7].context !== context2) {
|
|
199391
199579
|
events.push(listeners[i7]);
|
|
199392
199580
|
}
|
|
199393
199581
|
}
|
|
@@ -204864,6 +205052,8 @@ function utilFormatter() {
|
|
|
204864
205052
|
var CLILogger = class {
|
|
204865
205053
|
logger = console;
|
|
204866
205054
|
writeStream;
|
|
205055
|
+
batchedHttpLogStreamer;
|
|
205056
|
+
socketTransport;
|
|
204867
205057
|
// Spinner registers itself as wrapper in order to suspend spinning when logging -- default to the empty wrapper
|
|
204868
205058
|
wrapper = (cb) => cb();
|
|
204869
205059
|
initWinstonLogger(debug, logFilePath) {
|
|
@@ -204896,6 +205086,39 @@ var CLILogger = class {
|
|
|
204896
205086
|
transports
|
|
204897
205087
|
});
|
|
204898
205088
|
}
|
|
205089
|
+
/**
|
|
205090
|
+
* Initialize socket-based logger for child processes.
|
|
205091
|
+
* This replaces file-based logging with socket streaming to the main process.
|
|
205092
|
+
*
|
|
205093
|
+
* @param options - Socket logger configuration
|
|
205094
|
+
* @param socketTransport - Pre-created socket transport (must be created by caller)
|
|
205095
|
+
*/
|
|
205096
|
+
initSocketLogger(options, socketTransport) {
|
|
205097
|
+
if (this.logger instanceof import_winston.Logger) {
|
|
205098
|
+
return;
|
|
205099
|
+
}
|
|
205100
|
+
const customLevels = {
|
|
205101
|
+
...import_winston.config.npm.levels,
|
|
205102
|
+
// 5.5 includes 'debug' but not 'silly'
|
|
205103
|
+
file: 5.5
|
|
205104
|
+
};
|
|
205105
|
+
const customColors = {
|
|
205106
|
+
file: "gray"
|
|
205107
|
+
};
|
|
205108
|
+
(0, import_winston.addColors)(customColors);
|
|
205109
|
+
this.socketTransport = socketTransport;
|
|
205110
|
+
this.logger = (0, import_winston.createLogger)({
|
|
205111
|
+
level: options.debug ? "debug" : "info",
|
|
205112
|
+
levels: customLevels,
|
|
205113
|
+
format: import_winston.format.combine(
|
|
205114
|
+
import_winston.format.timestamp({ format: "YYYY-MM-DD HH:mm:ss.SSS" }),
|
|
205115
|
+
utilFormatter(),
|
|
205116
|
+
import_winston.format.colorize(),
|
|
205117
|
+
import_winston.format.printf(({ level, message: message2, label, timestamp }) => `${timestamp} ${label || "-"} ${level}: ${message2}`)
|
|
205118
|
+
),
|
|
205119
|
+
transports: [new import_winston.transports.Console(), socketTransport]
|
|
205120
|
+
});
|
|
205121
|
+
}
|
|
204899
205122
|
setWrapper(wrapper) {
|
|
204900
205123
|
this.wrapper = wrapper;
|
|
204901
205124
|
}
|
|
@@ -204918,6 +205141,26 @@ var CLILogger = class {
|
|
|
204918
205141
|
isDebugEnabled() {
|
|
204919
205142
|
return this.logger instanceof Console || this.logger.isDebugEnabled();
|
|
204920
205143
|
}
|
|
205144
|
+
/**
|
|
205145
|
+
* Initialize HTTP logging streamer to send logs to backend.
|
|
205146
|
+
* Should be called after reportId is created.
|
|
205147
|
+
*
|
|
205148
|
+
* @param batchedHttpLogStreamer - The BatchedHttpLogStreamer instance (from utils package)
|
|
205149
|
+
*/
|
|
205150
|
+
initHttpLogging(batchedHttpLogStreamer) {
|
|
205151
|
+
this.batchedHttpLogStreamer = batchedHttpLogStreamer;
|
|
205152
|
+
}
|
|
205153
|
+
/**
|
|
205154
|
+
* Add a transport to the main process logger.
|
|
205155
|
+
* Used to add the MainProcessTransport so main process logs are sent to backend.
|
|
205156
|
+
*
|
|
205157
|
+
* @param transport - The transport to add
|
|
205158
|
+
*/
|
|
205159
|
+
addTransport(transport) {
|
|
205160
|
+
if (this.logger instanceof import_winston.Logger) {
|
|
205161
|
+
this.logger.add(transport);
|
|
205162
|
+
}
|
|
205163
|
+
}
|
|
204921
205164
|
/**
|
|
204922
205165
|
* End the logger instance and return a promise
|
|
204923
205166
|
* that resolves when the logger is finished.
|
|
@@ -204926,6 +205169,8 @@ var CLILogger = class {
|
|
|
204926
205169
|
* in errors that are swallowed by the 'error' event listener in this function.
|
|
204927
205170
|
*/
|
|
204928
205171
|
async finish() {
|
|
205172
|
+
await this.batchedHttpLogStreamer?.close();
|
|
205173
|
+
this.socketTransport?.close?.();
|
|
204929
205174
|
return new Promise((resolve45) => {
|
|
204930
205175
|
if (this.logger instanceof Console || this.logger.writableEnded) {
|
|
204931
205176
|
resolve45();
|
|
@@ -205901,6 +206146,18 @@ async function finalizeUpgradePurlRun(upgradePurlRunId, status, stackTrace, logF
|
|
|
205901
206146
|
handleError(error, "Error finalizing upgrade purl run", false);
|
|
205902
206147
|
}
|
|
205903
206148
|
}
|
|
206149
|
+
async function sendLogChunkSocket(reportId, logs) {
|
|
206150
|
+
try {
|
|
206151
|
+
const url2 = getSocketApiUrl("tier1-reachability-scan/add-log-chunk");
|
|
206152
|
+
const data2 = {
|
|
206153
|
+
tier1_reachability_scan_id: reportId,
|
|
206154
|
+
logs
|
|
206155
|
+
};
|
|
206156
|
+
await axios2.post(url2, data2, { headers: getAuthHeaders() });
|
|
206157
|
+
} catch (error) {
|
|
206158
|
+
console.warn("Failed to send log chunk to Socket:", error.message);
|
|
206159
|
+
}
|
|
206160
|
+
}
|
|
205904
206161
|
function getSocketAPI() {
|
|
205905
206162
|
return {
|
|
205906
206163
|
createSocketTier1Scan,
|
|
@@ -205912,7 +206169,8 @@ function getSocketAPI() {
|
|
|
205912
206169
|
registerAutofixOrUpgradePurlRun,
|
|
205913
206170
|
finalizeAutofixRun,
|
|
205914
206171
|
registerUpgradePurlRun,
|
|
205915
|
-
finalizeUpgradePurlRun
|
|
206172
|
+
finalizeUpgradePurlRun,
|
|
206173
|
+
sendLogChunkSocket
|
|
205916
206174
|
};
|
|
205917
206175
|
}
|
|
205918
206176
|
|
|
@@ -211202,7 +211460,7 @@ var mkdir3 = (dir, opt, cb) => {
|
|
|
211202
211460
|
const gid = opt.gid;
|
|
211203
211461
|
const doChown = typeof uid === "number" && typeof gid === "number" && (uid !== opt.processUid || gid !== opt.processGid);
|
|
211204
211462
|
const preserve = opt.preserve;
|
|
211205
|
-
const
|
|
211463
|
+
const unlink2 = opt.unlink;
|
|
211206
211464
|
const cache = opt.cache;
|
|
211207
211465
|
const cwd = normalizeWindowsPath(opt.cwd);
|
|
211208
211466
|
const done = (er, created) => {
|
|
@@ -211234,33 +211492,33 @@ var mkdir3 = (dir, opt, cb) => {
|
|
|
211234
211492
|
}
|
|
211235
211493
|
const sub = normalizeWindowsPath(path5.relative(cwd, dir));
|
|
211236
211494
|
const parts = sub.split("/");
|
|
211237
|
-
mkdir_(cwd, parts, mode, cache,
|
|
211495
|
+
mkdir_(cwd, parts, mode, cache, unlink2, cwd, void 0, done);
|
|
211238
211496
|
};
|
|
211239
|
-
var mkdir_ = (base, parts, mode, cache,
|
|
211497
|
+
var mkdir_ = (base, parts, mode, cache, unlink2, cwd, created, cb) => {
|
|
211240
211498
|
if (!parts.length) {
|
|
211241
211499
|
return cb(null, created);
|
|
211242
211500
|
}
|
|
211243
211501
|
const p3 = parts.shift();
|
|
211244
211502
|
const part = normalizeWindowsPath(path5.resolve(base + "/" + p3));
|
|
211245
211503
|
if (cGet(cache, part)) {
|
|
211246
|
-
return mkdir_(part, parts, mode, cache,
|
|
211504
|
+
return mkdir_(part, parts, mode, cache, unlink2, cwd, created, cb);
|
|
211247
211505
|
}
|
|
211248
|
-
fs7.mkdir(part, mode, onmkdir(part, parts, mode, cache,
|
|
211506
|
+
fs7.mkdir(part, mode, onmkdir(part, parts, mode, cache, unlink2, cwd, created, cb));
|
|
211249
211507
|
};
|
|
211250
|
-
var onmkdir = (part, parts, mode, cache,
|
|
211508
|
+
var onmkdir = (part, parts, mode, cache, unlink2, cwd, created, cb) => (er) => {
|
|
211251
211509
|
if (er) {
|
|
211252
211510
|
fs7.lstat(part, (statEr, st) => {
|
|
211253
211511
|
if (statEr) {
|
|
211254
211512
|
statEr.path = statEr.path && normalizeWindowsPath(statEr.path);
|
|
211255
211513
|
cb(statEr);
|
|
211256
211514
|
} else if (st.isDirectory()) {
|
|
211257
|
-
mkdir_(part, parts, mode, cache,
|
|
211258
|
-
} else if (
|
|
211515
|
+
mkdir_(part, parts, mode, cache, unlink2, cwd, created, cb);
|
|
211516
|
+
} else if (unlink2) {
|
|
211259
211517
|
fs7.unlink(part, (er2) => {
|
|
211260
211518
|
if (er2) {
|
|
211261
211519
|
return cb(er2);
|
|
211262
211520
|
}
|
|
211263
|
-
fs7.mkdir(part, mode, onmkdir(part, parts, mode, cache,
|
|
211521
|
+
fs7.mkdir(part, mode, onmkdir(part, parts, mode, cache, unlink2, cwd, created, cb));
|
|
211264
211522
|
});
|
|
211265
211523
|
} else if (st.isSymbolicLink()) {
|
|
211266
211524
|
return cb(new SymlinkError(part, part + "/" + parts.join("/")));
|
|
@@ -211270,7 +211528,7 @@ var onmkdir = (part, parts, mode, cache, unlink, cwd, created, cb) => (er) => {
|
|
|
211270
211528
|
});
|
|
211271
211529
|
} else {
|
|
211272
211530
|
created = created || part;
|
|
211273
|
-
mkdir_(part, parts, mode, cache,
|
|
211531
|
+
mkdir_(part, parts, mode, cache, unlink2, cwd, created, cb);
|
|
211274
211532
|
}
|
|
211275
211533
|
};
|
|
211276
211534
|
var checkCwdSync = (dir) => {
|
|
@@ -211295,7 +211553,7 @@ var mkdirSync3 = (dir, opt) => {
|
|
|
211295
211553
|
const gid = opt.gid;
|
|
211296
211554
|
const doChown = typeof uid === "number" && typeof gid === "number" && (uid !== opt.processUid || gid !== opt.processGid);
|
|
211297
211555
|
const preserve = opt.preserve;
|
|
211298
|
-
const
|
|
211556
|
+
const unlink2 = opt.unlink;
|
|
211299
211557
|
const cache = opt.cache;
|
|
211300
211558
|
const cwd = normalizeWindowsPath(opt.cwd);
|
|
211301
211559
|
const done = (created2) => {
|
|
@@ -211334,7 +211592,7 @@ var mkdirSync3 = (dir, opt) => {
|
|
|
211334
211592
|
if (st.isDirectory()) {
|
|
211335
211593
|
cSet(cache, part, true);
|
|
211336
211594
|
continue;
|
|
211337
|
-
} else if (
|
|
211595
|
+
} else if (unlink2) {
|
|
211338
211596
|
fs7.unlinkSync(part);
|
|
211339
211597
|
fs7.mkdirSync(part, mode);
|
|
211340
211598
|
created = created || part;
|
|
@@ -231190,6 +231448,8 @@ function utilFormatter2() {
|
|
|
231190
231448
|
var CLILogger2 = class {
|
|
231191
231449
|
logger = console;
|
|
231192
231450
|
writeStream;
|
|
231451
|
+
batchedHttpLogStreamer;
|
|
231452
|
+
socketTransport;
|
|
231193
231453
|
// Spinner registers itself as wrapper in order to suspend spinning when logging -- default to the empty wrapper
|
|
231194
231454
|
wrapper = (cb) => cb();
|
|
231195
231455
|
initWinstonLogger(debug, logFilePath) {
|
|
@@ -231217,6 +231477,34 @@ var CLILogger2 = class {
|
|
|
231217
231477
|
transports
|
|
231218
231478
|
});
|
|
231219
231479
|
}
|
|
231480
|
+
/**
|
|
231481
|
+
* Initialize socket-based logger for child processes.
|
|
231482
|
+
* This replaces file-based logging with socket streaming to the main process.
|
|
231483
|
+
*
|
|
231484
|
+
* @param options - Socket logger configuration
|
|
231485
|
+
* @param socketTransport - Pre-created socket transport (must be created by caller)
|
|
231486
|
+
*/
|
|
231487
|
+
initSocketLogger(options, socketTransport) {
|
|
231488
|
+
if (this.logger instanceof import_winston2.Logger) {
|
|
231489
|
+
return;
|
|
231490
|
+
}
|
|
231491
|
+
const customLevels = {
|
|
231492
|
+
...import_winston2.config.npm.levels,
|
|
231493
|
+
// 5.5 includes 'debug' but not 'silly'
|
|
231494
|
+
file: 5.5
|
|
231495
|
+
};
|
|
231496
|
+
const customColors = {
|
|
231497
|
+
file: "gray"
|
|
231498
|
+
};
|
|
231499
|
+
(0, import_winston2.addColors)(customColors);
|
|
231500
|
+
this.socketTransport = socketTransport;
|
|
231501
|
+
this.logger = (0, import_winston2.createLogger)({
|
|
231502
|
+
level: options.debug ? "debug" : "info",
|
|
231503
|
+
levels: customLevels,
|
|
231504
|
+
format: import_winston2.format.combine(import_winston2.format.timestamp({ format: "YYYY-MM-DD HH:mm:ss.SSS" }), utilFormatter2(), import_winston2.format.colorize(), import_winston2.format.printf(({ level, message: message2, label, timestamp }) => `${timestamp} ${label || "-"} ${level}: ${message2}`)),
|
|
231505
|
+
transports: [new import_winston2.transports.Console(), socketTransport]
|
|
231506
|
+
});
|
|
231507
|
+
}
|
|
231220
231508
|
setWrapper(wrapper) {
|
|
231221
231509
|
this.wrapper = wrapper;
|
|
231222
231510
|
}
|
|
@@ -231240,6 +231528,26 @@ var CLILogger2 = class {
|
|
|
231240
231528
|
isDebugEnabled() {
|
|
231241
231529
|
return this.logger instanceof Console2 || this.logger.isDebugEnabled();
|
|
231242
231530
|
}
|
|
231531
|
+
/**
|
|
231532
|
+
* Initialize HTTP logging streamer to send logs to backend.
|
|
231533
|
+
* Should be called after reportId is created.
|
|
231534
|
+
*
|
|
231535
|
+
* @param batchedHttpLogStreamer - The BatchedHttpLogStreamer instance (from utils package)
|
|
231536
|
+
*/
|
|
231537
|
+
initHttpLogging(batchedHttpLogStreamer) {
|
|
231538
|
+
this.batchedHttpLogStreamer = batchedHttpLogStreamer;
|
|
231539
|
+
}
|
|
231540
|
+
/**
|
|
231541
|
+
* Add a transport to the main process logger.
|
|
231542
|
+
* Used to add the MainProcessTransport so main process logs are sent to backend.
|
|
231543
|
+
*
|
|
231544
|
+
* @param transport - The transport to add
|
|
231545
|
+
*/
|
|
231546
|
+
addTransport(transport) {
|
|
231547
|
+
if (this.logger instanceof import_winston2.Logger) {
|
|
231548
|
+
this.logger.add(transport);
|
|
231549
|
+
}
|
|
231550
|
+
}
|
|
231243
231551
|
/**
|
|
231244
231552
|
* End the logger instance and return a promise
|
|
231245
231553
|
* that resolves when the logger is finished.
|
|
@@ -231248,6 +231556,8 @@ var CLILogger2 = class {
|
|
|
231248
231556
|
* in errors that are swallowed by the 'error' event listener in this function.
|
|
231249
231557
|
*/
|
|
231250
231558
|
async finish() {
|
|
231559
|
+
await this.batchedHttpLogStreamer?.close();
|
|
231560
|
+
this.socketTransport?.close?.();
|
|
231251
231561
|
return new Promise((resolve45) => {
|
|
231252
231562
|
if (this.logger instanceof Console2 || this.logger.writableEnded) {
|
|
231253
231563
|
resolve45();
|
|
@@ -231795,7 +232105,7 @@ var pullDockerImage = memoize(async (image) => {
|
|
|
231795
232105
|
return true;
|
|
231796
232106
|
});
|
|
231797
232107
|
var TMP_DIR_IN_DOCKER = "/coana-tmp";
|
|
231798
|
-
var
|
|
232108
|
+
var SOCKET_PATH_IN_DOCKER = "/coana.sock";
|
|
231799
232109
|
var OtherModulesCommunicator = class {
|
|
231800
232110
|
constructor(rootWorkingDir, options, apiKey) {
|
|
231801
232111
|
this.rootWorkingDir = rootWorkingDir;
|
|
@@ -231846,7 +232156,7 @@ var OtherModulesCommunicator = class {
|
|
|
231846
232156
|
// options shared between package-management and reachability-analyzers
|
|
231847
232157
|
commonOptions = once7(
|
|
231848
232158
|
() => argt`${this.options.debug && "--debug"} ${this.options.silent && "--silent"}
|
|
231849
|
-
--coana-
|
|
232159
|
+
--coana-socket-path=${this.options.runWithoutDocker ? this.options.coanaSocketPath : SOCKET_PATH_IN_DOCKER} --silent-spinner`
|
|
231850
232160
|
);
|
|
231851
232161
|
async runPackageManagerCommand(commandName, packageManagerName, subprojectPath, args2, extraDockerArgs, env) {
|
|
231852
232162
|
const tmpDir = await this.getTmpDirForSubproject(subprojectPath);
|
|
@@ -231976,7 +232286,7 @@ var OtherModulesCommunicator = class {
|
|
|
231976
232286
|
if (!await pullDockerImage(image)) return false;
|
|
231977
232287
|
const envArgs = Object.keys(env).filter((key) => DOCKER_ENV_WHITE_LIST.some((whiteListedKey) => key.includes(whiteListedKey))).flatMap((key) => ["-e", key]);
|
|
231978
232288
|
const cmd = cmdt`docker run --pull=never --rm -v ${this.rootWorkingDir}:/project -v ${tmpDir}:${TMP_DIR_IN_DOCKER}
|
|
231979
|
-
-v=${this.options.
|
|
232289
|
+
-v=${this.options.coanaSocketPath}:${SOCKET_PATH_IN_DOCKER}
|
|
231980
232290
|
${await getEcosystemSpecificDockerArgs(ecosystem)}
|
|
231981
232291
|
${envArgs} ${image} ${entryPoint} ${commandName} ${args2}`;
|
|
231982
232292
|
return execPipeAndLogOnFailure2(cmd, subprojectPath, { env });
|
|
@@ -234629,6 +234939,228 @@ var DashboardAPI = class {
|
|
|
234629
234939
|
return await this.coanaAPI.getBucketsForLastReport(subprojectPath, workspacePath, ecosystem, reportId, apiKey);
|
|
234630
234940
|
}
|
|
234631
234941
|
}
|
|
234942
|
+
async sendLogChunk(reportId, logs) {
|
|
234943
|
+
if (this.disableAnalyticsSharing) {
|
|
234944
|
+
return;
|
|
234945
|
+
}
|
|
234946
|
+
if (this.socketMode) {
|
|
234947
|
+
await this.socketAPI.sendLogChunkSocket(reportId, logs);
|
|
234948
|
+
}
|
|
234949
|
+
}
|
|
234950
|
+
};
|
|
234951
|
+
|
|
234952
|
+
// ../utils/src/dashboard-api/batched-http-log-streamer.ts
|
|
234953
|
+
var BatchedHttpLogStreamer = class {
|
|
234954
|
+
reportId;
|
|
234955
|
+
dashboardAPI;
|
|
234956
|
+
flushInterval;
|
|
234957
|
+
intervalId;
|
|
234958
|
+
isFlushInProgress = false;
|
|
234959
|
+
logBuffer = [];
|
|
234960
|
+
constructor(opts) {
|
|
234961
|
+
this.reportId = opts.reportId;
|
|
234962
|
+
this.dashboardAPI = opts.dashboardAPI;
|
|
234963
|
+
this.flushInterval = opts.flushInterval ?? 5e3;
|
|
234964
|
+
this.startFlushInterval();
|
|
234965
|
+
}
|
|
234966
|
+
/**
|
|
234967
|
+
* Add a log message to the buffer
|
|
234968
|
+
*/
|
|
234969
|
+
addLog(log2) {
|
|
234970
|
+
this.logBuffer.push({
|
|
234971
|
+
timestamp: log2.timestamp,
|
|
234972
|
+
level: log2.level,
|
|
234973
|
+
message: log2.message,
|
|
234974
|
+
context: log2.context
|
|
234975
|
+
});
|
|
234976
|
+
}
|
|
234977
|
+
startFlushInterval() {
|
|
234978
|
+
this.intervalId = setInterval(() => {
|
|
234979
|
+
this.flush().catch((error) => {
|
|
234980
|
+
console.warn("Background log flush failed:", error.message);
|
|
234981
|
+
});
|
|
234982
|
+
}, this.flushInterval);
|
|
234983
|
+
this.intervalId.unref();
|
|
234984
|
+
}
|
|
234985
|
+
async flush() {
|
|
234986
|
+
if (this.isFlushInProgress) {
|
|
234987
|
+
return;
|
|
234988
|
+
}
|
|
234989
|
+
this.isFlushInProgress = true;
|
|
234990
|
+
try {
|
|
234991
|
+
if (this.logBuffer.length === 0) {
|
|
234992
|
+
return;
|
|
234993
|
+
}
|
|
234994
|
+
const logsToSend = this.logBuffer.splice(0);
|
|
234995
|
+
await this.dashboardAPI.sendLogChunk(this.reportId, logsToSend);
|
|
234996
|
+
} catch (error) {
|
|
234997
|
+
console.warn("Failed to send log chunk to backend:", error.message);
|
|
234998
|
+
} finally {
|
|
234999
|
+
this.isFlushInProgress = false;
|
|
235000
|
+
}
|
|
235001
|
+
}
|
|
235002
|
+
async close() {
|
|
235003
|
+
if (this.intervalId) {
|
|
235004
|
+
clearInterval(this.intervalId);
|
|
235005
|
+
this.intervalId = void 0;
|
|
235006
|
+
}
|
|
235007
|
+
try {
|
|
235008
|
+
await this.flush();
|
|
235009
|
+
} catch (error) {
|
|
235010
|
+
console.warn("Failed to flush logs during transport close:", error.message);
|
|
235011
|
+
}
|
|
235012
|
+
}
|
|
235013
|
+
};
|
|
235014
|
+
|
|
235015
|
+
// ../utils/src/logging/socket-log-server.ts
|
|
235016
|
+
import { createServer } from "net";
|
|
235017
|
+
import { once as once8 } from "events";
|
|
235018
|
+
import { createWriteStream as createWriteStream4, existsSync as existsSync21 } from "fs";
|
|
235019
|
+
import { unlink } from "fs/promises";
|
|
235020
|
+
var SocketLogServer = class {
|
|
235021
|
+
server;
|
|
235022
|
+
socketPath;
|
|
235023
|
+
logFilePath;
|
|
235024
|
+
onLogReceived;
|
|
235025
|
+
writeStream;
|
|
235026
|
+
writeQueue = [];
|
|
235027
|
+
isWriting = false;
|
|
235028
|
+
clients = /* @__PURE__ */ new Map();
|
|
235029
|
+
constructor(options) {
|
|
235030
|
+
this.socketPath = options.socketPath;
|
|
235031
|
+
this.logFilePath = options.logFilePath;
|
|
235032
|
+
this.onLogReceived = options.onLogReceived;
|
|
235033
|
+
this.writeStream = createWriteStream4(this.logFilePath, { flags: "a" });
|
|
235034
|
+
this.server = createServer((socket) => this.handleConnection(socket));
|
|
235035
|
+
}
|
|
235036
|
+
async start() {
|
|
235037
|
+
if (existsSync21(this.socketPath)) {
|
|
235038
|
+
await unlink(this.socketPath);
|
|
235039
|
+
}
|
|
235040
|
+
this.server.listen(this.socketPath);
|
|
235041
|
+
await once8(this.server, "listening");
|
|
235042
|
+
}
|
|
235043
|
+
handleConnection(socket) {
|
|
235044
|
+
const clientId = `${socket.remoteAddress}:${socket.remotePort}`;
|
|
235045
|
+
this.clients.set(clientId, { socket });
|
|
235046
|
+
let buffer = "";
|
|
235047
|
+
socket.on("data", (data2) => {
|
|
235048
|
+
buffer += data2.toString();
|
|
235049
|
+
let newlineIndex;
|
|
235050
|
+
while ((newlineIndex = buffer.indexOf("\n")) !== -1) {
|
|
235051
|
+
const line = buffer.substring(0, newlineIndex);
|
|
235052
|
+
buffer = buffer.substring(newlineIndex + 1);
|
|
235053
|
+
if (line.trim()) {
|
|
235054
|
+
try {
|
|
235055
|
+
const message2 = JSON.parse(line);
|
|
235056
|
+
this.handleMessage(clientId, message2);
|
|
235057
|
+
} catch (error) {
|
|
235058
|
+
console.warn("Failed to parse socket message:", error);
|
|
235059
|
+
}
|
|
235060
|
+
}
|
|
235061
|
+
}
|
|
235062
|
+
});
|
|
235063
|
+
socket.on("error", (error) => {
|
|
235064
|
+
console.warn(`Socket error for client ${clientId}:`, error);
|
|
235065
|
+
});
|
|
235066
|
+
socket.on("close", () => {
|
|
235067
|
+
this.clients.delete(clientId);
|
|
235068
|
+
});
|
|
235069
|
+
}
|
|
235070
|
+
handleMessage(clientId, message2) {
|
|
235071
|
+
const client = this.clients.get(clientId);
|
|
235072
|
+
if (!client) return;
|
|
235073
|
+
if (this.isHandshakeMessage(message2)) {
|
|
235074
|
+
client.metadata = message2;
|
|
235075
|
+
} else {
|
|
235076
|
+
this.writeLog(message2);
|
|
235077
|
+
if (this.onLogReceived) {
|
|
235078
|
+
this.onLogReceived(message2);
|
|
235079
|
+
}
|
|
235080
|
+
}
|
|
235081
|
+
}
|
|
235082
|
+
isHandshakeMessage(message2) {
|
|
235083
|
+
return message2.type === "handshake";
|
|
235084
|
+
}
|
|
235085
|
+
writeLog(log2) {
|
|
235086
|
+
const label = log2.label ?? log2.context;
|
|
235087
|
+
const formattedLog = `${log2.timestamp} ${label} ${log2.level}: ${log2.message}
|
|
235088
|
+
`;
|
|
235089
|
+
this.writeQueue.push({
|
|
235090
|
+
message: formattedLog,
|
|
235091
|
+
callback: () => {
|
|
235092
|
+
}
|
|
235093
|
+
});
|
|
235094
|
+
this.processWriteQueue();
|
|
235095
|
+
}
|
|
235096
|
+
processWriteQueue() {
|
|
235097
|
+
if (this.isWriting || this.writeQueue.length === 0) {
|
|
235098
|
+
return;
|
|
235099
|
+
}
|
|
235100
|
+
this.isWriting = true;
|
|
235101
|
+
const item = this.writeQueue.shift();
|
|
235102
|
+
this.writeStream.write(item.message, (error) => {
|
|
235103
|
+
if (error) {
|
|
235104
|
+
console.warn("Failed to write log to file:", error);
|
|
235105
|
+
}
|
|
235106
|
+
item.callback();
|
|
235107
|
+
this.isWriting = false;
|
|
235108
|
+
this.processWriteQueue();
|
|
235109
|
+
});
|
|
235110
|
+
}
|
|
235111
|
+
writeMainProcessLog(log2) {
|
|
235112
|
+
this.writeLog(log2);
|
|
235113
|
+
if (this.onLogReceived) {
|
|
235114
|
+
this.onLogReceived(log2);
|
|
235115
|
+
}
|
|
235116
|
+
}
|
|
235117
|
+
async close() {
|
|
235118
|
+
for (const client of this.clients.values()) {
|
|
235119
|
+
client.socket.destroy();
|
|
235120
|
+
}
|
|
235121
|
+
this.clients.clear();
|
|
235122
|
+
return new Promise((resolve45, reject) => {
|
|
235123
|
+
this.server.close((serverError) => {
|
|
235124
|
+
this.writeStream.end(() => {
|
|
235125
|
+
if (existsSync21(this.socketPath)) {
|
|
235126
|
+
unlink(this.socketPath).then(() => {
|
|
235127
|
+
if (serverError) reject(serverError);
|
|
235128
|
+
else resolve45();
|
|
235129
|
+
}).catch((unlinkError) => reject(serverError ?? unlinkError));
|
|
235130
|
+
} else {
|
|
235131
|
+
if (serverError) reject(serverError);
|
|
235132
|
+
else resolve45();
|
|
235133
|
+
}
|
|
235134
|
+
});
|
|
235135
|
+
});
|
|
235136
|
+
});
|
|
235137
|
+
}
|
|
235138
|
+
};
|
|
235139
|
+
|
|
235140
|
+
// ../utils/src/logging/main-process-transport.ts
|
|
235141
|
+
var import_winston_transport = __toESM(require_winston_transport2(), 1);
|
|
235142
|
+
var MainProcessTransport = class extends import_winston_transport.default {
|
|
235143
|
+
socketLogServer;
|
|
235144
|
+
context;
|
|
235145
|
+
constructor(options) {
|
|
235146
|
+
super(options);
|
|
235147
|
+
this.socketLogServer = options.socketLogServer;
|
|
235148
|
+
this.context = `main-process-${process.pid}`;
|
|
235149
|
+
}
|
|
235150
|
+
log(info, callback) {
|
|
235151
|
+
setImmediate(() => {
|
|
235152
|
+
this.emit("logged", info);
|
|
235153
|
+
});
|
|
235154
|
+
const logMessage = {
|
|
235155
|
+
context: this.context,
|
|
235156
|
+
timestamp: info.timestamp || (/* @__PURE__ */ new Date()).toISOString(),
|
|
235157
|
+
level: info.level,
|
|
235158
|
+
message: info.message,
|
|
235159
|
+
label: info.label
|
|
235160
|
+
};
|
|
235161
|
+
this.socketLogServer.writeMainProcessLog(logMessage);
|
|
235162
|
+
callback();
|
|
235163
|
+
}
|
|
234632
235164
|
};
|
|
234633
235165
|
|
|
234634
235166
|
// ../utils/src/vulnerable-paths-utils.ts
|
|
@@ -234876,16 +235408,16 @@ var bgWhiteBright = format5(107, 49);
|
|
|
234876
235408
|
var DEFAULT_REPORT_FILENAME_BASE = "coana-report";
|
|
234877
235409
|
|
|
234878
235410
|
// dist/internal/exclude-dirs-from-configuration-files.js
|
|
234879
|
-
import { existsSync as
|
|
235411
|
+
import { existsSync as existsSync22 } from "fs";
|
|
234880
235412
|
import { readFile as readFile33 } from "fs/promises";
|
|
234881
235413
|
import { basename as basename10, resolve as resolve42 } from "path";
|
|
234882
235414
|
var import_yaml2 = __toESM(require_dist12(), 1);
|
|
234883
235415
|
async function inferExcludeDirsFromConfigurationFiles(rootWorkingDir) {
|
|
234884
235416
|
const socketYmlConfigFile = resolve42(rootWorkingDir, "socket.yml");
|
|
234885
|
-
if (
|
|
235417
|
+
if (existsSync22(socketYmlConfigFile))
|
|
234886
235418
|
return inferExcludeDirsFromSocketConfig(socketYmlConfigFile);
|
|
234887
235419
|
const socketYamlConfigFile = resolve42(rootWorkingDir, "socket.yaml");
|
|
234888
|
-
if (
|
|
235420
|
+
if (existsSync22(socketYamlConfigFile))
|
|
234889
235421
|
return inferExcludeDirsFromSocketConfig(socketYamlConfigFile);
|
|
234890
235422
|
return void 0;
|
|
234891
235423
|
}
|
|
@@ -248706,11 +249238,11 @@ var { root: root2 } = static_exports;
|
|
|
248706
249238
|
|
|
248707
249239
|
// ../utils/src/maven-utils.ts
|
|
248708
249240
|
var import_lodash14 = __toESM(require_lodash(), 1);
|
|
248709
|
-
import { existsSync as
|
|
249241
|
+
import { existsSync as existsSync24, readdirSync as readdirSync5, statSync as statSync5 } from "fs";
|
|
248710
249242
|
import { join as join28 } from "path";
|
|
248711
249243
|
|
|
248712
249244
|
// ../utils/src/download-utils.ts
|
|
248713
|
-
import { existsSync as
|
|
249245
|
+
import { existsSync as existsSync23 } from "fs";
|
|
248714
249246
|
import { writeFile as writeFile13 } from "fs/promises";
|
|
248715
249247
|
|
|
248716
249248
|
// ../utils/src/maven-utils.ts
|
|
@@ -250078,7 +250610,7 @@ async function onlineScan(dependencyTree, apiKey, timeout) {
|
|
|
250078
250610
|
}
|
|
250079
250611
|
|
|
250080
250612
|
// dist/version.js
|
|
250081
|
-
var version3 = "14.12.
|
|
250613
|
+
var version3 = "14.12.100";
|
|
250082
250614
|
|
|
250083
250615
|
// dist/cli-core.js
|
|
250084
250616
|
var { mapValues, omit, partition, pick } = import_lodash15.default;
|
|
@@ -250102,6 +250634,8 @@ var CliCore = class {
|
|
|
250102
250634
|
failedWorkspaces = [];
|
|
250103
250635
|
failedSubprojects = [];
|
|
250104
250636
|
coanaLogPath = "";
|
|
250637
|
+
coanaSocketPath = "";
|
|
250638
|
+
socketLogServer;
|
|
250105
250639
|
shareWithDashboard;
|
|
250106
250640
|
reportId;
|
|
250107
250641
|
reportDependencyTrees;
|
|
@@ -250192,7 +250726,9 @@ var CliCore = class {
|
|
|
250192
250726
|
}
|
|
250193
250727
|
}
|
|
250194
250728
|
async main() {
|
|
250195
|
-
|
|
250729
|
+
const tmpDir = await createTmpDirectory("coana-cli-");
|
|
250730
|
+
this.coanaLogPath = join29(tmpDir, "coana-log.txt");
|
|
250731
|
+
this.coanaSocketPath = join29(tmpDir, "coana.sock");
|
|
250196
250732
|
logger.initWinstonLogger(this.options.debug, this.coanaLogPath);
|
|
250197
250733
|
logger.silent = this.options.silent;
|
|
250198
250734
|
try {
|
|
@@ -250206,12 +250742,31 @@ var CliCore = class {
|
|
|
250206
250742
|
if (this.shareWithDashboard && this.apiKey.type === "present" || this.options.socketMode) {
|
|
250207
250743
|
const gitData = await getGitDataToMetadataIfAvailable(this.rootWorkingDirectory);
|
|
250208
250744
|
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);
|
|
250745
|
+
if (this.options.socketMode && this.reportId) {
|
|
250746
|
+
const batchedLogStreamer = new BatchedHttpLogStreamer({
|
|
250747
|
+
reportId: this.reportId,
|
|
250748
|
+
dashboardAPI: this.dashboardAPI
|
|
250749
|
+
});
|
|
250750
|
+
this.socketLogServer = new SocketLogServer({
|
|
250751
|
+
socketPath: this.coanaSocketPath,
|
|
250752
|
+
logFilePath: this.coanaLogPath,
|
|
250753
|
+
onLogReceived: (log2) => batchedLogStreamer.addLog(log2)
|
|
250754
|
+
});
|
|
250755
|
+
await this.socketLogServer.start();
|
|
250756
|
+
const mainProcessTransport = new MainProcessTransport({
|
|
250757
|
+
socketLogServer: this.socketLogServer,
|
|
250758
|
+
level: "file"
|
|
250759
|
+
});
|
|
250760
|
+
logger.addTransport(mainProcessTransport);
|
|
250761
|
+
logger.initHttpLogging(batchedLogStreamer);
|
|
250762
|
+
}
|
|
250209
250763
|
}
|
|
250210
250764
|
const otherModulesCommunicator = new OtherModulesCommunicator(this.rootWorkingDirectory, {
|
|
250211
250765
|
runWithoutDocker: this.options.runWithoutDocker,
|
|
250212
250766
|
debug: this.options.debug,
|
|
250213
250767
|
silent: this.options.silent,
|
|
250214
250768
|
coanaLogPath: this.coanaLogPath,
|
|
250769
|
+
coanaSocketPath: this.coanaSocketPath,
|
|
250215
250770
|
reportId: this.reportId,
|
|
250216
250771
|
socketMode: Boolean(this.options.socketMode),
|
|
250217
250772
|
disableAnalyticsSharing: Boolean(this.options.disableAnalyticsSharing)
|
|
@@ -250229,10 +250784,17 @@ var CliCore = class {
|
|
|
250229
250784
|
this.spinner.stop();
|
|
250230
250785
|
return report;
|
|
250231
250786
|
}
|
|
250787
|
+
await logger.finish();
|
|
250788
|
+
if (this.socketLogServer) {
|
|
250789
|
+
await this.socketLogServer.close();
|
|
250790
|
+
}
|
|
250232
250791
|
} catch (e) {
|
|
250233
250792
|
await this.spinner.fail();
|
|
250234
250793
|
logger.error("CLI failed with error:", e);
|
|
250235
250794
|
await this.shareErrorLogWithBackend(e, true, "cli-error");
|
|
250795
|
+
if (this.socketLogServer) {
|
|
250796
|
+
await this.socketLogServer.close();
|
|
250797
|
+
}
|
|
250236
250798
|
process.exit(1);
|
|
250237
250799
|
}
|
|
250238
250800
|
}
|