@stacksjs/bun-router 0.0.26 → 0.0.27
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/dist/cli.js +1 -1
- package/dist/types.d.ts +12 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
package/dist/types.d.ts
CHANGED
|
@@ -1155,9 +1155,19 @@ export type RouteMethodConstraint<M extends HTTPMethod = HTTPMethod> = M;
|
|
|
1155
1155
|
*/
|
|
1156
1156
|
export type AllowedMimeType = 'image/jpeg' | 'image/png' | 'image/gif' | 'image/webp' | 'image/svg+xml' | 'application/pdf' | 'application/json' | 'text/plain' | 'text/csv' | 'application/octet-stream';
|
|
1157
1157
|
/**
|
|
1158
|
-
* Response status codes - narrow and specific
|
|
1158
|
+
* Response status codes - narrow and specific.
|
|
1159
|
+
*
|
|
1160
|
+
* Narrow to catch typos, not to pick which parts of HTTP an application is
|
|
1161
|
+
* allowed to speak. Everything below is a status a real handler returns, and a
|
|
1162
|
+
* missing one is not a nudge toward a better design: it is a type error on
|
|
1163
|
+
* correct code, with `as any` as the only way out. The set grew because an
|
|
1164
|
+
* upload endpoint could not say 413 for a body over its limit.
|
|
1165
|
+
*
|
|
1166
|
+
* Deliberately still absent: 1xx, which Bun handles; 306, which is unused; and
|
|
1167
|
+
* 3xx redirect codes other than the ones `redirect()` already accepts, so a
|
|
1168
|
+
* redirect keeps going through the helper that sets a Location header.
|
|
1159
1169
|
*/
|
|
1160
|
-
export type ResponseStatus = 200 | 201 | 202 | 204 | 301 | 302 | 304 | 400 | 401 | 403 | 404 | 405 | 409 | 422 | 429 | 500 | 502 | 503 | 504;
|
|
1170
|
+
export type ResponseStatus = 200 | 201 | 202 | 203 | 204 | 205 | 206 | 301 | 302 | 303 | 304 | 307 | 308 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 418 | 422 | 423 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
|
|
1161
1171
|
/**
|
|
1162
1172
|
* Content types - narrow
|
|
1163
1173
|
*/
|