@rc-ex/ws 1.3.12 → 1.3.14
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/dist/esm/exceptions/ClosedException.js +7 -22
- package/dist/esm/exceptions/ConnectionException.js +16 -28
- package/dist/esm/exceptions/TimeoutException.js +7 -22
- package/dist/esm/index.js +309 -484
- package/dist/esm/rest.js +50 -94
- package/dist/esm/subscription.js +74 -151
- package/dist/esm/types.js +2 -1
- package/dist/esm/utils.js +40 -79
- package/package.json +2 -2
|
@@ -1,23 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
|
-
var ClosedException = /** @class */ (function (_super) {
|
|
17
|
-
__extends(ClosedException, _super);
|
|
18
|
-
function ClosedException(message) {
|
|
19
|
-
return _super.call(this, message !== null && message !== void 0 ? message : "WebSocket has been closed") || this;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class ClosedException extends Error {
|
|
4
|
+
constructor(message) {
|
|
5
|
+
super(message ?? "WebSocket has been closed");
|
|
20
6
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
export default ClosedException;
|
|
7
|
+
}
|
|
8
|
+
exports.default = ClosedException;
|
|
@@ -1,29 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
})();
|
|
16
|
-
import Utils from "../utils.js";
|
|
17
|
-
var ConnectionException = /** @class */ (function (_super) {
|
|
18
|
-
__extends(ConnectionException, _super);
|
|
19
|
-
function ConnectionException(wsgEvent) {
|
|
20
|
-
var _this = this;
|
|
21
|
-
var _a = Utils.splitWsgData(wsgEvent.data), wsgError = _a[1];
|
|
22
|
-
_this = _super.call(this, JSON.stringify(wsgError, null, 2)) || this;
|
|
23
|
-
_this.wsgEvent = wsgEvent;
|
|
24
|
-
_this.wsgError = wsgError;
|
|
25
|
-
return _this;
|
|
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
|
+
const utils_js_1 = __importDefault(require("../utils.js"));
|
|
7
|
+
class ConnectionException extends Error {
|
|
8
|
+
wsgEvent;
|
|
9
|
+
wsgError;
|
|
10
|
+
constructor(wsgEvent) {
|
|
11
|
+
const [, wsgError] = utils_js_1.default.splitWsgData(wsgEvent.data);
|
|
12
|
+
super(JSON.stringify(wsgError, null, 2));
|
|
13
|
+
this.wsgEvent = wsgEvent;
|
|
14
|
+
this.wsgError = wsgError;
|
|
26
15
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
export default ConnectionException;
|
|
16
|
+
}
|
|
17
|
+
exports.default = ConnectionException;
|
|
@@ -1,23 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
|
-
var TimeoutException = /** @class */ (function (_super) {
|
|
17
|
-
__extends(TimeoutException, _super);
|
|
18
|
-
function TimeoutException(message) {
|
|
19
|
-
return _super.call(this, message !== null && message !== void 0 ? message : "Failed to receive expected WebSocket message in time.") || this;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class TimeoutException extends Error {
|
|
4
|
+
constructor(message) {
|
|
5
|
+
super(message ?? "Failed to receive expected WebSocket message in time.");
|
|
20
6
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
export default TimeoutException;
|
|
7
|
+
}
|
|
8
|
+
exports.default = TimeoutException;
|