hono-ban 0.3.1 → 1.0.0
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/CHANGELOG.md +30 -0
- package/{LICENSE.md → LICENSE} +1 -1
- package/README.md +307 -472
- package/dist/ban-error-CPoKZS7g.js +102 -0
- package/dist/ban-error-CPoKZS7g.js.map +1 -0
- package/dist/constants-rUzQOaX_.js +66 -0
- package/dist/constants-rUzQOaX_.js.map +1 -0
- package/dist/definition-CDmfpcHf.js +263 -0
- package/dist/definition-CDmfpcHf.js.map +1 -0
- package/dist/formats/google-api.d.ts +115 -0
- package/dist/formats/google-api.d.ts.map +1 -0
- package/dist/formats/google-api.js +356 -0
- package/dist/formats/google-api.js.map +1 -0
- package/dist/formats/json-api.d.ts +51 -0
- package/dist/formats/json-api.d.ts.map +1 -0
- package/dist/formats/json-api.js +148 -0
- package/dist/formats/json-api.js.map +1 -0
- package/dist/formats/plain.d.ts +20 -0
- package/dist/formats/plain.d.ts.map +1 -0
- package/dist/formats/plain.js +77 -0
- package/dist/formats/plain.js.map +1 -0
- package/dist/formats/problem-details.d.ts +34 -0
- package/dist/formats/problem-details.d.ts.map +1 -0
- package/dist/formats/problem-details.js +2 -0
- package/dist/formats/stripe.d.ts +52 -0
- package/dist/formats/stripe.d.ts.map +1 -0
- package/dist/formats/stripe.js +118 -0
- package/dist/formats/stripe.js.map +1 -0
- package/dist/hook-DM38dR1V.js +23 -0
- package/dist/hook-DM38dR1V.js.map +1 -0
- package/dist/hook-TWCLnCmZ.d.ts +15 -0
- package/dist/hook-TWCLnCmZ.d.ts.map +1 -0
- package/dist/index.d.ts +129 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +606 -0
- package/dist/index.js.map +1 -0
- package/dist/issue-B-7iyCBE.js +41 -0
- package/dist/issue-B-7iyCBE.js.map +1 -0
- package/dist/json-Bjfm-jxl.js +17 -0
- package/dist/json-Bjfm-jxl.js.map +1 -0
- package/dist/openapi.d.ts +40 -0
- package/dist/openapi.d.ts.map +1 -0
- package/dist/openapi.js +75 -0
- package/dist/openapi.js.map +1 -0
- package/dist/otel.d.ts +29 -0
- package/dist/otel.d.ts.map +1 -0
- package/dist/otel.js +23 -0
- package/dist/otel.js.map +1 -0
- package/dist/problem-details-BlPlC-mV.js +158 -0
- package/dist/problem-details-BlPlC-mV.js.map +1 -0
- package/dist/schema-helpers-B4HL9TmU.js +9 -0
- package/dist/schema-helpers-B4HL9TmU.js.map +1 -0
- package/dist/standard-schema-types-Aa3pYPY1.d.ts +43 -0
- package/dist/standard-schema-types-Aa3pYPY1.d.ts.map +1 -0
- package/dist/standard-schema.d.ts +15 -0
- package/dist/standard-schema.d.ts.map +1 -0
- package/dist/standard-schema.js +23 -0
- package/dist/standard-schema.js.map +1 -0
- package/dist/testing.d.ts +26 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +137 -0
- package/dist/testing.js.map +1 -0
- package/dist/types-DYr4CtCC.d.ts +337 -0
- package/dist/types-DYr4CtCC.d.ts.map +1 -0
- package/dist/types-WuQ-karh.d.ts +179 -0
- package/dist/types-WuQ-karh.d.ts.map +1 -0
- package/dist/valibot.d.ts +26 -0
- package/dist/valibot.d.ts.map +1 -0
- package/dist/valibot.js +31 -0
- package/dist/valibot.js.map +1 -0
- package/dist/validation-entries-9R5RK-AZ.js +53 -0
- package/dist/validation-entries-9R5RK-AZ.js.map +1 -0
- package/dist/validation-entries-nUGoBPKm.d.ts +17 -0
- package/dist/validation-entries-nUGoBPKm.d.ts.map +1 -0
- package/dist/zod.d.ts +27 -0
- package/dist/zod.d.ts.map +1 -0
- package/dist/zod.js +30 -0
- package/dist/zod.js.map +1 -0
- package/package.json +98 -66
- package/dist/esm/formatters/index.js +0 -1
- package/dist/esm/index.js +0 -1
- package/dist/types/constants/index.d.ts +0 -5
- package/dist/types/constants/status-codes.d.ts +0 -9
- package/dist/types/core/convert-error.d.ts +0 -17
- package/dist/types/core/create-error.d.ts +0 -23
- package/dist/types/core/format-error.d.ts +0 -18
- package/dist/types/core/index.d.ts +0 -7
- package/dist/types/factories/client-errors.d.ts +0 -179
- package/dist/types/factories/index.d.ts +0 -6
- package/dist/types/factories/server-errors.d.ts +0 -77
- package/dist/types/formatters/default/index.d.ts +0 -19
- package/dist/types/formatters/index.d.ts +0 -7
- package/dist/types/formatters/interfaces.d.ts +0 -5
- package/dist/types/formatters/rfc7807/formatter.d.ts +0 -40
- package/dist/types/formatters/rfc7807/hooks.d.ts +0 -40
- package/dist/types/formatters/rfc7807/index.d.ts +0 -7
- package/dist/types/formatters/rfc7807/schemas.d.ts +0 -162
- package/dist/types/index.d.ts +0 -11
- package/dist/types/middleware/ban-middleware.d.ts +0 -23
- package/dist/types/middleware/index.d.ts +0 -5
- package/dist/types/types/common.d.ts +0 -12
- package/dist/types/types/error.d.ts +0 -39
- package/dist/types/types/formatter.d.ts +0 -43
- package/dist/types/types/index.d.ts +0 -9
- package/dist/types/types/options.d.ts +0 -54
- package/dist/types/types/rfc7807.d.ts +0 -77
- package/dist/types/utils/index.d.ts +0 -6
- package/dist/types/utils/sanitize.d.ts +0 -10
- package/dist/types/utils/validate.d.ts +0 -10
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# hono-ban
|
|
2
|
+
|
|
3
|
+
## 1.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`efcb0b6`](https://github.com/ali-issa/hono-ban/commit/efcb0b6bd24a598bf0e8868bff9942ec248a7868) Thanks [@ali-issa](https://github.com/ali-issa)! - First 1.0 release. `createBan()` builds a typed error catalog with a factory per IANA status and per
|
|
8
|
+
custom entry, `ban.onError()` renders every thrown value once through a pluggable format (RFC 9457
|
|
9
|
+
Problem Details by default; JSON:API, Google API (AIP-193), Stripe, and plain built in;
|
|
10
|
+
`defineFormat()` for your own), validator hooks for Zod, Valibot, and Standard Schema throw into the
|
|
11
|
+
handler, `hono-ban/openapi` derives response schemas from the active format, and `hono-ban/otel`
|
|
12
|
+
adds trace ids. Error responses carry `Cache-Control: no-store` unless you set one, and
|
|
13
|
+
`bearerChallenge()` builds RFC 6750 and RFC 9728 `WWW-Authenticate` values. `hono` is the only peer
|
|
14
|
+
dependency.
|
|
15
|
+
|
|
16
|
+
## 1.0.0-alpha.1
|
|
17
|
+
|
|
18
|
+
### Major Changes
|
|
19
|
+
|
|
20
|
+
- First 1.0 release. `createBan()` builds a typed error catalog with a factory per IANA status and per
|
|
21
|
+
custom entry, `ban.onError()` renders every thrown value once through a pluggable format (RFC 9457
|
|
22
|
+
Problem Details by default; JSON:API, Google API (AIP-193), Stripe, and plain built in;
|
|
23
|
+
`defineFormat()` for your own), validator hooks for Zod, Valibot, and Standard Schema throw into the
|
|
24
|
+
handler, `hono-ban/openapi` derives response schemas from the active format, and `hono-ban/otel`
|
|
25
|
+
adds trace ids. Error responses carry `Cache-Control: no-store` unless you set one, and
|
|
26
|
+
`bearerChallenge()` builds RFC 6750 and RFC 9728 `WWW-Authenticate` values. `hono` is the only peer
|
|
27
|
+
dependency.
|
|
28
|
+
|
|
29
|
+
Release notes are generated by [Changesets](https://github.com/changesets/changesets) from the
|
|
30
|
+
entries in `.changeset/` when a version PR is merged.
|
package/{LICENSE.md → LICENSE}
RENAMED