kizunajs 2.0.0-beta.26 → 2.0.0-beta.28

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/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  A spec-driven framework for building fully typed REST APIs in TypeScript, where your route declarations produce the validation, the documentation, the clients, and the AI tools.
6
6
 
7
- [![npm](https://img.shields.io/npm/v/kizunajs/beta?color=blue&label=npm)](https://www.npmjs.com/package/kizunajs/v/2.0.0-beta.26)
7
+ [![npm](https://img.shields.io/npm/v/kizunajs/beta?color=blue&label=npm)](https://www.npmjs.com/package/kizunajs/v/2.0.0-beta.28)
8
8
  ![license](https://img.shields.io/badge/license-MIT-blue)
9
9
 
10
10
  [Documentation](https://kizunajs.com)
@@ -27,7 +27,7 @@ import { z } from "zod";
27
27
  * }
28
28
  * ```
29
29
  */
30
- declare const BinarySchema: z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
30
+ declare const BinarySchema: z.ZodInstanceOf<Uint8Array<ArrayBuffer>>;
31
31
  /**
32
32
  * Schema for an uploaded file, a web `File` (bytes plus `name` and `type`).
33
33
  *
@@ -52,7 +52,7 @@ declare const BinarySchema: z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<Arra
52
52
  * }
53
53
  * ```
54
54
  */
55
- declare const FileSchema: z.ZodCustom<File, File>;
55
+ declare const FileSchema: z.ZodInstanceOf<File>;
56
56
  //#endregion
57
57
  //#region src/tool-answer.d.ts
58
58
  /**
@@ -27,7 +27,7 @@ import { z } from "zod";
27
27
  * }
28
28
  * ```
29
29
  */
30
- declare const BinarySchema: z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
30
+ declare const BinarySchema: z.ZodInstanceOf<Uint8Array<ArrayBuffer>>;
31
31
  /**
32
32
  * Schema for an uploaded file, a web `File` (bytes plus `name` and `type`).
33
33
  *
@@ -52,7 +52,7 @@ declare const BinarySchema: z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<Arra
52
52
  * }
53
53
  * ```
54
54
  */
55
- declare const FileSchema: z.ZodCustom<File, File>;
55
+ declare const FileSchema: z.ZodInstanceOf<File>;
56
56
  //#endregion
57
57
  //#region src/tool-answer.d.ts
58
58
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kizunajs",
3
- "version": "2.0.0-beta.26",
3
+ "version": "2.0.0-beta.28",
4
4
  "description": "Route declaration, validation, and the adapter API for Kizuna.js",
5
5
  "keywords": [
6
6
  "kizunajs",
@@ -129,10 +129,10 @@
129
129
  "zod": "^4.0.0"
130
130
  },
131
131
  "devDependencies": {
132
- "@types/node": "^24",
133
- "tsdown": "^0.21.0",
132
+ "@types/node": "^24.19.2",
133
+ "tsdown": "^0.21.10",
134
134
  "typescript": "^6.0.3",
135
- "zod": "^4.0.0",
135
+ "zod": "^4.6.7",
136
136
  "vitest": "3.2.4"
137
137
  },
138
138
  "scripts": {
package/src/groups.ts CHANGED
@@ -57,8 +57,7 @@ export interface GroupSet<Declared extends Record<string, GroupOptions | string>
57
57
  */
58
58
  export type GroupPaths<Declared> = {
59
59
  [Key in Extract<keyof Declared, string>]:
60
- | Key
61
- | (Declared[Key] extends { groups: infer Nested } ? `${Key}.${GroupPaths<Nested>}` : never);
60
+ Key | (Declared[Key] extends { groups: infer Nested } ? `${Key}.${GroupPaths<Nested>}` : never);
62
61
  }[Extract<keyof Declared, string>];
63
62
 
64
63
  /**
@@ -230,9 +230,9 @@ type AuthOf<R> = R extends { auth: infer Value } ? Value : false;
230
230
  * // { member: { workspaceUserId: string; role: 'owner' | 'admin' | readonly ('owner' | 'admin')[]; permissions: readonly ('workspace:read' | 'workspace:delete')[] } }
231
231
  */
232
232
  export type ContextFromAuth<Value, Identities> = {
233
- [Name in AuthIdentityNames<Value> & keyof Identities as [keyof GuardSuccess<Identities[Name]>] extends [never]
234
- ? never
235
- : Name]: GuardSuccess<Identities[Name]>;
233
+ [
234
+ Name in AuthIdentityNames<Value> & keyof Identities as [keyof GuardSuccess<Identities[Name]>] extends [never] ? never : Name
235
+ ]: GuardSuccess<Identities[Name]>;
236
236
  };
237
237
 
238
238
  /**
package/src/kizuna.ts CHANGED
@@ -40,10 +40,7 @@ import type {
40
40
  * permissions.
41
41
  */
42
42
  export type RouteAuthValue<Id extends string = string, Identities = Record<string, unknown>> =
43
- | Id
44
- | false
45
- | readonly Id[]
46
- | RouteAuthRule<Id, Identities>;
43
+ Id | false | readonly Id[] | RouteAuthRule<Id, Identities>;
47
44
 
48
45
  /**
49
46
  * The `requires` an identity accepts: a subset of the catalog behind its roles,
package/src/stream.ts CHANGED
@@ -49,8 +49,7 @@ export type StreamMessageOf<Def extends StreamResponseDefinition> =
49
49
  * The `body` of a streamed status: an async generator function receiving `{ signal }`, or any async iterable.
50
50
  */
51
51
  export type StreamBodyOf<Def extends StreamResponseDefinition> =
52
- | ((context: StreamContext) => AsyncIterable<StreamChunk<Def>>)
53
- | AsyncIterable<StreamChunk<Def>>;
52
+ ((context: StreamContext) => AsyncIterable<StreamChunk<Def>>) | AsyncIterable<StreamChunk<Def>>;
54
53
 
55
54
  /**
56
55
  * The `body` type of one streamed status, for a generator written outside its handler.