@exodus/xqa 1.10.0 → 1.12.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 +31 -0
- package/dist/xqa.cjs +859 -530
- package/package.json +4 -4
package/dist/xqa.cjs
CHANGED
|
@@ -1194,8 +1194,8 @@ var require_command = __commonJS({
|
|
|
1194
1194
|
"../../node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/command.js"(exports2) {
|
|
1195
1195
|
var EventEmitter = require("node:events").EventEmitter;
|
|
1196
1196
|
var childProcess = require("node:child_process");
|
|
1197
|
-
var
|
|
1198
|
-
var
|
|
1197
|
+
var path24 = require("node:path");
|
|
1198
|
+
var fs4 = require("node:fs");
|
|
1199
1199
|
var process6 = require("node:process");
|
|
1200
1200
|
var { Argument: Argument2, humanReadableArgName } = require_argument();
|
|
1201
1201
|
var { CommanderError: CommanderError2 } = require_error();
|
|
@@ -1621,9 +1621,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1621
1621
|
if (fn) {
|
|
1622
1622
|
this._exitCallback = fn;
|
|
1623
1623
|
} else {
|
|
1624
|
-
this._exitCallback = (
|
|
1625
|
-
if (
|
|
1626
|
-
throw
|
|
1624
|
+
this._exitCallback = (err20) => {
|
|
1625
|
+
if (err20.code !== "commander.executeSubCommandAsync") {
|
|
1626
|
+
throw err20;
|
|
1627
1627
|
} else {
|
|
1628
1628
|
}
|
|
1629
1629
|
};
|
|
@@ -1699,12 +1699,12 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1699
1699
|
_callParseArg(target, value, previous, invalidArgumentMessage) {
|
|
1700
1700
|
try {
|
|
1701
1701
|
return target.parseArg(value, previous);
|
|
1702
|
-
} catch (
|
|
1703
|
-
if (
|
|
1704
|
-
const message = `${invalidArgumentMessage} ${
|
|
1705
|
-
this.error(message, { exitCode:
|
|
1702
|
+
} catch (err20) {
|
|
1703
|
+
if (err20.code === "commander.invalidArgument") {
|
|
1704
|
+
const message = `${invalidArgumentMessage} ${err20.message}`;
|
|
1705
|
+
this.error(message, { exitCode: err20.exitCode, code: err20.code });
|
|
1706
1706
|
}
|
|
1707
|
-
throw
|
|
1707
|
+
throw err20;
|
|
1708
1708
|
}
|
|
1709
1709
|
}
|
|
1710
1710
|
/**
|
|
@@ -2189,7 +2189,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2189
2189
|
* @param {string} subcommandName
|
|
2190
2190
|
*/
|
|
2191
2191
|
_checkForMissingExecutable(executableFile, executableDir, subcommandName) {
|
|
2192
|
-
if (
|
|
2192
|
+
if (fs4.existsSync(executableFile)) return;
|
|
2193
2193
|
const executableDirMessage = executableDir ? `searched for local subcommand relative to directory '${executableDir}'` : "no directory for search for local subcommand, use .executableDir() to supply a custom directory";
|
|
2194
2194
|
const executableMissing = `'${executableFile}' does not exist
|
|
2195
2195
|
- if '${subcommandName}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
@@ -2207,11 +2207,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2207
2207
|
let launchWithNode = false;
|
|
2208
2208
|
const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
|
|
2209
2209
|
function findFile(baseDir, baseName) {
|
|
2210
|
-
const localBin =
|
|
2211
|
-
if (
|
|
2212
|
-
if (sourceExt.includes(
|
|
2210
|
+
const localBin = path24.resolve(baseDir, baseName);
|
|
2211
|
+
if (fs4.existsSync(localBin)) return localBin;
|
|
2212
|
+
if (sourceExt.includes(path24.extname(baseName))) return void 0;
|
|
2213
2213
|
const foundExt = sourceExt.find(
|
|
2214
|
-
(ext) =>
|
|
2214
|
+
(ext) => fs4.existsSync(`${localBin}${ext}`)
|
|
2215
2215
|
);
|
|
2216
2216
|
if (foundExt) return `${localBin}${foundExt}`;
|
|
2217
2217
|
return void 0;
|
|
@@ -2223,21 +2223,21 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2223
2223
|
if (this._scriptPath) {
|
|
2224
2224
|
let resolvedScriptPath;
|
|
2225
2225
|
try {
|
|
2226
|
-
resolvedScriptPath =
|
|
2226
|
+
resolvedScriptPath = fs4.realpathSync(this._scriptPath);
|
|
2227
2227
|
} catch {
|
|
2228
2228
|
resolvedScriptPath = this._scriptPath;
|
|
2229
2229
|
}
|
|
2230
|
-
executableDir =
|
|
2231
|
-
|
|
2230
|
+
executableDir = path24.resolve(
|
|
2231
|
+
path24.dirname(resolvedScriptPath),
|
|
2232
2232
|
executableDir
|
|
2233
2233
|
);
|
|
2234
2234
|
}
|
|
2235
2235
|
if (executableDir) {
|
|
2236
2236
|
let localFile = findFile(executableDir, executableFile);
|
|
2237
2237
|
if (!localFile && !subcommand._executableFile && this._scriptPath) {
|
|
2238
|
-
const legacyName =
|
|
2238
|
+
const legacyName = path24.basename(
|
|
2239
2239
|
this._scriptPath,
|
|
2240
|
-
|
|
2240
|
+
path24.extname(this._scriptPath)
|
|
2241
2241
|
);
|
|
2242
2242
|
if (legacyName !== this._name) {
|
|
2243
2243
|
localFile = findFile(
|
|
@@ -2248,7 +2248,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2248
2248
|
}
|
|
2249
2249
|
executableFile = localFile || executableFile;
|
|
2250
2250
|
}
|
|
2251
|
-
launchWithNode = sourceExt.includes(
|
|
2251
|
+
launchWithNode = sourceExt.includes(path24.extname(executableFile));
|
|
2252
2252
|
let proc;
|
|
2253
2253
|
if (process6.platform !== "win32") {
|
|
2254
2254
|
if (launchWithNode) {
|
|
@@ -2293,14 +2293,14 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2293
2293
|
);
|
|
2294
2294
|
}
|
|
2295
2295
|
});
|
|
2296
|
-
proc.on("error", (
|
|
2297
|
-
if (
|
|
2296
|
+
proc.on("error", (err20) => {
|
|
2297
|
+
if (err20.code === "ENOENT") {
|
|
2298
2298
|
this._checkForMissingExecutable(
|
|
2299
2299
|
executableFile,
|
|
2300
2300
|
executableDir,
|
|
2301
2301
|
subcommand._name
|
|
2302
2302
|
);
|
|
2303
|
-
} else if (
|
|
2303
|
+
} else if (err20.code === "EACCES") {
|
|
2304
2304
|
throw new Error(`'${executableFile}' not executable`);
|
|
2305
2305
|
}
|
|
2306
2306
|
if (!exitCallback) {
|
|
@@ -2311,7 +2311,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2311
2311
|
"commander.executeSubCommandAsync",
|
|
2312
2312
|
"(error)"
|
|
2313
2313
|
);
|
|
2314
|
-
wrappedError.nestedError =
|
|
2314
|
+
wrappedError.nestedError = err20;
|
|
2315
2315
|
exitCallback(wrappedError);
|
|
2316
2316
|
}
|
|
2317
2317
|
});
|
|
@@ -3163,7 +3163,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
3163
3163
|
* @return {Command}
|
|
3164
3164
|
*/
|
|
3165
3165
|
nameFromFilename(filename) {
|
|
3166
|
-
this._name =
|
|
3166
|
+
this._name = path24.basename(filename, path24.extname(filename));
|
|
3167
3167
|
return this;
|
|
3168
3168
|
}
|
|
3169
3169
|
/**
|
|
@@ -3177,9 +3177,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
3177
3177
|
* @param {string} [path]
|
|
3178
3178
|
* @return {(string|null|Command)}
|
|
3179
3179
|
*/
|
|
3180
|
-
executableDir(
|
|
3181
|
-
if (
|
|
3182
|
-
this._executableDir =
|
|
3180
|
+
executableDir(path25) {
|
|
3181
|
+
if (path25 === void 0) return this._executableDir;
|
|
3182
|
+
this._executableDir = path25;
|
|
3183
3183
|
return this;
|
|
3184
3184
|
}
|
|
3185
3185
|
/**
|
|
@@ -3539,11 +3539,11 @@ var require_index_cjs = __commonJS({
|
|
|
3539
3539
|
try {
|
|
3540
3540
|
step(g3[n3](v2));
|
|
3541
3541
|
} catch (e3) {
|
|
3542
|
-
|
|
3542
|
+
settle2(q4[0][3], e3);
|
|
3543
3543
|
}
|
|
3544
3544
|
}
|
|
3545
3545
|
function step(r3) {
|
|
3546
|
-
r3.value instanceof __await2 ? Promise.resolve(r3.value.v).then(fulfill, reject) :
|
|
3546
|
+
r3.value instanceof __await2 ? Promise.resolve(r3.value.v).then(fulfill, reject) : settle2(q4[0][2], r3);
|
|
3547
3547
|
}
|
|
3548
3548
|
function fulfill(value) {
|
|
3549
3549
|
resume("next", value);
|
|
@@ -3551,7 +3551,7 @@ var require_index_cjs = __commonJS({
|
|
|
3551
3551
|
function reject(value) {
|
|
3552
3552
|
resume("throw", value);
|
|
3553
3553
|
}
|
|
3554
|
-
function
|
|
3554
|
+
function settle2(f6, v2) {
|
|
3555
3555
|
if (f6(v2), q4.shift(), q4.length) resume(q4[0][0], q4[0][1]);
|
|
3556
3556
|
}
|
|
3557
3557
|
}
|
|
@@ -3577,17 +3577,17 @@ var require_index_cjs = __commonJS({
|
|
|
3577
3577
|
function verb(n3) {
|
|
3578
3578
|
i3[n3] = o3[n3] && function(v2) {
|
|
3579
3579
|
return new Promise(function(resolve, reject) {
|
|
3580
|
-
v2 = o3[n3](v2),
|
|
3580
|
+
v2 = o3[n3](v2), settle2(resolve, reject, v2.done, v2.value);
|
|
3581
3581
|
});
|
|
3582
3582
|
};
|
|
3583
3583
|
}
|
|
3584
|
-
function
|
|
3584
|
+
function settle2(resolve, reject, d, v2) {
|
|
3585
3585
|
Promise.resolve(v2).then(function(v3) {
|
|
3586
3586
|
resolve({ value: v3, done: d });
|
|
3587
3587
|
}, reject);
|
|
3588
3588
|
}
|
|
3589
3589
|
}
|
|
3590
|
-
var
|
|
3590
|
+
var ResultAsync14 = class _ResultAsync {
|
|
3591
3591
|
constructor(res) {
|
|
3592
3592
|
this._promise = res;
|
|
3593
3593
|
}
|
|
@@ -3688,8 +3688,8 @@ var require_index_cjs = __commonJS({
|
|
|
3688
3688
|
return new Ok(res.value);
|
|
3689
3689
|
})));
|
|
3690
3690
|
}
|
|
3691
|
-
match(
|
|
3692
|
-
return this._promise.then((res) => res.match(
|
|
3691
|
+
match(ok24, _err) {
|
|
3692
|
+
return this._promise.then((res) => res.match(ok24, _err));
|
|
3693
3693
|
}
|
|
3694
3694
|
unwrapOr(t) {
|
|
3695
3695
|
return this._promise.then((res) => res.unwrapOr(t));
|
|
@@ -3726,19 +3726,19 @@ var require_index_cjs = __commonJS({
|
|
|
3726
3726
|
}
|
|
3727
3727
|
};
|
|
3728
3728
|
function okAsync8(value) {
|
|
3729
|
-
return new
|
|
3729
|
+
return new ResultAsync14(Promise.resolve(new Ok(value)));
|
|
3730
3730
|
}
|
|
3731
|
-
function errAsync8(
|
|
3732
|
-
return new
|
|
3731
|
+
function errAsync8(err21) {
|
|
3732
|
+
return new ResultAsync14(Promise.resolve(new Err(err21)));
|
|
3733
3733
|
}
|
|
3734
|
-
var fromPromise =
|
|
3735
|
-
var fromSafePromise2 =
|
|
3736
|
-
var fromAsyncThrowable10 =
|
|
3734
|
+
var fromPromise = ResultAsync14.fromPromise;
|
|
3735
|
+
var fromSafePromise2 = ResultAsync14.fromSafePromise;
|
|
3736
|
+
var fromAsyncThrowable10 = ResultAsync14.fromThrowable;
|
|
3737
3737
|
var combineResultList = (resultList) => {
|
|
3738
|
-
let acc =
|
|
3738
|
+
let acc = ok21([]);
|
|
3739
3739
|
for (const result of resultList) {
|
|
3740
3740
|
if (result.isErr()) {
|
|
3741
|
-
acc =
|
|
3741
|
+
acc = err20(result.error);
|
|
3742
3742
|
break;
|
|
3743
3743
|
} else {
|
|
3744
3744
|
acc.map((list) => list.push(result.value));
|
|
@@ -3746,30 +3746,30 @@ var require_index_cjs = __commonJS({
|
|
|
3746
3746
|
}
|
|
3747
3747
|
return acc;
|
|
3748
3748
|
};
|
|
3749
|
-
var combineResultAsyncList = (asyncResultList) =>
|
|
3749
|
+
var combineResultAsyncList = (asyncResultList) => ResultAsync14.fromSafePromise(Promise.all(asyncResultList)).andThen(combineResultList);
|
|
3750
3750
|
var combineResultListWithAllErrors = (resultList) => {
|
|
3751
|
-
let acc =
|
|
3751
|
+
let acc = ok21([]);
|
|
3752
3752
|
for (const result of resultList) {
|
|
3753
3753
|
if (result.isErr() && acc.isErr()) {
|
|
3754
3754
|
acc.error.push(result.error);
|
|
3755
3755
|
} else if (result.isErr() && acc.isOk()) {
|
|
3756
|
-
acc =
|
|
3756
|
+
acc = err20([result.error]);
|
|
3757
3757
|
} else if (result.isOk() && acc.isOk()) {
|
|
3758
3758
|
acc.value.push(result.value);
|
|
3759
3759
|
}
|
|
3760
3760
|
}
|
|
3761
3761
|
return acc;
|
|
3762
3762
|
};
|
|
3763
|
-
var combineResultAsyncListWithAllErrors = (asyncResultList) =>
|
|
3763
|
+
var combineResultAsyncListWithAllErrors = (asyncResultList) => ResultAsync14.fromSafePromise(Promise.all(asyncResultList)).andThen(combineResultListWithAllErrors);
|
|
3764
3764
|
exports2.Result = void 0;
|
|
3765
3765
|
(function(Result3) {
|
|
3766
3766
|
function fromThrowable16(fn, errorFn) {
|
|
3767
3767
|
return (...args) => {
|
|
3768
3768
|
try {
|
|
3769
3769
|
const result = fn(...args);
|
|
3770
|
-
return
|
|
3770
|
+
return ok21(result);
|
|
3771
3771
|
} catch (e3) {
|
|
3772
|
-
return
|
|
3772
|
+
return err20(errorFn ? errorFn(e3) : e3);
|
|
3773
3773
|
}
|
|
3774
3774
|
};
|
|
3775
3775
|
}
|
|
@@ -3783,16 +3783,16 @@ var require_index_cjs = __commonJS({
|
|
|
3783
3783
|
}
|
|
3784
3784
|
Result3.combineWithAllErrors = combineWithAllErrors;
|
|
3785
3785
|
})(exports2.Result || (exports2.Result = {}));
|
|
3786
|
-
function
|
|
3786
|
+
function ok21(value) {
|
|
3787
3787
|
return new Ok(value);
|
|
3788
3788
|
}
|
|
3789
|
-
function
|
|
3790
|
-
return new Err(
|
|
3789
|
+
function err20(err21) {
|
|
3790
|
+
return new Err(err21);
|
|
3791
3791
|
}
|
|
3792
3792
|
function safeTry(body) {
|
|
3793
3793
|
const n3 = body().next();
|
|
3794
3794
|
if (n3 instanceof Promise) {
|
|
3795
|
-
return new
|
|
3795
|
+
return new ResultAsync14(n3.then((r3) => r3.value));
|
|
3796
3796
|
}
|
|
3797
3797
|
return n3.value;
|
|
3798
3798
|
}
|
|
@@ -3807,11 +3807,11 @@ var require_index_cjs = __commonJS({
|
|
|
3807
3807
|
return !this.isOk();
|
|
3808
3808
|
}
|
|
3809
3809
|
map(f6) {
|
|
3810
|
-
return
|
|
3810
|
+
return ok21(f6(this.value));
|
|
3811
3811
|
}
|
|
3812
3812
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3813
3813
|
mapErr(_f) {
|
|
3814
|
-
return
|
|
3814
|
+
return ok21(this.value);
|
|
3815
3815
|
}
|
|
3816
3816
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
3817
3817
|
andThen(f6) {
|
|
@@ -3826,14 +3826,14 @@ var require_index_cjs = __commonJS({
|
|
|
3826
3826
|
f6(this.value);
|
|
3827
3827
|
} catch (e3) {
|
|
3828
3828
|
}
|
|
3829
|
-
return
|
|
3829
|
+
return ok21(this.value);
|
|
3830
3830
|
}
|
|
3831
3831
|
orTee(_f) {
|
|
3832
|
-
return
|
|
3832
|
+
return ok21(this.value);
|
|
3833
3833
|
}
|
|
3834
3834
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
3835
3835
|
orElse(_f) {
|
|
3836
|
-
return
|
|
3836
|
+
return ok21(this.value);
|
|
3837
3837
|
}
|
|
3838
3838
|
asyncAndThen(f6) {
|
|
3839
3839
|
return f6(this.value);
|
|
@@ -3843,15 +3843,15 @@ var require_index_cjs = __commonJS({
|
|
|
3843
3843
|
return f6(this.value).map(() => this.value);
|
|
3844
3844
|
}
|
|
3845
3845
|
asyncMap(f6) {
|
|
3846
|
-
return
|
|
3846
|
+
return ResultAsync14.fromSafePromise(f6(this.value));
|
|
3847
3847
|
}
|
|
3848
3848
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3849
3849
|
unwrapOr(_v) {
|
|
3850
3850
|
return this.value;
|
|
3851
3851
|
}
|
|
3852
3852
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3853
|
-
match(
|
|
3854
|
-
return
|
|
3853
|
+
match(ok24, _err) {
|
|
3854
|
+
return ok24(this.value);
|
|
3855
3855
|
}
|
|
3856
3856
|
safeUnwrap() {
|
|
3857
3857
|
const value = this.value;
|
|
@@ -3882,27 +3882,27 @@ var require_index_cjs = __commonJS({
|
|
|
3882
3882
|
}
|
|
3883
3883
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3884
3884
|
map(_f) {
|
|
3885
|
-
return
|
|
3885
|
+
return err20(this.error);
|
|
3886
3886
|
}
|
|
3887
3887
|
mapErr(f6) {
|
|
3888
|
-
return
|
|
3888
|
+
return err20(f6(this.error));
|
|
3889
3889
|
}
|
|
3890
3890
|
andThrough(_f) {
|
|
3891
|
-
return
|
|
3891
|
+
return err20(this.error);
|
|
3892
3892
|
}
|
|
3893
3893
|
andTee(_f) {
|
|
3894
|
-
return
|
|
3894
|
+
return err20(this.error);
|
|
3895
3895
|
}
|
|
3896
3896
|
orTee(f6) {
|
|
3897
3897
|
try {
|
|
3898
3898
|
f6(this.error);
|
|
3899
3899
|
} catch (e3) {
|
|
3900
3900
|
}
|
|
3901
|
-
return
|
|
3901
|
+
return err20(this.error);
|
|
3902
3902
|
}
|
|
3903
3903
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
3904
3904
|
andThen(_f) {
|
|
3905
|
-
return
|
|
3905
|
+
return err20(this.error);
|
|
3906
3906
|
}
|
|
3907
3907
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
3908
3908
|
orElse(f6) {
|
|
@@ -3922,13 +3922,13 @@ var require_index_cjs = __commonJS({
|
|
|
3922
3922
|
unwrapOr(v2) {
|
|
3923
3923
|
return v2;
|
|
3924
3924
|
}
|
|
3925
|
-
match(_ok,
|
|
3926
|
-
return
|
|
3925
|
+
match(_ok, err21) {
|
|
3926
|
+
return err21(this.error);
|
|
3927
3927
|
}
|
|
3928
3928
|
safeUnwrap() {
|
|
3929
3929
|
const error48 = this.error;
|
|
3930
3930
|
return (function* () {
|
|
3931
|
-
yield
|
|
3931
|
+
yield err20(error48);
|
|
3932
3932
|
throw new Error("Do not use this generator out of `safeTry`");
|
|
3933
3933
|
})();
|
|
3934
3934
|
}
|
|
@@ -3947,14 +3947,14 @@ var require_index_cjs = __commonJS({
|
|
|
3947
3947
|
var fromThrowable15 = exports2.Result.fromThrowable;
|
|
3948
3948
|
exports2.Err = Err;
|
|
3949
3949
|
exports2.Ok = Ok;
|
|
3950
|
-
exports2.ResultAsync =
|
|
3951
|
-
exports2.err =
|
|
3950
|
+
exports2.ResultAsync = ResultAsync14;
|
|
3951
|
+
exports2.err = err20;
|
|
3952
3952
|
exports2.errAsync = errAsync8;
|
|
3953
3953
|
exports2.fromAsyncThrowable = fromAsyncThrowable10;
|
|
3954
3954
|
exports2.fromPromise = fromPromise;
|
|
3955
3955
|
exports2.fromSafePromise = fromSafePromise2;
|
|
3956
3956
|
exports2.fromThrowable = fromThrowable15;
|
|
3957
|
-
exports2.ok =
|
|
3957
|
+
exports2.ok = ok21;
|
|
3958
3958
|
exports2.okAsync = okAsync8;
|
|
3959
3959
|
exports2.safeTry = safeTry;
|
|
3960
3960
|
}
|
|
@@ -5052,15 +5052,15 @@ var require_route = __commonJS({
|
|
|
5052
5052
|
};
|
|
5053
5053
|
}
|
|
5054
5054
|
function wrapConversion(toModel, graph) {
|
|
5055
|
-
const
|
|
5055
|
+
const path24 = [graph[toModel].parent, toModel];
|
|
5056
5056
|
let fn = conversions[graph[toModel].parent][toModel];
|
|
5057
5057
|
let cur = graph[toModel].parent;
|
|
5058
5058
|
while (graph[cur].parent) {
|
|
5059
|
-
|
|
5059
|
+
path24.unshift(graph[cur].parent);
|
|
5060
5060
|
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
5061
5061
|
cur = graph[cur].parent;
|
|
5062
5062
|
}
|
|
5063
|
-
fn.conversion =
|
|
5063
|
+
fn.conversion = path24;
|
|
5064
5064
|
return fn;
|
|
5065
5065
|
}
|
|
5066
5066
|
module2.exports = function(fromModel) {
|
|
@@ -11116,13 +11116,13 @@ var require_lib2 = __commonJS({
|
|
|
11116
11116
|
exports2.analyse = analyse;
|
|
11117
11117
|
var detectFile = (filepath, opts = {}) => new Promise((resolve, reject) => {
|
|
11118
11118
|
let fd;
|
|
11119
|
-
const
|
|
11120
|
-
const handler = (
|
|
11119
|
+
const fs4 = (0, node_1.default)();
|
|
11120
|
+
const handler = (err20, buffer) => {
|
|
11121
11121
|
if (fd) {
|
|
11122
|
-
|
|
11122
|
+
fs4.closeSync(fd);
|
|
11123
11123
|
}
|
|
11124
|
-
if (
|
|
11125
|
-
reject(
|
|
11124
|
+
if (err20) {
|
|
11125
|
+
reject(err20);
|
|
11126
11126
|
} else if (buffer) {
|
|
11127
11127
|
resolve((0, exports2.detect)(buffer));
|
|
11128
11128
|
} else {
|
|
@@ -11131,11 +11131,11 @@ var require_lib2 = __commonJS({
|
|
|
11131
11131
|
};
|
|
11132
11132
|
const sampleSize = (opts === null || opts === void 0 ? void 0 : opts.sampleSize) || 0;
|
|
11133
11133
|
if (sampleSize > 0) {
|
|
11134
|
-
fd =
|
|
11134
|
+
fd = fs4.openSync(filepath, "r");
|
|
11135
11135
|
let sample = Buffer.allocUnsafe(sampleSize);
|
|
11136
|
-
|
|
11137
|
-
if (
|
|
11138
|
-
handler(
|
|
11136
|
+
fs4.read(fd, sample, 0, sampleSize, opts.offset, (err20, bytesRead) => {
|
|
11137
|
+
if (err20) {
|
|
11138
|
+
handler(err20, null);
|
|
11139
11139
|
} else {
|
|
11140
11140
|
if (bytesRead < sampleSize) {
|
|
11141
11141
|
sample = sample.subarray(0, bytesRead);
|
|
@@ -11145,22 +11145,22 @@ var require_lib2 = __commonJS({
|
|
|
11145
11145
|
});
|
|
11146
11146
|
return;
|
|
11147
11147
|
}
|
|
11148
|
-
|
|
11148
|
+
fs4.readFile(filepath, handler);
|
|
11149
11149
|
});
|
|
11150
11150
|
exports2.detectFile = detectFile;
|
|
11151
11151
|
var detectFileSync = (filepath, opts = {}) => {
|
|
11152
|
-
const
|
|
11152
|
+
const fs4 = (0, node_1.default)();
|
|
11153
11153
|
if (opts && opts.sampleSize) {
|
|
11154
|
-
const fd =
|
|
11154
|
+
const fd = fs4.openSync(filepath, "r");
|
|
11155
11155
|
let sample = Buffer.allocUnsafe(opts.sampleSize);
|
|
11156
|
-
const bytesRead =
|
|
11156
|
+
const bytesRead = fs4.readSync(fd, sample, 0, opts.sampleSize, opts.offset);
|
|
11157
11157
|
if (bytesRead < opts.sampleSize) {
|
|
11158
11158
|
sample = sample.subarray(0, bytesRead);
|
|
11159
11159
|
}
|
|
11160
|
-
|
|
11160
|
+
fs4.closeSync(fd);
|
|
11161
11161
|
return (0, exports2.detect)(sample);
|
|
11162
11162
|
}
|
|
11163
|
-
return (0, exports2.detect)(
|
|
11163
|
+
return (0, exports2.detect)(fs4.readFileSync(filepath));
|
|
11164
11164
|
};
|
|
11165
11165
|
exports2.detectFileSync = detectFileSync;
|
|
11166
11166
|
exports2.default = {
|
|
@@ -15025,8 +15025,8 @@ var require_package = __commonJS({
|
|
|
15025
15025
|
// ../../node_modules/.pnpm/dotenv@16.6.1/node_modules/dotenv/lib/main.js
|
|
15026
15026
|
var require_main = __commonJS({
|
|
15027
15027
|
"../../node_modules/.pnpm/dotenv@16.6.1/node_modules/dotenv/lib/main.js"(exports2, module2) {
|
|
15028
|
-
var
|
|
15029
|
-
var
|
|
15028
|
+
var fs4 = require("fs");
|
|
15029
|
+
var path24 = require("path");
|
|
15030
15030
|
var os4 = require("os");
|
|
15031
15031
|
var crypto = require("crypto");
|
|
15032
15032
|
var packageJson = require_package();
|
|
@@ -15057,9 +15057,9 @@ var require_main = __commonJS({
|
|
|
15057
15057
|
options.path = vaultPath;
|
|
15058
15058
|
const result = DotenvModule.configDotenv(options);
|
|
15059
15059
|
if (!result.parsed) {
|
|
15060
|
-
const
|
|
15061
|
-
|
|
15062
|
-
throw
|
|
15060
|
+
const err20 = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`);
|
|
15061
|
+
err20.code = "MISSING_DATA";
|
|
15062
|
+
throw err20;
|
|
15063
15063
|
}
|
|
15064
15064
|
const keys = _dotenvKey(options).split(",");
|
|
15065
15065
|
const length = keys.length;
|
|
@@ -15102,30 +15102,30 @@ var require_main = __commonJS({
|
|
|
15102
15102
|
uri = new URL(dotenvKey);
|
|
15103
15103
|
} catch (error48) {
|
|
15104
15104
|
if (error48.code === "ERR_INVALID_URL") {
|
|
15105
|
-
const
|
|
15106
|
-
|
|
15107
|
-
throw
|
|
15105
|
+
const err20 = new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");
|
|
15106
|
+
err20.code = "INVALID_DOTENV_KEY";
|
|
15107
|
+
throw err20;
|
|
15108
15108
|
}
|
|
15109
15109
|
throw error48;
|
|
15110
15110
|
}
|
|
15111
15111
|
const key = uri.password;
|
|
15112
15112
|
if (!key) {
|
|
15113
|
-
const
|
|
15114
|
-
|
|
15115
|
-
throw
|
|
15113
|
+
const err20 = new Error("INVALID_DOTENV_KEY: Missing key part");
|
|
15114
|
+
err20.code = "INVALID_DOTENV_KEY";
|
|
15115
|
+
throw err20;
|
|
15116
15116
|
}
|
|
15117
15117
|
const environment = uri.searchParams.get("environment");
|
|
15118
15118
|
if (!environment) {
|
|
15119
|
-
const
|
|
15120
|
-
|
|
15121
|
-
throw
|
|
15119
|
+
const err20 = new Error("INVALID_DOTENV_KEY: Missing environment part");
|
|
15120
|
+
err20.code = "INVALID_DOTENV_KEY";
|
|
15121
|
+
throw err20;
|
|
15122
15122
|
}
|
|
15123
15123
|
const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`;
|
|
15124
15124
|
const ciphertext = result.parsed[environmentKey];
|
|
15125
15125
|
if (!ciphertext) {
|
|
15126
|
-
const
|
|
15127
|
-
|
|
15128
|
-
throw
|
|
15126
|
+
const err20 = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`);
|
|
15127
|
+
err20.code = "NOT_FOUND_DOTENV_ENVIRONMENT";
|
|
15128
|
+
throw err20;
|
|
15129
15129
|
}
|
|
15130
15130
|
return { ciphertext, key };
|
|
15131
15131
|
}
|
|
@@ -15134,7 +15134,7 @@ var require_main = __commonJS({
|
|
|
15134
15134
|
if (options && options.path && options.path.length > 0) {
|
|
15135
15135
|
if (Array.isArray(options.path)) {
|
|
15136
15136
|
for (const filepath of options.path) {
|
|
15137
|
-
if (
|
|
15137
|
+
if (fs4.existsSync(filepath)) {
|
|
15138
15138
|
possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
|
|
15139
15139
|
}
|
|
15140
15140
|
}
|
|
@@ -15142,15 +15142,15 @@ var require_main = __commonJS({
|
|
|
15142
15142
|
possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
|
|
15143
15143
|
}
|
|
15144
15144
|
} else {
|
|
15145
|
-
possibleVaultPath =
|
|
15145
|
+
possibleVaultPath = path24.resolve(process.cwd(), ".env.vault");
|
|
15146
15146
|
}
|
|
15147
|
-
if (
|
|
15147
|
+
if (fs4.existsSync(possibleVaultPath)) {
|
|
15148
15148
|
return possibleVaultPath;
|
|
15149
15149
|
}
|
|
15150
15150
|
return null;
|
|
15151
15151
|
}
|
|
15152
15152
|
function _resolveHome(envPath) {
|
|
15153
|
-
return envPath[0] === "~" ?
|
|
15153
|
+
return envPath[0] === "~" ? path24.join(os4.homedir(), envPath.slice(1)) : envPath;
|
|
15154
15154
|
}
|
|
15155
15155
|
function _configVault(options) {
|
|
15156
15156
|
const debug = Boolean(options && options.debug);
|
|
@@ -15167,7 +15167,7 @@ var require_main = __commonJS({
|
|
|
15167
15167
|
return { parsed };
|
|
15168
15168
|
}
|
|
15169
15169
|
function configDotenv(options) {
|
|
15170
|
-
const dotenvPath =
|
|
15170
|
+
const dotenvPath = path24.resolve(process.cwd(), ".env");
|
|
15171
15171
|
let encoding = "utf8";
|
|
15172
15172
|
const debug = Boolean(options && options.debug);
|
|
15173
15173
|
const quiet = options && "quiet" in options ? options.quiet : true;
|
|
@@ -15191,13 +15191,13 @@ var require_main = __commonJS({
|
|
|
15191
15191
|
}
|
|
15192
15192
|
let lastError;
|
|
15193
15193
|
const parsedAll = {};
|
|
15194
|
-
for (const
|
|
15194
|
+
for (const path25 of optionPaths) {
|
|
15195
15195
|
try {
|
|
15196
|
-
const parsed = DotenvModule.parse(
|
|
15196
|
+
const parsed = DotenvModule.parse(fs4.readFileSync(path25, { encoding }));
|
|
15197
15197
|
DotenvModule.populate(parsedAll, parsed, options);
|
|
15198
15198
|
} catch (e3) {
|
|
15199
15199
|
if (debug) {
|
|
15200
|
-
_debug(`Failed to load ${
|
|
15200
|
+
_debug(`Failed to load ${path25} ${e3.message}`);
|
|
15201
15201
|
}
|
|
15202
15202
|
lastError = e3;
|
|
15203
15203
|
}
|
|
@@ -15212,7 +15212,7 @@ var require_main = __commonJS({
|
|
|
15212
15212
|
const shortPaths = [];
|
|
15213
15213
|
for (const filePath of optionPaths) {
|
|
15214
15214
|
try {
|
|
15215
|
-
const relative =
|
|
15215
|
+
const relative = path24.relative(process.cwd(), filePath);
|
|
15216
15216
|
shortPaths.push(relative);
|
|
15217
15217
|
} catch (e3) {
|
|
15218
15218
|
if (debug) {
|
|
@@ -15255,13 +15255,13 @@ var require_main = __commonJS({
|
|
|
15255
15255
|
const invalidKeyLength = error48.message === "Invalid key length";
|
|
15256
15256
|
const decryptionFailed = error48.message === "Unsupported state or unable to authenticate data";
|
|
15257
15257
|
if (isRange || invalidKeyLength) {
|
|
15258
|
-
const
|
|
15259
|
-
|
|
15260
|
-
throw
|
|
15258
|
+
const err20 = new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");
|
|
15259
|
+
err20.code = "INVALID_DOTENV_KEY";
|
|
15260
|
+
throw err20;
|
|
15261
15261
|
} else if (decryptionFailed) {
|
|
15262
|
-
const
|
|
15263
|
-
|
|
15264
|
-
throw
|
|
15262
|
+
const err20 = new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");
|
|
15263
|
+
err20.code = "DECRYPTION_FAILED";
|
|
15264
|
+
throw err20;
|
|
15265
15265
|
} else {
|
|
15266
15266
|
throw error48;
|
|
15267
15267
|
}
|
|
@@ -15271,9 +15271,9 @@ var require_main = __commonJS({
|
|
|
15271
15271
|
const debug = Boolean(options && options.debug);
|
|
15272
15272
|
const override = Boolean(options && options.override);
|
|
15273
15273
|
if (typeof parsed !== "object") {
|
|
15274
|
-
const
|
|
15275
|
-
|
|
15276
|
-
throw
|
|
15274
|
+
const err20 = new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");
|
|
15275
|
+
err20.code = "OBJECT_REQUIRED";
|
|
15276
|
+
throw err20;
|
|
15277
15277
|
}
|
|
15278
15278
|
for (const key of Object.keys(parsed)) {
|
|
15279
15279
|
if (Object.prototype.hasOwnProperty.call(processEnv, key)) {
|
|
@@ -15384,7 +15384,7 @@ var require_path = __commonJS({
|
|
|
15384
15384
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
15385
15385
|
exports2.convertPosixPathToPattern = exports2.convertWindowsPathToPattern = exports2.convertPathToPattern = exports2.escapePosixPath = exports2.escapeWindowsPath = exports2.escape = exports2.removeLeadingDotSegment = exports2.makeAbsolute = exports2.unixify = void 0;
|
|
15386
15386
|
var os4 = require("os");
|
|
15387
|
-
var
|
|
15387
|
+
var path24 = require("path");
|
|
15388
15388
|
var IS_WINDOWS_PLATFORM = os4.platform() === "win32";
|
|
15389
15389
|
var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
|
|
15390
15390
|
var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;
|
|
@@ -15396,7 +15396,7 @@ var require_path = __commonJS({
|
|
|
15396
15396
|
}
|
|
15397
15397
|
exports2.unixify = unixify;
|
|
15398
15398
|
function makeAbsolute(cwd, filepath) {
|
|
15399
|
-
return
|
|
15399
|
+
return path24.resolve(cwd, filepath);
|
|
15400
15400
|
}
|
|
15401
15401
|
exports2.makeAbsolute = makeAbsolute;
|
|
15402
15402
|
function removeLeadingDotSegment(entry) {
|
|
@@ -16693,7 +16693,7 @@ var require_braces = __commonJS({
|
|
|
16693
16693
|
var require_constants2 = __commonJS({
|
|
16694
16694
|
"../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/constants.js"(exports2, module2) {
|
|
16695
16695
|
"use strict";
|
|
16696
|
-
var
|
|
16696
|
+
var path24 = require("path");
|
|
16697
16697
|
var WIN_SLASH = "\\\\/";
|
|
16698
16698
|
var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
16699
16699
|
var DEFAULT_MAX_EXTGLOB_RECURSION = 0;
|
|
@@ -16867,7 +16867,7 @@ var require_constants2 = __commonJS({
|
|
|
16867
16867
|
/* | */
|
|
16868
16868
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
|
|
16869
16869
|
/* \uFEFF */
|
|
16870
|
-
SEP:
|
|
16870
|
+
SEP: path24.sep,
|
|
16871
16871
|
/**
|
|
16872
16872
|
* Create EXTGLOB_CHARS
|
|
16873
16873
|
*/
|
|
@@ -16894,7 +16894,7 @@ var require_constants2 = __commonJS({
|
|
|
16894
16894
|
var require_utils3 = __commonJS({
|
|
16895
16895
|
"../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/utils.js"(exports2) {
|
|
16896
16896
|
"use strict";
|
|
16897
|
-
var
|
|
16897
|
+
var path24 = require("path");
|
|
16898
16898
|
var win32 = process.platform === "win32";
|
|
16899
16899
|
var {
|
|
16900
16900
|
REGEX_BACKSLASH,
|
|
@@ -16923,7 +16923,7 @@ var require_utils3 = __commonJS({
|
|
|
16923
16923
|
if (options && typeof options.windows === "boolean") {
|
|
16924
16924
|
return options.windows;
|
|
16925
16925
|
}
|
|
16926
|
-
return win32 === true ||
|
|
16926
|
+
return win32 === true || path24.sep === "\\";
|
|
16927
16927
|
};
|
|
16928
16928
|
exports2.escapeLast = (input, char, lastIdx) => {
|
|
16929
16929
|
const idx = input.lastIndexOf(char, lastIdx);
|
|
@@ -18287,7 +18287,7 @@ var require_parse2 = __commonJS({
|
|
|
18287
18287
|
var require_picomatch = __commonJS({
|
|
18288
18288
|
"../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/picomatch.js"(exports2, module2) {
|
|
18289
18289
|
"use strict";
|
|
18290
|
-
var
|
|
18290
|
+
var path24 = require("path");
|
|
18291
18291
|
var scan = require_scan();
|
|
18292
18292
|
var parse3 = require_parse2();
|
|
18293
18293
|
var utils = require_utils3();
|
|
@@ -18372,7 +18372,7 @@ var require_picomatch = __commonJS({
|
|
|
18372
18372
|
};
|
|
18373
18373
|
picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
|
|
18374
18374
|
const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
|
|
18375
|
-
return regex.test(
|
|
18375
|
+
return regex.test(path24.basename(input));
|
|
18376
18376
|
};
|
|
18377
18377
|
picomatch.isMatch = (str2, patterns, options) => picomatch(patterns, options)(str2);
|
|
18378
18378
|
picomatch.parse = (pattern, options) => {
|
|
@@ -18414,8 +18414,8 @@ var require_picomatch = __commonJS({
|
|
|
18414
18414
|
try {
|
|
18415
18415
|
const opts = options || {};
|
|
18416
18416
|
return new RegExp(source, opts.flags || (opts.nocase ? "i" : ""));
|
|
18417
|
-
} catch (
|
|
18418
|
-
if (options && options.debug === true) throw
|
|
18417
|
+
} catch (err20) {
|
|
18418
|
+
if (options && options.debug === true) throw err20;
|
|
18419
18419
|
return /$^/;
|
|
18420
18420
|
}
|
|
18421
18421
|
};
|
|
@@ -18599,7 +18599,7 @@ var require_pattern = __commonJS({
|
|
|
18599
18599
|
"use strict";
|
|
18600
18600
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
18601
18601
|
exports2.isAbsolute = exports2.partitionAbsoluteAndRelative = exports2.removeDuplicateSlashes = exports2.matchAny = exports2.convertPatternsToRe = exports2.makeRe = exports2.getPatternParts = exports2.expandBraceExpansion = exports2.expandPatternsWithBraceExpansion = exports2.isAffectDepthOfReadingPattern = exports2.endsWithSlashGlobStar = exports2.hasGlobStar = exports2.getBaseDirectory = exports2.isPatternRelatedToParentDirectory = exports2.getPatternsOutsideCurrentDirectory = exports2.getPatternsInsideCurrentDirectory = exports2.getPositivePatterns = exports2.getNegativePatterns = exports2.isPositivePattern = exports2.isNegativePattern = exports2.convertToNegativePattern = exports2.convertToPositivePattern = exports2.isDynamicPattern = exports2.isStaticPattern = void 0;
|
|
18602
|
-
var
|
|
18602
|
+
var path24 = require("path");
|
|
18603
18603
|
var globParent = require_glob_parent();
|
|
18604
18604
|
var micromatch = require_micromatch();
|
|
18605
18605
|
var GLOBSTAR = "**";
|
|
@@ -18694,7 +18694,7 @@ var require_pattern = __commonJS({
|
|
|
18694
18694
|
}
|
|
18695
18695
|
exports2.endsWithSlashGlobStar = endsWithSlashGlobStar;
|
|
18696
18696
|
function isAffectDepthOfReadingPattern(pattern) {
|
|
18697
|
-
const basename =
|
|
18697
|
+
const basename = path24.basename(pattern);
|
|
18698
18698
|
return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
|
|
18699
18699
|
}
|
|
18700
18700
|
exports2.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
|
|
@@ -18752,7 +18752,7 @@ var require_pattern = __commonJS({
|
|
|
18752
18752
|
}
|
|
18753
18753
|
exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
|
|
18754
18754
|
function isAbsolute(pattern) {
|
|
18755
|
-
return
|
|
18755
|
+
return path24.isAbsolute(pattern);
|
|
18756
18756
|
}
|
|
18757
18757
|
exports2.isAbsolute = isAbsolute;
|
|
18758
18758
|
}
|
|
@@ -18822,8 +18822,8 @@ var require_merge2 = __commonJS({
|
|
|
18822
18822
|
}
|
|
18823
18823
|
next();
|
|
18824
18824
|
}
|
|
18825
|
-
function onerror(
|
|
18826
|
-
mergedStream.emit("error",
|
|
18825
|
+
function onerror(err20) {
|
|
18826
|
+
mergedStream.emit("error", err20);
|
|
18827
18827
|
}
|
|
18828
18828
|
if (stream._readableState.endEmitted) {
|
|
18829
18829
|
return next();
|
|
@@ -18927,10 +18927,10 @@ var require_utils4 = __commonJS({
|
|
|
18927
18927
|
exports2.array = array2;
|
|
18928
18928
|
var errno = require_errno();
|
|
18929
18929
|
exports2.errno = errno;
|
|
18930
|
-
var
|
|
18931
|
-
exports2.fs =
|
|
18932
|
-
var
|
|
18933
|
-
exports2.path =
|
|
18930
|
+
var fs4 = require_fs();
|
|
18931
|
+
exports2.fs = fs4;
|
|
18932
|
+
var path24 = require_path();
|
|
18933
|
+
exports2.path = path24;
|
|
18934
18934
|
var pattern = require_pattern();
|
|
18935
18935
|
exports2.pattern = pattern;
|
|
18936
18936
|
var stream = require_stream();
|
|
@@ -19042,8 +19042,8 @@ var require_async = __commonJS({
|
|
|
19042
19042
|
"use strict";
|
|
19043
19043
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
19044
19044
|
exports2.read = void 0;
|
|
19045
|
-
function read(
|
|
19046
|
-
settings.fs.lstat(
|
|
19045
|
+
function read(path24, settings, callback) {
|
|
19046
|
+
settings.fs.lstat(path24, (lstatError, lstat) => {
|
|
19047
19047
|
if (lstatError !== null) {
|
|
19048
19048
|
callFailureCallback(callback, lstatError);
|
|
19049
19049
|
return;
|
|
@@ -19052,7 +19052,7 @@ var require_async = __commonJS({
|
|
|
19052
19052
|
callSuccessCallback(callback, lstat);
|
|
19053
19053
|
return;
|
|
19054
19054
|
}
|
|
19055
|
-
settings.fs.stat(
|
|
19055
|
+
settings.fs.stat(path24, (statError, stat2) => {
|
|
19056
19056
|
if (statError !== null) {
|
|
19057
19057
|
if (settings.throwErrorOnBrokenSymbolicLink) {
|
|
19058
19058
|
callFailureCallback(callback, statError);
|
|
@@ -19084,13 +19084,13 @@ var require_sync = __commonJS({
|
|
|
19084
19084
|
"use strict";
|
|
19085
19085
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
19086
19086
|
exports2.read = void 0;
|
|
19087
|
-
function read(
|
|
19088
|
-
const lstat = settings.fs.lstatSync(
|
|
19087
|
+
function read(path24, settings) {
|
|
19088
|
+
const lstat = settings.fs.lstatSync(path24);
|
|
19089
19089
|
if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
|
|
19090
19090
|
return lstat;
|
|
19091
19091
|
}
|
|
19092
19092
|
try {
|
|
19093
|
-
const stat2 = settings.fs.statSync(
|
|
19093
|
+
const stat2 = settings.fs.statSync(path24);
|
|
19094
19094
|
if (settings.markSymbolicLink) {
|
|
19095
19095
|
stat2.isSymbolicLink = () => true;
|
|
19096
19096
|
}
|
|
@@ -19112,12 +19112,12 @@ var require_fs2 = __commonJS({
|
|
|
19112
19112
|
"use strict";
|
|
19113
19113
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
19114
19114
|
exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0;
|
|
19115
|
-
var
|
|
19115
|
+
var fs4 = require("fs");
|
|
19116
19116
|
exports2.FILE_SYSTEM_ADAPTER = {
|
|
19117
|
-
lstat:
|
|
19118
|
-
stat:
|
|
19119
|
-
lstatSync:
|
|
19120
|
-
statSync:
|
|
19117
|
+
lstat: fs4.lstat,
|
|
19118
|
+
stat: fs4.stat,
|
|
19119
|
+
lstatSync: fs4.lstatSync,
|
|
19120
|
+
statSync: fs4.statSync
|
|
19121
19121
|
};
|
|
19122
19122
|
function createFileSystemAdapter(fsMethods) {
|
|
19123
19123
|
if (fsMethods === void 0) {
|
|
@@ -19134,12 +19134,12 @@ var require_settings = __commonJS({
|
|
|
19134
19134
|
"../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.js"(exports2) {
|
|
19135
19135
|
"use strict";
|
|
19136
19136
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
19137
|
-
var
|
|
19137
|
+
var fs4 = require_fs2();
|
|
19138
19138
|
var Settings = class {
|
|
19139
19139
|
constructor(_options = {}) {
|
|
19140
19140
|
this._options = _options;
|
|
19141
19141
|
this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true);
|
|
19142
|
-
this.fs =
|
|
19142
|
+
this.fs = fs4.createFileSystemAdapter(this._options.fs);
|
|
19143
19143
|
this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false);
|
|
19144
19144
|
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
|
|
19145
19145
|
}
|
|
@@ -19161,17 +19161,17 @@ var require_out = __commonJS({
|
|
|
19161
19161
|
var sync = require_sync();
|
|
19162
19162
|
var settings_1 = require_settings();
|
|
19163
19163
|
exports2.Settings = settings_1.default;
|
|
19164
|
-
function stat2(
|
|
19164
|
+
function stat2(path24, optionsOrSettingsOrCallback, callback) {
|
|
19165
19165
|
if (typeof optionsOrSettingsOrCallback === "function") {
|
|
19166
|
-
async.read(
|
|
19166
|
+
async.read(path24, getSettings(), optionsOrSettingsOrCallback);
|
|
19167
19167
|
return;
|
|
19168
19168
|
}
|
|
19169
|
-
async.read(
|
|
19169
|
+
async.read(path24, getSettings(optionsOrSettingsOrCallback), callback);
|
|
19170
19170
|
}
|
|
19171
19171
|
exports2.stat = stat2;
|
|
19172
|
-
function statSync2(
|
|
19172
|
+
function statSync2(path24, optionsOrSettings) {
|
|
19173
19173
|
const settings = getSettings(optionsOrSettings);
|
|
19174
|
-
return sync.read(
|
|
19174
|
+
return sync.read(path24, settings);
|
|
19175
19175
|
}
|
|
19176
19176
|
exports2.statSync = statSync2;
|
|
19177
19177
|
function getSettings(settingsOrOptions = {}) {
|
|
@@ -19187,8 +19187,8 @@ var require_out = __commonJS({
|
|
|
19187
19187
|
var require_queue_microtask = __commonJS({
|
|
19188
19188
|
"../../node_modules/.pnpm/queue-microtask@1.2.3/node_modules/queue-microtask/index.js"(exports2, module2) {
|
|
19189
19189
|
var promise2;
|
|
19190
|
-
module2.exports = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : global) : (cb2) => (promise2 || (promise2 = Promise.resolve())).then(cb2).catch((
|
|
19191
|
-
throw
|
|
19190
|
+
module2.exports = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : global) : (cb2) => (promise2 || (promise2 = Promise.resolve())).then(cb2).catch((err20) => setTimeout(() => {
|
|
19191
|
+
throw err20;
|
|
19192
19192
|
}, 0));
|
|
19193
19193
|
}
|
|
19194
19194
|
});
|
|
@@ -19209,32 +19209,32 @@ var require_run_parallel = __commonJS({
|
|
|
19209
19209
|
results = {};
|
|
19210
19210
|
pending = keys.length;
|
|
19211
19211
|
}
|
|
19212
|
-
function done(
|
|
19212
|
+
function done(err20) {
|
|
19213
19213
|
function end() {
|
|
19214
|
-
if (cb2) cb2(
|
|
19214
|
+
if (cb2) cb2(err20, results);
|
|
19215
19215
|
cb2 = null;
|
|
19216
19216
|
}
|
|
19217
19217
|
if (isSync) queueMicrotask2(end);
|
|
19218
19218
|
else end();
|
|
19219
19219
|
}
|
|
19220
|
-
function each(i3,
|
|
19220
|
+
function each(i3, err20, result) {
|
|
19221
19221
|
results[i3] = result;
|
|
19222
|
-
if (--pending === 0 ||
|
|
19223
|
-
done(
|
|
19222
|
+
if (--pending === 0 || err20) {
|
|
19223
|
+
done(err20);
|
|
19224
19224
|
}
|
|
19225
19225
|
}
|
|
19226
19226
|
if (!pending) {
|
|
19227
19227
|
done(null);
|
|
19228
19228
|
} else if (keys) {
|
|
19229
19229
|
keys.forEach(function(key) {
|
|
19230
|
-
tasks[key](function(
|
|
19231
|
-
each(key,
|
|
19230
|
+
tasks[key](function(err20, result) {
|
|
19231
|
+
each(key, err20, result);
|
|
19232
19232
|
});
|
|
19233
19233
|
});
|
|
19234
19234
|
} else {
|
|
19235
19235
|
tasks.forEach(function(task, i3) {
|
|
19236
|
-
task(function(
|
|
19237
|
-
each(i3,
|
|
19236
|
+
task(function(err20, result) {
|
|
19237
|
+
each(i3, err20, result);
|
|
19238
19238
|
});
|
|
19239
19239
|
});
|
|
19240
19240
|
}
|
|
@@ -19294,8 +19294,8 @@ var require_utils5 = __commonJS({
|
|
|
19294
19294
|
"use strict";
|
|
19295
19295
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
19296
19296
|
exports2.fs = void 0;
|
|
19297
|
-
var
|
|
19298
|
-
exports2.fs =
|
|
19297
|
+
var fs4 = require_fs3();
|
|
19298
|
+
exports2.fs = fs4;
|
|
19299
19299
|
}
|
|
19300
19300
|
});
|
|
19301
19301
|
|
|
@@ -19387,16 +19387,16 @@ var require_async2 = __commonJS({
|
|
|
19387
19387
|
return;
|
|
19388
19388
|
}
|
|
19389
19389
|
const tasks = names.map((name) => {
|
|
19390
|
-
const
|
|
19390
|
+
const path24 = common3.joinPathSegments(directory, name, settings.pathSegmentSeparator);
|
|
19391
19391
|
return (done) => {
|
|
19392
|
-
fsStat.stat(
|
|
19392
|
+
fsStat.stat(path24, settings.fsStatSettings, (error48, stats) => {
|
|
19393
19393
|
if (error48 !== null) {
|
|
19394
19394
|
done(error48);
|
|
19395
19395
|
return;
|
|
19396
19396
|
}
|
|
19397
19397
|
const entry = {
|
|
19398
19398
|
name,
|
|
19399
|
-
path:
|
|
19399
|
+
path: path24,
|
|
19400
19400
|
dirent: utils.fs.createDirentFromStats(name, stats)
|
|
19401
19401
|
};
|
|
19402
19402
|
if (settings.stats) {
|
|
@@ -19490,14 +19490,14 @@ var require_fs4 = __commonJS({
|
|
|
19490
19490
|
"use strict";
|
|
19491
19491
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
19492
19492
|
exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0;
|
|
19493
|
-
var
|
|
19493
|
+
var fs4 = require("fs");
|
|
19494
19494
|
exports2.FILE_SYSTEM_ADAPTER = {
|
|
19495
|
-
lstat:
|
|
19496
|
-
stat:
|
|
19497
|
-
lstatSync:
|
|
19498
|
-
statSync:
|
|
19499
|
-
readdir:
|
|
19500
|
-
readdirSync:
|
|
19495
|
+
lstat: fs4.lstat,
|
|
19496
|
+
stat: fs4.stat,
|
|
19497
|
+
lstatSync: fs4.lstatSync,
|
|
19498
|
+
statSync: fs4.statSync,
|
|
19499
|
+
readdir: fs4.readdir,
|
|
19500
|
+
readdirSync: fs4.readdirSync
|
|
19501
19501
|
};
|
|
19502
19502
|
function createFileSystemAdapter(fsMethods) {
|
|
19503
19503
|
if (fsMethods === void 0) {
|
|
@@ -19514,15 +19514,15 @@ var require_settings2 = __commonJS({
|
|
|
19514
19514
|
"../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.js"(exports2) {
|
|
19515
19515
|
"use strict";
|
|
19516
19516
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
19517
|
-
var
|
|
19517
|
+
var path24 = require("path");
|
|
19518
19518
|
var fsStat = require_out();
|
|
19519
|
-
var
|
|
19519
|
+
var fs4 = require_fs4();
|
|
19520
19520
|
var Settings = class {
|
|
19521
19521
|
constructor(_options = {}) {
|
|
19522
19522
|
this._options = _options;
|
|
19523
19523
|
this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
|
|
19524
|
-
this.fs =
|
|
19525
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator,
|
|
19524
|
+
this.fs = fs4.createFileSystemAdapter(this._options.fs);
|
|
19525
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path24.sep);
|
|
19526
19526
|
this.stats = this._getValue(this._options.stats, false);
|
|
19527
19527
|
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
|
|
19528
19528
|
this.fsStatSettings = new fsStat.Settings({
|
|
@@ -19549,17 +19549,17 @@ var require_out2 = __commonJS({
|
|
|
19549
19549
|
var sync = require_sync2();
|
|
19550
19550
|
var settings_1 = require_settings2();
|
|
19551
19551
|
exports2.Settings = settings_1.default;
|
|
19552
|
-
function scandir(
|
|
19552
|
+
function scandir(path24, optionsOrSettingsOrCallback, callback) {
|
|
19553
19553
|
if (typeof optionsOrSettingsOrCallback === "function") {
|
|
19554
|
-
async.read(
|
|
19554
|
+
async.read(path24, getSettings(), optionsOrSettingsOrCallback);
|
|
19555
19555
|
return;
|
|
19556
19556
|
}
|
|
19557
|
-
async.read(
|
|
19557
|
+
async.read(path24, getSettings(optionsOrSettingsOrCallback), callback);
|
|
19558
19558
|
}
|
|
19559
19559
|
exports2.scandir = scandir;
|
|
19560
|
-
function scandirSync(
|
|
19560
|
+
function scandirSync(path24, optionsOrSettings) {
|
|
19561
19561
|
const settings = getSettings(optionsOrSettings);
|
|
19562
|
-
return sync.read(
|
|
19562
|
+
return sync.read(path24, settings);
|
|
19563
19563
|
}
|
|
19564
19564
|
exports2.scandirSync = scandirSync;
|
|
19565
19565
|
function getSettings(settingsOrOptions = {}) {
|
|
@@ -19623,8 +19623,8 @@ var require_queue = __commonJS({
|
|
|
19623
19623
|
var errorHandler = null;
|
|
19624
19624
|
var self2 = {
|
|
19625
19625
|
push,
|
|
19626
|
-
drain:
|
|
19627
|
-
saturated:
|
|
19626
|
+
drain: noop3,
|
|
19627
|
+
saturated: noop3,
|
|
19628
19628
|
pause,
|
|
19629
19629
|
paused: false,
|
|
19630
19630
|
get concurrency() {
|
|
@@ -19647,7 +19647,7 @@ var require_queue = __commonJS({
|
|
|
19647
19647
|
length,
|
|
19648
19648
|
getQueue,
|
|
19649
19649
|
unshift,
|
|
19650
|
-
empty:
|
|
19650
|
+
empty: noop3,
|
|
19651
19651
|
kill,
|
|
19652
19652
|
killAndDrain,
|
|
19653
19653
|
error: error48,
|
|
@@ -19699,7 +19699,7 @@ var require_queue = __commonJS({
|
|
|
19699
19699
|
current.context = context;
|
|
19700
19700
|
current.release = release;
|
|
19701
19701
|
current.value = value;
|
|
19702
|
-
current.callback = done ||
|
|
19702
|
+
current.callback = done || noop3;
|
|
19703
19703
|
current.errorHandler = errorHandler;
|
|
19704
19704
|
if (_running >= _concurrency || self2.paused) {
|
|
19705
19705
|
if (queueTail) {
|
|
@@ -19720,7 +19720,7 @@ var require_queue = __commonJS({
|
|
|
19720
19720
|
current.context = context;
|
|
19721
19721
|
current.release = release;
|
|
19722
19722
|
current.value = value;
|
|
19723
|
-
current.callback = done ||
|
|
19723
|
+
current.callback = done || noop3;
|
|
19724
19724
|
current.errorHandler = errorHandler;
|
|
19725
19725
|
if (_running >= _concurrency || self2.paused) {
|
|
19726
19726
|
if (queueHead) {
|
|
@@ -19762,13 +19762,13 @@ var require_queue = __commonJS({
|
|
|
19762
19762
|
function kill() {
|
|
19763
19763
|
queueHead = null;
|
|
19764
19764
|
queueTail = null;
|
|
19765
|
-
self2.drain =
|
|
19765
|
+
self2.drain = noop3;
|
|
19766
19766
|
}
|
|
19767
19767
|
function killAndDrain() {
|
|
19768
19768
|
queueHead = null;
|
|
19769
19769
|
queueTail = null;
|
|
19770
19770
|
self2.drain();
|
|
19771
|
-
self2.drain =
|
|
19771
|
+
self2.drain = noop3;
|
|
19772
19772
|
}
|
|
19773
19773
|
function abort() {
|
|
19774
19774
|
var current = queueHead;
|
|
@@ -19781,7 +19781,7 @@ var require_queue = __commonJS({
|
|
|
19781
19781
|
var val = current.value;
|
|
19782
19782
|
var context2 = current.context;
|
|
19783
19783
|
current.value = null;
|
|
19784
|
-
current.callback =
|
|
19784
|
+
current.callback = noop3;
|
|
19785
19785
|
current.errorHandler = null;
|
|
19786
19786
|
if (errorHandler2) {
|
|
19787
19787
|
errorHandler2(new Error("abort"), val);
|
|
@@ -19790,32 +19790,32 @@ var require_queue = __commonJS({
|
|
|
19790
19790
|
current.release(current);
|
|
19791
19791
|
current = next;
|
|
19792
19792
|
}
|
|
19793
|
-
self2.drain =
|
|
19793
|
+
self2.drain = noop3;
|
|
19794
19794
|
}
|
|
19795
19795
|
function error48(handler) {
|
|
19796
19796
|
errorHandler = handler;
|
|
19797
19797
|
}
|
|
19798
19798
|
}
|
|
19799
|
-
function
|
|
19799
|
+
function noop3() {
|
|
19800
19800
|
}
|
|
19801
19801
|
function Task3() {
|
|
19802
19802
|
this.value = null;
|
|
19803
|
-
this.callback =
|
|
19803
|
+
this.callback = noop3;
|
|
19804
19804
|
this.next = null;
|
|
19805
|
-
this.release =
|
|
19805
|
+
this.release = noop3;
|
|
19806
19806
|
this.context = null;
|
|
19807
19807
|
this.errorHandler = null;
|
|
19808
19808
|
var self2 = this;
|
|
19809
|
-
this.worked = function worked(
|
|
19809
|
+
this.worked = function worked(err20, result) {
|
|
19810
19810
|
var callback = self2.callback;
|
|
19811
19811
|
var errorHandler = self2.errorHandler;
|
|
19812
19812
|
var val = self2.value;
|
|
19813
19813
|
self2.value = null;
|
|
19814
|
-
self2.callback =
|
|
19814
|
+
self2.callback = noop3;
|
|
19815
19815
|
if (self2.errorHandler) {
|
|
19816
|
-
errorHandler(
|
|
19816
|
+
errorHandler(err20, val);
|
|
19817
19817
|
}
|
|
19818
|
-
callback.call(self2.context,
|
|
19818
|
+
callback.call(self2.context, err20, result);
|
|
19819
19819
|
self2.release(self2);
|
|
19820
19820
|
};
|
|
19821
19821
|
}
|
|
@@ -19839,28 +19839,28 @@ var require_queue = __commonJS({
|
|
|
19839
19839
|
return queue;
|
|
19840
19840
|
function push(value) {
|
|
19841
19841
|
var p = new Promise(function(resolve, reject) {
|
|
19842
|
-
pushCb(value, function(
|
|
19843
|
-
if (
|
|
19844
|
-
reject(
|
|
19842
|
+
pushCb(value, function(err20, result) {
|
|
19843
|
+
if (err20) {
|
|
19844
|
+
reject(err20);
|
|
19845
19845
|
return;
|
|
19846
19846
|
}
|
|
19847
19847
|
resolve(result);
|
|
19848
19848
|
});
|
|
19849
19849
|
});
|
|
19850
|
-
p.catch(
|
|
19850
|
+
p.catch(noop3);
|
|
19851
19851
|
return p;
|
|
19852
19852
|
}
|
|
19853
19853
|
function unshift(value) {
|
|
19854
19854
|
var p = new Promise(function(resolve, reject) {
|
|
19855
|
-
unshiftCb(value, function(
|
|
19856
|
-
if (
|
|
19857
|
-
reject(
|
|
19855
|
+
unshiftCb(value, function(err20, result) {
|
|
19856
|
+
if (err20) {
|
|
19857
|
+
reject(err20);
|
|
19858
19858
|
return;
|
|
19859
19859
|
}
|
|
19860
19860
|
resolve(result);
|
|
19861
19861
|
});
|
|
19862
19862
|
});
|
|
19863
|
-
p.catch(
|
|
19863
|
+
p.catch(noop3);
|
|
19864
19864
|
return p;
|
|
19865
19865
|
}
|
|
19866
19866
|
function drained() {
|
|
@@ -20206,7 +20206,7 @@ var require_settings3 = __commonJS({
|
|
|
20206
20206
|
"../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.js"(exports2) {
|
|
20207
20207
|
"use strict";
|
|
20208
20208
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
20209
|
-
var
|
|
20209
|
+
var path24 = require("path");
|
|
20210
20210
|
var fsScandir = require_out2();
|
|
20211
20211
|
var Settings = class {
|
|
20212
20212
|
constructor(_options = {}) {
|
|
@@ -20216,7 +20216,7 @@ var require_settings3 = __commonJS({
|
|
|
20216
20216
|
this.deepFilter = this._getValue(this._options.deepFilter, null);
|
|
20217
20217
|
this.entryFilter = this._getValue(this._options.entryFilter, null);
|
|
20218
20218
|
this.errorFilter = this._getValue(this._options.errorFilter, null);
|
|
20219
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator,
|
|
20219
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path24.sep);
|
|
20220
20220
|
this.fsScandirSettings = new fsScandir.Settings({
|
|
20221
20221
|
followSymbolicLinks: this._options.followSymbolicLinks,
|
|
20222
20222
|
fs: this._options.fs,
|
|
@@ -20278,7 +20278,7 @@ var require_reader2 = __commonJS({
|
|
|
20278
20278
|
"../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/reader.js"(exports2) {
|
|
20279
20279
|
"use strict";
|
|
20280
20280
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
20281
|
-
var
|
|
20281
|
+
var path24 = require("path");
|
|
20282
20282
|
var fsStat = require_out();
|
|
20283
20283
|
var utils = require_utils4();
|
|
20284
20284
|
var Reader = class {
|
|
@@ -20291,7 +20291,7 @@ var require_reader2 = __commonJS({
|
|
|
20291
20291
|
});
|
|
20292
20292
|
}
|
|
20293
20293
|
_getFullEntryPath(filepath) {
|
|
20294
|
-
return
|
|
20294
|
+
return path24.resolve(this._settings.cwd, filepath);
|
|
20295
20295
|
}
|
|
20296
20296
|
_makeEntry(stats, pattern) {
|
|
20297
20297
|
const entry = {
|
|
@@ -20707,7 +20707,7 @@ var require_provider = __commonJS({
|
|
|
20707
20707
|
"../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/provider.js"(exports2) {
|
|
20708
20708
|
"use strict";
|
|
20709
20709
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
20710
|
-
var
|
|
20710
|
+
var path24 = require("path");
|
|
20711
20711
|
var deep_1 = require_deep();
|
|
20712
20712
|
var entry_1 = require_entry();
|
|
20713
20713
|
var error_1 = require_error2();
|
|
@@ -20721,7 +20721,7 @@ var require_provider = __commonJS({
|
|
|
20721
20721
|
this.entryTransformer = new entry_2.default(this._settings);
|
|
20722
20722
|
}
|
|
20723
20723
|
_getRootDirectory(task) {
|
|
20724
|
-
return
|
|
20724
|
+
return path24.resolve(this._settings.cwd, task.base);
|
|
20725
20725
|
}
|
|
20726
20726
|
_getReaderOptions(task) {
|
|
20727
20727
|
const basePath = task.base === "." ? "" : task.base;
|
|
@@ -20902,16 +20902,16 @@ var require_settings4 = __commonJS({
|
|
|
20902
20902
|
"use strict";
|
|
20903
20903
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
20904
20904
|
exports2.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
|
|
20905
|
-
var
|
|
20905
|
+
var fs4 = require("fs");
|
|
20906
20906
|
var os4 = require("os");
|
|
20907
20907
|
var CPU_COUNT = Math.max(os4.cpus().length, 1);
|
|
20908
20908
|
exports2.DEFAULT_FILE_SYSTEM_ADAPTER = {
|
|
20909
|
-
lstat:
|
|
20910
|
-
lstatSync:
|
|
20911
|
-
stat:
|
|
20912
|
-
statSync:
|
|
20913
|
-
readdir:
|
|
20914
|
-
readdirSync:
|
|
20909
|
+
lstat: fs4.lstat,
|
|
20910
|
+
lstatSync: fs4.lstatSync,
|
|
20911
|
+
stat: fs4.stat,
|
|
20912
|
+
statSync: fs4.statSync,
|
|
20913
|
+
readdir: fs4.readdir,
|
|
20914
|
+
readdirSync: fs4.readdirSync
|
|
20915
20915
|
};
|
|
20916
20916
|
var Settings = class {
|
|
20917
20917
|
constructor(_options = {}) {
|
|
@@ -24368,9 +24368,9 @@ var tq = k((oq) => {
|
|
|
24368
24368
|
});
|
|
24369
24369
|
var sq = k((aq) => {
|
|
24370
24370
|
Object.defineProperty(aq, "__esModule", { value: true });
|
|
24371
|
-
var
|
|
24371
|
+
var ok21 = Q$(), tk = { keyword: "not", schemaType: ["object", "boolean"], trackErrors: true, code($) {
|
|
24372
24372
|
let { gen: X, schema: J, it: Q } = $;
|
|
24373
|
-
if ((0,
|
|
24373
|
+
if ((0, ok21.alwaysValidSchema)(Q, J)) {
|
|
24374
24374
|
$.fail();
|
|
24375
24375
|
return;
|
|
24376
24376
|
}
|
|
@@ -38981,10 +38981,10 @@ function mergeDefs(...defs) {
|
|
|
38981
38981
|
function cloneDef(schema2) {
|
|
38982
38982
|
return mergeDefs(schema2._zod.def);
|
|
38983
38983
|
}
|
|
38984
|
-
function getElementAtPath(obj,
|
|
38985
|
-
if (!
|
|
38984
|
+
function getElementAtPath(obj, path24) {
|
|
38985
|
+
if (!path24)
|
|
38986
38986
|
return obj;
|
|
38987
|
-
return
|
|
38987
|
+
return path24.reduce((acc, key) => acc?.[key], obj);
|
|
38988
38988
|
}
|
|
38989
38989
|
function promiseAllObject(promisesObj) {
|
|
38990
38990
|
const keys = Object.keys(promisesObj);
|
|
@@ -39367,11 +39367,11 @@ function aborted(x, startIndex = 0) {
|
|
|
39367
39367
|
}
|
|
39368
39368
|
return false;
|
|
39369
39369
|
}
|
|
39370
|
-
function prefixIssues(
|
|
39370
|
+
function prefixIssues(path24, issues) {
|
|
39371
39371
|
return issues.map((iss) => {
|
|
39372
39372
|
var _a3;
|
|
39373
39373
|
(_a3 = iss).path ?? (_a3.path = []);
|
|
39374
|
-
iss.path.unshift(
|
|
39374
|
+
iss.path.unshift(path24);
|
|
39375
39375
|
return iss;
|
|
39376
39376
|
});
|
|
39377
39377
|
}
|
|
@@ -39554,7 +39554,7 @@ function formatError(error48, mapper = (issue2) => issue2.message) {
|
|
|
39554
39554
|
}
|
|
39555
39555
|
function treeifyError(error48, mapper = (issue2) => issue2.message) {
|
|
39556
39556
|
const result = { errors: [] };
|
|
39557
|
-
const processError = (error49,
|
|
39557
|
+
const processError = (error49, path24 = []) => {
|
|
39558
39558
|
var _a3, _b2;
|
|
39559
39559
|
for (const issue2 of error49.issues) {
|
|
39560
39560
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
@@ -39564,7 +39564,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
|
|
|
39564
39564
|
} else if (issue2.code === "invalid_element") {
|
|
39565
39565
|
processError({ issues: issue2.issues }, issue2.path);
|
|
39566
39566
|
} else {
|
|
39567
|
-
const fullpath = [...
|
|
39567
|
+
const fullpath = [...path24, ...issue2.path];
|
|
39568
39568
|
if (fullpath.length === 0) {
|
|
39569
39569
|
result.errors.push(mapper(issue2));
|
|
39570
39570
|
continue;
|
|
@@ -39596,8 +39596,8 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
|
|
|
39596
39596
|
}
|
|
39597
39597
|
function toDotPath(_path) {
|
|
39598
39598
|
const segs = [];
|
|
39599
|
-
const
|
|
39600
|
-
for (const seg of
|
|
39599
|
+
const path24 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
|
|
39600
|
+
for (const seg of path24) {
|
|
39601
39601
|
if (typeof seg === "number")
|
|
39602
39602
|
segs.push(`[${seg}]`);
|
|
39603
39603
|
else if (typeof seg === "symbol")
|
|
@@ -51574,13 +51574,13 @@ function resolveRef(ref, ctx) {
|
|
|
51574
51574
|
if (!ref.startsWith("#")) {
|
|
51575
51575
|
throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
|
|
51576
51576
|
}
|
|
51577
|
-
const
|
|
51578
|
-
if (
|
|
51577
|
+
const path24 = ref.slice(1).split("/").filter(Boolean);
|
|
51578
|
+
if (path24.length === 0) {
|
|
51579
51579
|
return ctx.rootSchema;
|
|
51580
51580
|
}
|
|
51581
51581
|
const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
|
|
51582
|
-
if (
|
|
51583
|
-
const key =
|
|
51582
|
+
if (path24[0] === defsKey) {
|
|
51583
|
+
const key = path24[1];
|
|
51584
51584
|
if (!key || !ctx.defs[key]) {
|
|
51585
51585
|
throw new Error(`Reference not found: ${ref}`);
|
|
51586
51586
|
}
|
|
@@ -52604,16 +52604,21 @@ function captureScreenshot(udid = "booted") {
|
|
|
52604
52604
|
);
|
|
52605
52605
|
}
|
|
52606
52606
|
function createScreenshotTool(udid = "booted") {
|
|
52607
|
-
return _x(
|
|
52608
|
-
|
|
52609
|
-
|
|
52610
|
-
|
|
52611
|
-
|
|
52612
|
-
|
|
52613
|
-
|
|
52607
|
+
return _x(
|
|
52608
|
+
"screenshot",
|
|
52609
|
+
"Capture a screenshot of the current screen. Use for passive visual verification \u2014 confirming a screen transition occurred, loading finished, or an expected visual outcome is present \u2014 when you do not need element labels, tap coordinates, or accessibility attributes. Does not return a <screen_id>; cannot be used for stuck-loop detection or element-targeted assertions. Do not call this immediately before or after `view_ui` for the same state.",
|
|
52610
|
+
{},
|
|
52611
|
+
async () => {
|
|
52612
|
+
const result = await captureScreenshot(udid);
|
|
52613
|
+
if (result.isErr()) {
|
|
52614
|
+
return {
|
|
52615
|
+
content: [{ type: "text", text: String(result.error.cause) }],
|
|
52616
|
+
isError: true
|
|
52617
|
+
};
|
|
52618
|
+
}
|
|
52619
|
+
return { content: [{ type: "image", data: result.value, mimeType: "image/png" }] };
|
|
52614
52620
|
}
|
|
52615
|
-
|
|
52616
|
-
});
|
|
52621
|
+
);
|
|
52617
52622
|
}
|
|
52618
52623
|
var screenshotTool = createScreenshotTool();
|
|
52619
52624
|
var MIN_WAIT_SECONDS = 1;
|
|
@@ -54738,15 +54743,15 @@ async function makeRequest(url2, fetchOptions, fetchFn = fetch) {
|
|
|
54738
54743
|
return response;
|
|
54739
54744
|
}
|
|
54740
54745
|
function handleResponseError(e3, url2) {
|
|
54741
|
-
let
|
|
54742
|
-
if (
|
|
54743
|
-
|
|
54744
|
-
|
|
54746
|
+
let err20 = e3;
|
|
54747
|
+
if (err20.name === "AbortError") {
|
|
54748
|
+
err20 = new GoogleGenerativeAIAbortError(`Request aborted when fetching ${url2.toString()}: ${e3.message}`);
|
|
54749
|
+
err20.stack = e3.stack;
|
|
54745
54750
|
} else if (!(e3 instanceof GoogleGenerativeAIFetchError || e3 instanceof GoogleGenerativeAIRequestInputError)) {
|
|
54746
|
-
|
|
54747
|
-
|
|
54751
|
+
err20 = new GoogleGenerativeAIError(`Error fetching from ${url2.toString()}: ${e3.message}`);
|
|
54752
|
+
err20.stack = e3.stack;
|
|
54748
54753
|
}
|
|
54749
|
-
throw
|
|
54754
|
+
throw err20;
|
|
54750
54755
|
}
|
|
54751
54756
|
async function handleResponseNotOk(response, url2) {
|
|
54752
54757
|
let message = "";
|
|
@@ -54912,11 +54917,11 @@ function __asyncGenerator(thisArg, _arguments, generator) {
|
|
|
54912
54917
|
try {
|
|
54913
54918
|
step(g3[n3](v2));
|
|
54914
54919
|
} catch (e3) {
|
|
54915
|
-
|
|
54920
|
+
settle2(q4[0][3], e3);
|
|
54916
54921
|
}
|
|
54917
54922
|
}
|
|
54918
54923
|
function step(r3) {
|
|
54919
|
-
r3.value instanceof __await ? Promise.resolve(r3.value.v).then(fulfill, reject) :
|
|
54924
|
+
r3.value instanceof __await ? Promise.resolve(r3.value.v).then(fulfill, reject) : settle2(q4[0][2], r3);
|
|
54920
54925
|
}
|
|
54921
54926
|
function fulfill(value) {
|
|
54922
54927
|
resume("next", value);
|
|
@@ -54924,7 +54929,7 @@ function __asyncGenerator(thisArg, _arguments, generator) {
|
|
|
54924
54929
|
function reject(value) {
|
|
54925
54930
|
resume("throw", value);
|
|
54926
54931
|
}
|
|
54927
|
-
function
|
|
54932
|
+
function settle2(f6, v2) {
|
|
54928
54933
|
if (f6(v2), q4.shift(), q4.length) resume(q4[0][0], q4[0][1]);
|
|
54929
54934
|
}
|
|
54930
54935
|
}
|
|
@@ -54993,14 +54998,14 @@ function getResponseStream(inputStream) {
|
|
|
54993
54998
|
}
|
|
54994
54999
|
return pump();
|
|
54995
55000
|
}).catch((e3) => {
|
|
54996
|
-
let
|
|
54997
|
-
|
|
54998
|
-
if (
|
|
54999
|
-
|
|
55001
|
+
let err20 = e3;
|
|
55002
|
+
err20.stack = e3.stack;
|
|
55003
|
+
if (err20.name === "AbortError") {
|
|
55004
|
+
err20 = new GoogleGenerativeAIAbortError("Request aborted when reading from the stream");
|
|
55000
55005
|
} else {
|
|
55001
|
-
|
|
55006
|
+
err20 = new GoogleGenerativeAIError("Error reading from the stream");
|
|
55002
55007
|
}
|
|
55003
|
-
throw
|
|
55008
|
+
throw err20;
|
|
55004
55009
|
});
|
|
55005
55010
|
}
|
|
55006
55011
|
}
|
|
@@ -55596,15 +55601,15 @@ async function makeRequest2(url2, fetchOptions, fetchFn = fetch) {
|
|
|
55596
55601
|
return response;
|
|
55597
55602
|
}
|
|
55598
55603
|
function handleResponseError2(e3, url2) {
|
|
55599
|
-
let
|
|
55600
|
-
if (
|
|
55601
|
-
|
|
55602
|
-
|
|
55604
|
+
let err20 = e3;
|
|
55605
|
+
if (err20.name === "AbortError") {
|
|
55606
|
+
err20 = new GoogleGenerativeAIAbortError2(`Request aborted when fetching ${url2.toString()}: ${e3.message}`);
|
|
55607
|
+
err20.stack = e3.stack;
|
|
55603
55608
|
} else if (!(e3 instanceof GoogleGenerativeAIFetchError2 || e3 instanceof GoogleGenerativeAIRequestInputError2)) {
|
|
55604
|
-
|
|
55605
|
-
|
|
55609
|
+
err20 = new GoogleGenerativeAIError2(`Error fetching from ${url2.toString()}: ${e3.message}`);
|
|
55610
|
+
err20.stack = e3.stack;
|
|
55606
55611
|
}
|
|
55607
|
-
throw
|
|
55612
|
+
throw err20;
|
|
55608
55613
|
}
|
|
55609
55614
|
async function handleResponseNotOk2(response, url2) {
|
|
55610
55615
|
let message = "";
|
|
@@ -55643,8 +55648,8 @@ var ServerRequestUrl = class {
|
|
|
55643
55648
|
this.apiKey = apiKey;
|
|
55644
55649
|
this.requestOptions = requestOptions;
|
|
55645
55650
|
}
|
|
55646
|
-
appendPath(
|
|
55647
|
-
this._url.pathname = this._url.pathname + `/${
|
|
55651
|
+
appendPath(path24) {
|
|
55652
|
+
this._url.pathname = this._url.pathname + `/${path24}`;
|
|
55648
55653
|
}
|
|
55649
55654
|
appendParam(key, value) {
|
|
55650
55655
|
this._url.searchParams.append(key, value);
|
|
@@ -56200,34 +56205,34 @@ var uuid42 = function() {
|
|
|
56200
56205
|
};
|
|
56201
56206
|
|
|
56202
56207
|
// ../../node_modules/.pnpm/@anthropic-ai+sdk@0.87.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/internal/errors.mjs
|
|
56203
|
-
function isAbortError(
|
|
56204
|
-
return typeof
|
|
56205
|
-
("name" in
|
|
56206
|
-
"message" in
|
|
56207
|
-
}
|
|
56208
|
-
var castToError = (
|
|
56209
|
-
if (
|
|
56210
|
-
return
|
|
56211
|
-
if (typeof
|
|
56208
|
+
function isAbortError(err20) {
|
|
56209
|
+
return typeof err20 === "object" && err20 !== null && // Spec-compliant fetch implementations
|
|
56210
|
+
("name" in err20 && err20.name === "AbortError" || // Expo fetch
|
|
56211
|
+
"message" in err20 && String(err20.message).includes("FetchRequestCanceledException"));
|
|
56212
|
+
}
|
|
56213
|
+
var castToError = (err20) => {
|
|
56214
|
+
if (err20 instanceof Error)
|
|
56215
|
+
return err20;
|
|
56216
|
+
if (typeof err20 === "object" && err20 !== null) {
|
|
56212
56217
|
try {
|
|
56213
|
-
if (Object.prototype.toString.call(
|
|
56214
|
-
const error48 = new Error(
|
|
56215
|
-
if (
|
|
56216
|
-
error48.stack =
|
|
56217
|
-
if (
|
|
56218
|
-
error48.cause =
|
|
56219
|
-
if (
|
|
56220
|
-
error48.name =
|
|
56218
|
+
if (Object.prototype.toString.call(err20) === "[object Error]") {
|
|
56219
|
+
const error48 = new Error(err20.message, err20.cause ? { cause: err20.cause } : {});
|
|
56220
|
+
if (err20.stack)
|
|
56221
|
+
error48.stack = err20.stack;
|
|
56222
|
+
if (err20.cause && !error48.cause)
|
|
56223
|
+
error48.cause = err20.cause;
|
|
56224
|
+
if (err20.name)
|
|
56225
|
+
error48.name = err20.name;
|
|
56221
56226
|
return error48;
|
|
56222
56227
|
}
|
|
56223
56228
|
} catch {
|
|
56224
56229
|
}
|
|
56225
56230
|
try {
|
|
56226
|
-
return new Error(JSON.stringify(
|
|
56231
|
+
return new Error(JSON.stringify(err20));
|
|
56227
56232
|
} catch {
|
|
56228
56233
|
}
|
|
56229
56234
|
}
|
|
56230
|
-
return new Error(
|
|
56235
|
+
return new Error(err20);
|
|
56231
56236
|
};
|
|
56232
56237
|
|
|
56233
56238
|
// ../../node_modules/.pnpm/@anthropic-ai+sdk@0.87.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/core/error.mjs
|
|
@@ -56357,7 +56362,7 @@ var validatePositiveInteger = (name, n3) => {
|
|
|
56357
56362
|
var safeJSON = (text) => {
|
|
56358
56363
|
try {
|
|
56359
56364
|
return JSON.parse(text);
|
|
56360
|
-
} catch (
|
|
56365
|
+
} catch (err20) {
|
|
56361
56366
|
return void 0;
|
|
56362
56367
|
}
|
|
56363
56368
|
};
|
|
@@ -56921,8 +56926,8 @@ var Stream = class _Stream {
|
|
|
56921
56926
|
return ctrl.close();
|
|
56922
56927
|
const bytes = encodeUTF8(JSON.stringify(value) + "\n");
|
|
56923
56928
|
ctrl.enqueue(bytes);
|
|
56924
|
-
} catch (
|
|
56925
|
-
ctrl.error(
|
|
56929
|
+
} catch (err20) {
|
|
56930
|
+
ctrl.error(err20);
|
|
56926
56931
|
}
|
|
56927
56932
|
},
|
|
56928
56933
|
async cancel() {
|
|
@@ -57470,12 +57475,12 @@ function encodeURIPath(str2) {
|
|
|
57470
57475
|
return str2.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g, encodeURIComponent);
|
|
57471
57476
|
}
|
|
57472
57477
|
var EMPTY = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.create(null));
|
|
57473
|
-
var createPathTagFunction = (pathEncoder = encodeURIPath) => function
|
|
57478
|
+
var createPathTagFunction = (pathEncoder = encodeURIPath) => function path24(statics, ...params) {
|
|
57474
57479
|
if (statics.length === 1)
|
|
57475
57480
|
return statics[0];
|
|
57476
57481
|
let postPath = false;
|
|
57477
57482
|
const invalidSegments = [];
|
|
57478
|
-
const
|
|
57483
|
+
const path25 = statics.reduce((previousValue, currentValue, index) => {
|
|
57479
57484
|
if (/[?#]/.test(currentValue)) {
|
|
57480
57485
|
postPath = true;
|
|
57481
57486
|
}
|
|
@@ -57492,7 +57497,7 @@ var createPathTagFunction = (pathEncoder = encodeURIPath) => function path23(sta
|
|
|
57492
57497
|
}
|
|
57493
57498
|
return previousValue + currentValue + (index === params.length ? "" : encoded);
|
|
57494
57499
|
}, "");
|
|
57495
|
-
const pathOnly =
|
|
57500
|
+
const pathOnly = path25.split(/[?#]/, 1)[0];
|
|
57496
57501
|
const invalidSegmentPattern = /(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi;
|
|
57497
57502
|
let match;
|
|
57498
57503
|
while ((match = invalidSegmentPattern.exec(pathOnly)) !== null) {
|
|
@@ -57513,10 +57518,10 @@ var createPathTagFunction = (pathEncoder = encodeURIPath) => function path23(sta
|
|
|
57513
57518
|
}, "");
|
|
57514
57519
|
throw new AnthropicError(`Path parameters result in path with invalid segments:
|
|
57515
57520
|
${invalidSegments.map((e3) => e3.error).join("\n")}
|
|
57516
|
-
${
|
|
57521
|
+
${path25}
|
|
57517
57522
|
${underline}`);
|
|
57518
57523
|
}
|
|
57519
|
-
return
|
|
57524
|
+
return path25;
|
|
57520
57525
|
};
|
|
57521
57526
|
var path4 = /* @__PURE__ */ createPathTagFunction(encodeURIPath);
|
|
57522
57527
|
|
|
@@ -58829,8 +58834,8 @@ var BetaMessageStream = class _BetaMessageStream {
|
|
|
58829
58834
|
if (jsonBuf) {
|
|
58830
58835
|
try {
|
|
58831
58836
|
newContent.input = partialParse(jsonBuf);
|
|
58832
|
-
} catch (
|
|
58833
|
-
const error48 = new AnthropicError(`Unable to parse tool parameter JSON from model. Please retry your request or adjust your prompt. Error: ${
|
|
58837
|
+
} catch (err20) {
|
|
58838
|
+
const error48 = new AnthropicError(`Unable to parse tool parameter JSON from model. Please retry your request or adjust your prompt. Error: ${err20}. JSON: ${jsonBuf}`);
|
|
58834
58839
|
__classPrivateFieldGet(this, _BetaMessageStream_handleError, "f").call(this, error48);
|
|
58835
58840
|
}
|
|
58836
58841
|
}
|
|
@@ -58892,17 +58897,17 @@ var BetaMessageStream = class _BetaMessageStream {
|
|
|
58892
58897
|
}
|
|
58893
58898
|
readQueue.length = 0;
|
|
58894
58899
|
});
|
|
58895
|
-
this.on("abort", (
|
|
58900
|
+
this.on("abort", (err20) => {
|
|
58896
58901
|
done = true;
|
|
58897
58902
|
for (const reader of readQueue) {
|
|
58898
|
-
reader.reject(
|
|
58903
|
+
reader.reject(err20);
|
|
58899
58904
|
}
|
|
58900
58905
|
readQueue.length = 0;
|
|
58901
58906
|
});
|
|
58902
|
-
this.on("error", (
|
|
58907
|
+
this.on("error", (err20) => {
|
|
58903
58908
|
done = true;
|
|
58904
58909
|
for (const reader of readQueue) {
|
|
58905
|
-
reader.reject(
|
|
58910
|
+
reader.reject(err20);
|
|
58906
58911
|
}
|
|
58907
58912
|
readQueue.length = 0;
|
|
58908
58913
|
});
|
|
@@ -61145,17 +61150,17 @@ var MessageStream = class _MessageStream {
|
|
|
61145
61150
|
}
|
|
61146
61151
|
readQueue.length = 0;
|
|
61147
61152
|
});
|
|
61148
|
-
this.on("abort", (
|
|
61153
|
+
this.on("abort", (err20) => {
|
|
61149
61154
|
done = true;
|
|
61150
61155
|
for (const reader of readQueue) {
|
|
61151
|
-
reader.reject(
|
|
61156
|
+
reader.reject(err20);
|
|
61152
61157
|
}
|
|
61153
61158
|
readQueue.length = 0;
|
|
61154
61159
|
});
|
|
61155
|
-
this.on("error", (
|
|
61160
|
+
this.on("error", (err20) => {
|
|
61156
61161
|
done = true;
|
|
61157
61162
|
for (const reader of readQueue) {
|
|
61158
|
-
reader.reject(
|
|
61163
|
+
reader.reject(err20);
|
|
61159
61164
|
}
|
|
61160
61165
|
readQueue.length = 0;
|
|
61161
61166
|
});
|
|
@@ -61604,9 +61609,9 @@ var BaseAnthropic = class {
|
|
|
61604
61609
|
makeStatusError(status, error48, message, headers) {
|
|
61605
61610
|
return APIError.generate(status, error48, message, headers);
|
|
61606
61611
|
}
|
|
61607
|
-
buildURL(
|
|
61612
|
+
buildURL(path24, query, defaultBaseURL) {
|
|
61608
61613
|
const baseURL = !__classPrivateFieldGet(this, _BaseAnthropic_instances, "m", _BaseAnthropic_baseURLOverridden).call(this) && defaultBaseURL || this.baseURL;
|
|
61609
|
-
const url2 = isAbsoluteURL(
|
|
61614
|
+
const url2 = isAbsoluteURL(path24) ? new URL(path24) : new URL(baseURL + (baseURL.endsWith("/") && path24.startsWith("/") ? path24.slice(1) : path24));
|
|
61610
61615
|
const defaultQuery = this.defaultQuery();
|
|
61611
61616
|
const pathQuery = Object.fromEntries(url2.searchParams);
|
|
61612
61617
|
if (!isEmptyObj(defaultQuery) || !isEmptyObj(pathQuery)) {
|
|
@@ -61638,24 +61643,24 @@ var BaseAnthropic = class {
|
|
|
61638
61643
|
*/
|
|
61639
61644
|
async prepareRequest(request, { url: url2, options }) {
|
|
61640
61645
|
}
|
|
61641
|
-
get(
|
|
61642
|
-
return this.methodRequest("get",
|
|
61646
|
+
get(path24, opts) {
|
|
61647
|
+
return this.methodRequest("get", path24, opts);
|
|
61643
61648
|
}
|
|
61644
|
-
post(
|
|
61645
|
-
return this.methodRequest("post",
|
|
61649
|
+
post(path24, opts) {
|
|
61650
|
+
return this.methodRequest("post", path24, opts);
|
|
61646
61651
|
}
|
|
61647
|
-
patch(
|
|
61648
|
-
return this.methodRequest("patch",
|
|
61652
|
+
patch(path24, opts) {
|
|
61653
|
+
return this.methodRequest("patch", path24, opts);
|
|
61649
61654
|
}
|
|
61650
|
-
put(
|
|
61651
|
-
return this.methodRequest("put",
|
|
61655
|
+
put(path24, opts) {
|
|
61656
|
+
return this.methodRequest("put", path24, opts);
|
|
61652
61657
|
}
|
|
61653
|
-
delete(
|
|
61654
|
-
return this.methodRequest("delete",
|
|
61658
|
+
delete(path24, opts) {
|
|
61659
|
+
return this.methodRequest("delete", path24, opts);
|
|
61655
61660
|
}
|
|
61656
|
-
methodRequest(method,
|
|
61661
|
+
methodRequest(method, path24, opts) {
|
|
61657
61662
|
return this.request(Promise.resolve(opts).then((opts2) => {
|
|
61658
|
-
return { method, path:
|
|
61663
|
+
return { method, path: path24, ...opts2 };
|
|
61659
61664
|
}));
|
|
61660
61665
|
}
|
|
61661
61666
|
request(options, remainingRetries = null) {
|
|
@@ -61735,7 +61740,7 @@ var BaseAnthropic = class {
|
|
|
61735
61740
|
}
|
|
61736
61741
|
const retryMessage = shouldRetry ? `error; no more retries left` : `error; not retryable`;
|
|
61737
61742
|
loggerFor(this).info(`${responseInfo} - ${retryMessage}`);
|
|
61738
|
-
const errText = await response.text().catch((
|
|
61743
|
+
const errText = await response.text().catch((err21) => castToError(err21).message);
|
|
61739
61744
|
const errJSON = safeJSON(errText);
|
|
61740
61745
|
const errMessage = errJSON ? void 0 : errText;
|
|
61741
61746
|
loggerFor(this).debug(`[${requestLogID}] response error (${retryMessage})`, formatRequestDetails({
|
|
@@ -61746,8 +61751,8 @@ var BaseAnthropic = class {
|
|
|
61746
61751
|
message: errMessage,
|
|
61747
61752
|
durationMs: Date.now() - startTime
|
|
61748
61753
|
}));
|
|
61749
|
-
const
|
|
61750
|
-
throw
|
|
61754
|
+
const err20 = this.makeStatusError(response.status, errJSON, errMessage, response.headers);
|
|
61755
|
+
throw err20;
|
|
61751
61756
|
}
|
|
61752
61757
|
loggerFor(this).info(responseInfo);
|
|
61753
61758
|
loggerFor(this).debug(`[${requestLogID}] response start`, formatRequestDetails({
|
|
@@ -61759,8 +61764,8 @@ var BaseAnthropic = class {
|
|
|
61759
61764
|
}));
|
|
61760
61765
|
return { response, options, controller: controller2, requestLogID, retryOfRequestLogID, startTime };
|
|
61761
61766
|
}
|
|
61762
|
-
getAPIList(
|
|
61763
|
-
return this.requestAPIList(Page2, opts && "then" in opts ? opts.then((opts2) => ({ method: "get", path:
|
|
61767
|
+
getAPIList(path24, Page2, opts) {
|
|
61768
|
+
return this.requestAPIList(Page2, opts && "then" in opts ? opts.then((opts2) => ({ method: "get", path: path24, ...opts2 })) : { method: "get", path: path24, ...opts });
|
|
61764
61769
|
}
|
|
61765
61770
|
requestAPIList(Page2, options) {
|
|
61766
61771
|
const request = this.makeRequest(options, null, void 0);
|
|
@@ -61848,8 +61853,8 @@ var BaseAnthropic = class {
|
|
|
61848
61853
|
}
|
|
61849
61854
|
async buildRequest(inputOptions, { retryCount = 0 } = {}) {
|
|
61850
61855
|
const options = { ...inputOptions };
|
|
61851
|
-
const { method, path:
|
|
61852
|
-
const url2 = this.buildURL(
|
|
61856
|
+
const { method, path: path24, query, defaultBaseURL } = options;
|
|
61857
|
+
const url2 = this.buildURL(path24, query, defaultBaseURL);
|
|
61853
61858
|
if ("timeout" in options)
|
|
61854
61859
|
validatePositiveInteger("timeout", options.timeout);
|
|
61855
61860
|
options.timeout = options.timeout ?? this.timeout;
|
|
@@ -62224,7 +62229,7 @@ async function runFfmpeg(arguments_) {
|
|
|
62224
62229
|
}
|
|
62225
62230
|
function spawnRecorder(outputPath) {
|
|
62226
62231
|
const safeMkdirSync = (0, import_neverthrow15.fromThrowable)(import_node_fs.mkdirSync, (cause) => cause);
|
|
62227
|
-
const
|
|
62232
|
+
const safeSpawn2 = (0, import_neverthrow15.fromThrowable)(
|
|
62228
62233
|
(command, arguments_) => (0, import_node_child_process3.spawn)(command, arguments_),
|
|
62229
62234
|
(cause) => cause
|
|
62230
62235
|
);
|
|
@@ -62232,7 +62237,7 @@ function spawnRecorder(outputPath) {
|
|
|
62232
62237
|
if (mkdirResult.isErr()) {
|
|
62233
62238
|
return mkdirResult.error;
|
|
62234
62239
|
}
|
|
62235
|
-
const spawnResult =
|
|
62240
|
+
const spawnResult = safeSpawn2("xcrun", [
|
|
62236
62241
|
"simctl",
|
|
62237
62242
|
"io",
|
|
62238
62243
|
"booted",
|
|
@@ -62309,9 +62314,11 @@ function speedUpVideo({
|
|
|
62309
62314
|
);
|
|
62310
62315
|
}
|
|
62311
62316
|
var VIEW_UI_TOOL_NAME = "mcp__mobile-ios__view_ui";
|
|
62312
|
-
var VIEW_UI_DESCRIPTION = `Capture
|
|
62317
|
+
var VIEW_UI_DESCRIPTION = `Capture current screen state: accessibility tree (element labels, positions, attributes) and screenshot in one call. Use when you need to tap an element, assert element presence or labels, check attributes, or track screen identity via <screen_id>.
|
|
62318
|
+
|
|
62319
|
+
The result begins with a <screen_id> tag containing the current screen identifier. Use this to detect screen changes and track navigation history.
|
|
62313
62320
|
|
|
62314
|
-
|
|
62321
|
+
Do not call \`screenshot\` immediately before or after this tool for the same state \u2014 this tool already includes the screenshot.
|
|
62315
62322
|
|
|
62316
62323
|
IMPORTANT: Snapshot coordinates and screenshot pixels are in the same logical point space. Do not apply any scaling factor (no 2x retina adjustment).`;
|
|
62317
62324
|
function deriveScreenLabel(tree, stepIndex) {
|
|
@@ -62636,32 +62643,11 @@ function spawnDetached(options) {
|
|
|
62636
62643
|
off: child.off.bind(child)
|
|
62637
62644
|
};
|
|
62638
62645
|
}
|
|
62639
|
-
var cachedAllTools;
|
|
62640
|
-
async function fetchAllTools() {
|
|
62641
|
-
if (cachedAllTools !== void 0) {
|
|
62642
|
-
return cachedAllTools;
|
|
62643
|
-
}
|
|
62644
|
-
const probe = Qs({ prompt: "", options: { settingSources: ["user"] } });
|
|
62645
|
-
for await (const message of probe) {
|
|
62646
|
-
if (message.type === "system" && message.subtype === "init") {
|
|
62647
|
-
probe.close();
|
|
62648
|
-
cachedAllTools = message.tools;
|
|
62649
|
-
return cachedAllTools;
|
|
62650
|
-
}
|
|
62651
|
-
}
|
|
62652
|
-
return [];
|
|
62653
|
-
}
|
|
62654
|
-
async function resolveDisallowedTools(allowedTools) {
|
|
62655
|
-
const allTools = await fetchAllTools();
|
|
62656
|
-
const allowedSet = new Set(allowedTools);
|
|
62657
|
-
return allTools.filter((tool2) => !allowedSet.has(tool2));
|
|
62658
|
-
}
|
|
62659
62646
|
function buildQueryOptions({
|
|
62660
62647
|
config: config3,
|
|
62661
62648
|
outputTools,
|
|
62662
62649
|
mobileIosServer,
|
|
62663
|
-
allowedTools
|
|
62664
|
-
disallowedTools
|
|
62650
|
+
allowedTools
|
|
62665
62651
|
}) {
|
|
62666
62652
|
const base = {
|
|
62667
62653
|
mcpServers: {
|
|
@@ -62670,8 +62656,9 @@ function buildQueryOptions({
|
|
|
62670
62656
|
output: outputTools.server
|
|
62671
62657
|
},
|
|
62672
62658
|
allowedTools,
|
|
62673
|
-
|
|
62674
|
-
|
|
62659
|
+
tools: [],
|
|
62660
|
+
permissionMode: "bypassPermissions",
|
|
62661
|
+
allowDangerouslySkipPermissions: true,
|
|
62675
62662
|
spawnClaudeCodeProcess: spawnDetached,
|
|
62676
62663
|
...config3.cwd ? { cwd: config3.cwd } : {}
|
|
62677
62664
|
};
|
|
@@ -62722,14 +62709,13 @@ function buildMobileIosServer(config3, state) {
|
|
|
62722
62709
|
});
|
|
62723
62710
|
return createMobileIosServer(config3.udid ?? "booted", [viewUiTool]);
|
|
62724
62711
|
}
|
|
62725
|
-
|
|
62712
|
+
function setupQuery(config3, outputTools) {
|
|
62726
62713
|
const allowedTools = [
|
|
62727
62714
|
...config3.allowedTools ?? [],
|
|
62728
62715
|
...outputTools.allowedToolNames,
|
|
62729
62716
|
VIEW_UI_TOOL_NAME,
|
|
62730
62717
|
WAIT_SECONDS_TOOL_NAME
|
|
62731
|
-
];
|
|
62732
|
-
const disallowedTools = await resolveDisallowedTools(allowedTools);
|
|
62718
|
+
].filter((tool2) => typeof tool2 === "string");
|
|
62733
62719
|
const inputQueue = new MessageQueue();
|
|
62734
62720
|
const state = buildAgentState({ config: config3, outputTools, inputQueue });
|
|
62735
62721
|
const mobileIosServer = buildMobileIosServer(config3, state);
|
|
@@ -62737,8 +62723,7 @@ async function setupQuery(config3, outputTools) {
|
|
|
62737
62723
|
config: config3,
|
|
62738
62724
|
outputTools,
|
|
62739
62725
|
mobileIosServer,
|
|
62740
|
-
allowedTools
|
|
62741
|
-
disallowedTools
|
|
62726
|
+
allowedTools
|
|
62742
62727
|
});
|
|
62743
62728
|
return { inputQueue, state, options, linkedController };
|
|
62744
62729
|
}
|
|
@@ -62854,16 +62839,16 @@ function startQueryTimers(config3, context) {
|
|
|
62854
62839
|
inputQueue.close();
|
|
62855
62840
|
};
|
|
62856
62841
|
}
|
|
62857
|
-
function awaitMessagesAndResolve({ queryRunner, state }, { cleanup:
|
|
62842
|
+
function awaitMessagesAndResolve({ queryRunner, state }, { cleanup: cleanup3, getOutput }) {
|
|
62858
62843
|
const messagesPromise = processMessages(queryRunner, state);
|
|
62859
62844
|
return import_neverthrow16.ResultAsync.fromPromise(messagesPromise, String).andThen((innerResult) => {
|
|
62860
|
-
|
|
62845
|
+
cleanup3();
|
|
62861
62846
|
if (innerResult.isErr()) {
|
|
62862
62847
|
return (0, import_neverthrow16.err)(innerResult.error);
|
|
62863
62848
|
}
|
|
62864
62849
|
return (0, import_neverthrow16.ok)(getOutput());
|
|
62865
62850
|
}).orElse((sdkError) => {
|
|
62866
|
-
|
|
62851
|
+
cleanup3();
|
|
62867
62852
|
if (!state.timedOut.value && !state.aborted.value) {
|
|
62868
62853
|
return (0, import_neverthrow16.err)(sdkError);
|
|
62869
62854
|
}
|
|
@@ -62886,21 +62871,19 @@ function executeQuery({
|
|
|
62886
62871
|
return (0, import_neverthrow16.errAsync)(queryRunnerResult.error);
|
|
62887
62872
|
}
|
|
62888
62873
|
const queryRunner = queryRunnerResult.value;
|
|
62889
|
-
const
|
|
62874
|
+
const cleanup3 = startQueryTimers(config3, { state, queryRunner, inputQueue, linkedController });
|
|
62890
62875
|
const getOutput = () => ({
|
|
62891
62876
|
findings: (outputTools.getOutput()?.findings ?? []).map(
|
|
62892
62877
|
(raw) => stampExplorerAgent(raw)
|
|
62893
62878
|
),
|
|
62894
62879
|
snapshots: state.snapshots
|
|
62895
62880
|
});
|
|
62896
|
-
return awaitMessagesAndResolve({ queryRunner, state }, { cleanup:
|
|
62881
|
+
return awaitMessagesAndResolve({ queryRunner, state }, { cleanup: cleanup3, getOutput });
|
|
62897
62882
|
}
|
|
62898
62883
|
function runQuery(prompt, config3) {
|
|
62899
62884
|
const outputTools = createOutputTool({ findings: external_exports.array(EXPLORER_FINDING_SCHEMA) });
|
|
62900
|
-
const
|
|
62901
|
-
return
|
|
62902
|
-
(setup) => executeQuery({ prompt, config: config3, outputTools, setup })
|
|
62903
|
-
);
|
|
62885
|
+
const setup = setupQuery(config3, outputTools);
|
|
62886
|
+
return executeQuery({ prompt, config: config3, outputTools, setup });
|
|
62904
62887
|
}
|
|
62905
62888
|
function collectAgentOutput(prompt, config3) {
|
|
62906
62889
|
return runQuery(prompt, config3).mapErr((cause) => ({ type: "QUERY_FAILED", cause }));
|
|
@@ -62952,6 +62935,12 @@ function startAndRun(params) {
|
|
|
62952
62935
|
}).andThen((result) => applySpeedUpVariants({ result, params, toRecordingError }));
|
|
62953
62936
|
});
|
|
62954
62937
|
}
|
|
62938
|
+
var TOOL_SELECTION_SECTION = `## Tool Selection
|
|
62939
|
+
|
|
62940
|
+
- \`view_ui\` \u2014 returns accessibility tree (element labels, positions, attributes) AND screenshot; use when you need to tap, assert element presence, or read labels
|
|
62941
|
+
- \`screenshot\` \u2014 returns screenshot only; use for passive visual verification (confirm transition occurred, loading finished, outcome visible) when you do not need element data
|
|
62942
|
+
- Never call \`screenshot\` immediately before or after \`view_ui\` for the same state \u2014 \`view_ui\` already includes the screenshot
|
|
62943
|
+
- \`screenshot\` calls do not emit a \`<screen_id>\` and do not advance the stuck-loop counter; if screen identity tracking matters, use \`view_ui\``;
|
|
62955
62944
|
var DEV_ENVIRONMENT_SECTION = `## Environment
|
|
62956
62945
|
|
|
62957
62946
|
This is a development build. Debug overlays and internal messages are expected artifacts \u2014 do not report them as findings.`;
|
|
@@ -62964,9 +62953,9 @@ At every reasoning step, maintain a mental ledger:
|
|
|
62964
62953
|
|
|
62965
62954
|
Consult the ledger before every action. Always prefer navigating to a QUEUE screen over a VISITED one.`;
|
|
62966
62955
|
var SESSION_START_RULE = `Before taking any other action \u2014 including initializing the Working State ledger or emitting findings \u2014 call \`view_ui\` once to observe the starting screen`;
|
|
62967
|
-
var BACK_NAV_RULE = `After navigating forward to any new screen: tap back,
|
|
62968
|
-
var STUCK_LOOP_RULE = `Stuck loop: emit a \`stuck-loop\` finding when any of these occur: (1) \`view_ui\` returns the same
|
|
62969
|
-
var LOADING_STATE_RULE = `Transient loading state: when
|
|
62956
|
+
var BACK_NAV_RULE = `After navigating forward to any new screen: tap back, then confirm you returned to the expected parent in PATH \u2014 use \`screenshot\` if the parent screen is visually unambiguous, \`view_ui\` if you need element labels or coordinates to verify or to act next \u2014 if confirmation fails, emit a \`back-nav-failure\` finding, then navigate forward again to continue`;
|
|
62957
|
+
var STUCK_LOOP_RULE = `Stuck loop: emit a \`stuck-loop\` finding when any of these occur: (1) \`view_ui\` returns the same \`<screen_id>\` across 3 or more consecutive \`view_ui\` calls, (2) the same element has been tapped more than twice with no screen change confirmed by \`view_ui\`, (3) PATH shows the same screen at two non-adjacent positions \u2014 before emitting, try one alternative action (scroll, long-press, swipe) to rule out a gesture mismatch \u2014 note: \`screenshot\`-only calls do not update the stuck-loop counter; only \`view_ui\` calls count`;
|
|
62958
|
+
var LOADING_STATE_RULE = `Transient loading state: when the screen shows spinners, skeleton screens, progress bars, "Loading..." text, or placeholder content NOT described in spec or app context \u2014 use \`screenshot\` to poll for resolution (up to 3 retries); switch to \`view_ui\` only on the final check or when you need element data to act \u2014 if loading persists after 3 retries, proceed with what is visible; if spec or app context explicitly describes a loading screen as a step, do not retry \u2014 call \`view_ui\` and assert normally`;
|
|
62970
62959
|
var EXPECTED_CONTENT_MISSING_RULE = `Expected content missing: when \`view_ui\` shows no loading indicator yet omits an element named or strongly implied by spec or app context \u2014 and its absence is not semantically consistent with the current screen \u2014 call \`wait_seconds\` with 2\u20135 seconds and retry \`view_ui\` up to 2 times; if element remains absent, emit a \`missing-content\` finding stating what was expected and what was observed`;
|
|
62971
62960
|
var CLIPPED_ELEMENT_RULE = `Never tap an element tagged \`[clipped-top]\`, \`[clipped-bottom]\`, \`[clipped-left]\`, or \`[clipped-right]\` \u2014 scroll to fully reveal it first, then re-call \`view_ui\` before tapping`;
|
|
62972
62961
|
var WHAT_TO_TEST_SECTION = `## What to Test
|
|
@@ -63009,7 +62998,7 @@ Each step has this shape:
|
|
|
63009
62998
|
<intent> [\u2192 <outcome>] [hint: <advisory>]
|
|
63010
62999
|
|
|
63011
63000
|
- The intent phrase is your goal. Achieve it by any reasonable UI path.
|
|
63012
|
-
- If an outcome state is present, it is your verification target. After acting,
|
|
63001
|
+
- If an outcome state is present, it is your verification target. After acting, confirm the outcome is met before marking the step complete \u2014 use \`screenshot\` when the outcome is purely visual (screen transition visible, element gone, content appeared); use \`view_ui\` when the outcome requires asserting element labels, attributes, or coordinates. If no outcome is given, proceed when the action succeeds.
|
|
63013
63002
|
- A hint is advisory only. Prefer an element matching the hint, but if no literal match exists, use intent and visual context to select the best candidate. Never fail a step solely because a hint label is absent.
|
|
63014
63003
|
- Infer element role (primary action, secondary action, dismissal) from visual hierarchy, position, and hint text. Authors do not specify role.
|
|
63015
63004
|
- If no element satisfies the intent after exhausting visible UI, emit a \`spec-deviation\` finding and halt that step.`;
|
|
@@ -63042,14 +63031,15 @@ ${initialState2}` : void 0,
|
|
|
63042
63031
|
var SPEC_RULES_SECTION = `## Rules
|
|
63043
63032
|
|
|
63044
63033
|
- ${SESSION_START_RULE}
|
|
63045
|
-
-
|
|
63034
|
+
- After any action, observe the screen before deciding next step \u2014 use \`screenshot\` when confirming a purely visual outcome (transition occurred, element disappeared, content appeared, loading finished); use \`view_ui\` when you need element labels, tap coordinates, or accessibility attributes
|
|
63035
|
+
- Never call both \`screenshot\` and \`view_ui\` back-to-back for the same observation \u2014 \`view_ui\` includes a screenshot; if you need both tree and image, one \`view_ui\` call suffices
|
|
63046
63036
|
- ${BACK_NAV_RULE}
|
|
63047
63037
|
- Before selecting any action, prefer navigating to a QUEUE screen over re-exploring a VISITED one
|
|
63048
63038
|
- ${STUCK_LOOP_RULE}
|
|
63049
63039
|
- ${LOADING_STATE_RULE}
|
|
63050
63040
|
- ${EXPECTED_CONTENT_MISSING_RULE}
|
|
63051
63041
|
- ${CLIPPED_ELEMENT_RULE}
|
|
63052
|
-
- Each item in \`**Assertions**\` is a mandatory pass/fail check \u2014 verify using \`view_ui
|
|
63042
|
+
- Each item in \`**Assertions**\` is a mandatory pass/fail check \u2014 verify using \`view_ui\` when the assertion targets an element attribute, label, or presence in the tree; use \`screenshot\` when the assertion is purely visual; if neither can confirm, emit a \`spec-deviation\` finding based on what is observable
|
|
63053
63043
|
- Flag crash dialogs, unexpected system errors, or navigation failures that occur as a direct result of executing a spec step; if you observe a visibly broken element in passing while navigating, note it without interacting with it`;
|
|
63054
63044
|
function buildSpecModeBody({
|
|
63055
63045
|
specContent,
|
|
@@ -63062,6 +63052,8 @@ Verify app against specs below.
|
|
|
63062
63052
|
|
|
63063
63053
|
${contextBlock}
|
|
63064
63054
|
|
|
63055
|
+
${TOOL_SELECTION_SECTION}
|
|
63056
|
+
|
|
63065
63057
|
${SPEC_RULES_SECTION}
|
|
63066
63058
|
|
|
63067
63059
|
## Execution Strategy
|
|
@@ -63101,10 +63093,13 @@ ${DEV_ENVIRONMENT_SECTION}` : "";
|
|
|
63101
63093
|
|
|
63102
63094
|
${contextBlock}
|
|
63103
63095
|
|
|
63096
|
+
${TOOL_SELECTION_SECTION}
|
|
63097
|
+
|
|
63104
63098
|
## Rules
|
|
63105
63099
|
|
|
63106
63100
|
- ${SESSION_START_RULE}
|
|
63107
|
-
-
|
|
63101
|
+
- After any action, observe the screen before deciding next step \u2014 use \`screenshot\` when confirming a purely visual outcome (transition occurred, element disappeared, content appeared, loading finished); use \`view_ui\` when you need element labels, tap coordinates, or accessibility attributes
|
|
63102
|
+
- Never call both \`screenshot\` and \`view_ui\` back-to-back for the same observation \u2014 \`view_ui\` includes a screenshot; if you need both tree and image, one \`view_ui\` call suffices
|
|
63108
63103
|
- ${BACK_NAV_RULE}
|
|
63109
63104
|
- Before selecting any action, prefer navigating to a QUEUE screen over re-exploring a VISITED one
|
|
63110
63105
|
- ${STUCK_LOOP_RULE}
|
|
@@ -64445,7 +64440,7 @@ var directiveHandlers = {
|
|
|
64445
64440
|
}
|
|
64446
64441
|
try {
|
|
64447
64442
|
prefix = decodeURIComponent(prefix);
|
|
64448
|
-
} catch (
|
|
64443
|
+
} catch (err20) {
|
|
64449
64444
|
throwError(state, "tag prefix is malformed: " + prefix);
|
|
64450
64445
|
}
|
|
64451
64446
|
state.tagMap[handle] = prefix;
|
|
@@ -65126,7 +65121,7 @@ function readTagProperty(state) {
|
|
|
65126
65121
|
}
|
|
65127
65122
|
try {
|
|
65128
65123
|
tagName = decodeURIComponent(tagName);
|
|
65129
|
-
} catch (
|
|
65124
|
+
} catch (err20) {
|
|
65130
65125
|
throwError(state, "tag name is malformed: " + tagName);
|
|
65131
65126
|
}
|
|
65132
65127
|
if (isVerbatim) {
|
|
@@ -69394,7 +69389,7 @@ function createPrompt(view) {
|
|
|
69394
69389
|
effectScheduler.clearAll();
|
|
69395
69390
|
throw error48;
|
|
69396
69391
|
}).finally(() => {
|
|
69397
|
-
cleanups.forEach((
|
|
69392
|
+
cleanups.forEach((cleanup3) => cleanup3());
|
|
69398
69393
|
screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
|
|
69399
69394
|
output.end();
|
|
69400
69395
|
}).then(() => promise2), { cancel });
|
|
@@ -69654,9 +69649,9 @@ var RemoveFileError = class extends Error {
|
|
|
69654
69649
|
// ../../node_modules/.pnpm/@inquirer+external-editor@1.0.3_@types+node@22.19.15/node_modules/@inquirer/external-editor/dist/esm/index.js
|
|
69655
69650
|
function editAsync(text = "", callback, fileOptions) {
|
|
69656
69651
|
const editor = new ExternalEditor(text, fileOptions);
|
|
69657
|
-
editor.runAsync((
|
|
69658
|
-
if (
|
|
69659
|
-
setImmediate(callback,
|
|
69652
|
+
editor.runAsync((err20, result) => {
|
|
69653
|
+
if (err20) {
|
|
69654
|
+
setImmediate(callback, err20, void 0);
|
|
69660
69655
|
} else {
|
|
69661
69656
|
try {
|
|
69662
69657
|
editor.cleanup();
|
|
@@ -71753,8 +71748,8 @@ function getErrorMap2() {
|
|
|
71753
71748
|
|
|
71754
71749
|
// ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
|
|
71755
71750
|
var makeIssue = (params) => {
|
|
71756
|
-
const { data, path:
|
|
71757
|
-
const fullPath = [...
|
|
71751
|
+
const { data, path: path24, errorMaps, issueData } = params;
|
|
71752
|
+
const fullPath = [...path24, ...issueData.path || []];
|
|
71758
71753
|
const fullIssue = {
|
|
71759
71754
|
...issueData,
|
|
71760
71755
|
path: fullPath
|
|
@@ -71870,11 +71865,11 @@ var errorUtil;
|
|
|
71870
71865
|
|
|
71871
71866
|
// ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js
|
|
71872
71867
|
var ParseInputLazyPath = class {
|
|
71873
|
-
constructor(parent, value,
|
|
71868
|
+
constructor(parent, value, path24, key) {
|
|
71874
71869
|
this._cachedPath = [];
|
|
71875
71870
|
this.parent = parent;
|
|
71876
71871
|
this.data = value;
|
|
71877
|
-
this._path =
|
|
71872
|
+
this._path = path24;
|
|
71878
71873
|
this._key = key;
|
|
71879
71874
|
}
|
|
71880
71875
|
get path() {
|
|
@@ -72013,8 +72008,8 @@ var ZodType2 = class {
|
|
|
72013
72008
|
} : {
|
|
72014
72009
|
issues: ctx.common.issues
|
|
72015
72010
|
};
|
|
72016
|
-
} catch (
|
|
72017
|
-
if (
|
|
72011
|
+
} catch (err20) {
|
|
72012
|
+
if (err20?.message?.toLowerCase()?.includes("encountered")) {
|
|
72018
72013
|
this["~standard"].async = true;
|
|
72019
72014
|
}
|
|
72020
72015
|
ctx.common = {
|
|
@@ -75462,34 +75457,23 @@ function findXqaDirectory(startDirectory) {
|
|
|
75462
75457
|
}
|
|
75463
75458
|
|
|
75464
75459
|
// src/suite/commands/run-command.ts
|
|
75465
|
-
var
|
|
75466
|
-
var
|
|
75460
|
+
var import_promises21 = __toESM(require("node:fs/promises"), 1);
|
|
75461
|
+
var import_node_path23 = __toESM(require("node:path"), 1);
|
|
75467
75462
|
var import_fast_glob = __toESM(require_out4(), 1);
|
|
75468
|
-
var
|
|
75469
|
-
|
|
75470
|
-
// src/suite/core/run-id.ts
|
|
75471
|
-
var RUN_ID_PAD_LENGTH2 = 4;
|
|
75472
|
-
function toNumeric(name) {
|
|
75473
|
-
const parsed = Number(name);
|
|
75474
|
-
return Number.isInteger(parsed) && parsed > 0 ? parsed : void 0;
|
|
75475
|
-
}
|
|
75476
|
-
function highestNumeric(directories) {
|
|
75477
|
-
let highest = 0;
|
|
75478
|
-
for (const name of directories) {
|
|
75479
|
-
const numeric = toNumeric(name);
|
|
75480
|
-
if (numeric !== void 0 && numeric > highest) {
|
|
75481
|
-
highest = numeric;
|
|
75482
|
-
}
|
|
75483
|
-
}
|
|
75484
|
-
return highest;
|
|
75485
|
-
}
|
|
75486
|
-
function computeNextRunId(existingDirectories) {
|
|
75487
|
-
return String(highestNumeric(existingDirectories) + 1).padStart(RUN_ID_PAD_LENGTH2, "0");
|
|
75488
|
-
}
|
|
75463
|
+
var import_neverthrow55 = __toESM(require_index_cjs(), 1);
|
|
75489
75464
|
|
|
75490
75465
|
// src/suite/core/suite-config-parser.ts
|
|
75491
75466
|
var import_neverthrow48 = __toESM(require_index_cjs(), 1);
|
|
75492
75467
|
var import_neverthrow49 = __toESM(require_index_cjs(), 1);
|
|
75468
|
+
var RESERVED_HOOK_ENV_KEYS = [
|
|
75469
|
+
"XQA_SIM_UDID",
|
|
75470
|
+
"XQA_ITEM_ID",
|
|
75471
|
+
"XQA_ITEM_TYPE",
|
|
75472
|
+
"XQA_ITEM_NAME",
|
|
75473
|
+
"XQA_SPEC_PATH",
|
|
75474
|
+
"XQA_SUITE"
|
|
75475
|
+
];
|
|
75476
|
+
var reservedKeySet = new Set(RESERVED_HOOK_ENV_KEYS);
|
|
75493
75477
|
var freestyleEntrySchema = external_exports2.object({
|
|
75494
75478
|
prompt: external_exports2.string().optional(),
|
|
75495
75479
|
timeoutSeconds: external_exports2.number().int().positive()
|
|
@@ -75504,9 +75488,33 @@ var freestyleSchema = external_exports2.union([external_exports2.number().int().
|
|
|
75504
75488
|
}
|
|
75505
75489
|
return value;
|
|
75506
75490
|
});
|
|
75491
|
+
var hookConfigSchema = external_exports2.object({
|
|
75492
|
+
script: external_exports2.string().min(1),
|
|
75493
|
+
env: external_exports2.record(external_exports2.string(), external_exports2.string()).optional(),
|
|
75494
|
+
timeoutSeconds: external_exports2.number().int().positive().optional()
|
|
75495
|
+
}).superRefine((data, context) => {
|
|
75496
|
+
if (data.env === void 0) {
|
|
75497
|
+
return;
|
|
75498
|
+
}
|
|
75499
|
+
for (const key of Object.keys(data.env)) {
|
|
75500
|
+
if (reservedKeySet.has(key)) {
|
|
75501
|
+
context.addIssue({
|
|
75502
|
+
code: external_exports2.ZodIssueCode.custom,
|
|
75503
|
+
path: ["env", key],
|
|
75504
|
+
message: `Reserved xqa-owned key: ${key}`
|
|
75505
|
+
});
|
|
75506
|
+
}
|
|
75507
|
+
}
|
|
75508
|
+
});
|
|
75509
|
+
var suiteHooksSchema = external_exports2.object({
|
|
75510
|
+
beforeEach: hookConfigSchema.optional()
|
|
75511
|
+
});
|
|
75507
75512
|
var suiteConfigSchema = external_exports2.object({
|
|
75508
|
-
specs: external_exports2.array(external_exports2.string()).
|
|
75509
|
-
freestyle: freestyleSchema
|
|
75513
|
+
specs: external_exports2.array(external_exports2.string()).default([]),
|
|
75514
|
+
freestyle: freestyleSchema,
|
|
75515
|
+
hooks: suiteHooksSchema.optional()
|
|
75516
|
+
}).refine((data) => data.specs.length > 0 || data.freestyle.length > 0, {
|
|
75517
|
+
message: "Suite must declare at least one spec or freestyle entry"
|
|
75510
75518
|
});
|
|
75511
75519
|
var safeJsonParse4 = (0, import_neverthrow48.fromThrowable)(
|
|
75512
75520
|
JSON.parse,
|
|
@@ -75515,13 +75523,47 @@ var safeJsonParse4 = (0, import_neverthrow48.fromThrowable)(
|
|
|
75515
75523
|
cause
|
|
75516
75524
|
})
|
|
75517
75525
|
);
|
|
75526
|
+
function buildHookConfig(parsed) {
|
|
75527
|
+
const { script, env: env2, timeoutSeconds } = parsed;
|
|
75528
|
+
if (env2 !== void 0 && timeoutSeconds !== void 0) {
|
|
75529
|
+
return { script, env: env2, timeoutSeconds };
|
|
75530
|
+
}
|
|
75531
|
+
if (env2 !== void 0) {
|
|
75532
|
+
return { script, env: env2 };
|
|
75533
|
+
}
|
|
75534
|
+
if (timeoutSeconds !== void 0) {
|
|
75535
|
+
return { script, timeoutSeconds };
|
|
75536
|
+
}
|
|
75537
|
+
return { script };
|
|
75538
|
+
}
|
|
75539
|
+
function normalizeHooks(hooks) {
|
|
75540
|
+
if (hooks === void 0) {
|
|
75541
|
+
return void 0;
|
|
75542
|
+
}
|
|
75543
|
+
const { beforeEach } = hooks;
|
|
75544
|
+
if (beforeEach === void 0) {
|
|
75545
|
+
return {};
|
|
75546
|
+
}
|
|
75547
|
+
return { beforeEach: buildHookConfig(beforeEach) };
|
|
75548
|
+
}
|
|
75518
75549
|
function parseSuiteConfig(raw) {
|
|
75519
75550
|
return safeJsonParse4(raw).andThen((data) => {
|
|
75520
75551
|
const parsed = suiteConfigSchema.safeParse(data);
|
|
75521
75552
|
if (!parsed.success) {
|
|
75522
75553
|
return (0, import_neverthrow49.err)({ type: "INVALID_SUITE_CONFIG", cause: parsed.error });
|
|
75523
75554
|
}
|
|
75524
|
-
|
|
75555
|
+
const hooks = normalizeHooks(parsed.data.hooks);
|
|
75556
|
+
if (hooks === void 0) {
|
|
75557
|
+
return (0, import_neverthrow49.ok)({
|
|
75558
|
+
specs: parsed.data.specs,
|
|
75559
|
+
freestyle: parsed.data.freestyle
|
|
75560
|
+
});
|
|
75561
|
+
}
|
|
75562
|
+
return (0, import_neverthrow49.ok)({
|
|
75563
|
+
specs: parsed.data.specs,
|
|
75564
|
+
freestyle: parsed.data.freestyle,
|
|
75565
|
+
hooks
|
|
75566
|
+
});
|
|
75525
75567
|
});
|
|
75526
75568
|
}
|
|
75527
75569
|
|
|
@@ -75534,17 +75576,6 @@ function buildSuiteFindings(input) {
|
|
|
75534
75576
|
return base;
|
|
75535
75577
|
}
|
|
75536
75578
|
|
|
75537
|
-
// src/suite/core/suite-id.ts
|
|
75538
|
-
function slugify2(glob) {
|
|
75539
|
-
return glob.replaceAll(/[^a-zA-Z0-9]+/g, "-").replaceAll(/-+/g, "-").replaceAll(/^-|-$/g, "");
|
|
75540
|
-
}
|
|
75541
|
-
function deriveSuiteId(input) {
|
|
75542
|
-
if (input.mode === "suite") {
|
|
75543
|
-
return input.name;
|
|
75544
|
-
}
|
|
75545
|
-
return input.globs.toSorted().map((glob) => slugify2(glob)).join("+");
|
|
75546
|
-
}
|
|
75547
|
-
|
|
75548
75579
|
// src/suite/core/work-item-builder.ts
|
|
75549
75580
|
var DEFAULT_FREESTYLE_TIMEOUT_SECONDS = 300;
|
|
75550
75581
|
function deriveSpecName(filePath) {
|
|
@@ -75612,7 +75643,29 @@ function writeSuiteFindings(findings, options) {
|
|
|
75612
75643
|
}
|
|
75613
75644
|
|
|
75614
75645
|
// src/suite/shell/worker-pool.ts
|
|
75615
|
-
var
|
|
75646
|
+
var import_neverthrow53 = __toESM(require_index_cjs(), 1);
|
|
75647
|
+
|
|
75648
|
+
// src/suite/core/priority-queue.ts
|
|
75649
|
+
var PriorityQueue = class {
|
|
75650
|
+
entries = [];
|
|
75651
|
+
get size() {
|
|
75652
|
+
return this.entries.length;
|
|
75653
|
+
}
|
|
75654
|
+
get isEmpty() {
|
|
75655
|
+
return this.entries.length === 0;
|
|
75656
|
+
}
|
|
75657
|
+
enqueue(item, priority) {
|
|
75658
|
+
const insertIndex = this.entries.findIndex((entry) => entry.priority > priority);
|
|
75659
|
+
if (insertIndex === -1) {
|
|
75660
|
+
this.entries.push({ item, priority });
|
|
75661
|
+
} else {
|
|
75662
|
+
this.entries.splice(insertIndex, 0, { item, priority });
|
|
75663
|
+
}
|
|
75664
|
+
}
|
|
75665
|
+
dequeue() {
|
|
75666
|
+
return this.entries.shift()?.item;
|
|
75667
|
+
}
|
|
75668
|
+
};
|
|
75616
75669
|
|
|
75617
75670
|
// src/suite/shell/item-result-builder.ts
|
|
75618
75671
|
function getErrorMessage(cause) {
|
|
@@ -75686,33 +75739,7 @@ function buildAbortedItem(item, simulatorUdid) {
|
|
|
75686
75739
|
};
|
|
75687
75740
|
}
|
|
75688
75741
|
|
|
75689
|
-
// src/suite/
|
|
75690
|
-
var PriorityQueue = class {
|
|
75691
|
-
entries = [];
|
|
75692
|
-
get size() {
|
|
75693
|
-
return this.entries.length;
|
|
75694
|
-
}
|
|
75695
|
-
get isEmpty() {
|
|
75696
|
-
return this.entries.length === 0;
|
|
75697
|
-
}
|
|
75698
|
-
enqueue(item, priority) {
|
|
75699
|
-
const insertIndex = this.entries.findIndex((entry) => entry.priority > priority);
|
|
75700
|
-
if (insertIndex === -1) {
|
|
75701
|
-
this.entries.push({ item, priority });
|
|
75702
|
-
} else {
|
|
75703
|
-
this.entries.splice(insertIndex, 0, { item, priority });
|
|
75704
|
-
}
|
|
75705
|
-
}
|
|
75706
|
-
dequeue() {
|
|
75707
|
-
return this.entries.shift()?.item;
|
|
75708
|
-
}
|
|
75709
|
-
};
|
|
75710
|
-
|
|
75711
|
-
// src/suite/shell/worker-pool.ts
|
|
75712
|
-
var CONSECUTIVE_FAILURES_THRESHOLD = 2;
|
|
75713
|
-
function isTimeoutError(error48) {
|
|
75714
|
-
return error48.type.toUpperCase().includes("TIMEOUT");
|
|
75715
|
-
}
|
|
75742
|
+
// src/suite/shell/item-result-recorder.ts
|
|
75716
75743
|
function buildNotifyBase(itemContext) {
|
|
75717
75744
|
return {
|
|
75718
75745
|
itemId: itemContext.item.id,
|
|
@@ -75721,6 +75748,9 @@ function buildNotifyBase(itemContext) {
|
|
|
75721
75748
|
at: Date.now()
|
|
75722
75749
|
};
|
|
75723
75750
|
}
|
|
75751
|
+
function isTimeoutError(error48) {
|
|
75752
|
+
return error48.type.toUpperCase().includes("TIMEOUT");
|
|
75753
|
+
}
|
|
75724
75754
|
function notifyItemResult(context, observer) {
|
|
75725
75755
|
const base = buildNotifyBase(context.itemContext);
|
|
75726
75756
|
if (context.result.isOk()) {
|
|
@@ -75741,12 +75771,12 @@ function notifyItemResult(context, observer) {
|
|
|
75741
75771
|
error: getErrorMessage(context.result.error.cause)
|
|
75742
75772
|
});
|
|
75743
75773
|
}
|
|
75744
|
-
function recordItemResult(
|
|
75774
|
+
function recordItemResult(input) {
|
|
75775
|
+
const { context, results, observer } = input;
|
|
75745
75776
|
const { itemContext, result } = context;
|
|
75746
|
-
const { results, config: config3 } = workerContext;
|
|
75747
75777
|
if (result.isOk()) {
|
|
75748
75778
|
results.push(buildCompletedItem(itemContext, result.value));
|
|
75749
|
-
notifyItemResult(context,
|
|
75779
|
+
notifyItemResult(context, observer);
|
|
75750
75780
|
return 0;
|
|
75751
75781
|
}
|
|
75752
75782
|
if (isTimeoutError(result.error)) {
|
|
@@ -75754,9 +75784,202 @@ function recordItemResult(context, workerContext) {
|
|
|
75754
75784
|
} else {
|
|
75755
75785
|
results.push(buildFailedItem(itemContext, getErrorMessage(result.error.cause)));
|
|
75756
75786
|
}
|
|
75757
|
-
notifyItemResult(context,
|
|
75787
|
+
notifyItemResult(context, observer);
|
|
75788
|
+
return 1;
|
|
75789
|
+
}
|
|
75790
|
+
|
|
75791
|
+
// src/suite/shell/hook-failure-recorder.ts
|
|
75792
|
+
function formatHookError(error48) {
|
|
75793
|
+
switch (error48.type) {
|
|
75794
|
+
case "HOOK_SPAWN_FAILED": {
|
|
75795
|
+
return `Hook spawn failed: ${getErrorMessage(error48.cause)}`;
|
|
75796
|
+
}
|
|
75797
|
+
case "HOOK_EXIT_NONZERO": {
|
|
75798
|
+
return `Hook exited with code ${String(error48.code)}: ${error48.stderr.trim()}`;
|
|
75799
|
+
}
|
|
75800
|
+
case "HOOK_TIMEOUT": {
|
|
75801
|
+
return `Hook timed out after ${String(error48.timeoutMs)}ms`;
|
|
75802
|
+
}
|
|
75803
|
+
case "HOOK_ABORTED": {
|
|
75804
|
+
return "Hook aborted";
|
|
75805
|
+
}
|
|
75806
|
+
}
|
|
75807
|
+
}
|
|
75808
|
+
function emitHookTimeout(input) {
|
|
75809
|
+
const base = buildNotifyBase(input.itemContext);
|
|
75810
|
+
input.results.push(buildTimedOutItem(input.itemContext));
|
|
75811
|
+
const event = { type: "ITEM_TIMEOUT", ...base };
|
|
75812
|
+
input.observer(event);
|
|
75813
|
+
}
|
|
75814
|
+
function emitHookFailed(input, message) {
|
|
75815
|
+
const base = buildNotifyBase(input.itemContext);
|
|
75816
|
+
input.results.push(buildFailedItem(input.itemContext, message));
|
|
75817
|
+
const event = { type: "ITEM_FAILED", ...base, error: message };
|
|
75818
|
+
input.observer(event);
|
|
75819
|
+
}
|
|
75820
|
+
function recordHookFailure(input) {
|
|
75821
|
+
if (input.error.type === "HOOK_TIMEOUT") {
|
|
75822
|
+
emitHookTimeout(input);
|
|
75823
|
+
return 1;
|
|
75824
|
+
}
|
|
75825
|
+
emitHookFailed(input, formatHookError(input.error));
|
|
75758
75826
|
return 1;
|
|
75759
75827
|
}
|
|
75828
|
+
|
|
75829
|
+
// src/suite/shell/hook-invoker.ts
|
|
75830
|
+
var import_neverthrow52 = __toESM(require_index_cjs(), 1);
|
|
75831
|
+
|
|
75832
|
+
// src/suite/core/hook-env-builder.ts
|
|
75833
|
+
function buildReservedKeys(input) {
|
|
75834
|
+
const { item, simulatorUdid, suiteName } = input;
|
|
75835
|
+
const base = {
|
|
75836
|
+
XQA_SIM_UDID: simulatorUdid,
|
|
75837
|
+
XQA_ITEM_ID: item.id,
|
|
75838
|
+
XQA_ITEM_TYPE: item.type,
|
|
75839
|
+
XQA_ITEM_NAME: item.name,
|
|
75840
|
+
XQA_SUITE: suiteName
|
|
75841
|
+
};
|
|
75842
|
+
if (item.type === "spec") {
|
|
75843
|
+
return { ...base, XQA_SPEC_PATH: item.specPath };
|
|
75844
|
+
}
|
|
75845
|
+
return base;
|
|
75846
|
+
}
|
|
75847
|
+
function buildHookEnv(input) {
|
|
75848
|
+
const reserved = buildReservedKeys(input);
|
|
75849
|
+
if (input.suiteEnv === void 0) {
|
|
75850
|
+
return reserved;
|
|
75851
|
+
}
|
|
75852
|
+
return { ...input.suiteEnv, ...reserved };
|
|
75853
|
+
}
|
|
75854
|
+
|
|
75855
|
+
// src/suite/shell/hook-runner.ts
|
|
75856
|
+
var import_node_child_process7 = require("node:child_process");
|
|
75857
|
+
var import_neverthrow51 = __toESM(require_index_cjs(), 1);
|
|
75858
|
+
var noop2 = () => void 0;
|
|
75859
|
+
function cleanup2(context) {
|
|
75860
|
+
clearTimeout(context.timeoutHandle);
|
|
75861
|
+
context.signal.removeEventListener("abort", context.onAbort);
|
|
75862
|
+
}
|
|
75863
|
+
function settle(context, outcome) {
|
|
75864
|
+
if (context.settled.value) {
|
|
75865
|
+
return;
|
|
75866
|
+
}
|
|
75867
|
+
context.settled.value = true;
|
|
75868
|
+
cleanup2(context);
|
|
75869
|
+
context.deferred.resolve(outcome);
|
|
75870
|
+
}
|
|
75871
|
+
function makeDeferred() {
|
|
75872
|
+
const raw = Promise.withResolvers();
|
|
75873
|
+
return { promise: raw.promise, resolve: raw.resolve };
|
|
75874
|
+
}
|
|
75875
|
+
function collectStderr(child, stderrReference) {
|
|
75876
|
+
if (child.stderr === null) {
|
|
75877
|
+
return;
|
|
75878
|
+
}
|
|
75879
|
+
child.stderr.on("data", (chunk) => {
|
|
75880
|
+
stderrReference.value += chunk.toString();
|
|
75881
|
+
});
|
|
75882
|
+
}
|
|
75883
|
+
function buildOnAbort(context) {
|
|
75884
|
+
return () => {
|
|
75885
|
+
context.child.kill("SIGTERM");
|
|
75886
|
+
settle(context, (0, import_neverthrow51.err)({ type: "HOOK_ABORTED" }));
|
|
75887
|
+
};
|
|
75888
|
+
}
|
|
75889
|
+
function attachChildListeners(context) {
|
|
75890
|
+
const { child, stderrReference } = context;
|
|
75891
|
+
child.on("error", (cause) => {
|
|
75892
|
+
settle(context, (0, import_neverthrow51.err)({ type: "HOOK_SPAWN_FAILED", cause }));
|
|
75893
|
+
});
|
|
75894
|
+
child.on("exit", (code) => {
|
|
75895
|
+
if (code === 0) {
|
|
75896
|
+
settle(context, (0, import_neverthrow51.ok)());
|
|
75897
|
+
return;
|
|
75898
|
+
}
|
|
75899
|
+
settle(
|
|
75900
|
+
context,
|
|
75901
|
+
(0, import_neverthrow51.err)({
|
|
75902
|
+
type: "HOOK_EXIT_NONZERO",
|
|
75903
|
+
code: code ?? -1,
|
|
75904
|
+
stderr: stderrReference.value
|
|
75905
|
+
})
|
|
75906
|
+
);
|
|
75907
|
+
});
|
|
75908
|
+
}
|
|
75909
|
+
function attachTimeout(context, timeoutMs) {
|
|
75910
|
+
clearTimeout(context.timeoutHandle);
|
|
75911
|
+
context.timeoutHandle = setTimeout(() => {
|
|
75912
|
+
context.child.kill("SIGTERM");
|
|
75913
|
+
settle(context, (0, import_neverthrow51.err)({ type: "HOOK_TIMEOUT", timeoutMs }));
|
|
75914
|
+
}, timeoutMs);
|
|
75915
|
+
}
|
|
75916
|
+
function buildContext2(options) {
|
|
75917
|
+
const { script, cwd, env: env2, baseEnv, nodeExecPath } = options;
|
|
75918
|
+
const deferred = makeDeferred();
|
|
75919
|
+
const stderrReference = { value: "" };
|
|
75920
|
+
const child = (0, import_node_child_process7.spawn)(nodeExecPath, [script], {
|
|
75921
|
+
cwd,
|
|
75922
|
+
env: { ...baseEnv, ...env2 },
|
|
75923
|
+
stdio: ["ignore", "inherit", "pipe"]
|
|
75924
|
+
});
|
|
75925
|
+
collectStderr(child, stderrReference);
|
|
75926
|
+
return {
|
|
75927
|
+
child,
|
|
75928
|
+
signal: options.signal,
|
|
75929
|
+
timeoutHandle: setTimeout(noop2, 0),
|
|
75930
|
+
onAbort: noop2,
|
|
75931
|
+
deferred,
|
|
75932
|
+
stderrReference,
|
|
75933
|
+
settled: { value: false }
|
|
75934
|
+
};
|
|
75935
|
+
}
|
|
75936
|
+
async function spawnHook(options) {
|
|
75937
|
+
const context = buildContext2(options);
|
|
75938
|
+
attachTimeout(context, options.timeoutMs);
|
|
75939
|
+
context.onAbort = buildOnAbort(context);
|
|
75940
|
+
if (options.signal.aborted) {
|
|
75941
|
+
context.onAbort();
|
|
75942
|
+
return context.deferred.promise;
|
|
75943
|
+
}
|
|
75944
|
+
options.signal.addEventListener("abort", context.onAbort, { once: true });
|
|
75945
|
+
attachChildListeners(context);
|
|
75946
|
+
return context.deferred.promise;
|
|
75947
|
+
}
|
|
75948
|
+
var safeSpawn = import_neverthrow51.ResultAsync.fromThrowable(
|
|
75949
|
+
spawnHook,
|
|
75950
|
+
(cause) => ({ type: "HOOK_SPAWN_FAILED", cause })
|
|
75951
|
+
);
|
|
75952
|
+
function runHook(options) {
|
|
75953
|
+
return safeSpawn(options).andThen((outcome) => outcome);
|
|
75954
|
+
}
|
|
75955
|
+
|
|
75956
|
+
// src/suite/shell/hook-invoker.ts
|
|
75957
|
+
var DEFAULT_HOOK_TIMEOUT_SECONDS = 120;
|
|
75958
|
+
var MS_PER_SECOND5 = 1e3;
|
|
75959
|
+
async function invokeHook(input) {
|
|
75960
|
+
const { hook, item, simulatorUdid, suiteName, hookCwd, hookBaseEnv, hookNodeExecPath, signal } = input;
|
|
75961
|
+
const env2 = buildHookEnv({ item, simulatorUdid, suiteName, suiteEnv: hook.env });
|
|
75962
|
+
const timeoutSeconds = hook.timeoutSeconds ?? DEFAULT_HOOK_TIMEOUT_SECONDS;
|
|
75963
|
+
return runHook({
|
|
75964
|
+
script: hook.script,
|
|
75965
|
+
cwd: hookCwd,
|
|
75966
|
+
env: env2,
|
|
75967
|
+
baseEnv: hookBaseEnv,
|
|
75968
|
+
nodeExecPath: hookNodeExecPath,
|
|
75969
|
+
timeoutMs: timeoutSeconds * MS_PER_SECOND5,
|
|
75970
|
+
signal
|
|
75971
|
+
});
|
|
75972
|
+
}
|
|
75973
|
+
async function maybeInvokeHook(input) {
|
|
75974
|
+
const { hook } = input;
|
|
75975
|
+
if (hook === void 0) {
|
|
75976
|
+
return (0, import_neverthrow52.ok)();
|
|
75977
|
+
}
|
|
75978
|
+
return invokeHook({ ...input, hook });
|
|
75979
|
+
}
|
|
75980
|
+
|
|
75981
|
+
// src/suite/shell/worker-pool.ts
|
|
75982
|
+
var CONSECUTIVE_FAILURES_THRESHOLD = 2;
|
|
75760
75983
|
function buildExecuteOptions(workerContext, item) {
|
|
75761
75984
|
const { simulatorUdid, config: config3 } = workerContext;
|
|
75762
75985
|
const base = { item, simulatorUdid, signal: config3.signal };
|
|
@@ -75766,21 +75989,70 @@ function buildExecuteOptions(workerContext, item) {
|
|
|
75766
75989
|
}
|
|
75767
75990
|
return base;
|
|
75768
75991
|
}
|
|
75769
|
-
|
|
75770
|
-
const {
|
|
75771
|
-
|
|
75772
|
-
|
|
75773
|
-
|
|
75992
|
+
function buildHookInvokeInput(workerContext, item) {
|
|
75993
|
+
const { config: config3, simulatorUdid } = workerContext;
|
|
75994
|
+
return {
|
|
75995
|
+
hook: config3.hook,
|
|
75996
|
+
item,
|
|
75997
|
+
simulatorUdid,
|
|
75998
|
+
suiteName: config3.suiteName,
|
|
75999
|
+
hookCwd: config3.hookCwd,
|
|
76000
|
+
hookBaseEnv: config3.hookBaseEnv,
|
|
76001
|
+
hookNodeExecPath: config3.hookNodeExecPath,
|
|
76002
|
+
signal: config3.signal
|
|
76003
|
+
};
|
|
76004
|
+
}
|
|
76005
|
+
function emitItemStarted(state) {
|
|
76006
|
+
const { workerContext, item, startMs } = state;
|
|
76007
|
+
workerContext.config.observer({
|
|
75774
76008
|
type: "ITEM_STARTED",
|
|
75775
76009
|
itemId: item.id,
|
|
75776
76010
|
itemName: item.name,
|
|
75777
|
-
simulatorUdid,
|
|
76011
|
+
simulatorUdid: workerContext.simulatorUdid,
|
|
75778
76012
|
at: startMs
|
|
75779
76013
|
});
|
|
75780
|
-
|
|
76014
|
+
}
|
|
76015
|
+
async function runAndRecordItem(state) {
|
|
76016
|
+
const { workerContext, item, startedAt, startMs } = state;
|
|
76017
|
+
const { simulatorUdid } = workerContext;
|
|
76018
|
+
const result = await workerContext.config.executeItem(buildExecuteOptions(workerContext, item));
|
|
75781
76019
|
const durationMs = Date.now() - startMs;
|
|
75782
76020
|
const itemContext = { item, simulatorUdid, startedAt, durationMs };
|
|
75783
|
-
return recordItemResult({
|
|
76021
|
+
return recordItemResult({
|
|
76022
|
+
context: { itemContext, result },
|
|
76023
|
+
results: workerContext.results,
|
|
76024
|
+
observer: workerContext.config.observer
|
|
76025
|
+
});
|
|
76026
|
+
}
|
|
76027
|
+
function handleHookFailure(state, error48) {
|
|
76028
|
+
const { workerContext, item, startedAt, startMs } = state;
|
|
76029
|
+
const durationMs = Date.now() - startMs;
|
|
76030
|
+
const itemContext = {
|
|
76031
|
+
item,
|
|
76032
|
+
simulatorUdid: workerContext.simulatorUdid,
|
|
76033
|
+
startedAt,
|
|
76034
|
+
durationMs
|
|
76035
|
+
};
|
|
76036
|
+
return recordHookFailure({
|
|
76037
|
+
itemContext,
|
|
76038
|
+
error: error48,
|
|
76039
|
+
results: workerContext.results,
|
|
76040
|
+
observer: workerContext.config.observer
|
|
76041
|
+
});
|
|
76042
|
+
}
|
|
76043
|
+
async function processItem(workerContext, item) {
|
|
76044
|
+
const state = {
|
|
76045
|
+
workerContext,
|
|
76046
|
+
item,
|
|
76047
|
+
startedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
76048
|
+
startMs: Date.now()
|
|
76049
|
+
};
|
|
76050
|
+
emitItemStarted(state);
|
|
76051
|
+
const hookOutcome = await maybeInvokeHook(buildHookInvokeInput(workerContext, item));
|
|
76052
|
+
if (hookOutcome.isErr()) {
|
|
76053
|
+
return handleHookFailure(state, hookOutcome.error);
|
|
76054
|
+
}
|
|
76055
|
+
return runAndRecordItem(state);
|
|
75784
76056
|
}
|
|
75785
76057
|
async function runWorker(workerContext) {
|
|
75786
76058
|
const { simulatorUdid, queue, config: config3 } = workerContext;
|
|
@@ -75840,7 +76112,7 @@ function runWorkerPool(config3) {
|
|
|
75840
76112
|
const queue = setupQueue(config3);
|
|
75841
76113
|
const results = [];
|
|
75842
76114
|
const suiteStartMs = Date.now();
|
|
75843
|
-
const safeRun =
|
|
76115
|
+
const safeRun = import_neverthrow53.ResultAsync.fromThrowable(
|
|
75844
76116
|
async () => runAllWorkers({ config: config3, queue, results, suiteStartMs }),
|
|
75845
76117
|
(cause) => ({ type: "WORKER_POOL_FAILED", cause })
|
|
75846
76118
|
);
|
|
@@ -75925,30 +76197,88 @@ function makeExecuteItem(context) {
|
|
|
75925
76197
|
};
|
|
75926
76198
|
}
|
|
75927
76199
|
|
|
75928
|
-
// src/suite/commands/run-
|
|
76200
|
+
// src/suite/commands/suite-run-context.ts
|
|
76201
|
+
var import_promises20 = __toESM(require("node:fs/promises"), 1);
|
|
76202
|
+
var import_node_path22 = __toESM(require("node:path"), 1);
|
|
76203
|
+
var import_neverthrow54 = __toESM(require_index_cjs(), 1);
|
|
76204
|
+
|
|
76205
|
+
// src/suite/core/run-id.ts
|
|
76206
|
+
var RUN_ID_PAD_LENGTH2 = 4;
|
|
76207
|
+
function toNumeric(name) {
|
|
76208
|
+
const parsed = Number(name);
|
|
76209
|
+
return Number.isInteger(parsed) && parsed > 0 ? parsed : void 0;
|
|
76210
|
+
}
|
|
76211
|
+
function highestNumeric(directories) {
|
|
76212
|
+
let highest = 0;
|
|
76213
|
+
for (const name of directories) {
|
|
76214
|
+
const numeric = toNumeric(name);
|
|
76215
|
+
if (numeric !== void 0 && numeric > highest) {
|
|
76216
|
+
highest = numeric;
|
|
76217
|
+
}
|
|
76218
|
+
}
|
|
76219
|
+
return highest;
|
|
76220
|
+
}
|
|
76221
|
+
function computeNextRunId(existingDirectories) {
|
|
76222
|
+
return String(highestNumeric(existingDirectories) + 1).padStart(RUN_ID_PAD_LENGTH2, "0");
|
|
76223
|
+
}
|
|
76224
|
+
|
|
76225
|
+
// src/suite/core/suite-id.ts
|
|
76226
|
+
function slugify2(glob) {
|
|
76227
|
+
return glob.replaceAll(/[^a-zA-Z0-9]+/g, "-").replaceAll(/-+/g, "-").replaceAll(/^-|-$/g, "");
|
|
76228
|
+
}
|
|
76229
|
+
function deriveSuiteId(input) {
|
|
76230
|
+
if (input.mode === "suite") {
|
|
76231
|
+
return input.name;
|
|
76232
|
+
}
|
|
76233
|
+
return input.globs.toSorted().map((glob) => slugify2(glob)).join("+");
|
|
76234
|
+
}
|
|
76235
|
+
|
|
76236
|
+
// src/suite/commands/suite-run-context.ts
|
|
75929
76237
|
var ISO_DATE_LENGTH3 = 10;
|
|
75930
|
-
var safeReaddir2 =
|
|
76238
|
+
var safeReaddir2 = import_neverthrow54.ResultAsync.fromThrowable(
|
|
75931
76239
|
async (directoryPath) => {
|
|
75932
76240
|
const entries = await import_promises20.default.readdir(directoryPath, { withFileTypes: true });
|
|
75933
76241
|
return entries.filter((entry) => entry.isDirectory()).map((entry) => entry.name);
|
|
75934
76242
|
},
|
|
75935
76243
|
() => "READDIR_FAILED"
|
|
75936
76244
|
);
|
|
75937
|
-
var safeReadFile5 = import_neverthrow52.ResultAsync.fromThrowable(
|
|
75938
|
-
async (filePath) => import_promises20.default.readFile(filePath, "utf8"),
|
|
75939
|
-
() => "READ_FAILED"
|
|
75940
|
-
);
|
|
75941
76245
|
async function listRunDirectories(input) {
|
|
75942
76246
|
const { outputDirectory, suiteId, date: date5 } = input;
|
|
75943
76247
|
const directoryPath = import_node_path22.default.join(outputDirectory, "suite", suiteId, date5);
|
|
75944
76248
|
const result = await safeReaddir2(directoryPath);
|
|
75945
76249
|
return result.unwrapOr([]);
|
|
75946
76250
|
}
|
|
76251
|
+
function deriveSuiteIdFromMode(mode) {
|
|
76252
|
+
if (mode.type === "suite") {
|
|
76253
|
+
return deriveSuiteId({ mode: "suite", name: mode.name });
|
|
76254
|
+
}
|
|
76255
|
+
return deriveSuiteId({ mode: "spec", globs: mode.globs });
|
|
76256
|
+
}
|
|
76257
|
+
async function buildSuiteRunContext(input) {
|
|
76258
|
+
const suiteId = deriveSuiteIdFromMode(input.mode);
|
|
76259
|
+
const date5 = (/* @__PURE__ */ new Date()).toISOString().slice(0, ISO_DATE_LENGTH3);
|
|
76260
|
+
const outputDirectory = import_node_path22.default.join(input.xqaDirectory, "output");
|
|
76261
|
+
const existingDirectories = await listRunDirectories({ outputDirectory, suiteId, date: date5 });
|
|
76262
|
+
const runId = computeNextRunId(existingDirectories);
|
|
76263
|
+
const context = {
|
|
76264
|
+
config: input.config,
|
|
76265
|
+
xqaDirectory: input.xqaDirectory,
|
|
76266
|
+
runId,
|
|
76267
|
+
date: date5
|
|
76268
|
+
};
|
|
76269
|
+
return { suiteId, date: date5, outputDirectory, runId, context };
|
|
76270
|
+
}
|
|
76271
|
+
|
|
76272
|
+
// src/suite/commands/run-command.ts
|
|
76273
|
+
var safeReadFile5 = import_neverthrow55.ResultAsync.fromThrowable(
|
|
76274
|
+
async (filePath) => import_promises21.default.readFile(filePath, "utf8"),
|
|
76275
|
+
() => "READ_FAILED"
|
|
76276
|
+
);
|
|
75947
76277
|
async function resolveGlobs(input) {
|
|
75948
76278
|
return (0, import_fast_glob.default)(input.globs, { cwd: input.cwd, absolute: true });
|
|
75949
76279
|
}
|
|
75950
76280
|
async function loadSuiteConfig(xqaDirectory, name) {
|
|
75951
|
-
const suitePath =
|
|
76281
|
+
const suitePath = import_node_path23.default.join(xqaDirectory, "suites", `${name}.suite.json`);
|
|
75952
76282
|
const contentResult = await safeReadFile5(suitePath);
|
|
75953
76283
|
if (contentResult.isErr()) {
|
|
75954
76284
|
return;
|
|
@@ -75966,12 +76296,15 @@ async function resolveSuiteModeItems(input) {
|
|
|
75966
76296
|
`);
|
|
75967
76297
|
return;
|
|
75968
76298
|
}
|
|
75969
|
-
const specPaths = await resolveGlobs({ globs: suiteConfig.specs, cwd: input.xqaDirectory });
|
|
75970
|
-
if (specPaths.length === 0) {
|
|
76299
|
+
const specPaths = suiteConfig.specs.length > 0 ? await resolveGlobs({ globs: suiteConfig.specs, cwd: input.xqaDirectory }) : [];
|
|
76300
|
+
if (specPaths.length === 0 && suiteConfig.freestyle.length === 0) {
|
|
75971
76301
|
process.stderr.write("No spec files matched\n");
|
|
75972
76302
|
return;
|
|
75973
76303
|
}
|
|
75974
|
-
return
|
|
76304
|
+
return {
|
|
76305
|
+
items: [...buildSpecItems(specPaths), ...buildFreestyleItems(suiteConfig.freestyle)],
|
|
76306
|
+
hook: suiteConfig.hooks?.beforeEach
|
|
76307
|
+
};
|
|
75975
76308
|
}
|
|
75976
76309
|
async function resolveSpecModeItems(input) {
|
|
75977
76310
|
const specPaths = await resolveGlobs({ globs: input.mode.globs, cwd: input.xqaDirectory });
|
|
@@ -75979,7 +76312,7 @@ async function resolveSpecModeItems(input) {
|
|
|
75979
76312
|
process.stderr.write("No spec files matched\n");
|
|
75980
76313
|
return;
|
|
75981
76314
|
}
|
|
75982
|
-
return buildSpecItems(specPaths);
|
|
76315
|
+
return { items: buildSpecItems(specPaths), hook: void 0 };
|
|
75983
76316
|
}
|
|
75984
76317
|
async function resolveWorkItems(input) {
|
|
75985
76318
|
if (input.mode.type === "suite") {
|
|
@@ -75987,12 +76320,6 @@ async function resolveWorkItems(input) {
|
|
|
75987
76320
|
}
|
|
75988
76321
|
return resolveSpecModeItems({ ...input, mode: input.mode });
|
|
75989
76322
|
}
|
|
75990
|
-
function deriveSuiteIdFromMode(mode) {
|
|
75991
|
-
if (mode.type === "suite") {
|
|
75992
|
-
return deriveSuiteId({ mode: "suite", name: mode.name });
|
|
75993
|
-
}
|
|
75994
|
-
return deriveSuiteId({ mode: "spec", globs: mode.globs });
|
|
75995
|
-
}
|
|
75996
76323
|
async function discoverSimulators() {
|
|
75997
76324
|
const result = await discoverBootedSimulators();
|
|
75998
76325
|
if (result.isErr()) {
|
|
@@ -76006,25 +76333,34 @@ async function discoverSimulators() {
|
|
|
76006
76333
|
}
|
|
76007
76334
|
return { simulators: result.value, exitCode: 0 };
|
|
76008
76335
|
}
|
|
76009
|
-
|
|
76010
|
-
const { context, items, simulatorUdids, debug, signal } = input;
|
|
76011
|
-
const display = createSuiteDisplay();
|
|
76336
|
+
function buildPoolConfig(input, display) {
|
|
76337
|
+
const { context, items, simulatorUdids, debug, signal, suiteName, hookCwd } = input;
|
|
76012
76338
|
const debugLogger = createDebugLogger({ enabled: debug });
|
|
76013
76339
|
const baseObserver = (event) => {
|
|
76014
76340
|
display.onEvent(event);
|
|
76015
76341
|
};
|
|
76016
76342
|
const observer = debugLogger.wrapSuiteHandler(baseObserver);
|
|
76017
|
-
const
|
|
76343
|
+
const onEvent = (itemId) => debugLogger.wrapAgentHandler((event) => {
|
|
76018
76344
|
display.onEvent({ ...event, itemId });
|
|
76019
76345
|
}, itemId);
|
|
76020
|
-
|
|
76346
|
+
return {
|
|
76021
76347
|
items,
|
|
76022
76348
|
simulatorUdids,
|
|
76023
76349
|
observer,
|
|
76024
|
-
onEvent
|
|
76350
|
+
onEvent,
|
|
76025
76351
|
executeItem: makeExecuteItem(context),
|
|
76026
|
-
signal
|
|
76027
|
-
|
|
76352
|
+
signal,
|
|
76353
|
+
suiteName,
|
|
76354
|
+
hookCwd,
|
|
76355
|
+
hookBaseEnv: process.env,
|
|
76356
|
+
hookNodeExecPath: process.execPath
|
|
76357
|
+
};
|
|
76358
|
+
}
|
|
76359
|
+
async function runPool(input) {
|
|
76360
|
+
const { hook } = input;
|
|
76361
|
+
const display = createSuiteDisplay();
|
|
76362
|
+
const poolConfig = buildPoolConfig(input, display);
|
|
76363
|
+
const poolResult = hook === void 0 ? await runWorkerPool(poolConfig) : await runWorkerPool({ ...poolConfig, hook });
|
|
76028
76364
|
display.cleanup();
|
|
76029
76365
|
return poolResult;
|
|
76030
76366
|
}
|
|
@@ -76045,29 +76381,21 @@ async function writeAndReport(input) {
|
|
|
76045
76381
|
const hasFindings = items.some((item) => item.findings.length > 0);
|
|
76046
76382
|
return hasFindings ? 1 : 0;
|
|
76047
76383
|
}
|
|
76048
|
-
|
|
76049
|
-
const
|
|
76050
|
-
|
|
76051
|
-
|
|
76052
|
-
|
|
76053
|
-
|
|
76054
|
-
|
|
76055
|
-
|
|
76056
|
-
|
|
76057
|
-
|
|
76058
|
-
|
|
76384
|
+
function derivePoolInput(input, context) {
|
|
76385
|
+
const suiteName = input.mode.type === "suite" ? input.mode.name : "specs";
|
|
76386
|
+
return {
|
|
76387
|
+
context,
|
|
76388
|
+
items: input.items,
|
|
76389
|
+
simulatorUdids: input.simulatorUdids,
|
|
76390
|
+
debug: input.debug,
|
|
76391
|
+
signal: input.signal,
|
|
76392
|
+
suiteName,
|
|
76393
|
+
hook: input.hook,
|
|
76394
|
+
hookCwd: input.xqaDirectory
|
|
76059
76395
|
};
|
|
76060
|
-
return { suiteId, date: date5, outputDirectory, runId, context };
|
|
76061
76396
|
}
|
|
76062
76397
|
async function executePool(input, runContext) {
|
|
76063
|
-
|
|
76064
|
-
return runPool({
|
|
76065
|
-
context: runContext.context,
|
|
76066
|
-
items,
|
|
76067
|
-
simulatorUdids,
|
|
76068
|
-
debug,
|
|
76069
|
-
signal
|
|
76070
|
-
});
|
|
76398
|
+
return runPool(derivePoolInput(input, runContext.context));
|
|
76071
76399
|
}
|
|
76072
76400
|
async function runSuite(input) {
|
|
76073
76401
|
const runContext = await buildSuiteRunContext(input);
|
|
@@ -76091,8 +76419,8 @@ async function runSuiteCommand(input) {
|
|
|
76091
76419
|
if (preflightExit !== void 0) {
|
|
76092
76420
|
return preflightExit;
|
|
76093
76421
|
}
|
|
76094
|
-
const
|
|
76095
|
-
if (
|
|
76422
|
+
const resolved = await resolveWorkItems(input);
|
|
76423
|
+
if (resolved === void 0) {
|
|
76096
76424
|
return 1;
|
|
76097
76425
|
}
|
|
76098
76426
|
const simulatorResolution = await discoverSimulators();
|
|
@@ -76106,8 +76434,9 @@ async function runSuiteCommand(input) {
|
|
|
76106
76434
|
}
|
|
76107
76435
|
return runSuite({
|
|
76108
76436
|
...input,
|
|
76109
|
-
items,
|
|
76110
|
-
simulatorUdids: simulators.map((sim) => sim.udid)
|
|
76437
|
+
items: resolved.items,
|
|
76438
|
+
simulatorUdids: simulators.map((sim) => sim.udid),
|
|
76439
|
+
hook: resolved.hook
|
|
76111
76440
|
});
|
|
76112
76441
|
}
|
|
76113
76442
|
|
|
@@ -76129,7 +76458,7 @@ function resolveXqaDirectory() {
|
|
|
76129
76458
|
return result.value;
|
|
76130
76459
|
}
|
|
76131
76460
|
var program2 = new Command();
|
|
76132
|
-
program2.name("xqa").description("AI-powered QA agent CLI").version(`${"1.
|
|
76461
|
+
program2.name("xqa").description("AI-powered QA agent CLI").version(`${"1.12.0"}${false ? ` (dev build +${"3c4f23d"})` : ""}`);
|
|
76133
76462
|
program2.command("init").description("Initialize a new xqa project in the current directory").action(() => {
|
|
76134
76463
|
runInitCommand();
|
|
76135
76464
|
});
|