Skip to content

Commit e685a2a

Browse files
committed
feat: 移除 HookSchema 中的 script 字段,建议使用 handler 以提高可测试性和类型安全
1 parent c970b37 commit e685a2a

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

packages/spec/src/data/hook.zod.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,6 @@ export const HookSchema = z.object({
6262
*/
6363
handler: z.union([z.string(), z.any()]).optional().describe('Function handler name or direct function'),
6464

65-
/**
66-
* Inline Script (Optional)
67-
* For simple logic without a full plugin.
68-
* @deprecated Prefer 'handler' for better testability and type safety.
69-
*/
70-
script: z.string().optional().describe('Inline script body'),
71-
7265
/**
7366
* Execution Order
7467
* Lower numbers run first.

0 commit comments

Comments
 (0)