@power-plant/schema 0.0.76 → 0.0.79
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/{deepkit-uLIKI-S-.mjs → deepkit-BdYKLoLI.mjs} +17 -15
- package/dist/deepkit-BdYKLoLI.mjs.map +1 -0
- package/dist/{deepkit-DCeGGrOC.cjs → deepkit-Cmb6De3Q.cjs} +16 -14
- package/dist/deepkit.cjs +1 -1
- package/dist/deepkit.mjs +1 -1
- package/dist/index.cjs +5 -4
- package/dist/index.d.cts.map +1 -1
- package/dist/index.mjs +5 -4
- package/package.json +2 -2
- package/dist/deepkit-uLIKI-S-.mjs.map +0 -1
|
@@ -2036,24 +2036,26 @@ var ReflectionTransformer = class {
|
|
|
2036
2036
|
followExport(declarationName, statement, sourceFile) {
|
|
2037
2037
|
if (statement.exportClause) {
|
|
2038
2038
|
if (isNamedExports(statement.exportClause)) {
|
|
2039
|
-
for (const element of statement.exportClause.elements) if (getEscapedText(element.name) === declarationName)
|
|
2039
|
+
for (const element of statement.exportClause.elements) if (getEscapedText(element.name) === declarationName) {
|
|
2040
2040
|
if (!statement.moduleSpecifier || !isStringLiteral(statement.moduleSpecifier)) {
|
|
2041
|
-
if (
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2041
|
+
if (!statement.moduleSpecifier || !isStringLiteral(statement.moduleSpecifier)) {
|
|
2042
|
+
if (isNodeWithLocals(sourceFile) && sourceFile.locals) {
|
|
2043
|
+
const found = sourceFile.locals.get(declarationName);
|
|
2044
|
+
if (found && found.declarations && found.declarations[0]) {
|
|
2045
|
+
const declaration = found.declarations[0];
|
|
2046
|
+
if (declaration && isImportSpecifier(declaration)) {
|
|
2047
|
+
const importOrExport = declaration.parent.parent.parent;
|
|
2048
|
+
const found = this.resolveImportSpecifier(element.propertyName ? getEscapedText(element.propertyName) : declarationName, importOrExport, sourceFile);
|
|
2049
|
+
if (found) return found;
|
|
2050
|
+
} else if (declaration) {}
|
|
2051
|
+
return declaration;
|
|
2052
|
+
}
|
|
2051
2053
|
}
|
|
2052
2054
|
}
|
|
2055
|
+
} else {
|
|
2056
|
+
const found = this.resolveImportSpecifier(element.propertyName ? getEscapedText(element.propertyName) : declarationName, statement, sourceFile);
|
|
2057
|
+
if (found) return found;
|
|
2053
2058
|
}
|
|
2054
|
-
} else {
|
|
2055
|
-
const found = this.resolveImportSpecifier(element.propertyName ? getEscapedText(element.propertyName) : declarationName, statement, sourceFile);
|
|
2056
|
-
if (found) return found;
|
|
2057
2059
|
}
|
|
2058
2060
|
}
|
|
2059
2061
|
} else {
|
|
@@ -2312,4 +2314,4 @@ var DeepkitLoader = class {
|
|
|
2312
2314
|
|
|
2313
2315
|
//#endregion
|
|
2314
2316
|
export { debugPackStruct as a, packSize as c, ReflectionTransformer as i, packSizeByte as l, Cache as n, declarationTransformer as o, DeclarationTransformer as r, encodeOps as s, DeepkitLoader as t, transformer as u };
|
|
2315
|
-
//# sourceMappingURL=deepkit-
|
|
2317
|
+
//# sourceMappingURL=deepkit-BdYKLoLI.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deepkit-BdYKLoLI.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -2032,24 +2032,26 @@ var ReflectionTransformer = class {
|
|
|
2032
2032
|
followExport(declarationName, statement, sourceFile) {
|
|
2033
2033
|
if (statement.exportClause) {
|
|
2034
2034
|
if (isNamedExports(statement.exportClause)) {
|
|
2035
|
-
for (const element of statement.exportClause.elements) if (getEscapedText(element.name) === declarationName)
|
|
2035
|
+
for (const element of statement.exportClause.elements) if (getEscapedText(element.name) === declarationName) {
|
|
2036
2036
|
if (!statement.moduleSpecifier || !isStringLiteral(statement.moduleSpecifier)) {
|
|
2037
|
-
if (
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2037
|
+
if (!statement.moduleSpecifier || !isStringLiteral(statement.moduleSpecifier)) {
|
|
2038
|
+
if (isNodeWithLocals(sourceFile) && sourceFile.locals) {
|
|
2039
|
+
const found = sourceFile.locals.get(declarationName);
|
|
2040
|
+
if (found && found.declarations && found.declarations[0]) {
|
|
2041
|
+
const declaration = found.declarations[0];
|
|
2042
|
+
if (declaration && isImportSpecifier(declaration)) {
|
|
2043
|
+
const importOrExport = declaration.parent.parent.parent;
|
|
2044
|
+
const found = this.resolveImportSpecifier(element.propertyName ? getEscapedText(element.propertyName) : declarationName, importOrExport, sourceFile);
|
|
2045
|
+
if (found) return found;
|
|
2046
|
+
} else if (declaration) {}
|
|
2047
|
+
return declaration;
|
|
2048
|
+
}
|
|
2047
2049
|
}
|
|
2048
2050
|
}
|
|
2051
|
+
} else {
|
|
2052
|
+
const found = this.resolveImportSpecifier(element.propertyName ? getEscapedText(element.propertyName) : declarationName, statement, sourceFile);
|
|
2053
|
+
if (found) return found;
|
|
2049
2054
|
}
|
|
2050
|
-
} else {
|
|
2051
|
-
const found = this.resolveImportSpecifier(element.propertyName ? getEscapedText(element.propertyName) : declarationName, statement, sourceFile);
|
|
2052
|
-
if (found) return found;
|
|
2053
2055
|
}
|
|
2054
2056
|
}
|
|
2055
2057
|
} else {
|
package/dist/deepkit.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_deepkit = require('./deepkit-
|
|
2
|
+
const require_deepkit = require('./deepkit-Cmb6De3Q.cjs');
|
|
3
3
|
|
|
4
4
|
exports.Cache = require_deepkit.Cache;
|
|
5
5
|
exports.DeclarationTransformer = require_deepkit.DeclarationTransformer;
|
package/dist/deepkit.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as debugPackStruct, c as packSize, i as ReflectionTransformer, l as packSizeByte, n as Cache, o as declarationTransformer, r as DeclarationTransformer, s as encodeOps, t as DeepkitLoader, u as transformer } from "./deepkit-
|
|
1
|
+
import { a as debugPackStruct, c as packSize, i as ReflectionTransformer, l as packSizeByte, n as Cache, o as declarationTransformer, r as DeclarationTransformer, s as encodeOps, t as DeepkitLoader, u as transformer } from "./deepkit-BdYKLoLI.mjs";
|
|
2
2
|
|
|
3
3
|
export { Cache, DeclarationTransformer, DeepkitLoader, ReflectionTransformer, debugPackStruct, declarationTransformer, encodeOps, packSize, packSizeByte, transformer };
|
package/dist/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2
2
|
const require_rolldown_runtime = require('./rolldown-runtime-C24Yb2bl.cjs');
|
|
3
3
|
const require_constants = require('./constants-CPMTQEYP.cjs');
|
|
4
4
|
const require_helpers = require('./helpers-C34rr_D0.cjs');
|
|
5
|
-
const require_deepkit = require('./deepkit-
|
|
5
|
+
const require_deepkit = require('./deepkit-Cmb6De3Q.cjs');
|
|
6
6
|
const require_codegen = require('./codegen.cjs');
|
|
7
7
|
const require_storage = require('./storage-BLfnq6kZ.cjs');
|
|
8
8
|
let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
|
|
@@ -1006,7 +1006,7 @@ async function extractTSType(input, options = {}) {
|
|
|
1006
1006
|
const cwd = options.cwd || process.cwd();
|
|
1007
1007
|
try {
|
|
1008
1008
|
options.logger?.debug?.(`Generating JSON schema for bundled "${filePath}" using the type "${exportName}"`);
|
|
1009
|
-
const result = await (0, esbuild.build)({
|
|
1009
|
+
const result = await (0, esbuild.build)((0, defu.default)({
|
|
1010
1010
|
platform: "node",
|
|
1011
1011
|
format: "esm",
|
|
1012
1012
|
logLevel: "silent",
|
|
@@ -1014,16 +1014,17 @@ async function extractTSType(input, options = {}) {
|
|
|
1014
1014
|
write: false,
|
|
1015
1015
|
sourcemap: false,
|
|
1016
1016
|
splitting: false,
|
|
1017
|
+
keepNames: true
|
|
1018
|
+
}, options, {
|
|
1017
1019
|
treeShaking: true,
|
|
1018
1020
|
bundle: true,
|
|
1019
|
-
keepNames: true,
|
|
1020
1021
|
metafile: false,
|
|
1021
1022
|
minify: true,
|
|
1022
1023
|
legalComments: "none",
|
|
1023
1024
|
target: "es2022",
|
|
1024
1025
|
absWorkingDir: cwd,
|
|
1025
1026
|
plugins: [createDeepkitPlugin(options)]
|
|
1026
|
-
});
|
|
1027
|
+
}));
|
|
1027
1028
|
if (result.errors.length > 0) throw new Error(result.errors.map((error) => error.text).join(", "));
|
|
1028
1029
|
const bundled = result.outputFiles?.filter(Boolean)[0]?.text;
|
|
1029
1030
|
if (!(0, _stryke_type_checks.isSetString)(bundled)) throw new Error(`No output files generated for "${filePath}". Please check the configuration and try again.`);
|
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":";;;;;;;;;;;;;;;;;;;;;;;;iBAyGgB,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":";;;;;;;;;;;;;;;;;;;;;;;;iBAyGgB,yBACd,MAAM,YACN,UAAU,YACV;;;;;;;;;iBAqHc,6BACd,MAAM,YACN,UAAU,YACV;;;;;;;;;iBC0Dc,iBAAiB,QAAQ,aAAa;;;;iBAgMtC,YACd,SAAS,qBACT,OAAO;;;;iBA8CO,kBAAkB,YAAY,OAAO;;;;;;;iBAcrC,kBAAkB,kBAAkB;;;;;;;;iBAoCpC,uBACd,OAAO,qBACN;;;;;;;iBA4Ba,e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B,iBAAiB,SAAS;;;;;;;iBAqB3C,gBACd,iBACC,SAAS;;;;;;;;;;;iBA2BI,6BAA6B;;;;;;;;;;iBAoB7B,aAAa,iBAAiB,SAAS;;;;;;;;;;iBAsCvC,qBAAqB,iBAAiB,SAAS;;;;;;;;;;iBAa/C,gBAAgB,iBAAiB,SAAS;;;;;;;;;;;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"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as ReflectionTransformer, n as Cache, r as DeclarationTransformer } from "./deepkit-
|
|
1
|
+
import { i as ReflectionTransformer, n as Cache, r as DeclarationTransformer } from "./deepkit-BdYKLoLI.mjs";
|
|
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";
|
|
@@ -1002,7 +1002,7 @@ async function extractTSType(input, options = {}) {
|
|
|
1002
1002
|
const cwd = options.cwd || process.cwd();
|
|
1003
1003
|
try {
|
|
1004
1004
|
options.logger?.debug?.(`Generating JSON schema for bundled "${filePath}" using the type "${exportName}"`);
|
|
1005
|
-
const result = await build({
|
|
1005
|
+
const result = await build(defu({
|
|
1006
1006
|
platform: "node",
|
|
1007
1007
|
format: "esm",
|
|
1008
1008
|
logLevel: "silent",
|
|
@@ -1010,16 +1010,17 @@ async function extractTSType(input, options = {}) {
|
|
|
1010
1010
|
write: false,
|
|
1011
1011
|
sourcemap: false,
|
|
1012
1012
|
splitting: false,
|
|
1013
|
+
keepNames: true
|
|
1014
|
+
}, options, {
|
|
1013
1015
|
treeShaking: true,
|
|
1014
1016
|
bundle: true,
|
|
1015
|
-
keepNames: true,
|
|
1016
1017
|
metafile: false,
|
|
1017
1018
|
minify: true,
|
|
1018
1019
|
legalComments: "none",
|
|
1019
1020
|
target: "es2022",
|
|
1020
1021
|
absWorkingDir: cwd,
|
|
1021
1022
|
plugins: [createDeepkitPlugin(options)]
|
|
1022
|
-
});
|
|
1023
|
+
}));
|
|
1023
1024
|
if (result.errors.length > 0) throw new Error(result.errors.map((error) => error.text).join(", "));
|
|
1024
1025
|
const bundled = result.outputFiles?.filter(Boolean)[0]?.text;
|
|
1025
1026
|
if (!isSetString$1(bundled)) throw new Error(`No output files generated for "${filePath}". Please check the configuration and try again.`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@power-plant/schema",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.79",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A Power Plant utility package to help managing schemas.",
|
|
6
6
|
"keywords": [
|
|
@@ -185,5 +185,5 @@
|
|
|
185
185
|
},
|
|
186
186
|
"publishConfig": { "access": "public" },
|
|
187
187
|
"inlinedDependencies": { "@deepkit/type-compiler": "1.0.19" },
|
|
188
|
-
"gitHead": "
|
|
188
|
+
"gitHead": "aaaab1486ec3f6472f493ae6786b50f465c0ed68"
|
|
189
189
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deepkit-uLIKI-S-.mjs","names":[],"sources":[],"mappings":""}
|