@orpc/valibot 1.3.0 → 1.4.1

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/index.d.mts CHANGED
@@ -2,13 +2,13 @@ import { AnySchema } from '@orpc/contract';
2
2
  import { ConditionalSchemaConverter, SchemaConvertOptions, JSONSchema } from '@orpc/openapi';
3
3
  import { ConversionConfig } from '@valibot/to-json-schema';
4
4
 
5
- interface experimental_ValibotToJsonSchemaConverterOptions extends ConversionConfig {
5
+ interface experimental_ValibotToJsonSchemaConverterOptions extends Omit<ConversionConfig, 'typeMode'> {
6
6
  }
7
7
  declare class experimental_ValibotToJsonSchemaConverter implements ConditionalSchemaConverter {
8
8
  private readonly conversionConfig;
9
9
  constructor(options?: experimental_ValibotToJsonSchemaConverterOptions);
10
10
  condition(schema: AnySchema | undefined): boolean;
11
- convert(schema: AnySchema | undefined, _options: SchemaConvertOptions): [required: boolean, jsonSchema: Exclude<JSONSchema, boolean>];
11
+ convert(schema: AnySchema | undefined, options: SchemaConvertOptions): [required: boolean, jsonSchema: Exclude<JSONSchema, boolean>];
12
12
  }
13
13
 
14
14
  export { experimental_ValibotToJsonSchemaConverter };
package/dist/index.d.ts CHANGED
@@ -2,13 +2,13 @@ import { AnySchema } from '@orpc/contract';
2
2
  import { ConditionalSchemaConverter, SchemaConvertOptions, JSONSchema } from '@orpc/openapi';
3
3
  import { ConversionConfig } from '@valibot/to-json-schema';
4
4
 
5
- interface experimental_ValibotToJsonSchemaConverterOptions extends ConversionConfig {
5
+ interface experimental_ValibotToJsonSchemaConverterOptions extends Omit<ConversionConfig, 'typeMode'> {
6
6
  }
7
7
  declare class experimental_ValibotToJsonSchemaConverter implements ConditionalSchemaConverter {
8
8
  private readonly conversionConfig;
9
9
  constructor(options?: experimental_ValibotToJsonSchemaConverterOptions);
10
10
  condition(schema: AnySchema | undefined): boolean;
11
- convert(schema: AnySchema | undefined, _options: SchemaConvertOptions): [required: boolean, jsonSchema: Exclude<JSONSchema, boolean>];
11
+ convert(schema: AnySchema | undefined, options: SchemaConvertOptions): [required: boolean, jsonSchema: Exclude<JSONSchema, boolean>];
12
12
  }
13
13
 
14
14
  export { experimental_ValibotToJsonSchemaConverter };
package/dist/index.mjs CHANGED
@@ -11,8 +11,11 @@ class experimental_ValibotToJsonSchemaConverter {
11
11
  condition(schema) {
12
12
  return schema !== void 0 && schema["~standard"].vendor === "valibot";
13
13
  }
14
- convert(schema, _options) {
15
- const jsonSchema = toJsonSchema(schema, this.conversionConfig);
14
+ convert(schema, options) {
15
+ const jsonSchema = toJsonSchema(schema, {
16
+ ...this.conversionConfig,
17
+ typeMode: options.strategy
18
+ });
16
19
  return [true, jsonSchema];
17
20
  }
18
21
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orpc/valibot",
3
3
  "type": "module",
4
- "version": "1.3.0",
4
+ "version": "1.4.1",
5
5
  "license": "MIT",
6
6
  "homepage": "https://orpc.unnoq.com",
7
7
  "repository": {
@@ -25,12 +25,12 @@
25
25
  ],
26
26
  "peerDependencies": {
27
27
  "valibot": ">=1.0.0",
28
- "@orpc/contract": "1.3.0",
29
- "@orpc/server": "1.3.0"
28
+ "@orpc/server": "1.4.1",
29
+ "@orpc/contract": "1.4.1"
30
30
  },
31
31
  "dependencies": {
32
- "@valibot/to-json-schema": "^1.2.0",
33
- "@orpc/openapi": "1.3.0"
32
+ "@valibot/to-json-schema": "^1.3.0",
33
+ "@orpc/openapi": "1.4.1"
34
34
  },
35
35
  "devDependencies": {
36
36
  "valibot": "^1.1.0"