@storm-software/untyped 0.8.1 → 0.8.3
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/README.md +1 -1
- package/{dist/chunk-GWEQOXW6.mjs → bin/chunk-65NJ2BNV.js} +16 -13
- package/bin/chunk-7LNAPF6J.js +7601 -0
- package/bin/chunk-BIBA7MGH.js +84 -0
- package/bin/chunk-MVPKPUE3.js +1120 -0
- package/bin/chunk-PRGAKNNV.js +765 -0
- package/bin/chunk-Q3AKY4XY.js +4054 -0
- package/bin/chunk-Q42ZDLPG.js +510 -0
- package/bin/chunk-RNYNEYJ5.js +451 -0
- package/bin/dist-SOH4ASEU.js +17570 -0
- package/bin/esm-SQV6ELTR.js +1716 -0
- package/bin/execa-4HBUJBFQ.js +2424 -0
- package/bin/json5-WTSMELC2.js +10 -0
- package/bin/jsonc-B7SFZJW2.js +15 -0
- package/bin/multipart-parser-TFNERLJV.js +187 -0
- package/bin/toml-MTE5VHET.js +10 -0
- package/bin/untyped.cjs +83925 -0
- package/bin/untyped.js +42339 -373
- package/bin/yaml-D6PQ2AEL.js +10 -0
- package/dist/{chunk-XSW3ZXMK.mjs → chunk-B5PWE2FK.js} +8 -3
- package/dist/{chunk-6HKRKQSU.js → chunk-BFSI6OL7.cjs} +12 -7
- package/dist/{chunk-LWMIR3BQ.js → chunk-CLGOYXO6.cjs} +13 -8
- package/dist/chunk-EIXSLKJ6.js +85 -0
- package/dist/{chunk-EBIRRCGB.mjs → chunk-ELSZYSKI.js} +8 -3
- package/dist/{chunk-6OB6EGVE.js → chunk-HUCZDWTY.cjs} +206 -175
- package/dist/chunk-KQOG5R22.cjs +6 -0
- package/dist/chunk-MW6UM5LZ.js +6 -0
- package/dist/chunk-S36U2TKG.js +7218 -0
- package/dist/{chunk-MNW76QG7.mjs → chunk-SF7VZOKX.js} +39 -8
- package/dist/{chunk-HSIBHFJE.mjs → chunk-TJ5YM7SW.js} +8 -3
- package/dist/{chunk-TJLW3KPU.js → chunk-UCWWPTWV.cjs} +11 -6
- package/dist/chunk-VCSZBLKU.cjs +85 -0
- package/dist/chunk-YU5YP27Q.cjs +7221 -0
- package/dist/generate.cjs +11 -0
- package/dist/{generate.d.mts → generate.d.cts} +1 -1
- package/dist/generate.d.ts +1 -1
- package/dist/generate.js +11 -10
- package/dist/index.cjs +32 -0
- package/dist/{index.d.mts → index.d.cts} +6 -6
- package/dist/index.d.ts +1 -1
- package/dist/index.js +32 -27
- package/dist/{types-DkqO6Ujr.d.mts → types-BQ21E8Xn.d.cts} +361 -361
- package/dist/{types-DkqO6Ujr.d.ts → types-BQ21E8Xn.d.ts} +361 -361
- package/dist/utilities.cjs +6 -0
- package/dist/utilities.js +6 -6
- package/package.json +44 -53
- package/bin/untyped.mjs +0 -7050
- package/dist/chunk-NYKCIVTC.js +0 -46
- package/dist/chunk-U4YLQDJK.js +0 -1
- package/dist/chunk-ZHPKHX4S.mjs +0 -0
- package/dist/generate.mjs +0 -10
- package/dist/index.mjs +0 -27
- package/dist/utilities.mjs +0 -6
- /package/bin/{untyped.d.mts → untyped.d.cts} +0 -0
- /package/dist/{utilities.d.mts → utilities.d.cts} +0 -0
|
@@ -1,10 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
writeError,
|
|
3
|
+
writeTrace
|
|
4
|
+
} from "./chunk-S36U2TKG.js";
|
|
1
5
|
import {
|
|
2
6
|
__name,
|
|
3
|
-
getOutputFile
|
|
4
|
-
|
|
7
|
+
getOutputFile,
|
|
8
|
+
init_esm_shims
|
|
9
|
+
} from "./chunk-EIXSLKJ6.js";
|
|
5
10
|
|
|
6
11
|
// src/generators/markdown.ts
|
|
7
|
-
|
|
12
|
+
init_esm_shims();
|
|
8
13
|
import { writeFile } from "node:fs/promises";
|
|
9
14
|
function generateMarkdown(schema) {
|
|
10
15
|
return `
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkYU5YP27Qcjs = require('./chunk-YU5YP27Q.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunkVCSZBLKUcjs = require('./chunk-VCSZBLKU.cjs');
|
|
5
10
|
|
|
6
11
|
// src/generators/dts.ts
|
|
7
|
-
|
|
12
|
+
_chunkVCSZBLKUcjs.init_cjs_shims.call(void 0, );
|
|
8
13
|
var _promises = require('fs/promises');
|
|
9
14
|
var _untyped = require('untyped');
|
|
10
15
|
function generateDeclaration(schema) {
|
|
@@ -20,14 +25,14 @@ ${_untyped.generateTypes.call(void 0, schema, {
|
|
|
20
25
|
|
|
21
26
|
`;
|
|
22
27
|
}
|
|
23
|
-
|
|
28
|
+
_chunkVCSZBLKUcjs.__name.call(void 0, generateDeclaration, "generateDeclaration");
|
|
24
29
|
function generateDeclarationFile(schema, file, config) {
|
|
25
30
|
try {
|
|
26
|
-
const declarations =
|
|
27
|
-
|
|
31
|
+
const declarations = _chunkVCSZBLKUcjs.getOutputFile.call(void 0, file, "d.ts");
|
|
32
|
+
_chunkYU5YP27Qcjs.writeTrace.call(void 0, `Writing type declaration file ${declarations}`, config);
|
|
28
33
|
return _promises.writeFile.call(void 0, declarations, generateDeclaration(schema));
|
|
29
34
|
} catch (error) {
|
|
30
|
-
|
|
35
|
+
_chunkYU5YP27Qcjs.writeError.call(void 0, `Error writing declaration file for ${file.name}
|
|
31
36
|
|
|
32
37
|
Error:
|
|
33
38
|
${_optionalChain([error, 'optionalAccess', _4 => _4.message]) ? error.message : JSON.stringify(error)}${_optionalChain([error, 'optionalAccess', _5 => _5.stack]) ? `
|
|
@@ -39,7 +44,7 @@ ${JSON.stringify(schema)}
|
|
|
39
44
|
throw error;
|
|
40
45
|
}
|
|
41
46
|
}
|
|
42
|
-
|
|
47
|
+
_chunkVCSZBLKUcjs.__name.call(void 0, generateDeclarationFile, "generateDeclarationFile");
|
|
43
48
|
|
|
44
49
|
|
|
45
50
|
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkYU5YP27Qcjs = require('./chunk-YU5YP27Q.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunkVCSZBLKUcjs = require('./chunk-VCSZBLKU.cjs');
|
|
5
10
|
|
|
6
11
|
// src/generators/markdown.ts
|
|
7
|
-
|
|
12
|
+
_chunkVCSZBLKUcjs.init_cjs_shims.call(void 0, );
|
|
8
13
|
var _promises = require('fs/promises');
|
|
9
14
|
function generateMarkdown(schema) {
|
|
10
15
|
return `
|
|
@@ -15,7 +20,7 @@ ${generateMarkdownLevel(schema, schema.title || "", "#").join("\n")}
|
|
|
15
20
|
|
|
16
21
|
`;
|
|
17
22
|
}
|
|
18
|
-
|
|
23
|
+
_chunkVCSZBLKUcjs.__name.call(void 0, generateMarkdown, "generateMarkdown");
|
|
19
24
|
function generateMarkdownLevel(schema, title, level) {
|
|
20
25
|
const lines = [];
|
|
21
26
|
lines.push(`${level} ${title}`);
|
|
@@ -39,14 +44,14 @@ function generateMarkdownLevel(schema, title, level) {
|
|
|
39
44
|
}
|
|
40
45
|
return lines;
|
|
41
46
|
}
|
|
42
|
-
|
|
47
|
+
_chunkVCSZBLKUcjs.__name.call(void 0, generateMarkdownLevel, "generateMarkdownLevel");
|
|
43
48
|
function generateMarkdownFile(schema, file, config) {
|
|
44
49
|
try {
|
|
45
|
-
const declarations =
|
|
46
|
-
|
|
50
|
+
const declarations = _chunkVCSZBLKUcjs.getOutputFile.call(void 0, file, "md");
|
|
51
|
+
_chunkYU5YP27Qcjs.writeTrace.call(void 0, `Writing type markdown file ${declarations}`, config);
|
|
47
52
|
return _promises.writeFile.call(void 0, declarations, generateMarkdown(schema));
|
|
48
53
|
} catch (error) {
|
|
49
|
-
|
|
54
|
+
_chunkYU5YP27Qcjs.writeError.call(void 0, `Error writing markdown file for ${file.name}
|
|
50
55
|
|
|
51
56
|
Error:
|
|
52
57
|
${_optionalChain([error, 'optionalAccess', _ => _.message]) ? error.message : JSON.stringify(error)}${_optionalChain([error, 'optionalAccess', _2 => _2.stack]) ? `
|
|
@@ -58,7 +63,7 @@ ${JSON.stringify(schema)}
|
|
|
58
63
|
throw error;
|
|
59
64
|
}
|
|
60
65
|
}
|
|
61
|
-
|
|
66
|
+
_chunkVCSZBLKUcjs.__name.call(void 0, generateMarkdownFile, "generateMarkdownFile");
|
|
62
67
|
|
|
63
68
|
|
|
64
69
|
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
8
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
9
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
10
|
+
}) : x)(function(x) {
|
|
11
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
12
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
13
|
+
});
|
|
14
|
+
var __esm = (fn, res) => function __init() {
|
|
15
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
16
|
+
};
|
|
17
|
+
var __commonJS = (cb, mod) => function __require2() {
|
|
18
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
19
|
+
};
|
|
20
|
+
var __copyProps = (to, from, except, desc) => {
|
|
21
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
+
for (let key of __getOwnPropNames(from))
|
|
23
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
+
}
|
|
26
|
+
return to;
|
|
27
|
+
};
|
|
28
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
+
mod
|
|
35
|
+
));
|
|
36
|
+
|
|
37
|
+
// ../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.49.1_@types+node@22.10.7__@swc+core@1.7.26_@swc+helpers_ekim6y52mwpq6ssxiprcp44dam/node_modules/tsup/assets/esm_shims.js
|
|
38
|
+
var init_esm_shims = __esm({
|
|
39
|
+
"../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.49.1_@types+node@22.10.7__@swc+core@1.7.26_@swc+helpers_ekim6y52mwpq6ssxiprcp44dam/node_modules/tsup/assets/esm_shims.js"() {
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
// src/utilities.ts
|
|
44
|
+
init_esm_shims();
|
|
45
|
+
|
|
46
|
+
// ../config-tools/src/utilities/correct-paths.ts
|
|
47
|
+
init_esm_shims();
|
|
48
|
+
import { joinPathFragments } from "@nx/devkit";
|
|
49
|
+
var correctPaths = /* @__PURE__ */ __name((path) => {
|
|
50
|
+
if (!path) {
|
|
51
|
+
return "";
|
|
52
|
+
}
|
|
53
|
+
if (!path.toUpperCase().startsWith("C:") && path.includes("\\")) {
|
|
54
|
+
path = `C:${path}`;
|
|
55
|
+
}
|
|
56
|
+
return path.replaceAll("\\", "/");
|
|
57
|
+
}, "correctPaths");
|
|
58
|
+
var joinPaths = /* @__PURE__ */ __name((...paths) => {
|
|
59
|
+
if (!paths || paths.length === 0) {
|
|
60
|
+
return "";
|
|
61
|
+
}
|
|
62
|
+
return correctPaths(joinPathFragments(...paths.map((path) => correctPaths(path))));
|
|
63
|
+
}, "joinPaths");
|
|
64
|
+
|
|
65
|
+
// src/utilities.ts
|
|
66
|
+
var getOutputFile = /* @__PURE__ */ __name((file, extension) => {
|
|
67
|
+
let fileName = file.name.slice(0, file.name.lastIndexOf(".")).replace(".untyped", "").replace("untyped", "").replace(".schema", "").replace("schema", "");
|
|
68
|
+
if (!fileName) {
|
|
69
|
+
fileName = "schema";
|
|
70
|
+
}
|
|
71
|
+
if (fileName !== "schema") {
|
|
72
|
+
fileName = `${fileName}.schema`;
|
|
73
|
+
}
|
|
74
|
+
return joinPaths(file.parentPath, `${fileName}.${extension}`);
|
|
75
|
+
}, "getOutputFile");
|
|
76
|
+
|
|
77
|
+
export {
|
|
78
|
+
__name,
|
|
79
|
+
__require,
|
|
80
|
+
__commonJS,
|
|
81
|
+
__toESM,
|
|
82
|
+
init_esm_shims,
|
|
83
|
+
joinPaths,
|
|
84
|
+
getOutputFile
|
|
85
|
+
};
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
writeError,
|
|
3
|
+
writeTrace
|
|
4
|
+
} from "./chunk-S36U2TKG.js";
|
|
1
5
|
import {
|
|
2
6
|
__name,
|
|
3
|
-
getOutputFile
|
|
4
|
-
|
|
7
|
+
getOutputFile,
|
|
8
|
+
init_esm_shims
|
|
9
|
+
} from "./chunk-EIXSLKJ6.js";
|
|
5
10
|
|
|
6
11
|
// src/generators/dts.ts
|
|
7
|
-
|
|
12
|
+
init_esm_shims();
|
|
8
13
|
import { writeFile } from "node:fs/promises";
|
|
9
14
|
import { generateTypes } from "untyped";
|
|
10
15
|
function generateDeclaration(schema) {
|