split-frames 2.4.3 → 2.4.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/lib/index.d.ts +3 -2
- package/package.json +3 -3
- package/test/typescript/compilation.ts +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
declare module "split-frames" {
|
|
4
4
|
|
|
5
|
+
import { Transform } from "stream";
|
|
6
|
+
|
|
5
7
|
type ControlBits = "none" | "end+1" | "end+2";
|
|
6
8
|
type Tag = number | Buffer | Array<number>;
|
|
7
9
|
|
|
@@ -20,7 +22,7 @@ declare module "split-frames" {
|
|
|
20
22
|
"controlBits"?: ControlBits;
|
|
21
23
|
}
|
|
22
24
|
|
|
23
|
-
class Splitter extends
|
|
25
|
+
class Splitter extends Transform {
|
|
24
26
|
|
|
25
27
|
protected _frame: Buffer;
|
|
26
28
|
protected _digesting: boolean;
|
|
@@ -45,7 +47,6 @@ declare module "split-frames" {
|
|
|
45
47
|
protected _searchTags(tag: Tag, beginWith?: number): number;
|
|
46
48
|
protected _digest(): void;
|
|
47
49
|
protected _digester(): void;
|
|
48
|
-
protected _transform(chunk: Buffer, enc?: string, cb?: () => void): void;
|
|
49
50
|
|
|
50
51
|
}
|
|
51
52
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "split-frames",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.4",
|
|
4
4
|
"description": "Split Buffer frames from streams",
|
|
5
5
|
"main": "lib/main.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"@types/node": "18.11.9",
|
|
56
56
|
"check-version-modules": "1.3.5",
|
|
57
57
|
"coveralls": "3.1.1",
|
|
58
|
-
"eslint": "8.
|
|
59
|
-
"husky": "8.0.
|
|
58
|
+
"eslint": "8.27.0",
|
|
59
|
+
"husky": "8.0.2",
|
|
60
60
|
"mocha": "10.1.0",
|
|
61
61
|
"nyc": "15.1.0"
|
|
62
62
|
},
|
|
@@ -33,6 +33,6 @@ stream.pipe(new Splitter({
|
|
|
33
33
|
console.log(chunk);
|
|
34
34
|
// Buffer([ STX, 0x20, 0x21, 0x22, ACK, NAK, WAK, 0x23, ETX, 0x01 ]) (x1)
|
|
35
35
|
});
|
|
36
|
-
|
|
36
|
+
|
|
37
37
|
stream.push(Buffer.from([ 0x51, 0x01, ACK, DLE, ACK, STX, 0x20, 0x21, 0x22, ACK, NAK, WAK ]));
|
|
38
38
|
stream.push(Buffer.from([ 0x23, ETX, 0x01, NAK, DLE, NAK, WAK, DLE, WAK, 0x20, 0x21 ]));
|