@oxbit/cli 0.6.0 → 0.6.1
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/package.json +1 -1
- package/runtime/dist/index.js +6 -5
- package/runtime/package.json +1 -1
- package/web/dist/assets/{index-DmlViIXr.js → index-DLliH0c7.js} +103 -103
- package/web/dist/assets/index-EACTV3yF.css +1 -0
- package/web/dist/assets/{typescript-CKOC7een.js → typescript-BCqEHgyO.js} +2 -2
- package/web/dist/index.html +2 -2
- package/web/dist/assets/index-Cj4NF8QT.css +0 -1
package/package.json
CHANGED
package/runtime/dist/index.js
CHANGED
|
@@ -544,6 +544,7 @@ async function runCommand(command, args, options2) {
|
|
|
544
544
|
});
|
|
545
545
|
});
|
|
546
546
|
}
|
|
547
|
+
const minimumColumns = 4;
|
|
547
548
|
class Processes {
|
|
548
549
|
constructor(root, emit, loadPty = loadNodePty) {
|
|
549
550
|
this.root = root;
|
|
@@ -575,7 +576,7 @@ class Processes {
|
|
|
575
576
|
const id = randomUUID(), { shell, args } = resolveTerminalShell();
|
|
576
577
|
const terminal2 = pty.spawn(shell, args, {
|
|
577
578
|
name: "xterm-256color",
|
|
578
|
-
cols: this.dimension(cols, 1e3),
|
|
579
|
+
cols: this.dimension(cols, 1e3, minimumColumns),
|
|
579
580
|
rows: this.dimension(rows, 500),
|
|
580
581
|
cwd: this.root,
|
|
581
582
|
env: { ...process.env, SHELL: shell, TERM: "xterm-256color" }
|
|
@@ -622,10 +623,10 @@ class Processes {
|
|
|
622
623
|
});
|
|
623
624
|
return { id };
|
|
624
625
|
}
|
|
625
|
-
dimension(value, max) {
|
|
626
|
+
dimension(value, max, min = 1) {
|
|
626
627
|
if (!Number.isSafeInteger(value) || value < 1 || value > max)
|
|
627
628
|
throw new RpcError("INVALID_PARAMS", "Invalid terminal dimensions");
|
|
628
|
-
return value;
|
|
629
|
+
return Math.max(value, min);
|
|
629
630
|
}
|
|
630
631
|
flow(session) {
|
|
631
632
|
const slow = session.subscribers.size === 0 || [...session.subscribers.values()].some(
|
|
@@ -647,7 +648,7 @@ class Processes {
|
|
|
647
648
|
}
|
|
648
649
|
resize(id, owner, cols, rows) {
|
|
649
650
|
this.terminal(id, owner).pty.resize(
|
|
650
|
-
this.dimension(cols, 1e3),
|
|
651
|
+
this.dimension(cols, 1e3, minimumColumns),
|
|
651
652
|
this.dimension(rows, 500)
|
|
652
653
|
);
|
|
653
654
|
}
|
|
@@ -10944,7 +10945,7 @@ class RuntimeExtensions {
|
|
|
10944
10945
|
let cached;
|
|
10945
10946
|
function runtimeVersion() {
|
|
10946
10947
|
if (cached) return cached;
|
|
10947
|
-
return cached = "0.6.
|
|
10948
|
+
return cached = "0.6.1";
|
|
10948
10949
|
}
|
|
10949
10950
|
const wildcardHost = (host) => host === "0.0.0.0" || host === "::";
|
|
10950
10951
|
const localHost = (host) => wildcardHost(host) ? "127.0.0.1" : host;
|