@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 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
- // decorators
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
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,aAAa;AACb,8EAA+C;AAC/C,4EAA6C;AAC7C,wEAAyC;AACzC,gFAAiD;AAEjD,aAAa;AACb,kEAAmC;AAEnC,SAAS;AACT,kFAAmD;AACnD,wEAAyC;AACzC,mFAAoD;AAEpD,cAAc;AACd,6EAA8C;AAE9C,SAAS;AACT,yEAA0C","sourcesContent":["// components\nexport * from \"./components/StringErrorFilter\";\nexport * from \"./components/ExceptionFilter\";\nexport * from \"./components/ErrorFilter\";\nexport * from \"./components/MongooseErrorFilter\";\n\n// decorators\nexport * from \"./decorators/catch\";\n\n// domain\nexport * from \"./domain/ExceptionFiltersContainer\";\nexport * from \"./domain/ExceptionSchema\";\nexport * from \"./interfaces/ExceptionFilterMethods\";\n\n// middlewares\nexport * from \"./services/PlatformExceptions\";\n\n// errors\nexport * from \"./errors/ResourceNotFound\";\n"]}
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"]}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -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
- // components
2
- export * from "./components/StringErrorFilter";
3
- export * from "./components/ExceptionFilter";
4
- export * from "./components/ErrorFilter";
5
- export * from "./components/MongooseErrorFilter";
6
- // decorators
7
- export * from "./decorators/catch";
8
- // domain
9
- export * from "./domain/ExceptionFiltersContainer";
10
- export * from "./domain/ExceptionSchema";
11
- export * from "./interfaces/ExceptionFilterMethods";
12
- // middlewares
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
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,kCAAkC,CAAC;AAEjD,aAAa;AACb,cAAc,oBAAoB,CAAC;AAEnC,SAAS;AACT,cAAc,oCAAoC,CAAC;AACnD,cAAc,0BAA0B,CAAC;AACzC,cAAc,qCAAqC,CAAC;AAEpD,cAAc;AACd,cAAc,+BAA+B,CAAC;AAE9C,SAAS;AACT,cAAc,2BAA2B,CAAC","sourcesContent":["// components\nexport * from \"./components/StringErrorFilter\";\nexport * from \"./components/ExceptionFilter\";\nexport * from \"./components/ErrorFilter\";\nexport * from \"./components/MongooseErrorFilter\";\n\n// decorators\nexport * from \"./decorators/catch\";\n\n// domain\nexport * from \"./domain/ExceptionFiltersContainer\";\nexport * from \"./domain/ExceptionSchema\";\nexport * from \"./interfaces/ExceptionFilterMethods\";\n\n// middlewares\nexport * from \"./services/PlatformExceptions\";\n\n// errors\nexport * from \"./errors/ResourceNotFound\";\n"]}
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"]}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
@@ -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
  *
@@ -1,10 +1,13 @@
1
- export * from "./components/StringErrorFilter";
2
- export * from "./components/ExceptionFilter";
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.5",
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.5",
25
- "@tsed/di": "6.102.5",
26
- "@tsed/exceptions": "6.102.5",
27
- "@tsed/schema": "6.102.5"
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.5",
31
- "@tsed/di": "^6.102.5",
32
- "@tsed/exceptions": "^6.102.5",
33
- "@tsed/schema": "^6.102.5"
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/production/packages/platform/platform-exceptions",
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
  }