@tsed/platform-exceptions 7.70.2 → 7.71.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.
Files changed (30) hide show
  1. package/lib/cjs/components/ErrorFilter.js +2 -2
  2. package/lib/cjs/components/ErrorFilter.js.map +1 -1
  3. package/lib/cjs/components/ExceptionFilter.js +4 -4
  4. package/lib/cjs/components/ExceptionFilter.js.map +1 -1
  5. package/lib/cjs/components/MongooseErrorFilter.js +4 -4
  6. package/lib/cjs/components/MongooseErrorFilter.js.map +1 -1
  7. package/lib/cjs/components/StringErrorFilter.js +2 -2
  8. package/lib/cjs/components/StringErrorFilter.js.map +1 -1
  9. package/lib/cjs/decorators/catch.js +2 -2
  10. package/lib/cjs/decorators/catch.js.map +1 -1
  11. package/lib/cjs/index.js +13 -13
  12. package/lib/cjs/index.js.map +1 -1
  13. package/lib/cjs/services/PlatformExceptions.js +9 -9
  14. package/lib/cjs/services/PlatformExceptions.js.map +1 -1
  15. package/lib/esm/components/ErrorFilter.js.map +1 -1
  16. package/lib/esm/components/ExceptionFilter.js.map +1 -1
  17. package/lib/esm/components/MongooseErrorFilter.js.map +1 -1
  18. package/lib/esm/components/StringErrorFilter.js.map +1 -1
  19. package/lib/esm/decorators/catch.js.map +1 -1
  20. package/lib/esm/index.js +1 -1
  21. package/lib/esm/index.js.map +1 -1
  22. package/lib/esm/services/PlatformExceptions.js.map +1 -1
  23. package/lib/types/components/ErrorFilter.d.ts +1 -1
  24. package/lib/types/components/ExceptionFilter.d.ts +1 -1
  25. package/lib/types/components/MongooseErrorFilter.d.ts +1 -1
  26. package/lib/types/components/StringErrorFilter.d.ts +1 -1
  27. package/lib/types/domain/ExceptionFiltersContainer.d.ts +1 -1
  28. package/lib/types/index.d.ts +11 -11
  29. package/lib/types/services/PlatformExceptions.d.ts +2 -2
  30. package/package.json +12 -12
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ErrorFilter = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const core_1 = require("@tsed/core");
6
- const catch_1 = require("../decorators/catch");
6
+ const catch_js_1 = require("../decorators/catch.js");
7
7
  let ErrorFilter = class ErrorFilter {
8
8
  catch(error, ctx) {
9
9
  const { response, logger, env } = ctx;
@@ -38,7 +38,7 @@ let ErrorFilter = class ErrorFilter {
38
38
  }
39
39
  };
40
40
  ErrorFilter = tslib_1.__decorate([
41
- (0, catch_1.Catch)(Error)
41
+ (0, catch_js_1.Catch)(Error)
42
42
  ], ErrorFilter);
43
43
  exports.ErrorFilter = ErrorFilter;
44
44
  //# sourceMappingURL=ErrorFilter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorFilter.js","sourceRoot":"","sources":["../../../src/components/ErrorFilter.ts"],"names":[],"mappings":";;;;AAAA,qCAA+B;AAE/B,+CAA0C;AAInC,IAAM,WAAW,GAAjB,MAAM,WAAW;IACtB,KAAK,CAAC,KAAU,EAAE,GAAgB;QAChC,MAAM,EAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAC,GAAG,GAAG,CAAC;QACpC,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAEtC,QAAQ;aACL,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;aAClC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC;aAClB,WAAW,CAAC,kBAAkB,CAAC;aAC/B,IAAI,CAAC,GAAG,KAAK,UAAG,CAAC,IAAI,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IAC1D,CAAC;IAED,QAAQ,CAAC,KAAU,EAAE,GAAS;QAC5B,OAAO;YACL,IAAI,EAAE,KAAK,CAAC,MAAM,EAAE,IAAI,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI;YACpD,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,MAAM,E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,EAAC,OAAO,EAAM,EAAE,EAAE;YAC1E,OAAO;gBACL,GAAG,GAAG;gBACN,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC;aACnB,CAAC;QACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IACT,CAAC;CACF,CAAA;AApCY,WAAW;IADvB,IAAA,gBAAK,EAAC,KAAK,CAAC;GACA,WAAW,CAoCvB;AApCY,kCAAW"}
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ExceptionFilter = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const exceptions_1 = require("@tsed/exceptions");
6
- const catch_1 = require("../decorators/catch");
7
- const ErrorFilter_1 = require("./ErrorFilter");
8
- let ExceptionFilter = class ExceptionFilter extends ErrorFilter_1.ErrorFilter {
6
+ const catch_js_1 = require("../decorators/catch.js");
7
+ const ErrorFilter_js_1 = require("./ErrorFilter.js");
8
+ let ExceptionFilter = class ExceptionFilter extends ErrorFilter_js_1.ErrorFilter {
9
9
  catch(error, ctx) {
10
10
  const { response, env } = ctx;
11
11
  const err = this.mapError(error, env);
@@ -13,7 +13,7 @@ let ExceptionFilter = class ExceptionFilter extends ErrorFilter_1.ErrorFilter {
13
13
  }
14
14
  };
15
15
  ExceptionFilter = tslib_1.__decorate([
16
- (0, catch_1.Catch)(exceptions_1.Exception)
16
+ (0, catch_js_1.Catch)(exceptions_1.Exception)
17
17
  ], ExceptionFilter);
18
18
  exports.ExceptionFilter = ExceptionFilter;
19
19
  //# sourceMappingURL=ExceptionFilter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExceptionFilter.js","sourceRoot":"","sources":["../../../src/components/ExceptionFilter.ts"],"names":[],"mappings":";;;;AACA,iDAA2C;AAC3C,+CAA0C;AAC1C,+CAA0C;AAGnC,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,yBAAW;IAC9C,KAAK,CAAC,KAAgB,EAAE,GAAgB;QACtC,MAAM,EAAC,QAAQ,EAAE,GAAG,EAAC,GAAG,GAAG,CAAC;QAC5B,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAEtC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC7G,CAAC;CACF,CAAA;AAPY,eAAe;IAD3B,IAAA,aAAK,EAAC,sBAAS,CAAC;GACJ,eAAe,CAO3B;AAPY,0CAAe"}
1
+ {"version":3,"file":"ExceptionFilter.js","sourceRoot":"","sources":["../../../src/components/ExceptionFilter.ts"],"names":[],"mappings":";;;;AACA,iDAA2C;AAC3C,qDAA6C;AAC7C,qDAA6C;AAGtC,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,4BAAW;IAC9C,KAAK,CAAC,KAAgB,EAAE,GAAgB;QACtC,MAAM,EAAC,QAAQ,EAAE,GAAG,EAAC,GAAG,GAAG,CAAC;QAC5B,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAEtC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC7G,CAAC;CACF,CAAA;AAPY,eAAe;IAD3B,IAAA,gBAAK,EAAC,sBAAS,CAAC;GACJ,eAAe,CAO3B;AAPY,0CAAe"}
@@ -3,15 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MongooseErrorFilter = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const exceptions_1 = require("@tsed/exceptions");
6
- const catch_1 = require("../decorators/catch");
7
- const ErrorFilter_1 = require("./ErrorFilter");
8
- let MongooseErrorFilter = class MongooseErrorFilter extends ErrorFilter_1.ErrorFilter {
6
+ const catch_js_1 = require("../decorators/catch.js");
7
+ const ErrorFilter_js_1 = require("./ErrorFilter.js");
8
+ let MongooseErrorFilter = class MongooseErrorFilter extends ErrorFilter_js_1.ErrorFilter {
9
9
  catch(error, ctx) {
10
10
  return super.catch(new exceptions_1.BadRequest(error.message, error), ctx);
11
11
  }
12
12
  };
13
13
  MongooseErrorFilter = tslib_1.__decorate([
14
- (0, catch_1.Catch)("MongooseError", "MongoError")
14
+ (0, catch_js_1.Catch)("MongooseError", "MongoError")
15
15
  ], MongooseErrorFilter);
16
16
  exports.MongooseErrorFilter = MongooseErrorFilter;
17
17
  //# sourceMappingURL=MongooseErrorFilter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MongooseErrorFilter.js","sourceRoot":"","sources":["../../../src/components/MongooseErrorFilter.ts"],"names":[],"mappings":";;;;AACA,iDAA4C;AAC5C,+CAA0C;AAC1C,+CAA0C;AAGnC,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,yBAAW;IAClD,KAAK,CAAC,KAAY,EAAE,GAAgB;QAClC,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,uBAAU,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC;IAChE,CAAC;CACF,CAAA;AAJY,mBAAmB;IAD/B,IAAA,aAAK,EAAC,eAAe,EAAE,YAAY,CAAC;GACxB,mBAAmB,CAI/B;AAJY,kDAAmB"}
1
+ {"version":3,"file":"MongooseErrorFilter.js","sourceRoot":"","sources":["../../../src/components/MongooseErrorFilter.ts"],"names":[],"mappings":";;;;AACA,iDAA4C;AAC5C,qDAA6C;AAC7C,qDAA6C;AAGtC,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,4BAAW;IAClD,KAAK,CAAC,KAAY,EAAE,GAAgB;QAClC,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,uBAAU,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC;IAChE,CAAC;CACF,CAAA;AAJY,mBAAmB;IAD/B,IAAA,gBAAK,EAAC,eAAe,EAAE,YAAY,CAAC;GACxB,mBAAmB,CAI/B;AAJY,kDAAmB"}
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StringErrorFilter = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const catch_1 = require("../decorators/catch");
5
+ const catch_js_1 = require("../decorators/catch.js");
6
6
  const toHTML = (message = "") => message.replace(/\n/gi, "<br />");
7
7
  let StringErrorFilter = class StringErrorFilter {
8
8
  catch(error, ctx) {
@@ -10,7 +10,7 @@ let StringErrorFilter = class StringErrorFilter {
10
10
  }
11
11
  };
12
12
  StringErrorFilter = tslib_1.__decorate([
13
- (0, catch_1.Catch)(String)
13
+ (0, catch_js_1.Catch)(String)
14
14
  ], StringErrorFilter);
15
15
  exports.StringErrorFilter = StringErrorFilter;
16
16
  //# sourceMappingURL=StringErrorFilter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StringErrorFilter.js","sourceRoot":"","sources":["../../../src/components/StringErrorFilter.ts"],"names":[],"mappings":";;;;AACA,+CAA0C;AAG1C,MAAM,MAAM,GAAG,CAAC,OAAO,GAAG,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAG5D,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAC5B,KAAK,CAAC,KAAa,EAAE,GAAgB;QACnC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAC/C,CAAC;CACF,CAAA;AAJY,iBAAiB;IAD7B,IAAA,aAAK,EAAC,MAAM,CAAC;GACD,iBAAiB,CAI7B;AAJY,8CAAiB"}
1
+ {"version":3,"file":"StringErrorFilter.js","sourceRoot":"","sources":["../../../src/components/StringErrorFilter.ts"],"names":[],"mappings":";;;;AACA,qDAA6C;AAG7C,MAAM,MAAM,GAAG,CAAC,OAAO,GAAG,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAG5D,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAC5B,KAAK,CAAC,KAAa,EAAE,GAAgB;QACnC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAC/C,CAAC;CACF,CAAA;AAJY,iBAAiB;IAD7B,IAAA,gBAAK,EAAC,MAAM,CAAC;GACD,iBAAiB,CAI7B;AAJY,8CAAiB"}
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Catch = void 0;
4
4
  const di_1 = require("@tsed/di");
5
- const ExceptionFiltersContainer_1 = require("../domain/ExceptionFiltersContainer");
5
+ const ExceptionFiltersContainer_js_1 = require("../domain/ExceptionFiltersContainer.js");
6
6
  /**
7
7
  * Register a new class to handle an specific exception.
8
8
  * @decorator
@@ -11,7 +11,7 @@ const ExceptionFiltersContainer_1 = require("../domain/ExceptionFiltersContainer
11
11
  function Catch(...types) {
12
12
  return (target) => {
13
13
  types.forEach((type) => {
14
- (0, ExceptionFiltersContainer_1.registerExceptionType)(type, target);
14
+ (0, ExceptionFiltersContainer_js_1.registerExceptionType)(type, target);
15
15
  });
16
16
  (0, di_1.registerProvider)({
17
17
  provide: target,
@@ -1 +1 @@
1
- {"version":3,"file":"catch.js","sourceRoot":"","sources":["../../../src/decorators/catch.ts"],"names":[],"mappings":";;;AACA,iCAA0C;AAC1C,mFAA0E;AAE1E;;;;GAIG;AACH,SAAgB,KAAK,CAAC,GAAG,KAAqC;IAC5D,OAAO,CAAC,MAAW,EAAE,EAAE;QACrB,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YACrB,IAAA,iDAAqB,EAAC,IAAI,EAAE,MAAa,CAAC,CAAC;QAC7C,CAAC,CAAC,CAAC;QACH,IAAA,qBAAgB,EAAC;YACf,OAAO,EAAE,MAAM;YACf,QAAQ,EAAE,MAAM;SACjB,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAVD,sBAUC"}
1
+ {"version":3,"file":"catch.js","sourceRoot":"","sources":["../../../src/decorators/catch.ts"],"names":[],"mappings":";;;AACA,iCAA0C;AAC1C,yFAA6E;AAE7E;;;;GAIG;AACH,SAAgB,KAAK,CAAC,GAAG,KAAqC;IAC5D,OAAO,CAAC,MAAW,EAAE,EAAE;QACrB,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YACrB,IAAA,oDAAqB,EAAC,IAAI,EAAE,MAAa,CAAC,CAAC;QAC7C,CAAC,CAAC,CAAC;QACH,IAAA,qBAAgB,EAAC;YACf,OAAO,EAAE,MAAM;YACf,QAAQ,EAAE,MAAM;SACjB,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAVD,sBAUC"}
package/lib/cjs/index.js CHANGED
@@ -1,17 +1,17 @@
1
1
  "use strict";
2
- /**
3
- * @file Automatically generated by barrelsby.
4
- */
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  const tslib_1 = require("tslib");
7
- tslib_1.__exportStar(require("./components/ErrorFilter"), exports);
8
- tslib_1.__exportStar(require("./components/ExceptionFilter"), exports);
9
- tslib_1.__exportStar(require("./components/MongooseErrorFilter"), exports);
10
- tslib_1.__exportStar(require("./components/StringErrorFilter"), exports);
11
- tslib_1.__exportStar(require("./decorators/catch"), exports);
12
- tslib_1.__exportStar(require("./domain/ExceptionFiltersContainer"), exports);
13
- tslib_1.__exportStar(require("./domain/ExceptionSchema"), exports);
14
- tslib_1.__exportStar(require("./errors/ResourceNotFound"), exports);
15
- tslib_1.__exportStar(require("./interfaces/ExceptionFilterMethods"), exports);
16
- tslib_1.__exportStar(require("./services/PlatformExceptions"), exports);
4
+ /**
5
+ * @file Automatically generated by @tsed/barrels.
6
+ */
7
+ tslib_1.__exportStar(require("./components/ErrorFilter.js"), exports);
8
+ tslib_1.__exportStar(require("./components/ExceptionFilter.js"), exports);
9
+ tslib_1.__exportStar(require("./components/MongooseErrorFilter.js"), exports);
10
+ tslib_1.__exportStar(require("./components/StringErrorFilter.js"), exports);
11
+ tslib_1.__exportStar(require("./decorators/catch.js"), exports);
12
+ tslib_1.__exportStar(require("./domain/ExceptionFiltersContainer.js"), exports);
13
+ tslib_1.__exportStar(require("./domain/ExceptionSchema.js"), exports);
14
+ tslib_1.__exportStar(require("./errors/ResourceNotFound.js"), exports);
15
+ tslib_1.__exportStar(require("./interfaces/ExceptionFilterMethods.js"), exports);
16
+ tslib_1.__exportStar(require("./services/PlatformExceptions.js"), exports);
17
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,mEAAyC;AACzC,uEAA6C;AAC7C,2EAAiD;AACjD,yEAA+C;AAC/C,6DAAmC;AACnC,6EAAmD;AACnD,mEAAyC;AACzC,oEAA0C;AAC1C,8EAAoD;AACpD,wEAA8C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,sEAA4C;AAC5C,0EAAgD;AAChD,8EAAoD;AACpD,4EAAkD;AAClD,gEAAsC;AACtC,gFAAsD;AACtD,sEAA4C;AAC5C,uEAA6C;AAC7C,iFAAuD;AACvD,2EAAiD"}
@@ -4,12 +4,12 @@ exports.PlatformExceptions = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const core_1 = require("@tsed/core");
6
6
  const di_1 = require("@tsed/di");
7
- const ErrorFilter_1 = require("../components/ErrorFilter");
8
- const ExceptionFilter_1 = require("../components/ExceptionFilter");
9
- const MongooseErrorFilter_1 = require("../components/MongooseErrorFilter");
10
- const StringErrorFilter_1 = require("../components/StringErrorFilter");
11
- const ExceptionFiltersContainer_1 = require("../domain/ExceptionFiltersContainer");
12
- const ResourceNotFound_1 = require("../errors/ResourceNotFound");
7
+ const ErrorFilter_js_1 = require("../components/ErrorFilter.js");
8
+ const ExceptionFilter_js_1 = require("../components/ExceptionFilter.js");
9
+ const MongooseErrorFilter_js_1 = require("../components/MongooseErrorFilter.js");
10
+ const StringErrorFilter_js_1 = require("../components/StringErrorFilter.js");
11
+ const ExceptionFiltersContainer_js_1 = require("../domain/ExceptionFiltersContainer.js");
12
+ const ResourceNotFound_js_1 = require("../errors/ResourceNotFound.js");
13
13
  /**
14
14
  * Catch all errors and return the json error with the right status code when it's possible.
15
15
  *
@@ -19,7 +19,7 @@ let PlatformExceptions = class PlatformExceptions {
19
19
  types = new Map();
20
20
  injector;
21
21
  $onInit() {
22
- ExceptionFiltersContainer_1.ExceptionFiltersContainer.forEach((token, type) => {
22
+ ExceptionFiltersContainer_js_1.ExceptionFiltersContainer.forEach((token, type) => {
23
23
  this.types.set(type, this.injector.get(token));
24
24
  });
25
25
  }
@@ -38,7 +38,7 @@ let PlatformExceptions = class PlatformExceptions {
38
38
  return this.types.get(Error).catch(error, ctx);
39
39
  }
40
40
  resourceNotFound(ctx) {
41
- return this.catch(new ResourceNotFound_1.ResourceNotFound(ctx.request.url), ctx);
41
+ return this.catch(new ResourceNotFound_js_1.ResourceNotFound(ctx.request.url), ctx);
42
42
  }
43
43
  };
44
44
  tslib_1.__decorate([
@@ -47,7 +47,7 @@ tslib_1.__decorate([
47
47
  ], PlatformExceptions.prototype, "injector", void 0);
48
48
  PlatformExceptions = tslib_1.__decorate([
49
49
  (0, di_1.Injectable)({
50
- imports: [ErrorFilter_1.ErrorFilter, ExceptionFilter_1.ExceptionFilter, MongooseErrorFilter_1.MongooseErrorFilter, StringErrorFilter_1.StringErrorFilter]
50
+ imports: [ErrorFilter_js_1.ErrorFilter, ExceptionFilter_js_1.ExceptionFilter, MongooseErrorFilter_js_1.MongooseErrorFilter, StringErrorFilter_js_1.StringErrorFilter]
51
51
  })
52
52
  ], PlatformExceptions);
53
53
  exports.PlatformExceptions = PlatformExceptions;
@@ -1 +1 @@
1
- {"version":3,"file":"PlatformExceptions.js","sourceRoot":"","sources":["../../../src/services/PlatformExceptions.ts"],"names":[],"mappings":";;;;AAAA,qCAAwD;AACxD,iCAAqF;AACrF,2DAAsD;AACtD,mEAA8D;AAC9D,2EAAsE;AACtE,uEAAkE;AAClE,mFAAkG;AAClG,iEAA4D;AAG5D;;;;GAIG;AAII,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC7B,KAAK,GAAoD,IAAI,GAAG,EAAE,CAAC;IAGnE,QAAQ,CAAkB;IAE1B,OAAO;QACL,qDAAyB,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;YAChD,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAE,CAAC,CAAC;QAClD,CAAC,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,KAAc,EAAE,GAAc;QAClC,MAAM,IAAI,GAAG,IAAA,aAAM,EAAC,IAAA,cAAO,EAAC,KAAK,CAAC,CAAC,CAAC;QAEpC,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YAChC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAE,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;SAChD;QAED,MAAM,MAAM,GAAG,IAAA,kBAAW,EAAC,KAAK,CAAC;aAC9B,OAAO,EAAE;aACT,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,C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C,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC7G,CAAC;CACF,CAAA;AAPY,eAAe;IAD3B,KAAK,CAAC,SAAS,CAAC;GACJ,eAAe,CAO3B;SAPY,eAAe"}
@@ -1 +1 @@
1
- {"version":3,"file":"MongooseErrorFilter.js","sourceRoot":"","sources":["../../../src/components/MongooseErrorFilter.ts"],"names":[],"mappings":";AACA,OAAO,EAAC,UAAU,EAAC,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAC,KAAK,EAAC,MAAM,qBAAqB,CAAC;AAC1C,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAGnC,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,WAAW;IAClD,KAAK,CAAC,KAAY,EAAE,GAAgB;QAClC,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC;IAChE,CAAC;CACF,CAAA;AAJY,mBAAmB;IAD/B,KAAK,CAAC,eAAe,EAAE,YAAY,CAAC;GACxB,mBAAmB,CAI/B;SAJY,mBAAmB"}
1
+ {"version":3,"file":"MongooseErrorFilter.js","sourceRoot":"","sources":["../../../src/components/MongooseErrorFilter.ts"],"names":[],"mappings":";AACA,OAAO,EAAC,UAAU,EAAC,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAC,KAAK,EAAC,MAAM,wBAAwB,CAAC;AAC7C,OAAO,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAGtC,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,WAAW;IAClD,KAAK,CAAC,KAAY,EAAE,GAAgB;QAClC,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC;IAChE,CAAC;CACF,CAAA;AAJY,mBAAmB;IAD/B,KAAK,CAAC,eAAe,EAAE,YAAY,CAAC;GACxB,mBAAmB,CAI/B;SAJY,mBAAmB"}
@@ -1 +1 @@
1
- {"version":3,"file":"StringErrorFilter.js","sourceRoot":"","sources":["../../../src/components/StringErrorFilter.ts"],"names":[],"mappings":";AACA,OAAO,EAAC,KAAK,EAAC,MAAM,qBAAqB,CAAC;AAG1C,MAAM,MAAM,GAAG,CAAC,OAAO,GAAG,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAG5D,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAC5B,KAAK,CAAC,KAAa,EAAE,GAAgB;QACnC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAC/C,CAAC;CACF,CAAA;AAJY,iBAAiB;IAD7B,KAAK,CAAC,MAAM,CAAC;GACD,iBAAiB,CAI7B;SAJY,iBAAiB"}
1
+ {"version":3,"file":"StringErrorFilter.js","sourceRoot":"","sources":["../../../src/components/StringErrorFilter.ts"],"names":[],"mappings":";AACA,OAAO,EAAC,KAAK,EAAC,MAAM,wBAAwB,CAAC;AAG7C,MAAM,MAAM,GAAG,CAAC,OAAO,GAAG,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAG5D,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAC5B,KAAK,CAAC,KAAa,EAAE,GAAgB;QACnC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAC/C,CAAC;CACF,CAAA;AAJY,iBAAiB;IAD7B,KAAK,CAAC,MAAM,CAAC;GACD,iBAAiB,CAI7B;SAJY,iBAAiB"}
@@ -1 +1 @@
1
- {"version":3,"file":"catch.js","sourceRoot":"","sources":["../../../src/decorators/catch.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,gBAAgB,EAAC,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAC,qBAAqB,EAAC,MAAM,qCAAqC,CAAC;AAE1E;;;;GAIG;AACH,MAAM,UAAU,KAAK,CAAC,GAAG,KAAqC;IAC5D,OAAO,CAAC,MAAW,EAAE,EAAE;QACrB,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YACrB,qBAAqB,CAAC,IAAI,EAAE,MAAa,CAAC,CAAC;QAC7C,CAAC,CAAC,CAAC;QACH,gBAAgB,CAAC;YACf,OAAO,EAAE,MAAM;YACf,QAAQ,EAAE,MAAM;SACjB,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"catch.js","sourceRoot":"","sources":["../../../src/decorators/catch.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,gBAAgB,EAAC,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAC,qBAAqB,EAAC,MAAM,wCAAwC,CAAC;AAE7E;;;;GAIG;AACH,MAAM,UAAU,KAAK,CAAC,GAAG,KAAqC;IAC5D,OAAO,CAAC,MAAW,EAAE,EAAE;QACrB,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YACrB,qBAAqB,CAAC,IAAI,EAAE,MAAa,CAAC,CAAC;QAC7C,CAAC,CAAC,CAAC;QACH,gBAAgB,CAAC;YACf,OAAO,EAAE,MAAM;YACf,QAAQ,EAAE,MAAM;SACjB,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC"}
package/lib/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @file Automatically generated by barrelsby.
2
+ * @file Automatically generated by @tsed/barrels.
3
3
  */
4
4
  export * from "./components/ErrorFilter.js";
5
5
  export * from "./components/ExceptionFilter.js";
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,uBAAuB,CAAC;AACtC,cAAc,uCAAuC,CAAC;AACtD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wCAAwC,CAAC;AACvD,cAAc,kCAAkC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"PlatformExceptions.js","sourceRoot":"","sources":["../../../src/services/PlatformExceptions.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,WAAW,EAAE,OAAO,EAAE,MAAM,EAAC,MAAM,YAAY,CAAC;AACxD,OAAO,EAAyB,MAAM,EAAE,UAAU,EAAE,eAAe,EAAC,MAAM,UAAU,CAAC;AACrF,OAAO,EAAC,WAAW,EAAC,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAC,eAAe,EAAC,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAC,mBAAmB,EAAC,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAC,iBAAiB,EAAC,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAqB,yBAAyB,EAAC,MAAM,qCAAqC,CAAC;AAClG,OAAO,EAAC,gBAAgB,EAAC,MAAM,4BAA4B,CAAC;AAG5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AAC;QAEpC,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YAChC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAE,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;SAChD;QAED,MAAM,MAAM,GAAG,WAAW,CAAC,KAAK,CAAC;aAC9B,OAAO,EAAE;aACT,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;QAE5C,IAAI,MAAM,EAAE;YACV,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAE,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;SAClD;QAED,UAAU;QACV,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAE,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAClD,CAAC;IAED,gBAAgB,CAAC,GAAc;QAC7B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;IAChE,CAAC;CACF,CAAA;AA/BC;IAAC,MAAM,EAAE;8BACC,eAAe;oDAAC;AAJf,kBAAkB;IAH9B,UAAU,CAAC;QACV,OAAO,EAAE,CAAC,WAAW,EAAE,eAAe,EAAE,mBAAmB,EAAE,iBAAiB,CAAC;KAChF,CAAC;GACW,kBAAkB,CAkC9B;SAlCY,kBAAkB"}
@@ -1,6 +1,6 @@
1
1
  import { Env } from "@tsed/core";
2
2
  import { BaseContext } from "@tsed/di";
3
- import type { ExceptionFilterMethods } from "../interfaces/ExceptionFilterMethods";
3
+ import type { ExceptionFilterMethods } from "../interfaces/ExceptionFilterMethods.js";
4
4
  export declare class ErrorFilter implements ExceptionFilterMethods {
5
5
  catch(error: any, ctx: BaseContext): void;
6
6
  mapError(error: any, env?: Env): {
@@ -1,6 +1,6 @@
1
1
  import { BaseContext } from "@tsed/di";
2
2
  import { Exception } from "@tsed/exceptions";
3
- import { ErrorFilter } from "./ErrorFilter";
3
+ import { ErrorFilter } from "./ErrorFilter.js";
4
4
  export declare class ExceptionFilter extends ErrorFilter {
5
5
  catch(error: Exception, ctx: BaseContext): void;
6
6
  }
@@ -1,5 +1,5 @@
1
1
  import { BaseContext } from "@tsed/di";
2
- import { ErrorFilter } from "./ErrorFilter";
2
+ import { ErrorFilter } from "./ErrorFilter.js";
3
3
  export declare class MongooseErrorFilter extends ErrorFilter {
4
4
  catch(error: Error, ctx: BaseContext): void;
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import { BaseContext } from "@tsed/di";
2
- import type { ExceptionFilterMethods } from "../interfaces/ExceptionFilterMethods";
2
+ import type { ExceptionFilterMethods } from "../interfaces/ExceptionFilterMethods.js";
3
3
  export declare class StringErrorFilter implements ExceptionFilterMethods {
4
4
  catch(error: string, ctx: BaseContext): void;
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import { Type } from "@tsed/core";
2
- import type { ExceptionFilterMethods } from "../interfaces/ExceptionFilterMethods";
2
+ import type { ExceptionFilterMethods } from "../interfaces/ExceptionFilterMethods.js";
3
3
  /**
4
4
  * @ignore
5
5
  */
@@ -1,13 +1,13 @@
1
1
  /**
2
- * @file Automatically generated by barrelsby.
2
+ * @file Automatically generated by @tsed/barrels.
3
3
  */
4
- export * from "./components/ErrorFilter";
5
- export * from "./components/ExceptionFilter";
6
- export * from "./components/MongooseErrorFilter";
7
- export * from "./components/StringErrorFilter";
8
- export * from "./decorators/catch";
9
- export * from "./domain/ExceptionFiltersContainer";
10
- export * from "./domain/ExceptionSchema";
11
- export * from "./errors/ResourceNotFound";
12
- export * from "./interfaces/ExceptionFilterMethods";
13
- export * from "./services/PlatformExceptions";
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";
@@ -1,6 +1,6 @@
1
1
  import { DIContext, InjectorService } from "@tsed/di";
2
- import { ExceptionFilterKey } from "../domain/ExceptionFiltersContainer";
3
- import { ExceptionFilterMethods } from "../interfaces/ExceptionFilterMethods";
2
+ import { ExceptionFilterKey } from "../domain/ExceptionFiltersContainer.js";
3
+ import { ExceptionFilterMethods } from "../interfaces/ExceptionFilterMethods.js";
4
4
  /**
5
5
  * Catch all errors and return the json error with the right status code when it's possible.
6
6
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsed/platform-exceptions",
3
- "version": "7.70.2",
3
+ "version": "7.71.1",
4
4
  "description": "Platform exceptions module for Ts.ED Framework",
5
5
  "source": "./src/index.ts",
6
6
  "main": "./lib/cjs/index.js",
@@ -14,7 +14,7 @@
14
14
  },
15
15
  "scripts": {
16
16
  "build": "yarn barrels && yarn build:ts",
17
- "barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"",
17
+ "barrels": "barrels",
18
18
  "test": "jest --max-workers=2 && jest-coverage-thresholds-bumper",
19
19
  "build:ts": "tsc --build tsconfig.json && tsc --build tsconfig.esm.json"
20
20
  },
@@ -22,20 +22,20 @@
22
22
  "tslib": "2.6.1"
23
23
  },
24
24
  "devDependencies": {
25
- "@tsed/core": "7.70.2",
26
- "@tsed/di": "7.70.2",
27
- "@tsed/exceptions": "7.70.2",
28
- "@tsed/schema": "7.70.2",
29
- "@tsed/typescript": "7.70.2",
30
- "barrelsby": "^2.8.1",
25
+ "@tsed/barrels": "7.71.1",
26
+ "@tsed/core": "7.71.1",
27
+ "@tsed/di": "7.71.1",
28
+ "@tsed/exceptions": "7.71.1",
29
+ "@tsed/schema": "7.71.1",
30
+ "@tsed/typescript": "7.71.1",
31
31
  "eslint": "^8.57.0",
32
32
  "jest": "^29.7.0"
33
33
  },
34
34
  "peerDependencies": {
35
- "@tsed/core": "7.70.2",
36
- "@tsed/di": "7.70.2",
37
- "@tsed/exceptions": "7.70.2",
38
- "@tsed/schema": "7.70.2"
35
+ "@tsed/core": "7.71.1",
36
+ "@tsed/di": "7.71.1",
37
+ "@tsed/exceptions": "7.71.1",
38
+ "@tsed/schema": "7.71.1"
39
39
  },
40
40
  "peerDependenciesMeta": {
41
41
  "@tsed/core": {