blun-king-cli 9.1.31 → 9.1.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -9,7 +9,7 @@ Voraussetzung ist Node.js 24.15 oder neuer. Die geprüfte Version wird exakt
9
9
  installiert:
10
10
 
11
11
  ```powershell
12
- npm install -g blun-king-cli@9.1.31
12
+ npm install -g blun-king-cli@9.1.32
13
13
  ```
14
14
 
15
15
  ## Reproduzierbares Staging und Packen
@@ -306,8 +306,14 @@ async function runLauncher(options = {}) {
306
306
  return;
307
307
  }
308
308
 
309
- const privatePaths = resolveLauncherPrivatePaths();
310
- const nodeRuntime = await prepareManagedNodeRuntime({ blunDir: privatePaths.blunHome });
309
+ let privatePaths;
310
+ const getPrivatePaths = () => {
311
+ privatePaths ||= resolveLauncherPrivatePaths();
312
+ return privatePaths;
313
+ };
314
+ const nodeRuntime = await prepareManagedNodeRuntime({
315
+ getBlunDir: () => getPrivatePaths().blunHome,
316
+ });
311
317
  if (nodeRuntime.kind === 'failed') {
312
318
  process.stderr.write(`${nodeRuntime.message}\n`);
313
319
  process.exitCode = 1;
@@ -330,7 +336,7 @@ async function runLauncher(options = {}) {
330
336
  return;
331
337
  }
332
338
 
333
- const blunDir = privatePaths.blunHome;
339
+ const blunDir = getPrivatePaths().blunHome;
334
340
  ensurePrivateDirectory(blunDir);
335
341
 
336
342
  // --- 1. Oeffentlicher npm-Update-Dialog. -------------------------------
@@ -12,12 +12,28 @@ const MAX_ARCHIVE_BYTES = 100 * 1024 * 1024;
12
12
  const DISTRIBUTIONS = {
13
13
  'darwin-arm64': {
14
14
  archive: `node-v${NODE_VERSION}-darwin-arm64.tar.gz`,
15
+ binary: path.join('bin', 'node'),
16
+ format: 'tar.gz',
15
17
  sha256: '372331b969779ab5d15b949884fc6eaf88d5afe87bde8ba881d6400b9100ffc4',
16
18
  },
17
19
  'darwin-x64': {
18
20
  archive: `node-v${NODE_VERSION}-darwin-x64.tar.gz`,
21
+ binary: path.join('bin', 'node'),
22
+ format: 'tar.gz',
19
23
  sha256: 'ffd5ee293467927f3ee731a553eb88fd1f48cf74eebc2d74a6babe4af228673b',
20
24
  },
25
+ 'win32-arm64': {
26
+ archive: `node-v${NODE_VERSION}-win-arm64.zip`,
27
+ binary: 'node.exe',
28
+ format: 'zip',
29
+ sha256: 'c9eb7402eda26e2ba7e44b6727fc85a8de56c5095b1f71ebd3062892211aa116',
30
+ },
31
+ 'win32-x64': {
32
+ archive: `node-v${NODE_VERSION}-win-x64.zip`,
33
+ binary: 'node.exe',
34
+ format: 'zip',
35
+ sha256: 'cc5149eabd53779ce1e7bdc5401643622d0c7e6800ade18928a767e940bb0e62',
36
+ },
21
37
  };
22
38
 
23
39
  function distributionFor(platform, arch) {
@@ -85,6 +101,27 @@ function usableNode(binary) {
85
101
  return result.status === 0 && result.stdout.trim() === `v${NODE_VERSION}`;
86
102
  }
87
103
 
104
+ function archiveRootName(distribution) {
105
+ const suffix = distribution.format === 'zip' ? '.zip' : '.tar.gz';
106
+ if (!distribution.archive.endsWith(suffix)) {
107
+ throw new Error('Unbekanntes Format der Node.js-Laufzeit.');
108
+ }
109
+ return distribution.archive.slice(0, -suffix.length);
110
+ }
111
+
112
+ function unpackArchive(archive, destination, distribution, platform) {
113
+ const command = platform === 'win32'
114
+ ? path.join(process.env.SystemRoot || 'C:\\Windows', 'System32', 'tar.exe')
115
+ : '/usr/bin/tar';
116
+ const args = distribution.format === 'zip'
117
+ ? ['-xf', archive, '-C', destination]
118
+ : ['-xzf', archive, '-C', destination];
119
+ return spawnSync(command, args, {
120
+ encoding: 'utf8',
121
+ timeout: 120_000,
122
+ });
123
+ }
124
+
88
125
  async function ensureManagedNode(blunHome, platform, arch) {
89
126
  const distribution = distributionFor(platform, arch);
90
127
  if (!distribution) {
@@ -99,7 +136,7 @@ async function ensureManagedNode(blunHome, platform, arch) {
99
136
  'node',
100
137
  `v${NODE_VERSION}-${platform}-${arch}`,
101
138
  );
102
- const binary = path.join(installDir, 'bin', 'node');
139
+ const binary = path.join(installDir, distribution.binary);
103
140
  if (usableNode(binary)) return binary;
104
141
 
105
142
  const staging = fs.mkdtempSync(path.join(os.tmpdir(), 'blun-node-runtime-'));
@@ -115,13 +152,10 @@ async function ensureManagedNode(blunHome, platform, arch) {
115
152
  throw new Error('Die SHA-256-Pruefsumme der Node.js-Laufzeit stimmt nicht.');
116
153
  }
117
154
 
118
- const extractedName = distribution.archive.slice(0, -'.tar.gz'.length);
155
+ const extractedName = archiveRootName(distribution);
119
156
  const extractedDir = path.join(staging, extractedName);
120
- const unpacked = spawnSync('/usr/bin/tar', ['-xzf', archive, '-C', staging], {
121
- encoding: 'utf8',
122
- timeout: 120_000,
123
- });
124
- if (unpacked.status !== 0 || !usableNode(path.join(extractedDir, 'bin', 'node'))) {
157
+ const unpacked = unpackArchive(archive, staging, distribution, platform);
158
+ if (unpacked.status !== 0 || !usableNode(path.join(extractedDir, distribution.binary))) {
125
159
  const detail = (unpacked.stderr || '').trim();
126
160
  throw new Error(
127
161
  `Die Node.js-Laufzeit konnte nicht entpackt werden${detail ? `: ${detail}` : '.'}`,
@@ -145,6 +179,8 @@ module.exports = {
145
179
  NODE_VERSION,
146
180
  distributionFor,
147
181
  ensureManagedNode,
182
+ archiveRootName,
148
183
  sha256File,
184
+ unpackArchive,
149
185
  usableNode,
150
186
  };
@@ -9,11 +9,12 @@ async function prepareManagedNodeRuntime(options = {}) {
9
9
  const arch = options.arch || process.arch;
10
10
  const message = unsupportedNodeMessage(version, platform);
11
11
  if (message === null) return { kind: 'current' };
12
- if (platform !== 'darwin') return { kind: 'failed', message };
12
+ if (platform !== 'darwin' && platform !== 'win32') return { kind: 'failed', message };
13
13
 
14
14
  try {
15
+ const blunDir = options.blunDir || options.getBlunDir?.();
15
16
  const binary = await (options.ensureManagedNode || ensureManagedNode)(
16
- options.blunDir,
17
+ blunDir,
17
18
  platform,
18
19
  arch,
19
20
  );
@@ -32,6 +32,8 @@ function unsupportedNodeMessage(version, platform) {
32
32
 
33
33
  if (platform === 'darwin') {
34
34
  lines.push(`Falls die automatische Einrichtung scheitert: nvm install ${MINIMUM_NODE_VERSION}`);
35
+ } else if (platform === 'win32') {
36
+ lines.push(`Falls die automatische Einrichtung scheitert: Node.js ${MINIMUM_NODE_VERSION} oder neuer von https://nodejs.org/ installieren.`);
35
37
  } else {
36
38
  lines.push(`Node.js ${MINIMUM_NODE_VERSION} oder neuer installieren: https://nodejs.org/`);
37
39
  }
package/blun.mjs CHANGED
@@ -6,14 +6,14 @@ const __filename = __cjsShimFileURLToPath(import.meta.url);
6
6
  const __dirname = __cjsShimDirname(__filename);
7
7
  import { createRequire } from "node:module";
8
8
  import crypto$1, { createHash, randomBytes, randomInt, randomUUID, timingSafeEqual } from "node:crypto";
9
- import * as fs$16 from "node:fs";
9
+ import * as fs$17 from "node:fs";
10
10
  import Kt, { accessSync, appendFileSync, chmodSync, closeSync, constants, copyFileSync, createReadStream, createWriteStream, existsSync, fsyncSync, linkSync, lstatSync, mkdirSync, openSync, promises, readFileSync, readSync, readdirSync, realpathSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync, writeSync } from "node:fs";
11
11
  import * as path$17 from "node:path";
12
12
  import path, { basename, dirname, extname, isAbsolute, join, normalize, posix, relative, resolve, sep, win32 } from "node:path";
13
13
  import { Blob as Blob$1, Buffer as Buffer$1, File as File$1 } from "node:buffer";
14
14
  import * as nodeOs from "node:os";
15
15
  import os, { arch, homedir, hostname, networkInterfaces, platform, release, tmpdir, type, userInfo } from "node:os";
16
- import ro, { access, appendFile, chmod, constants as constants$1, copyFile, cp, link, lstat, mkdir, mkdtemp, open, readFile, readdir, realpath, rename, rm, stat, unlink, writeFile } from "node:fs/promises";
16
+ import fs, { access, appendFile, chmod, constants as constants$1, copyFile, cp, link, lstat, mkdir, mkdtemp, open, readFile, readdir, realpath, rename, rm, stat, unlink, writeFile } from "node:fs/promises";
17
17
  import { execFile, execFileSync, execSync, spawn, spawnSync } from "node:child_process";
18
18
  import * as sysPath from "path";
19
19
  import path$1, { basename as basename$1, dirname as dirname$1, join as join$1, parse } from "path";
@@ -2072,11 +2072,11 @@ var init_blun_files = __esmMin((() => {
2072
2072
  async uploadVideo(input, options) {
2073
2073
  let file;
2074
2074
  if (typeof input === "string") {
2075
- if (!fs$16.existsSync(input)) throw new ChatProviderError(`Video file not found: ${input}`);
2075
+ if (!fs$17.existsSync(input)) throw new ChatProviderError(`Video file not found: ${input}`);
2076
2076
  const filename = path$17.basename(input);
2077
2077
  const mimeType = guessMimeTypeFromExt(filename);
2078
2078
  if (mimeType === void 0 || !mimeType.startsWith("video/")) throw new ChatProviderError(`BlunFiles.uploadVideo: file extension does not indicate a video type: ${filename}`);
2079
- const data = await fs$16.promises.readFile(input);
2079
+ const data = await fs$17.promises.readFile(input);
2080
2080
  file = new File$1([new Blob$1([new Uint8Array(data)], { type: mimeType })], filename, { type: mimeType });
2081
2081
  } else {
2082
2082
  if (!input.mimeType.startsWith("video/")) throw new ChatProviderError(`Expected a video mime type, got ${input.mimeType}`);
@@ -11432,7 +11432,7 @@ var require_clone$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11432
11432
  //#endregion
11433
11433
  //#region ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js
11434
11434
  var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11435
- var fs$15 = __require("fs");
11435
+ var fs$16 = __require("fs");
11436
11436
  var polyfills = require_polyfills();
11437
11437
  var legacy = require_legacy_streams();
11438
11438
  var clone = require_clone$1();
@@ -11461,36 +11461,36 @@ var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11461
11461
  m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
11462
11462
  console.error(m);
11463
11463
  };
11464
- if (!fs$15[gracefulQueue]) {
11465
- publishQueue(fs$15, global[gracefulQueue] || []);
11466
- fs$15.close = (function(fs$close) {
11464
+ if (!fs$16[gracefulQueue]) {
11465
+ publishQueue(fs$16, global[gracefulQueue] || []);
11466
+ fs$16.close = (function(fs$close) {
11467
11467
  function close(fd, cb) {
11468
- return fs$close.call(fs$15, fd, function(err) {
11468
+ return fs$close.call(fs$16, fd, function(err) {
11469
11469
  if (!err) resetQueue();
11470
11470
  if (typeof cb === "function") cb.apply(this, arguments);
11471
11471
  });
11472
11472
  }
11473
11473
  Object.defineProperty(close, previousSymbol, { value: fs$close });
11474
11474
  return close;
11475
- })(fs$15.close);
11476
- fs$15.closeSync = (function(fs$closeSync) {
11475
+ })(fs$16.close);
11476
+ fs$16.closeSync = (function(fs$closeSync) {
11477
11477
  function closeSync(fd) {
11478
- fs$closeSync.apply(fs$15, arguments);
11478
+ fs$closeSync.apply(fs$16, arguments);
11479
11479
  resetQueue();
11480
11480
  }
11481
11481
  Object.defineProperty(closeSync, previousSymbol, { value: fs$closeSync });
11482
11482
  return closeSync;
11483
- })(fs$15.closeSync);
11483
+ })(fs$16.closeSync);
11484
11484
  if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) process.on("exit", function() {
11485
- debug(fs$15[gracefulQueue]);
11486
- __require("assert").equal(fs$15[gracefulQueue].length, 0);
11485
+ debug(fs$16[gracefulQueue]);
11486
+ __require("assert").equal(fs$16[gracefulQueue].length, 0);
11487
11487
  });
11488
11488
  }
11489
- if (!global[gracefulQueue]) publishQueue(global, fs$15[gracefulQueue]);
11490
- module.exports = patch(clone(fs$15));
11491
- if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs$15.__patched) {
11492
- module.exports = patch(fs$15);
11493
- fs$15.__patched = true;
11489
+ if (!global[gracefulQueue]) publishQueue(global, fs$16[gracefulQueue]);
11490
+ module.exports = patch(clone(fs$16));
11491
+ if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs$16.__patched) {
11492
+ module.exports = patch(fs$16);
11493
+ fs$16.__patched = true;
11494
11494
  }
11495
11495
  function patch(fs) {
11496
11496
  polyfills(fs);
@@ -11745,23 +11745,23 @@ var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11745
11745
  }
11746
11746
  function enqueue(elem) {
11747
11747
  debug("ENQUEUE", elem[0].name, elem[1]);
11748
- fs$15[gracefulQueue].push(elem);
11748
+ fs$16[gracefulQueue].push(elem);
11749
11749
  retry();
11750
11750
  }
11751
11751
  var retryTimer;
11752
11752
  function resetQueue() {
11753
11753
  var now = Date.now();
11754
- for (var i = 0; i < fs$15[gracefulQueue].length; ++i) if (fs$15[gracefulQueue][i].length > 2) {
11755
- fs$15[gracefulQueue][i][3] = now;
11756
- fs$15[gracefulQueue][i][4] = now;
11754
+ for (var i = 0; i < fs$16[gracefulQueue].length; ++i) if (fs$16[gracefulQueue][i].length > 2) {
11755
+ fs$16[gracefulQueue][i][3] = now;
11756
+ fs$16[gracefulQueue][i][4] = now;
11757
11757
  }
11758
11758
  retry();
11759
11759
  }
11760
11760
  function retry() {
11761
11761
  clearTimeout(retryTimer);
11762
11762
  retryTimer = void 0;
11763
- if (fs$15[gracefulQueue].length === 0) return;
11764
- var elem = fs$15[gracefulQueue].shift();
11763
+ if (fs$16[gracefulQueue].length === 0) return;
11764
+ var elem = fs$16[gracefulQueue].shift();
11765
11765
  var fn = elem[0];
11766
11766
  var args = elem[1];
11767
11767
  var err = elem[2];
@@ -11780,7 +11780,7 @@ var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11780
11780
  if (sinceAttempt >= Math.min(sinceStart * 1.2, 100)) {
11781
11781
  debug("RETRY", fn.name, args);
11782
11782
  fn.apply(null, args.concat([startTime]));
11783
- } else fs$15[gracefulQueue].push(elem);
11783
+ } else fs$16[gracefulQueue].push(elem);
11784
11784
  }
11785
11785
  if (retryTimer === void 0) retryTimer = setTimeout(retry, 0);
11786
11786
  }
@@ -14616,7 +14616,7 @@ async function syncDir(dirPath) {
14616
14616
  */
14617
14617
  function syncFd(fd) {
14618
14618
  return new Promise((resolve, reject) => {
14619
- fs$16.fsync(fd, (err) => {
14619
+ fs$17.fsync(fd, (err) => {
14620
14620
  if (err) {
14621
14621
  reject(err);
14622
14622
  return;
@@ -26793,7 +26793,7 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
26793
26793
  };
26794
26794
  return _setPrototypeOf(o, p);
26795
26795
  }
26796
- var fs$14 = __require("fs");
26796
+ var fs$15 = __require("fs");
26797
26797
  var path$14 = __require("path");
26798
26798
  var Loader = require_loader();
26799
26799
  var PrecompiledLoader = require_precompiled_loader().PrecompiledLoader;
@@ -26817,7 +26817,7 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
26817
26817
  } catch (e) {
26818
26818
  throw new Error("watch requires chokidar to be installed");
26819
26819
  }
26820
- var paths = _this.searchPaths.filter(fs$14.existsSync);
26820
+ var paths = _this.searchPaths.filter(fs$15.existsSync);
26821
26821
  var watcher = chokidar.watch(paths);
26822
26822
  watcher.on("all", function(event, fullname) {
26823
26823
  fullname = path$14.resolve(fullname);
@@ -26836,7 +26836,7 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
26836
26836
  for (var i = 0; i < paths.length; i++) {
26837
26837
  var basePath = path$14.resolve(paths[i]);
26838
26838
  var p = path$14.resolve(paths[i], name);
26839
- if (p.indexOf(basePath) === 0 && fs$14.existsSync(p)) {
26839
+ if (p.indexOf(basePath) === 0 && fs$15.existsSync(p)) {
26840
26840
  fullpath = p;
26841
26841
  break;
26842
26842
  }
@@ -26844,7 +26844,7 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
26844
26844
  if (!fullpath) return null;
26845
26845
  this.pathsToNames[fullpath] = name;
26846
26846
  var source = {
26847
- src: fs$14.readFileSync(fullpath, "utf-8"),
26847
+ src: fs$15.readFileSync(fullpath, "utf-8"),
26848
26848
  path: fullpath,
26849
26849
  noCache: this.noCache
26850
26850
  };
@@ -26892,7 +26892,7 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
26892
26892
  }
26893
26893
  this.pathsToNames[fullpath] = name;
26894
26894
  var source = {
26895
- src: fs$14.readFileSync(fullpath, "utf-8"),
26895
+ src: fs$15.readFileSync(fullpath, "utf-8"),
26896
26896
  path: fullpath,
26897
26897
  noCache: this.noCache
26898
26898
  };
@@ -27636,7 +27636,7 @@ var require_precompile_global = /* @__PURE__ */ __commonJSMin(((exports, module)
27636
27636
  //#endregion
27637
27637
  //#region ../../node_modules/.pnpm/nunjucks@3.2.4_chokidar@4.0.3/node_modules/nunjucks/src/precompile.js
27638
27638
  var require_precompile = /* @__PURE__ */ __commonJSMin(((exports, module) => {
27639
- var fs$13 = __require("fs");
27639
+ var fs$14 = __require("fs");
27640
27640
  var path$12 = __require("path");
27641
27641
  var _prettifyError = require_lib$7()._prettifyError;
27642
27642
  var compiler = require_compiler();
@@ -27661,27 +27661,27 @@ var require_precompile = /* @__PURE__ */ __commonJSMin(((exports, module) => {
27661
27661
  var env = opts.env || new Environment([]);
27662
27662
  var wrapper = opts.wrapper || precompileGlobal;
27663
27663
  if (opts.isString) return precompileString(input, opts);
27664
- var pathStats = fs$13.existsSync(input) && fs$13.statSync(input);
27664
+ var pathStats = fs$14.existsSync(input) && fs$14.statSync(input);
27665
27665
  var precompiled = [];
27666
27666
  var templates = [];
27667
27667
  function addTemplates(dir) {
27668
- fs$13.readdirSync(dir).forEach(function(file) {
27668
+ fs$14.readdirSync(dir).forEach(function(file) {
27669
27669
  var filepath = path$12.join(dir, file);
27670
27670
  var subpath = filepath.substr(path$12.join(input, "/").length);
27671
- var stat = fs$13.statSync(filepath);
27671
+ var stat = fs$14.statSync(filepath);
27672
27672
  if (stat && stat.isDirectory()) {
27673
27673
  subpath += "/";
27674
27674
  if (!match(subpath, opts.exclude)) addTemplates(filepath);
27675
27675
  } else if (match(subpath, opts.include)) templates.push(filepath);
27676
27676
  });
27677
27677
  }
27678
- if (pathStats.isFile()) precompiled.push(_precompile(fs$13.readFileSync(input, "utf-8"), opts.name || input, env));
27678
+ if (pathStats.isFile()) precompiled.push(_precompile(fs$14.readFileSync(input, "utf-8"), opts.name || input, env));
27679
27679
  else if (pathStats.isDirectory()) {
27680
27680
  addTemplates(input);
27681
27681
  for (var i = 0; i < templates.length; i++) {
27682
27682
  var name = templates[i].replace(path$12.join(input, "/"), "");
27683
27683
  try {
27684
- precompiled.push(_precompile(fs$13.readFileSync(templates[i], "utf-8"), name, env));
27684
+ precompiled.push(_precompile(fs$14.readFileSync(templates[i], "utf-8"), name, env));
27685
27685
  } catch (e) {
27686
27686
  if (opts.force) console.error(e);
27687
27687
  else throw e;
@@ -36246,7 +36246,7 @@ var require_gifframe = /* @__PURE__ */ __commonJSMin(((exports) => {
36246
36246
  //#region ../../node_modules/.pnpm/gifwrap@0.10.1/node_modules/gifwrap/src/gifutil.js
36247
36247
  var require_gifutil = /* @__PURE__ */ __commonJSMin(((exports) => {
36248
36248
  /** @namespace GifUtil */
36249
- const fs$12 = __require("fs");
36249
+ const fs$13 = __require("fs");
36250
36250
  const ImageQ = require_image_q();
36251
36251
  const BitmapImage = require_bitmapimage();
36252
36252
  const { GifFrame } = require_gifframe();
@@ -36513,7 +36513,7 @@ var require_gifutil = /* @__PURE__ */ __commonJSMin(((exports) => {
36513
36513
  }
36514
36514
  function _readBinary(path) {
36515
36515
  return new Promise((resolve, reject) => {
36516
- fs$12.readFile(path, (err, buffer) => {
36516
+ fs$13.readFile(path, (err, buffer) => {
36517
36517
  if (err) return reject(err);
36518
36518
  return resolve(buffer);
36519
36519
  });
@@ -36521,7 +36521,7 @@ var require_gifutil = /* @__PURE__ */ __commonJSMin(((exports) => {
36521
36521
  }
36522
36522
  function _writeBinary(path, buffer) {
36523
36523
  return new Promise((resolve, reject) => {
36524
- fs$12.writeFile(path, buffer, (err) => {
36524
+ fs$13.writeFile(path, buffer, (err) => {
36525
36525
  if (err) return reject(err);
36526
36526
  return resolve();
36527
36527
  });
@@ -62339,7 +62339,7 @@ var init_file_type = __esmMin((() => {
62339
62339
  }
62340
62340
  async fromFile(path) {
62341
62341
  this.options.signal?.throwIfAborted();
62342
- const fileHandle = await ro.open(path, constants.O_RDONLY | constants.O_NONBLOCK);
62342
+ const fileHandle = await fs.open(path, constants.O_RDONLY | constants.O_NONBLOCK);
62343
62343
  const fileStat = await fileHandle.stat();
62344
62344
  if (!fileStat.isFile()) {
62345
62345
  await fileHandle.close();
@@ -252497,7 +252497,7 @@ function Yn(s, t) {
252497
252497
  function Kn(s, t) {
252498
252498
  s.head = new ue$1(t, void 0, s.head, s), s.tail || (s.tail = s.head), s.length++;
252499
252499
  }
252500
- 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$11, 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;
252500
+ 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;
252501
252501
  var init_index_min = __esmMin((() => {
252502
252502
  zr = Object.defineProperty;
252503
252503
  Ur = (s, t) => {
@@ -254467,7 +254467,7 @@ while (this[Zs](this[st$1].shift()));
254467
254467
  constructor(t, e) {
254468
254468
  this.path = t || "./", this.absolute = e;
254469
254469
  }
254470
- }, 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$11 = Symbol("ondrain"), wt = class extends A$1 {
254470
+ }, 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 {
254471
254471
  sync = !1;
254472
254472
  opt;
254473
254473
  cwd;
@@ -254500,8 +254500,8 @@ while (this[Zs](this[st$1].shift()));
254500
254500
  if ((t.gzip ? 1 : 0) + (t.brotli ? 1 : 0) + (t.zstd ? 1 : 0) > 1) throw new TypeError("gzip, brotli, zstd are mutually exclusive");
254501
254501
  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");
254502
254502
  let e = this.zip;
254503
- e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[fs$11]()), this.on("resume", () => e.resume());
254504
- } else this.on("drain", this[fs$11]);
254503
+ e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[fs$12]()), this.on("resume", () => e.resume());
254504
+ } else this.on("drain", this[fs$12]);
254505
254505
  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;
254506
254506
  }
254507
254507
  [lr](t) {
@@ -254628,7 +254628,7 @@ while (this[Zs](this[st$1].shift()));
254628
254628
  this.emit("error", e);
254629
254629
  }
254630
254630
  }
254631
- [fs$11]() {
254631
+ [fs$12]() {
254632
254632
  this[Et] && this[Et].entry && this[Et].entry.resume();
254633
254633
  }
254634
254634
  [di](t) {
@@ -254794,7 +254794,7 @@ while (this[Zs](this[st$1].shift()));
254794
254794
  E ? e(E) : x && a ? Es(x, o, h, (Le) => y(Le)) : n ? Kt.chmod(s, r, e) : e();
254795
254795
  };
254796
254796
  if (s === d) return no(s, y);
254797
- if (l) return ro.mkdir(s, {
254797
+ if (l) return fs.mkdir(s, {
254798
254798
  mode: r,
254799
254799
  recursive: !0
254800
254800
  }).then((E) => y(null, E ?? void 0), y);
@@ -255553,7 +255553,7 @@ var require_pend = /* @__PURE__ */ __commonJSMin(((exports, module) => {
255553
255553
  //#endregion
255554
255554
  //#region ../../node_modules/.pnpm/yauzl@3.3.0/node_modules/yauzl/fd-slicer.js
255555
255555
  var require_fd_slicer = /* @__PURE__ */ __commonJSMin(((exports) => {
255556
- var fs$10 = __require("fs");
255556
+ var fs$11 = __require("fs");
255557
255557
  var util$6 = __require("util");
255558
255558
  var stream$2 = __require("stream");
255559
255559
  var Readable = stream$2.Readable;
@@ -255578,7 +255578,7 @@ var require_fd_slicer = /* @__PURE__ */ __commonJSMin(((exports) => {
255578
255578
  FdSlicer.prototype.read = function(buffer, offset, length, position, callback) {
255579
255579
  var self = this;
255580
255580
  self.pend.go(function(cb) {
255581
- fs$10.read(self.fd, buffer, offset, length, position, function(err, bytesRead, buffer) {
255581
+ fs$11.read(self.fd, buffer, offset, length, position, function(err, bytesRead, buffer) {
255582
255582
  cb();
255583
255583
  callback(err, bytesRead, buffer);
255584
255584
  });
@@ -255587,7 +255587,7 @@ var require_fd_slicer = /* @__PURE__ */ __commonJSMin(((exports) => {
255587
255587
  FdSlicer.prototype.write = function(buffer, offset, length, position, callback) {
255588
255588
  var self = this;
255589
255589
  self.pend.go(function(cb) {
255590
- fs$10.write(self.fd, buffer, offset, length, position, function(err, written, buffer) {
255590
+ fs$11.write(self.fd, buffer, offset, length, position, function(err, written, buffer) {
255591
255591
  cb();
255592
255592
  callback(err, written, buffer);
255593
255593
  });
@@ -255607,7 +255607,7 @@ var require_fd_slicer = /* @__PURE__ */ __commonJSMin(((exports) => {
255607
255607
  self.refCount -= 1;
255608
255608
  if (self.refCount > 0) return;
255609
255609
  if (self.refCount < 0) throw new Error("invalid unref");
255610
- if (self.autoClose) fs$10.close(self.fd, onCloseDone);
255610
+ if (self.autoClose) fs$11.close(self.fd, onCloseDone);
255611
255611
  function onCloseDone(err) {
255612
255612
  if (err) self.emit("error", err);
255613
255613
  else self.emit("close");
@@ -255638,7 +255638,7 @@ var require_fd_slicer = /* @__PURE__ */ __commonJSMin(((exports) => {
255638
255638
  self.context.pend.go(function(cb) {
255639
255639
  if (self.destroyed) return cb();
255640
255640
  var buffer = Buffer.allocUnsafe(toRead);
255641
- fs$10.read(self.context.fd, buffer, 0, toRead, self.pos, function(err, bytesRead) {
255641
+ fs$11.read(self.context.fd, buffer, 0, toRead, self.pos, function(err, bytesRead) {
255642
255642
  if (err) self.destroy(err);
255643
255643
  else if (bytesRead === 0) {
255644
255644
  self.destroyed = true;
@@ -255684,7 +255684,7 @@ var require_fd_slicer = /* @__PURE__ */ __commonJSMin(((exports) => {
255684
255684
  }
255685
255685
  self.context.pend.go(function(cb) {
255686
255686
  if (self.destroyed) return cb();
255687
- fs$10.write(self.context.fd, buffer, 0, buffer.length, self.pos, function(err, bytes) {
255687
+ fs$11.write(self.context.fd, buffer, 0, buffer.length, self.pos, function(err, bytes) {
255688
255688
  if (err) {
255689
255689
  self.destroy();
255690
255690
  cb();
@@ -292642,7 +292642,7 @@ var init_proxy = __esmMin((() => {
292642
292642
  var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
292643
292643
  module.exports = isexe;
292644
292644
  isexe.sync = sync;
292645
- var fs$8 = __require("fs");
292645
+ var fs$9 = __require("fs");
292646
292646
  function checkPathExt(path, options) {
292647
292647
  var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
292648
292648
  if (!pathext) return true;
@@ -292659,12 +292659,12 @@ var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
292659
292659
  return checkPathExt(path, options);
292660
292660
  }
292661
292661
  function isexe(path, options, cb) {
292662
- fs$8.stat(path, function(er, stat) {
292662
+ fs$9.stat(path, function(er, stat) {
292663
292663
  cb(er, er ? false : checkStat(stat, path, options));
292664
292664
  });
292665
292665
  }
292666
292666
  function sync(path, options) {
292667
- return checkStat(fs$8.statSync(path), path, options);
292667
+ return checkStat(fs$9.statSync(path), path, options);
292668
292668
  }
292669
292669
  }));
292670
292670
  //#endregion
@@ -292672,14 +292672,14 @@ var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
292672
292672
  var require_mode = /* @__PURE__ */ __commonJSMin(((exports, module) => {
292673
292673
  module.exports = isexe;
292674
292674
  isexe.sync = sync;
292675
- var fs$7 = __require("fs");
292675
+ var fs$8 = __require("fs");
292676
292676
  function isexe(path, options, cb) {
292677
- fs$7.stat(path, function(er, stat) {
292677
+ fs$8.stat(path, function(er, stat) {
292678
292678
  cb(er, er ? false : checkStat(stat, options));
292679
292679
  });
292680
292680
  }
292681
292681
  function sync(path, options) {
292682
- return checkStat(fs$7.statSync(path), options);
292682
+ return checkStat(fs$8.statSync(path), options);
292683
292683
  }
292684
292684
  function checkStat(stat, options) {
292685
292685
  return stat.isFile() && checkMode(stat, options);
@@ -292894,16 +292894,16 @@ var require_shebang_command = /* @__PURE__ */ __commonJSMin(((exports, module) =
292894
292894
  //#endregion
292895
292895
  //#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
292896
292896
  var require_readShebang = /* @__PURE__ */ __commonJSMin(((exports, module) => {
292897
- const fs$6 = __require("fs");
292897
+ const fs$7 = __require("fs");
292898
292898
  const shebangCommand = require_shebang_command();
292899
292899
  function readShebang(command) {
292900
292900
  const size = 150;
292901
292901
  const buffer = Buffer.alloc(size);
292902
292902
  let fd;
292903
292903
  try {
292904
- fd = fs$6.openSync(command, "r");
292905
- fs$6.readSync(fd, buffer, 0, size, 0);
292906
- fs$6.closeSync(fd);
292904
+ fd = fs$7.openSync(command, "r");
292905
+ fs$7.readSync(fd, buffer, 0, size, 0);
292906
+ fs$7.closeSync(fd);
292907
292907
  } catch (e) {}
292908
292908
  return shebangCommand(buffer.toString());
292909
292909
  }
@@ -310652,7 +310652,7 @@ var require_dist$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
310652
310652
  //#endregion
310653
310653
  //#region ../../node_modules/.pnpm/yazl@3.3.1/node_modules/yazl/index.js
310654
310654
  var require_yazl = /* @__PURE__ */ __commonJSMin(((exports) => {
310655
- var fs$5 = __require("fs");
310655
+ var fs$6 = __require("fs");
310656
310656
  var Transform$2 = __require("stream").Transform;
310657
310657
  var PassThrough$2 = __require("stream").PassThrough;
310658
310658
  var zlib$1 = __require("zlib");
@@ -310681,14 +310681,14 @@ var require_yazl = /* @__PURE__ */ __commonJSMin(((exports) => {
310681
310681
  if (shouldIgnoreAdding(self)) return;
310682
310682
  var entry = new Entry(metadataPath, false, options);
310683
310683
  self.entries.push(entry);
310684
- fs$5.stat(realPath, function(err, stats) {
310684
+ fs$6.stat(realPath, function(err, stats) {
310685
310685
  if (err) return self.emit("error", err);
310686
310686
  if (!stats.isFile()) return self.emit("error", /* @__PURE__ */ new Error("not a file: " + realPath));
310687
310687
  entry.uncompressedSize = stats.size;
310688
310688
  if (options.mtime == null) entry.setLastModDate(stats.mtime);
310689
310689
  if (options.mode == null) entry.setFileAttributesMode(stats.mode);
310690
310690
  entry.setFileDataPumpFunction(function() {
310691
- var readStream = fs$5.createReadStream(realPath);
310691
+ var readStream = fs$6.createReadStream(realPath);
310692
310692
  entry.state = Entry.FILE_DATA_IN_PROGRESS;
310693
310693
  readStream.on("error", function(err) {
310694
310694
  self.emit("error", err);
@@ -327269,7 +327269,7 @@ var require_command = /* @__PURE__ */ __commonJSMin(((exports) => {
327269
327269
  const EventEmitter$12 = __require("node:events").EventEmitter;
327270
327270
  const childProcess = __require("node:child_process");
327271
327271
  const path$7 = __require("node:path");
327272
- const fs$4 = __require("node:fs");
327272
+ const fs$5 = __require("node:fs");
327273
327273
  const process$2 = __require("node:process");
327274
327274
  const { Argument, humanReadableArgName } = require_argument();
327275
327275
  const { CommanderError } = require_error$2();
@@ -328152,7 +328152,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
328152
328152
  * @param {string} subcommandName
328153
328153
  */
328154
328154
  _checkForMissingExecutable(executableFile, executableDir, subcommandName) {
328155
- if (fs$4.existsSync(executableFile)) return;
328155
+ if (fs$5.existsSync(executableFile)) return;
328156
328156
  const executableMissing = `'${executableFile}' does not exist
328157
328157
  - if '${subcommandName}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
328158
328158
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
@@ -328176,9 +328176,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
328176
328176
  ];
328177
328177
  function findFile(baseDir, baseName) {
328178
328178
  const localBin = path$7.resolve(baseDir, baseName);
328179
- if (fs$4.existsSync(localBin)) return localBin;
328179
+ if (fs$5.existsSync(localBin)) return localBin;
328180
328180
  if (sourceExt.includes(path$7.extname(baseName))) return void 0;
328181
- const foundExt = sourceExt.find((ext) => fs$4.existsSync(`${localBin}${ext}`));
328181
+ const foundExt = sourceExt.find((ext) => fs$5.existsSync(`${localBin}${ext}`));
328182
328182
  if (foundExt) return `${localBin}${foundExt}`;
328183
328183
  }
328184
328184
  this._checkForMissingMandatoryOptions();
@@ -328188,7 +328188,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
328188
328188
  if (this._scriptPath) {
328189
328189
  let resolvedScriptPath;
328190
328190
  try {
328191
- resolvedScriptPath = fs$4.realpathSync(this._scriptPath);
328191
+ resolvedScriptPath = fs$5.realpathSync(this._scriptPath);
328192
328192
  } catch {
328193
328193
  resolvedScriptPath = this._scriptPath;
328194
328194
  }
@@ -346669,7 +346669,7 @@ var require_atomic_sleep = /* @__PURE__ */ __commonJSMin(((exports, module) => {
346669
346669
  //#endregion
346670
346670
  //#region ../../node_modules/.pnpm/sonic-boom@4.2.1/node_modules/sonic-boom/index.js
346671
346671
  var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
346672
- const fs$3 = __require("fs");
346672
+ const fs$4 = __require("fs");
346673
346673
  const EventEmitter$10 = __require("events");
346674
346674
  const inherits$6 = __require("util").inherits;
346675
346675
  const path$6 = __require("path");
@@ -346712,17 +346712,17 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
346712
346712
  const flags = sonic.append ? "a" : "w";
346713
346713
  const mode = sonic.mode;
346714
346714
  if (sonic.sync) try {
346715
- if (sonic.mkdir) fs$3.mkdirSync(path$6.dirname(file), { recursive: true });
346716
- fileOpened(null, fs$3.openSync(file, flags, mode));
346715
+ if (sonic.mkdir) fs$4.mkdirSync(path$6.dirname(file), { recursive: true });
346716
+ fileOpened(null, fs$4.openSync(file, flags, mode));
346717
346717
  } catch (err) {
346718
346718
  fileOpened(err);
346719
346719
  throw err;
346720
346720
  }
346721
- else if (sonic.mkdir) fs$3.mkdir(path$6.dirname(file), { recursive: true }, (err) => {
346721
+ else if (sonic.mkdir) fs$4.mkdir(path$6.dirname(file), { recursive: true }, (err) => {
346722
346722
  if (err) return fileOpened(err);
346723
- fs$3.open(file, flags, mode, fileOpened);
346723
+ fs$4.open(file, flags, mode, fileOpened);
346724
346724
  });
346725
- else fs$3.open(file, flags, mode, fileOpened);
346725
+ else fs$4.open(file, flags, mode, fileOpened);
346726
346726
  }
346727
346727
  function SonicBoom(opts) {
346728
346728
  if (!(this instanceof SonicBoom)) return new SonicBoom(opts);
@@ -346760,8 +346760,8 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
346760
346760
  this.flush = flushBuffer;
346761
346761
  this.flushSync = flushBufferSync;
346762
346762
  this._actualWrite = actualWriteBuffer;
346763
- fsWriteSync = () => fs$3.writeSync(this.fd, this._writingBuf);
346764
- fsWrite = () => fs$3.write(this.fd, this._writingBuf, this.release);
346763
+ fsWriteSync = () => fs$4.writeSync(this.fd, this._writingBuf);
346764
+ fsWrite = () => fs$4.write(this.fd, this._writingBuf, this.release);
346765
346765
  } else if (contentMode === void 0 || contentMode === kContentModeUtf8) {
346766
346766
  this._writingBuf = "";
346767
346767
  this.write = write;
@@ -346769,12 +346769,12 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
346769
346769
  this.flushSync = flushSync;
346770
346770
  this._actualWrite = actualWrite;
346771
346771
  fsWriteSync = () => {
346772
- if (Buffer.isBuffer(this._writingBuf)) return fs$3.writeSync(this.fd, this._writingBuf);
346773
- return fs$3.writeSync(this.fd, this._writingBuf, "utf8");
346772
+ if (Buffer.isBuffer(this._writingBuf)) return fs$4.writeSync(this.fd, this._writingBuf);
346773
+ return fs$4.writeSync(this.fd, this._writingBuf, "utf8");
346774
346774
  };
346775
346775
  fsWrite = () => {
346776
- if (Buffer.isBuffer(this._writingBuf)) return fs$3.write(this.fd, this._writingBuf, this.release);
346777
- return fs$3.write(this.fd, this._writingBuf, "utf8", this.release);
346776
+ if (Buffer.isBuffer(this._writingBuf)) return fs$4.write(this.fd, this._writingBuf, this.release);
346777
+ return fs$4.write(this.fd, this._writingBuf, "utf8", this.release);
346778
346778
  };
346779
346779
  } else throw new Error(`SonicBoom supports "${kContentModeUtf8}" and "${kContentModeBuffer}", but passed ${contentMode}`);
346780
346780
  if (typeof fd === "number") {
@@ -346819,7 +346819,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
346819
346819
  return;
346820
346820
  }
346821
346821
  }
346822
- if (this._fsync) fs$3.fsyncSync(this.fd);
346822
+ if (this._fsync) fs$4.fsyncSync(this.fd);
346823
346823
  const len = this._len;
346824
346824
  if (this._reopening) {
346825
346825
  this._writing = false;
@@ -346916,7 +346916,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
346916
346916
  this._flushPending = true;
346917
346917
  const onDrain = () => {
346918
346918
  if (!this._fsync) try {
346919
- fs$3.fsync(this.fd, (err) => {
346919
+ fs$4.fsync(this.fd, (err) => {
346920
346920
  this._flushPending = false;
346921
346921
  cb(err);
346922
346922
  });
@@ -346993,7 +346993,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
346993
346993
  if (this._writing) return;
346994
346994
  const fd = this.fd;
346995
346995
  this.once("ready", () => {
346996
- if (fd !== this.fd) fs$3.close(fd, (err) => {
346996
+ if (fd !== this.fd) fs$4.close(fd, (err) => {
346997
346997
  if (err) return this.emit("error", err);
346998
346998
  });
346999
346999
  });
@@ -347024,7 +347024,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
347024
347024
  while (this._bufs.length || buf.length) {
347025
347025
  if (buf.length <= 0) buf = this._bufs[0];
347026
347026
  try {
347027
- const n = Buffer.isBuffer(buf) ? fs$3.writeSync(this.fd, buf) : fs$3.writeSync(this.fd, buf, "utf8");
347027
+ const n = Buffer.isBuffer(buf) ? fs$4.writeSync(this.fd, buf) : fs$4.writeSync(this.fd, buf, "utf8");
347028
347028
  const releasedBufObj = releaseWritingBuf(buf, this._len, n);
347029
347029
  buf = releasedBufObj.writingBuf;
347030
347030
  this._len = releasedBufObj.len;
@@ -347035,7 +347035,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
347035
347035
  }
347036
347036
  }
347037
347037
  try {
347038
- fs$3.fsyncSync(this.fd);
347038
+ fs$4.fsyncSync(this.fd);
347039
347039
  } catch {}
347040
347040
  }
347041
347041
  function flushBufferSync() {
@@ -347049,7 +347049,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
347049
347049
  while (this._bufs.length || buf.length) {
347050
347050
  if (buf.length <= 0) buf = mergeBuf(this._bufs[0], this._lens[0]);
347051
347051
  try {
347052
- const n = fs$3.writeSync(this.fd, buf);
347052
+ const n = fs$4.writeSync(this.fd, buf);
347053
347053
  buf = buf.subarray(n);
347054
347054
  this._len = Math.max(this._len - n, 0);
347055
347055
  if (buf.length <= 0) {
@@ -347071,24 +347071,24 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
347071
347071
  this._writing = true;
347072
347072
  this._writingBuf = this._writingBuf.length ? this._writingBuf : this._bufs.shift() || "";
347073
347073
  if (this.sync) try {
347074
- release(null, Buffer.isBuffer(this._writingBuf) ? fs$3.writeSync(this.fd, this._writingBuf) : fs$3.writeSync(this.fd, this._writingBuf, "utf8"));
347074
+ release(null, Buffer.isBuffer(this._writingBuf) ? fs$4.writeSync(this.fd, this._writingBuf) : fs$4.writeSync(this.fd, this._writingBuf, "utf8"));
347075
347075
  } catch (err) {
347076
347076
  release(err);
347077
347077
  }
347078
- else fs$3.write(this.fd, this._writingBuf, release);
347078
+ else fs$4.write(this.fd, this._writingBuf, release);
347079
347079
  }
347080
347080
  function actualWriteBuffer() {
347081
347081
  const release = this.release;
347082
347082
  this._writing = true;
347083
347083
  this._writingBuf = this._writingBuf.length ? this._writingBuf : mergeBuf(this._bufs.shift(), this._lens.shift());
347084
347084
  if (this.sync) try {
347085
- release(null, fs$3.writeSync(this.fd, this._writingBuf));
347085
+ release(null, fs$4.writeSync(this.fd, this._writingBuf));
347086
347086
  } catch (err) {
347087
347087
  release(err);
347088
347088
  }
347089
347089
  else {
347090
347090
  if (kCopyBuffer) this._writingBuf = Buffer.from(this._writingBuf);
347091
- fs$3.write(this.fd, this._writingBuf, release);
347091
+ fs$4.write(this.fd, this._writingBuf, release);
347092
347092
  }
347093
347093
  }
347094
347094
  function actualClose(sonic) {
@@ -347102,10 +347102,10 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
347102
347102
  sonic._lens = [];
347103
347103
  assert$8(typeof sonic.fd === "number", `sonic.fd must be a number, got ${typeof sonic.fd}`);
347104
347104
  try {
347105
- fs$3.fsync(sonic.fd, closeWrapped);
347105
+ fs$4.fsync(sonic.fd, closeWrapped);
347106
347106
  } catch {}
347107
347107
  function closeWrapped() {
347108
- if (sonic.fd !== 1 && sonic.fd !== 2) fs$3.close(sonic.fd, done);
347108
+ if (sonic.fd !== 1 && sonic.fd !== 2) fs$4.close(sonic.fd, done);
347109
347109
  else done();
347110
347110
  }
347111
347111
  function done(err) {
@@ -369728,7 +369728,7 @@ var require_constants$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
369728
369728
  //#endregion
369729
369729
  //#region ../../../../node_modules/node-gyp-build/node-gyp-build.js
369730
369730
  var require_node_gyp_build$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
369731
- var fs$2 = __require("fs");
369731
+ var fs$3 = __require("fs");
369732
369732
  var path$5 = __require("path");
369733
369733
  var os$3 = __require("os");
369734
369734
  var runtimeRequire = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require;
@@ -369784,7 +369784,7 @@ var require_node_gyp_build$1 = /* @__PURE__ */ __commonJSMin(((exports, module)
369784
369784
  };
369785
369785
  function readdirSync(dir) {
369786
369786
  try {
369787
- return fs$2.readdirSync(dir);
369787
+ return fs$3.readdirSync(dir);
369788
369788
  } catch (err) {
369789
369789
  return [];
369790
369790
  }
@@ -369872,7 +369872,7 @@ var require_node_gyp_build$1 = /* @__PURE__ */ __commonJSMin(((exports, module)
369872
369872
  return typeof window !== "undefined" && window.process && window.process.type === "renderer";
369873
369873
  }
369874
369874
  function isAlpine(platform) {
369875
- return platform === "linux" && fs$2.existsSync("/etc/alpine-release");
369875
+ return platform === "linux" && fs$3.existsSync("/etc/alpine-release");
369876
369876
  }
369877
369877
  load.parseTags = parseTags;
369878
369878
  load.matchTags = matchTags;
@@ -390025,7 +390025,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
390025
390025
  //#region ../../node_modules/.pnpm/@fastify+swagger@9.7.0/node_modules/@fastify/swagger/lib/mode/static.js
390026
390026
  var require_static = /* @__PURE__ */ __commonJSMin(((exports, module) => {
390027
390027
  const path$3 = __require("node:path");
390028
- const fs$1 = __require("node:fs");
390028
+ const fs$2 = __require("node:fs");
390029
390029
  const yaml = require_dist$1();
390030
390030
  module.exports = function(fastify, opts, done) {
390031
390031
  if (!opts.specification) return done(/* @__PURE__ */ new Error("specification is missing in the module options"));
@@ -390034,14 +390034,14 @@ var require_static = /* @__PURE__ */ __commonJSMin(((exports, module) => {
390034
390034
  if (!opts.specification.path && !opts.specification.document) return done(/* @__PURE__ */ new Error("both specification.path and specification.document are missing, should be path to the file or swagger document spec"));
390035
390035
  else if (opts.specification.path) {
390036
390036
  if (typeof opts.specification.path !== "string") return done(/* @__PURE__ */ new Error("specification.path is not a string"));
390037
- if (!fs$1.existsSync(path$3.resolve(opts.specification.path))) return done(/* @__PURE__ */ new Error(`${opts.specification.path} does not exist`));
390037
+ if (!fs$2.existsSync(path$3.resolve(opts.specification.path))) return done(/* @__PURE__ */ new Error(`${opts.specification.path} does not exist`));
390038
390038
  const extName = path$3.extname(opts.specification.path).toLowerCase();
390039
390039
  if ([".yaml", ".json"].indexOf(extName) === -1) return done(/* @__PURE__ */ new Error("specification.path extension name is not supported, should be one from ['.yaml', '.json']"));
390040
390040
  if (opts.specification.postProcessor && typeof opts.specification.postProcessor !== "function") return done(/* @__PURE__ */ new Error("specification.postProcessor should be a function"));
390041
390041
  if (opts.specification.baseDir && typeof opts.specification.baseDir !== "string") return done(/* @__PURE__ */ new Error("specification.baseDir should be string"));
390042
390042
  if (!opts.specification.baseDir) opts.specification.baseDir = path$3.resolve(path$3.dirname(opts.specification.path));
390043
390043
  else while (opts.specification.baseDir.endsWith("/")) opts.specification.baseDir = opts.specification.baseDir.slice(0, -1);
390044
- const source = fs$1.readFileSync(path$3.resolve(opts.specification.path), "utf8");
390044
+ const source = fs$2.readFileSync(path$3.resolve(opts.specification.path), "utf8");
390045
390045
  switch (extName) {
390046
390046
  case ".yaml":
390047
390047
  swaggerObject = yaml.parse(source);
@@ -390308,11 +390308,11 @@ var require_should_route_hide = /* @__PURE__ */ __commonJSMin(((exports, module)
390308
390308
  //#endregion
390309
390309
  //#region ../../node_modules/.pnpm/@fastify+swagger@9.7.0/node_modules/@fastify/swagger/lib/util/read-package-json.js
390310
390310
  var require_read_package_json = /* @__PURE__ */ __commonJSMin(((exports, module) => {
390311
- const fs = __require("node:fs");
390311
+ const fs$1 = __require("node:fs");
390312
390312
  const path$2 = __require("node:path");
390313
390313
  function readPackageJson() {
390314
390314
  try {
390315
- return JSON.parse(fs.readFileSync(path$2.join(__dirname, "..", "..", "package.json")));
390315
+ return JSON.parse(fs$1.readFileSync(path$2.join(__dirname, "..", "..", "package.json")));
390316
390316
  } catch {
390317
390317
  return {};
390318
390318
  }
@@ -405262,7 +405262,7 @@ var TUI = class TUI extends Container {
405262
405262
  if (!debugRedraw) return;
405263
405263
  const logPath = path$17.join(nodeOs.homedir(), ".pi", "agent", "pi-debug.log");
405264
405264
  const msg = `[${(/* @__PURE__ */ new Date()).toISOString()}] fullRender: ${reason} (prev=${this.previousLines.length}, new=${newLines.length}, height=${height})\n`;
405265
- fs$16.appendFileSync(logPath, msg);
405265
+ fs$17.appendFileSync(logPath, msg);
405266
405266
  };
405267
405267
  if (this.previousLines.length === 0 && !widthChanged && !heightChanged) {
405268
405268
  logRedraw("first render");
@@ -405409,7 +405409,7 @@ var TUI = class TUI extends Container {
405409
405409
  buffer += "\x1B[?2026l";
405410
405410
  if (process.env["PI_TUI_DEBUG"] === "1") {
405411
405411
  const debugDir = "/tmp/tui";
405412
- fs$16.mkdirSync(debugDir, { recursive: true });
405412
+ fs$17.mkdirSync(debugDir, { recursive: true });
405413
405413
  const debugPath = path$17.join(debugDir, `render-${Date.now()}-${Math.random().toString(36).slice(2)}.log`);
405414
405414
  const debugData = [
405415
405415
  `firstChanged: ${firstChanged}`,
@@ -405433,7 +405433,7 @@ var TUI = class TUI extends Container {
405433
405433
  "=== buffer ===",
405434
405434
  JSON.stringify(buffer)
405435
405435
  ].join("\n");
405436
- fs$16.writeFileSync(debugPath, debugData);
405436
+ fs$17.writeFileSync(debugPath, debugData);
405437
405437
  }
405438
405438
  this.terminal.write(buffer);
405439
405439
  this.cursorRow = Math.max(0, newLines.length - 1);
@@ -410092,7 +410092,7 @@ var ProcessTerminal = class {
410092
410092
  const env = process.env["PI_TUI_WRITE_LOG"] || "";
410093
410093
  if (!env) return "";
410094
410094
  try {
410095
- if (fs$16.statSync(env).isDirectory()) {
410095
+ if (fs$17.statSync(env).isDirectory()) {
410096
410096
  const now = /* @__PURE__ */ new Date();
410097
410097
  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")}`;
410098
410098
  return path$17.join(env, `tui-${ts}-${process.pid}.log`);
@@ -410375,7 +410375,7 @@ var ProcessTerminal = class {
410375
410375
  write(data) {
410376
410376
  process.stdout.write(data);
410377
410377
  if (this.writeLogPath) try {
410378
- fs$16.appendFileSync(this.writeLogPath, data, { encoding: "utf8" });
410378
+ fs$17.appendFileSync(this.writeLogPath, data, { encoding: "utf8" });
410379
410379
  } catch {}
410380
410380
  }
410381
410381
  get columns() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blun-king-cli",
3
- "version": "9.1.31",
3
+ "version": "9.1.32",
4
4
  "description": "BLUN CLI - your own AI agent with a Telegram channel. Get it done. With BLUN.",
5
5
  "license": "MIT",
6
6
  "bin": {