@powerlines/schema 0.11.41 → 0.11.42

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 (50) hide show
  1. package/dist/bundle.cjs +0 -1
  2. package/dist/codegen.cjs +0 -1
  3. package/dist/constants.cjs +0 -2
  4. package/dist/constants.d.cts +1 -1
  5. package/dist/constants.d.mts +1 -1
  6. package/dist/constants.mjs +0 -1
  7. package/dist/constants.mjs.map +1 -1
  8. package/dist/extract.cjs +23 -9
  9. package/dist/extract.d.cts +2 -3
  10. package/dist/extract.d.cts.map +1 -1
  11. package/dist/extract.d.mts +2 -3
  12. package/dist/extract.d.mts.map +1 -1
  13. package/dist/extract.mjs +28 -12
  14. package/dist/extract.mjs.map +1 -1
  15. package/dist/helpers.cjs +0 -1
  16. package/dist/index.cjs +2 -1
  17. package/dist/index.d.cts +30 -4
  18. package/dist/index.d.cts.map +1 -0
  19. package/dist/index.d.mts +30 -4
  20. package/dist/index.d.mts.map +1 -0
  21. package/dist/index.mjs +3 -3
  22. package/dist/metadata.cjs +1 -2
  23. package/dist/metadata.d.cts.map +1 -1
  24. package/dist/metadata.d.mts.map +1 -1
  25. package/dist/metadata.mjs +1 -1
  26. package/dist/metadata.mjs.map +1 -1
  27. package/dist/persistence.cjs +0 -1
  28. package/dist/reflection.cjs +0 -1
  29. package/dist/resolve.cjs +0 -1
  30. package/dist/type-checks.cjs +27 -2
  31. package/dist/type-checks.d.cts +17 -1
  32. package/dist/type-checks.d.cts.map +1 -1
  33. package/dist/type-checks.d.mts +17 -1
  34. package/dist/type-checks.d.mts.map +1 -1
  35. package/dist/type-checks.mjs +25 -1
  36. package/dist/type-checks.mjs.map +1 -1
  37. package/dist/types.d.cts +34 -19
  38. package/dist/types.d.cts.map +1 -1
  39. package/dist/types.d.mts +34 -19
  40. package/dist/types.d.mts.map +1 -1
  41. package/dist/validate.cjs +1 -12
  42. package/dist/validate.mjs +1 -10
  43. package/dist/validate.mjs.map +1 -1
  44. package/package.json +20 -53
  45. package/dist/types.cjs +0 -0
  46. package/dist/types.mjs +0 -1
  47. package/dist/validate.d.cts +0 -21
  48. package/dist/validate.d.cts.map +0 -1
  49. package/dist/validate.d.mts +0 -21
  50. package/dist/validate.d.mts.map +0 -1
package/dist/types.d.mts CHANGED
@@ -2,12 +2,14 @@ import { Type } from "@powerlines/deepkit/vendor/type";
2
2
  import { StandardJSONSchemaV1 } from "@standard-schema/spec";
3
3
  import { TypeDefinition } from "@stryke/types/configuration";
4
4
  import { FormatName } from "ajv-formats/dist/formats.js";
5
- import { InputObject, Schema as Schema$1 } from "untyped";
5
+ import { InputObject, Schema } from "untyped";
6
+ import { BaseIssue, BaseSchema } from "valibot";
6
7
  import * as z3 from "zod/v3";
7
8
 
8
9
  //#region src/types.d.ts
9
10
  type UntypedInputObject = InputObject;
10
- type UntypedSchema = Schema$1;
11
+ type UntypedSchema = Schema;
12
+ type ValibotSchema<TInput = unknown, TOutput = unknown, TIssue extends BaseIssue<unknown> = BaseIssue<unknown>> = BaseSchema<TInput, TOutput, TIssue>;
11
13
  /**
12
14
  * JSON Schema primitive type names used by {@link stringifyType}.
13
15
  */
@@ -155,17 +157,28 @@ type UncheckedJsonSchemaType<T, IsPartial extends boolean> = ({
155
157
  */
156
158
  $comment?: string;
157
159
  /**
158
- * A record of schema definitions that can be referenced throughout the schema using `$ref`. This property can be used to define reusable schema components and reduce redundancy in schema definitions. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the schema when used in conjunction with compatible tools.
160
+ * A record of schema definitions that can be referenced throughout the schema using {@link UncheckedJsonSchemaType.$ref}. This property can be used to define reusable schema components and reduce redundancy in schema definitions. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the schema when used in conjunction with compatible tools.
159
161
  */
160
162
  $defs?: Record<string, UncheckedJsonSchemaType<Known, true>>;
161
- /**
162
- * A record of schema definitions that can be referenced throughout the schema using `$ref`. This property is a legacy version of `$defs` and is maintained for backward compatibility with earlier versions of the JSON Schema specification. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the schema when used in conjunction with compatible tools.
163
- */
164
- definitions?: Record<string, UncheckedJsonSchemaType<Known, true>>;
165
163
  /**
166
164
  * A name for the schema, which can be used by documentation tools or other libraries that support this feature to provide a human-readable name or description for the schema. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the schema when used in conjunction with compatible tools.
167
165
  */
168
166
  name?: string;
167
+ /**
168
+ * A unique identifier for the schema, which can be used to reference or identify the schema in various contexts. This property is part of the JSON Schema specification and does not affect the validation behavior of the schema itself, but it can provide additional context or information about the schema when used in conjunction with compatible tools.
169
+ *
170
+ * @remarks
171
+ * This property is a legacy version of {@link UncheckedJsonSchemaType.$id} and is maintained for backward compatibility with earlier versions of the JSON Schema specification. The presence of this property does not affect the validation behavior of the schema itself, but it can be used to reference or identify the schema in various contexts when used in conjunction with compatible tools.
172
+ *
173
+ * @deprecated Use {@link UncheckedJsonSchemaType.$id} instead.
174
+ */
175
+ id?: string;
176
+ /**
177
+ * A record of schema definitions that can be referenced throughout the schema using {@link UncheckedJsonSchemaType.$ref}. This property is a legacy version of {@link UncheckedJsonSchemaType.$defs} and is maintained for backward compatibility with earlier versions of the JSON Schema specification. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the schema when used in conjunction with compatible tools.
178
+ *
179
+ * @deprecated Use {@link UncheckedJsonSchemaType.$defs} instead.
180
+ */
181
+ definitions?: Record<string, UncheckedJsonSchemaType<Known, true>>;
169
182
  [keyword: string]: any;
170
183
  };
171
184
  interface SchemaMetadata {
@@ -184,7 +197,7 @@ interface SchemaMetadata {
184
197
  /**
185
198
  * An array of example values that conform to the schema. This property can be used to provide sample data for documentation purposes or to assist developers in understanding the expected structure and content of the data that the schema represents. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
186
199
  */
187
- examples?: string[];
200
+ examples?: unknown[];
188
201
  /**
189
202
  * An array of strings or an alias reference to indicate that the field is an alias for one or more other fields.
190
203
  */
@@ -193,10 +206,6 @@ interface SchemaMetadata {
193
206
  * An array of strings indicating groups that the schema belongs to. This property can be used for organizational or categorization purposes in documentation tools or other libraries that support this feature. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the schema when used in conjunction with compatible tools.
194
207
  */
195
208
  tags?: string[];
196
- /**
197
- * A visibility level for the schema, which can be used by documentation tools or other libraries that support this feature to determine how the schema should be presented or accessed. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the schema when used in conjunction with compatible tools.
198
- */
199
- visibility?: "public" | "protected" | "private";
200
209
  /**
201
210
  * An indicator specifying if the field is deprecated or not. This property can be used by documentation tools or other libraries that support this feature to provide additional information or warnings about the usage of the schema. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the schema when used in conjunction with compatible tools.
202
211
  */
@@ -259,15 +268,15 @@ type JsonSchemaObject<T extends Record<string, any> = Record<string, any>> = Omi
259
268
  properties: Record<string, JsonSchemaProperty<T>>; /** The property names that are required on the object. */
260
269
  required?: string[];
261
270
  } & SchemaMetadata;
262
- type SchemaSourceVariant = "standard-schema" | "json-schema" | "zod3" | "untyped" | "reflection";
271
+ type SchemaSourceVariant = "standard-schema" | "json-schema" | "zod3" | "untyped" | "valibot" | "reflection";
263
272
  type SchemaInputVariant = SchemaSourceVariant | "type-definition";
264
- type SchemaSourceInput<T = unknown> = StandardJSONSchemaV1 | JsonSchema<T> | z3.ZodTypeAny | UntypedInputObject | UntypedSchema | Type;
273
+ type SchemaSourceInput<T = unknown> = StandardJSONSchemaV1 | JsonSchema<T> | z3.ZodTypeAny | UntypedInputObject | UntypedSchema | ValibotSchema | Type;
265
274
  type TypeDefinitionReference = TypeDefinition | string;
266
- type SchemaInput<T = unknown> = SchemaSourceInput<T> | Schema<T> | TypeDefinitionReference;
275
+ type SchemaInput<T = unknown> = SchemaSourceInput<T> | Schema$1<T> | TypeDefinitionReference;
267
276
  /**
268
277
  * A schema extracted from a source input, normalized to JSON Schema.
269
278
  */
270
- interface Schema<T = unknown> {
279
+ interface Schema$1<T = unknown> {
271
280
  /** A stable content hash for the normalized schema. */
272
281
  hash: string;
273
282
  /** The source variant used to derive the normalized {@link JsonSchema}. */
@@ -313,11 +322,17 @@ interface UntypedSchemaSource extends BaseSchemaSource {
313
322
  /** The original Untyped schema input. */
314
323
  schema: UntypedInputObject | UntypedSchema;
315
324
  }
316
- type SchemaSource = JsonSchemaSchemaSource | StandardSchemaSchemaSource | Zod3SchemaSource | UntypedSchemaSource | ReflectionSchemaSource;
317
- interface ExtractedSchema<T = unknown> extends Schema<T> {
325
+ interface ValibotSchemaSource extends BaseSchemaSource {
326
+ /** Indicates the source input comes from the Valibot schema model. */
327
+ variant: "valibot";
328
+ /** The original Valibot schema input. */
329
+ schema: ValibotSchema;
330
+ }
331
+ type SchemaSource = JsonSchemaSchemaSource | StandardSchemaSchemaSource | Zod3SchemaSource | UntypedSchemaSource | ValibotSchemaSource | ReflectionSchemaSource;
332
+ interface ExtractedSchema<T = unknown> extends Schema$1<T> {
318
333
  /** The schema source that produced this normalized schema. */
319
334
  source: SchemaSource;
320
335
  }
321
336
  //#endregion
322
- export { BaseSchemaSource, ExtractedSchema, JsonSchema, JsonSchemaLike, JsonSchemaNullable, JsonSchemaObject, JsonSchemaPrimitiveType, JsonSchemaProperty, JsonSchemaSchemaSource, JsonType, NumberFormat, NumberKeywords, ReflectionSchemaSource, Schema, SchemaInput, SchemaInputVariant, SchemaMetadata, SchemaSource, SchemaSourceInput, SchemaSourceVariant, StandardSchemaSchemaSource, StringKeywords, TypeDefinitionReference, UntypedInputObject, UntypedSchema, UntypedSchemaSource, Zod3SchemaSource };
337
+ export { BaseSchemaSource, ExtractedSchema, JsonSchema, JsonSchemaLike, JsonSchemaNullable, JsonSchemaObject, JsonSchemaPrimitiveType, JsonSchemaProperty, JsonSchemaSchemaSource, JsonType, NumberFormat, NumberKeywords, ReflectionSchemaSource, Schema$1 as Schema, SchemaInput, SchemaInputVariant, SchemaMetadata, SchemaSource, SchemaSourceInput, SchemaSourceVariant, StandardSchemaSchemaSource, StringKeywords, TypeDefinitionReference, UntypedInputObject, UntypedSchema, UntypedSchemaSource, ValibotSchema, ValibotSchemaSource, Zod3SchemaSource };
323
338
  //# sourceMappingURL=types.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.mts","names":[],"sources":["../src/types.ts"],"mappings":";;;;;;;;KAyBY,kBAAA,GAAqB,WAAW;AAAA,KAChC,aAAA,GAAgB,QAAO;AADnC;;;AAAA,KAMY,uBAAA;AAAA,KASP,uBAAA,2GACmD,IAAA,KACpD,IAAI;AAAA,KAEH,mBAAA,OAA0B,CAAA,gBAAiB,CAAA,EAAG,CAAC,6BAClD,CAAA,sBAEE,CAAA;;;;KAMQ,cAAA,GAAiB,uBAAA,CAAwB,KAAA,UACnD,cAAA;AAAA,KAEG,sBAAA,MAA4B,OAAA,CAAQ,uBAAA,CAAwB,CAAA;AAAA,KAErD,QAAA,gDAGR,SAAA,gBAAyB,CAAA,eAAgB,CAAA;AAAA,KAEjC,YAAA;AAAA,UAWK,cAAA;EA3CkB;EA6CjC,OAAA;EApC0B;EAuC1B,OAAA;EArCM;EAwCN,gBAAA;EA1CgD;EA6ChD,gBAAA;EA3CE;EA8CF,UAAA;EA9CM;EAiDN,MAAA,GAAS,YAAY;AAAA;AAAA,UAGN,cAAA;EAlDmC;EAoDlD,SAAA;EApD6B;EAuD7B,SAAA;EAvD8C;EA0D9C,OAAA;EAzDA;;;AAEG;AAML;;;;EA2DE,MAAA,GAAS,UAAU;AAAA;AAAA,KAGhB,KAAA;EAAA,CAEE,GAAA,WAAc,KAAA;AAAA,KAEhB,KAAA,KAAU,KAAA,MACX,KAAA;AAAA,KAMC,yBAAA,oBACS,CAAA,MACP,uBAAA,CAAwB,CAAA,CAAE,CAAA,YAAa,kBAAA,CAAmB,CAAA,CAAE,CAAA;EAE3D,IAAA;AAAA;AAAA,KAIH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A;AAAA,UAGI,sBAAA,SAA+B,gBAAgB;EA1apD;EA4aV,OAAA;EAraQ;EAwaR,MAAA,EAAQ,IAAA;AAAA;AAAA,UAGO,mBAAA,SAA4B,gBAAA;EAzarC;EA2aN,OAAA;EAzagB;EA4ahB,MAAA,EAAQ,kBAAA,GAAqB,aAAA;AAAA;AAAA,UAGd,mBAAA,SAA4B,gBAAgB;EA3a/C;EA6aZ,OAAA;EA7asC;EAgbtC,MAAA,EAAQ,aAAA;AAAA;AAAA,KAGE,YAAA,GACR,sBAAA,GACA,0BAAA,GACA,gBAAA,GACA,mBAAA,GACA,mBAAA,GACA,sBAAA;AAAA,UAEa,eAAA,sBAAqC,QAAA,CAAO,CAAA;EApb7C;EAsbd,MAAA,EAAQ,YAAA;AAAA"}
package/dist/validate.cjs CHANGED
@@ -1,4 +1,3 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
1
  const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
2
  let ajv = require("ajv");
4
3
  ajv = require_runtime.__toESM(ajv, 1);
@@ -23,16 +22,6 @@ function getValidator(schema) {
23
22
  (0, ajv_formats.default)(ajv$1);
24
23
  return ajv$1;
25
24
  }
26
- /**
27
- * Gets a validation function for a given JSON Schema.
28
- *
29
- * @param schema - The JSON Schema to create a validation function for.
30
- * @returns A function that validates data against the schema and returns a boolean indicating validity.
31
- */
32
- function getValidatorFunction(schema) {
33
- return getValidator(schema).compile(schema);
34
- }
35
25
 
36
26
  //#endregion
37
- exports.getValidator = getValidator;
38
- exports.getValidatorFunction = getValidatorFunction;
27
+ exports.getValidator = getValidator;
package/dist/validate.mjs CHANGED
@@ -19,16 +19,7 @@ function getValidator(schema) {
19
19
  addFormats(ajv);
20
20
  return ajv;
21
21
  }
22
- /**
23
- * Gets a validation function for a given JSON Schema.
24
- *
25
- * @param schema - The JSON Schema to create a validation function for.
26
- * @returns A function that validates data against the schema and returns a boolean indicating validity.
27
- */
28
- function getValidatorFunction(schema) {
29
- return getValidator(schema).compile(schema);
30
- }
31
22
 
32
23
  //#endregion
33
- export { getValidator, getValidatorFunction };
24
+ export { getValidator };
34
25
  //# sourceMappingURL=validate.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"validate.mjs","names":[],"sources":["../src/validate.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport Ajv, { ValidateFunction } from \"ajv\";\nimport addFormats from \"ajv-formats\";\nimport { JsonSchema } from \"./types\";\n\n/**\n * Gets an Ajv validator instance for a given JSON Schema.\n *\n * @param schema - The JSON Schema to create a validator for.\n * @returns An Ajv instance with the schema added.\n */\nexport function getValidator<T = unknown>(schema: JsonSchema<T>): Ajv {\n const ajv = new Ajv({\n schemas: [schema],\n code: { source: true, esm: true }\n });\n\n addFormats(ajv);\n\n return ajv;\n}\n\n/**\n * Gets a validation function for a given JSON Schema.\n *\n * @param schema - The JSON Schema to create a validation function for.\n * @returns A function that validates data against the schema and returns a boolean indicating validity.\n */\nexport function getValidatorFunction<T = unknown>(\n schema: JsonSchema<T>\n): ValidateFunction<T> {\n const ajv = getValidator(schema);\n\n return ajv.compile<T>(schema);\n}\n"],"mappings":";;;;;;;;;;AA4BA,SAAgB,aAA0B,QAA4B;CACpE,MAAM,MAAM,IAAI,IAAI;EAClB,SAAS,CAAC,MAAM;EAChB,MAAM;GAAE,QAAQ;GAAM,KAAK;EAAK;CAClC,CAAC;CAED,WAAW,GAAG;CAEd,OAAO;AACT;;;;;;;AAQA,SAAgB,qBACd,QACqB;CAGrB,OAFY,aAAa,MAEhB,EAAE,QAAW,MAAM;AAC9B"}
1
+ {"version":3,"file":"validate.mjs","names":[],"sources":["../src/validate.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport Ajv, { ValidateFunction } from \"ajv\";\nimport addFormats from \"ajv-formats\";\nimport { JsonSchema } from \"./types\";\n\n/**\n * Gets an Ajv validator instance for a given JSON Schema.\n *\n * @param schema - The JSON Schema to create a validator for.\n * @returns An Ajv instance with the schema added.\n */\nexport function getValidator<T = unknown>(schema: JsonSchema<T>): Ajv {\n const ajv = new Ajv({\n schemas: [schema],\n code: { source: true, esm: true }\n });\n\n addFormats(ajv);\n\n return ajv;\n}\n\n/**\n * Gets a validation function for a given JSON Schema.\n *\n * @param schema - The JSON Schema to create a validation function for.\n * @returns A function that validates data against the schema and returns a boolean indicating validity.\n */\nexport function getValidatorFunction<T = unknown>(\n schema: JsonSchema<T>\n): ValidateFunction<T> {\n const ajv = getValidator(schema);\n\n return ajv.compile<T>(schema);\n}\n"],"mappings":";;;;;;;;;;AA4BA,SAAgB,aAA0B,QAA4B;CACpE,MAAM,MAAM,IAAI,IAAI;EAClB,SAAS,CAAC,MAAM;EAChB,MAAM;GAAE,QAAQ;GAAM,KAAK;EAAK;CAClC,CAAC;CAED,WAAW,GAAG;CAEd,OAAO;AACT"}
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@powerlines/schema",
3
- "version": "0.11.41",
3
+ "version": "0.11.42",
4
4
  "private": false,
5
5
  "description": "A package containing a Powerlines plugin to assist in developing other Powerlines plugins.",
6
6
  "keywords": [
7
7
  "zod",
8
8
  "valibot",
9
9
  "deepkit",
10
+ "untyped",
10
11
  "ajv",
11
12
  "standard-schema",
12
13
  "json-schema",
@@ -50,51 +51,6 @@
50
51
  "type": "module",
51
52
  "exports": {
52
53
  ".": { "import": "./dist/index.mjs", "require": "./dist/index.cjs" },
53
- "./bundle": {
54
- "import": "./dist/bundle.mjs",
55
- "require": "./dist/bundle.cjs"
56
- },
57
- "./codegen": {
58
- "import": "./dist/codegen.mjs",
59
- "require": "./dist/codegen.cjs"
60
- },
61
- "./constants": {
62
- "import": "./dist/constants.mjs",
63
- "require": "./dist/constants.cjs"
64
- },
65
- "./extract": {
66
- "import": "./dist/extract.mjs",
67
- "require": "./dist/extract.cjs"
68
- },
69
- "./helpers": {
70
- "import": "./dist/helpers.mjs",
71
- "require": "./dist/helpers.cjs"
72
- },
73
- "./metadata": {
74
- "import": "./dist/metadata.mjs",
75
- "require": "./dist/metadata.cjs"
76
- },
77
- "./persistence": {
78
- "import": "./dist/persistence.mjs",
79
- "require": "./dist/persistence.cjs"
80
- },
81
- "./reflection": {
82
- "import": "./dist/reflection.mjs",
83
- "require": "./dist/reflection.cjs"
84
- },
85
- "./resolve": {
86
- "import": "./dist/resolve.mjs",
87
- "require": "./dist/resolve.cjs"
88
- },
89
- "./type-checks": {
90
- "import": "./dist/type-checks.mjs",
91
- "require": "./dist/type-checks.cjs"
92
- },
93
- "./types": { "import": "./dist/types.mjs", "require": "./dist/types.cjs" },
94
- "./validate": {
95
- "import": "./dist/validate.mjs",
96
- "require": "./dist/validate.cjs"
97
- },
98
54
  "./package.json": "./package.json"
99
55
  },
100
56
  "main": "./dist/index.cjs",
@@ -103,9 +59,9 @@
103
59
  "typings": "dist/index.d.mts",
104
60
  "files": ["dist"],
105
61
  "dependencies": {
106
- "@powerlines/core": "^0.48.4",
107
- "@powerlines/deepkit": "^0.9.36",
108
- "@powerlines/unplugin": "^0.0.52",
62
+ "@powerlines/core": "^0.48.5",
63
+ "@powerlines/deepkit": "^0.9.37",
64
+ "@powerlines/unplugin": "^0.0.53",
109
65
  "@standard-schema/spec": "^1.1.0",
110
66
  "@stryke/hash": "^0.13.29",
111
67
  "@stryke/helpers": "^0.10.16",
@@ -114,6 +70,7 @@
114
70
  "@stryke/type-checks": "^0.6.9",
115
71
  "@stryke/types": "^0.12.4",
116
72
  "@stryke/zod": "^0.3.22",
73
+ "@valibot/to-json-schema": "^1.7.0",
117
74
  "ajv": "^8.20.0",
118
75
  "ajv-formats": "^3.0.1",
119
76
  "defu": "^6.1.7",
@@ -121,9 +78,19 @@
121
78
  "typescript": "^6.0.3",
122
79
  "untyped": "^1.5.2"
123
80
  },
124
- "devDependencies": { "@types/node": "^25.9.1", "zod": "^4.4.3" },
125
- "peerDependencies": { "zod": "^3.25.0 || ^4.0.0" },
126
- "peerDependenciesMeta": { "zod": { "optional": true } },
81
+ "devDependencies": {
82
+ "@types/node": "^25.9.1",
83
+ "valibot": "^1.4.0",
84
+ "zod": "^4.4.3"
85
+ },
86
+ "peerDependencies": {
87
+ "zod": "^3.25.0 || ^4.0.0",
88
+ "valibot": "^1.4.0 || ^1.5.0"
89
+ },
90
+ "peerDependenciesMeta": {
91
+ "zod": { "optional": true },
92
+ "valibot": { "optional": true }
93
+ },
127
94
  "publishConfig": { "access": "public" },
128
- "gitHead": "3b2fa8b99824b2931e215e3794ea4365b928034d"
95
+ "gitHead": "6ca3515304ea3e458094bd7650a9bfbe0681a124"
129
96
  }
package/dist/types.cjs DELETED
File without changes
package/dist/types.mjs DELETED
@@ -1 +0,0 @@
1
- export { };
@@ -1,21 +0,0 @@
1
- import { JsonSchema } from "./types.cjs";
2
- import Ajv, { ValidateFunction } from "ajv";
3
-
4
- //#region src/validate.d.ts
5
- /**
6
- * Gets an Ajv validator instance for a given JSON Schema.
7
- *
8
- * @param schema - The JSON Schema to create a validator for.
9
- * @returns An Ajv instance with the schema added.
10
- */
11
- declare function getValidator<T = unknown>(schema: JsonSchema<T>): Ajv;
12
- /**
13
- * Gets a validation function for a given JSON Schema.
14
- *
15
- * @param schema - The JSON Schema to create a validation function for.
16
- * @returns A function that validates data against the schema and returns a boolean indicating validity.
17
- */
18
- declare function getValidatorFunction<T = unknown>(schema: JsonSchema<T>): ValidateFunction<T>;
19
- //#endregion
20
- export { getValidator, getValidatorFunction };
21
- //# sourceMappingURL=validate.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validate.d.cts","names":[],"sources":["../src/validate.ts"],"mappings":";;;;;;AA4BA;;;;iBAAgB,YAAA,aAAA,CAA0B,MAAA,EAAQ,UAAA,CAAW,CAAA,IAAK,GAAA;;;;;;;iBAiBlD,oBAAA,aAAA,CACd,MAAA,EAAQ,UAAA,CAAW,CAAA,IAClB,gBAAA,CAAiB,CAAA"}
@@ -1,21 +0,0 @@
1
- import { JsonSchema } from "./types.mjs";
2
- import Ajv, { ValidateFunction } from "ajv";
3
-
4
- //#region src/validate.d.ts
5
- /**
6
- * Gets an Ajv validator instance for a given JSON Schema.
7
- *
8
- * @param schema - The JSON Schema to create a validator for.
9
- * @returns An Ajv instance with the schema added.
10
- */
11
- declare function getValidator<T = unknown>(schema: JsonSchema<T>): Ajv;
12
- /**
13
- * Gets a validation function for a given JSON Schema.
14
- *
15
- * @param schema - The JSON Schema to create a validation function for.
16
- * @returns A function that validates data against the schema and returns a boolean indicating validity.
17
- */
18
- declare function getValidatorFunction<T = unknown>(schema: JsonSchema<T>): ValidateFunction<T>;
19
- //#endregion
20
- export { getValidator, getValidatorFunction };
21
- //# sourceMappingURL=validate.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validate.d.mts","names":[],"sources":["../src/validate.ts"],"mappings":";;;;;;AA4BA;;;;iBAAgB,YAAA,aAAA,CAA0B,MAAA,EAAQ,UAAA,CAAW,CAAA,IAAK,GAAA;;;;;;;iBAiBlD,oBAAA,aAAA,CACd,MAAA,EAAQ,UAAA,CAAW,CAAA,IAClB,gBAAA,CAAiB,CAAA"}