@storm-software/untyped 0.24.153 → 0.24.156
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/bin/untyped.cjs +17 -8
- package/bin/untyped.js +17 -8
- package/dist/{chunk-UQHYOHNO.js → chunk-2KBNFVQH.js} +1 -1
- package/dist/{chunk-DUGCV565.cjs → chunk-3HWZKQ4W.cjs} +3 -3
- package/dist/{chunk-6ICZFPBE.js → chunk-7DSS3WGG.js} +4 -4
- package/dist/{chunk-CGUOYQRT.js → chunk-HANVKDNV.js} +17 -8
- package/dist/{chunk-YEL7HQVG.cjs → chunk-HQANGSQW.cjs} +17 -8
- package/dist/{chunk-VH355W76.js → chunk-JPPLDDN5.js} +1 -1
- package/dist/{chunk-KALLFA4S.cjs → chunk-LUVSO3MU.cjs} +23 -23
- package/dist/{chunk-LHYAYO72.cjs → chunk-QQ644J5L.cjs} +3 -3
- package/dist/{chunk-2SQOGXXW.js → chunk-R3AVHJL7.js} +1 -1
- package/dist/{chunk-X6IHBBFY.cjs → chunk-Z7J2QZVM.cjs} +3 -3
- package/dist/generate.cjs +6 -6
- package/dist/generate.js +5 -5
- package/dist/index.cjs +6 -6
- package/dist/index.js +5 -5
- package/package.json +4 -4
package/bin/untyped.cjs
CHANGED
|
@@ -964,22 +964,31 @@ var getStopwatch = (name) => {
|
|
|
964
964
|
);
|
|
965
965
|
};
|
|
966
966
|
};
|
|
967
|
-
var MAX_DEPTH =
|
|
967
|
+
var MAX_DEPTH = 10;
|
|
968
968
|
var formatLogMessage = (message, options = {}, depth2 = 0) => {
|
|
969
969
|
if (depth2 > MAX_DEPTH) {
|
|
970
970
|
return "<max depth>";
|
|
971
971
|
}
|
|
972
|
-
const prefix = options.prefix ?? "
|
|
972
|
+
const prefix = options.prefix ?? "";
|
|
973
973
|
const skip = options.skip ?? [];
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
${
|
|
977
|
-
(
|
|
974
|
+
const sort = options.sort ?? true;
|
|
975
|
+
return typeof message === "undefined" || message === null ? "<empty>" : typeof message === "string" ? !message ? "<empty string>" : message : Array.isArray(message) ? `
|
|
976
|
+
${message.map(
|
|
977
|
+
(item, index) => ` ${prefix}> #${index} = ${formatLogMessage(
|
|
978
|
+
item,
|
|
979
|
+
{ prefix: `${prefix}--`, skip, sort },
|
|
980
|
+
depth2 + 1
|
|
981
|
+
)}`
|
|
982
|
+
).join("\n")}` : typeof message === "object" ? `
|
|
983
|
+
${Object.keys(message).filter((key) => !skip.includes(key)).sort(sort ? (a, b) => a.localeCompare(b) : void 0).map(
|
|
984
|
+
(key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" ? Object.keys(message[key]).filter(
|
|
985
|
+
(key2) => !skip.includes(key2)
|
|
986
|
+
).length === 0 ? "{}" : formatLogMessage(
|
|
978
987
|
message[key],
|
|
979
|
-
{ prefix: `${prefix}
|
|
988
|
+
{ prefix: `${prefix}--`, skip, sort },
|
|
980
989
|
depth2 + 1
|
|
981
990
|
) : message[key]}`
|
|
982
|
-
).join("\n")}` : message;
|
|
991
|
+
).join("\n")}` : String(message);
|
|
983
992
|
};
|
|
984
993
|
var _isFunction = (value) => {
|
|
985
994
|
try {
|
package/bin/untyped.js
CHANGED
|
@@ -942,22 +942,31 @@ var getStopwatch = (name) => {
|
|
|
942
942
|
);
|
|
943
943
|
};
|
|
944
944
|
};
|
|
945
|
-
var MAX_DEPTH =
|
|
945
|
+
var MAX_DEPTH = 10;
|
|
946
946
|
var formatLogMessage = (message, options = {}, depth2 = 0) => {
|
|
947
947
|
if (depth2 > MAX_DEPTH) {
|
|
948
948
|
return "<max depth>";
|
|
949
949
|
}
|
|
950
|
-
const prefix = options.prefix ?? "
|
|
950
|
+
const prefix = options.prefix ?? "";
|
|
951
951
|
const skip = options.skip ?? [];
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
${
|
|
955
|
-
(
|
|
952
|
+
const sort = options.sort ?? true;
|
|
953
|
+
return typeof message === "undefined" || message === null ? "<empty>" : typeof message === "string" ? !message ? "<empty string>" : message : Array.isArray(message) ? `
|
|
954
|
+
${message.map(
|
|
955
|
+
(item, index) => ` ${prefix}> #${index} = ${formatLogMessage(
|
|
956
|
+
item,
|
|
957
|
+
{ prefix: `${prefix}--`, skip, sort },
|
|
958
|
+
depth2 + 1
|
|
959
|
+
)}`
|
|
960
|
+
).join("\n")}` : typeof message === "object" ? `
|
|
961
|
+
${Object.keys(message).filter((key) => !skip.includes(key)).sort(sort ? (a, b) => a.localeCompare(b) : void 0).map(
|
|
962
|
+
(key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" ? Object.keys(message[key]).filter(
|
|
963
|
+
(key2) => !skip.includes(key2)
|
|
964
|
+
).length === 0 ? "{}" : formatLogMessage(
|
|
956
965
|
message[key],
|
|
957
|
-
{ prefix: `${prefix}
|
|
966
|
+
{ prefix: `${prefix}--`, skip, sort },
|
|
958
967
|
depth2 + 1
|
|
959
968
|
) : message[key]}`
|
|
960
|
-
).join("\n")}` : message;
|
|
969
|
+
).join("\n")}` : String(message);
|
|
961
970
|
};
|
|
962
971
|
var _isFunction = (value) => {
|
|
963
972
|
try {
|
|
@@ -1,7 +1,7 @@
|
|
|
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 _chunkHQANGSQWcjs = require('./chunk-HQANGSQW.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunk4G3IU22Jcjs = require('./chunk-4G3IU22J.cjs');
|
|
@@ -471,10 +471,10 @@ ${generateTypes(schema, {
|
|
|
471
471
|
function generateDeclarationFile(schema, file, generatedBy = "@storm-software/untyped", config) {
|
|
472
472
|
try {
|
|
473
473
|
const declarations = _chunk4G3IU22Jcjs.getOutputFile.call(void 0, file, "d.ts");
|
|
474
|
-
|
|
474
|
+
_chunkHQANGSQWcjs.writeTrace.call(void 0, `Writing type declaration file ${declarations}`, config);
|
|
475
475
|
return _promises.writeFile.call(void 0, declarations, generateDeclaration(schema, generatedBy));
|
|
476
476
|
} catch (error) {
|
|
477
|
-
|
|
477
|
+
_chunkHQANGSQWcjs.writeError.call(void 0,
|
|
478
478
|
`Error writing declaration file for ${file.name}
|
|
479
479
|
|
|
480
480
|
Error:
|
|
@@ -5,17 +5,17 @@ import {
|
|
|
5
5
|
mergedTypes,
|
|
6
6
|
normalizeTypes,
|
|
7
7
|
resolveSchema
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-JPPLDDN5.js";
|
|
9
9
|
import {
|
|
10
10
|
generateJsonSchemaFile
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-2KBNFVQH.js";
|
|
12
12
|
import {
|
|
13
13
|
generateMarkdownFile
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-R3AVHJL7.js";
|
|
15
15
|
import {
|
|
16
16
|
writeError,
|
|
17
17
|
writeTrace
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-HANVKDNV.js";
|
|
19
19
|
import {
|
|
20
20
|
joinPaths
|
|
21
21
|
} from "./chunk-NTN5YK5X.js";
|
|
@@ -269,22 +269,31 @@ ${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.
|
|
|
269
269
|
};
|
|
270
270
|
var writeError = (message, config) => getLogFn(LogLevel.ERROR, config)(message);
|
|
271
271
|
var writeTrace = (message, config) => getLogFn(LogLevel.TRACE, config)(message);
|
|
272
|
-
var MAX_DEPTH =
|
|
272
|
+
var MAX_DEPTH = 10;
|
|
273
273
|
var formatLogMessage = (message, options = {}, depth = 0) => {
|
|
274
274
|
if (depth > MAX_DEPTH) {
|
|
275
275
|
return "<max depth>";
|
|
276
276
|
}
|
|
277
|
-
const prefix = options.prefix ?? "
|
|
277
|
+
const prefix = options.prefix ?? "";
|
|
278
278
|
const skip = options.skip ?? [];
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
${
|
|
282
|
-
(
|
|
279
|
+
const sort = options.sort ?? true;
|
|
280
|
+
return typeof message === "undefined" || message === null ? "<empty>" : typeof message === "string" ? !message ? "<empty string>" : message : Array.isArray(message) ? `
|
|
281
|
+
${message.map(
|
|
282
|
+
(item, index) => ` ${prefix}> #${index} = ${formatLogMessage(
|
|
283
|
+
item,
|
|
284
|
+
{ prefix: `${prefix}--`, skip, sort },
|
|
285
|
+
depth + 1
|
|
286
|
+
)}`
|
|
287
|
+
).join("\n")}` : typeof message === "object" ? `
|
|
288
|
+
${Object.keys(message).filter((key) => !skip.includes(key)).sort(sort ? (a, b) => a.localeCompare(b) : void 0).map(
|
|
289
|
+
(key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" ? Object.keys(message[key]).filter(
|
|
290
|
+
(key2) => !skip.includes(key2)
|
|
291
|
+
).length === 0 ? "{}" : formatLogMessage(
|
|
283
292
|
message[key],
|
|
284
|
-
{ prefix: `${prefix}
|
|
293
|
+
{ prefix: `${prefix}--`, skip, sort },
|
|
285
294
|
depth + 1
|
|
286
295
|
) : message[key]}`
|
|
287
|
-
).join("\n")}` : message;
|
|
296
|
+
).join("\n")}` : String(message);
|
|
288
297
|
};
|
|
289
298
|
var _isFunction = (value) => {
|
|
290
299
|
try {
|
|
@@ -269,22 +269,31 @@ ${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.
|
|
|
269
269
|
};
|
|
270
270
|
var writeError = (message, config) => getLogFn(LogLevel.ERROR, config)(message);
|
|
271
271
|
var writeTrace = (message, config) => getLogFn(LogLevel.TRACE, config)(message);
|
|
272
|
-
var MAX_DEPTH =
|
|
272
|
+
var MAX_DEPTH = 10;
|
|
273
273
|
var formatLogMessage = (message, options = {}, depth = 0) => {
|
|
274
274
|
if (depth > MAX_DEPTH) {
|
|
275
275
|
return "<max depth>";
|
|
276
276
|
}
|
|
277
|
-
const prefix = _nullishCoalesce(options.prefix, () => ( "
|
|
277
|
+
const prefix = _nullishCoalesce(options.prefix, () => ( ""));
|
|
278
278
|
const skip = _nullishCoalesce(options.skip, () => ( []));
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
${
|
|
282
|
-
(
|
|
279
|
+
const sort = _nullishCoalesce(options.sort, () => ( true));
|
|
280
|
+
return typeof message === "undefined" || message === null ? "<empty>" : typeof message === "string" ? !message ? "<empty string>" : message : Array.isArray(message) ? `
|
|
281
|
+
${message.map(
|
|
282
|
+
(item, index) => ` ${prefix}> #${index} = ${formatLogMessage(
|
|
283
|
+
item,
|
|
284
|
+
{ prefix: `${prefix}--`, skip, sort },
|
|
285
|
+
depth + 1
|
|
286
|
+
)}`
|
|
287
|
+
).join("\n")}` : typeof message === "object" ? `
|
|
288
|
+
${Object.keys(message).filter((key) => !skip.includes(key)).sort(sort ? (a, b) => a.localeCompare(b) : void 0).map(
|
|
289
|
+
(key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" ? Object.keys(message[key]).filter(
|
|
290
|
+
(key2) => !skip.includes(key2)
|
|
291
|
+
).length === 0 ? "{}" : formatLogMessage(
|
|
283
292
|
message[key],
|
|
284
|
-
{ prefix: `${prefix}
|
|
293
|
+
{ prefix: `${prefix}--`, skip, sort },
|
|
285
294
|
depth + 1
|
|
286
295
|
) : message[key]}`
|
|
287
|
-
).join("\n")}` : message;
|
|
296
|
+
).join("\n")}` : String(message);
|
|
288
297
|
};
|
|
289
298
|
var _isFunction = (value) => {
|
|
290
299
|
try {
|
|
@@ -5,17 +5,17 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunk3HWZKQ4Wcjs = require('./chunk-3HWZKQ4W.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkQQ644J5Lcjs = require('./chunk-QQ644J5L.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkZ7J2QZVMcjs = require('./chunk-Z7J2QZVM.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkHQANGSQWcjs = require('./chunk-HQANGSQW.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
var _chunk4G3IU22Jcjs = require('./chunk-4G3IU22J.cjs');
|
|
@@ -6627,7 +6627,7 @@ var babelPluginUntyped = function(api, options) {
|
|
|
6627
6627
|
if (p2.parent.type !== "ExportNamedDeclaration" && p2.parent.type !== "ExportDefaultDeclaration") {
|
|
6628
6628
|
return;
|
|
6629
6629
|
}
|
|
6630
|
-
const _getLines =
|
|
6630
|
+
const _getLines = _chunk3HWZKQ4Wcjs.cachedFn.call(void 0, () => this.file.code.split("\n"));
|
|
6631
6631
|
const getCode = (loc) => {
|
|
6632
6632
|
if (!loc) {
|
|
6633
6633
|
return "";
|
|
@@ -6653,7 +6653,7 @@ var babelPluginUntyped = function(api, options) {
|
|
|
6653
6653
|
if (lparam.typeAnnotation) {
|
|
6654
6654
|
Object.assign(
|
|
6655
6655
|
arg,
|
|
6656
|
-
|
|
6656
|
+
_chunk3HWZKQ4Wcjs.mergedTypes.call(void 0,
|
|
6657
6657
|
arg,
|
|
6658
6658
|
inferAnnotationType(lparam.typeAnnotation, getCode)
|
|
6659
6659
|
)
|
|
@@ -6662,7 +6662,7 @@ var babelPluginUntyped = function(api, options) {
|
|
|
6662
6662
|
if (param.type === "AssignmentPattern") {
|
|
6663
6663
|
Object.assign(
|
|
6664
6664
|
arg,
|
|
6665
|
-
|
|
6665
|
+
_chunk3HWZKQ4Wcjs.mergedTypes.call(void 0, arg, inferArgType(param.right))
|
|
6666
6666
|
);
|
|
6667
6667
|
}
|
|
6668
6668
|
schema.args = schema.args || [];
|
|
@@ -6676,7 +6676,7 @@ var babelPluginUntyped = function(api, options) {
|
|
|
6676
6676
|
const { type } = _optionalChain([tag, 'access', _27 => _27.match, 'call', _28 => _28(/^@returns\s+{(?<type>[\S\s]+)}/), 'optionalAccess', _29 => _29.groups]) || {};
|
|
6677
6677
|
if (type) {
|
|
6678
6678
|
schema.returns = schema.returns || {};
|
|
6679
|
-
Object.assign(schema.returns,
|
|
6679
|
+
Object.assign(schema.returns, _chunk3HWZKQ4Wcjs.getTypeDescriptor.call(void 0, type));
|
|
6680
6680
|
return false;
|
|
6681
6681
|
}
|
|
6682
6682
|
}
|
|
@@ -6685,7 +6685,7 @@ var babelPluginUntyped = function(api, options) {
|
|
|
6685
6685
|
if (type && param) {
|
|
6686
6686
|
const arg = _optionalChain([schema, 'access', _33 => _33.args, 'optionalAccess', _34 => _34.find, 'call', _35 => _35((arg2) => arg2.name === param)]);
|
|
6687
6687
|
if (arg) {
|
|
6688
|
-
Object.assign(arg,
|
|
6688
|
+
Object.assign(arg, _chunk3HWZKQ4Wcjs.getTypeDescriptor.call(void 0, type));
|
|
6689
6689
|
return false;
|
|
6690
6690
|
}
|
|
6691
6691
|
}
|
|
@@ -6761,7 +6761,7 @@ function parseJSDocs(input) {
|
|
|
6761
6761
|
if (!type) {
|
|
6762
6762
|
continue;
|
|
6763
6763
|
}
|
|
6764
|
-
Object.assign(schema,
|
|
6764
|
+
Object.assign(schema, _chunk3HWZKQ4Wcjs.getTypeDescriptor.call(void 0, type));
|
|
6765
6765
|
for (const typedef in typedefs) {
|
|
6766
6766
|
schema.markdownType = type;
|
|
6767
6767
|
if (schema.tsType) {
|
|
@@ -6821,20 +6821,20 @@ var AST_JSTYPE_MAP = {
|
|
|
6821
6821
|
};
|
|
6822
6822
|
function inferArgType(e2, getCode) {
|
|
6823
6823
|
if (AST_JSTYPE_MAP[e2.type]) {
|
|
6824
|
-
return
|
|
6824
|
+
return _chunk3HWZKQ4Wcjs.getTypeDescriptor.call(void 0, AST_JSTYPE_MAP[e2.type]);
|
|
6825
6825
|
}
|
|
6826
6826
|
if (e2.type === "AssignmentExpression") {
|
|
6827
6827
|
return inferArgType(e2.right);
|
|
6828
6828
|
}
|
|
6829
6829
|
if (e2.type === "NewExpression" && e2.callee.type === "Identifier") {
|
|
6830
|
-
return
|
|
6830
|
+
return _chunk3HWZKQ4Wcjs.getTypeDescriptor.call(void 0, e2.callee.name);
|
|
6831
6831
|
}
|
|
6832
6832
|
if (e2.type === "ArrayExpression" || e2.type === "TupleExpression") {
|
|
6833
6833
|
const itemTypes = e2.elements.filter((el) => r.isExpression(el)).flatMap((el) => inferArgType(el).type);
|
|
6834
6834
|
return {
|
|
6835
6835
|
type: "array",
|
|
6836
6836
|
items: {
|
|
6837
|
-
type:
|
|
6837
|
+
type: _chunk3HWZKQ4Wcjs.normalizeTypes.call(void 0, itemTypes)
|
|
6838
6838
|
}
|
|
6839
6839
|
};
|
|
6840
6840
|
}
|
|
@@ -6857,10 +6857,10 @@ function inferTSType(tsType, getCode) {
|
|
|
6857
6857
|
items: inferTSType(tsType.typeParameters.params[0], getCode)
|
|
6858
6858
|
};
|
|
6859
6859
|
}
|
|
6860
|
-
return
|
|
6860
|
+
return _chunk3HWZKQ4Wcjs.getTypeDescriptor.call(void 0, getCode(tsType.loc));
|
|
6861
6861
|
}
|
|
6862
6862
|
if (tsType.type === "TSUnionType") {
|
|
6863
|
-
return
|
|
6863
|
+
return _chunk3HWZKQ4Wcjs.mergedTypes.call(void 0, ...tsType.types.map((t2) => inferTSType(t2, getCode)));
|
|
6864
6864
|
}
|
|
6865
6865
|
if (tsType.type === "TSArrayType") {
|
|
6866
6866
|
return {
|
|
@@ -6868,7 +6868,7 @@ function inferTSType(tsType, getCode) {
|
|
|
6868
6868
|
items: inferTSType(tsType.elementType, getCode)
|
|
6869
6869
|
};
|
|
6870
6870
|
}
|
|
6871
|
-
return
|
|
6871
|
+
return _chunk3HWZKQ4Wcjs.getTypeDescriptor.call(void 0, getCode(tsType.loc));
|
|
6872
6872
|
}
|
|
6873
6873
|
|
|
6874
6874
|
// ../../node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/loader/loader.mjs
|
|
@@ -6890,7 +6890,7 @@ async function loadSchema(entryPath, options = {}) {
|
|
|
6890
6890
|
if (rawSchemaKeys.length === 1 && rawSchemaKeys[0] === "default") {
|
|
6891
6891
|
rawSchema = rawSchema.default;
|
|
6892
6892
|
}
|
|
6893
|
-
const schema = await
|
|
6893
|
+
const schema = await _chunk3HWZKQ4Wcjs.resolveSchema.call(void 0, rawSchema, options.defaults, {
|
|
6894
6894
|
ignoreDefaults: options.ignoreDefaults
|
|
6895
6895
|
});
|
|
6896
6896
|
return schema;
|
|
@@ -6898,7 +6898,7 @@ async function loadSchema(entryPath, options = {}) {
|
|
|
6898
6898
|
|
|
6899
6899
|
// src/generate.ts
|
|
6900
6900
|
var getGenerateAction = (config) => async (options) => {
|
|
6901
|
-
|
|
6901
|
+
_chunkHQANGSQWcjs.writeTrace.call(void 0,
|
|
6902
6902
|
`Running Storm Untyped with options: ${JSON.stringify(options)}`,
|
|
6903
6903
|
config
|
|
6904
6904
|
);
|
|
@@ -6917,7 +6917,7 @@ var getGenerateAction = (config) => async (options) => {
|
|
|
6917
6917
|
});
|
|
6918
6918
|
await Promise.all(
|
|
6919
6919
|
files.map(async (file) => {
|
|
6920
|
-
|
|
6920
|
+
_chunkHQANGSQWcjs.writeTrace.call(void 0,
|
|
6921
6921
|
`Generating files for schema file: ${_chunk4G3IU22Jcjs.joinPaths.call(void 0, file.parentPath, file.name)}`,
|
|
6922
6922
|
config
|
|
6923
6923
|
);
|
|
@@ -6936,7 +6936,7 @@ var getGenerateAction = (config) => async (options) => {
|
|
|
6936
6936
|
}
|
|
6937
6937
|
});
|
|
6938
6938
|
} catch (error) {
|
|
6939
|
-
|
|
6939
|
+
_chunkHQANGSQWcjs.writeError.call(void 0,
|
|
6940
6940
|
`Error while parsing schema file: ${_chunk4G3IU22Jcjs.joinPaths.call(void 0, file.parentPath, file.name)}
|
|
6941
6941
|
|
|
6942
6942
|
Error:
|
|
@@ -6952,12 +6952,12 @@ ${JSON.stringify(schema)}
|
|
|
6952
6952
|
}
|
|
6953
6953
|
const promises = [];
|
|
6954
6954
|
promises.push(
|
|
6955
|
-
|
|
6955
|
+
_chunk3HWZKQ4Wcjs.generateDeclarationFile.call(void 0, schema, file, options.generatedBy, config)
|
|
6956
6956
|
);
|
|
6957
6957
|
promises.push(
|
|
6958
|
-
|
|
6958
|
+
_chunkZ7J2QZVMcjs.generateMarkdownFile.call(void 0, schema, file, options.generatedBy, config)
|
|
6959
6959
|
);
|
|
6960
|
-
promises.push(
|
|
6960
|
+
promises.push(_chunkQQ644J5Lcjs.generateJsonSchemaFile.call(void 0, schema, file, config));
|
|
6961
6961
|
return Promise.all(promises);
|
|
6962
6962
|
})
|
|
6963
6963
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
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 _chunkHQANGSQWcjs = require('./chunk-HQANGSQW.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunk4G3IU22Jcjs = require('./chunk-4G3IU22J.cjs');
|
|
@@ -11,10 +11,10 @@ var _promises = require('fs/promises');
|
|
|
11
11
|
function generateJsonSchemaFile(schema, file, config) {
|
|
12
12
|
try {
|
|
13
13
|
const jsonSchema = _chunk4G3IU22Jcjs.getOutputFile.call(void 0, file, "json");
|
|
14
|
-
|
|
14
|
+
_chunkHQANGSQWcjs.writeTrace.call(void 0, `Writing JSON schema file ${jsonSchema}`, config);
|
|
15
15
|
return _promises.writeFile.call(void 0, jsonSchema, JSON.stringify(schema, null, 2));
|
|
16
16
|
} catch (error) {
|
|
17
|
-
|
|
17
|
+
_chunkHQANGSQWcjs.writeError.call(void 0,
|
|
18
18
|
`Error writing JSON schema file for ${file.name}
|
|
19
19
|
|
|
20
20
|
Error:
|
|
@@ -1,7 +1,7 @@
|
|
|
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 _chunkHQANGSQWcjs = require('./chunk-HQANGSQW.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunk4G3IU22Jcjs = require('./chunk-4G3IU22J.cjs');
|
|
@@ -45,10 +45,10 @@ function generateMarkdownLevel(schema, title, level) {
|
|
|
45
45
|
function generateMarkdownFile(schema, file, generatedBy = "@storm-software/untyped", config) {
|
|
46
46
|
try {
|
|
47
47
|
const declarations = _chunk4G3IU22Jcjs.getOutputFile.call(void 0, file, "md");
|
|
48
|
-
|
|
48
|
+
_chunkHQANGSQWcjs.writeTrace.call(void 0, `Writing type markdown file ${declarations}`, config);
|
|
49
49
|
return _promises.writeFile.call(void 0, declarations, generateMarkdown(schema, generatedBy));
|
|
50
50
|
} catch (error) {
|
|
51
|
-
|
|
51
|
+
_chunkHQANGSQWcjs.writeError.call(void 0,
|
|
52
52
|
`Error writing markdown file for ${file.name}
|
|
53
53
|
|
|
54
54
|
Error:
|
package/dist/generate.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
3
|
+
var _chunkLUVSO3MUcjs = require('./chunk-LUVSO3MU.cjs');
|
|
4
|
+
require('./chunk-3HWZKQ4W.cjs');
|
|
5
|
+
require('./chunk-QQ644J5L.cjs');
|
|
6
|
+
require('./chunk-Z7J2QZVM.cjs');
|
|
7
|
+
require('./chunk-HQANGSQW.cjs');
|
|
8
8
|
require('./chunk-4G3IU22J.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.getGenerateAction =
|
|
11
|
+
exports.getGenerateAction = _chunkLUVSO3MUcjs.getGenerateAction;
|
package/dist/generate.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getGenerateAction
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-7DSS3WGG.js";
|
|
4
|
+
import "./chunk-JPPLDDN5.js";
|
|
5
|
+
import "./chunk-2KBNFVQH.js";
|
|
6
|
+
import "./chunk-R3AVHJL7.js";
|
|
7
|
+
import "./chunk-HANVKDNV.js";
|
|
8
8
|
import "./chunk-NTN5YK5X.js";
|
|
9
9
|
export {
|
|
10
10
|
getGenerateAction
|
package/dist/index.cjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkLUVSO3MUcjs = require('./chunk-LUVSO3MU.cjs');
|
|
4
4
|
require('./chunk-TQVHFPJA.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunk3HWZKQ4Wcjs = require('./chunk-3HWZKQ4W.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkQQ644J5Lcjs = require('./chunk-QQ644J5L.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
16
|
-
require('./chunk-
|
|
15
|
+
var _chunkZ7J2QZVMcjs = require('./chunk-Z7J2QZVM.cjs');
|
|
16
|
+
require('./chunk-HQANGSQW.cjs');
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
var _chunk4G3IU22Jcjs = require('./chunk-4G3IU22J.cjs');
|
|
@@ -25,4 +25,4 @@ var _chunk4G3IU22Jcjs = require('./chunk-4G3IU22J.cjs');
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
exports.generateDeclaration =
|
|
28
|
+
exports.generateDeclaration = _chunk3HWZKQ4Wcjs.generateDeclaration; exports.generateDeclarationFile = _chunk3HWZKQ4Wcjs.generateDeclarationFile; exports.generateJsonSchemaFile = _chunkQQ644J5Lcjs.generateJsonSchemaFile; exports.generateMarkdown = _chunkZ7J2QZVMcjs.generateMarkdown; exports.generateMarkdownFile = _chunkZ7J2QZVMcjs.generateMarkdownFile; exports.getGenerateAction = _chunkLUVSO3MUcjs.getGenerateAction; exports.getOutputFile = _chunk4G3IU22Jcjs.getOutputFile;
|
package/dist/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getGenerateAction
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7DSS3WGG.js";
|
|
4
4
|
import "./chunk-BY5UJMXQ.js";
|
|
5
5
|
import {
|
|
6
6
|
generateDeclaration,
|
|
7
7
|
generateDeclarationFile
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-JPPLDDN5.js";
|
|
9
9
|
import {
|
|
10
10
|
generateJsonSchemaFile
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-2KBNFVQH.js";
|
|
12
12
|
import {
|
|
13
13
|
generateMarkdown,
|
|
14
14
|
generateMarkdownFile
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-R3AVHJL7.js";
|
|
16
|
+
import "./chunk-HANVKDNV.js";
|
|
17
17
|
import {
|
|
18
18
|
getOutputFile
|
|
19
19
|
} from "./chunk-NTN5YK5X.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/untyped",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.156",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing `untyped` utilities for building Storm Software libraries and applications",
|
|
6
6
|
"repository": {
|
|
@@ -179,18 +179,18 @@
|
|
|
179
179
|
"sullivanpj"
|
|
180
180
|
],
|
|
181
181
|
"dependencies": {
|
|
182
|
-
"@storm-software/config-tools": "^1.190.
|
|
182
|
+
"@storm-software/config-tools": "^1.190.14",
|
|
183
183
|
"commander": "^12.1.0",
|
|
184
184
|
"glob": "^11.1.0",
|
|
185
185
|
"jiti": "2.4.2",
|
|
186
186
|
"knitwork": "^1.3.0"
|
|
187
187
|
},
|
|
188
188
|
"devDependencies": {
|
|
189
|
-
"@types/node": "^25.
|
|
189
|
+
"@types/node": "^25.8.0",
|
|
190
190
|
"tsup": "8.4.0",
|
|
191
191
|
"untyped": "^2.0.0"
|
|
192
192
|
},
|
|
193
193
|
"publishConfig": { "access": "public" },
|
|
194
194
|
"sideEffects": false,
|
|
195
|
-
"gitHead": "
|
|
195
|
+
"gitHead": "0c334cad4cd3237b830127698face8e1f4f508fb"
|
|
196
196
|
}
|