create-cloudflare 2.9.1 → 2.9.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/cli.js +2120 -927
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -33,12 +33,1555 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
33
33
|
));
|
|
34
34
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
35
|
|
|
36
|
+
// ../../node_modules/.pnpm/escape-string-regexp@1.0.5/node_modules/escape-string-regexp/index.js
|
|
37
|
+
var require_escape_string_regexp = __commonJS({
|
|
38
|
+
"../../node_modules/.pnpm/escape-string-regexp@1.0.5/node_modules/escape-string-regexp/index.js"(exports2, module2) {
|
|
39
|
+
"use strict";
|
|
40
|
+
var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
|
|
41
|
+
module2.exports = function(str) {
|
|
42
|
+
if (typeof str !== "string") {
|
|
43
|
+
throw new TypeError("Expected a string");
|
|
44
|
+
}
|
|
45
|
+
return str.replace(matchOperatorsRe, "\\$&");
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
// ../../node_modules/.pnpm/color-name@1.1.3/node_modules/color-name/index.js
|
|
51
|
+
var require_color_name = __commonJS({
|
|
52
|
+
"../../node_modules/.pnpm/color-name@1.1.3/node_modules/color-name/index.js"(exports2, module2) {
|
|
53
|
+
"use strict";
|
|
54
|
+
module2.exports = {
|
|
55
|
+
"aliceblue": [240, 248, 255],
|
|
56
|
+
"antiquewhite": [250, 235, 215],
|
|
57
|
+
"aqua": [0, 255, 255],
|
|
58
|
+
"aquamarine": [127, 255, 212],
|
|
59
|
+
"azure": [240, 255, 255],
|
|
60
|
+
"beige": [245, 245, 220],
|
|
61
|
+
"bisque": [255, 228, 196],
|
|
62
|
+
"black": [0, 0, 0],
|
|
63
|
+
"blanchedalmond": [255, 235, 205],
|
|
64
|
+
"blue": [0, 0, 255],
|
|
65
|
+
"blueviolet": [138, 43, 226],
|
|
66
|
+
"brown": [165, 42, 42],
|
|
67
|
+
"burlywood": [222, 184, 135],
|
|
68
|
+
"cadetblue": [95, 158, 160],
|
|
69
|
+
"chartreuse": [127, 255, 0],
|
|
70
|
+
"chocolate": [210, 105, 30],
|
|
71
|
+
"coral": [255, 127, 80],
|
|
72
|
+
"cornflowerblue": [100, 149, 237],
|
|
73
|
+
"cornsilk": [255, 248, 220],
|
|
74
|
+
"crimson": [220, 20, 60],
|
|
75
|
+
"cyan": [0, 255, 255],
|
|
76
|
+
"darkblue": [0, 0, 139],
|
|
77
|
+
"darkcyan": [0, 139, 139],
|
|
78
|
+
"darkgoldenrod": [184, 134, 11],
|
|
79
|
+
"darkgray": [169, 169, 169],
|
|
80
|
+
"darkgreen": [0, 100, 0],
|
|
81
|
+
"darkgrey": [169, 169, 169],
|
|
82
|
+
"darkkhaki": [189, 183, 107],
|
|
83
|
+
"darkmagenta": [139, 0, 139],
|
|
84
|
+
"darkolivegreen": [85, 107, 47],
|
|
85
|
+
"darkorange": [255, 140, 0],
|
|
86
|
+
"darkorchid": [153, 50, 204],
|
|
87
|
+
"darkred": [139, 0, 0],
|
|
88
|
+
"darksalmon": [233, 150, 122],
|
|
89
|
+
"darkseagreen": [143, 188, 143],
|
|
90
|
+
"darkslateblue": [72, 61, 139],
|
|
91
|
+
"darkslategray": [47, 79, 79],
|
|
92
|
+
"darkslategrey": [47, 79, 79],
|
|
93
|
+
"darkturquoise": [0, 206, 209],
|
|
94
|
+
"darkviolet": [148, 0, 211],
|
|
95
|
+
"deeppink": [255, 20, 147],
|
|
96
|
+
"deepskyblue": [0, 191, 255],
|
|
97
|
+
"dimgray": [105, 105, 105],
|
|
98
|
+
"dimgrey": [105, 105, 105],
|
|
99
|
+
"dodgerblue": [30, 144, 255],
|
|
100
|
+
"firebrick": [178, 34, 34],
|
|
101
|
+
"floralwhite": [255, 250, 240],
|
|
102
|
+
"forestgreen": [34, 139, 34],
|
|
103
|
+
"fuchsia": [255, 0, 255],
|
|
104
|
+
"gainsboro": [220, 220, 220],
|
|
105
|
+
"ghostwhite": [248, 248, 255],
|
|
106
|
+
"gold": [255, 215, 0],
|
|
107
|
+
"goldenrod": [218, 165, 32],
|
|
108
|
+
"gray": [128, 128, 128],
|
|
109
|
+
"green": [0, 128, 0],
|
|
110
|
+
"greenyellow": [173, 255, 47],
|
|
111
|
+
"grey": [128, 128, 128],
|
|
112
|
+
"honeydew": [240, 255, 240],
|
|
113
|
+
"hotpink": [255, 105, 180],
|
|
114
|
+
"indianred": [205, 92, 92],
|
|
115
|
+
"indigo": [75, 0, 130],
|
|
116
|
+
"ivory": [255, 255, 240],
|
|
117
|
+
"khaki": [240, 230, 140],
|
|
118
|
+
"lavender": [230, 230, 250],
|
|
119
|
+
"lavenderblush": [255, 240, 245],
|
|
120
|
+
"lawngreen": [124, 252, 0],
|
|
121
|
+
"lemonchiffon": [255, 250, 205],
|
|
122
|
+
"lightblue": [173, 216, 230],
|
|
123
|
+
"lightcoral": [240, 128, 128],
|
|
124
|
+
"lightcyan": [224, 255, 255],
|
|
125
|
+
"lightgoldenrodyellow": [250, 250, 210],
|
|
126
|
+
"lightgray": [211, 211, 211],
|
|
127
|
+
"lightgreen": [144, 238, 144],
|
|
128
|
+
"lightgrey": [211, 211, 211],
|
|
129
|
+
"lightpink": [255, 182, 193],
|
|
130
|
+
"lightsalmon": [255, 160, 122],
|
|
131
|
+
"lightseagreen": [32, 178, 170],
|
|
132
|
+
"lightskyblue": [135, 206, 250],
|
|
133
|
+
"lightslategray": [119, 136, 153],
|
|
134
|
+
"lightslategrey": [119, 136, 153],
|
|
135
|
+
"lightsteelblue": [176, 196, 222],
|
|
136
|
+
"lightyellow": [255, 255, 224],
|
|
137
|
+
"lime": [0, 255, 0],
|
|
138
|
+
"limegreen": [50, 205, 50],
|
|
139
|
+
"linen": [250, 240, 230],
|
|
140
|
+
"magenta": [255, 0, 255],
|
|
141
|
+
"maroon": [128, 0, 0],
|
|
142
|
+
"mediumaquamarine": [102, 205, 170],
|
|
143
|
+
"mediumblue": [0, 0, 205],
|
|
144
|
+
"mediumorchid": [186, 85, 211],
|
|
145
|
+
"mediumpurple": [147, 112, 219],
|
|
146
|
+
"mediumseagreen": [60, 179, 113],
|
|
147
|
+
"mediumslateblue": [123, 104, 238],
|
|
148
|
+
"mediumspringgreen": [0, 250, 154],
|
|
149
|
+
"mediumturquoise": [72, 209, 204],
|
|
150
|
+
"mediumvioletred": [199, 21, 133],
|
|
151
|
+
"midnightblue": [25, 25, 112],
|
|
152
|
+
"mintcream": [245, 255, 250],
|
|
153
|
+
"mistyrose": [255, 228, 225],
|
|
154
|
+
"moccasin": [255, 228, 181],
|
|
155
|
+
"navajowhite": [255, 222, 173],
|
|
156
|
+
"navy": [0, 0, 128],
|
|
157
|
+
"oldlace": [253, 245, 230],
|
|
158
|
+
"olive": [128, 128, 0],
|
|
159
|
+
"olivedrab": [107, 142, 35],
|
|
160
|
+
"orange": [255, 165, 0],
|
|
161
|
+
"orangered": [255, 69, 0],
|
|
162
|
+
"orchid": [218, 112, 214],
|
|
163
|
+
"palegoldenrod": [238, 232, 170],
|
|
164
|
+
"palegreen": [152, 251, 152],
|
|
165
|
+
"paleturquoise": [175, 238, 238],
|
|
166
|
+
"palevioletred": [219, 112, 147],
|
|
167
|
+
"papayawhip": [255, 239, 213],
|
|
168
|
+
"peachpuff": [255, 218, 185],
|
|
169
|
+
"peru": [205, 133, 63],
|
|
170
|
+
"pink": [255, 192, 203],
|
|
171
|
+
"plum": [221, 160, 221],
|
|
172
|
+
"powderblue": [176, 224, 230],
|
|
173
|
+
"purple": [128, 0, 128],
|
|
174
|
+
"rebeccapurple": [102, 51, 153],
|
|
175
|
+
"red": [255, 0, 0],
|
|
176
|
+
"rosybrown": [188, 143, 143],
|
|
177
|
+
"royalblue": [65, 105, 225],
|
|
178
|
+
"saddlebrown": [139, 69, 19],
|
|
179
|
+
"salmon": [250, 128, 114],
|
|
180
|
+
"sandybrown": [244, 164, 96],
|
|
181
|
+
"seagreen": [46, 139, 87],
|
|
182
|
+
"seashell": [255, 245, 238],
|
|
183
|
+
"sienna": [160, 82, 45],
|
|
184
|
+
"silver": [192, 192, 192],
|
|
185
|
+
"skyblue": [135, 206, 235],
|
|
186
|
+
"slateblue": [106, 90, 205],
|
|
187
|
+
"slategray": [112, 128, 144],
|
|
188
|
+
"slategrey": [112, 128, 144],
|
|
189
|
+
"snow": [255, 250, 250],
|
|
190
|
+
"springgreen": [0, 255, 127],
|
|
191
|
+
"steelblue": [70, 130, 180],
|
|
192
|
+
"tan": [210, 180, 140],
|
|
193
|
+
"teal": [0, 128, 128],
|
|
194
|
+
"thistle": [216, 191, 216],
|
|
195
|
+
"tomato": [255, 99, 71],
|
|
196
|
+
"turquoise": [64, 224, 208],
|
|
197
|
+
"violet": [238, 130, 238],
|
|
198
|
+
"wheat": [245, 222, 179],
|
|
199
|
+
"white": [255, 255, 255],
|
|
200
|
+
"whitesmoke": [245, 245, 245],
|
|
201
|
+
"yellow": [255, 255, 0],
|
|
202
|
+
"yellowgreen": [154, 205, 50]
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
// ../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/conversions.js
|
|
208
|
+
var require_conversions = __commonJS({
|
|
209
|
+
"../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/conversions.js"(exports2, module2) {
|
|
210
|
+
var cssKeywords = require_color_name();
|
|
211
|
+
var reverseKeywords = {};
|
|
212
|
+
for (key in cssKeywords) {
|
|
213
|
+
if (cssKeywords.hasOwnProperty(key)) {
|
|
214
|
+
reverseKeywords[cssKeywords[key]] = key;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
var key;
|
|
218
|
+
var convert = module2.exports = {
|
|
219
|
+
rgb: { channels: 3, labels: "rgb" },
|
|
220
|
+
hsl: { channels: 3, labels: "hsl" },
|
|
221
|
+
hsv: { channels: 3, labels: "hsv" },
|
|
222
|
+
hwb: { channels: 3, labels: "hwb" },
|
|
223
|
+
cmyk: { channels: 4, labels: "cmyk" },
|
|
224
|
+
xyz: { channels: 3, labels: "xyz" },
|
|
225
|
+
lab: { channels: 3, labels: "lab" },
|
|
226
|
+
lch: { channels: 3, labels: "lch" },
|
|
227
|
+
hex: { channels: 1, labels: ["hex"] },
|
|
228
|
+
keyword: { channels: 1, labels: ["keyword"] },
|
|
229
|
+
ansi16: { channels: 1, labels: ["ansi16"] },
|
|
230
|
+
ansi256: { channels: 1, labels: ["ansi256"] },
|
|
231
|
+
hcg: { channels: 3, labels: ["h", "c", "g"] },
|
|
232
|
+
apple: { channels: 3, labels: ["r16", "g16", "b16"] },
|
|
233
|
+
gray: { channels: 1, labels: ["gray"] }
|
|
234
|
+
};
|
|
235
|
+
for (model in convert) {
|
|
236
|
+
if (convert.hasOwnProperty(model)) {
|
|
237
|
+
if (!("channels" in convert[model])) {
|
|
238
|
+
throw new Error("missing channels property: " + model);
|
|
239
|
+
}
|
|
240
|
+
if (!("labels" in convert[model])) {
|
|
241
|
+
throw new Error("missing channel labels property: " + model);
|
|
242
|
+
}
|
|
243
|
+
if (convert[model].labels.length !== convert[model].channels) {
|
|
244
|
+
throw new Error("channel and label counts mismatch: " + model);
|
|
245
|
+
}
|
|
246
|
+
channels = convert[model].channels;
|
|
247
|
+
labels = convert[model].labels;
|
|
248
|
+
delete convert[model].channels;
|
|
249
|
+
delete convert[model].labels;
|
|
250
|
+
Object.defineProperty(convert[model], "channels", { value: channels });
|
|
251
|
+
Object.defineProperty(convert[model], "labels", { value: labels });
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
var channels;
|
|
255
|
+
var labels;
|
|
256
|
+
var model;
|
|
257
|
+
convert.rgb.hsl = function(rgb) {
|
|
258
|
+
var r2 = rgb[0] / 255;
|
|
259
|
+
var g2 = rgb[1] / 255;
|
|
260
|
+
var b2 = rgb[2] / 255;
|
|
261
|
+
var min = Math.min(r2, g2, b2);
|
|
262
|
+
var max = Math.max(r2, g2, b2);
|
|
263
|
+
var delta = max - min;
|
|
264
|
+
var h2;
|
|
265
|
+
var s;
|
|
266
|
+
var l2;
|
|
267
|
+
if (max === min) {
|
|
268
|
+
h2 = 0;
|
|
269
|
+
} else if (r2 === max) {
|
|
270
|
+
h2 = (g2 - b2) / delta;
|
|
271
|
+
} else if (g2 === max) {
|
|
272
|
+
h2 = 2 + (b2 - r2) / delta;
|
|
273
|
+
} else if (b2 === max) {
|
|
274
|
+
h2 = 4 + (r2 - g2) / delta;
|
|
275
|
+
}
|
|
276
|
+
h2 = Math.min(h2 * 60, 360);
|
|
277
|
+
if (h2 < 0) {
|
|
278
|
+
h2 += 360;
|
|
279
|
+
}
|
|
280
|
+
l2 = (min + max) / 2;
|
|
281
|
+
if (max === min) {
|
|
282
|
+
s = 0;
|
|
283
|
+
} else if (l2 <= 0.5) {
|
|
284
|
+
s = delta / (max + min);
|
|
285
|
+
} else {
|
|
286
|
+
s = delta / (2 - max - min);
|
|
287
|
+
}
|
|
288
|
+
return [h2, s * 100, l2 * 100];
|
|
289
|
+
};
|
|
290
|
+
convert.rgb.hsv = function(rgb) {
|
|
291
|
+
var rdif;
|
|
292
|
+
var gdif;
|
|
293
|
+
var bdif;
|
|
294
|
+
var h2;
|
|
295
|
+
var s;
|
|
296
|
+
var r2 = rgb[0] / 255;
|
|
297
|
+
var g2 = rgb[1] / 255;
|
|
298
|
+
var b2 = rgb[2] / 255;
|
|
299
|
+
var v2 = Math.max(r2, g2, b2);
|
|
300
|
+
var diff = v2 - Math.min(r2, g2, b2);
|
|
301
|
+
var diffc = function(c2) {
|
|
302
|
+
return (v2 - c2) / 6 / diff + 1 / 2;
|
|
303
|
+
};
|
|
304
|
+
if (diff === 0) {
|
|
305
|
+
h2 = s = 0;
|
|
306
|
+
} else {
|
|
307
|
+
s = diff / v2;
|
|
308
|
+
rdif = diffc(r2);
|
|
309
|
+
gdif = diffc(g2);
|
|
310
|
+
bdif = diffc(b2);
|
|
311
|
+
if (r2 === v2) {
|
|
312
|
+
h2 = bdif - gdif;
|
|
313
|
+
} else if (g2 === v2) {
|
|
314
|
+
h2 = 1 / 3 + rdif - bdif;
|
|
315
|
+
} else if (b2 === v2) {
|
|
316
|
+
h2 = 2 / 3 + gdif - rdif;
|
|
317
|
+
}
|
|
318
|
+
if (h2 < 0) {
|
|
319
|
+
h2 += 1;
|
|
320
|
+
} else if (h2 > 1) {
|
|
321
|
+
h2 -= 1;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
return [
|
|
325
|
+
h2 * 360,
|
|
326
|
+
s * 100,
|
|
327
|
+
v2 * 100
|
|
328
|
+
];
|
|
329
|
+
};
|
|
330
|
+
convert.rgb.hwb = function(rgb) {
|
|
331
|
+
var r2 = rgb[0];
|
|
332
|
+
var g2 = rgb[1];
|
|
333
|
+
var b2 = rgb[2];
|
|
334
|
+
var h2 = convert.rgb.hsl(rgb)[0];
|
|
335
|
+
var w2 = 1 / 255 * Math.min(r2, Math.min(g2, b2));
|
|
336
|
+
b2 = 1 - 1 / 255 * Math.max(r2, Math.max(g2, b2));
|
|
337
|
+
return [h2, w2 * 100, b2 * 100];
|
|
338
|
+
};
|
|
339
|
+
convert.rgb.cmyk = function(rgb) {
|
|
340
|
+
var r2 = rgb[0] / 255;
|
|
341
|
+
var g2 = rgb[1] / 255;
|
|
342
|
+
var b2 = rgb[2] / 255;
|
|
343
|
+
var c2;
|
|
344
|
+
var m2;
|
|
345
|
+
var y2;
|
|
346
|
+
var k2;
|
|
347
|
+
k2 = Math.min(1 - r2, 1 - g2, 1 - b2);
|
|
348
|
+
c2 = (1 - r2 - k2) / (1 - k2) || 0;
|
|
349
|
+
m2 = (1 - g2 - k2) / (1 - k2) || 0;
|
|
350
|
+
y2 = (1 - b2 - k2) / (1 - k2) || 0;
|
|
351
|
+
return [c2 * 100, m2 * 100, y2 * 100, k2 * 100];
|
|
352
|
+
};
|
|
353
|
+
function comparativeDistance(x2, y2) {
|
|
354
|
+
return Math.pow(x2[0] - y2[0], 2) + Math.pow(x2[1] - y2[1], 2) + Math.pow(x2[2] - y2[2], 2);
|
|
355
|
+
}
|
|
356
|
+
convert.rgb.keyword = function(rgb) {
|
|
357
|
+
var reversed = reverseKeywords[rgb];
|
|
358
|
+
if (reversed) {
|
|
359
|
+
return reversed;
|
|
360
|
+
}
|
|
361
|
+
var currentClosestDistance = Infinity;
|
|
362
|
+
var currentClosestKeyword;
|
|
363
|
+
for (var keyword in cssKeywords) {
|
|
364
|
+
if (cssKeywords.hasOwnProperty(keyword)) {
|
|
365
|
+
var value = cssKeywords[keyword];
|
|
366
|
+
var distance = comparativeDistance(rgb, value);
|
|
367
|
+
if (distance < currentClosestDistance) {
|
|
368
|
+
currentClosestDistance = distance;
|
|
369
|
+
currentClosestKeyword = keyword;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
return currentClosestKeyword;
|
|
374
|
+
};
|
|
375
|
+
convert.keyword.rgb = function(keyword) {
|
|
376
|
+
return cssKeywords[keyword];
|
|
377
|
+
};
|
|
378
|
+
convert.rgb.xyz = function(rgb) {
|
|
379
|
+
var r2 = rgb[0] / 255;
|
|
380
|
+
var g2 = rgb[1] / 255;
|
|
381
|
+
var b2 = rgb[2] / 255;
|
|
382
|
+
r2 = r2 > 0.04045 ? Math.pow((r2 + 0.055) / 1.055, 2.4) : r2 / 12.92;
|
|
383
|
+
g2 = g2 > 0.04045 ? Math.pow((g2 + 0.055) / 1.055, 2.4) : g2 / 12.92;
|
|
384
|
+
b2 = b2 > 0.04045 ? Math.pow((b2 + 0.055) / 1.055, 2.4) : b2 / 12.92;
|
|
385
|
+
var x2 = r2 * 0.4124 + g2 * 0.3576 + b2 * 0.1805;
|
|
386
|
+
var y2 = r2 * 0.2126 + g2 * 0.7152 + b2 * 0.0722;
|
|
387
|
+
var z2 = r2 * 0.0193 + g2 * 0.1192 + b2 * 0.9505;
|
|
388
|
+
return [x2 * 100, y2 * 100, z2 * 100];
|
|
389
|
+
};
|
|
390
|
+
convert.rgb.lab = function(rgb) {
|
|
391
|
+
var xyz = convert.rgb.xyz(rgb);
|
|
392
|
+
var x2 = xyz[0];
|
|
393
|
+
var y2 = xyz[1];
|
|
394
|
+
var z2 = xyz[2];
|
|
395
|
+
var l2;
|
|
396
|
+
var a;
|
|
397
|
+
var b2;
|
|
398
|
+
x2 /= 95.047;
|
|
399
|
+
y2 /= 100;
|
|
400
|
+
z2 /= 108.883;
|
|
401
|
+
x2 = x2 > 8856e-6 ? Math.pow(x2, 1 / 3) : 7.787 * x2 + 16 / 116;
|
|
402
|
+
y2 = y2 > 8856e-6 ? Math.pow(y2, 1 / 3) : 7.787 * y2 + 16 / 116;
|
|
403
|
+
z2 = z2 > 8856e-6 ? Math.pow(z2, 1 / 3) : 7.787 * z2 + 16 / 116;
|
|
404
|
+
l2 = 116 * y2 - 16;
|
|
405
|
+
a = 500 * (x2 - y2);
|
|
406
|
+
b2 = 200 * (y2 - z2);
|
|
407
|
+
return [l2, a, b2];
|
|
408
|
+
};
|
|
409
|
+
convert.hsl.rgb = function(hsl) {
|
|
410
|
+
var h2 = hsl[0] / 360;
|
|
411
|
+
var s = hsl[1] / 100;
|
|
412
|
+
var l2 = hsl[2] / 100;
|
|
413
|
+
var t1;
|
|
414
|
+
var t2;
|
|
415
|
+
var t3;
|
|
416
|
+
var rgb;
|
|
417
|
+
var val;
|
|
418
|
+
if (s === 0) {
|
|
419
|
+
val = l2 * 255;
|
|
420
|
+
return [val, val, val];
|
|
421
|
+
}
|
|
422
|
+
if (l2 < 0.5) {
|
|
423
|
+
t2 = l2 * (1 + s);
|
|
424
|
+
} else {
|
|
425
|
+
t2 = l2 + s - l2 * s;
|
|
426
|
+
}
|
|
427
|
+
t1 = 2 * l2 - t2;
|
|
428
|
+
rgb = [0, 0, 0];
|
|
429
|
+
for (var i = 0; i < 3; i++) {
|
|
430
|
+
t3 = h2 + 1 / 3 * -(i - 1);
|
|
431
|
+
if (t3 < 0) {
|
|
432
|
+
t3++;
|
|
433
|
+
}
|
|
434
|
+
if (t3 > 1) {
|
|
435
|
+
t3--;
|
|
436
|
+
}
|
|
437
|
+
if (6 * t3 < 1) {
|
|
438
|
+
val = t1 + (t2 - t1) * 6 * t3;
|
|
439
|
+
} else if (2 * t3 < 1) {
|
|
440
|
+
val = t2;
|
|
441
|
+
} else if (3 * t3 < 2) {
|
|
442
|
+
val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
|
|
443
|
+
} else {
|
|
444
|
+
val = t1;
|
|
445
|
+
}
|
|
446
|
+
rgb[i] = val * 255;
|
|
447
|
+
}
|
|
448
|
+
return rgb;
|
|
449
|
+
};
|
|
450
|
+
convert.hsl.hsv = function(hsl) {
|
|
451
|
+
var h2 = hsl[0];
|
|
452
|
+
var s = hsl[1] / 100;
|
|
453
|
+
var l2 = hsl[2] / 100;
|
|
454
|
+
var smin = s;
|
|
455
|
+
var lmin = Math.max(l2, 0.01);
|
|
456
|
+
var sv;
|
|
457
|
+
var v2;
|
|
458
|
+
l2 *= 2;
|
|
459
|
+
s *= l2 <= 1 ? l2 : 2 - l2;
|
|
460
|
+
smin *= lmin <= 1 ? lmin : 2 - lmin;
|
|
461
|
+
v2 = (l2 + s) / 2;
|
|
462
|
+
sv = l2 === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l2 + s);
|
|
463
|
+
return [h2, sv * 100, v2 * 100];
|
|
464
|
+
};
|
|
465
|
+
convert.hsv.rgb = function(hsv) {
|
|
466
|
+
var h2 = hsv[0] / 60;
|
|
467
|
+
var s = hsv[1] / 100;
|
|
468
|
+
var v2 = hsv[2] / 100;
|
|
469
|
+
var hi = Math.floor(h2) % 6;
|
|
470
|
+
var f = h2 - Math.floor(h2);
|
|
471
|
+
var p2 = 255 * v2 * (1 - s);
|
|
472
|
+
var q2 = 255 * v2 * (1 - s * f);
|
|
473
|
+
var t = 255 * v2 * (1 - s * (1 - f));
|
|
474
|
+
v2 *= 255;
|
|
475
|
+
switch (hi) {
|
|
476
|
+
case 0:
|
|
477
|
+
return [v2, t, p2];
|
|
478
|
+
case 1:
|
|
479
|
+
return [q2, v2, p2];
|
|
480
|
+
case 2:
|
|
481
|
+
return [p2, v2, t];
|
|
482
|
+
case 3:
|
|
483
|
+
return [p2, q2, v2];
|
|
484
|
+
case 4:
|
|
485
|
+
return [t, p2, v2];
|
|
486
|
+
case 5:
|
|
487
|
+
return [v2, p2, q2];
|
|
488
|
+
}
|
|
489
|
+
};
|
|
490
|
+
convert.hsv.hsl = function(hsv) {
|
|
491
|
+
var h2 = hsv[0];
|
|
492
|
+
var s = hsv[1] / 100;
|
|
493
|
+
var v2 = hsv[2] / 100;
|
|
494
|
+
var vmin = Math.max(v2, 0.01);
|
|
495
|
+
var lmin;
|
|
496
|
+
var sl;
|
|
497
|
+
var l2;
|
|
498
|
+
l2 = (2 - s) * v2;
|
|
499
|
+
lmin = (2 - s) * vmin;
|
|
500
|
+
sl = s * vmin;
|
|
501
|
+
sl /= lmin <= 1 ? lmin : 2 - lmin;
|
|
502
|
+
sl = sl || 0;
|
|
503
|
+
l2 /= 2;
|
|
504
|
+
return [h2, sl * 100, l2 * 100];
|
|
505
|
+
};
|
|
506
|
+
convert.hwb.rgb = function(hwb) {
|
|
507
|
+
var h2 = hwb[0] / 360;
|
|
508
|
+
var wh = hwb[1] / 100;
|
|
509
|
+
var bl = hwb[2] / 100;
|
|
510
|
+
var ratio = wh + bl;
|
|
511
|
+
var i;
|
|
512
|
+
var v2;
|
|
513
|
+
var f;
|
|
514
|
+
var n;
|
|
515
|
+
if (ratio > 1) {
|
|
516
|
+
wh /= ratio;
|
|
517
|
+
bl /= ratio;
|
|
518
|
+
}
|
|
519
|
+
i = Math.floor(6 * h2);
|
|
520
|
+
v2 = 1 - bl;
|
|
521
|
+
f = 6 * h2 - i;
|
|
522
|
+
if ((i & 1) !== 0) {
|
|
523
|
+
f = 1 - f;
|
|
524
|
+
}
|
|
525
|
+
n = wh + f * (v2 - wh);
|
|
526
|
+
var r2;
|
|
527
|
+
var g2;
|
|
528
|
+
var b2;
|
|
529
|
+
switch (i) {
|
|
530
|
+
default:
|
|
531
|
+
case 6:
|
|
532
|
+
case 0:
|
|
533
|
+
r2 = v2;
|
|
534
|
+
g2 = n;
|
|
535
|
+
b2 = wh;
|
|
536
|
+
break;
|
|
537
|
+
case 1:
|
|
538
|
+
r2 = n;
|
|
539
|
+
g2 = v2;
|
|
540
|
+
b2 = wh;
|
|
541
|
+
break;
|
|
542
|
+
case 2:
|
|
543
|
+
r2 = wh;
|
|
544
|
+
g2 = v2;
|
|
545
|
+
b2 = n;
|
|
546
|
+
break;
|
|
547
|
+
case 3:
|
|
548
|
+
r2 = wh;
|
|
549
|
+
g2 = n;
|
|
550
|
+
b2 = v2;
|
|
551
|
+
break;
|
|
552
|
+
case 4:
|
|
553
|
+
r2 = n;
|
|
554
|
+
g2 = wh;
|
|
555
|
+
b2 = v2;
|
|
556
|
+
break;
|
|
557
|
+
case 5:
|
|
558
|
+
r2 = v2;
|
|
559
|
+
g2 = wh;
|
|
560
|
+
b2 = n;
|
|
561
|
+
break;
|
|
562
|
+
}
|
|
563
|
+
return [r2 * 255, g2 * 255, b2 * 255];
|
|
564
|
+
};
|
|
565
|
+
convert.cmyk.rgb = function(cmyk) {
|
|
566
|
+
var c2 = cmyk[0] / 100;
|
|
567
|
+
var m2 = cmyk[1] / 100;
|
|
568
|
+
var y2 = cmyk[2] / 100;
|
|
569
|
+
var k2 = cmyk[3] / 100;
|
|
570
|
+
var r2;
|
|
571
|
+
var g2;
|
|
572
|
+
var b2;
|
|
573
|
+
r2 = 1 - Math.min(1, c2 * (1 - k2) + k2);
|
|
574
|
+
g2 = 1 - Math.min(1, m2 * (1 - k2) + k2);
|
|
575
|
+
b2 = 1 - Math.min(1, y2 * (1 - k2) + k2);
|
|
576
|
+
return [r2 * 255, g2 * 255, b2 * 255];
|
|
577
|
+
};
|
|
578
|
+
convert.xyz.rgb = function(xyz) {
|
|
579
|
+
var x2 = xyz[0] / 100;
|
|
580
|
+
var y2 = xyz[1] / 100;
|
|
581
|
+
var z2 = xyz[2] / 100;
|
|
582
|
+
var r2;
|
|
583
|
+
var g2;
|
|
584
|
+
var b2;
|
|
585
|
+
r2 = x2 * 3.2406 + y2 * -1.5372 + z2 * -0.4986;
|
|
586
|
+
g2 = x2 * -0.9689 + y2 * 1.8758 + z2 * 0.0415;
|
|
587
|
+
b2 = x2 * 0.0557 + y2 * -0.204 + z2 * 1.057;
|
|
588
|
+
r2 = r2 > 31308e-7 ? 1.055 * Math.pow(r2, 1 / 2.4) - 0.055 : r2 * 12.92;
|
|
589
|
+
g2 = g2 > 31308e-7 ? 1.055 * Math.pow(g2, 1 / 2.4) - 0.055 : g2 * 12.92;
|
|
590
|
+
b2 = b2 > 31308e-7 ? 1.055 * Math.pow(b2, 1 / 2.4) - 0.055 : b2 * 12.92;
|
|
591
|
+
r2 = Math.min(Math.max(0, r2), 1);
|
|
592
|
+
g2 = Math.min(Math.max(0, g2), 1);
|
|
593
|
+
b2 = Math.min(Math.max(0, b2), 1);
|
|
594
|
+
return [r2 * 255, g2 * 255, b2 * 255];
|
|
595
|
+
};
|
|
596
|
+
convert.xyz.lab = function(xyz) {
|
|
597
|
+
var x2 = xyz[0];
|
|
598
|
+
var y2 = xyz[1];
|
|
599
|
+
var z2 = xyz[2];
|
|
600
|
+
var l2;
|
|
601
|
+
var a;
|
|
602
|
+
var b2;
|
|
603
|
+
x2 /= 95.047;
|
|
604
|
+
y2 /= 100;
|
|
605
|
+
z2 /= 108.883;
|
|
606
|
+
x2 = x2 > 8856e-6 ? Math.pow(x2, 1 / 3) : 7.787 * x2 + 16 / 116;
|
|
607
|
+
y2 = y2 > 8856e-6 ? Math.pow(y2, 1 / 3) : 7.787 * y2 + 16 / 116;
|
|
608
|
+
z2 = z2 > 8856e-6 ? Math.pow(z2, 1 / 3) : 7.787 * z2 + 16 / 116;
|
|
609
|
+
l2 = 116 * y2 - 16;
|
|
610
|
+
a = 500 * (x2 - y2);
|
|
611
|
+
b2 = 200 * (y2 - z2);
|
|
612
|
+
return [l2, a, b2];
|
|
613
|
+
};
|
|
614
|
+
convert.lab.xyz = function(lab) {
|
|
615
|
+
var l2 = lab[0];
|
|
616
|
+
var a = lab[1];
|
|
617
|
+
var b2 = lab[2];
|
|
618
|
+
var x2;
|
|
619
|
+
var y2;
|
|
620
|
+
var z2;
|
|
621
|
+
y2 = (l2 + 16) / 116;
|
|
622
|
+
x2 = a / 500 + y2;
|
|
623
|
+
z2 = y2 - b2 / 200;
|
|
624
|
+
var y22 = Math.pow(y2, 3);
|
|
625
|
+
var x22 = Math.pow(x2, 3);
|
|
626
|
+
var z22 = Math.pow(z2, 3);
|
|
627
|
+
y2 = y22 > 8856e-6 ? y22 : (y2 - 16 / 116) / 7.787;
|
|
628
|
+
x2 = x22 > 8856e-6 ? x22 : (x2 - 16 / 116) / 7.787;
|
|
629
|
+
z2 = z22 > 8856e-6 ? z22 : (z2 - 16 / 116) / 7.787;
|
|
630
|
+
x2 *= 95.047;
|
|
631
|
+
y2 *= 100;
|
|
632
|
+
z2 *= 108.883;
|
|
633
|
+
return [x2, y2, z2];
|
|
634
|
+
};
|
|
635
|
+
convert.lab.lch = function(lab) {
|
|
636
|
+
var l2 = lab[0];
|
|
637
|
+
var a = lab[1];
|
|
638
|
+
var b2 = lab[2];
|
|
639
|
+
var hr;
|
|
640
|
+
var h2;
|
|
641
|
+
var c2;
|
|
642
|
+
hr = Math.atan2(b2, a);
|
|
643
|
+
h2 = hr * 360 / 2 / Math.PI;
|
|
644
|
+
if (h2 < 0) {
|
|
645
|
+
h2 += 360;
|
|
646
|
+
}
|
|
647
|
+
c2 = Math.sqrt(a * a + b2 * b2);
|
|
648
|
+
return [l2, c2, h2];
|
|
649
|
+
};
|
|
650
|
+
convert.lch.lab = function(lch) {
|
|
651
|
+
var l2 = lch[0];
|
|
652
|
+
var c2 = lch[1];
|
|
653
|
+
var h2 = lch[2];
|
|
654
|
+
var a;
|
|
655
|
+
var b2;
|
|
656
|
+
var hr;
|
|
657
|
+
hr = h2 / 360 * 2 * Math.PI;
|
|
658
|
+
a = c2 * Math.cos(hr);
|
|
659
|
+
b2 = c2 * Math.sin(hr);
|
|
660
|
+
return [l2, a, b2];
|
|
661
|
+
};
|
|
662
|
+
convert.rgb.ansi16 = function(args) {
|
|
663
|
+
var r2 = args[0];
|
|
664
|
+
var g2 = args[1];
|
|
665
|
+
var b2 = args[2];
|
|
666
|
+
var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2];
|
|
667
|
+
value = Math.round(value / 50);
|
|
668
|
+
if (value === 0) {
|
|
669
|
+
return 30;
|
|
670
|
+
}
|
|
671
|
+
var ansi2 = 30 + (Math.round(b2 / 255) << 2 | Math.round(g2 / 255) << 1 | Math.round(r2 / 255));
|
|
672
|
+
if (value === 2) {
|
|
673
|
+
ansi2 += 60;
|
|
674
|
+
}
|
|
675
|
+
return ansi2;
|
|
676
|
+
};
|
|
677
|
+
convert.hsv.ansi16 = function(args) {
|
|
678
|
+
return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
|
|
679
|
+
};
|
|
680
|
+
convert.rgb.ansi256 = function(args) {
|
|
681
|
+
var r2 = args[0];
|
|
682
|
+
var g2 = args[1];
|
|
683
|
+
var b2 = args[2];
|
|
684
|
+
if (r2 === g2 && g2 === b2) {
|
|
685
|
+
if (r2 < 8) {
|
|
686
|
+
return 16;
|
|
687
|
+
}
|
|
688
|
+
if (r2 > 248) {
|
|
689
|
+
return 231;
|
|
690
|
+
}
|
|
691
|
+
return Math.round((r2 - 8) / 247 * 24) + 232;
|
|
692
|
+
}
|
|
693
|
+
var ansi2 = 16 + 36 * Math.round(r2 / 255 * 5) + 6 * Math.round(g2 / 255 * 5) + Math.round(b2 / 255 * 5);
|
|
694
|
+
return ansi2;
|
|
695
|
+
};
|
|
696
|
+
convert.ansi16.rgb = function(args) {
|
|
697
|
+
var color = args % 10;
|
|
698
|
+
if (color === 0 || color === 7) {
|
|
699
|
+
if (args > 50) {
|
|
700
|
+
color += 3.5;
|
|
701
|
+
}
|
|
702
|
+
color = color / 10.5 * 255;
|
|
703
|
+
return [color, color, color];
|
|
704
|
+
}
|
|
705
|
+
var mult = (~~(args > 50) + 1) * 0.5;
|
|
706
|
+
var r2 = (color & 1) * mult * 255;
|
|
707
|
+
var g2 = (color >> 1 & 1) * mult * 255;
|
|
708
|
+
var b2 = (color >> 2 & 1) * mult * 255;
|
|
709
|
+
return [r2, g2, b2];
|
|
710
|
+
};
|
|
711
|
+
convert.ansi256.rgb = function(args) {
|
|
712
|
+
if (args >= 232) {
|
|
713
|
+
var c2 = (args - 232) * 10 + 8;
|
|
714
|
+
return [c2, c2, c2];
|
|
715
|
+
}
|
|
716
|
+
args -= 16;
|
|
717
|
+
var rem;
|
|
718
|
+
var r2 = Math.floor(args / 36) / 5 * 255;
|
|
719
|
+
var g2 = Math.floor((rem = args % 36) / 6) / 5 * 255;
|
|
720
|
+
var b2 = rem % 6 / 5 * 255;
|
|
721
|
+
return [r2, g2, b2];
|
|
722
|
+
};
|
|
723
|
+
convert.rgb.hex = function(args) {
|
|
724
|
+
var integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
|
|
725
|
+
var string = integer.toString(16).toUpperCase();
|
|
726
|
+
return "000000".substring(string.length) + string;
|
|
727
|
+
};
|
|
728
|
+
convert.hex.rgb = function(args) {
|
|
729
|
+
var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
|
|
730
|
+
if (!match) {
|
|
731
|
+
return [0, 0, 0];
|
|
732
|
+
}
|
|
733
|
+
var colorString = match[0];
|
|
734
|
+
if (match[0].length === 3) {
|
|
735
|
+
colorString = colorString.split("").map(function(char) {
|
|
736
|
+
return char + char;
|
|
737
|
+
}).join("");
|
|
738
|
+
}
|
|
739
|
+
var integer = parseInt(colorString, 16);
|
|
740
|
+
var r2 = integer >> 16 & 255;
|
|
741
|
+
var g2 = integer >> 8 & 255;
|
|
742
|
+
var b2 = integer & 255;
|
|
743
|
+
return [r2, g2, b2];
|
|
744
|
+
};
|
|
745
|
+
convert.rgb.hcg = function(rgb) {
|
|
746
|
+
var r2 = rgb[0] / 255;
|
|
747
|
+
var g2 = rgb[1] / 255;
|
|
748
|
+
var b2 = rgb[2] / 255;
|
|
749
|
+
var max = Math.max(Math.max(r2, g2), b2);
|
|
750
|
+
var min = Math.min(Math.min(r2, g2), b2);
|
|
751
|
+
var chroma = max - min;
|
|
752
|
+
var grayscale;
|
|
753
|
+
var hue;
|
|
754
|
+
if (chroma < 1) {
|
|
755
|
+
grayscale = min / (1 - chroma);
|
|
756
|
+
} else {
|
|
757
|
+
grayscale = 0;
|
|
758
|
+
}
|
|
759
|
+
if (chroma <= 0) {
|
|
760
|
+
hue = 0;
|
|
761
|
+
} else if (max === r2) {
|
|
762
|
+
hue = (g2 - b2) / chroma % 6;
|
|
763
|
+
} else if (max === g2) {
|
|
764
|
+
hue = 2 + (b2 - r2) / chroma;
|
|
765
|
+
} else {
|
|
766
|
+
hue = 4 + (r2 - g2) / chroma + 4;
|
|
767
|
+
}
|
|
768
|
+
hue /= 6;
|
|
769
|
+
hue %= 1;
|
|
770
|
+
return [hue * 360, chroma * 100, grayscale * 100];
|
|
771
|
+
};
|
|
772
|
+
convert.hsl.hcg = function(hsl) {
|
|
773
|
+
var s = hsl[1] / 100;
|
|
774
|
+
var l2 = hsl[2] / 100;
|
|
775
|
+
var c2 = 1;
|
|
776
|
+
var f = 0;
|
|
777
|
+
if (l2 < 0.5) {
|
|
778
|
+
c2 = 2 * s * l2;
|
|
779
|
+
} else {
|
|
780
|
+
c2 = 2 * s * (1 - l2);
|
|
781
|
+
}
|
|
782
|
+
if (c2 < 1) {
|
|
783
|
+
f = (l2 - 0.5 * c2) / (1 - c2);
|
|
784
|
+
}
|
|
785
|
+
return [hsl[0], c2 * 100, f * 100];
|
|
786
|
+
};
|
|
787
|
+
convert.hsv.hcg = function(hsv) {
|
|
788
|
+
var s = hsv[1] / 100;
|
|
789
|
+
var v2 = hsv[2] / 100;
|
|
790
|
+
var c2 = s * v2;
|
|
791
|
+
var f = 0;
|
|
792
|
+
if (c2 < 1) {
|
|
793
|
+
f = (v2 - c2) / (1 - c2);
|
|
794
|
+
}
|
|
795
|
+
return [hsv[0], c2 * 100, f * 100];
|
|
796
|
+
};
|
|
797
|
+
convert.hcg.rgb = function(hcg) {
|
|
798
|
+
var h2 = hcg[0] / 360;
|
|
799
|
+
var c2 = hcg[1] / 100;
|
|
800
|
+
var g2 = hcg[2] / 100;
|
|
801
|
+
if (c2 === 0) {
|
|
802
|
+
return [g2 * 255, g2 * 255, g2 * 255];
|
|
803
|
+
}
|
|
804
|
+
var pure = [0, 0, 0];
|
|
805
|
+
var hi = h2 % 1 * 6;
|
|
806
|
+
var v2 = hi % 1;
|
|
807
|
+
var w2 = 1 - v2;
|
|
808
|
+
var mg = 0;
|
|
809
|
+
switch (Math.floor(hi)) {
|
|
810
|
+
case 0:
|
|
811
|
+
pure[0] = 1;
|
|
812
|
+
pure[1] = v2;
|
|
813
|
+
pure[2] = 0;
|
|
814
|
+
break;
|
|
815
|
+
case 1:
|
|
816
|
+
pure[0] = w2;
|
|
817
|
+
pure[1] = 1;
|
|
818
|
+
pure[2] = 0;
|
|
819
|
+
break;
|
|
820
|
+
case 2:
|
|
821
|
+
pure[0] = 0;
|
|
822
|
+
pure[1] = 1;
|
|
823
|
+
pure[2] = v2;
|
|
824
|
+
break;
|
|
825
|
+
case 3:
|
|
826
|
+
pure[0] = 0;
|
|
827
|
+
pure[1] = w2;
|
|
828
|
+
pure[2] = 1;
|
|
829
|
+
break;
|
|
830
|
+
case 4:
|
|
831
|
+
pure[0] = v2;
|
|
832
|
+
pure[1] = 0;
|
|
833
|
+
pure[2] = 1;
|
|
834
|
+
break;
|
|
835
|
+
default:
|
|
836
|
+
pure[0] = 1;
|
|
837
|
+
pure[1] = 0;
|
|
838
|
+
pure[2] = w2;
|
|
839
|
+
}
|
|
840
|
+
mg = (1 - c2) * g2;
|
|
841
|
+
return [
|
|
842
|
+
(c2 * pure[0] + mg) * 255,
|
|
843
|
+
(c2 * pure[1] + mg) * 255,
|
|
844
|
+
(c2 * pure[2] + mg) * 255
|
|
845
|
+
];
|
|
846
|
+
};
|
|
847
|
+
convert.hcg.hsv = function(hcg) {
|
|
848
|
+
var c2 = hcg[1] / 100;
|
|
849
|
+
var g2 = hcg[2] / 100;
|
|
850
|
+
var v2 = c2 + g2 * (1 - c2);
|
|
851
|
+
var f = 0;
|
|
852
|
+
if (v2 > 0) {
|
|
853
|
+
f = c2 / v2;
|
|
854
|
+
}
|
|
855
|
+
return [hcg[0], f * 100, v2 * 100];
|
|
856
|
+
};
|
|
857
|
+
convert.hcg.hsl = function(hcg) {
|
|
858
|
+
var c2 = hcg[1] / 100;
|
|
859
|
+
var g2 = hcg[2] / 100;
|
|
860
|
+
var l2 = g2 * (1 - c2) + 0.5 * c2;
|
|
861
|
+
var s = 0;
|
|
862
|
+
if (l2 > 0 && l2 < 0.5) {
|
|
863
|
+
s = c2 / (2 * l2);
|
|
864
|
+
} else if (l2 >= 0.5 && l2 < 1) {
|
|
865
|
+
s = c2 / (2 * (1 - l2));
|
|
866
|
+
}
|
|
867
|
+
return [hcg[0], s * 100, l2 * 100];
|
|
868
|
+
};
|
|
869
|
+
convert.hcg.hwb = function(hcg) {
|
|
870
|
+
var c2 = hcg[1] / 100;
|
|
871
|
+
var g2 = hcg[2] / 100;
|
|
872
|
+
var v2 = c2 + g2 * (1 - c2);
|
|
873
|
+
return [hcg[0], (v2 - c2) * 100, (1 - v2) * 100];
|
|
874
|
+
};
|
|
875
|
+
convert.hwb.hcg = function(hwb) {
|
|
876
|
+
var w2 = hwb[1] / 100;
|
|
877
|
+
var b2 = hwb[2] / 100;
|
|
878
|
+
var v2 = 1 - b2;
|
|
879
|
+
var c2 = v2 - w2;
|
|
880
|
+
var g2 = 0;
|
|
881
|
+
if (c2 < 1) {
|
|
882
|
+
g2 = (v2 - c2) / (1 - c2);
|
|
883
|
+
}
|
|
884
|
+
return [hwb[0], c2 * 100, g2 * 100];
|
|
885
|
+
};
|
|
886
|
+
convert.apple.rgb = function(apple) {
|
|
887
|
+
return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
|
|
888
|
+
};
|
|
889
|
+
convert.rgb.apple = function(rgb) {
|
|
890
|
+
return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
|
|
891
|
+
};
|
|
892
|
+
convert.gray.rgb = function(args) {
|
|
893
|
+
return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
|
|
894
|
+
};
|
|
895
|
+
convert.gray.hsl = convert.gray.hsv = function(args) {
|
|
896
|
+
return [0, 0, args[0]];
|
|
897
|
+
};
|
|
898
|
+
convert.gray.hwb = function(gray2) {
|
|
899
|
+
return [0, 100, gray2[0]];
|
|
900
|
+
};
|
|
901
|
+
convert.gray.cmyk = function(gray2) {
|
|
902
|
+
return [0, 0, 0, gray2[0]];
|
|
903
|
+
};
|
|
904
|
+
convert.gray.lab = function(gray2) {
|
|
905
|
+
return [gray2[0], 0, 0];
|
|
906
|
+
};
|
|
907
|
+
convert.gray.hex = function(gray2) {
|
|
908
|
+
var val = Math.round(gray2[0] / 100 * 255) & 255;
|
|
909
|
+
var integer = (val << 16) + (val << 8) + val;
|
|
910
|
+
var string = integer.toString(16).toUpperCase();
|
|
911
|
+
return "000000".substring(string.length) + string;
|
|
912
|
+
};
|
|
913
|
+
convert.rgb.gray = function(rgb) {
|
|
914
|
+
var val = (rgb[0] + rgb[1] + rgb[2]) / 3;
|
|
915
|
+
return [val / 255 * 100];
|
|
916
|
+
};
|
|
917
|
+
}
|
|
918
|
+
});
|
|
919
|
+
|
|
920
|
+
// ../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/route.js
|
|
921
|
+
var require_route = __commonJS({
|
|
922
|
+
"../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/route.js"(exports2, module2) {
|
|
923
|
+
var conversions = require_conversions();
|
|
924
|
+
function buildGraph() {
|
|
925
|
+
var graph = {};
|
|
926
|
+
var models = Object.keys(conversions);
|
|
927
|
+
for (var len = models.length, i = 0; i < len; i++) {
|
|
928
|
+
graph[models[i]] = {
|
|
929
|
+
// http://jsperf.com/1-vs-infinity
|
|
930
|
+
// micro-opt, but this is simple.
|
|
931
|
+
distance: -1,
|
|
932
|
+
parent: null
|
|
933
|
+
};
|
|
934
|
+
}
|
|
935
|
+
return graph;
|
|
936
|
+
}
|
|
937
|
+
function deriveBFS(fromModel) {
|
|
938
|
+
var graph = buildGraph();
|
|
939
|
+
var queue = [fromModel];
|
|
940
|
+
graph[fromModel].distance = 0;
|
|
941
|
+
while (queue.length) {
|
|
942
|
+
var current = queue.pop();
|
|
943
|
+
var adjacents = Object.keys(conversions[current]);
|
|
944
|
+
for (var len = adjacents.length, i = 0; i < len; i++) {
|
|
945
|
+
var adjacent = adjacents[i];
|
|
946
|
+
var node = graph[adjacent];
|
|
947
|
+
if (node.distance === -1) {
|
|
948
|
+
node.distance = graph[current].distance + 1;
|
|
949
|
+
node.parent = current;
|
|
950
|
+
queue.unshift(adjacent);
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
return graph;
|
|
955
|
+
}
|
|
956
|
+
function link(from, to) {
|
|
957
|
+
return function(args) {
|
|
958
|
+
return to(from(args));
|
|
959
|
+
};
|
|
960
|
+
}
|
|
961
|
+
function wrapConversion(toModel, graph) {
|
|
962
|
+
var path3 = [graph[toModel].parent, toModel];
|
|
963
|
+
var fn = conversions[graph[toModel].parent][toModel];
|
|
964
|
+
var cur = graph[toModel].parent;
|
|
965
|
+
while (graph[cur].parent) {
|
|
966
|
+
path3.unshift(graph[cur].parent);
|
|
967
|
+
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
968
|
+
cur = graph[cur].parent;
|
|
969
|
+
}
|
|
970
|
+
fn.conversion = path3;
|
|
971
|
+
return fn;
|
|
972
|
+
}
|
|
973
|
+
module2.exports = function(fromModel) {
|
|
974
|
+
var graph = deriveBFS(fromModel);
|
|
975
|
+
var conversion = {};
|
|
976
|
+
var models = Object.keys(graph);
|
|
977
|
+
for (var len = models.length, i = 0; i < len; i++) {
|
|
978
|
+
var toModel = models[i];
|
|
979
|
+
var node = graph[toModel];
|
|
980
|
+
if (node.parent === null) {
|
|
981
|
+
continue;
|
|
982
|
+
}
|
|
983
|
+
conversion[toModel] = wrapConversion(toModel, graph);
|
|
984
|
+
}
|
|
985
|
+
return conversion;
|
|
986
|
+
};
|
|
987
|
+
}
|
|
988
|
+
});
|
|
989
|
+
|
|
990
|
+
// ../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/index.js
|
|
991
|
+
var require_color_convert = __commonJS({
|
|
992
|
+
"../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/index.js"(exports2, module2) {
|
|
993
|
+
var conversions = require_conversions();
|
|
994
|
+
var route = require_route();
|
|
995
|
+
var convert = {};
|
|
996
|
+
var models = Object.keys(conversions);
|
|
997
|
+
function wrapRaw(fn) {
|
|
998
|
+
var wrappedFn = function(args) {
|
|
999
|
+
if (args === void 0 || args === null) {
|
|
1000
|
+
return args;
|
|
1001
|
+
}
|
|
1002
|
+
if (arguments.length > 1) {
|
|
1003
|
+
args = Array.prototype.slice.call(arguments);
|
|
1004
|
+
}
|
|
1005
|
+
return fn(args);
|
|
1006
|
+
};
|
|
1007
|
+
if ("conversion" in fn) {
|
|
1008
|
+
wrappedFn.conversion = fn.conversion;
|
|
1009
|
+
}
|
|
1010
|
+
return wrappedFn;
|
|
1011
|
+
}
|
|
1012
|
+
function wrapRounded(fn) {
|
|
1013
|
+
var wrappedFn = function(args) {
|
|
1014
|
+
if (args === void 0 || args === null) {
|
|
1015
|
+
return args;
|
|
1016
|
+
}
|
|
1017
|
+
if (arguments.length > 1) {
|
|
1018
|
+
args = Array.prototype.slice.call(arguments);
|
|
1019
|
+
}
|
|
1020
|
+
var result = fn(args);
|
|
1021
|
+
if (typeof result === "object") {
|
|
1022
|
+
for (var len = result.length, i = 0; i < len; i++) {
|
|
1023
|
+
result[i] = Math.round(result[i]);
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
return result;
|
|
1027
|
+
};
|
|
1028
|
+
if ("conversion" in fn) {
|
|
1029
|
+
wrappedFn.conversion = fn.conversion;
|
|
1030
|
+
}
|
|
1031
|
+
return wrappedFn;
|
|
1032
|
+
}
|
|
1033
|
+
models.forEach(function(fromModel) {
|
|
1034
|
+
convert[fromModel] = {};
|
|
1035
|
+
Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels });
|
|
1036
|
+
Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels });
|
|
1037
|
+
var routes = route(fromModel);
|
|
1038
|
+
var routeModels = Object.keys(routes);
|
|
1039
|
+
routeModels.forEach(function(toModel) {
|
|
1040
|
+
var fn = routes[toModel];
|
|
1041
|
+
convert[fromModel][toModel] = wrapRounded(fn);
|
|
1042
|
+
convert[fromModel][toModel].raw = wrapRaw(fn);
|
|
1043
|
+
});
|
|
1044
|
+
});
|
|
1045
|
+
module2.exports = convert;
|
|
1046
|
+
}
|
|
1047
|
+
});
|
|
1048
|
+
|
|
1049
|
+
// ../../node_modules/.pnpm/ansi-styles@3.2.1/node_modules/ansi-styles/index.js
|
|
1050
|
+
var require_ansi_styles = __commonJS({
|
|
1051
|
+
"../../node_modules/.pnpm/ansi-styles@3.2.1/node_modules/ansi-styles/index.js"(exports2, module2) {
|
|
1052
|
+
"use strict";
|
|
1053
|
+
var colorConvert = require_color_convert();
|
|
1054
|
+
var wrapAnsi162 = (fn, offset) => function() {
|
|
1055
|
+
const code = fn.apply(colorConvert, arguments);
|
|
1056
|
+
return `\x1B[${code + offset}m`;
|
|
1057
|
+
};
|
|
1058
|
+
var wrapAnsi2562 = (fn, offset) => function() {
|
|
1059
|
+
const code = fn.apply(colorConvert, arguments);
|
|
1060
|
+
return `\x1B[${38 + offset};5;${code}m`;
|
|
1061
|
+
};
|
|
1062
|
+
var wrapAnsi16m2 = (fn, offset) => function() {
|
|
1063
|
+
const rgb = fn.apply(colorConvert, arguments);
|
|
1064
|
+
return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
|
|
1065
|
+
};
|
|
1066
|
+
function assembleStyles2() {
|
|
1067
|
+
const codes = /* @__PURE__ */ new Map();
|
|
1068
|
+
const styles2 = {
|
|
1069
|
+
modifier: {
|
|
1070
|
+
reset: [0, 0],
|
|
1071
|
+
// 21 isn't widely supported and 22 does the same thing
|
|
1072
|
+
bold: [1, 22],
|
|
1073
|
+
dim: [2, 22],
|
|
1074
|
+
italic: [3, 23],
|
|
1075
|
+
underline: [4, 24],
|
|
1076
|
+
inverse: [7, 27],
|
|
1077
|
+
hidden: [8, 28],
|
|
1078
|
+
strikethrough: [9, 29]
|
|
1079
|
+
},
|
|
1080
|
+
color: {
|
|
1081
|
+
black: [30, 39],
|
|
1082
|
+
red: [31, 39],
|
|
1083
|
+
green: [32, 39],
|
|
1084
|
+
yellow: [33, 39],
|
|
1085
|
+
blue: [34, 39],
|
|
1086
|
+
magenta: [35, 39],
|
|
1087
|
+
cyan: [36, 39],
|
|
1088
|
+
white: [37, 39],
|
|
1089
|
+
gray: [90, 39],
|
|
1090
|
+
// Bright color
|
|
1091
|
+
redBright: [91, 39],
|
|
1092
|
+
greenBright: [92, 39],
|
|
1093
|
+
yellowBright: [93, 39],
|
|
1094
|
+
blueBright: [94, 39],
|
|
1095
|
+
magentaBright: [95, 39],
|
|
1096
|
+
cyanBright: [96, 39],
|
|
1097
|
+
whiteBright: [97, 39]
|
|
1098
|
+
},
|
|
1099
|
+
bgColor: {
|
|
1100
|
+
bgBlack: [40, 49],
|
|
1101
|
+
bgRed: [41, 49],
|
|
1102
|
+
bgGreen: [42, 49],
|
|
1103
|
+
bgYellow: [43, 49],
|
|
1104
|
+
bgBlue: [44, 49],
|
|
1105
|
+
bgMagenta: [45, 49],
|
|
1106
|
+
bgCyan: [46, 49],
|
|
1107
|
+
bgWhite: [47, 49],
|
|
1108
|
+
// Bright color
|
|
1109
|
+
bgBlackBright: [100, 49],
|
|
1110
|
+
bgRedBright: [101, 49],
|
|
1111
|
+
bgGreenBright: [102, 49],
|
|
1112
|
+
bgYellowBright: [103, 49],
|
|
1113
|
+
bgBlueBright: [104, 49],
|
|
1114
|
+
bgMagentaBright: [105, 49],
|
|
1115
|
+
bgCyanBright: [106, 49],
|
|
1116
|
+
bgWhiteBright: [107, 49]
|
|
1117
|
+
}
|
|
1118
|
+
};
|
|
1119
|
+
styles2.color.grey = styles2.color.gray;
|
|
1120
|
+
for (const groupName of Object.keys(styles2)) {
|
|
1121
|
+
const group = styles2[groupName];
|
|
1122
|
+
for (const styleName of Object.keys(group)) {
|
|
1123
|
+
const style = group[styleName];
|
|
1124
|
+
styles2[styleName] = {
|
|
1125
|
+
open: `\x1B[${style[0]}m`,
|
|
1126
|
+
close: `\x1B[${style[1]}m`
|
|
1127
|
+
};
|
|
1128
|
+
group[styleName] = styles2[styleName];
|
|
1129
|
+
codes.set(style[0], style[1]);
|
|
1130
|
+
}
|
|
1131
|
+
Object.defineProperty(styles2, groupName, {
|
|
1132
|
+
value: group,
|
|
1133
|
+
enumerable: false
|
|
1134
|
+
});
|
|
1135
|
+
Object.defineProperty(styles2, "codes", {
|
|
1136
|
+
value: codes,
|
|
1137
|
+
enumerable: false
|
|
1138
|
+
});
|
|
1139
|
+
}
|
|
1140
|
+
const ansi2ansi = (n) => n;
|
|
1141
|
+
const rgb2rgb = (r2, g2, b2) => [r2, g2, b2];
|
|
1142
|
+
styles2.color.close = "\x1B[39m";
|
|
1143
|
+
styles2.bgColor.close = "\x1B[49m";
|
|
1144
|
+
styles2.color.ansi = {
|
|
1145
|
+
ansi: wrapAnsi162(ansi2ansi, 0)
|
|
1146
|
+
};
|
|
1147
|
+
styles2.color.ansi256 = {
|
|
1148
|
+
ansi256: wrapAnsi2562(ansi2ansi, 0)
|
|
1149
|
+
};
|
|
1150
|
+
styles2.color.ansi16m = {
|
|
1151
|
+
rgb: wrapAnsi16m2(rgb2rgb, 0)
|
|
1152
|
+
};
|
|
1153
|
+
styles2.bgColor.ansi = {
|
|
1154
|
+
ansi: wrapAnsi162(ansi2ansi, 10)
|
|
1155
|
+
};
|
|
1156
|
+
styles2.bgColor.ansi256 = {
|
|
1157
|
+
ansi256: wrapAnsi2562(ansi2ansi, 10)
|
|
1158
|
+
};
|
|
1159
|
+
styles2.bgColor.ansi16m = {
|
|
1160
|
+
rgb: wrapAnsi16m2(rgb2rgb, 10)
|
|
1161
|
+
};
|
|
1162
|
+
for (let key of Object.keys(colorConvert)) {
|
|
1163
|
+
if (typeof colorConvert[key] !== "object") {
|
|
1164
|
+
continue;
|
|
1165
|
+
}
|
|
1166
|
+
const suite = colorConvert[key];
|
|
1167
|
+
if (key === "ansi16") {
|
|
1168
|
+
key = "ansi";
|
|
1169
|
+
}
|
|
1170
|
+
if ("ansi16" in suite) {
|
|
1171
|
+
styles2.color.ansi[key] = wrapAnsi162(suite.ansi16, 0);
|
|
1172
|
+
styles2.bgColor.ansi[key] = wrapAnsi162(suite.ansi16, 10);
|
|
1173
|
+
}
|
|
1174
|
+
if ("ansi256" in suite) {
|
|
1175
|
+
styles2.color.ansi256[key] = wrapAnsi2562(suite.ansi256, 0);
|
|
1176
|
+
styles2.bgColor.ansi256[key] = wrapAnsi2562(suite.ansi256, 10);
|
|
1177
|
+
}
|
|
1178
|
+
if ("rgb" in suite) {
|
|
1179
|
+
styles2.color.ansi16m[key] = wrapAnsi16m2(suite.rgb, 0);
|
|
1180
|
+
styles2.bgColor.ansi16m[key] = wrapAnsi16m2(suite.rgb, 10);
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
return styles2;
|
|
1184
|
+
}
|
|
1185
|
+
Object.defineProperty(module2, "exports", {
|
|
1186
|
+
enumerable: true,
|
|
1187
|
+
get: assembleStyles2
|
|
1188
|
+
});
|
|
1189
|
+
}
|
|
1190
|
+
});
|
|
1191
|
+
|
|
1192
|
+
// ../../node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js
|
|
1193
|
+
var require_has_flag = __commonJS({
|
|
1194
|
+
"../../node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js"(exports2, module2) {
|
|
1195
|
+
"use strict";
|
|
1196
|
+
module2.exports = (flag, argv) => {
|
|
1197
|
+
argv = argv || process.argv;
|
|
1198
|
+
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
1199
|
+
const pos = argv.indexOf(prefix + flag);
|
|
1200
|
+
const terminatorPos = argv.indexOf("--");
|
|
1201
|
+
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
|
|
1202
|
+
};
|
|
1203
|
+
}
|
|
1204
|
+
});
|
|
1205
|
+
|
|
1206
|
+
// ../../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js
|
|
1207
|
+
var require_supports_color = __commonJS({
|
|
1208
|
+
"../../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js"(exports2, module2) {
|
|
1209
|
+
"use strict";
|
|
1210
|
+
var os = require("os");
|
|
1211
|
+
var hasFlag = require_has_flag();
|
|
1212
|
+
var env2 = process.env;
|
|
1213
|
+
var forceColor;
|
|
1214
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
|
|
1215
|
+
forceColor = false;
|
|
1216
|
+
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
1217
|
+
forceColor = true;
|
|
1218
|
+
}
|
|
1219
|
+
if ("FORCE_COLOR" in env2) {
|
|
1220
|
+
forceColor = env2.FORCE_COLOR.length === 0 || parseInt(env2.FORCE_COLOR, 10) !== 0;
|
|
1221
|
+
}
|
|
1222
|
+
function translateLevel(level) {
|
|
1223
|
+
if (level === 0) {
|
|
1224
|
+
return false;
|
|
1225
|
+
}
|
|
1226
|
+
return {
|
|
1227
|
+
level,
|
|
1228
|
+
hasBasic: true,
|
|
1229
|
+
has256: level >= 2,
|
|
1230
|
+
has16m: level >= 3
|
|
1231
|
+
};
|
|
1232
|
+
}
|
|
1233
|
+
function supportsColor(stream) {
|
|
1234
|
+
if (forceColor === false) {
|
|
1235
|
+
return 0;
|
|
1236
|
+
}
|
|
1237
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
1238
|
+
return 3;
|
|
1239
|
+
}
|
|
1240
|
+
if (hasFlag("color=256")) {
|
|
1241
|
+
return 2;
|
|
1242
|
+
}
|
|
1243
|
+
if (stream && !stream.isTTY && forceColor !== true) {
|
|
1244
|
+
return 0;
|
|
1245
|
+
}
|
|
1246
|
+
const min = forceColor ? 1 : 0;
|
|
1247
|
+
if (process.platform === "win32") {
|
|
1248
|
+
const osRelease = os.release().split(".");
|
|
1249
|
+
if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
1250
|
+
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
1251
|
+
}
|
|
1252
|
+
return 1;
|
|
1253
|
+
}
|
|
1254
|
+
if ("CI" in env2) {
|
|
1255
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env2) || env2.CI_NAME === "codeship") {
|
|
1256
|
+
return 1;
|
|
1257
|
+
}
|
|
1258
|
+
return min;
|
|
1259
|
+
}
|
|
1260
|
+
if ("TEAMCITY_VERSION" in env2) {
|
|
1261
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0;
|
|
1262
|
+
}
|
|
1263
|
+
if (env2.COLORTERM === "truecolor") {
|
|
1264
|
+
return 3;
|
|
1265
|
+
}
|
|
1266
|
+
if ("TERM_PROGRAM" in env2) {
|
|
1267
|
+
const version3 = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
1268
|
+
switch (env2.TERM_PROGRAM) {
|
|
1269
|
+
case "iTerm.app":
|
|
1270
|
+
return version3 >= 3 ? 3 : 2;
|
|
1271
|
+
case "Apple_Terminal":
|
|
1272
|
+
return 2;
|
|
1273
|
+
}
|
|
1274
|
+
}
|
|
1275
|
+
if (/-256(color)?$/i.test(env2.TERM)) {
|
|
1276
|
+
return 2;
|
|
1277
|
+
}
|
|
1278
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) {
|
|
1279
|
+
return 1;
|
|
1280
|
+
}
|
|
1281
|
+
if ("COLORTERM" in env2) {
|
|
1282
|
+
return 1;
|
|
1283
|
+
}
|
|
1284
|
+
if (env2.TERM === "dumb") {
|
|
1285
|
+
return min;
|
|
1286
|
+
}
|
|
1287
|
+
return min;
|
|
1288
|
+
}
|
|
1289
|
+
function getSupportLevel(stream) {
|
|
1290
|
+
const level = supportsColor(stream);
|
|
1291
|
+
return translateLevel(level);
|
|
1292
|
+
}
|
|
1293
|
+
module2.exports = {
|
|
1294
|
+
supportsColor: getSupportLevel,
|
|
1295
|
+
stdout: getSupportLevel(process.stdout),
|
|
1296
|
+
stderr: getSupportLevel(process.stderr)
|
|
1297
|
+
};
|
|
1298
|
+
}
|
|
1299
|
+
});
|
|
1300
|
+
|
|
1301
|
+
// ../../node_modules/.pnpm/chalk@2.4.2/node_modules/chalk/templates.js
|
|
1302
|
+
var require_templates = __commonJS({
|
|
1303
|
+
"../../node_modules/.pnpm/chalk@2.4.2/node_modules/chalk/templates.js"(exports2, module2) {
|
|
1304
|
+
"use strict";
|
|
1305
|
+
var TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
|
|
1306
|
+
var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
|
|
1307
|
+
var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
|
|
1308
|
+
var ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi;
|
|
1309
|
+
var ESCAPES3 = /* @__PURE__ */ new Map([
|
|
1310
|
+
["n", "\n"],
|
|
1311
|
+
["r", "\r"],
|
|
1312
|
+
["t", " "],
|
|
1313
|
+
["b", "\b"],
|
|
1314
|
+
["f", "\f"],
|
|
1315
|
+
["v", "\v"],
|
|
1316
|
+
["0", "\0"],
|
|
1317
|
+
["\\", "\\"],
|
|
1318
|
+
["e", "\x1B"],
|
|
1319
|
+
["a", "\x07"]
|
|
1320
|
+
]);
|
|
1321
|
+
function unescape(c2) {
|
|
1322
|
+
if (c2[0] === "u" && c2.length === 5 || c2[0] === "x" && c2.length === 3) {
|
|
1323
|
+
return String.fromCharCode(parseInt(c2.slice(1), 16));
|
|
1324
|
+
}
|
|
1325
|
+
return ESCAPES3.get(c2) || c2;
|
|
1326
|
+
}
|
|
1327
|
+
function parseArguments(name2, args) {
|
|
1328
|
+
const results = [];
|
|
1329
|
+
const chunks = args.trim().split(/\s*,\s*/g);
|
|
1330
|
+
let matches;
|
|
1331
|
+
for (const chunk of chunks) {
|
|
1332
|
+
if (!isNaN(chunk)) {
|
|
1333
|
+
results.push(Number(chunk));
|
|
1334
|
+
} else if (matches = chunk.match(STRING_REGEX)) {
|
|
1335
|
+
results.push(matches[2].replace(ESCAPE_REGEX, (m2, escape, chr) => escape ? unescape(escape) : chr));
|
|
1336
|
+
} else {
|
|
1337
|
+
throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name2}')`);
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
return results;
|
|
1341
|
+
}
|
|
1342
|
+
function parseStyle(style) {
|
|
1343
|
+
STYLE_REGEX.lastIndex = 0;
|
|
1344
|
+
const results = [];
|
|
1345
|
+
let matches;
|
|
1346
|
+
while ((matches = STYLE_REGEX.exec(style)) !== null) {
|
|
1347
|
+
const name2 = matches[1];
|
|
1348
|
+
if (matches[2]) {
|
|
1349
|
+
const args = parseArguments(name2, matches[2]);
|
|
1350
|
+
results.push([name2].concat(args));
|
|
1351
|
+
} else {
|
|
1352
|
+
results.push([name2]);
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
return results;
|
|
1356
|
+
}
|
|
1357
|
+
function buildStyle(chalk2, styles2) {
|
|
1358
|
+
const enabled = {};
|
|
1359
|
+
for (const layer of styles2) {
|
|
1360
|
+
for (const style of layer.styles) {
|
|
1361
|
+
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
let current = chalk2;
|
|
1365
|
+
for (const styleName of Object.keys(enabled)) {
|
|
1366
|
+
if (Array.isArray(enabled[styleName])) {
|
|
1367
|
+
if (!(styleName in current)) {
|
|
1368
|
+
throw new Error(`Unknown Chalk style: ${styleName}`);
|
|
1369
|
+
}
|
|
1370
|
+
if (enabled[styleName].length > 0) {
|
|
1371
|
+
current = current[styleName].apply(current, enabled[styleName]);
|
|
1372
|
+
} else {
|
|
1373
|
+
current = current[styleName];
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
return current;
|
|
1378
|
+
}
|
|
1379
|
+
module2.exports = (chalk2, tmp) => {
|
|
1380
|
+
const styles2 = [];
|
|
1381
|
+
const chunks = [];
|
|
1382
|
+
let chunk = [];
|
|
1383
|
+
tmp.replace(TEMPLATE_REGEX, (m2, escapeChar, inverse, style, close, chr) => {
|
|
1384
|
+
if (escapeChar) {
|
|
1385
|
+
chunk.push(unescape(escapeChar));
|
|
1386
|
+
} else if (style) {
|
|
1387
|
+
const str = chunk.join("");
|
|
1388
|
+
chunk = [];
|
|
1389
|
+
chunks.push(styles2.length === 0 ? str : buildStyle(chalk2, styles2)(str));
|
|
1390
|
+
styles2.push({ inverse, styles: parseStyle(style) });
|
|
1391
|
+
} else if (close) {
|
|
1392
|
+
if (styles2.length === 0) {
|
|
1393
|
+
throw new Error("Found extraneous } in Chalk template literal");
|
|
1394
|
+
}
|
|
1395
|
+
chunks.push(buildStyle(chalk2, styles2)(chunk.join("")));
|
|
1396
|
+
chunk = [];
|
|
1397
|
+
styles2.pop();
|
|
1398
|
+
} else {
|
|
1399
|
+
chunk.push(chr);
|
|
1400
|
+
}
|
|
1401
|
+
});
|
|
1402
|
+
chunks.push(chunk.join(""));
|
|
1403
|
+
if (styles2.length > 0) {
|
|
1404
|
+
const errMsg = `Chalk template literal is missing ${styles2.length} closing bracket${styles2.length === 1 ? "" : "s"} (\`}\`)`;
|
|
1405
|
+
throw new Error(errMsg);
|
|
1406
|
+
}
|
|
1407
|
+
return chunks.join("");
|
|
1408
|
+
};
|
|
1409
|
+
}
|
|
1410
|
+
});
|
|
1411
|
+
|
|
1412
|
+
// ../../node_modules/.pnpm/chalk@2.4.2/node_modules/chalk/index.js
|
|
1413
|
+
var require_chalk = __commonJS({
|
|
1414
|
+
"../../node_modules/.pnpm/chalk@2.4.2/node_modules/chalk/index.js"(exports2, module2) {
|
|
1415
|
+
"use strict";
|
|
1416
|
+
var escapeStringRegexp = require_escape_string_regexp();
|
|
1417
|
+
var ansiStyles2 = require_ansi_styles();
|
|
1418
|
+
var stdoutColor = require_supports_color().stdout;
|
|
1419
|
+
var template = require_templates();
|
|
1420
|
+
var isSimpleWindowsTerm = process.platform === "win32" && !(process.env.TERM || "").toLowerCase().startsWith("xterm");
|
|
1421
|
+
var levelMapping = ["ansi", "ansi", "ansi256", "ansi16m"];
|
|
1422
|
+
var skipModels = /* @__PURE__ */ new Set(["gray"]);
|
|
1423
|
+
var styles2 = /* @__PURE__ */ Object.create(null);
|
|
1424
|
+
function applyOptions(obj, options) {
|
|
1425
|
+
options = options || {};
|
|
1426
|
+
const scLevel = stdoutColor ? stdoutColor.level : 0;
|
|
1427
|
+
obj.level = options.level === void 0 ? scLevel : options.level;
|
|
1428
|
+
obj.enabled = "enabled" in options ? options.enabled : obj.level > 0;
|
|
1429
|
+
}
|
|
1430
|
+
function Chalk(options) {
|
|
1431
|
+
if (!this || !(this instanceof Chalk) || this.template) {
|
|
1432
|
+
const chalk2 = {};
|
|
1433
|
+
applyOptions(chalk2, options);
|
|
1434
|
+
chalk2.template = function() {
|
|
1435
|
+
const args = [].slice.call(arguments);
|
|
1436
|
+
return chalkTag.apply(null, [chalk2.template].concat(args));
|
|
1437
|
+
};
|
|
1438
|
+
Object.setPrototypeOf(chalk2, Chalk.prototype);
|
|
1439
|
+
Object.setPrototypeOf(chalk2.template, chalk2);
|
|
1440
|
+
chalk2.template.constructor = Chalk;
|
|
1441
|
+
return chalk2.template;
|
|
1442
|
+
}
|
|
1443
|
+
applyOptions(this, options);
|
|
1444
|
+
}
|
|
1445
|
+
if (isSimpleWindowsTerm) {
|
|
1446
|
+
ansiStyles2.blue.open = "\x1B[94m";
|
|
1447
|
+
}
|
|
1448
|
+
for (const key of Object.keys(ansiStyles2)) {
|
|
1449
|
+
ansiStyles2[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles2[key].close), "g");
|
|
1450
|
+
styles2[key] = {
|
|
1451
|
+
get() {
|
|
1452
|
+
const codes = ansiStyles2[key];
|
|
1453
|
+
return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);
|
|
1454
|
+
}
|
|
1455
|
+
};
|
|
1456
|
+
}
|
|
1457
|
+
styles2.visible = {
|
|
1458
|
+
get() {
|
|
1459
|
+
return build.call(this, this._styles || [], true, "visible");
|
|
1460
|
+
}
|
|
1461
|
+
};
|
|
1462
|
+
ansiStyles2.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles2.color.close), "g");
|
|
1463
|
+
for (const model of Object.keys(ansiStyles2.color.ansi)) {
|
|
1464
|
+
if (skipModels.has(model)) {
|
|
1465
|
+
continue;
|
|
1466
|
+
}
|
|
1467
|
+
styles2[model] = {
|
|
1468
|
+
get() {
|
|
1469
|
+
const level = this.level;
|
|
1470
|
+
return function() {
|
|
1471
|
+
const open2 = ansiStyles2.color[levelMapping[level]][model].apply(null, arguments);
|
|
1472
|
+
const codes = {
|
|
1473
|
+
open: open2,
|
|
1474
|
+
close: ansiStyles2.color.close,
|
|
1475
|
+
closeRe: ansiStyles2.color.closeRe
|
|
1476
|
+
};
|
|
1477
|
+
return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
|
|
1478
|
+
};
|
|
1479
|
+
}
|
|
1480
|
+
};
|
|
1481
|
+
}
|
|
1482
|
+
ansiStyles2.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles2.bgColor.close), "g");
|
|
1483
|
+
for (const model of Object.keys(ansiStyles2.bgColor.ansi)) {
|
|
1484
|
+
if (skipModels.has(model)) {
|
|
1485
|
+
continue;
|
|
1486
|
+
}
|
|
1487
|
+
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
1488
|
+
styles2[bgModel] = {
|
|
1489
|
+
get() {
|
|
1490
|
+
const level = this.level;
|
|
1491
|
+
return function() {
|
|
1492
|
+
const open2 = ansiStyles2.bgColor[levelMapping[level]][model].apply(null, arguments);
|
|
1493
|
+
const codes = {
|
|
1494
|
+
open: open2,
|
|
1495
|
+
close: ansiStyles2.bgColor.close,
|
|
1496
|
+
closeRe: ansiStyles2.bgColor.closeRe
|
|
1497
|
+
};
|
|
1498
|
+
return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
|
|
1499
|
+
};
|
|
1500
|
+
}
|
|
1501
|
+
};
|
|
1502
|
+
}
|
|
1503
|
+
var proto = Object.defineProperties(() => {
|
|
1504
|
+
}, styles2);
|
|
1505
|
+
function build(_styles, _empty, key) {
|
|
1506
|
+
const builder = function() {
|
|
1507
|
+
return applyStyle.apply(builder, arguments);
|
|
1508
|
+
};
|
|
1509
|
+
builder._styles = _styles;
|
|
1510
|
+
builder._empty = _empty;
|
|
1511
|
+
const self = this;
|
|
1512
|
+
Object.defineProperty(builder, "level", {
|
|
1513
|
+
enumerable: true,
|
|
1514
|
+
get() {
|
|
1515
|
+
return self.level;
|
|
1516
|
+
},
|
|
1517
|
+
set(level) {
|
|
1518
|
+
self.level = level;
|
|
1519
|
+
}
|
|
1520
|
+
});
|
|
1521
|
+
Object.defineProperty(builder, "enabled", {
|
|
1522
|
+
enumerable: true,
|
|
1523
|
+
get() {
|
|
1524
|
+
return self.enabled;
|
|
1525
|
+
},
|
|
1526
|
+
set(enabled) {
|
|
1527
|
+
self.enabled = enabled;
|
|
1528
|
+
}
|
|
1529
|
+
});
|
|
1530
|
+
builder.hasGrey = this.hasGrey || key === "gray" || key === "grey";
|
|
1531
|
+
builder.__proto__ = proto;
|
|
1532
|
+
return builder;
|
|
1533
|
+
}
|
|
1534
|
+
function applyStyle() {
|
|
1535
|
+
const args = arguments;
|
|
1536
|
+
const argsLen = args.length;
|
|
1537
|
+
let str = String(arguments[0]);
|
|
1538
|
+
if (argsLen === 0) {
|
|
1539
|
+
return "";
|
|
1540
|
+
}
|
|
1541
|
+
if (argsLen > 1) {
|
|
1542
|
+
for (let a = 1; a < argsLen; a++) {
|
|
1543
|
+
str += " " + args[a];
|
|
1544
|
+
}
|
|
1545
|
+
}
|
|
1546
|
+
if (!this.enabled || this.level <= 0 || !str) {
|
|
1547
|
+
return this._empty ? "" : str;
|
|
1548
|
+
}
|
|
1549
|
+
const originalDim = ansiStyles2.dim.open;
|
|
1550
|
+
if (isSimpleWindowsTerm && this.hasGrey) {
|
|
1551
|
+
ansiStyles2.dim.open = "";
|
|
1552
|
+
}
|
|
1553
|
+
for (const code of this._styles.slice().reverse()) {
|
|
1554
|
+
str = code.open + str.replace(code.closeRe, code.open) + code.close;
|
|
1555
|
+
str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`);
|
|
1556
|
+
}
|
|
1557
|
+
ansiStyles2.dim.open = originalDim;
|
|
1558
|
+
return str;
|
|
1559
|
+
}
|
|
1560
|
+
function chalkTag(chalk2, strings) {
|
|
1561
|
+
if (!Array.isArray(strings)) {
|
|
1562
|
+
return [].slice.call(arguments, 1).join(" ");
|
|
1563
|
+
}
|
|
1564
|
+
const args = [].slice.call(arguments, 2);
|
|
1565
|
+
const parts = [strings.raw[0]];
|
|
1566
|
+
for (let i = 1; i < strings.length; i++) {
|
|
1567
|
+
parts.push(String(args[i - 1]).replace(/[{}\\]/g, "\\$&"));
|
|
1568
|
+
parts.push(String(strings.raw[i]));
|
|
1569
|
+
}
|
|
1570
|
+
return template(chalk2, parts.join(""));
|
|
1571
|
+
}
|
|
1572
|
+
Object.defineProperties(Chalk.prototype, styles2);
|
|
1573
|
+
module2.exports = Chalk();
|
|
1574
|
+
module2.exports.supportsColor = stdoutColor;
|
|
1575
|
+
module2.exports.default = module2.exports;
|
|
1576
|
+
}
|
|
1577
|
+
});
|
|
1578
|
+
|
|
36
1579
|
// ../../node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js
|
|
37
1580
|
var require_src = __commonJS({
|
|
38
1581
|
"../../node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js"(exports2, module2) {
|
|
39
1582
|
"use strict";
|
|
40
|
-
var
|
|
41
|
-
var CSI = `${
|
|
1583
|
+
var ESC2 = "\x1B";
|
|
1584
|
+
var CSI = `${ESC2}[`;
|
|
42
1585
|
var beep = "\x07";
|
|
43
1586
|
var cursor = {
|
|
44
1587
|
to(x2, y2) {
|
|
@@ -67,8 +1610,8 @@ var require_src = __commonJS({
|
|
|
67
1610
|
left: `${CSI}G`,
|
|
68
1611
|
hide: `${CSI}?25l`,
|
|
69
1612
|
show: `${CSI}?25h`,
|
|
70
|
-
save: `${
|
|
71
|
-
restore: `${
|
|
1613
|
+
save: `${ESC2}7`,
|
|
1614
|
+
restore: `${ESC2}8`
|
|
72
1615
|
};
|
|
73
1616
|
var scroll = {
|
|
74
1617
|
up: (count = 1) => `${CSI}S`.repeat(count),
|
|
@@ -97,8 +1640,8 @@ var require_src = __commonJS({
|
|
|
97
1640
|
// ../../node_modules/.pnpm/picocolors@1.0.0/node_modules/picocolors/picocolors.js
|
|
98
1641
|
var require_picocolors = __commonJS({
|
|
99
1642
|
"../../node_modules/.pnpm/picocolors@1.0.0/node_modules/picocolors/picocolors.js"(exports2, module2) {
|
|
100
|
-
var
|
|
101
|
-
var isColorSupported = !("NO_COLOR" in process.env || process.argv.includes("--no-color")) && ("FORCE_COLOR" in process.env || process.argv.includes("--color") || process.platform === "win32" ||
|
|
1643
|
+
var tty = require("tty");
|
|
1644
|
+
var isColorSupported = !("NO_COLOR" in process.env || process.argv.includes("--no-color")) && ("FORCE_COLOR" in process.env || process.argv.includes("--color") || process.platform === "win32" || tty.isatty(1) && process.env.TERM !== "dumb" || "CI" in process.env);
|
|
102
1645
|
var formatter = (open2, close, replace = open2) => (input) => {
|
|
103
1646
|
let string = "" + input;
|
|
104
1647
|
let index = string.indexOf(close, open2.length);
|
|
@@ -236,11 +1779,11 @@ var require_signals = __commonJS({
|
|
|
236
1779
|
// ../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js
|
|
237
1780
|
var require_signal_exit = __commonJS({
|
|
238
1781
|
"../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js"(exports2, module2) {
|
|
239
|
-
var
|
|
240
|
-
var processOk = function(
|
|
241
|
-
return
|
|
1782
|
+
var process5 = global.process;
|
|
1783
|
+
var processOk = function(process6) {
|
|
1784
|
+
return process6 && typeof process6 === "object" && typeof process6.removeListener === "function" && typeof process6.emit === "function" && typeof process6.reallyExit === "function" && typeof process6.listeners === "function" && typeof process6.kill === "function" && typeof process6.pid === "number" && typeof process6.on === "function";
|
|
242
1785
|
};
|
|
243
|
-
if (!processOk(
|
|
1786
|
+
if (!processOk(process5)) {
|
|
244
1787
|
module2.exports = function() {
|
|
245
1788
|
return function() {
|
|
246
1789
|
};
|
|
@@ -248,15 +1791,15 @@ var require_signal_exit = __commonJS({
|
|
|
248
1791
|
} else {
|
|
249
1792
|
assert = require("assert");
|
|
250
1793
|
signals = require_signals();
|
|
251
|
-
isWin = /^win/i.test(
|
|
1794
|
+
isWin = /^win/i.test(process5.platform);
|
|
252
1795
|
EE = require("events");
|
|
253
1796
|
if (typeof EE !== "function") {
|
|
254
1797
|
EE = EE.EventEmitter;
|
|
255
1798
|
}
|
|
256
|
-
if (
|
|
257
|
-
emitter =
|
|
1799
|
+
if (process5.__signal_exit_emitter__) {
|
|
1800
|
+
emitter = process5.__signal_exit_emitter__;
|
|
258
1801
|
} else {
|
|
259
|
-
emitter =
|
|
1802
|
+
emitter = process5.__signal_exit_emitter__ = new EE();
|
|
260
1803
|
emitter.count = 0;
|
|
261
1804
|
emitter.emitted = {};
|
|
262
1805
|
}
|
|
@@ -293,12 +1836,12 @@ var require_signal_exit = __commonJS({
|
|
|
293
1836
|
loaded = false;
|
|
294
1837
|
signals.forEach(function(sig) {
|
|
295
1838
|
try {
|
|
296
|
-
|
|
1839
|
+
process5.removeListener(sig, sigListeners[sig]);
|
|
297
1840
|
} catch (er) {
|
|
298
1841
|
}
|
|
299
1842
|
});
|
|
300
|
-
|
|
301
|
-
|
|
1843
|
+
process5.emit = originalProcessEmit;
|
|
1844
|
+
process5.reallyExit = originalProcessReallyExit;
|
|
302
1845
|
emitter.count -= 1;
|
|
303
1846
|
};
|
|
304
1847
|
module2.exports.unload = unload;
|
|
@@ -315,7 +1858,7 @@ var require_signal_exit = __commonJS({
|
|
|
315
1858
|
if (!processOk(global.process)) {
|
|
316
1859
|
return;
|
|
317
1860
|
}
|
|
318
|
-
var listeners =
|
|
1861
|
+
var listeners = process5.listeners(sig);
|
|
319
1862
|
if (listeners.length === emitter.count) {
|
|
320
1863
|
unload();
|
|
321
1864
|
emit("exit", null, sig);
|
|
@@ -323,7 +1866,7 @@ var require_signal_exit = __commonJS({
|
|
|
323
1866
|
if (isWin && sig === "SIGHUP") {
|
|
324
1867
|
sig = "SIGINT";
|
|
325
1868
|
}
|
|
326
|
-
|
|
1869
|
+
process5.kill(process5.pid, sig);
|
|
327
1870
|
}
|
|
328
1871
|
};
|
|
329
1872
|
});
|
|
@@ -339,36 +1882,36 @@ var require_signal_exit = __commonJS({
|
|
|
339
1882
|
emitter.count += 1;
|
|
340
1883
|
signals = signals.filter(function(sig) {
|
|
341
1884
|
try {
|
|
342
|
-
|
|
1885
|
+
process5.on(sig, sigListeners[sig]);
|
|
343
1886
|
return true;
|
|
344
1887
|
} catch (er) {
|
|
345
1888
|
return false;
|
|
346
1889
|
}
|
|
347
1890
|
});
|
|
348
|
-
|
|
349
|
-
|
|
1891
|
+
process5.emit = processEmit;
|
|
1892
|
+
process5.reallyExit = processReallyExit;
|
|
350
1893
|
};
|
|
351
1894
|
module2.exports.load = load;
|
|
352
|
-
originalProcessReallyExit =
|
|
1895
|
+
originalProcessReallyExit = process5.reallyExit;
|
|
353
1896
|
processReallyExit = function processReallyExit2(code) {
|
|
354
1897
|
if (!processOk(global.process)) {
|
|
355
1898
|
return;
|
|
356
1899
|
}
|
|
357
|
-
|
|
1900
|
+
process5.exitCode = code || /* istanbul ignore next */
|
|
358
1901
|
0;
|
|
359
|
-
emit("exit",
|
|
360
|
-
emit("afterexit",
|
|
361
|
-
originalProcessReallyExit.call(
|
|
1902
|
+
emit("exit", process5.exitCode, null);
|
|
1903
|
+
emit("afterexit", process5.exitCode, null);
|
|
1904
|
+
originalProcessReallyExit.call(process5, process5.exitCode);
|
|
362
1905
|
};
|
|
363
|
-
originalProcessEmit =
|
|
1906
|
+
originalProcessEmit = process5.emit;
|
|
364
1907
|
processEmit = function processEmit2(ev, arg) {
|
|
365
1908
|
if (ev === "exit" && processOk(global.process)) {
|
|
366
1909
|
if (arg !== void 0) {
|
|
367
|
-
|
|
1910
|
+
process5.exitCode = arg;
|
|
368
1911
|
}
|
|
369
1912
|
var ret = originalProcessEmit.apply(this, arguments);
|
|
370
|
-
emit("exit",
|
|
371
|
-
emit("afterexit",
|
|
1913
|
+
emit("exit", process5.exitCode, null);
|
|
1914
|
+
emit("afterexit", process5.exitCode, null);
|
|
372
1915
|
return ret;
|
|
373
1916
|
} else {
|
|
374
1917
|
return originalProcessEmit.apply(this, arguments);
|
|
@@ -618,22 +2161,22 @@ var require_isexe = __commonJS({
|
|
|
618
2161
|
// ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
|
|
619
2162
|
var require_which = __commonJS({
|
|
620
2163
|
"../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports2, module2) {
|
|
621
|
-
var
|
|
2164
|
+
var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
622
2165
|
var path3 = require("path");
|
|
623
|
-
var COLON =
|
|
2166
|
+
var COLON = isWindows ? ";" : ":";
|
|
624
2167
|
var isexe = require_isexe();
|
|
625
2168
|
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
626
2169
|
var getPathInfo = (cmd, opt) => {
|
|
627
2170
|
const colon = opt.colon || COLON;
|
|
628
|
-
const pathEnv = cmd.match(/\//) ||
|
|
2171
|
+
const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [
|
|
629
2172
|
// windows always checks the cwd first
|
|
630
|
-
...
|
|
2173
|
+
...isWindows ? [process.cwd()] : [],
|
|
631
2174
|
...(opt.path || process.env.PATH || /* istanbul ignore next: very unusual */
|
|
632
2175
|
"").split(colon)
|
|
633
2176
|
];
|
|
634
|
-
const pathExtExe =
|
|
635
|
-
const pathExt =
|
|
636
|
-
if (
|
|
2177
|
+
const pathExtExe = isWindows ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
2178
|
+
const pathExt = isWindows ? pathExtExe.split(colon) : [""];
|
|
2179
|
+
if (isWindows) {
|
|
637
2180
|
if (cmd.indexOf(".") !== -1 && pathExt[0] !== "")
|
|
638
2181
|
pathExt.unshift("");
|
|
639
2182
|
}
|
|
@@ -736,7 +2279,7 @@ var require_resolveCommand = __commonJS({
|
|
|
736
2279
|
var which = require_which();
|
|
737
2280
|
var getPathKey = require_path_key();
|
|
738
2281
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
739
|
-
const
|
|
2282
|
+
const env2 = parsed.options.env || process.env;
|
|
740
2283
|
const cwd = process.cwd();
|
|
741
2284
|
const hasCustomCwd = parsed.options.cwd != null;
|
|
742
2285
|
const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled;
|
|
@@ -749,7 +2292,7 @@ var require_resolveCommand = __commonJS({
|
|
|
749
2292
|
let resolved;
|
|
750
2293
|
try {
|
|
751
2294
|
resolved = which.sync(parsed.command, {
|
|
752
|
-
path:
|
|
2295
|
+
path: env2[getPathKey({ env: env2 })],
|
|
753
2296
|
pathExt: withoutPathExt ? path3.delimiter : void 0
|
|
754
2297
|
});
|
|
755
2298
|
} catch (e) {
|
|
@@ -5931,7 +7474,7 @@ var require_util2 = __commonJS({
|
|
|
5931
7474
|
}
|
|
5932
7475
|
function fullyReadBody(body, processBody, processBodyError) {
|
|
5933
7476
|
const successSteps = (bytes) => queueMicrotask(() => processBody(bytes));
|
|
5934
|
-
const errorSteps = (
|
|
7477
|
+
const errorSteps = (error2) => queueMicrotask(() => processBodyError(error2));
|
|
5935
7478
|
let reader;
|
|
5936
7479
|
try {
|
|
5937
7480
|
reader = body.stream.getReader();
|
|
@@ -7335,7 +8878,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r
|
|
|
7335
8878
|
throw new TypeError("Body is unusable");
|
|
7336
8879
|
}
|
|
7337
8880
|
const promise = createDeferredPromise();
|
|
7338
|
-
const errorSteps = (
|
|
8881
|
+
const errorSteps = (error2) => promise.reject(error2);
|
|
7339
8882
|
const successSteps = (data) => {
|
|
7340
8883
|
try {
|
|
7341
8884
|
promise.resolve(convertBytesToJSValue(data));
|
|
@@ -7572,15 +9115,15 @@ var require_request = __commonJS({
|
|
|
7572
9115
|
}
|
|
7573
9116
|
return this[kHandler].onComplete(trailers);
|
|
7574
9117
|
}
|
|
7575
|
-
onError(
|
|
9118
|
+
onError(error2) {
|
|
7576
9119
|
if (channels.error.hasSubscribers) {
|
|
7577
|
-
channels.error.publish({ request: this, error });
|
|
9120
|
+
channels.error.publish({ request: this, error: error2 });
|
|
7578
9121
|
}
|
|
7579
9122
|
if (this.aborted) {
|
|
7580
9123
|
return;
|
|
7581
9124
|
}
|
|
7582
9125
|
this.aborted = true;
|
|
7583
|
-
return this[kHandler].onError(
|
|
9126
|
+
return this[kHandler].onError(error2);
|
|
7584
9127
|
}
|
|
7585
9128
|
addHeader(key, value) {
|
|
7586
9129
|
processHeader(this, key, value);
|
|
@@ -8384,8 +9927,8 @@ var require_RedirectHandler = __commonJS({
|
|
|
8384
9927
|
onUpgrade(statusCode, headers, socket) {
|
|
8385
9928
|
this.handler.onUpgrade(statusCode, headers, socket);
|
|
8386
9929
|
}
|
|
8387
|
-
onError(
|
|
8388
|
-
this.handler.onError(
|
|
9930
|
+
onError(error2) {
|
|
9931
|
+
this.handler.onError(error2);
|
|
8389
9932
|
}
|
|
8390
9933
|
onHeaders(statusCode, headers, resume, statusText) {
|
|
8391
9934
|
this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers);
|
|
@@ -11666,13 +13209,13 @@ var require_mock_utils = __commonJS({
|
|
|
11666
13209
|
if (mockDispatch2.data.callback) {
|
|
11667
13210
|
mockDispatch2.data = { ...mockDispatch2.data, ...mockDispatch2.data.callback(opts) };
|
|
11668
13211
|
}
|
|
11669
|
-
const { data: { statusCode, data, headers, trailers, error }, delay, persist } = mockDispatch2;
|
|
13212
|
+
const { data: { statusCode, data, headers, trailers, error: error2 }, delay, persist } = mockDispatch2;
|
|
11670
13213
|
const { timesInvoked, times } = mockDispatch2;
|
|
11671
13214
|
mockDispatch2.consumed = !persist && timesInvoked >= times;
|
|
11672
13215
|
mockDispatch2.pending = timesInvoked < times;
|
|
11673
|
-
if (
|
|
13216
|
+
if (error2 !== null) {
|
|
11674
13217
|
deleteMockDispatch(this[kDispatches], key);
|
|
11675
|
-
handler.onError(
|
|
13218
|
+
handler.onError(error2);
|
|
11676
13219
|
return true;
|
|
11677
13220
|
}
|
|
11678
13221
|
if (typeof delay === "number" && delay > 0) {
|
|
@@ -11710,19 +13253,19 @@ var require_mock_utils = __commonJS({
|
|
|
11710
13253
|
if (agent.isMockActive) {
|
|
11711
13254
|
try {
|
|
11712
13255
|
mockDispatch.call(this, opts, handler);
|
|
11713
|
-
} catch (
|
|
11714
|
-
if (
|
|
13256
|
+
} catch (error2) {
|
|
13257
|
+
if (error2 instanceof MockNotMatchedError) {
|
|
11715
13258
|
const netConnect = agent[kGetNetConnect]();
|
|
11716
13259
|
if (netConnect === false) {
|
|
11717
|
-
throw new MockNotMatchedError(`${
|
|
13260
|
+
throw new MockNotMatchedError(`${error2.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`);
|
|
11718
13261
|
}
|
|
11719
13262
|
if (checkNetConnect(netConnect, origin)) {
|
|
11720
13263
|
originalDispatch.call(this, opts, handler);
|
|
11721
13264
|
} else {
|
|
11722
|
-
throw new MockNotMatchedError(`${
|
|
13265
|
+
throw new MockNotMatchedError(`${error2.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`);
|
|
11723
13266
|
}
|
|
11724
13267
|
} else {
|
|
11725
|
-
throw
|
|
13268
|
+
throw error2;
|
|
11726
13269
|
}
|
|
11727
13270
|
}
|
|
11728
13271
|
} else {
|
|
@@ -11885,11 +13428,11 @@ var require_mock_interceptor = __commonJS({
|
|
|
11885
13428
|
/**
|
|
11886
13429
|
* Mock an undici request with a defined error.
|
|
11887
13430
|
*/
|
|
11888
|
-
replyWithError(
|
|
11889
|
-
if (typeof
|
|
13431
|
+
replyWithError(error2) {
|
|
13432
|
+
if (typeof error2 === "undefined") {
|
|
11890
13433
|
throw new InvalidArgumentError("error must be defined");
|
|
11891
13434
|
}
|
|
11892
|
-
const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error });
|
|
13435
|
+
const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error: error2 });
|
|
11893
13436
|
return new MockScope(newMockDispatch);
|
|
11894
13437
|
}
|
|
11895
13438
|
/**
|
|
@@ -13914,17 +15457,17 @@ var require_fetch = __commonJS({
|
|
|
13914
15457
|
this.emit("terminated", reason);
|
|
13915
15458
|
}
|
|
13916
15459
|
// https://fetch.spec.whatwg.org/#fetch-controller-abort
|
|
13917
|
-
abort(
|
|
15460
|
+
abort(error2) {
|
|
13918
15461
|
if (this.state !== "ongoing") {
|
|
13919
15462
|
return;
|
|
13920
15463
|
}
|
|
13921
15464
|
this.state = "aborted";
|
|
13922
|
-
if (!
|
|
13923
|
-
|
|
15465
|
+
if (!error2) {
|
|
15466
|
+
error2 = new DOMException("The operation was aborted.", "AbortError");
|
|
13924
15467
|
}
|
|
13925
|
-
this.serializedAbortReason =
|
|
13926
|
-
this.connection?.destroy(
|
|
13927
|
-
this.emit("terminated",
|
|
15468
|
+
this.serializedAbortReason = error2;
|
|
15469
|
+
this.connection?.destroy(error2);
|
|
15470
|
+
this.emit("terminated", error2);
|
|
13928
15471
|
}
|
|
13929
15472
|
};
|
|
13930
15473
|
async function fetch2(input, init = {}) {
|
|
@@ -14030,13 +15573,13 @@ var require_fetch = __commonJS({
|
|
|
14030
15573
|
performance.markResourceTiming(timingInfo, originalURL, initiatorType, globalThis2, cacheState);
|
|
14031
15574
|
}
|
|
14032
15575
|
}
|
|
14033
|
-
function abortFetch(p2, request2, responseObject,
|
|
14034
|
-
if (!
|
|
14035
|
-
|
|
15576
|
+
function abortFetch(p2, request2, responseObject, error2) {
|
|
15577
|
+
if (!error2) {
|
|
15578
|
+
error2 = new DOMException("The operation was aborted.", "AbortError");
|
|
14036
15579
|
}
|
|
14037
|
-
p2.reject(
|
|
15580
|
+
p2.reject(error2);
|
|
14038
15581
|
if (request2.body != null && isReadable(request2.body?.stream)) {
|
|
14039
|
-
request2.body.stream.cancel(
|
|
15582
|
+
request2.body.stream.cancel(error2).catch((err) => {
|
|
14040
15583
|
if (err.code === "ERR_INVALID_STATE") {
|
|
14041
15584
|
return;
|
|
14042
15585
|
}
|
|
@@ -14048,7 +15591,7 @@ var require_fetch = __commonJS({
|
|
|
14048
15591
|
}
|
|
14049
15592
|
const response = responseObject[kState];
|
|
14050
15593
|
if (response.body != null && isReadable(response.body?.stream)) {
|
|
14051
|
-
response.body.stream.cancel(
|
|
15594
|
+
response.body.stream.cancel(error2).catch((err) => {
|
|
14052
15595
|
if (err.code === "ERR_INVALID_STATE") {
|
|
14053
15596
|
return;
|
|
14054
15597
|
}
|
|
@@ -14801,13 +16344,13 @@ var require_fetch = __commonJS({
|
|
|
14801
16344
|
fetchParams.controller.ended = true;
|
|
14802
16345
|
this.body.push(null);
|
|
14803
16346
|
},
|
|
14804
|
-
onError(
|
|
16347
|
+
onError(error2) {
|
|
14805
16348
|
if (this.abort) {
|
|
14806
16349
|
fetchParams.controller.off("terminated", this.abort);
|
|
14807
16350
|
}
|
|
14808
|
-
this.body?.destroy(
|
|
14809
|
-
fetchParams.controller.terminate(
|
|
14810
|
-
reject(
|
|
16351
|
+
this.body?.destroy(error2);
|
|
16352
|
+
fetchParams.controller.terminate(error2);
|
|
16353
|
+
reject(error2);
|
|
14811
16354
|
},
|
|
14812
16355
|
onUpgrade(status2, headersList, socket) {
|
|
14813
16356
|
if (status2 !== 101) {
|
|
@@ -15270,8 +16813,8 @@ var require_util3 = __commonJS({
|
|
|
15270
16813
|
}
|
|
15271
16814
|
fr[kResult] = result;
|
|
15272
16815
|
fireAProgressEvent("load", fr);
|
|
15273
|
-
} catch (
|
|
15274
|
-
fr[kError] =
|
|
16816
|
+
} catch (error2) {
|
|
16817
|
+
fr[kError] = error2;
|
|
15275
16818
|
fireAProgressEvent("error", fr);
|
|
15276
16819
|
}
|
|
15277
16820
|
if (fr[kState] !== "loading") {
|
|
@@ -15280,13 +16823,13 @@ var require_util3 = __commonJS({
|
|
|
15280
16823
|
});
|
|
15281
16824
|
break;
|
|
15282
16825
|
}
|
|
15283
|
-
} catch (
|
|
16826
|
+
} catch (error2) {
|
|
15284
16827
|
if (fr[kAborted]) {
|
|
15285
16828
|
return;
|
|
15286
16829
|
}
|
|
15287
16830
|
queueMicrotask(() => {
|
|
15288
16831
|
fr[kState] = "done";
|
|
15289
|
-
fr[kError] =
|
|
16832
|
+
fr[kError] = error2;
|
|
15290
16833
|
fireAProgressEvent("error", fr);
|
|
15291
16834
|
if (fr[kState] !== "loading") {
|
|
15292
16835
|
fireAProgressEvent("loadend", fr);
|
|
@@ -16926,11 +18469,11 @@ var require_connection = __commonJS({
|
|
|
16926
18469
|
});
|
|
16927
18470
|
}
|
|
16928
18471
|
}
|
|
16929
|
-
function onSocketError(
|
|
18472
|
+
function onSocketError(error2) {
|
|
16930
18473
|
const { ws } = this;
|
|
16931
18474
|
ws[kReadyState] = states.CLOSING;
|
|
16932
18475
|
if (channels.socketError.hasSubscribers) {
|
|
16933
|
-
channels.socketError.publish(
|
|
18476
|
+
channels.socketError.publish(error2);
|
|
16934
18477
|
}
|
|
16935
18478
|
this.destroy();
|
|
16936
18479
|
}
|
|
@@ -17717,8 +19260,8 @@ var require_lodash = __commonJS({
|
|
|
17717
19260
|
return false;
|
|
17718
19261
|
}
|
|
17719
19262
|
function isPrototype(value) {
|
|
17720
|
-
var Ctor = value && value.constructor,
|
|
17721
|
-
return value ===
|
|
19263
|
+
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
|
|
19264
|
+
return value === proto;
|
|
17722
19265
|
}
|
|
17723
19266
|
function nativeKeysIn(object) {
|
|
17724
19267
|
var result = [];
|
|
@@ -17899,14 +19442,14 @@ var require_is_docker = __commonJS({
|
|
|
17899
19442
|
var require_is_wsl = __commonJS({
|
|
17900
19443
|
"../../node_modules/.pnpm/is-wsl@2.2.0/node_modules/is-wsl/index.js"(exports2, module2) {
|
|
17901
19444
|
"use strict";
|
|
17902
|
-
var
|
|
19445
|
+
var os = require("os");
|
|
17903
19446
|
var fs2 = require("fs");
|
|
17904
19447
|
var isDocker = require_is_docker();
|
|
17905
19448
|
var isWsl = () => {
|
|
17906
19449
|
if (process.platform !== "linux") {
|
|
17907
19450
|
return false;
|
|
17908
19451
|
}
|
|
17909
|
-
if (
|
|
19452
|
+
if (os.release().toLowerCase().includes("microsoft")) {
|
|
17910
19453
|
if (isDocker()) {
|
|
17911
19454
|
return false;
|
|
17912
19455
|
}
|
|
@@ -17992,8 +19535,8 @@ var require_open = __commonJS({
|
|
|
17992
19535
|
for (const item of array) {
|
|
17993
19536
|
try {
|
|
17994
19537
|
return await mapper(item);
|
|
17995
|
-
} catch (
|
|
17996
|
-
latestError =
|
|
19538
|
+
} catch (error2) {
|
|
19539
|
+
latestError = error2;
|
|
17997
19540
|
}
|
|
17998
19541
|
}
|
|
17999
19542
|
throw latestError;
|
|
@@ -21494,7 +23037,7 @@ var require_doh = __commonJS({
|
|
|
21494
23037
|
constructor(options) {
|
|
21495
23038
|
super();
|
|
21496
23039
|
const { ssl } = Object.assign(this, { cors: true }, options);
|
|
21497
|
-
this.server = (ssl ? https.createServer(options) : http.createServer()).on("request", this.handleRequest.bind(this)).on("listening", () => this.emit("listening", this.address())).on("error", (
|
|
23040
|
+
this.server = (ssl ? https.createServer(options) : http.createServer()).on("request", this.handleRequest.bind(this)).on("listening", () => this.emit("listening", this.address())).on("error", (error2) => this.emit("error", error2)).on("close", () => {
|
|
21498
23041
|
this.server.removeAllListeners();
|
|
21499
23042
|
this.emit("close");
|
|
21500
23043
|
});
|
|
@@ -21604,13 +23147,13 @@ var require_dns = __commonJS({
|
|
|
21604
23147
|
super();
|
|
21605
23148
|
this.servers = {};
|
|
21606
23149
|
if (options.doh) {
|
|
21607
|
-
this.servers.doh = new DOHServer(options.doh).on("error", (
|
|
23150
|
+
this.servers.doh = new DOHServer(options.doh).on("error", (error2) => this.emit("error", error2, "doh"));
|
|
21608
23151
|
}
|
|
21609
23152
|
if (options.tcp) {
|
|
21610
|
-
this.servers.tcp = new TCPServer().on("error", (
|
|
23153
|
+
this.servers.tcp = new TCPServer().on("error", (error2) => this.emit("error", error2, "tcp"));
|
|
21611
23154
|
}
|
|
21612
23155
|
if (options.udp) {
|
|
21613
|
-
this.servers.udp = new UDPServer(typeof options.udp === "object" ? options.udp : void 0).on("error", (
|
|
23156
|
+
this.servers.udp = new UDPServer(typeof options.udp === "object" ? options.udp : void 0).on("error", (error2) => this.emit("error", error2, "udp"));
|
|
21614
23157
|
}
|
|
21615
23158
|
const servers = Object.values(this.servers);
|
|
21616
23159
|
this.closed = Promise.all(
|
|
@@ -21626,7 +23169,7 @@ var require_dns = __commonJS({
|
|
|
21626
23169
|
return addresses;
|
|
21627
23170
|
});
|
|
21628
23171
|
const emitRequest = (request2, send, client) => this.emit("request", request2, send, client);
|
|
21629
|
-
const emitRequestError = (
|
|
23172
|
+
const emitRequestError = (error2) => this.emit("requestError", error2);
|
|
21630
23173
|
for (const server of servers) {
|
|
21631
23174
|
server.on("request", emitRequest);
|
|
21632
23175
|
server.on("requestError", emitRequestError);
|
|
@@ -22011,8 +23554,8 @@ var require_parse4 = __commonJS({
|
|
|
22011
23554
|
r2.lastIndex = origIndex;
|
|
22012
23555
|
return matches;
|
|
22013
23556
|
}
|
|
22014
|
-
function getVar(
|
|
22015
|
-
var r2 = typeof
|
|
23557
|
+
function getVar(env2, pre, key) {
|
|
23558
|
+
var r2 = typeof env2 === "function" ? env2(key) : env2[key];
|
|
22016
23559
|
if (typeof r2 === "undefined" && key != "") {
|
|
22017
23560
|
r2 = "";
|
|
22018
23561
|
} else if (typeof r2 === "undefined") {
|
|
@@ -22023,7 +23566,7 @@ var require_parse4 = __commonJS({
|
|
|
22023
23566
|
}
|
|
22024
23567
|
return pre + r2;
|
|
22025
23568
|
}
|
|
22026
|
-
function parseInternal(string,
|
|
23569
|
+
function parseInternal(string, env2, opts) {
|
|
22027
23570
|
if (!opts) {
|
|
22028
23571
|
opts = {};
|
|
22029
23572
|
}
|
|
@@ -22038,8 +23581,8 @@ var require_parse4 = __commonJS({
|
|
|
22038
23581
|
if (matches.length === 0) {
|
|
22039
23582
|
return [];
|
|
22040
23583
|
}
|
|
22041
|
-
if (!
|
|
22042
|
-
|
|
23584
|
+
if (!env2) {
|
|
23585
|
+
env2 = {};
|
|
22043
23586
|
}
|
|
22044
23587
|
var commented = false;
|
|
22045
23588
|
return matches.map(function(match) {
|
|
@@ -22085,7 +23628,7 @@ var require_parse4 = __commonJS({
|
|
|
22085
23628
|
i2 += varend.index - 1;
|
|
22086
23629
|
}
|
|
22087
23630
|
}
|
|
22088
|
-
return getVar(
|
|
23631
|
+
return getVar(env2, "", varname);
|
|
22089
23632
|
}
|
|
22090
23633
|
for (i2 = 0; i2 < s.length; i2++) {
|
|
22091
23634
|
var c2 = s.charAt(i2);
|
|
@@ -22140,9 +23683,9 @@ var require_parse4 = __commonJS({
|
|
|
22140
23683
|
return typeof arg === "undefined" ? prev : prev.concat(arg);
|
|
22141
23684
|
}, []);
|
|
22142
23685
|
}
|
|
22143
|
-
module2.exports = function parse2(s,
|
|
22144
|
-
var mapped = parseInternal(s,
|
|
22145
|
-
if (typeof
|
|
23686
|
+
module2.exports = function parse2(s, env2, opts) {
|
|
23687
|
+
var mapped = parseInternal(s, env2, opts);
|
|
23688
|
+
if (typeof env2 !== "function") {
|
|
22146
23689
|
return mapped;
|
|
22147
23690
|
}
|
|
22148
23691
|
return mapped.reduce(function(acc, s2) {
|
|
@@ -23910,12 +25453,12 @@ var require_parse_stream = __commonJS({
|
|
|
23910
25453
|
reject(err);
|
|
23911
25454
|
}
|
|
23912
25455
|
}
|
|
23913
|
-
function
|
|
25456
|
+
function error2(err) {
|
|
23914
25457
|
errored = true;
|
|
23915
25458
|
reject(err);
|
|
23916
25459
|
}
|
|
23917
25460
|
stm.once("end", finish);
|
|
23918
|
-
stm.once("error",
|
|
25461
|
+
stm.once("error", error2);
|
|
23919
25462
|
readNext();
|
|
23920
25463
|
function readNext() {
|
|
23921
25464
|
readable = true;
|
|
@@ -23924,7 +25467,7 @@ var require_parse_stream = __commonJS({
|
|
|
23924
25467
|
try {
|
|
23925
25468
|
parser2.parse(data);
|
|
23926
25469
|
} catch (err) {
|
|
23927
|
-
return
|
|
25470
|
+
return error2(err);
|
|
23928
25471
|
}
|
|
23929
25472
|
}
|
|
23930
25473
|
readable = false;
|
|
@@ -24492,8 +26035,8 @@ function __read(o, n) {
|
|
|
24492
26035
|
try {
|
|
24493
26036
|
while ((n === void 0 || n-- > 0) && !(r2 = i.next()).done)
|
|
24494
26037
|
ar.push(r2.value);
|
|
24495
|
-
} catch (
|
|
24496
|
-
e = { error };
|
|
26038
|
+
} catch (error2) {
|
|
26039
|
+
e = { error: error2 };
|
|
24497
26040
|
} finally {
|
|
24498
26041
|
try {
|
|
24499
26042
|
if (r2 && !r2.done && (m2 = i["return"]))
|
|
@@ -29830,13 +31373,13 @@ var require_util7 = __commonJS({
|
|
|
29830
31373
|
var SourceMapGenerator = source_map_1.default.SourceMapGenerator;
|
|
29831
31374
|
var hasOwn = Object.prototype.hasOwnProperty;
|
|
29832
31375
|
function getLineTerminator() {
|
|
29833
|
-
return
|
|
31376
|
+
return isBrowser() ? "\n" : require("os").EOL || "\n";
|
|
29834
31377
|
}
|
|
29835
31378
|
exports2.getLineTerminator = getLineTerminator;
|
|
29836
|
-
function
|
|
31379
|
+
function isBrowser() {
|
|
29837
31380
|
return typeof window !== "undefined" && typeof window.document !== "undefined";
|
|
29838
31381
|
}
|
|
29839
|
-
exports2.isBrowser =
|
|
31382
|
+
exports2.isBrowser = isBrowser;
|
|
29840
31383
|
function getOption(options, key, defaultValue) {
|
|
29841
31384
|
if (options && hasOwn.call(options, key)) {
|
|
29842
31385
|
return options[key];
|
|
@@ -34685,45 +36228,45 @@ var require_esprima2 = __commonJS({
|
|
|
34685
36228
|
this.errors = [];
|
|
34686
36229
|
this.tolerant = false;
|
|
34687
36230
|
}
|
|
34688
|
-
ErrorHandler2.prototype.recordError = function(
|
|
34689
|
-
this.errors.push(
|
|
36231
|
+
ErrorHandler2.prototype.recordError = function(error2) {
|
|
36232
|
+
this.errors.push(error2);
|
|
34690
36233
|
};
|
|
34691
|
-
ErrorHandler2.prototype.tolerate = function(
|
|
36234
|
+
ErrorHandler2.prototype.tolerate = function(error2) {
|
|
34692
36235
|
if (this.tolerant) {
|
|
34693
|
-
this.recordError(
|
|
36236
|
+
this.recordError(error2);
|
|
34694
36237
|
} else {
|
|
34695
|
-
throw
|
|
36238
|
+
throw error2;
|
|
34696
36239
|
}
|
|
34697
36240
|
};
|
|
34698
36241
|
ErrorHandler2.prototype.constructError = function(msg, column) {
|
|
34699
|
-
var
|
|
36242
|
+
var error2 = new Error(msg);
|
|
34700
36243
|
try {
|
|
34701
|
-
throw
|
|
36244
|
+
throw error2;
|
|
34702
36245
|
} catch (base) {
|
|
34703
36246
|
if (Object.create && Object.defineProperty) {
|
|
34704
|
-
|
|
34705
|
-
Object.defineProperty(
|
|
36247
|
+
error2 = Object.create(base);
|
|
36248
|
+
Object.defineProperty(error2, "column", { value: column });
|
|
34706
36249
|
}
|
|
34707
36250
|
}
|
|
34708
|
-
return
|
|
36251
|
+
return error2;
|
|
34709
36252
|
};
|
|
34710
36253
|
ErrorHandler2.prototype.createError = function(index, line, col, description) {
|
|
34711
36254
|
var msg = "Line " + line + ": " + description;
|
|
34712
|
-
var
|
|
34713
|
-
|
|
34714
|
-
|
|
34715
|
-
|
|
34716
|
-
return
|
|
36255
|
+
var error2 = this.constructError(msg, col);
|
|
36256
|
+
error2.index = index;
|
|
36257
|
+
error2.lineNumber = line;
|
|
36258
|
+
error2.description = description;
|
|
36259
|
+
return error2;
|
|
34717
36260
|
};
|
|
34718
36261
|
ErrorHandler2.prototype.throwError = function(index, line, col, description) {
|
|
34719
36262
|
throw this.createError(index, line, col, description);
|
|
34720
36263
|
};
|
|
34721
36264
|
ErrorHandler2.prototype.tolerateError = function(index, line, col, description) {
|
|
34722
|
-
var
|
|
36265
|
+
var error2 = this.createError(index, line, col, description);
|
|
34723
36266
|
if (this.tolerant) {
|
|
34724
|
-
this.recordError(
|
|
36267
|
+
this.recordError(error2);
|
|
34725
36268
|
} else {
|
|
34726
|
-
throw
|
|
36269
|
+
throw error2;
|
|
34727
36270
|
}
|
|
34728
36271
|
};
|
|
34729
36272
|
return ErrorHandler2;
|
|
@@ -43943,15 +45486,15 @@ var require_lib2 = __commonJS({
|
|
|
43943
45486
|
at
|
|
43944
45487
|
} = raiseProperties, details = _objectWithoutPropertiesLoose(raiseProperties, _excluded);
|
|
43945
45488
|
const loc = at instanceof Position ? at : at.loc.start;
|
|
43946
|
-
const
|
|
45489
|
+
const error2 = toParseError({
|
|
43947
45490
|
loc,
|
|
43948
45491
|
details
|
|
43949
45492
|
});
|
|
43950
45493
|
if (!this.options.errorRecovery)
|
|
43951
|
-
throw
|
|
45494
|
+
throw error2;
|
|
43952
45495
|
if (!this.isLookahead)
|
|
43953
|
-
this.state.errors.push(
|
|
43954
|
-
return
|
|
45496
|
+
this.state.errors.push(error2);
|
|
45497
|
+
return error2;
|
|
43955
45498
|
}
|
|
43956
45499
|
raiseOverwrite(toParseError, raiseProperties) {
|
|
43957
45500
|
const {
|
|
@@ -43961,14 +45504,14 @@ var require_lib2 = __commonJS({
|
|
|
43961
45504
|
const pos = loc.index;
|
|
43962
45505
|
const errors = this.state.errors;
|
|
43963
45506
|
for (let i = errors.length - 1; i >= 0; i--) {
|
|
43964
|
-
const
|
|
43965
|
-
if (
|
|
45507
|
+
const error2 = errors[i];
|
|
45508
|
+
if (error2.loc.index === pos) {
|
|
43966
45509
|
return errors[i] = toParseError({
|
|
43967
45510
|
loc,
|
|
43968
45511
|
details
|
|
43969
45512
|
});
|
|
43970
45513
|
}
|
|
43971
|
-
if (
|
|
45514
|
+
if (error2.loc.index < pos)
|
|
43972
45515
|
break;
|
|
43973
45516
|
}
|
|
43974
45517
|
return this.raise(toParseError, raiseProperties);
|
|
@@ -43998,9 +45541,9 @@ var require_lib2 = __commonJS({
|
|
|
43998
45541
|
});
|
|
43999
45542
|
}
|
|
44000
45543
|
}
|
|
44001
|
-
errorBuilder(
|
|
45544
|
+
errorBuilder(error2) {
|
|
44002
45545
|
return (pos, lineStart, curLine) => {
|
|
44003
|
-
this.raise(
|
|
45546
|
+
this.raise(error2, {
|
|
44004
45547
|
at: buildPosition(pos, lineStart, curLine)
|
|
44005
45548
|
});
|
|
44006
45549
|
};
|
|
@@ -44155,7 +45698,7 @@ var require_lib2 = __commonJS({
|
|
|
44155
45698
|
}
|
|
44156
45699
|
this.parser.raise(toParseError, origin);
|
|
44157
45700
|
}
|
|
44158
|
-
recordArrowParameterBindingError(
|
|
45701
|
+
recordArrowParameterBindingError(error2, {
|
|
44159
45702
|
at: node
|
|
44160
45703
|
}) {
|
|
44161
45704
|
const {
|
|
@@ -44166,9 +45709,9 @@ var require_lib2 = __commonJS({
|
|
|
44166
45709
|
at: node.loc.start
|
|
44167
45710
|
};
|
|
44168
45711
|
if (scope.isCertainlyParameterDeclaration()) {
|
|
44169
|
-
this.parser.raise(
|
|
45712
|
+
this.parser.raise(error2, origin);
|
|
44170
45713
|
} else if (scope.canBeArrowParameterDeclaration()) {
|
|
44171
|
-
scope.recordDeclarationError(
|
|
45714
|
+
scope.recordDeclarationError(error2, origin);
|
|
44172
45715
|
} else {
|
|
44173
45716
|
return;
|
|
44174
45717
|
}
|
|
@@ -44353,19 +45896,19 @@ var require_lib2 = __commonJS({
|
|
|
44353
45896
|
aborted: false,
|
|
44354
45897
|
failState: null
|
|
44355
45898
|
};
|
|
44356
|
-
} catch (
|
|
45899
|
+
} catch (error2) {
|
|
44357
45900
|
const failState = this.state;
|
|
44358
45901
|
this.state = oldState;
|
|
44359
|
-
if (
|
|
45902
|
+
if (error2 instanceof SyntaxError) {
|
|
44360
45903
|
return {
|
|
44361
45904
|
node: null,
|
|
44362
|
-
error,
|
|
45905
|
+
error: error2,
|
|
44363
45906
|
thrown: true,
|
|
44364
45907
|
aborted: false,
|
|
44365
45908
|
failState
|
|
44366
45909
|
};
|
|
44367
45910
|
}
|
|
44368
|
-
if (
|
|
45911
|
+
if (error2 === abortSignal) {
|
|
44369
45912
|
return {
|
|
44370
45913
|
node: abortSignal.node,
|
|
44371
45914
|
error: null,
|
|
@@ -44374,7 +45917,7 @@ var require_lib2 = __commonJS({
|
|
|
44374
45917
|
failState
|
|
44375
45918
|
};
|
|
44376
45919
|
}
|
|
44377
|
-
throw
|
|
45920
|
+
throw error2;
|
|
44378
45921
|
}
|
|
44379
45922
|
}
|
|
44380
45923
|
checkExpressionErrors(refExpressionErrors, andThrow) {
|
|
@@ -51271,9 +52814,9 @@ var require_lib2 = __commonJS({
|
|
|
51271
52814
|
throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: " + RECORD_AND_TUPLE_SYNTAX_TYPES.map((p2) => `'${p2}'`).join(", "));
|
|
51272
52815
|
}
|
|
51273
52816
|
if (hasPlugin(plugins, "asyncDoExpressions") && !hasPlugin(plugins, "doExpressions")) {
|
|
51274
|
-
const
|
|
51275
|
-
|
|
51276
|
-
throw
|
|
52817
|
+
const error2 = new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");
|
|
52818
|
+
error2.missingPlugins = "doExpressions";
|
|
52819
|
+
throw error2;
|
|
51277
52820
|
}
|
|
51278
52821
|
}
|
|
51279
52822
|
var mixinPlugins = {
|
|
@@ -55293,506 +56836,18 @@ module.exports = __toCommonJS(cli_exports);
|
|
|
55293
56836
|
// ../cli/index.ts
|
|
55294
56837
|
var import_process = require("process");
|
|
55295
56838
|
|
|
55296
|
-
// ../../node_modules/.pnpm/chalk@5.2.0/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
55297
|
-
var ANSI_BACKGROUND_OFFSET = 10;
|
|
55298
|
-
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
55299
|
-
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
55300
|
-
var wrapAnsi16m = (offset = 0) => (red2, green2, blue2) => `\x1B[${38 + offset};2;${red2};${green2};${blue2}m`;
|
|
55301
|
-
var styles = {
|
|
55302
|
-
modifier: {
|
|
55303
|
-
reset: [0, 0],
|
|
55304
|
-
// 21 isn't widely supported and 22 does the same thing
|
|
55305
|
-
bold: [1, 22],
|
|
55306
|
-
dim: [2, 22],
|
|
55307
|
-
italic: [3, 23],
|
|
55308
|
-
underline: [4, 24],
|
|
55309
|
-
overline: [53, 55],
|
|
55310
|
-
inverse: [7, 27],
|
|
55311
|
-
hidden: [8, 28],
|
|
55312
|
-
strikethrough: [9, 29]
|
|
55313
|
-
},
|
|
55314
|
-
color: {
|
|
55315
|
-
black: [30, 39],
|
|
55316
|
-
red: [31, 39],
|
|
55317
|
-
green: [32, 39],
|
|
55318
|
-
yellow: [33, 39],
|
|
55319
|
-
blue: [34, 39],
|
|
55320
|
-
magenta: [35, 39],
|
|
55321
|
-
cyan: [36, 39],
|
|
55322
|
-
white: [37, 39],
|
|
55323
|
-
// Bright color
|
|
55324
|
-
blackBright: [90, 39],
|
|
55325
|
-
gray: [90, 39],
|
|
55326
|
-
// Alias of `blackBright`
|
|
55327
|
-
grey: [90, 39],
|
|
55328
|
-
// Alias of `blackBright`
|
|
55329
|
-
redBright: [91, 39],
|
|
55330
|
-
greenBright: [92, 39],
|
|
55331
|
-
yellowBright: [93, 39],
|
|
55332
|
-
blueBright: [94, 39],
|
|
55333
|
-
magentaBright: [95, 39],
|
|
55334
|
-
cyanBright: [96, 39],
|
|
55335
|
-
whiteBright: [97, 39]
|
|
55336
|
-
},
|
|
55337
|
-
bgColor: {
|
|
55338
|
-
bgBlack: [40, 49],
|
|
55339
|
-
bgRed: [41, 49],
|
|
55340
|
-
bgGreen: [42, 49],
|
|
55341
|
-
bgYellow: [43, 49],
|
|
55342
|
-
bgBlue: [44, 49],
|
|
55343
|
-
bgMagenta: [45, 49],
|
|
55344
|
-
bgCyan: [46, 49],
|
|
55345
|
-
bgWhite: [47, 49],
|
|
55346
|
-
// Bright color
|
|
55347
|
-
bgBlackBright: [100, 49],
|
|
55348
|
-
bgGray: [100, 49],
|
|
55349
|
-
// Alias of `bgBlackBright`
|
|
55350
|
-
bgGrey: [100, 49],
|
|
55351
|
-
// Alias of `bgBlackBright`
|
|
55352
|
-
bgRedBright: [101, 49],
|
|
55353
|
-
bgGreenBright: [102, 49],
|
|
55354
|
-
bgYellowBright: [103, 49],
|
|
55355
|
-
bgBlueBright: [104, 49],
|
|
55356
|
-
bgMagentaBright: [105, 49],
|
|
55357
|
-
bgCyanBright: [106, 49],
|
|
55358
|
-
bgWhiteBright: [107, 49]
|
|
55359
|
-
}
|
|
55360
|
-
};
|
|
55361
|
-
var modifierNames = Object.keys(styles.modifier);
|
|
55362
|
-
var foregroundColorNames = Object.keys(styles.color);
|
|
55363
|
-
var backgroundColorNames = Object.keys(styles.bgColor);
|
|
55364
|
-
var colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
55365
|
-
function assembleStyles() {
|
|
55366
|
-
const codes = /* @__PURE__ */ new Map();
|
|
55367
|
-
for (const [groupName, group] of Object.entries(styles)) {
|
|
55368
|
-
for (const [styleName, style] of Object.entries(group)) {
|
|
55369
|
-
styles[styleName] = {
|
|
55370
|
-
open: `\x1B[${style[0]}m`,
|
|
55371
|
-
close: `\x1B[${style[1]}m`
|
|
55372
|
-
};
|
|
55373
|
-
group[styleName] = styles[styleName];
|
|
55374
|
-
codes.set(style[0], style[1]);
|
|
55375
|
-
}
|
|
55376
|
-
Object.defineProperty(styles, groupName, {
|
|
55377
|
-
value: group,
|
|
55378
|
-
enumerable: false
|
|
55379
|
-
});
|
|
55380
|
-
}
|
|
55381
|
-
Object.defineProperty(styles, "codes", {
|
|
55382
|
-
value: codes,
|
|
55383
|
-
enumerable: false
|
|
55384
|
-
});
|
|
55385
|
-
styles.color.close = "\x1B[39m";
|
|
55386
|
-
styles.bgColor.close = "\x1B[49m";
|
|
55387
|
-
styles.color.ansi = wrapAnsi16();
|
|
55388
|
-
styles.color.ansi256 = wrapAnsi256();
|
|
55389
|
-
styles.color.ansi16m = wrapAnsi16m();
|
|
55390
|
-
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
55391
|
-
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
55392
|
-
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
55393
|
-
Object.defineProperties(styles, {
|
|
55394
|
-
rgbToAnsi256: {
|
|
55395
|
-
value(red2, green2, blue2) {
|
|
55396
|
-
if (red2 === green2 && green2 === blue2) {
|
|
55397
|
-
if (red2 < 8) {
|
|
55398
|
-
return 16;
|
|
55399
|
-
}
|
|
55400
|
-
if (red2 > 248) {
|
|
55401
|
-
return 231;
|
|
55402
|
-
}
|
|
55403
|
-
return Math.round((red2 - 8) / 247 * 24) + 232;
|
|
55404
|
-
}
|
|
55405
|
-
return 16 + 36 * Math.round(red2 / 255 * 5) + 6 * Math.round(green2 / 255 * 5) + Math.round(blue2 / 255 * 5);
|
|
55406
|
-
},
|
|
55407
|
-
enumerable: false
|
|
55408
|
-
},
|
|
55409
|
-
hexToRgb: {
|
|
55410
|
-
value(hex) {
|
|
55411
|
-
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
55412
|
-
if (!matches) {
|
|
55413
|
-
return [0, 0, 0];
|
|
55414
|
-
}
|
|
55415
|
-
let [colorString] = matches;
|
|
55416
|
-
if (colorString.length === 3) {
|
|
55417
|
-
colorString = [...colorString].map((character) => character + character).join("");
|
|
55418
|
-
}
|
|
55419
|
-
const integer = Number.parseInt(colorString, 16);
|
|
55420
|
-
return [
|
|
55421
|
-
/* eslint-disable no-bitwise */
|
|
55422
|
-
integer >> 16 & 255,
|
|
55423
|
-
integer >> 8 & 255,
|
|
55424
|
-
integer & 255
|
|
55425
|
-
/* eslint-enable no-bitwise */
|
|
55426
|
-
];
|
|
55427
|
-
},
|
|
55428
|
-
enumerable: false
|
|
55429
|
-
},
|
|
55430
|
-
hexToAnsi256: {
|
|
55431
|
-
value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
|
|
55432
|
-
enumerable: false
|
|
55433
|
-
},
|
|
55434
|
-
ansi256ToAnsi: {
|
|
55435
|
-
value(code) {
|
|
55436
|
-
if (code < 8) {
|
|
55437
|
-
return 30 + code;
|
|
55438
|
-
}
|
|
55439
|
-
if (code < 16) {
|
|
55440
|
-
return 90 + (code - 8);
|
|
55441
|
-
}
|
|
55442
|
-
let red2;
|
|
55443
|
-
let green2;
|
|
55444
|
-
let blue2;
|
|
55445
|
-
if (code >= 232) {
|
|
55446
|
-
red2 = ((code - 232) * 10 + 8) / 255;
|
|
55447
|
-
green2 = red2;
|
|
55448
|
-
blue2 = red2;
|
|
55449
|
-
} else {
|
|
55450
|
-
code -= 16;
|
|
55451
|
-
const remainder = code % 36;
|
|
55452
|
-
red2 = Math.floor(code / 36) / 5;
|
|
55453
|
-
green2 = Math.floor(remainder / 6) / 5;
|
|
55454
|
-
blue2 = remainder % 6 / 5;
|
|
55455
|
-
}
|
|
55456
|
-
const value = Math.max(red2, green2, blue2) * 2;
|
|
55457
|
-
if (value === 0) {
|
|
55458
|
-
return 30;
|
|
55459
|
-
}
|
|
55460
|
-
let result = 30 + (Math.round(blue2) << 2 | Math.round(green2) << 1 | Math.round(red2));
|
|
55461
|
-
if (value === 2) {
|
|
55462
|
-
result += 60;
|
|
55463
|
-
}
|
|
55464
|
-
return result;
|
|
55465
|
-
},
|
|
55466
|
-
enumerable: false
|
|
55467
|
-
},
|
|
55468
|
-
rgbToAnsi: {
|
|
55469
|
-
value: (red2, green2, blue2) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red2, green2, blue2)),
|
|
55470
|
-
enumerable: false
|
|
55471
|
-
},
|
|
55472
|
-
hexToAnsi: {
|
|
55473
|
-
value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
|
|
55474
|
-
enumerable: false
|
|
55475
|
-
}
|
|
55476
|
-
});
|
|
55477
|
-
return styles;
|
|
55478
|
-
}
|
|
55479
|
-
var ansiStyles = assembleStyles();
|
|
55480
|
-
var ansi_styles_default = ansiStyles;
|
|
55481
|
-
|
|
55482
|
-
// ../../node_modules/.pnpm/chalk@5.2.0/node_modules/chalk/source/vendor/supports-color/index.js
|
|
55483
|
-
var import_node_process = __toESM(require("node:process"), 1);
|
|
55484
|
-
var import_node_os = __toESM(require("node:os"), 1);
|
|
55485
|
-
var import_node_tty = __toESM(require("node:tty"), 1);
|
|
55486
|
-
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : import_node_process.default.argv) {
|
|
55487
|
-
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
55488
|
-
const position = argv.indexOf(prefix + flag);
|
|
55489
|
-
const terminatorPosition = argv.indexOf("--");
|
|
55490
|
-
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
55491
|
-
}
|
|
55492
|
-
var { env } = import_node_process.default;
|
|
55493
|
-
var flagForceColor;
|
|
55494
|
-
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
55495
|
-
flagForceColor = 0;
|
|
55496
|
-
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
55497
|
-
flagForceColor = 1;
|
|
55498
|
-
}
|
|
55499
|
-
function envForceColor() {
|
|
55500
|
-
if ("FORCE_COLOR" in env) {
|
|
55501
|
-
if (env.FORCE_COLOR === "true") {
|
|
55502
|
-
return 1;
|
|
55503
|
-
}
|
|
55504
|
-
if (env.FORCE_COLOR === "false") {
|
|
55505
|
-
return 0;
|
|
55506
|
-
}
|
|
55507
|
-
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
55508
|
-
}
|
|
55509
|
-
}
|
|
55510
|
-
function translateLevel(level) {
|
|
55511
|
-
if (level === 0) {
|
|
55512
|
-
return false;
|
|
55513
|
-
}
|
|
55514
|
-
return {
|
|
55515
|
-
level,
|
|
55516
|
-
hasBasic: true,
|
|
55517
|
-
has256: level >= 2,
|
|
55518
|
-
has16m: level >= 3
|
|
55519
|
-
};
|
|
55520
|
-
}
|
|
55521
|
-
function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
55522
|
-
const noFlagForceColor = envForceColor();
|
|
55523
|
-
if (noFlagForceColor !== void 0) {
|
|
55524
|
-
flagForceColor = noFlagForceColor;
|
|
55525
|
-
}
|
|
55526
|
-
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
55527
|
-
if (forceColor === 0) {
|
|
55528
|
-
return 0;
|
|
55529
|
-
}
|
|
55530
|
-
if (sniffFlags) {
|
|
55531
|
-
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
55532
|
-
return 3;
|
|
55533
|
-
}
|
|
55534
|
-
if (hasFlag("color=256")) {
|
|
55535
|
-
return 2;
|
|
55536
|
-
}
|
|
55537
|
-
}
|
|
55538
|
-
if ("TF_BUILD" in env && "AGENT_NAME" in env) {
|
|
55539
|
-
return 1;
|
|
55540
|
-
}
|
|
55541
|
-
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
|
55542
|
-
return 0;
|
|
55543
|
-
}
|
|
55544
|
-
const min = forceColor || 0;
|
|
55545
|
-
if (env.TERM === "dumb") {
|
|
55546
|
-
return min;
|
|
55547
|
-
}
|
|
55548
|
-
if (import_node_process.default.platform === "win32") {
|
|
55549
|
-
const osRelease = import_node_os.default.release().split(".");
|
|
55550
|
-
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
55551
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
55552
|
-
}
|
|
55553
|
-
return 1;
|
|
55554
|
-
}
|
|
55555
|
-
if ("CI" in env) {
|
|
55556
|
-
if ("GITHUB_ACTIONS" in env) {
|
|
55557
|
-
return 3;
|
|
55558
|
-
}
|
|
55559
|
-
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
55560
|
-
return 1;
|
|
55561
|
-
}
|
|
55562
|
-
return min;
|
|
55563
|
-
}
|
|
55564
|
-
if ("TEAMCITY_VERSION" in env) {
|
|
55565
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
55566
|
-
}
|
|
55567
|
-
if (env.COLORTERM === "truecolor") {
|
|
55568
|
-
return 3;
|
|
55569
|
-
}
|
|
55570
|
-
if (env.TERM === "xterm-kitty") {
|
|
55571
|
-
return 3;
|
|
55572
|
-
}
|
|
55573
|
-
if ("TERM_PROGRAM" in env) {
|
|
55574
|
-
const version3 = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
55575
|
-
switch (env.TERM_PROGRAM) {
|
|
55576
|
-
case "iTerm.app": {
|
|
55577
|
-
return version3 >= 3 ? 3 : 2;
|
|
55578
|
-
}
|
|
55579
|
-
case "Apple_Terminal": {
|
|
55580
|
-
return 2;
|
|
55581
|
-
}
|
|
55582
|
-
}
|
|
55583
|
-
}
|
|
55584
|
-
if (/-256(color)?$/i.test(env.TERM)) {
|
|
55585
|
-
return 2;
|
|
55586
|
-
}
|
|
55587
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
55588
|
-
return 1;
|
|
55589
|
-
}
|
|
55590
|
-
if ("COLORTERM" in env) {
|
|
55591
|
-
return 1;
|
|
55592
|
-
}
|
|
55593
|
-
return min;
|
|
55594
|
-
}
|
|
55595
|
-
function createSupportsColor(stream, options = {}) {
|
|
55596
|
-
const level = _supportsColor(stream, {
|
|
55597
|
-
streamIsTTY: stream && stream.isTTY,
|
|
55598
|
-
...options
|
|
55599
|
-
});
|
|
55600
|
-
return translateLevel(level);
|
|
55601
|
-
}
|
|
55602
|
-
var supportsColor = {
|
|
55603
|
-
stdout: createSupportsColor({ isTTY: import_node_tty.default.isatty(1) }),
|
|
55604
|
-
stderr: createSupportsColor({ isTTY: import_node_tty.default.isatty(2) })
|
|
55605
|
-
};
|
|
55606
|
-
var supports_color_default = supportsColor;
|
|
55607
|
-
|
|
55608
|
-
// ../../node_modules/.pnpm/chalk@5.2.0/node_modules/chalk/source/utilities.js
|
|
55609
|
-
function stringReplaceAll(string, substring, replacer) {
|
|
55610
|
-
let index = string.indexOf(substring);
|
|
55611
|
-
if (index === -1) {
|
|
55612
|
-
return string;
|
|
55613
|
-
}
|
|
55614
|
-
const substringLength = substring.length;
|
|
55615
|
-
let endIndex = 0;
|
|
55616
|
-
let returnValue = "";
|
|
55617
|
-
do {
|
|
55618
|
-
returnValue += string.slice(endIndex, index) + substring + replacer;
|
|
55619
|
-
endIndex = index + substringLength;
|
|
55620
|
-
index = string.indexOf(substring, endIndex);
|
|
55621
|
-
} while (index !== -1);
|
|
55622
|
-
returnValue += string.slice(endIndex);
|
|
55623
|
-
return returnValue;
|
|
55624
|
-
}
|
|
55625
|
-
function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
55626
|
-
let endIndex = 0;
|
|
55627
|
-
let returnValue = "";
|
|
55628
|
-
do {
|
|
55629
|
-
const gotCR = string[index - 1] === "\r";
|
|
55630
|
-
returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
|
|
55631
|
-
endIndex = index + 1;
|
|
55632
|
-
index = string.indexOf("\n", endIndex);
|
|
55633
|
-
} while (index !== -1);
|
|
55634
|
-
returnValue += string.slice(endIndex);
|
|
55635
|
-
return returnValue;
|
|
55636
|
-
}
|
|
55637
|
-
|
|
55638
|
-
// ../../node_modules/.pnpm/chalk@5.2.0/node_modules/chalk/source/index.js
|
|
55639
|
-
var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
|
|
55640
|
-
var GENERATOR = Symbol("GENERATOR");
|
|
55641
|
-
var STYLER = Symbol("STYLER");
|
|
55642
|
-
var IS_EMPTY = Symbol("IS_EMPTY");
|
|
55643
|
-
var levelMapping = [
|
|
55644
|
-
"ansi",
|
|
55645
|
-
"ansi",
|
|
55646
|
-
"ansi256",
|
|
55647
|
-
"ansi16m"
|
|
55648
|
-
];
|
|
55649
|
-
var styles2 = /* @__PURE__ */ Object.create(null);
|
|
55650
|
-
var applyOptions = (object, options = {}) => {
|
|
55651
|
-
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
|
|
55652
|
-
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
55653
|
-
}
|
|
55654
|
-
const colorLevel = stdoutColor ? stdoutColor.level : 0;
|
|
55655
|
-
object.level = options.level === void 0 ? colorLevel : options.level;
|
|
55656
|
-
};
|
|
55657
|
-
var chalkFactory = (options) => {
|
|
55658
|
-
const chalk2 = (...strings) => strings.join(" ");
|
|
55659
|
-
applyOptions(chalk2, options);
|
|
55660
|
-
Object.setPrototypeOf(chalk2, createChalk.prototype);
|
|
55661
|
-
return chalk2;
|
|
55662
|
-
};
|
|
55663
|
-
function createChalk(options) {
|
|
55664
|
-
return chalkFactory(options);
|
|
55665
|
-
}
|
|
55666
|
-
Object.setPrototypeOf(createChalk.prototype, Function.prototype);
|
|
55667
|
-
for (const [styleName, style] of Object.entries(ansi_styles_default)) {
|
|
55668
|
-
styles2[styleName] = {
|
|
55669
|
-
get() {
|
|
55670
|
-
const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
|
|
55671
|
-
Object.defineProperty(this, styleName, { value: builder });
|
|
55672
|
-
return builder;
|
|
55673
|
-
}
|
|
55674
|
-
};
|
|
55675
|
-
}
|
|
55676
|
-
styles2.visible = {
|
|
55677
|
-
get() {
|
|
55678
|
-
const builder = createBuilder(this, this[STYLER], true);
|
|
55679
|
-
Object.defineProperty(this, "visible", { value: builder });
|
|
55680
|
-
return builder;
|
|
55681
|
-
}
|
|
55682
|
-
};
|
|
55683
|
-
var getModelAnsi = (model, level, type, ...arguments_) => {
|
|
55684
|
-
if (model === "rgb") {
|
|
55685
|
-
if (level === "ansi16m") {
|
|
55686
|
-
return ansi_styles_default[type].ansi16m(...arguments_);
|
|
55687
|
-
}
|
|
55688
|
-
if (level === "ansi256") {
|
|
55689
|
-
return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
|
|
55690
|
-
}
|
|
55691
|
-
return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
|
|
55692
|
-
}
|
|
55693
|
-
if (model === "hex") {
|
|
55694
|
-
return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_));
|
|
55695
|
-
}
|
|
55696
|
-
return ansi_styles_default[type][model](...arguments_);
|
|
55697
|
-
};
|
|
55698
|
-
var usedModels = ["rgb", "hex", "ansi256"];
|
|
55699
|
-
for (const model of usedModels) {
|
|
55700
|
-
styles2[model] = {
|
|
55701
|
-
get() {
|
|
55702
|
-
const { level } = this;
|
|
55703
|
-
return function(...arguments_) {
|
|
55704
|
-
const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
|
|
55705
|
-
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
55706
|
-
};
|
|
55707
|
-
}
|
|
55708
|
-
};
|
|
55709
|
-
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
55710
|
-
styles2[bgModel] = {
|
|
55711
|
-
get() {
|
|
55712
|
-
const { level } = this;
|
|
55713
|
-
return function(...arguments_) {
|
|
55714
|
-
const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
|
|
55715
|
-
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
55716
|
-
};
|
|
55717
|
-
}
|
|
55718
|
-
};
|
|
55719
|
-
}
|
|
55720
|
-
var proto = Object.defineProperties(() => {
|
|
55721
|
-
}, {
|
|
55722
|
-
...styles2,
|
|
55723
|
-
level: {
|
|
55724
|
-
enumerable: true,
|
|
55725
|
-
get() {
|
|
55726
|
-
return this[GENERATOR].level;
|
|
55727
|
-
},
|
|
55728
|
-
set(level) {
|
|
55729
|
-
this[GENERATOR].level = level;
|
|
55730
|
-
}
|
|
55731
|
-
}
|
|
55732
|
-
});
|
|
55733
|
-
var createStyler = (open2, close, parent) => {
|
|
55734
|
-
let openAll;
|
|
55735
|
-
let closeAll;
|
|
55736
|
-
if (parent === void 0) {
|
|
55737
|
-
openAll = open2;
|
|
55738
|
-
closeAll = close;
|
|
55739
|
-
} else {
|
|
55740
|
-
openAll = parent.openAll + open2;
|
|
55741
|
-
closeAll = close + parent.closeAll;
|
|
55742
|
-
}
|
|
55743
|
-
return {
|
|
55744
|
-
open: open2,
|
|
55745
|
-
close,
|
|
55746
|
-
openAll,
|
|
55747
|
-
closeAll,
|
|
55748
|
-
parent
|
|
55749
|
-
};
|
|
55750
|
-
};
|
|
55751
|
-
var createBuilder = (self, _styler, _isEmpty) => {
|
|
55752
|
-
const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
|
|
55753
|
-
Object.setPrototypeOf(builder, proto);
|
|
55754
|
-
builder[GENERATOR] = self;
|
|
55755
|
-
builder[STYLER] = _styler;
|
|
55756
|
-
builder[IS_EMPTY] = _isEmpty;
|
|
55757
|
-
return builder;
|
|
55758
|
-
};
|
|
55759
|
-
var applyStyle = (self, string) => {
|
|
55760
|
-
if (self.level <= 0 || !string) {
|
|
55761
|
-
return self[IS_EMPTY] ? "" : string;
|
|
55762
|
-
}
|
|
55763
|
-
let styler = self[STYLER];
|
|
55764
|
-
if (styler === void 0) {
|
|
55765
|
-
return string;
|
|
55766
|
-
}
|
|
55767
|
-
const { openAll, closeAll } = styler;
|
|
55768
|
-
if (string.includes("\x1B")) {
|
|
55769
|
-
while (styler !== void 0) {
|
|
55770
|
-
string = stringReplaceAll(string, styler.close, styler.open);
|
|
55771
|
-
styler = styler.parent;
|
|
55772
|
-
}
|
|
55773
|
-
}
|
|
55774
|
-
const lfIndex = string.indexOf("\n");
|
|
55775
|
-
if (lfIndex !== -1) {
|
|
55776
|
-
string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
|
|
55777
|
-
}
|
|
55778
|
-
return openAll + string + closeAll;
|
|
55779
|
-
};
|
|
55780
|
-
Object.defineProperties(createChalk.prototype, styles2);
|
|
55781
|
-
var chalk = createChalk();
|
|
55782
|
-
var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
55783
|
-
var source_default = chalk;
|
|
55784
|
-
|
|
55785
56839
|
// ../cli/colors.ts
|
|
55786
|
-
var
|
|
55787
|
-
var
|
|
55788
|
-
var
|
|
55789
|
-
var
|
|
56840
|
+
var import_chalk = __toESM(require_chalk());
|
|
56841
|
+
var { white, gray, dim, hidden, bold, cyanBright, bgCyan } = import_chalk.default;
|
|
56842
|
+
var brandColor = import_chalk.default.hex("#BD5B08");
|
|
56843
|
+
var black = import_chalk.default.hex("#111");
|
|
56844
|
+
var blue = import_chalk.default.hex("#0E838F");
|
|
55790
56845
|
var bgBlue = black.bgHex("#0E838F");
|
|
55791
|
-
var red =
|
|
56846
|
+
var red = import_chalk.default.hex("#AB2526");
|
|
55792
56847
|
var bgRed = black.bgHex("#AB2526");
|
|
55793
|
-
var green =
|
|
56848
|
+
var green = import_chalk.default.hex("#218529");
|
|
55794
56849
|
var bgGreen = black.bgHex("#218529");
|
|
55795
|
-
var yellow =
|
|
56850
|
+
var yellow = import_chalk.default.hex("#7F7322");
|
|
55796
56851
|
var bgYellow = black.bgHex("#7F7322");
|
|
55797
56852
|
|
|
55798
56853
|
// ../cli/index.ts
|
|
@@ -55835,15 +56890,22 @@ var log = (msg) => {
|
|
|
55835
56890
|
var newline = () => {
|
|
55836
56891
|
log("");
|
|
55837
56892
|
};
|
|
55838
|
-
var updateStatus = (msg) => {
|
|
55839
|
-
|
|
55840
|
-
|
|
56893
|
+
var updateStatus = (msg, printNewLine = true) => {
|
|
56894
|
+
const lines = msg.split("\n");
|
|
56895
|
+
const restLines = lines.slice(1).map((ln) => `${gray(shapes.bar)} ${white(ln)}`);
|
|
56896
|
+
logRaw(`${gray(shapes.leftT)} ${lines[0]}`);
|
|
56897
|
+
if (restLines.length) {
|
|
56898
|
+
logRaw(restLines.join("\n"));
|
|
56899
|
+
}
|
|
56900
|
+
if (printNewLine)
|
|
56901
|
+
newline();
|
|
55841
56902
|
};
|
|
55842
|
-
var startSection = (heading, subheading) => {
|
|
56903
|
+
var startSection = (heading, subheading, printNewLine = true) => {
|
|
55843
56904
|
logRaw(
|
|
55844
56905
|
`${gray(shapes.corners.tl)} ${brandColor(heading)} ${subheading ? dim(subheading) : ""}`
|
|
55845
56906
|
);
|
|
55846
|
-
|
|
56907
|
+
if (printNewLine)
|
|
56908
|
+
newline();
|
|
55847
56909
|
};
|
|
55848
56910
|
var endSection = (heading, subheading) => {
|
|
55849
56911
|
logRaw(
|
|
@@ -55867,19 +56929,24 @@ var stripAnsi = (str) => {
|
|
|
55867
56929
|
const regex2 = RegExp(pattern, "g");
|
|
55868
56930
|
return str.replace(regex2, "");
|
|
55869
56931
|
};
|
|
55870
|
-
var crash = (msg) => {
|
|
56932
|
+
var crash = (msg, extra) => {
|
|
56933
|
+
error(msg, extra);
|
|
56934
|
+
(0, import_process.exit)(1);
|
|
56935
|
+
};
|
|
56936
|
+
var error = (msg, extra) => {
|
|
55871
56937
|
if (msg) {
|
|
55872
|
-
process.stderr.write(
|
|
55873
|
-
|
|
56938
|
+
process.stderr.write(
|
|
56939
|
+
`${gray(shapes.corners.bl)} ${status.error} ${dim(msg)}
|
|
56940
|
+
${extra ? space() + extra + "\n" : ""}`
|
|
56941
|
+
);
|
|
55874
56942
|
}
|
|
55875
|
-
(0, import_process.exit)(1);
|
|
55876
56943
|
};
|
|
55877
56944
|
|
|
55878
56945
|
// ../../node_modules/.pnpm/@clack+core@0.3.2/node_modules/@clack/core/dist/index.mjs
|
|
55879
56946
|
var import_sisteransi = __toESM(require_src(), 1);
|
|
55880
|
-
var
|
|
56947
|
+
var import_node_process = require("node:process");
|
|
55881
56948
|
var import_node_readline = __toESM(require("node:readline"), 1);
|
|
55882
|
-
var
|
|
56949
|
+
var import_node_tty = require("node:tty");
|
|
55883
56950
|
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
55884
56951
|
function z({ onlyFirst: t = false } = {}) {
|
|
55885
56952
|
const u = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");
|
|
@@ -56092,17 +57159,20 @@ function FD(t, u) {
|
|
|
56092
57159
|
return s;
|
|
56093
57160
|
}
|
|
56094
57161
|
var R = Symbol("clack:cancel");
|
|
57162
|
+
function eD(t) {
|
|
57163
|
+
return t === R;
|
|
57164
|
+
}
|
|
56095
57165
|
function g(t, u) {
|
|
56096
57166
|
t.isTTY && t.setRawMode(u);
|
|
56097
57167
|
}
|
|
56098
57168
|
var V = /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"]]);
|
|
56099
57169
|
var tD = /* @__PURE__ */ new Set(["up", "down", "left", "right", "space", "enter"]);
|
|
56100
57170
|
var h = class {
|
|
56101
|
-
constructor({ render: u, input: F =
|
|
57171
|
+
constructor({ render: u, input: F = import_node_process.stdin, output: e = import_node_process.stdout, ...s }, C = true) {
|
|
56102
57172
|
this._track = false, this._cursor = 0, this.state = "initial", this.error = "", this.subscribers = /* @__PURE__ */ new Map(), this._prevFrame = "", this.opts = s, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = u.bind(this), this._track = C, this.input = F, this.output = e;
|
|
56103
57173
|
}
|
|
56104
57174
|
prompt() {
|
|
56105
|
-
const u = new
|
|
57175
|
+
const u = new import_node_tty.WriteStream(0);
|
|
56106
57176
|
return u._write = (F, e, s) => {
|
|
56107
57177
|
this._track && (this.value = this.rl.line.replace(/\t/g, ""), this._cursor = this.rl.cursor, this.emit("value", this.value)), s();
|
|
56108
57178
|
}, this.input.pipe(u), this.rl = import_node_readline.default.createInterface({ input: this.input, output: u, tabSize: 2, prompt: "", escapeCodeTimeout: 50 }), import_node_readline.default.emitKeypressEvents(this.input, this.rl), this.rl.prompt(), this.opts.initialValue !== void 0 && this._track && this.rl.write(this.opts.initialValue), this.input.on("keypress", this.onKeypress), g(this.input, true), this.output.on("resize", this.render), this.render(), new Promise((F, e) => {
|
|
@@ -56196,6 +57266,38 @@ var sD = class extends h {
|
|
|
56196
57266
|
});
|
|
56197
57267
|
}
|
|
56198
57268
|
};
|
|
57269
|
+
var iD = class extends h {
|
|
57270
|
+
constructor(u) {
|
|
57271
|
+
super(u, false), this.cursor = 0, this.options = u.options, this.value = [...u.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: F }) => F === u.cursorAt), 0), this.on("key", (F) => {
|
|
57272
|
+
F === "a" && this.toggleAll();
|
|
57273
|
+
}), this.on("cursor", (F) => {
|
|
57274
|
+
switch (F) {
|
|
57275
|
+
case "left":
|
|
57276
|
+
case "up":
|
|
57277
|
+
this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
|
|
57278
|
+
break;
|
|
57279
|
+
case "down":
|
|
57280
|
+
case "right":
|
|
57281
|
+
this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
|
|
57282
|
+
break;
|
|
57283
|
+
case "space":
|
|
57284
|
+
this.toggleValue();
|
|
57285
|
+
break;
|
|
57286
|
+
}
|
|
57287
|
+
});
|
|
57288
|
+
}
|
|
57289
|
+
get _value() {
|
|
57290
|
+
return this.options[this.cursor].value;
|
|
57291
|
+
}
|
|
57292
|
+
toggleAll() {
|
|
57293
|
+
const u = this.value.length === this.options.length;
|
|
57294
|
+
this.value = u ? [] : this.options.map((F) => F.value);
|
|
57295
|
+
}
|
|
57296
|
+
toggleValue() {
|
|
57297
|
+
const u = this.value.includes(this._value);
|
|
57298
|
+
this.value = u ? this.value.filter((F) => F !== this._value) : [...this.value, this._value];
|
|
57299
|
+
}
|
|
57300
|
+
};
|
|
56199
57301
|
var ED = class extends h {
|
|
56200
57302
|
constructor(u) {
|
|
56201
57303
|
super(u, false), this.cursor = 0, this.options = u.options, this.cursor = this.options.findIndex(({ value: F }) => F === u.initialValue), this.cursor === -1 && (this.cursor = 0), this.changeValue(), this.on("cursor", (F) => {
|
|
@@ -56237,18 +57339,15 @@ var oD = class extends h {
|
|
|
56237
57339
|
}
|
|
56238
57340
|
};
|
|
56239
57341
|
|
|
56240
|
-
// ../../node_modules/.pnpm/
|
|
56241
|
-
var
|
|
57342
|
+
// ../../node_modules/.pnpm/log-update@5.0.1/node_modules/log-update/index.js
|
|
57343
|
+
var import_node_process4 = __toESM(require("node:process"), 1);
|
|
57344
|
+
|
|
57345
|
+
// ../../node_modules/.pnpm/ansi-escapes@5.0.0/node_modules/ansi-escapes/index.js
|
|
56242
57346
|
var ESC = "\x1B[";
|
|
56243
57347
|
var OSC = "\x1B]";
|
|
56244
57348
|
var BEL = "\x07";
|
|
56245
57349
|
var SEP = ";";
|
|
56246
|
-
var
|
|
56247
|
-
var isTerminalApp = !isBrowser && import_node_process3.default.env.TERM_PROGRAM === "Apple_Terminal";
|
|
56248
|
-
var isWindows = !isBrowser && import_node_process3.default.platform === "win32";
|
|
56249
|
-
var cwdFunction = isBrowser ? () => {
|
|
56250
|
-
throw new Error("`process.cwd()` only works in Node.js, not the browser.");
|
|
56251
|
-
} : import_node_process3.default.cwd;
|
|
57350
|
+
var isTerminalApp = process.env.TERM_PROGRAM === "Apple_Terminal";
|
|
56252
57351
|
var ansiEscapes = {};
|
|
56253
57352
|
ansiEscapes.cursorTo = (x2, y2) => {
|
|
56254
57353
|
if (typeof x2 !== "number") {
|
|
@@ -56257,7 +57356,7 @@ ansiEscapes.cursorTo = (x2, y2) => {
|
|
|
56257
57356
|
if (typeof y2 !== "number") {
|
|
56258
57357
|
return ESC + (x2 + 1) + "G";
|
|
56259
57358
|
}
|
|
56260
|
-
return ESC + (y2 + 1) +
|
|
57359
|
+
return ESC + (y2 + 1) + ";" + (x2 + 1) + "H";
|
|
56261
57360
|
};
|
|
56262
57361
|
ansiEscapes.cursorMove = (x2, y2) => {
|
|
56263
57362
|
if (typeof x2 !== "number") {
|
|
@@ -56307,151 +57406,32 @@ ansiEscapes.eraseScreen = ESC + "2J";
|
|
|
56307
57406
|
ansiEscapes.scrollUp = ESC + "S";
|
|
56308
57407
|
ansiEscapes.scrollDown = ESC + "T";
|
|
56309
57408
|
ansiEscapes.clearScreen = "\x1Bc";
|
|
56310
|
-
ansiEscapes.clearTerminal =
|
|
56311
|
-
ansiEscapes.enterAlternativeScreen = ESC + "?1049h";
|
|
56312
|
-
ansiEscapes.exitAlternativeScreen = ESC + "?1049l";
|
|
56313
|
-
ansiEscapes.beep = BEL;
|
|
56314
|
-
ansiEscapes.link = (text, url) => [
|
|
56315
|
-
OSC,
|
|
56316
|
-
"8",
|
|
56317
|
-
SEP,
|
|
56318
|
-
SEP,
|
|
56319
|
-
url,
|
|
56320
|
-
BEL,
|
|
56321
|
-
text,
|
|
56322
|
-
OSC,
|
|
56323
|
-
"8",
|
|
56324
|
-
SEP,
|
|
56325
|
-
SEP,
|
|
56326
|
-
BEL
|
|
56327
|
-
].join("");
|
|
56328
|
-
ansiEscapes.image = (buffer, options = {}) => {
|
|
56329
|
-
let returnValue = `${OSC}1337;File=inline=1`;
|
|
56330
|
-
if (options.width) {
|
|
56331
|
-
returnValue += `;width=${options.width}`;
|
|
56332
|
-
}
|
|
56333
|
-
if (options.height) {
|
|
56334
|
-
returnValue += `;height=${options.height}`;
|
|
56335
|
-
}
|
|
56336
|
-
if (options.preserveAspectRatio === false) {
|
|
56337
|
-
returnValue += ";preserveAspectRatio=0";
|
|
56338
|
-
}
|
|
56339
|
-
return returnValue + ":" + buffer.toString("base64") + BEL;
|
|
56340
|
-
};
|
|
56341
|
-
ansiEscapes.iTerm = {
|
|
56342
|
-
setCwd: (cwd = cwdFunction()) => `${OSC}50;CurrentDir=${cwd}${BEL}`,
|
|
56343
|
-
annotation(message, options = {}) {
|
|
56344
|
-
let returnValue = `${OSC}1337;`;
|
|
56345
|
-
const hasX = typeof options.x !== "undefined";
|
|
56346
|
-
const hasY = typeof options.y !== "undefined";
|
|
56347
|
-
if ((hasX || hasY) && !(hasX && hasY && typeof options.length !== "undefined")) {
|
|
56348
|
-
throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");
|
|
56349
|
-
}
|
|
56350
|
-
message = message.replace(/\|/g, "");
|
|
56351
|
-
returnValue += options.isHidden ? "AddHiddenAnnotation=" : "AddAnnotation=";
|
|
56352
|
-
if (options.length > 0) {
|
|
56353
|
-
returnValue += (hasX ? [message, options.length, options.x, options.y] : [options.length, message]).join("|");
|
|
56354
|
-
} else {
|
|
56355
|
-
returnValue += message;
|
|
56356
|
-
}
|
|
56357
|
-
return returnValue + BEL;
|
|
56358
|
-
}
|
|
56359
|
-
};
|
|
56360
|
-
var ansi_escapes_default = ansiEscapes;
|
|
56361
|
-
|
|
56362
|
-
// ../../node_modules/.pnpm/log-update@5.0.1/node_modules/log-update/index.js
|
|
56363
|
-
var import_node_process6 = __toESM(require("node:process"), 1);
|
|
56364
|
-
|
|
56365
|
-
// ../../node_modules/.pnpm/ansi-escapes@5.0.0/node_modules/ansi-escapes/index.js
|
|
56366
|
-
var ESC2 = "\x1B[";
|
|
56367
|
-
var OSC2 = "\x1B]";
|
|
56368
|
-
var BEL2 = "\x07";
|
|
56369
|
-
var SEP2 = ";";
|
|
56370
|
-
var isTerminalApp2 = process.env.TERM_PROGRAM === "Apple_Terminal";
|
|
56371
|
-
var ansiEscapes2 = {};
|
|
56372
|
-
ansiEscapes2.cursorTo = (x2, y2) => {
|
|
56373
|
-
if (typeof x2 !== "number") {
|
|
56374
|
-
throw new TypeError("The `x` argument is required");
|
|
56375
|
-
}
|
|
56376
|
-
if (typeof y2 !== "number") {
|
|
56377
|
-
return ESC2 + (x2 + 1) + "G";
|
|
56378
|
-
}
|
|
56379
|
-
return ESC2 + (y2 + 1) + ";" + (x2 + 1) + "H";
|
|
56380
|
-
};
|
|
56381
|
-
ansiEscapes2.cursorMove = (x2, y2) => {
|
|
56382
|
-
if (typeof x2 !== "number") {
|
|
56383
|
-
throw new TypeError("The `x` argument is required");
|
|
56384
|
-
}
|
|
56385
|
-
let returnValue = "";
|
|
56386
|
-
if (x2 < 0) {
|
|
56387
|
-
returnValue += ESC2 + -x2 + "D";
|
|
56388
|
-
} else if (x2 > 0) {
|
|
56389
|
-
returnValue += ESC2 + x2 + "C";
|
|
56390
|
-
}
|
|
56391
|
-
if (y2 < 0) {
|
|
56392
|
-
returnValue += ESC2 + -y2 + "A";
|
|
56393
|
-
} else if (y2 > 0) {
|
|
56394
|
-
returnValue += ESC2 + y2 + "B";
|
|
56395
|
-
}
|
|
56396
|
-
return returnValue;
|
|
56397
|
-
};
|
|
56398
|
-
ansiEscapes2.cursorUp = (count = 1) => ESC2 + count + "A";
|
|
56399
|
-
ansiEscapes2.cursorDown = (count = 1) => ESC2 + count + "B";
|
|
56400
|
-
ansiEscapes2.cursorForward = (count = 1) => ESC2 + count + "C";
|
|
56401
|
-
ansiEscapes2.cursorBackward = (count = 1) => ESC2 + count + "D";
|
|
56402
|
-
ansiEscapes2.cursorLeft = ESC2 + "G";
|
|
56403
|
-
ansiEscapes2.cursorSavePosition = isTerminalApp2 ? "\x1B7" : ESC2 + "s";
|
|
56404
|
-
ansiEscapes2.cursorRestorePosition = isTerminalApp2 ? "\x1B8" : ESC2 + "u";
|
|
56405
|
-
ansiEscapes2.cursorGetPosition = ESC2 + "6n";
|
|
56406
|
-
ansiEscapes2.cursorNextLine = ESC2 + "E";
|
|
56407
|
-
ansiEscapes2.cursorPrevLine = ESC2 + "F";
|
|
56408
|
-
ansiEscapes2.cursorHide = ESC2 + "?25l";
|
|
56409
|
-
ansiEscapes2.cursorShow = ESC2 + "?25h";
|
|
56410
|
-
ansiEscapes2.eraseLines = (count) => {
|
|
56411
|
-
let clear = "";
|
|
56412
|
-
for (let i = 0; i < count; i++) {
|
|
56413
|
-
clear += ansiEscapes2.eraseLine + (i < count - 1 ? ansiEscapes2.cursorUp() : "");
|
|
56414
|
-
}
|
|
56415
|
-
if (count) {
|
|
56416
|
-
clear += ansiEscapes2.cursorLeft;
|
|
56417
|
-
}
|
|
56418
|
-
return clear;
|
|
56419
|
-
};
|
|
56420
|
-
ansiEscapes2.eraseEndLine = ESC2 + "K";
|
|
56421
|
-
ansiEscapes2.eraseStartLine = ESC2 + "1K";
|
|
56422
|
-
ansiEscapes2.eraseLine = ESC2 + "2K";
|
|
56423
|
-
ansiEscapes2.eraseDown = ESC2 + "J";
|
|
56424
|
-
ansiEscapes2.eraseUp = ESC2 + "1J";
|
|
56425
|
-
ansiEscapes2.eraseScreen = ESC2 + "2J";
|
|
56426
|
-
ansiEscapes2.scrollUp = ESC2 + "S";
|
|
56427
|
-
ansiEscapes2.scrollDown = ESC2 + "T";
|
|
56428
|
-
ansiEscapes2.clearScreen = "\x1Bc";
|
|
56429
|
-
ansiEscapes2.clearTerminal = process.platform === "win32" ? `${ansiEscapes2.eraseScreen}${ESC2}0f` : (
|
|
57409
|
+
ansiEscapes.clearTerminal = process.platform === "win32" ? `${ansiEscapes.eraseScreen}${ESC}0f` : (
|
|
56430
57410
|
// 1. Erases the screen (Only done in case `2` is not supported)
|
|
56431
57411
|
// 2. Erases the whole screen including scrollback buffer
|
|
56432
57412
|
// 3. Moves cursor to the top-left position
|
|
56433
57413
|
// More info: https://www.real-world-systems.com/docs/ANSIcode.html
|
|
56434
|
-
`${
|
|
57414
|
+
`${ansiEscapes.eraseScreen}${ESC}3J${ESC}H`
|
|
56435
57415
|
);
|
|
56436
|
-
|
|
56437
|
-
|
|
57416
|
+
ansiEscapes.beep = BEL;
|
|
57417
|
+
ansiEscapes.link = (text, url) => {
|
|
56438
57418
|
return [
|
|
56439
|
-
|
|
57419
|
+
OSC,
|
|
56440
57420
|
"8",
|
|
56441
|
-
|
|
56442
|
-
|
|
57421
|
+
SEP,
|
|
57422
|
+
SEP,
|
|
56443
57423
|
url,
|
|
56444
|
-
|
|
57424
|
+
BEL,
|
|
56445
57425
|
text,
|
|
56446
|
-
|
|
57426
|
+
OSC,
|
|
56447
57427
|
"8",
|
|
56448
|
-
|
|
56449
|
-
|
|
56450
|
-
|
|
57428
|
+
SEP,
|
|
57429
|
+
SEP,
|
|
57430
|
+
BEL
|
|
56451
57431
|
].join("");
|
|
56452
57432
|
};
|
|
56453
|
-
|
|
56454
|
-
let returnValue = `${
|
|
57433
|
+
ansiEscapes.image = (buffer, options = {}) => {
|
|
57434
|
+
let returnValue = `${OSC}1337;File=inline=1`;
|
|
56455
57435
|
if (options.width) {
|
|
56456
57436
|
returnValue += `;width=${options.width}`;
|
|
56457
57437
|
}
|
|
@@ -56461,12 +57441,12 @@ ansiEscapes2.image = (buffer, options = {}) => {
|
|
|
56461
57441
|
if (options.preserveAspectRatio === false) {
|
|
56462
57442
|
returnValue += ";preserveAspectRatio=0";
|
|
56463
57443
|
}
|
|
56464
|
-
return returnValue + ":" + buffer.toString("base64") +
|
|
57444
|
+
return returnValue + ":" + buffer.toString("base64") + BEL;
|
|
56465
57445
|
};
|
|
56466
|
-
|
|
56467
|
-
setCwd: (cwd = process.cwd()) => `${
|
|
57446
|
+
ansiEscapes.iTerm = {
|
|
57447
|
+
setCwd: (cwd = process.cwd()) => `${OSC}50;CurrentDir=${cwd}${BEL}`,
|
|
56468
57448
|
annotation: (message, options = {}) => {
|
|
56469
|
-
let returnValue = `${
|
|
57449
|
+
let returnValue = `${OSC}1337;`;
|
|
56470
57450
|
const hasX = typeof options.x !== "undefined";
|
|
56471
57451
|
const hasY = typeof options.y !== "undefined";
|
|
56472
57452
|
if ((hasX || hasY) && !(hasX && hasY && typeof options.length !== "undefined")) {
|
|
@@ -56479,21 +57459,21 @@ ansiEscapes2.iTerm = {
|
|
|
56479
57459
|
} else {
|
|
56480
57460
|
returnValue += message;
|
|
56481
57461
|
}
|
|
56482
|
-
return returnValue +
|
|
57462
|
+
return returnValue + BEL;
|
|
56483
57463
|
}
|
|
56484
57464
|
};
|
|
56485
|
-
var
|
|
57465
|
+
var ansi_escapes_default = ansiEscapes;
|
|
56486
57466
|
|
|
56487
57467
|
// ../../node_modules/.pnpm/cli-cursor@4.0.0/node_modules/cli-cursor/index.js
|
|
56488
|
-
var
|
|
57468
|
+
var import_node_process3 = __toESM(require("node:process"), 1);
|
|
56489
57469
|
|
|
56490
57470
|
// ../../node_modules/.pnpm/restore-cursor@4.0.0/node_modules/restore-cursor/index.js
|
|
56491
|
-
var
|
|
57471
|
+
var import_node_process2 = __toESM(require("node:process"), 1);
|
|
56492
57472
|
var import_onetime = __toESM(require_onetime(), 1);
|
|
56493
57473
|
var import_signal_exit = __toESM(require_signal_exit(), 1);
|
|
56494
57474
|
var restoreCursor = (0, import_onetime.default)(() => {
|
|
56495
57475
|
(0, import_signal_exit.default)(() => {
|
|
56496
|
-
|
|
57476
|
+
import_node_process2.default.stderr.write("\x1B[?25h");
|
|
56497
57477
|
}, { alwaysLast: true });
|
|
56498
57478
|
});
|
|
56499
57479
|
var restore_cursor_default = restoreCursor;
|
|
@@ -56501,14 +57481,14 @@ var restore_cursor_default = restoreCursor;
|
|
|
56501
57481
|
// ../../node_modules/.pnpm/cli-cursor@4.0.0/node_modules/cli-cursor/index.js
|
|
56502
57482
|
var isHidden = false;
|
|
56503
57483
|
var cliCursor = {};
|
|
56504
|
-
cliCursor.show = (writableStream =
|
|
57484
|
+
cliCursor.show = (writableStream = import_node_process3.default.stderr) => {
|
|
56505
57485
|
if (!writableStream.isTTY) {
|
|
56506
57486
|
return;
|
|
56507
57487
|
}
|
|
56508
57488
|
isHidden = false;
|
|
56509
57489
|
writableStream.write("\x1B[?25h");
|
|
56510
57490
|
};
|
|
56511
|
-
cliCursor.hide = (writableStream =
|
|
57491
|
+
cliCursor.hide = (writableStream = import_node_process3.default.stderr) => {
|
|
56512
57492
|
if (!writableStream.isTTY) {
|
|
56513
57493
|
return;
|
|
56514
57494
|
}
|
|
@@ -56589,11 +57569,11 @@ function stringWidth(string, options = {}) {
|
|
|
56589
57569
|
}
|
|
56590
57570
|
|
|
56591
57571
|
// ../../node_modules/.pnpm/ansi-styles@6.2.1/node_modules/ansi-styles/index.js
|
|
56592
|
-
var
|
|
56593
|
-
var
|
|
56594
|
-
var
|
|
56595
|
-
var
|
|
56596
|
-
var
|
|
57572
|
+
var ANSI_BACKGROUND_OFFSET = 10;
|
|
57573
|
+
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
57574
|
+
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
57575
|
+
var wrapAnsi16m = (offset = 0) => (red2, green2, blue2) => `\x1B[${38 + offset};2;${red2};${green2};${blue2}m`;
|
|
57576
|
+
var styles = {
|
|
56597
57577
|
modifier: {
|
|
56598
57578
|
reset: [0, 0],
|
|
56599
57579
|
// 21 isn't widely supported and 22 does the same thing
|
|
@@ -56653,39 +57633,39 @@ var styles3 = {
|
|
|
56653
57633
|
bgWhiteBright: [107, 49]
|
|
56654
57634
|
}
|
|
56655
57635
|
};
|
|
56656
|
-
var
|
|
56657
|
-
var
|
|
56658
|
-
var
|
|
56659
|
-
var
|
|
56660
|
-
function
|
|
57636
|
+
var modifierNames = Object.keys(styles.modifier);
|
|
57637
|
+
var foregroundColorNames = Object.keys(styles.color);
|
|
57638
|
+
var backgroundColorNames = Object.keys(styles.bgColor);
|
|
57639
|
+
var colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
57640
|
+
function assembleStyles() {
|
|
56661
57641
|
const codes = /* @__PURE__ */ new Map();
|
|
56662
|
-
for (const [groupName, group] of Object.entries(
|
|
57642
|
+
for (const [groupName, group] of Object.entries(styles)) {
|
|
56663
57643
|
for (const [styleName, style] of Object.entries(group)) {
|
|
56664
|
-
|
|
57644
|
+
styles[styleName] = {
|
|
56665
57645
|
open: `\x1B[${style[0]}m`,
|
|
56666
57646
|
close: `\x1B[${style[1]}m`
|
|
56667
57647
|
};
|
|
56668
|
-
group[styleName] =
|
|
57648
|
+
group[styleName] = styles[styleName];
|
|
56669
57649
|
codes.set(style[0], style[1]);
|
|
56670
57650
|
}
|
|
56671
|
-
Object.defineProperty(
|
|
57651
|
+
Object.defineProperty(styles, groupName, {
|
|
56672
57652
|
value: group,
|
|
56673
57653
|
enumerable: false
|
|
56674
57654
|
});
|
|
56675
57655
|
}
|
|
56676
|
-
Object.defineProperty(
|
|
57656
|
+
Object.defineProperty(styles, "codes", {
|
|
56677
57657
|
value: codes,
|
|
56678
57658
|
enumerable: false
|
|
56679
57659
|
});
|
|
56680
|
-
|
|
56681
|
-
|
|
56682
|
-
|
|
56683
|
-
|
|
56684
|
-
|
|
56685
|
-
|
|
56686
|
-
|
|
56687
|
-
|
|
56688
|
-
Object.defineProperties(
|
|
57660
|
+
styles.color.close = "\x1B[39m";
|
|
57661
|
+
styles.bgColor.close = "\x1B[49m";
|
|
57662
|
+
styles.color.ansi = wrapAnsi16();
|
|
57663
|
+
styles.color.ansi256 = wrapAnsi256();
|
|
57664
|
+
styles.color.ansi16m = wrapAnsi16m();
|
|
57665
|
+
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
57666
|
+
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
57667
|
+
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
57668
|
+
Object.defineProperties(styles, {
|
|
56689
57669
|
rgbToAnsi256: {
|
|
56690
57670
|
value: (red2, green2, blue2) => {
|
|
56691
57671
|
if (red2 === green2 && green2 === blue2) {
|
|
@@ -56723,7 +57703,7 @@ function assembleStyles2() {
|
|
|
56723
57703
|
enumerable: false
|
|
56724
57704
|
},
|
|
56725
57705
|
hexToAnsi256: {
|
|
56726
|
-
value: (hex) =>
|
|
57706
|
+
value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
|
|
56727
57707
|
enumerable: false
|
|
56728
57708
|
},
|
|
56729
57709
|
ansi256ToAnsi: {
|
|
@@ -56761,18 +57741,18 @@ function assembleStyles2() {
|
|
|
56761
57741
|
enumerable: false
|
|
56762
57742
|
},
|
|
56763
57743
|
rgbToAnsi: {
|
|
56764
|
-
value: (red2, green2, blue2) =>
|
|
57744
|
+
value: (red2, green2, blue2) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red2, green2, blue2)),
|
|
56765
57745
|
enumerable: false
|
|
56766
57746
|
},
|
|
56767
57747
|
hexToAnsi: {
|
|
56768
|
-
value: (hex) =>
|
|
57748
|
+
value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
|
|
56769
57749
|
enumerable: false
|
|
56770
57750
|
}
|
|
56771
57751
|
});
|
|
56772
|
-
return
|
|
57752
|
+
return styles;
|
|
56773
57753
|
}
|
|
56774
|
-
var
|
|
56775
|
-
var
|
|
57754
|
+
var ansiStyles = assembleStyles();
|
|
57755
|
+
var ansi_styles_default = ansiStyles;
|
|
56776
57756
|
|
|
56777
57757
|
// ../../node_modules/.pnpm/wrap-ansi@8.1.0/node_modules/wrap-ansi/index.js
|
|
56778
57758
|
var ESCAPES = /* @__PURE__ */ new Set([
|
|
@@ -56902,7 +57882,7 @@ var exec = (string, columns, options = {}) => {
|
|
|
56902
57882
|
escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
|
|
56903
57883
|
}
|
|
56904
57884
|
}
|
|
56905
|
-
const code =
|
|
57885
|
+
const code = ansi_styles_default.codes.get(Number(escapeCode));
|
|
56906
57886
|
if (pre[index + 1] === "\n") {
|
|
56907
57887
|
if (escapeUrl) {
|
|
56908
57888
|
returnValue += wrapAnsiHyperlink("");
|
|
@@ -56963,7 +57943,7 @@ var checkAnsi = (ansiCodes, isEscapes, endAnsiCode) => {
|
|
|
56963
57943
|
if (ansiCode.includes(";")) {
|
|
56964
57944
|
ansiCode = ansiCode.split(";")[0][0] + "0";
|
|
56965
57945
|
}
|
|
56966
|
-
const item =
|
|
57946
|
+
const item = ansi_styles_default.codes.get(Number.parseInt(ansiCode, 10));
|
|
56967
57947
|
if (item) {
|
|
56968
57948
|
const indexEscape = ansiCodes.indexOf(item.toString());
|
|
56969
57949
|
if (indexEscape === -1) {
|
|
@@ -56981,7 +57961,7 @@ var checkAnsi = (ansiCodes, isEscapes, endAnsiCode) => {
|
|
|
56981
57961
|
if (isEscapes) {
|
|
56982
57962
|
output = output.filter((element, index) => output.indexOf(element) === index);
|
|
56983
57963
|
if (endAnsiCode !== void 0) {
|
|
56984
|
-
const fistEscapeCode = wrapAnsi2(
|
|
57964
|
+
const fistEscapeCode = wrapAnsi2(ansi_styles_default.codes.get(Number.parseInt(endAnsiCode, 10)));
|
|
56985
57965
|
output = output.reduce((current, next) => next === fistEscapeCode ? [next, ...current] : [...current, next], []);
|
|
56986
57966
|
}
|
|
56987
57967
|
}
|
|
@@ -57073,11 +58053,11 @@ function createLogUpdate(stream, { showCursor = false } = {}) {
|
|
|
57073
58053
|
hard: true,
|
|
57074
58054
|
wordWrap: false
|
|
57075
58055
|
});
|
|
57076
|
-
stream.write(
|
|
58056
|
+
stream.write(ansi_escapes_default.eraseLines(previousLineCount) + output);
|
|
57077
58057
|
previousLineCount = output.split("\n").length;
|
|
57078
58058
|
};
|
|
57079
58059
|
render.clear = () => {
|
|
57080
|
-
stream.write(
|
|
58060
|
+
stream.write(ansi_escapes_default.eraseLines(previousLineCount));
|
|
57081
58061
|
previousOutput = "";
|
|
57082
58062
|
previousWidth = getWidth(stream);
|
|
57083
58063
|
previousLineCount = 0;
|
|
@@ -57092,11 +58072,59 @@ function createLogUpdate(stream, { showCursor = false } = {}) {
|
|
|
57092
58072
|
};
|
|
57093
58073
|
return render;
|
|
57094
58074
|
}
|
|
57095
|
-
var logUpdate = createLogUpdate(
|
|
57096
|
-
var logUpdateStderr = createLogUpdate(
|
|
58075
|
+
var logUpdate = createLogUpdate(import_node_process4.default.stdout);
|
|
58076
|
+
var logUpdateStderr = createLogUpdate(import_node_process4.default.stderr);
|
|
58077
|
+
|
|
58078
|
+
// ../cli/select-list.ts
|
|
58079
|
+
var SelectRefreshablePrompt = class extends h {
|
|
58080
|
+
options;
|
|
58081
|
+
cursor = 0;
|
|
58082
|
+
get _value() {
|
|
58083
|
+
return this.options[this.cursor];
|
|
58084
|
+
}
|
|
58085
|
+
changeValue() {
|
|
58086
|
+
this.value = this._value.value;
|
|
58087
|
+
}
|
|
58088
|
+
constructor(opts) {
|
|
58089
|
+
super(opts, false);
|
|
58090
|
+
this.options = opts.options;
|
|
58091
|
+
this.cursor = this.options.findIndex(
|
|
58092
|
+
({ value }) => value === opts.initialValue
|
|
58093
|
+
);
|
|
58094
|
+
if (this.cursor === -1)
|
|
58095
|
+
this.cursor = 0;
|
|
58096
|
+
this.changeValue();
|
|
58097
|
+
this.on("key", (c2) => {
|
|
58098
|
+
if (c2 !== "r")
|
|
58099
|
+
return;
|
|
58100
|
+
void opts.onRefresh().then((newOptions) => {
|
|
58101
|
+
this.options = [...newOptions];
|
|
58102
|
+
this.cursor = 0;
|
|
58103
|
+
this.changeValue();
|
|
58104
|
+
const that = this;
|
|
58105
|
+
if ("render" in that && typeof that.render === "function") {
|
|
58106
|
+
that.render();
|
|
58107
|
+
}
|
|
58108
|
+
}).catch(() => {
|
|
58109
|
+
});
|
|
58110
|
+
});
|
|
58111
|
+
this.on("cursor", (key) => {
|
|
58112
|
+
switch (key) {
|
|
58113
|
+
case "left":
|
|
58114
|
+
case "up":
|
|
58115
|
+
this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
|
|
58116
|
+
break;
|
|
58117
|
+
case "down":
|
|
58118
|
+
case "right":
|
|
58119
|
+
this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
|
|
58120
|
+
break;
|
|
58121
|
+
}
|
|
58122
|
+
this.changeValue();
|
|
58123
|
+
});
|
|
58124
|
+
}
|
|
58125
|
+
};
|
|
57097
58126
|
|
|
57098
58127
|
// ../cli/interactive.ts
|
|
57099
|
-
process.stdout.columns = 300;
|
|
57100
58128
|
var logUpdate2 = createLogUpdate(process.stdout);
|
|
57101
58129
|
var grayBar = gray(shapes.bar);
|
|
57102
58130
|
var blCorner = gray(shapes.corners.bl);
|
|
@@ -57104,8 +58132,8 @@ var leftT = gray(shapes.leftT);
|
|
|
57104
58132
|
var inputPrompt = async (promptConfig) => {
|
|
57105
58133
|
const renderers = getRenderers(promptConfig);
|
|
57106
58134
|
let prompt;
|
|
57107
|
-
const dispatchRender = (props) => {
|
|
57108
|
-
const renderedLines = renderers[props.state](props);
|
|
58135
|
+
const dispatchRender = (props, p2) => {
|
|
58136
|
+
const renderedLines = renderers[props.state](props, p2);
|
|
57109
58137
|
return renderedLines.join("\n");
|
|
57110
58138
|
};
|
|
57111
58139
|
if (promptConfig.type === "select") {
|
|
@@ -57113,7 +58141,7 @@ var inputPrompt = async (promptConfig) => {
|
|
|
57113
58141
|
...promptConfig,
|
|
57114
58142
|
initialValue: String(promptConfig.defaultValue),
|
|
57115
58143
|
render() {
|
|
57116
|
-
return dispatchRender(this);
|
|
58144
|
+
return dispatchRender(this, prompt);
|
|
57117
58145
|
}
|
|
57118
58146
|
});
|
|
57119
58147
|
} else if (promptConfig.type === "confirm") {
|
|
@@ -57123,28 +58151,59 @@ var inputPrompt = async (promptConfig) => {
|
|
|
57123
58151
|
active: promptConfig.activeText || "",
|
|
57124
58152
|
inactive: promptConfig.inactiveText || "",
|
|
57125
58153
|
render() {
|
|
57126
|
-
return dispatchRender(this);
|
|
58154
|
+
return dispatchRender(this, prompt);
|
|
58155
|
+
}
|
|
58156
|
+
});
|
|
58157
|
+
} else if (promptConfig.type == "multiselect") {
|
|
58158
|
+
let initialValues;
|
|
58159
|
+
if (Array.isArray(promptConfig.defaultValue)) {
|
|
58160
|
+
initialValues = promptConfig.defaultValue;
|
|
58161
|
+
} else if (promptConfig.defaultValue !== void 0) {
|
|
58162
|
+
initialValues = [String(promptConfig.defaultValue)];
|
|
58163
|
+
}
|
|
58164
|
+
prompt = new iD({
|
|
58165
|
+
...promptConfig,
|
|
58166
|
+
options: promptConfig.options,
|
|
58167
|
+
initialValues,
|
|
58168
|
+
render() {
|
|
58169
|
+
return dispatchRender(this, prompt);
|
|
58170
|
+
}
|
|
58171
|
+
});
|
|
58172
|
+
} else if (promptConfig.type === "list") {
|
|
58173
|
+
prompt = new SelectRefreshablePrompt({
|
|
58174
|
+
...promptConfig,
|
|
58175
|
+
onRefresh: promptConfig.onRefresh ?? (() => Promise.resolve(promptConfig.options)),
|
|
58176
|
+
initialValue: String(promptConfig.defaultValue),
|
|
58177
|
+
render() {
|
|
58178
|
+
return dispatchRender(this, prompt);
|
|
57127
58179
|
}
|
|
57128
58180
|
});
|
|
57129
58181
|
} else {
|
|
57130
58182
|
prompt = new oD({
|
|
57131
58183
|
...promptConfig,
|
|
58184
|
+
initialValue: promptConfig.initialValue,
|
|
57132
58185
|
defaultValue: String(promptConfig.defaultValue),
|
|
57133
58186
|
render() {
|
|
57134
|
-
return dispatchRender(this);
|
|
58187
|
+
return dispatchRender(this, prompt);
|
|
57135
58188
|
}
|
|
57136
58189
|
});
|
|
57137
58190
|
}
|
|
57138
58191
|
const input = await prompt.prompt();
|
|
58192
|
+
if (eD(input)) {
|
|
58193
|
+
cancel("Operation cancelled.");
|
|
58194
|
+
process.exit(0);
|
|
58195
|
+
}
|
|
57139
58196
|
return input;
|
|
57140
58197
|
};
|
|
57141
58198
|
var renderSubmit = (config14, value) => {
|
|
57142
58199
|
const { question, label } = config14;
|
|
58200
|
+
if (config14.type !== "confirm" && value.length === 0) {
|
|
58201
|
+
return [`${leftT} ${question} ${dim("(skipped)")}`, `${grayBar}`];
|
|
58202
|
+
}
|
|
57143
58203
|
const content = config14.type === "confirm" ? `${grayBar} ${brandColor(value)} ${dim(label)}` : `${grayBar} ${brandColor(label)} ${dim(value)}`;
|
|
57144
58204
|
return [`${leftT} ${question}`, content, `${grayBar}`];
|
|
57145
58205
|
};
|
|
57146
58206
|
var handleCancel = () => {
|
|
57147
|
-
process.stdout.write(ansi_escapes_default.cursorShow);
|
|
57148
58207
|
cancel("Operation cancelled.");
|
|
57149
58208
|
process.exit(0);
|
|
57150
58209
|
};
|
|
@@ -57156,6 +58215,10 @@ var getRenderers = (config14) => {
|
|
|
57156
58215
|
return getConfirmRenderers(config14);
|
|
57157
58216
|
case "text":
|
|
57158
58217
|
return getTextRenderers(config14);
|
|
58218
|
+
case "multiselect":
|
|
58219
|
+
return getSelectRenderers(config14);
|
|
58220
|
+
case "list":
|
|
58221
|
+
return getSelectListRenderers(config14);
|
|
57159
58222
|
}
|
|
57160
58223
|
};
|
|
57161
58224
|
var getTextRenderers = (config14) => {
|
|
@@ -57176,12 +58239,14 @@ var getTextRenderers = (config14) => {
|
|
|
57176
58239
|
],
|
|
57177
58240
|
active: ({ value }) => [
|
|
57178
58241
|
`${blCorner} ${bold(question)} ${dim(helpText)}`,
|
|
57179
|
-
`${space(2)}${format3(
|
|
58242
|
+
`${space(2)}${format3(
|
|
58243
|
+
value || dim(typeof defaultValue === "string" ? defaultValue : ``)
|
|
58244
|
+
)}`,
|
|
57180
58245
|
``
|
|
57181
58246
|
// extra line for readability
|
|
57182
58247
|
],
|
|
57183
|
-
error: ({ value, error }) => [
|
|
57184
|
-
`${leftT} ${status.error} ${dim(
|
|
58248
|
+
error: ({ value, error: error2 }) => [
|
|
58249
|
+
`${leftT} ${status.error} ${dim(error2)}`,
|
|
57185
58250
|
`${grayBar}`,
|
|
57186
58251
|
`${blCorner} ${question} ${dim(helpText)}`,
|
|
57187
58252
|
`${space(2)}${format3(value)}`,
|
|
@@ -57195,18 +58260,34 @@ var getTextRenderers = (config14) => {
|
|
|
57195
58260
|
var getSelectRenderers = (config14) => {
|
|
57196
58261
|
const { options, question, helpText: _helpText } = config14;
|
|
57197
58262
|
const helpText = _helpText ?? "";
|
|
57198
|
-
const
|
|
58263
|
+
const maxItemsPerPage = config14.maxItemsPerPage ?? 32;
|
|
58264
|
+
const defaultRenderer = ({ cursor, value }) => {
|
|
58265
|
+
cursor = cursor ?? 0;
|
|
57199
58266
|
const renderOption = (opt, i) => {
|
|
57200
|
-
const { label: optionLabel } = opt;
|
|
58267
|
+
const { label: optionLabel, value: optionValue } = opt;
|
|
57201
58268
|
const active = i === cursor;
|
|
57202
|
-
const
|
|
57203
|
-
const
|
|
58269
|
+
const isInListOfValues = Array.isArray(value) && value.includes(optionValue);
|
|
58270
|
+
const color = isInListOfValues || active ? blue : dim;
|
|
58271
|
+
const text = active ? color.underline(optionLabel) : color(optionLabel);
|
|
58272
|
+
const indicator = isInListOfValues || active && !Array.isArray(value) ? color(shapes.radioActive) : color(shapes.radioInactive);
|
|
57204
58273
|
return `${space(2)}${indicator} ${text}`;
|
|
57205
58274
|
};
|
|
58275
|
+
const renderOptionCondition = (_2, i) => {
|
|
58276
|
+
if (options.length <= maxItemsPerPage) {
|
|
58277
|
+
return true;
|
|
58278
|
+
}
|
|
58279
|
+
cursor = cursor ?? 0;
|
|
58280
|
+
if (i < cursor) {
|
|
58281
|
+
return options.length - i <= maxItemsPerPage;
|
|
58282
|
+
}
|
|
58283
|
+
return cursor + maxItemsPerPage > i;
|
|
58284
|
+
};
|
|
57206
58285
|
return [
|
|
57207
58286
|
`${blCorner} ${bold(question)} ${dim(helpText)}`,
|
|
57208
|
-
`${options.
|
|
57209
|
-
`)
|
|
58287
|
+
`${cursor > 0 && options.length > maxItemsPerPage ? `${space(2)}${dim("...")}
|
|
58288
|
+
` : ""}${options.filter((o) => !o.hidden).map(renderOption).filter(renderOptionCondition).join(`
|
|
58289
|
+
`)}${cursor + maxItemsPerPage < options.length && options.length > maxItemsPerPage ? `
|
|
58290
|
+
${space(2)}${dim("...")}` : ""}`,
|
|
57210
58291
|
``
|
|
57211
58292
|
// extra line for readability
|
|
57212
58293
|
];
|
|
@@ -57215,11 +58296,120 @@ var getSelectRenderers = (config14) => {
|
|
|
57215
58296
|
initial: defaultRenderer,
|
|
57216
58297
|
active: defaultRenderer,
|
|
57217
58298
|
confirm: defaultRenderer,
|
|
57218
|
-
error:
|
|
57219
|
-
|
|
57220
|
-
|
|
57221
|
-
|
|
57222
|
-
|
|
58299
|
+
error: (opts, prompt) => {
|
|
58300
|
+
return [
|
|
58301
|
+
`${leftT} ${status.error} ${dim(opts.error)}`,
|
|
58302
|
+
`${grayBar}`,
|
|
58303
|
+
...defaultRenderer(opts, prompt)
|
|
58304
|
+
];
|
|
58305
|
+
},
|
|
58306
|
+
submit: ({ value }) => {
|
|
58307
|
+
if (Array.isArray(value)) {
|
|
58308
|
+
return renderSubmit(
|
|
58309
|
+
config14,
|
|
58310
|
+
options.filter((o) => value.includes(o.value)).map((o) => o.label).join(", ")
|
|
58311
|
+
);
|
|
58312
|
+
}
|
|
58313
|
+
return renderSubmit(
|
|
58314
|
+
config14,
|
|
58315
|
+
options.find((o) => o.value === value)?.label
|
|
58316
|
+
);
|
|
58317
|
+
},
|
|
58318
|
+
cancel: handleCancel
|
|
58319
|
+
};
|
|
58320
|
+
};
|
|
58321
|
+
var getSelectListRenderers = (config14) => {
|
|
58322
|
+
const { question, helpText: _helpText } = config14;
|
|
58323
|
+
let options = config14.options;
|
|
58324
|
+
const helpText = _helpText ?? "";
|
|
58325
|
+
const { rows } = process.stdout;
|
|
58326
|
+
const defaultRenderer = ({ cursor, value }, prompt) => {
|
|
58327
|
+
if (prompt instanceof SelectRefreshablePrompt) {
|
|
58328
|
+
options = prompt.options;
|
|
58329
|
+
}
|
|
58330
|
+
cursor = cursor ?? 0;
|
|
58331
|
+
let smallCursor = 0;
|
|
58332
|
+
const renderOption = (opt, i) => {
|
|
58333
|
+
const { label: optionLabel, value: optionValueAny } = opt;
|
|
58334
|
+
const optionValue = optionValueAny.toString();
|
|
58335
|
+
const active = i === smallCursor;
|
|
58336
|
+
const isInListOfValues = Array.isArray(value) && value.includes(optionValue);
|
|
58337
|
+
const color = isInListOfValues || active ? blue : white;
|
|
58338
|
+
const text = active ? color.underline(optionLabel) : color(optionLabel);
|
|
58339
|
+
const indicator = isInListOfValues || active && !Array.isArray(value) ? color(shapes.radioActive) : color(shapes.radioInactive);
|
|
58340
|
+
const indicatorMargin = 2;
|
|
58341
|
+
const detailBulletpointMargin = indicatorMargin + 4;
|
|
58342
|
+
return [
|
|
58343
|
+
`${space(indicatorMargin)}${indicator} ${text}`,
|
|
58344
|
+
...opt.details.map(
|
|
58345
|
+
(detail, j2) => `${space(detailBulletpointMargin)}${j2 === opt.details.length - 1 ? gray(shapes.corners.bl) : grayBar} ${detail}`
|
|
58346
|
+
)
|
|
58347
|
+
];
|
|
58348
|
+
};
|
|
58349
|
+
const pages = [];
|
|
58350
|
+
let current = {
|
|
58351
|
+
size: 0,
|
|
58352
|
+
options: []
|
|
58353
|
+
};
|
|
58354
|
+
const VERTICAL_MARGIN = 6;
|
|
58355
|
+
for (const option of options) {
|
|
58356
|
+
const optionHeight = option.details.length + 1;
|
|
58357
|
+
if (current.size + optionHeight > rows - VERTICAL_MARGIN) {
|
|
58358
|
+
pages.push(current.options);
|
|
58359
|
+
current = { size: optionHeight, options: [option] };
|
|
58360
|
+
continue;
|
|
58361
|
+
}
|
|
58362
|
+
current.size += optionHeight;
|
|
58363
|
+
current.options.push(option);
|
|
58364
|
+
}
|
|
58365
|
+
if (current.size !== 0) {
|
|
58366
|
+
pages.push(current.options);
|
|
58367
|
+
}
|
|
58368
|
+
let isFirstPage = true;
|
|
58369
|
+
let isLastPage = false;
|
|
58370
|
+
let page = [];
|
|
58371
|
+
let len = 0;
|
|
58372
|
+
for (let i = 0; i < pages.length; i++) {
|
|
58373
|
+
const pageIter = pages[i];
|
|
58374
|
+
if (cursor >= len && pageIter.length + len > cursor) {
|
|
58375
|
+
isFirstPage = i === 0;
|
|
58376
|
+
isLastPage = i === pages.length - 1;
|
|
58377
|
+
page = pageIter;
|
|
58378
|
+
smallCursor = cursor - len;
|
|
58379
|
+
break;
|
|
58380
|
+
}
|
|
58381
|
+
len += pageIter.length;
|
|
58382
|
+
}
|
|
58383
|
+
return [
|
|
58384
|
+
`${blCorner} ${bold(question)} ${dim(helpText)}`,
|
|
58385
|
+
...!isFirstPage ? [`${space(2)}${dim("...")}`] : [],
|
|
58386
|
+
...page.map(renderOption).reduce((prev, now) => [...prev, ...now], []),
|
|
58387
|
+
...!isLastPage ? [`${space(2)}${dim("...")}`] : []
|
|
58388
|
+
];
|
|
58389
|
+
};
|
|
58390
|
+
return {
|
|
58391
|
+
initial: defaultRenderer,
|
|
58392
|
+
active: defaultRenderer,
|
|
58393
|
+
confirm: defaultRenderer,
|
|
58394
|
+
error: (opts, prompt) => {
|
|
58395
|
+
return [
|
|
58396
|
+
`${leftT} ${status.error} ${dim(opts.error)}`,
|
|
58397
|
+
`${grayBar}`,
|
|
58398
|
+
...defaultRenderer(opts, prompt)
|
|
58399
|
+
];
|
|
58400
|
+
},
|
|
58401
|
+
submit: ({ value }) => {
|
|
58402
|
+
if (Array.isArray(value)) {
|
|
58403
|
+
return renderSubmit(
|
|
58404
|
+
config14,
|
|
58405
|
+
options.filter((o) => value.includes(o.value)).map((o) => o.value).join(", ")
|
|
58406
|
+
);
|
|
58407
|
+
}
|
|
58408
|
+
return renderSubmit(
|
|
58409
|
+
config14,
|
|
58410
|
+
options.find((o) => o.value === value)?.value
|
|
58411
|
+
);
|
|
58412
|
+
},
|
|
57223
58413
|
cancel: handleCancel
|
|
57224
58414
|
};
|
|
57225
58415
|
};
|
|
@@ -57229,8 +58419,8 @@ var getConfirmRenderers = (config14) => {
|
|
|
57229
58419
|
const active = activeText || "Yes";
|
|
57230
58420
|
const inactive = inactiveText || "No";
|
|
57231
58421
|
const defaultRenderer = ({ value }) => {
|
|
57232
|
-
const yesColor = value ? blue : dim;
|
|
57233
|
-
const noColor = value ? dim : blue;
|
|
58422
|
+
const yesColor = value ? blue.underline : dim;
|
|
58423
|
+
const noColor = value ? dim : blue.underline;
|
|
57234
58424
|
return [
|
|
57235
58425
|
`${blCorner} ${bold(question)} ${dim(helpText)}`,
|
|
57236
58426
|
`${space(2)}${yesColor(active)} / ${noColor(inactive)}`
|
|
@@ -57306,6 +58496,23 @@ var isInteractive = () => {
|
|
|
57306
58496
|
return process.stdin.isTTY;
|
|
57307
58497
|
};
|
|
57308
58498
|
|
|
58499
|
+
// ../cli/args.ts
|
|
58500
|
+
var processArgument = async (args, name2, promptConfig) => {
|
|
58501
|
+
let value = args[name2];
|
|
58502
|
+
const renderSubmitted = getRenderers(promptConfig).submit;
|
|
58503
|
+
if (value !== void 0) {
|
|
58504
|
+
const error2 = promptConfig.validate?.(value);
|
|
58505
|
+
if (error2) {
|
|
58506
|
+
crash(error2);
|
|
58507
|
+
}
|
|
58508
|
+
const lines = renderSubmitted({ value });
|
|
58509
|
+
logRaw(lines.join("\n"));
|
|
58510
|
+
return value;
|
|
58511
|
+
}
|
|
58512
|
+
value = await inputPrompt(promptConfig);
|
|
58513
|
+
return value;
|
|
58514
|
+
};
|
|
58515
|
+
|
|
57309
58516
|
// ../../node_modules/.pnpm/yargs@17.7.1/node_modules/yargs/lib/platform-shims/esm.mjs
|
|
57310
58517
|
var import_assert = require("assert");
|
|
57311
58518
|
|
|
@@ -57863,7 +59070,7 @@ var YargsParser = class {
|
|
|
57863
59070
|
defaults[alias] = defaults[key];
|
|
57864
59071
|
});
|
|
57865
59072
|
});
|
|
57866
|
-
let
|
|
59073
|
+
let error2 = null;
|
|
57867
59074
|
checkConfiguration();
|
|
57868
59075
|
let notFlags = [];
|
|
57869
59076
|
const argv = Object.assign(/* @__PURE__ */ Object.create(null), { _: [] });
|
|
@@ -58047,7 +59254,7 @@ var YargsParser = class {
|
|
|
58047
59254
|
toEat = typeof toEat !== "number" || isNaN(toEat) ? 1 : toEat;
|
|
58048
59255
|
if (toEat === 0) {
|
|
58049
59256
|
if (!isUndefined(argAfterEqualSign)) {
|
|
58050
|
-
|
|
59257
|
+
error2 = Error(__("Argument unexpected for: %s", key));
|
|
58051
59258
|
}
|
|
58052
59259
|
setArg(key, defaultValue(key));
|
|
58053
59260
|
return i;
|
|
@@ -58055,7 +59262,7 @@ var YargsParser = class {
|
|
|
58055
59262
|
let available = isUndefined(argAfterEqualSign) ? 0 : 1;
|
|
58056
59263
|
if (configuration["nargs-eats-options"]) {
|
|
58057
59264
|
if (args2.length - (i + 1) + available < toEat) {
|
|
58058
|
-
|
|
59265
|
+
error2 = Error(__("Not enough arguments following: %s", key));
|
|
58059
59266
|
}
|
|
58060
59267
|
available = toEat;
|
|
58061
59268
|
} else {
|
|
@@ -58066,7 +59273,7 @@ var YargsParser = class {
|
|
|
58066
59273
|
break;
|
|
58067
59274
|
}
|
|
58068
59275
|
if (available < toEat)
|
|
58069
|
-
|
|
59276
|
+
error2 = Error(__("Not enough arguments following: %s", key));
|
|
58070
59277
|
}
|
|
58071
59278
|
let consumed = Math.min(available, toEat);
|
|
58072
59279
|
if (!isUndefined(argAfterEqualSign) && consumed > 0) {
|
|
@@ -58104,7 +59311,7 @@ var YargsParser = class {
|
|
|
58104
59311
|
}
|
|
58105
59312
|
}
|
|
58106
59313
|
if (typeof nargsCount === "number" && (nargsCount && argsToSet.length < nargsCount || isNaN(nargsCount) && argsToSet.length === 0)) {
|
|
58107
|
-
|
|
59314
|
+
error2 = Error(__("Not enough arguments following: %s", key));
|
|
58108
59315
|
}
|
|
58109
59316
|
setArg(key, argsToSet);
|
|
58110
59317
|
return i;
|
|
@@ -58213,7 +59420,7 @@ var YargsParser = class {
|
|
|
58213
59420
|
config14 = e;
|
|
58214
59421
|
}
|
|
58215
59422
|
if (config14 instanceof Error) {
|
|
58216
|
-
|
|
59423
|
+
error2 = config14;
|
|
58217
59424
|
return;
|
|
58218
59425
|
}
|
|
58219
59426
|
} else {
|
|
@@ -58222,9 +59429,9 @@ var YargsParser = class {
|
|
|
58222
59429
|
setConfigObject(config14);
|
|
58223
59430
|
} catch (ex) {
|
|
58224
59431
|
if (ex.name === "PermissionDenied")
|
|
58225
|
-
|
|
59432
|
+
error2 = ex;
|
|
58226
59433
|
else if (argv2[configKey])
|
|
58227
|
-
|
|
59434
|
+
error2 = Error(__("Invalid JSON config file: %s", configPath));
|
|
58228
59435
|
}
|
|
58229
59436
|
}
|
|
58230
59437
|
});
|
|
@@ -58253,8 +59460,8 @@ var YargsParser = class {
|
|
|
58253
59460
|
if (typeof envPrefix === "undefined")
|
|
58254
59461
|
return;
|
|
58255
59462
|
const prefix = typeof envPrefix === "string" ? envPrefix : "";
|
|
58256
|
-
const
|
|
58257
|
-
Object.keys(
|
|
59463
|
+
const env2 = mixin2.env();
|
|
59464
|
+
Object.keys(env2).forEach(function(envVar) {
|
|
58258
59465
|
if (prefix === "" || envVar.lastIndexOf(prefix, 0) === 0) {
|
|
58259
59466
|
const keys = envVar.split("__").map(function(key, i) {
|
|
58260
59467
|
if (i === 0) {
|
|
@@ -58263,7 +59470,7 @@ var YargsParser = class {
|
|
|
58263
59470
|
return camelCase(key);
|
|
58264
59471
|
});
|
|
58265
59472
|
if ((configOnly && flags.configs[keys.join(".")] || !configOnly) && !hasKey2(argv2, keys)) {
|
|
58266
|
-
setArg(keys.join("."),
|
|
59473
|
+
setArg(keys.join("."), env2[envVar]);
|
|
58267
59474
|
}
|
|
58268
59475
|
}
|
|
58269
59476
|
});
|
|
@@ -58282,7 +59489,7 @@ var YargsParser = class {
|
|
|
58282
59489
|
argv2[ali] = value;
|
|
58283
59490
|
});
|
|
58284
59491
|
} catch (err) {
|
|
58285
|
-
|
|
59492
|
+
error2 = err;
|
|
58286
59493
|
}
|
|
58287
59494
|
}
|
|
58288
59495
|
}
|
|
@@ -58495,10 +59702,10 @@ var YargsParser = class {
|
|
|
58495
59702
|
function checkConfiguration() {
|
|
58496
59703
|
Object.keys(flags.counts).find((key) => {
|
|
58497
59704
|
if (checkAllAliases(key, flags.arrays)) {
|
|
58498
|
-
|
|
59705
|
+
error2 = Error(__("Invalid configuration: %s, opts.count excludes opts.array.", key));
|
|
58499
59706
|
return true;
|
|
58500
59707
|
} else if (checkAllAliases(key, flags.nargs)) {
|
|
58501
|
-
|
|
59708
|
+
error2 = Error(__("Invalid configuration: %s, opts.count excludes opts.narg.", key));
|
|
58502
59709
|
return true;
|
|
58503
59710
|
}
|
|
58504
59711
|
return false;
|
|
@@ -58509,7 +59716,7 @@ var YargsParser = class {
|
|
|
58509
59716
|
argv: Object.assign(argvReturn, argv),
|
|
58510
59717
|
configuration,
|
|
58511
59718
|
defaulted: Object.assign({}, defaulted),
|
|
58512
|
-
error,
|
|
59719
|
+
error: error2,
|
|
58513
59720
|
newAliases: Object.assign({}, newAliases)
|
|
58514
59721
|
};
|
|
58515
59722
|
}
|
|
@@ -58573,11 +59780,11 @@ if (nodeVersion) {
|
|
|
58573
59780
|
throw Error(`yargs parser supports a minimum Node.js version of ${minNodeVersion}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);
|
|
58574
59781
|
}
|
|
58575
59782
|
}
|
|
58576
|
-
var
|
|
59783
|
+
var env = process ? process.env : {};
|
|
58577
59784
|
var parser = new YargsParser({
|
|
58578
59785
|
cwd: process.cwd,
|
|
58579
59786
|
env: () => {
|
|
58580
|
-
return
|
|
59787
|
+
return env;
|
|
58581
59788
|
},
|
|
58582
59789
|
format: import_util.format,
|
|
58583
59790
|
normalize: import_path2.normalize,
|
|
@@ -59285,9 +60492,9 @@ var CommandInstance = class {
|
|
|
59285
60492
|
yargs.getInternalMethods().getUsageInstance().cacheHelpMessage();
|
|
59286
60493
|
}
|
|
59287
60494
|
if (isPromise(innerArgv) && !yargs.getInternalMethods().hasParseCallback()) {
|
|
59288
|
-
innerArgv.catch((
|
|
60495
|
+
innerArgv.catch((error2) => {
|
|
59289
60496
|
try {
|
|
59290
|
-
yargs.getInternalMethods().getUsageInstance().fail(null,
|
|
60497
|
+
yargs.getInternalMethods().getUsageInstance().fail(null, error2);
|
|
59291
60498
|
} catch (_err) {
|
|
59292
60499
|
}
|
|
59293
60500
|
});
|
|
@@ -62163,7 +63370,7 @@ var Yargs = YargsFactory(esm_default);
|
|
|
62163
63370
|
var yargs_default = Yargs;
|
|
62164
63371
|
|
|
62165
63372
|
// package.json
|
|
62166
|
-
var version = "2.9.
|
|
63373
|
+
var version = "2.9.2";
|
|
62167
63374
|
var devDependencies = {
|
|
62168
63375
|
"@babel/parser": "^7.21.3",
|
|
62169
63376
|
"@babel/types": "^7.21.4",
|
|
@@ -62250,6 +63457,7 @@ var WRANGLER_DEFAULTS = {
|
|
|
62250
63457
|
type: "hello-world",
|
|
62251
63458
|
deploy: false
|
|
62252
63459
|
};
|
|
63460
|
+
process.stdout.columns = 300;
|
|
62253
63461
|
|
|
62254
63462
|
// src/helpers/packages.ts
|
|
62255
63463
|
var import_semver = __toESM(require_semver2());
|
|
@@ -62406,7 +63614,7 @@ var isDomainResolvable = async (domain) => {
|
|
|
62406
63614
|
const dns = new import_dns2.default({ nameServers });
|
|
62407
63615
|
const res = await dns.resolve(domain, "A");
|
|
62408
63616
|
return res.answers.length > 0;
|
|
62409
|
-
} catch (
|
|
63617
|
+
} catch (error2) {
|
|
62410
63618
|
return false;
|
|
62411
63619
|
}
|
|
62412
63620
|
};
|
|
@@ -62430,7 +63638,7 @@ function secondsSince(start) {
|
|
|
62430
63638
|
var import_shell_quote = __toESM(require_shell_quote());
|
|
62431
63639
|
|
|
62432
63640
|
// ../wrangler/package.json
|
|
62433
|
-
var version2 = "3.
|
|
63641
|
+
var version2 = "3.23.0";
|
|
62434
63642
|
|
|
62435
63643
|
// src/common.ts
|
|
62436
63644
|
var { name, npm } = detectPackageManager();
|
|
@@ -62570,9 +63778,9 @@ var runDeploy = async (ctx) => {
|
|
|
62570
63778
|
crash("Failed to find deployment url.");
|
|
62571
63779
|
}
|
|
62572
63780
|
if (ctx.deployedUrl?.endsWith(".pages.dev")) {
|
|
62573
|
-
const [
|
|
63781
|
+
const [proto, hostname] = ctx.deployedUrl.split("://");
|
|
62574
63782
|
const hostnameWithoutSHA1 = hostname.split(".").slice(-3).join(".");
|
|
62575
|
-
ctx.deployedUrl = `${
|
|
63783
|
+
ctx.deployedUrl = `${proto}://${hostnameWithoutSHA1}`;
|
|
62576
63784
|
}
|
|
62577
63785
|
};
|
|
62578
63786
|
var chooseAccount = async (ctx) => {
|
|
@@ -62864,15 +64072,15 @@ var import_toml = __toESM(require_toml());
|
|
|
62864
64072
|
var writeFile2 = (path3, content) => {
|
|
62865
64073
|
try {
|
|
62866
64074
|
import_fs6.default.writeFileSync(path3, content);
|
|
62867
|
-
} catch (
|
|
62868
|
-
crash(
|
|
64075
|
+
} catch (error2) {
|
|
64076
|
+
crash(error2);
|
|
62869
64077
|
}
|
|
62870
64078
|
};
|
|
62871
64079
|
var readFile = (path3) => {
|
|
62872
64080
|
try {
|
|
62873
64081
|
return import_fs6.default.readFileSync(path3, "utf-8");
|
|
62874
|
-
} catch (
|
|
62875
|
-
return crash(
|
|
64082
|
+
} catch (error2) {
|
|
64083
|
+
return crash(error2);
|
|
62876
64084
|
}
|
|
62877
64085
|
};
|
|
62878
64086
|
var readJSON = (path3) => {
|
|
@@ -63019,25 +64227,25 @@ var retry = async ({
|
|
|
63019
64227
|
times,
|
|
63020
64228
|
exitCondition
|
|
63021
64229
|
}, fn) => {
|
|
63022
|
-
let
|
|
64230
|
+
let error2 = null;
|
|
63023
64231
|
while (times > 0) {
|
|
63024
64232
|
try {
|
|
63025
64233
|
return await fn();
|
|
63026
64234
|
} catch (e) {
|
|
63027
|
-
|
|
64235
|
+
error2 = e;
|
|
63028
64236
|
times--;
|
|
63029
64237
|
if (exitCondition?.(e)) {
|
|
63030
64238
|
break;
|
|
63031
64239
|
}
|
|
63032
64240
|
}
|
|
63033
64241
|
}
|
|
63034
|
-
throw
|
|
64242
|
+
throw error2;
|
|
63035
64243
|
};
|
|
63036
64244
|
var runFrameworkGenerator = async (ctx, args) => {
|
|
63037
64245
|
const cli = getFrameworkCli(ctx, true);
|
|
63038
64246
|
const { npm: npm14, dlx: dlx2 } = detectPackageManager();
|
|
63039
64247
|
const cmd = [...npm14 === "yarn" ? ["npx"] : dlx2, cli, ...args];
|
|
63040
|
-
const
|
|
64248
|
+
const env2 = npm14 === "yarn" ? { npm_config_user_agent: "yarn" } : {};
|
|
63041
64249
|
if (ctx.framework?.args?.length) {
|
|
63042
64250
|
cmd.push(...ctx.framework.args);
|
|
63043
64251
|
}
|
|
@@ -63049,7 +64257,7 @@ var runFrameworkGenerator = async (ctx, args) => {
|
|
|
63049
64257
|
const flags = ctx.framework?.config.testFlags ?? [];
|
|
63050
64258
|
cmd.push(...flags);
|
|
63051
64259
|
}
|
|
63052
|
-
await runCommand(cmd, { env:
|
|
64260
|
+
await runCommand(cmd, { env: env2 });
|
|
63053
64261
|
};
|
|
63054
64262
|
var installPackages = async (packages, config14) => {
|
|
63055
64263
|
const { npm: npm14 } = detectPackageManager();
|
|
@@ -63138,7 +64346,7 @@ var isLoggedIn = async () => {
|
|
|
63138
64346
|
silent: true
|
|
63139
64347
|
});
|
|
63140
64348
|
return /You are logged in/.test(output);
|
|
63141
|
-
} catch (
|
|
64349
|
+
} catch (error2) {
|
|
63142
64350
|
return false;
|
|
63143
64351
|
}
|
|
63144
64352
|
};
|
|
@@ -63218,7 +64426,7 @@ function getLatestTypesEntrypoint(ctx) {
|
|
|
63218
64426
|
return null;
|
|
63219
64427
|
}
|
|
63220
64428
|
return sorted[0];
|
|
63221
|
-
} catch (
|
|
64429
|
+
} catch (error2) {
|
|
63222
64430
|
return null;
|
|
63223
64431
|
}
|
|
63224
64432
|
}
|
|
@@ -63907,16 +65115,16 @@ var package_default = {
|
|
|
63907
65115
|
"additionally it also contains a map that maps frameworks to their respective clis"
|
|
63908
65116
|
],
|
|
63909
65117
|
dependencies: {
|
|
63910
|
-
"create-astro": "4.
|
|
65118
|
+
"create-astro": "4.7.1",
|
|
63911
65119
|
"@angular/create": "17.0.6",
|
|
63912
|
-
"create-docusaurus": "3.0
|
|
65120
|
+
"create-docusaurus": "3.1.0",
|
|
63913
65121
|
"create-hono": "0.3.2",
|
|
63914
65122
|
"create-next-app": "14.0.4",
|
|
63915
|
-
"create-qwik": "1.3.
|
|
65123
|
+
"create-qwik": "1.3.5",
|
|
63916
65124
|
"create-react-app": "5.0.1",
|
|
63917
|
-
"create-remix": "2.
|
|
65125
|
+
"create-remix": "2.5.0",
|
|
63918
65126
|
"create-solid": "0.3.10",
|
|
63919
|
-
"create-svelte": "6.0.
|
|
65127
|
+
"create-svelte": "6.0.6",
|
|
63920
65128
|
"create-vue": "3.9.1",
|
|
63921
65129
|
gatsby: "5.13.1",
|
|
63922
65130
|
nuxi: "3.10.0"
|
|
@@ -64048,7 +65256,7 @@ var typescriptParser = __toESM(require_typescript2());
|
|
|
64048
65256
|
var parseTs = (src) => {
|
|
64049
65257
|
try {
|
|
64050
65258
|
return recast.parse(src, { parser: typescriptParser });
|
|
64051
|
-
} catch (
|
|
65259
|
+
} catch (error2) {
|
|
64052
65260
|
crash("Error parsing ts template.");
|
|
64053
65261
|
}
|
|
64054
65262
|
};
|
|
@@ -64060,7 +65268,7 @@ var parseFile = (filePath) => {
|
|
|
64060
65268
|
if (fileContents) {
|
|
64061
65269
|
return recast.parse(fileContents, { parser: parser2 });
|
|
64062
65270
|
}
|
|
64063
|
-
} catch (
|
|
65271
|
+
} catch (error2) {
|
|
64064
65272
|
crash(`Error parsing file: ${filePath}`);
|
|
64065
65273
|
}
|
|
64066
65274
|
return null;
|
|
@@ -64336,7 +65544,7 @@ var createProject = async (ctx) => {
|
|
|
64336
65544
|
)}`
|
|
64337
65545
|
})
|
|
64338
65546
|
);
|
|
64339
|
-
} catch (
|
|
65547
|
+
} catch (error2) {
|
|
64340
65548
|
crash("Failed to create pages project. See output above.");
|
|
64341
65549
|
}
|
|
64342
65550
|
try {
|
|
@@ -64362,7 +65570,7 @@ var createProject = async (ctx) => {
|
|
|
64362
65570
|
})
|
|
64363
65571
|
);
|
|
64364
65572
|
debug(`Validated pages project ${ctx.project.name}`);
|
|
64365
|
-
} catch (
|
|
65573
|
+
} catch (error2) {
|
|
64366
65574
|
crash("Pages project isn't ready yet. Please try deploying again later.");
|
|
64367
65575
|
}
|
|
64368
65576
|
};
|
|
@@ -64617,21 +65825,6 @@ var parseArgs = async (argv) => {
|
|
|
64617
65825
|
...args
|
|
64618
65826
|
};
|
|
64619
65827
|
};
|
|
64620
|
-
var processArgument = async (args, name2, promptConfig) => {
|
|
64621
|
-
let value = args[name2];
|
|
64622
|
-
const renderSubmitted = getRenderers(promptConfig).submit;
|
|
64623
|
-
if (value !== void 0) {
|
|
64624
|
-
const error = promptConfig.validate?.(value);
|
|
64625
|
-
if (error) {
|
|
64626
|
-
crash(error);
|
|
64627
|
-
}
|
|
64628
|
-
const lines = renderSubmitted({ value });
|
|
64629
|
-
logRaw(lines.join("\n"));
|
|
64630
|
-
return value;
|
|
64631
|
-
}
|
|
64632
|
-
value = await inputPrompt(promptConfig);
|
|
64633
|
-
return value;
|
|
64634
|
-
};
|
|
64635
65828
|
var showMoreInfoNote = () => {
|
|
64636
65829
|
const c3CliArgsDocsPage = "https://developers.cloudflare.com/pages/get-started/c3/#cli-arguments";
|
|
64637
65830
|
console.log(
|