@power-plant/schema 0.0.64 → 0.0.66

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index-ldf5lukz.d.cts","names":[],"sources":["../src/storage/helpers.ts","../src/storage/promises.ts","../src/storage/index.ts"],"mappings":";;;;;iBA0CgB,aAAa,eAAe,SAAS;;;UCqDpC;EACf,UAAU;EACV,mBAAmB,MAAM,UAAU,UAAU,sBAAsB;EACnE,oBACE,MAAM,UACN,UAAU,uBACP;EACL,SAAS,MAAM,UAAU,QAAQ,UAAU,OAAO,SAAS;EAC3D,UAAU,eAAe;EACzB,UACE,YACA,UAAU;IAAgB;QACvB,WAAW;EAChB,SACE,YACA,QAAQ,QACR,gBACA,gBACA,4BACG;IAAU;IAAmB,QAAQ;;EAC1C,UACE,YACA,QAAQ,QACR,gBACA,gBACA,4BACG;IAAU;IAAsB,QAAQ;;EAC7C,cAAc,YAAY,iBAAiB;EAC3C,YAAY,YAAY,OAAO,UAAU,OAAO,aAAa;EAC7D,UACE,YACA,SAAS,OAAO,mBAChB,sBACG,QAAQ;EACb,WACE,YACA,SAAS,OAAO,mBAChB,sBACG,QAAQ;;iBAKC,sBAAsB,SAAS,UAAU;;;iBC1FzC,uBAAuB,SAAS,UAAU"}
1
+ {"version":3,"file":"index-ldf5lukz.d.cts","names":[],"sources":["../src/storage/helpers.ts","../src/storage/promises.ts","../src/storage/index.ts"],"mappings":";;;;;iBA0CgB,aAAa,eAAe,SAAS;;;UCiDpC;EACf,UAAU;EACV,mBAAmB,MAAM,UAAU,UAAU,sBAAsB;EACnE,oBACE,MAAM,UACN,UAAU,uBACP;EACL,SAAS,MAAM,UAAU,QAAQ,UAAU,OAAO,SAAS;EAC3D,UAAU,eAAe;EACzB,UACE,YACA,UAAU;IAAgB;QACvB,WAAW;EAChB,SACE,YACA,QAAQ,QACR,gBACA,gBACA,4BACG;IAAU;IAAmB,QAAQ;;EAC1C,UACE,YACA,QAAQ,QACR,gBACA,gBACA,4BACG;IAAU;IAAsB,QAAQ;;EAC7C,cAAc,YAAY,iBAAiB;EAC3C,YAAY,YAAY,OAAO,UAAU,OAAO,aAAa;EAC7D,UACE,YACA,SAAS,OAAO,mBAChB,sBACG,QAAQ;EACb,WACE,YACA,SAAS,OAAO,mBAChB,sBACG,QAAQ;;iBAKC,sBAAsB,SAAS,UAAU;;;iBCtFzC,uBAAuB,SAAS,UAAU"}
package/dist/index.cjs CHANGED
@@ -4,7 +4,7 @@ const require_constants = require('./constants-CPMTQEYP.cjs');
4
4
  const require_helpers = require('./helpers-C34rr_D0.cjs');
5
5
  const require_deepkit = require('./deepkit-BhouTvk6.cjs');
6
6
  const require_codegen = require('./codegen.cjs');
7
- const require_storage = require('./storage-DcXkFGvG.cjs');
7
+ const require_storage = require('./storage-BLfnq6kZ.cjs');
8
8
  let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
9
9
  let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
10
10
  let _stryke_type_checks = require("@stryke/type-checks");
@@ -942,6 +942,17 @@ async function readSourceFile(path, fs) {
942
942
  return;
943
943
  }
944
944
  }
945
+ /**
946
+ * Creates an [esbuild](https://esbuild.github.io) plugin that uses the Deepkit Type reflection to transpile TypeScript code into JSON Schema.
947
+ *
948
+ * @see https://deepkit.io/en/documentation/runtime-types/reflection
949
+ * @see https://www.typescriptlang.org/docs/handbook/2/types-from-types.html
950
+ * @see https://github.com/esbuild/esbuild
951
+ * @see https://github.com/esbuild/esbuild/blob/main/docs/plugins.md
952
+ *
953
+ * @param options - The options for the plugin.
954
+ * @returns The esbuild plugin.
955
+ */
945
956
  function createDeepkitPlugin(options) {
946
957
  return {
947
958
  name: "power-plant:deepkit",
@@ -1203,6 +1214,7 @@ exports.addProperty = require_helpers.addProperty;
1203
1214
  exports.applyJsonSchemaMetadata = require_helpers.applyJsonSchemaMetadata;
1204
1215
  exports.assertSchemasDoNotContradict = assertSchemasDoNotContradict;
1205
1216
  exports.bundleReferences = bundleReferences;
1217
+ exports.createDeepkitPlugin = createDeepkitPlugin;
1206
1218
  exports.createStoragePromises = require_storage.createStoragePromises;
1207
1219
  exports.extract = extract;
1208
1220
  exports.extractHash = extractHash;
package/dist/index.d.cts CHANGED
@@ -5,7 +5,8 @@ import { StandardSchemaV1 } from "@standard-schema/spec";
5
5
  import { InferLoadOptions } from "@stryke/resolve/types";
6
6
  import { InputObject, Schema } from "untyped";
7
7
  import { BaseSchema } from "valibot";
8
- import { FileReferenceInput } from "@stryke/types";
8
+ import { FileReferenceInput, FileSystemInterface } from "@stryke/types";
9
+ import { Plugin } from "esbuild";
9
10
  import { FileReference } from "@stryke/types/configuration";
10
11
  //#region src/compatibility.d.ts
11
12
  /**
@@ -88,6 +89,20 @@ declare function extractSchema(input: SchemaSourceConfig, variant?: SchemaConfig
88
89
  * @throws Will throw an error if the provided variant is unsupported.
89
90
  */
90
91
  declare function extractSource(variant: SchemaSourceVariant, input: SchemaSourceConfig): SchemaSource;
92
+ /**
93
+ * Creates an [esbuild](https://esbuild.github.io) plugin that uses the Deepkit Type reflection to transpile TypeScript code into JSON Schema.
94
+ *
95
+ * @see https://deepkit.io/en/documentation/runtime-types/reflection
96
+ * @see https://www.typescriptlang.org/docs/handbook/2/types-from-types.html
97
+ * @see https://github.com/esbuild/esbuild
98
+ * @see https://github.com/esbuild/esbuild/blob/main/docs/plugins.md
99
+ *
100
+ * @param options - The options for the plugin.
101
+ * @returns The esbuild plugin.
102
+ */
103
+ declare function createDeepkitPlugin(options: BaseExtractOptions & {
104
+ fs?: FileSystemInterface;
105
+ }): Plugin;
91
106
  /**
92
107
  * Resolves a type definition to a JSON Schema. Bundles the TypeScript module
93
108
  * graph with esbuild using `@deepkit/type-compiler` reflection transformers,
@@ -676,5 +691,5 @@ declare function isSchemaWithSource(input: unknown): input is ExtractedSchemaEnv
676
691
  */
677
692
  declare function isSchemaObject(input: unknown): input is SchemaEnvelope<JsonSchemaObject>;
678
693
  //#endregion
679
- export { type BaseExtractOptions, type BaseSchemaSource, type ExtractedSchemaEnvelope, GetPropertyResult, type InferExtractOptions, JSON_SCHEMA_ANY, JSON_SCHEMA_CONSTRUCTOR_KEY, JSON_SCHEMA_METADATA_KEYS, JSON_SCHEMA_PRIMITIVE_TYPES, JSON_SCHEMA_TYPES, type JsonSchema, type JsonSchemaAllOf, type JsonSchemaAny, type JsonSchemaAnyOf, type JsonSchemaArray, type JsonSchemaBigint, type JsonSchemaBoolean, type JsonSchemaConditionalKeywords, type JsonSchemaDate, type JsonSchemaDecimal, type JsonSchemaDecimalFormat, type JsonSchemaEnum, type JsonSchemaFunction, type JsonSchemaFunctionParameter, type JsonSchemaInteger, type JsonSchemaIntegerFormat, type JsonSchemaKeywords, type JsonSchemaLike, type JsonSchemaLiteral, type JsonSchemaLogicKeywords, type JsonSchemaMap, type JsonSchemaMetadataKeywords, type JsonSchemaNativeEnum, type JsonSchemaNever, type JsonSchemaNull, type JsonSchemaNullable, type JsonSchemaNumber, type JsonSchemaNumberFormat, type JsonSchemaObject, type JsonSchemaOf, type JsonSchemaPrimitiveType, type JsonSchemaPrimitiveUnion, type JsonSchemaRecord, type JsonSchemaRecordPropertyNames, type JsonSchemaRef, type JsonSchemaSchemaSource, type JsonSchemaSet, type JsonSchemaString, type JsonSchemaStringFormat, type JsonSchemaTuple, type JsonSchemaType, JsonSchemaTypeNames, type JsonSchemaUndefined, type JsonSchemaUnion, type JsonSchemaUnknown, type ReflectionSchemaSource, SCHEMA_ARRAY_CONCAT_KEYWORDS, SCHEMA_RECORD_KEYWORDS, SCHEMA_SINGLE_KEYWORDS, type SchemaConfig, type SchemaConfigVariant, type SchemaEnvelope, type SchemaEnvelopeOf, type SchemaSource, type SchemaSourceConfig, type SchemaSourceVariant, type SpecOf, type StandardSchemaSchemaSource, type UntypedConfigObject, type UntypedSchema, type UntypedSchemaSource, type ValibotSchema, type ValibotSchemaSource, type Zod3SchemaSource, addProperty, applyJsonSchemaMetadata, assertSchemasDoNotContradict, bundleReferences, createStoragePromises, extract, extractHash, extractJsonSchema, extractReflection, extractResolvedVariant, extractSchema, extractSchemaWithSource, extractSource, extractTSType, extractVariant, findSchemaContradictions, getJsonSchema, getJsonSchemaObject, getPrimarySchemaType, getProperties, getPropertiesList, getProperty, hasJsonSchemaConstructorFlag, isFileReference, isJsonSchema, isJsonSchemaAllOf, isJsonSchemaAny, isJsonSchemaAnyOf, isJsonSchemaArray, isJsonSchemaBigint, isJsonSchemaBoolean, isJsonSchemaDate, isJsonSchemaDecimal, isJsonSchemaEnum, isJsonSchemaInteger, isJsonSchemaKeywords, isJsonSchemaLiteral, isJsonSchemaMap, isJsonSchemaNativeEnum, isJsonSchemaNever, isJsonSchemaNull, isJsonSchemaNullable, isJsonSchemaNumber, isJsonSchemaObject, isJsonSchemaPrimitiveType, isJsonSchemaPrimitiveUnion, isJsonSchemaRecord, isJsonSchemaRef, isJsonSchemaSet, isJsonSchemaString, isJsonSchemaTuple, isJsonSchemaType, isJsonSchemaUndefined, isJsonSchemaUnion, isJsonSchemaUnknown, isNullOnlyJsonSchema, isPropertyOptional, isSchema, isSchemaNullable, isSchemaObject, isSchemaOf, isSchemaWithSource, isStandardSchema, isUntypedConfig, isUntypedConfigStrict, isUntypedInput, isUntypedInputStrict, isUntypedSchema, isUntypedSchemaStrict, isValibotSchema, isValidSchemaConfigFile, isValidSchemaInputFile, mapStorageToFileSystem, merge, mergeMetadata, normalizeKey, readSchemaTypes, traverseSchema };
694
+ export { type BaseExtractOptions, type BaseSchemaSource, type ExtractedSchemaEnvelope, GetPropertyResult, type InferExtractOptions, JSON_SCHEMA_ANY, JSON_SCHEMA_CONSTRUCTOR_KEY, JSON_SCHEMA_METADATA_KEYS, JSON_SCHEMA_PRIMITIVE_TYPES, JSON_SCHEMA_TYPES, type JsonSchema, type JsonSchemaAllOf, type JsonSchemaAny, type JsonSchemaAnyOf, type JsonSchemaArray, type JsonSchemaBigint, type JsonSchemaBoolean, type JsonSchemaConditionalKeywords, type JsonSchemaDate, type JsonSchemaDecimal, type JsonSchemaDecimalFormat, type JsonSchemaEnum, type JsonSchemaFunction, type JsonSchemaFunctionParameter, type JsonSchemaInteger, type JsonSchemaIntegerFormat, type JsonSchemaKeywords, type JsonSchemaLike, type JsonSchemaLiteral, type JsonSchemaLogicKeywords, type JsonSchemaMap, type JsonSchemaMetadataKeywords, type JsonSchemaNativeEnum, type JsonSchemaNever, type JsonSchemaNull, type JsonSchemaNullable, type JsonSchemaNumber, type JsonSchemaNumberFormat, type JsonSchemaObject, type JsonSchemaOf, type JsonSchemaPrimitiveType, type JsonSchemaPrimitiveUnion, type JsonSchemaRecord, type JsonSchemaRecordPropertyNames, type JsonSchemaRef, type JsonSchemaSchemaSource, type JsonSchemaSet, type JsonSchemaString, type JsonSchemaStringFormat, type JsonSchemaTuple, type JsonSchemaType, JsonSchemaTypeNames, type JsonSchemaUndefined, type JsonSchemaUnion, type JsonSchemaUnknown, type ReflectionSchemaSource, SCHEMA_ARRAY_CONCAT_KEYWORDS, SCHEMA_RECORD_KEYWORDS, SCHEMA_SINGLE_KEYWORDS, type SchemaConfig, type SchemaConfigVariant, type SchemaEnvelope, type SchemaEnvelopeOf, type SchemaSource, type SchemaSourceConfig, type SchemaSourceVariant, type SpecOf, type StandardSchemaSchemaSource, type UntypedConfigObject, type UntypedSchema, type UntypedSchemaSource, type ValibotSchema, type ValibotSchemaSource, type Zod3SchemaSource, addProperty, applyJsonSchemaMetadata, assertSchemasDoNotContradict, bundleReferences, createDeepkitPlugin, createStoragePromises, extract, extractHash, extractJsonSchema, extractReflection, extractResolvedVariant, extractSchema, extractSchemaWithSource, extractSource, extractTSType, extractVariant, findSchemaContradictions, getJsonSchema, getJsonSchemaObject, getPrimarySchemaType, getProperties, getPropertiesList, getProperty, hasJsonSchemaConstructorFlag, isFileReference, isJsonSchema, isJsonSchemaAllOf, isJsonSchemaAny, isJsonSchemaAnyOf, isJsonSchemaArray, isJsonSchemaBigint, isJsonSchemaBoolean, isJsonSchemaDate, isJsonSchemaDecimal, isJsonSchemaEnum, isJsonSchemaInteger, isJsonSchemaKeywords, isJsonSchemaLiteral, isJsonSchemaMap, isJsonSchemaNativeEnum, isJsonSchemaNever, isJsonSchemaNull, isJsonSchemaNullable, isJsonSchemaNumber, isJsonSchemaObject, isJsonSchemaPrimitiveType, isJsonSchemaPrimitiveUnion, isJsonSchemaRecord, isJsonSchemaRef, isJsonSchemaSet, isJsonSchemaString, isJsonSchemaTuple, isJsonSchemaType, isJsonSchemaUndefined, isJsonSchemaUnion, isJsonSchemaUnknown, isNullOnlyJsonSchema, isPropertyOptional, isSchema, isSchemaNullable, isSchemaObject, isSchemaOf, isSchemaWithSource, isStandardSchema, isUntypedConfig, isUntypedConfigStrict, isUntypedInput, isUntypedInputStrict, isUntypedSchema, isUntypedSchemaStrict, isValibotSchema, isValidSchemaConfigFile, isValidSchemaInputFile, mapStorageToFileSystem, merge, mergeMetadata, normalizeKey, readSchemaTypes, traverseSchema };
680
695
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/compatibility.ts","../src/extract.ts","../src/helpers.ts","../src/metadata.ts","../src/type-checks.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;iBAyGgB,yBACd,MAAM,YACN,UAAU,YACV;;;;;;;;;iBAqHc,6BACd,MAAM,YACN,UAAU,YACV;;;;;;;;;iBCyDc,iBAAiB,QAAQ,aAAa;;;;iBAgMtC,YACd,SAAS,qBACT,OAAO;;;;iBA8CO,kBAAkB,YAAY,OAAO;;;;;;;iBAcrC,kBAAkB,kBAAkB;;;;;;;;iBAoCpC,uBACd,OAAO,qBACN;;;;;;;iBA4Ba,eAAe,OAAO,eAAe;;;;;;;;;iBAsB/B,cACpB,OAAO,oBACP,UAAU,sBACT,QAAQ;;;;;;;;;iBAqCK,cACd,SAAS,qBACT,OAAO,qBACN;;;;;;;;;;;iBA4NmB,cACpB,O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AS;;;;;;;;;;;iBAyD1C,sBAAsB,iBAAiB,SAAS;;;;;;;;;;;cAoBnD,uBAAc;iBAEX,gBAAgB,iBAAiB,SAAS;;;;;;;;;;;;cA2B7C,6BAAoB;iBAEjB,sBACd,iBACC,SAAS;;;;;;;iBAuBI,SAAS,iBAAiB,SAAS;;;;;;;iBAkBnC,WAAW,OACzB,iBACC,SAAS,iBAAiB;;;;;;;iBAUb,mBAAmB,iBAAiB,SAAS;;;;;;;iBAiB7C,eACd,iBACC,SAAS,eAAe"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/compatibility.ts","../src/extract.ts","../src/helpers.ts","../src/metadata.ts","../src/type-checks.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;iBAyGgB,yBACd,MAAM,YACN,UAAU,YACV;;;;;;;;;iBAqHc,6BACd,MAAM,YACN,UAAU,YACV;;;;;;;;;iBCyDc,iBAAiB,QAAQ,aAAa;;;;iBAgMtC,YACd,SAAS,qBACT,OAAO;;;;iBA8CO,kBAAkB,YAAY,OAAO;;;;;;;iBAcrC,kBAAkB,kBAAkB;;;;;;;;iBAoCpC,uBACd,OAAO,qBACN;;;;;;;iBA4Ba,eAAe,OAAO,eAAe;;;;;;;;;iBAsB/B,cACpB,OAAO,oBACP,UAAU,sBACT,QAAQ;;;;;;;;;iBAqCK,cACd,SAAS,qBACT,OAAO,qBACN;;;;;;;;;;;;iBA8Ja,oBACd,SAAS;EAAuB,KAAK;IACpC;;;;;;;;;;;iBAuEmB,cACpB,OAAO,oBACP,UAAS,wBAAwB,SAAS,qBACzC,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkJW,wBAAwB,aAC5C,OAAO,cACP,UAAS,2BAA2B,SACnC,QAAQ,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoKb,QAAQ,aAC5B,OAAO,aAAa,QACpB,UAAS,2BAA2B,SACnC,QAAQ,iBAAiB;;;KC5pChB,oBAAo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;;iBAiB7C,eACd,iBACC,SAAS,eAAe"}
package/dist/index.d.mts CHANGED
@@ -1,11 +1,12 @@
1
1
  import { $ as SchemaEnvelopeOf, A as JsonSchemaNullable, B as JsonSchemaSchemaSource, C as JsonSchemaLiteral, D as JsonSchemaNativeEnum, E as JsonSchemaMetadataKeywords, F as JsonSchemaPrimitiveType, G as JsonSchemaType, H as JsonSchemaString, I as JsonSchemaPrimitiveUnion, J as JsonSchemaUnknown, K as JsonSchemaUndefined, L as JsonSchemaRecord, M as JsonSchemaNumberFormat, N as JsonSchemaObject, O as JsonSchemaNever, P as JsonSchemaOf, Q as SchemaEnvelope, R as JsonSchemaRecordPropertyNames, S as JsonSchemaLike, T as JsonSchemaMap, U as JsonSchemaStringFormat, V as JsonSchemaSet, W as JsonSchemaTuple, X as SchemaConfig, Y as ReflectionSchemaSource, Z as SchemaConfigVariant, _ as JsonSchemaFunction, _t as SCHEMA_ARRAY_CONCAT_KEYWORDS, a as JsonSchema, at as UntypedConfigObject, b as JsonSchemaIntegerFormat, c as JsonSchemaAnyOf, ct as ValibotSchema, d as JsonSchemaBoolean, dt as JSON_SCHEMA_ANY, et as SchemaSource, f as JsonSchemaConditionalKeywords, ft as JSON_SCHEMA_CONSTRUCTOR_KEY, g as JsonSchemaEnum, gt as JsonSchemaTypeNames, h as JsonSchemaDecimalFormat, ht as JSON_SCHEMA_TYPES, i as InferExtractOptions, it as StandardSchemaSchemaSource, j as JsonSchemaNumber, k as JsonSchemaNull, l as JsonSchemaArray, lt as ValibotSchemaSource, m as JsonSchemaDecimal, mt as JSON_SCHEMA_PRIMITIVE_TYPES, n as BaseSchemaSource, nt as SchemaSourceVariant, o as JsonSchemaAllOf, ot as UntypedSchema, p as JsonSchemaDate, pt as JSON_SCHEMA_METADATA_KEYS, q as JsonSchemaUnion, r as ExtractedSchemaEnvelope, rt as SpecOf, s as JsonSchemaAny, st as UntypedSchemaSource, t as BaseExtractOptions, tt as SchemaSourceConfig, u as JsonSchemaBigint, ut as Zod3SchemaSource, v as JsonSchemaFunctionParameter, vt as SCHEMA_RECORD_KEYWORDS, w as JsonSchemaLogicKeywords, x as JsonSchemaKeywords, y as JsonSchemaInteger, yt as SCHEMA_SINGLE_KEYWORDS, z as JsonSchemaRef } from "./types-CjEY63CD.mjs";
2
2
  import { n as createStoragePromises, r as normalizeKey, t as mapStorageToFileSystem } from "./index-C7q4X7Bo.mjs";
3
3
  import { Type } from "@deepkit/type";
4
+ import { Plugin } from "esbuild";
4
5
  import { BaseSchema } from "valibot";
5
6
  import { StandardSchemaV1 } from "@standard-schema/spec";
6
7
  import { InferLoadOptions } from "@stryke/resolve/types";
7
8
  import { InputObject, Schema } from "untyped";
8
- import { FileReferenceInput } from "@stryke/types";
9
+ import { FileReferenceInput, FileSystemInterface } from "@stryke/types";
9
10
  import { FileReference } from "@stryke/types/configuration";
10
11
  //#region src/compatibility.d.ts
11
12
  /**
@@ -88,6 +89,20 @@ declare function extractSchema(input: SchemaSourceConfig, variant?: SchemaConfig
88
89
  * @throws Will throw an error if the provided variant is unsupported.
89
90
  */
90
91
  declare function extractSource(variant: SchemaSourceVariant, input: SchemaSourceConfig): SchemaSource;
92
+ /**
93
+ * Creates an [esbuild](https://esbuild.github.io) plugin that uses the Deepkit Type reflection to transpile TypeScript code into JSON Schema.
94
+ *
95
+ * @see https://deepkit.io/en/documentation/runtime-types/reflection
96
+ * @see https://www.typescriptlang.org/docs/handbook/2/types-from-types.html
97
+ * @see https://github.com/esbuild/esbuild
98
+ * @see https://github.com/esbuild/esbuild/blob/main/docs/plugins.md
99
+ *
100
+ * @param options - The options for the plugin.
101
+ * @returns The esbuild plugin.
102
+ */
103
+ declare function createDeepkitPlugin(options: BaseExtractOptions & {
104
+ fs?: FileSystemInterface;
105
+ }): Plugin;
91
106
  /**
92
107
  * Resolves a type definition to a JSON Schema. Bundles the TypeScript module
93
108
  * graph with esbuild using `@deepkit/type-compiler` reflection transformers,
@@ -676,5 +691,5 @@ declare function isSchemaWithSource(input: unknown): input is ExtractedSchemaEnv
676
691
  */
677
692
  declare function isSchemaObject(input: unknown): input is SchemaEnvelope<JsonSchemaObject>;
678
693
  //#endregion
679
- export { type BaseExtractOptions, type BaseSchemaSource, type ExtractedSchemaEnvelope, GetPropertyResult, type InferExtractOptions, JSON_SCHEMA_ANY, JSON_SCHEMA_CONSTRUCTOR_KEY, JSON_SCHEMA_METADATA_KEYS, JSON_SCHEMA_PRIMITIVE_TYPES, JSON_SCHEMA_TYPES, type JsonSchema, type JsonSchemaAllOf, type JsonSchemaAny, type JsonSchemaAnyOf, type JsonSchemaArray, type JsonSchemaBigint, type JsonSchemaBoolean, type JsonSchemaConditionalKeywords, type JsonSchemaDate, type JsonSchemaDecimal, type JsonSchemaDecimalFormat, type JsonSchemaEnum, type JsonSchemaFunction, type JsonSchemaFunctionParameter, type JsonSchemaInteger, type JsonSchemaIntegerFormat, type JsonSchemaKeywords, type JsonSchemaLike, type JsonSchemaLiteral, type JsonSchemaLogicKeywords, type JsonSchemaMap, type JsonSchemaMetadataKeywords, type JsonSchemaNativeEnum, type JsonSchemaNever, type JsonSchemaNull, type JsonSchemaNullable, type JsonSchemaNumber, type JsonSchemaNumberFormat, type JsonSchemaObject, type JsonSchemaOf, type JsonSchemaPrimitiveType, type JsonSchemaPrimitiveUnion, type JsonSchemaRecord, type JsonSchemaRecordPropertyNames, type JsonSchemaRef, type JsonSchemaSchemaSource, type JsonSchemaSet, type JsonSchemaString, type JsonSchemaStringFormat, type JsonSchemaTuple, type JsonSchemaType, JsonSchemaTypeNames, type JsonSchemaUndefined, type JsonSchemaUnion, type JsonSchemaUnknown, type ReflectionSchemaSource, SCHEMA_ARRAY_CONCAT_KEYWORDS, SCHEMA_RECORD_KEYWORDS, SCHEMA_SINGLE_KEYWORDS, type SchemaConfig, type SchemaConfigVariant, type SchemaEnvelope, type SchemaEnvelopeOf, type SchemaSource, type SchemaSourceConfig, type SchemaSourceVariant, type SpecOf, type StandardSchemaSchemaSource, type UntypedConfigObject, type UntypedSchema, type UntypedSchemaSource, type ValibotSchema, type ValibotSchemaSource, type Zod3SchemaSource, addProperty, applyJsonSchemaMetadata, assertSchemasDoNotContradict, bundleReferences, createStoragePromises, extract, extractHash, extractJsonSchema, extractReflection, extractResolvedVariant, extractSchema, extractSchemaWithSource, extractSource, extractTSType, extractVariant, findSchemaContradictions, getJsonSchema, getJsonSchemaObject, getPrimarySchemaType, getProperties, getPropertiesList, getProperty, hasJsonSchemaConstructorFlag, isFileReference, isJsonSchema, isJsonSchemaAllOf, isJsonSchemaAny, isJsonSchemaAnyOf, isJsonSchemaArray, isJsonSchemaBigint, isJsonSchemaBoolean, isJsonSchemaDate, isJsonSchemaDecimal, isJsonSchemaEnum, isJsonSchemaInteger, isJsonSchemaKeywords, isJsonSchemaLiteral, isJsonSchemaMap, isJsonSchemaNativeEnum, isJsonSchemaNever, isJsonSchemaNull, isJsonSchemaNullable, isJsonSchemaNumber, isJsonSchemaObject, isJsonSchemaPrimitiveType, isJsonSchemaPrimitiveUnion, isJsonSchemaRecord, isJsonSchemaRef, isJsonSchemaSet, isJsonSchemaString, isJsonSchemaTuple, isJsonSchemaType, isJsonSchemaUndefined, isJsonSchemaUnion, isJsonSchemaUnknown, isNullOnlyJsonSchema, isPropertyOptional, isSchema, isSchemaNullable, isSchemaObject, isSchemaOf, isSchemaWithSource, isStandardSchema, isUntypedConfig, isUntypedConfigStrict, isUntypedInput, isUntypedInputStrict, isUntypedSchema, isUntypedSchemaStrict, isValibotSchema, isValidSchemaConfigFile, isValidSchemaInputFile, mapStorageToFileSystem, merge, mergeMetadata, normalizeKey, readSchemaTypes, traverseSchema };
694
+ export { type BaseExtractOptions, type BaseSchemaSource, type ExtractedSchemaEnvelope, GetPropertyResult, type InferExtractOptions, JSON_SCHEMA_ANY, JSON_SCHEMA_CONSTRUCTOR_KEY, JSON_SCHEMA_METADATA_KEYS, JSON_SCHEMA_PRIMITIVE_TYPES, JSON_SCHEMA_TYPES, type JsonSchema, type JsonSchemaAllOf, type JsonSchemaAny, type JsonSchemaAnyOf, type JsonSchemaArray, type JsonSchemaBigint, type JsonSchemaBoolean, type JsonSchemaConditionalKeywords, type JsonSchemaDate, type JsonSchemaDecimal, type JsonSchemaDecimalFormat, type JsonSchemaEnum, type JsonSchemaFunction, type JsonSchemaFunctionParameter, type JsonSchemaInteger, type JsonSchemaIntegerFormat, type JsonSchemaKeywords, type JsonSchemaLike, type JsonSchemaLiteral, type JsonSchemaLogicKeywords, type JsonSchemaMap, type JsonSchemaMetadataKeywords, type JsonSchemaNativeEnum, type JsonSchemaNever, type JsonSchemaNull, type JsonSchemaNullable, type JsonSchemaNumber, type JsonSchemaNumberFormat, type JsonSchemaObject, type JsonSchemaOf, type JsonSchemaPrimitiveType, type JsonSchemaPrimitiveUnion, type JsonSchemaRecord, type JsonSchemaRecordPropertyNames, type JsonSchemaRef, type JsonSchemaSchemaSource, type JsonSchemaSet, type JsonSchemaString, type JsonSchemaStringFormat, type JsonSchemaTuple, type JsonSchemaType, JsonSchemaTypeNames, type JsonSchemaUndefined, type JsonSchemaUnion, type JsonSchemaUnknown, type ReflectionSchemaSource, SCHEMA_ARRAY_CONCAT_KEYWORDS, SCHEMA_RECORD_KEYWORDS, SCHEMA_SINGLE_KEYWORDS, type SchemaConfig, type SchemaConfigVariant, type SchemaEnvelope, type SchemaEnvelopeOf, type SchemaSource, type SchemaSourceConfig, type SchemaSourceVariant, type SpecOf, type StandardSchemaSchemaSource, type UntypedConfigObject, type UntypedSchema, type UntypedSchemaSource, type ValibotSchema, type ValibotSchemaSource, type Zod3SchemaSource, addProperty, applyJsonSchemaMetadata, assertSchemasDoNotContradict, bundleReferences, createDeepkitPlugin, createStoragePromises, extract, extractHash, extractJsonSchema, extractReflection, extractResolvedVariant, extractSchema, extractSchemaWithSource, extractSource, extractTSType, extractVariant, findSchemaContradictions, getJsonSchema, getJsonSchemaObject, getPrimarySchemaType, getProperties, getPropertiesList, getProperty, hasJsonSchemaConstructorFlag, isFileReference, isJsonSchema, isJsonSchemaAllOf, isJsonSchemaAny, isJsonSchemaAnyOf, isJsonSchemaArray, isJsonSchemaBigint, isJsonSchemaBoolean, isJsonSchemaDate, isJsonSchemaDecimal, isJsonSchemaEnum, isJsonSchemaInteger, isJsonSchemaKeywords, isJsonSchemaLiteral, isJsonSchemaMap, isJsonSchemaNativeEnum, isJsonSchemaNever, isJsonSchemaNull, isJsonSchemaNullable, isJsonSchemaNumber, isJsonSchemaObject, isJsonSchemaPrimitiveType, isJsonSchemaPrimitiveUnion, isJsonSchemaRecord, isJsonSchemaRef, isJsonSchemaSet, isJsonSchemaString, isJsonSchemaTuple, isJsonSchemaType, isJsonSchemaUndefined, isJsonSchemaUnion, isJsonSchemaUnknown, isNullOnlyJsonSchema, isPropertyOptional, isSchema, isSchemaNullable, isSchemaObject, isSchemaOf, isSchemaWithSource, isStandardSchema, isUntypedConfig, isUntypedConfigStrict, isUntypedInput, isUntypedInputStrict, isUntypedSchema, isUntypedSchemaStrict, isValibotSchema, isValidSchemaConfigFile, isValidSchemaInputFile, mapStorageToFileSystem, merge, mergeMetadata, normalizeKey, readSchemaTypes, traverseSchema };
680
695
  //# sourceMappingURL=index.d.mts.map
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import { i as ReflectionTransformer, n as Cache, r as DeclarationTransformer } f
2
2
  import { a as JSON_SCHEMA_TYPES, c as SCHEMA_RECORD_KEYWORDS, i as JSON_SCHEMA_PRIMITIVE_TYPES, l as SCHEMA_SINGLE_KEYWORDS, n as JSON_SCHEMA_CONSTRUCTOR_KEY, o as JsonSchemaTypeNames, r as JSON_SCHEMA_METADATA_KEYS, s as SCHEMA_ARRAY_CONCAT_KEYWORDS, t as JSON_SCHEMA_ANY } from "./constants-D0asFRyy.mjs";
3
3
  import { $ as isUntypedConfig, A as isJsonSchemaNativeEnum, B as isJsonSchemaSet, C as isJsonSchemaDate, D as isJsonSchemaKeywords, E as isJsonSchemaInteger, F as isJsonSchemaObject, G as isJsonSchemaUnion, H as isJsonSchemaTuple, I as isJsonSchemaPrimitiveType, J as isSchema, K as isJsonSchemaUnknown, L as isJsonSchemaPrimitiveUnion, M as isJsonSchemaNull, N as isJsonSchemaNullable, O as isJsonSchemaLiteral, P as isJsonSchemaNumber, Q as isStandardSchema, R as isJsonSchemaRecord, S as isJsonSchemaBoolean, T as isJsonSchemaEnum, U as isJsonSchemaType, V as isJsonSchemaString, W as isJsonSchemaUndefined, X as isSchemaOf, Y as isSchemaObject, Z as isSchemaWithSource, _ as isJsonSchemaAllOf, a as getPropertiesList, at as isValibotSchema, b as isJsonSchemaArray, c as isSchemaNullable, ct as readSchemaTypes, d as merge, et as isUntypedConfigStrict, f as mergeMetadata, g as isJsonSchema, h as isFileReference, i as getProperties, it as isUntypedSchemaStrict, j as isJsonSchemaNever, k as isJsonSchemaMap, l as isValidSchemaConfigFile, m as hasJsonSchemaConstructorFlag, n as getJsonSchema, nt as isUntypedInputStrict, o as getProperty, ot as applyJsonSchemaMetadata, p as traverseSchema, q as isNullOnlyJsonSchema, r as getJsonSchemaObject, rt as isUntypedSchema, s as isPropertyOptional, st as getPrimarySchemaType, t as addProperty, tt as isUntypedInput, u as isValidSchemaInputFile, v as isJsonSchemaAny, w as isJsonSchemaDecimal, x as isJsonSchemaBigint, y as isJsonSchemaAnyOf, z as isJsonSchemaRef } from "./helpers-BCP4VzlJ.mjs";
4
4
  import { getJsonSchemaType } from "./codegen.mjs";
5
- import { n as createStoragePromises, r as normalizeKey, t as mapStorageToFileSystem } from "./storage-BmKqiKj7.mjs";
5
+ import { n as createStoragePromises, r as normalizeKey, t as mapStorageToFileSystem } from "./storage-DEe8ZAMI.mjs";
6
6
  import { isSetObject } from "@stryke/type-checks/is-set-object";
7
7
  import { isSetString } from "@stryke/type-checks/is-set-string";
8
8
  import { isBigInt, isBoolean, isEmptyObject, isInteger, isNull, isNumber, isObject, isRegExp, isSetArray, isSetObject as isSetObject$1, isSetString as isSetString$1, isString, isUndefined } from "@stryke/type-checks";
@@ -938,6 +938,17 @@ async function readSourceFile(path, fs) {
938
938
  return;
939
939
  }
940
940
  }
941
+ /**
942
+ * Creates an [esbuild](https://esbuild.github.io) plugin that uses the Deepkit Type reflection to transpile TypeScript code into JSON Schema.
943
+ *
944
+ * @see https://deepkit.io/en/documentation/runtime-types/reflection
945
+ * @see https://www.typescriptlang.org/docs/handbook/2/types-from-types.html
946
+ * @see https://github.com/esbuild/esbuild
947
+ * @see https://github.com/esbuild/esbuild/blob/main/docs/plugins.md
948
+ *
949
+ * @param options - The options for the plugin.
950
+ * @returns The esbuild plugin.
951
+ */
941
952
  function createDeepkitPlugin(options) {
942
953
  return {
943
954
  name: "power-plant:deepkit",
@@ -1186,5 +1197,5 @@ async function extract(input, options = {}) {
1186
1197
  }
1187
1198
 
1188
1199
  //#endregion
1189
- export { JSON_SCHEMA_ANY, JSON_SCHEMA_CONSTRUCTOR_KEY, JSON_SCHEMA_METADATA_KEYS, JSON_SCHEMA_PRIMITIVE_TYPES, JSON_SCHEMA_TYPES, JsonSchemaTypeNames, SCHEMA_ARRAY_CONCAT_KEYWORDS, SCHEMA_RECORD_KEYWORDS, SCHEMA_SINGLE_KEYWORDS, addProperty, applyJsonSchemaMetadata, assertSchemasDoNotContradict, bundleReferences, createStoragePromises, extract, extractHash, extractJsonSchema, extractReflection, extractResolvedVariant, extractSchema, extractSchemaWithSource, extractSource, extractTSType, extractVariant, findSchemaContradictions, getJsonSchema, getJsonSchemaObject, getPrimarySchemaType, getProperties, getPropertiesList, getProperty, hasJsonSchemaConstructorFlag, isFileReference, isJsonSchema, isJsonSchemaAllOf, isJsonSchemaAny, isJsonSchemaAnyOf, isJsonSchemaArray, isJsonSchemaBigint, isJsonSchemaBoolean, isJsonSchemaDate, isJsonSchemaDecimal, isJsonSchemaEnum, isJsonSchemaInteger, isJsonSchemaKeywords, isJsonSchemaLiteral, isJsonSchemaMap, isJsonSchemaNativeEnum, isJsonSchemaNever, isJsonSchemaNull, isJsonSchemaNullable, isJsonSchemaNumber, isJsonSchemaObject, isJsonSchemaPrimitiveType, isJsonSchemaPrimitiveUnion, isJsonSchemaRecord, isJsonSchemaRef, isJsonSchemaSet, isJsonSchemaString, isJsonSchemaTuple, isJsonSchemaType, isJsonSchemaUndefined, isJsonSchemaUnion, isJsonSchemaUnknown, isNullOnlyJsonSchema, isPropertyOptional, isSchema, isSchemaNullable, isSchemaObject, isSchemaOf, isSchemaWithSource, isStandardSchema, isUntypedConfig, isUntypedConfigStrict, isUntypedInput, isUntypedInputStrict, isUntypedSchema, isUntypedSchemaStrict, isValibotSchema, isValidSchemaConfigFile, isValidSchemaInputFile, mapStorageToFileSystem, merge, mergeMetadata, normalizeKey, readSchemaTypes, traverseSchema };
1200
+ export { JSON_SCHEMA_ANY, JSON_SCHEMA_CONSTRUCTOR_KEY, JSON_SCHEMA_METADATA_KEYS, JSON_SCHEMA_PRIMITIVE_TYPES, JSON_SCHEMA_TYPES, JsonSchemaTypeNames, SCHEMA_ARRAY_CONCAT_KEYWORDS, SCHEMA_RECORD_KEYWORDS, SCHEMA_SINGLE_KEYWORDS, addProperty, applyJsonSchemaMetadata, assertSchemasDoNotContradict, bundleReferences, createDeepkitPlugin, createStoragePromises, extract, extractHash, extractJsonSchema, extractReflection, extractResolvedVariant, extractSchema, extractSchemaWithSource, extractSource, extractTSType, extractVariant, findSchemaContradictions, getJsonSchema, getJsonSchemaObject, getPrimarySchemaType, getProperties, getPropertiesList, getProperty, hasJsonSchemaConstructorFlag, isFileReference, isJsonSchema, isJsonSchemaAllOf, isJsonSchemaAny, isJsonSchemaAnyOf, isJsonSchemaArray, isJsonSchemaBigint, isJsonSchemaBoolean, isJsonSchemaDate, isJsonSchemaDecimal, isJsonSchemaEnum, isJsonSchemaInteger, isJsonSchemaKeywords, isJsonSchemaLiteral, isJsonSchemaMap, isJsonSchemaNativeEnum, isJsonSchemaNever, isJsonSchemaNull, isJsonSchemaNullable, isJsonSchemaNumber, isJsonSchemaObject, isJsonSchemaPrimitiveType, isJsonSchemaPrimitiveUnion, isJsonSchemaRecord, isJsonSchemaRef, isJsonSchemaSet, isJsonSchemaString, isJsonSchemaTuple, isJsonSchemaType, isJsonSchemaUndefined, isJsonSchemaUnion, isJsonSchemaUnknown, isNullOnlyJsonSchema, isPropertyOptional, isSchema, isSchemaNullable, isSchemaObject, isSchemaOf, isSchemaWithSource, isStandardSchema, isUntypedConfig, isUntypedConfigStrict, isUntypedInput, isUntypedInputStrict, isUntypedSchema, isUntypedSchemaStrict, isValibotSchema, isValidSchemaConfigFile, isValidSchemaInputFile, mapStorageToFileSystem, merge, mergeMetadata, normalizeKey, readSchemaTypes, traverseSchema };
1190
1201
  //# sourceMappingURL=index.mjs.map
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_storage = require('../storage-DcXkFGvG.cjs');
2
+ const require_storage = require('../storage-BLfnq6kZ.cjs');
3
3
 
4
4
  exports.createStoragePromises = require_storage.createStoragePromises;
5
5
  exports.mapStorageToFileSystem = require_storage.mapStorageToFileSystem;
@@ -1,3 +1,3 @@
1
- import { n as createStoragePromises, r as normalizeKey, t as mapStorageToFileSystem } from "../storage-BmKqiKj7.mjs";
1
+ import { n as createStoragePromises, r as normalizeKey, t as mapStorageToFileSystem } from "../storage-DEe8ZAMI.mjs";
2
2
 
3
3
  export { createStoragePromises, mapStorageToFileSystem, normalizeKey };
@@ -1,4 +1,5 @@
1
1
  const require_rolldown_runtime = require('./rolldown-runtime-C24Yb2bl.cjs');
2
+ let node_fs_promises = require("node:fs/promises");
2
3
  let node_events = require("node:events");
3
4
  let node_fs = require("node:fs");
4
5
  node_fs = require_rolldown_runtime.__toESM(node_fs, 1);
@@ -197,14 +198,14 @@ function createStoragePromises(storage) {
197
198
  }
198
199
  async function readStoredFile(path, options) {
199
200
  const encoding = getEncoding(options);
201
+ const key = normalizeKey(path);
200
202
  try {
201
- const key = normalizeKey(path);
202
203
  if ((await requireEntry(key, true)).type !== "file") throw createFsError("EISDIR", "read", key, "EISDIR: illegal operation on a directory, read");
203
204
  const value = shouldReadRaw(options) ? await storage.getItemRaw(key) : await storage.getItem(key);
204
205
  if (value == null) throw createFsError("ENOENT", "open", key);
205
206
  return decodeStoredValue(value, encoding);
206
207
  } catch (error) {
207
- if ((0, node_fs.existsSync)(key)) return (0, node_fs.readFileSync)(key, encoding);
208
+ if ((0, node_fs.existsSync)(key)) return (0, node_fs_promises.readFile)(key, encoding);
208
209
  throw error;
209
210
  }
210
211
  }
@@ -1,6 +1,7 @@
1
+ import { readFile } from "node:fs/promises";
1
2
  import { EventEmitter } from "node:events";
2
3
  import * as nodeFs from "node:fs";
3
- import { Stats, constants, existsSync, readFileSync } from "node:fs";
4
+ import { Stats, constants, existsSync } from "node:fs";
4
5
  import { callbackify } from "node:util";
5
6
  import { correctPath } from "@stryke/path/correct-path";
6
7
  import { Buffer } from "node:buffer";
@@ -196,14 +197,14 @@ function createStoragePromises(storage) {
196
197
  }
197
198
  async function readStoredFile(path, options) {
198
199
  const encoding = getEncoding(options);
200
+ const key = normalizeKey(path);
199
201
  try {
200
- const key = normalizeKey(path);
201
202
  if ((await requireEntry(key, true)).type !== "file") throw createFsError("EISDIR", "read", key, "EISDIR: illegal operation on a directory, read");
202
203
  const value = shouldReadRaw(options) ? await storage.getItemRaw(key) : await storage.getItem(key);
203
204
  if (value == null) throw createFsError("ENOENT", "open", key);
204
205
  return decodeStoredValue(value, encoding);
205
206
  } catch (error) {
206
- if (existsSync(key)) return readFileSync(key, encoding);
207
+ if (existsSync(key)) return readFile(key, encoding);
207
208
  throw error;
208
209
  }
209
210
  }
@@ -917,4 +918,4 @@ function mapStorageToFileSystem(storage) {
917
918
 
918
919
  //#endregion
919
920
  export { createStoragePromises as n, normalizeKey as r, mapStorageToFileSystem as t };
920
- //# sourceMappingURL=storage-BmKqiKj7.mjs.map
921
+ //# sourceMappingURL=storage-DEe8ZAMI.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage-DEe8ZAMI.mjs","names":[],"sources":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@power-plant/schema",
3
- "version": "0.0.64",
3
+ "version": "0.0.66",
4
4
  "private": false,
5
5
  "description": "A Power Plant utility package to help managing schemas.",
6
6
  "keywords": [
@@ -137,20 +137,20 @@
137
137
  "@deepkit/type-spec": "^1.0.19",
138
138
  "@marcj/ts-clone-node": "^2.2.0",
139
139
  "@standard-schema/spec": "^1.1.0",
140
- "@stryke/convert": "^0.7.30",
141
- "@stryke/date": "^0.0.11",
142
- "@stryke/fs": "^0.33.100",
143
- "@stryke/hash": "^0.13.53",
144
- "@stryke/helpers": "^0.10.39",
145
- "@stryke/json": "^0.15.23",
146
- "@stryke/path": "^0.29.26",
147
- "@stryke/resolve": "^0.0.15",
148
- "@stryke/string-format": "^0.17.41",
149
- "@stryke/type-checks": "^0.6.32",
150
- "@stryke/types": "^0.12.27",
151
- "@stryke/unique-id": "^0.3.111",
152
- "@stryke/url": "^0.4.50",
153
- "@stryke/zod": "^0.3.45",
140
+ "@stryke/convert": "^0.7.32",
141
+ "@stryke/date": "^0.0.13",
142
+ "@stryke/fs": "^0.33.102",
143
+ "@stryke/hash": "^0.13.55",
144
+ "@stryke/helpers": "^0.10.41",
145
+ "@stryke/json": "^0.15.25",
146
+ "@stryke/path": "^0.29.28",
147
+ "@stryke/resolve": "^0.0.17",
148
+ "@stryke/string-format": "^0.17.43",
149
+ "@stryke/type-checks": "^0.6.34",
150
+ "@stryke/types": "^0.12.29",
151
+ "@stryke/unique-id": "^0.3.113",
152
+ "@stryke/url": "^0.4.52",
153
+ "@stryke/zod": "^0.3.47",
154
154
  "@typescript/vfs": "^1.6.4",
155
155
  "@valibot/to-json-schema": "^1.7.1",
156
156
  "braces": "^3.0.3",
@@ -169,9 +169,9 @@
169
169
  },
170
170
  "devDependencies": {
171
171
  "@deepkit/type-compiler": "1.0.19",
172
- "@powerlines/plugin-tsdown": "^0.1.584",
172
+ "@powerlines/plugin-tsdown": "^0.1.586",
173
173
  "@types/node": "^25.9.5",
174
- "powerlines": "^0.47.183",
174
+ "powerlines": "^0.47.185",
175
175
  "valibot": "^1.4.2",
176
176
  "zod": "^4.4.3"
177
177
  },
@@ -185,5 +185,5 @@
185
185
  },
186
186
  "publishConfig": { "access": "public" },
187
187
  "inlinedDependencies": { "@deepkit/type-compiler": "1.0.19" },
188
- "gitHead": "bf13911297f475116c08675146d3dce35ebe6e84"
188
+ "gitHead": "9eb43980726a62e294b4eb083642788dd83ab3b8"
189
189
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"storage-BmKqiKj7.mjs","names":[],"sources":[],"mappings":""}