@loadmill/universal 0.3.49 → 0.3.52

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.
@@ -4,4 +4,5 @@ import { FieldErrors } from './field-errors';
4
4
  import * as errors from './client-errors';
5
5
  import { superagentCorsError, corsErrorStatusPrefix, corsPreFlightErrorStatusPrefix, unknownStatusCorsError, isKnownStatusCorsError, isCorsError } from './known-errors';
6
6
  import JSONSchemaAssertionError from './json-schema-error';
7
- export { PresentableError, ClientError, errors, FieldErrors, superagentCorsError, corsErrorStatusPrefix, corsPreFlightErrorStatusPrefix, unknownStatusCorsError, isKnownStatusCorsError, isCorsError, JSONSchemaAssertionError };
7
+ import WebsocketError from './ws-error';
8
+ export { PresentableError, ClientError, errors, FieldErrors, superagentCorsError, corsErrorStatusPrefix, corsPreFlightErrorStatusPrefix, unknownStatusCorsError, isKnownStatusCorsError, isCorsError, JSONSchemaAssertionError, WebsocketError, };
@@ -22,7 +22,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
22
22
  return (mod && mod.__esModule) ? mod : { "default": mod };
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.JSONSchemaAssertionError = exports.isCorsError = exports.isKnownStatusCorsError = exports.unknownStatusCorsError = exports.corsPreFlightErrorStatusPrefix = exports.corsErrorStatusPrefix = exports.superagentCorsError = exports.errors = exports.ClientError = exports.PresentableError = void 0;
25
+ exports.WebsocketError = exports.JSONSchemaAssertionError = exports.isCorsError = exports.isKnownStatusCorsError = exports.unknownStatusCorsError = exports.corsPreFlightErrorStatusPrefix = exports.corsErrorStatusPrefix = exports.superagentCorsError = exports.errors = exports.ClientError = exports.PresentableError = void 0;
26
26
  var presentable_error_1 = __importDefault(require("./presentable-error"));
27
27
  exports.PresentableError = presentable_error_1.default;
28
28
  var client_error_1 = __importDefault(require("./client-error"));
@@ -38,4 +38,6 @@ Object.defineProperty(exports, "isKnownStatusCorsError", { enumerable: true, get
38
38
  Object.defineProperty(exports, "isCorsError", { enumerable: true, get: function () { return known_errors_1.isCorsError; } });
39
39
  var json_schema_error_1 = __importDefault(require("./json-schema-error"));
40
40
  exports.JSONSchemaAssertionError = json_schema_error_1.default;
41
+ var ws_error_1 = __importDefault(require("./ws-error"));
42
+ exports.WebsocketError = ws_error_1.default;
41
43
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0EAAmD;AAejD,2BAfK,2BAAgB,CAeL;AAdlB,gEAAyC;AAevC,sBAfK,sBAAW,CAeL;AAbb,sDAA0C;AAcxC,wBAAM;AAbR,+CAOwB;AAQtB,oGAdA,kCAAmB,OAcA;AACnB,sGAdA,oCAAqB,OAcA;AACrB,+GAdA,6CAA8B,OAcA;AAC9B,uGAdA,qCAAsB,OAcA;AACtB,uGAdA,qCAAsB,OAcA;AACtB,4FAdA,0BAAW,OAcA;AAZb,0EAA2D;AAazD,mCAbK,2BAAwB,CAaL"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0EAAmD;AAgBjD,2BAhBK,2BAAgB,CAgBL;AAflB,gEAAyC;AAgBvC,sBAhBK,sBAAW,CAgBL;AAdb,sDAA0C;AAexC,wBAAM;AAdR,+CAOwB;AAStB,oGAfA,kCAAmB,OAeA;AACnB,sGAfA,oCAAqB,OAeA;AACrB,+GAfA,6CAA8B,OAeA;AAC9B,uGAfA,qCAAsB,OAeA;AACtB,uGAfA,qCAAsB,OAeA;AACtB,4FAfA,0BAAW,OAeA;AAbb,0EAA2D;AAczD,mCAdK,2BAAwB,CAcL;AAb1B,wDAAwC;AActC,yBAdK,kBAAc,CAcL"}
@@ -0,0 +1,5 @@
1
+ import PresentableError from './presentable-error';
2
+ export default class WebsocketError extends PresentableError {
3
+ readonly prettyMessage: any;
4
+ constructor(prettyMessage: any);
5
+ }
@@ -0,0 +1,39 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
18
+ return (mod && mod.__esModule) ? mod : { "default": mod };
19
+ };
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ var presentable_error_1 = __importDefault(require("./presentable-error"));
22
+ var WebsocketError = /** @class */ (function (_super) {
23
+ __extends(WebsocketError, _super);
24
+ function WebsocketError(prettyMessage) {
25
+ var _this = _super.call(this, prettyMessage) || this;
26
+ Object.defineProperty(_this, "prettyMessage", {
27
+ enumerable: true,
28
+ configurable: true,
29
+ writable: true,
30
+ value: prettyMessage
31
+ });
32
+ // Workaround suggested in: https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work
33
+ Object.setPrototypeOf(_this, WebsocketError.prototype);
34
+ return _this;
35
+ }
36
+ return WebsocketError;
37
+ }(presentable_error_1.default));
38
+ exports.default = WebsocketError;
39
+ //# sourceMappingURL=ws-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ws-error.js","sourceRoot":"","sources":["../../src/errors/ws-error.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,0EAAmD;AAEnD;IAA4C,kCAAgB;IAC1D,wBAA4B,aAAa;QAAzC,YACE,kBAAM,aAAa,CAAC,SAIrB;;;;;mBAL2B;;QAG1B,wKAAwK;QACxK,MAAM,CAAC,cAAc,CAAC,KAAI,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;;IACxD,CAAC;IACH,qBAAC;AAAD,CAAC,AAPD,CAA4C,2BAAgB,GAO3D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loadmill/universal",
3
- "version": "0.3.49",
3
+ "version": "0.3.52",
4
4
  "description": "Loadmill universal utilities",
5
5
  "main": "dist/",
6
6
  "types": "dist/index.d.ts",