@camcima/nestjs-rfc9457 0.0.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/LICENSE +21 -0
- package/README.md +753 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/problem-details.factory.d.ts +18 -0
- package/dist/problem-details.factory.js +242 -0
- package/dist/problem-details.factory.js.map +1 -0
- package/dist/problem-type.decorator.d.ts +3 -0
- package/dist/problem-type.decorator.js +11 -0
- package/dist/problem-type.decorator.js.map +1 -0
- package/dist/rfc9457.constants.d.ts +3 -0
- package/dist/rfc9457.constants.js +7 -0
- package/dist/rfc9457.constants.js.map +1 -0
- package/dist/rfc9457.exception-filter.d.ts +11 -0
- package/dist/rfc9457.exception-filter.js +65 -0
- package/dist/rfc9457.exception-filter.js.map +1 -0
- package/dist/rfc9457.interfaces.d.ts +37 -0
- package/dist/rfc9457.interfaces.js +3 -0
- package/dist/rfc9457.interfaces.js.map +1 -0
- package/dist/rfc9457.module.d.ts +7 -0
- package/dist/rfc9457.module.js +93 -0
- package/dist/rfc9457.module.js.map +1 -0
- package/dist/utils/slug.d.ts +1 -0
- package/dist/utils/slug.js +13 -0
- package/dist/utils/slug.js.map +1 -0
- package/dist/validation/rfc9457-validation-pipe-exception.factory.d.ts +2 -0
- package/dist/validation/rfc9457-validation-pipe-exception.factory.js +10 -0
- package/dist/validation/rfc9457-validation-pipe-exception.factory.js.map +1 -0
- package/dist/validation/rfc9457-validation.exception.d.ts +5 -0
- package/dist/validation/rfc9457-validation.exception.js +12 -0
- package/dist/validation/rfc9457-validation.exception.js.map +1 -0
- package/package.json +79 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Rfc9457ValidationException = void 0;
|
|
4
|
+
const common_1 = require("@nestjs/common");
|
|
5
|
+
class Rfc9457ValidationException extends common_1.BadRequestException {
|
|
6
|
+
constructor(validationErrors) {
|
|
7
|
+
super('Request validation failed');
|
|
8
|
+
this.validationErrors = validationErrors;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.Rfc9457ValidationException = Rfc9457ValidationException;
|
|
12
|
+
//# sourceMappingURL=rfc9457-validation.exception.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rfc9457-validation.exception.js","sourceRoot":"","sources":["../../src/validation/rfc9457-validation.exception.ts"],"names":[],"mappings":";;;AAAA,2CAAqD;AAErD,MAAa,0BAA2B,SAAQ,4BAAmB;IACjE,YAA4B,gBAA2B;QACrD,KAAK,CAAC,2BAA2B,CAAC,CAAC;QADT,qBAAgB,GAAhB,gBAAgB,CAAW;IAEvD,CAAC;CACF;AAJD,gEAIC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@camcima/nestjs-rfc9457",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"description": "NestJS library for RFC 9457 Problem Details responses",
|
|
5
|
+
"author": "Carlos Cima",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=18"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "tsc -p tsconfig.build.json",
|
|
17
|
+
"lint": "eslint 'src/**/*.ts' 'test/**/*.ts'",
|
|
18
|
+
"format": "prettier --check 'src/**/*.ts' 'test/**/*.ts'",
|
|
19
|
+
"format:fix": "prettier --write 'src/**/*.ts' 'test/**/*.ts'",
|
|
20
|
+
"test": "jest",
|
|
21
|
+
"test:unit": "jest --testPathPattern=test/unit",
|
|
22
|
+
"test:e2e": "jest --testPathPattern=test/e2e",
|
|
23
|
+
"test:cov": "jest --coverage",
|
|
24
|
+
"prepublishOnly": "npm run build",
|
|
25
|
+
"release": "release-it"
|
|
26
|
+
},
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"@nestjs/common": "^10.0.0 || ^11.0.0",
|
|
29
|
+
"@nestjs/core": "^10.0.0 || ^11.0.0",
|
|
30
|
+
"class-validator": "^0.14.0",
|
|
31
|
+
"reflect-metadata": "^0.1.13 || ^0.2.0"
|
|
32
|
+
},
|
|
33
|
+
"peerDependenciesMeta": {
|
|
34
|
+
"class-validator": {
|
|
35
|
+
"optional": true
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@commitlint/cli": "^19.0.0",
|
|
40
|
+
"@commitlint/config-conventional": "^19.0.0",
|
|
41
|
+
"@nestjs/common": "^10.0.0",
|
|
42
|
+
"@nestjs/core": "^10.0.0",
|
|
43
|
+
"@nestjs/platform-express": "^10.0.0",
|
|
44
|
+
"@nestjs/platform-fastify": "^10.0.0",
|
|
45
|
+
"@nestjs/testing": "^10.0.0",
|
|
46
|
+
"@types/jest": "^29.0.0",
|
|
47
|
+
"@types/supertest": "^6.0.0",
|
|
48
|
+
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
|
49
|
+
"@typescript-eslint/parser": "^7.0.0",
|
|
50
|
+
"class-transformer": "^0.5.0",
|
|
51
|
+
"class-validator": "^0.14.0",
|
|
52
|
+
"eslint": "^8.0.0",
|
|
53
|
+
"eslint-config-prettier": "^9.0.0",
|
|
54
|
+
"eslint-plugin-prettier": "^5.0.0",
|
|
55
|
+
"fastify": "^4.0.0",
|
|
56
|
+
"jest": "^29.0.0",
|
|
57
|
+
"lefthook": "^1.0.0",
|
|
58
|
+
"prettier": "^3.0.0",
|
|
59
|
+
"reflect-metadata": "^0.2.0",
|
|
60
|
+
"release-it": "^18.0.0",
|
|
61
|
+
"rxjs": "^7.0.0",
|
|
62
|
+
"supertest": "^7.0.0",
|
|
63
|
+
"ts-jest": "^29.0.0",
|
|
64
|
+
"ts-node": "^10.9.2",
|
|
65
|
+
"typescript": "^5.0.0"
|
|
66
|
+
},
|
|
67
|
+
"repository": {
|
|
68
|
+
"type": "git",
|
|
69
|
+
"url": "git+https://github.com/camcima/nestjs-rfc9457.git"
|
|
70
|
+
},
|
|
71
|
+
"keywords": [
|
|
72
|
+
"nestjs",
|
|
73
|
+
"rfc9457",
|
|
74
|
+
"rfc7807",
|
|
75
|
+
"problem-details",
|
|
76
|
+
"error-handling",
|
|
77
|
+
"api"
|
|
78
|
+
]
|
|
79
|
+
}
|