@arrirpc/typebox-adapter 0.55.0 → 0.57.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/README.md +4 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## NOTICE:
|
|
2
|
+
|
|
3
|
+
Currently not in development. Doesn't work with latest Arri version or Typescript version. I may resurrect this down the road if I have time. Although I probably will want to rethink the proper way to approach supporting different validation libraries (i.e. TypeBox, Zod, etc)
|
|
4
|
+
|
|
1
5
|
# Arri Typebox Adapter
|
|
2
6
|
|
|
3
7
|
Let's you reuse your [Typebox](https://github.com/sinclairzx81/typebox) schemas with Arri-RPC
|
package/dist/index.cjs
CHANGED
|
@@ -15,7 +15,7 @@ function typeboxAdapter(input) {
|
|
|
15
15
|
id: input.$id ?? input.title,
|
|
16
16
|
description: input.description,
|
|
17
17
|
[schema.SCHEMA_METADATA]: {
|
|
18
|
-
|
|
18
|
+
_isAdapted: true,
|
|
19
19
|
output: {},
|
|
20
20
|
optional: input[typebox.OptionalKind] === "Optional",
|
|
21
21
|
parse(val) {
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { TSchema, TObject, Static
|
|
1
|
+
import { AObjectSchema, ASchema } from '@arrirpc/schema';
|
|
2
|
+
import { TSchema, TObject, Static } from '@sinclair/typebox';
|
|
3
3
|
|
|
4
|
-
declare function typeboxAdapter<TInput extends TSchema>(input: TInput): TInput extends TObject ?
|
|
4
|
+
declare function typeboxAdapter<TInput extends TSchema>(input: TInput): TInput extends TObject ? AObjectSchema<Static<TInput>> : ASchema<Static<TInput>>;
|
|
5
5
|
|
|
6
6
|
export { typeboxAdapter };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { TSchema, TObject, Static
|
|
1
|
+
import { AObjectSchema, ASchema } from '@arrirpc/schema';
|
|
2
|
+
import { TSchema, TObject, Static } from '@sinclair/typebox';
|
|
3
3
|
|
|
4
|
-
declare function typeboxAdapter<TInput extends TSchema>(input: TInput): TInput extends TObject ?
|
|
4
|
+
declare function typeboxAdapter<TInput extends TSchema>(input: TInput): TInput extends TObject ? AObjectSchema<Static<TInput>> : ASchema<Static<TInput>>;
|
|
5
5
|
|
|
6
6
|
export { typeboxAdapter };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { TSchema, TObject, Static
|
|
1
|
+
import { AObjectSchema, ASchema } from '@arrirpc/schema';
|
|
2
|
+
import { TSchema, TObject, Static } from '@sinclair/typebox';
|
|
3
3
|
|
|
4
|
-
declare function typeboxAdapter<TInput extends TSchema>(input: TInput): TInput extends TObject ?
|
|
4
|
+
declare function typeboxAdapter<TInput extends TSchema>(input: TInput): TInput extends TObject ? AObjectSchema<Static<TInput>> : ASchema<Static<TInput>>;
|
|
5
5
|
|
|
6
6
|
export { typeboxAdapter };
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arrirpc/typebox-adapter",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.57.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"directory": "tooling/schema-typebox-adapter"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"
|
|
26
|
-
"
|
|
25
|
+
"json-schema-to-jtd": "0.57.2",
|
|
26
|
+
"@arrirpc/schema": "0.57.2"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@arrirpc/server": "0.
|
|
29
|
+
"@arrirpc/server": "0.57.2"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"@sinclair/typebox": "^0.32"
|