gritty 10.0.2 → 10.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ChangeLog +17 -0
- package/README.md +0 -1
- package/dist/gritty.js +22 -7
- package/dist/gritty.js.map +1 -1
- package/dist-dev/gritty.js +8 -8
- package/package.json +7 -8
- package/server/gritty.js +1 -1
package/ChangeLog
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
2026.04.05, v10.2.0
|
|
2
|
+
|
|
3
|
+
feature:
|
|
4
|
+
- de51ceb gritty: client: fontWeightBold
|
|
5
|
+
- a4072fe gritty: client: background, froground: improve
|
|
6
|
+
|
|
7
|
+
2026.04.03, v10.1.0
|
|
8
|
+
|
|
9
|
+
feature:
|
|
10
|
+
- f8a84d2 client: terminal disconnected...: write on next line
|
|
11
|
+
- bea8ef7 gritty: webpack-cli v7.0.2
|
|
12
|
+
- 198d341 gritty: putout v42.4.2
|
|
13
|
+
- 77f703e gritty: madrun v13.0.1
|
|
14
|
+
- cde5ebd gritty: eslint-plugin-putout v31.1.2
|
|
15
|
+
- cec19f4 gritty: css-minimizer-webpack-plugin v8.0.0
|
|
16
|
+
- c987136 gritty: superc8 v12.3.1
|
|
17
|
+
|
|
1
18
|
2026.02.12, v10.0.2
|
|
2
19
|
|
|
3
20
|
fix:
|
package/README.md
CHANGED
package/dist/gritty.js
CHANGED
|
@@ -3352,12 +3352,13 @@ class Encoder {
|
|
|
3352
3352
|
class Decoder extends Emitter {
|
|
3353
3353
|
/**
|
|
3354
3354
|
* Decoder constructor
|
|
3355
|
-
*
|
|
3356
|
-
* @param {function} reviver - custom reviver to pass down to JSON.stringify
|
|
3357
3355
|
*/
|
|
3358
|
-
constructor(
|
|
3356
|
+
constructor(opts) {
|
|
3359
3357
|
super();
|
|
3360
|
-
this.
|
|
3358
|
+
this.opts = Object.assign({
|
|
3359
|
+
reviver: undefined,
|
|
3360
|
+
maxAttachments: 10,
|
|
3361
|
+
}, typeof opts === "function" ? { reviver: opts } : opts);
|
|
3361
3362
|
}
|
|
3362
3363
|
/**
|
|
3363
3364
|
* Decodes an encoded packet string into packet JSON.
|
|
@@ -3428,7 +3429,14 @@ class Decoder extends Emitter {
|
|
|
3428
3429
|
if (buf != Number(buf) || str.charAt(i) !== "-") {
|
|
3429
3430
|
throw new Error("Illegal attachments");
|
|
3430
3431
|
}
|
|
3431
|
-
|
|
3432
|
+
const n = Number(buf);
|
|
3433
|
+
if (!isInteger(n) || n < 0) {
|
|
3434
|
+
throw new Error("Illegal attachments");
|
|
3435
|
+
}
|
|
3436
|
+
else if (n > this.opts.maxAttachments) {
|
|
3437
|
+
throw new Error("too many attachments");
|
|
3438
|
+
}
|
|
3439
|
+
p.attachments = n;
|
|
3432
3440
|
}
|
|
3433
3441
|
// look up namespace (if any)
|
|
3434
3442
|
if ("/" === str.charAt(i + 1)) {
|
|
@@ -3474,7 +3482,7 @@ class Decoder extends Emitter {
|
|
|
3474
3482
|
}
|
|
3475
3483
|
tryParse(str) {
|
|
3476
3484
|
try {
|
|
3477
|
-
return JSON.parse(str, this.reviver);
|
|
3485
|
+
return JSON.parse(str, this.opts.reviver);
|
|
3478
3486
|
}
|
|
3479
3487
|
catch (e) {
|
|
3480
3488
|
return false;
|
|
@@ -5123,7 +5131,12 @@ function createTerminal(terminalContainer, overrides) {
|
|
|
5123
5131
|
scrollback: 1000,
|
|
5124
5132
|
tabStopWidth: 4,
|
|
5125
5133
|
fontFamily,
|
|
5126
|
-
allowProposedApi: true
|
|
5134
|
+
allowProposedApi: true,
|
|
5135
|
+
fontWeightBold: 'normal',
|
|
5136
|
+
theme: {
|
|
5137
|
+
foreground: '#dcdcdc',
|
|
5138
|
+
background: '#141920'
|
|
5139
|
+
}
|
|
5127
5140
|
});
|
|
5128
5141
|
terminal.open(terminalContainer);
|
|
5129
5142
|
terminal.focus();
|
|
@@ -5175,7 +5188,9 @@ function _onConnect(socket, fitAddon, {
|
|
|
5175
5188
|
fitAddon.fit();
|
|
5176
5189
|
}
|
|
5177
5190
|
function _onDisconnect(terminal) {
|
|
5191
|
+
terminal.writeln('');
|
|
5178
5192
|
terminal.writeln('terminal disconnected...');
|
|
5193
|
+
terminal.writeln('');
|
|
5179
5194
|
}
|
|
5180
5195
|
function _onData(terminal, data) {
|
|
5181
5196
|
terminal.write(data);
|