bare-rpc 1.3.0 → 1.3.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.
Files changed (2) hide show
  1. package/lib/messages.js +3 -3
  2. package/package.json +2 -2
package/lib/messages.js CHANGED
@@ -114,7 +114,7 @@ exports.message = {
114
114
  case t.REQUEST: {
115
115
  const command = c.uint.decode(state)
116
116
  const stream = c.uint.decode(state)
117
- const data = stream === 0 ? c.buffer.decode(state) : null
117
+ const data = stream === 0 ? c.optionalBuffer.decode(state) : null
118
118
 
119
119
  return { type, id, command, stream, data }
120
120
  }
@@ -128,7 +128,7 @@ exports.message = {
128
128
  }
129
129
 
130
130
  if (stream === 0) {
131
- return { type, id, stream, error: null, data: c.buffer.decode(state) }
131
+ return { type, id, stream, error: null, data: c.optionalBuffer.decode(state) }
132
132
  }
133
133
 
134
134
  return { type, id, stream, error: null, data: null }
@@ -142,7 +142,7 @@ exports.message = {
142
142
  }
143
143
 
144
144
  if (stream & s.DATA) {
145
- return { type, id, stream, error: null, data: c.buffer.decode(state) }
145
+ return { type, id, stream, error: null, data: c.optionalBuffer.decode(state) }
146
146
  }
147
147
 
148
148
  return { type, id, stream, error: null, data: null }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bare-rpc",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "librpc ABI compatible RPC for Bare",
5
5
  "exports": {
6
6
  ".": {
@@ -38,7 +38,7 @@
38
38
  "dependencies": {
39
39
  "b4a": "^1.6.6",
40
40
  "bare-stream": "^2.1.3",
41
- "compact-encoding": "^2.15.0",
41
+ "compact-encoding": "^3.0.0",
42
42
  "safety-catch": "^1.0.2"
43
43
  },
44
44
  "devDependencies": {