@base44-preview/cli 0.0.31-pr.189.23e1141 → 0.0.31-pr.189.61c2518

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(" ");
@@ -185216,731 +185216,6 @@ async function readAllConnectors(connectorsDir) {
185216
185216
  }
185217
185217
  return connectors;
185218
185218
  }
185219
- // node_modules/open/index.js
185220
- import process11 from "node:process";
185221
- import path11 from "node:path";
185222
- import { fileURLToPath as fileURLToPath3 } from "node:url";
185223
- import childProcess3 from "node:child_process";
185224
- import fs18, { constants as fsConstants2 } from "node:fs/promises";
185225
-
185226
- // node_modules/wsl-utils/index.js
185227
- import { promisify as promisify4 } from "node:util";
185228
- import childProcess2 from "node:child_process";
185229
- import fs17, { constants as fsConstants } from "node:fs/promises";
185230
-
185231
- // node_modules/is-wsl/index.js
185232
- import process5 from "node:process";
185233
- import os from "node:os";
185234
- import fs16 from "node:fs";
185235
-
185236
- // node_modules/is-inside-container/index.js
185237
- import fs15 from "node:fs";
185238
-
185239
- // node_modules/is-docker/index.js
185240
- import fs14 from "node:fs";
185241
- var isDockerCached;
185242
- function hasDockerEnv() {
185243
- try {
185244
- fs14.statSync("/.dockerenv");
185245
- return true;
185246
- } catch {
185247
- return false;
185248
- }
185249
- }
185250
- function hasDockerCGroup() {
185251
- try {
185252
- return fs14.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
185253
- } catch {
185254
- return false;
185255
- }
185256
- }
185257
- function isDocker() {
185258
- if (isDockerCached === undefined) {
185259
- isDockerCached = hasDockerEnv() || hasDockerCGroup();
185260
- }
185261
- return isDockerCached;
185262
- }
185263
-
185264
- // node_modules/is-inside-container/index.js
185265
- var cachedResult;
185266
- var hasContainerEnv = () => {
185267
- try {
185268
- fs15.statSync("/run/.containerenv");
185269
- return true;
185270
- } catch {
185271
- return false;
185272
- }
185273
- };
185274
- function isInsideContainer() {
185275
- if (cachedResult === undefined) {
185276
- cachedResult = hasContainerEnv() || isDocker();
185277
- }
185278
- return cachedResult;
185279
- }
185280
-
185281
- // node_modules/is-wsl/index.js
185282
- var isWsl = () => {
185283
- if (process5.platform !== "linux") {
185284
- return false;
185285
- }
185286
- if (os.release().toLowerCase().includes("microsoft")) {
185287
- if (isInsideContainer()) {
185288
- return false;
185289
- }
185290
- return true;
185291
- }
185292
- try {
185293
- return fs16.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isInsideContainer() : false;
185294
- } catch {
185295
- return false;
185296
- }
185297
- };
185298
- var is_wsl_default = process5.env.__IS_WSL_TEST__ ? isWsl : isWsl();
185299
-
185300
- // node_modules/powershell-utils/index.js
185301
- import process6 from "node:process";
185302
- import { Buffer as Buffer3 } from "node:buffer";
185303
- import { promisify as promisify3 } from "node:util";
185304
- import childProcess from "node:child_process";
185305
- var execFile = promisify3(childProcess.execFile);
185306
- var powerShellPath = () => `${process6.env.SYSTEMROOT || process6.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
185307
- var executePowerShell = async (command, options = {}) => {
185308
- const {
185309
- powerShellPath: psPath,
185310
- ...execFileOptions
185311
- } = options;
185312
- const encodedCommand = executePowerShell.encodeCommand(command);
185313
- return execFile(psPath ?? powerShellPath(), [
185314
- ...executePowerShell.argumentsPrefix,
185315
- encodedCommand
185316
- ], {
185317
- encoding: "utf8",
185318
- ...execFileOptions
185319
- });
185320
- };
185321
- executePowerShell.argumentsPrefix = [
185322
- "-NoProfile",
185323
- "-NonInteractive",
185324
- "-ExecutionPolicy",
185325
- "Bypass",
185326
- "-EncodedCommand"
185327
- ];
185328
- executePowerShell.encodeCommand = (command) => Buffer3.from(command, "utf16le").toString("base64");
185329
- executePowerShell.escapeArgument = (value) => `'${String(value).replaceAll("'", "''")}'`;
185330
-
185331
- // node_modules/wsl-utils/utilities.js
185332
- function parseMountPointFromConfig(content) {
185333
- for (const line of content.split(`
185334
- `)) {
185335
- if (/^\s*#/.test(line)) {
185336
- continue;
185337
- }
185338
- const match = /^\s*root\s*=\s*(?<mountPoint>"[^"]*"|'[^']*'|[^#]*)/.exec(line);
185339
- if (!match) {
185340
- continue;
185341
- }
185342
- return match.groups.mountPoint.trim().replaceAll(/^["']|["']$/g, "");
185343
- }
185344
- }
185345
-
185346
- // node_modules/wsl-utils/index.js
185347
- var execFile2 = promisify4(childProcess2.execFile);
185348
- var wslDrivesMountPoint = (() => {
185349
- const defaultMountPoint = "/mnt/";
185350
- let mountPoint;
185351
- return async function() {
185352
- if (mountPoint) {
185353
- return mountPoint;
185354
- }
185355
- const configFilePath = "/etc/wsl.conf";
185356
- let isConfigFileExists = false;
185357
- try {
185358
- await fs17.access(configFilePath, fsConstants.F_OK);
185359
- isConfigFileExists = true;
185360
- } catch {}
185361
- if (!isConfigFileExists) {
185362
- return defaultMountPoint;
185363
- }
185364
- const configContent = await fs17.readFile(configFilePath, { encoding: "utf8" });
185365
- const parsedMountPoint = parseMountPointFromConfig(configContent);
185366
- if (parsedMountPoint === undefined) {
185367
- return defaultMountPoint;
185368
- }
185369
- mountPoint = parsedMountPoint;
185370
- mountPoint = mountPoint.endsWith("/") ? mountPoint : `${mountPoint}/`;
185371
- return mountPoint;
185372
- };
185373
- })();
185374
- var powerShellPathFromWsl = async () => {
185375
- const mountPoint = await wslDrivesMountPoint();
185376
- return `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`;
185377
- };
185378
- var powerShellPath2 = is_wsl_default ? powerShellPathFromWsl : powerShellPath;
185379
- var canAccessPowerShellPromise;
185380
- var canAccessPowerShell = async () => {
185381
- canAccessPowerShellPromise ??= (async () => {
185382
- try {
185383
- const psPath = await powerShellPath2();
185384
- await fs17.access(psPath, fsConstants.X_OK);
185385
- return true;
185386
- } catch {
185387
- return false;
185388
- }
185389
- })();
185390
- return canAccessPowerShellPromise;
185391
- };
185392
- var wslDefaultBrowser = async () => {
185393
- const psPath = await powerShellPath2();
185394
- const command = String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`;
185395
- const { stdout } = await executePowerShell(command, { powerShellPath: psPath });
185396
- return stdout.trim();
185397
- };
185398
- var convertWslPathToWindows = async (path11) => {
185399
- if (/^[a-z]+:\/\//i.test(path11)) {
185400
- return path11;
185401
- }
185402
- try {
185403
- const { stdout } = await execFile2("wslpath", ["-aw", path11], { encoding: "utf8" });
185404
- return stdout.trim();
185405
- } catch {
185406
- return path11;
185407
- }
185408
- };
185409
-
185410
- // node_modules/define-lazy-prop/index.js
185411
- function defineLazyProperty(object2, propertyName, valueGetter) {
185412
- const define2 = (value) => Object.defineProperty(object2, propertyName, { value, enumerable: true, writable: true });
185413
- Object.defineProperty(object2, propertyName, {
185414
- configurable: true,
185415
- enumerable: true,
185416
- get() {
185417
- const result = valueGetter();
185418
- define2(result);
185419
- return result;
185420
- },
185421
- set(value) {
185422
- define2(value);
185423
- }
185424
- });
185425
- return object2;
185426
- }
185427
-
185428
- // node_modules/default-browser/index.js
185429
- import { promisify as promisify8 } from "node:util";
185430
- import process9 from "node:process";
185431
- import { execFile as execFile6 } from "node:child_process";
185432
-
185433
- // node_modules/default-browser-id/index.js
185434
- import { promisify as promisify5 } from "node:util";
185435
- import process7 from "node:process";
185436
- import { execFile as execFile3 } from "node:child_process";
185437
- var execFileAsync = promisify5(execFile3);
185438
- async function defaultBrowserId() {
185439
- if (process7.platform !== "darwin") {
185440
- throw new Error("macOS only");
185441
- }
185442
- const { stdout } = await execFileAsync("defaults", ["read", "com.apple.LaunchServices/com.apple.launchservices.secure", "LSHandlers"]);
185443
- const match = /LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout);
185444
- const browserId = match?.groups.id ?? "com.apple.Safari";
185445
- if (browserId === "com.apple.safari") {
185446
- return "com.apple.Safari";
185447
- }
185448
- return browserId;
185449
- }
185450
-
185451
- // node_modules/run-applescript/index.js
185452
- import process8 from "node:process";
185453
- import { promisify as promisify6 } from "node:util";
185454
- import { execFile as execFile4, execFileSync } from "node:child_process";
185455
- var execFileAsync2 = promisify6(execFile4);
185456
- async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {
185457
- if (process8.platform !== "darwin") {
185458
- throw new Error("macOS only");
185459
- }
185460
- const outputArguments = humanReadableOutput ? [] : ["-ss"];
185461
- const execOptions = {};
185462
- if (signal) {
185463
- execOptions.signal = signal;
185464
- }
185465
- const { stdout } = await execFileAsync2("osascript", ["-e", script, outputArguments], execOptions);
185466
- return stdout.trim();
185467
- }
185468
-
185469
- // node_modules/bundle-name/index.js
185470
- async function bundleName(bundleId) {
185471
- return runAppleScript(`tell application "Finder" to set app_path to application file id "${bundleId}" as string
185472
- tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`);
185473
- }
185474
-
185475
- // node_modules/default-browser/windows.js
185476
- import { promisify as promisify7 } from "node:util";
185477
- import { execFile as execFile5 } from "node:child_process";
185478
- var execFileAsync3 = promisify7(execFile5);
185479
- var windowsBrowserProgIds = {
185480
- MSEdgeHTM: { name: "Edge", id: "com.microsoft.edge" },
185481
- MSEdgeBHTML: { name: "Edge Beta", id: "com.microsoft.edge.beta" },
185482
- MSEdgeDHTML: { name: "Edge Dev", id: "com.microsoft.edge.dev" },
185483
- AppXq0fevzme2pys62n3e0fbqa7peapykr8v: { name: "Edge", id: "com.microsoft.edge.old" },
185484
- ChromeHTML: { name: "Chrome", id: "com.google.chrome" },
185485
- ChromeBHTML: { name: "Chrome Beta", id: "com.google.chrome.beta" },
185486
- ChromeDHTML: { name: "Chrome Dev", id: "com.google.chrome.dev" },
185487
- ChromiumHTM: { name: "Chromium", id: "org.chromium.Chromium" },
185488
- BraveHTML: { name: "Brave", id: "com.brave.Browser" },
185489
- BraveBHTML: { name: "Brave Beta", id: "com.brave.Browser.beta" },
185490
- BraveDHTML: { name: "Brave Dev", id: "com.brave.Browser.dev" },
185491
- BraveSSHTM: { name: "Brave Nightly", id: "com.brave.Browser.nightly" },
185492
- FirefoxURL: { name: "Firefox", id: "org.mozilla.firefox" },
185493
- OperaStable: { name: "Opera", id: "com.operasoftware.Opera" },
185494
- VivaldiHTM: { name: "Vivaldi", id: "com.vivaldi.Vivaldi" },
185495
- "IE.HTTP": { name: "Internet Explorer", id: "com.microsoft.ie" }
185496
- };
185497
- var _windowsBrowserProgIdMap = new Map(Object.entries(windowsBrowserProgIds));
185498
-
185499
- class UnknownBrowserError extends Error {
185500
- }
185501
- async function defaultBrowser(_execFileAsync = execFileAsync3) {
185502
- const { stdout } = await _execFileAsync("reg", [
185503
- "QUERY",
185504
- " HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice",
185505
- "/v",
185506
- "ProgId"
185507
- ]);
185508
- const match = /ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(stdout);
185509
- if (!match) {
185510
- throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);
185511
- }
185512
- const { id } = match.groups;
185513
- const dotIndex = id.lastIndexOf(".");
185514
- const hyphenIndex = id.lastIndexOf("-");
185515
- const baseIdByDot = dotIndex === -1 ? undefined : id.slice(0, dotIndex);
185516
- const baseIdByHyphen = hyphenIndex === -1 ? undefined : id.slice(0, hyphenIndex);
185517
- return windowsBrowserProgIds[id] ?? windowsBrowserProgIds[baseIdByDot] ?? windowsBrowserProgIds[baseIdByHyphen] ?? { name: id, id };
185518
- }
185519
-
185520
- // node_modules/default-browser/index.js
185521
- var execFileAsync4 = promisify8(execFile6);
185522
- var titleize = (string4) => string4.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x2) => x2.toUpperCase());
185523
- async function defaultBrowser2() {
185524
- if (process9.platform === "darwin") {
185525
- const id = await defaultBrowserId();
185526
- const name2 = await bundleName(id);
185527
- return { name: name2, id };
185528
- }
185529
- if (process9.platform === "linux") {
185530
- const { stdout } = await execFileAsync4("xdg-mime", ["query", "default", "x-scheme-handler/http"]);
185531
- const id = stdout.trim();
185532
- const name2 = titleize(id.replace(/.desktop$/, "").replace("-", " "));
185533
- return { name: name2, id };
185534
- }
185535
- if (process9.platform === "win32") {
185536
- return defaultBrowser();
185537
- }
185538
- throw new Error("Only macOS, Linux, and Windows are supported");
185539
- }
185540
-
185541
- // node_modules/is-in-ssh/index.js
185542
- import process10 from "node:process";
185543
- var isInSsh = Boolean(process10.env.SSH_CONNECTION || process10.env.SSH_CLIENT || process10.env.SSH_TTY);
185544
- var is_in_ssh_default = isInSsh;
185545
-
185546
- // node_modules/open/index.js
185547
- var fallbackAttemptSymbol = Symbol("fallbackAttempt");
185548
- var __dirname3 = import.meta.url ? path11.dirname(fileURLToPath3(import.meta.url)) : "";
185549
- var localXdgOpenPath = path11.join(__dirname3, "xdg-open");
185550
- var { platform: platform5, arch } = process11;
185551
- var tryEachApp = async (apps, opener) => {
185552
- if (apps.length === 0) {
185553
- return;
185554
- }
185555
- const errors3 = [];
185556
- for (const app of apps) {
185557
- try {
185558
- return await opener(app);
185559
- } catch (error48) {
185560
- errors3.push(error48);
185561
- }
185562
- }
185563
- throw new AggregateError(errors3, "Failed to open in all supported apps");
185564
- };
185565
- var baseOpen = async (options) => {
185566
- options = {
185567
- wait: false,
185568
- background: false,
185569
- newInstance: false,
185570
- allowNonzeroExitCode: false,
185571
- ...options
185572
- };
185573
- const isFallbackAttempt = options[fallbackAttemptSymbol] === true;
185574
- delete options[fallbackAttemptSymbol];
185575
- if (Array.isArray(options.app)) {
185576
- return tryEachApp(options.app, (singleApp) => baseOpen({
185577
- ...options,
185578
- app: singleApp,
185579
- [fallbackAttemptSymbol]: true
185580
- }));
185581
- }
185582
- let { name: app, arguments: appArguments = [] } = options.app ?? {};
185583
- appArguments = [...appArguments];
185584
- if (Array.isArray(app)) {
185585
- return tryEachApp(app, (appName) => baseOpen({
185586
- ...options,
185587
- app: {
185588
- name: appName,
185589
- arguments: appArguments
185590
- },
185591
- [fallbackAttemptSymbol]: true
185592
- }));
185593
- }
185594
- if (app === "browser" || app === "browserPrivate") {
185595
- const ids = {
185596
- "com.google.chrome": "chrome",
185597
- "google-chrome.desktop": "chrome",
185598
- "com.brave.browser": "brave",
185599
- "org.mozilla.firefox": "firefox",
185600
- "firefox.desktop": "firefox",
185601
- "com.microsoft.msedge": "edge",
185602
- "com.microsoft.edge": "edge",
185603
- "com.microsoft.edgemac": "edge",
185604
- "microsoft-edge.desktop": "edge",
185605
- "com.apple.safari": "safari"
185606
- };
185607
- const flags = {
185608
- chrome: "--incognito",
185609
- brave: "--incognito",
185610
- firefox: "--private-window",
185611
- edge: "--inPrivate"
185612
- };
185613
- let browser;
185614
- if (is_wsl_default) {
185615
- const progId = await wslDefaultBrowser();
185616
- const browserInfo = _windowsBrowserProgIdMap.get(progId);
185617
- browser = browserInfo ?? {};
185618
- } else {
185619
- browser = await defaultBrowser2();
185620
- }
185621
- if (browser.id in ids) {
185622
- const browserName = ids[browser.id.toLowerCase()];
185623
- if (app === "browserPrivate") {
185624
- if (browserName === "safari") {
185625
- throw new Error("Safari doesn't support opening in private mode via command line");
185626
- }
185627
- appArguments.push(flags[browserName]);
185628
- }
185629
- return baseOpen({
185630
- ...options,
185631
- app: {
185632
- name: apps[browserName],
185633
- arguments: appArguments
185634
- }
185635
- });
185636
- }
185637
- throw new Error(`${browser.name} is not supported as a default browser`);
185638
- }
185639
- let command;
185640
- const cliArguments = [];
185641
- const childProcessOptions = {};
185642
- let shouldUseWindowsInWsl = false;
185643
- if (is_wsl_default && !isInsideContainer() && !is_in_ssh_default && !app) {
185644
- shouldUseWindowsInWsl = await canAccessPowerShell();
185645
- }
185646
- if (platform5 === "darwin") {
185647
- command = "open";
185648
- if (options.wait) {
185649
- cliArguments.push("--wait-apps");
185650
- }
185651
- if (options.background) {
185652
- cliArguments.push("--background");
185653
- }
185654
- if (options.newInstance) {
185655
- cliArguments.push("--new");
185656
- }
185657
- if (app) {
185658
- cliArguments.push("-a", app);
185659
- }
185660
- } else if (platform5 === "win32" || shouldUseWindowsInWsl) {
185661
- command = await powerShellPath2();
185662
- cliArguments.push(...executePowerShell.argumentsPrefix);
185663
- if (!is_wsl_default) {
185664
- childProcessOptions.windowsVerbatimArguments = true;
185665
- }
185666
- if (is_wsl_default && options.target) {
185667
- options.target = await convertWslPathToWindows(options.target);
185668
- }
185669
- const encodedArguments = ["$ProgressPreference = 'SilentlyContinue';", "Start"];
185670
- if (options.wait) {
185671
- encodedArguments.push("-Wait");
185672
- }
185673
- if (app) {
185674
- encodedArguments.push(executePowerShell.escapeArgument(app));
185675
- if (options.target) {
185676
- appArguments.push(options.target);
185677
- }
185678
- } else if (options.target) {
185679
- encodedArguments.push(executePowerShell.escapeArgument(options.target));
185680
- }
185681
- if (appArguments.length > 0) {
185682
- appArguments = appArguments.map((argument) => executePowerShell.escapeArgument(argument));
185683
- encodedArguments.push("-ArgumentList", appArguments.join(","));
185684
- }
185685
- options.target = executePowerShell.encodeCommand(encodedArguments.join(" "));
185686
- if (!options.wait) {
185687
- childProcessOptions.stdio = "ignore";
185688
- }
185689
- } else {
185690
- if (app) {
185691
- command = app;
185692
- } else {
185693
- const isBundled = !__dirname3 || __dirname3 === "/";
185694
- let exeLocalXdgOpen = false;
185695
- try {
185696
- await fs18.access(localXdgOpenPath, fsConstants2.X_OK);
185697
- exeLocalXdgOpen = true;
185698
- } catch {}
185699
- const useSystemXdgOpen = process11.versions.electron ?? (platform5 === "android" || isBundled || !exeLocalXdgOpen);
185700
- command = useSystemXdgOpen ? "xdg-open" : localXdgOpenPath;
185701
- }
185702
- if (appArguments.length > 0) {
185703
- cliArguments.push(...appArguments);
185704
- }
185705
- if (!options.wait) {
185706
- childProcessOptions.stdio = "ignore";
185707
- childProcessOptions.detached = true;
185708
- }
185709
- }
185710
- if (platform5 === "darwin" && appArguments.length > 0) {
185711
- cliArguments.push("--args", ...appArguments);
185712
- }
185713
- if (options.target) {
185714
- cliArguments.push(options.target);
185715
- }
185716
- const subprocess = childProcess3.spawn(command, cliArguments, childProcessOptions);
185717
- if (options.wait) {
185718
- return new Promise((resolve, reject) => {
185719
- subprocess.once("error", reject);
185720
- subprocess.once("close", (exitCode) => {
185721
- if (!options.allowNonzeroExitCode && exitCode !== 0) {
185722
- reject(new Error(`Exited with code ${exitCode}`));
185723
- return;
185724
- }
185725
- resolve(subprocess);
185726
- });
185727
- });
185728
- }
185729
- if (isFallbackAttempt) {
185730
- return new Promise((resolve, reject) => {
185731
- subprocess.once("error", reject);
185732
- subprocess.once("spawn", () => {
185733
- subprocess.once("close", (exitCode) => {
185734
- subprocess.off("error", reject);
185735
- if (exitCode !== 0) {
185736
- reject(new Error(`Exited with code ${exitCode}`));
185737
- return;
185738
- }
185739
- subprocess.unref();
185740
- resolve(subprocess);
185741
- });
185742
- });
185743
- });
185744
- }
185745
- subprocess.unref();
185746
- return new Promise((resolve, reject) => {
185747
- subprocess.once("error", reject);
185748
- subprocess.once("spawn", () => {
185749
- subprocess.off("error", reject);
185750
- resolve(subprocess);
185751
- });
185752
- });
185753
- };
185754
- var open = (target, options) => {
185755
- if (typeof target !== "string") {
185756
- throw new TypeError("Expected a `target`");
185757
- }
185758
- return baseOpen({
185759
- ...options,
185760
- target
185761
- });
185762
- };
185763
- function detectArchBinary(binary) {
185764
- if (typeof binary === "string" || Array.isArray(binary)) {
185765
- return binary;
185766
- }
185767
- const { [arch]: archBinary } = binary;
185768
- if (!archBinary) {
185769
- throw new Error(`${arch} is not supported`);
185770
- }
185771
- return archBinary;
185772
- }
185773
- function detectPlatformBinary({ [platform5]: platformBinary }, { wsl } = {}) {
185774
- if (wsl && is_wsl_default) {
185775
- return detectArchBinary(wsl);
185776
- }
185777
- if (!platformBinary) {
185778
- throw new Error(`${platform5} is not supported`);
185779
- }
185780
- return detectArchBinary(platformBinary);
185781
- }
185782
- var apps = {
185783
- browser: "browser",
185784
- browserPrivate: "browserPrivate"
185785
- };
185786
- defineLazyProperty(apps, "chrome", () => detectPlatformBinary({
185787
- darwin: "google chrome",
185788
- win32: "chrome",
185789
- linux: ["google-chrome", "google-chrome-stable", "chromium", "chromium-browser"]
185790
- }, {
185791
- wsl: {
185792
- ia32: "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",
185793
- x64: ["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe", "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]
185794
- }
185795
- }));
185796
- defineLazyProperty(apps, "brave", () => detectPlatformBinary({
185797
- darwin: "brave browser",
185798
- win32: "brave",
185799
- linux: ["brave-browser", "brave"]
185800
- }, {
185801
- wsl: {
185802
- ia32: "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe",
185803
- x64: ["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe", "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"]
185804
- }
185805
- }));
185806
- defineLazyProperty(apps, "firefox", () => detectPlatformBinary({
185807
- darwin: "firefox",
185808
- win32: String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,
185809
- linux: "firefox"
185810
- }, {
185811
- wsl: "/mnt/c/Program Files/Mozilla Firefox/firefox.exe"
185812
- }));
185813
- defineLazyProperty(apps, "edge", () => detectPlatformBinary({
185814
- darwin: "microsoft edge",
185815
- win32: "msedge",
185816
- linux: ["microsoft-edge", "microsoft-edge-dev"]
185817
- }, {
185818
- wsl: "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
185819
- }));
185820
- defineLazyProperty(apps, "safari", () => detectPlatformBinary({
185821
- darwin: "Safari"
185822
- }));
185823
- var open_default = open;
185824
-
185825
- // node_modules/p-wait-for/index.js
185826
- var resolveValue = Symbol("resolveValue");
185827
- var sleep = (ms, signal) => new Promise((resolve, reject) => {
185828
- if (signal?.aborted) {
185829
- reject(signal.reason);
185830
- return;
185831
- }
185832
- const timeout2 = setTimeout(resolve, ms);
185833
- if (signal) {
185834
- signal.addEventListener("abort", () => {
185835
- clearTimeout(timeout2);
185836
- reject(signal.reason);
185837
- }, { once: true });
185838
- }
185839
- });
185840
- var validateOptions = (interval, timeout2) => {
185841
- if (typeof interval !== "number" || !Number.isFinite(interval) || interval < 0) {
185842
- throw new TypeError("Expected interval to be a finite non-negative number");
185843
- }
185844
- if (typeof timeout2 === "object" && timeout2 !== null) {
185845
- if (typeof timeout2.milliseconds !== "number" || Number.isNaN(timeout2.milliseconds) || timeout2.milliseconds < 0) {
185846
- throw new TypeError("Expected timeout.milliseconds to be a finite non-negative number");
185847
- }
185848
- } else if (typeof timeout2 === "number" && (Number.isNaN(timeout2) || timeout2 < 0)) {
185849
- throw new TypeError("Expected timeout to be a finite non-negative number");
185850
- }
185851
- };
185852
- var createTimeoutError = (timeout2) => {
185853
- if (timeout2.message instanceof Error) {
185854
- return timeout2.message;
185855
- }
185856
- const message = timeout2.message ?? `Promise timed out after ${timeout2.milliseconds} milliseconds`;
185857
- return new TimeoutError2(message);
185858
- };
185859
- var handleFallback = (timeout2) => {
185860
- if (timeout2.fallback) {
185861
- return timeout2.fallback();
185862
- }
185863
- throw createTimeoutError(timeout2);
185864
- };
185865
- var handleAbortError = (timeoutSignal, timeout2, signal) => {
185866
- if (timeoutSignal?.aborted) {
185867
- if (typeof timeout2 === "object") {
185868
- return handleFallback(timeout2);
185869
- }
185870
- throw new TimeoutError2;
185871
- }
185872
- throw signal.reason;
185873
- };
185874
- async function pWaitFor(condition, options = {}) {
185875
- const {
185876
- interval = 20,
185877
- timeout: timeout2 = Number.POSITIVE_INFINITY,
185878
- before = true,
185879
- signal
185880
- } = options;
185881
- validateOptions(interval, timeout2);
185882
- const timeoutMs = typeof timeout2 === "number" ? timeout2 : timeout2?.milliseconds ?? Number.POSITIVE_INFINITY;
185883
- const timeoutSignal = timeoutMs === Number.POSITIVE_INFINITY ? undefined : AbortSignal.timeout(timeoutMs);
185884
- const combinedSignal = timeoutSignal && signal ? AbortSignal.any([timeoutSignal, signal]) : timeoutSignal ?? signal;
185885
- if (!before) {
185886
- await sleep(interval, combinedSignal);
185887
- }
185888
- if (combinedSignal?.aborted) {
185889
- return handleAbortError(timeoutSignal, timeout2, signal);
185890
- }
185891
- while (true) {
185892
- try {
185893
- const value = await condition();
185894
- if (typeof value === "object" && value !== null && resolveValue in value) {
185895
- return value[resolveValue];
185896
- }
185897
- if (value === true) {
185898
- return;
185899
- }
185900
- if (value === false) {
185901
- await sleep(interval, combinedSignal);
185902
- continue;
185903
- }
185904
- throw new TypeError("Expected condition to return a boolean");
185905
- } catch (error48) {
185906
- if (error48 === combinedSignal?.reason) {
185907
- return handleAbortError(timeoutSignal, timeout2, signal);
185908
- }
185909
- throw error48;
185910
- }
185911
- }
185912
- }
185913
- pWaitFor.resolveWith = (value) => ({ [resolveValue]: value });
185914
-
185915
- class TimeoutError2 extends Error {
185916
- constructor(message = "Promise timed out") {
185917
- super(message);
185918
- this.name = "TimeoutError";
185919
- }
185920
- }
185921
-
185922
- // src/core/resources/connector/oauth.ts
185923
- var POLL_INTERVAL_MS = 2000;
185924
- var POLL_TIMEOUT_MS = 2 * 60 * 1000;
185925
- async function runOAuthFlow(params) {
185926
- await open_default(params.redirectUrl);
185927
- let finalStatus = "PENDING";
185928
- await pWaitFor(async () => {
185929
- const response = await getOAuthStatus(params.type, params.connectionId);
185930
- finalStatus = response.status;
185931
- return response.status !== "PENDING";
185932
- }, {
185933
- interval: POLL_INTERVAL_MS,
185934
- timeout: POLL_TIMEOUT_MS
185935
- }).catch((err) => {
185936
- if (err instanceof TimeoutError2) {
185937
- finalStatus = "PENDING";
185938
- } else {
185939
- throw err;
185940
- }
185941
- });
185942
- return { type: params.type, status: finalStatus };
185943
- }
185944
185219
  // src/core/resources/connector/push.ts
185945
185220
  async function pushConnectors(connectors) {
185946
185221
  const results = [];
@@ -187002,16 +186277,16 @@ var ansiStyles = assembleStyles();
187002
186277
  var ansi_styles_default = ansiStyles;
187003
186278
 
187004
186279
  // node_modules/chalk/source/vendor/supports-color/index.js
187005
- import process12 from "node:process";
187006
- import os2 from "node:os";
186280
+ import process5 from "node:process";
186281
+ import os from "node:os";
187007
186282
  import tty from "node:tty";
187008
- function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process12.argv) {
186283
+ function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process5.argv) {
187009
186284
  const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
187010
186285
  const position = argv.indexOf(prefix + flag);
187011
186286
  const terminatorPosition = argv.indexOf("--");
187012
186287
  return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
187013
186288
  }
187014
- var { env } = process12;
186289
+ var { env } = process5;
187015
186290
  var flagForceColor;
187016
186291
  if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
187017
186292
  flagForceColor = 0;
@@ -187067,8 +186342,8 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
187067
186342
  if (env.TERM === "dumb") {
187068
186343
  return min;
187069
186344
  }
187070
- if (process12.platform === "win32") {
187071
- const osRelease = os2.release().split(".");
186345
+ if (process5.platform === "win32") {
186346
+ const osRelease = os.release().split(".");
187072
186347
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
187073
186348
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
187074
186349
  }
@@ -187260,18 +186535,18 @@ var proto = Object.defineProperties(() => {}, {
187260
186535
  }
187261
186536
  }
187262
186537
  });
187263
- var createStyler = (open2, close, parent) => {
186538
+ var createStyler = (open, close, parent) => {
187264
186539
  let openAll;
187265
186540
  let closeAll;
187266
186541
  if (parent === undefined) {
187267
- openAll = open2;
186542
+ openAll = open;
187268
186543
  closeAll = close;
187269
186544
  } else {
187270
- openAll = parent.openAll + open2;
186545
+ openAll = parent.openAll + open;
187271
186546
  closeAll = close + parent.closeAll;
187272
186547
  }
187273
186548
  return {
187274
- open: open2,
186549
+ open,
187275
186550
  close,
187276
186551
  openAll,
187277
186552
  closeAll,
@@ -187353,7 +186628,7 @@ var theme = {
187353
186628
  };
187354
186629
 
187355
186630
  // src/cli/utils/animate.ts
187356
- function sleep2(ms) {
186631
+ function sleep(ms) {
187357
186632
  return new Promise((resolve2) => setTimeout(resolve2, ms));
187358
186633
  }
187359
186634
  async function animateLineReveal(line, duration3) {
@@ -187373,7 +186648,7 @@ async function animateLineReveal(line, duration3) {
187373
186648
  }
187374
186649
  }
187375
186650
  process.stdout.write(`\r${output}`);
187376
- await sleep2(stepDuration);
186651
+ await sleep(stepDuration);
187377
186652
  }
187378
186653
  process.stdout.write(`\r${theme.colors.base44Orange(line)}
187379
186654
  `);
@@ -187398,7 +186673,7 @@ async function shimmerPass(lines, duration3) {
187398
186673
  }
187399
186674
  console.log(output);
187400
186675
  }
187401
- await sleep2(stepDuration);
186676
+ await sleep(stepDuration);
187402
186677
  }
187403
186678
  process.stdout.write(moveUp);
187404
186679
  for (const line of lines) {
@@ -187412,7 +186687,7 @@ async function printAnimatedLines(lines) {
187412
186687
  const line = lines[i];
187413
186688
  await animateLineReveal(line, 100);
187414
186689
  if (i < lines.length - 1) {
187415
- await sleep2(lineDelay - 100);
186690
+ await sleep(lineDelay - 100);
187416
186691
  }
187417
186692
  }
187418
186693
  await shimmerPass(lines, 200);
@@ -187450,6 +186725,103 @@ var onPromptCancel = () => {
187450
186725
  xe("Operation cancelled.");
187451
186726
  throw new CLIExitError(0);
187452
186727
  };
186728
+ // node_modules/p-wait-for/index.js
186729
+ var resolveValue = Symbol("resolveValue");
186730
+ var sleep2 = (ms, signal) => new Promise((resolve2, reject) => {
186731
+ if (signal?.aborted) {
186732
+ reject(signal.reason);
186733
+ return;
186734
+ }
186735
+ const timeout2 = setTimeout(resolve2, ms);
186736
+ if (signal) {
186737
+ signal.addEventListener("abort", () => {
186738
+ clearTimeout(timeout2);
186739
+ reject(signal.reason);
186740
+ }, { once: true });
186741
+ }
186742
+ });
186743
+ var validateOptions = (interval, timeout2) => {
186744
+ if (typeof interval !== "number" || !Number.isFinite(interval) || interval < 0) {
186745
+ throw new TypeError("Expected interval to be a finite non-negative number");
186746
+ }
186747
+ if (typeof timeout2 === "object" && timeout2 !== null) {
186748
+ if (typeof timeout2.milliseconds !== "number" || Number.isNaN(timeout2.milliseconds) || timeout2.milliseconds < 0) {
186749
+ throw new TypeError("Expected timeout.milliseconds to be a finite non-negative number");
186750
+ }
186751
+ } else if (typeof timeout2 === "number" && (Number.isNaN(timeout2) || timeout2 < 0)) {
186752
+ throw new TypeError("Expected timeout to be a finite non-negative number");
186753
+ }
186754
+ };
186755
+ var createTimeoutError = (timeout2) => {
186756
+ if (timeout2.message instanceof Error) {
186757
+ return timeout2.message;
186758
+ }
186759
+ const message = timeout2.message ?? `Promise timed out after ${timeout2.milliseconds} milliseconds`;
186760
+ return new TimeoutError2(message);
186761
+ };
186762
+ var handleFallback = (timeout2) => {
186763
+ if (timeout2.fallback) {
186764
+ return timeout2.fallback();
186765
+ }
186766
+ throw createTimeoutError(timeout2);
186767
+ };
186768
+ var handleAbortError = (timeoutSignal, timeout2, signal) => {
186769
+ if (timeoutSignal?.aborted) {
186770
+ if (typeof timeout2 === "object") {
186771
+ return handleFallback(timeout2);
186772
+ }
186773
+ throw new TimeoutError2;
186774
+ }
186775
+ throw signal.reason;
186776
+ };
186777
+ async function pWaitFor(condition, options = {}) {
186778
+ const {
186779
+ interval = 20,
186780
+ timeout: timeout2 = Number.POSITIVE_INFINITY,
186781
+ before = true,
186782
+ signal
186783
+ } = options;
186784
+ validateOptions(interval, timeout2);
186785
+ const timeoutMs = typeof timeout2 === "number" ? timeout2 : timeout2?.milliseconds ?? Number.POSITIVE_INFINITY;
186786
+ const timeoutSignal = timeoutMs === Number.POSITIVE_INFINITY ? undefined : AbortSignal.timeout(timeoutMs);
186787
+ const combinedSignal = timeoutSignal && signal ? AbortSignal.any([timeoutSignal, signal]) : timeoutSignal ?? signal;
186788
+ if (!before) {
186789
+ await sleep2(interval, combinedSignal);
186790
+ }
186791
+ if (combinedSignal?.aborted) {
186792
+ return handleAbortError(timeoutSignal, timeout2, signal);
186793
+ }
186794
+ while (true) {
186795
+ try {
186796
+ const value = await condition();
186797
+ if (typeof value === "object" && value !== null && resolveValue in value) {
186798
+ return value[resolveValue];
186799
+ }
186800
+ if (value === true) {
186801
+ return;
186802
+ }
186803
+ if (value === false) {
186804
+ await sleep2(interval, combinedSignal);
186805
+ continue;
186806
+ }
186807
+ throw new TypeError("Expected condition to return a boolean");
186808
+ } catch (error48) {
186809
+ if (error48 === combinedSignal?.reason) {
186810
+ return handleAbortError(timeoutSignal, timeout2, signal);
186811
+ }
186812
+ throw error48;
186813
+ }
186814
+ }
186815
+ }
186816
+ pWaitFor.resolveWith = (value) => ({ [resolveValue]: value });
186817
+
186818
+ class TimeoutError2 extends Error {
186819
+ constructor(message = "Promise timed out") {
186820
+ super(message);
186821
+ this.name = "TimeoutError";
186822
+ }
186823
+ }
186824
+
187453
186825
  // src/cli/commands/auth/login-flow.ts
187454
186826
  async function generateAndDisplayDeviceCode() {
187455
186827
  const deviceCodeResponse = await runTask("Generating device code...", async () => {
@@ -187522,7 +186894,7 @@ function isPlainObject2(value) {
187522
186894
  }
187523
186895
 
187524
186896
  // node_modules/execa/lib/arguments/file-url.js
187525
- import { fileURLToPath as fileURLToPath4 } from "node:url";
186897
+ import { fileURLToPath as fileURLToPath3 } from "node:url";
187526
186898
  var safeNormalizeFileUrl = (file2, name2) => {
187527
186899
  const fileString = normalizeFileUrl(normalizeDenoExecPath(file2));
187528
186900
  if (typeof fileString !== "string") {
@@ -187532,7 +186904,7 @@ var safeNormalizeFileUrl = (file2, name2) => {
187532
186904
  };
187533
186905
  var normalizeDenoExecPath = (file2) => isDenoExecPath(file2) ? file2.toString() : file2;
187534
186906
  var isDenoExecPath = (file2) => typeof file2 !== "string" && file2 && Object.getPrototypeOf(file2) === String.prototype;
187535
- var normalizeFileUrl = (file2) => file2 instanceof URL ? fileURLToPath4(file2) : file2;
186907
+ var normalizeFileUrl = (file2) => file2 instanceof URL ? fileURLToPath3(file2) : file2;
187536
186908
 
187537
186909
  // node_modules/execa/lib/methods/parameters.js
187538
186910
  var normalizeParameters = (rawFile, rawArguments = [], rawOptions = {}) => {
@@ -187714,9 +187086,9 @@ import { spawnSync } from "node:child_process";
187714
187086
  import { debuglog } from "node:util";
187715
187087
 
187716
187088
  // node_modules/execa/lib/utils/standard-stream.js
187717
- import process13 from "node:process";
187089
+ import process6 from "node:process";
187718
187090
  var isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
187719
- var STANDARD_STREAMS = [process13.stdin, process13.stdout, process13.stderr];
187091
+ var STANDARD_STREAMS = [process6.stdin, process6.stdout, process6.stderr];
187720
187092
  var STANDARD_STREAMS_ALIASES = ["stdin", "stdout", "stderr"];
187721
187093
  var getStreamName = (fdNumber) => STANDARD_STREAMS_ALIASES[fdNumber] ?? `stdio[${fdNumber}]`;
187722
187094
 
@@ -187806,7 +187178,7 @@ var VERBOSE_VALUES = ["none", "short", "full"];
187806
187178
  import { inspect } from "node:util";
187807
187179
 
187808
187180
  // node_modules/execa/lib/arguments/escape.js
187809
- import { platform as platform6 } from "node:process";
187181
+ import { platform as platform5 } from "node:process";
187810
187182
  import { stripVTControlCharacters } from "node:util";
187811
187183
  var joinCommand = (filePath, rawArguments) => {
187812
187184
  const fileAndArguments = [filePath, ...rawArguments];
@@ -187848,16 +187220,16 @@ var quoteString = (escapedArgument) => {
187848
187220
  if (NO_ESCAPE_REGEXP.test(escapedArgument)) {
187849
187221
  return escapedArgument;
187850
187222
  }
187851
- return platform6 === "win32" ? `"${escapedArgument.replaceAll('"', '""')}"` : `'${escapedArgument.replaceAll("'", "'\\''")}'`;
187223
+ return platform5 === "win32" ? `"${escapedArgument.replaceAll('"', '""')}"` : `'${escapedArgument.replaceAll("'", "'\\''")}'`;
187852
187224
  };
187853
187225
  var NO_ESCAPE_REGEXP = /^[\w./-]+$/;
187854
187226
 
187855
187227
  // node_modules/is-unicode-supported/index.js
187856
- import process14 from "node:process";
187228
+ import process7 from "node:process";
187857
187229
  function isUnicodeSupported() {
187858
- const { env: env2 } = process14;
187230
+ const { env: env2 } = process7;
187859
187231
  const { TERM, TERM_PROGRAM } = env2;
187860
- if (process14.platform !== "win32") {
187232
+ if (process7.platform !== "win32") {
187861
187233
  return TERM !== "linux";
187862
187234
  }
187863
187235
  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";
@@ -188142,11 +187514,11 @@ var replacements = Object.entries(specialMainSymbols);
188142
187514
  // node_modules/yoctocolors/base.js
188143
187515
  import tty2 from "node:tty";
188144
187516
  var hasColors = tty2?.WriteStream?.prototype?.hasColors?.() ?? false;
188145
- var format = (open2, close) => {
187517
+ var format = (open, close) => {
188146
187518
  if (!hasColors) {
188147
187519
  return (input) => input;
188148
187520
  }
188149
- const openCode = `\x1B[${open2}m`;
187521
+ const openCode = `\x1B[${open}m`;
188150
187522
  const closeCode = `\x1B[${close}m`;
188151
187523
  return (input) => {
188152
187524
  const string4 = input + "";
@@ -188363,43 +187735,43 @@ var handleCommand = (filePath, rawArguments, rawOptions) => {
188363
187735
 
188364
187736
  // node_modules/execa/lib/arguments/options.js
188365
187737
  var import_cross_spawn = __toESM(require_cross_spawn(), 1);
188366
- import path16 from "node:path";
188367
- import process17 from "node:process";
187738
+ import path15 from "node:path";
187739
+ import process10 from "node:process";
188368
187740
 
188369
187741
  // node_modules/npm-run-path/index.js
188370
- import process15 from "node:process";
188371
- import path13 from "node:path";
187742
+ import process8 from "node:process";
187743
+ import path12 from "node:path";
188372
187744
 
188373
187745
  // node_modules/npm-run-path/node_modules/path-key/index.js
188374
187746
  function pathKey(options = {}) {
188375
187747
  const {
188376
187748
  env: env2 = process.env,
188377
- platform: platform7 = process.platform
187749
+ platform: platform6 = process.platform
188378
187750
  } = options;
188379
- if (platform7 !== "win32") {
187751
+ if (platform6 !== "win32") {
188380
187752
  return "PATH";
188381
187753
  }
188382
187754
  return Object.keys(env2).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
188383
187755
  }
188384
187756
 
188385
187757
  // node_modules/npm-run-path/node_modules/unicorn-magic/node.js
188386
- import { promisify as promisify9 } from "node:util";
187758
+ import { promisify as promisify3 } from "node:util";
188387
187759
  import { execFile as execFileCallback2, execFileSync as execFileSyncOriginal2 } from "node:child_process";
188388
- import path12 from "node:path";
188389
- import { fileURLToPath as fileURLToPath5 } from "node:url";
188390
- var execFileOriginal2 = promisify9(execFileCallback2);
187760
+ import path11 from "node:path";
187761
+ import { fileURLToPath as fileURLToPath4 } from "node:url";
187762
+ var execFileOriginal2 = promisify3(execFileCallback2);
188391
187763
  function toPath2(urlOrPath) {
188392
- return urlOrPath instanceof URL ? fileURLToPath5(urlOrPath) : urlOrPath;
187764
+ return urlOrPath instanceof URL ? fileURLToPath4(urlOrPath) : urlOrPath;
188393
187765
  }
188394
187766
  function traversePathUp(startPath) {
188395
187767
  return {
188396
187768
  *[Symbol.iterator]() {
188397
- let currentPath = path12.resolve(toPath2(startPath));
187769
+ let currentPath = path11.resolve(toPath2(startPath));
188398
187770
  let previousPath;
188399
187771
  while (previousPath !== currentPath) {
188400
187772
  yield currentPath;
188401
187773
  previousPath = currentPath;
188402
- currentPath = path12.resolve(currentPath, "..");
187774
+ currentPath = path11.resolve(currentPath, "..");
188403
187775
  }
188404
187776
  }
188405
187777
  };
@@ -188408,38 +187780,38 @@ var TEN_MEGABYTES_IN_BYTES2 = 10 * 1024 * 1024;
188408
187780
 
188409
187781
  // node_modules/npm-run-path/index.js
188410
187782
  var npmRunPath = ({
188411
- cwd = process15.cwd(),
188412
- path: pathOption = process15.env[pathKey()],
187783
+ cwd = process8.cwd(),
187784
+ path: pathOption = process8.env[pathKey()],
188413
187785
  preferLocal = true,
188414
- execPath = process15.execPath,
187786
+ execPath = process8.execPath,
188415
187787
  addExecPath = true
188416
187788
  } = {}) => {
188417
- const cwdPath = path13.resolve(toPath2(cwd));
187789
+ const cwdPath = path12.resolve(toPath2(cwd));
188418
187790
  const result = [];
188419
- const pathParts = pathOption.split(path13.delimiter);
187791
+ const pathParts = pathOption.split(path12.delimiter);
188420
187792
  if (preferLocal) {
188421
187793
  applyPreferLocal(result, pathParts, cwdPath);
188422
187794
  }
188423
187795
  if (addExecPath) {
188424
187796
  applyExecPath(result, pathParts, execPath, cwdPath);
188425
187797
  }
188426
- return pathOption === "" || pathOption === path13.delimiter ? `${result.join(path13.delimiter)}${pathOption}` : [...result, pathOption].join(path13.delimiter);
187798
+ return pathOption === "" || pathOption === path12.delimiter ? `${result.join(path12.delimiter)}${pathOption}` : [...result, pathOption].join(path12.delimiter);
188427
187799
  };
188428
187800
  var applyPreferLocal = (result, pathParts, cwdPath) => {
188429
187801
  for (const directory of traversePathUp(cwdPath)) {
188430
- const pathPart = path13.join(directory, "node_modules/.bin");
187802
+ const pathPart = path12.join(directory, "node_modules/.bin");
188431
187803
  if (!pathParts.includes(pathPart)) {
188432
187804
  result.push(pathPart);
188433
187805
  }
188434
187806
  }
188435
187807
  };
188436
187808
  var applyExecPath = (result, pathParts, execPath, cwdPath) => {
188437
- const pathPart = path13.resolve(cwdPath, toPath2(execPath), "..");
187809
+ const pathPart = path12.resolve(cwdPath, toPath2(execPath), "..");
188438
187810
  if (!pathParts.includes(pathPart)) {
188439
187811
  result.push(pathPart);
188440
187812
  }
188441
187813
  };
188442
- var npmRunPathEnv = ({ env: env2 = process15.env, ...options } = {}) => {
187814
+ var npmRunPathEnv = ({ env: env2 = process8.env, ...options } = {}) => {
188443
187815
  env2 = { ...env2 };
188444
187816
  const pathName = pathKey({ env: env2 });
188445
187817
  options.path = env2[pathName];
@@ -188988,7 +188360,7 @@ var terminateOnCancel = async (subprocess, cancelSignal, context, { signal }) =>
188988
188360
  import { scheduler as scheduler2 } from "node:timers/promises";
188989
188361
 
188990
188362
  // node_modules/execa/lib/ipc/send.js
188991
- import { promisify as promisify10 } from "node:util";
188363
+ import { promisify as promisify4 } from "node:util";
188992
188364
 
188993
188365
  // node_modules/execa/lib/ipc/validation.js
188994
188366
  var validateIpcMethod = ({ methodName, isSubprocess, ipc, isConnected }) => {
@@ -189453,7 +188825,7 @@ var getSendMethod = (anyProcess) => {
189453
188825
  if (PROCESS_SEND_METHODS.has(anyProcess)) {
189454
188826
  return PROCESS_SEND_METHODS.get(anyProcess);
189455
188827
  }
189456
- const sendMethod = promisify10(anyProcess.send.bind(anyProcess));
188828
+ const sendMethod = promisify4(anyProcess.send.bind(anyProcess));
189457
188829
  PROCESS_SEND_METHODS.set(anyProcess, sendMethod);
189458
188830
  return sendMethod;
189459
188831
  };
@@ -189583,7 +188955,7 @@ var killAfterTimeout = async (subprocess, timeout2, context, { signal }) => {
189583
188955
 
189584
188956
  // node_modules/execa/lib/methods/node.js
189585
188957
  import { execPath, execArgv } from "node:process";
189586
- import path14 from "node:path";
188958
+ import path13 from "node:path";
189587
188959
  var mapNode = ({ options }) => {
189588
188960
  if (options.node === false) {
189589
188961
  throw new TypeError('The "node" option cannot be false with `execaNode()`.');
@@ -189602,7 +188974,7 @@ var handleNodeOption = (file2, commandArguments, {
189602
188974
  throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');
189603
188975
  }
189604
188976
  const normalizedNodePath = safeNormalizeFileUrl(nodePath2, 'The "nodePath" option');
189605
- const resolvedNodePath = path14.resolve(cwd, normalizedNodePath);
188977
+ const resolvedNodePath = path13.resolve(cwd, normalizedNodePath);
189606
188978
  const newOptions = {
189607
188979
  ...options,
189608
188980
  nodePath: resolvedNodePath,
@@ -189612,7 +188984,7 @@ var handleNodeOption = (file2, commandArguments, {
189612
188984
  if (!shouldHandleNode) {
189613
188985
  return [file2, commandArguments, newOptions];
189614
188986
  }
189615
- if (path14.basename(file2, ".exe") === "node") {
188987
+ if (path13.basename(file2, ".exe") === "node") {
189616
188988
  throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');
189617
188989
  }
189618
188990
  return [
@@ -189701,15 +189073,15 @@ var serializeEncoding = (encoding) => typeof encoding === "string" ? `"${encodin
189701
189073
 
189702
189074
  // node_modules/execa/lib/arguments/cwd.js
189703
189075
  import { statSync } from "node:fs";
189704
- import path15 from "node:path";
189705
- import process16 from "node:process";
189076
+ import path14 from "node:path";
189077
+ import process9 from "node:process";
189706
189078
  var normalizeCwd = (cwd = getDefaultCwd()) => {
189707
189079
  const cwdString = safeNormalizeFileUrl(cwd, 'The "cwd" option');
189708
- return path15.resolve(cwdString);
189080
+ return path14.resolve(cwdString);
189709
189081
  };
189710
189082
  var getDefaultCwd = () => {
189711
189083
  try {
189712
- return process16.cwd();
189084
+ return process9.cwd();
189713
189085
  } catch (error48) {
189714
189086
  error48.message = `The current directory does not exist.
189715
189087
  ${error48.message}`;
@@ -189752,7 +189124,7 @@ var normalizeOptions3 = (filePath, rawArguments, rawOptions) => {
189752
189124
  options.killSignal = normalizeKillSignal(options.killSignal);
189753
189125
  options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
189754
189126
  options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
189755
- if (process17.platform === "win32" && path16.basename(file2, ".exe") === "cmd") {
189127
+ if (process10.platform === "win32" && path15.basename(file2, ".exe") === "cmd") {
189756
189128
  commandArguments.unshift("/q");
189757
189129
  }
189758
189130
  return { file: file2, commandArguments, options };
@@ -189793,7 +189165,7 @@ var addDefaultOptions = ({
189793
189165
  serialization
189794
189166
  });
189795
189167
  var getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath: nodePath2 }) => {
189796
- const env2 = extendEnv ? { ...process17.env, ...envOption } : envOption;
189168
+ const env2 = extendEnv ? { ...process10.env, ...envOption } : envOption;
189797
189169
  if (preferLocal || node) {
189798
189170
  return npmRunPathEnv({
189799
189171
  env: env2,
@@ -190962,7 +190334,7 @@ var normalizeGenerator = ({ stdioItem, stdioItem: { value }, index, newTransform
190962
190334
  var sortTransforms = (newTransforms, direction) => direction === "input" ? newTransforms.reverse() : newTransforms;
190963
190335
 
190964
190336
  // node_modules/execa/lib/stdio/direction.js
190965
- import process18 from "node:process";
190337
+ import process11 from "node:process";
190966
190338
  var getStreamDirection = (stdioItems, fdNumber, optionName) => {
190967
190339
  const directions = stdioItems.map((stdioItem) => getStdioItemDirection(stdioItem, fdNumber));
190968
190340
  if (directions.includes("input") && directions.includes("output")) {
@@ -191004,10 +190376,10 @@ var guessStreamDirection = {
191004
190376
  }
191005
190377
  };
191006
190378
  var getStandardStreamDirection = (value) => {
191007
- if ([0, process18.stdin].includes(value)) {
190379
+ if ([0, process11.stdin].includes(value)) {
191008
190380
  return "input";
191009
190381
  }
191010
- if ([1, 2, process18.stdout, process18.stderr].includes(value)) {
190382
+ if ([1, 2, process11.stdout, process11.stderr].includes(value)) {
191011
190383
  return "output";
191012
190384
  }
191013
190385
  };
@@ -191527,10 +190899,10 @@ var linesUint8ArrayInfo = {
191527
190899
  };
191528
190900
 
191529
190901
  // node_modules/execa/lib/transform/validate.js
191530
- import { Buffer as Buffer4 } from "node:buffer";
190902
+ import { Buffer as Buffer3 } from "node:buffer";
191531
190903
  var getValidateTransformInput = (writableObjectMode, optionName) => writableObjectMode ? undefined : validateStringTransformInput.bind(undefined, optionName);
191532
190904
  var validateStringTransformInput = function* (optionName, chunk) {
191533
- if (typeof chunk !== "string" && !isUint8Array(chunk) && !Buffer4.isBuffer(chunk)) {
190905
+ if (typeof chunk !== "string" && !isUint8Array(chunk) && !Buffer3.isBuffer(chunk)) {
191534
190906
  throw new TypeError(`The \`${optionName}\` option's transform must use "objectMode: true" to receive as input: ${typeof chunk}.`);
191535
190907
  }
191536
190908
  yield chunk;
@@ -191556,7 +190928,7 @@ Instead, \`yield\` should either be called with a value, or not be called at all
191556
190928
  };
191557
190929
 
191558
190930
  // node_modules/execa/lib/transform/encoding-transform.js
191559
- import { Buffer as Buffer5 } from "node:buffer";
190931
+ import { Buffer as Buffer4 } from "node:buffer";
191560
190932
  import { StringDecoder as StringDecoder3 } from "node:string_decoder";
191561
190933
  var getEncodingTransformGenerator = (binary, encoding, skipped) => {
191562
190934
  if (skipped) {
@@ -191572,7 +190944,7 @@ var getEncodingTransformGenerator = (binary, encoding, skipped) => {
191572
190944
  };
191573
190945
  };
191574
190946
  var encodingUint8ArrayGenerator = function* (textEncoder3, chunk) {
191575
- if (Buffer5.isBuffer(chunk)) {
190947
+ if (Buffer4.isBuffer(chunk)) {
191576
190948
  yield bufferToUint8Array(chunk);
191577
190949
  } else if (typeof chunk === "string") {
191578
190950
  yield textEncoder3.encode(chunk);
@@ -191889,13 +191261,13 @@ var logOutputSync = ({ serializedResult, fdNumber, state, verboseInfo, encoding,
191889
191261
  }
191890
191262
  };
191891
191263
  var writeToFiles = (serializedResult, stdioItems, outputFiles) => {
191892
- for (const { path: path17, append } of stdioItems.filter(({ type }) => FILE_TYPES.has(type))) {
191893
- const pathString = typeof path17 === "string" ? path17 : path17.toString();
191264
+ for (const { path: path16, append } of stdioItems.filter(({ type }) => FILE_TYPES.has(type))) {
191265
+ const pathString = typeof path16 === "string" ? path16 : path16.toString();
191894
191266
  if (append || outputFiles.has(pathString)) {
191895
- appendFileSync(path17, serializedResult);
191267
+ appendFileSync(path16, serializedResult);
191896
191268
  } else {
191897
191269
  outputFiles.add(pathString);
191898
- writeFileSync(path17, serializedResult);
191270
+ writeFileSync(path16, serializedResult);
191899
191271
  }
191900
191272
  }
191901
191273
  };
@@ -192114,7 +191486,7 @@ import { setMaxListeners } from "node:events";
192114
191486
  import { spawn } from "node:child_process";
192115
191487
 
192116
191488
  // node_modules/execa/lib/ipc/methods.js
192117
- import process19 from "node:process";
191489
+ import process12 from "node:process";
192118
191490
 
192119
191491
  // node_modules/execa/lib/ipc/get-one.js
192120
191492
  import { once as once6, on as on3 } from "node:events";
@@ -192253,9 +191625,9 @@ var addIpcMethods = (subprocess, { ipc }) => {
192253
191625
  Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
192254
191626
  };
192255
191627
  var getIpcExport = () => {
192256
- const anyProcess = process19;
191628
+ const anyProcess = process12;
192257
191629
  const isSubprocess = true;
192258
- const ipc = process19.channel !== undefined;
191630
+ const ipc = process12.channel !== undefined;
192259
191631
  return {
192260
191632
  ...getIpcMethods(anyProcess, isSubprocess, ipc),
192261
191633
  getCancelSignal: getCancelSignal.bind(undefined, {
@@ -192339,7 +191711,7 @@ var handleDummyPromise = async (error48, verboseInfo, options) => handleResult(e
192339
191711
 
192340
191712
  // node_modules/execa/lib/stdio/handle-async.js
192341
191713
  import { createReadStream, createWriteStream } from "node:fs";
192342
- import { Buffer as Buffer6 } from "node:buffer";
191714
+ import { Buffer as Buffer5 } from "node:buffer";
192343
191715
  import { Readable as Readable4, Writable as Writable2, Duplex as Duplex2 } from "node:stream";
192344
191716
  var handleStdioAsync = (options, verboseInfo) => handleStdio(addPropertiesAsync, options, verboseInfo, false);
192345
191717
  var forbiddenIfAsync = ({ type, optionName }) => {
@@ -192367,7 +191739,7 @@ var addPropertiesAsync = {
192367
191739
  iterable: ({ value }) => ({ stream: Readable4.from(value) }),
192368
191740
  asyncIterable: ({ value }) => ({ stream: Readable4.from(value) }),
192369
191741
  string: ({ value }) => ({ stream: Readable4.from(value) }),
192370
- uint8Array: ({ value }) => ({ stream: Readable4.from(Buffer6.from(value)) })
191742
+ uint8Array: ({ value }) => ({ stream: Readable4.from(Buffer5.from(value)) })
192371
191743
  },
192372
191744
  output: {
192373
191745
  ...addProperties2,
@@ -192483,7 +191855,7 @@ if (process.platform === "linux") {
192483
191855
  }
192484
191856
 
192485
191857
  // node_modules/signal-exit/dist/mjs/index.js
192486
- 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";
191858
+ 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";
192487
191859
  var kExitEmitter = Symbol.for("signal-exit emitter");
192488
191860
  var global2 = globalThis;
192489
191861
  var ObjectDefineProperty = Object.defineProperty.bind(Object);
@@ -192566,22 +191938,22 @@ class SignalExitFallback extends SignalExitBase {
192566
191938
  }
192567
191939
 
192568
191940
  class SignalExit extends SignalExitBase {
192569
- #hupSig = process20.platform === "win32" ? "SIGINT" : "SIGHUP";
191941
+ #hupSig = process13.platform === "win32" ? "SIGINT" : "SIGHUP";
192570
191942
  #emitter = new Emitter;
192571
191943
  #process;
192572
191944
  #originalProcessEmit;
192573
191945
  #originalProcessReallyExit;
192574
191946
  #sigListeners = {};
192575
191947
  #loaded = false;
192576
- constructor(process20) {
191948
+ constructor(process13) {
192577
191949
  super();
192578
- this.#process = process20;
191950
+ this.#process = process13;
192579
191951
  this.#sigListeners = {};
192580
191952
  for (const sig of signals) {
192581
191953
  this.#sigListeners[sig] = () => {
192582
191954
  const listeners = this.#process.listeners(sig);
192583
191955
  let { count: count2 } = this.#emitter;
192584
- const p2 = process20;
191956
+ const p2 = process13;
192585
191957
  if (typeof p2.__signal_exit_emitter__ === "object" && typeof p2.__signal_exit_emitter__.count === "number") {
192586
191958
  count2 += p2.__signal_exit_emitter__.count;
192587
191959
  }
@@ -192590,12 +191962,12 @@ class SignalExit extends SignalExitBase {
192590
191962
  const ret = this.#emitter.emit("exit", null, sig);
192591
191963
  const s = sig === "SIGHUP" ? this.#hupSig : sig;
192592
191964
  if (!ret)
192593
- process20.kill(process20.pid, s);
191965
+ process13.kill(process13.pid, s);
192594
191966
  }
192595
191967
  };
192596
191968
  }
192597
- this.#originalProcessReallyExit = process20.reallyExit;
192598
- this.#originalProcessEmit = process20.emit;
191969
+ this.#originalProcessReallyExit = process13.reallyExit;
191970
+ this.#originalProcessEmit = process13.emit;
192599
191971
  }
192600
191972
  onExit(cb, opts) {
192601
191973
  if (!processOk(this.#process)) {
@@ -192673,12 +192045,12 @@ class SignalExit extends SignalExitBase {
192673
192045
  }
192674
192046
  }
192675
192047
  }
192676
- var process20 = globalThis.process;
192048
+ var process13 = globalThis.process;
192677
192049
  var {
192678
192050
  onExit,
192679
192051
  load,
192680
192052
  unload
192681
- } = signalExitWrap(processOk(process20) ? new SignalExit(process20) : new SignalExitFallback);
192053
+ } = signalExitWrap(processOk(process13) ? new SignalExit(process13) : new SignalExitFallback);
192682
192054
 
192683
192055
  // node_modules/execa/lib/terminate/cleanup.js
192684
192056
  var cleanupOnExit = (subprocess, { cleanup, detached }, { signal }) => {
@@ -194298,6 +193670,612 @@ function getWhoamiCommand(context) {
194298
193670
  });
194299
193671
  }
194300
193672
 
193673
+ // node_modules/open/index.js
193674
+ import process20 from "node:process";
193675
+ import path16 from "node:path";
193676
+ import { fileURLToPath as fileURLToPath5 } from "node:url";
193677
+ import childProcess3 from "node:child_process";
193678
+ import fs19, { constants as fsConstants2 } from "node:fs/promises";
193679
+
193680
+ // node_modules/wsl-utils/index.js
193681
+ import { promisify as promisify6 } from "node:util";
193682
+ import childProcess2 from "node:child_process";
193683
+ import fs18, { constants as fsConstants } from "node:fs/promises";
193684
+
193685
+ // node_modules/is-wsl/index.js
193686
+ import process14 from "node:process";
193687
+ import os2 from "node:os";
193688
+ import fs17 from "node:fs";
193689
+
193690
+ // node_modules/is-inside-container/index.js
193691
+ import fs16 from "node:fs";
193692
+
193693
+ // node_modules/is-docker/index.js
193694
+ import fs15 from "node:fs";
193695
+ var isDockerCached;
193696
+ function hasDockerEnv() {
193697
+ try {
193698
+ fs15.statSync("/.dockerenv");
193699
+ return true;
193700
+ } catch {
193701
+ return false;
193702
+ }
193703
+ }
193704
+ function hasDockerCGroup() {
193705
+ try {
193706
+ return fs15.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
193707
+ } catch {
193708
+ return false;
193709
+ }
193710
+ }
193711
+ function isDocker() {
193712
+ if (isDockerCached === undefined) {
193713
+ isDockerCached = hasDockerEnv() || hasDockerCGroup();
193714
+ }
193715
+ return isDockerCached;
193716
+ }
193717
+
193718
+ // node_modules/is-inside-container/index.js
193719
+ var cachedResult;
193720
+ var hasContainerEnv = () => {
193721
+ try {
193722
+ fs16.statSync("/run/.containerenv");
193723
+ return true;
193724
+ } catch {
193725
+ return false;
193726
+ }
193727
+ };
193728
+ function isInsideContainer() {
193729
+ if (cachedResult === undefined) {
193730
+ cachedResult = hasContainerEnv() || isDocker();
193731
+ }
193732
+ return cachedResult;
193733
+ }
193734
+
193735
+ // node_modules/is-wsl/index.js
193736
+ var isWsl = () => {
193737
+ if (process14.platform !== "linux") {
193738
+ return false;
193739
+ }
193740
+ if (os2.release().toLowerCase().includes("microsoft")) {
193741
+ if (isInsideContainer()) {
193742
+ return false;
193743
+ }
193744
+ return true;
193745
+ }
193746
+ try {
193747
+ return fs17.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isInsideContainer() : false;
193748
+ } catch {
193749
+ return false;
193750
+ }
193751
+ };
193752
+ var is_wsl_default = process14.env.__IS_WSL_TEST__ ? isWsl : isWsl();
193753
+
193754
+ // node_modules/powershell-utils/index.js
193755
+ import process15 from "node:process";
193756
+ import { Buffer as Buffer6 } from "node:buffer";
193757
+ import { promisify as promisify5 } from "node:util";
193758
+ import childProcess from "node:child_process";
193759
+ var execFile = promisify5(childProcess.execFile);
193760
+ var powerShellPath = () => `${process15.env.SYSTEMROOT || process15.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
193761
+ var executePowerShell = async (command, options = {}) => {
193762
+ const {
193763
+ powerShellPath: psPath,
193764
+ ...execFileOptions
193765
+ } = options;
193766
+ const encodedCommand = executePowerShell.encodeCommand(command);
193767
+ return execFile(psPath ?? powerShellPath(), [
193768
+ ...executePowerShell.argumentsPrefix,
193769
+ encodedCommand
193770
+ ], {
193771
+ encoding: "utf8",
193772
+ ...execFileOptions
193773
+ });
193774
+ };
193775
+ executePowerShell.argumentsPrefix = [
193776
+ "-NoProfile",
193777
+ "-NonInteractive",
193778
+ "-ExecutionPolicy",
193779
+ "Bypass",
193780
+ "-EncodedCommand"
193781
+ ];
193782
+ executePowerShell.encodeCommand = (command) => Buffer6.from(command, "utf16le").toString("base64");
193783
+ executePowerShell.escapeArgument = (value) => `'${String(value).replaceAll("'", "''")}'`;
193784
+
193785
+ // node_modules/wsl-utils/utilities.js
193786
+ function parseMountPointFromConfig(content) {
193787
+ for (const line of content.split(`
193788
+ `)) {
193789
+ if (/^\s*#/.test(line)) {
193790
+ continue;
193791
+ }
193792
+ const match = /^\s*root\s*=\s*(?<mountPoint>"[^"]*"|'[^']*'|[^#]*)/.exec(line);
193793
+ if (!match) {
193794
+ continue;
193795
+ }
193796
+ return match.groups.mountPoint.trim().replaceAll(/^["']|["']$/g, "");
193797
+ }
193798
+ }
193799
+
193800
+ // node_modules/wsl-utils/index.js
193801
+ var execFile2 = promisify6(childProcess2.execFile);
193802
+ var wslDrivesMountPoint = (() => {
193803
+ const defaultMountPoint = "/mnt/";
193804
+ let mountPoint;
193805
+ return async function() {
193806
+ if (mountPoint) {
193807
+ return mountPoint;
193808
+ }
193809
+ const configFilePath = "/etc/wsl.conf";
193810
+ let isConfigFileExists = false;
193811
+ try {
193812
+ await fs18.access(configFilePath, fsConstants.F_OK);
193813
+ isConfigFileExists = true;
193814
+ } catch {}
193815
+ if (!isConfigFileExists) {
193816
+ return defaultMountPoint;
193817
+ }
193818
+ const configContent = await fs18.readFile(configFilePath, { encoding: "utf8" });
193819
+ const parsedMountPoint = parseMountPointFromConfig(configContent);
193820
+ if (parsedMountPoint === undefined) {
193821
+ return defaultMountPoint;
193822
+ }
193823
+ mountPoint = parsedMountPoint;
193824
+ mountPoint = mountPoint.endsWith("/") ? mountPoint : `${mountPoint}/`;
193825
+ return mountPoint;
193826
+ };
193827
+ })();
193828
+ var powerShellPathFromWsl = async () => {
193829
+ const mountPoint = await wslDrivesMountPoint();
193830
+ return `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`;
193831
+ };
193832
+ var powerShellPath2 = is_wsl_default ? powerShellPathFromWsl : powerShellPath;
193833
+ var canAccessPowerShellPromise;
193834
+ var canAccessPowerShell = async () => {
193835
+ canAccessPowerShellPromise ??= (async () => {
193836
+ try {
193837
+ const psPath = await powerShellPath2();
193838
+ await fs18.access(psPath, fsConstants.X_OK);
193839
+ return true;
193840
+ } catch {
193841
+ return false;
193842
+ }
193843
+ })();
193844
+ return canAccessPowerShellPromise;
193845
+ };
193846
+ var wslDefaultBrowser = async () => {
193847
+ const psPath = await powerShellPath2();
193848
+ const command = String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`;
193849
+ const { stdout } = await executePowerShell(command, { powerShellPath: psPath });
193850
+ return stdout.trim();
193851
+ };
193852
+ var convertWslPathToWindows = async (path16) => {
193853
+ if (/^[a-z]+:\/\//i.test(path16)) {
193854
+ return path16;
193855
+ }
193856
+ try {
193857
+ const { stdout } = await execFile2("wslpath", ["-aw", path16], { encoding: "utf8" });
193858
+ return stdout.trim();
193859
+ } catch {
193860
+ return path16;
193861
+ }
193862
+ };
193863
+
193864
+ // node_modules/define-lazy-prop/index.js
193865
+ function defineLazyProperty(object2, propertyName, valueGetter) {
193866
+ const define2 = (value) => Object.defineProperty(object2, propertyName, { value, enumerable: true, writable: true });
193867
+ Object.defineProperty(object2, propertyName, {
193868
+ configurable: true,
193869
+ enumerable: true,
193870
+ get() {
193871
+ const result = valueGetter();
193872
+ define2(result);
193873
+ return result;
193874
+ },
193875
+ set(value) {
193876
+ define2(value);
193877
+ }
193878
+ });
193879
+ return object2;
193880
+ }
193881
+
193882
+ // node_modules/default-browser/index.js
193883
+ import { promisify as promisify10 } from "node:util";
193884
+ import process18 from "node:process";
193885
+ import { execFile as execFile6 } from "node:child_process";
193886
+
193887
+ // node_modules/default-browser-id/index.js
193888
+ import { promisify as promisify7 } from "node:util";
193889
+ import process16 from "node:process";
193890
+ import { execFile as execFile3 } from "node:child_process";
193891
+ var execFileAsync = promisify7(execFile3);
193892
+ async function defaultBrowserId() {
193893
+ if (process16.platform !== "darwin") {
193894
+ throw new Error("macOS only");
193895
+ }
193896
+ const { stdout } = await execFileAsync("defaults", ["read", "com.apple.LaunchServices/com.apple.launchservices.secure", "LSHandlers"]);
193897
+ const match = /LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout);
193898
+ const browserId = match?.groups.id ?? "com.apple.Safari";
193899
+ if (browserId === "com.apple.safari") {
193900
+ return "com.apple.Safari";
193901
+ }
193902
+ return browserId;
193903
+ }
193904
+
193905
+ // node_modules/run-applescript/index.js
193906
+ import process17 from "node:process";
193907
+ import { promisify as promisify8 } from "node:util";
193908
+ import { execFile as execFile4, execFileSync } from "node:child_process";
193909
+ var execFileAsync2 = promisify8(execFile4);
193910
+ async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {
193911
+ if (process17.platform !== "darwin") {
193912
+ throw new Error("macOS only");
193913
+ }
193914
+ const outputArguments = humanReadableOutput ? [] : ["-ss"];
193915
+ const execOptions = {};
193916
+ if (signal) {
193917
+ execOptions.signal = signal;
193918
+ }
193919
+ const { stdout } = await execFileAsync2("osascript", ["-e", script, outputArguments], execOptions);
193920
+ return stdout.trim();
193921
+ }
193922
+
193923
+ // node_modules/bundle-name/index.js
193924
+ async function bundleName(bundleId) {
193925
+ return runAppleScript(`tell application "Finder" to set app_path to application file id "${bundleId}" as string
193926
+ tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`);
193927
+ }
193928
+
193929
+ // node_modules/default-browser/windows.js
193930
+ import { promisify as promisify9 } from "node:util";
193931
+ import { execFile as execFile5 } from "node:child_process";
193932
+ var execFileAsync3 = promisify9(execFile5);
193933
+ var windowsBrowserProgIds = {
193934
+ MSEdgeHTM: { name: "Edge", id: "com.microsoft.edge" },
193935
+ MSEdgeBHTML: { name: "Edge Beta", id: "com.microsoft.edge.beta" },
193936
+ MSEdgeDHTML: { name: "Edge Dev", id: "com.microsoft.edge.dev" },
193937
+ AppXq0fevzme2pys62n3e0fbqa7peapykr8v: { name: "Edge", id: "com.microsoft.edge.old" },
193938
+ ChromeHTML: { name: "Chrome", id: "com.google.chrome" },
193939
+ ChromeBHTML: { name: "Chrome Beta", id: "com.google.chrome.beta" },
193940
+ ChromeDHTML: { name: "Chrome Dev", id: "com.google.chrome.dev" },
193941
+ ChromiumHTM: { name: "Chromium", id: "org.chromium.Chromium" },
193942
+ BraveHTML: { name: "Brave", id: "com.brave.Browser" },
193943
+ BraveBHTML: { name: "Brave Beta", id: "com.brave.Browser.beta" },
193944
+ BraveDHTML: { name: "Brave Dev", id: "com.brave.Browser.dev" },
193945
+ BraveSSHTM: { name: "Brave Nightly", id: "com.brave.Browser.nightly" },
193946
+ FirefoxURL: { name: "Firefox", id: "org.mozilla.firefox" },
193947
+ OperaStable: { name: "Opera", id: "com.operasoftware.Opera" },
193948
+ VivaldiHTM: { name: "Vivaldi", id: "com.vivaldi.Vivaldi" },
193949
+ "IE.HTTP": { name: "Internet Explorer", id: "com.microsoft.ie" }
193950
+ };
193951
+ var _windowsBrowserProgIdMap = new Map(Object.entries(windowsBrowserProgIds));
193952
+
193953
+ class UnknownBrowserError extends Error {
193954
+ }
193955
+ async function defaultBrowser(_execFileAsync = execFileAsync3) {
193956
+ const { stdout } = await _execFileAsync("reg", [
193957
+ "QUERY",
193958
+ " HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice",
193959
+ "/v",
193960
+ "ProgId"
193961
+ ]);
193962
+ const match = /ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(stdout);
193963
+ if (!match) {
193964
+ throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);
193965
+ }
193966
+ const { id } = match.groups;
193967
+ const dotIndex = id.lastIndexOf(".");
193968
+ const hyphenIndex = id.lastIndexOf("-");
193969
+ const baseIdByDot = dotIndex === -1 ? undefined : id.slice(0, dotIndex);
193970
+ const baseIdByHyphen = hyphenIndex === -1 ? undefined : id.slice(0, hyphenIndex);
193971
+ return windowsBrowserProgIds[id] ?? windowsBrowserProgIds[baseIdByDot] ?? windowsBrowserProgIds[baseIdByHyphen] ?? { name: id, id };
193972
+ }
193973
+
193974
+ // node_modules/default-browser/index.js
193975
+ var execFileAsync4 = promisify10(execFile6);
193976
+ var titleize = (string4) => string4.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x2) => x2.toUpperCase());
193977
+ async function defaultBrowser2() {
193978
+ if (process18.platform === "darwin") {
193979
+ const id = await defaultBrowserId();
193980
+ const name2 = await bundleName(id);
193981
+ return { name: name2, id };
193982
+ }
193983
+ if (process18.platform === "linux") {
193984
+ const { stdout } = await execFileAsync4("xdg-mime", ["query", "default", "x-scheme-handler/http"]);
193985
+ const id = stdout.trim();
193986
+ const name2 = titleize(id.replace(/.desktop$/, "").replace("-", " "));
193987
+ return { name: name2, id };
193988
+ }
193989
+ if (process18.platform === "win32") {
193990
+ return defaultBrowser();
193991
+ }
193992
+ throw new Error("Only macOS, Linux, and Windows are supported");
193993
+ }
193994
+
193995
+ // node_modules/is-in-ssh/index.js
193996
+ import process19 from "node:process";
193997
+ var isInSsh = Boolean(process19.env.SSH_CONNECTION || process19.env.SSH_CLIENT || process19.env.SSH_TTY);
193998
+ var is_in_ssh_default = isInSsh;
193999
+
194000
+ // node_modules/open/index.js
194001
+ var fallbackAttemptSymbol = Symbol("fallbackAttempt");
194002
+ var __dirname3 = import.meta.url ? path16.dirname(fileURLToPath5(import.meta.url)) : "";
194003
+ var localXdgOpenPath = path16.join(__dirname3, "xdg-open");
194004
+ var { platform: platform6, arch } = process20;
194005
+ var tryEachApp = async (apps, opener) => {
194006
+ if (apps.length === 0) {
194007
+ return;
194008
+ }
194009
+ const errors4 = [];
194010
+ for (const app of apps) {
194011
+ try {
194012
+ return await opener(app);
194013
+ } catch (error48) {
194014
+ errors4.push(error48);
194015
+ }
194016
+ }
194017
+ throw new AggregateError(errors4, "Failed to open in all supported apps");
194018
+ };
194019
+ var baseOpen = async (options) => {
194020
+ options = {
194021
+ wait: false,
194022
+ background: false,
194023
+ newInstance: false,
194024
+ allowNonzeroExitCode: false,
194025
+ ...options
194026
+ };
194027
+ const isFallbackAttempt = options[fallbackAttemptSymbol] === true;
194028
+ delete options[fallbackAttemptSymbol];
194029
+ if (Array.isArray(options.app)) {
194030
+ return tryEachApp(options.app, (singleApp) => baseOpen({
194031
+ ...options,
194032
+ app: singleApp,
194033
+ [fallbackAttemptSymbol]: true
194034
+ }));
194035
+ }
194036
+ let { name: app, arguments: appArguments = [] } = options.app ?? {};
194037
+ appArguments = [...appArguments];
194038
+ if (Array.isArray(app)) {
194039
+ return tryEachApp(app, (appName) => baseOpen({
194040
+ ...options,
194041
+ app: {
194042
+ name: appName,
194043
+ arguments: appArguments
194044
+ },
194045
+ [fallbackAttemptSymbol]: true
194046
+ }));
194047
+ }
194048
+ if (app === "browser" || app === "browserPrivate") {
194049
+ const ids = {
194050
+ "com.google.chrome": "chrome",
194051
+ "google-chrome.desktop": "chrome",
194052
+ "com.brave.browser": "brave",
194053
+ "org.mozilla.firefox": "firefox",
194054
+ "firefox.desktop": "firefox",
194055
+ "com.microsoft.msedge": "edge",
194056
+ "com.microsoft.edge": "edge",
194057
+ "com.microsoft.edgemac": "edge",
194058
+ "microsoft-edge.desktop": "edge",
194059
+ "com.apple.safari": "safari"
194060
+ };
194061
+ const flags = {
194062
+ chrome: "--incognito",
194063
+ brave: "--incognito",
194064
+ firefox: "--private-window",
194065
+ edge: "--inPrivate"
194066
+ };
194067
+ let browser;
194068
+ if (is_wsl_default) {
194069
+ const progId = await wslDefaultBrowser();
194070
+ const browserInfo = _windowsBrowserProgIdMap.get(progId);
194071
+ browser = browserInfo ?? {};
194072
+ } else {
194073
+ browser = await defaultBrowser2();
194074
+ }
194075
+ if (browser.id in ids) {
194076
+ const browserName = ids[browser.id.toLowerCase()];
194077
+ if (app === "browserPrivate") {
194078
+ if (browserName === "safari") {
194079
+ throw new Error("Safari doesn't support opening in private mode via command line");
194080
+ }
194081
+ appArguments.push(flags[browserName]);
194082
+ }
194083
+ return baseOpen({
194084
+ ...options,
194085
+ app: {
194086
+ name: apps[browserName],
194087
+ arguments: appArguments
194088
+ }
194089
+ });
194090
+ }
194091
+ throw new Error(`${browser.name} is not supported as a default browser`);
194092
+ }
194093
+ let command;
194094
+ const cliArguments = [];
194095
+ const childProcessOptions = {};
194096
+ let shouldUseWindowsInWsl = false;
194097
+ if (is_wsl_default && !isInsideContainer() && !is_in_ssh_default && !app) {
194098
+ shouldUseWindowsInWsl = await canAccessPowerShell();
194099
+ }
194100
+ if (platform6 === "darwin") {
194101
+ command = "open";
194102
+ if (options.wait) {
194103
+ cliArguments.push("--wait-apps");
194104
+ }
194105
+ if (options.background) {
194106
+ cliArguments.push("--background");
194107
+ }
194108
+ if (options.newInstance) {
194109
+ cliArguments.push("--new");
194110
+ }
194111
+ if (app) {
194112
+ cliArguments.push("-a", app);
194113
+ }
194114
+ } else if (platform6 === "win32" || shouldUseWindowsInWsl) {
194115
+ command = await powerShellPath2();
194116
+ cliArguments.push(...executePowerShell.argumentsPrefix);
194117
+ if (!is_wsl_default) {
194118
+ childProcessOptions.windowsVerbatimArguments = true;
194119
+ }
194120
+ if (is_wsl_default && options.target) {
194121
+ options.target = await convertWslPathToWindows(options.target);
194122
+ }
194123
+ const encodedArguments = ["$ProgressPreference = 'SilentlyContinue';", "Start"];
194124
+ if (options.wait) {
194125
+ encodedArguments.push("-Wait");
194126
+ }
194127
+ if (app) {
194128
+ encodedArguments.push(executePowerShell.escapeArgument(app));
194129
+ if (options.target) {
194130
+ appArguments.push(options.target);
194131
+ }
194132
+ } else if (options.target) {
194133
+ encodedArguments.push(executePowerShell.escapeArgument(options.target));
194134
+ }
194135
+ if (appArguments.length > 0) {
194136
+ appArguments = appArguments.map((argument) => executePowerShell.escapeArgument(argument));
194137
+ encodedArguments.push("-ArgumentList", appArguments.join(","));
194138
+ }
194139
+ options.target = executePowerShell.encodeCommand(encodedArguments.join(" "));
194140
+ if (!options.wait) {
194141
+ childProcessOptions.stdio = "ignore";
194142
+ }
194143
+ } else {
194144
+ if (app) {
194145
+ command = app;
194146
+ } else {
194147
+ const isBundled = !__dirname3 || __dirname3 === "/";
194148
+ let exeLocalXdgOpen = false;
194149
+ try {
194150
+ await fs19.access(localXdgOpenPath, fsConstants2.X_OK);
194151
+ exeLocalXdgOpen = true;
194152
+ } catch {}
194153
+ const useSystemXdgOpen = process20.versions.electron ?? (platform6 === "android" || isBundled || !exeLocalXdgOpen);
194154
+ command = useSystemXdgOpen ? "xdg-open" : localXdgOpenPath;
194155
+ }
194156
+ if (appArguments.length > 0) {
194157
+ cliArguments.push(...appArguments);
194158
+ }
194159
+ if (!options.wait) {
194160
+ childProcessOptions.stdio = "ignore";
194161
+ childProcessOptions.detached = true;
194162
+ }
194163
+ }
194164
+ if (platform6 === "darwin" && appArguments.length > 0) {
194165
+ cliArguments.push("--args", ...appArguments);
194166
+ }
194167
+ if (options.target) {
194168
+ cliArguments.push(options.target);
194169
+ }
194170
+ const subprocess = childProcess3.spawn(command, cliArguments, childProcessOptions);
194171
+ if (options.wait) {
194172
+ return new Promise((resolve2, reject) => {
194173
+ subprocess.once("error", reject);
194174
+ subprocess.once("close", (exitCode) => {
194175
+ if (!options.allowNonzeroExitCode && exitCode !== 0) {
194176
+ reject(new Error(`Exited with code ${exitCode}`));
194177
+ return;
194178
+ }
194179
+ resolve2(subprocess);
194180
+ });
194181
+ });
194182
+ }
194183
+ if (isFallbackAttempt) {
194184
+ return new Promise((resolve2, reject) => {
194185
+ subprocess.once("error", reject);
194186
+ subprocess.once("spawn", () => {
194187
+ subprocess.once("close", (exitCode) => {
194188
+ subprocess.off("error", reject);
194189
+ if (exitCode !== 0) {
194190
+ reject(new Error(`Exited with code ${exitCode}`));
194191
+ return;
194192
+ }
194193
+ subprocess.unref();
194194
+ resolve2(subprocess);
194195
+ });
194196
+ });
194197
+ });
194198
+ }
194199
+ subprocess.unref();
194200
+ return new Promise((resolve2, reject) => {
194201
+ subprocess.once("error", reject);
194202
+ subprocess.once("spawn", () => {
194203
+ subprocess.off("error", reject);
194204
+ resolve2(subprocess);
194205
+ });
194206
+ });
194207
+ };
194208
+ var open = (target, options) => {
194209
+ if (typeof target !== "string") {
194210
+ throw new TypeError("Expected a `target`");
194211
+ }
194212
+ return baseOpen({
194213
+ ...options,
194214
+ target
194215
+ });
194216
+ };
194217
+ function detectArchBinary(binary) {
194218
+ if (typeof binary === "string" || Array.isArray(binary)) {
194219
+ return binary;
194220
+ }
194221
+ const { [arch]: archBinary } = binary;
194222
+ if (!archBinary) {
194223
+ throw new Error(`${arch} is not supported`);
194224
+ }
194225
+ return archBinary;
194226
+ }
194227
+ function detectPlatformBinary({ [platform6]: platformBinary }, { wsl } = {}) {
194228
+ if (wsl && is_wsl_default) {
194229
+ return detectArchBinary(wsl);
194230
+ }
194231
+ if (!platformBinary) {
194232
+ throw new Error(`${platform6} is not supported`);
194233
+ }
194234
+ return detectArchBinary(platformBinary);
194235
+ }
194236
+ var apps = {
194237
+ browser: "browser",
194238
+ browserPrivate: "browserPrivate"
194239
+ };
194240
+ defineLazyProperty(apps, "chrome", () => detectPlatformBinary({
194241
+ darwin: "google chrome",
194242
+ win32: "chrome",
194243
+ linux: ["google-chrome", "google-chrome-stable", "chromium", "chromium-browser"]
194244
+ }, {
194245
+ wsl: {
194246
+ ia32: "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",
194247
+ x64: ["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe", "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]
194248
+ }
194249
+ }));
194250
+ defineLazyProperty(apps, "brave", () => detectPlatformBinary({
194251
+ darwin: "brave browser",
194252
+ win32: "brave",
194253
+ linux: ["brave-browser", "brave"]
194254
+ }, {
194255
+ wsl: {
194256
+ ia32: "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe",
194257
+ x64: ["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe", "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"]
194258
+ }
194259
+ }));
194260
+ defineLazyProperty(apps, "firefox", () => detectPlatformBinary({
194261
+ darwin: "firefox",
194262
+ win32: String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,
194263
+ linux: "firefox"
194264
+ }, {
194265
+ wsl: "/mnt/c/Program Files/Mozilla Firefox/firefox.exe"
194266
+ }));
194267
+ defineLazyProperty(apps, "edge", () => detectPlatformBinary({
194268
+ darwin: "microsoft edge",
194269
+ win32: "msedge",
194270
+ linux: ["microsoft-edge", "microsoft-edge-dev"]
194271
+ }, {
194272
+ wsl: "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
194273
+ }));
194274
+ defineLazyProperty(apps, "safari", () => detectPlatformBinary({
194275
+ darwin: "Safari"
194276
+ }));
194277
+ var open_default = open;
194278
+
194301
194279
  // src/cli/commands/connectors/push.ts
194302
194280
  function isPendingOAuth(r2) {
194303
194281
  return r2.action === "needs_oauth" && !!r2.redirectUrl && !!r2.connectionId;
@@ -194375,17 +194353,28 @@ async function pushConnectorsAction() {
194375
194353
  for (const connector2 of needsOAuth) {
194376
194354
  M2.info(`
194377
194355
  Opening browser for ${connector2.type}...`);
194378
- const oauthResult = await runTask(`Waiting for ${connector2.type} authorization...`, async () => {
194379
- return await runOAuthFlow({
194380
- type: connector2.type,
194381
- redirectUrl: connector2.redirectUrl,
194382
- connectionId: connector2.connectionId
194356
+ await open_default(connector2.redirectUrl);
194357
+ let finalStatus = "PENDING";
194358
+ await runTask(`Waiting for ${connector2.type} authorization...`, async () => {
194359
+ await pWaitFor(async () => {
194360
+ const response = await getOAuthStatus(connector2.type, connector2.connectionId);
194361
+ finalStatus = response.status;
194362
+ return response.status !== "PENDING";
194363
+ }, {
194364
+ interval: 2000,
194365
+ timeout: 2 * 60 * 1000
194383
194366
  });
194384
194367
  }, {
194385
194368
  successMessage: `${connector2.type} authorization complete`,
194386
194369
  errorMessage: `${connector2.type} authorization failed`
194370
+ }).catch((err) => {
194371
+ if (err instanceof TimeoutError2) {
194372
+ finalStatus = "PENDING";
194373
+ } else {
194374
+ throw err;
194375
+ }
194387
194376
  });
194388
- oauthOutcomes.set(connector2.type, oauthResult.status);
194377
+ oauthOutcomes.set(connector2.type, finalStatus);
194389
194378
  }
194390
194379
  }
194391
194380
  }
@@ -199612,4 +199601,4 @@ export {
199612
199601
  CLIExitError
199613
199602
  };
199614
199603
 
199615
- //# debugId=6A2F33ABCD42DE0264756E2164756E21
199604
+ //# debugId=747B6136C48A11DE64756E2164756E21