@power-plant/schema 0.0.28 → 0.0.30
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/codegen.d.cts +1 -1
- package/dist/codegen.d.mts +1 -1
- package/dist/index.cjs +12 -4
- package/dist/index.d.cts +2 -5
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +2 -5
- package/dist/index.mjs +12 -4
- package/dist/{types--ig4SQ4Y.d.cts → types-CjF4wIDK.d.mts} +12 -2
- package/dist/types-CjF4wIDK.d.mts.map +1 -0
- package/dist/{types-CINa5E2f.d.mts → types-hfHmxKG0.d.cts} +12 -2
- package/dist/{types--ig4SQ4Y.d.cts.map → types-hfHmxKG0.d.cts.map} +1 -1
- package/dist/valibot.d.cts +1 -1
- package/dist/valibot.d.mts +1 -1
- package/dist/zod.d.cts +1 -1
- package/dist/zod.d.mts +1 -1
- package/package.json +4 -4
- package/dist/types-CINa5E2f.d.mts.map +0 -1
package/dist/codegen.d.cts
CHANGED
package/dist/codegen.d.mts
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -12,6 +12,7 @@ let _stryke_hash = require("@stryke/hash");
|
|
|
12
12
|
let _stryke_helpers_deep_clone = require("@stryke/helpers/deep-clone");
|
|
13
13
|
let _stryke_json = require("@stryke/json");
|
|
14
14
|
let _stryke_path_find = require("@stryke/path/find");
|
|
15
|
+
let _stryke_path_replace = require("@stryke/path/replace");
|
|
15
16
|
let _stryke_resolve_constants = require("@stryke/resolve/constants");
|
|
16
17
|
let _stryke_resolve_load = require("@stryke/resolve/load");
|
|
17
18
|
let _stryke_string_format_list = require("@stryke/string-format/list");
|
|
@@ -561,8 +562,9 @@ async function extractTSType(input, options = {}) {
|
|
|
561
562
|
const exportName = fileReference.export ?? "*";
|
|
562
563
|
const resolvedPath = await (0, _stryke_fs_resolve.resolveSafe)(fileReference.file, { fs: options.fs });
|
|
563
564
|
const filePath = resolvedPath || fileReference.file;
|
|
565
|
+
const tsconfig = options.tsconfig ? (0, _stryke_path_replace.replacePath)(options.tsconfig, options.cwd || process.cwd()) : void 0;
|
|
564
566
|
try {
|
|
565
|
-
|
|
567
|
+
const generatorConfig = {
|
|
566
568
|
path: filePath,
|
|
567
569
|
type: exportName,
|
|
568
570
|
expose: "all",
|
|
@@ -570,9 +572,15 @@ async function extractTSType(input, options = {}) {
|
|
|
570
572
|
markdownDescription: true,
|
|
571
573
|
fullDescription: true,
|
|
572
574
|
skipTypeCheck: true,
|
|
573
|
-
tsProgram: createProgramFromFileSystem(filePath,
|
|
574
|
-
|
|
575
|
-
|
|
575
|
+
tsProgram: createProgramFromFileSystem(filePath, {
|
|
576
|
+
...options,
|
|
577
|
+
tsconfig
|
|
578
|
+
}),
|
|
579
|
+
...options,
|
|
580
|
+
tsconfig
|
|
581
|
+
};
|
|
582
|
+
options.logger?.debug?.(`Generating JSON schema for "${filePath}" using the type "${exportName}" with the following configuration: ${JSON.stringify(generatorConfig, null, 2)}`);
|
|
583
|
+
return (0, ts_json_schema_generator_dist_factory_generator_js.createGenerator)(generatorConfig).createSchema(exportName);
|
|
576
584
|
} catch (error) {
|
|
577
585
|
throw new Error(`Failed to generate a JSON schema for "${fileReference.file}"${resolvedPath && resolvedPath !== fileReference.file ? ` (resolved: ${resolvedPath})` : ""} using the type "${exportName}". Error: ${error.message}`);
|
|
578
586
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as SchemaSourceVariant, A as JsonSchemaNumberFormat, B as JsonSchemaString, C as JsonSchemaMap, D as JsonSchemaNull, E as JsonSchemaNever, F as JsonSchemaRecord, G as JsonSchemaUnion, H as JsonSchemaTuple, I as JsonSchemaRecordPropertyNames, J as SchemaConfigVariant, K as JsonSchemaUnknown, L as JsonSchemaRef, M as JsonSchemaOf, N as JsonSchemaPrimitiveType, O as JsonSchemaNullable, P as JsonSchemaPrimitiveUnion, Q as SchemaSourceConfig, R as JsonSchemaSchemaSource, S as JsonSchemaLogicKeywords, T as JsonSchemaNativeEnum, U as JsonSchemaType, V as JsonSchemaStringFormat, W as JsonSchemaUndefined, X as SchemaEnvelopeOf, Y as SchemaEnvelope, Z as SchemaSource, _ as JsonSchemaInteger, a as JsonSchema, at as ValibotSchema, b as JsonSchemaLike, c as JsonSchemaAnyOf, ct as JSON_SCHEMA_METADATA_KEYS, d as JsonSchemaBoolean, dt as JsonSchemaTypeNames, et as SpecOf, f as JsonSchemaConditionalKeywords, ft as SCHEMA_ARRAY_CONCAT_KEYWORDS, g as JsonSchemaEnum, h as JsonSchemaDecimalFormat, i as InferExtractOptions, it as UntypedSchemaSource, j as JsonSchemaObject, k as JsonSchemaNumber, l as JsonSchemaArray, lt as JSON_SCHEMA_PRIMITIVE_TYPES, m as JsonSchemaDecimal, mt as SCHEMA_SINGLE_KEYWORDS, n as BaseSchemaSource, nt as UntypedConfigObject, o as JsonSchemaAllOf, ot as ValibotSchemaSource, p as JsonSchemaDate, pt as SCHEMA_RECORD_KEYWORDS, q as SchemaConfig, r as ExtractedSchemaEnvelope, rt as UntypedSchema, s as JsonSchemaAny, st as Zod3SchemaSource, t as BaseExtractOptions, tt as StandardSchemaSchemaSource, u as JsonSchemaBigint, ut as JSON_SCHEMA_TYPES, v as JsonSchemaIntegerFormat, w as JsonSchemaMetadataKeywords, x as JsonSchemaLiteral, y as JsonSchemaKeywords, z as JsonSchemaSet } from "./types
|
|
1
|
+
import { $ as SchemaSourceVariant, A as JsonSchemaNumberFormat, B as JsonSchemaString, C as JsonSchemaMap, D as JsonSchemaNull, E as JsonSchemaNever, F as JsonSchemaRecord, G as JsonSchemaUnion, H as JsonSchemaTuple, I as JsonSchemaRecordPropertyNames, J as SchemaConfigVariant, K as JsonSchemaUnknown, L as JsonSchemaRef, M as JsonSchemaOf, N as JsonSchemaPrimitiveType, O as JsonSchemaNullable, P as JsonSchemaPrimitiveUnion, Q as SchemaSourceConfig, R as JsonSchemaSchemaSource, S as JsonSchemaLogicKeywords, T as JsonSchemaNativeEnum, U as JsonSchemaType, V as JsonSchemaStringFormat, W as JsonSchemaUndefined, X as SchemaEnvelopeOf, Y as SchemaEnvelope, Z as SchemaSource, _ as JsonSchemaInteger, a as JsonSchema, at as ValibotSchema, b as JsonSchemaLike, c as JsonSchemaAnyOf, ct as JSON_SCHEMA_METADATA_KEYS, d as JsonSchemaBoolean, dt as JsonSchemaTypeNames, et as SpecOf, f as JsonSchemaConditionalKeywords, ft as SCHEMA_ARRAY_CONCAT_KEYWORDS, g as JsonSchemaEnum, h as JsonSchemaDecimalFormat, i as InferExtractOptions, it as UntypedSchemaSource, j as JsonSchemaObject, k as JsonSchemaNumber, l as JsonSchemaArray, lt as JSON_SCHEMA_PRIMITIVE_TYPES, m as JsonSchemaDecimal, mt as SCHEMA_SINGLE_KEYWORDS, n as BaseSchemaSource, nt as UntypedConfigObject, o as JsonSchemaAllOf, ot as ValibotSchemaSource, p as JsonSchemaDate, pt as SCHEMA_RECORD_KEYWORDS, q as SchemaConfig, r as ExtractedSchemaEnvelope, rt as UntypedSchema, s as JsonSchemaAny, st as Zod3SchemaSource, t as BaseExtractOptions, tt as StandardSchemaSchemaSource, u as JsonSchemaBigint, ut as JSON_SCHEMA_TYPES, v as JsonSchemaIntegerFormat, w as JsonSchemaMetadataKeywords, x as JsonSchemaLiteral, y as JsonSchemaKeywords, z as JsonSchemaSet } from "./types-hfHmxKG0.cjs";
|
|
2
2
|
import { n as createStoragePromises, r as normalizeKey, t as mapStorageToFileSystem } from "./index-ldf5lukz.cjs";
|
|
3
3
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
4
4
|
import { InferLoadOptions } from "@stryke/resolve/types";
|
|
@@ -90,10 +90,7 @@ declare function extractSource(variant: SchemaSourceVariant, input: SchemaSource
|
|
|
90
90
|
* @param options - Optional overrides reserved for API compatibility.
|
|
91
91
|
* @returns A promise that resolves to the generated JSON Schema.
|
|
92
92
|
*/
|
|
93
|
-
declare function extractTSType(input: FileReferenceInput, options?: InferLoadOptions<typeof input> &
|
|
94
|
-
tsconfig?: string;
|
|
95
|
-
cwd?: string;
|
|
96
|
-
}): Promise<JsonSchema>;
|
|
93
|
+
declare function extractTSType(input: FileReferenceInput, options?: InferLoadOptions<typeof input> & BaseExtractOptions): Promise<JsonSchema>;
|
|
97
94
|
/**
|
|
98
95
|
* Extracts a JSON Schema from a given schema definition input, which can be a Zod schema, a Valibot schema, any Standard JSON Schema type, a plain JSON Schema object, an untyped schema, or a {@link FileReferenceInput} to an exported TypeScript type definition or any of the previous options. If the input is a {@link FileReferenceInput} (e.g. a file path with an export), the source code will be bundled with [esbuild](esbuild.github.io) using [ts-json-schema-generator](https://github.com/vega/ts-json-schema-generator) to obtain the actual schema definition before extraction.
|
|
99
96
|
*
|
package/dist/index.d.cts.map
CHANGED
|
@@ -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":";;;;;;;;;;;;;;;;;;;;;;iBAwGgB,yBACd,MAAM,YACN,UAAU,YACV;;;;;;;;;iBAqHc,6BACd,MAAM,YACN,UAAU,YACV;;;;;;;;;
|
|
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":";;;;;;;;;;;;;;;;;;;;;;iBAwGgB,yBACd,MAAM,YACN,UAAU,YACV;;;;;;;;;iBAqHc,6BACd,MAAM,YACN,UAAU,YACV;;;;;;;;;iBCmOc,iBAAiB,QAAQ,aAAa;;;;iBAgMtC,YACd,SAAS,qBACT,OAAO;;;;;;;iBAgDO,kBAAkB,kBAAkB;;;;;;;;iBAoCpC,uBACd,OAAO,qBACN;;;;;;;iBA0Ba,eAAe,OAAO,eAAe;;;;;;;;;iBAsB/B,cACpB,OAAO,oBACP,UAAU,sBACT,QAAQ;;;;;;;;;iBAmCK,cACd,SAAS,qB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;;;;;;;;;;iBAyD1C,sBAAsB,iBAAiB,SAAS;;;;;;;;;;iBAahD,gBAAgB,iBAAiB,SAAS;;;;;;;;;;;iBA0B1C,sBACd,iBACC,SAAS;;;;;;;iBAuBI,SAAS,iBAAiB,SAAS;;;;;;;iBAkBnC,WAAW,OACzB,iBACC,SAAS,iBAAiB;;;;;;;iBAUb,mBAAmB,iBAAiB,SAAS;;;;;;;iBAiB7C,eACd,iBACC,SAAS,eAAe"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as SchemaSourceVariant, A as JsonSchemaNumberFormat, B as JsonSchemaString, C as JsonSchemaMap, D as JsonSchemaNull, E as JsonSchemaNever, F as JsonSchemaRecord, G as JsonSchemaUnion, H as JsonSchemaTuple, I as JsonSchemaRecordPropertyNames, J as SchemaConfigVariant, K as JsonSchemaUnknown, L as JsonSchemaRef, M as JsonSchemaOf, N as JsonSchemaPrimitiveType, O as JsonSchemaNullable, P as JsonSchemaPrimitiveUnion, Q as SchemaSourceConfig, R as JsonSchemaSchemaSource, S as JsonSchemaLogicKeywords, T as JsonSchemaNativeEnum, U as JsonSchemaType, V as JsonSchemaStringFormat, W as JsonSchemaUndefined, X as SchemaEnvelopeOf, Y as SchemaEnvelope, Z as SchemaSource, _ as JsonSchemaInteger, a as JsonSchema, at as ValibotSchema, b as JsonSchemaLike, c as JsonSchemaAnyOf, ct as JSON_SCHEMA_METADATA_KEYS, d as JsonSchemaBoolean, dt as JsonSchemaTypeNames, et as SpecOf, f as JsonSchemaConditionalKeywords, ft as SCHEMA_ARRAY_CONCAT_KEYWORDS, g as JsonSchemaEnum, h as JsonSchemaDecimalFormat, i as InferExtractOptions, it as UntypedSchemaSource, j as JsonSchemaObject, k as JsonSchemaNumber, l as JsonSchemaArray, lt as JSON_SCHEMA_PRIMITIVE_TYPES, m as JsonSchemaDecimal, mt as SCHEMA_SINGLE_KEYWORDS, n as BaseSchemaSource, nt as UntypedConfigObject, o as JsonSchemaAllOf, ot as ValibotSchemaSource, p as JsonSchemaDate, pt as SCHEMA_RECORD_KEYWORDS, q as SchemaConfig, r as ExtractedSchemaEnvelope, rt as UntypedSchema, s as JsonSchemaAny, st as Zod3SchemaSource, t as BaseExtractOptions, tt as StandardSchemaSchemaSource, u as JsonSchemaBigint, ut as JSON_SCHEMA_TYPES, v as JsonSchemaIntegerFormat, w as JsonSchemaMetadataKeywords, x as JsonSchemaLiteral, y as JsonSchemaKeywords, z as JsonSchemaSet } from "./types-
|
|
1
|
+
import { $ as SchemaSourceVariant, A as JsonSchemaNumberFormat, B as JsonSchemaString, C as JsonSchemaMap, D as JsonSchemaNull, E as JsonSchemaNever, F as JsonSchemaRecord, G as JsonSchemaUnion, H as JsonSchemaTuple, I as JsonSchemaRecordPropertyNames, J as SchemaConfigVariant, K as JsonSchemaUnknown, L as JsonSchemaRef, M as JsonSchemaOf, N as JsonSchemaPrimitiveType, O as JsonSchemaNullable, P as JsonSchemaPrimitiveUnion, Q as SchemaSourceConfig, R as JsonSchemaSchemaSource, S as JsonSchemaLogicKeywords, T as JsonSchemaNativeEnum, U as JsonSchemaType, V as JsonSchemaStringFormat, W as JsonSchemaUndefined, X as SchemaEnvelopeOf, Y as SchemaEnvelope, Z as SchemaSource, _ as JsonSchemaInteger, a as JsonSchema, at as ValibotSchema, b as JsonSchemaLike, c as JsonSchemaAnyOf, ct as JSON_SCHEMA_METADATA_KEYS, d as JsonSchemaBoolean, dt as JsonSchemaTypeNames, et as SpecOf, f as JsonSchemaConditionalKeywords, ft as SCHEMA_ARRAY_CONCAT_KEYWORDS, g as JsonSchemaEnum, h as JsonSchemaDecimalFormat, i as InferExtractOptions, it as UntypedSchemaSource, j as JsonSchemaObject, k as JsonSchemaNumber, l as JsonSchemaArray, lt as JSON_SCHEMA_PRIMITIVE_TYPES, m as JsonSchemaDecimal, mt as SCHEMA_SINGLE_KEYWORDS, n as BaseSchemaSource, nt as UntypedConfigObject, o as JsonSchemaAllOf, ot as ValibotSchemaSource, p as JsonSchemaDate, pt as SCHEMA_RECORD_KEYWORDS, q as SchemaConfig, r as ExtractedSchemaEnvelope, rt as UntypedSchema, s as JsonSchemaAny, st as Zod3SchemaSource, t as BaseExtractOptions, tt as StandardSchemaSchemaSource, u as JsonSchemaBigint, ut as JSON_SCHEMA_TYPES, v as JsonSchemaIntegerFormat, w as JsonSchemaMetadataKeywords, x as JsonSchemaLiteral, y as JsonSchemaKeywords, z as JsonSchemaSet } from "./types-CjF4wIDK.mjs";
|
|
2
2
|
import { n as createStoragePromises, r as normalizeKey, t as mapStorageToFileSystem } from "./index-C7q4X7Bo.mjs";
|
|
3
3
|
import { BaseSchema } from "valibot";
|
|
4
4
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
@@ -90,10 +90,7 @@ declare function extractSource(variant: SchemaSourceVariant, input: SchemaSource
|
|
|
90
90
|
* @param options - Optional overrides reserved for API compatibility.
|
|
91
91
|
* @returns A promise that resolves to the generated JSON Schema.
|
|
92
92
|
*/
|
|
93
|
-
declare function extractTSType(input: FileReferenceInput, options?: InferLoadOptions<typeof input> &
|
|
94
|
-
tsconfig?: string;
|
|
95
|
-
cwd?: string;
|
|
96
|
-
}): Promise<JsonSchema>;
|
|
93
|
+
declare function extractTSType(input: FileReferenceInput, options?: InferLoadOptions<typeof input> & BaseExtractOptions): Promise<JsonSchema>;
|
|
97
94
|
/**
|
|
98
95
|
* Extracts a JSON Schema from a given schema definition input, which can be a Zod schema, a Valibot schema, any Standard JSON Schema type, a plain JSON Schema object, an untyped schema, or a {@link FileReferenceInput} to an exported TypeScript type definition or any of the previous options. If the input is a {@link FileReferenceInput} (e.g. a file path with an export), the source code will be bundled with [esbuild](esbuild.github.io) using [ts-json-schema-generator](https://github.com/vega/ts-json-schema-generator) to obtain the actual schema definition before extraction.
|
|
99
96
|
*
|
package/dist/index.mjs
CHANGED
|
@@ -10,6 +10,7 @@ import { murmurhash } from "@stryke/hash";
|
|
|
10
10
|
import { deepClone } from "@stryke/helpers/deep-clone";
|
|
11
11
|
import { isStandardJsonSchema } from "@stryke/json";
|
|
12
12
|
import { findFileExtensionSafe, findFilePath } from "@stryke/path/find";
|
|
13
|
+
import { replacePath } from "@stryke/path/replace";
|
|
13
14
|
import { VALID_OBJECT_SOURCE_EXTENSIONS } from "@stryke/resolve/constants";
|
|
14
15
|
import { loadSafe } from "@stryke/resolve/load";
|
|
15
16
|
import { list } from "@stryke/string-format/list";
|
|
@@ -558,8 +559,9 @@ async function extractTSType(input, options = {}) {
|
|
|
558
559
|
const exportName = fileReference.export ?? "*";
|
|
559
560
|
const resolvedPath = await resolveSafe(fileReference.file, { fs: options.fs });
|
|
560
561
|
const filePath = resolvedPath || fileReference.file;
|
|
562
|
+
const tsconfig = options.tsconfig ? replacePath(options.tsconfig, options.cwd || process.cwd()) : void 0;
|
|
561
563
|
try {
|
|
562
|
-
|
|
564
|
+
const generatorConfig = {
|
|
563
565
|
path: filePath,
|
|
564
566
|
type: exportName,
|
|
565
567
|
expose: "all",
|
|
@@ -567,9 +569,15 @@ async function extractTSType(input, options = {}) {
|
|
|
567
569
|
markdownDescription: true,
|
|
568
570
|
fullDescription: true,
|
|
569
571
|
skipTypeCheck: true,
|
|
570
|
-
tsProgram: createProgramFromFileSystem(filePath,
|
|
571
|
-
|
|
572
|
-
|
|
572
|
+
tsProgram: createProgramFromFileSystem(filePath, {
|
|
573
|
+
...options,
|
|
574
|
+
tsconfig
|
|
575
|
+
}),
|
|
576
|
+
...options,
|
|
577
|
+
tsconfig
|
|
578
|
+
};
|
|
579
|
+
options.logger?.debug?.(`Generating JSON schema for "${filePath}" using the type "${exportName}" with the following configuration: ${JSON.stringify(generatorConfig, null, 2)}`);
|
|
580
|
+
return createGenerator(generatorConfig).createSchema(exportName);
|
|
573
581
|
} catch (error) {
|
|
574
582
|
throw new Error(`Failed to generate a JSON schema for "${fileReference.file}"${resolvedPath && resolvedPath !== fileReference.file ? ` (resolved: ${resolvedPath})` : ""} using the type "${exportName}". Error: ${error.message}`);
|
|
575
583
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { BaseIssue, BaseSchema } from "valibot";
|
|
1
2
|
import { StandardJSONSchemaV1 } from "@standard-schema/spec";
|
|
2
3
|
import { InferLoadOptions, LoadReference } from "@stryke/resolve/types";
|
|
3
4
|
import { Config } from "ts-json-schema-generator/dist/src/Config.js";
|
|
4
5
|
import { Storage } from "unstorage";
|
|
5
6
|
import { InputObject, Schema } from "untyped";
|
|
6
|
-
import { BaseIssue, BaseSchema } from "valibot";
|
|
7
7
|
import * as z3 from "zod/v3";
|
|
8
8
|
//#region src/constants.d.ts
|
|
9
9
|
declare const JsonSchemaTypeNames: {
|
|
@@ -1204,6 +1204,12 @@ type SchemaSourceConfig<TSpec = any> = StandardJSONSchemaV1<TSpec> | JsonSchemaO
|
|
|
1204
1204
|
* @see {@link SchemaConfigWithMeta}
|
|
1205
1205
|
*/
|
|
1206
1206
|
type SchemaConfig<TSpec = any> = LoadReference | SchemaSourceConfig<TSpec> | SchemaEnvelope<JsonSchemaOf<TSpec>>;
|
|
1207
|
+
interface Logger {
|
|
1208
|
+
debug: (message: string) => void;
|
|
1209
|
+
info: (message: string) => void;
|
|
1210
|
+
warn: (message: string) => void;
|
|
1211
|
+
error: (message: string) => void;
|
|
1212
|
+
}
|
|
1207
1213
|
type BaseExtractOptions = {
|
|
1208
1214
|
/**
|
|
1209
1215
|
* An optional storage instance to use for caching schema extraction results. If provided, the storage instance will be used to store and retrieve cached schema extraction results, which can improve performance by avoiding redundant schema extraction operations. If not provided, the default storage mechanism will be used.
|
|
@@ -1213,6 +1219,10 @@ type BaseExtractOptions = {
|
|
|
1213
1219
|
* An optional working directory to use for resolving file references. If provided, the working directory will be used to resolve file references, which can improve performance by avoiding redundant file resolution operations. If not provided, the current working directory will be used.
|
|
1214
1220
|
*/
|
|
1215
1221
|
cwd?: string;
|
|
1222
|
+
/**
|
|
1223
|
+
* An optional logger to use for logging messages. If provided, the logger will be used to log messages, which can improve performance by avoiding redundant logging operations. If not provided, the default logger will be used.
|
|
1224
|
+
*/
|
|
1225
|
+
logger?: Logger;
|
|
1216
1226
|
} & Omit<Config, "path" | "type">;
|
|
1217
1227
|
type InferExtractOptions<T extends SchemaConfig> = (T extends LoadReference ? Omit<InferLoadOptions<T>, "fs"> : {}) & BaseExtractOptions;
|
|
1218
1228
|
/**
|
|
@@ -1337,4 +1347,4 @@ declare module "zod" {
|
|
|
1337
1347
|
}
|
|
1338
1348
|
//#endregion
|
|
1339
1349
|
export { SchemaSourceVariant as $, JsonSchemaNumberFormat as A, JsonSchemaString as B, JsonSchemaMap as C, JsonSchemaNull as D, JsonSchemaNever as E, JsonSchemaRecord as F, JsonSchemaUnion as G, JsonSchemaTuple as H, JsonSchemaRecordPropertyNames as I, SchemaConfigVariant as J, JsonSchemaUnknown as K, JsonSchemaRef as L, JsonSchemaOf as M, JsonSchemaPrimitiveType as N, JsonSchemaNullable as O, JsonSchemaPrimitiveUnion as P, SchemaSourceConfig as Q, JsonSchemaSchemaSource as R, JsonSchemaLogicKeywords as S, JsonSchemaNativeEnum as T, JsonSchemaType as U, JsonSchemaStringFormat as V, JsonSchemaUndefined as W, SchemaEnvelopeOf as X, SchemaEnvelope as Y, SchemaSource as Z, JsonSchemaInteger as _, JsonSchema as a, ValibotSchema as at, JsonSchemaLike as b, JsonSchemaAnyOf as c, JSON_SCHEMA_METADATA_KEYS as ct, JsonSchemaBoolean as d, JsonSchemaTypeNames as dt, SpecOf as et, JsonSchemaConditionalKeywords as f, SCHEMA_ARRAY_CONCAT_KEYWORDS as ft, JsonSchemaEnum as g, JsonSchemaDecimalFormat as h, InferExtractOptions as i, UntypedSchemaSource as it, JsonSchemaObject as j, JsonSchemaNumber as k, JsonSchemaArray as l, JSON_SCHEMA_PRIMITIVE_TYPES as lt, JsonSchemaDecimal as m, SCHEMA_SINGLE_KEYWORDS as mt, BaseSchemaSource as n, UntypedConfigObject as nt, JsonSchemaAllOf as o, ValibotSchemaSource as ot, JsonSchemaDate as p, SCHEMA_RECORD_KEYWORDS as pt, SchemaConfig as q, ExtractedSchemaEnvelope as r, UntypedSchema as rt, JsonSchemaAny as s, Zod3SchemaSource as st, BaseExtractOptions as t, StandardSchemaSchemaSource as tt, JsonSchemaBigint as u, JSON_SCHEMA_TYPES as ut, JsonSchemaIntegerFormat as v, JsonSchemaMetadataKeywords as w, JsonSchemaLiteral as x, JsonSchemaKeywords as y, JsonSchemaSet as z };
|
|
1340
|
-
//# sourceMappingURL=types
|
|
1350
|
+
//# sourceMappingURL=types-CjF4wIDK.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-CjF4wIDK.d.mts","names":[],"sources":["../src/constants.ts","../src/types.ts"],"mappings":""}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { BaseIssue, BaseSchema } from "valibot";
|
|
2
1
|
import { StandardJSONSchemaV1 } from "@standard-schema/spec";
|
|
3
2
|
import { InferLoadOptions, LoadReference } from "@stryke/resolve/types";
|
|
4
3
|
import { Config } from "ts-json-schema-generator/dist/src/Config.js";
|
|
5
4
|
import { Storage } from "unstorage";
|
|
6
5
|
import { InputObject, Schema } from "untyped";
|
|
6
|
+
import { BaseIssue, BaseSchema } from "valibot";
|
|
7
7
|
import * as z3 from "zod/v3";
|
|
8
8
|
//#region src/constants.d.ts
|
|
9
9
|
declare const JsonSchemaTypeNames: {
|
|
@@ -1204,6 +1204,12 @@ type SchemaSourceConfig<TSpec = any> = StandardJSONSchemaV1<TSpec> | JsonSchemaO
|
|
|
1204
1204
|
* @see {@link SchemaConfigWithMeta}
|
|
1205
1205
|
*/
|
|
1206
1206
|
type SchemaConfig<TSpec = any> = LoadReference | SchemaSourceConfig<TSpec> | SchemaEnvelope<JsonSchemaOf<TSpec>>;
|
|
1207
|
+
interface Logger {
|
|
1208
|
+
debug: (message: string) => void;
|
|
1209
|
+
info: (message: string) => void;
|
|
1210
|
+
warn: (message: string) => void;
|
|
1211
|
+
error: (message: string) => void;
|
|
1212
|
+
}
|
|
1207
1213
|
type BaseExtractOptions = {
|
|
1208
1214
|
/**
|
|
1209
1215
|
* An optional storage instance to use for caching schema extraction results. If provided, the storage instance will be used to store and retrieve cached schema extraction results, which can improve performance by avoiding redundant schema extraction operations. If not provided, the default storage mechanism will be used.
|
|
@@ -1213,6 +1219,10 @@ type BaseExtractOptions = {
|
|
|
1213
1219
|
* An optional working directory to use for resolving file references. If provided, the working directory will be used to resolve file references, which can improve performance by avoiding redundant file resolution operations. If not provided, the current working directory will be used.
|
|
1214
1220
|
*/
|
|
1215
1221
|
cwd?: string;
|
|
1222
|
+
/**
|
|
1223
|
+
* An optional logger to use for logging messages. If provided, the logger will be used to log messages, which can improve performance by avoiding redundant logging operations. If not provided, the default logger will be used.
|
|
1224
|
+
*/
|
|
1225
|
+
logger?: Logger;
|
|
1216
1226
|
} & Omit<Config, "path" | "type">;
|
|
1217
1227
|
type InferExtractOptions<T extends SchemaConfig> = (T extends LoadReference ? Omit<InferLoadOptions<T>, "fs"> : {}) & BaseExtractOptions;
|
|
1218
1228
|
/**
|
|
@@ -1337,4 +1347,4 @@ declare module "zod" {
|
|
|
1337
1347
|
}
|
|
1338
1348
|
//#endregion
|
|
1339
1349
|
export { SchemaSourceVariant as $, JsonSchemaNumberFormat as A, JsonSchemaString as B, JsonSchemaMap as C, JsonSchemaNull as D, JsonSchemaNever as E, JsonSchemaRecord as F, JsonSchemaUnion as G, JsonSchemaTuple as H, JsonSchemaRecordPropertyNames as I, SchemaConfigVariant as J, JsonSchemaUnknown as K, JsonSchemaRef as L, JsonSchemaOf as M, JsonSchemaPrimitiveType as N, JsonSchemaNullable as O, JsonSchemaPrimitiveUnion as P, SchemaSourceConfig as Q, JsonSchemaSchemaSource as R, JsonSchemaLogicKeywords as S, JsonSchemaNativeEnum as T, JsonSchemaType as U, JsonSchemaStringFormat as V, JsonSchemaUndefined as W, SchemaEnvelopeOf as X, SchemaEnvelope as Y, SchemaSource as Z, JsonSchemaInteger as _, JsonSchema as a, ValibotSchema as at, JsonSchemaLike as b, JsonSchemaAnyOf as c, JSON_SCHEMA_METADATA_KEYS as ct, JsonSchemaBoolean as d, JsonSchemaTypeNames as dt, SpecOf as et, JsonSchemaConditionalKeywords as f, SCHEMA_ARRAY_CONCAT_KEYWORDS as ft, JsonSchemaEnum as g, JsonSchemaDecimalFormat as h, InferExtractOptions as i, UntypedSchemaSource as it, JsonSchemaObject as j, JsonSchemaNumber as k, JsonSchemaArray as l, JSON_SCHEMA_PRIMITIVE_TYPES as lt, JsonSchemaDecimal as m, SCHEMA_SINGLE_KEYWORDS as mt, BaseSchemaSource as n, UntypedConfigObject as nt, JsonSchemaAllOf as o, ValibotSchemaSource as ot, JsonSchemaDate as p, SCHEMA_RECORD_KEYWORDS as pt, SchemaConfig as q, ExtractedSchemaEnvelope as r, UntypedSchema as rt, JsonSchemaAny as s, Zod3SchemaSource as st, BaseExtractOptions as t, StandardSchemaSchemaSource as tt, JsonSchemaBigint as u, JSON_SCHEMA_TYPES as ut, JsonSchemaIntegerFormat as v, JsonSchemaMetadataKeywords as w, JsonSchemaLiteral as x, JsonSchemaKeywords as y, JsonSchemaSet as z };
|
|
1340
|
-
//# sourceMappingURL=types-
|
|
1350
|
+
//# sourceMappingURL=types-hfHmxKG0.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types
|
|
1
|
+
{"version":3,"file":"types-hfHmxKG0.d.cts","names":[],"sources":["../src/constants.ts","../src/types.ts"],"mappings":";;;;;;;;cAoBa;;;;;;;;;cAUA;cAQA;cAMA;;;;;cA8BA,wBAAsB;;;;;cAYtB,wBAAsB;;;;;cAiBtB,8BAA4B;;;;;;;;KClE7B,kCACF;;;;;;KAOE,yBAAyB;;;;KAKzB;;;;KAaA;;;;KAKA,yBACV,0BAA0B;;;;KAKhB;;;;;;UA6BK;;;;;;;EAOf;;;;;;;EAQA;;;;;;;EAWA,cAAc;;;;;;;EAQd;;;;;;EAOA;;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"}
|
package/dist/valibot.d.cts
CHANGED
package/dist/valibot.d.mts
CHANGED
package/dist/zod.d.cts
CHANGED
package/dist/zod.d.mts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@power-plant/schema",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.30",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A Power Plant utility package to help managing schemas.",
|
|
6
6
|
"keywords": [
|
|
@@ -142,9 +142,9 @@
|
|
|
142
142
|
"untyped": "^1.5.2"
|
|
143
143
|
},
|
|
144
144
|
"devDependencies": {
|
|
145
|
-
"@powerlines/plugin-tsdown": "^0.1.
|
|
145
|
+
"@powerlines/plugin-tsdown": "^0.1.554",
|
|
146
146
|
"@types/node": "^25.9.5",
|
|
147
|
-
"powerlines": "^0.47.
|
|
147
|
+
"powerlines": "^0.47.153",
|
|
148
148
|
"valibot": "^1.4.2",
|
|
149
149
|
"zod": "^4.4.3"
|
|
150
150
|
},
|
|
@@ -157,5 +157,5 @@
|
|
|
157
157
|
"zod": { "optional": true }
|
|
158
158
|
},
|
|
159
159
|
"publishConfig": { "access": "public" },
|
|
160
|
-
"gitHead": "
|
|
160
|
+
"gitHead": "6f8df09a8b90119c16a2272be412298adbe8338e"
|
|
161
161
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types-CINa5E2f.d.mts","names":[],"sources":["../src/constants.ts","../src/types.ts"],"mappings":""}
|