@power-plant/schema 0.0.53 → 0.0.55

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.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_deepkit = require('./deepkit-CzTuG3HO.cjs');
2
+ const require_deepkit = require('./deepkit-DdL6PozG.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-BUz4LI7V.mjs";
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-9Y_7fx_M.mjs";
2
2
 
3
3
  export { Cache, DeclarationTransformer, DeepkitLoader, ReflectionTransformer, debugPackStruct, declarationTransformer, encodeOps, packSize, packSizeByte, transformer };
@@ -1,5 +1,5 @@
1
- const require_rolldown_runtime = require('./rolldown-runtime-fl3r8ClO.cjs');
2
- const require_constants = require('./constants-DUJjv-fA.cjs');
1
+ const require_rolldown_runtime = require('./rolldown-runtime-7nYvXII6.cjs');
2
+ const require_constants = require('./constants-CPMTQEYP.cjs');
3
3
  let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
4
4
  let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
5
5
  let _stryke_type_checks = require("@stryke/type-checks");
package/dist/index.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_rolldown_runtime = require('./rolldown-runtime-fl3r8ClO.cjs');
3
- const require_constants = require('./constants-DUJjv-fA.cjs');
4
- const require_helpers = require('./helpers-on-hD-7R.cjs');
5
- const require_deepkit = require('./deepkit-CzTuG3HO.cjs');
2
+ const require_rolldown_runtime = require('./rolldown-runtime-7nYvXII6.cjs');
3
+ const require_constants = require('./constants-CPMTQEYP.cjs');
4
+ const require_helpers = require('./helpers-LhLPb88g.cjs');
5
+ const require_deepkit = require('./deepkit-DdL6PozG.cjs');
6
6
  const require_codegen = require('./codegen.cjs');
7
- const require_storage = require('./storage-C8Lnl5Hw.cjs');
7
+ const require_storage = require('./storage-BTI2epDz.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");
@@ -1106,7 +1106,7 @@ async function extractSchemaWithSource(input, options = {}) {
1106
1106
  if (extension && !_stryke_resolve_constants.VALID_OBJECT_SOURCE_EXTENSIONS.includes(extension)) throw new Error(`The provided schema file input "${fileReference.file}" has an invalid file extension (.${extension}). Please ensure that the file has one of the following extensions: ${(0, _stryke_string_format_list.list)(_stryke_resolve_constants.VALID_OBJECT_SOURCE_EXTENSIONS, { conjunction: "or" })}.`);
1107
1107
  let fs;
1108
1108
  if (options.storage) fs = require_storage.mapStorageToFileSystem(options.storage);
1109
- let resolved = await (0, _stryke_resolve_load.loadSafe)(unwrapped, {
1109
+ const loadOptions = {
1110
1110
  ...(0, _stryke_helpers_omit.omit)(options, [
1111
1111
  "storage",
1112
1112
  "logger",
@@ -1114,7 +1114,8 @@ async function extractSchemaWithSource(input, options = {}) {
1114
1114
  ]),
1115
1115
  fs,
1116
1116
  cwd: options.cwd ?? void 0
1117
- });
1117
+ };
1118
+ let resolved = await (0, _stryke_resolve_load.loadSafe)(unwrapped, loadOptions);
1118
1119
  resolved ??= await extractTSType(unwrapped, {
1119
1120
  ...options,
1120
1121
  fs
package/dist/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
- import { i as ReflectionTransformer, n as Cache, r as DeclarationTransformer } from "./deepkit-BUz4LI7V.mjs";
1
+ import { i as ReflectionTransformer, n as Cache, r as DeclarationTransformer } from "./deepkit-9Y_7fx_M.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";
5
- import { n as createStoragePromises, r as normalizeKey, t as mapStorageToFileSystem } from "./storage-C3BT2Xh-.mjs";
5
+ import { n as createStoragePromises, r as normalizeKey, t as mapStorageToFileSystem } from "./storage-DuoqLXEu.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";
@@ -1102,7 +1102,7 @@ async function extractSchemaWithSource(input, options = {}) {
1102
1102
  if (extension && !VALID_OBJECT_SOURCE_EXTENSIONS.includes(extension)) throw new Error(`The provided schema file input "${fileReference.file}" has an invalid file extension (.${extension}). Please ensure that the file has one of the following extensions: ${list(VALID_OBJECT_SOURCE_EXTENSIONS, { conjunction: "or" })}.`);
1103
1103
  let fs;
1104
1104
  if (options.storage) fs = mapStorageToFileSystem(options.storage);
1105
- let resolved = await loadSafe(unwrapped, {
1105
+ const loadOptions = {
1106
1106
  ...omit(options, [
1107
1107
  "storage",
1108
1108
  "logger",
@@ -1110,7 +1110,8 @@ async function extractSchemaWithSource(input, options = {}) {
1110
1110
  ]),
1111
1111
  fs,
1112
1112
  cwd: options.cwd ?? void 0
1113
- });
1113
+ };
1114
+ let resolved = await loadSafe(unwrapped, loadOptions);
1114
1115
  resolved ??= await extractTSType(unwrapped, {
1115
1116
  ...options,
1116
1117
  fs
@@ -20,13 +20,12 @@ var __copyProps = (to, from, except, desc) => {
20
20
  }
21
21
  return to;
22
22
  };
23
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
23
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
24
24
  value: mod,
25
25
  enumerable: true
26
26
  }) : target, mod));
27
27
 
28
28
  //#endregion
29
-
30
29
  Object.defineProperty(exports, '__commonJSMin', {
31
30
  enumerable: true,
32
31
  get: function () {
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_storage = require('../storage-C8Lnl5Hw.cjs');
2
+ const require_storage = require('../storage-BTI2epDz.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-C3BT2Xh-.mjs";
1
+ import { n as createStoragePromises, r as normalizeKey, t as mapStorageToFileSystem } from "../storage-DuoqLXEu.mjs";
2
2
 
3
3
  export { createStoragePromises, mapStorageToFileSystem, normalizeKey };
@@ -1,4 +1,4 @@
1
- const require_rolldown_runtime = require('./rolldown-runtime-fl3r8ClO.cjs');
1
+ const require_rolldown_runtime = require('./rolldown-runtime-7nYvXII6.cjs');
2
2
  let node_events = require("node:events");
3
3
  let node_fs = require("node:fs");
4
4
  node_fs = require_rolldown_runtime.__toESM(node_fs, 1);
@@ -176,7 +176,8 @@ function createStoragePromises(storage) {
176
176
  type: "file",
177
177
  meta
178
178
  };
179
- if (getImmediateChildren(key, (await storage.getKeys(key)).filter((storageKey) => storageKey !== key && !isMetaStorageKey(storageKey))).length > 0) return {
179
+ const keys = await storage.getKeys(key);
180
+ if (getImmediateChildren(key, keys.filter((storageKey) => storageKey !== key && !isMetaStorageKey(storageKey))).length > 0) return {
180
181
  key,
181
182
  type: "directory",
182
183
  meta
@@ -240,7 +241,8 @@ function createStoragePromises(storage) {
240
241
  const keys = await storage.getKeys(source);
241
242
  for (const key of keys) {
242
243
  if (isMetaStorageKey(key) || key === source) continue;
243
- await copyEntry(key, resolveKey(destination, key.slice(source.length).replace(/^\//, "")), true);
244
+ const relative = key.slice(source.length).replace(/^\//, "");
245
+ await copyEntry(key, resolveKey(destination, relative), true);
244
246
  }
245
247
  return;
246
248
  }
@@ -175,7 +175,8 @@ function createStoragePromises(storage) {
175
175
  type: "file",
176
176
  meta
177
177
  };
178
- if (getImmediateChildren(key, (await storage.getKeys(key)).filter((storageKey) => storageKey !== key && !isMetaStorageKey(storageKey))).length > 0) return {
178
+ const keys = await storage.getKeys(key);
179
+ if (getImmediateChildren(key, keys.filter((storageKey) => storageKey !== key && !isMetaStorageKey(storageKey))).length > 0) return {
179
180
  key,
180
181
  type: "directory",
181
182
  meta
@@ -239,7 +240,8 @@ function createStoragePromises(storage) {
239
240
  const keys = await storage.getKeys(source);
240
241
  for (const key of keys) {
241
242
  if (isMetaStorageKey(key) || key === source) continue;
242
- await copyEntry(key, resolveKey(destination, key.slice(source.length).replace(/^\//, "")), true);
243
+ const relative = key.slice(source.length).replace(/^\//, "");
244
+ await copyEntry(key, resolveKey(destination, relative), true);
243
245
  }
244
246
  return;
245
247
  }
@@ -914,4 +916,4 @@ function mapStorageToFileSystem(storage) {
914
916
 
915
917
  //#endregion
916
918
  export { createStoragePromises as n, normalizeKey as r, mapStorageToFileSystem as t };
917
- //# sourceMappingURL=storage-C3BT2Xh-.mjs.map
919
+ //# sourceMappingURL=storage-DuoqLXEu.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage-DuoqLXEu.mjs","names":[],"sources":[],"mappings":""}
package/dist/valibot.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_rolldown_runtime = require('./rolldown-runtime-fl3r8ClO.cjs');
3
- const require_constants = require('./constants-DUJjv-fA.cjs');
2
+ const require_rolldown_runtime = require('./rolldown-runtime-7nYvXII6.cjs');
3
+ const require_constants = require('./constants-CPMTQEYP.cjs');
4
4
  let valibot = require("valibot");
5
5
  valibot = require_rolldown_runtime.__toESM(valibot, 1);
6
6
 
package/dist/zod.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_rolldown_runtime = require('./rolldown-runtime-fl3r8ClO.cjs');
3
- const require_constants = require('./constants-DUJjv-fA.cjs');
4
- const require_helpers = require('./helpers-on-hD-7R.cjs');
2
+ const require_rolldown_runtime = require('./rolldown-runtime-7nYvXII6.cjs');
3
+ const require_constants = require('./constants-CPMTQEYP.cjs');
4
+ const require_helpers = require('./helpers-LhLPb88g.cjs');
5
5
  let _stryke_helpers_deep_clone = require("@stryke/helpers/deep-clone");
6
6
  let zod_mini = require("zod/mini");
7
7
  zod_mini = require_rolldown_runtime.__toESM(zod_mini, 1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@power-plant/schema",
3
- "version": "0.0.53",
3
+ "version": "0.0.55",
4
4
  "private": false,
5
5
  "description": "A Power Plant utility package to help managing schemas.",
6
6
  "keywords": [
@@ -150,6 +150,7 @@
150
150
  "@stryke/unique-id": "^0.3.110",
151
151
  "@stryke/url": "^0.4.49",
152
152
  "@stryke/zod": "^0.3.44",
153
+ "@typescript/vfs": "^1.6.4",
153
154
  "@valibot/to-json-schema": "^1.7.1",
154
155
  "defu": "^6.1.7",
155
156
  "esbuild": "^0.28.1",
@@ -160,9 +161,9 @@
160
161
  },
161
162
  "devDependencies": {
162
163
  "@deepkit/type-compiler": "1.0.19",
163
- "@powerlines/plugin-tsdown": "^0.1.575",
164
+ "@powerlines/plugin-tsdown": "^0.1.578",
164
165
  "@types/node": "^25.9.5",
165
- "powerlines": "^0.47.174",
166
+ "powerlines": "^0.47.177",
166
167
  "valibot": "^1.4.2",
167
168
  "zod": "^4.4.3"
168
169
  },
@@ -178,7 +179,6 @@
178
179
  "inlinedDependencies": {
179
180
  "@deepkit/type-compiler": "1.0.19",
180
181
  "@marcj/ts-clone-node": "2.2.0",
181
- "@typescript/vfs": "1.5.0",
182
182
  "braces": "3.0.3",
183
183
  "compatfactory": "2.0.9",
184
184
  "fill-range": "7.1.1",
@@ -187,5 +187,5 @@
187
187
  "picomatch": "2.3.2",
188
188
  "to-regex-range": "5.0.1"
189
189
  },
190
- "gitHead": "09e093f6c09d6b64e4d607604a9b85dea4b68277"
190
+ "gitHead": "d487a5e6a1eb5586a3f537d3d81ac7e2107454af"
191
191
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"deepkit-BUz4LI7V.mjs","names":[],"sources":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"storage-C3BT2Xh-.mjs","names":[],"sources":[],"mappings":""}