@ykdz/template 0.0.38 → 0.0.41

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.
Files changed (227) hide show
  1. package/dist/application.d.ts +1 -52
  2. package/dist/application.js +0 -81
  3. package/dist/cli.js +14 -28
  4. package/dist/input-schemas.d.ts +30 -0
  5. package/dist/input-schemas.js +75 -0
  6. package/dist/main.d.ts +3 -14
  7. package/dist/main.js +496 -378
  8. package/dist/result-schemas.d.ts +222 -0
  9. package/dist/result-schemas.js +74 -0
  10. package/dist/standard-schema.d.ts +3 -0
  11. package/dist/standard-schema.js +29 -0
  12. package/node_modules/@standard-schema/spec/LICENSE +21 -0
  13. package/node_modules/@standard-schema/spec/README.md +198 -0
  14. package/node_modules/@standard-schema/spec/dist/index.cjs +18 -0
  15. package/node_modules/@standard-schema/spec/dist/index.d.cts +119 -0
  16. package/node_modules/@standard-schema/spec/dist/index.d.ts +119 -0
  17. package/node_modules/@standard-schema/spec/dist/index.js +0 -0
  18. package/node_modules/@standard-schema/spec/package.json +52 -0
  19. package/node_modules/@types/node/LICENSE +21 -0
  20. package/node_modules/@types/node/README.md +15 -0
  21. package/node_modules/@types/node/assert/strict.d.ts +111 -0
  22. package/node_modules/@types/node/assert.d.ts +1115 -0
  23. package/node_modules/@types/node/async_hooks.d.ts +619 -0
  24. package/node_modules/@types/node/buffer.buffer.d.ts +477 -0
  25. package/node_modules/@types/node/buffer.d.ts +1941 -0
  26. package/node_modules/@types/node/child_process.d.ts +1480 -0
  27. package/node_modules/@types/node/cluster.d.ts +578 -0
  28. package/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
  29. package/node_modules/@types/node/console.d.ts +453 -0
  30. package/node_modules/@types/node/constants.d.ts +21 -0
  31. package/node_modules/@types/node/crypto.d.ts +5484 -0
  32. package/node_modules/@types/node/dgram.d.ts +715 -0
  33. package/node_modules/@types/node/diagnostics_channel.d.ts +576 -0
  34. package/node_modules/@types/node/dns/promises.d.ts +503 -0
  35. package/node_modules/@types/node/dns.d.ts +923 -0
  36. package/node_modules/@types/node/domain.d.ts +166 -0
  37. package/node_modules/@types/node/events.d.ts +967 -0
  38. package/node_modules/@types/node/fs/promises.d.ts +1354 -0
  39. package/node_modules/@types/node/fs.d.ts +4777 -0
  40. package/node_modules/@types/node/globals.d.ts +170 -0
  41. package/node_modules/@types/node/globals.typedarray.d.ts +41 -0
  42. package/node_modules/@types/node/http.d.ts +2246 -0
  43. package/node_modules/@types/node/http2.d.ts +2882 -0
  44. package/node_modules/@types/node/https.d.ts +585 -0
  45. package/node_modules/@types/node/index.d.ts +101 -0
  46. package/node_modules/@types/node/inspector.d.ts +323 -0
  47. package/node_modules/@types/node/inspector.generated.d.ts +4406 -0
  48. package/node_modules/@types/node/module.d.ts +844 -0
  49. package/node_modules/@types/node/net.d.ts +1197 -0
  50. package/node_modules/@types/node/os.d.ts +507 -0
  51. package/node_modules/@types/node/package.json +140 -0
  52. package/node_modules/@types/node/path.d.ts +200 -0
  53. package/node_modules/@types/node/perf_hooks.d.ts +1054 -0
  54. package/node_modules/@types/node/process.d.ts +2101 -0
  55. package/node_modules/@types/node/punycode.d.ts +117 -0
  56. package/node_modules/@types/node/querystring.d.ts +152 -0
  57. package/node_modules/@types/node/readline/promises.d.ts +161 -0
  58. package/node_modules/@types/node/readline.d.ts +600 -0
  59. package/node_modules/@types/node/repl.d.ts +438 -0
  60. package/node_modules/@types/node/sea.d.ts +162 -0
  61. package/node_modules/@types/node/sqlite.d.ts +1182 -0
  62. package/node_modules/@types/node/stream/consumers.d.ts +45 -0
  63. package/node_modules/@types/node/stream/promises.d.ts +90 -0
  64. package/node_modules/@types/node/stream/web.d.ts +596 -0
  65. package/node_modules/@types/node/stream.d.ts +1707 -0
  66. package/node_modules/@types/node/string_decoder.d.ts +67 -0
  67. package/node_modules/@types/node/test.d.ts +2656 -0
  68. package/node_modules/@types/node/timers/promises.d.ts +108 -0
  69. package/node_modules/@types/node/timers.d.ts +285 -0
  70. package/node_modules/@types/node/tls.d.ts +1314 -0
  71. package/node_modules/@types/node/trace_events.d.ts +197 -0
  72. package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +473 -0
  73. package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
  74. package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +36 -0
  75. package/node_modules/@types/node/ts5.6/index.d.ts +103 -0
  76. package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
  77. package/node_modules/@types/node/ts5.7/index.d.ts +103 -0
  78. package/node_modules/@types/node/tty.d.ts +209 -0
  79. package/node_modules/@types/node/url.d.ts +1103 -0
  80. package/node_modules/@types/node/util.d.ts +2376 -0
  81. package/node_modules/@types/node/v8.d.ts +1010 -0
  82. package/node_modules/@types/node/vm.d.ts +1160 -0
  83. package/node_modules/@types/node/wasi.d.ts +202 -0
  84. package/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
  85. package/node_modules/@types/node/web-globals/crypto.d.ts +32 -0
  86. package/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
  87. package/node_modules/@types/node/web-globals/events.d.ts +97 -0
  88. package/node_modules/@types/node/web-globals/fetch.d.ts +62 -0
  89. package/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
  90. package/node_modules/@types/node/web-globals/storage.d.ts +24 -0
  91. package/node_modules/@types/node/web-globals/streams.d.ts +22 -0
  92. package/node_modules/@types/node/worker_threads.d.ts +894 -0
  93. package/node_modules/@types/node/zlib.d.ts +768 -0
  94. package/node_modules/@valibot/to-json-schema/LICENSE.md +9 -0
  95. package/node_modules/@valibot/to-json-schema/README.md +475 -0
  96. package/node_modules/@valibot/to-json-schema/dist/index.cjs +800 -0
  97. package/node_modules/@valibot/to-json-schema/dist/index.d.cts +991 -0
  98. package/node_modules/@valibot/to-json-schema/dist/index.d.mts +991 -0
  99. package/node_modules/@valibot/to-json-schema/dist/index.min.cjs +1 -0
  100. package/node_modules/@valibot/to-json-schema/dist/index.min.mjs +1 -0
  101. package/node_modules/@valibot/to-json-schema/dist/index.mjs +795 -0
  102. package/node_modules/@valibot/to-json-schema/package.json +75 -0
  103. package/node_modules/@ykdz/cli-contract/LICENSE +21 -0
  104. package/node_modules/@ykdz/cli-contract/dist/atomic-variant-compiler.d.ts +17 -0
  105. package/node_modules/@ykdz/cli-contract/dist/atomic-variant-compiler.js +55 -0
  106. package/node_modules/@ykdz/cli-contract/dist/cli-contract.d.ts +1164 -0
  107. package/node_modules/@ykdz/cli-contract/dist/cli-contract.js +1408 -0
  108. package/node_modules/@ykdz/cli-contract/dist/cli-execution.d.ts +54 -0
  109. package/node_modules/@ykdz/cli-contract/dist/cli-execution.js +708 -0
  110. package/node_modules/@ykdz/cli-contract/dist/cli-invocation.d.ts +174 -0
  111. package/node_modules/@ykdz/cli-contract/dist/cli-invocation.js +524 -0
  112. package/node_modules/@ykdz/cli-contract/dist/cli-write-error.d.ts +10 -0
  113. package/node_modules/@ykdz/cli-contract/dist/cli-write-error.js +14 -0
  114. package/node_modules/@ykdz/cli-contract/dist/contract-definition-error.d.ts +260 -0
  115. package/node_modules/@ykdz/cli-contract/dist/contract-definition-error.js +130 -0
  116. package/node_modules/@ykdz/cli-contract/dist/contract-execution-error.d.ts +63 -0
  117. package/node_modules/@ykdz/cli-contract/dist/contract-execution-error.js +17 -0
  118. package/node_modules/@ykdz/cli-contract/dist/contract-schema-compiler.d.ts +6 -0
  119. package/node_modules/@ykdz/cli-contract/dist/contract-schema-compiler.js +532 -0
  120. package/node_modules/@ykdz/cli-contract/dist/contract-schema.d.ts +14 -0
  121. package/node_modules/@ykdz/cli-contract/dist/contract-schema.js +1 -0
  122. package/node_modules/@ykdz/cli-contract/dist/description.d.ts +2 -0
  123. package/node_modules/@ykdz/cli-contract/dist/description.js +13 -0
  124. package/node_modules/@ykdz/cli-contract/dist/index.d.ts +8 -0
  125. package/node_modules/@ykdz/cli-contract/dist/index.js +7 -0
  126. package/node_modules/@ykdz/cli-contract/dist/json-value.d.ts +4 -0
  127. package/node_modules/@ykdz/cli-contract/dist/json-value.js +64 -0
  128. package/node_modules/@ykdz/cli-contract/dist/node.d.ts +21 -0
  129. package/node_modules/@ykdz/cli-contract/dist/node.js +109 -0
  130. package/node_modules/@ykdz/cli-contract/dist/outcome-fact.d.ts +162 -0
  131. package/node_modules/@ykdz/cli-contract/dist/outcome-fact.js +113 -0
  132. package/node_modules/@ykdz/cli-contract/dist/outcome-wire.d.ts +53 -0
  133. package/node_modules/@ykdz/cli-contract/dist/outcome-wire.js +189 -0
  134. package/node_modules/@ykdz/cli-contract/dist/stream-variant-compiler.d.ts +16 -0
  135. package/node_modules/@ykdz/cli-contract/dist/stream-variant-compiler.js +45 -0
  136. package/node_modules/@ykdz/cli-contract/package.json +69 -0
  137. package/node_modules/@ykdz/template-builtin-presets/dist/src/foundation.d.ts +20 -0
  138. package/node_modules/@ykdz/template-builtin-presets/dist/src/foundation.js +38 -2
  139. package/node_modules/@ykdz/template-builtin-presets/dist/src/generation-record.d.ts +19 -0
  140. package/node_modules/@ykdz/template-builtin-presets/dist/src/generation-record.js +1 -1
  141. package/node_modules/@ykdz/template-builtin-presets/dist/src/index.d.ts +2 -1
  142. package/node_modules/@ykdz/template-builtin-presets/dist/src/index.js +2 -1
  143. package/node_modules/@ykdz/template-builtin-presets/dist/src/ts-cli/definition.js +9 -5
  144. package/node_modules/@ykdz/template-builtin-presets/package.json +2 -1
  145. package/node_modules/@ykdz/template-builtin-presets/templates/foundation/AGENTS.md.template +5 -3
  146. package/node_modules/@ykdz/template-builtin-presets/templates/{shared/devcontainer/node-pnpm.Dockerfile → foundation/devcontainer/base.Dockerfile} +14 -1
  147. package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/devcontainer/rust.Dockerfile +1 -5
  148. package/node_modules/@ykdz/template-builtin-presets/templates/shared/devcontainer/github-cli.Dockerfile +1 -3
  149. package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/artifact.ts +128 -59
  150. package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/handoff.ts +80 -8
  151. package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/readiness.ts +7 -3
  152. package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/src/cli.ts +9 -19
  153. package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/src/main.ts +144 -60
  154. package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/src/standard-schema.ts +37 -0
  155. package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/test/e2e/journeys/lookup.journey.ts +71 -0
  156. package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/test/integration/command.test.ts +118 -59
  157. package/node_modules/@ykdz/template-core/dist/dependency-catalog.d.ts +0 -1
  158. package/node_modules/@ykdz/template-core/dist/dependency-catalog.js +0 -19
  159. package/node_modules/@ykdz/template-core/dist/pnpm-workspace.yaml +3 -2
  160. package/node_modules/@ykdz/template-core/dist/project-blueprint.d.ts +15 -0
  161. package/node_modules/@ykdz/template-core/dist/project-blueprint.js +1 -1
  162. package/node_modules/@ykdz/template-core/dist/project-github.d.ts +0 -59
  163. package/node_modules/@ykdz/template-core/dist/project-github.js +0 -67
  164. package/node_modules/undici-types/LICENSE +21 -0
  165. package/node_modules/undici-types/README.md +6 -0
  166. package/node_modules/undici-types/agent.d.ts +32 -0
  167. package/node_modules/undici-types/api.d.ts +43 -0
  168. package/node_modules/undici-types/balanced-pool.d.ts +30 -0
  169. package/node_modules/undici-types/cache-interceptor.d.ts +179 -0
  170. package/node_modules/undici-types/cache.d.ts +36 -0
  171. package/node_modules/undici-types/client-stats.d.ts +15 -0
  172. package/node_modules/undici-types/client.d.ts +123 -0
  173. package/node_modules/undici-types/connector.d.ts +36 -0
  174. package/node_modules/undici-types/content-type.d.ts +21 -0
  175. package/node_modules/undici-types/cookies.d.ts +30 -0
  176. package/node_modules/undici-types/diagnostics-channel.d.ts +74 -0
  177. package/node_modules/undici-types/dispatcher.d.ts +279 -0
  178. package/node_modules/undici-types/env-http-proxy-agent.d.ts +22 -0
  179. package/node_modules/undici-types/errors.d.ts +177 -0
  180. package/node_modules/undici-types/eventsource.d.ts +66 -0
  181. package/node_modules/undici-types/fetch.d.ts +211 -0
  182. package/node_modules/undici-types/formdata.d.ts +108 -0
  183. package/node_modules/undici-types/global-dispatcher.d.ts +9 -0
  184. package/node_modules/undici-types/global-origin.d.ts +7 -0
  185. package/node_modules/undici-types/h2c-client.d.ts +73 -0
  186. package/node_modules/undici-types/handlers.d.ts +15 -0
  187. package/node_modules/undici-types/header.d.ts +160 -0
  188. package/node_modules/undici-types/index.d.ts +91 -0
  189. package/node_modules/undici-types/interceptors.d.ts +80 -0
  190. package/node_modules/undici-types/mock-agent.d.ts +68 -0
  191. package/node_modules/undici-types/mock-call-history.d.ts +111 -0
  192. package/node_modules/undici-types/mock-client.d.ts +27 -0
  193. package/node_modules/undici-types/mock-errors.d.ts +12 -0
  194. package/node_modules/undici-types/mock-interceptor.d.ts +94 -0
  195. package/node_modules/undici-types/mock-pool.d.ts +27 -0
  196. package/node_modules/undici-types/package.json +55 -0
  197. package/node_modules/undici-types/patch.d.ts +29 -0
  198. package/node_modules/undici-types/pool-stats.d.ts +19 -0
  199. package/node_modules/undici-types/pool.d.ts +41 -0
  200. package/node_modules/undici-types/proxy-agent.d.ts +29 -0
  201. package/node_modules/undici-types/readable.d.ts +68 -0
  202. package/node_modules/undici-types/retry-agent.d.ts +8 -0
  203. package/node_modules/undici-types/retry-handler.d.ts +125 -0
  204. package/node_modules/undici-types/round-robin-pool.d.ts +41 -0
  205. package/node_modules/undici-types/snapshot-agent.d.ts +109 -0
  206. package/node_modules/undici-types/socks5-proxy-agent.d.ts +25 -0
  207. package/node_modules/undici-types/util.d.ts +18 -0
  208. package/node_modules/undici-types/utility.d.ts +7 -0
  209. package/node_modules/undici-types/webidl.d.ts +347 -0
  210. package/node_modules/undici-types/websocket.d.ts +188 -0
  211. package/package.json +5 -3
  212. package/dist/command-result.d.ts +0 -9
  213. package/dist/command-result.js +0 -231
  214. package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/test/e2e/journeys/greet.journey.ts +0 -46
  215. package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/test/unit/greet.test.ts +0 -15
  216. package/node_modules/commander/LICENSE +0 -22
  217. package/node_modules/commander/Readme.md +0 -1172
  218. package/node_modules/commander/index.js +0 -21
  219. package/node_modules/commander/lib/argument.js +0 -147
  220. package/node_modules/commander/lib/command.js +0 -2790
  221. package/node_modules/commander/lib/error.js +0 -36
  222. package/node_modules/commander/lib/help.js +0 -731
  223. package/node_modules/commander/lib/option.js +0 -377
  224. package/node_modules/commander/lib/suggestSimilar.js +0 -99
  225. package/node_modules/commander/package-support.json +0 -19
  226. package/node_modules/commander/package.json +0 -64
  227. package/node_modules/commander/typings/index.d.ts +0 -1113
@@ -0,0 +1,991 @@
1
+ //#region ../../library/src/types/metadata.d.ts
2
+ /**
3
+ * Base metadata interface.
4
+ */
5
+ interface BaseMetadata<TInput$1> {
6
+ /**
7
+ * The object kind.
8
+ */
9
+ readonly kind: "metadata";
10
+ /**
11
+ * The metadata type.
12
+ */
13
+ readonly type: string;
14
+ /**
15
+ * The metadata reference.
16
+ */
17
+ readonly reference: (...args: any[]) => BaseMetadata<any>;
18
+ /**
19
+ * The input, output and issue type.
20
+ *
21
+ * @internal
22
+ */
23
+ readonly "~types"?: {
24
+ readonly input: TInput$1;
25
+ readonly output: TInput$1;
26
+ readonly issue: never;
27
+ } | undefined;
28
+ }
29
+ //#endregion
30
+ //#region ../../library/src/types/dataset.d.ts
31
+ /**
32
+ * Unknown dataset interface.
33
+ */
34
+ interface UnknownDataset {
35
+ /**
36
+ * Whether it's typed.
37
+ */
38
+ typed?: false;
39
+ /**
40
+ * The dataset value.
41
+ */
42
+ value: unknown;
43
+ /**
44
+ * The dataset issues.
45
+ */
46
+ issues?: undefined;
47
+ }
48
+ /**
49
+ * Success dataset interface.
50
+ */
51
+ interface SuccessDataset<TValue$1> {
52
+ /**
53
+ * Whether it's typed.
54
+ */
55
+ typed: true;
56
+ /**
57
+ * The dataset value.
58
+ */
59
+ value: TValue$1;
60
+ /**
61
+ * The dataset issues.
62
+ */
63
+ issues?: undefined;
64
+ }
65
+ /**
66
+ * Partial dataset interface.
67
+ */
68
+ interface PartialDataset<TValue$1, TIssue extends BaseIssue<unknown>> {
69
+ /**
70
+ * Whether it's typed.
71
+ */
72
+ typed: true;
73
+ /**
74
+ * The dataset value.
75
+ */
76
+ value: TValue$1;
77
+ /**
78
+ * The dataset issues.
79
+ */
80
+ issues: [TIssue, ...TIssue[]];
81
+ }
82
+ /**
83
+ * Failure dataset interface.
84
+ */
85
+ interface FailureDataset<TIssue extends BaseIssue<unknown>> {
86
+ /**
87
+ * Whether it's typed.
88
+ */
89
+ typed: false;
90
+ /**
91
+ * The dataset value.
92
+ */
93
+ value: unknown;
94
+ /**
95
+ * The dataset issues.
96
+ */
97
+ issues: [TIssue, ...TIssue[]];
98
+ }
99
+ /**
100
+ * Output dataset type.
101
+ */
102
+ type OutputDataset<TValue$1, TIssue extends BaseIssue<unknown>> = SuccessDataset<TValue$1> | PartialDataset<TValue$1, TIssue> | FailureDataset<TIssue>;
103
+ //#endregion
104
+ //#region ../../library/src/types/standard.d.ts
105
+ /**
106
+ * The Standard Schema properties interface.
107
+ */
108
+ interface StandardProps<TInput$1, TOutput> {
109
+ /**
110
+ * The version number of the standard.
111
+ */
112
+ readonly version: 1;
113
+ /**
114
+ * The vendor name of the schema library.
115
+ */
116
+ readonly vendor: "valibot";
117
+ /**
118
+ * Validates unknown input values.
119
+ */
120
+ readonly validate: (value: unknown) => StandardResult<TOutput> | Promise<StandardResult<TOutput>>;
121
+ /**
122
+ * Inferred types associated with the schema.
123
+ */
124
+ readonly types?: StandardTypes<TInput$1, TOutput> | undefined;
125
+ }
126
+ /**
127
+ * The result interface of the validate function.
128
+ */
129
+ type StandardResult<TOutput> = StandardSuccessResult<TOutput> | StandardFailureResult;
130
+ /**
131
+ * The result interface if validation succeeds.
132
+ */
133
+ interface StandardSuccessResult<TOutput> {
134
+ /**
135
+ * The typed output value.
136
+ */
137
+ readonly value: TOutput;
138
+ /**
139
+ * The non-existent issues.
140
+ */
141
+ readonly issues?: undefined;
142
+ }
143
+ /**
144
+ * The result interface if validation fails.
145
+ */
146
+ interface StandardFailureResult {
147
+ /**
148
+ * The issues of failed validation.
149
+ */
150
+ readonly issues: readonly StandardIssue[];
151
+ }
152
+ /**
153
+ * The issue interface of the failure output.
154
+ */
155
+ interface StandardIssue {
156
+ /**
157
+ * The error message of the issue.
158
+ */
159
+ readonly message: string;
160
+ /**
161
+ * The path of the issue, if any.
162
+ */
163
+ readonly path?: readonly (PropertyKey | StandardPathItem)[] | undefined;
164
+ }
165
+ /**
166
+ * The path item interface of the issue.
167
+ */
168
+ interface StandardPathItem {
169
+ /**
170
+ * The key of the path item.
171
+ */
172
+ readonly key: PropertyKey;
173
+ }
174
+ /**
175
+ * The Standard Schema types interface.
176
+ */
177
+ interface StandardTypes<TInput$1, TOutput> {
178
+ /**
179
+ * The input type of the schema.
180
+ */
181
+ readonly input: TInput$1;
182
+ /**
183
+ * The output type of the schema.
184
+ */
185
+ readonly output: TOutput;
186
+ }
187
+ //#endregion
188
+ //#region ../../library/src/types/schema.d.ts
189
+ /**
190
+ * Base schema interface.
191
+ */
192
+ interface BaseSchema<TInput$1, TOutput, TIssue extends BaseIssue<unknown>> {
193
+ /**
194
+ * The object kind.
195
+ */
196
+ readonly kind: "schema";
197
+ /**
198
+ * The schema type.
199
+ */
200
+ readonly type: string;
201
+ /**
202
+ * The schema reference.
203
+ */
204
+ readonly reference: (...args: any[]) => BaseSchema<unknown, unknown, BaseIssue<unknown>>;
205
+ /**
206
+ * The expected property.
207
+ */
208
+ readonly expects: string;
209
+ /**
210
+ * Whether it's async.
211
+ */
212
+ readonly async: false;
213
+ /**
214
+ * The Standard Schema properties.
215
+ *
216
+ * @internal
217
+ */
218
+ readonly "~standard": StandardProps<TInput$1, TOutput>;
219
+ /**
220
+ * Parses unknown input values.
221
+ *
222
+ * @param dataset The input dataset.
223
+ * @param config The configuration.
224
+ *
225
+ * @returns The output dataset.
226
+ *
227
+ * @internal
228
+ */
229
+ readonly "~run": (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => OutputDataset<TOutput, TIssue>;
230
+ /**
231
+ * The input, output and issue type.
232
+ *
233
+ * @internal
234
+ */
235
+ readonly "~types"?: {
236
+ readonly input: TInput$1;
237
+ readonly output: TOutput;
238
+ readonly issue: TIssue;
239
+ } | undefined;
240
+ }
241
+ /**
242
+ * Base schema async interface.
243
+ */
244
+ interface BaseSchemaAsync<TInput$1, TOutput, TIssue extends BaseIssue<unknown>> extends Omit<BaseSchema<TInput$1, TOutput, TIssue>, "reference" | "async" | "~run"> {
245
+ /**
246
+ * The schema reference.
247
+ */
248
+ readonly reference: (...args: any[]) => BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>;
249
+ /**
250
+ * Whether it's async.
251
+ */
252
+ readonly async: true;
253
+ /**
254
+ * Parses unknown input values.
255
+ *
256
+ * @param dataset The input dataset.
257
+ * @param config The configuration.
258
+ *
259
+ * @returns The output dataset.
260
+ *
261
+ * @internal
262
+ */
263
+ readonly "~run": (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => Promise<OutputDataset<TOutput, TIssue>>;
264
+ }
265
+ //#endregion
266
+ //#region ../../library/src/types/transformation.d.ts
267
+ /**
268
+ * Base transformation interface.
269
+ */
270
+ interface BaseTransformation<TInput$1, TOutput, TIssue extends BaseIssue<unknown>> {
271
+ /**
272
+ * The object kind.
273
+ */
274
+ readonly kind: "transformation";
275
+ /**
276
+ * The transformation type.
277
+ */
278
+ readonly type: string;
279
+ /**
280
+ * The transformation reference.
281
+ */
282
+ readonly reference: (...args: any[]) => BaseTransformation<any, any, BaseIssue<unknown>>;
283
+ /**
284
+ * Whether it's async.
285
+ */
286
+ readonly async: false;
287
+ /**
288
+ * Transforms known input values.
289
+ *
290
+ * @param dataset The input dataset.
291
+ * @param config The configuration.
292
+ *
293
+ * @returns The output dataset.
294
+ *
295
+ * @internal
296
+ */
297
+ readonly "~run": (dataset: SuccessDataset<TInput$1>, config: Config<BaseIssue<unknown>>) => OutputDataset<TOutput, BaseIssue<unknown> | TIssue>;
298
+ /**
299
+ * The input, output and issue type.
300
+ *
301
+ * @internal
302
+ */
303
+ readonly "~types"?: {
304
+ readonly input: TInput$1;
305
+ readonly output: TOutput;
306
+ readonly issue: TIssue;
307
+ } | undefined;
308
+ }
309
+ /**
310
+ * Base transformation async interface.
311
+ */
312
+ interface BaseTransformationAsync<TInput$1, TOutput, TIssue extends BaseIssue<unknown>> extends Omit<BaseTransformation<TInput$1, TOutput, TIssue>, "reference" | "async" | "~run"> {
313
+ /**
314
+ * The transformation reference.
315
+ */
316
+ readonly reference: (...args: any[]) => BaseTransformation<any, any, BaseIssue<unknown>> | BaseTransformationAsync<any, any, BaseIssue<unknown>>;
317
+ /**
318
+ * Whether it's async.
319
+ */
320
+ readonly async: true;
321
+ /**
322
+ * Transforms known input values.
323
+ *
324
+ * @param dataset The input dataset.
325
+ * @param config The configuration.
326
+ *
327
+ * @returns The output dataset.
328
+ *
329
+ * @internal
330
+ */
331
+ readonly "~run": (dataset: SuccessDataset<TInput$1>, config: Config<BaseIssue<unknown>>) => Promise<OutputDataset<TOutput, BaseIssue<unknown> | TIssue>>;
332
+ }
333
+ //#endregion
334
+ //#region ../../library/src/types/validation.d.ts
335
+ /**
336
+ * Base validation interface.
337
+ */
338
+ interface BaseValidation<TInput$1, TOutput, TIssue extends BaseIssue<unknown>> {
339
+ /**
340
+ * The object kind.
341
+ */
342
+ readonly kind: "validation";
343
+ /**
344
+ * The validation type.
345
+ */
346
+ readonly type: string;
347
+ /**
348
+ * The validation reference.
349
+ */
350
+ readonly reference: (...args: any[]) => BaseValidation<any, any, BaseIssue<unknown>>;
351
+ /**
352
+ * The expected property.
353
+ */
354
+ readonly expects: string | null;
355
+ /**
356
+ * Whether it's async.
357
+ */
358
+ readonly async: false;
359
+ /**
360
+ * Validates known input values.
361
+ *
362
+ * @param dataset The input dataset.
363
+ * @param config The configuration.
364
+ *
365
+ * @returns The output dataset.
366
+ *
367
+ * @internal
368
+ */
369
+ readonly "~run": (dataset: OutputDataset<TInput$1, BaseIssue<unknown>>, config: Config<BaseIssue<unknown>>) => OutputDataset<TOutput, BaseIssue<unknown> | TIssue>;
370
+ /**
371
+ * The input, output and issue type.
372
+ *
373
+ * @internal
374
+ */
375
+ readonly "~types"?: {
376
+ readonly input: TInput$1;
377
+ readonly output: TOutput;
378
+ readonly issue: TIssue;
379
+ } | undefined;
380
+ }
381
+ /**
382
+ * Base validation async interface.
383
+ */
384
+ interface BaseValidationAsync<TInput$1, TOutput, TIssue extends BaseIssue<unknown>> extends Omit<BaseValidation<TInput$1, TOutput, TIssue>, "reference" | "async" | "~run"> {
385
+ /**
386
+ * The validation reference.
387
+ */
388
+ readonly reference: (...args: any[]) => BaseValidation<any, any, BaseIssue<unknown>> | BaseValidationAsync<any, any, BaseIssue<unknown>>;
389
+ /**
390
+ * Whether it's async.
391
+ */
392
+ readonly async: true;
393
+ /**
394
+ * Validates known input values.
395
+ *
396
+ * @param dataset The input dataset.
397
+ * @param config The configuration.
398
+ *
399
+ * @returns The output dataset.
400
+ *
401
+ * @internal
402
+ */
403
+ readonly "~run": (dataset: OutputDataset<TInput$1, BaseIssue<unknown>>, config: Config<BaseIssue<unknown>>) => Promise<OutputDataset<TOutput, BaseIssue<unknown> | TIssue>>;
404
+ }
405
+ //#endregion
406
+ //#region ../../library/src/types/infer.d.ts
407
+ /**
408
+ * Infer input type.
409
+ */
410
+ type InferInput<TItem$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>> | BaseValidation<any, unknown, BaseIssue<unknown>> | BaseValidationAsync<any, unknown, BaseIssue<unknown>> | BaseTransformation<any, unknown, BaseIssue<unknown>> | BaseTransformationAsync<any, unknown, BaseIssue<unknown>> | BaseMetadata<any>> = NonNullable<TItem$1["~types"]>["input"];
411
+ /**
412
+ * Infer output type.
413
+ */
414
+ type InferOutput<TItem$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>> | BaseValidation<any, unknown, BaseIssue<unknown>> | BaseValidationAsync<any, unknown, BaseIssue<unknown>> | BaseTransformation<any, unknown, BaseIssue<unknown>> | BaseTransformationAsync<any, unknown, BaseIssue<unknown>> | BaseMetadata<any>> = NonNullable<TItem$1["~types"]>["output"];
415
+ //#endregion
416
+ //#region ../../library/src/types/utils.d.ts
417
+ /**
418
+ * Constructs a type that is maybe readonly.
419
+ */
420
+ type MaybeReadonly<TValue$1> = TValue$1 | Readonly<TValue$1>;
421
+ //#endregion
422
+ //#region ../../library/src/types/other.d.ts
423
+ /**
424
+ * Error message type.
425
+ */
426
+ type ErrorMessage<TIssue extends BaseIssue<unknown>> = ((issue: TIssue) => string) | string;
427
+ //#endregion
428
+ //#region ../../library/src/types/issue.d.ts
429
+ /**
430
+ * Array path item interface.
431
+ */
432
+ interface ArrayPathItem {
433
+ /**
434
+ * The path item type.
435
+ */
436
+ readonly type: "array";
437
+ /**
438
+ * The path item origin.
439
+ */
440
+ readonly origin: "value";
441
+ /**
442
+ * The path item input.
443
+ */
444
+ readonly input: MaybeReadonly<unknown[]>;
445
+ /**
446
+ * The path item key.
447
+ */
448
+ readonly key: number;
449
+ /**
450
+ * The path item value.
451
+ */
452
+ readonly value: unknown;
453
+ }
454
+ /**
455
+ * Map path item interface.
456
+ */
457
+ interface MapPathItem {
458
+ /**
459
+ * The path item type.
460
+ */
461
+ readonly type: "map";
462
+ /**
463
+ * The path item origin.
464
+ */
465
+ readonly origin: "key" | "value";
466
+ /**
467
+ * The path item input.
468
+ */
469
+ readonly input: Map<unknown, unknown>;
470
+ /**
471
+ * The path item key.
472
+ */
473
+ readonly key: unknown;
474
+ /**
475
+ * The path item value.
476
+ */
477
+ readonly value: unknown;
478
+ }
479
+ /**
480
+ * Object path item interface.
481
+ */
482
+ interface ObjectPathItem {
483
+ /**
484
+ * The path item type.
485
+ */
486
+ readonly type: "object";
487
+ /**
488
+ * The path item origin.
489
+ */
490
+ readonly origin: "key" | "value";
491
+ /**
492
+ * The path item input.
493
+ */
494
+ readonly input: Record<string, unknown>;
495
+ /**
496
+ * The path item key.
497
+ */
498
+ readonly key: string;
499
+ /**
500
+ * The path item value.
501
+ */
502
+ readonly value: unknown;
503
+ }
504
+ /**
505
+ * Set path item interface.
506
+ */
507
+ interface SetPathItem {
508
+ /**
509
+ * The path item type.
510
+ */
511
+ readonly type: "set";
512
+ /**
513
+ * The path item origin.
514
+ */
515
+ readonly origin: "value";
516
+ /**
517
+ * The path item input.
518
+ */
519
+ readonly input: Set<unknown>;
520
+ /**
521
+ * The path item key.
522
+ */
523
+ readonly key: null;
524
+ /**
525
+ * The path item key.
526
+ */
527
+ readonly value: unknown;
528
+ }
529
+ /**
530
+ * Unknown path item interface.
531
+ */
532
+ interface UnknownPathItem {
533
+ /**
534
+ * The path item type.
535
+ */
536
+ readonly type: "unknown";
537
+ /**
538
+ * The path item origin.
539
+ */
540
+ readonly origin: "key" | "value";
541
+ /**
542
+ * The path item input.
543
+ */
544
+ readonly input: unknown;
545
+ /**
546
+ * The path item key.
547
+ */
548
+ readonly key: unknown;
549
+ /**
550
+ * The path item value.
551
+ */
552
+ readonly value: unknown;
553
+ }
554
+ /**
555
+ * Issue path item type.
556
+ */
557
+ type IssuePathItem = ArrayPathItem | MapPathItem | ObjectPathItem | SetPathItem | UnknownPathItem;
558
+ /**
559
+ * Base issue interface.
560
+ */
561
+ interface BaseIssue<TInput$1> extends Config<BaseIssue<TInput$1>> {
562
+ /**
563
+ * The issue kind.
564
+ */
565
+ readonly kind: "schema" | "validation" | "transformation";
566
+ /**
567
+ * The issue type.
568
+ */
569
+ readonly type: string;
570
+ /**
571
+ * The raw input data.
572
+ */
573
+ readonly input: TInput$1;
574
+ /**
575
+ * The expected property.
576
+ */
577
+ readonly expected: string | null;
578
+ /**
579
+ * The received property.
580
+ */
581
+ readonly received: string;
582
+ /**
583
+ * The error message.
584
+ */
585
+ readonly message: string;
586
+ /**
587
+ * The input requirement.
588
+ */
589
+ readonly requirement?: unknown | undefined;
590
+ /**
591
+ * The issue path.
592
+ */
593
+ readonly path?: [IssuePathItem, ...IssuePathItem[]] | undefined;
594
+ /**
595
+ * The sub issues.
596
+ */
597
+ readonly issues?: [BaseIssue<TInput$1>, ...BaseIssue<TInput$1>[]] | undefined;
598
+ }
599
+ //#endregion
600
+ //#region ../../library/src/types/config.d.ts
601
+ /**
602
+ * Config interface.
603
+ */
604
+ interface Config<TIssue extends BaseIssue<unknown>> {
605
+ /**
606
+ * The selected language.
607
+ */
608
+ readonly lang?: string | undefined;
609
+ /**
610
+ * The error message.
611
+ */
612
+ readonly message?: ErrorMessage<TIssue> | undefined;
613
+ /**
614
+ * Whether it should be aborted early.
615
+ */
616
+ readonly abortEarly?: boolean | undefined;
617
+ /**
618
+ * Whether a pipe should be aborted early.
619
+ */
620
+ readonly abortPipeEarly?: boolean | undefined;
621
+ }
622
+ //#endregion
623
+ //#region ../../library/src/types/pipe.d.ts
624
+ /**
625
+ * Pipe action type.
626
+ */
627
+ type PipeAction<TInput$1, TOutput, TIssue extends BaseIssue<unknown>> = BaseValidation<TInput$1, TOutput, TIssue> | BaseTransformation<TInput$1, TOutput, TIssue> | BaseMetadata<TInput$1>;
628
+ //#endregion
629
+ //#region src/utils/ReferenceMap.d.ts
630
+ /**
631
+ * Schema reference map with collision-free reference ID allocation.
632
+ */
633
+ declare class ReferenceMap extends Map<BaseSchema<unknown, unknown, BaseIssue<unknown>>, string> {
634
+ /**
635
+ * The used reference IDs.
636
+ */
637
+ private readonly usedIds;
638
+ /**
639
+ * The next reference ID candidate.
640
+ */
641
+ private count;
642
+ /**
643
+ * Creates an empty schema reference map.
644
+ */
645
+ constructor();
646
+ /**
647
+ * Adds a schema reference and reserves its ID.
648
+ *
649
+ * @param schema The Valibot schema.
650
+ * @param referenceId The reference ID.
651
+ *
652
+ * @returns The reference map.
653
+ */
654
+ set(schema: BaseSchema<unknown, unknown, BaseIssue<unknown>>, referenceId: string): this;
655
+ /**
656
+ * Creates a reference ID that is not yet used.
657
+ *
658
+ * @param definitions The JSON Schema definitions.
659
+ *
660
+ * @returns The unused reference ID.
661
+ */
662
+ createId(definitions: Record<string, JsonSchema>): string;
663
+ }
664
+ //#endregion
665
+ //#region src/types/schema.d.ts
666
+ type JsonSchemaTypeName = "string" | "number" | "integer" | "boolean" | "object" | "array" | "null";
667
+ type JsonSchemaType = string | number | boolean | JsonSchemaObject | JsonSchemaArray | null;
668
+ interface JsonSchemaObject {
669
+ [key: string]: JsonSchemaType;
670
+ }
671
+ interface JsonSchemaArray extends Array<JsonSchemaType> {}
672
+ type JsonSchemaDefinition = JsonSchema | boolean;
673
+ /**
674
+ * JSON Schema interface.
675
+ */
676
+ interface JsonSchema {
677
+ $id?: string | undefined;
678
+ $ref?: string | undefined;
679
+ $schema?: string | undefined;
680
+ $comment?: string | undefined;
681
+ $defs?: Record<string, JsonSchemaDefinition> | undefined;
682
+ type?: JsonSchemaTypeName | JsonSchemaTypeName[] | undefined;
683
+ nullable?: boolean | undefined;
684
+ enum?: JsonSchemaType[] | undefined;
685
+ const?: JsonSchemaType | undefined;
686
+ multipleOf?: number | undefined;
687
+ maximum?: number | undefined;
688
+ exclusiveMaximum?: number | undefined;
689
+ minimum?: number | undefined;
690
+ exclusiveMinimum?: number | undefined;
691
+ maxLength?: number | undefined;
692
+ minLength?: number | undefined;
693
+ pattern?: string | undefined;
694
+ items?: JsonSchemaDefinition | JsonSchemaDefinition[] | undefined;
695
+ prefixItems?: JsonSchemaDefinition[] | undefined;
696
+ additionalItems?: JsonSchemaDefinition | undefined;
697
+ maxItems?: number | undefined;
698
+ minItems?: number | undefined;
699
+ uniqueItems?: boolean | undefined;
700
+ contains?: JsonSchemaDefinition | undefined;
701
+ maxProperties?: number | undefined;
702
+ minProperties?: number | undefined;
703
+ required?: string[] | undefined;
704
+ properties?: Record<string, JsonSchemaDefinition> | undefined;
705
+ patternProperties?: Record<string, JsonSchemaDefinition> | undefined;
706
+ additionalProperties?: JsonSchemaDefinition | undefined;
707
+ dependencies?: Record<string, JsonSchemaDefinition | string[]> | undefined;
708
+ propertyNames?: JsonSchemaDefinition | undefined;
709
+ if?: JsonSchemaDefinition | undefined;
710
+ then?: JsonSchemaDefinition | undefined;
711
+ else?: JsonSchemaDefinition | undefined;
712
+ allOf?: JsonSchemaDefinition[] | undefined;
713
+ anyOf?: JsonSchemaDefinition[] | undefined;
714
+ oneOf?: JsonSchemaDefinition[] | undefined;
715
+ not?: JsonSchemaDefinition | undefined;
716
+ format?: string | undefined;
717
+ contentMediaType?: string | undefined;
718
+ contentEncoding?: string | undefined;
719
+ definitions?: Record<string, JsonSchemaDefinition> | undefined;
720
+ title?: string | undefined;
721
+ description?: string | undefined;
722
+ default?: JsonSchemaType | undefined;
723
+ readOnly?: boolean | undefined;
724
+ writeOnly?: boolean | undefined;
725
+ examples?: JsonSchemaType[] | undefined;
726
+ }
727
+ /**
728
+ * JSON Schema 7 interface.
729
+ *
730
+ * @deprecated Use `JsonSchema` instead.
731
+ */
732
+ interface JSONSchema7 extends JsonSchema {}
733
+ //#endregion
734
+ //#region src/types/config.d.ts
735
+ /**
736
+ * JSON Schema conversion context interface.
737
+ */
738
+ interface ConversionContext {
739
+ /**
740
+ * The JSON Schema definitions that have already been created.
741
+ */
742
+ readonly definitions: Record<string, JsonSchema>;
743
+ /**
744
+ * The JSON Schema reference map that is used to look up the reference ID
745
+ * for a given Valibot schema.
746
+ */
747
+ readonly referenceMap: ReferenceMap;
748
+ /**
749
+ * The lazy schema getter map that is used internally to ensure that
750
+ * recursive lazy schemas are unwrapped only once.
751
+ */
752
+ readonly getterMap: Map<(input: unknown) => BaseSchema<unknown, unknown, BaseIssue<unknown>>, BaseSchema<unknown, unknown, BaseIssue<unknown>>>;
753
+ }
754
+ /**
755
+ * JSON Schema override context interface for schemas.
756
+ *
757
+ * @beta
758
+ */
759
+ interface OverrideSchemaContext extends ConversionContext {
760
+ /**
761
+ * The JSON Schema reference ID.
762
+ */
763
+ readonly referenceId: string | undefined;
764
+ /**
765
+ * The Valibot schema to be converted.
766
+ */
767
+ readonly valibotSchema: BaseSchema<unknown, unknown, BaseIssue<unknown>>;
768
+ /**
769
+ * The converted JSON Schema.
770
+ */
771
+ readonly jsonSchema: JsonSchema;
772
+ /**
773
+ * The errors of the current Valibot schema conversion.
774
+ */
775
+ readonly errors: [string, ...string[]] | undefined;
776
+ }
777
+ /**
778
+ * JSON Schema override context interface for actions.
779
+ *
780
+ * @beta
781
+ */
782
+ interface OverrideActionContext {
783
+ /**
784
+ * The Valibot action to be converted.
785
+ */
786
+ readonly valibotAction: PipeAction<any, any, BaseIssue<unknown>>;
787
+ /**
788
+ * The converted JSON Schema.
789
+ */
790
+ readonly jsonSchema: JsonSchema;
791
+ /**
792
+ * The errors of the current Valibot action conversion.
793
+ */
794
+ readonly errors: [string, ...string[]] | undefined;
795
+ }
796
+ /**
797
+ * JSON Schema override context interface for references.
798
+ *
799
+ * @beta
800
+ */
801
+ interface OverrideRefContext extends ConversionContext {
802
+ /**
803
+ * The JSON Schema reference ID.
804
+ */
805
+ readonly referenceId: string;
806
+ /**
807
+ * The Valibot schema to be converted.
808
+ */
809
+ readonly valibotSchema: BaseSchema<unknown, unknown, BaseIssue<unknown>>;
810
+ /**
811
+ * The converted JSON Schema.
812
+ */
813
+ readonly jsonSchema: JsonSchema;
814
+ }
815
+ /**
816
+ * JSON Schema conversion config interface.
817
+ */
818
+ interface ConversionConfig {
819
+ /**
820
+ * The target JSON Schema draft version. Defaults to 'draft-07'.
821
+ */
822
+ readonly target?: "draft-07" | "draft-2020-12" | "openapi-3.0";
823
+ /**
824
+ * Whether to convert the input or output type of the Valibot schema to JSON Schema.
825
+ *
826
+ * When set to 'input', conversion stops before the first potential type
827
+ * transformation action or second schema in any pipeline.
828
+ *
829
+ * When set to 'output', conversion of any pipelines starts from the last
830
+ * schema in the pipeline. Therefore, the output type must be specified
831
+ * explicitly with a schema after the last type transformation action.
832
+ *
833
+ * @beta
834
+ */
835
+ readonly typeMode?: "ignore" | "input" | "output";
836
+ /**
837
+ * The policy for handling incompatible schemas and actions.
838
+ */
839
+ readonly errorMode?: "throw" | "warn" | "ignore";
840
+ /**
841
+ * The schema definitions for constructing recursive schemas. If not
842
+ * specified, the definitions are generated automatically as needed.
843
+ */
844
+ readonly definitions?: Record<string, BaseSchema<unknown, unknown, BaseIssue<unknown>>>;
845
+ /**
846
+ * Overrides the JSON Schema conversion for a specific Valibot schema.
847
+ *
848
+ * Only return a JSON Schema if you want to override the default conversion
849
+ * behaviour and suppress errors for a specific schema. Returning either
850
+ * `null` or `undefined` will skip the override.
851
+ *
852
+ * @param context The conversion context.
853
+ *
854
+ * @returns A JSON Schema, if overridden.
855
+ *
856
+ * @beta
857
+ */
858
+ readonly overrideSchema?: (context: OverrideSchemaContext) => JsonSchema | null | undefined;
859
+ /**
860
+ * The actions that should be ignored during the conversion.
861
+ *
862
+ * @beta
863
+ */
864
+ readonly ignoreActions?: string[];
865
+ /**
866
+ * Overrides the JSON Schema reference for a specific Valibot action.
867
+ *
868
+ * Only return a JSON Schema if you want to override the default conversion
869
+ * behaviour and suppress errors for a specific action. Returning either
870
+ * `null` or `undefined` will skip the override.
871
+ *
872
+ * @param context The conversion context.
873
+ *
874
+ * @returns A JSON Schema, if overridden.
875
+ *
876
+ * @beta
877
+ */
878
+ readonly overrideAction?: (context: OverrideActionContext) => JsonSchema | null | undefined;
879
+ /**
880
+ * Overrides the JSON Schema reference for a specific reference ID.
881
+ *
882
+ * @param context The conversion context.
883
+ *
884
+ * @returns A reference ID, if overridden.
885
+ *
886
+ * @beta
887
+ */
888
+ readonly overrideRef?: (context: OverrideRefContext) => string | null | undefined;
889
+ }
890
+ //#endregion
891
+ //#region src/types/standard.d.ts
892
+ /**
893
+ * JSON Schema interface.
894
+ */
895
+ interface StandardJsonSchema<TInput$1, TOutput> {
896
+ /**
897
+ * The Standard JSON Schema properties.
898
+ */
899
+ readonly "~standard": StandardJsonProps<TInput$1, TOutput>;
900
+ }
901
+ /**
902
+ * The Standard JSON Schema properties interface.
903
+ */
904
+ interface StandardJsonProps<TInput$1, TOutput> extends StandardProps<TInput$1, TOutput> {
905
+ /**
906
+ * Methods for generating the input/output JSON Schema.
907
+ */
908
+ readonly jsonSchema: StandardJsonConverter;
909
+ }
910
+ /**
911
+ * The Standard JSON Schema converter interface.
912
+ */
913
+ interface StandardJsonConverter {
914
+ /**
915
+ * Converts the input type to JSON Schema. May throw if conversion is not supported.
916
+ */
917
+ readonly input: (options: StandardJsonOptions) => Record<string, unknown>;
918
+ /**
919
+ * Converts the output type to JSON Schema. May throw if conversion is not supported.
920
+ */
921
+ readonly output: (options: StandardJsonOptions) => Record<string, unknown>;
922
+ }
923
+ /**
924
+ * The target version of the generated JSON Schema.
925
+ */
926
+ type StandardJsonTarget = "draft-2020-12" | "draft-07" | "openapi-3.0" | ({} & string);
927
+ /**
928
+ * The options for the input/output methods.
929
+ */
930
+ interface StandardJsonOptions {
931
+ /**
932
+ * Specifies the target version of the generated JSON Schema.
933
+ */
934
+ readonly target: StandardJsonTarget;
935
+ /**
936
+ * Explicit support for additional vendor-specific parameters, if needed.
937
+ */
938
+ readonly libraryOptions?: Record<string, unknown> | undefined;
939
+ }
940
+ //#endregion
941
+ //#region src/functions/toJsonSchema/toJsonSchema.d.ts
942
+ /**
943
+ * Converts a Valibot schema to the JSON Schema format.
944
+ *
945
+ * @param schema The Valibot schema object.
946
+ * @param config The JSON Schema configuration.
947
+ *
948
+ * @returns The converted JSON Schema.
949
+ */
950
+ declare function toJsonSchema(schema: BaseSchema<unknown, unknown, BaseIssue<unknown>>, config?: ConversionConfig): JsonSchema;
951
+ //#endregion
952
+ //#region src/functions/toJsonSchemaDefs/toJsonSchemaDefs.d.ts
953
+ /**
954
+ * Converts Valibot schema definitions to JSON Schema definitions.
955
+ *
956
+ * @param definitions The Valibot schema definitions.
957
+ * @param config The JSON Schema configuration.
958
+ *
959
+ * @returns The converted JSON Schema definitions.
960
+ */
961
+ declare function toJsonSchemaDefs<TDefinitions extends Record<string, BaseSchema<unknown, unknown, BaseIssue<unknown>>>>(definitions: TDefinitions, config?: Omit<ConversionConfig, "definitions">): { [TKey in keyof TDefinitions]: JsonSchema };
962
+ //#endregion
963
+ //#region src/functions/toStandardJsonSchema/toStandardJsonSchema.d.ts
964
+ /**
965
+ * Converts a Valibot schema to the Standard JSON Schema format.
966
+ *
967
+ * @param schema The Valibot schema object.
968
+ *
969
+ * @returns The Standard JSON Schema.
970
+ */
971
+ declare function toStandardJsonSchema<TSchema extends BaseSchema<unknown, unknown, BaseIssue<unknown>>>(schema: TSchema): StandardJsonSchema<InferInput<TSchema>, InferOutput<TSchema>>;
972
+ //#endregion
973
+ //#region src/storages/globalDefs/globalDefs.d.ts
974
+ /**
975
+ * Adds new definitions to the global schema definitions.
976
+ *
977
+ * @param definitions The schema definitions.
978
+ *
979
+ * @beta
980
+ */
981
+ declare function addGlobalDefs(definitions: Record<string, BaseSchema<unknown, unknown, BaseIssue<unknown>>>): void;
982
+ /**
983
+ * Returns the current global schema definitions.
984
+ *
985
+ * @returns The schema definitions.
986
+ *
987
+ * @beta
988
+ */
989
+ declare function getGlobalDefs(): Record<string, BaseSchema<unknown, unknown, BaseIssue<unknown>>> | undefined;
990
+ //#endregion
991
+ export { ConversionConfig, ConversionContext, JSONSchema7, JsonSchema, OverrideActionContext, OverrideRefContext, OverrideSchemaContext, StandardJsonSchema, addGlobalDefs, getGlobalDefs, toJsonSchema, toJsonSchemaDefs, toStandardJsonSchema };