@base44-preview/cli 0.0.31-pr.211.9ebde2a → 0.0.31-pr.214.25a02b0
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 +1026 -979
- package/dist/cli/index.js.map +24 -25
- 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(" ");
|
|
@@ -17446,7 +17446,7 @@ var require_lodash2 = __commonJS((exports, module) => {
|
|
|
17446
17446
|
}
|
|
17447
17447
|
return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, undefined2, comparator) : [];
|
|
17448
17448
|
});
|
|
17449
|
-
function
|
|
17449
|
+
function join12(array2, separator) {
|
|
17450
17450
|
return array2 == null ? "" : nativeJoin.call(array2, separator);
|
|
17451
17451
|
}
|
|
17452
17452
|
function last(array2) {
|
|
@@ -19378,7 +19378,7 @@ __p += '`;
|
|
|
19378
19378
|
lodash.isUndefined = isUndefined;
|
|
19379
19379
|
lodash.isWeakMap = isWeakMap;
|
|
19380
19380
|
lodash.isWeakSet = isWeakSet;
|
|
19381
|
-
lodash.join =
|
|
19381
|
+
lodash.join = join12;
|
|
19382
19382
|
lodash.kebabCase = kebabCase2;
|
|
19383
19383
|
lodash.last = last;
|
|
19384
19384
|
lodash.lastIndexOf = lastIndexOf;
|
|
@@ -20007,7 +20007,7 @@ function cleanDoc(doc2) {
|
|
|
20007
20007
|
return mapDoc(doc2, (currentDoc) => cleanDocFn(currentDoc));
|
|
20008
20008
|
}
|
|
20009
20009
|
function replaceEndOfLine(doc2, replacement = literalline) {
|
|
20010
|
-
return mapDoc(doc2, (currentDoc) => typeof currentDoc === "string" ?
|
|
20010
|
+
return mapDoc(doc2, (currentDoc) => typeof currentDoc === "string" ? join12(replacement, currentDoc.split(`
|
|
20011
20011
|
`)) : currentDoc);
|
|
20012
20012
|
}
|
|
20013
20013
|
function canBreakFn(doc2) {
|
|
@@ -20087,7 +20087,7 @@ function indentIfBreak(contents, options) {
|
|
|
20087
20087
|
negate: options.negate
|
|
20088
20088
|
};
|
|
20089
20089
|
}
|
|
20090
|
-
function
|
|
20090
|
+
function join12(separator, docs) {
|
|
20091
20091
|
assertDoc(separator);
|
|
20092
20092
|
assertDocArray(docs);
|
|
20093
20093
|
const parts = [];
|
|
@@ -20798,7 +20798,7 @@ var init_doc = __esm(() => {
|
|
|
20798
20798
|
MODE_FLAT = Symbol("MODE_FLAT");
|
|
20799
20799
|
DOC_FILL_PRINTED_LENGTH = Symbol("DOC_FILL_PRINTED_LENGTH");
|
|
20800
20800
|
builders = {
|
|
20801
|
-
join:
|
|
20801
|
+
join: join12,
|
|
20802
20802
|
line,
|
|
20803
20803
|
softline,
|
|
20804
20804
|
hardline,
|
|
@@ -125712,7 +125712,7 @@ Expected it to be ${EXPECTED_TYPE_VALUES}.`;
|
|
|
125712
125712
|
return mapDoc2(doc2, (currentDoc) => cleanDocFn2(currentDoc));
|
|
125713
125713
|
}
|
|
125714
125714
|
function replaceEndOfLine2(doc2, replacement = literalline2) {
|
|
125715
|
-
return mapDoc2(doc2, (currentDoc) => typeof currentDoc === "string" ?
|
|
125715
|
+
return mapDoc2(doc2, (currentDoc) => typeof currentDoc === "string" ? join14(replacement, currentDoc.split(`
|
|
125716
125716
|
`)) : currentDoc);
|
|
125717
125717
|
}
|
|
125718
125718
|
function canBreakFn2(doc2) {
|
|
@@ -125798,7 +125798,7 @@ Expected it to be ${EXPECTED_TYPE_VALUES}.`;
|
|
|
125798
125798
|
negate: options8.negate
|
|
125799
125799
|
};
|
|
125800
125800
|
}
|
|
125801
|
-
function
|
|
125801
|
+
function join14(separator, docs) {
|
|
125802
125802
|
assertDoc2(separator);
|
|
125803
125803
|
assertDocArray2(docs);
|
|
125804
125804
|
const parts = [];
|
|
@@ -126463,7 +126463,7 @@ Expected it to be ${EXPECTED_TYPE_VALUES}.`;
|
|
|
126463
126463
|
}
|
|
126464
126464
|
}
|
|
126465
126465
|
var builders2 = {
|
|
126466
|
-
join:
|
|
126466
|
+
join: join14,
|
|
126467
126467
|
line: line3,
|
|
126468
126468
|
softline: softline2,
|
|
126469
126469
|
hardline: hardline4,
|
|
@@ -155678,10 +155678,10 @@ var require_view = __commonJS((exports, module) => {
|
|
|
155678
155678
|
var debug = require_src4()("express:view");
|
|
155679
155679
|
var path18 = __require("node:path");
|
|
155680
155680
|
var fs28 = __require("node:fs");
|
|
155681
|
-
var
|
|
155681
|
+
var dirname11 = path18.dirname;
|
|
155682
155682
|
var basename4 = path18.basename;
|
|
155683
155683
|
var extname2 = path18.extname;
|
|
155684
|
-
var
|
|
155684
|
+
var join15 = path18.join;
|
|
155685
155685
|
var resolve5 = path18.resolve;
|
|
155686
155686
|
module.exports = View;
|
|
155687
155687
|
function View(name2, options8) {
|
|
@@ -155717,7 +155717,7 @@ var require_view = __commonJS((exports, module) => {
|
|
|
155717
155717
|
for (var i5 = 0;i5 < roots.length && !path19; i5++) {
|
|
155718
155718
|
var root2 = roots[i5];
|
|
155719
155719
|
var loc = resolve5(root2, name2);
|
|
155720
|
-
var dir =
|
|
155720
|
+
var dir = dirname11(loc);
|
|
155721
155721
|
var file2 = basename4(loc);
|
|
155722
155722
|
path19 = this.resolve(dir, file2);
|
|
155723
155723
|
}
|
|
@@ -155743,12 +155743,12 @@ var require_view = __commonJS((exports, module) => {
|
|
|
155743
155743
|
};
|
|
155744
155744
|
View.prototype.resolve = function resolve6(dir, file2) {
|
|
155745
155745
|
var ext = this.ext;
|
|
155746
|
-
var path19 =
|
|
155746
|
+
var path19 = join15(dir, file2);
|
|
155747
155747
|
var stat2 = tryStat(path19);
|
|
155748
155748
|
if (stat2 && stat2.isFile()) {
|
|
155749
155749
|
return path19;
|
|
155750
155750
|
}
|
|
155751
|
-
path19 =
|
|
155751
|
+
path19 = join15(dir, basename4(file2, ext), "index" + ext);
|
|
155752
155752
|
stat2 = tryStat(path19);
|
|
155753
155753
|
if (stat2 && stat2.isFile()) {
|
|
155754
155754
|
return path19;
|
|
@@ -159443,7 +159443,7 @@ var require_send = __commonJS((exports, module) => {
|
|
|
159443
159443
|
var Stream2 = __require("stream");
|
|
159444
159444
|
var util2 = __require("util");
|
|
159445
159445
|
var extname2 = path18.extname;
|
|
159446
|
-
var
|
|
159446
|
+
var join15 = path18.join;
|
|
159447
159447
|
var normalize = path18.normalize;
|
|
159448
159448
|
var resolve5 = path18.resolve;
|
|
159449
159449
|
var sep = path18.sep;
|
|
@@ -159615,7 +159615,7 @@ var require_send = __commonJS((exports, module) => {
|
|
|
159615
159615
|
return res;
|
|
159616
159616
|
}
|
|
159617
159617
|
parts = path19.split(sep);
|
|
159618
|
-
path19 = normalize(
|
|
159618
|
+
path19 = normalize(join15(root2, path19));
|
|
159619
159619
|
} else {
|
|
159620
159620
|
if (UP_PATH_REGEXP.test(path19)) {
|
|
159621
159621
|
debug('malicious path "%s"', path19);
|
|
@@ -159755,7 +159755,7 @@ var require_send = __commonJS((exports, module) => {
|
|
|
159755
159755
|
return self2.onStatError(err);
|
|
159756
159756
|
return self2.error(404);
|
|
159757
159757
|
}
|
|
159758
|
-
var p4 =
|
|
159758
|
+
var p4 = join15(path19, self2._index[i5]);
|
|
159759
159759
|
debug('stat "%s"', p4);
|
|
159760
159760
|
fs28.stat(p4, function(err2, stat2) {
|
|
159761
159761
|
if (err2)
|
|
@@ -162834,7 +162834,7 @@ var {
|
|
|
162834
162834
|
} = import__.default;
|
|
162835
162835
|
|
|
162836
162836
|
// src/cli/commands/agents/pull.ts
|
|
162837
|
-
import { dirname as dirname7, join as
|
|
162837
|
+
import { dirname as dirname7, join as join9 } from "node:path";
|
|
162838
162838
|
|
|
162839
162839
|
// node_modules/@clack/core/dist/index.mjs
|
|
162840
162840
|
var import_sisteransi = __toESM(require_src(), 1);
|
|
@@ -184871,7 +184871,7 @@ var generateGlobTasks = normalizeArguments(generateTasks);
|
|
|
184871
184871
|
var generateGlobTasksSync = normalizeArgumentsSync(generateTasksSync);
|
|
184872
184872
|
|
|
184873
184873
|
// src/core/project/config.ts
|
|
184874
|
-
import { dirname as dirname5, join as
|
|
184874
|
+
import { dirname as dirname5, join as join6 } from "node:path";
|
|
184875
184875
|
|
|
184876
184876
|
// src/core/resources/agent/schema.ts
|
|
184877
184877
|
var EntityOperationSchema = exports_external.enum(["create", "update", "delete", "read"]);
|
|
@@ -185198,6 +185198,8 @@ async function removeConnector(integrationType) {
|
|
|
185198
185198
|
return result.data;
|
|
185199
185199
|
}
|
|
185200
185200
|
// src/core/resources/connector/config.ts
|
|
185201
|
+
import { join as join4 } from "node:path";
|
|
185202
|
+
import { isDeepStrictEqual } from "node:util";
|
|
185201
185203
|
async function readConnectorFile(connectorPath) {
|
|
185202
185204
|
const parsed = await readJsonFile(connectorPath);
|
|
185203
185205
|
const result = ConnectorResourceSchema.safeParse(parsed);
|
|
@@ -185206,7 +185208,7 @@ async function readConnectorFile(connectorPath) {
|
|
|
185206
185208
|
}
|
|
185207
185209
|
return result.data;
|
|
185208
185210
|
}
|
|
185209
|
-
async function
|
|
185211
|
+
async function readConnectorFiles(connectorsDir) {
|
|
185210
185212
|
if (!await pathExists(connectorsDir)) {
|
|
185211
185213
|
return [];
|
|
185212
185214
|
}
|
|
@@ -185214,747 +185216,58 @@ async function readAllConnectors(connectorsDir) {
|
|
|
185214
185216
|
cwd: connectorsDir,
|
|
185215
185217
|
absolute: true
|
|
185216
185218
|
});
|
|
185217
|
-
|
|
185218
|
-
|
|
185219
|
-
|
|
185219
|
+
return await Promise.all(files.map(async (filePath) => ({
|
|
185220
|
+
data: await readConnectorFile(filePath),
|
|
185221
|
+
filePath
|
|
185222
|
+
})));
|
|
185220
185223
|
}
|
|
185221
|
-
function
|
|
185222
|
-
const
|
|
185223
|
-
for (const
|
|
185224
|
-
if (
|
|
185225
|
-
throw new InvalidInputError(`Duplicate connector type "${
|
|
185224
|
+
function buildTypeToEntryMap(entries) {
|
|
185225
|
+
const typeToEntry = new Map;
|
|
185226
|
+
for (const entry of entries) {
|
|
185227
|
+
if (typeToEntry.has(entry.data.type)) {
|
|
185228
|
+
throw new InvalidInputError(`Duplicate connector type "${entry.data.type}"`, {
|
|
185226
185229
|
hints: [
|
|
185227
185230
|
{
|
|
185228
|
-
message: `Remove duplicate connectors with type "${
|
|
185231
|
+
message: `Remove duplicate connectors with type "${entry.data.type}" - only one connector per type is allowed`
|
|
185229
185232
|
}
|
|
185230
185233
|
]
|
|
185231
185234
|
});
|
|
185232
185235
|
}
|
|
185233
|
-
|
|
185234
|
-
}
|
|
185235
|
-
}
|
|
185236
|
-
// node_modules/open/index.js
|
|
185237
|
-
import process11 from "node:process";
|
|
185238
|
-
import path11 from "node:path";
|
|
185239
|
-
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
185240
|
-
import childProcess3 from "node:child_process";
|
|
185241
|
-
import fs18, { constants as fsConstants2 } from "node:fs/promises";
|
|
185242
|
-
|
|
185243
|
-
// node_modules/wsl-utils/index.js
|
|
185244
|
-
import { promisify as promisify4 } from "node:util";
|
|
185245
|
-
import childProcess2 from "node:child_process";
|
|
185246
|
-
import fs17, { constants as fsConstants } from "node:fs/promises";
|
|
185247
|
-
|
|
185248
|
-
// node_modules/is-wsl/index.js
|
|
185249
|
-
import process5 from "node:process";
|
|
185250
|
-
import os from "node:os";
|
|
185251
|
-
import fs16 from "node:fs";
|
|
185252
|
-
|
|
185253
|
-
// node_modules/is-inside-container/index.js
|
|
185254
|
-
import fs15 from "node:fs";
|
|
185255
|
-
|
|
185256
|
-
// node_modules/is-docker/index.js
|
|
185257
|
-
import fs14 from "node:fs";
|
|
185258
|
-
var isDockerCached;
|
|
185259
|
-
function hasDockerEnv() {
|
|
185260
|
-
try {
|
|
185261
|
-
fs14.statSync("/.dockerenv");
|
|
185262
|
-
return true;
|
|
185263
|
-
} catch {
|
|
185264
|
-
return false;
|
|
185265
|
-
}
|
|
185266
|
-
}
|
|
185267
|
-
function hasDockerCGroup() {
|
|
185268
|
-
try {
|
|
185269
|
-
return fs14.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
|
|
185270
|
-
} catch {
|
|
185271
|
-
return false;
|
|
185272
|
-
}
|
|
185273
|
-
}
|
|
185274
|
-
function isDocker() {
|
|
185275
|
-
if (isDockerCached === undefined) {
|
|
185276
|
-
isDockerCached = hasDockerEnv() || hasDockerCGroup();
|
|
185277
|
-
}
|
|
185278
|
-
return isDockerCached;
|
|
185279
|
-
}
|
|
185280
|
-
|
|
185281
|
-
// node_modules/is-inside-container/index.js
|
|
185282
|
-
var cachedResult;
|
|
185283
|
-
var hasContainerEnv = () => {
|
|
185284
|
-
try {
|
|
185285
|
-
fs15.statSync("/run/.containerenv");
|
|
185286
|
-
return true;
|
|
185287
|
-
} catch {
|
|
185288
|
-
return false;
|
|
185289
|
-
}
|
|
185290
|
-
};
|
|
185291
|
-
function isInsideContainer() {
|
|
185292
|
-
if (cachedResult === undefined) {
|
|
185293
|
-
cachedResult = hasContainerEnv() || isDocker();
|
|
185294
|
-
}
|
|
185295
|
-
return cachedResult;
|
|
185296
|
-
}
|
|
185297
|
-
|
|
185298
|
-
// node_modules/is-wsl/index.js
|
|
185299
|
-
var isWsl = () => {
|
|
185300
|
-
if (process5.platform !== "linux") {
|
|
185301
|
-
return false;
|
|
185302
|
-
}
|
|
185303
|
-
if (os.release().toLowerCase().includes("microsoft")) {
|
|
185304
|
-
if (isInsideContainer()) {
|
|
185305
|
-
return false;
|
|
185306
|
-
}
|
|
185307
|
-
return true;
|
|
185308
|
-
}
|
|
185309
|
-
try {
|
|
185310
|
-
return fs16.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isInsideContainer() : false;
|
|
185311
|
-
} catch {
|
|
185312
|
-
return false;
|
|
185313
|
-
}
|
|
185314
|
-
};
|
|
185315
|
-
var is_wsl_default = process5.env.__IS_WSL_TEST__ ? isWsl : isWsl();
|
|
185316
|
-
|
|
185317
|
-
// node_modules/powershell-utils/index.js
|
|
185318
|
-
import process6 from "node:process";
|
|
185319
|
-
import { Buffer as Buffer3 } from "node:buffer";
|
|
185320
|
-
import { promisify as promisify3 } from "node:util";
|
|
185321
|
-
import childProcess from "node:child_process";
|
|
185322
|
-
var execFile = promisify3(childProcess.execFile);
|
|
185323
|
-
var powerShellPath = () => `${process6.env.SYSTEMROOT || process6.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
|
|
185324
|
-
var executePowerShell = async (command, options = {}) => {
|
|
185325
|
-
const {
|
|
185326
|
-
powerShellPath: psPath,
|
|
185327
|
-
...execFileOptions
|
|
185328
|
-
} = options;
|
|
185329
|
-
const encodedCommand = executePowerShell.encodeCommand(command);
|
|
185330
|
-
return execFile(psPath ?? powerShellPath(), [
|
|
185331
|
-
...executePowerShell.argumentsPrefix,
|
|
185332
|
-
encodedCommand
|
|
185333
|
-
], {
|
|
185334
|
-
encoding: "utf8",
|
|
185335
|
-
...execFileOptions
|
|
185336
|
-
});
|
|
185337
|
-
};
|
|
185338
|
-
executePowerShell.argumentsPrefix = [
|
|
185339
|
-
"-NoProfile",
|
|
185340
|
-
"-NonInteractive",
|
|
185341
|
-
"-ExecutionPolicy",
|
|
185342
|
-
"Bypass",
|
|
185343
|
-
"-EncodedCommand"
|
|
185344
|
-
];
|
|
185345
|
-
executePowerShell.encodeCommand = (command) => Buffer3.from(command, "utf16le").toString("base64");
|
|
185346
|
-
executePowerShell.escapeArgument = (value) => `'${String(value).replaceAll("'", "''")}'`;
|
|
185347
|
-
|
|
185348
|
-
// node_modules/wsl-utils/utilities.js
|
|
185349
|
-
function parseMountPointFromConfig(content) {
|
|
185350
|
-
for (const line of content.split(`
|
|
185351
|
-
`)) {
|
|
185352
|
-
if (/^\s*#/.test(line)) {
|
|
185353
|
-
continue;
|
|
185354
|
-
}
|
|
185355
|
-
const match = /^\s*root\s*=\s*(?<mountPoint>"[^"]*"|'[^']*'|[^#]*)/.exec(line);
|
|
185356
|
-
if (!match) {
|
|
185357
|
-
continue;
|
|
185358
|
-
}
|
|
185359
|
-
return match.groups.mountPoint.trim().replaceAll(/^["']|["']$/g, "");
|
|
185360
|
-
}
|
|
185361
|
-
}
|
|
185362
|
-
|
|
185363
|
-
// node_modules/wsl-utils/index.js
|
|
185364
|
-
var execFile2 = promisify4(childProcess2.execFile);
|
|
185365
|
-
var wslDrivesMountPoint = (() => {
|
|
185366
|
-
const defaultMountPoint = "/mnt/";
|
|
185367
|
-
let mountPoint;
|
|
185368
|
-
return async function() {
|
|
185369
|
-
if (mountPoint) {
|
|
185370
|
-
return mountPoint;
|
|
185371
|
-
}
|
|
185372
|
-
const configFilePath = "/etc/wsl.conf";
|
|
185373
|
-
let isConfigFileExists = false;
|
|
185374
|
-
try {
|
|
185375
|
-
await fs17.access(configFilePath, fsConstants.F_OK);
|
|
185376
|
-
isConfigFileExists = true;
|
|
185377
|
-
} catch {}
|
|
185378
|
-
if (!isConfigFileExists) {
|
|
185379
|
-
return defaultMountPoint;
|
|
185380
|
-
}
|
|
185381
|
-
const configContent = await fs17.readFile(configFilePath, { encoding: "utf8" });
|
|
185382
|
-
const parsedMountPoint = parseMountPointFromConfig(configContent);
|
|
185383
|
-
if (parsedMountPoint === undefined) {
|
|
185384
|
-
return defaultMountPoint;
|
|
185385
|
-
}
|
|
185386
|
-
mountPoint = parsedMountPoint;
|
|
185387
|
-
mountPoint = mountPoint.endsWith("/") ? mountPoint : `${mountPoint}/`;
|
|
185388
|
-
return mountPoint;
|
|
185389
|
-
};
|
|
185390
|
-
})();
|
|
185391
|
-
var powerShellPathFromWsl = async () => {
|
|
185392
|
-
const mountPoint = await wslDrivesMountPoint();
|
|
185393
|
-
return `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`;
|
|
185394
|
-
};
|
|
185395
|
-
var powerShellPath2 = is_wsl_default ? powerShellPathFromWsl : powerShellPath;
|
|
185396
|
-
var canAccessPowerShellPromise;
|
|
185397
|
-
var canAccessPowerShell = async () => {
|
|
185398
|
-
canAccessPowerShellPromise ??= (async () => {
|
|
185399
|
-
try {
|
|
185400
|
-
const psPath = await powerShellPath2();
|
|
185401
|
-
await fs17.access(psPath, fsConstants.X_OK);
|
|
185402
|
-
return true;
|
|
185403
|
-
} catch {
|
|
185404
|
-
return false;
|
|
185405
|
-
}
|
|
185406
|
-
})();
|
|
185407
|
-
return canAccessPowerShellPromise;
|
|
185408
|
-
};
|
|
185409
|
-
var wslDefaultBrowser = async () => {
|
|
185410
|
-
const psPath = await powerShellPath2();
|
|
185411
|
-
const command = String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`;
|
|
185412
|
-
const { stdout } = await executePowerShell(command, { powerShellPath: psPath });
|
|
185413
|
-
return stdout.trim();
|
|
185414
|
-
};
|
|
185415
|
-
var convertWslPathToWindows = async (path11) => {
|
|
185416
|
-
if (/^[a-z]+:\/\//i.test(path11)) {
|
|
185417
|
-
return path11;
|
|
185418
|
-
}
|
|
185419
|
-
try {
|
|
185420
|
-
const { stdout } = await execFile2("wslpath", ["-aw", path11], { encoding: "utf8" });
|
|
185421
|
-
return stdout.trim();
|
|
185422
|
-
} catch {
|
|
185423
|
-
return path11;
|
|
185424
|
-
}
|
|
185425
|
-
};
|
|
185426
|
-
|
|
185427
|
-
// node_modules/define-lazy-prop/index.js
|
|
185428
|
-
function defineLazyProperty(object2, propertyName, valueGetter) {
|
|
185429
|
-
const define2 = (value) => Object.defineProperty(object2, propertyName, { value, enumerable: true, writable: true });
|
|
185430
|
-
Object.defineProperty(object2, propertyName, {
|
|
185431
|
-
configurable: true,
|
|
185432
|
-
enumerable: true,
|
|
185433
|
-
get() {
|
|
185434
|
-
const result = valueGetter();
|
|
185435
|
-
define2(result);
|
|
185436
|
-
return result;
|
|
185437
|
-
},
|
|
185438
|
-
set(value) {
|
|
185439
|
-
define2(value);
|
|
185440
|
-
}
|
|
185441
|
-
});
|
|
185442
|
-
return object2;
|
|
185443
|
-
}
|
|
185444
|
-
|
|
185445
|
-
// node_modules/default-browser/index.js
|
|
185446
|
-
import { promisify as promisify8 } from "node:util";
|
|
185447
|
-
import process9 from "node:process";
|
|
185448
|
-
import { execFile as execFile6 } from "node:child_process";
|
|
185449
|
-
|
|
185450
|
-
// node_modules/default-browser-id/index.js
|
|
185451
|
-
import { promisify as promisify5 } from "node:util";
|
|
185452
|
-
import process7 from "node:process";
|
|
185453
|
-
import { execFile as execFile3 } from "node:child_process";
|
|
185454
|
-
var execFileAsync = promisify5(execFile3);
|
|
185455
|
-
async function defaultBrowserId() {
|
|
185456
|
-
if (process7.platform !== "darwin") {
|
|
185457
|
-
throw new Error("macOS only");
|
|
185458
|
-
}
|
|
185459
|
-
const { stdout } = await execFileAsync("defaults", ["read", "com.apple.LaunchServices/com.apple.launchservices.secure", "LSHandlers"]);
|
|
185460
|
-
const match = /LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout);
|
|
185461
|
-
const browserId = match?.groups.id ?? "com.apple.Safari";
|
|
185462
|
-
if (browserId === "com.apple.safari") {
|
|
185463
|
-
return "com.apple.Safari";
|
|
185464
|
-
}
|
|
185465
|
-
return browserId;
|
|
185466
|
-
}
|
|
185467
|
-
|
|
185468
|
-
// node_modules/run-applescript/index.js
|
|
185469
|
-
import process8 from "node:process";
|
|
185470
|
-
import { promisify as promisify6 } from "node:util";
|
|
185471
|
-
import { execFile as execFile4, execFileSync } from "node:child_process";
|
|
185472
|
-
var execFileAsync2 = promisify6(execFile4);
|
|
185473
|
-
async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {
|
|
185474
|
-
if (process8.platform !== "darwin") {
|
|
185475
|
-
throw new Error("macOS only");
|
|
185476
|
-
}
|
|
185477
|
-
const outputArguments = humanReadableOutput ? [] : ["-ss"];
|
|
185478
|
-
const execOptions = {};
|
|
185479
|
-
if (signal) {
|
|
185480
|
-
execOptions.signal = signal;
|
|
185481
|
-
}
|
|
185482
|
-
const { stdout } = await execFileAsync2("osascript", ["-e", script, outputArguments], execOptions);
|
|
185483
|
-
return stdout.trim();
|
|
185484
|
-
}
|
|
185485
|
-
|
|
185486
|
-
// node_modules/bundle-name/index.js
|
|
185487
|
-
async function bundleName(bundleId) {
|
|
185488
|
-
return runAppleScript(`tell application "Finder" to set app_path to application file id "${bundleId}" as string
|
|
185489
|
-
tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`);
|
|
185490
|
-
}
|
|
185491
|
-
|
|
185492
|
-
// node_modules/default-browser/windows.js
|
|
185493
|
-
import { promisify as promisify7 } from "node:util";
|
|
185494
|
-
import { execFile as execFile5 } from "node:child_process";
|
|
185495
|
-
var execFileAsync3 = promisify7(execFile5);
|
|
185496
|
-
var windowsBrowserProgIds = {
|
|
185497
|
-
MSEdgeHTM: { name: "Edge", id: "com.microsoft.edge" },
|
|
185498
|
-
MSEdgeBHTML: { name: "Edge Beta", id: "com.microsoft.edge.beta" },
|
|
185499
|
-
MSEdgeDHTML: { name: "Edge Dev", id: "com.microsoft.edge.dev" },
|
|
185500
|
-
AppXq0fevzme2pys62n3e0fbqa7peapykr8v: { name: "Edge", id: "com.microsoft.edge.old" },
|
|
185501
|
-
ChromeHTML: { name: "Chrome", id: "com.google.chrome" },
|
|
185502
|
-
ChromeBHTML: { name: "Chrome Beta", id: "com.google.chrome.beta" },
|
|
185503
|
-
ChromeDHTML: { name: "Chrome Dev", id: "com.google.chrome.dev" },
|
|
185504
|
-
ChromiumHTM: { name: "Chromium", id: "org.chromium.Chromium" },
|
|
185505
|
-
BraveHTML: { name: "Brave", id: "com.brave.Browser" },
|
|
185506
|
-
BraveBHTML: { name: "Brave Beta", id: "com.brave.Browser.beta" },
|
|
185507
|
-
BraveDHTML: { name: "Brave Dev", id: "com.brave.Browser.dev" },
|
|
185508
|
-
BraveSSHTM: { name: "Brave Nightly", id: "com.brave.Browser.nightly" },
|
|
185509
|
-
FirefoxURL: { name: "Firefox", id: "org.mozilla.firefox" },
|
|
185510
|
-
OperaStable: { name: "Opera", id: "com.operasoftware.Opera" },
|
|
185511
|
-
VivaldiHTM: { name: "Vivaldi", id: "com.vivaldi.Vivaldi" },
|
|
185512
|
-
"IE.HTTP": { name: "Internet Explorer", id: "com.microsoft.ie" }
|
|
185513
|
-
};
|
|
185514
|
-
var _windowsBrowserProgIdMap = new Map(Object.entries(windowsBrowserProgIds));
|
|
185515
|
-
|
|
185516
|
-
class UnknownBrowserError extends Error {
|
|
185517
|
-
}
|
|
185518
|
-
async function defaultBrowser(_execFileAsync = execFileAsync3) {
|
|
185519
|
-
const { stdout } = await _execFileAsync("reg", [
|
|
185520
|
-
"QUERY",
|
|
185521
|
-
" HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice",
|
|
185522
|
-
"/v",
|
|
185523
|
-
"ProgId"
|
|
185524
|
-
]);
|
|
185525
|
-
const match = /ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(stdout);
|
|
185526
|
-
if (!match) {
|
|
185527
|
-
throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);
|
|
185528
|
-
}
|
|
185529
|
-
const { id } = match.groups;
|
|
185530
|
-
const dotIndex = id.lastIndexOf(".");
|
|
185531
|
-
const hyphenIndex = id.lastIndexOf("-");
|
|
185532
|
-
const baseIdByDot = dotIndex === -1 ? undefined : id.slice(0, dotIndex);
|
|
185533
|
-
const baseIdByHyphen = hyphenIndex === -1 ? undefined : id.slice(0, hyphenIndex);
|
|
185534
|
-
return windowsBrowserProgIds[id] ?? windowsBrowserProgIds[baseIdByDot] ?? windowsBrowserProgIds[baseIdByHyphen] ?? { name: id, id };
|
|
185535
|
-
}
|
|
185536
|
-
|
|
185537
|
-
// node_modules/default-browser/index.js
|
|
185538
|
-
var execFileAsync4 = promisify8(execFile6);
|
|
185539
|
-
var titleize = (string4) => string4.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x2) => x2.toUpperCase());
|
|
185540
|
-
async function defaultBrowser2() {
|
|
185541
|
-
if (process9.platform === "darwin") {
|
|
185542
|
-
const id = await defaultBrowserId();
|
|
185543
|
-
const name2 = await bundleName(id);
|
|
185544
|
-
return { name: name2, id };
|
|
185236
|
+
typeToEntry.set(entry.data.type, entry);
|
|
185545
185237
|
}
|
|
185546
|
-
|
|
185547
|
-
const { stdout } = await execFileAsync4("xdg-mime", ["query", "default", "x-scheme-handler/http"]);
|
|
185548
|
-
const id = stdout.trim();
|
|
185549
|
-
const name2 = titleize(id.replace(/.desktop$/, "").replace("-", " "));
|
|
185550
|
-
return { name: name2, id };
|
|
185551
|
-
}
|
|
185552
|
-
if (process9.platform === "win32") {
|
|
185553
|
-
return defaultBrowser();
|
|
185554
|
-
}
|
|
185555
|
-
throw new Error("Only macOS, Linux, and Windows are supported");
|
|
185238
|
+
return typeToEntry;
|
|
185556
185239
|
}
|
|
185557
|
-
|
|
185558
|
-
|
|
185559
|
-
|
|
185560
|
-
|
|
185561
|
-
|
|
185562
|
-
|
|
185563
|
-
|
|
185564
|
-
|
|
185565
|
-
|
|
185566
|
-
|
|
185567
|
-
|
|
185568
|
-
|
|
185569
|
-
|
|
185570
|
-
|
|
185571
|
-
|
|
185572
|
-
|
|
185573
|
-
|
|
185574
|
-
|
|
185575
|
-
|
|
185576
|
-
|
|
185577
|
-
|
|
185578
|
-
|
|
185579
|
-
}
|
|
185580
|
-
throw new AggregateError(errors3, "Failed to open in all supported apps");
|
|
185581
|
-
};
|
|
185582
|
-
var baseOpen = async (options) => {
|
|
185583
|
-
options = {
|
|
185584
|
-
wait: false,
|
|
185585
|
-
background: false,
|
|
185586
|
-
newInstance: false,
|
|
185587
|
-
allowNonzeroExitCode: false,
|
|
185588
|
-
...options
|
|
185589
|
-
};
|
|
185590
|
-
const isFallbackAttempt = options[fallbackAttemptSymbol] === true;
|
|
185591
|
-
delete options[fallbackAttemptSymbol];
|
|
185592
|
-
if (Array.isArray(options.app)) {
|
|
185593
|
-
return tryEachApp(options.app, (singleApp) => baseOpen({
|
|
185594
|
-
...options,
|
|
185595
|
-
app: singleApp,
|
|
185596
|
-
[fallbackAttemptSymbol]: true
|
|
185597
|
-
}));
|
|
185598
|
-
}
|
|
185599
|
-
let { name: app, arguments: appArguments = [] } = options.app ?? {};
|
|
185600
|
-
appArguments = [...appArguments];
|
|
185601
|
-
if (Array.isArray(app)) {
|
|
185602
|
-
return tryEachApp(app, (appName) => baseOpen({
|
|
185603
|
-
...options,
|
|
185604
|
-
app: {
|
|
185605
|
-
name: appName,
|
|
185606
|
-
arguments: appArguments
|
|
185607
|
-
},
|
|
185608
|
-
[fallbackAttemptSymbol]: true
|
|
185609
|
-
}));
|
|
185610
|
-
}
|
|
185611
|
-
if (app === "browser" || app === "browserPrivate") {
|
|
185612
|
-
const ids = {
|
|
185613
|
-
"com.google.chrome": "chrome",
|
|
185614
|
-
"google-chrome.desktop": "chrome",
|
|
185615
|
-
"com.brave.browser": "brave",
|
|
185616
|
-
"org.mozilla.firefox": "firefox",
|
|
185617
|
-
"firefox.desktop": "firefox",
|
|
185618
|
-
"com.microsoft.msedge": "edge",
|
|
185619
|
-
"com.microsoft.edge": "edge",
|
|
185620
|
-
"com.microsoft.edgemac": "edge",
|
|
185621
|
-
"microsoft-edge.desktop": "edge",
|
|
185622
|
-
"com.apple.safari": "safari"
|
|
185623
|
-
};
|
|
185624
|
-
const flags = {
|
|
185625
|
-
chrome: "--incognito",
|
|
185626
|
-
brave: "--incognito",
|
|
185627
|
-
firefox: "--private-window",
|
|
185628
|
-
edge: "--inPrivate"
|
|
185240
|
+
async function readAllConnectors(connectorsDir) {
|
|
185241
|
+
const entries = await readConnectorFiles(connectorsDir);
|
|
185242
|
+
const typeToEntry = buildTypeToEntryMap(entries);
|
|
185243
|
+
return [...typeToEntry.values()].map((e2) => e2.data);
|
|
185244
|
+
}
|
|
185245
|
+
async function writeConnectors(connectorsDir, remoteConnectors) {
|
|
185246
|
+
const entries = await readConnectorFiles(connectorsDir);
|
|
185247
|
+
const typeToEntry = buildTypeToEntryMap(entries);
|
|
185248
|
+
const newTypes = new Set(remoteConnectors.map((c) => c.integrationType));
|
|
185249
|
+
const deleted = [];
|
|
185250
|
+
for (const [type, entry] of typeToEntry) {
|
|
185251
|
+
if (!newTypes.has(type)) {
|
|
185252
|
+
await deleteFile(entry.filePath);
|
|
185253
|
+
deleted.push(type);
|
|
185254
|
+
}
|
|
185255
|
+
}
|
|
185256
|
+
const written = [];
|
|
185257
|
+
for (const connector of remoteConnectors) {
|
|
185258
|
+
const existing = typeToEntry.get(connector.integrationType);
|
|
185259
|
+
const localConnector = {
|
|
185260
|
+
type: connector.integrationType,
|
|
185261
|
+
scopes: connector.scopes
|
|
185629
185262
|
};
|
|
185630
|
-
|
|
185631
|
-
|
|
185632
|
-
const progId = await wslDefaultBrowser();
|
|
185633
|
-
const browserInfo = _windowsBrowserProgIdMap.get(progId);
|
|
185634
|
-
browser = browserInfo ?? {};
|
|
185635
|
-
} else {
|
|
185636
|
-
browser = await defaultBrowser2();
|
|
185637
|
-
}
|
|
185638
|
-
if (browser.id in ids) {
|
|
185639
|
-
const browserName = ids[browser.id.toLowerCase()];
|
|
185640
|
-
if (app === "browserPrivate") {
|
|
185641
|
-
if (browserName === "safari") {
|
|
185642
|
-
throw new Error("Safari doesn't support opening in private mode via command line");
|
|
185643
|
-
}
|
|
185644
|
-
appArguments.push(flags[browserName]);
|
|
185645
|
-
}
|
|
185646
|
-
return baseOpen({
|
|
185647
|
-
...options,
|
|
185648
|
-
app: {
|
|
185649
|
-
name: apps[browserName],
|
|
185650
|
-
arguments: appArguments
|
|
185651
|
-
}
|
|
185652
|
-
});
|
|
185653
|
-
}
|
|
185654
|
-
throw new Error(`${browser.name} is not supported as a default browser`);
|
|
185655
|
-
}
|
|
185656
|
-
let command;
|
|
185657
|
-
const cliArguments = [];
|
|
185658
|
-
const childProcessOptions = {};
|
|
185659
|
-
let shouldUseWindowsInWsl = false;
|
|
185660
|
-
if (is_wsl_default && !isInsideContainer() && !is_in_ssh_default && !app) {
|
|
185661
|
-
shouldUseWindowsInWsl = await canAccessPowerShell();
|
|
185662
|
-
}
|
|
185663
|
-
if (platform5 === "darwin") {
|
|
185664
|
-
command = "open";
|
|
185665
|
-
if (options.wait) {
|
|
185666
|
-
cliArguments.push("--wait-apps");
|
|
185667
|
-
}
|
|
185668
|
-
if (options.background) {
|
|
185669
|
-
cliArguments.push("--background");
|
|
185670
|
-
}
|
|
185671
|
-
if (options.newInstance) {
|
|
185672
|
-
cliArguments.push("--new");
|
|
185673
|
-
}
|
|
185674
|
-
if (app) {
|
|
185675
|
-
cliArguments.push("-a", app);
|
|
185676
|
-
}
|
|
185677
|
-
} else if (platform5 === "win32" || shouldUseWindowsInWsl) {
|
|
185678
|
-
command = await powerShellPath2();
|
|
185679
|
-
cliArguments.push(...executePowerShell.argumentsPrefix);
|
|
185680
|
-
if (!is_wsl_default) {
|
|
185681
|
-
childProcessOptions.windowsVerbatimArguments = true;
|
|
185682
|
-
}
|
|
185683
|
-
if (is_wsl_default && options.target) {
|
|
185684
|
-
options.target = await convertWslPathToWindows(options.target);
|
|
185685
|
-
}
|
|
185686
|
-
const encodedArguments = ["$ProgressPreference = 'SilentlyContinue';", "Start"];
|
|
185687
|
-
if (options.wait) {
|
|
185688
|
-
encodedArguments.push("-Wait");
|
|
185689
|
-
}
|
|
185690
|
-
if (app) {
|
|
185691
|
-
encodedArguments.push(executePowerShell.escapeArgument(app));
|
|
185692
|
-
if (options.target) {
|
|
185693
|
-
appArguments.push(options.target);
|
|
185694
|
-
}
|
|
185695
|
-
} else if (options.target) {
|
|
185696
|
-
encodedArguments.push(executePowerShell.escapeArgument(options.target));
|
|
185697
|
-
}
|
|
185698
|
-
if (appArguments.length > 0) {
|
|
185699
|
-
appArguments = appArguments.map((argument) => executePowerShell.escapeArgument(argument));
|
|
185700
|
-
encodedArguments.push("-ArgumentList", appArguments.join(","));
|
|
185701
|
-
}
|
|
185702
|
-
options.target = executePowerShell.encodeCommand(encodedArguments.join(" "));
|
|
185703
|
-
if (!options.wait) {
|
|
185704
|
-
childProcessOptions.stdio = "ignore";
|
|
185705
|
-
}
|
|
185706
|
-
} else {
|
|
185707
|
-
if (app) {
|
|
185708
|
-
command = app;
|
|
185709
|
-
} else {
|
|
185710
|
-
const isBundled = !__dirname3 || __dirname3 === "/";
|
|
185711
|
-
let exeLocalXdgOpen = false;
|
|
185712
|
-
try {
|
|
185713
|
-
await fs18.access(localXdgOpenPath, fsConstants2.X_OK);
|
|
185714
|
-
exeLocalXdgOpen = true;
|
|
185715
|
-
} catch {}
|
|
185716
|
-
const useSystemXdgOpen = process11.versions.electron ?? (platform5 === "android" || isBundled || !exeLocalXdgOpen);
|
|
185717
|
-
command = useSystemXdgOpen ? "xdg-open" : localXdgOpenPath;
|
|
185718
|
-
}
|
|
185719
|
-
if (appArguments.length > 0) {
|
|
185720
|
-
cliArguments.push(...appArguments);
|
|
185721
|
-
}
|
|
185722
|
-
if (!options.wait) {
|
|
185723
|
-
childProcessOptions.stdio = "ignore";
|
|
185724
|
-
childProcessOptions.detached = true;
|
|
185725
|
-
}
|
|
185726
|
-
}
|
|
185727
|
-
if (platform5 === "darwin" && appArguments.length > 0) {
|
|
185728
|
-
cliArguments.push("--args", ...appArguments);
|
|
185729
|
-
}
|
|
185730
|
-
if (options.target) {
|
|
185731
|
-
cliArguments.push(options.target);
|
|
185732
|
-
}
|
|
185733
|
-
const subprocess = childProcess3.spawn(command, cliArguments, childProcessOptions);
|
|
185734
|
-
if (options.wait) {
|
|
185735
|
-
return new Promise((resolve, reject) => {
|
|
185736
|
-
subprocess.once("error", reject);
|
|
185737
|
-
subprocess.once("close", (exitCode) => {
|
|
185738
|
-
if (!options.allowNonzeroExitCode && exitCode !== 0) {
|
|
185739
|
-
reject(new Error(`Exited with code ${exitCode}`));
|
|
185740
|
-
return;
|
|
185741
|
-
}
|
|
185742
|
-
resolve(subprocess);
|
|
185743
|
-
});
|
|
185744
|
-
});
|
|
185745
|
-
}
|
|
185746
|
-
if (isFallbackAttempt) {
|
|
185747
|
-
return new Promise((resolve, reject) => {
|
|
185748
|
-
subprocess.once("error", reject);
|
|
185749
|
-
subprocess.once("spawn", () => {
|
|
185750
|
-
subprocess.once("close", (exitCode) => {
|
|
185751
|
-
subprocess.off("error", reject);
|
|
185752
|
-
if (exitCode !== 0) {
|
|
185753
|
-
reject(new Error(`Exited with code ${exitCode}`));
|
|
185754
|
-
return;
|
|
185755
|
-
}
|
|
185756
|
-
subprocess.unref();
|
|
185757
|
-
resolve(subprocess);
|
|
185758
|
-
});
|
|
185759
|
-
});
|
|
185760
|
-
});
|
|
185761
|
-
}
|
|
185762
|
-
subprocess.unref();
|
|
185763
|
-
return new Promise((resolve, reject) => {
|
|
185764
|
-
subprocess.once("error", reject);
|
|
185765
|
-
subprocess.once("spawn", () => {
|
|
185766
|
-
subprocess.off("error", reject);
|
|
185767
|
-
resolve(subprocess);
|
|
185768
|
-
});
|
|
185769
|
-
});
|
|
185770
|
-
};
|
|
185771
|
-
var open = (target, options) => {
|
|
185772
|
-
if (typeof target !== "string") {
|
|
185773
|
-
throw new TypeError("Expected a `target`");
|
|
185774
|
-
}
|
|
185775
|
-
return baseOpen({
|
|
185776
|
-
...options,
|
|
185777
|
-
target
|
|
185778
|
-
});
|
|
185779
|
-
};
|
|
185780
|
-
function detectArchBinary(binary) {
|
|
185781
|
-
if (typeof binary === "string" || Array.isArray(binary)) {
|
|
185782
|
-
return binary;
|
|
185783
|
-
}
|
|
185784
|
-
const { [arch]: archBinary } = binary;
|
|
185785
|
-
if (!archBinary) {
|
|
185786
|
-
throw new Error(`${arch} is not supported`);
|
|
185787
|
-
}
|
|
185788
|
-
return archBinary;
|
|
185789
|
-
}
|
|
185790
|
-
function detectPlatformBinary({ [platform5]: platformBinary }, { wsl } = {}) {
|
|
185791
|
-
if (wsl && is_wsl_default) {
|
|
185792
|
-
return detectArchBinary(wsl);
|
|
185793
|
-
}
|
|
185794
|
-
if (!platformBinary) {
|
|
185795
|
-
throw new Error(`${platform5} is not supported`);
|
|
185796
|
-
}
|
|
185797
|
-
return detectArchBinary(platformBinary);
|
|
185798
|
-
}
|
|
185799
|
-
var apps = {
|
|
185800
|
-
browser: "browser",
|
|
185801
|
-
browserPrivate: "browserPrivate"
|
|
185802
|
-
};
|
|
185803
|
-
defineLazyProperty(apps, "chrome", () => detectPlatformBinary({
|
|
185804
|
-
darwin: "google chrome",
|
|
185805
|
-
win32: "chrome",
|
|
185806
|
-
linux: ["google-chrome", "google-chrome-stable", "chromium", "chromium-browser"]
|
|
185807
|
-
}, {
|
|
185808
|
-
wsl: {
|
|
185809
|
-
ia32: "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",
|
|
185810
|
-
x64: ["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe", "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]
|
|
185811
|
-
}
|
|
185812
|
-
}));
|
|
185813
|
-
defineLazyProperty(apps, "brave", () => detectPlatformBinary({
|
|
185814
|
-
darwin: "brave browser",
|
|
185815
|
-
win32: "brave",
|
|
185816
|
-
linux: ["brave-browser", "brave"]
|
|
185817
|
-
}, {
|
|
185818
|
-
wsl: {
|
|
185819
|
-
ia32: "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe",
|
|
185820
|
-
x64: ["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe", "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"]
|
|
185821
|
-
}
|
|
185822
|
-
}));
|
|
185823
|
-
defineLazyProperty(apps, "firefox", () => detectPlatformBinary({
|
|
185824
|
-
darwin: "firefox",
|
|
185825
|
-
win32: String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,
|
|
185826
|
-
linux: "firefox"
|
|
185827
|
-
}, {
|
|
185828
|
-
wsl: "/mnt/c/Program Files/Mozilla Firefox/firefox.exe"
|
|
185829
|
-
}));
|
|
185830
|
-
defineLazyProperty(apps, "edge", () => detectPlatformBinary({
|
|
185831
|
-
darwin: "microsoft edge",
|
|
185832
|
-
win32: "msedge",
|
|
185833
|
-
linux: ["microsoft-edge", "microsoft-edge-dev"]
|
|
185834
|
-
}, {
|
|
185835
|
-
wsl: "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
|
|
185836
|
-
}));
|
|
185837
|
-
defineLazyProperty(apps, "safari", () => detectPlatformBinary({
|
|
185838
|
-
darwin: "Safari"
|
|
185839
|
-
}));
|
|
185840
|
-
var open_default = open;
|
|
185841
|
-
|
|
185842
|
-
// node_modules/p-wait-for/index.js
|
|
185843
|
-
var resolveValue = Symbol("resolveValue");
|
|
185844
|
-
var sleep = (ms, signal) => new Promise((resolve, reject) => {
|
|
185845
|
-
if (signal?.aborted) {
|
|
185846
|
-
reject(signal.reason);
|
|
185847
|
-
return;
|
|
185848
|
-
}
|
|
185849
|
-
const timeout2 = setTimeout(resolve, ms);
|
|
185850
|
-
if (signal) {
|
|
185851
|
-
signal.addEventListener("abort", () => {
|
|
185852
|
-
clearTimeout(timeout2);
|
|
185853
|
-
reject(signal.reason);
|
|
185854
|
-
}, { once: true });
|
|
185855
|
-
}
|
|
185856
|
-
});
|
|
185857
|
-
var validateOptions = (interval, timeout2) => {
|
|
185858
|
-
if (typeof interval !== "number" || !Number.isFinite(interval) || interval < 0) {
|
|
185859
|
-
throw new TypeError("Expected interval to be a finite non-negative number");
|
|
185860
|
-
}
|
|
185861
|
-
if (typeof timeout2 === "object" && timeout2 !== null) {
|
|
185862
|
-
if (typeof timeout2.milliseconds !== "number" || Number.isNaN(timeout2.milliseconds) || timeout2.milliseconds < 0) {
|
|
185863
|
-
throw new TypeError("Expected timeout.milliseconds to be a finite non-negative number");
|
|
185864
|
-
}
|
|
185865
|
-
} else if (typeof timeout2 === "number" && (Number.isNaN(timeout2) || timeout2 < 0)) {
|
|
185866
|
-
throw new TypeError("Expected timeout to be a finite non-negative number");
|
|
185867
|
-
}
|
|
185868
|
-
};
|
|
185869
|
-
var createTimeoutError = (timeout2) => {
|
|
185870
|
-
if (timeout2.message instanceof Error) {
|
|
185871
|
-
return timeout2.message;
|
|
185872
|
-
}
|
|
185873
|
-
const message = timeout2.message ?? `Promise timed out after ${timeout2.milliseconds} milliseconds`;
|
|
185874
|
-
return new TimeoutError2(message);
|
|
185875
|
-
};
|
|
185876
|
-
var handleFallback = (timeout2) => {
|
|
185877
|
-
if (timeout2.fallback) {
|
|
185878
|
-
return timeout2.fallback();
|
|
185879
|
-
}
|
|
185880
|
-
throw createTimeoutError(timeout2);
|
|
185881
|
-
};
|
|
185882
|
-
var handleAbortError = (timeoutSignal, timeout2, signal) => {
|
|
185883
|
-
if (timeoutSignal?.aborted) {
|
|
185884
|
-
if (typeof timeout2 === "object") {
|
|
185885
|
-
return handleFallback(timeout2);
|
|
185886
|
-
}
|
|
185887
|
-
throw new TimeoutError2;
|
|
185888
|
-
}
|
|
185889
|
-
throw signal.reason;
|
|
185890
|
-
};
|
|
185891
|
-
async function pWaitFor(condition, options = {}) {
|
|
185892
|
-
const {
|
|
185893
|
-
interval = 20,
|
|
185894
|
-
timeout: timeout2 = Number.POSITIVE_INFINITY,
|
|
185895
|
-
before = true,
|
|
185896
|
-
signal
|
|
185897
|
-
} = options;
|
|
185898
|
-
validateOptions(interval, timeout2);
|
|
185899
|
-
const timeoutMs = typeof timeout2 === "number" ? timeout2 : timeout2?.milliseconds ?? Number.POSITIVE_INFINITY;
|
|
185900
|
-
const timeoutSignal = timeoutMs === Number.POSITIVE_INFINITY ? undefined : AbortSignal.timeout(timeoutMs);
|
|
185901
|
-
const combinedSignal = timeoutSignal && signal ? AbortSignal.any([timeoutSignal, signal]) : timeoutSignal ?? signal;
|
|
185902
|
-
if (!before) {
|
|
185903
|
-
await sleep(interval, combinedSignal);
|
|
185904
|
-
}
|
|
185905
|
-
if (combinedSignal?.aborted) {
|
|
185906
|
-
return handleAbortError(timeoutSignal, timeout2, signal);
|
|
185907
|
-
}
|
|
185908
|
-
while (true) {
|
|
185909
|
-
try {
|
|
185910
|
-
const value = await condition();
|
|
185911
|
-
if (typeof value === "object" && value !== null && resolveValue in value) {
|
|
185912
|
-
return value[resolveValue];
|
|
185913
|
-
}
|
|
185914
|
-
if (value === true) {
|
|
185915
|
-
return;
|
|
185916
|
-
}
|
|
185917
|
-
if (value === false) {
|
|
185918
|
-
await sleep(interval, combinedSignal);
|
|
185919
|
-
continue;
|
|
185920
|
-
}
|
|
185921
|
-
throw new TypeError("Expected condition to return a boolean");
|
|
185922
|
-
} catch (error48) {
|
|
185923
|
-
if (error48 === combinedSignal?.reason) {
|
|
185924
|
-
return handleAbortError(timeoutSignal, timeout2, signal);
|
|
185925
|
-
}
|
|
185926
|
-
throw error48;
|
|
185927
|
-
}
|
|
185928
|
-
}
|
|
185929
|
-
}
|
|
185930
|
-
pWaitFor.resolveWith = (value) => ({ [resolveValue]: value });
|
|
185931
|
-
|
|
185932
|
-
class TimeoutError2 extends Error {
|
|
185933
|
-
constructor(message = "Promise timed out") {
|
|
185934
|
-
super(message);
|
|
185935
|
-
this.name = "TimeoutError";
|
|
185936
|
-
}
|
|
185937
|
-
}
|
|
185938
|
-
|
|
185939
|
-
// src/core/resources/connector/oauth-flow.ts
|
|
185940
|
-
async function runOAuthFlow(params) {
|
|
185941
|
-
await open_default(params.redirectUrl);
|
|
185942
|
-
let finalStatus = "PENDING";
|
|
185943
|
-
try {
|
|
185944
|
-
await pWaitFor(async () => {
|
|
185945
|
-
const response = await getOAuthStatus(params.type, params.connectionId);
|
|
185946
|
-
finalStatus = response.status;
|
|
185947
|
-
return response.status !== "PENDING";
|
|
185948
|
-
}, {
|
|
185949
|
-
interval: 2000,
|
|
185950
|
-
timeout: 2 * 60 * 1000
|
|
185951
|
-
});
|
|
185952
|
-
} catch (err) {
|
|
185953
|
-
if (!(err instanceof TimeoutError2)) {
|
|
185954
|
-
throw err;
|
|
185263
|
+
if (existing && isDeepStrictEqual(existing.data, localConnector)) {
|
|
185264
|
+
continue;
|
|
185955
185265
|
}
|
|
185266
|
+
const filePath = existing?.filePath ?? join4(connectorsDir, `${connector.integrationType}.${CONFIG_FILE_EXTENSION}`);
|
|
185267
|
+
await writeJsonFile(filePath, localConnector);
|
|
185268
|
+
written.push(connector.integrationType);
|
|
185956
185269
|
}
|
|
185957
|
-
return {
|
|
185270
|
+
return { written, deleted };
|
|
185958
185271
|
}
|
|
185959
185272
|
// src/core/resources/connector/push.ts
|
|
185960
185273
|
async function pushConnectors(connectors) {
|
|
@@ -186296,7 +185609,7 @@ async function deployFunctions(functions) {
|
|
|
186296
185609
|
return result.data;
|
|
186297
185610
|
}
|
|
186298
185611
|
// src/core/resources/function/config.ts
|
|
186299
|
-
import { dirname as dirname4, join as
|
|
185612
|
+
import { dirname as dirname4, join as join5 } from "node:path";
|
|
186300
185613
|
async function readFunctionConfig(configPath) {
|
|
186301
185614
|
const parsed = await readJsonFile(configPath);
|
|
186302
185615
|
const result = FunctionConfigSchema.safeParse(parsed);
|
|
@@ -186308,7 +185621,7 @@ async function readFunctionConfig(configPath) {
|
|
|
186308
185621
|
async function readFunction(configPath) {
|
|
186309
185622
|
const config5 = await readFunctionConfig(configPath);
|
|
186310
185623
|
const functionDir = dirname4(configPath);
|
|
186311
|
-
const entryPath =
|
|
185624
|
+
const entryPath = join5(functionDir, config5.entry);
|
|
186312
185625
|
if (!await pathExists(entryPath)) {
|
|
186313
185626
|
throw new FileNotFoundError(`Function entry file not found: ${entryPath} (referenced in ${configPath})`);
|
|
186314
185627
|
}
|
|
@@ -186397,10 +185710,10 @@ async function readProjectConfig(projectRoot) {
|
|
|
186397
185710
|
const project = result.data;
|
|
186398
185711
|
const configDir = dirname5(configPath);
|
|
186399
185712
|
const [entities, functions, agents, connectors] = await Promise.all([
|
|
186400
|
-
entityResource.readAll(
|
|
186401
|
-
functionResource.readAll(
|
|
186402
|
-
agentResource.readAll(
|
|
186403
|
-
connectorResource.readAll(
|
|
185713
|
+
entityResource.readAll(join6(configDir, project.entitiesDir)),
|
|
185714
|
+
functionResource.readAll(join6(configDir, project.functionsDir)),
|
|
185715
|
+
agentResource.readAll(join6(configDir, project.agentsDir)),
|
|
185716
|
+
connectorResource.readAll(join6(configDir, project.connectorsDir))
|
|
186404
185717
|
]);
|
|
186405
185718
|
return {
|
|
186406
185719
|
project: { ...project, root, configPath },
|
|
@@ -186497,7 +185810,7 @@ async function readAppConfig(projectRoot) {
|
|
|
186497
185810
|
// src/core/project/template.ts
|
|
186498
185811
|
var import_ejs = __toESM(require_ejs(), 1);
|
|
186499
185812
|
var import_front_matter = __toESM(require_front_matter(), 1);
|
|
186500
|
-
import { dirname as dirname6, join as
|
|
185813
|
+
import { dirname as dirname6, join as join7 } from "node:path";
|
|
186501
185814
|
async function listTemplates() {
|
|
186502
185815
|
const parsed = await readJsonFile(getTemplatesIndexPath());
|
|
186503
185816
|
const result = TemplatesConfigSchema.safeParse(parsed);
|
|
@@ -186507,23 +185820,23 @@ async function listTemplates() {
|
|
|
186507
185820
|
return result.data.templates;
|
|
186508
185821
|
}
|
|
186509
185822
|
async function renderTemplate(template, destPath, data) {
|
|
186510
|
-
const templateDir =
|
|
185823
|
+
const templateDir = join7(getTemplatesDir(), template.path);
|
|
186511
185824
|
const files = await globby("**/*", {
|
|
186512
185825
|
cwd: templateDir,
|
|
186513
185826
|
dot: true,
|
|
186514
185827
|
onlyFiles: true
|
|
186515
185828
|
});
|
|
186516
185829
|
for (const file2 of files) {
|
|
186517
|
-
const srcPath =
|
|
185830
|
+
const srcPath = join7(templateDir, file2);
|
|
186518
185831
|
try {
|
|
186519
185832
|
if (file2.endsWith(".ejs")) {
|
|
186520
185833
|
const rendered = await import_ejs.default.renderFile(srcPath, data);
|
|
186521
185834
|
const { attributes, body } = import_front_matter.default(rendered);
|
|
186522
|
-
const destFile = attributes.outputFileName ?
|
|
186523
|
-
const destFilePath =
|
|
185835
|
+
const destFile = attributes.outputFileName ? join7(dirname6(file2), attributes.outputFileName) : file2.replace(/\.ejs$/, "");
|
|
185836
|
+
const destFilePath = join7(destPath, destFile);
|
|
186524
185837
|
await writeFile(destFilePath, body);
|
|
186525
185838
|
} else {
|
|
186526
|
-
const destFilePath =
|
|
185839
|
+
const destFilePath = join7(destPath, file2);
|
|
186527
185840
|
await copyFile(srcPath, destFilePath);
|
|
186528
185841
|
}
|
|
186529
185842
|
} catch (error48) {
|
|
@@ -186626,7 +185939,7 @@ async function getSiteFilePaths(outputDir) {
|
|
|
186626
185939
|
// src/core/site/deploy.ts
|
|
186627
185940
|
import { randomUUID } from "node:crypto";
|
|
186628
185941
|
import { tmpdir } from "node:os";
|
|
186629
|
-
import { join as
|
|
185942
|
+
import { join as join8 } from "node:path";
|
|
186630
185943
|
async function deploySite(siteOutputDir) {
|
|
186631
185944
|
if (!await pathExists(siteOutputDir)) {
|
|
186632
185945
|
throw new FileNotFoundError(`Output directory does not exist: ${siteOutputDir}. Make sure to build your project first.`, {
|
|
@@ -186643,7 +185956,7 @@ async function deploySite(siteOutputDir) {
|
|
|
186643
185956
|
]
|
|
186644
185957
|
});
|
|
186645
185958
|
}
|
|
186646
|
-
const archivePath =
|
|
185959
|
+
const archivePath = join8(tmpdir(), `base44-site-${randomUUID()}.tar.gz`);
|
|
186647
185960
|
try {
|
|
186648
185961
|
await createArchive(siteOutputDir, archivePath);
|
|
186649
185962
|
return await uploadSite(archivePath);
|
|
@@ -186660,26 +185973,24 @@ async function createArchive(pathToArchive, targetArchivePath) {
|
|
|
186660
185973
|
}
|
|
186661
185974
|
// src/core/project/deploy.ts
|
|
186662
185975
|
function hasResourcesToDeploy(projectData) {
|
|
186663
|
-
const { project, entities, functions, agents
|
|
185976
|
+
const { project, entities, functions, agents } = projectData;
|
|
186664
185977
|
const hasSite = Boolean(project.site?.outputDirectory);
|
|
186665
185978
|
const hasEntities = entities.length > 0;
|
|
186666
185979
|
const hasFunctions = functions.length > 0;
|
|
186667
185980
|
const hasAgents = agents.length > 0;
|
|
186668
|
-
|
|
186669
|
-
return hasEntities || hasFunctions || hasAgents || hasConnectors || hasSite;
|
|
185981
|
+
return hasEntities || hasFunctions || hasAgents || hasSite;
|
|
186670
185982
|
}
|
|
186671
185983
|
async function deployAll(projectData) {
|
|
186672
|
-
const { project, entities, functions, agents
|
|
185984
|
+
const { project, entities, functions, agents } = projectData;
|
|
186673
185985
|
await entityResource.push(entities);
|
|
186674
185986
|
await functionResource.push(functions);
|
|
186675
185987
|
await agentResource.push(agents);
|
|
186676
|
-
const { results: connectorResults } = await pushConnectors(connectors);
|
|
186677
185988
|
if (project.site?.outputDirectory) {
|
|
186678
185989
|
const outputDir = resolve(project.root, project.site.outputDirectory);
|
|
186679
185990
|
const { appUrl } = await deploySite(outputDir);
|
|
186680
|
-
return { appUrl
|
|
185991
|
+
return { appUrl };
|
|
186681
185992
|
}
|
|
186682
|
-
return {
|
|
185993
|
+
return {};
|
|
186683
185994
|
}
|
|
186684
185995
|
// src/core/clients/base44-client.ts
|
|
186685
185996
|
var retriedRequests = new WeakSet;
|
|
@@ -187021,16 +186332,16 @@ var ansiStyles = assembleStyles();
|
|
|
187021
186332
|
var ansi_styles_default = ansiStyles;
|
|
187022
186333
|
|
|
187023
186334
|
// node_modules/chalk/source/vendor/supports-color/index.js
|
|
187024
|
-
import
|
|
187025
|
-
import
|
|
186335
|
+
import process5 from "node:process";
|
|
186336
|
+
import os from "node:os";
|
|
187026
186337
|
import tty from "node:tty";
|
|
187027
|
-
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args :
|
|
186338
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process5.argv) {
|
|
187028
186339
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
187029
186340
|
const position = argv.indexOf(prefix + flag);
|
|
187030
186341
|
const terminatorPosition = argv.indexOf("--");
|
|
187031
186342
|
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
187032
186343
|
}
|
|
187033
|
-
var { env } =
|
|
186344
|
+
var { env } = process5;
|
|
187034
186345
|
var flagForceColor;
|
|
187035
186346
|
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
187036
186347
|
flagForceColor = 0;
|
|
@@ -187086,8 +186397,8 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
187086
186397
|
if (env.TERM === "dumb") {
|
|
187087
186398
|
return min;
|
|
187088
186399
|
}
|
|
187089
|
-
if (
|
|
187090
|
-
const osRelease =
|
|
186400
|
+
if (process5.platform === "win32") {
|
|
186401
|
+
const osRelease = os.release().split(".");
|
|
187091
186402
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
187092
186403
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
187093
186404
|
}
|
|
@@ -187279,18 +186590,18 @@ var proto = Object.defineProperties(() => {}, {
|
|
|
187279
186590
|
}
|
|
187280
186591
|
}
|
|
187281
186592
|
});
|
|
187282
|
-
var createStyler = (
|
|
186593
|
+
var createStyler = (open, close, parent) => {
|
|
187283
186594
|
let openAll;
|
|
187284
186595
|
let closeAll;
|
|
187285
186596
|
if (parent === undefined) {
|
|
187286
|
-
openAll =
|
|
186597
|
+
openAll = open;
|
|
187287
186598
|
closeAll = close;
|
|
187288
186599
|
} else {
|
|
187289
|
-
openAll = parent.openAll +
|
|
186600
|
+
openAll = parent.openAll + open;
|
|
187290
186601
|
closeAll = close + parent.closeAll;
|
|
187291
186602
|
}
|
|
187292
186603
|
return {
|
|
187293
|
-
open
|
|
186604
|
+
open,
|
|
187294
186605
|
close,
|
|
187295
186606
|
openAll,
|
|
187296
186607
|
closeAll,
|
|
@@ -187372,7 +186683,7 @@ var theme = {
|
|
|
187372
186683
|
};
|
|
187373
186684
|
|
|
187374
186685
|
// src/cli/utils/animate.ts
|
|
187375
|
-
function
|
|
186686
|
+
function sleep(ms) {
|
|
187376
186687
|
return new Promise((resolve2) => setTimeout(resolve2, ms));
|
|
187377
186688
|
}
|
|
187378
186689
|
async function animateLineReveal(line, duration3) {
|
|
@@ -187392,7 +186703,7 @@ async function animateLineReveal(line, duration3) {
|
|
|
187392
186703
|
}
|
|
187393
186704
|
}
|
|
187394
186705
|
process.stdout.write(`\r${output}`);
|
|
187395
|
-
await
|
|
186706
|
+
await sleep(stepDuration);
|
|
187396
186707
|
}
|
|
187397
186708
|
process.stdout.write(`\r${theme.colors.base44Orange(line)}
|
|
187398
186709
|
`);
|
|
@@ -187417,7 +186728,7 @@ async function shimmerPass(lines, duration3) {
|
|
|
187417
186728
|
}
|
|
187418
186729
|
console.log(output);
|
|
187419
186730
|
}
|
|
187420
|
-
await
|
|
186731
|
+
await sleep(stepDuration);
|
|
187421
186732
|
}
|
|
187422
186733
|
process.stdout.write(moveUp);
|
|
187423
186734
|
for (const line of lines) {
|
|
@@ -187431,7 +186742,7 @@ async function printAnimatedLines(lines) {
|
|
|
187431
186742
|
const line = lines[i];
|
|
187432
186743
|
await animateLineReveal(line, 100);
|
|
187433
186744
|
if (i < lines.length - 1) {
|
|
187434
|
-
await
|
|
186745
|
+
await sleep(lineDelay - 100);
|
|
187435
186746
|
}
|
|
187436
186747
|
}
|
|
187437
186748
|
await shimmerPass(lines, 200);
|
|
@@ -187469,6 +186780,103 @@ var onPromptCancel = () => {
|
|
|
187469
186780
|
xe("Operation cancelled.");
|
|
187470
186781
|
throw new CLIExitError(0);
|
|
187471
186782
|
};
|
|
186783
|
+
// node_modules/p-wait-for/index.js
|
|
186784
|
+
var resolveValue = Symbol("resolveValue");
|
|
186785
|
+
var sleep2 = (ms, signal) => new Promise((resolve2, reject) => {
|
|
186786
|
+
if (signal?.aborted) {
|
|
186787
|
+
reject(signal.reason);
|
|
186788
|
+
return;
|
|
186789
|
+
}
|
|
186790
|
+
const timeout2 = setTimeout(resolve2, ms);
|
|
186791
|
+
if (signal) {
|
|
186792
|
+
signal.addEventListener("abort", () => {
|
|
186793
|
+
clearTimeout(timeout2);
|
|
186794
|
+
reject(signal.reason);
|
|
186795
|
+
}, { once: true });
|
|
186796
|
+
}
|
|
186797
|
+
});
|
|
186798
|
+
var validateOptions = (interval, timeout2) => {
|
|
186799
|
+
if (typeof interval !== "number" || !Number.isFinite(interval) || interval < 0) {
|
|
186800
|
+
throw new TypeError("Expected interval to be a finite non-negative number");
|
|
186801
|
+
}
|
|
186802
|
+
if (typeof timeout2 === "object" && timeout2 !== null) {
|
|
186803
|
+
if (typeof timeout2.milliseconds !== "number" || Number.isNaN(timeout2.milliseconds) || timeout2.milliseconds < 0) {
|
|
186804
|
+
throw new TypeError("Expected timeout.milliseconds to be a finite non-negative number");
|
|
186805
|
+
}
|
|
186806
|
+
} else if (typeof timeout2 === "number" && (Number.isNaN(timeout2) || timeout2 < 0)) {
|
|
186807
|
+
throw new TypeError("Expected timeout to be a finite non-negative number");
|
|
186808
|
+
}
|
|
186809
|
+
};
|
|
186810
|
+
var createTimeoutError = (timeout2) => {
|
|
186811
|
+
if (timeout2.message instanceof Error) {
|
|
186812
|
+
return timeout2.message;
|
|
186813
|
+
}
|
|
186814
|
+
const message = timeout2.message ?? `Promise timed out after ${timeout2.milliseconds} milliseconds`;
|
|
186815
|
+
return new TimeoutError2(message);
|
|
186816
|
+
};
|
|
186817
|
+
var handleFallback = (timeout2) => {
|
|
186818
|
+
if (timeout2.fallback) {
|
|
186819
|
+
return timeout2.fallback();
|
|
186820
|
+
}
|
|
186821
|
+
throw createTimeoutError(timeout2);
|
|
186822
|
+
};
|
|
186823
|
+
var handleAbortError = (timeoutSignal, timeout2, signal) => {
|
|
186824
|
+
if (timeoutSignal?.aborted) {
|
|
186825
|
+
if (typeof timeout2 === "object") {
|
|
186826
|
+
return handleFallback(timeout2);
|
|
186827
|
+
}
|
|
186828
|
+
throw new TimeoutError2;
|
|
186829
|
+
}
|
|
186830
|
+
throw signal.reason;
|
|
186831
|
+
};
|
|
186832
|
+
async function pWaitFor(condition, options = {}) {
|
|
186833
|
+
const {
|
|
186834
|
+
interval = 20,
|
|
186835
|
+
timeout: timeout2 = Number.POSITIVE_INFINITY,
|
|
186836
|
+
before = true,
|
|
186837
|
+
signal
|
|
186838
|
+
} = options;
|
|
186839
|
+
validateOptions(interval, timeout2);
|
|
186840
|
+
const timeoutMs = typeof timeout2 === "number" ? timeout2 : timeout2?.milliseconds ?? Number.POSITIVE_INFINITY;
|
|
186841
|
+
const timeoutSignal = timeoutMs === Number.POSITIVE_INFINITY ? undefined : AbortSignal.timeout(timeoutMs);
|
|
186842
|
+
const combinedSignal = timeoutSignal && signal ? AbortSignal.any([timeoutSignal, signal]) : timeoutSignal ?? signal;
|
|
186843
|
+
if (!before) {
|
|
186844
|
+
await sleep2(interval, combinedSignal);
|
|
186845
|
+
}
|
|
186846
|
+
if (combinedSignal?.aborted) {
|
|
186847
|
+
return handleAbortError(timeoutSignal, timeout2, signal);
|
|
186848
|
+
}
|
|
186849
|
+
while (true) {
|
|
186850
|
+
try {
|
|
186851
|
+
const value = await condition();
|
|
186852
|
+
if (typeof value === "object" && value !== null && resolveValue in value) {
|
|
186853
|
+
return value[resolveValue];
|
|
186854
|
+
}
|
|
186855
|
+
if (value === true) {
|
|
186856
|
+
return;
|
|
186857
|
+
}
|
|
186858
|
+
if (value === false) {
|
|
186859
|
+
await sleep2(interval, combinedSignal);
|
|
186860
|
+
continue;
|
|
186861
|
+
}
|
|
186862
|
+
throw new TypeError("Expected condition to return a boolean");
|
|
186863
|
+
} catch (error48) {
|
|
186864
|
+
if (error48 === combinedSignal?.reason) {
|
|
186865
|
+
return handleAbortError(timeoutSignal, timeout2, signal);
|
|
186866
|
+
}
|
|
186867
|
+
throw error48;
|
|
186868
|
+
}
|
|
186869
|
+
}
|
|
186870
|
+
}
|
|
186871
|
+
pWaitFor.resolveWith = (value) => ({ [resolveValue]: value });
|
|
186872
|
+
|
|
186873
|
+
class TimeoutError2 extends Error {
|
|
186874
|
+
constructor(message = "Promise timed out") {
|
|
186875
|
+
super(message);
|
|
186876
|
+
this.name = "TimeoutError";
|
|
186877
|
+
}
|
|
186878
|
+
}
|
|
186879
|
+
|
|
187472
186880
|
// src/cli/commands/auth/login-flow.ts
|
|
187473
186881
|
async function generateAndDisplayDeviceCode() {
|
|
187474
186882
|
const deviceCodeResponse = await runTask("Generating device code...", async () => {
|
|
@@ -187541,7 +186949,7 @@ function isPlainObject2(value) {
|
|
|
187541
186949
|
}
|
|
187542
186950
|
|
|
187543
186951
|
// node_modules/execa/lib/arguments/file-url.js
|
|
187544
|
-
import { fileURLToPath as
|
|
186952
|
+
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
187545
186953
|
var safeNormalizeFileUrl = (file2, name2) => {
|
|
187546
186954
|
const fileString = normalizeFileUrl(normalizeDenoExecPath(file2));
|
|
187547
186955
|
if (typeof fileString !== "string") {
|
|
@@ -187551,7 +186959,7 @@ var safeNormalizeFileUrl = (file2, name2) => {
|
|
|
187551
186959
|
};
|
|
187552
186960
|
var normalizeDenoExecPath = (file2) => isDenoExecPath(file2) ? file2.toString() : file2;
|
|
187553
186961
|
var isDenoExecPath = (file2) => typeof file2 !== "string" && file2 && Object.getPrototypeOf(file2) === String.prototype;
|
|
187554
|
-
var normalizeFileUrl = (file2) => file2 instanceof URL ?
|
|
186962
|
+
var normalizeFileUrl = (file2) => file2 instanceof URL ? fileURLToPath3(file2) : file2;
|
|
187555
186963
|
|
|
187556
186964
|
// node_modules/execa/lib/methods/parameters.js
|
|
187557
186965
|
var normalizeParameters = (rawFile, rawArguments = [], rawOptions = {}) => {
|
|
@@ -187733,9 +187141,9 @@ import { spawnSync } from "node:child_process";
|
|
|
187733
187141
|
import { debuglog } from "node:util";
|
|
187734
187142
|
|
|
187735
187143
|
// node_modules/execa/lib/utils/standard-stream.js
|
|
187736
|
-
import
|
|
187144
|
+
import process6 from "node:process";
|
|
187737
187145
|
var isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
|
|
187738
|
-
var STANDARD_STREAMS = [
|
|
187146
|
+
var STANDARD_STREAMS = [process6.stdin, process6.stdout, process6.stderr];
|
|
187739
187147
|
var STANDARD_STREAMS_ALIASES = ["stdin", "stdout", "stderr"];
|
|
187740
187148
|
var getStreamName = (fdNumber) => STANDARD_STREAMS_ALIASES[fdNumber] ?? `stdio[${fdNumber}]`;
|
|
187741
187149
|
|
|
@@ -187825,7 +187233,7 @@ var VERBOSE_VALUES = ["none", "short", "full"];
|
|
|
187825
187233
|
import { inspect } from "node:util";
|
|
187826
187234
|
|
|
187827
187235
|
// node_modules/execa/lib/arguments/escape.js
|
|
187828
|
-
import { platform as
|
|
187236
|
+
import { platform as platform5 } from "node:process";
|
|
187829
187237
|
import { stripVTControlCharacters } from "node:util";
|
|
187830
187238
|
var joinCommand = (filePath, rawArguments) => {
|
|
187831
187239
|
const fileAndArguments = [filePath, ...rawArguments];
|
|
@@ -187867,16 +187275,16 @@ var quoteString = (escapedArgument) => {
|
|
|
187867
187275
|
if (NO_ESCAPE_REGEXP.test(escapedArgument)) {
|
|
187868
187276
|
return escapedArgument;
|
|
187869
187277
|
}
|
|
187870
|
-
return
|
|
187278
|
+
return platform5 === "win32" ? `"${escapedArgument.replaceAll('"', '""')}"` : `'${escapedArgument.replaceAll("'", "'\\''")}'`;
|
|
187871
187279
|
};
|
|
187872
187280
|
var NO_ESCAPE_REGEXP = /^[\w./-]+$/;
|
|
187873
187281
|
|
|
187874
187282
|
// node_modules/is-unicode-supported/index.js
|
|
187875
|
-
import
|
|
187283
|
+
import process7 from "node:process";
|
|
187876
187284
|
function isUnicodeSupported() {
|
|
187877
|
-
const { env: env2 } =
|
|
187285
|
+
const { env: env2 } = process7;
|
|
187878
187286
|
const { TERM, TERM_PROGRAM } = env2;
|
|
187879
|
-
if (
|
|
187287
|
+
if (process7.platform !== "win32") {
|
|
187880
187288
|
return TERM !== "linux";
|
|
187881
187289
|
}
|
|
187882
187290
|
return Boolean(env2.WT_SESSION) || Boolean(env2.TERMINUS_SUBLIME) || env2.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env2.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
@@ -188161,11 +187569,11 @@ var replacements = Object.entries(specialMainSymbols);
|
|
|
188161
187569
|
// node_modules/yoctocolors/base.js
|
|
188162
187570
|
import tty2 from "node:tty";
|
|
188163
187571
|
var hasColors = tty2?.WriteStream?.prototype?.hasColors?.() ?? false;
|
|
188164
|
-
var format = (
|
|
187572
|
+
var format = (open, close) => {
|
|
188165
187573
|
if (!hasColors) {
|
|
188166
187574
|
return (input) => input;
|
|
188167
187575
|
}
|
|
188168
|
-
const openCode = `\x1B[${
|
|
187576
|
+
const openCode = `\x1B[${open}m`;
|
|
188169
187577
|
const closeCode = `\x1B[${close}m`;
|
|
188170
187578
|
return (input) => {
|
|
188171
187579
|
const string4 = input + "";
|
|
@@ -188382,43 +187790,43 @@ var handleCommand = (filePath, rawArguments, rawOptions) => {
|
|
|
188382
187790
|
|
|
188383
187791
|
// node_modules/execa/lib/arguments/options.js
|
|
188384
187792
|
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
188385
|
-
import
|
|
188386
|
-
import
|
|
187793
|
+
import path15 from "node:path";
|
|
187794
|
+
import process10 from "node:process";
|
|
188387
187795
|
|
|
188388
187796
|
// node_modules/npm-run-path/index.js
|
|
188389
|
-
import
|
|
188390
|
-
import
|
|
187797
|
+
import process8 from "node:process";
|
|
187798
|
+
import path12 from "node:path";
|
|
188391
187799
|
|
|
188392
187800
|
// node_modules/npm-run-path/node_modules/path-key/index.js
|
|
188393
187801
|
function pathKey(options = {}) {
|
|
188394
187802
|
const {
|
|
188395
187803
|
env: env2 = process.env,
|
|
188396
|
-
platform:
|
|
187804
|
+
platform: platform6 = process.platform
|
|
188397
187805
|
} = options;
|
|
188398
|
-
if (
|
|
187806
|
+
if (platform6 !== "win32") {
|
|
188399
187807
|
return "PATH";
|
|
188400
187808
|
}
|
|
188401
187809
|
return Object.keys(env2).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
|
|
188402
187810
|
}
|
|
188403
187811
|
|
|
188404
187812
|
// node_modules/npm-run-path/node_modules/unicorn-magic/node.js
|
|
188405
|
-
import { promisify as
|
|
187813
|
+
import { promisify as promisify3 } from "node:util";
|
|
188406
187814
|
import { execFile as execFileCallback2, execFileSync as execFileSyncOriginal2 } from "node:child_process";
|
|
188407
|
-
import
|
|
188408
|
-
import { fileURLToPath as
|
|
188409
|
-
var execFileOriginal2 =
|
|
187815
|
+
import path11 from "node:path";
|
|
187816
|
+
import { fileURLToPath as fileURLToPath4 } from "node:url";
|
|
187817
|
+
var execFileOriginal2 = promisify3(execFileCallback2);
|
|
188410
187818
|
function toPath2(urlOrPath) {
|
|
188411
|
-
return urlOrPath instanceof URL ?
|
|
187819
|
+
return urlOrPath instanceof URL ? fileURLToPath4(urlOrPath) : urlOrPath;
|
|
188412
187820
|
}
|
|
188413
187821
|
function traversePathUp(startPath) {
|
|
188414
187822
|
return {
|
|
188415
187823
|
*[Symbol.iterator]() {
|
|
188416
|
-
let currentPath =
|
|
187824
|
+
let currentPath = path11.resolve(toPath2(startPath));
|
|
188417
187825
|
let previousPath;
|
|
188418
187826
|
while (previousPath !== currentPath) {
|
|
188419
187827
|
yield currentPath;
|
|
188420
187828
|
previousPath = currentPath;
|
|
188421
|
-
currentPath =
|
|
187829
|
+
currentPath = path11.resolve(currentPath, "..");
|
|
188422
187830
|
}
|
|
188423
187831
|
}
|
|
188424
187832
|
};
|
|
@@ -188427,38 +187835,38 @@ var TEN_MEGABYTES_IN_BYTES2 = 10 * 1024 * 1024;
|
|
|
188427
187835
|
|
|
188428
187836
|
// node_modules/npm-run-path/index.js
|
|
188429
187837
|
var npmRunPath = ({
|
|
188430
|
-
cwd =
|
|
188431
|
-
path: pathOption =
|
|
187838
|
+
cwd = process8.cwd(),
|
|
187839
|
+
path: pathOption = process8.env[pathKey()],
|
|
188432
187840
|
preferLocal = true,
|
|
188433
|
-
execPath =
|
|
187841
|
+
execPath = process8.execPath,
|
|
188434
187842
|
addExecPath = true
|
|
188435
187843
|
} = {}) => {
|
|
188436
|
-
const cwdPath =
|
|
187844
|
+
const cwdPath = path12.resolve(toPath2(cwd));
|
|
188437
187845
|
const result = [];
|
|
188438
|
-
const pathParts = pathOption.split(
|
|
187846
|
+
const pathParts = pathOption.split(path12.delimiter);
|
|
188439
187847
|
if (preferLocal) {
|
|
188440
187848
|
applyPreferLocal(result, pathParts, cwdPath);
|
|
188441
187849
|
}
|
|
188442
187850
|
if (addExecPath) {
|
|
188443
187851
|
applyExecPath(result, pathParts, execPath, cwdPath);
|
|
188444
187852
|
}
|
|
188445
|
-
return pathOption === "" || pathOption ===
|
|
187853
|
+
return pathOption === "" || pathOption === path12.delimiter ? `${result.join(path12.delimiter)}${pathOption}` : [...result, pathOption].join(path12.delimiter);
|
|
188446
187854
|
};
|
|
188447
187855
|
var applyPreferLocal = (result, pathParts, cwdPath) => {
|
|
188448
187856
|
for (const directory of traversePathUp(cwdPath)) {
|
|
188449
|
-
const pathPart =
|
|
187857
|
+
const pathPart = path12.join(directory, "node_modules/.bin");
|
|
188450
187858
|
if (!pathParts.includes(pathPart)) {
|
|
188451
187859
|
result.push(pathPart);
|
|
188452
187860
|
}
|
|
188453
187861
|
}
|
|
188454
187862
|
};
|
|
188455
187863
|
var applyExecPath = (result, pathParts, execPath, cwdPath) => {
|
|
188456
|
-
const pathPart =
|
|
187864
|
+
const pathPart = path12.resolve(cwdPath, toPath2(execPath), "..");
|
|
188457
187865
|
if (!pathParts.includes(pathPart)) {
|
|
188458
187866
|
result.push(pathPart);
|
|
188459
187867
|
}
|
|
188460
187868
|
};
|
|
188461
|
-
var npmRunPathEnv = ({ env: env2 =
|
|
187869
|
+
var npmRunPathEnv = ({ env: env2 = process8.env, ...options } = {}) => {
|
|
188462
187870
|
env2 = { ...env2 };
|
|
188463
187871
|
const pathName = pathKey({ env: env2 });
|
|
188464
187872
|
options.path = env2[pathName];
|
|
@@ -189007,7 +188415,7 @@ var terminateOnCancel = async (subprocess, cancelSignal, context, { signal }) =>
|
|
|
189007
188415
|
import { scheduler as scheduler2 } from "node:timers/promises";
|
|
189008
188416
|
|
|
189009
188417
|
// node_modules/execa/lib/ipc/send.js
|
|
189010
|
-
import { promisify as
|
|
188418
|
+
import { promisify as promisify4 } from "node:util";
|
|
189011
188419
|
|
|
189012
188420
|
// node_modules/execa/lib/ipc/validation.js
|
|
189013
188421
|
var validateIpcMethod = ({ methodName, isSubprocess, ipc, isConnected }) => {
|
|
@@ -189472,7 +188880,7 @@ var getSendMethod = (anyProcess) => {
|
|
|
189472
188880
|
if (PROCESS_SEND_METHODS.has(anyProcess)) {
|
|
189473
188881
|
return PROCESS_SEND_METHODS.get(anyProcess);
|
|
189474
188882
|
}
|
|
189475
|
-
const sendMethod =
|
|
188883
|
+
const sendMethod = promisify4(anyProcess.send.bind(anyProcess));
|
|
189476
188884
|
PROCESS_SEND_METHODS.set(anyProcess, sendMethod);
|
|
189477
188885
|
return sendMethod;
|
|
189478
188886
|
};
|
|
@@ -189602,7 +189010,7 @@ var killAfterTimeout = async (subprocess, timeout2, context, { signal }) => {
|
|
|
189602
189010
|
|
|
189603
189011
|
// node_modules/execa/lib/methods/node.js
|
|
189604
189012
|
import { execPath, execArgv } from "node:process";
|
|
189605
|
-
import
|
|
189013
|
+
import path13 from "node:path";
|
|
189606
189014
|
var mapNode = ({ options }) => {
|
|
189607
189015
|
if (options.node === false) {
|
|
189608
189016
|
throw new TypeError('The "node" option cannot be false with `execaNode()`.');
|
|
@@ -189621,7 +189029,7 @@ var handleNodeOption = (file2, commandArguments, {
|
|
|
189621
189029
|
throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');
|
|
189622
189030
|
}
|
|
189623
189031
|
const normalizedNodePath = safeNormalizeFileUrl(nodePath2, 'The "nodePath" option');
|
|
189624
|
-
const resolvedNodePath =
|
|
189032
|
+
const resolvedNodePath = path13.resolve(cwd, normalizedNodePath);
|
|
189625
189033
|
const newOptions = {
|
|
189626
189034
|
...options,
|
|
189627
189035
|
nodePath: resolvedNodePath,
|
|
@@ -189631,7 +189039,7 @@ var handleNodeOption = (file2, commandArguments, {
|
|
|
189631
189039
|
if (!shouldHandleNode) {
|
|
189632
189040
|
return [file2, commandArguments, newOptions];
|
|
189633
189041
|
}
|
|
189634
|
-
if (
|
|
189042
|
+
if (path13.basename(file2, ".exe") === "node") {
|
|
189635
189043
|
throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');
|
|
189636
189044
|
}
|
|
189637
189045
|
return [
|
|
@@ -189720,15 +189128,15 @@ var serializeEncoding = (encoding) => typeof encoding === "string" ? `"${encodin
|
|
|
189720
189128
|
|
|
189721
189129
|
// node_modules/execa/lib/arguments/cwd.js
|
|
189722
189130
|
import { statSync } from "node:fs";
|
|
189723
|
-
import
|
|
189724
|
-
import
|
|
189131
|
+
import path14 from "node:path";
|
|
189132
|
+
import process9 from "node:process";
|
|
189725
189133
|
var normalizeCwd = (cwd = getDefaultCwd()) => {
|
|
189726
189134
|
const cwdString = safeNormalizeFileUrl(cwd, 'The "cwd" option');
|
|
189727
|
-
return
|
|
189135
|
+
return path14.resolve(cwdString);
|
|
189728
189136
|
};
|
|
189729
189137
|
var getDefaultCwd = () => {
|
|
189730
189138
|
try {
|
|
189731
|
-
return
|
|
189139
|
+
return process9.cwd();
|
|
189732
189140
|
} catch (error48) {
|
|
189733
189141
|
error48.message = `The current directory does not exist.
|
|
189734
189142
|
${error48.message}`;
|
|
@@ -189771,7 +189179,7 @@ var normalizeOptions3 = (filePath, rawArguments, rawOptions) => {
|
|
|
189771
189179
|
options.killSignal = normalizeKillSignal(options.killSignal);
|
|
189772
189180
|
options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
|
|
189773
189181
|
options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
|
|
189774
|
-
if (
|
|
189182
|
+
if (process10.platform === "win32" && path15.basename(file2, ".exe") === "cmd") {
|
|
189775
189183
|
commandArguments.unshift("/q");
|
|
189776
189184
|
}
|
|
189777
189185
|
return { file: file2, commandArguments, options };
|
|
@@ -189812,7 +189220,7 @@ var addDefaultOptions = ({
|
|
|
189812
189220
|
serialization
|
|
189813
189221
|
});
|
|
189814
189222
|
var getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath: nodePath2 }) => {
|
|
189815
|
-
const env2 = extendEnv ? { ...
|
|
189223
|
+
const env2 = extendEnv ? { ...process10.env, ...envOption } : envOption;
|
|
189816
189224
|
if (preferLocal || node) {
|
|
189817
189225
|
return npmRunPathEnv({
|
|
189818
189226
|
env: env2,
|
|
@@ -190981,7 +190389,7 @@ var normalizeGenerator = ({ stdioItem, stdioItem: { value }, index, newTransform
|
|
|
190981
190389
|
var sortTransforms = (newTransforms, direction) => direction === "input" ? newTransforms.reverse() : newTransforms;
|
|
190982
190390
|
|
|
190983
190391
|
// node_modules/execa/lib/stdio/direction.js
|
|
190984
|
-
import
|
|
190392
|
+
import process11 from "node:process";
|
|
190985
190393
|
var getStreamDirection = (stdioItems, fdNumber, optionName) => {
|
|
190986
190394
|
const directions = stdioItems.map((stdioItem) => getStdioItemDirection(stdioItem, fdNumber));
|
|
190987
190395
|
if (directions.includes("input") && directions.includes("output")) {
|
|
@@ -191023,10 +190431,10 @@ var guessStreamDirection = {
|
|
|
191023
190431
|
}
|
|
191024
190432
|
};
|
|
191025
190433
|
var getStandardStreamDirection = (value) => {
|
|
191026
|
-
if ([0,
|
|
190434
|
+
if ([0, process11.stdin].includes(value)) {
|
|
191027
190435
|
return "input";
|
|
191028
190436
|
}
|
|
191029
|
-
if ([1, 2,
|
|
190437
|
+
if ([1, 2, process11.stdout, process11.stderr].includes(value)) {
|
|
191030
190438
|
return "output";
|
|
191031
190439
|
}
|
|
191032
190440
|
};
|
|
@@ -191546,10 +190954,10 @@ var linesUint8ArrayInfo = {
|
|
|
191546
190954
|
};
|
|
191547
190955
|
|
|
191548
190956
|
// node_modules/execa/lib/transform/validate.js
|
|
191549
|
-
import { Buffer as
|
|
190957
|
+
import { Buffer as Buffer3 } from "node:buffer";
|
|
191550
190958
|
var getValidateTransformInput = (writableObjectMode, optionName) => writableObjectMode ? undefined : validateStringTransformInput.bind(undefined, optionName);
|
|
191551
190959
|
var validateStringTransformInput = function* (optionName, chunk) {
|
|
191552
|
-
if (typeof chunk !== "string" && !isUint8Array(chunk) && !
|
|
190960
|
+
if (typeof chunk !== "string" && !isUint8Array(chunk) && !Buffer3.isBuffer(chunk)) {
|
|
191553
190961
|
throw new TypeError(`The \`${optionName}\` option's transform must use "objectMode: true" to receive as input: ${typeof chunk}.`);
|
|
191554
190962
|
}
|
|
191555
190963
|
yield chunk;
|
|
@@ -191575,7 +190983,7 @@ Instead, \`yield\` should either be called with a value, or not be called at all
|
|
|
191575
190983
|
};
|
|
191576
190984
|
|
|
191577
190985
|
// node_modules/execa/lib/transform/encoding-transform.js
|
|
191578
|
-
import { Buffer as
|
|
190986
|
+
import { Buffer as Buffer4 } from "node:buffer";
|
|
191579
190987
|
import { StringDecoder as StringDecoder3 } from "node:string_decoder";
|
|
191580
190988
|
var getEncodingTransformGenerator = (binary, encoding, skipped) => {
|
|
191581
190989
|
if (skipped) {
|
|
@@ -191591,7 +190999,7 @@ var getEncodingTransformGenerator = (binary, encoding, skipped) => {
|
|
|
191591
190999
|
};
|
|
191592
191000
|
};
|
|
191593
191001
|
var encodingUint8ArrayGenerator = function* (textEncoder3, chunk) {
|
|
191594
|
-
if (
|
|
191002
|
+
if (Buffer4.isBuffer(chunk)) {
|
|
191595
191003
|
yield bufferToUint8Array(chunk);
|
|
191596
191004
|
} else if (typeof chunk === "string") {
|
|
191597
191005
|
yield textEncoder3.encode(chunk);
|
|
@@ -191908,13 +191316,13 @@ var logOutputSync = ({ serializedResult, fdNumber, state, verboseInfo, encoding,
|
|
|
191908
191316
|
}
|
|
191909
191317
|
};
|
|
191910
191318
|
var writeToFiles = (serializedResult, stdioItems, outputFiles) => {
|
|
191911
|
-
for (const { path:
|
|
191912
|
-
const pathString = typeof
|
|
191319
|
+
for (const { path: path16, append } of stdioItems.filter(({ type }) => FILE_TYPES.has(type))) {
|
|
191320
|
+
const pathString = typeof path16 === "string" ? path16 : path16.toString();
|
|
191913
191321
|
if (append || outputFiles.has(pathString)) {
|
|
191914
|
-
appendFileSync(
|
|
191322
|
+
appendFileSync(path16, serializedResult);
|
|
191915
191323
|
} else {
|
|
191916
191324
|
outputFiles.add(pathString);
|
|
191917
|
-
writeFileSync(
|
|
191325
|
+
writeFileSync(path16, serializedResult);
|
|
191918
191326
|
}
|
|
191919
191327
|
}
|
|
191920
191328
|
};
|
|
@@ -192133,7 +191541,7 @@ import { setMaxListeners } from "node:events";
|
|
|
192133
191541
|
import { spawn } from "node:child_process";
|
|
192134
191542
|
|
|
192135
191543
|
// node_modules/execa/lib/ipc/methods.js
|
|
192136
|
-
import
|
|
191544
|
+
import process12 from "node:process";
|
|
192137
191545
|
|
|
192138
191546
|
// node_modules/execa/lib/ipc/get-one.js
|
|
192139
191547
|
import { once as once6, on as on3 } from "node:events";
|
|
@@ -192272,9 +191680,9 @@ var addIpcMethods = (subprocess, { ipc }) => {
|
|
|
192272
191680
|
Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
|
|
192273
191681
|
};
|
|
192274
191682
|
var getIpcExport = () => {
|
|
192275
|
-
const anyProcess =
|
|
191683
|
+
const anyProcess = process12;
|
|
192276
191684
|
const isSubprocess = true;
|
|
192277
|
-
const ipc =
|
|
191685
|
+
const ipc = process12.channel !== undefined;
|
|
192278
191686
|
return {
|
|
192279
191687
|
...getIpcMethods(anyProcess, isSubprocess, ipc),
|
|
192280
191688
|
getCancelSignal: getCancelSignal.bind(undefined, {
|
|
@@ -192358,7 +191766,7 @@ var handleDummyPromise = async (error48, verboseInfo, options) => handleResult(e
|
|
|
192358
191766
|
|
|
192359
191767
|
// node_modules/execa/lib/stdio/handle-async.js
|
|
192360
191768
|
import { createReadStream, createWriteStream } from "node:fs";
|
|
192361
|
-
import { Buffer as
|
|
191769
|
+
import { Buffer as Buffer5 } from "node:buffer";
|
|
192362
191770
|
import { Readable as Readable4, Writable as Writable2, Duplex as Duplex2 } from "node:stream";
|
|
192363
191771
|
var handleStdioAsync = (options, verboseInfo) => handleStdio(addPropertiesAsync, options, verboseInfo, false);
|
|
192364
191772
|
var forbiddenIfAsync = ({ type, optionName }) => {
|
|
@@ -192386,7 +191794,7 @@ var addPropertiesAsync = {
|
|
|
192386
191794
|
iterable: ({ value }) => ({ stream: Readable4.from(value) }),
|
|
192387
191795
|
asyncIterable: ({ value }) => ({ stream: Readable4.from(value) }),
|
|
192388
191796
|
string: ({ value }) => ({ stream: Readable4.from(value) }),
|
|
192389
|
-
uint8Array: ({ value }) => ({ stream: Readable4.from(
|
|
191797
|
+
uint8Array: ({ value }) => ({ stream: Readable4.from(Buffer5.from(value)) })
|
|
192390
191798
|
},
|
|
192391
191799
|
output: {
|
|
192392
191800
|
...addProperties2,
|
|
@@ -192502,7 +191910,7 @@ if (process.platform === "linux") {
|
|
|
192502
191910
|
}
|
|
192503
191911
|
|
|
192504
191912
|
// node_modules/signal-exit/dist/mjs/index.js
|
|
192505
|
-
var processOk = (
|
|
191913
|
+
var processOk = (process13) => !!process13 && typeof process13 === "object" && typeof process13.removeListener === "function" && typeof process13.emit === "function" && typeof process13.reallyExit === "function" && typeof process13.listeners === "function" && typeof process13.kill === "function" && typeof process13.pid === "number" && typeof process13.on === "function";
|
|
192506
191914
|
var kExitEmitter = Symbol.for("signal-exit emitter");
|
|
192507
191915
|
var global2 = globalThis;
|
|
192508
191916
|
var ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
@@ -192585,22 +191993,22 @@ class SignalExitFallback extends SignalExitBase {
|
|
|
192585
191993
|
}
|
|
192586
191994
|
|
|
192587
191995
|
class SignalExit extends SignalExitBase {
|
|
192588
|
-
#hupSig =
|
|
191996
|
+
#hupSig = process13.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
192589
191997
|
#emitter = new Emitter;
|
|
192590
191998
|
#process;
|
|
192591
191999
|
#originalProcessEmit;
|
|
192592
192000
|
#originalProcessReallyExit;
|
|
192593
192001
|
#sigListeners = {};
|
|
192594
192002
|
#loaded = false;
|
|
192595
|
-
constructor(
|
|
192003
|
+
constructor(process13) {
|
|
192596
192004
|
super();
|
|
192597
|
-
this.#process =
|
|
192005
|
+
this.#process = process13;
|
|
192598
192006
|
this.#sigListeners = {};
|
|
192599
192007
|
for (const sig of signals) {
|
|
192600
192008
|
this.#sigListeners[sig] = () => {
|
|
192601
192009
|
const listeners = this.#process.listeners(sig);
|
|
192602
192010
|
let { count: count2 } = this.#emitter;
|
|
192603
|
-
const p2 =
|
|
192011
|
+
const p2 = process13;
|
|
192604
192012
|
if (typeof p2.__signal_exit_emitter__ === "object" && typeof p2.__signal_exit_emitter__.count === "number") {
|
|
192605
192013
|
count2 += p2.__signal_exit_emitter__.count;
|
|
192606
192014
|
}
|
|
@@ -192609,12 +192017,12 @@ class SignalExit extends SignalExitBase {
|
|
|
192609
192017
|
const ret = this.#emitter.emit("exit", null, sig);
|
|
192610
192018
|
const s = sig === "SIGHUP" ? this.#hupSig : sig;
|
|
192611
192019
|
if (!ret)
|
|
192612
|
-
|
|
192020
|
+
process13.kill(process13.pid, s);
|
|
192613
192021
|
}
|
|
192614
192022
|
};
|
|
192615
192023
|
}
|
|
192616
|
-
this.#originalProcessReallyExit =
|
|
192617
|
-
this.#originalProcessEmit =
|
|
192024
|
+
this.#originalProcessReallyExit = process13.reallyExit;
|
|
192025
|
+
this.#originalProcessEmit = process13.emit;
|
|
192618
192026
|
}
|
|
192619
192027
|
onExit(cb, opts) {
|
|
192620
192028
|
if (!processOk(this.#process)) {
|
|
@@ -192692,12 +192100,12 @@ class SignalExit extends SignalExitBase {
|
|
|
192692
192100
|
}
|
|
192693
192101
|
}
|
|
192694
192102
|
}
|
|
192695
|
-
var
|
|
192103
|
+
var process13 = globalThis.process;
|
|
192696
192104
|
var {
|
|
192697
192105
|
onExit,
|
|
192698
192106
|
load,
|
|
192699
192107
|
unload
|
|
192700
|
-
} = signalExitWrap(processOk(
|
|
192108
|
+
} = signalExitWrap(processOk(process13) ? new SignalExit(process13) : new SignalExitFallback);
|
|
192701
192109
|
|
|
192702
192110
|
// node_modules/execa/lib/terminate/cleanup.js
|
|
192703
192111
|
var cleanupOnExit = (subprocess, { cleanup, detached }, { signal }) => {
|
|
@@ -194224,7 +193632,7 @@ function getDashboardUrl(projectId) {
|
|
|
194224
193632
|
async function pullAgentsAction() {
|
|
194225
193633
|
const { project: project2 } = await readProjectConfig();
|
|
194226
193634
|
const configDir = dirname7(project2.configPath);
|
|
194227
|
-
const agentsDir =
|
|
193635
|
+
const agentsDir = join9(configDir, project2.agentsDir);
|
|
194228
193636
|
const remoteAgents = await runTask("Fetching agents from Base44", async () => {
|
|
194229
193637
|
return await fetchAgents();
|
|
194230
193638
|
}, {
|
|
@@ -194317,48 +193725,653 @@ function getWhoamiCommand(context) {
|
|
|
194317
193725
|
});
|
|
194318
193726
|
}
|
|
194319
193727
|
|
|
194320
|
-
// src/cli/commands/connectors/
|
|
194321
|
-
|
|
194322
|
-
|
|
193728
|
+
// src/cli/commands/connectors/pull.ts
|
|
193729
|
+
import { dirname as dirname8, join as join10 } from "node:path";
|
|
193730
|
+
async function pullConnectorsAction() {
|
|
193731
|
+
const { project: project2 } = await readProjectConfig();
|
|
193732
|
+
const configDir = dirname8(project2.configPath);
|
|
193733
|
+
const connectorsDir = join10(configDir, project2.connectorsDir);
|
|
193734
|
+
const remoteConnectors = await runTask("Fetching connectors from Base44", async () => {
|
|
193735
|
+
return await listConnectors();
|
|
193736
|
+
}, {
|
|
193737
|
+
successMessage: "Connectors fetched successfully",
|
|
193738
|
+
errorMessage: "Failed to fetch connectors"
|
|
193739
|
+
});
|
|
193740
|
+
const { written, deleted } = await runTask("Syncing connector files", async () => {
|
|
193741
|
+
return await writeConnectors(connectorsDir, remoteConnectors.integrations);
|
|
193742
|
+
}, {
|
|
193743
|
+
successMessage: "Connector files synced successfully",
|
|
193744
|
+
errorMessage: "Failed to sync connector files"
|
|
193745
|
+
});
|
|
193746
|
+
if (written.length > 0) {
|
|
193747
|
+
M2.success(`Written: ${written.join(", ")}`);
|
|
193748
|
+
}
|
|
193749
|
+
if (deleted.length > 0) {
|
|
193750
|
+
M2.warn(`Deleted: ${deleted.join(", ")}`);
|
|
193751
|
+
}
|
|
193752
|
+
if (written.length === 0 && deleted.length === 0) {
|
|
193753
|
+
M2.info("All connectors are already up to date");
|
|
193754
|
+
}
|
|
193755
|
+
return {
|
|
193756
|
+
outroMessage: `Pulled ${remoteConnectors.integrations.length} connectors to ${connectorsDir}`
|
|
193757
|
+
};
|
|
193758
|
+
}
|
|
193759
|
+
function getConnectorsPullCommand(context) {
|
|
193760
|
+
return new Command("pull").description("Pull connectors from Base44 to local files (replaces all local connector configs)").action(async () => {
|
|
193761
|
+
await runCommand(pullConnectorsAction, { requireAuth: true }, context);
|
|
193762
|
+
});
|
|
193763
|
+
}
|
|
193764
|
+
|
|
193765
|
+
// node_modules/open/index.js
|
|
193766
|
+
import process20 from "node:process";
|
|
193767
|
+
import path16 from "node:path";
|
|
193768
|
+
import { fileURLToPath as fileURLToPath5 } from "node:url";
|
|
193769
|
+
import childProcess3 from "node:child_process";
|
|
193770
|
+
import fs19, { constants as fsConstants2 } from "node:fs/promises";
|
|
193771
|
+
|
|
193772
|
+
// node_modules/wsl-utils/index.js
|
|
193773
|
+
import { promisify as promisify6 } from "node:util";
|
|
193774
|
+
import childProcess2 from "node:child_process";
|
|
193775
|
+
import fs18, { constants as fsConstants } from "node:fs/promises";
|
|
193776
|
+
|
|
193777
|
+
// node_modules/is-wsl/index.js
|
|
193778
|
+
import process14 from "node:process";
|
|
193779
|
+
import os2 from "node:os";
|
|
193780
|
+
import fs17 from "node:fs";
|
|
193781
|
+
|
|
193782
|
+
// node_modules/is-inside-container/index.js
|
|
193783
|
+
import fs16 from "node:fs";
|
|
193784
|
+
|
|
193785
|
+
// node_modules/is-docker/index.js
|
|
193786
|
+
import fs15 from "node:fs";
|
|
193787
|
+
var isDockerCached;
|
|
193788
|
+
function hasDockerEnv() {
|
|
193789
|
+
try {
|
|
193790
|
+
fs15.statSync("/.dockerenv");
|
|
193791
|
+
return true;
|
|
193792
|
+
} catch {
|
|
193793
|
+
return false;
|
|
193794
|
+
}
|
|
194323
193795
|
}
|
|
194324
|
-
|
|
194325
|
-
|
|
194326
|
-
|
|
194327
|
-
|
|
193796
|
+
function hasDockerCGroup() {
|
|
193797
|
+
try {
|
|
193798
|
+
return fs15.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
|
|
193799
|
+
} catch {
|
|
193800
|
+
return false;
|
|
194328
193801
|
}
|
|
194329
|
-
|
|
194330
|
-
|
|
194331
|
-
|
|
194332
|
-
|
|
194333
|
-
}
|
|
194334
|
-
|
|
194335
|
-
|
|
194336
|
-
|
|
194337
|
-
|
|
194338
|
-
|
|
194339
|
-
|
|
194340
|
-
|
|
194341
|
-
|
|
194342
|
-
|
|
194343
|
-
|
|
194344
|
-
|
|
194345
|
-
|
|
194346
|
-
|
|
194347
|
-
|
|
194348
|
-
|
|
194349
|
-
|
|
194350
|
-
|
|
193802
|
+
}
|
|
193803
|
+
function isDocker() {
|
|
193804
|
+
if (isDockerCached === undefined) {
|
|
193805
|
+
isDockerCached = hasDockerEnv() || hasDockerCGroup();
|
|
193806
|
+
}
|
|
193807
|
+
return isDockerCached;
|
|
193808
|
+
}
|
|
193809
|
+
|
|
193810
|
+
// node_modules/is-inside-container/index.js
|
|
193811
|
+
var cachedResult;
|
|
193812
|
+
var hasContainerEnv = () => {
|
|
193813
|
+
try {
|
|
193814
|
+
fs16.statSync("/run/.containerenv");
|
|
193815
|
+
return true;
|
|
193816
|
+
} catch {
|
|
193817
|
+
return false;
|
|
193818
|
+
}
|
|
193819
|
+
};
|
|
193820
|
+
function isInsideContainer() {
|
|
193821
|
+
if (cachedResult === undefined) {
|
|
193822
|
+
cachedResult = hasContainerEnv() || isDocker();
|
|
193823
|
+
}
|
|
193824
|
+
return cachedResult;
|
|
193825
|
+
}
|
|
193826
|
+
|
|
193827
|
+
// node_modules/is-wsl/index.js
|
|
193828
|
+
var isWsl = () => {
|
|
193829
|
+
if (process14.platform !== "linux") {
|
|
193830
|
+
return false;
|
|
193831
|
+
}
|
|
193832
|
+
if (os2.release().toLowerCase().includes("microsoft")) {
|
|
193833
|
+
if (isInsideContainer()) {
|
|
193834
|
+
return false;
|
|
193835
|
+
}
|
|
193836
|
+
return true;
|
|
193837
|
+
}
|
|
193838
|
+
try {
|
|
193839
|
+
return fs17.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isInsideContainer() : false;
|
|
193840
|
+
} catch {
|
|
193841
|
+
return false;
|
|
193842
|
+
}
|
|
193843
|
+
};
|
|
193844
|
+
var is_wsl_default = process14.env.__IS_WSL_TEST__ ? isWsl : isWsl();
|
|
193845
|
+
|
|
193846
|
+
// node_modules/powershell-utils/index.js
|
|
193847
|
+
import process15 from "node:process";
|
|
193848
|
+
import { Buffer as Buffer6 } from "node:buffer";
|
|
193849
|
+
import { promisify as promisify5 } from "node:util";
|
|
193850
|
+
import childProcess from "node:child_process";
|
|
193851
|
+
var execFile = promisify5(childProcess.execFile);
|
|
193852
|
+
var powerShellPath = () => `${process15.env.SYSTEMROOT || process15.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
|
|
193853
|
+
var executePowerShell = async (command, options = {}) => {
|
|
193854
|
+
const {
|
|
193855
|
+
powerShellPath: psPath,
|
|
193856
|
+
...execFileOptions
|
|
193857
|
+
} = options;
|
|
193858
|
+
const encodedCommand = executePowerShell.encodeCommand(command);
|
|
193859
|
+
return execFile(psPath ?? powerShellPath(), [
|
|
193860
|
+
...executePowerShell.argumentsPrefix,
|
|
193861
|
+
encodedCommand
|
|
193862
|
+
], {
|
|
193863
|
+
encoding: "utf8",
|
|
193864
|
+
...execFileOptions
|
|
193865
|
+
});
|
|
193866
|
+
};
|
|
193867
|
+
executePowerShell.argumentsPrefix = [
|
|
193868
|
+
"-NoProfile",
|
|
193869
|
+
"-NonInteractive",
|
|
193870
|
+
"-ExecutionPolicy",
|
|
193871
|
+
"Bypass",
|
|
193872
|
+
"-EncodedCommand"
|
|
193873
|
+
];
|
|
193874
|
+
executePowerShell.encodeCommand = (command) => Buffer6.from(command, "utf16le").toString("base64");
|
|
193875
|
+
executePowerShell.escapeArgument = (value) => `'${String(value).replaceAll("'", "''")}'`;
|
|
193876
|
+
|
|
193877
|
+
// node_modules/wsl-utils/utilities.js
|
|
193878
|
+
function parseMountPointFromConfig(content) {
|
|
193879
|
+
for (const line of content.split(`
|
|
193880
|
+
`)) {
|
|
193881
|
+
if (/^\s*#/.test(line)) {
|
|
193882
|
+
continue;
|
|
193883
|
+
}
|
|
193884
|
+
const match = /^\s*root\s*=\s*(?<mountPoint>"[^"]*"|'[^']*'|[^#]*)/.exec(line);
|
|
193885
|
+
if (!match) {
|
|
193886
|
+
continue;
|
|
193887
|
+
}
|
|
193888
|
+
return match.groups.mountPoint.trim().replaceAll(/^["']|["']$/g, "");
|
|
193889
|
+
}
|
|
193890
|
+
}
|
|
193891
|
+
|
|
193892
|
+
// node_modules/wsl-utils/index.js
|
|
193893
|
+
var execFile2 = promisify6(childProcess2.execFile);
|
|
193894
|
+
var wslDrivesMountPoint = (() => {
|
|
193895
|
+
const defaultMountPoint = "/mnt/";
|
|
193896
|
+
let mountPoint;
|
|
193897
|
+
return async function() {
|
|
193898
|
+
if (mountPoint) {
|
|
193899
|
+
return mountPoint;
|
|
193900
|
+
}
|
|
193901
|
+
const configFilePath = "/etc/wsl.conf";
|
|
193902
|
+
let isConfigFileExists = false;
|
|
193903
|
+
try {
|
|
193904
|
+
await fs18.access(configFilePath, fsConstants.F_OK);
|
|
193905
|
+
isConfigFileExists = true;
|
|
193906
|
+
} catch {}
|
|
193907
|
+
if (!isConfigFileExists) {
|
|
193908
|
+
return defaultMountPoint;
|
|
193909
|
+
}
|
|
193910
|
+
const configContent = await fs18.readFile(configFilePath, { encoding: "utf8" });
|
|
193911
|
+
const parsedMountPoint = parseMountPointFromConfig(configContent);
|
|
193912
|
+
if (parsedMountPoint === undefined) {
|
|
193913
|
+
return defaultMountPoint;
|
|
193914
|
+
}
|
|
193915
|
+
mountPoint = parsedMountPoint;
|
|
193916
|
+
mountPoint = mountPoint.endsWith("/") ? mountPoint : `${mountPoint}/`;
|
|
193917
|
+
return mountPoint;
|
|
193918
|
+
};
|
|
193919
|
+
})();
|
|
193920
|
+
var powerShellPathFromWsl = async () => {
|
|
193921
|
+
const mountPoint = await wslDrivesMountPoint();
|
|
193922
|
+
return `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`;
|
|
193923
|
+
};
|
|
193924
|
+
var powerShellPath2 = is_wsl_default ? powerShellPathFromWsl : powerShellPath;
|
|
193925
|
+
var canAccessPowerShellPromise;
|
|
193926
|
+
var canAccessPowerShell = async () => {
|
|
193927
|
+
canAccessPowerShellPromise ??= (async () => {
|
|
193928
|
+
try {
|
|
193929
|
+
const psPath = await powerShellPath2();
|
|
193930
|
+
await fs18.access(psPath, fsConstants.X_OK);
|
|
193931
|
+
return true;
|
|
193932
|
+
} catch {
|
|
193933
|
+
return false;
|
|
193934
|
+
}
|
|
193935
|
+
})();
|
|
193936
|
+
return canAccessPowerShellPromise;
|
|
193937
|
+
};
|
|
193938
|
+
var wslDefaultBrowser = async () => {
|
|
193939
|
+
const psPath = await powerShellPath2();
|
|
193940
|
+
const command = String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`;
|
|
193941
|
+
const { stdout } = await executePowerShell(command, { powerShellPath: psPath });
|
|
193942
|
+
return stdout.trim();
|
|
193943
|
+
};
|
|
193944
|
+
var convertWslPathToWindows = async (path16) => {
|
|
193945
|
+
if (/^[a-z]+:\/\//i.test(path16)) {
|
|
193946
|
+
return path16;
|
|
193947
|
+
}
|
|
193948
|
+
try {
|
|
193949
|
+
const { stdout } = await execFile2("wslpath", ["-aw", path16], { encoding: "utf8" });
|
|
193950
|
+
return stdout.trim();
|
|
193951
|
+
} catch {
|
|
193952
|
+
return path16;
|
|
193953
|
+
}
|
|
193954
|
+
};
|
|
193955
|
+
|
|
193956
|
+
// node_modules/define-lazy-prop/index.js
|
|
193957
|
+
function defineLazyProperty(object2, propertyName, valueGetter) {
|
|
193958
|
+
const define2 = (value) => Object.defineProperty(object2, propertyName, { value, enumerable: true, writable: true });
|
|
193959
|
+
Object.defineProperty(object2, propertyName, {
|
|
193960
|
+
configurable: true,
|
|
193961
|
+
enumerable: true,
|
|
193962
|
+
get() {
|
|
193963
|
+
const result = valueGetter();
|
|
193964
|
+
define2(result);
|
|
193965
|
+
return result;
|
|
193966
|
+
},
|
|
193967
|
+
set(value) {
|
|
193968
|
+
define2(value);
|
|
193969
|
+
}
|
|
193970
|
+
});
|
|
193971
|
+
return object2;
|
|
193972
|
+
}
|
|
193973
|
+
|
|
193974
|
+
// node_modules/default-browser/index.js
|
|
193975
|
+
import { promisify as promisify10 } from "node:util";
|
|
193976
|
+
import process18 from "node:process";
|
|
193977
|
+
import { execFile as execFile6 } from "node:child_process";
|
|
193978
|
+
|
|
193979
|
+
// node_modules/default-browser-id/index.js
|
|
193980
|
+
import { promisify as promisify7 } from "node:util";
|
|
193981
|
+
import process16 from "node:process";
|
|
193982
|
+
import { execFile as execFile3 } from "node:child_process";
|
|
193983
|
+
var execFileAsync = promisify7(execFile3);
|
|
193984
|
+
async function defaultBrowserId() {
|
|
193985
|
+
if (process16.platform !== "darwin") {
|
|
193986
|
+
throw new Error("macOS only");
|
|
193987
|
+
}
|
|
193988
|
+
const { stdout } = await execFileAsync("defaults", ["read", "com.apple.LaunchServices/com.apple.launchservices.secure", "LSHandlers"]);
|
|
193989
|
+
const match = /LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout);
|
|
193990
|
+
const browserId = match?.groups.id ?? "com.apple.Safari";
|
|
193991
|
+
if (browserId === "com.apple.safari") {
|
|
193992
|
+
return "com.apple.Safari";
|
|
193993
|
+
}
|
|
193994
|
+
return browserId;
|
|
193995
|
+
}
|
|
193996
|
+
|
|
193997
|
+
// node_modules/run-applescript/index.js
|
|
193998
|
+
import process17 from "node:process";
|
|
193999
|
+
import { promisify as promisify8 } from "node:util";
|
|
194000
|
+
import { execFile as execFile4, execFileSync } from "node:child_process";
|
|
194001
|
+
var execFileAsync2 = promisify8(execFile4);
|
|
194002
|
+
async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {
|
|
194003
|
+
if (process17.platform !== "darwin") {
|
|
194004
|
+
throw new Error("macOS only");
|
|
194005
|
+
}
|
|
194006
|
+
const outputArguments = humanReadableOutput ? [] : ["-ss"];
|
|
194007
|
+
const execOptions = {};
|
|
194008
|
+
if (signal) {
|
|
194009
|
+
execOptions.signal = signal;
|
|
194010
|
+
}
|
|
194011
|
+
const { stdout } = await execFileAsync2("osascript", ["-e", script, outputArguments], execOptions);
|
|
194012
|
+
return stdout.trim();
|
|
194013
|
+
}
|
|
194014
|
+
|
|
194015
|
+
// node_modules/bundle-name/index.js
|
|
194016
|
+
async function bundleName(bundleId) {
|
|
194017
|
+
return runAppleScript(`tell application "Finder" to set app_path to application file id "${bundleId}" as string
|
|
194018
|
+
tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`);
|
|
194019
|
+
}
|
|
194020
|
+
|
|
194021
|
+
// node_modules/default-browser/windows.js
|
|
194022
|
+
import { promisify as promisify9 } from "node:util";
|
|
194023
|
+
import { execFile as execFile5 } from "node:child_process";
|
|
194024
|
+
var execFileAsync3 = promisify9(execFile5);
|
|
194025
|
+
var windowsBrowserProgIds = {
|
|
194026
|
+
MSEdgeHTM: { name: "Edge", id: "com.microsoft.edge" },
|
|
194027
|
+
MSEdgeBHTML: { name: "Edge Beta", id: "com.microsoft.edge.beta" },
|
|
194028
|
+
MSEdgeDHTML: { name: "Edge Dev", id: "com.microsoft.edge.dev" },
|
|
194029
|
+
AppXq0fevzme2pys62n3e0fbqa7peapykr8v: { name: "Edge", id: "com.microsoft.edge.old" },
|
|
194030
|
+
ChromeHTML: { name: "Chrome", id: "com.google.chrome" },
|
|
194031
|
+
ChromeBHTML: { name: "Chrome Beta", id: "com.google.chrome.beta" },
|
|
194032
|
+
ChromeDHTML: { name: "Chrome Dev", id: "com.google.chrome.dev" },
|
|
194033
|
+
ChromiumHTM: { name: "Chromium", id: "org.chromium.Chromium" },
|
|
194034
|
+
BraveHTML: { name: "Brave", id: "com.brave.Browser" },
|
|
194035
|
+
BraveBHTML: { name: "Brave Beta", id: "com.brave.Browser.beta" },
|
|
194036
|
+
BraveDHTML: { name: "Brave Dev", id: "com.brave.Browser.dev" },
|
|
194037
|
+
BraveSSHTM: { name: "Brave Nightly", id: "com.brave.Browser.nightly" },
|
|
194038
|
+
FirefoxURL: { name: "Firefox", id: "org.mozilla.firefox" },
|
|
194039
|
+
OperaStable: { name: "Opera", id: "com.operasoftware.Opera" },
|
|
194040
|
+
VivaldiHTM: { name: "Vivaldi", id: "com.vivaldi.Vivaldi" },
|
|
194041
|
+
"IE.HTTP": { name: "Internet Explorer", id: "com.microsoft.ie" }
|
|
194042
|
+
};
|
|
194043
|
+
var _windowsBrowserProgIdMap = new Map(Object.entries(windowsBrowserProgIds));
|
|
194044
|
+
|
|
194045
|
+
class UnknownBrowserError extends Error {
|
|
194046
|
+
}
|
|
194047
|
+
async function defaultBrowser(_execFileAsync = execFileAsync3) {
|
|
194048
|
+
const { stdout } = await _execFileAsync("reg", [
|
|
194049
|
+
"QUERY",
|
|
194050
|
+
" HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice",
|
|
194051
|
+
"/v",
|
|
194052
|
+
"ProgId"
|
|
194053
|
+
]);
|
|
194054
|
+
const match = /ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(stdout);
|
|
194055
|
+
if (!match) {
|
|
194056
|
+
throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);
|
|
194057
|
+
}
|
|
194058
|
+
const { id } = match.groups;
|
|
194059
|
+
const dotIndex = id.lastIndexOf(".");
|
|
194060
|
+
const hyphenIndex = id.lastIndexOf("-");
|
|
194061
|
+
const baseIdByDot = dotIndex === -1 ? undefined : id.slice(0, dotIndex);
|
|
194062
|
+
const baseIdByHyphen = hyphenIndex === -1 ? undefined : id.slice(0, hyphenIndex);
|
|
194063
|
+
return windowsBrowserProgIds[id] ?? windowsBrowserProgIds[baseIdByDot] ?? windowsBrowserProgIds[baseIdByHyphen] ?? { name: id, id };
|
|
194064
|
+
}
|
|
194065
|
+
|
|
194066
|
+
// node_modules/default-browser/index.js
|
|
194067
|
+
var execFileAsync4 = promisify10(execFile6);
|
|
194068
|
+
var titleize = (string4) => string4.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x2) => x2.toUpperCase());
|
|
194069
|
+
async function defaultBrowser2() {
|
|
194070
|
+
if (process18.platform === "darwin") {
|
|
194071
|
+
const id = await defaultBrowserId();
|
|
194072
|
+
const name2 = await bundleName(id);
|
|
194073
|
+
return { name: name2, id };
|
|
194074
|
+
}
|
|
194075
|
+
if (process18.platform === "linux") {
|
|
194076
|
+
const { stdout } = await execFileAsync4("xdg-mime", ["query", "default", "x-scheme-handler/http"]);
|
|
194077
|
+
const id = stdout.trim();
|
|
194078
|
+
const name2 = titleize(id.replace(/.desktop$/, "").replace("-", " "));
|
|
194079
|
+
return { name: name2, id };
|
|
194080
|
+
}
|
|
194081
|
+
if (process18.platform === "win32") {
|
|
194082
|
+
return defaultBrowser();
|
|
194083
|
+
}
|
|
194084
|
+
throw new Error("Only macOS, Linux, and Windows are supported");
|
|
194085
|
+
}
|
|
194086
|
+
|
|
194087
|
+
// node_modules/is-in-ssh/index.js
|
|
194088
|
+
import process19 from "node:process";
|
|
194089
|
+
var isInSsh = Boolean(process19.env.SSH_CONNECTION || process19.env.SSH_CLIENT || process19.env.SSH_TTY);
|
|
194090
|
+
var is_in_ssh_default = isInSsh;
|
|
194091
|
+
|
|
194092
|
+
// node_modules/open/index.js
|
|
194093
|
+
var fallbackAttemptSymbol = Symbol("fallbackAttempt");
|
|
194094
|
+
var __dirname3 = import.meta.url ? path16.dirname(fileURLToPath5(import.meta.url)) : "";
|
|
194095
|
+
var localXdgOpenPath = path16.join(__dirname3, "xdg-open");
|
|
194096
|
+
var { platform: platform6, arch } = process20;
|
|
194097
|
+
var tryEachApp = async (apps, opener) => {
|
|
194098
|
+
if (apps.length === 0) {
|
|
194099
|
+
return;
|
|
194100
|
+
}
|
|
194101
|
+
const errors4 = [];
|
|
194102
|
+
for (const app of apps) {
|
|
194103
|
+
try {
|
|
194104
|
+
return await opener(app);
|
|
194105
|
+
} catch (error48) {
|
|
194106
|
+
errors4.push(error48);
|
|
194107
|
+
}
|
|
194108
|
+
}
|
|
194109
|
+
throw new AggregateError(errors4, "Failed to open in all supported apps");
|
|
194110
|
+
};
|
|
194111
|
+
var baseOpen = async (options) => {
|
|
194112
|
+
options = {
|
|
194113
|
+
wait: false,
|
|
194114
|
+
background: false,
|
|
194115
|
+
newInstance: false,
|
|
194116
|
+
allowNonzeroExitCode: false,
|
|
194117
|
+
...options
|
|
194118
|
+
};
|
|
194119
|
+
const isFallbackAttempt = options[fallbackAttemptSymbol] === true;
|
|
194120
|
+
delete options[fallbackAttemptSymbol];
|
|
194121
|
+
if (Array.isArray(options.app)) {
|
|
194122
|
+
return tryEachApp(options.app, (singleApp) => baseOpen({
|
|
194123
|
+
...options,
|
|
194124
|
+
app: singleApp,
|
|
194125
|
+
[fallbackAttemptSymbol]: true
|
|
194126
|
+
}));
|
|
194127
|
+
}
|
|
194128
|
+
let { name: app, arguments: appArguments = [] } = options.app ?? {};
|
|
194129
|
+
appArguments = [...appArguments];
|
|
194130
|
+
if (Array.isArray(app)) {
|
|
194131
|
+
return tryEachApp(app, (appName) => baseOpen({
|
|
194132
|
+
...options,
|
|
194133
|
+
app: {
|
|
194134
|
+
name: appName,
|
|
194135
|
+
arguments: appArguments
|
|
194136
|
+
},
|
|
194137
|
+
[fallbackAttemptSymbol]: true
|
|
194138
|
+
}));
|
|
194139
|
+
}
|
|
194140
|
+
if (app === "browser" || app === "browserPrivate") {
|
|
194141
|
+
const ids = {
|
|
194142
|
+
"com.google.chrome": "chrome",
|
|
194143
|
+
"google-chrome.desktop": "chrome",
|
|
194144
|
+
"com.brave.browser": "brave",
|
|
194145
|
+
"org.mozilla.firefox": "firefox",
|
|
194146
|
+
"firefox.desktop": "firefox",
|
|
194147
|
+
"com.microsoft.msedge": "edge",
|
|
194148
|
+
"com.microsoft.edge": "edge",
|
|
194149
|
+
"com.microsoft.edgemac": "edge",
|
|
194150
|
+
"microsoft-edge.desktop": "edge",
|
|
194151
|
+
"com.apple.safari": "safari"
|
|
194152
|
+
};
|
|
194153
|
+
const flags = {
|
|
194154
|
+
chrome: "--incognito",
|
|
194155
|
+
brave: "--incognito",
|
|
194156
|
+
firefox: "--private-window",
|
|
194157
|
+
edge: "--inPrivate"
|
|
194158
|
+
};
|
|
194159
|
+
let browser;
|
|
194160
|
+
if (is_wsl_default) {
|
|
194161
|
+
const progId = await wslDefaultBrowser();
|
|
194162
|
+
const browserInfo = _windowsBrowserProgIdMap.get(progId);
|
|
194163
|
+
browser = browserInfo ?? {};
|
|
194164
|
+
} else {
|
|
194165
|
+
browser = await defaultBrowser2();
|
|
194166
|
+
}
|
|
194167
|
+
if (browser.id in ids) {
|
|
194168
|
+
const browserName = ids[browser.id.toLowerCase()];
|
|
194169
|
+
if (app === "browserPrivate") {
|
|
194170
|
+
if (browserName === "safari") {
|
|
194171
|
+
throw new Error("Safari doesn't support opening in private mode via command line");
|
|
194172
|
+
}
|
|
194173
|
+
appArguments.push(flags[browserName]);
|
|
194174
|
+
}
|
|
194175
|
+
return baseOpen({
|
|
194176
|
+
...options,
|
|
194177
|
+
app: {
|
|
194178
|
+
name: apps[browserName],
|
|
194179
|
+
arguments: appArguments
|
|
194180
|
+
}
|
|
194351
194181
|
});
|
|
194352
|
-
}
|
|
194353
|
-
|
|
194354
|
-
|
|
194182
|
+
}
|
|
194183
|
+
throw new Error(`${browser.name} is not supported as a default browser`);
|
|
194184
|
+
}
|
|
194185
|
+
let command;
|
|
194186
|
+
const cliArguments = [];
|
|
194187
|
+
const childProcessOptions = {};
|
|
194188
|
+
let shouldUseWindowsInWsl = false;
|
|
194189
|
+
if (is_wsl_default && !isInsideContainer() && !is_in_ssh_default && !app) {
|
|
194190
|
+
shouldUseWindowsInWsl = await canAccessPowerShell();
|
|
194191
|
+
}
|
|
194192
|
+
if (platform6 === "darwin") {
|
|
194193
|
+
command = "open";
|
|
194194
|
+
if (options.wait) {
|
|
194195
|
+
cliArguments.push("--wait-apps");
|
|
194196
|
+
}
|
|
194197
|
+
if (options.background) {
|
|
194198
|
+
cliArguments.push("--background");
|
|
194199
|
+
}
|
|
194200
|
+
if (options.newInstance) {
|
|
194201
|
+
cliArguments.push("--new");
|
|
194202
|
+
}
|
|
194203
|
+
if (app) {
|
|
194204
|
+
cliArguments.push("-a", app);
|
|
194205
|
+
}
|
|
194206
|
+
} else if (platform6 === "win32" || shouldUseWindowsInWsl) {
|
|
194207
|
+
command = await powerShellPath2();
|
|
194208
|
+
cliArguments.push(...executePowerShell.argumentsPrefix);
|
|
194209
|
+
if (!is_wsl_default) {
|
|
194210
|
+
childProcessOptions.windowsVerbatimArguments = true;
|
|
194211
|
+
}
|
|
194212
|
+
if (is_wsl_default && options.target) {
|
|
194213
|
+
options.target = await convertWslPathToWindows(options.target);
|
|
194214
|
+
}
|
|
194215
|
+
const encodedArguments = ["$ProgressPreference = 'SilentlyContinue';", "Start"];
|
|
194216
|
+
if (options.wait) {
|
|
194217
|
+
encodedArguments.push("-Wait");
|
|
194218
|
+
}
|
|
194219
|
+
if (app) {
|
|
194220
|
+
encodedArguments.push(executePowerShell.escapeArgument(app));
|
|
194221
|
+
if (options.target) {
|
|
194222
|
+
appArguments.push(options.target);
|
|
194223
|
+
}
|
|
194224
|
+
} else if (options.target) {
|
|
194225
|
+
encodedArguments.push(executePowerShell.escapeArgument(options.target));
|
|
194226
|
+
}
|
|
194227
|
+
if (appArguments.length > 0) {
|
|
194228
|
+
appArguments = appArguments.map((argument) => executePowerShell.escapeArgument(argument));
|
|
194229
|
+
encodedArguments.push("-ArgumentList", appArguments.join(","));
|
|
194230
|
+
}
|
|
194231
|
+
options.target = executePowerShell.encodeCommand(encodedArguments.join(" "));
|
|
194232
|
+
if (!options.wait) {
|
|
194233
|
+
childProcessOptions.stdio = "ignore";
|
|
194234
|
+
}
|
|
194235
|
+
} else {
|
|
194236
|
+
if (app) {
|
|
194237
|
+
command = app;
|
|
194238
|
+
} else {
|
|
194239
|
+
const isBundled = !__dirname3 || __dirname3 === "/";
|
|
194240
|
+
let exeLocalXdgOpen = false;
|
|
194241
|
+
try {
|
|
194242
|
+
await fs19.access(localXdgOpenPath, fsConstants2.X_OK);
|
|
194243
|
+
exeLocalXdgOpen = true;
|
|
194244
|
+
} catch {}
|
|
194245
|
+
const useSystemXdgOpen = process20.versions.electron ?? (platform6 === "android" || isBundled || !exeLocalXdgOpen);
|
|
194246
|
+
command = useSystemXdgOpen ? "xdg-open" : localXdgOpenPath;
|
|
194247
|
+
}
|
|
194248
|
+
if (appArguments.length > 0) {
|
|
194249
|
+
cliArguments.push(...appArguments);
|
|
194250
|
+
}
|
|
194251
|
+
if (!options.wait) {
|
|
194252
|
+
childProcessOptions.stdio = "ignore";
|
|
194253
|
+
childProcessOptions.detached = true;
|
|
194254
|
+
}
|
|
194255
|
+
}
|
|
194256
|
+
if (platform6 === "darwin" && appArguments.length > 0) {
|
|
194257
|
+
cliArguments.push("--args", ...appArguments);
|
|
194258
|
+
}
|
|
194259
|
+
if (options.target) {
|
|
194260
|
+
cliArguments.push(options.target);
|
|
194261
|
+
}
|
|
194262
|
+
const subprocess = childProcess3.spawn(command, cliArguments, childProcessOptions);
|
|
194263
|
+
if (options.wait) {
|
|
194264
|
+
return new Promise((resolve2, reject) => {
|
|
194265
|
+
subprocess.once("error", reject);
|
|
194266
|
+
subprocess.once("close", (exitCode) => {
|
|
194267
|
+
if (!options.allowNonzeroExitCode && exitCode !== 0) {
|
|
194268
|
+
reject(new Error(`Exited with code ${exitCode}`));
|
|
194269
|
+
return;
|
|
194270
|
+
}
|
|
194271
|
+
resolve2(subprocess);
|
|
194272
|
+
});
|
|
194273
|
+
});
|
|
194274
|
+
}
|
|
194275
|
+
if (isFallbackAttempt) {
|
|
194276
|
+
return new Promise((resolve2, reject) => {
|
|
194277
|
+
subprocess.once("error", reject);
|
|
194278
|
+
subprocess.once("spawn", () => {
|
|
194279
|
+
subprocess.once("close", (exitCode) => {
|
|
194280
|
+
subprocess.off("error", reject);
|
|
194281
|
+
if (exitCode !== 0) {
|
|
194282
|
+
reject(new Error(`Exited with code ${exitCode}`));
|
|
194283
|
+
return;
|
|
194284
|
+
}
|
|
194285
|
+
subprocess.unref();
|
|
194286
|
+
resolve2(subprocess);
|
|
194287
|
+
});
|
|
194288
|
+
});
|
|
194289
|
+
});
|
|
194290
|
+
}
|
|
194291
|
+
subprocess.unref();
|
|
194292
|
+
return new Promise((resolve2, reject) => {
|
|
194293
|
+
subprocess.once("error", reject);
|
|
194294
|
+
subprocess.once("spawn", () => {
|
|
194295
|
+
subprocess.off("error", reject);
|
|
194296
|
+
resolve2(subprocess);
|
|
194355
194297
|
});
|
|
194356
|
-
|
|
194298
|
+
});
|
|
194299
|
+
};
|
|
194300
|
+
var open = (target, options) => {
|
|
194301
|
+
if (typeof target !== "string") {
|
|
194302
|
+
throw new TypeError("Expected a `target`");
|
|
194303
|
+
}
|
|
194304
|
+
return baseOpen({
|
|
194305
|
+
...options,
|
|
194306
|
+
target
|
|
194307
|
+
});
|
|
194308
|
+
};
|
|
194309
|
+
function detectArchBinary(binary) {
|
|
194310
|
+
if (typeof binary === "string" || Array.isArray(binary)) {
|
|
194311
|
+
return binary;
|
|
194312
|
+
}
|
|
194313
|
+
const { [arch]: archBinary } = binary;
|
|
194314
|
+
if (!archBinary) {
|
|
194315
|
+
throw new Error(`${arch} is not supported`);
|
|
194357
194316
|
}
|
|
194358
|
-
return
|
|
194317
|
+
return archBinary;
|
|
194359
194318
|
}
|
|
194319
|
+
function detectPlatformBinary({ [platform6]: platformBinary }, { wsl } = {}) {
|
|
194320
|
+
if (wsl && is_wsl_default) {
|
|
194321
|
+
return detectArchBinary(wsl);
|
|
194322
|
+
}
|
|
194323
|
+
if (!platformBinary) {
|
|
194324
|
+
throw new Error(`${platform6} is not supported`);
|
|
194325
|
+
}
|
|
194326
|
+
return detectArchBinary(platformBinary);
|
|
194327
|
+
}
|
|
194328
|
+
var apps = {
|
|
194329
|
+
browser: "browser",
|
|
194330
|
+
browserPrivate: "browserPrivate"
|
|
194331
|
+
};
|
|
194332
|
+
defineLazyProperty(apps, "chrome", () => detectPlatformBinary({
|
|
194333
|
+
darwin: "google chrome",
|
|
194334
|
+
win32: "chrome",
|
|
194335
|
+
linux: ["google-chrome", "google-chrome-stable", "chromium", "chromium-browser"]
|
|
194336
|
+
}, {
|
|
194337
|
+
wsl: {
|
|
194338
|
+
ia32: "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",
|
|
194339
|
+
x64: ["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe", "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]
|
|
194340
|
+
}
|
|
194341
|
+
}));
|
|
194342
|
+
defineLazyProperty(apps, "brave", () => detectPlatformBinary({
|
|
194343
|
+
darwin: "brave browser",
|
|
194344
|
+
win32: "brave",
|
|
194345
|
+
linux: ["brave-browser", "brave"]
|
|
194346
|
+
}, {
|
|
194347
|
+
wsl: {
|
|
194348
|
+
ia32: "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe",
|
|
194349
|
+
x64: ["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe", "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"]
|
|
194350
|
+
}
|
|
194351
|
+
}));
|
|
194352
|
+
defineLazyProperty(apps, "firefox", () => detectPlatformBinary({
|
|
194353
|
+
darwin: "firefox",
|
|
194354
|
+
win32: String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,
|
|
194355
|
+
linux: "firefox"
|
|
194356
|
+
}, {
|
|
194357
|
+
wsl: "/mnt/c/Program Files/Mozilla Firefox/firefox.exe"
|
|
194358
|
+
}));
|
|
194359
|
+
defineLazyProperty(apps, "edge", () => detectPlatformBinary({
|
|
194360
|
+
darwin: "microsoft edge",
|
|
194361
|
+
win32: "msedge",
|
|
194362
|
+
linux: ["microsoft-edge", "microsoft-edge-dev"]
|
|
194363
|
+
}, {
|
|
194364
|
+
wsl: "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
|
|
194365
|
+
}));
|
|
194366
|
+
defineLazyProperty(apps, "safari", () => detectPlatformBinary({
|
|
194367
|
+
darwin: "Safari"
|
|
194368
|
+
}));
|
|
194369
|
+
var open_default = open;
|
|
194360
194370
|
|
|
194361
194371
|
// src/cli/commands/connectors/push.ts
|
|
194372
|
+
function isPendingOAuth(r2) {
|
|
194373
|
+
return r2.action === "needs_oauth" && !!r2.redirectUrl && !!r2.connectionId;
|
|
194374
|
+
}
|
|
194362
194375
|
function printSummary(results, oauthOutcomes) {
|
|
194363
194376
|
const synced = [];
|
|
194364
194377
|
const added = [];
|
|
@@ -194410,13 +194423,59 @@ async function pushConnectorsAction() {
|
|
|
194410
194423
|
const { results } = await runTask("Pushing connectors to Base44", async () => {
|
|
194411
194424
|
return await pushConnectors(connectors);
|
|
194412
194425
|
});
|
|
194413
|
-
const
|
|
194426
|
+
const oauthOutcomes = new Map;
|
|
194427
|
+
const needsOAuth = results.filter(isPendingOAuth);
|
|
194414
194428
|
let outroMessage = "Connectors pushed to Base44";
|
|
194415
|
-
|
|
194416
|
-
|
|
194417
|
-
|
|
194418
|
-
|
|
194419
|
-
|
|
194429
|
+
if (needsOAuth.length === 0) {
|
|
194430
|
+
printSummary(results, oauthOutcomes);
|
|
194431
|
+
return { outroMessage };
|
|
194432
|
+
}
|
|
194433
|
+
M2.warn(`${needsOAuth.length} connector(s) require authorization in your browser:`);
|
|
194434
|
+
for (const connector2 of needsOAuth) {
|
|
194435
|
+
M2.info(` '${connector2.type}': ${theme.styles.dim(connector2.redirectUrl)}`);
|
|
194436
|
+
}
|
|
194437
|
+
const pending = needsOAuth.map((c3) => c3.type).join(", ");
|
|
194438
|
+
if (process.env.CI) {
|
|
194439
|
+
outroMessage = `Skipped OAuth in CI. Pending: ${pending}. Run 'base44 connectors push' locally to authorize.`;
|
|
194440
|
+
} else {
|
|
194441
|
+
const shouldAuth = await ye({
|
|
194442
|
+
message: "Open browser to authorize now?"
|
|
194443
|
+
});
|
|
194444
|
+
if (pD(shouldAuth) || !shouldAuth) {
|
|
194445
|
+
outroMessage = `Authorization skipped. Pending: ${pending}. Run 'base44 connectors push' again to complete.`;
|
|
194446
|
+
} else {
|
|
194447
|
+
for (const connector2 of needsOAuth) {
|
|
194448
|
+
try {
|
|
194449
|
+
M2.info(`
|
|
194450
|
+
Opening browser for '${connector2.type}'...`);
|
|
194451
|
+
await open_default(connector2.redirectUrl);
|
|
194452
|
+
let finalStatus = "PENDING";
|
|
194453
|
+
await runTask(`Waiting for '${connector2.type}' authorization...`, async () => {
|
|
194454
|
+
await pWaitFor(async () => {
|
|
194455
|
+
const response = await getOAuthStatus(connector2.type, connector2.connectionId);
|
|
194456
|
+
finalStatus = response.status;
|
|
194457
|
+
return response.status !== "PENDING";
|
|
194458
|
+
}, {
|
|
194459
|
+
interval: 2000,
|
|
194460
|
+
timeout: 2 * 60 * 1000
|
|
194461
|
+
});
|
|
194462
|
+
}, {
|
|
194463
|
+
successMessage: `'${connector2.type}' authorization complete`,
|
|
194464
|
+
errorMessage: `'${connector2.type}' authorization failed`
|
|
194465
|
+
}).catch((err) => {
|
|
194466
|
+
if (err instanceof TimeoutError2) {
|
|
194467
|
+
finalStatus = "PENDING";
|
|
194468
|
+
} else {
|
|
194469
|
+
throw err;
|
|
194470
|
+
}
|
|
194471
|
+
});
|
|
194472
|
+
oauthOutcomes.set(connector2.type, finalStatus);
|
|
194473
|
+
} catch (err) {
|
|
194474
|
+
M2.error(`Failed to authorize '${connector2.type}': ${err instanceof Error ? err.message : String(err)}`);
|
|
194475
|
+
oauthOutcomes.set(connector2.type, "FAILED");
|
|
194476
|
+
}
|
|
194477
|
+
}
|
|
194478
|
+
}
|
|
194420
194479
|
}
|
|
194421
194480
|
printSummary(results, oauthOutcomes);
|
|
194422
194481
|
return { outroMessage };
|
|
@@ -194429,7 +194488,7 @@ function getConnectorsPushCommand(context) {
|
|
|
194429
194488
|
|
|
194430
194489
|
// src/cli/commands/connectors/index.ts
|
|
194431
194490
|
function getConnectorsCommand(context) {
|
|
194432
|
-
return new Command("connectors").description("Manage project connectors (OAuth integrations)").addCommand(getConnectorsPushCommand(context));
|
|
194491
|
+
return new Command("connectors").description("Manage project connectors (OAuth integrations)").addCommand(getConnectorsPullCommand(context)).addCommand(getConnectorsPushCommand(context));
|
|
194433
194492
|
}
|
|
194434
194493
|
|
|
194435
194494
|
// src/cli/commands/dashboard/open.ts
|
|
@@ -194523,7 +194582,7 @@ function getFunctionsDeployCommand(context) {
|
|
|
194523
194582
|
}
|
|
194524
194583
|
|
|
194525
194584
|
// src/cli/commands/project/create.ts
|
|
194526
|
-
import { basename as basename3, join as
|
|
194585
|
+
import { basename as basename3, join as join11, resolve as resolve2 } from "node:path";
|
|
194527
194586
|
var import_lodash = __toESM(require_lodash(), 1);
|
|
194528
194587
|
var DEFAULT_TEMPLATE_ID = "backend-only";
|
|
194529
194588
|
async function getTemplateById(templateId) {
|
|
@@ -194659,7 +194718,7 @@ async function executeCreate({
|
|
|
194659
194718
|
updateMessage("Building project...");
|
|
194660
194719
|
await execa({ cwd: resolvedPath, shell: true })`${buildCommand}`;
|
|
194661
194720
|
updateMessage("Deploying site...");
|
|
194662
|
-
return await deploySite(
|
|
194721
|
+
return await deploySite(join11(resolvedPath, outputDirectory));
|
|
194663
194722
|
}, {
|
|
194664
194723
|
successMessage: theme.colors.base44Orange("Site deployed successfully"),
|
|
194665
194724
|
errorMessage: "Failed to deploy site"
|
|
@@ -194707,7 +194766,7 @@ async function deployAction(options) {
|
|
|
194707
194766
|
outroMessage: "No resources found to deploy"
|
|
194708
194767
|
};
|
|
194709
194768
|
}
|
|
194710
|
-
const { project: project2, entities, functions, agents
|
|
194769
|
+
const { project: project2, entities, functions, agents } = projectData;
|
|
194711
194770
|
const summaryLines = [];
|
|
194712
194771
|
if (entities.length > 0) {
|
|
194713
194772
|
summaryLines.push(` - ${entities.length} ${entities.length === 1 ? "entity" : "entities"}`);
|
|
@@ -194718,9 +194777,6 @@ async function deployAction(options) {
|
|
|
194718
194777
|
if (agents.length > 0) {
|
|
194719
194778
|
summaryLines.push(` - ${agents.length} ${agents.length === 1 ? "agent" : "agents"}`);
|
|
194720
194779
|
}
|
|
194721
|
-
if (connectors.length > 0) {
|
|
194722
|
-
summaryLines.push(` - ${connectors.length} ${connectors.length === 1 ? "connector" : "connectors"}`);
|
|
194723
|
-
}
|
|
194724
194780
|
if (project2.site?.outputDirectory) {
|
|
194725
194781
|
summaryLines.push(` - Site from ${project2.site.outputDirectory}`);
|
|
194726
194782
|
}
|
|
@@ -194745,15 +194801,6 @@ ${summaryLines.join(`
|
|
|
194745
194801
|
successMessage: theme.colors.base44Orange("Deployment completed"),
|
|
194746
194802
|
errorMessage: "Deployment failed"
|
|
194747
194803
|
});
|
|
194748
|
-
const needsOAuth = filterPendingOAuth(result.connectorResults ?? []);
|
|
194749
|
-
if (needsOAuth.length > 0) {
|
|
194750
|
-
const oauthOutcomes = await promptOAuthFlows(needsOAuth, {
|
|
194751
|
-
skipPrompt: options.yes || !!process.env.CI
|
|
194752
|
-
});
|
|
194753
|
-
if (oauthOutcomes.size === 0) {
|
|
194754
|
-
M2.info("To authorize, run 'base44 connectors push' or open the links above in your browser.");
|
|
194755
|
-
}
|
|
194756
|
-
}
|
|
194757
194804
|
M2.message(`${theme.styles.header("Dashboard")}: ${theme.colors.links(getDashboardUrl())}`);
|
|
194758
194805
|
if (result.appUrl) {
|
|
194759
194806
|
M2.message(`${theme.styles.header("App URL")}: ${theme.colors.links(result.appUrl)}`);
|
|
@@ -194761,7 +194808,7 @@ ${summaryLines.join(`
|
|
|
194761
194808
|
return { outroMessage: "App deployed successfully" };
|
|
194762
194809
|
}
|
|
194763
194810
|
function getDeployCommand(context) {
|
|
194764
|
-
return new Command("deploy").description("Deploy all project resources (entities, functions, agents,
|
|
194811
|
+
return new Command("deploy").description("Deploy all project resources (entities, functions, agents, and site)").option("-y, --yes", "Skip confirmation prompt").action(async (options) => {
|
|
194765
194812
|
await runCommand(() => deployAction(options), { requireAuth: true }, context);
|
|
194766
194813
|
});
|
|
194767
194814
|
}
|
|
@@ -195052,10 +195099,10 @@ function toPascalCase(name2) {
|
|
|
195052
195099
|
return name2.split(/[-_\s]+/).map((w9) => w9.charAt(0).toUpperCase() + w9.slice(1)).join("");
|
|
195053
195100
|
}
|
|
195054
195101
|
// src/core/types/update-project.ts
|
|
195055
|
-
import { join as
|
|
195102
|
+
import { join as join14 } from "node:path";
|
|
195056
195103
|
var TYPES_INCLUDE_PATH = `${PROJECT_SUBDIR}/${TYPES_OUTPUT_SUBDIR}/*.d.ts`;
|
|
195057
195104
|
async function updateProjectConfig(projectRoot) {
|
|
195058
|
-
const tsconfigPath =
|
|
195105
|
+
const tsconfigPath = join14(projectRoot, "tsconfig.json");
|
|
195059
195106
|
if (!await pathExists(tsconfigPath)) {
|
|
195060
195107
|
return false;
|
|
195061
195108
|
}
|
|
@@ -195424,7 +195471,7 @@ function nanoid3(size = 21) {
|
|
|
195424
195471
|
}
|
|
195425
195472
|
|
|
195426
195473
|
// node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
|
|
195427
|
-
import { dirname as
|
|
195474
|
+
import { dirname as dirname11, posix, sep } from "path";
|
|
195428
195475
|
function createModulerModifier() {
|
|
195429
195476
|
const getModuleFromFileName = createGetModuleFromFilename();
|
|
195430
195477
|
return async (frames) => {
|
|
@@ -195433,7 +195480,7 @@ function createModulerModifier() {
|
|
|
195433
195480
|
return frames;
|
|
195434
195481
|
};
|
|
195435
195482
|
}
|
|
195436
|
-
function createGetModuleFromFilename(basePath = process.argv[1] ?
|
|
195483
|
+
function createGetModuleFromFilename(basePath = process.argv[1] ? dirname11(process.argv[1]) : process.cwd(), isWindows4 = sep === "\\") {
|
|
195437
195484
|
const normalizedBase = isWindows4 ? normalizeWindowsPath2(basePath) : basePath;
|
|
195438
195485
|
return (filename) => {
|
|
195439
195486
|
if (!filename)
|
|
@@ -199652,4 +199699,4 @@ export {
|
|
|
199652
199699
|
CLIExitError
|
|
199653
199700
|
};
|
|
199654
199701
|
|
|
199655
|
-
//# debugId=
|
|
199702
|
+
//# debugId=3B15B2EE2CDAA1C064756E2164756E21
|