@golar/plugin 0.0.7 → 0.0.8
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/dist/index.js +5 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import worker_threads from "node:worker_threads";
|
|
|
5
5
|
|
|
6
6
|
//#region src/index.ts
|
|
7
7
|
const HEADER_SIZE = 5;
|
|
8
|
+
const PROTOCOL_VERSION = 1;
|
|
8
9
|
const MSG_KIND = {
|
|
9
10
|
CREATE_SERVICE_CODE: 0,
|
|
10
11
|
CREATE_SERVICE_CODE_RESPONSE: 1
|
|
@@ -43,7 +44,10 @@ function createPlugin(opts) {
|
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
46
|
{
|
|
46
|
-
const initialization = JSON.stringify({
|
|
47
|
+
const initialization = JSON.stringify({
|
|
48
|
+
protocolVersion: PROTOCOL_VERSION,
|
|
49
|
+
extraExtensions: opts.extraExtensions ?? []
|
|
50
|
+
});
|
|
47
51
|
recvBuffer.writeUint32LE(Buffer.byteLength(initialization));
|
|
48
52
|
process.stdout.write(recvBuffer.subarray(0, 4));
|
|
49
53
|
process.stdout.write(initialization);
|