sandbox 2.0.0-alpha3 → 2.0.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.
@@ -0,0 +1,52 @@
1
+ import { createRequire } from "node:module";
2
+
3
+ //#region rolldown:runtime
4
+ var __create = Object.create;
5
+ var __defProp = Object.defineProperty;
6
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getProtoOf = Object.getPrototypeOf;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __esm = (fn, res) => function() {
11
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
12
+ };
13
+ var __commonJS = (cb, mod) => function() {
14
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
15
+ };
16
+ var __export = (all, symbols) => {
17
+ let target = {};
18
+ for (var name in all) {
19
+ __defProp(target, name, {
20
+ get: all[name],
21
+ enumerable: true
22
+ });
23
+ }
24
+ if (symbols) {
25
+ __defProp(target, Symbol.toStringTag, { value: "Module" });
26
+ }
27
+ return target;
28
+ };
29
+ var __copyProps = (to, from, except, desc) => {
30
+ if (from && typeof from === "object" || typeof from === "function") {
31
+ for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
32
+ key = keys[i];
33
+ if (!__hasOwnProp.call(to, key) && key !== except) {
34
+ __defProp(to, key, {
35
+ get: ((k) => from[k]).bind(null, key),
36
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
37
+ });
38
+ }
39
+ }
40
+ }
41
+ return to;
42
+ };
43
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
44
+ value: mod,
45
+ enumerable: true
46
+ }) : target, mod));
47
+ var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
48
+ var __toDynamicImportESM = (isNodeMode) => (mod) => __toESM(mod.default, isNodeMode);
49
+ var __require = /* @__PURE__ */ createRequire(import.meta.url);
50
+
51
+ //#endregion
52
+ export { __toCommonJS as a, __require as i, __esm as n, __toDynamicImportESM as o, __export as r, __toESM as s, __commonJS as t };
@@ -0,0 +1,348 @@
1
+ import process$1 from "node:process";
2
+
3
+ //#region ../../node_modules/.pnpm/mimic-function@5.0.1/node_modules/mimic-function/index.js
4
+ const copyProperty = (to, from, property, ignoreNonConfigurable) => {
5
+ if (property === "length" || property === "prototype") return;
6
+ if (property === "arguments" || property === "caller") return;
7
+ const toDescriptor = Object.getOwnPropertyDescriptor(to, property);
8
+ const fromDescriptor = Object.getOwnPropertyDescriptor(from, property);
9
+ if (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) return;
10
+ Object.defineProperty(to, property, fromDescriptor);
11
+ };
12
+ const canCopyProperty = function(toDescriptor, fromDescriptor) {
13
+ return toDescriptor === void 0 || toDescriptor.configurable || toDescriptor.writable === fromDescriptor.writable && toDescriptor.enumerable === fromDescriptor.enumerable && toDescriptor.configurable === fromDescriptor.configurable && (toDescriptor.writable || toDescriptor.value === fromDescriptor.value);
14
+ };
15
+ const changePrototype = (to, from) => {
16
+ const fromPrototype = Object.getPrototypeOf(from);
17
+ if (fromPrototype === Object.getPrototypeOf(to)) return;
18
+ Object.setPrototypeOf(to, fromPrototype);
19
+ };
20
+ const wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/\n${fromBody}`;
21
+ const toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, "toString");
22
+ const toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, "name");
23
+ const changeToString = (to, from, name) => {
24
+ const withName = name === "" ? "" : `with ${name.trim()}() `;
25
+ const newToString = wrappedToString.bind(null, withName, from.toString());
26
+ Object.defineProperty(newToString, "name", toStringName);
27
+ const { writable, enumerable, configurable } = toStringDescriptor;
28
+ Object.defineProperty(to, "toString", {
29
+ value: newToString,
30
+ writable,
31
+ enumerable,
32
+ configurable
33
+ });
34
+ };
35
+ function mimicFunction(to, from, { ignoreNonConfigurable = false } = {}) {
36
+ const { name } = to;
37
+ for (const property of Reflect.ownKeys(from)) copyProperty(to, from, property, ignoreNonConfigurable);
38
+ changePrototype(to, from);
39
+ changeToString(to, from, name);
40
+ return to;
41
+ }
42
+
43
+ //#endregion
44
+ //#region ../../node_modules/.pnpm/onetime@7.0.0/node_modules/onetime/index.js
45
+ const calledFunctions = /* @__PURE__ */ new WeakMap();
46
+ const onetime = (function_, options = {}) => {
47
+ if (typeof function_ !== "function") throw new TypeError("Expected a function");
48
+ let returnValue;
49
+ let callCount = 0;
50
+ const functionName = function_.displayName || function_.name || "<anonymous>";
51
+ const onetime$1 = function(...arguments_) {
52
+ calledFunctions.set(onetime$1, ++callCount);
53
+ if (callCount === 1) {
54
+ returnValue = function_.apply(this, arguments_);
55
+ function_ = void 0;
56
+ } else if (options.throw === true) throw new Error(`Function \`${functionName}\` can only be called once`);
57
+ return returnValue;
58
+ };
59
+ mimicFunction(onetime$1, function_);
60
+ calledFunctions.set(onetime$1, callCount);
61
+ return onetime$1;
62
+ };
63
+ onetime.callCount = (function_) => {
64
+ if (!calledFunctions.has(function_)) throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`);
65
+ return calledFunctions.get(function_);
66
+ };
67
+ var onetime_default = onetime;
68
+
69
+ //#endregion
70
+ //#region ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
71
+ /**
72
+ * This is not the set of all possible signals.
73
+ *
74
+ * It IS, however, the set of all signals that trigger
75
+ * an exit on either Linux or BSD systems. Linux is a
76
+ * superset of the signal names supported on BSD, and
77
+ * the unknown signals just fail to register, so we can
78
+ * catch that easily enough.
79
+ *
80
+ * Windows signals are a different set, since there are
81
+ * signals that terminate Windows processes, but don't
82
+ * terminate (or don't even exist) on Posix systems.
83
+ *
84
+ * Don't bother with SIGKILL. It's uncatchable, which
85
+ * means that we can't fire any callbacks anyway.
86
+ *
87
+ * If a user does happen to register a handler on a non-
88
+ * fatal signal like SIGWINCH or something, and then
89
+ * exit, it'll end up firing `process.emit('exit')`, so
90
+ * the handler will be fired anyway.
91
+ *
92
+ * SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised
93
+ * artificially, inherently leave the process in a
94
+ * state from which it is not safe to try and enter JS
95
+ * listeners.
96
+ */
97
+ const signals = [];
98
+ signals.push("SIGHUP", "SIGINT", "SIGTERM");
99
+ if (process.platform !== "win32") signals.push("SIGALRM", "SIGABRT", "SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT");
100
+ if (process.platform === "linux") signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
101
+
102
+ //#endregion
103
+ //#region \0@oxc-project+runtime@0.98.0/helpers/checkPrivateRedeclaration.js
104
+ function _checkPrivateRedeclaration(e, t) {
105
+ if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
106
+ }
107
+
108
+ //#endregion
109
+ //#region \0@oxc-project+runtime@0.98.0/helpers/classPrivateMethodInitSpec.js
110
+ function _classPrivateMethodInitSpec(e, a) {
111
+ _checkPrivateRedeclaration(e, a), a.add(e);
112
+ }
113
+
114
+ //#endregion
115
+ //#region \0@oxc-project+runtime@0.98.0/helpers/classPrivateFieldInitSpec.js
116
+ function _classPrivateFieldInitSpec(e, t, a) {
117
+ _checkPrivateRedeclaration(e, t), t.set(e, a);
118
+ }
119
+
120
+ //#endregion
121
+ //#region \0@oxc-project+runtime@0.98.0/helpers/assertClassBrand.js
122
+ function _assertClassBrand(e, t, n) {
123
+ if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
124
+ throw new TypeError("Private element is not present on this object");
125
+ }
126
+
127
+ //#endregion
128
+ //#region \0@oxc-project+runtime@0.98.0/helpers/classPrivateFieldSet2.js
129
+ function _classPrivateFieldSet2(s, a, r) {
130
+ return s.set(_assertClassBrand(s, a), r), r;
131
+ }
132
+
133
+ //#endregion
134
+ //#region \0@oxc-project+runtime@0.98.0/helpers/classPrivateFieldGet2.js
135
+ function _classPrivateFieldGet2(s, a) {
136
+ return s.get(_assertClassBrand(s, a));
137
+ }
138
+
139
+ //#endregion
140
+ //#region ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js
141
+ const processOk = (process$3) => !!process$3 && typeof process$3 === "object" && typeof process$3.removeListener === "function" && typeof process$3.emit === "function" && typeof process$3.reallyExit === "function" && typeof process$3.listeners === "function" && typeof process$3.kill === "function" && typeof process$3.pid === "number" && typeof process$3.on === "function";
142
+ const kExitEmitter = Symbol.for("signal-exit emitter");
143
+ const global = globalThis;
144
+ const ObjectDefineProperty = Object.defineProperty.bind(Object);
145
+ var Emitter = class {
146
+ constructor() {
147
+ this.emitted = {
148
+ afterExit: false,
149
+ exit: false
150
+ };
151
+ this.listeners = {
152
+ afterExit: [],
153
+ exit: []
154
+ };
155
+ this.count = 0;
156
+ this.id = Math.random();
157
+ if (global[kExitEmitter]) return global[kExitEmitter];
158
+ ObjectDefineProperty(global, kExitEmitter, {
159
+ value: this,
160
+ writable: false,
161
+ enumerable: false,
162
+ configurable: false
163
+ });
164
+ }
165
+ on(ev, fn) {
166
+ this.listeners[ev].push(fn);
167
+ }
168
+ removeListener(ev, fn) {
169
+ const list = this.listeners[ev];
170
+ const i = list.indexOf(fn);
171
+ /* c8 ignore start */
172
+ if (i === -1) return;
173
+ /* c8 ignore stop */
174
+ if (i === 0 && list.length === 1) list.length = 0;
175
+ else list.splice(i, 1);
176
+ }
177
+ emit(ev, code, signal) {
178
+ if (this.emitted[ev]) return false;
179
+ this.emitted[ev] = true;
180
+ let ret = false;
181
+ for (const fn of this.listeners[ev]) ret = fn(code, signal) === true || ret;
182
+ if (ev === "exit") ret = this.emit("afterExit", code, signal) || ret;
183
+ return ret;
184
+ }
185
+ };
186
+ var SignalExitBase = class {};
187
+ const signalExitWrap = (handler) => {
188
+ return {
189
+ onExit(cb, opts) {
190
+ return handler.onExit(cb, opts);
191
+ },
192
+ load() {
193
+ return handler.load();
194
+ },
195
+ unload() {
196
+ return handler.unload();
197
+ }
198
+ };
199
+ };
200
+ var SignalExitFallback = class extends SignalExitBase {
201
+ onExit() {
202
+ return () => {};
203
+ }
204
+ load() {}
205
+ unload() {}
206
+ };
207
+ var _hupSig = /* @__PURE__ */ new WeakMap();
208
+ var _emitter = /* @__PURE__ */ new WeakMap();
209
+ var _process = /* @__PURE__ */ new WeakMap();
210
+ var _originalProcessEmit = /* @__PURE__ */ new WeakMap();
211
+ var _originalProcessReallyExit = /* @__PURE__ */ new WeakMap();
212
+ var _sigListeners = /* @__PURE__ */ new WeakMap();
213
+ var _loaded = /* @__PURE__ */ new WeakMap();
214
+ var _SignalExit_brand = /* @__PURE__ */ new WeakSet();
215
+ var SignalExit = class extends SignalExitBase {
216
+ constructor(_process2) {
217
+ super();
218
+ _classPrivateMethodInitSpec(this, _SignalExit_brand);
219
+ _classPrivateFieldInitSpec(this, _hupSig, process$2.platform === "win32" ? "SIGINT" : "SIGHUP");
220
+ _classPrivateFieldInitSpec(this, _emitter, new Emitter());
221
+ _classPrivateFieldInitSpec(this, _process, void 0);
222
+ _classPrivateFieldInitSpec(this, _originalProcessEmit, void 0);
223
+ _classPrivateFieldInitSpec(this, _originalProcessReallyExit, void 0);
224
+ _classPrivateFieldInitSpec(this, _sigListeners, {});
225
+ _classPrivateFieldInitSpec(this, _loaded, false);
226
+ _classPrivateFieldSet2(_process, this, _process2);
227
+ _classPrivateFieldSet2(_sigListeners, this, {});
228
+ for (const sig of signals) _classPrivateFieldGet2(_sigListeners, this)[sig] = () => {
229
+ const listeners = _classPrivateFieldGet2(_process, this).listeners(sig);
230
+ let { count } = _classPrivateFieldGet2(_emitter, this);
231
+ /* c8 ignore start */
232
+ const p = _process2;
233
+ if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") count += p.__signal_exit_emitter__.count;
234
+ /* c8 ignore stop */
235
+ if (listeners.length === count) {
236
+ this.unload();
237
+ const ret = _classPrivateFieldGet2(_emitter, this).emit("exit", null, sig);
238
+ /* c8 ignore start */
239
+ const s = sig === "SIGHUP" ? _classPrivateFieldGet2(_hupSig, this) : sig;
240
+ if (!ret) _process2.kill(_process2.pid, s);
241
+ }
242
+ };
243
+ _classPrivateFieldSet2(_originalProcessReallyExit, this, _process2.reallyExit);
244
+ _classPrivateFieldSet2(_originalProcessEmit, this, _process2.emit);
245
+ }
246
+ onExit(cb, opts) {
247
+ /* c8 ignore start */
248
+ if (!processOk(_classPrivateFieldGet2(_process, this))) return () => {};
249
+ /* c8 ignore stop */
250
+ if (_classPrivateFieldGet2(_loaded, this) === false) this.load();
251
+ const ev = opts?.alwaysLast ? "afterExit" : "exit";
252
+ _classPrivateFieldGet2(_emitter, this).on(ev, cb);
253
+ return () => {
254
+ _classPrivateFieldGet2(_emitter, this).removeListener(ev, cb);
255
+ if (_classPrivateFieldGet2(_emitter, this).listeners["exit"].length === 0 && _classPrivateFieldGet2(_emitter, this).listeners["afterExit"].length === 0) this.unload();
256
+ };
257
+ }
258
+ load() {
259
+ if (_classPrivateFieldGet2(_loaded, this)) return;
260
+ _classPrivateFieldSet2(_loaded, this, true);
261
+ _classPrivateFieldGet2(_emitter, this).count += 1;
262
+ for (const sig of signals) try {
263
+ const fn = _classPrivateFieldGet2(_sigListeners, this)[sig];
264
+ if (fn) _classPrivateFieldGet2(_process, this).on(sig, fn);
265
+ } catch (_) {}
266
+ _classPrivateFieldGet2(_process, this).emit = (ev, ...a) => {
267
+ return _assertClassBrand(_SignalExit_brand, this, _processEmit).call(this, ev, ...a);
268
+ };
269
+ _classPrivateFieldGet2(_process, this).reallyExit = (code) => {
270
+ return _assertClassBrand(_SignalExit_brand, this, _processReallyExit).call(this, code);
271
+ };
272
+ }
273
+ unload() {
274
+ if (!_classPrivateFieldGet2(_loaded, this)) return;
275
+ _classPrivateFieldSet2(_loaded, this, false);
276
+ signals.forEach((sig) => {
277
+ const listener = _classPrivateFieldGet2(_sigListeners, this)[sig];
278
+ /* c8 ignore start */
279
+ if (!listener) throw new Error("Listener not defined for signal: " + sig);
280
+ /* c8 ignore stop */
281
+ try {
282
+ _classPrivateFieldGet2(_process, this).removeListener(sig, listener);
283
+ } catch (_) {}
284
+ /* c8 ignore stop */
285
+ });
286
+ _classPrivateFieldGet2(_process, this).emit = _classPrivateFieldGet2(_originalProcessEmit, this);
287
+ _classPrivateFieldGet2(_process, this).reallyExit = _classPrivateFieldGet2(_originalProcessReallyExit, this);
288
+ _classPrivateFieldGet2(_emitter, this).count -= 1;
289
+ }
290
+ };
291
+ function _processReallyExit(code) {
292
+ /* c8 ignore start */
293
+ if (!processOk(_classPrivateFieldGet2(_process, this))) return 0;
294
+ _classPrivateFieldGet2(_process, this).exitCode = code || 0;
295
+ /* c8 ignore stop */
296
+ _classPrivateFieldGet2(_emitter, this).emit("exit", _classPrivateFieldGet2(_process, this).exitCode, null);
297
+ return _classPrivateFieldGet2(_originalProcessReallyExit, this).call(_classPrivateFieldGet2(_process, this), _classPrivateFieldGet2(_process, this).exitCode);
298
+ }
299
+ function _processEmit(ev, ...args) {
300
+ const og = _classPrivateFieldGet2(_originalProcessEmit, this);
301
+ if (ev === "exit" && processOk(_classPrivateFieldGet2(_process, this))) {
302
+ if (typeof args[0] === "number") _classPrivateFieldGet2(_process, this).exitCode = args[0];
303
+ /* c8 ignore start */
304
+ const ret = og.call(_classPrivateFieldGet2(_process, this), ev, ...args);
305
+ /* c8 ignore start */
306
+ _classPrivateFieldGet2(_emitter, this).emit("exit", _classPrivateFieldGet2(_process, this).exitCode, null);
307
+ /* c8 ignore stop */
308
+ return ret;
309
+ } else return og.call(_classPrivateFieldGet2(_process, this), ev, ...args);
310
+ }
311
+ const process$2 = globalThis.process;
312
+ const { onExit, load, unload } = signalExitWrap(processOk(process$2) ? new SignalExit(process$2) : new SignalExitFallback());
313
+
314
+ //#endregion
315
+ //#region ../../node_modules/.pnpm/restore-cursor@5.1.0/node_modules/restore-cursor/index.js
316
+ const terminal = process$1.stderr.isTTY ? process$1.stderr : process$1.stdout.isTTY ? process$1.stdout : void 0;
317
+ const restoreCursor = terminal ? onetime_default(() => {
318
+ onExit(() => {
319
+ terminal.write("\x1B[?25h");
320
+ }, { alwaysLast: true });
321
+ }) : () => {};
322
+ var restore_cursor_default = restoreCursor;
323
+
324
+ //#endregion
325
+ //#region ../../node_modules/.pnpm/cli-cursor@5.0.0/node_modules/cli-cursor/index.js
326
+ let isHidden = false;
327
+ const cliCursor = {};
328
+ cliCursor.show = (writableStream = process$1.stderr) => {
329
+ if (!writableStream.isTTY) return;
330
+ isHidden = false;
331
+ writableStream.write("\x1B[?25h");
332
+ };
333
+ cliCursor.hide = (writableStream = process$1.stderr) => {
334
+ if (!writableStream.isTTY) return;
335
+ restore_cursor_default();
336
+ isHidden = true;
337
+ writableStream.write("\x1B[?25l");
338
+ };
339
+ cliCursor.toggle = (force, writableStream) => {
340
+ if (force !== void 0) isHidden = force;
341
+ if (isHidden) cliCursor.show(writableStream);
342
+ else cliCursor.hide(writableStream);
343
+ };
344
+ var cli_cursor_default = cliCursor;
345
+
346
+ //#endregion
347
+ export { _classPrivateFieldInitSpec as a, _assertClassBrand as i, _classPrivateFieldGet2 as n, _classPrivateMethodInitSpec as o, _classPrivateFieldSet2 as r, cli_cursor_default as t };
348
+ //# sourceMappingURL=cli-cursor-Dab4mDU2.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-cursor-Dab4mDU2.mjs","names":["onetime","process","process","onetime","process"],"sources":["../../../node_modules/.pnpm/mimic-function@5.0.1/node_modules/mimic-function/index.js","../../../node_modules/.pnpm/onetime@7.0.0/node_modules/onetime/index.js","../../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js","../../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js","../../../node_modules/.pnpm/restore-cursor@5.1.0/node_modules/restore-cursor/index.js","../../../node_modules/.pnpm/cli-cursor@5.0.0/node_modules/cli-cursor/index.js"],"sourcesContent":["const copyProperty = (to, from, property, ignoreNonConfigurable) => {\n\t// `Function#length` should reflect the parameters of `to` not `from` since we keep its body.\n\t// `Function#prototype` is non-writable and non-configurable so can never be modified.\n\tif (property === 'length' || property === 'prototype') {\n\t\treturn;\n\t}\n\n\t// `Function#arguments` and `Function#caller` should not be copied. They were reported to be present in `Reflect.ownKeys` for some devices in React Native (#41), so we explicitly ignore them here.\n\tif (property === 'arguments' || property === 'caller') {\n\t\treturn;\n\t}\n\n\tconst toDescriptor = Object.getOwnPropertyDescriptor(to, property);\n\tconst fromDescriptor = Object.getOwnPropertyDescriptor(from, property);\n\n\tif (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) {\n\t\treturn;\n\t}\n\n\tObject.defineProperty(to, property, fromDescriptor);\n};\n\n// `Object.defineProperty()` throws if the property exists, is not configurable and either:\n// - one its descriptors is changed\n// - it is non-writable and its value is changed\nconst canCopyProperty = function (toDescriptor, fromDescriptor) {\n\treturn toDescriptor === undefined || toDescriptor.configurable || (\n\t\ttoDescriptor.writable === fromDescriptor.writable\n\t\t&& toDescriptor.enumerable === fromDescriptor.enumerable\n\t\t&& toDescriptor.configurable === fromDescriptor.configurable\n\t\t&& (toDescriptor.writable || toDescriptor.value === fromDescriptor.value)\n\t);\n};\n\nconst changePrototype = (to, from) => {\n\tconst fromPrototype = Object.getPrototypeOf(from);\n\tif (fromPrototype === Object.getPrototypeOf(to)) {\n\t\treturn;\n\t}\n\n\tObject.setPrototypeOf(to, fromPrototype);\n};\n\nconst wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/\\n${fromBody}`;\n\nconst toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, 'toString');\nconst toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, 'name');\n\n// We call `from.toString()` early (not lazily) to ensure `from` can be garbage collected.\n// We use `bind()` instead of a closure for the same reason.\n// Calling `from.toString()` early also allows caching it in case `to.toString()` is called several times.\nconst changeToString = (to, from, name) => {\n\tconst withName = name === '' ? '' : `with ${name.trim()}() `;\n\tconst newToString = wrappedToString.bind(null, withName, from.toString());\n\t// Ensure `to.toString.toString` is non-enumerable and has the same `same`\n\tObject.defineProperty(newToString, 'name', toStringName);\n\tconst {writable, enumerable, configurable} = toStringDescriptor; // We destructue to avoid a potential `get` descriptor.\n\tObject.defineProperty(to, 'toString', {value: newToString, writable, enumerable, configurable});\n};\n\nexport default function mimicFunction(to, from, {ignoreNonConfigurable = false} = {}) {\n\tconst {name} = to;\n\n\tfor (const property of Reflect.ownKeys(from)) {\n\t\tcopyProperty(to, from, property, ignoreNonConfigurable);\n\t}\n\n\tchangePrototype(to, from);\n\tchangeToString(to, from, name);\n\n\treturn to;\n}\n","import mimicFunction from 'mimic-function';\n\nconst calledFunctions = new WeakMap();\n\nconst onetime = (function_, options = {}) => {\n\tif (typeof function_ !== 'function') {\n\t\tthrow new TypeError('Expected a function');\n\t}\n\n\tlet returnValue;\n\tlet callCount = 0;\n\tconst functionName = function_.displayName || function_.name || '<anonymous>';\n\n\tconst onetime = function (...arguments_) {\n\t\tcalledFunctions.set(onetime, ++callCount);\n\n\t\tif (callCount === 1) {\n\t\t\treturnValue = function_.apply(this, arguments_);\n\t\t\tfunction_ = undefined;\n\t\t} else if (options.throw === true) {\n\t\t\tthrow new Error(`Function \\`${functionName}\\` can only be called once`);\n\t\t}\n\n\t\treturn returnValue;\n\t};\n\n\tmimicFunction(onetime, function_);\n\tcalledFunctions.set(onetime, callCount);\n\n\treturn onetime;\n};\n\nonetime.callCount = function_ => {\n\tif (!calledFunctions.has(function_)) {\n\t\tthrow new Error(`The given function \\`${function_.name}\\` is not wrapped by the \\`onetime\\` package`);\n\t}\n\n\treturn calledFunctions.get(function_);\n};\n\nexport default onetime;\n","/**\n * This is not the set of all possible signals.\n *\n * It IS, however, the set of all signals that trigger\n * an exit on either Linux or BSD systems. Linux is a\n * superset of the signal names supported on BSD, and\n * the unknown signals just fail to register, so we can\n * catch that easily enough.\n *\n * Windows signals are a different set, since there are\n * signals that terminate Windows processes, but don't\n * terminate (or don't even exist) on Posix systems.\n *\n * Don't bother with SIGKILL. It's uncatchable, which\n * means that we can't fire any callbacks anyway.\n *\n * If a user does happen to register a handler on a non-\n * fatal signal like SIGWINCH or something, and then\n * exit, it'll end up firing `process.emit('exit')`, so\n * the handler will be fired anyway.\n *\n * SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised\n * artificially, inherently leave the process in a\n * state from which it is not safe to try and enter JS\n * listeners.\n */\nexport const signals = [];\nsignals.push('SIGHUP', 'SIGINT', 'SIGTERM');\nif (process.platform !== 'win32') {\n signals.push('SIGALRM', 'SIGABRT', 'SIGVTALRM', 'SIGXCPU', 'SIGXFSZ', 'SIGUSR2', 'SIGTRAP', 'SIGSYS', 'SIGQUIT', 'SIGIOT'\n // should detect profiler and enable/disable accordingly.\n // see #21\n // 'SIGPROF'\n );\n}\nif (process.platform === 'linux') {\n signals.push('SIGIO', 'SIGPOLL', 'SIGPWR', 'SIGSTKFLT');\n}\n//# sourceMappingURL=signals.js.map","// Note: since nyc uses this module to output coverage, any lines\n// that are in the direct sync flow of nyc's outputCoverage are\n// ignored, since we can never get coverage for them.\n// grab a reference to node's real process object right away\nimport { signals } from './signals.js';\nexport { signals };\nconst processOk = (process) => !!process &&\n typeof process === 'object' &&\n typeof process.removeListener === 'function' &&\n typeof process.emit === 'function' &&\n typeof process.reallyExit === 'function' &&\n typeof process.listeners === 'function' &&\n typeof process.kill === 'function' &&\n typeof process.pid === 'number' &&\n typeof process.on === 'function';\nconst kExitEmitter = Symbol.for('signal-exit emitter');\nconst global = globalThis;\nconst ObjectDefineProperty = Object.defineProperty.bind(Object);\n// teeny special purpose ee\nclass Emitter {\n emitted = {\n afterExit: false,\n exit: false,\n };\n listeners = {\n afterExit: [],\n exit: [],\n };\n count = 0;\n id = Math.random();\n constructor() {\n if (global[kExitEmitter]) {\n return global[kExitEmitter];\n }\n ObjectDefineProperty(global, kExitEmitter, {\n value: this,\n writable: false,\n enumerable: false,\n configurable: false,\n });\n }\n on(ev, fn) {\n this.listeners[ev].push(fn);\n }\n removeListener(ev, fn) {\n const list = this.listeners[ev];\n const i = list.indexOf(fn);\n /* c8 ignore start */\n if (i === -1) {\n return;\n }\n /* c8 ignore stop */\n if (i === 0 && list.length === 1) {\n list.length = 0;\n }\n else {\n list.splice(i, 1);\n }\n }\n emit(ev, code, signal) {\n if (this.emitted[ev]) {\n return false;\n }\n this.emitted[ev] = true;\n let ret = false;\n for (const fn of this.listeners[ev]) {\n ret = fn(code, signal) === true || ret;\n }\n if (ev === 'exit') {\n ret = this.emit('afterExit', code, signal) || ret;\n }\n return ret;\n }\n}\nclass SignalExitBase {\n}\nconst signalExitWrap = (handler) => {\n return {\n onExit(cb, opts) {\n return handler.onExit(cb, opts);\n },\n load() {\n return handler.load();\n },\n unload() {\n return handler.unload();\n },\n };\n};\nclass SignalExitFallback extends SignalExitBase {\n onExit() {\n return () => { };\n }\n load() { }\n unload() { }\n}\nclass SignalExit extends SignalExitBase {\n // \"SIGHUP\" throws an `ENOSYS` error on Windows,\n // so use a supported signal instead\n /* c8 ignore start */\n #hupSig = process.platform === 'win32' ? 'SIGINT' : 'SIGHUP';\n /* c8 ignore stop */\n #emitter = new Emitter();\n #process;\n #originalProcessEmit;\n #originalProcessReallyExit;\n #sigListeners = {};\n #loaded = false;\n constructor(process) {\n super();\n this.#process = process;\n // { <signal>: <listener fn>, ... }\n this.#sigListeners = {};\n for (const sig of signals) {\n this.#sigListeners[sig] = () => {\n // If there are no other listeners, an exit is coming!\n // Simplest way: remove us and then re-send the signal.\n // We know that this will kill the process, so we can\n // safely emit now.\n const listeners = this.#process.listeners(sig);\n let { count } = this.#emitter;\n // This is a workaround for the fact that signal-exit v3 and signal\n // exit v4 are not aware of each other, and each will attempt to let\n // the other handle it, so neither of them do. To correct this, we\n // detect if we're the only handler *except* for previous versions\n // of signal-exit, and increment by the count of listeners it has\n // created.\n /* c8 ignore start */\n const p = process;\n if (typeof p.__signal_exit_emitter__ === 'object' &&\n typeof p.__signal_exit_emitter__.count === 'number') {\n count += p.__signal_exit_emitter__.count;\n }\n /* c8 ignore stop */\n if (listeners.length === count) {\n this.unload();\n const ret = this.#emitter.emit('exit', null, sig);\n /* c8 ignore start */\n const s = sig === 'SIGHUP' ? this.#hupSig : sig;\n if (!ret)\n process.kill(process.pid, s);\n /* c8 ignore stop */\n }\n };\n }\n this.#originalProcessReallyExit = process.reallyExit;\n this.#originalProcessEmit = process.emit;\n }\n onExit(cb, opts) {\n /* c8 ignore start */\n if (!processOk(this.#process)) {\n return () => { };\n }\n /* c8 ignore stop */\n if (this.#loaded === false) {\n this.load();\n }\n const ev = opts?.alwaysLast ? 'afterExit' : 'exit';\n this.#emitter.on(ev, cb);\n return () => {\n this.#emitter.removeListener(ev, cb);\n if (this.#emitter.listeners['exit'].length === 0 &&\n this.#emitter.listeners['afterExit'].length === 0) {\n this.unload();\n }\n };\n }\n load() {\n if (this.#loaded) {\n return;\n }\n this.#loaded = true;\n // This is the number of onSignalExit's that are in play.\n // It's important so that we can count the correct number of\n // listeners on signals, and don't wait for the other one to\n // handle it instead of us.\n this.#emitter.count += 1;\n for (const sig of signals) {\n try {\n const fn = this.#sigListeners[sig];\n if (fn)\n this.#process.on(sig, fn);\n }\n catch (_) { }\n }\n this.#process.emit = (ev, ...a) => {\n return this.#processEmit(ev, ...a);\n };\n this.#process.reallyExit = (code) => {\n return this.#processReallyExit(code);\n };\n }\n unload() {\n if (!this.#loaded) {\n return;\n }\n this.#loaded = false;\n signals.forEach(sig => {\n const listener = this.#sigListeners[sig];\n /* c8 ignore start */\n if (!listener) {\n throw new Error('Listener not defined for signal: ' + sig);\n }\n /* c8 ignore stop */\n try {\n this.#process.removeListener(sig, listener);\n /* c8 ignore start */\n }\n catch (_) { }\n /* c8 ignore stop */\n });\n this.#process.emit = this.#originalProcessEmit;\n this.#process.reallyExit = this.#originalProcessReallyExit;\n this.#emitter.count -= 1;\n }\n #processReallyExit(code) {\n /* c8 ignore start */\n if (!processOk(this.#process)) {\n return 0;\n }\n this.#process.exitCode = code || 0;\n /* c8 ignore stop */\n this.#emitter.emit('exit', this.#process.exitCode, null);\n return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);\n }\n #processEmit(ev, ...args) {\n const og = this.#originalProcessEmit;\n if (ev === 'exit' && processOk(this.#process)) {\n if (typeof args[0] === 'number') {\n this.#process.exitCode = args[0];\n /* c8 ignore start */\n }\n /* c8 ignore start */\n const ret = og.call(this.#process, ev, ...args);\n /* c8 ignore start */\n this.#emitter.emit('exit', this.#process.exitCode, null);\n /* c8 ignore stop */\n return ret;\n }\n else {\n return og.call(this.#process, ev, ...args);\n }\n }\n}\nconst process = globalThis.process;\n// wrap so that we call the method on the actual handler, without\n// exporting it directly.\nexport const { \n/**\n * Called when the process is exiting, whether via signal, explicit\n * exit, or running out of stuff to do.\n *\n * If the global process object is not suitable for instrumentation,\n * then this will be a no-op.\n *\n * Returns a function that may be used to unload signal-exit.\n */\nonExit, \n/**\n * Load the listeners. Likely you never need to call this, unless\n * doing a rather deep integration with signal-exit functionality.\n * Mostly exposed for the benefit of testing.\n *\n * @internal\n */\nload, \n/**\n * Unload the listeners. Likely you never need to call this, unless\n * doing a rather deep integration with signal-exit functionality.\n * Mostly exposed for the benefit of testing.\n *\n * @internal\n */\nunload, } = signalExitWrap(processOk(process) ? new SignalExit(process) : new SignalExitFallback());\n//# sourceMappingURL=index.js.map","import process from 'node:process';\nimport onetime from 'onetime';\nimport {onExit} from 'signal-exit';\n\nconst terminal = process.stderr.isTTY\n\t? process.stderr\n\t: (process.stdout.isTTY ? process.stdout : undefined);\n\nconst restoreCursor = terminal ? onetime(() => {\n\tonExit(() => {\n\t\tterminal.write('\\u001B[?25h');\n\t}, {alwaysLast: true});\n}) : () => {};\n\nexport default restoreCursor;\n","import process from 'node:process';\nimport restoreCursor from 'restore-cursor';\n\nlet isHidden = false;\n\nconst cliCursor = {};\n\ncliCursor.show = (writableStream = process.stderr) => {\n\tif (!writableStream.isTTY) {\n\t\treturn;\n\t}\n\n\tisHidden = false;\n\twritableStream.write('\\u001B[?25h');\n};\n\ncliCursor.hide = (writableStream = process.stderr) => {\n\tif (!writableStream.isTTY) {\n\t\treturn;\n\t}\n\n\trestoreCursor();\n\tisHidden = true;\n\twritableStream.write('\\u001B[?25l');\n};\n\ncliCursor.toggle = (force, writableStream) => {\n\tif (force !== undefined) {\n\t\tisHidden = force;\n\t}\n\n\tif (isHidden) {\n\t\tcliCursor.show(writableStream);\n\t} else {\n\t\tcliCursor.hide(writableStream);\n\t}\n};\n\nexport default cliCursor;\n"],"x_google_ignoreList":[0,1,2,3,4,5],"mappings":";;;AAAA,MAAM,gBAAgB,IAAI,MAAM,UAAU,0BAA0B;AAGnE,KAAI,aAAa,YAAY,aAAa,YACzC;AAID,KAAI,aAAa,eAAe,aAAa,SAC5C;CAGD,MAAM,eAAe,OAAO,yBAAyB,IAAI,SAAS;CAClE,MAAM,iBAAiB,OAAO,yBAAyB,MAAM,SAAS;AAEtE,KAAI,CAAC,gBAAgB,cAAc,eAAe,IAAI,sBACrD;AAGD,QAAO,eAAe,IAAI,UAAU,eAAe;;AAMpD,MAAM,kBAAkB,SAAU,cAAc,gBAAgB;AAC/D,QAAO,iBAAiB,UAAa,aAAa,gBACjD,aAAa,aAAa,eAAe,YACtC,aAAa,eAAe,eAAe,cAC3C,aAAa,iBAAiB,eAAe,iBAC5C,aAAa,YAAY,aAAa,UAAU,eAAe;;AAIrE,MAAM,mBAAmB,IAAI,SAAS;CACrC,MAAM,gBAAgB,OAAO,eAAe,KAAK;AACjD,KAAI,kBAAkB,OAAO,eAAe,GAAG,CAC9C;AAGD,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AACrD,KAAI,CAAC,eAAe,MACnB;AAGD,yBAAe;AACf,YAAW;AACX,gBAAe,MAAM,YAAc;;AAGpC,UAAU,UAAU,OAAO,mBAAmB;AAC7C,KAAI,UAAU,OACb,YAAW;AAGZ,KAAI,SACH,WAAU,KAAK,eAAe;KAE9B,WAAU,KAAK,eAAe;;AAIhC,yBAAe"}
@@ -0,0 +1,124 @@
1
+ import { t as stringWidth } from "./string-width-D78SVDLD.mjs";
2
+ import { t as ansi_styles_default } from "./ansi-styles-B57ln_zO.mjs";
3
+
4
+ //#region ../../node_modules/.pnpm/is-fullwidth-code-point@4.0.0/node_modules/is-fullwidth-code-point/index.js
5
+ function isFullwidthCodePoint(codePoint) {
6
+ if (!Number.isInteger(codePoint)) return false;
7
+ return codePoint >= 4352 && (codePoint <= 4447 || codePoint === 9001 || codePoint === 9002 || 11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || 12880 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65131 || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 262141);
8
+ }
9
+
10
+ //#endregion
11
+ //#region ../../node_modules/.pnpm/slice-ansi@5.0.0/node_modules/slice-ansi/index.js
12
+ const astralRegex = /^[\uD800-\uDBFF][\uDC00-\uDFFF]$/;
13
+ const ESCAPES = ["\x1B", "›"];
14
+ const wrapAnsi = (code) => `${ESCAPES[0]}[${code}m`;
15
+ const checkAnsi = (ansiCodes, isEscapes, endAnsiCode) => {
16
+ let output = [];
17
+ ansiCodes = [...ansiCodes];
18
+ for (let ansiCode of ansiCodes) {
19
+ const ansiCodeOrigin = ansiCode;
20
+ if (ansiCode.includes(";")) ansiCode = ansiCode.split(";")[0][0] + "0";
21
+ const item = ansi_styles_default.codes.get(Number.parseInt(ansiCode, 10));
22
+ if (item) {
23
+ const indexEscape = ansiCodes.indexOf(item.toString());
24
+ if (indexEscape === -1) output.push(wrapAnsi(isEscapes ? item : ansiCodeOrigin));
25
+ else ansiCodes.splice(indexEscape, 1);
26
+ } else if (isEscapes) {
27
+ output.push(wrapAnsi(0));
28
+ break;
29
+ } else output.push(wrapAnsi(ansiCodeOrigin));
30
+ }
31
+ if (isEscapes) {
32
+ output = output.filter((element, index) => output.indexOf(element) === index);
33
+ if (endAnsiCode !== void 0) {
34
+ const fistEscapeCode = wrapAnsi(ansi_styles_default.codes.get(Number.parseInt(endAnsiCode, 10)));
35
+ output = output.reduce((current, next) => next === fistEscapeCode ? [next, ...current] : [...current, next], []);
36
+ }
37
+ }
38
+ return output.join("");
39
+ };
40
+ function sliceAnsi(string, begin, end) {
41
+ const characters = [...string];
42
+ const ansiCodes = [];
43
+ let stringEnd = typeof end === "number" ? end : characters.length;
44
+ let isInsideEscape = false;
45
+ let ansiCode;
46
+ let visible = 0;
47
+ let output = "";
48
+ for (const [index, character] of characters.entries()) {
49
+ let leftEscape = false;
50
+ if (ESCAPES.includes(character)) {
51
+ const code = /\d[^m]*/.exec(string.slice(index, index + 18));
52
+ ansiCode = code && code.length > 0 ? code[0] : void 0;
53
+ if (visible < stringEnd) {
54
+ isInsideEscape = true;
55
+ if (ansiCode !== void 0) ansiCodes.push(ansiCode);
56
+ }
57
+ } else if (isInsideEscape && character === "m") {
58
+ isInsideEscape = false;
59
+ leftEscape = true;
60
+ }
61
+ if (!isInsideEscape && !leftEscape) visible++;
62
+ if (!astralRegex.test(character) && isFullwidthCodePoint(character.codePointAt())) {
63
+ visible++;
64
+ if (typeof end !== "number") stringEnd++;
65
+ }
66
+ if (visible > begin && visible <= stringEnd) output += character;
67
+ else if (visible === begin && !isInsideEscape && ansiCode !== void 0) output = checkAnsi(ansiCodes);
68
+ else if (visible >= stringEnd) {
69
+ output += checkAnsi(ansiCodes, true, ansiCode);
70
+ break;
71
+ }
72
+ }
73
+ return output;
74
+ }
75
+
76
+ //#endregion
77
+ //#region ../../node_modules/.pnpm/cli-truncate@4.0.0/node_modules/cli-truncate/index.js
78
+ function getIndexOfNearestSpace(string, wantedIndex, shouldSearchRight) {
79
+ if (string.charAt(wantedIndex) === " ") return wantedIndex;
80
+ const direction = shouldSearchRight ? 1 : -1;
81
+ for (let index = 0; index <= 3; index++) {
82
+ const finalIndex = wantedIndex + index * direction;
83
+ if (string.charAt(finalIndex) === " ") return finalIndex;
84
+ }
85
+ return wantedIndex;
86
+ }
87
+ function cliTruncate(text, columns, options = {}) {
88
+ const { position = "end", space = false, preferTruncationOnSpace = false } = options;
89
+ let { truncationCharacter = "…" } = options;
90
+ if (typeof text !== "string") throw new TypeError(`Expected \`input\` to be a string, got ${typeof text}`);
91
+ if (typeof columns !== "number") throw new TypeError(`Expected \`columns\` to be a number, got ${typeof columns}`);
92
+ if (columns < 1) return "";
93
+ if (columns === 1) return truncationCharacter;
94
+ const length = stringWidth(text);
95
+ if (length <= columns) return text;
96
+ if (position === "start") {
97
+ if (preferTruncationOnSpace) {
98
+ const nearestSpace = getIndexOfNearestSpace(text, length - columns + 1, true);
99
+ return truncationCharacter + sliceAnsi(text, nearestSpace, length).trim();
100
+ }
101
+ if (space === true) truncationCharacter += " ";
102
+ return truncationCharacter + sliceAnsi(text, length - columns + stringWidth(truncationCharacter), length);
103
+ }
104
+ if (position === "middle") {
105
+ if (space === true) truncationCharacter = ` ${truncationCharacter} `;
106
+ const half = Math.floor(columns / 2);
107
+ if (preferTruncationOnSpace) {
108
+ const spaceNearFirstBreakPoint = getIndexOfNearestSpace(text, half);
109
+ const spaceNearSecondBreakPoint = getIndexOfNearestSpace(text, length - (columns - half) + 1, true);
110
+ return sliceAnsi(text, 0, spaceNearFirstBreakPoint) + truncationCharacter + sliceAnsi(text, spaceNearSecondBreakPoint, length).trim();
111
+ }
112
+ return sliceAnsi(text, 0, half) + truncationCharacter + sliceAnsi(text, length - (columns - half) + stringWidth(truncationCharacter), length);
113
+ }
114
+ if (position === "end") {
115
+ if (preferTruncationOnSpace) return sliceAnsi(text, 0, getIndexOfNearestSpace(text, columns - 1)) + truncationCharacter;
116
+ if (space === true) truncationCharacter = ` ${truncationCharacter}`;
117
+ return sliceAnsi(text, 0, columns - stringWidth(truncationCharacter)) + truncationCharacter;
118
+ }
119
+ throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${position}`);
120
+ }
121
+
122
+ //#endregion
123
+ export { cliTruncate as default };
124
+ //# sourceMappingURL=cli-truncate-DMIDACmY.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-truncate-DMIDACmY.mjs","names":["ansiStyles"],"sources":["../../../node_modules/.pnpm/is-fullwidth-code-point@4.0.0/node_modules/is-fullwidth-code-point/index.js","../../../node_modules/.pnpm/slice-ansi@5.0.0/node_modules/slice-ansi/index.js","../../../node_modules/.pnpm/cli-truncate@4.0.0/node_modules/cli-truncate/index.js"],"sourcesContent":["/* eslint-disable yoda */\n\nexport default function isFullwidthCodePoint(codePoint) {\n\tif (!Number.isInteger(codePoint)) {\n\t\treturn false;\n\t}\n\n\t// Code points are derived from:\n\t// https://unicode.org/Public/UNIDATA/EastAsianWidth.txt\n\treturn codePoint >= 0x1100 && (\n\t\tcodePoint <= 0x115F || // Hangul Jamo\n\t\tcodePoint === 0x2329 || // LEFT-POINTING ANGLE BRACKET\n\t\tcodePoint === 0x232A || // RIGHT-POINTING ANGLE BRACKET\n\t\t// CJK Radicals Supplement .. Enclosed CJK Letters and Months\n\t\t(0x2E80 <= codePoint && codePoint <= 0x3247 && codePoint !== 0x303F) ||\n\t\t// Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A\n\t\t(0x3250 <= codePoint && codePoint <= 0x4DBF) ||\n\t\t// CJK Unified Ideographs .. Yi Radicals\n\t\t(0x4E00 <= codePoint && codePoint <= 0xA4C6) ||\n\t\t// Hangul Jamo Extended-A\n\t\t(0xA960 <= codePoint && codePoint <= 0xA97C) ||\n\t\t// Hangul Syllables\n\t\t(0xAC00 <= codePoint && codePoint <= 0xD7A3) ||\n\t\t// CJK Compatibility Ideographs\n\t\t(0xF900 <= codePoint && codePoint <= 0xFAFF) ||\n\t\t// Vertical Forms\n\t\t(0xFE10 <= codePoint && codePoint <= 0xFE19) ||\n\t\t// CJK Compatibility Forms .. Small Form Variants\n\t\t(0xFE30 <= codePoint && codePoint <= 0xFE6B) ||\n\t\t// Halfwidth and Fullwidth Forms\n\t\t(0xFF01 <= codePoint && codePoint <= 0xFF60) ||\n\t\t(0xFFE0 <= codePoint && codePoint <= 0xFFE6) ||\n\t\t// Kana Supplement\n\t\t(0x1B000 <= codePoint && codePoint <= 0x1B001) ||\n\t\t// Enclosed Ideographic Supplement\n\t\t(0x1F200 <= codePoint && codePoint <= 0x1F251) ||\n\t\t// CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane\n\t\t(0x20000 <= codePoint && codePoint <= 0x3FFFD)\n\t);\n}\n","import isFullwidthCodePoint from 'is-fullwidth-code-point';\nimport ansiStyles from 'ansi-styles';\n\nconst astralRegex = /^[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]$/;\n\nconst ESCAPES = [\n\t'\\u001B',\n\t'\\u009B'\n];\n\nconst wrapAnsi = code => `${ESCAPES[0]}[${code}m`;\n\nconst checkAnsi = (ansiCodes, isEscapes, endAnsiCode) => {\n\tlet output = [];\n\tansiCodes = [...ansiCodes];\n\n\tfor (let ansiCode of ansiCodes) {\n\t\tconst ansiCodeOrigin = ansiCode;\n\t\tif (ansiCode.includes(';')) {\n\t\t\tansiCode = ansiCode.split(';')[0][0] + '0';\n\t\t}\n\n\t\tconst item = ansiStyles.codes.get(Number.parseInt(ansiCode, 10));\n\t\tif (item) {\n\t\t\tconst indexEscape = ansiCodes.indexOf(item.toString());\n\t\t\tif (indexEscape === -1) {\n\t\t\t\toutput.push(wrapAnsi(isEscapes ? item : ansiCodeOrigin));\n\t\t\t} else {\n\t\t\t\tansiCodes.splice(indexEscape, 1);\n\t\t\t}\n\t\t} else if (isEscapes) {\n\t\t\toutput.push(wrapAnsi(0));\n\t\t\tbreak;\n\t\t} else {\n\t\t\toutput.push(wrapAnsi(ansiCodeOrigin));\n\t\t}\n\t}\n\n\tif (isEscapes) {\n\t\toutput = output.filter((element, index) => output.indexOf(element) === index);\n\n\t\tif (endAnsiCode !== undefined) {\n\t\t\tconst fistEscapeCode = wrapAnsi(ansiStyles.codes.get(Number.parseInt(endAnsiCode, 10)));\n\t\t\t// TODO: Remove the use of `.reduce` here.\n\t\t\t// eslint-disable-next-line unicorn/no-array-reduce\n\t\t\toutput = output.reduce((current, next) => next === fistEscapeCode ? [next, ...current] : [...current, next], []);\n\t\t}\n\t}\n\n\treturn output.join('');\n};\n\nexport default function sliceAnsi(string, begin, end) {\n\tconst characters = [...string];\n\tconst ansiCodes = [];\n\n\tlet stringEnd = typeof end === 'number' ? end : characters.length;\n\tlet isInsideEscape = false;\n\tlet ansiCode;\n\tlet visible = 0;\n\tlet output = '';\n\n\tfor (const [index, character] of characters.entries()) {\n\t\tlet leftEscape = false;\n\n\t\tif (ESCAPES.includes(character)) {\n\t\t\tconst code = /\\d[^m]*/.exec(string.slice(index, index + 18));\n\t\t\tansiCode = code && code.length > 0 ? code[0] : undefined;\n\n\t\t\tif (visible < stringEnd) {\n\t\t\t\tisInsideEscape = true;\n\n\t\t\t\tif (ansiCode !== undefined) {\n\t\t\t\t\tansiCodes.push(ansiCode);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (isInsideEscape && character === 'm') {\n\t\t\tisInsideEscape = false;\n\t\t\tleftEscape = true;\n\t\t}\n\n\t\tif (!isInsideEscape && !leftEscape) {\n\t\t\tvisible++;\n\t\t}\n\n\t\tif (!astralRegex.test(character) && isFullwidthCodePoint(character.codePointAt())) {\n\t\t\tvisible++;\n\n\t\t\tif (typeof end !== 'number') {\n\t\t\t\tstringEnd++;\n\t\t\t}\n\t\t}\n\n\t\tif (visible > begin && visible <= stringEnd) {\n\t\t\toutput += character;\n\t\t} else if (visible === begin && !isInsideEscape && ansiCode !== undefined) {\n\t\t\toutput = checkAnsi(ansiCodes);\n\t\t} else if (visible >= stringEnd) {\n\t\t\toutput += checkAnsi(ansiCodes, true, ansiCode);\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn output;\n}\n","import sliceAnsi from 'slice-ansi';\nimport stringWidth from 'string-width';\n\nfunction getIndexOfNearestSpace(string, wantedIndex, shouldSearchRight) {\n\tif (string.charAt(wantedIndex) === ' ') {\n\t\treturn wantedIndex;\n\t}\n\n\tconst direction = shouldSearchRight ? 1 : -1;\n\n\tfor (let index = 0; index <= 3; index++) {\n\t\tconst finalIndex = wantedIndex + (index * direction);\n\t\tif (string.charAt(finalIndex) === ' ') {\n\t\t\treturn finalIndex;\n\t\t}\n\t}\n\n\treturn wantedIndex;\n}\n\nexport default function cliTruncate(text, columns, options = {}) {\n\tconst {\n\t\tposition = 'end',\n\t\tspace = false,\n\t\tpreferTruncationOnSpace = false,\n\t} = options;\n\n\tlet {truncationCharacter = '…'} = options;\n\n\tif (typeof text !== 'string') {\n\t\tthrow new TypeError(`Expected \\`input\\` to be a string, got ${typeof text}`);\n\t}\n\n\tif (typeof columns !== 'number') {\n\t\tthrow new TypeError(`Expected \\`columns\\` to be a number, got ${typeof columns}`);\n\t}\n\n\tif (columns < 1) {\n\t\treturn '';\n\t}\n\n\tif (columns === 1) {\n\t\treturn truncationCharacter;\n\t}\n\n\tconst length = stringWidth(text);\n\n\tif (length <= columns) {\n\t\treturn text;\n\t}\n\n\tif (position === 'start') {\n\t\tif (preferTruncationOnSpace) {\n\t\t\tconst nearestSpace = getIndexOfNearestSpace(text, length - columns + 1, true);\n\t\t\treturn truncationCharacter + sliceAnsi(text, nearestSpace, length).trim();\n\t\t}\n\n\t\tif (space === true) {\n\t\t\ttruncationCharacter += ' ';\n\t\t}\n\n\t\treturn truncationCharacter + sliceAnsi(text, length - columns + stringWidth(truncationCharacter), length);\n\t}\n\n\tif (position === 'middle') {\n\t\tif (space === true) {\n\t\t\ttruncationCharacter = ` ${truncationCharacter} `;\n\t\t}\n\n\t\tconst half = Math.floor(columns / 2);\n\n\t\tif (preferTruncationOnSpace) {\n\t\t\tconst spaceNearFirstBreakPoint = getIndexOfNearestSpace(text, half);\n\t\t\tconst spaceNearSecondBreakPoint = getIndexOfNearestSpace(text, length - (columns - half) + 1, true);\n\t\t\treturn sliceAnsi(text, 0, spaceNearFirstBreakPoint) + truncationCharacter + sliceAnsi(text, spaceNearSecondBreakPoint, length).trim();\n\t\t}\n\n\t\treturn (\n\t\t\tsliceAnsi(text, 0, half)\n\t\t\t\t+ truncationCharacter\n\t\t\t\t+ sliceAnsi(text, length - (columns - half) + stringWidth(truncationCharacter), length)\n\t\t);\n\t}\n\n\tif (position === 'end') {\n\t\tif (preferTruncationOnSpace) {\n\t\t\tconst nearestSpace = getIndexOfNearestSpace(text, columns - 1);\n\t\t\treturn sliceAnsi(text, 0, nearestSpace) + truncationCharacter;\n\t\t}\n\n\t\tif (space === true) {\n\t\t\ttruncationCharacter = ` ${truncationCharacter}`;\n\t\t}\n\n\t\treturn sliceAnsi(text, 0, columns - stringWidth(truncationCharacter)) + truncationCharacter;\n\t}\n\n\tthrow new Error(`Expected \\`options.position\\` to be either \\`start\\`, \\`middle\\` or \\`end\\`, got ${position}`);\n}\n"],"x_google_ignoreList":[0,1,2],"mappings":";;;;AAEA,SAAwB,qBAAqB,WAAW;AACvD,KAAI,CAAC,OAAO,UAAU,UAAU,CAC/B,QAAO;AAKR,QAAO,aAAa,SACnB,aAAa,QACb,cAAc,QACd,cAAc,QAEb,SAAU,aAAa,aAAa,SAAU,cAAc,SAE5D,SAAU,aAAa,aAAa,SAEpC,SAAU,aAAa,aAAa,SAEpC,SAAU,aAAa,aAAa,SAEpC,SAAU,aAAa,aAAa,SAEpC,SAA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,YAAY,oBAAoB,CAAC,GAAG;;AAGzE,OAAM,IAAI,MAAM,oFAAoF,WAAW"}
@@ -0,0 +1,10 @@
1
+ //#region src/index.d.ts
2
+ declare function createApp(opts: {
3
+ withoutAuth: boolean;
4
+ appName: string;
5
+ }): {
6
+ run(args: string[]): Promise<void>;
7
+ };
8
+ //#endregion
9
+ export { createApp };
10
+ //# sourceMappingURL=index.d.mts.map
package/dist/index.mjs ADDED
@@ -0,0 +1,17 @@
1
+ import { r as require_cjs, t as app } from "./app-BQds8e4O.mjs";
2
+ import "./string-width-D78SVDLD.mjs";
3
+ import "./cli-cursor-Dab4mDU2.mjs";
4
+ import "./token-error-C0CafU2G.mjs";
5
+
6
+ //#region src/index.ts
7
+ var import_cjs = require_cjs();
8
+ function createApp(opts) {
9
+ const instance = app(opts);
10
+ return { async run(args) {
11
+ await (0, import_cjs.run)(instance, args);
12
+ } };
13
+ }
14
+
15
+ //#endregion
16
+ export { createApp };
17
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import { run as runCmd } from \"cmd-ts\";\nimport { app } from \"./app\";\n\nexport function createApp(opts: { withoutAuth: boolean; appName: string }) {\n const instance = app(opts);\n return {\n async run(args: string[]) {\n await runCmd(instance, args);\n },\n };\n}\n"],"mappings":";;;;;;;AAGA,SAAgB,UAAU,MAAiD;CACzE,MAAM,WAAW,IAAI,KAAK;AAC1B,QAAO,EACL,MAAM,IAAI,MAAgB;AACxB,4BAAa,UAAU,KAAK;IAE/B"}