blun-king-cli 9.1.626 → 9.1.628
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/bin/core-bootstrap.js +93 -92
- package/bin/launcher-mode.js +126 -93
- package/bin/launcher-runtime.js +73 -8
- package/bin/managed-plugin-selection.cjs +116 -115
- package/bin/native-command-runner.js +72 -0
- package/bin/native-module-repair.js +26 -20
- package/bin/plugin-bootstrap.js +163 -162
- package/bin/rename-private-staging.cjs +82 -0
- package/blun.mjs +371 -527
- package/package.json +1 -1
- package/worker-host.mjs +2 -2
package/blun.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// BLUN_BUILD_INPUT_SHA256:
|
|
2
|
+
// BLUN_BUILD_INPUT_SHA256:c6e4e4587ddf016fdb40a775622da5455beee2ed97708e374bf683b38e4a9dea
|
|
3
3
|
/*! wasm-webp 0.1.0
|
|
4
4
|
MIT License
|
|
5
5
|
|
|
@@ -61,9 +61,9 @@ const __filename = __cjsShimFileURLToPath(import.meta.url);
|
|
|
61
61
|
const __dirname = __cjsShimDirname(__filename);
|
|
62
62
|
import { createRequire } from "node:module";
|
|
63
63
|
import crypto$1, { createHash, randomBytes, randomInt, randomUUID, timingSafeEqual } from "node:crypto";
|
|
64
|
-
import * as fs$
|
|
64
|
+
import * as fs$17 from "node:fs";
|
|
65
65
|
import Kt, { accessSync, appendFileSync, chmodSync, closeSync, constants, copyFileSync, createReadStream, createWriteStream, existsSync, fstatSync, fsyncSync, linkSync, lstatSync, mkdirSync, openSync, opendirSync, promises, readFileSync, readSync, readdirSync, realpathSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync, writeSync } from "node:fs";
|
|
66
|
-
import * as path$
|
|
66
|
+
import * as path$17 from "node:path";
|
|
67
67
|
import path, { basename, dirname, extname, isAbsolute, join, normalize, parse, posix, relative, resolve, sep, win32 } from "node:path";
|
|
68
68
|
import { Blob as Blob$1, Buffer as Buffer$1, File as File$1 } from "node:buffer";
|
|
69
69
|
import * as nodeOs from "node:os";
|
|
@@ -2180,11 +2180,11 @@ var init_blun_files = __esmMin((() => {
|
|
|
2180
2180
|
async uploadVideo(input, options) {
|
|
2181
2181
|
let file;
|
|
2182
2182
|
if (typeof input === "string") {
|
|
2183
|
-
if (!fs$
|
|
2184
|
-
const filename = path$
|
|
2183
|
+
if (!fs$17.existsSync(input)) throw new ChatProviderError(`Video file not found: ${input}`);
|
|
2184
|
+
const filename = path$17.basename(input);
|
|
2185
2185
|
const mimeType = guessMimeTypeFromExt(filename);
|
|
2186
2186
|
if (mimeType === void 0 || !mimeType.startsWith("video/")) throw new ChatProviderError(`BlunFiles.uploadVideo: file extension does not indicate a video type: ${filename}`);
|
|
2187
|
-
const data = await fs$
|
|
2187
|
+
const data = await fs$17.promises.readFile(input);
|
|
2188
2188
|
file = new File$1([new Blob$1([new Uint8Array(data)], { type: mimeType })], filename, { type: mimeType });
|
|
2189
2189
|
} else {
|
|
2190
2190
|
if (!input.mimeType.startsWith("video/")) throw new ChatProviderError(`Expected a video mime type, got ${input.mimeType}`);
|
|
@@ -11594,7 +11594,7 @@ var require_clone$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11594
11594
|
}
|
|
11595
11595
|
}));
|
|
11596
11596
|
var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
11597
|
-
var fs$
|
|
11597
|
+
var fs$16 = __require("fs");
|
|
11598
11598
|
var polyfills = require_polyfills();
|
|
11599
11599
|
var legacy = require_legacy_streams();
|
|
11600
11600
|
var clone = require_clone$1();
|
|
@@ -11623,36 +11623,36 @@ var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11623
11623
|
m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
|
|
11624
11624
|
console.error(m);
|
|
11625
11625
|
};
|
|
11626
|
-
if (!fs$
|
|
11627
|
-
publishQueue(fs$
|
|
11628
|
-
fs$
|
|
11626
|
+
if (!fs$16[gracefulQueue]) {
|
|
11627
|
+
publishQueue(fs$16, global[gracefulQueue] || []);
|
|
11628
|
+
fs$16.close = (function(fs$close) {
|
|
11629
11629
|
function close(fd, cb) {
|
|
11630
|
-
return fs$close.call(fs$
|
|
11630
|
+
return fs$close.call(fs$16, fd, function(err) {
|
|
11631
11631
|
if (!err) resetQueue();
|
|
11632
11632
|
if (typeof cb === "function") cb.apply(this, arguments);
|
|
11633
11633
|
});
|
|
11634
11634
|
}
|
|
11635
11635
|
Object.defineProperty(close, previousSymbol, { value: fs$close });
|
|
11636
11636
|
return close;
|
|
11637
|
-
})(fs$
|
|
11638
|
-
fs$
|
|
11637
|
+
})(fs$16.close);
|
|
11638
|
+
fs$16.closeSync = (function(fs$closeSync) {
|
|
11639
11639
|
function closeSync(fd) {
|
|
11640
|
-
fs$closeSync.apply(fs$
|
|
11640
|
+
fs$closeSync.apply(fs$16, arguments);
|
|
11641
11641
|
resetQueue();
|
|
11642
11642
|
}
|
|
11643
11643
|
Object.defineProperty(closeSync, previousSymbol, { value: fs$closeSync });
|
|
11644
11644
|
return closeSync;
|
|
11645
|
-
})(fs$
|
|
11645
|
+
})(fs$16.closeSync);
|
|
11646
11646
|
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) process.on("exit", function() {
|
|
11647
|
-
debug(fs$
|
|
11648
|
-
__require("assert").equal(fs$
|
|
11647
|
+
debug(fs$16[gracefulQueue]);
|
|
11648
|
+
__require("assert").equal(fs$16[gracefulQueue].length, 0);
|
|
11649
11649
|
});
|
|
11650
11650
|
}
|
|
11651
|
-
if (!global[gracefulQueue]) publishQueue(global, fs$
|
|
11652
|
-
module.exports = patch(clone(fs$
|
|
11653
|
-
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs$
|
|
11654
|
-
module.exports = patch(fs$
|
|
11655
|
-
fs$
|
|
11651
|
+
if (!global[gracefulQueue]) publishQueue(global, fs$16[gracefulQueue]);
|
|
11652
|
+
module.exports = patch(clone(fs$16));
|
|
11653
|
+
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs$16.__patched) {
|
|
11654
|
+
module.exports = patch(fs$16);
|
|
11655
|
+
fs$16.__patched = true;
|
|
11656
11656
|
}
|
|
11657
11657
|
function patch(fs) {
|
|
11658
11658
|
polyfills(fs);
|
|
@@ -11907,23 +11907,23 @@ var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11907
11907
|
}
|
|
11908
11908
|
function enqueue(elem) {
|
|
11909
11909
|
debug("ENQUEUE", elem[0].name, elem[1]);
|
|
11910
|
-
fs$
|
|
11910
|
+
fs$16[gracefulQueue].push(elem);
|
|
11911
11911
|
retry();
|
|
11912
11912
|
}
|
|
11913
11913
|
var retryTimer;
|
|
11914
11914
|
function resetQueue() {
|
|
11915
11915
|
var now = Date.now();
|
|
11916
|
-
for (var i = 0; i < fs$
|
|
11917
|
-
fs$
|
|
11918
|
-
fs$
|
|
11916
|
+
for (var i = 0; i < fs$16[gracefulQueue].length; ++i) if (fs$16[gracefulQueue][i].length > 2) {
|
|
11917
|
+
fs$16[gracefulQueue][i][3] = now;
|
|
11918
|
+
fs$16[gracefulQueue][i][4] = now;
|
|
11919
11919
|
}
|
|
11920
11920
|
retry();
|
|
11921
11921
|
}
|
|
11922
11922
|
function retry() {
|
|
11923
11923
|
clearTimeout(retryTimer);
|
|
11924
11924
|
retryTimer = void 0;
|
|
11925
|
-
if (fs$
|
|
11926
|
-
var elem = fs$
|
|
11925
|
+
if (fs$16[gracefulQueue].length === 0) return;
|
|
11926
|
+
var elem = fs$16[gracefulQueue].shift();
|
|
11927
11927
|
var fn = elem[0];
|
|
11928
11928
|
var args = elem[1];
|
|
11929
11929
|
var err = elem[2];
|
|
@@ -11942,7 +11942,7 @@ var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11942
11942
|
if (sinceAttempt >= Math.min(sinceStart * 1.2, 100)) {
|
|
11943
11943
|
debug("RETRY", fn.name, args);
|
|
11944
11944
|
fn.apply(null, args.concat([startTime]));
|
|
11945
|
-
} else fs$
|
|
11945
|
+
} else fs$16[gracefulQueue].push(elem);
|
|
11946
11946
|
}
|
|
11947
11947
|
if (retryTimer === void 0) retryTimer = setTimeout(retry, 0);
|
|
11948
11948
|
}
|
|
@@ -12280,7 +12280,7 @@ var require_mtime_precision = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
12280
12280
|
module.exports.getMtime = getMtime;
|
|
12281
12281
|
}));
|
|
12282
12282
|
var require_lockfile = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
12283
|
-
const path$
|
|
12283
|
+
const path$16 = __require("path");
|
|
12284
12284
|
const fs = require_graceful_fs();
|
|
12285
12285
|
const retry = require_retry$3();
|
|
12286
12286
|
const onExit = require_signal_exit();
|
|
@@ -12290,7 +12290,7 @@ var require_lockfile = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
12290
12290
|
return options.lockfilePath || `${file}.lock`;
|
|
12291
12291
|
}
|
|
12292
12292
|
function resolveCanonicalPath(file, options, callback) {
|
|
12293
|
-
if (!options.realpath) return callback(null, path$
|
|
12293
|
+
if (!options.realpath) return callback(null, path$16.resolve(file));
|
|
12294
12294
|
options.fs.realpath(file, callback);
|
|
12295
12295
|
}
|
|
12296
12296
|
function acquireLock(file, options, callback) {
|
|
@@ -14776,7 +14776,7 @@ async function syncDir(dirPath) {
|
|
|
14776
14776
|
*/
|
|
14777
14777
|
function syncFd(fd) {
|
|
14778
14778
|
return new Promise((resolve, reject) => {
|
|
14779
|
-
fs$
|
|
14779
|
+
fs$17.fsync(fd, (err) => {
|
|
14780
14780
|
if (err) {
|
|
14781
14781
|
reject(err);
|
|
14782
14782
|
return;
|
|
@@ -25981,7 +25981,7 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
25981
25981
|
};
|
|
25982
25982
|
return _setPrototypeOf(o, p);
|
|
25983
25983
|
}
|
|
25984
|
-
var path$
|
|
25984
|
+
var path$15 = __require("path");
|
|
25985
25985
|
module.exports = /* @__PURE__ */ function(_EmitterObj) {
|
|
25986
25986
|
_inheritsLoose(Loader, _EmitterObj);
|
|
25987
25987
|
function Loader() {
|
|
@@ -25989,7 +25989,7 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
25989
25989
|
}
|
|
25990
25990
|
var _proto = Loader.prototype;
|
|
25991
25991
|
_proto.resolve = function resolve(from, to) {
|
|
25992
|
-
return path$
|
|
25992
|
+
return path$15.resolve(path$15.dirname(from), to);
|
|
25993
25993
|
};
|
|
25994
25994
|
_proto.isRelative = function isRelative(filename) {
|
|
25995
25995
|
return filename.indexOf("./") === 0 || filename.indexOf("../") === 0;
|
|
@@ -27635,8 +27635,8 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
27635
27635
|
};
|
|
27636
27636
|
return _setPrototypeOf(o, p);
|
|
27637
27637
|
}
|
|
27638
|
-
var fs$
|
|
27639
|
-
var path$
|
|
27638
|
+
var fs$15 = __require("fs");
|
|
27639
|
+
var path$14 = __require("path");
|
|
27640
27640
|
var Loader = require_loader();
|
|
27641
27641
|
var PrecompiledLoader = require_precompiled_loader().PrecompiledLoader;
|
|
27642
27642
|
var chokidar;
|
|
@@ -27651,7 +27651,7 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
27651
27651
|
_this.noCache = !!opts.noCache;
|
|
27652
27652
|
if (searchPaths) {
|
|
27653
27653
|
searchPaths = Array.isArray(searchPaths) ? searchPaths : [searchPaths];
|
|
27654
|
-
_this.searchPaths = searchPaths.map(path$
|
|
27654
|
+
_this.searchPaths = searchPaths.map(path$14.normalize);
|
|
27655
27655
|
} else _this.searchPaths = ["."];
|
|
27656
27656
|
if (opts.watch) {
|
|
27657
27657
|
try {
|
|
@@ -27659,10 +27659,10 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
27659
27659
|
} catch (e) {
|
|
27660
27660
|
throw new Error("watch requires chokidar to be installed");
|
|
27661
27661
|
}
|
|
27662
|
-
var paths = _this.searchPaths.filter(fs$
|
|
27662
|
+
var paths = _this.searchPaths.filter(fs$15.existsSync);
|
|
27663
27663
|
var watcher = chokidar.watch(paths);
|
|
27664
27664
|
watcher.on("all", function(event, fullname) {
|
|
27665
|
-
fullname = path$
|
|
27665
|
+
fullname = path$14.resolve(fullname);
|
|
27666
27666
|
if (event === "change" && fullname in _this.pathsToNames) _this.emit("update", _this.pathsToNames[fullname], fullname);
|
|
27667
27667
|
});
|
|
27668
27668
|
watcher.on("error", function(error) {
|
|
@@ -27676,9 +27676,9 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
27676
27676
|
var fullpath = null;
|
|
27677
27677
|
var paths = this.searchPaths;
|
|
27678
27678
|
for (var i = 0; i < paths.length; i++) {
|
|
27679
|
-
var basePath = path$
|
|
27680
|
-
var p = path$
|
|
27681
|
-
if (p.indexOf(basePath) === 0 && fs$
|
|
27679
|
+
var basePath = path$14.resolve(paths[i]);
|
|
27680
|
+
var p = path$14.resolve(paths[i], name);
|
|
27681
|
+
if (p.indexOf(basePath) === 0 && fs$15.existsSync(p)) {
|
|
27682
27682
|
fullpath = p;
|
|
27683
27683
|
break;
|
|
27684
27684
|
}
|
|
@@ -27686,7 +27686,7 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
27686
27686
|
if (!fullpath) return null;
|
|
27687
27687
|
this.pathsToNames[fullpath] = name;
|
|
27688
27688
|
var source = {
|
|
27689
|
-
src: fs$
|
|
27689
|
+
src: fs$15.readFileSync(fullpath, "utf-8"),
|
|
27690
27690
|
path: fullpath,
|
|
27691
27691
|
noCache: this.noCache
|
|
27692
27692
|
};
|
|
@@ -27734,7 +27734,7 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
27734
27734
|
}
|
|
27735
27735
|
this.pathsToNames[fullpath] = name;
|
|
27736
27736
|
var source = {
|
|
27737
|
-
src: fs$
|
|
27737
|
+
src: fs$15.readFileSync(fullpath, "utf-8"),
|
|
27738
27738
|
path: fullpath,
|
|
27739
27739
|
noCache: this.noCache
|
|
27740
27740
|
};
|
|
@@ -28028,13 +28028,13 @@ var require_globals = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
28028
28028
|
module.exports = globals;
|
|
28029
28029
|
}));
|
|
28030
28030
|
var require_express_app = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
28031
|
-
var path$
|
|
28031
|
+
var path$13 = __require("path");
|
|
28032
28032
|
module.exports = function express(env, app) {
|
|
28033
28033
|
function NunjucksView(name, opts) {
|
|
28034
28034
|
this.name = name;
|
|
28035
28035
|
this.path = name;
|
|
28036
28036
|
this.defaultEngine = opts.defaultEngine;
|
|
28037
|
-
this.ext = path$
|
|
28037
|
+
this.ext = path$13.extname(name);
|
|
28038
28038
|
if (!this.ext && !this.defaultEngine) throw new Error("No default engine was specified and no extension was provided.");
|
|
28039
28039
|
if (!this.ext) this.name += this.ext = (this.defaultEngine[0] !== "." ? "." : "") + this.defaultEngine;
|
|
28040
28040
|
}
|
|
@@ -28464,8 +28464,8 @@ var require_precompile_global = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
28464
28464
|
module.exports = precompileGlobal;
|
|
28465
28465
|
}));
|
|
28466
28466
|
var require_precompile = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
28467
|
-
var fs$
|
|
28468
|
-
var path$
|
|
28467
|
+
var fs$14 = __require("fs");
|
|
28468
|
+
var path$12 = __require("path");
|
|
28469
28469
|
var _prettifyError = require_lib$8()._prettifyError;
|
|
28470
28470
|
var compiler = require_compiler();
|
|
28471
28471
|
var Environment = require_environment().Environment;
|
|
@@ -28489,27 +28489,27 @@ var require_precompile = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
28489
28489
|
var env = opts.env || new Environment([]);
|
|
28490
28490
|
var wrapper = opts.wrapper || precompileGlobal;
|
|
28491
28491
|
if (opts.isString) return precompileString(input, opts);
|
|
28492
|
-
var pathStats = fs$
|
|
28492
|
+
var pathStats = fs$14.existsSync(input) && fs$14.statSync(input);
|
|
28493
28493
|
var precompiled = [];
|
|
28494
28494
|
var templates = [];
|
|
28495
28495
|
function addTemplates(dir) {
|
|
28496
|
-
fs$
|
|
28497
|
-
var filepath = path$
|
|
28498
|
-
var subpath = filepath.substr(path$
|
|
28499
|
-
var stat = fs$
|
|
28496
|
+
fs$14.readdirSync(dir).forEach(function(file) {
|
|
28497
|
+
var filepath = path$12.join(dir, file);
|
|
28498
|
+
var subpath = filepath.substr(path$12.join(input, "/").length);
|
|
28499
|
+
var stat = fs$14.statSync(filepath);
|
|
28500
28500
|
if (stat && stat.isDirectory()) {
|
|
28501
28501
|
subpath += "/";
|
|
28502
28502
|
if (!match(subpath, opts.exclude)) addTemplates(filepath);
|
|
28503
28503
|
} else if (match(subpath, opts.include)) templates.push(filepath);
|
|
28504
28504
|
});
|
|
28505
28505
|
}
|
|
28506
|
-
if (pathStats.isFile()) precompiled.push(_precompile(fs$
|
|
28506
|
+
if (pathStats.isFile()) precompiled.push(_precompile(fs$14.readFileSync(input, "utf-8"), opts.name || input, env));
|
|
28507
28507
|
else if (pathStats.isDirectory()) {
|
|
28508
28508
|
addTemplates(input);
|
|
28509
28509
|
for (var i = 0; i < templates.length; i++) {
|
|
28510
|
-
var name = templates[i].replace(path$
|
|
28510
|
+
var name = templates[i].replace(path$12.join(input, "/"), "");
|
|
28511
28511
|
try {
|
|
28512
|
-
precompiled.push(_precompile(fs$
|
|
28512
|
+
precompiled.push(_precompile(fs$14.readFileSync(templates[i], "utf-8"), name, env));
|
|
28513
28513
|
} catch (e) {
|
|
28514
28514
|
if (opts.force) console.error(e);
|
|
28515
28515
|
else throw e;
|
|
@@ -32301,7 +32301,7 @@ var require_buffer_from = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32301
32301
|
}));
|
|
32302
32302
|
var require_source_map_support = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
32303
32303
|
var SourceMapConsumer = require_source_map().SourceMapConsumer;
|
|
32304
|
-
var path$
|
|
32304
|
+
var path$11 = __require("path");
|
|
32305
32305
|
var fs;
|
|
32306
32306
|
try {
|
|
32307
32307
|
fs = __require("fs");
|
|
@@ -32378,15 +32378,15 @@ var require_source_map_support = /* @__PURE__ */ __commonJSMin(((exports, module
|
|
|
32378
32378
|
});
|
|
32379
32379
|
function supportRelativeURL(file, url) {
|
|
32380
32380
|
if (!file) return url;
|
|
32381
|
-
var dir = path$
|
|
32381
|
+
var dir = path$11.dirname(file);
|
|
32382
32382
|
var match = /^\w+:\/\/[^\/]*/.exec(dir);
|
|
32383
32383
|
var protocol = match ? match[0] : "";
|
|
32384
32384
|
var startPath = dir.slice(protocol.length);
|
|
32385
32385
|
if (protocol && /^\/\w\:/.test(startPath)) {
|
|
32386
32386
|
protocol += "/";
|
|
32387
|
-
return protocol + path$
|
|
32387
|
+
return protocol + path$11.resolve(dir.slice(protocol.length), url).replace(/\\/g, "/");
|
|
32388
32388
|
}
|
|
32389
|
-
return protocol + path$
|
|
32389
|
+
return protocol + path$11.resolve(dir.slice(protocol.length), url);
|
|
32390
32390
|
}
|
|
32391
32391
|
function retrieveSourceMapURL(source) {
|
|
32392
32392
|
var fileData;
|
|
@@ -191013,7 +191013,7 @@ var require_gifframe = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
191013
191013
|
}));
|
|
191014
191014
|
var require_gifutil = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
191015
191015
|
/** @namespace GifUtil */
|
|
191016
|
-
const fs$
|
|
191016
|
+
const fs$13 = __require("fs");
|
|
191017
191017
|
const ImageQ = require_image_q();
|
|
191018
191018
|
const BitmapImage = require_bitmapimage();
|
|
191019
191019
|
const { GifFrame } = require_gifframe();
|
|
@@ -191280,7 +191280,7 @@ var require_gifutil = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
191280
191280
|
}
|
|
191281
191281
|
function _readBinary(path) {
|
|
191282
191282
|
return new Promise((resolve, reject) => {
|
|
191283
|
-
fs$
|
|
191283
|
+
fs$13.readFile(path, (err, buffer) => {
|
|
191284
191284
|
if (err) return reject(err);
|
|
191285
191285
|
return resolve(buffer);
|
|
191286
191286
|
});
|
|
@@ -191288,7 +191288,7 @@ var require_gifutil = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
191288
191288
|
}
|
|
191289
191289
|
function _writeBinary(path, buffer) {
|
|
191290
191290
|
return new Promise((resolve, reject) => {
|
|
191291
|
-
fs$
|
|
191291
|
+
fs$13.writeFile(path, buffer, (err) => {
|
|
191292
191292
|
if (err) return reject(err);
|
|
191293
191293
|
return resolve();
|
|
191294
191294
|
});
|
|
@@ -213442,7 +213442,7 @@ var require_has_flag = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
213442
213442
|
};
|
|
213443
213443
|
}));
|
|
213444
213444
|
var require_supports_color$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
213445
|
-
const os$
|
|
213445
|
+
const os$7 = __require("os");
|
|
213446
213446
|
const tty$4 = __require("tty");
|
|
213447
213447
|
const hasFlag = require_has_flag();
|
|
213448
213448
|
const { env } = process;
|
|
@@ -213478,7 +213478,7 @@ var require_supports_color$1 = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
213478
213478
|
const min = forceColor || 0;
|
|
213479
213479
|
if (env.TERM === "dumb") return min;
|
|
213480
213480
|
if (process.platform === "win32") {
|
|
213481
|
-
const osRelease = os$
|
|
213481
|
+
const osRelease = os$7.release().split(".");
|
|
213482
213482
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
213483
213483
|
return 1;
|
|
213484
213484
|
}
|
|
@@ -258112,7 +258112,7 @@ function Yn(s, t) {
|
|
|
258112
258112
|
function Kn(s, t) {
|
|
258113
258113
|
s.head = new ue$1(t, void 0, s.head, s), s.tail || (s.tail = s.head), s.length++;
|
|
258114
258114
|
}
|
|
258115
|
-
var zr, Ur, Ds, Wr, Gr, Zr, Q$1, J$1, nt$1, De$1, qt, Ne$1, Ns, Ae$1, As, z$1, Mt, g$1, Qt, Bt, b$1, N$1, _$1, bi, Ie$1, L$1, S, _i, Oi, Is, Ti, Z$1, xi, Ce$1, Jt$1, Rt, C, jt, Yr, Kr, Vr, $r, Fe$1, Li, Xr, qr, A$1, Jr, ht, H$1, te, m$1, Ni, tt$1, Ai, ki, vi, ie$1, ke$1, Ut$1, Ht, Ii, Pt, at, U$1, ot, Y$1, zt, Ci, j$1, ee$1, Fi, ve$1, gt$2, Me, bt, _t, Be$1, et$1, Wt$1, jr, Fs, ks, vs, Ms, Bs, tn, se$1, K$1, sn, M$1, rn, zs, nn, Bi, Tt, Gt, Pi, re, Pe$1, ze$1, Ue, He$1, We$1, Ge$1, Ze$1, Ye$1, Ke$1, Us, hn, an, Hs, ln, cn, Ws, Gs, Hi, ne, dn, Ui, oe$1, Ve$1, un, F$1, mn, xt, Wi, pn, lt, En, wn, Sn, ct, yn, Rn, gn, Gi, bn, Lt, ft, On, Tn, xn, f, $e$1, Dt, Nn, Xi, qi, An, B$1, Nt, it, Zi, Zs, V$1, he$1, dt, Ys, p, st$1, ut, Yi, At, w$1, Xe$1, qe$1, Ki, Ks, Vs, ae$1, Vi, Qe$1, Yt$1, $$1, Je$1, It, je$1, ti, $s, In, le$1, $i, Xs, Cn, rt$1, mt, vn, Qi, Mn, Bn, Ct, Ji, zn, qs, ce$1, ei, ji, Un, Hn, ts, Qs, rr, Wn, tr, er, ir, is$2, sr, fe$1, ii, ss, si, rs, ns, os$
|
|
258115
|
+
var zr, Ur, Ds, Wr, Gr, Zr, Q$1, J$1, nt$1, De$1, qt, Ne$1, Ns, Ae$1, As, z$1, Mt, g$1, Qt, Bt, b$1, N$1, _$1, bi, Ie$1, L$1, S, _i, Oi, Is, Ti, Z$1, xi, Ce$1, Jt$1, Rt, C, jt, Yr, Kr, Vr, $r, Fe$1, Li, Xr, qr, A$1, Jr, ht, H$1, te, m$1, Ni, tt$1, Ai, ki, vi, ie$1, ke$1, Ut$1, Ht, Ii, Pt, at, U$1, ot, Y$1, zt, Ci, j$1, ee$1, Fi, ve$1, gt$2, Me, bt, _t, Be$1, et$1, Wt$1, jr, Fs, ks, vs, Ms, Bs, tn, se$1, K$1, sn, M$1, rn, zs, nn, Bi, Tt, Gt, Pi, re, Pe$1, ze$1, Ue, He$1, We$1, Ge$1, Ze$1, Ye$1, Ke$1, Us, hn, an, Hs, ln, cn, Ws, Gs, Hi, ne, dn, Ui, oe$1, Ve$1, un, F$1, mn, xt, Wi, pn, lt, En, wn, Sn, ct, yn, Rn, gn, Gi, bn, Lt, ft, On, Tn, xn, f, $e$1, Dt, Nn, Xi, qi, An, B$1, Nt, it, Zi, Zs, V$1, he$1, dt, Ys, p, st$1, ut, Yi, At, w$1, Xe$1, qe$1, Ki, Ks, Vs, ae$1, Vi, Qe$1, Yt$1, $$1, Je$1, It, je$1, ti, $s, In, le$1, $i, Xs, Cn, rt$1, mt, vn, Qi, Mn, Bn, Ct, Ji, zn, qs, ce$1, ei, ji, Un, Hn, ts, Qs, rr, Wn, tr, er, ir, is$2, sr, fe$1, ii, ss, si, rs, ns, os$6, hs, pt, ri, as, es, q$1, de$1, ni, oi, Gn, hi, ue$1, pi, nr, li, me$1, W$1, pe$2, Et, Ft$1, Ee$1, ai, G, ls, ci, or, ds, us, fi, di, hr, cs, ui, lr, fs$12, wt, kt, Vn, $n, fr, dr, Xn, qn, Er, wr, ur, Sr, yr, Rr, jn, to, eo, mr, ms, ps, Ei, io, Es, so, ws, Se$1, St, no, gr, Ss, br, oo, _r, ys, Or, Vt$1, Tr, ao, lo, yi, Lr, Dr, _s, Nr, Os, P$1, Ts, xs, gi, Ar, Ir, Re, Cr, Fr, Rs, yt, O$1, Ri, kr, $t, gs, bs, Ls, ge$1, be, _e$1, Oe$1, Te$1, uo, mo, po, vr, Xt$1, ye$1, xe$1, Eo, wo, So, yo, Ro, go, bo, _o, vt, To;
|
|
258116
258116
|
var init_index_min = __esmMin((() => {
|
|
258117
258117
|
zr = Object.defineProperty;
|
|
258118
258118
|
Ur = (s, t) => {
|
|
@@ -259601,7 +259601,7 @@ while (this[Zs](this[st$1].shift()));
|
|
|
259601
259601
|
"?",
|
|
259602
259602
|
":"
|
|
259603
259603
|
], ji = ei.map((s) => String.fromCodePoint(61440 + Number(s.codePointAt(0)))), Un = new Map(ei.map((s, t) => [s, ji[t]])), Hn = new Map(ji.map((s, t) => [s, ei[t]])), ts = (s) => ei.reduce((t, e) => t.split(e).join(Un.get(e)), s), Qs = (s) => ji.reduce((t, e) => t.split(e).join(Hn.get(e)), s);
|
|
259604
|
-
rr = (s, t) => t ? (s = f(s).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s) : f(s), Wn = 16 * 1024 * 1024, tr = Symbol("process"), er = Symbol("file"), ir = Symbol("directory"), is$2 = Symbol("symlink"), sr = Symbol("hardlink"), fe$1 = Symbol("header"), ii = Symbol("read"), ss = Symbol("lstat"), si = Symbol("onlstat"), rs = Symbol("onread"), ns = Symbol("onreadlink"), os$
|
|
259604
|
+
rr = (s, t) => t ? (s = f(s).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s) : f(s), Wn = 16 * 1024 * 1024, tr = Symbol("process"), er = Symbol("file"), ir = Symbol("directory"), is$2 = Symbol("symlink"), sr = Symbol("hardlink"), fe$1 = Symbol("header"), ii = Symbol("read"), ss = Symbol("lstat"), si = Symbol("onlstat"), rs = Symbol("onread"), ns = Symbol("onreadlink"), os$6 = Symbol("openfile"), hs = Symbol("onopenfile"), pt = Symbol("close"), ri = Symbol("mode"), as = Symbol("awaitDrain"), es = Symbol("ondrain"), q$1 = Symbol("prefix"), de$1 = class extends A$1 {
|
|
259605
259605
|
path;
|
|
259606
259606
|
portable;
|
|
259607
259607
|
myuid = process.getuid && process.getuid() || 0;
|
|
@@ -259733,9 +259733,9 @@ while (this[Zs](this[st$1].shift()));
|
|
|
259733
259733
|
this.linkCache.set(t, this.absolute);
|
|
259734
259734
|
}
|
|
259735
259735
|
if (this[fe$1](), this.stat.size === 0) return this.end();
|
|
259736
|
-
this[os$
|
|
259736
|
+
this[os$6]();
|
|
259737
259737
|
}
|
|
259738
|
-
[os$
|
|
259738
|
+
[os$6]() {
|
|
259739
259739
|
I.open(this.absolute, "r", (t, e) => {
|
|
259740
259740
|
if (t) return this.emit("error", t);
|
|
259741
259741
|
this[hs](e);
|
|
@@ -259804,7 +259804,7 @@ while (this[Zs](this[st$1].shift()));
|
|
|
259804
259804
|
[is$2]() {
|
|
259805
259805
|
this[ns](I.readlinkSync(this.absolute));
|
|
259806
259806
|
}
|
|
259807
|
-
[os$
|
|
259807
|
+
[os$6]() {
|
|
259808
259808
|
this[hs](I.openSync(this.absolute, "r"));
|
|
259809
259809
|
}
|
|
259810
259810
|
[ii]() {
|
|
@@ -260082,7 +260082,7 @@ while (this[Zs](this[st$1].shift()));
|
|
|
260082
260082
|
constructor(t, e) {
|
|
260083
260083
|
this.path = t || "./", this.absolute = e;
|
|
260084
260084
|
}
|
|
260085
|
-
}, nr = Buffer.alloc(1024), li = Symbol("onStat"), me$1 = Symbol("ended"), W$1 = Symbol("queue"), pe$2 = Symbol("pendingLinks"), Et = Symbol("current"), Ft$1 = Symbol("process"), Ee$1 = Symbol("processing"), ai = Symbol("processJob"), G = Symbol("jobs"), ls = Symbol("jobDone"), ci = Symbol("addFSEntry"), or = Symbol("addTarEntry"), ds = Symbol("stat"), us = Symbol("readdir"), fi = Symbol("onreaddir"), di = Symbol("pipe"), hr = Symbol("entry"), cs = Symbol("entryOpt"), ui = Symbol("writeEntryClass"), lr = Symbol("write"), fs$
|
|
260085
|
+
}, nr = Buffer.alloc(1024), li = Symbol("onStat"), me$1 = Symbol("ended"), W$1 = Symbol("queue"), pe$2 = Symbol("pendingLinks"), Et = Symbol("current"), Ft$1 = Symbol("process"), Ee$1 = Symbol("processing"), ai = Symbol("processJob"), G = Symbol("jobs"), ls = Symbol("jobDone"), ci = Symbol("addFSEntry"), or = Symbol("addTarEntry"), ds = Symbol("stat"), us = Symbol("readdir"), fi = Symbol("onreaddir"), di = Symbol("pipe"), hr = Symbol("entry"), cs = Symbol("entryOpt"), ui = Symbol("writeEntryClass"), lr = Symbol("write"), fs$12 = Symbol("ondrain"), wt = class extends A$1 {
|
|
260086
260086
|
sync = !1;
|
|
260087
260087
|
opt;
|
|
260088
260088
|
cwd;
|
|
@@ -260115,8 +260115,8 @@ while (this[Zs](this[st$1].shift()));
|
|
|
260115
260115
|
if ((t.gzip ? 1 : 0) + (t.brotli ? 1 : 0) + (t.zstd ? 1 : 0) > 1) throw new TypeError("gzip, brotli, zstd are mutually exclusive");
|
|
260116
260116
|
if (t.gzip && (typeof t.gzip != "object" && (t.gzip = {}), this.portable && (t.gzip.portable = !0), this.zip = new ze$1(t.gzip)), t.brotli && (typeof t.brotli != "object" && (t.brotli = {}), this.zip = new We$1(t.brotli)), t.zstd && (typeof t.zstd != "object" && (t.zstd = {}), this.zip = new Ye$1(t.zstd)), !this.zip) throw new Error("impossible");
|
|
260117
260117
|
let e = this.zip;
|
|
260118
|
-
e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[fs$
|
|
260119
|
-
} else this.on("drain", this[fs$
|
|
260118
|
+
e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[fs$12]()), this.on("resume", () => e.resume());
|
|
260119
|
+
} else this.on("drain", this[fs$12]);
|
|
260120
260120
|
this.noDirRecurse = !!t.noDirRecurse, this.follow = !!t.follow, this.noMtime = !!t.noMtime, t.mtime && (this.mtime = t.mtime), this.filter = typeof t.filter == "function" ? t.filter : () => !0, this[W$1] = new hi(), this[G] = 0, this.jobs = Number(t.jobs) || 4, this[Ee$1] = !1, this[me$1] = !1;
|
|
260121
260121
|
}
|
|
260122
260122
|
[lr](t) {
|
|
@@ -260243,7 +260243,7 @@ while (this[Zs](this[st$1].shift()));
|
|
|
260243
260243
|
this.emit("error", e);
|
|
260244
260244
|
}
|
|
260245
260245
|
}
|
|
260246
|
-
[fs$
|
|
260246
|
+
[fs$12]() {
|
|
260247
260247
|
this[Et] && this[Et].entry && this[Et].entry.resume();
|
|
260248
260248
|
}
|
|
260249
260249
|
[di](t) {
|
|
@@ -261164,7 +261164,7 @@ var require_pend = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
261164
261164
|
}
|
|
261165
261165
|
}));
|
|
261166
261166
|
var require_fd_slicer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
261167
|
-
var fs$
|
|
261167
|
+
var fs$11 = __require("fs");
|
|
261168
261168
|
var util$6 = __require("util");
|
|
261169
261169
|
var stream$2 = __require("stream");
|
|
261170
261170
|
var Readable = stream$2.Readable;
|
|
@@ -261189,7 +261189,7 @@ var require_fd_slicer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
261189
261189
|
FdSlicer.prototype.read = function(buffer, offset, length, position, callback) {
|
|
261190
261190
|
var self = this;
|
|
261191
261191
|
self.pend.go(function(cb) {
|
|
261192
|
-
fs$
|
|
261192
|
+
fs$11.read(self.fd, buffer, offset, length, position, function(err, bytesRead, buffer) {
|
|
261193
261193
|
cb();
|
|
261194
261194
|
callback(err, bytesRead, buffer);
|
|
261195
261195
|
});
|
|
@@ -261198,7 +261198,7 @@ var require_fd_slicer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
261198
261198
|
FdSlicer.prototype.write = function(buffer, offset, length, position, callback) {
|
|
261199
261199
|
var self = this;
|
|
261200
261200
|
self.pend.go(function(cb) {
|
|
261201
|
-
fs$
|
|
261201
|
+
fs$11.write(self.fd, buffer, offset, length, position, function(err, written, buffer) {
|
|
261202
261202
|
cb();
|
|
261203
261203
|
callback(err, written, buffer);
|
|
261204
261204
|
});
|
|
@@ -261218,7 +261218,7 @@ var require_fd_slicer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
261218
261218
|
self.refCount -= 1;
|
|
261219
261219
|
if (self.refCount > 0) return;
|
|
261220
261220
|
if (self.refCount < 0) throw new Error("invalid unref");
|
|
261221
|
-
if (self.autoClose) fs$
|
|
261221
|
+
if (self.autoClose) fs$11.close(self.fd, onCloseDone);
|
|
261222
261222
|
function onCloseDone(err) {
|
|
261223
261223
|
if (err) self.emit("error", err);
|
|
261224
261224
|
else self.emit("close");
|
|
@@ -261249,7 +261249,7 @@ var require_fd_slicer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
261249
261249
|
self.context.pend.go(function(cb) {
|
|
261250
261250
|
if (self.destroyed) return cb();
|
|
261251
261251
|
var buffer = Buffer.allocUnsafe(toRead);
|
|
261252
|
-
fs$
|
|
261252
|
+
fs$11.read(self.context.fd, buffer, 0, toRead, self.pos, function(err, bytesRead) {
|
|
261253
261253
|
if (err) self.destroy(err);
|
|
261254
261254
|
else if (bytesRead === 0) {
|
|
261255
261255
|
self.destroyed = true;
|
|
@@ -261295,7 +261295,7 @@ var require_fd_slicer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
261295
261295
|
}
|
|
261296
261296
|
self.context.pend.go(function(cb) {
|
|
261297
261297
|
if (self.destroyed) return cb();
|
|
261298
|
-
fs$
|
|
261298
|
+
fs$11.write(self.context.fd, buffer, 0, buffer.length, self.pos, function(err, bytes) {
|
|
261299
261299
|
if (err) {
|
|
261300
261300
|
self.destroy();
|
|
261301
261301
|
cb();
|
|
@@ -300215,7 +300215,7 @@ var init_proxy = __esmMin((() => {
|
|
|
300215
300215
|
var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
300216
300216
|
module.exports = isexe;
|
|
300217
300217
|
isexe.sync = sync;
|
|
300218
|
-
var fs$
|
|
300218
|
+
var fs$9 = __require("fs");
|
|
300219
300219
|
function checkPathExt(path, options) {
|
|
300220
300220
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
300221
300221
|
if (!pathext) return true;
|
|
@@ -300232,25 +300232,25 @@ var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
300232
300232
|
return checkPathExt(path, options);
|
|
300233
300233
|
}
|
|
300234
300234
|
function isexe(path, options, cb) {
|
|
300235
|
-
fs$
|
|
300235
|
+
fs$9.stat(path, function(er, stat) {
|
|
300236
300236
|
cb(er, er ? false : checkStat(stat, path, options));
|
|
300237
300237
|
});
|
|
300238
300238
|
}
|
|
300239
300239
|
function sync(path, options) {
|
|
300240
|
-
return checkStat(fs$
|
|
300240
|
+
return checkStat(fs$9.statSync(path), path, options);
|
|
300241
300241
|
}
|
|
300242
300242
|
}));
|
|
300243
300243
|
var require_mode = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
300244
300244
|
module.exports = isexe;
|
|
300245
300245
|
isexe.sync = sync;
|
|
300246
|
-
var fs$
|
|
300246
|
+
var fs$8 = __require("fs");
|
|
300247
300247
|
function isexe(path, options, cb) {
|
|
300248
|
-
fs$
|
|
300248
|
+
fs$8.stat(path, function(er, stat) {
|
|
300249
300249
|
cb(er, er ? false : checkStat(stat, options));
|
|
300250
300250
|
});
|
|
300251
300251
|
}
|
|
300252
300252
|
function sync(path, options) {
|
|
300253
|
-
return checkStat(fs$
|
|
300253
|
+
return checkStat(fs$8.statSync(path), options);
|
|
300254
300254
|
}
|
|
300255
300255
|
function checkStat(stat, options) {
|
|
300256
300256
|
return stat.isFile() && checkMode(stat, options);
|
|
@@ -300310,7 +300310,7 @@ var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
300310
300310
|
}));
|
|
300311
300311
|
var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
300312
300312
|
const isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
300313
|
-
const path$
|
|
300313
|
+
const path$10 = __require("path");
|
|
300314
300314
|
const COLON = isWindows ? ";" : ":";
|
|
300315
300315
|
const isexe = require_isexe();
|
|
300316
300316
|
const getNotFoundError = (cmd) => Object.assign(/* @__PURE__ */ new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
@@ -300340,7 +300340,7 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
300340
300340
|
if (i === pathEnv.length) return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd));
|
|
300341
300341
|
const ppRaw = pathEnv[i];
|
|
300342
300342
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
300343
|
-
const pCmd = path$
|
|
300343
|
+
const pCmd = path$10.join(pathPart, cmd);
|
|
300344
300344
|
resolve(subStep(!pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd, i, 0));
|
|
300345
300345
|
});
|
|
300346
300346
|
const subStep = (p, i, ii) => new Promise((resolve, reject) => {
|
|
@@ -300361,7 +300361,7 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
300361
300361
|
for (let i = 0; i < pathEnv.length; i++) {
|
|
300362
300362
|
const ppRaw = pathEnv[i];
|
|
300363
300363
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
300364
|
-
const pCmd = path$
|
|
300364
|
+
const pCmd = path$10.join(pathPart, cmd);
|
|
300365
300365
|
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
300366
300366
|
for (let j = 0; j < pathExt.length; j++) {
|
|
300367
300367
|
const cur = p + pathExt[j];
|
|
@@ -300388,7 +300388,7 @@ var require_path_key = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
300388
300388
|
module.exports.default = pathKey;
|
|
300389
300389
|
}));
|
|
300390
300390
|
var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
300391
|
-
const path$
|
|
300391
|
+
const path$9 = __require("path");
|
|
300392
300392
|
const which = require_which();
|
|
300393
300393
|
const getPathKey = require_path_key();
|
|
300394
300394
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
@@ -300403,12 +300403,12 @@ var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
300403
300403
|
try {
|
|
300404
300404
|
resolved = which.sync(parsed.command, {
|
|
300405
300405
|
path: env[getPathKey({ env })],
|
|
300406
|
-
pathExt: withoutPathExt ? path$
|
|
300406
|
+
pathExt: withoutPathExt ? path$9.delimiter : void 0
|
|
300407
300407
|
});
|
|
300408
300408
|
} catch (e) {} finally {
|
|
300409
300409
|
if (shouldSwitchCwd) process.chdir(cwd);
|
|
300410
300410
|
}
|
|
300411
|
-
if (resolved) resolved = path$
|
|
300411
|
+
if (resolved) resolved = path$9.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
300412
300412
|
return resolved;
|
|
300413
300413
|
}
|
|
300414
300414
|
function resolveCommand(parsed) {
|
|
@@ -300449,23 +300449,23 @@ var require_shebang_command = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
300449
300449
|
};
|
|
300450
300450
|
}));
|
|
300451
300451
|
var require_readShebang = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
300452
|
-
const fs$
|
|
300452
|
+
const fs$7 = __require("fs");
|
|
300453
300453
|
const shebangCommand = require_shebang_command();
|
|
300454
300454
|
function readShebang(command) {
|
|
300455
300455
|
const size = 150;
|
|
300456
300456
|
const buffer = Buffer.alloc(size);
|
|
300457
300457
|
let fd;
|
|
300458
300458
|
try {
|
|
300459
|
-
fd = fs$
|
|
300460
|
-
fs$
|
|
300461
|
-
fs$
|
|
300459
|
+
fd = fs$7.openSync(command, "r");
|
|
300460
|
+
fs$7.readSync(fd, buffer, 0, size, 0);
|
|
300461
|
+
fs$7.closeSync(fd);
|
|
300462
300462
|
} catch (e) {}
|
|
300463
300463
|
return shebangCommand(buffer.toString());
|
|
300464
300464
|
}
|
|
300465
300465
|
module.exports = readShebang;
|
|
300466
300466
|
}));
|
|
300467
300467
|
var require_parse$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
300468
|
-
const path$
|
|
300468
|
+
const path$8 = __require("path");
|
|
300469
300469
|
const resolveCommand = require_resolveCommand();
|
|
300470
300470
|
const escape = require_escape();
|
|
300471
300471
|
const readShebang = require_readShebang();
|
|
@@ -300488,7 +300488,7 @@ var require_parse$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
300488
300488
|
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
300489
300489
|
if (parsed.options.forceShell || needsShell) {
|
|
300490
300490
|
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
300491
|
-
parsed.command = path$
|
|
300491
|
+
parsed.command = path$8.normalize(parsed.command);
|
|
300492
300492
|
parsed.command = escape.command(parsed.command);
|
|
300493
300493
|
parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
|
|
300494
300494
|
parsed.args = [
|
|
@@ -334121,14 +334121,14 @@ async function readGitExecPath(deps, gitExe) {
|
|
|
334121
334121
|
}
|
|
334122
334122
|
}
|
|
334123
334123
|
function gitBashCandidatesFromGitExe(gitExe) {
|
|
334124
|
-
const normalizedGitExe = path$
|
|
334125
|
-
const gitDir = path$
|
|
334126
|
-
const gitDirName = path$
|
|
334124
|
+
const normalizedGitExe = path$17.win32.normalize(normalizeWindowsPath(gitExe));
|
|
334125
|
+
const gitDir = path$17.win32.dirname(normalizedGitExe);
|
|
334126
|
+
const gitDirName = path$17.win32.basename(gitDir).toLowerCase();
|
|
334127
334127
|
if (gitDirName !== "cmd" && gitDirName !== "bin") return;
|
|
334128
|
-
return gitBashCandidatesFromGitRoot(path$
|
|
334128
|
+
return gitBashCandidatesFromGitRoot(path$17.win32.dirname(gitDir));
|
|
334129
334129
|
}
|
|
334130
334130
|
function gitBashCandidatesFromGitExecPath(execPath) {
|
|
334131
|
-
const normalized = path$
|
|
334131
|
+
const normalized = path$17.win32.normalize(normalizeWindowsPath(execPath));
|
|
334132
334132
|
const parts = normalized.split("\\");
|
|
334133
334133
|
for (let i = parts.length - 1; i >= 0; i -= 1) {
|
|
334134
334134
|
const segment = parts[i]?.toLowerCase();
|
|
@@ -334137,16 +334137,16 @@ function gitBashCandidatesFromGitExecPath(execPath) {
|
|
|
334137
334137
|
if (root.length > 0) return gitBashCandidatesFromGitRoot(root);
|
|
334138
334138
|
}
|
|
334139
334139
|
}
|
|
334140
|
-
return gitBashCandidatesFromGitRoot(path$
|
|
334140
|
+
return gitBashCandidatesFromGitRoot(path$17.win32.join(normalized, "..", ".."));
|
|
334141
334141
|
}
|
|
334142
334142
|
function gitBashCandidatesFromGitRoot(root) {
|
|
334143
|
-
return [path$
|
|
334143
|
+
return [path$17.win32.normalize(path$17.win32.join(root, "bin", "bash.exe")), path$17.win32.normalize(path$17.win32.join(root, "usr", "bin", "bash.exe"))];
|
|
334144
334144
|
}
|
|
334145
334145
|
function normalizeWindowsPath(path) {
|
|
334146
334146
|
return path.replaceAll("/", "\\");
|
|
334147
334147
|
}
|
|
334148
334148
|
function isAbsoluteWindowsPath(path) {
|
|
334149
|
-
return path$
|
|
334149
|
+
return path$17.win32.isAbsolute(normalizeWindowsPath(path));
|
|
334150
334150
|
}
|
|
334151
334151
|
function dedupeWindowsPaths(paths) {
|
|
334152
334152
|
const deduped = [];
|
|
@@ -335537,7 +335537,7 @@ var require_dist$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
335537
335537
|
module.exports = /* @__PURE__ */ getDefaultExportFromCjs(crc32);
|
|
335538
335538
|
}));
|
|
335539
335539
|
var require_yazl = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
335540
|
-
var fs$
|
|
335540
|
+
var fs$6 = __require("fs");
|
|
335541
335541
|
var Transform$2 = __require("stream").Transform;
|
|
335542
335542
|
var PassThrough$2 = __require("stream").PassThrough;
|
|
335543
335543
|
var zlib$1 = __require("zlib");
|
|
@@ -335566,14 +335566,14 @@ var require_yazl = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
335566
335566
|
if (shouldIgnoreAdding(self)) return;
|
|
335567
335567
|
var entry = new Entry(metadataPath, false, options);
|
|
335568
335568
|
self.entries.push(entry);
|
|
335569
|
-
fs$
|
|
335569
|
+
fs$6.stat(realPath, function(err, stats) {
|
|
335570
335570
|
if (err) return self.emit("error", err);
|
|
335571
335571
|
if (!stats.isFile()) return self.emit("error", /* @__PURE__ */ new Error("not a file: " + realPath));
|
|
335572
335572
|
entry.uncompressedSize = stats.size;
|
|
335573
335573
|
if (options.mtime == null) entry.setLastModDate(stats.mtime);
|
|
335574
335574
|
if (options.mode == null) entry.setFileAttributesMode(stats.mode);
|
|
335575
335575
|
entry.setFileDataPumpFunction(function() {
|
|
335576
|
-
var readStream = fs$
|
|
335576
|
+
var readStream = fs$6.createReadStream(realPath);
|
|
335577
335577
|
entry.state = Entry.FILE_DATA_IN_PROGRESS;
|
|
335578
335578
|
readStream.on("error", function(err) {
|
|
335579
335579
|
self.emit("error", err);
|
|
@@ -357836,8 +357836,8 @@ var require_suggestSimilar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
357836
357836
|
var require_command = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
357837
357837
|
const EventEmitter$12 = __require("node:events").EventEmitter;
|
|
357838
357838
|
const childProcess = __require("node:child_process");
|
|
357839
|
-
const path$
|
|
357840
|
-
const fs$
|
|
357839
|
+
const path$7 = __require("node:path");
|
|
357840
|
+
const fs$5 = __require("node:fs");
|
|
357841
357841
|
const process$2 = __require("node:process");
|
|
357842
357842
|
const { Argument, humanReadableArgName } = require_argument();
|
|
357843
357843
|
const { CommanderError } = require_error$2();
|
|
@@ -358720,7 +358720,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
358720
358720
|
* @param {string} subcommandName
|
|
358721
358721
|
*/
|
|
358722
358722
|
_checkForMissingExecutable(executableFile, executableDir, subcommandName) {
|
|
358723
|
-
if (fs$
|
|
358723
|
+
if (fs$5.existsSync(executableFile)) return;
|
|
358724
358724
|
const executableMissing = `'${executableFile}' does not exist
|
|
358725
358725
|
- if '${subcommandName}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
358726
358726
|
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
@@ -358743,10 +358743,10 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
358743
358743
|
".cjs"
|
|
358744
358744
|
];
|
|
358745
358745
|
function findFile(baseDir, baseName) {
|
|
358746
|
-
const localBin = path$
|
|
358747
|
-
if (fs$
|
|
358748
|
-
if (sourceExt.includes(path$
|
|
358749
|
-
const foundExt = sourceExt.find((ext) => fs$
|
|
358746
|
+
const localBin = path$7.resolve(baseDir, baseName);
|
|
358747
|
+
if (fs$5.existsSync(localBin)) return localBin;
|
|
358748
|
+
if (sourceExt.includes(path$7.extname(baseName))) return void 0;
|
|
358749
|
+
const foundExt = sourceExt.find((ext) => fs$5.existsSync(`${localBin}${ext}`));
|
|
358750
358750
|
if (foundExt) return `${localBin}${foundExt}`;
|
|
358751
358751
|
}
|
|
358752
358752
|
this._checkForMissingMandatoryOptions();
|
|
@@ -358756,21 +358756,21 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
358756
358756
|
if (this._scriptPath) {
|
|
358757
358757
|
let resolvedScriptPath;
|
|
358758
358758
|
try {
|
|
358759
|
-
resolvedScriptPath = fs$
|
|
358759
|
+
resolvedScriptPath = fs$5.realpathSync(this._scriptPath);
|
|
358760
358760
|
} catch {
|
|
358761
358761
|
resolvedScriptPath = this._scriptPath;
|
|
358762
358762
|
}
|
|
358763
|
-
executableDir = path$
|
|
358763
|
+
executableDir = path$7.resolve(path$7.dirname(resolvedScriptPath), executableDir);
|
|
358764
358764
|
}
|
|
358765
358765
|
if (executableDir) {
|
|
358766
358766
|
let localFile = findFile(executableDir, executableFile);
|
|
358767
358767
|
if (!localFile && !subcommand._executableFile && this._scriptPath) {
|
|
358768
|
-
const legacyName = path$
|
|
358768
|
+
const legacyName = path$7.basename(this._scriptPath, path$7.extname(this._scriptPath));
|
|
358769
358769
|
if (legacyName !== this._name) localFile = findFile(executableDir, `${legacyName}-${subcommand._name}`);
|
|
358770
358770
|
}
|
|
358771
358771
|
executableFile = localFile || executableFile;
|
|
358772
358772
|
}
|
|
358773
|
-
launchWithNode = sourceExt.includes(path$
|
|
358773
|
+
launchWithNode = sourceExt.includes(path$7.extname(executableFile));
|
|
358774
358774
|
let proc;
|
|
358775
358775
|
if (process$2.platform !== "win32") if (launchWithNode) {
|
|
358776
358776
|
args.unshift(executableFile);
|
|
@@ -359474,7 +359474,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
359474
359474
|
* @return {Command}
|
|
359475
359475
|
*/
|
|
359476
359476
|
nameFromFilename(filename) {
|
|
359477
|
-
this._name = path$
|
|
359477
|
+
this._name = path$7.basename(filename, path$7.extname(filename));
|
|
359478
359478
|
return this;
|
|
359479
359479
|
}
|
|
359480
359480
|
/**
|
|
@@ -368248,7 +368248,7 @@ function optionalBuildString(value) {
|
|
|
368248
368248
|
var BLUN_BUILD_INFO;
|
|
368249
368249
|
var init_build_info = __esmMin((() => {
|
|
368250
368250
|
BLUN_BUILD_INFO = {
|
|
368251
|
-
version: optionalBuildString("9.1.
|
|
368251
|
+
version: optionalBuildString("9.1.628-pruefpaket.modules.r8"),
|
|
368252
368252
|
channel: typeof __BLUN_CHANNEL__ === "string" ? optionalBuildString(__BLUN_CHANNEL__) : void 0,
|
|
368253
368253
|
commit: typeof __BLUN_COMMIT__ === "string" ? optionalBuildString(__BLUN_COMMIT__) : void 0,
|
|
368254
368254
|
buildTarget: typeof __BLUN_BUILD_TARGET__ === "string" ? optionalBuildString(__BLUN_BUILD_TARGET__) : void 0
|
|
@@ -375146,9 +375146,9 @@ var init_tui$1 = __esmMin((() => {
|
|
|
375146
375146
|
const debugRedraw = process.env["PI_DEBUG_REDRAW"] === "1";
|
|
375147
375147
|
const logRedraw = (reason) => {
|
|
375148
375148
|
if (!debugRedraw) return;
|
|
375149
|
-
const logPath = path$
|
|
375149
|
+
const logPath = path$17.join(nodeOs.homedir(), ".pi", "agent", "pi-debug.log");
|
|
375150
375150
|
const msg = `[${(/* @__PURE__ */ new Date()).toISOString()}] fullRender: ${reason} (prev=${this.previousLines.length}, new=${newLines.length}, height=${height})\n`;
|
|
375151
|
-
fs$
|
|
375151
|
+
fs$17.appendFileSync(logPath, msg);
|
|
375152
375152
|
};
|
|
375153
375153
|
if (this.previousLines.length === 0 && !widthChanged && !heightChanged) {
|
|
375154
375154
|
logRedraw("first render");
|
|
@@ -375295,8 +375295,8 @@ var init_tui$1 = __esmMin((() => {
|
|
|
375295
375295
|
buffer += "\x1B[?2026l";
|
|
375296
375296
|
if (process.env["PI_TUI_DEBUG"] === "1") {
|
|
375297
375297
|
const debugDir = "/tmp/tui";
|
|
375298
|
-
fs$
|
|
375299
|
-
const debugPath = path$
|
|
375298
|
+
fs$17.mkdirSync(debugDir, { recursive: true });
|
|
375299
|
+
const debugPath = path$17.join(debugDir, `render-${Date.now()}-${Math.random().toString(36).slice(2)}.log`);
|
|
375300
375300
|
const debugData = [
|
|
375301
375301
|
`firstChanged: ${firstChanged}`,
|
|
375302
375302
|
`viewportTop: ${viewportTop}`,
|
|
@@ -375319,7 +375319,7 @@ var init_tui$1 = __esmMin((() => {
|
|
|
375319
375319
|
"=== buffer ===",
|
|
375320
375320
|
JSON.stringify(buffer)
|
|
375321
375321
|
].join("\n");
|
|
375322
|
-
fs$
|
|
375322
|
+
fs$17.writeFileSync(debugPath, debugData);
|
|
375323
375323
|
}
|
|
375324
375324
|
this.terminal.write(buffer);
|
|
375325
375325
|
this.cursorRow = Math.max(0, newLines.length - 1);
|
|
@@ -379933,12 +379933,12 @@ function loadNativeModifiersHelper() {
|
|
|
379933
379933
|
if (process.platform !== "darwin") return void 0;
|
|
379934
379934
|
const arch = process.arch;
|
|
379935
379935
|
if (arch !== "x64" && arch !== "arm64") return void 0;
|
|
379936
|
-
const moduleDir = path$
|
|
379937
|
-
const nativePath = path$
|
|
379936
|
+
const moduleDir = path$17.dirname(fileURLToPath(import.meta.url));
|
|
379937
|
+
const nativePath = path$17.join("native", "darwin", "prebuilds", `darwin-${arch}`, "darwin-modifiers.node");
|
|
379938
379938
|
const candidates = [
|
|
379939
|
-
path$
|
|
379940
|
-
path$
|
|
379941
|
-
path$
|
|
379939
|
+
path$17.join(moduleDir, "..", nativePath),
|
|
379940
|
+
path$17.join(moduleDir, nativePath),
|
|
379941
|
+
path$17.join(path$17.dirname(process.execPath), nativePath)
|
|
379942
379942
|
];
|
|
379943
379943
|
for (const modulePath of candidates) try {
|
|
379944
379944
|
const helper = cjsRequire$1(modulePath);
|
|
@@ -380015,10 +380015,10 @@ var init_terminal$2 = __esmMin((() => {
|
|
|
380015
380015
|
const env = process.env["PI_TUI_WRITE_LOG"] || "";
|
|
380016
380016
|
if (!env) return "";
|
|
380017
380017
|
try {
|
|
380018
|
-
if (fs$
|
|
380018
|
+
if (fs$17.statSync(env).isDirectory()) {
|
|
380019
380019
|
const now = /* @__PURE__ */ new Date();
|
|
380020
380020
|
const ts = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, "0")}-${String(now.getDate()).padStart(2, "0")}_${String(now.getHours()).padStart(2, "0")}-${String(now.getMinutes()).padStart(2, "0")}-${String(now.getSeconds()).padStart(2, "0")}`;
|
|
380021
|
-
return path$
|
|
380021
|
+
return path$17.join(env, `tui-${ts}-${process.pid}.log`);
|
|
380022
380022
|
}
|
|
380023
380023
|
} catch {}
|
|
380024
380024
|
return env;
|
|
@@ -380221,12 +380221,12 @@ var init_terminal$2 = __esmMin((() => {
|
|
|
380221
380221
|
try {
|
|
380222
380222
|
const arch = process.arch;
|
|
380223
380223
|
if (arch !== "x64" && arch !== "arm64") return;
|
|
380224
|
-
const moduleDir = path$
|
|
380225
|
-
const nativePath = path$
|
|
380224
|
+
const moduleDir = path$17.dirname(fileURLToPath(import.meta.url));
|
|
380225
|
+
const nativePath = path$17.join("native", "win32", "prebuilds", `win32-${arch}`, "win32-console-mode.node");
|
|
380226
380226
|
const candidates = [
|
|
380227
|
-
path$
|
|
380228
|
-
path$
|
|
380229
|
-
path$
|
|
380227
|
+
path$17.join(moduleDir, "..", nativePath),
|
|
380228
|
+
path$17.join(moduleDir, nativePath),
|
|
380229
|
+
path$17.join(path$17.dirname(process.execPath), nativePath)
|
|
380230
380230
|
];
|
|
380231
380231
|
for (const modulePath of candidates) try {
|
|
380232
380232
|
cjsRequire(modulePath).enableVirtualTerminalInput?.();
|
|
@@ -380298,7 +380298,7 @@ var init_terminal$2 = __esmMin((() => {
|
|
|
380298
380298
|
write(data) {
|
|
380299
380299
|
process.stdout.write(data);
|
|
380300
380300
|
if (this.writeLogPath) try {
|
|
380301
|
-
fs$
|
|
380301
|
+
fs$17.appendFileSync(this.writeLogPath, data, { encoding: "utf8" });
|
|
380302
380302
|
} catch {}
|
|
380303
380303
|
}
|
|
380304
380304
|
get columns() {
|
|
@@ -439712,7 +439712,7 @@ var require_ansi_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
439712
439712
|
});
|
|
439713
439713
|
}));
|
|
439714
439714
|
var require_supports_color = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
439715
|
-
const os$
|
|
439715
|
+
const os$5 = __require("os");
|
|
439716
439716
|
const tty$2 = __require("tty");
|
|
439717
439717
|
const hasFlag = require_has_flag();
|
|
439718
439718
|
const { env } = process;
|
|
@@ -439739,7 +439739,7 @@ var require_supports_color = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
439739
439739
|
const min = forceColor || 0;
|
|
439740
439740
|
if (env.TERM === "dumb") return min;
|
|
439741
439741
|
if (process.platform === "win32") {
|
|
439742
|
-
const osRelease = os$
|
|
439742
|
+
const osRelease = os$5.release().split(".");
|
|
439743
439743
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
439744
439744
|
return 1;
|
|
439745
439745
|
}
|
|
@@ -440479,13 +440479,13 @@ function printableChar(data) {
|
|
|
440479
440479
|
}
|
|
440480
440480
|
/**
|
|
440481
440481
|
* True when a decoded key is a single printable character safe to append to a
|
|
440482
|
-
* text query (e.g. a search box). Rejects C0 control chars, DEL, and any
|
|
440482
|
+
* text query (e.g. a search box). Rejects C0 control chars, DEL, isolated surrogates, and any
|
|
440483
440483
|
* multi-codepoint escape sequence. Space is accepted.
|
|
440484
440484
|
*/
|
|
440485
440485
|
function isPrintableChar(ch) {
|
|
440486
|
-
if (ch.length !== 1) return false;
|
|
440487
440486
|
const code = ch.codePointAt(0);
|
|
440488
|
-
|
|
440487
|
+
if (code === void 0 || ch.length !== (code > 65535 ? 2 : 1)) return false;
|
|
440488
|
+
return code >= 32 && code !== 127 && (code < 55296 || code > 57343);
|
|
440489
440489
|
}
|
|
440490
440490
|
var init_printable_key = __esmMin((() => {
|
|
440491
440491
|
init_src$1();
|
|
@@ -444154,7 +444154,7 @@ var require_server = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
444154
444154
|
const https$1 = __require("node:https");
|
|
444155
444155
|
const http2 = __require("node:http2");
|
|
444156
444156
|
const dns = __require("node:dns");
|
|
444157
|
-
const os$
|
|
444157
|
+
const os$4 = __require("node:os");
|
|
444158
444158
|
const { kState, kOptions, kServerBindings, kHttp2ServerSessions } = require_symbols$2();
|
|
444159
444159
|
const { FSTWRN003 } = require_warnings();
|
|
444160
444160
|
const { onListenHookRunner } = require_hooks();
|
|
@@ -444375,7 +444375,7 @@ var require_server = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
444375
444375
|
* @returns {string[]}
|
|
444376
444376
|
*/
|
|
444377
444377
|
function getAddresses(address) {
|
|
444378
|
-
if (address.address === "0.0.0.0") return Object.values(os$
|
|
444378
|
+
if (address.address === "0.0.0.0") return Object.values(os$4.networkInterfaces()).flatMap((iface) => {
|
|
444379
444379
|
return iface.filter((iface) => iface.family === "IPv4");
|
|
444380
444380
|
}).sort((iface) => {
|
|
444381
444381
|
/* c8 ignore next 2 */
|
|
@@ -445875,10 +445875,10 @@ var require_atomic_sleep = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
445875
445875
|
}
|
|
445876
445876
|
}));
|
|
445877
445877
|
var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
445878
|
-
const fs$
|
|
445878
|
+
const fs$4 = __require("fs");
|
|
445879
445879
|
const EventEmitter$10 = __require("events");
|
|
445880
445880
|
const inherits$6 = __require("util").inherits;
|
|
445881
|
-
const path$
|
|
445881
|
+
const path$6 = __require("path");
|
|
445882
445882
|
const sleep = require_atomic_sleep();
|
|
445883
445883
|
const assert$8 = __require("assert");
|
|
445884
445884
|
const BUSY_WRITE_TIMEOUT = 100;
|
|
@@ -445918,17 +445918,17 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
445918
445918
|
const flags = sonic.append ? "a" : "w";
|
|
445919
445919
|
const mode = sonic.mode;
|
|
445920
445920
|
if (sonic.sync) try {
|
|
445921
|
-
if (sonic.mkdir) fs$
|
|
445922
|
-
fileOpened(null, fs$
|
|
445921
|
+
if (sonic.mkdir) fs$4.mkdirSync(path$6.dirname(file), { recursive: true });
|
|
445922
|
+
fileOpened(null, fs$4.openSync(file, flags, mode));
|
|
445923
445923
|
} catch (err) {
|
|
445924
445924
|
fileOpened(err);
|
|
445925
445925
|
throw err;
|
|
445926
445926
|
}
|
|
445927
|
-
else if (sonic.mkdir) fs$
|
|
445927
|
+
else if (sonic.mkdir) fs$4.mkdir(path$6.dirname(file), { recursive: true }, (err) => {
|
|
445928
445928
|
if (err) return fileOpened(err);
|
|
445929
|
-
fs$
|
|
445929
|
+
fs$4.open(file, flags, mode, fileOpened);
|
|
445930
445930
|
});
|
|
445931
|
-
else fs$
|
|
445931
|
+
else fs$4.open(file, flags, mode, fileOpened);
|
|
445932
445932
|
}
|
|
445933
445933
|
function SonicBoom(opts) {
|
|
445934
445934
|
if (!(this instanceof SonicBoom)) return new SonicBoom(opts);
|
|
@@ -445966,8 +445966,8 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
445966
445966
|
this.flush = flushBuffer;
|
|
445967
445967
|
this.flushSync = flushBufferSync;
|
|
445968
445968
|
this._actualWrite = actualWriteBuffer;
|
|
445969
|
-
fsWriteSync = () => fs$
|
|
445970
|
-
fsWrite = () => fs$
|
|
445969
|
+
fsWriteSync = () => fs$4.writeSync(this.fd, this._writingBuf);
|
|
445970
|
+
fsWrite = () => fs$4.write(this.fd, this._writingBuf, this.release);
|
|
445971
445971
|
} else if (contentMode === void 0 || contentMode === kContentModeUtf8) {
|
|
445972
445972
|
this._writingBuf = "";
|
|
445973
445973
|
this.write = write;
|
|
@@ -445975,12 +445975,12 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
445975
445975
|
this.flushSync = flushSync;
|
|
445976
445976
|
this._actualWrite = actualWrite;
|
|
445977
445977
|
fsWriteSync = () => {
|
|
445978
|
-
if (Buffer.isBuffer(this._writingBuf)) return fs$
|
|
445979
|
-
return fs$
|
|
445978
|
+
if (Buffer.isBuffer(this._writingBuf)) return fs$4.writeSync(this.fd, this._writingBuf);
|
|
445979
|
+
return fs$4.writeSync(this.fd, this._writingBuf, "utf8");
|
|
445980
445980
|
};
|
|
445981
445981
|
fsWrite = () => {
|
|
445982
|
-
if (Buffer.isBuffer(this._writingBuf)) return fs$
|
|
445983
|
-
return fs$
|
|
445982
|
+
if (Buffer.isBuffer(this._writingBuf)) return fs$4.write(this.fd, this._writingBuf, this.release);
|
|
445983
|
+
return fs$4.write(this.fd, this._writingBuf, "utf8", this.release);
|
|
445984
445984
|
};
|
|
445985
445985
|
} else throw new Error(`SonicBoom supports "${kContentModeUtf8}" and "${kContentModeBuffer}", but passed ${contentMode}`);
|
|
445986
445986
|
if (typeof fd === "number") {
|
|
@@ -446025,7 +446025,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
446025
446025
|
return;
|
|
446026
446026
|
}
|
|
446027
446027
|
}
|
|
446028
|
-
if (this._fsync) fs$
|
|
446028
|
+
if (this._fsync) fs$4.fsyncSync(this.fd);
|
|
446029
446029
|
const len = this._len;
|
|
446030
446030
|
if (this._reopening) {
|
|
446031
446031
|
this._writing = false;
|
|
@@ -446122,7 +446122,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
446122
446122
|
this._flushPending = true;
|
|
446123
446123
|
const onDrain = () => {
|
|
446124
446124
|
if (!this._fsync) try {
|
|
446125
|
-
fs$
|
|
446125
|
+
fs$4.fsync(this.fd, (err) => {
|
|
446126
446126
|
this._flushPending = false;
|
|
446127
446127
|
cb(err);
|
|
446128
446128
|
});
|
|
@@ -446199,7 +446199,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
446199
446199
|
if (this._writing) return;
|
|
446200
446200
|
const fd = this.fd;
|
|
446201
446201
|
this.once("ready", () => {
|
|
446202
|
-
if (fd !== this.fd) fs$
|
|
446202
|
+
if (fd !== this.fd) fs$4.close(fd, (err) => {
|
|
446203
446203
|
if (err) return this.emit("error", err);
|
|
446204
446204
|
});
|
|
446205
446205
|
});
|
|
@@ -446230,7 +446230,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
446230
446230
|
while (this._bufs.length || buf.length) {
|
|
446231
446231
|
if (buf.length <= 0) buf = this._bufs[0];
|
|
446232
446232
|
try {
|
|
446233
|
-
const n = Buffer.isBuffer(buf) ? fs$
|
|
446233
|
+
const n = Buffer.isBuffer(buf) ? fs$4.writeSync(this.fd, buf) : fs$4.writeSync(this.fd, buf, "utf8");
|
|
446234
446234
|
const releasedBufObj = releaseWritingBuf(buf, this._len, n);
|
|
446235
446235
|
buf = releasedBufObj.writingBuf;
|
|
446236
446236
|
this._len = releasedBufObj.len;
|
|
@@ -446241,7 +446241,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
446241
446241
|
}
|
|
446242
446242
|
}
|
|
446243
446243
|
try {
|
|
446244
|
-
fs$
|
|
446244
|
+
fs$4.fsyncSync(this.fd);
|
|
446245
446245
|
} catch {}
|
|
446246
446246
|
}
|
|
446247
446247
|
function flushBufferSync() {
|
|
@@ -446255,7 +446255,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
446255
446255
|
while (this._bufs.length || buf.length) {
|
|
446256
446256
|
if (buf.length <= 0) buf = mergeBuf(this._bufs[0], this._lens[0]);
|
|
446257
446257
|
try {
|
|
446258
|
-
const n = fs$
|
|
446258
|
+
const n = fs$4.writeSync(this.fd, buf);
|
|
446259
446259
|
buf = buf.subarray(n);
|
|
446260
446260
|
this._len = Math.max(this._len - n, 0);
|
|
446261
446261
|
if (buf.length <= 0) {
|
|
@@ -446277,24 +446277,24 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
446277
446277
|
this._writing = true;
|
|
446278
446278
|
this._writingBuf = this._writingBuf.length ? this._writingBuf : this._bufs.shift() || "";
|
|
446279
446279
|
if (this.sync) try {
|
|
446280
|
-
release(null, Buffer.isBuffer(this._writingBuf) ? fs$
|
|
446280
|
+
release(null, Buffer.isBuffer(this._writingBuf) ? fs$4.writeSync(this.fd, this._writingBuf) : fs$4.writeSync(this.fd, this._writingBuf, "utf8"));
|
|
446281
446281
|
} catch (err) {
|
|
446282
446282
|
release(err);
|
|
446283
446283
|
}
|
|
446284
|
-
else fs$
|
|
446284
|
+
else fs$4.write(this.fd, this._writingBuf, release);
|
|
446285
446285
|
}
|
|
446286
446286
|
function actualWriteBuffer() {
|
|
446287
446287
|
const release = this.release;
|
|
446288
446288
|
this._writing = true;
|
|
446289
446289
|
this._writingBuf = this._writingBuf.length ? this._writingBuf : mergeBuf(this._bufs.shift(), this._lens.shift());
|
|
446290
446290
|
if (this.sync) try {
|
|
446291
|
-
release(null, fs$
|
|
446291
|
+
release(null, fs$4.writeSync(this.fd, this._writingBuf));
|
|
446292
446292
|
} catch (err) {
|
|
446293
446293
|
release(err);
|
|
446294
446294
|
}
|
|
446295
446295
|
else {
|
|
446296
446296
|
if (kCopyBuffer) this._writingBuf = Buffer.from(this._writingBuf);
|
|
446297
|
-
fs$
|
|
446297
|
+
fs$4.write(this.fd, this._writingBuf, release);
|
|
446298
446298
|
}
|
|
446299
446299
|
}
|
|
446300
446300
|
function actualClose(sonic) {
|
|
@@ -446308,10 +446308,10 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
446308
446308
|
sonic._lens = [];
|
|
446309
446309
|
assert$8(typeof sonic.fd === "number", `sonic.fd must be a number, got ${typeof sonic.fd}`);
|
|
446310
446310
|
try {
|
|
446311
|
-
fs$
|
|
446311
|
+
fs$4.fsync(sonic.fd, closeWrapped);
|
|
446312
446312
|
} catch {}
|
|
446313
446313
|
function closeWrapped() {
|
|
446314
|
-
if (sonic.fd !== 1 && sonic.fd !== 2) fs$
|
|
446314
|
+
if (sonic.fd !== 1 && sonic.fd !== 2) fs$4.close(sonic.fd, done);
|
|
446315
446315
|
else done();
|
|
446316
446316
|
}
|
|
446317
446317
|
function done(err) {
|
|
@@ -448161,7 +448161,7 @@ var require_multistream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
448161
448161
|
module.exports = multistream;
|
|
448162
448162
|
}));
|
|
448163
448163
|
var require_pino = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
448164
|
-
const os$
|
|
448164
|
+
const os$3 = __require("node:os");
|
|
448165
448165
|
const stdSerializers = require_pino_std_serializers();
|
|
448166
448166
|
const caller = require_caller();
|
|
448167
448167
|
const redaction = require_redaction();
|
|
@@ -448176,7 +448176,7 @@ var require_pino = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
448176
448176
|
const { chindingsSym, redactFmtSym, serializersSym, timeSym, timeSliceIndexSym, streamSym, stringifySym, stringifySafeSym, stringifiersSym, setLevelSym, endSym, formatOptsSym, messageKeySym, errorKeySym, nestedKeySym, mixinSym, levelCompSym, useOnlyCustomLevelsSym, formattersSym, hooksSym, nestedKeyStrSym, mixinMergeStrategySym, msgPrefixSym } = symbols;
|
|
448177
448177
|
const { epochTime, nullTime } = time;
|
|
448178
448178
|
const { pid } = process;
|
|
448179
|
-
const hostname = os$
|
|
448179
|
+
const hostname = os$3.hostname();
|
|
448180
448180
|
const defaultErrorSerializer = stdSerializers.err;
|
|
448181
448181
|
const normalize = createArgsNormalizer({
|
|
448182
448182
|
level: "info",
|
|
@@ -468692,202 +468692,6 @@ var require_constants$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
468692
468692
|
NOOP: () => {}
|
|
468693
468693
|
};
|
|
468694
468694
|
}));
|
|
468695
|
-
var require_node_gyp_build$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
468696
|
-
var fs$4 = __require("fs");
|
|
468697
|
-
var path$6 = __require("path");
|
|
468698
|
-
var os$3 = __require("os");
|
|
468699
|
-
var runtimeRequire = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require;
|
|
468700
|
-
var vars = process.config && process.config.variables || {};
|
|
468701
|
-
var prebuildsOnly = !!process.env.PREBUILDS_ONLY;
|
|
468702
|
-
var abi = process.versions.modules;
|
|
468703
|
-
var runtime = isElectron() ? "electron" : isNwjs() ? "node-webkit" : "node";
|
|
468704
|
-
var arch = process.env.npm_config_arch || os$3.arch();
|
|
468705
|
-
var platform = process.env.npm_config_platform || os$3.platform();
|
|
468706
|
-
var libc = process.env.LIBC || (isAlpine(platform) ? "musl" : "glibc");
|
|
468707
|
-
var armv = process.env.ARM_VERSION || (arch === "arm64" ? "8" : vars.arm_version) || "";
|
|
468708
|
-
var uv = (process.versions.uv || "").split(".")[0];
|
|
468709
|
-
module.exports = load;
|
|
468710
|
-
function load(dir) {
|
|
468711
|
-
return runtimeRequire(load.resolve(dir));
|
|
468712
|
-
}
|
|
468713
|
-
load.resolve = load.path = function(dir) {
|
|
468714
|
-
dir = path$6.resolve(dir || ".");
|
|
468715
|
-
try {
|
|
468716
|
-
var name = runtimeRequire(path$6.join(dir, "package.json")).name.toUpperCase().replace(/-/g, "_");
|
|
468717
|
-
if (process.env[name + "_PREBUILD"]) dir = process.env[name + "_PREBUILD"];
|
|
468718
|
-
} catch (err) {}
|
|
468719
|
-
if (!prebuildsOnly) {
|
|
468720
|
-
var release = getFirst(path$6.join(dir, "build/Release"), matchBuild);
|
|
468721
|
-
if (release) return release;
|
|
468722
|
-
var debug = getFirst(path$6.join(dir, "build/Debug"), matchBuild);
|
|
468723
|
-
if (debug) return debug;
|
|
468724
|
-
}
|
|
468725
|
-
var prebuild = resolve(dir);
|
|
468726
|
-
if (prebuild) return prebuild;
|
|
468727
|
-
var nearby = resolve(path$6.dirname(process.execPath));
|
|
468728
|
-
if (nearby) return nearby;
|
|
468729
|
-
var target = [
|
|
468730
|
-
"platform=" + platform,
|
|
468731
|
-
"arch=" + arch,
|
|
468732
|
-
"runtime=" + runtime,
|
|
468733
|
-
"abi=" + abi,
|
|
468734
|
-
"uv=" + uv,
|
|
468735
|
-
armv ? "armv=" + armv : "",
|
|
468736
|
-
"libc=" + libc,
|
|
468737
|
-
"node=" + process.versions.node,
|
|
468738
|
-
process.versions.electron ? "electron=" + process.versions.electron : "",
|
|
468739
|
-
typeof __webpack_require__ === "function" ? "webpack=true" : ""
|
|
468740
|
-
].filter(Boolean).join(" ");
|
|
468741
|
-
throw new Error("No native build was found for " + target + "\n loaded from: " + dir + "\n");
|
|
468742
|
-
function resolve(dir) {
|
|
468743
|
-
var tuple = readdirSync(path$6.join(dir, "prebuilds")).map(parseTuple).filter(matchTuple(platform, arch)).sort(compareTuples)[0];
|
|
468744
|
-
if (!tuple) return;
|
|
468745
|
-
var prebuilds = path$6.join(dir, "prebuilds", tuple.name);
|
|
468746
|
-
var winner = readdirSync(prebuilds).map(parseTags).filter(matchTags(runtime, abi)).sort(compareTags(runtime))[0];
|
|
468747
|
-
if (winner) return path$6.join(prebuilds, winner.file);
|
|
468748
|
-
}
|
|
468749
|
-
};
|
|
468750
|
-
function readdirSync(dir) {
|
|
468751
|
-
try {
|
|
468752
|
-
return fs$4.readdirSync(dir);
|
|
468753
|
-
} catch (err) {
|
|
468754
|
-
return [];
|
|
468755
|
-
}
|
|
468756
|
-
}
|
|
468757
|
-
function getFirst(dir, filter) {
|
|
468758
|
-
var files = readdirSync(dir).filter(filter);
|
|
468759
|
-
return files[0] && path$6.join(dir, files[0]);
|
|
468760
|
-
}
|
|
468761
|
-
function matchBuild(name) {
|
|
468762
|
-
return /\.node$/.test(name);
|
|
468763
|
-
}
|
|
468764
|
-
function parseTuple(name) {
|
|
468765
|
-
var arr = name.split("-");
|
|
468766
|
-
if (arr.length !== 2) return;
|
|
468767
|
-
var platform = arr[0];
|
|
468768
|
-
var architectures = arr[1].split("+");
|
|
468769
|
-
if (!platform) return;
|
|
468770
|
-
if (!architectures.length) return;
|
|
468771
|
-
if (!architectures.every(Boolean)) return;
|
|
468772
|
-
return {
|
|
468773
|
-
name,
|
|
468774
|
-
platform,
|
|
468775
|
-
architectures
|
|
468776
|
-
};
|
|
468777
|
-
}
|
|
468778
|
-
function matchTuple(platform, arch) {
|
|
468779
|
-
return function(tuple) {
|
|
468780
|
-
if (tuple == null) return false;
|
|
468781
|
-
if (tuple.platform !== platform) return false;
|
|
468782
|
-
return tuple.architectures.includes(arch);
|
|
468783
|
-
};
|
|
468784
|
-
}
|
|
468785
|
-
function compareTuples(a, b) {
|
|
468786
|
-
return a.architectures.length - b.architectures.length;
|
|
468787
|
-
}
|
|
468788
|
-
function parseTags(file) {
|
|
468789
|
-
var arr = file.split(".");
|
|
468790
|
-
var extension = arr.pop();
|
|
468791
|
-
var tags = {
|
|
468792
|
-
file,
|
|
468793
|
-
specificity: 0
|
|
468794
|
-
};
|
|
468795
|
-
if (extension !== "node") return;
|
|
468796
|
-
for (var i = 0; i < arr.length; i++) {
|
|
468797
|
-
var tag = arr[i];
|
|
468798
|
-
if (tag === "node" || tag === "electron" || tag === "node-webkit") tags.runtime = tag;
|
|
468799
|
-
else if (tag === "napi") tags.napi = true;
|
|
468800
|
-
else if (tag.slice(0, 3) === "abi") tags.abi = tag.slice(3);
|
|
468801
|
-
else if (tag.slice(0, 2) === "uv") tags.uv = tag.slice(2);
|
|
468802
|
-
else if (tag.slice(0, 4) === "armv") tags.armv = tag.slice(4);
|
|
468803
|
-
else if (tag === "glibc" || tag === "musl") tags.libc = tag;
|
|
468804
|
-
else continue;
|
|
468805
|
-
tags.specificity++;
|
|
468806
|
-
}
|
|
468807
|
-
return tags;
|
|
468808
|
-
}
|
|
468809
|
-
function matchTags(runtime, abi) {
|
|
468810
|
-
return function(tags) {
|
|
468811
|
-
if (tags == null) return false;
|
|
468812
|
-
if (tags.runtime && tags.runtime !== runtime && !runtimeAgnostic(tags)) return false;
|
|
468813
|
-
if (tags.abi && tags.abi !== abi && !tags.napi) return false;
|
|
468814
|
-
if (tags.uv && tags.uv !== uv) return false;
|
|
468815
|
-
if (tags.armv && tags.armv !== armv) return false;
|
|
468816
|
-
if (tags.libc && tags.libc !== libc) return false;
|
|
468817
|
-
return true;
|
|
468818
|
-
};
|
|
468819
|
-
}
|
|
468820
|
-
function runtimeAgnostic(tags) {
|
|
468821
|
-
return tags.runtime === "node" && tags.napi;
|
|
468822
|
-
}
|
|
468823
|
-
function compareTags(runtime) {
|
|
468824
|
-
return function(a, b) {
|
|
468825
|
-
if (a.runtime !== b.runtime) return a.runtime === runtime ? -1 : 1;
|
|
468826
|
-
else if (a.abi !== b.abi) return a.abi ? -1 : 1;
|
|
468827
|
-
else if (a.specificity !== b.specificity) return a.specificity > b.specificity ? -1 : 1;
|
|
468828
|
-
else return 0;
|
|
468829
|
-
};
|
|
468830
|
-
}
|
|
468831
|
-
function isNwjs() {
|
|
468832
|
-
return !!(process.versions && process.versions.nw);
|
|
468833
|
-
}
|
|
468834
|
-
function isElectron() {
|
|
468835
|
-
if (process.versions && process.versions.electron) return true;
|
|
468836
|
-
if (process.env.ELECTRON_RUN_AS_NODE) return true;
|
|
468837
|
-
return typeof window !== "undefined" && window.process && window.process.type === "renderer";
|
|
468838
|
-
}
|
|
468839
|
-
function isAlpine(platform) {
|
|
468840
|
-
return platform === "linux" && fs$4.existsSync("/etc/alpine-release");
|
|
468841
|
-
}
|
|
468842
|
-
load.parseTags = parseTags;
|
|
468843
|
-
load.matchTags = matchTags;
|
|
468844
|
-
load.compareTags = compareTags;
|
|
468845
|
-
load.parseTuple = parseTuple;
|
|
468846
|
-
load.matchTuple = matchTuple;
|
|
468847
|
-
load.compareTuples = compareTuples;
|
|
468848
|
-
}));
|
|
468849
|
-
var require_node_gyp_build = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
468850
|
-
const runtimeRequire = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require;
|
|
468851
|
-
if (typeof runtimeRequire.addon === "function") module.exports = runtimeRequire.addon.bind(runtimeRequire);
|
|
468852
|
-
else module.exports = require_node_gyp_build$1();
|
|
468853
|
-
}));
|
|
468854
|
-
var require_fallback$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
468855
|
-
/**
|
|
468856
|
-
* Masks a buffer using the given mask.
|
|
468857
|
-
*
|
|
468858
|
-
* @param {Buffer} source The buffer to mask
|
|
468859
|
-
* @param {Buffer} mask The mask to use
|
|
468860
|
-
* @param {Buffer} output The buffer where to store the result
|
|
468861
|
-
* @param {Number} offset The offset at which to start writing
|
|
468862
|
-
* @param {Number} length The number of bytes to mask.
|
|
468863
|
-
* @public
|
|
468864
|
-
*/
|
|
468865
|
-
const mask = (source, mask, output, offset, length) => {
|
|
468866
|
-
for (var i = 0; i < length; i++) output[offset + i] = source[i] ^ mask[i & 3];
|
|
468867
|
-
};
|
|
468868
|
-
/**
|
|
468869
|
-
* Unmasks a buffer using the given mask.
|
|
468870
|
-
*
|
|
468871
|
-
* @param {Buffer} buffer The buffer to unmask
|
|
468872
|
-
* @param {Buffer} mask The mask to use
|
|
468873
|
-
* @public
|
|
468874
|
-
*/
|
|
468875
|
-
const unmask = (buffer, mask) => {
|
|
468876
|
-
const length = buffer.length;
|
|
468877
|
-
for (var i = 0; i < length; i++) buffer[i] ^= mask[i & 3];
|
|
468878
|
-
};
|
|
468879
|
-
module.exports = {
|
|
468880
|
-
mask,
|
|
468881
|
-
unmask
|
|
468882
|
-
};
|
|
468883
|
-
}));
|
|
468884
|
-
var require_bufferutil = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
468885
|
-
try {
|
|
468886
|
-
module.exports = require_node_gyp_build()(__dirname);
|
|
468887
|
-
} catch (e) {
|
|
468888
|
-
module.exports = require_fallback$1();
|
|
468889
|
-
}
|
|
468890
|
-
}));
|
|
468891
468695
|
var require_buffer_util = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
468892
468696
|
const { EMPTY_BUFFER } = require_constants$2();
|
|
468893
468697
|
const FastBuffer = Buffer[Symbol.species];
|
|
@@ -468975,7 +468779,7 @@ var require_buffer_util = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
468975
468779
|
};
|
|
468976
468780
|
/* istanbul ignore else */
|
|
468977
468781
|
if (!process.env.WS_NO_BUFFER_UTIL) try {
|
|
468978
|
-
const bufferUtil =
|
|
468782
|
+
const bufferUtil = __require("bufferutil");
|
|
468979
468783
|
module.exports.mask = function(source, mask, output, offset, length) {
|
|
468980
468784
|
if (length < 48) _mask(source, mask, output, offset, length);
|
|
468981
468785
|
else bufferUtil.mask(source, mask, output, offset, length);
|
|
@@ -469366,41 +469170,6 @@ var require_permessage_deflate = /* @__PURE__ */ __commonJSMin(((exports, module
|
|
|
469366
469170
|
this[kCallback](err);
|
|
469367
469171
|
}
|
|
469368
469172
|
}));
|
|
469369
|
-
var require_fallback = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
469370
|
-
/**
|
|
469371
|
-
* Checks if a given buffer contains only correct UTF-8.
|
|
469372
|
-
* Ported from https://www.cl.cam.ac.uk/%7Emgk25/ucs/utf8_check.c by
|
|
469373
|
-
* Markus Kuhn.
|
|
469374
|
-
*
|
|
469375
|
-
* @param {Buffer} buf The buffer to check
|
|
469376
|
-
* @return {Boolean} `true` if `buf` contains only correct UTF-8, else `false`
|
|
469377
|
-
* @public
|
|
469378
|
-
*/
|
|
469379
|
-
function isValidUTF8(buf) {
|
|
469380
|
-
const len = buf.length;
|
|
469381
|
-
let i = 0;
|
|
469382
|
-
while (i < len) if ((buf[i] & 128) === 0) i++;
|
|
469383
|
-
else if ((buf[i] & 224) === 192) {
|
|
469384
|
-
if (i + 1 === len || (buf[i + 1] & 192) !== 128 || (buf[i] & 254) === 192) return false;
|
|
469385
|
-
i += 2;
|
|
469386
|
-
} else if ((buf[i] & 240) === 224) {
|
|
469387
|
-
if (i + 2 >= len || (buf[i + 1] & 192) !== 128 || (buf[i + 2] & 192) !== 128 || buf[i] === 224 && (buf[i + 1] & 224) === 128 || buf[i] === 237 && (buf[i + 1] & 224) === 160) return false;
|
|
469388
|
-
i += 3;
|
|
469389
|
-
} else if ((buf[i] & 248) === 240) {
|
|
469390
|
-
if (i + 3 >= len || (buf[i + 1] & 192) !== 128 || (buf[i + 2] & 192) !== 128 || (buf[i + 3] & 192) !== 128 || buf[i] === 240 && (buf[i + 1] & 240) === 128 || buf[i] === 244 && buf[i + 1] > 143 || buf[i] > 244) return false;
|
|
469391
|
-
i += 4;
|
|
469392
|
-
} else return false;
|
|
469393
|
-
return true;
|
|
469394
|
-
}
|
|
469395
|
-
module.exports = isValidUTF8;
|
|
469396
|
-
}));
|
|
469397
|
-
var require_utf_8_validate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
469398
|
-
try {
|
|
469399
|
-
module.exports = require_node_gyp_build()(__dirname);
|
|
469400
|
-
} catch (e) {
|
|
469401
|
-
module.exports = require_fallback();
|
|
469402
|
-
}
|
|
469403
|
-
}));
|
|
469404
469173
|
var require_validation = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
469405
469174
|
const { isUtf8 } = __require("buffer");
|
|
469406
469175
|
const { hasBlob } = require_constants$2();
|
|
@@ -469589,7 +469358,7 @@ var require_validation = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
469589
469358
|
return buf.length < 24 ? _isValidUTF8(buf) : isUtf8(buf);
|
|
469590
469359
|
};
|
|
469591
469360
|
else if (!process.env.WS_NO_UTF_8_VALIDATE) try {
|
|
469592
|
-
const isValidUTF8 =
|
|
469361
|
+
const isValidUTF8 = __require("utf-8-validate");
|
|
469593
469362
|
module.exports.isValidUTF8 = function(buf) {
|
|
469594
469363
|
return buf.length < 32 ? _isValidUTF8(buf) : isValidUTF8(buf);
|
|
469595
469364
|
};
|
|
@@ -492208,7 +491977,7 @@ var init_queue_prompt_delivery = __esmMin((() => {
|
|
|
492208
491977
|
init_queue_overflow_delivery();
|
|
492209
491978
|
}));
|
|
492210
491979
|
/** Resolves only from request-specific evidence, never from UI step/turn events. */
|
|
492211
|
-
async function deliverQueueSteer(sender, input, expectedTurnId, signal) {
|
|
491980
|
+
async function deliverQueueSteer(sender, input, expectedTurnId, signal, onAccepted) {
|
|
492212
491981
|
if (!Number.isSafeInteger(expectedTurnId) || expectedTurnId < 0) throw new Error("INVALID_STEER_RECEIPT_TURN");
|
|
492213
491982
|
const payload = structuredClone(input);
|
|
492214
491983
|
const check = () => {
|
|
@@ -492243,6 +492012,11 @@ async function deliverQueueSteer(sender, input, expectedTurnId, signal) {
|
|
|
492243
492012
|
}
|
|
492244
492013
|
let submit = true;
|
|
492245
492014
|
let accepted = false;
|
|
492015
|
+
const markAccepted = () => {
|
|
492016
|
+
if (accepted) return;
|
|
492017
|
+
accepted = true;
|
|
492018
|
+
onAccepted?.();
|
|
492019
|
+
};
|
|
492246
492020
|
for (;;) {
|
|
492247
492021
|
check();
|
|
492248
492022
|
if (submit) {
|
|
@@ -492250,7 +492024,7 @@ async function deliverQueueSteer(sender, input, expectedTurnId, signal) {
|
|
|
492250
492024
|
const result = await sender.steerActiveWithReceipt(payload, identity);
|
|
492251
492025
|
check();
|
|
492252
492026
|
if (!result.accepted) return "rejected";
|
|
492253
|
-
|
|
492027
|
+
markAccepted();
|
|
492254
492028
|
} catch (error) {
|
|
492255
492029
|
check();
|
|
492256
492030
|
if (isPromptAdmissionProtocolFailure(error)) throw error;
|
|
@@ -492264,7 +492038,7 @@ async function deliverQueueSteer(sender, input, expectedTurnId, signal) {
|
|
|
492264
492038
|
const receipt = await sender.getSteerAdmissionReceipt(payload, identity);
|
|
492265
492039
|
check();
|
|
492266
492040
|
if (receipt.status === "accepted") {
|
|
492267
|
-
|
|
492041
|
+
markAccepted();
|
|
492268
492042
|
if (receipt.disposition === "context" || receipt.disposition === "discarded") return receipt.disposition;
|
|
492269
492043
|
if (receipt.disposition !== "buffered") throw new Error("INVALID_STEER_ADMISSION_RECEIPT");
|
|
492270
492044
|
} else if (receipt.status === "uncertain") throw new Error("PROMPT_ADMISSION_UNCERTAIN");
|
|
@@ -492602,6 +492376,7 @@ var init_searchable_list = __esmMin((() => {
|
|
|
492602
492376
|
SearchableList = class {
|
|
492603
492377
|
items;
|
|
492604
492378
|
toSearchText;
|
|
492379
|
+
exactMatch;
|
|
492605
492380
|
pageSize;
|
|
492606
492381
|
searchable;
|
|
492607
492382
|
query = "";
|
|
@@ -492609,12 +492384,15 @@ var init_searchable_list = __esmMin((() => {
|
|
|
492609
492384
|
constructor(opts) {
|
|
492610
492385
|
this.items = opts.items;
|
|
492611
492386
|
this.toSearchText = opts.toSearchText;
|
|
492387
|
+
this.exactMatch = opts.exactMatch;
|
|
492612
492388
|
this.pageSize = opts.pageSize ?? DEFAULT_PAGE_SIZE;
|
|
492613
492389
|
this.searchable = opts.searchable ?? false;
|
|
492614
492390
|
this.cursor = Math.max(opts.initialIndex ?? 0, 0);
|
|
492615
492391
|
}
|
|
492616
492392
|
filtered() {
|
|
492617
492393
|
if (this.query.length === 0) return this.items;
|
|
492394
|
+
const exact = this.exactMatch && this.items.filter((item) => this.exactMatch(item, this.query));
|
|
492395
|
+
if (exact && exact.length > 0) return exact;
|
|
492618
492396
|
return fuzzyFilter([...this.items], this.query, this.toSearchText);
|
|
492619
492397
|
}
|
|
492620
492398
|
/** The item under the cursor, clamped into the filtered range. */
|
|
@@ -492676,7 +492454,10 @@ var init_searchable_list = __esmMin((() => {
|
|
|
492676
492454
|
if (!this.searchable) return false;
|
|
492677
492455
|
if (matchesKey(data, Key.backspace)) {
|
|
492678
492456
|
if (this.query.length > 0) {
|
|
492679
|
-
|
|
492457
|
+
const segments = new Intl.Segmenter(void 0, { granularity: "grapheme" }).segment(this.query);
|
|
492458
|
+
let lastIndex = 0;
|
|
492459
|
+
for (const segment of segments) lastIndex = segment.index;
|
|
492460
|
+
this.query = this.query.slice(0, lastIndex);
|
|
492680
492461
|
this.cursor = 0;
|
|
492681
492462
|
}
|
|
492682
492463
|
return true;
|
|
@@ -494090,10 +493871,7 @@ async function runTuiLocalShell(command, cwd, owner, onOutput) {
|
|
|
494090
493871
|
const buffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
494091
493872
|
const retained = buffer.subarray(0, Math.max(0, TUI_LOCAL_SHELL_OUTPUT_LIMIT - bytes));
|
|
494092
493873
|
bytes += retained.length;
|
|
494093
|
-
if (retained.length !== buffer.length)
|
|
494094
|
-
truncated = true;
|
|
494095
|
-
stop();
|
|
494096
|
-
}
|
|
493874
|
+
if (retained.length !== buffer.length) truncated = true;
|
|
494097
493875
|
const next = decoder.write(retained);
|
|
494098
493876
|
text += next;
|
|
494099
493877
|
if (!owner.aborted && next) onOutput(next);
|
|
@@ -494136,6 +493914,12 @@ function effectiveQueuePolicy(policy) {
|
|
|
494136
493914
|
drop: policy?.drop ?? "summarize"
|
|
494137
493915
|
};
|
|
494138
493916
|
}
|
|
493917
|
+
function effectiveSessionQueuePolicy(policy, basicLocal) {
|
|
493918
|
+
return effectiveQueuePolicy(policy ?? (basicLocal ? {
|
|
493919
|
+
mode: "steer",
|
|
493920
|
+
debounceMs: 0
|
|
493921
|
+
} : void 0));
|
|
493922
|
+
}
|
|
494139
493923
|
function queueAdmissionAction(policy, boundary) {
|
|
494140
493924
|
if (boundary.blocked) return "enqueue";
|
|
494141
493925
|
if (policy?.mode === "interrupt" && boundary.active) return "interrupt";
|
|
@@ -494238,99 +494022,6 @@ function parseQueuePolicy(args) {
|
|
|
494238
494022
|
};
|
|
494239
494023
|
}
|
|
494240
494024
|
var init_queue_policy = __esmMin((() => {}));
|
|
494241
|
-
async function handleQueueCommand(host, args) {
|
|
494242
|
-
const session = host.requireSession();
|
|
494243
|
-
const state = await host.executeSessionQueueCommand(args);
|
|
494244
|
-
if (state === void 0 || host.session !== session) return;
|
|
494245
|
-
host.showStatus(JSON.stringify({
|
|
494246
|
-
state: state.kind,
|
|
494247
|
-
effective: state.kind === "invalid" ? null : effectiveQueuePolicy(state.kind === "override" ? state.policy : void 0)
|
|
494248
|
-
}));
|
|
494249
|
-
}
|
|
494250
|
-
function queueArgumentCompletions(prefix) {
|
|
494251
|
-
const words = prefix.trimStart().split(/\s+/u);
|
|
494252
|
-
const tail = words.pop() ?? "";
|
|
494253
|
-
const modes = [
|
|
494254
|
-
"steer",
|
|
494255
|
-
"followup",
|
|
494256
|
-
"collect",
|
|
494257
|
-
"interrupt"
|
|
494258
|
-
];
|
|
494259
|
-
const options = words.length === 0 ? [
|
|
494260
|
-
...modes,
|
|
494261
|
-
"default",
|
|
494262
|
-
"reset"
|
|
494263
|
-
] : modes.includes(words[0]) ? [
|
|
494264
|
-
"debounce:500ms",
|
|
494265
|
-
"cap:20",
|
|
494266
|
-
"drop:summarize",
|
|
494267
|
-
"drop:old",
|
|
494268
|
-
"drop:new"
|
|
494269
|
-
] : [];
|
|
494270
|
-
const used = new Set(words.slice(1).map((word) => word.split(":")[0]));
|
|
494271
|
-
const items = options.filter((value) => value.startsWith(tail) && !used.has(value.split(":")[0])).map((value) => ({
|
|
494272
|
-
value: [...words, value].join(" "),
|
|
494273
|
-
label: value
|
|
494274
|
-
}));
|
|
494275
|
-
return items.length === 0 ? null : items;
|
|
494276
|
-
}
|
|
494277
|
-
/** The caller owns UI admission and must recheck the captured session after awaiting. */
|
|
494278
|
-
async function executeQueueCommand(session, args) {
|
|
494279
|
-
const command = parseQueuePolicy(args);
|
|
494280
|
-
if (command.kind === "invalid") throw new Error("INVALID_QUEUE_POLICY");
|
|
494281
|
-
if (command.kind !== "status") await storeQueuePolicy(session, command);
|
|
494282
|
-
return loadQueuePolicy(session);
|
|
494283
|
-
}
|
|
494284
|
-
var init_queue = __esmMin((() => {
|
|
494285
|
-
init_queue_policy();
|
|
494286
|
-
}));
|
|
494287
|
-
function effectiveSessionVerbosity(snapshot, sessionId, enabled) {
|
|
494288
|
-
if (!enabled) return void 0;
|
|
494289
|
-
return sessionId !== void 0 && snapshot?.sessionId === sessionId ? snapshot.level : "off";
|
|
494290
|
-
}
|
|
494291
|
-
function isLevel(value) {
|
|
494292
|
-
return value === "off" || value === "on" || value === "full";
|
|
494293
|
-
}
|
|
494294
|
-
function parseSessionVerbosity(args) {
|
|
494295
|
-
const value = args.trim();
|
|
494296
|
-
if (value === "") return { kind: "status" };
|
|
494297
|
-
return isLevel(value) ? {
|
|
494298
|
-
kind: "set",
|
|
494299
|
-
level: value
|
|
494300
|
-
} : { kind: "invalid" };
|
|
494301
|
-
}
|
|
494302
|
-
async function loadSessionVerbosity(session) {
|
|
494303
|
-
if (session.connectionKind === "gateway") {
|
|
494304
|
-
if (session.getVerbosity === void 0) throw new Error("GATEWAY_CAPABILITY_UNAVAILABLE");
|
|
494305
|
-
const { level } = await session.getVerbosity();
|
|
494306
|
-
return isLevel(level) ? {
|
|
494307
|
-
kind: "override",
|
|
494308
|
-
level
|
|
494309
|
-
} : { kind: "invalid" };
|
|
494310
|
-
}
|
|
494311
|
-
const { custom } = await session.getSessionMetadata();
|
|
494312
|
-
if (typeof custom !== "object" || custom === null || Array.isArray(custom)) return { kind: "invalid" };
|
|
494313
|
-
const value = custom["blunVerbosity"];
|
|
494314
|
-
if (value === void 0 || value === null) return {
|
|
494315
|
-
kind: "default",
|
|
494316
|
-
level: "off"
|
|
494317
|
-
};
|
|
494318
|
-
return isLevel(value) ? {
|
|
494319
|
-
kind: "override",
|
|
494320
|
-
level: value
|
|
494321
|
-
} : { kind: "invalid" };
|
|
494322
|
-
}
|
|
494323
|
-
async function storeSessionVerbosity(session, command) {
|
|
494324
|
-
if (command.kind !== "set") return;
|
|
494325
|
-
if (!isLevel(command.level)) throw new Error("INVALID_SESSION_VERBOSITY");
|
|
494326
|
-
if (session.connectionKind === "gateway") {
|
|
494327
|
-
if (session.setVerbosity === void 0) throw new Error("GATEWAY_CAPABILITY_UNAVAILABLE");
|
|
494328
|
-
await session.setVerbosity({ level: command.level });
|
|
494329
|
-
return;
|
|
494330
|
-
}
|
|
494331
|
-
await session.updateSessionMetadata({ custom: { blunVerbosity: command.level } });
|
|
494332
|
-
}
|
|
494333
|
-
var init_session_verbosity = __esmMin((() => {}));
|
|
494334
494025
|
function experimentalFeatureMap(features) {
|
|
494335
494026
|
return Object.fromEntries(features.map((feature) => [feature.id, feature.enabled]));
|
|
494336
494027
|
}
|
|
@@ -494424,6 +494115,100 @@ var init_experimental_flags = __esmMin((() => {
|
|
|
494424
494115
|
"websocket"
|
|
494425
494116
|
];
|
|
494426
494117
|
}));
|
|
494118
|
+
async function handleQueueCommand(host, args) {
|
|
494119
|
+
const session = host.requireSession();
|
|
494120
|
+
const state = await host.executeSessionQueueCommand(args);
|
|
494121
|
+
if (state === void 0 || host.session !== session) return;
|
|
494122
|
+
host.showStatus(JSON.stringify({
|
|
494123
|
+
state: state.kind,
|
|
494124
|
+
effective: state.kind === "invalid" ? null : effectiveSessionQueuePolicy(state.kind === "override" ? state.policy : void 0, session.connectionKind !== "gateway" && !isExperimentalFlagEnabled("queue_policies"))
|
|
494125
|
+
}));
|
|
494126
|
+
}
|
|
494127
|
+
function queueArgumentCompletions(prefix) {
|
|
494128
|
+
const words = prefix.trimStart().split(/\s+/u);
|
|
494129
|
+
const tail = words.pop() ?? "";
|
|
494130
|
+
const modes = [
|
|
494131
|
+
"steer",
|
|
494132
|
+
"followup",
|
|
494133
|
+
"collect",
|
|
494134
|
+
"interrupt"
|
|
494135
|
+
];
|
|
494136
|
+
const options = words.length === 0 ? [
|
|
494137
|
+
...modes,
|
|
494138
|
+
"default",
|
|
494139
|
+
"reset"
|
|
494140
|
+
] : modes.includes(words[0]) ? [
|
|
494141
|
+
"debounce:500ms",
|
|
494142
|
+
"cap:20",
|
|
494143
|
+
"drop:summarize",
|
|
494144
|
+
"drop:old",
|
|
494145
|
+
"drop:new"
|
|
494146
|
+
] : [];
|
|
494147
|
+
const used = new Set(words.slice(1).map((word) => word.split(":")[0]));
|
|
494148
|
+
const items = options.filter((value) => value.startsWith(tail) && !used.has(value.split(":")[0])).map((value) => ({
|
|
494149
|
+
value: [...words, value].join(" "),
|
|
494150
|
+
label: value
|
|
494151
|
+
}));
|
|
494152
|
+
return items.length === 0 ? null : items;
|
|
494153
|
+
}
|
|
494154
|
+
/** The caller owns UI admission and must recheck the captured session after awaiting. */
|
|
494155
|
+
async function executeQueueCommand(session, args) {
|
|
494156
|
+
const command = parseQueuePolicy(args);
|
|
494157
|
+
if (command.kind === "invalid") throw new Error("INVALID_QUEUE_POLICY");
|
|
494158
|
+
if (command.kind !== "status") await storeQueuePolicy(session, command);
|
|
494159
|
+
return loadQueuePolicy(session);
|
|
494160
|
+
}
|
|
494161
|
+
var init_queue = __esmMin((() => {
|
|
494162
|
+
init_queue_policy();
|
|
494163
|
+
init_experimental_flags();
|
|
494164
|
+
}));
|
|
494165
|
+
function effectiveSessionVerbosity(snapshot, sessionId, enabled) {
|
|
494166
|
+
if (!enabled) return void 0;
|
|
494167
|
+
return sessionId !== void 0 && snapshot?.sessionId === sessionId ? snapshot.level : "off";
|
|
494168
|
+
}
|
|
494169
|
+
function isLevel(value) {
|
|
494170
|
+
return value === "off" || value === "on" || value === "full";
|
|
494171
|
+
}
|
|
494172
|
+
function parseSessionVerbosity(args) {
|
|
494173
|
+
const value = args.trim();
|
|
494174
|
+
if (value === "") return { kind: "status" };
|
|
494175
|
+
return isLevel(value) ? {
|
|
494176
|
+
kind: "set",
|
|
494177
|
+
level: value
|
|
494178
|
+
} : { kind: "invalid" };
|
|
494179
|
+
}
|
|
494180
|
+
async function loadSessionVerbosity(session) {
|
|
494181
|
+
if (session.connectionKind === "gateway") {
|
|
494182
|
+
if (session.getVerbosity === void 0) throw new Error("GATEWAY_CAPABILITY_UNAVAILABLE");
|
|
494183
|
+
const { level } = await session.getVerbosity();
|
|
494184
|
+
return isLevel(level) ? {
|
|
494185
|
+
kind: "override",
|
|
494186
|
+
level
|
|
494187
|
+
} : { kind: "invalid" };
|
|
494188
|
+
}
|
|
494189
|
+
const { custom } = await session.getSessionMetadata();
|
|
494190
|
+
if (typeof custom !== "object" || custom === null || Array.isArray(custom)) return { kind: "invalid" };
|
|
494191
|
+
const value = custom["blunVerbosity"];
|
|
494192
|
+
if (value === void 0 || value === null) return {
|
|
494193
|
+
kind: "default",
|
|
494194
|
+
level: "off"
|
|
494195
|
+
};
|
|
494196
|
+
return isLevel(value) ? {
|
|
494197
|
+
kind: "override",
|
|
494198
|
+
level: value
|
|
494199
|
+
} : { kind: "invalid" };
|
|
494200
|
+
}
|
|
494201
|
+
async function storeSessionVerbosity(session, command) {
|
|
494202
|
+
if (command.kind !== "set") return;
|
|
494203
|
+
if (!isLevel(command.level)) throw new Error("INVALID_SESSION_VERBOSITY");
|
|
494204
|
+
if (session.connectionKind === "gateway") {
|
|
494205
|
+
if (session.setVerbosity === void 0) throw new Error("GATEWAY_CAPABILITY_UNAVAILABLE");
|
|
494206
|
+
await session.setVerbosity({ level: command.level });
|
|
494207
|
+
return;
|
|
494208
|
+
}
|
|
494209
|
+
await session.updateSessionMetadata({ custom: { blunVerbosity: command.level } });
|
|
494210
|
+
}
|
|
494211
|
+
var init_session_verbosity = __esmMin((() => {}));
|
|
494427
494212
|
async function handleVerboseCommand(host, args) {
|
|
494428
494213
|
if (!isExperimentalFlagEnabled("session_verbose")) throw new Error("SESSION_VERBOSE_DISABLED");
|
|
494429
494214
|
const command = parseSessionVerbosity(args);
|
|
@@ -504003,7 +503788,6 @@ var init_registry$1 = __esmMin((() => {
|
|
|
504003
503788
|
aliases: [],
|
|
504004
503789
|
descriptionKey: "command.queue.description",
|
|
504005
503790
|
priority: 60,
|
|
504006
|
-
experimentalFlag: "queue_policies",
|
|
504007
503791
|
availability: "idle-only",
|
|
504008
503792
|
argumentHint: "<steer|followup|collect|interrupt> [debounce:<duration>] [cap:<n>] [drop:<summarize|old|new>] | default | reset",
|
|
504009
503793
|
completeArgs: queueArgumentCompletions
|
|
@@ -507347,14 +507131,19 @@ async function handleBlunCodeOAuthLogin(host, options = {}) {
|
|
|
507347
507131
|
}) : void 0;
|
|
507348
507132
|
host.cancelInFlight = cancelLogin;
|
|
507349
507133
|
try {
|
|
507350
|
-
|
|
507351
|
-
|
|
507134
|
+
const status = await host.harness.auth.status(DEFAULT_OAUTH_PROVIDER_NAME);
|
|
507135
|
+
controller.signal.throwIfAborted();
|
|
507136
|
+
alreadyLoggedIn = status.providers.some((provider) => provider.providerName === "managed:blun" && provider.hasToken);
|
|
507137
|
+
const result = await host.harness.auth.login(DEFAULT_OAUTH_PROVIDER_NAME, {
|
|
507352
507138
|
signal: controller.signal,
|
|
507353
507139
|
preserveDefaultModel: true,
|
|
507354
507140
|
onDeviceCode: (data) => {
|
|
507141
|
+
if (controller.signal.aborted) return;
|
|
507355
507142
|
spinner = host.showLoginAuthorizationPrompt(data);
|
|
507356
507143
|
}
|
|
507357
|
-
})
|
|
507144
|
+
});
|
|
507145
|
+
controller.signal.throwIfAborted();
|
|
507146
|
+
showAuthWarnings(host, result.warnings);
|
|
507358
507147
|
spinner?.stop({
|
|
507359
507148
|
ok: true,
|
|
507360
507149
|
label: uiText("auth.login.success")
|
|
@@ -507363,10 +507152,12 @@ async function handleBlunCodeOAuthLogin(host, options = {}) {
|
|
|
507363
507152
|
if (options.refreshConfig !== false) try {
|
|
507364
507153
|
await host.authFlow.refreshConfigAfterLogin();
|
|
507365
507154
|
} catch (refreshError) {
|
|
507155
|
+
if (controller.signal.aborted) return "cancelled";
|
|
507366
507156
|
const message = formatErrorMessage$2(refreshError);
|
|
507367
507157
|
host.showError(uiText("auth.login.refreshFailed", { error: message }));
|
|
507368
507158
|
return "failed";
|
|
507369
507159
|
}
|
|
507160
|
+
controller.signal.throwIfAborted();
|
|
507370
507161
|
host.track("login", {
|
|
507371
507162
|
provider: DEFAULT_OAUTH_PROVIDER_NAME,
|
|
507372
507163
|
method: "oauth",
|
|
@@ -507375,8 +507166,8 @@ async function handleBlunCodeOAuthLogin(host, options = {}) {
|
|
|
507375
507166
|
if (alreadyLoggedIn) host.showStatus(uiText("auth.login.already"));
|
|
507376
507167
|
return "authenticated";
|
|
507377
507168
|
} catch (error) {
|
|
507378
|
-
showAuthWarnings(host, blunAuthWarningsFromError(error));
|
|
507379
507169
|
const cancelled = controller.signal.aborted;
|
|
507170
|
+
if (!cancelled) showAuthWarnings(host, blunAuthWarningsFromError(error));
|
|
507380
507171
|
spinner?.stop({
|
|
507381
507172
|
ok: false,
|
|
507382
507173
|
label: cancelled ? uiText("auth.login.cancelled") : uiText("auth.login.failedLabel")
|
|
@@ -527864,7 +527655,7 @@ function singleLine$1(text) {
|
|
|
527864
527655
|
return sanitizeTerminalText(text).replaceAll(/\s+/g, " ").trim();
|
|
527865
527656
|
}
|
|
527866
527657
|
function sessionSearchText(session) {
|
|
527867
|
-
return singleLine$1(
|
|
527658
|
+
return singleLine$1(`${session.id} ${session.title ?? ""}`);
|
|
527868
527659
|
}
|
|
527869
527660
|
var ELLIPSIS$3, SessionPickerComponent;
|
|
527870
527661
|
var init_session_picker$1 = __esmMin((() => {
|
|
@@ -527907,6 +527698,7 @@ var init_session_picker$1 = __esmMin((() => {
|
|
|
527907
527698
|
this.list = new SearchableList({
|
|
527908
527699
|
items: this.sessions,
|
|
527909
527700
|
toSearchText: sessionSearchText,
|
|
527701
|
+
exactMatch: (session, query) => session.id === query,
|
|
527910
527702
|
pageSize: this.pageSize,
|
|
527911
527703
|
initialIndex,
|
|
527912
527704
|
searchable: true
|
|
@@ -535763,11 +535555,11 @@ var init_session_event_handler = __esmMin((() => {
|
|
|
535763
535555
|
if (event.reason === "completed") this.host.refreshManagedQuotaWindows();
|
|
535764
535556
|
}
|
|
535765
535557
|
handleStepBegin(event) {
|
|
535766
|
-
this.host.commitQueuedSteerAtStepStart(event.turnId);
|
|
535767
535558
|
this.host.streamingUI.flushNow();
|
|
535768
535559
|
this.host.streamingUI.setStep(event.step);
|
|
535769
535560
|
this.host.streamingUI.resetToolUi();
|
|
535770
535561
|
this.host.streamingUI.finalizeLiveTextBuffers("waiting");
|
|
535562
|
+
this.host.commitQueuedSteerAtStepStart(event.turnId);
|
|
535771
535563
|
this.host.patchLivePane({
|
|
535772
535564
|
mode: "waiting",
|
|
535773
535565
|
pendingApproval: null,
|
|
@@ -537754,7 +537546,7 @@ var init_footer = __esmMin((() => {
|
|
|
537754
537546
|
else {
|
|
537755
537547
|
if (gatewayState) gatewayIdentity.push(truncateToWidth(gatewayState.trimEnd(), width));
|
|
537756
537548
|
if (visibleWidth(identity) <= width) gatewayIdentity.push(identity);
|
|
537757
|
-
else gatewayIdentity.push(
|
|
537549
|
+
else if (width > 0) gatewayIdentity.push(...wrapTextWithAnsi(chalk.hex(colors.textDim)(agent), width), ...wrapTextWithAnsi(chalk.hex(colors.textDim)(session), width));
|
|
537758
537550
|
}
|
|
537759
537551
|
}
|
|
537760
537552
|
if (state.gatewayAgentId === void 0 && gatewayState) gatewayIdentity.push(truncateToWidth(gatewayState.trimEnd(), width));
|
|
@@ -545241,13 +545033,20 @@ var init_blun_tui = __esmMin((() => {
|
|
|
545241
545033
|
this.isShuttingDown = true;
|
|
545242
545034
|
this.unregisterSignalHandlers();
|
|
545243
545035
|
this.aborted = true;
|
|
545036
|
+
const cancelInFlight = this.cancelInFlight;
|
|
545037
|
+
this.cancelInFlight = void 0;
|
|
545038
|
+
const stopFailures = [];
|
|
545039
|
+
try {
|
|
545040
|
+
cancelInFlight?.();
|
|
545041
|
+
} catch (error) {
|
|
545042
|
+
stopFailures.push(error);
|
|
545043
|
+
}
|
|
545244
545044
|
this.loopCountdown.dispose();
|
|
545245
545045
|
this.channelQueueDeadline?.dispose();
|
|
545246
|
-
let channelStopFailure;
|
|
545247
545046
|
try {
|
|
545248
545047
|
await this.telegramChannel?.stop();
|
|
545249
545048
|
} catch (error) {
|
|
545250
|
-
|
|
545049
|
+
stopFailures.push(error);
|
|
545251
545050
|
} finally {
|
|
545252
545051
|
this.telegramChannel = void 0;
|
|
545253
545052
|
}
|
|
@@ -545286,7 +545085,8 @@ var init_blun_tui = __esmMin((() => {
|
|
|
545286
545085
|
this.state.ui.stop();
|
|
545287
545086
|
} catch {}
|
|
545288
545087
|
}
|
|
545289
|
-
if (
|
|
545088
|
+
if (stopFailures.length === 1) throw stopFailures[0];
|
|
545089
|
+
if (stopFailures.length > 1) throw new AggregateError(stopFailures, "TUI shutdown failed");
|
|
545290
545090
|
if (this.onExit) await this.onExit(exitCode);
|
|
545291
545091
|
}
|
|
545292
545092
|
registerSignalHandlers() {
|
|
@@ -545598,6 +545398,7 @@ var init_blun_tui = __esmMin((() => {
|
|
|
545598
545398
|
}
|
|
545599
545399
|
}
|
|
545600
545400
|
queueDrainTimer;
|
|
545401
|
+
automaticSteerBatch = false;
|
|
545601
545402
|
queuePolicySteerTimer;
|
|
545602
545403
|
queueCollectionLastInputAt;
|
|
545603
545404
|
queueCollectionLastMonotonicAt;
|
|
@@ -545726,6 +545527,7 @@ var init_blun_tui = __esmMin((() => {
|
|
|
545726
545527
|
commitQueuedSteerAtStepStart(turnId) {
|
|
545727
545528
|
const inFlight = this.queueSteerInFlight;
|
|
545728
545529
|
if (inFlight === void 0 || inFlight.turnId !== String(turnId)) return;
|
|
545530
|
+
if (inFlight.receiptAbort !== void 0 && inFlight.accepted && inFlight.transcriptAnchor === void 0) inFlight.transcriptAnchor = { afterId: this.state.transcriptEntries.at(-1)?.id };
|
|
545729
545531
|
inFlight.stepStarted = true;
|
|
545730
545532
|
this.commitQueuedSteerIfReady(inFlight);
|
|
545731
545533
|
}
|
|
@@ -545858,6 +545660,7 @@ var init_blun_tui = __esmMin((() => {
|
|
|
545858
545660
|
this.queuePolicySteerTimer.unref?.();
|
|
545859
545661
|
}
|
|
545860
545662
|
flushQueuedMessages(draft, draftMode) {
|
|
545663
|
+
this.automaticSteerBatch = false;
|
|
545861
545664
|
if (draft.length > 0) {
|
|
545862
545665
|
this.state.editor.setText("");
|
|
545863
545666
|
if (draftMode === "bash") {
|
|
@@ -545893,7 +545696,8 @@ var init_blun_tui = __esmMin((() => {
|
|
|
545893
545696
|
return;
|
|
545894
545697
|
}
|
|
545895
545698
|
if (isExperimentalFlagEnabled("queue_policies") && this.queueOverflowLedgers.get(JSON.stringify([session.id, agentId]))?.snapshot() !== void 0) return;
|
|
545896
|
-
const
|
|
545699
|
+
const singleLocalInput = this.automaticSteerBatch;
|
|
545700
|
+
const prefixLength = queueSteerPrefixLength(this.state.queuedMessages, agentId, singleLocalInput ? Math.min(limit, 1) : limit);
|
|
545897
545701
|
if (prefixLength === 0) {
|
|
545898
545702
|
if (this.state.queuedMessages[0]?.mode === "channel") this.channelQueueDeadline.requestDeliveryNow();
|
|
545899
545703
|
return;
|
|
@@ -545915,20 +545719,26 @@ var init_blun_tui = __esmMin((() => {
|
|
|
545915
545719
|
this.queueFlushBatchRemaining = Math.max(0, this.queueFlushBatchRemaining - items.length);
|
|
545916
545720
|
for (const item of items) {
|
|
545917
545721
|
if (item.transcriptRendered) continue;
|
|
545918
|
-
|
|
545722
|
+
const entry = {
|
|
545919
545723
|
id: nextTranscriptId(),
|
|
545920
545724
|
kind: "user",
|
|
545921
545725
|
turnId,
|
|
545922
545726
|
renderMode: "plain",
|
|
545923
545727
|
content: item.text.trim()
|
|
545924
|
-
}
|
|
545728
|
+
};
|
|
545729
|
+
if (inFlight.transcriptAnchor !== void 0) {
|
|
545730
|
+
this.insertSteerTranscriptEntry(entry, inFlight.transcriptAnchor.afterId);
|
|
545731
|
+
inFlight.transcriptAnchor = { afterId: entry.id };
|
|
545732
|
+
} else this.appendTranscriptEntry(entry);
|
|
545925
545733
|
}
|
|
545926
545734
|
}
|
|
545927
545735
|
};
|
|
545928
545736
|
this.queueSteerInFlight = inFlight;
|
|
545929
545737
|
if (inFlight.receiptAbort !== void 0) {
|
|
545930
545738
|
const abort = inFlight.receiptAbort;
|
|
545931
|
-
this.withInteractiveAgent(agentId, () => deliverQueueSteer(session, items.map((item) => item.text.trim()).join("\n\n"), expectedTurnId, abort.signal
|
|
545739
|
+
this.withInteractiveAgent(agentId, () => deliverQueueSteer(session, items.map((item) => item.text.trim()).join("\n\n"), expectedTurnId, abort.signal, () => {
|
|
545740
|
+
if (this.session === session && this.queueSteerInFlight === inFlight) inFlight.accepted = true;
|
|
545741
|
+
})).then((disposition) => {
|
|
545932
545742
|
if (this.session !== session || this.queueSteerInFlight !== inFlight) return;
|
|
545933
545743
|
if (disposition !== "context") {
|
|
545934
545744
|
this.restoreQueuedSteer(inFlight);
|
|
@@ -546878,18 +546688,20 @@ var init_blun_tui = __esmMin((() => {
|
|
|
546878
546688
|
}
|
|
546879
546689
|
queuePolicyForSession(session) {
|
|
546880
546690
|
const snapshot = this.sessionQueuePolicy;
|
|
546691
|
+
if (session !== void 0 && session.connectionKind !== "gateway" && !isExperimentalFlagEnabled("queue_policies")) return effectiveSessionQueuePolicy(snapshot?.sessionId === session.id && snapshot.state.kind === "override" ? snapshot.state.policy : void 0, true);
|
|
546881
546692
|
if (!isExperimentalFlagEnabled("queue_policies") || session === void 0 || snapshot?.sessionId !== session.id || snapshot.state.kind === "invalid") return void 0;
|
|
546882
|
-
return
|
|
546693
|
+
return effectiveSessionQueuePolicy(snapshot.state.kind === "override" ? snapshot.state.policy : void 0, false);
|
|
546883
546694
|
}
|
|
546884
546695
|
queuePolicyBlocksInput(session) {
|
|
546885
546696
|
return isExperimentalFlagEnabled("queue_policies") && this.session === session && (this.queuePolicyPendingVersion !== void 0 || this.sessionQueuePolicy?.sessionId === session.id && this.sessionQueuePolicy.state.kind === "invalid");
|
|
546886
546697
|
}
|
|
546887
546698
|
async executeSessionQueueCommand(args) {
|
|
546888
546699
|
if (this.aborted || this.isShuttingDown) return void 0;
|
|
546889
|
-
if (!isExperimentalFlagEnabled("queue_policies")) throw new Error("QUEUE_POLICIES_DISABLED");
|
|
546890
546700
|
const session = this.requireSession();
|
|
546701
|
+
if (!isExperimentalFlagEnabled("queue_policies") && session.connectionKind === "gateway") throw new Error("QUEUE_POLICIES_DISABLED");
|
|
546891
546702
|
const command = parseQueuePolicy(args);
|
|
546892
546703
|
if (command.kind === "invalid") throw new Error("INVALID_QUEUE_POLICY");
|
|
546704
|
+
if (!isExperimentalFlagEnabled("queue_policies") && command.kind === "set" && command.policy.mode !== "steer" && command.policy.mode !== "followup") throw new Error("QUEUE_POLICIES_DISABLED");
|
|
546893
546705
|
if (command.kind === "status") {
|
|
546894
546706
|
const state = await loadQueuePolicy(session);
|
|
546895
546707
|
return this.session === session ? state : void 0;
|
|
@@ -546909,7 +546721,7 @@ var init_blun_tui = __esmMin((() => {
|
|
|
546909
546721
|
this.queueCollectionLastInputAt = void 0;
|
|
546910
546722
|
this.queueCollectionLastMonotonicAt = void 0;
|
|
546911
546723
|
this.queuePolicyPendingVersion = void 0;
|
|
546912
|
-
if (!isExperimentalFlagEnabled("queue_policies")) return;
|
|
546724
|
+
if (!isExperimentalFlagEnabled("queue_policies") && (session.connectionKind === "gateway" || typeof session.getSessionMetadata !== "function")) return;
|
|
546913
546725
|
if (this.aborted || this.isShuttingDown || owner?.aborted) return;
|
|
546914
546726
|
const isCurrent = () => !this.aborted && !this.isShuttingDown && !owner?.aborted && this.session === session && this.queuePolicyRefreshVersion === version;
|
|
546915
546727
|
this.queuePolicyPendingVersion = version;
|
|
@@ -546952,6 +546764,7 @@ var init_blun_tui = __esmMin((() => {
|
|
|
546952
546764
|
const policy = this.queuePolicyForSession(session);
|
|
546953
546765
|
const timedSteer = isExperimentalFlagEnabled("queue_policies") && policy?.mode === "steer" && options?.parts === void 0 && (options?.imageAttachmentIds?.length ?? 0) === 0 && (this.state.appState.streamingPhase !== "idle" || this.state.queuedMessages.length > 0);
|
|
546954
546766
|
if (timedSteer) {
|
|
546767
|
+
this.automaticSteerBatch = true;
|
|
546955
546768
|
this.queueCollectionLastInputAt = Date.now();
|
|
546956
546769
|
this.queueCollectionLastMonotonicAt = performance.now();
|
|
546957
546770
|
}
|
|
@@ -547026,6 +546839,12 @@ var init_blun_tui = __esmMin((() => {
|
|
|
547026
546839
|
}
|
|
547027
546840
|
if (this.deferUserMessages || this.manualPromptInFlight !== void 0 || this.state.queuedMessages.length > 0 || this.state.appState.streamingPhase !== "idle" || this.state.appState.isCompacting) {
|
|
547028
546841
|
this.enqueueMessage(input, options);
|
|
546842
|
+
if (session.connectionKind !== "gateway" && !isExperimentalFlagEnabled("queue_policies") && policy?.mode === "steer" && options?.parts === void 0 && (options?.imageAttachmentIds?.length ?? 0) === 0) {
|
|
546843
|
+
this.queueFlushBatchRemaining = this.state.queuedMessages.length + (this.queueSteerInFlight?.items.length ?? 0);
|
|
546844
|
+
this.automaticSteerBatch = true;
|
|
546845
|
+
if (this.manualPromptInFlight?.session === session) this.manualPromptInFlight.flushRequested = true;
|
|
546846
|
+
this.steerQueueFlushPrefix();
|
|
546847
|
+
}
|
|
547029
546848
|
if (timedSteer) {
|
|
547030
546849
|
this.queueFlushBatchRemaining = this.state.queuedMessages.length + (this.queueSteerInFlight?.items.length ?? 0);
|
|
547031
546850
|
this.schedulePolicySteer();
|
|
@@ -548063,6 +547882,31 @@ var init_blun_tui = __esmMin((() => {
|
|
|
548063
547882
|
const merged = this.mergeCurrentTurnSteps();
|
|
548064
547883
|
if (component || trimmed || merged) this.state.ui.requestRender();
|
|
548065
547884
|
}
|
|
547885
|
+
insertSteerTranscriptEntry(entry, afterId) {
|
|
547886
|
+
const anchor = afterId === void 0 ? -1 : this.state.transcriptEntries.findIndex((item) => item.id === afterId);
|
|
547887
|
+
if (afterId !== void 0 && anchor < 0) {
|
|
547888
|
+
this.appendTranscriptEntry(entry);
|
|
547889
|
+
return;
|
|
547890
|
+
}
|
|
547891
|
+
this.state.transcriptEntries.splice(anchor + 1, 0, entry);
|
|
547892
|
+
const component = this.createTranscriptComponent(entry);
|
|
547893
|
+
if (component) {
|
|
547894
|
+
markTranscriptComponent(component, entry);
|
|
547895
|
+
const children = this.state.transcriptContainer.children;
|
|
547896
|
+
if (afterId === void 0) {
|
|
547897
|
+
const firstEntry = children.findIndex((child) => getTranscriptComponentEntry(child) !== void 0);
|
|
547898
|
+
if (firstEntry < 0) this.state.transcriptContainer.addChild(component);
|
|
547899
|
+
else children.splice(firstEntry, 0, component);
|
|
547900
|
+
} else {
|
|
547901
|
+
const childAnchor = children.findIndex((child) => getTranscriptComponentEntry(child)?.id === afterId);
|
|
547902
|
+
if (childAnchor < 0) this.state.transcriptContainer.addChild(component);
|
|
547903
|
+
else children.splice(childAnchor + 1, 0, component);
|
|
547904
|
+
}
|
|
547905
|
+
}
|
|
547906
|
+
this.trimTranscriptWindow();
|
|
547907
|
+
this.mergeCurrentTurnSteps();
|
|
547908
|
+
this.state.ui.requestRender();
|
|
547909
|
+
}
|
|
548066
547910
|
appendApprovalTranscriptEntry(request, response) {
|
|
548067
547911
|
if (request.toolName === "ExitPlanMode" || request.display.kind === "plan_review" || request.display.kind === "goal_start") return;
|
|
548068
547912
|
let decision;
|
|
@@ -548411,7 +548255,7 @@ var init_blun_tui = __esmMin((() => {
|
|
|
548411
548255
|
}
|
|
548412
548256
|
updateQueueDisplay() {
|
|
548413
548257
|
this.state.queueContainer.clear();
|
|
548414
|
-
const queued = this.state.queuedMessages;
|
|
548258
|
+
const queued = [...this.queueSteerInFlight?.items ?? [], ...this.state.queuedMessages];
|
|
548415
548259
|
if (queued.length === 0) return;
|
|
548416
548260
|
this.state.queueContainer.addChild(new QueuePaneComponent({
|
|
548417
548261
|
messages: queued,
|