bare-rpc 1.2.0 → 1.3.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/index.js +2 -1
- package/lib/messages.js +2 -1
- package/package.json +6 -3
package/index.js
CHANGED
|
@@ -187,7 +187,7 @@ module.exports = exports = class RPC {
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
switch (message.type) {
|
|
190
|
-
case t.REQUEST:
|
|
190
|
+
case t.REQUEST: {
|
|
191
191
|
const request =
|
|
192
192
|
message.id === 0
|
|
193
193
|
? new IncomingEvent(this, message.command, message.data)
|
|
@@ -202,6 +202,7 @@ module.exports = exports = class RPC {
|
|
|
202
202
|
else this._stream.destroy(err)
|
|
203
203
|
}
|
|
204
204
|
break
|
|
205
|
+
}
|
|
205
206
|
case t.RESPONSE:
|
|
206
207
|
try {
|
|
207
208
|
this._onresponse(message)
|
package/lib/messages.js
CHANGED
|
@@ -134,7 +134,7 @@ exports.message = {
|
|
|
134
134
|
return { type, id, stream, error: null, data: null }
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
case t.STREAM:
|
|
137
|
+
case t.STREAM: {
|
|
138
138
|
const stream = c.uint.decode(state)
|
|
139
139
|
|
|
140
140
|
if (stream & s.ERROR) {
|
|
@@ -146,6 +146,7 @@ exports.message = {
|
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
return { type, id, stream, error: null, data: null }
|
|
149
|
+
}
|
|
149
150
|
|
|
150
151
|
default:
|
|
151
152
|
throw errors.UNKNOWN_MESSAGE(`Unknown message '${type}'`)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bare-rpc",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "librpc ABI compatible RPC for Bare",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"default": "./index.js"
|
|
9
9
|
},
|
|
10
10
|
"./package": "./package.json",
|
|
11
|
+
"./constants": "./lib/constants.js",
|
|
11
12
|
"./errors": {
|
|
12
13
|
"types": "./lib/errors.d.ts",
|
|
13
14
|
"default": "./lib/errors.js"
|
|
@@ -20,8 +21,9 @@
|
|
|
20
21
|
"lib"
|
|
21
22
|
],
|
|
22
23
|
"scripts": {
|
|
23
|
-
"
|
|
24
|
-
"
|
|
24
|
+
"format": "prettier --write . && lunte --fix",
|
|
25
|
+
"lint": "prettier --check . && lunte",
|
|
26
|
+
"test": "brittle-bare --coverage test.js"
|
|
25
27
|
},
|
|
26
28
|
"repository": {
|
|
27
29
|
"type": "git",
|
|
@@ -43,6 +45,7 @@
|
|
|
43
45
|
"bare-buffer": "^3.0.1",
|
|
44
46
|
"bare-ipc": "^1.1.0",
|
|
45
47
|
"brittle": "^3.2.1",
|
|
48
|
+
"lunte": "^1.7.0",
|
|
46
49
|
"prettier": "^3.4.2",
|
|
47
50
|
"prettier-config-holepunch": "^2.0.0"
|
|
48
51
|
},
|