@comake/skl-js-engine
Version:
Standard Knowledge Language Javascript Engine
37 lines • 1.43 kB
JavaScript
;
/**
* JSON-RPC 2.0 Protocol Types
* Based on: https://www.jsonrpc.org/specification
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.STANDARD_METHODS = exports.JsonRpcErrorCode = exports.JSONRPC_VERSION = void 0;
/**
* JSON-RPC 2.0 version identifier
*/
exports.JSONRPC_VERSION = '2.0';
/**
* JSON-RPC Error codes (standard codes from spec)
*/
var JsonRpcErrorCode;
(function (JsonRpcErrorCode) {
JsonRpcErrorCode[JsonRpcErrorCode["parseError"] = -32700] = "parseError";
JsonRpcErrorCode[JsonRpcErrorCode["invalidRequest"] = -32600] = "invalidRequest";
JsonRpcErrorCode[JsonRpcErrorCode["methodNotFound"] = -32601] = "methodNotFound";
JsonRpcErrorCode[JsonRpcErrorCode["invalidParams"] = -32602] = "invalidParams";
JsonRpcErrorCode[JsonRpcErrorCode["internalError"] = -32603] = "internalError";
// Server error range: -32000 to -32099
JsonRpcErrorCode[JsonRpcErrorCode["serverErrorStart"] = -32099] = "serverErrorStart";
JsonRpcErrorCode[JsonRpcErrorCode["serverErrorEnd"] = -32000] = "serverErrorEnd";
})(JsonRpcErrorCode = exports.JsonRpcErrorCode || (exports.JsonRpcErrorCode = {}));
/**
* Standard JSON-RPC method names for JSExecutor
*/
exports.STANDARD_METHODS = {
executeCode: 'executeCode',
getStatus: 'getStatus',
ping: 'ping',
shutdown: 'shutdown',
log: 'log',
error: 'error'
};
//# sourceMappingURL=types.js.map