@rc-ex/ws 0.16.2 → 0.17.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.
- package/lib/exceptions/ClosedException.d.ts +4 -0
- package/lib/exceptions/ClosedException.js +9 -0
- package/lib/exceptions/ClosedException.js.map +1 -0
- package/lib/exceptions/ConnectionException.d.ts +7 -0
- package/lib/exceptions/ConnectionException.js +16 -0
- package/lib/exceptions/ConnectionException.js.map +1 -0
- package/lib/exceptions/TimeoutException.d.ts +4 -0
- package/lib/exceptions/TimeoutException.js +9 -0
- package/lib/exceptions/TimeoutException.js.map +1 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.js +20 -21
- package/lib/index.js.map +1 -1
- package/lib/rest.d.ts +3 -3
- package/lib/rest.js +18 -20
- package/lib/rest.js.map +1 -1
- package/lib/subscription.d.ts +6 -4
- package/lib/subscription.js +15 -9
- package/lib/subscription.js.map +1 -1
- package/lib/types.d.ts +14 -0
- package/lib/types.js.map +1 -1
- package/lib/utils.d.ts +1 -1
- package/lib/utils.js +14 -12
- package/lib/utils.js.map +1 -1
- package/package.json +10 -4
- package/src/exceptions/ClosedException.ts +7 -0
- package/src/exceptions/ConnectionException.ts +17 -0
- package/src/exceptions/TimeoutException.ts +7 -0
- package/{index.ts → src/index.ts} +50 -36
- package/{rest.ts → src/rest.ts} +26 -26
- package/{subscription.ts → src/subscription.ts} +41 -32
- package/{types.ts → src/types.ts} +27 -5
- package/{utils.ts → src/utils.ts} +15 -14
- package/tsconfig.json +3 -2
- package/exceptions.ts +0 -25
- package/lib/exceptions.d.ts +0 -12
- package/lib/exceptions.js +0 -29
- package/lib/exceptions.js.map +0 -1
- package/lib/package.json +0 -31
package/lib/exceptions.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ClosedException = exports.TimeoutException = exports.ConnectionException = void 0;
|
|
7
|
-
const utils_1 = __importDefault(require("./utils"));
|
|
8
|
-
class ConnectionException extends Error {
|
|
9
|
-
constructor(wsgEvent) {
|
|
10
|
-
const [, wsgError] = utils_1.default.splitWsgData(wsgEvent.data);
|
|
11
|
-
super(JSON.stringify(wsgError, null, 2));
|
|
12
|
-
this.wsgEvent = wsgEvent;
|
|
13
|
-
this.wsgError = wsgError;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.ConnectionException = ConnectionException;
|
|
17
|
-
class TimeoutException extends Error {
|
|
18
|
-
constructor(message) {
|
|
19
|
-
super(message !== null && message !== void 0 ? message : 'Failed to receive expected WebSocket message in time.');
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
exports.TimeoutException = TimeoutException;
|
|
23
|
-
class ClosedException extends Error {
|
|
24
|
-
constructor(message) {
|
|
25
|
-
super(message !== null && message !== void 0 ? message : 'WebSocket has been closed');
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
exports.ClosedException = ClosedException;
|
|
29
|
-
//# sourceMappingURL=exceptions.js.map
|
package/lib/exceptions.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exceptions.js","sourceRoot":"","sources":["../exceptions.ts"],"names":[],"mappings":";;;;;;AACA,oDAA4B;AAE5B,MAAa,mBAAoB,SAAQ,KAAK;IAG5C,YAAY,QAAkB;QAC5B,MAAM,CAAC,EAAE,QAAQ,CAAC,GAAwB,eAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC5E,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QACzC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;CACF;AATD,kDASC;AAED,MAAa,gBAAiB,SAAQ,KAAK;IACzC,YAAY,OAAgB;QAC1B,KAAK,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,uDAAuD,CAAC,CAAC;IAC5E,CAAC;CACF;AAJD,4CAIC;AAED,MAAa,eAAgB,SAAQ,KAAK;IACxC,YAAY,OAAgB;QAC1B,KAAK,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,2BAA2B,CAAC,CAAC;IAChD,CAAC;CACF;AAJD,0CAIC"}
|
package/lib/package.json
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@rc-ex/ws",
|
|
3
|
-
"version": "0.16.2",
|
|
4
|
-
"description": "WebSocket extension for ringcentral-extensible project",
|
|
5
|
-
"author": "Tyler Liu <tyler.liu@ringcentral.com>",
|
|
6
|
-
"homepage": "https://github.com/ringcentral/ringcentral-extensible/tree/master/packages/extensions/ws",
|
|
7
|
-
"license": "MIT",
|
|
8
|
-
"main": "lib/index.js",
|
|
9
|
-
"types": "lib/index.d.ts",
|
|
10
|
-
"repository": {
|
|
11
|
-
"type": "git",
|
|
12
|
-
"url": "git+https://github.com/ringcentral/ringcentral-extensible.git"
|
|
13
|
-
},
|
|
14
|
-
"bugs": {
|
|
15
|
-
"url": "https://github.com/ringcentral/ringcentral-extensible/issues"
|
|
16
|
-
},
|
|
17
|
-
"publishConfig": {
|
|
18
|
-
"access": "public"
|
|
19
|
-
},
|
|
20
|
-
"dependencies": {
|
|
21
|
-
"@types/lodash": "^4.14.179",
|
|
22
|
-
"@types/ws": "^8.5.3",
|
|
23
|
-
"http-status-codes": "^2.2.0",
|
|
24
|
-
"hyperid": "^3.0.1",
|
|
25
|
-
"isomorphic-ws": "^4.0.1",
|
|
26
|
-
"lodash": "^4.17.21",
|
|
27
|
-
"wait-for-async": "^0.6.0",
|
|
28
|
-
"ws": "^8.5.0"
|
|
29
|
-
},
|
|
30
|
-
"gitHead": "aacf516db73df494a3c03fbf8971bc5d7c1e6af6"
|
|
31
|
-
}
|