@storm-software/untyped 0.24.141 → 0.24.142
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 -28
- package/bin/untyped.js +17 -28
- package/dist/{chunk-2QXYKXJH.js → chunk-2SQOGXXW.js} +1 -1
- package/dist/{chunk-42BW2V75.js → chunk-6ICZFPBE.js} +4 -4
- package/dist/{chunk-RFQVKOZZ.js → chunk-CGUOYQRT.js} +17 -28
- package/dist/{chunk-73YXHPUU.cjs → chunk-DUGCV565.cjs} +3 -3
- package/dist/{chunk-DWXQWSAF.cjs → chunk-KALLFA4S.cjs} +23 -23
- package/dist/{chunk-EX3ITOQ3.cjs → chunk-LHYAYO72.cjs} +3 -3
- package/dist/{chunk-FY574UY5.js → chunk-UQHYOHNO.js} +1 -1
- package/dist/{chunk-ABFPY6JS.js → chunk-VH355W76.js} +1 -1
- package/dist/{chunk-2RPXNOIR.cjs → chunk-X6IHBBFY.cjs} +3 -3
- package/dist/{chunk-QIOIKJ3P.cjs → chunk-YEL7HQVG.cjs} +17 -28
- package/dist/generate.cjs +6 -6
- package/dist/generate.d.cts +1 -1
- package/dist/generate.d.ts +1 -1
- package/dist/generate.js +5 -5
- package/dist/index.cjs +6 -6
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -5
- package/dist/types-Dug-2iKz.d.cts +243 -0
- package/dist/types-Dug-2iKz.d.ts +243 -0
- package/package.json +3 -3
package/bin/untyped.cjs
CHANGED
|
@@ -776,8 +776,8 @@ var CONSOLE_ICONS = {
|
|
|
776
776
|
};
|
|
777
777
|
|
|
778
778
|
// ../config-tools/src/logger/format-timestamp.ts
|
|
779
|
-
var formatTimestamp = (date = /* @__PURE__ */ new Date()) => {
|
|
780
|
-
return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
|
|
779
|
+
var formatTimestamp = (fullDateTime = false, date = /* @__PURE__ */ new Date()) => {
|
|
780
|
+
return fullDateTime ? `${date.toLocaleDateString()} ${date.toLocaleTimeString()}` : `${date.toLocaleTimeString()}`;
|
|
781
781
|
};
|
|
782
782
|
|
|
783
783
|
// ../config-tools/src/logger/get-log-level.ts
|
|
@@ -837,7 +837,12 @@ var getLogLevelLabel = (logLevel = LogLevel.INFO) => {
|
|
|
837
837
|
};
|
|
838
838
|
|
|
839
839
|
// ../config-tools/src/logger/console.ts
|
|
840
|
-
var getLogFn = (logLevel = LogLevel.INFO, config = {},
|
|
840
|
+
var getLogFn = (logLevel = LogLevel.INFO, config = {}, options = {}) => {
|
|
841
|
+
const {
|
|
842
|
+
chalk: _chalk = getChalk(),
|
|
843
|
+
fullDateTime = false,
|
|
844
|
+
hideDateTime = false
|
|
845
|
+
} = options;
|
|
841
846
|
const colors = !config.colors?.dark && !config.colors?.["base"] && !config.colors?.["base"]?.dark ? DEFAULT_COLOR_CONFIG : config.colors?.dark && typeof config.colors.dark === "string" ? config.colors : config.colors?.["base"]?.dark && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : config.colors?.["base"] ? config.colors?.["base"] : DEFAULT_COLOR_CONFIG;
|
|
842
847
|
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
|
|
843
848
|
if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
|
|
@@ -848,9 +853,7 @@ var getLogFn = (logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
|
|
|
848
853
|
return (message) => {
|
|
849
854
|
console.error(
|
|
850
855
|
`
|
|
851
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
852
|
-
colors.fatal ?? DEFAULT_COLOR_CONFIG.dark.fatal
|
|
853
|
-
)(
|
|
856
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.fatal ?? DEFAULT_COLOR_CONFIG.dark.fatal)(
|
|
854
857
|
`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal] `
|
|
855
858
|
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
856
859
|
`
|
|
@@ -861,9 +864,7 @@ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
|
861
864
|
return (message) => {
|
|
862
865
|
console.error(
|
|
863
866
|
`
|
|
864
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
865
|
-
colors.danger ?? DEFAULT_COLOR_CONFIG.dark.danger
|
|
866
|
-
)(
|
|
867
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.danger ?? DEFAULT_COLOR_CONFIG.dark.danger)(
|
|
867
868
|
`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error] `
|
|
868
869
|
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
869
870
|
`
|
|
@@ -874,9 +875,7 @@ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
|
874
875
|
return (message) => {
|
|
875
876
|
console.warn(
|
|
876
877
|
`
|
|
877
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
878
|
-
colors.warning ?? DEFAULT_COLOR_CONFIG.dark.warning
|
|
879
|
-
)(
|
|
878
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.warning ?? DEFAULT_COLOR_CONFIG.dark.warning)(
|
|
880
879
|
`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn] `
|
|
881
880
|
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
882
881
|
`
|
|
@@ -887,9 +886,7 @@ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
|
887
886
|
return (message) => {
|
|
888
887
|
console.info(
|
|
889
888
|
`
|
|
890
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
891
|
-
colors.success ?? DEFAULT_COLOR_CONFIG.dark.success
|
|
892
|
-
)(
|
|
889
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.success ?? DEFAULT_COLOR_CONFIG.dark.success)(
|
|
893
890
|
`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success] `
|
|
894
891
|
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
895
892
|
`
|
|
@@ -900,9 +897,7 @@ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
|
900
897
|
return (message) => {
|
|
901
898
|
console.info(
|
|
902
899
|
`
|
|
903
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
904
|
-
colors.info ?? DEFAULT_COLOR_CONFIG.dark.info
|
|
905
|
-
)(
|
|
900
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.info ?? DEFAULT_COLOR_CONFIG.dark.info)(
|
|
906
901
|
`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info] `
|
|
907
902
|
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
908
903
|
`
|
|
@@ -913,9 +908,7 @@ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
|
913
908
|
return (message) => {
|
|
914
909
|
console.debug(
|
|
915
910
|
`
|
|
916
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
917
|
-
colors.performance ?? DEFAULT_COLOR_CONFIG.dark.performance
|
|
918
|
-
)(
|
|
911
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.performance ?? DEFAULT_COLOR_CONFIG.dark.performance)(
|
|
919
912
|
`[${CONSOLE_ICONS[LogLevelLabel.PERFORMANCE]} Performance] `
|
|
920
913
|
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
921
914
|
`
|
|
@@ -926,9 +919,7 @@ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
|
926
919
|
return (message) => {
|
|
927
920
|
console.debug(
|
|
928
921
|
`
|
|
929
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
930
|
-
colors.debug ?? DEFAULT_COLOR_CONFIG.dark.debug
|
|
931
|
-
)(
|
|
922
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.debug ?? DEFAULT_COLOR_CONFIG.dark.debug)(
|
|
932
923
|
`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug] `
|
|
933
924
|
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
934
925
|
`
|
|
@@ -939,7 +930,7 @@ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
|
939
930
|
return (message) => {
|
|
940
931
|
console.debug(
|
|
941
932
|
`
|
|
942
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex("#bbbbbb")(
|
|
933
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex("#bbbbbb")(
|
|
943
934
|
`[${CONSOLE_ICONS[LogLevelLabel.TRACE]} Trace] `
|
|
944
935
|
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
945
936
|
`
|
|
@@ -949,9 +940,7 @@ ${_chalk.gray(formatTimestamp())} ${_chalk.hex("#bbbbbb")(
|
|
|
949
940
|
return (message) => {
|
|
950
941
|
console.log(
|
|
951
942
|
`
|
|
952
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
953
|
-
colors.brand ?? DEFAULT_COLOR_CONFIG.dark.brand
|
|
954
|
-
)(
|
|
943
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.brand ?? DEFAULT_COLOR_CONFIG.dark.brand)(
|
|
955
944
|
`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System] `
|
|
956
945
|
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
957
946
|
`
|
package/bin/untyped.js
CHANGED
|
@@ -754,8 +754,8 @@ var CONSOLE_ICONS = {
|
|
|
754
754
|
};
|
|
755
755
|
|
|
756
756
|
// ../config-tools/src/logger/format-timestamp.ts
|
|
757
|
-
var formatTimestamp = (date = /* @__PURE__ */ new Date()) => {
|
|
758
|
-
return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
|
|
757
|
+
var formatTimestamp = (fullDateTime = false, date = /* @__PURE__ */ new Date()) => {
|
|
758
|
+
return fullDateTime ? `${date.toLocaleDateString()} ${date.toLocaleTimeString()}` : `${date.toLocaleTimeString()}`;
|
|
759
759
|
};
|
|
760
760
|
|
|
761
761
|
// ../config-tools/src/logger/get-log-level.ts
|
|
@@ -815,7 +815,12 @@ var getLogLevelLabel = (logLevel = LogLevel.INFO) => {
|
|
|
815
815
|
};
|
|
816
816
|
|
|
817
817
|
// ../config-tools/src/logger/console.ts
|
|
818
|
-
var getLogFn = (logLevel = LogLevel.INFO, config = {},
|
|
818
|
+
var getLogFn = (logLevel = LogLevel.INFO, config = {}, options = {}) => {
|
|
819
|
+
const {
|
|
820
|
+
chalk: _chalk = getChalk(),
|
|
821
|
+
fullDateTime = false,
|
|
822
|
+
hideDateTime = false
|
|
823
|
+
} = options;
|
|
819
824
|
const colors = !config.colors?.dark && !config.colors?.["base"] && !config.colors?.["base"]?.dark ? DEFAULT_COLOR_CONFIG : config.colors?.dark && typeof config.colors.dark === "string" ? config.colors : config.colors?.["base"]?.dark && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : config.colors?.["base"] ? config.colors?.["base"] : DEFAULT_COLOR_CONFIG;
|
|
820
825
|
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
|
|
821
826
|
if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
|
|
@@ -826,9 +831,7 @@ var getLogFn = (logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
|
|
|
826
831
|
return (message) => {
|
|
827
832
|
console.error(
|
|
828
833
|
`
|
|
829
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
830
|
-
colors.fatal ?? DEFAULT_COLOR_CONFIG.dark.fatal
|
|
831
|
-
)(
|
|
834
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.fatal ?? DEFAULT_COLOR_CONFIG.dark.fatal)(
|
|
832
835
|
`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal] `
|
|
833
836
|
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
834
837
|
`
|
|
@@ -839,9 +842,7 @@ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
|
839
842
|
return (message) => {
|
|
840
843
|
console.error(
|
|
841
844
|
`
|
|
842
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
843
|
-
colors.danger ?? DEFAULT_COLOR_CONFIG.dark.danger
|
|
844
|
-
)(
|
|
845
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.danger ?? DEFAULT_COLOR_CONFIG.dark.danger)(
|
|
845
846
|
`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error] `
|
|
846
847
|
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
847
848
|
`
|
|
@@ -852,9 +853,7 @@ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
|
852
853
|
return (message) => {
|
|
853
854
|
console.warn(
|
|
854
855
|
`
|
|
855
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
856
|
-
colors.warning ?? DEFAULT_COLOR_CONFIG.dark.warning
|
|
857
|
-
)(
|
|
856
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.warning ?? DEFAULT_COLOR_CONFIG.dark.warning)(
|
|
858
857
|
`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn] `
|
|
859
858
|
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
860
859
|
`
|
|
@@ -865,9 +864,7 @@ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
|
865
864
|
return (message) => {
|
|
866
865
|
console.info(
|
|
867
866
|
`
|
|
868
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
869
|
-
colors.success ?? DEFAULT_COLOR_CONFIG.dark.success
|
|
870
|
-
)(
|
|
867
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.success ?? DEFAULT_COLOR_CONFIG.dark.success)(
|
|
871
868
|
`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success] `
|
|
872
869
|
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
873
870
|
`
|
|
@@ -878,9 +875,7 @@ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
|
878
875
|
return (message) => {
|
|
879
876
|
console.info(
|
|
880
877
|
`
|
|
881
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
882
|
-
colors.info ?? DEFAULT_COLOR_CONFIG.dark.info
|
|
883
|
-
)(
|
|
878
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.info ?? DEFAULT_COLOR_CONFIG.dark.info)(
|
|
884
879
|
`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info] `
|
|
885
880
|
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
886
881
|
`
|
|
@@ -891,9 +886,7 @@ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
|
891
886
|
return (message) => {
|
|
892
887
|
console.debug(
|
|
893
888
|
`
|
|
894
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
895
|
-
colors.performance ?? DEFAULT_COLOR_CONFIG.dark.performance
|
|
896
|
-
)(
|
|
889
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.performance ?? DEFAULT_COLOR_CONFIG.dark.performance)(
|
|
897
890
|
`[${CONSOLE_ICONS[LogLevelLabel.PERFORMANCE]} Performance] `
|
|
898
891
|
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
899
892
|
`
|
|
@@ -904,9 +897,7 @@ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
|
904
897
|
return (message) => {
|
|
905
898
|
console.debug(
|
|
906
899
|
`
|
|
907
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
908
|
-
colors.debug ?? DEFAULT_COLOR_CONFIG.dark.debug
|
|
909
|
-
)(
|
|
900
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.debug ?? DEFAULT_COLOR_CONFIG.dark.debug)(
|
|
910
901
|
`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug] `
|
|
911
902
|
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
912
903
|
`
|
|
@@ -917,7 +908,7 @@ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
|
917
908
|
return (message) => {
|
|
918
909
|
console.debug(
|
|
919
910
|
`
|
|
920
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex("#bbbbbb")(
|
|
911
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex("#bbbbbb")(
|
|
921
912
|
`[${CONSOLE_ICONS[LogLevelLabel.TRACE]} Trace] `
|
|
922
913
|
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
923
914
|
`
|
|
@@ -927,9 +918,7 @@ ${_chalk.gray(formatTimestamp())} ${_chalk.hex("#bbbbbb")(
|
|
|
927
918
|
return (message) => {
|
|
928
919
|
console.log(
|
|
929
920
|
`
|
|
930
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
931
|
-
colors.brand ?? DEFAULT_COLOR_CONFIG.dark.brand
|
|
932
|
-
)(
|
|
921
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.brand ?? DEFAULT_COLOR_CONFIG.dark.brand)(
|
|
933
922
|
`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System] `
|
|
934
923
|
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
935
924
|
`
|
|
@@ -5,17 +5,17 @@ import {
|
|
|
5
5
|
mergedTypes,
|
|
6
6
|
normalizeTypes,
|
|
7
7
|
resolveSchema
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-VH355W76.js";
|
|
9
9
|
import {
|
|
10
10
|
generateJsonSchemaFile
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-UQHYOHNO.js";
|
|
12
12
|
import {
|
|
13
13
|
generateMarkdownFile
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-2SQOGXXW.js";
|
|
15
15
|
import {
|
|
16
16
|
writeError,
|
|
17
17
|
writeTrace
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-CGUOYQRT.js";
|
|
19
19
|
import {
|
|
20
20
|
joinPaths
|
|
21
21
|
} from "./chunk-NTN5YK5X.js";
|
|
@@ -126,8 +126,8 @@ var CONSOLE_ICONS = {
|
|
|
126
126
|
};
|
|
127
127
|
|
|
128
128
|
// ../config-tools/src/logger/format-timestamp.ts
|
|
129
|
-
var formatTimestamp = (date = /* @__PURE__ */ new Date()) => {
|
|
130
|
-
return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
|
|
129
|
+
var formatTimestamp = (fullDateTime = false, date = /* @__PURE__ */ new Date()) => {
|
|
130
|
+
return fullDateTime ? `${date.toLocaleDateString()} ${date.toLocaleTimeString()}` : `${date.toLocaleTimeString()}`;
|
|
131
131
|
};
|
|
132
132
|
|
|
133
133
|
// ../config-tools/src/logger/get-log-level.ts
|
|
@@ -157,7 +157,12 @@ var getLogLevel = (label) => {
|
|
|
157
157
|
};
|
|
158
158
|
|
|
159
159
|
// ../config-tools/src/logger/console.ts
|
|
160
|
-
var getLogFn = (logLevel = LogLevel.INFO, config = {},
|
|
160
|
+
var getLogFn = (logLevel = LogLevel.INFO, config = {}, options = {}) => {
|
|
161
|
+
const {
|
|
162
|
+
chalk: _chalk = getChalk(),
|
|
163
|
+
fullDateTime = false,
|
|
164
|
+
hideDateTime = false
|
|
165
|
+
} = options;
|
|
161
166
|
const colors = !config.colors?.dark && !config.colors?.["base"] && !config.colors?.["base"]?.dark ? DEFAULT_COLOR_CONFIG : config.colors?.dark && typeof config.colors.dark === "string" ? config.colors : config.colors?.["base"]?.dark && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : config.colors?.["base"] ? config.colors?.["base"] : DEFAULT_COLOR_CONFIG;
|
|
162
167
|
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
|
|
163
168
|
if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
|
|
@@ -168,9 +173,7 @@ var getLogFn = (logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
|
|
|
168
173
|
return (message) => {
|
|
169
174
|
console.error(
|
|
170
175
|
`
|
|
171
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
172
|
-
colors.fatal ?? DEFAULT_COLOR_CONFIG.dark.fatal
|
|
173
|
-
)(
|
|
176
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.fatal ?? DEFAULT_COLOR_CONFIG.dark.fatal)(
|
|
174
177
|
`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal] `
|
|
175
178
|
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
176
179
|
`
|
|
@@ -181,9 +184,7 @@ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
|
181
184
|
return (message) => {
|
|
182
185
|
console.error(
|
|
183
186
|
`
|
|
184
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
185
|
-
colors.danger ?? DEFAULT_COLOR_CONFIG.dark.danger
|
|
186
|
-
)(
|
|
187
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.danger ?? DEFAULT_COLOR_CONFIG.dark.danger)(
|
|
187
188
|
`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error] `
|
|
188
189
|
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
189
190
|
`
|
|
@@ -194,9 +195,7 @@ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
|
194
195
|
return (message) => {
|
|
195
196
|
console.warn(
|
|
196
197
|
`
|
|
197
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
198
|
-
colors.warning ?? DEFAULT_COLOR_CONFIG.dark.warning
|
|
199
|
-
)(
|
|
198
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.warning ?? DEFAULT_COLOR_CONFIG.dark.warning)(
|
|
200
199
|
`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn] `
|
|
201
200
|
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
202
201
|
`
|
|
@@ -207,9 +206,7 @@ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
|
207
206
|
return (message) => {
|
|
208
207
|
console.info(
|
|
209
208
|
`
|
|
210
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
211
|
-
colors.success ?? DEFAULT_COLOR_CONFIG.dark.success
|
|
212
|
-
)(
|
|
209
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.success ?? DEFAULT_COLOR_CONFIG.dark.success)(
|
|
213
210
|
`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success] `
|
|
214
211
|
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
215
212
|
`
|
|
@@ -220,9 +217,7 @@ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
|
220
217
|
return (message) => {
|
|
221
218
|
console.info(
|
|
222
219
|
`
|
|
223
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
224
|
-
colors.info ?? DEFAULT_COLOR_CONFIG.dark.info
|
|
225
|
-
)(
|
|
220
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.info ?? DEFAULT_COLOR_CONFIG.dark.info)(
|
|
226
221
|
`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info] `
|
|
227
222
|
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
228
223
|
`
|
|
@@ -233,9 +228,7 @@ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
|
233
228
|
return (message) => {
|
|
234
229
|
console.debug(
|
|
235
230
|
`
|
|
236
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
237
|
-
colors.performance ?? DEFAULT_COLOR_CONFIG.dark.performance
|
|
238
|
-
)(
|
|
231
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.performance ?? DEFAULT_COLOR_CONFIG.dark.performance)(
|
|
239
232
|
`[${CONSOLE_ICONS[LogLevelLabel.PERFORMANCE]} Performance] `
|
|
240
233
|
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
241
234
|
`
|
|
@@ -246,9 +239,7 @@ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
|
246
239
|
return (message) => {
|
|
247
240
|
console.debug(
|
|
248
241
|
`
|
|
249
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
250
|
-
colors.debug ?? DEFAULT_COLOR_CONFIG.dark.debug
|
|
251
|
-
)(
|
|
242
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.debug ?? DEFAULT_COLOR_CONFIG.dark.debug)(
|
|
252
243
|
`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug] `
|
|
253
244
|
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
254
245
|
`
|
|
@@ -259,7 +250,7 @@ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
|
259
250
|
return (message) => {
|
|
260
251
|
console.debug(
|
|
261
252
|
`
|
|
262
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex("#bbbbbb")(
|
|
253
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex("#bbbbbb")(
|
|
263
254
|
`[${CONSOLE_ICONS[LogLevelLabel.TRACE]} Trace] `
|
|
264
255
|
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
265
256
|
`
|
|
@@ -269,9 +260,7 @@ ${_chalk.gray(formatTimestamp())} ${_chalk.hex("#bbbbbb")(
|
|
|
269
260
|
return (message) => {
|
|
270
261
|
console.log(
|
|
271
262
|
`
|
|
272
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(
|
|
273
|
-
colors.brand ?? DEFAULT_COLOR_CONFIG.dark.brand
|
|
274
|
-
)(
|
|
263
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.brand ?? DEFAULT_COLOR_CONFIG.dark.brand)(
|
|
275
264
|
`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System] `
|
|
276
265
|
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
277
266
|
`
|
|
@@ -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 _chunkYEL7HQVGcjs = require('./chunk-YEL7HQVG.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
|
+
_chunkYEL7HQVGcjs.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
|
+
_chunkYEL7HQVGcjs.writeError.call(void 0,
|
|
478
478
|
`Error writing declaration file for ${file.name}
|
|
479
479
|
|
|
480
480
|
Error:
|
|
@@ -5,17 +5,17 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkDUGCV565cjs = require('./chunk-DUGCV565.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkLHYAYO72cjs = require('./chunk-LHYAYO72.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkX6IHBBFYcjs = require('./chunk-X6IHBBFY.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkYEL7HQVGcjs = require('./chunk-YEL7HQVG.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 = _chunkDUGCV565cjs.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
|
+
_chunkDUGCV565cjs.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
|
+
_chunkDUGCV565cjs.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, _chunkDUGCV565cjs.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, _chunkDUGCV565cjs.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, _chunkDUGCV565cjs.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 _chunkDUGCV565cjs.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 _chunkDUGCV565cjs.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: _chunkDUGCV565cjs.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 _chunkDUGCV565cjs.getTypeDescriptor.call(void 0, getCode(tsType.loc));
|
|
6861
6861
|
}
|
|
6862
6862
|
if (tsType.type === "TSUnionType") {
|
|
6863
|
-
return
|
|
6863
|
+
return _chunkDUGCV565cjs.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 _chunkDUGCV565cjs.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 _chunkDUGCV565cjs.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
|
+
_chunkYEL7HQVGcjs.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
|
+
_chunkYEL7HQVGcjs.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
|
+
_chunkYEL7HQVGcjs.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
|
+
_chunkDUGCV565cjs.generateDeclarationFile.call(void 0, schema, file, options.generatedBy, config)
|
|
6956
6956
|
);
|
|
6957
6957
|
promises.push(
|
|
6958
|
-
|
|
6958
|
+
_chunkX6IHBBFYcjs.generateMarkdownFile.call(void 0, schema, file, options.generatedBy, config)
|
|
6959
6959
|
);
|
|
6960
|
-
promises.push(
|
|
6960
|
+
promises.push(_chunkLHYAYO72cjs.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 _chunkYEL7HQVGcjs = require('./chunk-YEL7HQVG.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
|
+
_chunkYEL7HQVGcjs.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
|
+
_chunkYEL7HQVGcjs.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 _chunkYEL7HQVGcjs = require('./chunk-YEL7HQVG.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
|
+
_chunkYEL7HQVGcjs.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
|
+
_chunkYEL7HQVGcjs.writeError.call(void 0,
|
|
52
52
|
`Error writing markdown file for ${file.name}
|
|
53
53
|
|
|
54
54
|
Error:
|