@base44-preview/cli 0.0.45-pr.357.604c676 → 0.0.45-pr.357.cc72b12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli/index.js CHANGED
@@ -3188,9 +3188,9 @@ var require_fs = __commonJS((exports) => {
3188
3188
  var require_path = __commonJS((exports) => {
3189
3189
  Object.defineProperty(exports, "__esModule", { value: true });
3190
3190
  exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = undefined;
3191
- var os = __require("os");
3191
+ var os2 = __require("os");
3192
3192
  var path8 = __require("path");
3193
- var IS_WINDOWS_PLATFORM = os.platform() === "win32";
3193
+ var IS_WINDOWS_PLATFORM = os2.platform() === "win32";
3194
3194
  var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
3195
3195
  var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;
3196
3196
  var WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g;
@@ -8243,8 +8243,8 @@ var require_settings4 = __commonJS((exports) => {
8243
8243
  Object.defineProperty(exports, "__esModule", { value: true });
8244
8244
  exports.DEFAULT_FILE_SYSTEM_ADAPTER = undefined;
8245
8245
  var fs11 = __require("fs");
8246
- var os = __require("os");
8247
- var CPU_COUNT = Math.max(os.cpus().length, 1);
8246
+ var os2 = __require("os");
8247
+ var CPU_COUNT = Math.max(os2.cpus().length, 1);
8248
8248
  exports.DEFAULT_FILE_SYSTEM_ADAPTER = {
8249
8249
  lstat: fs11.lstat,
8250
8250
  lstatSync: fs11.lstatSync,
@@ -12363,403 +12363,11 @@ var require_front_matter = __commonJS((exports, module) => {
12363
12363
  }
12364
12364
  });
12365
12365
 
12366
- // ../../node_modules/dotenv/package.json
12367
- var require_package2 = __commonJS((exports, module) => {
12368
- module.exports = {
12369
- name: "dotenv",
12370
- version: "17.3.1",
12371
- description: "Loads environment variables from .env file",
12372
- main: "lib/main.js",
12373
- types: "lib/main.d.ts",
12374
- exports: {
12375
- ".": {
12376
- types: "./lib/main.d.ts",
12377
- require: "./lib/main.js",
12378
- default: "./lib/main.js"
12379
- },
12380
- "./config": "./config.js",
12381
- "./config.js": "./config.js",
12382
- "./lib/env-options": "./lib/env-options.js",
12383
- "./lib/env-options.js": "./lib/env-options.js",
12384
- "./lib/cli-options": "./lib/cli-options.js",
12385
- "./lib/cli-options.js": "./lib/cli-options.js",
12386
- "./package.json": "./package.json"
12387
- },
12388
- scripts: {
12389
- "dts-check": "tsc --project tests/types/tsconfig.json",
12390
- lint: "standard",
12391
- pretest: "npm run lint && npm run dts-check",
12392
- test: "tap run tests/**/*.js --allow-empty-coverage --disable-coverage --timeout=60000",
12393
- "test:coverage": "tap run tests/**/*.js --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov",
12394
- prerelease: "npm test",
12395
- release: "standard-version"
12396
- },
12397
- repository: {
12398
- type: "git",
12399
- url: "git://github.com/motdotla/dotenv.git"
12400
- },
12401
- homepage: "https://github.com/motdotla/dotenv#readme",
12402
- funding: "https://dotenvx.com",
12403
- keywords: [
12404
- "dotenv",
12405
- "env",
12406
- ".env",
12407
- "environment",
12408
- "variables",
12409
- "config",
12410
- "settings"
12411
- ],
12412
- readmeFilename: "README.md",
12413
- license: "BSD-2-Clause",
12414
- devDependencies: {
12415
- "@types/node": "^18.11.3",
12416
- decache: "^4.6.2",
12417
- sinon: "^14.0.1",
12418
- standard: "^17.0.0",
12419
- "standard-version": "^9.5.0",
12420
- tap: "^19.2.0",
12421
- typescript: "^4.8.4"
12422
- },
12423
- engines: {
12424
- node: ">=12"
12425
- },
12426
- browser: {
12427
- fs: false
12428
- }
12429
- };
12430
- });
12431
-
12432
- // ../../node_modules/dotenv/lib/main.js
12433
- var require_main = __commonJS((exports, module) => {
12434
- var fs14 = __require("fs");
12435
- var path11 = __require("path");
12436
- var os = __require("os");
12437
- var crypto = __require("crypto");
12438
- var packageJson = require_package2();
12439
- var version2 = packageJson.version;
12440
- var TIPS = [
12441
- "\uD83D\uDD10 encrypt with Dotenvx: https://dotenvx.com",
12442
- "\uD83D\uDD10 prevent committing .env to code: https://dotenvx.com/precommit",
12443
- "\uD83D\uDD10 prevent building .env in docker: https://dotenvx.com/prebuild",
12444
- "\uD83E\uDD16 agentic secret storage: https://dotenvx.com/as2",
12445
- "⚡️ secrets for agents: https://dotenvx.com/as2",
12446
- "\uD83D\uDEE1️ auth for agents: https://vestauth.com",
12447
- "\uD83D\uDEE0️ run anywhere with `dotenvx run -- yourcommand`",
12448
- "⚙️ specify custom .env file path with { path: '/custom/path/.env' }",
12449
- "⚙️ enable debug logging with { debug: true }",
12450
- "⚙️ override existing env vars with { override: true }",
12451
- "⚙️ suppress all logs with { quiet: true }",
12452
- "⚙️ write to custom object with { processEnv: myObject }",
12453
- "⚙️ load multiple .env files with { path: ['.env.local', '.env'] }"
12454
- ];
12455
- function _getRandomTip() {
12456
- return TIPS[Math.floor(Math.random() * TIPS.length)];
12457
- }
12458
- function parseBoolean(value) {
12459
- if (typeof value === "string") {
12460
- return !["false", "0", "no", "off", ""].includes(value.toLowerCase());
12461
- }
12462
- return Boolean(value);
12463
- }
12464
- function supportsAnsi() {
12465
- return process.stdout.isTTY;
12466
- }
12467
- function dim(text) {
12468
- return supportsAnsi() ? `\x1B[2m${text}\x1B[0m` : text;
12469
- }
12470
- var LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;
12471
- function parse9(src) {
12472
- const obj = {};
12473
- let lines = src.toString();
12474
- lines = lines.replace(/\r\n?/mg, `
12475
- `);
12476
- let match;
12477
- while ((match = LINE.exec(lines)) != null) {
12478
- const key = match[1];
12479
- let value = match[2] || "";
12480
- value = value.trim();
12481
- const maybeQuote = value[0];
12482
- value = value.replace(/^(['"`])([\s\S]*)\1$/mg, "$2");
12483
- if (maybeQuote === '"') {
12484
- value = value.replace(/\\n/g, `
12485
- `);
12486
- value = value.replace(/\\r/g, "\r");
12487
- }
12488
- obj[key] = value;
12489
- }
12490
- return obj;
12491
- }
12492
- function _parseVault(options) {
12493
- options = options || {};
12494
- const vaultPath = _vaultPath(options);
12495
- options.path = vaultPath;
12496
- const result = DotenvModule.configDotenv(options);
12497
- if (!result.parsed) {
12498
- const err = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`);
12499
- err.code = "MISSING_DATA";
12500
- throw err;
12501
- }
12502
- const keys = _dotenvKey(options).split(",");
12503
- const length = keys.length;
12504
- let decrypted;
12505
- for (let i = 0;i < length; i++) {
12506
- try {
12507
- const key = keys[i].trim();
12508
- const attrs = _instructions(result, key);
12509
- decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key);
12510
- break;
12511
- } catch (error48) {
12512
- if (i + 1 >= length) {
12513
- throw error48;
12514
- }
12515
- }
12516
- }
12517
- return DotenvModule.parse(decrypted);
12518
- }
12519
- function _warn(message) {
12520
- console.error(`[dotenv@${version2}][WARN] ${message}`);
12521
- }
12522
- function _debug(message) {
12523
- console.log(`[dotenv@${version2}][DEBUG] ${message}`);
12524
- }
12525
- function _log(message) {
12526
- console.log(`[dotenv@${version2}] ${message}`);
12527
- }
12528
- function _dotenvKey(options) {
12529
- if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) {
12530
- return options.DOTENV_KEY;
12531
- }
12532
- if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) {
12533
- return process.env.DOTENV_KEY;
12534
- }
12535
- return "";
12536
- }
12537
- function _instructions(result, dotenvKey) {
12538
- let uri;
12539
- try {
12540
- uri = new URL(dotenvKey);
12541
- } catch (error48) {
12542
- if (error48.code === "ERR_INVALID_URL") {
12543
- const err = new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");
12544
- err.code = "INVALID_DOTENV_KEY";
12545
- throw err;
12546
- }
12547
- throw error48;
12548
- }
12549
- const key = uri.password;
12550
- if (!key) {
12551
- const err = new Error("INVALID_DOTENV_KEY: Missing key part");
12552
- err.code = "INVALID_DOTENV_KEY";
12553
- throw err;
12554
- }
12555
- const environment = uri.searchParams.get("environment");
12556
- if (!environment) {
12557
- const err = new Error("INVALID_DOTENV_KEY: Missing environment part");
12558
- err.code = "INVALID_DOTENV_KEY";
12559
- throw err;
12560
- }
12561
- const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`;
12562
- const ciphertext = result.parsed[environmentKey];
12563
- if (!ciphertext) {
12564
- const err = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`);
12565
- err.code = "NOT_FOUND_DOTENV_ENVIRONMENT";
12566
- throw err;
12567
- }
12568
- return { ciphertext, key };
12569
- }
12570
- function _vaultPath(options) {
12571
- let possibleVaultPath = null;
12572
- if (options && options.path && options.path.length > 0) {
12573
- if (Array.isArray(options.path)) {
12574
- for (const filepath of options.path) {
12575
- if (fs14.existsSync(filepath)) {
12576
- possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
12577
- }
12578
- }
12579
- } else {
12580
- possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
12581
- }
12582
- } else {
12583
- possibleVaultPath = path11.resolve(process.cwd(), ".env.vault");
12584
- }
12585
- if (fs14.existsSync(possibleVaultPath)) {
12586
- return possibleVaultPath;
12587
- }
12588
- return null;
12589
- }
12590
- function _resolveHome(envPath) {
12591
- return envPath[0] === "~" ? path11.join(os.homedir(), envPath.slice(1)) : envPath;
12592
- }
12593
- function _configVault(options) {
12594
- const debug = parseBoolean(process.env.DOTENV_CONFIG_DEBUG || options && options.debug);
12595
- const quiet = parseBoolean(process.env.DOTENV_CONFIG_QUIET || options && options.quiet);
12596
- if (debug || !quiet) {
12597
- _log("Loading env from encrypted .env.vault");
12598
- }
12599
- const parsed = DotenvModule._parseVault(options);
12600
- let processEnv = process.env;
12601
- if (options && options.processEnv != null) {
12602
- processEnv = options.processEnv;
12603
- }
12604
- DotenvModule.populate(processEnv, parsed, options);
12605
- return { parsed };
12606
- }
12607
- function configDotenv(options) {
12608
- const dotenvPath = path11.resolve(process.cwd(), ".env");
12609
- let encoding = "utf8";
12610
- let processEnv = process.env;
12611
- if (options && options.processEnv != null) {
12612
- processEnv = options.processEnv;
12613
- }
12614
- let debug = parseBoolean(processEnv.DOTENV_CONFIG_DEBUG || options && options.debug);
12615
- let quiet = parseBoolean(processEnv.DOTENV_CONFIG_QUIET || options && options.quiet);
12616
- if (options && options.encoding) {
12617
- encoding = options.encoding;
12618
- } else {
12619
- if (debug) {
12620
- _debug("No encoding is specified. UTF-8 is used by default");
12621
- }
12622
- }
12623
- let optionPaths = [dotenvPath];
12624
- if (options && options.path) {
12625
- if (!Array.isArray(options.path)) {
12626
- optionPaths = [_resolveHome(options.path)];
12627
- } else {
12628
- optionPaths = [];
12629
- for (const filepath of options.path) {
12630
- optionPaths.push(_resolveHome(filepath));
12631
- }
12632
- }
12633
- }
12634
- let lastError;
12635
- const parsedAll = {};
12636
- for (const path12 of optionPaths) {
12637
- try {
12638
- const parsed = DotenvModule.parse(fs14.readFileSync(path12, { encoding }));
12639
- DotenvModule.populate(parsedAll, parsed, options);
12640
- } catch (e2) {
12641
- if (debug) {
12642
- _debug(`Failed to load ${path12} ${e2.message}`);
12643
- }
12644
- lastError = e2;
12645
- }
12646
- }
12647
- const populated = DotenvModule.populate(processEnv, parsedAll, options);
12648
- debug = parseBoolean(processEnv.DOTENV_CONFIG_DEBUG || debug);
12649
- quiet = parseBoolean(processEnv.DOTENV_CONFIG_QUIET || quiet);
12650
- if (debug || !quiet) {
12651
- const keysCount = Object.keys(populated).length;
12652
- const shortPaths = [];
12653
- for (const filePath of optionPaths) {
12654
- try {
12655
- const relative3 = path11.relative(process.cwd(), filePath);
12656
- shortPaths.push(relative3);
12657
- } catch (e2) {
12658
- if (debug) {
12659
- _debug(`Failed to load ${filePath} ${e2.message}`);
12660
- }
12661
- lastError = e2;
12662
- }
12663
- }
12664
- _log(`injecting env (${keysCount}) from ${shortPaths.join(",")} ${dim(`-- tip: ${_getRandomTip()}`)}`);
12665
- }
12666
- if (lastError) {
12667
- return { parsed: parsedAll, error: lastError };
12668
- } else {
12669
- return { parsed: parsedAll };
12670
- }
12671
- }
12672
- function config9(options) {
12673
- if (_dotenvKey(options).length === 0) {
12674
- return DotenvModule.configDotenv(options);
12675
- }
12676
- const vaultPath = _vaultPath(options);
12677
- if (!vaultPath) {
12678
- _warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`);
12679
- return DotenvModule.configDotenv(options);
12680
- }
12681
- return DotenvModule._configVault(options);
12682
- }
12683
- function decrypt(encrypted, keyStr) {
12684
- const key = Buffer.from(keyStr.slice(-64), "hex");
12685
- let ciphertext = Buffer.from(encrypted, "base64");
12686
- const nonce = ciphertext.subarray(0, 12);
12687
- const authTag = ciphertext.subarray(-16);
12688
- ciphertext = ciphertext.subarray(12, -16);
12689
- try {
12690
- const aesgcm = crypto.createDecipheriv("aes-256-gcm", key, nonce);
12691
- aesgcm.setAuthTag(authTag);
12692
- return `${aesgcm.update(ciphertext)}${aesgcm.final()}`;
12693
- } catch (error48) {
12694
- const isRange = error48 instanceof RangeError;
12695
- const invalidKeyLength = error48.message === "Invalid key length";
12696
- const decryptionFailed = error48.message === "Unsupported state or unable to authenticate data";
12697
- if (isRange || invalidKeyLength) {
12698
- const err = new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");
12699
- err.code = "INVALID_DOTENV_KEY";
12700
- throw err;
12701
- } else if (decryptionFailed) {
12702
- const err = new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");
12703
- err.code = "DECRYPTION_FAILED";
12704
- throw err;
12705
- } else {
12706
- throw error48;
12707
- }
12708
- }
12709
- }
12710
- function populate(processEnv, parsed, options = {}) {
12711
- const debug = Boolean(options && options.debug);
12712
- const override = Boolean(options && options.override);
12713
- const populated = {};
12714
- if (typeof parsed !== "object") {
12715
- const err = new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");
12716
- err.code = "OBJECT_REQUIRED";
12717
- throw err;
12718
- }
12719
- for (const key of Object.keys(parsed)) {
12720
- if (Object.prototype.hasOwnProperty.call(processEnv, key)) {
12721
- if (override === true) {
12722
- processEnv[key] = parsed[key];
12723
- populated[key] = parsed[key];
12724
- }
12725
- if (debug) {
12726
- if (override === true) {
12727
- _debug(`"${key}" is already defined and WAS overwritten`);
12728
- } else {
12729
- _debug(`"${key}" is already defined and was NOT overwritten`);
12730
- }
12731
- }
12732
- } else {
12733
- processEnv[key] = parsed[key];
12734
- populated[key] = parsed[key];
12735
- }
12736
- }
12737
- return populated;
12738
- }
12739
- var DotenvModule = {
12740
- configDotenv,
12741
- _configVault,
12742
- _parseVault,
12743
- config: config9,
12744
- decrypt,
12745
- parse: parse9,
12746
- populate
12747
- };
12748
- exports.configDotenv = DotenvModule.configDotenv;
12749
- exports._configVault = DotenvModule._configVault;
12750
- exports._parseVault = DotenvModule._parseVault;
12751
- exports.config = DotenvModule.config;
12752
- exports.decrypt = DotenvModule.decrypt;
12753
- exports.parse = DotenvModule.parse;
12754
- exports.populate = DotenvModule.populate;
12755
- module.exports = DotenvModule;
12756
- });
12757
-
12758
12366
  // ../../node_modules/isexe/windows.js
12759
12367
  var require_windows = __commonJS((exports, module) => {
12760
12368
  module.exports = isexe;
12761
12369
  isexe.sync = sync;
12762
- var fs15 = __require("fs");
12370
+ var fs14 = __require("fs");
12763
12371
  function checkPathExt(path11, options) {
12764
12372
  var pathext = options.pathExt !== undefined ? options.pathExt : process.env.PATHEXT;
12765
12373
  if (!pathext) {
@@ -12784,12 +12392,12 @@ var require_windows = __commonJS((exports, module) => {
12784
12392
  return checkPathExt(path11, options);
12785
12393
  }
12786
12394
  function isexe(path11, options, cb) {
12787
- fs15.stat(path11, function(er, stat) {
12395
+ fs14.stat(path11, function(er, stat) {
12788
12396
  cb(er, er ? false : checkStat(stat, path11, options));
12789
12397
  });
12790
12398
  }
12791
12399
  function sync(path11, options) {
12792
- return checkStat(fs15.statSync(path11), path11, options);
12400
+ return checkStat(fs14.statSync(path11), path11, options);
12793
12401
  }
12794
12402
  });
12795
12403
 
@@ -12797,14 +12405,14 @@ var require_windows = __commonJS((exports, module) => {
12797
12405
  var require_mode = __commonJS((exports, module) => {
12798
12406
  module.exports = isexe;
12799
12407
  isexe.sync = sync;
12800
- var fs15 = __require("fs");
12408
+ var fs14 = __require("fs");
12801
12409
  function isexe(path11, options, cb) {
12802
- fs15.stat(path11, function(er, stat) {
12410
+ fs14.stat(path11, function(er, stat) {
12803
12411
  cb(er, er ? false : checkStat(stat, options));
12804
12412
  });
12805
12413
  }
12806
12414
  function sync(path11, options) {
12807
- return checkStat(fs15.statSync(path11), options);
12415
+ return checkStat(fs14.statSync(path11), options);
12808
12416
  }
12809
12417
  function checkStat(stat, options) {
12810
12418
  return stat.isFile() && checkMode(stat, options);
@@ -12826,7 +12434,7 @@ var require_mode = __commonJS((exports, module) => {
12826
12434
 
12827
12435
  // ../../node_modules/isexe/index.js
12828
12436
  var require_isexe = __commonJS((exports, module) => {
12829
- var fs15 = __require("fs");
12437
+ var fs14 = __require("fs");
12830
12438
  var core2;
12831
12439
  if (process.platform === "win32" || global.TESTING_WINDOWS) {
12832
12440
  core2 = require_windows();
@@ -12988,7 +12596,7 @@ var require_resolveCommand = __commonJS((exports, module) => {
12988
12596
  var which = require_which();
12989
12597
  var getPathKey = require_path_key();
12990
12598
  function resolveCommandAttempt(parsed, withoutPathExt) {
12991
- const env3 = parsed.options.env || process.env;
12599
+ const env2 = parsed.options.env || process.env;
12992
12600
  const cwd = process.cwd();
12993
12601
  const hasCustomCwd = parsed.options.cwd != null;
12994
12602
  const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled;
@@ -13000,7 +12608,7 @@ var require_resolveCommand = __commonJS((exports, module) => {
13000
12608
  let resolved;
13001
12609
  try {
13002
12610
  resolved = which.sync(parsed.command, {
13003
- path: env3[getPathKey({ env: env3 })],
12611
+ path: env2[getPathKey({ env: env2 })],
13004
12612
  pathExt: withoutPathExt ? path11.delimiter : undefined
13005
12613
  });
13006
12614
  } catch (e2) {} finally {
@@ -13065,16 +12673,16 @@ var require_shebang_command = __commonJS((exports, module) => {
13065
12673
 
13066
12674
  // ../../node_modules/cross-spawn/lib/util/readShebang.js
13067
12675
  var require_readShebang = __commonJS((exports, module) => {
13068
- var fs15 = __require("fs");
12676
+ var fs14 = __require("fs");
13069
12677
  var shebangCommand = require_shebang_command();
13070
12678
  function readShebang(command) {
13071
12679
  const size = 150;
13072
12680
  const buffer = Buffer.alloc(size);
13073
12681
  let fd;
13074
12682
  try {
13075
- fd = fs15.openSync(command, "r");
13076
- fs15.readSync(fd, buffer, 0, size, 0);
13077
- fs15.closeSync(fd);
12683
+ fd = fs14.openSync(command, "r");
12684
+ fs14.readSync(fd, buffer, 0, size, 0);
12685
+ fs14.closeSync(fd);
13078
12686
  } catch (e2) {}
13079
12687
  return shebangCommand(buffer.toString());
13080
12688
  }
@@ -13118,7 +12726,7 @@ var require_parse4 = __commonJS((exports, module) => {
13118
12726
  }
13119
12727
  return parsed;
13120
12728
  }
13121
- function parse10(command, args, options) {
12729
+ function parse9(command, args, options) {
13122
12730
  if (args && !Array.isArray(args)) {
13123
12731
  options = args;
13124
12732
  args = null;
@@ -13137,7 +12745,7 @@ var require_parse4 = __commonJS((exports, module) => {
13137
12745
  };
13138
12746
  return options.shell ? parsed : parseNonShell(parsed);
13139
12747
  }
13140
- module.exports = parse10;
12748
+ module.exports = parse9;
13141
12749
  });
13142
12750
 
13143
12751
  // ../../node_modules/cross-spawn/lib/enoent.js
@@ -13190,16 +12798,16 @@ var require_enoent = __commonJS((exports, module) => {
13190
12798
  // ../../node_modules/cross-spawn/index.js
13191
12799
  var require_cross_spawn = __commonJS((exports, module) => {
13192
12800
  var cp = __require("child_process");
13193
- var parse10 = require_parse4();
12801
+ var parse9 = require_parse4();
13194
12802
  var enoent = require_enoent();
13195
12803
  function spawn(command, args, options) {
13196
- const parsed = parse10(command, args, options);
12804
+ const parsed = parse9(command, args, options);
13197
12805
  const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
13198
12806
  enoent.hookChildProcess(spawned, parsed);
13199
12807
  return spawned;
13200
12808
  }
13201
12809
  function spawnSync(command, args, options) {
13202
- const parsed = parse10(command, args, options);
12810
+ const parsed = parse9(command, args, options);
13203
12811
  const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
13204
12812
  result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
13205
12813
  return result;
@@ -13207,7 +12815,7 @@ var require_cross_spawn = __commonJS((exports, module) => {
13207
12815
  module.exports = spawn;
13208
12816
  module.exports.spawn = spawn;
13209
12817
  module.exports.sync = spawnSync;
13210
- module.exports._parse = parse10;
12818
+ module.exports._parse = parse9;
13211
12819
  module.exports._enoent = enoent;
13212
12820
  });
13213
12821
 
@@ -19346,7 +18954,7 @@ var require_createNode = __commonJS((exports) => {
19346
18954
  if (value instanceof String || value instanceof Number || value instanceof Boolean || typeof BigInt !== "undefined" && value instanceof BigInt) {
19347
18955
  value = value.valueOf();
19348
18956
  }
19349
- const { aliasDuplicateObjects, onAnchor, onTagObj, schema: schema9, sourceObjects } = ctx;
18957
+ const { aliasDuplicateObjects, onAnchor, onTagObj, schema: schema8, sourceObjects } = ctx;
19350
18958
  let ref = undefined;
19351
18959
  if (aliasDuplicateObjects && value && typeof value === "object") {
19352
18960
  ref = sourceObjects.get(value);
@@ -19360,7 +18968,7 @@ var require_createNode = __commonJS((exports) => {
19360
18968
  }
19361
18969
  if (tagName?.startsWith("!!"))
19362
18970
  tagName = defaultTagPrefix + tagName.slice(2);
19363
- let tagObj = findTagObject(value, tagName, schema9.tags);
18971
+ let tagObj = findTagObject(value, tagName, schema8.tags);
19364
18972
  if (!tagObj) {
19365
18973
  if (value && typeof value.toJSON === "function") {
19366
18974
  value = value.toJSON();
@@ -19371,7 +18979,7 @@ var require_createNode = __commonJS((exports) => {
19371
18979
  ref.node = node2;
19372
18980
  return node2;
19373
18981
  }
19374
- tagObj = value instanceof Map ? schema9[identity3.MAP] : (Symbol.iterator in Object(value)) ? schema9[identity3.SEQ] : schema9[identity3.MAP];
18982
+ tagObj = value instanceof Map ? schema8[identity3.MAP] : (Symbol.iterator in Object(value)) ? schema8[identity3.SEQ] : schema8[identity3.MAP];
19375
18983
  }
19376
18984
  if (onTagObj) {
19377
18985
  onTagObj(tagObj);
@@ -19394,7 +19002,7 @@ var require_Collection = __commonJS((exports) => {
19394
19002
  var createNode = require_createNode();
19395
19003
  var identity3 = require_identity();
19396
19004
  var Node2 = require_Node();
19397
- function collectionFromPath(schema9, path16, value) {
19005
+ function collectionFromPath(schema8, path16, value) {
19398
19006
  let v = value;
19399
19007
  for (let i2 = path16.length - 1;i2 >= 0; --i2) {
19400
19008
  const k2 = path16[i2];
@@ -19412,27 +19020,27 @@ var require_Collection = __commonJS((exports) => {
19412
19020
  onAnchor: () => {
19413
19021
  throw new Error("This should not happen, please report a bug.");
19414
19022
  },
19415
- schema: schema9,
19023
+ schema: schema8,
19416
19024
  sourceObjects: new Map
19417
19025
  });
19418
19026
  }
19419
19027
  var isEmptyPath = (path16) => path16 == null || typeof path16 === "object" && !!path16[Symbol.iterator]().next().done;
19420
19028
 
19421
19029
  class Collection extends Node2.NodeBase {
19422
- constructor(type, schema9) {
19030
+ constructor(type, schema8) {
19423
19031
  super(type);
19424
19032
  Object.defineProperty(this, "schema", {
19425
- value: schema9,
19033
+ value: schema8,
19426
19034
  configurable: true,
19427
19035
  enumerable: false,
19428
19036
  writable: true
19429
19037
  });
19430
19038
  }
19431
- clone(schema9) {
19039
+ clone(schema8) {
19432
19040
  const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
19433
- if (schema9)
19434
- copy.schema = schema9;
19435
- copy.items = copy.items.map((it3) => identity3.isNode(it3) || identity3.isPair(it3) ? it3.clone(schema9) : it3);
19041
+ if (schema8)
19042
+ copy.schema = schema8;
19043
+ copy.items = copy.items.map((it3) => identity3.isNode(it3) || identity3.isPair(it3) ? it3.clone(schema8) : it3);
19436
19044
  if (this.range)
19437
19045
  copy.range = this.range.slice();
19438
19046
  return copy;
@@ -20364,12 +19972,12 @@ var require_Pair = __commonJS((exports) => {
20364
19972
  this.key = key;
20365
19973
  this.value = value;
20366
19974
  }
20367
- clone(schema9) {
19975
+ clone(schema8) {
20368
19976
  let { key, value } = this;
20369
19977
  if (identity3.isNode(key))
20370
- key = key.clone(schema9);
19978
+ key = key.clone(schema8);
20371
19979
  if (identity3.isNode(value))
20372
- value = value.clone(schema9);
19980
+ value = value.clone(schema8);
20373
19981
  return new Pair(key, value);
20374
19982
  }
20375
19983
  toJSON(_2, ctx) {
@@ -20554,13 +20162,13 @@ var require_YAMLMap = __commonJS((exports) => {
20554
20162
  static get tagName() {
20555
20163
  return "tag:yaml.org,2002:map";
20556
20164
  }
20557
- constructor(schema9) {
20558
- super(identity3.MAP, schema9);
20165
+ constructor(schema8) {
20166
+ super(identity3.MAP, schema8);
20559
20167
  this.items = [];
20560
20168
  }
20561
- static from(schema9, obj, ctx) {
20169
+ static from(schema8, obj, ctx) {
20562
20170
  const { keepUndefined, replacer } = ctx;
20563
- const map2 = new this(schema9);
20171
+ const map2 = new this(schema8);
20564
20172
  const add = (key, value) => {
20565
20173
  if (typeof replacer === "function")
20566
20174
  value = replacer.call(obj, key, value);
@@ -20576,8 +20184,8 @@ var require_YAMLMap = __commonJS((exports) => {
20576
20184
  for (const key of Object.keys(obj))
20577
20185
  add(key, obj[key]);
20578
20186
  }
20579
- if (typeof schema9.sortMapEntries === "function") {
20580
- map2.items.sort(schema9.sortMapEntries);
20187
+ if (typeof schema8.sortMapEntries === "function") {
20188
+ map2.items.sort(schema8.sortMapEntries);
20581
20189
  }
20582
20190
  return map2;
20583
20191
  }
@@ -20670,7 +20278,7 @@ var require_map2 = __commonJS((exports) => {
20670
20278
  onError("Expected a mapping for this tag");
20671
20279
  return map3;
20672
20280
  },
20673
- createNode: (schema9, obj, ctx) => YAMLMap.YAMLMap.from(schema9, obj, ctx)
20281
+ createNode: (schema8, obj, ctx) => YAMLMap.YAMLMap.from(schema8, obj, ctx)
20674
20282
  };
20675
20283
  exports.map = map2;
20676
20284
  });
@@ -20688,8 +20296,8 @@ var require_YAMLSeq = __commonJS((exports) => {
20688
20296
  static get tagName() {
20689
20297
  return "tag:yaml.org,2002:seq";
20690
20298
  }
20691
- constructor(schema9) {
20692
- super(identity3.SEQ, schema9);
20299
+ constructor(schema8) {
20300
+ super(identity3.SEQ, schema8);
20693
20301
  this.items = [];
20694
20302
  }
20695
20303
  add(value) {
@@ -20743,9 +20351,9 @@ var require_YAMLSeq = __commonJS((exports) => {
20743
20351
  onComment
20744
20352
  });
20745
20353
  }
20746
- static from(schema9, obj, ctx) {
20354
+ static from(schema8, obj, ctx) {
20747
20355
  const { replacer } = ctx;
20748
- const seq = new this(schema9);
20356
+ const seq = new this(schema8);
20749
20357
  if (obj && Symbol.iterator in Object(obj)) {
20750
20358
  let i2 = 0;
20751
20359
  for (let it3 of obj) {
@@ -20782,7 +20390,7 @@ var require_seq2 = __commonJS((exports) => {
20782
20390
  onError("Expected a sequence for this tag");
20783
20391
  return seq2;
20784
20392
  },
20785
- createNode: (schema9, obj, ctx) => YAMLSeq.YAMLSeq.from(schema9, obj, ctx)
20393
+ createNode: (schema8, obj, ctx) => YAMLSeq.YAMLSeq.from(schema8, obj, ctx)
20786
20394
  };
20787
20395
  exports.seq = seq;
20788
20396
  });
@@ -20957,7 +20565,7 @@ var require_schema2 = __commonJS((exports) => {
20957
20565
  var bool = require_bool2();
20958
20566
  var float = require_float2();
20959
20567
  var int2 = require_int2();
20960
- var schema9 = [
20568
+ var schema8 = [
20961
20569
  map2.map,
20962
20570
  seq.seq,
20963
20571
  string4.string,
@@ -20970,7 +20578,7 @@ var require_schema2 = __commonJS((exports) => {
20970
20578
  float.floatExp,
20971
20579
  float.float
20972
20580
  ];
20973
- exports.schema = schema9;
20581
+ exports.schema = schema8;
20974
20582
  });
20975
20583
 
20976
20584
  // ../../node_modules/yaml/dist/schema/json/schema.js
@@ -21033,8 +20641,8 @@ var require_schema3 = __commonJS((exports) => {
21033
20641
  return str;
21034
20642
  }
21035
20643
  };
21036
- var schema9 = [map2.map, seq.seq].concat(jsonScalars, jsonError);
21037
- exports.schema = schema9;
20644
+ var schema8 = [map2.map, seq.seq].concat(jsonScalars, jsonError);
20645
+ exports.schema = schema8;
21038
20646
  });
21039
20647
 
21040
20648
  // ../../node_modules/yaml/dist/schema/yaml-1.1/binary.js
@@ -21124,9 +20732,9 @@ ${cn.comment}` : item.comment;
21124
20732
  onError("Expected a sequence for this tag");
21125
20733
  return seq;
21126
20734
  }
21127
- function createPairs(schema9, iterable, ctx) {
20735
+ function createPairs(schema8, iterable, ctx) {
21128
20736
  const { replacer } = ctx;
21129
- const pairs2 = new YAMLSeq.YAMLSeq(schema9);
20737
+ const pairs2 = new YAMLSeq.YAMLSeq(schema8);
21130
20738
  pairs2.tag = "tag:yaml.org,2002:pairs";
21131
20739
  let i2 = 0;
21132
20740
  if (iterable && Symbol.iterator in Object(iterable))
@@ -21205,8 +20813,8 @@ var require_omap2 = __commonJS((exports) => {
21205
20813
  }
21206
20814
  return map2;
21207
20815
  }
21208
- static from(schema9, iterable, ctx) {
21209
- const pairs$1 = pairs.createPairs(schema9, iterable, ctx);
20816
+ static from(schema8, iterable, ctx) {
20817
+ const pairs$1 = pairs.createPairs(schema8, iterable, ctx);
21210
20818
  const omap2 = new this;
21211
20819
  omap2.items = pairs$1.items;
21212
20820
  return omap2;
@@ -21233,7 +20841,7 @@ var require_omap2 = __commonJS((exports) => {
21233
20841
  }
21234
20842
  return Object.assign(new YAMLOMap, pairs$1);
21235
20843
  },
21236
- createNode: (schema9, iterable, ctx) => YAMLOMap.from(schema9, iterable, ctx)
20844
+ createNode: (schema8, iterable, ctx) => YAMLOMap.from(schema8, iterable, ctx)
21237
20845
  };
21238
20846
  exports.YAMLOMap = YAMLOMap;
21239
20847
  exports.omap = omap;
@@ -21397,8 +21005,8 @@ var require_set2 = __commonJS((exports) => {
21397
21005
  var YAMLMap = require_YAMLMap();
21398
21006
 
21399
21007
  class YAMLSet extends YAMLMap.YAMLMap {
21400
- constructor(schema9) {
21401
- super(schema9);
21008
+ constructor(schema8) {
21009
+ super(schema8);
21402
21010
  this.tag = YAMLSet.tag;
21403
21011
  }
21404
21012
  add(key) {
@@ -21438,9 +21046,9 @@ var require_set2 = __commonJS((exports) => {
21438
21046
  else
21439
21047
  throw new Error("Set items must all have null values");
21440
21048
  }
21441
- static from(schema9, iterable, ctx) {
21049
+ static from(schema8, iterable, ctx) {
21442
21050
  const { replacer } = ctx;
21443
- const set3 = new this(schema9);
21051
+ const set3 = new this(schema8);
21444
21052
  if (iterable && Symbol.iterator in Object(iterable))
21445
21053
  for (let value of iterable) {
21446
21054
  if (typeof replacer === "function")
@@ -21457,7 +21065,7 @@ var require_set2 = __commonJS((exports) => {
21457
21065
  nodeClass: YAMLSet,
21458
21066
  default: false,
21459
21067
  tag: "tag:yaml.org,2002:set",
21460
- createNode: (schema9, iterable, ctx) => YAMLSet.from(schema9, iterable, ctx),
21068
+ createNode: (schema8, iterable, ctx) => YAMLSet.from(schema8, iterable, ctx),
21461
21069
  resolve(map2, onError) {
21462
21070
  if (identity3.isMap(map2)) {
21463
21071
  if (map2.hasAllNullValues(true))
@@ -21570,7 +21178,7 @@ var require_schema4 = __commonJS((exports) => {
21570
21178
  var pairs = require_pairs2();
21571
21179
  var set2 = require_set2();
21572
21180
  var timestamp = require_timestamp2();
21573
- var schema9 = [
21181
+ var schema8 = [
21574
21182
  map2.map,
21575
21183
  seq.seq,
21576
21184
  string4.string,
@@ -21593,7 +21201,7 @@ var require_schema4 = __commonJS((exports) => {
21593
21201
  timestamp.floatTime,
21594
21202
  timestamp.timestamp
21595
21203
  ];
21596
- exports.schema = schema9;
21204
+ exports.schema = schema8;
21597
21205
  });
21598
21206
 
21599
21207
  // ../../node_modules/yaml/dist/schema/tags.js
@@ -21605,7 +21213,7 @@ var require_tags = __commonJS((exports) => {
21605
21213
  var bool = require_bool2();
21606
21214
  var float = require_float2();
21607
21215
  var int2 = require_int2();
21608
- var schema9 = require_schema2();
21216
+ var schema8 = require_schema2();
21609
21217
  var schema$1 = require_schema3();
21610
21218
  var binary = require_binary2();
21611
21219
  var merge3 = require_merge3();
@@ -21615,7 +21223,7 @@ var require_tags = __commonJS((exports) => {
21615
21223
  var set2 = require_set2();
21616
21224
  var timestamp = require_timestamp2();
21617
21225
  var schemas3 = new Map([
21618
- ["core", schema9.schema],
21226
+ ["core", schema8.schema],
21619
21227
  ["failsafe", [map2.map, seq.seq, string4.string]],
21620
21228
  ["json", schema$1.schema],
21621
21229
  ["yaml11", schema$2.schema],
@@ -21697,9 +21305,9 @@ var require_Schema = __commonJS((exports) => {
21697
21305
  var sortMapEntriesByKey = (a2, b) => a2.key < b.key ? -1 : a2.key > b.key ? 1 : 0;
21698
21306
 
21699
21307
  class Schema {
21700
- constructor({ compat: compat2, customTags, merge: merge3, resolveKnownTags, schema: schema9, sortMapEntries, toStringDefaults }) {
21308
+ constructor({ compat: compat2, customTags, merge: merge3, resolveKnownTags, schema: schema8, sortMapEntries, toStringDefaults }) {
21701
21309
  this.compat = Array.isArray(compat2) ? tags.getTags(compat2, "compat") : compat2 ? tags.getTags(null, compat2) : null;
21702
- this.name = typeof schema9 === "string" && schema9 || "core";
21310
+ this.name = typeof schema8 === "string" && schema8 || "core";
21703
21311
  this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};
21704
21312
  this.tags = tags.getTags(customTags, this.name, merge3);
21705
21313
  this.toStringOptions = toStringDefaults ?? null;
@@ -23191,11 +22799,11 @@ var require_compose_scalar = __commonJS((exports) => {
23191
22799
  scalar.comment = comment;
23192
22800
  return scalar;
23193
22801
  }
23194
- function findScalarTagByName(schema9, value, tagName, tagToken, onError) {
22802
+ function findScalarTagByName(schema8, value, tagName, tagToken, onError) {
23195
22803
  if (tagName === "!")
23196
- return schema9[identity3.SCALAR];
22804
+ return schema8[identity3.SCALAR];
23197
22805
  const matchWithTest = [];
23198
- for (const tag of schema9.tags) {
22806
+ for (const tag of schema8.tags) {
23199
22807
  if (!tag.collection && tag.tag === tagName) {
23200
22808
  if (tag.default && tag.test)
23201
22809
  matchWithTest.push(tag);
@@ -23206,18 +22814,18 @@ var require_compose_scalar = __commonJS((exports) => {
23206
22814
  for (const tag of matchWithTest)
23207
22815
  if (tag.test?.test(value))
23208
22816
  return tag;
23209
- const kt3 = schema9.knownTags[tagName];
22817
+ const kt3 = schema8.knownTags[tagName];
23210
22818
  if (kt3 && !kt3.collection) {
23211
- schema9.tags.push(Object.assign({}, kt3, { default: false, test: undefined }));
22819
+ schema8.tags.push(Object.assign({}, kt3, { default: false, test: undefined }));
23212
22820
  return kt3;
23213
22821
  }
23214
22822
  onError(tagToken, "TAG_RESOLVE_FAILED", `Unresolved tag: ${tagName}`, tagName !== "tag:yaml.org,2002:str");
23215
- return schema9[identity3.SCALAR];
22823
+ return schema8[identity3.SCALAR];
23216
22824
  }
23217
- function findScalarTagByTest({ atKey, directives, schema: schema9 }, value, token, onError) {
23218
- const tag = schema9.tags.find((tag2) => (tag2.default === true || atKey && tag2.default === "key") && tag2.test?.test(value)) || schema9[identity3.SCALAR];
23219
- if (schema9.compat) {
23220
- const compat2 = schema9.compat.find((tag2) => tag2.default && tag2.test?.test(value)) ?? schema9[identity3.SCALAR];
22825
+ function findScalarTagByTest({ atKey, directives, schema: schema8 }, value, token, onError) {
22826
+ const tag = schema8.tags.find((tag2) => (tag2.default === true || atKey && tag2.default === "key") && tag2.test?.test(value)) || schema8[identity3.SCALAR];
22827
+ if (schema8.compat) {
22828
+ const compat2 = schema8.compat.find((tag2) => tag2.default && tag2.test?.test(value)) ?? schema8[identity3.SCALAR];
23221
22829
  if (tag.tag !== compat2.tag) {
23222
22830
  const ts = directives.tagString(tag.tag);
23223
22831
  const cs = directives.tagString(compat2.tag);
@@ -23400,7 +23008,7 @@ var require_composer = __commonJS((exports) => {
23400
23008
  var node_process = __require("process");
23401
23009
  var directives = require_directives();
23402
23010
  var Document = require_Document();
23403
- var errors4 = require_errors();
23011
+ var errors3 = require_errors();
23404
23012
  var identity3 = require_identity();
23405
23013
  var composeDoc = require_compose_doc();
23406
23014
  var resolveEnd = require_resolve_end();
@@ -23451,9 +23059,9 @@ var require_composer = __commonJS((exports) => {
23451
23059
  this.onError = (source, code2, message, warning) => {
23452
23060
  const pos2 = getErrorPos(source);
23453
23061
  if (warning)
23454
- this.warnings.push(new errors4.YAMLWarning(pos2, code2, message));
23062
+ this.warnings.push(new errors3.YAMLWarning(pos2, code2, message));
23455
23063
  else
23456
- this.errors.push(new errors4.YAMLParseError(pos2, code2, message));
23064
+ this.errors.push(new errors3.YAMLParseError(pos2, code2, message));
23457
23065
  };
23458
23066
  this.directives = new directives.Directives({ version: options.version || "1.2" });
23459
23067
  this.options = options;
@@ -23537,7 +23145,7 @@ ${cb}` : comment;
23537
23145
  break;
23538
23146
  case "error": {
23539
23147
  const msg = token.source ? `${token.message}: ${JSON.stringify(token.source)}` : token.message;
23540
- const error48 = new errors4.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg);
23148
+ const error48 = new errors3.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg);
23541
23149
  if (this.atDirectives || !this.doc)
23542
23150
  this.errors.push(error48);
23543
23151
  else
@@ -23547,7 +23155,7 @@ ${cb}` : comment;
23547
23155
  case "doc-end": {
23548
23156
  if (!this.doc) {
23549
23157
  const msg = "Unexpected doc-end without preceding document";
23550
- this.errors.push(new errors4.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg));
23158
+ this.errors.push(new errors3.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg));
23551
23159
  break;
23552
23160
  }
23553
23161
  this.doc.directives.docEnd = true;
@@ -23562,7 +23170,7 @@ ${end.comment}` : end.comment;
23562
23170
  break;
23563
23171
  }
23564
23172
  default:
23565
- this.errors.push(new errors4.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", `Unsupported token ${token.type}`));
23173
+ this.errors.push(new errors3.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", `Unsupported token ${token.type}`));
23566
23174
  }
23567
23175
  }
23568
23176
  *end(forceDoc = false, endOffset = -1) {
@@ -23588,7 +23196,7 @@ ${end.comment}` : end.comment;
23588
23196
  var require_cst_scalar = __commonJS((exports) => {
23589
23197
  var resolveBlockScalar = require_resolve_block_scalar();
23590
23198
  var resolveFlowScalar = require_resolve_flow_scalar();
23591
- var errors4 = require_errors();
23199
+ var errors3 = require_errors();
23592
23200
  var stringifyString = require_stringifyString();
23593
23201
  function resolveAsScalar(token, strict = true, onError) {
23594
23202
  if (token) {
@@ -23597,7 +23205,7 @@ var require_cst_scalar = __commonJS((exports) => {
23597
23205
  if (onError)
23598
23206
  onError(offset, code2, message);
23599
23207
  else
23600
- throw new errors4.YAMLParseError([offset, offset + 1], code2, message);
23208
+ throw new errors3.YAMLParseError([offset, offset + 1], code2, message);
23601
23209
  };
23602
23210
  switch (token.type) {
23603
23211
  case "scalar":
@@ -25155,14 +24763,14 @@ var require_parser = __commonJS((exports) => {
25155
24763
  case "scalar":
25156
24764
  case "single-quoted-scalar":
25157
24765
  case "double-quoted-scalar": {
25158
- const fs15 = this.flowScalar(this.type);
24766
+ const fs14 = this.flowScalar(this.type);
25159
24767
  if (atNextItem || it3.value) {
25160
- map2.items.push({ start, key: fs15, sep: [] });
24768
+ map2.items.push({ start, key: fs14, sep: [] });
25161
24769
  this.onKeyLine = true;
25162
24770
  } else if (it3.sep) {
25163
- this.stack.push(fs15);
24771
+ this.stack.push(fs14);
25164
24772
  } else {
25165
- Object.assign(it3, { key: fs15, sep: [] });
24773
+ Object.assign(it3, { key: fs14, sep: [] });
25166
24774
  this.onKeyLine = true;
25167
24775
  }
25168
24776
  return;
@@ -25290,13 +24898,13 @@ var require_parser = __commonJS((exports) => {
25290
24898
  case "scalar":
25291
24899
  case "single-quoted-scalar":
25292
24900
  case "double-quoted-scalar": {
25293
- const fs15 = this.flowScalar(this.type);
24901
+ const fs14 = this.flowScalar(this.type);
25294
24902
  if (!it3 || it3.value)
25295
- fc.items.push({ start: [], key: fs15, sep: [] });
24903
+ fc.items.push({ start: [], key: fs14, sep: [] });
25296
24904
  else if (it3.sep)
25297
- this.stack.push(fs15);
24905
+ this.stack.push(fs14);
25298
24906
  else
25299
- Object.assign(it3, { key: fs15, sep: [] });
24907
+ Object.assign(it3, { key: fs14, sep: [] });
25300
24908
  return;
25301
24909
  }
25302
24910
  case "flow-map-end":
@@ -25459,7 +25067,7 @@ var require_parser = __commonJS((exports) => {
25459
25067
  var require_public_api = __commonJS((exports) => {
25460
25068
  var composer = require_composer();
25461
25069
  var Document = require_Document();
25462
- var errors4 = require_errors();
25070
+ var errors3 = require_errors();
25463
25071
  var log = require_log();
25464
25072
  var identity3 = require_identity();
25465
25073
  var lineCounter = require_line_counter();
@@ -25476,8 +25084,8 @@ var require_public_api = __commonJS((exports) => {
25476
25084
  const docs = Array.from(composer$1.compose(parser$1.parse(source)));
25477
25085
  if (prettyErrors && lineCounter2)
25478
25086
  for (const doc2 of docs) {
25479
- doc2.errors.forEach(errors4.prettifyError(source, lineCounter2));
25480
- doc2.warnings.forEach(errors4.prettifyError(source, lineCounter2));
25087
+ doc2.errors.forEach(errors3.prettifyError(source, lineCounter2));
25088
+ doc2.warnings.forEach(errors3.prettifyError(source, lineCounter2));
25481
25089
  }
25482
25090
  if (docs.length > 0)
25483
25091
  return docs;
@@ -25492,17 +25100,17 @@ var require_public_api = __commonJS((exports) => {
25492
25100
  if (!doc2)
25493
25101
  doc2 = _doc;
25494
25102
  else if (doc2.options.logLevel !== "silent") {
25495
- doc2.errors.push(new errors4.YAMLParseError(_doc.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
25103
+ doc2.errors.push(new errors3.YAMLParseError(_doc.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
25496
25104
  break;
25497
25105
  }
25498
25106
  }
25499
25107
  if (prettyErrors && lineCounter2) {
25500
- doc2.errors.forEach(errors4.prettifyError(source, lineCounter2));
25501
- doc2.warnings.forEach(errors4.prettifyError(source, lineCounter2));
25108
+ doc2.errors.forEach(errors3.prettifyError(source, lineCounter2));
25109
+ doc2.warnings.forEach(errors3.prettifyError(source, lineCounter2));
25502
25110
  }
25503
25111
  return doc2;
25504
25112
  }
25505
- function parse10(src, reviver, options) {
25113
+ function parse9(src, reviver, options) {
25506
25114
  let _reviver = undefined;
25507
25115
  if (typeof reviver === "function") {
25508
25116
  _reviver = reviver;
@@ -25543,12 +25151,404 @@ var require_public_api = __commonJS((exports) => {
25543
25151
  return value.toString(options);
25544
25152
  return new Document.Document(value, _replacer, options).toString(options);
25545
25153
  }
25546
- exports.parse = parse10;
25154
+ exports.parse = parse9;
25547
25155
  exports.parseAllDocuments = parseAllDocuments;
25548
25156
  exports.parseDocument = parseDocument;
25549
25157
  exports.stringify = stringify;
25550
25158
  });
25551
25159
 
25160
+ // ../../node_modules/dotenv/package.json
25161
+ var require_package2 = __commonJS((exports, module) => {
25162
+ module.exports = {
25163
+ name: "dotenv",
25164
+ version: "17.3.1",
25165
+ description: "Loads environment variables from .env file",
25166
+ main: "lib/main.js",
25167
+ types: "lib/main.d.ts",
25168
+ exports: {
25169
+ ".": {
25170
+ types: "./lib/main.d.ts",
25171
+ require: "./lib/main.js",
25172
+ default: "./lib/main.js"
25173
+ },
25174
+ "./config": "./config.js",
25175
+ "./config.js": "./config.js",
25176
+ "./lib/env-options": "./lib/env-options.js",
25177
+ "./lib/env-options.js": "./lib/env-options.js",
25178
+ "./lib/cli-options": "./lib/cli-options.js",
25179
+ "./lib/cli-options.js": "./lib/cli-options.js",
25180
+ "./package.json": "./package.json"
25181
+ },
25182
+ scripts: {
25183
+ "dts-check": "tsc --project tests/types/tsconfig.json",
25184
+ lint: "standard",
25185
+ pretest: "npm run lint && npm run dts-check",
25186
+ test: "tap run tests/**/*.js --allow-empty-coverage --disable-coverage --timeout=60000",
25187
+ "test:coverage": "tap run tests/**/*.js --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov",
25188
+ prerelease: "npm test",
25189
+ release: "standard-version"
25190
+ },
25191
+ repository: {
25192
+ type: "git",
25193
+ url: "git://github.com/motdotla/dotenv.git"
25194
+ },
25195
+ homepage: "https://github.com/motdotla/dotenv#readme",
25196
+ funding: "https://dotenvx.com",
25197
+ keywords: [
25198
+ "dotenv",
25199
+ "env",
25200
+ ".env",
25201
+ "environment",
25202
+ "variables",
25203
+ "config",
25204
+ "settings"
25205
+ ],
25206
+ readmeFilename: "README.md",
25207
+ license: "BSD-2-Clause",
25208
+ devDependencies: {
25209
+ "@types/node": "^18.11.3",
25210
+ decache: "^4.6.2",
25211
+ sinon: "^14.0.1",
25212
+ standard: "^17.0.0",
25213
+ "standard-version": "^9.5.0",
25214
+ tap: "^19.2.0",
25215
+ typescript: "^4.8.4"
25216
+ },
25217
+ engines: {
25218
+ node: ">=12"
25219
+ },
25220
+ browser: {
25221
+ fs: false
25222
+ }
25223
+ };
25224
+ });
25225
+
25226
+ // ../../node_modules/dotenv/lib/main.js
25227
+ var require_main = __commonJS((exports, module) => {
25228
+ var fs14 = __require("fs");
25229
+ var path16 = __require("path");
25230
+ var os2 = __require("os");
25231
+ var crypto = __require("crypto");
25232
+ var packageJson = require_package2();
25233
+ var version2 = packageJson.version;
25234
+ var TIPS = [
25235
+ "\uD83D\uDD10 encrypt with Dotenvx: https://dotenvx.com",
25236
+ "\uD83D\uDD10 prevent committing .env to code: https://dotenvx.com/precommit",
25237
+ "\uD83D\uDD10 prevent building .env in docker: https://dotenvx.com/prebuild",
25238
+ "\uD83E\uDD16 agentic secret storage: https://dotenvx.com/as2",
25239
+ "⚡️ secrets for agents: https://dotenvx.com/as2",
25240
+ "\uD83D\uDEE1️ auth for agents: https://vestauth.com",
25241
+ "\uD83D\uDEE0️ run anywhere with `dotenvx run -- yourcommand`",
25242
+ "⚙️ specify custom .env file path with { path: '/custom/path/.env' }",
25243
+ "⚙️ enable debug logging with { debug: true }",
25244
+ "⚙️ override existing env vars with { override: true }",
25245
+ "⚙️ suppress all logs with { quiet: true }",
25246
+ "⚙️ write to custom object with { processEnv: myObject }",
25247
+ "⚙️ load multiple .env files with { path: ['.env.local', '.env'] }"
25248
+ ];
25249
+ function _getRandomTip() {
25250
+ return TIPS[Math.floor(Math.random() * TIPS.length)];
25251
+ }
25252
+ function parseBoolean(value) {
25253
+ if (typeof value === "string") {
25254
+ return !["false", "0", "no", "off", ""].includes(value.toLowerCase());
25255
+ }
25256
+ return Boolean(value);
25257
+ }
25258
+ function supportsAnsi() {
25259
+ return process.stdout.isTTY;
25260
+ }
25261
+ function dim2(text) {
25262
+ return supportsAnsi() ? `\x1B[2m${text}\x1B[0m` : text;
25263
+ }
25264
+ var LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;
25265
+ function parse9(src) {
25266
+ const obj = {};
25267
+ let lines = src.toString();
25268
+ lines = lines.replace(/\r\n?/mg, `
25269
+ `);
25270
+ let match;
25271
+ while ((match = LINE.exec(lines)) != null) {
25272
+ const key = match[1];
25273
+ let value = match[2] || "";
25274
+ value = value.trim();
25275
+ const maybeQuote = value[0];
25276
+ value = value.replace(/^(['"`])([\s\S]*)\1$/mg, "$2");
25277
+ if (maybeQuote === '"') {
25278
+ value = value.replace(/\\n/g, `
25279
+ `);
25280
+ value = value.replace(/\\r/g, "\r");
25281
+ }
25282
+ obj[key] = value;
25283
+ }
25284
+ return obj;
25285
+ }
25286
+ function _parseVault(options) {
25287
+ options = options || {};
25288
+ const vaultPath = _vaultPath(options);
25289
+ options.path = vaultPath;
25290
+ const result = DotenvModule.configDotenv(options);
25291
+ if (!result.parsed) {
25292
+ const err = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`);
25293
+ err.code = "MISSING_DATA";
25294
+ throw err;
25295
+ }
25296
+ const keys = _dotenvKey(options).split(",");
25297
+ const length = keys.length;
25298
+ let decrypted;
25299
+ for (let i2 = 0;i2 < length; i2++) {
25300
+ try {
25301
+ const key = keys[i2].trim();
25302
+ const attrs = _instructions(result, key);
25303
+ decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key);
25304
+ break;
25305
+ } catch (error48) {
25306
+ if (i2 + 1 >= length) {
25307
+ throw error48;
25308
+ }
25309
+ }
25310
+ }
25311
+ return DotenvModule.parse(decrypted);
25312
+ }
25313
+ function _warn(message) {
25314
+ console.error(`[dotenv@${version2}][WARN] ${message}`);
25315
+ }
25316
+ function _debug(message) {
25317
+ console.log(`[dotenv@${version2}][DEBUG] ${message}`);
25318
+ }
25319
+ function _log(message) {
25320
+ console.log(`[dotenv@${version2}] ${message}`);
25321
+ }
25322
+ function _dotenvKey(options) {
25323
+ if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) {
25324
+ return options.DOTENV_KEY;
25325
+ }
25326
+ if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) {
25327
+ return process.env.DOTENV_KEY;
25328
+ }
25329
+ return "";
25330
+ }
25331
+ function _instructions(result, dotenvKey) {
25332
+ let uri;
25333
+ try {
25334
+ uri = new URL(dotenvKey);
25335
+ } catch (error48) {
25336
+ if (error48.code === "ERR_INVALID_URL") {
25337
+ const err = new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");
25338
+ err.code = "INVALID_DOTENV_KEY";
25339
+ throw err;
25340
+ }
25341
+ throw error48;
25342
+ }
25343
+ const key = uri.password;
25344
+ if (!key) {
25345
+ const err = new Error("INVALID_DOTENV_KEY: Missing key part");
25346
+ err.code = "INVALID_DOTENV_KEY";
25347
+ throw err;
25348
+ }
25349
+ const environment = uri.searchParams.get("environment");
25350
+ if (!environment) {
25351
+ const err = new Error("INVALID_DOTENV_KEY: Missing environment part");
25352
+ err.code = "INVALID_DOTENV_KEY";
25353
+ throw err;
25354
+ }
25355
+ const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`;
25356
+ const ciphertext = result.parsed[environmentKey];
25357
+ if (!ciphertext) {
25358
+ const err = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`);
25359
+ err.code = "NOT_FOUND_DOTENV_ENVIRONMENT";
25360
+ throw err;
25361
+ }
25362
+ return { ciphertext, key };
25363
+ }
25364
+ function _vaultPath(options) {
25365
+ let possibleVaultPath = null;
25366
+ if (options && options.path && options.path.length > 0) {
25367
+ if (Array.isArray(options.path)) {
25368
+ for (const filepath of options.path) {
25369
+ if (fs14.existsSync(filepath)) {
25370
+ possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
25371
+ }
25372
+ }
25373
+ } else {
25374
+ possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
25375
+ }
25376
+ } else {
25377
+ possibleVaultPath = path16.resolve(process.cwd(), ".env.vault");
25378
+ }
25379
+ if (fs14.existsSync(possibleVaultPath)) {
25380
+ return possibleVaultPath;
25381
+ }
25382
+ return null;
25383
+ }
25384
+ function _resolveHome(envPath) {
25385
+ return envPath[0] === "~" ? path16.join(os2.homedir(), envPath.slice(1)) : envPath;
25386
+ }
25387
+ function _configVault(options) {
25388
+ const debug = parseBoolean(process.env.DOTENV_CONFIG_DEBUG || options && options.debug);
25389
+ const quiet = parseBoolean(process.env.DOTENV_CONFIG_QUIET || options && options.quiet);
25390
+ if (debug || !quiet) {
25391
+ _log("Loading env from encrypted .env.vault");
25392
+ }
25393
+ const parsed = DotenvModule._parseVault(options);
25394
+ let processEnv = process.env;
25395
+ if (options && options.processEnv != null) {
25396
+ processEnv = options.processEnv;
25397
+ }
25398
+ DotenvModule.populate(processEnv, parsed, options);
25399
+ return { parsed };
25400
+ }
25401
+ function configDotenv(options) {
25402
+ const dotenvPath = path16.resolve(process.cwd(), ".env");
25403
+ let encoding = "utf8";
25404
+ let processEnv = process.env;
25405
+ if (options && options.processEnv != null) {
25406
+ processEnv = options.processEnv;
25407
+ }
25408
+ let debug = parseBoolean(processEnv.DOTENV_CONFIG_DEBUG || options && options.debug);
25409
+ let quiet = parseBoolean(processEnv.DOTENV_CONFIG_QUIET || options && options.quiet);
25410
+ if (options && options.encoding) {
25411
+ encoding = options.encoding;
25412
+ } else {
25413
+ if (debug) {
25414
+ _debug("No encoding is specified. UTF-8 is used by default");
25415
+ }
25416
+ }
25417
+ let optionPaths = [dotenvPath];
25418
+ if (options && options.path) {
25419
+ if (!Array.isArray(options.path)) {
25420
+ optionPaths = [_resolveHome(options.path)];
25421
+ } else {
25422
+ optionPaths = [];
25423
+ for (const filepath of options.path) {
25424
+ optionPaths.push(_resolveHome(filepath));
25425
+ }
25426
+ }
25427
+ }
25428
+ let lastError;
25429
+ const parsedAll = {};
25430
+ for (const path17 of optionPaths) {
25431
+ try {
25432
+ const parsed = DotenvModule.parse(fs14.readFileSync(path17, { encoding }));
25433
+ DotenvModule.populate(parsedAll, parsed, options);
25434
+ } catch (e2) {
25435
+ if (debug) {
25436
+ _debug(`Failed to load ${path17} ${e2.message}`);
25437
+ }
25438
+ lastError = e2;
25439
+ }
25440
+ }
25441
+ const populated = DotenvModule.populate(processEnv, parsedAll, options);
25442
+ debug = parseBoolean(processEnv.DOTENV_CONFIG_DEBUG || debug);
25443
+ quiet = parseBoolean(processEnv.DOTENV_CONFIG_QUIET || quiet);
25444
+ if (debug || !quiet) {
25445
+ const keysCount = Object.keys(populated).length;
25446
+ const shortPaths = [];
25447
+ for (const filePath of optionPaths) {
25448
+ try {
25449
+ const relative3 = path16.relative(process.cwd(), filePath);
25450
+ shortPaths.push(relative3);
25451
+ } catch (e2) {
25452
+ if (debug) {
25453
+ _debug(`Failed to load ${filePath} ${e2.message}`);
25454
+ }
25455
+ lastError = e2;
25456
+ }
25457
+ }
25458
+ _log(`injecting env (${keysCount}) from ${shortPaths.join(",")} ${dim2(`-- tip: ${_getRandomTip()}`)}`);
25459
+ }
25460
+ if (lastError) {
25461
+ return { parsed: parsedAll, error: lastError };
25462
+ } else {
25463
+ return { parsed: parsedAll };
25464
+ }
25465
+ }
25466
+ function config9(options) {
25467
+ if (_dotenvKey(options).length === 0) {
25468
+ return DotenvModule.configDotenv(options);
25469
+ }
25470
+ const vaultPath = _vaultPath(options);
25471
+ if (!vaultPath) {
25472
+ _warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`);
25473
+ return DotenvModule.configDotenv(options);
25474
+ }
25475
+ return DotenvModule._configVault(options);
25476
+ }
25477
+ function decrypt(encrypted, keyStr) {
25478
+ const key = Buffer.from(keyStr.slice(-64), "hex");
25479
+ let ciphertext = Buffer.from(encrypted, "base64");
25480
+ const nonce = ciphertext.subarray(0, 12);
25481
+ const authTag = ciphertext.subarray(-16);
25482
+ ciphertext = ciphertext.subarray(12, -16);
25483
+ try {
25484
+ const aesgcm = crypto.createDecipheriv("aes-256-gcm", key, nonce);
25485
+ aesgcm.setAuthTag(authTag);
25486
+ return `${aesgcm.update(ciphertext)}${aesgcm.final()}`;
25487
+ } catch (error48) {
25488
+ const isRange = error48 instanceof RangeError;
25489
+ const invalidKeyLength = error48.message === "Invalid key length";
25490
+ const decryptionFailed = error48.message === "Unsupported state or unable to authenticate data";
25491
+ if (isRange || invalidKeyLength) {
25492
+ const err = new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");
25493
+ err.code = "INVALID_DOTENV_KEY";
25494
+ throw err;
25495
+ } else if (decryptionFailed) {
25496
+ const err = new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");
25497
+ err.code = "DECRYPTION_FAILED";
25498
+ throw err;
25499
+ } else {
25500
+ throw error48;
25501
+ }
25502
+ }
25503
+ }
25504
+ function populate(processEnv, parsed, options = {}) {
25505
+ const debug = Boolean(options && options.debug);
25506
+ const override = Boolean(options && options.override);
25507
+ const populated = {};
25508
+ if (typeof parsed !== "object") {
25509
+ const err = new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");
25510
+ err.code = "OBJECT_REQUIRED";
25511
+ throw err;
25512
+ }
25513
+ for (const key of Object.keys(parsed)) {
25514
+ if (Object.prototype.hasOwnProperty.call(processEnv, key)) {
25515
+ if (override === true) {
25516
+ processEnv[key] = parsed[key];
25517
+ populated[key] = parsed[key];
25518
+ }
25519
+ if (debug) {
25520
+ if (override === true) {
25521
+ _debug(`"${key}" is already defined and WAS overwritten`);
25522
+ } else {
25523
+ _debug(`"${key}" is already defined and was NOT overwritten`);
25524
+ }
25525
+ }
25526
+ } else {
25527
+ processEnv[key] = parsed[key];
25528
+ populated[key] = parsed[key];
25529
+ }
25530
+ }
25531
+ return populated;
25532
+ }
25533
+ var DotenvModule = {
25534
+ configDotenv,
25535
+ _configVault,
25536
+ _parseVault,
25537
+ config: config9,
25538
+ decrypt,
25539
+ parse: parse9,
25540
+ populate
25541
+ };
25542
+ exports.configDotenv = DotenvModule.configDotenv;
25543
+ exports._configVault = DotenvModule._configVault;
25544
+ exports._parseVault = DotenvModule._parseVault;
25545
+ exports.config = DotenvModule.config;
25546
+ exports.decrypt = DotenvModule.decrypt;
25547
+ exports.parse = DotenvModule.parse;
25548
+ exports.populate = DotenvModule.populate;
25549
+ module.exports = DotenvModule;
25550
+ });
25551
+
25552
25552
  // ../../node_modules/lodash/_arrayReduce.js
25553
25553
  var require__arrayReduce = __commonJS((exports, module) => {
25554
25554
  function arrayReduce(array2, iteratee, accumulator, initAccum) {
@@ -27636,14 +27636,14 @@ function getStringWidth(text) {
27636
27636
  }
27637
27637
  return width;
27638
27638
  }
27639
- function generateIndent(indent2, command, options) {
27640
- const queue = command.type === INDENT_COMMAND_TYPE_DEDENT ? indent2.queue.slice(0, -1) : [...indent2.queue, command];
27639
+ function generateIndent(indent2, command2, options) {
27640
+ const queue = command2.type === INDENT_COMMAND_TYPE_DEDENT ? indent2.queue.slice(0, -1) : [...indent2.queue, command2];
27641
27641
  let value = "";
27642
27642
  let length = 0;
27643
27643
  let lastTabs = 0;
27644
27644
  let lastSpaces = 0;
27645
- for (const command2 of queue) {
27646
- switch (command2.type) {
27645
+ for (const command22 of queue) {
27646
+ switch (command22.type) {
27647
27647
  case INDENT_COMMAND_TYPE_INDENT:
27648
27648
  flush();
27649
27649
  if (options.useTabs) {
@@ -27653,20 +27653,20 @@ function generateIndent(indent2, command, options) {
27653
27653
  }
27654
27654
  break;
27655
27655
  case INDENT_COMMAND_TYPE_STRING: {
27656
- const { string: string4 } = command2;
27656
+ const { string: string4 } = command22;
27657
27657
  flush();
27658
27658
  value += string4;
27659
27659
  length += string4.length;
27660
27660
  break;
27661
27661
  }
27662
27662
  case INDENT_COMMAND_TYPE_WIDTH: {
27663
- const { width } = command2;
27663
+ const { width } = command22;
27664
27664
  lastTabs += 1;
27665
27665
  lastSpaces += width;
27666
27666
  break;
27667
27667
  }
27668
27668
  default:
27669
- throw new Error(`Unexpected indent comment '${command2.type}'.`);
27669
+ throw new Error(`Unexpected indent comment '${command22.type}'.`);
27670
27670
  }
27671
27671
  }
27672
27672
  flushSpaces();
@@ -27713,17 +27713,17 @@ function makeAlign(indent2, indentOptions, options) {
27713
27713
  if (indentOptions === Number.NEGATIVE_INFINITY) {
27714
27714
  return indent2.root;
27715
27715
  }
27716
- let command;
27716
+ let command2;
27717
27717
  if (typeof indentOptions === "number") {
27718
27718
  if (indentOptions < 0) {
27719
- command = INDENT_COMMAND_DEDENT;
27719
+ command2 = INDENT_COMMAND_DEDENT;
27720
27720
  } else {
27721
- command = { type: INDENT_COMMAND_TYPE_WIDTH, width: indentOptions };
27721
+ command2 = { type: INDENT_COMMAND_TYPE_WIDTH, width: indentOptions };
27722
27722
  }
27723
27723
  } else {
27724
- command = { type: INDENT_COMMAND_TYPE_STRING, string: indentOptions };
27724
+ command2 = { type: INDENT_COMMAND_TYPE_STRING, string: indentOptions };
27725
27725
  }
27726
- return generateIndent(indent2, command, options);
27726
+ return generateIndent(indent2, command2, options);
27727
27727
  }
27728
27728
  function makeIndent(indent2, options) {
27729
27729
  return generateIndent(indent2, INDENT_COMMAND_INDENT, options);
@@ -133400,14 +133400,14 @@ Expected it to be ${EXPECTED_TYPE_VALUES}.`;
133400
133400
  return ROOT_INDENT2;
133401
133401
  }
133402
133402
  };
133403
- function generateIndent2(indent22, command, options8) {
133404
- const queue = command.type === INDENT_COMMAND_TYPE_DEDENT2 ? indent22.queue.slice(0, -1) : [...indent22.queue, command];
133403
+ function generateIndent2(indent22, command2, options8) {
133404
+ const queue = command2.type === INDENT_COMMAND_TYPE_DEDENT2 ? indent22.queue.slice(0, -1) : [...indent22.queue, command2];
133405
133405
  let value = "";
133406
133406
  let length = 0;
133407
133407
  let lastTabs = 0;
133408
133408
  let lastSpaces = 0;
133409
- for (const command2 of queue) {
133410
- switch (command2.type) {
133409
+ for (const command22 of queue) {
133410
+ switch (command22.type) {
133411
133411
  case INDENT_COMMAND_TYPE_INDENT2:
133412
133412
  flush();
133413
133413
  if (options8.useTabs) {
@@ -133417,20 +133417,20 @@ Expected it to be ${EXPECTED_TYPE_VALUES}.`;
133417
133417
  }
133418
133418
  break;
133419
133419
  case INDENT_COMMAND_TYPE_STRING2: {
133420
- const { string: string4 } = command2;
133420
+ const { string: string4 } = command22;
133421
133421
  flush();
133422
133422
  value += string4;
133423
133423
  length += string4.length;
133424
133424
  break;
133425
133425
  }
133426
133426
  case INDENT_COMMAND_TYPE_WIDTH2: {
133427
- const { width } = command2;
133427
+ const { width } = command22;
133428
133428
  lastTabs += 1;
133429
133429
  lastSpaces += width;
133430
133430
  break;
133431
133431
  }
133432
133432
  default:
133433
- throw new Error(`Unexpected indent comment '${command2.type}'.`);
133433
+ throw new Error(`Unexpected indent comment '${command22.type}'.`);
133434
133434
  }
133435
133435
  }
133436
133436
  flushSpaces();
@@ -133477,17 +133477,17 @@ Expected it to be ${EXPECTED_TYPE_VALUES}.`;
133477
133477
  if (indentOptions === Number.NEGATIVE_INFINITY) {
133478
133478
  return indent22.root;
133479
133479
  }
133480
- let command;
133480
+ let command2;
133481
133481
  if (typeof indentOptions === "number") {
133482
133482
  if (indentOptions < 0) {
133483
- command = INDENT_COMMAND_DEDENT2;
133483
+ command2 = INDENT_COMMAND_DEDENT2;
133484
133484
  } else {
133485
- command = { type: INDENT_COMMAND_TYPE_WIDTH2, width: indentOptions };
133485
+ command2 = { type: INDENT_COMMAND_TYPE_WIDTH2, width: indentOptions };
133486
133486
  }
133487
133487
  } else {
133488
- command = { type: INDENT_COMMAND_TYPE_STRING2, string: indentOptions };
133488
+ command2 = { type: INDENT_COMMAND_TYPE_STRING2, string: indentOptions };
133489
133489
  }
133490
- return generateIndent2(indent22, command, options8);
133490
+ return generateIndent2(indent22, command2, options8);
133491
133491
  }
133492
133492
  function makeIndent2(indent22, options8) {
133493
133493
  return generateIndent2(indent22, INDENT_COMMAND_INDENT2, options8);
@@ -214782,8 +214782,8 @@ var require_dist5 = __commonJS((exports, module) => {
214782
214782
  });
214783
214783
 
214784
214784
  // src/cli/index.ts
214785
- import { dirname as dirname17, join as join22 } from "node:path";
214786
- import { fileURLToPath as fileURLToPath7 } from "node:url";
214785
+ import { dirname as dirname16, join as join21 } from "node:path";
214786
+ import { fileURLToPath as fileURLToPath6 } from "node:url";
214787
214787
 
214788
214788
  // ../../node_modules/commander/esm.mjs
214789
214789
  var import__ = __toESM(require_commander(), 1);
@@ -215888,6 +215888,715 @@ ${l}
215888
215888
  }
215889
215889
  } }).prompt();
215890
215890
 
215891
+ // ../../node_modules/chalk/source/vendor/ansi-styles/index.js
215892
+ var ANSI_BACKGROUND_OFFSET = 10;
215893
+ var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
215894
+ var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
215895
+ var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
215896
+ var styles = {
215897
+ modifier: {
215898
+ reset: [0, 0],
215899
+ bold: [1, 22],
215900
+ dim: [2, 22],
215901
+ italic: [3, 23],
215902
+ underline: [4, 24],
215903
+ overline: [53, 55],
215904
+ inverse: [7, 27],
215905
+ hidden: [8, 28],
215906
+ strikethrough: [9, 29]
215907
+ },
215908
+ color: {
215909
+ black: [30, 39],
215910
+ red: [31, 39],
215911
+ green: [32, 39],
215912
+ yellow: [33, 39],
215913
+ blue: [34, 39],
215914
+ magenta: [35, 39],
215915
+ cyan: [36, 39],
215916
+ white: [37, 39],
215917
+ blackBright: [90, 39],
215918
+ gray: [90, 39],
215919
+ grey: [90, 39],
215920
+ redBright: [91, 39],
215921
+ greenBright: [92, 39],
215922
+ yellowBright: [93, 39],
215923
+ blueBright: [94, 39],
215924
+ magentaBright: [95, 39],
215925
+ cyanBright: [96, 39],
215926
+ whiteBright: [97, 39]
215927
+ },
215928
+ bgColor: {
215929
+ bgBlack: [40, 49],
215930
+ bgRed: [41, 49],
215931
+ bgGreen: [42, 49],
215932
+ bgYellow: [43, 49],
215933
+ bgBlue: [44, 49],
215934
+ bgMagenta: [45, 49],
215935
+ bgCyan: [46, 49],
215936
+ bgWhite: [47, 49],
215937
+ bgBlackBright: [100, 49],
215938
+ bgGray: [100, 49],
215939
+ bgGrey: [100, 49],
215940
+ bgRedBright: [101, 49],
215941
+ bgGreenBright: [102, 49],
215942
+ bgYellowBright: [103, 49],
215943
+ bgBlueBright: [104, 49],
215944
+ bgMagentaBright: [105, 49],
215945
+ bgCyanBright: [106, 49],
215946
+ bgWhiteBright: [107, 49]
215947
+ }
215948
+ };
215949
+ var modifierNames = Object.keys(styles.modifier);
215950
+ var foregroundColorNames = Object.keys(styles.color);
215951
+ var backgroundColorNames = Object.keys(styles.bgColor);
215952
+ var colorNames = [...foregroundColorNames, ...backgroundColorNames];
215953
+ function assembleStyles() {
215954
+ const codes = new Map;
215955
+ for (const [groupName, group] of Object.entries(styles)) {
215956
+ for (const [styleName, style] of Object.entries(group)) {
215957
+ styles[styleName] = {
215958
+ open: `\x1B[${style[0]}m`,
215959
+ close: `\x1B[${style[1]}m`
215960
+ };
215961
+ group[styleName] = styles[styleName];
215962
+ codes.set(style[0], style[1]);
215963
+ }
215964
+ Object.defineProperty(styles, groupName, {
215965
+ value: group,
215966
+ enumerable: false
215967
+ });
215968
+ }
215969
+ Object.defineProperty(styles, "codes", {
215970
+ value: codes,
215971
+ enumerable: false
215972
+ });
215973
+ styles.color.close = "\x1B[39m";
215974
+ styles.bgColor.close = "\x1B[49m";
215975
+ styles.color.ansi = wrapAnsi16();
215976
+ styles.color.ansi256 = wrapAnsi256();
215977
+ styles.color.ansi16m = wrapAnsi16m();
215978
+ styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
215979
+ styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
215980
+ styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
215981
+ Object.defineProperties(styles, {
215982
+ rgbToAnsi256: {
215983
+ value(red, green, blue) {
215984
+ if (red === green && green === blue) {
215985
+ if (red < 8) {
215986
+ return 16;
215987
+ }
215988
+ if (red > 248) {
215989
+ return 231;
215990
+ }
215991
+ return Math.round((red - 8) / 247 * 24) + 232;
215992
+ }
215993
+ return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
215994
+ },
215995
+ enumerable: false
215996
+ },
215997
+ hexToRgb: {
215998
+ value(hex) {
215999
+ const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
216000
+ if (!matches) {
216001
+ return [0, 0, 0];
216002
+ }
216003
+ let [colorString] = matches;
216004
+ if (colorString.length === 3) {
216005
+ colorString = [...colorString].map((character) => character + character).join("");
216006
+ }
216007
+ const integer = Number.parseInt(colorString, 16);
216008
+ return [
216009
+ integer >> 16 & 255,
216010
+ integer >> 8 & 255,
216011
+ integer & 255
216012
+ ];
216013
+ },
216014
+ enumerable: false
216015
+ },
216016
+ hexToAnsi256: {
216017
+ value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
216018
+ enumerable: false
216019
+ },
216020
+ ansi256ToAnsi: {
216021
+ value(code) {
216022
+ if (code < 8) {
216023
+ return 30 + code;
216024
+ }
216025
+ if (code < 16) {
216026
+ return 90 + (code - 8);
216027
+ }
216028
+ let red;
216029
+ let green;
216030
+ let blue;
216031
+ if (code >= 232) {
216032
+ red = ((code - 232) * 10 + 8) / 255;
216033
+ green = red;
216034
+ blue = red;
216035
+ } else {
216036
+ code -= 16;
216037
+ const remainder = code % 36;
216038
+ red = Math.floor(code / 36) / 5;
216039
+ green = Math.floor(remainder / 6) / 5;
216040
+ blue = remainder % 6 / 5;
216041
+ }
216042
+ const value = Math.max(red, green, blue) * 2;
216043
+ if (value === 0) {
216044
+ return 30;
216045
+ }
216046
+ let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
216047
+ if (value === 2) {
216048
+ result += 60;
216049
+ }
216050
+ return result;
216051
+ },
216052
+ enumerable: false
216053
+ },
216054
+ rgbToAnsi: {
216055
+ value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
216056
+ enumerable: false
216057
+ },
216058
+ hexToAnsi: {
216059
+ value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
216060
+ enumerable: false
216061
+ }
216062
+ });
216063
+ return styles;
216064
+ }
216065
+ var ansiStyles = assembleStyles();
216066
+ var ansi_styles_default = ansiStyles;
216067
+
216068
+ // ../../node_modules/chalk/source/vendor/supports-color/index.js
216069
+ import process2 from "node:process";
216070
+ import os from "node:os";
216071
+ import tty from "node:tty";
216072
+ function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process2.argv) {
216073
+ const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
216074
+ const position = argv.indexOf(prefix + flag);
216075
+ const terminatorPosition = argv.indexOf("--");
216076
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
216077
+ }
216078
+ var { env } = process2;
216079
+ var flagForceColor;
216080
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
216081
+ flagForceColor = 0;
216082
+ } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
216083
+ flagForceColor = 1;
216084
+ }
216085
+ function envForceColor() {
216086
+ if ("FORCE_COLOR" in env) {
216087
+ if (env.FORCE_COLOR === "true") {
216088
+ return 1;
216089
+ }
216090
+ if (env.FORCE_COLOR === "false") {
216091
+ return 0;
216092
+ }
216093
+ return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
216094
+ }
216095
+ }
216096
+ function translateLevel(level) {
216097
+ if (level === 0) {
216098
+ return false;
216099
+ }
216100
+ return {
216101
+ level,
216102
+ hasBasic: true,
216103
+ has256: level >= 2,
216104
+ has16m: level >= 3
216105
+ };
216106
+ }
216107
+ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
216108
+ const noFlagForceColor = envForceColor();
216109
+ if (noFlagForceColor !== undefined) {
216110
+ flagForceColor = noFlagForceColor;
216111
+ }
216112
+ const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
216113
+ if (forceColor === 0) {
216114
+ return 0;
216115
+ }
216116
+ if (sniffFlags) {
216117
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
216118
+ return 3;
216119
+ }
216120
+ if (hasFlag("color=256")) {
216121
+ return 2;
216122
+ }
216123
+ }
216124
+ if ("TF_BUILD" in env && "AGENT_NAME" in env) {
216125
+ return 1;
216126
+ }
216127
+ if (haveStream && !streamIsTTY && forceColor === undefined) {
216128
+ return 0;
216129
+ }
216130
+ const min = forceColor || 0;
216131
+ if (env.TERM === "dumb") {
216132
+ return min;
216133
+ }
216134
+ if (process2.platform === "win32") {
216135
+ const osRelease = os.release().split(".");
216136
+ if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
216137
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
216138
+ }
216139
+ return 1;
216140
+ }
216141
+ if ("CI" in env) {
216142
+ if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => (key in env))) {
216143
+ return 3;
216144
+ }
216145
+ if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => (sign in env)) || env.CI_NAME === "codeship") {
216146
+ return 1;
216147
+ }
216148
+ return min;
216149
+ }
216150
+ if ("TEAMCITY_VERSION" in env) {
216151
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
216152
+ }
216153
+ if (env.COLORTERM === "truecolor") {
216154
+ return 3;
216155
+ }
216156
+ if (env.TERM === "xterm-kitty") {
216157
+ return 3;
216158
+ }
216159
+ if (env.TERM === "xterm-ghostty") {
216160
+ return 3;
216161
+ }
216162
+ if (env.TERM === "wezterm") {
216163
+ return 3;
216164
+ }
216165
+ if ("TERM_PROGRAM" in env) {
216166
+ const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
216167
+ switch (env.TERM_PROGRAM) {
216168
+ case "iTerm.app": {
216169
+ return version >= 3 ? 3 : 2;
216170
+ }
216171
+ case "Apple_Terminal": {
216172
+ return 2;
216173
+ }
216174
+ }
216175
+ }
216176
+ if (/-256(color)?$/i.test(env.TERM)) {
216177
+ return 2;
216178
+ }
216179
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
216180
+ return 1;
216181
+ }
216182
+ if ("COLORTERM" in env) {
216183
+ return 1;
216184
+ }
216185
+ return min;
216186
+ }
216187
+ function createSupportsColor(stream, options = {}) {
216188
+ const level = _supportsColor(stream, {
216189
+ streamIsTTY: stream && stream.isTTY,
216190
+ ...options
216191
+ });
216192
+ return translateLevel(level);
216193
+ }
216194
+ var supportsColor = {
216195
+ stdout: createSupportsColor({ isTTY: tty.isatty(1) }),
216196
+ stderr: createSupportsColor({ isTTY: tty.isatty(2) })
216197
+ };
216198
+ var supports_color_default = supportsColor;
216199
+
216200
+ // ../../node_modules/chalk/source/utilities.js
216201
+ function stringReplaceAll(string, substring, replacer) {
216202
+ let index = string.indexOf(substring);
216203
+ if (index === -1) {
216204
+ return string;
216205
+ }
216206
+ const substringLength = substring.length;
216207
+ let endIndex = 0;
216208
+ let returnValue = "";
216209
+ do {
216210
+ returnValue += string.slice(endIndex, index) + substring + replacer;
216211
+ endIndex = index + substringLength;
216212
+ index = string.indexOf(substring, endIndex);
216213
+ } while (index !== -1);
216214
+ returnValue += string.slice(endIndex);
216215
+ return returnValue;
216216
+ }
216217
+ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
216218
+ let endIndex = 0;
216219
+ let returnValue = "";
216220
+ do {
216221
+ const gotCR = string[index - 1] === "\r";
216222
+ returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? `\r
216223
+ ` : `
216224
+ `) + postfix;
216225
+ endIndex = index + 1;
216226
+ index = string.indexOf(`
216227
+ `, endIndex);
216228
+ } while (index !== -1);
216229
+ returnValue += string.slice(endIndex);
216230
+ return returnValue;
216231
+ }
216232
+
216233
+ // ../../node_modules/chalk/source/index.js
216234
+ var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
216235
+ var GENERATOR = Symbol("GENERATOR");
216236
+ var STYLER = Symbol("STYLER");
216237
+ var IS_EMPTY = Symbol("IS_EMPTY");
216238
+ var levelMapping = [
216239
+ "ansi",
216240
+ "ansi",
216241
+ "ansi256",
216242
+ "ansi16m"
216243
+ ];
216244
+ var styles2 = Object.create(null);
216245
+ var applyOptions = (object, options = {}) => {
216246
+ if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
216247
+ throw new Error("The `level` option should be an integer from 0 to 3");
216248
+ }
216249
+ const colorLevel = stdoutColor ? stdoutColor.level : 0;
216250
+ object.level = options.level === undefined ? colorLevel : options.level;
216251
+ };
216252
+ var chalkFactory = (options) => {
216253
+ const chalk = (...strings) => strings.join(" ");
216254
+ applyOptions(chalk, options);
216255
+ Object.setPrototypeOf(chalk, createChalk.prototype);
216256
+ return chalk;
216257
+ };
216258
+ function createChalk(options) {
216259
+ return chalkFactory(options);
216260
+ }
216261
+ Object.setPrototypeOf(createChalk.prototype, Function.prototype);
216262
+ for (const [styleName, style] of Object.entries(ansi_styles_default)) {
216263
+ styles2[styleName] = {
216264
+ get() {
216265
+ const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
216266
+ Object.defineProperty(this, styleName, { value: builder });
216267
+ return builder;
216268
+ }
216269
+ };
216270
+ }
216271
+ styles2.visible = {
216272
+ get() {
216273
+ const builder = createBuilder(this, this[STYLER], true);
216274
+ Object.defineProperty(this, "visible", { value: builder });
216275
+ return builder;
216276
+ }
216277
+ };
216278
+ var getModelAnsi = (model, level, type, ...arguments_) => {
216279
+ if (model === "rgb") {
216280
+ if (level === "ansi16m") {
216281
+ return ansi_styles_default[type].ansi16m(...arguments_);
216282
+ }
216283
+ if (level === "ansi256") {
216284
+ return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
216285
+ }
216286
+ return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
216287
+ }
216288
+ if (model === "hex") {
216289
+ return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_));
216290
+ }
216291
+ return ansi_styles_default[type][model](...arguments_);
216292
+ };
216293
+ var usedModels = ["rgb", "hex", "ansi256"];
216294
+ for (const model of usedModels) {
216295
+ styles2[model] = {
216296
+ get() {
216297
+ const { level } = this;
216298
+ return function(...arguments_) {
216299
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
216300
+ return createBuilder(this, styler, this[IS_EMPTY]);
216301
+ };
216302
+ }
216303
+ };
216304
+ const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
216305
+ styles2[bgModel] = {
216306
+ get() {
216307
+ const { level } = this;
216308
+ return function(...arguments_) {
216309
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
216310
+ return createBuilder(this, styler, this[IS_EMPTY]);
216311
+ };
216312
+ }
216313
+ };
216314
+ }
216315
+ var proto = Object.defineProperties(() => {}, {
216316
+ ...styles2,
216317
+ level: {
216318
+ enumerable: true,
216319
+ get() {
216320
+ return this[GENERATOR].level;
216321
+ },
216322
+ set(level) {
216323
+ this[GENERATOR].level = level;
216324
+ }
216325
+ }
216326
+ });
216327
+ var createStyler = (open, close, parent) => {
216328
+ let openAll;
216329
+ let closeAll;
216330
+ if (parent === undefined) {
216331
+ openAll = open;
216332
+ closeAll = close;
216333
+ } else {
216334
+ openAll = parent.openAll + open;
216335
+ closeAll = close + parent.closeAll;
216336
+ }
216337
+ return {
216338
+ open,
216339
+ close,
216340
+ openAll,
216341
+ closeAll,
216342
+ parent
216343
+ };
216344
+ };
216345
+ var createBuilder = (self2, _styler, _isEmpty) => {
216346
+ const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
216347
+ Object.setPrototypeOf(builder, proto);
216348
+ builder[GENERATOR] = self2;
216349
+ builder[STYLER] = _styler;
216350
+ builder[IS_EMPTY] = _isEmpty;
216351
+ return builder;
216352
+ };
216353
+ var applyStyle = (self2, string) => {
216354
+ if (self2.level <= 0 || !string) {
216355
+ return self2[IS_EMPTY] ? "" : string;
216356
+ }
216357
+ let styler = self2[STYLER];
216358
+ if (styler === undefined) {
216359
+ return string;
216360
+ }
216361
+ const { openAll, closeAll } = styler;
216362
+ if (string.includes("\x1B")) {
216363
+ while (styler !== undefined) {
216364
+ string = stringReplaceAll(string, styler.close, styler.open);
216365
+ styler = styler.parent;
216366
+ }
216367
+ }
216368
+ const lfIndex = string.indexOf(`
216369
+ `);
216370
+ if (lfIndex !== -1) {
216371
+ string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
216372
+ }
216373
+ return openAll + string + closeAll;
216374
+ };
216375
+ Object.defineProperties(createChalk.prototype, styles2);
216376
+ var chalk = createChalk();
216377
+ var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
216378
+ var source_default = chalk;
216379
+
216380
+ // src/cli/utils/theme.ts
216381
+ var theme = {
216382
+ colors: {
216383
+ base44Orange: source_default.hex("#E86B3C"),
216384
+ base44OrangeBackground: source_default.bgHex("#E86B3C"),
216385
+ shinyOrange: source_default.hex("#FFD700"),
216386
+ links: source_default.hex("#00D4FF"),
216387
+ white: source_default.white
216388
+ },
216389
+ styles: {
216390
+ header: source_default.dim,
216391
+ bold: source_default.bold,
216392
+ dim: source_default.dim,
216393
+ error: source_default.red,
216394
+ warn: source_default.yellow
216395
+ },
216396
+ format: {
216397
+ errorContext(ctx) {
216398
+ const parts = [
216399
+ ctx.sessionId ? `Session: ${ctx.sessionId}` : null,
216400
+ ctx.appId ? `App: ${ctx.appId}` : null,
216401
+ new Date().toISOString()
216402
+ ].filter(Boolean);
216403
+ return source_default.dim(parts.join(" | "));
216404
+ },
216405
+ details(lines) {
216406
+ return lines.map((line) => ` • ${line}`).join(`
216407
+ `);
216408
+ },
216409
+ agentHints(hints) {
216410
+ if (hints.length === 0) {
216411
+ return null;
216412
+ }
216413
+ const hintLines = hints.map((hint) => {
216414
+ if (hint.command) {
216415
+ return ` Run: ${hint.command}`;
216416
+ }
216417
+ return ` ${hint.message}`;
216418
+ });
216419
+ return ["[Agent Hints]", ...hintLines].join(`
216420
+ `);
216421
+ }
216422
+ }
216423
+ };
216424
+
216425
+ // src/cli/utils/animate.ts
216426
+ function sleep(ms) {
216427
+ return new Promise((resolve) => setTimeout(resolve, ms));
216428
+ }
216429
+ async function animateLineReveal(line, duration) {
216430
+ const steps = 8;
216431
+ const stepDuration = duration / steps;
216432
+ for (let step = 0;step <= steps; step++) {
216433
+ const progress = step / steps;
216434
+ const revealIndex = Math.floor(progress * line.length);
216435
+ let output = "";
216436
+ for (let i = 0;i < line.length; i++) {
216437
+ if (i < revealIndex) {
216438
+ output += theme.colors.base44Orange(line[i]);
216439
+ } else if (i === revealIndex) {
216440
+ output += theme.colors.shinyOrange(line[i]);
216441
+ } else {
216442
+ output += theme.styles.dim(line[i]);
216443
+ }
216444
+ }
216445
+ process.stdout.write(`\r${output}`);
216446
+ await sleep(stepDuration);
216447
+ }
216448
+ process.stdout.write(`\r${theme.colors.base44Orange(line)}
216449
+ `);
216450
+ }
216451
+ async function shimmerPass(lines, duration) {
216452
+ const moveUp = `\x1B[${lines.length}A`;
216453
+ const steps = 12;
216454
+ const stepDuration = duration / steps;
216455
+ const maxWidth = Math.max(...lines.map((l) => l.length));
216456
+ for (let step = 0;step <= steps; step++) {
216457
+ const shimmerPos = Math.floor(step / steps * (maxWidth + 6));
216458
+ process.stdout.write(moveUp);
216459
+ for (const line of lines) {
216460
+ let output = "";
216461
+ for (let i = 0;i < line.length; i++) {
216462
+ const dist = Math.abs(i - shimmerPos);
216463
+ if (dist < 3) {
216464
+ output += dist === 0 ? theme.colors.white(line[i]) : theme.colors.shinyOrange(line[i]);
216465
+ } else {
216466
+ output += theme.colors.base44Orange(line[i]);
216467
+ }
216468
+ }
216469
+ console.log(output);
216470
+ }
216471
+ await sleep(stepDuration);
216472
+ }
216473
+ process.stdout.write(moveUp);
216474
+ for (const line of lines) {
216475
+ console.log(theme.colors.base44Orange(line));
216476
+ }
216477
+ }
216478
+ async function printAnimatedLines(lines) {
216479
+ const totalDuration = 1000;
216480
+ const lineDelay = totalDuration / lines.length;
216481
+ for (let i = 0;i < lines.length; i++) {
216482
+ const line = lines[i];
216483
+ await animateLineReveal(line, 100);
216484
+ if (i < lines.length - 1) {
216485
+ await sleep(lineDelay - 100);
216486
+ }
216487
+ }
216488
+ await shimmerPass(lines, 200);
216489
+ }
216490
+
216491
+ // src/cli/utils/banner.ts
216492
+ var BANNER_LINES = [
216493
+ "██████╗ █████╗ ███████╗███████╗ ██╗ ██╗██╗ ██╗",
216494
+ "██╔══██╗██╔══██╗██╔════╝██╔════╝ ██║ ██║██║ ██║",
216495
+ "██████╔╝███████║███████╗█████╗ ███████║███████║",
216496
+ "██╔══██╗██╔══██║╚════██║██╔══╝ ╚════██║╚════██║",
216497
+ "██████╔╝██║ ██║███████║███████╗ ██║ ██║",
216498
+ "╚═════╝ ╚═╝ ╚═╝╚══════╝╚══════╝ ╚═╝ ╚═╝"
216499
+ ];
216500
+ async function printBanner() {
216501
+ await printAnimatedLines(BANNER_LINES);
216502
+ }
216503
+ // ../../node_modules/p-wait-for/index.js
216504
+ var resolveValue = Symbol("resolveValue");
216505
+ var sleep2 = (ms, signal) => new Promise((resolve, reject) => {
216506
+ if (signal?.aborted) {
216507
+ reject(signal.reason);
216508
+ return;
216509
+ }
216510
+ const timeout = setTimeout(resolve, ms);
216511
+ if (signal) {
216512
+ signal.addEventListener("abort", () => {
216513
+ clearTimeout(timeout);
216514
+ reject(signal.reason);
216515
+ }, { once: true });
216516
+ }
216517
+ });
216518
+ var validateOptions = (interval, timeout) => {
216519
+ if (typeof interval !== "number" || !Number.isFinite(interval) || interval < 0) {
216520
+ throw new TypeError("Expected interval to be a finite non-negative number");
216521
+ }
216522
+ if (typeof timeout === "object" && timeout !== null) {
216523
+ if (typeof timeout.milliseconds !== "number" || Number.isNaN(timeout.milliseconds) || timeout.milliseconds < 0) {
216524
+ throw new TypeError("Expected timeout.milliseconds to be a finite non-negative number");
216525
+ }
216526
+ } else if (typeof timeout === "number" && (Number.isNaN(timeout) || timeout < 0)) {
216527
+ throw new TypeError("Expected timeout to be a finite non-negative number");
216528
+ }
216529
+ };
216530
+ var createTimeoutError = (timeout) => {
216531
+ if (timeout.message instanceof Error) {
216532
+ return timeout.message;
216533
+ }
216534
+ const message = timeout.message ?? `Promise timed out after ${timeout.milliseconds} milliseconds`;
216535
+ return new TimeoutError(message);
216536
+ };
216537
+ var handleFallback = (timeout) => {
216538
+ if (timeout.fallback) {
216539
+ return timeout.fallback();
216540
+ }
216541
+ throw createTimeoutError(timeout);
216542
+ };
216543
+ var handleAbortError = (timeoutSignal, timeout, signal) => {
216544
+ if (timeoutSignal?.aborted) {
216545
+ if (typeof timeout === "object") {
216546
+ return handleFallback(timeout);
216547
+ }
216548
+ throw new TimeoutError;
216549
+ }
216550
+ throw signal.reason;
216551
+ };
216552
+ async function pWaitFor(condition, options = {}) {
216553
+ const {
216554
+ interval = 20,
216555
+ timeout = Number.POSITIVE_INFINITY,
216556
+ before = true,
216557
+ signal
216558
+ } = options;
216559
+ validateOptions(interval, timeout);
216560
+ const timeoutMs = typeof timeout === "number" ? timeout : timeout?.milliseconds ?? Number.POSITIVE_INFINITY;
216561
+ const timeoutSignal = timeoutMs === Number.POSITIVE_INFINITY ? undefined : AbortSignal.timeout(timeoutMs);
216562
+ const combinedSignal = timeoutSignal && signal ? AbortSignal.any([timeoutSignal, signal]) : timeoutSignal ?? signal;
216563
+ if (!before) {
216564
+ await sleep2(interval, combinedSignal);
216565
+ }
216566
+ if (combinedSignal?.aborted) {
216567
+ return handleAbortError(timeoutSignal, timeout, signal);
216568
+ }
216569
+ while (true) {
216570
+ try {
216571
+ const value = await condition();
216572
+ if (typeof value === "object" && value !== null && resolveValue in value) {
216573
+ return value[resolveValue];
216574
+ }
216575
+ if (value === true) {
216576
+ return;
216577
+ }
216578
+ if (value === false) {
216579
+ await sleep2(interval, combinedSignal);
216580
+ continue;
216581
+ }
216582
+ throw new TypeError("Expected condition to return a boolean");
216583
+ } catch (error) {
216584
+ if (error === combinedSignal?.reason) {
216585
+ return handleAbortError(timeoutSignal, timeout, signal);
216586
+ }
216587
+ throw error;
216588
+ }
216589
+ }
216590
+ }
216591
+ pWaitFor.resolveWith = (value) => ({ [resolveValue]: value });
216592
+
216593
+ class TimeoutError extends Error {
216594
+ constructor(message = "Promise timed out") {
216595
+ super(message);
216596
+ this.name = "TimeoutError";
216597
+ }
216598
+ }
216599
+
215891
216600
  // ../../node_modules/zod/v4/classic/external.js
215892
216601
  var exports_external = {};
215893
216602
  __export(exports_external, {
@@ -216145,7 +216854,7 @@ __export(exports_core2, {
216145
216854
  safeDecode: () => safeDecode,
216146
216855
  registry: () => registry,
216147
216856
  regexes: () => exports_regexes,
216148
- process: () => process2,
216857
+ process: () => process3,
216149
216858
  prettifyError: () => prettifyError,
216150
216859
  parseAsync: () => parseAsync,
216151
216860
  parse: () => parse,
@@ -216428,12 +217137,12 @@ function $constructor(name, initializer, params) {
216428
217137
  }
216429
217138
  inst._zod.traits.add(name);
216430
217139
  initializer(inst, def);
216431
- const proto = _2.prototype;
216432
- const keys = Object.keys(proto);
217140
+ const proto2 = _2.prototype;
217141
+ const keys = Object.keys(proto2);
216433
217142
  for (let i = 0;i < keys.length; i++) {
216434
217143
  const k2 = keys[i];
216435
217144
  if (!(k2 in inst)) {
216436
- inst[k2] = proto[k2].bind(inst);
217145
+ inst[k2] = proto2[k2].bind(inst);
216437
217146
  }
216438
217147
  }
216439
217148
  }
@@ -226609,7 +227318,7 @@ function initializeContext(params) {
226609
227318
  external: params?.external ?? undefined
226610
227319
  };
226611
227320
  }
226612
- function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
227321
+ function process3(schema, ctx, _params = { path: [], schemaPath: [] }) {
226613
227322
  var _a2;
226614
227323
  const def = schema._zod.def;
226615
227324
  const seen = ctx.seen.get(schema);
@@ -226646,7 +227355,7 @@ function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
226646
227355
  if (parent) {
226647
227356
  if (!result.ref)
226648
227357
  result.ref = parent;
226649
- process2(parent, ctx, params);
227358
+ process3(parent, ctx, params);
226650
227359
  ctx.seen.get(parent).isParent = true;
226651
227360
  }
226652
227361
  }
@@ -226922,14 +227631,14 @@ function isTransforming(_schema, _ctx) {
226922
227631
  }
226923
227632
  var createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
226924
227633
  const ctx = initializeContext({ ...params, processors });
226925
- process2(schema, ctx);
227634
+ process3(schema, ctx);
226926
227635
  extractDefs(ctx, schema);
226927
227636
  return finalize(ctx, schema);
226928
227637
  };
226929
227638
  var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {
226930
227639
  const { libraryOptions, target } = params ?? {};
226931
227640
  const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors });
226932
- process2(schema, ctx);
227641
+ process3(schema, ctx);
226933
227642
  extractDefs(ctx, schema);
226934
227643
  return finalize(ctx, schema);
226935
227644
  };
@@ -227180,7 +227889,7 @@ var arrayProcessor = (schema, ctx, _json, params) => {
227180
227889
  if (typeof maximum === "number")
227181
227890
  json.maxItems = maximum;
227182
227891
  json.type = "array";
227183
- json.items = process2(def.element, ctx, { ...params, path: [...params.path, "items"] });
227892
+ json.items = process3(def.element, ctx, { ...params, path: [...params.path, "items"] });
227184
227893
  };
227185
227894
  var objectProcessor = (schema, ctx, _json, params) => {
227186
227895
  const json = _json;
@@ -227189,7 +227898,7 @@ var objectProcessor = (schema, ctx, _json, params) => {
227189
227898
  json.properties = {};
227190
227899
  const shape = def.shape;
227191
227900
  for (const key in shape) {
227192
- json.properties[key] = process2(shape[key], ctx, {
227901
+ json.properties[key] = process3(shape[key], ctx, {
227193
227902
  ...params,
227194
227903
  path: [...params.path, "properties", key]
227195
227904
  });
@@ -227212,7 +227921,7 @@ var objectProcessor = (schema, ctx, _json, params) => {
227212
227921
  if (ctx.io === "output")
227213
227922
  json.additionalProperties = false;
227214
227923
  } else if (def.catchall) {
227215
- json.additionalProperties = process2(def.catchall, ctx, {
227924
+ json.additionalProperties = process3(def.catchall, ctx, {
227216
227925
  ...params,
227217
227926
  path: [...params.path, "additionalProperties"]
227218
227927
  });
@@ -227221,7 +227930,7 @@ var objectProcessor = (schema, ctx, _json, params) => {
227221
227930
  var unionProcessor = (schema, ctx, json, params) => {
227222
227931
  const def = schema._zod.def;
227223
227932
  const isExclusive = def.inclusive === false;
227224
- const options = def.options.map((x3, i) => process2(x3, ctx, {
227933
+ const options = def.options.map((x3, i) => process3(x3, ctx, {
227225
227934
  ...params,
227226
227935
  path: [...params.path, isExclusive ? "oneOf" : "anyOf", i]
227227
227936
  }));
@@ -227233,11 +227942,11 @@ var unionProcessor = (schema, ctx, json, params) => {
227233
227942
  };
227234
227943
  var intersectionProcessor = (schema, ctx, json, params) => {
227235
227944
  const def = schema._zod.def;
227236
- const a = process2(def.left, ctx, {
227945
+ const a = process3(def.left, ctx, {
227237
227946
  ...params,
227238
227947
  path: [...params.path, "allOf", 0]
227239
227948
  });
227240
- const b = process2(def.right, ctx, {
227949
+ const b = process3(def.right, ctx, {
227241
227950
  ...params,
227242
227951
  path: [...params.path, "allOf", 1]
227243
227952
  });
@@ -227254,11 +227963,11 @@ var tupleProcessor = (schema, ctx, _json, params) => {
227254
227963
  json.type = "array";
227255
227964
  const prefixPath = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
227256
227965
  const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems";
227257
- const prefixItems = def.items.map((x3, i) => process2(x3, ctx, {
227966
+ const prefixItems = def.items.map((x3, i) => process3(x3, ctx, {
227258
227967
  ...params,
227259
227968
  path: [...params.path, prefixPath, i]
227260
227969
  }));
227261
- const rest = def.rest ? process2(def.rest, ctx, {
227970
+ const rest = def.rest ? process3(def.rest, ctx, {
227262
227971
  ...params,
227263
227972
  path: [...params.path, restPath, ...ctx.target === "openapi-3.0" ? [def.items.length] : []]
227264
227973
  }) : null;
@@ -227298,7 +228007,7 @@ var recordProcessor = (schema, ctx, _json, params) => {
227298
228007
  const keyBag = keyType._zod.bag;
227299
228008
  const patterns = keyBag?.patterns;
227300
228009
  if (def.mode === "loose" && patterns && patterns.size > 0) {
227301
- const valueSchema = process2(def.valueType, ctx, {
228010
+ const valueSchema = process3(def.valueType, ctx, {
227302
228011
  ...params,
227303
228012
  path: [...params.path, "patternProperties", "*"]
227304
228013
  });
@@ -227308,12 +228017,12 @@ var recordProcessor = (schema, ctx, _json, params) => {
227308
228017
  }
227309
228018
  } else {
227310
228019
  if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") {
227311
- json.propertyNames = process2(def.keyType, ctx, {
228020
+ json.propertyNames = process3(def.keyType, ctx, {
227312
228021
  ...params,
227313
228022
  path: [...params.path, "propertyNames"]
227314
228023
  });
227315
228024
  }
227316
- json.additionalProperties = process2(def.valueType, ctx, {
228025
+ json.additionalProperties = process3(def.valueType, ctx, {
227317
228026
  ...params,
227318
228027
  path: [...params.path, "additionalProperties"]
227319
228028
  });
@@ -227328,7 +228037,7 @@ var recordProcessor = (schema, ctx, _json, params) => {
227328
228037
  };
227329
228038
  var nullableProcessor = (schema, ctx, json, params) => {
227330
228039
  const def = schema._zod.def;
227331
- const inner = process2(def.innerType, ctx, params);
228040
+ const inner = process3(def.innerType, ctx, params);
227332
228041
  const seen = ctx.seen.get(schema);
227333
228042
  if (ctx.target === "openapi-3.0") {
227334
228043
  seen.ref = def.innerType;
@@ -227339,20 +228048,20 @@ var nullableProcessor = (schema, ctx, json, params) => {
227339
228048
  };
227340
228049
  var nonoptionalProcessor = (schema, ctx, _json, params) => {
227341
228050
  const def = schema._zod.def;
227342
- process2(def.innerType, ctx, params);
228051
+ process3(def.innerType, ctx, params);
227343
228052
  const seen = ctx.seen.get(schema);
227344
228053
  seen.ref = def.innerType;
227345
228054
  };
227346
228055
  var defaultProcessor = (schema, ctx, json, params) => {
227347
228056
  const def = schema._zod.def;
227348
- process2(def.innerType, ctx, params);
228057
+ process3(def.innerType, ctx, params);
227349
228058
  const seen = ctx.seen.get(schema);
227350
228059
  seen.ref = def.innerType;
227351
228060
  json.default = JSON.parse(JSON.stringify(def.defaultValue));
227352
228061
  };
227353
228062
  var prefaultProcessor = (schema, ctx, json, params) => {
227354
228063
  const def = schema._zod.def;
227355
- process2(def.innerType, ctx, params);
228064
+ process3(def.innerType, ctx, params);
227356
228065
  const seen = ctx.seen.get(schema);
227357
228066
  seen.ref = def.innerType;
227358
228067
  if (ctx.io === "input")
@@ -227360,7 +228069,7 @@ var prefaultProcessor = (schema, ctx, json, params) => {
227360
228069
  };
227361
228070
  var catchProcessor = (schema, ctx, json, params) => {
227362
228071
  const def = schema._zod.def;
227363
- process2(def.innerType, ctx, params);
228072
+ process3(def.innerType, ctx, params);
227364
228073
  const seen = ctx.seen.get(schema);
227365
228074
  seen.ref = def.innerType;
227366
228075
  let catchValue;
@@ -227374,32 +228083,32 @@ var catchProcessor = (schema, ctx, json, params) => {
227374
228083
  var pipeProcessor = (schema, ctx, _json, params) => {
227375
228084
  const def = schema._zod.def;
227376
228085
  const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
227377
- process2(innerType, ctx, params);
228086
+ process3(innerType, ctx, params);
227378
228087
  const seen = ctx.seen.get(schema);
227379
228088
  seen.ref = innerType;
227380
228089
  };
227381
228090
  var readonlyProcessor = (schema, ctx, json, params) => {
227382
228091
  const def = schema._zod.def;
227383
- process2(def.innerType, ctx, params);
228092
+ process3(def.innerType, ctx, params);
227384
228093
  const seen = ctx.seen.get(schema);
227385
228094
  seen.ref = def.innerType;
227386
228095
  json.readOnly = true;
227387
228096
  };
227388
228097
  var promiseProcessor = (schema, ctx, _json, params) => {
227389
228098
  const def = schema._zod.def;
227390
- process2(def.innerType, ctx, params);
228099
+ process3(def.innerType, ctx, params);
227391
228100
  const seen = ctx.seen.get(schema);
227392
228101
  seen.ref = def.innerType;
227393
228102
  };
227394
228103
  var optionalProcessor = (schema, ctx, _json, params) => {
227395
228104
  const def = schema._zod.def;
227396
- process2(def.innerType, ctx, params);
228105
+ process3(def.innerType, ctx, params);
227397
228106
  const seen = ctx.seen.get(schema);
227398
228107
  seen.ref = def.innerType;
227399
228108
  };
227400
228109
  var lazyProcessor = (schema, ctx, _json, params) => {
227401
228110
  const innerType = schema._zod.innerType;
227402
- process2(innerType, ctx, params);
228111
+ process3(innerType, ctx, params);
227403
228112
  const seen = ctx.seen.get(schema);
227404
228113
  seen.ref = innerType;
227405
228114
  };
@@ -227451,7 +228160,7 @@ function toJSONSchema(input, params) {
227451
228160
  const defs = {};
227452
228161
  for (const entry of registry2._idmap.entries()) {
227453
228162
  const [_2, schema] = entry;
227454
- process2(schema, ctx2);
228163
+ process3(schema, ctx2);
227455
228164
  }
227456
228165
  const schemas = {};
227457
228166
  const external = {
@@ -227474,7 +228183,7 @@ function toJSONSchema(input, params) {
227474
228183
  return { schemas };
227475
228184
  }
227476
228185
  const ctx = initializeContext({ ...params, processors: allProcessors });
227477
- process2(input, ctx);
228186
+ process3(input, ctx);
227478
228187
  extractDefs(ctx, input);
227479
228188
  return finalize(ctx, input);
227480
228189
  }
@@ -227520,7 +228229,7 @@ class JSONSchemaGenerator {
227520
228229
  });
227521
228230
  }
227522
228231
  process(schema, _params = { path: [], schemaPath: [] }) {
227523
- return process2(schema, this.ctx, _params);
228232
+ return process3(schema, this.ctx, _params);
227524
228233
  }
227525
228234
  emit(schema, _params) {
227526
228235
  if (_params) {
@@ -229867,7 +230576,7 @@ var normalizeRetryOptions = (retry2 = {}) => {
229867
230576
  };
229868
230577
 
229869
230578
  // ../../node_modules/ky/distribution/errors/TimeoutError.js
229870
- class TimeoutError extends Error {
230579
+ class TimeoutError2 extends Error {
229871
230580
  request;
229872
230581
  constructor(request) {
229873
230582
  super(`Request timed out: ${request.method} ${request.url}`);
@@ -229883,7 +230592,7 @@ async function timeout(request, init, abortController, options) {
229883
230592
  if (abortController) {
229884
230593
  abortController.abort();
229885
230594
  }
229886
- reject(new TimeoutError(request));
230595
+ reject(new TimeoutError2(request));
229887
230596
  }, options.timeout);
229888
230597
  options.fetch(request, init).then(resolve).catch(reject).then(() => {
229889
230598
  clearTimeout(timeoutId);
@@ -229946,7 +230655,7 @@ function isHTTPError(error48) {
229946
230655
  return error48 instanceof HTTPError || error48?.name === HTTPError.name;
229947
230656
  }
229948
230657
  function isTimeoutError(error48) {
229949
- return error48 instanceof TimeoutError || error48?.name === TimeoutError.name;
230658
+ return error48 instanceof TimeoutError2 || error48?.name === TimeoutError2.name;
229950
230659
  }
229951
230660
 
229952
230661
  // ../../node_modules/ky/distribution/core/Ky.js
@@ -236412,7 +237121,7 @@ async function downloadProject(projectId, projectPath) {
236412
237121
  await pipeline(nodeStream, extract({ cwd: projectPath }));
236413
237122
  }
236414
237123
  // ../../node_modules/globby/index.js
236415
- import process4 from "node:process";
237124
+ import process5 from "node:process";
236416
237125
  import fs13 from "node:fs";
236417
237126
  import nodePath from "node:path";
236418
237127
  import { Readable as Readable2 } from "node:stream";
@@ -236650,7 +237359,7 @@ var TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
236650
237359
  // ../../node_modules/globby/ignore.js
236651
237360
  var import_fast_glob = __toESM(require_out4(), 1);
236652
237361
  var import_ignore = __toESM(require_ignore(), 1);
236653
- import process3 from "node:process";
237362
+ import process4 from "node:process";
236654
237363
  import fs12 from "node:fs";
236655
237364
  import fsPromises from "node:fs/promises";
236656
237365
  import path10 from "node:path";
@@ -236984,7 +237693,7 @@ var createIgnorePredicate = (patterns, cwd, baseDir) => {
236984
237693
  };
236985
237694
  var normalizeOptions = (options = {}) => {
236986
237695
  const ignoreOption = options.ignore ? Array.isArray(options.ignore) ? options.ignore : [options.ignore] : [];
236987
- const cwd = toPath(options.cwd) ?? process3.cwd();
237696
+ const cwd = toPath(options.cwd) ?? process4.cwd();
236988
237697
  const deep = typeof options.deep === "number" ? Math.max(0, options.deep) + 1 : Number.POSITIVE_INFINITY;
236989
237698
  return {
236990
237699
  cwd,
@@ -237068,7 +237777,7 @@ var getDirectoryGlob = ({ directoryPath, files, extensions }) => {
237068
237777
  return files ? files.map((file2) => nodePath.posix.join(directoryPath, `**/${nodePath.extname(file2) ? file2 : `${file2}${extensionGlob}`}`)) : [nodePath.posix.join(directoryPath, `**${extensionGlob ? `/*${extensionGlob}` : ""}`)];
237069
237778
  };
237070
237779
  var directoryToGlob = async (directoryPaths, {
237071
- cwd = process4.cwd(),
237780
+ cwd = process5.cwd(),
237072
237781
  files,
237073
237782
  extensions,
237074
237783
  fs: fsImplementation
@@ -237084,7 +237793,7 @@ var directoryToGlob = async (directoryPaths, {
237084
237793
  return globs.flat();
237085
237794
  };
237086
237795
  var directoryToGlobSync = (directoryPaths, {
237087
- cwd = process4.cwd(),
237796
+ cwd = process5.cwd(),
237088
237797
  files,
237089
237798
  extensions,
237090
237799
  fs: fsImplementation
@@ -237178,7 +237887,7 @@ var applyIgnoreFilesAndGetFilterSync = (options) => {
237178
237887
  };
237179
237888
  var createFilterFunction = (isIgnored, cwd) => {
237180
237889
  const seen = new Set;
237181
- const basePath = cwd || process4.cwd();
237890
+ const basePath = cwd || process5.cwd();
237182
237891
  const pathCache = new Map;
237183
237892
  return (fastGlobResult) => {
237184
237893
  const pathKey = nodePath.normalize(fastGlobResult.path ?? fastGlobResult);
@@ -238719,7 +239428,6 @@ var package_default = {
238719
239428
  files: [
238720
239429
  "dist/cli",
238721
239430
  "dist/assets",
238722
- "dist/deno-runtime",
238723
239431
  "bin"
238724
239432
  ],
238725
239433
  scripts: {
@@ -238810,6 +239518,9 @@ function getTemplatesIndexPath() {
238810
239518
  function getDenoWrapperPath() {
238811
239519
  return join8(ASSETS_DIR, "deno-runtime", "main.ts");
238812
239520
  }
239521
+ function getExecWrapperPath() {
239522
+ return join8(ASSETS_DIR, "deno-runtime", "exec.ts");
239523
+ }
238813
239524
  function ensureNpmAssets(sourceDir) {
238814
239525
  if (existsSync(ASSETS_DIR))
238815
239526
  return;
@@ -239179,799 +239890,6 @@ async function getUserInfo(accessToken) {
239179
239890
  }
239180
239891
  return result.data;
239181
239892
  }
239182
- // src/core/resources/secret/schema.ts
239183
- var ListSecretsResponseSchema = exports_external.record(exports_external.string(), exports_external.string());
239184
- var SetSecretsResponseSchema = exports_external.object({
239185
- success: exports_external.boolean()
239186
- });
239187
- var DeleteSecretResponseSchema = exports_external.object({
239188
- success: exports_external.boolean()
239189
- });
239190
-
239191
- // src/core/resources/secret/api.ts
239192
- async function listSecrets() {
239193
- const appClient = getAppClient();
239194
- let response;
239195
- try {
239196
- response = await appClient.get("secrets");
239197
- } catch (error48) {
239198
- throw await ApiError.fromHttpError(error48, "listing secrets");
239199
- }
239200
- const result = ListSecretsResponseSchema.safeParse(await response.json());
239201
- if (!result.success) {
239202
- throw new SchemaValidationError("Invalid response from server", result.error);
239203
- }
239204
- return result.data;
239205
- }
239206
- async function setSecrets(secrets) {
239207
- const appClient = getAppClient();
239208
- let response;
239209
- try {
239210
- response = await appClient.post("secrets", {
239211
- json: secrets,
239212
- timeout: false
239213
- });
239214
- } catch (error48) {
239215
- throw await ApiError.fromHttpError(error48, "setting secrets");
239216
- }
239217
- const result = SetSecretsResponseSchema.safeParse(await response.json());
239218
- if (!result.success) {
239219
- throw new SchemaValidationError("Invalid response from server", result.error);
239220
- }
239221
- return result.data;
239222
- }
239223
- async function deleteSecret(name2) {
239224
- const appClient = getAppClient();
239225
- let response;
239226
- try {
239227
- response = await appClient.delete("secrets", {
239228
- searchParams: { secret_name: name2 },
239229
- timeout: false
239230
- });
239231
- } catch (error48) {
239232
- throw await ApiError.fromHttpError(error48, "deleting secret");
239233
- }
239234
- const result = DeleteSecretResponseSchema.safeParse(await response.json());
239235
- if (!result.success) {
239236
- throw new SchemaValidationError("Invalid response from server", result.error);
239237
- }
239238
- return result.data;
239239
- }
239240
- // src/core/utils/env.ts
239241
- var import_dotenv = __toESM(require_main(), 1);
239242
- async function parseEnvFile(filePath) {
239243
- const content = await readTextFile(filePath);
239244
- return import_dotenv.parse(content);
239245
- }
239246
- // ../../node_modules/chalk/source/vendor/ansi-styles/index.js
239247
- var ANSI_BACKGROUND_OFFSET = 10;
239248
- var wrapAnsi16 = (offset = 0) => (code2) => `\x1B[${code2 + offset}m`;
239249
- var wrapAnsi256 = (offset = 0) => (code2) => `\x1B[${38 + offset};5;${code2}m`;
239250
- var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
239251
- var styles = {
239252
- modifier: {
239253
- reset: [0, 0],
239254
- bold: [1, 22],
239255
- dim: [2, 22],
239256
- italic: [3, 23],
239257
- underline: [4, 24],
239258
- overline: [53, 55],
239259
- inverse: [7, 27],
239260
- hidden: [8, 28],
239261
- strikethrough: [9, 29]
239262
- },
239263
- color: {
239264
- black: [30, 39],
239265
- red: [31, 39],
239266
- green: [32, 39],
239267
- yellow: [33, 39],
239268
- blue: [34, 39],
239269
- magenta: [35, 39],
239270
- cyan: [36, 39],
239271
- white: [37, 39],
239272
- blackBright: [90, 39],
239273
- gray: [90, 39],
239274
- grey: [90, 39],
239275
- redBright: [91, 39],
239276
- greenBright: [92, 39],
239277
- yellowBright: [93, 39],
239278
- blueBright: [94, 39],
239279
- magentaBright: [95, 39],
239280
- cyanBright: [96, 39],
239281
- whiteBright: [97, 39]
239282
- },
239283
- bgColor: {
239284
- bgBlack: [40, 49],
239285
- bgRed: [41, 49],
239286
- bgGreen: [42, 49],
239287
- bgYellow: [43, 49],
239288
- bgBlue: [44, 49],
239289
- bgMagenta: [45, 49],
239290
- bgCyan: [46, 49],
239291
- bgWhite: [47, 49],
239292
- bgBlackBright: [100, 49],
239293
- bgGray: [100, 49],
239294
- bgGrey: [100, 49],
239295
- bgRedBright: [101, 49],
239296
- bgGreenBright: [102, 49],
239297
- bgYellowBright: [103, 49],
239298
- bgBlueBright: [104, 49],
239299
- bgMagentaBright: [105, 49],
239300
- bgCyanBright: [106, 49],
239301
- bgWhiteBright: [107, 49]
239302
- }
239303
- };
239304
- var modifierNames = Object.keys(styles.modifier);
239305
- var foregroundColorNames = Object.keys(styles.color);
239306
- var backgroundColorNames = Object.keys(styles.bgColor);
239307
- var colorNames = [...foregroundColorNames, ...backgroundColorNames];
239308
- function assembleStyles() {
239309
- const codes = new Map;
239310
- for (const [groupName, group] of Object.entries(styles)) {
239311
- for (const [styleName, style] of Object.entries(group)) {
239312
- styles[styleName] = {
239313
- open: `\x1B[${style[0]}m`,
239314
- close: `\x1B[${style[1]}m`
239315
- };
239316
- group[styleName] = styles[styleName];
239317
- codes.set(style[0], style[1]);
239318
- }
239319
- Object.defineProperty(styles, groupName, {
239320
- value: group,
239321
- enumerable: false
239322
- });
239323
- }
239324
- Object.defineProperty(styles, "codes", {
239325
- value: codes,
239326
- enumerable: false
239327
- });
239328
- styles.color.close = "\x1B[39m";
239329
- styles.bgColor.close = "\x1B[49m";
239330
- styles.color.ansi = wrapAnsi16();
239331
- styles.color.ansi256 = wrapAnsi256();
239332
- styles.color.ansi16m = wrapAnsi16m();
239333
- styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
239334
- styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
239335
- styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
239336
- Object.defineProperties(styles, {
239337
- rgbToAnsi256: {
239338
- value(red, green, blue) {
239339
- if (red === green && green === blue) {
239340
- if (red < 8) {
239341
- return 16;
239342
- }
239343
- if (red > 248) {
239344
- return 231;
239345
- }
239346
- return Math.round((red - 8) / 247 * 24) + 232;
239347
- }
239348
- return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
239349
- },
239350
- enumerable: false
239351
- },
239352
- hexToRgb: {
239353
- value(hex3) {
239354
- const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex3.toString(16));
239355
- if (!matches) {
239356
- return [0, 0, 0];
239357
- }
239358
- let [colorString] = matches;
239359
- if (colorString.length === 3) {
239360
- colorString = [...colorString].map((character) => character + character).join("");
239361
- }
239362
- const integer2 = Number.parseInt(colorString, 16);
239363
- return [
239364
- integer2 >> 16 & 255,
239365
- integer2 >> 8 & 255,
239366
- integer2 & 255
239367
- ];
239368
- },
239369
- enumerable: false
239370
- },
239371
- hexToAnsi256: {
239372
- value: (hex3) => styles.rgbToAnsi256(...styles.hexToRgb(hex3)),
239373
- enumerable: false
239374
- },
239375
- ansi256ToAnsi: {
239376
- value(code2) {
239377
- if (code2 < 8) {
239378
- return 30 + code2;
239379
- }
239380
- if (code2 < 16) {
239381
- return 90 + (code2 - 8);
239382
- }
239383
- let red;
239384
- let green;
239385
- let blue;
239386
- if (code2 >= 232) {
239387
- red = ((code2 - 232) * 10 + 8) / 255;
239388
- green = red;
239389
- blue = red;
239390
- } else {
239391
- code2 -= 16;
239392
- const remainder = code2 % 36;
239393
- red = Math.floor(code2 / 36) / 5;
239394
- green = Math.floor(remainder / 6) / 5;
239395
- blue = remainder % 6 / 5;
239396
- }
239397
- const value = Math.max(red, green, blue) * 2;
239398
- if (value === 0) {
239399
- return 30;
239400
- }
239401
- let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
239402
- if (value === 2) {
239403
- result += 60;
239404
- }
239405
- return result;
239406
- },
239407
- enumerable: false
239408
- },
239409
- rgbToAnsi: {
239410
- value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
239411
- enumerable: false
239412
- },
239413
- hexToAnsi: {
239414
- value: (hex3) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex3)),
239415
- enumerable: false
239416
- }
239417
- });
239418
- return styles;
239419
- }
239420
- var ansiStyles = assembleStyles();
239421
- var ansi_styles_default = ansiStyles;
239422
-
239423
- // ../../node_modules/chalk/source/vendor/supports-color/index.js
239424
- import process5 from "node:process";
239425
- import os from "node:os";
239426
- import tty from "node:tty";
239427
- function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process5.argv) {
239428
- const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
239429
- const position = argv.indexOf(prefix + flag);
239430
- const terminatorPosition = argv.indexOf("--");
239431
- return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
239432
- }
239433
- var { env: env2 } = process5;
239434
- var flagForceColor;
239435
- if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
239436
- flagForceColor = 0;
239437
- } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
239438
- flagForceColor = 1;
239439
- }
239440
- function envForceColor() {
239441
- if ("FORCE_COLOR" in env2) {
239442
- if (env2.FORCE_COLOR === "true") {
239443
- return 1;
239444
- }
239445
- if (env2.FORCE_COLOR === "false") {
239446
- return 0;
239447
- }
239448
- return env2.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env2.FORCE_COLOR, 10), 3);
239449
- }
239450
- }
239451
- function translateLevel(level) {
239452
- if (level === 0) {
239453
- return false;
239454
- }
239455
- return {
239456
- level,
239457
- hasBasic: true,
239458
- has256: level >= 2,
239459
- has16m: level >= 3
239460
- };
239461
- }
239462
- function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
239463
- const noFlagForceColor = envForceColor();
239464
- if (noFlagForceColor !== undefined) {
239465
- flagForceColor = noFlagForceColor;
239466
- }
239467
- const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
239468
- if (forceColor === 0) {
239469
- return 0;
239470
- }
239471
- if (sniffFlags) {
239472
- if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
239473
- return 3;
239474
- }
239475
- if (hasFlag("color=256")) {
239476
- return 2;
239477
- }
239478
- }
239479
- if ("TF_BUILD" in env2 && "AGENT_NAME" in env2) {
239480
- return 1;
239481
- }
239482
- if (haveStream && !streamIsTTY && forceColor === undefined) {
239483
- return 0;
239484
- }
239485
- const min = forceColor || 0;
239486
- if (env2.TERM === "dumb") {
239487
- return min;
239488
- }
239489
- if (process5.platform === "win32") {
239490
- const osRelease = os.release().split(".");
239491
- if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
239492
- return Number(osRelease[2]) >= 14931 ? 3 : 2;
239493
- }
239494
- return 1;
239495
- }
239496
- if ("CI" in env2) {
239497
- if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => (key in env2))) {
239498
- return 3;
239499
- }
239500
- if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => (sign in env2)) || env2.CI_NAME === "codeship") {
239501
- return 1;
239502
- }
239503
- return min;
239504
- }
239505
- if ("TEAMCITY_VERSION" in env2) {
239506
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0;
239507
- }
239508
- if (env2.COLORTERM === "truecolor") {
239509
- return 3;
239510
- }
239511
- if (env2.TERM === "xterm-kitty") {
239512
- return 3;
239513
- }
239514
- if (env2.TERM === "xterm-ghostty") {
239515
- return 3;
239516
- }
239517
- if (env2.TERM === "wezterm") {
239518
- return 3;
239519
- }
239520
- if ("TERM_PROGRAM" in env2) {
239521
- const version2 = Number.parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
239522
- switch (env2.TERM_PROGRAM) {
239523
- case "iTerm.app": {
239524
- return version2 >= 3 ? 3 : 2;
239525
- }
239526
- case "Apple_Terminal": {
239527
- return 2;
239528
- }
239529
- }
239530
- }
239531
- if (/-256(color)?$/i.test(env2.TERM)) {
239532
- return 2;
239533
- }
239534
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) {
239535
- return 1;
239536
- }
239537
- if ("COLORTERM" in env2) {
239538
- return 1;
239539
- }
239540
- return min;
239541
- }
239542
- function createSupportsColor(stream, options = {}) {
239543
- const level = _supportsColor(stream, {
239544
- streamIsTTY: stream && stream.isTTY,
239545
- ...options
239546
- });
239547
- return translateLevel(level);
239548
- }
239549
- var supportsColor = {
239550
- stdout: createSupportsColor({ isTTY: tty.isatty(1) }),
239551
- stderr: createSupportsColor({ isTTY: tty.isatty(2) })
239552
- };
239553
- var supports_color_default = supportsColor;
239554
-
239555
- // ../../node_modules/chalk/source/utilities.js
239556
- function stringReplaceAll(string4, substring, replacer) {
239557
- let index = string4.indexOf(substring);
239558
- if (index === -1) {
239559
- return string4;
239560
- }
239561
- const substringLength = substring.length;
239562
- let endIndex = 0;
239563
- let returnValue = "";
239564
- do {
239565
- returnValue += string4.slice(endIndex, index) + substring + replacer;
239566
- endIndex = index + substringLength;
239567
- index = string4.indexOf(substring, endIndex);
239568
- } while (index !== -1);
239569
- returnValue += string4.slice(endIndex);
239570
- return returnValue;
239571
- }
239572
- function stringEncaseCRLFWithFirstIndex(string4, prefix, postfix, index) {
239573
- let endIndex = 0;
239574
- let returnValue = "";
239575
- do {
239576
- const gotCR = string4[index - 1] === "\r";
239577
- returnValue += string4.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? `\r
239578
- ` : `
239579
- `) + postfix;
239580
- endIndex = index + 1;
239581
- index = string4.indexOf(`
239582
- `, endIndex);
239583
- } while (index !== -1);
239584
- returnValue += string4.slice(endIndex);
239585
- return returnValue;
239586
- }
239587
-
239588
- // ../../node_modules/chalk/source/index.js
239589
- var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
239590
- var GENERATOR = Symbol("GENERATOR");
239591
- var STYLER = Symbol("STYLER");
239592
- var IS_EMPTY = Symbol("IS_EMPTY");
239593
- var levelMapping = [
239594
- "ansi",
239595
- "ansi",
239596
- "ansi256",
239597
- "ansi16m"
239598
- ];
239599
- var styles2 = Object.create(null);
239600
- var applyOptions = (object2, options = {}) => {
239601
- if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
239602
- throw new Error("The `level` option should be an integer from 0 to 3");
239603
- }
239604
- const colorLevel = stdoutColor ? stdoutColor.level : 0;
239605
- object2.level = options.level === undefined ? colorLevel : options.level;
239606
- };
239607
- var chalkFactory = (options) => {
239608
- const chalk = (...strings) => strings.join(" ");
239609
- applyOptions(chalk, options);
239610
- Object.setPrototypeOf(chalk, createChalk.prototype);
239611
- return chalk;
239612
- };
239613
- function createChalk(options) {
239614
- return chalkFactory(options);
239615
- }
239616
- Object.setPrototypeOf(createChalk.prototype, Function.prototype);
239617
- for (const [styleName, style] of Object.entries(ansi_styles_default)) {
239618
- styles2[styleName] = {
239619
- get() {
239620
- const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
239621
- Object.defineProperty(this, styleName, { value: builder });
239622
- return builder;
239623
- }
239624
- };
239625
- }
239626
- styles2.visible = {
239627
- get() {
239628
- const builder = createBuilder(this, this[STYLER], true);
239629
- Object.defineProperty(this, "visible", { value: builder });
239630
- return builder;
239631
- }
239632
- };
239633
- var getModelAnsi = (model, level, type, ...arguments_) => {
239634
- if (model === "rgb") {
239635
- if (level === "ansi16m") {
239636
- return ansi_styles_default[type].ansi16m(...arguments_);
239637
- }
239638
- if (level === "ansi256") {
239639
- return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
239640
- }
239641
- return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
239642
- }
239643
- if (model === "hex") {
239644
- return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_));
239645
- }
239646
- return ansi_styles_default[type][model](...arguments_);
239647
- };
239648
- var usedModels = ["rgb", "hex", "ansi256"];
239649
- for (const model of usedModels) {
239650
- styles2[model] = {
239651
- get() {
239652
- const { level } = this;
239653
- return function(...arguments_) {
239654
- const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
239655
- return createBuilder(this, styler, this[IS_EMPTY]);
239656
- };
239657
- }
239658
- };
239659
- const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
239660
- styles2[bgModel] = {
239661
- get() {
239662
- const { level } = this;
239663
- return function(...arguments_) {
239664
- const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
239665
- return createBuilder(this, styler, this[IS_EMPTY]);
239666
- };
239667
- }
239668
- };
239669
- }
239670
- var proto = Object.defineProperties(() => {}, {
239671
- ...styles2,
239672
- level: {
239673
- enumerable: true,
239674
- get() {
239675
- return this[GENERATOR].level;
239676
- },
239677
- set(level) {
239678
- this[GENERATOR].level = level;
239679
- }
239680
- }
239681
- });
239682
- var createStyler = (open, close, parent) => {
239683
- let openAll;
239684
- let closeAll;
239685
- if (parent === undefined) {
239686
- openAll = open;
239687
- closeAll = close;
239688
- } else {
239689
- openAll = parent.openAll + open;
239690
- closeAll = close + parent.closeAll;
239691
- }
239692
- return {
239693
- open,
239694
- close,
239695
- openAll,
239696
- closeAll,
239697
- parent
239698
- };
239699
- };
239700
- var createBuilder = (self2, _styler, _isEmpty) => {
239701
- const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
239702
- Object.setPrototypeOf(builder, proto);
239703
- builder[GENERATOR] = self2;
239704
- builder[STYLER] = _styler;
239705
- builder[IS_EMPTY] = _isEmpty;
239706
- return builder;
239707
- };
239708
- var applyStyle = (self2, string4) => {
239709
- if (self2.level <= 0 || !string4) {
239710
- return self2[IS_EMPTY] ? "" : string4;
239711
- }
239712
- let styler = self2[STYLER];
239713
- if (styler === undefined) {
239714
- return string4;
239715
- }
239716
- const { openAll, closeAll } = styler;
239717
- if (string4.includes("\x1B")) {
239718
- while (styler !== undefined) {
239719
- string4 = stringReplaceAll(string4, styler.close, styler.open);
239720
- styler = styler.parent;
239721
- }
239722
- }
239723
- const lfIndex = string4.indexOf(`
239724
- `);
239725
- if (lfIndex !== -1) {
239726
- string4 = stringEncaseCRLFWithFirstIndex(string4, closeAll, openAll, lfIndex);
239727
- }
239728
- return openAll + string4 + closeAll;
239729
- };
239730
- Object.defineProperties(createChalk.prototype, styles2);
239731
- var chalk = createChalk();
239732
- var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
239733
- var source_default = chalk;
239734
-
239735
- // src/cli/utils/theme.ts
239736
- var theme = {
239737
- colors: {
239738
- base44Orange: source_default.hex("#E86B3C"),
239739
- base44OrangeBackground: source_default.bgHex("#E86B3C"),
239740
- shinyOrange: source_default.hex("#FFD700"),
239741
- links: source_default.hex("#00D4FF"),
239742
- white: source_default.white
239743
- },
239744
- styles: {
239745
- header: source_default.dim,
239746
- bold: source_default.bold,
239747
- dim: source_default.dim,
239748
- error: source_default.red,
239749
- warn: source_default.yellow
239750
- },
239751
- format: {
239752
- errorContext(ctx) {
239753
- const parts = [
239754
- ctx.sessionId ? `Session: ${ctx.sessionId}` : null,
239755
- ctx.appId ? `App: ${ctx.appId}` : null,
239756
- new Date().toISOString()
239757
- ].filter(Boolean);
239758
- return source_default.dim(parts.join(" | "));
239759
- },
239760
- details(lines) {
239761
- return lines.map((line) => ` • ${line}`).join(`
239762
- `);
239763
- },
239764
- agentHints(hints) {
239765
- if (hints.length === 0) {
239766
- return null;
239767
- }
239768
- const hintLines = hints.map((hint) => {
239769
- if (hint.command) {
239770
- return ` Run: ${hint.command}`;
239771
- }
239772
- return ` ${hint.message}`;
239773
- });
239774
- return ["[Agent Hints]", ...hintLines].join(`
239775
- `);
239776
- }
239777
- }
239778
- };
239779
-
239780
- // src/cli/utils/animate.ts
239781
- function sleep(ms) {
239782
- return new Promise((resolve2) => setTimeout(resolve2, ms));
239783
- }
239784
- async function animateLineReveal(line, duration3) {
239785
- const steps = 8;
239786
- const stepDuration = duration3 / steps;
239787
- for (let step = 0;step <= steps; step++) {
239788
- const progress = step / steps;
239789
- const revealIndex = Math.floor(progress * line.length);
239790
- let output = "";
239791
- for (let i = 0;i < line.length; i++) {
239792
- if (i < revealIndex) {
239793
- output += theme.colors.base44Orange(line[i]);
239794
- } else if (i === revealIndex) {
239795
- output += theme.colors.shinyOrange(line[i]);
239796
- } else {
239797
- output += theme.styles.dim(line[i]);
239798
- }
239799
- }
239800
- process.stdout.write(`\r${output}`);
239801
- await sleep(stepDuration);
239802
- }
239803
- process.stdout.write(`\r${theme.colors.base44Orange(line)}
239804
- `);
239805
- }
239806
- async function shimmerPass(lines, duration3) {
239807
- const moveUp = `\x1B[${lines.length}A`;
239808
- const steps = 12;
239809
- const stepDuration = duration3 / steps;
239810
- const maxWidth = Math.max(...lines.map((l) => l.length));
239811
- for (let step = 0;step <= steps; step++) {
239812
- const shimmerPos = Math.floor(step / steps * (maxWidth + 6));
239813
- process.stdout.write(moveUp);
239814
- for (const line of lines) {
239815
- let output = "";
239816
- for (let i = 0;i < line.length; i++) {
239817
- const dist = Math.abs(i - shimmerPos);
239818
- if (dist < 3) {
239819
- output += dist === 0 ? theme.colors.white(line[i]) : theme.colors.shinyOrange(line[i]);
239820
- } else {
239821
- output += theme.colors.base44Orange(line[i]);
239822
- }
239823
- }
239824
- console.log(output);
239825
- }
239826
- await sleep(stepDuration);
239827
- }
239828
- process.stdout.write(moveUp);
239829
- for (const line of lines) {
239830
- console.log(theme.colors.base44Orange(line));
239831
- }
239832
- }
239833
- async function printAnimatedLines(lines) {
239834
- const totalDuration = 1000;
239835
- const lineDelay = totalDuration / lines.length;
239836
- for (let i = 0;i < lines.length; i++) {
239837
- const line = lines[i];
239838
- await animateLineReveal(line, 100);
239839
- if (i < lines.length - 1) {
239840
- await sleep(lineDelay - 100);
239841
- }
239842
- }
239843
- await shimmerPass(lines, 200);
239844
- }
239845
-
239846
- // src/cli/utils/banner.ts
239847
- var BANNER_LINES = [
239848
- "██████╗ █████╗ ███████╗███████╗ ██╗ ██╗██╗ ██╗",
239849
- "██╔══██╗██╔══██╗██╔════╝██╔════╝ ██║ ██║██║ ██║",
239850
- "██████╔╝███████║███████╗█████╗ ███████║███████║",
239851
- "██╔══██╗██╔══██║╚════██║██╔══╝ ╚════██║╚════██║",
239852
- "██████╔╝██║ ██║███████║███████╗ ██║ ██║",
239853
- "╚═════╝ ╚═╝ ╚═╝╚══════╝╚══════╝ ╚═╝ ╚═╝"
239854
- ];
239855
- async function printBanner(isNonInteractive) {
239856
- if (isNonInteractive) {
239857
- console.log(theme.colors.base44Orange(BANNER_LINES.join(`
239858
- `)));
239859
- } else {
239860
- await printAnimatedLines(BANNER_LINES);
239861
- }
239862
- }
239863
- // src/cli/errors.ts
239864
- class CLIExitError extends Error {
239865
- code;
239866
- constructor(code2) {
239867
- super(`CLI exited with code ${code2}`);
239868
- this.code = code2;
239869
- this.name = "CLIExitError";
239870
- }
239871
- }
239872
-
239873
- // src/cli/utils/prompts.ts
239874
- var onPromptCancel = () => {
239875
- Ne("Operation cancelled.");
239876
- throw new CLIExitError(0);
239877
- };
239878
- // ../../node_modules/p-wait-for/index.js
239879
- var resolveValue = Symbol("resolveValue");
239880
- var sleep2 = (ms, signal) => new Promise((resolve2, reject) => {
239881
- if (signal?.aborted) {
239882
- reject(signal.reason);
239883
- return;
239884
- }
239885
- const timeout2 = setTimeout(resolve2, ms);
239886
- if (signal) {
239887
- signal.addEventListener("abort", () => {
239888
- clearTimeout(timeout2);
239889
- reject(signal.reason);
239890
- }, { once: true });
239891
- }
239892
- });
239893
- var validateOptions = (interval, timeout2) => {
239894
- if (typeof interval !== "number" || !Number.isFinite(interval) || interval < 0) {
239895
- throw new TypeError("Expected interval to be a finite non-negative number");
239896
- }
239897
- if (typeof timeout2 === "object" && timeout2 !== null) {
239898
- if (typeof timeout2.milliseconds !== "number" || Number.isNaN(timeout2.milliseconds) || timeout2.milliseconds < 0) {
239899
- throw new TypeError("Expected timeout.milliseconds to be a finite non-negative number");
239900
- }
239901
- } else if (typeof timeout2 === "number" && (Number.isNaN(timeout2) || timeout2 < 0)) {
239902
- throw new TypeError("Expected timeout to be a finite non-negative number");
239903
- }
239904
- };
239905
- var createTimeoutError = (timeout2) => {
239906
- if (timeout2.message instanceof Error) {
239907
- return timeout2.message;
239908
- }
239909
- const message = timeout2.message ?? `Promise timed out after ${timeout2.milliseconds} milliseconds`;
239910
- return new TimeoutError2(message);
239911
- };
239912
- var handleFallback = (timeout2) => {
239913
- if (timeout2.fallback) {
239914
- return timeout2.fallback();
239915
- }
239916
- throw createTimeoutError(timeout2);
239917
- };
239918
- var handleAbortError = (timeoutSignal, timeout2, signal) => {
239919
- if (timeoutSignal?.aborted) {
239920
- if (typeof timeout2 === "object") {
239921
- return handleFallback(timeout2);
239922
- }
239923
- throw new TimeoutError2;
239924
- }
239925
- throw signal.reason;
239926
- };
239927
- async function pWaitFor(condition, options = {}) {
239928
- const {
239929
- interval = 20,
239930
- timeout: timeout2 = Number.POSITIVE_INFINITY,
239931
- before = true,
239932
- signal
239933
- } = options;
239934
- validateOptions(interval, timeout2);
239935
- const timeoutMs = typeof timeout2 === "number" ? timeout2 : timeout2?.milliseconds ?? Number.POSITIVE_INFINITY;
239936
- const timeoutSignal = timeoutMs === Number.POSITIVE_INFINITY ? undefined : AbortSignal.timeout(timeoutMs);
239937
- const combinedSignal = timeoutSignal && signal ? AbortSignal.any([timeoutSignal, signal]) : timeoutSignal ?? signal;
239938
- if (!before) {
239939
- await sleep2(interval, combinedSignal);
239940
- }
239941
- if (combinedSignal?.aborted) {
239942
- return handleAbortError(timeoutSignal, timeout2, signal);
239943
- }
239944
- while (true) {
239945
- try {
239946
- const value = await condition();
239947
- if (typeof value === "object" && value !== null && resolveValue in value) {
239948
- return value[resolveValue];
239949
- }
239950
- if (value === true) {
239951
- return;
239952
- }
239953
- if (value === false) {
239954
- await sleep2(interval, combinedSignal);
239955
- continue;
239956
- }
239957
- throw new TypeError("Expected condition to return a boolean");
239958
- } catch (error48) {
239959
- if (error48 === combinedSignal?.reason) {
239960
- return handleAbortError(timeoutSignal, timeout2, signal);
239961
- }
239962
- throw error48;
239963
- }
239964
- }
239965
- }
239966
- pWaitFor.resolveWith = (value) => ({ [resolveValue]: value });
239967
-
239968
- class TimeoutError2 extends Error {
239969
- constructor(message = "Promise timed out") {
239970
- super(message);
239971
- this.name = "TimeoutError";
239972
- }
239973
- }
239974
-
239975
239893
  // src/cli/commands/auth/login-flow.ts
239976
239894
  async function generateAndDisplayDeviceCode() {
239977
239895
  const deviceCodeResponse = await runTask("Generating device code...", async () => {
@@ -240034,6 +239952,25 @@ async function login() {
240034
239952
  };
240035
239953
  }
240036
239954
 
239955
+ // src/cli/utils/command/middleware.ts
239956
+ async function ensureAuth(errorReporter) {
239957
+ const loggedIn = await isLoggedIn();
239958
+ if (!loggedIn) {
239959
+ R2.info("You need to login first to continue.");
239960
+ await login();
239961
+ }
239962
+ try {
239963
+ const userInfo = await readAuth();
239964
+ errorReporter.setContext({
239965
+ user: { email: userInfo.email, name: userInfo.name }
239966
+ });
239967
+ } catch {}
239968
+ }
239969
+ async function ensureAppConfig(errorReporter) {
239970
+ const appConfig = await initAppConfig();
239971
+ errorReporter.setContext({ appId: appConfig.id });
239972
+ }
239973
+
240037
239974
  // ../../node_modules/is-plain-obj/index.js
240038
239975
  function isPlainObject2(value) {
240039
239976
  if (typeof value !== "object" || value === null) {
@@ -240377,12 +240314,12 @@ var NO_ESCAPE_REGEXP = /^[\w./-]+$/;
240377
240314
  // ../../node_modules/is-unicode-supported/index.js
240378
240315
  import process7 from "node:process";
240379
240316
  function isUnicodeSupported() {
240380
- const { env: env3 } = process7;
240381
- const { TERM, TERM_PROGRAM } = env3;
240317
+ const { env: env2 } = process7;
240318
+ const { TERM, TERM_PROGRAM } = env2;
240382
240319
  if (process7.platform !== "win32") {
240383
240320
  return TERM !== "linux";
240384
240321
  }
240385
- return Boolean(env3.WT_SESSION) || Boolean(env3.TERMINUS_SUBLIME) || env3.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env3.TERMINAL_EMULATOR === "JetBrains-JediTerm";
240322
+ return Boolean(env2.WT_SESSION) || Boolean(env2.TERMINUS_SUBLIME) || env2.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env2.TERMINAL_EMULATOR === "JetBrains-JediTerm";
240386
240323
  }
240387
240324
 
240388
240325
  // ../../node_modules/figures/index.js
@@ -240895,13 +240832,13 @@ import path12 from "node:path";
240895
240832
  // ../../node_modules/npm-run-path/node_modules/path-key/index.js
240896
240833
  function pathKey(options = {}) {
240897
240834
  const {
240898
- env: env3 = process.env,
240835
+ env: env2 = process.env,
240899
240836
  platform: platform6 = process.platform
240900
240837
  } = options;
240901
240838
  if (platform6 !== "win32") {
240902
240839
  return "PATH";
240903
240840
  }
240904
- return Object.keys(env3).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
240841
+ return Object.keys(env2).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
240905
240842
  }
240906
240843
 
240907
240844
  // ../../node_modules/npm-run-path/node_modules/unicorn-magic/node.js
@@ -240961,12 +240898,12 @@ var applyExecPath = (result, pathParts, execPath, cwdPath) => {
240961
240898
  result.push(pathPart);
240962
240899
  }
240963
240900
  };
240964
- var npmRunPathEnv = ({ env: env3 = process8.env, ...options } = {}) => {
240965
- env3 = { ...env3 };
240966
- const pathName = pathKey({ env: env3 });
240967
- options.path = env3[pathName];
240968
- env3[pathName] = npmRunPath(options);
240969
- return env3;
240901
+ var npmRunPathEnv = ({ env: env2 = process8.env, ...options } = {}) => {
240902
+ env2 = { ...env2 };
240903
+ const pathName = pathKey({ env: env2 });
240904
+ options.path = env2[pathName];
240905
+ env2[pathName] = npmRunPath(options);
240906
+ return env2;
240970
240907
  };
240971
240908
 
240972
240909
  // ../../node_modules/execa/lib/terminate/kill.js
@@ -242315,17 +242252,17 @@ var addDefaultOptions = ({
242315
242252
  serialization
242316
242253
  });
242317
242254
  var getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath: nodePath2 }) => {
242318
- const env3 = extendEnv ? { ...process10.env, ...envOption } : envOption;
242255
+ const env2 = extendEnv ? { ...process10.env, ...envOption } : envOption;
242319
242256
  if (preferLocal || node) {
242320
242257
  return npmRunPathEnv({
242321
- env: env3,
242258
+ env: env2,
242322
242259
  cwd: localDirectory,
242323
242260
  execPath: nodePath2,
242324
242261
  preferLocal,
242325
242262
  addExecPath: node
242326
242263
  });
242327
242264
  }
242328
- return env3;
242265
+ return env2;
242329
242266
  };
242330
242267
 
242331
242268
  // ../../node_modules/execa/lib/arguments/shell.js
@@ -246594,6 +246531,10 @@ function formatUpgradeMessage(info, distribution) {
246594
246531
  ].join(`
246595
246532
  `);
246596
246533
  }
246534
+ function formatPlainUpgradeMessage(info, distribution) {
246535
+ const instruction = getUpgradeInstruction(detectInstallMethod(distribution));
246536
+ return `Update available: ${info.currentVersion} → ${info.latestVersion}. ${instruction}`;
246537
+ }
246597
246538
  async function printUpgradeNotification(upgradeCheckPromise, distribution) {
246598
246539
  try {
246599
246540
  const upgradeInfo = await upgradeCheckPromise;
@@ -246603,47 +246544,23 @@ async function printUpgradeNotification(upgradeCheckPromise, distribution) {
246603
246544
  } catch {}
246604
246545
  }
246605
246546
 
246606
- // src/cli/utils/runCommand.ts
246607
- async function runCommand(commandFn, options, context) {
246608
- if (options?.fullBanner) {
246609
- await printBanner(context.isNonInteractive);
246547
+ // src/cli/utils/command/render.ts
246548
+ async function showCommandStart(fullBanner) {
246549
+ if (fullBanner) {
246550
+ await printBanner();
246610
246551
  We("");
246611
246552
  } else {
246612
246553
  We(theme.colors.base44OrangeBackground(" Base 44 "));
246613
246554
  }
246614
- const upgradeCheckPromise = startUpgradeCheck();
246615
- try {
246616
- if (options?.requireAuth) {
246617
- const loggedIn = await isLoggedIn();
246618
- if (!loggedIn) {
246619
- R2.info("You need to login first to continue.");
246620
- await login();
246621
- }
246622
- try {
246623
- const userInfo = await readAuth();
246624
- context.errorReporter.setContext({
246625
- user: { email: userInfo.email, name: userInfo.name }
246626
- });
246627
- } catch {}
246628
- }
246629
- if (options?.requireAppConfig !== false) {
246630
- const appConfig = await initAppConfig();
246631
- context.errorReporter.setContext({ appId: appConfig.id });
246632
- }
246633
- const result = await commandFn();
246634
- await printUpgradeNotification(upgradeCheckPromise, context.distribution);
246635
- Le(result.outroMessage || "");
246636
- if (result.stdout) {
246637
- process.stdout.write(result.stdout);
246638
- }
246639
- } catch (error48) {
246640
- displayError(error48);
246641
- const errorContext = context.errorReporter.getErrorContext();
246642
- Le(theme.format.errorContext(errorContext));
246643
- throw error48;
246555
+ }
246556
+ async function showCommandEnd(result, upgradeCheckPromise, distribution) {
246557
+ await printUpgradeNotification(upgradeCheckPromise, distribution);
246558
+ Le(result.outroMessage || "");
246559
+ if (result.stdout) {
246560
+ process.stdout.write(result.stdout);
246644
246561
  }
246645
246562
  }
246646
- function displayError(error48) {
246563
+ function showThemedError(error48, context) {
246647
246564
  const errorMessage = error48 instanceof Error ? error48.message : String(error48);
246648
246565
  R2.error(errorMessage);
246649
246566
  if (isCLIError(error48)) {
@@ -246658,7 +246575,111 @@ function displayError(error48) {
246658
246575
  if (process.env.DEBUG === "1" && error48 instanceof Error && error48.stack) {
246659
246576
  R2.error(theme.styles.dim(error48.stack));
246660
246577
  }
246578
+ const errorContext = context.errorReporter.getErrorContext();
246579
+ Le(theme.format.errorContext(errorContext));
246580
+ }
246581
+ function showPlainError(error48) {
246582
+ const errorMessage = error48 instanceof Error ? error48.message : String(error48);
246583
+ process.stderr.write(`Error: ${errorMessage}
246584
+ `);
246585
+ if (isCLIError(error48)) {
246586
+ for (const detail of error48.details) {
246587
+ process.stderr.write(` ${detail}
246588
+ `);
246589
+ }
246590
+ for (const hint of error48.hints) {
246591
+ const cmd = hint.command ? ` (${hint.command})` : "";
246592
+ process.stderr.write(` Hint: ${hint.message}${cmd}
246593
+ `);
246594
+ }
246595
+ }
246596
+ if (process.env.DEBUG === "1" && error48 instanceof Error && error48.stack) {
246597
+ process.stderr.write(`${error48.stack}
246598
+ `);
246599
+ }
246661
246600
  }
246601
+
246602
+ // src/cli/utils/command/Base44Command.ts
246603
+ class Base44Command extends Command {
246604
+ _context;
246605
+ _commandOptions;
246606
+ constructor(name2, options) {
246607
+ super(name2);
246608
+ this._commandOptions = {
246609
+ requireAuth: options?.requireAuth ?? true,
246610
+ requireAppConfig: options?.requireAppConfig ?? true,
246611
+ fullBanner: options?.fullBanner ?? false
246612
+ };
246613
+ }
246614
+ setContext(context) {
246615
+ this._context = context;
246616
+ }
246617
+ get isNonInteractive() {
246618
+ return this._context?.isNonInteractive ?? false;
246619
+ }
246620
+ get context() {
246621
+ if (!this._context) {
246622
+ throw new Error("Base44Command context not set. Ensure the command is registered via createProgram().");
246623
+ }
246624
+ return this._context;
246625
+ }
246626
+ action(fn) {
246627
+ return super.action(async (...args) => {
246628
+ const quiet = this.context.isNonInteractive;
246629
+ if (!quiet) {
246630
+ await showCommandStart(this._commandOptions.fullBanner);
246631
+ }
246632
+ const upgradeCheckPromise = startUpgradeCheck();
246633
+ try {
246634
+ if (this._commandOptions.requireAuth) {
246635
+ await ensureAuth(this.context.errorReporter);
246636
+ }
246637
+ if (this._commandOptions.requireAppConfig) {
246638
+ await ensureAppConfig(this.context.errorReporter);
246639
+ }
246640
+ const result = await fn(...args) ?? {};
246641
+ if (!quiet) {
246642
+ await showCommandEnd(result, upgradeCheckPromise, this.context.distribution);
246643
+ } else {
246644
+ if (result.outroMessage) {
246645
+ process.stdout.write(`${result.outroMessage}
246646
+ `);
246647
+ }
246648
+ if (result.stdout) {
246649
+ process.stdout.write(result.stdout);
246650
+ }
246651
+ const upgradeInfo = await upgradeCheckPromise;
246652
+ if (upgradeInfo) {
246653
+ process.stderr.write(`${formatPlainUpgradeMessage(upgradeInfo, this.context.distribution)}
246654
+ `);
246655
+ }
246656
+ }
246657
+ } catch (error48) {
246658
+ if (quiet) {
246659
+ showPlainError(error48);
246660
+ } else {
246661
+ showThemedError(error48, this.context);
246662
+ }
246663
+ throw error48;
246664
+ }
246665
+ });
246666
+ }
246667
+ }
246668
+ // src/cli/errors.ts
246669
+ class CLIExitError extends Error {
246670
+ code;
246671
+ constructor(code2) {
246672
+ super(`CLI exited with code ${code2}`);
246673
+ this.code = code2;
246674
+ this.name = "CLIExitError";
246675
+ }
246676
+ }
246677
+
246678
+ // src/cli/utils/prompts.ts
246679
+ var onPromptCancel = () => {
246680
+ Ne("Operation cancelled.");
246681
+ throw new CLIExitError(0);
246682
+ };
246662
246683
  // src/cli/utils/runTask.ts
246663
246684
  async function runTask(startMessage, operation, options) {
246664
246685
  const s = bt2();
@@ -246689,7 +246710,7 @@ var import_lodash = __toESM(require_lodash(), 1);
246689
246710
  var composer = require_composer();
246690
246711
  var Document = require_Document();
246691
246712
  var Schema = require_Schema();
246692
- var errors4 = require_errors();
246713
+ var errors3 = require_errors();
246693
246714
  var Alias = require_Alias();
246694
246715
  var identity3 = require_identity();
246695
246716
  var Pair = require_Pair();
@@ -246705,9 +246726,9 @@ var visit = require_visit();
246705
246726
  var $Composer = composer.Composer;
246706
246727
  var $Document = Document.Document;
246707
246728
  var $Schema = Schema.Schema;
246708
- var $YAMLError = errors4.YAMLError;
246709
- var $YAMLParseError = errors4.YAMLParseError;
246710
- var $YAMLWarning = errors4.YAMLWarning;
246729
+ var $YAMLError = errors3.YAMLError;
246730
+ var $YAMLParseError = errors3.YAMLParseError;
246731
+ var $YAMLWarning = errors3.YAMLWarning;
246711
246732
  var $Alias = Alias.Alias;
246712
246733
  var $isAlias = identity3.isAlias;
246713
246734
  var $isCollection = identity3.isCollection;
@@ -246745,6 +246766,70 @@ function formatYaml(data, options = {}) {
246745
246766
  const replacer = stripEmpty ? stripEmptyReplacer : undefined;
246746
246767
  return $stringify(data, replacer, { indent: YAML_INDENT }).trimEnd();
246747
246768
  }
246769
+ // src/core/resources/secret/schema.ts
246770
+ var ListSecretsResponseSchema = exports_external.record(exports_external.string(), exports_external.string());
246771
+ var SetSecretsResponseSchema = exports_external.object({
246772
+ success: exports_external.boolean()
246773
+ });
246774
+ var DeleteSecretResponseSchema = exports_external.object({
246775
+ success: exports_external.boolean()
246776
+ });
246777
+
246778
+ // src/core/resources/secret/api.ts
246779
+ async function listSecrets() {
246780
+ const appClient = getAppClient();
246781
+ let response;
246782
+ try {
246783
+ response = await appClient.get("secrets");
246784
+ } catch (error48) {
246785
+ throw await ApiError.fromHttpError(error48, "listing secrets");
246786
+ }
246787
+ const result = ListSecretsResponseSchema.safeParse(await response.json());
246788
+ if (!result.success) {
246789
+ throw new SchemaValidationError("Invalid response from server", result.error);
246790
+ }
246791
+ return result.data;
246792
+ }
246793
+ async function setSecrets(secrets) {
246794
+ const appClient = getAppClient();
246795
+ let response;
246796
+ try {
246797
+ response = await appClient.post("secrets", {
246798
+ json: secrets,
246799
+ timeout: false
246800
+ });
246801
+ } catch (error48) {
246802
+ throw await ApiError.fromHttpError(error48, "setting secrets");
246803
+ }
246804
+ const result = SetSecretsResponseSchema.safeParse(await response.json());
246805
+ if (!result.success) {
246806
+ throw new SchemaValidationError("Invalid response from server", result.error);
246807
+ }
246808
+ return result.data;
246809
+ }
246810
+ async function deleteSecret(name2) {
246811
+ const appClient = getAppClient();
246812
+ let response;
246813
+ try {
246814
+ response = await appClient.delete("secrets", {
246815
+ searchParams: { secret_name: name2 },
246816
+ timeout: false
246817
+ });
246818
+ } catch (error48) {
246819
+ throw await ApiError.fromHttpError(error48, "deleting secret");
246820
+ }
246821
+ const result = DeleteSecretResponseSchema.safeParse(await response.json());
246822
+ if (!result.success) {
246823
+ throw new SchemaValidationError("Invalid response from server", result.error);
246824
+ }
246825
+ return result.data;
246826
+ }
246827
+ // src/core/utils/env.ts
246828
+ var import_dotenv = __toESM(require_main(), 1);
246829
+ async function parseEnvFile(filePath) {
246830
+ const content = await readTextFile(filePath);
246831
+ return import_dotenv.parse(content);
246832
+ }
246748
246833
  // src/cli/commands/agents/pull.ts
246749
246834
  async function pullAgentsAction() {
246750
246835
  const { project: project2 } = await readProjectConfig();
@@ -246775,10 +246860,8 @@ async function pullAgentsAction() {
246775
246860
  outroMessage: `Pulled ${remoteAgents.total} agents to ${agentsDir}`
246776
246861
  };
246777
246862
  }
246778
- function getAgentsPullCommand(context) {
246779
- return new Command("pull").description("Pull agents from Base44 to local files (replaces all local agent configs)").action(async () => {
246780
- await runCommand(pullAgentsAction, { requireAuth: true }, context);
246781
- });
246863
+ function getAgentsPullCommand() {
246864
+ return new Base44Command("pull").description("Pull agents from Base44 to local files (replaces all local agent configs)").action(pullAgentsAction);
246782
246865
  }
246783
246866
 
246784
246867
  // src/cli/commands/agents/push.ts
@@ -246802,22 +246885,21 @@ async function pushAgentsAction() {
246802
246885
  }
246803
246886
  return { outroMessage: "Agents pushed to Base44" };
246804
246887
  }
246805
- function getAgentsPushCommand(context) {
246806
- return new Command("push").description("Push local agents to Base44 (replaces all remote agent configs)").action(async () => {
246807
- await runCommand(pushAgentsAction, { requireAuth: true }, context);
246808
- });
246888
+ function getAgentsPushCommand() {
246889
+ return new Base44Command("push").description("Push local agents to Base44 (replaces all remote agent configs)").action(pushAgentsAction);
246809
246890
  }
246810
246891
 
246811
246892
  // src/cli/commands/agents/index.ts
246812
- function getAgentsCommand(context) {
246813
- return new Command("agents").description("Manage project agents").addCommand(getAgentsPushCommand(context)).addCommand(getAgentsPullCommand(context));
246893
+ function getAgentsCommand() {
246894
+ return new Command("agents").description("Manage project agents").addCommand(getAgentsPushCommand()).addCommand(getAgentsPullCommand());
246814
246895
  }
246815
246896
 
246816
246897
  // src/cli/commands/auth/login.ts
246817
- function getLoginCommand(context) {
246818
- return new Command("login").description("Authenticate with Base44").action(async () => {
246819
- await runCommand(login, { requireAppConfig: false }, context);
246820
- });
246898
+ function getLoginCommand() {
246899
+ return new Base44Command("login", {
246900
+ requireAuth: false,
246901
+ requireAppConfig: false
246902
+ }).description("Authenticate with Base44").action(login);
246821
246903
  }
246822
246904
 
246823
246905
  // src/cli/commands/auth/logout.ts
@@ -246825,10 +246907,11 @@ async function logout() {
246825
246907
  await deleteAuth();
246826
246908
  return { outroMessage: "Logged out successfully" };
246827
246909
  }
246828
- function getLogoutCommand(context) {
246829
- return new Command("logout").description("Logout from current device").action(async () => {
246830
- await runCommand(logout, { requireAppConfig: false }, context);
246831
- });
246910
+ function getLogoutCommand() {
246911
+ return new Base44Command("logout", {
246912
+ requireAuth: false,
246913
+ requireAppConfig: false
246914
+ }).description("Logout from current device").action(logout);
246832
246915
  }
246833
246916
 
246834
246917
  // src/cli/commands/auth/whoami.ts
@@ -246836,10 +246919,8 @@ async function whoami() {
246836
246919
  const auth2 = await readAuth();
246837
246920
  return { outroMessage: `Logged in as: ${theme.styles.bold(auth2.email)}` };
246838
246921
  }
246839
- function getWhoamiCommand(context) {
246840
- return new Command("whoami").description("Display current authenticated user").action(async () => {
246841
- await runCommand(whoami, { requireAuth: true, requireAppConfig: false }, context);
246842
- });
246922
+ function getWhoamiCommand() {
246923
+ return new Base44Command("whoami", { requireAppConfig: false }).description("Display current authenticated user").action(whoami);
246843
246924
  }
246844
246925
 
246845
246926
  // src/cli/commands/connectors/list-available.ts
@@ -246864,10 +246945,8 @@ ${pad}`)}`);
246864
246945
  outroMessage: `Found ${integrations.length} available integrations.`
246865
246946
  };
246866
246947
  }
246867
- function getConnectorsListAvailableCommand(context) {
246868
- return new Command("list-available").description("List all available integration types").action(async () => {
246869
- await runCommand(listAvailableAction, { requireAuth: true }, context);
246870
- });
246948
+ function getConnectorsListAvailableCommand() {
246949
+ return new Base44Command("list-available").description("List all available integration types").action(listAvailableAction);
246871
246950
  }
246872
246951
 
246873
246952
  // src/cli/commands/connectors/pull.ts
@@ -246901,10 +246980,8 @@ async function pullConnectorsAction() {
246901
246980
  outroMessage: `Pulled ${remoteConnectors.length} connectors to ${connectorsDir}`
246902
246981
  };
246903
246982
  }
246904
- function getConnectorsPullCommand(context) {
246905
- return new Command("pull").description("Pull connectors from Base44 to local files (replaces all local connector configs)").action(async () => {
246906
- await runCommand(pullConnectorsAction, { requireAuth: true }, context);
246907
- });
246983
+ function getConnectorsPullCommand() {
246984
+ return new Base44Command("pull").description("Pull connectors from Base44 to local files (replaces all local connector configs)").action(pullConnectorsAction);
246908
246985
  }
246909
246986
 
246910
246987
  // ../../node_modules/open/index.js
@@ -246995,12 +247072,12 @@ import { promisify as promisify5 } from "node:util";
246995
247072
  import childProcess from "node:child_process";
246996
247073
  var execFile = promisify5(childProcess.execFile);
246997
247074
  var powerShellPath = () => `${process15.env.SYSTEMROOT || process15.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
246998
- var executePowerShell = async (command, options = {}) => {
247075
+ var executePowerShell = async (command2, options = {}) => {
246999
247076
  const {
247000
247077
  powerShellPath: psPath,
247001
247078
  ...execFileOptions
247002
247079
  } = options;
247003
- const encodedCommand = executePowerShell.encodeCommand(command);
247080
+ const encodedCommand = executePowerShell.encodeCommand(command2);
247004
247081
  return execFile(psPath ?? powerShellPath(), [
247005
247082
  ...executePowerShell.argumentsPrefix,
247006
247083
  encodedCommand
@@ -247016,7 +247093,7 @@ executePowerShell.argumentsPrefix = [
247016
247093
  "Bypass",
247017
247094
  "-EncodedCommand"
247018
247095
  ];
247019
- executePowerShell.encodeCommand = (command) => Buffer6.from(command, "utf16le").toString("base64");
247096
+ executePowerShell.encodeCommand = (command2) => Buffer6.from(command2, "utf16le").toString("base64");
247020
247097
  executePowerShell.escapeArgument = (value) => `'${String(value).replaceAll("'", "''")}'`;
247021
247098
 
247022
247099
  // ../../node_modules/wsl-utils/utilities.js
@@ -247082,8 +247159,8 @@ var canAccessPowerShell = async () => {
247082
247159
  };
247083
247160
  var wslDefaultBrowser = async () => {
247084
247161
  const psPath = await powerShellPath2();
247085
- const command = String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`;
247086
- const { stdout } = await executePowerShell(command, { powerShellPath: psPath });
247162
+ const command2 = String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`;
247163
+ const { stdout } = await executePowerShell(command2, { powerShellPath: psPath });
247087
247164
  return stdout.trim();
247088
247165
  };
247089
247166
  var convertWslPathToWindows = async (path16) => {
@@ -247327,7 +247404,7 @@ var baseOpen = async (options) => {
247327
247404
  }
247328
247405
  throw new Error(`${browser.name} is not supported as a default browser`);
247329
247406
  }
247330
- let command;
247407
+ let command2;
247331
247408
  const cliArguments = [];
247332
247409
  const childProcessOptions = {};
247333
247410
  let shouldUseWindowsInWsl = false;
@@ -247335,7 +247412,7 @@ var baseOpen = async (options) => {
247335
247412
  shouldUseWindowsInWsl = await canAccessPowerShell();
247336
247413
  }
247337
247414
  if (platform6 === "darwin") {
247338
- command = "open";
247415
+ command2 = "open";
247339
247416
  if (options.wait) {
247340
247417
  cliArguments.push("--wait-apps");
247341
247418
  }
@@ -247349,7 +247426,7 @@ var baseOpen = async (options) => {
247349
247426
  cliArguments.push("-a", app);
247350
247427
  }
247351
247428
  } else if (platform6 === "win32" || shouldUseWindowsInWsl) {
247352
- command = await powerShellPath2();
247429
+ command2 = await powerShellPath2();
247353
247430
  cliArguments.push(...executePowerShell.argumentsPrefix);
247354
247431
  if (!is_wsl_default) {
247355
247432
  childProcessOptions.windowsVerbatimArguments = true;
@@ -247379,7 +247456,7 @@ var baseOpen = async (options) => {
247379
247456
  }
247380
247457
  } else {
247381
247458
  if (app) {
247382
- command = app;
247459
+ command2 = app;
247383
247460
  } else {
247384
247461
  const isBundled = !__dirname2 || __dirname2 === "/";
247385
247462
  let exeLocalXdgOpen = false;
@@ -247388,7 +247465,7 @@ var baseOpen = async (options) => {
247388
247465
  exeLocalXdgOpen = true;
247389
247466
  } catch {}
247390
247467
  const useSystemXdgOpen = process20.versions.electron ?? (platform6 === "android" || isBundled || !exeLocalXdgOpen);
247391
- command = useSystemXdgOpen ? "xdg-open" : localXdgOpenPath;
247468
+ command2 = useSystemXdgOpen ? "xdg-open" : localXdgOpenPath;
247392
247469
  }
247393
247470
  if (appArguments.length > 0) {
247394
247471
  cliArguments.push(...appArguments);
@@ -247404,7 +247481,7 @@ var baseOpen = async (options) => {
247404
247481
  if (options.target) {
247405
247482
  cliArguments.push(options.target);
247406
247483
  }
247407
- const subprocess = childProcess3.spawn(command, cliArguments, childProcessOptions);
247484
+ const subprocess = childProcess3.spawn(command2, cliArguments, childProcessOptions);
247408
247485
  if (options.wait) {
247409
247486
  return new Promise((resolve2, reject) => {
247410
247487
  subprocess.once("error", reject);
@@ -247547,7 +247624,7 @@ async function runOAuthFlowWithSkip(connector2) {
247547
247624
  timeout: POLL_TIMEOUT_MS
247548
247625
  });
247549
247626
  } catch (err) {
247550
- if (err instanceof TimeoutError2) {
247627
+ if (err instanceof TimeoutError) {
247551
247628
  finalStatus = "PENDING";
247552
247629
  } else {
247553
247630
  throw err;
@@ -247683,15 +247760,15 @@ async function pushConnectorsAction(isNonInteractive) {
247683
247760
  printSummary(results, oauthOutcomes);
247684
247761
  return { outroMessage };
247685
247762
  }
247686
- function getConnectorsPushCommand(context) {
247687
- return new Command("push").description("Push local connectors to Base44 (overwrites connectors on Base44)").action(async () => {
247688
- await runCommand(() => pushConnectorsAction(context.isNonInteractive), { requireAuth: true }, context);
247763
+ function getConnectorsPushCommand() {
247764
+ return new Base44Command("push").description("Push local connectors to Base44 (overwrites connectors on Base44)").action(async (_options, command2) => {
247765
+ return await pushConnectorsAction(command2.isNonInteractive);
247689
247766
  });
247690
247767
  }
247691
247768
 
247692
247769
  // src/cli/commands/connectors/index.ts
247693
- function getConnectorsCommand(context) {
247694
- return new Command("connectors").description("Manage project connectors (OAuth integrations)").addCommand(getConnectorsListAvailableCommand(context)).addCommand(getConnectorsPullCommand(context)).addCommand(getConnectorsPushCommand(context));
247770
+ function getConnectorsCommand() {
247771
+ return new Command("connectors").description("Manage project connectors (OAuth integrations)").addCommand(getConnectorsListAvailableCommand()).addCommand(getConnectorsPullCommand()).addCommand(getConnectorsPushCommand());
247695
247772
  }
247696
247773
 
247697
247774
  // src/cli/commands/dashboard/open.ts
@@ -247702,15 +247779,15 @@ async function openDashboard(isNonInteractive) {
247702
247779
  }
247703
247780
  return { outroMessage: `Dashboard opened at ${dashboardUrl}` };
247704
247781
  }
247705
- function getDashboardOpenCommand(context) {
247706
- return new Command("open").description("Open the app dashboard in your browser").action(async () => {
247707
- await runCommand(() => openDashboard(context.isNonInteractive), { requireAuth: true }, context);
247782
+ function getDashboardOpenCommand() {
247783
+ return new Base44Command("open").description("Open the app dashboard in your browser").action(async (_options, command2) => {
247784
+ return await openDashboard(command2.isNonInteractive);
247708
247785
  });
247709
247786
  }
247710
247787
 
247711
247788
  // src/cli/commands/dashboard/index.ts
247712
- function getDashboardCommand(context) {
247713
- return new Command("dashboard").description("Manage app dashboard").addCommand(getDashboardOpenCommand(context));
247789
+ function getDashboardCommand() {
247790
+ return new Command("dashboard").description("Manage app dashboard").addCommand(getDashboardOpenCommand());
247714
247791
  }
247715
247792
 
247716
247793
  // src/cli/commands/entities/push.ts
@@ -247738,10 +247815,8 @@ async function pushEntitiesAction() {
247738
247815
  }
247739
247816
  return { outroMessage: "Entities pushed to Base44" };
247740
247817
  }
247741
- function getEntitiesPushCommand(context) {
247742
- return new Command("entities").description("Manage project entities").addCommand(new Command("push").description("Push local entities to Base44").action(async () => {
247743
- await runCommand(pushEntitiesAction, { requireAuth: true }, context);
247744
- }));
247818
+ function getEntitiesPushCommand() {
247819
+ return new Command("entities").description("Manage project entities").addCommand(new Base44Command("push").description("Push local entities to Base44").action(pushEntitiesAction));
247745
247820
  }
247746
247821
 
247747
247822
  // src/cli/commands/functions/delete.ts
@@ -247784,16 +247859,16 @@ async function deleteFunctionsAction(names) {
247784
247859
  function parseNames(args) {
247785
247860
  return args.flatMap((arg) => arg.split(",")).map((n2) => n2.trim()).filter(Boolean);
247786
247861
  }
247787
- function validateNames(command) {
247788
- const names = parseNames(command.args);
247862
+ function validateNames(command2) {
247863
+ const names = parseNames(command2.args);
247789
247864
  if (names.length === 0) {
247790
- command.error("At least one function name is required");
247865
+ command2.error("At least one function name is required");
247791
247866
  }
247792
247867
  }
247793
- function getDeleteCommand(context) {
247794
- return new Command("delete").description("Delete deployed functions").argument("<names...>", "Function names to delete").hook("preAction", validateNames).action(async (rawNames) => {
247868
+ function getDeleteCommand() {
247869
+ return new Base44Command("delete").description("Delete deployed functions").argument("<names...>", "Function names to delete").hook("preAction", validateNames).action(async (rawNames) => {
247795
247870
  const names = parseNames(rawNames);
247796
- await runCommand(() => deleteFunctionsAction(names), { requireAuth: true }, context);
247871
+ return deleteFunctionsAction(names);
247797
247872
  });
247798
247873
  }
247799
247874
 
@@ -247899,12 +247974,10 @@ async function deployFunctionsAction(names, options) {
247899
247974
  }
247900
247975
  return { outroMessage: buildDeploySummary(results) };
247901
247976
  }
247902
- function getDeployCommand(context) {
247903
- return new Command("deploy").description("Deploy functions to Base44").argument("[names...]", "Function names to deploy (deploys all if omitted)").option("--force", "Delete remote functions not found locally").action(async (rawNames, options) => {
247904
- await runCommand(() => {
247905
- const names = parseNames2(rawNames);
247906
- return deployFunctionsAction(names, options);
247907
- }, { requireAuth: true }, context);
247977
+ function getDeployCommand() {
247978
+ return new Base44Command("deploy").description("Deploy functions to Base44").argument("[names...]", "Function names to deploy (deploys all if omitted)").option("--force", "Delete remote functions not found locally").action(async (rawNames, options) => {
247979
+ const names = parseNames2(rawNames);
247980
+ return deployFunctionsAction(names, options);
247908
247981
  });
247909
247982
  }
247910
247983
 
@@ -247923,10 +247996,8 @@ async function listFunctionsAction() {
247923
247996
  outroMessage: `${functions.length} function${functions.length !== 1 ? "s" : ""} on remote`
247924
247997
  };
247925
247998
  }
247926
- function getListCommand(context) {
247927
- return new Command("list").description("List all deployed functions").action(async () => {
247928
- await runCommand(listFunctionsAction, { requireAuth: true }, context);
247929
- });
247999
+ function getListCommand() {
248000
+ return new Base44Command("list").description("List all deployed functions").action(listFunctionsAction);
247930
248001
  }
247931
248002
 
247932
248003
  // src/cli/commands/functions/pull.ts
@@ -247967,15 +248038,13 @@ async function pullFunctionsAction(name2) {
247967
248038
  outroMessage: `Pulled ${toPull.length} function${toPull.length !== 1 ? "s" : ""} to ${functionsDir}`
247968
248039
  };
247969
248040
  }
247970
- function getPullCommand(context) {
247971
- return new Command("pull").description("Pull deployed functions from Base44").argument("[name]", "Function name to pull (pulls all if omitted)").action(async (name2) => {
247972
- await runCommand(() => pullFunctionsAction(name2), { requireAuth: true }, context);
247973
- });
248041
+ function getPullCommand() {
248042
+ return new Base44Command("pull").description("Pull deployed functions from Base44").argument("[name]", "Function name to pull (pulls all if omitted)").action(pullFunctionsAction);
247974
248043
  }
247975
248044
 
247976
248045
  // src/cli/commands/functions/index.ts
247977
- function getFunctionsCommand(context) {
247978
- return new Command("functions").description("Manage backend functions").addCommand(getDeployCommand(context)).addCommand(getDeleteCommand(context)).addCommand(getListCommand(context)).addCommand(getPullCommand(context));
248046
+ function getFunctionsCommand() {
248047
+ return new Command("functions").description("Manage backend functions").addCommand(getDeployCommand()).addCommand(getDeleteCommand()).addCommand(getListCommand()).addCommand(getPullCommand());
247979
248048
  }
247980
248049
 
247981
248050
  // src/cli/commands/project/create.ts
@@ -247993,10 +248062,10 @@ async function getTemplateById(templateId) {
247993
248062
  }
247994
248063
  return template2;
247995
248064
  }
247996
- function validateNonInteractiveFlags(command) {
247997
- const { path: path17 } = command.opts();
247998
- if (path17 && !command.args.length) {
247999
- command.error("--path requires a project name argument. Usage: base44 create <name> --path <path>");
248065
+ function validateNonInteractiveFlags(command2) {
248066
+ const { path: path17 } = command2.opts();
248067
+ if (path17 && !command2.args.length) {
248068
+ command2.error("--path requires a project name argument. Usage: base44 create <name> --path <path>");
248000
248069
  }
248001
248070
  }
248002
248071
  async function createInteractive(options) {
@@ -248145,21 +248214,35 @@ async function executeCreate({
248145
248214
  }
248146
248215
  return { outroMessage: "Your project is set up and ready to use" };
248147
248216
  }
248148
- function getCreateCommand(context) {
248149
- return new Command("create").description("Create a new Base44 project").addArgument(new Argument("name", "Project name").argOptional()).option("-p, --path <path>", "Path where to create the project").option("-t, --template <id>", "Template ID (e.g., backend-only, backend-and-client)").option("--deploy", "Build and deploy the site").option("--no-skills", "Skip AI agent skills installation").addHelpText("after", `
248217
+ function getCreateCommand() {
248218
+ return new Base44Command("create", {
248219
+ requireAppConfig: false,
248220
+ fullBanner: true
248221
+ }).description("Create a new Base44 project").addArgument(new Argument("name", "Project name").argOptional()).option("-p, --path <path>", "Path where to create the project").option("-t, --template <id>", "Template ID (e.g., backend-only, backend-and-client)").option("--deploy", "Build and deploy the site").option("--no-skills", "Skip AI agent skills installation").addHelpText("after", `
248150
248222
  Examples:
248151
248223
  $ base44 create my-app Creates a base44 project at ./my-app
248152
248224
  $ base44 create my-todo-app --template backend-and-client Creates a base44 backend-and-client project at ./my-todo-app
248153
- $ base44 create my-app --path ./projects/my-app --deploy Creates a base44 project at ./project/my-app and deploys it`).hook("preAction", validateNonInteractiveFlags).action(async (name2, options) => {
248225
+ $ base44 create my-app --path ./projects/my-app --deploy Creates a base44 project at ./project/my-app and deploys it`).hook("preAction", validateNonInteractiveFlags).action(async (name2, options, command2) => {
248154
248226
  if (name2 && !options.path) {
248155
248227
  options.path = `./${import_kebabCase.default(name2)}`;
248156
248228
  }
248157
- const isNonInteractive = !!(options.name ?? name2) && !!options.path;
248158
- if (isNonInteractive) {
248159
- await runCommand(() => createNonInteractive({ name: options.name ?? name2, ...options }), { requireAuth: true, requireAppConfig: false }, context);
248160
- } else {
248161
- await runCommand(() => createInteractive({ name: name2, ...options }), { fullBanner: true, requireAuth: true, requireAppConfig: false }, context);
248229
+ const skipPrompts = !!(options.name ?? name2) && !!options.path;
248230
+ if (!skipPrompts && command2.isNonInteractive) {
248231
+ throw new InvalidInputError("Project name and --path are required in non-interactive mode", {
248232
+ hints: [
248233
+ {
248234
+ message: "Usage: base44 create <name> --path <path>"
248235
+ }
248236
+ ]
248237
+ });
248162
248238
  }
248239
+ if (skipPrompts) {
248240
+ return await createNonInteractive({
248241
+ name: options.name ?? name2,
248242
+ ...options
248243
+ });
248244
+ }
248245
+ return await createInteractive({ name: name2, ...options });
248163
248246
  });
248164
248247
  }
248165
248248
 
@@ -248227,12 +248310,15 @@ ${summaryLines.join(`
248227
248310
  }
248228
248311
  return { outroMessage: "App deployed successfully" };
248229
248312
  }
248230
- function getDeployCommand2(context) {
248231
- return new Command("deploy").description("Deploy all project resources (entities, functions, agents, connectors, and site)").option("-y, --yes", "Skip confirmation prompt").action(async (options) => {
248232
- await runCommand(() => deployAction({
248313
+ function getDeployCommand2() {
248314
+ return new Base44Command("deploy").description("Deploy all project resources (entities, functions, agents, connectors, and site)").option("-y, --yes", "Skip confirmation prompt").action(async (options, command2) => {
248315
+ if (command2.isNonInteractive && !options.yes) {
248316
+ throw new InvalidInputError("--yes is required in non-interactive mode");
248317
+ }
248318
+ return await deployAction({
248233
248319
  ...options,
248234
- isNonInteractive: context.isNonInteractive
248235
- }), { requireAuth: true }, context);
248320
+ isNonInteractive: command2.isNonInteractive
248321
+ });
248236
248322
  });
248237
248323
  }
248238
248324
  async function handleOAuthConnectors(connectorResults, options) {
@@ -248256,13 +248342,13 @@ function printStripeResult(r) {
248256
248342
  }
248257
248343
 
248258
248344
  // src/cli/commands/project/link.ts
248259
- function validateNonInteractiveFlags2(command) {
248260
- const { create: create4, name: name2, projectId } = command.opts();
248345
+ function validateNonInteractiveFlags2(command2) {
248346
+ const { create: create4, name: name2, projectId } = command2.opts();
248261
248347
  if (create4 && projectId) {
248262
- command.error("--create and --projectId cannot be used together");
248348
+ command2.error("--create and --projectId cannot be used together");
248263
248349
  }
248264
248350
  if (create4 && !name2) {
248265
- command.error("--name is required when using --create");
248351
+ command2.error("--name is required when using --create");
248266
248352
  }
248267
248353
  }
248268
248354
  async function promptForLinkAction() {
@@ -248395,9 +248481,13 @@ async function link(options) {
248395
248481
  R2.message(`${theme.styles.header("Dashboard")}: ${theme.colors.links(getDashboardUrl(finalProjectId))}`);
248396
248482
  return { outroMessage: "Project linked" };
248397
248483
  }
248398
- function getLinkCommand(context) {
248399
- return new Command("link").description("Link a local project to a Base44 project (create new or link existing)").option("-c, --create", "Create a new project (skip selection prompt)").option("-n, --name <name>", "Project name (required when --create is used)").option("-d, --description <description>", "Project description").option("-p, --projectId <id>", "Project ID to link to an existing project (skips selection prompt)").hook("preAction", validateNonInteractiveFlags2).action(async (options) => {
248400
- await runCommand(() => link(options), { requireAuth: true, requireAppConfig: false }, context);
248484
+ function getLinkCommand() {
248485
+ return new Base44Command("link", { requireAppConfig: false }).description("Link a local project to a Base44 project (create new or link existing)").option("-c, --create", "Create a new project (skip selection prompt)").option("-n, --name <name>", "Project name (required when --create is used)").option("-d, --description <description>", "Project description").option("-p, --projectId <id>", "Project ID to link to an existing project (skips selection prompt)").hook("preAction", validateNonInteractiveFlags2).action(async (options, command2) => {
248486
+ const skipPrompts = !!options.create || !!options.projectId;
248487
+ if (!skipPrompts && command2.isNonInteractive) {
248488
+ throw new InvalidInputError("--create with --name, or --projectId, is required in non-interactive mode");
248489
+ }
248490
+ return await link(options);
248401
248491
  });
248402
248492
  }
248403
248493
 
@@ -248517,10 +248607,8 @@ async function logsAction(options) {
248517
248607
  ` : formatLogs(entries);
248518
248608
  return { outroMessage: "Fetched logs", stdout: logsOutput };
248519
248609
  }
248520
- function getLogsCommand(context) {
248521
- return new Command("logs").description("Fetch function logs for this app").option("--function <names>", "Filter by function name(s), comma-separated. If omitted, fetches logs for all project functions").option("--since <datetime>", "Show logs from this time (ISO format)", normalizeDatetime).option("--until <datetime>", "Show logs until this time (ISO format)", normalizeDatetime).addOption(new Option("--level <level>", "Filter by log level").choices([...LogLevelSchema.options]).hideHelp()).option("-n, --limit <n>", "Results per page (1-1000, default: 50)").addOption(new Option("--order <order>", "Sort order").choices(["asc", "desc"])).action(async (options) => {
248522
- await runCommand(() => logsAction(options), { requireAuth: true }, context);
248523
- });
248610
+ function getLogsCommand() {
248611
+ return new Base44Command("logs").description("Fetch function logs for this app").option("--function <names>", "Filter by function name(s), comma-separated. If omitted, fetches logs for all project functions").option("--since <datetime>", "Show logs from this time (ISO format)", normalizeDatetime).option("--until <datetime>", "Show logs until this time (ISO format)", normalizeDatetime).addOption(new Option("--level <level>", "Filter by log level").choices([...LogLevelSchema.options]).hideHelp()).option("-n, --limit <n>", "Results per page (1-1000, default: 50)").addOption(new Option("--order <order>", "Sort order").choices(["asc", "desc"])).action(logsAction);
248524
248612
  }
248525
248613
 
248526
248614
  // src/cli/commands/secrets/delete.ts
@@ -248535,10 +248623,8 @@ async function deleteSecretAction(key) {
248535
248623
  outroMessage: "Secret deleted successfully."
248536
248624
  };
248537
248625
  }
248538
- function getSecretsDeleteCommand(context) {
248539
- return new Command("delete").description("Delete a secret").argument("<key>", "Secret name to delete").action(async (key) => {
248540
- await runCommand(() => deleteSecretAction(key), { requireAuth: true }, context);
248541
- });
248626
+ function getSecretsDeleteCommand() {
248627
+ return new Base44Command("delete").description("Delete a secret").argument("<key>", "Secret name to delete").action(deleteSecretAction);
248542
248628
  }
248543
248629
 
248544
248630
  // src/cli/commands/secrets/list.ts
@@ -248560,10 +248646,8 @@ async function listSecretsAction() {
248560
248646
  outroMessage: `Found ${names.length} secrets.`
248561
248647
  };
248562
248648
  }
248563
- function getSecretsListCommand(context) {
248564
- return new Command("list").description("List secret names").action(async () => {
248565
- await runCommand(listSecretsAction, { requireAuth: true }, context);
248566
- });
248649
+ function getSecretsListCommand() {
248650
+ return new Base44Command("list").description("List secret names").action(listSecretsAction);
248567
248651
  }
248568
248652
 
248569
248653
  // src/cli/commands/secrets/set.ts
@@ -248617,15 +248701,13 @@ async function setSecretsAction(entries, options) {
248617
248701
  outroMessage: "Secrets set successfully."
248618
248702
  };
248619
248703
  }
248620
- function getSecretsSetCommand(context) {
248621
- return new Command("set").description("Set one or more secrets (KEY=VALUE format)").argument("[entries...]", "KEY=VALUE pairs (e.g. KEY1=VALUE1 KEY2=VALUE2)").option("--env-file <path>", "Path to .env file").action(async (entries, options) => {
248622
- await runCommand(() => setSecretsAction(entries, options), { requireAuth: true }, context);
248623
- });
248704
+ function getSecretsSetCommand() {
248705
+ return new Base44Command("set").description("Set one or more secrets (KEY=VALUE format)").argument("[entries...]", "KEY=VALUE pairs (e.g. KEY1=VALUE1 KEY2=VALUE2)").option("--env-file <path>", "Path to .env file").action(setSecretsAction);
248624
248706
  }
248625
248707
 
248626
248708
  // src/cli/commands/secrets/index.ts
248627
- function getSecretsCommand(context) {
248628
- return new Command("secrets").description("Manage project secrets (environment variables)").addCommand(getSecretsListCommand(context)).addCommand(getSecretsSetCommand(context)).addCommand(getSecretsDeleteCommand(context));
248709
+ function getSecretsCommand() {
248710
+ return new Command("secrets").description("Manage project secrets (environment variables)").addCommand(getSecretsListCommand()).addCommand(getSecretsSetCommand()).addCommand(getSecretsDeleteCommand());
248629
248711
  }
248630
248712
 
248631
248713
  // src/cli/commands/site/deploy.ts
@@ -248658,12 +248740,15 @@ async function deployAction2(options) {
248658
248740
  });
248659
248741
  return { outroMessage: `Visit your site at: ${result.appUrl}` };
248660
248742
  }
248661
- function getSiteDeployCommand(context) {
248662
- return new Command("deploy").description("Deploy built site files to Base44 hosting").option("-y, --yes", "Skip confirmation prompt").action(async (options) => {
248663
- await runCommand(() => deployAction2({
248743
+ function getSiteDeployCommand() {
248744
+ return new Base44Command("deploy").description("Deploy built site files to Base44 hosting").option("-y, --yes", "Skip confirmation prompt").action(async (options, command2) => {
248745
+ if (command2.isNonInteractive && !options.yes) {
248746
+ throw new InvalidInputError("--yes is required in non-interactive mode");
248747
+ }
248748
+ return await deployAction2({
248664
248749
  ...options,
248665
- isNonInteractive: context.isNonInteractive
248666
- }), { requireAuth: true }, context);
248750
+ isNonInteractive: command2.isNonInteractive
248751
+ });
248667
248752
  });
248668
248753
  }
248669
248754
 
@@ -248675,15 +248760,15 @@ async function openAction(isNonInteractive) {
248675
248760
  }
248676
248761
  return { outroMessage: `Site opened at ${siteUrl}` };
248677
248762
  }
248678
- function getSiteOpenCommand(context) {
248679
- return new Command("open").description("Open the published site in your browser").action(async () => {
248680
- await runCommand(() => openAction(context.isNonInteractive), { requireAuth: true }, context);
248763
+ function getSiteOpenCommand() {
248764
+ return new Base44Command("open").description("Open the published site in your browser").action(async (_options, command2) => {
248765
+ return await openAction(command2.isNonInteractive);
248681
248766
  });
248682
248767
  }
248683
248768
 
248684
248769
  // src/cli/commands/site/index.ts
248685
- function getSiteCommand(context) {
248686
- return new Command("site").description("Manage app site (frontend app)").addCommand(getSiteDeployCommand(context)).addCommand(getSiteOpenCommand(context));
248770
+ function getSiteCommand() {
248771
+ return new Command("site").description("Manage app site (frontend app)").addCommand(getSiteDeployCommand()).addCommand(getSiteOpenCommand());
248687
248772
  }
248688
248773
 
248689
248774
  // src/core/types/generator.ts
@@ -248806,15 +248891,13 @@ async function generateTypesAction() {
248806
248891
  outroMessage: tsconfigUpdated ? `Generated ${TYPES_FILE_PATH} and updated tsconfig.json` : `Generated ${TYPES_FILE_PATH}`
248807
248892
  };
248808
248893
  }
248809
- function getTypesGenerateCommand(context) {
248810
- return new Command("generate").description("Generate TypeScript declaration file (types.d.ts) from project resources").action(async () => {
248811
- await runCommand(() => generateTypesAction(), { requireAuth: false }, context);
248812
- });
248894
+ function getTypesGenerateCommand() {
248895
+ return new Base44Command("generate", { requireAuth: false }).description("Generate TypeScript declaration file (types.d.ts) from project resources").action(generateTypesAction);
248813
248896
  }
248814
248897
 
248815
248898
  // src/cli/commands/types/index.ts
248816
- function getTypesCommand(context) {
248817
- return new Command("types").description("Manage TypeScript type generation").addCommand(getTypesGenerateCommand(context));
248899
+ function getTypesCommand() {
248900
+ return new Command("types").description("Manage TypeScript type generation").addCommand(getTypesGenerateCommand());
248818
248901
  }
248819
248902
 
248820
248903
  // src/cli/dev/dev-server/main.ts
@@ -251667,17 +251750,11 @@ async function devAction(options8) {
251667
251750
  outroMessage: `Dev server is available at ${theme.colors.links(`http://localhost:${resolvedPort}`)}`
251668
251751
  };
251669
251752
  }
251670
- function getDevCommand(context) {
251671
- return new Command("dev").description("Start the development server").option("-p, --port <number>", "Port for the development server").action(async (options8) => {
251672
- await runCommand(() => devAction(options8), { requireAuth: true }, context);
251673
- });
251753
+ function getDevCommand() {
251754
+ return new Base44Command("dev").description("Start the development server").option("-p, --port <number>", "Port for the development server").action(devAction);
251674
251755
  }
251675
251756
 
251676
251757
  // src/cli/commands/exec.ts
251677
- import { dirname as dirname15, join as join21 } from "node:path";
251678
- import { fileURLToPath as fileURLToPath6 } from "node:url";
251679
- var __dirname4 = dirname15(fileURLToPath6(import.meta.url));
251680
- var EXEC_WRAPPER_PATH = join21(__dirname4, "../deno-runtime/exec.ts");
251681
251758
  function readStdin() {
251682
251759
  return new Promise((resolve9, reject) => {
251683
251760
  let data = "";
@@ -251689,7 +251766,7 @@ function readStdin() {
251689
251766
  process.stdin.on("error", reject);
251690
251767
  });
251691
251768
  }
251692
- async function execAction(extraArgs) {
251769
+ async function execAction() {
251693
251770
  const noInputError = new InvalidInputError("No input provided. Pipe a script to stdin.", {
251694
251771
  hints: [
251695
251772
  { message: "File: cat ./script.ts | base44 exec" },
@@ -251703,23 +251780,20 @@ async function execAction(extraArgs) {
251703
251780
  if (!code2.trim()) {
251704
251781
  throw noInputError;
251705
251782
  }
251783
+ const dashIndex = process.argv.indexOf("--");
251784
+ const extraArgs = dashIndex !== -1 ? process.argv.slice(dashIndex + 1) : [];
251706
251785
  const { exitCode } = await runScript({
251707
251786
  code: code2,
251708
251787
  extraArgs,
251709
- execWrapperPath: EXEC_WRAPPER_PATH
251788
+ execWrapperPath: getExecWrapperPath()
251710
251789
  });
251711
251790
  if (exitCode !== 0) {
251712
251791
  process.exitCode = exitCode;
251713
251792
  }
251714
251793
  return {};
251715
251794
  }
251716
- function getExecCommand(context) {
251717
- const cmd = new Command("exec").description("Run a script with the Base44 SDK pre-authenticated as the current user").action(async () => {
251718
- const dashIndex = process.argv.indexOf("--");
251719
- const extraArgs = dashIndex !== -1 ? process.argv.slice(dashIndex + 1) : [];
251720
- await runCommand(() => execAction(extraArgs), { requireAuth: true }, context);
251721
- });
251722
- return cmd;
251795
+ function getExecCommand() {
251796
+ return new Base44Command("exec").description("Run a script with the Base44 SDK pre-authenticated as the current user").action(execAction);
251723
251797
  }
251724
251798
 
251725
251799
  // src/cli/commands/project/eject.ts
@@ -251810,9 +251884,18 @@ async function eject(options8) {
251810
251884
  }
251811
251885
  return { outroMessage: "Your new project is set and ready to use" };
251812
251886
  }
251813
- function getEjectCommand(context) {
251814
- return new Command("eject").description("Download the code for an existing Base44 project").option("-p, --path <path>", "Path where to write the project").option("--project-id <id>", "Project ID to eject (skips interactive selection)").option("-y, --yes", "Skip confirmation prompts").action(async (options8) => {
251815
- await runCommand(() => eject({ ...options8, isNonInteractive: context.isNonInteractive }), { requireAuth: true, requireAppConfig: false }, context);
251887
+ function getEjectCommand() {
251888
+ return new Base44Command("eject", { requireAppConfig: false }).description("Download the code for an existing Base44 project").option("-p, --path <path>", "Path where to write the project").option("--project-id <id>", "Project ID to eject (skips interactive selection)").option("-y, --yes", "Skip confirmation prompts").action(async (options8, command2) => {
251889
+ if (command2.isNonInteractive && !options8.projectId) {
251890
+ throw new InvalidInputError("--project-id is required in non-interactive mode");
251891
+ }
251892
+ if (command2.isNonInteractive && !options8.path) {
251893
+ throw new InvalidInputError("--path is required in non-interactive mode");
251894
+ }
251895
+ return await eject({
251896
+ ...options8,
251897
+ isNonInteractive: command2.isNonInteractive
251898
+ });
251816
251899
  });
251817
251900
  }
251818
251901
 
@@ -251823,24 +251906,29 @@ function createProgram(context) {
251823
251906
  program2.configureHelp({
251824
251907
  sortSubcommands: true
251825
251908
  });
251826
- program2.addCommand(getLoginCommand(context));
251827
- program2.addCommand(getWhoamiCommand(context));
251828
- program2.addCommand(getLogoutCommand(context));
251829
- program2.addCommand(getCreateCommand(context));
251830
- program2.addCommand(getDashboardCommand(context));
251831
- program2.addCommand(getDeployCommand2(context));
251832
- program2.addCommand(getLinkCommand(context));
251833
- program2.addCommand(getEjectCommand(context));
251834
- program2.addCommand(getEntitiesPushCommand(context));
251835
- program2.addCommand(getAgentsCommand(context));
251836
- program2.addCommand(getConnectorsCommand(context));
251837
- program2.addCommand(getFunctionsCommand(context));
251838
- program2.addCommand(getSecretsCommand(context));
251839
- program2.addCommand(getSiteCommand(context));
251840
- program2.addCommand(getTypesCommand(context));
251841
- program2.addCommand(getExecCommand(context));
251842
- program2.addCommand(getDevCommand(context), { hidden: true });
251843
- program2.addCommand(getLogsCommand(context), { hidden: true });
251909
+ program2.hook("preAction", (_10, actionCommand) => {
251910
+ if (actionCommand instanceof Base44Command) {
251911
+ actionCommand.setContext(context);
251912
+ }
251913
+ });
251914
+ program2.addCommand(getLoginCommand());
251915
+ program2.addCommand(getWhoamiCommand());
251916
+ program2.addCommand(getLogoutCommand());
251917
+ program2.addCommand(getCreateCommand());
251918
+ program2.addCommand(getDashboardCommand());
251919
+ program2.addCommand(getDeployCommand2());
251920
+ program2.addCommand(getLinkCommand());
251921
+ program2.addCommand(getEjectCommand());
251922
+ program2.addCommand(getEntitiesPushCommand());
251923
+ program2.addCommand(getAgentsCommand());
251924
+ program2.addCommand(getConnectorsCommand());
251925
+ program2.addCommand(getFunctionsCommand());
251926
+ program2.addCommand(getSecretsCommand());
251927
+ program2.addCommand(getSiteCommand());
251928
+ program2.addCommand(getTypesCommand());
251929
+ program2.addCommand(getExecCommand());
251930
+ program2.addCommand(getDevCommand(), { hidden: true });
251931
+ program2.addCommand(getLogsCommand(), { hidden: true });
251844
251932
  return program2;
251845
251933
  }
251846
251934
 
@@ -251849,7 +251937,7 @@ var import_detect_agent = __toESM(require_dist5(), 1);
251849
251937
  import { release, type } from "node:os";
251850
251938
 
251851
251939
  // ../../node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
251852
- import { dirname as dirname16, posix, sep } from "path";
251940
+ import { dirname as dirname15, posix, sep } from "path";
251853
251941
  function createModulerModifier() {
251854
251942
  const getModuleFromFileName = createGetModuleFromFilename();
251855
251943
  return async (frames) => {
@@ -251858,7 +251946,7 @@ function createModulerModifier() {
251858
251946
  return frames;
251859
251947
  };
251860
251948
  }
251861
- function createGetModuleFromFilename(basePath = process.argv[1] ? dirname16(process.argv[1]) : process.cwd(), isWindows5 = sep === "\\") {
251949
+ function createGetModuleFromFilename(basePath = process.argv[1] ? dirname15(process.argv[1]) : process.cwd(), isWindows5 = sep === "\\") {
251862
251950
  const normalizedBase = isWindows5 ? normalizeWindowsPath2(basePath) : basePath;
251863
251951
  return (filename) => {
251864
251952
  if (!filename)
@@ -255956,7 +256044,7 @@ class ErrorReporter {
255956
256044
  return this.context.user?.email ?? `anon-${this.sessionId}`;
255957
256045
  }
255958
256046
  buildProperties(error48) {
255959
- const { user, command, appId } = this.context;
256047
+ const { user, command: command2, appId } = this.context;
255960
256048
  const errorCode = error48 && isCLIError(error48) ? error48.code : undefined;
255961
256049
  const userError = error48 ? isUserError(error48) : undefined;
255962
256050
  const apiProps = error48 instanceof ApiError ? {
@@ -255972,9 +256060,9 @@ class ErrorReporter {
255972
256060
  session_started_at: this.sessionStartedAt.toISOString(),
255973
256061
  execution_duration_ms: Date.now() - this.sessionStartedAt.getTime(),
255974
256062
  ...user && { $set: { email: user.email, name: user.name } },
255975
- command_name: command?.name,
255976
- command_args: command?.args,
255977
- command_options: command?.options,
256063
+ command_name: command2?.name,
256064
+ command_args: command2?.args,
256065
+ command_options: command2?.options,
255978
256066
  app_id: appId,
255979
256067
  ...errorCode !== undefined && {
255980
256068
  error_code: errorCode,
@@ -256022,9 +256110,9 @@ class ErrorReporter {
256022
256110
  }
256023
256111
 
256024
256112
  // src/cli/telemetry/commander-hooks.ts
256025
- function getFullCommandName(command) {
256113
+ function getFullCommandName(command2) {
256026
256114
  const parts = [];
256027
- let current = command;
256115
+ let current = command2;
256028
256116
  while (current) {
256029
256117
  const name2 = current.name();
256030
256118
  if (current.parent) {
@@ -256047,9 +256135,9 @@ function addCommandInfoToErrorReporter(program2, errorReporter) {
256047
256135
  });
256048
256136
  }
256049
256137
  // src/cli/index.ts
256050
- var __dirname5 = dirname17(fileURLToPath7(import.meta.url));
256138
+ var __dirname4 = dirname16(fileURLToPath6(import.meta.url));
256051
256139
  async function runCLI(options8) {
256052
- ensureNpmAssets(join22(__dirname5, "../assets"));
256140
+ ensureNpmAssets(join21(__dirname4, "../assets"));
256053
256141
  const errorReporter = new ErrorReporter;
256054
256142
  errorReporter.registerProcessErrorHandlers();
256055
256143
  const isNonInteractive = !process.stdin.isTTY || !process.stdout.isTTY;
@@ -256082,4 +256170,4 @@ export {
256082
256170
  CLIExitError
256083
256171
  };
256084
256172
 
256085
- //# debugId=7A217CD3C600288564756E2164756E21
256173
+ //# debugId=2B43B0607FB61CF864756E2164756E21