@power-plant/schema 0.0.30 → 0.0.32
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/index.cjs +5 -4
- package/dist/index.d.cts.map +1 -1
- package/dist/index.mjs +5 -4
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -11,8 +11,9 @@ let _stryke_fs_resolve = require("@stryke/fs/resolve");
|
|
|
11
11
|
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
|
+
let _stryke_path_append = require("@stryke/path/append");
|
|
14
15
|
let _stryke_path_find = require("@stryke/path/find");
|
|
15
|
-
let
|
|
16
|
+
let _stryke_path_join = require("@stryke/path/join");
|
|
16
17
|
let _stryke_resolve_constants = require("@stryke/resolve/constants");
|
|
17
18
|
let _stryke_resolve_load = require("@stryke/resolve/load");
|
|
18
19
|
let _stryke_string_format_list = require("@stryke/string-format/list");
|
|
@@ -215,7 +216,7 @@ function resolveCompilerOptions(system, tsconfig, fs) {
|
|
|
215
216
|
return options;
|
|
216
217
|
}
|
|
217
218
|
function createProgramFromFileSystem(file, options) {
|
|
218
|
-
const projectRoot = options.cwd
|
|
219
|
+
const projectRoot = options.tsconfig ? (0, _stryke_path_find.findFilePath)(options.tsconfig) : options.cwd ? options.cwd : (0, _stryke_path_find.findFilePath)(file);
|
|
219
220
|
const createHost = _typescript_vfs.createVirtualCompilerHost;
|
|
220
221
|
const system = (0, _typescript_vfs.createFSBackedSystem)(/* @__PURE__ */ new Map(), projectRoot, typescript.default);
|
|
221
222
|
if (options.fs) bindFileSystemToSystem(system, options.fs);
|
|
@@ -562,7 +563,7 @@ async function extractTSType(input, options = {}) {
|
|
|
562
563
|
const exportName = fileReference.export ?? "*";
|
|
563
564
|
const resolvedPath = await (0, _stryke_fs_resolve.resolveSafe)(fileReference.file, { fs: options.fs });
|
|
564
565
|
const filePath = resolvedPath || fileReference.file;
|
|
565
|
-
const tsconfig = options.tsconfig ? (0,
|
|
566
|
+
const tsconfig = options.tsconfig ? (0, _stryke_path_append.appendPath)(options.tsconfig, options.cwd || process.cwd()) : (0, _stryke_path_join.joinPaths)(options.cwd || process.cwd(), "tsconfig.json");
|
|
566
567
|
try {
|
|
567
568
|
const generatorConfig = {
|
|
568
569
|
path: filePath,
|
|
@@ -571,7 +572,7 @@ async function extractTSType(input, options = {}) {
|
|
|
571
572
|
jsDoc: "extended",
|
|
572
573
|
markdownDescription: true,
|
|
573
574
|
fullDescription: true,
|
|
574
|
-
skipTypeCheck:
|
|
575
|
+
skipTypeCheck: false,
|
|
575
576
|
tsProgram: createProgramFromFileSystem(filePath, {
|
|
576
577
|
...options,
|
|
577
578
|
tsconfig
|
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;;;;;;;;;iBCwOc,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,sBAC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;;;;;;;;iBAa/C,gBAAgB,iBAAiB,SAAS;;;;;;;;;;;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.mjs
CHANGED
|
@@ -9,8 +9,9 @@ import { resolveSafe } from "@stryke/fs/resolve";
|
|
|
9
9
|
import { murmurhash } from "@stryke/hash";
|
|
10
10
|
import { deepClone } from "@stryke/helpers/deep-clone";
|
|
11
11
|
import { isStandardJsonSchema } from "@stryke/json";
|
|
12
|
+
import { appendPath } from "@stryke/path/append";
|
|
12
13
|
import { findFileExtensionSafe, findFilePath } from "@stryke/path/find";
|
|
13
|
-
import {
|
|
14
|
+
import { joinPaths } from "@stryke/path/join";
|
|
14
15
|
import { VALID_OBJECT_SOURCE_EXTENSIONS } from "@stryke/resolve/constants";
|
|
15
16
|
import { loadSafe } from "@stryke/resolve/load";
|
|
16
17
|
import { list } from "@stryke/string-format/list";
|
|
@@ -212,7 +213,7 @@ function resolveCompilerOptions(system, tsconfig, fs) {
|
|
|
212
213
|
return options;
|
|
213
214
|
}
|
|
214
215
|
function createProgramFromFileSystem(file, options) {
|
|
215
|
-
const projectRoot = options.cwd
|
|
216
|
+
const projectRoot = options.tsconfig ? findFilePath(options.tsconfig) : options.cwd ? options.cwd : findFilePath(file);
|
|
216
217
|
const createHost = createVirtualCompilerHost;
|
|
217
218
|
const system = createFSBackedSystem(/* @__PURE__ */ new Map(), projectRoot, ts);
|
|
218
219
|
if (options.fs) bindFileSystemToSystem(system, options.fs);
|
|
@@ -559,7 +560,7 @@ async function extractTSType(input, options = {}) {
|
|
|
559
560
|
const exportName = fileReference.export ?? "*";
|
|
560
561
|
const resolvedPath = await resolveSafe(fileReference.file, { fs: options.fs });
|
|
561
562
|
const filePath = resolvedPath || fileReference.file;
|
|
562
|
-
const tsconfig = options.tsconfig ?
|
|
563
|
+
const tsconfig = options.tsconfig ? appendPath(options.tsconfig, options.cwd || process.cwd()) : joinPaths(options.cwd || process.cwd(), "tsconfig.json");
|
|
563
564
|
try {
|
|
564
565
|
const generatorConfig = {
|
|
565
566
|
path: filePath,
|
|
@@ -568,7 +569,7 @@ async function extractTSType(input, options = {}) {
|
|
|
568
569
|
jsDoc: "extended",
|
|
569
570
|
markdownDescription: true,
|
|
570
571
|
fullDescription: true,
|
|
571
|
-
skipTypeCheck:
|
|
572
|
+
skipTypeCheck: false,
|
|
572
573
|
tsProgram: createProgramFromFileSystem(filePath, {
|
|
573
574
|
...options,
|
|
574
575
|
tsconfig
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@power-plant/schema",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.32",
|
|
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.555",
|
|
146
146
|
"@types/node": "^25.9.5",
|
|
147
|
-
"powerlines": "^0.47.
|
|
147
|
+
"powerlines": "^0.47.154",
|
|
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": "d252bc460d285a6e2276ba5f08410ec9e37fb8fc"
|
|
161
161
|
}
|