@s0rt/3dvf 0.1.2 → 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
|
"▐__________/|__▌",
|
|
@@ -3572,6 +3603,45 @@ var require_picocolors = __commonJS((exports, module) => {
|
|
|
3572
3603
|
module.exports.createColors = createColors;
|
|
3573
3604
|
});
|
|
3574
3605
|
|
|
3606
|
+
// package.json
|
|
3607
|
+
var package_default;
|
|
3608
|
+
var init_package = __esm(() => {
|
|
3609
|
+
package_default = {
|
|
3610
|
+
name: "@s0rt/3dvf",
|
|
3611
|
+
version: "0.1.5",
|
|
3612
|
+
description: "shadcn-style Three.js function library CLI",
|
|
3613
|
+
type: "module",
|
|
3614
|
+
bin: {
|
|
3615
|
+
"3dvf": "./dist/cli/index.js"
|
|
3616
|
+
},
|
|
3617
|
+
files: [
|
|
3618
|
+
"dist/"
|
|
3619
|
+
],
|
|
3620
|
+
publishConfig: {
|
|
3621
|
+
access: "public"
|
|
3622
|
+
},
|
|
3623
|
+
scripts: {
|
|
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",
|
|
3629
|
+
test: "bun test"
|
|
3630
|
+
},
|
|
3631
|
+
dependencies: {
|
|
3632
|
+
"@types/three": "^0.183.1",
|
|
3633
|
+
commander: "^12.1.0",
|
|
3634
|
+
ora: "^8.1.1",
|
|
3635
|
+
picocolors: "^1.1.1",
|
|
3636
|
+
prompts: "^2.4.2"
|
|
3637
|
+
},
|
|
3638
|
+
devDependencies: {
|
|
3639
|
+
"@types/prompts": "^2.4.9",
|
|
3640
|
+
typescript: "^5.7.0"
|
|
3641
|
+
}
|
|
3642
|
+
};
|
|
3643
|
+
});
|
|
3644
|
+
|
|
3575
3645
|
// src/cli/utils/config.ts
|
|
3576
3646
|
var exports_config = {};
|
|
3577
3647
|
__export(exports_config, {
|
|
@@ -3581,9 +3651,8 @@ __export(exports_config, {
|
|
|
3581
3651
|
DEFAULT_CONFIG: () => DEFAULT_CONFIG,
|
|
3582
3652
|
CLI_VERSION: () => CLI_VERSION
|
|
3583
3653
|
});
|
|
3584
|
-
import {existsSync, readFileSync, writeFileSync} from "fs";
|
|
3585
|
-
import {join} from "path";
|
|
3586
|
-
import {createRequire as createRequire2} from "module";
|
|
3654
|
+
import { existsSync, readFileSync, writeFileSync } from "fs";
|
|
3655
|
+
import { join } from "path";
|
|
3587
3656
|
function readConfig(cwd = process.cwd()) {
|
|
3588
3657
|
const configPath = join(cwd, CONFIG_FILE);
|
|
3589
3658
|
if (!existsSync(configPath)) {
|
|
@@ -3594,16 +3663,16 @@ function readConfig(cwd = process.cwd()) {
|
|
|
3594
3663
|
}
|
|
3595
3664
|
function writeConfig(config, cwd = process.cwd()) {
|
|
3596
3665
|
const configPath = join(cwd, CONFIG_FILE);
|
|
3597
|
-
writeFileSync(configPath, JSON.stringify(config, null, 2) +
|
|
3666
|
+
writeFileSync(configPath, JSON.stringify(config, null, 2) + `
|
|
3667
|
+
`, "utf-8");
|
|
3598
3668
|
}
|
|
3599
3669
|
function configExists(cwd = process.cwd()) {
|
|
3600
3670
|
return existsSync(join(cwd, CONFIG_FILE));
|
|
3601
3671
|
}
|
|
3602
|
-
var
|
|
3672
|
+
var CLI_VERSION, CONFIG_FILE = "3dvf.json", BASE_REGISTRY_URL = "https://app.pierrelespingal.xyz/3dvf/registry", DEFAULT_CONFIG;
|
|
3603
3673
|
var init_config = __esm(() => {
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
CLI_VERSION = pkg.version;
|
|
3674
|
+
init_package();
|
|
3675
|
+
CLI_VERSION = package_default.version;
|
|
3607
3676
|
DEFAULT_CONFIG = {
|
|
3608
3677
|
outputDir: "src/lib/3dvf",
|
|
3609
3678
|
registry: `${BASE_REGISTRY_URL}/v${CLI_VERSION}`,
|
|
@@ -3613,6 +3682,36 @@ var init_config = __esm(() => {
|
|
|
3613
3682
|
|
|
3614
3683
|
// node_modules/kleur/index.js
|
|
3615
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
|
+
};
|
|
3616
3715
|
function run(arr, str) {
|
|
3617
3716
|
let i = 0, tmp, beg = "", end = "";
|
|
3618
3717
|
for (;i < arr.length; i++) {
|
|
@@ -3669,36 +3768,6 @@ var require_kleur = __commonJS((exports, module) => {
|
|
|
3669
3768
|
return txt === undefined ? chain([open], [blk]) : $.enabled ? run([blk], txt + "") : txt + "";
|
|
3670
3769
|
};
|
|
3671
3770
|
}
|
|
3672
|
-
var { FORCE_COLOR, NODE_DISABLE_COLORS, TERM } = process.env;
|
|
3673
|
-
var $ = {
|
|
3674
|
-
enabled: !NODE_DISABLE_COLORS && TERM !== "dumb" && FORCE_COLOR !== "0",
|
|
3675
|
-
reset: init(0, 0),
|
|
3676
|
-
bold: init(1, 22),
|
|
3677
|
-
dim: init(2, 22),
|
|
3678
|
-
italic: init(3, 23),
|
|
3679
|
-
underline: init(4, 24),
|
|
3680
|
-
inverse: init(7, 27),
|
|
3681
|
-
hidden: init(8, 28),
|
|
3682
|
-
strikethrough: init(9, 29),
|
|
3683
|
-
black: init(30, 39),
|
|
3684
|
-
red: init(31, 39),
|
|
3685
|
-
green: init(32, 39),
|
|
3686
|
-
yellow: init(33, 39),
|
|
3687
|
-
blue: init(34, 39),
|
|
3688
|
-
magenta: init(35, 39),
|
|
3689
|
-
cyan: init(36, 39),
|
|
3690
|
-
white: init(37, 39),
|
|
3691
|
-
gray: init(90, 39),
|
|
3692
|
-
grey: init(90, 39),
|
|
3693
|
-
bgBlack: init(40, 49),
|
|
3694
|
-
bgRed: init(41, 49),
|
|
3695
|
-
bgGreen: init(42, 49),
|
|
3696
|
-
bgYellow: init(43, 49),
|
|
3697
|
-
bgBlue: init(44, 49),
|
|
3698
|
-
bgMagenta: init(45, 49),
|
|
3699
|
-
bgCyan: init(46, 49),
|
|
3700
|
-
bgWhite: init(47, 49)
|
|
3701
|
-
};
|
|
3702
3771
|
module.exports = $;
|
|
3703
3772
|
});
|
|
3704
3773
|
|
|
@@ -3835,8 +3904,7 @@ var require_clear = __commonJS((exports, module) => {
|
|
|
3835
3904
|
if (it)
|
|
3836
3905
|
o = it;
|
|
3837
3906
|
var i = 0;
|
|
3838
|
-
var F = function
|
|
3839
|
-
};
|
|
3907
|
+
var F = function F2() {};
|
|
3840
3908
|
return { s: F, n: function n() {
|
|
3841
3909
|
if (i >= o.length)
|
|
3842
3910
|
return { done: true };
|
|
@@ -3845,7 +3913,8 @@ var require_clear = __commonJS((exports, module) => {
|
|
|
3845
3913
|
throw _e;
|
|
3846
3914
|
}, f: F };
|
|
3847
3915
|
}
|
|
3848
|
-
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.`);
|
|
3849
3918
|
}
|
|
3850
3919
|
var normalCompletion = true, didErr = false, err;
|
|
3851
3920
|
return { s: function s() {
|
|
@@ -3915,18 +3984,18 @@ var require_clear = __commonJS((exports, module) => {
|
|
|
3915
3984
|
// node_modules/prompts/dist/util/figures.js
|
|
3916
3985
|
var require_figures = __commonJS((exports, module) => {
|
|
3917
3986
|
var main2 = {
|
|
3918
|
-
arrowUp: "
|
|
3919
|
-
arrowDown: "
|
|
3920
|
-
arrowLeft: "
|
|
3921
|
-
arrowRight: "
|
|
3922
|
-
radioOn: "
|
|
3923
|
-
radioOff: "
|
|
3924
|
-
tick: "
|
|
3925
|
-
cross: "
|
|
3926
|
-
ellipsis: "
|
|
3927
|
-
pointerSmall: "
|
|
3928
|
-
line: "
|
|
3929
|
-
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: "❯"
|
|
3930
3999
|
};
|
|
3931
4000
|
var win = {
|
|
3932
4001
|
arrowUp: main2.arrowUp,
|
|
@@ -3935,11 +4004,11 @@ var require_figures = __commonJS((exports, module) => {
|
|
|
3935
4004
|
arrowRight: main2.arrowRight,
|
|
3936
4005
|
radioOn: "(*)",
|
|
3937
4006
|
radioOff: "( )",
|
|
3938
|
-
tick: "
|
|
3939
|
-
cross: "
|
|
4007
|
+
tick: "√",
|
|
4008
|
+
cross: "×",
|
|
3940
4009
|
ellipsis: "...",
|
|
3941
|
-
pointerSmall: "
|
|
3942
|
-
line: "
|
|
4010
|
+
pointerSmall: "»",
|
|
4011
|
+
line: "─",
|
|
3943
4012
|
pointer: ">"
|
|
3944
4013
|
};
|
|
3945
4014
|
var figures = process.platform === "win32" ? win : main2;
|
|
@@ -4010,7 +4079,9 @@ var require_wrap = __commonJS((exports, module) => {
|
|
|
4010
4079
|
else
|
|
4011
4080
|
arr.push(`${tab}${w}`);
|
|
4012
4081
|
return arr;
|
|
4013
|
-
}, [tab]).join(
|
|
4082
|
+
}, [tab]).join(`
|
|
4083
|
+
`)).join(`
|
|
4084
|
+
`);
|
|
4014
4085
|
};
|
|
4015
4086
|
});
|
|
4016
4087
|
|
|
@@ -4199,7 +4270,8 @@ var require_text = __commonJS((exports, module) => {
|
|
|
4199
4270
|
this.red = false;
|
|
4200
4271
|
this.fire();
|
|
4201
4272
|
this.render();
|
|
4202
|
-
this.out.write(
|
|
4273
|
+
this.out.write(`
|
|
4274
|
+
`);
|
|
4203
4275
|
this.close();
|
|
4204
4276
|
}
|
|
4205
4277
|
validate() {
|
|
@@ -4230,7 +4302,8 @@ var require_text = __commonJS((exports, module) => {
|
|
|
4230
4302
|
_this2.aborted = false;
|
|
4231
4303
|
_this2.fire();
|
|
4232
4304
|
_this2.render();
|
|
4233
|
-
_this2.out.write(
|
|
4305
|
+
_this2.out.write(`
|
|
4306
|
+
`);
|
|
4234
4307
|
_this2.close();
|
|
4235
4308
|
})();
|
|
4236
4309
|
}
|
|
@@ -4323,7 +4396,9 @@ var require_text = __commonJS((exports, module) => {
|
|
|
4323
4396
|
this.outputError = "";
|
|
4324
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(` `);
|
|
4325
4398
|
if (this.error) {
|
|
4326
|
-
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)}`, ``);
|
|
4327
4402
|
}
|
|
4328
4403
|
this.out.write(erase.line + cursor.to(0) + this.outputText + cursor.save + this.outputError + cursor.restore + cursor.move(this.cursorOffset, 0));
|
|
4329
4404
|
}
|
|
@@ -4387,7 +4462,8 @@ var require_select = __commonJS((exports, module) => {
|
|
|
4387
4462
|
this.done = this.aborted = true;
|
|
4388
4463
|
this.fire();
|
|
4389
4464
|
this.render();
|
|
4390
|
-
this.out.write(
|
|
4465
|
+
this.out.write(`
|
|
4466
|
+
`);
|
|
4391
4467
|
this.close();
|
|
4392
4468
|
}
|
|
4393
4469
|
submit() {
|
|
@@ -4396,7 +4472,8 @@ var require_select = __commonJS((exports, module) => {
|
|
|
4396
4472
|
this.aborted = false;
|
|
4397
4473
|
this.fire();
|
|
4398
4474
|
this.render();
|
|
4399
|
-
this.out.write(
|
|
4475
|
+
this.out.write(`
|
|
4476
|
+
`);
|
|
4400
4477
|
this.close();
|
|
4401
4478
|
} else
|
|
4402
4479
|
this.bell();
|
|
@@ -4447,7 +4524,8 @@ var require_select = __commonJS((exports, module) => {
|
|
|
4447
4524
|
let _entriesToDisplay = entriesToDisplay(this.cursor, this.choices.length, this.optionsPerPage), startIndex = _entriesToDisplay.startIndex, endIndex = _entriesToDisplay.endIndex;
|
|
4448
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(" ");
|
|
4449
4526
|
if (!this.done) {
|
|
4450
|
-
this.outputText +=
|
|
4527
|
+
this.outputText += `
|
|
4528
|
+
`;
|
|
4451
4529
|
for (let i = startIndex;i < endIndex; i++) {
|
|
4452
4530
|
let title, prefix, desc = "", v = this.choices[i];
|
|
4453
4531
|
if (i === startIndex && startIndex > 0) {
|
|
@@ -4466,14 +4544,16 @@ var require_select = __commonJS((exports, module) => {
|
|
|
4466
4544
|
if (v.description && this.cursor === i) {
|
|
4467
4545
|
desc = ` - ${v.description}`;
|
|
4468
4546
|
if (prefix.length + title.length + desc.length >= this.out.columns || v.description.split(/\r?\n/).length > 1) {
|
|
4469
|
-
desc =
|
|
4547
|
+
desc = `
|
|
4548
|
+
` + wrap(v.description, {
|
|
4470
4549
|
margin: 3,
|
|
4471
4550
|
width: this.out.columns
|
|
4472
4551
|
});
|
|
4473
4552
|
}
|
|
4474
4553
|
}
|
|
4475
4554
|
}
|
|
4476
|
-
this.outputText += `${prefix} ${title}${color.gray(desc)}
|
|
4555
|
+
this.outputText += `${prefix} ${title}${color.gray(desc)}
|
|
4556
|
+
`;
|
|
4477
4557
|
}
|
|
4478
4558
|
}
|
|
4479
4559
|
this.out.write(this.outputText);
|
|
@@ -4515,7 +4595,8 @@ var require_toggle = __commonJS((exports, module) => {
|
|
|
4515
4595
|
this.done = this.aborted = true;
|
|
4516
4596
|
this.fire();
|
|
4517
4597
|
this.render();
|
|
4518
|
-
this.out.write(
|
|
4598
|
+
this.out.write(`
|
|
4599
|
+
`);
|
|
4519
4600
|
this.close();
|
|
4520
4601
|
}
|
|
4521
4602
|
submit() {
|
|
@@ -4523,7 +4604,8 @@ var require_toggle = __commonJS((exports, module) => {
|
|
|
4523
4604
|
this.aborted = false;
|
|
4524
4605
|
this.fire();
|
|
4525
4606
|
this.render();
|
|
4526
|
-
this.out.write(
|
|
4607
|
+
this.out.write(`
|
|
4608
|
+
`);
|
|
4527
4609
|
this.close();
|
|
4528
4610
|
}
|
|
4529
4611
|
deactivate() {
|
|
@@ -4598,16 +4680,13 @@ var require_datepart = __commonJS((exports, module) => {
|
|
|
4598
4680
|
this.parts = parts || [this];
|
|
4599
4681
|
this.locales = locales || {};
|
|
4600
4682
|
}
|
|
4601
|
-
up() {
|
|
4602
|
-
}
|
|
4603
|
-
down() {
|
|
4604
|
-
}
|
|
4683
|
+
up() {}
|
|
4684
|
+
down() {}
|
|
4605
4685
|
next() {
|
|
4606
4686
|
const currentIdx = this.parts.indexOf(this);
|
|
4607
4687
|
return this.parts.find((part, idx) => idx > currentIdx && part instanceof DatePart);
|
|
4608
4688
|
}
|
|
4609
|
-
setTo(val) {
|
|
4610
|
-
}
|
|
4689
|
+
setTo(val) {}
|
|
4611
4690
|
prev() {
|
|
4612
4691
|
let parts = [].concat(this.parts).reverse();
|
|
4613
4692
|
const currentIdx = parts.indexOf(this);
|
|
@@ -4977,7 +5056,8 @@ var require_date = __commonJS((exports, module) => {
|
|
|
4977
5056
|
this.error = false;
|
|
4978
5057
|
this.fire();
|
|
4979
5058
|
this.render();
|
|
4980
|
-
this.out.write(
|
|
5059
|
+
this.out.write(`
|
|
5060
|
+
`);
|
|
4981
5061
|
this.close();
|
|
4982
5062
|
}
|
|
4983
5063
|
validate() {
|
|
@@ -5005,7 +5085,8 @@ var require_date = __commonJS((exports, module) => {
|
|
|
5005
5085
|
_this2.aborted = false;
|
|
5006
5086
|
_this2.fire();
|
|
5007
5087
|
_this2.render();
|
|
5008
|
-
_this2.out.write(
|
|
5088
|
+
_this2.out.write(`
|
|
5089
|
+
`);
|
|
5009
5090
|
_this2.close();
|
|
5010
5091
|
})();
|
|
5011
5092
|
}
|
|
@@ -5055,7 +5136,9 @@ var require_date = __commonJS((exports, module) => {
|
|
|
5055
5136
|
super.render();
|
|
5056
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(" ");
|
|
5057
5138
|
if (this.error) {
|
|
5058
|
-
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)}`, ``);
|
|
5059
5142
|
}
|
|
5060
5143
|
this.out.write(erase.line + cursor.to(0) + this.outputText);
|
|
5061
5144
|
}
|
|
@@ -5167,7 +5250,8 @@ var require_number = __commonJS((exports, module) => {
|
|
|
5167
5250
|
this.error = false;
|
|
5168
5251
|
this.fire();
|
|
5169
5252
|
this.render();
|
|
5170
|
-
this.out.write(
|
|
5253
|
+
this.out.write(`
|
|
5254
|
+
`);
|
|
5171
5255
|
this.close();
|
|
5172
5256
|
}
|
|
5173
5257
|
validate() {
|
|
@@ -5198,7 +5282,8 @@ var require_number = __commonJS((exports, module) => {
|
|
|
5198
5282
|
_this2.error = false;
|
|
5199
5283
|
_this2.fire();
|
|
5200
5284
|
_this2.render();
|
|
5201
|
-
_this2.out.write(
|
|
5285
|
+
_this2.out.write(`
|
|
5286
|
+
`);
|
|
5202
5287
|
_this2.close();
|
|
5203
5288
|
})();
|
|
5204
5289
|
}
|
|
@@ -5274,7 +5359,9 @@ var require_number = __commonJS((exports, module) => {
|
|
|
5274
5359
|
this.outputError = "";
|
|
5275
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(` `);
|
|
5276
5361
|
if (this.error) {
|
|
5277
|
-
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)}`, ``);
|
|
5278
5365
|
}
|
|
5279
5366
|
this.out.write(erase.line + cursor.to(0) + this.outputText + cursor.save + this.outputError + cursor.restore);
|
|
5280
5367
|
}
|
|
@@ -5343,7 +5430,8 @@ var require_multiselect = __commonJS((exports, module) => {
|
|
|
5343
5430
|
this.done = this.aborted = true;
|
|
5344
5431
|
this.fire();
|
|
5345
5432
|
this.render();
|
|
5346
|
-
this.out.write(
|
|
5433
|
+
this.out.write(`
|
|
5434
|
+
`);
|
|
5347
5435
|
this.close();
|
|
5348
5436
|
}
|
|
5349
5437
|
submit() {
|
|
@@ -5356,7 +5444,8 @@ var require_multiselect = __commonJS((exports, module) => {
|
|
|
5356
5444
|
this.aborted = false;
|
|
5357
5445
|
this.fire();
|
|
5358
5446
|
this.render();
|
|
5359
|
-
this.out.write(
|
|
5447
|
+
this.out.write(`
|
|
5448
|
+
`);
|
|
5360
5449
|
this.close();
|
|
5361
5450
|
}
|
|
5362
5451
|
}
|
|
@@ -5432,7 +5521,12 @@ var require_multiselect = __commonJS((exports, module) => {
|
|
|
5432
5521
|
if (typeof this.instructions === "string") {
|
|
5433
5522
|
return this.instructions;
|
|
5434
5523
|
}
|
|
5435
|
-
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`;
|
|
5436
5530
|
}
|
|
5437
5531
|
return "";
|
|
5438
5532
|
}
|
|
@@ -5446,7 +5540,8 @@ var require_multiselect = __commonJS((exports, module) => {
|
|
|
5446
5540
|
if (cursor2 === i && v.description) {
|
|
5447
5541
|
desc = ` - ${v.description}`;
|
|
5448
5542
|
if (prefix.length + title.length + desc.length >= this.out.columns || v.description.split(/\r?\n/).length > 1) {
|
|
5449
|
-
desc =
|
|
5543
|
+
desc = `
|
|
5544
|
+
` + wrap(v.description, {
|
|
5450
5545
|
margin: prefix.length,
|
|
5451
5546
|
width: this.out.columns
|
|
5452
5547
|
});
|
|
@@ -5471,7 +5566,9 @@ var require_multiselect = __commonJS((exports, module) => {
|
|
|
5471
5566
|
}
|
|
5472
5567
|
styledOptions.push(this.renderOption(this.cursor, options[i], i, prefix));
|
|
5473
5568
|
}
|
|
5474
|
-
return
|
|
5569
|
+
return `
|
|
5570
|
+
` + styledOptions.join(`
|
|
5571
|
+
`);
|
|
5475
5572
|
}
|
|
5476
5573
|
renderOptions(options) {
|
|
5477
5574
|
if (!this.done) {
|
|
@@ -5639,7 +5736,8 @@ var require_autocomplete = __commonJS((exports, module) => {
|
|
|
5639
5736
|
this.aborted = false;
|
|
5640
5737
|
this.fire();
|
|
5641
5738
|
this.render();
|
|
5642
|
-
this.out.write(
|
|
5739
|
+
this.out.write(`
|
|
5740
|
+
`);
|
|
5643
5741
|
this.close();
|
|
5644
5742
|
}
|
|
5645
5743
|
}
|
|
@@ -5648,7 +5746,8 @@ var require_autocomplete = __commonJS((exports, module) => {
|
|
|
5648
5746
|
this.exited = false;
|
|
5649
5747
|
this.fire();
|
|
5650
5748
|
this.render();
|
|
5651
|
-
this.out.write(
|
|
5749
|
+
this.out.write(`
|
|
5750
|
+
`);
|
|
5652
5751
|
this.close();
|
|
5653
5752
|
}
|
|
5654
5753
|
submit() {
|
|
@@ -5656,7 +5755,8 @@ var require_autocomplete = __commonJS((exports, module) => {
|
|
|
5656
5755
|
this.aborted = this.exited = false;
|
|
5657
5756
|
this.fire();
|
|
5658
5757
|
this.render();
|
|
5659
|
-
this.out.write(
|
|
5758
|
+
this.out.write(`
|
|
5759
|
+
`);
|
|
5660
5760
|
this.close();
|
|
5661
5761
|
}
|
|
5662
5762
|
_(c, key) {
|
|
@@ -5745,7 +5845,8 @@ var require_autocomplete = __commonJS((exports, module) => {
|
|
|
5745
5845
|
if (v.description) {
|
|
5746
5846
|
desc = ` - ${v.description}`;
|
|
5747
5847
|
if (prefix.length + title.length + desc.length >= this.out.columns || v.description.split(/\r?\n/).length > 1) {
|
|
5748
|
-
desc =
|
|
5848
|
+
desc = `
|
|
5849
|
+
` + wrap(v.description, {
|
|
5749
5850
|
margin: 3,
|
|
5750
5851
|
width: this.out.columns
|
|
5751
5852
|
});
|
|
@@ -5764,8 +5865,10 @@ var require_autocomplete = __commonJS((exports, module) => {
|
|
|
5764
5865
|
let _entriesToDisplay = entriesToDisplay(this.select, this.choices.length, this.limit), startIndex = _entriesToDisplay.startIndex, endIndex = _entriesToDisplay.endIndex;
|
|
5765
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(" ");
|
|
5766
5867
|
if (!this.done) {
|
|
5767
|
-
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(
|
|
5768
|
-
|
|
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));
|
|
5769
5872
|
}
|
|
5770
5873
|
this.out.write(erase.line + cursor.to(0) + this.outputText);
|
|
5771
5874
|
}
|
|
@@ -5895,7 +5998,8 @@ Instructions:
|
|
|
5895
5998
|
}
|
|
5896
5999
|
renderCurrentInput() {
|
|
5897
6000
|
return `
|
|
5898
|
-
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
|
+
`;
|
|
5899
6003
|
}
|
|
5900
6004
|
renderOption(cursor2, v, i) {
|
|
5901
6005
|
let title;
|
|
@@ -5969,7 +6073,8 @@ var require_confirm = __commonJS((exports, module) => {
|
|
|
5969
6073
|
this.done = this.aborted = true;
|
|
5970
6074
|
this.fire();
|
|
5971
6075
|
this.render();
|
|
5972
|
-
this.out.write(
|
|
6076
|
+
this.out.write(`
|
|
6077
|
+
`);
|
|
5973
6078
|
this.close();
|
|
5974
6079
|
}
|
|
5975
6080
|
submit() {
|
|
@@ -5978,7 +6083,8 @@ var require_confirm = __commonJS((exports, module) => {
|
|
|
5978
6083
|
this.aborted = false;
|
|
5979
6084
|
this.fire();
|
|
5980
6085
|
this.render();
|
|
5981
|
-
this.out.write(
|
|
6086
|
+
this.out.write(`
|
|
6087
|
+
`);
|
|
5982
6088
|
this.close();
|
|
5983
6089
|
}
|
|
5984
6090
|
_(c, key) {
|
|
@@ -6024,6 +6130,9 @@ var require_elements = __commonJS((exports, module) => {
|
|
|
6024
6130
|
|
|
6025
6131
|
// node_modules/prompts/dist/prompts.js
|
|
6026
6132
|
var require_prompts = __commonJS((exports) => {
|
|
6133
|
+
var $ = exports;
|
|
6134
|
+
var el = require_elements();
|
|
6135
|
+
var noop = (v) => v;
|
|
6027
6136
|
function toPrompt(type, args, opts = {}) {
|
|
6028
6137
|
return new Promise((res, rej) => {
|
|
6029
6138
|
const p = new el[type](args);
|
|
@@ -6036,9 +6145,6 @@ var require_prompts = __commonJS((exports) => {
|
|
|
6036
6145
|
p.on("abort", (x) => rej(onAbort(x)));
|
|
6037
6146
|
});
|
|
6038
6147
|
}
|
|
6039
|
-
var $ = exports;
|
|
6040
|
-
var el = require_elements();
|
|
6041
|
-
var noop = (v) => v;
|
|
6042
6148
|
$.text = (args) => toPrompt("TextPrompt", args);
|
|
6043
6149
|
$.password = (args) => {
|
|
6044
6150
|
args.style = "password";
|
|
@@ -6130,8 +6236,7 @@ var require_dist = __commonJS((exports, module) => {
|
|
|
6130
6236
|
if (it)
|
|
6131
6237
|
o = it;
|
|
6132
6238
|
var i = 0;
|
|
6133
|
-
var F = function
|
|
6134
|
-
};
|
|
6239
|
+
var F = function F2() {};
|
|
6135
6240
|
return { s: F, n: function n() {
|
|
6136
6241
|
if (i >= o.length)
|
|
6137
6242
|
return { done: true };
|
|
@@ -6140,7 +6245,8 @@ var require_dist = __commonJS((exports, module) => {
|
|
|
6140
6245
|
throw _e;
|
|
6141
6246
|
}, f: F };
|
|
6142
6247
|
}
|
|
6143
|
-
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.`);
|
|
6144
6250
|
}
|
|
6145
6251
|
var normalCompletion = true, didErr = false, err;
|
|
6146
6252
|
return { s: function s() {
|
|
@@ -6211,6 +6317,9 @@ var require_dist = __commonJS((exports, module) => {
|
|
|
6211
6317
|
});
|
|
6212
6318
|
};
|
|
6213
6319
|
}
|
|
6320
|
+
var prompts = require_prompts();
|
|
6321
|
+
var passOn = ["suggest", "format", "onState", "validate", "onRender", "type"];
|
|
6322
|
+
var noop = () => {};
|
|
6214
6323
|
function prompt() {
|
|
6215
6324
|
return _prompt.apply(this, arguments);
|
|
6216
6325
|
}
|
|
@@ -6230,7 +6339,7 @@ var require_dist = __commonJS((exports, module) => {
|
|
|
6230
6339
|
}
|
|
6231
6340
|
return question2.format ? yield question2.format(answer2, answers) : answer2;
|
|
6232
6341
|
});
|
|
6233
|
-
return function
|
|
6342
|
+
return function getFormattedAnswer2(_x, _x2) {
|
|
6234
6343
|
return _ref.apply(this, arguments);
|
|
6235
6344
|
};
|
|
6236
6345
|
}();
|
|
@@ -6302,10 +6411,6 @@ var require_dist = __commonJS((exports, module) => {
|
|
|
6302
6411
|
function override(answers) {
|
|
6303
6412
|
prompt._override = Object.assign({}, answers);
|
|
6304
6413
|
}
|
|
6305
|
-
var prompts = require_prompts();
|
|
6306
|
-
var passOn = ["suggest", "format", "onState", "validate", "onRender", "type"];
|
|
6307
|
-
var noop = () => {
|
|
6308
|
-
};
|
|
6309
6414
|
module.exports = Object.assign(prompt, {
|
|
6310
6415
|
prompt,
|
|
6311
6416
|
prompts,
|
|
@@ -6403,18 +6508,18 @@ var require_clear2 = __commonJS((exports, module) => {
|
|
|
6403
6508
|
// node_modules/prompts/lib/util/figures.js
|
|
6404
6509
|
var require_figures2 = __commonJS((exports, module) => {
|
|
6405
6510
|
var main2 = {
|
|
6406
|
-
arrowUp: "
|
|
6407
|
-
arrowDown: "
|
|
6408
|
-
arrowLeft: "
|
|
6409
|
-
arrowRight: "
|
|
6410
|
-
radioOn: "
|
|
6411
|
-
radioOff: "
|
|
6412
|
-
tick: "
|
|
6413
|
-
cross: "
|
|
6414
|
-
ellipsis: "
|
|
6415
|
-
pointerSmall: "
|
|
6416
|
-
line: "
|
|
6417
|
-
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: "❯"
|
|
6418
6523
|
};
|
|
6419
6524
|
var win = {
|
|
6420
6525
|
arrowUp: main2.arrowUp,
|
|
@@ -6423,11 +6528,11 @@ var require_figures2 = __commonJS((exports, module) => {
|
|
|
6423
6528
|
arrowRight: main2.arrowRight,
|
|
6424
6529
|
radioOn: "(*)",
|
|
6425
6530
|
radioOff: "( )",
|
|
6426
|
-
tick: "
|
|
6427
|
-
cross: "
|
|
6531
|
+
tick: "√",
|
|
6532
|
+
cross: "×",
|
|
6428
6533
|
ellipsis: "...",
|
|
6429
|
-
pointerSmall: "
|
|
6430
|
-
line: "
|
|
6534
|
+
pointerSmall: "»",
|
|
6535
|
+
line: "─",
|
|
6431
6536
|
pointer: ">"
|
|
6432
6537
|
};
|
|
6433
6538
|
var figures = process.platform === "win32" ? win : main2;
|
|
@@ -6486,7 +6591,9 @@ var require_wrap2 = __commonJS((exports, module) => {
|
|
|
6486
6591
|
else
|
|
6487
6592
|
arr.push(`${tab}${w}`);
|
|
6488
6593
|
return arr;
|
|
6489
|
-
}, [tab]).join(
|
|
6594
|
+
}, [tab]).join(`
|
|
6595
|
+
`)).join(`
|
|
6596
|
+
`);
|
|
6490
6597
|
};
|
|
6491
6598
|
});
|
|
6492
6599
|
|
|
@@ -6631,7 +6738,8 @@ var require_text2 = __commonJS((exports, module) => {
|
|
|
6631
6738
|
this.red = false;
|
|
6632
6739
|
this.fire();
|
|
6633
6740
|
this.render();
|
|
6634
|
-
this.out.write(
|
|
6741
|
+
this.out.write(`
|
|
6742
|
+
`);
|
|
6635
6743
|
this.close();
|
|
6636
6744
|
}
|
|
6637
6745
|
async validate() {
|
|
@@ -6657,7 +6765,8 @@ var require_text2 = __commonJS((exports, module) => {
|
|
|
6657
6765
|
this.aborted = false;
|
|
6658
6766
|
this.fire();
|
|
6659
6767
|
this.render();
|
|
6660
|
-
this.out.write(
|
|
6768
|
+
this.out.write(`
|
|
6769
|
+
`);
|
|
6661
6770
|
this.close();
|
|
6662
6771
|
}
|
|
6663
6772
|
next() {
|
|
@@ -6754,7 +6863,9 @@ var require_text2 = __commonJS((exports, module) => {
|
|
|
6754
6863
|
this.red ? color.red(this.rendered) : this.rendered
|
|
6755
6864
|
].join(` `);
|
|
6756
6865
|
if (this.error) {
|
|
6757
|
-
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)}`, ``);
|
|
6758
6869
|
}
|
|
6759
6870
|
this.out.write(erase.line + cursor.to(0) + this.outputText + cursor.save + this.outputError + cursor.restore + cursor.move(this.cursorOffset, 0));
|
|
6760
6871
|
}
|
|
@@ -6809,7 +6920,8 @@ var require_select2 = __commonJS((exports, module) => {
|
|
|
6809
6920
|
this.done = this.aborted = true;
|
|
6810
6921
|
this.fire();
|
|
6811
6922
|
this.render();
|
|
6812
|
-
this.out.write(
|
|
6923
|
+
this.out.write(`
|
|
6924
|
+
`);
|
|
6813
6925
|
this.close();
|
|
6814
6926
|
}
|
|
6815
6927
|
submit() {
|
|
@@ -6818,7 +6930,8 @@ var require_select2 = __commonJS((exports, module) => {
|
|
|
6818
6930
|
this.aborted = false;
|
|
6819
6931
|
this.fire();
|
|
6820
6932
|
this.render();
|
|
6821
|
-
this.out.write(
|
|
6933
|
+
this.out.write(`
|
|
6934
|
+
`);
|
|
6822
6935
|
this.close();
|
|
6823
6936
|
} else
|
|
6824
6937
|
this.bell();
|
|
@@ -6874,7 +6987,8 @@ var require_select2 = __commonJS((exports, module) => {
|
|
|
6874
6987
|
this.done ? this.selection.title : this.selection.disabled ? color.yellow(this.warn) : color.gray(this.hint)
|
|
6875
6988
|
].join(" ");
|
|
6876
6989
|
if (!this.done) {
|
|
6877
|
-
this.outputText +=
|
|
6990
|
+
this.outputText += `
|
|
6991
|
+
`;
|
|
6878
6992
|
for (let i = startIndex;i < endIndex; i++) {
|
|
6879
6993
|
let title, prefix, desc = "", v = this.choices[i];
|
|
6880
6994
|
if (i === startIndex && startIndex > 0) {
|
|
@@ -6893,11 +7007,13 @@ var require_select2 = __commonJS((exports, module) => {
|
|
|
6893
7007
|
if (v.description && this.cursor === i) {
|
|
6894
7008
|
desc = ` - ${v.description}`;
|
|
6895
7009
|
if (prefix.length + title.length + desc.length >= this.out.columns || v.description.split(/\r?\n/).length > 1) {
|
|
6896
|
-
desc =
|
|
7010
|
+
desc = `
|
|
7011
|
+
` + wrap(v.description, { margin: 3, width: this.out.columns });
|
|
6897
7012
|
}
|
|
6898
7013
|
}
|
|
6899
7014
|
}
|
|
6900
|
-
this.outputText += `${prefix} ${title}${color.gray(desc)}
|
|
7015
|
+
this.outputText += `${prefix} ${title}${color.gray(desc)}
|
|
7016
|
+
`;
|
|
6901
7017
|
}
|
|
6902
7018
|
}
|
|
6903
7019
|
this.out.write(this.outputText);
|
|
@@ -6935,7 +7051,8 @@ var require_toggle2 = __commonJS((exports, module) => {
|
|
|
6935
7051
|
this.done = this.aborted = true;
|
|
6936
7052
|
this.fire();
|
|
6937
7053
|
this.render();
|
|
6938
|
-
this.out.write(
|
|
7054
|
+
this.out.write(`
|
|
7055
|
+
`);
|
|
6939
7056
|
this.close();
|
|
6940
7057
|
}
|
|
6941
7058
|
submit() {
|
|
@@ -6943,7 +7060,8 @@ var require_toggle2 = __commonJS((exports, module) => {
|
|
|
6943
7060
|
this.aborted = false;
|
|
6944
7061
|
this.fire();
|
|
6945
7062
|
this.render();
|
|
6946
|
-
this.out.write(
|
|
7063
|
+
this.out.write(`
|
|
7064
|
+
`);
|
|
6947
7065
|
this.close();
|
|
6948
7066
|
}
|
|
6949
7067
|
deactivate() {
|
|
@@ -7020,16 +7138,13 @@ var require_datepart2 = __commonJS((exports, module) => {
|
|
|
7020
7138
|
this.parts = parts || [this];
|
|
7021
7139
|
this.locales = locales || {};
|
|
7022
7140
|
}
|
|
7023
|
-
up() {
|
|
7024
|
-
}
|
|
7025
|
-
down() {
|
|
7026
|
-
}
|
|
7141
|
+
up() {}
|
|
7142
|
+
down() {}
|
|
7027
7143
|
next() {
|
|
7028
7144
|
const currentIdx = this.parts.indexOf(this);
|
|
7029
7145
|
return this.parts.find((part, idx) => idx > currentIdx && part instanceof DatePart);
|
|
7030
7146
|
}
|
|
7031
|
-
setTo(val) {
|
|
7032
|
-
}
|
|
7147
|
+
setTo(val) {}
|
|
7033
7148
|
prev() {
|
|
7034
7149
|
let parts = [].concat(this.parts).reverse();
|
|
7035
7150
|
const currentIdx = parts.indexOf(this);
|
|
@@ -7349,7 +7464,8 @@ var require_date2 = __commonJS((exports, module) => {
|
|
|
7349
7464
|
this.error = false;
|
|
7350
7465
|
this.fire();
|
|
7351
7466
|
this.render();
|
|
7352
|
-
this.out.write(
|
|
7467
|
+
this.out.write(`
|
|
7468
|
+
`);
|
|
7353
7469
|
this.close();
|
|
7354
7470
|
}
|
|
7355
7471
|
async validate() {
|
|
@@ -7372,7 +7488,8 @@ var require_date2 = __commonJS((exports, module) => {
|
|
|
7372
7488
|
this.aborted = false;
|
|
7373
7489
|
this.fire();
|
|
7374
7490
|
this.render();
|
|
7375
|
-
this.out.write(
|
|
7491
|
+
this.out.write(`
|
|
7492
|
+
`);
|
|
7376
7493
|
this.close();
|
|
7377
7494
|
}
|
|
7378
7495
|
up() {
|
|
@@ -7426,7 +7543,9 @@ var require_date2 = __commonJS((exports, module) => {
|
|
|
7426
7543
|
this.parts.reduce((arr, p, idx) => arr.concat(idx === this.cursor && !this.done ? color.cyan().underline(p.toString()) : p), []).join("")
|
|
7427
7544
|
].join(" ");
|
|
7428
7545
|
if (this.error) {
|
|
7429
|
-
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)}`, ``);
|
|
7430
7549
|
}
|
|
7431
7550
|
this.out.write(erase.line + cursor.to(0) + this.outputText);
|
|
7432
7551
|
}
|
|
@@ -7503,7 +7622,8 @@ var require_number2 = __commonJS((exports, module) => {
|
|
|
7503
7622
|
this.error = false;
|
|
7504
7623
|
this.fire();
|
|
7505
7624
|
this.render();
|
|
7506
|
-
this.out.write(
|
|
7625
|
+
this.out.write(`
|
|
7626
|
+
`);
|
|
7507
7627
|
this.close();
|
|
7508
7628
|
}
|
|
7509
7629
|
async validate() {
|
|
@@ -7529,7 +7649,8 @@ var require_number2 = __commonJS((exports, module) => {
|
|
|
7529
7649
|
this.error = false;
|
|
7530
7650
|
this.fire();
|
|
7531
7651
|
this.render();
|
|
7532
|
-
this.out.write(
|
|
7652
|
+
this.out.write(`
|
|
7653
|
+
`);
|
|
7533
7654
|
this.close();
|
|
7534
7655
|
}
|
|
7535
7656
|
up() {
|
|
@@ -7609,7 +7730,9 @@ var require_number2 = __commonJS((exports, module) => {
|
|
|
7609
7730
|
!this.done || !this.done && !this.placeholder ? color[this.color]().underline(this.rendered) : this.rendered
|
|
7610
7731
|
].join(` `);
|
|
7611
7732
|
if (this.error) {
|
|
7612
|
-
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)}`, ``);
|
|
7613
7736
|
}
|
|
7614
7737
|
this.out.write(erase.line + cursor.to(0) + this.outputText + cursor.save + this.outputError + cursor.restore);
|
|
7615
7738
|
}
|
|
@@ -7669,7 +7792,8 @@ var require_multiselect2 = __commonJS((exports, module) => {
|
|
|
7669
7792
|
this.done = this.aborted = true;
|
|
7670
7793
|
this.fire();
|
|
7671
7794
|
this.render();
|
|
7672
|
-
this.out.write(
|
|
7795
|
+
this.out.write(`
|
|
7796
|
+
`);
|
|
7673
7797
|
this.close();
|
|
7674
7798
|
}
|
|
7675
7799
|
submit() {
|
|
@@ -7682,7 +7806,8 @@ var require_multiselect2 = __commonJS((exports, module) => {
|
|
|
7682
7806
|
this.aborted = false;
|
|
7683
7807
|
this.fire();
|
|
7684
7808
|
this.render();
|
|
7685
|
-
this.out.write(
|
|
7809
|
+
this.out.write(`
|
|
7810
|
+
`);
|
|
7686
7811
|
this.close();
|
|
7687
7812
|
}
|
|
7688
7813
|
}
|
|
@@ -7758,7 +7883,12 @@ var require_multiselect2 = __commonJS((exports, module) => {
|
|
|
7758
7883
|
if (typeof this.instructions === "string") {
|
|
7759
7884
|
return this.instructions;
|
|
7760
7885
|
}
|
|
7761
|
-
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`;
|
|
7762
7892
|
}
|
|
7763
7893
|
return "";
|
|
7764
7894
|
}
|
|
@@ -7772,7 +7902,8 @@ var require_multiselect2 = __commonJS((exports, module) => {
|
|
|
7772
7902
|
if (cursor2 === i && v.description) {
|
|
7773
7903
|
desc = ` - ${v.description}`;
|
|
7774
7904
|
if (prefix.length + title.length + desc.length >= this.out.columns || v.description.split(/\r?\n/).length > 1) {
|
|
7775
|
-
desc =
|
|
7905
|
+
desc = `
|
|
7906
|
+
` + wrap(v.description, { margin: prefix.length, width: this.out.columns });
|
|
7776
7907
|
}
|
|
7777
7908
|
}
|
|
7778
7909
|
}
|
|
@@ -7794,7 +7925,9 @@ var require_multiselect2 = __commonJS((exports, module) => {
|
|
|
7794
7925
|
}
|
|
7795
7926
|
styledOptions.push(this.renderOption(this.cursor, options[i], i, prefix));
|
|
7796
7927
|
}
|
|
7797
|
-
return
|
|
7928
|
+
return `
|
|
7929
|
+
` + styledOptions.join(`
|
|
7930
|
+
`);
|
|
7798
7931
|
}
|
|
7799
7932
|
renderOptions(options) {
|
|
7800
7933
|
if (!this.done) {
|
|
@@ -7918,7 +8051,8 @@ var require_autocomplete2 = __commonJS((exports, module) => {
|
|
|
7918
8051
|
this.aborted = false;
|
|
7919
8052
|
this.fire();
|
|
7920
8053
|
this.render();
|
|
7921
|
-
this.out.write(
|
|
8054
|
+
this.out.write(`
|
|
8055
|
+
`);
|
|
7922
8056
|
this.close();
|
|
7923
8057
|
}
|
|
7924
8058
|
}
|
|
@@ -7927,7 +8061,8 @@ var require_autocomplete2 = __commonJS((exports, module) => {
|
|
|
7927
8061
|
this.exited = false;
|
|
7928
8062
|
this.fire();
|
|
7929
8063
|
this.render();
|
|
7930
|
-
this.out.write(
|
|
8064
|
+
this.out.write(`
|
|
8065
|
+
`);
|
|
7931
8066
|
this.close();
|
|
7932
8067
|
}
|
|
7933
8068
|
submit() {
|
|
@@ -7935,7 +8070,8 @@ var require_autocomplete2 = __commonJS((exports, module) => {
|
|
|
7935
8070
|
this.aborted = this.exited = false;
|
|
7936
8071
|
this.fire();
|
|
7937
8072
|
this.render();
|
|
7938
|
-
this.out.write(
|
|
8073
|
+
this.out.write(`
|
|
8074
|
+
`);
|
|
7939
8075
|
this.close();
|
|
7940
8076
|
}
|
|
7941
8077
|
_(c, key) {
|
|
@@ -8024,7 +8160,8 @@ var require_autocomplete2 = __commonJS((exports, module) => {
|
|
|
8024
8160
|
if (v.description) {
|
|
8025
8161
|
desc = ` - ${v.description}`;
|
|
8026
8162
|
if (prefix.length + title.length + desc.length >= this.out.columns || v.description.split(/\r?\n/).length > 1) {
|
|
8027
|
-
desc =
|
|
8163
|
+
desc = `
|
|
8164
|
+
` + wrap(v.description, { margin: 3, width: this.out.columns });
|
|
8028
8165
|
}
|
|
8029
8166
|
}
|
|
8030
8167
|
return prefix + " " + title + color.gray(desc || "");
|
|
@@ -8045,8 +8182,10 @@ var require_autocomplete2 = __commonJS((exports, module) => {
|
|
|
8045
8182
|
this.done && this.suggestions[this.select] ? this.suggestions[this.select].title : this.rendered = this.transform.render(this.input)
|
|
8046
8183
|
].join(" ");
|
|
8047
8184
|
if (!this.done) {
|
|
8048
|
-
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(
|
|
8049
|
-
|
|
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));
|
|
8050
8189
|
}
|
|
8051
8190
|
this.out.write(erase.line + cursor.to(0) + this.outputText);
|
|
8052
8191
|
}
|
|
@@ -8172,7 +8311,8 @@ Instructions:
|
|
|
8172
8311
|
}
|
|
8173
8312
|
renderCurrentInput() {
|
|
8174
8313
|
return `
|
|
8175
|
-
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
|
+
`;
|
|
8176
8316
|
}
|
|
8177
8317
|
renderOption(cursor2, v, i) {
|
|
8178
8318
|
let title;
|
|
@@ -8247,7 +8387,8 @@ var require_confirm2 = __commonJS((exports, module) => {
|
|
|
8247
8387
|
this.done = this.aborted = true;
|
|
8248
8388
|
this.fire();
|
|
8249
8389
|
this.render();
|
|
8250
|
-
this.out.write(
|
|
8390
|
+
this.out.write(`
|
|
8391
|
+
`);
|
|
8251
8392
|
this.close();
|
|
8252
8393
|
}
|
|
8253
8394
|
submit() {
|
|
@@ -8256,7 +8397,8 @@ var require_confirm2 = __commonJS((exports, module) => {
|
|
|
8256
8397
|
this.aborted = false;
|
|
8257
8398
|
this.fire();
|
|
8258
8399
|
this.render();
|
|
8259
|
-
this.out.write(
|
|
8400
|
+
this.out.write(`
|
|
8401
|
+
`);
|
|
8260
8402
|
this.close();
|
|
8261
8403
|
}
|
|
8262
8404
|
_(c, key) {
|
|
@@ -8307,6 +8449,9 @@ var require_elements2 = __commonJS((exports, module) => {
|
|
|
8307
8449
|
|
|
8308
8450
|
// node_modules/prompts/lib/prompts.js
|
|
8309
8451
|
var require_prompts2 = __commonJS((exports) => {
|
|
8452
|
+
var $ = exports;
|
|
8453
|
+
var el = require_elements2();
|
|
8454
|
+
var noop = (v) => v;
|
|
8310
8455
|
function toPrompt(type, args, opts = {}) {
|
|
8311
8456
|
return new Promise((res, rej) => {
|
|
8312
8457
|
const p = new el[type](args);
|
|
@@ -8319,9 +8464,6 @@ var require_prompts2 = __commonJS((exports) => {
|
|
|
8319
8464
|
p.on("abort", (x) => rej(onAbort(x)));
|
|
8320
8465
|
});
|
|
8321
8466
|
}
|
|
8322
|
-
var $ = exports;
|
|
8323
|
-
var el = require_elements2();
|
|
8324
|
-
var noop = (v) => v;
|
|
8325
8467
|
$.text = (args) => toPrompt("TextPrompt", args);
|
|
8326
8468
|
$.password = (args) => {
|
|
8327
8469
|
args.style = "password";
|
|
@@ -8368,6 +8510,9 @@ var require_prompts2 = __commonJS((exports) => {
|
|
|
8368
8510
|
|
|
8369
8511
|
// node_modules/prompts/lib/index.js
|
|
8370
8512
|
var require_lib = __commonJS((exports, module) => {
|
|
8513
|
+
var prompts = require_prompts2();
|
|
8514
|
+
var passOn = ["suggest", "format", "onState", "validate", "onRender", "type"];
|
|
8515
|
+
var noop = () => {};
|
|
8371
8516
|
async function prompt(questions = [], { onSubmit = noop, onCancel = noop } = {}) {
|
|
8372
8517
|
const answers = {};
|
|
8373
8518
|
const override2 = prompt._override || {};
|
|
@@ -8433,10 +8578,6 @@ var require_lib = __commonJS((exports, module) => {
|
|
|
8433
8578
|
function override(answers) {
|
|
8434
8579
|
prompt._override = Object.assign({}, answers);
|
|
8435
8580
|
}
|
|
8436
|
-
var prompts = require_prompts2();
|
|
8437
|
-
var passOn = ["suggest", "format", "onState", "validate", "onRender", "type"];
|
|
8438
|
-
var noop = () => {
|
|
8439
|
-
};
|
|
8440
8581
|
module.exports = Object.assign(prompt, { prompt, prompts, inject, override });
|
|
8441
8582
|
});
|
|
8442
8583
|
|
|
@@ -8457,7 +8598,7 @@ var require_prompts3 = __commonJS((exports, module) => {
|
|
|
8457
8598
|
});
|
|
8458
8599
|
|
|
8459
8600
|
// node_modules/commander/esm.mjs
|
|
8460
|
-
var
|
|
8601
|
+
var import__ = __toESM(require_commander(), 1);
|
|
8461
8602
|
var {
|
|
8462
8603
|
program,
|
|
8463
8604
|
createCommand,
|
|
@@ -8470,12 +8611,73 @@ var {
|
|
|
8470
8611
|
Argument,
|
|
8471
8612
|
Option,
|
|
8472
8613
|
Help
|
|
8473
|
-
} =
|
|
8614
|
+
} = import__.default;
|
|
8474
8615
|
|
|
8475
8616
|
// node_modules/ora/index.js
|
|
8476
8617
|
import process9 from "node:process";
|
|
8477
8618
|
|
|
8478
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];
|
|
8479
8681
|
function assembleStyles() {
|
|
8480
8682
|
const codes = new Map;
|
|
8481
8683
|
for (const [groupName, group] of Object.entries(styles)) {
|
|
@@ -8588,67 +8790,6 @@ function assembleStyles() {
|
|
|
8588
8790
|
});
|
|
8589
8791
|
return styles;
|
|
8590
8792
|
}
|
|
8591
|
-
var ANSI_BACKGROUND_OFFSET = 10;
|
|
8592
|
-
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
8593
|
-
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
8594
|
-
var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
|
|
8595
|
-
var styles = {
|
|
8596
|
-
modifier: {
|
|
8597
|
-
reset: [0, 0],
|
|
8598
|
-
bold: [1, 22],
|
|
8599
|
-
dim: [2, 22],
|
|
8600
|
-
italic: [3, 23],
|
|
8601
|
-
underline: [4, 24],
|
|
8602
|
-
overline: [53, 55],
|
|
8603
|
-
inverse: [7, 27],
|
|
8604
|
-
hidden: [8, 28],
|
|
8605
|
-
strikethrough: [9, 29]
|
|
8606
|
-
},
|
|
8607
|
-
color: {
|
|
8608
|
-
black: [30, 39],
|
|
8609
|
-
red: [31, 39],
|
|
8610
|
-
green: [32, 39],
|
|
8611
|
-
yellow: [33, 39],
|
|
8612
|
-
blue: [34, 39],
|
|
8613
|
-
magenta: [35, 39],
|
|
8614
|
-
cyan: [36, 39],
|
|
8615
|
-
white: [37, 39],
|
|
8616
|
-
blackBright: [90, 39],
|
|
8617
|
-
gray: [90, 39],
|
|
8618
|
-
grey: [90, 39],
|
|
8619
|
-
redBright: [91, 39],
|
|
8620
|
-
greenBright: [92, 39],
|
|
8621
|
-
yellowBright: [93, 39],
|
|
8622
|
-
blueBright: [94, 39],
|
|
8623
|
-
magentaBright: [95, 39],
|
|
8624
|
-
cyanBright: [96, 39],
|
|
8625
|
-
whiteBright: [97, 39]
|
|
8626
|
-
},
|
|
8627
|
-
bgColor: {
|
|
8628
|
-
bgBlack: [40, 49],
|
|
8629
|
-
bgRed: [41, 49],
|
|
8630
|
-
bgGreen: [42, 49],
|
|
8631
|
-
bgYellow: [43, 49],
|
|
8632
|
-
bgBlue: [44, 49],
|
|
8633
|
-
bgMagenta: [45, 49],
|
|
8634
|
-
bgCyan: [46, 49],
|
|
8635
|
-
bgWhite: [47, 49],
|
|
8636
|
-
bgBlackBright: [100, 49],
|
|
8637
|
-
bgGray: [100, 49],
|
|
8638
|
-
bgGrey: [100, 49],
|
|
8639
|
-
bgRedBright: [101, 49],
|
|
8640
|
-
bgGreenBright: [102, 49],
|
|
8641
|
-
bgYellowBright: [103, 49],
|
|
8642
|
-
bgBlueBright: [104, 49],
|
|
8643
|
-
bgMagentaBright: [105, 49],
|
|
8644
|
-
bgCyanBright: [106, 49],
|
|
8645
|
-
bgWhiteBright: [107, 49]
|
|
8646
|
-
}
|
|
8647
|
-
};
|
|
8648
|
-
var modifierNames = Object.keys(styles.modifier);
|
|
8649
|
-
var foregroundColorNames = Object.keys(styles.color);
|
|
8650
|
-
var backgroundColorNames = Object.keys(styles.bgColor);
|
|
8651
|
-
var colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
8652
8793
|
var ansiStyles = assembleStyles();
|
|
8653
8794
|
var ansi_styles_default = ansiStyles;
|
|
8654
8795
|
|
|
@@ -8662,6 +8803,13 @@ function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process2.
|
|
|
8662
8803
|
const terminatorPosition = argv.indexOf("--");
|
|
8663
8804
|
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
8664
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
|
+
}
|
|
8665
8813
|
function envForceColor() {
|
|
8666
8814
|
if ("FORCE_COLOR" in env) {
|
|
8667
8815
|
if (env.FORCE_COLOR === "true") {
|
|
@@ -8771,13 +8919,6 @@ function createSupportsColor(stream, options = {}) {
|
|
|
8771
8919
|
});
|
|
8772
8920
|
return translateLevel(level);
|
|
8773
8921
|
}
|
|
8774
|
-
var { env } = process2;
|
|
8775
|
-
var flagForceColor;
|
|
8776
|
-
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
8777
|
-
flagForceColor = 0;
|
|
8778
|
-
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
8779
|
-
flagForceColor = 1;
|
|
8780
|
-
}
|
|
8781
8922
|
var supportsColor = {
|
|
8782
8923
|
stdout: createSupportsColor({ isTTY: tty.isatty(1) }),
|
|
8783
8924
|
stderr: createSupportsColor({ isTTY: tty.isatty(2) })
|
|
@@ -8806,18 +8947,18 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
|
8806
8947
|
let returnValue = "";
|
|
8807
8948
|
do {
|
|
8808
8949
|
const gotCR = string[index - 1] === "\r";
|
|
8809
|
-
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;
|
|
8810
8953
|
endIndex = index + 1;
|
|
8811
|
-
index = string.indexOf(
|
|
8954
|
+
index = string.indexOf(`
|
|
8955
|
+
`, endIndex);
|
|
8812
8956
|
} while (index !== -1);
|
|
8813
8957
|
returnValue += string.slice(endIndex);
|
|
8814
8958
|
return returnValue;
|
|
8815
8959
|
}
|
|
8816
8960
|
|
|
8817
8961
|
// node_modules/chalk/source/index.js
|
|
8818
|
-
function createChalk(options) {
|
|
8819
|
-
return chalkFactory(options);
|
|
8820
|
-
}
|
|
8821
8962
|
var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
|
|
8822
8963
|
var GENERATOR = Symbol("GENERATOR");
|
|
8823
8964
|
var STYLER = Symbol("STYLER");
|
|
@@ -8842,6 +8983,9 @@ var chalkFactory = (options) => {
|
|
|
8842
8983
|
Object.setPrototypeOf(chalk, createChalk.prototype);
|
|
8843
8984
|
return chalk;
|
|
8844
8985
|
};
|
|
8986
|
+
function createChalk(options) {
|
|
8987
|
+
return chalkFactory(options);
|
|
8988
|
+
}
|
|
8845
8989
|
Object.setPrototypeOf(createChalk.prototype, Function.prototype);
|
|
8846
8990
|
for (const [styleName, style] of Object.entries(ansi_styles_default)) {
|
|
8847
8991
|
styles2[styleName] = {
|
|
@@ -8896,8 +9040,7 @@ for (const model of usedModels) {
|
|
|
8896
9040
|
}
|
|
8897
9041
|
};
|
|
8898
9042
|
}
|
|
8899
|
-
var proto = Object.defineProperties(() => {
|
|
8900
|
-
}, {
|
|
9043
|
+
var proto = Object.defineProperties(() => {}, {
|
|
8901
9044
|
...styles2,
|
|
8902
9045
|
level: {
|
|
8903
9046
|
enumerable: true,
|
|
@@ -8950,7 +9093,8 @@ var applyStyle = (self, string) => {
|
|
|
8950
9093
|
styler = styler.parent;
|
|
8951
9094
|
}
|
|
8952
9095
|
}
|
|
8953
|
-
const lfIndex = string.indexOf(
|
|
9096
|
+
const lfIndex = string.indexOf(`
|
|
9097
|
+
`);
|
|
8954
9098
|
if (lfIndex !== -1) {
|
|
8955
9099
|
string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
|
|
8956
9100
|
}
|
|
@@ -8992,7 +9136,8 @@ var changePrototype = (to, from) => {
|
|
|
8992
9136
|
}
|
|
8993
9137
|
Object.setPrototypeOf(to, fromPrototype);
|
|
8994
9138
|
};
|
|
8995
|
-
var wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}
|
|
9139
|
+
var wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/
|
|
9140
|
+
${fromBody}`;
|
|
8996
9141
|
var toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, "toString");
|
|
8997
9142
|
var toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, "name");
|
|
8998
9143
|
var changeToString = (to, from, name) => {
|
|
@@ -9130,13 +9275,10 @@ var signalExitWrap = (handler) => {
|
|
|
9130
9275
|
|
|
9131
9276
|
class SignalExitFallback extends SignalExitBase {
|
|
9132
9277
|
onExit() {
|
|
9133
|
-
return () => {
|
|
9134
|
-
};
|
|
9135
|
-
}
|
|
9136
|
-
load() {
|
|
9137
|
-
}
|
|
9138
|
-
unload() {
|
|
9278
|
+
return () => {};
|
|
9139
9279
|
}
|
|
9280
|
+
load() {}
|
|
9281
|
+
unload() {}
|
|
9140
9282
|
}
|
|
9141
9283
|
|
|
9142
9284
|
class SignalExit extends SignalExitBase {
|
|
@@ -9173,8 +9315,7 @@ class SignalExit extends SignalExitBase {
|
|
|
9173
9315
|
}
|
|
9174
9316
|
onExit(cb, opts) {
|
|
9175
9317
|
if (!processOk(this.#process)) {
|
|
9176
|
-
return () => {
|
|
9177
|
-
};
|
|
9318
|
+
return () => {};
|
|
9178
9319
|
}
|
|
9179
9320
|
if (this.#loaded === false) {
|
|
9180
9321
|
this.load();
|
|
@@ -9199,8 +9340,7 @@ class SignalExit extends SignalExitBase {
|
|
|
9199
9340
|
const fn = this.#sigListeners[sig];
|
|
9200
9341
|
if (fn)
|
|
9201
9342
|
this.#process.on(sig, fn);
|
|
9202
|
-
} catch (_) {
|
|
9203
|
-
}
|
|
9343
|
+
} catch (_) {}
|
|
9204
9344
|
}
|
|
9205
9345
|
this.#process.emit = (ev, ...a) => {
|
|
9206
9346
|
return this.#processEmit(ev, ...a);
|
|
@@ -9221,8 +9361,7 @@ class SignalExit extends SignalExitBase {
|
|
|
9221
9361
|
}
|
|
9222
9362
|
try {
|
|
9223
9363
|
this.#process.removeListener(sig, listener);
|
|
9224
|
-
} catch (_) {
|
|
9225
|
-
}
|
|
9364
|
+
} catch (_) {}
|
|
9226
9365
|
});
|
|
9227
9366
|
this.#process.emit = this.#originalProcessEmit;
|
|
9228
9367
|
this.#process.reallyExit = this.#originalProcessReallyExit;
|
|
@@ -9263,8 +9402,7 @@ var restoreCursor = terminal ? onetime_default(() => {
|
|
|
9263
9402
|
onExit(() => {
|
|
9264
9403
|
terminal.write("\x1B[?25h");
|
|
9265
9404
|
}, { alwaysLast: true });
|
|
9266
|
-
}) : () => {
|
|
9267
|
-
};
|
|
9405
|
+
}) : () => {};
|
|
9268
9406
|
var restore_cursor_default = restoreCursor;
|
|
9269
9407
|
|
|
9270
9408
|
// node_modules/cli-cursor/index.js
|
|
@@ -9311,16 +9449,16 @@ function isUnicodeSupported() {
|
|
|
9311
9449
|
|
|
9312
9450
|
// node_modules/log-symbols/index.js
|
|
9313
9451
|
var main = {
|
|
9314
|
-
info: source_default.blue("
|
|
9315
|
-
success: source_default.green("
|
|
9316
|
-
warning: source_default.yellow("
|
|
9317
|
-
error: source_default.red("
|
|
9452
|
+
info: source_default.blue("ℹ"),
|
|
9453
|
+
success: source_default.green("✔"),
|
|
9454
|
+
warning: source_default.yellow("⚠"),
|
|
9455
|
+
error: source_default.red("✖")
|
|
9318
9456
|
};
|
|
9319
9457
|
var fallback = {
|
|
9320
9458
|
info: source_default.blue("i"),
|
|
9321
|
-
success: source_default.green("
|
|
9322
|
-
warning: source_default.yellow("
|
|
9323
|
-
error: source_default.red("
|
|
9459
|
+
success: source_default.green("√"),
|
|
9460
|
+
warning: source_default.yellow("‼"),
|
|
9461
|
+
error: source_default.red("×")
|
|
9324
9462
|
};
|
|
9325
9463
|
var logSymbols = isUnicodeSupported() ? main : fallback;
|
|
9326
9464
|
var log_symbols_default = logSymbols;
|
|
@@ -9340,6 +9478,9 @@ function stripAnsi(string) {
|
|
|
9340
9478
|
if (typeof string !== "string") {
|
|
9341
9479
|
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
9342
9480
|
}
|
|
9481
|
+
if (!string.includes("\x1B") && !string.includes("")) {
|
|
9482
|
+
return string;
|
|
9483
|
+
}
|
|
9343
9484
|
return string.replace(regex, "");
|
|
9344
9485
|
}
|
|
9345
9486
|
|
|
@@ -9369,6 +9510,18 @@ var isInRange = (ranges, codePoint) => {
|
|
|
9369
9510
|
};
|
|
9370
9511
|
|
|
9371
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);
|
|
9372
9525
|
function findWideFastPathRange(ranges) {
|
|
9373
9526
|
let fastPathStart = ranges[0];
|
|
9374
9527
|
let fastPathEnd = ranges[1];
|
|
@@ -9385,18 +9538,6 @@ function findWideFastPathRange(ranges) {
|
|
|
9385
9538
|
}
|
|
9386
9539
|
return [fastPathStart, fastPathEnd];
|
|
9387
9540
|
}
|
|
9388
|
-
var minimumAmbiguousCodePoint = ambiguousRanges[0];
|
|
9389
|
-
var maximumAmbiguousCodePoint = ambiguousRanges.at(-1);
|
|
9390
|
-
var minimumFullWidthCodePoint = fullwidthRanges[0];
|
|
9391
|
-
var maximumFullWidthCodePoint = fullwidthRanges.at(-1);
|
|
9392
|
-
var minimumHalfWidthCodePoint = halfwidthRanges[0];
|
|
9393
|
-
var maximumHalfWidthCodePoint = halfwidthRanges.at(-1);
|
|
9394
|
-
var minimumNarrowCodePoint = narrowRanges[0];
|
|
9395
|
-
var maximumNarrowCodePoint = narrowRanges.at(-1);
|
|
9396
|
-
var minimumWideCodePoint = wideRanges[0];
|
|
9397
|
-
var maximumWideCodePoint = wideRanges.at(-1);
|
|
9398
|
-
var commonCjkCodePoint = 19968;
|
|
9399
|
-
var [wideFastPathStart, wideFastPathEnd] = findWideFastPathRange(wideRanges);
|
|
9400
9541
|
var isAmbiguous = (codePoint) => {
|
|
9401
9542
|
if (codePoint < minimumAmbiguousCodePoint || codePoint > maximumAmbiguousCodePoint) {
|
|
9402
9543
|
return false;
|
|
@@ -9693,7 +9834,8 @@ class Ora {
|
|
|
9693
9834
|
const fullSuffixText = this.#getFullSuffixText(this.#suffixText, "-");
|
|
9694
9835
|
const fullText = " ".repeat(this.#indent) + fullPrefixText + "--" + this.#text + "--" + fullSuffixText;
|
|
9695
9836
|
this.#lineCount = 0;
|
|
9696
|
-
for (const line of stripAnsi(fullText).split(
|
|
9837
|
+
for (const line of stripAnsi(fullText).split(`
|
|
9838
|
+
`)) {
|
|
9697
9839
|
this.#lineCount += Math.max(1, Math.ceil(stringWidth(line, { countAnsiEscapeCodes: true }) / columns));
|
|
9698
9840
|
}
|
|
9699
9841
|
}
|
|
@@ -9767,7 +9909,8 @@ class Ora {
|
|
|
9767
9909
|
}
|
|
9768
9910
|
if (!this.#isEnabled) {
|
|
9769
9911
|
if (this.text) {
|
|
9770
|
-
this.#stream.write(`- ${this.text}
|
|
9912
|
+
this.#stream.write(`- ${this.text}
|
|
9913
|
+
`);
|
|
9771
9914
|
}
|
|
9772
9915
|
return this;
|
|
9773
9916
|
}
|
|
@@ -9826,7 +9969,8 @@ class Ora {
|
|
|
9826
9969
|
const fullText = typeof text === "string" ? separatorText + text : "";
|
|
9827
9970
|
const suffixText = options.suffixText ?? this.#suffixText;
|
|
9828
9971
|
const fullSuffixText = this.#getFullSuffixText(suffixText, " ");
|
|
9829
|
-
const textToWrite = fullPrefixText + symbolText + fullText + fullSuffixText +
|
|
9972
|
+
const textToWrite = fullPrefixText + symbolText + fullText + fullSuffixText + `
|
|
9973
|
+
`;
|
|
9830
9974
|
this.stop();
|
|
9831
9975
|
this.#stream.write(textToWrite);
|
|
9832
9976
|
return this;
|
|
@@ -9837,21 +9981,23 @@ function ora(options) {
|
|
|
9837
9981
|
}
|
|
9838
9982
|
|
|
9839
9983
|
// src/cli/commands/add.ts
|
|
9840
|
-
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
9841
9984
|
init_config();
|
|
9985
|
+
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
9842
9986
|
|
|
9843
9987
|
// src/cli/utils/registry.ts
|
|
9844
9988
|
async function fetchRegistryIndex(registryUrl) {
|
|
9845
|
-
const
|
|
9989
|
+
const url = `${registryUrl}/registry.json`;
|
|
9990
|
+
const res = await fetch(url);
|
|
9846
9991
|
if (!res.ok) {
|
|
9847
|
-
throw new Error(`Failed to fetch registry index: ${res.status} ${res.statusText}`);
|
|
9992
|
+
throw new Error(`Failed to fetch registry index from ${url}: ${res.status} ${res.statusText}`);
|
|
9848
9993
|
}
|
|
9849
9994
|
return res.json();
|
|
9850
9995
|
}
|
|
9851
9996
|
async function fetchRegistryItem(registryUrl, name) {
|
|
9852
|
-
const
|
|
9997
|
+
const url = `${registryUrl}/${name}.json`;
|
|
9998
|
+
const res = await fetch(url);
|
|
9853
9999
|
if (!res.ok) {
|
|
9854
|
-
throw new Error(`Function "${name}" not found in registry (${res.status})`);
|
|
10000
|
+
throw new Error(`Function "${name}" not found in registry at ${url} (${res.status})`);
|
|
9855
10001
|
}
|
|
9856
10002
|
return res.json();
|
|
9857
10003
|
}
|
|
@@ -9878,8 +10024,9 @@ function collectDeps(items) {
|
|
|
9878
10024
|
}
|
|
9879
10025
|
|
|
9880
10026
|
// src/cli/utils/write.ts
|
|
9881
|
-
import {mkdirSync, writeFileSync as writeFileSync2} from "fs";
|
|
9882
|
-
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";
|
|
9883
10030
|
function writeRegistryItem(item, outputDir, version, cwd = process.cwd()) {
|
|
9884
10031
|
const written = [];
|
|
9885
10032
|
const itemDir = join2(cwd, outputDir, item.name);
|
|
@@ -9893,12 +10040,11 @@ function writeRegistryItem(item, outputDir, version, cwd = process.cwd()) {
|
|
|
9893
10040
|
writeFileSync2(stampPath, version, "utf-8");
|
|
9894
10041
|
return written;
|
|
9895
10042
|
}
|
|
9896
|
-
var VERSION_STAMP_FILE = ".3dvf-version";
|
|
9897
10043
|
|
|
9898
10044
|
// src/cli/utils/packageManager.ts
|
|
9899
|
-
import {existsSync as existsSync2} from "fs";
|
|
9900
|
-
import {join as join3} from "path";
|
|
9901
|
-
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";
|
|
9902
10048
|
function detectPackageManager(cwd = process.cwd()) {
|
|
9903
10049
|
if (existsSync2(join3(cwd, "bun.lockb")))
|
|
9904
10050
|
return "bun";
|
|
@@ -9924,9 +10070,9 @@ function installDeps(deps, devDeps, cwd = process.cwd()) {
|
|
|
9924
10070
|
|
|
9925
10071
|
// src/cli/commands/add.ts
|
|
9926
10072
|
async function addCommand(names) {
|
|
9927
|
-
let
|
|
10073
|
+
let config;
|
|
9928
10074
|
try {
|
|
9929
|
-
|
|
10075
|
+
config = readConfig();
|
|
9930
10076
|
} catch (err) {
|
|
9931
10077
|
console.error(import_picocolors.default.red(err.message));
|
|
9932
10078
|
process.exit(1);
|
|
@@ -9934,7 +10080,7 @@ async function addCommand(names) {
|
|
|
9934
10080
|
const spinner = ora(`Resolving ${names.join(", ")}...`).start();
|
|
9935
10081
|
let tree;
|
|
9936
10082
|
try {
|
|
9937
|
-
tree = await resolveTree(names,
|
|
10083
|
+
tree = await resolveTree(names, config.registry);
|
|
9938
10084
|
} catch (err) {
|
|
9939
10085
|
spinner.fail(err.message);
|
|
9940
10086
|
process.exit(1);
|
|
@@ -9943,9 +10089,9 @@ async function addCommand(names) {
|
|
|
9943
10089
|
const items = [...tree.values()];
|
|
9944
10090
|
const written = [];
|
|
9945
10091
|
for (const item of items) {
|
|
9946
|
-
const paths = writeRegistryItem(item,
|
|
10092
|
+
const paths = writeRegistryItem(item, config.outputDir, CLI_VERSION);
|
|
9947
10093
|
written.push(...paths);
|
|
9948
|
-
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})`)}`);
|
|
9949
10095
|
for (const p of paths) {
|
|
9950
10096
|
console.log(import_picocolors.default.dim(` ${p.replace(process.cwd() + "/", "")}`));
|
|
9951
10097
|
}
|
|
@@ -9962,19 +10108,141 @@ async function addCommand(names) {
|
|
|
9962
10108
|
process.exit(1);
|
|
9963
10109
|
}
|
|
9964
10110
|
}
|
|
9965
|
-
console.log(import_picocolors.default.green(
|
|
10111
|
+
console.log(import_picocolors.default.green(`
|
|
10112
|
+
Done!`) + ` Added ${items.length} function(s) to ${config.outputDir}`);
|
|
9966
10113
|
}
|
|
9967
10114
|
|
|
9968
|
-
// src/cli/commands/
|
|
10115
|
+
// src/cli/commands/create.ts
|
|
9969
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();
|
|
9970
10122
|
var import_picocolors2 = __toESM(require_picocolors(), 1);
|
|
9971
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(/^\^|~/, "");
|
|
9972
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
|
+
}
|
|
9973
10241
|
if (configExists()) {
|
|
9974
|
-
console.log(
|
|
10242
|
+
console.log(import_picocolors3.default.yellow("3dvf.json already exists. Skipping init."));
|
|
9975
10243
|
return;
|
|
9976
10244
|
}
|
|
9977
|
-
const answers = await
|
|
10245
|
+
const answers = await import_prompts2.default([
|
|
9978
10246
|
{
|
|
9979
10247
|
type: "text",
|
|
9980
10248
|
name: "outputDir",
|
|
@@ -9991,37 +10259,49 @@ async function initCommand() {
|
|
|
9991
10259
|
}
|
|
9992
10260
|
]);
|
|
9993
10261
|
if (answers.outputDir === undefined) {
|
|
9994
|
-
console.log(
|
|
10262
|
+
console.log(import_picocolors3.default.red("Cancelled."));
|
|
9995
10263
|
process.exit(1);
|
|
9996
10264
|
}
|
|
9997
|
-
const
|
|
10265
|
+
const config = {
|
|
9998
10266
|
outputDir: answers.outputDir,
|
|
9999
10267
|
registry: DEFAULT_CONFIG.registry,
|
|
10000
10268
|
typescript: answers.typescript
|
|
10001
10269
|
};
|
|
10002
|
-
writeConfig(
|
|
10003
|
-
console.log(
|
|
10004
|
-
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
|
+
}
|
|
10005
10283
|
}
|
|
10006
10284
|
|
|
10007
10285
|
// src/cli/commands/list.ts
|
|
10008
|
-
var import_picocolors3 = __toESM(require_picocolors(), 1);
|
|
10009
10286
|
init_config();
|
|
10287
|
+
var import_picocolors4 = __toESM(require_picocolors(), 1);
|
|
10010
10288
|
async function listCommand() {
|
|
10011
|
-
let
|
|
10289
|
+
let config;
|
|
10012
10290
|
try {
|
|
10013
|
-
|
|
10291
|
+
config = readConfig();
|
|
10014
10292
|
} catch {
|
|
10015
10293
|
const { DEFAULT_CONFIG: DEFAULT_CONFIG2 } = await Promise.resolve().then(() => (init_config(), exports_config));
|
|
10016
|
-
|
|
10294
|
+
config = DEFAULT_CONFIG2;
|
|
10017
10295
|
}
|
|
10018
10296
|
const spinner = ora("Fetching registry...").start();
|
|
10019
10297
|
try {
|
|
10020
|
-
const index = await fetchRegistryIndex(
|
|
10298
|
+
const index = await fetchRegistryIndex(config.registry);
|
|
10021
10299
|
spinner.stop();
|
|
10022
|
-
console.log(
|
|
10300
|
+
console.log(import_picocolors4.default.bold(`
|
|
10301
|
+
Available functions (${index.items.length}):
|
|
10302
|
+
`));
|
|
10023
10303
|
for (const item of index.items) {
|
|
10024
|
-
console.log(` ${
|
|
10304
|
+
console.log(` ${import_picocolors4.default.cyan(item.name)}`);
|
|
10025
10305
|
}
|
|
10026
10306
|
console.log();
|
|
10027
10307
|
} catch (err) {
|
|
@@ -10033,6 +10313,7 @@ async function listCommand() {
|
|
|
10033
10313
|
// src/cli/index.ts
|
|
10034
10314
|
var program2 = new Command;
|
|
10035
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);
|
|
10036
10317
|
program2.command("init").description("Initialize 3dvf in your project (creates 3dvf.json)").action(initCommand);
|
|
10037
10318
|
program2.command("add <names...>").description("Add one or more functions to your project").action(addCommand);
|
|
10038
10319
|
program2.command("list").description("List all available functions in the registry").action(listCommand);
|