@cloudgaming/rpc
Advanced tools
Comparing version 1.0.0-alpha.0 to 1.0.0-alpha.1
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.parseData = exports.parseResponse = exports.parseRequest = exports.buildError = exports.buildResponse = exports.buildRequest = void 0; | ||
const msgpack_lite_1 = require("msgpack-lite"); | ||
const msgpack_1 = require("@msgpack/msgpack"); | ||
function buildRequest(func, sequence, payload) { | ||
@@ -11,3 +11,3 @@ const request = { | ||
}; | ||
return msgpack_lite_1.encode(request); | ||
return msgpack_1.encode(request); | ||
} | ||
@@ -21,3 +21,3 @@ exports.buildRequest = buildRequest; | ||
}; | ||
return msgpack_lite_1.encode(response); | ||
return msgpack_1.encode(response); | ||
} | ||
@@ -32,15 +32,15 @@ exports.buildResponse = buildResponse; | ||
}; | ||
return msgpack_lite_1.encode(response); | ||
return msgpack_1.encode(response); | ||
} | ||
exports.buildError = buildError; | ||
function parseRequest(data) { | ||
return msgpack_lite_1.decode(data); | ||
return msgpack_1.decode(data); | ||
} | ||
exports.parseRequest = parseRequest; | ||
function parseResponse(data) { | ||
return msgpack_lite_1.decode(data); | ||
return msgpack_1.decode(data); | ||
} | ||
exports.parseResponse = parseResponse; | ||
function parseData(data) { | ||
const raw = msgpack_lite_1.decode(data); | ||
const raw = msgpack_1.decode(data); | ||
if (raw.c) { | ||
@@ -47,0 +47,0 @@ return { response: raw, raw }; |
{ | ||
"name": "@cloudgaming/rpc", | ||
"version": "1.0.0-alpha.0", | ||
"version": "1.0.0-alpha.1", | ||
"main": "dist/index.js", | ||
@@ -21,11 +21,10 @@ "type": "commonjs", | ||
"dependencies": { | ||
"@msgpack/msgpack": "^2.5.1", | ||
"@types/nanoid": "^2.1.0", | ||
"debug": "^4.1.1", | ||
"msgpack-lite": "^0.1.26", | ||
"nanoid": "^3.1.12" | ||
}, | ||
"devDependencies": { | ||
"@types/debug": "^4.1.5", | ||
"@types/msgpack-lite": "^0.1.7" | ||
"@types/debug": "^4.1.5" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
1
38564
+ Added@msgpack/msgpack@^2.5.1
+ Added@msgpack/msgpack@2.8.0(transitive)
- Removedmsgpack-lite@^0.1.26
- Removedevent-lite@0.1.3(transitive)
- Removedieee754@1.2.1(transitive)
- Removedint64-buffer@0.1.10(transitive)
- Removedisarray@1.0.0(transitive)
- Removedmsgpack-lite@0.1.26(transitive)