@ai-sdk/valibot 0.1.28 → 1.0.0-alpha.2
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/CHANGELOG.md +125 -54
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,130 +1,201 @@
|
|
|
1
1
|
# @ai-sdk/valibot
|
|
2
2
|
|
|
3
|
-
## 0.
|
|
3
|
+
## 1.0.0-alpha.2
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
- ai@4.3.16
|
|
7
|
+
- @ai-sdk/provider-utils@3.0.0-alpha.2
|
|
9
8
|
|
|
10
|
-
## 0.1
|
|
9
|
+
## 1.0.0-alpha.1
|
|
11
10
|
|
|
12
11
|
### Patch Changes
|
|
13
12
|
|
|
14
|
-
- ai@
|
|
13
|
+
- @ai-sdk/provider-utils@3.0.0-alpha.1
|
|
15
14
|
|
|
16
|
-
## 0.
|
|
15
|
+
## 1.0.0-canary.21
|
|
17
16
|
|
|
18
17
|
### Patch Changes
|
|
19
18
|
|
|
20
|
-
- Updated dependencies [
|
|
21
|
-
- ai@
|
|
19
|
+
- Updated dependencies [faf8446]
|
|
20
|
+
- @ai-sdk/provider-utils@3.0.0-canary.19
|
|
22
21
|
|
|
23
|
-
## 0.
|
|
22
|
+
## 1.0.0-canary.20
|
|
24
23
|
|
|
25
24
|
### Patch Changes
|
|
26
25
|
|
|
27
|
-
-
|
|
26
|
+
- Updated dependencies [40acf9b]
|
|
27
|
+
- @ai-sdk/provider-utils@3.0.0-canary.18
|
|
28
28
|
|
|
29
|
-
## 0.
|
|
29
|
+
## 1.0.0-canary.19
|
|
30
30
|
|
|
31
31
|
### Patch Changes
|
|
32
32
|
|
|
33
|
-
- Updated dependencies [
|
|
34
|
-
-
|
|
35
|
-
- ai@4.3.12
|
|
33
|
+
- Updated dependencies [ea7a7c9]
|
|
34
|
+
- @ai-sdk/provider-utils@3.0.0-canary.17
|
|
36
35
|
|
|
37
|
-
## 0.
|
|
36
|
+
## 1.0.0-canary.18
|
|
38
37
|
|
|
39
38
|
### Patch Changes
|
|
40
39
|
|
|
41
|
-
-
|
|
40
|
+
- Updated dependencies [87b828f]
|
|
41
|
+
- @ai-sdk/provider-utils@3.0.0-canary.16
|
|
42
42
|
|
|
43
|
-
## 0.
|
|
43
|
+
## 1.0.0-canary.17
|
|
44
44
|
|
|
45
45
|
### Patch Changes
|
|
46
46
|
|
|
47
|
-
- Updated dependencies [
|
|
48
|
-
|
|
47
|
+
- Updated dependencies [a571d6e]
|
|
48
|
+
- Updated dependencies [41fa418]
|
|
49
|
+
- @ai-sdk/provider-utils@3.0.0-canary.15
|
|
49
50
|
|
|
50
|
-
## 0.
|
|
51
|
+
## 1.0.0-canary.16
|
|
51
52
|
|
|
52
53
|
### Patch Changes
|
|
53
54
|
|
|
54
|
-
- Updated dependencies [
|
|
55
|
-
- ai@
|
|
55
|
+
- Updated dependencies [957b739]
|
|
56
|
+
- @ai-sdk/provider-utils@3.0.0-canary.14
|
|
56
57
|
|
|
57
|
-
## 0.
|
|
58
|
+
## 1.0.0-canary.15
|
|
58
59
|
|
|
59
60
|
### Patch Changes
|
|
60
61
|
|
|
61
|
-
-
|
|
62
|
-
|
|
62
|
+
- 0ff02bb: chore(provider-utils): move over jsonSchema
|
|
63
|
+
- Updated dependencies [0ff02bb]
|
|
64
|
+
- @ai-sdk/provider-utils@3.0.0-canary.13
|
|
63
65
|
|
|
64
|
-
## 0.
|
|
66
|
+
## 1.0.0-canary.14
|
|
65
67
|
|
|
66
68
|
### Patch Changes
|
|
67
69
|
|
|
68
|
-
- Updated dependencies [
|
|
69
|
-
|
|
70
|
+
- Updated dependencies [9bf7291]
|
|
71
|
+
- Updated dependencies [4617fab]
|
|
72
|
+
- Updated dependencies [a76a62b]
|
|
73
|
+
- ai@5.0.0-canary.14
|
|
70
74
|
|
|
71
|
-
## 0.
|
|
75
|
+
## 1.0.0-canary.13
|
|
72
76
|
|
|
73
77
|
### Patch Changes
|
|
74
78
|
|
|
75
|
-
- Updated dependencies [
|
|
76
|
-
- Updated dependencies [
|
|
77
|
-
|
|
79
|
+
- Updated dependencies [14cb3be]
|
|
80
|
+
- Updated dependencies [66962ed]
|
|
81
|
+
- Updated dependencies [9301f86]
|
|
82
|
+
- ai@5.0.0-canary.13
|
|
78
83
|
|
|
79
|
-
## 0.
|
|
84
|
+
## 1.0.0-canary.12
|
|
80
85
|
|
|
81
86
|
### Patch Changes
|
|
82
87
|
|
|
83
|
-
-
|
|
84
|
-
- ai@4.3.5
|
|
88
|
+
- ai@5.0.0-canary.12
|
|
85
89
|
|
|
86
|
-
## 0.
|
|
90
|
+
## 1.0.0-canary.11
|
|
87
91
|
|
|
88
92
|
### Patch Changes
|
|
89
93
|
|
|
90
|
-
- Updated dependencies [
|
|
91
|
-
- ai@
|
|
94
|
+
- Updated dependencies [8e64e9c]
|
|
95
|
+
- ai@5.0.0-canary.11
|
|
92
96
|
|
|
93
|
-
## 0.
|
|
97
|
+
## 1.0.0-canary.10
|
|
94
98
|
|
|
95
99
|
### Patch Changes
|
|
96
100
|
|
|
97
|
-
- Updated dependencies [
|
|
98
|
-
- Updated dependencies [
|
|
99
|
-
- ai@
|
|
101
|
+
- Updated dependencies [d8aeaef]
|
|
102
|
+
- Updated dependencies [3e10408]
|
|
103
|
+
- ai@5.0.0-canary.10
|
|
100
104
|
|
|
101
|
-
## 0.
|
|
105
|
+
## 1.0.0-canary.9
|
|
102
106
|
|
|
103
107
|
### Patch Changes
|
|
104
108
|
|
|
105
|
-
- Updated dependencies [
|
|
106
|
-
|
|
109
|
+
- Updated dependencies [a847c3e]
|
|
110
|
+
- Updated dependencies [cb9c9e4]
|
|
111
|
+
- Updated dependencies [8aa9e20]
|
|
112
|
+
- Updated dependencies [b32e192]
|
|
113
|
+
- ai@5.0.0-canary.9
|
|
107
114
|
|
|
108
|
-
## 0.
|
|
115
|
+
## 1.0.0-canary.8
|
|
109
116
|
|
|
110
117
|
### Patch Changes
|
|
111
118
|
|
|
112
|
-
- Updated dependencies [
|
|
113
|
-
|
|
119
|
+
- Updated dependencies [5d1e3ba]
|
|
120
|
+
- Updated dependencies [26735b5]
|
|
121
|
+
- Updated dependencies [14c9410]
|
|
122
|
+
- Updated dependencies [7827a49]
|
|
123
|
+
- Updated dependencies [bd8a36c]
|
|
124
|
+
- Updated dependencies [b6f9f3c]
|
|
125
|
+
- Updated dependencies [92c8e66]
|
|
126
|
+
- Updated dependencies [fd65bc6]
|
|
127
|
+
- Updated dependencies [5bdff05]
|
|
128
|
+
- ai@5.0.0-canary.8
|
|
114
129
|
|
|
115
|
-
## 0.
|
|
130
|
+
## 1.0.0-canary.7
|
|
116
131
|
|
|
117
132
|
### Patch Changes
|
|
118
133
|
|
|
119
|
-
- Updated dependencies [
|
|
120
|
-
|
|
134
|
+
- Updated dependencies [0b78e17]
|
|
135
|
+
- Updated dependencies [6fba4c7]
|
|
136
|
+
- Updated dependencies [3e3b9df]
|
|
137
|
+
- Updated dependencies [1766ede]
|
|
138
|
+
- Updated dependencies [f10304b]
|
|
139
|
+
- ai@5.0.0-canary.7
|
|
121
140
|
|
|
122
|
-
## 0.
|
|
141
|
+
## 1.0.0-canary.6
|
|
123
142
|
|
|
124
143
|
### Patch Changes
|
|
125
144
|
|
|
126
|
-
-
|
|
127
|
-
|
|
145
|
+
- ai@5.0.0-canary.6
|
|
146
|
+
|
|
147
|
+
## 1.0.0-canary.5
|
|
148
|
+
|
|
149
|
+
### Patch Changes
|
|
150
|
+
|
|
151
|
+
- Updated dependencies [b71fe8d]
|
|
152
|
+
- Updated dependencies [d91b50d]
|
|
153
|
+
- ai@5.0.0-canary.5
|
|
154
|
+
|
|
155
|
+
## 1.0.0-canary.4
|
|
156
|
+
|
|
157
|
+
### Patch Changes
|
|
158
|
+
|
|
159
|
+
- Updated dependencies [e1cbf8a]
|
|
160
|
+
- Updated dependencies [225f087]
|
|
161
|
+
- Updated dependencies [a166433]
|
|
162
|
+
- Updated dependencies [0a87932]
|
|
163
|
+
- ai@5.0.0-canary.4
|
|
164
|
+
|
|
165
|
+
## 1.0.0-canary.3
|
|
166
|
+
|
|
167
|
+
### Patch Changes
|
|
168
|
+
|
|
169
|
+
- ai@5.0.0-canary.3
|
|
170
|
+
|
|
171
|
+
## 1.0.0-canary.2
|
|
172
|
+
|
|
173
|
+
### Patch Changes
|
|
174
|
+
|
|
175
|
+
- Updated dependencies [bd398e4]
|
|
176
|
+
- ai@5.0.0-canary.2
|
|
177
|
+
|
|
178
|
+
## 1.0.0-canary.1
|
|
179
|
+
|
|
180
|
+
### Patch Changes
|
|
181
|
+
|
|
182
|
+
- Updated dependencies [c22ad54]
|
|
183
|
+
- Updated dependencies [b7eae2d]
|
|
184
|
+
- Updated dependencies [a4f3007]
|
|
185
|
+
- ai@5.0.0-canary.1
|
|
186
|
+
|
|
187
|
+
## 1.0.0-canary.0
|
|
188
|
+
|
|
189
|
+
### Major Changes
|
|
190
|
+
|
|
191
|
+
- d5f588f: AI SDK 5
|
|
192
|
+
|
|
193
|
+
### Patch Changes
|
|
194
|
+
|
|
195
|
+
- Updated dependencies [d5f588f]
|
|
196
|
+
- Updated dependencies [9477ebb]
|
|
197
|
+
- Updated dependencies [8026705]
|
|
198
|
+
- ai@5.0.0-canary.0
|
|
128
199
|
|
|
129
200
|
## 0.1.10
|
|
130
201
|
|
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -36,10 +36,10 @@ module.exports = __toCommonJS(src_exports);
|
|
|
36
36
|
|
|
37
37
|
// src/valibot-schema.ts
|
|
38
38
|
var import_to_json_schema = require("@valibot/to-json-schema");
|
|
39
|
-
var
|
|
39
|
+
var import_provider_utils = require("@ai-sdk/provider-utils");
|
|
40
40
|
var v = __toESM(require("valibot"));
|
|
41
41
|
function valibotSchema(valibotSchema2) {
|
|
42
|
-
return (0,
|
|
42
|
+
return (0, import_provider_utils.jsonSchema)((0, import_to_json_schema.toJsonSchema)(valibotSchema2), {
|
|
43
43
|
validate: (value) => {
|
|
44
44
|
const result = v.safeParse(valibotSchema2, value);
|
|
45
45
|
return result.success ? { success: true, value: result.output } : { success: false, error: new v.ValiError(result.issues) };
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/valibot-schema.ts"],"sourcesContent":["export { valibotSchema } from './valibot-schema';\n","import { toJsonSchema as valibotToJsonSchema } from '@valibot/to-json-schema';\nimport { jsonSchema, Schema } from 'ai';\nimport * as v from 'valibot';\n\nexport function valibotSchema<OBJECT>(\n valibotSchema: v.GenericSchema<unknown, OBJECT>,\n): Schema<OBJECT> {\n return jsonSchema(valibotToJsonSchema(valibotSchema), {\n validate: value => {\n const result = v.safeParse(valibotSchema, value);\n return result.success\n ? { success: true, value: result.output }\n : { success: false, error: new v.ValiError(result.issues) };\n },\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,4BAAoD;AACpD,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/valibot-schema.ts"],"sourcesContent":["export { valibotSchema } from './valibot-schema';\n","import { toJsonSchema as valibotToJsonSchema } from '@valibot/to-json-schema';\nimport { jsonSchema, Schema } from '@ai-sdk/provider-utils';\nimport * as v from 'valibot';\n\nexport function valibotSchema<OBJECT>(\n valibotSchema: v.GenericSchema<unknown, OBJECT>,\n): Schema<OBJECT> {\n return jsonSchema(valibotToJsonSchema(valibotSchema), {\n validate: value => {\n const result = v.safeParse(valibotSchema, value);\n return result.success\n ? { success: true, value: result.output }\n : { success: false, error: new v.ValiError(result.issues) };\n },\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,4BAAoD;AACpD,4BAAmC;AACnC,QAAmB;AAEZ,SAAS,cACdA,gBACgB;AAChB,aAAO,sCAAW,sBAAAC,cAAoBD,cAAa,GAAG;AAAA,IACpD,UAAU,WAAS;AACjB,YAAM,SAAW,YAAUA,gBAAe,KAAK;AAC/C,aAAO,OAAO,UACV,EAAE,SAAS,MAAM,OAAO,OAAO,OAAO,IACtC,EAAE,SAAS,OAAO,OAAO,IAAM,YAAU,OAAO,MAAM,EAAE;AAAA,IAC9D;AAAA,EACF,CAAC;AACH;","names":["valibotSchema","valibotToJsonSchema"]}
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/valibot-schema.ts
|
|
2
2
|
import { toJsonSchema as valibotToJsonSchema } from "@valibot/to-json-schema";
|
|
3
|
-
import { jsonSchema } from "ai";
|
|
3
|
+
import { jsonSchema } from "@ai-sdk/provider-utils";
|
|
4
4
|
import * as v from "valibot";
|
|
5
5
|
function valibotSchema(valibotSchema2) {
|
|
6
6
|
return jsonSchema(valibotToJsonSchema(valibotSchema2), {
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/valibot-schema.ts"],"sourcesContent":["import { toJsonSchema as valibotToJsonSchema } from '@valibot/to-json-schema';\nimport { jsonSchema, Schema } from 'ai';\nimport * as v from 'valibot';\n\nexport function valibotSchema<OBJECT>(\n valibotSchema: v.GenericSchema<unknown, OBJECT>,\n): Schema<OBJECT> {\n return jsonSchema(valibotToJsonSchema(valibotSchema), {\n validate: value => {\n const result = v.safeParse(valibotSchema, value);\n return result.success\n ? { success: true, value: result.output }\n : { success: false, error: new v.ValiError(result.issues) };\n },\n });\n}\n"],"mappings":";AAAA,SAAS,gBAAgB,2BAA2B;AACpD,SAAS,kBAA0B;AACnC,YAAY,OAAO;AAEZ,SAAS,cACdA,gBACgB;AAChB,SAAO,WAAW,oBAAoBA,cAAa,GAAG;AAAA,IACpD,UAAU,WAAS;AACjB,YAAM,SAAW,YAAUA,gBAAe,KAAK;AAC/C,aAAO,OAAO,UACV,EAAE,SAAS,MAAM,OAAO,OAAO,OAAO,IACtC,EAAE,SAAS,OAAO,OAAO,IAAM,YAAU,OAAO,MAAM,EAAE;AAAA,IAC9D;AAAA,EACF,CAAC;AACH;","names":["valibotSchema"]}
|
|
1
|
+
{"version":3,"sources":["../src/valibot-schema.ts"],"sourcesContent":["import { toJsonSchema as valibotToJsonSchema } from '@valibot/to-json-schema';\nimport { jsonSchema, Schema } from '@ai-sdk/provider-utils';\nimport * as v from 'valibot';\n\nexport function valibotSchema<OBJECT>(\n valibotSchema: v.GenericSchema<unknown, OBJECT>,\n): Schema<OBJECT> {\n return jsonSchema(valibotToJsonSchema(valibotSchema), {\n validate: value => {\n const result = v.safeParse(valibotSchema, value);\n return result.success\n ? { success: true, value: result.output }\n : { success: false, error: new v.ValiError(result.issues) };\n },\n });\n}\n"],"mappings":";AAAA,SAAS,gBAAgB,2BAA2B;AACpD,SAAS,kBAA0B;AACnC,YAAY,OAAO;AAEZ,SAAS,cACdA,gBACgB;AAChB,SAAO,WAAW,oBAAoBA,cAAa,GAAG;AAAA,IACpD,UAAU,WAAS;AACjB,YAAM,SAAW,YAAUA,gBAAe,KAAK;AAC/C,aAAO,OAAO,UACV,EAAE,SAAS,MAAM,OAAO,OAAO,OAAO,IACtC,EAAE,SAAS,OAAO,OAAO,IAAM,YAAU,OAAO,MAAM,EAAE;AAAA,IAC9D;AAAA,EACF,CAAC;AACH;","names":["valibotSchema"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-sdk/valibot",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0-alpha.2",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"ai": "
|
|
22
|
+
"@ai-sdk/provider-utils": "3.0.0-alpha.2"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/node": "20.17.24",
|
|
26
26
|
"tsup": "^8",
|
|
27
|
-
"typescript": "5.
|
|
27
|
+
"typescript": "5.8.3",
|
|
28
28
|
"valibot": "^1.0.0-rc.0 || ^1.0.0",
|
|
29
29
|
"@vercel/ai-tsconfig": "0.0.0"
|
|
30
30
|
},
|
|
@@ -50,11 +50,11 @@
|
|
|
50
50
|
"ai"
|
|
51
51
|
],
|
|
52
52
|
"scripts": {
|
|
53
|
-
"build": "tsup",
|
|
54
|
-
"build:watch": "tsup --watch",
|
|
55
|
-
"clean": "rm -rf dist",
|
|
53
|
+
"build": "pnpm clean && tsup --tsconfig tsconfig.build.json",
|
|
54
|
+
"build:watch": "pnpm clean && tsup --watch",
|
|
55
|
+
"clean": "rm -rf dist *.tsbuildinfo",
|
|
56
56
|
"lint": "eslint \"./**/*.ts*\"",
|
|
57
|
-
"type-check": "tsc --
|
|
57
|
+
"type-check": "tsc --build",
|
|
58
58
|
"prettier-check": "prettier --check \"./**/*.ts*\""
|
|
59
59
|
}
|
|
60
60
|
}
|