@amritk/adapters 0.2.0
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/dist/adapter.d.ts +22 -0
- package/dist/adapter.js +0 -0
- package/dist/effect-to-json-schema.d.ts +11 -0
- package/dist/effect-to-json-schema.js +66264 -0
- package/dist/get-adapter.d.ts +11 -0
- package/dist/get-adapter.js +81915 -0
- package/dist/source-format.d.ts +11 -0
- package/dist/source-format.js +0 -0
- package/dist/typebox-to-json-schema.d.ts +13 -0
- package/dist/typebox-to-json-schema.js +61 -0
- package/dist/valibot-to-json-schema.d.ts +12 -0
- package/dist/valibot-to-json-schema.js +672 -0
- package/dist/zod-to-json-schema.d.ts +12 -0
- package/dist/zod-to-json-schema.js +14936 -0
- package/package.json +101 -0
- package/src/adapter.ts +24 -0
- package/src/effect-to-json-schema.test.ts +74 -0
- package/src/effect-to-json-schema.ts +57 -0
- package/src/get-adapter.test.ts +36 -0
- package/src/get-adapter.ts +52 -0
- package/src/source-format.ts +11 -0
- package/src/typebox-to-json-schema.test.ts +121 -0
- package/src/typebox-to-json-schema.ts +79 -0
- package/src/valibot-to-json-schema.test.ts +100 -0
- package/src/valibot-to-json-schema.ts +77 -0
- package/src/zod-to-json-schema.test.ts +114 -0
- package/src/zod-to-json-schema.ts +87 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Adapter } from './adapter';
|
|
2
|
+
import type { SourceFormat } from './source-format';
|
|
3
|
+
/**
|
|
4
|
+
* Resolves the adapter for a non-JSON source format.
|
|
5
|
+
*
|
|
6
|
+
* Only formats with an implemented adapter resolve. The `'json'` format never
|
|
7
|
+
* reaches here — the CLI reads JSON Schema files directly without an adapter —
|
|
8
|
+
* and formats that are named but not yet built throw a clear, actionable error
|
|
9
|
+
* so the CLI can fail fast with guidance instead of a cryptic crash.
|
|
10
|
+
*/
|
|
11
|
+
export declare const getAdapter: (format: SourceFormat) => Adapter;
|