@gql.tada/cli-utils 1.0.2 → 1.0.3-canary-9338d994bfb4e9a55eed9e2a06fc2a694b04c6ae
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/CHANGELOG.md +9 -0
- package/dist/gql-tada-cli.d.ts +1 -0
- package/dist/gql-tada-cli.js +100 -90
- package/dist/gql-tada-cli.js.map +1 -1
- package/dist/gql-tada-cli.mjs +44 -34
- package/dist/gql-tada-cli.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @gql.tada/cli-utils
|
|
2
2
|
|
|
3
|
+
## 1.0.3-canary-9338d994bfb4e9a55eed9e2a06fc2a694b04c6ae
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Add missing argument to `generate-output` command to force output the `.ts` format instead
|
|
8
|
+
Submitted by [@kitten](https://github.com/kitten) (See [#227](https://github.com/0no-co/gql.tada/pull/227))
|
|
9
|
+
- ⚠️ Fix `generate-output` command outputting the `.d.ts` format when `.ts` extension was specified instead
|
|
10
|
+
Submitted by [@llllvvuu](https://github.com/llllvvuu) (See [#225](https://github.com/0no-co/gql.tada/pull/225))
|
|
11
|
+
|
|
3
12
|
## 1.0.2
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/dist/gql-tada-cli.d.ts
CHANGED
package/dist/gql-tada-cli.js
CHANGED
|
@@ -30,9 +30,9 @@ var p = require("node:url");
|
|
|
30
30
|
|
|
31
31
|
var h = require("node:os");
|
|
32
32
|
|
|
33
|
-
var
|
|
33
|
+
var m = require("node:fs");
|
|
34
34
|
|
|
35
|
-
var
|
|
35
|
+
var g = require("node:timers/promises");
|
|
36
36
|
|
|
37
37
|
var E = require("stream");
|
|
38
38
|
|
|
@@ -383,13 +383,13 @@ function runMachineInternal(e, t, r = !1) {
|
|
|
383
383
|
var h = Object.prototype.hasOwnProperty.call(p.statics, s);
|
|
384
384
|
if (!r || a < i.length - 1 || h) {
|
|
385
385
|
if (h) {
|
|
386
|
-
var
|
|
387
|
-
for (var {to:
|
|
386
|
+
var m = p.statics[s];
|
|
387
|
+
for (var {to: g, reducer: E} of m) {
|
|
388
388
|
l.push({
|
|
389
|
-
node:
|
|
389
|
+
node: g,
|
|
390
390
|
state: void 0 !== E ? execute(Q, E, f, s, c) : f
|
|
391
391
|
});
|
|
392
|
-
debug(` Static transition to ${
|
|
392
|
+
debug(` Static transition to ${g} found`);
|
|
393
393
|
}
|
|
394
394
|
} else {
|
|
395
395
|
debug(" No static transition found");
|
|
@@ -1054,21 +1054,21 @@ class CommandBuilder {
|
|
|
1054
1054
|
registerStatic(e, D, O.EndOfPartialInput, k.SuccessNode, [ "setSelectedIndex", this.cliIndex ]);
|
|
1055
1055
|
}
|
|
1056
1056
|
var h = D;
|
|
1057
|
-
for (var
|
|
1058
|
-
var
|
|
1057
|
+
for (var m = 0; m < this.arity.leading.length; ++m) {
|
|
1058
|
+
var g = injectNode(e, {
|
|
1059
1059
|
dynamics: [],
|
|
1060
1060
|
shortcuts: [],
|
|
1061
1061
|
statics: {}
|
|
1062
1062
|
});
|
|
1063
|
-
if (!this.arity.proxy ||
|
|
1064
|
-
this.registerOptions(e,
|
|
1063
|
+
if (!this.arity.proxy || m + 1 !== this.arity.leading.length) {
|
|
1064
|
+
this.registerOptions(e, g);
|
|
1065
1065
|
}
|
|
1066
|
-
if (this.arity.trailing.length > 0 ||
|
|
1067
|
-
registerStatic(e,
|
|
1068
|
-
registerStatic(e,
|
|
1066
|
+
if (this.arity.trailing.length > 0 || m + 1 !== this.arity.leading.length) {
|
|
1067
|
+
registerStatic(e, g, O.EndOfInput, k.ErrorNode, [ "setError", "Not enough positional arguments" ]);
|
|
1068
|
+
registerStatic(e, g, O.EndOfPartialInput, k.SuccessNode, [ "setSelectedIndex", this.cliIndex ]);
|
|
1069
1069
|
}
|
|
1070
|
-
registerDynamic(e, h, "isNotOptionLike",
|
|
1071
|
-
h =
|
|
1070
|
+
registerDynamic(e, h, "isNotOptionLike", g, "pushPositional");
|
|
1071
|
+
h = g;
|
|
1072
1072
|
}
|
|
1073
1073
|
var E = h;
|
|
1074
1074
|
if (this.arity.extra === ee || this.arity.extra.length > 0) {
|
|
@@ -1261,8 +1261,8 @@ class CliBuilder {
|
|
|
1261
1261
|
h.push(e);
|
|
1262
1262
|
}
|
|
1263
1263
|
};
|
|
1264
|
-
for (var
|
|
1265
|
-
_loop(
|
|
1264
|
+
for (var m of p) {
|
|
1265
|
+
_loop(m);
|
|
1266
1266
|
}
|
|
1267
1267
|
}
|
|
1268
1268
|
var _loop2 = function(e, t) {
|
|
@@ -1270,8 +1270,8 @@ class CliBuilder {
|
|
|
1270
1270
|
n.dynamics.push([ e, t ]);
|
|
1271
1271
|
}
|
|
1272
1272
|
};
|
|
1273
|
-
for (var [
|
|
1274
|
-
_loop2(
|
|
1273
|
+
for (var [g, E] of d.dynamics) {
|
|
1274
|
+
_loop2(g, E);
|
|
1275
1275
|
}
|
|
1276
1276
|
for (var w of d.shortcuts) {
|
|
1277
1277
|
if (!c.has(w.to)) {
|
|
@@ -1421,8 +1421,8 @@ class Cli {
|
|
|
1421
1421
|
p.tokens = D.tokens;
|
|
1422
1422
|
p.path = D.path;
|
|
1423
1423
|
try {
|
|
1424
|
-
for (var [h, {transformer:
|
|
1425
|
-
p[h] =
|
|
1424
|
+
for (var [h, {transformer: m}] of f.specs.entries()) {
|
|
1425
|
+
p[h] = m(f.builder, h, D, c);
|
|
1426
1426
|
}
|
|
1427
1427
|
return p;
|
|
1428
1428
|
} catch (e) {
|
|
@@ -1574,16 +1574,16 @@ class Cli {
|
|
|
1574
1574
|
if (void 0 === p.usage) {
|
|
1575
1575
|
continue;
|
|
1576
1576
|
}
|
|
1577
|
-
var
|
|
1577
|
+
var m = void 0 !== p.usage.category ? formatMarkdownish(p.usage.category, {
|
|
1578
1578
|
format: this.format(t),
|
|
1579
1579
|
paragraphs: !1
|
|
1580
1580
|
}) : null;
|
|
1581
|
-
var
|
|
1582
|
-
if (void 0 ===
|
|
1583
|
-
f.set(
|
|
1581
|
+
var g = f.get(m);
|
|
1582
|
+
if (void 0 === g) {
|
|
1583
|
+
f.set(m, g = []);
|
|
1584
1584
|
}
|
|
1585
1585
|
var {usage: E} = this.getUsageByIndex(h);
|
|
1586
|
-
|
|
1586
|
+
g.push({
|
|
1587
1587
|
commandClass: p,
|
|
1588
1588
|
usage: E
|
|
1589
1589
|
});
|
|
@@ -2666,9 +2666,9 @@ var ve = function(e) {
|
|
|
2666
2666
|
return e;
|
|
2667
2667
|
}({});
|
|
2668
2668
|
|
|
2669
|
-
var
|
|
2669
|
+
var me = [ "⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏" ];
|
|
2670
2670
|
|
|
2671
|
-
var
|
|
2671
|
+
var ge = [ "◐", "◓", "◑", "◒" ];
|
|
2672
2672
|
|
|
2673
2673
|
var Ce = !!process.env.GITHUB_ACTIONS;
|
|
2674
2674
|
|
|
@@ -2837,7 +2837,8 @@ function initTTY(e = {}) {
|
|
|
2837
2837
|
|
|
2838
2838
|
function indent(e, t) {
|
|
2839
2839
|
if (e.includes("\n")) {
|
|
2840
|
-
|
|
2840
|
+
var r = e.trim().split("\n").join(text([ pe.Newline, t ]));
|
|
2841
|
+
return e.endsWith("\n") ? r + "\n" : r;
|
|
2841
2842
|
} else {
|
|
2842
2843
|
return e;
|
|
2843
2844
|
}
|
|
@@ -2933,36 +2934,44 @@ async function* run$6(e, r) {
|
|
|
2933
2934
|
throw externalError("Failed to load introspection.", e);
|
|
2934
2935
|
}
|
|
2935
2936
|
var D;
|
|
2936
|
-
try {
|
|
2937
|
-
D = t.outputIntrospectionFile(t.minifyIntrospection(s), {
|
|
2938
|
-
fileType: i.tadaOutputLocation || ".d.ts",
|
|
2939
|
-
shouldPreprocess: !r.disablePreprocessing
|
|
2940
|
-
});
|
|
2941
|
-
} catch (e) {
|
|
2942
|
-
throw externalError("Could not generate introspection output", e);
|
|
2943
|
-
}
|
|
2944
|
-
var c;
|
|
2945
2937
|
if (!r.output && e.pipeTo) {
|
|
2946
|
-
|
|
2938
|
+
D = e.pipeTo;
|
|
2947
2939
|
} else if (r.output) {
|
|
2948
|
-
|
|
2940
|
+
D = b.resolve(process.cwd(), r.output);
|
|
2949
2941
|
} else if (i.tadaOutputLocation) {
|
|
2950
|
-
|
|
2942
|
+
D = b.resolve(b.dirname(n.configPath), i.tadaOutputLocation);
|
|
2951
2943
|
} else {
|
|
2952
2944
|
throw errorMessage$1("No output path was specified to write the output file to.\n" + hint(`You have to either set ${code('"tadaOutputLocation"')} in your configuration,\npass an ${code("--output")} argument to this command,\nor pipe this command to an output file.`));
|
|
2953
2945
|
}
|
|
2946
|
+
var c;
|
|
2947
|
+
try {
|
|
2948
|
+
c = t.outputIntrospectionFile(t.minifyIntrospection(s), {
|
|
2949
|
+
fileType: D && "string" == typeof D ? D : r.forceTSFormat ? ".ts" : ".d.ts",
|
|
2950
|
+
shouldPreprocess: !r.disablePreprocessing
|
|
2951
|
+
});
|
|
2952
|
+
} catch (e) {
|
|
2953
|
+
throw externalError("Could not generate introspection output", e);
|
|
2954
|
+
}
|
|
2954
2955
|
try {
|
|
2955
|
-
await writeOutput(
|
|
2956
|
+
await writeOutput(D, c);
|
|
2956
2957
|
} catch (e) {
|
|
2957
2958
|
throw externalError("Something went wrong while writing the introspection file", e);
|
|
2958
2959
|
}
|
|
2959
|
-
yield function summary$1() {
|
|
2960
|
-
|
|
2961
|
-
|
|
2960
|
+
yield function summary$1(e) {
|
|
2961
|
+
var t = text([ cmd(ae.Style, le.BrightGreen), `${ve.Tick} Introspection output was generated successfully\n` ]);
|
|
2962
|
+
if (e) {
|
|
2963
|
+
t += hint(`The pipe output was generated in the ${code(".d.ts")} format.\nFor the ${code(".ts")} format, pass the ${code("--force-ts-format")} argument.\n`);
|
|
2964
|
+
}
|
|
2965
|
+
return t;
|
|
2966
|
+
}(!r.forceTSFormat && "string" != typeof D);
|
|
2962
2967
|
}
|
|
2963
2968
|
|
|
2964
2969
|
class GenerateOutputCommand extends Command {
|
|
2965
2970
|
static paths=[ [ "generate-output" ], [ "generate", "output" ] ];
|
|
2971
|
+
forceTSFormat=Boolean$1("--force-ts-format", !1, {
|
|
2972
|
+
description: "Forces the `.ts` output format when the output is piped",
|
|
2973
|
+
hidden: !0
|
|
2974
|
+
});
|
|
2966
2975
|
disablePreprocessing=Boolean$1("--disable-preprocessing", !1, {
|
|
2967
2976
|
description: "Disables pre-processing, which is an internal introspection format generated ahead of time"
|
|
2968
2977
|
});
|
|
@@ -2975,6 +2984,7 @@ class GenerateOutputCommand extends Command {
|
|
|
2975
2984
|
async execute() {
|
|
2976
2985
|
var e = initTTY();
|
|
2977
2986
|
var t = await e.start(run$6(e, {
|
|
2987
|
+
forceTSFormat: this.forceTSFormat,
|
|
2978
2988
|
disablePreprocessing: this.disablePreprocessing,
|
|
2979
2989
|
output: this.output,
|
|
2980
2990
|
tsconfig: this.tsconfig
|
|
@@ -3015,7 +3025,7 @@ function warningGithub$1(e) {
|
|
|
3015
3025
|
|
|
3016
3026
|
function runningPersisted(e, t) {
|
|
3017
3027
|
var r = e ? t ? `(${e}/${t})` : `(${e})` : "";
|
|
3018
|
-
return pipe(interval(150), map((e => text([ cmd(ae.Style, le.Magenta),
|
|
3028
|
+
return pipe(interval(150), map((e => text([ cmd(ae.Style, le.Magenta), me[e % me.length], " ", cmd(ae.Style, le.Foreground), `Scanning files${pe.Ellipsis} `, cmd(ae.Style, le.BrightBlack), r ]))));
|
|
3019
3029
|
}
|
|
3020
3030
|
|
|
3021
3031
|
async function* run$5(e, r) {
|
|
@@ -3061,9 +3071,9 @@ async function* run$5(e, r) {
|
|
|
3061
3071
|
D = Object.assign(D, p.documents);
|
|
3062
3072
|
if (l += p.warnings.length) {
|
|
3063
3073
|
var h = warningFile$1(p.filePath);
|
|
3064
|
-
for (var
|
|
3065
|
-
h += (
|
|
3066
|
-
warningGithub$1(
|
|
3074
|
+
for (var m of p.warnings) {
|
|
3075
|
+
h += (g = m, text([ Ee, cmd(ae.Style, le.BrightBlack), `${g.line}:${g.col}`, pe.Tab, cmd(ae.Style, le.Foreground), indent(g.message.trim(), text([ Ee, pe.Tab ])), pe.Newline ]));
|
|
3076
|
+
warningGithub$1(m);
|
|
3067
3077
|
}
|
|
3068
3078
|
yield h + "\n";
|
|
3069
3079
|
}
|
|
@@ -3074,7 +3084,7 @@ async function* run$5(e, r) {
|
|
|
3074
3084
|
} catch (e) {
|
|
3075
3085
|
throw externalError("Could not generate persisted manifest file", e);
|
|
3076
3086
|
}
|
|
3077
|
-
var
|
|
3087
|
+
var g;
|
|
3078
3088
|
var E = Object.keys(D).length;
|
|
3079
3089
|
if (l && r.failOnWarn) {
|
|
3080
3090
|
throw function warningSummary$1(e, t) {
|
|
@@ -3614,7 +3624,7 @@ function warningGithub(e) {
|
|
|
3614
3624
|
|
|
3615
3625
|
function runningTurbo(e, t) {
|
|
3616
3626
|
var r = e ? t ? `(${e}/${t})` : `(${e})` : "";
|
|
3617
|
-
return pipe(interval(150), map((e => text([ cmd(ae.Style, le.Magenta),
|
|
3627
|
+
return pipe(interval(150), map((e => text([ cmd(ae.Style, le.Magenta), me[e % me.length], " ", cmd(ae.Style, le.Foreground), `Scanning files${pe.Ellipsis} `, cmd(ae.Style, le.BrightBlack), r ]))));
|
|
3618
3628
|
}
|
|
3619
3629
|
|
|
3620
3630
|
var $e = [ "/* eslint-disable */", "/* prettier-ignore */" ].join("\n") + "\n";
|
|
@@ -3668,9 +3678,9 @@ async function* run$3(e, r) {
|
|
|
3668
3678
|
l += p.warnings.length;
|
|
3669
3679
|
if (p.warnings.length) {
|
|
3670
3680
|
var h = warningFile(p.filePath);
|
|
3671
|
-
for (var
|
|
3672
|
-
h += (
|
|
3673
|
-
warningGithub(
|
|
3681
|
+
for (var m of p.warnings) {
|
|
3682
|
+
h += (g = m, text([ xe, cmd(ae.Style, le.BrightBlack), `${g.line}:${g.col}`, pe.Tab, cmd(ae.Style, le.Foreground), indent(g.message.trim(), text([ xe, pe.Tab ])), pe.Newline ]));
|
|
3683
|
+
warningGithub(m);
|
|
3674
3684
|
}
|
|
3675
3685
|
yield h + "\n";
|
|
3676
3686
|
}
|
|
@@ -3681,7 +3691,7 @@ async function* run$3(e, r) {
|
|
|
3681
3691
|
} catch (e) {
|
|
3682
3692
|
throw externalError("Could not build cache", e);
|
|
3683
3693
|
}
|
|
3684
|
-
var
|
|
3694
|
+
var g;
|
|
3685
3695
|
var E = Object.keys(D).length;
|
|
3686
3696
|
if (l && r.failOnWarn) {
|
|
3687
3697
|
throw function warningSummary(e, t) {
|
|
@@ -3794,7 +3804,7 @@ function diagnosticMessageGithub(e) {
|
|
|
3794
3804
|
|
|
3795
3805
|
function runningDiagnostics(e, t) {
|
|
3796
3806
|
var r = e ? t ? `(${e}/${t})` : `(${e})` : "";
|
|
3797
|
-
return pipe(interval(150), map((e => text([ cmd(ae.Style, le.Magenta),
|
|
3807
|
+
return pipe(interval(150), map((e => text([ cmd(ae.Style, le.Magenta), me[e % me.length], " ", cmd(ae.Style, le.Foreground), `Checking files${pe.Ellipsis} `, cmd(ae.Style, le.BrightBlack), r ]))));
|
|
3798
3808
|
}
|
|
3799
3809
|
|
|
3800
3810
|
var isMinSeverity = (e, t) => {
|
|
@@ -3928,7 +3938,7 @@ function failedTask(e) {
|
|
|
3928
3938
|
}
|
|
3929
3939
|
|
|
3930
3940
|
function runningTask(e) {
|
|
3931
|
-
return pipe(interval(150), map((t => text([ emptyLine(), cmd(ae.Style, le.Magenta),
|
|
3941
|
+
return pipe(interval(150), map((t => text([ emptyLine(), cmd(ae.Style, le.Magenta), ge[t % ge.length], " ", cmd(ae.Style, le.Foreground), e.trim() ]))));
|
|
3932
3942
|
}
|
|
3933
3943
|
|
|
3934
3944
|
function errorMessage(e) {
|
|
@@ -4450,20 +4460,20 @@ var Ke = function tD() {
|
|
|
4450
4460
|
return r === t.length ? e : t.slice(0, r).join(" ") + t.slice(r).join("");
|
|
4451
4461
|
})(e))));
|
|
4452
4462
|
var p = [ ...D.join("\n") ];
|
|
4453
|
-
for (var [h,
|
|
4454
|
-
if (a +=
|
|
4455
|
-
var {groups:
|
|
4463
|
+
for (var [h, m] of p.entries()) {
|
|
4464
|
+
if (a += m, Ye.has(m)) {
|
|
4465
|
+
var {groups: g} = new RegExp(`(?:\\[(?<code>\\d+)m|\\${ze}(?<uri>.*))`).exec(p.slice(h).join("")) || {
|
|
4456
4466
|
groups: {}
|
|
4457
4467
|
};
|
|
4458
|
-
if (void 0 !==
|
|
4459
|
-
var E = Number.parseFloat(
|
|
4468
|
+
if (void 0 !== g.code) {
|
|
4469
|
+
var E = Number.parseFloat(g.code);
|
|
4460
4470
|
n = 39 === E ? void 0 : E;
|
|
4461
4471
|
} else {
|
|
4462
|
-
void 0 !==
|
|
4472
|
+
void 0 !== g.uri && (i = 0 === g.uri.length ? void 0 : g.uri);
|
|
4463
4473
|
}
|
|
4464
4474
|
}
|
|
4465
4475
|
var w = Ke.codes.get(Number(n));
|
|
4466
|
-
"\n" === p[h + 1] ? (i && (a += L("")), n && w && (a += N(w))) : "\n" ===
|
|
4476
|
+
"\n" === p[h + 1] ? (i && (a += L("")), n && w && (a += N(w))) : "\n" === m && (n && w && (a += N(n)),
|
|
4467
4477
|
i && (a += L(i)));
|
|
4468
4478
|
}
|
|
4469
4479
|
return a;
|
|
@@ -4737,16 +4747,16 @@ var ht;
|
|
|
4737
4747
|
|
|
4738
4748
|
var vt;
|
|
4739
4749
|
|
|
4740
|
-
var gt;
|
|
4741
|
-
|
|
4742
4750
|
var mt;
|
|
4743
4751
|
|
|
4752
|
+
var gt;
|
|
4753
|
+
|
|
4744
4754
|
if ("win32" === process.platform || global.TESTING_WINDOWS) {
|
|
4745
|
-
|
|
4746
|
-
if (
|
|
4755
|
+
gt = function requireWindows() {
|
|
4756
|
+
if (mt) {
|
|
4747
4757
|
return vt;
|
|
4748
4758
|
}
|
|
4749
|
-
|
|
4759
|
+
mt = 1;
|
|
4750
4760
|
vt = isexe;
|
|
4751
4761
|
isexe.sync = function sync(t, r) {
|
|
4752
4762
|
return checkStat(e.statSync(t), t, r);
|
|
@@ -4781,7 +4791,7 @@ if ("win32" === process.platform || global.TESTING_WINDOWS) {
|
|
|
4781
4791
|
return vt;
|
|
4782
4792
|
}();
|
|
4783
4793
|
} else {
|
|
4784
|
-
|
|
4794
|
+
gt = function requireMode() {
|
|
4785
4795
|
if (ht) {
|
|
4786
4796
|
return pt;
|
|
4787
4797
|
}
|
|
@@ -4816,7 +4826,7 @@ var Ct = isexe$1;
|
|
|
4816
4826
|
|
|
4817
4827
|
isexe$1.sync = function sync(e, t) {
|
|
4818
4828
|
try {
|
|
4819
|
-
return
|
|
4829
|
+
return gt.sync(e, t || {});
|
|
4820
4830
|
} catch (e) {
|
|
4821
4831
|
if (t && t.ignoreErrors || "EACCES" === e.code) {
|
|
4822
4832
|
return !1;
|
|
@@ -4845,7 +4855,7 @@ function isexe$1(e, t, r) {
|
|
|
4845
4855
|
}));
|
|
4846
4856
|
}));
|
|
4847
4857
|
}
|
|
4848
|
-
|
|
4858
|
+
gt(e, t || {}, (function(e, n) {
|
|
4849
4859
|
if (e) {
|
|
4850
4860
|
if ("EACCES" === e.code || t && t.ignoreErrors) {
|
|
4851
4861
|
e = null;
|
|
@@ -5621,8 +5631,8 @@ var findSignalByNumber = (e, t) => {
|
|
|
5621
5631
|
})();
|
|
5622
5632
|
|
|
5623
5633
|
var makeError = ({stdout: e, stderr: t, all: r, error: n, signal: i, exitCode: s, command: D, escapedCommand: c, timedOut: l, isCanceled: d, killed: f, parsed: {options: {timeout: p, cwd: h = a.cwd()}}}) => {
|
|
5624
|
-
var
|
|
5625
|
-
var
|
|
5634
|
+
var m = void 0 === (i = null === i ? void 0 : i) ? void 0 : Qt[i].description;
|
|
5635
|
+
var g = (({timedOut: e, timeout: t, errorCode: r, signal: n, signalDescription: i, exitCode: a, isCanceled: s}) => {
|
|
5626
5636
|
if (e) {
|
|
5627
5637
|
return `timed out after ${t} milliseconds`;
|
|
5628
5638
|
}
|
|
@@ -5644,11 +5654,11 @@ var makeError = ({stdout: e, stderr: t, all: r, error: n, signal: i, exitCode: s
|
|
|
5644
5654
|
timeout: p,
|
|
5645
5655
|
errorCode: n && n.code,
|
|
5646
5656
|
signal: i,
|
|
5647
|
-
signalDescription:
|
|
5657
|
+
signalDescription: m,
|
|
5648
5658
|
exitCode: s = null === s ? void 0 : s,
|
|
5649
5659
|
isCanceled: d
|
|
5650
5660
|
});
|
|
5651
|
-
var E = `Command ${
|
|
5661
|
+
var E = `Command ${g}: ${D}`;
|
|
5652
5662
|
var w = "[object Error]" === Object.prototype.toString.call(n);
|
|
5653
5663
|
var b = w ? `${E}\n${n.message}` : E;
|
|
5654
5664
|
var B = [ b, t, e ].filter(Boolean).join("\n");
|
|
@@ -5663,7 +5673,7 @@ var makeError = ({stdout: e, stderr: t, all: r, error: n, signal: i, exitCode: s
|
|
|
5663
5673
|
n.escapedCommand = c;
|
|
5664
5674
|
n.exitCode = s;
|
|
5665
5675
|
n.signal = i;
|
|
5666
|
-
n.signalDescription =
|
|
5676
|
+
n.signalDescription = m;
|
|
5667
5677
|
n.stdout = e;
|
|
5668
5678
|
n.stderr = t;
|
|
5669
5679
|
n.cwd = h;
|
|
@@ -5994,7 +6004,7 @@ function isWritableStream(e) {
|
|
|
5994
6004
|
|
|
5995
6005
|
var pipeToTarget = (e, t, r) => {
|
|
5996
6006
|
if ("string" == typeof r) {
|
|
5997
|
-
e[t].pipe(
|
|
6007
|
+
e[t].pipe(m.createWriteStream(r));
|
|
5998
6008
|
return e;
|
|
5999
6009
|
}
|
|
6000
6010
|
if (isWritableStream(r)) {
|
|
@@ -6278,7 +6288,7 @@ var getInput = ({input: e, inputFile: t}) => {
|
|
|
6278
6288
|
throw new TypeError("The `input` and `inputFile` options cannot be both set.");
|
|
6279
6289
|
}
|
|
6280
6290
|
})(e);
|
|
6281
|
-
return
|
|
6291
|
+
return m.createReadStream(t);
|
|
6282
6292
|
};
|
|
6283
6293
|
|
|
6284
6294
|
var handleInput = (e, t) => {
|
|
@@ -6311,7 +6321,7 @@ var getBufferedData = async (e, t) => {
|
|
|
6311
6321
|
if (!e || void 0 === t) {
|
|
6312
6322
|
return;
|
|
6313
6323
|
}
|
|
6314
|
-
await
|
|
6324
|
+
await g.setTimeout(0);
|
|
6315
6325
|
e.destroy();
|
|
6316
6326
|
try {
|
|
6317
6327
|
return await t;
|
|
@@ -6411,18 +6421,18 @@ var normalizeArgs = (e, t = []) => {
|
|
|
6411
6421
|
return [ e, ...t ];
|
|
6412
6422
|
};
|
|
6413
6423
|
|
|
6414
|
-
var
|
|
6424
|
+
var mr = /^[\w.-]+$/;
|
|
6415
6425
|
|
|
6416
6426
|
var joinCommand = (e, t) => normalizeArgs(e, t).join(" ");
|
|
6417
6427
|
|
|
6418
6428
|
var getEscapedCommand = (e, t) => normalizeArgs(e, t).map((e => (e => {
|
|
6419
|
-
if ("string" != typeof e ||
|
|
6429
|
+
if ("string" != typeof e || mr.test(e)) {
|
|
6420
6430
|
return e;
|
|
6421
6431
|
}
|
|
6422
6432
|
return `"${e.replaceAll('"', '\\"')}"`;
|
|
6423
6433
|
})(e))).join(" ");
|
|
6424
6434
|
|
|
6425
|
-
var
|
|
6435
|
+
var gr = w.debuglog("execa").enabled;
|
|
6426
6436
|
|
|
6427
6437
|
var padField = (e, t) => String(e).padStart(t, "0");
|
|
6428
6438
|
|
|
@@ -6451,7 +6461,7 @@ var handleArguments = (t, r, n = {}) => {
|
|
|
6451
6461
|
cleanup: !0,
|
|
6452
6462
|
all: !1,
|
|
6453
6463
|
windowsHide: !0,
|
|
6454
|
-
verbose:
|
|
6464
|
+
verbose: gr,
|
|
6455
6465
|
...n
|
|
6456
6466
|
}).env = (({env: e, extendEnv: t, preferLocal: r, localDir: n, execPath: i}) => {
|
|
6457
6467
|
var s = t ? {
|
|
@@ -6536,15 +6546,15 @@ function execa(e, t, r) {
|
|
|
6536
6546
|
var [{error: e, exitCode: t, signal: r, timedOut: D}, c, l, d] = await getSpawnedResult(s, n.options, p);
|
|
6537
6547
|
var f = handleOutput(n.options, c);
|
|
6538
6548
|
var h = handleOutput(n.options, l);
|
|
6539
|
-
var
|
|
6549
|
+
var m = handleOutput(n.options, d);
|
|
6540
6550
|
if (e || 0 !== t || null !== r) {
|
|
6541
|
-
var
|
|
6551
|
+
var g = makeError({
|
|
6542
6552
|
error: e,
|
|
6543
6553
|
exitCode: t,
|
|
6544
6554
|
signal: r,
|
|
6545
6555
|
stdout: f,
|
|
6546
6556
|
stderr: h,
|
|
6547
|
-
all:
|
|
6557
|
+
all: m,
|
|
6548
6558
|
command: i,
|
|
6549
6559
|
escapedCommand: a,
|
|
6550
6560
|
parsed: n,
|
|
@@ -6553,9 +6563,9 @@ function execa(e, t, r) {
|
|
|
6553
6563
|
killed: s.killed
|
|
6554
6564
|
});
|
|
6555
6565
|
if (!n.options.reject) {
|
|
6556
|
-
return
|
|
6566
|
+
return g;
|
|
6557
6567
|
}
|
|
6558
|
-
throw
|
|
6568
|
+
throw g;
|
|
6559
6569
|
}
|
|
6560
6570
|
return {
|
|
6561
6571
|
command: i,
|
|
@@ -6563,7 +6573,7 @@ function execa(e, t, r) {
|
|
|
6563
6573
|
exitCode: 0,
|
|
6564
6574
|
stdout: f,
|
|
6565
6575
|
stderr: h,
|
|
6566
|
-
all:
|
|
6576
|
+
all: m,
|
|
6567
6577
|
failed: !1,
|
|
6568
6578
|
timedOut: !1,
|
|
6569
6579
|
isCanceled: !1,
|