async-call-rpc
Advanced tools
Comparing version 6.0.1 to 6.0.2
@@ -6,3 +6,3 @@ /// <reference types="./base.d.ts" /> | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.AsyncCall = {})); | ||
}(this, (function (exports) { 'use strict'; | ||
})(this, (function (exports) { 'use strict'; | ||
@@ -606,3 +606,4 @@ class CustomError extends Error { | ||
if (log_localError) console_error(e, data, result); | ||
return ErrorResponseParseError(e, mapError || defaultErrorMapper(e && e.stack)) | ||
// todo: should check before access e.stack | ||
return ErrorResponseParseError(e, mapError || defaultErrorMapper(e && (e ).stack)) | ||
} | ||
@@ -754,3 +755,3 @@ }; | ||
}))); | ||
})); | ||
//# sourceMappingURL=base.js.map |
@@ -6,3 +6,3 @@ /// <reference types="./full.d.ts" /> | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.AsyncCall = {})); | ||
}(this, (function (exports) { 'use strict'; | ||
})(this, (function (exports) { 'use strict'; | ||
@@ -607,3 +607,4 @@ class CustomError extends Error { | ||
if (log_localError) console_error(e, data, result); | ||
return ErrorResponseParseError(e, mapError || defaultErrorMapper(e && e.stack)) | ||
// todo: should check before access e.stack | ||
return ErrorResponseParseError(e, mapError || defaultErrorMapper(e && (e ).stack)) | ||
} | ||
@@ -955,3 +956,3 @@ }; | ||
}))); | ||
})); | ||
//# sourceMappingURL=full.js.map |
{ | ||
"name": "async-call-rpc", | ||
"version": "6.0.1", | ||
"version": "6.0.2", | ||
"description": "A lightweight JSON RPC server & client", | ||
@@ -29,3 +29,3 @@ "main": "out/base.js", | ||
}, | ||
"./utils/": "./utils/" | ||
"./utils/*": "./utils/*" | ||
}, | ||
@@ -48,18 +48,2 @@ "typesVersions": { | ||
}, | ||
"scripts": { | ||
"prepublishOnly": "npm run clean && npm run test && npm run build", | ||
"clean": "rimraf ./out ./utils/web ./utils/node ./es ./coverage ./temp", | ||
"release": "npm run clean && npm run test && npm run build && standard-version", | ||
"watch:tsc": "tsc -b -w", | ||
"build:tsc": "tsc -b", | ||
"watch:rollup": "rollup -c -w", | ||
"build:rollup": "rollup -c", | ||
"build": "npm run build:tsc && npm run build:rollup && npm run doc", | ||
"doc:api": "api-extractor run --local --verbose", | ||
"doc:md": "api-documenter markdown -o docs -i temp", | ||
"doc": "run-s doc:api doc:md", | ||
"start": "run-p watch:rollup watch:tsc watch:test", | ||
"test": "jest --coverage", | ||
"watch:test": "jest --watch" | ||
}, | ||
"repository": { | ||
@@ -79,26 +63,26 @@ "type": "git", | ||
"devDependencies": { | ||
"@microsoft/api-documenter": "^7.12.14", | ||
"@microsoft/api-extractor": "^7.13.2", | ||
"@msgpack/msgpack": "^2.5.1", | ||
"@rollup/plugin-sucrase": "^3.1.0", | ||
"@types/bson": "^4.0.3", | ||
"@types/jest": "^26.0.21", | ||
"@types/node": "^14.14.35", | ||
"@types/ws": "^7.4.0", | ||
"@microsoft/api-documenter": "^7.15.3", | ||
"@microsoft/api-extractor": "^7.19.4", | ||
"@msgpack/msgpack": "^2.7.2", | ||
"@rollup/plugin-sucrase": "^3.1.1", | ||
"@types/bson": "^4.2.0", | ||
"@types/jest": "^26.0.24", | ||
"@types/node": "^14.18.12", | ||
"@types/ws": "^7.4.7", | ||
"async-call-rpc": "link:", | ||
"bson": "^4.2.3", | ||
"bson": "^4.6.1", | ||
"jest": "^26.6.3", | ||
"jest-file-snapshot": "^0.5.0", | ||
"npm-run-all": "^4.1.5", | ||
"prettier": "^2.2.1", | ||
"prettier": "^2.5.1", | ||
"pretty-format": "^26.6.2", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.42.3", | ||
"rollup-plugin-dts": "^3.0.1", | ||
"rollup": "^2.70.0", | ||
"rollup-plugin-dts": "^3.0.2", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"standard-version": "^9.1.1", | ||
"ts-jest": "^26.5.4", | ||
"tslib": "^2.1.0", | ||
"typescript": "^4.2.3", | ||
"ws": "^7.4.4" | ||
"standard-version": "^9.3.2", | ||
"ts-jest": "^26.5.6", | ||
"tslib": "^2.3.1", | ||
"typescript": "^4.6.2", | ||
"ws": "^7.5.7" | ||
}, | ||
@@ -111,3 +95,18 @@ "files": [ | ||
"utils-src" | ||
] | ||
} | ||
], | ||
"scripts": { | ||
"clean": "rimraf ./out ./utils/web ./utils/node ./es ./coverage ./temp", | ||
"release": "npm run clean && npm run test && npm run build && standard-version", | ||
"watch:tsc": "tsc -b -w", | ||
"build:tsc": "tsc -b", | ||
"watch:rollup": "rollup -c -w", | ||
"build:rollup": "rollup -c", | ||
"build": "npm run build:tsc && npm run build:rollup && npm run doc", | ||
"doc:api": "api-extractor run --local --verbose", | ||
"doc:md": "api-documenter markdown -o docs -i temp", | ||
"doc": "run-s doc:api doc:md", | ||
"start": "run-p watch:rollup watch:tsc watch:test", | ||
"test": "jest --coverage", | ||
"watch:test": "jest --watch" | ||
} | ||
} |
@@ -53,4 +53,4 @@ # Async Call | ||
- [CallbackBasedChannel](https://jack-works.github.io/async-call-rpc/async-call-rpc.callbackbasedchannel.html), generally used in the server. [Example](https://github.com/Jack-Works/async-call-rpc/blob/master/utils-src/web/websocket.client.ts). | ||
- [EventBasedChannel](https://jack-works.github.io/async-call-rpc/async-call-rpc.eventbasedchannel.html), generally used in the client. [Example](https://github.com/Jack-Works/async-call-rpc/blob/master/utils-src/node/websocket.server.ts) | ||
- [CallbackBasedChannel](https://jack-works.github.io/async-call-rpc/async-call-rpc.callbackbasedchannel.html), generally used in the server. [Example](https://github.com/Jack-Works/async-call-rpc/blob/master/utils-src/node/websocket.server.ts). | ||
- [EventBasedChannel](https://jack-works.github.io/async-call-rpc/async-call-rpc.eventbasedchannel.html), generally used in the client. [Example](https://github.com/Jack-Works/async-call-rpc/blob/master/utils-src/web/websocket.client.ts) | ||
@@ -57,0 +57,0 @@ There are some [built-in channel](#builtin-channels) you can simplify the usage. |
@@ -0,0 +0,0 @@ /** |
@@ -241,3 +241,4 @@ export * from './types' | ||
if (log_localError) console_error(e, data, result) | ||
return ErrorResponseParseError(e, mapError || defaultErrorMapper(e && e.stack)) | ||
// todo: should check before access e.stack | ||
return ErrorResponseParseError(e, mapError || defaultErrorMapper(e && (e as any).stack)) | ||
} | ||
@@ -244,0 +245,0 @@ } |
@@ -0,0 +0,0 @@ import { isString } from '../utils/constants' |
@@ -0,0 +0,0 @@ import { AsyncCallNotify } from '../utils/internalSymbol' |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ export const isString = (x: unknown): x is string => typeof x === 'string' |
@@ -0,0 +0,0 @@ class CustomError extends Error { |
export const generateRandomID = () => Math.random().toString(36).slice(2) |
@@ -0,0 +0,0 @@ const i = 'AsyncCall/' |
@@ -0,0 +0,0 @@ import { globalDOMException as DOMException, DOMExceptionHeader } from './error' |
@@ -0,0 +0,0 @@ import type { AsyncCallOptions } from '../Async-Call' |
@@ -0,0 +0,0 @@ //#region Serialization |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ import type { serialize as S, deserialize as D } from 'bson' |
@@ -0,0 +0,0 @@ import type { encode as S, decode as D } from '@msgpack/msgpack' |
@@ -0,0 +0,0 @@ import type { Server } from 'ws' |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ import type { EventBasedChannel } from 'async-call-rpc' |
@@ -0,0 +0,0 @@ import type { Serialization } from 'async-call-rpc' |
@@ -0,0 +0,0 @@ import type { encode as S, decode as D } from '@msgpack/msgpack' |
@@ -0,0 +0,0 @@ import type { EventBasedChannel } from 'async-call-rpc' |
@@ -0,0 +0,0 @@ import type { EventBasedChannel } from 'async-call-rpc' |
@@ -30,3 +30,3 @@ import { Server } from 'https://deno.land/std@0.61.0/http/server.ts' | ||
if (signal.signal.aborted || websocket.isClosed) return | ||
callback(event).then((x) => x && websocket.send(x as any), this.error) | ||
callback(event).then((x) => x && !websocket.isClosed && websocket.send(x as any), this.error) | ||
} | ||
@@ -33,0 +33,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
768729
6308