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