@tsed/platform-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.
@@ -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,16 @@
1
1
  // components
2
- export * from "./components/StringErrorFilter";
3
- export * from "./components/ExceptionFilter";
4
- export * from "./components/ErrorFilter";
5
- export * from "./components/MongooseErrorFilter";
2
+ export * from "./components/StringErrorFilter.js";
3
+ export * from "./components/ExceptionFilter.js";
4
+ export * from "./components/ErrorFilter.js";
5
+ export * from "./components/MongooseErrorFilter.js";
6
6
  // decorators
7
- export * from "./decorators/catch";
7
+ export * from "./decorators/catch.js";
8
8
  // domain
9
- export * from "./domain/ExceptionFiltersContainer";
10
- export * from "./domain/ExceptionSchema";
11
- export * from "./interfaces/ExceptionFilterMethods";
9
+ export * from "./domain/ExceptionFiltersContainer.js";
10
+ export * from "./domain/ExceptionSchema.js";
11
+ export * from "./interfaces/ExceptionFilterMethods.js";
12
12
  // middlewares
13
- export * from "./services/PlatformExceptions";
13
+ export * from "./services/PlatformExceptions.js";
14
14
  // errors
15
- export * from "./errors/ResourceNotFound";
15
+ export * from "./errors/ResourceNotFound.js";
16
16
  //# sourceMappingURL=index.js.map
@@ -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
  *
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@tsed/platform-exceptions",
3
- "version": "6.102.4",
3
+ "version": "6.102.8-rc.1",
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",
@@ -21,17 +22,22 @@
21
22
  "tslib": "2.2.0"
22
23
  },
23
24
  "devDependencies": {
24
- "@tsed/core": "6.102.4",
25
- "@tsed/di": "6.102.4",
26
- "@tsed/exceptions": "6.102.4",
27
- "@tsed/schema": "6.102.4"
25
+ "@tsed/core": "6.102.8-rc.1",
26
+ "@tsed/di": "6.102.8-rc.1",
27
+ "@tsed/exceptions": "6.102.8-rc.1",
28
+ "@tsed/schema": "6.102.8-rc.1"
29
+ },
30
+ "peerDependencies": {
31
+ "@tsed/core": "^6.102.8-rc.1",
32
+ "@tsed/di": "^6.102.8-rc.1",
33
+ "@tsed/exceptions": "^6.102.8-rc.1",
34
+ "@tsed/schema": "^6.102.8-rc.1"
28
35
  },
29
- "peerDependencies": {},
30
36
  "repository": "https://github.com/tsedio/tsed",
31
37
  "bugs": {
32
38
  "url": "https://github.com/tsedio/tsed/issues"
33
39
  },
34
- "homepage": "https://github.com/tsedio/tsed/tree/production/packages/platform/platform-exceptions",
40
+ "homepage": "https://github.com/tsedio/tsed/tree/rc/packages/platform/platform-exceptions",
35
41
  "author": "Romain Lenzotti",
36
42
  "license": "MIT"
37
43
  }