@tsed/platform-exceptions 6.102.5 → 6.102.8-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +6 -8
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/package.json +3 -0
- package/lib/esm/components/ErrorFilter.js +1 -1
- package/lib/esm/components/ExceptionFilter.js +2 -2
- package/lib/esm/components/MongooseErrorFilter.js +2 -2
- package/lib/esm/components/StringErrorFilter.js +1 -1
- package/lib/esm/decorators/catch.js +1 -1
- package/lib/esm/index.js +13 -15
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/package.json +3 -0
- package/lib/esm/services/PlatformExceptions.js +6 -6
- package/lib/types/index.d.ts +6 -3
- package/package.json +18 -13
package/lib/cjs/index.js
CHANGED
|
@@ -1,19 +1,17 @@
|
|
|
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
|
-
// components
|
|
5
|
-
(0, tslib_1.__exportStar)(require("./components/StringErrorFilter"), exports);
|
|
6
|
-
(0, tslib_1.__exportStar)(require("./components/ExceptionFilter"), exports);
|
|
7
7
|
(0, tslib_1.__exportStar)(require("./components/ErrorFilter"), exports);
|
|
8
|
+
(0, tslib_1.__exportStar)(require("./components/ExceptionFilter"), exports);
|
|
8
9
|
(0, tslib_1.__exportStar)(require("./components/MongooseErrorFilter"), exports);
|
|
9
|
-
|
|
10
|
+
(0, tslib_1.__exportStar)(require("./components/StringErrorFilter"), exports);
|
|
10
11
|
(0, tslib_1.__exportStar)(require("./decorators/catch"), exports);
|
|
11
|
-
// domain
|
|
12
12
|
(0, tslib_1.__exportStar)(require("./domain/ExceptionFiltersContainer"), exports);
|
|
13
13
|
(0, tslib_1.__exportStar)(require("./domain/ExceptionSchema"), exports);
|
|
14
|
+
(0, tslib_1.__exportStar)(require("./errors/ResourceNotFound"), exports);
|
|
14
15
|
(0, tslib_1.__exportStar)(require("./interfaces/ExceptionFilterMethods"), exports);
|
|
15
|
-
// middlewares
|
|
16
16
|
(0, tslib_1.__exportStar)(require("./services/PlatformExceptions"), exports);
|
|
17
|
-
// errors
|
|
18
|
-
(0, tslib_1.__exportStar)(require("./errors/ResourceNotFound"), exports);
|
|
19
17
|
//# sourceMappingURL=index.js.map
|
package/lib/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,wEAAyC;AACzC,4EAA6C;AAC7C,gFAAiD;AACjD,8EAA+C;AAC/C,kEAAmC;AACnC,kFAAmD;AACnD,wEAAyC;AACzC,yEAA0C;AAC1C,mFAAoD;AACpD,6EAA8C","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./components/ErrorFilter\";\nexport * from \"./components/ExceptionFilter\";\nexport * from \"./components/MongooseErrorFilter\";\nexport * from \"./components/StringErrorFilter\";\nexport * from \"./decorators/catch\";\nexport * from \"./domain/ExceptionFiltersContainer\";\nexport * from \"./domain/ExceptionSchema\";\nexport * from \"./errors/ResourceNotFound\";\nexport * from \"./interfaces/ExceptionFilterMethods\";\nexport * from \"./services/PlatformExceptions\";\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { Env } from "@tsed/core";
|
|
3
|
-
import { Catch } from "../decorators/catch";
|
|
3
|
+
import { Catch } from "../decorators/catch.js";
|
|
4
4
|
let ErrorFilter = class ErrorFilter {
|
|
5
5
|
catch(error, ctx) {
|
|
6
6
|
const { response, logger, env } = ctx;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { Exception } from "@tsed/exceptions";
|
|
3
|
-
import { Catch } from "../decorators/catch";
|
|
4
|
-
import { ErrorFilter } from "./ErrorFilter";
|
|
3
|
+
import { Catch } from "../decorators/catch.js";
|
|
4
|
+
import { ErrorFilter } from "./ErrorFilter.js";
|
|
5
5
|
let ExceptionFilter = class ExceptionFilter extends ErrorFilter {
|
|
6
6
|
catch(error, ctx) {
|
|
7
7
|
const { response, logger, env } = ctx;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { BadRequest } from "@tsed/exceptions";
|
|
3
|
-
import { Catch } from "../decorators/catch";
|
|
4
|
-
import { ErrorFilter } from "./ErrorFilter";
|
|
3
|
+
import { Catch } from "../decorators/catch.js";
|
|
4
|
+
import { ErrorFilter } from "./ErrorFilter.js";
|
|
5
5
|
let MongooseErrorFilter = class MongooseErrorFilter extends ErrorFilter {
|
|
6
6
|
catch(error, ctx) {
|
|
7
7
|
return super.catch(new BadRequest(error.message, error), ctx);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { Catch } from "../decorators/catch";
|
|
2
|
+
import { Catch } from "../decorators/catch.js";
|
|
3
3
|
const toHTML = (message = "") => message.replace(/\n/gi, "<br />");
|
|
4
4
|
let StringErrorFilter = class StringErrorFilter {
|
|
5
5
|
catch(error, ctx) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { registerProvider } from "@tsed/di";
|
|
2
|
-
import { registerExceptionType } from "../domain/ExceptionFiltersContainer";
|
|
2
|
+
import { registerExceptionType } from "../domain/ExceptionFiltersContainer.js";
|
|
3
3
|
/**
|
|
4
4
|
* Register a new class to handle an specific exception.
|
|
5
5
|
* @decorator
|
package/lib/esm/index.js
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export * from "./components/ErrorFilter";
|
|
5
|
-
export * from "./components/
|
|
6
|
-
|
|
7
|
-
export * from "./
|
|
8
|
-
|
|
9
|
-
export * from "./domain/ExceptionFiltersContainer";
|
|
10
|
-
export * from "./domain/ExceptionSchema";
|
|
11
|
-
export * from "./
|
|
12
|
-
|
|
13
|
-
export * from "./services/PlatformExceptions";
|
|
14
|
-
// errors
|
|
15
|
-
export * from "./errors/ResourceNotFound";
|
|
1
|
+
/**
|
|
2
|
+
* @file Automatically generated by barrelsby.
|
|
3
|
+
*/
|
|
4
|
+
export * from "./components/ErrorFilter.js";
|
|
5
|
+
export * from "./components/ExceptionFilter.js";
|
|
6
|
+
export * from "./components/MongooseErrorFilter.js";
|
|
7
|
+
export * from "./components/StringErrorFilter.js";
|
|
8
|
+
export * from "./decorators/catch.js";
|
|
9
|
+
export * from "./domain/ExceptionFiltersContainer.js";
|
|
10
|
+
export * from "./domain/ExceptionSchema.js";
|
|
11
|
+
export * from "./errors/ResourceNotFound.js";
|
|
12
|
+
export * from "./interfaces/ExceptionFilterMethods.js";
|
|
13
|
+
export * from "./services/PlatformExceptions.js";
|
|
16
14
|
//# sourceMappingURL=index.js.map
|
package/lib/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,oCAAoC,CAAC;AACnD,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qCAAqC,CAAC;AACpD,cAAc,+BAA+B,CAAC","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./components/ErrorFilter\";\nexport * from \"./components/ExceptionFilter\";\nexport * from \"./components/MongooseErrorFilter\";\nexport * from \"./components/StringErrorFilter\";\nexport * from \"./decorators/catch\";\nexport * from \"./domain/ExceptionFiltersContainer\";\nexport * from \"./domain/ExceptionSchema\";\nexport * from \"./errors/ResourceNotFound\";\nexport * from \"./interfaces/ExceptionFilterMethods\";\nexport * from \"./services/PlatformExceptions\";\n"]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
2
|
import { ancestorsOf, classOf, nameOf } from "@tsed/core";
|
|
3
3
|
import { Inject, Injectable, InjectorService } from "@tsed/di";
|
|
4
|
-
import { ErrorFilter } from "../components/ErrorFilter";
|
|
5
|
-
import { ExceptionFilter } from "../components/ExceptionFilter";
|
|
6
|
-
import { MongooseErrorFilter } from "../components/MongooseErrorFilter";
|
|
7
|
-
import { StringErrorFilter } from "../components/StringErrorFilter";
|
|
8
|
-
import { ExceptionFiltersContainer } from "../domain/ExceptionFiltersContainer";
|
|
9
|
-
import { ResourceNotFound } from "../errors/ResourceNotFound";
|
|
4
|
+
import { ErrorFilter } from "../components/ErrorFilter.js";
|
|
5
|
+
import { ExceptionFilter } from "../components/ExceptionFilter.js";
|
|
6
|
+
import { MongooseErrorFilter } from "../components/MongooseErrorFilter.js";
|
|
7
|
+
import { StringErrorFilter } from "../components/StringErrorFilter.js";
|
|
8
|
+
import { ExceptionFiltersContainer } from "../domain/ExceptionFiltersContainer.js";
|
|
9
|
+
import { ResourceNotFound } from "../errors/ResourceNotFound.js";
|
|
10
10
|
/**
|
|
11
11
|
* Catch all errors and return the json error with the right status code when it's possible.
|
|
12
12
|
*
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @file Automatically generated by barrelsby.
|
|
3
|
+
*/
|
|
3
4
|
export * from "./components/ErrorFilter";
|
|
5
|
+
export * from "./components/ExceptionFilter";
|
|
4
6
|
export * from "./components/MongooseErrorFilter";
|
|
7
|
+
export * from "./components/StringErrorFilter";
|
|
5
8
|
export * from "./decorators/catch";
|
|
6
9
|
export * from "./domain/ExceptionFiltersContainer";
|
|
7
10
|
export * from "./domain/ExceptionSchema";
|
|
11
|
+
export * from "./errors/ResourceNotFound";
|
|
8
12
|
export * from "./interfaces/ExceptionFilterMethods";
|
|
9
13
|
export * from "./services/PlatformExceptions";
|
|
10
|
-
export * from "./errors/ResourceNotFound";
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/platform-exceptions",
|
|
3
|
-
"version": "6.102.
|
|
3
|
+
"version": "6.102.8-rc.2",
|
|
4
4
|
"description": "Platform exceptions module for Ts.ED Framework",
|
|
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,30 +14,34 @@
|
|
|
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
23
|
"tslib": "2.2.0"
|
|
22
24
|
},
|
|
23
25
|
"devDependencies": {
|
|
24
|
-
"@tsed/core": "6.102.
|
|
25
|
-
"@tsed/di": "6.102.
|
|
26
|
-
"@tsed/exceptions": "6.102.
|
|
27
|
-
"@tsed/schema": "6.102.
|
|
26
|
+
"@tsed/core": "6.102.8-rc.2",
|
|
27
|
+
"@tsed/di": "6.102.8-rc.2",
|
|
28
|
+
"@tsed/exceptions": "6.102.8-rc.2",
|
|
29
|
+
"@tsed/schema": "6.102.8-rc.2"
|
|
28
30
|
},
|
|
29
31
|
"peerDependencies": {
|
|
30
|
-
"@tsed/core": "^6.102.
|
|
31
|
-
"@tsed/di": "^6.102.
|
|
32
|
-
"@tsed/exceptions": "^6.102.
|
|
33
|
-
"@tsed/schema": "^6.102.
|
|
32
|
+
"@tsed/core": "^6.102.8-rc.2",
|
|
33
|
+
"@tsed/di": "^6.102.8-rc.2",
|
|
34
|
+
"@tsed/exceptions": "^6.102.8-rc.2",
|
|
35
|
+
"@tsed/schema": "^6.102.8-rc.2"
|
|
34
36
|
},
|
|
35
37
|
"repository": "https://github.com/tsedio/tsed",
|
|
36
38
|
"bugs": {
|
|
37
39
|
"url": "https://github.com/tsedio/tsed/issues"
|
|
38
40
|
},
|
|
39
|
-
"homepage": "https://github.com/tsedio/tsed/tree/
|
|
41
|
+
"homepage": "https://github.com/tsedio/tsed/tree/rc/packages/platform/platform-exceptions",
|
|
40
42
|
"author": "Romain Lenzotti",
|
|
41
|
-
"license": "MIT"
|
|
43
|
+
"license": "MIT",
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"tag": "rc"
|
|
46
|
+
}
|
|
42
47
|
}
|