@base44-preview/cli 0.0.31-pr.217.4acb236 → 0.0.31-pr.217.a8a828c

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
@@ -8883,8 +8883,8 @@ var require_package = __commonJS((exports, module) => {
8883
8883
 
8884
8884
  // node_modules/ejs/lib/ejs.js
8885
8885
  var require_ejs = __commonJS((exports) => {
8886
- var fs19 = __require("fs");
8887
- var path12 = __require("path");
8886
+ var fs14 = __require("fs");
8887
+ var path11 = __require("path");
8888
8888
  var utils = require_utils5();
8889
8889
  var scopeOptionWarned = false;
8890
8890
  var _VERSION_STRING = require_package().version;
@@ -8911,13 +8911,13 @@ var require_ejs = __commonJS((exports) => {
8911
8911
  var _BOM = /^\uFEFF/;
8912
8912
  var _JS_IDENTIFIER = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/;
8913
8913
  exports.cache = utils.cache;
8914
- exports.fileLoader = fs19.readFileSync;
8914
+ exports.fileLoader = fs14.readFileSync;
8915
8915
  exports.localsName = _DEFAULT_LOCALS_NAME;
8916
8916
  exports.promiseImpl = new Function("return this;")().Promise;
8917
8917
  exports.resolveInclude = function(name2, filename, isDir) {
8918
- var dirname6 = path12.dirname;
8919
- var extname = path12.extname;
8920
- var resolve = path12.resolve;
8918
+ var dirname6 = path11.dirname;
8919
+ var extname = path11.extname;
8920
+ var resolve = path11.resolve;
8921
8921
  var includePath = resolve(isDir ? filename : dirname6(filename), name2);
8922
8922
  var ext = extname(name2);
8923
8923
  if (!ext) {
@@ -8929,35 +8929,35 @@ var require_ejs = __commonJS((exports) => {
8929
8929
  var filePath;
8930
8930
  if (paths.some(function(v2) {
8931
8931
  filePath = exports.resolveInclude(name2, v2, true);
8932
- return fs19.existsSync(filePath);
8932
+ return fs14.existsSync(filePath);
8933
8933
  })) {
8934
8934
  return filePath;
8935
8935
  }
8936
8936
  }
8937
- function getIncludePath(path13, options) {
8937
+ function getIncludePath(path12, options) {
8938
8938
  var includePath;
8939
8939
  var filePath;
8940
8940
  var views = options.views;
8941
- var match = /^[A-Za-z]+:\\|^\//.exec(path13);
8941
+ var match = /^[A-Za-z]+:\\|^\//.exec(path12);
8942
8942
  if (match && match.length) {
8943
- path13 = path13.replace(/^\/*/, "");
8943
+ path12 = path12.replace(/^\/*/, "");
8944
8944
  if (Array.isArray(options.root)) {
8945
- includePath = resolvePaths(path13, options.root);
8945
+ includePath = resolvePaths(path12, options.root);
8946
8946
  } else {
8947
- includePath = exports.resolveInclude(path13, options.root || "/", true);
8947
+ includePath = exports.resolveInclude(path12, options.root || "/", true);
8948
8948
  }
8949
8949
  } else {
8950
8950
  if (options.filename) {
8951
- filePath = exports.resolveInclude(path13, options.filename);
8952
- if (fs19.existsSync(filePath)) {
8951
+ filePath = exports.resolveInclude(path12, options.filename);
8952
+ if (fs14.existsSync(filePath)) {
8953
8953
  includePath = filePath;
8954
8954
  }
8955
8955
  }
8956
8956
  if (!includePath && Array.isArray(views)) {
8957
- includePath = resolvePaths(path13, views);
8957
+ includePath = resolvePaths(path12, views);
8958
8958
  }
8959
8959
  if (!includePath && typeof options.includer !== "function") {
8960
- throw new Error('Could not find the include file "' + options.escapeFunction(path13) + '"');
8960
+ throw new Error('Could not find the include file "' + options.escapeFunction(path12) + '"');
8961
8961
  }
8962
8962
  }
8963
8963
  return includePath;
@@ -9016,11 +9016,11 @@ var require_ejs = __commonJS((exports) => {
9016
9016
  function fileLoader(filePath) {
9017
9017
  return exports.fileLoader(filePath);
9018
9018
  }
9019
- function includeFile(path13, options) {
9019
+ function includeFile(path12, options) {
9020
9020
  var opts = utils.shallowCopy(utils.createNullProtoObjWherePossible(), options);
9021
- opts.filename = getIncludePath(path13, opts);
9021
+ opts.filename = getIncludePath(path12, opts);
9022
9022
  if (typeof options.includer === "function") {
9023
- var includerResult = options.includer(path13, opts.filename);
9023
+ var includerResult = options.includer(path12, opts.filename);
9024
9024
  if (includerResult) {
9025
9025
  if (includerResult.filename) {
9026
9026
  opts.filename = includerResult.filename;
@@ -9162,9 +9162,9 @@ var require_ejs = __commonJS((exports) => {
9162
9162
  createRegex: function() {
9163
9163
  var str = _REGEX_STRING;
9164
9164
  var delim = utils.escapeRegExpChars(this.opts.delimiter);
9165
- var open2 = utils.escapeRegExpChars(this.opts.openDelimiter);
9165
+ var open = utils.escapeRegExpChars(this.opts.openDelimiter);
9166
9166
  var close = utils.escapeRegExpChars(this.opts.closeDelimiter);
9167
- str = str.replace(/%/g, delim).replace(/</g, open2).replace(/>/g, close);
9167
+ str = str.replace(/%/g, delim).replace(/</g, open).replace(/>/g, close);
9168
9168
  return new RegExp(str);
9169
9169
  },
9170
9170
  compile: function() {
@@ -9285,18 +9285,18 @@ var require_ejs = __commonJS((exports) => {
9285
9285
  throw e2;
9286
9286
  }
9287
9287
  var returnedFn = opts.client ? fn : function anonymous(data) {
9288
- var include = function(path13, includeData) {
9288
+ var include = function(path12, includeData) {
9289
9289
  var d3 = utils.shallowCopy(utils.createNullProtoObjWherePossible(), data);
9290
9290
  if (includeData) {
9291
9291
  d3 = utils.shallowCopy(d3, includeData);
9292
9292
  }
9293
- return includeFile(path13, opts)(d3);
9293
+ return includeFile(path12, opts)(d3);
9294
9294
  };
9295
9295
  return fn.apply(opts.context, [data || utils.createNullProtoObjWherePossible(), escapeFn, include, rethrow]);
9296
9296
  };
9297
9297
  if (opts.filename && typeof Object.defineProperty === "function") {
9298
9298
  var filename = opts.filename;
9299
- var basename3 = path12.basename(filename, path12.extname(filename));
9299
+ var basename3 = path11.basename(filename, path11.extname(filename));
9300
9300
  try {
9301
9301
  Object.defineProperty(returnedFn, "name", {
9302
9302
  value: basename3,
@@ -12282,8 +12282,8 @@ var require_js_yaml2 = __commonJS((exports, module) => {
12282
12282
  var require_front_matter = __commonJS((exports, module) => {
12283
12283
  var parser = require_js_yaml2();
12284
12284
  var optionalByteOrderMark = "\\ufeff?";
12285
- var platform6 = typeof process !== "undefined" ? process.platform : "";
12286
- var pattern = "^(" + optionalByteOrderMark + "(= yaml =|---)" + "$([\\s\\S]*?)" + "^(?:\\2|\\.\\.\\.)\\s*" + "$" + (platform6 === "win32" ? "\\r?" : "") + "(?:\\n)?)";
12285
+ var platform5 = typeof process !== "undefined" ? process.platform : "";
12286
+ var pattern = "^(" + optionalByteOrderMark + "(= yaml =|---)" + "$([\\s\\S]*?)" + "^(?:\\2|\\.\\.\\.)\\s*" + "$" + (platform5 === "win32" ? "\\r?" : "") + "(?:\\n)?)";
12287
12287
  var regex = new RegExp(pattern, "m");
12288
12288
  module.exports = extractor;
12289
12289
  module.exports.test = test;
@@ -12349,8 +12349,8 @@ var require_front_matter = __commonJS((exports, module) => {
12349
12349
  var require_windows = __commonJS((exports, module) => {
12350
12350
  module.exports = isexe;
12351
12351
  isexe.sync = sync;
12352
- var fs20 = __require("fs");
12353
- function checkPathExt(path12, options) {
12352
+ var fs15 = __require("fs");
12353
+ function checkPathExt(path11, options) {
12354
12354
  var pathext = options.pathExt !== undefined ? options.pathExt : process.env.PATHEXT;
12355
12355
  if (!pathext) {
12356
12356
  return true;
@@ -12361,25 +12361,25 @@ var require_windows = __commonJS((exports, module) => {
12361
12361
  }
12362
12362
  for (var i = 0;i < pathext.length; i++) {
12363
12363
  var p2 = pathext[i].toLowerCase();
12364
- if (p2 && path12.substr(-p2.length).toLowerCase() === p2) {
12364
+ if (p2 && path11.substr(-p2.length).toLowerCase() === p2) {
12365
12365
  return true;
12366
12366
  }
12367
12367
  }
12368
12368
  return false;
12369
12369
  }
12370
- function checkStat(stat, path12, options) {
12370
+ function checkStat(stat, path11, options) {
12371
12371
  if (!stat.isSymbolicLink() && !stat.isFile()) {
12372
12372
  return false;
12373
12373
  }
12374
- return checkPathExt(path12, options);
12374
+ return checkPathExt(path11, options);
12375
12375
  }
12376
- function isexe(path12, options, cb) {
12377
- fs20.stat(path12, function(er, stat) {
12378
- cb(er, er ? false : checkStat(stat, path12, options));
12376
+ function isexe(path11, options, cb) {
12377
+ fs15.stat(path11, function(er, stat) {
12378
+ cb(er, er ? false : checkStat(stat, path11, options));
12379
12379
  });
12380
12380
  }
12381
- function sync(path12, options) {
12382
- return checkStat(fs20.statSync(path12), path12, options);
12381
+ function sync(path11, options) {
12382
+ return checkStat(fs15.statSync(path11), path11, options);
12383
12383
  }
12384
12384
  });
12385
12385
 
@@ -12387,14 +12387,14 @@ var require_windows = __commonJS((exports, module) => {
12387
12387
  var require_mode = __commonJS((exports, module) => {
12388
12388
  module.exports = isexe;
12389
12389
  isexe.sync = sync;
12390
- var fs20 = __require("fs");
12391
- function isexe(path12, options, cb) {
12392
- fs20.stat(path12, function(er, stat) {
12390
+ var fs15 = __require("fs");
12391
+ function isexe(path11, options, cb) {
12392
+ fs15.stat(path11, function(er, stat) {
12393
12393
  cb(er, er ? false : checkStat(stat, options));
12394
12394
  });
12395
12395
  }
12396
- function sync(path12, options) {
12397
- return checkStat(fs20.statSync(path12), options);
12396
+ function sync(path11, options) {
12397
+ return checkStat(fs15.statSync(path11), options);
12398
12398
  }
12399
12399
  function checkStat(stat, options) {
12400
12400
  return stat.isFile() && checkMode(stat, options);
@@ -12416,7 +12416,7 @@ var require_mode = __commonJS((exports, module) => {
12416
12416
 
12417
12417
  // node_modules/isexe/index.js
12418
12418
  var require_isexe = __commonJS((exports, module) => {
12419
- var fs20 = __require("fs");
12419
+ var fs15 = __require("fs");
12420
12420
  var core2;
12421
12421
  if (process.platform === "win32" || global.TESTING_WINDOWS) {
12422
12422
  core2 = require_windows();
@@ -12425,7 +12425,7 @@ var require_isexe = __commonJS((exports, module) => {
12425
12425
  }
12426
12426
  module.exports = isexe;
12427
12427
  isexe.sync = sync;
12428
- function isexe(path12, options, cb) {
12428
+ function isexe(path11, options, cb) {
12429
12429
  if (typeof options === "function") {
12430
12430
  cb = options;
12431
12431
  options = {};
@@ -12435,7 +12435,7 @@ var require_isexe = __commonJS((exports, module) => {
12435
12435
  throw new TypeError("callback not provided");
12436
12436
  }
12437
12437
  return new Promise(function(resolve2, reject) {
12438
- isexe(path12, options || {}, function(er, is) {
12438
+ isexe(path11, options || {}, function(er, is) {
12439
12439
  if (er) {
12440
12440
  reject(er);
12441
12441
  } else {
@@ -12444,7 +12444,7 @@ var require_isexe = __commonJS((exports, module) => {
12444
12444
  });
12445
12445
  });
12446
12446
  }
12447
- core2(path12, options || {}, function(er, is) {
12447
+ core2(path11, options || {}, function(er, is) {
12448
12448
  if (er) {
12449
12449
  if (er.code === "EACCES" || options && options.ignoreErrors) {
12450
12450
  er = null;
@@ -12454,9 +12454,9 @@ var require_isexe = __commonJS((exports, module) => {
12454
12454
  cb(er, is);
12455
12455
  });
12456
12456
  }
12457
- function sync(path12, options) {
12457
+ function sync(path11, options) {
12458
12458
  try {
12459
- return core2.sync(path12, options || {});
12459
+ return core2.sync(path11, options || {});
12460
12460
  } catch (er) {
12461
12461
  if (options && options.ignoreErrors || er.code === "EACCES") {
12462
12462
  return false;
@@ -12470,7 +12470,7 @@ var require_isexe = __commonJS((exports, module) => {
12470
12470
  // node_modules/which/which.js
12471
12471
  var require_which = __commonJS((exports, module) => {
12472
12472
  var isWindows4 = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
12473
- var path12 = __require("path");
12473
+ var path11 = __require("path");
12474
12474
  var COLON = isWindows4 ? ";" : ":";
12475
12475
  var isexe = require_isexe();
12476
12476
  var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
@@ -12506,7 +12506,7 @@ var require_which = __commonJS((exports, module) => {
12506
12506
  return opt.all && found.length ? resolve2(found) : reject(getNotFoundError(cmd));
12507
12507
  const ppRaw = pathEnv[i];
12508
12508
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
12509
- const pCmd = path12.join(pathPart, cmd);
12509
+ const pCmd = path11.join(pathPart, cmd);
12510
12510
  const p2 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
12511
12511
  resolve2(subStep(p2, i, 0));
12512
12512
  });
@@ -12533,7 +12533,7 @@ var require_which = __commonJS((exports, module) => {
12533
12533
  for (let i = 0;i < pathEnv.length; i++) {
12534
12534
  const ppRaw = pathEnv[i];
12535
12535
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
12536
- const pCmd = path12.join(pathPart, cmd);
12536
+ const pCmd = path11.join(pathPart, cmd);
12537
12537
  const p2 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
12538
12538
  for (let j2 = 0;j2 < pathExt.length; j2++) {
12539
12539
  const cur = p2 + pathExt[j2];
@@ -12562,8 +12562,8 @@ var require_which = __commonJS((exports, module) => {
12562
12562
  var require_path_key = __commonJS((exports, module) => {
12563
12563
  var pathKey = (options = {}) => {
12564
12564
  const environment = options.env || process.env;
12565
- const platform7 = options.platform || process.platform;
12566
- if (platform7 !== "win32") {
12565
+ const platform6 = options.platform || process.platform;
12566
+ if (platform6 !== "win32") {
12567
12567
  return "PATH";
12568
12568
  }
12569
12569
  return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
@@ -12574,7 +12574,7 @@ var require_path_key = __commonJS((exports, module) => {
12574
12574
 
12575
12575
  // node_modules/cross-spawn/lib/util/resolveCommand.js
12576
12576
  var require_resolveCommand = __commonJS((exports, module) => {
12577
- var path12 = __require("path");
12577
+ var path11 = __require("path");
12578
12578
  var which = require_which();
12579
12579
  var getPathKey = require_path_key();
12580
12580
  function resolveCommandAttempt(parsed, withoutPathExt) {
@@ -12591,7 +12591,7 @@ var require_resolveCommand = __commonJS((exports, module) => {
12591
12591
  try {
12592
12592
  resolved = which.sync(parsed.command, {
12593
12593
  path: env2[getPathKey({ env: env2 })],
12594
- pathExt: withoutPathExt ? path12.delimiter : undefined
12594
+ pathExt: withoutPathExt ? path11.delimiter : undefined
12595
12595
  });
12596
12596
  } catch (e2) {} finally {
12597
12597
  if (shouldSwitchCwd) {
@@ -12599,7 +12599,7 @@ var require_resolveCommand = __commonJS((exports, module) => {
12599
12599
  }
12600
12600
  }
12601
12601
  if (resolved) {
12602
- resolved = path12.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
12602
+ resolved = path11.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
12603
12603
  }
12604
12604
  return resolved;
12605
12605
  }
@@ -12644,8 +12644,8 @@ var require_shebang_command = __commonJS((exports, module) => {
12644
12644
  if (!match) {
12645
12645
  return null;
12646
12646
  }
12647
- const [path12, argument] = match[0].replace(/#! ?/, "").split(" ");
12648
- const binary = path12.split("/").pop();
12647
+ const [path11, argument] = match[0].replace(/#! ?/, "").split(" ");
12648
+ const binary = path11.split("/").pop();
12649
12649
  if (binary === "env") {
12650
12650
  return argument;
12651
12651
  }
@@ -12655,16 +12655,16 @@ var require_shebang_command = __commonJS((exports, module) => {
12655
12655
 
12656
12656
  // node_modules/cross-spawn/lib/util/readShebang.js
12657
12657
  var require_readShebang = __commonJS((exports, module) => {
12658
- var fs20 = __require("fs");
12658
+ var fs15 = __require("fs");
12659
12659
  var shebangCommand = require_shebang_command();
12660
12660
  function readShebang(command) {
12661
12661
  const size = 150;
12662
12662
  const buffer = Buffer.alloc(size);
12663
12663
  let fd;
12664
12664
  try {
12665
- fd = fs20.openSync(command, "r");
12666
- fs20.readSync(fd, buffer, 0, size, 0);
12667
- fs20.closeSync(fd);
12665
+ fd = fs15.openSync(command, "r");
12666
+ fs15.readSync(fd, buffer, 0, size, 0);
12667
+ fs15.closeSync(fd);
12668
12668
  } catch (e2) {}
12669
12669
  return shebangCommand(buffer.toString());
12670
12670
  }
@@ -12673,7 +12673,7 @@ var require_readShebang = __commonJS((exports, module) => {
12673
12673
 
12674
12674
  // node_modules/cross-spawn/lib/parse.js
12675
12675
  var require_parse4 = __commonJS((exports, module) => {
12676
- var path12 = __require("path");
12676
+ var path11 = __require("path");
12677
12677
  var resolveCommand = require_resolveCommand();
12678
12678
  var escape2 = require_escape();
12679
12679
  var readShebang = require_readShebang();
@@ -12698,7 +12698,7 @@ var require_parse4 = __commonJS((exports, module) => {
12698
12698
  const needsShell = !isExecutableRegExp.test(commandFile);
12699
12699
  if (parsed.options.forceShell || needsShell) {
12700
12700
  const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
12701
- parsed.command = path12.normalize(parsed.command);
12701
+ parsed.command = path11.normalize(parsed.command);
12702
12702
  parsed.command = escape2.command(parsed.command);
12703
12703
  parsed.args = parsed.args.map((arg) => escape2.argument(arg, needsDoubleEscapeMetaChars));
12704
12704
  const shellCommand = [parsed.command].concat(parsed.args).join(" ");
@@ -184916,7 +184916,8 @@ async function pushAgents(agents) {
184916
184916
  let response;
184917
184917
  try {
184918
184918
  response = await appClient.put("agent-configs", {
184919
- json: agents
184919
+ json: agents,
184920
+ timeout: 60000
184920
184921
  });
184921
184922
  } catch (error48) {
184922
184923
  throw await ApiError.fromHttpError(error48, "syncing agents");
@@ -185232,756 +185233,6 @@ function assertNoDuplicateConnectors(connectors) {
185232
185233
  types.add(connector.type);
185233
185234
  }
185234
185235
  }
185235
- // node_modules/open/index.js
185236
- import process11 from "node:process";
185237
- import path11 from "node:path";
185238
- import { fileURLToPath as fileURLToPath3 } from "node:url";
185239
- import childProcess3 from "node:child_process";
185240
- import fs18, { constants as fsConstants2 } from "node:fs/promises";
185241
-
185242
- // node_modules/wsl-utils/index.js
185243
- import { promisify as promisify4 } from "node:util";
185244
- import childProcess2 from "node:child_process";
185245
- import fs17, { constants as fsConstants } from "node:fs/promises";
185246
-
185247
- // node_modules/is-wsl/index.js
185248
- import process5 from "node:process";
185249
- import os from "node:os";
185250
- import fs16 from "node:fs";
185251
-
185252
- // node_modules/is-inside-container/index.js
185253
- import fs15 from "node:fs";
185254
-
185255
- // node_modules/is-docker/index.js
185256
- import fs14 from "node:fs";
185257
- var isDockerCached;
185258
- function hasDockerEnv() {
185259
- try {
185260
- fs14.statSync("/.dockerenv");
185261
- return true;
185262
- } catch {
185263
- return false;
185264
- }
185265
- }
185266
- function hasDockerCGroup() {
185267
- try {
185268
- return fs14.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
185269
- } catch {
185270
- return false;
185271
- }
185272
- }
185273
- function isDocker() {
185274
- if (isDockerCached === undefined) {
185275
- isDockerCached = hasDockerEnv() || hasDockerCGroup();
185276
- }
185277
- return isDockerCached;
185278
- }
185279
-
185280
- // node_modules/is-inside-container/index.js
185281
- var cachedResult;
185282
- var hasContainerEnv = () => {
185283
- try {
185284
- fs15.statSync("/run/.containerenv");
185285
- return true;
185286
- } catch {
185287
- return false;
185288
- }
185289
- };
185290
- function isInsideContainer() {
185291
- if (cachedResult === undefined) {
185292
- cachedResult = hasContainerEnv() || isDocker();
185293
- }
185294
- return cachedResult;
185295
- }
185296
-
185297
- // node_modules/is-wsl/index.js
185298
- var isWsl = () => {
185299
- if (process5.platform !== "linux") {
185300
- return false;
185301
- }
185302
- if (os.release().toLowerCase().includes("microsoft")) {
185303
- if (isInsideContainer()) {
185304
- return false;
185305
- }
185306
- return true;
185307
- }
185308
- try {
185309
- return fs16.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isInsideContainer() : false;
185310
- } catch {
185311
- return false;
185312
- }
185313
- };
185314
- var is_wsl_default = process5.env.__IS_WSL_TEST__ ? isWsl : isWsl();
185315
-
185316
- // node_modules/powershell-utils/index.js
185317
- import process6 from "node:process";
185318
- import { Buffer as Buffer3 } from "node:buffer";
185319
- import { promisify as promisify3 } from "node:util";
185320
- import childProcess from "node:child_process";
185321
- var execFile = promisify3(childProcess.execFile);
185322
- var powerShellPath = () => `${process6.env.SYSTEMROOT || process6.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
185323
- var executePowerShell = async (command, options = {}) => {
185324
- const {
185325
- powerShellPath: psPath,
185326
- ...execFileOptions
185327
- } = options;
185328
- const encodedCommand = executePowerShell.encodeCommand(command);
185329
- return execFile(psPath ?? powerShellPath(), [
185330
- ...executePowerShell.argumentsPrefix,
185331
- encodedCommand
185332
- ], {
185333
- encoding: "utf8",
185334
- ...execFileOptions
185335
- });
185336
- };
185337
- executePowerShell.argumentsPrefix = [
185338
- "-NoProfile",
185339
- "-NonInteractive",
185340
- "-ExecutionPolicy",
185341
- "Bypass",
185342
- "-EncodedCommand"
185343
- ];
185344
- executePowerShell.encodeCommand = (command) => Buffer3.from(command, "utf16le").toString("base64");
185345
- executePowerShell.escapeArgument = (value) => `'${String(value).replaceAll("'", "''")}'`;
185346
-
185347
- // node_modules/wsl-utils/utilities.js
185348
- function parseMountPointFromConfig(content) {
185349
- for (const line of content.split(`
185350
- `)) {
185351
- if (/^\s*#/.test(line)) {
185352
- continue;
185353
- }
185354
- const match = /^\s*root\s*=\s*(?<mountPoint>"[^"]*"|'[^']*'|[^#]*)/.exec(line);
185355
- if (!match) {
185356
- continue;
185357
- }
185358
- return match.groups.mountPoint.trim().replaceAll(/^["']|["']$/g, "");
185359
- }
185360
- }
185361
-
185362
- // node_modules/wsl-utils/index.js
185363
- var execFile2 = promisify4(childProcess2.execFile);
185364
- var wslDrivesMountPoint = (() => {
185365
- const defaultMountPoint = "/mnt/";
185366
- let mountPoint;
185367
- return async function() {
185368
- if (mountPoint) {
185369
- return mountPoint;
185370
- }
185371
- const configFilePath = "/etc/wsl.conf";
185372
- let isConfigFileExists = false;
185373
- try {
185374
- await fs17.access(configFilePath, fsConstants.F_OK);
185375
- isConfigFileExists = true;
185376
- } catch {}
185377
- if (!isConfigFileExists) {
185378
- return defaultMountPoint;
185379
- }
185380
- const configContent = await fs17.readFile(configFilePath, { encoding: "utf8" });
185381
- const parsedMountPoint = parseMountPointFromConfig(configContent);
185382
- if (parsedMountPoint === undefined) {
185383
- return defaultMountPoint;
185384
- }
185385
- mountPoint = parsedMountPoint;
185386
- mountPoint = mountPoint.endsWith("/") ? mountPoint : `${mountPoint}/`;
185387
- return mountPoint;
185388
- };
185389
- })();
185390
- var powerShellPathFromWsl = async () => {
185391
- const mountPoint = await wslDrivesMountPoint();
185392
- return `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`;
185393
- };
185394
- var powerShellPath2 = is_wsl_default ? powerShellPathFromWsl : powerShellPath;
185395
- var canAccessPowerShellPromise;
185396
- var canAccessPowerShell = async () => {
185397
- canAccessPowerShellPromise ??= (async () => {
185398
- try {
185399
- const psPath = await powerShellPath2();
185400
- await fs17.access(psPath, fsConstants.X_OK);
185401
- return true;
185402
- } catch {
185403
- return false;
185404
- }
185405
- })();
185406
- return canAccessPowerShellPromise;
185407
- };
185408
- var wslDefaultBrowser = async () => {
185409
- const psPath = await powerShellPath2();
185410
- const command = String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`;
185411
- const { stdout } = await executePowerShell(command, { powerShellPath: psPath });
185412
- return stdout.trim();
185413
- };
185414
- var convertWslPathToWindows = async (path11) => {
185415
- if (/^[a-z]+:\/\//i.test(path11)) {
185416
- return path11;
185417
- }
185418
- try {
185419
- const { stdout } = await execFile2("wslpath", ["-aw", path11], { encoding: "utf8" });
185420
- return stdout.trim();
185421
- } catch {
185422
- return path11;
185423
- }
185424
- };
185425
-
185426
- // node_modules/define-lazy-prop/index.js
185427
- function defineLazyProperty(object2, propertyName, valueGetter) {
185428
- const define2 = (value) => Object.defineProperty(object2, propertyName, { value, enumerable: true, writable: true });
185429
- Object.defineProperty(object2, propertyName, {
185430
- configurable: true,
185431
- enumerable: true,
185432
- get() {
185433
- const result = valueGetter();
185434
- define2(result);
185435
- return result;
185436
- },
185437
- set(value) {
185438
- define2(value);
185439
- }
185440
- });
185441
- return object2;
185442
- }
185443
-
185444
- // node_modules/default-browser/index.js
185445
- import { promisify as promisify8 } from "node:util";
185446
- import process9 from "node:process";
185447
- import { execFile as execFile6 } from "node:child_process";
185448
-
185449
- // node_modules/default-browser-id/index.js
185450
- import { promisify as promisify5 } from "node:util";
185451
- import process7 from "node:process";
185452
- import { execFile as execFile3 } from "node:child_process";
185453
- var execFileAsync = promisify5(execFile3);
185454
- async function defaultBrowserId() {
185455
- if (process7.platform !== "darwin") {
185456
- throw new Error("macOS only");
185457
- }
185458
- const { stdout } = await execFileAsync("defaults", ["read", "com.apple.LaunchServices/com.apple.launchservices.secure", "LSHandlers"]);
185459
- const match = /LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout);
185460
- const browserId = match?.groups.id ?? "com.apple.Safari";
185461
- if (browserId === "com.apple.safari") {
185462
- return "com.apple.Safari";
185463
- }
185464
- return browserId;
185465
- }
185466
-
185467
- // node_modules/run-applescript/index.js
185468
- import process8 from "node:process";
185469
- import { promisify as promisify6 } from "node:util";
185470
- import { execFile as execFile4, execFileSync } from "node:child_process";
185471
- var execFileAsync2 = promisify6(execFile4);
185472
- async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {
185473
- if (process8.platform !== "darwin") {
185474
- throw new Error("macOS only");
185475
- }
185476
- const outputArguments = humanReadableOutput ? [] : ["-ss"];
185477
- const execOptions = {};
185478
- if (signal) {
185479
- execOptions.signal = signal;
185480
- }
185481
- const { stdout } = await execFileAsync2("osascript", ["-e", script, outputArguments], execOptions);
185482
- return stdout.trim();
185483
- }
185484
-
185485
- // node_modules/bundle-name/index.js
185486
- async function bundleName(bundleId) {
185487
- return runAppleScript(`tell application "Finder" to set app_path to application file id "${bundleId}" as string
185488
- tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`);
185489
- }
185490
-
185491
- // node_modules/default-browser/windows.js
185492
- import { promisify as promisify7 } from "node:util";
185493
- import { execFile as execFile5 } from "node:child_process";
185494
- var execFileAsync3 = promisify7(execFile5);
185495
- var windowsBrowserProgIds = {
185496
- MSEdgeHTM: { name: "Edge", id: "com.microsoft.edge" },
185497
- MSEdgeBHTML: { name: "Edge Beta", id: "com.microsoft.edge.beta" },
185498
- MSEdgeDHTML: { name: "Edge Dev", id: "com.microsoft.edge.dev" },
185499
- AppXq0fevzme2pys62n3e0fbqa7peapykr8v: { name: "Edge", id: "com.microsoft.edge.old" },
185500
- ChromeHTML: { name: "Chrome", id: "com.google.chrome" },
185501
- ChromeBHTML: { name: "Chrome Beta", id: "com.google.chrome.beta" },
185502
- ChromeDHTML: { name: "Chrome Dev", id: "com.google.chrome.dev" },
185503
- ChromiumHTM: { name: "Chromium", id: "org.chromium.Chromium" },
185504
- BraveHTML: { name: "Brave", id: "com.brave.Browser" },
185505
- BraveBHTML: { name: "Brave Beta", id: "com.brave.Browser.beta" },
185506
- BraveDHTML: { name: "Brave Dev", id: "com.brave.Browser.dev" },
185507
- BraveSSHTM: { name: "Brave Nightly", id: "com.brave.Browser.nightly" },
185508
- FirefoxURL: { name: "Firefox", id: "org.mozilla.firefox" },
185509
- OperaStable: { name: "Opera", id: "com.operasoftware.Opera" },
185510
- VivaldiHTM: { name: "Vivaldi", id: "com.vivaldi.Vivaldi" },
185511
- "IE.HTTP": { name: "Internet Explorer", id: "com.microsoft.ie" }
185512
- };
185513
- var _windowsBrowserProgIdMap = new Map(Object.entries(windowsBrowserProgIds));
185514
-
185515
- class UnknownBrowserError extends Error {
185516
- }
185517
- async function defaultBrowser(_execFileAsync = execFileAsync3) {
185518
- const { stdout } = await _execFileAsync("reg", [
185519
- "QUERY",
185520
- " HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice",
185521
- "/v",
185522
- "ProgId"
185523
- ]);
185524
- const match = /ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(stdout);
185525
- if (!match) {
185526
- throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);
185527
- }
185528
- const { id } = match.groups;
185529
- const dotIndex = id.lastIndexOf(".");
185530
- const hyphenIndex = id.lastIndexOf("-");
185531
- const baseIdByDot = dotIndex === -1 ? undefined : id.slice(0, dotIndex);
185532
- const baseIdByHyphen = hyphenIndex === -1 ? undefined : id.slice(0, hyphenIndex);
185533
- return windowsBrowserProgIds[id] ?? windowsBrowserProgIds[baseIdByDot] ?? windowsBrowserProgIds[baseIdByHyphen] ?? { name: id, id };
185534
- }
185535
-
185536
- // node_modules/default-browser/index.js
185537
- var execFileAsync4 = promisify8(execFile6);
185538
- var titleize = (string4) => string4.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x2) => x2.toUpperCase());
185539
- async function defaultBrowser2() {
185540
- if (process9.platform === "darwin") {
185541
- const id = await defaultBrowserId();
185542
- const name2 = await bundleName(id);
185543
- return { name: name2, id };
185544
- }
185545
- if (process9.platform === "linux") {
185546
- const { stdout } = await execFileAsync4("xdg-mime", ["query", "default", "x-scheme-handler/http"]);
185547
- const id = stdout.trim();
185548
- const name2 = titleize(id.replace(/.desktop$/, "").replace("-", " "));
185549
- return { name: name2, id };
185550
- }
185551
- if (process9.platform === "win32") {
185552
- return defaultBrowser();
185553
- }
185554
- throw new Error("Only macOS, Linux, and Windows are supported");
185555
- }
185556
-
185557
- // node_modules/is-in-ssh/index.js
185558
- import process10 from "node:process";
185559
- var isInSsh = Boolean(process10.env.SSH_CONNECTION || process10.env.SSH_CLIENT || process10.env.SSH_TTY);
185560
- var is_in_ssh_default = isInSsh;
185561
-
185562
- // node_modules/open/index.js
185563
- var fallbackAttemptSymbol = Symbol("fallbackAttempt");
185564
- var __dirname3 = import.meta.url ? path11.dirname(fileURLToPath3(import.meta.url)) : "";
185565
- var localXdgOpenPath = path11.join(__dirname3, "xdg-open");
185566
- var { platform: platform5, arch } = process11;
185567
- var tryEachApp = async (apps, opener) => {
185568
- if (apps.length === 0) {
185569
- return;
185570
- }
185571
- const errors3 = [];
185572
- for (const app of apps) {
185573
- try {
185574
- return await opener(app);
185575
- } catch (error48) {
185576
- errors3.push(error48);
185577
- }
185578
- }
185579
- throw new AggregateError(errors3, "Failed to open in all supported apps");
185580
- };
185581
- var baseOpen = async (options) => {
185582
- options = {
185583
- wait: false,
185584
- background: false,
185585
- newInstance: false,
185586
- allowNonzeroExitCode: false,
185587
- ...options
185588
- };
185589
- const isFallbackAttempt = options[fallbackAttemptSymbol] === true;
185590
- delete options[fallbackAttemptSymbol];
185591
- if (Array.isArray(options.app)) {
185592
- return tryEachApp(options.app, (singleApp) => baseOpen({
185593
- ...options,
185594
- app: singleApp,
185595
- [fallbackAttemptSymbol]: true
185596
- }));
185597
- }
185598
- let { name: app, arguments: appArguments = [] } = options.app ?? {};
185599
- appArguments = [...appArguments];
185600
- if (Array.isArray(app)) {
185601
- return tryEachApp(app, (appName) => baseOpen({
185602
- ...options,
185603
- app: {
185604
- name: appName,
185605
- arguments: appArguments
185606
- },
185607
- [fallbackAttemptSymbol]: true
185608
- }));
185609
- }
185610
- if (app === "browser" || app === "browserPrivate") {
185611
- const ids = {
185612
- "com.google.chrome": "chrome",
185613
- "google-chrome.desktop": "chrome",
185614
- "com.brave.browser": "brave",
185615
- "org.mozilla.firefox": "firefox",
185616
- "firefox.desktop": "firefox",
185617
- "com.microsoft.msedge": "edge",
185618
- "com.microsoft.edge": "edge",
185619
- "com.microsoft.edgemac": "edge",
185620
- "microsoft-edge.desktop": "edge",
185621
- "com.apple.safari": "safari"
185622
- };
185623
- const flags = {
185624
- chrome: "--incognito",
185625
- brave: "--incognito",
185626
- firefox: "--private-window",
185627
- edge: "--inPrivate"
185628
- };
185629
- let browser;
185630
- if (is_wsl_default) {
185631
- const progId = await wslDefaultBrowser();
185632
- const browserInfo = _windowsBrowserProgIdMap.get(progId);
185633
- browser = browserInfo ?? {};
185634
- } else {
185635
- browser = await defaultBrowser2();
185636
- }
185637
- if (browser.id in ids) {
185638
- const browserName = ids[browser.id.toLowerCase()];
185639
- if (app === "browserPrivate") {
185640
- if (browserName === "safari") {
185641
- throw new Error("Safari doesn't support opening in private mode via command line");
185642
- }
185643
- appArguments.push(flags[browserName]);
185644
- }
185645
- return baseOpen({
185646
- ...options,
185647
- app: {
185648
- name: apps[browserName],
185649
- arguments: appArguments
185650
- }
185651
- });
185652
- }
185653
- throw new Error(`${browser.name} is not supported as a default browser`);
185654
- }
185655
- let command;
185656
- const cliArguments = [];
185657
- const childProcessOptions = {};
185658
- let shouldUseWindowsInWsl = false;
185659
- if (is_wsl_default && !isInsideContainer() && !is_in_ssh_default && !app) {
185660
- shouldUseWindowsInWsl = await canAccessPowerShell();
185661
- }
185662
- if (platform5 === "darwin") {
185663
- command = "open";
185664
- if (options.wait) {
185665
- cliArguments.push("--wait-apps");
185666
- }
185667
- if (options.background) {
185668
- cliArguments.push("--background");
185669
- }
185670
- if (options.newInstance) {
185671
- cliArguments.push("--new");
185672
- }
185673
- if (app) {
185674
- cliArguments.push("-a", app);
185675
- }
185676
- } else if (platform5 === "win32" || shouldUseWindowsInWsl) {
185677
- command = await powerShellPath2();
185678
- cliArguments.push(...executePowerShell.argumentsPrefix);
185679
- if (!is_wsl_default) {
185680
- childProcessOptions.windowsVerbatimArguments = true;
185681
- }
185682
- if (is_wsl_default && options.target) {
185683
- options.target = await convertWslPathToWindows(options.target);
185684
- }
185685
- const encodedArguments = ["$ProgressPreference = 'SilentlyContinue';", "Start"];
185686
- if (options.wait) {
185687
- encodedArguments.push("-Wait");
185688
- }
185689
- if (app) {
185690
- encodedArguments.push(executePowerShell.escapeArgument(app));
185691
- if (options.target) {
185692
- appArguments.push(options.target);
185693
- }
185694
- } else if (options.target) {
185695
- encodedArguments.push(executePowerShell.escapeArgument(options.target));
185696
- }
185697
- if (appArguments.length > 0) {
185698
- appArguments = appArguments.map((argument) => executePowerShell.escapeArgument(argument));
185699
- encodedArguments.push("-ArgumentList", appArguments.join(","));
185700
- }
185701
- options.target = executePowerShell.encodeCommand(encodedArguments.join(" "));
185702
- if (!options.wait) {
185703
- childProcessOptions.stdio = "ignore";
185704
- }
185705
- } else {
185706
- if (app) {
185707
- command = app;
185708
- } else {
185709
- const isBundled = !__dirname3 || __dirname3 === "/";
185710
- let exeLocalXdgOpen = false;
185711
- try {
185712
- await fs18.access(localXdgOpenPath, fsConstants2.X_OK);
185713
- exeLocalXdgOpen = true;
185714
- } catch {}
185715
- const useSystemXdgOpen = process11.versions.electron ?? (platform5 === "android" || isBundled || !exeLocalXdgOpen);
185716
- command = useSystemXdgOpen ? "xdg-open" : localXdgOpenPath;
185717
- }
185718
- if (appArguments.length > 0) {
185719
- cliArguments.push(...appArguments);
185720
- }
185721
- if (!options.wait) {
185722
- childProcessOptions.stdio = "ignore";
185723
- childProcessOptions.detached = true;
185724
- }
185725
- }
185726
- if (platform5 === "darwin" && appArguments.length > 0) {
185727
- cliArguments.push("--args", ...appArguments);
185728
- }
185729
- if (options.target) {
185730
- cliArguments.push(options.target);
185731
- }
185732
- const subprocess = childProcess3.spawn(command, cliArguments, childProcessOptions);
185733
- if (options.wait) {
185734
- return new Promise((resolve, reject) => {
185735
- subprocess.once("error", reject);
185736
- subprocess.once("close", (exitCode) => {
185737
- if (!options.allowNonzeroExitCode && exitCode !== 0) {
185738
- reject(new Error(`Exited with code ${exitCode}`));
185739
- return;
185740
- }
185741
- resolve(subprocess);
185742
- });
185743
- });
185744
- }
185745
- if (isFallbackAttempt) {
185746
- return new Promise((resolve, reject) => {
185747
- subprocess.once("error", reject);
185748
- subprocess.once("spawn", () => {
185749
- subprocess.once("close", (exitCode) => {
185750
- subprocess.off("error", reject);
185751
- if (exitCode !== 0) {
185752
- reject(new Error(`Exited with code ${exitCode}`));
185753
- return;
185754
- }
185755
- subprocess.unref();
185756
- resolve(subprocess);
185757
- });
185758
- });
185759
- });
185760
- }
185761
- subprocess.unref();
185762
- return new Promise((resolve, reject) => {
185763
- subprocess.once("error", reject);
185764
- subprocess.once("spawn", () => {
185765
- subprocess.off("error", reject);
185766
- resolve(subprocess);
185767
- });
185768
- });
185769
- };
185770
- var open = (target, options) => {
185771
- if (typeof target !== "string") {
185772
- throw new TypeError("Expected a `target`");
185773
- }
185774
- return baseOpen({
185775
- ...options,
185776
- target
185777
- });
185778
- };
185779
- function detectArchBinary(binary) {
185780
- if (typeof binary === "string" || Array.isArray(binary)) {
185781
- return binary;
185782
- }
185783
- const { [arch]: archBinary } = binary;
185784
- if (!archBinary) {
185785
- throw new Error(`${arch} is not supported`);
185786
- }
185787
- return archBinary;
185788
- }
185789
- function detectPlatformBinary({ [platform5]: platformBinary }, { wsl } = {}) {
185790
- if (wsl && is_wsl_default) {
185791
- return detectArchBinary(wsl);
185792
- }
185793
- if (!platformBinary) {
185794
- throw new Error(`${platform5} is not supported`);
185795
- }
185796
- return detectArchBinary(platformBinary);
185797
- }
185798
- var apps = {
185799
- browser: "browser",
185800
- browserPrivate: "browserPrivate"
185801
- };
185802
- defineLazyProperty(apps, "chrome", () => detectPlatformBinary({
185803
- darwin: "google chrome",
185804
- win32: "chrome",
185805
- linux: ["google-chrome", "google-chrome-stable", "chromium", "chromium-browser"]
185806
- }, {
185807
- wsl: {
185808
- ia32: "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",
185809
- x64: ["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe", "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]
185810
- }
185811
- }));
185812
- defineLazyProperty(apps, "brave", () => detectPlatformBinary({
185813
- darwin: "brave browser",
185814
- win32: "brave",
185815
- linux: ["brave-browser", "brave"]
185816
- }, {
185817
- wsl: {
185818
- ia32: "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe",
185819
- x64: ["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe", "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"]
185820
- }
185821
- }));
185822
- defineLazyProperty(apps, "firefox", () => detectPlatformBinary({
185823
- darwin: "firefox",
185824
- win32: String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,
185825
- linux: "firefox"
185826
- }, {
185827
- wsl: "/mnt/c/Program Files/Mozilla Firefox/firefox.exe"
185828
- }));
185829
- defineLazyProperty(apps, "edge", () => detectPlatformBinary({
185830
- darwin: "microsoft edge",
185831
- win32: "msedge",
185832
- linux: ["microsoft-edge", "microsoft-edge-dev"]
185833
- }, {
185834
- wsl: "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
185835
- }));
185836
- defineLazyProperty(apps, "safari", () => detectPlatformBinary({
185837
- darwin: "Safari"
185838
- }));
185839
- var open_default = open;
185840
-
185841
- // node_modules/p-wait-for/index.js
185842
- var resolveValue = Symbol("resolveValue");
185843
- var sleep = (ms, signal) => new Promise((resolve, reject) => {
185844
- if (signal?.aborted) {
185845
- reject(signal.reason);
185846
- return;
185847
- }
185848
- const timeout2 = setTimeout(resolve, ms);
185849
- if (signal) {
185850
- signal.addEventListener("abort", () => {
185851
- clearTimeout(timeout2);
185852
- reject(signal.reason);
185853
- }, { once: true });
185854
- }
185855
- });
185856
- var validateOptions = (interval, timeout2) => {
185857
- if (typeof interval !== "number" || !Number.isFinite(interval) || interval < 0) {
185858
- throw new TypeError("Expected interval to be a finite non-negative number");
185859
- }
185860
- if (typeof timeout2 === "object" && timeout2 !== null) {
185861
- if (typeof timeout2.milliseconds !== "number" || Number.isNaN(timeout2.milliseconds) || timeout2.milliseconds < 0) {
185862
- throw new TypeError("Expected timeout.milliseconds to be a finite non-negative number");
185863
- }
185864
- } else if (typeof timeout2 === "number" && (Number.isNaN(timeout2) || timeout2 < 0)) {
185865
- throw new TypeError("Expected timeout to be a finite non-negative number");
185866
- }
185867
- };
185868
- var createTimeoutError = (timeout2) => {
185869
- if (timeout2.message instanceof Error) {
185870
- return timeout2.message;
185871
- }
185872
- const message = timeout2.message ?? `Promise timed out after ${timeout2.milliseconds} milliseconds`;
185873
- return new TimeoutError2(message);
185874
- };
185875
- var handleFallback = (timeout2) => {
185876
- if (timeout2.fallback) {
185877
- return timeout2.fallback();
185878
- }
185879
- throw createTimeoutError(timeout2);
185880
- };
185881
- var handleAbortError = (timeoutSignal, timeout2, signal) => {
185882
- if (timeoutSignal?.aborted) {
185883
- if (typeof timeout2 === "object") {
185884
- return handleFallback(timeout2);
185885
- }
185886
- throw new TimeoutError2;
185887
- }
185888
- throw signal.reason;
185889
- };
185890
- async function pWaitFor(condition, options = {}) {
185891
- const {
185892
- interval = 20,
185893
- timeout: timeout2 = Number.POSITIVE_INFINITY,
185894
- before = true,
185895
- signal
185896
- } = options;
185897
- validateOptions(interval, timeout2);
185898
- const timeoutMs = typeof timeout2 === "number" ? timeout2 : timeout2?.milliseconds ?? Number.POSITIVE_INFINITY;
185899
- const timeoutSignal = timeoutMs === Number.POSITIVE_INFINITY ? undefined : AbortSignal.timeout(timeoutMs);
185900
- const combinedSignal = timeoutSignal && signal ? AbortSignal.any([timeoutSignal, signal]) : timeoutSignal ?? signal;
185901
- if (!before) {
185902
- await sleep(interval, combinedSignal);
185903
- }
185904
- if (combinedSignal?.aborted) {
185905
- return handleAbortError(timeoutSignal, timeout2, signal);
185906
- }
185907
- while (true) {
185908
- try {
185909
- const value = await condition();
185910
- if (typeof value === "object" && value !== null && resolveValue in value) {
185911
- return value[resolveValue];
185912
- }
185913
- if (value === true) {
185914
- return;
185915
- }
185916
- if (value === false) {
185917
- await sleep(interval, combinedSignal);
185918
- continue;
185919
- }
185920
- throw new TypeError("Expected condition to return a boolean");
185921
- } catch (error48) {
185922
- if (error48 === combinedSignal?.reason) {
185923
- return handleAbortError(timeoutSignal, timeout2, signal);
185924
- }
185925
- throw error48;
185926
- }
185927
- }
185928
- }
185929
- pWaitFor.resolveWith = (value) => ({ [resolveValue]: value });
185930
-
185931
- class TimeoutError2 extends Error {
185932
- constructor(message = "Promise timed out") {
185933
- super(message);
185934
- this.name = "TimeoutError";
185935
- }
185936
- }
185937
-
185938
- // src/core/resources/connector/oauth.ts
185939
- var POLL_INTERVAL_MS = 2000;
185940
- var POLL_TIMEOUT_MS = 2 * 60 * 1000;
185941
- async function runOAuthFlowWithSkip(params) {
185942
- await open_default(params.redirectUrl);
185943
- let finalStatus = "PENDING";
185944
- let skipped = false;
185945
- const s = Y2();
185946
- const originalExit = process.exit;
185947
- process.exit = () => {
185948
- skipped = true;
185949
- s.stop(`${params.type} skipped`);
185950
- };
185951
- s.start(`Waiting for ${params.type} authorization... (Esc to skip)`);
185952
- try {
185953
- await pWaitFor(async () => {
185954
- if (skipped) {
185955
- finalStatus = "SKIPPED";
185956
- return true;
185957
- }
185958
- const response = await getOAuthStatus(params.type, params.connectionId);
185959
- finalStatus = response.status;
185960
- return response.status !== "PENDING";
185961
- }, {
185962
- interval: POLL_INTERVAL_MS,
185963
- timeout: POLL_TIMEOUT_MS
185964
- }).catch((err) => {
185965
- if (err instanceof TimeoutError2) {
185966
- finalStatus = "PENDING";
185967
- } else {
185968
- throw err;
185969
- }
185970
- });
185971
- } finally {
185972
- process.exit = originalExit;
185973
- if (!skipped) {
185974
- if (finalStatus === "ACTIVE") {
185975
- s.stop(`${params.type} authorization complete`);
185976
- } else if (finalStatus === "FAILED") {
185977
- s.stop(`${params.type} authorization failed`);
185978
- } else {
185979
- s.stop(`${params.type} authorization timed out`);
185980
- }
185981
- }
185982
- }
185983
- return { type: params.type, status: finalStatus };
185984
- }
185985
185236
  // src/core/resources/connector/push.ts
185986
185237
  async function pushConnectors(connectors) {
185987
185238
  const results = [];
@@ -186182,7 +185433,8 @@ async function syncEntities(entities) {
186182
185433
  response = await appClient.put("entity-schemas", {
186183
185434
  json: {
186184
185435
  entityNameToSchema: schemaSyncPayload
186185
- }
185436
+ },
185437
+ timeout: 60000
186186
185438
  });
186187
185439
  } catch (error48) {
186188
185440
  throw await ApiError.fromHttpError(error48, "syncing entities");
@@ -186309,7 +185561,7 @@ async function deployFunctions(functions) {
186309
185561
  try {
186310
185562
  response = await appClient.put("backend-functions", {
186311
185563
  json: payload,
186312
- timeout: 120000
185564
+ timeout: false
186313
185565
  });
186314
185566
  } catch (error48) {
186315
185567
  throw await ApiError.fromHttpError(error48, "deploying functions");
@@ -186614,7 +185866,8 @@ async function uploadSite(archivePath) {
186614
185866
  let response;
186615
185867
  try {
186616
185868
  response = await appClient.post("deploy-dist", {
186617
- body: formData
185869
+ body: formData,
185870
+ timeout: 180000
186618
185871
  });
186619
185872
  } catch (error48) {
186620
185873
  throw await ApiError.fromHttpError(error48, "deploying site");
@@ -186733,7 +185986,6 @@ async function handleUnauthorized(request, _options, response) {
186733
185986
  }
186734
185987
  var base44Client = distribution_default.create({
186735
185988
  prefixUrl: getBase44ApiUrl(),
186736
- timeout: 180000,
186737
185989
  headers: {
186738
185990
  "User-Agent": "Base44 CLI"
186739
185991
  },
@@ -187044,16 +186296,16 @@ var ansiStyles = assembleStyles();
187044
186296
  var ansi_styles_default = ansiStyles;
187045
186297
 
187046
186298
  // node_modules/chalk/source/vendor/supports-color/index.js
187047
- import process12 from "node:process";
187048
- import os2 from "node:os";
186299
+ import process5 from "node:process";
186300
+ import os from "node:os";
187049
186301
  import tty from "node:tty";
187050
- function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process12.argv) {
186302
+ function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process5.argv) {
187051
186303
  const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
187052
186304
  const position = argv.indexOf(prefix + flag);
187053
186305
  const terminatorPosition = argv.indexOf("--");
187054
186306
  return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
187055
186307
  }
187056
- var { env } = process12;
186308
+ var { env } = process5;
187057
186309
  var flagForceColor;
187058
186310
  if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
187059
186311
  flagForceColor = 0;
@@ -187109,8 +186361,8 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
187109
186361
  if (env.TERM === "dumb") {
187110
186362
  return min;
187111
186363
  }
187112
- if (process12.platform === "win32") {
187113
- const osRelease = os2.release().split(".");
186364
+ if (process5.platform === "win32") {
186365
+ const osRelease = os.release().split(".");
187114
186366
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
187115
186367
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
187116
186368
  }
@@ -187302,18 +186554,18 @@ var proto = Object.defineProperties(() => {}, {
187302
186554
  }
187303
186555
  }
187304
186556
  });
187305
- var createStyler = (open2, close, parent) => {
186557
+ var createStyler = (open, close, parent) => {
187306
186558
  let openAll;
187307
186559
  let closeAll;
187308
186560
  if (parent === undefined) {
187309
- openAll = open2;
186561
+ openAll = open;
187310
186562
  closeAll = close;
187311
186563
  } else {
187312
- openAll = parent.openAll + open2;
186564
+ openAll = parent.openAll + open;
187313
186565
  closeAll = close + parent.closeAll;
187314
186566
  }
187315
186567
  return {
187316
- open: open2,
186568
+ open,
187317
186569
  close,
187318
186570
  openAll,
187319
186571
  closeAll,
@@ -187395,7 +186647,7 @@ var theme = {
187395
186647
  };
187396
186648
 
187397
186649
  // src/cli/utils/animate.ts
187398
- function sleep2(ms) {
186650
+ function sleep(ms) {
187399
186651
  return new Promise((resolve2) => setTimeout(resolve2, ms));
187400
186652
  }
187401
186653
  async function animateLineReveal(line, duration3) {
@@ -187415,7 +186667,7 @@ async function animateLineReveal(line, duration3) {
187415
186667
  }
187416
186668
  }
187417
186669
  process.stdout.write(`\r${output}`);
187418
- await sleep2(stepDuration);
186670
+ await sleep(stepDuration);
187419
186671
  }
187420
186672
  process.stdout.write(`\r${theme.colors.base44Orange(line)}
187421
186673
  `);
@@ -187440,7 +186692,7 @@ async function shimmerPass(lines, duration3) {
187440
186692
  }
187441
186693
  console.log(output);
187442
186694
  }
187443
- await sleep2(stepDuration);
186695
+ await sleep(stepDuration);
187444
186696
  }
187445
186697
  process.stdout.write(moveUp);
187446
186698
  for (const line of lines) {
@@ -187454,7 +186706,7 @@ async function printAnimatedLines(lines) {
187454
186706
  const line = lines[i];
187455
186707
  await animateLineReveal(line, 100);
187456
186708
  if (i < lines.length - 1) {
187457
- await sleep2(lineDelay - 100);
186709
+ await sleep(lineDelay - 100);
187458
186710
  }
187459
186711
  }
187460
186712
  await shimmerPass(lines, 200);
@@ -187492,6 +186744,103 @@ var onPromptCancel = () => {
187492
186744
  xe("Operation cancelled.");
187493
186745
  throw new CLIExitError(0);
187494
186746
  };
186747
+ // node_modules/p-wait-for/index.js
186748
+ var resolveValue = Symbol("resolveValue");
186749
+ var sleep2 = (ms, signal) => new Promise((resolve2, reject) => {
186750
+ if (signal?.aborted) {
186751
+ reject(signal.reason);
186752
+ return;
186753
+ }
186754
+ const timeout2 = setTimeout(resolve2, ms);
186755
+ if (signal) {
186756
+ signal.addEventListener("abort", () => {
186757
+ clearTimeout(timeout2);
186758
+ reject(signal.reason);
186759
+ }, { once: true });
186760
+ }
186761
+ });
186762
+ var validateOptions = (interval, timeout2) => {
186763
+ if (typeof interval !== "number" || !Number.isFinite(interval) || interval < 0) {
186764
+ throw new TypeError("Expected interval to be a finite non-negative number");
186765
+ }
186766
+ if (typeof timeout2 === "object" && timeout2 !== null) {
186767
+ if (typeof timeout2.milliseconds !== "number" || Number.isNaN(timeout2.milliseconds) || timeout2.milliseconds < 0) {
186768
+ throw new TypeError("Expected timeout.milliseconds to be a finite non-negative number");
186769
+ }
186770
+ } else if (typeof timeout2 === "number" && (Number.isNaN(timeout2) || timeout2 < 0)) {
186771
+ throw new TypeError("Expected timeout to be a finite non-negative number");
186772
+ }
186773
+ };
186774
+ var createTimeoutError = (timeout2) => {
186775
+ if (timeout2.message instanceof Error) {
186776
+ return timeout2.message;
186777
+ }
186778
+ const message = timeout2.message ?? `Promise timed out after ${timeout2.milliseconds} milliseconds`;
186779
+ return new TimeoutError2(message);
186780
+ };
186781
+ var handleFallback = (timeout2) => {
186782
+ if (timeout2.fallback) {
186783
+ return timeout2.fallback();
186784
+ }
186785
+ throw createTimeoutError(timeout2);
186786
+ };
186787
+ var handleAbortError = (timeoutSignal, timeout2, signal) => {
186788
+ if (timeoutSignal?.aborted) {
186789
+ if (typeof timeout2 === "object") {
186790
+ return handleFallback(timeout2);
186791
+ }
186792
+ throw new TimeoutError2;
186793
+ }
186794
+ throw signal.reason;
186795
+ };
186796
+ async function pWaitFor(condition, options = {}) {
186797
+ const {
186798
+ interval = 20,
186799
+ timeout: timeout2 = Number.POSITIVE_INFINITY,
186800
+ before = true,
186801
+ signal
186802
+ } = options;
186803
+ validateOptions(interval, timeout2);
186804
+ const timeoutMs = typeof timeout2 === "number" ? timeout2 : timeout2?.milliseconds ?? Number.POSITIVE_INFINITY;
186805
+ const timeoutSignal = timeoutMs === Number.POSITIVE_INFINITY ? undefined : AbortSignal.timeout(timeoutMs);
186806
+ const combinedSignal = timeoutSignal && signal ? AbortSignal.any([timeoutSignal, signal]) : timeoutSignal ?? signal;
186807
+ if (!before) {
186808
+ await sleep2(interval, combinedSignal);
186809
+ }
186810
+ if (combinedSignal?.aborted) {
186811
+ return handleAbortError(timeoutSignal, timeout2, signal);
186812
+ }
186813
+ while (true) {
186814
+ try {
186815
+ const value = await condition();
186816
+ if (typeof value === "object" && value !== null && resolveValue in value) {
186817
+ return value[resolveValue];
186818
+ }
186819
+ if (value === true) {
186820
+ return;
186821
+ }
186822
+ if (value === false) {
186823
+ await sleep2(interval, combinedSignal);
186824
+ continue;
186825
+ }
186826
+ throw new TypeError("Expected condition to return a boolean");
186827
+ } catch (error48) {
186828
+ if (error48 === combinedSignal?.reason) {
186829
+ return handleAbortError(timeoutSignal, timeout2, signal);
186830
+ }
186831
+ throw error48;
186832
+ }
186833
+ }
186834
+ }
186835
+ pWaitFor.resolveWith = (value) => ({ [resolveValue]: value });
186836
+
186837
+ class TimeoutError2 extends Error {
186838
+ constructor(message = "Promise timed out") {
186839
+ super(message);
186840
+ this.name = "TimeoutError";
186841
+ }
186842
+ }
186843
+
187495
186844
  // src/cli/commands/auth/login-flow.ts
187496
186845
  async function generateAndDisplayDeviceCode() {
187497
186846
  const deviceCodeResponse = await runTask("Generating device code...", async () => {
@@ -187564,7 +186913,7 @@ function isPlainObject2(value) {
187564
186913
  }
187565
186914
 
187566
186915
  // node_modules/execa/lib/arguments/file-url.js
187567
- import { fileURLToPath as fileURLToPath4 } from "node:url";
186916
+ import { fileURLToPath as fileURLToPath3 } from "node:url";
187568
186917
  var safeNormalizeFileUrl = (file2, name2) => {
187569
186918
  const fileString = normalizeFileUrl(normalizeDenoExecPath(file2));
187570
186919
  if (typeof fileString !== "string") {
@@ -187574,7 +186923,7 @@ var safeNormalizeFileUrl = (file2, name2) => {
187574
186923
  };
187575
186924
  var normalizeDenoExecPath = (file2) => isDenoExecPath(file2) ? file2.toString() : file2;
187576
186925
  var isDenoExecPath = (file2) => typeof file2 !== "string" && file2 && Object.getPrototypeOf(file2) === String.prototype;
187577
- var normalizeFileUrl = (file2) => file2 instanceof URL ? fileURLToPath4(file2) : file2;
186926
+ var normalizeFileUrl = (file2) => file2 instanceof URL ? fileURLToPath3(file2) : file2;
187578
186927
 
187579
186928
  // node_modules/execa/lib/methods/parameters.js
187580
186929
  var normalizeParameters = (rawFile, rawArguments = [], rawOptions = {}) => {
@@ -187756,9 +187105,9 @@ import { spawnSync } from "node:child_process";
187756
187105
  import { debuglog } from "node:util";
187757
187106
 
187758
187107
  // node_modules/execa/lib/utils/standard-stream.js
187759
- import process13 from "node:process";
187108
+ import process6 from "node:process";
187760
187109
  var isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
187761
- var STANDARD_STREAMS = [process13.stdin, process13.stdout, process13.stderr];
187110
+ var STANDARD_STREAMS = [process6.stdin, process6.stdout, process6.stderr];
187762
187111
  var STANDARD_STREAMS_ALIASES = ["stdin", "stdout", "stderr"];
187763
187112
  var getStreamName = (fdNumber) => STANDARD_STREAMS_ALIASES[fdNumber] ?? `stdio[${fdNumber}]`;
187764
187113
 
@@ -187848,7 +187197,7 @@ var VERBOSE_VALUES = ["none", "short", "full"];
187848
187197
  import { inspect } from "node:util";
187849
187198
 
187850
187199
  // node_modules/execa/lib/arguments/escape.js
187851
- import { platform as platform6 } from "node:process";
187200
+ import { platform as platform5 } from "node:process";
187852
187201
  import { stripVTControlCharacters } from "node:util";
187853
187202
  var joinCommand = (filePath, rawArguments) => {
187854
187203
  const fileAndArguments = [filePath, ...rawArguments];
@@ -187890,16 +187239,16 @@ var quoteString = (escapedArgument) => {
187890
187239
  if (NO_ESCAPE_REGEXP.test(escapedArgument)) {
187891
187240
  return escapedArgument;
187892
187241
  }
187893
- return platform6 === "win32" ? `"${escapedArgument.replaceAll('"', '""')}"` : `'${escapedArgument.replaceAll("'", "'\\''")}'`;
187242
+ return platform5 === "win32" ? `"${escapedArgument.replaceAll('"', '""')}"` : `'${escapedArgument.replaceAll("'", "'\\''")}'`;
187894
187243
  };
187895
187244
  var NO_ESCAPE_REGEXP = /^[\w./-]+$/;
187896
187245
 
187897
187246
  // node_modules/is-unicode-supported/index.js
187898
- import process14 from "node:process";
187247
+ import process7 from "node:process";
187899
187248
  function isUnicodeSupported() {
187900
- const { env: env2 } = process14;
187249
+ const { env: env2 } = process7;
187901
187250
  const { TERM, TERM_PROGRAM } = env2;
187902
- if (process14.platform !== "win32") {
187251
+ if (process7.platform !== "win32") {
187903
187252
  return TERM !== "linux";
187904
187253
  }
187905
187254
  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";
@@ -188184,11 +187533,11 @@ var replacements = Object.entries(specialMainSymbols);
188184
187533
  // node_modules/yoctocolors/base.js
188185
187534
  import tty2 from "node:tty";
188186
187535
  var hasColors = tty2?.WriteStream?.prototype?.hasColors?.() ?? false;
188187
- var format = (open2, close) => {
187536
+ var format = (open, close) => {
188188
187537
  if (!hasColors) {
188189
187538
  return (input) => input;
188190
187539
  }
188191
- const openCode = `\x1B[${open2}m`;
187540
+ const openCode = `\x1B[${open}m`;
188192
187541
  const closeCode = `\x1B[${close}m`;
188193
187542
  return (input) => {
188194
187543
  const string4 = input + "";
@@ -188405,43 +187754,43 @@ var handleCommand = (filePath, rawArguments, rawOptions) => {
188405
187754
 
188406
187755
  // node_modules/execa/lib/arguments/options.js
188407
187756
  var import_cross_spawn = __toESM(require_cross_spawn(), 1);
188408
- import path16 from "node:path";
188409
- import process17 from "node:process";
187757
+ import path15 from "node:path";
187758
+ import process10 from "node:process";
188410
187759
 
188411
187760
  // node_modules/npm-run-path/index.js
188412
- import process15 from "node:process";
188413
- import path13 from "node:path";
187761
+ import process8 from "node:process";
187762
+ import path12 from "node:path";
188414
187763
 
188415
187764
  // node_modules/npm-run-path/node_modules/path-key/index.js
188416
187765
  function pathKey(options = {}) {
188417
187766
  const {
188418
187767
  env: env2 = process.env,
188419
- platform: platform7 = process.platform
187768
+ platform: platform6 = process.platform
188420
187769
  } = options;
188421
- if (platform7 !== "win32") {
187770
+ if (platform6 !== "win32") {
188422
187771
  return "PATH";
188423
187772
  }
188424
187773
  return Object.keys(env2).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
188425
187774
  }
188426
187775
 
188427
187776
  // node_modules/npm-run-path/node_modules/unicorn-magic/node.js
188428
- import { promisify as promisify9 } from "node:util";
187777
+ import { promisify as promisify3 } from "node:util";
188429
187778
  import { execFile as execFileCallback2, execFileSync as execFileSyncOriginal2 } from "node:child_process";
188430
- import path12 from "node:path";
188431
- import { fileURLToPath as fileURLToPath5 } from "node:url";
188432
- var execFileOriginal2 = promisify9(execFileCallback2);
187779
+ import path11 from "node:path";
187780
+ import { fileURLToPath as fileURLToPath4 } from "node:url";
187781
+ var execFileOriginal2 = promisify3(execFileCallback2);
188433
187782
  function toPath2(urlOrPath) {
188434
- return urlOrPath instanceof URL ? fileURLToPath5(urlOrPath) : urlOrPath;
187783
+ return urlOrPath instanceof URL ? fileURLToPath4(urlOrPath) : urlOrPath;
188435
187784
  }
188436
187785
  function traversePathUp(startPath) {
188437
187786
  return {
188438
187787
  *[Symbol.iterator]() {
188439
- let currentPath = path12.resolve(toPath2(startPath));
187788
+ let currentPath = path11.resolve(toPath2(startPath));
188440
187789
  let previousPath;
188441
187790
  while (previousPath !== currentPath) {
188442
187791
  yield currentPath;
188443
187792
  previousPath = currentPath;
188444
- currentPath = path12.resolve(currentPath, "..");
187793
+ currentPath = path11.resolve(currentPath, "..");
188445
187794
  }
188446
187795
  }
188447
187796
  };
@@ -188450,38 +187799,38 @@ var TEN_MEGABYTES_IN_BYTES2 = 10 * 1024 * 1024;
188450
187799
 
188451
187800
  // node_modules/npm-run-path/index.js
188452
187801
  var npmRunPath = ({
188453
- cwd = process15.cwd(),
188454
- path: pathOption = process15.env[pathKey()],
187802
+ cwd = process8.cwd(),
187803
+ path: pathOption = process8.env[pathKey()],
188455
187804
  preferLocal = true,
188456
- execPath = process15.execPath,
187805
+ execPath = process8.execPath,
188457
187806
  addExecPath = true
188458
187807
  } = {}) => {
188459
- const cwdPath = path13.resolve(toPath2(cwd));
187808
+ const cwdPath = path12.resolve(toPath2(cwd));
188460
187809
  const result = [];
188461
- const pathParts = pathOption.split(path13.delimiter);
187810
+ const pathParts = pathOption.split(path12.delimiter);
188462
187811
  if (preferLocal) {
188463
187812
  applyPreferLocal(result, pathParts, cwdPath);
188464
187813
  }
188465
187814
  if (addExecPath) {
188466
187815
  applyExecPath(result, pathParts, execPath, cwdPath);
188467
187816
  }
188468
- return pathOption === "" || pathOption === path13.delimiter ? `${result.join(path13.delimiter)}${pathOption}` : [...result, pathOption].join(path13.delimiter);
187817
+ return pathOption === "" || pathOption === path12.delimiter ? `${result.join(path12.delimiter)}${pathOption}` : [...result, pathOption].join(path12.delimiter);
188469
187818
  };
188470
187819
  var applyPreferLocal = (result, pathParts, cwdPath) => {
188471
187820
  for (const directory of traversePathUp(cwdPath)) {
188472
- const pathPart = path13.join(directory, "node_modules/.bin");
187821
+ const pathPart = path12.join(directory, "node_modules/.bin");
188473
187822
  if (!pathParts.includes(pathPart)) {
188474
187823
  result.push(pathPart);
188475
187824
  }
188476
187825
  }
188477
187826
  };
188478
187827
  var applyExecPath = (result, pathParts, execPath, cwdPath) => {
188479
- const pathPart = path13.resolve(cwdPath, toPath2(execPath), "..");
187828
+ const pathPart = path12.resolve(cwdPath, toPath2(execPath), "..");
188480
187829
  if (!pathParts.includes(pathPart)) {
188481
187830
  result.push(pathPart);
188482
187831
  }
188483
187832
  };
188484
- var npmRunPathEnv = ({ env: env2 = process15.env, ...options } = {}) => {
187833
+ var npmRunPathEnv = ({ env: env2 = process8.env, ...options } = {}) => {
188485
187834
  env2 = { ...env2 };
188486
187835
  const pathName = pathKey({ env: env2 });
188487
187836
  options.path = env2[pathName];
@@ -189030,7 +188379,7 @@ var terminateOnCancel = async (subprocess, cancelSignal, context, { signal }) =>
189030
188379
  import { scheduler as scheduler2 } from "node:timers/promises";
189031
188380
 
189032
188381
  // node_modules/execa/lib/ipc/send.js
189033
- import { promisify as promisify10 } from "node:util";
188382
+ import { promisify as promisify4 } from "node:util";
189034
188383
 
189035
188384
  // node_modules/execa/lib/ipc/validation.js
189036
188385
  var validateIpcMethod = ({ methodName, isSubprocess, ipc, isConnected }) => {
@@ -189495,7 +188844,7 @@ var getSendMethod = (anyProcess) => {
189495
188844
  if (PROCESS_SEND_METHODS.has(anyProcess)) {
189496
188845
  return PROCESS_SEND_METHODS.get(anyProcess);
189497
188846
  }
189498
- const sendMethod = promisify10(anyProcess.send.bind(anyProcess));
188847
+ const sendMethod = promisify4(anyProcess.send.bind(anyProcess));
189499
188848
  PROCESS_SEND_METHODS.set(anyProcess, sendMethod);
189500
188849
  return sendMethod;
189501
188850
  };
@@ -189625,7 +188974,7 @@ var killAfterTimeout = async (subprocess, timeout2, context, { signal }) => {
189625
188974
 
189626
188975
  // node_modules/execa/lib/methods/node.js
189627
188976
  import { execPath, execArgv } from "node:process";
189628
- import path14 from "node:path";
188977
+ import path13 from "node:path";
189629
188978
  var mapNode = ({ options }) => {
189630
188979
  if (options.node === false) {
189631
188980
  throw new TypeError('The "node" option cannot be false with `execaNode()`.');
@@ -189644,7 +188993,7 @@ var handleNodeOption = (file2, commandArguments, {
189644
188993
  throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');
189645
188994
  }
189646
188995
  const normalizedNodePath = safeNormalizeFileUrl(nodePath2, 'The "nodePath" option');
189647
- const resolvedNodePath = path14.resolve(cwd, normalizedNodePath);
188996
+ const resolvedNodePath = path13.resolve(cwd, normalizedNodePath);
189648
188997
  const newOptions = {
189649
188998
  ...options,
189650
188999
  nodePath: resolvedNodePath,
@@ -189654,7 +189003,7 @@ var handleNodeOption = (file2, commandArguments, {
189654
189003
  if (!shouldHandleNode) {
189655
189004
  return [file2, commandArguments, newOptions];
189656
189005
  }
189657
- if (path14.basename(file2, ".exe") === "node") {
189006
+ if (path13.basename(file2, ".exe") === "node") {
189658
189007
  throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');
189659
189008
  }
189660
189009
  return [
@@ -189743,15 +189092,15 @@ var serializeEncoding = (encoding) => typeof encoding === "string" ? `"${encodin
189743
189092
 
189744
189093
  // node_modules/execa/lib/arguments/cwd.js
189745
189094
  import { statSync } from "node:fs";
189746
- import path15 from "node:path";
189747
- import process16 from "node:process";
189095
+ import path14 from "node:path";
189096
+ import process9 from "node:process";
189748
189097
  var normalizeCwd = (cwd = getDefaultCwd()) => {
189749
189098
  const cwdString = safeNormalizeFileUrl(cwd, 'The "cwd" option');
189750
- return path15.resolve(cwdString);
189099
+ return path14.resolve(cwdString);
189751
189100
  };
189752
189101
  var getDefaultCwd = () => {
189753
189102
  try {
189754
- return process16.cwd();
189103
+ return process9.cwd();
189755
189104
  } catch (error48) {
189756
189105
  error48.message = `The current directory does not exist.
189757
189106
  ${error48.message}`;
@@ -189794,7 +189143,7 @@ var normalizeOptions3 = (filePath, rawArguments, rawOptions) => {
189794
189143
  options.killSignal = normalizeKillSignal(options.killSignal);
189795
189144
  options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
189796
189145
  options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
189797
- if (process17.platform === "win32" && path16.basename(file2, ".exe") === "cmd") {
189146
+ if (process10.platform === "win32" && path15.basename(file2, ".exe") === "cmd") {
189798
189147
  commandArguments.unshift("/q");
189799
189148
  }
189800
189149
  return { file: file2, commandArguments, options };
@@ -189835,7 +189184,7 @@ var addDefaultOptions = ({
189835
189184
  serialization
189836
189185
  });
189837
189186
  var getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath: nodePath2 }) => {
189838
- const env2 = extendEnv ? { ...process17.env, ...envOption } : envOption;
189187
+ const env2 = extendEnv ? { ...process10.env, ...envOption } : envOption;
189839
189188
  if (preferLocal || node) {
189840
189189
  return npmRunPathEnv({
189841
189190
  env: env2,
@@ -191004,7 +190353,7 @@ var normalizeGenerator = ({ stdioItem, stdioItem: { value }, index, newTransform
191004
190353
  var sortTransforms = (newTransforms, direction) => direction === "input" ? newTransforms.reverse() : newTransforms;
191005
190354
 
191006
190355
  // node_modules/execa/lib/stdio/direction.js
191007
- import process18 from "node:process";
190356
+ import process11 from "node:process";
191008
190357
  var getStreamDirection = (stdioItems, fdNumber, optionName) => {
191009
190358
  const directions = stdioItems.map((stdioItem) => getStdioItemDirection(stdioItem, fdNumber));
191010
190359
  if (directions.includes("input") && directions.includes("output")) {
@@ -191046,10 +190395,10 @@ var guessStreamDirection = {
191046
190395
  }
191047
190396
  };
191048
190397
  var getStandardStreamDirection = (value) => {
191049
- if ([0, process18.stdin].includes(value)) {
190398
+ if ([0, process11.stdin].includes(value)) {
191050
190399
  return "input";
191051
190400
  }
191052
- if ([1, 2, process18.stdout, process18.stderr].includes(value)) {
190401
+ if ([1, 2, process11.stdout, process11.stderr].includes(value)) {
191053
190402
  return "output";
191054
190403
  }
191055
190404
  };
@@ -191569,10 +190918,10 @@ var linesUint8ArrayInfo = {
191569
190918
  };
191570
190919
 
191571
190920
  // node_modules/execa/lib/transform/validate.js
191572
- import { Buffer as Buffer4 } from "node:buffer";
190921
+ import { Buffer as Buffer3 } from "node:buffer";
191573
190922
  var getValidateTransformInput = (writableObjectMode, optionName) => writableObjectMode ? undefined : validateStringTransformInput.bind(undefined, optionName);
191574
190923
  var validateStringTransformInput = function* (optionName, chunk) {
191575
- if (typeof chunk !== "string" && !isUint8Array(chunk) && !Buffer4.isBuffer(chunk)) {
190924
+ if (typeof chunk !== "string" && !isUint8Array(chunk) && !Buffer3.isBuffer(chunk)) {
191576
190925
  throw new TypeError(`The \`${optionName}\` option's transform must use "objectMode: true" to receive as input: ${typeof chunk}.`);
191577
190926
  }
191578
190927
  yield chunk;
@@ -191598,7 +190947,7 @@ Instead, \`yield\` should either be called with a value, or not be called at all
191598
190947
  };
191599
190948
 
191600
190949
  // node_modules/execa/lib/transform/encoding-transform.js
191601
- import { Buffer as Buffer5 } from "node:buffer";
190950
+ import { Buffer as Buffer4 } from "node:buffer";
191602
190951
  import { StringDecoder as StringDecoder3 } from "node:string_decoder";
191603
190952
  var getEncodingTransformGenerator = (binary, encoding, skipped) => {
191604
190953
  if (skipped) {
@@ -191614,7 +190963,7 @@ var getEncodingTransformGenerator = (binary, encoding, skipped) => {
191614
190963
  };
191615
190964
  };
191616
190965
  var encodingUint8ArrayGenerator = function* (textEncoder3, chunk) {
191617
- if (Buffer5.isBuffer(chunk)) {
190966
+ if (Buffer4.isBuffer(chunk)) {
191618
190967
  yield bufferToUint8Array(chunk);
191619
190968
  } else if (typeof chunk === "string") {
191620
190969
  yield textEncoder3.encode(chunk);
@@ -191931,13 +191280,13 @@ var logOutputSync = ({ serializedResult, fdNumber, state, verboseInfo, encoding,
191931
191280
  }
191932
191281
  };
191933
191282
  var writeToFiles = (serializedResult, stdioItems, outputFiles) => {
191934
- for (const { path: path17, append } of stdioItems.filter(({ type }) => FILE_TYPES.has(type))) {
191935
- const pathString = typeof path17 === "string" ? path17 : path17.toString();
191283
+ for (const { path: path16, append } of stdioItems.filter(({ type }) => FILE_TYPES.has(type))) {
191284
+ const pathString = typeof path16 === "string" ? path16 : path16.toString();
191936
191285
  if (append || outputFiles.has(pathString)) {
191937
- appendFileSync(path17, serializedResult);
191286
+ appendFileSync(path16, serializedResult);
191938
191287
  } else {
191939
191288
  outputFiles.add(pathString);
191940
- writeFileSync(path17, serializedResult);
191289
+ writeFileSync(path16, serializedResult);
191941
191290
  }
191942
191291
  }
191943
191292
  };
@@ -192156,7 +191505,7 @@ import { setMaxListeners } from "node:events";
192156
191505
  import { spawn } from "node:child_process";
192157
191506
 
192158
191507
  // node_modules/execa/lib/ipc/methods.js
192159
- import process19 from "node:process";
191508
+ import process12 from "node:process";
192160
191509
 
192161
191510
  // node_modules/execa/lib/ipc/get-one.js
192162
191511
  import { once as once6, on as on3 } from "node:events";
@@ -192295,9 +191644,9 @@ var addIpcMethods = (subprocess, { ipc }) => {
192295
191644
  Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
192296
191645
  };
192297
191646
  var getIpcExport = () => {
192298
- const anyProcess = process19;
191647
+ const anyProcess = process12;
192299
191648
  const isSubprocess = true;
192300
- const ipc = process19.channel !== undefined;
191649
+ const ipc = process12.channel !== undefined;
192301
191650
  return {
192302
191651
  ...getIpcMethods(anyProcess, isSubprocess, ipc),
192303
191652
  getCancelSignal: getCancelSignal.bind(undefined, {
@@ -192381,7 +191730,7 @@ var handleDummyPromise = async (error48, verboseInfo, options) => handleResult(e
192381
191730
 
192382
191731
  // node_modules/execa/lib/stdio/handle-async.js
192383
191732
  import { createReadStream, createWriteStream } from "node:fs";
192384
- import { Buffer as Buffer6 } from "node:buffer";
191733
+ import { Buffer as Buffer5 } from "node:buffer";
192385
191734
  import { Readable as Readable4, Writable as Writable2, Duplex as Duplex2 } from "node:stream";
192386
191735
  var handleStdioAsync = (options, verboseInfo) => handleStdio(addPropertiesAsync, options, verboseInfo, false);
192387
191736
  var forbiddenIfAsync = ({ type, optionName }) => {
@@ -192409,7 +191758,7 @@ var addPropertiesAsync = {
192409
191758
  iterable: ({ value }) => ({ stream: Readable4.from(value) }),
192410
191759
  asyncIterable: ({ value }) => ({ stream: Readable4.from(value) }),
192411
191760
  string: ({ value }) => ({ stream: Readable4.from(value) }),
192412
- uint8Array: ({ value }) => ({ stream: Readable4.from(Buffer6.from(value)) })
191761
+ uint8Array: ({ value }) => ({ stream: Readable4.from(Buffer5.from(value)) })
192413
191762
  },
192414
191763
  output: {
192415
191764
  ...addProperties2,
@@ -192525,7 +191874,7 @@ if (process.platform === "linux") {
192525
191874
  }
192526
191875
 
192527
191876
  // node_modules/signal-exit/dist/mjs/index.js
192528
- var processOk = (process20) => !!process20 && typeof process20 === "object" && typeof process20.removeListener === "function" && typeof process20.emit === "function" && typeof process20.reallyExit === "function" && typeof process20.listeners === "function" && typeof process20.kill === "function" && typeof process20.pid === "number" && typeof process20.on === "function";
191877
+ var processOk = (process13) => !!process13 && typeof process13 === "object" && typeof process13.removeListener === "function" && typeof process13.emit === "function" && typeof process13.reallyExit === "function" && typeof process13.listeners === "function" && typeof process13.kill === "function" && typeof process13.pid === "number" && typeof process13.on === "function";
192529
191878
  var kExitEmitter = Symbol.for("signal-exit emitter");
192530
191879
  var global2 = globalThis;
192531
191880
  var ObjectDefineProperty = Object.defineProperty.bind(Object);
@@ -192608,22 +191957,22 @@ class SignalExitFallback extends SignalExitBase {
192608
191957
  }
192609
191958
 
192610
191959
  class SignalExit extends SignalExitBase {
192611
- #hupSig = process20.platform === "win32" ? "SIGINT" : "SIGHUP";
191960
+ #hupSig = process13.platform === "win32" ? "SIGINT" : "SIGHUP";
192612
191961
  #emitter = new Emitter;
192613
191962
  #process;
192614
191963
  #originalProcessEmit;
192615
191964
  #originalProcessReallyExit;
192616
191965
  #sigListeners = {};
192617
191966
  #loaded = false;
192618
- constructor(process20) {
191967
+ constructor(process13) {
192619
191968
  super();
192620
- this.#process = process20;
191969
+ this.#process = process13;
192621
191970
  this.#sigListeners = {};
192622
191971
  for (const sig of signals) {
192623
191972
  this.#sigListeners[sig] = () => {
192624
191973
  const listeners = this.#process.listeners(sig);
192625
191974
  let { count: count2 } = this.#emitter;
192626
- const p2 = process20;
191975
+ const p2 = process13;
192627
191976
  if (typeof p2.__signal_exit_emitter__ === "object" && typeof p2.__signal_exit_emitter__.count === "number") {
192628
191977
  count2 += p2.__signal_exit_emitter__.count;
192629
191978
  }
@@ -192632,12 +191981,12 @@ class SignalExit extends SignalExitBase {
192632
191981
  const ret = this.#emitter.emit("exit", null, sig);
192633
191982
  const s = sig === "SIGHUP" ? this.#hupSig : sig;
192634
191983
  if (!ret)
192635
- process20.kill(process20.pid, s);
191984
+ process13.kill(process13.pid, s);
192636
191985
  }
192637
191986
  };
192638
191987
  }
192639
- this.#originalProcessReallyExit = process20.reallyExit;
192640
- this.#originalProcessEmit = process20.emit;
191988
+ this.#originalProcessReallyExit = process13.reallyExit;
191989
+ this.#originalProcessEmit = process13.emit;
192641
191990
  }
192642
191991
  onExit(cb, opts) {
192643
191992
  if (!processOk(this.#process)) {
@@ -192715,12 +192064,12 @@ class SignalExit extends SignalExitBase {
192715
192064
  }
192716
192065
  }
192717
192066
  }
192718
- var process20 = globalThis.process;
192067
+ var process13 = globalThis.process;
192719
192068
  var {
192720
192069
  onExit,
192721
192070
  load,
192722
192071
  unload
192723
- } = signalExitWrap(processOk(process20) ? new SignalExit(process20) : new SignalExitFallback);
192072
+ } = signalExitWrap(processOk(process13) ? new SignalExit(process13) : new SignalExitFallback);
192724
192073
 
192725
192074
  // node_modules/execa/lib/terminate/cleanup.js
192726
192075
  var cleanupOnExit = (subprocess, { cleanup, detached }, { signal }) => {
@@ -194340,7 +193689,659 @@ function getWhoamiCommand(context) {
194340
193689
  });
194341
193690
  }
194342
193691
 
193692
+ // node_modules/open/index.js
193693
+ import process20 from "node:process";
193694
+ import path16 from "node:path";
193695
+ import { fileURLToPath as fileURLToPath5 } from "node:url";
193696
+ import childProcess3 from "node:child_process";
193697
+ import fs19, { constants as fsConstants2 } from "node:fs/promises";
193698
+
193699
+ // node_modules/wsl-utils/index.js
193700
+ import { promisify as promisify6 } from "node:util";
193701
+ import childProcess2 from "node:child_process";
193702
+ import fs18, { constants as fsConstants } from "node:fs/promises";
193703
+
193704
+ // node_modules/is-wsl/index.js
193705
+ import process14 from "node:process";
193706
+ import os2 from "node:os";
193707
+ import fs17 from "node:fs";
193708
+
193709
+ // node_modules/is-inside-container/index.js
193710
+ import fs16 from "node:fs";
193711
+
193712
+ // node_modules/is-docker/index.js
193713
+ import fs15 from "node:fs";
193714
+ var isDockerCached;
193715
+ function hasDockerEnv() {
193716
+ try {
193717
+ fs15.statSync("/.dockerenv");
193718
+ return true;
193719
+ } catch {
193720
+ return false;
193721
+ }
193722
+ }
193723
+ function hasDockerCGroup() {
193724
+ try {
193725
+ return fs15.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
193726
+ } catch {
193727
+ return false;
193728
+ }
193729
+ }
193730
+ function isDocker() {
193731
+ if (isDockerCached === undefined) {
193732
+ isDockerCached = hasDockerEnv() || hasDockerCGroup();
193733
+ }
193734
+ return isDockerCached;
193735
+ }
193736
+
193737
+ // node_modules/is-inside-container/index.js
193738
+ var cachedResult;
193739
+ var hasContainerEnv = () => {
193740
+ try {
193741
+ fs16.statSync("/run/.containerenv");
193742
+ return true;
193743
+ } catch {
193744
+ return false;
193745
+ }
193746
+ };
193747
+ function isInsideContainer() {
193748
+ if (cachedResult === undefined) {
193749
+ cachedResult = hasContainerEnv() || isDocker();
193750
+ }
193751
+ return cachedResult;
193752
+ }
193753
+
193754
+ // node_modules/is-wsl/index.js
193755
+ var isWsl = () => {
193756
+ if (process14.platform !== "linux") {
193757
+ return false;
193758
+ }
193759
+ if (os2.release().toLowerCase().includes("microsoft")) {
193760
+ if (isInsideContainer()) {
193761
+ return false;
193762
+ }
193763
+ return true;
193764
+ }
193765
+ try {
193766
+ return fs17.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isInsideContainer() : false;
193767
+ } catch {
193768
+ return false;
193769
+ }
193770
+ };
193771
+ var is_wsl_default = process14.env.__IS_WSL_TEST__ ? isWsl : isWsl();
193772
+
193773
+ // node_modules/powershell-utils/index.js
193774
+ import process15 from "node:process";
193775
+ import { Buffer as Buffer6 } from "node:buffer";
193776
+ import { promisify as promisify5 } from "node:util";
193777
+ import childProcess from "node:child_process";
193778
+ var execFile = promisify5(childProcess.execFile);
193779
+ var powerShellPath = () => `${process15.env.SYSTEMROOT || process15.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
193780
+ var executePowerShell = async (command, options = {}) => {
193781
+ const {
193782
+ powerShellPath: psPath,
193783
+ ...execFileOptions
193784
+ } = options;
193785
+ const encodedCommand = executePowerShell.encodeCommand(command);
193786
+ return execFile(psPath ?? powerShellPath(), [
193787
+ ...executePowerShell.argumentsPrefix,
193788
+ encodedCommand
193789
+ ], {
193790
+ encoding: "utf8",
193791
+ ...execFileOptions
193792
+ });
193793
+ };
193794
+ executePowerShell.argumentsPrefix = [
193795
+ "-NoProfile",
193796
+ "-NonInteractive",
193797
+ "-ExecutionPolicy",
193798
+ "Bypass",
193799
+ "-EncodedCommand"
193800
+ ];
193801
+ executePowerShell.encodeCommand = (command) => Buffer6.from(command, "utf16le").toString("base64");
193802
+ executePowerShell.escapeArgument = (value) => `'${String(value).replaceAll("'", "''")}'`;
193803
+
193804
+ // node_modules/wsl-utils/utilities.js
193805
+ function parseMountPointFromConfig(content) {
193806
+ for (const line of content.split(`
193807
+ `)) {
193808
+ if (/^\s*#/.test(line)) {
193809
+ continue;
193810
+ }
193811
+ const match = /^\s*root\s*=\s*(?<mountPoint>"[^"]*"|'[^']*'|[^#]*)/.exec(line);
193812
+ if (!match) {
193813
+ continue;
193814
+ }
193815
+ return match.groups.mountPoint.trim().replaceAll(/^["']|["']$/g, "");
193816
+ }
193817
+ }
193818
+
193819
+ // node_modules/wsl-utils/index.js
193820
+ var execFile2 = promisify6(childProcess2.execFile);
193821
+ var wslDrivesMountPoint = (() => {
193822
+ const defaultMountPoint = "/mnt/";
193823
+ let mountPoint;
193824
+ return async function() {
193825
+ if (mountPoint) {
193826
+ return mountPoint;
193827
+ }
193828
+ const configFilePath = "/etc/wsl.conf";
193829
+ let isConfigFileExists = false;
193830
+ try {
193831
+ await fs18.access(configFilePath, fsConstants.F_OK);
193832
+ isConfigFileExists = true;
193833
+ } catch {}
193834
+ if (!isConfigFileExists) {
193835
+ return defaultMountPoint;
193836
+ }
193837
+ const configContent = await fs18.readFile(configFilePath, { encoding: "utf8" });
193838
+ const parsedMountPoint = parseMountPointFromConfig(configContent);
193839
+ if (parsedMountPoint === undefined) {
193840
+ return defaultMountPoint;
193841
+ }
193842
+ mountPoint = parsedMountPoint;
193843
+ mountPoint = mountPoint.endsWith("/") ? mountPoint : `${mountPoint}/`;
193844
+ return mountPoint;
193845
+ };
193846
+ })();
193847
+ var powerShellPathFromWsl = async () => {
193848
+ const mountPoint = await wslDrivesMountPoint();
193849
+ return `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`;
193850
+ };
193851
+ var powerShellPath2 = is_wsl_default ? powerShellPathFromWsl : powerShellPath;
193852
+ var canAccessPowerShellPromise;
193853
+ var canAccessPowerShell = async () => {
193854
+ canAccessPowerShellPromise ??= (async () => {
193855
+ try {
193856
+ const psPath = await powerShellPath2();
193857
+ await fs18.access(psPath, fsConstants.X_OK);
193858
+ return true;
193859
+ } catch {
193860
+ return false;
193861
+ }
193862
+ })();
193863
+ return canAccessPowerShellPromise;
193864
+ };
193865
+ var wslDefaultBrowser = async () => {
193866
+ const psPath = await powerShellPath2();
193867
+ const command = String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`;
193868
+ const { stdout } = await executePowerShell(command, { powerShellPath: psPath });
193869
+ return stdout.trim();
193870
+ };
193871
+ var convertWslPathToWindows = async (path16) => {
193872
+ if (/^[a-z]+:\/\//i.test(path16)) {
193873
+ return path16;
193874
+ }
193875
+ try {
193876
+ const { stdout } = await execFile2("wslpath", ["-aw", path16], { encoding: "utf8" });
193877
+ return stdout.trim();
193878
+ } catch {
193879
+ return path16;
193880
+ }
193881
+ };
193882
+
193883
+ // node_modules/define-lazy-prop/index.js
193884
+ function defineLazyProperty(object2, propertyName, valueGetter) {
193885
+ const define2 = (value) => Object.defineProperty(object2, propertyName, { value, enumerable: true, writable: true });
193886
+ Object.defineProperty(object2, propertyName, {
193887
+ configurable: true,
193888
+ enumerable: true,
193889
+ get() {
193890
+ const result = valueGetter();
193891
+ define2(result);
193892
+ return result;
193893
+ },
193894
+ set(value) {
193895
+ define2(value);
193896
+ }
193897
+ });
193898
+ return object2;
193899
+ }
193900
+
193901
+ // node_modules/default-browser/index.js
193902
+ import { promisify as promisify10 } from "node:util";
193903
+ import process18 from "node:process";
193904
+ import { execFile as execFile6 } from "node:child_process";
193905
+
193906
+ // node_modules/default-browser-id/index.js
193907
+ import { promisify as promisify7 } from "node:util";
193908
+ import process16 from "node:process";
193909
+ import { execFile as execFile3 } from "node:child_process";
193910
+ var execFileAsync = promisify7(execFile3);
193911
+ async function defaultBrowserId() {
193912
+ if (process16.platform !== "darwin") {
193913
+ throw new Error("macOS only");
193914
+ }
193915
+ const { stdout } = await execFileAsync("defaults", ["read", "com.apple.LaunchServices/com.apple.launchservices.secure", "LSHandlers"]);
193916
+ const match = /LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout);
193917
+ const browserId = match?.groups.id ?? "com.apple.Safari";
193918
+ if (browserId === "com.apple.safari") {
193919
+ return "com.apple.Safari";
193920
+ }
193921
+ return browserId;
193922
+ }
193923
+
193924
+ // node_modules/run-applescript/index.js
193925
+ import process17 from "node:process";
193926
+ import { promisify as promisify8 } from "node:util";
193927
+ import { execFile as execFile4, execFileSync } from "node:child_process";
193928
+ var execFileAsync2 = promisify8(execFile4);
193929
+ async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {
193930
+ if (process17.platform !== "darwin") {
193931
+ throw new Error("macOS only");
193932
+ }
193933
+ const outputArguments = humanReadableOutput ? [] : ["-ss"];
193934
+ const execOptions = {};
193935
+ if (signal) {
193936
+ execOptions.signal = signal;
193937
+ }
193938
+ const { stdout } = await execFileAsync2("osascript", ["-e", script, outputArguments], execOptions);
193939
+ return stdout.trim();
193940
+ }
193941
+
193942
+ // node_modules/bundle-name/index.js
193943
+ async function bundleName(bundleId) {
193944
+ return runAppleScript(`tell application "Finder" to set app_path to application file id "${bundleId}" as string
193945
+ tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`);
193946
+ }
193947
+
193948
+ // node_modules/default-browser/windows.js
193949
+ import { promisify as promisify9 } from "node:util";
193950
+ import { execFile as execFile5 } from "node:child_process";
193951
+ var execFileAsync3 = promisify9(execFile5);
193952
+ var windowsBrowserProgIds = {
193953
+ MSEdgeHTM: { name: "Edge", id: "com.microsoft.edge" },
193954
+ MSEdgeBHTML: { name: "Edge Beta", id: "com.microsoft.edge.beta" },
193955
+ MSEdgeDHTML: { name: "Edge Dev", id: "com.microsoft.edge.dev" },
193956
+ AppXq0fevzme2pys62n3e0fbqa7peapykr8v: { name: "Edge", id: "com.microsoft.edge.old" },
193957
+ ChromeHTML: { name: "Chrome", id: "com.google.chrome" },
193958
+ ChromeBHTML: { name: "Chrome Beta", id: "com.google.chrome.beta" },
193959
+ ChromeDHTML: { name: "Chrome Dev", id: "com.google.chrome.dev" },
193960
+ ChromiumHTM: { name: "Chromium", id: "org.chromium.Chromium" },
193961
+ BraveHTML: { name: "Brave", id: "com.brave.Browser" },
193962
+ BraveBHTML: { name: "Brave Beta", id: "com.brave.Browser.beta" },
193963
+ BraveDHTML: { name: "Brave Dev", id: "com.brave.Browser.dev" },
193964
+ BraveSSHTM: { name: "Brave Nightly", id: "com.brave.Browser.nightly" },
193965
+ FirefoxURL: { name: "Firefox", id: "org.mozilla.firefox" },
193966
+ OperaStable: { name: "Opera", id: "com.operasoftware.Opera" },
193967
+ VivaldiHTM: { name: "Vivaldi", id: "com.vivaldi.Vivaldi" },
193968
+ "IE.HTTP": { name: "Internet Explorer", id: "com.microsoft.ie" }
193969
+ };
193970
+ var _windowsBrowserProgIdMap = new Map(Object.entries(windowsBrowserProgIds));
193971
+
193972
+ class UnknownBrowserError extends Error {
193973
+ }
193974
+ async function defaultBrowser(_execFileAsync = execFileAsync3) {
193975
+ const { stdout } = await _execFileAsync("reg", [
193976
+ "QUERY",
193977
+ " HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice",
193978
+ "/v",
193979
+ "ProgId"
193980
+ ]);
193981
+ const match = /ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(stdout);
193982
+ if (!match) {
193983
+ throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);
193984
+ }
193985
+ const { id } = match.groups;
193986
+ const dotIndex = id.lastIndexOf(".");
193987
+ const hyphenIndex = id.lastIndexOf("-");
193988
+ const baseIdByDot = dotIndex === -1 ? undefined : id.slice(0, dotIndex);
193989
+ const baseIdByHyphen = hyphenIndex === -1 ? undefined : id.slice(0, hyphenIndex);
193990
+ return windowsBrowserProgIds[id] ?? windowsBrowserProgIds[baseIdByDot] ?? windowsBrowserProgIds[baseIdByHyphen] ?? { name: id, id };
193991
+ }
193992
+
193993
+ // node_modules/default-browser/index.js
193994
+ var execFileAsync4 = promisify10(execFile6);
193995
+ var titleize = (string4) => string4.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x2) => x2.toUpperCase());
193996
+ async function defaultBrowser2() {
193997
+ if (process18.platform === "darwin") {
193998
+ const id = await defaultBrowserId();
193999
+ const name2 = await bundleName(id);
194000
+ return { name: name2, id };
194001
+ }
194002
+ if (process18.platform === "linux") {
194003
+ const { stdout } = await execFileAsync4("xdg-mime", ["query", "default", "x-scheme-handler/http"]);
194004
+ const id = stdout.trim();
194005
+ const name2 = titleize(id.replace(/.desktop$/, "").replace("-", " "));
194006
+ return { name: name2, id };
194007
+ }
194008
+ if (process18.platform === "win32") {
194009
+ return defaultBrowser();
194010
+ }
194011
+ throw new Error("Only macOS, Linux, and Windows are supported");
194012
+ }
194013
+
194014
+ // node_modules/is-in-ssh/index.js
194015
+ import process19 from "node:process";
194016
+ var isInSsh = Boolean(process19.env.SSH_CONNECTION || process19.env.SSH_CLIENT || process19.env.SSH_TTY);
194017
+ var is_in_ssh_default = isInSsh;
194018
+
194019
+ // node_modules/open/index.js
194020
+ var fallbackAttemptSymbol = Symbol("fallbackAttempt");
194021
+ var __dirname3 = import.meta.url ? path16.dirname(fileURLToPath5(import.meta.url)) : "";
194022
+ var localXdgOpenPath = path16.join(__dirname3, "xdg-open");
194023
+ var { platform: platform6, arch } = process20;
194024
+ var tryEachApp = async (apps, opener) => {
194025
+ if (apps.length === 0) {
194026
+ return;
194027
+ }
194028
+ const errors4 = [];
194029
+ for (const app of apps) {
194030
+ try {
194031
+ return await opener(app);
194032
+ } catch (error48) {
194033
+ errors4.push(error48);
194034
+ }
194035
+ }
194036
+ throw new AggregateError(errors4, "Failed to open in all supported apps");
194037
+ };
194038
+ var baseOpen = async (options) => {
194039
+ options = {
194040
+ wait: false,
194041
+ background: false,
194042
+ newInstance: false,
194043
+ allowNonzeroExitCode: false,
194044
+ ...options
194045
+ };
194046
+ const isFallbackAttempt = options[fallbackAttemptSymbol] === true;
194047
+ delete options[fallbackAttemptSymbol];
194048
+ if (Array.isArray(options.app)) {
194049
+ return tryEachApp(options.app, (singleApp) => baseOpen({
194050
+ ...options,
194051
+ app: singleApp,
194052
+ [fallbackAttemptSymbol]: true
194053
+ }));
194054
+ }
194055
+ let { name: app, arguments: appArguments = [] } = options.app ?? {};
194056
+ appArguments = [...appArguments];
194057
+ if (Array.isArray(app)) {
194058
+ return tryEachApp(app, (appName) => baseOpen({
194059
+ ...options,
194060
+ app: {
194061
+ name: appName,
194062
+ arguments: appArguments
194063
+ },
194064
+ [fallbackAttemptSymbol]: true
194065
+ }));
194066
+ }
194067
+ if (app === "browser" || app === "browserPrivate") {
194068
+ const ids = {
194069
+ "com.google.chrome": "chrome",
194070
+ "google-chrome.desktop": "chrome",
194071
+ "com.brave.browser": "brave",
194072
+ "org.mozilla.firefox": "firefox",
194073
+ "firefox.desktop": "firefox",
194074
+ "com.microsoft.msedge": "edge",
194075
+ "com.microsoft.edge": "edge",
194076
+ "com.microsoft.edgemac": "edge",
194077
+ "microsoft-edge.desktop": "edge",
194078
+ "com.apple.safari": "safari"
194079
+ };
194080
+ const flags = {
194081
+ chrome: "--incognito",
194082
+ brave: "--incognito",
194083
+ firefox: "--private-window",
194084
+ edge: "--inPrivate"
194085
+ };
194086
+ let browser;
194087
+ if (is_wsl_default) {
194088
+ const progId = await wslDefaultBrowser();
194089
+ const browserInfo = _windowsBrowserProgIdMap.get(progId);
194090
+ browser = browserInfo ?? {};
194091
+ } else {
194092
+ browser = await defaultBrowser2();
194093
+ }
194094
+ if (browser.id in ids) {
194095
+ const browserName = ids[browser.id.toLowerCase()];
194096
+ if (app === "browserPrivate") {
194097
+ if (browserName === "safari") {
194098
+ throw new Error("Safari doesn't support opening in private mode via command line");
194099
+ }
194100
+ appArguments.push(flags[browserName]);
194101
+ }
194102
+ return baseOpen({
194103
+ ...options,
194104
+ app: {
194105
+ name: apps[browserName],
194106
+ arguments: appArguments
194107
+ }
194108
+ });
194109
+ }
194110
+ throw new Error(`${browser.name} is not supported as a default browser`);
194111
+ }
194112
+ let command;
194113
+ const cliArguments = [];
194114
+ const childProcessOptions = {};
194115
+ let shouldUseWindowsInWsl = false;
194116
+ if (is_wsl_default && !isInsideContainer() && !is_in_ssh_default && !app) {
194117
+ shouldUseWindowsInWsl = await canAccessPowerShell();
194118
+ }
194119
+ if (platform6 === "darwin") {
194120
+ command = "open";
194121
+ if (options.wait) {
194122
+ cliArguments.push("--wait-apps");
194123
+ }
194124
+ if (options.background) {
194125
+ cliArguments.push("--background");
194126
+ }
194127
+ if (options.newInstance) {
194128
+ cliArguments.push("--new");
194129
+ }
194130
+ if (app) {
194131
+ cliArguments.push("-a", app);
194132
+ }
194133
+ } else if (platform6 === "win32" || shouldUseWindowsInWsl) {
194134
+ command = await powerShellPath2();
194135
+ cliArguments.push(...executePowerShell.argumentsPrefix);
194136
+ if (!is_wsl_default) {
194137
+ childProcessOptions.windowsVerbatimArguments = true;
194138
+ }
194139
+ if (is_wsl_default && options.target) {
194140
+ options.target = await convertWslPathToWindows(options.target);
194141
+ }
194142
+ const encodedArguments = ["$ProgressPreference = 'SilentlyContinue';", "Start"];
194143
+ if (options.wait) {
194144
+ encodedArguments.push("-Wait");
194145
+ }
194146
+ if (app) {
194147
+ encodedArguments.push(executePowerShell.escapeArgument(app));
194148
+ if (options.target) {
194149
+ appArguments.push(options.target);
194150
+ }
194151
+ } else if (options.target) {
194152
+ encodedArguments.push(executePowerShell.escapeArgument(options.target));
194153
+ }
194154
+ if (appArguments.length > 0) {
194155
+ appArguments = appArguments.map((argument) => executePowerShell.escapeArgument(argument));
194156
+ encodedArguments.push("-ArgumentList", appArguments.join(","));
194157
+ }
194158
+ options.target = executePowerShell.encodeCommand(encodedArguments.join(" "));
194159
+ if (!options.wait) {
194160
+ childProcessOptions.stdio = "ignore";
194161
+ }
194162
+ } else {
194163
+ if (app) {
194164
+ command = app;
194165
+ } else {
194166
+ const isBundled = !__dirname3 || __dirname3 === "/";
194167
+ let exeLocalXdgOpen = false;
194168
+ try {
194169
+ await fs19.access(localXdgOpenPath, fsConstants2.X_OK);
194170
+ exeLocalXdgOpen = true;
194171
+ } catch {}
194172
+ const useSystemXdgOpen = process20.versions.electron ?? (platform6 === "android" || isBundled || !exeLocalXdgOpen);
194173
+ command = useSystemXdgOpen ? "xdg-open" : localXdgOpenPath;
194174
+ }
194175
+ if (appArguments.length > 0) {
194176
+ cliArguments.push(...appArguments);
194177
+ }
194178
+ if (!options.wait) {
194179
+ childProcessOptions.stdio = "ignore";
194180
+ childProcessOptions.detached = true;
194181
+ }
194182
+ }
194183
+ if (platform6 === "darwin" && appArguments.length > 0) {
194184
+ cliArguments.push("--args", ...appArguments);
194185
+ }
194186
+ if (options.target) {
194187
+ cliArguments.push(options.target);
194188
+ }
194189
+ const subprocess = childProcess3.spawn(command, cliArguments, childProcessOptions);
194190
+ if (options.wait) {
194191
+ return new Promise((resolve2, reject) => {
194192
+ subprocess.once("error", reject);
194193
+ subprocess.once("close", (exitCode) => {
194194
+ if (!options.allowNonzeroExitCode && exitCode !== 0) {
194195
+ reject(new Error(`Exited with code ${exitCode}`));
194196
+ return;
194197
+ }
194198
+ resolve2(subprocess);
194199
+ });
194200
+ });
194201
+ }
194202
+ if (isFallbackAttempt) {
194203
+ return new Promise((resolve2, reject) => {
194204
+ subprocess.once("error", reject);
194205
+ subprocess.once("spawn", () => {
194206
+ subprocess.once("close", (exitCode) => {
194207
+ subprocess.off("error", reject);
194208
+ if (exitCode !== 0) {
194209
+ reject(new Error(`Exited with code ${exitCode}`));
194210
+ return;
194211
+ }
194212
+ subprocess.unref();
194213
+ resolve2(subprocess);
194214
+ });
194215
+ });
194216
+ });
194217
+ }
194218
+ subprocess.unref();
194219
+ return new Promise((resolve2, reject) => {
194220
+ subprocess.once("error", reject);
194221
+ subprocess.once("spawn", () => {
194222
+ subprocess.off("error", reject);
194223
+ resolve2(subprocess);
194224
+ });
194225
+ });
194226
+ };
194227
+ var open = (target, options) => {
194228
+ if (typeof target !== "string") {
194229
+ throw new TypeError("Expected a `target`");
194230
+ }
194231
+ return baseOpen({
194232
+ ...options,
194233
+ target
194234
+ });
194235
+ };
194236
+ function detectArchBinary(binary) {
194237
+ if (typeof binary === "string" || Array.isArray(binary)) {
194238
+ return binary;
194239
+ }
194240
+ const { [arch]: archBinary } = binary;
194241
+ if (!archBinary) {
194242
+ throw new Error(`${arch} is not supported`);
194243
+ }
194244
+ return archBinary;
194245
+ }
194246
+ function detectPlatformBinary({ [platform6]: platformBinary }, { wsl } = {}) {
194247
+ if (wsl && is_wsl_default) {
194248
+ return detectArchBinary(wsl);
194249
+ }
194250
+ if (!platformBinary) {
194251
+ throw new Error(`${platform6} is not supported`);
194252
+ }
194253
+ return detectArchBinary(platformBinary);
194254
+ }
194255
+ var apps = {
194256
+ browser: "browser",
194257
+ browserPrivate: "browserPrivate"
194258
+ };
194259
+ defineLazyProperty(apps, "chrome", () => detectPlatformBinary({
194260
+ darwin: "google chrome",
194261
+ win32: "chrome",
194262
+ linux: ["google-chrome", "google-chrome-stable", "chromium", "chromium-browser"]
194263
+ }, {
194264
+ wsl: {
194265
+ ia32: "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",
194266
+ x64: ["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe", "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]
194267
+ }
194268
+ }));
194269
+ defineLazyProperty(apps, "brave", () => detectPlatformBinary({
194270
+ darwin: "brave browser",
194271
+ win32: "brave",
194272
+ linux: ["brave-browser", "brave"]
194273
+ }, {
194274
+ wsl: {
194275
+ ia32: "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe",
194276
+ x64: ["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe", "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"]
194277
+ }
194278
+ }));
194279
+ defineLazyProperty(apps, "firefox", () => detectPlatformBinary({
194280
+ darwin: "firefox",
194281
+ win32: String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,
194282
+ linux: "firefox"
194283
+ }, {
194284
+ wsl: "/mnt/c/Program Files/Mozilla Firefox/firefox.exe"
194285
+ }));
194286
+ defineLazyProperty(apps, "edge", () => detectPlatformBinary({
194287
+ darwin: "microsoft edge",
194288
+ win32: "msedge",
194289
+ linux: ["microsoft-edge", "microsoft-edge-dev"]
194290
+ }, {
194291
+ wsl: "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
194292
+ }));
194293
+ defineLazyProperty(apps, "safari", () => detectPlatformBinary({
194294
+ darwin: "Safari"
194295
+ }));
194296
+ var open_default = open;
194297
+
194343
194298
  // src/cli/commands/connectors/push.ts
194299
+ var POLL_INTERVAL_MS = 2000;
194300
+ var POLL_TIMEOUT_MS = 2 * 60 * 1000;
194301
+ async function runOAuthFlowWithSkip(params) {
194302
+ await open_default(params.redirectUrl);
194303
+ let finalStatus = "PENDING";
194304
+ let skipped = false;
194305
+ const s = Y2();
194306
+ const originalExit = process.exit;
194307
+ process.exit = () => {
194308
+ skipped = true;
194309
+ s.stop(`${params.type} skipped`);
194310
+ };
194311
+ s.start(`Waiting for ${params.type} authorization... (Esc to skip)`);
194312
+ try {
194313
+ await pWaitFor(async () => {
194314
+ if (skipped) {
194315
+ finalStatus = "SKIPPED";
194316
+ return true;
194317
+ }
194318
+ const response = await getOAuthStatus(params.type, params.connectionId);
194319
+ finalStatus = response.status;
194320
+ return response.status !== "PENDING";
194321
+ }, {
194322
+ interval: POLL_INTERVAL_MS,
194323
+ timeout: POLL_TIMEOUT_MS
194324
+ });
194325
+ } catch (err) {
194326
+ if (err instanceof TimeoutError2) {
194327
+ finalStatus = "PENDING";
194328
+ } else {
194329
+ throw err;
194330
+ }
194331
+ } finally {
194332
+ process.exit = originalExit;
194333
+ if (!skipped) {
194334
+ if (finalStatus === "ACTIVE") {
194335
+ s.stop(`${params.type} authorization complete`);
194336
+ } else if (finalStatus === "FAILED") {
194337
+ s.stop(`${params.type} authorization failed`);
194338
+ } else {
194339
+ s.stop(`${params.type} authorization timed out`);
194340
+ }
194341
+ }
194342
+ }
194343
+ return { type: params.type, status: finalStatus };
194344
+ }
194344
194345
  function isPendingOAuth(r2) {
194345
194346
  return r2.action === "needs_oauth" && !!r2.redirectUrl && !!r2.connectionId;
194346
194347
  }
@@ -194426,7 +194427,6 @@ async function pushConnectorsAction() {
194426
194427
  try {
194427
194428
  M2.info(`
194428
194429
  Opening browser for '${connector2.type}'...`);
194429
- await open_default(connector2.redirectUrl);
194430
194430
  const oauthResult = await runOAuthFlowWithSkip({
194431
194431
  type: connector2.type,
194432
194432
  redirectUrl: connector2.redirectUrl,
@@ -199662,4 +199662,4 @@ export {
199662
199662
  CLIExitError
199663
199663
  };
199664
199664
 
199665
- //# debugId=669FBEF1271090F964756E2164756E21
199665
+ //# debugId=997573C26E305DA564756E2164756E21