@wix/cli 1.1.56 → 1.1.58
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/build/{DevCommand-UW724BPF.js → DevCommand-32POU3TX.js} +13 -14
- package/build/{DevCommand-UW724BPF.js.map → DevCommand-32POU3TX.js.map} +1 -1
- package/build/{DevCommand-KMBUXAPT.js → DevCommand-WT3DJON6.js} +76 -68
- package/build/DevCommand-WT3DJON6.js.map +1 -0
- package/build/{LoginCommand-O4FKLPWK.js → LoginCommand-WRCKEWCE.js} +11 -11
- package/build/{LogoutCommand-KMWHOQSC.js → LogoutCommand-BYWH527O.js} +7 -7
- package/build/{WhoamiCommand-VV6U2M2K.js → WhoamiCommand-WKXZCRSJ.js} +4 -4
- package/build/{chunk-VO6LL5ZT.js → chunk-24HYCAK2.js} +2 -2
- package/build/{chunk-GOTVWNXA.js → chunk-3KIPOGXI.js} +4 -4
- package/build/{chunk-7M5ZGODY.js → chunk-3R4OZ46Z.js} +2 -2
- package/build/{chunk-3TWSKTSG.js → chunk-4S2ZMDZM.js} +6 -6
- package/build/{chunk-NEB7POM3.js → chunk-53UCEZFU.js} +2 -1
- package/build/chunk-53UCEZFU.js.map +1 -0
- package/build/{chunk-3UYDT5ZT.js → chunk-5EXKEGN6.js} +399 -80
- package/build/chunk-5EXKEGN6.js.map +1 -0
- package/build/{chunk-ZS2473DH.js → chunk-6F2RSXHN.js} +9 -314
- package/build/chunk-6F2RSXHN.js.map +1 -0
- package/build/{chunk-5LKWJCKW.js → chunk-BQ6AW6QJ.js} +5 -5
- package/build/{chunk-GH2E2TEQ.js → chunk-CQHI53JJ.js} +54 -7
- package/build/chunk-CQHI53JJ.js.map +1 -0
- package/build/chunk-IFQQVSBK.js +916 -0
- package/build/chunk-IFQQVSBK.js.map +1 -0
- package/build/{chunk-66PG2F54.js → chunk-IRR7PD4K.js} +3 -3
- package/build/{chunk-GXCSUYZU.js → chunk-JMUOY2KY.js} +3 -4
- package/build/chunk-JMUOY2KY.js.map +1 -0
- package/build/{chunk-CPDU7PKL.js → chunk-KLWKSELB.js} +5 -5
- package/build/{chunk-ZPPKJBJT.js → chunk-KOCJZPLK.js} +2 -2
- package/build/{chunk-7IO7SVY6.js → chunk-KT54TL6D.js} +5 -5
- package/build/{chunk-5EDABLPV.js → chunk-LC2NSYSB.js} +12 -17
- package/build/chunk-LC2NSYSB.js.map +1 -0
- package/build/{chunk-M4NGCYAG.js → chunk-LOJ4G3VD.js} +2 -2
- package/build/{chunk-DJCIQS36.js → chunk-MPSJ2YGQ.js} +3 -3
- package/build/{chunk-DYIK4YH5.js → chunk-NK4U57KS.js} +4 -4
- package/build/{chunk-5PNAZQGU.js → chunk-OIH7DI4E.js} +30 -42
- package/build/{chunk-5PNAZQGU.js.map → chunk-OIH7DI4E.js.map} +1 -1
- package/build/{chunk-GPZPN63O.js → chunk-Q5WMVJRK.js} +2 -2
- package/build/{chunk-XKFU2BID.js → chunk-RJBLVNKS.js} +6 -6
- package/build/{chunk-7DJVGV7H.js → chunk-UQXJQCG3.js} +2 -2
- package/build/{chunk-7LHODQ3J.js → chunk-WRMFR7CU.js} +6 -6
- package/build/{chunk-VDSGAA3D.js → chunk-WYEQRRT2.js} +24 -3
- package/build/chunk-WYEQRRT2.js.map +1 -0
- package/build/{chunk-JH6KT73W.js → chunk-WZEZZAE4.js} +5 -5
- package/build/{chunk-AMEYK6DR.js → chunk-X7GWN4JO.js} +2 -2
- package/build/{chunk-VEDYEGSD.js → chunk-ZOWPPCOU.js} +3 -3
- package/build/{dev-SOVLJFOU.js → dev-M7P6GT7S.js} +24 -86
- package/build/dev-M7P6GT7S.js.map +1 -0
- package/build/index.js +376 -27
- package/build/index.js.map +1 -1
- package/build/{install-YBL67KU7.js → install-SX7OQQGW.js} +17 -19
- package/build/{install-YBL67KU7.js.map → install-SX7OQQGW.js.map} +1 -1
- package/build/{preview-H3FKN7RS.js → preview-7WGCS2DK.js} +18 -20
- package/build/{preview-H3FKN7RS.js.map → preview-7WGCS2DK.js.map} +1 -1
- package/build/{publish-3Q3XWGUY.js → publish-U7Y5KNMR.js} +18 -20
- package/build/{publish-3Q3XWGUY.js.map → publish-U7Y5KNMR.js.map} +1 -1
- package/build/{render-command-3PQMENAU.js → render-command-6GZ7MNO5.js} +11 -11
- package/build/{render-command-BCSOTFBB.js → render-command-P4B7B4WB.js} +11 -11
- package/build/{render-command-GEZFKQLP.js → render-command-TJTVTOHT.js} +10 -10
- package/build/{run-command-YNCZR65O.js → run-command-ZLQ3PKCS.js} +8 -8
- package/build/{src-DMDBLATB.js → src-BMV74WCO.js} +3 -5
- package/build/{src-QC4COOON.js → src-I6QIZSAX.js} +6 -6
- package/build/{src-MLQVMO4G.js → src-JGFI4IQH.js} +17 -17
- package/build/{src-QML4K6HI.js → src-Q3X5WF65.js} +5 -5
- package/build/{src-NRGIGSNZ.js → src-WBDWTVY2.js} +7 -7
- package/build/{src-ZB5ULVF6.js → src-WKNIYADZ.js} +6 -6
- package/build/{sync-types-2Z3FKMXE.js → sync-types-6XPVFG3C.js} +13 -14
- package/build/{uninstall-PUGTRDQA.js → uninstall-L6JBTJHG.js} +16 -18
- package/build/{uninstall-PUGTRDQA.js.map → uninstall-L6JBTJHG.js.map} +1 -1
- package/package.json +2 -3
- package/build/DevCommand-KMBUXAPT.js.map +0 -1
- package/build/chunk-3UYDT5ZT.js.map +0 -1
- package/build/chunk-5EDABLPV.js.map +0 -1
- package/build/chunk-7AAFANVT.js +0 -3525
- package/build/chunk-7AAFANVT.js.map +0 -1
- package/build/chunk-CVEC37T5.js +0 -62
- package/build/chunk-CVEC37T5.js.map +0 -1
- package/build/chunk-GH2E2TEQ.js.map +0 -1
- package/build/chunk-GXCSUYZU.js.map +0 -1
- package/build/chunk-NEB7POM3.js.map +0 -1
- package/build/chunk-QLGRZABP.js +0 -363
- package/build/chunk-QLGRZABP.js.map +0 -1
- package/build/chunk-VDSGAA3D.js.map +0 -1
- package/build/chunk-ZS2473DH.js.map +0 -1
- package/build/dev-SOVLJFOU.js.map +0 -1
- /package/build/{LoginCommand-O4FKLPWK.js.map → LoginCommand-WRCKEWCE.js.map} +0 -0
- /package/build/{LogoutCommand-KMWHOQSC.js.map → LogoutCommand-BYWH527O.js.map} +0 -0
- /package/build/{WhoamiCommand-VV6U2M2K.js.map → WhoamiCommand-WKXZCRSJ.js.map} +0 -0
- /package/build/{chunk-VO6LL5ZT.js.map → chunk-24HYCAK2.js.map} +0 -0
- /package/build/{chunk-GOTVWNXA.js.map → chunk-3KIPOGXI.js.map} +0 -0
- /package/build/{chunk-7M5ZGODY.js.map → chunk-3R4OZ46Z.js.map} +0 -0
- /package/build/{chunk-3TWSKTSG.js.map → chunk-4S2ZMDZM.js.map} +0 -0
- /package/build/{chunk-5LKWJCKW.js.map → chunk-BQ6AW6QJ.js.map} +0 -0
- /package/build/{chunk-66PG2F54.js.map → chunk-IRR7PD4K.js.map} +0 -0
- /package/build/{chunk-CPDU7PKL.js.map → chunk-KLWKSELB.js.map} +0 -0
- /package/build/{chunk-ZPPKJBJT.js.map → chunk-KOCJZPLK.js.map} +0 -0
- /package/build/{chunk-7IO7SVY6.js.map → chunk-KT54TL6D.js.map} +0 -0
- /package/build/{chunk-M4NGCYAG.js.map → chunk-LOJ4G3VD.js.map} +0 -0
- /package/build/{chunk-DJCIQS36.js.map → chunk-MPSJ2YGQ.js.map} +0 -0
- /package/build/{chunk-DYIK4YH5.js.map → chunk-NK4U57KS.js.map} +0 -0
- /package/build/{chunk-GPZPN63O.js.map → chunk-Q5WMVJRK.js.map} +0 -0
- /package/build/{chunk-XKFU2BID.js.map → chunk-RJBLVNKS.js.map} +0 -0
- /package/build/{chunk-7DJVGV7H.js.map → chunk-UQXJQCG3.js.map} +0 -0
- /package/build/{chunk-7LHODQ3J.js.map → chunk-WRMFR7CU.js.map} +0 -0
- /package/build/{chunk-JH6KT73W.js.map → chunk-WZEZZAE4.js.map} +0 -0
- /package/build/{chunk-AMEYK6DR.js.map → chunk-X7GWN4JO.js.map} +0 -0
- /package/build/{chunk-VEDYEGSD.js.map → chunk-ZOWPPCOU.js.map} +0 -0
- /package/build/{render-command-3PQMENAU.js.map → render-command-6GZ7MNO5.js.map} +0 -0
- /package/build/{render-command-BCSOTFBB.js.map → render-command-P4B7B4WB.js.map} +0 -0
- /package/build/{render-command-GEZFKQLP.js.map → render-command-TJTVTOHT.js.map} +0 -0
- /package/build/{run-command-YNCZR65O.js.map → run-command-ZLQ3PKCS.js.map} +0 -0
- /package/build/{src-DMDBLATB.js.map → src-BMV74WCO.js.map} +0 -0
- /package/build/{src-QC4COOON.js.map → src-I6QIZSAX.js.map} +0 -0
- /package/build/{src-MLQVMO4G.js.map → src-JGFI4IQH.js.map} +0 -0
- /package/build/{src-NRGIGSNZ.js.map → src-Q3X5WF65.js.map} +0 -0
- /package/build/{src-QML4K6HI.js.map → src-WBDWTVY2.js.map} +0 -0
- /package/build/{src-ZB5ULVF6.js.map → src-WKNIYADZ.js.map} +0 -0
- /package/build/{sync-types-2Z3FKMXE.js.map → sync-types-6XPVFG3C.js.map} +0 -0
|
@@ -0,0 +1,916 @@
|
|
|
1
|
+
import { createRequire as _createRequire } from 'node:module';
|
|
2
|
+
const require = _createRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
isUnicodeSupported,
|
|
5
|
+
require_cli_spinners,
|
|
6
|
+
source_default,
|
|
7
|
+
stripAnsi
|
|
8
|
+
} from "./chunk-6F2RSXHN.js";
|
|
9
|
+
import {
|
|
10
|
+
__toESM,
|
|
11
|
+
init_esm_shims
|
|
12
|
+
} from "./chunk-PYIAC2GK.js";
|
|
13
|
+
|
|
14
|
+
// ../cli-logger/src/index.ts
|
|
15
|
+
init_esm_shims();
|
|
16
|
+
|
|
17
|
+
// ../cli-logger/src/create-logger.ts
|
|
18
|
+
init_esm_shims();
|
|
19
|
+
import { stdout } from "node:process";
|
|
20
|
+
|
|
21
|
+
// ../../node_modules/ora/index.js
|
|
22
|
+
init_esm_shims();
|
|
23
|
+
import process7 from "node:process";
|
|
24
|
+
|
|
25
|
+
// ../../node_modules/cli-cursor/index.js
|
|
26
|
+
init_esm_shims();
|
|
27
|
+
import process4 from "node:process";
|
|
28
|
+
|
|
29
|
+
// ../../node_modules/restore-cursor/index.js
|
|
30
|
+
init_esm_shims();
|
|
31
|
+
import process3 from "node:process";
|
|
32
|
+
|
|
33
|
+
// ../../node_modules/restore-cursor/node_modules/onetime/index.js
|
|
34
|
+
init_esm_shims();
|
|
35
|
+
|
|
36
|
+
// ../../node_modules/mimic-function/index.js
|
|
37
|
+
init_esm_shims();
|
|
38
|
+
var copyProperty = (to, from, property, ignoreNonConfigurable) => {
|
|
39
|
+
if (property === "length" || property === "prototype") {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
if (property === "arguments" || property === "caller") {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const toDescriptor = Object.getOwnPropertyDescriptor(to, property);
|
|
46
|
+
const fromDescriptor = Object.getOwnPropertyDescriptor(from, property);
|
|
47
|
+
if (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
Object.defineProperty(to, property, fromDescriptor);
|
|
51
|
+
};
|
|
52
|
+
var canCopyProperty = function(toDescriptor, fromDescriptor) {
|
|
53
|
+
return toDescriptor === void 0 || toDescriptor.configurable || toDescriptor.writable === fromDescriptor.writable && toDescriptor.enumerable === fromDescriptor.enumerable && toDescriptor.configurable === fromDescriptor.configurable && (toDescriptor.writable || toDescriptor.value === fromDescriptor.value);
|
|
54
|
+
};
|
|
55
|
+
var changePrototype = (to, from) => {
|
|
56
|
+
const fromPrototype = Object.getPrototypeOf(from);
|
|
57
|
+
if (fromPrototype === Object.getPrototypeOf(to)) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
Object.setPrototypeOf(to, fromPrototype);
|
|
61
|
+
};
|
|
62
|
+
var wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/
|
|
63
|
+
${fromBody}`;
|
|
64
|
+
var toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, "toString");
|
|
65
|
+
var toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, "name");
|
|
66
|
+
var changeToString = (to, from, name) => {
|
|
67
|
+
const withName = name === "" ? "" : `with ${name.trim()}() `;
|
|
68
|
+
const newToString = wrappedToString.bind(null, withName, from.toString());
|
|
69
|
+
Object.defineProperty(newToString, "name", toStringName);
|
|
70
|
+
const { writable, enumerable, configurable } = toStringDescriptor;
|
|
71
|
+
Object.defineProperty(to, "toString", { value: newToString, writable, enumerable, configurable });
|
|
72
|
+
};
|
|
73
|
+
function mimicFunction(to, from, { ignoreNonConfigurable = false } = {}) {
|
|
74
|
+
const { name } = to;
|
|
75
|
+
for (const property of Reflect.ownKeys(from)) {
|
|
76
|
+
copyProperty(to, from, property, ignoreNonConfigurable);
|
|
77
|
+
}
|
|
78
|
+
changePrototype(to, from);
|
|
79
|
+
changeToString(to, from, name);
|
|
80
|
+
return to;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// ../../node_modules/restore-cursor/node_modules/onetime/index.js
|
|
84
|
+
var calledFunctions = /* @__PURE__ */ new WeakMap();
|
|
85
|
+
var onetime = (function_, options = {}) => {
|
|
86
|
+
if (typeof function_ !== "function") {
|
|
87
|
+
throw new TypeError("Expected a function");
|
|
88
|
+
}
|
|
89
|
+
let returnValue;
|
|
90
|
+
let callCount = 0;
|
|
91
|
+
const functionName = function_.displayName || function_.name || "<anonymous>";
|
|
92
|
+
const onetime2 = function(...arguments_) {
|
|
93
|
+
calledFunctions.set(onetime2, ++callCount);
|
|
94
|
+
if (callCount === 1) {
|
|
95
|
+
returnValue = function_.apply(this, arguments_);
|
|
96
|
+
function_ = void 0;
|
|
97
|
+
} else if (options.throw === true) {
|
|
98
|
+
throw new Error(`Function \`${functionName}\` can only be called once`);
|
|
99
|
+
}
|
|
100
|
+
return returnValue;
|
|
101
|
+
};
|
|
102
|
+
mimicFunction(onetime2, function_);
|
|
103
|
+
calledFunctions.set(onetime2, callCount);
|
|
104
|
+
return onetime2;
|
|
105
|
+
};
|
|
106
|
+
onetime.callCount = (function_) => {
|
|
107
|
+
if (!calledFunctions.has(function_)) {
|
|
108
|
+
throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`);
|
|
109
|
+
}
|
|
110
|
+
return calledFunctions.get(function_);
|
|
111
|
+
};
|
|
112
|
+
var onetime_default = onetime;
|
|
113
|
+
|
|
114
|
+
// ../../node_modules/restore-cursor/node_modules/signal-exit/dist/mjs/index.js
|
|
115
|
+
init_esm_shims();
|
|
116
|
+
|
|
117
|
+
// ../../node_modules/restore-cursor/node_modules/signal-exit/dist/mjs/signals.js
|
|
118
|
+
init_esm_shims();
|
|
119
|
+
var signals = [];
|
|
120
|
+
signals.push("SIGHUP", "SIGINT", "SIGTERM");
|
|
121
|
+
if (process.platform !== "win32") {
|
|
122
|
+
signals.push(
|
|
123
|
+
"SIGALRM",
|
|
124
|
+
"SIGABRT",
|
|
125
|
+
"SIGVTALRM",
|
|
126
|
+
"SIGXCPU",
|
|
127
|
+
"SIGXFSZ",
|
|
128
|
+
"SIGUSR2",
|
|
129
|
+
"SIGTRAP",
|
|
130
|
+
"SIGSYS",
|
|
131
|
+
"SIGQUIT",
|
|
132
|
+
"SIGIOT"
|
|
133
|
+
// should detect profiler and enable/disable accordingly.
|
|
134
|
+
// see #21
|
|
135
|
+
// 'SIGPROF'
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
if (process.platform === "linux") {
|
|
139
|
+
signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// ../../node_modules/restore-cursor/node_modules/signal-exit/dist/mjs/index.js
|
|
143
|
+
var processOk = (process8) => !!process8 && typeof process8 === "object" && typeof process8.removeListener === "function" && typeof process8.emit === "function" && typeof process8.reallyExit === "function" && typeof process8.listeners === "function" && typeof process8.kill === "function" && typeof process8.pid === "number" && typeof process8.on === "function";
|
|
144
|
+
var kExitEmitter = Symbol.for("signal-exit emitter");
|
|
145
|
+
var global = globalThis;
|
|
146
|
+
var ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
147
|
+
var Emitter = class {
|
|
148
|
+
emitted = {
|
|
149
|
+
afterExit: false,
|
|
150
|
+
exit: false
|
|
151
|
+
};
|
|
152
|
+
listeners = {
|
|
153
|
+
afterExit: [],
|
|
154
|
+
exit: []
|
|
155
|
+
};
|
|
156
|
+
count = 0;
|
|
157
|
+
id = Math.random();
|
|
158
|
+
constructor() {
|
|
159
|
+
if (global[kExitEmitter]) {
|
|
160
|
+
return global[kExitEmitter];
|
|
161
|
+
}
|
|
162
|
+
ObjectDefineProperty(global, kExitEmitter, {
|
|
163
|
+
value: this,
|
|
164
|
+
writable: false,
|
|
165
|
+
enumerable: false,
|
|
166
|
+
configurable: false
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
on(ev, fn) {
|
|
170
|
+
this.listeners[ev].push(fn);
|
|
171
|
+
}
|
|
172
|
+
removeListener(ev, fn) {
|
|
173
|
+
const list = this.listeners[ev];
|
|
174
|
+
const i = list.indexOf(fn);
|
|
175
|
+
if (i === -1) {
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
if (i === 0 && list.length === 1) {
|
|
179
|
+
list.length = 0;
|
|
180
|
+
} else {
|
|
181
|
+
list.splice(i, 1);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
emit(ev, code, signal) {
|
|
185
|
+
if (this.emitted[ev]) {
|
|
186
|
+
return false;
|
|
187
|
+
}
|
|
188
|
+
this.emitted[ev] = true;
|
|
189
|
+
let ret = false;
|
|
190
|
+
for (const fn of this.listeners[ev]) {
|
|
191
|
+
ret = fn(code, signal) === true || ret;
|
|
192
|
+
}
|
|
193
|
+
if (ev === "exit") {
|
|
194
|
+
ret = this.emit("afterExit", code, signal) || ret;
|
|
195
|
+
}
|
|
196
|
+
return ret;
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
var SignalExitBase = class {
|
|
200
|
+
};
|
|
201
|
+
var signalExitWrap = (handler) => {
|
|
202
|
+
return {
|
|
203
|
+
onExit(cb, opts) {
|
|
204
|
+
return handler.onExit(cb, opts);
|
|
205
|
+
},
|
|
206
|
+
load() {
|
|
207
|
+
return handler.load();
|
|
208
|
+
},
|
|
209
|
+
unload() {
|
|
210
|
+
return handler.unload();
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
var SignalExitFallback = class extends SignalExitBase {
|
|
215
|
+
onExit() {
|
|
216
|
+
return () => {
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
load() {
|
|
220
|
+
}
|
|
221
|
+
unload() {
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
var SignalExit = class extends SignalExitBase {
|
|
225
|
+
// "SIGHUP" throws an `ENOSYS` error on Windows,
|
|
226
|
+
// so use a supported signal instead
|
|
227
|
+
/* c8 ignore start */
|
|
228
|
+
#hupSig = process2.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
229
|
+
/* c8 ignore stop */
|
|
230
|
+
#emitter = new Emitter();
|
|
231
|
+
#process;
|
|
232
|
+
#originalProcessEmit;
|
|
233
|
+
#originalProcessReallyExit;
|
|
234
|
+
#sigListeners = {};
|
|
235
|
+
#loaded = false;
|
|
236
|
+
constructor(process8) {
|
|
237
|
+
super();
|
|
238
|
+
this.#process = process8;
|
|
239
|
+
this.#sigListeners = {};
|
|
240
|
+
for (const sig of signals) {
|
|
241
|
+
this.#sigListeners[sig] = () => {
|
|
242
|
+
const listeners = this.#process.listeners(sig);
|
|
243
|
+
let { count } = this.#emitter;
|
|
244
|
+
const p = process8;
|
|
245
|
+
if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") {
|
|
246
|
+
count += p.__signal_exit_emitter__.count;
|
|
247
|
+
}
|
|
248
|
+
if (listeners.length === count) {
|
|
249
|
+
this.unload();
|
|
250
|
+
const ret = this.#emitter.emit("exit", null, sig);
|
|
251
|
+
const s = sig === "SIGHUP" ? this.#hupSig : sig;
|
|
252
|
+
if (!ret)
|
|
253
|
+
process8.kill(process8.pid, s);
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
this.#originalProcessReallyExit = process8.reallyExit;
|
|
258
|
+
this.#originalProcessEmit = process8.emit;
|
|
259
|
+
}
|
|
260
|
+
onExit(cb, opts) {
|
|
261
|
+
if (!processOk(this.#process)) {
|
|
262
|
+
return () => {
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
if (this.#loaded === false) {
|
|
266
|
+
this.load();
|
|
267
|
+
}
|
|
268
|
+
const ev = opts?.alwaysLast ? "afterExit" : "exit";
|
|
269
|
+
this.#emitter.on(ev, cb);
|
|
270
|
+
return () => {
|
|
271
|
+
this.#emitter.removeListener(ev, cb);
|
|
272
|
+
if (this.#emitter.listeners["exit"].length === 0 && this.#emitter.listeners["afterExit"].length === 0) {
|
|
273
|
+
this.unload();
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
load() {
|
|
278
|
+
if (this.#loaded) {
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
this.#loaded = true;
|
|
282
|
+
this.#emitter.count += 1;
|
|
283
|
+
for (const sig of signals) {
|
|
284
|
+
try {
|
|
285
|
+
const fn = this.#sigListeners[sig];
|
|
286
|
+
if (fn)
|
|
287
|
+
this.#process.on(sig, fn);
|
|
288
|
+
} catch (_) {
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
this.#process.emit = (ev, ...a) => {
|
|
292
|
+
return this.#processEmit(ev, ...a);
|
|
293
|
+
};
|
|
294
|
+
this.#process.reallyExit = (code) => {
|
|
295
|
+
return this.#processReallyExit(code);
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
unload() {
|
|
299
|
+
if (!this.#loaded) {
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
this.#loaded = false;
|
|
303
|
+
signals.forEach((sig) => {
|
|
304
|
+
const listener = this.#sigListeners[sig];
|
|
305
|
+
if (!listener) {
|
|
306
|
+
throw new Error("Listener not defined for signal: " + sig);
|
|
307
|
+
}
|
|
308
|
+
try {
|
|
309
|
+
this.#process.removeListener(sig, listener);
|
|
310
|
+
} catch (_) {
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
this.#process.emit = this.#originalProcessEmit;
|
|
314
|
+
this.#process.reallyExit = this.#originalProcessReallyExit;
|
|
315
|
+
this.#emitter.count -= 1;
|
|
316
|
+
}
|
|
317
|
+
#processReallyExit(code) {
|
|
318
|
+
if (!processOk(this.#process)) {
|
|
319
|
+
return 0;
|
|
320
|
+
}
|
|
321
|
+
this.#process.exitCode = code || 0;
|
|
322
|
+
this.#emitter.emit("exit", this.#process.exitCode, null);
|
|
323
|
+
return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
|
|
324
|
+
}
|
|
325
|
+
#processEmit(ev, ...args) {
|
|
326
|
+
const og = this.#originalProcessEmit;
|
|
327
|
+
if (ev === "exit" && processOk(this.#process)) {
|
|
328
|
+
if (typeof args[0] === "number") {
|
|
329
|
+
this.#process.exitCode = args[0];
|
|
330
|
+
}
|
|
331
|
+
const ret = og.call(this.#process, ev, ...args);
|
|
332
|
+
this.#emitter.emit("exit", this.#process.exitCode, null);
|
|
333
|
+
return ret;
|
|
334
|
+
} else {
|
|
335
|
+
return og.call(this.#process, ev, ...args);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
};
|
|
339
|
+
var process2 = globalThis.process;
|
|
340
|
+
var {
|
|
341
|
+
/**
|
|
342
|
+
* Called when the process is exiting, whether via signal, explicit
|
|
343
|
+
* exit, or running out of stuff to do.
|
|
344
|
+
*
|
|
345
|
+
* If the global process object is not suitable for instrumentation,
|
|
346
|
+
* then this will be a no-op.
|
|
347
|
+
*
|
|
348
|
+
* Returns a function that may be used to unload signal-exit.
|
|
349
|
+
*/
|
|
350
|
+
onExit,
|
|
351
|
+
/**
|
|
352
|
+
* Load the listeners. Likely you never need to call this, unless
|
|
353
|
+
* doing a rather deep integration with signal-exit functionality.
|
|
354
|
+
* Mostly exposed for the benefit of testing.
|
|
355
|
+
*
|
|
356
|
+
* @internal
|
|
357
|
+
*/
|
|
358
|
+
load,
|
|
359
|
+
/**
|
|
360
|
+
* Unload the listeners. Likely you never need to call this, unless
|
|
361
|
+
* doing a rather deep integration with signal-exit functionality.
|
|
362
|
+
* Mostly exposed for the benefit of testing.
|
|
363
|
+
*
|
|
364
|
+
* @internal
|
|
365
|
+
*/
|
|
366
|
+
unload
|
|
367
|
+
} = signalExitWrap(processOk(process2) ? new SignalExit(process2) : new SignalExitFallback());
|
|
368
|
+
|
|
369
|
+
// ../../node_modules/restore-cursor/index.js
|
|
370
|
+
var terminal = process3.stderr.isTTY ? process3.stderr : process3.stdout.isTTY ? process3.stdout : void 0;
|
|
371
|
+
var restoreCursor = terminal ? onetime_default(() => {
|
|
372
|
+
onExit(() => {
|
|
373
|
+
terminal.write("\x1B[?25h");
|
|
374
|
+
}, { alwaysLast: true });
|
|
375
|
+
}) : () => {
|
|
376
|
+
};
|
|
377
|
+
var restore_cursor_default = restoreCursor;
|
|
378
|
+
|
|
379
|
+
// ../../node_modules/cli-cursor/index.js
|
|
380
|
+
var isHidden = false;
|
|
381
|
+
var cliCursor = {};
|
|
382
|
+
cliCursor.show = (writableStream = process4.stderr) => {
|
|
383
|
+
if (!writableStream.isTTY) {
|
|
384
|
+
return;
|
|
385
|
+
}
|
|
386
|
+
isHidden = false;
|
|
387
|
+
writableStream.write("\x1B[?25h");
|
|
388
|
+
};
|
|
389
|
+
cliCursor.hide = (writableStream = process4.stderr) => {
|
|
390
|
+
if (!writableStream.isTTY) {
|
|
391
|
+
return;
|
|
392
|
+
}
|
|
393
|
+
restore_cursor_default();
|
|
394
|
+
isHidden = true;
|
|
395
|
+
writableStream.write("\x1B[?25l");
|
|
396
|
+
};
|
|
397
|
+
cliCursor.toggle = (force, writableStream) => {
|
|
398
|
+
if (force !== void 0) {
|
|
399
|
+
isHidden = force;
|
|
400
|
+
}
|
|
401
|
+
if (isHidden) {
|
|
402
|
+
cliCursor.show(writableStream);
|
|
403
|
+
} else {
|
|
404
|
+
cliCursor.hide(writableStream);
|
|
405
|
+
}
|
|
406
|
+
};
|
|
407
|
+
var cli_cursor_default = cliCursor;
|
|
408
|
+
|
|
409
|
+
// ../../node_modules/ora/index.js
|
|
410
|
+
var import_cli_spinners = __toESM(require_cli_spinners(), 1);
|
|
411
|
+
|
|
412
|
+
// ../../node_modules/log-symbols/index.js
|
|
413
|
+
init_esm_shims();
|
|
414
|
+
var main = {
|
|
415
|
+
info: source_default.blue("\u2139"),
|
|
416
|
+
success: source_default.green("\u2714"),
|
|
417
|
+
warning: source_default.yellow("\u26A0"),
|
|
418
|
+
error: source_default.red("\u2716")
|
|
419
|
+
};
|
|
420
|
+
var fallback = {
|
|
421
|
+
info: source_default.blue("i"),
|
|
422
|
+
success: source_default.green("\u221A"),
|
|
423
|
+
warning: source_default.yellow("\u203C"),
|
|
424
|
+
error: source_default.red("\xD7")
|
|
425
|
+
};
|
|
426
|
+
var logSymbols = isUnicodeSupported() ? main : fallback;
|
|
427
|
+
var log_symbols_default = logSymbols;
|
|
428
|
+
|
|
429
|
+
// ../../node_modules/ora/node_modules/string-width/index.js
|
|
430
|
+
init_esm_shims();
|
|
431
|
+
|
|
432
|
+
// ../../node_modules/get-east-asian-width/index.js
|
|
433
|
+
init_esm_shims();
|
|
434
|
+
|
|
435
|
+
// ../../node_modules/get-east-asian-width/lookup.js
|
|
436
|
+
init_esm_shims();
|
|
437
|
+
function isAmbiguous(x) {
|
|
438
|
+
return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
|
|
439
|
+
}
|
|
440
|
+
function isFullWidth(x) {
|
|
441
|
+
return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
|
|
442
|
+
}
|
|
443
|
+
function isWide(x) {
|
|
444
|
+
return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9800 && x <= 9811 || x === 9855 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12771 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 19903 || x >= 19968 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101632 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129672 || x >= 129680 && x <= 129725 || x >= 129727 && x <= 129733 || x >= 129742 && x <= 129755 || x >= 129760 && x <= 129768 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
// ../../node_modules/get-east-asian-width/index.js
|
|
448
|
+
function validate(codePoint) {
|
|
449
|
+
if (!Number.isSafeInteger(codePoint)) {
|
|
450
|
+
throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
|
|
454
|
+
validate(codePoint);
|
|
455
|
+
if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
|
|
456
|
+
return 2;
|
|
457
|
+
}
|
|
458
|
+
return 1;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
// ../../node_modules/emoji-regex/index.mjs
|
|
462
|
+
init_esm_shims();
|
|
463
|
+
var emoji_regex_default = () => {
|
|
464
|
+
return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\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?|[\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](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\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-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
|
|
465
|
+
};
|
|
466
|
+
|
|
467
|
+
// ../../node_modules/ora/node_modules/string-width/index.js
|
|
468
|
+
var segmenter = new Intl.Segmenter();
|
|
469
|
+
var defaultIgnorableCodePointRegex = new RegExp("^\\p{Default_Ignorable_Code_Point}$", "u");
|
|
470
|
+
function stringWidth(string, options = {}) {
|
|
471
|
+
if (typeof string !== "string" || string.length === 0) {
|
|
472
|
+
return 0;
|
|
473
|
+
}
|
|
474
|
+
const {
|
|
475
|
+
ambiguousIsNarrow = true,
|
|
476
|
+
countAnsiEscapeCodes = false
|
|
477
|
+
} = options;
|
|
478
|
+
if (!countAnsiEscapeCodes) {
|
|
479
|
+
string = stripAnsi(string);
|
|
480
|
+
}
|
|
481
|
+
if (string.length === 0) {
|
|
482
|
+
return 0;
|
|
483
|
+
}
|
|
484
|
+
let width = 0;
|
|
485
|
+
const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
|
|
486
|
+
for (const { segment: character } of segmenter.segment(string)) {
|
|
487
|
+
const codePoint = character.codePointAt(0);
|
|
488
|
+
if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
|
|
489
|
+
continue;
|
|
490
|
+
}
|
|
491
|
+
if (codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) {
|
|
492
|
+
continue;
|
|
493
|
+
}
|
|
494
|
+
if (codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) {
|
|
495
|
+
continue;
|
|
496
|
+
}
|
|
497
|
+
if (codePoint >= 55296 && codePoint <= 57343) {
|
|
498
|
+
continue;
|
|
499
|
+
}
|
|
500
|
+
if (codePoint >= 65024 && codePoint <= 65039) {
|
|
501
|
+
continue;
|
|
502
|
+
}
|
|
503
|
+
if (defaultIgnorableCodePointRegex.test(character)) {
|
|
504
|
+
continue;
|
|
505
|
+
}
|
|
506
|
+
if (emoji_regex_default().test(character)) {
|
|
507
|
+
width += 2;
|
|
508
|
+
continue;
|
|
509
|
+
}
|
|
510
|
+
width += eastAsianWidth(codePoint, eastAsianWidthOptions);
|
|
511
|
+
}
|
|
512
|
+
return width;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
// ../../node_modules/is-interactive/index.js
|
|
516
|
+
init_esm_shims();
|
|
517
|
+
function isInteractive({ stream = process.stdout } = {}) {
|
|
518
|
+
return Boolean(
|
|
519
|
+
stream && stream.isTTY && process.env.TERM !== "dumb" && !("CI" in process.env)
|
|
520
|
+
);
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
// ../../node_modules/ora/node_modules/is-unicode-supported/index.js
|
|
524
|
+
init_esm_shims();
|
|
525
|
+
import process5 from "node:process";
|
|
526
|
+
function isUnicodeSupported2() {
|
|
527
|
+
if (process5.platform !== "win32") {
|
|
528
|
+
return process5.env.TERM !== "linux";
|
|
529
|
+
}
|
|
530
|
+
return Boolean(process5.env.WT_SESSION) || Boolean(process5.env.TERMINUS_SUBLIME) || process5.env.ConEmuTask === "{cmd::Cmder}" || process5.env.TERM_PROGRAM === "Terminus-Sublime" || process5.env.TERM_PROGRAM === "vscode" || process5.env.TERM === "xterm-256color" || process5.env.TERM === "alacritty" || process5.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
// ../../node_modules/stdin-discarder/index.js
|
|
534
|
+
init_esm_shims();
|
|
535
|
+
import process6 from "node:process";
|
|
536
|
+
var ASCII_ETX_CODE = 3;
|
|
537
|
+
var StdinDiscarder = class {
|
|
538
|
+
#activeCount = 0;
|
|
539
|
+
start() {
|
|
540
|
+
this.#activeCount++;
|
|
541
|
+
if (this.#activeCount === 1) {
|
|
542
|
+
this.#realStart();
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
stop() {
|
|
546
|
+
if (this.#activeCount <= 0) {
|
|
547
|
+
throw new Error("`stop` called more times than `start`");
|
|
548
|
+
}
|
|
549
|
+
this.#activeCount--;
|
|
550
|
+
if (this.#activeCount === 0) {
|
|
551
|
+
this.#realStop();
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
#realStart() {
|
|
555
|
+
if (process6.platform === "win32" || !process6.stdin.isTTY) {
|
|
556
|
+
return;
|
|
557
|
+
}
|
|
558
|
+
process6.stdin.setRawMode(true);
|
|
559
|
+
process6.stdin.on("data", this.#handleInput);
|
|
560
|
+
process6.stdin.resume();
|
|
561
|
+
}
|
|
562
|
+
#realStop() {
|
|
563
|
+
if (!process6.stdin.isTTY) {
|
|
564
|
+
return;
|
|
565
|
+
}
|
|
566
|
+
process6.stdin.off("data", this.#handleInput);
|
|
567
|
+
process6.stdin.pause();
|
|
568
|
+
process6.stdin.setRawMode(false);
|
|
569
|
+
}
|
|
570
|
+
#handleInput(chunk) {
|
|
571
|
+
if (chunk[0] === ASCII_ETX_CODE) {
|
|
572
|
+
process6.emit("SIGINT");
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
};
|
|
576
|
+
var stdinDiscarder = new StdinDiscarder();
|
|
577
|
+
var stdin_discarder_default = stdinDiscarder;
|
|
578
|
+
|
|
579
|
+
// ../../node_modules/ora/index.js
|
|
580
|
+
var import_cli_spinners2 = __toESM(require_cli_spinners(), 1);
|
|
581
|
+
var Ora = class {
|
|
582
|
+
#linesToClear = 0;
|
|
583
|
+
#isDiscardingStdin = false;
|
|
584
|
+
#lineCount = 0;
|
|
585
|
+
#frameIndex = -1;
|
|
586
|
+
#lastSpinnerFrameTime = 0;
|
|
587
|
+
#options;
|
|
588
|
+
#spinner;
|
|
589
|
+
#stream;
|
|
590
|
+
#id;
|
|
591
|
+
#initialInterval;
|
|
592
|
+
#isEnabled;
|
|
593
|
+
#isSilent;
|
|
594
|
+
#indent;
|
|
595
|
+
#text;
|
|
596
|
+
#prefixText;
|
|
597
|
+
#suffixText;
|
|
598
|
+
color;
|
|
599
|
+
constructor(options) {
|
|
600
|
+
if (typeof options === "string") {
|
|
601
|
+
options = {
|
|
602
|
+
text: options
|
|
603
|
+
};
|
|
604
|
+
}
|
|
605
|
+
this.#options = {
|
|
606
|
+
color: "cyan",
|
|
607
|
+
stream: process7.stderr,
|
|
608
|
+
discardStdin: true,
|
|
609
|
+
hideCursor: true,
|
|
610
|
+
...options
|
|
611
|
+
};
|
|
612
|
+
this.color = this.#options.color;
|
|
613
|
+
this.spinner = this.#options.spinner;
|
|
614
|
+
this.#initialInterval = this.#options.interval;
|
|
615
|
+
this.#stream = this.#options.stream;
|
|
616
|
+
this.#isEnabled = typeof this.#options.isEnabled === "boolean" ? this.#options.isEnabled : isInteractive({ stream: this.#stream });
|
|
617
|
+
this.#isSilent = typeof this.#options.isSilent === "boolean" ? this.#options.isSilent : false;
|
|
618
|
+
this.text = this.#options.text;
|
|
619
|
+
this.prefixText = this.#options.prefixText;
|
|
620
|
+
this.suffixText = this.#options.suffixText;
|
|
621
|
+
this.indent = this.#options.indent;
|
|
622
|
+
if (process7.env.NODE_ENV === "test") {
|
|
623
|
+
this._stream = this.#stream;
|
|
624
|
+
this._isEnabled = this.#isEnabled;
|
|
625
|
+
Object.defineProperty(this, "_linesToClear", {
|
|
626
|
+
get() {
|
|
627
|
+
return this.#linesToClear;
|
|
628
|
+
},
|
|
629
|
+
set(newValue) {
|
|
630
|
+
this.#linesToClear = newValue;
|
|
631
|
+
}
|
|
632
|
+
});
|
|
633
|
+
Object.defineProperty(this, "_frameIndex", {
|
|
634
|
+
get() {
|
|
635
|
+
return this.#frameIndex;
|
|
636
|
+
}
|
|
637
|
+
});
|
|
638
|
+
Object.defineProperty(this, "_lineCount", {
|
|
639
|
+
get() {
|
|
640
|
+
return this.#lineCount;
|
|
641
|
+
}
|
|
642
|
+
});
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
get indent() {
|
|
646
|
+
return this.#indent;
|
|
647
|
+
}
|
|
648
|
+
set indent(indent = 0) {
|
|
649
|
+
if (!(indent >= 0 && Number.isInteger(indent))) {
|
|
650
|
+
throw new Error("The `indent` option must be an integer from 0 and up");
|
|
651
|
+
}
|
|
652
|
+
this.#indent = indent;
|
|
653
|
+
this.#updateLineCount();
|
|
654
|
+
}
|
|
655
|
+
get interval() {
|
|
656
|
+
return this.#initialInterval ?? this.#spinner.interval ?? 100;
|
|
657
|
+
}
|
|
658
|
+
get spinner() {
|
|
659
|
+
return this.#spinner;
|
|
660
|
+
}
|
|
661
|
+
set spinner(spinner) {
|
|
662
|
+
this.#frameIndex = -1;
|
|
663
|
+
this.#initialInterval = void 0;
|
|
664
|
+
if (typeof spinner === "object") {
|
|
665
|
+
if (spinner.frames === void 0) {
|
|
666
|
+
throw new Error("The given spinner must have a `frames` property");
|
|
667
|
+
}
|
|
668
|
+
this.#spinner = spinner;
|
|
669
|
+
} else if (!isUnicodeSupported2()) {
|
|
670
|
+
this.#spinner = import_cli_spinners.default.line;
|
|
671
|
+
} else if (spinner === void 0) {
|
|
672
|
+
this.#spinner = import_cli_spinners.default.dots;
|
|
673
|
+
} else if (spinner !== "default" && import_cli_spinners.default[spinner]) {
|
|
674
|
+
this.#spinner = import_cli_spinners.default[spinner];
|
|
675
|
+
} else {
|
|
676
|
+
throw new Error(`There is no built-in spinner named '${spinner}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`);
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
get text() {
|
|
680
|
+
return this.#text;
|
|
681
|
+
}
|
|
682
|
+
set text(value = "") {
|
|
683
|
+
this.#text = value;
|
|
684
|
+
this.#updateLineCount();
|
|
685
|
+
}
|
|
686
|
+
get prefixText() {
|
|
687
|
+
return this.#prefixText;
|
|
688
|
+
}
|
|
689
|
+
set prefixText(value = "") {
|
|
690
|
+
this.#prefixText = value;
|
|
691
|
+
this.#updateLineCount();
|
|
692
|
+
}
|
|
693
|
+
get suffixText() {
|
|
694
|
+
return this.#suffixText;
|
|
695
|
+
}
|
|
696
|
+
set suffixText(value = "") {
|
|
697
|
+
this.#suffixText = value;
|
|
698
|
+
this.#updateLineCount();
|
|
699
|
+
}
|
|
700
|
+
get isSpinning() {
|
|
701
|
+
return this.#id !== void 0;
|
|
702
|
+
}
|
|
703
|
+
#getFullPrefixText(prefixText = this.#prefixText, postfix = " ") {
|
|
704
|
+
if (typeof prefixText === "string" && prefixText !== "") {
|
|
705
|
+
return prefixText + postfix;
|
|
706
|
+
}
|
|
707
|
+
if (typeof prefixText === "function") {
|
|
708
|
+
return prefixText() + postfix;
|
|
709
|
+
}
|
|
710
|
+
return "";
|
|
711
|
+
}
|
|
712
|
+
#getFullSuffixText(suffixText = this.#suffixText, prefix = " ") {
|
|
713
|
+
if (typeof suffixText === "string" && suffixText !== "") {
|
|
714
|
+
return prefix + suffixText;
|
|
715
|
+
}
|
|
716
|
+
if (typeof suffixText === "function") {
|
|
717
|
+
return prefix + suffixText();
|
|
718
|
+
}
|
|
719
|
+
return "";
|
|
720
|
+
}
|
|
721
|
+
#updateLineCount() {
|
|
722
|
+
const columns = this.#stream.columns ?? 80;
|
|
723
|
+
const fullPrefixText = this.#getFullPrefixText(this.#prefixText, "-");
|
|
724
|
+
const fullSuffixText = this.#getFullSuffixText(this.#suffixText, "-");
|
|
725
|
+
const fullText = " ".repeat(this.#indent) + fullPrefixText + "--" + this.#text + "--" + fullSuffixText;
|
|
726
|
+
this.#lineCount = 0;
|
|
727
|
+
for (const line of stripAnsi(fullText).split("\n")) {
|
|
728
|
+
this.#lineCount += Math.max(1, Math.ceil(stringWidth(line, { countAnsiEscapeCodes: true }) / columns));
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
get isEnabled() {
|
|
732
|
+
return this.#isEnabled && !this.#isSilent;
|
|
733
|
+
}
|
|
734
|
+
set isEnabled(value) {
|
|
735
|
+
if (typeof value !== "boolean") {
|
|
736
|
+
throw new TypeError("The `isEnabled` option must be a boolean");
|
|
737
|
+
}
|
|
738
|
+
this.#isEnabled = value;
|
|
739
|
+
}
|
|
740
|
+
get isSilent() {
|
|
741
|
+
return this.#isSilent;
|
|
742
|
+
}
|
|
743
|
+
set isSilent(value) {
|
|
744
|
+
if (typeof value !== "boolean") {
|
|
745
|
+
throw new TypeError("The `isSilent` option must be a boolean");
|
|
746
|
+
}
|
|
747
|
+
this.#isSilent = value;
|
|
748
|
+
}
|
|
749
|
+
frame() {
|
|
750
|
+
const now = Date.now();
|
|
751
|
+
if (this.#frameIndex === -1 || now - this.#lastSpinnerFrameTime >= this.interval) {
|
|
752
|
+
this.#frameIndex = ++this.#frameIndex % this.#spinner.frames.length;
|
|
753
|
+
this.#lastSpinnerFrameTime = now;
|
|
754
|
+
}
|
|
755
|
+
const { frames } = this.#spinner;
|
|
756
|
+
let frame = frames[this.#frameIndex];
|
|
757
|
+
if (this.color) {
|
|
758
|
+
frame = source_default[this.color](frame);
|
|
759
|
+
}
|
|
760
|
+
const fullPrefixText = typeof this.#prefixText === "string" && this.#prefixText !== "" ? this.#prefixText + " " : "";
|
|
761
|
+
const fullText = typeof this.text === "string" ? " " + this.text : "";
|
|
762
|
+
const fullSuffixText = typeof this.#suffixText === "string" && this.#suffixText !== "" ? " " + this.#suffixText : "";
|
|
763
|
+
return fullPrefixText + frame + fullText + fullSuffixText;
|
|
764
|
+
}
|
|
765
|
+
clear() {
|
|
766
|
+
if (!this.#isEnabled || !this.#stream.isTTY) {
|
|
767
|
+
return this;
|
|
768
|
+
}
|
|
769
|
+
this.#stream.cursorTo(0);
|
|
770
|
+
for (let index = 0; index < this.#linesToClear; index++) {
|
|
771
|
+
if (index > 0) {
|
|
772
|
+
this.#stream.moveCursor(0, -1);
|
|
773
|
+
}
|
|
774
|
+
this.#stream.clearLine(1);
|
|
775
|
+
}
|
|
776
|
+
if (this.#indent || this.lastIndent !== this.#indent) {
|
|
777
|
+
this.#stream.cursorTo(this.#indent);
|
|
778
|
+
}
|
|
779
|
+
this.lastIndent = this.#indent;
|
|
780
|
+
this.#linesToClear = 0;
|
|
781
|
+
return this;
|
|
782
|
+
}
|
|
783
|
+
render() {
|
|
784
|
+
if (this.#isSilent) {
|
|
785
|
+
return this;
|
|
786
|
+
}
|
|
787
|
+
this.clear();
|
|
788
|
+
this.#stream.write(this.frame());
|
|
789
|
+
this.#linesToClear = this.#lineCount;
|
|
790
|
+
return this;
|
|
791
|
+
}
|
|
792
|
+
start(text) {
|
|
793
|
+
if (text) {
|
|
794
|
+
this.text = text;
|
|
795
|
+
}
|
|
796
|
+
if (this.#isSilent) {
|
|
797
|
+
return this;
|
|
798
|
+
}
|
|
799
|
+
if (!this.#isEnabled) {
|
|
800
|
+
if (this.text) {
|
|
801
|
+
this.#stream.write(`- ${this.text}
|
|
802
|
+
`);
|
|
803
|
+
}
|
|
804
|
+
return this;
|
|
805
|
+
}
|
|
806
|
+
if (this.isSpinning) {
|
|
807
|
+
return this;
|
|
808
|
+
}
|
|
809
|
+
if (this.#options.hideCursor) {
|
|
810
|
+
cli_cursor_default.hide(this.#stream);
|
|
811
|
+
}
|
|
812
|
+
if (this.#options.discardStdin && process7.stdin.isTTY) {
|
|
813
|
+
this.#isDiscardingStdin = true;
|
|
814
|
+
stdin_discarder_default.start();
|
|
815
|
+
}
|
|
816
|
+
this.render();
|
|
817
|
+
this.#id = setInterval(this.render.bind(this), this.interval);
|
|
818
|
+
return this;
|
|
819
|
+
}
|
|
820
|
+
stop() {
|
|
821
|
+
if (!this.#isEnabled) {
|
|
822
|
+
return this;
|
|
823
|
+
}
|
|
824
|
+
clearInterval(this.#id);
|
|
825
|
+
this.#id = void 0;
|
|
826
|
+
this.#frameIndex = 0;
|
|
827
|
+
this.clear();
|
|
828
|
+
if (this.#options.hideCursor) {
|
|
829
|
+
cli_cursor_default.show(this.#stream);
|
|
830
|
+
}
|
|
831
|
+
if (this.#options.discardStdin && process7.stdin.isTTY && this.#isDiscardingStdin) {
|
|
832
|
+
stdin_discarder_default.stop();
|
|
833
|
+
this.#isDiscardingStdin = false;
|
|
834
|
+
}
|
|
835
|
+
return this;
|
|
836
|
+
}
|
|
837
|
+
succeed(text) {
|
|
838
|
+
return this.stopAndPersist({ symbol: log_symbols_default.success, text });
|
|
839
|
+
}
|
|
840
|
+
fail(text) {
|
|
841
|
+
return this.stopAndPersist({ symbol: log_symbols_default.error, text });
|
|
842
|
+
}
|
|
843
|
+
warn(text) {
|
|
844
|
+
return this.stopAndPersist({ symbol: log_symbols_default.warning, text });
|
|
845
|
+
}
|
|
846
|
+
info(text) {
|
|
847
|
+
return this.stopAndPersist({ symbol: log_symbols_default.info, text });
|
|
848
|
+
}
|
|
849
|
+
stopAndPersist(options = {}) {
|
|
850
|
+
if (this.#isSilent) {
|
|
851
|
+
return this;
|
|
852
|
+
}
|
|
853
|
+
const prefixText = options.prefixText ?? this.#prefixText;
|
|
854
|
+
const fullPrefixText = this.#getFullPrefixText(prefixText, " ");
|
|
855
|
+
const symbolText = options.symbol ?? " ";
|
|
856
|
+
const text = options.text ?? this.text;
|
|
857
|
+
const separatorText = symbolText ? " " : "";
|
|
858
|
+
const fullText = typeof text === "string" ? separatorText + text : "";
|
|
859
|
+
const suffixText = options.suffixText ?? this.#suffixText;
|
|
860
|
+
const fullSuffixText = this.#getFullSuffixText(suffixText, " ");
|
|
861
|
+
const textToWrite = fullPrefixText + symbolText + fullText + fullSuffixText + "\n";
|
|
862
|
+
this.stop();
|
|
863
|
+
this.#stream.write(textToWrite);
|
|
864
|
+
return this;
|
|
865
|
+
}
|
|
866
|
+
};
|
|
867
|
+
function ora(options) {
|
|
868
|
+
return new Ora(options);
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
// ../cli-logger/src/create-logger.ts
|
|
872
|
+
function createLogger() {
|
|
873
|
+
return {
|
|
874
|
+
log: (message) => {
|
|
875
|
+
console.log(message);
|
|
876
|
+
},
|
|
877
|
+
error: (message) => {
|
|
878
|
+
console.error(message);
|
|
879
|
+
},
|
|
880
|
+
logWithLoader: (messageOrOptions) => {
|
|
881
|
+
const initialOptions = typeof messageOrOptions === "string" ? { text: messageOrOptions } : messageOrOptions ?? {};
|
|
882
|
+
const options = {
|
|
883
|
+
...initialOptions,
|
|
884
|
+
discardStdin: false,
|
|
885
|
+
isEnabled: true,
|
|
886
|
+
stream: stdout
|
|
887
|
+
};
|
|
888
|
+
const loader = ora(options).start();
|
|
889
|
+
return {
|
|
890
|
+
update: (message) => {
|
|
891
|
+
loader.text = message;
|
|
892
|
+
},
|
|
893
|
+
succeed: (message) => {
|
|
894
|
+
loader.succeed(message);
|
|
895
|
+
},
|
|
896
|
+
info: (message) => {
|
|
897
|
+
loader.info(message);
|
|
898
|
+
},
|
|
899
|
+
warn: (message) => {
|
|
900
|
+
loader.warn(message);
|
|
901
|
+
},
|
|
902
|
+
fail: (message) => {
|
|
903
|
+
loader.fail(message);
|
|
904
|
+
},
|
|
905
|
+
stop: () => {
|
|
906
|
+
loader.stop();
|
|
907
|
+
}
|
|
908
|
+
};
|
|
909
|
+
}
|
|
910
|
+
};
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
export {
|
|
914
|
+
createLogger
|
|
915
|
+
};
|
|
916
|
+
//# sourceMappingURL=chunk-IFQQVSBK.js.map
|