@simon_he/pi 0.0.92 → 0.0.94
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.cjs +219 -204
- package/dist/index.d.ts +2 -2
- package/dist/index.js +182 -175
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -61,20 +61,19 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
63
|
|
|
64
|
-
// node_modules/picocolors/picocolors.js
|
|
64
|
+
// node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
|
65
65
|
var require_picocolors = __commonJS({
|
|
66
|
-
"node_modules/picocolors/picocolors.js"(exports, module2) {
|
|
67
|
-
var
|
|
68
|
-
var
|
|
69
|
-
var
|
|
66
|
+
"node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(exports, module2) {
|
|
67
|
+
var p = process || {};
|
|
68
|
+
var argv = p.argv || [];
|
|
69
|
+
var env3 = p.env || {};
|
|
70
|
+
var isColorSupported = !(!!env3.NO_COLOR || argv.includes("--no-color")) && (!!env3.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env3.TERM !== "dumb" || !!env3.CI);
|
|
70
71
|
var formatter = (open, close, replace = open) => (input) => {
|
|
71
|
-
let string = "" + input;
|
|
72
|
-
let index = string.indexOf(close, open.length);
|
|
72
|
+
let string = "" + input, index = string.indexOf(close, open.length);
|
|
73
73
|
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
74
74
|
};
|
|
75
75
|
var replaceClose = (string, close, replace, index) => {
|
|
76
|
-
let result = "";
|
|
77
|
-
let cursor = 0;
|
|
76
|
+
let result = "", cursor = 0;
|
|
78
77
|
do {
|
|
79
78
|
result += string.substring(cursor, index) + replace;
|
|
80
79
|
cursor = index + close.length;
|
|
@@ -83,50 +82,50 @@ var require_picocolors = __commonJS({
|
|
|
83
82
|
return result + string.substring(cursor);
|
|
84
83
|
};
|
|
85
84
|
var createColors = (enabled = isColorSupported) => {
|
|
86
|
-
let
|
|
85
|
+
let f = enabled ? formatter : () => String;
|
|
87
86
|
return {
|
|
88
87
|
isColorSupported: enabled,
|
|
89
|
-
reset:
|
|
90
|
-
bold:
|
|
91
|
-
dim:
|
|
92
|
-
italic:
|
|
93
|
-
underline:
|
|
94
|
-
inverse:
|
|
95
|
-
hidden:
|
|
96
|
-
strikethrough:
|
|
97
|
-
black:
|
|
98
|
-
red:
|
|
99
|
-
green:
|
|
100
|
-
yellow:
|
|
101
|
-
blue:
|
|
102
|
-
magenta:
|
|
103
|
-
cyan:
|
|
104
|
-
white:
|
|
105
|
-
gray:
|
|
106
|
-
bgBlack:
|
|
107
|
-
bgRed:
|
|
108
|
-
bgGreen:
|
|
109
|
-
bgYellow:
|
|
110
|
-
bgBlue:
|
|
111
|
-
bgMagenta:
|
|
112
|
-
bgCyan:
|
|
113
|
-
bgWhite:
|
|
114
|
-
blackBright:
|
|
115
|
-
redBright:
|
|
116
|
-
greenBright:
|
|
117
|
-
yellowBright:
|
|
118
|
-
blueBright:
|
|
119
|
-
magentaBright:
|
|
120
|
-
cyanBright:
|
|
121
|
-
whiteBright:
|
|
122
|
-
bgBlackBright:
|
|
123
|
-
bgRedBright:
|
|
124
|
-
bgGreenBright:
|
|
125
|
-
bgYellowBright:
|
|
126
|
-
bgBlueBright:
|
|
127
|
-
bgMagentaBright:
|
|
128
|
-
bgCyanBright:
|
|
129
|
-
bgWhiteBright:
|
|
88
|
+
reset: f("\x1B[0m", "\x1B[0m"),
|
|
89
|
+
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
90
|
+
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
91
|
+
italic: f("\x1B[3m", "\x1B[23m"),
|
|
92
|
+
underline: f("\x1B[4m", "\x1B[24m"),
|
|
93
|
+
inverse: f("\x1B[7m", "\x1B[27m"),
|
|
94
|
+
hidden: f("\x1B[8m", "\x1B[28m"),
|
|
95
|
+
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
|
96
|
+
black: f("\x1B[30m", "\x1B[39m"),
|
|
97
|
+
red: f("\x1B[31m", "\x1B[39m"),
|
|
98
|
+
green: f("\x1B[32m", "\x1B[39m"),
|
|
99
|
+
yellow: f("\x1B[33m", "\x1B[39m"),
|
|
100
|
+
blue: f("\x1B[34m", "\x1B[39m"),
|
|
101
|
+
magenta: f("\x1B[35m", "\x1B[39m"),
|
|
102
|
+
cyan: f("\x1B[36m", "\x1B[39m"),
|
|
103
|
+
white: f("\x1B[37m", "\x1B[39m"),
|
|
104
|
+
gray: f("\x1B[90m", "\x1B[39m"),
|
|
105
|
+
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
|
106
|
+
bgRed: f("\x1B[41m", "\x1B[49m"),
|
|
107
|
+
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
|
108
|
+
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
|
109
|
+
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
|
110
|
+
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
|
111
|
+
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
|
112
|
+
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
|
113
|
+
blackBright: f("\x1B[90m", "\x1B[39m"),
|
|
114
|
+
redBright: f("\x1B[91m", "\x1B[39m"),
|
|
115
|
+
greenBright: f("\x1B[92m", "\x1B[39m"),
|
|
116
|
+
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
|
117
|
+
blueBright: f("\x1B[94m", "\x1B[39m"),
|
|
118
|
+
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
|
119
|
+
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
|
120
|
+
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
|
121
|
+
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
|
122
|
+
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
|
123
|
+
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
|
124
|
+
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
|
125
|
+
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
|
126
|
+
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
|
127
|
+
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
|
128
|
+
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
|
130
129
|
};
|
|
131
130
|
};
|
|
132
131
|
module2.exports = createColors();
|
|
@@ -134,9 +133,9 @@ var require_picocolors = __commonJS({
|
|
|
134
133
|
}
|
|
135
134
|
});
|
|
136
135
|
|
|
137
|
-
// node_modules/
|
|
136
|
+
// node_modules/.pnpm/mimic-fn@2.1.0/node_modules/mimic-fn/index.js
|
|
138
137
|
var require_mimic_fn = __commonJS({
|
|
139
|
-
"node_modules/
|
|
138
|
+
"node_modules/.pnpm/mimic-fn@2.1.0/node_modules/mimic-fn/index.js"(exports, module2) {
|
|
140
139
|
"use strict";
|
|
141
140
|
var mimicFn = (to, from) => {
|
|
142
141
|
for (const prop of Reflect.ownKeys(from)) {
|
|
@@ -149,9 +148,9 @@ var require_mimic_fn = __commonJS({
|
|
|
149
148
|
}
|
|
150
149
|
});
|
|
151
150
|
|
|
152
|
-
// node_modules/
|
|
151
|
+
// node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js
|
|
153
152
|
var require_onetime = __commonJS({
|
|
154
|
-
"node_modules/
|
|
153
|
+
"node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js"(exports, module2) {
|
|
155
154
|
"use strict";
|
|
156
155
|
var mimicFn = require_mimic_fn();
|
|
157
156
|
var calledFunctions = /* @__PURE__ */ new WeakMap();
|
|
@@ -187,9 +186,9 @@ var require_onetime = __commonJS({
|
|
|
187
186
|
}
|
|
188
187
|
});
|
|
189
188
|
|
|
190
|
-
// node_modules/signal-exit/signals.js
|
|
189
|
+
// node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js
|
|
191
190
|
var require_signals = __commonJS({
|
|
192
|
-
"node_modules/signal-exit/signals.js"(exports, module2) {
|
|
191
|
+
"node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js"(exports, module2) {
|
|
193
192
|
module2.exports = [
|
|
194
193
|
"SIGABRT",
|
|
195
194
|
"SIGALRM",
|
|
@@ -224,9 +223,9 @@ var require_signals = __commonJS({
|
|
|
224
223
|
}
|
|
225
224
|
});
|
|
226
225
|
|
|
227
|
-
// node_modules/signal-exit/index.js
|
|
226
|
+
// node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js
|
|
228
227
|
var require_signal_exit = __commonJS({
|
|
229
|
-
"node_modules/signal-exit/index.js"(exports, module2) {
|
|
228
|
+
"node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js"(exports, module2) {
|
|
230
229
|
var process13 = global.process;
|
|
231
230
|
var processOk = function(process14) {
|
|
232
231
|
return process14 && typeof process14 === "object" && typeof process14.removeListener === "function" && typeof process14.emit === "function" && typeof process14.reallyExit === "function" && typeof process14.listeners === "function" && typeof process14.kill === "function" && typeof process14.pid === "number" && typeof process14.on === "function";
|
|
@@ -383,9 +382,9 @@ var require_signal_exit = __commonJS({
|
|
|
383
382
|
}
|
|
384
383
|
});
|
|
385
384
|
|
|
386
|
-
// node_modules/cli-spinners/spinners.json
|
|
385
|
+
// node_modules/.pnpm/cli-spinners@2.9.1/node_modules/cli-spinners/spinners.json
|
|
387
386
|
var require_spinners = __commonJS({
|
|
388
|
-
"node_modules/cli-spinners/spinners.json"(exports, module2) {
|
|
387
|
+
"node_modules/.pnpm/cli-spinners@2.9.1/node_modules/cli-spinners/spinners.json"(exports, module2) {
|
|
389
388
|
module2.exports = {
|
|
390
389
|
dots: {
|
|
391
390
|
interval: 80,
|
|
@@ -2011,9 +2010,9 @@ var require_spinners = __commonJS({
|
|
|
2011
2010
|
}
|
|
2012
2011
|
});
|
|
2013
2012
|
|
|
2014
|
-
// node_modules/cli-spinners/index.js
|
|
2013
|
+
// node_modules/.pnpm/cli-spinners@2.9.1/node_modules/cli-spinners/index.js
|
|
2015
2014
|
var require_cli_spinners = __commonJS({
|
|
2016
|
-
"node_modules/cli-spinners/index.js"(exports, module2) {
|
|
2015
|
+
"node_modules/.pnpm/cli-spinners@2.9.1/node_modules/cli-spinners/index.js"(exports, module2) {
|
|
2017
2016
|
"use strict";
|
|
2018
2017
|
var spinners = Object.assign({}, require_spinners());
|
|
2019
2018
|
var spinnersList = Object.keys(spinners);
|
|
@@ -2028,9 +2027,9 @@ var require_cli_spinners = __commonJS({
|
|
|
2028
2027
|
}
|
|
2029
2028
|
});
|
|
2030
2029
|
|
|
2031
|
-
// node_modules/clone/clone.js
|
|
2030
|
+
// node_modules/.pnpm/clone@1.0.4/node_modules/clone/clone.js
|
|
2032
2031
|
var require_clone = __commonJS({
|
|
2033
|
-
"node_modules/clone/clone.js"(exports, module2) {
|
|
2032
|
+
"node_modules/.pnpm/clone@1.0.4/node_modules/clone/clone.js"(exports, module2) {
|
|
2034
2033
|
var clone = function() {
|
|
2035
2034
|
"use strict";
|
|
2036
2035
|
function clone2(parent, circular, depth, prototype) {
|
|
@@ -2153,9 +2152,9 @@ var require_clone = __commonJS({
|
|
|
2153
2152
|
}
|
|
2154
2153
|
});
|
|
2155
2154
|
|
|
2156
|
-
// node_modules/defaults/index.js
|
|
2155
|
+
// node_modules/.pnpm/defaults@1.0.4/node_modules/defaults/index.js
|
|
2157
2156
|
var require_defaults = __commonJS({
|
|
2158
|
-
"node_modules/defaults/index.js"(exports, module2) {
|
|
2157
|
+
"node_modules/.pnpm/defaults@1.0.4/node_modules/defaults/index.js"(exports, module2) {
|
|
2159
2158
|
var clone = require_clone();
|
|
2160
2159
|
module2.exports = function(options, defaults) {
|
|
2161
2160
|
options = options || {};
|
|
@@ -2169,9 +2168,9 @@ var require_defaults = __commonJS({
|
|
|
2169
2168
|
}
|
|
2170
2169
|
});
|
|
2171
2170
|
|
|
2172
|
-
// node_modules/wcwidth/combining.js
|
|
2171
|
+
// node_modules/.pnpm/wcwidth@1.0.1/node_modules/wcwidth/combining.js
|
|
2173
2172
|
var require_combining = __commonJS({
|
|
2174
|
-
"node_modules/wcwidth/combining.js"(exports, module2) {
|
|
2173
|
+
"node_modules/.pnpm/wcwidth@1.0.1/node_modules/wcwidth/combining.js"(exports, module2) {
|
|
2175
2174
|
module2.exports = [
|
|
2176
2175
|
[768, 879],
|
|
2177
2176
|
[1155, 1158],
|
|
@@ -2319,9 +2318,9 @@ var require_combining = __commonJS({
|
|
|
2319
2318
|
}
|
|
2320
2319
|
});
|
|
2321
2320
|
|
|
2322
|
-
// node_modules/wcwidth/index.js
|
|
2321
|
+
// node_modules/.pnpm/wcwidth@1.0.1/node_modules/wcwidth/index.js
|
|
2323
2322
|
var require_wcwidth = __commonJS({
|
|
2324
|
-
"node_modules/wcwidth/index.js"(exports, module2) {
|
|
2323
|
+
"node_modules/.pnpm/wcwidth@1.0.1/node_modules/wcwidth/index.js"(exports, module2) {
|
|
2325
2324
|
"use strict";
|
|
2326
2325
|
var defaults = require_defaults();
|
|
2327
2326
|
var combining = require_combining();
|
|
@@ -2386,16 +2385,16 @@ var require_wcwidth = __commonJS({
|
|
|
2386
2385
|
}
|
|
2387
2386
|
});
|
|
2388
2387
|
|
|
2389
|
-
// node_modules/readable-stream/lib/internal/streams/stream.js
|
|
2388
|
+
// node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/stream.js
|
|
2390
2389
|
var require_stream = __commonJS({
|
|
2391
|
-
"node_modules/readable-stream/lib/internal/streams/stream.js"(exports, module2) {
|
|
2390
|
+
"node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/stream.js"(exports, module2) {
|
|
2392
2391
|
module2.exports = require("stream");
|
|
2393
2392
|
}
|
|
2394
2393
|
});
|
|
2395
2394
|
|
|
2396
|
-
// node_modules/readable-stream/lib/internal/streams/buffer_list.js
|
|
2395
|
+
// node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/buffer_list.js
|
|
2397
2396
|
var require_buffer_list = __commonJS({
|
|
2398
|
-
"node_modules/readable-stream/lib/internal/streams/buffer_list.js"(exports, module2) {
|
|
2397
|
+
"node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/buffer_list.js"(exports, module2) {
|
|
2399
2398
|
"use strict";
|
|
2400
2399
|
function ownKeys(object, enumerableOnly) {
|
|
2401
2400
|
var keys = Object.keys(object);
|
|
@@ -2655,9 +2654,9 @@ var require_buffer_list = __commonJS({
|
|
|
2655
2654
|
}
|
|
2656
2655
|
});
|
|
2657
2656
|
|
|
2658
|
-
// node_modules/readable-stream/lib/internal/streams/destroy.js
|
|
2657
|
+
// node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/destroy.js
|
|
2659
2658
|
var require_destroy = __commonJS({
|
|
2660
|
-
"node_modules/readable-stream/lib/internal/streams/destroy.js"(exports, module2) {
|
|
2659
|
+
"node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/destroy.js"(exports, module2) {
|
|
2661
2660
|
"use strict";
|
|
2662
2661
|
function destroy(err, cb) {
|
|
2663
2662
|
var _this = this;
|
|
@@ -2748,9 +2747,9 @@ var require_destroy = __commonJS({
|
|
|
2748
2747
|
}
|
|
2749
2748
|
});
|
|
2750
2749
|
|
|
2751
|
-
// node_modules/readable-stream/errors.js
|
|
2750
|
+
// node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/errors.js
|
|
2752
2751
|
var require_errors = __commonJS({
|
|
2753
|
-
"node_modules/readable-stream/errors.js"(exports, module2) {
|
|
2752
|
+
"node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/errors.js"(exports, module2) {
|
|
2754
2753
|
"use strict";
|
|
2755
2754
|
var codes = {};
|
|
2756
2755
|
function createErrorType(code, message, Base) {
|
|
@@ -2848,9 +2847,9 @@ var require_errors = __commonJS({
|
|
|
2848
2847
|
}
|
|
2849
2848
|
});
|
|
2850
2849
|
|
|
2851
|
-
// node_modules/readable-stream/lib/internal/streams/state.js
|
|
2850
|
+
// node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/state.js
|
|
2852
2851
|
var require_state = __commonJS({
|
|
2853
|
-
"node_modules/readable-stream/lib/internal/streams/state.js"(exports, module2) {
|
|
2852
|
+
"node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/state.js"(exports, module2) {
|
|
2854
2853
|
"use strict";
|
|
2855
2854
|
var ERR_INVALID_OPT_VALUE = require_errors().codes.ERR_INVALID_OPT_VALUE;
|
|
2856
2855
|
function highWaterMarkFrom(options, isDuplex, duplexKey) {
|
|
@@ -2873,9 +2872,9 @@ var require_state = __commonJS({
|
|
|
2873
2872
|
}
|
|
2874
2873
|
});
|
|
2875
2874
|
|
|
2876
|
-
// node_modules/inherits/inherits_browser.js
|
|
2875
|
+
// node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js
|
|
2877
2876
|
var require_inherits_browser = __commonJS({
|
|
2878
|
-
"node_modules/inherits/inherits_browser.js"(exports, module2) {
|
|
2877
|
+
"node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"(exports, module2) {
|
|
2879
2878
|
if (typeof Object.create === "function") {
|
|
2880
2879
|
module2.exports = function inherits(ctor, superCtor) {
|
|
2881
2880
|
if (superCtor) {
|
|
@@ -2905,9 +2904,9 @@ var require_inherits_browser = __commonJS({
|
|
|
2905
2904
|
}
|
|
2906
2905
|
});
|
|
2907
2906
|
|
|
2908
|
-
// node_modules/inherits/inherits.js
|
|
2907
|
+
// node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits.js
|
|
2909
2908
|
var require_inherits = __commonJS({
|
|
2910
|
-
"node_modules/inherits/inherits.js"(exports, module2) {
|
|
2909
|
+
"node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits.js"(exports, module2) {
|
|
2911
2910
|
try {
|
|
2912
2911
|
util = require("util");
|
|
2913
2912
|
if (typeof util.inherits !== "function")
|
|
@@ -2920,16 +2919,16 @@ var require_inherits = __commonJS({
|
|
|
2920
2919
|
}
|
|
2921
2920
|
});
|
|
2922
2921
|
|
|
2923
|
-
// node_modules/util-deprecate/node.js
|
|
2922
|
+
// node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/node.js
|
|
2924
2923
|
var require_node = __commonJS({
|
|
2925
|
-
"node_modules/util-deprecate/node.js"(exports, module2) {
|
|
2924
|
+
"node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/node.js"(exports, module2) {
|
|
2926
2925
|
module2.exports = require("util").deprecate;
|
|
2927
2926
|
}
|
|
2928
2927
|
});
|
|
2929
2928
|
|
|
2930
|
-
// node_modules/readable-stream/lib/_stream_writable.js
|
|
2929
|
+
// node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_writable.js
|
|
2931
2930
|
var require_stream_writable = __commonJS({
|
|
2932
|
-
"node_modules/readable-stream/lib/_stream_writable.js"(exports, module2) {
|
|
2931
|
+
"node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_writable.js"(exports, module2) {
|
|
2933
2932
|
"use strict";
|
|
2934
2933
|
module2.exports = Writable;
|
|
2935
2934
|
function CorkedRequest(state) {
|
|
@@ -3427,9 +3426,9 @@ var require_stream_writable = __commonJS({
|
|
|
3427
3426
|
}
|
|
3428
3427
|
});
|
|
3429
3428
|
|
|
3430
|
-
// node_modules/readable-stream/lib/_stream_duplex.js
|
|
3429
|
+
// node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_duplex.js
|
|
3431
3430
|
var require_stream_duplex = __commonJS({
|
|
3432
|
-
"node_modules/readable-stream/lib/_stream_duplex.js"(exports, module2) {
|
|
3431
|
+
"node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_duplex.js"(exports, module2) {
|
|
3433
3432
|
"use strict";
|
|
3434
3433
|
var objectKeys = Object.keys || function(obj) {
|
|
3435
3434
|
var keys2 = [];
|
|
@@ -3526,9 +3525,9 @@ var require_stream_duplex = __commonJS({
|
|
|
3526
3525
|
}
|
|
3527
3526
|
});
|
|
3528
3527
|
|
|
3529
|
-
// node_modules/safe-buffer/index.js
|
|
3528
|
+
// node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js
|
|
3530
3529
|
var require_safe_buffer = __commonJS({
|
|
3531
|
-
"node_modules/safe-buffer/index.js"(exports, module2) {
|
|
3530
|
+
"node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js"(exports, module2) {
|
|
3532
3531
|
var buffer = require("buffer");
|
|
3533
3532
|
var Buffer2 = buffer.Buffer;
|
|
3534
3533
|
function copyProps(src, dst) {
|
|
@@ -3584,9 +3583,9 @@ var require_safe_buffer = __commonJS({
|
|
|
3584
3583
|
}
|
|
3585
3584
|
});
|
|
3586
3585
|
|
|
3587
|
-
// node_modules/string_decoder/lib/string_decoder.js
|
|
3586
|
+
// node_modules/.pnpm/string_decoder@1.3.0/node_modules/string_decoder/lib/string_decoder.js
|
|
3588
3587
|
var require_string_decoder = __commonJS({
|
|
3589
|
-
"node_modules/string_decoder/lib/string_decoder.js"(exports) {
|
|
3588
|
+
"node_modules/.pnpm/string_decoder@1.3.0/node_modules/string_decoder/lib/string_decoder.js"(exports) {
|
|
3590
3589
|
"use strict";
|
|
3591
3590
|
var Buffer2 = require_safe_buffer().Buffer;
|
|
3592
3591
|
var isEncoding = Buffer2.isEncoding || function(encoding) {
|
|
@@ -3844,9 +3843,9 @@ var require_string_decoder = __commonJS({
|
|
|
3844
3843
|
}
|
|
3845
3844
|
});
|
|
3846
3845
|
|
|
3847
|
-
// node_modules/readable-stream/lib/internal/streams/end-of-stream.js
|
|
3846
|
+
// node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/end-of-stream.js
|
|
3848
3847
|
var require_end_of_stream = __commonJS({
|
|
3849
|
-
"node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(exports, module2) {
|
|
3848
|
+
"node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(exports, module2) {
|
|
3850
3849
|
"use strict";
|
|
3851
3850
|
var ERR_STREAM_PREMATURE_CLOSE = require_errors().codes.ERR_STREAM_PREMATURE_CLOSE;
|
|
3852
3851
|
function once(callback) {
|
|
@@ -3945,9 +3944,9 @@ var require_end_of_stream = __commonJS({
|
|
|
3945
3944
|
}
|
|
3946
3945
|
});
|
|
3947
3946
|
|
|
3948
|
-
// node_modules/readable-stream/lib/internal/streams/async_iterator.js
|
|
3947
|
+
// node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/async_iterator.js
|
|
3949
3948
|
var require_async_iterator = __commonJS({
|
|
3950
|
-
"node_modules/readable-stream/lib/internal/streams/async_iterator.js"(exports, module2) {
|
|
3949
|
+
"node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/async_iterator.js"(exports, module2) {
|
|
3951
3950
|
"use strict";
|
|
3952
3951
|
var _Object$setPrototypeO;
|
|
3953
3952
|
function _defineProperty(obj, key, value) {
|
|
@@ -4130,9 +4129,9 @@ var require_async_iterator = __commonJS({
|
|
|
4130
4129
|
}
|
|
4131
4130
|
});
|
|
4132
4131
|
|
|
4133
|
-
// node_modules/readable-stream/lib/internal/streams/from.js
|
|
4132
|
+
// node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/from.js
|
|
4134
4133
|
var require_from = __commonJS({
|
|
4135
|
-
"node_modules/readable-stream/lib/internal/streams/from.js"(exports, module2) {
|
|
4134
|
+
"node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/from.js"(exports, module2) {
|
|
4136
4135
|
"use strict";
|
|
4137
4136
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
4138
4137
|
try {
|
|
@@ -4256,9 +4255,9 @@ var require_from = __commonJS({
|
|
|
4256
4255
|
}
|
|
4257
4256
|
});
|
|
4258
4257
|
|
|
4259
|
-
// node_modules/readable-stream/lib/_stream_readable.js
|
|
4258
|
+
// node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_readable.js
|
|
4260
4259
|
var require_stream_readable = __commonJS({
|
|
4261
|
-
"node_modules/readable-stream/lib/_stream_readable.js"(exports, module2) {
|
|
4260
|
+
"node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_readable.js"(exports, module2) {
|
|
4262
4261
|
"use strict";
|
|
4263
4262
|
module2.exports = Readable;
|
|
4264
4263
|
var Duplex;
|
|
@@ -5052,9 +5051,9 @@ var require_stream_readable = __commonJS({
|
|
|
5052
5051
|
}
|
|
5053
5052
|
});
|
|
5054
5053
|
|
|
5055
|
-
// node_modules/readable-stream/lib/_stream_transform.js
|
|
5054
|
+
// node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_transform.js
|
|
5056
5055
|
var require_stream_transform = __commonJS({
|
|
5057
|
-
"node_modules/readable-stream/lib/_stream_transform.js"(exports, module2) {
|
|
5056
|
+
"node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_transform.js"(exports, module2) {
|
|
5058
5057
|
"use strict";
|
|
5059
5058
|
module2.exports = Transform;
|
|
5060
5059
|
var _require$codes = require_errors().codes;
|
|
@@ -5160,9 +5159,9 @@ var require_stream_transform = __commonJS({
|
|
|
5160
5159
|
}
|
|
5161
5160
|
});
|
|
5162
5161
|
|
|
5163
|
-
// node_modules/readable-stream/lib/_stream_passthrough.js
|
|
5162
|
+
// node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_passthrough.js
|
|
5164
5163
|
var require_stream_passthrough = __commonJS({
|
|
5165
|
-
"node_modules/readable-stream/lib/_stream_passthrough.js"(exports, module2) {
|
|
5164
|
+
"node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_passthrough.js"(exports, module2) {
|
|
5166
5165
|
"use strict";
|
|
5167
5166
|
module2.exports = PassThrough;
|
|
5168
5167
|
var Transform = require_stream_transform();
|
|
@@ -5178,9 +5177,9 @@ var require_stream_passthrough = __commonJS({
|
|
|
5178
5177
|
}
|
|
5179
5178
|
});
|
|
5180
5179
|
|
|
5181
|
-
// node_modules/readable-stream/lib/internal/streams/pipeline.js
|
|
5180
|
+
// node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/pipeline.js
|
|
5182
5181
|
var require_pipeline = __commonJS({
|
|
5183
|
-
"node_modules/readable-stream/lib/internal/streams/pipeline.js"(exports, module2) {
|
|
5182
|
+
"node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/pipeline.js"(exports, module2) {
|
|
5184
5183
|
"use strict";
|
|
5185
5184
|
var eos;
|
|
5186
5185
|
function once(callback) {
|
|
@@ -5277,9 +5276,9 @@ var require_pipeline = __commonJS({
|
|
|
5277
5276
|
}
|
|
5278
5277
|
});
|
|
5279
5278
|
|
|
5280
|
-
// node_modules/readable-stream/readable.js
|
|
5279
|
+
// node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/readable.js
|
|
5281
5280
|
var require_readable = __commonJS({
|
|
5282
|
-
"node_modules/readable-stream/readable.js"(exports, module2) {
|
|
5281
|
+
"node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/readable.js"(exports, module2) {
|
|
5283
5282
|
var Stream = require("stream");
|
|
5284
5283
|
if (process.env.READABLE_STREAM === "disable" && Stream) {
|
|
5285
5284
|
module2.exports = Stream.Readable;
|
|
@@ -5299,9 +5298,9 @@ var require_readable = __commonJS({
|
|
|
5299
5298
|
}
|
|
5300
5299
|
});
|
|
5301
5300
|
|
|
5302
|
-
// node_modules/bl/BufferList.js
|
|
5301
|
+
// node_modules/.pnpm/bl@5.1.0/node_modules/bl/BufferList.js
|
|
5303
5302
|
var require_BufferList = __commonJS({
|
|
5304
|
-
"node_modules/bl/BufferList.js"(exports, module2) {
|
|
5303
|
+
"node_modules/.pnpm/bl@5.1.0/node_modules/bl/BufferList.js"(exports, module2) {
|
|
5305
5304
|
"use strict";
|
|
5306
5305
|
var { Buffer: Buffer2 } = require("buffer");
|
|
5307
5306
|
var symbol = Symbol.for("BufferList");
|
|
@@ -5603,9 +5602,9 @@ var require_BufferList = __commonJS({
|
|
|
5603
5602
|
}
|
|
5604
5603
|
});
|
|
5605
5604
|
|
|
5606
|
-
// node_modules/bl/bl.js
|
|
5605
|
+
// node_modules/.pnpm/bl@5.1.0/node_modules/bl/bl.js
|
|
5607
5606
|
var require_bl = __commonJS({
|
|
5608
|
-
"node_modules/bl/bl.js"(exports, module2) {
|
|
5607
|
+
"node_modules/.pnpm/bl@5.1.0/node_modules/bl/bl.js"(exports, module2) {
|
|
5609
5608
|
"use strict";
|
|
5610
5609
|
var DuplexStream = require_readable().Duplex;
|
|
5611
5610
|
var inherits = require_inherits();
|
|
@@ -5681,19 +5680,21 @@ __export(src_exports, {
|
|
|
5681
5680
|
});
|
|
5682
5681
|
module.exports = __toCommonJS(src_exports);
|
|
5683
5682
|
var import_process4 = __toESM(require("process"), 1);
|
|
5684
|
-
var
|
|
5683
|
+
var import_node13 = require("lazy-js-utils/dist/node");
|
|
5684
|
+
var import_lazy_js_utils2 = require("lazy-js-utils");
|
|
5685
5685
|
var import_picocolors8 = __toESM(require_picocolors(), 1);
|
|
5686
5686
|
var import_fast_glob = __toESM(require("fast-glob"), 1);
|
|
5687
5687
|
var import_ccommand3 = require("ccommand");
|
|
5688
5688
|
|
|
5689
5689
|
// src/utils.ts
|
|
5690
5690
|
var import_path = __toESM(require("path"), 1);
|
|
5691
|
+
var import_node = require("lazy-js-utils/dist/node");
|
|
5691
5692
|
var import_lazy_js_utils = require("lazy-js-utils");
|
|
5692
5693
|
|
|
5693
|
-
// node_modules/ora/index.js
|
|
5694
|
+
// node_modules/.pnpm/ora@6.3.1/node_modules/ora/index.js
|
|
5694
5695
|
var import_node_process7 = __toESM(require("process"), 1);
|
|
5695
5696
|
|
|
5696
|
-
// node_modules/ora/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
5697
|
+
// node_modules/.pnpm/ora@6.3.1/node_modules/ora/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
5697
5698
|
var ANSI_BACKGROUND_OFFSET = 10;
|
|
5698
5699
|
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
5699
5700
|
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
@@ -5879,7 +5880,7 @@ function assembleStyles() {
|
|
|
5879
5880
|
var ansiStyles = assembleStyles();
|
|
5880
5881
|
var ansi_styles_default = ansiStyles;
|
|
5881
5882
|
|
|
5882
|
-
// node_modules/ora/node_modules/chalk/source/vendor/supports-color/index.js
|
|
5883
|
+
// node_modules/.pnpm/ora@6.3.1/node_modules/ora/node_modules/chalk/source/vendor/supports-color/index.js
|
|
5883
5884
|
var import_node_process = __toESM(require("process"), 1);
|
|
5884
5885
|
var import_node_os = __toESM(require("os"), 1);
|
|
5885
5886
|
var import_node_tty = __toESM(require("tty"), 1);
|
|
@@ -6005,7 +6006,7 @@ var supportsColor = {
|
|
|
6005
6006
|
};
|
|
6006
6007
|
var supports_color_default = supportsColor;
|
|
6007
6008
|
|
|
6008
|
-
// node_modules/ora/node_modules/chalk/source/utilities.js
|
|
6009
|
+
// node_modules/.pnpm/ora@6.3.1/node_modules/ora/node_modules/chalk/source/utilities.js
|
|
6009
6010
|
function stringReplaceAll(string, substring, replacer) {
|
|
6010
6011
|
let index = string.indexOf(substring);
|
|
6011
6012
|
if (index === -1) {
|
|
@@ -6035,7 +6036,7 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
|
6035
6036
|
return returnValue;
|
|
6036
6037
|
}
|
|
6037
6038
|
|
|
6038
|
-
// node_modules/ora/node_modules/chalk/source/index.js
|
|
6039
|
+
// node_modules/.pnpm/ora@6.3.1/node_modules/ora/node_modules/chalk/source/index.js
|
|
6039
6040
|
var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
|
|
6040
6041
|
var GENERATOR = Symbol("GENERATOR");
|
|
6041
6042
|
var STYLER = Symbol("STYLER");
|
|
@@ -6182,10 +6183,10 @@ var chalk = createChalk();
|
|
|
6182
6183
|
var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
6183
6184
|
var source_default = chalk;
|
|
6184
6185
|
|
|
6185
|
-
// node_modules/cli-cursor/index.js
|
|
6186
|
+
// node_modules/.pnpm/cli-cursor@4.0.0/node_modules/cli-cursor/index.js
|
|
6186
6187
|
var import_node_process3 = __toESM(require("process"), 1);
|
|
6187
6188
|
|
|
6188
|
-
// node_modules/restore-cursor/index.js
|
|
6189
|
+
// node_modules/.pnpm/restore-cursor@4.0.0/node_modules/restore-cursor/index.js
|
|
6189
6190
|
var import_node_process2 = __toESM(require("process"), 1);
|
|
6190
6191
|
var import_onetime = __toESM(require_onetime(), 1);
|
|
6191
6192
|
var import_signal_exit = __toESM(require_signal_exit(), 1);
|
|
@@ -6196,7 +6197,7 @@ var restoreCursor = (0, import_onetime.default)(() => {
|
|
|
6196
6197
|
});
|
|
6197
6198
|
var restore_cursor_default = restoreCursor;
|
|
6198
6199
|
|
|
6199
|
-
// node_modules/cli-cursor/index.js
|
|
6200
|
+
// node_modules/.pnpm/cli-cursor@4.0.0/node_modules/cli-cursor/index.js
|
|
6200
6201
|
var isHidden = false;
|
|
6201
6202
|
var cliCursor = {};
|
|
6202
6203
|
cliCursor.show = (writableStream = import_node_process3.default.stderr) => {
|
|
@@ -6226,10 +6227,10 @@ cliCursor.toggle = (force, writableStream) => {
|
|
|
6226
6227
|
};
|
|
6227
6228
|
var cli_cursor_default = cliCursor;
|
|
6228
6229
|
|
|
6229
|
-
// node_modules/ora/index.js
|
|
6230
|
+
// node_modules/.pnpm/ora@6.3.1/node_modules/ora/index.js
|
|
6230
6231
|
var import_cli_spinners = __toESM(require_cli_spinners(), 1);
|
|
6231
6232
|
|
|
6232
|
-
// node_modules/
|
|
6233
|
+
// node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
6233
6234
|
var ANSI_BACKGROUND_OFFSET2 = 10;
|
|
6234
6235
|
var wrapAnsi162 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
6235
6236
|
var wrapAnsi2562 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
@@ -6415,7 +6416,7 @@ function assembleStyles2() {
|
|
|
6415
6416
|
var ansiStyles2 = assembleStyles2();
|
|
6416
6417
|
var ansi_styles_default2 = ansiStyles2;
|
|
6417
6418
|
|
|
6418
|
-
// node_modules/
|
|
6419
|
+
// node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/supports-color/index.js
|
|
6419
6420
|
var import_node_process4 = __toESM(require("process"), 1);
|
|
6420
6421
|
var import_node_os2 = __toESM(require("os"), 1);
|
|
6421
6422
|
var import_node_tty2 = __toESM(require("tty"), 1);
|
|
@@ -6541,7 +6542,7 @@ var supportsColor2 = {
|
|
|
6541
6542
|
};
|
|
6542
6543
|
var supports_color_default2 = supportsColor2;
|
|
6543
6544
|
|
|
6544
|
-
// node_modules/
|
|
6545
|
+
// node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/utilities.js
|
|
6545
6546
|
function stringReplaceAll2(string, substring, replacer) {
|
|
6546
6547
|
let index = string.indexOf(substring);
|
|
6547
6548
|
if (index === -1) {
|
|
@@ -6571,7 +6572,7 @@ function stringEncaseCRLFWithFirstIndex2(string, prefix, postfix, index) {
|
|
|
6571
6572
|
return returnValue;
|
|
6572
6573
|
}
|
|
6573
6574
|
|
|
6574
|
-
// node_modules/
|
|
6575
|
+
// node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/index.js
|
|
6575
6576
|
var { stdout: stdoutColor2, stderr: stderrColor2 } = supports_color_default2;
|
|
6576
6577
|
var GENERATOR2 = Symbol("GENERATOR");
|
|
6577
6578
|
var STYLER2 = Symbol("STYLER");
|
|
@@ -6718,7 +6719,7 @@ var chalk2 = createChalk2();
|
|
|
6718
6719
|
var chalkStderr2 = createChalk2({ level: stderrColor2 ? stderrColor2.level : 0 });
|
|
6719
6720
|
var source_default2 = chalk2;
|
|
6720
6721
|
|
|
6721
|
-
// node_modules/is-unicode-supported/index.js
|
|
6722
|
+
// node_modules/.pnpm/is-unicode-supported@1.3.0/node_modules/is-unicode-supported/index.js
|
|
6722
6723
|
var import_node_process5 = __toESM(require("process"), 1);
|
|
6723
6724
|
function isUnicodeSupported() {
|
|
6724
6725
|
if (import_node_process5.default.platform !== "win32") {
|
|
@@ -6727,7 +6728,7 @@ function isUnicodeSupported() {
|
|
|
6727
6728
|
return Boolean(import_node_process5.default.env.CI) || Boolean(import_node_process5.default.env.WT_SESSION) || Boolean(import_node_process5.default.env.TERMINUS_SUBLIME) || import_node_process5.default.env.ConEmuTask === "{cmd::Cmder}" || import_node_process5.default.env.TERM_PROGRAM === "Terminus-Sublime" || import_node_process5.default.env.TERM_PROGRAM === "vscode" || import_node_process5.default.env.TERM === "xterm-256color" || import_node_process5.default.env.TERM === "alacritty" || import_node_process5.default.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
6728
6729
|
}
|
|
6729
6730
|
|
|
6730
|
-
// node_modules/log-symbols/index.js
|
|
6731
|
+
// node_modules/.pnpm/log-symbols@5.1.0/node_modules/log-symbols/index.js
|
|
6731
6732
|
var main = {
|
|
6732
6733
|
info: source_default2.blue("\u2139"),
|
|
6733
6734
|
success: source_default2.green("\u2714"),
|
|
@@ -6743,7 +6744,7 @@ var fallback = {
|
|
|
6743
6744
|
var logSymbols = isUnicodeSupported() ? main : fallback;
|
|
6744
6745
|
var log_symbols_default = logSymbols;
|
|
6745
6746
|
|
|
6746
|
-
// node_modules/ora/node_modules/strip-ansi/node_modules/ansi-regex/index.js
|
|
6747
|
+
// node_modules/.pnpm/ora@6.3.1/node_modules/ora/node_modules/strip-ansi/node_modules/ansi-regex/index.js
|
|
6747
6748
|
function ansiRegex({ onlyFirst = false } = {}) {
|
|
6748
6749
|
const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
|
|
6749
6750
|
const pattern = [
|
|
@@ -6753,7 +6754,7 @@ function ansiRegex({ onlyFirst = false } = {}) {
|
|
|
6753
6754
|
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
6754
6755
|
}
|
|
6755
6756
|
|
|
6756
|
-
// node_modules/ora/node_modules/strip-ansi/index.js
|
|
6757
|
+
// node_modules/.pnpm/ora@6.3.1/node_modules/ora/node_modules/strip-ansi/index.js
|
|
6757
6758
|
var regex = ansiRegex();
|
|
6758
6759
|
function stripAnsi(string) {
|
|
6759
6760
|
if (typeof string !== "string") {
|
|
@@ -6762,17 +6763,17 @@ function stripAnsi(string) {
|
|
|
6762
6763
|
return string.replace(regex, "");
|
|
6763
6764
|
}
|
|
6764
6765
|
|
|
6765
|
-
// node_modules/ora/index.js
|
|
6766
|
+
// node_modules/.pnpm/ora@6.3.1/node_modules/ora/index.js
|
|
6766
6767
|
var import_wcwidth = __toESM(require_wcwidth(), 1);
|
|
6767
6768
|
|
|
6768
|
-
// node_modules/is-interactive/index.js
|
|
6769
|
+
// node_modules/.pnpm/is-interactive@2.0.0/node_modules/is-interactive/index.js
|
|
6769
6770
|
function isInteractive({ stream = process.stdout } = {}) {
|
|
6770
6771
|
return Boolean(
|
|
6771
6772
|
stream && stream.isTTY && process.env.TERM !== "dumb" && !("CI" in process.env)
|
|
6772
6773
|
);
|
|
6773
6774
|
}
|
|
6774
6775
|
|
|
6775
|
-
// node_modules/stdin-discarder/index.js
|
|
6776
|
+
// node_modules/.pnpm/stdin-discarder@0.1.0/node_modules/stdin-discarder/index.js
|
|
6776
6777
|
var import_node_process6 = __toESM(require("process"), 1);
|
|
6777
6778
|
var import_node_readline = __toESM(require("readline"), 1);
|
|
6778
6779
|
var import_bl = __toESM(require_bl(), 1);
|
|
@@ -6849,7 +6850,7 @@ _rl = new WeakMap();
|
|
|
6849
6850
|
var stdinDiscarder = new StdinDiscarder();
|
|
6850
6851
|
var stdin_discarder_default = stdinDiscarder;
|
|
6851
6852
|
|
|
6852
|
-
// node_modules/ora/index.js
|
|
6853
|
+
// node_modules/.pnpm/ora@6.3.1/node_modules/ora/index.js
|
|
6853
6854
|
var import_cli_spinners2 = __toESM(require_cli_spinners(), 1);
|
|
6854
6855
|
var _linesToClear, _isDiscardingStdin, _lineCount, _frameIndex, _options, _spinner, _stream, _id, _initialInterval, _isEnabled, _isSilent, _indent, _text, _prefixText, _suffixText;
|
|
6855
6856
|
var Ora = class {
|
|
@@ -7165,7 +7166,7 @@ async function getParams(params) {
|
|
|
7165
7166
|
var _a, _b;
|
|
7166
7167
|
const root = process.cwd();
|
|
7167
7168
|
try {
|
|
7168
|
-
switch (await (0,
|
|
7169
|
+
switch (await (0, import_node.getPkgTool)()) {
|
|
7169
7170
|
case "pnpm":
|
|
7170
7171
|
if (!(0, import_lazy_js_utils.isFile)(import_path.default.resolve(root, "./pnpm-workspace.yaml"))) {
|
|
7171
7172
|
if (DW.test(params))
|
|
@@ -7192,7 +7193,7 @@ async function getParams(params) {
|
|
|
7192
7193
|
return params.replace(W, " -w");
|
|
7193
7194
|
return params;
|
|
7194
7195
|
case "yarn":
|
|
7195
|
-
if (!((_a = await (0,
|
|
7196
|
+
if (!((_a = await (0, import_node.getPkg)(import_path.default.resolve(root, "./package.json"))) == null ? void 0 : _a.workspaces)) {
|
|
7196
7197
|
if (Dw.test(params))
|
|
7197
7198
|
return params.replace(Dw, " -D");
|
|
7198
7199
|
if (DW.test(params))
|
|
@@ -7202,7 +7203,7 @@ async function getParams(params) {
|
|
|
7202
7203
|
if (w.test(params))
|
|
7203
7204
|
return params.replace(w, "");
|
|
7204
7205
|
}
|
|
7205
|
-
if ((_b = await (0,
|
|
7206
|
+
if ((_b = await (0, import_node.getPkg)()) == null ? void 0 : _b.workspaces) {
|
|
7206
7207
|
if (D.test(params))
|
|
7207
7208
|
return params.replace(D, " -DW");
|
|
7208
7209
|
if (d.test(params))
|
|
@@ -7244,11 +7245,15 @@ async function getStyle() {
|
|
|
7244
7245
|
spinner
|
|
7245
7246
|
};
|
|
7246
7247
|
}
|
|
7247
|
-
function getLatestVersion(pkg, isZh6 = true) {
|
|
7248
|
+
async function getLatestVersion(pkg, isZh6 = true) {
|
|
7248
7249
|
const data = [];
|
|
7249
7250
|
for (const p of pkg.replace(/\s+/, " ").split(" ")) {
|
|
7250
7251
|
const [pName, v] = p.split("$");
|
|
7251
|
-
let { status, result } = (0,
|
|
7252
|
+
let { status, result } = await (0, import_node.jsShell)(`npm view ${pName}`, [
|
|
7253
|
+
"inherit",
|
|
7254
|
+
"pipe",
|
|
7255
|
+
"inherit"
|
|
7256
|
+
]);
|
|
7252
7257
|
if (status === 0) {
|
|
7253
7258
|
if (result.startsWith("@"))
|
|
7254
7259
|
result = result.slice(1);
|
|
@@ -7262,22 +7267,22 @@ function getLatestVersion(pkg, isZh6 = true) {
|
|
|
7262
7267
|
}
|
|
7263
7268
|
|
|
7264
7269
|
// src/help.ts
|
|
7265
|
-
var
|
|
7270
|
+
var import_node2 = require("lazy-js-utils/dist/node");
|
|
7266
7271
|
|
|
7267
7272
|
// package.json
|
|
7268
|
-
var version = "0.0.
|
|
7273
|
+
var version = "0.0.94";
|
|
7269
7274
|
|
|
7270
7275
|
// src/help.ts
|
|
7271
7276
|
var isZh2 = process.env.PI_Lang === "zh";
|
|
7272
7277
|
function help(argv) {
|
|
7273
7278
|
const arg = argv[0];
|
|
7274
7279
|
if (arg === "-v" || arg === "--version") {
|
|
7275
|
-
(0,
|
|
7280
|
+
(0, import_node2.jsShell)(
|
|
7276
7281
|
isZh2 ? `gum style --foreground 212 --border-foreground 212 --border double --align center --width 50 --margin "1 2" --padding "2 4" "pi \u7248\u672C: ${version}" "\u8BF7\u4E3A\u6211\u7684\u52AA\u529B\u70B9\u4E00\u4E2A\u884C \u{1F31F}" "\u8C22\u8C22 \u{1F91F}"` : `gum style --foreground 212 --border-foreground 212 --border double --align center --width 50 --margin "1 2" --padding "2 4" "pi version: ${version}" "Please give me a \u{1F31F} for my efforts" "Thank you \u{1F91F}"`
|
|
7277
7282
|
);
|
|
7278
7283
|
process.exit(0);
|
|
7279
7284
|
} else if (arg === "-h" || arg === "--help") {
|
|
7280
|
-
(0,
|
|
7285
|
+
(0, import_node2.jsShell)(
|
|
7281
7286
|
`gum style --foreground 212 --border-foreground 212 --border double --align left --width 50 --margin "1 2" --padding "1 1" "PI Commands:" "~ pi: install package" "~ pix: npx package" "~ pui: uninstall package" "~ prun: run package script" "~ pinit: package init" "~ pbuild: go build | cargo build" "~ pfind: find monorepo of yarn or pnpm" "~ pa: agent alias" "~ pu: package upgrade" "~ pci: package clean install" "~ pil: package latest install"
|
|
7282
7287
|
`
|
|
7283
7288
|
);
|
|
@@ -7286,12 +7291,16 @@ function help(argv) {
|
|
|
7286
7291
|
}
|
|
7287
7292
|
|
|
7288
7293
|
// src/installDeps.ts
|
|
7289
|
-
var
|
|
7294
|
+
var import_node3 = require("lazy-js-utils/dist/node");
|
|
7290
7295
|
var import_picocolors2 = __toESM(require_picocolors(), 1);
|
|
7291
7296
|
async function installDeps() {
|
|
7292
|
-
if (!(0,
|
|
7297
|
+
if (!await (0, import_node3.isInstallPkg)("gum")) {
|
|
7293
7298
|
console.log(import_picocolors2.default.cyan("\u6B63\u5728\u4E3A\u60A8\u5B89\u88C5\u5FC5\u8981\u7684\u4F9D\u8D56gum..."));
|
|
7294
|
-
const { status } = await (0,
|
|
7299
|
+
const { status } = await (0, import_node3.jsShell)("brew install gum", [
|
|
7300
|
+
"inherit",
|
|
7301
|
+
"pipe",
|
|
7302
|
+
"inherit"
|
|
7303
|
+
]);
|
|
7295
7304
|
if (status === 0) {
|
|
7296
7305
|
console.log(import_picocolors2.default.cyan("gum \u5B89\u88C5\u6210\u529F!"));
|
|
7297
7306
|
} else {
|
|
@@ -7303,9 +7312,13 @@ async function installDeps() {
|
|
|
7303
7312
|
process.exit(1);
|
|
7304
7313
|
}
|
|
7305
7314
|
}
|
|
7306
|
-
if (!(0,
|
|
7315
|
+
if (!await (0, import_node3.isInstallPkg)("ni")) {
|
|
7307
7316
|
console.log(import_picocolors2.default.cyan("\u6B63\u5728\u4E3A\u60A8\u5B89\u88C5\u5FC5\u8981\u7684\u4F9D\u8D56ni..."));
|
|
7308
|
-
const { status } = await (0,
|
|
7317
|
+
const { status } = await (0, import_node3.jsShell)("npm i -g @antfu/ni", [
|
|
7318
|
+
"inherit",
|
|
7319
|
+
"pipe",
|
|
7320
|
+
"inherit"
|
|
7321
|
+
]);
|
|
7309
7322
|
if (status === 0) {
|
|
7310
7323
|
console.log(import_picocolors2.default.cyan("ni \u5B89\u88C5\u6210\u529F!"));
|
|
7311
7324
|
} else {
|
|
@@ -7322,18 +7335,18 @@ async function installDeps() {
|
|
|
7322
7335
|
// src/pi.ts
|
|
7323
7336
|
var import_process2 = __toESM(require("process"), 1);
|
|
7324
7337
|
var import_console = require("console");
|
|
7325
|
-
var
|
|
7338
|
+
var import_node5 = require("lazy-js-utils/dist/node");
|
|
7326
7339
|
var import_picocolors4 = __toESM(require_picocolors(), 1);
|
|
7327
7340
|
|
|
7328
7341
|
// src/detectNode.ts
|
|
7329
7342
|
var import_process = __toESM(require("process"), 1);
|
|
7330
|
-
var
|
|
7343
|
+
var import_node4 = require("lazy-js-utils/dist/node");
|
|
7331
7344
|
var import_picocolors3 = __toESM(require_picocolors(), 1);
|
|
7332
7345
|
async function detectNode() {
|
|
7333
7346
|
var _a;
|
|
7334
7347
|
let pkg;
|
|
7335
7348
|
try {
|
|
7336
|
-
pkg = await (0,
|
|
7349
|
+
pkg = await (0, import_node4.getPkg)();
|
|
7337
7350
|
} catch (e) {
|
|
7338
7351
|
const cwd = import_process.default.cwd();
|
|
7339
7352
|
console.log(import_picocolors3.default.red(`\u5F53\u524D\u76EE\u5F55: ${cwd} \u6CA1\u6709package.json\u6587\u4EF6`));
|
|
@@ -7345,13 +7358,13 @@ async function detectNode() {
|
|
|
7345
7358
|
pkg.engines.node
|
|
7346
7359
|
);
|
|
7347
7360
|
if (!isSafe) {
|
|
7348
|
-
const { result, status } = await (0,
|
|
7361
|
+
const { result, status } = await (0, import_node4.jsShell)(
|
|
7349
7362
|
`echo "yes
|
|
7350
7363
|
no" | gum filter --placeholder=" \u5F53\u524Dnode\u7248\u672C\u4E0D\u6EE1\u8DB3 ${pkg.engines.node}\uFF0C\u662F\u5426\u5207\u6362node\u7248\u672C"`,
|
|
7351
|
-
"pipe"
|
|
7364
|
+
["inherit", "pipe", "inherit"]
|
|
7352
7365
|
);
|
|
7353
7366
|
if (status === 0 && result === "yes") {
|
|
7354
|
-
await (0,
|
|
7367
|
+
await (0, import_node4.jsShell)(
|
|
7355
7368
|
`
|
|
7356
7369
|
current=$(echo $(fnm current))
|
|
7357
7370
|
registery=$(echo "$(fnm ls)" | sed 's/system//g' | sed 's/default//g' | sed 's/* //g' | sed "s/$current/* $current/g" | gum filter --placeholder=" \u8BF7\u9009\u62E9\u4E00\u4E2Anode\u7248\u672C")
|
|
@@ -7360,7 +7373,7 @@ no" | gum filter --placeholder=" \u5F53\u524Dnode\u7248\u672C\u4E0D\u6EE1\u8DB3
|
|
|
7360
7373
|
fnm use \${registery% -*}
|
|
7361
7374
|
fi
|
|
7362
7375
|
`,
|
|
7363
|
-
"pipe"
|
|
7376
|
+
["inherit", "pipe", "inherit"]
|
|
7364
7377
|
);
|
|
7365
7378
|
}
|
|
7366
7379
|
}
|
|
@@ -7377,16 +7390,16 @@ async function pi(params, pkg, executor = "ni") {
|
|
|
7377
7390
|
const start = Date.now();
|
|
7378
7391
|
let successMsg = "";
|
|
7379
7392
|
if (isLatest) {
|
|
7380
|
-
successMsg = getLatestVersion(pkg, isZh3);
|
|
7393
|
+
successMsg = await getLatestVersion(pkg, isZh3);
|
|
7381
7394
|
} else {
|
|
7382
7395
|
successMsg = pkg ? isZh3 ? `${pkg} \u5B89\u88C5\u6210\u529F! \u{1F60A}` : `Installed ${pkg} successfully! \u{1F60A}` : isZh3 ? "\u4F9D\u8D56\u66F4\u65B0\u6210\u529F! \u{1F60A}" : "Updated dependency successfully! \u{1F60A}";
|
|
7383
7396
|
}
|
|
7384
7397
|
const failMsg = pkg ? isZh3 ? `${params} \u5B89\u88C5\u5931\u8D25 \u{1F62D}` : `Failed to install ${params} \u{1F62D}` : isZh3 ? "\u4F9D\u8D56\u66F4\u65B0\u5931\u8D25 \u{1F62D}" : "Failed to update dependency \u{1F62D}";
|
|
7385
7398
|
const newParams = isLatest ? params : await getParams(params);
|
|
7386
|
-
let stdio = "pipe";
|
|
7399
|
+
let stdio = ["inherit", "pipe", "inherit"];
|
|
7387
7400
|
let loading_status;
|
|
7388
7401
|
const { PI_DEFAULT, PI_MaxSockets: sockets } = import_process2.default.env;
|
|
7389
|
-
const pkgTool = await (0,
|
|
7402
|
+
const pkgTool = await (0, import_node5.getPkgTool)();
|
|
7390
7403
|
const maxSockets = sockets || 4;
|
|
7391
7404
|
const install = PI_DEFAULT === "yarn" || pkgTool === "yarn" ? newParams ? "add" : "" : "install";
|
|
7392
7405
|
if (pkgTool === "npm") {
|
|
@@ -7402,7 +7415,7 @@ async function pi(params, pkg, executor = "ni") {
|
|
|
7402
7415
|
loading_status = await loading(text);
|
|
7403
7416
|
}
|
|
7404
7417
|
const runSockets = executor.split(" ")[0] === "npm" ? ` --max-sockets=${maxSockets}` : "";
|
|
7405
|
-
let { status, result } = await (0,
|
|
7418
|
+
let { status, result } = await (0, import_node5.useNodeWorker)({
|
|
7406
7419
|
params: `${executor}${newParams ? ` ${newParams}` : runSockets}`,
|
|
7407
7420
|
stdio,
|
|
7408
7421
|
errorExit: false
|
|
@@ -7414,7 +7427,7 @@ async function pi(params, pkg, executor = "ni") {
|
|
|
7414
7427
|
isZh3 ? "\u6B63\u5728\u5C1D\u8BD5\u4F7F\u7528 npm \u518D\u6B21\u6267\u884C..." : "Trying to use npm to run again..."
|
|
7415
7428
|
)
|
|
7416
7429
|
);
|
|
7417
|
-
const { status: newStatus, result: newResult } = (0,
|
|
7430
|
+
const { status: newStatus, result: newResult } = await (0, import_node5.jsShell)(
|
|
7418
7431
|
`npm install${newParams ? ` ${newParams}` : runSockets}`,
|
|
7419
7432
|
{
|
|
7420
7433
|
stdio
|
|
@@ -7444,16 +7457,16 @@ ${result}` : failMsg));
|
|
|
7444
7457
|
const match = result.match(reg);
|
|
7445
7458
|
if (match) {
|
|
7446
7459
|
const dep = match[1];
|
|
7447
|
-
(0,
|
|
7460
|
+
(0, import_node5.jsShell)(`pi ${dep}@latest`);
|
|
7448
7461
|
}
|
|
7449
7462
|
}
|
|
7450
7463
|
import_process2.default.exit();
|
|
7451
7464
|
}
|
|
7452
7465
|
|
|
7453
7466
|
// src/pa.ts
|
|
7454
|
-
var
|
|
7467
|
+
var import_node6 = require("lazy-js-utils/dist/node");
|
|
7455
7468
|
function pa() {
|
|
7456
|
-
return (0,
|
|
7469
|
+
return (0, import_node6.jsShell)("na");
|
|
7457
7470
|
}
|
|
7458
7471
|
|
|
7459
7472
|
// src/pci.ts
|
|
@@ -7468,10 +7481,10 @@ function pfind(params) {
|
|
|
7468
7481
|
}
|
|
7469
7482
|
|
|
7470
7483
|
// src/pil.ts
|
|
7471
|
-
var
|
|
7484
|
+
var import_node7 = require("lazy-js-utils/dist/node");
|
|
7472
7485
|
var import_picocolors5 = __toESM(require_picocolors(), 1);
|
|
7473
7486
|
async function pil(params) {
|
|
7474
|
-
const { dependencies = {}, devDependencies = {} } = await (0,
|
|
7487
|
+
const { dependencies = {}, devDependencies = {} } = await (0, import_node7.getPkg)();
|
|
7475
7488
|
if (!params) {
|
|
7476
7489
|
const deps = [
|
|
7477
7490
|
...Object.keys(dependencies).map((key) => `${key}: ${dependencies[key]}`),
|
|
@@ -7479,11 +7492,13 @@ async function pil(params) {
|
|
|
7479
7492
|
(key) => `${key}: ${devDependencies[key]}`
|
|
7480
7493
|
)
|
|
7481
7494
|
];
|
|
7482
|
-
const { result: choose, status } = (0,
|
|
7495
|
+
const { result: choose, status } = await (0, import_node7.jsShell)(
|
|
7483
7496
|
`echo ${deps.join(
|
|
7484
7497
|
","
|
|
7485
7498
|
)} | sed "s/,/\\n/g" | gum filter --no-limit --placeholder=" \u{1F914}${process.env.PI_Lang === "zh" ? "\u8BF7\u9009\u62E9\u4E00\u4E2A\u9700\u8981\u83B7\u53D6\u6700\u65B0\u7248\u672C\u7684\u4F9D\u8D56" : "Please select a dependency that needs to obtain the latest version."}"`,
|
|
7486
|
-
|
|
7499
|
+
{
|
|
7500
|
+
stdio: ["inherit", "pipe", "inherit"]
|
|
7501
|
+
}
|
|
7487
7502
|
);
|
|
7488
7503
|
if (status === 130) {
|
|
7489
7504
|
console.log(import_picocolors5.default.dim("\u5DF2\u53D6\u6D88"));
|
|
@@ -7518,32 +7533,32 @@ async function pil(params) {
|
|
|
7518
7533
|
}
|
|
7519
7534
|
|
|
7520
7535
|
// src/pinit.ts
|
|
7521
|
-
var
|
|
7536
|
+
var import_node8 = require("lazy-js-utils/dist/node");
|
|
7522
7537
|
async function pinit() {
|
|
7523
7538
|
console.log("Initializing project...");
|
|
7524
|
-
switch (await (0,
|
|
7539
|
+
switch (await (0, import_node8.getPkgTool)()) {
|
|
7525
7540
|
case "npm":
|
|
7526
|
-
(0,
|
|
7541
|
+
(0, import_node8.jsShell)("npm init -y");
|
|
7527
7542
|
return;
|
|
7528
7543
|
case "yarn":
|
|
7529
|
-
(0,
|
|
7544
|
+
(0, import_node8.jsShell)("yarn init -y");
|
|
7530
7545
|
return;
|
|
7531
7546
|
case "pnpm":
|
|
7532
|
-
(0,
|
|
7547
|
+
(0, import_node8.jsShell)("pnpm init -y");
|
|
7533
7548
|
return;
|
|
7534
7549
|
default:
|
|
7535
|
-
(0,
|
|
7550
|
+
(0, import_node8.jsShell)("npm init -y");
|
|
7536
7551
|
}
|
|
7537
7552
|
}
|
|
7538
7553
|
|
|
7539
7554
|
// src/pix.ts
|
|
7540
|
-
var
|
|
7555
|
+
var import_node9 = require("lazy-js-utils/dist/node");
|
|
7541
7556
|
async function pix(params) {
|
|
7542
|
-
switch (await (0,
|
|
7557
|
+
switch (await (0, import_node9.getPkgTool)()) {
|
|
7543
7558
|
case "bun":
|
|
7544
|
-
return (0,
|
|
7559
|
+
return (0, import_node9.jsShell)(`bunx ${params}`);
|
|
7545
7560
|
default:
|
|
7546
|
-
return (0,
|
|
7561
|
+
return (0, import_node9.jsShell)(`npx ${params}`);
|
|
7547
7562
|
}
|
|
7548
7563
|
}
|
|
7549
7564
|
|
|
@@ -7554,30 +7569,30 @@ function prun(params) {
|
|
|
7554
7569
|
}
|
|
7555
7570
|
|
|
7556
7571
|
// src/pu.ts
|
|
7557
|
-
var
|
|
7572
|
+
var import_node10 = require("lazy-js-utils/dist/node");
|
|
7558
7573
|
function pu() {
|
|
7559
|
-
return (0,
|
|
7574
|
+
return (0, import_node10.jsShell)("nu");
|
|
7560
7575
|
}
|
|
7561
7576
|
|
|
7562
7577
|
// src/pui.ts
|
|
7563
|
-
var
|
|
7578
|
+
var import_node11 = require("lazy-js-utils/dist/node");
|
|
7564
7579
|
var import_picocolors6 = __toESM(require_picocolors(), 1);
|
|
7565
7580
|
var isZh4 = process.env.PI_Lang === "zh";
|
|
7566
7581
|
async function pui(params, pkg) {
|
|
7567
7582
|
const text = `${isZh4 ? "\u6B63\u5728\u4E3A\u60A8\u5378\u8F7D" : "Uninstalling"} ${pkg} ...`;
|
|
7568
7583
|
if (!params) {
|
|
7569
|
-
const { dependencies = {}, devDependencies = {} } = await (0,
|
|
7584
|
+
const { dependencies = {}, devDependencies = {} } = await (0, import_node11.getPkg)();
|
|
7570
7585
|
const deps = [
|
|
7571
7586
|
...Object.keys(dependencies).map((key) => `${key}: ${dependencies[key]}`),
|
|
7572
7587
|
...Object.keys(devDependencies).map(
|
|
7573
7588
|
(key) => `${key}: ${devDependencies[key]}`
|
|
7574
7589
|
)
|
|
7575
7590
|
];
|
|
7576
|
-
const { result: choose, status: status2 } = (0,
|
|
7591
|
+
const { result: choose, status: status2 } = await (0, import_node11.jsShell)(
|
|
7577
7592
|
`echo ${deps.join(
|
|
7578
7593
|
","
|
|
7579
7594
|
)} | sed "s/,/\\n/g" | gum filter --placeholder=" \u{1F914}${process.env.PI_Lang === "zh" ? "\u8BF7\u9009\u62E9\u4E00\u4E2A\u9700\u8981\u5220\u9664\u4F9D\u8D56" : "Please select a dependency to get the latest version."}"`,
|
|
7580
|
-
"pipe"
|
|
7595
|
+
["inherit", "pipe", "inherit"]
|
|
7581
7596
|
);
|
|
7582
7597
|
if (status2 === 130) {
|
|
7583
7598
|
console.log(import_picocolors6.default.dim("\u5DF2\u53D6\u6D88"));
|
|
@@ -7599,7 +7614,7 @@ async function pui(params, pkg) {
|
|
|
7599
7614
|
process.exit(1);
|
|
7600
7615
|
}
|
|
7601
7616
|
const loading_status = await loading(text);
|
|
7602
|
-
const { status, result } = await (0,
|
|
7617
|
+
const { status, result } = await (0, import_node11.useNodeWorker)(`nun ${params}`);
|
|
7603
7618
|
const end = Date.now();
|
|
7604
7619
|
const costTime = (end - start) / 1e3;
|
|
7605
7620
|
successMsg += import_picocolors6.default.blue(` ---- \u23F0\uFF1A${costTime}s`);
|
|
@@ -7613,14 +7628,14 @@ ${result}` : failMsg));
|
|
|
7613
7628
|
|
|
7614
7629
|
// src/pio.ts
|
|
7615
7630
|
var import_process3 = __toESM(require("process"), 1);
|
|
7616
|
-
var
|
|
7631
|
+
var import_node12 = require("lazy-js-utils/dist/node");
|
|
7617
7632
|
var import_picocolors7 = __toESM(require_picocolors(), 1);
|
|
7618
7633
|
async function pio(params, pkg, executor = "ni") {
|
|
7619
7634
|
const successMsg = pkg ? `Installed ${pkg} successfully! \u{1F60A}` : "Updated dependency successfully! \u{1F60A}";
|
|
7620
7635
|
const failMsg = pkg ? `Failed to install ${pkg} \u{1F62D}` : "Failed to update dependency! \u{1F62D}";
|
|
7621
7636
|
const offline = "--prefer-offline";
|
|
7622
7637
|
const newParams = await getParams(params);
|
|
7623
|
-
const { status, result } = await (0,
|
|
7638
|
+
const { status, result } = await (0, import_node12.useNodeWorker)({
|
|
7624
7639
|
params: `${executor} ${newParams} ${offline}`,
|
|
7625
7640
|
stdio: "inherit"
|
|
7626
7641
|
});
|
|
@@ -7653,7 +7668,7 @@ var isZh5 = import_process4.default.env.PI_Lang === "zh";
|
|
|
7653
7668
|
async function setup() {
|
|
7654
7669
|
const cmd = import_process4.default.argv[1];
|
|
7655
7670
|
let exec = "";
|
|
7656
|
-
if ((0,
|
|
7671
|
+
if ((0, import_lazy_js_utils2.isWin)()) {
|
|
7657
7672
|
const last = cmd.lastIndexOf("\\") + 1;
|
|
7658
7673
|
exec = cmd.slice(last, cmd.length).split(".").slice(0, -1).join(".");
|
|
7659
7674
|
} else {
|
|
@@ -7662,15 +7677,15 @@ async function setup() {
|
|
|
7662
7677
|
}
|
|
7663
7678
|
const argv = import_process4.default.argv.slice(2);
|
|
7664
7679
|
help(argv);
|
|
7665
|
-
const params = (0,
|
|
7666
|
-
if (!(0,
|
|
7667
|
-
if ((0,
|
|
7680
|
+
const params = (0, import_lazy_js_utils2.spaceFormat)(argv.join(" ")).trim();
|
|
7681
|
+
if (!(0, import_node13.hasPkg)(rootPath)) {
|
|
7682
|
+
if (await (0, import_lazy_js_utils2.isGo)()) {
|
|
7668
7683
|
if (exec === "pi") {
|
|
7669
7684
|
const loading_status = await loading(
|
|
7670
7685
|
`${isZh5 ? "\u6B63\u5728\u4E3A\u60A8\u5B89\u88C5" : "Installing"} ${params} ...
|
|
7671
7686
|
`
|
|
7672
7687
|
);
|
|
7673
|
-
const { status } = params ? await (0,
|
|
7688
|
+
const { status } = params ? await (0, import_node13.useNodeWorker)(`go get ${params}`) : await (0, import_node13.useNodeWorker)("go mod tidy");
|
|
7674
7689
|
if (status === 0) {
|
|
7675
7690
|
loading_status.succeed(
|
|
7676
7691
|
import_picocolors8.default.green(isZh5 ? "\u5B89\u88C5\u6210\u529F! \u{1F60A}" : "Installed successfully! \u{1F60A}")
|
|
@@ -7685,7 +7700,7 @@ async function setup() {
|
|
|
7685
7700
|
`${isZh5 ? "\u6B63\u5728\u4E3A\u60A8\u5378\u8F7D" : "Uninstalling"} ${params} ...
|
|
7686
7701
|
`
|
|
7687
7702
|
);
|
|
7688
|
-
const { status } = await (0,
|
|
7703
|
+
const { status } = await (0, import_node13.useNodeWorker)(`go clean ${params}`);
|
|
7689
7704
|
if (status === 0) {
|
|
7690
7705
|
loading_status.succeed(
|
|
7691
7706
|
import_picocolors8.default.green(isZh5 ? "\u5378\u8F7D\u6210\u529F! \u{1F60A}" : "Uninstalled successfully! \u{1F60A}")
|
|
@@ -7698,11 +7713,11 @@ async function setup() {
|
|
|
7698
7713
|
} else if (exec === "prun") {
|
|
7699
7714
|
const match = params ? params.endsWith(".go") ? [`**/${params}`] : [`**/${params}.go`, `**/${params}/main.go`] : "main.go";
|
|
7700
7715
|
const target = (await (0, import_fast_glob.default)(match))[0];
|
|
7701
|
-
return target ? (0,
|
|
7716
|
+
return target ? (0, import_node13.jsShell)(`go run ${target}`) : (0, import_ccommand3.ccommand)(params);
|
|
7702
7717
|
} else if (exec === "pinit") {
|
|
7703
|
-
(0,
|
|
7718
|
+
(0, import_node13.jsShell)(`go mod init ${params}`);
|
|
7704
7719
|
} else if (exec === "pbuild") {
|
|
7705
|
-
(0,
|
|
7720
|
+
(0, import_node13.jsShell)(`go build ${params}`);
|
|
7706
7721
|
} else {
|
|
7707
7722
|
console.log(
|
|
7708
7723
|
import_picocolors8.default.red(
|
|
@@ -7712,13 +7727,13 @@ async function setup() {
|
|
|
7712
7727
|
}
|
|
7713
7728
|
import_process4.default.exit();
|
|
7714
7729
|
}
|
|
7715
|
-
if ((0,
|
|
7730
|
+
if (await (0, import_lazy_js_utils2.isRust)()) {
|
|
7716
7731
|
if (exec === "pi") {
|
|
7717
7732
|
const loading_status = await loading(
|
|
7718
7733
|
`${isZh5 ? "\u6B63\u5728\u4E3A\u60A8\u5B89\u88C5" : "Installing"} ${params} ...
|
|
7719
7734
|
`
|
|
7720
7735
|
);
|
|
7721
|
-
const { status } = await (0,
|
|
7736
|
+
const { status } = await (0, import_node13.useNodeWorker)(`cargo install ${params}`);
|
|
7722
7737
|
if (status === 0) {
|
|
7723
7738
|
loading_status.succeed(
|
|
7724
7739
|
import_picocolors8.default.green(isZh5 ? "\u5B89\u88C5\u6210\u529F! \u{1F60A}" : "Installed successfully! \u{1F60A}")
|
|
@@ -7733,7 +7748,7 @@ async function setup() {
|
|
|
7733
7748
|
`${isZh5 ? "\u6B63\u5728\u4E3A\u60A8\u5378\u8F7D" : "Uninstalling"} ${params} ...
|
|
7734
7749
|
`
|
|
7735
7750
|
);
|
|
7736
|
-
const { status } = await (0,
|
|
7751
|
+
const { status } = await (0, import_node13.useNodeWorker)(`cargo uninstall ${params}`);
|
|
7737
7752
|
if (status === 0) {
|
|
7738
7753
|
loading_status.succeed(
|
|
7739
7754
|
import_picocolors8.default.green(isZh5 ? "\u5378\u8F7D\u6210\u529F! \u{1F60A}" : "Uninstalled successfully! \u{1F60A}")
|
|
@@ -7744,11 +7759,11 @@ async function setup() {
|
|
|
7744
7759
|
);
|
|
7745
7760
|
}
|
|
7746
7761
|
} else if (exec === "prun") {
|
|
7747
|
-
(0,
|
|
7762
|
+
(0, import_node13.jsShell)(`cargo run ${params}`);
|
|
7748
7763
|
} else if (exec === "pinit") {
|
|
7749
|
-
(0,
|
|
7764
|
+
(0, import_node13.jsShell)(`cargo init ${params}`);
|
|
7750
7765
|
} else if (exec === "pbuild") {
|
|
7751
|
-
(0,
|
|
7766
|
+
(0, import_node13.jsShell)(`cargo build ${params}`);
|
|
7752
7767
|
} else {
|
|
7753
7768
|
console.log(
|
|
7754
7769
|
import_picocolors8.default.red(
|