brsh 3.10.3 → 3.10.4
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/CHANGELOG.md +7 -0
- package/dist/wbt.es.js +38 -8
- package/dist/wbt.es.js.map +1 -1
- package/dist/wbt.min.js +18 -4
- package/dist/wbt.min.js.map +1 -1
- package/lib/wbt/index.js +21 -9
- package/lib/wbt/registry.js +18 -1
- package/package.json +1 -1
- package/test/wbt.test.js +82 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [3.10.4](https://github.com/eliotstocker/Brsh-JS/compare/v3.10.3...v3.10.4) (2026-11-26)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **wbt:** avoid __dirname in browser bundle for wllama, add pico alias and vim package ([11ad8ec](https://github.com/eliotstocker/Brsh-JS/commit/11ad8ec1af42584aaea2299e153084b42151060e))
|
|
7
|
+
|
|
1
8
|
## [3.10.3](https://github.com/eliotstocker/Brsh-JS/compare/v3.10.2...v3.10.3) (2026-11-11)
|
|
2
9
|
|
|
3
10
|
|
package/dist/wbt.es.js
CHANGED
|
@@ -4567,7 +4567,7 @@ var A, j, M, N, P, F, I, L, ee, R, z = e((() => {
|
|
|
4567
4567
|
nano: {
|
|
4568
4568
|
name: "nano",
|
|
4569
4569
|
bin: "nano",
|
|
4570
|
-
aliases: ["nano-wasm"],
|
|
4570
|
+
aliases: ["nano-wasm", "pico"],
|
|
4571
4571
|
version: "8.0.1",
|
|
4572
4572
|
description: "GNU nano 8.0 text editor compiled to WebAssembly (wasm32-wasip1) with ncurses",
|
|
4573
4573
|
details: "GNU nano is a small, user-friendly command-line text editor compiled to WebAssembly with wide-character ncurses 6.5, built-in terminfo fallbacks (xterm-256color, vt100, etc.), dynamic terminal dimensions (TIOCGWINSZ / LINES & COLUMNS), and zero custom imports (standard wasi_snapshot_preview1).",
|
|
@@ -4578,6 +4578,20 @@ var A, j, M, N, P, F, I, L, ee, R, z = e((() => {
|
|
|
4578
4578
|
interactive: !0,
|
|
4579
4579
|
size: "680 KB"
|
|
4580
4580
|
},
|
|
4581
|
+
vim: {
|
|
4582
|
+
name: "vim",
|
|
4583
|
+
bin: "vim",
|
|
4584
|
+
aliases: ["vi", "vim-wasm"],
|
|
4585
|
+
version: "9.1.0700",
|
|
4586
|
+
description: "Vim 9.1 text editor compiled to WebAssembly (wasm32-wasip1) with ncurses",
|
|
4587
|
+
details: "Vim 9.1 (9.1.0700) compiled to WebAssembly (wasm32-wasip1) with static ncursesw 6.5, built-in terminfo fallbacks (xterm-256color, vt100, etc.), Asyncify interactive I/O, built-in defaults.vim fallback, and zero custom imports (standard wasi_snapshot_preview1).",
|
|
4588
|
+
homepage: "https://github.com/eliotstocker/vim-wasm",
|
|
4589
|
+
cdnUrl: "https://cdn.jsdelivr.net/gh/eliotstocker/vim-wasm@main/dist/vim.wasm",
|
|
4590
|
+
wasmUrl: "https://cdn.jsdelivr.net/gh/eliotstocker/vim-wasm@main/dist/vim.wasm",
|
|
4591
|
+
type: "custom-wasm",
|
|
4592
|
+
interactive: !0,
|
|
4593
|
+
size: "4.5 MB"
|
|
4594
|
+
},
|
|
4581
4595
|
doom: {
|
|
4582
4596
|
name: "doom",
|
|
4583
4597
|
bin: "doom",
|
|
@@ -4611,6 +4625,9 @@ var A, j, M, N, P, F, I, L, ee, R, z = e((() => {
|
|
|
4611
4625
|
"llama.cpp": "wllama",
|
|
4612
4626
|
"@wllama/wllama": "wllama",
|
|
4613
4627
|
"nano-wasm": "nano",
|
|
4628
|
+
pico: "nano",
|
|
4629
|
+
vi: "vim",
|
|
4630
|
+
"vim-wasm": "vim",
|
|
4614
4631
|
"doom-wasm": "doom",
|
|
4615
4632
|
"doom-ascii": "doom",
|
|
4616
4633
|
freedoom: "doom"
|
|
@@ -5570,7 +5587,9 @@ var A, j, M, N, P, F, I, L, ee, R, z = e((() => {
|
|
|
5570
5587
|
}), t.exports.wllamaInstances = u, t.exports.getDefaultPersistPath = d, t.exports.DEFAULT_PERSIST_DIR = l, t.exports.resolveModelSpec = h, t.exports.formatDownloadProgress = p, t.exports.DEFAULT_MODEL_URL = s, t.exports.MODEL_ALIASES = o;
|
|
5571
5588
|
})), ce = /* @__PURE__ */ t(((e, t) => {
|
|
5572
5589
|
b();
|
|
5573
|
-
var r = B(), i = W(), a = X(), o = K(), { DEFAULT_REGISTRY: s, resolvePackageName: c } = oe(), l = se()
|
|
5590
|
+
var r = B(), i = W(), a = X(), o = K(), { DEFAULT_REGISTRY: s, resolvePackageName: c } = oe(), l = se();
|
|
5591
|
+
typeof globalThis < "u" && (globalThis.__brshWllamaAdapter = l);
|
|
5592
|
+
var { writeBytesToFs: u, createGenericWasmCommand: d } = a, { createReplWasmCommand: f } = o, p = "/var/cache/wbt";
|
|
5574
5593
|
function m(e, t, n = {}) {
|
|
5575
5594
|
class r extends a {
|
|
5576
5595
|
static get name() {
|
|
@@ -5583,7 +5602,7 @@ var A, j, M, N, P, F, I, L, ee, R, z = e((() => {
|
|
|
5583
5602
|
return !0;
|
|
5584
5603
|
}
|
|
5585
5604
|
get interactive() {
|
|
5586
|
-
return (this.arguments || []).some((e) => e === "--help" || e === "-h" || e === "--version" || e === "-V" || e === "-v") ? !1 : this._isInteractive === void 0 ? !!(n.interactive || e === "nano") : !!this._isInteractive;
|
|
5605
|
+
return (this.arguments || []).some((e) => e === "--help" || e === "-h" || e === "--version" || e === "-V" || e === "-v") ? !1 : this._isInteractive === void 0 ? !!(n.interactive || e === "nano" || e === "pico" || e === "vim" || e === "vi") : !!this._isInteractive;
|
|
5587
5606
|
}
|
|
5588
5607
|
get captureInput() {
|
|
5589
5608
|
return this.interactive;
|
|
@@ -5721,11 +5740,22 @@ var A, j, M, N, P, F, I, L, ee, R, z = e((() => {
|
|
|
5721
5740
|
}
|
|
5722
5741
|
_generateJsCommandSource(e, t) {
|
|
5723
5742
|
if (e.adapter === "wllama" || e.name === "wllama") {
|
|
5724
|
-
let n = r.resolve(__dirname, "packages/wllama.js");
|
|
5725
|
-
return
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
|
|
5743
|
+
let n = typeof __dirname < "u" ? r.resolve(__dirname, "packages/wllama.js") : null;
|
|
5744
|
+
return "'use strict';\nlet wllamaModule;\nif (typeof require === 'function') {\n" + (n ? ` try {\n wllamaModule = require(${JSON.stringify(n)});\n } catch (_) {}\n` : "") + ` if (!wllamaModule) {
|
|
5745
|
+
try {
|
|
5746
|
+
wllamaModule = require('brsh/wbt/packages/wllama');
|
|
5747
|
+
} catch (_) {
|
|
5748
|
+
try { wllamaModule = require('./wllama'); } catch (e) {}
|
|
5749
|
+
}
|
|
5750
|
+
}
|
|
5751
|
+
}
|
|
5752
|
+
if (!wllamaModule && typeof globalThis !== 'undefined') {
|
|
5753
|
+
wllamaModule = globalThis.__brshWllamaAdapter;
|
|
5754
|
+
}
|
|
5755
|
+
if (!wllamaModule) {
|
|
5756
|
+
throw new Error('Unable to load wllama adapter module');
|
|
5757
|
+
}
|
|
5758
|
+
module.exports = wllamaModule.createWllamaCommand(${JSON.stringify(e)}, {}, ${JSON.stringify(t)});\n`;
|
|
5729
5759
|
}
|
|
5730
5760
|
let n = JSON.stringify(e, null, 2);
|
|
5731
5761
|
return e.repl ? `'use strict';\nconst pkgMeta = ${n};\nconst _Repl = typeof ReplCommand !== 'undefined' ? ReplCommand : (typeof require !== 'undefined' ? require('brsh/ReplCommand') : globalThis.ReplCommand);\nmodule.exports = _Repl.createReplWasmCommand(pkgMeta, {}, ${JSON.stringify(t)});\n` : `'use strict';\nconst pkgMeta = ${n};\nconst _Wasm = typeof WasmCommand !== 'undefined' ? WasmCommand : (typeof require !== 'undefined' ? require('brsh/WasmCommand') : globalThis.WasmCommand);\nmodule.exports = _Wasm.createGenericWasmCommand(pkgMeta, {}, ${JSON.stringify(t)});\n`;
|