@base44-preview/cli 0.0.31-pr.211.9ebde2a → 0.0.31-pr.211.cb90710
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 +911 -885
- package/dist/cli/index.js.map +21 -22
- package/package.json +1 -1
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
|
|
8887
|
-
var
|
|
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 =
|
|
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 =
|
|
8919
|
-
var extname =
|
|
8920
|
-
var 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
|
|
8932
|
+
return fs14.existsSync(filePath);
|
|
8933
8933
|
})) {
|
|
8934
8934
|
return filePath;
|
|
8935
8935
|
}
|
|
8936
8936
|
}
|
|
8937
|
-
function getIncludePath(
|
|
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(
|
|
8941
|
+
var match = /^[A-Za-z]+:\\|^\//.exec(path12);
|
|
8942
8942
|
if (match && match.length) {
|
|
8943
|
-
|
|
8943
|
+
path12 = path12.replace(/^\/*/, "");
|
|
8944
8944
|
if (Array.isArray(options.root)) {
|
|
8945
|
-
includePath = resolvePaths(
|
|
8945
|
+
includePath = resolvePaths(path12, options.root);
|
|
8946
8946
|
} else {
|
|
8947
|
-
includePath = exports.resolveInclude(
|
|
8947
|
+
includePath = exports.resolveInclude(path12, options.root || "/", true);
|
|
8948
8948
|
}
|
|
8949
8949
|
} else {
|
|
8950
8950
|
if (options.filename) {
|
|
8951
|
-
filePath = exports.resolveInclude(
|
|
8952
|
-
if (
|
|
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(
|
|
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(
|
|
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(
|
|
9019
|
+
function includeFile(path12, options) {
|
|
9020
9020
|
var opts = utils.shallowCopy(utils.createNullProtoObjWherePossible(), options);
|
|
9021
|
-
opts.filename = getIncludePath(
|
|
9021
|
+
opts.filename = getIncludePath(path12, opts);
|
|
9022
9022
|
if (typeof options.includer === "function") {
|
|
9023
|
-
var includerResult = options.includer(
|
|
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
|
|
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,
|
|
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(
|
|
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(
|
|
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 =
|
|
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
|
|
12286
|
-
var pattern = "^(" + optionalByteOrderMark + "(= yaml =|---)" + "$([\\s\\S]*?)" + "^(?:\\2|\\.\\.\\.)\\s*" + "$" + (
|
|
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
|
|
12353
|
-
function checkPathExt(
|
|
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 &&
|
|
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,
|
|
12370
|
+
function checkStat(stat, path11, options) {
|
|
12371
12371
|
if (!stat.isSymbolicLink() && !stat.isFile()) {
|
|
12372
12372
|
return false;
|
|
12373
12373
|
}
|
|
12374
|
-
return checkPathExt(
|
|
12374
|
+
return checkPathExt(path11, options);
|
|
12375
12375
|
}
|
|
12376
|
-
function isexe(
|
|
12377
|
-
|
|
12378
|
-
cb(er, er ? false : checkStat(stat,
|
|
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(
|
|
12382
|
-
return checkStat(
|
|
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
|
|
12391
|
-
function isexe(
|
|
12392
|
-
|
|
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(
|
|
12397
|
-
return checkStat(
|
|
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
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
12457
|
+
function sync(path11, options) {
|
|
12458
12458
|
try {
|
|
12459
|
-
return core2.sync(
|
|
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
|
|
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 =
|
|
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 =
|
|
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
|
|
12566
|
-
if (
|
|
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
|
|
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 ?
|
|
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 =
|
|
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 [
|
|
12648
|
-
const binary =
|
|
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
|
|
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 =
|
|
12666
|
-
|
|
12667
|
-
|
|
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
|
|
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 =
|
|
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(" ");
|
|
@@ -185233,729 +185233,6 @@ function assertNoDuplicateConnectors(connectors) {
|
|
|
185233
185233
|
types.add(connector.type);
|
|
185234
185234
|
}
|
|
185235
185235
|
}
|
|
185236
|
-
// node_modules/open/index.js
|
|
185237
|
-
import process11 from "node:process";
|
|
185238
|
-
import path11 from "node:path";
|
|
185239
|
-
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
185240
|
-
import childProcess3 from "node:child_process";
|
|
185241
|
-
import fs18, { constants as fsConstants2 } from "node:fs/promises";
|
|
185242
|
-
|
|
185243
|
-
// node_modules/wsl-utils/index.js
|
|
185244
|
-
import { promisify as promisify4 } from "node:util";
|
|
185245
|
-
import childProcess2 from "node:child_process";
|
|
185246
|
-
import fs17, { constants as fsConstants } from "node:fs/promises";
|
|
185247
|
-
|
|
185248
|
-
// node_modules/is-wsl/index.js
|
|
185249
|
-
import process5 from "node:process";
|
|
185250
|
-
import os from "node:os";
|
|
185251
|
-
import fs16 from "node:fs";
|
|
185252
|
-
|
|
185253
|
-
// node_modules/is-inside-container/index.js
|
|
185254
|
-
import fs15 from "node:fs";
|
|
185255
|
-
|
|
185256
|
-
// node_modules/is-docker/index.js
|
|
185257
|
-
import fs14 from "node:fs";
|
|
185258
|
-
var isDockerCached;
|
|
185259
|
-
function hasDockerEnv() {
|
|
185260
|
-
try {
|
|
185261
|
-
fs14.statSync("/.dockerenv");
|
|
185262
|
-
return true;
|
|
185263
|
-
} catch {
|
|
185264
|
-
return false;
|
|
185265
|
-
}
|
|
185266
|
-
}
|
|
185267
|
-
function hasDockerCGroup() {
|
|
185268
|
-
try {
|
|
185269
|
-
return fs14.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
|
|
185270
|
-
} catch {
|
|
185271
|
-
return false;
|
|
185272
|
-
}
|
|
185273
|
-
}
|
|
185274
|
-
function isDocker() {
|
|
185275
|
-
if (isDockerCached === undefined) {
|
|
185276
|
-
isDockerCached = hasDockerEnv() || hasDockerCGroup();
|
|
185277
|
-
}
|
|
185278
|
-
return isDockerCached;
|
|
185279
|
-
}
|
|
185280
|
-
|
|
185281
|
-
// node_modules/is-inside-container/index.js
|
|
185282
|
-
var cachedResult;
|
|
185283
|
-
var hasContainerEnv = () => {
|
|
185284
|
-
try {
|
|
185285
|
-
fs15.statSync("/run/.containerenv");
|
|
185286
|
-
return true;
|
|
185287
|
-
} catch {
|
|
185288
|
-
return false;
|
|
185289
|
-
}
|
|
185290
|
-
};
|
|
185291
|
-
function isInsideContainer() {
|
|
185292
|
-
if (cachedResult === undefined) {
|
|
185293
|
-
cachedResult = hasContainerEnv() || isDocker();
|
|
185294
|
-
}
|
|
185295
|
-
return cachedResult;
|
|
185296
|
-
}
|
|
185297
|
-
|
|
185298
|
-
// node_modules/is-wsl/index.js
|
|
185299
|
-
var isWsl = () => {
|
|
185300
|
-
if (process5.platform !== "linux") {
|
|
185301
|
-
return false;
|
|
185302
|
-
}
|
|
185303
|
-
if (os.release().toLowerCase().includes("microsoft")) {
|
|
185304
|
-
if (isInsideContainer()) {
|
|
185305
|
-
return false;
|
|
185306
|
-
}
|
|
185307
|
-
return true;
|
|
185308
|
-
}
|
|
185309
|
-
try {
|
|
185310
|
-
return fs16.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isInsideContainer() : false;
|
|
185311
|
-
} catch {
|
|
185312
|
-
return false;
|
|
185313
|
-
}
|
|
185314
|
-
};
|
|
185315
|
-
var is_wsl_default = process5.env.__IS_WSL_TEST__ ? isWsl : isWsl();
|
|
185316
|
-
|
|
185317
|
-
// node_modules/powershell-utils/index.js
|
|
185318
|
-
import process6 from "node:process";
|
|
185319
|
-
import { Buffer as Buffer3 } from "node:buffer";
|
|
185320
|
-
import { promisify as promisify3 } from "node:util";
|
|
185321
|
-
import childProcess from "node:child_process";
|
|
185322
|
-
var execFile = promisify3(childProcess.execFile);
|
|
185323
|
-
var powerShellPath = () => `${process6.env.SYSTEMROOT || process6.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
|
|
185324
|
-
var executePowerShell = async (command, options = {}) => {
|
|
185325
|
-
const {
|
|
185326
|
-
powerShellPath: psPath,
|
|
185327
|
-
...execFileOptions
|
|
185328
|
-
} = options;
|
|
185329
|
-
const encodedCommand = executePowerShell.encodeCommand(command);
|
|
185330
|
-
return execFile(psPath ?? powerShellPath(), [
|
|
185331
|
-
...executePowerShell.argumentsPrefix,
|
|
185332
|
-
encodedCommand
|
|
185333
|
-
], {
|
|
185334
|
-
encoding: "utf8",
|
|
185335
|
-
...execFileOptions
|
|
185336
|
-
});
|
|
185337
|
-
};
|
|
185338
|
-
executePowerShell.argumentsPrefix = [
|
|
185339
|
-
"-NoProfile",
|
|
185340
|
-
"-NonInteractive",
|
|
185341
|
-
"-ExecutionPolicy",
|
|
185342
|
-
"Bypass",
|
|
185343
|
-
"-EncodedCommand"
|
|
185344
|
-
];
|
|
185345
|
-
executePowerShell.encodeCommand = (command) => Buffer3.from(command, "utf16le").toString("base64");
|
|
185346
|
-
executePowerShell.escapeArgument = (value) => `'${String(value).replaceAll("'", "''")}'`;
|
|
185347
|
-
|
|
185348
|
-
// node_modules/wsl-utils/utilities.js
|
|
185349
|
-
function parseMountPointFromConfig(content) {
|
|
185350
|
-
for (const line of content.split(`
|
|
185351
|
-
`)) {
|
|
185352
|
-
if (/^\s*#/.test(line)) {
|
|
185353
|
-
continue;
|
|
185354
|
-
}
|
|
185355
|
-
const match = /^\s*root\s*=\s*(?<mountPoint>"[^"]*"|'[^']*'|[^#]*)/.exec(line);
|
|
185356
|
-
if (!match) {
|
|
185357
|
-
continue;
|
|
185358
|
-
}
|
|
185359
|
-
return match.groups.mountPoint.trim().replaceAll(/^["']|["']$/g, "");
|
|
185360
|
-
}
|
|
185361
|
-
}
|
|
185362
|
-
|
|
185363
|
-
// node_modules/wsl-utils/index.js
|
|
185364
|
-
var execFile2 = promisify4(childProcess2.execFile);
|
|
185365
|
-
var wslDrivesMountPoint = (() => {
|
|
185366
|
-
const defaultMountPoint = "/mnt/";
|
|
185367
|
-
let mountPoint;
|
|
185368
|
-
return async function() {
|
|
185369
|
-
if (mountPoint) {
|
|
185370
|
-
return mountPoint;
|
|
185371
|
-
}
|
|
185372
|
-
const configFilePath = "/etc/wsl.conf";
|
|
185373
|
-
let isConfigFileExists = false;
|
|
185374
|
-
try {
|
|
185375
|
-
await fs17.access(configFilePath, fsConstants.F_OK);
|
|
185376
|
-
isConfigFileExists = true;
|
|
185377
|
-
} catch {}
|
|
185378
|
-
if (!isConfigFileExists) {
|
|
185379
|
-
return defaultMountPoint;
|
|
185380
|
-
}
|
|
185381
|
-
const configContent = await fs17.readFile(configFilePath, { encoding: "utf8" });
|
|
185382
|
-
const parsedMountPoint = parseMountPointFromConfig(configContent);
|
|
185383
|
-
if (parsedMountPoint === undefined) {
|
|
185384
|
-
return defaultMountPoint;
|
|
185385
|
-
}
|
|
185386
|
-
mountPoint = parsedMountPoint;
|
|
185387
|
-
mountPoint = mountPoint.endsWith("/") ? mountPoint : `${mountPoint}/`;
|
|
185388
|
-
return mountPoint;
|
|
185389
|
-
};
|
|
185390
|
-
})();
|
|
185391
|
-
var powerShellPathFromWsl = async () => {
|
|
185392
|
-
const mountPoint = await wslDrivesMountPoint();
|
|
185393
|
-
return `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`;
|
|
185394
|
-
};
|
|
185395
|
-
var powerShellPath2 = is_wsl_default ? powerShellPathFromWsl : powerShellPath;
|
|
185396
|
-
var canAccessPowerShellPromise;
|
|
185397
|
-
var canAccessPowerShell = async () => {
|
|
185398
|
-
canAccessPowerShellPromise ??= (async () => {
|
|
185399
|
-
try {
|
|
185400
|
-
const psPath = await powerShellPath2();
|
|
185401
|
-
await fs17.access(psPath, fsConstants.X_OK);
|
|
185402
|
-
return true;
|
|
185403
|
-
} catch {
|
|
185404
|
-
return false;
|
|
185405
|
-
}
|
|
185406
|
-
})();
|
|
185407
|
-
return canAccessPowerShellPromise;
|
|
185408
|
-
};
|
|
185409
|
-
var wslDefaultBrowser = async () => {
|
|
185410
|
-
const psPath = await powerShellPath2();
|
|
185411
|
-
const command = String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`;
|
|
185412
|
-
const { stdout } = await executePowerShell(command, { powerShellPath: psPath });
|
|
185413
|
-
return stdout.trim();
|
|
185414
|
-
};
|
|
185415
|
-
var convertWslPathToWindows = async (path11) => {
|
|
185416
|
-
if (/^[a-z]+:\/\//i.test(path11)) {
|
|
185417
|
-
return path11;
|
|
185418
|
-
}
|
|
185419
|
-
try {
|
|
185420
|
-
const { stdout } = await execFile2("wslpath", ["-aw", path11], { encoding: "utf8" });
|
|
185421
|
-
return stdout.trim();
|
|
185422
|
-
} catch {
|
|
185423
|
-
return path11;
|
|
185424
|
-
}
|
|
185425
|
-
};
|
|
185426
|
-
|
|
185427
|
-
// node_modules/define-lazy-prop/index.js
|
|
185428
|
-
function defineLazyProperty(object2, propertyName, valueGetter) {
|
|
185429
|
-
const define2 = (value) => Object.defineProperty(object2, propertyName, { value, enumerable: true, writable: true });
|
|
185430
|
-
Object.defineProperty(object2, propertyName, {
|
|
185431
|
-
configurable: true,
|
|
185432
|
-
enumerable: true,
|
|
185433
|
-
get() {
|
|
185434
|
-
const result = valueGetter();
|
|
185435
|
-
define2(result);
|
|
185436
|
-
return result;
|
|
185437
|
-
},
|
|
185438
|
-
set(value) {
|
|
185439
|
-
define2(value);
|
|
185440
|
-
}
|
|
185441
|
-
});
|
|
185442
|
-
return object2;
|
|
185443
|
-
}
|
|
185444
|
-
|
|
185445
|
-
// node_modules/default-browser/index.js
|
|
185446
|
-
import { promisify as promisify8 } from "node:util";
|
|
185447
|
-
import process9 from "node:process";
|
|
185448
|
-
import { execFile as execFile6 } from "node:child_process";
|
|
185449
|
-
|
|
185450
|
-
// node_modules/default-browser-id/index.js
|
|
185451
|
-
import { promisify as promisify5 } from "node:util";
|
|
185452
|
-
import process7 from "node:process";
|
|
185453
|
-
import { execFile as execFile3 } from "node:child_process";
|
|
185454
|
-
var execFileAsync = promisify5(execFile3);
|
|
185455
|
-
async function defaultBrowserId() {
|
|
185456
|
-
if (process7.platform !== "darwin") {
|
|
185457
|
-
throw new Error("macOS only");
|
|
185458
|
-
}
|
|
185459
|
-
const { stdout } = await execFileAsync("defaults", ["read", "com.apple.LaunchServices/com.apple.launchservices.secure", "LSHandlers"]);
|
|
185460
|
-
const match = /LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout);
|
|
185461
|
-
const browserId = match?.groups.id ?? "com.apple.Safari";
|
|
185462
|
-
if (browserId === "com.apple.safari") {
|
|
185463
|
-
return "com.apple.Safari";
|
|
185464
|
-
}
|
|
185465
|
-
return browserId;
|
|
185466
|
-
}
|
|
185467
|
-
|
|
185468
|
-
// node_modules/run-applescript/index.js
|
|
185469
|
-
import process8 from "node:process";
|
|
185470
|
-
import { promisify as promisify6 } from "node:util";
|
|
185471
|
-
import { execFile as execFile4, execFileSync } from "node:child_process";
|
|
185472
|
-
var execFileAsync2 = promisify6(execFile4);
|
|
185473
|
-
async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {
|
|
185474
|
-
if (process8.platform !== "darwin") {
|
|
185475
|
-
throw new Error("macOS only");
|
|
185476
|
-
}
|
|
185477
|
-
const outputArguments = humanReadableOutput ? [] : ["-ss"];
|
|
185478
|
-
const execOptions = {};
|
|
185479
|
-
if (signal) {
|
|
185480
|
-
execOptions.signal = signal;
|
|
185481
|
-
}
|
|
185482
|
-
const { stdout } = await execFileAsync2("osascript", ["-e", script, outputArguments], execOptions);
|
|
185483
|
-
return stdout.trim();
|
|
185484
|
-
}
|
|
185485
|
-
|
|
185486
|
-
// node_modules/bundle-name/index.js
|
|
185487
|
-
async function bundleName(bundleId) {
|
|
185488
|
-
return runAppleScript(`tell application "Finder" to set app_path to application file id "${bundleId}" as string
|
|
185489
|
-
tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`);
|
|
185490
|
-
}
|
|
185491
|
-
|
|
185492
|
-
// node_modules/default-browser/windows.js
|
|
185493
|
-
import { promisify as promisify7 } from "node:util";
|
|
185494
|
-
import { execFile as execFile5 } from "node:child_process";
|
|
185495
|
-
var execFileAsync3 = promisify7(execFile5);
|
|
185496
|
-
var windowsBrowserProgIds = {
|
|
185497
|
-
MSEdgeHTM: { name: "Edge", id: "com.microsoft.edge" },
|
|
185498
|
-
MSEdgeBHTML: { name: "Edge Beta", id: "com.microsoft.edge.beta" },
|
|
185499
|
-
MSEdgeDHTML: { name: "Edge Dev", id: "com.microsoft.edge.dev" },
|
|
185500
|
-
AppXq0fevzme2pys62n3e0fbqa7peapykr8v: { name: "Edge", id: "com.microsoft.edge.old" },
|
|
185501
|
-
ChromeHTML: { name: "Chrome", id: "com.google.chrome" },
|
|
185502
|
-
ChromeBHTML: { name: "Chrome Beta", id: "com.google.chrome.beta" },
|
|
185503
|
-
ChromeDHTML: { name: "Chrome Dev", id: "com.google.chrome.dev" },
|
|
185504
|
-
ChromiumHTM: { name: "Chromium", id: "org.chromium.Chromium" },
|
|
185505
|
-
BraveHTML: { name: "Brave", id: "com.brave.Browser" },
|
|
185506
|
-
BraveBHTML: { name: "Brave Beta", id: "com.brave.Browser.beta" },
|
|
185507
|
-
BraveDHTML: { name: "Brave Dev", id: "com.brave.Browser.dev" },
|
|
185508
|
-
BraveSSHTM: { name: "Brave Nightly", id: "com.brave.Browser.nightly" },
|
|
185509
|
-
FirefoxURL: { name: "Firefox", id: "org.mozilla.firefox" },
|
|
185510
|
-
OperaStable: { name: "Opera", id: "com.operasoftware.Opera" },
|
|
185511
|
-
VivaldiHTM: { name: "Vivaldi", id: "com.vivaldi.Vivaldi" },
|
|
185512
|
-
"IE.HTTP": { name: "Internet Explorer", id: "com.microsoft.ie" }
|
|
185513
|
-
};
|
|
185514
|
-
var _windowsBrowserProgIdMap = new Map(Object.entries(windowsBrowserProgIds));
|
|
185515
|
-
|
|
185516
|
-
class UnknownBrowserError extends Error {
|
|
185517
|
-
}
|
|
185518
|
-
async function defaultBrowser(_execFileAsync = execFileAsync3) {
|
|
185519
|
-
const { stdout } = await _execFileAsync("reg", [
|
|
185520
|
-
"QUERY",
|
|
185521
|
-
" HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice",
|
|
185522
|
-
"/v",
|
|
185523
|
-
"ProgId"
|
|
185524
|
-
]);
|
|
185525
|
-
const match = /ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(stdout);
|
|
185526
|
-
if (!match) {
|
|
185527
|
-
throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);
|
|
185528
|
-
}
|
|
185529
|
-
const { id } = match.groups;
|
|
185530
|
-
const dotIndex = id.lastIndexOf(".");
|
|
185531
|
-
const hyphenIndex = id.lastIndexOf("-");
|
|
185532
|
-
const baseIdByDot = dotIndex === -1 ? undefined : id.slice(0, dotIndex);
|
|
185533
|
-
const baseIdByHyphen = hyphenIndex === -1 ? undefined : id.slice(0, hyphenIndex);
|
|
185534
|
-
return windowsBrowserProgIds[id] ?? windowsBrowserProgIds[baseIdByDot] ?? windowsBrowserProgIds[baseIdByHyphen] ?? { name: id, id };
|
|
185535
|
-
}
|
|
185536
|
-
|
|
185537
|
-
// node_modules/default-browser/index.js
|
|
185538
|
-
var execFileAsync4 = promisify8(execFile6);
|
|
185539
|
-
var titleize = (string4) => string4.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x2) => x2.toUpperCase());
|
|
185540
|
-
async function defaultBrowser2() {
|
|
185541
|
-
if (process9.platform === "darwin") {
|
|
185542
|
-
const id = await defaultBrowserId();
|
|
185543
|
-
const name2 = await bundleName(id);
|
|
185544
|
-
return { name: name2, id };
|
|
185545
|
-
}
|
|
185546
|
-
if (process9.platform === "linux") {
|
|
185547
|
-
const { stdout } = await execFileAsync4("xdg-mime", ["query", "default", "x-scheme-handler/http"]);
|
|
185548
|
-
const id = stdout.trim();
|
|
185549
|
-
const name2 = titleize(id.replace(/.desktop$/, "").replace("-", " "));
|
|
185550
|
-
return { name: name2, id };
|
|
185551
|
-
}
|
|
185552
|
-
if (process9.platform === "win32") {
|
|
185553
|
-
return defaultBrowser();
|
|
185554
|
-
}
|
|
185555
|
-
throw new Error("Only macOS, Linux, and Windows are supported");
|
|
185556
|
-
}
|
|
185557
|
-
|
|
185558
|
-
// node_modules/is-in-ssh/index.js
|
|
185559
|
-
import process10 from "node:process";
|
|
185560
|
-
var isInSsh = Boolean(process10.env.SSH_CONNECTION || process10.env.SSH_CLIENT || process10.env.SSH_TTY);
|
|
185561
|
-
var is_in_ssh_default = isInSsh;
|
|
185562
|
-
|
|
185563
|
-
// node_modules/open/index.js
|
|
185564
|
-
var fallbackAttemptSymbol = Symbol("fallbackAttempt");
|
|
185565
|
-
var __dirname3 = import.meta.url ? path11.dirname(fileURLToPath3(import.meta.url)) : "";
|
|
185566
|
-
var localXdgOpenPath = path11.join(__dirname3, "xdg-open");
|
|
185567
|
-
var { platform: platform5, arch } = process11;
|
|
185568
|
-
var tryEachApp = async (apps, opener) => {
|
|
185569
|
-
if (apps.length === 0) {
|
|
185570
|
-
return;
|
|
185571
|
-
}
|
|
185572
|
-
const errors3 = [];
|
|
185573
|
-
for (const app of apps) {
|
|
185574
|
-
try {
|
|
185575
|
-
return await opener(app);
|
|
185576
|
-
} catch (error48) {
|
|
185577
|
-
errors3.push(error48);
|
|
185578
|
-
}
|
|
185579
|
-
}
|
|
185580
|
-
throw new AggregateError(errors3, "Failed to open in all supported apps");
|
|
185581
|
-
};
|
|
185582
|
-
var baseOpen = async (options) => {
|
|
185583
|
-
options = {
|
|
185584
|
-
wait: false,
|
|
185585
|
-
background: false,
|
|
185586
|
-
newInstance: false,
|
|
185587
|
-
allowNonzeroExitCode: false,
|
|
185588
|
-
...options
|
|
185589
|
-
};
|
|
185590
|
-
const isFallbackAttempt = options[fallbackAttemptSymbol] === true;
|
|
185591
|
-
delete options[fallbackAttemptSymbol];
|
|
185592
|
-
if (Array.isArray(options.app)) {
|
|
185593
|
-
return tryEachApp(options.app, (singleApp) => baseOpen({
|
|
185594
|
-
...options,
|
|
185595
|
-
app: singleApp,
|
|
185596
|
-
[fallbackAttemptSymbol]: true
|
|
185597
|
-
}));
|
|
185598
|
-
}
|
|
185599
|
-
let { name: app, arguments: appArguments = [] } = options.app ?? {};
|
|
185600
|
-
appArguments = [...appArguments];
|
|
185601
|
-
if (Array.isArray(app)) {
|
|
185602
|
-
return tryEachApp(app, (appName) => baseOpen({
|
|
185603
|
-
...options,
|
|
185604
|
-
app: {
|
|
185605
|
-
name: appName,
|
|
185606
|
-
arguments: appArguments
|
|
185607
|
-
},
|
|
185608
|
-
[fallbackAttemptSymbol]: true
|
|
185609
|
-
}));
|
|
185610
|
-
}
|
|
185611
|
-
if (app === "browser" || app === "browserPrivate") {
|
|
185612
|
-
const ids = {
|
|
185613
|
-
"com.google.chrome": "chrome",
|
|
185614
|
-
"google-chrome.desktop": "chrome",
|
|
185615
|
-
"com.brave.browser": "brave",
|
|
185616
|
-
"org.mozilla.firefox": "firefox",
|
|
185617
|
-
"firefox.desktop": "firefox",
|
|
185618
|
-
"com.microsoft.msedge": "edge",
|
|
185619
|
-
"com.microsoft.edge": "edge",
|
|
185620
|
-
"com.microsoft.edgemac": "edge",
|
|
185621
|
-
"microsoft-edge.desktop": "edge",
|
|
185622
|
-
"com.apple.safari": "safari"
|
|
185623
|
-
};
|
|
185624
|
-
const flags = {
|
|
185625
|
-
chrome: "--incognito",
|
|
185626
|
-
brave: "--incognito",
|
|
185627
|
-
firefox: "--private-window",
|
|
185628
|
-
edge: "--inPrivate"
|
|
185629
|
-
};
|
|
185630
|
-
let browser;
|
|
185631
|
-
if (is_wsl_default) {
|
|
185632
|
-
const progId = await wslDefaultBrowser();
|
|
185633
|
-
const browserInfo = _windowsBrowserProgIdMap.get(progId);
|
|
185634
|
-
browser = browserInfo ?? {};
|
|
185635
|
-
} else {
|
|
185636
|
-
browser = await defaultBrowser2();
|
|
185637
|
-
}
|
|
185638
|
-
if (browser.id in ids) {
|
|
185639
|
-
const browserName = ids[browser.id.toLowerCase()];
|
|
185640
|
-
if (app === "browserPrivate") {
|
|
185641
|
-
if (browserName === "safari") {
|
|
185642
|
-
throw new Error("Safari doesn't support opening in private mode via command line");
|
|
185643
|
-
}
|
|
185644
|
-
appArguments.push(flags[browserName]);
|
|
185645
|
-
}
|
|
185646
|
-
return baseOpen({
|
|
185647
|
-
...options,
|
|
185648
|
-
app: {
|
|
185649
|
-
name: apps[browserName],
|
|
185650
|
-
arguments: appArguments
|
|
185651
|
-
}
|
|
185652
|
-
});
|
|
185653
|
-
}
|
|
185654
|
-
throw new Error(`${browser.name} is not supported as a default browser`);
|
|
185655
|
-
}
|
|
185656
|
-
let command;
|
|
185657
|
-
const cliArguments = [];
|
|
185658
|
-
const childProcessOptions = {};
|
|
185659
|
-
let shouldUseWindowsInWsl = false;
|
|
185660
|
-
if (is_wsl_default && !isInsideContainer() && !is_in_ssh_default && !app) {
|
|
185661
|
-
shouldUseWindowsInWsl = await canAccessPowerShell();
|
|
185662
|
-
}
|
|
185663
|
-
if (platform5 === "darwin") {
|
|
185664
|
-
command = "open";
|
|
185665
|
-
if (options.wait) {
|
|
185666
|
-
cliArguments.push("--wait-apps");
|
|
185667
|
-
}
|
|
185668
|
-
if (options.background) {
|
|
185669
|
-
cliArguments.push("--background");
|
|
185670
|
-
}
|
|
185671
|
-
if (options.newInstance) {
|
|
185672
|
-
cliArguments.push("--new");
|
|
185673
|
-
}
|
|
185674
|
-
if (app) {
|
|
185675
|
-
cliArguments.push("-a", app);
|
|
185676
|
-
}
|
|
185677
|
-
} else if (platform5 === "win32" || shouldUseWindowsInWsl) {
|
|
185678
|
-
command = await powerShellPath2();
|
|
185679
|
-
cliArguments.push(...executePowerShell.argumentsPrefix);
|
|
185680
|
-
if (!is_wsl_default) {
|
|
185681
|
-
childProcessOptions.windowsVerbatimArguments = true;
|
|
185682
|
-
}
|
|
185683
|
-
if (is_wsl_default && options.target) {
|
|
185684
|
-
options.target = await convertWslPathToWindows(options.target);
|
|
185685
|
-
}
|
|
185686
|
-
const encodedArguments = ["$ProgressPreference = 'SilentlyContinue';", "Start"];
|
|
185687
|
-
if (options.wait) {
|
|
185688
|
-
encodedArguments.push("-Wait");
|
|
185689
|
-
}
|
|
185690
|
-
if (app) {
|
|
185691
|
-
encodedArguments.push(executePowerShell.escapeArgument(app));
|
|
185692
|
-
if (options.target) {
|
|
185693
|
-
appArguments.push(options.target);
|
|
185694
|
-
}
|
|
185695
|
-
} else if (options.target) {
|
|
185696
|
-
encodedArguments.push(executePowerShell.escapeArgument(options.target));
|
|
185697
|
-
}
|
|
185698
|
-
if (appArguments.length > 0) {
|
|
185699
|
-
appArguments = appArguments.map((argument) => executePowerShell.escapeArgument(argument));
|
|
185700
|
-
encodedArguments.push("-ArgumentList", appArguments.join(","));
|
|
185701
|
-
}
|
|
185702
|
-
options.target = executePowerShell.encodeCommand(encodedArguments.join(" "));
|
|
185703
|
-
if (!options.wait) {
|
|
185704
|
-
childProcessOptions.stdio = "ignore";
|
|
185705
|
-
}
|
|
185706
|
-
} else {
|
|
185707
|
-
if (app) {
|
|
185708
|
-
command = app;
|
|
185709
|
-
} else {
|
|
185710
|
-
const isBundled = !__dirname3 || __dirname3 === "/";
|
|
185711
|
-
let exeLocalXdgOpen = false;
|
|
185712
|
-
try {
|
|
185713
|
-
await fs18.access(localXdgOpenPath, fsConstants2.X_OK);
|
|
185714
|
-
exeLocalXdgOpen = true;
|
|
185715
|
-
} catch {}
|
|
185716
|
-
const useSystemXdgOpen = process11.versions.electron ?? (platform5 === "android" || isBundled || !exeLocalXdgOpen);
|
|
185717
|
-
command = useSystemXdgOpen ? "xdg-open" : localXdgOpenPath;
|
|
185718
|
-
}
|
|
185719
|
-
if (appArguments.length > 0) {
|
|
185720
|
-
cliArguments.push(...appArguments);
|
|
185721
|
-
}
|
|
185722
|
-
if (!options.wait) {
|
|
185723
|
-
childProcessOptions.stdio = "ignore";
|
|
185724
|
-
childProcessOptions.detached = true;
|
|
185725
|
-
}
|
|
185726
|
-
}
|
|
185727
|
-
if (platform5 === "darwin" && appArguments.length > 0) {
|
|
185728
|
-
cliArguments.push("--args", ...appArguments);
|
|
185729
|
-
}
|
|
185730
|
-
if (options.target) {
|
|
185731
|
-
cliArguments.push(options.target);
|
|
185732
|
-
}
|
|
185733
|
-
const subprocess = childProcess3.spawn(command, cliArguments, childProcessOptions);
|
|
185734
|
-
if (options.wait) {
|
|
185735
|
-
return new Promise((resolve, reject) => {
|
|
185736
|
-
subprocess.once("error", reject);
|
|
185737
|
-
subprocess.once("close", (exitCode) => {
|
|
185738
|
-
if (!options.allowNonzeroExitCode && exitCode !== 0) {
|
|
185739
|
-
reject(new Error(`Exited with code ${exitCode}`));
|
|
185740
|
-
return;
|
|
185741
|
-
}
|
|
185742
|
-
resolve(subprocess);
|
|
185743
|
-
});
|
|
185744
|
-
});
|
|
185745
|
-
}
|
|
185746
|
-
if (isFallbackAttempt) {
|
|
185747
|
-
return new Promise((resolve, reject) => {
|
|
185748
|
-
subprocess.once("error", reject);
|
|
185749
|
-
subprocess.once("spawn", () => {
|
|
185750
|
-
subprocess.once("close", (exitCode) => {
|
|
185751
|
-
subprocess.off("error", reject);
|
|
185752
|
-
if (exitCode !== 0) {
|
|
185753
|
-
reject(new Error(`Exited with code ${exitCode}`));
|
|
185754
|
-
return;
|
|
185755
|
-
}
|
|
185756
|
-
subprocess.unref();
|
|
185757
|
-
resolve(subprocess);
|
|
185758
|
-
});
|
|
185759
|
-
});
|
|
185760
|
-
});
|
|
185761
|
-
}
|
|
185762
|
-
subprocess.unref();
|
|
185763
|
-
return new Promise((resolve, reject) => {
|
|
185764
|
-
subprocess.once("error", reject);
|
|
185765
|
-
subprocess.once("spawn", () => {
|
|
185766
|
-
subprocess.off("error", reject);
|
|
185767
|
-
resolve(subprocess);
|
|
185768
|
-
});
|
|
185769
|
-
});
|
|
185770
|
-
};
|
|
185771
|
-
var open = (target, options) => {
|
|
185772
|
-
if (typeof target !== "string") {
|
|
185773
|
-
throw new TypeError("Expected a `target`");
|
|
185774
|
-
}
|
|
185775
|
-
return baseOpen({
|
|
185776
|
-
...options,
|
|
185777
|
-
target
|
|
185778
|
-
});
|
|
185779
|
-
};
|
|
185780
|
-
function detectArchBinary(binary) {
|
|
185781
|
-
if (typeof binary === "string" || Array.isArray(binary)) {
|
|
185782
|
-
return binary;
|
|
185783
|
-
}
|
|
185784
|
-
const { [arch]: archBinary } = binary;
|
|
185785
|
-
if (!archBinary) {
|
|
185786
|
-
throw new Error(`${arch} is not supported`);
|
|
185787
|
-
}
|
|
185788
|
-
return archBinary;
|
|
185789
|
-
}
|
|
185790
|
-
function detectPlatformBinary({ [platform5]: platformBinary }, { wsl } = {}) {
|
|
185791
|
-
if (wsl && is_wsl_default) {
|
|
185792
|
-
return detectArchBinary(wsl);
|
|
185793
|
-
}
|
|
185794
|
-
if (!platformBinary) {
|
|
185795
|
-
throw new Error(`${platform5} is not supported`);
|
|
185796
|
-
}
|
|
185797
|
-
return detectArchBinary(platformBinary);
|
|
185798
|
-
}
|
|
185799
|
-
var apps = {
|
|
185800
|
-
browser: "browser",
|
|
185801
|
-
browserPrivate: "browserPrivate"
|
|
185802
|
-
};
|
|
185803
|
-
defineLazyProperty(apps, "chrome", () => detectPlatformBinary({
|
|
185804
|
-
darwin: "google chrome",
|
|
185805
|
-
win32: "chrome",
|
|
185806
|
-
linux: ["google-chrome", "google-chrome-stable", "chromium", "chromium-browser"]
|
|
185807
|
-
}, {
|
|
185808
|
-
wsl: {
|
|
185809
|
-
ia32: "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",
|
|
185810
|
-
x64: ["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe", "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]
|
|
185811
|
-
}
|
|
185812
|
-
}));
|
|
185813
|
-
defineLazyProperty(apps, "brave", () => detectPlatformBinary({
|
|
185814
|
-
darwin: "brave browser",
|
|
185815
|
-
win32: "brave",
|
|
185816
|
-
linux: ["brave-browser", "brave"]
|
|
185817
|
-
}, {
|
|
185818
|
-
wsl: {
|
|
185819
|
-
ia32: "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe",
|
|
185820
|
-
x64: ["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe", "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"]
|
|
185821
|
-
}
|
|
185822
|
-
}));
|
|
185823
|
-
defineLazyProperty(apps, "firefox", () => detectPlatformBinary({
|
|
185824
|
-
darwin: "firefox",
|
|
185825
|
-
win32: String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,
|
|
185826
|
-
linux: "firefox"
|
|
185827
|
-
}, {
|
|
185828
|
-
wsl: "/mnt/c/Program Files/Mozilla Firefox/firefox.exe"
|
|
185829
|
-
}));
|
|
185830
|
-
defineLazyProperty(apps, "edge", () => detectPlatformBinary({
|
|
185831
|
-
darwin: "microsoft edge",
|
|
185832
|
-
win32: "msedge",
|
|
185833
|
-
linux: ["microsoft-edge", "microsoft-edge-dev"]
|
|
185834
|
-
}, {
|
|
185835
|
-
wsl: "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
|
|
185836
|
-
}));
|
|
185837
|
-
defineLazyProperty(apps, "safari", () => detectPlatformBinary({
|
|
185838
|
-
darwin: "Safari"
|
|
185839
|
-
}));
|
|
185840
|
-
var open_default = open;
|
|
185841
|
-
|
|
185842
|
-
// node_modules/p-wait-for/index.js
|
|
185843
|
-
var resolveValue = Symbol("resolveValue");
|
|
185844
|
-
var sleep = (ms, signal) => new Promise((resolve, reject) => {
|
|
185845
|
-
if (signal?.aborted) {
|
|
185846
|
-
reject(signal.reason);
|
|
185847
|
-
return;
|
|
185848
|
-
}
|
|
185849
|
-
const timeout2 = setTimeout(resolve, ms);
|
|
185850
|
-
if (signal) {
|
|
185851
|
-
signal.addEventListener("abort", () => {
|
|
185852
|
-
clearTimeout(timeout2);
|
|
185853
|
-
reject(signal.reason);
|
|
185854
|
-
}, { once: true });
|
|
185855
|
-
}
|
|
185856
|
-
});
|
|
185857
|
-
var validateOptions = (interval, timeout2) => {
|
|
185858
|
-
if (typeof interval !== "number" || !Number.isFinite(interval) || interval < 0) {
|
|
185859
|
-
throw new TypeError("Expected interval to be a finite non-negative number");
|
|
185860
|
-
}
|
|
185861
|
-
if (typeof timeout2 === "object" && timeout2 !== null) {
|
|
185862
|
-
if (typeof timeout2.milliseconds !== "number" || Number.isNaN(timeout2.milliseconds) || timeout2.milliseconds < 0) {
|
|
185863
|
-
throw new TypeError("Expected timeout.milliseconds to be a finite non-negative number");
|
|
185864
|
-
}
|
|
185865
|
-
} else if (typeof timeout2 === "number" && (Number.isNaN(timeout2) || timeout2 < 0)) {
|
|
185866
|
-
throw new TypeError("Expected timeout to be a finite non-negative number");
|
|
185867
|
-
}
|
|
185868
|
-
};
|
|
185869
|
-
var createTimeoutError = (timeout2) => {
|
|
185870
|
-
if (timeout2.message instanceof Error) {
|
|
185871
|
-
return timeout2.message;
|
|
185872
|
-
}
|
|
185873
|
-
const message = timeout2.message ?? `Promise timed out after ${timeout2.milliseconds} milliseconds`;
|
|
185874
|
-
return new TimeoutError2(message);
|
|
185875
|
-
};
|
|
185876
|
-
var handleFallback = (timeout2) => {
|
|
185877
|
-
if (timeout2.fallback) {
|
|
185878
|
-
return timeout2.fallback();
|
|
185879
|
-
}
|
|
185880
|
-
throw createTimeoutError(timeout2);
|
|
185881
|
-
};
|
|
185882
|
-
var handleAbortError = (timeoutSignal, timeout2, signal) => {
|
|
185883
|
-
if (timeoutSignal?.aborted) {
|
|
185884
|
-
if (typeof timeout2 === "object") {
|
|
185885
|
-
return handleFallback(timeout2);
|
|
185886
|
-
}
|
|
185887
|
-
throw new TimeoutError2;
|
|
185888
|
-
}
|
|
185889
|
-
throw signal.reason;
|
|
185890
|
-
};
|
|
185891
|
-
async function pWaitFor(condition, options = {}) {
|
|
185892
|
-
const {
|
|
185893
|
-
interval = 20,
|
|
185894
|
-
timeout: timeout2 = Number.POSITIVE_INFINITY,
|
|
185895
|
-
before = true,
|
|
185896
|
-
signal
|
|
185897
|
-
} = options;
|
|
185898
|
-
validateOptions(interval, timeout2);
|
|
185899
|
-
const timeoutMs = typeof timeout2 === "number" ? timeout2 : timeout2?.milliseconds ?? Number.POSITIVE_INFINITY;
|
|
185900
|
-
const timeoutSignal = timeoutMs === Number.POSITIVE_INFINITY ? undefined : AbortSignal.timeout(timeoutMs);
|
|
185901
|
-
const combinedSignal = timeoutSignal && signal ? AbortSignal.any([timeoutSignal, signal]) : timeoutSignal ?? signal;
|
|
185902
|
-
if (!before) {
|
|
185903
|
-
await sleep(interval, combinedSignal);
|
|
185904
|
-
}
|
|
185905
|
-
if (combinedSignal?.aborted) {
|
|
185906
|
-
return handleAbortError(timeoutSignal, timeout2, signal);
|
|
185907
|
-
}
|
|
185908
|
-
while (true) {
|
|
185909
|
-
try {
|
|
185910
|
-
const value = await condition();
|
|
185911
|
-
if (typeof value === "object" && value !== null && resolveValue in value) {
|
|
185912
|
-
return value[resolveValue];
|
|
185913
|
-
}
|
|
185914
|
-
if (value === true) {
|
|
185915
|
-
return;
|
|
185916
|
-
}
|
|
185917
|
-
if (value === false) {
|
|
185918
|
-
await sleep(interval, combinedSignal);
|
|
185919
|
-
continue;
|
|
185920
|
-
}
|
|
185921
|
-
throw new TypeError("Expected condition to return a boolean");
|
|
185922
|
-
} catch (error48) {
|
|
185923
|
-
if (error48 === combinedSignal?.reason) {
|
|
185924
|
-
return handleAbortError(timeoutSignal, timeout2, signal);
|
|
185925
|
-
}
|
|
185926
|
-
throw error48;
|
|
185927
|
-
}
|
|
185928
|
-
}
|
|
185929
|
-
}
|
|
185930
|
-
pWaitFor.resolveWith = (value) => ({ [resolveValue]: value });
|
|
185931
|
-
|
|
185932
|
-
class TimeoutError2 extends Error {
|
|
185933
|
-
constructor(message = "Promise timed out") {
|
|
185934
|
-
super(message);
|
|
185935
|
-
this.name = "TimeoutError";
|
|
185936
|
-
}
|
|
185937
|
-
}
|
|
185938
|
-
|
|
185939
|
-
// src/core/resources/connector/oauth-flow.ts
|
|
185940
|
-
async function runOAuthFlow(params) {
|
|
185941
|
-
await open_default(params.redirectUrl);
|
|
185942
|
-
let finalStatus = "PENDING";
|
|
185943
|
-
try {
|
|
185944
|
-
await pWaitFor(async () => {
|
|
185945
|
-
const response = await getOAuthStatus(params.type, params.connectionId);
|
|
185946
|
-
finalStatus = response.status;
|
|
185947
|
-
return response.status !== "PENDING";
|
|
185948
|
-
}, {
|
|
185949
|
-
interval: 2000,
|
|
185950
|
-
timeout: 2 * 60 * 1000
|
|
185951
|
-
});
|
|
185952
|
-
} catch (err) {
|
|
185953
|
-
if (!(err instanceof TimeoutError2)) {
|
|
185954
|
-
throw err;
|
|
185955
|
-
}
|
|
185956
|
-
}
|
|
185957
|
-
return { status: finalStatus };
|
|
185958
|
-
}
|
|
185959
185236
|
// src/core/resources/connector/push.ts
|
|
185960
185237
|
async function pushConnectors(connectors) {
|
|
185961
185238
|
const results = [];
|
|
@@ -187021,16 +186298,16 @@ var ansiStyles = assembleStyles();
|
|
|
187021
186298
|
var ansi_styles_default = ansiStyles;
|
|
187022
186299
|
|
|
187023
186300
|
// node_modules/chalk/source/vendor/supports-color/index.js
|
|
187024
|
-
import
|
|
187025
|
-
import
|
|
186301
|
+
import process5 from "node:process";
|
|
186302
|
+
import os from "node:os";
|
|
187026
186303
|
import tty from "node:tty";
|
|
187027
|
-
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args :
|
|
186304
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process5.argv) {
|
|
187028
186305
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
187029
186306
|
const position = argv.indexOf(prefix + flag);
|
|
187030
186307
|
const terminatorPosition = argv.indexOf("--");
|
|
187031
186308
|
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
187032
186309
|
}
|
|
187033
|
-
var { env } =
|
|
186310
|
+
var { env } = process5;
|
|
187034
186311
|
var flagForceColor;
|
|
187035
186312
|
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
187036
186313
|
flagForceColor = 0;
|
|
@@ -187086,8 +186363,8 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
187086
186363
|
if (env.TERM === "dumb") {
|
|
187087
186364
|
return min;
|
|
187088
186365
|
}
|
|
187089
|
-
if (
|
|
187090
|
-
const osRelease =
|
|
186366
|
+
if (process5.platform === "win32") {
|
|
186367
|
+
const osRelease = os.release().split(".");
|
|
187091
186368
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
187092
186369
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
187093
186370
|
}
|
|
@@ -187279,18 +186556,18 @@ var proto = Object.defineProperties(() => {}, {
|
|
|
187279
186556
|
}
|
|
187280
186557
|
}
|
|
187281
186558
|
});
|
|
187282
|
-
var createStyler = (
|
|
186559
|
+
var createStyler = (open, close, parent) => {
|
|
187283
186560
|
let openAll;
|
|
187284
186561
|
let closeAll;
|
|
187285
186562
|
if (parent === undefined) {
|
|
187286
|
-
openAll =
|
|
186563
|
+
openAll = open;
|
|
187287
186564
|
closeAll = close;
|
|
187288
186565
|
} else {
|
|
187289
|
-
openAll = parent.openAll +
|
|
186566
|
+
openAll = parent.openAll + open;
|
|
187290
186567
|
closeAll = close + parent.closeAll;
|
|
187291
186568
|
}
|
|
187292
186569
|
return {
|
|
187293
|
-
open
|
|
186570
|
+
open,
|
|
187294
186571
|
close,
|
|
187295
186572
|
openAll,
|
|
187296
186573
|
closeAll,
|
|
@@ -187372,7 +186649,7 @@ var theme = {
|
|
|
187372
186649
|
};
|
|
187373
186650
|
|
|
187374
186651
|
// src/cli/utils/animate.ts
|
|
187375
|
-
function
|
|
186652
|
+
function sleep(ms) {
|
|
187376
186653
|
return new Promise((resolve2) => setTimeout(resolve2, ms));
|
|
187377
186654
|
}
|
|
187378
186655
|
async function animateLineReveal(line, duration3) {
|
|
@@ -187392,7 +186669,7 @@ async function animateLineReveal(line, duration3) {
|
|
|
187392
186669
|
}
|
|
187393
186670
|
}
|
|
187394
186671
|
process.stdout.write(`\r${output}`);
|
|
187395
|
-
await
|
|
186672
|
+
await sleep(stepDuration);
|
|
187396
186673
|
}
|
|
187397
186674
|
process.stdout.write(`\r${theme.colors.base44Orange(line)}
|
|
187398
186675
|
`);
|
|
@@ -187417,7 +186694,7 @@ async function shimmerPass(lines, duration3) {
|
|
|
187417
186694
|
}
|
|
187418
186695
|
console.log(output);
|
|
187419
186696
|
}
|
|
187420
|
-
await
|
|
186697
|
+
await sleep(stepDuration);
|
|
187421
186698
|
}
|
|
187422
186699
|
process.stdout.write(moveUp);
|
|
187423
186700
|
for (const line of lines) {
|
|
@@ -187431,7 +186708,7 @@ async function printAnimatedLines(lines) {
|
|
|
187431
186708
|
const line = lines[i];
|
|
187432
186709
|
await animateLineReveal(line, 100);
|
|
187433
186710
|
if (i < lines.length - 1) {
|
|
187434
|
-
await
|
|
186711
|
+
await sleep(lineDelay - 100);
|
|
187435
186712
|
}
|
|
187436
186713
|
}
|
|
187437
186714
|
await shimmerPass(lines, 200);
|
|
@@ -187469,6 +186746,103 @@ var onPromptCancel = () => {
|
|
|
187469
186746
|
xe("Operation cancelled.");
|
|
187470
186747
|
throw new CLIExitError(0);
|
|
187471
186748
|
};
|
|
186749
|
+
// node_modules/p-wait-for/index.js
|
|
186750
|
+
var resolveValue = Symbol("resolveValue");
|
|
186751
|
+
var sleep2 = (ms, signal) => new Promise((resolve2, reject) => {
|
|
186752
|
+
if (signal?.aborted) {
|
|
186753
|
+
reject(signal.reason);
|
|
186754
|
+
return;
|
|
186755
|
+
}
|
|
186756
|
+
const timeout2 = setTimeout(resolve2, ms);
|
|
186757
|
+
if (signal) {
|
|
186758
|
+
signal.addEventListener("abort", () => {
|
|
186759
|
+
clearTimeout(timeout2);
|
|
186760
|
+
reject(signal.reason);
|
|
186761
|
+
}, { once: true });
|
|
186762
|
+
}
|
|
186763
|
+
});
|
|
186764
|
+
var validateOptions = (interval, timeout2) => {
|
|
186765
|
+
if (typeof interval !== "number" || !Number.isFinite(interval) || interval < 0) {
|
|
186766
|
+
throw new TypeError("Expected interval to be a finite non-negative number");
|
|
186767
|
+
}
|
|
186768
|
+
if (typeof timeout2 === "object" && timeout2 !== null) {
|
|
186769
|
+
if (typeof timeout2.milliseconds !== "number" || Number.isNaN(timeout2.milliseconds) || timeout2.milliseconds < 0) {
|
|
186770
|
+
throw new TypeError("Expected timeout.milliseconds to be a finite non-negative number");
|
|
186771
|
+
}
|
|
186772
|
+
} else if (typeof timeout2 === "number" && (Number.isNaN(timeout2) || timeout2 < 0)) {
|
|
186773
|
+
throw new TypeError("Expected timeout to be a finite non-negative number");
|
|
186774
|
+
}
|
|
186775
|
+
};
|
|
186776
|
+
var createTimeoutError = (timeout2) => {
|
|
186777
|
+
if (timeout2.message instanceof Error) {
|
|
186778
|
+
return timeout2.message;
|
|
186779
|
+
}
|
|
186780
|
+
const message = timeout2.message ?? `Promise timed out after ${timeout2.milliseconds} milliseconds`;
|
|
186781
|
+
return new TimeoutError2(message);
|
|
186782
|
+
};
|
|
186783
|
+
var handleFallback = (timeout2) => {
|
|
186784
|
+
if (timeout2.fallback) {
|
|
186785
|
+
return timeout2.fallback();
|
|
186786
|
+
}
|
|
186787
|
+
throw createTimeoutError(timeout2);
|
|
186788
|
+
};
|
|
186789
|
+
var handleAbortError = (timeoutSignal, timeout2, signal) => {
|
|
186790
|
+
if (timeoutSignal?.aborted) {
|
|
186791
|
+
if (typeof timeout2 === "object") {
|
|
186792
|
+
return handleFallback(timeout2);
|
|
186793
|
+
}
|
|
186794
|
+
throw new TimeoutError2;
|
|
186795
|
+
}
|
|
186796
|
+
throw signal.reason;
|
|
186797
|
+
};
|
|
186798
|
+
async function pWaitFor(condition, options = {}) {
|
|
186799
|
+
const {
|
|
186800
|
+
interval = 20,
|
|
186801
|
+
timeout: timeout2 = Number.POSITIVE_INFINITY,
|
|
186802
|
+
before = true,
|
|
186803
|
+
signal
|
|
186804
|
+
} = options;
|
|
186805
|
+
validateOptions(interval, timeout2);
|
|
186806
|
+
const timeoutMs = typeof timeout2 === "number" ? timeout2 : timeout2?.milliseconds ?? Number.POSITIVE_INFINITY;
|
|
186807
|
+
const timeoutSignal = timeoutMs === Number.POSITIVE_INFINITY ? undefined : AbortSignal.timeout(timeoutMs);
|
|
186808
|
+
const combinedSignal = timeoutSignal && signal ? AbortSignal.any([timeoutSignal, signal]) : timeoutSignal ?? signal;
|
|
186809
|
+
if (!before) {
|
|
186810
|
+
await sleep2(interval, combinedSignal);
|
|
186811
|
+
}
|
|
186812
|
+
if (combinedSignal?.aborted) {
|
|
186813
|
+
return handleAbortError(timeoutSignal, timeout2, signal);
|
|
186814
|
+
}
|
|
186815
|
+
while (true) {
|
|
186816
|
+
try {
|
|
186817
|
+
const value = await condition();
|
|
186818
|
+
if (typeof value === "object" && value !== null && resolveValue in value) {
|
|
186819
|
+
return value[resolveValue];
|
|
186820
|
+
}
|
|
186821
|
+
if (value === true) {
|
|
186822
|
+
return;
|
|
186823
|
+
}
|
|
186824
|
+
if (value === false) {
|
|
186825
|
+
await sleep2(interval, combinedSignal);
|
|
186826
|
+
continue;
|
|
186827
|
+
}
|
|
186828
|
+
throw new TypeError("Expected condition to return a boolean");
|
|
186829
|
+
} catch (error48) {
|
|
186830
|
+
if (error48 === combinedSignal?.reason) {
|
|
186831
|
+
return handleAbortError(timeoutSignal, timeout2, signal);
|
|
186832
|
+
}
|
|
186833
|
+
throw error48;
|
|
186834
|
+
}
|
|
186835
|
+
}
|
|
186836
|
+
}
|
|
186837
|
+
pWaitFor.resolveWith = (value) => ({ [resolveValue]: value });
|
|
186838
|
+
|
|
186839
|
+
class TimeoutError2 extends Error {
|
|
186840
|
+
constructor(message = "Promise timed out") {
|
|
186841
|
+
super(message);
|
|
186842
|
+
this.name = "TimeoutError";
|
|
186843
|
+
}
|
|
186844
|
+
}
|
|
186845
|
+
|
|
187472
186846
|
// src/cli/commands/auth/login-flow.ts
|
|
187473
186847
|
async function generateAndDisplayDeviceCode() {
|
|
187474
186848
|
const deviceCodeResponse = await runTask("Generating device code...", async () => {
|
|
@@ -187541,7 +186915,7 @@ function isPlainObject2(value) {
|
|
|
187541
186915
|
}
|
|
187542
186916
|
|
|
187543
186917
|
// node_modules/execa/lib/arguments/file-url.js
|
|
187544
|
-
import { fileURLToPath as
|
|
186918
|
+
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
187545
186919
|
var safeNormalizeFileUrl = (file2, name2) => {
|
|
187546
186920
|
const fileString = normalizeFileUrl(normalizeDenoExecPath(file2));
|
|
187547
186921
|
if (typeof fileString !== "string") {
|
|
@@ -187551,7 +186925,7 @@ var safeNormalizeFileUrl = (file2, name2) => {
|
|
|
187551
186925
|
};
|
|
187552
186926
|
var normalizeDenoExecPath = (file2) => isDenoExecPath(file2) ? file2.toString() : file2;
|
|
187553
186927
|
var isDenoExecPath = (file2) => typeof file2 !== "string" && file2 && Object.getPrototypeOf(file2) === String.prototype;
|
|
187554
|
-
var normalizeFileUrl = (file2) => file2 instanceof URL ?
|
|
186928
|
+
var normalizeFileUrl = (file2) => file2 instanceof URL ? fileURLToPath3(file2) : file2;
|
|
187555
186929
|
|
|
187556
186930
|
// node_modules/execa/lib/methods/parameters.js
|
|
187557
186931
|
var normalizeParameters = (rawFile, rawArguments = [], rawOptions = {}) => {
|
|
@@ -187733,9 +187107,9 @@ import { spawnSync } from "node:child_process";
|
|
|
187733
187107
|
import { debuglog } from "node:util";
|
|
187734
187108
|
|
|
187735
187109
|
// node_modules/execa/lib/utils/standard-stream.js
|
|
187736
|
-
import
|
|
187110
|
+
import process6 from "node:process";
|
|
187737
187111
|
var isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
|
|
187738
|
-
var STANDARD_STREAMS = [
|
|
187112
|
+
var STANDARD_STREAMS = [process6.stdin, process6.stdout, process6.stderr];
|
|
187739
187113
|
var STANDARD_STREAMS_ALIASES = ["stdin", "stdout", "stderr"];
|
|
187740
187114
|
var getStreamName = (fdNumber) => STANDARD_STREAMS_ALIASES[fdNumber] ?? `stdio[${fdNumber}]`;
|
|
187741
187115
|
|
|
@@ -187825,7 +187199,7 @@ var VERBOSE_VALUES = ["none", "short", "full"];
|
|
|
187825
187199
|
import { inspect } from "node:util";
|
|
187826
187200
|
|
|
187827
187201
|
// node_modules/execa/lib/arguments/escape.js
|
|
187828
|
-
import { platform as
|
|
187202
|
+
import { platform as platform5 } from "node:process";
|
|
187829
187203
|
import { stripVTControlCharacters } from "node:util";
|
|
187830
187204
|
var joinCommand = (filePath, rawArguments) => {
|
|
187831
187205
|
const fileAndArguments = [filePath, ...rawArguments];
|
|
@@ -187867,16 +187241,16 @@ var quoteString = (escapedArgument) => {
|
|
|
187867
187241
|
if (NO_ESCAPE_REGEXP.test(escapedArgument)) {
|
|
187868
187242
|
return escapedArgument;
|
|
187869
187243
|
}
|
|
187870
|
-
return
|
|
187244
|
+
return platform5 === "win32" ? `"${escapedArgument.replaceAll('"', '""')}"` : `'${escapedArgument.replaceAll("'", "'\\''")}'`;
|
|
187871
187245
|
};
|
|
187872
187246
|
var NO_ESCAPE_REGEXP = /^[\w./-]+$/;
|
|
187873
187247
|
|
|
187874
187248
|
// node_modules/is-unicode-supported/index.js
|
|
187875
|
-
import
|
|
187249
|
+
import process7 from "node:process";
|
|
187876
187250
|
function isUnicodeSupported() {
|
|
187877
|
-
const { env: env2 } =
|
|
187251
|
+
const { env: env2 } = process7;
|
|
187878
187252
|
const { TERM, TERM_PROGRAM } = env2;
|
|
187879
|
-
if (
|
|
187253
|
+
if (process7.platform !== "win32") {
|
|
187880
187254
|
return TERM !== "linux";
|
|
187881
187255
|
}
|
|
187882
187256
|
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";
|
|
@@ -188161,11 +187535,11 @@ var replacements = Object.entries(specialMainSymbols);
|
|
|
188161
187535
|
// node_modules/yoctocolors/base.js
|
|
188162
187536
|
import tty2 from "node:tty";
|
|
188163
187537
|
var hasColors = tty2?.WriteStream?.prototype?.hasColors?.() ?? false;
|
|
188164
|
-
var format = (
|
|
187538
|
+
var format = (open, close) => {
|
|
188165
187539
|
if (!hasColors) {
|
|
188166
187540
|
return (input) => input;
|
|
188167
187541
|
}
|
|
188168
|
-
const openCode = `\x1B[${
|
|
187542
|
+
const openCode = `\x1B[${open}m`;
|
|
188169
187543
|
const closeCode = `\x1B[${close}m`;
|
|
188170
187544
|
return (input) => {
|
|
188171
187545
|
const string4 = input + "";
|
|
@@ -188382,43 +187756,43 @@ var handleCommand = (filePath, rawArguments, rawOptions) => {
|
|
|
188382
187756
|
|
|
188383
187757
|
// node_modules/execa/lib/arguments/options.js
|
|
188384
187758
|
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
188385
|
-
import
|
|
188386
|
-
import
|
|
187759
|
+
import path15 from "node:path";
|
|
187760
|
+
import process10 from "node:process";
|
|
188387
187761
|
|
|
188388
187762
|
// node_modules/npm-run-path/index.js
|
|
188389
|
-
import
|
|
188390
|
-
import
|
|
187763
|
+
import process8 from "node:process";
|
|
187764
|
+
import path12 from "node:path";
|
|
188391
187765
|
|
|
188392
187766
|
// node_modules/npm-run-path/node_modules/path-key/index.js
|
|
188393
187767
|
function pathKey(options = {}) {
|
|
188394
187768
|
const {
|
|
188395
187769
|
env: env2 = process.env,
|
|
188396
|
-
platform:
|
|
187770
|
+
platform: platform6 = process.platform
|
|
188397
187771
|
} = options;
|
|
188398
|
-
if (
|
|
187772
|
+
if (platform6 !== "win32") {
|
|
188399
187773
|
return "PATH";
|
|
188400
187774
|
}
|
|
188401
187775
|
return Object.keys(env2).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
|
|
188402
187776
|
}
|
|
188403
187777
|
|
|
188404
187778
|
// node_modules/npm-run-path/node_modules/unicorn-magic/node.js
|
|
188405
|
-
import { promisify as
|
|
187779
|
+
import { promisify as promisify3 } from "node:util";
|
|
188406
187780
|
import { execFile as execFileCallback2, execFileSync as execFileSyncOriginal2 } from "node:child_process";
|
|
188407
|
-
import
|
|
188408
|
-
import { fileURLToPath as
|
|
188409
|
-
var execFileOriginal2 =
|
|
187781
|
+
import path11 from "node:path";
|
|
187782
|
+
import { fileURLToPath as fileURLToPath4 } from "node:url";
|
|
187783
|
+
var execFileOriginal2 = promisify3(execFileCallback2);
|
|
188410
187784
|
function toPath2(urlOrPath) {
|
|
188411
|
-
return urlOrPath instanceof URL ?
|
|
187785
|
+
return urlOrPath instanceof URL ? fileURLToPath4(urlOrPath) : urlOrPath;
|
|
188412
187786
|
}
|
|
188413
187787
|
function traversePathUp(startPath) {
|
|
188414
187788
|
return {
|
|
188415
187789
|
*[Symbol.iterator]() {
|
|
188416
|
-
let currentPath =
|
|
187790
|
+
let currentPath = path11.resolve(toPath2(startPath));
|
|
188417
187791
|
let previousPath;
|
|
188418
187792
|
while (previousPath !== currentPath) {
|
|
188419
187793
|
yield currentPath;
|
|
188420
187794
|
previousPath = currentPath;
|
|
188421
|
-
currentPath =
|
|
187795
|
+
currentPath = path11.resolve(currentPath, "..");
|
|
188422
187796
|
}
|
|
188423
187797
|
}
|
|
188424
187798
|
};
|
|
@@ -188427,38 +187801,38 @@ var TEN_MEGABYTES_IN_BYTES2 = 10 * 1024 * 1024;
|
|
|
188427
187801
|
|
|
188428
187802
|
// node_modules/npm-run-path/index.js
|
|
188429
187803
|
var npmRunPath = ({
|
|
188430
|
-
cwd =
|
|
188431
|
-
path: pathOption =
|
|
187804
|
+
cwd = process8.cwd(),
|
|
187805
|
+
path: pathOption = process8.env[pathKey()],
|
|
188432
187806
|
preferLocal = true,
|
|
188433
|
-
execPath =
|
|
187807
|
+
execPath = process8.execPath,
|
|
188434
187808
|
addExecPath = true
|
|
188435
187809
|
} = {}) => {
|
|
188436
|
-
const cwdPath =
|
|
187810
|
+
const cwdPath = path12.resolve(toPath2(cwd));
|
|
188437
187811
|
const result = [];
|
|
188438
|
-
const pathParts = pathOption.split(
|
|
187812
|
+
const pathParts = pathOption.split(path12.delimiter);
|
|
188439
187813
|
if (preferLocal) {
|
|
188440
187814
|
applyPreferLocal(result, pathParts, cwdPath);
|
|
188441
187815
|
}
|
|
188442
187816
|
if (addExecPath) {
|
|
188443
187817
|
applyExecPath(result, pathParts, execPath, cwdPath);
|
|
188444
187818
|
}
|
|
188445
|
-
return pathOption === "" || pathOption ===
|
|
187819
|
+
return pathOption === "" || pathOption === path12.delimiter ? `${result.join(path12.delimiter)}${pathOption}` : [...result, pathOption].join(path12.delimiter);
|
|
188446
187820
|
};
|
|
188447
187821
|
var applyPreferLocal = (result, pathParts, cwdPath) => {
|
|
188448
187822
|
for (const directory of traversePathUp(cwdPath)) {
|
|
188449
|
-
const pathPart =
|
|
187823
|
+
const pathPart = path12.join(directory, "node_modules/.bin");
|
|
188450
187824
|
if (!pathParts.includes(pathPart)) {
|
|
188451
187825
|
result.push(pathPart);
|
|
188452
187826
|
}
|
|
188453
187827
|
}
|
|
188454
187828
|
};
|
|
188455
187829
|
var applyExecPath = (result, pathParts, execPath, cwdPath) => {
|
|
188456
|
-
const pathPart =
|
|
187830
|
+
const pathPart = path12.resolve(cwdPath, toPath2(execPath), "..");
|
|
188457
187831
|
if (!pathParts.includes(pathPart)) {
|
|
188458
187832
|
result.push(pathPart);
|
|
188459
187833
|
}
|
|
188460
187834
|
};
|
|
188461
|
-
var npmRunPathEnv = ({ env: env2 =
|
|
187835
|
+
var npmRunPathEnv = ({ env: env2 = process8.env, ...options } = {}) => {
|
|
188462
187836
|
env2 = { ...env2 };
|
|
188463
187837
|
const pathName = pathKey({ env: env2 });
|
|
188464
187838
|
options.path = env2[pathName];
|
|
@@ -189007,7 +188381,7 @@ var terminateOnCancel = async (subprocess, cancelSignal, context, { signal }) =>
|
|
|
189007
188381
|
import { scheduler as scheduler2 } from "node:timers/promises";
|
|
189008
188382
|
|
|
189009
188383
|
// node_modules/execa/lib/ipc/send.js
|
|
189010
|
-
import { promisify as
|
|
188384
|
+
import { promisify as promisify4 } from "node:util";
|
|
189011
188385
|
|
|
189012
188386
|
// node_modules/execa/lib/ipc/validation.js
|
|
189013
188387
|
var validateIpcMethod = ({ methodName, isSubprocess, ipc, isConnected }) => {
|
|
@@ -189472,7 +188846,7 @@ var getSendMethod = (anyProcess) => {
|
|
|
189472
188846
|
if (PROCESS_SEND_METHODS.has(anyProcess)) {
|
|
189473
188847
|
return PROCESS_SEND_METHODS.get(anyProcess);
|
|
189474
188848
|
}
|
|
189475
|
-
const sendMethod =
|
|
188849
|
+
const sendMethod = promisify4(anyProcess.send.bind(anyProcess));
|
|
189476
188850
|
PROCESS_SEND_METHODS.set(anyProcess, sendMethod);
|
|
189477
188851
|
return sendMethod;
|
|
189478
188852
|
};
|
|
@@ -189602,7 +188976,7 @@ var killAfterTimeout = async (subprocess, timeout2, context, { signal }) => {
|
|
|
189602
188976
|
|
|
189603
188977
|
// node_modules/execa/lib/methods/node.js
|
|
189604
188978
|
import { execPath, execArgv } from "node:process";
|
|
189605
|
-
import
|
|
188979
|
+
import path13 from "node:path";
|
|
189606
188980
|
var mapNode = ({ options }) => {
|
|
189607
188981
|
if (options.node === false) {
|
|
189608
188982
|
throw new TypeError('The "node" option cannot be false with `execaNode()`.');
|
|
@@ -189621,7 +188995,7 @@ var handleNodeOption = (file2, commandArguments, {
|
|
|
189621
188995
|
throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');
|
|
189622
188996
|
}
|
|
189623
188997
|
const normalizedNodePath = safeNormalizeFileUrl(nodePath2, 'The "nodePath" option');
|
|
189624
|
-
const resolvedNodePath =
|
|
188998
|
+
const resolvedNodePath = path13.resolve(cwd, normalizedNodePath);
|
|
189625
188999
|
const newOptions = {
|
|
189626
189000
|
...options,
|
|
189627
189001
|
nodePath: resolvedNodePath,
|
|
@@ -189631,7 +189005,7 @@ var handleNodeOption = (file2, commandArguments, {
|
|
|
189631
189005
|
if (!shouldHandleNode) {
|
|
189632
189006
|
return [file2, commandArguments, newOptions];
|
|
189633
189007
|
}
|
|
189634
|
-
if (
|
|
189008
|
+
if (path13.basename(file2, ".exe") === "node") {
|
|
189635
189009
|
throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');
|
|
189636
189010
|
}
|
|
189637
189011
|
return [
|
|
@@ -189720,15 +189094,15 @@ var serializeEncoding = (encoding) => typeof encoding === "string" ? `"${encodin
|
|
|
189720
189094
|
|
|
189721
189095
|
// node_modules/execa/lib/arguments/cwd.js
|
|
189722
189096
|
import { statSync } from "node:fs";
|
|
189723
|
-
import
|
|
189724
|
-
import
|
|
189097
|
+
import path14 from "node:path";
|
|
189098
|
+
import process9 from "node:process";
|
|
189725
189099
|
var normalizeCwd = (cwd = getDefaultCwd()) => {
|
|
189726
189100
|
const cwdString = safeNormalizeFileUrl(cwd, 'The "cwd" option');
|
|
189727
|
-
return
|
|
189101
|
+
return path14.resolve(cwdString);
|
|
189728
189102
|
};
|
|
189729
189103
|
var getDefaultCwd = () => {
|
|
189730
189104
|
try {
|
|
189731
|
-
return
|
|
189105
|
+
return process9.cwd();
|
|
189732
189106
|
} catch (error48) {
|
|
189733
189107
|
error48.message = `The current directory does not exist.
|
|
189734
189108
|
${error48.message}`;
|
|
@@ -189771,7 +189145,7 @@ var normalizeOptions3 = (filePath, rawArguments, rawOptions) => {
|
|
|
189771
189145
|
options.killSignal = normalizeKillSignal(options.killSignal);
|
|
189772
189146
|
options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
|
|
189773
189147
|
options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
|
|
189774
|
-
if (
|
|
189148
|
+
if (process10.platform === "win32" && path15.basename(file2, ".exe") === "cmd") {
|
|
189775
189149
|
commandArguments.unshift("/q");
|
|
189776
189150
|
}
|
|
189777
189151
|
return { file: file2, commandArguments, options };
|
|
@@ -189812,7 +189186,7 @@ var addDefaultOptions = ({
|
|
|
189812
189186
|
serialization
|
|
189813
189187
|
});
|
|
189814
189188
|
var getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath: nodePath2 }) => {
|
|
189815
|
-
const env2 = extendEnv ? { ...
|
|
189189
|
+
const env2 = extendEnv ? { ...process10.env, ...envOption } : envOption;
|
|
189816
189190
|
if (preferLocal || node) {
|
|
189817
189191
|
return npmRunPathEnv({
|
|
189818
189192
|
env: env2,
|
|
@@ -190981,7 +190355,7 @@ var normalizeGenerator = ({ stdioItem, stdioItem: { value }, index, newTransform
|
|
|
190981
190355
|
var sortTransforms = (newTransforms, direction) => direction === "input" ? newTransforms.reverse() : newTransforms;
|
|
190982
190356
|
|
|
190983
190357
|
// node_modules/execa/lib/stdio/direction.js
|
|
190984
|
-
import
|
|
190358
|
+
import process11 from "node:process";
|
|
190985
190359
|
var getStreamDirection = (stdioItems, fdNumber, optionName) => {
|
|
190986
190360
|
const directions = stdioItems.map((stdioItem) => getStdioItemDirection(stdioItem, fdNumber));
|
|
190987
190361
|
if (directions.includes("input") && directions.includes("output")) {
|
|
@@ -191023,10 +190397,10 @@ var guessStreamDirection = {
|
|
|
191023
190397
|
}
|
|
191024
190398
|
};
|
|
191025
190399
|
var getStandardStreamDirection = (value) => {
|
|
191026
|
-
if ([0,
|
|
190400
|
+
if ([0, process11.stdin].includes(value)) {
|
|
191027
190401
|
return "input";
|
|
191028
190402
|
}
|
|
191029
|
-
if ([1, 2,
|
|
190403
|
+
if ([1, 2, process11.stdout, process11.stderr].includes(value)) {
|
|
191030
190404
|
return "output";
|
|
191031
190405
|
}
|
|
191032
190406
|
};
|
|
@@ -191546,10 +190920,10 @@ var linesUint8ArrayInfo = {
|
|
|
191546
190920
|
};
|
|
191547
190921
|
|
|
191548
190922
|
// node_modules/execa/lib/transform/validate.js
|
|
191549
|
-
import { Buffer as
|
|
190923
|
+
import { Buffer as Buffer3 } from "node:buffer";
|
|
191550
190924
|
var getValidateTransformInput = (writableObjectMode, optionName) => writableObjectMode ? undefined : validateStringTransformInput.bind(undefined, optionName);
|
|
191551
190925
|
var validateStringTransformInput = function* (optionName, chunk) {
|
|
191552
|
-
if (typeof chunk !== "string" && !isUint8Array(chunk) && !
|
|
190926
|
+
if (typeof chunk !== "string" && !isUint8Array(chunk) && !Buffer3.isBuffer(chunk)) {
|
|
191553
190927
|
throw new TypeError(`The \`${optionName}\` option's transform must use "objectMode: true" to receive as input: ${typeof chunk}.`);
|
|
191554
190928
|
}
|
|
191555
190929
|
yield chunk;
|
|
@@ -191575,7 +190949,7 @@ Instead, \`yield\` should either be called with a value, or not be called at all
|
|
|
191575
190949
|
};
|
|
191576
190950
|
|
|
191577
190951
|
// node_modules/execa/lib/transform/encoding-transform.js
|
|
191578
|
-
import { Buffer as
|
|
190952
|
+
import { Buffer as Buffer4 } from "node:buffer";
|
|
191579
190953
|
import { StringDecoder as StringDecoder3 } from "node:string_decoder";
|
|
191580
190954
|
var getEncodingTransformGenerator = (binary, encoding, skipped) => {
|
|
191581
190955
|
if (skipped) {
|
|
@@ -191591,7 +190965,7 @@ var getEncodingTransformGenerator = (binary, encoding, skipped) => {
|
|
|
191591
190965
|
};
|
|
191592
190966
|
};
|
|
191593
190967
|
var encodingUint8ArrayGenerator = function* (textEncoder3, chunk) {
|
|
191594
|
-
if (
|
|
190968
|
+
if (Buffer4.isBuffer(chunk)) {
|
|
191595
190969
|
yield bufferToUint8Array(chunk);
|
|
191596
190970
|
} else if (typeof chunk === "string") {
|
|
191597
190971
|
yield textEncoder3.encode(chunk);
|
|
@@ -191908,13 +191282,13 @@ var logOutputSync = ({ serializedResult, fdNumber, state, verboseInfo, encoding,
|
|
|
191908
191282
|
}
|
|
191909
191283
|
};
|
|
191910
191284
|
var writeToFiles = (serializedResult, stdioItems, outputFiles) => {
|
|
191911
|
-
for (const { path:
|
|
191912
|
-
const pathString = typeof
|
|
191285
|
+
for (const { path: path16, append } of stdioItems.filter(({ type }) => FILE_TYPES.has(type))) {
|
|
191286
|
+
const pathString = typeof path16 === "string" ? path16 : path16.toString();
|
|
191913
191287
|
if (append || outputFiles.has(pathString)) {
|
|
191914
|
-
appendFileSync(
|
|
191288
|
+
appendFileSync(path16, serializedResult);
|
|
191915
191289
|
} else {
|
|
191916
191290
|
outputFiles.add(pathString);
|
|
191917
|
-
writeFileSync(
|
|
191291
|
+
writeFileSync(path16, serializedResult);
|
|
191918
191292
|
}
|
|
191919
191293
|
}
|
|
191920
191294
|
};
|
|
@@ -192133,7 +191507,7 @@ import { setMaxListeners } from "node:events";
|
|
|
192133
191507
|
import { spawn } from "node:child_process";
|
|
192134
191508
|
|
|
192135
191509
|
// node_modules/execa/lib/ipc/methods.js
|
|
192136
|
-
import
|
|
191510
|
+
import process12 from "node:process";
|
|
192137
191511
|
|
|
192138
191512
|
// node_modules/execa/lib/ipc/get-one.js
|
|
192139
191513
|
import { once as once6, on as on3 } from "node:events";
|
|
@@ -192272,9 +191646,9 @@ var addIpcMethods = (subprocess, { ipc }) => {
|
|
|
192272
191646
|
Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
|
|
192273
191647
|
};
|
|
192274
191648
|
var getIpcExport = () => {
|
|
192275
|
-
const anyProcess =
|
|
191649
|
+
const anyProcess = process12;
|
|
192276
191650
|
const isSubprocess = true;
|
|
192277
|
-
const ipc =
|
|
191651
|
+
const ipc = process12.channel !== undefined;
|
|
192278
191652
|
return {
|
|
192279
191653
|
...getIpcMethods(anyProcess, isSubprocess, ipc),
|
|
192280
191654
|
getCancelSignal: getCancelSignal.bind(undefined, {
|
|
@@ -192358,7 +191732,7 @@ var handleDummyPromise = async (error48, verboseInfo, options) => handleResult(e
|
|
|
192358
191732
|
|
|
192359
191733
|
// node_modules/execa/lib/stdio/handle-async.js
|
|
192360
191734
|
import { createReadStream, createWriteStream } from "node:fs";
|
|
192361
|
-
import { Buffer as
|
|
191735
|
+
import { Buffer as Buffer5 } from "node:buffer";
|
|
192362
191736
|
import { Readable as Readable4, Writable as Writable2, Duplex as Duplex2 } from "node:stream";
|
|
192363
191737
|
var handleStdioAsync = (options, verboseInfo) => handleStdio(addPropertiesAsync, options, verboseInfo, false);
|
|
192364
191738
|
var forbiddenIfAsync = ({ type, optionName }) => {
|
|
@@ -192386,7 +191760,7 @@ var addPropertiesAsync = {
|
|
|
192386
191760
|
iterable: ({ value }) => ({ stream: Readable4.from(value) }),
|
|
192387
191761
|
asyncIterable: ({ value }) => ({ stream: Readable4.from(value) }),
|
|
192388
191762
|
string: ({ value }) => ({ stream: Readable4.from(value) }),
|
|
192389
|
-
uint8Array: ({ value }) => ({ stream: Readable4.from(
|
|
191763
|
+
uint8Array: ({ value }) => ({ stream: Readable4.from(Buffer5.from(value)) })
|
|
192390
191764
|
},
|
|
192391
191765
|
output: {
|
|
192392
191766
|
...addProperties2,
|
|
@@ -192502,7 +191876,7 @@ if (process.platform === "linux") {
|
|
|
192502
191876
|
}
|
|
192503
191877
|
|
|
192504
191878
|
// node_modules/signal-exit/dist/mjs/index.js
|
|
192505
|
-
var processOk = (
|
|
191879
|
+
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";
|
|
192506
191880
|
var kExitEmitter = Symbol.for("signal-exit emitter");
|
|
192507
191881
|
var global2 = globalThis;
|
|
192508
191882
|
var ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
@@ -192585,22 +191959,22 @@ class SignalExitFallback extends SignalExitBase {
|
|
|
192585
191959
|
}
|
|
192586
191960
|
|
|
192587
191961
|
class SignalExit extends SignalExitBase {
|
|
192588
|
-
#hupSig =
|
|
191962
|
+
#hupSig = process13.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
192589
191963
|
#emitter = new Emitter;
|
|
192590
191964
|
#process;
|
|
192591
191965
|
#originalProcessEmit;
|
|
192592
191966
|
#originalProcessReallyExit;
|
|
192593
191967
|
#sigListeners = {};
|
|
192594
191968
|
#loaded = false;
|
|
192595
|
-
constructor(
|
|
191969
|
+
constructor(process13) {
|
|
192596
191970
|
super();
|
|
192597
|
-
this.#process =
|
|
191971
|
+
this.#process = process13;
|
|
192598
191972
|
this.#sigListeners = {};
|
|
192599
191973
|
for (const sig of signals) {
|
|
192600
191974
|
this.#sigListeners[sig] = () => {
|
|
192601
191975
|
const listeners = this.#process.listeners(sig);
|
|
192602
191976
|
let { count: count2 } = this.#emitter;
|
|
192603
|
-
const p2 =
|
|
191977
|
+
const p2 = process13;
|
|
192604
191978
|
if (typeof p2.__signal_exit_emitter__ === "object" && typeof p2.__signal_exit_emitter__.count === "number") {
|
|
192605
191979
|
count2 += p2.__signal_exit_emitter__.count;
|
|
192606
191980
|
}
|
|
@@ -192609,12 +191983,12 @@ class SignalExit extends SignalExitBase {
|
|
|
192609
191983
|
const ret = this.#emitter.emit("exit", null, sig);
|
|
192610
191984
|
const s = sig === "SIGHUP" ? this.#hupSig : sig;
|
|
192611
191985
|
if (!ret)
|
|
192612
|
-
|
|
191986
|
+
process13.kill(process13.pid, s);
|
|
192613
191987
|
}
|
|
192614
191988
|
};
|
|
192615
191989
|
}
|
|
192616
|
-
this.#originalProcessReallyExit =
|
|
192617
|
-
this.#originalProcessEmit =
|
|
191990
|
+
this.#originalProcessReallyExit = process13.reallyExit;
|
|
191991
|
+
this.#originalProcessEmit = process13.emit;
|
|
192618
191992
|
}
|
|
192619
191993
|
onExit(cb, opts) {
|
|
192620
191994
|
if (!processOk(this.#process)) {
|
|
@@ -192692,12 +192066,12 @@ class SignalExit extends SignalExitBase {
|
|
|
192692
192066
|
}
|
|
192693
192067
|
}
|
|
192694
192068
|
}
|
|
192695
|
-
var
|
|
192069
|
+
var process13 = globalThis.process;
|
|
192696
192070
|
var {
|
|
192697
192071
|
onExit,
|
|
192698
192072
|
load,
|
|
192699
192073
|
unload
|
|
192700
|
-
} = signalExitWrap(processOk(
|
|
192074
|
+
} = signalExitWrap(processOk(process13) ? new SignalExit(process13) : new SignalExitFallback);
|
|
192701
192075
|
|
|
192702
192076
|
// node_modules/execa/lib/terminate/cleanup.js
|
|
192703
192077
|
var cleanupOnExit = (subprocess, { cleanup, detached }, { signal }) => {
|
|
@@ -194317,16 +193691,667 @@ function getWhoamiCommand(context) {
|
|
|
194317
193691
|
});
|
|
194318
193692
|
}
|
|
194319
193693
|
|
|
193694
|
+
// node_modules/open/index.js
|
|
193695
|
+
import process20 from "node:process";
|
|
193696
|
+
import path16 from "node:path";
|
|
193697
|
+
import { fileURLToPath as fileURLToPath5 } from "node:url";
|
|
193698
|
+
import childProcess3 from "node:child_process";
|
|
193699
|
+
import fs19, { constants as fsConstants2 } from "node:fs/promises";
|
|
193700
|
+
|
|
193701
|
+
// node_modules/wsl-utils/index.js
|
|
193702
|
+
import { promisify as promisify6 } from "node:util";
|
|
193703
|
+
import childProcess2 from "node:child_process";
|
|
193704
|
+
import fs18, { constants as fsConstants } from "node:fs/promises";
|
|
193705
|
+
|
|
193706
|
+
// node_modules/is-wsl/index.js
|
|
193707
|
+
import process14 from "node:process";
|
|
193708
|
+
import os2 from "node:os";
|
|
193709
|
+
import fs17 from "node:fs";
|
|
193710
|
+
|
|
193711
|
+
// node_modules/is-inside-container/index.js
|
|
193712
|
+
import fs16 from "node:fs";
|
|
193713
|
+
|
|
193714
|
+
// node_modules/is-docker/index.js
|
|
193715
|
+
import fs15 from "node:fs";
|
|
193716
|
+
var isDockerCached;
|
|
193717
|
+
function hasDockerEnv() {
|
|
193718
|
+
try {
|
|
193719
|
+
fs15.statSync("/.dockerenv");
|
|
193720
|
+
return true;
|
|
193721
|
+
} catch {
|
|
193722
|
+
return false;
|
|
193723
|
+
}
|
|
193724
|
+
}
|
|
193725
|
+
function hasDockerCGroup() {
|
|
193726
|
+
try {
|
|
193727
|
+
return fs15.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
|
|
193728
|
+
} catch {
|
|
193729
|
+
return false;
|
|
193730
|
+
}
|
|
193731
|
+
}
|
|
193732
|
+
function isDocker() {
|
|
193733
|
+
if (isDockerCached === undefined) {
|
|
193734
|
+
isDockerCached = hasDockerEnv() || hasDockerCGroup();
|
|
193735
|
+
}
|
|
193736
|
+
return isDockerCached;
|
|
193737
|
+
}
|
|
193738
|
+
|
|
193739
|
+
// node_modules/is-inside-container/index.js
|
|
193740
|
+
var cachedResult;
|
|
193741
|
+
var hasContainerEnv = () => {
|
|
193742
|
+
try {
|
|
193743
|
+
fs16.statSync("/run/.containerenv");
|
|
193744
|
+
return true;
|
|
193745
|
+
} catch {
|
|
193746
|
+
return false;
|
|
193747
|
+
}
|
|
193748
|
+
};
|
|
193749
|
+
function isInsideContainer() {
|
|
193750
|
+
if (cachedResult === undefined) {
|
|
193751
|
+
cachedResult = hasContainerEnv() || isDocker();
|
|
193752
|
+
}
|
|
193753
|
+
return cachedResult;
|
|
193754
|
+
}
|
|
193755
|
+
|
|
193756
|
+
// node_modules/is-wsl/index.js
|
|
193757
|
+
var isWsl = () => {
|
|
193758
|
+
if (process14.platform !== "linux") {
|
|
193759
|
+
return false;
|
|
193760
|
+
}
|
|
193761
|
+
if (os2.release().toLowerCase().includes("microsoft")) {
|
|
193762
|
+
if (isInsideContainer()) {
|
|
193763
|
+
return false;
|
|
193764
|
+
}
|
|
193765
|
+
return true;
|
|
193766
|
+
}
|
|
193767
|
+
try {
|
|
193768
|
+
return fs17.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isInsideContainer() : false;
|
|
193769
|
+
} catch {
|
|
193770
|
+
return false;
|
|
193771
|
+
}
|
|
193772
|
+
};
|
|
193773
|
+
var is_wsl_default = process14.env.__IS_WSL_TEST__ ? isWsl : isWsl();
|
|
193774
|
+
|
|
193775
|
+
// node_modules/powershell-utils/index.js
|
|
193776
|
+
import process15 from "node:process";
|
|
193777
|
+
import { Buffer as Buffer6 } from "node:buffer";
|
|
193778
|
+
import { promisify as promisify5 } from "node:util";
|
|
193779
|
+
import childProcess from "node:child_process";
|
|
193780
|
+
var execFile = promisify5(childProcess.execFile);
|
|
193781
|
+
var powerShellPath = () => `${process15.env.SYSTEMROOT || process15.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
|
|
193782
|
+
var executePowerShell = async (command, options = {}) => {
|
|
193783
|
+
const {
|
|
193784
|
+
powerShellPath: psPath,
|
|
193785
|
+
...execFileOptions
|
|
193786
|
+
} = options;
|
|
193787
|
+
const encodedCommand = executePowerShell.encodeCommand(command);
|
|
193788
|
+
return execFile(psPath ?? powerShellPath(), [
|
|
193789
|
+
...executePowerShell.argumentsPrefix,
|
|
193790
|
+
encodedCommand
|
|
193791
|
+
], {
|
|
193792
|
+
encoding: "utf8",
|
|
193793
|
+
...execFileOptions
|
|
193794
|
+
});
|
|
193795
|
+
};
|
|
193796
|
+
executePowerShell.argumentsPrefix = [
|
|
193797
|
+
"-NoProfile",
|
|
193798
|
+
"-NonInteractive",
|
|
193799
|
+
"-ExecutionPolicy",
|
|
193800
|
+
"Bypass",
|
|
193801
|
+
"-EncodedCommand"
|
|
193802
|
+
];
|
|
193803
|
+
executePowerShell.encodeCommand = (command) => Buffer6.from(command, "utf16le").toString("base64");
|
|
193804
|
+
executePowerShell.escapeArgument = (value) => `'${String(value).replaceAll("'", "''")}'`;
|
|
193805
|
+
|
|
193806
|
+
// node_modules/wsl-utils/utilities.js
|
|
193807
|
+
function parseMountPointFromConfig(content) {
|
|
193808
|
+
for (const line of content.split(`
|
|
193809
|
+
`)) {
|
|
193810
|
+
if (/^\s*#/.test(line)) {
|
|
193811
|
+
continue;
|
|
193812
|
+
}
|
|
193813
|
+
const match = /^\s*root\s*=\s*(?<mountPoint>"[^"]*"|'[^']*'|[^#]*)/.exec(line);
|
|
193814
|
+
if (!match) {
|
|
193815
|
+
continue;
|
|
193816
|
+
}
|
|
193817
|
+
return match.groups.mountPoint.trim().replaceAll(/^["']|["']$/g, "");
|
|
193818
|
+
}
|
|
193819
|
+
}
|
|
193820
|
+
|
|
193821
|
+
// node_modules/wsl-utils/index.js
|
|
193822
|
+
var execFile2 = promisify6(childProcess2.execFile);
|
|
193823
|
+
var wslDrivesMountPoint = (() => {
|
|
193824
|
+
const defaultMountPoint = "/mnt/";
|
|
193825
|
+
let mountPoint;
|
|
193826
|
+
return async function() {
|
|
193827
|
+
if (mountPoint) {
|
|
193828
|
+
return mountPoint;
|
|
193829
|
+
}
|
|
193830
|
+
const configFilePath = "/etc/wsl.conf";
|
|
193831
|
+
let isConfigFileExists = false;
|
|
193832
|
+
try {
|
|
193833
|
+
await fs18.access(configFilePath, fsConstants.F_OK);
|
|
193834
|
+
isConfigFileExists = true;
|
|
193835
|
+
} catch {}
|
|
193836
|
+
if (!isConfigFileExists) {
|
|
193837
|
+
return defaultMountPoint;
|
|
193838
|
+
}
|
|
193839
|
+
const configContent = await fs18.readFile(configFilePath, { encoding: "utf8" });
|
|
193840
|
+
const parsedMountPoint = parseMountPointFromConfig(configContent);
|
|
193841
|
+
if (parsedMountPoint === undefined) {
|
|
193842
|
+
return defaultMountPoint;
|
|
193843
|
+
}
|
|
193844
|
+
mountPoint = parsedMountPoint;
|
|
193845
|
+
mountPoint = mountPoint.endsWith("/") ? mountPoint : `${mountPoint}/`;
|
|
193846
|
+
return mountPoint;
|
|
193847
|
+
};
|
|
193848
|
+
})();
|
|
193849
|
+
var powerShellPathFromWsl = async () => {
|
|
193850
|
+
const mountPoint = await wslDrivesMountPoint();
|
|
193851
|
+
return `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`;
|
|
193852
|
+
};
|
|
193853
|
+
var powerShellPath2 = is_wsl_default ? powerShellPathFromWsl : powerShellPath;
|
|
193854
|
+
var canAccessPowerShellPromise;
|
|
193855
|
+
var canAccessPowerShell = async () => {
|
|
193856
|
+
canAccessPowerShellPromise ??= (async () => {
|
|
193857
|
+
try {
|
|
193858
|
+
const psPath = await powerShellPath2();
|
|
193859
|
+
await fs18.access(psPath, fsConstants.X_OK);
|
|
193860
|
+
return true;
|
|
193861
|
+
} catch {
|
|
193862
|
+
return false;
|
|
193863
|
+
}
|
|
193864
|
+
})();
|
|
193865
|
+
return canAccessPowerShellPromise;
|
|
193866
|
+
};
|
|
193867
|
+
var wslDefaultBrowser = async () => {
|
|
193868
|
+
const psPath = await powerShellPath2();
|
|
193869
|
+
const command = String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`;
|
|
193870
|
+
const { stdout } = await executePowerShell(command, { powerShellPath: psPath });
|
|
193871
|
+
return stdout.trim();
|
|
193872
|
+
};
|
|
193873
|
+
var convertWslPathToWindows = async (path16) => {
|
|
193874
|
+
if (/^[a-z]+:\/\//i.test(path16)) {
|
|
193875
|
+
return path16;
|
|
193876
|
+
}
|
|
193877
|
+
try {
|
|
193878
|
+
const { stdout } = await execFile2("wslpath", ["-aw", path16], { encoding: "utf8" });
|
|
193879
|
+
return stdout.trim();
|
|
193880
|
+
} catch {
|
|
193881
|
+
return path16;
|
|
193882
|
+
}
|
|
193883
|
+
};
|
|
193884
|
+
|
|
193885
|
+
// node_modules/define-lazy-prop/index.js
|
|
193886
|
+
function defineLazyProperty(object2, propertyName, valueGetter) {
|
|
193887
|
+
const define2 = (value) => Object.defineProperty(object2, propertyName, { value, enumerable: true, writable: true });
|
|
193888
|
+
Object.defineProperty(object2, propertyName, {
|
|
193889
|
+
configurable: true,
|
|
193890
|
+
enumerable: true,
|
|
193891
|
+
get() {
|
|
193892
|
+
const result = valueGetter();
|
|
193893
|
+
define2(result);
|
|
193894
|
+
return result;
|
|
193895
|
+
},
|
|
193896
|
+
set(value) {
|
|
193897
|
+
define2(value);
|
|
193898
|
+
}
|
|
193899
|
+
});
|
|
193900
|
+
return object2;
|
|
193901
|
+
}
|
|
193902
|
+
|
|
193903
|
+
// node_modules/default-browser/index.js
|
|
193904
|
+
import { promisify as promisify10 } from "node:util";
|
|
193905
|
+
import process18 from "node:process";
|
|
193906
|
+
import { execFile as execFile6 } from "node:child_process";
|
|
193907
|
+
|
|
193908
|
+
// node_modules/default-browser-id/index.js
|
|
193909
|
+
import { promisify as promisify7 } from "node:util";
|
|
193910
|
+
import process16 from "node:process";
|
|
193911
|
+
import { execFile as execFile3 } from "node:child_process";
|
|
193912
|
+
var execFileAsync = promisify7(execFile3);
|
|
193913
|
+
async function defaultBrowserId() {
|
|
193914
|
+
if (process16.platform !== "darwin") {
|
|
193915
|
+
throw new Error("macOS only");
|
|
193916
|
+
}
|
|
193917
|
+
const { stdout } = await execFileAsync("defaults", ["read", "com.apple.LaunchServices/com.apple.launchservices.secure", "LSHandlers"]);
|
|
193918
|
+
const match = /LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout);
|
|
193919
|
+
const browserId = match?.groups.id ?? "com.apple.Safari";
|
|
193920
|
+
if (browserId === "com.apple.safari") {
|
|
193921
|
+
return "com.apple.Safari";
|
|
193922
|
+
}
|
|
193923
|
+
return browserId;
|
|
193924
|
+
}
|
|
193925
|
+
|
|
193926
|
+
// node_modules/run-applescript/index.js
|
|
193927
|
+
import process17 from "node:process";
|
|
193928
|
+
import { promisify as promisify8 } from "node:util";
|
|
193929
|
+
import { execFile as execFile4, execFileSync } from "node:child_process";
|
|
193930
|
+
var execFileAsync2 = promisify8(execFile4);
|
|
193931
|
+
async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {
|
|
193932
|
+
if (process17.platform !== "darwin") {
|
|
193933
|
+
throw new Error("macOS only");
|
|
193934
|
+
}
|
|
193935
|
+
const outputArguments = humanReadableOutput ? [] : ["-ss"];
|
|
193936
|
+
const execOptions = {};
|
|
193937
|
+
if (signal) {
|
|
193938
|
+
execOptions.signal = signal;
|
|
193939
|
+
}
|
|
193940
|
+
const { stdout } = await execFileAsync2("osascript", ["-e", script, outputArguments], execOptions);
|
|
193941
|
+
return stdout.trim();
|
|
193942
|
+
}
|
|
193943
|
+
|
|
193944
|
+
// node_modules/bundle-name/index.js
|
|
193945
|
+
async function bundleName(bundleId) {
|
|
193946
|
+
return runAppleScript(`tell application "Finder" to set app_path to application file id "${bundleId}" as string
|
|
193947
|
+
tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`);
|
|
193948
|
+
}
|
|
193949
|
+
|
|
193950
|
+
// node_modules/default-browser/windows.js
|
|
193951
|
+
import { promisify as promisify9 } from "node:util";
|
|
193952
|
+
import { execFile as execFile5 } from "node:child_process";
|
|
193953
|
+
var execFileAsync3 = promisify9(execFile5);
|
|
193954
|
+
var windowsBrowserProgIds = {
|
|
193955
|
+
MSEdgeHTM: { name: "Edge", id: "com.microsoft.edge" },
|
|
193956
|
+
MSEdgeBHTML: { name: "Edge Beta", id: "com.microsoft.edge.beta" },
|
|
193957
|
+
MSEdgeDHTML: { name: "Edge Dev", id: "com.microsoft.edge.dev" },
|
|
193958
|
+
AppXq0fevzme2pys62n3e0fbqa7peapykr8v: { name: "Edge", id: "com.microsoft.edge.old" },
|
|
193959
|
+
ChromeHTML: { name: "Chrome", id: "com.google.chrome" },
|
|
193960
|
+
ChromeBHTML: { name: "Chrome Beta", id: "com.google.chrome.beta" },
|
|
193961
|
+
ChromeDHTML: { name: "Chrome Dev", id: "com.google.chrome.dev" },
|
|
193962
|
+
ChromiumHTM: { name: "Chromium", id: "org.chromium.Chromium" },
|
|
193963
|
+
BraveHTML: { name: "Brave", id: "com.brave.Browser" },
|
|
193964
|
+
BraveBHTML: { name: "Brave Beta", id: "com.brave.Browser.beta" },
|
|
193965
|
+
BraveDHTML: { name: "Brave Dev", id: "com.brave.Browser.dev" },
|
|
193966
|
+
BraveSSHTM: { name: "Brave Nightly", id: "com.brave.Browser.nightly" },
|
|
193967
|
+
FirefoxURL: { name: "Firefox", id: "org.mozilla.firefox" },
|
|
193968
|
+
OperaStable: { name: "Opera", id: "com.operasoftware.Opera" },
|
|
193969
|
+
VivaldiHTM: { name: "Vivaldi", id: "com.vivaldi.Vivaldi" },
|
|
193970
|
+
"IE.HTTP": { name: "Internet Explorer", id: "com.microsoft.ie" }
|
|
193971
|
+
};
|
|
193972
|
+
var _windowsBrowserProgIdMap = new Map(Object.entries(windowsBrowserProgIds));
|
|
193973
|
+
|
|
193974
|
+
class UnknownBrowserError extends Error {
|
|
193975
|
+
}
|
|
193976
|
+
async function defaultBrowser(_execFileAsync = execFileAsync3) {
|
|
193977
|
+
const { stdout } = await _execFileAsync("reg", [
|
|
193978
|
+
"QUERY",
|
|
193979
|
+
" HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice",
|
|
193980
|
+
"/v",
|
|
193981
|
+
"ProgId"
|
|
193982
|
+
]);
|
|
193983
|
+
const match = /ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(stdout);
|
|
193984
|
+
if (!match) {
|
|
193985
|
+
throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);
|
|
193986
|
+
}
|
|
193987
|
+
const { id } = match.groups;
|
|
193988
|
+
const dotIndex = id.lastIndexOf(".");
|
|
193989
|
+
const hyphenIndex = id.lastIndexOf("-");
|
|
193990
|
+
const baseIdByDot = dotIndex === -1 ? undefined : id.slice(0, dotIndex);
|
|
193991
|
+
const baseIdByHyphen = hyphenIndex === -1 ? undefined : id.slice(0, hyphenIndex);
|
|
193992
|
+
return windowsBrowserProgIds[id] ?? windowsBrowserProgIds[baseIdByDot] ?? windowsBrowserProgIds[baseIdByHyphen] ?? { name: id, id };
|
|
193993
|
+
}
|
|
193994
|
+
|
|
193995
|
+
// node_modules/default-browser/index.js
|
|
193996
|
+
var execFileAsync4 = promisify10(execFile6);
|
|
193997
|
+
var titleize = (string4) => string4.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x2) => x2.toUpperCase());
|
|
193998
|
+
async function defaultBrowser2() {
|
|
193999
|
+
if (process18.platform === "darwin") {
|
|
194000
|
+
const id = await defaultBrowserId();
|
|
194001
|
+
const name2 = await bundleName(id);
|
|
194002
|
+
return { name: name2, id };
|
|
194003
|
+
}
|
|
194004
|
+
if (process18.platform === "linux") {
|
|
194005
|
+
const { stdout } = await execFileAsync4("xdg-mime", ["query", "default", "x-scheme-handler/http"]);
|
|
194006
|
+
const id = stdout.trim();
|
|
194007
|
+
const name2 = titleize(id.replace(/.desktop$/, "").replace("-", " "));
|
|
194008
|
+
return { name: name2, id };
|
|
194009
|
+
}
|
|
194010
|
+
if (process18.platform === "win32") {
|
|
194011
|
+
return defaultBrowser();
|
|
194012
|
+
}
|
|
194013
|
+
throw new Error("Only macOS, Linux, and Windows are supported");
|
|
194014
|
+
}
|
|
194015
|
+
|
|
194016
|
+
// node_modules/is-in-ssh/index.js
|
|
194017
|
+
import process19 from "node:process";
|
|
194018
|
+
var isInSsh = Boolean(process19.env.SSH_CONNECTION || process19.env.SSH_CLIENT || process19.env.SSH_TTY);
|
|
194019
|
+
var is_in_ssh_default = isInSsh;
|
|
194020
|
+
|
|
194021
|
+
// node_modules/open/index.js
|
|
194022
|
+
var fallbackAttemptSymbol = Symbol("fallbackAttempt");
|
|
194023
|
+
var __dirname3 = import.meta.url ? path16.dirname(fileURLToPath5(import.meta.url)) : "";
|
|
194024
|
+
var localXdgOpenPath = path16.join(__dirname3, "xdg-open");
|
|
194025
|
+
var { platform: platform6, arch } = process20;
|
|
194026
|
+
var tryEachApp = async (apps, opener) => {
|
|
194027
|
+
if (apps.length === 0) {
|
|
194028
|
+
return;
|
|
194029
|
+
}
|
|
194030
|
+
const errors4 = [];
|
|
194031
|
+
for (const app of apps) {
|
|
194032
|
+
try {
|
|
194033
|
+
return await opener(app);
|
|
194034
|
+
} catch (error48) {
|
|
194035
|
+
errors4.push(error48);
|
|
194036
|
+
}
|
|
194037
|
+
}
|
|
194038
|
+
throw new AggregateError(errors4, "Failed to open in all supported apps");
|
|
194039
|
+
};
|
|
194040
|
+
var baseOpen = async (options) => {
|
|
194041
|
+
options = {
|
|
194042
|
+
wait: false,
|
|
194043
|
+
background: false,
|
|
194044
|
+
newInstance: false,
|
|
194045
|
+
allowNonzeroExitCode: false,
|
|
194046
|
+
...options
|
|
194047
|
+
};
|
|
194048
|
+
const isFallbackAttempt = options[fallbackAttemptSymbol] === true;
|
|
194049
|
+
delete options[fallbackAttemptSymbol];
|
|
194050
|
+
if (Array.isArray(options.app)) {
|
|
194051
|
+
return tryEachApp(options.app, (singleApp) => baseOpen({
|
|
194052
|
+
...options,
|
|
194053
|
+
app: singleApp,
|
|
194054
|
+
[fallbackAttemptSymbol]: true
|
|
194055
|
+
}));
|
|
194056
|
+
}
|
|
194057
|
+
let { name: app, arguments: appArguments = [] } = options.app ?? {};
|
|
194058
|
+
appArguments = [...appArguments];
|
|
194059
|
+
if (Array.isArray(app)) {
|
|
194060
|
+
return tryEachApp(app, (appName) => baseOpen({
|
|
194061
|
+
...options,
|
|
194062
|
+
app: {
|
|
194063
|
+
name: appName,
|
|
194064
|
+
arguments: appArguments
|
|
194065
|
+
},
|
|
194066
|
+
[fallbackAttemptSymbol]: true
|
|
194067
|
+
}));
|
|
194068
|
+
}
|
|
194069
|
+
if (app === "browser" || app === "browserPrivate") {
|
|
194070
|
+
const ids = {
|
|
194071
|
+
"com.google.chrome": "chrome",
|
|
194072
|
+
"google-chrome.desktop": "chrome",
|
|
194073
|
+
"com.brave.browser": "brave",
|
|
194074
|
+
"org.mozilla.firefox": "firefox",
|
|
194075
|
+
"firefox.desktop": "firefox",
|
|
194076
|
+
"com.microsoft.msedge": "edge",
|
|
194077
|
+
"com.microsoft.edge": "edge",
|
|
194078
|
+
"com.microsoft.edgemac": "edge",
|
|
194079
|
+
"microsoft-edge.desktop": "edge",
|
|
194080
|
+
"com.apple.safari": "safari"
|
|
194081
|
+
};
|
|
194082
|
+
const flags = {
|
|
194083
|
+
chrome: "--incognito",
|
|
194084
|
+
brave: "--incognito",
|
|
194085
|
+
firefox: "--private-window",
|
|
194086
|
+
edge: "--inPrivate"
|
|
194087
|
+
};
|
|
194088
|
+
let browser;
|
|
194089
|
+
if (is_wsl_default) {
|
|
194090
|
+
const progId = await wslDefaultBrowser();
|
|
194091
|
+
const browserInfo = _windowsBrowserProgIdMap.get(progId);
|
|
194092
|
+
browser = browserInfo ?? {};
|
|
194093
|
+
} else {
|
|
194094
|
+
browser = await defaultBrowser2();
|
|
194095
|
+
}
|
|
194096
|
+
if (browser.id in ids) {
|
|
194097
|
+
const browserName = ids[browser.id.toLowerCase()];
|
|
194098
|
+
if (app === "browserPrivate") {
|
|
194099
|
+
if (browserName === "safari") {
|
|
194100
|
+
throw new Error("Safari doesn't support opening in private mode via command line");
|
|
194101
|
+
}
|
|
194102
|
+
appArguments.push(flags[browserName]);
|
|
194103
|
+
}
|
|
194104
|
+
return baseOpen({
|
|
194105
|
+
...options,
|
|
194106
|
+
app: {
|
|
194107
|
+
name: apps[browserName],
|
|
194108
|
+
arguments: appArguments
|
|
194109
|
+
}
|
|
194110
|
+
});
|
|
194111
|
+
}
|
|
194112
|
+
throw new Error(`${browser.name} is not supported as a default browser`);
|
|
194113
|
+
}
|
|
194114
|
+
let command;
|
|
194115
|
+
const cliArguments = [];
|
|
194116
|
+
const childProcessOptions = {};
|
|
194117
|
+
let shouldUseWindowsInWsl = false;
|
|
194118
|
+
if (is_wsl_default && !isInsideContainer() && !is_in_ssh_default && !app) {
|
|
194119
|
+
shouldUseWindowsInWsl = await canAccessPowerShell();
|
|
194120
|
+
}
|
|
194121
|
+
if (platform6 === "darwin") {
|
|
194122
|
+
command = "open";
|
|
194123
|
+
if (options.wait) {
|
|
194124
|
+
cliArguments.push("--wait-apps");
|
|
194125
|
+
}
|
|
194126
|
+
if (options.background) {
|
|
194127
|
+
cliArguments.push("--background");
|
|
194128
|
+
}
|
|
194129
|
+
if (options.newInstance) {
|
|
194130
|
+
cliArguments.push("--new");
|
|
194131
|
+
}
|
|
194132
|
+
if (app) {
|
|
194133
|
+
cliArguments.push("-a", app);
|
|
194134
|
+
}
|
|
194135
|
+
} else if (platform6 === "win32" || shouldUseWindowsInWsl) {
|
|
194136
|
+
command = await powerShellPath2();
|
|
194137
|
+
cliArguments.push(...executePowerShell.argumentsPrefix);
|
|
194138
|
+
if (!is_wsl_default) {
|
|
194139
|
+
childProcessOptions.windowsVerbatimArguments = true;
|
|
194140
|
+
}
|
|
194141
|
+
if (is_wsl_default && options.target) {
|
|
194142
|
+
options.target = await convertWslPathToWindows(options.target);
|
|
194143
|
+
}
|
|
194144
|
+
const encodedArguments = ["$ProgressPreference = 'SilentlyContinue';", "Start"];
|
|
194145
|
+
if (options.wait) {
|
|
194146
|
+
encodedArguments.push("-Wait");
|
|
194147
|
+
}
|
|
194148
|
+
if (app) {
|
|
194149
|
+
encodedArguments.push(executePowerShell.escapeArgument(app));
|
|
194150
|
+
if (options.target) {
|
|
194151
|
+
appArguments.push(options.target);
|
|
194152
|
+
}
|
|
194153
|
+
} else if (options.target) {
|
|
194154
|
+
encodedArguments.push(executePowerShell.escapeArgument(options.target));
|
|
194155
|
+
}
|
|
194156
|
+
if (appArguments.length > 0) {
|
|
194157
|
+
appArguments = appArguments.map((argument) => executePowerShell.escapeArgument(argument));
|
|
194158
|
+
encodedArguments.push("-ArgumentList", appArguments.join(","));
|
|
194159
|
+
}
|
|
194160
|
+
options.target = executePowerShell.encodeCommand(encodedArguments.join(" "));
|
|
194161
|
+
if (!options.wait) {
|
|
194162
|
+
childProcessOptions.stdio = "ignore";
|
|
194163
|
+
}
|
|
194164
|
+
} else {
|
|
194165
|
+
if (app) {
|
|
194166
|
+
command = app;
|
|
194167
|
+
} else {
|
|
194168
|
+
const isBundled = !__dirname3 || __dirname3 === "/";
|
|
194169
|
+
let exeLocalXdgOpen = false;
|
|
194170
|
+
try {
|
|
194171
|
+
await fs19.access(localXdgOpenPath, fsConstants2.X_OK);
|
|
194172
|
+
exeLocalXdgOpen = true;
|
|
194173
|
+
} catch {}
|
|
194174
|
+
const useSystemXdgOpen = process20.versions.electron ?? (platform6 === "android" || isBundled || !exeLocalXdgOpen);
|
|
194175
|
+
command = useSystemXdgOpen ? "xdg-open" : localXdgOpenPath;
|
|
194176
|
+
}
|
|
194177
|
+
if (appArguments.length > 0) {
|
|
194178
|
+
cliArguments.push(...appArguments);
|
|
194179
|
+
}
|
|
194180
|
+
if (!options.wait) {
|
|
194181
|
+
childProcessOptions.stdio = "ignore";
|
|
194182
|
+
childProcessOptions.detached = true;
|
|
194183
|
+
}
|
|
194184
|
+
}
|
|
194185
|
+
if (platform6 === "darwin" && appArguments.length > 0) {
|
|
194186
|
+
cliArguments.push("--args", ...appArguments);
|
|
194187
|
+
}
|
|
194188
|
+
if (options.target) {
|
|
194189
|
+
cliArguments.push(options.target);
|
|
194190
|
+
}
|
|
194191
|
+
const subprocess = childProcess3.spawn(command, cliArguments, childProcessOptions);
|
|
194192
|
+
if (options.wait) {
|
|
194193
|
+
return new Promise((resolve2, reject) => {
|
|
194194
|
+
subprocess.once("error", reject);
|
|
194195
|
+
subprocess.once("close", (exitCode) => {
|
|
194196
|
+
if (!options.allowNonzeroExitCode && exitCode !== 0) {
|
|
194197
|
+
reject(new Error(`Exited with code ${exitCode}`));
|
|
194198
|
+
return;
|
|
194199
|
+
}
|
|
194200
|
+
resolve2(subprocess);
|
|
194201
|
+
});
|
|
194202
|
+
});
|
|
194203
|
+
}
|
|
194204
|
+
if (isFallbackAttempt) {
|
|
194205
|
+
return new Promise((resolve2, reject) => {
|
|
194206
|
+
subprocess.once("error", reject);
|
|
194207
|
+
subprocess.once("spawn", () => {
|
|
194208
|
+
subprocess.once("close", (exitCode) => {
|
|
194209
|
+
subprocess.off("error", reject);
|
|
194210
|
+
if (exitCode !== 0) {
|
|
194211
|
+
reject(new Error(`Exited with code ${exitCode}`));
|
|
194212
|
+
return;
|
|
194213
|
+
}
|
|
194214
|
+
subprocess.unref();
|
|
194215
|
+
resolve2(subprocess);
|
|
194216
|
+
});
|
|
194217
|
+
});
|
|
194218
|
+
});
|
|
194219
|
+
}
|
|
194220
|
+
subprocess.unref();
|
|
194221
|
+
return new Promise((resolve2, reject) => {
|
|
194222
|
+
subprocess.once("error", reject);
|
|
194223
|
+
subprocess.once("spawn", () => {
|
|
194224
|
+
subprocess.off("error", reject);
|
|
194225
|
+
resolve2(subprocess);
|
|
194226
|
+
});
|
|
194227
|
+
});
|
|
194228
|
+
};
|
|
194229
|
+
var open = (target, options) => {
|
|
194230
|
+
if (typeof target !== "string") {
|
|
194231
|
+
throw new TypeError("Expected a `target`");
|
|
194232
|
+
}
|
|
194233
|
+
return baseOpen({
|
|
194234
|
+
...options,
|
|
194235
|
+
target
|
|
194236
|
+
});
|
|
194237
|
+
};
|
|
194238
|
+
function detectArchBinary(binary) {
|
|
194239
|
+
if (typeof binary === "string" || Array.isArray(binary)) {
|
|
194240
|
+
return binary;
|
|
194241
|
+
}
|
|
194242
|
+
const { [arch]: archBinary } = binary;
|
|
194243
|
+
if (!archBinary) {
|
|
194244
|
+
throw new Error(`${arch} is not supported`);
|
|
194245
|
+
}
|
|
194246
|
+
return archBinary;
|
|
194247
|
+
}
|
|
194248
|
+
function detectPlatformBinary({ [platform6]: platformBinary }, { wsl } = {}) {
|
|
194249
|
+
if (wsl && is_wsl_default) {
|
|
194250
|
+
return detectArchBinary(wsl);
|
|
194251
|
+
}
|
|
194252
|
+
if (!platformBinary) {
|
|
194253
|
+
throw new Error(`${platform6} is not supported`);
|
|
194254
|
+
}
|
|
194255
|
+
return detectArchBinary(platformBinary);
|
|
194256
|
+
}
|
|
194257
|
+
var apps = {
|
|
194258
|
+
browser: "browser",
|
|
194259
|
+
browserPrivate: "browserPrivate"
|
|
194260
|
+
};
|
|
194261
|
+
defineLazyProperty(apps, "chrome", () => detectPlatformBinary({
|
|
194262
|
+
darwin: "google chrome",
|
|
194263
|
+
win32: "chrome",
|
|
194264
|
+
linux: ["google-chrome", "google-chrome-stable", "chromium", "chromium-browser"]
|
|
194265
|
+
}, {
|
|
194266
|
+
wsl: {
|
|
194267
|
+
ia32: "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",
|
|
194268
|
+
x64: ["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe", "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]
|
|
194269
|
+
}
|
|
194270
|
+
}));
|
|
194271
|
+
defineLazyProperty(apps, "brave", () => detectPlatformBinary({
|
|
194272
|
+
darwin: "brave browser",
|
|
194273
|
+
win32: "brave",
|
|
194274
|
+
linux: ["brave-browser", "brave"]
|
|
194275
|
+
}, {
|
|
194276
|
+
wsl: {
|
|
194277
|
+
ia32: "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe",
|
|
194278
|
+
x64: ["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe", "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"]
|
|
194279
|
+
}
|
|
194280
|
+
}));
|
|
194281
|
+
defineLazyProperty(apps, "firefox", () => detectPlatformBinary({
|
|
194282
|
+
darwin: "firefox",
|
|
194283
|
+
win32: String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,
|
|
194284
|
+
linux: "firefox"
|
|
194285
|
+
}, {
|
|
194286
|
+
wsl: "/mnt/c/Program Files/Mozilla Firefox/firefox.exe"
|
|
194287
|
+
}));
|
|
194288
|
+
defineLazyProperty(apps, "edge", () => detectPlatformBinary({
|
|
194289
|
+
darwin: "microsoft edge",
|
|
194290
|
+
win32: "msedge",
|
|
194291
|
+
linux: ["microsoft-edge", "microsoft-edge-dev"]
|
|
194292
|
+
}, {
|
|
194293
|
+
wsl: "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
|
|
194294
|
+
}));
|
|
194295
|
+
defineLazyProperty(apps, "safari", () => detectPlatformBinary({
|
|
194296
|
+
darwin: "Safari"
|
|
194297
|
+
}));
|
|
194298
|
+
var open_default = open;
|
|
194299
|
+
|
|
194320
194300
|
// src/cli/commands/connectors/oauth-prompt.ts
|
|
194301
|
+
var POLL_INTERVAL_MS = 2000;
|
|
194302
|
+
var POLL_TIMEOUT_MS = 2 * 60 * 1000;
|
|
194321
194303
|
function filterPendingOAuth(results) {
|
|
194322
194304
|
return results.filter((r2) => r2.action === "needs_oauth" && !!r2.redirectUrl && !!r2.connectionId);
|
|
194323
194305
|
}
|
|
194306
|
+
async function runOAuthFlowWithSkip(connector2) {
|
|
194307
|
+
await open_default(connector2.redirectUrl);
|
|
194308
|
+
let finalStatus = "PENDING";
|
|
194309
|
+
let skipped = false;
|
|
194310
|
+
const s = Y2();
|
|
194311
|
+
const originalExit = process.exit;
|
|
194312
|
+
process.exit = () => {
|
|
194313
|
+
skipped = true;
|
|
194314
|
+
s.stop(`${connector2.type} skipped`);
|
|
194315
|
+
};
|
|
194316
|
+
s.start(`Waiting for ${connector2.type} authorization... (Esc to skip)`);
|
|
194317
|
+
try {
|
|
194318
|
+
await pWaitFor(async () => {
|
|
194319
|
+
if (skipped) {
|
|
194320
|
+
finalStatus = "SKIPPED";
|
|
194321
|
+
return true;
|
|
194322
|
+
}
|
|
194323
|
+
const response = await getOAuthStatus(connector2.type, connector2.connectionId);
|
|
194324
|
+
finalStatus = response.status;
|
|
194325
|
+
return response.status !== "PENDING";
|
|
194326
|
+
}, {
|
|
194327
|
+
interval: POLL_INTERVAL_MS,
|
|
194328
|
+
timeout: POLL_TIMEOUT_MS
|
|
194329
|
+
});
|
|
194330
|
+
} catch (err) {
|
|
194331
|
+
if (err instanceof TimeoutError2) {
|
|
194332
|
+
finalStatus = "PENDING";
|
|
194333
|
+
} else {
|
|
194334
|
+
throw err;
|
|
194335
|
+
}
|
|
194336
|
+
} finally {
|
|
194337
|
+
process.exit = originalExit;
|
|
194338
|
+
if (!skipped) {
|
|
194339
|
+
if (finalStatus === "ACTIVE") {
|
|
194340
|
+
s.stop(`${connector2.type} authorization complete`);
|
|
194341
|
+
} else if (finalStatus === "FAILED") {
|
|
194342
|
+
s.stop(`${connector2.type} authorization failed`);
|
|
194343
|
+
} else {
|
|
194344
|
+
s.stop(`${connector2.type} authorization timed out`);
|
|
194345
|
+
}
|
|
194346
|
+
}
|
|
194347
|
+
}
|
|
194348
|
+
return finalStatus;
|
|
194349
|
+
}
|
|
194324
194350
|
async function promptOAuthFlows(pending, options) {
|
|
194325
194351
|
const outcomes = new Map;
|
|
194326
194352
|
if (pending.length === 0) {
|
|
194327
194353
|
return outcomes;
|
|
194328
194354
|
}
|
|
194329
|
-
M2.info("");
|
|
194330
194355
|
M2.warn(`${pending.length} connector(s) require authorization in your browser:`);
|
|
194331
194356
|
for (const connector2 of pending) {
|
|
194332
194357
|
M2.info(` ${connector2.type}: ${theme.styles.dim(connector2.redirectUrl)}`);
|
|
@@ -194341,19 +194366,15 @@ async function promptOAuthFlows(pending, options) {
|
|
|
194341
194366
|
return outcomes;
|
|
194342
194367
|
}
|
|
194343
194368
|
for (const connector2 of pending) {
|
|
194344
|
-
|
|
194369
|
+
try {
|
|
194370
|
+
M2.info(`
|
|
194345
194371
|
Opening browser for ${connector2.type}...`);
|
|
194346
|
-
|
|
194347
|
-
|
|
194348
|
-
|
|
194349
|
-
|
|
194350
|
-
|
|
194351
|
-
|
|
194352
|
-
}, {
|
|
194353
|
-
successMessage: `${connector2.type} authorization complete`,
|
|
194354
|
-
errorMessage: `${connector2.type} authorization failed`
|
|
194355
|
-
});
|
|
194356
|
-
outcomes.set(connector2.type, oauthResult.status);
|
|
194372
|
+
const status = await runOAuthFlowWithSkip(connector2);
|
|
194373
|
+
outcomes.set(connector2.type, status);
|
|
194374
|
+
} catch (err) {
|
|
194375
|
+
M2.error(`Failed to authorize ${connector2.type}: ${err instanceof Error ? err.message : String(err)}`);
|
|
194376
|
+
outcomes.set(connector2.type, "FAILED");
|
|
194377
|
+
}
|
|
194357
194378
|
}
|
|
194358
194379
|
return outcomes;
|
|
194359
194380
|
}
|
|
@@ -194363,6 +194384,7 @@ function printSummary(results, oauthOutcomes) {
|
|
|
194363
194384
|
const synced = [];
|
|
194364
194385
|
const added = [];
|
|
194365
194386
|
const removed = [];
|
|
194387
|
+
const skipped = [];
|
|
194366
194388
|
const failed = [];
|
|
194367
194389
|
for (const r2 of results) {
|
|
194368
194390
|
const oauthStatus = oauthOutcomes.get(r2.type);
|
|
@@ -194375,6 +194397,8 @@ function printSummary(results, oauthOutcomes) {
|
|
|
194375
194397
|
} else if (r2.action === "needs_oauth") {
|
|
194376
194398
|
if (oauthStatus === "ACTIVE") {
|
|
194377
194399
|
added.push(r2.type);
|
|
194400
|
+
} else if (oauthStatus === "SKIPPED") {
|
|
194401
|
+
skipped.push(r2.type);
|
|
194378
194402
|
} else if (oauthStatus === "PENDING") {
|
|
194379
194403
|
failed.push({ type: r2.type, error: "authorization timed out" });
|
|
194380
194404
|
} else if (oauthStatus === "FAILED") {
|
|
@@ -194384,7 +194408,6 @@ function printSummary(results, oauthOutcomes) {
|
|
|
194384
194408
|
}
|
|
194385
194409
|
}
|
|
194386
194410
|
}
|
|
194387
|
-
M2.info("");
|
|
194388
194411
|
M2.info(theme.styles.bold("Summary:"));
|
|
194389
194412
|
if (synced.length > 0) {
|
|
194390
194413
|
M2.success(`Synced: ${synced.join(", ")}`);
|
|
@@ -194395,6 +194418,9 @@ function printSummary(results, oauthOutcomes) {
|
|
|
194395
194418
|
if (removed.length > 0) {
|
|
194396
194419
|
M2.info(theme.styles.dim(`Removed: ${removed.join(", ")}`));
|
|
194397
194420
|
}
|
|
194421
|
+
if (skipped.length > 0) {
|
|
194422
|
+
M2.warn(`Skipped: ${skipped.join(", ")}`);
|
|
194423
|
+
}
|
|
194398
194424
|
for (const r2 of failed) {
|
|
194399
194425
|
M2.error(`Failed: ${r2.type}${r2.error ? ` - ${r2.error}` : ""}`);
|
|
194400
194426
|
}
|
|
@@ -199652,4 +199678,4 @@ export {
|
|
|
199652
199678
|
CLIExitError
|
|
199653
199679
|
};
|
|
199654
199680
|
|
|
199655
|
-
//# debugId=
|
|
199681
|
+
//# debugId=3B396D1D0D9A865164756E2164756E21
|