@arrirpc/typebox-adapter 0.54.0 → 0.57.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/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
- _isAdaptedSchema: true,
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 { AAdaptedObjectSchema, AAdaptedRecordSchema, AAdaptedSchema } from '@arrirpc/schema';
2
- import { TSchema, TObject, Static, TRecord } from '@sinclair/typebox';
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 ? AAdaptedObjectSchema<Static<TInput>> : TInput extends TRecord ? AAdaptedRecordSchema<Static<TInput> extends Record<string, any> ? Static<TInput>[string] : any> : AAdaptedSchema<Static<TInput>>;
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 { AAdaptedObjectSchema, AAdaptedRecordSchema, AAdaptedSchema } from '@arrirpc/schema';
2
- import { TSchema, TObject, Static, TRecord } from '@sinclair/typebox';
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 ? AAdaptedObjectSchema<Static<TInput>> : TInput extends TRecord ? AAdaptedRecordSchema<Static<TInput> extends Record<string, any> ? Static<TInput>[string] : any> : AAdaptedSchema<Static<TInput>>;
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 { AAdaptedObjectSchema, AAdaptedRecordSchema, AAdaptedSchema } from '@arrirpc/schema';
2
- import { TSchema, TObject, Static, TRecord } from '@sinclair/typebox';
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 ? AAdaptedObjectSchema<Static<TInput>> : TInput extends TRecord ? AAdaptedRecordSchema<Static<TInput> extends Record<string, any> ? Static<TInput>[string] : any> : AAdaptedSchema<Static<TInput>>;
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
@@ -13,7 +13,7 @@ function typeboxAdapter(input) {
13
13
  id: input.$id ?? input.title,
14
14
  description: input.description,
15
15
  [SCHEMA_METADATA]: {
16
- _isAdaptedSchema: true,
16
+ _isAdapted: true,
17
17
  output: {},
18
18
  optional: input[OptionalKind] === "Optional",
19
19
  parse(val) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arrirpc/typebox-adapter",
3
- "version": "0.54.0",
3
+ "version": "0.57.0",
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
- "@arrirpc/schema": "0.54.0",
26
- "json-schema-to-jtd": "0.54.0"
25
+ "@arrirpc/schema": "0.57.0",
26
+ "json-schema-to-jtd": "0.57.0"
27
27
  },
28
28
  "devDependencies": {
29
- "@arrirpc/server": "0.54.0"
29
+ "@arrirpc/server": "0.57.0"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "@sinclair/typebox": "^0.32"