@power-plant/schema 0.0.85 → 0.0.87
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 +3 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.mjs +3 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -28,6 +28,7 @@ defu = require_rolldown_runtime.__toESM(defu, 1);
|
|
|
28
28
|
let esbuild = require("esbuild");
|
|
29
29
|
let jiti = require("jiti");
|
|
30
30
|
let node_fs_promises = require("node:fs/promises");
|
|
31
|
+
let node_path = require("node:path");
|
|
31
32
|
let typescript = require("typescript");
|
|
32
33
|
typescript = require_rolldown_runtime.__toESM(typescript, 1);
|
|
33
34
|
|
|
@@ -1042,8 +1043,9 @@ async function extractTSType(input, options = {}) {
|
|
|
1042
1043
|
if (result.errors.length > 0) throw new Error(result.errors.map((error) => error.text).join(", "));
|
|
1043
1044
|
const bundled = result.outputFiles?.filter(Boolean)[0]?.text;
|
|
1044
1045
|
if (!(0, _stryke_type_checks.isSetString)(bundled)) throw new Error(`No output files generated for "${filePath}". Please check the configuration and try again.`);
|
|
1046
|
+
const evaluationFilePath = (0, node_path.isAbsolute)(filePath) ? filePath : (0, node_path.resolve)(cwd, filePath);
|
|
1045
1047
|
const evaluated = await (0, jiti.createJiti)(cwd).evalModule(bundled, {
|
|
1046
|
-
filename:
|
|
1048
|
+
filename: evaluationFilePath,
|
|
1047
1049
|
ext: (0, _stryke_path_find.findFileDotExtensionSafe)(filePath) || ".ts"
|
|
1048
1050
|
});
|
|
1049
1051
|
let resolved = evaluated[exportName] ?? evaluated[`__Ω${exportName}`];
|
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;;;;;;;;;iBCsDc,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoLW,wBAAwB,aAC5C,OAAO,cACP,UAAS,2BAA2B,SACnC,QAAQ,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2Kb,QAAQ,aAC5B,OAAO,aAAa,QACpB,UAAS,2BAA2B,SACnC,QAAQ,iBAAiB;;;KClsChB,oBAAoB;EAC9B;EACA;EACA;;;;;;;;;;;;iBAac,cAAc,OAAO,iBAAiB,aAAa;;;;;;;;;;;iBAmBnD,oBACd,OAAO,iBAAiB,aACvB;;;;;;;;;;iBAkBa,cACd,KAAK,iBAAiB,mBACrB,eAAe;;;;;;;;;;iBA6BF,kBAAkB,KAAK,iBAAiB,mBAAgB;;;;;;;;;;iBAaxD,Y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;;;;iBA+B7C,oBACd,iBACC,SAAS;;;;;;;iBAUI,oBACd,iBACC,SAAS;;;;;;;iBAUI,mBAAmB,iBAAiB,SAAS;;;;;;;iBA4C7C,mBAAmB,iBAAiB,SAAS;;;;;;;iBA6B7C,gBAAgB,iBAAiB,SAAS;;;;;;;iBA+B1C,mBAAmB,iBAAiB,SAAS;;;;;;;iBA0B7C,kBAAkB,iBAAiB,SAAS;;;;;;;iBA+B5C,sBACd,iBACC,SAAS;;;;;;;iBAoBI,2BACd,iBACC,SAAS;;;;;;;iBAmFI,kBAAkB,iBAAiB,SAAS;;;;;;;iBAmB5C,oBACd,iBACC,SAAS;;;;;;;iBAUI,kBAAkB,iBAAiB,SAAS;;;;;;;iBAkB5C,gBAAgB,iBAAiB,SAAS;;;;;;;iBAgB1C,iBAAiB,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
|
@@ -25,6 +25,7 @@ import defu from "defu";
|
|
|
25
25
|
import { build } from "esbuild";
|
|
26
26
|
import { createJiti } from "jiti";
|
|
27
27
|
import { readFile } from "node:fs/promises";
|
|
28
|
+
import { isAbsolute, resolve } from "node:path";
|
|
28
29
|
import ts, { DiagnosticCategory } from "typescript";
|
|
29
30
|
|
|
30
31
|
//#region src/compatibility.ts
|
|
@@ -1038,8 +1039,9 @@ async function extractTSType(input, options = {}) {
|
|
|
1038
1039
|
if (result.errors.length > 0) throw new Error(result.errors.map((error) => error.text).join(", "));
|
|
1039
1040
|
const bundled = result.outputFiles?.filter(Boolean)[0]?.text;
|
|
1040
1041
|
if (!isSetString$1(bundled)) throw new Error(`No output files generated for "${filePath}". Please check the configuration and try again.`);
|
|
1042
|
+
const evaluationFilePath = isAbsolute(filePath) ? filePath : resolve(cwd, filePath);
|
|
1041
1043
|
const evaluated = await createJiti(cwd).evalModule(bundled, {
|
|
1042
|
-
filename:
|
|
1044
|
+
filename: evaluationFilePath,
|
|
1043
1045
|
ext: findFileDotExtensionSafe(filePath) || ".ts"
|
|
1044
1046
|
});
|
|
1045
1047
|
let resolved = evaluated[exportName] ?? evaluated[`__Ω${exportName}`];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@power-plant/schema",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.87",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A Power Plant utility package to help managing schemas.",
|
|
6
6
|
"keywords": [
|
|
@@ -169,9 +169,9 @@
|
|
|
169
169
|
},
|
|
170
170
|
"devDependencies": {
|
|
171
171
|
"@deepkit/type-compiler": "1.0.19",
|
|
172
|
-
"@powerlines/plugin-tsdown": "^0.1.
|
|
172
|
+
"@powerlines/plugin-tsdown": "^0.1.608",
|
|
173
173
|
"@types/node": "^25.9.5",
|
|
174
|
-
"powerlines": "^0.47.
|
|
174
|
+
"powerlines": "^0.47.207",
|
|
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": "
|
|
188
|
+
"gitHead": "0138400eb12cad53834c6ea7caa3eef265da1d37"
|
|
189
189
|
}
|