hono 4.4.12 → 4.4.13

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.
@@ -73,5 +73,5 @@ export declare class Factory<E extends Env = any, P extends string = any> {
73
73
  export declare const createFactory: <E extends Env = any, P extends string = any>(init?: {
74
74
  initApp?: InitApp<E> | undefined;
75
75
  } | undefined) => Factory<E, P>;
76
- export declare const createMiddleware: <E extends Env = any, P extends string = any, I extends Input = {}>(middleware: MiddlewareHandler<E, P, I>) => MiddlewareHandler<E, P, I>;
76
+ export declare const createMiddleware: <E extends Env = any, P extends string = string, I extends Input = {}>(middleware: MiddlewareHandler<E, P, I>) => MiddlewareHandler<E, P, I>;
77
77
  export {};
@@ -494,7 +494,7 @@ export declare namespace JSX {
494
494
  colspan?: number | undefined;
495
495
  headers?: string | undefined;
496
496
  rowspan?: number | undefined;
497
- scope?: string | undefined;
497
+ scope?: 'row' | 'col' | 'rowgroup' | 'colgroup' | string | undefined;
498
498
  abbr?: string | undefined;
499
499
  }
500
500
  interface TimeHTMLAttributes extends HTMLAttributes {
@@ -453,7 +453,7 @@ export type Schema = {
453
453
  };
454
454
  };
455
455
  type ChangePathOfSchema<S extends Schema, Path extends string> = keyof S extends never ? {
456
- [K in Path]: never;
456
+ [K in Path]: {};
457
457
  } : {
458
458
  [K in keyof S as Path]: S[K];
459
459
  };
@@ -512,9 +512,11 @@ export type TypedResponse<T = unknown, U extends StatusCode = StatusCode, F exte
512
512
  _format: F;
513
513
  };
514
514
  type MergeTypedResponse<T> = T extends Promise<infer T2> ? T2 extends TypedResponse ? T2 : TypedResponse : T extends TypedResponse ? T : TypedResponse;
515
- export type ValidationTargets = {
515
+ export type FormValue = string | Blob;
516
+ export type ParsedFormValue = string | File;
517
+ export type ValidationTargets<T extends FormValue = ParsedFormValue> = {
516
518
  json: any;
517
- form: Record<string, string | File>;
519
+ form: Record<string, T | T[]>;
518
520
  query: Record<string, string | string[]>;
519
521
  param: Record<string, string> | Record<string, string | undefined>;
520
522
  header: Record<string, string>;
@@ -23,8 +23,8 @@ export type UnofficialStatusCode = -1;
23
23
  * @deprecated
24
24
  * Use `UnofficialStatusCode` instead.
25
25
  */
26
- export type UnOfficalStatusCode = -1;
26
+ export type UnOfficalStatusCode = UnofficialStatusCode;
27
27
  /**
28
28
  * If you want to use an unofficial status, use `UnofficialStatusCode`.
29
29
  */
30
- export type StatusCode = InfoStatusCode | SuccessStatusCode | RedirectStatusCode | ClientErrorStatusCode | ServerErrorStatusCode | UnofficialStatusCode | UnOfficalStatusCode;
30
+ export type StatusCode = InfoStatusCode | SuccessStatusCode | RedirectStatusCode | ClientErrorStatusCode | ServerErrorStatusCode | UnofficialStatusCode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hono",
3
- "version": "4.4.12",
3
+ "version": "4.4.13",
4
4
  "description": "Web framework built on Web Standards",
5
5
  "main": "dist/cjs/index.js",
6
6
  "type": "module",
@@ -25,9 +25,9 @@
25
25
  "format": "prettier --check --cache \"src/**/*.{js,ts,tsx}\" \"runtime_tests/**/*.{js,ts,tsx}\"",
26
26
  "format:fix": "prettier --write --cache --cache-strategy metadata \"src/**/*.{js,ts,tsx}\" \"runtime_tests/**/*.{js,ts,tsx}\"",
27
27
  "copy:package.cjs.json": "cp ./package.cjs.json ./dist/cjs/package.json && cp ./package.cjs.json ./dist/types/package.json ",
28
- "build": "rimraf dist && tsx ./build.ts && bun run copy:package.cjs.json",
28
+ "build": "rimraf dist && bun ./build.ts && bun run copy:package.cjs.json",
29
29
  "postbuild": "publint",
30
- "watch": "rimraf dist && tsx ./build.ts --watch && bun run copy:package.cjs.json",
30
+ "watch": "rimraf dist && bun ./build.ts --watch && bun run copy:package.cjs.json",
31
31
  "coverage": "vitest --run --coverage",
32
32
  "prerelease": "bun test:deno && bun run build",
33
33
  "release": "np"
@@ -589,7 +589,6 @@
589
589
  "publint": "^0.1.8",
590
590
  "rimraf": "^3.0.2",
591
591
  "supertest": "^6.3.3",
592
- "tsx": "^4.7.0",
593
592
  "typescript": "^5.3.3",
594
593
  "vite-plugin-fastly-js-compute": "^0.4.2",
595
594
  "vitest": "^1.2.2",