@s0rt/3dvf 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli/index.js
CHANGED
|
@@ -1,29 +1,47 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {createRequire} from "node:module";
|
|
2
|
+
import { createRequire } from "node:module";
|
|
3
3
|
var __create = Object.create;
|
|
4
4
|
var __getProtoOf = Object.getPrototypeOf;
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
function __accessProp(key) {
|
|
9
|
+
return this[key];
|
|
10
|
+
}
|
|
11
|
+
var __toESMCache_node;
|
|
12
|
+
var __toESMCache_esm;
|
|
8
13
|
var __toESM = (mod, isNodeMode, target) => {
|
|
14
|
+
var canCache = mod != null && typeof mod === "object";
|
|
15
|
+
if (canCache) {
|
|
16
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
17
|
+
var cached = cache.get(mod);
|
|
18
|
+
if (cached)
|
|
19
|
+
return cached;
|
|
20
|
+
}
|
|
9
21
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
10
22
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
11
23
|
for (let key of __getOwnPropNames(mod))
|
|
12
24
|
if (!__hasOwnProp.call(to, key))
|
|
13
25
|
__defProp(to, key, {
|
|
14
|
-
get: (
|
|
26
|
+
get: __accessProp.bind(mod, key),
|
|
15
27
|
enumerable: true
|
|
16
28
|
});
|
|
29
|
+
if (canCache)
|
|
30
|
+
cache.set(mod, to);
|
|
17
31
|
return to;
|
|
18
32
|
};
|
|
19
33
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
34
|
+
var __returnValue = (v) => v;
|
|
35
|
+
function __exportSetter(name, newValue) {
|
|
36
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
37
|
+
}
|
|
20
38
|
var __export = (target, all) => {
|
|
21
39
|
for (var name in all)
|
|
22
40
|
__defProp(target, name, {
|
|
23
41
|
get: all[name],
|
|
24
42
|
enumerable: true,
|
|
25
43
|
configurable: true,
|
|
26
|
-
set: (
|
|
44
|
+
set: __exportSetter.bind(all, name)
|
|
27
45
|
});
|
|
28
46
|
};
|
|
29
47
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
@@ -55,10 +73,6 @@ var require_error = __commonJS((exports) => {
|
|
|
55
73
|
|
|
56
74
|
// node_modules/commander/lib/argument.js
|
|
57
75
|
var require_argument = __commonJS((exports) => {
|
|
58
|
-
function humanReadableArgName(arg) {
|
|
59
|
-
const nameOutput = arg.name() + (arg.variadic === true ? "..." : "");
|
|
60
|
-
return arg.required ? "<" + nameOutput + ">" : "[" + nameOutput + "]";
|
|
61
|
-
}
|
|
62
76
|
var { InvalidArgumentError } = require_error();
|
|
63
77
|
|
|
64
78
|
class Argument {
|
|
@@ -128,6 +142,10 @@ var require_argument = __commonJS((exports) => {
|
|
|
128
142
|
return this;
|
|
129
143
|
}
|
|
130
144
|
}
|
|
145
|
+
function humanReadableArgName(arg) {
|
|
146
|
+
const nameOutput = arg.name() + (arg.variadic === true ? "..." : "");
|
|
147
|
+
return arg.required ? "<" + nameOutput + ">" : "[" + nameOutput + "]";
|
|
148
|
+
}
|
|
131
149
|
exports.Argument = Argument;
|
|
132
150
|
exports.humanReadableArgName = humanReadableArgName;
|
|
133
151
|
});
|
|
@@ -304,7 +322,8 @@ var require_help = __commonJS((exports) => {
|
|
|
304
322
|
return term;
|
|
305
323
|
}
|
|
306
324
|
function formatList(textArray) {
|
|
307
|
-
return textArray.join(
|
|
325
|
+
return textArray.join(`
|
|
326
|
+
`).replace(/^/gm, " ".repeat(itemIndentWidth));
|
|
308
327
|
}
|
|
309
328
|
let output = [`Usage: ${helper.commandUsage(cmd)}`, ""];
|
|
310
329
|
const commandDescription = helper.commandDescription(cmd);
|
|
@@ -344,13 +363,14 @@ var require_help = __commonJS((exports) => {
|
|
|
344
363
|
if (commandList.length > 0) {
|
|
345
364
|
output = output.concat(["Commands:", formatList(commandList), ""]);
|
|
346
365
|
}
|
|
347
|
-
return output.join(
|
|
366
|
+
return output.join(`
|
|
367
|
+
`);
|
|
348
368
|
}
|
|
349
369
|
padWidth(cmd, helper) {
|
|
350
370
|
return Math.max(helper.longestOptionTermLength(cmd, helper), helper.longestGlobalOptionTermLength(cmd, helper), helper.longestSubcommandTermLength(cmd, helper), helper.longestArgumentTermLength(cmd, helper));
|
|
351
371
|
}
|
|
352
372
|
wrap(str, width, indent, minColumnWidth = 40) {
|
|
353
|
-
const indents = " \\f\\t\\v\
|
|
373
|
+
const indents = " \\f\\t\\v - \uFEFF";
|
|
354
374
|
const manualIndent = new RegExp(`[\\n][${indents}]+`);
|
|
355
375
|
if (str.match(manualIndent))
|
|
356
376
|
return str;
|
|
@@ -358,17 +378,22 @@ var require_help = __commonJS((exports) => {
|
|
|
358
378
|
if (columnWidth < minColumnWidth)
|
|
359
379
|
return str;
|
|
360
380
|
const leadingStr = str.slice(0, indent);
|
|
361
|
-
const columnText = str.slice(indent).replace(
|
|
381
|
+
const columnText = str.slice(indent).replace(`\r
|
|
382
|
+
`, `
|
|
383
|
+
`);
|
|
362
384
|
const indentString = " ".repeat(indent);
|
|
363
|
-
const zeroWidthSpace = "
|
|
385
|
+
const zeroWidthSpace = "";
|
|
364
386
|
const breaks = `\\s${zeroWidthSpace}`;
|
|
365
|
-
const regex = new RegExp(
|
|
387
|
+
const regex = new RegExp(`
|
|
388
|
+
|.{1,${columnWidth - 1}}([${breaks}]|$)|[^${breaks}]+?([${breaks}]|$)`, "g");
|
|
366
389
|
const lines = columnText.match(regex) || [];
|
|
367
390
|
return leadingStr + lines.map((line, i) => {
|
|
368
|
-
if (line ===
|
|
391
|
+
if (line === `
|
|
392
|
+
`)
|
|
369
393
|
return "";
|
|
370
394
|
return (i > 0 ? indentString : "") + line.trimEnd();
|
|
371
|
-
}).join(
|
|
395
|
+
}).join(`
|
|
396
|
+
`);
|
|
372
397
|
}
|
|
373
398
|
}
|
|
374
399
|
exports.Help = Help;
|
|
@@ -376,24 +401,6 @@ var require_help = __commonJS((exports) => {
|
|
|
376
401
|
|
|
377
402
|
// node_modules/commander/lib/option.js
|
|
378
403
|
var require_option = __commonJS((exports) => {
|
|
379
|
-
function camelcase(str) {
|
|
380
|
-
return str.split("-").reduce((str2, word) => {
|
|
381
|
-
return str2 + word[0].toUpperCase() + word.slice(1);
|
|
382
|
-
});
|
|
383
|
-
}
|
|
384
|
-
function splitOptionFlags(flags) {
|
|
385
|
-
let shortFlag;
|
|
386
|
-
let longFlag;
|
|
387
|
-
const flagParts = flags.split(/[ |,]+/);
|
|
388
|
-
if (flagParts.length > 1 && !/^[[<]/.test(flagParts[1]))
|
|
389
|
-
shortFlag = flagParts.shift();
|
|
390
|
-
longFlag = flagParts.shift();
|
|
391
|
-
if (!shortFlag && /^-[^-]$/.test(longFlag)) {
|
|
392
|
-
shortFlag = longFlag;
|
|
393
|
-
longFlag = undefined;
|
|
394
|
-
}
|
|
395
|
-
return { shortFlag, longFlag };
|
|
396
|
-
}
|
|
397
404
|
var { InvalidArgumentError } = require_error();
|
|
398
405
|
|
|
399
406
|
class Option {
|
|
@@ -521,12 +528,31 @@ var require_option = __commonJS((exports) => {
|
|
|
521
528
|
return option.negate === (negativeValue === value);
|
|
522
529
|
}
|
|
523
530
|
}
|
|
531
|
+
function camelcase(str) {
|
|
532
|
+
return str.split("-").reduce((str2, word) => {
|
|
533
|
+
return str2 + word[0].toUpperCase() + word.slice(1);
|
|
534
|
+
});
|
|
535
|
+
}
|
|
536
|
+
function splitOptionFlags(flags) {
|
|
537
|
+
let shortFlag;
|
|
538
|
+
let longFlag;
|
|
539
|
+
const flagParts = flags.split(/[ |,]+/);
|
|
540
|
+
if (flagParts.length > 1 && !/^[[<]/.test(flagParts[1]))
|
|
541
|
+
shortFlag = flagParts.shift();
|
|
542
|
+
longFlag = flagParts.shift();
|
|
543
|
+
if (!shortFlag && /^-[^-]$/.test(longFlag)) {
|
|
544
|
+
shortFlag = longFlag;
|
|
545
|
+
longFlag = undefined;
|
|
546
|
+
}
|
|
547
|
+
return { shortFlag, longFlag };
|
|
548
|
+
}
|
|
524
549
|
exports.Option = Option;
|
|
525
550
|
exports.DualOptions = DualOptions;
|
|
526
551
|
});
|
|
527
552
|
|
|
528
553
|
// node_modules/commander/lib/suggestSimilar.js
|
|
529
554
|
var require_suggestSimilar = __commonJS((exports) => {
|
|
555
|
+
var maxDistance = 3;
|
|
530
556
|
function editDistance(a, b) {
|
|
531
557
|
if (Math.abs(a.length - b.length) > maxDistance)
|
|
532
558
|
return Math.max(a.length, b.length);
|
|
@@ -585,48 +611,20 @@ var require_suggestSimilar = __commonJS((exports) => {
|
|
|
585
611
|
similar = similar.map((candidate) => `--${candidate}`);
|
|
586
612
|
}
|
|
587
613
|
if (similar.length > 1) {
|
|
588
|
-
return
|
|
614
|
+
return `
|
|
615
|
+
(Did you mean one of ${similar.join(", ")}?)`;
|
|
589
616
|
}
|
|
590
617
|
if (similar.length === 1) {
|
|
591
|
-
return
|
|
618
|
+
return `
|
|
619
|
+
(Did you mean ${similar[0]}?)`;
|
|
592
620
|
}
|
|
593
621
|
return "";
|
|
594
622
|
}
|
|
595
|
-
var maxDistance = 3;
|
|
596
623
|
exports.suggestSimilar = suggestSimilar;
|
|
597
624
|
});
|
|
598
625
|
|
|
599
626
|
// node_modules/commander/lib/command.js
|
|
600
627
|
var require_command = __commonJS((exports) => {
|
|
601
|
-
function incrementNodeInspectorPort(args) {
|
|
602
|
-
return args.map((arg) => {
|
|
603
|
-
if (!arg.startsWith("--inspect")) {
|
|
604
|
-
return arg;
|
|
605
|
-
}
|
|
606
|
-
let debugOption;
|
|
607
|
-
let debugHost = "127.0.0.1";
|
|
608
|
-
let debugPort = "9229";
|
|
609
|
-
let match;
|
|
610
|
-
if ((match = arg.match(/^(--inspect(-brk)?)$/)) !== null) {
|
|
611
|
-
debugOption = match[1];
|
|
612
|
-
} else if ((match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+)$/)) !== null) {
|
|
613
|
-
debugOption = match[1];
|
|
614
|
-
if (/^\d+$/.test(match[3])) {
|
|
615
|
-
debugPort = match[3];
|
|
616
|
-
} else {
|
|
617
|
-
debugHost = match[3];
|
|
618
|
-
}
|
|
619
|
-
} else if ((match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/)) !== null) {
|
|
620
|
-
debugOption = match[1];
|
|
621
|
-
debugHost = match[3];
|
|
622
|
-
debugPort = match[4];
|
|
623
|
-
}
|
|
624
|
-
if (debugOption && debugPort !== "0") {
|
|
625
|
-
return `${debugOption}=${debugHost}:${parseInt(debugPort) + 1}`;
|
|
626
|
-
}
|
|
627
|
-
return arg;
|
|
628
|
-
});
|
|
629
|
-
}
|
|
630
628
|
var EventEmitter = __require("node:events").EventEmitter;
|
|
631
629
|
var childProcess = __require("node:child_process");
|
|
632
630
|
var path = __require("node:path");
|
|
@@ -863,8 +861,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
863
861
|
this._exitCallback = (err) => {
|
|
864
862
|
if (err.code !== "commander.executeSubCommandAsync") {
|
|
865
863
|
throw err;
|
|
866
|
-
} else {
|
|
867
|
-
}
|
|
864
|
+
} else {}
|
|
868
865
|
};
|
|
869
866
|
}
|
|
870
867
|
return this;
|
|
@@ -1534,11 +1531,14 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1534
1531
|
return this._getCommandAndAncestors().reduce((combinedOptions, cmd) => Object.assign(combinedOptions, cmd.opts()), {});
|
|
1535
1532
|
}
|
|
1536
1533
|
error(message, errorOptions) {
|
|
1537
|
-
this._outputConfiguration.outputError(`${message}
|
|
1534
|
+
this._outputConfiguration.outputError(`${message}
|
|
1535
|
+
`, this._outputConfiguration.writeErr);
|
|
1538
1536
|
if (typeof this._showHelpAfterError === "string") {
|
|
1539
|
-
this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
|
1537
|
+
this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
|
1538
|
+
`);
|
|
1540
1539
|
} else if (this._showHelpAfterError) {
|
|
1541
|
-
this._outputConfiguration.writeErr(
|
|
1540
|
+
this._outputConfiguration.writeErr(`
|
|
1541
|
+
`);
|
|
1542
1542
|
this.outputHelp({ error: true });
|
|
1543
1543
|
}
|
|
1544
1544
|
const config = errorOptions || {};
|
|
@@ -1657,7 +1657,8 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1657
1657
|
this._versionOptionName = versionOption.attributeName();
|
|
1658
1658
|
this._registerOption(versionOption);
|
|
1659
1659
|
this.on("option:" + versionOption.name(), () => {
|
|
1660
|
-
this._outputConfiguration.writeOut(`${str}
|
|
1660
|
+
this._outputConfiguration.writeOut(`${str}
|
|
1661
|
+
`);
|
|
1661
1662
|
this._exit(0, "commander.version", str);
|
|
1662
1663
|
});
|
|
1663
1664
|
return this;
|
|
@@ -1818,7 +1819,8 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1818
1819
|
helpStr = text;
|
|
1819
1820
|
}
|
|
1820
1821
|
if (helpStr) {
|
|
1821
|
-
context.write(`${helpStr}
|
|
1822
|
+
context.write(`${helpStr}
|
|
1823
|
+
`);
|
|
1822
1824
|
}
|
|
1823
1825
|
});
|
|
1824
1826
|
return this;
|
|
@@ -1832,6 +1834,35 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1832
1834
|
}
|
|
1833
1835
|
}
|
|
1834
1836
|
}
|
|
1837
|
+
function incrementNodeInspectorPort(args) {
|
|
1838
|
+
return args.map((arg) => {
|
|
1839
|
+
if (!arg.startsWith("--inspect")) {
|
|
1840
|
+
return arg;
|
|
1841
|
+
}
|
|
1842
|
+
let debugOption;
|
|
1843
|
+
let debugHost = "127.0.0.1";
|
|
1844
|
+
let debugPort = "9229";
|
|
1845
|
+
let match;
|
|
1846
|
+
if ((match = arg.match(/^(--inspect(-brk)?)$/)) !== null) {
|
|
1847
|
+
debugOption = match[1];
|
|
1848
|
+
} else if ((match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+)$/)) !== null) {
|
|
1849
|
+
debugOption = match[1];
|
|
1850
|
+
if (/^\d+$/.test(match[3])) {
|
|
1851
|
+
debugPort = match[3];
|
|
1852
|
+
} else {
|
|
1853
|
+
debugHost = match[3];
|
|
1854
|
+
}
|
|
1855
|
+
} else if ((match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/)) !== null) {
|
|
1856
|
+
debugOption = match[1];
|
|
1857
|
+
debugHost = match[3];
|
|
1858
|
+
debugPort = match[4];
|
|
1859
|
+
}
|
|
1860
|
+
if (debugOption && debugPort !== "0") {
|
|
1861
|
+
return `${debugOption}=${debugHost}:${parseInt(debugPort) + 1}`;
|
|
1862
|
+
}
|
|
1863
|
+
return arg;
|
|
1864
|
+
});
|
|
1865
|
+
}
|
|
1835
1866
|
exports.Command = Command;
|
|
1836
1867
|
});
|
|
1837
1868
|
|
|
@@ -3086,19 +3117,19 @@ var require_spinners = __commonJS((exports, module) => {
|
|
|
3086
3117
|
shark: {
|
|
3087
3118
|
interval: 120,
|
|
3088
3119
|
frames: [
|
|
3089
|
-
"
|
|
3090
|
-
"▐_
|
|
3091
|
-
"▐__
|
|
3092
|
-
"▐___
|
|
3093
|
-
"▐____
|
|
3094
|
-
"▐_____
|
|
3095
|
-
"▐______
|
|
3096
|
-
"▐_______
|
|
3097
|
-
"▐________
|
|
3098
|
-
"▐_________
|
|
3099
|
-
"▐__________
|
|
3100
|
-
"▐___________
|
|
3101
|
-
"▐____________
|
|
3120
|
+
"▐|\\____________▌",
|
|
3121
|
+
"▐_|\\___________▌",
|
|
3122
|
+
"▐__|\\__________▌",
|
|
3123
|
+
"▐___|\\_________▌",
|
|
3124
|
+
"▐____|\\________▌",
|
|
3125
|
+
"▐_____|\\_______▌",
|
|
3126
|
+
"▐______|\\______▌",
|
|
3127
|
+
"▐_______|\\_____▌",
|
|
3128
|
+
"▐________|\\____▌",
|
|
3129
|
+
"▐_________|\\___▌",
|
|
3130
|
+
"▐__________|\\__▌",
|
|
3131
|
+
"▐___________|\\_▌",
|
|
3132
|
+
"▐____________|\\▌",
|
|
3102
3133
|
"▐____________/|▌",
|
|
3103
3134
|
"▐___________/|_▌",
|
|
3104
3135
|
"▐__________/|__▌",
|
|
@@ -3577,7 +3608,7 @@ var package_default;
|
|
|
3577
3608
|
var init_package = __esm(() => {
|
|
3578
3609
|
package_default = {
|
|
3579
3610
|
name: "@s0rt/3dvf",
|
|
3580
|
-
version: "0.1.
|
|
3611
|
+
version: "0.1.5",
|
|
3581
3612
|
description: "shadcn-style Three.js function library CLI",
|
|
3582
3613
|
type: "module",
|
|
3583
3614
|
bin: {
|
|
@@ -3590,13 +3621,15 @@ var init_package = __esm(() => {
|
|
|
3590
3621
|
access: "public"
|
|
3591
3622
|
},
|
|
3592
3623
|
scripts: {
|
|
3593
|
-
build: "bun build
|
|
3594
|
-
"
|
|
3595
|
-
"
|
|
3596
|
-
dev: "bun
|
|
3624
|
+
build: "bun scripts/build-cli.ts",
|
|
3625
|
+
dev: "REGISTRY_URL=http://localhost:3001/registry bun scripts/build-cli.ts --watch",
|
|
3626
|
+
"build:registry": "bun scripts/build-registry.ts",
|
|
3627
|
+
"dev:registry": "bun scripts/dev-registry.ts",
|
|
3628
|
+
release: "bun scripts/release.ts",
|
|
3597
3629
|
test: "bun test"
|
|
3598
3630
|
},
|
|
3599
3631
|
dependencies: {
|
|
3632
|
+
"@types/three": "^0.183.1",
|
|
3600
3633
|
commander: "^12.1.0",
|
|
3601
3634
|
ora: "^8.1.1",
|
|
3602
3635
|
picocolors: "^1.1.1",
|
|
@@ -3618,8 +3651,8 @@ __export(exports_config, {
|
|
|
3618
3651
|
DEFAULT_CONFIG: () => DEFAULT_CONFIG,
|
|
3619
3652
|
CLI_VERSION: () => CLI_VERSION
|
|
3620
3653
|
});
|
|
3621
|
-
import {existsSync, readFileSync, writeFileSync} from "fs";
|
|
3622
|
-
import {join} from "path";
|
|
3654
|
+
import { existsSync, readFileSync, writeFileSync } from "fs";
|
|
3655
|
+
import { join } from "path";
|
|
3623
3656
|
function readConfig(cwd = process.cwd()) {
|
|
3624
3657
|
const configPath = join(cwd, CONFIG_FILE);
|
|
3625
3658
|
if (!existsSync(configPath)) {
|
|
@@ -3630,7 +3663,8 @@ function readConfig(cwd = process.cwd()) {
|
|
|
3630
3663
|
}
|
|
3631
3664
|
function writeConfig(config, cwd = process.cwd()) {
|
|
3632
3665
|
const configPath = join(cwd, CONFIG_FILE);
|
|
3633
|
-
writeFileSync(configPath, JSON.stringify(config, null, 2) +
|
|
3666
|
+
writeFileSync(configPath, JSON.stringify(config, null, 2) + `
|
|
3667
|
+
`, "utf-8");
|
|
3634
3668
|
}
|
|
3635
3669
|
function configExists(cwd = process.cwd()) {
|
|
3636
3670
|
return existsSync(join(cwd, CONFIG_FILE));
|
|
@@ -3648,6 +3682,36 @@ var init_config = __esm(() => {
|
|
|
3648
3682
|
|
|
3649
3683
|
// node_modules/kleur/index.js
|
|
3650
3684
|
var require_kleur = __commonJS((exports, module) => {
|
|
3685
|
+
var { FORCE_COLOR, NODE_DISABLE_COLORS, TERM } = process.env;
|
|
3686
|
+
var $ = {
|
|
3687
|
+
enabled: !NODE_DISABLE_COLORS && TERM !== "dumb" && FORCE_COLOR !== "0",
|
|
3688
|
+
reset: init(0, 0),
|
|
3689
|
+
bold: init(1, 22),
|
|
3690
|
+
dim: init(2, 22),
|
|
3691
|
+
italic: init(3, 23),
|
|
3692
|
+
underline: init(4, 24),
|
|
3693
|
+
inverse: init(7, 27),
|
|
3694
|
+
hidden: init(8, 28),
|
|
3695
|
+
strikethrough: init(9, 29),
|
|
3696
|
+
black: init(30, 39),
|
|
3697
|
+
red: init(31, 39),
|
|
3698
|
+
green: init(32, 39),
|
|
3699
|
+
yellow: init(33, 39),
|
|
3700
|
+
blue: init(34, 39),
|
|
3701
|
+
magenta: init(35, 39),
|
|
3702
|
+
cyan: init(36, 39),
|
|
3703
|
+
white: init(37, 39),
|
|
3704
|
+
gray: init(90, 39),
|
|
3705
|
+
grey: init(90, 39),
|
|
3706
|
+
bgBlack: init(40, 49),
|
|
3707
|
+
bgRed: init(41, 49),
|
|
3708
|
+
bgGreen: init(42, 49),
|
|
3709
|
+
bgYellow: init(43, 49),
|
|
3710
|
+
bgBlue: init(44, 49),
|
|
3711
|
+
bgMagenta: init(45, 49),
|
|
3712
|
+
bgCyan: init(46, 49),
|
|
3713
|
+
bgWhite: init(47, 49)
|
|
3714
|
+
};
|
|
3651
3715
|
function run(arr, str) {
|
|
3652
3716
|
let i = 0, tmp, beg = "", end = "";
|
|
3653
3717
|
for (;i < arr.length; i++) {
|
|
@@ -3704,36 +3768,6 @@ var require_kleur = __commonJS((exports, module) => {
|
|
|
3704
3768
|
return txt === undefined ? chain([open], [blk]) : $.enabled ? run([blk], txt + "") : txt + "";
|
|
3705
3769
|
};
|
|
3706
3770
|
}
|
|
3707
|
-
var { FORCE_COLOR, NODE_DISABLE_COLORS, TERM } = process.env;
|
|
3708
|
-
var $ = {
|
|
3709
|
-
enabled: !NODE_DISABLE_COLORS && TERM !== "dumb" && FORCE_COLOR !== "0",
|
|
3710
|
-
reset: init(0, 0),
|
|
3711
|
-
bold: init(1, 22),
|
|
3712
|
-
dim: init(2, 22),
|
|
3713
|
-
italic: init(3, 23),
|
|
3714
|
-
underline: init(4, 24),
|
|
3715
|
-
inverse: init(7, 27),
|
|
3716
|
-
hidden: init(8, 28),
|
|
3717
|
-
strikethrough: init(9, 29),
|
|
3718
|
-
black: init(30, 39),
|
|
3719
|
-
red: init(31, 39),
|
|
3720
|
-
green: init(32, 39),
|
|
3721
|
-
yellow: init(33, 39),
|
|
3722
|
-
blue: init(34, 39),
|
|
3723
|
-
magenta: init(35, 39),
|
|
3724
|
-
cyan: init(36, 39),
|
|
3725
|
-
white: init(37, 39),
|
|
3726
|
-
gray: init(90, 39),
|
|
3727
|
-
grey: init(90, 39),
|
|
3728
|
-
bgBlack: init(40, 49),
|
|
3729
|
-
bgRed: init(41, 49),
|
|
3730
|
-
bgGreen: init(42, 49),
|
|
3731
|
-
bgYellow: init(43, 49),
|
|
3732
|
-
bgBlue: init(44, 49),
|
|
3733
|
-
bgMagenta: init(45, 49),
|
|
3734
|
-
bgCyan: init(46, 49),
|
|
3735
|
-
bgWhite: init(47, 49)
|
|
3736
|
-
};
|
|
3737
3771
|
module.exports = $;
|
|
3738
3772
|
});
|
|
3739
3773
|
|
|
@@ -3870,8 +3904,7 @@ var require_clear = __commonJS((exports, module) => {
|
|
|
3870
3904
|
if (it)
|
|
3871
3905
|
o = it;
|
|
3872
3906
|
var i = 0;
|
|
3873
|
-
var F = function
|
|
3874
|
-
};
|
|
3907
|
+
var F = function F2() {};
|
|
3875
3908
|
return { s: F, n: function n() {
|
|
3876
3909
|
if (i >= o.length)
|
|
3877
3910
|
return { done: true };
|
|
@@ -3880,7 +3913,8 @@ var require_clear = __commonJS((exports, module) => {
|
|
|
3880
3913
|
throw _e;
|
|
3881
3914
|
}, f: F };
|
|
3882
3915
|
}
|
|
3883
|
-
throw new TypeError(
|
|
3916
|
+
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
3917
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
3884
3918
|
}
|
|
3885
3919
|
var normalCompletion = true, didErr = false, err;
|
|
3886
3920
|
return { s: function s() {
|
|
@@ -3950,18 +3984,18 @@ var require_clear = __commonJS((exports, module) => {
|
|
|
3950
3984
|
// node_modules/prompts/dist/util/figures.js
|
|
3951
3985
|
var require_figures = __commonJS((exports, module) => {
|
|
3952
3986
|
var main2 = {
|
|
3953
|
-
arrowUp: "
|
|
3954
|
-
arrowDown: "
|
|
3955
|
-
arrowLeft: "
|
|
3956
|
-
arrowRight: "
|
|
3957
|
-
radioOn: "
|
|
3958
|
-
radioOff: "
|
|
3959
|
-
tick: "
|
|
3960
|
-
cross: "
|
|
3961
|
-
ellipsis: "
|
|
3962
|
-
pointerSmall: "
|
|
3963
|
-
line: "
|
|
3964
|
-
pointer: "
|
|
3987
|
+
arrowUp: "↑",
|
|
3988
|
+
arrowDown: "↓",
|
|
3989
|
+
arrowLeft: "←",
|
|
3990
|
+
arrowRight: "→",
|
|
3991
|
+
radioOn: "◉",
|
|
3992
|
+
radioOff: "◯",
|
|
3993
|
+
tick: "✔",
|
|
3994
|
+
cross: "✖",
|
|
3995
|
+
ellipsis: "…",
|
|
3996
|
+
pointerSmall: "›",
|
|
3997
|
+
line: "─",
|
|
3998
|
+
pointer: "❯"
|
|
3965
3999
|
};
|
|
3966
4000
|
var win = {
|
|
3967
4001
|
arrowUp: main2.arrowUp,
|
|
@@ -3970,11 +4004,11 @@ var require_figures = __commonJS((exports, module) => {
|
|
|
3970
4004
|
arrowRight: main2.arrowRight,
|
|
3971
4005
|
radioOn: "(*)",
|
|
3972
4006
|
radioOff: "( )",
|
|
3973
|
-
tick: "
|
|
3974
|
-
cross: "
|
|
4007
|
+
tick: "√",
|
|
4008
|
+
cross: "×",
|
|
3975
4009
|
ellipsis: "...",
|
|
3976
|
-
pointerSmall: "
|
|
3977
|
-
line: "
|
|
4010
|
+
pointerSmall: "»",
|
|
4011
|
+
line: "─",
|
|
3978
4012
|
pointer: ">"
|
|
3979
4013
|
};
|
|
3980
4014
|
var figures = process.platform === "win32" ? win : main2;
|
|
@@ -4045,7 +4079,9 @@ var require_wrap = __commonJS((exports, module) => {
|
|
|
4045
4079
|
else
|
|
4046
4080
|
arr.push(`${tab}${w}`);
|
|
4047
4081
|
return arr;
|
|
4048
|
-
}, [tab]).join(
|
|
4082
|
+
}, [tab]).join(`
|
|
4083
|
+
`)).join(`
|
|
4084
|
+
`);
|
|
4049
4085
|
};
|
|
4050
4086
|
});
|
|
4051
4087
|
|
|
@@ -4234,7 +4270,8 @@ var require_text = __commonJS((exports, module) => {
|
|
|
4234
4270
|
this.red = false;
|
|
4235
4271
|
this.fire();
|
|
4236
4272
|
this.render();
|
|
4237
|
-
this.out.write(
|
|
4273
|
+
this.out.write(`
|
|
4274
|
+
`);
|
|
4238
4275
|
this.close();
|
|
4239
4276
|
}
|
|
4240
4277
|
validate() {
|
|
@@ -4265,7 +4302,8 @@ var require_text = __commonJS((exports, module) => {
|
|
|
4265
4302
|
_this2.aborted = false;
|
|
4266
4303
|
_this2.fire();
|
|
4267
4304
|
_this2.render();
|
|
4268
|
-
_this2.out.write(
|
|
4305
|
+
_this2.out.write(`
|
|
4306
|
+
`);
|
|
4269
4307
|
_this2.close();
|
|
4270
4308
|
})();
|
|
4271
4309
|
}
|
|
@@ -4358,7 +4396,9 @@ var require_text = __commonJS((exports, module) => {
|
|
|
4358
4396
|
this.outputError = "";
|
|
4359
4397
|
this.outputText = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(this.done), this.red ? color.red(this.rendered) : this.rendered].join(` `);
|
|
4360
4398
|
if (this.error) {
|
|
4361
|
-
this.outputError += this.errorMsg.split(
|
|
4399
|
+
this.outputError += this.errorMsg.split(`
|
|
4400
|
+
`).reduce((a, l, i) => a + `
|
|
4401
|
+
${i ? " " : figures.pointerSmall} ${color.red().italic(l)}`, ``);
|
|
4362
4402
|
}
|
|
4363
4403
|
this.out.write(erase.line + cursor.to(0) + this.outputText + cursor.save + this.outputError + cursor.restore + cursor.move(this.cursorOffset, 0));
|
|
4364
4404
|
}
|
|
@@ -4422,7 +4462,8 @@ var require_select = __commonJS((exports, module) => {
|
|
|
4422
4462
|
this.done = this.aborted = true;
|
|
4423
4463
|
this.fire();
|
|
4424
4464
|
this.render();
|
|
4425
|
-
this.out.write(
|
|
4465
|
+
this.out.write(`
|
|
4466
|
+
`);
|
|
4426
4467
|
this.close();
|
|
4427
4468
|
}
|
|
4428
4469
|
submit() {
|
|
@@ -4431,7 +4472,8 @@ var require_select = __commonJS((exports, module) => {
|
|
|
4431
4472
|
this.aborted = false;
|
|
4432
4473
|
this.fire();
|
|
4433
4474
|
this.render();
|
|
4434
|
-
this.out.write(
|
|
4475
|
+
this.out.write(`
|
|
4476
|
+
`);
|
|
4435
4477
|
this.close();
|
|
4436
4478
|
} else
|
|
4437
4479
|
this.bell();
|
|
@@ -4482,7 +4524,8 @@ var require_select = __commonJS((exports, module) => {
|
|
|
4482
4524
|
let _entriesToDisplay = entriesToDisplay(this.cursor, this.choices.length, this.optionsPerPage), startIndex = _entriesToDisplay.startIndex, endIndex = _entriesToDisplay.endIndex;
|
|
4483
4525
|
this.outputText = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(false), this.done ? this.selection.title : this.selection.disabled ? color.yellow(this.warn) : color.gray(this.hint)].join(" ");
|
|
4484
4526
|
if (!this.done) {
|
|
4485
|
-
this.outputText +=
|
|
4527
|
+
this.outputText += `
|
|
4528
|
+
`;
|
|
4486
4529
|
for (let i = startIndex;i < endIndex; i++) {
|
|
4487
4530
|
let title, prefix, desc = "", v = this.choices[i];
|
|
4488
4531
|
if (i === startIndex && startIndex > 0) {
|
|
@@ -4501,14 +4544,16 @@ var require_select = __commonJS((exports, module) => {
|
|
|
4501
4544
|
if (v.description && this.cursor === i) {
|
|
4502
4545
|
desc = ` - ${v.description}`;
|
|
4503
4546
|
if (prefix.length + title.length + desc.length >= this.out.columns || v.description.split(/\r?\n/).length > 1) {
|
|
4504
|
-
desc =
|
|
4547
|
+
desc = `
|
|
4548
|
+
` + wrap(v.description, {
|
|
4505
4549
|
margin: 3,
|
|
4506
4550
|
width: this.out.columns
|
|
4507
4551
|
});
|
|
4508
4552
|
}
|
|
4509
4553
|
}
|
|
4510
4554
|
}
|
|
4511
|
-
this.outputText += `${prefix} ${title}${color.gray(desc)}
|
|
4555
|
+
this.outputText += `${prefix} ${title}${color.gray(desc)}
|
|
4556
|
+
`;
|
|
4512
4557
|
}
|
|
4513
4558
|
}
|
|
4514
4559
|
this.out.write(this.outputText);
|
|
@@ -4550,7 +4595,8 @@ var require_toggle = __commonJS((exports, module) => {
|
|
|
4550
4595
|
this.done = this.aborted = true;
|
|
4551
4596
|
this.fire();
|
|
4552
4597
|
this.render();
|
|
4553
|
-
this.out.write(
|
|
4598
|
+
this.out.write(`
|
|
4599
|
+
`);
|
|
4554
4600
|
this.close();
|
|
4555
4601
|
}
|
|
4556
4602
|
submit() {
|
|
@@ -4558,7 +4604,8 @@ var require_toggle = __commonJS((exports, module) => {
|
|
|
4558
4604
|
this.aborted = false;
|
|
4559
4605
|
this.fire();
|
|
4560
4606
|
this.render();
|
|
4561
|
-
this.out.write(
|
|
4607
|
+
this.out.write(`
|
|
4608
|
+
`);
|
|
4562
4609
|
this.close();
|
|
4563
4610
|
}
|
|
4564
4611
|
deactivate() {
|
|
@@ -4633,16 +4680,13 @@ var require_datepart = __commonJS((exports, module) => {
|
|
|
4633
4680
|
this.parts = parts || [this];
|
|
4634
4681
|
this.locales = locales || {};
|
|
4635
4682
|
}
|
|
4636
|
-
up() {
|
|
4637
|
-
}
|
|
4638
|
-
down() {
|
|
4639
|
-
}
|
|
4683
|
+
up() {}
|
|
4684
|
+
down() {}
|
|
4640
4685
|
next() {
|
|
4641
4686
|
const currentIdx = this.parts.indexOf(this);
|
|
4642
4687
|
return this.parts.find((part, idx) => idx > currentIdx && part instanceof DatePart);
|
|
4643
4688
|
}
|
|
4644
|
-
setTo(val) {
|
|
4645
|
-
}
|
|
4689
|
+
setTo(val) {}
|
|
4646
4690
|
prev() {
|
|
4647
4691
|
let parts = [].concat(this.parts).reverse();
|
|
4648
4692
|
const currentIdx = parts.indexOf(this);
|
|
@@ -5012,7 +5056,8 @@ var require_date = __commonJS((exports, module) => {
|
|
|
5012
5056
|
this.error = false;
|
|
5013
5057
|
this.fire();
|
|
5014
5058
|
this.render();
|
|
5015
|
-
this.out.write(
|
|
5059
|
+
this.out.write(`
|
|
5060
|
+
`);
|
|
5016
5061
|
this.close();
|
|
5017
5062
|
}
|
|
5018
5063
|
validate() {
|
|
@@ -5040,7 +5085,8 @@ var require_date = __commonJS((exports, module) => {
|
|
|
5040
5085
|
_this2.aborted = false;
|
|
5041
5086
|
_this2.fire();
|
|
5042
5087
|
_this2.render();
|
|
5043
|
-
_this2.out.write(
|
|
5088
|
+
_this2.out.write(`
|
|
5089
|
+
`);
|
|
5044
5090
|
_this2.close();
|
|
5045
5091
|
})();
|
|
5046
5092
|
}
|
|
@@ -5090,7 +5136,9 @@ var require_date = __commonJS((exports, module) => {
|
|
|
5090
5136
|
super.render();
|
|
5091
5137
|
this.outputText = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(false), this.parts.reduce((arr, p, idx) => arr.concat(idx === this.cursor && !this.done ? color.cyan().underline(p.toString()) : p), []).join("")].join(" ");
|
|
5092
5138
|
if (this.error) {
|
|
5093
|
-
this.outputText += this.errorMsg.split(
|
|
5139
|
+
this.outputText += this.errorMsg.split(`
|
|
5140
|
+
`).reduce((a, l, i) => a + `
|
|
5141
|
+
${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);
|
|
5094
5142
|
}
|
|
5095
5143
|
this.out.write(erase.line + cursor.to(0) + this.outputText);
|
|
5096
5144
|
}
|
|
@@ -5202,7 +5250,8 @@ var require_number = __commonJS((exports, module) => {
|
|
|
5202
5250
|
this.error = false;
|
|
5203
5251
|
this.fire();
|
|
5204
5252
|
this.render();
|
|
5205
|
-
this.out.write(
|
|
5253
|
+
this.out.write(`
|
|
5254
|
+
`);
|
|
5206
5255
|
this.close();
|
|
5207
5256
|
}
|
|
5208
5257
|
validate() {
|
|
@@ -5233,7 +5282,8 @@ var require_number = __commonJS((exports, module) => {
|
|
|
5233
5282
|
_this2.error = false;
|
|
5234
5283
|
_this2.fire();
|
|
5235
5284
|
_this2.render();
|
|
5236
|
-
_this2.out.write(
|
|
5285
|
+
_this2.out.write(`
|
|
5286
|
+
`);
|
|
5237
5287
|
_this2.close();
|
|
5238
5288
|
})();
|
|
5239
5289
|
}
|
|
@@ -5309,7 +5359,9 @@ var require_number = __commonJS((exports, module) => {
|
|
|
5309
5359
|
this.outputError = "";
|
|
5310
5360
|
this.outputText = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(this.done), !this.done || !this.done && !this.placeholder ? color[this.color]().underline(this.rendered) : this.rendered].join(` `);
|
|
5311
5361
|
if (this.error) {
|
|
5312
|
-
this.outputError += this.errorMsg.split(
|
|
5362
|
+
this.outputError += this.errorMsg.split(`
|
|
5363
|
+
`).reduce((a, l, i) => a + `
|
|
5364
|
+
${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);
|
|
5313
5365
|
}
|
|
5314
5366
|
this.out.write(erase.line + cursor.to(0) + this.outputText + cursor.save + this.outputError + cursor.restore);
|
|
5315
5367
|
}
|
|
@@ -5378,7 +5430,8 @@ var require_multiselect = __commonJS((exports, module) => {
|
|
|
5378
5430
|
this.done = this.aborted = true;
|
|
5379
5431
|
this.fire();
|
|
5380
5432
|
this.render();
|
|
5381
|
-
this.out.write(
|
|
5433
|
+
this.out.write(`
|
|
5434
|
+
`);
|
|
5382
5435
|
this.close();
|
|
5383
5436
|
}
|
|
5384
5437
|
submit() {
|
|
@@ -5391,7 +5444,8 @@ var require_multiselect = __commonJS((exports, module) => {
|
|
|
5391
5444
|
this.aborted = false;
|
|
5392
5445
|
this.fire();
|
|
5393
5446
|
this.render();
|
|
5394
|
-
this.out.write(
|
|
5447
|
+
this.out.write(`
|
|
5448
|
+
`);
|
|
5395
5449
|
this.close();
|
|
5396
5450
|
}
|
|
5397
5451
|
}
|
|
@@ -5467,7 +5521,12 @@ var require_multiselect = __commonJS((exports, module) => {
|
|
|
5467
5521
|
if (typeof this.instructions === "string") {
|
|
5468
5522
|
return this.instructions;
|
|
5469
5523
|
}
|
|
5470
|
-
return
|
|
5524
|
+
return `
|
|
5525
|
+
Instructions:
|
|
5526
|
+
` + ` ${figures.arrowUp}/${figures.arrowDown}: Highlight option
|
|
5527
|
+
` + ` ${figures.arrowLeft}/${figures.arrowRight}/[space]: Toggle selection
|
|
5528
|
+
` + (this.maxChoices === undefined ? ` a: Toggle all
|
|
5529
|
+
` : "") + ` enter/return: Complete answer`;
|
|
5471
5530
|
}
|
|
5472
5531
|
return "";
|
|
5473
5532
|
}
|
|
@@ -5481,7 +5540,8 @@ var require_multiselect = __commonJS((exports, module) => {
|
|
|
5481
5540
|
if (cursor2 === i && v.description) {
|
|
5482
5541
|
desc = ` - ${v.description}`;
|
|
5483
5542
|
if (prefix.length + title.length + desc.length >= this.out.columns || v.description.split(/\r?\n/).length > 1) {
|
|
5484
|
-
desc =
|
|
5543
|
+
desc = `
|
|
5544
|
+
` + wrap(v.description, {
|
|
5485
5545
|
margin: prefix.length,
|
|
5486
5546
|
width: this.out.columns
|
|
5487
5547
|
});
|
|
@@ -5506,7 +5566,9 @@ var require_multiselect = __commonJS((exports, module) => {
|
|
|
5506
5566
|
}
|
|
5507
5567
|
styledOptions.push(this.renderOption(this.cursor, options[i], i, prefix));
|
|
5508
5568
|
}
|
|
5509
|
-
return
|
|
5569
|
+
return `
|
|
5570
|
+
` + styledOptions.join(`
|
|
5571
|
+
`);
|
|
5510
5572
|
}
|
|
5511
5573
|
renderOptions(options) {
|
|
5512
5574
|
if (!this.done) {
|
|
@@ -5674,7 +5736,8 @@ var require_autocomplete = __commonJS((exports, module) => {
|
|
|
5674
5736
|
this.aborted = false;
|
|
5675
5737
|
this.fire();
|
|
5676
5738
|
this.render();
|
|
5677
|
-
this.out.write(
|
|
5739
|
+
this.out.write(`
|
|
5740
|
+
`);
|
|
5678
5741
|
this.close();
|
|
5679
5742
|
}
|
|
5680
5743
|
}
|
|
@@ -5683,7 +5746,8 @@ var require_autocomplete = __commonJS((exports, module) => {
|
|
|
5683
5746
|
this.exited = false;
|
|
5684
5747
|
this.fire();
|
|
5685
5748
|
this.render();
|
|
5686
|
-
this.out.write(
|
|
5749
|
+
this.out.write(`
|
|
5750
|
+
`);
|
|
5687
5751
|
this.close();
|
|
5688
5752
|
}
|
|
5689
5753
|
submit() {
|
|
@@ -5691,7 +5755,8 @@ var require_autocomplete = __commonJS((exports, module) => {
|
|
|
5691
5755
|
this.aborted = this.exited = false;
|
|
5692
5756
|
this.fire();
|
|
5693
5757
|
this.render();
|
|
5694
|
-
this.out.write(
|
|
5758
|
+
this.out.write(`
|
|
5759
|
+
`);
|
|
5695
5760
|
this.close();
|
|
5696
5761
|
}
|
|
5697
5762
|
_(c, key) {
|
|
@@ -5780,7 +5845,8 @@ var require_autocomplete = __commonJS((exports, module) => {
|
|
|
5780
5845
|
if (v.description) {
|
|
5781
5846
|
desc = ` - ${v.description}`;
|
|
5782
5847
|
if (prefix.length + title.length + desc.length >= this.out.columns || v.description.split(/\r?\n/).length > 1) {
|
|
5783
|
-
desc =
|
|
5848
|
+
desc = `
|
|
5849
|
+
` + wrap(v.description, {
|
|
5784
5850
|
margin: 3,
|
|
5785
5851
|
width: this.out.columns
|
|
5786
5852
|
});
|
|
@@ -5799,8 +5865,10 @@ var require_autocomplete = __commonJS((exports, module) => {
|
|
|
5799
5865
|
let _entriesToDisplay = entriesToDisplay(this.select, this.choices.length, this.limit), startIndex = _entriesToDisplay.startIndex, endIndex = _entriesToDisplay.endIndex;
|
|
5800
5866
|
this.outputText = [style.symbol(this.done, this.aborted, this.exited), color.bold(this.msg), style.delimiter(this.completing), this.done && this.suggestions[this.select] ? this.suggestions[this.select].title : this.rendered = this.transform.render(this.input)].join(" ");
|
|
5801
5867
|
if (!this.done) {
|
|
5802
|
-
const suggestions = this.suggestions.slice(startIndex, endIndex).map((item, i) => this.renderOption(item, this.select === i + startIndex, i === 0 && startIndex > 0, i + startIndex === endIndex - 1 && endIndex < this.choices.length)).join(
|
|
5803
|
-
|
|
5868
|
+
const suggestions = this.suggestions.slice(startIndex, endIndex).map((item, i) => this.renderOption(item, this.select === i + startIndex, i === 0 && startIndex > 0, i + startIndex === endIndex - 1 && endIndex < this.choices.length)).join(`
|
|
5869
|
+
`);
|
|
5870
|
+
this.outputText += `
|
|
5871
|
+
` + (suggestions || color.gray(this.fallback.title));
|
|
5804
5872
|
}
|
|
5805
5873
|
this.out.write(erase.line + cursor.to(0) + this.outputText);
|
|
5806
5874
|
}
|
|
@@ -5930,7 +5998,8 @@ Instructions:
|
|
|
5930
5998
|
}
|
|
5931
5999
|
renderCurrentInput() {
|
|
5932
6000
|
return `
|
|
5933
|
-
Filtered results for: ${this.inputValue ? this.inputValue : color.gray("Enter something to filter")}
|
|
6001
|
+
Filtered results for: ${this.inputValue ? this.inputValue : color.gray("Enter something to filter")}
|
|
6002
|
+
`;
|
|
5934
6003
|
}
|
|
5935
6004
|
renderOption(cursor2, v, i) {
|
|
5936
6005
|
let title;
|
|
@@ -6004,7 +6073,8 @@ var require_confirm = __commonJS((exports, module) => {
|
|
|
6004
6073
|
this.done = this.aborted = true;
|
|
6005
6074
|
this.fire();
|
|
6006
6075
|
this.render();
|
|
6007
|
-
this.out.write(
|
|
6076
|
+
this.out.write(`
|
|
6077
|
+
`);
|
|
6008
6078
|
this.close();
|
|
6009
6079
|
}
|
|
6010
6080
|
submit() {
|
|
@@ -6013,7 +6083,8 @@ var require_confirm = __commonJS((exports, module) => {
|
|
|
6013
6083
|
this.aborted = false;
|
|
6014
6084
|
this.fire();
|
|
6015
6085
|
this.render();
|
|
6016
|
-
this.out.write(
|
|
6086
|
+
this.out.write(`
|
|
6087
|
+
`);
|
|
6017
6088
|
this.close();
|
|
6018
6089
|
}
|
|
6019
6090
|
_(c, key) {
|
|
@@ -6059,6 +6130,9 @@ var require_elements = __commonJS((exports, module) => {
|
|
|
6059
6130
|
|
|
6060
6131
|
// node_modules/prompts/dist/prompts.js
|
|
6061
6132
|
var require_prompts = __commonJS((exports) => {
|
|
6133
|
+
var $ = exports;
|
|
6134
|
+
var el = require_elements();
|
|
6135
|
+
var noop = (v) => v;
|
|
6062
6136
|
function toPrompt(type, args, opts = {}) {
|
|
6063
6137
|
return new Promise((res, rej) => {
|
|
6064
6138
|
const p = new el[type](args);
|
|
@@ -6071,9 +6145,6 @@ var require_prompts = __commonJS((exports) => {
|
|
|
6071
6145
|
p.on("abort", (x) => rej(onAbort(x)));
|
|
6072
6146
|
});
|
|
6073
6147
|
}
|
|
6074
|
-
var $ = exports;
|
|
6075
|
-
var el = require_elements();
|
|
6076
|
-
var noop = (v) => v;
|
|
6077
6148
|
$.text = (args) => toPrompt("TextPrompt", args);
|
|
6078
6149
|
$.password = (args) => {
|
|
6079
6150
|
args.style = "password";
|
|
@@ -6165,8 +6236,7 @@ var require_dist = __commonJS((exports, module) => {
|
|
|
6165
6236
|
if (it)
|
|
6166
6237
|
o = it;
|
|
6167
6238
|
var i = 0;
|
|
6168
|
-
var F = function
|
|
6169
|
-
};
|
|
6239
|
+
var F = function F2() {};
|
|
6170
6240
|
return { s: F, n: function n() {
|
|
6171
6241
|
if (i >= o.length)
|
|
6172
6242
|
return { done: true };
|
|
@@ -6175,7 +6245,8 @@ var require_dist = __commonJS((exports, module) => {
|
|
|
6175
6245
|
throw _e;
|
|
6176
6246
|
}, f: F };
|
|
6177
6247
|
}
|
|
6178
|
-
throw new TypeError(
|
|
6248
|
+
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
6249
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
6179
6250
|
}
|
|
6180
6251
|
var normalCompletion = true, didErr = false, err;
|
|
6181
6252
|
return { s: function s() {
|
|
@@ -6246,6 +6317,9 @@ var require_dist = __commonJS((exports, module) => {
|
|
|
6246
6317
|
});
|
|
6247
6318
|
};
|
|
6248
6319
|
}
|
|
6320
|
+
var prompts = require_prompts();
|
|
6321
|
+
var passOn = ["suggest", "format", "onState", "validate", "onRender", "type"];
|
|
6322
|
+
var noop = () => {};
|
|
6249
6323
|
function prompt() {
|
|
6250
6324
|
return _prompt.apply(this, arguments);
|
|
6251
6325
|
}
|
|
@@ -6265,7 +6339,7 @@ var require_dist = __commonJS((exports, module) => {
|
|
|
6265
6339
|
}
|
|
6266
6340
|
return question2.format ? yield question2.format(answer2, answers) : answer2;
|
|
6267
6341
|
});
|
|
6268
|
-
return function
|
|
6342
|
+
return function getFormattedAnswer2(_x, _x2) {
|
|
6269
6343
|
return _ref.apply(this, arguments);
|
|
6270
6344
|
};
|
|
6271
6345
|
}();
|
|
@@ -6337,10 +6411,6 @@ var require_dist = __commonJS((exports, module) => {
|
|
|
6337
6411
|
function override(answers) {
|
|
6338
6412
|
prompt._override = Object.assign({}, answers);
|
|
6339
6413
|
}
|
|
6340
|
-
var prompts = require_prompts();
|
|
6341
|
-
var passOn = ["suggest", "format", "onState", "validate", "onRender", "type"];
|
|
6342
|
-
var noop = () => {
|
|
6343
|
-
};
|
|
6344
6414
|
module.exports = Object.assign(prompt, {
|
|
6345
6415
|
prompt,
|
|
6346
6416
|
prompts,
|
|
@@ -6438,18 +6508,18 @@ var require_clear2 = __commonJS((exports, module) => {
|
|
|
6438
6508
|
// node_modules/prompts/lib/util/figures.js
|
|
6439
6509
|
var require_figures2 = __commonJS((exports, module) => {
|
|
6440
6510
|
var main2 = {
|
|
6441
|
-
arrowUp: "
|
|
6442
|
-
arrowDown: "
|
|
6443
|
-
arrowLeft: "
|
|
6444
|
-
arrowRight: "
|
|
6445
|
-
radioOn: "
|
|
6446
|
-
radioOff: "
|
|
6447
|
-
tick: "
|
|
6448
|
-
cross: "
|
|
6449
|
-
ellipsis: "
|
|
6450
|
-
pointerSmall: "
|
|
6451
|
-
line: "
|
|
6452
|
-
pointer: "
|
|
6511
|
+
arrowUp: "↑",
|
|
6512
|
+
arrowDown: "↓",
|
|
6513
|
+
arrowLeft: "←",
|
|
6514
|
+
arrowRight: "→",
|
|
6515
|
+
radioOn: "◉",
|
|
6516
|
+
radioOff: "◯",
|
|
6517
|
+
tick: "✔",
|
|
6518
|
+
cross: "✖",
|
|
6519
|
+
ellipsis: "…",
|
|
6520
|
+
pointerSmall: "›",
|
|
6521
|
+
line: "─",
|
|
6522
|
+
pointer: "❯"
|
|
6453
6523
|
};
|
|
6454
6524
|
var win = {
|
|
6455
6525
|
arrowUp: main2.arrowUp,
|
|
@@ -6458,11 +6528,11 @@ var require_figures2 = __commonJS((exports, module) => {
|
|
|
6458
6528
|
arrowRight: main2.arrowRight,
|
|
6459
6529
|
radioOn: "(*)",
|
|
6460
6530
|
radioOff: "( )",
|
|
6461
|
-
tick: "
|
|
6462
|
-
cross: "
|
|
6531
|
+
tick: "√",
|
|
6532
|
+
cross: "×",
|
|
6463
6533
|
ellipsis: "...",
|
|
6464
|
-
pointerSmall: "
|
|
6465
|
-
line: "
|
|
6534
|
+
pointerSmall: "»",
|
|
6535
|
+
line: "─",
|
|
6466
6536
|
pointer: ">"
|
|
6467
6537
|
};
|
|
6468
6538
|
var figures = process.platform === "win32" ? win : main2;
|
|
@@ -6521,7 +6591,9 @@ var require_wrap2 = __commonJS((exports, module) => {
|
|
|
6521
6591
|
else
|
|
6522
6592
|
arr.push(`${tab}${w}`);
|
|
6523
6593
|
return arr;
|
|
6524
|
-
}, [tab]).join(
|
|
6594
|
+
}, [tab]).join(`
|
|
6595
|
+
`)).join(`
|
|
6596
|
+
`);
|
|
6525
6597
|
};
|
|
6526
6598
|
});
|
|
6527
6599
|
|
|
@@ -6666,7 +6738,8 @@ var require_text2 = __commonJS((exports, module) => {
|
|
|
6666
6738
|
this.red = false;
|
|
6667
6739
|
this.fire();
|
|
6668
6740
|
this.render();
|
|
6669
|
-
this.out.write(
|
|
6741
|
+
this.out.write(`
|
|
6742
|
+
`);
|
|
6670
6743
|
this.close();
|
|
6671
6744
|
}
|
|
6672
6745
|
async validate() {
|
|
@@ -6692,7 +6765,8 @@ var require_text2 = __commonJS((exports, module) => {
|
|
|
6692
6765
|
this.aborted = false;
|
|
6693
6766
|
this.fire();
|
|
6694
6767
|
this.render();
|
|
6695
|
-
this.out.write(
|
|
6768
|
+
this.out.write(`
|
|
6769
|
+
`);
|
|
6696
6770
|
this.close();
|
|
6697
6771
|
}
|
|
6698
6772
|
next() {
|
|
@@ -6789,7 +6863,9 @@ var require_text2 = __commonJS((exports, module) => {
|
|
|
6789
6863
|
this.red ? color.red(this.rendered) : this.rendered
|
|
6790
6864
|
].join(` `);
|
|
6791
6865
|
if (this.error) {
|
|
6792
|
-
this.outputError += this.errorMsg.split(
|
|
6866
|
+
this.outputError += this.errorMsg.split(`
|
|
6867
|
+
`).reduce((a, l, i) => a + `
|
|
6868
|
+
${i ? " " : figures.pointerSmall} ${color.red().italic(l)}`, ``);
|
|
6793
6869
|
}
|
|
6794
6870
|
this.out.write(erase.line + cursor.to(0) + this.outputText + cursor.save + this.outputError + cursor.restore + cursor.move(this.cursorOffset, 0));
|
|
6795
6871
|
}
|
|
@@ -6844,7 +6920,8 @@ var require_select2 = __commonJS((exports, module) => {
|
|
|
6844
6920
|
this.done = this.aborted = true;
|
|
6845
6921
|
this.fire();
|
|
6846
6922
|
this.render();
|
|
6847
|
-
this.out.write(
|
|
6923
|
+
this.out.write(`
|
|
6924
|
+
`);
|
|
6848
6925
|
this.close();
|
|
6849
6926
|
}
|
|
6850
6927
|
submit() {
|
|
@@ -6853,7 +6930,8 @@ var require_select2 = __commonJS((exports, module) => {
|
|
|
6853
6930
|
this.aborted = false;
|
|
6854
6931
|
this.fire();
|
|
6855
6932
|
this.render();
|
|
6856
|
-
this.out.write(
|
|
6933
|
+
this.out.write(`
|
|
6934
|
+
`);
|
|
6857
6935
|
this.close();
|
|
6858
6936
|
} else
|
|
6859
6937
|
this.bell();
|
|
@@ -6909,7 +6987,8 @@ var require_select2 = __commonJS((exports, module) => {
|
|
|
6909
6987
|
this.done ? this.selection.title : this.selection.disabled ? color.yellow(this.warn) : color.gray(this.hint)
|
|
6910
6988
|
].join(" ");
|
|
6911
6989
|
if (!this.done) {
|
|
6912
|
-
this.outputText +=
|
|
6990
|
+
this.outputText += `
|
|
6991
|
+
`;
|
|
6913
6992
|
for (let i = startIndex;i < endIndex; i++) {
|
|
6914
6993
|
let title, prefix, desc = "", v = this.choices[i];
|
|
6915
6994
|
if (i === startIndex && startIndex > 0) {
|
|
@@ -6928,11 +7007,13 @@ var require_select2 = __commonJS((exports, module) => {
|
|
|
6928
7007
|
if (v.description && this.cursor === i) {
|
|
6929
7008
|
desc = ` - ${v.description}`;
|
|
6930
7009
|
if (prefix.length + title.length + desc.length >= this.out.columns || v.description.split(/\r?\n/).length > 1) {
|
|
6931
|
-
desc =
|
|
7010
|
+
desc = `
|
|
7011
|
+
` + wrap(v.description, { margin: 3, width: this.out.columns });
|
|
6932
7012
|
}
|
|
6933
7013
|
}
|
|
6934
7014
|
}
|
|
6935
|
-
this.outputText += `${prefix} ${title}${color.gray(desc)}
|
|
7015
|
+
this.outputText += `${prefix} ${title}${color.gray(desc)}
|
|
7016
|
+
`;
|
|
6936
7017
|
}
|
|
6937
7018
|
}
|
|
6938
7019
|
this.out.write(this.outputText);
|
|
@@ -6970,7 +7051,8 @@ var require_toggle2 = __commonJS((exports, module) => {
|
|
|
6970
7051
|
this.done = this.aborted = true;
|
|
6971
7052
|
this.fire();
|
|
6972
7053
|
this.render();
|
|
6973
|
-
this.out.write(
|
|
7054
|
+
this.out.write(`
|
|
7055
|
+
`);
|
|
6974
7056
|
this.close();
|
|
6975
7057
|
}
|
|
6976
7058
|
submit() {
|
|
@@ -6978,7 +7060,8 @@ var require_toggle2 = __commonJS((exports, module) => {
|
|
|
6978
7060
|
this.aborted = false;
|
|
6979
7061
|
this.fire();
|
|
6980
7062
|
this.render();
|
|
6981
|
-
this.out.write(
|
|
7063
|
+
this.out.write(`
|
|
7064
|
+
`);
|
|
6982
7065
|
this.close();
|
|
6983
7066
|
}
|
|
6984
7067
|
deactivate() {
|
|
@@ -7055,16 +7138,13 @@ var require_datepart2 = __commonJS((exports, module) => {
|
|
|
7055
7138
|
this.parts = parts || [this];
|
|
7056
7139
|
this.locales = locales || {};
|
|
7057
7140
|
}
|
|
7058
|
-
up() {
|
|
7059
|
-
}
|
|
7060
|
-
down() {
|
|
7061
|
-
}
|
|
7141
|
+
up() {}
|
|
7142
|
+
down() {}
|
|
7062
7143
|
next() {
|
|
7063
7144
|
const currentIdx = this.parts.indexOf(this);
|
|
7064
7145
|
return this.parts.find((part, idx) => idx > currentIdx && part instanceof DatePart);
|
|
7065
7146
|
}
|
|
7066
|
-
setTo(val) {
|
|
7067
|
-
}
|
|
7147
|
+
setTo(val) {}
|
|
7068
7148
|
prev() {
|
|
7069
7149
|
let parts = [].concat(this.parts).reverse();
|
|
7070
7150
|
const currentIdx = parts.indexOf(this);
|
|
@@ -7384,7 +7464,8 @@ var require_date2 = __commonJS((exports, module) => {
|
|
|
7384
7464
|
this.error = false;
|
|
7385
7465
|
this.fire();
|
|
7386
7466
|
this.render();
|
|
7387
|
-
this.out.write(
|
|
7467
|
+
this.out.write(`
|
|
7468
|
+
`);
|
|
7388
7469
|
this.close();
|
|
7389
7470
|
}
|
|
7390
7471
|
async validate() {
|
|
@@ -7407,7 +7488,8 @@ var require_date2 = __commonJS((exports, module) => {
|
|
|
7407
7488
|
this.aborted = false;
|
|
7408
7489
|
this.fire();
|
|
7409
7490
|
this.render();
|
|
7410
|
-
this.out.write(
|
|
7491
|
+
this.out.write(`
|
|
7492
|
+
`);
|
|
7411
7493
|
this.close();
|
|
7412
7494
|
}
|
|
7413
7495
|
up() {
|
|
@@ -7461,7 +7543,9 @@ var require_date2 = __commonJS((exports, module) => {
|
|
|
7461
7543
|
this.parts.reduce((arr, p, idx) => arr.concat(idx === this.cursor && !this.done ? color.cyan().underline(p.toString()) : p), []).join("")
|
|
7462
7544
|
].join(" ");
|
|
7463
7545
|
if (this.error) {
|
|
7464
|
-
this.outputText += this.errorMsg.split(
|
|
7546
|
+
this.outputText += this.errorMsg.split(`
|
|
7547
|
+
`).reduce((a, l, i) => a + `
|
|
7548
|
+
${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);
|
|
7465
7549
|
}
|
|
7466
7550
|
this.out.write(erase.line + cursor.to(0) + this.outputText);
|
|
7467
7551
|
}
|
|
@@ -7538,7 +7622,8 @@ var require_number2 = __commonJS((exports, module) => {
|
|
|
7538
7622
|
this.error = false;
|
|
7539
7623
|
this.fire();
|
|
7540
7624
|
this.render();
|
|
7541
|
-
this.out.write(
|
|
7625
|
+
this.out.write(`
|
|
7626
|
+
`);
|
|
7542
7627
|
this.close();
|
|
7543
7628
|
}
|
|
7544
7629
|
async validate() {
|
|
@@ -7564,7 +7649,8 @@ var require_number2 = __commonJS((exports, module) => {
|
|
|
7564
7649
|
this.error = false;
|
|
7565
7650
|
this.fire();
|
|
7566
7651
|
this.render();
|
|
7567
|
-
this.out.write(
|
|
7652
|
+
this.out.write(`
|
|
7653
|
+
`);
|
|
7568
7654
|
this.close();
|
|
7569
7655
|
}
|
|
7570
7656
|
up() {
|
|
@@ -7644,7 +7730,9 @@ var require_number2 = __commonJS((exports, module) => {
|
|
|
7644
7730
|
!this.done || !this.done && !this.placeholder ? color[this.color]().underline(this.rendered) : this.rendered
|
|
7645
7731
|
].join(` `);
|
|
7646
7732
|
if (this.error) {
|
|
7647
|
-
this.outputError += this.errorMsg.split(
|
|
7733
|
+
this.outputError += this.errorMsg.split(`
|
|
7734
|
+
`).reduce((a, l, i) => a + `
|
|
7735
|
+
${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);
|
|
7648
7736
|
}
|
|
7649
7737
|
this.out.write(erase.line + cursor.to(0) + this.outputText + cursor.save + this.outputError + cursor.restore);
|
|
7650
7738
|
}
|
|
@@ -7704,7 +7792,8 @@ var require_multiselect2 = __commonJS((exports, module) => {
|
|
|
7704
7792
|
this.done = this.aborted = true;
|
|
7705
7793
|
this.fire();
|
|
7706
7794
|
this.render();
|
|
7707
|
-
this.out.write(
|
|
7795
|
+
this.out.write(`
|
|
7796
|
+
`);
|
|
7708
7797
|
this.close();
|
|
7709
7798
|
}
|
|
7710
7799
|
submit() {
|
|
@@ -7717,7 +7806,8 @@ var require_multiselect2 = __commonJS((exports, module) => {
|
|
|
7717
7806
|
this.aborted = false;
|
|
7718
7807
|
this.fire();
|
|
7719
7808
|
this.render();
|
|
7720
|
-
this.out.write(
|
|
7809
|
+
this.out.write(`
|
|
7810
|
+
`);
|
|
7721
7811
|
this.close();
|
|
7722
7812
|
}
|
|
7723
7813
|
}
|
|
@@ -7793,7 +7883,12 @@ var require_multiselect2 = __commonJS((exports, module) => {
|
|
|
7793
7883
|
if (typeof this.instructions === "string") {
|
|
7794
7884
|
return this.instructions;
|
|
7795
7885
|
}
|
|
7796
|
-
return
|
|
7886
|
+
return `
|
|
7887
|
+
Instructions:
|
|
7888
|
+
` + ` ${figures.arrowUp}/${figures.arrowDown}: Highlight option
|
|
7889
|
+
` + ` ${figures.arrowLeft}/${figures.arrowRight}/[space]: Toggle selection
|
|
7890
|
+
` + (this.maxChoices === undefined ? ` a: Toggle all
|
|
7891
|
+
` : "") + ` enter/return: Complete answer`;
|
|
7797
7892
|
}
|
|
7798
7893
|
return "";
|
|
7799
7894
|
}
|
|
@@ -7807,7 +7902,8 @@ var require_multiselect2 = __commonJS((exports, module) => {
|
|
|
7807
7902
|
if (cursor2 === i && v.description) {
|
|
7808
7903
|
desc = ` - ${v.description}`;
|
|
7809
7904
|
if (prefix.length + title.length + desc.length >= this.out.columns || v.description.split(/\r?\n/).length > 1) {
|
|
7810
|
-
desc =
|
|
7905
|
+
desc = `
|
|
7906
|
+
` + wrap(v.description, { margin: prefix.length, width: this.out.columns });
|
|
7811
7907
|
}
|
|
7812
7908
|
}
|
|
7813
7909
|
}
|
|
@@ -7829,7 +7925,9 @@ var require_multiselect2 = __commonJS((exports, module) => {
|
|
|
7829
7925
|
}
|
|
7830
7926
|
styledOptions.push(this.renderOption(this.cursor, options[i], i, prefix));
|
|
7831
7927
|
}
|
|
7832
|
-
return
|
|
7928
|
+
return `
|
|
7929
|
+
` + styledOptions.join(`
|
|
7930
|
+
`);
|
|
7833
7931
|
}
|
|
7834
7932
|
renderOptions(options) {
|
|
7835
7933
|
if (!this.done) {
|
|
@@ -7953,7 +8051,8 @@ var require_autocomplete2 = __commonJS((exports, module) => {
|
|
|
7953
8051
|
this.aborted = false;
|
|
7954
8052
|
this.fire();
|
|
7955
8053
|
this.render();
|
|
7956
|
-
this.out.write(
|
|
8054
|
+
this.out.write(`
|
|
8055
|
+
`);
|
|
7957
8056
|
this.close();
|
|
7958
8057
|
}
|
|
7959
8058
|
}
|
|
@@ -7962,7 +8061,8 @@ var require_autocomplete2 = __commonJS((exports, module) => {
|
|
|
7962
8061
|
this.exited = false;
|
|
7963
8062
|
this.fire();
|
|
7964
8063
|
this.render();
|
|
7965
|
-
this.out.write(
|
|
8064
|
+
this.out.write(`
|
|
8065
|
+
`);
|
|
7966
8066
|
this.close();
|
|
7967
8067
|
}
|
|
7968
8068
|
submit() {
|
|
@@ -7970,7 +8070,8 @@ var require_autocomplete2 = __commonJS((exports, module) => {
|
|
|
7970
8070
|
this.aborted = this.exited = false;
|
|
7971
8071
|
this.fire();
|
|
7972
8072
|
this.render();
|
|
7973
|
-
this.out.write(
|
|
8073
|
+
this.out.write(`
|
|
8074
|
+
`);
|
|
7974
8075
|
this.close();
|
|
7975
8076
|
}
|
|
7976
8077
|
_(c, key) {
|
|
@@ -8059,7 +8160,8 @@ var require_autocomplete2 = __commonJS((exports, module) => {
|
|
|
8059
8160
|
if (v.description) {
|
|
8060
8161
|
desc = ` - ${v.description}`;
|
|
8061
8162
|
if (prefix.length + title.length + desc.length >= this.out.columns || v.description.split(/\r?\n/).length > 1) {
|
|
8062
|
-
desc =
|
|
8163
|
+
desc = `
|
|
8164
|
+
` + wrap(v.description, { margin: 3, width: this.out.columns });
|
|
8063
8165
|
}
|
|
8064
8166
|
}
|
|
8065
8167
|
return prefix + " " + title + color.gray(desc || "");
|
|
@@ -8080,8 +8182,10 @@ var require_autocomplete2 = __commonJS((exports, module) => {
|
|
|
8080
8182
|
this.done && this.suggestions[this.select] ? this.suggestions[this.select].title : this.rendered = this.transform.render(this.input)
|
|
8081
8183
|
].join(" ");
|
|
8082
8184
|
if (!this.done) {
|
|
8083
|
-
const suggestions = this.suggestions.slice(startIndex, endIndex).map((item, i) => this.renderOption(item, this.select === i + startIndex, i === 0 && startIndex > 0, i + startIndex === endIndex - 1 && endIndex < this.choices.length)).join(
|
|
8084
|
-
|
|
8185
|
+
const suggestions = this.suggestions.slice(startIndex, endIndex).map((item, i) => this.renderOption(item, this.select === i + startIndex, i === 0 && startIndex > 0, i + startIndex === endIndex - 1 && endIndex < this.choices.length)).join(`
|
|
8186
|
+
`);
|
|
8187
|
+
this.outputText += `
|
|
8188
|
+
` + (suggestions || color.gray(this.fallback.title));
|
|
8085
8189
|
}
|
|
8086
8190
|
this.out.write(erase.line + cursor.to(0) + this.outputText);
|
|
8087
8191
|
}
|
|
@@ -8207,7 +8311,8 @@ Instructions:
|
|
|
8207
8311
|
}
|
|
8208
8312
|
renderCurrentInput() {
|
|
8209
8313
|
return `
|
|
8210
|
-
Filtered results for: ${this.inputValue ? this.inputValue : color.gray("Enter something to filter")}
|
|
8314
|
+
Filtered results for: ${this.inputValue ? this.inputValue : color.gray("Enter something to filter")}
|
|
8315
|
+
`;
|
|
8211
8316
|
}
|
|
8212
8317
|
renderOption(cursor2, v, i) {
|
|
8213
8318
|
let title;
|
|
@@ -8282,7 +8387,8 @@ var require_confirm2 = __commonJS((exports, module) => {
|
|
|
8282
8387
|
this.done = this.aborted = true;
|
|
8283
8388
|
this.fire();
|
|
8284
8389
|
this.render();
|
|
8285
|
-
this.out.write(
|
|
8390
|
+
this.out.write(`
|
|
8391
|
+
`);
|
|
8286
8392
|
this.close();
|
|
8287
8393
|
}
|
|
8288
8394
|
submit() {
|
|
@@ -8291,7 +8397,8 @@ var require_confirm2 = __commonJS((exports, module) => {
|
|
|
8291
8397
|
this.aborted = false;
|
|
8292
8398
|
this.fire();
|
|
8293
8399
|
this.render();
|
|
8294
|
-
this.out.write(
|
|
8400
|
+
this.out.write(`
|
|
8401
|
+
`);
|
|
8295
8402
|
this.close();
|
|
8296
8403
|
}
|
|
8297
8404
|
_(c, key) {
|
|
@@ -8342,6 +8449,9 @@ var require_elements2 = __commonJS((exports, module) => {
|
|
|
8342
8449
|
|
|
8343
8450
|
// node_modules/prompts/lib/prompts.js
|
|
8344
8451
|
var require_prompts2 = __commonJS((exports) => {
|
|
8452
|
+
var $ = exports;
|
|
8453
|
+
var el = require_elements2();
|
|
8454
|
+
var noop = (v) => v;
|
|
8345
8455
|
function toPrompt(type, args, opts = {}) {
|
|
8346
8456
|
return new Promise((res, rej) => {
|
|
8347
8457
|
const p = new el[type](args);
|
|
@@ -8354,9 +8464,6 @@ var require_prompts2 = __commonJS((exports) => {
|
|
|
8354
8464
|
p.on("abort", (x) => rej(onAbort(x)));
|
|
8355
8465
|
});
|
|
8356
8466
|
}
|
|
8357
|
-
var $ = exports;
|
|
8358
|
-
var el = require_elements2();
|
|
8359
|
-
var noop = (v) => v;
|
|
8360
8467
|
$.text = (args) => toPrompt("TextPrompt", args);
|
|
8361
8468
|
$.password = (args) => {
|
|
8362
8469
|
args.style = "password";
|
|
@@ -8403,6 +8510,9 @@ var require_prompts2 = __commonJS((exports) => {
|
|
|
8403
8510
|
|
|
8404
8511
|
// node_modules/prompts/lib/index.js
|
|
8405
8512
|
var require_lib = __commonJS((exports, module) => {
|
|
8513
|
+
var prompts = require_prompts2();
|
|
8514
|
+
var passOn = ["suggest", "format", "onState", "validate", "onRender", "type"];
|
|
8515
|
+
var noop = () => {};
|
|
8406
8516
|
async function prompt(questions = [], { onSubmit = noop, onCancel = noop } = {}) {
|
|
8407
8517
|
const answers = {};
|
|
8408
8518
|
const override2 = prompt._override || {};
|
|
@@ -8468,10 +8578,6 @@ var require_lib = __commonJS((exports, module) => {
|
|
|
8468
8578
|
function override(answers) {
|
|
8469
8579
|
prompt._override = Object.assign({}, answers);
|
|
8470
8580
|
}
|
|
8471
|
-
var prompts = require_prompts2();
|
|
8472
|
-
var passOn = ["suggest", "format", "onState", "validate", "onRender", "type"];
|
|
8473
|
-
var noop = () => {
|
|
8474
|
-
};
|
|
8475
8581
|
module.exports = Object.assign(prompt, { prompt, prompts, inject, override });
|
|
8476
8582
|
});
|
|
8477
8583
|
|
|
@@ -8492,7 +8598,7 @@ var require_prompts3 = __commonJS((exports, module) => {
|
|
|
8492
8598
|
});
|
|
8493
8599
|
|
|
8494
8600
|
// node_modules/commander/esm.mjs
|
|
8495
|
-
var
|
|
8601
|
+
var import__ = __toESM(require_commander(), 1);
|
|
8496
8602
|
var {
|
|
8497
8603
|
program,
|
|
8498
8604
|
createCommand,
|
|
@@ -8505,12 +8611,73 @@ var {
|
|
|
8505
8611
|
Argument,
|
|
8506
8612
|
Option,
|
|
8507
8613
|
Help
|
|
8508
|
-
} =
|
|
8614
|
+
} = import__.default;
|
|
8509
8615
|
|
|
8510
8616
|
// node_modules/ora/index.js
|
|
8511
8617
|
import process9 from "node:process";
|
|
8512
8618
|
|
|
8513
8619
|
// node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
8620
|
+
var ANSI_BACKGROUND_OFFSET = 10;
|
|
8621
|
+
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
8622
|
+
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
8623
|
+
var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
|
|
8624
|
+
var styles = {
|
|
8625
|
+
modifier: {
|
|
8626
|
+
reset: [0, 0],
|
|
8627
|
+
bold: [1, 22],
|
|
8628
|
+
dim: [2, 22],
|
|
8629
|
+
italic: [3, 23],
|
|
8630
|
+
underline: [4, 24],
|
|
8631
|
+
overline: [53, 55],
|
|
8632
|
+
inverse: [7, 27],
|
|
8633
|
+
hidden: [8, 28],
|
|
8634
|
+
strikethrough: [9, 29]
|
|
8635
|
+
},
|
|
8636
|
+
color: {
|
|
8637
|
+
black: [30, 39],
|
|
8638
|
+
red: [31, 39],
|
|
8639
|
+
green: [32, 39],
|
|
8640
|
+
yellow: [33, 39],
|
|
8641
|
+
blue: [34, 39],
|
|
8642
|
+
magenta: [35, 39],
|
|
8643
|
+
cyan: [36, 39],
|
|
8644
|
+
white: [37, 39],
|
|
8645
|
+
blackBright: [90, 39],
|
|
8646
|
+
gray: [90, 39],
|
|
8647
|
+
grey: [90, 39],
|
|
8648
|
+
redBright: [91, 39],
|
|
8649
|
+
greenBright: [92, 39],
|
|
8650
|
+
yellowBright: [93, 39],
|
|
8651
|
+
blueBright: [94, 39],
|
|
8652
|
+
magentaBright: [95, 39],
|
|
8653
|
+
cyanBright: [96, 39],
|
|
8654
|
+
whiteBright: [97, 39]
|
|
8655
|
+
},
|
|
8656
|
+
bgColor: {
|
|
8657
|
+
bgBlack: [40, 49],
|
|
8658
|
+
bgRed: [41, 49],
|
|
8659
|
+
bgGreen: [42, 49],
|
|
8660
|
+
bgYellow: [43, 49],
|
|
8661
|
+
bgBlue: [44, 49],
|
|
8662
|
+
bgMagenta: [45, 49],
|
|
8663
|
+
bgCyan: [46, 49],
|
|
8664
|
+
bgWhite: [47, 49],
|
|
8665
|
+
bgBlackBright: [100, 49],
|
|
8666
|
+
bgGray: [100, 49],
|
|
8667
|
+
bgGrey: [100, 49],
|
|
8668
|
+
bgRedBright: [101, 49],
|
|
8669
|
+
bgGreenBright: [102, 49],
|
|
8670
|
+
bgYellowBright: [103, 49],
|
|
8671
|
+
bgBlueBright: [104, 49],
|
|
8672
|
+
bgMagentaBright: [105, 49],
|
|
8673
|
+
bgCyanBright: [106, 49],
|
|
8674
|
+
bgWhiteBright: [107, 49]
|
|
8675
|
+
}
|
|
8676
|
+
};
|
|
8677
|
+
var modifierNames = Object.keys(styles.modifier);
|
|
8678
|
+
var foregroundColorNames = Object.keys(styles.color);
|
|
8679
|
+
var backgroundColorNames = Object.keys(styles.bgColor);
|
|
8680
|
+
var colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
8514
8681
|
function assembleStyles() {
|
|
8515
8682
|
const codes = new Map;
|
|
8516
8683
|
for (const [groupName, group] of Object.entries(styles)) {
|
|
@@ -8623,67 +8790,6 @@ function assembleStyles() {
|
|
|
8623
8790
|
});
|
|
8624
8791
|
return styles;
|
|
8625
8792
|
}
|
|
8626
|
-
var ANSI_BACKGROUND_OFFSET = 10;
|
|
8627
|
-
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
8628
|
-
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
8629
|
-
var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
|
|
8630
|
-
var styles = {
|
|
8631
|
-
modifier: {
|
|
8632
|
-
reset: [0, 0],
|
|
8633
|
-
bold: [1, 22],
|
|
8634
|
-
dim: [2, 22],
|
|
8635
|
-
italic: [3, 23],
|
|
8636
|
-
underline: [4, 24],
|
|
8637
|
-
overline: [53, 55],
|
|
8638
|
-
inverse: [7, 27],
|
|
8639
|
-
hidden: [8, 28],
|
|
8640
|
-
strikethrough: [9, 29]
|
|
8641
|
-
},
|
|
8642
|
-
color: {
|
|
8643
|
-
black: [30, 39],
|
|
8644
|
-
red: [31, 39],
|
|
8645
|
-
green: [32, 39],
|
|
8646
|
-
yellow: [33, 39],
|
|
8647
|
-
blue: [34, 39],
|
|
8648
|
-
magenta: [35, 39],
|
|
8649
|
-
cyan: [36, 39],
|
|
8650
|
-
white: [37, 39],
|
|
8651
|
-
blackBright: [90, 39],
|
|
8652
|
-
gray: [90, 39],
|
|
8653
|
-
grey: [90, 39],
|
|
8654
|
-
redBright: [91, 39],
|
|
8655
|
-
greenBright: [92, 39],
|
|
8656
|
-
yellowBright: [93, 39],
|
|
8657
|
-
blueBright: [94, 39],
|
|
8658
|
-
magentaBright: [95, 39],
|
|
8659
|
-
cyanBright: [96, 39],
|
|
8660
|
-
whiteBright: [97, 39]
|
|
8661
|
-
},
|
|
8662
|
-
bgColor: {
|
|
8663
|
-
bgBlack: [40, 49],
|
|
8664
|
-
bgRed: [41, 49],
|
|
8665
|
-
bgGreen: [42, 49],
|
|
8666
|
-
bgYellow: [43, 49],
|
|
8667
|
-
bgBlue: [44, 49],
|
|
8668
|
-
bgMagenta: [45, 49],
|
|
8669
|
-
bgCyan: [46, 49],
|
|
8670
|
-
bgWhite: [47, 49],
|
|
8671
|
-
bgBlackBright: [100, 49],
|
|
8672
|
-
bgGray: [100, 49],
|
|
8673
|
-
bgGrey: [100, 49],
|
|
8674
|
-
bgRedBright: [101, 49],
|
|
8675
|
-
bgGreenBright: [102, 49],
|
|
8676
|
-
bgYellowBright: [103, 49],
|
|
8677
|
-
bgBlueBright: [104, 49],
|
|
8678
|
-
bgMagentaBright: [105, 49],
|
|
8679
|
-
bgCyanBright: [106, 49],
|
|
8680
|
-
bgWhiteBright: [107, 49]
|
|
8681
|
-
}
|
|
8682
|
-
};
|
|
8683
|
-
var modifierNames = Object.keys(styles.modifier);
|
|
8684
|
-
var foregroundColorNames = Object.keys(styles.color);
|
|
8685
|
-
var backgroundColorNames = Object.keys(styles.bgColor);
|
|
8686
|
-
var colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
8687
8793
|
var ansiStyles = assembleStyles();
|
|
8688
8794
|
var ansi_styles_default = ansiStyles;
|
|
8689
8795
|
|
|
@@ -8697,6 +8803,13 @@ function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process2.
|
|
|
8697
8803
|
const terminatorPosition = argv.indexOf("--");
|
|
8698
8804
|
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
8699
8805
|
}
|
|
8806
|
+
var { env } = process2;
|
|
8807
|
+
var flagForceColor;
|
|
8808
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
8809
|
+
flagForceColor = 0;
|
|
8810
|
+
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
8811
|
+
flagForceColor = 1;
|
|
8812
|
+
}
|
|
8700
8813
|
function envForceColor() {
|
|
8701
8814
|
if ("FORCE_COLOR" in env) {
|
|
8702
8815
|
if (env.FORCE_COLOR === "true") {
|
|
@@ -8806,13 +8919,6 @@ function createSupportsColor(stream, options = {}) {
|
|
|
8806
8919
|
});
|
|
8807
8920
|
return translateLevel(level);
|
|
8808
8921
|
}
|
|
8809
|
-
var { env } = process2;
|
|
8810
|
-
var flagForceColor;
|
|
8811
|
-
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
8812
|
-
flagForceColor = 0;
|
|
8813
|
-
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
8814
|
-
flagForceColor = 1;
|
|
8815
|
-
}
|
|
8816
8922
|
var supportsColor = {
|
|
8817
8923
|
stdout: createSupportsColor({ isTTY: tty.isatty(1) }),
|
|
8818
8924
|
stderr: createSupportsColor({ isTTY: tty.isatty(2) })
|
|
@@ -8841,18 +8947,18 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
|
8841
8947
|
let returnValue = "";
|
|
8842
8948
|
do {
|
|
8843
8949
|
const gotCR = string[index - 1] === "\r";
|
|
8844
|
-
returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ?
|
|
8950
|
+
returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? `\r
|
|
8951
|
+
` : `
|
|
8952
|
+
`) + postfix;
|
|
8845
8953
|
endIndex = index + 1;
|
|
8846
|
-
index = string.indexOf(
|
|
8954
|
+
index = string.indexOf(`
|
|
8955
|
+
`, endIndex);
|
|
8847
8956
|
} while (index !== -1);
|
|
8848
8957
|
returnValue += string.slice(endIndex);
|
|
8849
8958
|
return returnValue;
|
|
8850
8959
|
}
|
|
8851
8960
|
|
|
8852
8961
|
// node_modules/chalk/source/index.js
|
|
8853
|
-
function createChalk(options) {
|
|
8854
|
-
return chalkFactory(options);
|
|
8855
|
-
}
|
|
8856
8962
|
var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
|
|
8857
8963
|
var GENERATOR = Symbol("GENERATOR");
|
|
8858
8964
|
var STYLER = Symbol("STYLER");
|
|
@@ -8877,6 +8983,9 @@ var chalkFactory = (options) => {
|
|
|
8877
8983
|
Object.setPrototypeOf(chalk, createChalk.prototype);
|
|
8878
8984
|
return chalk;
|
|
8879
8985
|
};
|
|
8986
|
+
function createChalk(options) {
|
|
8987
|
+
return chalkFactory(options);
|
|
8988
|
+
}
|
|
8880
8989
|
Object.setPrototypeOf(createChalk.prototype, Function.prototype);
|
|
8881
8990
|
for (const [styleName, style] of Object.entries(ansi_styles_default)) {
|
|
8882
8991
|
styles2[styleName] = {
|
|
@@ -8931,8 +9040,7 @@ for (const model of usedModels) {
|
|
|
8931
9040
|
}
|
|
8932
9041
|
};
|
|
8933
9042
|
}
|
|
8934
|
-
var proto = Object.defineProperties(() => {
|
|
8935
|
-
}, {
|
|
9043
|
+
var proto = Object.defineProperties(() => {}, {
|
|
8936
9044
|
...styles2,
|
|
8937
9045
|
level: {
|
|
8938
9046
|
enumerable: true,
|
|
@@ -8985,7 +9093,8 @@ var applyStyle = (self, string) => {
|
|
|
8985
9093
|
styler = styler.parent;
|
|
8986
9094
|
}
|
|
8987
9095
|
}
|
|
8988
|
-
const lfIndex = string.indexOf(
|
|
9096
|
+
const lfIndex = string.indexOf(`
|
|
9097
|
+
`);
|
|
8989
9098
|
if (lfIndex !== -1) {
|
|
8990
9099
|
string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
|
|
8991
9100
|
}
|
|
@@ -9027,7 +9136,8 @@ var changePrototype = (to, from) => {
|
|
|
9027
9136
|
}
|
|
9028
9137
|
Object.setPrototypeOf(to, fromPrototype);
|
|
9029
9138
|
};
|
|
9030
|
-
var wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}
|
|
9139
|
+
var wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/
|
|
9140
|
+
${fromBody}`;
|
|
9031
9141
|
var toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, "toString");
|
|
9032
9142
|
var toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, "name");
|
|
9033
9143
|
var changeToString = (to, from, name) => {
|
|
@@ -9165,13 +9275,10 @@ var signalExitWrap = (handler) => {
|
|
|
9165
9275
|
|
|
9166
9276
|
class SignalExitFallback extends SignalExitBase {
|
|
9167
9277
|
onExit() {
|
|
9168
|
-
return () => {
|
|
9169
|
-
};
|
|
9170
|
-
}
|
|
9171
|
-
load() {
|
|
9172
|
-
}
|
|
9173
|
-
unload() {
|
|
9278
|
+
return () => {};
|
|
9174
9279
|
}
|
|
9280
|
+
load() {}
|
|
9281
|
+
unload() {}
|
|
9175
9282
|
}
|
|
9176
9283
|
|
|
9177
9284
|
class SignalExit extends SignalExitBase {
|
|
@@ -9208,8 +9315,7 @@ class SignalExit extends SignalExitBase {
|
|
|
9208
9315
|
}
|
|
9209
9316
|
onExit(cb, opts) {
|
|
9210
9317
|
if (!processOk(this.#process)) {
|
|
9211
|
-
return () => {
|
|
9212
|
-
};
|
|
9318
|
+
return () => {};
|
|
9213
9319
|
}
|
|
9214
9320
|
if (this.#loaded === false) {
|
|
9215
9321
|
this.load();
|
|
@@ -9234,8 +9340,7 @@ class SignalExit extends SignalExitBase {
|
|
|
9234
9340
|
const fn = this.#sigListeners[sig];
|
|
9235
9341
|
if (fn)
|
|
9236
9342
|
this.#process.on(sig, fn);
|
|
9237
|
-
} catch (_) {
|
|
9238
|
-
}
|
|
9343
|
+
} catch (_) {}
|
|
9239
9344
|
}
|
|
9240
9345
|
this.#process.emit = (ev, ...a) => {
|
|
9241
9346
|
return this.#processEmit(ev, ...a);
|
|
@@ -9256,8 +9361,7 @@ class SignalExit extends SignalExitBase {
|
|
|
9256
9361
|
}
|
|
9257
9362
|
try {
|
|
9258
9363
|
this.#process.removeListener(sig, listener);
|
|
9259
|
-
} catch (_) {
|
|
9260
|
-
}
|
|
9364
|
+
} catch (_) {}
|
|
9261
9365
|
});
|
|
9262
9366
|
this.#process.emit = this.#originalProcessEmit;
|
|
9263
9367
|
this.#process.reallyExit = this.#originalProcessReallyExit;
|
|
@@ -9298,8 +9402,7 @@ var restoreCursor = terminal ? onetime_default(() => {
|
|
|
9298
9402
|
onExit(() => {
|
|
9299
9403
|
terminal.write("\x1B[?25h");
|
|
9300
9404
|
}, { alwaysLast: true });
|
|
9301
|
-
}) : () => {
|
|
9302
|
-
};
|
|
9405
|
+
}) : () => {};
|
|
9303
9406
|
var restore_cursor_default = restoreCursor;
|
|
9304
9407
|
|
|
9305
9408
|
// node_modules/cli-cursor/index.js
|
|
@@ -9346,16 +9449,16 @@ function isUnicodeSupported() {
|
|
|
9346
9449
|
|
|
9347
9450
|
// node_modules/log-symbols/index.js
|
|
9348
9451
|
var main = {
|
|
9349
|
-
info: source_default.blue("
|
|
9350
|
-
success: source_default.green("
|
|
9351
|
-
warning: source_default.yellow("
|
|
9352
|
-
error: source_default.red("
|
|
9452
|
+
info: source_default.blue("ℹ"),
|
|
9453
|
+
success: source_default.green("✔"),
|
|
9454
|
+
warning: source_default.yellow("⚠"),
|
|
9455
|
+
error: source_default.red("✖")
|
|
9353
9456
|
};
|
|
9354
9457
|
var fallback = {
|
|
9355
9458
|
info: source_default.blue("i"),
|
|
9356
|
-
success: source_default.green("
|
|
9357
|
-
warning: source_default.yellow("
|
|
9358
|
-
error: source_default.red("
|
|
9459
|
+
success: source_default.green("√"),
|
|
9460
|
+
warning: source_default.yellow("‼"),
|
|
9461
|
+
error: source_default.red("×")
|
|
9359
9462
|
};
|
|
9360
9463
|
var logSymbols = isUnicodeSupported() ? main : fallback;
|
|
9361
9464
|
var log_symbols_default = logSymbols;
|
|
@@ -9375,6 +9478,9 @@ function stripAnsi(string) {
|
|
|
9375
9478
|
if (typeof string !== "string") {
|
|
9376
9479
|
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
9377
9480
|
}
|
|
9481
|
+
if (!string.includes("\x1B") && !string.includes("")) {
|
|
9482
|
+
return string;
|
|
9483
|
+
}
|
|
9378
9484
|
return string.replace(regex, "");
|
|
9379
9485
|
}
|
|
9380
9486
|
|
|
@@ -9404,6 +9510,18 @@ var isInRange = (ranges, codePoint) => {
|
|
|
9404
9510
|
};
|
|
9405
9511
|
|
|
9406
9512
|
// node_modules/get-east-asian-width/lookup.js
|
|
9513
|
+
var minimumAmbiguousCodePoint = ambiguousRanges[0];
|
|
9514
|
+
var maximumAmbiguousCodePoint = ambiguousRanges.at(-1);
|
|
9515
|
+
var minimumFullWidthCodePoint = fullwidthRanges[0];
|
|
9516
|
+
var maximumFullWidthCodePoint = fullwidthRanges.at(-1);
|
|
9517
|
+
var minimumHalfWidthCodePoint = halfwidthRanges[0];
|
|
9518
|
+
var maximumHalfWidthCodePoint = halfwidthRanges.at(-1);
|
|
9519
|
+
var minimumNarrowCodePoint = narrowRanges[0];
|
|
9520
|
+
var maximumNarrowCodePoint = narrowRanges.at(-1);
|
|
9521
|
+
var minimumWideCodePoint = wideRanges[0];
|
|
9522
|
+
var maximumWideCodePoint = wideRanges.at(-1);
|
|
9523
|
+
var commonCjkCodePoint = 19968;
|
|
9524
|
+
var [wideFastPathStart, wideFastPathEnd] = findWideFastPathRange(wideRanges);
|
|
9407
9525
|
function findWideFastPathRange(ranges) {
|
|
9408
9526
|
let fastPathStart = ranges[0];
|
|
9409
9527
|
let fastPathEnd = ranges[1];
|
|
@@ -9420,18 +9538,6 @@ function findWideFastPathRange(ranges) {
|
|
|
9420
9538
|
}
|
|
9421
9539
|
return [fastPathStart, fastPathEnd];
|
|
9422
9540
|
}
|
|
9423
|
-
var minimumAmbiguousCodePoint = ambiguousRanges[0];
|
|
9424
|
-
var maximumAmbiguousCodePoint = ambiguousRanges.at(-1);
|
|
9425
|
-
var minimumFullWidthCodePoint = fullwidthRanges[0];
|
|
9426
|
-
var maximumFullWidthCodePoint = fullwidthRanges.at(-1);
|
|
9427
|
-
var minimumHalfWidthCodePoint = halfwidthRanges[0];
|
|
9428
|
-
var maximumHalfWidthCodePoint = halfwidthRanges.at(-1);
|
|
9429
|
-
var minimumNarrowCodePoint = narrowRanges[0];
|
|
9430
|
-
var maximumNarrowCodePoint = narrowRanges.at(-1);
|
|
9431
|
-
var minimumWideCodePoint = wideRanges[0];
|
|
9432
|
-
var maximumWideCodePoint = wideRanges.at(-1);
|
|
9433
|
-
var commonCjkCodePoint = 19968;
|
|
9434
|
-
var [wideFastPathStart, wideFastPathEnd] = findWideFastPathRange(wideRanges);
|
|
9435
9541
|
var isAmbiguous = (codePoint) => {
|
|
9436
9542
|
if (codePoint < minimumAmbiguousCodePoint || codePoint > maximumAmbiguousCodePoint) {
|
|
9437
9543
|
return false;
|
|
@@ -9728,7 +9834,8 @@ class Ora {
|
|
|
9728
9834
|
const fullSuffixText = this.#getFullSuffixText(this.#suffixText, "-");
|
|
9729
9835
|
const fullText = " ".repeat(this.#indent) + fullPrefixText + "--" + this.#text + "--" + fullSuffixText;
|
|
9730
9836
|
this.#lineCount = 0;
|
|
9731
|
-
for (const line of stripAnsi(fullText).split(
|
|
9837
|
+
for (const line of stripAnsi(fullText).split(`
|
|
9838
|
+
`)) {
|
|
9732
9839
|
this.#lineCount += Math.max(1, Math.ceil(stringWidth(line, { countAnsiEscapeCodes: true }) / columns));
|
|
9733
9840
|
}
|
|
9734
9841
|
}
|
|
@@ -9802,7 +9909,8 @@ class Ora {
|
|
|
9802
9909
|
}
|
|
9803
9910
|
if (!this.#isEnabled) {
|
|
9804
9911
|
if (this.text) {
|
|
9805
|
-
this.#stream.write(`- ${this.text}
|
|
9912
|
+
this.#stream.write(`- ${this.text}
|
|
9913
|
+
`);
|
|
9806
9914
|
}
|
|
9807
9915
|
return this;
|
|
9808
9916
|
}
|
|
@@ -9861,7 +9969,8 @@ class Ora {
|
|
|
9861
9969
|
const fullText = typeof text === "string" ? separatorText + text : "";
|
|
9862
9970
|
const suffixText = options.suffixText ?? this.#suffixText;
|
|
9863
9971
|
const fullSuffixText = this.#getFullSuffixText(suffixText, " ");
|
|
9864
|
-
const textToWrite = fullPrefixText + symbolText + fullText + fullSuffixText +
|
|
9972
|
+
const textToWrite = fullPrefixText + symbolText + fullText + fullSuffixText + `
|
|
9973
|
+
`;
|
|
9865
9974
|
this.stop();
|
|
9866
9975
|
this.#stream.write(textToWrite);
|
|
9867
9976
|
return this;
|
|
@@ -9872,8 +9981,8 @@ function ora(options) {
|
|
|
9872
9981
|
}
|
|
9873
9982
|
|
|
9874
9983
|
// src/cli/commands/add.ts
|
|
9875
|
-
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
9876
9984
|
init_config();
|
|
9985
|
+
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
9877
9986
|
|
|
9878
9987
|
// src/cli/utils/registry.ts
|
|
9879
9988
|
async function fetchRegistryIndex(registryUrl) {
|
|
@@ -9915,8 +10024,9 @@ function collectDeps(items) {
|
|
|
9915
10024
|
}
|
|
9916
10025
|
|
|
9917
10026
|
// src/cli/utils/write.ts
|
|
9918
|
-
import {mkdirSync, writeFileSync as writeFileSync2} from "fs";
|
|
9919
|
-
import {dirname, join as join2} from "path";
|
|
10027
|
+
import { mkdirSync, writeFileSync as writeFileSync2 } from "fs";
|
|
10028
|
+
import { dirname, join as join2 } from "path";
|
|
10029
|
+
var VERSION_STAMP_FILE = ".3dvf-version";
|
|
9920
10030
|
function writeRegistryItem(item, outputDir, version, cwd = process.cwd()) {
|
|
9921
10031
|
const written = [];
|
|
9922
10032
|
const itemDir = join2(cwd, outputDir, item.name);
|
|
@@ -9930,12 +10040,11 @@ function writeRegistryItem(item, outputDir, version, cwd = process.cwd()) {
|
|
|
9930
10040
|
writeFileSync2(stampPath, version, "utf-8");
|
|
9931
10041
|
return written;
|
|
9932
10042
|
}
|
|
9933
|
-
var VERSION_STAMP_FILE = ".3dvf-version";
|
|
9934
10043
|
|
|
9935
10044
|
// src/cli/utils/packageManager.ts
|
|
9936
|
-
import {existsSync as existsSync2} from "fs";
|
|
9937
|
-
import {join as join3} from "path";
|
|
9938
|
-
import {execSync} from "child_process";
|
|
10045
|
+
import { existsSync as existsSync2 } from "fs";
|
|
10046
|
+
import { join as join3 } from "path";
|
|
10047
|
+
import { execSync } from "child_process";
|
|
9939
10048
|
function detectPackageManager(cwd = process.cwd()) {
|
|
9940
10049
|
if (existsSync2(join3(cwd, "bun.lockb")))
|
|
9941
10050
|
return "bun";
|
|
@@ -9961,9 +10070,9 @@ function installDeps(deps, devDeps, cwd = process.cwd()) {
|
|
|
9961
10070
|
|
|
9962
10071
|
// src/cli/commands/add.ts
|
|
9963
10072
|
async function addCommand(names) {
|
|
9964
|
-
let
|
|
10073
|
+
let config;
|
|
9965
10074
|
try {
|
|
9966
|
-
|
|
10075
|
+
config = readConfig();
|
|
9967
10076
|
} catch (err) {
|
|
9968
10077
|
console.error(import_picocolors.default.red(err.message));
|
|
9969
10078
|
process.exit(1);
|
|
@@ -9971,7 +10080,7 @@ async function addCommand(names) {
|
|
|
9971
10080
|
const spinner = ora(`Resolving ${names.join(", ")}...`).start();
|
|
9972
10081
|
let tree;
|
|
9973
10082
|
try {
|
|
9974
|
-
tree = await resolveTree(names,
|
|
10083
|
+
tree = await resolveTree(names, config.registry);
|
|
9975
10084
|
} catch (err) {
|
|
9976
10085
|
spinner.fail(err.message);
|
|
9977
10086
|
process.exit(1);
|
|
@@ -9980,9 +10089,9 @@ async function addCommand(names) {
|
|
|
9980
10089
|
const items = [...tree.values()];
|
|
9981
10090
|
const written = [];
|
|
9982
10091
|
for (const item of items) {
|
|
9983
|
-
const paths = writeRegistryItem(item,
|
|
10092
|
+
const paths = writeRegistryItem(item, config.outputDir, CLI_VERSION);
|
|
9984
10093
|
written.push(...paths);
|
|
9985
|
-
console.log(import_picocolors.default.green("
|
|
10094
|
+
console.log(import_picocolors.default.green("✓") + ` Installed ${import_picocolors.default.bold(item.name)} ${import_picocolors.default.dim(`(v${CLI_VERSION})`)}`);
|
|
9986
10095
|
for (const p of paths) {
|
|
9987
10096
|
console.log(import_picocolors.default.dim(` ${p.replace(process.cwd() + "/", "")}`));
|
|
9988
10097
|
}
|
|
@@ -9999,19 +10108,141 @@ async function addCommand(names) {
|
|
|
9999
10108
|
process.exit(1);
|
|
10000
10109
|
}
|
|
10001
10110
|
}
|
|
10002
|
-
console.log(import_picocolors.default.green(
|
|
10111
|
+
console.log(import_picocolors.default.green(`
|
|
10112
|
+
Done!`) + ` Added ${items.length} function(s) to ${config.outputDir}`);
|
|
10003
10113
|
}
|
|
10004
10114
|
|
|
10005
|
-
// src/cli/commands/
|
|
10115
|
+
// src/cli/commands/create.ts
|
|
10006
10116
|
var import_prompts = __toESM(require_prompts3(), 1);
|
|
10117
|
+
import { existsSync as existsSync4, readFileSync as readFileSync3, writeFileSync as writeFileSync3, mkdirSync as mkdirSync2 } from "fs";
|
|
10118
|
+
import { join as join5, dirname as dirname3 } from "path";
|
|
10119
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
10120
|
+
import { execSync as execSync2 } from "child_process";
|
|
10121
|
+
init_config();
|
|
10007
10122
|
var import_picocolors2 = __toESM(require_picocolors(), 1);
|
|
10008
10123
|
init_config();
|
|
10124
|
+
|
|
10125
|
+
// src/cli/utils/ownPkg.ts
|
|
10126
|
+
import { readFileSync as readFileSync2, existsSync as existsSync3 } from "fs";
|
|
10127
|
+
import { join as join4, dirname as dirname2 } from "path";
|
|
10128
|
+
import { fileURLToPath } from "url";
|
|
10129
|
+
function findPkg(dir) {
|
|
10130
|
+
const candidate = join4(dir, "package.json");
|
|
10131
|
+
if (existsSync3(candidate))
|
|
10132
|
+
return candidate;
|
|
10133
|
+
const parent = dirname2(dir);
|
|
10134
|
+
if (parent === dir)
|
|
10135
|
+
throw new Error("Could not find own package.json");
|
|
10136
|
+
return findPkg(parent);
|
|
10137
|
+
}
|
|
10138
|
+
var __dirname2 = dirname2(fileURLToPath(import.meta.url));
|
|
10139
|
+
var ownPkg = JSON.parse(readFileSync2(findPkg(__dirname2), "utf-8"));
|
|
10140
|
+
var ownPkg_default = ownPkg;
|
|
10141
|
+
|
|
10142
|
+
// src/cli/commands/create.ts
|
|
10143
|
+
var THREE_VERSION = (ownPkg_default.dependencies?.["@types/three"]).replace(/^\^|~/, "");
|
|
10144
|
+
var __dirname3 = dirname3(fileURLToPath2(import.meta.url));
|
|
10145
|
+
var TEMPLATES_DIR = join5(__dirname3, "./templates/create");
|
|
10146
|
+
function readTemplate(file) {
|
|
10147
|
+
return readFileSync3(join5(TEMPLATES_DIR, file), "utf-8");
|
|
10148
|
+
}
|
|
10149
|
+
async function createCommand2(projectName) {
|
|
10150
|
+
const answers = await import_prompts.default([
|
|
10151
|
+
{
|
|
10152
|
+
type: projectName ? null : "text",
|
|
10153
|
+
name: "name",
|
|
10154
|
+
message: "Project name",
|
|
10155
|
+
initial: "my-3dvf-app",
|
|
10156
|
+
validate: (v) => /^[a-z0-9@._/-]+$/i.test(v) || "Invalid project name"
|
|
10157
|
+
}
|
|
10158
|
+
], { onCancel: () => process.exit(1) });
|
|
10159
|
+
const name = projectName ?? answers.name;
|
|
10160
|
+
const targetDir = join5(process.cwd(), name);
|
|
10161
|
+
if (existsSync4(targetDir)) {
|
|
10162
|
+
console.error(import_picocolors2.default.red(`Directory "${name}" already exists.`));
|
|
10163
|
+
process.exit(1);
|
|
10164
|
+
}
|
|
10165
|
+
const scaffoldSpinner = ora("Scaffolding Vite project...").start();
|
|
10166
|
+
try {
|
|
10167
|
+
execSync2(`npm create vite@latest ${name} -- --template vanilla-ts`, {
|
|
10168
|
+
stdio: "pipe"
|
|
10169
|
+
});
|
|
10170
|
+
scaffoldSpinner.succeed("Scaffolded Vite project");
|
|
10171
|
+
} catch (err) {
|
|
10172
|
+
scaffoldSpinner.fail("Failed to scaffold Vite project");
|
|
10173
|
+
console.error(import_picocolors2.default.red(err.message));
|
|
10174
|
+
process.exit(1);
|
|
10175
|
+
}
|
|
10176
|
+
const config = {
|
|
10177
|
+
outputDir: DEFAULT_CONFIG.outputDir,
|
|
10178
|
+
registry: DEFAULT_CONFIG.registry,
|
|
10179
|
+
typescript: true
|
|
10180
|
+
};
|
|
10181
|
+
writeConfig(config, targetDir);
|
|
10182
|
+
console.log(import_picocolors2.default.green("✓") + " Created 3dvf.json");
|
|
10183
|
+
const depsSpinner = ora(`Installing three@${THREE_VERSION}...`).start();
|
|
10184
|
+
try {
|
|
10185
|
+
installDeps([`three@${THREE_VERSION}`], [`@types/three@${THREE_VERSION}`], targetDir);
|
|
10186
|
+
depsSpinner.succeed(`Installed three@${THREE_VERSION}`);
|
|
10187
|
+
} catch (err) {
|
|
10188
|
+
depsSpinner.fail("Failed to install three");
|
|
10189
|
+
console.error(import_picocolors2.default.red(err.message));
|
|
10190
|
+
process.exit(1);
|
|
10191
|
+
}
|
|
10192
|
+
const registrySpinner = ora("Adding get-webgpu-viewer...").start();
|
|
10193
|
+
let tree;
|
|
10194
|
+
try {
|
|
10195
|
+
tree = await resolveTree(["get-webgpu-viewer"], config.registry);
|
|
10196
|
+
} catch (err) {
|
|
10197
|
+
registrySpinner.fail(err.message);
|
|
10198
|
+
process.exit(1);
|
|
10199
|
+
return;
|
|
10200
|
+
}
|
|
10201
|
+
const items = [...tree.values()];
|
|
10202
|
+
for (const item of items) {
|
|
10203
|
+
writeRegistryItem(item, config.outputDir, CLI_VERSION, targetDir);
|
|
10204
|
+
}
|
|
10205
|
+
const { deps, devDeps } = collectDeps(items);
|
|
10206
|
+
if (deps.length || devDeps.length) {
|
|
10207
|
+
installDeps(deps, devDeps, targetDir);
|
|
10208
|
+
}
|
|
10209
|
+
registrySpinner.succeed("Added get-webgpu-viewer");
|
|
10210
|
+
const pm = detectPackageManager(targetDir);
|
|
10211
|
+
const run = pm === "npm" ? "npm run" : pm;
|
|
10212
|
+
writeFileSync3(join5(targetDir, "index.html"), readTemplate("index.html").replace("__PROJECT_NAME__", name), "utf-8");
|
|
10213
|
+
console.log(import_picocolors2.default.green("✓") + " Created index.html");
|
|
10214
|
+
mkdirSync2(join5(targetDir, "src"), { recursive: true });
|
|
10215
|
+
writeFileSync3(join5(targetDir, "src", "main.ts"), readTemplate("main.ts"), "utf-8");
|
|
10216
|
+
console.log(import_picocolors2.default.green("✓") + " Created src/main.ts");
|
|
10217
|
+
writeFileSync3(join5(targetDir, "README.md"), readTemplate("README.md").replace("__PROJECT_NAME__", name).replace("__DEV_CMD__", `${run} dev`), "utf-8");
|
|
10218
|
+
console.log(import_picocolors2.default.green("✓") + " Created README.md");
|
|
10219
|
+
console.log(`
|
|
10220
|
+
${import_picocolors2.default.green("✓")} Created ${import_picocolors2.default.bold(name)}
|
|
10221
|
+
|
|
10222
|
+
${import_picocolors2.default.bold("Next steps:")}
|
|
10223
|
+
|
|
10224
|
+
${import_picocolors2.default.cyan(`cd ${name}`)}
|
|
10225
|
+
${import_picocolors2.default.cyan(`${run} dev`)}
|
|
10226
|
+
`);
|
|
10227
|
+
}
|
|
10228
|
+
|
|
10229
|
+
// src/cli/commands/init.ts
|
|
10230
|
+
var import_prompts2 = __toESM(require_prompts3(), 1);
|
|
10231
|
+
import { existsSync as existsSync5 } from "fs";
|
|
10232
|
+
import { join as join6 } from "path";
|
|
10233
|
+
init_config();
|
|
10234
|
+
var import_picocolors3 = __toESM(require_picocolors(), 1);
|
|
10235
|
+
var THREE_VERSION2 = (ownPkg_default.dependencies?.["@types/three"]).replace(/^\^|~/, "");
|
|
10009
10236
|
async function initCommand() {
|
|
10237
|
+
if (!existsSync5(join6(process.cwd(), "package.json"))) {
|
|
10238
|
+
console.error(import_picocolors3.default.red("No package.json found. Run `init` from the root of your project."));
|
|
10239
|
+
process.exit(1);
|
|
10240
|
+
}
|
|
10010
10241
|
if (configExists()) {
|
|
10011
|
-
console.log(
|
|
10242
|
+
console.log(import_picocolors3.default.yellow("3dvf.json already exists. Skipping init."));
|
|
10012
10243
|
return;
|
|
10013
10244
|
}
|
|
10014
|
-
const answers = await
|
|
10245
|
+
const answers = await import_prompts2.default([
|
|
10015
10246
|
{
|
|
10016
10247
|
type: "text",
|
|
10017
10248
|
name: "outputDir",
|
|
@@ -10028,37 +10259,49 @@ async function initCommand() {
|
|
|
10028
10259
|
}
|
|
10029
10260
|
]);
|
|
10030
10261
|
if (answers.outputDir === undefined) {
|
|
10031
|
-
console.log(
|
|
10262
|
+
console.log(import_picocolors3.default.red("Cancelled."));
|
|
10032
10263
|
process.exit(1);
|
|
10033
10264
|
}
|
|
10034
|
-
const
|
|
10265
|
+
const config = {
|
|
10035
10266
|
outputDir: answers.outputDir,
|
|
10036
10267
|
registry: DEFAULT_CONFIG.registry,
|
|
10037
10268
|
typescript: answers.typescript
|
|
10038
10269
|
};
|
|
10039
|
-
writeConfig(
|
|
10040
|
-
console.log(
|
|
10041
|
-
console.log(
|
|
10270
|
+
writeConfig(config);
|
|
10271
|
+
console.log(import_picocolors3.default.green("✓") + " Created 3dvf.json");
|
|
10272
|
+
console.log(import_picocolors3.default.dim(` outputDir: ${config.outputDir}`));
|
|
10273
|
+
const spinner = ora(`Installing three@${THREE_VERSION2}...`).start();
|
|
10274
|
+
try {
|
|
10275
|
+
const devDeps = answers.typescript ? [`@types/three@${THREE_VERSION2}`] : [];
|
|
10276
|
+
installDeps([`three@${THREE_VERSION2}`], devDeps);
|
|
10277
|
+
spinner.succeed(`Installed three@${THREE_VERSION2}`);
|
|
10278
|
+
} catch (err) {
|
|
10279
|
+
spinner.fail("Failed to install three");
|
|
10280
|
+
console.error(import_picocolors3.default.red(err.message));
|
|
10281
|
+
process.exit(1);
|
|
10282
|
+
}
|
|
10042
10283
|
}
|
|
10043
10284
|
|
|
10044
10285
|
// src/cli/commands/list.ts
|
|
10045
|
-
var import_picocolors3 = __toESM(require_picocolors(), 1);
|
|
10046
10286
|
init_config();
|
|
10287
|
+
var import_picocolors4 = __toESM(require_picocolors(), 1);
|
|
10047
10288
|
async function listCommand() {
|
|
10048
|
-
let
|
|
10289
|
+
let config;
|
|
10049
10290
|
try {
|
|
10050
|
-
|
|
10291
|
+
config = readConfig();
|
|
10051
10292
|
} catch {
|
|
10052
10293
|
const { DEFAULT_CONFIG: DEFAULT_CONFIG2 } = await Promise.resolve().then(() => (init_config(), exports_config));
|
|
10053
|
-
|
|
10294
|
+
config = DEFAULT_CONFIG2;
|
|
10054
10295
|
}
|
|
10055
10296
|
const spinner = ora("Fetching registry...").start();
|
|
10056
10297
|
try {
|
|
10057
|
-
const index = await fetchRegistryIndex(
|
|
10298
|
+
const index = await fetchRegistryIndex(config.registry);
|
|
10058
10299
|
spinner.stop();
|
|
10059
|
-
console.log(
|
|
10300
|
+
console.log(import_picocolors4.default.bold(`
|
|
10301
|
+
Available functions (${index.items.length}):
|
|
10302
|
+
`));
|
|
10060
10303
|
for (const item of index.items) {
|
|
10061
|
-
console.log(` ${
|
|
10304
|
+
console.log(` ${import_picocolors4.default.cyan(item.name)}`);
|
|
10062
10305
|
}
|
|
10063
10306
|
console.log();
|
|
10064
10307
|
} catch (err) {
|
|
@@ -10070,6 +10313,7 @@ async function listCommand() {
|
|
|
10070
10313
|
// src/cli/index.ts
|
|
10071
10314
|
var program2 = new Command;
|
|
10072
10315
|
program2.name("3dvf").description("Add Three.js utility functions directly into your project").version("0.1.0");
|
|
10316
|
+
program2.command("create [name]").description("Scaffold a new Vite + Three.js WebGPU project").action(createCommand2);
|
|
10073
10317
|
program2.command("init").description("Initialize 3dvf in your project (creates 3dvf.json)").action(initCommand);
|
|
10074
10318
|
program2.command("add <names...>").description("Add one or more functions to your project").action(addCommand);
|
|
10075
10319
|
program2.command("list").description("List all available functions in the registry").action(listCommand);
|