@tsed/exceptions 6.102.4 → 6.102.8-rc.1
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/lib/cjs/core/Exception.js +7 -2
- package/lib/cjs/core/Exception.js.map +1 -1
- package/lib/cjs/package.json +3 -0
- package/lib/cjs/redirections/index.js +0 -1
- package/lib/cjs/redirections/index.js.map +1 -1
- package/lib/esm/clientErrors/BadMapping.js +1 -1
- package/lib/esm/clientErrors/BadRequest.js +1 -1
- package/lib/esm/clientErrors/Conflict.js +1 -1
- package/lib/esm/clientErrors/ExpectationFailed.js +1 -1
- package/lib/esm/clientErrors/Forbidden.js +1 -1
- package/lib/esm/clientErrors/Gone.js +1 -1
- package/lib/esm/clientErrors/ImATeapot.js +1 -1
- package/lib/esm/clientErrors/LengthRequired.js +1 -1
- package/lib/esm/clientErrors/MethodNotAllowed.js +1 -1
- package/lib/esm/clientErrors/MisdirectedRequest.js +1 -1
- package/lib/esm/clientErrors/NotAcceptable.js +1 -1
- package/lib/esm/clientErrors/NotFound.js +1 -1
- package/lib/esm/clientErrors/PaymentRequired.js +1 -1
- package/lib/esm/clientErrors/PreconditionFailed.js +1 -1
- package/lib/esm/clientErrors/PreconditionRequired.js +1 -1
- package/lib/esm/clientErrors/ProxyAuthentificationRequired.js +1 -1
- package/lib/esm/clientErrors/RequestEntityTooLarge.js +1 -1
- package/lib/esm/clientErrors/RequestHeaderFieldsTooLarge.js +1 -1
- package/lib/esm/clientErrors/RequestRangeUnsatisfiable.js +1 -1
- package/lib/esm/clientErrors/RequestTimeout.js +1 -1
- package/lib/esm/clientErrors/RequestURITooLong.js +1 -1
- package/lib/esm/clientErrors/TooManyRequests.js +1 -1
- package/lib/esm/clientErrors/Unauthorized.js +1 -1
- package/lib/esm/clientErrors/UnavailableForLegalReasons.js +1 -1
- package/lib/esm/clientErrors/UnprocessableEntity.js +1 -1
- package/lib/esm/clientErrors/UnsupportedMediaType.js +1 -1
- package/lib/esm/clientErrors/UpgradeRequired.js +1 -1
- package/lib/esm/clientErrors/index.js +27 -27
- package/lib/esm/core/Exception.js +5 -1
- package/lib/esm/core/Exception.js.map +1 -1
- package/lib/esm/core/index.js +1 -1
- package/lib/esm/index.js +4 -4
- package/lib/esm/package.json +3 -0
- package/lib/esm/redirections/MovedPermanently.js +1 -1
- package/lib/esm/redirections/MovedTemporarily.js +1 -1
- package/lib/esm/redirections/MultipleChoices.js +1 -1
- package/lib/esm/redirections/NotModified.js +1 -1
- package/lib/esm/redirections/PermanentRedirect.js +1 -1
- package/lib/esm/redirections/SeeOther.js +1 -1
- package/lib/esm/redirections/TemporaryRedirect.js +1 -1
- package/lib/esm/redirections/UseProxy.js +1 -1
- package/lib/esm/redirections/index.js +8 -9
- package/lib/esm/redirections/index.js.map +1 -1
- package/lib/esm/serverErrors/BadGateway.js +1 -1
- package/lib/esm/serverErrors/BandwidthLimitExceeded.js +1 -1
- package/lib/esm/serverErrors/GatewayTimeout.js +1 -1
- package/lib/esm/serverErrors/InternalServerError.js +1 -1
- package/lib/esm/serverErrors/NetworkAuthenticationRequired.js +1 -1
- package/lib/esm/serverErrors/NotExtended.js +1 -1
- package/lib/esm/serverErrors/NotImplemented.js +1 -1
- package/lib/esm/serverErrors/ProxyError.js +1 -1
- package/lib/esm/serverErrors/ServiceUnvailable.js +1 -1
- package/lib/esm/serverErrors/VariantAlsoNegotiates.js +1 -1
- package/lib/esm/serverErrors/index.js +10 -10
- package/lib/types/redirections/index.d.ts +0 -1
- package/package.json +8 -4
- package/lib/cjs/redirections/TooManyRedirects.js +0 -12
- package/lib/cjs/redirections/TooManyRedirects.js.map +0 -1
- package/lib/esm/redirections/TooManyRedirects.js +0 -8
- package/lib/esm/redirections/TooManyRedirects.js.map +0 -1
- package/lib/types/redirections/TooManyRedirects.d.ts +0 -5
|
@@ -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
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const change_case_1 = require("change-case");
|
|
6
|
+
const statuses_1 = (0, 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 =
|
|
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":"
|
|
1
|
+
{"version":3,"file":"Exception.js","sourceRoot":"","sources":["../../../src/core/Exception.ts"],"names":[],"mappings":";;;;AAAA,6CAAyC;AACzC,qEAAgC;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"]}
|
|
@@ -8,6 +8,5 @@ const tslib_1 = require("tslib");
|
|
|
8
8
|
(0, tslib_1.__exportStar)(require("./PermanentRedirect"), exports);
|
|
9
9
|
(0, tslib_1.__exportStar)(require("./SeeOther"), exports);
|
|
10
10
|
(0, tslib_1.__exportStar)(require("./TemporaryRedirect"), exports);
|
|
11
|
-
(0, tslib_1.__exportStar)(require("./TooManyRedirects"), exports);
|
|
12
11
|
(0, tslib_1.__exportStar)(require("./UseProxy"), exports);
|
|
13
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,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 \"./UseProxy\";\n"]}
|
|
@@ -1,28 +1,28 @@
|
|
|
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
|
+
export * from "./BadMapping.js";
|
|
2
|
+
export * from "./BadRequest.js";
|
|
3
|
+
export * from "./Conflict.js";
|
|
4
|
+
export * from "./ExpectationFailed.js";
|
|
5
|
+
export * from "./Forbidden.js";
|
|
6
|
+
export * from "./Gone.js";
|
|
7
|
+
export * from "./ImATeapot.js";
|
|
8
|
+
export * from "./LengthRequired.js";
|
|
9
|
+
export * from "./MethodNotAllowed.js";
|
|
10
|
+
export * from "./MisdirectedRequest.js";
|
|
11
|
+
export * from "./NotAcceptable.js";
|
|
12
|
+
export * from "./NotFound.js";
|
|
13
|
+
export * from "./PaymentRequired.js";
|
|
14
|
+
export * from "./PreconditionFailed.js";
|
|
15
|
+
export * from "./PreconditionRequired.js";
|
|
16
|
+
export * from "./ProxyAuthentificationRequired.js";
|
|
17
|
+
export * from "./RequestRangeUnsatisfiable.js";
|
|
18
|
+
export * from "./RequestEntityTooLarge.js";
|
|
19
|
+
export * from "./RequestHeaderFieldsTooLarge.js";
|
|
20
|
+
export * from "./RequestTimeout.js";
|
|
21
|
+
export * from "./RequestURITooLong.js";
|
|
22
|
+
export * from "./TooManyRequests.js";
|
|
23
|
+
export * from "./Unauthorized.js";
|
|
24
|
+
export * from "./UnsupportedMediaType.js";
|
|
25
|
+
export * from "./UpgradeRequired.js";
|
|
26
|
+
export * from "./UnavailableForLegalReasons.js";
|
|
27
|
+
export * from "./UnprocessableEntity.js";
|
|
28
28
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
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,
|
|
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/core/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./Exception";
|
|
1
|
+
export * from "./Exception.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/lib/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from "./core";
|
|
2
|
-
export * from "./clientErrors";
|
|
3
|
-
export * from "./redirections";
|
|
4
|
-
export * from "./serverErrors";
|
|
1
|
+
export * from "./core.js";
|
|
2
|
+
export * from "./clientErrors.js";
|
|
3
|
+
export * from "./redirections.js";
|
|
4
|
+
export * from "./serverErrors.js";
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,10 +1,9 @@
|
|
|
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 "./
|
|
9
|
-
export * from "./UseProxy";
|
|
1
|
+
export * from "./MovedPermanently.js";
|
|
2
|
+
export * from "./MovedTemporarily.js";
|
|
3
|
+
export * from "./MultipleChoices.js";
|
|
4
|
+
export * from "./NotModified.js";
|
|
5
|
+
export * from "./PermanentRedirect.js";
|
|
6
|
+
export * from "./SeeOther.js";
|
|
7
|
+
export * from "./TemporaryRedirect.js";
|
|
8
|
+
export * from "./UseProxy.js";
|
|
10
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,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 \"./UseProxy\";\n"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
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";
|
|
1
|
+
export * from "./BadGateway.js";
|
|
2
|
+
export * from "./GatewayTimeout.js";
|
|
3
|
+
export * from "./InternalServerError.js";
|
|
4
|
+
export * from "./NotImplemented.js";
|
|
5
|
+
export * from "./ProxyError.js";
|
|
6
|
+
export * from "./ServiceUnvailable.js";
|
|
7
|
+
export * from "./NetworkAuthenticationRequired.js";
|
|
8
|
+
export * from "./NotExtended.js";
|
|
9
|
+
export * from "./VariantAlsoNegotiates.js";
|
|
10
|
+
export * from "./BandwidthLimitExceeded.js";
|
|
11
11
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/exceptions",
|
|
3
|
-
"version": "6.102.
|
|
3
|
+
"version": "6.102.8-rc.1",
|
|
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",
|
|
@@ -18,16 +19,19 @@
|
|
|
18
19
|
"build:esm": "tsc --build tsconfig.compile.esm.json"
|
|
19
20
|
},
|
|
20
21
|
"dependencies": {
|
|
21
|
-
"
|
|
22
|
+
"change-case": "4.1.2",
|
|
23
|
+
"statuses": ">=2.0.1",
|
|
22
24
|
"tslib": "2.2.0"
|
|
23
25
|
},
|
|
24
|
-
"devDependencies": {
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@types/statuses": "2.0.0"
|
|
28
|
+
},
|
|
25
29
|
"peerDependencies": {},
|
|
26
30
|
"repository": "https://github.com/tsedio/tsed",
|
|
27
31
|
"bugs": {
|
|
28
32
|
"url": "https://github.com/tsedio/tsed/issues"
|
|
29
33
|
},
|
|
30
|
-
"homepage": "https://github.com/tsedio/tsed/tree/
|
|
34
|
+
"homepage": "https://github.com/tsedio/tsed/tree/rc/packages/specs/exceptions",
|
|
31
35
|
"author": "Romain Lenzotti",
|
|
32
36
|
"license": "MIT"
|
|
33
37
|
}
|
|
@@ -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,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"]}
|