@hot-updater/supabase 0.13.2 → 0.13.3-rc.0
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/iac/index.cjs +848 -142
- package/dist/iac/index.js +794 -90
- package/package.json +6 -14
package/dist/iac/index.cjs
CHANGED
|
@@ -31,6 +31,135 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
31
31
|
));
|
|
32
32
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
33
33
|
|
|
34
|
+
// ../../node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js
|
|
35
|
+
var require_src = __commonJS({
|
|
36
|
+
"../../node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js"(exports2, module2) {
|
|
37
|
+
"use strict";
|
|
38
|
+
var ESC = "\x1B";
|
|
39
|
+
var CSI = `${ESC}[`;
|
|
40
|
+
var beep = "\x07";
|
|
41
|
+
var cursor = {
|
|
42
|
+
to(x2, y2) {
|
|
43
|
+
if (!y2) return `${CSI}${x2 + 1}G`;
|
|
44
|
+
return `${CSI}${y2 + 1};${x2 + 1}H`;
|
|
45
|
+
},
|
|
46
|
+
move(x2, y2) {
|
|
47
|
+
let ret = "";
|
|
48
|
+
if (x2 < 0) ret += `${CSI}${-x2}D`;
|
|
49
|
+
else if (x2 > 0) ret += `${CSI}${x2}C`;
|
|
50
|
+
if (y2 < 0) ret += `${CSI}${-y2}A`;
|
|
51
|
+
else if (y2 > 0) ret += `${CSI}${y2}B`;
|
|
52
|
+
return ret;
|
|
53
|
+
},
|
|
54
|
+
up: (count2 = 1) => `${CSI}${count2}A`,
|
|
55
|
+
down: (count2 = 1) => `${CSI}${count2}B`,
|
|
56
|
+
forward: (count2 = 1) => `${CSI}${count2}C`,
|
|
57
|
+
backward: (count2 = 1) => `${CSI}${count2}D`,
|
|
58
|
+
nextLine: (count2 = 1) => `${CSI}E`.repeat(count2),
|
|
59
|
+
prevLine: (count2 = 1) => `${CSI}F`.repeat(count2),
|
|
60
|
+
left: `${CSI}G`,
|
|
61
|
+
hide: `${CSI}?25l`,
|
|
62
|
+
show: `${CSI}?25h`,
|
|
63
|
+
save: `${ESC}7`,
|
|
64
|
+
restore: `${ESC}8`
|
|
65
|
+
};
|
|
66
|
+
var scroll = {
|
|
67
|
+
up: (count2 = 1) => `${CSI}S`.repeat(count2),
|
|
68
|
+
down: (count2 = 1) => `${CSI}T`.repeat(count2)
|
|
69
|
+
};
|
|
70
|
+
var erase = {
|
|
71
|
+
screen: `${CSI}2J`,
|
|
72
|
+
up: (count2 = 1) => `${CSI}1J`.repeat(count2),
|
|
73
|
+
down: (count2 = 1) => `${CSI}J`.repeat(count2),
|
|
74
|
+
line: `${CSI}2K`,
|
|
75
|
+
lineEnd: `${CSI}K`,
|
|
76
|
+
lineStart: `${CSI}1K`,
|
|
77
|
+
lines(count2) {
|
|
78
|
+
let clear = "";
|
|
79
|
+
for (let i2 = 0; i2 < count2; i2++)
|
|
80
|
+
clear += this.line + (i2 < count2 - 1 ? cursor.up() : "");
|
|
81
|
+
if (count2)
|
|
82
|
+
clear += cursor.left;
|
|
83
|
+
return clear;
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
module2.exports = { cursor, scroll, erase, beep };
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
// ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
|
91
|
+
var require_picocolors = __commonJS({
|
|
92
|
+
"../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(exports2, module2) {
|
|
93
|
+
"use strict";
|
|
94
|
+
var p = process || {};
|
|
95
|
+
var argv = p.argv || [];
|
|
96
|
+
var env = p.env || {};
|
|
97
|
+
var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
98
|
+
var formatter = (open, close, replace = open) => (input) => {
|
|
99
|
+
let string = "" + input, index = string.indexOf(close, open.length);
|
|
100
|
+
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
101
|
+
};
|
|
102
|
+
var replaceClose = (string, close, replace, index) => {
|
|
103
|
+
let result = "", cursor = 0;
|
|
104
|
+
do {
|
|
105
|
+
result += string.substring(cursor, index) + replace;
|
|
106
|
+
cursor = index + close.length;
|
|
107
|
+
index = string.indexOf(close, cursor);
|
|
108
|
+
} while (~index);
|
|
109
|
+
return result + string.substring(cursor);
|
|
110
|
+
};
|
|
111
|
+
var createColors = (enabled = isColorSupported) => {
|
|
112
|
+
let f3 = enabled ? formatter : () => String;
|
|
113
|
+
return {
|
|
114
|
+
isColorSupported: enabled,
|
|
115
|
+
reset: f3("\x1B[0m", "\x1B[0m"),
|
|
116
|
+
bold: f3("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
117
|
+
dim: f3("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
118
|
+
italic: f3("\x1B[3m", "\x1B[23m"),
|
|
119
|
+
underline: f3("\x1B[4m", "\x1B[24m"),
|
|
120
|
+
inverse: f3("\x1B[7m", "\x1B[27m"),
|
|
121
|
+
hidden: f3("\x1B[8m", "\x1B[28m"),
|
|
122
|
+
strikethrough: f3("\x1B[9m", "\x1B[29m"),
|
|
123
|
+
black: f3("\x1B[30m", "\x1B[39m"),
|
|
124
|
+
red: f3("\x1B[31m", "\x1B[39m"),
|
|
125
|
+
green: f3("\x1B[32m", "\x1B[39m"),
|
|
126
|
+
yellow: f3("\x1B[33m", "\x1B[39m"),
|
|
127
|
+
blue: f3("\x1B[34m", "\x1B[39m"),
|
|
128
|
+
magenta: f3("\x1B[35m", "\x1B[39m"),
|
|
129
|
+
cyan: f3("\x1B[36m", "\x1B[39m"),
|
|
130
|
+
white: f3("\x1B[37m", "\x1B[39m"),
|
|
131
|
+
gray: f3("\x1B[90m", "\x1B[39m"),
|
|
132
|
+
bgBlack: f3("\x1B[40m", "\x1B[49m"),
|
|
133
|
+
bgRed: f3("\x1B[41m", "\x1B[49m"),
|
|
134
|
+
bgGreen: f3("\x1B[42m", "\x1B[49m"),
|
|
135
|
+
bgYellow: f3("\x1B[43m", "\x1B[49m"),
|
|
136
|
+
bgBlue: f3("\x1B[44m", "\x1B[49m"),
|
|
137
|
+
bgMagenta: f3("\x1B[45m", "\x1B[49m"),
|
|
138
|
+
bgCyan: f3("\x1B[46m", "\x1B[49m"),
|
|
139
|
+
bgWhite: f3("\x1B[47m", "\x1B[49m"),
|
|
140
|
+
blackBright: f3("\x1B[90m", "\x1B[39m"),
|
|
141
|
+
redBright: f3("\x1B[91m", "\x1B[39m"),
|
|
142
|
+
greenBright: f3("\x1B[92m", "\x1B[39m"),
|
|
143
|
+
yellowBright: f3("\x1B[93m", "\x1B[39m"),
|
|
144
|
+
blueBright: f3("\x1B[94m", "\x1B[39m"),
|
|
145
|
+
magentaBright: f3("\x1B[95m", "\x1B[39m"),
|
|
146
|
+
cyanBright: f3("\x1B[96m", "\x1B[39m"),
|
|
147
|
+
whiteBright: f3("\x1B[97m", "\x1B[39m"),
|
|
148
|
+
bgBlackBright: f3("\x1B[100m", "\x1B[49m"),
|
|
149
|
+
bgRedBright: f3("\x1B[101m", "\x1B[49m"),
|
|
150
|
+
bgGreenBright: f3("\x1B[102m", "\x1B[49m"),
|
|
151
|
+
bgYellowBright: f3("\x1B[103m", "\x1B[49m"),
|
|
152
|
+
bgBlueBright: f3("\x1B[104m", "\x1B[49m"),
|
|
153
|
+
bgMagentaBright: f3("\x1B[105m", "\x1B[49m"),
|
|
154
|
+
bgCyanBright: f3("\x1B[106m", "\x1B[49m"),
|
|
155
|
+
bgWhiteBright: f3("\x1B[107m", "\x1B[49m")
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
module2.exports = createColors();
|
|
159
|
+
module2.exports.createColors = createColors;
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
|
|
34
163
|
// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js
|
|
35
164
|
var require_windows = __commonJS({
|
|
36
165
|
"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports2, module2) {
|
|
@@ -48,8 +177,8 @@ var require_windows = __commonJS({
|
|
|
48
177
|
return true;
|
|
49
178
|
}
|
|
50
179
|
for (var i2 = 0; i2 < pathext.length; i2++) {
|
|
51
|
-
var
|
|
52
|
-
if (
|
|
180
|
+
var p = pathext[i2].toLowerCase();
|
|
181
|
+
if (p && path7.substr(-p.length).toLowerCase() === p) {
|
|
53
182
|
return true;
|
|
54
183
|
}
|
|
55
184
|
}
|
|
@@ -96,11 +225,11 @@ var require_mode = __commonJS({
|
|
|
96
225
|
var gid = stat.gid;
|
|
97
226
|
var myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid();
|
|
98
227
|
var myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid();
|
|
99
|
-
var
|
|
100
|
-
var
|
|
101
|
-
var
|
|
102
|
-
var ug =
|
|
103
|
-
var ret = mod &
|
|
228
|
+
var u3 = parseInt("100", 8);
|
|
229
|
+
var g3 = parseInt("010", 8);
|
|
230
|
+
var o3 = parseInt("001", 8);
|
|
231
|
+
var ug = u3 | g3;
|
|
232
|
+
var ret = mod & o3 || mod & g3 && gid === myGid || mod & u3 && uid === myUid || mod & ug && myUid === 0;
|
|
104
233
|
return ret;
|
|
105
234
|
}
|
|
106
235
|
}
|
|
@@ -206,21 +335,21 @@ var require_which = __commonJS({
|
|
|
206
335
|
const ppRaw = pathEnv[i2];
|
|
207
336
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
208
337
|
const pCmd = path7.join(pathPart, cmd);
|
|
209
|
-
const
|
|
210
|
-
resolve(subStep(
|
|
338
|
+
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
339
|
+
resolve(subStep(p, i2, 0));
|
|
211
340
|
});
|
|
212
|
-
const subStep = (
|
|
341
|
+
const subStep = (p, i2, ii) => new Promise((resolve, reject) => {
|
|
213
342
|
if (ii === pathExt.length)
|
|
214
343
|
return resolve(step(i2 + 1));
|
|
215
344
|
const ext = pathExt[ii];
|
|
216
|
-
isexe(
|
|
345
|
+
isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
|
|
217
346
|
if (!er && is) {
|
|
218
347
|
if (opt.all)
|
|
219
|
-
found.push(
|
|
348
|
+
found.push(p + ext);
|
|
220
349
|
else
|
|
221
|
-
return resolve(
|
|
350
|
+
return resolve(p + ext);
|
|
222
351
|
}
|
|
223
|
-
return resolve(subStep(
|
|
352
|
+
return resolve(subStep(p, i2, ii + 1));
|
|
224
353
|
});
|
|
225
354
|
});
|
|
226
355
|
return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
|
|
@@ -233,9 +362,9 @@ var require_which = __commonJS({
|
|
|
233
362
|
const ppRaw = pathEnv[i2];
|
|
234
363
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
235
364
|
const pCmd = path7.join(pathPart, cmd);
|
|
236
|
-
const
|
|
237
|
-
for (let
|
|
238
|
-
const cur =
|
|
365
|
+
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
366
|
+
for (let j2 = 0; j2 < pathExt.length; j2++) {
|
|
367
|
+
const cur = p + pathExt[j2];
|
|
239
368
|
try {
|
|
240
369
|
const is = isexe.sync(cur, { pathExt: pathExtExe });
|
|
241
370
|
if (is) {
|
|
@@ -300,7 +429,7 @@ var require_resolveCommand = __commonJS({
|
|
|
300
429
|
path: env[getPathKey({ env })],
|
|
301
430
|
pathExt: withoutPathExt ? path7.delimiter : void 0
|
|
302
431
|
});
|
|
303
|
-
} catch (
|
|
432
|
+
} catch (e2) {
|
|
304
433
|
} finally {
|
|
305
434
|
if (shouldSwitchCwd) {
|
|
306
435
|
process.chdir(cwd);
|
|
@@ -385,7 +514,7 @@ var require_readShebang = __commonJS({
|
|
|
385
514
|
fd = fs2.openSync(command, "r");
|
|
386
515
|
fs2.readSync(fd, buffer, 0, size, 0);
|
|
387
516
|
fs2.closeSync(fd);
|
|
388
|
-
} catch (
|
|
517
|
+
} catch (e2) {
|
|
389
518
|
}
|
|
390
519
|
return shebangCommand(buffer.toString());
|
|
391
520
|
}
|
|
@@ -540,7 +669,584 @@ __export(index_exports, {
|
|
|
540
669
|
selectProject: () => selectProject
|
|
541
670
|
});
|
|
542
671
|
module.exports = __toCommonJS(index_exports);
|
|
543
|
-
|
|
672
|
+
|
|
673
|
+
// ../../node_modules/.pnpm/@clack+prompts@0.10.0/node_modules/@clack/prompts/dist/index.mjs
|
|
674
|
+
var import_node_util = require("util");
|
|
675
|
+
|
|
676
|
+
// ../../node_modules/.pnpm/@clack+core@0.4.1/node_modules/@clack/core/dist/index.mjs
|
|
677
|
+
var import_sisteransi = __toESM(require_src(), 1);
|
|
678
|
+
var import_node_process = require("process");
|
|
679
|
+
var f = __toESM(require("readline"), 1);
|
|
680
|
+
var import_node_readline = __toESM(require("readline"), 1);
|
|
681
|
+
var import_node_tty = require("tty");
|
|
682
|
+
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
683
|
+
function J({ onlyFirst: t = false } = {}) {
|
|
684
|
+
const F2 = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
|
|
685
|
+
return new RegExp(F2, t ? void 0 : "g");
|
|
686
|
+
}
|
|
687
|
+
var Q = J();
|
|
688
|
+
function T(t) {
|
|
689
|
+
if (typeof t != "string") throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);
|
|
690
|
+
return t.replace(Q, "");
|
|
691
|
+
}
|
|
692
|
+
function O(t) {
|
|
693
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
694
|
+
}
|
|
695
|
+
var P = { exports: {} };
|
|
696
|
+
(function(t) {
|
|
697
|
+
var u3 = {};
|
|
698
|
+
t.exports = u3, u3.eastAsianWidth = function(e2) {
|
|
699
|
+
var s = e2.charCodeAt(0), i2 = e2.length == 2 ? e2.charCodeAt(1) : 0, D2 = s;
|
|
700
|
+
return 55296 <= s && s <= 56319 && 56320 <= i2 && i2 <= 57343 && (s &= 1023, i2 &= 1023, D2 = s << 10 | i2, D2 += 65536), D2 == 12288 || 65281 <= D2 && D2 <= 65376 || 65504 <= D2 && D2 <= 65510 ? "F" : D2 == 8361 || 65377 <= D2 && D2 <= 65470 || 65474 <= D2 && D2 <= 65479 || 65482 <= D2 && D2 <= 65487 || 65490 <= D2 && D2 <= 65495 || 65498 <= D2 && D2 <= 65500 || 65512 <= D2 && D2 <= 65518 ? "H" : 4352 <= D2 && D2 <= 4447 || 4515 <= D2 && D2 <= 4519 || 4602 <= D2 && D2 <= 4607 || 9001 <= D2 && D2 <= 9002 || 11904 <= D2 && D2 <= 11929 || 11931 <= D2 && D2 <= 12019 || 12032 <= D2 && D2 <= 12245 || 12272 <= D2 && D2 <= 12283 || 12289 <= D2 && D2 <= 12350 || 12353 <= D2 && D2 <= 12438 || 12441 <= D2 && D2 <= 12543 || 12549 <= D2 && D2 <= 12589 || 12593 <= D2 && D2 <= 12686 || 12688 <= D2 && D2 <= 12730 || 12736 <= D2 && D2 <= 12771 || 12784 <= D2 && D2 <= 12830 || 12832 <= D2 && D2 <= 12871 || 12880 <= D2 && D2 <= 13054 || 13056 <= D2 && D2 <= 19903 || 19968 <= D2 && D2 <= 42124 || 42128 <= D2 && D2 <= 42182 || 43360 <= D2 && D2 <= 43388 || 44032 <= D2 && D2 <= 55203 || 55216 <= D2 && D2 <= 55238 || 55243 <= D2 && D2 <= 55291 || 63744 <= D2 && D2 <= 64255 || 65040 <= D2 && D2 <= 65049 || 65072 <= D2 && D2 <= 65106 || 65108 <= D2 && D2 <= 65126 || 65128 <= D2 && D2 <= 65131 || 110592 <= D2 && D2 <= 110593 || 127488 <= D2 && D2 <= 127490 || 127504 <= D2 && D2 <= 127546 || 127552 <= D2 && D2 <= 127560 || 127568 <= D2 && D2 <= 127569 || 131072 <= D2 && D2 <= 194367 || 177984 <= D2 && D2 <= 196605 || 196608 <= D2 && D2 <= 262141 ? "W" : 32 <= D2 && D2 <= 126 || 162 <= D2 && D2 <= 163 || 165 <= D2 && D2 <= 166 || D2 == 172 || D2 == 175 || 10214 <= D2 && D2 <= 10221 || 10629 <= D2 && D2 <= 10630 ? "Na" : D2 == 161 || D2 == 164 || 167 <= D2 && D2 <= 168 || D2 == 170 || 173 <= D2 && D2 <= 174 || 176 <= D2 && D2 <= 180 || 182 <= D2 && D2 <= 186 || 188 <= D2 && D2 <= 191 || D2 == 198 || D2 == 208 || 215 <= D2 && D2 <= 216 || 222 <= D2 && D2 <= 225 || D2 == 230 || 232 <= D2 && D2 <= 234 || 236 <= D2 && D2 <= 237 || D2 == 240 || 242 <= D2 && D2 <= 243 || 247 <= D2 && D2 <= 250 || D2 == 252 || D2 == 254 || D2 == 257 || D2 == 273 || D2 == 275 || D2 == 283 || 294 <= D2 && D2 <= 295 || D2 == 299 || 305 <= D2 && D2 <= 307 || D2 == 312 || 319 <= D2 && D2 <= 322 || D2 == 324 || 328 <= D2 && D2 <= 331 || D2 == 333 || 338 <= D2 && D2 <= 339 || 358 <= D2 && D2 <= 359 || D2 == 363 || D2 == 462 || D2 == 464 || D2 == 466 || D2 == 468 || D2 == 470 || D2 == 472 || D2 == 474 || D2 == 476 || D2 == 593 || D2 == 609 || D2 == 708 || D2 == 711 || 713 <= D2 && D2 <= 715 || D2 == 717 || D2 == 720 || 728 <= D2 && D2 <= 731 || D2 == 733 || D2 == 735 || 768 <= D2 && D2 <= 879 || 913 <= D2 && D2 <= 929 || 931 <= D2 && D2 <= 937 || 945 <= D2 && D2 <= 961 || 963 <= D2 && D2 <= 969 || D2 == 1025 || 1040 <= D2 && D2 <= 1103 || D2 == 1105 || D2 == 8208 || 8211 <= D2 && D2 <= 8214 || 8216 <= D2 && D2 <= 8217 || 8220 <= D2 && D2 <= 8221 || 8224 <= D2 && D2 <= 8226 || 8228 <= D2 && D2 <= 8231 || D2 == 8240 || 8242 <= D2 && D2 <= 8243 || D2 == 8245 || D2 == 8251 || D2 == 8254 || D2 == 8308 || D2 == 8319 || 8321 <= D2 && D2 <= 8324 || D2 == 8364 || D2 == 8451 || D2 == 8453 || D2 == 8457 || D2 == 8467 || D2 == 8470 || 8481 <= D2 && D2 <= 8482 || D2 == 8486 || D2 == 8491 || 8531 <= D2 && D2 <= 8532 || 8539 <= D2 && D2 <= 8542 || 8544 <= D2 && D2 <= 8555 || 8560 <= D2 && D2 <= 8569 || D2 == 8585 || 8592 <= D2 && D2 <= 8601 || 8632 <= D2 && D2 <= 8633 || D2 == 8658 || D2 == 8660 || D2 == 8679 || D2 == 8704 || 8706 <= D2 && D2 <= 8707 || 8711 <= D2 && D2 <= 8712 || D2 == 8715 || D2 == 8719 || D2 == 8721 || D2 == 8725 || D2 == 8730 || 8733 <= D2 && D2 <= 8736 || D2 == 8739 || D2 == 8741 || 8743 <= D2 && D2 <= 8748 || D2 == 8750 || 8756 <= D2 && D2 <= 8759 || 8764 <= D2 && D2 <= 8765 || D2 == 8776 || D2 == 8780 || D2 == 8786 || 8800 <= D2 && D2 <= 8801 || 8804 <= D2 && D2 <= 8807 || 8810 <= D2 && D2 <= 8811 || 8814 <= D2 && D2 <= 8815 || 8834 <= D2 && D2 <= 8835 || 8838 <= D2 && D2 <= 8839 || D2 == 8853 || D2 == 8857 || D2 == 8869 || D2 == 8895 || D2 == 8978 || 9312 <= D2 && D2 <= 9449 || 9451 <= D2 && D2 <= 9547 || 9552 <= D2 && D2 <= 9587 || 9600 <= D2 && D2 <= 9615 || 9618 <= D2 && D2 <= 9621 || 9632 <= D2 && D2 <= 9633 || 9635 <= D2 && D2 <= 9641 || 9650 <= D2 && D2 <= 9651 || 9654 <= D2 && D2 <= 9655 || 9660 <= D2 && D2 <= 9661 || 9664 <= D2 && D2 <= 9665 || 9670 <= D2 && D2 <= 9672 || D2 == 9675 || 9678 <= D2 && D2 <= 9681 || 9698 <= D2 && D2 <= 9701 || D2 == 9711 || 9733 <= D2 && D2 <= 9734 || D2 == 9737 || 9742 <= D2 && D2 <= 9743 || 9748 <= D2 && D2 <= 9749 || D2 == 9756 || D2 == 9758 || D2 == 9792 || D2 == 9794 || 9824 <= D2 && D2 <= 9825 || 9827 <= D2 && D2 <= 9829 || 9831 <= D2 && D2 <= 9834 || 9836 <= D2 && D2 <= 9837 || D2 == 9839 || 9886 <= D2 && D2 <= 9887 || 9918 <= D2 && D2 <= 9919 || 9924 <= D2 && D2 <= 9933 || 9935 <= D2 && D2 <= 9953 || D2 == 9955 || 9960 <= D2 && D2 <= 9983 || D2 == 10045 || D2 == 10071 || 10102 <= D2 && D2 <= 10111 || 11093 <= D2 && D2 <= 11097 || 12872 <= D2 && D2 <= 12879 || 57344 <= D2 && D2 <= 63743 || 65024 <= D2 && D2 <= 65039 || D2 == 65533 || 127232 <= D2 && D2 <= 127242 || 127248 <= D2 && D2 <= 127277 || 127280 <= D2 && D2 <= 127337 || 127344 <= D2 && D2 <= 127386 || 917760 <= D2 && D2 <= 917999 || 983040 <= D2 && D2 <= 1048573 || 1048576 <= D2 && D2 <= 1114109 ? "A" : "N";
|
|
701
|
+
}, u3.characterLength = function(e2) {
|
|
702
|
+
var s = this.eastAsianWidth(e2);
|
|
703
|
+
return s == "F" || s == "W" || s == "A" ? 2 : 1;
|
|
704
|
+
};
|
|
705
|
+
function F2(e2) {
|
|
706
|
+
return e2.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
|
|
707
|
+
}
|
|
708
|
+
u3.length = function(e2) {
|
|
709
|
+
for (var s = F2(e2), i2 = 0, D2 = 0; D2 < s.length; D2++) i2 = i2 + this.characterLength(s[D2]);
|
|
710
|
+
return i2;
|
|
711
|
+
}, u3.slice = function(e2, s, i2) {
|
|
712
|
+
textLen = u3.length(e2), s = s || 0, i2 = i2 || 1, s < 0 && (s = textLen + s), i2 < 0 && (i2 = textLen + i2);
|
|
713
|
+
for (var D2 = "", C2 = 0, o3 = F2(e2), E = 0; E < o3.length; E++) {
|
|
714
|
+
var a2 = o3[E], n2 = u3.length(a2);
|
|
715
|
+
if (C2 >= s - (n2 == 2 ? 1 : 0)) if (C2 + n2 <= i2) D2 += a2;
|
|
716
|
+
else break;
|
|
717
|
+
C2 += n2;
|
|
718
|
+
}
|
|
719
|
+
return D2;
|
|
720
|
+
};
|
|
721
|
+
})(P);
|
|
722
|
+
var X = P.exports;
|
|
723
|
+
var DD = O(X);
|
|
724
|
+
var uD = function() {
|
|
725
|
+
return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
|
|
726
|
+
};
|
|
727
|
+
var FD = O(uD);
|
|
728
|
+
function A(t, u3 = {}) {
|
|
729
|
+
if (typeof t != "string" || t.length === 0 || (u3 = { ambiguousIsNarrow: true, ...u3 }, t = T(t), t.length === 0)) return 0;
|
|
730
|
+
t = t.replace(FD(), " ");
|
|
731
|
+
const F2 = u3.ambiguousIsNarrow ? 1 : 2;
|
|
732
|
+
let e2 = 0;
|
|
733
|
+
for (const s of t) {
|
|
734
|
+
const i2 = s.codePointAt(0);
|
|
735
|
+
if (i2 <= 31 || i2 >= 127 && i2 <= 159 || i2 >= 768 && i2 <= 879) continue;
|
|
736
|
+
switch (DD.eastAsianWidth(s)) {
|
|
737
|
+
case "F":
|
|
738
|
+
case "W":
|
|
739
|
+
e2 += 2;
|
|
740
|
+
break;
|
|
741
|
+
case "A":
|
|
742
|
+
e2 += F2;
|
|
743
|
+
break;
|
|
744
|
+
default:
|
|
745
|
+
e2 += 1;
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
return e2;
|
|
749
|
+
}
|
|
750
|
+
var m = 10;
|
|
751
|
+
var L = (t = 0) => (u3) => `\x1B[${u3 + t}m`;
|
|
752
|
+
var N = (t = 0) => (u3) => `\x1B[${38 + t};5;${u3}m`;
|
|
753
|
+
var I = (t = 0) => (u3, F2, e2) => `\x1B[${38 + t};2;${u3};${F2};${e2}m`;
|
|
754
|
+
var r = { modifier: { reset: [0, 0], bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], overline: [53, 55], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, color: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], blackBright: [90, 39], gray: [90, 39], grey: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39] }, bgColor: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], bgBlackBright: [100, 49], bgGray: [100, 49], bgGrey: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] } };
|
|
755
|
+
Object.keys(r.modifier);
|
|
756
|
+
var tD = Object.keys(r.color);
|
|
757
|
+
var eD = Object.keys(r.bgColor);
|
|
758
|
+
[...tD, ...eD];
|
|
759
|
+
function sD() {
|
|
760
|
+
const t = /* @__PURE__ */ new Map();
|
|
761
|
+
for (const [u3, F2] of Object.entries(r)) {
|
|
762
|
+
for (const [e2, s] of Object.entries(F2)) r[e2] = { open: `\x1B[${s[0]}m`, close: `\x1B[${s[1]}m` }, F2[e2] = r[e2], t.set(s[0], s[1]);
|
|
763
|
+
Object.defineProperty(r, u3, { value: F2, enumerable: false });
|
|
764
|
+
}
|
|
765
|
+
return Object.defineProperty(r, "codes", { value: t, enumerable: false }), r.color.close = "\x1B[39m", r.bgColor.close = "\x1B[49m", r.color.ansi = L(), r.color.ansi256 = N(), r.color.ansi16m = I(), r.bgColor.ansi = L(m), r.bgColor.ansi256 = N(m), r.bgColor.ansi16m = I(m), Object.defineProperties(r, { rgbToAnsi256: { value: (u3, F2, e2) => u3 === F2 && F2 === e2 ? u3 < 8 ? 16 : u3 > 248 ? 231 : Math.round((u3 - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(u3 / 255 * 5) + 6 * Math.round(F2 / 255 * 5) + Math.round(e2 / 255 * 5), enumerable: false }, hexToRgb: { value: (u3) => {
|
|
766
|
+
const F2 = /[a-f\d]{6}|[a-f\d]{3}/i.exec(u3.toString(16));
|
|
767
|
+
if (!F2) return [0, 0, 0];
|
|
768
|
+
let [e2] = F2;
|
|
769
|
+
e2.length === 3 && (e2 = [...e2].map((i2) => i2 + i2).join(""));
|
|
770
|
+
const s = Number.parseInt(e2, 16);
|
|
771
|
+
return [s >> 16 & 255, s >> 8 & 255, s & 255];
|
|
772
|
+
}, enumerable: false }, hexToAnsi256: { value: (u3) => r.rgbToAnsi256(...r.hexToRgb(u3)), enumerable: false }, ansi256ToAnsi: { value: (u3) => {
|
|
773
|
+
if (u3 < 8) return 30 + u3;
|
|
774
|
+
if (u3 < 16) return 90 + (u3 - 8);
|
|
775
|
+
let F2, e2, s;
|
|
776
|
+
if (u3 >= 232) F2 = ((u3 - 232) * 10 + 8) / 255, e2 = F2, s = F2;
|
|
777
|
+
else {
|
|
778
|
+
u3 -= 16;
|
|
779
|
+
const C2 = u3 % 36;
|
|
780
|
+
F2 = Math.floor(u3 / 36) / 5, e2 = Math.floor(C2 / 6) / 5, s = C2 % 6 / 5;
|
|
781
|
+
}
|
|
782
|
+
const i2 = Math.max(F2, e2, s) * 2;
|
|
783
|
+
if (i2 === 0) return 30;
|
|
784
|
+
let D2 = 30 + (Math.round(s) << 2 | Math.round(e2) << 1 | Math.round(F2));
|
|
785
|
+
return i2 === 2 && (D2 += 60), D2;
|
|
786
|
+
}, enumerable: false }, rgbToAnsi: { value: (u3, F2, e2) => r.ansi256ToAnsi(r.rgbToAnsi256(u3, F2, e2)), enumerable: false }, hexToAnsi: { value: (u3) => r.ansi256ToAnsi(r.hexToAnsi256(u3)), enumerable: false } }), r;
|
|
787
|
+
}
|
|
788
|
+
var iD = sD();
|
|
789
|
+
var v = /* @__PURE__ */ new Set(["\x1B", "\x9B"]);
|
|
790
|
+
var CD = 39;
|
|
791
|
+
var w = "\x07";
|
|
792
|
+
var W = "[";
|
|
793
|
+
var rD = "]";
|
|
794
|
+
var R = "m";
|
|
795
|
+
var y = `${rD}8;;`;
|
|
796
|
+
var V = (t) => `${v.values().next().value}${W}${t}${R}`;
|
|
797
|
+
var z = (t) => `${v.values().next().value}${y}${t}${w}`;
|
|
798
|
+
var ED = (t) => t.split(" ").map((u3) => A(u3));
|
|
799
|
+
var _ = (t, u3, F2) => {
|
|
800
|
+
const e2 = [...u3];
|
|
801
|
+
let s = false, i2 = false, D2 = A(T(t[t.length - 1]));
|
|
802
|
+
for (const [C2, o3] of e2.entries()) {
|
|
803
|
+
const E = A(o3);
|
|
804
|
+
if (D2 + E <= F2 ? t[t.length - 1] += o3 : (t.push(o3), D2 = 0), v.has(o3) && (s = true, i2 = e2.slice(C2 + 1).join("").startsWith(y)), s) {
|
|
805
|
+
i2 ? o3 === w && (s = false, i2 = false) : o3 === R && (s = false);
|
|
806
|
+
continue;
|
|
807
|
+
}
|
|
808
|
+
D2 += E, D2 === F2 && C2 < e2.length - 1 && (t.push(""), D2 = 0);
|
|
809
|
+
}
|
|
810
|
+
!D2 && t[t.length - 1].length > 0 && t.length > 1 && (t[t.length - 2] += t.pop());
|
|
811
|
+
};
|
|
812
|
+
var nD = (t) => {
|
|
813
|
+
const u3 = t.split(" ");
|
|
814
|
+
let F2 = u3.length;
|
|
815
|
+
for (; F2 > 0 && !(A(u3[F2 - 1]) > 0); ) F2--;
|
|
816
|
+
return F2 === u3.length ? t : u3.slice(0, F2).join(" ") + u3.slice(F2).join("");
|
|
817
|
+
};
|
|
818
|
+
var oD = (t, u3, F2 = {}) => {
|
|
819
|
+
if (F2.trim !== false && t.trim() === "") return "";
|
|
820
|
+
let e2 = "", s, i2;
|
|
821
|
+
const D2 = ED(t);
|
|
822
|
+
let C2 = [""];
|
|
823
|
+
for (const [E, a2] of t.split(" ").entries()) {
|
|
824
|
+
F2.trim !== false && (C2[C2.length - 1] = C2[C2.length - 1].trimStart());
|
|
825
|
+
let n2 = A(C2[C2.length - 1]);
|
|
826
|
+
if (E !== 0 && (n2 >= u3 && (F2.wordWrap === false || F2.trim === false) && (C2.push(""), n2 = 0), (n2 > 0 || F2.trim === false) && (C2[C2.length - 1] += " ", n2++)), F2.hard && D2[E] > u3) {
|
|
827
|
+
const B2 = u3 - n2, p = 1 + Math.floor((D2[E] - B2 - 1) / u3);
|
|
828
|
+
Math.floor((D2[E] - 1) / u3) < p && C2.push(""), _(C2, a2, u3);
|
|
829
|
+
continue;
|
|
830
|
+
}
|
|
831
|
+
if (n2 + D2[E] > u3 && n2 > 0 && D2[E] > 0) {
|
|
832
|
+
if (F2.wordWrap === false && n2 < u3) {
|
|
833
|
+
_(C2, a2, u3);
|
|
834
|
+
continue;
|
|
835
|
+
}
|
|
836
|
+
C2.push("");
|
|
837
|
+
}
|
|
838
|
+
if (n2 + D2[E] > u3 && F2.wordWrap === false) {
|
|
839
|
+
_(C2, a2, u3);
|
|
840
|
+
continue;
|
|
841
|
+
}
|
|
842
|
+
C2[C2.length - 1] += a2;
|
|
843
|
+
}
|
|
844
|
+
F2.trim !== false && (C2 = C2.map((E) => nD(E)));
|
|
845
|
+
const o3 = [...C2.join(`
|
|
846
|
+
`)];
|
|
847
|
+
for (const [E, a2] of o3.entries()) {
|
|
848
|
+
if (e2 += a2, v.has(a2)) {
|
|
849
|
+
const { groups: B2 } = new RegExp(`(?:\\${W}(?<code>\\d+)m|\\${y}(?<uri>.*)${w})`).exec(o3.slice(E).join("")) || { groups: {} };
|
|
850
|
+
if (B2.code !== void 0) {
|
|
851
|
+
const p = Number.parseFloat(B2.code);
|
|
852
|
+
s = p === CD ? void 0 : p;
|
|
853
|
+
} else B2.uri !== void 0 && (i2 = B2.uri.length === 0 ? void 0 : B2.uri);
|
|
854
|
+
}
|
|
855
|
+
const n2 = iD.codes.get(Number(s));
|
|
856
|
+
o3[E + 1] === `
|
|
857
|
+
` ? (i2 && (e2 += z("")), s && n2 && (e2 += V(n2))) : a2 === `
|
|
858
|
+
` && (s && n2 && (e2 += V(s)), i2 && (e2 += z(i2)));
|
|
859
|
+
}
|
|
860
|
+
return e2;
|
|
861
|
+
};
|
|
862
|
+
function G(t, u3, F2) {
|
|
863
|
+
return String(t).normalize().replace(/\r\n/g, `
|
|
864
|
+
`).split(`
|
|
865
|
+
`).map((e2) => oD(e2, u3, F2)).join(`
|
|
866
|
+
`);
|
|
867
|
+
}
|
|
868
|
+
var aD = ["up", "down", "left", "right", "space", "enter", "cancel"];
|
|
869
|
+
var c = { actions: new Set(aD), aliases: /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["", "cancel"], ["escape", "cancel"]]) };
|
|
870
|
+
function k(t, u3) {
|
|
871
|
+
if (typeof t == "string") return c.aliases.get(t) === u3;
|
|
872
|
+
for (const F2 of t) if (F2 !== void 0 && k(F2, u3)) return true;
|
|
873
|
+
return false;
|
|
874
|
+
}
|
|
875
|
+
function lD(t, u3) {
|
|
876
|
+
if (t === u3) return;
|
|
877
|
+
const F2 = t.split(`
|
|
878
|
+
`), e2 = u3.split(`
|
|
879
|
+
`), s = [];
|
|
880
|
+
for (let i2 = 0; i2 < Math.max(F2.length, e2.length); i2++) F2[i2] !== e2[i2] && s.push(i2);
|
|
881
|
+
return s;
|
|
882
|
+
}
|
|
883
|
+
var xD = globalThis.process.platform.startsWith("win");
|
|
884
|
+
var S = Symbol("clack:cancel");
|
|
885
|
+
function BD(t) {
|
|
886
|
+
return t === S;
|
|
887
|
+
}
|
|
888
|
+
function d(t, u3) {
|
|
889
|
+
const F2 = t;
|
|
890
|
+
F2.isTTY && F2.setRawMode(u3);
|
|
891
|
+
}
|
|
892
|
+
function cD({ input: t = import_node_process.stdin, output: u3 = import_node_process.stdout, overwrite: F2 = true, hideCursor: e2 = true } = {}) {
|
|
893
|
+
const s = f.createInterface({ input: t, output: u3, prompt: "", tabSize: 1 });
|
|
894
|
+
f.emitKeypressEvents(t, s), t.isTTY && t.setRawMode(true);
|
|
895
|
+
const i2 = (D2, { name: C2, sequence: o3 }) => {
|
|
896
|
+
const E = String(D2);
|
|
897
|
+
if (k([E, C2, o3], "cancel")) {
|
|
898
|
+
e2 && u3.write(import_sisteransi.cursor.show), process.exit(0);
|
|
899
|
+
return;
|
|
900
|
+
}
|
|
901
|
+
if (!F2) return;
|
|
902
|
+
const a2 = C2 === "return" ? 0 : -1, n2 = C2 === "return" ? -1 : 0;
|
|
903
|
+
f.moveCursor(u3, a2, n2, () => {
|
|
904
|
+
f.clearLine(u3, 1, () => {
|
|
905
|
+
t.once("keypress", i2);
|
|
906
|
+
});
|
|
907
|
+
});
|
|
908
|
+
};
|
|
909
|
+
return e2 && u3.write(import_sisteransi.cursor.hide), t.once("keypress", i2), () => {
|
|
910
|
+
t.off("keypress", i2), e2 && u3.write(import_sisteransi.cursor.show), t.isTTY && !xD && t.setRawMode(false), s.terminal = false, s.close();
|
|
911
|
+
};
|
|
912
|
+
}
|
|
913
|
+
var AD = Object.defineProperty;
|
|
914
|
+
var pD = (t, u3, F2) => u3 in t ? AD(t, u3, { enumerable: true, configurable: true, writable: true, value: F2 }) : t[u3] = F2;
|
|
915
|
+
var h = (t, u3, F2) => (pD(t, typeof u3 != "symbol" ? u3 + "" : u3, F2), F2);
|
|
916
|
+
var x = class {
|
|
917
|
+
constructor(u3, F2 = true) {
|
|
918
|
+
h(this, "input"), h(this, "output"), h(this, "_abortSignal"), h(this, "rl"), h(this, "opts"), h(this, "_render"), h(this, "_track", false), h(this, "_prevFrame", ""), h(this, "_subscribers", /* @__PURE__ */ new Map()), h(this, "_cursor", 0), h(this, "state", "initial"), h(this, "error", ""), h(this, "value");
|
|
919
|
+
const { input: e2 = import_node_process.stdin, output: s = import_node_process.stdout, render: i2, signal: D2, ...C2 } = u3;
|
|
920
|
+
this.opts = C2, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = i2.bind(this), this._track = F2, this._abortSignal = D2, this.input = e2, this.output = s;
|
|
921
|
+
}
|
|
922
|
+
unsubscribe() {
|
|
923
|
+
this._subscribers.clear();
|
|
924
|
+
}
|
|
925
|
+
setSubscriber(u3, F2) {
|
|
926
|
+
const e2 = this._subscribers.get(u3) ?? [];
|
|
927
|
+
e2.push(F2), this._subscribers.set(u3, e2);
|
|
928
|
+
}
|
|
929
|
+
on(u3, F2) {
|
|
930
|
+
this.setSubscriber(u3, { cb: F2 });
|
|
931
|
+
}
|
|
932
|
+
once(u3, F2) {
|
|
933
|
+
this.setSubscriber(u3, { cb: F2, once: true });
|
|
934
|
+
}
|
|
935
|
+
emit(u3, ...F2) {
|
|
936
|
+
const e2 = this._subscribers.get(u3) ?? [], s = [];
|
|
937
|
+
for (const i2 of e2) i2.cb(...F2), i2.once && s.push(() => e2.splice(e2.indexOf(i2), 1));
|
|
938
|
+
for (const i2 of s) i2();
|
|
939
|
+
}
|
|
940
|
+
prompt() {
|
|
941
|
+
return new Promise((u3, F2) => {
|
|
942
|
+
if (this._abortSignal) {
|
|
943
|
+
if (this._abortSignal.aborted) return this.state = "cancel", this.close(), u3(S);
|
|
944
|
+
this._abortSignal.addEventListener("abort", () => {
|
|
945
|
+
this.state = "cancel", this.close();
|
|
946
|
+
}, { once: true });
|
|
947
|
+
}
|
|
948
|
+
const e2 = new import_node_tty.WriteStream(0);
|
|
949
|
+
e2._write = (s, i2, D2) => {
|
|
950
|
+
this._track && (this.value = this.rl?.line.replace(/\t/g, ""), this._cursor = this.rl?.cursor ?? 0, this.emit("value", this.value)), D2();
|
|
951
|
+
}, this.input.pipe(e2), this.rl = import_node_readline.default.createInterface({ input: this.input, output: e2, 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), d(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
|
|
952
|
+
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), d(this.input, false), u3(this.value);
|
|
953
|
+
}), this.once("cancel", () => {
|
|
954
|
+
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), d(this.input, false), u3(S);
|
|
955
|
+
});
|
|
956
|
+
});
|
|
957
|
+
}
|
|
958
|
+
onKeypress(u3, F2) {
|
|
959
|
+
if (this.state === "error" && (this.state = "active"), F2?.name && (!this._track && c.aliases.has(F2.name) && this.emit("cursor", c.aliases.get(F2.name)), c.actions.has(F2.name) && this.emit("cursor", F2.name)), u3 && (u3.toLowerCase() === "y" || u3.toLowerCase() === "n") && this.emit("confirm", u3.toLowerCase() === "y"), u3 === " " && this.opts.placeholder && (this.value || (this.rl?.write(this.opts.placeholder), this.emit("value", this.opts.placeholder))), u3 && this.emit("key", u3.toLowerCase()), F2?.name === "return") {
|
|
960
|
+
if (this.opts.validate) {
|
|
961
|
+
const e2 = this.opts.validate(this.value);
|
|
962
|
+
e2 && (this.error = e2 instanceof Error ? e2.message : e2, this.state = "error", this.rl?.write(this.value));
|
|
963
|
+
}
|
|
964
|
+
this.state !== "error" && (this.state = "submit");
|
|
965
|
+
}
|
|
966
|
+
k([u3, F2?.name, F2?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
|
|
967
|
+
}
|
|
968
|
+
close() {
|
|
969
|
+
this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
|
|
970
|
+
`), d(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
|
|
971
|
+
}
|
|
972
|
+
restoreCursor() {
|
|
973
|
+
const u3 = G(this._prevFrame, process.stdout.columns, { hard: true }).split(`
|
|
974
|
+
`).length - 1;
|
|
975
|
+
this.output.write(import_sisteransi.cursor.move(-999, u3 * -1));
|
|
976
|
+
}
|
|
977
|
+
render() {
|
|
978
|
+
const u3 = G(this._render(this) ?? "", process.stdout.columns, { hard: true });
|
|
979
|
+
if (u3 !== this._prevFrame) {
|
|
980
|
+
if (this.state === "initial") this.output.write(import_sisteransi.cursor.hide);
|
|
981
|
+
else {
|
|
982
|
+
const F2 = lD(this._prevFrame, u3);
|
|
983
|
+
if (this.restoreCursor(), F2 && F2?.length === 1) {
|
|
984
|
+
const e2 = F2[0];
|
|
985
|
+
this.output.write(import_sisteransi.cursor.move(0, e2)), this.output.write(import_sisteransi.erase.lines(1));
|
|
986
|
+
const s = u3.split(`
|
|
987
|
+
`);
|
|
988
|
+
this.output.write(s[e2]), this._prevFrame = u3, this.output.write(import_sisteransi.cursor.move(0, s.length - e2 - 1));
|
|
989
|
+
return;
|
|
990
|
+
}
|
|
991
|
+
if (F2 && F2?.length > 1) {
|
|
992
|
+
const e2 = F2[0];
|
|
993
|
+
this.output.write(import_sisteransi.cursor.move(0, e2)), this.output.write(import_sisteransi.erase.down());
|
|
994
|
+
const s = u3.split(`
|
|
995
|
+
`).slice(e2);
|
|
996
|
+
this.output.write(s.join(`
|
|
997
|
+
`)), this._prevFrame = u3;
|
|
998
|
+
return;
|
|
999
|
+
}
|
|
1000
|
+
this.output.write(import_sisteransi.erase.down());
|
|
1001
|
+
}
|
|
1002
|
+
this.output.write(u3), this.state === "initial" && (this.state = "active"), this._prevFrame = u3;
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
};
|
|
1006
|
+
var SD = Object.defineProperty;
|
|
1007
|
+
var $D = (t, u3, F2) => u3 in t ? SD(t, u3, { enumerable: true, configurable: true, writable: true, value: F2 }) : t[u3] = F2;
|
|
1008
|
+
var q = (t, u3, F2) => ($D(t, typeof u3 != "symbol" ? u3 + "" : u3, F2), F2);
|
|
1009
|
+
var jD = class extends x {
|
|
1010
|
+
constructor(u3) {
|
|
1011
|
+
super(u3, false), q(this, "options"), q(this, "cursor", 0), this.options = u3.options, this.cursor = this.options.findIndex(({ value: F2 }) => F2 === u3.initialValue), this.cursor === -1 && (this.cursor = 0), this.changeValue(), this.on("cursor", (F2) => {
|
|
1012
|
+
switch (F2) {
|
|
1013
|
+
case "left":
|
|
1014
|
+
case "up":
|
|
1015
|
+
this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
|
|
1016
|
+
break;
|
|
1017
|
+
case "down":
|
|
1018
|
+
case "right":
|
|
1019
|
+
this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
|
|
1020
|
+
break;
|
|
1021
|
+
}
|
|
1022
|
+
this.changeValue();
|
|
1023
|
+
});
|
|
1024
|
+
}
|
|
1025
|
+
get _value() {
|
|
1026
|
+
return this.options[this.cursor];
|
|
1027
|
+
}
|
|
1028
|
+
changeValue() {
|
|
1029
|
+
this.value = this._value.value;
|
|
1030
|
+
}
|
|
1031
|
+
};
|
|
1032
|
+
var PD = class extends x {
|
|
1033
|
+
get valueWithCursor() {
|
|
1034
|
+
if (this.state === "submit") return this.value;
|
|
1035
|
+
if (this.cursor >= this.value.length) return `${this.value}\u2588`;
|
|
1036
|
+
const u3 = this.value.slice(0, this.cursor), [F2, ...e2] = this.value.slice(this.cursor);
|
|
1037
|
+
return `${u3}${import_picocolors.default.inverse(F2)}${e2.join("")}`;
|
|
1038
|
+
}
|
|
1039
|
+
get cursor() {
|
|
1040
|
+
return this._cursor;
|
|
1041
|
+
}
|
|
1042
|
+
constructor(u3) {
|
|
1043
|
+
super(u3), this.on("finalize", () => {
|
|
1044
|
+
this.value || (this.value = u3.defaultValue);
|
|
1045
|
+
});
|
|
1046
|
+
}
|
|
1047
|
+
};
|
|
1048
|
+
|
|
1049
|
+
// ../../node_modules/.pnpm/@clack+prompts@0.10.0/node_modules/@clack/prompts/dist/index.mjs
|
|
1050
|
+
var import_node_process2 = __toESM(require("process"), 1);
|
|
1051
|
+
var import_picocolors2 = __toESM(require_picocolors(), 1);
|
|
1052
|
+
var import_sisteransi2 = __toESM(require_src(), 1);
|
|
1053
|
+
function ce() {
|
|
1054
|
+
return import_node_process2.default.platform !== "win32" ? import_node_process2.default.env.TERM !== "linux" : !!import_node_process2.default.env.CI || !!import_node_process2.default.env.WT_SESSION || !!import_node_process2.default.env.TERMINUS_SUBLIME || import_node_process2.default.env.ConEmuTask === "{cmd::Cmder}" || import_node_process2.default.env.TERM_PROGRAM === "Terminus-Sublime" || import_node_process2.default.env.TERM_PROGRAM === "vscode" || import_node_process2.default.env.TERM === "xterm-256color" || import_node_process2.default.env.TERM === "alacritty" || import_node_process2.default.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
1055
|
+
}
|
|
1056
|
+
var V2 = ce();
|
|
1057
|
+
var u = (t, n2) => V2 ? t : n2;
|
|
1058
|
+
var le = u("\u25C6", "*");
|
|
1059
|
+
var L2 = u("\u25A0", "x");
|
|
1060
|
+
var W2 = u("\u25B2", "x");
|
|
1061
|
+
var C = u("\u25C7", "o");
|
|
1062
|
+
var ue = u("\u250C", "T");
|
|
1063
|
+
var o = u("\u2502", "|");
|
|
1064
|
+
var d2 = u("\u2514", "\u2014");
|
|
1065
|
+
var k2 = u("\u25CF", ">");
|
|
1066
|
+
var P2 = u("\u25CB", " ");
|
|
1067
|
+
var A2 = u("\u25FB", "[\u2022]");
|
|
1068
|
+
var T2 = u("\u25FC", "[+]");
|
|
1069
|
+
var F = u("\u25FB", "[ ]");
|
|
1070
|
+
var $e = u("\u25AA", "\u2022");
|
|
1071
|
+
var _2 = u("\u2500", "-");
|
|
1072
|
+
var me = u("\u256E", "+");
|
|
1073
|
+
var de = u("\u251C", "+");
|
|
1074
|
+
var pe = u("\u256F", "+");
|
|
1075
|
+
var q2 = u("\u25CF", "\u2022");
|
|
1076
|
+
var D = u("\u25C6", "*");
|
|
1077
|
+
var U2 = u("\u25B2", "!");
|
|
1078
|
+
var K = u("\u25A0", "x");
|
|
1079
|
+
var w2 = (t) => {
|
|
1080
|
+
switch (t) {
|
|
1081
|
+
case "initial":
|
|
1082
|
+
case "active":
|
|
1083
|
+
return import_picocolors2.default.cyan(le);
|
|
1084
|
+
case "cancel":
|
|
1085
|
+
return import_picocolors2.default.red(L2);
|
|
1086
|
+
case "error":
|
|
1087
|
+
return import_picocolors2.default.yellow(W2);
|
|
1088
|
+
case "submit":
|
|
1089
|
+
return import_picocolors2.default.green(C);
|
|
1090
|
+
}
|
|
1091
|
+
};
|
|
1092
|
+
var B = (t) => {
|
|
1093
|
+
const { cursor: n2, options: s, style: r2 } = t, i2 = t.maxItems ?? Number.POSITIVE_INFINITY, a2 = Math.max(process.stdout.rows - 4, 0), c4 = Math.min(a2, Math.max(i2, 5));
|
|
1094
|
+
let l2 = 0;
|
|
1095
|
+
n2 >= l2 + c4 - 3 ? l2 = Math.max(Math.min(n2 - c4 + 3, s.length - c4), 0) : n2 < l2 + 2 && (l2 = Math.max(n2 - 2, 0));
|
|
1096
|
+
const $3 = c4 < s.length && l2 > 0, p = c4 < s.length && l2 + c4 < s.length;
|
|
1097
|
+
return s.slice(l2, l2 + c4).map((M2, v2, x2) => {
|
|
1098
|
+
const j2 = v2 === 0 && $3, E = v2 === x2.length - 1 && p;
|
|
1099
|
+
return j2 || E ? import_picocolors2.default.dim("...") : r2(M2, v2 + l2 === n2);
|
|
1100
|
+
});
|
|
1101
|
+
};
|
|
1102
|
+
var he = (t) => new PD({ validate: t.validate, placeholder: t.placeholder, defaultValue: t.defaultValue, initialValue: t.initialValue, render() {
|
|
1103
|
+
const n2 = `${import_picocolors2.default.gray(o)}
|
|
1104
|
+
${w2(this.state)} ${t.message}
|
|
1105
|
+
`, s = t.placeholder ? import_picocolors2.default.inverse(t.placeholder[0]) + import_picocolors2.default.dim(t.placeholder.slice(1)) : import_picocolors2.default.inverse(import_picocolors2.default.hidden("_")), r2 = this.value ? this.valueWithCursor : s;
|
|
1106
|
+
switch (this.state) {
|
|
1107
|
+
case "error":
|
|
1108
|
+
return `${n2.trim()}
|
|
1109
|
+
${import_picocolors2.default.yellow(o)} ${r2}
|
|
1110
|
+
${import_picocolors2.default.yellow(d2)} ${import_picocolors2.default.yellow(this.error)}
|
|
1111
|
+
`;
|
|
1112
|
+
case "submit":
|
|
1113
|
+
return `${n2}${import_picocolors2.default.gray(o)} ${import_picocolors2.default.dim(this.value || t.placeholder)}`;
|
|
1114
|
+
case "cancel":
|
|
1115
|
+
return `${n2}${import_picocolors2.default.gray(o)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(this.value ?? ""))}${this.value?.trim() ? `
|
|
1116
|
+
${import_picocolors2.default.gray(o)}` : ""}`;
|
|
1117
|
+
default:
|
|
1118
|
+
return `${n2}${import_picocolors2.default.cyan(o)} ${r2}
|
|
1119
|
+
${import_picocolors2.default.cyan(d2)}
|
|
1120
|
+
`;
|
|
1121
|
+
}
|
|
1122
|
+
} }).prompt();
|
|
1123
|
+
var ve = (t) => {
|
|
1124
|
+
const n2 = (s, r2) => {
|
|
1125
|
+
const i2 = s.label ?? String(s.value);
|
|
1126
|
+
switch (r2) {
|
|
1127
|
+
case "selected":
|
|
1128
|
+
return `${import_picocolors2.default.dim(i2)}`;
|
|
1129
|
+
case "active":
|
|
1130
|
+
return `${import_picocolors2.default.green(k2)} ${i2} ${s.hint ? import_picocolors2.default.dim(`(${s.hint})`) : ""}`;
|
|
1131
|
+
case "cancelled":
|
|
1132
|
+
return `${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(i2))}`;
|
|
1133
|
+
default:
|
|
1134
|
+
return `${import_picocolors2.default.dim(P2)} ${import_picocolors2.default.dim(i2)}`;
|
|
1135
|
+
}
|
|
1136
|
+
};
|
|
1137
|
+
return new jD({ options: t.options, initialValue: t.initialValue, render() {
|
|
1138
|
+
const s = `${import_picocolors2.default.gray(o)}
|
|
1139
|
+
${w2(this.state)} ${t.message}
|
|
1140
|
+
`;
|
|
1141
|
+
switch (this.state) {
|
|
1142
|
+
case "submit":
|
|
1143
|
+
return `${s}${import_picocolors2.default.gray(o)} ${n2(this.options[this.cursor], "selected")}`;
|
|
1144
|
+
case "cancel":
|
|
1145
|
+
return `${s}${import_picocolors2.default.gray(o)} ${n2(this.options[this.cursor], "cancelled")}
|
|
1146
|
+
${import_picocolors2.default.gray(o)}`;
|
|
1147
|
+
default:
|
|
1148
|
+
return `${s}${import_picocolors2.default.cyan(o)} ${B({ cursor: this.cursor, options: this.options, maxItems: t.maxItems, style: (r2, i2) => n2(r2, i2 ? "active" : "inactive") }).join(`
|
|
1149
|
+
${import_picocolors2.default.cyan(o)} `)}
|
|
1150
|
+
${import_picocolors2.default.cyan(d2)}
|
|
1151
|
+
`;
|
|
1152
|
+
}
|
|
1153
|
+
} }).prompt();
|
|
1154
|
+
};
|
|
1155
|
+
var Me = (t = "", n2 = "") => {
|
|
1156
|
+
const s = `
|
|
1157
|
+
${t}
|
|
1158
|
+
`.split(`
|
|
1159
|
+
`), r2 = (0, import_node_util.stripVTControlCharacters)(n2).length, i2 = Math.max(s.reduce((c4, l2) => {
|
|
1160
|
+
const $3 = (0, import_node_util.stripVTControlCharacters)(l2);
|
|
1161
|
+
return $3.length > c4 ? $3.length : c4;
|
|
1162
|
+
}, 0), r2) + 2, a2 = s.map((c4) => `${import_picocolors2.default.gray(o)} ${import_picocolors2.default.dim(c4)}${" ".repeat(i2 - (0, import_node_util.stripVTControlCharacters)(c4).length)}${import_picocolors2.default.gray(o)}`).join(`
|
|
1163
|
+
`);
|
|
1164
|
+
process.stdout.write(`${import_picocolors2.default.gray(o)}
|
|
1165
|
+
${import_picocolors2.default.green(C)} ${import_picocolors2.default.reset(n2)} ${import_picocolors2.default.gray(_2.repeat(Math.max(i2 - r2 - 1, 1)) + me)}
|
|
1166
|
+
${a2}
|
|
1167
|
+
${import_picocolors2.default.gray(de + _2.repeat(i2 + 2) + pe)}
|
|
1168
|
+
`);
|
|
1169
|
+
};
|
|
1170
|
+
var f2 = { message: (t = "", { symbol: n2 = import_picocolors2.default.gray(o) } = {}) => {
|
|
1171
|
+
const s = [`${import_picocolors2.default.gray(o)}`];
|
|
1172
|
+
if (t) {
|
|
1173
|
+
const [r2, ...i2] = t.split(`
|
|
1174
|
+
`);
|
|
1175
|
+
s.push(`${n2} ${r2}`, ...i2.map((a2) => `${import_picocolors2.default.gray(o)} ${a2}`));
|
|
1176
|
+
}
|
|
1177
|
+
process.stdout.write(`${s.join(`
|
|
1178
|
+
`)}
|
|
1179
|
+
`);
|
|
1180
|
+
}, info: (t) => {
|
|
1181
|
+
f2.message(t, { symbol: import_picocolors2.default.blue(q2) });
|
|
1182
|
+
}, success: (t) => {
|
|
1183
|
+
f2.message(t, { symbol: import_picocolors2.default.green(D) });
|
|
1184
|
+
}, step: (t) => {
|
|
1185
|
+
f2.message(t, { symbol: import_picocolors2.default.green(C) });
|
|
1186
|
+
}, warn: (t) => {
|
|
1187
|
+
f2.message(t, { symbol: import_picocolors2.default.yellow(U2) });
|
|
1188
|
+
}, warning: (t) => {
|
|
1189
|
+
f2.warn(t);
|
|
1190
|
+
}, error: (t) => {
|
|
1191
|
+
f2.message(t, { symbol: import_picocolors2.default.red(K) });
|
|
1192
|
+
} };
|
|
1193
|
+
var J2 = `${import_picocolors2.default.gray(o)} `;
|
|
1194
|
+
var Y = ({ indicator: t = "dots" } = {}) => {
|
|
1195
|
+
const n2 = V2 ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"], s = V2 ? 80 : 120, r2 = process.env.CI === "true";
|
|
1196
|
+
let i2, a2, c4 = false, l2 = "", $3, p = performance.now();
|
|
1197
|
+
const M2 = (m2) => {
|
|
1198
|
+
const h3 = m2 > 1 ? "Something went wrong" : "Canceled";
|
|
1199
|
+
c4 && N2(h3, m2);
|
|
1200
|
+
}, v2 = () => M2(2), x2 = () => M2(1), j2 = () => {
|
|
1201
|
+
process.on("uncaughtExceptionMonitor", v2), process.on("unhandledRejection", v2), process.on("SIGINT", x2), process.on("SIGTERM", x2), process.on("exit", M2);
|
|
1202
|
+
}, E = () => {
|
|
1203
|
+
process.removeListener("uncaughtExceptionMonitor", v2), process.removeListener("unhandledRejection", v2), process.removeListener("SIGINT", x2), process.removeListener("SIGTERM", x2), process.removeListener("exit", M2);
|
|
1204
|
+
}, O2 = () => {
|
|
1205
|
+
if ($3 === void 0) return;
|
|
1206
|
+
r2 && process.stdout.write(`
|
|
1207
|
+
`);
|
|
1208
|
+
const m2 = $3.split(`
|
|
1209
|
+
`);
|
|
1210
|
+
process.stdout.write(import_sisteransi2.cursor.move(-999, m2.length - 1)), process.stdout.write(import_sisteransi2.erase.down(m2.length));
|
|
1211
|
+
}, R2 = (m2) => m2.replace(/\.+$/, ""), G2 = (m2) => {
|
|
1212
|
+
const h3 = (performance.now() - m2) / 1e3, y2 = Math.floor(h3 / 60), I2 = Math.floor(h3 % 60);
|
|
1213
|
+
return y2 > 0 ? `[${y2}m ${I2}s]` : `[${I2}s]`;
|
|
1214
|
+
}, H = (m2 = "") => {
|
|
1215
|
+
c4 = true, i2 = cD(), l2 = R2(m2), p = performance.now(), process.stdout.write(`${import_picocolors2.default.gray(o)}
|
|
1216
|
+
`);
|
|
1217
|
+
let h3 = 0, y2 = 0;
|
|
1218
|
+
j2(), a2 = setInterval(() => {
|
|
1219
|
+
if (r2 && l2 === $3) return;
|
|
1220
|
+
O2(), $3 = l2;
|
|
1221
|
+
const I2 = import_picocolors2.default.magenta(n2[h3]);
|
|
1222
|
+
if (r2) process.stdout.write(`${I2} ${l2}...`);
|
|
1223
|
+
else if (t === "timer") process.stdout.write(`${I2} ${l2} ${G2(p)}`);
|
|
1224
|
+
else {
|
|
1225
|
+
const z2 = ".".repeat(Math.floor(y2)).slice(0, 3);
|
|
1226
|
+
process.stdout.write(`${I2} ${l2}${z2}`);
|
|
1227
|
+
}
|
|
1228
|
+
h3 = h3 + 1 < n2.length ? h3 + 1 : 0, y2 = y2 < n2.length ? y2 + 0.125 : 0;
|
|
1229
|
+
}, s);
|
|
1230
|
+
}, N2 = (m2 = "", h3 = 0) => {
|
|
1231
|
+
c4 = false, clearInterval(a2), O2();
|
|
1232
|
+
const y2 = h3 === 0 ? import_picocolors2.default.green(C) : h3 === 1 ? import_picocolors2.default.red(L2) : import_picocolors2.default.red(W2);
|
|
1233
|
+
l2 = R2(m2 ?? l2), t === "timer" ? process.stdout.write(`${y2} ${l2} ${G2(p)}
|
|
1234
|
+
`) : process.stdout.write(`${y2} ${l2}
|
|
1235
|
+
`), E(), i2();
|
|
1236
|
+
};
|
|
1237
|
+
return { start: H, stop: N2, message: (m2 = "") => {
|
|
1238
|
+
l2 = R2(m2 ?? l2);
|
|
1239
|
+
} };
|
|
1240
|
+
};
|
|
1241
|
+
var Te = async (t) => {
|
|
1242
|
+
for (const n2 of t) {
|
|
1243
|
+
if (n2.enabled === false) continue;
|
|
1244
|
+
const s = Y();
|
|
1245
|
+
s.start(n2.title);
|
|
1246
|
+
const r2 = await n2.task(s.message);
|
|
1247
|
+
s.stop(r2 || n2.title);
|
|
1248
|
+
}
|
|
1249
|
+
};
|
|
544
1250
|
|
|
545
1251
|
// ../../node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/error/AbortError.mjs
|
|
546
1252
|
var AbortError = class extends Error {
|
|
@@ -768,12 +1474,12 @@ var getSubprocessResult = ({ stdout }) => {
|
|
|
768
1474
|
var import_node_child_process3 = require("child_process");
|
|
769
1475
|
|
|
770
1476
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/specific.js
|
|
771
|
-
var
|
|
1477
|
+
var import_node_util2 = require("util");
|
|
772
1478
|
|
|
773
1479
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/standard-stream.js
|
|
774
|
-
var
|
|
1480
|
+
var import_node_process3 = __toESM(require("process"), 1);
|
|
775
1481
|
var isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
|
|
776
|
-
var STANDARD_STREAMS = [
|
|
1482
|
+
var STANDARD_STREAMS = [import_node_process3.default.stdin, import_node_process3.default.stdout, import_node_process3.default.stderr];
|
|
777
1483
|
var STANDARD_STREAMS_ALIASES = ["stdin", "stdout", "stderr"];
|
|
778
1484
|
var getStreamName = (fdNumber) => STANDARD_STREAMS_ALIASES[fdNumber] ?? `stdio[${fdNumber}]`;
|
|
779
1485
|
|
|
@@ -836,7 +1542,7 @@ var parseFd = (fdName) => {
|
|
|
836
1542
|
};
|
|
837
1543
|
var FD_REGEXP = /^fd(\d+)$/;
|
|
838
1544
|
var addDefaultValue = (optionArray, optionName) => optionArray.map((optionValue) => optionValue === void 0 ? DEFAULT_OPTIONS[optionName] : optionValue);
|
|
839
|
-
var verboseDefault = (0,
|
|
1545
|
+
var verboseDefault = (0, import_node_util2.debuglog)("execa").enabled ? "full" : "none";
|
|
840
1546
|
var DEFAULT_OPTIONS = {
|
|
841
1547
|
lines: false,
|
|
842
1548
|
buffer: true,
|
|
@@ -860,18 +1566,18 @@ var isVerboseFunction = (fdVerbose) => typeof fdVerbose === "function";
|
|
|
860
1566
|
var VERBOSE_VALUES = ["none", "short", "full"];
|
|
861
1567
|
|
|
862
1568
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/log.js
|
|
863
|
-
var
|
|
1569
|
+
var import_node_util4 = require("util");
|
|
864
1570
|
|
|
865
1571
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/escape.js
|
|
866
|
-
var
|
|
867
|
-
var
|
|
1572
|
+
var import_node_process4 = require("process");
|
|
1573
|
+
var import_node_util3 = require("util");
|
|
868
1574
|
var joinCommand = (filePath, rawArguments) => {
|
|
869
1575
|
const fileAndArguments = [filePath, ...rawArguments];
|
|
870
1576
|
const command = fileAndArguments.join(" ");
|
|
871
1577
|
const escapedCommand = fileAndArguments.map((fileAndArgument) => quoteString(escapeControlCharacters(fileAndArgument))).join(" ");
|
|
872
1578
|
return { command, escapedCommand };
|
|
873
1579
|
};
|
|
874
|
-
var escapeLines = (lines) => (0,
|
|
1580
|
+
var escapeLines = (lines) => (0, import_node_util3.stripVTControlCharacters)(lines).split("\n").map((line) => escapeControlCharacters(line)).join("\n");
|
|
875
1581
|
var escapeControlCharacters = (line) => line.replaceAll(SPECIAL_CHAR_REGEXP, (character) => escapeControlCharacter(character));
|
|
876
1582
|
var escapeControlCharacter = (character) => {
|
|
877
1583
|
const commonEscape = COMMON_ESCAPES[character];
|
|
@@ -903,16 +1609,16 @@ var quoteString = (escapedArgument) => {
|
|
|
903
1609
|
if (NO_ESCAPE_REGEXP.test(escapedArgument)) {
|
|
904
1610
|
return escapedArgument;
|
|
905
1611
|
}
|
|
906
|
-
return
|
|
1612
|
+
return import_node_process4.platform === "win32" ? `"${escapedArgument.replaceAll('"', '""')}"` : `'${escapedArgument.replaceAll("'", "'\\''")}'`;
|
|
907
1613
|
};
|
|
908
1614
|
var NO_ESCAPE_REGEXP = /^[\w./-]+$/;
|
|
909
1615
|
|
|
910
1616
|
// ../../node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
|
|
911
|
-
var
|
|
1617
|
+
var import_node_process5 = __toESM(require("process"), 1);
|
|
912
1618
|
function isUnicodeSupported() {
|
|
913
|
-
const { env } =
|
|
1619
|
+
const { env } = import_node_process5.default;
|
|
914
1620
|
const { TERM, TERM_PROGRAM } = env;
|
|
915
|
-
if (
|
|
1621
|
+
if (import_node_process5.default.platform !== "win32") {
|
|
916
1622
|
return TERM !== "linux";
|
|
917
1623
|
}
|
|
918
1624
|
return Boolean(env.WT_SESSION) || Boolean(env.TERMINUS_SUBLIME) || env.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
@@ -1195,8 +1901,8 @@ var figures_default = figures;
|
|
|
1195
1901
|
var replacements = Object.entries(specialMainSymbols);
|
|
1196
1902
|
|
|
1197
1903
|
// ../../node_modules/.pnpm/yoctocolors@2.1.1/node_modules/yoctocolors/base.js
|
|
1198
|
-
var
|
|
1199
|
-
var hasColors =
|
|
1904
|
+
var import_node_tty2 = __toESM(require("tty"), 1);
|
|
1905
|
+
var hasColors = import_node_tty2.default?.WriteStream?.prototype?.hasColors?.() ?? false;
|
|
1200
1906
|
var format = (open, close) => {
|
|
1201
1907
|
if (!hasColors) {
|
|
1202
1908
|
return (input) => input;
|
|
@@ -1346,7 +2052,7 @@ var getPrintedLine = (verboseObject) => {
|
|
|
1346
2052
|
return { verboseLine, verboseObject };
|
|
1347
2053
|
};
|
|
1348
2054
|
var serializeVerboseMessage = (message) => {
|
|
1349
|
-
const messageString = typeof message === "string" ? message : (0,
|
|
2055
|
+
const messageString = typeof message === "string" ? message : (0, import_node_util4.inspect)(message);
|
|
1350
2056
|
const escapedMessage = escapeLines(messageString);
|
|
1351
2057
|
return escapedMessage.replaceAll(" ", " ".repeat(TAB_SIZE));
|
|
1352
2058
|
};
|
|
@@ -1393,9 +2099,9 @@ var validateVerbose = (verbose) => {
|
|
|
1393
2099
|
};
|
|
1394
2100
|
|
|
1395
2101
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/duration.js
|
|
1396
|
-
var
|
|
1397
|
-
var getStartTime = () =>
|
|
1398
|
-
var getDurationMs = (startTime) => Number(
|
|
2102
|
+
var import_node_process6 = require("process");
|
|
2103
|
+
var getStartTime = () => import_node_process6.hrtime.bigint();
|
|
2104
|
+
var getDurationMs = (startTime) => Number(import_node_process6.hrtime.bigint() - startTime) / 1e6;
|
|
1399
2105
|
|
|
1400
2106
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/command.js
|
|
1401
2107
|
var handleCommand = (filePath, rawArguments, rawOptions) => {
|
|
@@ -1414,11 +2120,11 @@ var handleCommand = (filePath, rawArguments, rawOptions) => {
|
|
|
1414
2120
|
|
|
1415
2121
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/options.js
|
|
1416
2122
|
var import_node_path5 = __toESM(require("path"), 1);
|
|
1417
|
-
var
|
|
2123
|
+
var import_node_process10 = __toESM(require("process"), 1);
|
|
1418
2124
|
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
1419
2125
|
|
|
1420
2126
|
// ../../node_modules/.pnpm/npm-run-path@6.0.0/node_modules/npm-run-path/index.js
|
|
1421
|
-
var
|
|
2127
|
+
var import_node_process7 = __toESM(require("process"), 1);
|
|
1422
2128
|
var import_node_path2 = __toESM(require("path"), 1);
|
|
1423
2129
|
|
|
1424
2130
|
// ../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js
|
|
@@ -1434,11 +2140,11 @@ function pathKey(options = {}) {
|
|
|
1434
2140
|
}
|
|
1435
2141
|
|
|
1436
2142
|
// ../../node_modules/.pnpm/unicorn-magic@0.3.0/node_modules/unicorn-magic/node.js
|
|
1437
|
-
var
|
|
2143
|
+
var import_node_util5 = require("util");
|
|
1438
2144
|
var import_node_child_process2 = require("child_process");
|
|
1439
2145
|
var import_node_path = __toESM(require("path"), 1);
|
|
1440
2146
|
var import_node_url2 = require("url");
|
|
1441
|
-
var execFileOriginal = (0,
|
|
2147
|
+
var execFileOriginal = (0, import_node_util5.promisify)(import_node_child_process2.execFile);
|
|
1442
2148
|
function toPath(urlOrPath) {
|
|
1443
2149
|
return urlOrPath instanceof URL ? (0, import_node_url2.fileURLToPath)(urlOrPath) : urlOrPath;
|
|
1444
2150
|
}
|
|
@@ -1459,10 +2165,10 @@ var TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
|
|
|
1459
2165
|
|
|
1460
2166
|
// ../../node_modules/.pnpm/npm-run-path@6.0.0/node_modules/npm-run-path/index.js
|
|
1461
2167
|
var npmRunPath = ({
|
|
1462
|
-
cwd =
|
|
1463
|
-
path: pathOption =
|
|
2168
|
+
cwd = import_node_process7.default.cwd(),
|
|
2169
|
+
path: pathOption = import_node_process7.default.env[pathKey()],
|
|
1464
2170
|
preferLocal = true,
|
|
1465
|
-
execPath: execPath2 =
|
|
2171
|
+
execPath: execPath2 = import_node_process7.default.execPath,
|
|
1466
2172
|
addExecPath = true
|
|
1467
2173
|
} = {}) => {
|
|
1468
2174
|
const cwdPath = import_node_path2.default.resolve(toPath(cwd));
|
|
@@ -1490,7 +2196,7 @@ var applyExecPath = (result, pathParts, execPath2, cwdPath) => {
|
|
|
1490
2196
|
result.push(pathPart);
|
|
1491
2197
|
}
|
|
1492
2198
|
};
|
|
1493
|
-
var npmRunPathEnv = ({ env =
|
|
2199
|
+
var npmRunPathEnv = ({ env = import_node_process7.default.env, ...options } = {}) => {
|
|
1494
2200
|
env = { ...env };
|
|
1495
2201
|
const pathName = pathKey({ env });
|
|
1496
2202
|
options.path = env[pathName];
|
|
@@ -2040,7 +2746,7 @@ var terminateOnCancel = async (subprocess, cancelSignal, context, { signal }) =>
|
|
|
2040
2746
|
var import_promises3 = require("timers/promises");
|
|
2041
2747
|
|
|
2042
2748
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/send.js
|
|
2043
|
-
var
|
|
2749
|
+
var import_node_util6 = require("util");
|
|
2044
2750
|
|
|
2045
2751
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/validation.js
|
|
2046
2752
|
var validateIpcMethod = ({ methodName, isSubprocess, ipc, isConnected: isConnected2 }) => {
|
|
@@ -2510,7 +3216,7 @@ var getSendMethod = (anyProcess) => {
|
|
|
2510
3216
|
if (PROCESS_SEND_METHODS.has(anyProcess)) {
|
|
2511
3217
|
return PROCESS_SEND_METHODS.get(anyProcess);
|
|
2512
3218
|
}
|
|
2513
|
-
const sendMethod = (0,
|
|
3219
|
+
const sendMethod = (0, import_node_util6.promisify)(anyProcess.send.bind(anyProcess));
|
|
2514
3220
|
PROCESS_SEND_METHODS.set(anyProcess, sendMethod);
|
|
2515
3221
|
return sendMethod;
|
|
2516
3222
|
};
|
|
@@ -2639,7 +3345,7 @@ var killAfterTimeout = async (subprocess, timeout, context, { signal }) => {
|
|
|
2639
3345
|
};
|
|
2640
3346
|
|
|
2641
3347
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/methods/node.js
|
|
2642
|
-
var
|
|
3348
|
+
var import_node_process8 = require("process");
|
|
2643
3349
|
var import_node_path3 = __toESM(require("path"), 1);
|
|
2644
3350
|
var mapNode = ({ options }) => {
|
|
2645
3351
|
if (options.node === false) {
|
|
@@ -2649,8 +3355,8 @@ var mapNode = ({ options }) => {
|
|
|
2649
3355
|
};
|
|
2650
3356
|
var handleNodeOption = (file, commandArguments, {
|
|
2651
3357
|
node: shouldHandleNode = false,
|
|
2652
|
-
nodePath =
|
|
2653
|
-
nodeOptions =
|
|
3358
|
+
nodePath = import_node_process8.execPath,
|
|
3359
|
+
nodeOptions = import_node_process8.execArgv.filter((nodeOption) => !nodeOption.startsWith("--inspect")),
|
|
2654
3360
|
cwd,
|
|
2655
3361
|
execPath: formerNodePath,
|
|
2656
3362
|
...options
|
|
@@ -2760,14 +3466,14 @@ var serializeEncoding = (encoding) => typeof encoding === "string" ? `"${encodin
|
|
|
2760
3466
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/cwd.js
|
|
2761
3467
|
var import_node_fs = require("fs");
|
|
2762
3468
|
var import_node_path4 = __toESM(require("path"), 1);
|
|
2763
|
-
var
|
|
3469
|
+
var import_node_process9 = __toESM(require("process"), 1);
|
|
2764
3470
|
var normalizeCwd = (cwd = getDefaultCwd()) => {
|
|
2765
3471
|
const cwdString = safeNormalizeFileUrl(cwd, 'The "cwd" option');
|
|
2766
3472
|
return import_node_path4.default.resolve(cwdString);
|
|
2767
3473
|
};
|
|
2768
3474
|
var getDefaultCwd = () => {
|
|
2769
3475
|
try {
|
|
2770
|
-
return
|
|
3476
|
+
return import_node_process9.default.cwd();
|
|
2771
3477
|
} catch (error) {
|
|
2772
3478
|
error.message = `The current directory does not exist.
|
|
2773
3479
|
${error.message}`;
|
|
@@ -2810,7 +3516,7 @@ var normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
|
2810
3516
|
options.killSignal = normalizeKillSignal(options.killSignal);
|
|
2811
3517
|
options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
|
|
2812
3518
|
options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
|
|
2813
|
-
if (
|
|
3519
|
+
if (import_node_process10.default.platform === "win32" && import_node_path5.default.basename(file, ".exe") === "cmd") {
|
|
2814
3520
|
commandArguments.unshift("/q");
|
|
2815
3521
|
}
|
|
2816
3522
|
return { file, commandArguments, options };
|
|
@@ -2851,7 +3557,7 @@ var addDefaultOptions = ({
|
|
|
2851
3557
|
serialization
|
|
2852
3558
|
});
|
|
2853
3559
|
var getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
|
|
2854
|
-
const env = extendEnv ? { ...
|
|
3560
|
+
const env = extendEnv ? { ...import_node_process10.default.env, ...envOption } : envOption;
|
|
2855
3561
|
if (preferLocal || node) {
|
|
2856
3562
|
return npmRunPathEnv({
|
|
2857
3563
|
env,
|
|
@@ -2865,7 +3571,7 @@ var getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, no
|
|
|
2865
3571
|
};
|
|
2866
3572
|
|
|
2867
3573
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/message.js
|
|
2868
|
-
var
|
|
3574
|
+
var import_node_util7 = require("util");
|
|
2869
3575
|
|
|
2870
3576
|
// ../../node_modules/.pnpm/strip-final-newline@4.0.0/node_modules/strip-final-newline/index.js
|
|
2871
3577
|
function stripFinalNewline(input) {
|
|
@@ -2910,20 +3616,20 @@ var a = Object.getPrototypeOf(
|
|
|
2910
3616
|
}
|
|
2911
3617
|
).prototype
|
|
2912
3618
|
);
|
|
2913
|
-
var
|
|
3619
|
+
var c2 = class {
|
|
2914
3620
|
#t;
|
|
2915
3621
|
#n;
|
|
2916
3622
|
#r = false;
|
|
2917
3623
|
#e = void 0;
|
|
2918
|
-
constructor(
|
|
2919
|
-
this.#t =
|
|
3624
|
+
constructor(e2, t) {
|
|
3625
|
+
this.#t = e2, this.#n = t;
|
|
2920
3626
|
}
|
|
2921
3627
|
next() {
|
|
2922
|
-
const
|
|
2923
|
-
return this.#e = this.#e ? this.#e.then(
|
|
3628
|
+
const e2 = () => this.#s();
|
|
3629
|
+
return this.#e = this.#e ? this.#e.then(e2, e2) : e2(), this.#e;
|
|
2924
3630
|
}
|
|
2925
|
-
return(
|
|
2926
|
-
const t = () => this.#i(
|
|
3631
|
+
return(e2) {
|
|
3632
|
+
const t = () => this.#i(e2);
|
|
2927
3633
|
return this.#e ? this.#e.then(t, t) : t();
|
|
2928
3634
|
}
|
|
2929
3635
|
async #s() {
|
|
@@ -2932,30 +3638,30 @@ var c = class {
|
|
|
2932
3638
|
done: true,
|
|
2933
3639
|
value: void 0
|
|
2934
3640
|
};
|
|
2935
|
-
let
|
|
3641
|
+
let e2;
|
|
2936
3642
|
try {
|
|
2937
|
-
|
|
3643
|
+
e2 = await this.#t.read();
|
|
2938
3644
|
} catch (t) {
|
|
2939
3645
|
throw this.#e = void 0, this.#r = true, this.#t.releaseLock(), t;
|
|
2940
3646
|
}
|
|
2941
|
-
return
|
|
3647
|
+
return e2.done && (this.#e = void 0, this.#r = true, this.#t.releaseLock()), e2;
|
|
2942
3648
|
}
|
|
2943
|
-
async #i(
|
|
3649
|
+
async #i(e2) {
|
|
2944
3650
|
if (this.#r)
|
|
2945
3651
|
return {
|
|
2946
3652
|
done: true,
|
|
2947
|
-
value:
|
|
3653
|
+
value: e2
|
|
2948
3654
|
};
|
|
2949
3655
|
if (this.#r = true, !this.#n) {
|
|
2950
|
-
const t = this.#t.cancel(
|
|
3656
|
+
const t = this.#t.cancel(e2);
|
|
2951
3657
|
return this.#t.releaseLock(), await t, {
|
|
2952
3658
|
done: true,
|
|
2953
|
-
value:
|
|
3659
|
+
value: e2
|
|
2954
3660
|
};
|
|
2955
3661
|
}
|
|
2956
3662
|
return this.#t.releaseLock(), {
|
|
2957
3663
|
done: true,
|
|
2958
|
-
value:
|
|
3664
|
+
value: e2
|
|
2959
3665
|
};
|
|
2960
3666
|
}
|
|
2961
3667
|
};
|
|
@@ -2964,11 +3670,11 @@ function i() {
|
|
|
2964
3670
|
return this[n].next();
|
|
2965
3671
|
}
|
|
2966
3672
|
Object.defineProperty(i, "name", { value: "next" });
|
|
2967
|
-
function
|
|
2968
|
-
return this[n].return(
|
|
3673
|
+
function o2(r2) {
|
|
3674
|
+
return this[n].return(r2);
|
|
2969
3675
|
}
|
|
2970
|
-
Object.defineProperty(
|
|
2971
|
-
var
|
|
3676
|
+
Object.defineProperty(o2, "name", { value: "return" });
|
|
3677
|
+
var u2 = Object.create(a, {
|
|
2972
3678
|
next: {
|
|
2973
3679
|
enumerable: true,
|
|
2974
3680
|
configurable: true,
|
|
@@ -2979,14 +3685,14 @@ var u = Object.create(a, {
|
|
|
2979
3685
|
enumerable: true,
|
|
2980
3686
|
configurable: true,
|
|
2981
3687
|
writable: true,
|
|
2982
|
-
value:
|
|
3688
|
+
value: o2
|
|
2983
3689
|
}
|
|
2984
3690
|
});
|
|
2985
|
-
function
|
|
2986
|
-
const
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
), s = Object.create(
|
|
3691
|
+
function h2({ preventCancel: r2 = false } = {}) {
|
|
3692
|
+
const e2 = this.getReader(), t = new c2(
|
|
3693
|
+
e2,
|
|
3694
|
+
r2
|
|
3695
|
+
), s = Object.create(u2);
|
|
2990
3696
|
return s[n] = t, s;
|
|
2991
3697
|
}
|
|
2992
3698
|
|
|
@@ -2999,7 +3705,7 @@ var getAsyncIterable = (stream) => {
|
|
|
2999
3705
|
return stream;
|
|
3000
3706
|
}
|
|
3001
3707
|
if (toString.call(stream) === "[object ReadableStream]") {
|
|
3002
|
-
return
|
|
3708
|
+
return h2.call(stream);
|
|
3003
3709
|
}
|
|
3004
3710
|
throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.");
|
|
3005
3711
|
};
|
|
@@ -3419,7 +4125,7 @@ var getOriginalMessage = (originalError, cwd) => {
|
|
|
3419
4125
|
const escapedOriginalMessage = escapeLines(fixCwdError(originalMessage, cwd));
|
|
3420
4126
|
return escapedOriginalMessage === "" ? void 0 : escapedOriginalMessage;
|
|
3421
4127
|
};
|
|
3422
|
-
var serializeIpcMessage = (ipcMessage) => typeof ipcMessage === "string" ? ipcMessage : (0,
|
|
4128
|
+
var serializeIpcMessage = (ipcMessage) => typeof ipcMessage === "string" ? ipcMessage : (0, import_node_util7.inspect)(ipcMessage);
|
|
3423
4129
|
var serializeMessagePart = (messagePart) => Array.isArray(messagePart) ? messagePart.map((messageItem) => stripFinalNewline(serializeMessageItem(messageItem))).filter(Boolean).join("\n") : serializeMessageItem(messagePart);
|
|
3424
4130
|
var serializeMessageItem = (messageItem) => {
|
|
3425
4131
|
if (typeof messageItem === "string") {
|
|
@@ -4025,7 +4731,7 @@ var normalizeGenerator = ({ stdioItem, stdioItem: { value }, index, newTransform
|
|
|
4025
4731
|
var sortTransforms = (newTransforms, direction) => direction === "input" ? newTransforms.reverse() : newTransforms;
|
|
4026
4732
|
|
|
4027
4733
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/direction.js
|
|
4028
|
-
var
|
|
4734
|
+
var import_node_process11 = __toESM(require("process"), 1);
|
|
4029
4735
|
var getStreamDirection = (stdioItems, fdNumber, optionName) => {
|
|
4030
4736
|
const directions = stdioItems.map((stdioItem) => getStdioItemDirection(stdioItem, fdNumber));
|
|
4031
4737
|
if (directions.includes("input") && directions.includes("output")) {
|
|
@@ -4065,10 +4771,10 @@ var guessStreamDirection = {
|
|
|
4065
4771
|
}
|
|
4066
4772
|
};
|
|
4067
4773
|
var getStandardStreamDirection = (value) => {
|
|
4068
|
-
if ([0,
|
|
4774
|
+
if ([0, import_node_process11.default.stdin].includes(value)) {
|
|
4069
4775
|
return "input";
|
|
4070
4776
|
}
|
|
4071
|
-
if ([1, 2,
|
|
4777
|
+
if ([1, 2, import_node_process11.default.stdout, import_node_process11.default.stderr].includes(value)) {
|
|
4072
4778
|
return "output";
|
|
4073
4779
|
}
|
|
4074
4780
|
};
|
|
@@ -4096,7 +4802,7 @@ var getStdioArray = (stdio, options) => {
|
|
|
4096
4802
|
throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``);
|
|
4097
4803
|
}
|
|
4098
4804
|
const length = Math.max(stdio.length, STANDARD_STREAMS_ALIASES.length);
|
|
4099
|
-
return Array.from({ length }, (
|
|
4805
|
+
return Array.from({ length }, (_3, fdNumber) => stdio[fdNumber]);
|
|
4100
4806
|
};
|
|
4101
4807
|
var hasAlias = (options) => STANDARD_STREAMS_ALIASES.some((alias) => options[alias] !== void 0);
|
|
4102
4808
|
var addDefaultValue2 = (stdioOption, fdNumber) => {
|
|
@@ -4113,7 +4819,7 @@ var isOutputPipeOnly = (stdioOption) => stdioOption === "pipe" || Array.isArray(
|
|
|
4113
4819
|
|
|
4114
4820
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/stdio/native.js
|
|
4115
4821
|
var import_node_fs2 = require("fs");
|
|
4116
|
-
var
|
|
4822
|
+
var import_node_tty3 = __toESM(require("tty"), 1);
|
|
4117
4823
|
var handleNativeStream = ({ stdioItem, stdioItem: { type }, isStdioArray, fdNumber, direction, isSync }) => {
|
|
4118
4824
|
if (!isStdioArray || type !== "native") {
|
|
4119
4825
|
return stdioItem;
|
|
@@ -4143,7 +4849,7 @@ var getTargetFd = ({ value, optionName, fdNumber, direction }) => {
|
|
|
4143
4849
|
if (direction === "output") {
|
|
4144
4850
|
return { type: "fileNumber", value: targetFdNumber, optionName };
|
|
4145
4851
|
}
|
|
4146
|
-
if (
|
|
4852
|
+
if (import_node_tty3.default.isatty(targetFdNumber)) {
|
|
4147
4853
|
throw new TypeError(`The \`${optionName}: ${serializeOptionValue(value)}\` option is invalid: it cannot be a TTY with synchronous methods.`);
|
|
4148
4854
|
}
|
|
4149
4855
|
return { type: "uint8Array", value: bufferToUint8Array((0, import_node_fs2.readFileSync)(targetFdNumber)), optionName };
|
|
@@ -4649,8 +5355,8 @@ var encodingStringFinal = function* (stringDecoder) {
|
|
|
4649
5355
|
};
|
|
4650
5356
|
|
|
4651
5357
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/transform/run-async.js
|
|
4652
|
-
var
|
|
4653
|
-
var pushChunks = (0,
|
|
5358
|
+
var import_node_util8 = require("util");
|
|
5359
|
+
var pushChunks = (0, import_node_util8.callbackify)(async (getChunks, state, getChunksArguments, transformStream) => {
|
|
4654
5360
|
state.currentIterable = getChunks(...getChunksArguments);
|
|
4655
5361
|
try {
|
|
4656
5362
|
for await (const chunk of state.currentIterable) {
|
|
@@ -4683,7 +5389,7 @@ var generatorFinalChunks = async function* (final, index, generators) {
|
|
|
4683
5389
|
yield* transformChunk(finalChunk, generators, index + 1);
|
|
4684
5390
|
}
|
|
4685
5391
|
};
|
|
4686
|
-
var destroyTransform = (0,
|
|
5392
|
+
var destroyTransform = (0, import_node_util8.callbackify)(async ({ currentIterable }, error) => {
|
|
4687
5393
|
if (currentIterable !== void 0) {
|
|
4688
5394
|
await (error ? currentIterable.throw(error) : currentIterable.return());
|
|
4689
5395
|
return;
|
|
@@ -5172,7 +5878,7 @@ var import_node_events14 = require("events");
|
|
|
5172
5878
|
var import_node_child_process5 = require("child_process");
|
|
5173
5879
|
|
|
5174
5880
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/methods.js
|
|
5175
|
-
var
|
|
5881
|
+
var import_node_process12 = __toESM(require("process"), 1);
|
|
5176
5882
|
|
|
5177
5883
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/ipc/get-one.js
|
|
5178
5884
|
var import_node_events8 = require("events");
|
|
@@ -5313,9 +6019,9 @@ var addIpcMethods = (subprocess, { ipc }) => {
|
|
|
5313
6019
|
Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
|
|
5314
6020
|
};
|
|
5315
6021
|
var getIpcExport = () => {
|
|
5316
|
-
const anyProcess =
|
|
6022
|
+
const anyProcess = import_node_process12.default;
|
|
5317
6023
|
const isSubprocess = true;
|
|
5318
|
-
const ipc =
|
|
6024
|
+
const ipc = import_node_process12.default.channel !== void 0;
|
|
5319
6025
|
return {
|
|
5320
6026
|
...getIpcMethods(anyProcess, isSubprocess, ipc),
|
|
5321
6027
|
getCancelSignal: getCancelSignal.bind(void 0, {
|
|
@@ -5877,9 +6583,9 @@ var SignalExit = class extends SignalExitBase {
|
|
|
5877
6583
|
this.#sigListeners[sig] = () => {
|
|
5878
6584
|
const listeners = this.#process.listeners(sig);
|
|
5879
6585
|
let { count: count2 } = this.#emitter;
|
|
5880
|
-
const
|
|
5881
|
-
if (typeof
|
|
5882
|
-
count2 +=
|
|
6586
|
+
const p = process10;
|
|
6587
|
+
if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") {
|
|
6588
|
+
count2 += p.__signal_exit_emitter__.count;
|
|
5883
6589
|
}
|
|
5884
6590
|
if (listeners.length === count2) {
|
|
5885
6591
|
this.unload();
|
|
@@ -5921,7 +6627,7 @@ var SignalExit = class extends SignalExitBase {
|
|
|
5921
6627
|
const fn = this.#sigListeners[sig];
|
|
5922
6628
|
if (fn)
|
|
5923
6629
|
this.#process.on(sig, fn);
|
|
5924
|
-
} catch (
|
|
6630
|
+
} catch (_3) {
|
|
5925
6631
|
}
|
|
5926
6632
|
}
|
|
5927
6633
|
this.#process.emit = (ev, ...a2) => {
|
|
@@ -5943,7 +6649,7 @@ var SignalExit = class extends SignalExitBase {
|
|
|
5943
6649
|
}
|
|
5944
6650
|
try {
|
|
5945
6651
|
this.#process.removeListener(sig, listener);
|
|
5946
|
-
} catch (
|
|
6652
|
+
} catch (_3) {
|
|
5947
6653
|
}
|
|
5948
6654
|
});
|
|
5949
6655
|
this.#process.emit = this.#originalProcessEmit;
|
|
@@ -6187,10 +6893,10 @@ var SOURCE_LISTENERS_PER_PIPE = 2;
|
|
|
6187
6893
|
var DESTINATION_LISTENERS_PER_PIPE = 1;
|
|
6188
6894
|
|
|
6189
6895
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/pipe/abort.js
|
|
6190
|
-
var
|
|
6896
|
+
var import_node_util9 = require("util");
|
|
6191
6897
|
var unpipeOnAbort = (unpipeSignal, unpipeContext) => unpipeSignal === void 0 ? [] : [unpipeOnSignalAbort(unpipeSignal, unpipeContext)];
|
|
6192
6898
|
var unpipeOnSignalAbort = async (unpipeSignal, { sourceStream, mergedStream, fileDescriptors, sourceOptions, startTime }) => {
|
|
6193
|
-
await (0,
|
|
6899
|
+
await (0, import_node_util9.aborted)(unpipeSignal, sourceStream);
|
|
6194
6900
|
await mergedStream.remove(sourceStream);
|
|
6195
6901
|
const error = new Error("Pipe canceled by `unpipeSignal` option.");
|
|
6196
6902
|
throw createNonCommandError({
|
|
@@ -6766,7 +7472,7 @@ var waitForConcurrentStreams = async ({ resolve, promises }, subprocess) => {
|
|
|
6766
7472
|
|
|
6767
7473
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/readable.js
|
|
6768
7474
|
var import_node_stream6 = require("stream");
|
|
6769
|
-
var
|
|
7475
|
+
var import_node_util10 = require("util");
|
|
6770
7476
|
|
|
6771
7477
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/shared.js
|
|
6772
7478
|
var import_promises11 = require("stream/promises");
|
|
@@ -6822,7 +7528,7 @@ var createReadable = ({ subprocess, concurrentStreams, encoding }, { from, binar
|
|
|
6822
7528
|
});
|
|
6823
7529
|
const readable2 = new import_node_stream6.Readable({
|
|
6824
7530
|
read,
|
|
6825
|
-
destroy: (0,
|
|
7531
|
+
destroy: (0, import_node_util10.callbackify)(onReadableDestroy.bind(void 0, { subprocessStdout, subprocess, waitReadableDestroy })),
|
|
6826
7532
|
highWaterMark: readableHighWaterMark,
|
|
6827
7533
|
objectMode: readableObjectMode,
|
|
6828
7534
|
encoding: readableEncoding
|
|
@@ -6895,12 +7601,12 @@ var destroyOtherReadable = (stream, error) => {
|
|
|
6895
7601
|
|
|
6896
7602
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/writable.js
|
|
6897
7603
|
var import_node_stream7 = require("stream");
|
|
6898
|
-
var
|
|
7604
|
+
var import_node_util11 = require("util");
|
|
6899
7605
|
var createWritable = ({ subprocess, concurrentStreams }, { to } = {}) => {
|
|
6900
7606
|
const { subprocessStdin, waitWritableFinal, waitWritableDestroy } = getSubprocessStdin(subprocess, to, concurrentStreams);
|
|
6901
7607
|
const writable2 = new import_node_stream7.Writable({
|
|
6902
7608
|
...getWritableMethods(subprocessStdin, subprocess, waitWritableFinal),
|
|
6903
|
-
destroy: (0,
|
|
7609
|
+
destroy: (0, import_node_util11.callbackify)(onWritableDestroy.bind(void 0, {
|
|
6904
7610
|
subprocessStdin,
|
|
6905
7611
|
subprocess,
|
|
6906
7612
|
waitWritableFinal,
|
|
@@ -6920,7 +7626,7 @@ var getSubprocessStdin = (subprocess, to, concurrentStreams) => {
|
|
|
6920
7626
|
};
|
|
6921
7627
|
var getWritableMethods = (subprocessStdin, subprocess, waitWritableFinal) => ({
|
|
6922
7628
|
write: onWrite.bind(void 0, subprocessStdin),
|
|
6923
|
-
final: (0,
|
|
7629
|
+
final: (0, import_node_util11.callbackify)(onWritableFinal.bind(void 0, subprocessStdin, subprocess, waitWritableFinal))
|
|
6924
7630
|
});
|
|
6925
7631
|
var onWrite = (subprocessStdin, chunk, encoding, done) => {
|
|
6926
7632
|
if (subprocessStdin.write(chunk, encoding)) {
|
|
@@ -6961,7 +7667,7 @@ var destroyOtherWritable = (stream, error) => {
|
|
|
6961
7667
|
|
|
6962
7668
|
// ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/convert/duplex.js
|
|
6963
7669
|
var import_node_stream8 = require("stream");
|
|
6964
|
-
var
|
|
7670
|
+
var import_node_util12 = require("util");
|
|
6965
7671
|
var createDuplex = ({ subprocess, concurrentStreams, encoding }, { from, to, binary: binaryOption = true, preserveNewlines = true } = {}) => {
|
|
6966
7672
|
const binary = binaryOption || BINARY_ENCODINGS.has(encoding);
|
|
6967
7673
|
const { subprocessStdout, waitReadableDestroy } = getSubprocessStdout(subprocess, from, concurrentStreams);
|
|
@@ -6977,7 +7683,7 @@ var createDuplex = ({ subprocess, concurrentStreams, encoding }, { from, to, bin
|
|
|
6977
7683
|
const duplex2 = new import_node_stream8.Duplex({
|
|
6978
7684
|
read,
|
|
6979
7685
|
...getWritableMethods(subprocessStdin, subprocess, waitWritableFinal),
|
|
6980
|
-
destroy: (0,
|
|
7686
|
+
destroy: (0, import_node_util12.callbackify)(onDuplexDestroy.bind(void 0, {
|
|
6981
7687
|
subprocessStdout,
|
|
6982
7688
|
subprocessStdin,
|
|
6983
7689
|
subprocess,
|
|
@@ -7333,7 +8039,7 @@ var execaSync = createExeca(() => ({ isSync: true }));
|
|
|
7333
8039
|
var execaCommand = createExeca(mapCommandAsync);
|
|
7334
8040
|
var execaCommandSync = createExeca(mapCommandSync);
|
|
7335
8041
|
var execaNode = createExeca(mapNode);
|
|
7336
|
-
var $ = createExeca(mapScriptAsync, {}, deepScriptOptions, setScriptSync);
|
|
8042
|
+
var $2 = createExeca(mapScriptAsync, {}, deepScriptOptions, setScriptSync);
|
|
7337
8043
|
var {
|
|
7338
8044
|
sendMessage: sendMessage2,
|
|
7339
8045
|
getOneMessage: getOneMessage2,
|
|
@@ -7411,8 +8117,8 @@ project_id = "%%projectId%%"
|
|
|
7411
8117
|
enabled = false
|
|
7412
8118
|
`;
|
|
7413
8119
|
var selectProject = async () => {
|
|
7414
|
-
const
|
|
7415
|
-
|
|
8120
|
+
const spinner = Y();
|
|
8121
|
+
spinner.start("Fetching Supabase projects...");
|
|
7416
8122
|
let projectsProcess = [];
|
|
7417
8123
|
try {
|
|
7418
8124
|
const listProjects = await execa(
|
|
@@ -7422,13 +8128,13 @@ var selectProject = async () => {
|
|
|
7422
8128
|
);
|
|
7423
8129
|
projectsProcess = listProjects.stdout === "null" ? [] : JSON.parse(listProjects?.stdout ?? "[]");
|
|
7424
8130
|
} catch (err) {
|
|
7425
|
-
|
|
8131
|
+
spinner.stop();
|
|
7426
8132
|
console.error("Failed to fetch Supabase projects:", err);
|
|
7427
8133
|
process.exit(1);
|
|
7428
8134
|
}
|
|
7429
|
-
|
|
8135
|
+
spinner.stop();
|
|
7430
8136
|
const createProjectOption = `create/${Math.random().toString(36).substring(2, 15)}`;
|
|
7431
|
-
const selectedProjectId = await
|
|
8137
|
+
const selectedProjectId = await ve({
|
|
7432
8138
|
message: "Select a Supabase project",
|
|
7433
8139
|
options: [
|
|
7434
8140
|
...projectsProcess.map((project) => ({
|
|
@@ -7441,7 +8147,7 @@ var selectProject = async () => {
|
|
|
7441
8147
|
}
|
|
7442
8148
|
]
|
|
7443
8149
|
});
|
|
7444
|
-
if (
|
|
8150
|
+
if (BD(selectedProjectId)) {
|
|
7445
8151
|
process.exit(0);
|
|
7446
8152
|
}
|
|
7447
8153
|
if (selectedProjectId === createProjectOption) {
|
|
@@ -7471,7 +8177,7 @@ var selectProject = async () => {
|
|
|
7471
8177
|
var selectBucket = async (api) => {
|
|
7472
8178
|
let buckets = [];
|
|
7473
8179
|
let retryCount = 0;
|
|
7474
|
-
await
|
|
8180
|
+
await Te([
|
|
7475
8181
|
{
|
|
7476
8182
|
title: "Fetching bucket list...",
|
|
7477
8183
|
task: async (message) => {
|
|
@@ -7489,13 +8195,13 @@ var selectBucket = async (api) => {
|
|
|
7489
8195
|
await delay(1e3);
|
|
7490
8196
|
}
|
|
7491
8197
|
}
|
|
7492
|
-
|
|
8198
|
+
f2.error("Failed to fetch bucket list");
|
|
7493
8199
|
process.exit(1);
|
|
7494
8200
|
}
|
|
7495
8201
|
}
|
|
7496
8202
|
]);
|
|
7497
8203
|
const createBucketOption = `create/${Math.random().toString(36).substring(2, 15)}`;
|
|
7498
|
-
const selectedBucketId = await
|
|
8204
|
+
const selectedBucketId = await ve({
|
|
7499
8205
|
message: "Select a storage bucket",
|
|
7500
8206
|
options: [
|
|
7501
8207
|
...buckets.map((bucket) => ({
|
|
@@ -7508,19 +8214,19 @@ var selectBucket = async (api) => {
|
|
|
7508
8214
|
}
|
|
7509
8215
|
]
|
|
7510
8216
|
});
|
|
7511
|
-
if (
|
|
8217
|
+
if (BD(selectedBucketId)) {
|
|
7512
8218
|
process.exit(0);
|
|
7513
8219
|
}
|
|
7514
8220
|
if (selectedBucketId === createBucketOption) {
|
|
7515
|
-
const bucketName = await
|
|
8221
|
+
const bucketName = await he({
|
|
7516
8222
|
message: "Enter a name for the new bucket"
|
|
7517
8223
|
});
|
|
7518
|
-
if (
|
|
8224
|
+
if (BD(bucketName)) {
|
|
7519
8225
|
process.exit(0);
|
|
7520
8226
|
}
|
|
7521
8227
|
try {
|
|
7522
8228
|
await api.createBucket(bucketName, { public: false });
|
|
7523
|
-
|
|
8229
|
+
f2.success(`Bucket "${bucketName}" created successfully.`);
|
|
7524
8230
|
const buckets2 = await api.listBuckets();
|
|
7525
8231
|
const newBucket = buckets2.find((bucket) => bucket.name === bucketName);
|
|
7526
8232
|
if (!newBucket) {
|
|
@@ -7528,15 +8234,15 @@ var selectBucket = async (api) => {
|
|
|
7528
8234
|
}
|
|
7529
8235
|
return { id: newBucket.id, name: newBucket.name };
|
|
7530
8236
|
} catch (err) {
|
|
7531
|
-
|
|
8237
|
+
f2.error(`Failed to create new bucket: ${err}`);
|
|
7532
8238
|
process.exit(1);
|
|
7533
8239
|
}
|
|
7534
8240
|
}
|
|
7535
8241
|
return JSON.parse(selectedBucketId);
|
|
7536
8242
|
};
|
|
7537
8243
|
var linkSupabase = async (workdir, projectId) => {
|
|
7538
|
-
const
|
|
7539
|
-
|
|
8244
|
+
const spinner = Y();
|
|
8245
|
+
spinner.start("Linking Supabase...");
|
|
7540
8246
|
try {
|
|
7541
8247
|
await import_promises12.default.writeFile(
|
|
7542
8248
|
import_path.default.join(workdir, "supabase", "config.toml"),
|
|
@@ -7553,11 +8259,11 @@ var linkSupabase = async (workdir, projectId) => {
|
|
|
7553
8259
|
stdio: ["pipe", "pipe", "pipe"]
|
|
7554
8260
|
}
|
|
7555
8261
|
);
|
|
7556
|
-
|
|
8262
|
+
spinner.stop("Supabase linked \u2714");
|
|
7557
8263
|
} catch (err) {
|
|
7558
|
-
|
|
8264
|
+
spinner.stop();
|
|
7559
8265
|
if (err instanceof ExecaError && err.stderr) {
|
|
7560
|
-
|
|
8266
|
+
f2.error(err.stderr);
|
|
7561
8267
|
} else {
|
|
7562
8268
|
console.error(err);
|
|
7563
8269
|
}
|
|
@@ -7575,11 +8281,11 @@ var pushDB = async (workdir) => {
|
|
|
7575
8281
|
shell: true
|
|
7576
8282
|
}
|
|
7577
8283
|
);
|
|
7578
|
-
|
|
8284
|
+
f2.success("DB pushed \u2714");
|
|
7579
8285
|
return dbPush.stdout;
|
|
7580
8286
|
} catch (err) {
|
|
7581
8287
|
if (err instanceof ExecaError && err.stderr) {
|
|
7582
|
-
|
|
8288
|
+
f2.error(err.stderr);
|
|
7583
8289
|
} else {
|
|
7584
8290
|
console.error(err);
|
|
7585
8291
|
}
|
|
@@ -7587,7 +8293,7 @@ var pushDB = async (workdir) => {
|
|
|
7587
8293
|
}
|
|
7588
8294
|
};
|
|
7589
8295
|
var deployEdgeFunction = async (workdir, projectId) => {
|
|
7590
|
-
await
|
|
8296
|
+
await Te([
|
|
7591
8297
|
{
|
|
7592
8298
|
title: "Supabase edge function deploy. This may take a few minutes.",
|
|
7593
8299
|
task: async () => {
|
|
@@ -7610,7 +8316,7 @@ var deployEdgeFunction = async (workdir, projectId) => {
|
|
|
7610
8316
|
return dbPush.stdout;
|
|
7611
8317
|
} catch (err) {
|
|
7612
8318
|
if (err instanceof ExecaError && err.stderr) {
|
|
7613
|
-
|
|
8319
|
+
f2.error(err.stderr);
|
|
7614
8320
|
} else {
|
|
7615
8321
|
console.error(err);
|
|
7616
8322
|
}
|
|
@@ -7622,8 +8328,8 @@ var deployEdgeFunction = async (workdir, projectId) => {
|
|
|
7622
8328
|
};
|
|
7623
8329
|
var runInit = async () => {
|
|
7624
8330
|
const project = await selectProject();
|
|
7625
|
-
const
|
|
7626
|
-
|
|
8331
|
+
const spinner = Y();
|
|
8332
|
+
spinner.start(`Getting API keys for ${project.name}...`);
|
|
7627
8333
|
let apiKeys = [];
|
|
7628
8334
|
try {
|
|
7629
8335
|
const keysProcess = await execa("npx", [
|
|
@@ -7638,11 +8344,11 @@ var runInit = async () => {
|
|
|
7638
8344
|
]);
|
|
7639
8345
|
apiKeys = JSON.parse(keysProcess.stdout ?? "[]");
|
|
7640
8346
|
} catch (err) {
|
|
7641
|
-
|
|
8347
|
+
spinner.stop();
|
|
7642
8348
|
console.error("Failed to get API keys:", err);
|
|
7643
8349
|
process.exit(1);
|
|
7644
8350
|
}
|
|
7645
|
-
|
|
8351
|
+
spinner.stop();
|
|
7646
8352
|
const serviceRoleKey = apiKeys.find((key) => key.name === "service_role");
|
|
7647
8353
|
if (!serviceRoleKey) {
|
|
7648
8354
|
throw new Error("Service role key not found");
|
|
@@ -7680,21 +8386,21 @@ var runInit = async () => {
|
|
|
7680
8386
|
HOT_UPDATER_SUPABASE_BUCKET_NAME: bucket.name,
|
|
7681
8387
|
HOT_UPDATER_SUPABASE_URL: `https://${project.id}.supabase.co`
|
|
7682
8388
|
});
|
|
7683
|
-
|
|
7684
|
-
|
|
8389
|
+
f2.success("Generated '.env' file with Supabase settings.");
|
|
8390
|
+
f2.success(
|
|
7685
8391
|
"Generated 'hot-updater.config.ts' file with Supabase settings."
|
|
7686
8392
|
);
|
|
7687
|
-
|
|
8393
|
+
Me(
|
|
7688
8394
|
(0, import_plugin_core.transformTemplate)(SOURCE_TEMPLATE, {
|
|
7689
8395
|
source: `https://${project.id}.supabase.co/functions/v1/update-server`
|
|
7690
8396
|
})
|
|
7691
8397
|
);
|
|
7692
|
-
|
|
8398
|
+
f2.message(
|
|
7693
8399
|
`Next step: ${(0, import_plugin_core.link)(
|
|
7694
8400
|
"https://gronxb.github.io/hot-updater/guide/getting-started/quick-start-with-supabase.html#step-4-add-hotupdater-to-your-project"
|
|
7695
8401
|
)}`
|
|
7696
8402
|
);
|
|
7697
|
-
|
|
8403
|
+
f2.success("Done! \u{1F389}");
|
|
7698
8404
|
};
|
|
7699
8405
|
// Annotate the CommonJS export names for ESM import in node:
|
|
7700
8406
|
0 && (module.exports = {
|