feat!: new package xsschema (#40)

* feat: new package `xsschema`

* chore: clean cspell config

* fix(tsconfig): add reference

* fix(xsschema): add json-schema types to dev deps

* chore(xsschema): export schema type

* fix(xsschema): export schema type

* refactor!: use xsschema instead of typeschema

* fix(generate-object): direct return

* fix(tool): drop tool result generic type

* fix(xsschema): mark return type, handle unknown vendor

* feat(xsschema): export json schema type

* chore(generate-text): update test snapshot

* fix(generate-text): check content length

* chore(tool): update test snapshot
This commit is contained in:
藍+85CD authored and GitHub committed 2025-02-05 20:27:09 +08:00
1 parent 13180a2339
commit 29e4d211de
22 files changed
+204 -211

No files matched your search

+1 -1
View File
@@ -10,7 +10,6 @@ words:
- elevenlabs
- eslintcache
- fumadocs
- gcornut
- importantimport
- koemotion
- masknet
@@ -30,5 +29,6 @@ words:
- valibot
- vitest
- xsai
- xsschema
ignoreWords: []
import: []
+3 -3
View File
@@ -36,11 +36,11 @@
"test:watch": "vitest"
},
"dependencies": {
"@typeschema/main": "catalog:",
"@xsai/generate-text": "workspace:"
"@xsai/generate-text": "workspace:",
"xsschema": "workspace:"
},
"devDependencies": {
"@gcornut/valibot-json-schema": "catalog:",
"@valibot/to-json-schema": "catalog:",
"@xsai/providers": "workspace:",
"valibot": "catalog:"
}
+11 -19
View File
@@ -1,8 +1,8 @@
import type { Infer, Schema } from '@typeschema/main'
import type { GenerateTextOptions, GenerateTextResult } from '@xsai/generate-text'
import type { Infer, InferIn, Schema } from 'xsschema'
import { toJSONSchema, validate } from '@typeschema/main'
import { generateText } from '@xsai/generate-text'
import { toJSONSchema, validate } from 'xsschema'
export interface GenerateObjectOptions<T extends Schema> extends GenerateTextOptions {
schema: T
@@ -32,24 +32,16 @@ export const generateObject = async <T extends Schema>(options: GenerateObjectOp
schemaName: undefined,
})
.then(async ({ finishReason, messages, steps, text, toolCalls, toolResults, usage }) => {
const result = await validate(options.schema, JSON.parse(text!))
const object = await validate(options.schema, JSON.parse(text!) as InferIn<T>)
if (result.success) {
return {
finishReason,
messages,
object: result.data,
steps,
toolCalls,
toolResults,
usage,
}
}
else {
throw new Error([
'Schema validation failed:',
...result.issues.map(issue => `- ${issue.message}`),
].join('\n'))
return {
finishReason,
messages,
object,
steps,
toolCalls,
toolResults,
usage,
}
})
+1 -1
View File
@@ -92,7 +92,7 @@ const rawGenerateText: RawGenerateText = async (options: GenerateTextOptions) =>
? 'tool-result'
: 'continue'
if (message.content !== undefined || !message.tool_calls || steps.length >= (options.maxSteps ?? 1)) {
if ((message.content !== undefined && message.content.length > 0) || !message.tool_calls || steps.length >= (options.maxSteps ?? 1)) {
const step: StepResult = {
finishReason,
stepType,
@@ -3,6 +3,8 @@
exports[`@xsai/generate-text > basic 1`] = `
[
{
"finishReason": "stop",
"stepType": "initial",
"text": "YES",
"toolCalls": [],
"toolResults": [],
+3 -3
View File
@@ -36,11 +36,11 @@
"test:watch": "vitest"
},
"dependencies": {
"@typeschema/main": "catalog:",
"@xsai/stream-text": "workspace:"
"@xsai/stream-text": "workspace:",
"xsschema": "workspace:"
},
"devDependencies": {
"@gcornut/valibot-json-schema": "catalog:",
"@valibot/to-json-schema": "catalog:",
"@xsai/providers": "workspace:",
"best-effort-json-parser": "^1.1.2",
"type-fest": "^4.33.0",
+2 -2
View File
@@ -1,10 +1,10 @@
import type { Infer, Schema } from '@typeschema/main'
import type { StreamTextOptions, StreamTextResult } from '@xsai/stream-text'
import type { PartialDeep } from 'type-fest'
import type { Infer, Schema } from 'xsschema'
import { toJSONSchema } from '@typeschema/main'
import { streamText } from '@xsai/stream-text'
import { parse } from 'best-effort-json-parser'
import { toJSONSchema } from 'xsschema'
export interface StreamObjectOptions<T extends Schema> extends StreamTextOptions {
schema: T
+3 -3
View File
@@ -47,11 +47,11 @@
}
},
"dependencies": {
"@typeschema/main": "catalog:",
"@xsai/shared": "workspace:"
"@xsai/shared": "workspace:",
"xsschema": "workspace:"
},
"devDependencies": {
"@gcornut/valibot-json-schema": "catalog:",
"@valibot/to-json-schema": "catalog:",
"@xsai/generate-text": "workspace:",
"@xsai/providers": "workspace:",
"valibot": "catalog:"
+1 -3
View File
@@ -1,11 +1,9 @@
/// <reference types="@xsai/generate-text" />
import type { Schema } from '@typeschema/main'
import type { ToolResult } from '.'
declare module '@xsai/generate-text' {
export interface GenerateTextOptions {
tools?: ToolResult<Schema>[]
tools?: ToolResult[]
}
}
+6 -6
View File
@@ -1,9 +1,9 @@
import type { InferIn, Schema } from '@typeschema/main'
import type { InferIn, Schema } from 'xsschema'
import { toJSONSchema } from '@typeschema/main'
import { clean } from '@xsai/shared'
import { toJSONSchema } from 'xsschema'
export interface ToolOptions<T extends Schema> {
export interface ToolOptions<T extends Schema = Schema> {
description?: string
execute: (input: InferIn<T>) => Promise<string> | string
name: string
@@ -11,8 +11,8 @@ export interface ToolOptions<T extends Schema> {
strict?: boolean
}
export interface ToolResult<T extends Schema> {
execute: (input: InferIn<T>) => Promise<string> | string
export interface ToolResult {
execute: (input: unknown) => Promise<string> | string
function: {
description?: string
name: string
@@ -22,7 +22,7 @@ export interface ToolResult<T extends Schema> {
type: 'function'
}
export const tool = async <T extends Schema>(options: ToolOptions<T>): Promise<ToolResult<T>> => ({
export const tool = async <T extends Schema>(options: ToolOptions<T>): Promise<ToolResult> => ({
execute: options.execute,
function: {
description: options.description,
@@ -1,3 +1,3 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`@xsai/tool > generateText with tool 1`] = `"In San Francisco, it's currently 42°F."`;
exports[`@xsai/tool > generateText with tool 1`] = `"Right now, it's 42°F (6°C) partly cloudy in San Francisco."`;
+57
View File
@@ -0,0 +1,57 @@
{
"name": "xsschema",
"type": "module",
"version": "0.0.31",
"private": true,
"description": "extra-small, Standard Schema-based alternative to typeschema.",
"author": "Moeru AI",
"license": "MIT",
"homepage": "https://xsai.js.org",
"repository": {
"type": "git",
"url": "git+https://github.com/moeru-ai/xsai.git",
"directory": "packages/xsschema"
},
"bugs": "https://github.com/moeru-ai/xsai/issues",
"keywords": [
"xsai",
"standard-schema",
"typeschema"
],
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"build": "pkgroll",
"build:watch": "pkgroll --watch"
},
"peerDependencies": {
"@valibot/to-json-schema": "catalog:",
"zod-to-json-schema": "^3.24.1"
},
"peerDependenciesMeta": {
"@valibot/to-json-schema": {
"optional": true
},
"zod-to-json-schema": {
"optional": true
}
},
"dependencies": {
"@standard-schema/spec": "^1.0.0"
},
"devDependencies": {
"@types/json-schema": "^7.0.15",
"@valibot/to-json-schema": "catalog:",
"zod-to-json-schema": "^3.24.1"
}
}
+3
View File
@@ -0,0 +1,3 @@
export { toJsonSchema, toJsonSchema as toJSONSchema } from './to-json-schema'
export type { Infer, InferIn, JSONSchema as JsonSchema, JSONSchema, Schema } from './types'
export { validate } from './validate'
@@ -0,0 +1,15 @@
import type { StandardSchemaV1 } from '@standard-schema/spec'
import type { JSONSchema7 } from 'json-schema'
export const toJsonSchema = async (schema: StandardSchemaV1): Promise<JSONSchema7> => {
switch (schema['~standard'].vendor) {
case 'valibot':
// eslint-disable-next-line ts/no-unsafe-argument
return (await import('./valibot')).toJsonSchema(schema as any)
case 'zod':
// eslint-disable-next-line ts/no-unsafe-argument, @masknet/type-prefer-return-type-annotation
return (await import('./zod')).toJsonSchema(schema as any) as JSONSchema7
default:
throw new Error(`xsschema: Unsupported schema vendor ${schema['~standard'].vendor}`)
}
}
@@ -0,0 +1 @@
export { toJsonSchema } from '@valibot/to-json-schema'
@@ -0,0 +1 @@
export { zodToJsonSchema as toJsonSchema } from 'zod-to-json-schema'
+7
View File
@@ -0,0 +1,7 @@
import type { StandardSchemaV1 } from '@standard-schema/spec'
export type { StandardSchemaV1 as Schema } from '@standard-schema/spec'
export type { JSONSchema7 as JSONSchema } from 'json-schema'
export type Infer<T extends StandardSchemaV1> = StandardSchemaV1.InferOutput<T>
export type InferIn<T extends StandardSchemaV1> = StandardSchemaV1.InferInput<T>
+13
View File
@@ -0,0 +1,13 @@
import type { StandardSchemaV1 } from '@standard-schema/spec'
export const validate = async <T extends StandardSchemaV1>(schema: T, input: StandardSchemaV1.InferInput<T>): Promise<StandardSchemaV1.InferOutput<T>> => {
let result = schema['~standard'].validate(input)
if (result instanceof Promise)
result = await result
if (result.issues) {
throw new Error(JSON.stringify(result.issues, null, 2))
}
return result.value
}
+4
View File
@@ -0,0 +1,4 @@
{
"extends": "@importantimport/tsconfig/app.json",
"include": ["src"]
}
+66 -166
View File
@@ -6,15 +6,12 @@ settings:
catalogs:
default:
'@gcornut/valibot-json-schema':
specifier: ^0.42.0
version: 0.42.0
'@typeschema/main':
specifier: ^0.14.1
version: 0.14.1
'@valibot/to-json-schema':
specifier: ^1.0.0-beta.5
version: 1.0.0-beta.5
valibot:
specifier: ^0.42.1
version: 0.42.1
specifier: ^1.0.0-beta.14
version: 1.0.0-beta.14
importers:
@@ -161,7 +158,7 @@ importers:
version: 4.0.1
valibot:
specifier: 'catalog:'
version: 0.42.1(typescript@5.6.3)
version: 1.0.0-beta.14(typescript@5.6.3)
xsai:
specifier: workspace:^
version: link:../packages/xsai
@@ -178,22 +175,22 @@ importers:
packages/generate-object:
dependencies:
'@typeschema/main':
specifier: 'catalog:'
version: 0.14.1(@types/json-schema@7.0.15)(@typeschema/valibot@0.14.0(@gcornut/valibot-json-schema@0.42.0(esbuild@0.24.2)(typescript@5.6.3))(@types/json-schema@7.0.15)(valibot@0.42.1(typescript@5.6.3)))
'@xsai/generate-text':
specifier: 'workspace:'
version: link:../generate-text
xsschema:
specifier: 'workspace:'
version: link:../xsschema
devDependencies:
'@gcornut/valibot-json-schema':
'@valibot/to-json-schema':
specifier: 'catalog:'
version: 0.42.0(esbuild@0.24.2)(typescript@5.6.3)
version: 1.0.0-beta.5(valibot@1.0.0-beta.14(typescript@5.6.3))
'@xsai/providers':
specifier: 'workspace:'
version: link:../providers
valibot:
specifier: 'catalog:'
version: 0.42.1(typescript@5.6.3)
version: 1.0.0-beta.14(typescript@5.6.3)
packages/generate-speech:
dependencies:
@@ -254,16 +251,16 @@ importers:
packages/stream-object:
dependencies:
'@typeschema/main':
specifier: 'catalog:'
version: 0.14.1(@types/json-schema@7.0.15)(@typeschema/valibot@0.14.0(@gcornut/valibot-json-schema@0.42.0(esbuild@0.24.2)(typescript@5.6.3))(@types/json-schema@7.0.15)(valibot@0.42.1(typescript@5.6.3)))
'@xsai/stream-text':
specifier: 'workspace:'
version: link:../stream-text
xsschema:
specifier: 'workspace:'
version: link:../xsschema
devDependencies:
'@gcornut/valibot-json-schema':
'@valibot/to-json-schema':
specifier: 'catalog:'
version: 0.42.0(esbuild@0.24.2)(typescript@5.6.3)
version: 1.0.0-beta.5(valibot@1.0.0-beta.14(typescript@5.6.3))
'@xsai/providers':
specifier: 'workspace:'
version: link:../providers
@@ -275,7 +272,7 @@ importers:
version: 4.33.0
valibot:
specifier: 'catalog:'
version: 0.42.1(typescript@5.6.3)
version: 1.0.0-beta.14(typescript@5.6.3)
packages/stream-text:
dependencies:
@@ -292,16 +289,16 @@ importers:
packages/tool:
dependencies:
'@typeschema/main':
specifier: 'catalog:'
version: 0.14.1(@types/json-schema@7.0.15)(@typeschema/valibot@0.14.0(@gcornut/valibot-json-schema@0.42.0(esbuild@0.24.2)(typescript@5.6.3))(@types/json-schema@7.0.15)(valibot@0.42.1(typescript@5.6.3)))
'@xsai/shared':
specifier: 'workspace:'
version: link:../shared
xsschema:
specifier: 'workspace:'
version: link:../xsschema
devDependencies:
'@gcornut/valibot-json-schema':
'@valibot/to-json-schema':
specifier: 'catalog:'
version: 0.42.0(esbuild@0.24.2)(typescript@5.6.3)
version: 1.0.0-beta.5(valibot@1.0.0-beta.14(typescript@5.6.3))
'@xsai/generate-text':
specifier: 'workspace:'
version: link:../generate-text
@@ -310,7 +307,7 @@ importers:
version: link:../providers
valibot:
specifier: 'catalog:'
version: 0.42.1(typescript@5.6.3)
version: 1.0.0-beta.14(typescript@5.6.3)
packages/utils-chat:
dependencies:
@@ -356,6 +353,22 @@ importers:
specifier: 'workspace:'
version: link:../tool
packages/xsschema:
dependencies:
'@standard-schema/spec':
specifier: ^1.0.0
version: 1.0.0
devDependencies:
'@types/json-schema':
specifier: ^7.0.15
version: 7.0.15
'@valibot/to-json-schema':
specifier: 'catalog:'
version: 1.0.0-beta.5(valibot@1.0.0-beta.14(typescript@5.6.3))
zod-to-json-schema:
specifier: ^3.24.1
version: 3.24.1(zod@3.24.1)
packages:
'@alloc/quick-lru@5.2.0':
@@ -1517,10 +1530,6 @@ packages:
'@formatjs/intl-localematcher@0.5.10':
resolution: {integrity: sha512-af3qATX+m4Rnd9+wHcjJ4w2ijq+rAVP3CCinJQvFv1kgSu1W6jypUmvleJxcewdxmutM8dmIRZFxO/IQBZmP2Q==}
'@gcornut/valibot-json-schema@0.42.0':
resolution: {integrity: sha512-4Et4AN6wmqeA0PfU5Clkv/IS27wiefsWf6TemAZrb75uzkClYEFavim7SboeKwbll9Nbsn2Iv0LT/HS5H7orZg==}
hasBin: true
'@humanfs/core@0.19.1':
resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==}
engines: {node: '>=18.18.0'}
@@ -2430,6 +2439,9 @@ packages:
resolution: {integrity: sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==}
engines: {node: '>=18'}
'@standard-schema/spec@1.0.0':
resolution: {integrity: sha512-m2bOd0f2RT9k8QJx1JN85cZYyH1RqFBdlwtkSlf4tBDYLCiiZnv1fIIwacK6cqwXavOydf0NPToMQgpKq+dVlA==}
'@stylistic/eslint-plugin@3.0.1':
resolution: {integrity: sha512-rQ3tcT5N2cynofJfbjUsnL4seoewTaOVBLyUEwtNldo7iNMPo3h/GUQk+Cl3iHEWwRxjq2wuH6q0FufQrbVL1A==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@@ -2583,87 +2595,6 @@ packages:
'@types/unist@3.0.3':
resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==}
'@typeschema/core@0.14.0':
resolution: {integrity: sha512-Ia6PtZHcL3KqsAWXjMi5xIyZ7XMH4aSnOQes8mfMLx+wGFGtGRNlwe6Y7cYvX+WfNK67OL0/HSe9t8QDygV0/w==}
peerDependencies:
'@types/json-schema': ^7.0.15
peerDependenciesMeta:
'@types/json-schema':
optional: true
'@typeschema/main@0.14.1':
resolution: {integrity: sha512-ReYIFVmMawLn3rq6+fBhiDFH1LrolQd+kKcuglCgnMip20ou2h2YEuIcDoLJ1tQ/RQnBTPyfvs+BwEytW9YVDg==}
peerDependencies:
'@typeschema/arktype': 0.14.0
'@typeschema/class-validator': 0.3.0
'@typeschema/deepkit': 0.14.0
'@typeschema/effect': 0.14.0
'@typeschema/fastest-validator': 0.2.0
'@typeschema/function': 0.14.0
'@typeschema/io-ts': 0.14.0
'@typeschema/joi': 0.14.0
'@typeschema/json': 0.14.0
'@typeschema/ow': 0.14.0
'@typeschema/runtypes': 0.14.0
'@typeschema/superstruct': 0.14.0
'@typeschema/suretype': 0.2.0
'@typeschema/typebox': 0.14.0
'@typeschema/valibot': 0.14.0
'@typeschema/valita': 0.2.0
'@typeschema/vine': 0.2.0
'@typeschema/yup': 0.14.0
'@typeschema/zod': 0.14.0
peerDependenciesMeta:
'@typeschema/arktype':
optional: true
'@typeschema/class-validator':
optional: true
'@typeschema/deepkit':
optional: true
'@typeschema/effect':
optional: true
'@typeschema/fastest-validator':
optional: true
'@typeschema/function':
optional: true
'@typeschema/io-ts':
optional: true
'@typeschema/joi':
optional: true
'@typeschema/json':
optional: true
'@typeschema/ow':
optional: true
'@typeschema/runtypes':
optional: true
'@typeschema/superstruct':
optional: true
'@typeschema/suretype':
optional: true
'@typeschema/typebox':
optional: true
'@typeschema/valibot':
optional: true
'@typeschema/valita':
optional: true
'@typeschema/vine':
optional: true
'@typeschema/yup':
optional: true
'@typeschema/zod':
optional: true
'@typeschema/valibot@0.14.0':
resolution: {integrity: sha512-Q2HTTSfXoEgo+55Nx0iprlpGolXgDbnGss6avLlXNtjvTNx606VDnLkpSyA6u/MS2mOIUO7GVGdCF6LLbLcqlg==}
peerDependencies:
'@gcornut/valibot-json-schema': ^0.37.0
valibot: ^0.39.0
peerDependenciesMeta:
'@gcornut/valibot-json-schema':
optional: true
valibot:
optional: true
'@typescript-eslint/eslint-plugin@8.22.0':
resolution: {integrity: sha512-4Uta6REnz/xEJMvwf72wdUnC3rr4jAQf5jnTkeRQ9b6soxLxhDEbS/pfMPoJLDfFPNVRdryqWUIV/2GZzDJFZw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@@ -2744,6 +2675,11 @@ packages:
'@ungap/structured-clone@1.2.0':
resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==}
'@valibot/to-json-schema@1.0.0-beta.5':
resolution: {integrity: sha512-8aI2sG98gWS+6YuIL3OMkg60sImhICPdZIFCV1XDyX8k6UOCX+MgXaeR3f2fDShuNXYHV46vcjWRpov8ojzDNw==}
peerDependencies:
valibot: ^1.0.0 || ^1.0.0-beta.5 || ^1.0.0-rc
'@vitest/eslint-plugin@1.1.25':
resolution: {integrity: sha512-u8DpDnMbPcqBmJOB4PeEtn6q7vKmLVTLFMpzoxSAo0hjYdl4iYSHRleqwPQo0ywc7UV0S6RKIahYRQ3BnZdMVw==}
peerDependencies:
@@ -3281,12 +3217,6 @@ packages:
esast-util-from-js@2.0.1:
resolution: {integrity: sha512-8Ja+rNJ0Lt56Pcf3TAmpBZjmx8ZcK5Ts4cAzIOjsjevg9oSXJnl6SUQ2EevU8tv3h6ZLWmoKL5H4fgWvdvfETw==}
esbuild-runner@2.2.2:
resolution: {integrity: sha512-fRFVXcmYVmSmtYm2mL8RlUASt2TDkGh3uRcvHFOKNr/T58VrfVeKD9uT9nlgxk96u0LS0ehS/GY7Da/bXWKkhw==}
hasBin: true
peerDependencies:
esbuild: '*'
esbuild@0.21.5:
resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==}
engines: {node: '>=12'}
@@ -5394,9 +5324,6 @@ packages:
ts-morph@25.0.0:
resolution: {integrity: sha512-ERPTUVO5qF8cEGJgAejGOsCVlbk8d0SDyiJsucKQT5XgqoZslv0Qml+gnui6Yy6o+uQqw5SestyW2HvlVtT/Sg==}
tslib@2.4.0:
resolution: {integrity: sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==}
tslib@2.8.1:
resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}
@@ -5544,8 +5471,8 @@ packages:
util-deprecate@1.0.2:
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
valibot@0.42.1:
resolution: {integrity: sha512-3keXV29Ar5b//Hqi4MbSdV7lfVp6zuYLZuA9V1PvQUsXqogr+u5lvLPLk3A4f74VUXDnf/JfWMN6sB+koJ/FFw==}
valibot@1.0.0-beta.14:
resolution: {integrity: sha512-tLyV2rE5QL6U29MFy3xt4AqMrn+/HErcp2ZThASnQvPMwfSozjV1uBGKIGiegtZIGjinJqn0SlBdannf18wENA==}
peerDependencies:
typescript: '>=5'
peerDependenciesMeta:
@@ -5713,6 +5640,11 @@ packages:
resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==}
engines: {node: '>=10'}
zod-to-json-schema@3.24.1:
resolution: {integrity: sha512-3h08nf3Vw3Wl3PK+q3ow/lIil81IT2Oa7YpQyUUDsEWbXveMesdfK1xBd2RhCkynwZndAxixji/7SYJJowr62w==}
peerDependencies:
zod: ^3.24.1
zod@3.24.1:
resolution: {integrity: sha512-muH7gBL9sI1nciMZV67X5fTKKBLtwpZ5VBp1vsOQzj1MhrBZ4wlVCm3gedKZWLp0Oyel8sIGfeiz54Su+OVT+A==}
@@ -6868,16 +6800,6 @@ snapshots:
dependencies:
tslib: 2.8.1
'@gcornut/valibot-json-schema@0.42.0(esbuild@0.24.2)(typescript@5.6.3)':
dependencies:
valibot: 0.42.1(typescript@5.6.3)
optionalDependencies:
'@types/json-schema': 7.0.15
esbuild-runner: 2.2.2(esbuild@0.24.2)
transitivePeerDependencies:
- esbuild
- typescript
'@humanfs/core@0.19.1': {}
'@humanfs/node@0.16.6':
@@ -7691,6 +7613,8 @@ snapshots:
'@sindresorhus/merge-streams@2.3.0': {}
'@standard-schema/spec@1.0.0': {}
'@stylistic/eslint-plugin@3.0.1(eslint@9.19.0(jiti@2.4.2))(typescript@5.6.3)':
dependencies:
'@typescript-eslint/utils': 8.21.0(eslint@9.19.0(jiti@2.4.2))(typescript@5.6.3)
@@ -7841,28 +7765,6 @@ snapshots:
'@types/unist@3.0.3': {}
'@typeschema/core@0.14.0(@types/json-schema@7.0.15)':
optionalDependencies:
'@types/json-schema': 7.0.15
'@typeschema/main@0.14.1(@types/json-schema@7.0.15)(@typeschema/valibot@0.14.0(@gcornut/valibot-json-schema@0.42.0(esbuild@0.24.2)(typescript@5.6.3))(@types/json-schema@7.0.15)(valibot@0.42.1(typescript@5.6.3)))':
dependencies:
'@typeschema/core': 0.14.0(@types/json-schema@7.0.15)
optionalDependencies:
'@typeschema/valibot': 0.14.0(@gcornut/valibot-json-schema@0.42.0(esbuild@0.24.2)(typescript@5.6.3))(@types/json-schema@7.0.15)(valibot@0.42.1(typescript@5.6.3))
transitivePeerDependencies:
- '@types/json-schema'
'@typeschema/valibot@0.14.0(@gcornut/valibot-json-schema@0.42.0(esbuild@0.24.2)(typescript@5.6.3))(@types/json-schema@7.0.15)(valibot@0.42.1(typescript@5.6.3))':
dependencies:
'@typeschema/core': 0.14.0(@types/json-schema@7.0.15)
optionalDependencies:
'@gcornut/valibot-json-schema': 0.42.0(esbuild@0.24.2)(typescript@5.6.3)
valibot: 0.42.1(typescript@5.6.3)
transitivePeerDependencies:
- '@types/json-schema'
optional: true
'@typescript-eslint/eslint-plugin@8.22.0(@typescript-eslint/parser@8.22.0(eslint@9.19.0(jiti@2.4.2))(typescript@5.6.3))(eslint@9.19.0(jiti@2.4.2))(typescript@5.6.3)':
dependencies:
'@eslint-community/regexpp': 4.12.1
@@ -7986,6 +7888,10 @@ snapshots:
'@ungap/structured-clone@1.2.0': {}
'@valibot/to-json-schema@1.0.0-beta.5(valibot@1.0.0-beta.14(typescript@5.6.3))':
dependencies:
valibot: 1.0.0-beta.14(typescript@5.6.3)
'@vitest/eslint-plugin@1.1.25(@typescript-eslint/utils@8.22.0(eslint@9.19.0(jiti@2.4.2))(typescript@5.6.3))(eslint@9.19.0(jiti@2.4.2))(typescript@5.6.3)(vitest@3.0.4(@types/debug@4.1.12)(@types/node@22.12.0)(lightningcss@1.29.1)(sass-embedded@1.81.0)(terser@5.36.0))':
dependencies:
'@typescript-eslint/utils': 8.22.0(eslint@9.19.0(jiti@2.4.2))(typescript@5.6.3)
@@ -8623,13 +8529,6 @@ snapshots:
esast-util-from-estree: 2.0.0
vfile-message: 4.0.2
esbuild-runner@2.2.2(esbuild@0.24.2):
dependencies:
esbuild: 0.24.2
source-map-support: 0.5.21
tslib: 2.4.0
optional: true
esbuild@0.21.5:
optionalDependencies:
'@esbuild/aix-ppc64': 0.21.5
@@ -11348,9 +11247,6 @@ snapshots:
'@ts-morph/common': 0.26.0
code-block-writer: 13.0.3
tslib@2.4.0:
optional: true
tslib@2.8.1: {}
tsx@4.19.2:
@@ -11519,7 +11415,7 @@ snapshots:
util-deprecate@1.0.2: {}
valibot@0.42.1(typescript@5.6.3):
valibot@1.0.0-beta.14(typescript@5.6.3):
optionalDependencies:
typescript: 5.6.3
@@ -11716,6 +11612,10 @@ snapshots:
yocto-queue@0.1.0: {}
zod-to-json-schema@3.24.1(zod@3.24.1):
dependencies:
zod: 3.24.1
zod@3.24.1: {}
zwitch@2.0.4: {}
+2 -3
View File
@@ -2,6 +2,5 @@ packages:
- docs
- packages/*
catalog:
'@gcornut/valibot-json-schema': ^0.42.0
'@typeschema/main': ^0.14.1
valibot: ^0.42.1
'@valibot/to-json-schema': ^1.0.0-beta.5
valibot: ^1.0.0-beta.14
+1
View File
@@ -14,6 +14,7 @@
{ "path": "./packages/tool/tsconfig.json" },
{ "path": "./packages/utils-stream/tsconfig.json" },
{ "path": "./packages/xsai/tsconfig.json" },
{ "path": "./packages/xsschema/tsconfig.json" },
{ "path": "./tsconfig.node.json" }
],
"files": []