Skip to content

Commit c56bef4

Browse files
committed
feat: update Zod type exports and increment package versions for compatibility
1 parent 107b193 commit c56bef4

File tree

8 files changed

+19
-14
lines changed

8 files changed

+19
-14
lines changed

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@riktajs/cli",
3-
"version": "0.3.2",
3+
"version": "0.3.3",
44
"description": "CLI tool for Rikta framework - scaffold, develop and build projects",
55
"type": "module",
66
"main": "dist/index.js",

packages/cli/templates/default/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
"author": "",
1919
"license": "MIT",
2020
"dependencies": {
21-
"@riktajs/core": "^0.10.0"
21+
"@riktajs/core": "^0.10.1"
2222
},
2323
"devDependencies": {
24-
"@riktajs/cli": "^0.3.2",
24+
"@riktajs/cli": "^0.3.3",
2525
"@types/node": "^22.10.2",
2626
"typescript": "^5.7.2"
2727
},

packages/cli/templates/mcp-server/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
"author": "",
2020
"license": "MIT",
2121
"dependencies": {
22-
"@riktajs/core": "^0.10.0",
23-
"@riktajs/mcp": "^0.4.0"
22+
"@riktajs/core": "^0.10.1",
23+
"@riktajs/mcp": "^0.4.1"
2424
},
2525
"devDependencies": {
26-
"@riktajs/cli": "^0.3.2",
26+
"@riktajs/cli": "^0.3.3",
2727
"@types/node": "^22.10.2",
2828
"typescript": "^5.7.2"
2929
},

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@riktajs/core",
3-
"version": "0.10.0",
3+
"version": "0.10.1",
44
"description": "A fast and modern TypeScript backend framework with zero-config autowiring, powered by Fastify",
55
"type": "module",
66
"main": "dist/index.js",

packages/core/src/core/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export * from './profiler/index.js';
2020
// This allows users to import everything from '@riktajs/core':
2121
// import { z, Body, Controller } from '@riktajs/core';
2222
export { z } from 'zod';
23-
export type { ZodType, ZodSchema, ZodError, ZodIssue, infer as ZodInfer } from 'zod';
23+
export type { ZodError, ZodIssue, infer as ZodInfer, input as ZodInput, output as ZodOutput } from 'zod';
2424

2525
// Re-export Fastify types for convenience
2626
// This allows users to import Fastify types directly from '@riktajs/core':

packages/mcp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@riktajs/mcp",
3-
"version": "0.4.0",
3+
"version": "0.4.1",
44
"description": "Model Context Protocol (MCP) integration for Rikta Framework - Connect AI assistants to your backend",
55
"type": "module",
66
"main": "dist/index.js",

packages/mcp/src/types.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
* TypeScript interfaces and types for MCP integration.
55
*/
66

7-
import type { ZodType } from 'zod';
7+
import type { z } from 'zod';
88

99
// ============================================================================
1010
// Zod Schema Type
1111
// ============================================================================
1212

1313
/**
14-
* Generic Zod schema type - accepts any Zod schema
14+
* Generic Zod schema type - accepts any Zod schema (compatible with zod v4)
1515
*/
16-
export type ZodSchema = ZodType<any, any, any>;
16+
export type ZodSchema = z.core.$ZodType;
1717

1818
// ============================================================================
1919
// MCP Tool Types

packages/mcp/src/utils/zod-to-schema.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
* Utilities for converting Zod schemas to JSON Schema format
55
* compatible with @platformatic/mcp.
66
*/
7-
import { z, type ZodType } from 'zod';
7+
import { z } from 'zod';
8+
9+
/**
10+
* Zod schema type (compatible with zod v4)
11+
*/
12+
type ZodType = z.core.$ZodType;
813

914
/**
1015
* JSON Schema type (simplified)
@@ -16,7 +21,7 @@ export type JsonSchema = Record<string, unknown>;
1621
* Uses duck typing to detect Zod schemas without requiring the full library
1722
* Compatible with both Zod v3 (_def) and Zod v4 (_zod)
1823
*/
19-
export function isZodSchema(value: unknown): value is ZodType<unknown> {
24+
export function isZodSchema(value: unknown): value is ZodType {
2025
return (
2126
value !== null &&
2227
typeof value === 'object' &&

0 commit comments

Comments
 (0)