appwrite-cli 18.0.1 → 18.1.0
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/README.md +2 -2
- package/dist/bundle-win-arm64.mjs +1256 -713
- package/dist/cli.cjs +1256 -713
- package/dist/index.cjs +306 -18
- package/dist/index.js +306 -18
- package/dist/lib/commands/push.d.ts.map +1 -1
- package/dist/lib/commands/update.d.ts.map +1 -1
- package/dist/lib/constants.d.ts +1 -1
- package/dist/lib/sdks.d.ts +1 -1
- package/dist/lib/sdks.d.ts.map +1 -1
- package/dist/lib/utils.d.ts +8 -0
- package/dist/lib/utils.d.ts.map +1 -1
- package/package.json +9 -5
|
@@ -923,8 +923,8 @@ var require_command = __commonJS({
|
|
|
923
923
|
"node_modules/commander/lib/command.js"(exports) {
|
|
924
924
|
var EventEmitter2 = __require("events").EventEmitter;
|
|
925
925
|
var childProcess4 = __require("child_process");
|
|
926
|
-
var
|
|
927
|
-
var
|
|
926
|
+
var path17 = __require("path");
|
|
927
|
+
var fs21 = __require("fs");
|
|
928
928
|
var process4 = __require("process");
|
|
929
929
|
var { Argument: Argument2, humanReadableArgName } = require_argument();
|
|
930
930
|
var { CommanderError: CommanderError2 } = require_error();
|
|
@@ -1751,10 +1751,10 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1751
1751
|
let launchWithNode = false;
|
|
1752
1752
|
const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
|
|
1753
1753
|
function findFile(baseDir, baseName) {
|
|
1754
|
-
const localBin =
|
|
1755
|
-
if (
|
|
1756
|
-
if (sourceExt.includes(
|
|
1757
|
-
const foundExt = sourceExt.find((ext) =>
|
|
1754
|
+
const localBin = path17.resolve(baseDir, baseName);
|
|
1755
|
+
if (fs21.existsSync(localBin)) return localBin;
|
|
1756
|
+
if (sourceExt.includes(path17.extname(baseName))) return void 0;
|
|
1757
|
+
const foundExt = sourceExt.find((ext) => fs21.existsSync(`${localBin}${ext}`));
|
|
1758
1758
|
if (foundExt) return `${localBin}${foundExt}`;
|
|
1759
1759
|
return void 0;
|
|
1760
1760
|
}
|
|
@@ -1765,23 +1765,23 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1765
1765
|
if (this._scriptPath) {
|
|
1766
1766
|
let resolvedScriptPath;
|
|
1767
1767
|
try {
|
|
1768
|
-
resolvedScriptPath =
|
|
1768
|
+
resolvedScriptPath = fs21.realpathSync(this._scriptPath);
|
|
1769
1769
|
} catch (err) {
|
|
1770
1770
|
resolvedScriptPath = this._scriptPath;
|
|
1771
1771
|
}
|
|
1772
|
-
executableDir =
|
|
1772
|
+
executableDir = path17.resolve(path17.dirname(resolvedScriptPath), executableDir);
|
|
1773
1773
|
}
|
|
1774
1774
|
if (executableDir) {
|
|
1775
1775
|
let localFile = findFile(executableDir, executableFile);
|
|
1776
1776
|
if (!localFile && !subcommand._executableFile && this._scriptPath) {
|
|
1777
|
-
const legacyName =
|
|
1777
|
+
const legacyName = path17.basename(this._scriptPath, path17.extname(this._scriptPath));
|
|
1778
1778
|
if (legacyName !== this._name) {
|
|
1779
1779
|
localFile = findFile(executableDir, `${legacyName}-${subcommand._name}`);
|
|
1780
1780
|
}
|
|
1781
1781
|
}
|
|
1782
1782
|
executableFile = localFile || executableFile;
|
|
1783
1783
|
}
|
|
1784
|
-
launchWithNode = sourceExt.includes(
|
|
1784
|
+
launchWithNode = sourceExt.includes(path17.extname(executableFile));
|
|
1785
1785
|
let proc;
|
|
1786
1786
|
if (process4.platform !== "win32") {
|
|
1787
1787
|
if (launchWithNode) {
|
|
@@ -2360,7 +2360,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2360
2360
|
}
|
|
2361
2361
|
return positiveOption || option2;
|
|
2362
2362
|
};
|
|
2363
|
-
const
|
|
2363
|
+
const getErrorMessage3 = (option2) => {
|
|
2364
2364
|
const bestOption = findBestOptionFromValue(option2);
|
|
2365
2365
|
const optionKey = bestOption.attributeName();
|
|
2366
2366
|
const source = this.getOptionValueSource(optionKey);
|
|
@@ -2369,7 +2369,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2369
2369
|
}
|
|
2370
2370
|
return `option '${bestOption.flags}'`;
|
|
2371
2371
|
};
|
|
2372
|
-
const message = `error: ${
|
|
2372
|
+
const message = `error: ${getErrorMessage3(option)} cannot be used with ${getErrorMessage3(conflictingOption)}`;
|
|
2373
2373
|
this.error(message, { code: "commander.conflictingOption" });
|
|
2374
2374
|
}
|
|
2375
2375
|
/**
|
|
@@ -2557,7 +2557,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2557
2557
|
* @return {Command}
|
|
2558
2558
|
*/
|
|
2559
2559
|
nameFromFilename(filename) {
|
|
2560
|
-
this._name =
|
|
2560
|
+
this._name = path17.basename(filename, path17.extname(filename));
|
|
2561
2561
|
return this;
|
|
2562
2562
|
}
|
|
2563
2563
|
/**
|
|
@@ -2571,9 +2571,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2571
2571
|
* @param {string} [path]
|
|
2572
2572
|
* @return {string|Command}
|
|
2573
2573
|
*/
|
|
2574
|
-
executableDir(
|
|
2575
|
-
if (
|
|
2576
|
-
this._executableDir =
|
|
2574
|
+
executableDir(path18) {
|
|
2575
|
+
if (path18 === void 0) return this._executableDir;
|
|
2576
|
+
this._executableDir = path18;
|
|
2577
2577
|
return this;
|
|
2578
2578
|
}
|
|
2579
2579
|
/**
|
|
@@ -3638,15 +3638,15 @@ var require_route = __commonJS({
|
|
|
3638
3638
|
};
|
|
3639
3639
|
}
|
|
3640
3640
|
function wrapConversion(toModel, graph) {
|
|
3641
|
-
const
|
|
3641
|
+
const path17 = [graph[toModel].parent, toModel];
|
|
3642
3642
|
let fn2 = conversions[graph[toModel].parent][toModel];
|
|
3643
3643
|
let cur = graph[toModel].parent;
|
|
3644
3644
|
while (graph[cur].parent) {
|
|
3645
|
-
|
|
3645
|
+
path17.unshift(graph[cur].parent);
|
|
3646
3646
|
fn2 = link(conversions[graph[cur].parent][cur], fn2);
|
|
3647
3647
|
cur = graph[cur].parent;
|
|
3648
3648
|
}
|
|
3649
|
-
fn2.conversion =
|
|
3649
|
+
fn2.conversion = path17;
|
|
3650
3650
|
return fn2;
|
|
3651
3651
|
}
|
|
3652
3652
|
module.exports = function(fromModel) {
|
|
@@ -3886,7 +3886,7 @@ var require_has_flag = __commonJS({
|
|
|
3886
3886
|
var require_supports_color = __commonJS({
|
|
3887
3887
|
"node_modules/supports-color/index.js"(exports, module) {
|
|
3888
3888
|
"use strict";
|
|
3889
|
-
var
|
|
3889
|
+
var os9 = __require("os");
|
|
3890
3890
|
var tty = __require("tty");
|
|
3891
3891
|
var hasFlag = require_has_flag();
|
|
3892
3892
|
var { env } = process;
|
|
@@ -3934,7 +3934,7 @@ var require_supports_color = __commonJS({
|
|
|
3934
3934
|
return min;
|
|
3935
3935
|
}
|
|
3936
3936
|
if (process.platform === "win32") {
|
|
3937
|
-
const osRelease =
|
|
3937
|
+
const osRelease = os9.release().split(".");
|
|
3938
3938
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
3939
3939
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
3940
3940
|
}
|
|
@@ -5832,11 +5832,11 @@ var require_baseGet = __commonJS({
|
|
|
5832
5832
|
"node_modules/lodash/_baseGet.js"(exports, module) {
|
|
5833
5833
|
var castPath = require_castPath();
|
|
5834
5834
|
var toKey = require_toKey();
|
|
5835
|
-
function baseGet(object2,
|
|
5836
|
-
|
|
5837
|
-
var index = 0, length =
|
|
5835
|
+
function baseGet(object2, path17) {
|
|
5836
|
+
path17 = castPath(path17, object2);
|
|
5837
|
+
var index = 0, length = path17.length;
|
|
5838
5838
|
while (object2 != null && index < length) {
|
|
5839
|
-
object2 = object2[toKey(
|
|
5839
|
+
object2 = object2[toKey(path17[index++])];
|
|
5840
5840
|
}
|
|
5841
5841
|
return index && index == length ? object2 : void 0;
|
|
5842
5842
|
}
|
|
@@ -5848,8 +5848,8 @@ var require_baseGet = __commonJS({
|
|
|
5848
5848
|
var require_get = __commonJS({
|
|
5849
5849
|
"node_modules/lodash/get.js"(exports, module) {
|
|
5850
5850
|
var baseGet = require_baseGet();
|
|
5851
|
-
function get(object2,
|
|
5852
|
-
var result = object2 == null ? void 0 : baseGet(object2,
|
|
5851
|
+
function get(object2, path17, defaultValue) {
|
|
5852
|
+
var result = object2 == null ? void 0 : baseGet(object2, path17);
|
|
5853
5853
|
return result === void 0 ? defaultValue : result;
|
|
5854
5854
|
}
|
|
5855
5855
|
module.exports = get;
|
|
@@ -5931,14 +5931,14 @@ var require_baseSet = __commonJS({
|
|
|
5931
5931
|
var isIndex = require_isIndex();
|
|
5932
5932
|
var isObject2 = require_isObject();
|
|
5933
5933
|
var toKey = require_toKey();
|
|
5934
|
-
function baseSet(object2,
|
|
5934
|
+
function baseSet(object2, path17, value, customizer) {
|
|
5935
5935
|
if (!isObject2(object2)) {
|
|
5936
5936
|
return object2;
|
|
5937
5937
|
}
|
|
5938
|
-
|
|
5939
|
-
var index = -1, length =
|
|
5938
|
+
path17 = castPath(path17, object2);
|
|
5939
|
+
var index = -1, length = path17.length, lastIndex = length - 1, nested = object2;
|
|
5940
5940
|
while (nested != null && ++index < length) {
|
|
5941
|
-
var key = toKey(
|
|
5941
|
+
var key = toKey(path17[index]), newValue = value;
|
|
5942
5942
|
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
5943
5943
|
return object2;
|
|
5944
5944
|
}
|
|
@@ -5946,7 +5946,7 @@ var require_baseSet = __commonJS({
|
|
|
5946
5946
|
var objValue = nested[key];
|
|
5947
5947
|
newValue = customizer ? customizer(objValue, key, nested) : void 0;
|
|
5948
5948
|
if (newValue === void 0) {
|
|
5949
|
-
newValue = isObject2(objValue) ? objValue : isIndex(
|
|
5949
|
+
newValue = isObject2(objValue) ? objValue : isIndex(path17[index + 1]) ? [] : {};
|
|
5950
5950
|
}
|
|
5951
5951
|
}
|
|
5952
5952
|
assignValue(nested, key, newValue);
|
|
@@ -5962,8 +5962,8 @@ var require_baseSet = __commonJS({
|
|
|
5962
5962
|
var require_set = __commonJS({
|
|
5963
5963
|
"node_modules/lodash/set.js"(exports, module) {
|
|
5964
5964
|
var baseSet = require_baseSet();
|
|
5965
|
-
function set2(object2,
|
|
5966
|
-
return object2 == null ? object2 : baseSet(object2,
|
|
5965
|
+
function set2(object2, path17, value) {
|
|
5966
|
+
return object2 == null ? object2 : baseSet(object2, path17, value);
|
|
5967
5967
|
}
|
|
5968
5968
|
module.exports = set2;
|
|
5969
5969
|
}
|
|
@@ -18268,11 +18268,11 @@ var require_hasPath = __commonJS({
|
|
|
18268
18268
|
var isIndex = require_isIndex();
|
|
18269
18269
|
var isLength = require_isLength();
|
|
18270
18270
|
var toKey = require_toKey();
|
|
18271
|
-
function hasPath(object2,
|
|
18272
|
-
|
|
18273
|
-
var index = -1, length =
|
|
18271
|
+
function hasPath(object2, path17, hasFunc) {
|
|
18272
|
+
path17 = castPath(path17, object2);
|
|
18273
|
+
var index = -1, length = path17.length, result = false;
|
|
18274
18274
|
while (++index < length) {
|
|
18275
|
-
var key = toKey(
|
|
18275
|
+
var key = toKey(path17[index]);
|
|
18276
18276
|
if (!(result = object2 != null && hasFunc(object2, key))) {
|
|
18277
18277
|
break;
|
|
18278
18278
|
}
|
|
@@ -18293,8 +18293,8 @@ var require_hasIn = __commonJS({
|
|
|
18293
18293
|
"node_modules/lodash/hasIn.js"(exports, module) {
|
|
18294
18294
|
var baseHasIn = require_baseHasIn();
|
|
18295
18295
|
var hasPath = require_hasPath();
|
|
18296
|
-
function hasIn(object2,
|
|
18297
|
-
return object2 != null && hasPath(object2,
|
|
18296
|
+
function hasIn(object2, path17) {
|
|
18297
|
+
return object2 != null && hasPath(object2, path17, baseHasIn);
|
|
18298
18298
|
}
|
|
18299
18299
|
module.exports = hasIn;
|
|
18300
18300
|
}
|
|
@@ -18312,13 +18312,13 @@ var require_baseMatchesProperty = __commonJS({
|
|
|
18312
18312
|
var toKey = require_toKey();
|
|
18313
18313
|
var COMPARE_PARTIAL_FLAG = 1;
|
|
18314
18314
|
var COMPARE_UNORDERED_FLAG = 2;
|
|
18315
|
-
function baseMatchesProperty(
|
|
18316
|
-
if (isKey(
|
|
18317
|
-
return matchesStrictComparable(toKey(
|
|
18315
|
+
function baseMatchesProperty(path17, srcValue) {
|
|
18316
|
+
if (isKey(path17) && isStrictComparable(srcValue)) {
|
|
18317
|
+
return matchesStrictComparable(toKey(path17), srcValue);
|
|
18318
18318
|
}
|
|
18319
18319
|
return function(object2) {
|
|
18320
|
-
var objValue = get(object2,
|
|
18321
|
-
return objValue === void 0 && objValue === srcValue ? hasIn(object2,
|
|
18320
|
+
var objValue = get(object2, path17);
|
|
18321
|
+
return objValue === void 0 && objValue === srcValue ? hasIn(object2, path17) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
|
|
18322
18322
|
};
|
|
18323
18323
|
}
|
|
18324
18324
|
module.exports = baseMatchesProperty;
|
|
@@ -18341,9 +18341,9 @@ var require_baseProperty = __commonJS({
|
|
|
18341
18341
|
var require_basePropertyDeep = __commonJS({
|
|
18342
18342
|
"node_modules/lodash/_basePropertyDeep.js"(exports, module) {
|
|
18343
18343
|
var baseGet = require_baseGet();
|
|
18344
|
-
function basePropertyDeep(
|
|
18344
|
+
function basePropertyDeep(path17) {
|
|
18345
18345
|
return function(object2) {
|
|
18346
|
-
return baseGet(object2,
|
|
18346
|
+
return baseGet(object2, path17);
|
|
18347
18347
|
};
|
|
18348
18348
|
}
|
|
18349
18349
|
module.exports = basePropertyDeep;
|
|
@@ -18357,8 +18357,8 @@ var require_property = __commonJS({
|
|
|
18357
18357
|
var basePropertyDeep = require_basePropertyDeep();
|
|
18358
18358
|
var isKey = require_isKey();
|
|
18359
18359
|
var toKey = require_toKey();
|
|
18360
|
-
function property(
|
|
18361
|
-
return isKey(
|
|
18360
|
+
function property(path17) {
|
|
18361
|
+
return isKey(path17) ? baseProperty(toKey(path17)) : basePropertyDeep(path17);
|
|
18362
18362
|
}
|
|
18363
18363
|
module.exports = property;
|
|
18364
18364
|
}
|
|
@@ -31310,10 +31310,10 @@ var require_lib = __commonJS({
|
|
|
31310
31310
|
exports.analyse = analyse;
|
|
31311
31311
|
var detectFile = (filepath, opts = {}) => new Promise((resolve3, reject) => {
|
|
31312
31312
|
let fd;
|
|
31313
|
-
const
|
|
31313
|
+
const fs21 = (0, node_1.default)();
|
|
31314
31314
|
const handler = (err, buffer) => {
|
|
31315
31315
|
if (fd) {
|
|
31316
|
-
|
|
31316
|
+
fs21.closeSync(fd);
|
|
31317
31317
|
}
|
|
31318
31318
|
if (err) {
|
|
31319
31319
|
reject(err);
|
|
@@ -31325,9 +31325,9 @@ var require_lib = __commonJS({
|
|
|
31325
31325
|
};
|
|
31326
31326
|
const sampleSize = (opts === null || opts === void 0 ? void 0 : opts.sampleSize) || 0;
|
|
31327
31327
|
if (sampleSize > 0) {
|
|
31328
|
-
fd =
|
|
31328
|
+
fd = fs21.openSync(filepath, "r");
|
|
31329
31329
|
let sample = Buffer.allocUnsafe(sampleSize);
|
|
31330
|
-
|
|
31330
|
+
fs21.read(fd, sample, 0, sampleSize, opts.offset, (err, bytesRead) => {
|
|
31331
31331
|
if (err) {
|
|
31332
31332
|
handler(err, null);
|
|
31333
31333
|
} else {
|
|
@@ -31339,22 +31339,22 @@ var require_lib = __commonJS({
|
|
|
31339
31339
|
});
|
|
31340
31340
|
return;
|
|
31341
31341
|
}
|
|
31342
|
-
|
|
31342
|
+
fs21.readFile(filepath, handler);
|
|
31343
31343
|
});
|
|
31344
31344
|
exports.detectFile = detectFile;
|
|
31345
31345
|
var detectFileSync = (filepath, opts = {}) => {
|
|
31346
|
-
const
|
|
31346
|
+
const fs21 = (0, node_1.default)();
|
|
31347
31347
|
if (opts && opts.sampleSize) {
|
|
31348
|
-
const fd =
|
|
31348
|
+
const fd = fs21.openSync(filepath, "r");
|
|
31349
31349
|
let sample = Buffer.allocUnsafe(opts.sampleSize);
|
|
31350
|
-
const bytesRead =
|
|
31350
|
+
const bytesRead = fs21.readSync(fd, sample, 0, opts.sampleSize, opts.offset);
|
|
31351
31351
|
if (bytesRead < opts.sampleSize) {
|
|
31352
31352
|
sample = sample.subarray(0, bytesRead);
|
|
31353
31353
|
}
|
|
31354
|
-
|
|
31354
|
+
fs21.closeSync(fd);
|
|
31355
31355
|
return (0, exports.detect)(sample);
|
|
31356
31356
|
}
|
|
31357
|
-
return (0, exports.detect)(
|
|
31357
|
+
return (0, exports.detect)(fs21.readFileSync(filepath));
|
|
31358
31358
|
};
|
|
31359
31359
|
exports.detectFileSync = detectFileSync;
|
|
31360
31360
|
exports.default = {
|
|
@@ -36002,7 +36002,7 @@ var require_has_flag2 = __commonJS({
|
|
|
36002
36002
|
var require_supports_colors = __commonJS({
|
|
36003
36003
|
"node_modules/@colors/colors/lib/system/supports-colors.js"(exports, module) {
|
|
36004
36004
|
"use strict";
|
|
36005
|
-
var
|
|
36005
|
+
var os9 = __require("os");
|
|
36006
36006
|
var hasFlag = require_has_flag2();
|
|
36007
36007
|
var env = process.env;
|
|
36008
36008
|
var forceColor = void 0;
|
|
@@ -36040,7 +36040,7 @@ var require_supports_colors = __commonJS({
|
|
|
36040
36040
|
}
|
|
36041
36041
|
var min = forceColor ? 1 : 0;
|
|
36042
36042
|
if (process.platform === "win32") {
|
|
36043
|
-
var osRelease =
|
|
36043
|
+
var osRelease = os9.release().split(".");
|
|
36044
36044
|
if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
36045
36045
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
36046
36046
|
}
|
|
@@ -40389,11 +40389,11 @@ var require_lodash = __commonJS({
|
|
|
40389
40389
|
return isFunction(object2[key]);
|
|
40390
40390
|
});
|
|
40391
40391
|
}
|
|
40392
|
-
function baseGet(object2,
|
|
40393
|
-
|
|
40394
|
-
var index = 0, length =
|
|
40392
|
+
function baseGet(object2, path17) {
|
|
40393
|
+
path17 = castPath(path17, object2);
|
|
40394
|
+
var index = 0, length = path17.length;
|
|
40395
40395
|
while (object2 != null && index < length) {
|
|
40396
|
-
object2 = object2[toKey(
|
|
40396
|
+
object2 = object2[toKey(path17[index++])];
|
|
40397
40397
|
}
|
|
40398
40398
|
return index && index == length ? object2 : undefined2;
|
|
40399
40399
|
}
|
|
@@ -40457,10 +40457,10 @@ var require_lodash = __commonJS({
|
|
|
40457
40457
|
});
|
|
40458
40458
|
return accumulator;
|
|
40459
40459
|
}
|
|
40460
|
-
function baseInvoke(object2,
|
|
40461
|
-
|
|
40462
|
-
object2 = parent(object2,
|
|
40463
|
-
var func = object2 == null ? object2 : object2[toKey(last(
|
|
40460
|
+
function baseInvoke(object2, path17, args) {
|
|
40461
|
+
path17 = castPath(path17, object2);
|
|
40462
|
+
object2 = parent(object2, path17);
|
|
40463
|
+
var func = object2 == null ? object2 : object2[toKey(last(path17))];
|
|
40464
40464
|
return func == null ? undefined2 : apply(func, object2, args);
|
|
40465
40465
|
}
|
|
40466
40466
|
function baseIsArguments(value) {
|
|
@@ -40616,13 +40616,13 @@ var require_lodash = __commonJS({
|
|
|
40616
40616
|
return object2 === source || baseIsMatch(object2, source, matchData);
|
|
40617
40617
|
};
|
|
40618
40618
|
}
|
|
40619
|
-
function baseMatchesProperty(
|
|
40620
|
-
if (isKey(
|
|
40621
|
-
return matchesStrictComparable(toKey(
|
|
40619
|
+
function baseMatchesProperty(path17, srcValue) {
|
|
40620
|
+
if (isKey(path17) && isStrictComparable(srcValue)) {
|
|
40621
|
+
return matchesStrictComparable(toKey(path17), srcValue);
|
|
40622
40622
|
}
|
|
40623
40623
|
return function(object2) {
|
|
40624
|
-
var objValue = get(object2,
|
|
40625
|
-
return objValue === undefined2 && objValue === srcValue ? hasIn(object2,
|
|
40624
|
+
var objValue = get(object2, path17);
|
|
40625
|
+
return objValue === undefined2 && objValue === srcValue ? hasIn(object2, path17) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
|
|
40626
40626
|
};
|
|
40627
40627
|
}
|
|
40628
40628
|
function baseMerge(object2, source, srcIndex, customizer, stack) {
|
|
@@ -40719,23 +40719,23 @@ var require_lodash = __commonJS({
|
|
|
40719
40719
|
});
|
|
40720
40720
|
}
|
|
40721
40721
|
function basePick(object2, paths) {
|
|
40722
|
-
return basePickBy(object2, paths, function(value,
|
|
40723
|
-
return hasIn(object2,
|
|
40722
|
+
return basePickBy(object2, paths, function(value, path17) {
|
|
40723
|
+
return hasIn(object2, path17);
|
|
40724
40724
|
});
|
|
40725
40725
|
}
|
|
40726
40726
|
function basePickBy(object2, paths, predicate) {
|
|
40727
40727
|
var index = -1, length = paths.length, result2 = {};
|
|
40728
40728
|
while (++index < length) {
|
|
40729
|
-
var
|
|
40730
|
-
if (predicate(value,
|
|
40731
|
-
baseSet(result2, castPath(
|
|
40729
|
+
var path17 = paths[index], value = baseGet(object2, path17);
|
|
40730
|
+
if (predicate(value, path17)) {
|
|
40731
|
+
baseSet(result2, castPath(path17, object2), value);
|
|
40732
40732
|
}
|
|
40733
40733
|
}
|
|
40734
40734
|
return result2;
|
|
40735
40735
|
}
|
|
40736
|
-
function basePropertyDeep(
|
|
40736
|
+
function basePropertyDeep(path17) {
|
|
40737
40737
|
return function(object2) {
|
|
40738
|
-
return baseGet(object2,
|
|
40738
|
+
return baseGet(object2, path17);
|
|
40739
40739
|
};
|
|
40740
40740
|
}
|
|
40741
40741
|
function basePullAll(array2, values2, iteratee2, comparator) {
|
|
@@ -40809,14 +40809,14 @@ var require_lodash = __commonJS({
|
|
|
40809
40809
|
var array2 = values(collection);
|
|
40810
40810
|
return shuffleSelf(array2, baseClamp(n, 0, array2.length));
|
|
40811
40811
|
}
|
|
40812
|
-
function baseSet(object2,
|
|
40812
|
+
function baseSet(object2, path17, value, customizer) {
|
|
40813
40813
|
if (!isObject2(object2)) {
|
|
40814
40814
|
return object2;
|
|
40815
40815
|
}
|
|
40816
|
-
|
|
40817
|
-
var index = -1, length =
|
|
40816
|
+
path17 = castPath(path17, object2);
|
|
40817
|
+
var index = -1, length = path17.length, lastIndex = length - 1, nested = object2;
|
|
40818
40818
|
while (nested != null && ++index < length) {
|
|
40819
|
-
var key = toKey(
|
|
40819
|
+
var key = toKey(path17[index]), newValue = value;
|
|
40820
40820
|
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
40821
40821
|
return object2;
|
|
40822
40822
|
}
|
|
@@ -40824,7 +40824,7 @@ var require_lodash = __commonJS({
|
|
|
40824
40824
|
var objValue = nested[key];
|
|
40825
40825
|
newValue = customizer ? customizer(objValue, key, nested) : undefined2;
|
|
40826
40826
|
if (newValue === undefined2) {
|
|
40827
|
-
newValue = isObject2(objValue) ? objValue : isIndex(
|
|
40827
|
+
newValue = isObject2(objValue) ? objValue : isIndex(path17[index + 1]) ? [] : {};
|
|
40828
40828
|
}
|
|
40829
40829
|
}
|
|
40830
40830
|
assignValue(nested, key, newValue);
|
|
@@ -40990,14 +40990,14 @@ var require_lodash = __commonJS({
|
|
|
40990
40990
|
}
|
|
40991
40991
|
return result2;
|
|
40992
40992
|
}
|
|
40993
|
-
function baseUnset(object2,
|
|
40994
|
-
|
|
40995
|
-
var index = -1, length =
|
|
40993
|
+
function baseUnset(object2, path17) {
|
|
40994
|
+
path17 = castPath(path17, object2);
|
|
40995
|
+
var index = -1, length = path17.length;
|
|
40996
40996
|
if (!length) {
|
|
40997
40997
|
return true;
|
|
40998
40998
|
}
|
|
40999
40999
|
while (++index < length) {
|
|
41000
|
-
var key = toKey(
|
|
41000
|
+
var key = toKey(path17[index]);
|
|
41001
41001
|
if (key === "__proto__" && !hasOwnProperty.call(object2, "__proto__")) {
|
|
41002
41002
|
return false;
|
|
41003
41003
|
}
|
|
@@ -41005,11 +41005,11 @@ var require_lodash = __commonJS({
|
|
|
41005
41005
|
return false;
|
|
41006
41006
|
}
|
|
41007
41007
|
}
|
|
41008
|
-
var obj = parent(object2,
|
|
41009
|
-
return obj == null || delete obj[toKey(last(
|
|
41008
|
+
var obj = parent(object2, path17);
|
|
41009
|
+
return obj == null || delete obj[toKey(last(path17))];
|
|
41010
41010
|
}
|
|
41011
|
-
function baseUpdate(object2,
|
|
41012
|
-
return baseSet(object2,
|
|
41011
|
+
function baseUpdate(object2, path17, updater, customizer) {
|
|
41012
|
+
return baseSet(object2, path17, updater(baseGet(object2, path17)), customizer);
|
|
41013
41013
|
}
|
|
41014
41014
|
function baseWhile(array2, predicate, isDrop, fromRight) {
|
|
41015
41015
|
var length = array2.length, index = fromRight ? length : -1;
|
|
@@ -41892,11 +41892,11 @@ var require_lodash = __commonJS({
|
|
|
41892
41892
|
var match = source.match(reWrapDetails);
|
|
41893
41893
|
return match ? match[1].split(reSplitDetails) : [];
|
|
41894
41894
|
}
|
|
41895
|
-
function hasPath(object2,
|
|
41896
|
-
|
|
41897
|
-
var index = -1, length =
|
|
41895
|
+
function hasPath(object2, path17, hasFunc) {
|
|
41896
|
+
path17 = castPath(path17, object2);
|
|
41897
|
+
var index = -1, length = path17.length, result2 = false;
|
|
41898
41898
|
while (++index < length) {
|
|
41899
|
-
var key = toKey(
|
|
41899
|
+
var key = toKey(path17[index]);
|
|
41900
41900
|
if (!(result2 = object2 != null && hasFunc(object2, key))) {
|
|
41901
41901
|
break;
|
|
41902
41902
|
}
|
|
@@ -42098,8 +42098,8 @@ var require_lodash = __commonJS({
|
|
|
42098
42098
|
return apply(func, this, otherArgs);
|
|
42099
42099
|
};
|
|
42100
42100
|
}
|
|
42101
|
-
function parent(object2,
|
|
42102
|
-
return
|
|
42101
|
+
function parent(object2, path17) {
|
|
42102
|
+
return path17.length < 2 ? object2 : baseGet(object2, baseSlice(path17, 0, -1));
|
|
42103
42103
|
}
|
|
42104
42104
|
function reorder(array2, indexes) {
|
|
42105
42105
|
var arrLength = array2.length, length = nativeMin(indexes.length, arrLength), oldArray = copyArray(array2);
|
|
@@ -42734,10 +42734,10 @@ var require_lodash = __commonJS({
|
|
|
42734
42734
|
}
|
|
42735
42735
|
return isString(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1;
|
|
42736
42736
|
}
|
|
42737
|
-
var invokeMap = baseRest(function(collection,
|
|
42738
|
-
var index = -1, isFunc = typeof
|
|
42737
|
+
var invokeMap = baseRest(function(collection, path17, args) {
|
|
42738
|
+
var index = -1, isFunc = typeof path17 == "function", result2 = isArrayLike(collection) ? Array2(collection.length) : [];
|
|
42739
42739
|
baseEach(collection, function(value) {
|
|
42740
|
-
result2[++index] = isFunc ? apply(
|
|
42740
|
+
result2[++index] = isFunc ? apply(path17, value, args) : baseInvoke(value, path17, args);
|
|
42741
42741
|
});
|
|
42742
42742
|
return result2;
|
|
42743
42743
|
});
|
|
@@ -43389,15 +43389,15 @@ var require_lodash = __commonJS({
|
|
|
43389
43389
|
function functionsIn(object2) {
|
|
43390
43390
|
return object2 == null ? [] : baseFunctions(object2, keysIn(object2));
|
|
43391
43391
|
}
|
|
43392
|
-
function get(object2,
|
|
43393
|
-
var result2 = object2 == null ? undefined2 : baseGet(object2,
|
|
43392
|
+
function get(object2, path17, defaultValue) {
|
|
43393
|
+
var result2 = object2 == null ? undefined2 : baseGet(object2, path17);
|
|
43394
43394
|
return result2 === undefined2 ? defaultValue : result2;
|
|
43395
43395
|
}
|
|
43396
|
-
function has(object2,
|
|
43397
|
-
return object2 != null && hasPath(object2,
|
|
43396
|
+
function has(object2, path17) {
|
|
43397
|
+
return object2 != null && hasPath(object2, path17, baseHas);
|
|
43398
43398
|
}
|
|
43399
|
-
function hasIn(object2,
|
|
43400
|
-
return object2 != null && hasPath(object2,
|
|
43399
|
+
function hasIn(object2, path17) {
|
|
43400
|
+
return object2 != null && hasPath(object2, path17, baseHasIn);
|
|
43401
43401
|
}
|
|
43402
43402
|
var invert = createInverter(function(result2, value, key) {
|
|
43403
43403
|
if (value != null && typeof value.toString != "function") {
|
|
@@ -43450,10 +43450,10 @@ var require_lodash = __commonJS({
|
|
|
43450
43450
|
return result2;
|
|
43451
43451
|
}
|
|
43452
43452
|
var isDeep = false;
|
|
43453
|
-
paths = arrayMap(paths, function(
|
|
43454
|
-
|
|
43455
|
-
isDeep || (isDeep =
|
|
43456
|
-
return
|
|
43453
|
+
paths = arrayMap(paths, function(path17) {
|
|
43454
|
+
path17 = castPath(path17, object2);
|
|
43455
|
+
isDeep || (isDeep = path17.length > 1);
|
|
43456
|
+
return path17;
|
|
43457
43457
|
});
|
|
43458
43458
|
copyObject(object2, getAllKeysIn(object2), result2);
|
|
43459
43459
|
if (isDeep) {
|
|
@@ -43479,19 +43479,19 @@ var require_lodash = __commonJS({
|
|
|
43479
43479
|
return [prop];
|
|
43480
43480
|
});
|
|
43481
43481
|
predicate = getIteratee(predicate);
|
|
43482
|
-
return basePickBy(object2, props, function(value,
|
|
43483
|
-
return predicate(value,
|
|
43482
|
+
return basePickBy(object2, props, function(value, path17) {
|
|
43483
|
+
return predicate(value, path17[0]);
|
|
43484
43484
|
});
|
|
43485
43485
|
}
|
|
43486
|
-
function result(object2,
|
|
43487
|
-
|
|
43488
|
-
var index = -1, length =
|
|
43486
|
+
function result(object2, path17, defaultValue) {
|
|
43487
|
+
path17 = castPath(path17, object2);
|
|
43488
|
+
var index = -1, length = path17.length;
|
|
43489
43489
|
if (!length) {
|
|
43490
43490
|
length = 1;
|
|
43491
43491
|
object2 = undefined2;
|
|
43492
43492
|
}
|
|
43493
43493
|
while (++index < length) {
|
|
43494
|
-
var value = object2 == null ? undefined2 : object2[toKey(
|
|
43494
|
+
var value = object2 == null ? undefined2 : object2[toKey(path17[index])];
|
|
43495
43495
|
if (value === undefined2) {
|
|
43496
43496
|
index = length;
|
|
43497
43497
|
value = defaultValue;
|
|
@@ -43500,12 +43500,12 @@ var require_lodash = __commonJS({
|
|
|
43500
43500
|
}
|
|
43501
43501
|
return object2;
|
|
43502
43502
|
}
|
|
43503
|
-
function set2(object2,
|
|
43504
|
-
return object2 == null ? object2 : baseSet(object2,
|
|
43503
|
+
function set2(object2, path17, value) {
|
|
43504
|
+
return object2 == null ? object2 : baseSet(object2, path17, value);
|
|
43505
43505
|
}
|
|
43506
|
-
function setWith(object2,
|
|
43506
|
+
function setWith(object2, path17, value, customizer) {
|
|
43507
43507
|
customizer = typeof customizer == "function" ? customizer : undefined2;
|
|
43508
|
-
return object2 == null ? object2 : baseSet(object2,
|
|
43508
|
+
return object2 == null ? object2 : baseSet(object2, path17, value, customizer);
|
|
43509
43509
|
}
|
|
43510
43510
|
var toPairs = createToPairs(keys);
|
|
43511
43511
|
var toPairsIn = createToPairs(keysIn);
|
|
@@ -43527,15 +43527,15 @@ var require_lodash = __commonJS({
|
|
|
43527
43527
|
});
|
|
43528
43528
|
return accumulator;
|
|
43529
43529
|
}
|
|
43530
|
-
function unset(object2,
|
|
43531
|
-
return object2 == null ? true : baseUnset(object2,
|
|
43530
|
+
function unset(object2, path17) {
|
|
43531
|
+
return object2 == null ? true : baseUnset(object2, path17);
|
|
43532
43532
|
}
|
|
43533
|
-
function update2(object2,
|
|
43534
|
-
return object2 == null ? object2 : baseUpdate(object2,
|
|
43533
|
+
function update2(object2, path17, updater) {
|
|
43534
|
+
return object2 == null ? object2 : baseUpdate(object2, path17, castFunction(updater));
|
|
43535
43535
|
}
|
|
43536
|
-
function updateWith(object2,
|
|
43536
|
+
function updateWith(object2, path17, updater, customizer) {
|
|
43537
43537
|
customizer = typeof customizer == "function" ? customizer : undefined2;
|
|
43538
|
-
return object2 == null ? object2 : baseUpdate(object2,
|
|
43538
|
+
return object2 == null ? object2 : baseUpdate(object2, path17, castFunction(updater), customizer);
|
|
43539
43539
|
}
|
|
43540
43540
|
function values(object2) {
|
|
43541
43541
|
return object2 == null ? [] : baseValues(object2, keys(object2));
|
|
@@ -43921,17 +43921,17 @@ var require_lodash = __commonJS({
|
|
|
43921
43921
|
function matches(source) {
|
|
43922
43922
|
return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
|
|
43923
43923
|
}
|
|
43924
|
-
function matchesProperty(
|
|
43925
|
-
return baseMatchesProperty(
|
|
43924
|
+
function matchesProperty(path17, srcValue) {
|
|
43925
|
+
return baseMatchesProperty(path17, baseClone(srcValue, CLONE_DEEP_FLAG));
|
|
43926
43926
|
}
|
|
43927
|
-
var method = baseRest(function(
|
|
43927
|
+
var method = baseRest(function(path17, args) {
|
|
43928
43928
|
return function(object2) {
|
|
43929
|
-
return baseInvoke(object2,
|
|
43929
|
+
return baseInvoke(object2, path17, args);
|
|
43930
43930
|
};
|
|
43931
43931
|
});
|
|
43932
43932
|
var methodOf = baseRest(function(object2, args) {
|
|
43933
|
-
return function(
|
|
43934
|
-
return baseInvoke(object2,
|
|
43933
|
+
return function(path17) {
|
|
43934
|
+
return baseInvoke(object2, path17, args);
|
|
43935
43935
|
};
|
|
43936
43936
|
});
|
|
43937
43937
|
function mixin(object2, source, options) {
|
|
@@ -43978,12 +43978,12 @@ var require_lodash = __commonJS({
|
|
|
43978
43978
|
var over = createOver(arrayMap);
|
|
43979
43979
|
var overEvery = createOver(arrayEvery);
|
|
43980
43980
|
var overSome = createOver(arraySome);
|
|
43981
|
-
function property(
|
|
43982
|
-
return isKey(
|
|
43981
|
+
function property(path17) {
|
|
43982
|
+
return isKey(path17) ? baseProperty(toKey(path17)) : basePropertyDeep(path17);
|
|
43983
43983
|
}
|
|
43984
43984
|
function propertyOf(object2) {
|
|
43985
|
-
return function(
|
|
43986
|
-
return object2 == null ? undefined2 : baseGet(object2,
|
|
43985
|
+
return function(path17) {
|
|
43986
|
+
return object2 == null ? undefined2 : baseGet(object2, path17);
|
|
43987
43987
|
};
|
|
43988
43988
|
}
|
|
43989
43989
|
var range = createRange();
|
|
@@ -44436,12 +44436,12 @@ var require_lodash = __commonJS({
|
|
|
44436
44436
|
LazyWrapper.prototype.findLast = function(predicate) {
|
|
44437
44437
|
return this.reverse().find(predicate);
|
|
44438
44438
|
};
|
|
44439
|
-
LazyWrapper.prototype.invokeMap = baseRest(function(
|
|
44440
|
-
if (typeof
|
|
44439
|
+
LazyWrapper.prototype.invokeMap = baseRest(function(path17, args) {
|
|
44440
|
+
if (typeof path17 == "function") {
|
|
44441
44441
|
return new LazyWrapper(this);
|
|
44442
44442
|
}
|
|
44443
44443
|
return this.map(function(value) {
|
|
44444
|
-
return baseInvoke(value,
|
|
44444
|
+
return baseInvoke(value, path17, args);
|
|
44445
44445
|
});
|
|
44446
44446
|
});
|
|
44447
44447
|
LazyWrapper.prototype.reject = function(predicate) {
|
|
@@ -45483,15 +45483,15 @@ var require_route2 = __commonJS({
|
|
|
45483
45483
|
};
|
|
45484
45484
|
}
|
|
45485
45485
|
function wrapConversion(toModel, graph) {
|
|
45486
|
-
var
|
|
45486
|
+
var path17 = [graph[toModel].parent, toModel];
|
|
45487
45487
|
var fn2 = conversions[graph[toModel].parent][toModel];
|
|
45488
45488
|
var cur = graph[toModel].parent;
|
|
45489
45489
|
while (graph[cur].parent) {
|
|
45490
|
-
|
|
45490
|
+
path17.unshift(graph[cur].parent);
|
|
45491
45491
|
fn2 = link(conversions[graph[cur].parent][cur], fn2);
|
|
45492
45492
|
cur = graph[cur].parent;
|
|
45493
45493
|
}
|
|
45494
|
-
fn2.conversion =
|
|
45494
|
+
fn2.conversion = path17;
|
|
45495
45495
|
return fn2;
|
|
45496
45496
|
}
|
|
45497
45497
|
module.exports = function(fromModel) {
|
|
@@ -45731,7 +45731,7 @@ var require_has_flag3 = __commonJS({
|
|
|
45731
45731
|
var require_supports_color2 = __commonJS({
|
|
45732
45732
|
"node_modules/inquirer-search-list/node_modules/chalk/node_modules/supports-color/index.js"(exports, module) {
|
|
45733
45733
|
"use strict";
|
|
45734
|
-
var
|
|
45734
|
+
var os9 = __require("os");
|
|
45735
45735
|
var hasFlag = require_has_flag3();
|
|
45736
45736
|
var env = process.env;
|
|
45737
45737
|
var forceColor;
|
|
@@ -45769,7 +45769,7 @@ var require_supports_color2 = __commonJS({
|
|
|
45769
45769
|
}
|
|
45770
45770
|
const min = forceColor ? 1 : 0;
|
|
45771
45771
|
if (process.platform === "win32") {
|
|
45772
|
-
const osRelease =
|
|
45772
|
+
const osRelease = os9.release().split(".");
|
|
45773
45773
|
if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
45774
45774
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
45775
45775
|
}
|
|
@@ -51926,8 +51926,8 @@ var require_rx_lite = __commonJS({
|
|
|
51926
51926
|
checkDisposed(this);
|
|
51927
51927
|
if (!this.isStopped) {
|
|
51928
51928
|
this.isStopped = true;
|
|
51929
|
-
for (var i = 0,
|
|
51930
|
-
|
|
51929
|
+
for (var i = 0, os9 = cloneArray(this.observers), len = os9.length; i < len; i++) {
|
|
51930
|
+
os9[i].onCompleted();
|
|
51931
51931
|
}
|
|
51932
51932
|
this.observers.length = 0;
|
|
51933
51933
|
}
|
|
@@ -51942,8 +51942,8 @@ var require_rx_lite = __commonJS({
|
|
|
51942
51942
|
this.isStopped = true;
|
|
51943
51943
|
this.error = error49;
|
|
51944
51944
|
this.hasError = true;
|
|
51945
|
-
for (var i = 0,
|
|
51946
|
-
|
|
51945
|
+
for (var i = 0, os9 = cloneArray(this.observers), len = os9.length; i < len; i++) {
|
|
51946
|
+
os9[i].onError(error49);
|
|
51947
51947
|
}
|
|
51948
51948
|
this.observers.length = 0;
|
|
51949
51949
|
}
|
|
@@ -51955,8 +51955,8 @@ var require_rx_lite = __commonJS({
|
|
|
51955
51955
|
onNext: function(value) {
|
|
51956
51956
|
checkDisposed(this);
|
|
51957
51957
|
if (!this.isStopped) {
|
|
51958
|
-
for (var i = 0,
|
|
51959
|
-
|
|
51958
|
+
for (var i = 0, os9 = cloneArray(this.observers), len = os9.length; i < len; i++) {
|
|
51959
|
+
os9[i].onNext(value);
|
|
51960
51960
|
}
|
|
51961
51961
|
}
|
|
51962
51962
|
},
|
|
@@ -52016,16 +52016,16 @@ var require_rx_lite = __commonJS({
|
|
|
52016
52016
|
checkDisposed(this);
|
|
52017
52017
|
if (!this.isStopped) {
|
|
52018
52018
|
this.isStopped = true;
|
|
52019
|
-
var
|
|
52019
|
+
var os9 = cloneArray(this.observers), len = os9.length;
|
|
52020
52020
|
if (this.hasValue) {
|
|
52021
52021
|
for (i = 0; i < len; i++) {
|
|
52022
|
-
var o =
|
|
52022
|
+
var o = os9[i];
|
|
52023
52023
|
o.onNext(this.value);
|
|
52024
52024
|
o.onCompleted();
|
|
52025
52025
|
}
|
|
52026
52026
|
} else {
|
|
52027
52027
|
for (i = 0; i < len; i++) {
|
|
52028
|
-
|
|
52028
|
+
os9[i].onCompleted();
|
|
52029
52029
|
}
|
|
52030
52030
|
}
|
|
52031
52031
|
this.observers.length = 0;
|
|
@@ -52041,8 +52041,8 @@ var require_rx_lite = __commonJS({
|
|
|
52041
52041
|
this.isStopped = true;
|
|
52042
52042
|
this.hasError = true;
|
|
52043
52043
|
this.error = error49;
|
|
52044
|
-
for (var i = 0,
|
|
52045
|
-
|
|
52044
|
+
for (var i = 0, os9 = cloneArray(this.observers), len = os9.length; i < len; i++) {
|
|
52045
|
+
os9[i].onError(error49);
|
|
52046
52046
|
}
|
|
52047
52047
|
this.observers.length = 0;
|
|
52048
52048
|
}
|
|
@@ -52150,8 +52150,8 @@ var require_rx_lite = __commonJS({
|
|
|
52150
52150
|
return;
|
|
52151
52151
|
}
|
|
52152
52152
|
this.isStopped = true;
|
|
52153
|
-
for (var i = 0,
|
|
52154
|
-
|
|
52153
|
+
for (var i = 0, os9 = cloneArray(this.observers), len = os9.length; i < len; i++) {
|
|
52154
|
+
os9[i].onCompleted();
|
|
52155
52155
|
}
|
|
52156
52156
|
this.observers.length = 0;
|
|
52157
52157
|
},
|
|
@@ -52167,8 +52167,8 @@ var require_rx_lite = __commonJS({
|
|
|
52167
52167
|
this.isStopped = true;
|
|
52168
52168
|
this.hasError = true;
|
|
52169
52169
|
this.error = error49;
|
|
52170
|
-
for (var i = 0,
|
|
52171
|
-
|
|
52170
|
+
for (var i = 0, os9 = cloneArray(this.observers), len = os9.length; i < len; i++) {
|
|
52171
|
+
os9[i].onError(error49);
|
|
52172
52172
|
}
|
|
52173
52173
|
this.observers.length = 0;
|
|
52174
52174
|
},
|
|
@@ -52182,8 +52182,8 @@ var require_rx_lite = __commonJS({
|
|
|
52182
52182
|
return;
|
|
52183
52183
|
}
|
|
52184
52184
|
this.value = value;
|
|
52185
|
-
for (var i = 0,
|
|
52186
|
-
|
|
52185
|
+
for (var i = 0, os9 = cloneArray(this.observers), len = os9.length; i < len; i++) {
|
|
52186
|
+
os9[i].onNext(value);
|
|
52187
52187
|
}
|
|
52188
52188
|
},
|
|
52189
52189
|
/**
|
|
@@ -52264,8 +52264,8 @@ var require_rx_lite = __commonJS({
|
|
|
52264
52264
|
var now = this.scheduler.now();
|
|
52265
52265
|
this.q.push({ interval: now, value });
|
|
52266
52266
|
this._trim(now);
|
|
52267
|
-
for (var i = 0,
|
|
52268
|
-
var observer =
|
|
52267
|
+
for (var i = 0, os9 = cloneArray(this.observers), len = os9.length; i < len; i++) {
|
|
52268
|
+
var observer = os9[i];
|
|
52269
52269
|
observer.onNext(value);
|
|
52270
52270
|
observer.ensureActive();
|
|
52271
52271
|
}
|
|
@@ -52284,8 +52284,8 @@ var require_rx_lite = __commonJS({
|
|
|
52284
52284
|
this.hasError = true;
|
|
52285
52285
|
var now = this.scheduler.now();
|
|
52286
52286
|
this._trim(now);
|
|
52287
|
-
for (var i = 0,
|
|
52288
|
-
var observer =
|
|
52287
|
+
for (var i = 0, os9 = cloneArray(this.observers), len = os9.length; i < len; i++) {
|
|
52288
|
+
var observer = os9[i];
|
|
52289
52289
|
observer.onError(error49);
|
|
52290
52290
|
observer.ensureActive();
|
|
52291
52291
|
}
|
|
@@ -52302,8 +52302,8 @@ var require_rx_lite = __commonJS({
|
|
|
52302
52302
|
this.isStopped = true;
|
|
52303
52303
|
var now = this.scheduler.now();
|
|
52304
52304
|
this._trim(now);
|
|
52305
|
-
for (var i = 0,
|
|
52306
|
-
var observer =
|
|
52305
|
+
for (var i = 0, os9 = cloneArray(this.observers), len = os9.length; i < len; i++) {
|
|
52306
|
+
var observer = os9[i];
|
|
52307
52307
|
observer.onCompleted();
|
|
52308
52308
|
observer.ensureActive();
|
|
52309
52309
|
}
|
|
@@ -54568,14 +54568,14 @@ var require_util2 = __commonJS({
|
|
|
54568
54568
|
}
|
|
54569
54569
|
const port = url2.port != null ? url2.port : url2.protocol === "https:" ? 443 : 80;
|
|
54570
54570
|
let origin = url2.origin != null ? url2.origin : `${url2.protocol || ""}//${url2.hostname || ""}:${port}`;
|
|
54571
|
-
let
|
|
54571
|
+
let path17 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`;
|
|
54572
54572
|
if (origin[origin.length - 1] === "/") {
|
|
54573
54573
|
origin = origin.slice(0, origin.length - 1);
|
|
54574
54574
|
}
|
|
54575
|
-
if (
|
|
54576
|
-
|
|
54575
|
+
if (path17 && path17[0] !== "/") {
|
|
54576
|
+
path17 = `/${path17}`;
|
|
54577
54577
|
}
|
|
54578
|
-
return new URL(`${origin}${
|
|
54578
|
+
return new URL(`${origin}${path17}`);
|
|
54579
54579
|
}
|
|
54580
54580
|
if (!isHttpOrHttpsPrefixed(url2.origin || url2.protocol)) {
|
|
54581
54581
|
throw new InvalidArgumentError2("Invalid URL protocol: the URL must start with `http:` or `https:`.");
|
|
@@ -55026,39 +55026,39 @@ var require_diagnostics = __commonJS({
|
|
|
55026
55026
|
});
|
|
55027
55027
|
diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => {
|
|
55028
55028
|
const {
|
|
55029
|
-
request: { method, path:
|
|
55029
|
+
request: { method, path: path17, origin }
|
|
55030
55030
|
} = evt;
|
|
55031
|
-
debuglog("sending request to %s %s/%s", method, origin,
|
|
55031
|
+
debuglog("sending request to %s %s/%s", method, origin, path17);
|
|
55032
55032
|
});
|
|
55033
55033
|
diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => {
|
|
55034
55034
|
const {
|
|
55035
|
-
request: { method, path:
|
|
55035
|
+
request: { method, path: path17, origin },
|
|
55036
55036
|
response: { statusCode }
|
|
55037
55037
|
} = evt;
|
|
55038
55038
|
debuglog(
|
|
55039
55039
|
"received response to %s %s/%s - HTTP %d",
|
|
55040
55040
|
method,
|
|
55041
55041
|
origin,
|
|
55042
|
-
|
|
55042
|
+
path17,
|
|
55043
55043
|
statusCode
|
|
55044
55044
|
);
|
|
55045
55045
|
});
|
|
55046
55046
|
diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => {
|
|
55047
55047
|
const {
|
|
55048
|
-
request: { method, path:
|
|
55048
|
+
request: { method, path: path17, origin }
|
|
55049
55049
|
} = evt;
|
|
55050
|
-
debuglog("trailers received from %s %s/%s", method, origin,
|
|
55050
|
+
debuglog("trailers received from %s %s/%s", method, origin, path17);
|
|
55051
55051
|
});
|
|
55052
55052
|
diagnosticsChannel.channel("undici:request:error").subscribe((evt) => {
|
|
55053
55053
|
const {
|
|
55054
|
-
request: { method, path:
|
|
55054
|
+
request: { method, path: path17, origin },
|
|
55055
55055
|
error: error49
|
|
55056
55056
|
} = evt;
|
|
55057
55057
|
debuglog(
|
|
55058
55058
|
"request to %s %s/%s errored - %s",
|
|
55059
55059
|
method,
|
|
55060
55060
|
origin,
|
|
55061
|
-
|
|
55061
|
+
path17,
|
|
55062
55062
|
error49.message
|
|
55063
55063
|
);
|
|
55064
55064
|
});
|
|
@@ -55107,9 +55107,9 @@ var require_diagnostics = __commonJS({
|
|
|
55107
55107
|
});
|
|
55108
55108
|
diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => {
|
|
55109
55109
|
const {
|
|
55110
|
-
request: { method, path:
|
|
55110
|
+
request: { method, path: path17, origin }
|
|
55111
55111
|
} = evt;
|
|
55112
|
-
debuglog("sending request to %s %s/%s", method, origin,
|
|
55112
|
+
debuglog("sending request to %s %s/%s", method, origin, path17);
|
|
55113
55113
|
});
|
|
55114
55114
|
}
|
|
55115
55115
|
diagnosticsChannel.channel("undici:websocket:open").subscribe((evt) => {
|
|
@@ -55172,7 +55172,7 @@ var require_request = __commonJS({
|
|
|
55172
55172
|
var kHandler = /* @__PURE__ */ Symbol("handler");
|
|
55173
55173
|
var Request = class {
|
|
55174
55174
|
constructor(origin, {
|
|
55175
|
-
path:
|
|
55175
|
+
path: path17,
|
|
55176
55176
|
method,
|
|
55177
55177
|
body,
|
|
55178
55178
|
headers,
|
|
@@ -55187,11 +55187,11 @@ var require_request = __commonJS({
|
|
|
55187
55187
|
expectContinue,
|
|
55188
55188
|
servername
|
|
55189
55189
|
}, handler) {
|
|
55190
|
-
if (typeof
|
|
55190
|
+
if (typeof path17 !== "string") {
|
|
55191
55191
|
throw new InvalidArgumentError2("path must be a string");
|
|
55192
|
-
} else if (
|
|
55192
|
+
} else if (path17[0] !== "/" && !(path17.startsWith("http://") || path17.startsWith("https://")) && method !== "CONNECT") {
|
|
55193
55193
|
throw new InvalidArgumentError2("path must be an absolute URL or start with a slash");
|
|
55194
|
-
} else if (invalidPathRegex.test(
|
|
55194
|
+
} else if (invalidPathRegex.test(path17)) {
|
|
55195
55195
|
throw new InvalidArgumentError2("invalid request path");
|
|
55196
55196
|
}
|
|
55197
55197
|
if (typeof method !== "string") {
|
|
@@ -55257,7 +55257,7 @@ var require_request = __commonJS({
|
|
|
55257
55257
|
this.completed = false;
|
|
55258
55258
|
this.aborted = false;
|
|
55259
55259
|
this.upgrade = upgrade || null;
|
|
55260
|
-
this.path = query ? buildURL(
|
|
55260
|
+
this.path = query ? buildURL(path17, query) : path17;
|
|
55261
55261
|
this.origin = origin;
|
|
55262
55262
|
this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent;
|
|
55263
55263
|
this.blocking = blocking == null ? false : blocking;
|
|
@@ -59783,7 +59783,7 @@ var require_client_h1 = __commonJS({
|
|
|
59783
59783
|
return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT";
|
|
59784
59784
|
}
|
|
59785
59785
|
function writeH1(client2, request) {
|
|
59786
|
-
const { method, path:
|
|
59786
|
+
const { method, path: path17, host, upgrade, blocking, reset } = request;
|
|
59787
59787
|
let { body, headers, contentLength } = request;
|
|
59788
59788
|
const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH";
|
|
59789
59789
|
if (util.isFormDataLike(body)) {
|
|
@@ -59849,7 +59849,7 @@ var require_client_h1 = __commonJS({
|
|
|
59849
59849
|
if (blocking) {
|
|
59850
59850
|
socket[kBlocking] = true;
|
|
59851
59851
|
}
|
|
59852
|
-
let header = `${method} ${
|
|
59852
|
+
let header = `${method} ${path17} HTTP/1.1\r
|
|
59853
59853
|
`;
|
|
59854
59854
|
if (typeof host === "string") {
|
|
59855
59855
|
header += `host: ${host}\r
|
|
@@ -60375,7 +60375,7 @@ var require_client_h2 = __commonJS({
|
|
|
60375
60375
|
}
|
|
60376
60376
|
function writeH2(client2, request) {
|
|
60377
60377
|
const session = client2[kHTTP2Session];
|
|
60378
|
-
const { method, path:
|
|
60378
|
+
const { method, path: path17, host, upgrade, expectContinue, signal, headers: reqHeaders } = request;
|
|
60379
60379
|
let { body } = request;
|
|
60380
60380
|
if (upgrade) {
|
|
60381
60381
|
util.errorRequest(client2, request, new Error("Upgrade not supported for H2"));
|
|
@@ -60442,7 +60442,7 @@ var require_client_h2 = __commonJS({
|
|
|
60442
60442
|
});
|
|
60443
60443
|
return true;
|
|
60444
60444
|
}
|
|
60445
|
-
headers[HTTP2_HEADER_PATH] =
|
|
60445
|
+
headers[HTTP2_HEADER_PATH] = path17;
|
|
60446
60446
|
headers[HTTP2_HEADER_SCHEME] = "https";
|
|
60447
60447
|
const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH";
|
|
60448
60448
|
if (body && typeof body.read === "function") {
|
|
@@ -60795,9 +60795,9 @@ var require_redirect_handler = __commonJS({
|
|
|
60795
60795
|
return this.handler.onHeaders(statusCode, headers, resume, statusText);
|
|
60796
60796
|
}
|
|
60797
60797
|
const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin)));
|
|
60798
|
-
const
|
|
60798
|
+
const path17 = search ? `${pathname}${search}` : pathname;
|
|
60799
60799
|
this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin);
|
|
60800
|
-
this.opts.path =
|
|
60800
|
+
this.opts.path = path17;
|
|
60801
60801
|
this.opts.origin = origin;
|
|
60802
60802
|
this.opts.maxRedirections = 0;
|
|
60803
60803
|
this.opts.query = null;
|
|
@@ -62032,10 +62032,10 @@ var require_proxy_agent = __commonJS({
|
|
|
62032
62032
|
};
|
|
62033
62033
|
const {
|
|
62034
62034
|
origin,
|
|
62035
|
-
path:
|
|
62035
|
+
path: path17 = "/",
|
|
62036
62036
|
headers = {}
|
|
62037
62037
|
} = opts;
|
|
62038
|
-
opts.path = origin +
|
|
62038
|
+
opts.path = origin + path17;
|
|
62039
62039
|
if (!("host" in headers) && !("Host" in headers)) {
|
|
62040
62040
|
const { host } = new URL2(origin);
|
|
62041
62041
|
headers.host = host;
|
|
@@ -63956,20 +63956,20 @@ var require_mock_utils = __commonJS({
|
|
|
63956
63956
|
}
|
|
63957
63957
|
return true;
|
|
63958
63958
|
}
|
|
63959
|
-
function safeUrl(
|
|
63960
|
-
if (typeof
|
|
63961
|
-
return
|
|
63959
|
+
function safeUrl(path17) {
|
|
63960
|
+
if (typeof path17 !== "string") {
|
|
63961
|
+
return path17;
|
|
63962
63962
|
}
|
|
63963
|
-
const pathSegments =
|
|
63963
|
+
const pathSegments = path17.split("?");
|
|
63964
63964
|
if (pathSegments.length !== 2) {
|
|
63965
|
-
return
|
|
63965
|
+
return path17;
|
|
63966
63966
|
}
|
|
63967
63967
|
const qp = new URLSearchParams(pathSegments.pop());
|
|
63968
63968
|
qp.sort();
|
|
63969
63969
|
return [...pathSegments, qp.toString()].join("?");
|
|
63970
63970
|
}
|
|
63971
|
-
function matchKey(mockDispatch2, { path:
|
|
63972
|
-
const pathMatch = matchValue(mockDispatch2.path,
|
|
63971
|
+
function matchKey(mockDispatch2, { path: path17, method, body, headers }) {
|
|
63972
|
+
const pathMatch = matchValue(mockDispatch2.path, path17);
|
|
63973
63973
|
const methodMatch = matchValue(mockDispatch2.method, method);
|
|
63974
63974
|
const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true;
|
|
63975
63975
|
const headersMatch = matchHeaders(mockDispatch2, headers);
|
|
@@ -63991,7 +63991,7 @@ var require_mock_utils = __commonJS({
|
|
|
63991
63991
|
function getMockDispatch(mockDispatches, key) {
|
|
63992
63992
|
const basePath = key.query ? buildURL(key.path, key.query) : key.path;
|
|
63993
63993
|
const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath;
|
|
63994
|
-
let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path:
|
|
63994
|
+
let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path17 }) => matchValue(safeUrl(path17), resolvedPath));
|
|
63995
63995
|
if (matchedMockDispatches.length === 0) {
|
|
63996
63996
|
throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`);
|
|
63997
63997
|
}
|
|
@@ -64029,9 +64029,9 @@ var require_mock_utils = __commonJS({
|
|
|
64029
64029
|
}
|
|
64030
64030
|
}
|
|
64031
64031
|
function buildKey(opts) {
|
|
64032
|
-
const { path:
|
|
64032
|
+
const { path: path17, method, body, headers, query } = opts;
|
|
64033
64033
|
return {
|
|
64034
|
-
path:
|
|
64034
|
+
path: path17,
|
|
64035
64035
|
method,
|
|
64036
64036
|
body,
|
|
64037
64037
|
headers,
|
|
@@ -64494,10 +64494,10 @@ var require_pending_interceptors_formatter = __commonJS({
|
|
|
64494
64494
|
}
|
|
64495
64495
|
format(pendingInterceptors) {
|
|
64496
64496
|
const withPrettyHeaders = pendingInterceptors.map(
|
|
64497
|
-
({ method, path:
|
|
64497
|
+
({ method, path: path17, data: { statusCode }, persist, times, timesInvoked, origin }) => ({
|
|
64498
64498
|
Method: method,
|
|
64499
64499
|
Origin: origin,
|
|
64500
|
-
Path:
|
|
64500
|
+
Path: path17,
|
|
64501
64501
|
"Status code": statusCode,
|
|
64502
64502
|
Persistent: persist ? PERSISTENT : NOT_PERSISTENT,
|
|
64503
64503
|
Invocations: timesInvoked,
|
|
@@ -69378,9 +69378,9 @@ var require_util7 = __commonJS({
|
|
|
69378
69378
|
}
|
|
69379
69379
|
}
|
|
69380
69380
|
}
|
|
69381
|
-
function validateCookiePath(
|
|
69382
|
-
for (let i = 0; i <
|
|
69383
|
-
const code =
|
|
69381
|
+
function validateCookiePath(path17) {
|
|
69382
|
+
for (let i = 0; i < path17.length; ++i) {
|
|
69383
|
+
const code = path17.charCodeAt(i);
|
|
69384
69384
|
if (code < 32 || // exclude CTLs (0-31)
|
|
69385
69385
|
code === 127 || // DEL
|
|
69386
69386
|
code === 59) {
|
|
@@ -72057,11 +72057,11 @@ var require_undici = __commonJS({
|
|
|
72057
72057
|
if (typeof opts.path !== "string") {
|
|
72058
72058
|
throw new InvalidArgumentError2("invalid opts.path");
|
|
72059
72059
|
}
|
|
72060
|
-
let
|
|
72060
|
+
let path17 = opts.path;
|
|
72061
72061
|
if (!opts.path.startsWith("/")) {
|
|
72062
|
-
|
|
72062
|
+
path17 = `/${path17}`;
|
|
72063
72063
|
}
|
|
72064
|
-
url2 = new URL(util.parseOrigin(url2).origin +
|
|
72064
|
+
url2 = new URL(util.parseOrigin(url2).origin + path17);
|
|
72065
72065
|
} else {
|
|
72066
72066
|
if (!opts) {
|
|
72067
72067
|
opts = typeof url2 === "object" ? url2 : {};
|
|
@@ -72429,7 +72429,7 @@ var require_ignore = __commonJS({
|
|
|
72429
72429
|
// path matching.
|
|
72430
72430
|
// - check `string` either `MODE_IGNORE` or `MODE_CHECK_IGNORE`
|
|
72431
72431
|
// @returns {TestResult} true if a file is ignored
|
|
72432
|
-
test(
|
|
72432
|
+
test(path17, checkUnignored, mode) {
|
|
72433
72433
|
let ignored = false;
|
|
72434
72434
|
let unignored = false;
|
|
72435
72435
|
let matchedRule;
|
|
@@ -72438,7 +72438,7 @@ var require_ignore = __commonJS({
|
|
|
72438
72438
|
if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) {
|
|
72439
72439
|
return;
|
|
72440
72440
|
}
|
|
72441
|
-
const matched = rule[mode].test(
|
|
72441
|
+
const matched = rule[mode].test(path17);
|
|
72442
72442
|
if (!matched) {
|
|
72443
72443
|
return;
|
|
72444
72444
|
}
|
|
@@ -72459,17 +72459,17 @@ var require_ignore = __commonJS({
|
|
|
72459
72459
|
var throwError = (message, Ctor) => {
|
|
72460
72460
|
throw new Ctor(message);
|
|
72461
72461
|
};
|
|
72462
|
-
var checkPath = (
|
|
72463
|
-
if (!isString(
|
|
72462
|
+
var checkPath = (path17, originalPath, doThrow) => {
|
|
72463
|
+
if (!isString(path17)) {
|
|
72464
72464
|
return doThrow(
|
|
72465
72465
|
`path must be a string, but got \`${originalPath}\``,
|
|
72466
72466
|
TypeError
|
|
72467
72467
|
);
|
|
72468
72468
|
}
|
|
72469
|
-
if (!
|
|
72469
|
+
if (!path17) {
|
|
72470
72470
|
return doThrow(`path must not be empty`, TypeError);
|
|
72471
72471
|
}
|
|
72472
|
-
if (checkPath.isNotRelative(
|
|
72472
|
+
if (checkPath.isNotRelative(path17)) {
|
|
72473
72473
|
const r = "`path.relative()`d";
|
|
72474
72474
|
return doThrow(
|
|
72475
72475
|
`path should be a ${r} string, but got "${originalPath}"`,
|
|
@@ -72478,7 +72478,7 @@ var require_ignore = __commonJS({
|
|
|
72478
72478
|
}
|
|
72479
72479
|
return true;
|
|
72480
72480
|
};
|
|
72481
|
-
var isNotRelative = (
|
|
72481
|
+
var isNotRelative = (path17) => REGEX_TEST_INVALID_PATH.test(path17);
|
|
72482
72482
|
checkPath.isNotRelative = isNotRelative;
|
|
72483
72483
|
checkPath.convert = (p2) => p2;
|
|
72484
72484
|
var Ignore = class {
|
|
@@ -72508,19 +72508,19 @@ var require_ignore = __commonJS({
|
|
|
72508
72508
|
}
|
|
72509
72509
|
// @returns {TestResult}
|
|
72510
72510
|
_test(originalPath, cache, checkUnignored, slices) {
|
|
72511
|
-
const
|
|
72511
|
+
const path17 = originalPath && checkPath.convert(originalPath);
|
|
72512
72512
|
checkPath(
|
|
72513
|
-
|
|
72513
|
+
path17,
|
|
72514
72514
|
originalPath,
|
|
72515
72515
|
this._strictPathCheck ? throwError : RETURN_FALSE
|
|
72516
72516
|
);
|
|
72517
|
-
return this._t(
|
|
72517
|
+
return this._t(path17, cache, checkUnignored, slices);
|
|
72518
72518
|
}
|
|
72519
|
-
checkIgnore(
|
|
72520
|
-
if (!REGEX_TEST_TRAILING_SLASH.test(
|
|
72521
|
-
return this.test(
|
|
72519
|
+
checkIgnore(path17) {
|
|
72520
|
+
if (!REGEX_TEST_TRAILING_SLASH.test(path17)) {
|
|
72521
|
+
return this.test(path17);
|
|
72522
72522
|
}
|
|
72523
|
-
const slices =
|
|
72523
|
+
const slices = path17.split(SLASH).filter(Boolean);
|
|
72524
72524
|
slices.pop();
|
|
72525
72525
|
if (slices.length) {
|
|
72526
72526
|
const parent = this._t(
|
|
@@ -72533,18 +72533,18 @@ var require_ignore = __commonJS({
|
|
|
72533
72533
|
return parent;
|
|
72534
72534
|
}
|
|
72535
72535
|
}
|
|
72536
|
-
return this._rules.test(
|
|
72536
|
+
return this._rules.test(path17, false, MODE_CHECK_IGNORE);
|
|
72537
72537
|
}
|
|
72538
|
-
_t(
|
|
72539
|
-
if (
|
|
72540
|
-
return cache[
|
|
72538
|
+
_t(path17, cache, checkUnignored, slices) {
|
|
72539
|
+
if (path17 in cache) {
|
|
72540
|
+
return cache[path17];
|
|
72541
72541
|
}
|
|
72542
72542
|
if (!slices) {
|
|
72543
|
-
slices =
|
|
72543
|
+
slices = path17.split(SLASH).filter(Boolean);
|
|
72544
72544
|
}
|
|
72545
72545
|
slices.pop();
|
|
72546
72546
|
if (!slices.length) {
|
|
72547
|
-
return cache[
|
|
72547
|
+
return cache[path17] = this._rules.test(path17, checkUnignored, MODE_IGNORE);
|
|
72548
72548
|
}
|
|
72549
72549
|
const parent = this._t(
|
|
72550
72550
|
slices.join(SLASH) + SLASH,
|
|
@@ -72552,29 +72552,29 @@ var require_ignore = __commonJS({
|
|
|
72552
72552
|
checkUnignored,
|
|
72553
72553
|
slices
|
|
72554
72554
|
);
|
|
72555
|
-
return cache[
|
|
72555
|
+
return cache[path17] = parent.ignored ? parent : this._rules.test(path17, checkUnignored, MODE_IGNORE);
|
|
72556
72556
|
}
|
|
72557
|
-
ignores(
|
|
72558
|
-
return this._test(
|
|
72557
|
+
ignores(path17) {
|
|
72558
|
+
return this._test(path17, this._ignoreCache, false).ignored;
|
|
72559
72559
|
}
|
|
72560
72560
|
createFilter() {
|
|
72561
|
-
return (
|
|
72561
|
+
return (path17) => !this.ignores(path17);
|
|
72562
72562
|
}
|
|
72563
72563
|
filter(paths) {
|
|
72564
72564
|
return makeArray(paths).filter(this.createFilter());
|
|
72565
72565
|
}
|
|
72566
72566
|
// @returns {TestResult}
|
|
72567
|
-
test(
|
|
72568
|
-
return this._test(
|
|
72567
|
+
test(path17) {
|
|
72568
|
+
return this._test(path17, this._testCache, true);
|
|
72569
72569
|
}
|
|
72570
72570
|
};
|
|
72571
72571
|
var factory = (options) => new Ignore(options);
|
|
72572
|
-
var isPathValid = (
|
|
72572
|
+
var isPathValid = (path17) => checkPath(path17 && checkPath.convert(path17), path17, RETURN_FALSE);
|
|
72573
72573
|
var setupWindows = () => {
|
|
72574
72574
|
const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/");
|
|
72575
72575
|
checkPath.convert = makePosix;
|
|
72576
72576
|
const REGEX_TEST_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
|
|
72577
|
-
checkPath.isNotRelative = (
|
|
72577
|
+
checkPath.isNotRelative = (path17) => REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path17) || isNotRelative(path17);
|
|
72578
72578
|
};
|
|
72579
72579
|
if (
|
|
72580
72580
|
// Detect `process` so that it can run in browsers.
|
|
@@ -73590,8 +73590,8 @@ var require_package = __commonJS({
|
|
|
73590
73590
|
var require_ejs = __commonJS({
|
|
73591
73591
|
"node_modules/ejs/lib/ejs.js"(exports) {
|
|
73592
73592
|
"use strict";
|
|
73593
|
-
var
|
|
73594
|
-
var
|
|
73593
|
+
var fs21 = __require("fs");
|
|
73594
|
+
var path17 = __require("path");
|
|
73595
73595
|
var utils = require_utils5();
|
|
73596
73596
|
var scopeOptionWarned = false;
|
|
73597
73597
|
var _VERSION_STRING = require_package().version;
|
|
@@ -73618,13 +73618,13 @@ var require_ejs = __commonJS({
|
|
|
73618
73618
|
var _BOM = /^\uFEFF/;
|
|
73619
73619
|
var _JS_IDENTIFIER = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/;
|
|
73620
73620
|
exports.cache = utils.cache;
|
|
73621
|
-
exports.fileLoader =
|
|
73621
|
+
exports.fileLoader = fs21.readFileSync;
|
|
73622
73622
|
exports.localsName = _DEFAULT_LOCALS_NAME;
|
|
73623
73623
|
exports.promiseImpl = new Function("return this;")().Promise;
|
|
73624
73624
|
exports.resolveInclude = function(name, filename, isDir) {
|
|
73625
|
-
var dirname2 =
|
|
73626
|
-
var extname =
|
|
73627
|
-
var resolve3 =
|
|
73625
|
+
var dirname2 = path17.dirname;
|
|
73626
|
+
var extname = path17.extname;
|
|
73627
|
+
var resolve3 = path17.resolve;
|
|
73628
73628
|
var includePath = resolve3(isDir ? filename : dirname2(filename), name);
|
|
73629
73629
|
var ext = extname(name);
|
|
73630
73630
|
if (!ext) {
|
|
@@ -73636,35 +73636,35 @@ var require_ejs = __commonJS({
|
|
|
73636
73636
|
var filePath;
|
|
73637
73637
|
if (paths.some(function(v2) {
|
|
73638
73638
|
filePath = exports.resolveInclude(name, v2, true);
|
|
73639
|
-
return
|
|
73639
|
+
return fs21.existsSync(filePath);
|
|
73640
73640
|
})) {
|
|
73641
73641
|
return filePath;
|
|
73642
73642
|
}
|
|
73643
73643
|
}
|
|
73644
|
-
function getIncludePath(
|
|
73644
|
+
function getIncludePath(path18, options) {
|
|
73645
73645
|
var includePath;
|
|
73646
73646
|
var filePath;
|
|
73647
73647
|
var views = options.views;
|
|
73648
|
-
var match = /^[A-Za-z]+:\\|^\//.exec(
|
|
73648
|
+
var match = /^[A-Za-z]+:\\|^\//.exec(path18);
|
|
73649
73649
|
if (match && match.length) {
|
|
73650
|
-
|
|
73650
|
+
path18 = path18.replace(/^\/*/, "");
|
|
73651
73651
|
if (Array.isArray(options.root)) {
|
|
73652
|
-
includePath = resolvePaths(
|
|
73652
|
+
includePath = resolvePaths(path18, options.root);
|
|
73653
73653
|
} else {
|
|
73654
|
-
includePath = exports.resolveInclude(
|
|
73654
|
+
includePath = exports.resolveInclude(path18, options.root || "/", true);
|
|
73655
73655
|
}
|
|
73656
73656
|
} else {
|
|
73657
73657
|
if (options.filename) {
|
|
73658
|
-
filePath = exports.resolveInclude(
|
|
73659
|
-
if (
|
|
73658
|
+
filePath = exports.resolveInclude(path18, options.filename);
|
|
73659
|
+
if (fs21.existsSync(filePath)) {
|
|
73660
73660
|
includePath = filePath;
|
|
73661
73661
|
}
|
|
73662
73662
|
}
|
|
73663
73663
|
if (!includePath && Array.isArray(views)) {
|
|
73664
|
-
includePath = resolvePaths(
|
|
73664
|
+
includePath = resolvePaths(path18, views);
|
|
73665
73665
|
}
|
|
73666
73666
|
if (!includePath && typeof options.includer !== "function") {
|
|
73667
|
-
throw new Error('Could not find the include file "' + options.escapeFunction(
|
|
73667
|
+
throw new Error('Could not find the include file "' + options.escapeFunction(path18) + '"');
|
|
73668
73668
|
}
|
|
73669
73669
|
}
|
|
73670
73670
|
return includePath;
|
|
@@ -73723,11 +73723,11 @@ var require_ejs = __commonJS({
|
|
|
73723
73723
|
function fileLoader(filePath) {
|
|
73724
73724
|
return exports.fileLoader(filePath);
|
|
73725
73725
|
}
|
|
73726
|
-
function includeFile(
|
|
73726
|
+
function includeFile(path18, options) {
|
|
73727
73727
|
var opts = utils.shallowCopy(utils.createNullProtoObjWherePossible(), options);
|
|
73728
|
-
opts.filename = getIncludePath(
|
|
73728
|
+
opts.filename = getIncludePath(path18, opts);
|
|
73729
73729
|
if (typeof options.includer === "function") {
|
|
73730
|
-
var includerResult = options.includer(
|
|
73730
|
+
var includerResult = options.includer(path18, opts.filename);
|
|
73731
73731
|
if (includerResult) {
|
|
73732
73732
|
if (includerResult.filename) {
|
|
73733
73733
|
opts.filename = includerResult.filename;
|
|
@@ -73962,12 +73962,12 @@ var require_ejs = __commonJS({
|
|
|
73962
73962
|
throw e;
|
|
73963
73963
|
}
|
|
73964
73964
|
var returnedFn = opts.client ? fn2 : function anonymous(data) {
|
|
73965
|
-
var include = function(
|
|
73965
|
+
var include = function(path18, includeData) {
|
|
73966
73966
|
var d = utils.shallowCopy(utils.createNullProtoObjWherePossible(), data);
|
|
73967
73967
|
if (includeData) {
|
|
73968
73968
|
d = utils.shallowCopy(d, includeData);
|
|
73969
73969
|
}
|
|
73970
|
-
return includeFile(
|
|
73970
|
+
return includeFile(path18, opts)(d);
|
|
73971
73971
|
};
|
|
73972
73972
|
return fn2.apply(
|
|
73973
73973
|
opts.context,
|
|
@@ -73976,7 +73976,7 @@ var require_ejs = __commonJS({
|
|
|
73976
73976
|
};
|
|
73977
73977
|
if (opts.filename && typeof Object.defineProperty === "function") {
|
|
73978
73978
|
var filename = opts.filename;
|
|
73979
|
-
var basename =
|
|
73979
|
+
var basename = path17.basename(filename, path17.extname(filename));
|
|
73980
73980
|
try {
|
|
73981
73981
|
Object.defineProperty(returnedFn, "name", {
|
|
73982
73982
|
value: basename,
|
|
@@ -74140,8 +74140,8 @@ var require_ejs = __commonJS({
|
|
|
74140
74140
|
var require_tail = __commonJS({
|
|
74141
74141
|
"node_modules/tail/lib/tail.js"(exports) {
|
|
74142
74142
|
var events = __require("events");
|
|
74143
|
-
var
|
|
74144
|
-
var
|
|
74143
|
+
var fs21 = __require("fs");
|
|
74144
|
+
var path17 = __require("path");
|
|
74145
74145
|
var devNull = class {
|
|
74146
74146
|
info() {
|
|
74147
74147
|
}
|
|
@@ -74152,7 +74152,7 @@ var require_tail = __commonJS({
|
|
|
74152
74152
|
constructor(filename, options = {}) {
|
|
74153
74153
|
super();
|
|
74154
74154
|
this.filename = filename;
|
|
74155
|
-
this.absPath =
|
|
74155
|
+
this.absPath = path17.dirname(this.filename);
|
|
74156
74156
|
this.separator = options.separator !== void 0 ? options.separator : /[\r]{0,1}\n/;
|
|
74157
74157
|
this.fsWatchOptions = options.fsWatchOptions || {};
|
|
74158
74158
|
this.follow = options["follow"] != void 0 ? options["follow"] : true;
|
|
@@ -74166,7 +74166,7 @@ var require_tail = __commonJS({
|
|
|
74166
74166
|
this.logger.info(`filename: ${this.filename}`);
|
|
74167
74167
|
this.logger.info(`encoding: ${this.encoding}`);
|
|
74168
74168
|
try {
|
|
74169
|
-
|
|
74169
|
+
fs21.accessSync(this.filename, fs21.constants.F_OK);
|
|
74170
74170
|
} catch (err) {
|
|
74171
74171
|
if (err.code == "ENOENT") {
|
|
74172
74172
|
throw err;
|
|
@@ -74241,11 +74241,11 @@ var require_tail = __commonJS({
|
|
|
74241
74241
|
* @returns {number}
|
|
74242
74242
|
*/
|
|
74243
74243
|
getPositionAtNthLine(nLines) {
|
|
74244
|
-
const { size } =
|
|
74244
|
+
const { size } = fs21.statSync(this.filename);
|
|
74245
74245
|
if (size === 0) {
|
|
74246
74246
|
return 0;
|
|
74247
74247
|
}
|
|
74248
|
-
const fd =
|
|
74248
|
+
const fd = fs21.openSync(this.filename, "r");
|
|
74249
74249
|
let currentReadPosition = size;
|
|
74250
74250
|
const chunkSizeBytes = Math.min(1024, size);
|
|
74251
74251
|
const lineBytes = [];
|
|
@@ -74256,7 +74256,7 @@ var require_tail = __commonJS({
|
|
|
74256
74256
|
return 0;
|
|
74257
74257
|
}
|
|
74258
74258
|
const buffer = Buffer.alloc(chunkSizeBytes);
|
|
74259
|
-
const bytesRead =
|
|
74259
|
+
const bytesRead = fs21.readSync(
|
|
74260
74260
|
fd,
|
|
74261
74261
|
buffer,
|
|
74262
74262
|
0,
|
|
@@ -74276,12 +74276,12 @@ var require_tail = __commonJS({
|
|
|
74276
74276
|
index = this.getIndexOfLastLine(remaining);
|
|
74277
74277
|
}
|
|
74278
74278
|
}
|
|
74279
|
-
|
|
74279
|
+
fs21.closeSync(fd);
|
|
74280
74280
|
return size - lineBytes.reduce((acc, cur) => acc + cur, 0);
|
|
74281
74281
|
}
|
|
74282
74282
|
latestPosition() {
|
|
74283
74283
|
try {
|
|
74284
|
-
return
|
|
74284
|
+
return fs21.statSync(this.filename).size;
|
|
74285
74285
|
} catch (err) {
|
|
74286
74286
|
this.logger.error(`size check for ${this.filename} failed: ${err}`);
|
|
74287
74287
|
this.emit("error", `size check for ${this.filename} failed: ${err}`);
|
|
@@ -74292,7 +74292,7 @@ var require_tail = __commonJS({
|
|
|
74292
74292
|
if (this.queue.length >= 1) {
|
|
74293
74293
|
const block = this.queue[0];
|
|
74294
74294
|
if (block.end > block.start) {
|
|
74295
|
-
let stream =
|
|
74295
|
+
let stream = fs21.createReadStream(this.filename, { start: block.start, end: block.end - 1, encoding: this.encoding });
|
|
74296
74296
|
stream.on("error", (error49) => {
|
|
74297
74297
|
this.logger.error(`Tail error: ${error49}`);
|
|
74298
74298
|
this.emit("error", error49);
|
|
@@ -74336,19 +74336,19 @@ var require_tail = __commonJS({
|
|
|
74336
74336
|
}
|
|
74337
74337
|
watch(startingCursor, flush) {
|
|
74338
74338
|
if (this.isWatching) return;
|
|
74339
|
-
this.logger.info(`filesystem.watch present? ${
|
|
74339
|
+
this.logger.info(`filesystem.watch present? ${fs21.watch != void 0}`);
|
|
74340
74340
|
this.logger.info(`useWatchFile: ${this.useWatchFile}`);
|
|
74341
74341
|
this.isWatching = true;
|
|
74342
74342
|
this.currentCursorPos = startingCursor;
|
|
74343
74343
|
if (flush) this.change();
|
|
74344
|
-
if (!this.useWatchFile &&
|
|
74344
|
+
if (!this.useWatchFile && fs21.watch) {
|
|
74345
74345
|
this.logger.info(`watch strategy: watch`);
|
|
74346
|
-
this.watcher =
|
|
74346
|
+
this.watcher = fs21.watch(this.filename, this.fsWatchOptions, (e, filename) => {
|
|
74347
74347
|
this.watchEvent(e, filename);
|
|
74348
74348
|
});
|
|
74349
74349
|
} else {
|
|
74350
74350
|
this.logger.info(`watch strategy: watchFile`);
|
|
74351
|
-
|
|
74351
|
+
fs21.watchFile(this.filename, this.fsWatchOptions, (curr, prev) => {
|
|
74352
74352
|
this.watchFileEvent(curr, prev);
|
|
74353
74353
|
});
|
|
74354
74354
|
}
|
|
@@ -74357,7 +74357,7 @@ var require_tail = __commonJS({
|
|
|
74357
74357
|
if (filename === void 0 || filename !== this.filename) {
|
|
74358
74358
|
this.unwatch();
|
|
74359
74359
|
if (this.follow) {
|
|
74360
|
-
this.filename =
|
|
74360
|
+
this.filename = path17.join(this.absPath, filename);
|
|
74361
74361
|
this.rewatchId = setTimeout((() => {
|
|
74362
74362
|
try {
|
|
74363
74363
|
this.watch(this.currentCursorPos);
|
|
@@ -74398,7 +74398,7 @@ var require_tail = __commonJS({
|
|
|
74398
74398
|
if (this.watcher) {
|
|
74399
74399
|
this.watcher.close();
|
|
74400
74400
|
} else {
|
|
74401
|
-
|
|
74401
|
+
fs21.unwatchFile(this.filename);
|
|
74402
74402
|
}
|
|
74403
74403
|
if (this.rewatchId) {
|
|
74404
74404
|
clearTimeout(this.rewatchId);
|
|
@@ -74486,9 +74486,9 @@ var require_package2 = __commonJS({
|
|
|
74486
74486
|
// node_modules/dotenv/lib/main.js
|
|
74487
74487
|
var require_main = __commonJS({
|
|
74488
74488
|
"node_modules/dotenv/lib/main.js"(exports, module) {
|
|
74489
|
-
var
|
|
74490
|
-
var
|
|
74491
|
-
var
|
|
74489
|
+
var fs21 = __require("fs");
|
|
74490
|
+
var path17 = __require("path");
|
|
74491
|
+
var os9 = __require("os");
|
|
74492
74492
|
var crypto2 = __require("crypto");
|
|
74493
74493
|
var packageJson = require_package2();
|
|
74494
74494
|
var version4 = packageJson.version;
|
|
@@ -74595,7 +74595,7 @@ var require_main = __commonJS({
|
|
|
74595
74595
|
if (options && options.path && options.path.length > 0) {
|
|
74596
74596
|
if (Array.isArray(options.path)) {
|
|
74597
74597
|
for (const filepath of options.path) {
|
|
74598
|
-
if (
|
|
74598
|
+
if (fs21.existsSync(filepath)) {
|
|
74599
74599
|
possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
|
|
74600
74600
|
}
|
|
74601
74601
|
}
|
|
@@ -74603,15 +74603,15 @@ var require_main = __commonJS({
|
|
|
74603
74603
|
possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
|
|
74604
74604
|
}
|
|
74605
74605
|
} else {
|
|
74606
|
-
possibleVaultPath =
|
|
74606
|
+
possibleVaultPath = path17.resolve(process.cwd(), ".env.vault");
|
|
74607
74607
|
}
|
|
74608
|
-
if (
|
|
74608
|
+
if (fs21.existsSync(possibleVaultPath)) {
|
|
74609
74609
|
return possibleVaultPath;
|
|
74610
74610
|
}
|
|
74611
74611
|
return null;
|
|
74612
74612
|
}
|
|
74613
74613
|
function _resolveHome(envPath) {
|
|
74614
|
-
return envPath[0] === "~" ?
|
|
74614
|
+
return envPath[0] === "~" ? path17.join(os9.homedir(), envPath.slice(1)) : envPath;
|
|
74615
74615
|
}
|
|
74616
74616
|
function _configVault(options) {
|
|
74617
74617
|
const debug = Boolean(options && options.debug);
|
|
@@ -74628,7 +74628,7 @@ var require_main = __commonJS({
|
|
|
74628
74628
|
return { parsed };
|
|
74629
74629
|
}
|
|
74630
74630
|
function configDotenv(options) {
|
|
74631
|
-
const dotenvPath =
|
|
74631
|
+
const dotenvPath = path17.resolve(process.cwd(), ".env");
|
|
74632
74632
|
let encoding = "utf8";
|
|
74633
74633
|
const debug = Boolean(options && options.debug);
|
|
74634
74634
|
const quiet = options && "quiet" in options ? options.quiet : true;
|
|
@@ -74652,13 +74652,13 @@ var require_main = __commonJS({
|
|
|
74652
74652
|
}
|
|
74653
74653
|
let lastError;
|
|
74654
74654
|
const parsedAll = {};
|
|
74655
|
-
for (const
|
|
74655
|
+
for (const path18 of optionPaths) {
|
|
74656
74656
|
try {
|
|
74657
|
-
const parsed = DotenvModule.parse(
|
|
74657
|
+
const parsed = DotenvModule.parse(fs21.readFileSync(path18, { encoding }));
|
|
74658
74658
|
DotenvModule.populate(parsedAll, parsed, options);
|
|
74659
74659
|
} catch (e) {
|
|
74660
74660
|
if (debug) {
|
|
74661
|
-
_debug(`Failed to load ${
|
|
74661
|
+
_debug(`Failed to load ${path18} ${e.message}`);
|
|
74662
74662
|
}
|
|
74663
74663
|
lastError = e;
|
|
74664
74664
|
}
|
|
@@ -74673,7 +74673,7 @@ var require_main = __commonJS({
|
|
|
74673
74673
|
const shortPaths = [];
|
|
74674
74674
|
for (const filePath of optionPaths) {
|
|
74675
74675
|
try {
|
|
74676
|
-
const relative =
|
|
74676
|
+
const relative = path17.relative(process.cwd(), filePath);
|
|
74677
74677
|
shortPaths.push(relative);
|
|
74678
74678
|
} catch (e) {
|
|
74679
74679
|
if (debug) {
|
|
@@ -74777,7 +74777,7 @@ var require_main = __commonJS({
|
|
|
74777
74777
|
var require_constants6 = __commonJS({
|
|
74778
74778
|
"node_modules/readdirp/node_modules/picomatch/lib/constants.js"(exports, module) {
|
|
74779
74779
|
"use strict";
|
|
74780
|
-
var
|
|
74780
|
+
var path17 = __require("path");
|
|
74781
74781
|
var WIN_SLASH = "\\\\/";
|
|
74782
74782
|
var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
74783
74783
|
var DEFAULT_MAX_EXTGLOB_RECURSION = 0;
|
|
@@ -74951,7 +74951,7 @@ var require_constants6 = __commonJS({
|
|
|
74951
74951
|
/* | */
|
|
74952
74952
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
|
|
74953
74953
|
/* \uFEFF */
|
|
74954
|
-
SEP:
|
|
74954
|
+
SEP: path17.sep,
|
|
74955
74955
|
/**
|
|
74956
74956
|
* Create EXTGLOB_CHARS
|
|
74957
74957
|
*/
|
|
@@ -74978,7 +74978,7 @@ var require_constants6 = __commonJS({
|
|
|
74978
74978
|
var require_utils6 = __commonJS({
|
|
74979
74979
|
"node_modules/readdirp/node_modules/picomatch/lib/utils.js"(exports) {
|
|
74980
74980
|
"use strict";
|
|
74981
|
-
var
|
|
74981
|
+
var path17 = __require("path");
|
|
74982
74982
|
var win32 = process.platform === "win32";
|
|
74983
74983
|
var {
|
|
74984
74984
|
REGEX_BACKSLASH,
|
|
@@ -75007,7 +75007,7 @@ var require_utils6 = __commonJS({
|
|
|
75007
75007
|
if (options && typeof options.windows === "boolean") {
|
|
75008
75008
|
return options.windows;
|
|
75009
75009
|
}
|
|
75010
|
-
return win32 === true ||
|
|
75010
|
+
return win32 === true || path17.sep === "\\";
|
|
75011
75011
|
};
|
|
75012
75012
|
exports.escapeLast = (input, char, lastIdx) => {
|
|
75013
75013
|
const idx = input.lastIndexOf(char, lastIdx);
|
|
@@ -76371,7 +76371,7 @@ var require_parse3 = __commonJS({
|
|
|
76371
76371
|
var require_picomatch = __commonJS({
|
|
76372
76372
|
"node_modules/readdirp/node_modules/picomatch/lib/picomatch.js"(exports, module) {
|
|
76373
76373
|
"use strict";
|
|
76374
|
-
var
|
|
76374
|
+
var path17 = __require("path");
|
|
76375
76375
|
var scan = require_scan2();
|
|
76376
76376
|
var parse4 = require_parse3();
|
|
76377
76377
|
var utils = require_utils6();
|
|
@@ -76456,7 +76456,7 @@ var require_picomatch = __commonJS({
|
|
|
76456
76456
|
};
|
|
76457
76457
|
picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
|
|
76458
76458
|
const regex2 = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
|
|
76459
|
-
return regex2.test(
|
|
76459
|
+
return regex2.test(path17.basename(input));
|
|
76460
76460
|
};
|
|
76461
76461
|
picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
|
76462
76462
|
picomatch.parse = (pattern, options) => {
|
|
@@ -76520,15 +76520,15 @@ var require_picomatch2 = __commonJS({
|
|
|
76520
76520
|
var require_readdirp = __commonJS({
|
|
76521
76521
|
"node_modules/readdirp/index.js"(exports, module) {
|
|
76522
76522
|
"use strict";
|
|
76523
|
-
var
|
|
76523
|
+
var fs21 = __require("fs");
|
|
76524
76524
|
var { Readable } = __require("stream");
|
|
76525
76525
|
var sysPath = __require("path");
|
|
76526
76526
|
var { promisify } = __require("util");
|
|
76527
76527
|
var picomatch = require_picomatch2();
|
|
76528
|
-
var readdir = promisify(
|
|
76529
|
-
var stat = promisify(
|
|
76530
|
-
var lstat = promisify(
|
|
76531
|
-
var realpath = promisify(
|
|
76528
|
+
var readdir = promisify(fs21.readdir);
|
|
76529
|
+
var stat = promisify(fs21.stat);
|
|
76530
|
+
var lstat = promisify(fs21.lstat);
|
|
76531
|
+
var realpath = promisify(fs21.realpath);
|
|
76532
76532
|
var BANG = "!";
|
|
76533
76533
|
var RECURSIVE_ERROR_CODE = "READDIRP_RECURSIVE_ERROR";
|
|
76534
76534
|
var NORMAL_FLOW_ERRORS = /* @__PURE__ */ new Set(["ENOENT", "EPERM", "EACCES", "ELOOP", RECURSIVE_ERROR_CODE]);
|
|
@@ -76572,8 +76572,8 @@ var require_readdirp = __commonJS({
|
|
|
76572
76572
|
return {
|
|
76573
76573
|
root: ".",
|
|
76574
76574
|
/* eslint-disable no-unused-vars */
|
|
76575
|
-
fileFilter: (
|
|
76576
|
-
directoryFilter: (
|
|
76575
|
+
fileFilter: (path17) => true,
|
|
76576
|
+
directoryFilter: (path17) => true,
|
|
76577
76577
|
/* eslint-enable no-unused-vars */
|
|
76578
76578
|
type: FILE_TYPE,
|
|
76579
76579
|
lstat: false,
|
|
@@ -76593,7 +76593,7 @@ var require_readdirp = __commonJS({
|
|
|
76593
76593
|
this._directoryFilter = normalizeFilter(opts.directoryFilter);
|
|
76594
76594
|
const statMethod = opts.lstat ? lstat : stat;
|
|
76595
76595
|
if (wantBigintFsStats) {
|
|
76596
|
-
this._stat = (
|
|
76596
|
+
this._stat = (path17) => statMethod(path17, { bigint: true });
|
|
76597
76597
|
} else {
|
|
76598
76598
|
this._stat = statMethod;
|
|
76599
76599
|
}
|
|
@@ -76602,7 +76602,7 @@ var require_readdirp = __commonJS({
|
|
|
76602
76602
|
this._wantsFile = [FILE_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE].includes(type);
|
|
76603
76603
|
this._wantsEverything = type === EVERYTHING_TYPE;
|
|
76604
76604
|
this._root = sysPath.resolve(root);
|
|
76605
|
-
this._isDirent = "Dirent" in
|
|
76605
|
+
this._isDirent = "Dirent" in fs21 && !opts.alwaysStat;
|
|
76606
76606
|
this._statsProp = this._isDirent ? "dirent" : "stats";
|
|
76607
76607
|
this._rdOptions = { encoding: "utf8", withFileTypes: this._isDirent };
|
|
76608
76608
|
this.parents = [this._exploreDir(root, 1)];
|
|
@@ -76614,9 +76614,9 @@ var require_readdirp = __commonJS({
|
|
|
76614
76614
|
this.reading = true;
|
|
76615
76615
|
try {
|
|
76616
76616
|
while (!this.destroyed && batch > 0) {
|
|
76617
|
-
const { path:
|
|
76617
|
+
const { path: path17, depth, files = [] } = this.parent || {};
|
|
76618
76618
|
if (files.length > 0) {
|
|
76619
|
-
const slice = files.splice(0, batch).map((dirent) => this._formatEntry(dirent,
|
|
76619
|
+
const slice = files.splice(0, batch).map((dirent) => this._formatEntry(dirent, path17));
|
|
76620
76620
|
for (const entry of await Promise.all(slice)) {
|
|
76621
76621
|
if (this.destroyed) return;
|
|
76622
76622
|
const entryType = await this._getEntryType(entry);
|
|
@@ -76651,20 +76651,20 @@ var require_readdirp = __commonJS({
|
|
|
76651
76651
|
this.reading = false;
|
|
76652
76652
|
}
|
|
76653
76653
|
}
|
|
76654
|
-
async _exploreDir(
|
|
76654
|
+
async _exploreDir(path17, depth) {
|
|
76655
76655
|
let files;
|
|
76656
76656
|
try {
|
|
76657
|
-
files = await readdir(
|
|
76657
|
+
files = await readdir(path17, this._rdOptions);
|
|
76658
76658
|
} catch (error49) {
|
|
76659
76659
|
this._onError(error49);
|
|
76660
76660
|
}
|
|
76661
|
-
return { files, depth, path:
|
|
76661
|
+
return { files, depth, path: path17 };
|
|
76662
76662
|
}
|
|
76663
|
-
async _formatEntry(dirent,
|
|
76663
|
+
async _formatEntry(dirent, path17) {
|
|
76664
76664
|
let entry;
|
|
76665
76665
|
try {
|
|
76666
76666
|
const basename = this._isDirent ? dirent.name : dirent;
|
|
76667
|
-
const fullPath = sysPath.resolve(sysPath.join(
|
|
76667
|
+
const fullPath = sysPath.resolve(sysPath.join(path17, basename));
|
|
76668
76668
|
entry = { path: sysPath.relative(this._root, fullPath), fullPath, basename };
|
|
76669
76669
|
entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);
|
|
76670
76670
|
} catch (err) {
|
|
@@ -76750,7 +76750,7 @@ var require_readdirp = __commonJS({
|
|
|
76750
76750
|
var require_constants7 = __commonJS({
|
|
76751
76751
|
"node_modules/anymatch/node_modules/picomatch/lib/constants.js"(exports, module) {
|
|
76752
76752
|
"use strict";
|
|
76753
|
-
var
|
|
76753
|
+
var path17 = __require("path");
|
|
76754
76754
|
var WIN_SLASH = "\\\\/";
|
|
76755
76755
|
var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
76756
76756
|
var DEFAULT_MAX_EXTGLOB_RECURSION = 0;
|
|
@@ -76924,7 +76924,7 @@ var require_constants7 = __commonJS({
|
|
|
76924
76924
|
/* | */
|
|
76925
76925
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
|
|
76926
76926
|
/* \uFEFF */
|
|
76927
|
-
SEP:
|
|
76927
|
+
SEP: path17.sep,
|
|
76928
76928
|
/**
|
|
76929
76929
|
* Create EXTGLOB_CHARS
|
|
76930
76930
|
*/
|
|
@@ -76951,7 +76951,7 @@ var require_constants7 = __commonJS({
|
|
|
76951
76951
|
var require_utils7 = __commonJS({
|
|
76952
76952
|
"node_modules/anymatch/node_modules/picomatch/lib/utils.js"(exports) {
|
|
76953
76953
|
"use strict";
|
|
76954
|
-
var
|
|
76954
|
+
var path17 = __require("path");
|
|
76955
76955
|
var win32 = process.platform === "win32";
|
|
76956
76956
|
var {
|
|
76957
76957
|
REGEX_BACKSLASH,
|
|
@@ -76980,7 +76980,7 @@ var require_utils7 = __commonJS({
|
|
|
76980
76980
|
if (options && typeof options.windows === "boolean") {
|
|
76981
76981
|
return options.windows;
|
|
76982
76982
|
}
|
|
76983
|
-
return win32 === true ||
|
|
76983
|
+
return win32 === true || path17.sep === "\\";
|
|
76984
76984
|
};
|
|
76985
76985
|
exports.escapeLast = (input, char, lastIdx) => {
|
|
76986
76986
|
const idx = input.lastIndexOf(char, lastIdx);
|
|
@@ -78344,7 +78344,7 @@ var require_parse4 = __commonJS({
|
|
|
78344
78344
|
var require_picomatch3 = __commonJS({
|
|
78345
78345
|
"node_modules/anymatch/node_modules/picomatch/lib/picomatch.js"(exports, module) {
|
|
78346
78346
|
"use strict";
|
|
78347
|
-
var
|
|
78347
|
+
var path17 = __require("path");
|
|
78348
78348
|
var scan = require_scan3();
|
|
78349
78349
|
var parse4 = require_parse4();
|
|
78350
78350
|
var utils = require_utils7();
|
|
@@ -78429,7 +78429,7 @@ var require_picomatch3 = __commonJS({
|
|
|
78429
78429
|
};
|
|
78430
78430
|
picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
|
|
78431
78431
|
const regex2 = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
|
|
78432
|
-
return regex2.test(
|
|
78432
|
+
return regex2.test(path17.basename(input));
|
|
78433
78433
|
};
|
|
78434
78434
|
picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
|
78435
78435
|
picomatch.parse = (pattern, options) => {
|
|
@@ -78492,22 +78492,22 @@ var require_picomatch4 = __commonJS({
|
|
|
78492
78492
|
// node_modules/normalize-path/index.js
|
|
78493
78493
|
var require_normalize_path = __commonJS({
|
|
78494
78494
|
"node_modules/normalize-path/index.js"(exports, module) {
|
|
78495
|
-
module.exports = function(
|
|
78496
|
-
if (typeof
|
|
78495
|
+
module.exports = function(path17, stripTrailing) {
|
|
78496
|
+
if (typeof path17 !== "string") {
|
|
78497
78497
|
throw new TypeError("expected path to be a string");
|
|
78498
78498
|
}
|
|
78499
|
-
if (
|
|
78500
|
-
var len =
|
|
78501
|
-
if (len <= 1) return
|
|
78499
|
+
if (path17 === "\\" || path17 === "/") return "/";
|
|
78500
|
+
var len = path17.length;
|
|
78501
|
+
if (len <= 1) return path17;
|
|
78502
78502
|
var prefix = "";
|
|
78503
|
-
if (len > 4 &&
|
|
78504
|
-
var ch =
|
|
78505
|
-
if ((ch === "?" || ch === ".") &&
|
|
78506
|
-
|
|
78503
|
+
if (len > 4 && path17[3] === "\\") {
|
|
78504
|
+
var ch = path17[2];
|
|
78505
|
+
if ((ch === "?" || ch === ".") && path17.slice(0, 2) === "\\\\") {
|
|
78506
|
+
path17 = path17.slice(2);
|
|
78507
78507
|
prefix = "//";
|
|
78508
78508
|
}
|
|
78509
78509
|
}
|
|
78510
|
-
var segs =
|
|
78510
|
+
var segs = path17.split(/[/\\]+/);
|
|
78511
78511
|
if (stripTrailing !== false && segs[segs.length - 1] === "") {
|
|
78512
78512
|
segs.pop();
|
|
78513
78513
|
}
|
|
@@ -78545,17 +78545,17 @@ var require_anymatch = __commonJS({
|
|
|
78545
78545
|
if (!isList && typeof _path2 !== "string") {
|
|
78546
78546
|
throw new TypeError("anymatch: second argument must be a string: got " + Object.prototype.toString.call(_path2));
|
|
78547
78547
|
}
|
|
78548
|
-
const
|
|
78548
|
+
const path17 = normalizePath(_path2, false);
|
|
78549
78549
|
for (let index = 0; index < negPatterns.length; index++) {
|
|
78550
78550
|
const nglob = negPatterns[index];
|
|
78551
|
-
if (nglob(
|
|
78551
|
+
if (nglob(path17)) {
|
|
78552
78552
|
return returnIndex ? -1 : false;
|
|
78553
78553
|
}
|
|
78554
78554
|
}
|
|
78555
|
-
const applied = isList && [
|
|
78555
|
+
const applied = isList && [path17].concat(args.slice(1));
|
|
78556
78556
|
for (let index = 0; index < patterns.length; index++) {
|
|
78557
78557
|
const pattern = patterns[index];
|
|
78558
|
-
if (isList ? pattern(...applied) : pattern(
|
|
78558
|
+
if (isList ? pattern(...applied) : pattern(path17)) {
|
|
78559
78559
|
return returnIndex ? index : true;
|
|
78560
78560
|
}
|
|
78561
78561
|
}
|
|
@@ -80122,10 +80122,10 @@ var require_binary_extensions2 = __commonJS({
|
|
|
80122
80122
|
var require_is_binary_path = __commonJS({
|
|
80123
80123
|
"node_modules/is-binary-path/index.js"(exports, module) {
|
|
80124
80124
|
"use strict";
|
|
80125
|
-
var
|
|
80125
|
+
var path17 = __require("path");
|
|
80126
80126
|
var binaryExtensions = require_binary_extensions2();
|
|
80127
80127
|
var extensions = new Set(binaryExtensions);
|
|
80128
|
-
module.exports = (filePath) => extensions.has(
|
|
80128
|
+
module.exports = (filePath) => extensions.has(path17.extname(filePath).slice(1).toLowerCase());
|
|
80129
80129
|
}
|
|
80130
80130
|
});
|
|
80131
80131
|
|
|
@@ -80135,7 +80135,7 @@ var require_constants9 = __commonJS({
|
|
|
80135
80135
|
"use strict";
|
|
80136
80136
|
var { sep } = __require("path");
|
|
80137
80137
|
var { platform } = process;
|
|
80138
|
-
var
|
|
80138
|
+
var os9 = __require("os");
|
|
80139
80139
|
exports.EV_ALL = "all";
|
|
80140
80140
|
exports.EV_READY = "ready";
|
|
80141
80141
|
exports.EV_ADD = "add";
|
|
@@ -80189,7 +80189,7 @@ var require_constants9 = __commonJS({
|
|
|
80189
80189
|
exports.isWindows = platform === "win32";
|
|
80190
80190
|
exports.isMacos = platform === "darwin";
|
|
80191
80191
|
exports.isLinux = platform === "linux";
|
|
80192
|
-
exports.isIBMi =
|
|
80192
|
+
exports.isIBMi = os9.type() === "OS400";
|
|
80193
80193
|
}
|
|
80194
80194
|
});
|
|
80195
80195
|
|
|
@@ -80197,7 +80197,7 @@ var require_constants9 = __commonJS({
|
|
|
80197
80197
|
var require_nodefs_handler = __commonJS({
|
|
80198
80198
|
"node_modules/chokidar/lib/nodefs-handler.js"(exports, module) {
|
|
80199
80199
|
"use strict";
|
|
80200
|
-
var
|
|
80200
|
+
var fs21 = __require("fs");
|
|
80201
80201
|
var sysPath = __require("path");
|
|
80202
80202
|
var { promisify } = __require("util");
|
|
80203
80203
|
var isBinaryPath = require_is_binary_path();
|
|
@@ -80220,11 +80220,11 @@ var require_nodefs_handler = __commonJS({
|
|
|
80220
80220
|
STAR
|
|
80221
80221
|
} = require_constants9();
|
|
80222
80222
|
var THROTTLE_MODE_WATCH = "watch";
|
|
80223
|
-
var open = promisify(
|
|
80224
|
-
var stat = promisify(
|
|
80225
|
-
var lstat = promisify(
|
|
80226
|
-
var close = promisify(
|
|
80227
|
-
var fsrealpath = promisify(
|
|
80223
|
+
var open = promisify(fs21.open);
|
|
80224
|
+
var stat = promisify(fs21.stat);
|
|
80225
|
+
var lstat = promisify(fs21.lstat);
|
|
80226
|
+
var close = promisify(fs21.close);
|
|
80227
|
+
var fsrealpath = promisify(fs21.realpath);
|
|
80228
80228
|
var statMethods = { lstat, stat };
|
|
80229
80229
|
var foreach = (val, fn2) => {
|
|
80230
80230
|
if (val instanceof Set) {
|
|
@@ -80258,20 +80258,20 @@ var require_nodefs_handler = __commonJS({
|
|
|
80258
80258
|
};
|
|
80259
80259
|
var isEmptySet = (val) => val instanceof Set ? val.size === 0 : !val;
|
|
80260
80260
|
var FsWatchInstances = /* @__PURE__ */ new Map();
|
|
80261
|
-
function createFsWatchInstance(
|
|
80261
|
+
function createFsWatchInstance(path17, options, listener, errHandler, emitRaw) {
|
|
80262
80262
|
const handleEvent = (rawEvent, evPath) => {
|
|
80263
|
-
listener(
|
|
80264
|
-
emitRaw(rawEvent, evPath, { watchedPath:
|
|
80265
|
-
if (evPath &&
|
|
80263
|
+
listener(path17);
|
|
80264
|
+
emitRaw(rawEvent, evPath, { watchedPath: path17 });
|
|
80265
|
+
if (evPath && path17 !== evPath) {
|
|
80266
80266
|
fsWatchBroadcast(
|
|
80267
|
-
sysPath.resolve(
|
|
80267
|
+
sysPath.resolve(path17, evPath),
|
|
80268
80268
|
KEY_LISTENERS,
|
|
80269
|
-
sysPath.join(
|
|
80269
|
+
sysPath.join(path17, evPath)
|
|
80270
80270
|
);
|
|
80271
80271
|
}
|
|
80272
80272
|
};
|
|
80273
80273
|
try {
|
|
80274
|
-
return
|
|
80274
|
+
return fs21.watch(path17, options, handleEvent);
|
|
80275
80275
|
} catch (error49) {
|
|
80276
80276
|
errHandler(error49);
|
|
80277
80277
|
}
|
|
@@ -80283,13 +80283,13 @@ var require_nodefs_handler = __commonJS({
|
|
|
80283
80283
|
listener(val1, val2, val3);
|
|
80284
80284
|
});
|
|
80285
80285
|
};
|
|
80286
|
-
var setFsWatchListener = (
|
|
80286
|
+
var setFsWatchListener = (path17, fullPath, options, handlers) => {
|
|
80287
80287
|
const { listener, errHandler, rawEmitter } = handlers;
|
|
80288
80288
|
let cont = FsWatchInstances.get(fullPath);
|
|
80289
80289
|
let watcher;
|
|
80290
80290
|
if (!options.persistent) {
|
|
80291
80291
|
watcher = createFsWatchInstance(
|
|
80292
|
-
|
|
80292
|
+
path17,
|
|
80293
80293
|
options,
|
|
80294
80294
|
listener,
|
|
80295
80295
|
errHandler,
|
|
@@ -80303,7 +80303,7 @@ var require_nodefs_handler = __commonJS({
|
|
|
80303
80303
|
addAndConvert(cont, KEY_RAW, rawEmitter);
|
|
80304
80304
|
} else {
|
|
80305
80305
|
watcher = createFsWatchInstance(
|
|
80306
|
-
|
|
80306
|
+
path17,
|
|
80307
80307
|
options,
|
|
80308
80308
|
fsWatchBroadcast.bind(null, fullPath, KEY_LISTENERS),
|
|
80309
80309
|
errHandler,
|
|
@@ -80316,7 +80316,7 @@ var require_nodefs_handler = __commonJS({
|
|
|
80316
80316
|
cont.watcherUnusable = true;
|
|
80317
80317
|
if (isWindows && error49.code === "EPERM") {
|
|
80318
80318
|
try {
|
|
80319
|
-
const fd = await open(
|
|
80319
|
+
const fd = await open(path17, "r");
|
|
80320
80320
|
await close(fd);
|
|
80321
80321
|
broadcastErr(error49);
|
|
80322
80322
|
} catch (err) {
|
|
@@ -80347,7 +80347,7 @@ var require_nodefs_handler = __commonJS({
|
|
|
80347
80347
|
};
|
|
80348
80348
|
};
|
|
80349
80349
|
var FsWatchFileInstances = /* @__PURE__ */ new Map();
|
|
80350
|
-
var setFsWatchFileListener = (
|
|
80350
|
+
var setFsWatchFileListener = (path17, fullPath, options, handlers) => {
|
|
80351
80351
|
const { listener, rawEmitter } = handlers;
|
|
80352
80352
|
let cont = FsWatchFileInstances.get(fullPath);
|
|
80353
80353
|
let listeners = /* @__PURE__ */ new Set();
|
|
@@ -80356,7 +80356,7 @@ var require_nodefs_handler = __commonJS({
|
|
|
80356
80356
|
if (copts && (copts.persistent < options.persistent || copts.interval > options.interval)) {
|
|
80357
80357
|
listeners = cont.listeners;
|
|
80358
80358
|
rawEmitters = cont.rawEmitters;
|
|
80359
|
-
|
|
80359
|
+
fs21.unwatchFile(fullPath);
|
|
80360
80360
|
cont = void 0;
|
|
80361
80361
|
}
|
|
80362
80362
|
if (cont) {
|
|
@@ -80367,13 +80367,13 @@ var require_nodefs_handler = __commonJS({
|
|
|
80367
80367
|
listeners: listener,
|
|
80368
80368
|
rawEmitters: rawEmitter,
|
|
80369
80369
|
options,
|
|
80370
|
-
watcher:
|
|
80370
|
+
watcher: fs21.watchFile(fullPath, options, (curr, prev) => {
|
|
80371
80371
|
foreach(cont.rawEmitters, (rawEmitter2) => {
|
|
80372
80372
|
rawEmitter2(EV_CHANGE, fullPath, { curr, prev });
|
|
80373
80373
|
});
|
|
80374
80374
|
const currmtime = curr.mtimeMs;
|
|
80375
80375
|
if (curr.size !== prev.size || currmtime > prev.mtimeMs || currmtime === 0) {
|
|
80376
|
-
foreach(cont.listeners, (listener2) => listener2(
|
|
80376
|
+
foreach(cont.listeners, (listener2) => listener2(path17, curr));
|
|
80377
80377
|
}
|
|
80378
80378
|
})
|
|
80379
80379
|
};
|
|
@@ -80384,7 +80384,7 @@ var require_nodefs_handler = __commonJS({
|
|
|
80384
80384
|
delFromSet(cont, KEY_RAW, rawEmitter);
|
|
80385
80385
|
if (isEmptySet(cont.listeners)) {
|
|
80386
80386
|
FsWatchFileInstances.delete(fullPath);
|
|
80387
|
-
|
|
80387
|
+
fs21.unwatchFile(fullPath);
|
|
80388
80388
|
cont.options = cont.watcher = void 0;
|
|
80389
80389
|
Object.freeze(cont);
|
|
80390
80390
|
}
|
|
@@ -80404,24 +80404,24 @@ var require_nodefs_handler = __commonJS({
|
|
|
80404
80404
|
* @param {Function} listener on fs change
|
|
80405
80405
|
* @returns {Function} closer for the watcher instance
|
|
80406
80406
|
*/
|
|
80407
|
-
_watchWithNodeFs(
|
|
80407
|
+
_watchWithNodeFs(path17, listener) {
|
|
80408
80408
|
const opts = this.fsw.options;
|
|
80409
|
-
const directory = sysPath.dirname(
|
|
80410
|
-
const basename = sysPath.basename(
|
|
80409
|
+
const directory = sysPath.dirname(path17);
|
|
80410
|
+
const basename = sysPath.basename(path17);
|
|
80411
80411
|
const parent = this.fsw._getWatchedDir(directory);
|
|
80412
80412
|
parent.add(basename);
|
|
80413
|
-
const absolutePath = sysPath.resolve(
|
|
80413
|
+
const absolutePath = sysPath.resolve(path17);
|
|
80414
80414
|
const options = { persistent: opts.persistent };
|
|
80415
80415
|
if (!listener) listener = EMPTY_FN;
|
|
80416
80416
|
let closer;
|
|
80417
80417
|
if (opts.usePolling) {
|
|
80418
80418
|
options.interval = opts.enableBinaryInterval && isBinaryPath(basename) ? opts.binaryInterval : opts.interval;
|
|
80419
|
-
closer = setFsWatchFileListener(
|
|
80419
|
+
closer = setFsWatchFileListener(path17, absolutePath, options, {
|
|
80420
80420
|
listener,
|
|
80421
80421
|
rawEmitter: this.fsw._emitRaw
|
|
80422
80422
|
});
|
|
80423
80423
|
} else {
|
|
80424
|
-
closer = setFsWatchListener(
|
|
80424
|
+
closer = setFsWatchListener(path17, absolutePath, options, {
|
|
80425
80425
|
listener,
|
|
80426
80426
|
errHandler: this._boundHandleError,
|
|
80427
80427
|
rawEmitter: this.fsw._emitRaw
|
|
@@ -80445,7 +80445,7 @@ var require_nodefs_handler = __commonJS({
|
|
|
80445
80445
|
const parent = this.fsw._getWatchedDir(dirname2);
|
|
80446
80446
|
let prevStats = stats;
|
|
80447
80447
|
if (parent.has(basename)) return;
|
|
80448
|
-
const listener = async (
|
|
80448
|
+
const listener = async (path17, newStats) => {
|
|
80449
80449
|
if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file2, 5)) return;
|
|
80450
80450
|
if (!newStats || newStats.mtimeMs === 0) {
|
|
80451
80451
|
try {
|
|
@@ -80457,9 +80457,9 @@ var require_nodefs_handler = __commonJS({
|
|
|
80457
80457
|
this.fsw._emit(EV_CHANGE, file2, newStats2);
|
|
80458
80458
|
}
|
|
80459
80459
|
if (isLinux && prevStats.ino !== newStats2.ino) {
|
|
80460
|
-
this.fsw._closeFile(
|
|
80460
|
+
this.fsw._closeFile(path17);
|
|
80461
80461
|
prevStats = newStats2;
|
|
80462
|
-
this.fsw._addPathCloser(
|
|
80462
|
+
this.fsw._addPathCloser(path17, this._watchWithNodeFs(file2, listener));
|
|
80463
80463
|
} else {
|
|
80464
80464
|
prevStats = newStats2;
|
|
80465
80465
|
}
|
|
@@ -80490,7 +80490,7 @@ var require_nodefs_handler = __commonJS({
|
|
|
80490
80490
|
* @param {String} item basename of this item
|
|
80491
80491
|
* @returns {Promise<Boolean>} true if no more processing is needed for this entry.
|
|
80492
80492
|
*/
|
|
80493
|
-
async _handleSymlink(entry, directory,
|
|
80493
|
+
async _handleSymlink(entry, directory, path17, item) {
|
|
80494
80494
|
if (this.fsw.closed) {
|
|
80495
80495
|
return;
|
|
80496
80496
|
}
|
|
@@ -80500,7 +80500,7 @@ var require_nodefs_handler = __commonJS({
|
|
|
80500
80500
|
this.fsw._incrReadyCount();
|
|
80501
80501
|
let linkPath;
|
|
80502
80502
|
try {
|
|
80503
|
-
linkPath = await fsrealpath(
|
|
80503
|
+
linkPath = await fsrealpath(path17);
|
|
80504
80504
|
} catch (e) {
|
|
80505
80505
|
this.fsw._emitReady();
|
|
80506
80506
|
return true;
|
|
@@ -80509,12 +80509,12 @@ var require_nodefs_handler = __commonJS({
|
|
|
80509
80509
|
if (dir.has(item)) {
|
|
80510
80510
|
if (this.fsw._symlinkPaths.get(full) !== linkPath) {
|
|
80511
80511
|
this.fsw._symlinkPaths.set(full, linkPath);
|
|
80512
|
-
this.fsw._emit(EV_CHANGE,
|
|
80512
|
+
this.fsw._emit(EV_CHANGE, path17, entry.stats);
|
|
80513
80513
|
}
|
|
80514
80514
|
} else {
|
|
80515
80515
|
dir.add(item);
|
|
80516
80516
|
this.fsw._symlinkPaths.set(full, linkPath);
|
|
80517
|
-
this.fsw._emit(EV_ADD,
|
|
80517
|
+
this.fsw._emit(EV_ADD, path17, entry.stats);
|
|
80518
80518
|
}
|
|
80519
80519
|
this.fsw._emitReady();
|
|
80520
80520
|
return true;
|
|
@@ -80542,9 +80542,9 @@ var require_nodefs_handler = __commonJS({
|
|
|
80542
80542
|
return;
|
|
80543
80543
|
}
|
|
80544
80544
|
const item = entry.path;
|
|
80545
|
-
let
|
|
80545
|
+
let path17 = sysPath.join(directory, item);
|
|
80546
80546
|
current.add(item);
|
|
80547
|
-
if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory,
|
|
80547
|
+
if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path17, item)) {
|
|
80548
80548
|
return;
|
|
80549
80549
|
}
|
|
80550
80550
|
if (this.fsw.closed) {
|
|
@@ -80553,8 +80553,8 @@ var require_nodefs_handler = __commonJS({
|
|
|
80553
80553
|
}
|
|
80554
80554
|
if (item === target || !target && !previous.has(item)) {
|
|
80555
80555
|
this.fsw._incrReadyCount();
|
|
80556
|
-
|
|
80557
|
-
this._addToNodeFs(
|
|
80556
|
+
path17 = sysPath.join(dir, sysPath.relative(dir, path17));
|
|
80557
|
+
this._addToNodeFs(path17, initialAdd, wh, depth + 1);
|
|
80558
80558
|
}
|
|
80559
80559
|
}).on(EV_ERROR, this._boundHandleError);
|
|
80560
80560
|
return new Promise(
|
|
@@ -80624,13 +80624,13 @@ var require_nodefs_handler = __commonJS({
|
|
|
80624
80624
|
* @param {String=} target Child path actually targeted for watch
|
|
80625
80625
|
* @returns {Promise}
|
|
80626
80626
|
*/
|
|
80627
|
-
async _addToNodeFs(
|
|
80627
|
+
async _addToNodeFs(path17, initialAdd, priorWh, depth, target) {
|
|
80628
80628
|
const ready = this.fsw._emitReady;
|
|
80629
|
-
if (this.fsw._isIgnored(
|
|
80629
|
+
if (this.fsw._isIgnored(path17) || this.fsw.closed) {
|
|
80630
80630
|
ready();
|
|
80631
80631
|
return false;
|
|
80632
80632
|
}
|
|
80633
|
-
const wh = this.fsw._getWatchHelpers(
|
|
80633
|
+
const wh = this.fsw._getWatchHelpers(path17, depth);
|
|
80634
80634
|
if (!wh.hasGlob && priorWh) {
|
|
80635
80635
|
wh.hasGlob = priorWh.hasGlob;
|
|
80636
80636
|
wh.globFilter = priorWh.globFilter;
|
|
@@ -80644,11 +80644,11 @@ var require_nodefs_handler = __commonJS({
|
|
|
80644
80644
|
ready();
|
|
80645
80645
|
return false;
|
|
80646
80646
|
}
|
|
80647
|
-
const follow = this.fsw.options.followSymlinks && !
|
|
80647
|
+
const follow = this.fsw.options.followSymlinks && !path17.includes(STAR) && !path17.includes(BRACE_START);
|
|
80648
80648
|
let closer;
|
|
80649
80649
|
if (stats.isDirectory()) {
|
|
80650
|
-
const absPath = sysPath.resolve(
|
|
80651
|
-
const targetPath = follow ? await fsrealpath(
|
|
80650
|
+
const absPath = sysPath.resolve(path17);
|
|
80651
|
+
const targetPath = follow ? await fsrealpath(path17) : path17;
|
|
80652
80652
|
if (this.fsw.closed) return;
|
|
80653
80653
|
closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath);
|
|
80654
80654
|
if (this.fsw.closed) return;
|
|
@@ -80656,26 +80656,26 @@ var require_nodefs_handler = __commonJS({
|
|
|
80656
80656
|
this.fsw._symlinkPaths.set(absPath, targetPath);
|
|
80657
80657
|
}
|
|
80658
80658
|
} else if (stats.isSymbolicLink()) {
|
|
80659
|
-
const targetPath = follow ? await fsrealpath(
|
|
80659
|
+
const targetPath = follow ? await fsrealpath(path17) : path17;
|
|
80660
80660
|
if (this.fsw.closed) return;
|
|
80661
80661
|
const parent = sysPath.dirname(wh.watchPath);
|
|
80662
80662
|
this.fsw._getWatchedDir(parent).add(wh.watchPath);
|
|
80663
80663
|
this.fsw._emit(EV_ADD, wh.watchPath, stats);
|
|
80664
|
-
closer = await this._handleDir(parent, stats, initialAdd, depth,
|
|
80664
|
+
closer = await this._handleDir(parent, stats, initialAdd, depth, path17, wh, targetPath);
|
|
80665
80665
|
if (this.fsw.closed) return;
|
|
80666
80666
|
if (targetPath !== void 0) {
|
|
80667
|
-
this.fsw._symlinkPaths.set(sysPath.resolve(
|
|
80667
|
+
this.fsw._symlinkPaths.set(sysPath.resolve(path17), targetPath);
|
|
80668
80668
|
}
|
|
80669
80669
|
} else {
|
|
80670
80670
|
closer = this._handleFile(wh.watchPath, stats, initialAdd);
|
|
80671
80671
|
}
|
|
80672
80672
|
ready();
|
|
80673
|
-
this.fsw._addPathCloser(
|
|
80673
|
+
this.fsw._addPathCloser(path17, closer);
|
|
80674
80674
|
return false;
|
|
80675
80675
|
} catch (error49) {
|
|
80676
80676
|
if (this.fsw._handleError(error49)) {
|
|
80677
80677
|
ready();
|
|
80678
|
-
return
|
|
80678
|
+
return path17;
|
|
80679
80679
|
}
|
|
80680
80680
|
}
|
|
80681
80681
|
}
|
|
@@ -80688,7 +80688,7 @@ var require_nodefs_handler = __commonJS({
|
|
|
80688
80688
|
var require_fsevents_handler = __commonJS({
|
|
80689
80689
|
"node_modules/chokidar/lib/fsevents-handler.js"(exports, module) {
|
|
80690
80690
|
"use strict";
|
|
80691
|
-
var
|
|
80691
|
+
var fs21 = __require("fs");
|
|
80692
80692
|
var sysPath = __require("path");
|
|
80693
80693
|
var { promisify } = __require("util");
|
|
80694
80694
|
var fsevents;
|
|
@@ -80733,9 +80733,9 @@ var require_fsevents_handler = __commonJS({
|
|
|
80733
80733
|
IDENTITY_FN
|
|
80734
80734
|
} = require_constants9();
|
|
80735
80735
|
var Depth = (value) => isNaN(value) ? {} : { depth: value };
|
|
80736
|
-
var stat = promisify(
|
|
80737
|
-
var lstat = promisify(
|
|
80738
|
-
var realpath = promisify(
|
|
80736
|
+
var stat = promisify(fs21.stat);
|
|
80737
|
+
var lstat = promisify(fs21.lstat);
|
|
80738
|
+
var realpath = promisify(fs21.realpath);
|
|
80739
80739
|
var statMethods = { stat, lstat };
|
|
80740
80740
|
var FSEventsWatchers = /* @__PURE__ */ new Map();
|
|
80741
80741
|
var consolidateThreshhold = 10;
|
|
@@ -80749,18 +80749,18 @@ var require_fsevents_handler = __commonJS({
|
|
|
80749
80749
|
131840,
|
|
80750
80750
|
262912
|
|
80751
80751
|
]);
|
|
80752
|
-
var createFSEventsInstance = (
|
|
80753
|
-
const stop = fsevents.watch(
|
|
80752
|
+
var createFSEventsInstance = (path17, callback) => {
|
|
80753
|
+
const stop = fsevents.watch(path17, callback);
|
|
80754
80754
|
return { stop };
|
|
80755
80755
|
};
|
|
80756
|
-
function setFSEventsListener(
|
|
80756
|
+
function setFSEventsListener(path17, realPath, listener, rawEmitter) {
|
|
80757
80757
|
let watchPath = sysPath.extname(realPath) ? sysPath.dirname(realPath) : realPath;
|
|
80758
80758
|
const parentPath = sysPath.dirname(watchPath);
|
|
80759
80759
|
let cont = FSEventsWatchers.get(watchPath);
|
|
80760
80760
|
if (couldConsolidate(parentPath)) {
|
|
80761
80761
|
watchPath = parentPath;
|
|
80762
80762
|
}
|
|
80763
|
-
const resolvedPath = sysPath.resolve(
|
|
80763
|
+
const resolvedPath = sysPath.resolve(path17);
|
|
80764
80764
|
const hasSymlink = resolvedPath !== realPath;
|
|
80765
80765
|
const filteredListener = (fullPath, flags, info) => {
|
|
80766
80766
|
if (hasSymlink) fullPath = fullPath.replace(realPath, resolvedPath);
|
|
@@ -80805,10 +80805,10 @@ var require_fsevents_handler = __commonJS({
|
|
|
80805
80805
|
}
|
|
80806
80806
|
};
|
|
80807
80807
|
}
|
|
80808
|
-
var couldConsolidate = (
|
|
80808
|
+
var couldConsolidate = (path17) => {
|
|
80809
80809
|
let count = 0;
|
|
80810
80810
|
for (const watchPath of FSEventsWatchers.keys()) {
|
|
80811
|
-
if (watchPath.indexOf(
|
|
80811
|
+
if (watchPath.indexOf(path17) === 0) {
|
|
80812
80812
|
count++;
|
|
80813
80813
|
if (count >= consolidateThreshhold) {
|
|
80814
80814
|
return true;
|
|
@@ -80818,9 +80818,9 @@ var require_fsevents_handler = __commonJS({
|
|
|
80818
80818
|
return false;
|
|
80819
80819
|
};
|
|
80820
80820
|
var canUse = () => fsevents && FSEventsWatchers.size < 128;
|
|
80821
|
-
var calcDepth = (
|
|
80821
|
+
var calcDepth = (path17, root) => {
|
|
80822
80822
|
let i = 0;
|
|
80823
|
-
while (!
|
|
80823
|
+
while (!path17.indexOf(root) && (path17 = sysPath.dirname(path17)) !== root) i++;
|
|
80824
80824
|
return i;
|
|
80825
80825
|
};
|
|
80826
80826
|
var sameTypes = (info, stats) => info.type === FSEVENT_TYPE_DIRECTORY && stats.isDirectory() || info.type === FSEVENT_TYPE_SYMLINK && stats.isSymbolicLink() || info.type === FSEVENT_TYPE_FILE && stats.isFile();
|
|
@@ -80831,41 +80831,41 @@ var require_fsevents_handler = __commonJS({
|
|
|
80831
80831
|
constructor(fsw) {
|
|
80832
80832
|
this.fsw = fsw;
|
|
80833
80833
|
}
|
|
80834
|
-
checkIgnored(
|
|
80834
|
+
checkIgnored(path17, stats) {
|
|
80835
80835
|
const ipaths = this.fsw._ignoredPaths;
|
|
80836
|
-
if (this.fsw._isIgnored(
|
|
80837
|
-
ipaths.add(
|
|
80836
|
+
if (this.fsw._isIgnored(path17, stats)) {
|
|
80837
|
+
ipaths.add(path17);
|
|
80838
80838
|
if (stats && stats.isDirectory()) {
|
|
80839
|
-
ipaths.add(
|
|
80839
|
+
ipaths.add(path17 + ROOT_GLOBSTAR);
|
|
80840
80840
|
}
|
|
80841
80841
|
return true;
|
|
80842
80842
|
}
|
|
80843
|
-
ipaths.delete(
|
|
80844
|
-
ipaths.delete(
|
|
80843
|
+
ipaths.delete(path17);
|
|
80844
|
+
ipaths.delete(path17 + ROOT_GLOBSTAR);
|
|
80845
80845
|
}
|
|
80846
|
-
addOrChange(
|
|
80846
|
+
addOrChange(path17, fullPath, realPath, parent, watchedDir, item, info, opts) {
|
|
80847
80847
|
const event = watchedDir.has(item) ? EV_CHANGE : EV_ADD;
|
|
80848
|
-
this.handleEvent(event,
|
|
80848
|
+
this.handleEvent(event, path17, fullPath, realPath, parent, watchedDir, item, info, opts);
|
|
80849
80849
|
}
|
|
80850
|
-
async checkExists(
|
|
80850
|
+
async checkExists(path17, fullPath, realPath, parent, watchedDir, item, info, opts) {
|
|
80851
80851
|
try {
|
|
80852
|
-
const stats = await stat(
|
|
80852
|
+
const stats = await stat(path17);
|
|
80853
80853
|
if (this.fsw.closed) return;
|
|
80854
80854
|
if (sameTypes(info, stats)) {
|
|
80855
|
-
this.addOrChange(
|
|
80855
|
+
this.addOrChange(path17, fullPath, realPath, parent, watchedDir, item, info, opts);
|
|
80856
80856
|
} else {
|
|
80857
|
-
this.handleEvent(EV_UNLINK,
|
|
80857
|
+
this.handleEvent(EV_UNLINK, path17, fullPath, realPath, parent, watchedDir, item, info, opts);
|
|
80858
80858
|
}
|
|
80859
80859
|
} catch (error49) {
|
|
80860
80860
|
if (error49.code === "EACCES") {
|
|
80861
|
-
this.addOrChange(
|
|
80861
|
+
this.addOrChange(path17, fullPath, realPath, parent, watchedDir, item, info, opts);
|
|
80862
80862
|
} else {
|
|
80863
|
-
this.handleEvent(EV_UNLINK,
|
|
80863
|
+
this.handleEvent(EV_UNLINK, path17, fullPath, realPath, parent, watchedDir, item, info, opts);
|
|
80864
80864
|
}
|
|
80865
80865
|
}
|
|
80866
80866
|
}
|
|
80867
|
-
handleEvent(event,
|
|
80868
|
-
if (this.fsw.closed || this.checkIgnored(
|
|
80867
|
+
handleEvent(event, path17, fullPath, realPath, parent, watchedDir, item, info, opts) {
|
|
80868
|
+
if (this.fsw.closed || this.checkIgnored(path17)) return;
|
|
80869
80869
|
if (event === EV_UNLINK) {
|
|
80870
80870
|
const isDirectory = info.type === FSEVENT_TYPE_DIRECTORY;
|
|
80871
80871
|
if (isDirectory || watchedDir.has(item)) {
|
|
@@ -80873,16 +80873,16 @@ var require_fsevents_handler = __commonJS({
|
|
|
80873
80873
|
}
|
|
80874
80874
|
} else {
|
|
80875
80875
|
if (event === EV_ADD) {
|
|
80876
|
-
if (info.type === FSEVENT_TYPE_DIRECTORY) this.fsw._getWatchedDir(
|
|
80876
|
+
if (info.type === FSEVENT_TYPE_DIRECTORY) this.fsw._getWatchedDir(path17);
|
|
80877
80877
|
if (info.type === FSEVENT_TYPE_SYMLINK && opts.followSymlinks) {
|
|
80878
80878
|
const curDepth = opts.depth === void 0 ? void 0 : calcDepth(fullPath, realPath) + 1;
|
|
80879
|
-
return this._addToFsEvents(
|
|
80879
|
+
return this._addToFsEvents(path17, false, true, curDepth);
|
|
80880
80880
|
}
|
|
80881
80881
|
this.fsw._getWatchedDir(parent).add(item);
|
|
80882
80882
|
}
|
|
80883
80883
|
const eventName = info.type === FSEVENT_TYPE_DIRECTORY ? event + DIR_SUFFIX : event;
|
|
80884
|
-
this.fsw._emit(eventName,
|
|
80885
|
-
if (eventName === EV_ADD_DIR) this._addToFsEvents(
|
|
80884
|
+
this.fsw._emit(eventName, path17);
|
|
80885
|
+
if (eventName === EV_ADD_DIR) this._addToFsEvents(path17, false, true);
|
|
80886
80886
|
}
|
|
80887
80887
|
}
|
|
80888
80888
|
/**
|
|
@@ -80899,41 +80899,41 @@ var require_fsevents_handler = __commonJS({
|
|
|
80899
80899
|
const watchCallback = async (fullPath, flags, info) => {
|
|
80900
80900
|
if (this.fsw.closed) return;
|
|
80901
80901
|
if (opts.depth !== void 0 && calcDepth(fullPath, realPath) > opts.depth) return;
|
|
80902
|
-
const
|
|
80902
|
+
const path17 = transform2(sysPath.join(
|
|
80903
80903
|
watchPath,
|
|
80904
80904
|
sysPath.relative(watchPath, fullPath)
|
|
80905
80905
|
));
|
|
80906
|
-
if (globFilter && !globFilter(
|
|
80907
|
-
const parent = sysPath.dirname(
|
|
80908
|
-
const item = sysPath.basename(
|
|
80906
|
+
if (globFilter && !globFilter(path17)) return;
|
|
80907
|
+
const parent = sysPath.dirname(path17);
|
|
80908
|
+
const item = sysPath.basename(path17);
|
|
80909
80909
|
const watchedDir = this.fsw._getWatchedDir(
|
|
80910
|
-
info.type === FSEVENT_TYPE_DIRECTORY ?
|
|
80910
|
+
info.type === FSEVENT_TYPE_DIRECTORY ? path17 : parent
|
|
80911
80911
|
);
|
|
80912
80912
|
if (wrongEventFlags.has(flags) || info.event === FSEVENT_UNKNOWN) {
|
|
80913
80913
|
if (typeof opts.ignored === FUNCTION_TYPE) {
|
|
80914
80914
|
let stats;
|
|
80915
80915
|
try {
|
|
80916
|
-
stats = await stat(
|
|
80916
|
+
stats = await stat(path17);
|
|
80917
80917
|
} catch (error49) {
|
|
80918
80918
|
}
|
|
80919
80919
|
if (this.fsw.closed) return;
|
|
80920
|
-
if (this.checkIgnored(
|
|
80920
|
+
if (this.checkIgnored(path17, stats)) return;
|
|
80921
80921
|
if (sameTypes(info, stats)) {
|
|
80922
|
-
this.addOrChange(
|
|
80922
|
+
this.addOrChange(path17, fullPath, realPath, parent, watchedDir, item, info, opts);
|
|
80923
80923
|
} else {
|
|
80924
|
-
this.handleEvent(EV_UNLINK,
|
|
80924
|
+
this.handleEvent(EV_UNLINK, path17, fullPath, realPath, parent, watchedDir, item, info, opts);
|
|
80925
80925
|
}
|
|
80926
80926
|
} else {
|
|
80927
|
-
this.checkExists(
|
|
80927
|
+
this.checkExists(path17, fullPath, realPath, parent, watchedDir, item, info, opts);
|
|
80928
80928
|
}
|
|
80929
80929
|
} else {
|
|
80930
80930
|
switch (info.event) {
|
|
80931
80931
|
case FSEVENT_CREATED:
|
|
80932
80932
|
case FSEVENT_MODIFIED:
|
|
80933
|
-
return this.addOrChange(
|
|
80933
|
+
return this.addOrChange(path17, fullPath, realPath, parent, watchedDir, item, info, opts);
|
|
80934
80934
|
case FSEVENT_DELETED:
|
|
80935
80935
|
case FSEVENT_MOVED:
|
|
80936
|
-
return this.checkExists(
|
|
80936
|
+
return this.checkExists(path17, fullPath, realPath, parent, watchedDir, item, info, opts);
|
|
80937
80937
|
}
|
|
80938
80938
|
}
|
|
80939
80939
|
};
|
|
@@ -80965,12 +80965,12 @@ var require_fsevents_handler = __commonJS({
|
|
|
80965
80965
|
return this.fsw._emitReady();
|
|
80966
80966
|
}
|
|
80967
80967
|
this.fsw._incrReadyCount();
|
|
80968
|
-
this._addToFsEvents(linkTarget || linkPath, (
|
|
80968
|
+
this._addToFsEvents(linkTarget || linkPath, (path17) => {
|
|
80969
80969
|
let aliasedPath = linkPath;
|
|
80970
80970
|
if (linkTarget && linkTarget !== DOT_SLASH) {
|
|
80971
|
-
aliasedPath =
|
|
80972
|
-
} else if (
|
|
80973
|
-
aliasedPath = sysPath.join(linkPath,
|
|
80971
|
+
aliasedPath = path17.replace(linkTarget, linkPath);
|
|
80972
|
+
} else if (path17 !== DOT_SLASH) {
|
|
80973
|
+
aliasedPath = sysPath.join(linkPath, path17);
|
|
80974
80974
|
}
|
|
80975
80975
|
return transform2(aliasedPath);
|
|
80976
80976
|
}, false, curDepth);
|
|
@@ -80997,7 +80997,7 @@ var require_fsevents_handler = __commonJS({
|
|
|
80997
80997
|
this.fsw._emit(isDir ? EV_ADD_DIR : EV_ADD, pp, stats);
|
|
80998
80998
|
}
|
|
80999
80999
|
}
|
|
81000
|
-
initWatch(realPath,
|
|
81000
|
+
initWatch(realPath, path17, wh, processPath) {
|
|
81001
81001
|
if (this.fsw.closed) return;
|
|
81002
81002
|
const closer = this._watchWithFsEvents(
|
|
81003
81003
|
wh.watchPath,
|
|
@@ -81005,7 +81005,7 @@ var require_fsevents_handler = __commonJS({
|
|
|
81005
81005
|
processPath,
|
|
81006
81006
|
wh.globFilter
|
|
81007
81007
|
);
|
|
81008
|
-
this.fsw._addPathCloser(
|
|
81008
|
+
this.fsw._addPathCloser(path17, closer);
|
|
81009
81009
|
}
|
|
81010
81010
|
/**
|
|
81011
81011
|
* Handle added path with fsevents
|
|
@@ -81015,13 +81015,13 @@ var require_fsevents_handler = __commonJS({
|
|
|
81015
81015
|
* @param {Number=} priorDepth Level of subdirectories already traversed.
|
|
81016
81016
|
* @returns {Promise<void>}
|
|
81017
81017
|
*/
|
|
81018
|
-
async _addToFsEvents(
|
|
81018
|
+
async _addToFsEvents(path17, transform2, forceAdd, priorDepth) {
|
|
81019
81019
|
if (this.fsw.closed) {
|
|
81020
81020
|
return;
|
|
81021
81021
|
}
|
|
81022
81022
|
const opts = this.fsw.options;
|
|
81023
81023
|
const processPath = typeof transform2 === FUNCTION_TYPE ? transform2 : IDENTITY_FN;
|
|
81024
|
-
const wh = this.fsw._getWatchHelpers(
|
|
81024
|
+
const wh = this.fsw._getWatchHelpers(path17);
|
|
81025
81025
|
try {
|
|
81026
81026
|
const stats = await statMethods[wh.statMethod](wh.watchPath);
|
|
81027
81027
|
if (this.fsw.closed) return;
|
|
@@ -81029,7 +81029,7 @@ var require_fsevents_handler = __commonJS({
|
|
|
81029
81029
|
throw null;
|
|
81030
81030
|
}
|
|
81031
81031
|
if (stats.isDirectory()) {
|
|
81032
|
-
if (!wh.globFilter) this.emitAdd(processPath(
|
|
81032
|
+
if (!wh.globFilter) this.emitAdd(processPath(path17), stats, processPath, opts, forceAdd);
|
|
81033
81033
|
if (priorDepth && priorDepth > opts.depth) return;
|
|
81034
81034
|
this.fsw._readdirp(wh.watchPath, {
|
|
81035
81035
|
fileFilter: (entry) => wh.filterPath(entry),
|
|
@@ -81063,14 +81063,14 @@ var require_fsevents_handler = __commonJS({
|
|
|
81063
81063
|
}
|
|
81064
81064
|
if (opts.persistent && forceAdd !== true) {
|
|
81065
81065
|
if (typeof transform2 === FUNCTION_TYPE) {
|
|
81066
|
-
this.initWatch(void 0,
|
|
81066
|
+
this.initWatch(void 0, path17, wh, processPath);
|
|
81067
81067
|
} else {
|
|
81068
81068
|
let realPath;
|
|
81069
81069
|
try {
|
|
81070
81070
|
realPath = await realpath(wh.watchPath);
|
|
81071
81071
|
} catch (e) {
|
|
81072
81072
|
}
|
|
81073
|
-
this.initWatch(realPath,
|
|
81073
|
+
this.initWatch(realPath, path17, wh, processPath);
|
|
81074
81074
|
}
|
|
81075
81075
|
}
|
|
81076
81076
|
}
|
|
@@ -81085,7 +81085,7 @@ var require_chokidar = __commonJS({
|
|
|
81085
81085
|
"node_modules/chokidar/index.js"(exports) {
|
|
81086
81086
|
"use strict";
|
|
81087
81087
|
var { EventEmitter: EventEmitter2 } = __require("events");
|
|
81088
|
-
var
|
|
81088
|
+
var fs21 = __require("fs");
|
|
81089
81089
|
var sysPath = __require("path");
|
|
81090
81090
|
var { promisify } = __require("util");
|
|
81091
81091
|
var readdirp = require_readdirp();
|
|
@@ -81130,8 +81130,8 @@ var require_chokidar = __commonJS({
|
|
|
81130
81130
|
isMacos,
|
|
81131
81131
|
isIBMi
|
|
81132
81132
|
} = require_constants9();
|
|
81133
|
-
var stat = promisify(
|
|
81134
|
-
var readdir = promisify(
|
|
81133
|
+
var stat = promisify(fs21.stat);
|
|
81134
|
+
var readdir = promisify(fs21.readdir);
|
|
81135
81135
|
var arrify = (value = []) => Array.isArray(value) ? value : [value];
|
|
81136
81136
|
var flatten = (list, result = []) => {
|
|
81137
81137
|
list.forEach((item) => {
|
|
@@ -81164,19 +81164,19 @@ var require_chokidar = __commonJS({
|
|
|
81164
81164
|
}
|
|
81165
81165
|
return str;
|
|
81166
81166
|
};
|
|
81167
|
-
var normalizePathToUnix = (
|
|
81168
|
-
var normalizeIgnored = (cwd = EMPTY_STR) => (
|
|
81169
|
-
if (typeof
|
|
81170
|
-
return normalizePathToUnix(sysPath.isAbsolute(
|
|
81167
|
+
var normalizePathToUnix = (path17) => toUnix(sysPath.normalize(toUnix(path17)));
|
|
81168
|
+
var normalizeIgnored = (cwd = EMPTY_STR) => (path17) => {
|
|
81169
|
+
if (typeof path17 !== STRING_TYPE) return path17;
|
|
81170
|
+
return normalizePathToUnix(sysPath.isAbsolute(path17) ? path17 : sysPath.join(cwd, path17));
|
|
81171
81171
|
};
|
|
81172
|
-
var getAbsolutePath = (
|
|
81173
|
-
if (sysPath.isAbsolute(
|
|
81174
|
-
return
|
|
81172
|
+
var getAbsolutePath = (path17, cwd) => {
|
|
81173
|
+
if (sysPath.isAbsolute(path17)) {
|
|
81174
|
+
return path17;
|
|
81175
81175
|
}
|
|
81176
|
-
if (
|
|
81177
|
-
return BANG + sysPath.join(cwd,
|
|
81176
|
+
if (path17.startsWith(BANG)) {
|
|
81177
|
+
return BANG + sysPath.join(cwd, path17.slice(1));
|
|
81178
81178
|
}
|
|
81179
|
-
return sysPath.join(cwd,
|
|
81179
|
+
return sysPath.join(cwd, path17);
|
|
81180
81180
|
};
|
|
81181
81181
|
var undef = (opts, key) => opts[key] === void 0;
|
|
81182
81182
|
var DirEntry = class {
|
|
@@ -81232,16 +81232,16 @@ var require_chokidar = __commonJS({
|
|
|
81232
81232
|
var STAT_METHOD_F = "stat";
|
|
81233
81233
|
var STAT_METHOD_L = "lstat";
|
|
81234
81234
|
var WatchHelper = class {
|
|
81235
|
-
constructor(
|
|
81235
|
+
constructor(path17, watchPath, follow, fsw) {
|
|
81236
81236
|
this.fsw = fsw;
|
|
81237
|
-
this.path =
|
|
81237
|
+
this.path = path17 = path17.replace(REPLACER_RE, EMPTY_STR);
|
|
81238
81238
|
this.watchPath = watchPath;
|
|
81239
81239
|
this.fullWatchPath = sysPath.resolve(watchPath);
|
|
81240
|
-
this.hasGlob = watchPath !==
|
|
81241
|
-
if (
|
|
81240
|
+
this.hasGlob = watchPath !== path17;
|
|
81241
|
+
if (path17 === EMPTY_STR) this.hasGlob = false;
|
|
81242
81242
|
this.globSymlink = this.hasGlob && follow ? void 0 : false;
|
|
81243
|
-
this.globFilter = this.hasGlob ? anymatch(
|
|
81244
|
-
this.dirParts = this.getDirParts(
|
|
81243
|
+
this.globFilter = this.hasGlob ? anymatch(path17, void 0, ANYMATCH_OPTS) : false;
|
|
81244
|
+
this.dirParts = this.getDirParts(path17);
|
|
81245
81245
|
this.dirParts.forEach((parts) => {
|
|
81246
81246
|
if (parts.length > 1) parts.pop();
|
|
81247
81247
|
});
|
|
@@ -81270,12 +81270,12 @@ var require_chokidar = __commonJS({
|
|
|
81270
81270
|
const matchesGlob = this.hasGlob && typeof this.globFilter === FUNCTION_TYPE ? this.globFilter(resolvedPath) : true;
|
|
81271
81271
|
return matchesGlob && this.fsw._isntIgnored(resolvedPath, stats) && this.fsw._hasReadPermissions(stats);
|
|
81272
81272
|
}
|
|
81273
|
-
getDirParts(
|
|
81273
|
+
getDirParts(path17) {
|
|
81274
81274
|
if (!this.hasGlob) return [];
|
|
81275
81275
|
const parts = [];
|
|
81276
|
-
const expandedPath =
|
|
81277
|
-
expandedPath.forEach((
|
|
81278
|
-
parts.push(sysPath.relative(this.watchPath,
|
|
81276
|
+
const expandedPath = path17.includes(BRACE_START) ? braces.expand(path17) : [path17];
|
|
81277
|
+
expandedPath.forEach((path18) => {
|
|
81278
|
+
parts.push(sysPath.relative(this.watchPath, path18).split(SLASH_OR_BACK_SLASH_RE));
|
|
81279
81279
|
});
|
|
81280
81280
|
return parts;
|
|
81281
81281
|
}
|
|
@@ -81381,34 +81381,34 @@ var require_chokidar = __commonJS({
|
|
|
81381
81381
|
this.closed = false;
|
|
81382
81382
|
let paths = unifyPaths(paths_);
|
|
81383
81383
|
if (cwd) {
|
|
81384
|
-
paths = paths.map((
|
|
81385
|
-
const absPath = getAbsolutePath(
|
|
81386
|
-
if (disableGlobbing || !isGlob(
|
|
81384
|
+
paths = paths.map((path17) => {
|
|
81385
|
+
const absPath = getAbsolutePath(path17, cwd);
|
|
81386
|
+
if (disableGlobbing || !isGlob(path17)) {
|
|
81387
81387
|
return absPath;
|
|
81388
81388
|
}
|
|
81389
81389
|
return normalizePath(absPath);
|
|
81390
81390
|
});
|
|
81391
81391
|
}
|
|
81392
|
-
paths = paths.filter((
|
|
81393
|
-
if (
|
|
81394
|
-
this._ignoredPaths.add(
|
|
81392
|
+
paths = paths.filter((path17) => {
|
|
81393
|
+
if (path17.startsWith(BANG)) {
|
|
81394
|
+
this._ignoredPaths.add(path17.slice(1));
|
|
81395
81395
|
return false;
|
|
81396
81396
|
}
|
|
81397
|
-
this._ignoredPaths.delete(
|
|
81398
|
-
this._ignoredPaths.delete(
|
|
81397
|
+
this._ignoredPaths.delete(path17);
|
|
81398
|
+
this._ignoredPaths.delete(path17 + SLASH_GLOBSTAR);
|
|
81399
81399
|
this._userIgnored = void 0;
|
|
81400
81400
|
return true;
|
|
81401
81401
|
});
|
|
81402
81402
|
if (this.options.useFsEvents && this._fsEventsHandler) {
|
|
81403
81403
|
if (!this._readyCount) this._readyCount = paths.length;
|
|
81404
81404
|
if (this.options.persistent) this._readyCount += paths.length;
|
|
81405
|
-
paths.forEach((
|
|
81405
|
+
paths.forEach((path17) => this._fsEventsHandler._addToFsEvents(path17));
|
|
81406
81406
|
} else {
|
|
81407
81407
|
if (!this._readyCount) this._readyCount = 0;
|
|
81408
81408
|
this._readyCount += paths.length;
|
|
81409
81409
|
Promise.all(
|
|
81410
|
-
paths.map(async (
|
|
81411
|
-
const res = await this._nodeFsHandler._addToNodeFs(
|
|
81410
|
+
paths.map(async (path17) => {
|
|
81411
|
+
const res = await this._nodeFsHandler._addToNodeFs(path17, !_internal, 0, 0, _origAdd);
|
|
81412
81412
|
if (res) this._emitReady();
|
|
81413
81413
|
return res;
|
|
81414
81414
|
})
|
|
@@ -81430,15 +81430,15 @@ var require_chokidar = __commonJS({
|
|
|
81430
81430
|
if (this.closed) return this;
|
|
81431
81431
|
const paths = unifyPaths(paths_);
|
|
81432
81432
|
const { cwd } = this.options;
|
|
81433
|
-
paths.forEach((
|
|
81434
|
-
if (!sysPath.isAbsolute(
|
|
81435
|
-
if (cwd)
|
|
81436
|
-
|
|
81433
|
+
paths.forEach((path17) => {
|
|
81434
|
+
if (!sysPath.isAbsolute(path17) && !this._closers.has(path17)) {
|
|
81435
|
+
if (cwd) path17 = sysPath.join(cwd, path17);
|
|
81436
|
+
path17 = sysPath.resolve(path17);
|
|
81437
81437
|
}
|
|
81438
|
-
this._closePath(
|
|
81439
|
-
this._ignoredPaths.add(
|
|
81440
|
-
if (this._watched.has(
|
|
81441
|
-
this._ignoredPaths.add(
|
|
81438
|
+
this._closePath(path17);
|
|
81439
|
+
this._ignoredPaths.add(path17);
|
|
81440
|
+
if (this._watched.has(path17)) {
|
|
81441
|
+
this._ignoredPaths.add(path17 + SLASH_GLOBSTAR);
|
|
81442
81442
|
}
|
|
81443
81443
|
this._userIgnored = void 0;
|
|
81444
81444
|
});
|
|
@@ -81496,36 +81496,36 @@ var require_chokidar = __commonJS({
|
|
|
81496
81496
|
* @param {*=} val3
|
|
81497
81497
|
* @returns the error if defined, otherwise the value of the FSWatcher instance's `closed` flag
|
|
81498
81498
|
*/
|
|
81499
|
-
async _emit(event,
|
|
81499
|
+
async _emit(event, path17, val1, val2, val3) {
|
|
81500
81500
|
if (this.closed) return;
|
|
81501
81501
|
const opts = this.options;
|
|
81502
|
-
if (isWindows)
|
|
81503
|
-
if (opts.cwd)
|
|
81504
|
-
const args = [event,
|
|
81502
|
+
if (isWindows) path17 = sysPath.normalize(path17);
|
|
81503
|
+
if (opts.cwd) path17 = sysPath.relative(opts.cwd, path17);
|
|
81504
|
+
const args = [event, path17];
|
|
81505
81505
|
if (val3 !== void 0) args.push(val1, val2, val3);
|
|
81506
81506
|
else if (val2 !== void 0) args.push(val1, val2);
|
|
81507
81507
|
else if (val1 !== void 0) args.push(val1);
|
|
81508
81508
|
const awf = opts.awaitWriteFinish;
|
|
81509
81509
|
let pw;
|
|
81510
|
-
if (awf && (pw = this._pendingWrites.get(
|
|
81510
|
+
if (awf && (pw = this._pendingWrites.get(path17))) {
|
|
81511
81511
|
pw.lastChange = /* @__PURE__ */ new Date();
|
|
81512
81512
|
return this;
|
|
81513
81513
|
}
|
|
81514
81514
|
if (opts.atomic) {
|
|
81515
81515
|
if (event === EV_UNLINK) {
|
|
81516
|
-
this._pendingUnlinks.set(
|
|
81516
|
+
this._pendingUnlinks.set(path17, args);
|
|
81517
81517
|
setTimeout(() => {
|
|
81518
|
-
this._pendingUnlinks.forEach((entry,
|
|
81518
|
+
this._pendingUnlinks.forEach((entry, path18) => {
|
|
81519
81519
|
this.emit(...entry);
|
|
81520
81520
|
this.emit(EV_ALL, ...entry);
|
|
81521
|
-
this._pendingUnlinks.delete(
|
|
81521
|
+
this._pendingUnlinks.delete(path18);
|
|
81522
81522
|
});
|
|
81523
81523
|
}, typeof opts.atomic === "number" ? opts.atomic : 100);
|
|
81524
81524
|
return this;
|
|
81525
81525
|
}
|
|
81526
|
-
if (event === EV_ADD && this._pendingUnlinks.has(
|
|
81526
|
+
if (event === EV_ADD && this._pendingUnlinks.has(path17)) {
|
|
81527
81527
|
event = args[0] = EV_CHANGE;
|
|
81528
|
-
this._pendingUnlinks.delete(
|
|
81528
|
+
this._pendingUnlinks.delete(path17);
|
|
81529
81529
|
}
|
|
81530
81530
|
}
|
|
81531
81531
|
if (awf && (event === EV_ADD || event === EV_CHANGE) && this._readyEmitted) {
|
|
@@ -81543,15 +81543,15 @@ var require_chokidar = __commonJS({
|
|
|
81543
81543
|
this.emitWithAll(event, args);
|
|
81544
81544
|
}
|
|
81545
81545
|
};
|
|
81546
|
-
this._awaitWriteFinish(
|
|
81546
|
+
this._awaitWriteFinish(path17, awf.stabilityThreshold, event, awfEmit);
|
|
81547
81547
|
return this;
|
|
81548
81548
|
}
|
|
81549
81549
|
if (event === EV_CHANGE) {
|
|
81550
|
-
const isThrottled = !this._throttle(EV_CHANGE,
|
|
81550
|
+
const isThrottled = !this._throttle(EV_CHANGE, path17, 50);
|
|
81551
81551
|
if (isThrottled) return this;
|
|
81552
81552
|
}
|
|
81553
81553
|
if (opts.alwaysStat && val1 === void 0 && (event === EV_ADD || event === EV_ADD_DIR || event === EV_CHANGE)) {
|
|
81554
|
-
const fullPath = opts.cwd ? sysPath.join(opts.cwd,
|
|
81554
|
+
const fullPath = opts.cwd ? sysPath.join(opts.cwd, path17) : path17;
|
|
81555
81555
|
let stats;
|
|
81556
81556
|
try {
|
|
81557
81557
|
stats = await stat(fullPath);
|
|
@@ -81582,28 +81582,28 @@ var require_chokidar = __commonJS({
|
|
|
81582
81582
|
* @param {Number} timeout duration of time to suppress duplicate actions
|
|
81583
81583
|
* @returns {Object|false} tracking object or false if action should be suppressed
|
|
81584
81584
|
*/
|
|
81585
|
-
_throttle(actionType,
|
|
81585
|
+
_throttle(actionType, path17, timeout) {
|
|
81586
81586
|
if (!this._throttled.has(actionType)) {
|
|
81587
81587
|
this._throttled.set(actionType, /* @__PURE__ */ new Map());
|
|
81588
81588
|
}
|
|
81589
81589
|
const action = this._throttled.get(actionType);
|
|
81590
|
-
const actionPath = action.get(
|
|
81590
|
+
const actionPath = action.get(path17);
|
|
81591
81591
|
if (actionPath) {
|
|
81592
81592
|
actionPath.count++;
|
|
81593
81593
|
return false;
|
|
81594
81594
|
}
|
|
81595
81595
|
let timeoutObject;
|
|
81596
81596
|
const clear = () => {
|
|
81597
|
-
const item = action.get(
|
|
81597
|
+
const item = action.get(path17);
|
|
81598
81598
|
const count = item ? item.count : 0;
|
|
81599
|
-
action.delete(
|
|
81599
|
+
action.delete(path17);
|
|
81600
81600
|
clearTimeout(timeoutObject);
|
|
81601
81601
|
if (item) clearTimeout(item.timeoutObject);
|
|
81602
81602
|
return count;
|
|
81603
81603
|
};
|
|
81604
81604
|
timeoutObject = setTimeout(clear, timeout);
|
|
81605
81605
|
const thr = { timeoutObject, clear, count: 0 };
|
|
81606
|
-
action.set(
|
|
81606
|
+
action.set(path17, thr);
|
|
81607
81607
|
return thr;
|
|
81608
81608
|
}
|
|
81609
81609
|
_incrReadyCount() {
|
|
@@ -81617,27 +81617,27 @@ var require_chokidar = __commonJS({
|
|
|
81617
81617
|
* @param {EventName} event
|
|
81618
81618
|
* @param {Function} awfEmit Callback to be called when ready for event to be emitted.
|
|
81619
81619
|
*/
|
|
81620
|
-
_awaitWriteFinish(
|
|
81620
|
+
_awaitWriteFinish(path17, threshold, event, awfEmit) {
|
|
81621
81621
|
let timeoutHandler;
|
|
81622
|
-
let fullPath =
|
|
81623
|
-
if (this.options.cwd && !sysPath.isAbsolute(
|
|
81624
|
-
fullPath = sysPath.join(this.options.cwd,
|
|
81622
|
+
let fullPath = path17;
|
|
81623
|
+
if (this.options.cwd && !sysPath.isAbsolute(path17)) {
|
|
81624
|
+
fullPath = sysPath.join(this.options.cwd, path17);
|
|
81625
81625
|
}
|
|
81626
81626
|
const now = /* @__PURE__ */ new Date();
|
|
81627
81627
|
const awaitWriteFinish = (prevStat) => {
|
|
81628
|
-
|
|
81629
|
-
if (err || !this._pendingWrites.has(
|
|
81628
|
+
fs21.stat(fullPath, (err, curStat) => {
|
|
81629
|
+
if (err || !this._pendingWrites.has(path17)) {
|
|
81630
81630
|
if (err && err.code !== "ENOENT") awfEmit(err);
|
|
81631
81631
|
return;
|
|
81632
81632
|
}
|
|
81633
81633
|
const now2 = Number(/* @__PURE__ */ new Date());
|
|
81634
81634
|
if (prevStat && curStat.size !== prevStat.size) {
|
|
81635
|
-
this._pendingWrites.get(
|
|
81635
|
+
this._pendingWrites.get(path17).lastChange = now2;
|
|
81636
81636
|
}
|
|
81637
|
-
const pw = this._pendingWrites.get(
|
|
81637
|
+
const pw = this._pendingWrites.get(path17);
|
|
81638
81638
|
const df = now2 - pw.lastChange;
|
|
81639
81639
|
if (df >= threshold) {
|
|
81640
|
-
this._pendingWrites.delete(
|
|
81640
|
+
this._pendingWrites.delete(path17);
|
|
81641
81641
|
awfEmit(void 0, curStat);
|
|
81642
81642
|
} else {
|
|
81643
81643
|
timeoutHandler = setTimeout(
|
|
@@ -81648,11 +81648,11 @@ var require_chokidar = __commonJS({
|
|
|
81648
81648
|
}
|
|
81649
81649
|
});
|
|
81650
81650
|
};
|
|
81651
|
-
if (!this._pendingWrites.has(
|
|
81652
|
-
this._pendingWrites.set(
|
|
81651
|
+
if (!this._pendingWrites.has(path17)) {
|
|
81652
|
+
this._pendingWrites.set(path17, {
|
|
81653
81653
|
lastChange: now,
|
|
81654
81654
|
cancelWait: () => {
|
|
81655
|
-
this._pendingWrites.delete(
|
|
81655
|
+
this._pendingWrites.delete(path17);
|
|
81656
81656
|
clearTimeout(timeoutHandler);
|
|
81657
81657
|
return event;
|
|
81658
81658
|
}
|
|
@@ -81672,20 +81672,20 @@ var require_chokidar = __commonJS({
|
|
|
81672
81672
|
* @param {fs.Stats=} stats result of fs.stat
|
|
81673
81673
|
* @returns {Boolean}
|
|
81674
81674
|
*/
|
|
81675
|
-
_isIgnored(
|
|
81676
|
-
if (this.options.atomic && DOT_RE.test(
|
|
81675
|
+
_isIgnored(path17, stats) {
|
|
81676
|
+
if (this.options.atomic && DOT_RE.test(path17)) return true;
|
|
81677
81677
|
if (!this._userIgnored) {
|
|
81678
81678
|
const { cwd } = this.options;
|
|
81679
81679
|
const ign = this.options.ignored;
|
|
81680
81680
|
const ignored = ign && ign.map(normalizeIgnored(cwd));
|
|
81681
|
-
const paths = arrify(ignored).filter((
|
|
81681
|
+
const paths = arrify(ignored).filter((path18) => typeof path18 === STRING_TYPE && !isGlob(path18)).map((path18) => path18 + SLASH_GLOBSTAR);
|
|
81682
81682
|
const list = this._getGlobIgnored().map(normalizeIgnored(cwd)).concat(ignored, paths);
|
|
81683
81683
|
this._userIgnored = anymatch(list, void 0, ANYMATCH_OPTS);
|
|
81684
81684
|
}
|
|
81685
|
-
return this._userIgnored([
|
|
81685
|
+
return this._userIgnored([path17, stats]);
|
|
81686
81686
|
}
|
|
81687
|
-
_isntIgnored(
|
|
81688
|
-
return !this._isIgnored(
|
|
81687
|
+
_isntIgnored(path17, stat2) {
|
|
81688
|
+
return !this._isIgnored(path17, stat2);
|
|
81689
81689
|
}
|
|
81690
81690
|
/**
|
|
81691
81691
|
* Provides a set of common helpers and properties relating to symlink and glob handling.
|
|
@@ -81693,10 +81693,10 @@ var require_chokidar = __commonJS({
|
|
|
81693
81693
|
* @param {Number=} depth at any depth > 0, this isn't a glob
|
|
81694
81694
|
* @returns {WatchHelper} object containing helpers for this path
|
|
81695
81695
|
*/
|
|
81696
|
-
_getWatchHelpers(
|
|
81697
|
-
const watchPath = depth || this.options.disableGlobbing || !isGlob(
|
|
81696
|
+
_getWatchHelpers(path17, depth) {
|
|
81697
|
+
const watchPath = depth || this.options.disableGlobbing || !isGlob(path17) ? path17 : globParent(path17);
|
|
81698
81698
|
const follow = this.options.followSymlinks;
|
|
81699
|
-
return new WatchHelper(
|
|
81699
|
+
return new WatchHelper(path17, watchPath, follow, this);
|
|
81700
81700
|
}
|
|
81701
81701
|
// Directory helpers
|
|
81702
81702
|
// -----------------
|
|
@@ -81735,66 +81735,66 @@ var require_chokidar = __commonJS({
|
|
|
81735
81735
|
* @returns {void}
|
|
81736
81736
|
*/
|
|
81737
81737
|
_remove(directory, item, isDirectory) {
|
|
81738
|
-
const
|
|
81739
|
-
const fullPath = sysPath.resolve(
|
|
81740
|
-
isDirectory = isDirectory != null ? isDirectory : this._watched.has(
|
|
81741
|
-
if (!this._throttle("remove",
|
|
81738
|
+
const path17 = sysPath.join(directory, item);
|
|
81739
|
+
const fullPath = sysPath.resolve(path17);
|
|
81740
|
+
isDirectory = isDirectory != null ? isDirectory : this._watched.has(path17) || this._watched.has(fullPath);
|
|
81741
|
+
if (!this._throttle("remove", path17, 100)) return;
|
|
81742
81742
|
if (!isDirectory && !this.options.useFsEvents && this._watched.size === 1) {
|
|
81743
81743
|
this.add(directory, item, true);
|
|
81744
81744
|
}
|
|
81745
|
-
const wp = this._getWatchedDir(
|
|
81745
|
+
const wp = this._getWatchedDir(path17);
|
|
81746
81746
|
const nestedDirectoryChildren = wp.getChildren();
|
|
81747
|
-
nestedDirectoryChildren.forEach((nested) => this._remove(
|
|
81747
|
+
nestedDirectoryChildren.forEach((nested) => this._remove(path17, nested));
|
|
81748
81748
|
const parent = this._getWatchedDir(directory);
|
|
81749
81749
|
const wasTracked = parent.has(item);
|
|
81750
81750
|
parent.remove(item);
|
|
81751
81751
|
if (this._symlinkPaths.has(fullPath)) {
|
|
81752
81752
|
this._symlinkPaths.delete(fullPath);
|
|
81753
81753
|
}
|
|
81754
|
-
let relPath =
|
|
81755
|
-
if (this.options.cwd) relPath = sysPath.relative(this.options.cwd,
|
|
81754
|
+
let relPath = path17;
|
|
81755
|
+
if (this.options.cwd) relPath = sysPath.relative(this.options.cwd, path17);
|
|
81756
81756
|
if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) {
|
|
81757
81757
|
const event = this._pendingWrites.get(relPath).cancelWait();
|
|
81758
81758
|
if (event === EV_ADD) return;
|
|
81759
81759
|
}
|
|
81760
|
-
this._watched.delete(
|
|
81760
|
+
this._watched.delete(path17);
|
|
81761
81761
|
this._watched.delete(fullPath);
|
|
81762
81762
|
const eventName = isDirectory ? EV_UNLINK_DIR : EV_UNLINK;
|
|
81763
|
-
if (wasTracked && !this._isIgnored(
|
|
81763
|
+
if (wasTracked && !this._isIgnored(path17)) this._emit(eventName, path17);
|
|
81764
81764
|
if (!this.options.useFsEvents) {
|
|
81765
|
-
this._closePath(
|
|
81765
|
+
this._closePath(path17);
|
|
81766
81766
|
}
|
|
81767
81767
|
}
|
|
81768
81768
|
/**
|
|
81769
81769
|
* Closes all watchers for a path
|
|
81770
81770
|
* @param {Path} path
|
|
81771
81771
|
*/
|
|
81772
|
-
_closePath(
|
|
81773
|
-
this._closeFile(
|
|
81774
|
-
const dir = sysPath.dirname(
|
|
81775
|
-
this._getWatchedDir(dir).remove(sysPath.basename(
|
|
81772
|
+
_closePath(path17) {
|
|
81773
|
+
this._closeFile(path17);
|
|
81774
|
+
const dir = sysPath.dirname(path17);
|
|
81775
|
+
this._getWatchedDir(dir).remove(sysPath.basename(path17));
|
|
81776
81776
|
}
|
|
81777
81777
|
/**
|
|
81778
81778
|
* Closes only file-specific watchers
|
|
81779
81779
|
* @param {Path} path
|
|
81780
81780
|
*/
|
|
81781
|
-
_closeFile(
|
|
81782
|
-
const closers = this._closers.get(
|
|
81781
|
+
_closeFile(path17) {
|
|
81782
|
+
const closers = this._closers.get(path17);
|
|
81783
81783
|
if (!closers) return;
|
|
81784
81784
|
closers.forEach((closer) => closer());
|
|
81785
|
-
this._closers.delete(
|
|
81785
|
+
this._closers.delete(path17);
|
|
81786
81786
|
}
|
|
81787
81787
|
/**
|
|
81788
81788
|
*
|
|
81789
81789
|
* @param {Path} path
|
|
81790
81790
|
* @param {Function} closer
|
|
81791
81791
|
*/
|
|
81792
|
-
_addPathCloser(
|
|
81792
|
+
_addPathCloser(path17, closer) {
|
|
81793
81793
|
if (!closer) return;
|
|
81794
|
-
let list = this._closers.get(
|
|
81794
|
+
let list = this._closers.get(path17);
|
|
81795
81795
|
if (!list) {
|
|
81796
81796
|
list = [];
|
|
81797
|
-
this._closers.set(
|
|
81797
|
+
this._closers.set(path17, list);
|
|
81798
81798
|
}
|
|
81799
81799
|
list.push(closer);
|
|
81800
81800
|
}
|
|
@@ -82982,13 +82982,13 @@ var require_ast = __commonJS({
|
|
|
82982
82982
|
helperExpression: function helperExpression(node) {
|
|
82983
82983
|
return node.type === "SubExpression" || (node.type === "MustacheStatement" || node.type === "BlockStatement") && !!(node.params && node.params.length || node.hash);
|
|
82984
82984
|
},
|
|
82985
|
-
scopedId: function scopedId(
|
|
82986
|
-
return /^\.|this\b/.test(
|
|
82985
|
+
scopedId: function scopedId(path17) {
|
|
82986
|
+
return /^\.|this\b/.test(path17.original);
|
|
82987
82987
|
},
|
|
82988
82988
|
// an ID is simple if it only has one part, and that part is not
|
|
82989
82989
|
// `..` or `this`.
|
|
82990
|
-
simpleId: function simpleId(
|
|
82991
|
-
return
|
|
82990
|
+
simpleId: function simpleId(path17) {
|
|
82991
|
+
return path17.parts.length === 1 && !AST.helpers.scopedId(path17) && !path17.depth;
|
|
82992
82992
|
}
|
|
82993
82993
|
}
|
|
82994
82994
|
};
|
|
@@ -84058,12 +84058,12 @@ var require_helpers2 = __commonJS({
|
|
|
84058
84058
|
loc
|
|
84059
84059
|
};
|
|
84060
84060
|
}
|
|
84061
|
-
function prepareMustache(
|
|
84061
|
+
function prepareMustache(path17, params, hash2, open, strip, locInfo) {
|
|
84062
84062
|
var escapeFlag = open.charAt(3) || open.charAt(2), escaped = escapeFlag !== "{" && escapeFlag !== "&";
|
|
84063
84063
|
var decorator = /\*/.test(open);
|
|
84064
84064
|
return {
|
|
84065
84065
|
type: decorator ? "Decorator" : "MustacheStatement",
|
|
84066
|
-
path:
|
|
84066
|
+
path: path17,
|
|
84067
84067
|
params,
|
|
84068
84068
|
hash: hash2,
|
|
84069
84069
|
escaped,
|
|
@@ -84381,9 +84381,9 @@ var require_compiler = __commonJS({
|
|
|
84381
84381
|
},
|
|
84382
84382
|
DecoratorBlock: function DecoratorBlock(decorator) {
|
|
84383
84383
|
var program2 = decorator.program && this.compileProgram(decorator.program);
|
|
84384
|
-
var params = this.setupFullMustacheParams(decorator, program2, void 0),
|
|
84384
|
+
var params = this.setupFullMustacheParams(decorator, program2, void 0), path17 = decorator.path;
|
|
84385
84385
|
this.useDecorators = true;
|
|
84386
|
-
this.opcode("registerDecorator", params.length,
|
|
84386
|
+
this.opcode("registerDecorator", params.length, path17.original);
|
|
84387
84387
|
},
|
|
84388
84388
|
PartialStatement: function PartialStatement(partial2) {
|
|
84389
84389
|
this.usePartial = true;
|
|
@@ -84447,46 +84447,46 @@ var require_compiler = __commonJS({
|
|
|
84447
84447
|
}
|
|
84448
84448
|
},
|
|
84449
84449
|
ambiguousSexpr: function ambiguousSexpr(sexpr, program2, inverse) {
|
|
84450
|
-
var
|
|
84451
|
-
this.opcode("getContext",
|
|
84450
|
+
var path17 = sexpr.path, name = path17.parts[0], isBlock = program2 != null || inverse != null;
|
|
84451
|
+
this.opcode("getContext", path17.depth);
|
|
84452
84452
|
this.opcode("pushProgram", program2);
|
|
84453
84453
|
this.opcode("pushProgram", inverse);
|
|
84454
|
-
|
|
84455
|
-
this.accept(
|
|
84454
|
+
path17.strict = true;
|
|
84455
|
+
this.accept(path17);
|
|
84456
84456
|
this.opcode("invokeAmbiguous", name, isBlock);
|
|
84457
84457
|
},
|
|
84458
84458
|
simpleSexpr: function simpleSexpr(sexpr) {
|
|
84459
|
-
var
|
|
84460
|
-
|
|
84461
|
-
this.accept(
|
|
84459
|
+
var path17 = sexpr.path;
|
|
84460
|
+
path17.strict = true;
|
|
84461
|
+
this.accept(path17);
|
|
84462
84462
|
this.opcode("resolvePossibleLambda");
|
|
84463
84463
|
},
|
|
84464
84464
|
helperSexpr: function helperSexpr(sexpr, program2, inverse) {
|
|
84465
|
-
var params = this.setupFullMustacheParams(sexpr, program2, inverse),
|
|
84465
|
+
var params = this.setupFullMustacheParams(sexpr, program2, inverse), path17 = sexpr.path, name = path17.parts[0];
|
|
84466
84466
|
if (this.options.knownHelpers[name]) {
|
|
84467
84467
|
this.opcode("invokeKnownHelper", params.length, name);
|
|
84468
84468
|
} else if (this.options.knownHelpersOnly) {
|
|
84469
84469
|
throw new _exception2["default"]("You specified knownHelpersOnly, but used the unknown helper " + name, sexpr);
|
|
84470
84470
|
} else {
|
|
84471
|
-
|
|
84472
|
-
|
|
84473
|
-
this.accept(
|
|
84474
|
-
this.opcode("invokeHelper", params.length,
|
|
84471
|
+
path17.strict = true;
|
|
84472
|
+
path17.falsy = true;
|
|
84473
|
+
this.accept(path17);
|
|
84474
|
+
this.opcode("invokeHelper", params.length, path17.original, _ast2["default"].helpers.simpleId(path17));
|
|
84475
84475
|
}
|
|
84476
84476
|
},
|
|
84477
|
-
PathExpression: function PathExpression(
|
|
84478
|
-
this.addDepth(
|
|
84479
|
-
this.opcode("getContext",
|
|
84480
|
-
var name =
|
|
84477
|
+
PathExpression: function PathExpression(path17) {
|
|
84478
|
+
this.addDepth(path17.depth);
|
|
84479
|
+
this.opcode("getContext", path17.depth);
|
|
84480
|
+
var name = path17.parts[0], scoped = _ast2["default"].helpers.scopedId(path17), blockParamId = !path17.depth && !scoped && this.blockParamIndex(name);
|
|
84481
84481
|
if (blockParamId) {
|
|
84482
|
-
this.opcode("lookupBlockParam", blockParamId,
|
|
84482
|
+
this.opcode("lookupBlockParam", blockParamId, path17.parts);
|
|
84483
84483
|
} else if (!name) {
|
|
84484
84484
|
this.opcode("pushContext");
|
|
84485
|
-
} else if (
|
|
84485
|
+
} else if (path17.data) {
|
|
84486
84486
|
this.options.data = true;
|
|
84487
|
-
this.opcode("lookupData",
|
|
84487
|
+
this.opcode("lookupData", path17.depth, path17.parts, path17.strict);
|
|
84488
84488
|
} else {
|
|
84489
|
-
this.opcode("lookupOnContext",
|
|
84489
|
+
this.opcode("lookupOnContext", path17.parts, path17.falsy, path17.strict, scoped);
|
|
84490
84490
|
}
|
|
84491
84491
|
},
|
|
84492
84492
|
StringLiteral: function StringLiteral(string4) {
|
|
@@ -84836,16 +84836,16 @@ var require_util10 = __commonJS({
|
|
|
84836
84836
|
}
|
|
84837
84837
|
exports.urlGenerate = urlGenerate;
|
|
84838
84838
|
function normalize(aPath) {
|
|
84839
|
-
var
|
|
84839
|
+
var path17 = aPath;
|
|
84840
84840
|
var url2 = urlParse(aPath);
|
|
84841
84841
|
if (url2) {
|
|
84842
84842
|
if (!url2.path) {
|
|
84843
84843
|
return aPath;
|
|
84844
84844
|
}
|
|
84845
|
-
|
|
84845
|
+
path17 = url2.path;
|
|
84846
84846
|
}
|
|
84847
|
-
var isAbsolute2 = exports.isAbsolute(
|
|
84848
|
-
var parts =
|
|
84847
|
+
var isAbsolute2 = exports.isAbsolute(path17);
|
|
84848
|
+
var parts = path17.split(/\/+/);
|
|
84849
84849
|
for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
|
|
84850
84850
|
part = parts[i];
|
|
84851
84851
|
if (part === ".") {
|
|
@@ -84862,15 +84862,15 @@ var require_util10 = __commonJS({
|
|
|
84862
84862
|
}
|
|
84863
84863
|
}
|
|
84864
84864
|
}
|
|
84865
|
-
|
|
84866
|
-
if (
|
|
84867
|
-
|
|
84865
|
+
path17 = parts.join("/");
|
|
84866
|
+
if (path17 === "") {
|
|
84867
|
+
path17 = isAbsolute2 ? "/" : ".";
|
|
84868
84868
|
}
|
|
84869
84869
|
if (url2) {
|
|
84870
|
-
url2.path =
|
|
84870
|
+
url2.path = path17;
|
|
84871
84871
|
return urlGenerate(url2);
|
|
84872
84872
|
}
|
|
84873
|
-
return
|
|
84873
|
+
return path17;
|
|
84874
84874
|
}
|
|
84875
84875
|
exports.normalize = normalize;
|
|
84876
84876
|
function join3(aRoot, aPath) {
|
|
@@ -87653,8 +87653,8 @@ var require_printer = __commonJS({
|
|
|
87653
87653
|
return this.accept(sexpr.path) + " " + params + hash2;
|
|
87654
87654
|
};
|
|
87655
87655
|
PrintVisitor.prototype.PathExpression = function(id) {
|
|
87656
|
-
var
|
|
87657
|
-
return (id.data ? "@" : "") + "PATH:" +
|
|
87656
|
+
var path17 = id.parts.join("/");
|
|
87657
|
+
return (id.data ? "@" : "") + "PATH:" + path17;
|
|
87658
87658
|
};
|
|
87659
87659
|
PrintVisitor.prototype.StringLiteral = function(string4) {
|
|
87660
87660
|
return '"' + string4.value + '"';
|
|
@@ -87693,8 +87693,8 @@ var require_lib3 = __commonJS({
|
|
|
87693
87693
|
handlebars.print = printer.print;
|
|
87694
87694
|
module.exports = handlebars;
|
|
87695
87695
|
function extension(module2, filename) {
|
|
87696
|
-
var
|
|
87697
|
-
var templateString =
|
|
87696
|
+
var fs21 = __require("fs");
|
|
87697
|
+
var templateString = fs21.readFileSync(filename, "utf8");
|
|
87698
87698
|
module2.exports = handlebars.compile(templateString);
|
|
87699
87699
|
}
|
|
87700
87700
|
if (typeof __require !== "undefined" && __require.extensions) {
|
|
@@ -87731,7 +87731,7 @@ var package_default = {
|
|
|
87731
87731
|
type: "module",
|
|
87732
87732
|
homepage: "https://appwrite.io/support",
|
|
87733
87733
|
description: "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
|
|
87734
|
-
version: "18.0
|
|
87734
|
+
version: "18.1.0",
|
|
87735
87735
|
license: "BSD-3-Clause",
|
|
87736
87736
|
main: "dist/index.cjs",
|
|
87737
87737
|
module: "dist/index.js",
|
|
@@ -87763,9 +87763,9 @@ var package_default = {
|
|
|
87763
87763
|
"build:types": "tsc -p tsconfig.json --emitDeclarationOnly",
|
|
87764
87764
|
"build:runtime": "npm run build:lib:runtime && npm run build:cli",
|
|
87765
87765
|
"build:lib:runtime": "npm run build:lib:esm && npm run build:lib:cjs",
|
|
87766
|
-
"build:lib:esm": "esbuild index.ts --bundle --platform=node --target=node18 --format=esm --loader:.hbs=text --outfile=dist/index.js",
|
|
87767
|
-
"build:lib:cjs": "esbuild index.ts --bundle --platform=node --target=node18 --format=cjs --loader:.hbs=text --outfile=dist/index.cjs",
|
|
87768
|
-
"build:cli": "esbuild cli.ts --bundle --platform=node --target=node18 --format=cjs --loader:.hbs=text --external:fsevents --outfile=dist/cli.cjs",
|
|
87766
|
+
"build:lib:esm": "esbuild index.ts --bundle --platform=node --target=node18 --format=esm --loader:.hbs=text --external:terminal-image --outfile=dist/index.js",
|
|
87767
|
+
"build:lib:cjs": "esbuild index.ts --bundle --platform=node --target=node18 --format=cjs --loader:.hbs=text --external:terminal-image --outfile=dist/index.cjs",
|
|
87768
|
+
"build:cli": "esbuild cli.ts --bundle --platform=node --target=node18 --format=cjs --loader:.hbs=text --external:fsevents --external:terminal-image --outfile=dist/cli.cjs",
|
|
87769
87769
|
lint: "eslint .",
|
|
87770
87770
|
format: 'prettier --write "**/*.{js,ts,json,md}"',
|
|
87771
87771
|
generate: "tsx scripts/generate-commands.ts",
|
|
@@ -87776,7 +87776,7 @@ var package_default = {
|
|
|
87776
87776
|
"mac-x64": "bun build cli.ts --compile --sourcemap=inline --target=bun-darwin-x64 --outfile build/appwrite-cli-darwin-x64",
|
|
87777
87777
|
"mac-arm64": "bun build cli.ts --compile --sourcemap=inline --target=bun-darwin-arm64 --outfile build/appwrite-cli-darwin-arm64",
|
|
87778
87778
|
"windows-x64": "bun build cli.ts --compile --sourcemap=inline --target=bun-windows-x64 --outfile build/appwrite-cli-win-x64.exe",
|
|
87779
|
-
"windows-arm64": "esbuild cli.ts --bundle --loader:.hbs=text --platform=node --target=node18 --format=esm --external:fsevents --outfile=dist/bundle-win-arm64.mjs && pkg dist/bundle-win-arm64.mjs -t node18-win-arm64 -o build/appwrite-cli-win-arm64.exe"
|
|
87779
|
+
"windows-arm64": "esbuild cli.ts --bundle --loader:.hbs=text --platform=node --target=node18 --format=esm --external:fsevents --external:terminal-image --outfile=dist/bundle-win-arm64.mjs && pkg dist/bundle-win-arm64.mjs -t node18-win-arm64 -o build/appwrite-cli-win-arm64.exe"
|
|
87780
87780
|
},
|
|
87781
87781
|
dependencies: {
|
|
87782
87782
|
"@appwrite.io/console": "~9.1.0",
|
|
@@ -87795,9 +87795,13 @@ var package_default = {
|
|
|
87795
87795
|
"string-width": "^7.2.0",
|
|
87796
87796
|
tail: "^2.2.6",
|
|
87797
87797
|
tar: "^7.4.3",
|
|
87798
|
+
"terminal-image": "^3.1.1",
|
|
87798
87799
|
undici: "^6.24.0",
|
|
87799
87800
|
zod: "^4.3.5"
|
|
87800
87801
|
},
|
|
87802
|
+
overrides: {
|
|
87803
|
+
phin: "3.7.1"
|
|
87804
|
+
},
|
|
87801
87805
|
devDependencies: {
|
|
87802
87806
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
87803
87807
|
"@typescript-eslint/parser": "^8.0.0",
|
|
@@ -88601,10 +88605,10 @@ function mergeDefs(...defs) {
|
|
|
88601
88605
|
function cloneDef(schema) {
|
|
88602
88606
|
return mergeDefs(schema._zod.def);
|
|
88603
88607
|
}
|
|
88604
|
-
function getElementAtPath(obj,
|
|
88605
|
-
if (!
|
|
88608
|
+
function getElementAtPath(obj, path17) {
|
|
88609
|
+
if (!path17)
|
|
88606
88610
|
return obj;
|
|
88607
|
-
return
|
|
88611
|
+
return path17.reduce((acc, key) => acc?.[key], obj);
|
|
88608
88612
|
}
|
|
88609
88613
|
function promiseAllObject(promisesObj) {
|
|
88610
88614
|
const keys = Object.keys(promisesObj);
|
|
@@ -88987,11 +88991,11 @@ function aborted(x, startIndex = 0) {
|
|
|
88987
88991
|
}
|
|
88988
88992
|
return false;
|
|
88989
88993
|
}
|
|
88990
|
-
function prefixIssues(
|
|
88994
|
+
function prefixIssues(path17, issues) {
|
|
88991
88995
|
return issues.map((iss) => {
|
|
88992
88996
|
var _a3;
|
|
88993
88997
|
(_a3 = iss).path ?? (_a3.path = []);
|
|
88994
|
-
iss.path.unshift(
|
|
88998
|
+
iss.path.unshift(path17);
|
|
88995
88999
|
return iss;
|
|
88996
89000
|
});
|
|
88997
89001
|
}
|
|
@@ -89174,7 +89178,7 @@ function formatError(error49, mapper = (issue2) => issue2.message) {
|
|
|
89174
89178
|
}
|
|
89175
89179
|
function treeifyError(error49, mapper = (issue2) => issue2.message) {
|
|
89176
89180
|
const result = { errors: [] };
|
|
89177
|
-
const processError = (error50,
|
|
89181
|
+
const processError = (error50, path17 = []) => {
|
|
89178
89182
|
var _a3, _b;
|
|
89179
89183
|
for (const issue2 of error50.issues) {
|
|
89180
89184
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
@@ -89184,7 +89188,7 @@ function treeifyError(error49, mapper = (issue2) => issue2.message) {
|
|
|
89184
89188
|
} else if (issue2.code === "invalid_element") {
|
|
89185
89189
|
processError({ issues: issue2.issues }, issue2.path);
|
|
89186
89190
|
} else {
|
|
89187
|
-
const fullpath = [...
|
|
89191
|
+
const fullpath = [...path17, ...issue2.path];
|
|
89188
89192
|
if (fullpath.length === 0) {
|
|
89189
89193
|
result.errors.push(mapper(issue2));
|
|
89190
89194
|
continue;
|
|
@@ -89216,8 +89220,8 @@ function treeifyError(error49, mapper = (issue2) => issue2.message) {
|
|
|
89216
89220
|
}
|
|
89217
89221
|
function toDotPath(_path2) {
|
|
89218
89222
|
const segs = [];
|
|
89219
|
-
const
|
|
89220
|
-
for (const seg of
|
|
89223
|
+
const path17 = _path2.map((seg) => typeof seg === "object" ? seg.key : seg);
|
|
89224
|
+
for (const seg of path17) {
|
|
89221
89225
|
if (typeof seg === "number")
|
|
89222
89226
|
segs.push(`[${seg}]`);
|
|
89223
89227
|
else if (typeof seg === "symbol")
|
|
@@ -101194,13 +101198,13 @@ function resolveRef(ref, ctx) {
|
|
|
101194
101198
|
if (!ref.startsWith("#")) {
|
|
101195
101199
|
throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
|
|
101196
101200
|
}
|
|
101197
|
-
const
|
|
101198
|
-
if (
|
|
101201
|
+
const path17 = ref.slice(1).split("/").filter(Boolean);
|
|
101202
|
+
if (path17.length === 0) {
|
|
101199
101203
|
return ctx.rootSchema;
|
|
101200
101204
|
}
|
|
101201
101205
|
const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
|
|
101202
|
-
if (
|
|
101203
|
-
const key =
|
|
101206
|
+
if (path17[0] === defsKey) {
|
|
101207
|
+
const key = path17[1];
|
|
101204
101208
|
if (!key || !ctx.defs[key]) {
|
|
101205
101209
|
throw new Error(`Reference not found: ${ref}`);
|
|
101206
101210
|
}
|
|
@@ -102037,7 +102041,7 @@ import childProcess from "child_process";
|
|
|
102037
102041
|
// lib/constants.ts
|
|
102038
102042
|
var SDK_TITLE = "Appwrite";
|
|
102039
102043
|
var SDK_TITLE_LOWER = "appwrite";
|
|
102040
|
-
var SDK_VERSION = "18.
|
|
102044
|
+
var SDK_VERSION = "18.1.0";
|
|
102041
102045
|
var SDK_NAME = "Command Line";
|
|
102042
102046
|
var SDK_PLATFORM = "console";
|
|
102043
102047
|
var SDK_LANGUAGE = "cli";
|
|
@@ -102123,6 +102127,111 @@ var getErrorMessage = (error49) => {
|
|
|
102123
102127
|
}
|
|
102124
102128
|
return String(error49);
|
|
102125
102129
|
};
|
|
102130
|
+
var WINDOWS_EXECUTABLE_NAME = `${EXECUTABLE_NAME.toLowerCase()}.exe`;
|
|
102131
|
+
var HOMEBREW_FORMULA_NAME = EXECUTABLE_NAME.toLowerCase();
|
|
102132
|
+
var getExecutablePaths = () => {
|
|
102133
|
+
const execPath = process.execPath;
|
|
102134
|
+
const scriptPath = process.argv[1] ?? "";
|
|
102135
|
+
try {
|
|
102136
|
+
return {
|
|
102137
|
+
execPath,
|
|
102138
|
+
realExecPath: fs.realpathSync.native(execPath),
|
|
102139
|
+
scriptPath
|
|
102140
|
+
};
|
|
102141
|
+
} catch (_error) {
|
|
102142
|
+
return {
|
|
102143
|
+
execPath,
|
|
102144
|
+
realExecPath: execPath,
|
|
102145
|
+
scriptPath
|
|
102146
|
+
};
|
|
102147
|
+
}
|
|
102148
|
+
};
|
|
102149
|
+
var isExecutableName = (candidatePath) => {
|
|
102150
|
+
const basename = path.basename(candidatePath).toLowerCase();
|
|
102151
|
+
return basename === EXECUTABLE_NAME.toLowerCase() || basename === WINDOWS_EXECUTABLE_NAME;
|
|
102152
|
+
};
|
|
102153
|
+
var isHomebrewManagedPath = (candidatePath) => {
|
|
102154
|
+
return candidatePath.includes("/opt/homebrew/") || candidatePath.includes("/usr/local/Cellar/") || candidatePath.includes("/home/linuxbrew/.linuxbrew/") || candidatePath.includes("/linuxbrew/.linuxbrew/");
|
|
102155
|
+
};
|
|
102156
|
+
var isInstalledViaNpm = () => {
|
|
102157
|
+
try {
|
|
102158
|
+
const { scriptPath } = getExecutablePaths();
|
|
102159
|
+
if (scriptPath.includes("node_modules") && scriptPath.includes(NPM_PACKAGE_NAME)) {
|
|
102160
|
+
return true;
|
|
102161
|
+
}
|
|
102162
|
+
if (scriptPath.includes("/usr/local/lib/node_modules/") || scriptPath.includes("/opt/homebrew/lib/node_modules/") || scriptPath.includes("/.npm-global/") || scriptPath.includes("/node_modules/.bin/") || scriptPath.includes("/.nvm/versions/node/")) {
|
|
102163
|
+
return true;
|
|
102164
|
+
}
|
|
102165
|
+
return false;
|
|
102166
|
+
} catch (_error) {
|
|
102167
|
+
return false;
|
|
102168
|
+
}
|
|
102169
|
+
};
|
|
102170
|
+
var isInstalledViaHomebrew = () => {
|
|
102171
|
+
try {
|
|
102172
|
+
const { execPath, realExecPath, scriptPath } = getExecutablePaths();
|
|
102173
|
+
const runtimeCandidates = [execPath, realExecPath].filter(isExecutableName);
|
|
102174
|
+
return [scriptPath, ...runtimeCandidates].some(isHomebrewManagedPath);
|
|
102175
|
+
} catch (_error) {
|
|
102176
|
+
return false;
|
|
102177
|
+
}
|
|
102178
|
+
};
|
|
102179
|
+
var isInstalledViaStandaloneBinary = () => {
|
|
102180
|
+
if (isInstalledViaNpm() || isInstalledViaHomebrew()) {
|
|
102181
|
+
return false;
|
|
102182
|
+
}
|
|
102183
|
+
try {
|
|
102184
|
+
const { execPath, realExecPath } = getExecutablePaths();
|
|
102185
|
+
return [execPath, realExecPath].some(isExecutableName);
|
|
102186
|
+
} catch (_error) {
|
|
102187
|
+
return false;
|
|
102188
|
+
}
|
|
102189
|
+
};
|
|
102190
|
+
var detectInstallationMethod = () => {
|
|
102191
|
+
if (isInstalledViaNpm()) {
|
|
102192
|
+
return "npm";
|
|
102193
|
+
}
|
|
102194
|
+
if (isInstalledViaHomebrew()) {
|
|
102195
|
+
return "homebrew";
|
|
102196
|
+
}
|
|
102197
|
+
if (isInstalledViaStandaloneBinary()) {
|
|
102198
|
+
return "standalone";
|
|
102199
|
+
}
|
|
102200
|
+
return null;
|
|
102201
|
+
};
|
|
102202
|
+
var getLatestVersionSource = (method = detectInstallationMethod()) => {
|
|
102203
|
+
return method === "homebrew" ? "homebrew" : "npm";
|
|
102204
|
+
};
|
|
102205
|
+
var normalizeHomebrewVersion = (version4) => {
|
|
102206
|
+
return version4.split("_")[0].trim();
|
|
102207
|
+
};
|
|
102208
|
+
var getHomebrewLatestVersion = async (options = {}) => {
|
|
102209
|
+
try {
|
|
102210
|
+
const output = childProcess.execFileSync(
|
|
102211
|
+
"brew",
|
|
102212
|
+
["info", "--json=v2", HOMEBREW_FORMULA_NAME],
|
|
102213
|
+
{
|
|
102214
|
+
encoding: "utf8",
|
|
102215
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
102216
|
+
timeout: options.timeoutMs,
|
|
102217
|
+
env: {
|
|
102218
|
+
...process.env,
|
|
102219
|
+
HOMEBREW_NO_AUTO_UPDATE: "1"
|
|
102220
|
+
}
|
|
102221
|
+
}
|
|
102222
|
+
);
|
|
102223
|
+
const parsed = JSON.parse(output);
|
|
102224
|
+
const stableVersion = parsed.formulae?.[0]?.versions?.stable;
|
|
102225
|
+
if (typeof stableVersion !== "string" || stableVersion.trim() === "") {
|
|
102226
|
+
throw new Error("Homebrew did not return a stable formula version.");
|
|
102227
|
+
}
|
|
102228
|
+
return normalizeHomebrewVersion(stableVersion);
|
|
102229
|
+
} catch (error49) {
|
|
102230
|
+
throw new Error(
|
|
102231
|
+
`Failed to fetch latest Homebrew version: ${getErrorMessage(error49)}`
|
|
102232
|
+
);
|
|
102233
|
+
}
|
|
102234
|
+
};
|
|
102126
102235
|
var isCloudHostname = (hostname3) => hostname3 === "cloud.appwrite.io" || hostname3.endsWith(".cloud.appwrite.io");
|
|
102127
102236
|
var getConsoleBaseUrl = (endpoint) => {
|
|
102128
102237
|
try {
|
|
@@ -102209,7 +102318,8 @@ var readUpdateCheckCache = () => {
|
|
|
102209
102318
|
return {
|
|
102210
102319
|
checkedAt: typeof parsed.checkedAt === "string" ? parsed.checkedAt : normalizeLegacyDate(parsed.checkedOn),
|
|
102211
102320
|
latestVersion: typeof parsed.latestVersion === "string" ? parsed.latestVersion : void 0,
|
|
102212
|
-
notifiedAt: typeof parsed.notifiedAt === "string" ? parsed.notifiedAt : normalizeLegacyDate(parsed.notifiedOn)
|
|
102321
|
+
notifiedAt: typeof parsed.notifiedAt === "string" ? parsed.notifiedAt : normalizeLegacyDate(parsed.notifiedOn),
|
|
102322
|
+
source: parsed.source === "npm" || parsed.source === "homebrew" ? parsed.source : void 0
|
|
102213
102323
|
};
|
|
102214
102324
|
} catch (_error) {
|
|
102215
102325
|
return null;
|
|
@@ -102231,14 +102341,25 @@ var tryWriteUpdateCheckCache = (cache) => {
|
|
|
102231
102341
|
} catch (_error) {
|
|
102232
102342
|
}
|
|
102233
102343
|
};
|
|
102344
|
+
var getCacheForVersionSource = (cache, source) => {
|
|
102345
|
+
if (!cache) {
|
|
102346
|
+
return null;
|
|
102347
|
+
}
|
|
102348
|
+
if (typeof cache.source === "string") {
|
|
102349
|
+
return cache.source === source ? cache : null;
|
|
102350
|
+
}
|
|
102351
|
+
return source === "npm" ? cache : null;
|
|
102352
|
+
};
|
|
102234
102353
|
var syncVersionCheckCache = (currentVersion, latestVersion) => {
|
|
102235
102354
|
const now = getCurrentTimestamp();
|
|
102236
|
-
const
|
|
102355
|
+
const source = getLatestVersionSource();
|
|
102356
|
+
const existingCache = getCacheForVersionSource(readUpdateCheckCache(), source);
|
|
102237
102357
|
const updateAvailable = compareVersions(currentVersion, latestVersion) > 0;
|
|
102238
102358
|
tryWriteUpdateCheckCache({
|
|
102239
102359
|
checkedAt: now,
|
|
102240
102360
|
latestVersion,
|
|
102241
|
-
notifiedAt: updateAvailable ? now : existingCache?.notifiedAt
|
|
102361
|
+
notifiedAt: updateAvailable ? now : existingCache?.notifiedAt,
|
|
102362
|
+
source
|
|
102242
102363
|
});
|
|
102243
102364
|
};
|
|
102244
102365
|
async function getLatestVersion(options = {}) {
|
|
@@ -102255,6 +102376,18 @@ async function getLatestVersion(options = {}) {
|
|
|
102255
102376
|
throw new Error(`Failed to fetch latest version: ${e.message}`);
|
|
102256
102377
|
}
|
|
102257
102378
|
}
|
|
102379
|
+
async function getLatestVersionForInstallation(method, options = {}) {
|
|
102380
|
+
switch (getLatestVersionSource(method)) {
|
|
102381
|
+
case "homebrew":
|
|
102382
|
+
return getHomebrewLatestVersion(options);
|
|
102383
|
+
case "npm":
|
|
102384
|
+
default:
|
|
102385
|
+
return getLatestVersion(options);
|
|
102386
|
+
}
|
|
102387
|
+
}
|
|
102388
|
+
async function getLatestVersionForCurrentInstallation(options = {}) {
|
|
102389
|
+
return getLatestVersionForInstallation(detectInstallationMethod(), options);
|
|
102390
|
+
}
|
|
102258
102391
|
function compareVersions(current, latest) {
|
|
102259
102392
|
const currentParts = current.split(".").map(Number);
|
|
102260
102393
|
const latestParts = latest.split(".").map(Number);
|
|
@@ -102268,7 +102401,9 @@ function compareVersions(current, latest) {
|
|
|
102268
102401
|
}
|
|
102269
102402
|
async function getCachedUpdateNotification(currentVersion) {
|
|
102270
102403
|
const now = getCurrentTimestamp();
|
|
102271
|
-
const
|
|
102404
|
+
const installationMethod = detectInstallationMethod();
|
|
102405
|
+
const source = getLatestVersionSource(installationMethod);
|
|
102406
|
+
const cache = getCacheForVersionSource(readUpdateCheckCache(), source);
|
|
102272
102407
|
if (isWithinUpdateInterval(cache?.checkedAt)) {
|
|
102273
102408
|
if (!cache) {
|
|
102274
102409
|
return null;
|
|
@@ -102284,15 +102419,19 @@ async function getCachedUpdateNotification(currentVersion) {
|
|
|
102284
102419
|
return null;
|
|
102285
102420
|
}
|
|
102286
102421
|
try {
|
|
102287
|
-
const latestVersion = await
|
|
102288
|
-
|
|
102289
|
-
|
|
102422
|
+
const latestVersion = await getLatestVersionForInstallation(
|
|
102423
|
+
installationMethod,
|
|
102424
|
+
{
|
|
102425
|
+
timeoutMs: DEFAULT_UPDATE_CHECK_TIMEOUT_MS
|
|
102426
|
+
}
|
|
102427
|
+
);
|
|
102290
102428
|
const updateAvailable = compareVersions(currentVersion, latestVersion) > 0;
|
|
102291
102429
|
const alreadyNotifiedRecently = isWithinUpdateInterval(cache?.notifiedAt);
|
|
102292
102430
|
tryWriteUpdateCheckCache({
|
|
102293
102431
|
checkedAt: now,
|
|
102294
102432
|
latestVersion,
|
|
102295
|
-
notifiedAt: updateAvailable && !alreadyNotifiedRecently ? now : cache?.notifiedAt
|
|
102433
|
+
notifiedAt: updateAvailable && !alreadyNotifiedRecently ? now : cache?.notifiedAt,
|
|
102434
|
+
source
|
|
102296
102435
|
});
|
|
102297
102436
|
return updateAvailable && !alreadyNotifiedRecently ? latestVersion : null;
|
|
102298
102437
|
} catch (_error) {
|
|
@@ -102698,8 +102837,8 @@ function whitelistKeys(value, keys, nestedKeys = {}) {
|
|
|
102698
102837
|
var Config = class {
|
|
102699
102838
|
path;
|
|
102700
102839
|
data;
|
|
102701
|
-
constructor(
|
|
102702
|
-
this.path =
|
|
102840
|
+
constructor(path17) {
|
|
102841
|
+
this.path = path17;
|
|
102703
102842
|
this.data = {};
|
|
102704
102843
|
this.read();
|
|
102705
102844
|
}
|
|
@@ -102789,10 +102928,10 @@ var Local = class _Local extends Config {
|
|
|
102789
102928
|
static CONFIG_FILE_PATH = `${EXECUTABLE_NAME}.config.json`;
|
|
102790
102929
|
static CONFIG_FILE_PATH_LEGACY = `${EXECUTABLE_NAME}.json`;
|
|
102791
102930
|
configDirectoryPath = "";
|
|
102792
|
-
constructor(
|
|
102793
|
-
let absolutePath = _Local.findConfigFile(
|
|
102931
|
+
constructor(path17 = _Local.CONFIG_FILE_PATH, legacyPath = _Local.CONFIG_FILE_PATH_LEGACY) {
|
|
102932
|
+
let absolutePath = _Local.findConfigFile(path17) || _Local.findConfigFile(legacyPath);
|
|
102794
102933
|
if (!absolutePath) {
|
|
102795
|
-
absolutePath = `${process3.cwd()}/${
|
|
102934
|
+
absolutePath = `${process3.cwd()}/${path17}`;
|
|
102796
102935
|
}
|
|
102797
102936
|
super(absolutePath);
|
|
102798
102937
|
this.configDirectoryPath = _path.dirname(absolutePath);
|
|
@@ -103184,9 +103323,9 @@ var Global = class _Global extends Config {
|
|
|
103184
103323
|
static MODE_ADMIN = "admin";
|
|
103185
103324
|
static MODE_DEFAULT = "default";
|
|
103186
103325
|
static PROJECT_CONSOLE = "console";
|
|
103187
|
-
constructor(
|
|
103326
|
+
constructor(path17 = _Global.CONFIG_FILE_PATH) {
|
|
103188
103327
|
const homeDir = os2.homedir();
|
|
103189
|
-
super(`${homeDir}/${
|
|
103328
|
+
super(`${homeDir}/${path17}`);
|
|
103190
103329
|
}
|
|
103191
103330
|
getCurrentSession() {
|
|
103192
103331
|
if (!this.has(_Global.PREFERENCE_CURRENT)) {
|
|
@@ -130260,9 +130399,9 @@ var import_inquirer = __toESM(require_inquirer(), 1);
|
|
|
130260
130399
|
|
|
130261
130400
|
// lib/sdks.ts
|
|
130262
130401
|
import os4 from "os";
|
|
130263
|
-
var sdkForConsole = async (requiresAuth = true) => {
|
|
130402
|
+
var sdkForConsole = async (requiresAuth = true, endpointOverride) => {
|
|
130264
130403
|
const client2 = new Client();
|
|
130265
|
-
const endpoint = globalConfig2.getEndpoint() || DEFAULT_ENDPOINT;
|
|
130404
|
+
const endpoint = endpointOverride || globalConfig2.getEndpoint() || DEFAULT_ENDPOINT;
|
|
130266
130405
|
const cookie = globalConfig2.getCookie();
|
|
130267
130406
|
const selfSigned = globalConfig2.getSelfSigned();
|
|
130268
130407
|
if (requiresAuth && cookie === "") {
|
|
@@ -131712,9 +131851,9 @@ var Client3 = class _Client {
|
|
|
131712
131851
|
getHeaders() {
|
|
131713
131852
|
return { ...this.headers };
|
|
131714
131853
|
}
|
|
131715
|
-
async call(method,
|
|
131854
|
+
async call(method, path17 = "", headers = {}, params = {}, responseType = "json") {
|
|
131716
131855
|
const mergedHeaders = { ...this.headers, ...headers };
|
|
131717
|
-
const url2 = new URL(this.endpoint +
|
|
131856
|
+
const url2 = new URL(this.endpoint + path17);
|
|
131718
131857
|
let body = void 0;
|
|
131719
131858
|
if (method.toUpperCase() === "GET") {
|
|
131720
131859
|
url2.search = new URLSearchParams(
|
|
@@ -131759,7 +131898,7 @@ var Client3 = class _Client {
|
|
|
131759
131898
|
} catch (_error) {
|
|
131760
131899
|
throw new AppwriteException(text2, response.status, "", text2);
|
|
131761
131900
|
}
|
|
131762
|
-
if (
|
|
131901
|
+
if (path17 !== "/account" && json3.code === 401 && json3.type === "user_more_factors_required") {
|
|
131763
131902
|
console.log(
|
|
131764
131903
|
`${import_chalk4.default.cyan.bold("\u2139 Info")} ${import_chalk4.default.cyan("Unusable account found, removing...")}`
|
|
131765
131904
|
);
|
|
@@ -135886,8 +136025,8 @@ var Pull = class {
|
|
|
135886
136025
|
/**
|
|
135887
136026
|
* Set the base directory path for config files and resources
|
|
135888
136027
|
*/
|
|
135889
|
-
setConfigDirectoryPath(
|
|
135890
|
-
this.configDirectoryPath =
|
|
136028
|
+
setConfigDirectoryPath(path17) {
|
|
136029
|
+
this.configDirectoryPath = path17;
|
|
135891
136030
|
}
|
|
135892
136031
|
/**
|
|
135893
136032
|
* Log a message (respects silent mode)
|
|
@@ -139514,6 +139653,7 @@ var import_inquirer7 = __toESM(require_inquirer(), 1);
|
|
|
139514
139653
|
import fs14 from "fs";
|
|
139515
139654
|
import path12 from "path";
|
|
139516
139655
|
import readline from "node:readline";
|
|
139656
|
+
import { stripVTControlCharacters } from "node:util";
|
|
139517
139657
|
|
|
139518
139658
|
// lib/commands/utils/error-formatter.ts
|
|
139519
139659
|
var ZodErrorFormatter = class {
|
|
@@ -139636,11 +139776,11 @@ ${messages.join("\n\n")}`;
|
|
|
139636
139776
|
}
|
|
139637
139777
|
return String(value);
|
|
139638
139778
|
}
|
|
139639
|
-
static formatPath(
|
|
139640
|
-
if (
|
|
139779
|
+
static formatPath(path17, contextData) {
|
|
139780
|
+
if (path17.length === 0) return "";
|
|
139641
139781
|
const formatted = [];
|
|
139642
|
-
for (let i = 0; i <
|
|
139643
|
-
const segment =
|
|
139782
|
+
for (let i = 0; i < path17.length; i++) {
|
|
139783
|
+
const segment = path17[i];
|
|
139644
139784
|
if (typeof segment === "number") {
|
|
139645
139785
|
formatted.push(`[${segment}]`);
|
|
139646
139786
|
} else if (typeof segment === "string") {
|
|
@@ -139655,10 +139795,10 @@ ${messages.join("\n\n")}`;
|
|
|
139655
139795
|
}
|
|
139656
139796
|
return this.humanizePath(formatted.join(""), contextData);
|
|
139657
139797
|
}
|
|
139658
|
-
static humanizePath(
|
|
139798
|
+
static humanizePath(path17, contextData) {
|
|
139659
139799
|
if (contextData) {
|
|
139660
|
-
const resolvedPath = this.resolvePathWithNames(
|
|
139661
|
-
if (resolvedPath !==
|
|
139800
|
+
const resolvedPath = this.resolvePathWithNames(path17, contextData);
|
|
139801
|
+
if (resolvedPath !== path17) {
|
|
139662
139802
|
return resolvedPath;
|
|
139663
139803
|
}
|
|
139664
139804
|
}
|
|
@@ -139692,14 +139832,14 @@ ${messages.join("\n\n")}`;
|
|
|
139692
139832
|
{ pattern: /^settings\.services$/, replacement: "services" }
|
|
139693
139833
|
];
|
|
139694
139834
|
for (const { pattern, replacement } of patterns) {
|
|
139695
|
-
if (pattern.test(
|
|
139696
|
-
return
|
|
139835
|
+
if (pattern.test(path17)) {
|
|
139836
|
+
return path17.replace(pattern, replacement);
|
|
139697
139837
|
}
|
|
139698
139838
|
}
|
|
139699
|
-
return
|
|
139839
|
+
return path17.replace(/\[(\d+)\]/g, " $1").replace(/\./g, " \u2192 ").replace(/^(\w)/, (match) => match.toUpperCase());
|
|
139700
139840
|
}
|
|
139701
|
-
static resolvePathWithNames(
|
|
139702
|
-
const collectionAttributeMatch =
|
|
139841
|
+
static resolvePathWithNames(path17, contextData) {
|
|
139842
|
+
const collectionAttributeMatch = path17.match(
|
|
139703
139843
|
/^collections\[(\d+)\]\.attributes\[(\d+)\](.*)$/
|
|
139704
139844
|
);
|
|
139705
139845
|
if (collectionAttributeMatch) {
|
|
@@ -139712,7 +139852,7 @@ ${messages.join("\n\n")}`;
|
|
|
139712
139852
|
return `Collections "${collectionName}" \u2192 attributes "${attributeName}"${remainder}`;
|
|
139713
139853
|
}
|
|
139714
139854
|
}
|
|
139715
|
-
const collectionIndexMatch =
|
|
139855
|
+
const collectionIndexMatch = path17.match(
|
|
139716
139856
|
/^collections\[(\d+)\]\.indexes\[(\d+)\](.*)$/
|
|
139717
139857
|
);
|
|
139718
139858
|
if (collectionIndexMatch) {
|
|
@@ -139725,7 +139865,7 @@ ${messages.join("\n\n")}`;
|
|
|
139725
139865
|
return `Collections "${collectionName}" \u2192 indexes "${indexName}"${remainder}`;
|
|
139726
139866
|
}
|
|
139727
139867
|
}
|
|
139728
|
-
const collectionMatch =
|
|
139868
|
+
const collectionMatch = path17.match(/^collections\[(\d+)\](.*)$/);
|
|
139729
139869
|
if (collectionMatch) {
|
|
139730
139870
|
const [, collectionIndex, remainder] = collectionMatch;
|
|
139731
139871
|
const collection = contextData.collections?.[parseInt(collectionIndex)];
|
|
@@ -139734,7 +139874,7 @@ ${messages.join("\n\n")}`;
|
|
|
139734
139874
|
return `Collections "${collectionName}"${remainder}`;
|
|
139735
139875
|
}
|
|
139736
139876
|
}
|
|
139737
|
-
const databaseMatch =
|
|
139877
|
+
const databaseMatch = path17.match(/^databases\[(\d+)\](.*)$/);
|
|
139738
139878
|
if (databaseMatch) {
|
|
139739
139879
|
const [, databaseIndex, remainder] = databaseMatch;
|
|
139740
139880
|
const database = contextData.databases?.[parseInt(databaseIndex)];
|
|
@@ -139743,7 +139883,7 @@ ${messages.join("\n\n")}`;
|
|
|
139743
139883
|
return `Databases "${databaseName}"${remainder}`;
|
|
139744
139884
|
}
|
|
139745
139885
|
}
|
|
139746
|
-
const functionMatch =
|
|
139886
|
+
const functionMatch = path17.match(/^functions\[(\d+)\](.*)$/);
|
|
139747
139887
|
if (functionMatch) {
|
|
139748
139888
|
const [, functionIndex, remainder] = functionMatch;
|
|
139749
139889
|
const func = contextData.functions?.[parseInt(functionIndex)];
|
|
@@ -139752,7 +139892,7 @@ ${messages.join("\n\n")}`;
|
|
|
139752
139892
|
return `Functions "${functionName}"${remainder}`;
|
|
139753
139893
|
}
|
|
139754
139894
|
}
|
|
139755
|
-
const siteMatch =
|
|
139895
|
+
const siteMatch = path17.match(/^sites\[(\d+)\](.*)$/);
|
|
139756
139896
|
if (siteMatch) {
|
|
139757
139897
|
const [, siteIndex, remainder] = siteMatch;
|
|
139758
139898
|
const site = contextData.sites?.[parseInt(siteIndex)];
|
|
@@ -139761,7 +139901,7 @@ ${messages.join("\n\n")}`;
|
|
|
139761
139901
|
return `Sites "${siteName}"${remainder}`;
|
|
139762
139902
|
}
|
|
139763
139903
|
}
|
|
139764
|
-
const bucketMatch =
|
|
139904
|
+
const bucketMatch = path17.match(/^buckets\[(\d+)\](.*)$/);
|
|
139765
139905
|
if (bucketMatch) {
|
|
139766
139906
|
const [, bucketIndex, remainder] = bucketMatch;
|
|
139767
139907
|
const bucket = contextData.buckets?.[parseInt(bucketIndex)];
|
|
@@ -139770,7 +139910,7 @@ ${messages.join("\n\n")}`;
|
|
|
139770
139910
|
return `Buckets "${bucketName}"${remainder}`;
|
|
139771
139911
|
}
|
|
139772
139912
|
}
|
|
139773
|
-
const teamMatch =
|
|
139913
|
+
const teamMatch = path17.match(/^teams\[(\d+)\](.*)$/);
|
|
139774
139914
|
if (teamMatch) {
|
|
139775
139915
|
const [, teamIndex, remainder] = teamMatch;
|
|
139776
139916
|
const team = contextData.teams?.[parseInt(teamIndex)];
|
|
@@ -139779,7 +139919,7 @@ ${messages.join("\n\n")}`;
|
|
|
139779
139919
|
return `Teams "${teamName}"${remainder}`;
|
|
139780
139920
|
}
|
|
139781
139921
|
}
|
|
139782
|
-
const topicMatch =
|
|
139922
|
+
const topicMatch = path17.match(/^topics\[(\d+)\](.*)$/);
|
|
139783
139923
|
if (topicMatch) {
|
|
139784
139924
|
const [, topicIndex, remainder] = topicMatch;
|
|
139785
139925
|
const topic = contextData.topics?.[parseInt(topicIndex)];
|
|
@@ -139788,7 +139928,7 @@ ${messages.join("\n\n")}`;
|
|
|
139788
139928
|
return `Topics "${topicName}"${remainder}`;
|
|
139789
139929
|
}
|
|
139790
139930
|
}
|
|
139791
|
-
return
|
|
139931
|
+
return path17;
|
|
139792
139932
|
}
|
|
139793
139933
|
static extractAllowedEnumValues(unionErrors) {
|
|
139794
139934
|
const allowedValues = /* @__PURE__ */ new Set();
|
|
@@ -140882,8 +141022,18 @@ var DEPLOYMENT_TIMEOUT_MS = 10 * 60 * 1e3;
|
|
|
140882
141022
|
var DEPLOYMENT_TIMEOUT_MINUTES = Math.round(
|
|
140883
141023
|
DEPLOYMENT_TIMEOUT_MS / (60 * 1e3)
|
|
140884
141024
|
);
|
|
141025
|
+
var SITE_SCREENSHOT_FINALIZATION_TIMEOUT_MS = 30 * 1e3;
|
|
141026
|
+
var SITE_SCREENSHOT_BUCKET_ID = "screenshots";
|
|
141027
|
+
var SITE_SCREENSHOT_PREVIEW_WIDTH = 480;
|
|
141028
|
+
var SITE_SCREENSHOT_PREVIEW_HEIGHT = 270;
|
|
141029
|
+
var SITE_TERMINAL_PREVIEW_TARGET_WIDTH = 72;
|
|
141030
|
+
var SITE_TERMINAL_PREVIEW_MAX_WIDTH = 80;
|
|
141031
|
+
var SITE_TERMINAL_PREVIEW_MAX_HEIGHT = 22;
|
|
141032
|
+
var SITE_TERMINAL_PREVIEW_MIN_HEIGHT = 8;
|
|
140885
141033
|
var WAITING_JOKE_THRESHOLD_MS = 30 * 1e3;
|
|
140886
141034
|
var WAITING_JOKE_URL = "https://xkcd.com/303/";
|
|
141035
|
+
var ANSI_RESET = "\x1B[0m";
|
|
141036
|
+
var terminalImageModulePromise;
|
|
140887
141037
|
function getDeploymentProgressText(status, waitingSince) {
|
|
140888
141038
|
if (status === "waiting" && waitingSince !== null && Date.now() - waitingSince >= WAITING_JOKE_THRESHOLD_MS) {
|
|
140889
141039
|
return `Still waiting... ${WAITING_JOKE_URL}`;
|
|
@@ -140893,6 +141043,184 @@ function getDeploymentProgressText(status, waitingSince) {
|
|
|
140893
141043
|
function getDeploymentTimeoutErrorMessage() {
|
|
140894
141044
|
return `Deployment got stuck for more than ${DEPLOYMENT_TIMEOUT_MINUTES} minutes`;
|
|
140895
141045
|
}
|
|
141046
|
+
async function getTerminalImage() {
|
|
141047
|
+
terminalImageModulePromise ??= import("terminal-image").then(
|
|
141048
|
+
(module) => module.default
|
|
141049
|
+
);
|
|
141050
|
+
return terminalImageModulePromise;
|
|
141051
|
+
}
|
|
141052
|
+
function getErrorMessage2(error49) {
|
|
141053
|
+
if (error49 instanceof Error && error49.message.trim().length > 0) {
|
|
141054
|
+
return error49.message.trim();
|
|
141055
|
+
}
|
|
141056
|
+
if (Array.isArray(error49)) {
|
|
141057
|
+
const messages = error49.map((entry) => getErrorMessage2(entry)).filter((entry) => entry !== "Unknown error");
|
|
141058
|
+
if (messages.length > 0) {
|
|
141059
|
+
return messages.join("; ");
|
|
141060
|
+
}
|
|
141061
|
+
}
|
|
141062
|
+
if (typeof error49 === "string" && error49.trim().length > 0) {
|
|
141063
|
+
return error49.trim();
|
|
141064
|
+
}
|
|
141065
|
+
if (error49 && typeof error49 === "object") {
|
|
141066
|
+
const objectMessage = Reflect.get(error49, "message");
|
|
141067
|
+
if (typeof objectMessage === "string" && objectMessage.trim().length > 0) {
|
|
141068
|
+
return objectMessage.trim();
|
|
141069
|
+
}
|
|
141070
|
+
try {
|
|
141071
|
+
return JSON.stringify(error49);
|
|
141072
|
+
} catch (_serializationError) {
|
|
141073
|
+
}
|
|
141074
|
+
}
|
|
141075
|
+
return "Unknown error";
|
|
141076
|
+
}
|
|
141077
|
+
function getSiteDeploymentScreenshots(deployment) {
|
|
141078
|
+
const screenshotLight = typeof deployment["screenshotLight"] === "string" && deployment["screenshotLight"].trim().length > 0 ? deployment["screenshotLight"] : void 0;
|
|
141079
|
+
const screenshotDark = typeof deployment["screenshotDark"] === "string" && deployment["screenshotDark"].trim().length > 0 ? deployment["screenshotDark"] : void 0;
|
|
141080
|
+
return {
|
|
141081
|
+
screenshotLight,
|
|
141082
|
+
screenshotDark
|
|
141083
|
+
};
|
|
141084
|
+
}
|
|
141085
|
+
function hasSiteDeploymentScreenshots(deployment) {
|
|
141086
|
+
const { screenshotLight, screenshotDark } = getSiteDeploymentScreenshots(deployment);
|
|
141087
|
+
return Boolean(screenshotLight || screenshotDark);
|
|
141088
|
+
}
|
|
141089
|
+
function shouldRenderSiteTerminalPreview() {
|
|
141090
|
+
return Boolean(process.stdout.isTTY) && !cliConfig.json && !cliConfig.raw;
|
|
141091
|
+
}
|
|
141092
|
+
function getSiteTerminalPreviewWidth() {
|
|
141093
|
+
const columns = process.stdout.columns ?? 80;
|
|
141094
|
+
return Math.max(
|
|
141095
|
+
16,
|
|
141096
|
+
Math.min(
|
|
141097
|
+
columns - 4,
|
|
141098
|
+
SITE_TERMINAL_PREVIEW_TARGET_WIDTH,
|
|
141099
|
+
SITE_TERMINAL_PREVIEW_MAX_WIDTH
|
|
141100
|
+
)
|
|
141101
|
+
);
|
|
141102
|
+
}
|
|
141103
|
+
function getSiteTerminalPreviewHeight() {
|
|
141104
|
+
const rows = process.stdout.rows ?? 24;
|
|
141105
|
+
return Math.max(
|
|
141106
|
+
SITE_TERMINAL_PREVIEW_MIN_HEIGHT,
|
|
141107
|
+
Math.min(rows - 10, SITE_TERMINAL_PREVIEW_MAX_HEIGHT)
|
|
141108
|
+
);
|
|
141109
|
+
}
|
|
141110
|
+
async function renderImageBufferToTerminalPreview(buffer) {
|
|
141111
|
+
const terminalImage = await getTerminalImage();
|
|
141112
|
+
const originalTermProgram = process.env.TERM_PROGRAM;
|
|
141113
|
+
const originalTermProgramVersion = process.env.TERM_PROGRAM_VERSION;
|
|
141114
|
+
const originalKonsoleVersion = process.env.KONSOLE_VERSION;
|
|
141115
|
+
const originalKittyWindowId = process.env.KITTY_WINDOW_ID;
|
|
141116
|
+
delete process.env.TERM_PROGRAM;
|
|
141117
|
+
delete process.env.TERM_PROGRAM_VERSION;
|
|
141118
|
+
delete process.env.KONSOLE_VERSION;
|
|
141119
|
+
delete process.env.KITTY_WINDOW_ID;
|
|
141120
|
+
try {
|
|
141121
|
+
return await terminalImage.buffer(buffer, {
|
|
141122
|
+
width: getSiteTerminalPreviewWidth(),
|
|
141123
|
+
height: getSiteTerminalPreviewHeight(),
|
|
141124
|
+
preserveAspectRatio: true
|
|
141125
|
+
});
|
|
141126
|
+
} finally {
|
|
141127
|
+
if (originalTermProgram === void 0) {
|
|
141128
|
+
delete process.env.TERM_PROGRAM;
|
|
141129
|
+
} else {
|
|
141130
|
+
process.env.TERM_PROGRAM = originalTermProgram;
|
|
141131
|
+
}
|
|
141132
|
+
if (originalTermProgramVersion === void 0) {
|
|
141133
|
+
delete process.env.TERM_PROGRAM_VERSION;
|
|
141134
|
+
} else {
|
|
141135
|
+
process.env.TERM_PROGRAM_VERSION = originalTermProgramVersion;
|
|
141136
|
+
}
|
|
141137
|
+
if (originalKonsoleVersion === void 0) {
|
|
141138
|
+
delete process.env.KONSOLE_VERSION;
|
|
141139
|
+
} else {
|
|
141140
|
+
process.env.KONSOLE_VERSION = originalKonsoleVersion;
|
|
141141
|
+
}
|
|
141142
|
+
if (originalKittyWindowId === void 0) {
|
|
141143
|
+
delete process.env.KITTY_WINDOW_ID;
|
|
141144
|
+
} else {
|
|
141145
|
+
process.env.KITTY_WINDOW_ID = originalKittyWindowId;
|
|
141146
|
+
}
|
|
141147
|
+
}
|
|
141148
|
+
}
|
|
141149
|
+
async function fetchSiteScreenshotPreview(params) {
|
|
141150
|
+
const previewUrl = params.renderer.storageService.getFilePreview({
|
|
141151
|
+
bucketId: SITE_SCREENSHOT_BUCKET_ID,
|
|
141152
|
+
fileId: params.fileId,
|
|
141153
|
+
width: SITE_SCREENSHOT_PREVIEW_WIDTH,
|
|
141154
|
+
height: SITE_SCREENSHOT_PREVIEW_HEIGHT,
|
|
141155
|
+
output: ImageFormat.Png
|
|
141156
|
+
});
|
|
141157
|
+
const imageData = await params.renderer.consoleClient.call(
|
|
141158
|
+
"get",
|
|
141159
|
+
new URL(previewUrl),
|
|
141160
|
+
{},
|
|
141161
|
+
{},
|
|
141162
|
+
"arrayBuffer"
|
|
141163
|
+
);
|
|
141164
|
+
if (!(imageData instanceof ArrayBuffer)) {
|
|
141165
|
+
throw new Error("Failed to download the site screenshot preview.");
|
|
141166
|
+
}
|
|
141167
|
+
return renderImageBufferToTerminalPreview(Buffer.from(imageData));
|
|
141168
|
+
}
|
|
141169
|
+
function frameTerminalPreview(preview) {
|
|
141170
|
+
const lines = preview.split("\n").map((line) => line.replace(/\s+$/, ""));
|
|
141171
|
+
while (lines.length > 0 && stripVTControlCharacters(lines[0]).trim().length === 0) {
|
|
141172
|
+
lines.shift();
|
|
141173
|
+
}
|
|
141174
|
+
while (lines.length > 0 && stripVTControlCharacters(lines[lines.length - 1]).trim().length === 0) {
|
|
141175
|
+
lines.pop();
|
|
141176
|
+
}
|
|
141177
|
+
if (lines.length === 0) {
|
|
141178
|
+
return "";
|
|
141179
|
+
}
|
|
141180
|
+
const contentWidth = Math.max(
|
|
141181
|
+
...lines.map((line) => stripVTControlCharacters(line).length)
|
|
141182
|
+
);
|
|
141183
|
+
const border = `+-${"-".repeat(contentWidth)}-+`;
|
|
141184
|
+
return [
|
|
141185
|
+
border,
|
|
141186
|
+
...lines.map((line) => {
|
|
141187
|
+
const visibleWidth = stripVTControlCharacters(line).length;
|
|
141188
|
+
return `| ${line}${ANSI_RESET}${" ".repeat(contentWidth - visibleWidth)} |`;
|
|
141189
|
+
}),
|
|
141190
|
+
border
|
|
141191
|
+
].join("\n");
|
|
141192
|
+
}
|
|
141193
|
+
async function renderSiteTerminalPreview(params) {
|
|
141194
|
+
const warnings = /* @__PURE__ */ new Set();
|
|
141195
|
+
const candidates = [
|
|
141196
|
+
{ fileId: params.screenshotDark, label: "dark" },
|
|
141197
|
+
{ fileId: params.screenshotLight, label: "light" }
|
|
141198
|
+
];
|
|
141199
|
+
for (const candidate of candidates) {
|
|
141200
|
+
const { fileId, label } = candidate;
|
|
141201
|
+
if (!fileId) {
|
|
141202
|
+
continue;
|
|
141203
|
+
}
|
|
141204
|
+
try {
|
|
141205
|
+
const preview = await fetchSiteScreenshotPreview({
|
|
141206
|
+
renderer: params.renderer,
|
|
141207
|
+
fileId
|
|
141208
|
+
});
|
|
141209
|
+
return {
|
|
141210
|
+
preview: frameTerminalPreview(preview),
|
|
141211
|
+
warnings: []
|
|
141212
|
+
};
|
|
141213
|
+
} catch (previewError) {
|
|
141214
|
+
warnings.add(
|
|
141215
|
+
`${label === "dark" ? "Dark mode" : "Light mode"} screenshot: ${getErrorMessage2(previewError)}`
|
|
141216
|
+
);
|
|
141217
|
+
}
|
|
141218
|
+
}
|
|
141219
|
+
return {
|
|
141220
|
+
preview: void 0,
|
|
141221
|
+
warnings: [...warnings]
|
|
141222
|
+
};
|
|
141223
|
+
}
|
|
140896
141224
|
function withDeploymentLogsHint(message, deploymentLogsController) {
|
|
140897
141225
|
const hint2 = deploymentLogsController.getToggleHint();
|
|
140898
141226
|
return hint2.length > 0 ? `${message} \u2022 ${hint2}` : message;
|
|
@@ -141769,7 +142097,7 @@ var Push = class {
|
|
|
141769
142097
|
deploymentLogsController
|
|
141770
142098
|
)
|
|
141771
142099
|
});
|
|
141772
|
-
|
|
142100
|
+
let timeoutDeadline = Date.now() + DEPLOYMENT_TIMEOUT_MS;
|
|
141773
142101
|
while (true) {
|
|
141774
142102
|
if (Date.now() > timeoutDeadline) {
|
|
141775
142103
|
deploymentLogPrinter.complete();
|
|
@@ -142156,6 +142484,8 @@ var Push = class {
|
|
|
142156
142484
|
deploymentId
|
|
142157
142485
|
);
|
|
142158
142486
|
let waitingSince = null;
|
|
142487
|
+
let readyWithoutScreenshotsSince = null;
|
|
142488
|
+
let activationApplied = false;
|
|
142159
142489
|
const deploymentLogPrinter = createDeploymentLogPrinter({
|
|
142160
142490
|
label: `site:${site.name}`,
|
|
142161
142491
|
showPrefix: sites2.length > 1,
|
|
@@ -142195,7 +142525,7 @@ var Push = class {
|
|
|
142195
142525
|
deploymentLogsController
|
|
142196
142526
|
)
|
|
142197
142527
|
});
|
|
142198
|
-
|
|
142528
|
+
let timeoutDeadline = Date.now() + DEPLOYMENT_TIMEOUT_MS;
|
|
142199
142529
|
while (true) {
|
|
142200
142530
|
if (Date.now() > timeoutDeadline) {
|
|
142201
142531
|
deploymentLogPrinter.complete();
|
|
@@ -142229,7 +142559,9 @@ var Push = class {
|
|
|
142229
142559
|
waitingSince = null;
|
|
142230
142560
|
}
|
|
142231
142561
|
if (status === "ready") {
|
|
142232
|
-
|
|
142562
|
+
const { screenshotLight, screenshotDark } = getSiteDeploymentScreenshots(response);
|
|
142563
|
+
const screenshotsReady = hasSiteDeploymentScreenshots(response);
|
|
142564
|
+
if (activate && !activationApplied) {
|
|
142233
142565
|
currentDeploymentEnd = "Setting active deployment...";
|
|
142234
142566
|
updaterRow.update({
|
|
142235
142567
|
status: "Activating",
|
|
@@ -142245,6 +142577,28 @@ var Push = class {
|
|
|
142245
142577
|
siteId: site["$id"],
|
|
142246
142578
|
deploymentId
|
|
142247
142579
|
});
|
|
142580
|
+
activationApplied = true;
|
|
142581
|
+
}
|
|
142582
|
+
if (!screenshotsReady) {
|
|
142583
|
+
readyWithoutScreenshotsSince ??= Date.now();
|
|
142584
|
+
timeoutDeadline = Math.max(
|
|
142585
|
+
timeoutDeadline,
|
|
142586
|
+
readyWithoutScreenshotsSince + SITE_SCREENSHOT_FINALIZATION_TIMEOUT_MS
|
|
142587
|
+
);
|
|
142588
|
+
if (Date.now() - readyWithoutScreenshotsSince < SITE_SCREENSHOT_FINALIZATION_TIMEOUT_MS) {
|
|
142589
|
+
currentDeploymentEnd = "Finalizing deployment preview...";
|
|
142590
|
+
updaterRow.update({
|
|
142591
|
+
status: "Finalizing",
|
|
142592
|
+
end: withDeploymentLogsHint(
|
|
142593
|
+
currentDeploymentEnd,
|
|
142594
|
+
deploymentLogsController
|
|
142595
|
+
)
|
|
142596
|
+
});
|
|
142597
|
+
await new Promise(
|
|
142598
|
+
(resolve3) => setTimeout(resolve3, POLL_DEBOUNCE2)
|
|
142599
|
+
);
|
|
142600
|
+
continue;
|
|
142601
|
+
}
|
|
142248
142602
|
}
|
|
142249
142603
|
successfullyDeployed++;
|
|
142250
142604
|
let url2 = "";
|
|
@@ -142271,7 +142625,14 @@ var Push = class {
|
|
|
142271
142625
|
status: activate ? "Deployed" : "Built",
|
|
142272
142626
|
end: ""
|
|
142273
142627
|
});
|
|
142274
|
-
deploymentLogs.push({
|
|
142628
|
+
deploymentLogs.push({
|
|
142629
|
+
name: site.name,
|
|
142630
|
+
url: url2,
|
|
142631
|
+
consoleUrl,
|
|
142632
|
+
screenshotLight,
|
|
142633
|
+
screenshotDark,
|
|
142634
|
+
screenshotsPending: !screenshotsReady
|
|
142635
|
+
});
|
|
142275
142636
|
break;
|
|
142276
142637
|
} else if (status === "failed") {
|
|
142277
142638
|
deploymentLogPrinter.complete();
|
|
@@ -142326,16 +142687,76 @@ var Push = class {
|
|
|
142326
142687
|
Spinner.stop();
|
|
142327
142688
|
}
|
|
142328
142689
|
if (deploymentLogs.length > 0) {
|
|
142690
|
+
let sitePreviewRenderer = null;
|
|
142691
|
+
let sitePreviewSetupWarning = null;
|
|
142692
|
+
const emittedPreviewWarnings = /* @__PURE__ */ new Set();
|
|
142693
|
+
if (shouldRenderSiteTerminalPreview() && deploymentLogs.some(
|
|
142694
|
+
(deploymentLog) => deploymentLog.screenshotLight || deploymentLog.screenshotDark
|
|
142695
|
+
)) {
|
|
142696
|
+
try {
|
|
142697
|
+
const consoleClient = await sdkForConsole(
|
|
142698
|
+
true,
|
|
142699
|
+
localConfig.getEndpoint() || globalConfig2.getEndpoint()
|
|
142700
|
+
);
|
|
142701
|
+
sitePreviewRenderer = {
|
|
142702
|
+
consoleClient,
|
|
142703
|
+
storageService: await getStorageService(consoleClient)
|
|
142704
|
+
};
|
|
142705
|
+
} catch (previewSetupError) {
|
|
142706
|
+
sitePreviewSetupWarning = getErrorMessage2(previewSetupError);
|
|
142707
|
+
}
|
|
142708
|
+
}
|
|
142329
142709
|
process.stdout.write("\n");
|
|
142330
|
-
deploymentLogs.
|
|
142710
|
+
for (const [index, dl] of deploymentLogs.entries()) {
|
|
142331
142711
|
if (index > 0) {
|
|
142332
142712
|
process.stdout.write("\n");
|
|
142333
142713
|
}
|
|
142714
|
+
if (deploymentLogs.length > 1) {
|
|
142715
|
+
process.stdout.write(`${import_chalk13.default.cyan.bold(`Site: ${dl.name}`)}
|
|
142716
|
+
`);
|
|
142717
|
+
}
|
|
142718
|
+
if (dl.screenshotsPending) {
|
|
142719
|
+
hint(
|
|
142720
|
+
"Deployment is ready, but screenshot generation is still finalizing. Open the deployment page to view it once it is available."
|
|
142721
|
+
);
|
|
142722
|
+
}
|
|
142723
|
+
if (sitePreviewRenderer && (dl.screenshotLight || dl.screenshotDark)) {
|
|
142724
|
+
const preview = await renderSiteTerminalPreview({
|
|
142725
|
+
renderer: sitePreviewRenderer,
|
|
142726
|
+
screenshotLight: dl.screenshotLight,
|
|
142727
|
+
screenshotDark: dl.screenshotDark
|
|
142728
|
+
});
|
|
142729
|
+
if (preview.preview) {
|
|
142730
|
+
process.stdout.write(
|
|
142731
|
+
`
|
|
142732
|
+
${import_chalk13.default.cyan.bold("Screenshot preview")}
|
|
142733
|
+
|
|
142734
|
+
`
|
|
142735
|
+
);
|
|
142736
|
+
process.stdout.write(`${preview.preview}
|
|
142737
|
+
|
|
142738
|
+
`);
|
|
142739
|
+
}
|
|
142740
|
+
for (const previewWarning of preview.warnings) {
|
|
142741
|
+
const warningMessage = `Screenshot preview unavailable: ${previewWarning}`;
|
|
142742
|
+
if (emittedPreviewWarnings.has(warningMessage)) {
|
|
142743
|
+
continue;
|
|
142744
|
+
}
|
|
142745
|
+
emittedPreviewWarnings.add(warningMessage);
|
|
142746
|
+
hint(warningMessage);
|
|
142747
|
+
}
|
|
142748
|
+
} else if (sitePreviewSetupWarning && (dl.screenshotLight || dl.screenshotDark)) {
|
|
142749
|
+
const warningMessage = `Screenshot preview unavailable: ${sitePreviewSetupWarning}`;
|
|
142750
|
+
if (!emittedPreviewWarnings.has(warningMessage)) {
|
|
142751
|
+
emittedPreviewWarnings.add(warningMessage);
|
|
142752
|
+
hint(warningMessage);
|
|
142753
|
+
}
|
|
142754
|
+
}
|
|
142334
142755
|
if (dl.url) {
|
|
142335
142756
|
this.log(`Preview link: ${import_chalk13.default.cyan(dl.url)}`);
|
|
142336
142757
|
}
|
|
142337
142758
|
this.log(`Deployment page: ${import_chalk13.default.cyan(dl.consoleUrl)}`);
|
|
142338
|
-
}
|
|
142759
|
+
}
|
|
142339
142760
|
process.stdout.write("\n");
|
|
142340
142761
|
}
|
|
142341
142762
|
return {
|
|
@@ -143481,37 +143902,74 @@ var deploy = new Command("deploy").description(`Removed. Use ${EXECUTABLE_NAME}
|
|
|
143481
143902
|
);
|
|
143482
143903
|
|
|
143483
143904
|
// lib/commands/update.ts
|
|
143905
|
+
import fs15 from "fs";
|
|
143906
|
+
import os8 from "os";
|
|
143907
|
+
import path13 from "path";
|
|
143484
143908
|
import { spawn } from "child_process";
|
|
143485
143909
|
var import_chalk14 = __toESM(require_source(), 1);
|
|
143486
143910
|
var import_inquirer8 = __toESM(require_inquirer(), 1);
|
|
143487
143911
|
var { version: version2 } = package_default;
|
|
143488
|
-
var
|
|
143912
|
+
var getStandaloneBinaryArtifactName = () => {
|
|
143913
|
+
const platform = process.platform === "win32" ? "win" : process.platform === "darwin" ? "darwin" : process.platform === "linux" ? "linux" : null;
|
|
143914
|
+
if (!platform) {
|
|
143915
|
+
throw new Error(
|
|
143916
|
+
`Standalone binary updates are not supported on ${process.platform}.`
|
|
143917
|
+
);
|
|
143918
|
+
}
|
|
143919
|
+
const arch = os8.arch();
|
|
143920
|
+
if (arch !== "x64" && arch !== "arm64") {
|
|
143921
|
+
throw new Error(
|
|
143922
|
+
`Standalone binary updates are not supported on ${arch} architecture.`
|
|
143923
|
+
);
|
|
143924
|
+
}
|
|
143925
|
+
const extension = platform === "win" ? ".exe" : "";
|
|
143926
|
+
return `${NPM_PACKAGE_NAME}-${platform}-${arch}${extension}`;
|
|
143927
|
+
};
|
|
143928
|
+
var getStandaloneBinaryTargetPath = () => {
|
|
143929
|
+
const execPath = process.execPath;
|
|
143489
143930
|
try {
|
|
143490
|
-
|
|
143491
|
-
|
|
143492
|
-
return true;
|
|
143493
|
-
}
|
|
143494
|
-
if (scriptPath.includes("/usr/local/lib/node_modules/") || scriptPath.includes("/opt/homebrew/lib/node_modules/") || scriptPath.includes("/.npm-global/") || scriptPath.includes("/node_modules/.bin/") || scriptPath.includes("/.nvm/versions/node/")) {
|
|
143495
|
-
return true;
|
|
143931
|
+
if (fs15.lstatSync(execPath).isSymbolicLink()) {
|
|
143932
|
+
return fs15.realpathSync.native(execPath);
|
|
143496
143933
|
}
|
|
143497
|
-
|
|
143498
|
-
} catch (_e2) {
|
|
143499
|
-
return false;
|
|
143934
|
+
} catch (_error) {
|
|
143500
143935
|
}
|
|
143936
|
+
return execPath;
|
|
143501
143937
|
};
|
|
143502
|
-
var
|
|
143938
|
+
var isExpectedStandaloneBinaryPath = (candidatePath) => {
|
|
143939
|
+
const basename = path13.basename(candidatePath).toLowerCase();
|
|
143940
|
+
const expectedName = EXECUTABLE_NAME.toLowerCase();
|
|
143941
|
+
return basename === expectedName || basename === `${expectedName}.exe`;
|
|
143942
|
+
};
|
|
143943
|
+
var isDirectoryWritable = (directoryPath) => {
|
|
143503
143944
|
try {
|
|
143504
|
-
|
|
143505
|
-
return
|
|
143506
|
-
} catch (
|
|
143945
|
+
fs15.accessSync(directoryPath, fs15.constants.W_OK);
|
|
143946
|
+
return true;
|
|
143947
|
+
} catch (_error) {
|
|
143507
143948
|
return false;
|
|
143508
143949
|
}
|
|
143509
143950
|
};
|
|
143951
|
+
var quoteShellArgument = (value) => {
|
|
143952
|
+
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
143953
|
+
};
|
|
143954
|
+
var downloadStandaloneBinary = async (destinationPath) => {
|
|
143955
|
+
const artifact = getStandaloneBinaryArtifactName();
|
|
143956
|
+
const response = await fetch(`${GITHUB_RELEASES_URL}/latest/download/${artifact}`);
|
|
143957
|
+
if (!response.ok) {
|
|
143958
|
+
throw new Error(
|
|
143959
|
+
`Failed to download standalone binary (HTTP ${response.status}).`
|
|
143960
|
+
);
|
|
143961
|
+
}
|
|
143962
|
+
const body = Buffer.from(await response.arrayBuffer());
|
|
143963
|
+
fs15.writeFileSync(destinationPath, body);
|
|
143964
|
+
if (process.platform !== "win32") {
|
|
143965
|
+
fs15.chmodSync(destinationPath, 493);
|
|
143966
|
+
}
|
|
143967
|
+
};
|
|
143510
143968
|
var execCommand = (command, args = [], options = {}) => {
|
|
143511
143969
|
return new Promise((resolve3, reject) => {
|
|
143512
143970
|
const child = spawn(command, args, {
|
|
143513
143971
|
stdio: "inherit",
|
|
143514
|
-
shell:
|
|
143972
|
+
shell: process.platform === "win32",
|
|
143515
143973
|
...options
|
|
143516
143974
|
});
|
|
143517
143975
|
child.on("close", (code) => {
|
|
@@ -143564,6 +144022,51 @@ var updateViaHomebrew = async () => {
|
|
|
143564
144022
|
}
|
|
143565
144023
|
}
|
|
143566
144024
|
};
|
|
144025
|
+
var updateViaStandaloneBinary = async (latestVersion) => {
|
|
144026
|
+
if (process.platform === "win32") {
|
|
144027
|
+
showManualInstructions(latestVersion);
|
|
144028
|
+
return;
|
|
144029
|
+
}
|
|
144030
|
+
const targetPath = getStandaloneBinaryTargetPath();
|
|
144031
|
+
if (!isExpectedStandaloneBinaryPath(targetPath)) {
|
|
144032
|
+
console.log("");
|
|
144033
|
+
error48("Could not determine the standalone binary path.");
|
|
144034
|
+
hint(`Download the latest release manually at: ${GITHUB_RELEASES_URL}`);
|
|
144035
|
+
return;
|
|
144036
|
+
}
|
|
144037
|
+
const targetDir = path13.dirname(targetPath);
|
|
144038
|
+
const tempName = `${path13.basename(targetPath)}.tmp-${process.pid}`;
|
|
144039
|
+
const writableDirectory = isDirectoryWritable(targetDir);
|
|
144040
|
+
const tempPath = writableDirectory ? path13.join(targetDir, tempName) : path13.join(os8.tmpdir(), tempName);
|
|
144041
|
+
try {
|
|
144042
|
+
await downloadStandaloneBinary(tempPath);
|
|
144043
|
+
if (writableDirectory) {
|
|
144044
|
+
fs15.renameSync(tempPath, targetPath);
|
|
144045
|
+
} else {
|
|
144046
|
+
const stagedTargetPath = path13.join(targetDir, tempName);
|
|
144047
|
+
const command = [
|
|
144048
|
+
`install -m 755 ${quoteShellArgument(tempPath)} ${quoteShellArgument(stagedTargetPath)}`,
|
|
144049
|
+
`mv -f ${quoteShellArgument(stagedTargetPath)} ${quoteShellArgument(targetPath)}`
|
|
144050
|
+
].join(" && ");
|
|
144051
|
+
await execCommand("sudo", ["sh", "-c", command]);
|
|
144052
|
+
}
|
|
144053
|
+
console.log("");
|
|
144054
|
+
success2("Updated to latest version via standalone binary!");
|
|
144055
|
+
hint("Run 'appwrite --version' to verify the new version.");
|
|
144056
|
+
} catch (e) {
|
|
144057
|
+
const message = getErrorMessage(e);
|
|
144058
|
+
console.log("");
|
|
144059
|
+
error48(`Failed to update standalone binary: ${message}`);
|
|
144060
|
+
hint(`Download the latest release manually at: ${GITHUB_RELEASES_URL}`);
|
|
144061
|
+
} finally {
|
|
144062
|
+
try {
|
|
144063
|
+
if (fs15.existsSync(tempPath)) {
|
|
144064
|
+
fs15.unlinkSync(tempPath);
|
|
144065
|
+
}
|
|
144066
|
+
} catch (_error) {
|
|
144067
|
+
}
|
|
144068
|
+
}
|
|
144069
|
+
};
|
|
143567
144070
|
var showManualInstructions = (latestVersion) => {
|
|
143568
144071
|
log("Manual update options:");
|
|
143569
144072
|
console.log("");
|
|
@@ -143573,13 +144076,38 @@ var showManualInstructions = (latestVersion) => {
|
|
|
143573
144076
|
log(`${import_chalk14.default.bold("Option 2: Homebrew")}`);
|
|
143574
144077
|
console.log(` brew upgrade appwrite`);
|
|
143575
144078
|
console.log("");
|
|
143576
|
-
|
|
143577
|
-
|
|
144079
|
+
if (process.platform !== "win32") {
|
|
144080
|
+
try {
|
|
144081
|
+
const artifact = getStandaloneBinaryArtifactName();
|
|
144082
|
+
const targetPath = getStandaloneBinaryTargetPath();
|
|
144083
|
+
if (!isExpectedStandaloneBinaryPath(targetPath)) {
|
|
144084
|
+
throw new Error("Could not determine the standalone binary path.");
|
|
144085
|
+
}
|
|
144086
|
+
const tempPath = path13.join(os8.tmpdir(), path13.basename(targetPath));
|
|
144087
|
+
log(`${import_chalk14.default.bold("Option 3: Install Script / Standalone Binary")}`);
|
|
144088
|
+
console.log(
|
|
144089
|
+
` curl -fsSL ${GITHUB_RELEASES_URL}/latest/download/${artifact} -o ${tempPath}`
|
|
144090
|
+
);
|
|
144091
|
+
console.log(` chmod +x ${tempPath}`);
|
|
144092
|
+
console.log(` sudo mv -f ${tempPath} ${targetPath}`);
|
|
144093
|
+
console.log("");
|
|
144094
|
+
} catch (_error) {
|
|
144095
|
+
}
|
|
144096
|
+
}
|
|
144097
|
+
log(`${import_chalk14.default.bold("Option 4: Download Binary")}`);
|
|
144098
|
+
console.log(` Visit: ${GITHUB_RELEASES_URL}/latest`);
|
|
143578
144099
|
};
|
|
143579
144100
|
var chooseUpdateMethod = async (latestVersion) => {
|
|
144101
|
+
const canOfferStandaloneUpdate = process.platform !== "win32" && isExpectedStandaloneBinaryPath(getStandaloneBinaryTargetPath());
|
|
143580
144102
|
const choices = [
|
|
143581
144103
|
{ name: "NPM", value: "npm" },
|
|
143582
144104
|
{ name: "Homebrew", value: "homebrew" },
|
|
144105
|
+
...!canOfferStandaloneUpdate ? [] : [
|
|
144106
|
+
{
|
|
144107
|
+
name: "Install script / standalone binary",
|
|
144108
|
+
value: "standalone"
|
|
144109
|
+
}
|
|
144110
|
+
],
|
|
143583
144111
|
{ name: "Show manual instructions", value: "manual" }
|
|
143584
144112
|
];
|
|
143585
144113
|
const { method } = await import_inquirer8.default.prompt([
|
|
@@ -143597,6 +144125,9 @@ var chooseUpdateMethod = async (latestVersion) => {
|
|
|
143597
144125
|
case "homebrew":
|
|
143598
144126
|
await updateViaHomebrew();
|
|
143599
144127
|
break;
|
|
144128
|
+
case "standalone":
|
|
144129
|
+
await updateViaStandaloneBinary(latestVersion);
|
|
144130
|
+
break;
|
|
143600
144131
|
case "manual":
|
|
143601
144132
|
showManualInstructions(latestVersion);
|
|
143602
144133
|
break;
|
|
@@ -143604,7 +144135,10 @@ var chooseUpdateMethod = async (latestVersion) => {
|
|
|
143604
144135
|
};
|
|
143605
144136
|
var updateCli = async ({ manual } = {}) => {
|
|
143606
144137
|
try {
|
|
143607
|
-
const
|
|
144138
|
+
const installationMethod = detectInstallationMethod();
|
|
144139
|
+
const latestVersion = await getLatestVersionForInstallation(
|
|
144140
|
+
installationMethod
|
|
144141
|
+
);
|
|
143608
144142
|
const comparison = compareVersions(version2, latestVersion);
|
|
143609
144143
|
if (comparison === 0) {
|
|
143610
144144
|
success2(
|
|
@@ -143626,12 +144160,19 @@ var updateCli = async ({ manual } = {}) => {
|
|
|
143626
144160
|
showManualInstructions(latestVersion);
|
|
143627
144161
|
return;
|
|
143628
144162
|
}
|
|
143629
|
-
|
|
143630
|
-
|
|
143631
|
-
|
|
143632
|
-
|
|
143633
|
-
|
|
143634
|
-
|
|
144163
|
+
switch (installationMethod) {
|
|
144164
|
+
case "npm":
|
|
144165
|
+
await updateViaNpm();
|
|
144166
|
+
break;
|
|
144167
|
+
case "homebrew":
|
|
144168
|
+
await updateViaHomebrew();
|
|
144169
|
+
break;
|
|
144170
|
+
case "standalone":
|
|
144171
|
+
await updateViaStandaloneBinary(latestVersion);
|
|
144172
|
+
break;
|
|
144173
|
+
default:
|
|
144174
|
+
await chooseUpdateMethod(latestVersion);
|
|
144175
|
+
break;
|
|
143635
144176
|
}
|
|
143636
144177
|
} catch (e) {
|
|
143637
144178
|
const message = getErrorMessage(e);
|
|
@@ -143646,11 +144187,11 @@ var update = new Command("update").description(`Update the ${SDK_TITLE} CLI to t
|
|
|
143646
144187
|
).action(actionRunner(updateCli));
|
|
143647
144188
|
|
|
143648
144189
|
// lib/commands/generate.ts
|
|
143649
|
-
import * as
|
|
144190
|
+
import * as path16 from "path";
|
|
143650
144191
|
|
|
143651
144192
|
// lib/commands/generators/language-detector.ts
|
|
143652
|
-
import * as
|
|
143653
|
-
import * as
|
|
144193
|
+
import * as fs16 from "fs";
|
|
144194
|
+
import * as path14 from "path";
|
|
143654
144195
|
var languageConfigs = [
|
|
143655
144196
|
{
|
|
143656
144197
|
language: "typescript",
|
|
@@ -143738,14 +144279,14 @@ var LanguageDetector = class {
|
|
|
143738
144279
|
* Check if a file exists in the project directory.
|
|
143739
144280
|
*/
|
|
143740
144281
|
fileExists(filename) {
|
|
143741
|
-
return
|
|
144282
|
+
return fs16.existsSync(path14.resolve(this.cwd, filename));
|
|
143742
144283
|
}
|
|
143743
144284
|
/**
|
|
143744
144285
|
* Check if files with specific extensions exist in the current directory.
|
|
143745
144286
|
*/
|
|
143746
144287
|
hasFilesWithExtensions(extensions) {
|
|
143747
144288
|
try {
|
|
143748
|
-
const files =
|
|
144289
|
+
const files = fs16.readdirSync(this.cwd);
|
|
143749
144290
|
return files.some((file2) => extensions.some((ext) => file2.endsWith(ext)));
|
|
143750
144291
|
} catch {
|
|
143751
144292
|
return false;
|
|
@@ -143769,13 +144310,13 @@ var LanguageDetector = class {
|
|
|
143769
144310
|
var import_handlebars = __toESM(require_lib3(), 1);
|
|
143770
144311
|
|
|
143771
144312
|
// lib/commands/generators/base.ts
|
|
143772
|
-
import * as
|
|
143773
|
-
import * as
|
|
144313
|
+
import * as fs17 from "fs";
|
|
144314
|
+
import * as path15 from "path";
|
|
143774
144315
|
var BaseDatabasesGenerator = class {
|
|
143775
144316
|
async writeFiles(outputDir, result) {
|
|
143776
|
-
const sdkDir =
|
|
143777
|
-
if (!
|
|
143778
|
-
|
|
144317
|
+
const sdkDir = path15.join(outputDir, SDK_TITLE_LOWER);
|
|
144318
|
+
if (!fs17.existsSync(sdkDir)) {
|
|
144319
|
+
fs17.mkdirSync(sdkDir, { recursive: true });
|
|
143779
144320
|
}
|
|
143780
144321
|
const fileEntries = [
|
|
143781
144322
|
["databases.ts", result.dbContent],
|
|
@@ -143784,29 +144325,29 @@ var BaseDatabasesGenerator = class {
|
|
|
143784
144325
|
["constants.ts", result.constantsContent]
|
|
143785
144326
|
];
|
|
143786
144327
|
for (const [relativePath, content] of fileEntries) {
|
|
143787
|
-
const filePath =
|
|
143788
|
-
const fileDir =
|
|
143789
|
-
if (!
|
|
143790
|
-
|
|
144328
|
+
const filePath = path15.join(sdkDir, relativePath);
|
|
144329
|
+
const fileDir = path15.dirname(filePath);
|
|
144330
|
+
if (!fs17.existsSync(fileDir)) {
|
|
144331
|
+
fs17.mkdirSync(fileDir, { recursive: true });
|
|
143791
144332
|
}
|
|
143792
|
-
if (relativePath === "constants.ts" &&
|
|
144333
|
+
if (relativePath === "constants.ts" && fs17.existsSync(filePath)) {
|
|
143793
144334
|
continue;
|
|
143794
144335
|
}
|
|
143795
|
-
|
|
144336
|
+
fs17.writeFileSync(filePath, content, "utf-8");
|
|
143796
144337
|
}
|
|
143797
144338
|
}
|
|
143798
144339
|
getGeneratedFilePaths(_result) {
|
|
143799
144340
|
return [
|
|
143800
|
-
|
|
143801
|
-
|
|
143802
|
-
|
|
143803
|
-
|
|
144341
|
+
path15.join(SDK_TITLE_LOWER, "databases.ts"),
|
|
144342
|
+
path15.join(SDK_TITLE_LOWER, "types.ts"),
|
|
144343
|
+
path15.join(SDK_TITLE_LOWER, "index.ts"),
|
|
144344
|
+
path15.join(SDK_TITLE_LOWER, "constants.ts")
|
|
143804
144345
|
];
|
|
143805
144346
|
}
|
|
143806
144347
|
};
|
|
143807
144348
|
|
|
143808
144349
|
// lib/commands/generators/typescript/templates/types.ts.hbs
|
|
143809
|
-
var types_ts_default = "import { type Models } from '{{appwriteDep}}';\n\n{{{ENUMS}}}{{{TYPES}}}\ndeclare const __roleStringBrand: unique symbol;\nexport type RoleString = string & { readonly [__roleStringBrand]: never };\n\nexport type RoleBuilder = {\n any: () => RoleString;\n user: (userId: string, status?: string) => RoleString;\n users: (status?: string) => RoleString;\n guests: () => RoleString;\n team: (teamId: string, role?: string) => RoleString;\n member: (memberId: string) => RoleString;\n label: (label: string) => RoleString;\n}\n\nexport type PermissionBuilder = {\n read: (role: RoleString) => string;\n write: (role: RoleString) => string;\n create: (role: RoleString) => string;\n update: (role: RoleString) => string;\n delete: (role: RoleString) => string;\n}\n\nexport type PermissionCallback = (permission: PermissionBuilder, role: RoleBuilder) => string[];\n\nexport type QueryValue = string | number | boolean;\n\nexport type ExtractQueryValue<T> = T extends (infer U)[]\n ? U extends QueryValue ? U : never\n : T extends QueryValue | null ? NonNullable<T> : never;\n\nexport type QueryableKeys<T> = {\n [K in keyof T]: ExtractQueryValue<T[K]> extends never ? never : K;\n}[keyof T];\n\nexport type QueryBuilder<T> = {\n equal: <K extends QueryableKeys<T>>(field: K, value:
|
|
144350
|
+
var types_ts_default = "import { type Models } from '{{appwriteDep}}';\n\n{{{ENUMS}}}{{{TYPES}}}\ndeclare const __roleStringBrand: unique symbol;\nexport type RoleString = string & { readonly [__roleStringBrand]: never };\n\nexport type RoleBuilder = {\n any: () => RoleString;\n user: (userId: string, status?: string) => RoleString;\n users: (status?: string) => RoleString;\n guests: () => RoleString;\n team: (teamId: string, role?: string) => RoleString;\n member: (memberId: string) => RoleString;\n label: (label: string) => RoleString;\n}\n\nexport type PermissionBuilder = {\n read: (role: RoleString) => string;\n write: (role: RoleString) => string;\n create: (role: RoleString) => string;\n update: (role: RoleString) => string;\n delete: (role: RoleString) => string;\n}\n\nexport type PermissionCallback = (permission: PermissionBuilder, role: RoleBuilder) => string[];\n\nexport type QueryValue = string | number | boolean;\n\nexport type ExtractQueryValue<T> = T extends (infer U)[]\n ? U extends QueryValue ? U : never\n : T extends QueryValue | null ? NonNullable<T> : never;\n\nexport type QueryableKeys<T> = {\n [K in keyof T]: ExtractQueryValue<T[K]> extends never ? never : K;\n}[keyof T];\n\nexport type QueryableFieldValue<T, K> = K extends keyof T\n ? ExtractQueryValue<T[K]>\n : never;\n\nexport type QueryBuilder<T> = {\n equal: <K extends QueryableKeys<T>>(field: K, value: QueryableFieldValue<T, K>) => string;\n notEqual: <K extends QueryableKeys<T>>(field: K, value: QueryableFieldValue<T, K>) => string;\n lessThan: <K extends QueryableKeys<T>>(field: K, value: QueryableFieldValue<T, K>) => string;\n lessThanEqual: <K extends QueryableKeys<T>>(field: K, value: QueryableFieldValue<T, K>) => string;\n greaterThan: <K extends QueryableKeys<T>>(field: K, value: QueryableFieldValue<T, K>) => string;\n greaterThanEqual: <K extends QueryableKeys<T>>(field: K, value: QueryableFieldValue<T, K>) => string;\n contains: <K extends QueryableKeys<T>>(field: K, value: QueryableFieldValue<T, K>) => string;\n search: <K extends QueryableKeys<T>>(field: K, value: string) => string;\n isNull: <K extends QueryableKeys<T>>(field: K) => string;\n isNotNull: <K extends QueryableKeys<T>>(field: K) => string;\n startsWith: <K extends QueryableKeys<T>>(field: K, value: string) => string;\n endsWith: <K extends QueryableKeys<T>>(field: K, value: string) => string;\n between: <K extends QueryableKeys<T>>(field: K, start: QueryableFieldValue<T, K>, end: QueryableFieldValue<T, K>) => string;\n select: <K extends keyof T>(fields: K[]) => string;\n orderAsc: <K extends keyof T>(field: K) => string;\n orderDesc: <K extends keyof T>(field: K) => string;\n limit: (value: number) => string;\n offset: (value: number) => string;\n cursorAfter: (documentId: string) => string;\n cursorBefore: (documentId: string) => string;\n or: (...queries: string[]) => string;\n and: (...queries: string[]) => string;\n}\n\nexport type DatabaseId = {{{databaseIdType}}};\n\n{{{DATABASE_TABLES_TYPE}}}\n";
|
|
143810
144351
|
|
|
143811
144352
|
// lib/commands/generators/typescript/templates/databases.ts.hbs
|
|
143812
144353
|
var databases_ts_default = 'import { Client, TablesDB, ID, Query, type Models, Permission, Role } from \'{{appwriteDep}}\';\nimport type { DatabaseHandle, DatabaseId, DatabaseTableMap, DatabaseTables, QueryBuilder, QueryValue, PermissionBuilder, RoleBuilder, RoleString } from \'./types{{importExt}}\';\n{{#if supportsServerSide}}\nimport { PROJECT_ID, ENDPOINT, API_KEY } from \'./constants{{importExt}}\';\n{{else}}\nimport { PROJECT_ID, ENDPOINT } from \'./constants{{importExt}}\';\n{{/if}}\n\nconst createQueryBuilder = <T>(): QueryBuilder<T> => ({\n equal: (field, value) => Query.equal(String(field), value as QueryValue),\n notEqual: (field, value) => Query.notEqual(String(field), value as QueryValue),\n lessThan: (field, value) => Query.lessThan(String(field), value as QueryValue),\n lessThanEqual: (field, value) => Query.lessThanEqual(String(field), value as QueryValue),\n greaterThan: (field, value) => Query.greaterThan(String(field), value as QueryValue),\n greaterThanEqual: (field, value) => Query.greaterThanEqual(String(field), value as QueryValue),\n contains: (field, value) => Query.contains(String(field), value as string | QueryValue[]),\n search: (field, value) => Query.search(String(field), value),\n isNull: (field) => Query.isNull(String(field)),\n isNotNull: (field) => Query.isNotNull(String(field)),\n startsWith: (field, value) => Query.startsWith(String(field), value),\n endsWith: (field, value) => Query.endsWith(String(field), value),\n between: (field, start, end) => Query.between(String(field), start as string | number, end as string | number),\n select: (fields) => Query.select(fields.map(String)),\n orderAsc: (field) => Query.orderAsc(String(field)),\n orderDesc: (field) => Query.orderDesc(String(field)),\n limit: (value) => Query.limit(value),\n offset: (value) => Query.offset(value),\n cursorAfter: (documentId) => Query.cursorAfter(documentId),\n cursorBefore: (documentId) => Query.cursorBefore(documentId),\n or: (...queries) => Query.or(queries),\n and: (...queries) => Query.and(queries),\n});\n\n{{{TABLE_ID_MAP}}}\n\n{{{TABLES_WITH_RELATIONSHIPS}}}\n\nconst roleBuilder: RoleBuilder = {\n any: () => Role.any() as RoleString,\n user: (userId, status?) => Role.user(userId, status) as RoleString,\n users: (status?) => Role.users(status) as RoleString,\n guests: () => Role.guests() as RoleString,\n team: (teamId, role?) => Role.team(teamId, role) as RoleString,\n member: (memberId) => Role.member(memberId) as RoleString,\n label: (label) => Role.label(label) as RoleString,\n};\n\nconst permissionBuilder: PermissionBuilder = {\n read: (role) => Permission.read(role),\n write: (role) => Permission.write(role),\n create: (role) => Permission.create(role),\n update: (role) => Permission.update(role),\n delete: (role) => Permission.delete(role),\n};\n\nconst resolvePermissions = (callback?: (permission: { read: (role: RoleString) => string; write: (role: RoleString) => string; create: (role: RoleString) => string; update: (role: RoleString) => string; delete: (role: RoleString) => string }, role: { any: () => RoleString; user: (userId: string, status?: string) => RoleString; users: (status?: string) => RoleString; guests: () => RoleString; team: (teamId: string, role?: string) => RoleString; member: (memberId: string) => RoleString; label: (label: string) => RoleString }) => string[]): string[] | undefined =>\n callback?.(permissionBuilder, roleBuilder);\n\nfunction createTableApi<T extends Models.Row>(\n tablesDB: TablesDB,\n databaseId: string,\n tableId: string,\n) {\n return {\n create: (data: Omit<T, keyof Models.Row>, options?: { rowId?: string; permissions?: (permission: { read: (role: RoleString) => string; write: (role: RoleString) => string; create: (role: RoleString) => string; update: (role: RoleString) => string; delete: (role: RoleString) => string }, role: { any: () => RoleString; user: (userId: string, status?: string) => RoleString; users: (status?: string) => RoleString; guests: () => RoleString; team: (teamId: string, role?: string) => RoleString; member: (memberId: string) => RoleString; label: (label: string) => RoleString }) => string[]; transactionId?: string }) =>\n tablesDB.createRow<T>({\n databaseId,\n tableId,\n rowId: options?.rowId ?? ID.unique(),\n data: data as T extends Models.DefaultRow ? Partial<Models.Row> & Record<string, unknown> : Partial<Models.Row> & Omit<T, keyof Models.Row>,\n permissions: resolvePermissions(options?.permissions),\n transactionId: options?.transactionId,\n }),\n get: (id: string) =>\n tablesDB.getRow<T>({\n databaseId,\n tableId,\n rowId: id,\n }),\n update: (id: string, data: Partial<Omit<T, keyof Models.Row>>, options?: { permissions?: (permission: { read: (role: RoleString) => string; write: (role: RoleString) => string; create: (role: RoleString) => string; update: (role: RoleString) => string; delete: (role: RoleString) => string }, role: { any: () => RoleString; user: (userId: string, status?: string) => RoleString; users: (status?: string) => RoleString; guests: () => RoleString; team: (teamId: string, role?: string) => RoleString; member: (memberId: string) => RoleString; label: (label: string) => RoleString }) => string[]; transactionId?: string }) =>\n tablesDB.updateRow<T>({\n databaseId,\n tableId,\n rowId: id,\n data: data as T extends Models.DefaultRow ? Partial<Models.Row> & Record<string, unknown> : Partial<Models.Row> & Partial<Omit<T, keyof Models.Row>>,\n ...(options?.permissions ? { permissions: resolvePermissions(options.permissions) } : {}),\n transactionId: options?.transactionId,\n }),\n delete: async (id: string, options?: { transactionId?: string }) => {\n await tablesDB.deleteRow({\n databaseId,\n tableId,\n rowId: id,\n transactionId: options?.transactionId,\n });\n },\n list: (options?: { queries?: (q: QueryBuilder<T>) => string[] }) =>\n tablesDB.listRows<T>({\n databaseId,\n tableId,\n queries: options?.queries?.(createQueryBuilder<T>()),\n }),{{{BULK_METHODS}}}\n };\n}\n\n{{{BULK_CHECK}}}\nconst hasOwn = (obj: unknown, key: string): boolean =>\n obj != null && Object.prototype.hasOwnProperty.call(obj, key);\n\nfunction createDatabaseHandle<D extends DatabaseId>(\n tablesDB: TablesDB,\n databaseId: D,\n): DatabaseHandle<D> {\n const tableApiCache = new Map<string, unknown>();\n const dbMap = tableIdMap[databaseId];\n\n return {\n use: <T extends keyof DatabaseTableMap[D] & string>(tableId: T): DatabaseTableMap[D][T] => {\n if (!hasOwn(dbMap, tableId)) {\n throw new Error(`Unknown table "${tableId}" in database "${databaseId}"`);\n }\n\n if (!tableApiCache.has(tableId)) {\n const resolvedTableId = dbMap[tableId];\n const api = createTableApi(tablesDB, databaseId, resolvedTableId);\n {{{BULK_REMOVAL}}}\n tableApiCache.set(tableId, api);\n }\n return tableApiCache.get(tableId) as DatabaseTableMap[D][T];\n },\n{{#if supportsServerSide}}\n create: (tableId: string, name: string, options?: { permissions?: (permission: { read: (role: RoleString) => string; write: (role: RoleString) => string; create: (role: RoleString) => string; update: (role: RoleString) => string; delete: (role: RoleString) => string }, role: { any: () => RoleString; user: (userId: string, status?: string) => RoleString; users: (status?: string) => RoleString; guests: () => RoleString; team: (teamId: string, role?: string) => RoleString; member: (memberId: string) => RoleString; label: (label: string) => RoleString }) => string[]; rowSecurity?: boolean; enabled?: boolean; columns?: object[]; indexes?: object[] }) =>\n tablesDB.createTable({\n databaseId,\n tableId,\n name,\n permissions: resolvePermissions(options?.permissions),\n rowSecurity: options?.rowSecurity,\n enabled: options?.enabled,\n columns: options?.columns,\n indexes: options?.indexes,\n }),\n update: (tableId: string, options?: { name?: string; permissions?: (permission: { read: (role: RoleString) => string; write: (role: RoleString) => string; create: (role: RoleString) => string; update: (role: RoleString) => string; delete: (role: RoleString) => string }, role: { any: () => RoleString; user: (userId: string, status?: string) => RoleString; users: (status?: string) => RoleString; guests: () => RoleString; team: (teamId: string, role?: string) => RoleString; member: (memberId: string) => RoleString; label: (label: string) => RoleString }) => string[]; rowSecurity?: boolean; enabled?: boolean }) => {\n if (!hasOwn(dbMap, tableId)) {\n throw new Error(`Unknown table "${tableId}" in database "${databaseId}"`);\n }\n const resolvedTableId = dbMap[tableId];\n return tablesDB.updateTable({\n databaseId,\n tableId: resolvedTableId,\n name: options?.name,\n permissions: resolvePermissions(options?.permissions),\n rowSecurity: options?.rowSecurity,\n enabled: options?.enabled,\n });\n },\n delete: async (tableId: string) => {\n if (!hasOwn(dbMap, tableId)) {\n throw new Error(`Unknown table "${tableId}" in database "${databaseId}"`);\n }\n const resolvedTableId = dbMap[tableId];\n await tablesDB.deleteTable({\n databaseId,\n tableId: resolvedTableId,\n });\n },\n{{/if}}\n };\n}\n\nfunction createDatabasesApi(tablesDB: TablesDB): DatabaseTables {\n const dbCache = new Map<DatabaseId, ReturnType<typeof createDatabaseHandle>>();\n\n return {\n use: (databaseId: DatabaseId) => {\n if (!hasOwn(tableIdMap, databaseId)) {\n throw new Error(`Unknown database "${databaseId}"`);\n }\n\n if (!dbCache.has(databaseId)) {\n dbCache.set(databaseId, createDatabaseHandle(tablesDB, databaseId));\n }\n return dbCache.get(databaseId);\n },\n{{#if supportsServerSide}}\n create: (databaseId: string, name: string, options?: { enabled?: boolean }) =>\n tablesDB.create({\n databaseId,\n name,\n enabled: options?.enabled,\n }),\n update: (databaseId: DatabaseId, options?: { name?: string; enabled?: boolean }) => {\n return tablesDB.update({\n databaseId,\n name: options?.name ?? databaseId,\n enabled: options?.enabled,\n });\n },\n delete: async (databaseId: DatabaseId) => {\n await tablesDB.delete({\n databaseId,\n });\n },\n{{/if}}\n } as DatabaseTables;\n}\n\n// Initialize client\nconst client = new Client()\n .setEndpoint(ENDPOINT)\n .setProject(PROJECT_ID){{#if supportsServerSide}}\n .setKey(API_KEY){{/if}};\n\nconst tablesDB = new TablesDB(client);\n\nexport const databases: DatabaseTables = createDatabasesApi(tablesDB);\n';
|
|
@@ -143823,7 +144364,7 @@ var databasesTemplate = import_handlebars.default.compile(String(databases_ts_de
|
|
|
143823
144364
|
var indexTemplate = import_handlebars.default.compile(String(index_ts_default));
|
|
143824
144365
|
var constantsTemplate = import_handlebars.default.compile(String(constants_ts_default));
|
|
143825
144366
|
var PERMISSION_CALLBACK_INLINE = `(permission: { read: (role: RoleString) => string; write: (role: RoleString) => string; create: (role: RoleString) => string; update: (role: RoleString) => string; delete: (role: RoleString) => string }, role: { any: () => RoleString; user: (userId: string, status?: string) => RoleString; users: (status?: string) => RoleString; guests: () => RoleString; team: (teamId: string, role?: string) => RoleString; member: (memberId: string) => RoleString; label: (label: string) => RoleString }) => string[]`;
|
|
143826
|
-
var getQueryCallbackInline = (typeName) => `(q: { equal: <K extends QueryableKeys<${typeName}>>(field: K, value:
|
|
144367
|
+
var getQueryCallbackInline = (typeName) => `(q: { equal: <K extends QueryableKeys<${typeName}>>(field: K, value: QueryableFieldValue<${typeName}, K>) => string; notEqual: <K extends QueryableKeys<${typeName}>>(field: K, value: QueryableFieldValue<${typeName}, K>) => string; lessThan: <K extends QueryableKeys<${typeName}>>(field: K, value: QueryableFieldValue<${typeName}, K>) => string; lessThanEqual: <K extends QueryableKeys<${typeName}>>(field: K, value: QueryableFieldValue<${typeName}, K>) => string; greaterThan: <K extends QueryableKeys<${typeName}>>(field: K, value: QueryableFieldValue<${typeName}, K>) => string; greaterThanEqual: <K extends QueryableKeys<${typeName}>>(field: K, value: QueryableFieldValue<${typeName}, K>) => string; contains: <K extends QueryableKeys<${typeName}>>(field: K, value: QueryableFieldValue<${typeName}, K>) => string; search: <K extends QueryableKeys<${typeName}>>(field: K, value: string) => string; isNull: <K extends QueryableKeys<${typeName}>>(field: K) => string; isNotNull: <K extends QueryableKeys<${typeName}>>(field: K) => string; startsWith: <K extends QueryableKeys<${typeName}>>(field: K, value: string) => string; endsWith: <K extends QueryableKeys<${typeName}>>(field: K, value: string) => string; between: <K extends QueryableKeys<${typeName}>>(field: K, start: QueryableFieldValue<${typeName}, K>, end: QueryableFieldValue<${typeName}, K>) => string; select: <K extends keyof ${typeName}>(fields: K[]) => string; orderAsc: <K extends keyof ${typeName}>(field: K) => string; orderDesc: <K extends keyof ${typeName}>(field: K) => string; limit: (value: number) => string; offset: (value: number) => string; cursorAfter: (documentId: string) => string; cursorBefore: (documentId: string) => string; or: (...queries: string[]) => string; and: (...queries: string[]) => string }) => string[]`;
|
|
143827
144368
|
var TypeScriptDatabasesGenerator = class extends BaseDatabasesGenerator {
|
|
143828
144369
|
language = "typescript";
|
|
143829
144370
|
fileExtension = "ts";
|
|
@@ -144271,7 +144812,7 @@ Use --language to specify the target language. Supported: ${supported}`
|
|
|
144271
144812
|
collections: localConfig.getCollections()
|
|
144272
144813
|
};
|
|
144273
144814
|
const outputDir = options.output;
|
|
144274
|
-
const absoluteOutputDir =
|
|
144815
|
+
const absoluteOutputDir = path16.isAbsolute(outputDir) ? outputDir : path16.join(process.cwd(), outputDir);
|
|
144275
144816
|
log(
|
|
144276
144817
|
`Generating type-safe ${detectedLanguage} SDK to ${absoluteOutputDir}...`
|
|
144277
144818
|
);
|
|
@@ -144284,7 +144825,7 @@ Use --language to specify the target language. Supported: ${supported}`
|
|
|
144284
144825
|
const generatedFiles = generator.getGeneratedFilePaths(result);
|
|
144285
144826
|
success2(`Generated files:`);
|
|
144286
144827
|
for (const file2 of generatedFiles) {
|
|
144287
|
-
console.log(` - ${
|
|
144828
|
+
console.log(` - ${path16.join(outputDir, file2)}`);
|
|
144288
144829
|
}
|
|
144289
144830
|
if (detectedLanguage === "typescript") {
|
|
144290
144831
|
const entities = config2.tables?.length ? config2.tables : config2.collections;
|
|
@@ -145350,7 +145891,7 @@ var databasesGetUsageCommand = databases.command(`get-usage`).description(`Get u
|
|
|
145350
145891
|
);
|
|
145351
145892
|
|
|
145352
145893
|
// lib/commands/services/functions.ts
|
|
145353
|
-
import
|
|
145894
|
+
import fs18 from "fs";
|
|
145354
145895
|
var functionsClient = null;
|
|
145355
145896
|
var getFunctionsClient = async () => {
|
|
145356
145897
|
if (!functionsClient) {
|
|
@@ -145510,7 +146051,7 @@ var functionsGetDeploymentDownloadCommand = functions.command(`get-deployment-do
|
|
|
145510
146051
|
const url2 = await (await getFunctionsClient()).getDeploymentDownload(functionId, deploymentId, type);
|
|
145511
146052
|
const response = await fetch(url2);
|
|
145512
146053
|
const buffer = Buffer.from(await response.arrayBuffer());
|
|
145513
|
-
|
|
146054
|
+
fs18.writeFileSync(destination, buffer);
|
|
145514
146055
|
success2(`File saved to ${destination}`);
|
|
145515
146056
|
}
|
|
145516
146057
|
)
|
|
@@ -145535,7 +146076,7 @@ var functionsCreateExecutionCommand = functions.command(`create-execution`).desc
|
|
|
145535
146076
|
(value) => value === void 0 ? true : parseBool(value)
|
|
145536
146077
|
).option(`--path <path>`, `HTTP path of execution. Path can include query params. Default value is /`).option(`--method <method>`, `HTTP method of execution. Default value is POST.`).option(`--headers <headers>`, `HTTP headers of execution. Defaults to empty.`).option(`--scheduled-at <scheduled-at>`, `Scheduled execution time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.`).action(
|
|
145537
146078
|
actionRunner(
|
|
145538
|
-
async ({ functionId, body, async, path:
|
|
146079
|
+
async ({ functionId, body, async, path: path17, method, headers, scheduledAt }) => parse3(await (await getFunctionsClient()).createExecution(functionId, body, async, path17, method, JSON.parse(headers), scheduledAt))
|
|
145539
146080
|
)
|
|
145540
146081
|
);
|
|
145541
146082
|
var functionsGetExecutionCommand = functions.command(`get-execution`).description(`Get a function execution log by its unique ID.`).requiredOption(`--function-id <function-id>`, `Function ID.`).requiredOption(`--execution-id <execution-id>`, `Execution ID.`).action(
|
|
@@ -147070,7 +147611,7 @@ var proxyUpdateRuleVerificationCommand = proxy.command(`update-rule-verification
|
|
|
147070
147611
|
);
|
|
147071
147612
|
|
|
147072
147613
|
// lib/commands/services/sites.ts
|
|
147073
|
-
import
|
|
147614
|
+
import fs19 from "fs";
|
|
147074
147615
|
var sitesClient = null;
|
|
147075
147616
|
var getSitesClient = async () => {
|
|
147076
147617
|
if (!sitesClient) {
|
|
@@ -147226,7 +147767,7 @@ var sitesGetDeploymentDownloadCommand = sites.command(`get-deployment-download`)
|
|
|
147226
147767
|
const url2 = await (await getSitesClient()).getDeploymentDownload(siteId, deploymentId, type);
|
|
147227
147768
|
const response = await fetch(url2);
|
|
147228
147769
|
const buffer = Buffer.from(await response.arrayBuffer());
|
|
147229
|
-
|
|
147770
|
+
fs19.writeFileSync(destination, buffer);
|
|
147230
147771
|
success2(`File saved to ${destination}`);
|
|
147231
147772
|
}
|
|
147232
147773
|
)
|
|
@@ -147295,7 +147836,7 @@ var sitesDeleteVariableCommand = sites.command(`delete-variable`).description(`D
|
|
|
147295
147836
|
);
|
|
147296
147837
|
|
|
147297
147838
|
// lib/commands/services/storage.ts
|
|
147298
|
-
import
|
|
147839
|
+
import fs20 from "fs";
|
|
147299
147840
|
var storageClient = null;
|
|
147300
147841
|
var getStorageClient = async () => {
|
|
147301
147842
|
if (!storageClient) {
|
|
@@ -147418,7 +147959,7 @@ var storageGetFileDownloadCommand = storage.command(`get-file-download`).descrip
|
|
|
147418
147959
|
const url2 = await (await getStorageClient()).getFileDownload(bucketId, fileId, token);
|
|
147419
147960
|
const response = await fetch(url2);
|
|
147420
147961
|
const buffer = Buffer.from(await response.arrayBuffer());
|
|
147421
|
-
|
|
147962
|
+
fs20.writeFileSync(destination, buffer);
|
|
147422
147963
|
success2(`File saved to ${destination}`);
|
|
147423
147964
|
}
|
|
147424
147965
|
)
|
|
@@ -147429,7 +147970,7 @@ var storageGetFilePreviewCommand = storage.command(`get-file-preview`).descripti
|
|
|
147429
147970
|
const url2 = await (await getStorageClient()).getFilePreview(bucketId, fileId, width, height, gravity, quality, borderWidth, borderColor, borderRadius, opacity, rotation, background, output, token);
|
|
147430
147971
|
const response = await fetch(url2);
|
|
147431
147972
|
const buffer = Buffer.from(await response.arrayBuffer());
|
|
147432
|
-
|
|
147973
|
+
fs20.writeFileSync(destination, buffer);
|
|
147433
147974
|
success2(`File saved to ${destination}`);
|
|
147434
147975
|
}
|
|
147435
147976
|
)
|
|
@@ -147440,7 +147981,7 @@ var storageGetFileViewCommand = storage.command(`get-file-view`).description(`Ge
|
|
|
147440
147981
|
const url2 = await (await getStorageClient()).getFileView(bucketId, fileId, token);
|
|
147441
147982
|
const response = await fetch(url2);
|
|
147442
147983
|
const buffer = Buffer.from(await response.arrayBuffer());
|
|
147443
|
-
|
|
147984
|
+
fs20.writeFileSync(destination, buffer);
|
|
147444
147985
|
success2(`File saved to ${destination}`);
|
|
147445
147986
|
}
|
|
147446
147987
|
)
|
|
@@ -148594,7 +149135,9 @@ async function maybeShowUpdateNotice() {
|
|
|
148594
149135
|
async function checkVersion() {
|
|
148595
149136
|
process.stdout.write(import_chalk15.default.bold(`appwrite version ${version3}`) + "\n");
|
|
148596
149137
|
try {
|
|
148597
|
-
const latestVersion = await
|
|
149138
|
+
const latestVersion = await getLatestVersionForCurrentInstallation({
|
|
149139
|
+
timeoutMs: VERSION_CHECK_TIMEOUT_MS
|
|
149140
|
+
});
|
|
148598
149141
|
syncVersionCheckCache(version3, latestVersion);
|
|
148599
149142
|
const comparison = compareVersions(version3, latestVersion);
|
|
148600
149143
|
if (comparison > 0) {
|