npm-pkg-lint 2.0.0 → 2.0.2
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/dist/index.js +505 -338
- package/dist/index.js.map +4 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -60,6 +60,10 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
60
60
|
return __privateGet(obj, member, getter);
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
|
+
var __privateMethod = (obj, member, method) => {
|
|
64
|
+
__accessCheck(obj, member, "access private method");
|
|
65
|
+
return method;
|
|
66
|
+
};
|
|
63
67
|
|
|
64
68
|
// node_modules/argparse/lib/sub.js
|
|
65
69
|
var require_sub = __commonJS({
|
|
@@ -2453,12 +2457,12 @@ var require_argparse = __commonJS({
|
|
|
2453
2457
|
this._positionals = this.add_argument_group("positional arguments");
|
|
2454
2458
|
this._optionals = this.add_argument_group("optional arguments");
|
|
2455
2459
|
this._subparsers = void 0;
|
|
2456
|
-
function
|
|
2460
|
+
function identity2(string) {
|
|
2457
2461
|
return string;
|
|
2458
2462
|
}
|
|
2459
|
-
this.register("type", void 0,
|
|
2460
|
-
this.register("type", null,
|
|
2461
|
-
this.register("type", "auto",
|
|
2463
|
+
this.register("type", void 0, identity2);
|
|
2464
|
+
this.register("type", null, identity2);
|
|
2465
|
+
this.register("type", "auto", identity2);
|
|
2462
2466
|
this.register("type", "int", function(x) {
|
|
2463
2467
|
let result = Number(x);
|
|
2464
2468
|
if (!Number.isInteger(result)) {
|
|
@@ -7886,9 +7890,9 @@ var require_read_entry = __commonJS({
|
|
|
7886
7890
|
}
|
|
7887
7891
|
return super.write(data.slice(0, r));
|
|
7888
7892
|
}
|
|
7889
|
-
[SLURP](ex,
|
|
7893
|
+
[SLURP](ex, global3) {
|
|
7890
7894
|
for (const k in ex) {
|
|
7891
|
-
if (ex[k] !== null && ex[k] !== void 0 && !(
|
|
7895
|
+
if (ex[k] !== null && ex[k] !== void 0 && !(global3 && k === "path")) {
|
|
7892
7896
|
this[k] = k === "path" || k === "linkpath" ? normPath(ex[k]) : ex[k];
|
|
7893
7897
|
}
|
|
7894
7898
|
}
|
|
@@ -8126,9 +8130,9 @@ var require_header = __commonJS({
|
|
|
8126
8130
|
this.nullBlock = true;
|
|
8127
8131
|
}
|
|
8128
8132
|
}
|
|
8129
|
-
[SLURP](ex,
|
|
8133
|
+
[SLURP](ex, global3) {
|
|
8130
8134
|
for (const k in ex) {
|
|
8131
|
-
if (ex[k] !== null && ex[k] !== void 0 && !(
|
|
8135
|
+
if (ex[k] !== null && ex[k] !== void 0 && !(global3 && k === "path")) {
|
|
8132
8136
|
this[k] = ex[k];
|
|
8133
8137
|
}
|
|
8134
8138
|
}
|
|
@@ -8261,7 +8265,7 @@ var require_pax = __commonJS({
|
|
|
8261
8265
|
var Header = require_header();
|
|
8262
8266
|
var path7 = __require("path");
|
|
8263
8267
|
var Pax = class {
|
|
8264
|
-
constructor(obj,
|
|
8268
|
+
constructor(obj, global3) {
|
|
8265
8269
|
this.atime = obj.atime || null;
|
|
8266
8270
|
this.charset = obj.charset || null;
|
|
8267
8271
|
this.comment = obj.comment || null;
|
|
@@ -8277,7 +8281,7 @@ var require_pax = __commonJS({
|
|
|
8277
8281
|
this.dev = obj.dev || null;
|
|
8278
8282
|
this.ino = obj.ino || null;
|
|
8279
8283
|
this.nlink = obj.nlink || null;
|
|
8280
|
-
this.global =
|
|
8284
|
+
this.global = global3 || false;
|
|
8281
8285
|
}
|
|
8282
8286
|
encode() {
|
|
8283
8287
|
const body = this.encodeBody();
|
|
@@ -10089,7 +10093,7 @@ var require_parse = __commonJS({
|
|
|
10089
10093
|
var SAW_NULL_BLOCK = Symbol("sawNullBlock");
|
|
10090
10094
|
var SAW_EOF = Symbol("sawEOF");
|
|
10091
10095
|
var CLOSESTREAM = Symbol("closeStream");
|
|
10092
|
-
var
|
|
10096
|
+
var noop2 = (_) => true;
|
|
10093
10097
|
module.exports = warner(class Parser extends EE {
|
|
10094
10098
|
constructor(opt) {
|
|
10095
10099
|
opt = opt || {};
|
|
@@ -10112,7 +10116,7 @@ var require_parse = __commonJS({
|
|
|
10112
10116
|
}
|
|
10113
10117
|
this.strict = !!opt.strict;
|
|
10114
10118
|
this.maxMetaEntrySize = opt.maxMetaEntrySize || maxMetaEntrySize;
|
|
10115
|
-
this.filter = typeof opt.filter === "function" ? opt.filter :
|
|
10119
|
+
this.filter = typeof opt.filter === "function" ? opt.filter : noop2;
|
|
10116
10120
|
this.writable = true;
|
|
10117
10121
|
this.readable = false;
|
|
10118
10122
|
this[QUEUE] = new Yallist();
|
|
@@ -14924,302 +14928,6 @@ var require_cross_spawn = __commonJS({
|
|
|
14924
14928
|
}
|
|
14925
14929
|
});
|
|
14926
14930
|
|
|
14927
|
-
// node_modules/signal-exit/signals.js
|
|
14928
|
-
var require_signals = __commonJS({
|
|
14929
|
-
"node_modules/signal-exit/signals.js"(exports, module) {
|
|
14930
|
-
module.exports = [
|
|
14931
|
-
"SIGABRT",
|
|
14932
|
-
"SIGALRM",
|
|
14933
|
-
"SIGHUP",
|
|
14934
|
-
"SIGINT",
|
|
14935
|
-
"SIGTERM"
|
|
14936
|
-
];
|
|
14937
|
-
if (process.platform !== "win32") {
|
|
14938
|
-
module.exports.push(
|
|
14939
|
-
"SIGVTALRM",
|
|
14940
|
-
"SIGXCPU",
|
|
14941
|
-
"SIGXFSZ",
|
|
14942
|
-
"SIGUSR2",
|
|
14943
|
-
"SIGTRAP",
|
|
14944
|
-
"SIGSYS",
|
|
14945
|
-
"SIGQUIT",
|
|
14946
|
-
"SIGIOT"
|
|
14947
|
-
// should detect profiler and enable/disable accordingly.
|
|
14948
|
-
// see #21
|
|
14949
|
-
// 'SIGPROF'
|
|
14950
|
-
);
|
|
14951
|
-
}
|
|
14952
|
-
if (process.platform === "linux") {
|
|
14953
|
-
module.exports.push(
|
|
14954
|
-
"SIGIO",
|
|
14955
|
-
"SIGPOLL",
|
|
14956
|
-
"SIGPWR",
|
|
14957
|
-
"SIGSTKFLT",
|
|
14958
|
-
"SIGUNUSED"
|
|
14959
|
-
);
|
|
14960
|
-
}
|
|
14961
|
-
}
|
|
14962
|
-
});
|
|
14963
|
-
|
|
14964
|
-
// node_modules/signal-exit/index.js
|
|
14965
|
-
var require_signal_exit = __commonJS({
|
|
14966
|
-
"node_modules/signal-exit/index.js"(exports, module) {
|
|
14967
|
-
var process7 = global.process;
|
|
14968
|
-
var processOk = function(process8) {
|
|
14969
|
-
return process8 && typeof process8 === "object" && typeof process8.removeListener === "function" && typeof process8.emit === "function" && typeof process8.reallyExit === "function" && typeof process8.listeners === "function" && typeof process8.kill === "function" && typeof process8.pid === "number" && typeof process8.on === "function";
|
|
14970
|
-
};
|
|
14971
|
-
if (!processOk(process7)) {
|
|
14972
|
-
module.exports = function() {
|
|
14973
|
-
return function() {
|
|
14974
|
-
};
|
|
14975
|
-
};
|
|
14976
|
-
} else {
|
|
14977
|
-
assert = __require("assert");
|
|
14978
|
-
signals = require_signals();
|
|
14979
|
-
isWin = /^win/i.test(process7.platform);
|
|
14980
|
-
EE = __require("events");
|
|
14981
|
-
if (typeof EE !== "function") {
|
|
14982
|
-
EE = EE.EventEmitter;
|
|
14983
|
-
}
|
|
14984
|
-
if (process7.__signal_exit_emitter__) {
|
|
14985
|
-
emitter = process7.__signal_exit_emitter__;
|
|
14986
|
-
} else {
|
|
14987
|
-
emitter = process7.__signal_exit_emitter__ = new EE();
|
|
14988
|
-
emitter.count = 0;
|
|
14989
|
-
emitter.emitted = {};
|
|
14990
|
-
}
|
|
14991
|
-
if (!emitter.infinite) {
|
|
14992
|
-
emitter.setMaxListeners(Infinity);
|
|
14993
|
-
emitter.infinite = true;
|
|
14994
|
-
}
|
|
14995
|
-
module.exports = function(cb, opts) {
|
|
14996
|
-
if (!processOk(global.process)) {
|
|
14997
|
-
return function() {
|
|
14998
|
-
};
|
|
14999
|
-
}
|
|
15000
|
-
assert.equal(typeof cb, "function", "a callback must be provided for exit handler");
|
|
15001
|
-
if (loaded === false) {
|
|
15002
|
-
load();
|
|
15003
|
-
}
|
|
15004
|
-
var ev = "exit";
|
|
15005
|
-
if (opts && opts.alwaysLast) {
|
|
15006
|
-
ev = "afterexit";
|
|
15007
|
-
}
|
|
15008
|
-
var remove = function() {
|
|
15009
|
-
emitter.removeListener(ev, cb);
|
|
15010
|
-
if (emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0) {
|
|
15011
|
-
unload();
|
|
15012
|
-
}
|
|
15013
|
-
};
|
|
15014
|
-
emitter.on(ev, cb);
|
|
15015
|
-
return remove;
|
|
15016
|
-
};
|
|
15017
|
-
unload = function unload2() {
|
|
15018
|
-
if (!loaded || !processOk(global.process)) {
|
|
15019
|
-
return;
|
|
15020
|
-
}
|
|
15021
|
-
loaded = false;
|
|
15022
|
-
signals.forEach(function(sig) {
|
|
15023
|
-
try {
|
|
15024
|
-
process7.removeListener(sig, sigListeners[sig]);
|
|
15025
|
-
} catch (er) {
|
|
15026
|
-
}
|
|
15027
|
-
});
|
|
15028
|
-
process7.emit = originalProcessEmit;
|
|
15029
|
-
process7.reallyExit = originalProcessReallyExit;
|
|
15030
|
-
emitter.count -= 1;
|
|
15031
|
-
};
|
|
15032
|
-
module.exports.unload = unload;
|
|
15033
|
-
emit = function emit2(event, code, signal) {
|
|
15034
|
-
if (emitter.emitted[event]) {
|
|
15035
|
-
return;
|
|
15036
|
-
}
|
|
15037
|
-
emitter.emitted[event] = true;
|
|
15038
|
-
emitter.emit(event, code, signal);
|
|
15039
|
-
};
|
|
15040
|
-
sigListeners = {};
|
|
15041
|
-
signals.forEach(function(sig) {
|
|
15042
|
-
sigListeners[sig] = function listener() {
|
|
15043
|
-
if (!processOk(global.process)) {
|
|
15044
|
-
return;
|
|
15045
|
-
}
|
|
15046
|
-
var listeners = process7.listeners(sig);
|
|
15047
|
-
if (listeners.length === emitter.count) {
|
|
15048
|
-
unload();
|
|
15049
|
-
emit("exit", null, sig);
|
|
15050
|
-
emit("afterexit", null, sig);
|
|
15051
|
-
if (isWin && sig === "SIGHUP") {
|
|
15052
|
-
sig = "SIGINT";
|
|
15053
|
-
}
|
|
15054
|
-
process7.kill(process7.pid, sig);
|
|
15055
|
-
}
|
|
15056
|
-
};
|
|
15057
|
-
});
|
|
15058
|
-
module.exports.signals = function() {
|
|
15059
|
-
return signals;
|
|
15060
|
-
};
|
|
15061
|
-
loaded = false;
|
|
15062
|
-
load = function load2() {
|
|
15063
|
-
if (loaded || !processOk(global.process)) {
|
|
15064
|
-
return;
|
|
15065
|
-
}
|
|
15066
|
-
loaded = true;
|
|
15067
|
-
emitter.count += 1;
|
|
15068
|
-
signals = signals.filter(function(sig) {
|
|
15069
|
-
try {
|
|
15070
|
-
process7.on(sig, sigListeners[sig]);
|
|
15071
|
-
return true;
|
|
15072
|
-
} catch (er) {
|
|
15073
|
-
return false;
|
|
15074
|
-
}
|
|
15075
|
-
});
|
|
15076
|
-
process7.emit = processEmit;
|
|
15077
|
-
process7.reallyExit = processReallyExit;
|
|
15078
|
-
};
|
|
15079
|
-
module.exports.load = load;
|
|
15080
|
-
originalProcessReallyExit = process7.reallyExit;
|
|
15081
|
-
processReallyExit = function processReallyExit2(code) {
|
|
15082
|
-
if (!processOk(global.process)) {
|
|
15083
|
-
return;
|
|
15084
|
-
}
|
|
15085
|
-
process7.exitCode = code || /* istanbul ignore next */
|
|
15086
|
-
0;
|
|
15087
|
-
emit("exit", process7.exitCode, null);
|
|
15088
|
-
emit("afterexit", process7.exitCode, null);
|
|
15089
|
-
originalProcessReallyExit.call(process7, process7.exitCode);
|
|
15090
|
-
};
|
|
15091
|
-
originalProcessEmit = process7.emit;
|
|
15092
|
-
processEmit = function processEmit2(ev, arg) {
|
|
15093
|
-
if (ev === "exit" && processOk(global.process)) {
|
|
15094
|
-
if (arg !== void 0) {
|
|
15095
|
-
process7.exitCode = arg;
|
|
15096
|
-
}
|
|
15097
|
-
var ret = originalProcessEmit.apply(this, arguments);
|
|
15098
|
-
emit("exit", process7.exitCode, null);
|
|
15099
|
-
emit("afterexit", process7.exitCode, null);
|
|
15100
|
-
return ret;
|
|
15101
|
-
} else {
|
|
15102
|
-
return originalProcessEmit.apply(this, arguments);
|
|
15103
|
-
}
|
|
15104
|
-
};
|
|
15105
|
-
}
|
|
15106
|
-
var assert;
|
|
15107
|
-
var signals;
|
|
15108
|
-
var isWin;
|
|
15109
|
-
var EE;
|
|
15110
|
-
var emitter;
|
|
15111
|
-
var unload;
|
|
15112
|
-
var emit;
|
|
15113
|
-
var sigListeners;
|
|
15114
|
-
var loaded;
|
|
15115
|
-
var load;
|
|
15116
|
-
var originalProcessReallyExit;
|
|
15117
|
-
var processReallyExit;
|
|
15118
|
-
var originalProcessEmit;
|
|
15119
|
-
var processEmit;
|
|
15120
|
-
}
|
|
15121
|
-
});
|
|
15122
|
-
|
|
15123
|
-
// node_modules/get-stream/buffer-stream.js
|
|
15124
|
-
var require_buffer_stream = __commonJS({
|
|
15125
|
-
"node_modules/get-stream/buffer-stream.js"(exports, module) {
|
|
15126
|
-
"use strict";
|
|
15127
|
-
var { PassThrough: PassThroughStream } = __require("stream");
|
|
15128
|
-
module.exports = (options) => {
|
|
15129
|
-
options = { ...options };
|
|
15130
|
-
const { array } = options;
|
|
15131
|
-
let { encoding } = options;
|
|
15132
|
-
const isBuffer = encoding === "buffer";
|
|
15133
|
-
let objectMode = false;
|
|
15134
|
-
if (array) {
|
|
15135
|
-
objectMode = !(encoding || isBuffer);
|
|
15136
|
-
} else {
|
|
15137
|
-
encoding = encoding || "utf8";
|
|
15138
|
-
}
|
|
15139
|
-
if (isBuffer) {
|
|
15140
|
-
encoding = null;
|
|
15141
|
-
}
|
|
15142
|
-
const stream = new PassThroughStream({ objectMode });
|
|
15143
|
-
if (encoding) {
|
|
15144
|
-
stream.setEncoding(encoding);
|
|
15145
|
-
}
|
|
15146
|
-
let length = 0;
|
|
15147
|
-
const chunks = [];
|
|
15148
|
-
stream.on("data", (chunk) => {
|
|
15149
|
-
chunks.push(chunk);
|
|
15150
|
-
if (objectMode) {
|
|
15151
|
-
length = chunks.length;
|
|
15152
|
-
} else {
|
|
15153
|
-
length += chunk.length;
|
|
15154
|
-
}
|
|
15155
|
-
});
|
|
15156
|
-
stream.getBufferedValue = () => {
|
|
15157
|
-
if (array) {
|
|
15158
|
-
return chunks;
|
|
15159
|
-
}
|
|
15160
|
-
return isBuffer ? Buffer.concat(chunks, length) : chunks.join("");
|
|
15161
|
-
};
|
|
15162
|
-
stream.getBufferedLength = () => length;
|
|
15163
|
-
return stream;
|
|
15164
|
-
};
|
|
15165
|
-
}
|
|
15166
|
-
});
|
|
15167
|
-
|
|
15168
|
-
// node_modules/get-stream/index.js
|
|
15169
|
-
var require_get_stream = __commonJS({
|
|
15170
|
-
"node_modules/get-stream/index.js"(exports, module) {
|
|
15171
|
-
"use strict";
|
|
15172
|
-
var { constants: BufferConstants } = __require("buffer");
|
|
15173
|
-
var stream = __require("stream");
|
|
15174
|
-
var { promisify } = __require("util");
|
|
15175
|
-
var bufferStream = require_buffer_stream();
|
|
15176
|
-
var streamPipelinePromisified = promisify(stream.pipeline);
|
|
15177
|
-
var MaxBufferError = class extends Error {
|
|
15178
|
-
constructor() {
|
|
15179
|
-
super("maxBuffer exceeded");
|
|
15180
|
-
this.name = "MaxBufferError";
|
|
15181
|
-
}
|
|
15182
|
-
};
|
|
15183
|
-
async function getStream2(inputStream, options) {
|
|
15184
|
-
if (!inputStream) {
|
|
15185
|
-
throw new Error("Expected a stream");
|
|
15186
|
-
}
|
|
15187
|
-
options = {
|
|
15188
|
-
maxBuffer: Infinity,
|
|
15189
|
-
...options
|
|
15190
|
-
};
|
|
15191
|
-
const { maxBuffer } = options;
|
|
15192
|
-
const stream2 = bufferStream(options);
|
|
15193
|
-
await new Promise((resolve, reject) => {
|
|
15194
|
-
const rejectPromise = (error) => {
|
|
15195
|
-
if (error && stream2.getBufferedLength() <= BufferConstants.MAX_LENGTH) {
|
|
15196
|
-
error.bufferedData = stream2.getBufferedValue();
|
|
15197
|
-
}
|
|
15198
|
-
reject(error);
|
|
15199
|
-
};
|
|
15200
|
-
(async () => {
|
|
15201
|
-
try {
|
|
15202
|
-
await streamPipelinePromisified(inputStream, stream2);
|
|
15203
|
-
resolve();
|
|
15204
|
-
} catch (error) {
|
|
15205
|
-
rejectPromise(error);
|
|
15206
|
-
}
|
|
15207
|
-
})();
|
|
15208
|
-
stream2.on("data", () => {
|
|
15209
|
-
if (stream2.getBufferedLength() > maxBuffer) {
|
|
15210
|
-
rejectPromise(new MaxBufferError());
|
|
15211
|
-
}
|
|
15212
|
-
});
|
|
15213
|
-
});
|
|
15214
|
-
return stream2.getBufferedValue();
|
|
15215
|
-
}
|
|
15216
|
-
module.exports = getStream2;
|
|
15217
|
-
module.exports.buffer = (stream2, options) => getStream2(stream2, { ...options, encoding: "buffer" });
|
|
15218
|
-
module.exports.array = (stream2, options) => getStream2(stream2, { ...options, array: true });
|
|
15219
|
-
module.exports.MaxBufferError = MaxBufferError;
|
|
15220
|
-
}
|
|
15221
|
-
});
|
|
15222
|
-
|
|
15223
14931
|
// node_modules/merge-stream/index.js
|
|
15224
14932
|
var require_merge_stream = __commonJS({
|
|
15225
14933
|
"node_modules/merge-stream/index.js"(exports, module) {
|
|
@@ -15689,7 +15397,7 @@ function stylish(results) {
|
|
|
15689
15397
|
fixableWarningCount += result.fixableWarningCount;
|
|
15690
15398
|
const rows = messages.map((message) => {
|
|
15691
15399
|
let messageType;
|
|
15692
|
-
if (message.fatal || message.severity === 2) {
|
|
15400
|
+
if (Boolean(message.fatal) || message.severity === 2) {
|
|
15693
15401
|
messageType = red2("error");
|
|
15694
15402
|
summaryColor = red2;
|
|
15695
15403
|
} else {
|
|
@@ -15697,8 +15405,8 @@ function stylish(results) {
|
|
|
15697
15405
|
}
|
|
15698
15406
|
return [
|
|
15699
15407
|
"",
|
|
15700
|
-
message.line
|
|
15701
|
-
message.column
|
|
15408
|
+
message.line ?? 0,
|
|
15409
|
+
message.column ?? 0,
|
|
15702
15410
|
messageType,
|
|
15703
15411
|
message.message.replace(/([^ ])\.$/u, "$1"),
|
|
15704
15412
|
message.ruleId ? dim2(message.ruleId) : ""
|
|
@@ -16368,7 +16076,7 @@ var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
|
16368
16076
|
import { Buffer as Buffer3 } from "buffer";
|
|
16369
16077
|
import path4 from "path";
|
|
16370
16078
|
import childProcess from "child_process";
|
|
16371
|
-
import
|
|
16079
|
+
import process7 from "process";
|
|
16372
16080
|
|
|
16373
16081
|
// node_modules/execa/node_modules/strip-final-newline/index.js
|
|
16374
16082
|
function stripFinalNewline(input) {
|
|
@@ -16803,8 +16511,8 @@ var SIGNALS = [
|
|
|
16803
16511
|
// node_modules/execa/node_modules/human-signals/build/src/signals.js
|
|
16804
16512
|
var getSignals = () => {
|
|
16805
16513
|
const realtimeSignals = getRealtimeSignals();
|
|
16806
|
-
const
|
|
16807
|
-
return
|
|
16514
|
+
const signals2 = [...SIGNALS, ...realtimeSignals].map(normalizeSignal);
|
|
16515
|
+
return signals2;
|
|
16808
16516
|
};
|
|
16809
16517
|
var normalizeSignal = ({
|
|
16810
16518
|
name,
|
|
@@ -16824,8 +16532,8 @@ var normalizeSignal = ({
|
|
|
16824
16532
|
|
|
16825
16533
|
// node_modules/execa/node_modules/human-signals/build/src/main.js
|
|
16826
16534
|
var getSignalsByName = () => {
|
|
16827
|
-
const
|
|
16828
|
-
return Object.fromEntries(
|
|
16535
|
+
const signals2 = getSignals();
|
|
16536
|
+
return Object.fromEntries(signals2.map(getSignalByName));
|
|
16829
16537
|
};
|
|
16830
16538
|
var getSignalByName = ({
|
|
16831
16539
|
name,
|
|
@@ -16838,13 +16546,16 @@ var getSignalByName = ({
|
|
|
16838
16546
|
}) => [name, { name, number, description, supported, action, forced, standard }];
|
|
16839
16547
|
var signalsByName = getSignalsByName();
|
|
16840
16548
|
var getSignalsByNumber = () => {
|
|
16841
|
-
const
|
|
16549
|
+
const signals2 = getSignals();
|
|
16842
16550
|
const length = SIGRTMAX + 1;
|
|
16843
|
-
const signalsA = Array.from(
|
|
16551
|
+
const signalsA = Array.from(
|
|
16552
|
+
{ length },
|
|
16553
|
+
(value, number) => getSignalByNumber(number, signals2)
|
|
16554
|
+
);
|
|
16844
16555
|
return Object.assign({}, ...signalsA);
|
|
16845
16556
|
};
|
|
16846
|
-
var getSignalByNumber = (number,
|
|
16847
|
-
const signal = findSignalByNumber(number,
|
|
16557
|
+
var getSignalByNumber = (number, signals2) => {
|
|
16558
|
+
const signal = findSignalByNumber(number, signals2);
|
|
16848
16559
|
if (signal === void 0) {
|
|
16849
16560
|
return {};
|
|
16850
16561
|
}
|
|
@@ -16861,12 +16572,12 @@ var getSignalByNumber = (number, signals) => {
|
|
|
16861
16572
|
}
|
|
16862
16573
|
};
|
|
16863
16574
|
};
|
|
16864
|
-
var findSignalByNumber = (number,
|
|
16865
|
-
const signal =
|
|
16575
|
+
var findSignalByNumber = (number, signals2) => {
|
|
16576
|
+
const signal = signals2.find(({ name }) => constants2.signals[name] === number);
|
|
16866
16577
|
if (signal !== void 0) {
|
|
16867
16578
|
return signal;
|
|
16868
16579
|
}
|
|
16869
|
-
return
|
|
16580
|
+
return signals2.find((signalA) => signalA.number === number);
|
|
16870
16581
|
};
|
|
16871
16582
|
var signalsByNumber = getSignalsByNumber();
|
|
16872
16583
|
|
|
@@ -16966,8 +16677,272 @@ var normalizeStdio = (options) => {
|
|
|
16966
16677
|
};
|
|
16967
16678
|
|
|
16968
16679
|
// node_modules/execa/lib/kill.js
|
|
16969
|
-
var import_signal_exit = __toESM(require_signal_exit(), 1);
|
|
16970
16680
|
import os from "os";
|
|
16681
|
+
|
|
16682
|
+
// node_modules/execa/node_modules/signal-exit/dist/mjs/signals.js
|
|
16683
|
+
var signals = [];
|
|
16684
|
+
signals.push("SIGHUP", "SIGINT", "SIGTERM");
|
|
16685
|
+
if (process.platform !== "win32") {
|
|
16686
|
+
signals.push(
|
|
16687
|
+
"SIGALRM",
|
|
16688
|
+
"SIGABRT",
|
|
16689
|
+
"SIGVTALRM",
|
|
16690
|
+
"SIGXCPU",
|
|
16691
|
+
"SIGXFSZ",
|
|
16692
|
+
"SIGUSR2",
|
|
16693
|
+
"SIGTRAP",
|
|
16694
|
+
"SIGSYS",
|
|
16695
|
+
"SIGQUIT",
|
|
16696
|
+
"SIGIOT"
|
|
16697
|
+
// should detect profiler and enable/disable accordingly.
|
|
16698
|
+
// see #21
|
|
16699
|
+
// 'SIGPROF'
|
|
16700
|
+
);
|
|
16701
|
+
}
|
|
16702
|
+
if (process.platform === "linux") {
|
|
16703
|
+
signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
|
|
16704
|
+
}
|
|
16705
|
+
|
|
16706
|
+
// node_modules/execa/node_modules/signal-exit/dist/mjs/index.js
|
|
16707
|
+
var processOk = (process8) => !!process8 && typeof process8 === "object" && typeof process8.removeListener === "function" && typeof process8.emit === "function" && typeof process8.reallyExit === "function" && typeof process8.listeners === "function" && typeof process8.kill === "function" && typeof process8.pid === "number" && typeof process8.on === "function";
|
|
16708
|
+
var kExitEmitter = Symbol.for("signal-exit emitter");
|
|
16709
|
+
var global2 = globalThis;
|
|
16710
|
+
var ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
16711
|
+
var Emitter = class {
|
|
16712
|
+
emitted = {
|
|
16713
|
+
afterExit: false,
|
|
16714
|
+
exit: false
|
|
16715
|
+
};
|
|
16716
|
+
listeners = {
|
|
16717
|
+
afterExit: [],
|
|
16718
|
+
exit: []
|
|
16719
|
+
};
|
|
16720
|
+
count = 0;
|
|
16721
|
+
id = Math.random();
|
|
16722
|
+
constructor() {
|
|
16723
|
+
if (global2[kExitEmitter]) {
|
|
16724
|
+
return global2[kExitEmitter];
|
|
16725
|
+
}
|
|
16726
|
+
ObjectDefineProperty(global2, kExitEmitter, {
|
|
16727
|
+
value: this,
|
|
16728
|
+
writable: false,
|
|
16729
|
+
enumerable: false,
|
|
16730
|
+
configurable: false
|
|
16731
|
+
});
|
|
16732
|
+
}
|
|
16733
|
+
on(ev, fn) {
|
|
16734
|
+
this.listeners[ev].push(fn);
|
|
16735
|
+
}
|
|
16736
|
+
removeListener(ev, fn) {
|
|
16737
|
+
const list = this.listeners[ev];
|
|
16738
|
+
const i = list.indexOf(fn);
|
|
16739
|
+
if (i === -1) {
|
|
16740
|
+
return;
|
|
16741
|
+
}
|
|
16742
|
+
if (i === 0 && list.length === 1) {
|
|
16743
|
+
list.length = 0;
|
|
16744
|
+
} else {
|
|
16745
|
+
list.splice(i, 1);
|
|
16746
|
+
}
|
|
16747
|
+
}
|
|
16748
|
+
emit(ev, code, signal) {
|
|
16749
|
+
if (this.emitted[ev]) {
|
|
16750
|
+
return false;
|
|
16751
|
+
}
|
|
16752
|
+
this.emitted[ev] = true;
|
|
16753
|
+
let ret = false;
|
|
16754
|
+
for (const fn of this.listeners[ev]) {
|
|
16755
|
+
ret = fn(code, signal) === true || ret;
|
|
16756
|
+
}
|
|
16757
|
+
if (ev === "exit") {
|
|
16758
|
+
ret = this.emit("afterExit", code, signal) || ret;
|
|
16759
|
+
}
|
|
16760
|
+
return ret;
|
|
16761
|
+
}
|
|
16762
|
+
};
|
|
16763
|
+
var SignalExitBase = class {
|
|
16764
|
+
};
|
|
16765
|
+
var signalExitWrap = (handler) => {
|
|
16766
|
+
return {
|
|
16767
|
+
onExit(cb, opts) {
|
|
16768
|
+
return handler.onExit(cb, opts);
|
|
16769
|
+
},
|
|
16770
|
+
load() {
|
|
16771
|
+
return handler.load();
|
|
16772
|
+
},
|
|
16773
|
+
unload() {
|
|
16774
|
+
return handler.unload();
|
|
16775
|
+
}
|
|
16776
|
+
};
|
|
16777
|
+
};
|
|
16778
|
+
var SignalExitFallback = class extends SignalExitBase {
|
|
16779
|
+
onExit() {
|
|
16780
|
+
return () => {
|
|
16781
|
+
};
|
|
16782
|
+
}
|
|
16783
|
+
load() {
|
|
16784
|
+
}
|
|
16785
|
+
unload() {
|
|
16786
|
+
}
|
|
16787
|
+
};
|
|
16788
|
+
var _hupSig, _emitter, _process, _originalProcessEmit, _originalProcessReallyExit, _sigListeners, _loaded, _processReallyExit, processReallyExit_fn, _processEmit, processEmit_fn;
|
|
16789
|
+
var SignalExit = class extends SignalExitBase {
|
|
16790
|
+
constructor(process8) {
|
|
16791
|
+
super();
|
|
16792
|
+
__privateAdd(this, _processReallyExit);
|
|
16793
|
+
__privateAdd(this, _processEmit);
|
|
16794
|
+
// "SIGHUP" throws an `ENOSYS` error on Windows,
|
|
16795
|
+
// so use a supported signal instead
|
|
16796
|
+
/* c8 ignore start */
|
|
16797
|
+
__privateAdd(this, _hupSig, process5.platform === "win32" ? "SIGINT" : "SIGHUP");
|
|
16798
|
+
/* c8 ignore stop */
|
|
16799
|
+
__privateAdd(this, _emitter, new Emitter());
|
|
16800
|
+
__privateAdd(this, _process, void 0);
|
|
16801
|
+
__privateAdd(this, _originalProcessEmit, void 0);
|
|
16802
|
+
__privateAdd(this, _originalProcessReallyExit, void 0);
|
|
16803
|
+
__privateAdd(this, _sigListeners, {});
|
|
16804
|
+
__privateAdd(this, _loaded, false);
|
|
16805
|
+
__privateSet(this, _process, process8);
|
|
16806
|
+
__privateSet(this, _sigListeners, {});
|
|
16807
|
+
for (const sig of signals) {
|
|
16808
|
+
__privateGet(this, _sigListeners)[sig] = () => {
|
|
16809
|
+
const listeners = __privateGet(this, _process).listeners(sig);
|
|
16810
|
+
let { count } = __privateGet(this, _emitter);
|
|
16811
|
+
const p = process8;
|
|
16812
|
+
if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") {
|
|
16813
|
+
count += p.__signal_exit_emitter__.count;
|
|
16814
|
+
}
|
|
16815
|
+
if (listeners.length === count) {
|
|
16816
|
+
this.unload();
|
|
16817
|
+
const ret = __privateGet(this, _emitter).emit("exit", null, sig);
|
|
16818
|
+
const s = sig === "SIGHUP" ? __privateGet(this, _hupSig) : sig;
|
|
16819
|
+
if (!ret)
|
|
16820
|
+
process8.kill(process8.pid, s);
|
|
16821
|
+
}
|
|
16822
|
+
};
|
|
16823
|
+
}
|
|
16824
|
+
__privateSet(this, _originalProcessReallyExit, process8.reallyExit);
|
|
16825
|
+
__privateSet(this, _originalProcessEmit, process8.emit);
|
|
16826
|
+
}
|
|
16827
|
+
onExit(cb, opts) {
|
|
16828
|
+
if (!processOk(__privateGet(this, _process))) {
|
|
16829
|
+
return () => {
|
|
16830
|
+
};
|
|
16831
|
+
}
|
|
16832
|
+
if (__privateGet(this, _loaded) === false) {
|
|
16833
|
+
this.load();
|
|
16834
|
+
}
|
|
16835
|
+
const ev = (opts == null ? void 0 : opts.alwaysLast) ? "afterExit" : "exit";
|
|
16836
|
+
__privateGet(this, _emitter).on(ev, cb);
|
|
16837
|
+
return () => {
|
|
16838
|
+
__privateGet(this, _emitter).removeListener(ev, cb);
|
|
16839
|
+
if (__privateGet(this, _emitter).listeners["exit"].length === 0 && __privateGet(this, _emitter).listeners["afterExit"].length === 0) {
|
|
16840
|
+
this.unload();
|
|
16841
|
+
}
|
|
16842
|
+
};
|
|
16843
|
+
}
|
|
16844
|
+
load() {
|
|
16845
|
+
if (__privateGet(this, _loaded)) {
|
|
16846
|
+
return;
|
|
16847
|
+
}
|
|
16848
|
+
__privateSet(this, _loaded, true);
|
|
16849
|
+
__privateGet(this, _emitter).count += 1;
|
|
16850
|
+
for (const sig of signals) {
|
|
16851
|
+
try {
|
|
16852
|
+
const fn = __privateGet(this, _sigListeners)[sig];
|
|
16853
|
+
if (fn)
|
|
16854
|
+
__privateGet(this, _process).on(sig, fn);
|
|
16855
|
+
} catch (_) {
|
|
16856
|
+
}
|
|
16857
|
+
}
|
|
16858
|
+
__privateGet(this, _process).emit = (ev, ...a) => {
|
|
16859
|
+
return __privateMethod(this, _processEmit, processEmit_fn).call(this, ev, ...a);
|
|
16860
|
+
};
|
|
16861
|
+
__privateGet(this, _process).reallyExit = (code) => {
|
|
16862
|
+
return __privateMethod(this, _processReallyExit, processReallyExit_fn).call(this, code);
|
|
16863
|
+
};
|
|
16864
|
+
}
|
|
16865
|
+
unload() {
|
|
16866
|
+
if (!__privateGet(this, _loaded)) {
|
|
16867
|
+
return;
|
|
16868
|
+
}
|
|
16869
|
+
__privateSet(this, _loaded, false);
|
|
16870
|
+
signals.forEach((sig) => {
|
|
16871
|
+
const listener = __privateGet(this, _sigListeners)[sig];
|
|
16872
|
+
if (!listener) {
|
|
16873
|
+
throw new Error("Listener not defined for signal: " + sig);
|
|
16874
|
+
}
|
|
16875
|
+
try {
|
|
16876
|
+
__privateGet(this, _process).removeListener(sig, listener);
|
|
16877
|
+
} catch (_) {
|
|
16878
|
+
}
|
|
16879
|
+
});
|
|
16880
|
+
__privateGet(this, _process).emit = __privateGet(this, _originalProcessEmit);
|
|
16881
|
+
__privateGet(this, _process).reallyExit = __privateGet(this, _originalProcessReallyExit);
|
|
16882
|
+
__privateGet(this, _emitter).count -= 1;
|
|
16883
|
+
}
|
|
16884
|
+
};
|
|
16885
|
+
_hupSig = new WeakMap();
|
|
16886
|
+
_emitter = new WeakMap();
|
|
16887
|
+
_process = new WeakMap();
|
|
16888
|
+
_originalProcessEmit = new WeakMap();
|
|
16889
|
+
_originalProcessReallyExit = new WeakMap();
|
|
16890
|
+
_sigListeners = new WeakMap();
|
|
16891
|
+
_loaded = new WeakMap();
|
|
16892
|
+
_processReallyExit = new WeakSet();
|
|
16893
|
+
processReallyExit_fn = function(code) {
|
|
16894
|
+
if (!processOk(__privateGet(this, _process))) {
|
|
16895
|
+
return 0;
|
|
16896
|
+
}
|
|
16897
|
+
__privateGet(this, _process).exitCode = code || 0;
|
|
16898
|
+
__privateGet(this, _emitter).emit("exit", __privateGet(this, _process).exitCode, null);
|
|
16899
|
+
return __privateGet(this, _originalProcessReallyExit).call(__privateGet(this, _process), __privateGet(this, _process).exitCode);
|
|
16900
|
+
};
|
|
16901
|
+
_processEmit = new WeakSet();
|
|
16902
|
+
processEmit_fn = function(ev, ...args) {
|
|
16903
|
+
const og = __privateGet(this, _originalProcessEmit);
|
|
16904
|
+
if (ev === "exit" && processOk(__privateGet(this, _process))) {
|
|
16905
|
+
if (typeof args[0] === "number") {
|
|
16906
|
+
__privateGet(this, _process).exitCode = args[0];
|
|
16907
|
+
}
|
|
16908
|
+
const ret = og.call(__privateGet(this, _process), ev, ...args);
|
|
16909
|
+
__privateGet(this, _emitter).emit("exit", __privateGet(this, _process).exitCode, null);
|
|
16910
|
+
return ret;
|
|
16911
|
+
} else {
|
|
16912
|
+
return og.call(__privateGet(this, _process), ev, ...args);
|
|
16913
|
+
}
|
|
16914
|
+
};
|
|
16915
|
+
var process5 = globalThis.process;
|
|
16916
|
+
var {
|
|
16917
|
+
/**
|
|
16918
|
+
* Called when the process is exiting, whether via signal, explicit
|
|
16919
|
+
* exit, or running out of stuff to do.
|
|
16920
|
+
*
|
|
16921
|
+
* If the global process object is not suitable for instrumentation,
|
|
16922
|
+
* then this will be a no-op.
|
|
16923
|
+
*
|
|
16924
|
+
* Returns a function that may be used to unload signal-exit.
|
|
16925
|
+
*/
|
|
16926
|
+
onExit,
|
|
16927
|
+
/**
|
|
16928
|
+
* Load the listeners. Likely you never need to call this, unless
|
|
16929
|
+
* doing a rather deep integration with signal-exit functionality.
|
|
16930
|
+
* Mostly exposed for the benefit of testing.
|
|
16931
|
+
*
|
|
16932
|
+
* @internal
|
|
16933
|
+
*/
|
|
16934
|
+
load,
|
|
16935
|
+
/**
|
|
16936
|
+
* Unload the listeners. Likely you never need to call this, unless
|
|
16937
|
+
* doing a rather deep integration with signal-exit functionality.
|
|
16938
|
+
* Mostly exposed for the benefit of testing.
|
|
16939
|
+
*
|
|
16940
|
+
* @internal
|
|
16941
|
+
*/
|
|
16942
|
+
unload
|
|
16943
|
+
} = signalExitWrap(processOk(process5) ? new SignalExit(process5) : new SignalExitFallback());
|
|
16944
|
+
|
|
16945
|
+
// node_modules/execa/lib/kill.js
|
|
16971
16946
|
var DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5;
|
|
16972
16947
|
var spawnedKill = (kill, signal = "SIGTERM", options = {}) => {
|
|
16973
16948
|
const killResult = kill(signal);
|
|
@@ -17031,7 +17006,7 @@ var setExitHandler = async (spawned, { cleanup, detached }, timedPromise) => {
|
|
|
17031
17006
|
if (!cleanup || detached) {
|
|
17032
17007
|
return timedPromise;
|
|
17033
17008
|
}
|
|
17034
|
-
const removeExitHandler = (
|
|
17009
|
+
const removeExitHandler = onExit(() => {
|
|
17035
17010
|
spawned.kill();
|
|
17036
17011
|
});
|
|
17037
17012
|
return timedPromise.finally(() => {
|
|
@@ -17085,7 +17060,192 @@ var addPipeMethods = (spawned) => {
|
|
|
17085
17060
|
|
|
17086
17061
|
// node_modules/execa/lib/stream.js
|
|
17087
17062
|
import { createReadStream, readFileSync } from "fs";
|
|
17088
|
-
|
|
17063
|
+
import { setTimeout as setTimeout2 } from "timers/promises";
|
|
17064
|
+
|
|
17065
|
+
// node_modules/execa/node_modules/get-stream/source/contents.js
|
|
17066
|
+
var getStreamContents = async (stream, { init: init2, convertChunk, getSize, truncateChunk, addChunk, getFinalChunk, finalize }, { maxBuffer = Number.POSITIVE_INFINITY } = {}) => {
|
|
17067
|
+
if (!isAsyncIterable(stream)) {
|
|
17068
|
+
throw new Error("The first argument must be a Readable, a ReadableStream, or an async iterable.");
|
|
17069
|
+
}
|
|
17070
|
+
const state = init2();
|
|
17071
|
+
state.length = 0;
|
|
17072
|
+
try {
|
|
17073
|
+
for await (const chunk of stream) {
|
|
17074
|
+
const chunkType = getChunkType(chunk);
|
|
17075
|
+
const convertedChunk = convertChunk[chunkType](chunk, state);
|
|
17076
|
+
appendChunk({ convertedChunk, state, getSize, truncateChunk, addChunk, maxBuffer });
|
|
17077
|
+
}
|
|
17078
|
+
appendFinalChunk({ state, convertChunk, getSize, truncateChunk, addChunk, getFinalChunk, maxBuffer });
|
|
17079
|
+
return finalize(state);
|
|
17080
|
+
} catch (error) {
|
|
17081
|
+
error.bufferedData = finalize(state);
|
|
17082
|
+
throw error;
|
|
17083
|
+
}
|
|
17084
|
+
};
|
|
17085
|
+
var appendFinalChunk = ({ state, getSize, truncateChunk, addChunk, getFinalChunk, maxBuffer }) => {
|
|
17086
|
+
const convertedChunk = getFinalChunk(state);
|
|
17087
|
+
if (convertedChunk !== void 0) {
|
|
17088
|
+
appendChunk({ convertedChunk, state, getSize, truncateChunk, addChunk, maxBuffer });
|
|
17089
|
+
}
|
|
17090
|
+
};
|
|
17091
|
+
var appendChunk = ({ convertedChunk, state, getSize, truncateChunk, addChunk, maxBuffer }) => {
|
|
17092
|
+
const chunkSize = getSize(convertedChunk);
|
|
17093
|
+
const newLength = state.length + chunkSize;
|
|
17094
|
+
if (newLength <= maxBuffer) {
|
|
17095
|
+
addNewChunk(convertedChunk, state, addChunk, newLength);
|
|
17096
|
+
return;
|
|
17097
|
+
}
|
|
17098
|
+
const truncatedChunk = truncateChunk(convertedChunk, maxBuffer - state.length);
|
|
17099
|
+
if (truncatedChunk !== void 0) {
|
|
17100
|
+
addNewChunk(truncatedChunk, state, addChunk, maxBuffer);
|
|
17101
|
+
}
|
|
17102
|
+
throw new MaxBufferError();
|
|
17103
|
+
};
|
|
17104
|
+
var addNewChunk = (convertedChunk, state, addChunk, newLength) => {
|
|
17105
|
+
state.contents = addChunk(convertedChunk, state, newLength);
|
|
17106
|
+
state.length = newLength;
|
|
17107
|
+
};
|
|
17108
|
+
var isAsyncIterable = (stream) => typeof stream === "object" && stream !== null && typeof stream[Symbol.asyncIterator] === "function";
|
|
17109
|
+
var getChunkType = (chunk) => {
|
|
17110
|
+
var _a;
|
|
17111
|
+
const typeOfChunk = typeof chunk;
|
|
17112
|
+
if (typeOfChunk === "string") {
|
|
17113
|
+
return "string";
|
|
17114
|
+
}
|
|
17115
|
+
if (typeOfChunk !== "object" || chunk === null) {
|
|
17116
|
+
return "others";
|
|
17117
|
+
}
|
|
17118
|
+
if ((_a = globalThis.Buffer) == null ? void 0 : _a.isBuffer(chunk)) {
|
|
17119
|
+
return "buffer";
|
|
17120
|
+
}
|
|
17121
|
+
const prototypeName = objectToString.call(chunk);
|
|
17122
|
+
if (prototypeName === "[object ArrayBuffer]") {
|
|
17123
|
+
return "arrayBuffer";
|
|
17124
|
+
}
|
|
17125
|
+
if (prototypeName === "[object DataView]") {
|
|
17126
|
+
return "dataView";
|
|
17127
|
+
}
|
|
17128
|
+
if (Number.isInteger(chunk.byteLength) && Number.isInteger(chunk.byteOffset) && objectToString.call(chunk.buffer) === "[object ArrayBuffer]") {
|
|
17129
|
+
return "typedArray";
|
|
17130
|
+
}
|
|
17131
|
+
return "others";
|
|
17132
|
+
};
|
|
17133
|
+
var { toString: objectToString } = Object.prototype;
|
|
17134
|
+
var MaxBufferError = class extends Error {
|
|
17135
|
+
name = "MaxBufferError";
|
|
17136
|
+
constructor() {
|
|
17137
|
+
super("maxBuffer exceeded");
|
|
17138
|
+
}
|
|
17139
|
+
};
|
|
17140
|
+
|
|
17141
|
+
// node_modules/execa/node_modules/get-stream/source/utils.js
|
|
17142
|
+
var identity = (value) => value;
|
|
17143
|
+
var noop = () => void 0;
|
|
17144
|
+
var getContentsProp = ({ contents }) => contents;
|
|
17145
|
+
var throwObjectStream = (chunk) => {
|
|
17146
|
+
throw new Error(`Streams in object mode are not supported: ${String(chunk)}`);
|
|
17147
|
+
};
|
|
17148
|
+
var getLengthProp = (convertedChunk) => convertedChunk.length;
|
|
17149
|
+
|
|
17150
|
+
// node_modules/execa/node_modules/get-stream/source/array-buffer.js
|
|
17151
|
+
async function getStreamAsArrayBuffer(stream, options) {
|
|
17152
|
+
return getStreamContents(stream, arrayBufferMethods, options);
|
|
17153
|
+
}
|
|
17154
|
+
var initArrayBuffer = () => ({ contents: new ArrayBuffer(0) });
|
|
17155
|
+
var useTextEncoder = (chunk) => textEncoder.encode(chunk);
|
|
17156
|
+
var textEncoder = new TextEncoder();
|
|
17157
|
+
var useUint8Array = (chunk) => new Uint8Array(chunk);
|
|
17158
|
+
var useUint8ArrayWithOffset = (chunk) => new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength);
|
|
17159
|
+
var truncateArrayBufferChunk = (convertedChunk, chunkSize) => convertedChunk.slice(0, chunkSize);
|
|
17160
|
+
var addArrayBufferChunk = (convertedChunk, { contents, length: previousLength }, length) => {
|
|
17161
|
+
const newContents = hasArrayBufferResize() ? resizeArrayBuffer(contents, length) : resizeArrayBufferSlow(contents, length);
|
|
17162
|
+
new Uint8Array(newContents).set(convertedChunk, previousLength);
|
|
17163
|
+
return newContents;
|
|
17164
|
+
};
|
|
17165
|
+
var resizeArrayBufferSlow = (contents, length) => {
|
|
17166
|
+
if (length <= contents.byteLength) {
|
|
17167
|
+
return contents;
|
|
17168
|
+
}
|
|
17169
|
+
const arrayBuffer = new ArrayBuffer(getNewContentsLength(length));
|
|
17170
|
+
new Uint8Array(arrayBuffer).set(new Uint8Array(contents), 0);
|
|
17171
|
+
return arrayBuffer;
|
|
17172
|
+
};
|
|
17173
|
+
var resizeArrayBuffer = (contents, length) => {
|
|
17174
|
+
if (length <= contents.maxByteLength) {
|
|
17175
|
+
contents.resize(length);
|
|
17176
|
+
return contents;
|
|
17177
|
+
}
|
|
17178
|
+
const arrayBuffer = new ArrayBuffer(length, { maxByteLength: getNewContentsLength(length) });
|
|
17179
|
+
new Uint8Array(arrayBuffer).set(new Uint8Array(contents), 0);
|
|
17180
|
+
return arrayBuffer;
|
|
17181
|
+
};
|
|
17182
|
+
var getNewContentsLength = (length) => SCALE_FACTOR ** Math.ceil(Math.log(length) / Math.log(SCALE_FACTOR));
|
|
17183
|
+
var SCALE_FACTOR = 2;
|
|
17184
|
+
var finalizeArrayBuffer = ({ contents, length }) => hasArrayBufferResize() ? contents : contents.slice(0, length);
|
|
17185
|
+
var hasArrayBufferResize = () => "resize" in ArrayBuffer.prototype;
|
|
17186
|
+
var arrayBufferMethods = {
|
|
17187
|
+
init: initArrayBuffer,
|
|
17188
|
+
convertChunk: {
|
|
17189
|
+
string: useTextEncoder,
|
|
17190
|
+
buffer: useUint8Array,
|
|
17191
|
+
arrayBuffer: useUint8Array,
|
|
17192
|
+
dataView: useUint8ArrayWithOffset,
|
|
17193
|
+
typedArray: useUint8ArrayWithOffset,
|
|
17194
|
+
others: throwObjectStream
|
|
17195
|
+
},
|
|
17196
|
+
getSize: getLengthProp,
|
|
17197
|
+
truncateChunk: truncateArrayBufferChunk,
|
|
17198
|
+
addChunk: addArrayBufferChunk,
|
|
17199
|
+
getFinalChunk: noop,
|
|
17200
|
+
finalize: finalizeArrayBuffer
|
|
17201
|
+
};
|
|
17202
|
+
|
|
17203
|
+
// node_modules/execa/node_modules/get-stream/source/buffer.js
|
|
17204
|
+
async function getStreamAsBuffer(stream, options) {
|
|
17205
|
+
if (!("Buffer" in globalThis)) {
|
|
17206
|
+
throw new Error("getStreamAsBuffer() is only supported in Node.js");
|
|
17207
|
+
}
|
|
17208
|
+
try {
|
|
17209
|
+
return arrayBufferToNodeBuffer(await getStreamAsArrayBuffer(stream, options));
|
|
17210
|
+
} catch (error) {
|
|
17211
|
+
if (error.bufferedData !== void 0) {
|
|
17212
|
+
error.bufferedData = arrayBufferToNodeBuffer(error.bufferedData);
|
|
17213
|
+
}
|
|
17214
|
+
throw error;
|
|
17215
|
+
}
|
|
17216
|
+
}
|
|
17217
|
+
var arrayBufferToNodeBuffer = (arrayBuffer) => globalThis.Buffer.from(arrayBuffer);
|
|
17218
|
+
|
|
17219
|
+
// node_modules/execa/node_modules/get-stream/source/string.js
|
|
17220
|
+
async function getStreamAsString(stream, options) {
|
|
17221
|
+
return getStreamContents(stream, stringMethods, options);
|
|
17222
|
+
}
|
|
17223
|
+
var initString = () => ({ contents: "", textDecoder: new TextDecoder() });
|
|
17224
|
+
var useTextDecoder = (chunk, { textDecoder }) => textDecoder.decode(chunk, { stream: true });
|
|
17225
|
+
var addStringChunk = (convertedChunk, { contents }) => contents + convertedChunk;
|
|
17226
|
+
var truncateStringChunk = (convertedChunk, chunkSize) => convertedChunk.slice(0, chunkSize);
|
|
17227
|
+
var getFinalStringChunk = ({ textDecoder }) => {
|
|
17228
|
+
const finalChunk = textDecoder.decode();
|
|
17229
|
+
return finalChunk === "" ? void 0 : finalChunk;
|
|
17230
|
+
};
|
|
17231
|
+
var stringMethods = {
|
|
17232
|
+
init: initString,
|
|
17233
|
+
convertChunk: {
|
|
17234
|
+
string: identity,
|
|
17235
|
+
buffer: useTextDecoder,
|
|
17236
|
+
arrayBuffer: useTextDecoder,
|
|
17237
|
+
dataView: useTextDecoder,
|
|
17238
|
+
typedArray: useTextDecoder,
|
|
17239
|
+
others: throwObjectStream
|
|
17240
|
+
},
|
|
17241
|
+
getSize: getLengthProp,
|
|
17242
|
+
truncateChunk: truncateStringChunk,
|
|
17243
|
+
addChunk: addStringChunk,
|
|
17244
|
+
getFinalChunk: getFinalStringChunk,
|
|
17245
|
+
finalize: getContentsProp
|
|
17246
|
+
};
|
|
17247
|
+
|
|
17248
|
+
// node_modules/execa/lib/stream.js
|
|
17089
17249
|
var import_merge_stream = __toESM(require_merge_stream(), 1);
|
|
17090
17250
|
var validateInputOptions = (input) => {
|
|
17091
17251
|
if (input !== void 0) {
|
|
@@ -17141,6 +17301,7 @@ var getBufferedData = async (stream, streamPromise) => {
|
|
|
17141
17301
|
if (!stream || streamPromise === void 0) {
|
|
17142
17302
|
return;
|
|
17143
17303
|
}
|
|
17304
|
+
await setTimeout2(0);
|
|
17144
17305
|
stream.destroy();
|
|
17145
17306
|
try {
|
|
17146
17307
|
return await streamPromise;
|
|
@@ -17152,10 +17313,17 @@ var getStreamPromise = (stream, { encoding, buffer, maxBuffer }) => {
|
|
|
17152
17313
|
if (!stream || !buffer) {
|
|
17153
17314
|
return;
|
|
17154
17315
|
}
|
|
17155
|
-
if (encoding) {
|
|
17156
|
-
return (
|
|
17316
|
+
if (encoding === "utf8" || encoding === "utf-8") {
|
|
17317
|
+
return getStreamAsString(stream, { maxBuffer });
|
|
17157
17318
|
}
|
|
17158
|
-
|
|
17319
|
+
if (encoding === null || encoding === "buffer") {
|
|
17320
|
+
return getStreamAsBuffer(stream, { maxBuffer });
|
|
17321
|
+
}
|
|
17322
|
+
return applyEncoding(stream, maxBuffer, encoding);
|
|
17323
|
+
};
|
|
17324
|
+
var applyEncoding = async (stream, maxBuffer, encoding) => {
|
|
17325
|
+
const buffer = await getStreamAsBuffer(stream, { maxBuffer });
|
|
17326
|
+
return buffer.toString(encoding);
|
|
17159
17327
|
};
|
|
17160
17328
|
var getSpawnedResult = async ({ stdout, stderr, all }, { encoding, buffer, maxBuffer }, processDone) => {
|
|
17161
17329
|
const stdoutPromise = getStreamPromise(stdout, { encoding, buffer, maxBuffer });
|
|
@@ -17210,12 +17378,11 @@ var normalizeArgs = (file, args = []) => {
|
|
|
17210
17378
|
return [file, ...args];
|
|
17211
17379
|
};
|
|
17212
17380
|
var NO_ESCAPE_REGEXP = /^[\w.-]+$/;
|
|
17213
|
-
var DOUBLE_QUOTES_REGEXP = /"/g;
|
|
17214
17381
|
var escapeArg = (arg) => {
|
|
17215
17382
|
if (typeof arg !== "string" || NO_ESCAPE_REGEXP.test(arg)) {
|
|
17216
17383
|
return arg;
|
|
17217
17384
|
}
|
|
17218
|
-
return `"${arg.
|
|
17385
|
+
return `"${arg.replaceAll('"', '\\"')}"`;
|
|
17219
17386
|
};
|
|
17220
17387
|
var joinCommand = (file, args) => normalizeArgs(file, args).join(" ");
|
|
17221
17388
|
var getEscapedCommand = (file, args) => normalizeArgs(file, args).map((arg) => escapeArg(arg)).join(" ");
|
|
@@ -17242,7 +17409,7 @@ var parseExpression = (expression) => {
|
|
|
17242
17409
|
};
|
|
17243
17410
|
var concatTokens = (tokens, nextTokens, isNew) => isNew || tokens.length === 0 || nextTokens.length === 0 ? [...tokens, ...nextTokens] : [
|
|
17244
17411
|
...tokens.slice(0, -1),
|
|
17245
|
-
`${tokens
|
|
17412
|
+
`${tokens.at(-1)}${nextTokens[0]}`,
|
|
17246
17413
|
...nextTokens.slice(1)
|
|
17247
17414
|
];
|
|
17248
17415
|
var parseTemplate = ({ templates, expressions, tokens, index, template }) => {
|
|
@@ -17274,7 +17441,7 @@ var parseTemplates = (templates, expressions) => {
|
|
|
17274
17441
|
|
|
17275
17442
|
// node_modules/execa/lib/verbose.js
|
|
17276
17443
|
import { debuglog } from "util";
|
|
17277
|
-
import
|
|
17444
|
+
import process6 from "process";
|
|
17278
17445
|
var verboseDefault = debuglog("execa").enabled;
|
|
17279
17446
|
var padField = (field, padding) => String(field).padStart(padding, "0");
|
|
17280
17447
|
var getTimestamp = () => {
|
|
@@ -17285,14 +17452,14 @@ var logCommand = (escapedCommand, { verbose }) => {
|
|
|
17285
17452
|
if (!verbose) {
|
|
17286
17453
|
return;
|
|
17287
17454
|
}
|
|
17288
|
-
|
|
17455
|
+
process6.stderr.write(`[${getTimestamp()}] ${escapedCommand}
|
|
17289
17456
|
`);
|
|
17290
17457
|
};
|
|
17291
17458
|
|
|
17292
17459
|
// node_modules/execa/index.js
|
|
17293
17460
|
var DEFAULT_MAX_BUFFER = 1e3 * 1e3 * 100;
|
|
17294
17461
|
var getEnv = ({ env: envOption, extendEnv, preferLocal, localDir, execPath }) => {
|
|
17295
|
-
const env = extendEnv ? { ...
|
|
17462
|
+
const env = extendEnv ? { ...process7.env, ...envOption } : envOption;
|
|
17296
17463
|
if (preferLocal) {
|
|
17297
17464
|
return npmRunPathEnv({ env, cwd: localDir, execPath });
|
|
17298
17465
|
}
|
|
@@ -17309,8 +17476,8 @@ var handleArguments = (file, args, options = {}) => {
|
|
|
17309
17476
|
stripFinalNewline: true,
|
|
17310
17477
|
extendEnv: true,
|
|
17311
17478
|
preferLocal: false,
|
|
17312
|
-
localDir: options.cwd ||
|
|
17313
|
-
execPath:
|
|
17479
|
+
localDir: options.cwd || process7.cwd(),
|
|
17480
|
+
execPath: process7.execPath,
|
|
17314
17481
|
encoding: "utf8",
|
|
17315
17482
|
reject: true,
|
|
17316
17483
|
cleanup: true,
|
|
@@ -17321,7 +17488,7 @@ var handleArguments = (file, args, options = {}) => {
|
|
|
17321
17488
|
};
|
|
17322
17489
|
options.env = getEnv(options);
|
|
17323
17490
|
options.stdio = normalizeStdio(options);
|
|
17324
|
-
if (
|
|
17491
|
+
if (process7.platform === "win32" && path4.basename(file, ".exe") === "cmd") {
|
|
17325
17492
|
args.unshift("/q");
|
|
17326
17493
|
}
|
|
17327
17494
|
return { file, args, options, parsed };
|