@rc-ex/ws 1.3.11 → 1.3.13

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.
@@ -1,23 +1,8 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
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
- return ClosedException;
22
- }(Error));
23
- export default ClosedException;
7
+ }
8
+ exports.default = ClosedException;
@@ -1,29 +1,17 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
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
- 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
- return ConnectionException;
28
- }(Error));
29
- export default ConnectionException;
16
+ }
17
+ exports.default = ConnectionException;
@@ -1,23 +1,8 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
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
- return TimeoutException;
22
- }(Error));
23
- export default TimeoutException;
7
+ }
8
+ exports.default = TimeoutException;