@visulima/error-handler 2.0.0 → 2.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.
Files changed (41) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/LICENSE.md +14 -17
  3. package/dist/error-handler/fetch-utils.js +1 -1
  4. package/dist/error-handler/html-error-handler.d.ts +17 -29
  5. package/dist/error-handler/html-error-handler.js +20 -20
  6. package/dist/error-handler/json-error-handler.js +1 -1
  7. package/dist/error-handler/jsonapi-error-handler.js +1 -1
  8. package/dist/error-handler/jsonp-error-handler.js +1 -1
  9. package/dist/error-handler/problem-error-handler.d.ts +3 -3
  10. package/dist/error-handler/problem-error-handler.js +1 -1
  11. package/dist/error-handler/text-error-handler.js +2 -2
  12. package/dist/error-handler/xml-error-handler.js +1 -1
  13. package/dist/handler/cli-handler.js +1 -1
  14. package/dist/handler/http/create-error-middleware.d.ts +19 -18
  15. package/dist/handler/http/create-error-middleware.js +1 -1
  16. package/dist/handler/http/fetch-handler.js +1 -1
  17. package/dist/handler/http/node-handler.js +1 -1
  18. package/dist/index.js +1 -1
  19. package/dist/packem_shared/cliHandler-Cybm9E8l.js +12 -0
  20. package/dist/packem_shared/createNegotiatedErrorHandler-CqLndPbO.js +1 -0
  21. package/dist/packem_shared/extractStatusCode-CBYszxF1.js +1 -0
  22. package/dist/packem_shared/fetchCreateNegotiatedErrorHandler-Dwem_rrE.js +1 -0
  23. package/dist/packem_shared/fetchHtmlErrorHandler-D2Kb40aa.js +1 -0
  24. package/dist/packem_shared/get-file-source-DfjkvIv_.js +1 -0
  25. package/dist/packem_shared/mock-server-response-Ci40Hny9.js +1 -0
  26. package/dist/packem_shared/safe-reason-phrase-6OKw5Op8.js +1 -0
  27. package/dist/packem_shared/send-json-DKhv0fDY.js +1 -0
  28. package/dist/packem_shared/sendFetchJson-CKUVEmV3.js +1 -0
  29. package/dist/packem_shared/set-error-headers-FicmiR1z.js +1 -0
  30. package/dist/packem_shared/with-expose-BhBvHI1y.js +1 -0
  31. package/package.json +19 -19
  32. package/dist/packem_shared/add-status-code-to-response-DwELM1q2.js +0 -1
  33. package/dist/packem_shared/cliHandler-BGq-ckC0.js +0 -35
  34. package/dist/packem_shared/createNegotiatedErrorHandler-CcWOSpO5.js +0 -1
  35. package/dist/packem_shared/extractStatusCode-D0UOgNnr.js +0 -1
  36. package/dist/packem_shared/fetchCreateNegotiatedErrorHandler-D9YQ8pOH.js +0 -1
  37. package/dist/packem_shared/fetchHtmlErrorHandler-Cu50Zu5a.js +0 -1
  38. package/dist/packem_shared/get-file-source-By3_8e1o.js +0 -1
  39. package/dist/packem_shared/send-json-fz8r6NBW.js +0 -1
  40. package/dist/packem_shared/sendFetchJson-BNmfrMYp.js +0 -1
  41. package/dist/packem_shared/set-error-headers-g9hns3cZ.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/error-handler",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "Error handlers for use in development and production environments.",
5
5
  "keywords": [
6
6
  "anolilab",
@@ -36,6 +36,11 @@
36
36
  ],
37
37
  "homepage": "https://visulima.com/packages/error-handler",
38
38
  "bugs": "https://github.com/visulima/visulima/issues",
39
+ "license": "MIT",
40
+ "author": {
41
+ "name": "Daniel Bannert",
42
+ "email": "d.bannert@anolilab.de"
43
+ },
39
44
  "repository": {
40
45
  "type": "git",
41
46
  "url": "git+https://github.com/visulima/visulima.git",
@@ -51,13 +56,13 @@
51
56
  "url": "https://anolilab.com/support"
52
57
  }
53
58
  ],
54
- "license": "MIT",
55
- "author": {
56
- "name": "Daniel Bannert",
57
- "email": "d.bannert@anolilab.de"
58
- },
59
- "sideEffects": false,
59
+ "files": [
60
+ "dist",
61
+ "README.md",
62
+ "CHANGELOG.md"
63
+ ],
60
64
  "type": "module",
65
+ "sideEffects": false,
61
66
  "exports": {
62
67
  ".": {
63
68
  "types": "./dist/index.d.ts",
@@ -133,24 +138,19 @@
133
138
  },
134
139
  "./package.json": "./package.json"
135
140
  },
136
- "files": [
137
- "dist",
138
- "README.md",
139
- "CHANGELOG.md"
140
- ],
141
+ "publishConfig": {
142
+ "access": "public",
143
+ "provenance": true
144
+ },
141
145
  "dependencies": {
142
- "@tinyhttp/accepts": "^2.3.0",
143
- "@visulima/error": "6.0.0",
146
+ "@tinyhttp/accepts": "^2.3.1",
147
+ "@visulima/error": "6.1.0",
144
148
  "http-errors": "^2.0.1",
145
149
  "http-status-codes": "^2.3.0",
146
- "jstoxml": "^7.1.0",
150
+ "jstoxml": "^7.1.1",
147
151
  "ts-japi": "^1.12.3"
148
152
  },
149
153
  "engines": {
150
154
  "node": "^22.14.0 || >=24.10.0"
151
- },
152
- "publishConfig": {
153
- "access": "public",
154
- "provenance": true
155
155
  }
156
156
  }
@@ -1 +0,0 @@
1
- import{StatusCodes as u}from"http-status-codes";const r=(s,o)=>{const e=o,t=Number(e.statusCode??e.status);if(Number.isInteger(t)&&t>=400&&t<=599){s.statusCode=t;return}s.statusCode<400&&(s.statusCode=u.INTERNAL_SERVER_ERROR)};export{r as a};