playcademy 0.14.28 → 0.14.29

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/utils.js CHANGED
@@ -1,41 +1,12 @@
1
- var __create = Object.create;
2
1
  var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
2
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
8
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
9
- }) : x)(function(x) {
10
- if (typeof require !== "undefined") return require.apply(this, arguments);
11
- throw Error('Dynamic require of "' + x + '" is not supported');
12
- });
13
3
  var __esm = (fn, res) => function __init() {
14
4
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
15
5
  };
16
- var __commonJS = (cb, mod) => function __require2() {
17
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
18
- };
19
6
  var __export = (target, all) => {
20
7
  for (var name in all)
21
8
  __defProp(target, name, { get: all[name], enumerable: true });
22
9
  };
23
- var __copyProps = (to, from, except, desc) => {
24
- if (from && typeof from === "object" || typeof from === "function") {
25
- for (let key of __getOwnPropNames(from))
26
- if (!__hasOwnProp.call(to, key) && key !== except)
27
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
28
- }
29
- return to;
30
- };
31
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
32
- // If the importer is in node compatibility mode or this is not an ESM
33
- // file that has been converted to a CommonJS file using a Babel-
34
- // compatible transform (i.e. "__esModule" has not been set), then set
35
- // "default" to the CommonJS "module.exports" for node compatibility.
36
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
37
- mod
38
- ));
39
10
 
40
11
  // ../utils/src/package-json.ts
41
12
  function getPackageNameFromData(pkg, fallback = "unknown-package") {
@@ -323,1386 +294,6 @@ var init_file_loader = __esm({
323
294
  }
324
295
  });
325
296
 
326
- // ../../node_modules/cli-width/index.js
327
- var require_cli_width = __commonJS({
328
- "../../node_modules/cli-width/index.js"(exports, module) {
329
- "use strict";
330
- module.exports = cliWidth2;
331
- function normalizeOpts(options) {
332
- const defaultOpts = {
333
- defaultWidth: 0,
334
- output: process.stdout,
335
- tty: __require("tty")
336
- };
337
- if (!options) {
338
- return defaultOpts;
339
- }
340
- Object.keys(defaultOpts).forEach(function(key) {
341
- if (!options[key]) {
342
- options[key] = defaultOpts[key];
343
- }
344
- });
345
- return options;
346
- }
347
- function cliWidth2(options) {
348
- const opts = normalizeOpts(options);
349
- if (opts.output.getWindowSize) {
350
- return opts.output.getWindowSize()[0] || opts.defaultWidth;
351
- }
352
- if (opts.tty.getWindowSize) {
353
- return opts.tty.getWindowSize()[1] || opts.defaultWidth;
354
- }
355
- if (opts.output.columns) {
356
- return opts.output.columns;
357
- }
358
- if (process.env.CLI_WIDTH) {
359
- const width = parseInt(process.env.CLI_WIDTH, 10);
360
- if (!isNaN(width) && width !== 0) {
361
- return width;
362
- }
363
- }
364
- return opts.defaultWidth;
365
- }
366
- }
367
- });
368
-
369
- // ../../node_modules/@inquirer/core/node_modules/wrap-ansi/node_modules/strip-ansi/node_modules/ansi-regex/index.js
370
- var require_ansi_regex = __commonJS({
371
- "../../node_modules/@inquirer/core/node_modules/wrap-ansi/node_modules/strip-ansi/node_modules/ansi-regex/index.js"(exports, module) {
372
- "use strict";
373
- module.exports = ({ onlyFirst = false } = {}) => {
374
- const pattern = [
375
- "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
376
- "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
377
- ].join("|");
378
- return new RegExp(pattern, onlyFirst ? void 0 : "g");
379
- };
380
- }
381
- });
382
-
383
- // ../../node_modules/@inquirer/core/node_modules/wrap-ansi/node_modules/strip-ansi/index.js
384
- var require_strip_ansi = __commonJS({
385
- "../../node_modules/@inquirer/core/node_modules/wrap-ansi/node_modules/strip-ansi/index.js"(exports, module) {
386
- "use strict";
387
- var ansiRegex = require_ansi_regex();
388
- module.exports = (string) => typeof string === "string" ? string.replace(ansiRegex(), "") : string;
389
- }
390
- });
391
-
392
- // ../../node_modules/@inquirer/core/node_modules/wrap-ansi/node_modules/string-width/node_modules/is-fullwidth-code-point/index.js
393
- var require_is_fullwidth_code_point = __commonJS({
394
- "../../node_modules/@inquirer/core/node_modules/wrap-ansi/node_modules/string-width/node_modules/is-fullwidth-code-point/index.js"(exports, module) {
395
- "use strict";
396
- var isFullwidthCodePoint = (codePoint) => {
397
- if (Number.isNaN(codePoint)) {
398
- return false;
399
- }
400
- if (codePoint >= 4352 && (codePoint <= 4447 || // Hangul Jamo
401
- codePoint === 9001 || // LEFT-POINTING ANGLE BRACKET
402
- codePoint === 9002 || // RIGHT-POINTING ANGLE BRACKET
403
- // CJK Radicals Supplement .. Enclosed CJK Letters and Months
404
- 11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
405
- 12880 <= codePoint && codePoint <= 19903 || // CJK Unified Ideographs .. Yi Radicals
406
- 19968 <= codePoint && codePoint <= 42182 || // Hangul Jamo Extended-A
407
- 43360 <= codePoint && codePoint <= 43388 || // Hangul Syllables
408
- 44032 <= codePoint && codePoint <= 55203 || // CJK Compatibility Ideographs
409
- 63744 <= codePoint && codePoint <= 64255 || // Vertical Forms
410
- 65040 <= codePoint && codePoint <= 65049 || // CJK Compatibility Forms .. Small Form Variants
411
- 65072 <= codePoint && codePoint <= 65131 || // Halfwidth and Fullwidth Forms
412
- 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || // Kana Supplement
413
- 110592 <= codePoint && codePoint <= 110593 || // Enclosed Ideographic Supplement
414
- 127488 <= codePoint && codePoint <= 127569 || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
415
- 131072 <= codePoint && codePoint <= 262141)) {
416
- return true;
417
- }
418
- return false;
419
- };
420
- module.exports = isFullwidthCodePoint;
421
- module.exports.default = isFullwidthCodePoint;
422
- }
423
- });
424
-
425
- // ../../node_modules/@inquirer/core/node_modules/wrap-ansi/node_modules/string-width/node_modules/emoji-regex/index.js
426
- var require_emoji_regex = __commonJS({
427
- "../../node_modules/@inquirer/core/node_modules/wrap-ansi/node_modules/string-width/node_modules/emoji-regex/index.js"(exports, module) {
428
- "use strict";
429
- module.exports = function() {
430
- return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
431
- };
432
- }
433
- });
434
-
435
- // ../../node_modules/@inquirer/core/node_modules/wrap-ansi/node_modules/string-width/index.js
436
- var require_string_width = __commonJS({
437
- "../../node_modules/@inquirer/core/node_modules/wrap-ansi/node_modules/string-width/index.js"(exports, module) {
438
- "use strict";
439
- var stripAnsi2 = require_strip_ansi();
440
- var isFullwidthCodePoint = require_is_fullwidth_code_point();
441
- var emojiRegex = require_emoji_regex();
442
- var stringWidth = (string) => {
443
- if (typeof string !== "string" || string.length === 0) {
444
- return 0;
445
- }
446
- string = stripAnsi2(string);
447
- if (string.length === 0) {
448
- return 0;
449
- }
450
- string = string.replace(emojiRegex(), " ");
451
- let width = 0;
452
- for (let i = 0; i < string.length; i++) {
453
- const code = string.codePointAt(i);
454
- if (code <= 31 || code >= 127 && code <= 159) {
455
- continue;
456
- }
457
- if (code >= 768 && code <= 879) {
458
- continue;
459
- }
460
- if (code > 65535) {
461
- i++;
462
- }
463
- width += isFullwidthCodePoint(code) ? 2 : 1;
464
- }
465
- return width;
466
- };
467
- module.exports = stringWidth;
468
- module.exports.default = stringWidth;
469
- }
470
- });
471
-
472
- // ../../node_modules/color-name/index.js
473
- var require_color_name = __commonJS({
474
- "../../node_modules/color-name/index.js"(exports, module) {
475
- "use strict";
476
- module.exports = {
477
- "aliceblue": [240, 248, 255],
478
- "antiquewhite": [250, 235, 215],
479
- "aqua": [0, 255, 255],
480
- "aquamarine": [127, 255, 212],
481
- "azure": [240, 255, 255],
482
- "beige": [245, 245, 220],
483
- "bisque": [255, 228, 196],
484
- "black": [0, 0, 0],
485
- "blanchedalmond": [255, 235, 205],
486
- "blue": [0, 0, 255],
487
- "blueviolet": [138, 43, 226],
488
- "brown": [165, 42, 42],
489
- "burlywood": [222, 184, 135],
490
- "cadetblue": [95, 158, 160],
491
- "chartreuse": [127, 255, 0],
492
- "chocolate": [210, 105, 30],
493
- "coral": [255, 127, 80],
494
- "cornflowerblue": [100, 149, 237],
495
- "cornsilk": [255, 248, 220],
496
- "crimson": [220, 20, 60],
497
- "cyan": [0, 255, 255],
498
- "darkblue": [0, 0, 139],
499
- "darkcyan": [0, 139, 139],
500
- "darkgoldenrod": [184, 134, 11],
501
- "darkgray": [169, 169, 169],
502
- "darkgreen": [0, 100, 0],
503
- "darkgrey": [169, 169, 169],
504
- "darkkhaki": [189, 183, 107],
505
- "darkmagenta": [139, 0, 139],
506
- "darkolivegreen": [85, 107, 47],
507
- "darkorange": [255, 140, 0],
508
- "darkorchid": [153, 50, 204],
509
- "darkred": [139, 0, 0],
510
- "darksalmon": [233, 150, 122],
511
- "darkseagreen": [143, 188, 143],
512
- "darkslateblue": [72, 61, 139],
513
- "darkslategray": [47, 79, 79],
514
- "darkslategrey": [47, 79, 79],
515
- "darkturquoise": [0, 206, 209],
516
- "darkviolet": [148, 0, 211],
517
- "deeppink": [255, 20, 147],
518
- "deepskyblue": [0, 191, 255],
519
- "dimgray": [105, 105, 105],
520
- "dimgrey": [105, 105, 105],
521
- "dodgerblue": [30, 144, 255],
522
- "firebrick": [178, 34, 34],
523
- "floralwhite": [255, 250, 240],
524
- "forestgreen": [34, 139, 34],
525
- "fuchsia": [255, 0, 255],
526
- "gainsboro": [220, 220, 220],
527
- "ghostwhite": [248, 248, 255],
528
- "gold": [255, 215, 0],
529
- "goldenrod": [218, 165, 32],
530
- "gray": [128, 128, 128],
531
- "green": [0, 128, 0],
532
- "greenyellow": [173, 255, 47],
533
- "grey": [128, 128, 128],
534
- "honeydew": [240, 255, 240],
535
- "hotpink": [255, 105, 180],
536
- "indianred": [205, 92, 92],
537
- "indigo": [75, 0, 130],
538
- "ivory": [255, 255, 240],
539
- "khaki": [240, 230, 140],
540
- "lavender": [230, 230, 250],
541
- "lavenderblush": [255, 240, 245],
542
- "lawngreen": [124, 252, 0],
543
- "lemonchiffon": [255, 250, 205],
544
- "lightblue": [173, 216, 230],
545
- "lightcoral": [240, 128, 128],
546
- "lightcyan": [224, 255, 255],
547
- "lightgoldenrodyellow": [250, 250, 210],
548
- "lightgray": [211, 211, 211],
549
- "lightgreen": [144, 238, 144],
550
- "lightgrey": [211, 211, 211],
551
- "lightpink": [255, 182, 193],
552
- "lightsalmon": [255, 160, 122],
553
- "lightseagreen": [32, 178, 170],
554
- "lightskyblue": [135, 206, 250],
555
- "lightslategray": [119, 136, 153],
556
- "lightslategrey": [119, 136, 153],
557
- "lightsteelblue": [176, 196, 222],
558
- "lightyellow": [255, 255, 224],
559
- "lime": [0, 255, 0],
560
- "limegreen": [50, 205, 50],
561
- "linen": [250, 240, 230],
562
- "magenta": [255, 0, 255],
563
- "maroon": [128, 0, 0],
564
- "mediumaquamarine": [102, 205, 170],
565
- "mediumblue": [0, 0, 205],
566
- "mediumorchid": [186, 85, 211],
567
- "mediumpurple": [147, 112, 219],
568
- "mediumseagreen": [60, 179, 113],
569
- "mediumslateblue": [123, 104, 238],
570
- "mediumspringgreen": [0, 250, 154],
571
- "mediumturquoise": [72, 209, 204],
572
- "mediumvioletred": [199, 21, 133],
573
- "midnightblue": [25, 25, 112],
574
- "mintcream": [245, 255, 250],
575
- "mistyrose": [255, 228, 225],
576
- "moccasin": [255, 228, 181],
577
- "navajowhite": [255, 222, 173],
578
- "navy": [0, 0, 128],
579
- "oldlace": [253, 245, 230],
580
- "olive": [128, 128, 0],
581
- "olivedrab": [107, 142, 35],
582
- "orange": [255, 165, 0],
583
- "orangered": [255, 69, 0],
584
- "orchid": [218, 112, 214],
585
- "palegoldenrod": [238, 232, 170],
586
- "palegreen": [152, 251, 152],
587
- "paleturquoise": [175, 238, 238],
588
- "palevioletred": [219, 112, 147],
589
- "papayawhip": [255, 239, 213],
590
- "peachpuff": [255, 218, 185],
591
- "peru": [205, 133, 63],
592
- "pink": [255, 192, 203],
593
- "plum": [221, 160, 221],
594
- "powderblue": [176, 224, 230],
595
- "purple": [128, 0, 128],
596
- "rebeccapurple": [102, 51, 153],
597
- "red": [255, 0, 0],
598
- "rosybrown": [188, 143, 143],
599
- "royalblue": [65, 105, 225],
600
- "saddlebrown": [139, 69, 19],
601
- "salmon": [250, 128, 114],
602
- "sandybrown": [244, 164, 96],
603
- "seagreen": [46, 139, 87],
604
- "seashell": [255, 245, 238],
605
- "sienna": [160, 82, 45],
606
- "silver": [192, 192, 192],
607
- "skyblue": [135, 206, 235],
608
- "slateblue": [106, 90, 205],
609
- "slategray": [112, 128, 144],
610
- "slategrey": [112, 128, 144],
611
- "snow": [255, 250, 250],
612
- "springgreen": [0, 255, 127],
613
- "steelblue": [70, 130, 180],
614
- "tan": [210, 180, 140],
615
- "teal": [0, 128, 128],
616
- "thistle": [216, 191, 216],
617
- "tomato": [255, 99, 71],
618
- "turquoise": [64, 224, 208],
619
- "violet": [238, 130, 238],
620
- "wheat": [245, 222, 179],
621
- "white": [255, 255, 255],
622
- "whitesmoke": [245, 245, 245],
623
- "yellow": [255, 255, 0],
624
- "yellowgreen": [154, 205, 50]
625
- };
626
- }
627
- });
628
-
629
- // ../../node_modules/color-convert/conversions.js
630
- var require_conversions = __commonJS({
631
- "../../node_modules/color-convert/conversions.js"(exports, module) {
632
- var cssKeywords = require_color_name();
633
- var reverseKeywords = {};
634
- for (const key of Object.keys(cssKeywords)) {
635
- reverseKeywords[cssKeywords[key]] = key;
636
- }
637
- var convert = {
638
- rgb: { channels: 3, labels: "rgb" },
639
- hsl: { channels: 3, labels: "hsl" },
640
- hsv: { channels: 3, labels: "hsv" },
641
- hwb: { channels: 3, labels: "hwb" },
642
- cmyk: { channels: 4, labels: "cmyk" },
643
- xyz: { channels: 3, labels: "xyz" },
644
- lab: { channels: 3, labels: "lab" },
645
- lch: { channels: 3, labels: "lch" },
646
- hex: { channels: 1, labels: ["hex"] },
647
- keyword: { channels: 1, labels: ["keyword"] },
648
- ansi16: { channels: 1, labels: ["ansi16"] },
649
- ansi256: { channels: 1, labels: ["ansi256"] },
650
- hcg: { channels: 3, labels: ["h", "c", "g"] },
651
- apple: { channels: 3, labels: ["r16", "g16", "b16"] },
652
- gray: { channels: 1, labels: ["gray"] }
653
- };
654
- module.exports = convert;
655
- for (const model of Object.keys(convert)) {
656
- if (!("channels" in convert[model])) {
657
- throw new Error("missing channels property: " + model);
658
- }
659
- if (!("labels" in convert[model])) {
660
- throw new Error("missing channel labels property: " + model);
661
- }
662
- if (convert[model].labels.length !== convert[model].channels) {
663
- throw new Error("channel and label counts mismatch: " + model);
664
- }
665
- const { channels, labels } = convert[model];
666
- delete convert[model].channels;
667
- delete convert[model].labels;
668
- Object.defineProperty(convert[model], "channels", { value: channels });
669
- Object.defineProperty(convert[model], "labels", { value: labels });
670
- }
671
- convert.rgb.hsl = function(rgb) {
672
- const r = rgb[0] / 255;
673
- const g = rgb[1] / 255;
674
- const b = rgb[2] / 255;
675
- const min = Math.min(r, g, b);
676
- const max = Math.max(r, g, b);
677
- const delta = max - min;
678
- let h;
679
- let s;
680
- if (max === min) {
681
- h = 0;
682
- } else if (r === max) {
683
- h = (g - b) / delta;
684
- } else if (g === max) {
685
- h = 2 + (b - r) / delta;
686
- } else if (b === max) {
687
- h = 4 + (r - g) / delta;
688
- }
689
- h = Math.min(h * 60, 360);
690
- if (h < 0) {
691
- h += 360;
692
- }
693
- const l = (min + max) / 2;
694
- if (max === min) {
695
- s = 0;
696
- } else if (l <= 0.5) {
697
- s = delta / (max + min);
698
- } else {
699
- s = delta / (2 - max - min);
700
- }
701
- return [h, s * 100, l * 100];
702
- };
703
- convert.rgb.hsv = function(rgb) {
704
- let rdif;
705
- let gdif;
706
- let bdif;
707
- let h;
708
- let s;
709
- const r = rgb[0] / 255;
710
- const g = rgb[1] / 255;
711
- const b = rgb[2] / 255;
712
- const v = Math.max(r, g, b);
713
- const diff = v - Math.min(r, g, b);
714
- const diffc = function(c) {
715
- return (v - c) / 6 / diff + 1 / 2;
716
- };
717
- if (diff === 0) {
718
- h = 0;
719
- s = 0;
720
- } else {
721
- s = diff / v;
722
- rdif = diffc(r);
723
- gdif = diffc(g);
724
- bdif = diffc(b);
725
- if (r === v) {
726
- h = bdif - gdif;
727
- } else if (g === v) {
728
- h = 1 / 3 + rdif - bdif;
729
- } else if (b === v) {
730
- h = 2 / 3 + gdif - rdif;
731
- }
732
- if (h < 0) {
733
- h += 1;
734
- } else if (h > 1) {
735
- h -= 1;
736
- }
737
- }
738
- return [
739
- h * 360,
740
- s * 100,
741
- v * 100
742
- ];
743
- };
744
- convert.rgb.hwb = function(rgb) {
745
- const r = rgb[0];
746
- const g = rgb[1];
747
- let b = rgb[2];
748
- const h = convert.rgb.hsl(rgb)[0];
749
- const w = 1 / 255 * Math.min(r, Math.min(g, b));
750
- b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
751
- return [h, w * 100, b * 100];
752
- };
753
- convert.rgb.cmyk = function(rgb) {
754
- const r = rgb[0] / 255;
755
- const g = rgb[1] / 255;
756
- const b = rgb[2] / 255;
757
- const k = Math.min(1 - r, 1 - g, 1 - b);
758
- const c = (1 - r - k) / (1 - k) || 0;
759
- const m = (1 - g - k) / (1 - k) || 0;
760
- const y = (1 - b - k) / (1 - k) || 0;
761
- return [c * 100, m * 100, y * 100, k * 100];
762
- };
763
- function comparativeDistance(x, y) {
764
- return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2;
765
- }
766
- convert.rgb.keyword = function(rgb) {
767
- const reversed = reverseKeywords[rgb];
768
- if (reversed) {
769
- return reversed;
770
- }
771
- let currentClosestDistance = Infinity;
772
- let currentClosestKeyword;
773
- for (const keyword of Object.keys(cssKeywords)) {
774
- const value = cssKeywords[keyword];
775
- const distance = comparativeDistance(rgb, value);
776
- if (distance < currentClosestDistance) {
777
- currentClosestDistance = distance;
778
- currentClosestKeyword = keyword;
779
- }
780
- }
781
- return currentClosestKeyword;
782
- };
783
- convert.keyword.rgb = function(keyword) {
784
- return cssKeywords[keyword];
785
- };
786
- convert.rgb.xyz = function(rgb) {
787
- let r = rgb[0] / 255;
788
- let g = rgb[1] / 255;
789
- let b = rgb[2] / 255;
790
- r = r > 0.04045 ? ((r + 0.055) / 1.055) ** 2.4 : r / 12.92;
791
- g = g > 0.04045 ? ((g + 0.055) / 1.055) ** 2.4 : g / 12.92;
792
- b = b > 0.04045 ? ((b + 0.055) / 1.055) ** 2.4 : b / 12.92;
793
- const x = r * 0.4124 + g * 0.3576 + b * 0.1805;
794
- const y = r * 0.2126 + g * 0.7152 + b * 0.0722;
795
- const z = r * 0.0193 + g * 0.1192 + b * 0.9505;
796
- return [x * 100, y * 100, z * 100];
797
- };
798
- convert.rgb.lab = function(rgb) {
799
- const xyz = convert.rgb.xyz(rgb);
800
- let x = xyz[0];
801
- let y = xyz[1];
802
- let z = xyz[2];
803
- x /= 95.047;
804
- y /= 100;
805
- z /= 108.883;
806
- x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
807
- y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
808
- z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
809
- const l = 116 * y - 16;
810
- const a = 500 * (x - y);
811
- const b = 200 * (y - z);
812
- return [l, a, b];
813
- };
814
- convert.hsl.rgb = function(hsl) {
815
- const h = hsl[0] / 360;
816
- const s = hsl[1] / 100;
817
- const l = hsl[2] / 100;
818
- let t2;
819
- let t3;
820
- let val;
821
- if (s === 0) {
822
- val = l * 255;
823
- return [val, val, val];
824
- }
825
- if (l < 0.5) {
826
- t2 = l * (1 + s);
827
- } else {
828
- t2 = l + s - l * s;
829
- }
830
- const t1 = 2 * l - t2;
831
- const rgb = [0, 0, 0];
832
- for (let i = 0; i < 3; i++) {
833
- t3 = h + 1 / 3 * -(i - 1);
834
- if (t3 < 0) {
835
- t3++;
836
- }
837
- if (t3 > 1) {
838
- t3--;
839
- }
840
- if (6 * t3 < 1) {
841
- val = t1 + (t2 - t1) * 6 * t3;
842
- } else if (2 * t3 < 1) {
843
- val = t2;
844
- } else if (3 * t3 < 2) {
845
- val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
846
- } else {
847
- val = t1;
848
- }
849
- rgb[i] = val * 255;
850
- }
851
- return rgb;
852
- };
853
- convert.hsl.hsv = function(hsl) {
854
- const h = hsl[0];
855
- let s = hsl[1] / 100;
856
- let l = hsl[2] / 100;
857
- let smin = s;
858
- const lmin = Math.max(l, 0.01);
859
- l *= 2;
860
- s *= l <= 1 ? l : 2 - l;
861
- smin *= lmin <= 1 ? lmin : 2 - lmin;
862
- const v = (l + s) / 2;
863
- const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
864
- return [h, sv * 100, v * 100];
865
- };
866
- convert.hsv.rgb = function(hsv) {
867
- const h = hsv[0] / 60;
868
- const s = hsv[1] / 100;
869
- let v = hsv[2] / 100;
870
- const hi = Math.floor(h) % 6;
871
- const f = h - Math.floor(h);
872
- const p = 255 * v * (1 - s);
873
- const q = 255 * v * (1 - s * f);
874
- const t = 255 * v * (1 - s * (1 - f));
875
- v *= 255;
876
- switch (hi) {
877
- case 0:
878
- return [v, t, p];
879
- case 1:
880
- return [q, v, p];
881
- case 2:
882
- return [p, v, t];
883
- case 3:
884
- return [p, q, v];
885
- case 4:
886
- return [t, p, v];
887
- case 5:
888
- return [v, p, q];
889
- }
890
- };
891
- convert.hsv.hsl = function(hsv) {
892
- const h = hsv[0];
893
- const s = hsv[1] / 100;
894
- const v = hsv[2] / 100;
895
- const vmin = Math.max(v, 0.01);
896
- let sl;
897
- let l;
898
- l = (2 - s) * v;
899
- const lmin = (2 - s) * vmin;
900
- sl = s * vmin;
901
- sl /= lmin <= 1 ? lmin : 2 - lmin;
902
- sl = sl || 0;
903
- l /= 2;
904
- return [h, sl * 100, l * 100];
905
- };
906
- convert.hwb.rgb = function(hwb) {
907
- const h = hwb[0] / 360;
908
- let wh = hwb[1] / 100;
909
- let bl = hwb[2] / 100;
910
- const ratio = wh + bl;
911
- let f;
912
- if (ratio > 1) {
913
- wh /= ratio;
914
- bl /= ratio;
915
- }
916
- const i = Math.floor(6 * h);
917
- const v = 1 - bl;
918
- f = 6 * h - i;
919
- if ((i & 1) !== 0) {
920
- f = 1 - f;
921
- }
922
- const n = wh + f * (v - wh);
923
- let r;
924
- let g;
925
- let b;
926
- switch (i) {
927
- default:
928
- case 6:
929
- case 0:
930
- r = v;
931
- g = n;
932
- b = wh;
933
- break;
934
- case 1:
935
- r = n;
936
- g = v;
937
- b = wh;
938
- break;
939
- case 2:
940
- r = wh;
941
- g = v;
942
- b = n;
943
- break;
944
- case 3:
945
- r = wh;
946
- g = n;
947
- b = v;
948
- break;
949
- case 4:
950
- r = n;
951
- g = wh;
952
- b = v;
953
- break;
954
- case 5:
955
- r = v;
956
- g = wh;
957
- b = n;
958
- break;
959
- }
960
- return [r * 255, g * 255, b * 255];
961
- };
962
- convert.cmyk.rgb = function(cmyk) {
963
- const c = cmyk[0] / 100;
964
- const m = cmyk[1] / 100;
965
- const y = cmyk[2] / 100;
966
- const k = cmyk[3] / 100;
967
- const r = 1 - Math.min(1, c * (1 - k) + k);
968
- const g = 1 - Math.min(1, m * (1 - k) + k);
969
- const b = 1 - Math.min(1, y * (1 - k) + k);
970
- return [r * 255, g * 255, b * 255];
971
- };
972
- convert.xyz.rgb = function(xyz) {
973
- const x = xyz[0] / 100;
974
- const y = xyz[1] / 100;
975
- const z = xyz[2] / 100;
976
- let r;
977
- let g;
978
- let b;
979
- r = x * 3.2406 + y * -1.5372 + z * -0.4986;
980
- g = x * -0.9689 + y * 1.8758 + z * 0.0415;
981
- b = x * 0.0557 + y * -0.204 + z * 1.057;
982
- r = r > 31308e-7 ? 1.055 * r ** (1 / 2.4) - 0.055 : r * 12.92;
983
- g = g > 31308e-7 ? 1.055 * g ** (1 / 2.4) - 0.055 : g * 12.92;
984
- b = b > 31308e-7 ? 1.055 * b ** (1 / 2.4) - 0.055 : b * 12.92;
985
- r = Math.min(Math.max(0, r), 1);
986
- g = Math.min(Math.max(0, g), 1);
987
- b = Math.min(Math.max(0, b), 1);
988
- return [r * 255, g * 255, b * 255];
989
- };
990
- convert.xyz.lab = function(xyz) {
991
- let x = xyz[0];
992
- let y = xyz[1];
993
- let z = xyz[2];
994
- x /= 95.047;
995
- y /= 100;
996
- z /= 108.883;
997
- x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
998
- y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
999
- z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
1000
- const l = 116 * y - 16;
1001
- const a = 500 * (x - y);
1002
- const b = 200 * (y - z);
1003
- return [l, a, b];
1004
- };
1005
- convert.lab.xyz = function(lab) {
1006
- const l = lab[0];
1007
- const a = lab[1];
1008
- const b = lab[2];
1009
- let x;
1010
- let y;
1011
- let z;
1012
- y = (l + 16) / 116;
1013
- x = a / 500 + y;
1014
- z = y - b / 200;
1015
- const y2 = y ** 3;
1016
- const x2 = x ** 3;
1017
- const z2 = z ** 3;
1018
- y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787;
1019
- x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787;
1020
- z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787;
1021
- x *= 95.047;
1022
- y *= 100;
1023
- z *= 108.883;
1024
- return [x, y, z];
1025
- };
1026
- convert.lab.lch = function(lab) {
1027
- const l = lab[0];
1028
- const a = lab[1];
1029
- const b = lab[2];
1030
- let h;
1031
- const hr = Math.atan2(b, a);
1032
- h = hr * 360 / 2 / Math.PI;
1033
- if (h < 0) {
1034
- h += 360;
1035
- }
1036
- const c = Math.sqrt(a * a + b * b);
1037
- return [l, c, h];
1038
- };
1039
- convert.lch.lab = function(lch) {
1040
- const l = lch[0];
1041
- const c = lch[1];
1042
- const h = lch[2];
1043
- const hr = h / 360 * 2 * Math.PI;
1044
- const a = c * Math.cos(hr);
1045
- const b = c * Math.sin(hr);
1046
- return [l, a, b];
1047
- };
1048
- convert.rgb.ansi16 = function(args, saturation = null) {
1049
- const [r, g, b] = args;
1050
- let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation;
1051
- value = Math.round(value / 50);
1052
- if (value === 0) {
1053
- return 30;
1054
- }
1055
- let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
1056
- if (value === 2) {
1057
- ansi += 60;
1058
- }
1059
- return ansi;
1060
- };
1061
- convert.hsv.ansi16 = function(args) {
1062
- return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
1063
- };
1064
- convert.rgb.ansi256 = function(args) {
1065
- const r = args[0];
1066
- const g = args[1];
1067
- const b = args[2];
1068
- if (r === g && g === b) {
1069
- if (r < 8) {
1070
- return 16;
1071
- }
1072
- if (r > 248) {
1073
- return 231;
1074
- }
1075
- return Math.round((r - 8) / 247 * 24) + 232;
1076
- }
1077
- const ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
1078
- return ansi;
1079
- };
1080
- convert.ansi16.rgb = function(args) {
1081
- let color = args % 10;
1082
- if (color === 0 || color === 7) {
1083
- if (args > 50) {
1084
- color += 3.5;
1085
- }
1086
- color = color / 10.5 * 255;
1087
- return [color, color, color];
1088
- }
1089
- const mult = (~~(args > 50) + 1) * 0.5;
1090
- const r = (color & 1) * mult * 255;
1091
- const g = (color >> 1 & 1) * mult * 255;
1092
- const b = (color >> 2 & 1) * mult * 255;
1093
- return [r, g, b];
1094
- };
1095
- convert.ansi256.rgb = function(args) {
1096
- if (args >= 232) {
1097
- const c = (args - 232) * 10 + 8;
1098
- return [c, c, c];
1099
- }
1100
- args -= 16;
1101
- let rem;
1102
- const r = Math.floor(args / 36) / 5 * 255;
1103
- const g = Math.floor((rem = args % 36) / 6) / 5 * 255;
1104
- const b = rem % 6 / 5 * 255;
1105
- return [r, g, b];
1106
- };
1107
- convert.rgb.hex = function(args) {
1108
- const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
1109
- const string = integer.toString(16).toUpperCase();
1110
- return "000000".substring(string.length) + string;
1111
- };
1112
- convert.hex.rgb = function(args) {
1113
- const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
1114
- if (!match) {
1115
- return [0, 0, 0];
1116
- }
1117
- let colorString = match[0];
1118
- if (match[0].length === 3) {
1119
- colorString = colorString.split("").map((char) => {
1120
- return char + char;
1121
- }).join("");
1122
- }
1123
- const integer = parseInt(colorString, 16);
1124
- const r = integer >> 16 & 255;
1125
- const g = integer >> 8 & 255;
1126
- const b = integer & 255;
1127
- return [r, g, b];
1128
- };
1129
- convert.rgb.hcg = function(rgb) {
1130
- const r = rgb[0] / 255;
1131
- const g = rgb[1] / 255;
1132
- const b = rgb[2] / 255;
1133
- const max = Math.max(Math.max(r, g), b);
1134
- const min = Math.min(Math.min(r, g), b);
1135
- const chroma = max - min;
1136
- let grayscale;
1137
- let hue;
1138
- if (chroma < 1) {
1139
- grayscale = min / (1 - chroma);
1140
- } else {
1141
- grayscale = 0;
1142
- }
1143
- if (chroma <= 0) {
1144
- hue = 0;
1145
- } else if (max === r) {
1146
- hue = (g - b) / chroma % 6;
1147
- } else if (max === g) {
1148
- hue = 2 + (b - r) / chroma;
1149
- } else {
1150
- hue = 4 + (r - g) / chroma;
1151
- }
1152
- hue /= 6;
1153
- hue %= 1;
1154
- return [hue * 360, chroma * 100, grayscale * 100];
1155
- };
1156
- convert.hsl.hcg = function(hsl) {
1157
- const s = hsl[1] / 100;
1158
- const l = hsl[2] / 100;
1159
- const c = l < 0.5 ? 2 * s * l : 2 * s * (1 - l);
1160
- let f = 0;
1161
- if (c < 1) {
1162
- f = (l - 0.5 * c) / (1 - c);
1163
- }
1164
- return [hsl[0], c * 100, f * 100];
1165
- };
1166
- convert.hsv.hcg = function(hsv) {
1167
- const s = hsv[1] / 100;
1168
- const v = hsv[2] / 100;
1169
- const c = s * v;
1170
- let f = 0;
1171
- if (c < 1) {
1172
- f = (v - c) / (1 - c);
1173
- }
1174
- return [hsv[0], c * 100, f * 100];
1175
- };
1176
- convert.hcg.rgb = function(hcg) {
1177
- const h = hcg[0] / 360;
1178
- const c = hcg[1] / 100;
1179
- const g = hcg[2] / 100;
1180
- if (c === 0) {
1181
- return [g * 255, g * 255, g * 255];
1182
- }
1183
- const pure = [0, 0, 0];
1184
- const hi = h % 1 * 6;
1185
- const v = hi % 1;
1186
- const w = 1 - v;
1187
- let mg = 0;
1188
- switch (Math.floor(hi)) {
1189
- case 0:
1190
- pure[0] = 1;
1191
- pure[1] = v;
1192
- pure[2] = 0;
1193
- break;
1194
- case 1:
1195
- pure[0] = w;
1196
- pure[1] = 1;
1197
- pure[2] = 0;
1198
- break;
1199
- case 2:
1200
- pure[0] = 0;
1201
- pure[1] = 1;
1202
- pure[2] = v;
1203
- break;
1204
- case 3:
1205
- pure[0] = 0;
1206
- pure[1] = w;
1207
- pure[2] = 1;
1208
- break;
1209
- case 4:
1210
- pure[0] = v;
1211
- pure[1] = 0;
1212
- pure[2] = 1;
1213
- break;
1214
- default:
1215
- pure[0] = 1;
1216
- pure[1] = 0;
1217
- pure[2] = w;
1218
- }
1219
- mg = (1 - c) * g;
1220
- return [
1221
- (c * pure[0] + mg) * 255,
1222
- (c * pure[1] + mg) * 255,
1223
- (c * pure[2] + mg) * 255
1224
- ];
1225
- };
1226
- convert.hcg.hsv = function(hcg) {
1227
- const c = hcg[1] / 100;
1228
- const g = hcg[2] / 100;
1229
- const v = c + g * (1 - c);
1230
- let f = 0;
1231
- if (v > 0) {
1232
- f = c / v;
1233
- }
1234
- return [hcg[0], f * 100, v * 100];
1235
- };
1236
- convert.hcg.hsl = function(hcg) {
1237
- const c = hcg[1] / 100;
1238
- const g = hcg[2] / 100;
1239
- const l = g * (1 - c) + 0.5 * c;
1240
- let s = 0;
1241
- if (l > 0 && l < 0.5) {
1242
- s = c / (2 * l);
1243
- } else if (l >= 0.5 && l < 1) {
1244
- s = c / (2 * (1 - l));
1245
- }
1246
- return [hcg[0], s * 100, l * 100];
1247
- };
1248
- convert.hcg.hwb = function(hcg) {
1249
- const c = hcg[1] / 100;
1250
- const g = hcg[2] / 100;
1251
- const v = c + g * (1 - c);
1252
- return [hcg[0], (v - c) * 100, (1 - v) * 100];
1253
- };
1254
- convert.hwb.hcg = function(hwb) {
1255
- const w = hwb[1] / 100;
1256
- const b = hwb[2] / 100;
1257
- const v = 1 - b;
1258
- const c = v - w;
1259
- let g = 0;
1260
- if (c < 1) {
1261
- g = (v - c) / (1 - c);
1262
- }
1263
- return [hwb[0], c * 100, g * 100];
1264
- };
1265
- convert.apple.rgb = function(apple) {
1266
- return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
1267
- };
1268
- convert.rgb.apple = function(rgb) {
1269
- return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
1270
- };
1271
- convert.gray.rgb = function(args) {
1272
- return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
1273
- };
1274
- convert.gray.hsl = function(args) {
1275
- return [0, 0, args[0]];
1276
- };
1277
- convert.gray.hsv = convert.gray.hsl;
1278
- convert.gray.hwb = function(gray2) {
1279
- return [0, 100, gray2[0]];
1280
- };
1281
- convert.gray.cmyk = function(gray2) {
1282
- return [0, 0, 0, gray2[0]];
1283
- };
1284
- convert.gray.lab = function(gray2) {
1285
- return [gray2[0], 0, 0];
1286
- };
1287
- convert.gray.hex = function(gray2) {
1288
- const val = Math.round(gray2[0] / 100 * 255) & 255;
1289
- const integer = (val << 16) + (val << 8) + val;
1290
- const string = integer.toString(16).toUpperCase();
1291
- return "000000".substring(string.length) + string;
1292
- };
1293
- convert.rgb.gray = function(rgb) {
1294
- const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
1295
- return [val / 255 * 100];
1296
- };
1297
- }
1298
- });
1299
-
1300
- // ../../node_modules/color-convert/route.js
1301
- var require_route = __commonJS({
1302
- "../../node_modules/color-convert/route.js"(exports, module) {
1303
- var conversions = require_conversions();
1304
- function buildGraph() {
1305
- const graph = {};
1306
- const models = Object.keys(conversions);
1307
- for (let len = models.length, i = 0; i < len; i++) {
1308
- graph[models[i]] = {
1309
- // http://jsperf.com/1-vs-infinity
1310
- // micro-opt, but this is simple.
1311
- distance: -1,
1312
- parent: null
1313
- };
1314
- }
1315
- return graph;
1316
- }
1317
- function deriveBFS(fromModel) {
1318
- const graph = buildGraph();
1319
- const queue = [fromModel];
1320
- graph[fromModel].distance = 0;
1321
- while (queue.length) {
1322
- const current = queue.pop();
1323
- const adjacents = Object.keys(conversions[current]);
1324
- for (let len = adjacents.length, i = 0; i < len; i++) {
1325
- const adjacent = adjacents[i];
1326
- const node = graph[adjacent];
1327
- if (node.distance === -1) {
1328
- node.distance = graph[current].distance + 1;
1329
- node.parent = current;
1330
- queue.unshift(adjacent);
1331
- }
1332
- }
1333
- }
1334
- return graph;
1335
- }
1336
- function link(from, to) {
1337
- return function(args) {
1338
- return to(from(args));
1339
- };
1340
- }
1341
- function wrapConversion(toModel, graph) {
1342
- const path2 = [graph[toModel].parent, toModel];
1343
- let fn = conversions[graph[toModel].parent][toModel];
1344
- let cur = graph[toModel].parent;
1345
- while (graph[cur].parent) {
1346
- path2.unshift(graph[cur].parent);
1347
- fn = link(conversions[graph[cur].parent][cur], fn);
1348
- cur = graph[cur].parent;
1349
- }
1350
- fn.conversion = path2;
1351
- return fn;
1352
- }
1353
- module.exports = function(fromModel) {
1354
- const graph = deriveBFS(fromModel);
1355
- const conversion = {};
1356
- const models = Object.keys(graph);
1357
- for (let len = models.length, i = 0; i < len; i++) {
1358
- const toModel = models[i];
1359
- const node = graph[toModel];
1360
- if (node.parent === null) {
1361
- continue;
1362
- }
1363
- conversion[toModel] = wrapConversion(toModel, graph);
1364
- }
1365
- return conversion;
1366
- };
1367
- }
1368
- });
1369
-
1370
- // ../../node_modules/color-convert/index.js
1371
- var require_color_convert = __commonJS({
1372
- "../../node_modules/color-convert/index.js"(exports, module) {
1373
- var conversions = require_conversions();
1374
- var route = require_route();
1375
- var convert = {};
1376
- var models = Object.keys(conversions);
1377
- function wrapRaw(fn) {
1378
- const wrappedFn = function(...args) {
1379
- const arg0 = args[0];
1380
- if (arg0 === void 0 || arg0 === null) {
1381
- return arg0;
1382
- }
1383
- if (arg0.length > 1) {
1384
- args = arg0;
1385
- }
1386
- return fn(args);
1387
- };
1388
- if ("conversion" in fn) {
1389
- wrappedFn.conversion = fn.conversion;
1390
- }
1391
- return wrappedFn;
1392
- }
1393
- function wrapRounded(fn) {
1394
- const wrappedFn = function(...args) {
1395
- const arg0 = args[0];
1396
- if (arg0 === void 0 || arg0 === null) {
1397
- return arg0;
1398
- }
1399
- if (arg0.length > 1) {
1400
- args = arg0;
1401
- }
1402
- const result = fn(args);
1403
- if (typeof result === "object") {
1404
- for (let len = result.length, i = 0; i < len; i++) {
1405
- result[i] = Math.round(result[i]);
1406
- }
1407
- }
1408
- return result;
1409
- };
1410
- if ("conversion" in fn) {
1411
- wrappedFn.conversion = fn.conversion;
1412
- }
1413
- return wrappedFn;
1414
- }
1415
- models.forEach((fromModel) => {
1416
- convert[fromModel] = {};
1417
- Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels });
1418
- Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels });
1419
- const routes = route(fromModel);
1420
- const routeModels = Object.keys(routes);
1421
- routeModels.forEach((toModel) => {
1422
- const fn = routes[toModel];
1423
- convert[fromModel][toModel] = wrapRounded(fn);
1424
- convert[fromModel][toModel].raw = wrapRaw(fn);
1425
- });
1426
- });
1427
- module.exports = convert;
1428
- }
1429
- });
1430
-
1431
- // ../../node_modules/ansi-styles/index.js
1432
- var require_ansi_styles = __commonJS({
1433
- "../../node_modules/ansi-styles/index.js"(exports, module) {
1434
- "use strict";
1435
- var wrapAnsi16 = (fn, offset) => (...args) => {
1436
- const code = fn(...args);
1437
- return `\x1B[${code + offset}m`;
1438
- };
1439
- var wrapAnsi256 = (fn, offset) => (...args) => {
1440
- const code = fn(...args);
1441
- return `\x1B[${38 + offset};5;${code}m`;
1442
- };
1443
- var wrapAnsi16m = (fn, offset) => (...args) => {
1444
- const rgb = fn(...args);
1445
- return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
1446
- };
1447
- var ansi2ansi = (n) => n;
1448
- var rgb2rgb = (r, g, b) => [r, g, b];
1449
- var setLazyProperty = (object, property, get) => {
1450
- Object.defineProperty(object, property, {
1451
- get: () => {
1452
- const value = get();
1453
- Object.defineProperty(object, property, {
1454
- value,
1455
- enumerable: true,
1456
- configurable: true
1457
- });
1458
- return value;
1459
- },
1460
- enumerable: true,
1461
- configurable: true
1462
- });
1463
- };
1464
- var colorConvert;
1465
- var makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
1466
- if (colorConvert === void 0) {
1467
- colorConvert = require_color_convert();
1468
- }
1469
- const offset = isBackground ? 10 : 0;
1470
- const styles2 = {};
1471
- for (const [sourceSpace, suite] of Object.entries(colorConvert)) {
1472
- const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
1473
- if (sourceSpace === targetSpace) {
1474
- styles2[name] = wrap(identity, offset);
1475
- } else if (typeof suite === "object") {
1476
- styles2[name] = wrap(suite[targetSpace], offset);
1477
- }
1478
- }
1479
- return styles2;
1480
- };
1481
- function assembleStyles() {
1482
- const codes = /* @__PURE__ */ new Map();
1483
- const styles2 = {
1484
- modifier: {
1485
- reset: [0, 0],
1486
- // 21 isn't widely supported and 22 does the same thing
1487
- bold: [1, 22],
1488
- dim: [2, 22],
1489
- italic: [3, 23],
1490
- underline: [4, 24],
1491
- inverse: [7, 27],
1492
- hidden: [8, 28],
1493
- strikethrough: [9, 29]
1494
- },
1495
- color: {
1496
- black: [30, 39],
1497
- red: [31, 39],
1498
- green: [32, 39],
1499
- yellow: [33, 39],
1500
- blue: [34, 39],
1501
- magenta: [35, 39],
1502
- cyan: [36, 39],
1503
- white: [37, 39],
1504
- // Bright color
1505
- blackBright: [90, 39],
1506
- redBright: [91, 39],
1507
- greenBright: [92, 39],
1508
- yellowBright: [93, 39],
1509
- blueBright: [94, 39],
1510
- magentaBright: [95, 39],
1511
- cyanBright: [96, 39],
1512
- whiteBright: [97, 39]
1513
- },
1514
- bgColor: {
1515
- bgBlack: [40, 49],
1516
- bgRed: [41, 49],
1517
- bgGreen: [42, 49],
1518
- bgYellow: [43, 49],
1519
- bgBlue: [44, 49],
1520
- bgMagenta: [45, 49],
1521
- bgCyan: [46, 49],
1522
- bgWhite: [47, 49],
1523
- // Bright color
1524
- bgBlackBright: [100, 49],
1525
- bgRedBright: [101, 49],
1526
- bgGreenBright: [102, 49],
1527
- bgYellowBright: [103, 49],
1528
- bgBlueBright: [104, 49],
1529
- bgMagentaBright: [105, 49],
1530
- bgCyanBright: [106, 49],
1531
- bgWhiteBright: [107, 49]
1532
- }
1533
- };
1534
- styles2.color.gray = styles2.color.blackBright;
1535
- styles2.bgColor.bgGray = styles2.bgColor.bgBlackBright;
1536
- styles2.color.grey = styles2.color.blackBright;
1537
- styles2.bgColor.bgGrey = styles2.bgColor.bgBlackBright;
1538
- for (const [groupName, group] of Object.entries(styles2)) {
1539
- for (const [styleName, style] of Object.entries(group)) {
1540
- styles2[styleName] = {
1541
- open: `\x1B[${style[0]}m`,
1542
- close: `\x1B[${style[1]}m`
1543
- };
1544
- group[styleName] = styles2[styleName];
1545
- codes.set(style[0], style[1]);
1546
- }
1547
- Object.defineProperty(styles2, groupName, {
1548
- value: group,
1549
- enumerable: false
1550
- });
1551
- }
1552
- Object.defineProperty(styles2, "codes", {
1553
- value: codes,
1554
- enumerable: false
1555
- });
1556
- styles2.color.close = "\x1B[39m";
1557
- styles2.bgColor.close = "\x1B[49m";
1558
- setLazyProperty(styles2.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false));
1559
- setLazyProperty(styles2.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false));
1560
- setLazyProperty(styles2.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false));
1561
- setLazyProperty(styles2.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true));
1562
- setLazyProperty(styles2.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true));
1563
- setLazyProperty(styles2.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true));
1564
- return styles2;
1565
- }
1566
- Object.defineProperty(module, "exports", {
1567
- enumerable: true,
1568
- get: assembleStyles
1569
- });
1570
- }
1571
- });
1572
-
1573
- // ../../node_modules/@inquirer/core/node_modules/wrap-ansi/index.js
1574
- var require_wrap_ansi = __commonJS({
1575
- "../../node_modules/@inquirer/core/node_modules/wrap-ansi/index.js"(exports, module) {
1576
- "use strict";
1577
- var stringWidth = require_string_width();
1578
- var stripAnsi2 = require_strip_ansi();
1579
- var ansiStyles = require_ansi_styles();
1580
- var ESCAPES = /* @__PURE__ */ new Set([
1581
- "\x1B",
1582
- "\x9B"
1583
- ]);
1584
- var END_CODE = 39;
1585
- var wrapAnsi2 = (code) => `${ESCAPES.values().next().value}[${code}m`;
1586
- var wordLengths = (string) => string.split(" ").map((character) => stringWidth(character));
1587
- var wrapWord = (rows, word, columns) => {
1588
- const characters = [...word];
1589
- let isInsideEscape = false;
1590
- let visible = stringWidth(stripAnsi2(rows[rows.length - 1]));
1591
- for (const [index, character] of characters.entries()) {
1592
- const characterLength = stringWidth(character);
1593
- if (visible + characterLength <= columns) {
1594
- rows[rows.length - 1] += character;
1595
- } else {
1596
- rows.push(character);
1597
- visible = 0;
1598
- }
1599
- if (ESCAPES.has(character)) {
1600
- isInsideEscape = true;
1601
- } else if (isInsideEscape && character === "m") {
1602
- isInsideEscape = false;
1603
- continue;
1604
- }
1605
- if (isInsideEscape) {
1606
- continue;
1607
- }
1608
- visible += characterLength;
1609
- if (visible === columns && index < characters.length - 1) {
1610
- rows.push("");
1611
- visible = 0;
1612
- }
1613
- }
1614
- if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) {
1615
- rows[rows.length - 2] += rows.pop();
1616
- }
1617
- };
1618
- var stringVisibleTrimSpacesRight = (str) => {
1619
- const words = str.split(" ");
1620
- let last = words.length;
1621
- while (last > 0) {
1622
- if (stringWidth(words[last - 1]) > 0) {
1623
- break;
1624
- }
1625
- last--;
1626
- }
1627
- if (last === words.length) {
1628
- return str;
1629
- }
1630
- return words.slice(0, last).join(" ") + words.slice(last).join("");
1631
- };
1632
- var exec = (string, columns, options = {}) => {
1633
- if (options.trim !== false && string.trim() === "") {
1634
- return "";
1635
- }
1636
- let pre = "";
1637
- let ret = "";
1638
- let escapeCode;
1639
- const lengths = wordLengths(string);
1640
- let rows = [""];
1641
- for (const [index, word] of string.split(" ").entries()) {
1642
- if (options.trim !== false) {
1643
- rows[rows.length - 1] = rows[rows.length - 1].trimLeft();
1644
- }
1645
- let rowLength = stringWidth(rows[rows.length - 1]);
1646
- if (index !== 0) {
1647
- if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
1648
- rows.push("");
1649
- rowLength = 0;
1650
- }
1651
- if (rowLength > 0 || options.trim === false) {
1652
- rows[rows.length - 1] += " ";
1653
- rowLength++;
1654
- }
1655
- }
1656
- if (options.hard && lengths[index] > columns) {
1657
- const remainingColumns = columns - rowLength;
1658
- const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
1659
- const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);
1660
- if (breaksStartingNextLine < breaksStartingThisLine) {
1661
- rows.push("");
1662
- }
1663
- wrapWord(rows, word, columns);
1664
- continue;
1665
- }
1666
- if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
1667
- if (options.wordWrap === false && rowLength < columns) {
1668
- wrapWord(rows, word, columns);
1669
- continue;
1670
- }
1671
- rows.push("");
1672
- }
1673
- if (rowLength + lengths[index] > columns && options.wordWrap === false) {
1674
- wrapWord(rows, word, columns);
1675
- continue;
1676
- }
1677
- rows[rows.length - 1] += word;
1678
- }
1679
- if (options.trim !== false) {
1680
- rows = rows.map(stringVisibleTrimSpacesRight);
1681
- }
1682
- pre = rows.join("\n");
1683
- for (const [index, character] of [...pre].entries()) {
1684
- ret += character;
1685
- if (ESCAPES.has(character)) {
1686
- const code2 = parseFloat(/\d[^m]*/.exec(pre.slice(index, index + 4)));
1687
- escapeCode = code2 === END_CODE ? null : code2;
1688
- }
1689
- const code = ansiStyles.codes.get(Number(escapeCode));
1690
- if (escapeCode && code) {
1691
- if (pre[index + 1] === "\n") {
1692
- ret += wrapAnsi2(code);
1693
- } else if (character === "\n") {
1694
- ret += wrapAnsi2(escapeCode);
1695
- }
1696
- }
1697
- }
1698
- return ret;
1699
- };
1700
- module.exports = (string, columns, options) => {
1701
- return String(string).normalize().replace(/\r\n/g, "\n").split("\n").map((line) => exec(line, columns, options)).join("\n");
1702
- };
1703
- }
1704
- });
1705
-
1706
297
  // src/lib/config/loader.ts
1707
298
  init_file_loader();
1708
299
  import { dirname as dirname2, resolve as resolve2 } from "path";
@@ -1875,6 +466,13 @@ import { join as join3 } from "path";
1875
466
  var DEFAULT_DATABASE_DIRECTORY = join3("server", "db");
1876
467
  var DRIZZLE_CONFIG_FILES = ["drizzle.config.ts", "drizzle.config.js"];
1877
468
 
469
+ // src/constants/engine.ts
470
+ var TEMPLATE_REPOS = {
471
+ VITE: "vitejs/vite/packages/create-vite",
472
+ SUPERBUILDERS: "superbuilders"
473
+ };
474
+ var GODOT_ADDON_URL = "https://enginetoolin-production-sharedengineassetsbucketbucket-odxfwvez.s3.us-east-1.amazonaws.com/godot/assets/playcademy.zip";
475
+
1878
476
  // src/constants/godot.ts
1879
477
  import { join as join4 } from "node:path";
1880
478
  var GODOT_BUILD_DIRECTORIES = {
@@ -2037,592 +635,6 @@ import {
2037
635
  } from "colorette";
2038
636
  import { colorize } from "json-colorizer";
2039
637
 
2040
- // ../../node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
2041
- import { AsyncLocalStorage, AsyncResource } from "node:async_hooks";
2042
- var hookStorage = new AsyncLocalStorage();
2043
-
2044
- // ../../node_modules/@inquirer/core/dist/esm/lib/theme.js
2045
- import colors from "yoctocolors-cjs";
2046
-
2047
- // ../../node_modules/@inquirer/figures/dist/esm/index.js
2048
- import process2 from "node:process";
2049
- function isUnicodeSupported() {
2050
- if (process2.platform !== "win32") {
2051
- return process2.env["TERM"] !== "linux";
2052
- }
2053
- return Boolean(process2.env["WT_SESSION"]) || // Windows Terminal
2054
- Boolean(process2.env["TERMINUS_SUBLIME"]) || // Terminus (<0.2.27)
2055
- process2.env["ConEmuTask"] === "{cmd::Cmder}" || // ConEmu and cmder
2056
- process2.env["TERM_PROGRAM"] === "Terminus-Sublime" || process2.env["TERM_PROGRAM"] === "vscode" || process2.env["TERM"] === "xterm-256color" || process2.env["TERM"] === "alacritty" || process2.env["TERMINAL_EMULATOR"] === "JetBrains-JediTerm";
2057
- }
2058
- var common = {
2059
- circleQuestionMark: "(?)",
2060
- questionMarkPrefix: "(?)",
2061
- square: "\u2588",
2062
- squareDarkShade: "\u2593",
2063
- squareMediumShade: "\u2592",
2064
- squareLightShade: "\u2591",
2065
- squareTop: "\u2580",
2066
- squareBottom: "\u2584",
2067
- squareLeft: "\u258C",
2068
- squareRight: "\u2590",
2069
- squareCenter: "\u25A0",
2070
- bullet: "\u25CF",
2071
- dot: "\u2024",
2072
- ellipsis: "\u2026",
2073
- pointerSmall: "\u203A",
2074
- triangleUp: "\u25B2",
2075
- triangleUpSmall: "\u25B4",
2076
- triangleDown: "\u25BC",
2077
- triangleDownSmall: "\u25BE",
2078
- triangleLeftSmall: "\u25C2",
2079
- triangleRightSmall: "\u25B8",
2080
- home: "\u2302",
2081
- heart: "\u2665",
2082
- musicNote: "\u266A",
2083
- musicNoteBeamed: "\u266B",
2084
- arrowUp: "\u2191",
2085
- arrowDown: "\u2193",
2086
- arrowLeft: "\u2190",
2087
- arrowRight: "\u2192",
2088
- arrowLeftRight: "\u2194",
2089
- arrowUpDown: "\u2195",
2090
- almostEqual: "\u2248",
2091
- notEqual: "\u2260",
2092
- lessOrEqual: "\u2264",
2093
- greaterOrEqual: "\u2265",
2094
- identical: "\u2261",
2095
- infinity: "\u221E",
2096
- subscriptZero: "\u2080",
2097
- subscriptOne: "\u2081",
2098
- subscriptTwo: "\u2082",
2099
- subscriptThree: "\u2083",
2100
- subscriptFour: "\u2084",
2101
- subscriptFive: "\u2085",
2102
- subscriptSix: "\u2086",
2103
- subscriptSeven: "\u2087",
2104
- subscriptEight: "\u2088",
2105
- subscriptNine: "\u2089",
2106
- oneHalf: "\xBD",
2107
- oneThird: "\u2153",
2108
- oneQuarter: "\xBC",
2109
- oneFifth: "\u2155",
2110
- oneSixth: "\u2159",
2111
- oneEighth: "\u215B",
2112
- twoThirds: "\u2154",
2113
- twoFifths: "\u2156",
2114
- threeQuarters: "\xBE",
2115
- threeFifths: "\u2157",
2116
- threeEighths: "\u215C",
2117
- fourFifths: "\u2158",
2118
- fiveSixths: "\u215A",
2119
- fiveEighths: "\u215D",
2120
- sevenEighths: "\u215E",
2121
- line: "\u2500",
2122
- lineBold: "\u2501",
2123
- lineDouble: "\u2550",
2124
- lineDashed0: "\u2504",
2125
- lineDashed1: "\u2505",
2126
- lineDashed2: "\u2508",
2127
- lineDashed3: "\u2509",
2128
- lineDashed4: "\u254C",
2129
- lineDashed5: "\u254D",
2130
- lineDashed6: "\u2574",
2131
- lineDashed7: "\u2576",
2132
- lineDashed8: "\u2578",
2133
- lineDashed9: "\u257A",
2134
- lineDashed10: "\u257C",
2135
- lineDashed11: "\u257E",
2136
- lineDashed12: "\u2212",
2137
- lineDashed13: "\u2013",
2138
- lineDashed14: "\u2010",
2139
- lineDashed15: "\u2043",
2140
- lineVertical: "\u2502",
2141
- lineVerticalBold: "\u2503",
2142
- lineVerticalDouble: "\u2551",
2143
- lineVerticalDashed0: "\u2506",
2144
- lineVerticalDashed1: "\u2507",
2145
- lineVerticalDashed2: "\u250A",
2146
- lineVerticalDashed3: "\u250B",
2147
- lineVerticalDashed4: "\u254E",
2148
- lineVerticalDashed5: "\u254F",
2149
- lineVerticalDashed6: "\u2575",
2150
- lineVerticalDashed7: "\u2577",
2151
- lineVerticalDashed8: "\u2579",
2152
- lineVerticalDashed9: "\u257B",
2153
- lineVerticalDashed10: "\u257D",
2154
- lineVerticalDashed11: "\u257F",
2155
- lineDownLeft: "\u2510",
2156
- lineDownLeftArc: "\u256E",
2157
- lineDownBoldLeftBold: "\u2513",
2158
- lineDownBoldLeft: "\u2512",
2159
- lineDownLeftBold: "\u2511",
2160
- lineDownDoubleLeftDouble: "\u2557",
2161
- lineDownDoubleLeft: "\u2556",
2162
- lineDownLeftDouble: "\u2555",
2163
- lineDownRight: "\u250C",
2164
- lineDownRightArc: "\u256D",
2165
- lineDownBoldRightBold: "\u250F",
2166
- lineDownBoldRight: "\u250E",
2167
- lineDownRightBold: "\u250D",
2168
- lineDownDoubleRightDouble: "\u2554",
2169
- lineDownDoubleRight: "\u2553",
2170
- lineDownRightDouble: "\u2552",
2171
- lineUpLeft: "\u2518",
2172
- lineUpLeftArc: "\u256F",
2173
- lineUpBoldLeftBold: "\u251B",
2174
- lineUpBoldLeft: "\u251A",
2175
- lineUpLeftBold: "\u2519",
2176
- lineUpDoubleLeftDouble: "\u255D",
2177
- lineUpDoubleLeft: "\u255C",
2178
- lineUpLeftDouble: "\u255B",
2179
- lineUpRight: "\u2514",
2180
- lineUpRightArc: "\u2570",
2181
- lineUpBoldRightBold: "\u2517",
2182
- lineUpBoldRight: "\u2516",
2183
- lineUpRightBold: "\u2515",
2184
- lineUpDoubleRightDouble: "\u255A",
2185
- lineUpDoubleRight: "\u2559",
2186
- lineUpRightDouble: "\u2558",
2187
- lineUpDownLeft: "\u2524",
2188
- lineUpBoldDownBoldLeftBold: "\u252B",
2189
- lineUpBoldDownBoldLeft: "\u2528",
2190
- lineUpDownLeftBold: "\u2525",
2191
- lineUpBoldDownLeftBold: "\u2529",
2192
- lineUpDownBoldLeftBold: "\u252A",
2193
- lineUpDownBoldLeft: "\u2527",
2194
- lineUpBoldDownLeft: "\u2526",
2195
- lineUpDoubleDownDoubleLeftDouble: "\u2563",
2196
- lineUpDoubleDownDoubleLeft: "\u2562",
2197
- lineUpDownLeftDouble: "\u2561",
2198
- lineUpDownRight: "\u251C",
2199
- lineUpBoldDownBoldRightBold: "\u2523",
2200
- lineUpBoldDownBoldRight: "\u2520",
2201
- lineUpDownRightBold: "\u251D",
2202
- lineUpBoldDownRightBold: "\u2521",
2203
- lineUpDownBoldRightBold: "\u2522",
2204
- lineUpDownBoldRight: "\u251F",
2205
- lineUpBoldDownRight: "\u251E",
2206
- lineUpDoubleDownDoubleRightDouble: "\u2560",
2207
- lineUpDoubleDownDoubleRight: "\u255F",
2208
- lineUpDownRightDouble: "\u255E",
2209
- lineDownLeftRight: "\u252C",
2210
- lineDownBoldLeftBoldRightBold: "\u2533",
2211
- lineDownLeftBoldRightBold: "\u252F",
2212
- lineDownBoldLeftRight: "\u2530",
2213
- lineDownBoldLeftBoldRight: "\u2531",
2214
- lineDownBoldLeftRightBold: "\u2532",
2215
- lineDownLeftRightBold: "\u252E",
2216
- lineDownLeftBoldRight: "\u252D",
2217
- lineDownDoubleLeftDoubleRightDouble: "\u2566",
2218
- lineDownDoubleLeftRight: "\u2565",
2219
- lineDownLeftDoubleRightDouble: "\u2564",
2220
- lineUpLeftRight: "\u2534",
2221
- lineUpBoldLeftBoldRightBold: "\u253B",
2222
- lineUpLeftBoldRightBold: "\u2537",
2223
- lineUpBoldLeftRight: "\u2538",
2224
- lineUpBoldLeftBoldRight: "\u2539",
2225
- lineUpBoldLeftRightBold: "\u253A",
2226
- lineUpLeftRightBold: "\u2536",
2227
- lineUpLeftBoldRight: "\u2535",
2228
- lineUpDoubleLeftDoubleRightDouble: "\u2569",
2229
- lineUpDoubleLeftRight: "\u2568",
2230
- lineUpLeftDoubleRightDouble: "\u2567",
2231
- lineUpDownLeftRight: "\u253C",
2232
- lineUpBoldDownBoldLeftBoldRightBold: "\u254B",
2233
- lineUpDownBoldLeftBoldRightBold: "\u2548",
2234
- lineUpBoldDownLeftBoldRightBold: "\u2547",
2235
- lineUpBoldDownBoldLeftRightBold: "\u254A",
2236
- lineUpBoldDownBoldLeftBoldRight: "\u2549",
2237
- lineUpBoldDownLeftRight: "\u2540",
2238
- lineUpDownBoldLeftRight: "\u2541",
2239
- lineUpDownLeftBoldRight: "\u253D",
2240
- lineUpDownLeftRightBold: "\u253E",
2241
- lineUpBoldDownBoldLeftRight: "\u2542",
2242
- lineUpDownLeftBoldRightBold: "\u253F",
2243
- lineUpBoldDownLeftBoldRight: "\u2543",
2244
- lineUpBoldDownLeftRightBold: "\u2544",
2245
- lineUpDownBoldLeftBoldRight: "\u2545",
2246
- lineUpDownBoldLeftRightBold: "\u2546",
2247
- lineUpDoubleDownDoubleLeftDoubleRightDouble: "\u256C",
2248
- lineUpDoubleDownDoubleLeftRight: "\u256B",
2249
- lineUpDownLeftDoubleRightDouble: "\u256A",
2250
- lineCross: "\u2573",
2251
- lineBackslash: "\u2572",
2252
- lineSlash: "\u2571"
2253
- };
2254
- var specialMainSymbols = {
2255
- tick: "\u2714",
2256
- info: "\u2139",
2257
- warning: "\u26A0",
2258
- cross: "\u2718",
2259
- squareSmall: "\u25FB",
2260
- squareSmallFilled: "\u25FC",
2261
- circle: "\u25EF",
2262
- circleFilled: "\u25C9",
2263
- circleDotted: "\u25CC",
2264
- circleDouble: "\u25CE",
2265
- circleCircle: "\u24DE",
2266
- circleCross: "\u24E7",
2267
- circlePipe: "\u24BE",
2268
- radioOn: "\u25C9",
2269
- radioOff: "\u25EF",
2270
- checkboxOn: "\u2612",
2271
- checkboxOff: "\u2610",
2272
- checkboxCircleOn: "\u24E7",
2273
- checkboxCircleOff: "\u24BE",
2274
- pointer: "\u276F",
2275
- triangleUpOutline: "\u25B3",
2276
- triangleLeft: "\u25C0",
2277
- triangleRight: "\u25B6",
2278
- lozenge: "\u25C6",
2279
- lozengeOutline: "\u25C7",
2280
- hamburger: "\u2630",
2281
- smiley: "\u32E1",
2282
- mustache: "\u0DF4",
2283
- star: "\u2605",
2284
- play: "\u25B6",
2285
- nodejs: "\u2B22",
2286
- oneSeventh: "\u2150",
2287
- oneNinth: "\u2151",
2288
- oneTenth: "\u2152"
2289
- };
2290
- var specialFallbackSymbols = {
2291
- tick: "\u221A",
2292
- info: "i",
2293
- warning: "\u203C",
2294
- cross: "\xD7",
2295
- squareSmall: "\u25A1",
2296
- squareSmallFilled: "\u25A0",
2297
- circle: "( )",
2298
- circleFilled: "(*)",
2299
- circleDotted: "( )",
2300
- circleDouble: "( )",
2301
- circleCircle: "(\u25CB)",
2302
- circleCross: "(\xD7)",
2303
- circlePipe: "(\u2502)",
2304
- radioOn: "(*)",
2305
- radioOff: "( )",
2306
- checkboxOn: "[\xD7]",
2307
- checkboxOff: "[ ]",
2308
- checkboxCircleOn: "(\xD7)",
2309
- checkboxCircleOff: "( )",
2310
- pointer: ">",
2311
- triangleUpOutline: "\u2206",
2312
- triangleLeft: "\u25C4",
2313
- triangleRight: "\u25BA",
2314
- lozenge: "\u2666",
2315
- lozengeOutline: "\u25CA",
2316
- hamburger: "\u2261",
2317
- smiley: "\u263A",
2318
- mustache: "\u250C\u2500\u2510",
2319
- star: "\u2736",
2320
- play: "\u25BA",
2321
- nodejs: "\u2666",
2322
- oneSeventh: "1/7",
2323
- oneNinth: "1/9",
2324
- oneTenth: "1/10"
2325
- };
2326
- var mainSymbols = { ...common, ...specialMainSymbols };
2327
- var fallbackSymbols = {
2328
- ...common,
2329
- ...specialFallbackSymbols
2330
- };
2331
- var shouldUseMain = isUnicodeSupported();
2332
- var figures = shouldUseMain ? mainSymbols : fallbackSymbols;
2333
- var esm_default = figures;
2334
- var replacements = Object.entries(specialMainSymbols);
2335
-
2336
- // ../../node_modules/@inquirer/core/dist/esm/lib/theme.js
2337
- var defaultTheme = {
2338
- prefix: {
2339
- idle: colors.blue("?"),
2340
- // TODO: use figure
2341
- done: colors.green(esm_default.tick)
2342
- },
2343
- spinner: {
2344
- interval: 80,
2345
- frames: ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"].map((frame) => colors.yellow(frame))
2346
- },
2347
- style: {
2348
- answer: colors.cyan,
2349
- message: colors.bold,
2350
- error: (text) => colors.red(`> ${text}`),
2351
- defaultAnswer: (text) => colors.dim(`(${text})`),
2352
- help: colors.dim,
2353
- highlight: colors.cyan,
2354
- key: (text) => colors.cyan(colors.bold(`<${text}>`))
2355
- }
2356
- };
2357
-
2358
- // ../../node_modules/@inquirer/core/dist/esm/lib/utils.js
2359
- var import_cli_width = __toESM(require_cli_width(), 1);
2360
- var import_wrap_ansi = __toESM(require_wrap_ansi(), 1);
2361
-
2362
- // ../../node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
2363
- import MuteStream from "mute-stream";
2364
-
2365
- // ../../node_modules/@inquirer/core/node_modules/signal-exit/dist/mjs/signals.js
2366
- var signals = [];
2367
- signals.push("SIGHUP", "SIGINT", "SIGTERM");
2368
- if (process.platform !== "win32") {
2369
- signals.push(
2370
- "SIGALRM",
2371
- "SIGABRT",
2372
- "SIGVTALRM",
2373
- "SIGXCPU",
2374
- "SIGXFSZ",
2375
- "SIGUSR2",
2376
- "SIGTRAP",
2377
- "SIGSYS",
2378
- "SIGQUIT",
2379
- "SIGIOT"
2380
- // should detect profiler and enable/disable accordingly.
2381
- // see #21
2382
- // 'SIGPROF'
2383
- );
2384
- }
2385
- if (process.platform === "linux") {
2386
- signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
2387
- }
2388
-
2389
- // ../../node_modules/@inquirer/core/node_modules/signal-exit/dist/mjs/index.js
2390
- var processOk = (process4) => !!process4 && typeof process4 === "object" && typeof process4.removeListener === "function" && typeof process4.emit === "function" && typeof process4.reallyExit === "function" && typeof process4.listeners === "function" && typeof process4.kill === "function" && typeof process4.pid === "number" && typeof process4.on === "function";
2391
- var kExitEmitter = Symbol.for("signal-exit emitter");
2392
- var global = globalThis;
2393
- var ObjectDefineProperty = Object.defineProperty.bind(Object);
2394
- var Emitter = class {
2395
- emitted = {
2396
- afterExit: false,
2397
- exit: false
2398
- };
2399
- listeners = {
2400
- afterExit: [],
2401
- exit: []
2402
- };
2403
- count = 0;
2404
- id = Math.random();
2405
- constructor() {
2406
- if (global[kExitEmitter]) {
2407
- return global[kExitEmitter];
2408
- }
2409
- ObjectDefineProperty(global, kExitEmitter, {
2410
- value: this,
2411
- writable: false,
2412
- enumerable: false,
2413
- configurable: false
2414
- });
2415
- }
2416
- on(ev, fn) {
2417
- this.listeners[ev].push(fn);
2418
- }
2419
- removeListener(ev, fn) {
2420
- const list = this.listeners[ev];
2421
- const i = list.indexOf(fn);
2422
- if (i === -1) {
2423
- return;
2424
- }
2425
- if (i === 0 && list.length === 1) {
2426
- list.length = 0;
2427
- } else {
2428
- list.splice(i, 1);
2429
- }
2430
- }
2431
- emit(ev, code, signal) {
2432
- if (this.emitted[ev]) {
2433
- return false;
2434
- }
2435
- this.emitted[ev] = true;
2436
- let ret = false;
2437
- for (const fn of this.listeners[ev]) {
2438
- ret = fn(code, signal) === true || ret;
2439
- }
2440
- if (ev === "exit") {
2441
- ret = this.emit("afterExit", code, signal) || ret;
2442
- }
2443
- return ret;
2444
- }
2445
- };
2446
- var SignalExitBase = class {
2447
- };
2448
- var signalExitWrap = (handler) => {
2449
- return {
2450
- onExit(cb, opts) {
2451
- return handler.onExit(cb, opts);
2452
- },
2453
- load() {
2454
- return handler.load();
2455
- },
2456
- unload() {
2457
- return handler.unload();
2458
- }
2459
- };
2460
- };
2461
- var SignalExitFallback = class extends SignalExitBase {
2462
- onExit() {
2463
- return () => {
2464
- };
2465
- }
2466
- load() {
2467
- }
2468
- unload() {
2469
- }
2470
- };
2471
- var SignalExit = class extends SignalExitBase {
2472
- // "SIGHUP" throws an `ENOSYS` error on Windows,
2473
- // so use a supported signal instead
2474
- /* c8 ignore start */
2475
- #hupSig = process3.platform === "win32" ? "SIGINT" : "SIGHUP";
2476
- /* c8 ignore stop */
2477
- #emitter = new Emitter();
2478
- #process;
2479
- #originalProcessEmit;
2480
- #originalProcessReallyExit;
2481
- #sigListeners = {};
2482
- #loaded = false;
2483
- constructor(process4) {
2484
- super();
2485
- this.#process = process4;
2486
- this.#sigListeners = {};
2487
- for (const sig of signals) {
2488
- this.#sigListeners[sig] = () => {
2489
- const listeners = this.#process.listeners(sig);
2490
- let { count } = this.#emitter;
2491
- const p = process4;
2492
- if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") {
2493
- count += p.__signal_exit_emitter__.count;
2494
- }
2495
- if (listeners.length === count) {
2496
- this.unload();
2497
- const ret = this.#emitter.emit("exit", null, sig);
2498
- const s = sig === "SIGHUP" ? this.#hupSig : sig;
2499
- if (!ret)
2500
- process4.kill(process4.pid, s);
2501
- }
2502
- };
2503
- }
2504
- this.#originalProcessReallyExit = process4.reallyExit;
2505
- this.#originalProcessEmit = process4.emit;
2506
- }
2507
- onExit(cb, opts) {
2508
- if (!processOk(this.#process)) {
2509
- return () => {
2510
- };
2511
- }
2512
- if (this.#loaded === false) {
2513
- this.load();
2514
- }
2515
- const ev = opts?.alwaysLast ? "afterExit" : "exit";
2516
- this.#emitter.on(ev, cb);
2517
- return () => {
2518
- this.#emitter.removeListener(ev, cb);
2519
- if (this.#emitter.listeners["exit"].length === 0 && this.#emitter.listeners["afterExit"].length === 0) {
2520
- this.unload();
2521
- }
2522
- };
2523
- }
2524
- load() {
2525
- if (this.#loaded) {
2526
- return;
2527
- }
2528
- this.#loaded = true;
2529
- this.#emitter.count += 1;
2530
- for (const sig of signals) {
2531
- try {
2532
- const fn = this.#sigListeners[sig];
2533
- if (fn)
2534
- this.#process.on(sig, fn);
2535
- } catch (_) {
2536
- }
2537
- }
2538
- this.#process.emit = (ev, ...a) => {
2539
- return this.#processEmit(ev, ...a);
2540
- };
2541
- this.#process.reallyExit = (code) => {
2542
- return this.#processReallyExit(code);
2543
- };
2544
- }
2545
- unload() {
2546
- if (!this.#loaded) {
2547
- return;
2548
- }
2549
- this.#loaded = false;
2550
- signals.forEach((sig) => {
2551
- const listener = this.#sigListeners[sig];
2552
- if (!listener) {
2553
- throw new Error("Listener not defined for signal: " + sig);
2554
- }
2555
- try {
2556
- this.#process.removeListener(sig, listener);
2557
- } catch (_) {
2558
- }
2559
- });
2560
- this.#process.emit = this.#originalProcessEmit;
2561
- this.#process.reallyExit = this.#originalProcessReallyExit;
2562
- this.#emitter.count -= 1;
2563
- }
2564
- #processReallyExit(code) {
2565
- if (!processOk(this.#process)) {
2566
- return 0;
2567
- }
2568
- this.#process.exitCode = code || 0;
2569
- this.#emitter.emit("exit", this.#process.exitCode, null);
2570
- return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
2571
- }
2572
- #processEmit(ev, ...args) {
2573
- const og = this.#originalProcessEmit;
2574
- if (ev === "exit" && processOk(this.#process)) {
2575
- if (typeof args[0] === "number") {
2576
- this.#process.exitCode = args[0];
2577
- }
2578
- const ret = og.call(this.#process, ev, ...args);
2579
- this.#emitter.emit("exit", this.#process.exitCode, null);
2580
- return ret;
2581
- } else {
2582
- return og.call(this.#process, ev, ...args);
2583
- }
2584
- }
2585
- };
2586
- var process3 = globalThis.process;
2587
- var {
2588
- /**
2589
- * Called when the process is exiting, whether via signal, explicit
2590
- * exit, or running out of stuff to do.
2591
- *
2592
- * If the global process object is not suitable for instrumentation,
2593
- * then this will be a no-op.
2594
- *
2595
- * Returns a function that may be used to unload signal-exit.
2596
- */
2597
- onExit,
2598
- /**
2599
- * Load the listeners. Likely you never need to call this, unless
2600
- * doing a rather deep integration with signal-exit functionality.
2601
- * Mostly exposed for the benefit of testing.
2602
- *
2603
- * @internal
2604
- */
2605
- load,
2606
- /**
2607
- * Unload the listeners. Likely you never need to call this, unless
2608
- * doing a rather deep integration with signal-exit functionality.
2609
- * Mostly exposed for the benefit of testing.
2610
- *
2611
- * @internal
2612
- */
2613
- unload
2614
- } = signalExitWrap(processOk(process3) ? new SignalExit(process3) : new SignalExitFallback());
2615
-
2616
- // ../../node_modules/@inquirer/ansi/dist/esm/index.js
2617
- var ESC = "\x1B[";
2618
- var cursorLeft = ESC + "G";
2619
- var cursorHide = ESC + "?25l";
2620
- var cursorShow = ESC + "?25h";
2621
- var eraseLine = ESC + "2K";
2622
-
2623
- // ../../node_modules/@inquirer/core/dist/esm/lib/Separator.js
2624
- import colors2 from "yoctocolors-cjs";
2625
-
2626
638
  // src/lib/core/error.ts
2627
639
  import { bold, dim, redBright } from "colorette";
2628
640
  import { ApiError, extractApiErrorInfo } from "@playcademy/sdk/internal";
@@ -2733,7 +745,7 @@ function formatError(error, indent = 0) {
2733
745
  function customTransform(text) {
2734
746
  let result = text;
2735
747
  result = result.replace(/`([^`]+)`/g, (_, code) => greenBright(code));
2736
- result = result.replace(/<<([^>]+)>>/g, (_, url) => underline(url));
748
+ result = result.replace(/<<([^>]+)>>/g, (_, url) => blueBright(underline(url)));
2737
749
  result = result.replace(/<([^>]+)>/g, (_, path2) => blueBright(path2));
2738
750
  return result;
2739
751
  }
@@ -2798,14 +810,14 @@ var logger = {
2798
810
  info: { color: blue },
2799
811
  warning: { color: yellow }
2800
812
  };
2801
- const { color } = configs[type];
2802
- console.log(`${spaces}${color("\u250C\u2500")} ${bold2(color(title.toUpperCase()))}`);
813
+ const { color: color2 } = configs[type];
814
+ console.log(`${spaces}${color2("\u250C\u2500")} ${bold2(color2(title.toUpperCase()))}`);
2803
815
  if (lines && lines.length > 0) {
2804
816
  lines.forEach((line) => {
2805
- console.log(`${spaces}${color("\u2502")} ${customTransform(line)}`);
817
+ console.log(`${spaces}${color2("\u2502")} ${customTransform(line)}`);
2806
818
  });
2807
819
  }
2808
- console.log(`${spaces}${color("\u2514\u2500")}`);
820
+ console.log(`${spaces}${color2("\u2514\u2500")}`);
2809
821
  },
2810
822
  /**
2811
823
  * Dim message - less important information
@@ -3051,7 +1063,7 @@ function validateConfig(config) {
3051
1063
  throw new ConfigError(
3052
1064
  'Your config file is missing a "name" field',
3053
1065
  "name",
3054
- 'Add a name property to your config: name: "My Game Name"'
1066
+ 'Add a name property to your config: name: "My App Name"'
3055
1067
  );
3056
1068
  }
3057
1069
  if (cfg.integrations) {
@@ -3208,7 +1220,7 @@ function processConfigVariables(config) {
3208
1220
 
3209
1221
  // src/lib/dev/server.ts
3210
1222
  import { mkdir as mkdir2 } from "fs/promises";
3211
- import { join as join16 } from "path";
1223
+ import { join as join17 } from "path";
3212
1224
  import { Log, LogLevel, Miniflare } from "miniflare";
3213
1225
 
3214
1226
  // ../utils/src/port.ts
@@ -3301,9 +1313,51 @@ function getErrorMessage(error) {
3301
1313
  }
3302
1314
 
3303
1315
  // ../utils/src/ansi.ts
1316
+ var colors = {
1317
+ black: "\x1B[30m",
1318
+ red: "\x1B[31m",
1319
+ green: "\x1B[32m",
1320
+ yellow: "\x1B[33m",
1321
+ blue: "\x1B[34m",
1322
+ magenta: "\x1B[35m",
1323
+ cyan: "\x1B[36m",
1324
+ white: "\x1B[37m",
1325
+ gray: "\x1B[90m"
1326
+ };
1327
+ var styles = {
1328
+ reset: "\x1B[0m",
1329
+ bold: "\x1B[1m",
1330
+ dim: "\x1B[2m",
1331
+ italic: "\x1B[3m",
1332
+ underline: "\x1B[4m"
1333
+ };
1334
+ var cursor = {
1335
+ hide: "\x1B[?25l",
1336
+ show: "\x1B[?25h",
1337
+ up: (n) => `\x1B[${n}A`,
1338
+ down: (n) => `\x1B[${n}B`,
1339
+ forward: (n) => `\x1B[${n}C`,
1340
+ back: (n) => `\x1B[${n}D`,
1341
+ clearLine: "\x1B[K",
1342
+ clearScreen: "\x1B[2J",
1343
+ home: "\x1B[H"
1344
+ };
1345
+ function color(text, colorCode) {
1346
+ return `${colorCode}${text}${styles.reset}`;
1347
+ }
1348
+ function dim3(text) {
1349
+ return color(text, styles.dim);
1350
+ }
1351
+ function bold3(text) {
1352
+ return color(text, styles.bold);
1353
+ }
3304
1354
  var isInteractive = typeof process !== "undefined" && process.stdout?.isTTY && !process.env.CI && process.env.TERM !== "dumb";
1355
+ function stripAnsi(text) {
1356
+ return text.replace(/\x1B\[[0-9;]*[a-zA-Z]/g, "");
1357
+ }
3305
1358
 
3306
1359
  // ../utils/src/spinner.ts
1360
+ import { stdout } from "process";
3307
1361
  var SPINNER_FRAMES = [
3308
1362
  10251,
3309
1363
  10265,
@@ -3318,6 +1372,166 @@ var SPINNER_FRAMES = [
3318
1372
  ].map((code) => String.fromCodePoint(code));
3319
1373
  var CHECK_MARK = String.fromCodePoint(10004);
3320
1374
  var CROSS_MARK = String.fromCodePoint(10006);
1375
+ var SPINNER_INTERVAL = 80;
1376
+ var Spinner = class {
1377
+ tasks = /* @__PURE__ */ new Map();
1378
+ frameIndex = 0;
1379
+ intervalId = null;
1380
+ renderCount = 0;
1381
+ previousLineCount = 0;
1382
+ printedTasks = /* @__PURE__ */ new Set();
1383
+ indent;
1384
+ constructor(taskIds, texts, options) {
1385
+ this.indent = options?.indent ?? 0;
1386
+ taskIds.forEach((id, index) => {
1387
+ this.tasks.set(id, {
1388
+ text: texts[index] || "",
1389
+ status: "pending"
1390
+ });
1391
+ });
1392
+ }
1393
+ start() {
1394
+ if (isInteractive) {
1395
+ stdout.write(cursor.hide);
1396
+ this.render();
1397
+ this.intervalId = setInterval(() => {
1398
+ this.frameIndex = (this.frameIndex + 1) % SPINNER_FRAMES.length;
1399
+ this.render();
1400
+ }, SPINNER_INTERVAL);
1401
+ }
1402
+ }
1403
+ updateTask(taskId, status, finalText) {
1404
+ const task = this.tasks.get(taskId);
1405
+ if (task) {
1406
+ task.status = status;
1407
+ if (finalText) task.finalText = finalText;
1408
+ if (!isInteractive) {
1409
+ this.renderNonInteractive(taskId, task);
1410
+ }
1411
+ }
1412
+ }
1413
+ renderNonInteractive(taskId, task) {
1414
+ const key = `${taskId}-${task.status}`;
1415
+ if (this.printedTasks.has(key)) return;
1416
+ this.printedTasks.add(key);
1417
+ const indentStr = " ".repeat(this.indent);
1418
+ let line = "";
1419
+ switch (task.status) {
1420
+ case "running":
1421
+ line = `${indentStr}[RUNNING] ${stripAnsi(task.text)}`;
1422
+ break;
1423
+ case "success":
1424
+ line = `${indentStr}[SUCCESS] ${stripAnsi(task.finalText || task.text)}`;
1425
+ break;
1426
+ case "error":
1427
+ line = `${indentStr}[ERROR] Failed: ${stripAnsi(task.text)}`;
1428
+ break;
1429
+ }
1430
+ console.log(line);
1431
+ }
1432
+ render() {
1433
+ if (this.previousLineCount > 0) {
1434
+ stdout.write(cursor.up(this.previousLineCount));
1435
+ }
1436
+ const spinner = SPINNER_FRAMES[this.frameIndex];
1437
+ const indentStr = " ".repeat(this.indent);
1438
+ const visibleTasks = Array.from(this.tasks.values()).filter(
1439
+ (task) => task.status !== "pending"
1440
+ );
1441
+ for (const task of visibleTasks) {
1442
+ stdout.write(`\r${cursor.clearLine}`);
1443
+ let line = "";
1444
+ switch (task.status) {
1445
+ case "running":
1446
+ line = `${indentStr}${colors.blue}${spinner}${styles.reset} ${task.text}`;
1447
+ break;
1448
+ case "success":
1449
+ line = `${indentStr}${colors.green}${CHECK_MARK}${styles.reset} ${task.finalText || task.text}`;
1450
+ break;
1451
+ case "error":
1452
+ line = `${indentStr}${colors.red}${CROSS_MARK}${styles.reset} Failed: ${task.text}`;
1453
+ break;
1454
+ }
1455
+ console.log(line);
1456
+ }
1457
+ this.previousLineCount = visibleTasks.length;
1458
+ this.renderCount++;
1459
+ }
1460
+ stop() {
1461
+ if (this.intervalId) {
1462
+ clearInterval(this.intervalId);
1463
+ this.intervalId = null;
1464
+ }
1465
+ if (isInteractive) {
1466
+ this.render();
1467
+ stdout.write(cursor.show);
1468
+ } else {
1469
+ this.tasks.forEach((task, taskId) => {
1470
+ if (task.status !== "pending") {
1471
+ this.renderNonInteractive(taskId, task);
1472
+ }
1473
+ });
1474
+ }
1475
+ }
1476
+ };
1477
+
1478
+ // ../utils/src/log.ts
1479
+ function formatDuration(ms) {
1480
+ const duration = ms < 1e3 ? `${Math.round(ms)}ms` : `${(ms / 1e3).toFixed(2)}s`;
1481
+ return bold3(dim3(`[${duration}]`));
1482
+ }
1483
+ async function runStep(text, action, successText, options) {
1484
+ const effectiveAction = action ?? (async () => void 0);
1485
+ const hasAction = action !== void 0;
1486
+ const indent = options?.indent ?? 0;
1487
+ const spinner = new Spinner(["task"], [text], { indent });
1488
+ if (!options?.silent) {
1489
+ spinner.start();
1490
+ spinner.updateTask("task", "running");
1491
+ }
1492
+ const startTime = performance.now();
1493
+ try {
1494
+ const result = await effectiveAction();
1495
+ if (options?.silent) {
1496
+ return result;
1497
+ }
1498
+ const duration = performance.now() - startTime;
1499
+ let finalSuccessText;
1500
+ if (typeof successText === "function") {
1501
+ finalSuccessText = successText(result);
1502
+ } else {
1503
+ finalSuccessText = successText ?? text;
1504
+ }
1505
+ finalSuccessText = bold3(finalSuccessText);
1506
+ if (hasAction) {
1507
+ const durationText = formatDuration(duration);
1508
+ finalSuccessText = `${finalSuccessText} ${durationText}`;
1509
+ }
1510
+ spinner.updateTask("task", "success", finalSuccessText);
1511
+ spinner.stop();
1512
+ return result;
1513
+ } catch (error) {
1514
+ if (!options?.silent) {
1515
+ spinner.updateTask("task", "error");
1516
+ spinner.stop();
1517
+ }
1518
+ console.error("");
1519
+ if (error && typeof error === "object" && "exitCode" in error && typeof error.exitCode === "number") {
1520
+ console.error(` Exit Code: ${error.exitCode}`);
1521
+ const stdout2 = error.stdout?.toString().trim();
1522
+ const stderr = error.stderr?.toString().trim();
1523
+ const indent2 = (str) => str.split("\n").map((line) => ` ${line}`).join("\n");
1524
+ if (stdout2) console.error(` Stdout:
1525
+ ${indent2(stdout2)}`);
1526
+ if (stderr) console.error(` Stderr:
1527
+ ${indent2(stderr)}`);
1528
+ } else {
1529
+ console.error(` Error: ${error instanceof Error ? error.message : String(error)}`);
1530
+ }
1531
+ console.error("");
1532
+ throw error;
1533
+ }
1534
+ }
3321
1535
 
3322
1536
  // ../utils/src/string.ts
3323
1537
  function pluralize(count, singular, plural) {
@@ -3481,7 +1695,7 @@ var detectOutputFormat = () => {
3481
1695
  }
3482
1696
  return "json-single-line";
3483
1697
  };
3484
- var colors4 = {
1698
+ var colors2 = {
3485
1699
  reset: "\x1B[0m",
3486
1700
  dim: "\x1B[2m",
3487
1701
  red: "\x1B[31m",
@@ -3493,15 +1707,15 @@ var colors4 = {
3493
1707
  var getLevelColor = (level) => {
3494
1708
  switch (level) {
3495
1709
  case "debug":
3496
- return colors4.blue;
1710
+ return colors2.blue;
3497
1711
  case "info":
3498
- return colors4.cyan;
1712
+ return colors2.cyan;
3499
1713
  case "warn":
3500
- return colors4.yellow;
1714
+ return colors2.yellow;
3501
1715
  case "error":
3502
- return colors4.red;
1716
+ return colors2.red;
3503
1717
  default:
3504
- return colors4.reset;
1718
+ return colors2.reset;
3505
1719
  }
3506
1720
  };
3507
1721
  var formatBrowserOutput = (level, message, context2) => {
@@ -3519,7 +1733,7 @@ var formatColorTTY = (level, message, context2) => {
3519
1733
  const levelColor = getLevelColor(level);
3520
1734
  const levelUpper = level.toUpperCase().padEnd(5);
3521
1735
  const consoleMethod = getConsoleMethod(level);
3522
- const coloredPrefix = `${colors4.dim}[${timestamp}]${colors4.reset} ${levelColor}${levelUpper}${colors4.reset}`;
1736
+ const coloredPrefix = `${colors2.dim}[${timestamp}]${colors2.reset} ${levelColor}${levelUpper}${colors2.reset}`;
3523
1737
  if (context2 && Object.keys(context2).length > 0) {
3524
1738
  consoleMethod(`${coloredPrefix} ${message}`, context2);
3525
1739
  } else {
@@ -3994,7 +2208,7 @@ import { join as join12 } from "path";
3994
2208
  // package.json with { type: 'json' }
3995
2209
  var package_default2 = {
3996
2210
  name: "playcademy",
3997
- version: "0.14.27",
2211
+ version: "0.14.28",
3998
2212
  type: "module",
3999
2213
  exports: {
4000
2214
  ".": {
@@ -4002,6 +2216,11 @@ var package_default2 = {
4002
2216
  import: "./dist/index.js",
4003
2217
  require: "./dist/index.js"
4004
2218
  },
2219
+ "./cli": {
2220
+ types: "./dist/cli.d.ts",
2221
+ import: "./dist/cli.js",
2222
+ require: "./dist/cli.js"
2223
+ },
4005
2224
  "./db": {
4006
2225
  types: "./dist/db.d.ts",
4007
2226
  import: "./dist/db.js",
@@ -4046,8 +2265,10 @@ var package_default2 = {
4046
2265
  "drizzle-kit": "^0.31.5",
4047
2266
  "drizzle-orm": "^0.44.6",
4048
2267
  esbuild: "^0.25.10",
2268
+ giget: "^2.0.0",
4049
2269
  hono: "^4.9.9",
4050
2270
  "json-colorizer": "^3.0.1",
2271
+ jszip: "^3.10.1",
4051
2272
  miniflare: "^4.20251008.0",
4052
2273
  open: "^10.2.0"
4053
2274
  },
@@ -4359,6 +2580,163 @@ var rootGitignoreTemplate = loadTemplateString("gitignore");
4359
2580
  init_file_loader();
4360
2581
  var viteConfigTemplate = loadTemplateString("config/vite-config.ts");
4361
2582
 
2583
+ // src/lib/init/engine/fetch.ts
2584
+ import { downloadTemplate } from "giget";
2585
+
2586
+ // src/lib/init/engine/prompts.ts
2587
+ import { select as select2 } from "@inquirer/prompts";
2588
+ import { cyan as cyan4, magenta as magenta2, yellow as yellow3 } from "colorette";
2589
+
2590
+ // src/lib/init/engine/registry.ts
2591
+ import { blue as blue2, cyan as cyan3, green as green2, magenta, red as red2, yellow as yellow2 } from "colorette";
2592
+
2593
+ // src/lib/init/engine/hooks.ts
2594
+ import { existsSync as existsSync11, mkdirSync as mkdirSync3, writeFileSync as writeFileSync6 } from "fs";
2595
+ import { rename, rm } from "fs/promises";
2596
+ import { dirname as dirname5, join as join16 } from "path";
2597
+ import JSZip from "jszip";
2598
+ var godotAfterFetch = async ({ destDir }) => {
2599
+ const addonsDir = join16(destDir, "addons");
2600
+ const targetDir = join16(addonsDir, "playcademy");
2601
+ let zipData;
2602
+ await runStep(
2603
+ "Downloading Playcademy Addon for Godot",
2604
+ async () => {
2605
+ const response = await fetch(GODOT_ADDON_URL);
2606
+ if (!response.ok) {
2607
+ throw new Error(
2608
+ `Failed to download addon: ${response.status} ${response.statusText}`
2609
+ );
2610
+ }
2611
+ zipData = await response.arrayBuffer();
2612
+ },
2613
+ "Playcademy Addon downloaded",
2614
+ { silent: true }
2615
+ );
2616
+ await runStep(
2617
+ "Extracting Playcademy Addon",
2618
+ async () => {
2619
+ const zip = await JSZip.loadAsync(zipData);
2620
+ if (!existsSync11(addonsDir)) {
2621
+ mkdirSync3(addonsDir, { recursive: true });
2622
+ }
2623
+ const extractPromises = [];
2624
+ zip.forEach((relativePath, file) => {
2625
+ if (file.dir) return;
2626
+ const extractPath = join16(destDir, relativePath);
2627
+ extractPromises.push(
2628
+ file.async("nodebuffer").then((content) => {
2629
+ const dir = dirname5(extractPath);
2630
+ if (!existsSync11(dir)) {
2631
+ mkdirSync3(dir, { recursive: true });
2632
+ }
2633
+ writeFileSync6(extractPath, content);
2634
+ })
2635
+ );
2636
+ });
2637
+ await Promise.all(extractPromises);
2638
+ const extractedRoot = join16(destDir, "playcademy", "addons", "playcademy");
2639
+ if (existsSync11(extractedRoot)) {
2640
+ if (existsSync11(targetDir)) {
2641
+ await rm(targetDir, { recursive: true, force: true });
2642
+ }
2643
+ await rename(extractedRoot, targetDir);
2644
+ const extractedParent = join16(destDir, "playcademy");
2645
+ await rm(extractedParent, { recursive: true, force: true });
2646
+ }
2647
+ },
2648
+ "Playcademy Addon extracted",
2649
+ { silent: true }
2650
+ );
2651
+ };
2652
+
2653
+ // src/lib/init/engine/registry.ts
2654
+ var viteFrameworks = [
2655
+ {
2656
+ id: "vanilla",
2657
+ display: "Vanilla",
2658
+ color: yellow2,
2659
+ templates: [
2660
+ {
2661
+ id: "vanilla-ts",
2662
+ display: "TypeScript",
2663
+ color: blue2,
2664
+ description: "Vanilla TypeScript starter",
2665
+ source: { location: `${TEMPLATE_REPOS.VITE}/template-vanilla-ts` }
2666
+ }
2667
+ ]
2668
+ },
2669
+ {
2670
+ id: "react",
2671
+ display: "React",
2672
+ color: cyan3,
2673
+ templates: [
2674
+ {
2675
+ id: "react-ts",
2676
+ display: "TypeScript",
2677
+ color: blue2,
2678
+ description: "React with TypeScript",
2679
+ source: { location: `${TEMPLATE_REPOS.VITE}/template-react-ts` }
2680
+ }
2681
+ ]
2682
+ },
2683
+ {
2684
+ id: "vue",
2685
+ display: "Vue",
2686
+ color: green2,
2687
+ templates: [
2688
+ {
2689
+ id: "vue-ts",
2690
+ display: "TypeScript",
2691
+ color: blue2,
2692
+ description: "Vue 3 with TypeScript",
2693
+ source: { location: `${TEMPLATE_REPOS.VITE}/template-vue-ts` }
2694
+ }
2695
+ ]
2696
+ },
2697
+ {
2698
+ id: "svelte",
2699
+ display: "Svelte",
2700
+ color: red2,
2701
+ templates: [
2702
+ {
2703
+ id: "svelte-ts",
2704
+ display: "TypeScript",
2705
+ color: blue2,
2706
+ description: "Svelte with TypeScript",
2707
+ source: { location: `${TEMPLATE_REPOS.VITE}/template-svelte-ts` }
2708
+ }
2709
+ ]
2710
+ }
2711
+ ];
2712
+ var godotFrameworks = [
2713
+ {
2714
+ id: "godot",
2715
+ display: "Godot 4",
2716
+ color: magenta,
2717
+ templates: [
2718
+ {
2719
+ id: "godot-4",
2720
+ display: "Godot 4 with Playcademy SDK",
2721
+ color: magenta,
2722
+ description: "Godot 4 with Playcademy addon",
2723
+ source: { location: `${TEMPLATE_REPOS.SUPERBUILDERS}/godot-template` },
2724
+ afterFetch: godotAfterFetch
2725
+ }
2726
+ ]
2727
+ }
2728
+ ];
2729
+
2730
+ // src/lib/deploy/godot.ts
2731
+ import { confirm as confirm2, select as select3 } from "@inquirer/prompts";
2732
+
2733
+ // src/lib/init/project.ts
2734
+ import { confirm as confirm3, input as input2, select as select4 } from "@inquirer/prompts";
2735
+
2736
+ // src/lib/init/run.ts
2737
+ import { confirm as confirm4 } from "@inquirer/prompts";
2738
+ init_file_loader();
2739
+
4362
2740
  // src/lib/dev/server.ts
4363
2741
  var FilteredLog = class extends Log {
4364
2742
  customLogger;
@@ -4443,7 +2821,7 @@ async function startDevServer(options) {
4443
2821
  return { server: mf, port };
4444
2822
  }
4445
2823
  async function ensureDatabaseDirectory() {
4446
- const dbDir = join16(getWorkspace(), CLI_DIRECTORIES.DATABASE);
2824
+ const dbDir = join17(getWorkspace(), CLI_DIRECTORIES.DATABASE);
4447
2825
  try {
4448
2826
  await mkdir2(dbDir, { recursive: true });
4449
2827
  } catch (error) {
@@ -4452,7 +2830,7 @@ async function ensureDatabaseDirectory() {
4452
2830
  return dbDir;
4453
2831
  }
4454
2832
  async function ensureKvDirectory() {
4455
- const kvDir = join16(getWorkspace(), CLI_DIRECTORIES.KV);
2833
+ const kvDir = join17(getWorkspace(), CLI_DIRECTORIES.KV);
4456
2834
  try {
4457
2835
  await mkdir2(kvDir, { recursive: true });
4458
2836
  } catch (error) {
@@ -4461,7 +2839,7 @@ async function ensureKvDirectory() {
4461
2839
  return kvDir;
4462
2840
  }
4463
2841
  async function ensureBucketDirectory() {
4464
- const bucketDir = join16(getWorkspace(), CLI_DIRECTORIES.BUCKET);
2842
+ const bucketDir = join17(getWorkspace(), CLI_DIRECTORIES.BUCKET);
4465
2843
  try {
4466
2844
  await mkdir2(bucketDir, { recursive: true });
4467
2845
  } catch (error) {
@@ -4484,9 +2862,9 @@ async function writeBackendServerInfo(port) {
4484
2862
  }
4485
2863
 
4486
2864
  // src/lib/dev/reload.ts
4487
- import { join as join17, relative as relative2 } from "path";
2865
+ import { join as join18, relative as relative2 } from "path";
4488
2866
  import chokidar from "chokidar";
4489
- import { bold as bold5, cyan as cyan3, dim as dim4, green as green2 } from "colorette";
2867
+ import { bold as bold5, cyan as cyan5, dim as dim4, green as green3 } from "colorette";
4490
2868
  function formatTime() {
4491
2869
  const now = /* @__PURE__ */ new Date();
4492
2870
  let hours = now.getHours();
@@ -4501,9 +2879,9 @@ function startHotReload(onReload, options = {}) {
4501
2879
  const customRoutesConfig = options.config?.integrations?.customRoutes;
4502
2880
  const customRoutesDir = typeof customRoutesConfig === "object" && customRoutesConfig.directory || DEFAULT_API_ROUTES_DIRECTORY;
4503
2881
  const watchPaths = [
4504
- join17(workspace, customRoutesDir),
4505
- join17(workspace, "playcademy.config.js"),
4506
- join17(workspace, "playcademy.config.json")
2882
+ join18(workspace, customRoutesDir),
2883
+ join18(workspace, "playcademy.config.js"),
2884
+ join18(workspace, "playcademy.config.json")
4507
2885
  ];
4508
2886
  const watcher = chokidar.watch(watchPaths, {
4509
2887
  persistent: true,
@@ -4517,8 +2895,8 @@ function startHotReload(onReload, options = {}) {
4517
2895
  if (changedPath) {
4518
2896
  const relativePath = relative2(workspace, changedPath);
4519
2897
  const timestamp = dim4(formatTime());
4520
- const brand = bold5(cyan3("[playcademy]"));
4521
- const event = eventType === "changed" ? green2("reload") : green2(eventType || "reload");
2898
+ const brand = bold5(cyan5("[playcademy]"));
2899
+ const event = eventType === "changed" ? green3("reload") : green3(eventType || "reload");
4522
2900
  console.log(`${timestamp} ${brand} ${event} ${dim4(relativePath)}`);
4523
2901
  } else {
4524
2902
  logger.success("Reloaded");