@s0rt/3dvf 0.1.3 → 0.2.1

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: () => mod[key],
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: (newValue) => all[name] = () => newValue
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("\n").replace(/^/gm, " ".repeat(itemIndentWidth));
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("\n");
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\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF";
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("\r\n", "\n");
381
+ const columnText = str.slice(indent).replace(`\r
382
+ `, `
383
+ `);
362
384
  const indentString = " ".repeat(indent);
363
- const zeroWidthSpace = "\u200B";
385
+ const zeroWidthSpace = "";
364
386
  const breaks = `\\s${zeroWidthSpace}`;
365
- const regex = new RegExp(`\n|.{1,${columnWidth - 1}}([${breaks}]|\$)|[^${breaks}]+?([${breaks}]|\$)`, "g");
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 === "\n")
391
+ if (line === `
392
+ `)
369
393
  return "";
370
394
  return (i > 0 ? indentString : "") + line.trimEnd();
371
- }).join("\n");
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 `\n(Did you mean one of ${similar.join(", ")}?)`;
614
+ return `
615
+ (Did you mean one of ${similar.join(", ")}?)`;
589
616
  }
590
617
  if (similar.length === 1) {
591
- return `\n(Did you mean ${similar[0]}?)`;
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}\n`, this._outputConfiguration.writeErr);
1534
+ this._outputConfiguration.outputError(`${message}
1535
+ `, this._outputConfiguration.writeErr);
1538
1536
  if (typeof this._showHelpAfterError === "string") {
1539
- this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`);
1537
+ this._outputConfiguration.writeErr(`${this._showHelpAfterError}
1538
+ `);
1540
1539
  } else if (this._showHelpAfterError) {
1541
- this._outputConfiguration.writeErr("\n");
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}\n`);
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}\n`);
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.2",
3611
+ version: "0.2.1",
3581
3612
  description: "shadcn-style Three.js function library CLI",
3582
3613
  type: "module",
3583
3614
  bin: {
@@ -3590,10 +3621,11 @@ var init_package = __esm(() => {
3590
3621
  access: "public"
3591
3622
  },
3592
3623
  scripts: {
3593
- build: "bun build src/cli/index.ts --outdir dist/cli --target node --format esm",
3594
- "build:registry": "bun run scripts/build-registry.ts",
3595
- "serve:registry": "bunx serve public -p 3001",
3596
- dev: "bun run src/cli/index.ts",
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: {
@@ -3603,8 +3635,11 @@ var init_package = __esm(() => {
3603
3635
  prompts: "^2.4.2"
3604
3636
  },
3605
3637
  devDependencies: {
3638
+ "@types/bun": "^1.3.10",
3606
3639
  "@types/prompts": "^2.4.9",
3607
- typescript: "^5.7.0"
3640
+ "@types/three": "^0.183.1",
3641
+ typescript: "^5.7.0",
3642
+ vite: "^7.3.1"
3608
3643
  }
3609
3644
  };
3610
3645
  });
@@ -3618,8 +3653,8 @@ __export(exports_config, {
3618
3653
  DEFAULT_CONFIG: () => DEFAULT_CONFIG,
3619
3654
  CLI_VERSION: () => CLI_VERSION
3620
3655
  });
3621
- import {existsSync, readFileSync, writeFileSync} from "fs";
3622
- import {join} from "path";
3656
+ import { existsSync, readFileSync, writeFileSync } from "fs";
3657
+ import { join } from "path";
3623
3658
  function readConfig(cwd = process.cwd()) {
3624
3659
  const configPath = join(cwd, CONFIG_FILE);
3625
3660
  if (!existsSync(configPath)) {
@@ -3630,7 +3665,8 @@ function readConfig(cwd = process.cwd()) {
3630
3665
  }
3631
3666
  function writeConfig(config, cwd = process.cwd()) {
3632
3667
  const configPath = join(cwd, CONFIG_FILE);
3633
- writeFileSync(configPath, JSON.stringify(config, null, 2) + "\n", "utf-8");
3668
+ writeFileSync(configPath, JSON.stringify(config, null, 2) + `
3669
+ `, "utf-8");
3634
3670
  }
3635
3671
  function configExists(cwd = process.cwd()) {
3636
3672
  return existsSync(join(cwd, CONFIG_FILE));
@@ -3648,6 +3684,36 @@ var init_config = __esm(() => {
3648
3684
 
3649
3685
  // node_modules/kleur/index.js
3650
3686
  var require_kleur = __commonJS((exports, module) => {
3687
+ var { FORCE_COLOR, NODE_DISABLE_COLORS, TERM } = process.env;
3688
+ var $ = {
3689
+ enabled: !NODE_DISABLE_COLORS && TERM !== "dumb" && FORCE_COLOR !== "0",
3690
+ reset: init(0, 0),
3691
+ bold: init(1, 22),
3692
+ dim: init(2, 22),
3693
+ italic: init(3, 23),
3694
+ underline: init(4, 24),
3695
+ inverse: init(7, 27),
3696
+ hidden: init(8, 28),
3697
+ strikethrough: init(9, 29),
3698
+ black: init(30, 39),
3699
+ red: init(31, 39),
3700
+ green: init(32, 39),
3701
+ yellow: init(33, 39),
3702
+ blue: init(34, 39),
3703
+ magenta: init(35, 39),
3704
+ cyan: init(36, 39),
3705
+ white: init(37, 39),
3706
+ gray: init(90, 39),
3707
+ grey: init(90, 39),
3708
+ bgBlack: init(40, 49),
3709
+ bgRed: init(41, 49),
3710
+ bgGreen: init(42, 49),
3711
+ bgYellow: init(43, 49),
3712
+ bgBlue: init(44, 49),
3713
+ bgMagenta: init(45, 49),
3714
+ bgCyan: init(46, 49),
3715
+ bgWhite: init(47, 49)
3716
+ };
3651
3717
  function run(arr, str) {
3652
3718
  let i = 0, tmp, beg = "", end = "";
3653
3719
  for (;i < arr.length; i++) {
@@ -3704,36 +3770,6 @@ var require_kleur = __commonJS((exports, module) => {
3704
3770
  return txt === undefined ? chain([open], [blk]) : $.enabled ? run([blk], txt + "") : txt + "";
3705
3771
  };
3706
3772
  }
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
3773
  module.exports = $;
3738
3774
  });
3739
3775
 
@@ -3870,8 +3906,7 @@ var require_clear = __commonJS((exports, module) => {
3870
3906
  if (it)
3871
3907
  o = it;
3872
3908
  var i = 0;
3873
- var F = function F() {
3874
- };
3909
+ var F = function F2() {};
3875
3910
  return { s: F, n: function n() {
3876
3911
  if (i >= o.length)
3877
3912
  return { done: true };
@@ -3880,7 +3915,8 @@ var require_clear = __commonJS((exports, module) => {
3880
3915
  throw _e;
3881
3916
  }, f: F };
3882
3917
  }
3883
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3918
+ throw new TypeError(`Invalid attempt to iterate non-iterable instance.
3919
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
3884
3920
  }
3885
3921
  var normalCompletion = true, didErr = false, err;
3886
3922
  return { s: function s() {
@@ -3950,18 +3986,18 @@ var require_clear = __commonJS((exports, module) => {
3950
3986
  // node_modules/prompts/dist/util/figures.js
3951
3987
  var require_figures = __commonJS((exports, module) => {
3952
3988
  var main2 = {
3953
- arrowUp: "\u2191",
3954
- arrowDown: "\u2193",
3955
- arrowLeft: "\u2190",
3956
- arrowRight: "\u2192",
3957
- radioOn: "\u25C9",
3958
- radioOff: "\u25EF",
3959
- tick: "\u2714",
3960
- cross: "\u2716",
3961
- ellipsis: "\u2026",
3962
- pointerSmall: "\u203A",
3963
- line: "\u2500",
3964
- pointer: "\u276F"
3989
+ arrowUp: "",
3990
+ arrowDown: "",
3991
+ arrowLeft: "",
3992
+ arrowRight: "",
3993
+ radioOn: "",
3994
+ radioOff: "",
3995
+ tick: "",
3996
+ cross: "",
3997
+ ellipsis: "",
3998
+ pointerSmall: "",
3999
+ line: "",
4000
+ pointer: ""
3965
4001
  };
3966
4002
  var win = {
3967
4003
  arrowUp: main2.arrowUp,
@@ -3970,11 +4006,11 @@ var require_figures = __commonJS((exports, module) => {
3970
4006
  arrowRight: main2.arrowRight,
3971
4007
  radioOn: "(*)",
3972
4008
  radioOff: "( )",
3973
- tick: "\u221A",
3974
- cross: "\xD7",
4009
+ tick: "",
4010
+ cross: "×",
3975
4011
  ellipsis: "...",
3976
- pointerSmall: "\xBB",
3977
- line: "\u2500",
4012
+ pointerSmall: "»",
4013
+ line: "",
3978
4014
  pointer: ">"
3979
4015
  };
3980
4016
  var figures = process.platform === "win32" ? win : main2;
@@ -4045,7 +4081,9 @@ var require_wrap = __commonJS((exports, module) => {
4045
4081
  else
4046
4082
  arr.push(`${tab}${w}`);
4047
4083
  return arr;
4048
- }, [tab]).join("\n")).join("\n");
4084
+ }, [tab]).join(`
4085
+ `)).join(`
4086
+ `);
4049
4087
  };
4050
4088
  });
4051
4089
 
@@ -4234,7 +4272,8 @@ var require_text = __commonJS((exports, module) => {
4234
4272
  this.red = false;
4235
4273
  this.fire();
4236
4274
  this.render();
4237
- this.out.write("\n");
4275
+ this.out.write(`
4276
+ `);
4238
4277
  this.close();
4239
4278
  }
4240
4279
  validate() {
@@ -4265,7 +4304,8 @@ var require_text = __commonJS((exports, module) => {
4265
4304
  _this2.aborted = false;
4266
4305
  _this2.fire();
4267
4306
  _this2.render();
4268
- _this2.out.write("\n");
4307
+ _this2.out.write(`
4308
+ `);
4269
4309
  _this2.close();
4270
4310
  })();
4271
4311
  }
@@ -4358,7 +4398,9 @@ var require_text = __commonJS((exports, module) => {
4358
4398
  this.outputError = "";
4359
4399
  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
4400
  if (this.error) {
4361
- this.outputError += this.errorMsg.split(`\n`).reduce((a, l, i) => a + `\n${i ? " " : figures.pointerSmall} ${color.red().italic(l)}`, ``);
4401
+ this.outputError += this.errorMsg.split(`
4402
+ `).reduce((a, l, i) => a + `
4403
+ ${i ? " " : figures.pointerSmall} ${color.red().italic(l)}`, ``);
4362
4404
  }
4363
4405
  this.out.write(erase.line + cursor.to(0) + this.outputText + cursor.save + this.outputError + cursor.restore + cursor.move(this.cursorOffset, 0));
4364
4406
  }
@@ -4422,7 +4464,8 @@ var require_select = __commonJS((exports, module) => {
4422
4464
  this.done = this.aborted = true;
4423
4465
  this.fire();
4424
4466
  this.render();
4425
- this.out.write("\n");
4467
+ this.out.write(`
4468
+ `);
4426
4469
  this.close();
4427
4470
  }
4428
4471
  submit() {
@@ -4431,7 +4474,8 @@ var require_select = __commonJS((exports, module) => {
4431
4474
  this.aborted = false;
4432
4475
  this.fire();
4433
4476
  this.render();
4434
- this.out.write("\n");
4477
+ this.out.write(`
4478
+ `);
4435
4479
  this.close();
4436
4480
  } else
4437
4481
  this.bell();
@@ -4482,7 +4526,8 @@ var require_select = __commonJS((exports, module) => {
4482
4526
  let _entriesToDisplay = entriesToDisplay(this.cursor, this.choices.length, this.optionsPerPage), startIndex = _entriesToDisplay.startIndex, endIndex = _entriesToDisplay.endIndex;
4483
4527
  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
4528
  if (!this.done) {
4485
- this.outputText += "\n";
4529
+ this.outputText += `
4530
+ `;
4486
4531
  for (let i = startIndex;i < endIndex; i++) {
4487
4532
  let title, prefix, desc = "", v = this.choices[i];
4488
4533
  if (i === startIndex && startIndex > 0) {
@@ -4501,14 +4546,16 @@ var require_select = __commonJS((exports, module) => {
4501
4546
  if (v.description && this.cursor === i) {
4502
4547
  desc = ` - ${v.description}`;
4503
4548
  if (prefix.length + title.length + desc.length >= this.out.columns || v.description.split(/\r?\n/).length > 1) {
4504
- desc = "\n" + wrap(v.description, {
4549
+ desc = `
4550
+ ` + wrap(v.description, {
4505
4551
  margin: 3,
4506
4552
  width: this.out.columns
4507
4553
  });
4508
4554
  }
4509
4555
  }
4510
4556
  }
4511
- this.outputText += `${prefix} ${title}${color.gray(desc)}\n`;
4557
+ this.outputText += `${prefix} ${title}${color.gray(desc)}
4558
+ `;
4512
4559
  }
4513
4560
  }
4514
4561
  this.out.write(this.outputText);
@@ -4550,7 +4597,8 @@ var require_toggle = __commonJS((exports, module) => {
4550
4597
  this.done = this.aborted = true;
4551
4598
  this.fire();
4552
4599
  this.render();
4553
- this.out.write("\n");
4600
+ this.out.write(`
4601
+ `);
4554
4602
  this.close();
4555
4603
  }
4556
4604
  submit() {
@@ -4558,7 +4606,8 @@ var require_toggle = __commonJS((exports, module) => {
4558
4606
  this.aborted = false;
4559
4607
  this.fire();
4560
4608
  this.render();
4561
- this.out.write("\n");
4609
+ this.out.write(`
4610
+ `);
4562
4611
  this.close();
4563
4612
  }
4564
4613
  deactivate() {
@@ -4633,16 +4682,13 @@ var require_datepart = __commonJS((exports, module) => {
4633
4682
  this.parts = parts || [this];
4634
4683
  this.locales = locales || {};
4635
4684
  }
4636
- up() {
4637
- }
4638
- down() {
4639
- }
4685
+ up() {}
4686
+ down() {}
4640
4687
  next() {
4641
4688
  const currentIdx = this.parts.indexOf(this);
4642
4689
  return this.parts.find((part, idx) => idx > currentIdx && part instanceof DatePart);
4643
4690
  }
4644
- setTo(val) {
4645
- }
4691
+ setTo(val) {}
4646
4692
  prev() {
4647
4693
  let parts = [].concat(this.parts).reverse();
4648
4694
  const currentIdx = parts.indexOf(this);
@@ -5012,7 +5058,8 @@ var require_date = __commonJS((exports, module) => {
5012
5058
  this.error = false;
5013
5059
  this.fire();
5014
5060
  this.render();
5015
- this.out.write("\n");
5061
+ this.out.write(`
5062
+ `);
5016
5063
  this.close();
5017
5064
  }
5018
5065
  validate() {
@@ -5040,7 +5087,8 @@ var require_date = __commonJS((exports, module) => {
5040
5087
  _this2.aborted = false;
5041
5088
  _this2.fire();
5042
5089
  _this2.render();
5043
- _this2.out.write("\n");
5090
+ _this2.out.write(`
5091
+ `);
5044
5092
  _this2.close();
5045
5093
  })();
5046
5094
  }
@@ -5090,7 +5138,9 @@ var require_date = __commonJS((exports, module) => {
5090
5138
  super.render();
5091
5139
  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
5140
  if (this.error) {
5093
- this.outputText += this.errorMsg.split("\n").reduce((a, l, i) => a + `\n${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);
5141
+ this.outputText += this.errorMsg.split(`
5142
+ `).reduce((a, l, i) => a + `
5143
+ ${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);
5094
5144
  }
5095
5145
  this.out.write(erase.line + cursor.to(0) + this.outputText);
5096
5146
  }
@@ -5202,7 +5252,8 @@ var require_number = __commonJS((exports, module) => {
5202
5252
  this.error = false;
5203
5253
  this.fire();
5204
5254
  this.render();
5205
- this.out.write(`\n`);
5255
+ this.out.write(`
5256
+ `);
5206
5257
  this.close();
5207
5258
  }
5208
5259
  validate() {
@@ -5233,7 +5284,8 @@ var require_number = __commonJS((exports, module) => {
5233
5284
  _this2.error = false;
5234
5285
  _this2.fire();
5235
5286
  _this2.render();
5236
- _this2.out.write(`\n`);
5287
+ _this2.out.write(`
5288
+ `);
5237
5289
  _this2.close();
5238
5290
  })();
5239
5291
  }
@@ -5309,7 +5361,9 @@ var require_number = __commonJS((exports, module) => {
5309
5361
  this.outputError = "";
5310
5362
  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
5363
  if (this.error) {
5312
- this.outputError += this.errorMsg.split(`\n`).reduce((a, l, i) => a + `\n${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);
5364
+ this.outputError += this.errorMsg.split(`
5365
+ `).reduce((a, l, i) => a + `
5366
+ ${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);
5313
5367
  }
5314
5368
  this.out.write(erase.line + cursor.to(0) + this.outputText + cursor.save + this.outputError + cursor.restore);
5315
5369
  }
@@ -5378,7 +5432,8 @@ var require_multiselect = __commonJS((exports, module) => {
5378
5432
  this.done = this.aborted = true;
5379
5433
  this.fire();
5380
5434
  this.render();
5381
- this.out.write("\n");
5435
+ this.out.write(`
5436
+ `);
5382
5437
  this.close();
5383
5438
  }
5384
5439
  submit() {
@@ -5391,7 +5446,8 @@ var require_multiselect = __commonJS((exports, module) => {
5391
5446
  this.aborted = false;
5392
5447
  this.fire();
5393
5448
  this.render();
5394
- this.out.write("\n");
5449
+ this.out.write(`
5450
+ `);
5395
5451
  this.close();
5396
5452
  }
5397
5453
  }
@@ -5467,7 +5523,12 @@ var require_multiselect = __commonJS((exports, module) => {
5467
5523
  if (typeof this.instructions === "string") {
5468
5524
  return this.instructions;
5469
5525
  }
5470
- return "\nInstructions:\n" + ` ${figures.arrowUp}/${figures.arrowDown}: Highlight option\n` + ` ${figures.arrowLeft}/${figures.arrowRight}/[space]: Toggle selection\n` + (this.maxChoices === undefined ? ` a: Toggle all\n` : "") + ` enter/return: Complete answer`;
5526
+ return `
5527
+ Instructions:
5528
+ ` + ` ${figures.arrowUp}/${figures.arrowDown}: Highlight option
5529
+ ` + ` ${figures.arrowLeft}/${figures.arrowRight}/[space]: Toggle selection
5530
+ ` + (this.maxChoices === undefined ? ` a: Toggle all
5531
+ ` : "") + ` enter/return: Complete answer`;
5471
5532
  }
5472
5533
  return "";
5473
5534
  }
@@ -5481,7 +5542,8 @@ var require_multiselect = __commonJS((exports, module) => {
5481
5542
  if (cursor2 === i && v.description) {
5482
5543
  desc = ` - ${v.description}`;
5483
5544
  if (prefix.length + title.length + desc.length >= this.out.columns || v.description.split(/\r?\n/).length > 1) {
5484
- desc = "\n" + wrap(v.description, {
5545
+ desc = `
5546
+ ` + wrap(v.description, {
5485
5547
  margin: prefix.length,
5486
5548
  width: this.out.columns
5487
5549
  });
@@ -5506,7 +5568,9 @@ var require_multiselect = __commonJS((exports, module) => {
5506
5568
  }
5507
5569
  styledOptions.push(this.renderOption(this.cursor, options[i], i, prefix));
5508
5570
  }
5509
- return "\n" + styledOptions.join("\n");
5571
+ return `
5572
+ ` + styledOptions.join(`
5573
+ `);
5510
5574
  }
5511
5575
  renderOptions(options) {
5512
5576
  if (!this.done) {
@@ -5674,7 +5738,8 @@ var require_autocomplete = __commonJS((exports, module) => {
5674
5738
  this.aborted = false;
5675
5739
  this.fire();
5676
5740
  this.render();
5677
- this.out.write("\n");
5741
+ this.out.write(`
5742
+ `);
5678
5743
  this.close();
5679
5744
  }
5680
5745
  }
@@ -5683,7 +5748,8 @@ var require_autocomplete = __commonJS((exports, module) => {
5683
5748
  this.exited = false;
5684
5749
  this.fire();
5685
5750
  this.render();
5686
- this.out.write("\n");
5751
+ this.out.write(`
5752
+ `);
5687
5753
  this.close();
5688
5754
  }
5689
5755
  submit() {
@@ -5691,7 +5757,8 @@ var require_autocomplete = __commonJS((exports, module) => {
5691
5757
  this.aborted = this.exited = false;
5692
5758
  this.fire();
5693
5759
  this.render();
5694
- this.out.write("\n");
5760
+ this.out.write(`
5761
+ `);
5695
5762
  this.close();
5696
5763
  }
5697
5764
  _(c, key) {
@@ -5780,7 +5847,8 @@ var require_autocomplete = __commonJS((exports, module) => {
5780
5847
  if (v.description) {
5781
5848
  desc = ` - ${v.description}`;
5782
5849
  if (prefix.length + title.length + desc.length >= this.out.columns || v.description.split(/\r?\n/).length > 1) {
5783
- desc = "\n" + wrap(v.description, {
5850
+ desc = `
5851
+ ` + wrap(v.description, {
5784
5852
  margin: 3,
5785
5853
  width: this.out.columns
5786
5854
  });
@@ -5799,8 +5867,10 @@ var require_autocomplete = __commonJS((exports, module) => {
5799
5867
  let _entriesToDisplay = entriesToDisplay(this.select, this.choices.length, this.limit), startIndex = _entriesToDisplay.startIndex, endIndex = _entriesToDisplay.endIndex;
5800
5868
  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
5869
  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("\n");
5803
- this.outputText += `\n` + (suggestions || color.gray(this.fallback.title));
5870
+ 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(`
5871
+ `);
5872
+ this.outputText += `
5873
+ ` + (suggestions || color.gray(this.fallback.title));
5804
5874
  }
5805
5875
  this.out.write(erase.line + cursor.to(0) + this.outputText);
5806
5876
  }
@@ -5930,7 +6000,8 @@ Instructions:
5930
6000
  }
5931
6001
  renderCurrentInput() {
5932
6002
  return `
5933
- Filtered results for: ${this.inputValue ? this.inputValue : color.gray("Enter something to filter")}\n`;
6003
+ Filtered results for: ${this.inputValue ? this.inputValue : color.gray("Enter something to filter")}
6004
+ `;
5934
6005
  }
5935
6006
  renderOption(cursor2, v, i) {
5936
6007
  let title;
@@ -6004,7 +6075,8 @@ var require_confirm = __commonJS((exports, module) => {
6004
6075
  this.done = this.aborted = true;
6005
6076
  this.fire();
6006
6077
  this.render();
6007
- this.out.write("\n");
6078
+ this.out.write(`
6079
+ `);
6008
6080
  this.close();
6009
6081
  }
6010
6082
  submit() {
@@ -6013,7 +6085,8 @@ var require_confirm = __commonJS((exports, module) => {
6013
6085
  this.aborted = false;
6014
6086
  this.fire();
6015
6087
  this.render();
6016
- this.out.write("\n");
6088
+ this.out.write(`
6089
+ `);
6017
6090
  this.close();
6018
6091
  }
6019
6092
  _(c, key) {
@@ -6059,6 +6132,9 @@ var require_elements = __commonJS((exports, module) => {
6059
6132
 
6060
6133
  // node_modules/prompts/dist/prompts.js
6061
6134
  var require_prompts = __commonJS((exports) => {
6135
+ var $ = exports;
6136
+ var el = require_elements();
6137
+ var noop = (v) => v;
6062
6138
  function toPrompt(type, args, opts = {}) {
6063
6139
  return new Promise((res, rej) => {
6064
6140
  const p = new el[type](args);
@@ -6071,9 +6147,6 @@ var require_prompts = __commonJS((exports) => {
6071
6147
  p.on("abort", (x) => rej(onAbort(x)));
6072
6148
  });
6073
6149
  }
6074
- var $ = exports;
6075
- var el = require_elements();
6076
- var noop = (v) => v;
6077
6150
  $.text = (args) => toPrompt("TextPrompt", args);
6078
6151
  $.password = (args) => {
6079
6152
  args.style = "password";
@@ -6165,8 +6238,7 @@ var require_dist = __commonJS((exports, module) => {
6165
6238
  if (it)
6166
6239
  o = it;
6167
6240
  var i = 0;
6168
- var F = function F() {
6169
- };
6241
+ var F = function F2() {};
6170
6242
  return { s: F, n: function n() {
6171
6243
  if (i >= o.length)
6172
6244
  return { done: true };
@@ -6175,7 +6247,8 @@ var require_dist = __commonJS((exports, module) => {
6175
6247
  throw _e;
6176
6248
  }, f: F };
6177
6249
  }
6178
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
6250
+ throw new TypeError(`Invalid attempt to iterate non-iterable instance.
6251
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
6179
6252
  }
6180
6253
  var normalCompletion = true, didErr = false, err;
6181
6254
  return { s: function s() {
@@ -6246,6 +6319,9 @@ var require_dist = __commonJS((exports, module) => {
6246
6319
  });
6247
6320
  };
6248
6321
  }
6322
+ var prompts = require_prompts();
6323
+ var passOn = ["suggest", "format", "onState", "validate", "onRender", "type"];
6324
+ var noop = () => {};
6249
6325
  function prompt() {
6250
6326
  return _prompt.apply(this, arguments);
6251
6327
  }
@@ -6265,7 +6341,7 @@ var require_dist = __commonJS((exports, module) => {
6265
6341
  }
6266
6342
  return question2.format ? yield question2.format(answer2, answers) : answer2;
6267
6343
  });
6268
- return function getFormattedAnswer(_x, _x2) {
6344
+ return function getFormattedAnswer2(_x, _x2) {
6269
6345
  return _ref.apply(this, arguments);
6270
6346
  };
6271
6347
  }();
@@ -6337,10 +6413,6 @@ var require_dist = __commonJS((exports, module) => {
6337
6413
  function override(answers) {
6338
6414
  prompt._override = Object.assign({}, answers);
6339
6415
  }
6340
- var prompts = require_prompts();
6341
- var passOn = ["suggest", "format", "onState", "validate", "onRender", "type"];
6342
- var noop = () => {
6343
- };
6344
6416
  module.exports = Object.assign(prompt, {
6345
6417
  prompt,
6346
6418
  prompts,
@@ -6438,18 +6510,18 @@ var require_clear2 = __commonJS((exports, module) => {
6438
6510
  // node_modules/prompts/lib/util/figures.js
6439
6511
  var require_figures2 = __commonJS((exports, module) => {
6440
6512
  var main2 = {
6441
- arrowUp: "\u2191",
6442
- arrowDown: "\u2193",
6443
- arrowLeft: "\u2190",
6444
- arrowRight: "\u2192",
6445
- radioOn: "\u25C9",
6446
- radioOff: "\u25EF",
6447
- tick: "\u2714",
6448
- cross: "\u2716",
6449
- ellipsis: "\u2026",
6450
- pointerSmall: "\u203A",
6451
- line: "\u2500",
6452
- pointer: "\u276F"
6513
+ arrowUp: "",
6514
+ arrowDown: "",
6515
+ arrowLeft: "",
6516
+ arrowRight: "",
6517
+ radioOn: "",
6518
+ radioOff: "",
6519
+ tick: "",
6520
+ cross: "",
6521
+ ellipsis: "",
6522
+ pointerSmall: "",
6523
+ line: "",
6524
+ pointer: ""
6453
6525
  };
6454
6526
  var win = {
6455
6527
  arrowUp: main2.arrowUp,
@@ -6458,11 +6530,11 @@ var require_figures2 = __commonJS((exports, module) => {
6458
6530
  arrowRight: main2.arrowRight,
6459
6531
  radioOn: "(*)",
6460
6532
  radioOff: "( )",
6461
- tick: "\u221A",
6462
- cross: "\xD7",
6533
+ tick: "",
6534
+ cross: "×",
6463
6535
  ellipsis: "...",
6464
- pointerSmall: "\xBB",
6465
- line: "\u2500",
6536
+ pointerSmall: "»",
6537
+ line: "",
6466
6538
  pointer: ">"
6467
6539
  };
6468
6540
  var figures = process.platform === "win32" ? win : main2;
@@ -6521,7 +6593,9 @@ var require_wrap2 = __commonJS((exports, module) => {
6521
6593
  else
6522
6594
  arr.push(`${tab}${w}`);
6523
6595
  return arr;
6524
- }, [tab]).join("\n")).join("\n");
6596
+ }, [tab]).join(`
6597
+ `)).join(`
6598
+ `);
6525
6599
  };
6526
6600
  });
6527
6601
 
@@ -6666,7 +6740,8 @@ var require_text2 = __commonJS((exports, module) => {
6666
6740
  this.red = false;
6667
6741
  this.fire();
6668
6742
  this.render();
6669
- this.out.write("\n");
6743
+ this.out.write(`
6744
+ `);
6670
6745
  this.close();
6671
6746
  }
6672
6747
  async validate() {
@@ -6692,7 +6767,8 @@ var require_text2 = __commonJS((exports, module) => {
6692
6767
  this.aborted = false;
6693
6768
  this.fire();
6694
6769
  this.render();
6695
- this.out.write("\n");
6770
+ this.out.write(`
6771
+ `);
6696
6772
  this.close();
6697
6773
  }
6698
6774
  next() {
@@ -6789,7 +6865,9 @@ var require_text2 = __commonJS((exports, module) => {
6789
6865
  this.red ? color.red(this.rendered) : this.rendered
6790
6866
  ].join(` `);
6791
6867
  if (this.error) {
6792
- this.outputError += this.errorMsg.split(`\n`).reduce((a, l, i) => a + `\n${i ? " " : figures.pointerSmall} ${color.red().italic(l)}`, ``);
6868
+ this.outputError += this.errorMsg.split(`
6869
+ `).reduce((a, l, i) => a + `
6870
+ ${i ? " " : figures.pointerSmall} ${color.red().italic(l)}`, ``);
6793
6871
  }
6794
6872
  this.out.write(erase.line + cursor.to(0) + this.outputText + cursor.save + this.outputError + cursor.restore + cursor.move(this.cursorOffset, 0));
6795
6873
  }
@@ -6844,7 +6922,8 @@ var require_select2 = __commonJS((exports, module) => {
6844
6922
  this.done = this.aborted = true;
6845
6923
  this.fire();
6846
6924
  this.render();
6847
- this.out.write("\n");
6925
+ this.out.write(`
6926
+ `);
6848
6927
  this.close();
6849
6928
  }
6850
6929
  submit() {
@@ -6853,7 +6932,8 @@ var require_select2 = __commonJS((exports, module) => {
6853
6932
  this.aborted = false;
6854
6933
  this.fire();
6855
6934
  this.render();
6856
- this.out.write("\n");
6935
+ this.out.write(`
6936
+ `);
6857
6937
  this.close();
6858
6938
  } else
6859
6939
  this.bell();
@@ -6909,7 +6989,8 @@ var require_select2 = __commonJS((exports, module) => {
6909
6989
  this.done ? this.selection.title : this.selection.disabled ? color.yellow(this.warn) : color.gray(this.hint)
6910
6990
  ].join(" ");
6911
6991
  if (!this.done) {
6912
- this.outputText += "\n";
6992
+ this.outputText += `
6993
+ `;
6913
6994
  for (let i = startIndex;i < endIndex; i++) {
6914
6995
  let title, prefix, desc = "", v = this.choices[i];
6915
6996
  if (i === startIndex && startIndex > 0) {
@@ -6928,11 +7009,13 @@ var require_select2 = __commonJS((exports, module) => {
6928
7009
  if (v.description && this.cursor === i) {
6929
7010
  desc = ` - ${v.description}`;
6930
7011
  if (prefix.length + title.length + desc.length >= this.out.columns || v.description.split(/\r?\n/).length > 1) {
6931
- desc = "\n" + wrap(v.description, { margin: 3, width: this.out.columns });
7012
+ desc = `
7013
+ ` + wrap(v.description, { margin: 3, width: this.out.columns });
6932
7014
  }
6933
7015
  }
6934
7016
  }
6935
- this.outputText += `${prefix} ${title}${color.gray(desc)}\n`;
7017
+ this.outputText += `${prefix} ${title}${color.gray(desc)}
7018
+ `;
6936
7019
  }
6937
7020
  }
6938
7021
  this.out.write(this.outputText);
@@ -6970,7 +7053,8 @@ var require_toggle2 = __commonJS((exports, module) => {
6970
7053
  this.done = this.aborted = true;
6971
7054
  this.fire();
6972
7055
  this.render();
6973
- this.out.write("\n");
7056
+ this.out.write(`
7057
+ `);
6974
7058
  this.close();
6975
7059
  }
6976
7060
  submit() {
@@ -6978,7 +7062,8 @@ var require_toggle2 = __commonJS((exports, module) => {
6978
7062
  this.aborted = false;
6979
7063
  this.fire();
6980
7064
  this.render();
6981
- this.out.write("\n");
7065
+ this.out.write(`
7066
+ `);
6982
7067
  this.close();
6983
7068
  }
6984
7069
  deactivate() {
@@ -7055,16 +7140,13 @@ var require_datepart2 = __commonJS((exports, module) => {
7055
7140
  this.parts = parts || [this];
7056
7141
  this.locales = locales || {};
7057
7142
  }
7058
- up() {
7059
- }
7060
- down() {
7061
- }
7143
+ up() {}
7144
+ down() {}
7062
7145
  next() {
7063
7146
  const currentIdx = this.parts.indexOf(this);
7064
7147
  return this.parts.find((part, idx) => idx > currentIdx && part instanceof DatePart);
7065
7148
  }
7066
- setTo(val) {
7067
- }
7149
+ setTo(val) {}
7068
7150
  prev() {
7069
7151
  let parts = [].concat(this.parts).reverse();
7070
7152
  const currentIdx = parts.indexOf(this);
@@ -7384,7 +7466,8 @@ var require_date2 = __commonJS((exports, module) => {
7384
7466
  this.error = false;
7385
7467
  this.fire();
7386
7468
  this.render();
7387
- this.out.write("\n");
7469
+ this.out.write(`
7470
+ `);
7388
7471
  this.close();
7389
7472
  }
7390
7473
  async validate() {
@@ -7407,7 +7490,8 @@ var require_date2 = __commonJS((exports, module) => {
7407
7490
  this.aborted = false;
7408
7491
  this.fire();
7409
7492
  this.render();
7410
- this.out.write("\n");
7493
+ this.out.write(`
7494
+ `);
7411
7495
  this.close();
7412
7496
  }
7413
7497
  up() {
@@ -7461,7 +7545,9 @@ var require_date2 = __commonJS((exports, module) => {
7461
7545
  this.parts.reduce((arr, p, idx) => arr.concat(idx === this.cursor && !this.done ? color.cyan().underline(p.toString()) : p), []).join("")
7462
7546
  ].join(" ");
7463
7547
  if (this.error) {
7464
- this.outputText += this.errorMsg.split("\n").reduce((a, l, i) => a + `\n${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);
7548
+ this.outputText += this.errorMsg.split(`
7549
+ `).reduce((a, l, i) => a + `
7550
+ ${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);
7465
7551
  }
7466
7552
  this.out.write(erase.line + cursor.to(0) + this.outputText);
7467
7553
  }
@@ -7538,7 +7624,8 @@ var require_number2 = __commonJS((exports, module) => {
7538
7624
  this.error = false;
7539
7625
  this.fire();
7540
7626
  this.render();
7541
- this.out.write(`\n`);
7627
+ this.out.write(`
7628
+ `);
7542
7629
  this.close();
7543
7630
  }
7544
7631
  async validate() {
@@ -7564,7 +7651,8 @@ var require_number2 = __commonJS((exports, module) => {
7564
7651
  this.error = false;
7565
7652
  this.fire();
7566
7653
  this.render();
7567
- this.out.write(`\n`);
7654
+ this.out.write(`
7655
+ `);
7568
7656
  this.close();
7569
7657
  }
7570
7658
  up() {
@@ -7644,7 +7732,9 @@ var require_number2 = __commonJS((exports, module) => {
7644
7732
  !this.done || !this.done && !this.placeholder ? color[this.color]().underline(this.rendered) : this.rendered
7645
7733
  ].join(` `);
7646
7734
  if (this.error) {
7647
- this.outputError += this.errorMsg.split(`\n`).reduce((a, l, i) => a + `\n${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);
7735
+ this.outputError += this.errorMsg.split(`
7736
+ `).reduce((a, l, i) => a + `
7737
+ ${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);
7648
7738
  }
7649
7739
  this.out.write(erase.line + cursor.to(0) + this.outputText + cursor.save + this.outputError + cursor.restore);
7650
7740
  }
@@ -7704,7 +7794,8 @@ var require_multiselect2 = __commonJS((exports, module) => {
7704
7794
  this.done = this.aborted = true;
7705
7795
  this.fire();
7706
7796
  this.render();
7707
- this.out.write("\n");
7797
+ this.out.write(`
7798
+ `);
7708
7799
  this.close();
7709
7800
  }
7710
7801
  submit() {
@@ -7717,7 +7808,8 @@ var require_multiselect2 = __commonJS((exports, module) => {
7717
7808
  this.aborted = false;
7718
7809
  this.fire();
7719
7810
  this.render();
7720
- this.out.write("\n");
7811
+ this.out.write(`
7812
+ `);
7721
7813
  this.close();
7722
7814
  }
7723
7815
  }
@@ -7793,7 +7885,12 @@ var require_multiselect2 = __commonJS((exports, module) => {
7793
7885
  if (typeof this.instructions === "string") {
7794
7886
  return this.instructions;
7795
7887
  }
7796
- return "\nInstructions:\n" + ` ${figures.arrowUp}/${figures.arrowDown}: Highlight option\n` + ` ${figures.arrowLeft}/${figures.arrowRight}/[space]: Toggle selection\n` + (this.maxChoices === undefined ? ` a: Toggle all\n` : "") + ` enter/return: Complete answer`;
7888
+ return `
7889
+ Instructions:
7890
+ ` + ` ${figures.arrowUp}/${figures.arrowDown}: Highlight option
7891
+ ` + ` ${figures.arrowLeft}/${figures.arrowRight}/[space]: Toggle selection
7892
+ ` + (this.maxChoices === undefined ? ` a: Toggle all
7893
+ ` : "") + ` enter/return: Complete answer`;
7797
7894
  }
7798
7895
  return "";
7799
7896
  }
@@ -7807,7 +7904,8 @@ var require_multiselect2 = __commonJS((exports, module) => {
7807
7904
  if (cursor2 === i && v.description) {
7808
7905
  desc = ` - ${v.description}`;
7809
7906
  if (prefix.length + title.length + desc.length >= this.out.columns || v.description.split(/\r?\n/).length > 1) {
7810
- desc = "\n" + wrap(v.description, { margin: prefix.length, width: this.out.columns });
7907
+ desc = `
7908
+ ` + wrap(v.description, { margin: prefix.length, width: this.out.columns });
7811
7909
  }
7812
7910
  }
7813
7911
  }
@@ -7829,7 +7927,9 @@ var require_multiselect2 = __commonJS((exports, module) => {
7829
7927
  }
7830
7928
  styledOptions.push(this.renderOption(this.cursor, options[i], i, prefix));
7831
7929
  }
7832
- return "\n" + styledOptions.join("\n");
7930
+ return `
7931
+ ` + styledOptions.join(`
7932
+ `);
7833
7933
  }
7834
7934
  renderOptions(options) {
7835
7935
  if (!this.done) {
@@ -7953,7 +8053,8 @@ var require_autocomplete2 = __commonJS((exports, module) => {
7953
8053
  this.aborted = false;
7954
8054
  this.fire();
7955
8055
  this.render();
7956
- this.out.write("\n");
8056
+ this.out.write(`
8057
+ `);
7957
8058
  this.close();
7958
8059
  }
7959
8060
  }
@@ -7962,7 +8063,8 @@ var require_autocomplete2 = __commonJS((exports, module) => {
7962
8063
  this.exited = false;
7963
8064
  this.fire();
7964
8065
  this.render();
7965
- this.out.write("\n");
8066
+ this.out.write(`
8067
+ `);
7966
8068
  this.close();
7967
8069
  }
7968
8070
  submit() {
@@ -7970,7 +8072,8 @@ var require_autocomplete2 = __commonJS((exports, module) => {
7970
8072
  this.aborted = this.exited = false;
7971
8073
  this.fire();
7972
8074
  this.render();
7973
- this.out.write("\n");
8075
+ this.out.write(`
8076
+ `);
7974
8077
  this.close();
7975
8078
  }
7976
8079
  _(c, key) {
@@ -8059,7 +8162,8 @@ var require_autocomplete2 = __commonJS((exports, module) => {
8059
8162
  if (v.description) {
8060
8163
  desc = ` - ${v.description}`;
8061
8164
  if (prefix.length + title.length + desc.length >= this.out.columns || v.description.split(/\r?\n/).length > 1) {
8062
- desc = "\n" + wrap(v.description, { margin: 3, width: this.out.columns });
8165
+ desc = `
8166
+ ` + wrap(v.description, { margin: 3, width: this.out.columns });
8063
8167
  }
8064
8168
  }
8065
8169
  return prefix + " " + title + color.gray(desc || "");
@@ -8080,8 +8184,10 @@ var require_autocomplete2 = __commonJS((exports, module) => {
8080
8184
  this.done && this.suggestions[this.select] ? this.suggestions[this.select].title : this.rendered = this.transform.render(this.input)
8081
8185
  ].join(" ");
8082
8186
  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("\n");
8084
- this.outputText += `\n` + (suggestions || color.gray(this.fallback.title));
8187
+ 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(`
8188
+ `);
8189
+ this.outputText += `
8190
+ ` + (suggestions || color.gray(this.fallback.title));
8085
8191
  }
8086
8192
  this.out.write(erase.line + cursor.to(0) + this.outputText);
8087
8193
  }
@@ -8207,7 +8313,8 @@ Instructions:
8207
8313
  }
8208
8314
  renderCurrentInput() {
8209
8315
  return `
8210
- Filtered results for: ${this.inputValue ? this.inputValue : color.gray("Enter something to filter")}\n`;
8316
+ Filtered results for: ${this.inputValue ? this.inputValue : color.gray("Enter something to filter")}
8317
+ `;
8211
8318
  }
8212
8319
  renderOption(cursor2, v, i) {
8213
8320
  let title;
@@ -8282,7 +8389,8 @@ var require_confirm2 = __commonJS((exports, module) => {
8282
8389
  this.done = this.aborted = true;
8283
8390
  this.fire();
8284
8391
  this.render();
8285
- this.out.write("\n");
8392
+ this.out.write(`
8393
+ `);
8286
8394
  this.close();
8287
8395
  }
8288
8396
  submit() {
@@ -8291,7 +8399,8 @@ var require_confirm2 = __commonJS((exports, module) => {
8291
8399
  this.aborted = false;
8292
8400
  this.fire();
8293
8401
  this.render();
8294
- this.out.write("\n");
8402
+ this.out.write(`
8403
+ `);
8295
8404
  this.close();
8296
8405
  }
8297
8406
  _(c, key) {
@@ -8342,6 +8451,9 @@ var require_elements2 = __commonJS((exports, module) => {
8342
8451
 
8343
8452
  // node_modules/prompts/lib/prompts.js
8344
8453
  var require_prompts2 = __commonJS((exports) => {
8454
+ var $ = exports;
8455
+ var el = require_elements2();
8456
+ var noop = (v) => v;
8345
8457
  function toPrompt(type, args, opts = {}) {
8346
8458
  return new Promise((res, rej) => {
8347
8459
  const p = new el[type](args);
@@ -8354,9 +8466,6 @@ var require_prompts2 = __commonJS((exports) => {
8354
8466
  p.on("abort", (x) => rej(onAbort(x)));
8355
8467
  });
8356
8468
  }
8357
- var $ = exports;
8358
- var el = require_elements2();
8359
- var noop = (v) => v;
8360
8469
  $.text = (args) => toPrompt("TextPrompt", args);
8361
8470
  $.password = (args) => {
8362
8471
  args.style = "password";
@@ -8403,6 +8512,9 @@ var require_prompts2 = __commonJS((exports) => {
8403
8512
 
8404
8513
  // node_modules/prompts/lib/index.js
8405
8514
  var require_lib = __commonJS((exports, module) => {
8515
+ var prompts = require_prompts2();
8516
+ var passOn = ["suggest", "format", "onState", "validate", "onRender", "type"];
8517
+ var noop = () => {};
8406
8518
  async function prompt(questions = [], { onSubmit = noop, onCancel = noop } = {}) {
8407
8519
  const answers = {};
8408
8520
  const override2 = prompt._override || {};
@@ -8468,10 +8580,6 @@ var require_lib = __commonJS((exports, module) => {
8468
8580
  function override(answers) {
8469
8581
  prompt._override = Object.assign({}, answers);
8470
8582
  }
8471
- var prompts = require_prompts2();
8472
- var passOn = ["suggest", "format", "onState", "validate", "onRender", "type"];
8473
- var noop = () => {
8474
- };
8475
8583
  module.exports = Object.assign(prompt, { prompt, prompts, inject, override });
8476
8584
  });
8477
8585
 
@@ -8492,7 +8600,7 @@ var require_prompts3 = __commonJS((exports, module) => {
8492
8600
  });
8493
8601
 
8494
8602
  // node_modules/commander/esm.mjs
8495
- var import_ = __toESM(require_commander(), 1);
8603
+ var import__ = __toESM(require_commander(), 1);
8496
8604
  var {
8497
8605
  program,
8498
8606
  createCommand,
@@ -8505,12 +8613,73 @@ var {
8505
8613
  Argument,
8506
8614
  Option,
8507
8615
  Help
8508
- } = import_.default;
8616
+ } = import__.default;
8509
8617
 
8510
8618
  // node_modules/ora/index.js
8511
8619
  import process9 from "node:process";
8512
8620
 
8513
8621
  // node_modules/chalk/source/vendor/ansi-styles/index.js
8622
+ var ANSI_BACKGROUND_OFFSET = 10;
8623
+ var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
8624
+ var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
8625
+ var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
8626
+ var styles = {
8627
+ modifier: {
8628
+ reset: [0, 0],
8629
+ bold: [1, 22],
8630
+ dim: [2, 22],
8631
+ italic: [3, 23],
8632
+ underline: [4, 24],
8633
+ overline: [53, 55],
8634
+ inverse: [7, 27],
8635
+ hidden: [8, 28],
8636
+ strikethrough: [9, 29]
8637
+ },
8638
+ color: {
8639
+ black: [30, 39],
8640
+ red: [31, 39],
8641
+ green: [32, 39],
8642
+ yellow: [33, 39],
8643
+ blue: [34, 39],
8644
+ magenta: [35, 39],
8645
+ cyan: [36, 39],
8646
+ white: [37, 39],
8647
+ blackBright: [90, 39],
8648
+ gray: [90, 39],
8649
+ grey: [90, 39],
8650
+ redBright: [91, 39],
8651
+ greenBright: [92, 39],
8652
+ yellowBright: [93, 39],
8653
+ blueBright: [94, 39],
8654
+ magentaBright: [95, 39],
8655
+ cyanBright: [96, 39],
8656
+ whiteBright: [97, 39]
8657
+ },
8658
+ bgColor: {
8659
+ bgBlack: [40, 49],
8660
+ bgRed: [41, 49],
8661
+ bgGreen: [42, 49],
8662
+ bgYellow: [43, 49],
8663
+ bgBlue: [44, 49],
8664
+ bgMagenta: [45, 49],
8665
+ bgCyan: [46, 49],
8666
+ bgWhite: [47, 49],
8667
+ bgBlackBright: [100, 49],
8668
+ bgGray: [100, 49],
8669
+ bgGrey: [100, 49],
8670
+ bgRedBright: [101, 49],
8671
+ bgGreenBright: [102, 49],
8672
+ bgYellowBright: [103, 49],
8673
+ bgBlueBright: [104, 49],
8674
+ bgMagentaBright: [105, 49],
8675
+ bgCyanBright: [106, 49],
8676
+ bgWhiteBright: [107, 49]
8677
+ }
8678
+ };
8679
+ var modifierNames = Object.keys(styles.modifier);
8680
+ var foregroundColorNames = Object.keys(styles.color);
8681
+ var backgroundColorNames = Object.keys(styles.bgColor);
8682
+ var colorNames = [...foregroundColorNames, ...backgroundColorNames];
8514
8683
  function assembleStyles() {
8515
8684
  const codes = new Map;
8516
8685
  for (const [groupName, group] of Object.entries(styles)) {
@@ -8623,67 +8792,6 @@ function assembleStyles() {
8623
8792
  });
8624
8793
  return styles;
8625
8794
  }
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
8795
  var ansiStyles = assembleStyles();
8688
8796
  var ansi_styles_default = ansiStyles;
8689
8797
 
@@ -8697,6 +8805,13 @@ function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process2.
8697
8805
  const terminatorPosition = argv.indexOf("--");
8698
8806
  return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
8699
8807
  }
8808
+ var { env } = process2;
8809
+ var flagForceColor;
8810
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
8811
+ flagForceColor = 0;
8812
+ } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
8813
+ flagForceColor = 1;
8814
+ }
8700
8815
  function envForceColor() {
8701
8816
  if ("FORCE_COLOR" in env) {
8702
8817
  if (env.FORCE_COLOR === "true") {
@@ -8806,13 +8921,6 @@ function createSupportsColor(stream, options = {}) {
8806
8921
  });
8807
8922
  return translateLevel(level);
8808
8923
  }
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
8924
  var supportsColor = {
8817
8925
  stdout: createSupportsColor({ isTTY: tty.isatty(1) }),
8818
8926
  stderr: createSupportsColor({ isTTY: tty.isatty(2) })
@@ -8841,18 +8949,18 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
8841
8949
  let returnValue = "";
8842
8950
  do {
8843
8951
  const gotCR = string[index - 1] === "\r";
8844
- returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
8952
+ returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? `\r
8953
+ ` : `
8954
+ `) + postfix;
8845
8955
  endIndex = index + 1;
8846
- index = string.indexOf("\n", endIndex);
8956
+ index = string.indexOf(`
8957
+ `, endIndex);
8847
8958
  } while (index !== -1);
8848
8959
  returnValue += string.slice(endIndex);
8849
8960
  return returnValue;
8850
8961
  }
8851
8962
 
8852
8963
  // node_modules/chalk/source/index.js
8853
- function createChalk(options) {
8854
- return chalkFactory(options);
8855
- }
8856
8964
  var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
8857
8965
  var GENERATOR = Symbol("GENERATOR");
8858
8966
  var STYLER = Symbol("STYLER");
@@ -8877,6 +8985,9 @@ var chalkFactory = (options) => {
8877
8985
  Object.setPrototypeOf(chalk, createChalk.prototype);
8878
8986
  return chalk;
8879
8987
  };
8988
+ function createChalk(options) {
8989
+ return chalkFactory(options);
8990
+ }
8880
8991
  Object.setPrototypeOf(createChalk.prototype, Function.prototype);
8881
8992
  for (const [styleName, style] of Object.entries(ansi_styles_default)) {
8882
8993
  styles2[styleName] = {
@@ -8931,8 +9042,7 @@ for (const model of usedModels) {
8931
9042
  }
8932
9043
  };
8933
9044
  }
8934
- var proto = Object.defineProperties(() => {
8935
- }, {
9045
+ var proto = Object.defineProperties(() => {}, {
8936
9046
  ...styles2,
8937
9047
  level: {
8938
9048
  enumerable: true,
@@ -8985,7 +9095,8 @@ var applyStyle = (self, string) => {
8985
9095
  styler = styler.parent;
8986
9096
  }
8987
9097
  }
8988
- const lfIndex = string.indexOf("\n");
9098
+ const lfIndex = string.indexOf(`
9099
+ `);
8989
9100
  if (lfIndex !== -1) {
8990
9101
  string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
8991
9102
  }
@@ -9027,7 +9138,8 @@ var changePrototype = (to, from) => {
9027
9138
  }
9028
9139
  Object.setPrototypeOf(to, fromPrototype);
9029
9140
  };
9030
- var wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/\n${fromBody}`;
9141
+ var wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/
9142
+ ${fromBody}`;
9031
9143
  var toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, "toString");
9032
9144
  var toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, "name");
9033
9145
  var changeToString = (to, from, name) => {
@@ -9165,13 +9277,10 @@ var signalExitWrap = (handler) => {
9165
9277
 
9166
9278
  class SignalExitFallback extends SignalExitBase {
9167
9279
  onExit() {
9168
- return () => {
9169
- };
9170
- }
9171
- load() {
9172
- }
9173
- unload() {
9280
+ return () => {};
9174
9281
  }
9282
+ load() {}
9283
+ unload() {}
9175
9284
  }
9176
9285
 
9177
9286
  class SignalExit extends SignalExitBase {
@@ -9208,8 +9317,7 @@ class SignalExit extends SignalExitBase {
9208
9317
  }
9209
9318
  onExit(cb, opts) {
9210
9319
  if (!processOk(this.#process)) {
9211
- return () => {
9212
- };
9320
+ return () => {};
9213
9321
  }
9214
9322
  if (this.#loaded === false) {
9215
9323
  this.load();
@@ -9234,8 +9342,7 @@ class SignalExit extends SignalExitBase {
9234
9342
  const fn = this.#sigListeners[sig];
9235
9343
  if (fn)
9236
9344
  this.#process.on(sig, fn);
9237
- } catch (_) {
9238
- }
9345
+ } catch (_) {}
9239
9346
  }
9240
9347
  this.#process.emit = (ev, ...a) => {
9241
9348
  return this.#processEmit(ev, ...a);
@@ -9256,8 +9363,7 @@ class SignalExit extends SignalExitBase {
9256
9363
  }
9257
9364
  try {
9258
9365
  this.#process.removeListener(sig, listener);
9259
- } catch (_) {
9260
- }
9366
+ } catch (_) {}
9261
9367
  });
9262
9368
  this.#process.emit = this.#originalProcessEmit;
9263
9369
  this.#process.reallyExit = this.#originalProcessReallyExit;
@@ -9298,8 +9404,7 @@ var restoreCursor = terminal ? onetime_default(() => {
9298
9404
  onExit(() => {
9299
9405
  terminal.write("\x1B[?25h");
9300
9406
  }, { alwaysLast: true });
9301
- }) : () => {
9302
- };
9407
+ }) : () => {};
9303
9408
  var restore_cursor_default = restoreCursor;
9304
9409
 
9305
9410
  // node_modules/cli-cursor/index.js
@@ -9346,16 +9451,16 @@ function isUnicodeSupported() {
9346
9451
 
9347
9452
  // node_modules/log-symbols/index.js
9348
9453
  var main = {
9349
- info: source_default.blue("\u2139"),
9350
- success: source_default.green("\u2714"),
9351
- warning: source_default.yellow("\u26A0"),
9352
- error: source_default.red("\u2716")
9454
+ info: source_default.blue(""),
9455
+ success: source_default.green(""),
9456
+ warning: source_default.yellow(""),
9457
+ error: source_default.red("")
9353
9458
  };
9354
9459
  var fallback = {
9355
9460
  info: source_default.blue("i"),
9356
- success: source_default.green("\u221A"),
9357
- warning: source_default.yellow("\u203C"),
9358
- error: source_default.red("\xD7")
9461
+ success: source_default.green(""),
9462
+ warning: source_default.yellow(""),
9463
+ error: source_default.red("×")
9359
9464
  };
9360
9465
  var logSymbols = isUnicodeSupported() ? main : fallback;
9361
9466
  var log_symbols_default = logSymbols;
@@ -9375,6 +9480,9 @@ function stripAnsi(string) {
9375
9480
  if (typeof string !== "string") {
9376
9481
  throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
9377
9482
  }
9483
+ if (!string.includes("\x1B") && !string.includes("›")) {
9484
+ return string;
9485
+ }
9378
9486
  return string.replace(regex, "");
9379
9487
  }
9380
9488
 
@@ -9404,6 +9512,18 @@ var isInRange = (ranges, codePoint) => {
9404
9512
  };
9405
9513
 
9406
9514
  // node_modules/get-east-asian-width/lookup.js
9515
+ var minimumAmbiguousCodePoint = ambiguousRanges[0];
9516
+ var maximumAmbiguousCodePoint = ambiguousRanges.at(-1);
9517
+ var minimumFullWidthCodePoint = fullwidthRanges[0];
9518
+ var maximumFullWidthCodePoint = fullwidthRanges.at(-1);
9519
+ var minimumHalfWidthCodePoint = halfwidthRanges[0];
9520
+ var maximumHalfWidthCodePoint = halfwidthRanges.at(-1);
9521
+ var minimumNarrowCodePoint = narrowRanges[0];
9522
+ var maximumNarrowCodePoint = narrowRanges.at(-1);
9523
+ var minimumWideCodePoint = wideRanges[0];
9524
+ var maximumWideCodePoint = wideRanges.at(-1);
9525
+ var commonCjkCodePoint = 19968;
9526
+ var [wideFastPathStart, wideFastPathEnd] = findWideFastPathRange(wideRanges);
9407
9527
  function findWideFastPathRange(ranges) {
9408
9528
  let fastPathStart = ranges[0];
9409
9529
  let fastPathEnd = ranges[1];
@@ -9420,18 +9540,6 @@ function findWideFastPathRange(ranges) {
9420
9540
  }
9421
9541
  return [fastPathStart, fastPathEnd];
9422
9542
  }
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
9543
  var isAmbiguous = (codePoint) => {
9436
9544
  if (codePoint < minimumAmbiguousCodePoint || codePoint > maximumAmbiguousCodePoint) {
9437
9545
  return false;
@@ -9728,7 +9836,8 @@ class Ora {
9728
9836
  const fullSuffixText = this.#getFullSuffixText(this.#suffixText, "-");
9729
9837
  const fullText = " ".repeat(this.#indent) + fullPrefixText + "--" + this.#text + "--" + fullSuffixText;
9730
9838
  this.#lineCount = 0;
9731
- for (const line of stripAnsi(fullText).split("\n")) {
9839
+ for (const line of stripAnsi(fullText).split(`
9840
+ `)) {
9732
9841
  this.#lineCount += Math.max(1, Math.ceil(stringWidth(line, { countAnsiEscapeCodes: true }) / columns));
9733
9842
  }
9734
9843
  }
@@ -9802,7 +9911,8 @@ class Ora {
9802
9911
  }
9803
9912
  if (!this.#isEnabled) {
9804
9913
  if (this.text) {
9805
- this.#stream.write(`- ${this.text}\n`);
9914
+ this.#stream.write(`- ${this.text}
9915
+ `);
9806
9916
  }
9807
9917
  return this;
9808
9918
  }
@@ -9861,7 +9971,8 @@ class Ora {
9861
9971
  const fullText = typeof text === "string" ? separatorText + text : "";
9862
9972
  const suffixText = options.suffixText ?? this.#suffixText;
9863
9973
  const fullSuffixText = this.#getFullSuffixText(suffixText, " ");
9864
- const textToWrite = fullPrefixText + symbolText + fullText + fullSuffixText + "\n";
9974
+ const textToWrite = fullPrefixText + symbolText + fullText + fullSuffixText + `
9975
+ `;
9865
9976
  this.stop();
9866
9977
  this.#stream.write(textToWrite);
9867
9978
  return this;
@@ -9872,8 +9983,8 @@ function ora(options) {
9872
9983
  }
9873
9984
 
9874
9985
  // src/cli/commands/add.ts
9875
- var import_picocolors = __toESM(require_picocolors(), 1);
9876
9986
  init_config();
9987
+ var import_picocolors = __toESM(require_picocolors(), 1);
9877
9988
 
9878
9989
  // src/cli/utils/registry.ts
9879
9990
  async function fetchRegistryIndex(registryUrl) {
@@ -9915,8 +10026,9 @@ function collectDeps(items) {
9915
10026
  }
9916
10027
 
9917
10028
  // src/cli/utils/write.ts
9918
- import {mkdirSync, writeFileSync as writeFileSync2} from "fs";
9919
- import {dirname, join as join2} from "path";
10029
+ import { mkdirSync, writeFileSync as writeFileSync2 } from "fs";
10030
+ import { dirname, join as join2 } from "path";
10031
+ var VERSION_STAMP_FILE = ".3dvf-version";
9920
10032
  function writeRegistryItem(item, outputDir, version, cwd = process.cwd()) {
9921
10033
  const written = [];
9922
10034
  const itemDir = join2(cwd, outputDir, item.name);
@@ -9930,12 +10042,11 @@ function writeRegistryItem(item, outputDir, version, cwd = process.cwd()) {
9930
10042
  writeFileSync2(stampPath, version, "utf-8");
9931
10043
  return written;
9932
10044
  }
9933
- var VERSION_STAMP_FILE = ".3dvf-version";
9934
10045
 
9935
- // 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";
10046
+ // src/cli/utils/package-manager.ts
10047
+ import { existsSync as existsSync2 } from "fs";
10048
+ import { join as join3 } from "path";
10049
+ import { execSync } from "child_process";
9939
10050
  function detectPackageManager(cwd = process.cwd()) {
9940
10051
  if (existsSync2(join3(cwd, "bun.lockb")))
9941
10052
  return "bun";
@@ -9961,9 +10072,9 @@ function installDeps(deps, devDeps, cwd = process.cwd()) {
9961
10072
 
9962
10073
  // src/cli/commands/add.ts
9963
10074
  async function addCommand(names) {
9964
- let config2;
10075
+ let config;
9965
10076
  try {
9966
- config2 = readConfig();
10077
+ config = readConfig();
9967
10078
  } catch (err) {
9968
10079
  console.error(import_picocolors.default.red(err.message));
9969
10080
  process.exit(1);
@@ -9971,7 +10082,7 @@ async function addCommand(names) {
9971
10082
  const spinner = ora(`Resolving ${names.join(", ")}...`).start();
9972
10083
  let tree;
9973
10084
  try {
9974
- tree = await resolveTree(names, config2.registry);
10085
+ tree = await resolveTree(names, config.registry);
9975
10086
  } catch (err) {
9976
10087
  spinner.fail(err.message);
9977
10088
  process.exit(1);
@@ -9980,9 +10091,9 @@ async function addCommand(names) {
9980
10091
  const items = [...tree.values()];
9981
10092
  const written = [];
9982
10093
  for (const item of items) {
9983
- const paths = writeRegistryItem(item, config2.outputDir, CLI_VERSION);
10094
+ const paths = writeRegistryItem(item, config.outputDir, CLI_VERSION);
9984
10095
  written.push(...paths);
9985
- console.log(import_picocolors.default.green("\u2713") + ` Installed ${import_picocolors.default.bold(item.name)} ${import_picocolors.default.dim(`(v${CLI_VERSION})`)}`);
10096
+ console.log(import_picocolors.default.green("") + ` Installed ${import_picocolors.default.bold(item.name)} ${import_picocolors.default.dim(`(v${CLI_VERSION})`)}`);
9986
10097
  for (const p of paths) {
9987
10098
  console.log(import_picocolors.default.dim(` ${p.replace(process.cwd() + "/", "")}`));
9988
10099
  }
@@ -9999,66 +10110,222 @@ async function addCommand(names) {
9999
10110
  process.exit(1);
10000
10111
  }
10001
10112
  }
10002
- console.log(import_picocolors.default.green("\nDone!") + ` Added ${items.length} function(s) to ${config2.outputDir}`);
10113
+ console.log(import_picocolors.default.green(`
10114
+ Done!`) + ` Added ${items.length} function(s) to ${config.outputDir}`);
10003
10115
  }
10004
10116
 
10005
- // src/cli/commands/init.ts
10117
+ // src/cli/commands/create.ts
10118
+ var import_prompts2 = __toESM(require_prompts3(), 1);
10119
+ import { existsSync as existsSync5, readFileSync as readFileSync4, writeFileSync as writeFileSync4, mkdirSync as mkdirSync2, rmSync } from "fs";
10120
+ import { join as join6, dirname as dirname3 } from "path";
10121
+ import { fileURLToPath as fileURLToPath2 } from "url";
10122
+ import { execSync as execSync2 } from "child_process";
10123
+ init_config();
10124
+ var import_picocolors3 = __toESM(require_picocolors(), 1);
10125
+
10126
+ // src/cli/utils/init-project.ts
10006
10127
  var import_prompts = __toESM(require_prompts3(), 1);
10007
- var import_picocolors2 = __toESM(require_picocolors(), 1);
10128
+ import { existsSync as existsSync4, readFileSync as readFileSync3, writeFileSync as writeFileSync3 } from "fs";
10129
+ import { join as join5 } from "path";
10008
10130
  init_config();
10009
- async function initCommand() {
10010
- if (configExists()) {
10011
- console.log(import_picocolors2.default.yellow("3dvf.json already exists. Skipping init."));
10012
- return;
10131
+ var import_picocolors2 = __toESM(require_picocolors(), 1);
10132
+
10133
+ // src/cli/utils/own-pkg.ts
10134
+ import { readFileSync as readFileSync2, existsSync as existsSync3 } from "fs";
10135
+ import { join as join4, dirname as dirname2 } from "path";
10136
+ import { fileURLToPath } from "url";
10137
+ function findPkg(dir) {
10138
+ const candidate = join4(dir, "package.json");
10139
+ if (existsSync3(candidate))
10140
+ return candidate;
10141
+ const parent = dirname2(dir);
10142
+ if (parent === dir)
10143
+ throw new Error("Could not find own package.json");
10144
+ return findPkg(parent);
10145
+ }
10146
+ var __dirname2 = dirname2(fileURLToPath(import.meta.url));
10147
+ var ownPkg = JSON.parse(readFileSync2(findPkg(__dirname2), "utf-8"));
10148
+ var own_pkg_default = ownPkg;
10149
+
10150
+ // src/cli/utils/init-project.ts
10151
+ var THREE_VERSION = (own_pkg_default.devDependencies?.["@types/three"]).replace(/^\^|~/, "");
10152
+ async function initProject(cwd) {
10153
+ let config;
10154
+ if (configExists(cwd)) {
10155
+ config = readConfig(cwd);
10156
+ console.log(import_picocolors2.default.dim("3dvf.json already exists, skipping config prompt"));
10157
+ } else {
10158
+ const answers = await import_prompts.default([
10159
+ {
10160
+ type: "text",
10161
+ name: "outputDir",
10162
+ message: "Where should functions be installed?",
10163
+ initial: DEFAULT_CONFIG.outputDir
10164
+ }
10165
+ ], { onCancel: () => process.exit(1) });
10166
+ config = {
10167
+ outputDir: answers.outputDir,
10168
+ registry: DEFAULT_CONFIG.registry,
10169
+ typescript: true
10170
+ };
10171
+ writeConfig(config, cwd);
10172
+ console.log(import_picocolors2.default.green("✓") + " Created 3dvf.json");
10173
+ console.log(import_picocolors2.default.dim(` outputDir: ${config.outputDir}`));
10013
10174
  }
10014
- const answers = await import_prompts.default([
10015
- {
10016
- type: "text",
10017
- name: "outputDir",
10018
- message: "Where should functions be installed?",
10019
- initial: DEFAULT_CONFIG.outputDir
10020
- },
10175
+ const spinner = ora(`Installing three@${THREE_VERSION}...`).start();
10176
+ try {
10177
+ installDeps([`three@${THREE_VERSION}`], [`@types/three@${THREE_VERSION}`], cwd);
10178
+ spinner.succeed(`Installed three@${THREE_VERSION}`);
10179
+ } catch (err) {
10180
+ spinner.fail("Failed to install three");
10181
+ console.error(import_picocolors2.default.red(err.message));
10182
+ process.exit(1);
10183
+ }
10184
+ const tsconfigPath = join5(cwd, "tsconfig.json");
10185
+ if (existsSync4(tsconfigPath)) {
10186
+ const raw = readFileSync3(tsconfigPath, "utf-8");
10187
+ const stripped = raw.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\/\/[^\n]*/g, "");
10188
+ const tsconfig = JSON.parse(stripped);
10189
+ tsconfig.compilerOptions ??= {};
10190
+ tsconfig.compilerOptions.paths = {
10191
+ ...tsconfig.compilerOptions.paths,
10192
+ "@3dvf/*": [`./${config.outputDir}/*`]
10193
+ };
10194
+ tsconfig.compilerOptions.typeRoots = [
10195
+ "node_modules",
10196
+ "node_modules/@types"
10197
+ ];
10198
+ const tsconfigJson = JSON.stringify(tsconfig, null, 2).replace(/"typeRoots"/, `// Needed to get types from @types/three subfolders https://stackoverflow.com/a/78599968 & https://github.com/microsoft/TypeScript/issues/54629#issuecomment-1589593147
10199
+ "typeRoots"`);
10200
+ writeFileSync3(tsconfigPath, tsconfigJson + `
10201
+ `, "utf-8");
10202
+ console.log(import_picocolors2.default.green("✓") + " Updated tsconfig.json");
10203
+ }
10204
+ return config;
10205
+ }
10206
+
10207
+ // src/cli/commands/create.ts
10208
+ var __dirname3 = dirname3(fileURLToPath2(import.meta.url));
10209
+ var TEMPLATES_DIR = join6(__dirname3, "./templates/create");
10210
+ function readTemplate(file) {
10211
+ return readFileSync4(join6(TEMPLATES_DIR, file), "utf-8");
10212
+ }
10213
+ async function createCommand2(projectName, { cwd = process.cwd() } = {}) {
10214
+ const answers = await import_prompts2.default([
10021
10215
  {
10022
- type: "toggle",
10023
- name: "typescript",
10024
- message: "Use TypeScript?",
10025
- initial: true,
10026
- active: "yes",
10027
- inactive: "no"
10028
- }
10029
- ]);
10030
- if (answers.outputDir === undefined) {
10031
- console.log(import_picocolors2.default.red("Cancelled."));
10216
+ type: projectName ? null : "text",
10217
+ name: "name",
10218
+ message: "Project name",
10219
+ initial: "my-3dvf-app",
10220
+ validate: (v) => /^[a-z0-9@._/-]+$/i.test(v) || "Invalid project name"
10221
+ }
10222
+ ], { onCancel: () => process.exit(1) });
10223
+ const name = projectName ?? answers.name;
10224
+ const targetDir = join6(cwd, name);
10225
+ if (existsSync5(targetDir)) {
10226
+ console.error(import_picocolors3.default.red(`Directory "${name}" already exists.`));
10032
10227
  process.exit(1);
10033
10228
  }
10034
- const config3 = {
10035
- outputDir: answers.outputDir,
10036
- registry: DEFAULT_CONFIG.registry,
10037
- typescript: answers.typescript
10038
- };
10039
- writeConfig(config3);
10040
- console.log(import_picocolors2.default.green("\u2713") + " Created 3dvf.json");
10041
- console.log(import_picocolors2.default.dim(` outputDir: ${config3.outputDir}`));
10229
+ function cleanup() {
10230
+ if (existsSync5(targetDir)) {
10231
+ rmSync(targetDir, { recursive: true, force: true });
10232
+ console.error(import_picocolors3.default.dim(`Removed ${name}/`));
10233
+ }
10234
+ }
10235
+ const scaffoldSpinner = ora("Scaffolding Vite project...").start();
10236
+ try {
10237
+ execSync2(`npm create vite@latest ${name} -- --template vanilla-ts`, {
10238
+ cwd,
10239
+ stdio: "pipe"
10240
+ });
10241
+ scaffoldSpinner.succeed("Scaffolded Vite project");
10242
+ } catch (err) {
10243
+ scaffoldSpinner.fail("Failed to scaffold Vite project");
10244
+ console.error(import_picocolors3.default.red(err.message));
10245
+ cleanup();
10246
+ process.exit(1);
10247
+ }
10248
+ let config;
10249
+ try {
10250
+ config = await initProject(targetDir);
10251
+ } catch (err) {
10252
+ console.error(import_picocolors3.default.red(err.message));
10253
+ cleanup();
10254
+ process.exit(1);
10255
+ }
10256
+ const registrySpinner = ora("Adding create-viewer...").start();
10257
+ let tree;
10258
+ try {
10259
+ tree = await resolveTree(["create-viewer"], config.registry);
10260
+ } catch (err) {
10261
+ registrySpinner.fail(err.message);
10262
+ cleanup();
10263
+ process.exit(1);
10264
+ return;
10265
+ }
10266
+ const items = [...tree.values()];
10267
+ for (const item of items) {
10268
+ writeRegistryItem(item, config.outputDir, CLI_VERSION, targetDir);
10269
+ }
10270
+ const { deps, devDeps } = collectDeps(items);
10271
+ if (deps.length || devDeps.length) {
10272
+ installDeps(deps, devDeps, targetDir);
10273
+ }
10274
+ registrySpinner.succeed("Added create-viewer");
10275
+ const pm = detectPackageManager(targetDir);
10276
+ const run = pm === "npm" ? "npm run" : pm;
10277
+ writeFileSync4(join6(targetDir, "vite.config.ts"), readTemplate("vite.config.ts").replace("__OUTPUT_DIR__", config.outputDir), "utf-8");
10278
+ installDeps([], ["@types/node"], targetDir);
10279
+ console.log(import_picocolors3.default.green("✓") + " Created vite.config.ts");
10280
+ writeFileSync4(join6(targetDir, "index.html"), readTemplate("index.html").replace("__PROJECT_NAME__", name), "utf-8");
10281
+ console.log(import_picocolors3.default.green("✓") + " Created index.html");
10282
+ mkdirSync2(join6(targetDir, "src"), { recursive: true });
10283
+ writeFileSync4(join6(targetDir, "src", "main.ts"), readTemplate("main.ts"), "utf-8");
10284
+ console.log(import_picocolors3.default.green("✓") + " Created src/main.ts");
10285
+ writeFileSync4(join6(targetDir, "README.md"), readTemplate("README.md").replace("__PROJECT_NAME__", name).replace("__DEV_CMD__", `${run} dev`), "utf-8");
10286
+ console.log(import_picocolors3.default.green("✓") + " Created README.md");
10287
+ console.log(`
10288
+ ${import_picocolors3.default.green("✓")} Created ${import_picocolors3.default.bold(name)}
10289
+
10290
+ ${import_picocolors3.default.bold("Next steps:")}
10291
+
10292
+ ${import_picocolors3.default.cyan(`cd ${name}`)}
10293
+ ${import_picocolors3.default.cyan(`${run} dev`)}
10294
+ `);
10295
+ }
10296
+
10297
+ // src/cli/commands/init.ts
10298
+ var import_picocolors4 = __toESM(require_picocolors(), 1);
10299
+ import { existsSync as existsSync6 } from "fs";
10300
+ import { join as join7 } from "path";
10301
+ async function initCommand() {
10302
+ if (!existsSync6(join7(process.cwd(), "package.json"))) {
10303
+ console.error(import_picocolors4.default.red("No package.json found. Run `init` from the root of your project."));
10304
+ process.exit(1);
10305
+ }
10306
+ await initProject(process.cwd());
10042
10307
  }
10043
10308
 
10044
10309
  // src/cli/commands/list.ts
10045
- var import_picocolors3 = __toESM(require_picocolors(), 1);
10046
10310
  init_config();
10311
+ var import_picocolors5 = __toESM(require_picocolors(), 1);
10047
10312
  async function listCommand() {
10048
- let config4;
10313
+ let config;
10049
10314
  try {
10050
- config4 = readConfig();
10315
+ config = readConfig();
10051
10316
  } catch {
10052
10317
  const { DEFAULT_CONFIG: DEFAULT_CONFIG2 } = await Promise.resolve().then(() => (init_config(), exports_config));
10053
- config4 = DEFAULT_CONFIG2;
10318
+ config = DEFAULT_CONFIG2;
10054
10319
  }
10055
10320
  const spinner = ora("Fetching registry...").start();
10056
10321
  try {
10057
- const index = await fetchRegistryIndex(config4.registry);
10322
+ const index = await fetchRegistryIndex(config.registry);
10058
10323
  spinner.stop();
10059
- console.log(import_picocolors3.default.bold(`\nAvailable functions (${index.items.length}):\n`));
10324
+ console.log(import_picocolors5.default.bold(`
10325
+ Available functions (${index.items.length}):
10326
+ `));
10060
10327
  for (const item of index.items) {
10061
- console.log(` ${import_picocolors3.default.cyan(item.name)}`);
10328
+ console.log(` ${import_picocolors5.default.cyan(item)}`);
10062
10329
  }
10063
10330
  console.log();
10064
10331
  } catch (err) {
@@ -10070,6 +10337,7 @@ async function listCommand() {
10070
10337
  // src/cli/index.ts
10071
10338
  var program2 = new Command;
10072
10339
  program2.name("3dvf").description("Add Three.js utility functions directly into your project").version("0.1.0");
10340
+ program2.command("create [name]").description("Scaffold a new Vite + Three.js WebGPU project").action(createCommand2);
10073
10341
  program2.command("init").description("Initialize 3dvf in your project (creates 3dvf.json)").action(initCommand);
10074
10342
  program2.command("add <names...>").description("Add one or more functions to your project").action(addCommand);
10075
10343
  program2.command("list").description("List all available functions in the registry").action(listCommand);