@tsed/exceptions 7.0.0-beta.1 → 7.0.0-beta.10

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.
Files changed (84) hide show
  1. package/lib/cjs/core/Exception.js +7 -2
  2. package/lib/cjs/core/Exception.js.map +1 -1
  3. package/lib/cjs/index.js +49 -4
  4. package/lib/cjs/index.js.map +1 -1
  5. package/lib/cjs/package.json +3 -0
  6. package/lib/esm/clientErrors/BadMapping.js +1 -1
  7. package/lib/esm/clientErrors/BadRequest.js +1 -1
  8. package/lib/esm/clientErrors/Conflict.js +1 -1
  9. package/lib/esm/clientErrors/ExpectationFailed.js +1 -1
  10. package/lib/esm/clientErrors/Forbidden.js +1 -1
  11. package/lib/esm/clientErrors/Gone.js +1 -1
  12. package/lib/esm/clientErrors/ImATeapot.js +1 -1
  13. package/lib/esm/clientErrors/LengthRequired.js +1 -1
  14. package/lib/esm/clientErrors/MethodNotAllowed.js +1 -1
  15. package/lib/esm/clientErrors/MisdirectedRequest.js +1 -1
  16. package/lib/esm/clientErrors/NotAcceptable.js +1 -1
  17. package/lib/esm/clientErrors/NotFound.js +1 -1
  18. package/lib/esm/clientErrors/PaymentRequired.js +1 -1
  19. package/lib/esm/clientErrors/PreconditionFailed.js +1 -1
  20. package/lib/esm/clientErrors/PreconditionRequired.js +1 -1
  21. package/lib/esm/clientErrors/ProxyAuthentificationRequired.js +1 -1
  22. package/lib/esm/clientErrors/RequestEntityTooLarge.js +1 -1
  23. package/lib/esm/clientErrors/RequestHeaderFieldsTooLarge.js +1 -1
  24. package/lib/esm/clientErrors/RequestRangeUnsatisfiable.js +1 -1
  25. package/lib/esm/clientErrors/RequestTimeout.js +1 -1
  26. package/lib/esm/clientErrors/RequestURITooLong.js +1 -1
  27. package/lib/esm/clientErrors/TooManyRequests.js +1 -1
  28. package/lib/esm/clientErrors/Unauthorized.js +1 -1
  29. package/lib/esm/clientErrors/UnavailableForLegalReasons.js +1 -1
  30. package/lib/esm/clientErrors/UnprocessableEntity.js +1 -1
  31. package/lib/esm/clientErrors/UnsupportedMediaType.js +1 -1
  32. package/lib/esm/clientErrors/UpgradeRequired.js +1 -1
  33. package/lib/esm/core/Exception.js +5 -1
  34. package/lib/esm/core/Exception.js.map +1 -1
  35. package/lib/esm/index.js +49 -4
  36. package/lib/esm/index.js.map +1 -1
  37. package/lib/esm/package.json +3 -0
  38. package/lib/esm/redirections/MovedPermanently.js +1 -1
  39. package/lib/esm/redirections/MovedTemporarily.js +1 -1
  40. package/lib/esm/redirections/MultipleChoices.js +1 -1
  41. package/lib/esm/redirections/NotModified.js +1 -1
  42. package/lib/esm/redirections/PermanentRedirect.js +1 -1
  43. package/lib/esm/redirections/SeeOther.js +1 -1
  44. package/lib/esm/redirections/TemporaryRedirect.js +1 -1
  45. package/lib/esm/redirections/UseProxy.js +1 -1
  46. package/lib/esm/serverErrors/BadGateway.js +1 -1
  47. package/lib/esm/serverErrors/BandwidthLimitExceeded.js +1 -1
  48. package/lib/esm/serverErrors/GatewayTimeout.js +1 -1
  49. package/lib/esm/serverErrors/InternalServerError.js +1 -1
  50. package/lib/esm/serverErrors/NetworkAuthenticationRequired.js +1 -1
  51. package/lib/esm/serverErrors/NotExtended.js +1 -1
  52. package/lib/esm/serverErrors/NotImplemented.js +1 -1
  53. package/lib/esm/serverErrors/ProxyError.js +1 -1
  54. package/lib/esm/serverErrors/ServiceUnvailable.js +1 -1
  55. package/lib/esm/serverErrors/VariantAlsoNegotiates.js +1 -1
  56. package/lib/types/index.d.ts +49 -4
  57. package/package.json +12 -7
  58. package/readme.md +1 -2
  59. package/tsconfig.compile.esm.json +1 -12
  60. package/lib/cjs/clientErrors/index.js +0 -31
  61. package/lib/cjs/clientErrors/index.js.map +0 -1
  62. package/lib/cjs/core/index.js +0 -5
  63. package/lib/cjs/core/index.js.map +0 -1
  64. package/lib/cjs/redirections/TooManyRedirects.js +0 -12
  65. package/lib/cjs/redirections/TooManyRedirects.js.map +0 -1
  66. package/lib/cjs/redirections/index.js +0 -13
  67. package/lib/cjs/redirections/index.js.map +0 -1
  68. package/lib/cjs/serverErrors/index.js +0 -14
  69. package/lib/cjs/serverErrors/index.js.map +0 -1
  70. package/lib/esm/clientErrors/index.js +0 -28
  71. package/lib/esm/clientErrors/index.js.map +0 -1
  72. package/lib/esm/core/index.js +0 -2
  73. package/lib/esm/core/index.js.map +0 -1
  74. package/lib/esm/redirections/TooManyRedirects.js +0 -8
  75. package/lib/esm/redirections/TooManyRedirects.js.map +0 -1
  76. package/lib/esm/redirections/index.js +0 -10
  77. package/lib/esm/redirections/index.js.map +0 -1
  78. package/lib/esm/serverErrors/index.js +0 -11
  79. package/lib/esm/serverErrors/index.js.map +0 -1
  80. package/lib/types/clientErrors/index.d.ts +0 -27
  81. package/lib/types/core/index.d.ts +0 -1
  82. package/lib/types/redirections/TooManyRedirects.d.ts +0 -5
  83. package/lib/types/redirections/index.d.ts +0 -9
  84. package/lib/types/serverErrors/index.d.ts +0 -10
@@ -1,7 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.HTTPException = exports.Exception = void 0;
4
- const schema_1 = require("@tsed/schema");
4
+ const tslib_1 = require("tslib");
5
+ const change_case_1 = require("change-case");
6
+ const statuses_1 = tslib_1.__importDefault(require("statuses"));
7
+ function getStatusConstant(status) {
8
+ return status === 200 ? "SUCCESS" : (0, change_case_1.constantCase)(String((0, statuses_1.default)(status)));
9
+ }
5
10
  class Exception extends Error {
6
11
  constructor(status = 500, message = "", origin) {
7
12
  super(message);
@@ -21,7 +26,7 @@ class Exception extends Error {
21
26
  this.headers = {};
22
27
  this.status = status;
23
28
  this.message = message;
24
- this.name = (0, schema_1.getStatusConstant)(status);
29
+ this.name = getStatusConstant(status);
25
30
  this.setOrigin(origin);
26
31
  }
27
32
  setHeaders(headers) {
@@ -1 +1 @@
1
- {"version":3,"file":"Exception.js","sourceRoot":"","sources":["../../../src/core/Exception.ts"],"names":[],"mappings":";;;AAAA,yCAA+C;AAE/C,MAAa,SAAU,SAAQ,KAAK;IAmClC,YAAY,SAAiB,GAAG,EAAE,UAAkB,EAAE,EAAE,MAA6B;QACnF,KAAK,CAAC,OAAO,CAAC,CAAC;QAnCjB;;;WAGG;QACI,SAAI,GAAW,gBAAgB,CAAC;QAKvC;;;WAGG;QACI,SAAI,GAAW,gBAAgB,CAAC;QAcvC;;WAEG;QACI,YAAO,GAAyB,EAAE,CAAC;QAOxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,IAAA,0BAAiB,EAAC,MAAM,CAAC,CAAC;QAEtC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACzB,CAAC;IAED,UAAU,CAAC,OAA6B;QACtC,IAAI,CAAC,OAAO,GAAG;YACb,GAAG,IAAI,CAAC,OAAO;YACf,GAAG,OAAO;SACX,CAAC;QAEF,OAAO,IAAI,CAAC;IACd,CAAC;IAED,SAAS,CAAC,GAAW,EAAE,KAAU;QAC/B,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QAE1B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,SAAS,CAAC,MAA4B;QACpC,IAAI,MAAM,EAAE;YACV,IAAI,MAAM,YAAY,KAAK,EAAE;gBAC3B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;gBACrB,IAAI,CAAC,OAAO,GAAG,GAAG,IAAI,CAAC,OAAO,qBAAqB,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC;aACjF;iBAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;gBACrC,IAAI,CAAC,MAAM,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC;gBAChC,IAAI,CAAC,OAAO,GAAG,GAAG,IAAI,CAAC,OAAO,qBAAqB,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC;aACjF;iBAAM;gBACL,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC;aACpB;SACF;IACH,CAAC;IAED,QAAQ;QACN,OAAO,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,MAAM,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,EAAE,CAAC;IACjE,CAAC;CACF;AA7ED,8BA6EC;AAED,MAAa,aAAc,SAAQ,SAAS;CAAG;AAA/C,sCAA+C","sourcesContent":["import {getStatusConstant} from \"@tsed/schema\";\n\nexport class Exception extends Error {\n /**\n * Exception base name\n * @type {string}\n */\n public name: string = \"HTTP_EXCEPTION\";\n /**\n * Message of the exception\n */\n public message: string;\n /**\n * Exception type\n * @type {string}\n */\n public type: string = \"HTTP_EXCEPTION\";\n /**\n * Stack calling\n */\n public stack: string;\n public origin: Error & any;\n /**\n * HTTP Code Status\n */\n public status: number;\n /**\n *\n */\n public body: any;\n /**\n * Headers must be sent to the response\n */\n public headers: {[key: string]: any} = {};\n\n [key: string]: any;\n\n constructor(status: number = 500, message: string = \"\", origin?: Error | string | any) {\n super(message);\n\n this.status = status;\n this.message = message;\n this.name = getStatusConstant(status);\n\n this.setOrigin(origin);\n }\n\n setHeaders(headers: {[key: string]: any}) {\n this.headers = {\n ...this.headers,\n ...headers\n };\n\n return this;\n }\n\n setHeader(key: string, value: any) {\n this.headers[key] = value;\n\n return this;\n }\n\n setOrigin(origin: Error | string | any) {\n if (origin) {\n if (origin instanceof Error) {\n this.origin = origin;\n this.message = `${this.message}, innerException: ${this.origin.message}`.trim();\n } else if (typeof origin === \"string\") {\n this.origin = new Error(origin);\n this.message = `${this.message}, innerException: ${this.origin.message}`.trim();\n } else {\n this.body = origin;\n }\n }\n }\n\n toString() {\n return `${this.name}(${this.status}): ${this.message} `.trim();\n }\n}\n\nexport class HTTPException extends Exception {}\n"]}
1
+ {"version":3,"file":"Exception.js","sourceRoot":"","sources":["../../../src/core/Exception.ts"],"names":[],"mappings":";;;;AAAA,6CAAyC;AACzC,gEAAgC;AAEhC,SAAS,iBAAiB,CAAC,MAAc;IACvC,OAAO,MAAM,KAAK,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAA,0BAAY,EAAC,MAAM,CAAC,IAAA,kBAAQ,EAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAC7E,CAAC;AAED,MAAa,SAAU,SAAQ,KAAK;IAmClC,YAAY,SAAiB,GAAG,EAAE,UAAkB,EAAE,EAAE,MAA6B;QACnF,KAAK,CAAC,OAAO,CAAC,CAAC;QAnCjB;;;WAGG;QACI,SAAI,GAAW,gBAAgB,CAAC;QAKvC;;;WAGG;QACI,SAAI,GAAW,gBAAgB,CAAC;QAcvC;;WAEG;QACI,YAAO,GAAyB,EAAE,CAAC;QAOxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;QAEtC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACzB,CAAC;IAED,UAAU,CAAC,OAA6B;QACtC,IAAI,CAAC,OAAO,GAAG;YACb,GAAG,IAAI,CAAC,OAAO;YACf,GAAG,OAAO;SACX,CAAC;QAEF,OAAO,IAAI,CAAC;IACd,CAAC;IAED,SAAS,CAAC,GAAW,EAAE,KAAU;QAC/B,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QAE1B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,SAAS,CAAC,MAA4B;QACpC,IAAI,MAAM,EAAE;YACV,IAAI,MAAM,YAAY,KAAK,EAAE;gBAC3B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;gBACrB,IAAI,CAAC,OAAO,GAAG,GAAG,IAAI,CAAC,OAAO,qBAAqB,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC;aACjF;iBAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;gBACrC,IAAI,CAAC,MAAM,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC;gBAChC,IAAI,CAAC,OAAO,GAAG,GAAG,IAAI,CAAC,OAAO,qBAAqB,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC;aACjF;iBAAM;gBACL,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC;aACpB;SACF;IACH,CAAC;IAED,QAAQ;QACN,OAAO,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,MAAM,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,EAAE,CAAC;IACjE,CAAC;CACF;AA7ED,8BA6EC;AAED,MAAa,aAAc,SAAQ,SAAS;CAAG;AAA/C,sCAA+C","sourcesContent":["import {constantCase} from \"change-case\";\nimport statuses from \"statuses\";\n\nfunction getStatusConstant(status: number) {\n return status === 200 ? \"SUCCESS\" : constantCase(String(statuses(status)));\n}\n\nexport class Exception extends Error {\n /**\n * Exception base name\n * @type {string}\n */\n public name: string = \"HTTP_EXCEPTION\";\n /**\n * Message of the exception\n */\n public message: string;\n /**\n * Exception type\n * @type {string}\n */\n public type: string = \"HTTP_EXCEPTION\";\n /**\n * Stack calling\n */\n public stack: string;\n public origin: Error & any;\n /**\n * HTTP Code Status\n */\n public status: number;\n /**\n *\n */\n public body: any;\n /**\n * Headers must be sent to the response\n */\n public headers: {[key: string]: any} = {};\n\n [key: string]: any;\n\n constructor(status: number = 500, message: string = \"\", origin?: Error | string | any) {\n super(message);\n\n this.status = status;\n this.message = message;\n this.name = getStatusConstant(status);\n\n this.setOrigin(origin);\n }\n\n setHeaders(headers: {[key: string]: any}) {\n this.headers = {\n ...this.headers,\n ...headers\n };\n\n return this;\n }\n\n setHeader(key: string, value: any) {\n this.headers[key] = value;\n\n return this;\n }\n\n setOrigin(origin: Error | string | any) {\n if (origin) {\n if (origin instanceof Error) {\n this.origin = origin;\n this.message = `${this.message}, innerException: ${this.origin.message}`.trim();\n } else if (typeof origin === \"string\") {\n this.origin = new Error(origin);\n this.message = `${this.message}, innerException: ${this.origin.message}`.trim();\n } else {\n this.body = origin;\n }\n }\n }\n\n toString() {\n return `${this.name}(${this.status}): ${this.message} `.trim();\n }\n}\n\nexport class HTTPException extends Exception {}\n"]}
package/lib/cjs/index.js CHANGED
@@ -1,8 +1,53 @@
1
1
  "use strict";
2
+ /**
3
+ * @file Automatically generated by barrelsby.
4
+ */
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  const tslib_1 = require("tslib");
4
- (0, tslib_1.__exportStar)(require("./core"), exports);
5
- (0, tslib_1.__exportStar)(require("./clientErrors"), exports);
6
- (0, tslib_1.__exportStar)(require("./redirections"), exports);
7
- (0, tslib_1.__exportStar)(require("./serverErrors"), exports);
7
+ tslib_1.__exportStar(require("./clientErrors/BadMapping"), exports);
8
+ tslib_1.__exportStar(require("./clientErrors/BadRequest"), exports);
9
+ tslib_1.__exportStar(require("./clientErrors/Conflict"), exports);
10
+ tslib_1.__exportStar(require("./clientErrors/ExpectationFailed"), exports);
11
+ tslib_1.__exportStar(require("./clientErrors/Forbidden"), exports);
12
+ tslib_1.__exportStar(require("./clientErrors/Gone"), exports);
13
+ tslib_1.__exportStar(require("./clientErrors/ImATeapot"), exports);
14
+ tslib_1.__exportStar(require("./clientErrors/LengthRequired"), exports);
15
+ tslib_1.__exportStar(require("./clientErrors/MethodNotAllowed"), exports);
16
+ tslib_1.__exportStar(require("./clientErrors/MisdirectedRequest"), exports);
17
+ tslib_1.__exportStar(require("./clientErrors/NotAcceptable"), exports);
18
+ tslib_1.__exportStar(require("./clientErrors/NotFound"), exports);
19
+ tslib_1.__exportStar(require("./clientErrors/PaymentRequired"), exports);
20
+ tslib_1.__exportStar(require("./clientErrors/PreconditionFailed"), exports);
21
+ tslib_1.__exportStar(require("./clientErrors/PreconditionRequired"), exports);
22
+ tslib_1.__exportStar(require("./clientErrors/ProxyAuthentificationRequired"), exports);
23
+ tslib_1.__exportStar(require("./clientErrors/RequestEntityTooLarge"), exports);
24
+ tslib_1.__exportStar(require("./clientErrors/RequestHeaderFieldsTooLarge"), exports);
25
+ tslib_1.__exportStar(require("./clientErrors/RequestRangeUnsatisfiable"), exports);
26
+ tslib_1.__exportStar(require("./clientErrors/RequestTimeout"), exports);
27
+ tslib_1.__exportStar(require("./clientErrors/RequestURITooLong"), exports);
28
+ tslib_1.__exportStar(require("./clientErrors/TooManyRequests"), exports);
29
+ tslib_1.__exportStar(require("./clientErrors/Unauthorized"), exports);
30
+ tslib_1.__exportStar(require("./clientErrors/UnavailableForLegalReasons"), exports);
31
+ tslib_1.__exportStar(require("./clientErrors/UnprocessableEntity"), exports);
32
+ tslib_1.__exportStar(require("./clientErrors/UnsupportedMediaType"), exports);
33
+ tslib_1.__exportStar(require("./clientErrors/UpgradeRequired"), exports);
34
+ tslib_1.__exportStar(require("./core/Exception"), exports);
35
+ tslib_1.__exportStar(require("./redirections/MovedPermanently"), exports);
36
+ tslib_1.__exportStar(require("./redirections/MovedTemporarily"), exports);
37
+ tslib_1.__exportStar(require("./redirections/MultipleChoices"), exports);
38
+ tslib_1.__exportStar(require("./redirections/NotModified"), exports);
39
+ tslib_1.__exportStar(require("./redirections/PermanentRedirect"), exports);
40
+ tslib_1.__exportStar(require("./redirections/SeeOther"), exports);
41
+ tslib_1.__exportStar(require("./redirections/TemporaryRedirect"), exports);
42
+ tslib_1.__exportStar(require("./redirections/UseProxy"), exports);
43
+ tslib_1.__exportStar(require("./serverErrors/BadGateway"), exports);
44
+ tslib_1.__exportStar(require("./serverErrors/BandwidthLimitExceeded"), exports);
45
+ tslib_1.__exportStar(require("./serverErrors/GatewayTimeout"), exports);
46
+ tslib_1.__exportStar(require("./serverErrors/InternalServerError"), exports);
47
+ tslib_1.__exportStar(require("./serverErrors/NetworkAuthenticationRequired"), exports);
48
+ tslib_1.__exportStar(require("./serverErrors/NotExtended"), exports);
49
+ tslib_1.__exportStar(require("./serverErrors/NotImplemented"), exports);
50
+ tslib_1.__exportStar(require("./serverErrors/ProxyError"), exports);
51
+ tslib_1.__exportStar(require("./serverErrors/ServiceUnvailable"), exports);
52
+ tslib_1.__exportStar(require("./serverErrors/VariantAlsoNegotiates"), exports);
8
53
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,sDAAuB;AACvB,8DAA+B;AAC/B,8DAA+B;AAC/B,8DAA+B","sourcesContent":["export * from \"./core\";\nexport * from \"./clientErrors\";\nexport * from \"./redirections\";\nexport * from \"./serverErrors\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,oEAA0C;AAC1C,oEAA0C;AAC1C,kEAAwC;AACxC,2EAAiD;AACjD,mEAAyC;AACzC,8DAAoC;AACpC,mEAAyC;AACzC,wEAA8C;AAC9C,0EAAgD;AAChD,4EAAkD;AAClD,uEAA6C;AAC7C,kEAAwC;AACxC,yEAA+C;AAC/C,4EAAkD;AAClD,8EAAoD;AACpD,uFAA6D;AAC7D,+EAAqD;AACrD,qFAA2D;AAC3D,mFAAyD;AACzD,wEAA8C;AAC9C,2EAAiD;AACjD,yEAA+C;AAC/C,sEAA4C;AAC5C,oFAA0D;AAC1D,6EAAmD;AACnD,8EAAoD;AACpD,yEAA+C;AAC/C,2DAAiC;AACjC,0EAAgD;AAChD,0EAAgD;AAChD,yEAA+C;AAC/C,qEAA2C;AAC3C,2EAAiD;AACjD,kEAAwC;AACxC,2EAAiD;AACjD,kEAAwC;AACxC,oEAA0C;AAC1C,gFAAsD;AACtD,wEAA8C;AAC9C,6EAAmD;AACnD,uFAA6D;AAC7D,qEAA2C;AAC3C,wEAA8C;AAC9C,oEAA0C;AAC1C,2EAAiD;AACjD,+EAAqD","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./clientErrors/BadMapping\";\nexport * from \"./clientErrors/BadRequest\";\nexport * from \"./clientErrors/Conflict\";\nexport * from \"./clientErrors/ExpectationFailed\";\nexport * from \"./clientErrors/Forbidden\";\nexport * from \"./clientErrors/Gone\";\nexport * from \"./clientErrors/ImATeapot\";\nexport * from \"./clientErrors/LengthRequired\";\nexport * from \"./clientErrors/MethodNotAllowed\";\nexport * from \"./clientErrors/MisdirectedRequest\";\nexport * from \"./clientErrors/NotAcceptable\";\nexport * from \"./clientErrors/NotFound\";\nexport * from \"./clientErrors/PaymentRequired\";\nexport * from \"./clientErrors/PreconditionFailed\";\nexport * from \"./clientErrors/PreconditionRequired\";\nexport * from \"./clientErrors/ProxyAuthentificationRequired\";\nexport * from \"./clientErrors/RequestEntityTooLarge\";\nexport * from \"./clientErrors/RequestHeaderFieldsTooLarge\";\nexport * from \"./clientErrors/RequestRangeUnsatisfiable\";\nexport * from \"./clientErrors/RequestTimeout\";\nexport * from \"./clientErrors/RequestURITooLong\";\nexport * from \"./clientErrors/TooManyRequests\";\nexport * from \"./clientErrors/Unauthorized\";\nexport * from \"./clientErrors/UnavailableForLegalReasons\";\nexport * from \"./clientErrors/UnprocessableEntity\";\nexport * from \"./clientErrors/UnsupportedMediaType\";\nexport * from \"./clientErrors/UpgradeRequired\";\nexport * from \"./core/Exception\";\nexport * from \"./redirections/MovedPermanently\";\nexport * from \"./redirections/MovedTemporarily\";\nexport * from \"./redirections/MultipleChoices\";\nexport * from \"./redirections/NotModified\";\nexport * from \"./redirections/PermanentRedirect\";\nexport * from \"./redirections/SeeOther\";\nexport * from \"./redirections/TemporaryRedirect\";\nexport * from \"./redirections/UseProxy\";\nexport * from \"./serverErrors/BadGateway\";\nexport * from \"./serverErrors/BandwidthLimitExceeded\";\nexport * from \"./serverErrors/GatewayTimeout\";\nexport * from \"./serverErrors/InternalServerError\";\nexport * from \"./serverErrors/NetworkAuthenticationRequired\";\nexport * from \"./serverErrors/NotExtended\";\nexport * from \"./serverErrors/NotImplemented\";\nexport * from \"./serverErrors/ProxyError\";\nexport * from \"./serverErrors/ServiceUnvailable\";\nexport * from \"./serverErrors/VariantAlsoNegotiates\";\n"]}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class BadMapping extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(BadMapping.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class BadRequest extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(BadRequest.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class Conflict extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(Conflict.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class ExpectationFailed extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(ExpectationFailed.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class Forbidden extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(Forbidden.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class Gone extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(Gone.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class ImATeapot extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(ImATeapot.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class LengthRequired extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(LengthRequired.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class MethodNotAllowed extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(MethodNotAllowed.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class MisdirectedRequest extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(MisdirectedRequest.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class NotAcceptable extends Exception {
3
3
  constructor(message, origin = "You must accept content-type " + message) {
4
4
  super(NotAcceptable.STATUS, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class NotFound extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(NotFound.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class PaymentRequired extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(PaymentRequired.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class PreconditionFailed extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(PreconditionFailed.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class PreconditionRequired extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(PreconditionRequired.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class ProxyAuthentificationRequired extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(ProxyAuthentificationRequired.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class RequestEntityTooLarge extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(RequestEntityTooLarge.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class RequestHeaderFieldsTooLarge extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(RequestHeaderFieldsTooLarge.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class RequestRangeUnsatisfiable extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(RequestRangeUnsatisfiable.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class RequestTimeout extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(RequestTimeout.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class RequestURITooLong extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(RequestURITooLong.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class TooManyRequests extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(TooManyRequests.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class Unauthorized extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(Unauthorized.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class UnavailableForLegalReasons extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(UnavailableForLegalReasons.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class UnprocessableEntity extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(UnprocessableEntity.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class UnsupportedMediaType extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(UnsupportedMediaType.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class UpgradeRequired extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(UpgradeRequired.STATUS, message, origin);
@@ -1,4 +1,8 @@
1
- import { getStatusConstant } from "@tsed/schema";
1
+ import { constantCase } from "change-case";
2
+ import statuses from "statuses";
3
+ function getStatusConstant(status) {
4
+ return status === 200 ? "SUCCESS" : constantCase(String(statuses(status)));
5
+ }
2
6
  export class Exception extends Error {
3
7
  constructor(status = 500, message = "", origin) {
4
8
  super(message);
@@ -1 +1 @@
1
- {"version":3,"file":"Exception.js","sourceRoot":"","sources":["../../../src/core/Exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,cAAc,CAAC;AAE/C,MAAM,OAAO,SAAU,SAAQ,KAAK;IAmClC,YAAY,SAAiB,GAAG,EAAE,UAAkB,EAAE,EAAE,MAA6B;QACnF,KAAK,CAAC,OAAO,CAAC,CAAC;QAnCjB;;;WAGG;QACI,SAAI,GAAW,gBAAgB,CAAC;QAKvC;;;WAGG;QACI,SAAI,GAAW,gBAAgB,CAAC;QAcvC;;WAEG;QACI,YAAO,GAAyB,EAAE,CAAC;QAOxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;QAEtC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACzB,CAAC;IAED,UAAU,CAAC,OAA6B;QACtC,IAAI,CAAC,OAAO,GAAG;YACb,GAAG,IAAI,CAAC,OAAO;YACf,GAAG,OAAO;SACX,CAAC;QAEF,OAAO,IAAI,CAAC;IACd,CAAC;IAED,SAAS,CAAC,GAAW,EAAE,KAAU;QAC/B,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QAE1B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,SAAS,CAAC,MAA4B;QACpC,IAAI,MAAM,EAAE;YACV,IAAI,MAAM,YAAY,KAAK,EAAE;gBAC3B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;gBACrB,IAAI,CAAC,OAAO,GAAG,GAAG,IAAI,CAAC,OAAO,qBAAqB,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC;aACjF;iBAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;gBACrC,IAAI,CAAC,MAAM,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC;gBAChC,IAAI,CAAC,OAAO,GAAG,GAAG,IAAI,CAAC,OAAO,qBAAqB,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC;aACjF;iBAAM;gBACL,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC;aACpB;SACF;IACH,CAAC;IAED,QAAQ;QACN,OAAO,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,MAAM,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,EAAE,CAAC;IACjE,CAAC;CACF;AAED,MAAM,OAAO,aAAc,SAAQ,SAAS;CAAG","sourcesContent":["import {getStatusConstant} from \"@tsed/schema\";\n\nexport class Exception extends Error {\n /**\n * Exception base name\n * @type {string}\n */\n public name: string = \"HTTP_EXCEPTION\";\n /**\n * Message of the exception\n */\n public message: string;\n /**\n * Exception type\n * @type {string}\n */\n public type: string = \"HTTP_EXCEPTION\";\n /**\n * Stack calling\n */\n public stack: string;\n public origin: Error & any;\n /**\n * HTTP Code Status\n */\n public status: number;\n /**\n *\n */\n public body: any;\n /**\n * Headers must be sent to the response\n */\n public headers: {[key: string]: any} = {};\n\n [key: string]: any;\n\n constructor(status: number = 500, message: string = \"\", origin?: Error | string | any) {\n super(message);\n\n this.status = status;\n this.message = message;\n this.name = getStatusConstant(status);\n\n this.setOrigin(origin);\n }\n\n setHeaders(headers: {[key: string]: any}) {\n this.headers = {\n ...this.headers,\n ...headers\n };\n\n return this;\n }\n\n setHeader(key: string, value: any) {\n this.headers[key] = value;\n\n return this;\n }\n\n setOrigin(origin: Error | string | any) {\n if (origin) {\n if (origin instanceof Error) {\n this.origin = origin;\n this.message = `${this.message}, innerException: ${this.origin.message}`.trim();\n } else if (typeof origin === \"string\") {\n this.origin = new Error(origin);\n this.message = `${this.message}, innerException: ${this.origin.message}`.trim();\n } else {\n this.body = origin;\n }\n }\n }\n\n toString() {\n return `${this.name}(${this.status}): ${this.message} `.trim();\n }\n}\n\nexport class HTTPException extends Exception {}\n"]}
1
+ {"version":3,"file":"Exception.js","sourceRoot":"","sources":["../../../src/core/Exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AACzC,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,SAAS,iBAAiB,CAAC,MAAc;IACvC,OAAO,MAAM,KAAK,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAC7E,CAAC;AAED,MAAM,OAAO,SAAU,SAAQ,KAAK;IAmClC,YAAY,SAAiB,GAAG,EAAE,UAAkB,EAAE,EAAE,MAA6B;QACnF,KAAK,CAAC,OAAO,CAAC,CAAC;QAnCjB;;;WAGG;QACI,SAAI,GAAW,gBAAgB,CAAC;QAKvC;;;WAGG;QACI,SAAI,GAAW,gBAAgB,CAAC;QAcvC;;WAEG;QACI,YAAO,GAAyB,EAAE,CAAC;QAOxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;QAEtC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACzB,CAAC;IAED,UAAU,CAAC,OAA6B;QACtC,IAAI,CAAC,OAAO,GAAG;YACb,GAAG,IAAI,CAAC,OAAO;YACf,GAAG,OAAO;SACX,CAAC;QAEF,OAAO,IAAI,CAAC;IACd,CAAC;IAED,SAAS,CAAC,GAAW,EAAE,KAAU;QAC/B,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QAE1B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,SAAS,CAAC,MAA4B;QACpC,IAAI,MAAM,EAAE;YACV,IAAI,MAAM,YAAY,KAAK,EAAE;gBAC3B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;gBACrB,IAAI,CAAC,OAAO,GAAG,GAAG,IAAI,CAAC,OAAO,qBAAqB,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC;aACjF;iBAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;gBACrC,IAAI,CAAC,MAAM,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC;gBAChC,IAAI,CAAC,OAAO,GAAG,GAAG,IAAI,CAAC,OAAO,qBAAqB,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC;aACjF;iBAAM;gBACL,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC;aACpB;SACF;IACH,CAAC;IAED,QAAQ;QACN,OAAO,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,MAAM,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,EAAE,CAAC;IACjE,CAAC;CACF;AAED,MAAM,OAAO,aAAc,SAAQ,SAAS;CAAG","sourcesContent":["import {constantCase} from \"change-case\";\nimport statuses from \"statuses\";\n\nfunction getStatusConstant(status: number) {\n return status === 200 ? \"SUCCESS\" : constantCase(String(statuses(status)));\n}\n\nexport class Exception extends Error {\n /**\n * Exception base name\n * @type {string}\n */\n public name: string = \"HTTP_EXCEPTION\";\n /**\n * Message of the exception\n */\n public message: string;\n /**\n * Exception type\n * @type {string}\n */\n public type: string = \"HTTP_EXCEPTION\";\n /**\n * Stack calling\n */\n public stack: string;\n public origin: Error & any;\n /**\n * HTTP Code Status\n */\n public status: number;\n /**\n *\n */\n public body: any;\n /**\n * Headers must be sent to the response\n */\n public headers: {[key: string]: any} = {};\n\n [key: string]: any;\n\n constructor(status: number = 500, message: string = \"\", origin?: Error | string | any) {\n super(message);\n\n this.status = status;\n this.message = message;\n this.name = getStatusConstant(status);\n\n this.setOrigin(origin);\n }\n\n setHeaders(headers: {[key: string]: any}) {\n this.headers = {\n ...this.headers,\n ...headers\n };\n\n return this;\n }\n\n setHeader(key: string, value: any) {\n this.headers[key] = value;\n\n return this;\n }\n\n setOrigin(origin: Error | string | any) {\n if (origin) {\n if (origin instanceof Error) {\n this.origin = origin;\n this.message = `${this.message}, innerException: ${this.origin.message}`.trim();\n } else if (typeof origin === \"string\") {\n this.origin = new Error(origin);\n this.message = `${this.message}, innerException: ${this.origin.message}`.trim();\n } else {\n this.body = origin;\n }\n }\n }\n\n toString() {\n return `${this.name}(${this.status}): ${this.message} `.trim();\n }\n}\n\nexport class HTTPException extends Exception {}\n"]}
package/lib/esm/index.js CHANGED
@@ -1,5 +1,50 @@
1
- export * from "./core";
2
- export * from "./clientErrors";
3
- export * from "./redirections";
4
- export * from "./serverErrors";
1
+ /**
2
+ * @file Automatically generated by barrelsby.
3
+ */
4
+ export * from "./clientErrors/BadMapping.js";
5
+ export * from "./clientErrors/BadRequest.js";
6
+ export * from "./clientErrors/Conflict.js";
7
+ export * from "./clientErrors/ExpectationFailed.js";
8
+ export * from "./clientErrors/Forbidden.js";
9
+ export * from "./clientErrors/Gone.js";
10
+ export * from "./clientErrors/ImATeapot.js";
11
+ export * from "./clientErrors/LengthRequired.js";
12
+ export * from "./clientErrors/MethodNotAllowed.js";
13
+ export * from "./clientErrors/MisdirectedRequest.js";
14
+ export * from "./clientErrors/NotAcceptable.js";
15
+ export * from "./clientErrors/NotFound.js";
16
+ export * from "./clientErrors/PaymentRequired.js";
17
+ export * from "./clientErrors/PreconditionFailed.js";
18
+ export * from "./clientErrors/PreconditionRequired.js";
19
+ export * from "./clientErrors/ProxyAuthentificationRequired.js";
20
+ export * from "./clientErrors/RequestEntityTooLarge.js";
21
+ export * from "./clientErrors/RequestHeaderFieldsTooLarge.js";
22
+ export * from "./clientErrors/RequestRangeUnsatisfiable.js";
23
+ export * from "./clientErrors/RequestTimeout.js";
24
+ export * from "./clientErrors/RequestURITooLong.js";
25
+ export * from "./clientErrors/TooManyRequests.js";
26
+ export * from "./clientErrors/Unauthorized.js";
27
+ export * from "./clientErrors/UnavailableForLegalReasons.js";
28
+ export * from "./clientErrors/UnprocessableEntity.js";
29
+ export * from "./clientErrors/UnsupportedMediaType.js";
30
+ export * from "./clientErrors/UpgradeRequired.js";
31
+ export * from "./core/Exception.js";
32
+ export * from "./redirections/MovedPermanently.js";
33
+ export * from "./redirections/MovedTemporarily.js";
34
+ export * from "./redirections/MultipleChoices.js";
35
+ export * from "./redirections/NotModified.js";
36
+ export * from "./redirections/PermanentRedirect.js";
37
+ export * from "./redirections/SeeOther.js";
38
+ export * from "./redirections/TemporaryRedirect.js";
39
+ export * from "./redirections/UseProxy.js";
40
+ export * from "./serverErrors/BadGateway.js";
41
+ export * from "./serverErrors/BandwidthLimitExceeded.js";
42
+ export * from "./serverErrors/GatewayTimeout.js";
43
+ export * from "./serverErrors/InternalServerError.js";
44
+ export * from "./serverErrors/NetworkAuthenticationRequired.js";
45
+ export * from "./serverErrors/NotExtended.js";
46
+ export * from "./serverErrors/NotImplemented.js";
47
+ export * from "./serverErrors/ProxyError.js";
48
+ export * from "./serverErrors/ServiceUnvailable.js";
49
+ export * from "./serverErrors/VariantAlsoNegotiates.js";
5
50
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC","sourcesContent":["export * from \"./core\";\nexport * from \"./clientErrors\";\nexport * from \"./redirections\";\nexport * from \"./serverErrors\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,kCAAkC,CAAC;AACjD,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,sCAAsC,CAAC;AACrD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,0CAA0C,CAAC;AACzD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,yBAAyB,CAAC;AACxC,cAAc,kCAAkC,CAAC;AACjD,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uCAAuC,CAAC;AACtD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oCAAoC,CAAC;AACnD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kCAAkC,CAAC;AACjD,cAAc,sCAAsC,CAAC","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./clientErrors/BadMapping\";\nexport * from \"./clientErrors/BadRequest\";\nexport * from \"./clientErrors/Conflict\";\nexport * from \"./clientErrors/ExpectationFailed\";\nexport * from \"./clientErrors/Forbidden\";\nexport * from \"./clientErrors/Gone\";\nexport * from \"./clientErrors/ImATeapot\";\nexport * from \"./clientErrors/LengthRequired\";\nexport * from \"./clientErrors/MethodNotAllowed\";\nexport * from \"./clientErrors/MisdirectedRequest\";\nexport * from \"./clientErrors/NotAcceptable\";\nexport * from \"./clientErrors/NotFound\";\nexport * from \"./clientErrors/PaymentRequired\";\nexport * from \"./clientErrors/PreconditionFailed\";\nexport * from \"./clientErrors/PreconditionRequired\";\nexport * from \"./clientErrors/ProxyAuthentificationRequired\";\nexport * from \"./clientErrors/RequestEntityTooLarge\";\nexport * from \"./clientErrors/RequestHeaderFieldsTooLarge\";\nexport * from \"./clientErrors/RequestRangeUnsatisfiable\";\nexport * from \"./clientErrors/RequestTimeout\";\nexport * from \"./clientErrors/RequestURITooLong\";\nexport * from \"./clientErrors/TooManyRequests\";\nexport * from \"./clientErrors/Unauthorized\";\nexport * from \"./clientErrors/UnavailableForLegalReasons\";\nexport * from \"./clientErrors/UnprocessableEntity\";\nexport * from \"./clientErrors/UnsupportedMediaType\";\nexport * from \"./clientErrors/UpgradeRequired\";\nexport * from \"./core/Exception\";\nexport * from \"./redirections/MovedPermanently\";\nexport * from \"./redirections/MovedTemporarily\";\nexport * from \"./redirections/MultipleChoices\";\nexport * from \"./redirections/NotModified\";\nexport * from \"./redirections/PermanentRedirect\";\nexport * from \"./redirections/SeeOther\";\nexport * from \"./redirections/TemporaryRedirect\";\nexport * from \"./redirections/UseProxy\";\nexport * from \"./serverErrors/BadGateway\";\nexport * from \"./serverErrors/BandwidthLimitExceeded\";\nexport * from \"./serverErrors/GatewayTimeout\";\nexport * from \"./serverErrors/InternalServerError\";\nexport * from \"./serverErrors/NetworkAuthenticationRequired\";\nexport * from \"./serverErrors/NotExtended\";\nexport * from \"./serverErrors/NotImplemented\";\nexport * from \"./serverErrors/ProxyError\";\nexport * from \"./serverErrors/ServiceUnvailable\";\nexport * from \"./serverErrors/VariantAlsoNegotiates\";\n"]}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class MovedPermanently extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(MovedPermanently.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class MovedTemporarily extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(MovedTemporarily.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class MultipleChoices extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(MultipleChoices.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class NotModified extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(NotModified.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class PermanentRedirect extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(PermanentRedirect.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class SeeOther extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(SeeOther.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class TemporaryRedirect extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(TemporaryRedirect.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class UseProxy extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(UseProxy.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class BadGateway extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(BadGateway.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class BandwidthLimitExceeded extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(BandwidthLimitExceeded.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class GatewayTimeout extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(GatewayTimeout.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class InternalServerError extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(InternalServerError.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class NetworkAuthenticationRequired extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(NetworkAuthenticationRequired.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class NotExtended extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(NotExtended.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class NotImplemented extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(NotImplemented.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class ProxyError extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(ProxyError.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class ServiceUnvailable extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(ServiceUnvailable.STATUS, message, origin);
@@ -1,4 +1,4 @@
1
- import { Exception } from "../core/Exception";
1
+ import { Exception } from "../core/Exception.js";
2
2
  export class VariantAlsoNegotiates extends Exception {
3
3
  constructor(message, origin) {
4
4
  super(VariantAlsoNegotiates.STATUS, message, origin);
@@ -1,4 +1,49 @@
1
- export * from "./core";
2
- export * from "./clientErrors";
3
- export * from "./redirections";
4
- export * from "./serverErrors";
1
+ /**
2
+ * @file Automatically generated by barrelsby.
3
+ */
4
+ export * from "./clientErrors/BadMapping";
5
+ export * from "./clientErrors/BadRequest";
6
+ export * from "./clientErrors/Conflict";
7
+ export * from "./clientErrors/ExpectationFailed";
8
+ export * from "./clientErrors/Forbidden";
9
+ export * from "./clientErrors/Gone";
10
+ export * from "./clientErrors/ImATeapot";
11
+ export * from "./clientErrors/LengthRequired";
12
+ export * from "./clientErrors/MethodNotAllowed";
13
+ export * from "./clientErrors/MisdirectedRequest";
14
+ export * from "./clientErrors/NotAcceptable";
15
+ export * from "./clientErrors/NotFound";
16
+ export * from "./clientErrors/PaymentRequired";
17
+ export * from "./clientErrors/PreconditionFailed";
18
+ export * from "./clientErrors/PreconditionRequired";
19
+ export * from "./clientErrors/ProxyAuthentificationRequired";
20
+ export * from "./clientErrors/RequestEntityTooLarge";
21
+ export * from "./clientErrors/RequestHeaderFieldsTooLarge";
22
+ export * from "./clientErrors/RequestRangeUnsatisfiable";
23
+ export * from "./clientErrors/RequestTimeout";
24
+ export * from "./clientErrors/RequestURITooLong";
25
+ export * from "./clientErrors/TooManyRequests";
26
+ export * from "./clientErrors/Unauthorized";
27
+ export * from "./clientErrors/UnavailableForLegalReasons";
28
+ export * from "./clientErrors/UnprocessableEntity";
29
+ export * from "./clientErrors/UnsupportedMediaType";
30
+ export * from "./clientErrors/UpgradeRequired";
31
+ export * from "./core/Exception";
32
+ export * from "./redirections/MovedPermanently";
33
+ export * from "./redirections/MovedTemporarily";
34
+ export * from "./redirections/MultipleChoices";
35
+ export * from "./redirections/NotModified";
36
+ export * from "./redirections/PermanentRedirect";
37
+ export * from "./redirections/SeeOther";
38
+ export * from "./redirections/TemporaryRedirect";
39
+ export * from "./redirections/UseProxy";
40
+ export * from "./serverErrors/BadGateway";
41
+ export * from "./serverErrors/BandwidthLimitExceeded";
42
+ export * from "./serverErrors/GatewayTimeout";
43
+ export * from "./serverErrors/InternalServerError";
44
+ export * from "./serverErrors/NetworkAuthenticationRequired";
45
+ export * from "./serverErrors/NotExtended";
46
+ export * from "./serverErrors/NotImplemented";
47
+ export * from "./serverErrors/ProxyError";
48
+ export * from "./serverErrors/ServiceUnvailable";
49
+ export * from "./serverErrors/VariantAlsoNegotiates";
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@tsed/exceptions",
3
- "version": "7.0.0-beta.1",
3
+ "version": "7.0.0-beta.10",
4
4
  "description": "HTTP exceptions module for Ts.ED Framework and other pure Express application",
5
5
  "private": false,
6
6
  "source": "./src/index.ts",
7
7
  "main": "./lib/cjs/index.js",
8
+ "module": "./lib/esm/index.js",
8
9
  "typings": "./lib/types/index.d.ts",
9
10
  "exports": {
10
11
  "types": "./lib/types/index.d.ts",
@@ -13,21 +14,25 @@
13
14
  "default": "./lib/esm/index.js"
14
15
  },
15
16
  "scripts": {
16
- "build": "yarn run build:esm && yarn run build:cjs",
17
+ "build": "yarn barrels && yarn run build:esm && yarn run build:cjs",
17
18
  "build:cjs": "tsc --build tsconfig.compile.json",
18
- "build:esm": "tsc --build tsconfig.compile.esm.json"
19
+ "build:esm": "tsc --build tsconfig.compile.esm.json",
20
+ "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\""
19
21
  },
20
22
  "dependencies": {
21
- "@tsed/schema": "7.0.0-beta.1",
22
- "tslib": "2.2.0"
23
+ "change-case": "4.1.2",
24
+ "statuses": ">=2.0.1",
25
+ "tslib": "2.3.1"
26
+ },
27
+ "devDependencies": {
28
+ "@types/statuses": "2.0.0"
23
29
  },
24
- "devDependencies": {},
25
30
  "peerDependencies": {},
26
31
  "repository": "https://github.com/tsedio/tsed",
27
32
  "bugs": {
28
33
  "url": "https://github.com/tsedio/tsed/issues"
29
34
  },
30
- "homepage": "https://github.com/tsedio/tsed/tree/alpha/packages/specs/exceptions",
35
+ "homepage": "https://github.com/tsedio/tsed/tree/beta/packages/specs/exceptions",
31
36
  "author": "Romain Lenzotti",
32
37
  "license": "MIT"
33
38
  }
package/readme.md CHANGED
@@ -33,18 +33,17 @@ npm install --save @tsed/exceptions
33
33
  Documentation is available on [https://tsed.io/docs/exceptions](https://tsed.io/docs/exceptions)
34
34
 
35
35
  ## Contributors
36
+
36
37
  Please read [contributing guidelines here](https://tsed.io/CONTRIBUTING.html).
37
38
 
38
39
  <a href="https://github.com/tsedio/ts-express-decorators/graphs/contributors"><img src="https://opencollective.com/tsed/contributors.svg?width=890" /></a>
39
40
 
40
-
41
41
  ## Backers
42
42
 
43
43
  Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/tsed#backer)]
44
44
 
45
45
  <a href="https://opencollective.com/tsed#backers" target="_blank"><img src="https://opencollective.com/tsed/tiers/backer.svg?width=890"></a>
46
46
 
47
-
48
47
  ## Sponsors
49
48
 
50
49
  Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/tsed#sponsor)]
@@ -8,16 +8,5 @@
8
8
  "declaration": true,
9
9
  "declarationDir": "./lib/types"
10
10
  },
11
- "exclude": [
12
- "node_modules",
13
- "test",
14
- "lib",
15
- "benchmark",
16
- "coverage",
17
- "spec",
18
- "**/*.benchmark.ts",
19
- "**/*.spec.ts",
20
- "keys",
21
- "jest.config.js"
22
- ]
11
+ "exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"]
23
12
  }
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- (0, tslib_1.__exportStar)(require("./BadMapping"), exports);
5
- (0, tslib_1.__exportStar)(require("./BadRequest"), exports);
6
- (0, tslib_1.__exportStar)(require("./Conflict"), exports);
7
- (0, tslib_1.__exportStar)(require("./ExpectationFailed"), exports);
8
- (0, tslib_1.__exportStar)(require("./Forbidden"), exports);
9
- (0, tslib_1.__exportStar)(require("./Gone"), exports);
10
- (0, tslib_1.__exportStar)(require("./ImATeapot"), exports);
11
- (0, tslib_1.__exportStar)(require("./LengthRequired"), exports);
12
- (0, tslib_1.__exportStar)(require("./MethodNotAllowed"), exports);
13
- (0, tslib_1.__exportStar)(require("./MisdirectedRequest"), exports);
14
- (0, tslib_1.__exportStar)(require("./NotAcceptable"), exports);
15
- (0, tslib_1.__exportStar)(require("./NotFound"), exports);
16
- (0, tslib_1.__exportStar)(require("./PaymentRequired"), exports);
17
- (0, tslib_1.__exportStar)(require("./PreconditionFailed"), exports);
18
- (0, tslib_1.__exportStar)(require("./PreconditionRequired"), exports);
19
- (0, tslib_1.__exportStar)(require("./ProxyAuthentificationRequired"), exports);
20
- (0, tslib_1.__exportStar)(require("./RequestRangeUnsatisfiable"), exports);
21
- (0, tslib_1.__exportStar)(require("./RequestEntityTooLarge"), exports);
22
- (0, tslib_1.__exportStar)(require("./RequestHeaderFieldsTooLarge"), exports);
23
- (0, tslib_1.__exportStar)(require("./RequestTimeout"), exports);
24
- (0, tslib_1.__exportStar)(require("./RequestURITooLong"), exports);
25
- (0, tslib_1.__exportStar)(require("./TooManyRequests"), exports);
26
- (0, tslib_1.__exportStar)(require("./Unauthorized"), exports);
27
- (0, tslib_1.__exportStar)(require("./UnsupportedMediaType"), exports);
28
- (0, tslib_1.__exportStar)(require("./UpgradeRequired"), exports);
29
- (0, tslib_1.__exportStar)(require("./UnavailableForLegalReasons"), exports);
30
- (0, tslib_1.__exportStar)(require("./UnprocessableEntity"), exports);
31
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/clientErrors/index.ts"],"names":[],"mappings":";;;AAAA,4DAA6B;AAC7B,4DAA6B;AAC7B,0DAA2B;AAC3B,mEAAoC;AACpC,2DAA4B;AAC5B,sDAAuB;AACvB,2DAA4B;AAC5B,gEAAiC;AACjC,kEAAmC;AACnC,oEAAqC;AACrC,+DAAgC;AAChC,0DAA2B;AAC3B,iEAAkC;AAClC,oEAAqC;AACrC,sEAAuC;AACvC,+EAAgD;AAChD,2EAA4C;AAC5C,uEAAwC;AACxC,6EAA8C;AAC9C,gEAAiC;AACjC,mEAAoC;AACpC,iEAAkC;AAClC,8DAA+B;AAC/B,sEAAuC;AACvC,iEAAkC;AAClC,4EAA6C;AAC7C,qEAAsC","sourcesContent":["export * from \"./BadMapping\";\nexport * from \"./BadRequest\";\nexport * from \"./Conflict\";\nexport * from \"./ExpectationFailed\";\nexport * from \"./Forbidden\";\nexport * from \"./Gone\";\nexport * from \"./ImATeapot\";\nexport * from \"./LengthRequired\";\nexport * from \"./MethodNotAllowed\";\nexport * from \"./MisdirectedRequest\";\nexport * from \"./NotAcceptable\";\nexport * from \"./NotFound\";\nexport * from \"./PaymentRequired\";\nexport * from \"./PreconditionFailed\";\nexport * from \"./PreconditionRequired\";\nexport * from \"./ProxyAuthentificationRequired\";\nexport * from \"./RequestRangeUnsatisfiable\";\nexport * from \"./RequestEntityTooLarge\";\nexport * from \"./RequestHeaderFieldsTooLarge\";\nexport * from \"./RequestTimeout\";\nexport * from \"./RequestURITooLong\";\nexport * from \"./TooManyRequests\";\nexport * from \"./Unauthorized\";\nexport * from \"./UnsupportedMediaType\";\nexport * from \"./UpgradeRequired\";\nexport * from \"./UnavailableForLegalReasons\";\nexport * from \"./UnprocessableEntity\";\n"]}
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- (0, tslib_1.__exportStar)(require("./Exception"), exports);
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/index.ts"],"names":[],"mappings":";;;AAAA,2DAA4B","sourcesContent":["export * from \"./Exception\";\n"]}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TooManyRedirects = void 0;
4
- const Exception_1 = require("../core/Exception");
5
- class TooManyRedirects extends Exception_1.Exception {
6
- constructor(message, origin) {
7
- super(TooManyRedirects.STATUS, message, origin);
8
- }
9
- }
10
- exports.TooManyRedirects = TooManyRedirects;
11
- TooManyRedirects.STATUS = 310;
12
- //# sourceMappingURL=TooManyRedirects.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TooManyRedirects.js","sourceRoot":"","sources":["../../../src/redirections/TooManyRedirects.ts"],"names":[],"mappings":";;;AAAA,iDAA4C;AAE5C,MAAa,gBAAiB,SAAQ,qBAAS;IAG7C,YAAY,OAAe,EAAE,MAA6B;QACxD,KAAK,CAAC,gBAAgB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAClD,CAAC;;AALH,4CAMC;AALiB,uBAAM,GAAG,GAAG,CAAC","sourcesContent":["import {Exception} from \"../core/Exception\";\n\nexport class TooManyRedirects extends Exception {\n static readonly STATUS = 310;\n\n constructor(message: string, origin?: Error | string | any) {\n super(TooManyRedirects.STATUS, message, origin);\n }\n}\n"]}
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- (0, tslib_1.__exportStar)(require("./MovedPermanently"), exports);
5
- (0, tslib_1.__exportStar)(require("./MovedTemporarily"), exports);
6
- (0, tslib_1.__exportStar)(require("./MultipleChoices"), exports);
7
- (0, tslib_1.__exportStar)(require("./NotModified"), exports);
8
- (0, tslib_1.__exportStar)(require("./PermanentRedirect"), exports);
9
- (0, tslib_1.__exportStar)(require("./SeeOther"), exports);
10
- (0, tslib_1.__exportStar)(require("./TemporaryRedirect"), exports);
11
- (0, tslib_1.__exportStar)(require("./TooManyRedirects"), exports);
12
- (0, tslib_1.__exportStar)(require("./UseProxy"), exports);
13
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/redirections/index.ts"],"names":[],"mappings":";;;AAAA,kEAAmC;AACnC,kEAAmC;AACnC,iEAAkC;AAClC,6DAA8B;AAC9B,mEAAoC;AACpC,0DAA2B;AAC3B,mEAAoC;AACpC,kEAAmC;AACnC,0DAA2B","sourcesContent":["export * from \"./MovedPermanently\";\nexport * from \"./MovedTemporarily\";\nexport * from \"./MultipleChoices\";\nexport * from \"./NotModified\";\nexport * from \"./PermanentRedirect\";\nexport * from \"./SeeOther\";\nexport * from \"./TemporaryRedirect\";\nexport * from \"./TooManyRedirects\";\nexport * from \"./UseProxy\";\n"]}
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- (0, tslib_1.__exportStar)(require("./BadGateway"), exports);
5
- (0, tslib_1.__exportStar)(require("./GatewayTimeout"), exports);
6
- (0, tslib_1.__exportStar)(require("./InternalServerError"), exports);
7
- (0, tslib_1.__exportStar)(require("./NotImplemented"), exports);
8
- (0, tslib_1.__exportStar)(require("./ProxyError"), exports);
9
- (0, tslib_1.__exportStar)(require("./ServiceUnvailable"), exports);
10
- (0, tslib_1.__exportStar)(require("./NetworkAuthenticationRequired"), exports);
11
- (0, tslib_1.__exportStar)(require("./NotExtended"), exports);
12
- (0, tslib_1.__exportStar)(require("./VariantAlsoNegotiates"), exports);
13
- (0, tslib_1.__exportStar)(require("./BandwidthLimitExceeded"), exports);
14
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/serverErrors/index.ts"],"names":[],"mappings":";;;AAAA,4DAA6B;AAC7B,gEAAiC;AACjC,qEAAsC;AACtC,gEAAiC;AACjC,4DAA6B;AAC7B,mEAAoC;AACpC,+EAAgD;AAChD,6DAA8B;AAC9B,uEAAwC;AACxC,wEAAyC","sourcesContent":["export * from \"./BadGateway\";\nexport * from \"./GatewayTimeout\";\nexport * from \"./InternalServerError\";\nexport * from \"./NotImplemented\";\nexport * from \"./ProxyError\";\nexport * from \"./ServiceUnvailable\";\nexport * from \"./NetworkAuthenticationRequired\";\nexport * from \"./NotExtended\";\nexport * from \"./VariantAlsoNegotiates\";\nexport * from \"./BandwidthLimitExceeded\";\n"]}
@@ -1,28 +0,0 @@
1
- export * from "./BadMapping";
2
- export * from "./BadRequest";
3
- export * from "./Conflict";
4
- export * from "./ExpectationFailed";
5
- export * from "./Forbidden";
6
- export * from "./Gone";
7
- export * from "./ImATeapot";
8
- export * from "./LengthRequired";
9
- export * from "./MethodNotAllowed";
10
- export * from "./MisdirectedRequest";
11
- export * from "./NotAcceptable";
12
- export * from "./NotFound";
13
- export * from "./PaymentRequired";
14
- export * from "./PreconditionFailed";
15
- export * from "./PreconditionRequired";
16
- export * from "./ProxyAuthentificationRequired";
17
- export * from "./RequestRangeUnsatisfiable";
18
- export * from "./RequestEntityTooLarge";
19
- export * from "./RequestHeaderFieldsTooLarge";
20
- export * from "./RequestTimeout";
21
- export * from "./RequestURITooLong";
22
- export * from "./TooManyRequests";
23
- export * from "./Unauthorized";
24
- export * from "./UnsupportedMediaType";
25
- export * from "./UpgradeRequired";
26
- export * from "./UnavailableForLegalReasons";
27
- export * from "./UnprocessableEntity";
28
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/clientErrors/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC","sourcesContent":["export * from \"./BadMapping\";\nexport * from \"./BadRequest\";\nexport * from \"./Conflict\";\nexport * from \"./ExpectationFailed\";\nexport * from \"./Forbidden\";\nexport * from \"./Gone\";\nexport * from \"./ImATeapot\";\nexport * from \"./LengthRequired\";\nexport * from \"./MethodNotAllowed\";\nexport * from \"./MisdirectedRequest\";\nexport * from \"./NotAcceptable\";\nexport * from \"./NotFound\";\nexport * from \"./PaymentRequired\";\nexport * from \"./PreconditionFailed\";\nexport * from \"./PreconditionRequired\";\nexport * from \"./ProxyAuthentificationRequired\";\nexport * from \"./RequestRangeUnsatisfiable\";\nexport * from \"./RequestEntityTooLarge\";\nexport * from \"./RequestHeaderFieldsTooLarge\";\nexport * from \"./RequestTimeout\";\nexport * from \"./RequestURITooLong\";\nexport * from \"./TooManyRequests\";\nexport * from \"./Unauthorized\";\nexport * from \"./UnsupportedMediaType\";\nexport * from \"./UpgradeRequired\";\nexport * from \"./UnavailableForLegalReasons\";\nexport * from \"./UnprocessableEntity\";\n"]}
@@ -1,2 +0,0 @@
1
- export * from "./Exception";
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC","sourcesContent":["export * from \"./Exception\";\n"]}
@@ -1,8 +0,0 @@
1
- import { Exception } from "../core/Exception";
2
- export class TooManyRedirects extends Exception {
3
- constructor(message, origin) {
4
- super(TooManyRedirects.STATUS, message, origin);
5
- }
6
- }
7
- TooManyRedirects.STATUS = 310;
8
- //# sourceMappingURL=TooManyRedirects.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TooManyRedirects.js","sourceRoot":"","sources":["../../../src/redirections/TooManyRedirects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAE5C,MAAM,OAAO,gBAAiB,SAAQ,SAAS;IAG7C,YAAY,OAAe,EAAE,MAA6B;QACxD,KAAK,CAAC,gBAAgB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAClD,CAAC;;AAJe,uBAAM,GAAG,GAAG,CAAC","sourcesContent":["import {Exception} from \"../core/Exception\";\n\nexport class TooManyRedirects extends Exception {\n static readonly STATUS = 310;\n\n constructor(message: string, origin?: Error | string | any) {\n super(TooManyRedirects.STATUS, message, origin);\n }\n}\n"]}
@@ -1,10 +0,0 @@
1
- export * from "./MovedPermanently";
2
- export * from "./MovedTemporarily";
3
- export * from "./MultipleChoices";
4
- export * from "./NotModified";
5
- export * from "./PermanentRedirect";
6
- export * from "./SeeOther";
7
- export * from "./TemporaryRedirect";
8
- export * from "./TooManyRedirects";
9
- export * from "./UseProxy";
10
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/redirections/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC","sourcesContent":["export * from \"./MovedPermanently\";\nexport * from \"./MovedTemporarily\";\nexport * from \"./MultipleChoices\";\nexport * from \"./NotModified\";\nexport * from \"./PermanentRedirect\";\nexport * from \"./SeeOther\";\nexport * from \"./TemporaryRedirect\";\nexport * from \"./TooManyRedirects\";\nexport * from \"./UseProxy\";\n"]}
@@ -1,11 +0,0 @@
1
- export * from "./BadGateway";
2
- export * from "./GatewayTimeout";
3
- export * from "./InternalServerError";
4
- export * from "./NotImplemented";
5
- export * from "./ProxyError";
6
- export * from "./ServiceUnvailable";
7
- export * from "./NetworkAuthenticationRequired";
8
- export * from "./NotExtended";
9
- export * from "./VariantAlsoNegotiates";
10
- export * from "./BandwidthLimitExceeded";
11
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/serverErrors/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iCAAiC,CAAC;AAChD,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC","sourcesContent":["export * from \"./BadGateway\";\nexport * from \"./GatewayTimeout\";\nexport * from \"./InternalServerError\";\nexport * from \"./NotImplemented\";\nexport * from \"./ProxyError\";\nexport * from \"./ServiceUnvailable\";\nexport * from \"./NetworkAuthenticationRequired\";\nexport * from \"./NotExtended\";\nexport * from \"./VariantAlsoNegotiates\";\nexport * from \"./BandwidthLimitExceeded\";\n"]}
@@ -1,27 +0,0 @@
1
- export * from "./BadMapping";
2
- export * from "./BadRequest";
3
- export * from "./Conflict";
4
- export * from "./ExpectationFailed";
5
- export * from "./Forbidden";
6
- export * from "./Gone";
7
- export * from "./ImATeapot";
8
- export * from "./LengthRequired";
9
- export * from "./MethodNotAllowed";
10
- export * from "./MisdirectedRequest";
11
- export * from "./NotAcceptable";
12
- export * from "./NotFound";
13
- export * from "./PaymentRequired";
14
- export * from "./PreconditionFailed";
15
- export * from "./PreconditionRequired";
16
- export * from "./ProxyAuthentificationRequired";
17
- export * from "./RequestRangeUnsatisfiable";
18
- export * from "./RequestEntityTooLarge";
19
- export * from "./RequestHeaderFieldsTooLarge";
20
- export * from "./RequestTimeout";
21
- export * from "./RequestURITooLong";
22
- export * from "./TooManyRequests";
23
- export * from "./Unauthorized";
24
- export * from "./UnsupportedMediaType";
25
- export * from "./UpgradeRequired";
26
- export * from "./UnavailableForLegalReasons";
27
- export * from "./UnprocessableEntity";
@@ -1 +0,0 @@
1
- export * from "./Exception";
@@ -1,5 +0,0 @@
1
- import { Exception } from "../core/Exception";
2
- export declare class TooManyRedirects extends Exception {
3
- static readonly STATUS = 310;
4
- constructor(message: string, origin?: Error | string | any);
5
- }
@@ -1,9 +0,0 @@
1
- export * from "./MovedPermanently";
2
- export * from "./MovedTemporarily";
3
- export * from "./MultipleChoices";
4
- export * from "./NotModified";
5
- export * from "./PermanentRedirect";
6
- export * from "./SeeOther";
7
- export * from "./TemporaryRedirect";
8
- export * from "./TooManyRedirects";
9
- export * from "./UseProxy";
@@ -1,10 +0,0 @@
1
- export * from "./BadGateway";
2
- export * from "./GatewayTimeout";
3
- export * from "./InternalServerError";
4
- export * from "./NotImplemented";
5
- export * from "./ProxyError";
6
- export * from "./ServiceUnvailable";
7
- export * from "./NetworkAuthenticationRequired";
8
- export * from "./NotExtended";
9
- export * from "./VariantAlsoNegotiates";
10
- export * from "./BandwidthLimitExceeded";