@rc-ex/ws 1.3.1 → 1.3.2

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,26 +1,9 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
2
  Object.defineProperty(exports, "__esModule", { value: true });
18
- var ClosedException = /** @class */ (function (_super) {
19
- __extends(ClosedException, _super);
20
- function ClosedException(message) {
21
- return _super.call(this, message !== null && message !== void 0 ? message : "WebSocket has been closed") || this;
3
+ class ClosedException extends Error {
4
+ constructor(message) {
5
+ super(message ?? "WebSocket has been closed");
22
6
  }
23
- return ClosedException;
24
- }(Error));
7
+ }
25
8
  exports.default = ClosedException;
26
9
  //# sourceMappingURL=ClosedException.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ClosedException.js","sourceRoot":"","sources":["../../src/exceptions/ClosedException.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;IAA8B,mCAAK;IACjC,yBAAmB,OAAgB;QACjC,OAAA,MAAK,YAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,2BAA2B,CAAC,SAAC;IAChD,CAAC;IACH,sBAAC;AAAD,CAAC,AAJD,CAA8B,KAAK,GAIlC;AAED,kBAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"ClosedException.js","sourceRoot":"","sources":["../../src/exceptions/ClosedException.ts"],"names":[],"mappings":";;AAAA,MAAM,eAAgB,SAAQ,KAAK;IACjC,YAAmB,OAAgB;QACjC,KAAK,CAAC,OAAO,IAAI,2BAA2B,CAAC,CAAC;IAChD,CAAC;CACF;AAED,kBAAe,eAAe,CAAC"}
@@ -1,35 +1,18 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
18
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
19
4
  };
20
5
  Object.defineProperty(exports, "__esModule", { value: true });
21
- var utils_js_1 = __importDefault(require("../utils.js"));
22
- var ConnectionException = /** @class */ (function (_super) {
23
- __extends(ConnectionException, _super);
24
- function ConnectionException(wsgEvent) {
25
- var _this = this;
26
- var _a = utils_js_1.default.splitWsgData(wsgEvent.data), wsgError = _a[1];
27
- _this = _super.call(this, JSON.stringify(wsgError, null, 2)) || this;
28
- _this.wsgEvent = wsgEvent;
29
- _this.wsgError = wsgError;
30
- return _this;
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;
31
15
  }
32
- return ConnectionException;
33
- }(Error));
16
+ }
34
17
  exports.default = ConnectionException;
35
18
  //# sourceMappingURL=ConnectionException.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConnectionException.js","sourceRoot":"","sources":["../../src/exceptions/ConnectionException.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AACA,yDAAgC;AAEhC;IAAkC,uCAAK;IAKrC,6BAAmB,QAAkB;QAArC,iBAKC;QAJO,IAAA,KAAoC,kBAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAlE,QAAQ,QAA0D,CAAC;QAC5E,QAAA,MAAK,YAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,SAAC;QACzC,KAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,KAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;;IAC3B,CAAC;IACH,0BAAC;AAAD,CAAC,AAXD,CAAkC,KAAK,GAWtC;AAED,kBAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"ConnectionException.js","sourceRoot":"","sources":["../../src/exceptions/ConnectionException.ts"],"names":[],"mappings":";;;;;AACA,2DAAgC;AAEhC,MAAM,mBAAoB,SAAQ,KAAK;IAC9B,QAAQ,CAAW;IAEnB,QAAQ,CAAW;IAE1B,YAAmB,QAAkB;QACnC,MAAM,CAAC,EAAE,QAAQ,CAAC,GAAwB,kBAAK,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;AAED,kBAAe,mBAAmB,CAAC"}
@@ -1,26 +1,9 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
2
  Object.defineProperty(exports, "__esModule", { value: true });
18
- var TimeoutException = /** @class */ (function (_super) {
19
- __extends(TimeoutException, _super);
20
- function TimeoutException(message) {
21
- return _super.call(this, message !== null && message !== void 0 ? message : "Failed to receive expected WebSocket message in time.") || this;
3
+ class TimeoutException extends Error {
4
+ constructor(message) {
5
+ super(message ?? "Failed to receive expected WebSocket message in time.");
22
6
  }
23
- return TimeoutException;
24
- }(Error));
7
+ }
25
8
  exports.default = TimeoutException;
26
9
  //# sourceMappingURL=TimeoutException.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TimeoutException.js","sourceRoot":"","sources":["../../src/exceptions/TimeoutException.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;IAA+B,oCAAK;IAClC,0BAAmB,OAAgB;QACjC,OAAA,MAAK,YAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,uDAAuD,CAAC,SAAC;IAC5E,CAAC;IACH,uBAAC;AAAD,CAAC,AAJD,CAA+B,KAAK,GAInC;AAED,kBAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"TimeoutException.js","sourceRoot":"","sources":["../../src/exceptions/TimeoutException.ts"],"names":[],"mappings":";;AAAA,MAAM,gBAAiB,SAAQ,KAAK;IAClC,YAAmB,OAAgB;QACjC,KAAK,CAAC,OAAO,IAAI,uDAAuD,CAAC,CAAC;IAC5E,CAAC;CACF;AAED,kBAAe,gBAAgB,CAAC"}