@storm-software/tsup 0.2.218 → 0.2.219
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/{chunk-MRNT4YOB.js → chunk-WAA5IASW.js} +1954 -1958
- package/dist/index.cjs +888 -892
- package/dist/index.js +1 -1
- package/dist/options.cjs +1698 -1698
- package/dist/options.js +1 -1
- package/package.json +4 -4
|
@@ -738,15 +738,41 @@ import { relative } from "path";
|
|
|
738
738
|
// ../config-tools/dist/get-config.js
|
|
739
739
|
init_esm_shims();
|
|
740
740
|
|
|
741
|
-
// ../config-tools/dist/chunk-
|
|
741
|
+
// ../config-tools/dist/chunk-RL5DRDS6.js
|
|
742
742
|
init_esm_shims();
|
|
743
743
|
|
|
744
|
-
// ../config-tools/dist/chunk-
|
|
744
|
+
// ../config-tools/dist/chunk-6VD3CYGA.js
|
|
745
745
|
init_esm_shims();
|
|
746
746
|
|
|
747
|
-
// ../config-tools/dist/chunk-
|
|
747
|
+
// ../config-tools/dist/chunk-KVJGV2WN.js
|
|
748
|
+
init_esm_shims();
|
|
749
|
+
|
|
750
|
+
// ../config-tools/dist/chunk-LF3SAK2O.js
|
|
748
751
|
init_esm_shims();
|
|
749
752
|
|
|
753
|
+
// ../config-tools/dist/chunk-RUKM6FCF.js
|
|
754
|
+
init_esm_shims();
|
|
755
|
+
import { existsSync as existsSync5 } from "node:fs";
|
|
756
|
+
import { join as join3 } from "node:path";
|
|
757
|
+
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
758
|
+
var depth = 0;
|
|
759
|
+
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
760
|
+
const _startPath = startPath ?? process.cwd();
|
|
761
|
+
if (endDirectoryNames.some(
|
|
762
|
+
(endDirName) => existsSync5(join3(_startPath, endDirName))
|
|
763
|
+
)) {
|
|
764
|
+
return _startPath;
|
|
765
|
+
}
|
|
766
|
+
if (endFileNames.some((endFileName) => existsSync5(join3(_startPath, endFileName)))) {
|
|
767
|
+
return _startPath;
|
|
768
|
+
}
|
|
769
|
+
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
770
|
+
const parent = join3(_startPath, "..");
|
|
771
|
+
return findFolderUp(parent, endFileNames, endDirectoryNames);
|
|
772
|
+
}
|
|
773
|
+
return void 0;
|
|
774
|
+
}
|
|
775
|
+
|
|
750
776
|
// ../config-tools/dist/chunk-V3GMJ4TX.js
|
|
751
777
|
init_esm_shims();
|
|
752
778
|
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
@@ -873,8 +899,169 @@ var isAbsolute = function(p3) {
|
|
|
873
899
|
return _IS_ABSOLUTE_RE.test(p3);
|
|
874
900
|
};
|
|
875
901
|
|
|
876
|
-
// ../config-tools/dist/chunk-
|
|
902
|
+
// ../config-tools/dist/chunk-LF3SAK2O.js
|
|
903
|
+
var rootFiles = [
|
|
904
|
+
"storm-workspace.json",
|
|
905
|
+
"storm-workspace.yaml",
|
|
906
|
+
"storm-workspace.yml",
|
|
907
|
+
"storm-workspace.js",
|
|
908
|
+
"storm-workspace.ts",
|
|
909
|
+
".storm-workspace.json",
|
|
910
|
+
".storm-workspace.yaml",
|
|
911
|
+
".storm-workspace.yml",
|
|
912
|
+
".storm-workspace.js",
|
|
913
|
+
".storm-workspace.ts",
|
|
914
|
+
"lerna.json",
|
|
915
|
+
"nx.json",
|
|
916
|
+
"turbo.json",
|
|
917
|
+
"npm-workspace.json",
|
|
918
|
+
"yarn-workspace.json",
|
|
919
|
+
"pnpm-workspace.json",
|
|
920
|
+
"npm-workspace.yaml",
|
|
921
|
+
"yarn-workspace.yaml",
|
|
922
|
+
"pnpm-workspace.yaml",
|
|
923
|
+
"npm-workspace.yml",
|
|
924
|
+
"yarn-workspace.yml",
|
|
925
|
+
"pnpm-workspace.yml",
|
|
926
|
+
"npm-lock.json",
|
|
927
|
+
"yarn-lock.json",
|
|
928
|
+
"pnpm-lock.json",
|
|
929
|
+
"npm-lock.yaml",
|
|
930
|
+
"yarn-lock.yaml",
|
|
931
|
+
"pnpm-lock.yaml",
|
|
932
|
+
"npm-lock.yml",
|
|
933
|
+
"yarn-lock.yml",
|
|
934
|
+
"pnpm-lock.yml",
|
|
935
|
+
"bun.lockb"
|
|
936
|
+
];
|
|
937
|
+
var rootDirectories = [
|
|
938
|
+
".storm-workspace",
|
|
939
|
+
".nx",
|
|
940
|
+
".git",
|
|
941
|
+
".github",
|
|
942
|
+
".vscode",
|
|
943
|
+
".verdaccio"
|
|
944
|
+
];
|
|
945
|
+
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
946
|
+
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
947
|
+
return correctPaths2(
|
|
948
|
+
process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH
|
|
949
|
+
);
|
|
950
|
+
}
|
|
951
|
+
return correctPaths2(
|
|
952
|
+
findFolderUp(
|
|
953
|
+
pathInsideMonorepo ?? process.cwd(),
|
|
954
|
+
rootFiles,
|
|
955
|
+
rootDirectories
|
|
956
|
+
)
|
|
957
|
+
);
|
|
958
|
+
}
|
|
959
|
+
function findWorkspaceRoot2(pathInsideMonorepo) {
|
|
960
|
+
const result = findWorkspaceRootSafe(pathInsideMonorepo);
|
|
961
|
+
if (!result) {
|
|
962
|
+
throw new Error(
|
|
963
|
+
`Cannot find workspace root upwards from known path. Files search list includes:
|
|
964
|
+
${rootFiles.join(
|
|
965
|
+
"\n"
|
|
966
|
+
)}
|
|
967
|
+
Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
|
|
968
|
+
);
|
|
969
|
+
}
|
|
970
|
+
return result;
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
// ../config-tools/dist/chunk-ZG3KCER4.js
|
|
974
|
+
init_esm_shims();
|
|
975
|
+
|
|
976
|
+
// ../config-tools/dist/chunk-5DQF4GNF.js
|
|
977
|
+
init_esm_shims();
|
|
978
|
+
var DEFAULT_COLOR_CONFIG = {
|
|
979
|
+
light: {
|
|
980
|
+
background: "#fafafa",
|
|
981
|
+
foreground: "#1d1e22",
|
|
982
|
+
brand: "#1fb2a6",
|
|
983
|
+
alternate: "#db2777",
|
|
984
|
+
help: "#5C4EE5",
|
|
985
|
+
success: "#087f5b",
|
|
986
|
+
info: "#0550ae",
|
|
987
|
+
debug: "#8afafc",
|
|
988
|
+
warning: "#e3b341",
|
|
989
|
+
danger: "#D8314A",
|
|
990
|
+
fatal: "#51070f",
|
|
991
|
+
performance: "#13c302",
|
|
992
|
+
link: "#3fa6ff",
|
|
993
|
+
positive: "#22c55e",
|
|
994
|
+
negative: "#dc2626",
|
|
995
|
+
gradient: ["#1fb2a6", "#db2777", "#5C4EE5"]
|
|
996
|
+
},
|
|
997
|
+
dark: {
|
|
998
|
+
background: "#1d1e22",
|
|
999
|
+
foreground: "#cbd5e1",
|
|
1000
|
+
brand: "#2dd4bf",
|
|
1001
|
+
alternate: "#db2777",
|
|
1002
|
+
help: "#818cf8",
|
|
1003
|
+
success: "#10b981",
|
|
1004
|
+
info: "#58a6ff",
|
|
1005
|
+
debug: "#8afafc",
|
|
1006
|
+
warning: "#f3d371",
|
|
1007
|
+
danger: "#D8314A",
|
|
1008
|
+
fatal: "#a40e26",
|
|
1009
|
+
performance: "#80fd74",
|
|
1010
|
+
link: "#3fa6ff",
|
|
1011
|
+
positive: "#22c55e",
|
|
1012
|
+
negative: "#dc2626",
|
|
1013
|
+
gradient: ["#1fb2a6", "#db2777", "#818cf8"]
|
|
1014
|
+
}
|
|
1015
|
+
};
|
|
1016
|
+
|
|
1017
|
+
// ../config-tools/dist/chunk-HVVJHTFS.js
|
|
1018
|
+
init_esm_shims();
|
|
1019
|
+
import chalk2 from "chalk";
|
|
1020
|
+
var chalkDefault = {
|
|
1021
|
+
hex: (_3) => (message) => message,
|
|
1022
|
+
bgHex: (_3) => ({
|
|
1023
|
+
whiteBright: (message) => message,
|
|
1024
|
+
white: (message) => message
|
|
1025
|
+
}),
|
|
1026
|
+
white: (message) => message,
|
|
1027
|
+
whiteBright: (message) => message,
|
|
1028
|
+
gray: (message) => message,
|
|
1029
|
+
bold: {
|
|
1030
|
+
hex: (_3) => (message) => message,
|
|
1031
|
+
bgHex: (_3) => ({
|
|
1032
|
+
whiteBright: (message) => message,
|
|
1033
|
+
white: (message) => message
|
|
1034
|
+
}),
|
|
1035
|
+
whiteBright: (message) => message,
|
|
1036
|
+
white: (message) => message
|
|
1037
|
+
},
|
|
1038
|
+
dim: {
|
|
1039
|
+
hex: (_3) => (message) => message,
|
|
1040
|
+
gray: (message) => message
|
|
1041
|
+
}
|
|
1042
|
+
};
|
|
1043
|
+
var getChalk = () => {
|
|
1044
|
+
let _chalk = chalk2;
|
|
1045
|
+
if (!_chalk?.hex || !_chalk?.bold?.hex || !_chalk?.bgHex || !_chalk?.whiteBright || !_chalk?.white) {
|
|
1046
|
+
_chalk = chalkDefault;
|
|
1047
|
+
}
|
|
1048
|
+
return _chalk;
|
|
1049
|
+
};
|
|
1050
|
+
|
|
1051
|
+
// ../config-tools/dist/chunk-ZFNAUMQS.js
|
|
1052
|
+
init_esm_shims();
|
|
1053
|
+
|
|
1054
|
+
// ../config-tools/dist/chunk-G2MK47WL.js
|
|
877
1055
|
init_esm_shims();
|
|
1056
|
+
function isUnicodeSupported2() {
|
|
1057
|
+
if (process.platform !== "win32") {
|
|
1058
|
+
return process.env.TERM !== "linux";
|
|
1059
|
+
}
|
|
1060
|
+
return Boolean(process.env.WT_SESSION) || // Windows Terminal
|
|
1061
|
+
Boolean(process.env.TERMINUS_SUBLIME) || // Terminus (<0.2.27)
|
|
1062
|
+
process.env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
|
|
1063
|
+
process.env.TERM_PROGRAM === "Terminus-Sublime" || process.env.TERM_PROGRAM === "vscode" || process.env.TERM === "xterm-256color" || process.env.TERM === "alacritty" || process.env.TERM === "rxvt-unicode" || process.env.TERM === "rxvt-unicode-256color" || process.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
1064
|
+
}
|
|
878
1065
|
|
|
879
1066
|
// ../config-tools/dist/chunk-RALMUN5C.js
|
|
880
1067
|
init_esm_shims();
|
|
@@ -903,7 +1090,28 @@ var LogLevelLabel2 = {
|
|
|
903
1090
|
ALL: "all"
|
|
904
1091
|
};
|
|
905
1092
|
|
|
1093
|
+
// ../config-tools/dist/chunk-ZFNAUMQS.js
|
|
1094
|
+
var useIcon2 = (c3, fallback) => isUnicodeSupported2() ? c3 : fallback;
|
|
1095
|
+
var CONSOLE_ICONS2 = {
|
|
1096
|
+
[LogLevelLabel2.ERROR]: useIcon2("\u2718", "\xD7"),
|
|
1097
|
+
[LogLevelLabel2.FATAL]: useIcon2("\u{1F571}", "\xD7"),
|
|
1098
|
+
[LogLevelLabel2.WARN]: useIcon2("\u26A0", "\u203C"),
|
|
1099
|
+
[LogLevelLabel2.INFO]: useIcon2("\u2139", "i"),
|
|
1100
|
+
[LogLevelLabel2.PERFORMANCE]: useIcon2("\u23F1", "\u23F1"),
|
|
1101
|
+
[LogLevelLabel2.SUCCESS]: useIcon2("\u2714", "\u221A"),
|
|
1102
|
+
[LogLevelLabel2.DEBUG]: useIcon2("\u{1F6E0}", "D"),
|
|
1103
|
+
[LogLevelLabel2.TRACE]: useIcon2("\u2699", "T"),
|
|
1104
|
+
[LogLevelLabel2.ALL]: useIcon2("\u2709", "\u2192")
|
|
1105
|
+
};
|
|
1106
|
+
|
|
1107
|
+
// ../config-tools/dist/chunk-JZAYHDV3.js
|
|
1108
|
+
init_esm_shims();
|
|
1109
|
+
var formatTimestamp = (fullDateTime = false, date = /* @__PURE__ */ new Date()) => {
|
|
1110
|
+
return fullDateTime ? `${date.toLocaleDateString()} ${date.toLocaleTimeString()}` : `${date.toLocaleTimeString()}`;
|
|
1111
|
+
};
|
|
1112
|
+
|
|
906
1113
|
// ../config-tools/dist/chunk-SXPH7ILL.js
|
|
1114
|
+
init_esm_shims();
|
|
907
1115
|
var getLogLevel2 = (label) => {
|
|
908
1116
|
switch (label) {
|
|
909
1117
|
case "all":
|
|
@@ -959,2042 +1167,1830 @@ var getLogLevelLabel2 = (logLevel = LogLevel2.INFO) => {
|
|
|
959
1167
|
return LogLevelLabel2.INFO;
|
|
960
1168
|
};
|
|
961
1169
|
|
|
962
|
-
// ../config-tools/dist/chunk-
|
|
963
|
-
var
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
}
|
|
985
|
-
var
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
}
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
}
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1170
|
+
// ../config-tools/dist/chunk-ZG3KCER4.js
|
|
1171
|
+
var daysInYear = 365.2425;
|
|
1172
|
+
var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1e3;
|
|
1173
|
+
var minTime = -maxTime;
|
|
1174
|
+
var minutesInMonth = 43200;
|
|
1175
|
+
var minutesInDay = 1440;
|
|
1176
|
+
var secondsInHour = 3600;
|
|
1177
|
+
var secondsInDay = secondsInHour * 24;
|
|
1178
|
+
var secondsInWeek = secondsInDay * 7;
|
|
1179
|
+
var secondsInYear = secondsInDay * daysInYear;
|
|
1180
|
+
var secondsInMonth = secondsInYear / 12;
|
|
1181
|
+
var secondsInQuarter = secondsInMonth * 3;
|
|
1182
|
+
var constructFromSymbol = Symbol.for("constructDateFrom");
|
|
1183
|
+
function constructFrom(date, value) {
|
|
1184
|
+
if (typeof date === "function") return date(value);
|
|
1185
|
+
if (date && typeof date === "object" && constructFromSymbol in date)
|
|
1186
|
+
return date[constructFromSymbol](value);
|
|
1187
|
+
if (date instanceof Date) return new date.constructor(value);
|
|
1188
|
+
return new Date(value);
|
|
1189
|
+
}
|
|
1190
|
+
function constructNow(date) {
|
|
1191
|
+
return constructFrom(date, Date.now());
|
|
1192
|
+
}
|
|
1193
|
+
var formatDistanceLocale = {
|
|
1194
|
+
lessThanXSeconds: {
|
|
1195
|
+
one: "less than a second",
|
|
1196
|
+
other: "less than {{count}} seconds"
|
|
1197
|
+
},
|
|
1198
|
+
xSeconds: {
|
|
1199
|
+
one: "1 second",
|
|
1200
|
+
other: "{{count}} seconds"
|
|
1201
|
+
},
|
|
1202
|
+
halfAMinute: "half a minute",
|
|
1203
|
+
lessThanXMinutes: {
|
|
1204
|
+
one: "less than a minute",
|
|
1205
|
+
other: "less than {{count}} minutes"
|
|
1206
|
+
},
|
|
1207
|
+
xMinutes: {
|
|
1208
|
+
one: "1 minute",
|
|
1209
|
+
other: "{{count}} minutes"
|
|
1210
|
+
},
|
|
1211
|
+
aboutXHours: {
|
|
1212
|
+
one: "about 1 hour",
|
|
1213
|
+
other: "about {{count}} hours"
|
|
1214
|
+
},
|
|
1215
|
+
xHours: {
|
|
1216
|
+
one: "1 hour",
|
|
1217
|
+
other: "{{count}} hours"
|
|
1218
|
+
},
|
|
1219
|
+
xDays: {
|
|
1220
|
+
one: "1 day",
|
|
1221
|
+
other: "{{count}} days"
|
|
1222
|
+
},
|
|
1223
|
+
aboutXWeeks: {
|
|
1224
|
+
one: "about 1 week",
|
|
1225
|
+
other: "about {{count}} weeks"
|
|
1226
|
+
},
|
|
1227
|
+
xWeeks: {
|
|
1228
|
+
one: "1 week",
|
|
1229
|
+
other: "{{count}} weeks"
|
|
1230
|
+
},
|
|
1231
|
+
aboutXMonths: {
|
|
1232
|
+
one: "about 1 month",
|
|
1233
|
+
other: "about {{count}} months"
|
|
1234
|
+
},
|
|
1235
|
+
xMonths: {
|
|
1236
|
+
one: "1 month",
|
|
1237
|
+
other: "{{count}} months"
|
|
1238
|
+
},
|
|
1239
|
+
aboutXYears: {
|
|
1240
|
+
one: "about 1 year",
|
|
1241
|
+
other: "about {{count}} years"
|
|
1242
|
+
},
|
|
1243
|
+
xYears: {
|
|
1244
|
+
one: "1 year",
|
|
1245
|
+
other: "{{count}} years"
|
|
1246
|
+
},
|
|
1247
|
+
overXYears: {
|
|
1248
|
+
one: "over 1 year",
|
|
1249
|
+
other: "over {{count}} years"
|
|
1250
|
+
},
|
|
1251
|
+
almostXYears: {
|
|
1252
|
+
one: "almost 1 year",
|
|
1253
|
+
other: "almost {{count}} years"
|
|
1009
1254
|
}
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
}
|
|
1021
|
-
process.env[`${prefix}RELEASE_HEADER`] = config.release.header;
|
|
1022
|
-
process.env[`${prefix}RELEASE_FOOTER`] = config.release.footer;
|
|
1255
|
+
};
|
|
1256
|
+
var formatDistance = (token, count, options) => {
|
|
1257
|
+
let result;
|
|
1258
|
+
const tokenValue = formatDistanceLocale[token];
|
|
1259
|
+
if (typeof tokenValue === "string") {
|
|
1260
|
+
result = tokenValue;
|
|
1261
|
+
} else if (count === 1) {
|
|
1262
|
+
result = tokenValue.one;
|
|
1263
|
+
} else {
|
|
1264
|
+
result = tokenValue.other.replace("{{count}}", count.toString());
|
|
1023
1265
|
}
|
|
1024
|
-
if (
|
|
1025
|
-
if (
|
|
1026
|
-
|
|
1027
|
-
}
|
|
1028
|
-
|
|
1029
|
-
process.env[`${prefix}SOCIAL_DISCORD`] = config.socials.discord;
|
|
1030
|
-
}
|
|
1031
|
-
if (config.socials.telegram) {
|
|
1032
|
-
process.env[`${prefix}SOCIAL_TELEGRAM`] = config.socials.telegram;
|
|
1033
|
-
}
|
|
1034
|
-
if (config.socials.slack) {
|
|
1035
|
-
process.env[`${prefix}SOCIAL_SLACK`] = config.socials.slack;
|
|
1036
|
-
}
|
|
1037
|
-
if (config.socials.medium) {
|
|
1038
|
-
process.env[`${prefix}SOCIAL_MEDIUM`] = config.socials.medium;
|
|
1039
|
-
}
|
|
1040
|
-
if (config.socials.github) {
|
|
1041
|
-
process.env[`${prefix}SOCIAL_GITHUB`] = config.socials.github;
|
|
1266
|
+
if (options?.addSuffix) {
|
|
1267
|
+
if (options.comparison && options.comparison > 0) {
|
|
1268
|
+
return "in " + result;
|
|
1269
|
+
} else {
|
|
1270
|
+
return result + " ago";
|
|
1042
1271
|
}
|
|
1043
1272
|
}
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1273
|
+
return result;
|
|
1274
|
+
};
|
|
1275
|
+
function buildFormatLongFn(args) {
|
|
1276
|
+
return (options = {}) => {
|
|
1277
|
+
const width = options.width ? String(options.width) : args.defaultWidth;
|
|
1278
|
+
const format2 = args.formats[width] || args.formats[args.defaultWidth];
|
|
1279
|
+
return format2;
|
|
1280
|
+
};
|
|
1281
|
+
}
|
|
1282
|
+
var dateFormats = {
|
|
1283
|
+
full: "EEEE, MMMM do, y",
|
|
1284
|
+
long: "MMMM do, y",
|
|
1285
|
+
medium: "MMM d, y",
|
|
1286
|
+
short: "MM/dd/yyyy"
|
|
1287
|
+
};
|
|
1288
|
+
var timeFormats = {
|
|
1289
|
+
full: "h:mm:ss a zzzz",
|
|
1290
|
+
long: "h:mm:ss a z",
|
|
1291
|
+
medium: "h:mm:ss a",
|
|
1292
|
+
short: "h:mm a"
|
|
1293
|
+
};
|
|
1294
|
+
var dateTimeFormats = {
|
|
1295
|
+
full: "{{date}} 'at' {{time}}",
|
|
1296
|
+
long: "{{date}} 'at' {{time}}",
|
|
1297
|
+
medium: "{{date}}, {{time}}",
|
|
1298
|
+
short: "{{date}}, {{time}}"
|
|
1299
|
+
};
|
|
1300
|
+
var formatLong = {
|
|
1301
|
+
date: buildFormatLongFn({
|
|
1302
|
+
formats: dateFormats,
|
|
1303
|
+
defaultWidth: "full"
|
|
1304
|
+
}),
|
|
1305
|
+
time: buildFormatLongFn({
|
|
1306
|
+
formats: timeFormats,
|
|
1307
|
+
defaultWidth: "full"
|
|
1308
|
+
}),
|
|
1309
|
+
dateTime: buildFormatLongFn({
|
|
1310
|
+
formats: dateTimeFormats,
|
|
1311
|
+
defaultWidth: "full"
|
|
1312
|
+
})
|
|
1313
|
+
};
|
|
1314
|
+
var formatRelativeLocale = {
|
|
1315
|
+
lastWeek: "'last' eeee 'at' p",
|
|
1316
|
+
yesterday: "'yesterday at' p",
|
|
1317
|
+
today: "'today at' p",
|
|
1318
|
+
tomorrow: "'tomorrow at' p",
|
|
1319
|
+
nextWeek: "eeee 'at' p",
|
|
1320
|
+
other: "P"
|
|
1321
|
+
};
|
|
1322
|
+
var formatRelative = (token, _date, _baseDate, _options) => formatRelativeLocale[token];
|
|
1323
|
+
function buildLocalizeFn(args) {
|
|
1324
|
+
return (value, options) => {
|
|
1325
|
+
const context = options?.context ? String(options.context) : "standalone";
|
|
1326
|
+
let valuesArray;
|
|
1327
|
+
if (context === "formatting" && args.formattingValues) {
|
|
1328
|
+
const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
1329
|
+
const width = options?.width ? String(options.width) : defaultWidth;
|
|
1330
|
+
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
1050
1331
|
} else {
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
process.env[`${prefix}ORGANIZATION_NAME`] = config.organization.name;
|
|
1055
|
-
if (config.organization.url) {
|
|
1056
|
-
process.env[`${prefix}ORG_URL`] = config.organization.url;
|
|
1057
|
-
process.env[`${prefix}ORGANIZATION_URL`] = config.organization.url;
|
|
1058
|
-
}
|
|
1059
|
-
if (config.organization.description) {
|
|
1060
|
-
process.env[`${prefix}ORG_DESCRIPTION`] = config.organization.description;
|
|
1061
|
-
process.env[`${prefix}ORGANIZATION_DESCRIPTION`] = config.organization.description;
|
|
1062
|
-
}
|
|
1063
|
-
if (config.organization.logo) {
|
|
1064
|
-
process.env[`${prefix}ORG_LOGO`] = config.organization.logo;
|
|
1065
|
-
process.env[`${prefix}ORGANIZATION_LOGO`] = config.organization.logo;
|
|
1066
|
-
}
|
|
1067
|
-
if (config.organization.icon) {
|
|
1068
|
-
process.env[`${prefix}ORG_ICON`] = config.organization.icon;
|
|
1069
|
-
process.env[`${prefix}ORGANIZATION_ICON`] = config.organization.icon;
|
|
1070
|
-
}
|
|
1332
|
+
const defaultWidth = args.defaultWidth;
|
|
1333
|
+
const width = options?.width ? String(options.width) : args.defaultWidth;
|
|
1334
|
+
valuesArray = args.values[width] || args.values[defaultWidth];
|
|
1071
1335
|
}
|
|
1336
|
+
const index = args.argumentCallback ? args.argumentCallback(value) : value;
|
|
1337
|
+
return valuesArray[index];
|
|
1338
|
+
};
|
|
1339
|
+
}
|
|
1340
|
+
var eraValues = {
|
|
1341
|
+
narrow: ["B", "A"],
|
|
1342
|
+
abbreviated: ["BC", "AD"],
|
|
1343
|
+
wide: ["Before Christ", "Anno Domini"]
|
|
1344
|
+
};
|
|
1345
|
+
var quarterValues = {
|
|
1346
|
+
narrow: ["1", "2", "3", "4"],
|
|
1347
|
+
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
1348
|
+
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
1349
|
+
};
|
|
1350
|
+
var monthValues = {
|
|
1351
|
+
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
1352
|
+
abbreviated: [
|
|
1353
|
+
"Jan",
|
|
1354
|
+
"Feb",
|
|
1355
|
+
"Mar",
|
|
1356
|
+
"Apr",
|
|
1357
|
+
"May",
|
|
1358
|
+
"Jun",
|
|
1359
|
+
"Jul",
|
|
1360
|
+
"Aug",
|
|
1361
|
+
"Sep",
|
|
1362
|
+
"Oct",
|
|
1363
|
+
"Nov",
|
|
1364
|
+
"Dec"
|
|
1365
|
+
],
|
|
1366
|
+
wide: [
|
|
1367
|
+
"January",
|
|
1368
|
+
"February",
|
|
1369
|
+
"March",
|
|
1370
|
+
"April",
|
|
1371
|
+
"May",
|
|
1372
|
+
"June",
|
|
1373
|
+
"July",
|
|
1374
|
+
"August",
|
|
1375
|
+
"September",
|
|
1376
|
+
"October",
|
|
1377
|
+
"November",
|
|
1378
|
+
"December"
|
|
1379
|
+
]
|
|
1380
|
+
};
|
|
1381
|
+
var dayValues = {
|
|
1382
|
+
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
1383
|
+
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
1384
|
+
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
1385
|
+
wide: [
|
|
1386
|
+
"Sunday",
|
|
1387
|
+
"Monday",
|
|
1388
|
+
"Tuesday",
|
|
1389
|
+
"Wednesday",
|
|
1390
|
+
"Thursday",
|
|
1391
|
+
"Friday",
|
|
1392
|
+
"Saturday"
|
|
1393
|
+
]
|
|
1394
|
+
};
|
|
1395
|
+
var dayPeriodValues = {
|
|
1396
|
+
narrow: {
|
|
1397
|
+
am: "a",
|
|
1398
|
+
pm: "p",
|
|
1399
|
+
midnight: "mi",
|
|
1400
|
+
noon: "n",
|
|
1401
|
+
morning: "morning",
|
|
1402
|
+
afternoon: "afternoon",
|
|
1403
|
+
evening: "evening",
|
|
1404
|
+
night: "night"
|
|
1405
|
+
},
|
|
1406
|
+
abbreviated: {
|
|
1407
|
+
am: "AM",
|
|
1408
|
+
pm: "PM",
|
|
1409
|
+
midnight: "midnight",
|
|
1410
|
+
noon: "noon",
|
|
1411
|
+
morning: "morning",
|
|
1412
|
+
afternoon: "afternoon",
|
|
1413
|
+
evening: "evening",
|
|
1414
|
+
night: "night"
|
|
1415
|
+
},
|
|
1416
|
+
wide: {
|
|
1417
|
+
am: "a.m.",
|
|
1418
|
+
pm: "p.m.",
|
|
1419
|
+
midnight: "midnight",
|
|
1420
|
+
noon: "noon",
|
|
1421
|
+
morning: "morning",
|
|
1422
|
+
afternoon: "afternoon",
|
|
1423
|
+
evening: "evening",
|
|
1424
|
+
night: "night"
|
|
1072
1425
|
}
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
}
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
process.env[`${prefix}LOCALE`] = config.locale;
|
|
1105
|
-
process.env.DEFAULT_LOCALE = config.locale;
|
|
1106
|
-
process.env.LOCALE = config.locale;
|
|
1107
|
-
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
1108
|
-
}
|
|
1109
|
-
if (config.configFile) {
|
|
1110
|
-
process.env[`${prefix}WORKSPACE_CONFIG_FILE`] = correctPaths2(
|
|
1111
|
-
config.configFile
|
|
1112
|
-
);
|
|
1113
|
-
}
|
|
1114
|
-
if (config.workspaceRoot) {
|
|
1115
|
-
process.env[`${prefix}WORKSPACE_ROOT`] = correctPaths2(config.workspaceRoot);
|
|
1116
|
-
process.env.NX_WORKSPACE_ROOT = correctPaths2(config.workspaceRoot);
|
|
1117
|
-
process.env.NX_WORKSPACE_ROOT_PATH = correctPaths2(config.workspaceRoot);
|
|
1118
|
-
}
|
|
1119
|
-
if (config.directories) {
|
|
1120
|
-
if (!config.skipCache && config.directories.cache) {
|
|
1121
|
-
process.env[`${prefix}CACHE_DIR`] = correctPaths2(
|
|
1122
|
-
config.directories.cache
|
|
1123
|
-
);
|
|
1124
|
-
process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
|
|
1125
|
-
}
|
|
1126
|
-
if (config.directories.data) {
|
|
1127
|
-
process.env[`${prefix}DATA_DIR`] = correctPaths2(config.directories.data);
|
|
1128
|
-
process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
|
|
1129
|
-
}
|
|
1130
|
-
if (config.directories.config) {
|
|
1131
|
-
process.env[`${prefix}CONFIG_DIR`] = correctPaths2(
|
|
1132
|
-
config.directories.config
|
|
1133
|
-
);
|
|
1134
|
-
process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
|
|
1135
|
-
}
|
|
1136
|
-
if (config.directories.temp) {
|
|
1137
|
-
process.env[`${prefix}TEMP_DIR`] = correctPaths2(config.directories.temp);
|
|
1138
|
-
process.env[`${prefix}TEMP_DIRECTORY`] = process.env[`${prefix}TEMP_DIR`];
|
|
1139
|
-
}
|
|
1140
|
-
if (config.directories.log) {
|
|
1141
|
-
process.env[`${prefix}LOG_DIR`] = correctPaths2(config.directories.log);
|
|
1142
|
-
process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
|
|
1143
|
-
}
|
|
1144
|
-
if (config.directories.build) {
|
|
1145
|
-
process.env[`${prefix}BUILD_DIR`] = correctPaths2(
|
|
1146
|
-
config.directories.build
|
|
1147
|
-
);
|
|
1148
|
-
process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
|
|
1149
|
-
}
|
|
1426
|
+
};
|
|
1427
|
+
var formattingDayPeriodValues = {
|
|
1428
|
+
narrow: {
|
|
1429
|
+
am: "a",
|
|
1430
|
+
pm: "p",
|
|
1431
|
+
midnight: "mi",
|
|
1432
|
+
noon: "n",
|
|
1433
|
+
morning: "in the morning",
|
|
1434
|
+
afternoon: "in the afternoon",
|
|
1435
|
+
evening: "in the evening",
|
|
1436
|
+
night: "at night"
|
|
1437
|
+
},
|
|
1438
|
+
abbreviated: {
|
|
1439
|
+
am: "AM",
|
|
1440
|
+
pm: "PM",
|
|
1441
|
+
midnight: "midnight",
|
|
1442
|
+
noon: "noon",
|
|
1443
|
+
morning: "in the morning",
|
|
1444
|
+
afternoon: "in the afternoon",
|
|
1445
|
+
evening: "in the evening",
|
|
1446
|
+
night: "at night"
|
|
1447
|
+
},
|
|
1448
|
+
wide: {
|
|
1449
|
+
am: "a.m.",
|
|
1450
|
+
pm: "p.m.",
|
|
1451
|
+
midnight: "midnight",
|
|
1452
|
+
noon: "noon",
|
|
1453
|
+
morning: "in the morning",
|
|
1454
|
+
afternoon: "in the afternoon",
|
|
1455
|
+
evening: "in the evening",
|
|
1456
|
+
night: "at night"
|
|
1150
1457
|
}
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1458
|
+
};
|
|
1459
|
+
var ordinalNumber = (dirtyNumber, _options) => {
|
|
1460
|
+
const number = Number(dirtyNumber);
|
|
1461
|
+
const rem100 = number % 100;
|
|
1462
|
+
if (rem100 > 20 || rem100 < 10) {
|
|
1463
|
+
switch (rem100 % 10) {
|
|
1464
|
+
case 1:
|
|
1465
|
+
return number + "st";
|
|
1466
|
+
case 2:
|
|
1467
|
+
return number + "nd";
|
|
1468
|
+
case 3:
|
|
1469
|
+
return number + "rd";
|
|
1156
1470
|
}
|
|
1157
1471
|
}
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1472
|
+
return number + "th";
|
|
1473
|
+
};
|
|
1474
|
+
var localize = {
|
|
1475
|
+
ordinalNumber,
|
|
1476
|
+
era: buildLocalizeFn({
|
|
1477
|
+
values: eraValues,
|
|
1478
|
+
defaultWidth: "wide"
|
|
1479
|
+
}),
|
|
1480
|
+
quarter: buildLocalizeFn({
|
|
1481
|
+
values: quarterValues,
|
|
1482
|
+
defaultWidth: "wide",
|
|
1483
|
+
argumentCallback: (quarter) => quarter - 1
|
|
1484
|
+
}),
|
|
1485
|
+
month: buildLocalizeFn({
|
|
1486
|
+
values: monthValues,
|
|
1487
|
+
defaultWidth: "wide"
|
|
1488
|
+
}),
|
|
1489
|
+
day: buildLocalizeFn({
|
|
1490
|
+
values: dayValues,
|
|
1491
|
+
defaultWidth: "wide"
|
|
1492
|
+
}),
|
|
1493
|
+
dayPeriod: buildLocalizeFn({
|
|
1494
|
+
values: dayPeriodValues,
|
|
1495
|
+
defaultWidth: "wide",
|
|
1496
|
+
formattingValues: formattingDayPeriodValues,
|
|
1497
|
+
defaultFormattingWidth: "wide"
|
|
1498
|
+
})
|
|
1499
|
+
};
|
|
1500
|
+
function buildMatchFn(args) {
|
|
1501
|
+
return (string3, options = {}) => {
|
|
1502
|
+
const width = options.width;
|
|
1503
|
+
const matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
|
1504
|
+
const matchResult = string3.match(matchPattern);
|
|
1505
|
+
if (!matchResult) {
|
|
1506
|
+
return null;
|
|
1166
1507
|
}
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1508
|
+
const matchedString = matchResult[0];
|
|
1509
|
+
const parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
|
|
1510
|
+
const key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString)) : (
|
|
1511
|
+
// [TODO] -- I challenge you to fix the type
|
|
1512
|
+
findKey(parsePatterns, (pattern) => pattern.test(matchedString))
|
|
1171
1513
|
);
|
|
1514
|
+
let value;
|
|
1515
|
+
value = args.valueCallback ? args.valueCallback(key) : key;
|
|
1516
|
+
value = options.valueCallback ? (
|
|
1517
|
+
// [TODO] -- I challenge you to fix the type
|
|
1518
|
+
options.valueCallback(value)
|
|
1519
|
+
) : value;
|
|
1520
|
+
const rest = string3.slice(matchedString.length);
|
|
1521
|
+
return { value, rest };
|
|
1522
|
+
};
|
|
1523
|
+
}
|
|
1524
|
+
function findKey(object3, predicate) {
|
|
1525
|
+
for (const key in object3) {
|
|
1526
|
+
if (Object.prototype.hasOwnProperty.call(object3, key) && predicate(object3[key])) {
|
|
1527
|
+
return key;
|
|
1528
|
+
}
|
|
1172
1529
|
}
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
process.env[`${prefix}PRE_ID`] = String(config.preid);
|
|
1181
|
-
}
|
|
1182
|
-
if (config.registry) {
|
|
1183
|
-
if (config.registry.github) {
|
|
1184
|
-
process.env[`${prefix}REGISTRY_GITHUB`] = String(config.registry.github);
|
|
1185
|
-
}
|
|
1186
|
-
if (config.registry.npm) {
|
|
1187
|
-
process.env[`${prefix}REGISTRY_NPM`] = String(config.registry.npm);
|
|
1188
|
-
}
|
|
1189
|
-
if (config.registry.cargo) {
|
|
1190
|
-
process.env[`${prefix}REGISTRY_CARGO`] = String(config.registry.cargo);
|
|
1191
|
-
}
|
|
1192
|
-
if (config.registry.cyclone) {
|
|
1193
|
-
process.env[`${prefix}REGISTRY_CYCLONE`] = String(
|
|
1194
|
-
config.registry.cyclone
|
|
1195
|
-
);
|
|
1196
|
-
}
|
|
1197
|
-
if (config.registry.container) {
|
|
1198
|
-
process.env[`${prefix}REGISTRY_CONTAINER`] = String(
|
|
1199
|
-
config.registry.container
|
|
1200
|
-
);
|
|
1201
|
-
}
|
|
1202
|
-
}
|
|
1203
|
-
if (config.logLevel) {
|
|
1204
|
-
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
1205
|
-
process.env.LOG_LEVEL = String(config.logLevel);
|
|
1206
|
-
process.env.NX_VERBOSE_LOGGING = String(
|
|
1207
|
-
getLogLevel2(config.logLevel) >= LogLevel2.DEBUG ? true : false
|
|
1208
|
-
);
|
|
1209
|
-
process.env.RUST_BACKTRACE = getLogLevel2(config.logLevel) >= LogLevel2.DEBUG ? "full" : "none";
|
|
1210
|
-
}
|
|
1211
|
-
if (config.skipConfigLogging !== void 0) {
|
|
1212
|
-
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(
|
|
1213
|
-
config.skipConfigLogging
|
|
1214
|
-
);
|
|
1215
|
-
}
|
|
1216
|
-
process.env[`${prefix}WORKSPACE_CONFIG`] = JSON.stringify(config);
|
|
1217
|
-
for (const key of Object.keys(config.extensions ?? {})) {
|
|
1218
|
-
if (config.extensions[key] && Object.keys(config.extensions[key])) {
|
|
1219
|
-
setExtensionEnv(key, config.extensions[key]);
|
|
1220
|
-
}
|
|
1530
|
+
return void 0;
|
|
1531
|
+
}
|
|
1532
|
+
function findIndex(array3, predicate) {
|
|
1533
|
+
for (let key = 0; key < array3.length; key++) {
|
|
1534
|
+
if (predicate(array3[key])) {
|
|
1535
|
+
return key;
|
|
1536
|
+
}
|
|
1221
1537
|
}
|
|
1538
|
+
return void 0;
|
|
1539
|
+
}
|
|
1540
|
+
function buildMatchPatternFn(args) {
|
|
1541
|
+
return (string3, options = {}) => {
|
|
1542
|
+
const matchResult = string3.match(args.matchPattern);
|
|
1543
|
+
if (!matchResult) return null;
|
|
1544
|
+
const matchedString = matchResult[0];
|
|
1545
|
+
const parseResult = string3.match(args.parsePattern);
|
|
1546
|
+
if (!parseResult) return null;
|
|
1547
|
+
let value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
|
|
1548
|
+
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
1549
|
+
const rest = string3.slice(matchedString.length);
|
|
1550
|
+
return { value, rest };
|
|
1551
|
+
};
|
|
1552
|
+
}
|
|
1553
|
+
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
|
|
1554
|
+
var parseOrdinalNumberPattern = /\d+/i;
|
|
1555
|
+
var matchEraPatterns = {
|
|
1556
|
+
narrow: /^(b|a)/i,
|
|
1557
|
+
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
1558
|
+
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
1222
1559
|
};
|
|
1223
|
-
var
|
|
1224
|
-
|
|
1560
|
+
var parseEraPatterns = {
|
|
1561
|
+
any: [/^b/i, /^(a|c)/i]
|
|
1225
1562
|
};
|
|
1226
|
-
var
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
if (config.light) {
|
|
1231
|
-
process.env[`${prefix}LIGHT`] = config.light;
|
|
1232
|
-
}
|
|
1233
|
-
if (config.brand) {
|
|
1234
|
-
process.env[`${prefix}BRAND`] = config.brand;
|
|
1235
|
-
}
|
|
1236
|
-
if (config.alternate) {
|
|
1237
|
-
process.env[`${prefix}ALTERNATE`] = config.alternate;
|
|
1238
|
-
}
|
|
1239
|
-
if (config.accent) {
|
|
1240
|
-
process.env[`${prefix}ACCENT`] = config.accent;
|
|
1241
|
-
}
|
|
1242
|
-
if (config.link) {
|
|
1243
|
-
process.env[`${prefix}LINK`] = config.link;
|
|
1244
|
-
}
|
|
1245
|
-
if (config.help) {
|
|
1246
|
-
process.env[`${prefix}HELP`] = config.help;
|
|
1247
|
-
}
|
|
1248
|
-
if (config.success) {
|
|
1249
|
-
process.env[`${prefix}SUCCESS`] = config.success;
|
|
1250
|
-
}
|
|
1251
|
-
if (config.info) {
|
|
1252
|
-
process.env[`${prefix}INFO`] = config.info;
|
|
1253
|
-
}
|
|
1254
|
-
if (config.debug) {
|
|
1255
|
-
process.env[`${prefix}DEBUG`] = config.debug;
|
|
1256
|
-
}
|
|
1257
|
-
if (config.warning) {
|
|
1258
|
-
process.env[`${prefix}WARNING`] = config.warning;
|
|
1259
|
-
}
|
|
1260
|
-
if (config.danger) {
|
|
1261
|
-
process.env[`${prefix}DANGER`] = config.danger;
|
|
1262
|
-
}
|
|
1263
|
-
if (config.fatal) {
|
|
1264
|
-
process.env[`${prefix}FATAL`] = config.fatal;
|
|
1265
|
-
}
|
|
1266
|
-
if (config.performance) {
|
|
1267
|
-
process.env[`${prefix}PERFORMANCE`] = config.performance;
|
|
1268
|
-
}
|
|
1269
|
-
if (config.positive) {
|
|
1270
|
-
process.env[`${prefix}POSITIVE`] = config.positive;
|
|
1271
|
-
}
|
|
1272
|
-
if (config.negative) {
|
|
1273
|
-
process.env[`${prefix}NEGATIVE`] = config.negative;
|
|
1274
|
-
}
|
|
1275
|
-
if (config.gradient) {
|
|
1276
|
-
for (let i3 = 0; i3 < config.gradient.length; i3++) {
|
|
1277
|
-
process.env[`${prefix}GRADIENT_${i3}`] = config.gradient[i3];
|
|
1278
|
-
}
|
|
1279
|
-
}
|
|
1563
|
+
var matchQuarterPatterns = {
|
|
1564
|
+
narrow: /^[1234]/i,
|
|
1565
|
+
abbreviated: /^q[1234]/i,
|
|
1566
|
+
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
1280
1567
|
};
|
|
1281
|
-
var
|
|
1282
|
-
|
|
1283
|
-
light: setBaseThemeColorsEnv(`${prefix}LIGHT_`, config.light),
|
|
1284
|
-
dark: setBaseThemeColorsEnv(`${prefix}DARK_`, config.dark)
|
|
1285
|
-
};
|
|
1568
|
+
var parseQuarterPatterns = {
|
|
1569
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
1286
1570
|
};
|
|
1287
|
-
var
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1571
|
+
var matchMonthPatterns = {
|
|
1572
|
+
narrow: /^[jfmasond]/i,
|
|
1573
|
+
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
1574
|
+
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
1575
|
+
};
|
|
1576
|
+
var parseMonthPatterns = {
|
|
1577
|
+
narrow: [
|
|
1578
|
+
/^j/i,
|
|
1579
|
+
/^f/i,
|
|
1580
|
+
/^m/i,
|
|
1581
|
+
/^a/i,
|
|
1582
|
+
/^m/i,
|
|
1583
|
+
/^j/i,
|
|
1584
|
+
/^j/i,
|
|
1585
|
+
/^a/i,
|
|
1586
|
+
/^s/i,
|
|
1587
|
+
/^o/i,
|
|
1588
|
+
/^n/i,
|
|
1589
|
+
/^d/i
|
|
1590
|
+
],
|
|
1591
|
+
any: [
|
|
1592
|
+
/^ja/i,
|
|
1593
|
+
/^f/i,
|
|
1594
|
+
/^mar/i,
|
|
1595
|
+
/^ap/i,
|
|
1596
|
+
/^may/i,
|
|
1597
|
+
/^jun/i,
|
|
1598
|
+
/^jul/i,
|
|
1599
|
+
/^au/i,
|
|
1600
|
+
/^s/i,
|
|
1601
|
+
/^o/i,
|
|
1602
|
+
/^n/i,
|
|
1603
|
+
/^d/i
|
|
1604
|
+
]
|
|
1605
|
+
};
|
|
1606
|
+
var matchDayPatterns = {
|
|
1607
|
+
narrow: /^[smtwf]/i,
|
|
1608
|
+
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
1609
|
+
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
1610
|
+
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
1611
|
+
};
|
|
1612
|
+
var parseDayPatterns = {
|
|
1613
|
+
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
1614
|
+
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
1615
|
+
};
|
|
1616
|
+
var matchDayPeriodPatterns = {
|
|
1617
|
+
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
1618
|
+
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
1619
|
+
};
|
|
1620
|
+
var parseDayPeriodPatterns = {
|
|
1621
|
+
any: {
|
|
1622
|
+
am: /^a/i,
|
|
1623
|
+
pm: /^p/i,
|
|
1624
|
+
midnight: /^mi/i,
|
|
1625
|
+
noon: /^no/i,
|
|
1626
|
+
morning: /morning/i,
|
|
1627
|
+
afternoon: /afternoon/i,
|
|
1628
|
+
evening: /evening/i,
|
|
1629
|
+
night: /night/i
|
|
1340
1630
|
}
|
|
1341
1631
|
};
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
init_esm_shims();
|
|
1348
|
-
|
|
1349
|
-
// ../config/dist/chunk-5QIMO5EY.js
|
|
1350
|
-
init_esm_shims();
|
|
1351
|
-
|
|
1352
|
-
// ../config/dist/chunk-HPWJK4AX.js
|
|
1353
|
-
init_esm_shims();
|
|
1354
|
-
|
|
1355
|
-
// ../config/dist/chunk-TYDRIJER.js
|
|
1356
|
-
init_esm_shims();
|
|
1357
|
-
var s = "https://docs.stormsoftware.com";
|
|
1358
|
-
var r = "https://stormsoftware.com";
|
|
1359
|
-
var t = "https://stormsoftware.com/contact";
|
|
1360
|
-
var a = "https://stormsoftware.com/license";
|
|
1361
|
-
var i = "Apache-2.0";
|
|
1362
|
-
var o = "https://discord.gg/MQ6YVzakM5";
|
|
1363
|
-
var e = "https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA";
|
|
1364
|
-
var E = `
|
|
1365
|
-
Storm Software is an open source software development organization with the mission is to make software development more accessible. Our ideal future is one where anyone can create software without years of prior development experience serving as a barrier to entry. We hope to achieve this via LLMs, Generative AI, and intuitive, high-level data modeling/programming languages.
|
|
1366
|
-
|
|
1367
|
-
Join us on [Discord](${o}) to chat with the team, receive release notifications, ask questions, and get involved.
|
|
1368
|
-
|
|
1369
|
-
If this sounds interesting, and you would like to help us in creating the next generation of development tools, please reach out on our [website](${t}) or join our [Slack](${e}) channel!
|
|
1370
|
-
`;
|
|
1371
|
-
var S = "tools/errors/codes.json";
|
|
1372
|
-
var A = "The workspace's banner image";
|
|
1373
|
-
|
|
1374
|
-
// ../config/dist/chunk-HPWJK4AX.js
|
|
1375
|
-
import * as e2 from "zod/v4/mini";
|
|
1376
|
-
var o2 = e2.registry();
|
|
1377
|
-
var t2 = e2.string().check(e2.length(7), e2.toLowerCase(), e2.regex(/^#([0-9a-f]{3}){1,2}$/i), e2.trim());
|
|
1378
|
-
o2.add(t2, { description: "A base schema for describing the format of colors" });
|
|
1379
|
-
var a2 = e2._default(t2, "#151718");
|
|
1380
|
-
o2.add(a2, { description: "The dark background color of the workspace" });
|
|
1381
|
-
var c = e2._default(t2, "#cbd5e1");
|
|
1382
|
-
o2.add(c, { description: "The light background color of the workspace" });
|
|
1383
|
-
var i2 = e2._default(t2, "#1fb2a6");
|
|
1384
|
-
o2.add(i2, { description: "The primary brand specific color of the workspace" });
|
|
1385
|
-
var s2 = e2.optional(t2);
|
|
1386
|
-
o2.add(s2, { description: "The alternate brand specific color of the workspace" });
|
|
1387
|
-
var n = e2.optional(t2);
|
|
1388
|
-
o2.add(n, { description: "The secondary brand specific color of the workspace" });
|
|
1389
|
-
var d = e2._default(t2, "#3fa6ff");
|
|
1390
|
-
o2.add(d, { description: "The color used to display hyperlink text" });
|
|
1391
|
-
var p = e2._default(t2, "#818cf8");
|
|
1392
|
-
o2.add(p, { description: "The second brand specific color of the workspace" });
|
|
1393
|
-
var h = e2._default(t2, "#45b27e");
|
|
1394
|
-
o2.add(h, { description: "The success color of the workspace" });
|
|
1395
|
-
var l = e2._default(t2, "#38bdf8");
|
|
1396
|
-
o2.add(l, { description: "The informational color of the workspace" });
|
|
1397
|
-
var m = e2._default(t2, "#8afafc");
|
|
1398
|
-
o2.add(m, { description: "The debug color of the workspace" });
|
|
1399
|
-
var z2 = e2._default(t2, "#f3d371");
|
|
1400
|
-
o2.add(z2, { description: "The warning color of the workspace" });
|
|
1401
|
-
var g = e2._default(t2, "#d8314a");
|
|
1402
|
-
o2.add(g, { description: "The danger color of the workspace" });
|
|
1403
|
-
var f = e2.optional(t2);
|
|
1404
|
-
o2.add(f, { description: "The fatal color of the workspace" });
|
|
1405
|
-
var u = e2._default(t2, "#80fd74");
|
|
1406
|
-
o2.add(u, { description: "The performance color of the workspace" });
|
|
1407
|
-
var k = e2._default(t2, "#4ade80");
|
|
1408
|
-
o2.add(k, { description: "The positive number color of the workspace" });
|
|
1409
|
-
var w = e2._default(t2, "#ef4444");
|
|
1410
|
-
o2.add(w, { description: "The negative number color of the workspace" });
|
|
1411
|
-
var S2 = e2.optional(e2.array(t2));
|
|
1412
|
-
o2.add(S2, { description: "The color stops for the base gradient color pattern used in the workspace" });
|
|
1413
|
-
var Re = e2.object({ foreground: c, background: a2, brand: i2, alternate: s2, accent: n, link: d, help: p, success: h, info: l, debug: m, warning: z2, danger: g, fatal: f, performance: u, positive: k, negative: w, gradient: S2 });
|
|
1414
|
-
var Ue = e2.object({ foreground: a2, background: c, brand: i2, alternate: s2, accent: n, link: d, help: p, success: h, info: l, debug: m, warning: z2, danger: g, fatal: f, performance: u, positive: k, negative: w, gradient: S2 });
|
|
1415
|
-
var De = e2.object({ dark: Re, light: Ue });
|
|
1416
|
-
var Be = e2.object({ dark: a2, light: c, brand: i2, alternate: s2, accent: n, link: d, help: p, success: h, info: l, debug: m, warning: z2, danger: g, fatal: f, performance: u, positive: k, negative: w, gradient: S2 });
|
|
1417
|
-
var r2 = e2.optional(e2.url());
|
|
1418
|
-
o2.add(r2, { description: "A remote registry URL used to publish distributable packages" });
|
|
1419
|
-
var y = e2._default(e2.object({ github: r2, npm: r2, cargo: r2, cyclone: r2, container: r2 }), {});
|
|
1420
|
-
o2.add(y, { description: "A list of remote registry URLs used by Storm Software" });
|
|
1421
|
-
var b = e2.union([Be, De]);
|
|
1422
|
-
o2.add(b, { description: "Colors used for various workspace elements" });
|
|
1423
|
-
var C = e2.record(e2.union([e2.union([e2.literal("base"), e2.string()]), e2.string()]), b);
|
|
1424
|
-
o2.add(C, { description: "Storm theme config values used for styling various package elements" });
|
|
1425
|
-
var _ = e2.optional(e2.union([e2.string().check(e2.trim()), e2.array(e2.string().check(e2.trim()))]));
|
|
1426
|
-
o2.add(_, { description: "The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration." });
|
|
1427
|
-
var L = e2.string().check(e2.trim());
|
|
1428
|
-
o2.add(L, { description: "The workspace bot user's name (this is the bot that will be used to perform various tasks)" });
|
|
1429
|
-
var j = e2.string().check(e2.trim());
|
|
1430
|
-
o2.add(j, { description: "The email of the workspace bot" });
|
|
1431
|
-
var A2 = e2.object({ name: L, email: j });
|
|
1432
|
-
o2.add(A2, { description: "The workspace's bot user's config used to automated various operations tasks" });
|
|
1433
|
-
var R = e2.optional(e2.string().check(e2.trim(), e2.url()));
|
|
1434
|
-
o2.add(R, { description: "A URL to a banner image used to display the workspace's release" });
|
|
1435
|
-
var U = e2._default(e2.string().check(e2.trim()), A);
|
|
1436
|
-
o2.add(U, { description: "The alt text for the workspace's release banner image" });
|
|
1437
|
-
var D = e2.object({ url: R, alt: U });
|
|
1438
|
-
o2.add(D, { description: "The workspace's banner image used during the release process" });
|
|
1439
|
-
var B = e2.optional(e2.string().check(e2.trim()));
|
|
1440
|
-
o2.add(B, { description: "A header message appended to the start of the workspace's release notes" });
|
|
1441
|
-
var F = e2.optional(e2.string().check(e2.trim()));
|
|
1442
|
-
o2.add(F, { description: "A footer message appended to the end of the workspace's release notes" });
|
|
1443
|
-
var N = e2.object({ banner: e2.union([D, e2.string().check(e2.trim(), e2.url())]), header: B, footer: F });
|
|
1444
|
-
o2.add(N, { description: "The workspace's release config used during the release process" });
|
|
1445
|
-
var E2 = e2.optional(e2.string().check(e2.trim()));
|
|
1446
|
-
o2.add(E2, { description: "A Twitter/X account associated with the organization/project" });
|
|
1447
|
-
var M = e2.optional(e2.string().check(e2.trim()));
|
|
1448
|
-
o2.add(M, { description: "A Discord account associated with the organization/project" });
|
|
1449
|
-
var O = e2.optional(e2.string().check(e2.trim()));
|
|
1450
|
-
o2.add(O, { description: "A Telegram account associated with the organization/project" });
|
|
1451
|
-
var I = e2.optional(e2.string().check(e2.trim()));
|
|
1452
|
-
o2.add(I, { description: "A Slack account associated with the organization/project" });
|
|
1453
|
-
var G = e2.optional(e2.string().check(e2.trim()));
|
|
1454
|
-
o2.add(G, { description: "A Medium account associated with the organization/project" });
|
|
1455
|
-
var H = e2.optional(e2.string().check(e2.trim()));
|
|
1456
|
-
o2.add(H, { description: "A GitHub account associated with the organization/project" });
|
|
1457
|
-
var J = e2.object({ twitter: E2, discord: M, telegram: O, slack: I, medium: G, github: H });
|
|
1458
|
-
o2.add(J, { description: "The workspace's account config used to store various social media links" });
|
|
1459
|
-
var W = e2.optional(e2.string().check(e2.trim()));
|
|
1460
|
-
o2.add(W, { description: "The directory used to store the environment's cached file data" });
|
|
1461
|
-
var P = e2.optional(e2.string().check(e2.trim()));
|
|
1462
|
-
o2.add(P, { description: "The directory used to store the environment's data files" });
|
|
1463
|
-
var $ = e2.optional(e2.string().check(e2.trim()));
|
|
1464
|
-
o2.add($, { description: "The directory used to store the environment's configuration files" });
|
|
1465
|
-
var V = e2.optional(e2.string().check(e2.trim()));
|
|
1466
|
-
o2.add(V, { description: "The directory used to store the environment's temp files" });
|
|
1467
|
-
var X = e2.optional(e2.string().check(e2.trim()));
|
|
1468
|
-
o2.add(X, { description: "The directory used to store the environment's log files" });
|
|
1469
|
-
var Y = e2._default(e2.string().check(e2.trim()), "dist");
|
|
1470
|
-
o2.add(Y, { description: "The directory used to store the workspace's distributable files after a build (relative to the workspace root)" });
|
|
1471
|
-
var q = e2.object({ cache: W, data: P, config: $, temp: V, log: X, build: Y });
|
|
1472
|
-
o2.add(q, { description: "Various directories used by the workspace to store data, cache, and configuration files" });
|
|
1473
|
-
var K = e2._default(e2.enum(["minimal", "monorepo"]), "monorepo");
|
|
1474
|
-
o2.add(K, { description: "The variant of the workspace. This can be used to enable or disable certain features or configurations." });
|
|
1475
|
-
var Q = e2._default(e2.string().check(e2.trim()), S);
|
|
1476
|
-
o2.add(Q, { description: "The path to the workspace's error codes JSON file" });
|
|
1477
|
-
var Z = e2.optional(e2.url());
|
|
1478
|
-
o2.add(Z, { description: "A URL to a page that looks up the workspace's error messages given a specific error code" });
|
|
1479
|
-
var ee = e2.object({ codesFile: Q, url: Z });
|
|
1480
|
-
o2.add(ee, { description: "The workspace's error config used when creating error details during a system error" });
|
|
1481
|
-
var oe = e2.optional(e2.string().check(e2.trim(), e2.toLowerCase()));
|
|
1482
|
-
o2.add(oe, { description: "The name of the organization" });
|
|
1483
|
-
var te = e2.optional(e2.string().check(e2.trim()));
|
|
1484
|
-
o2.add(te, { description: "A description of the organization" });
|
|
1485
|
-
var re = e2.optional(e2.url());
|
|
1486
|
-
o2.add(re, { description: "A URL to the organization's logo image" });
|
|
1487
|
-
var ae = e2.optional(e2.url());
|
|
1488
|
-
o2.add(ae, { description: "A URL to the organization's icon image" });
|
|
1489
|
-
var ce = e2.optional(e2.url());
|
|
1490
|
-
o2.add(ce, { description: "A URL to a page that provides more information about the organization" });
|
|
1491
|
-
var ie = e2.object({ name: oe, description: te, logo: re, icon: ae, url: ce });
|
|
1492
|
-
o2.add(ie, { description: "The workspace's organization details" });
|
|
1493
|
-
var se = e2._default(e2.string().check(e2.trim(), e2.toLowerCase()), "https://public.storm-cdn.com/schemas/storm-workspace.schema.json");
|
|
1494
|
-
o2.add(se, { description: "The URL or file path to the JSON schema file that describes the Storm configuration file" });
|
|
1495
|
-
var ne = e2.string().check(e2.trim(), e2.toLowerCase());
|
|
1496
|
-
o2.add(ne, { description: "The name of the workspace/project/service/package/scope using this configuration" });
|
|
1497
|
-
var de = e2.string().check(e2.trim(), e2.toLowerCase());
|
|
1498
|
-
o2.add(de, { description: "The namespace of the workspace/project/service/package/scope using this configuration" });
|
|
1499
|
-
var pe = e2.union([ie, e2.string().check(e2.trim(), e2.toLowerCase())]);
|
|
1500
|
-
o2.add(pe, { description: "The organization of the workspace. This can be a string or an object containing the organization's details" });
|
|
1501
|
-
var he = e2.string().check(e2.trim(), e2.toLowerCase());
|
|
1502
|
-
o2.add(he, { description: "The repo URL of the workspace (i.e. the GitHub repository URL)" });
|
|
1503
|
-
var le = e2._default(e2.string().check(e2.trim()), "Apache-2.0");
|
|
1504
|
-
o2.add(le, { description: "The license type of the package" });
|
|
1505
|
-
var me = e2.optional(e2.url());
|
|
1506
|
-
o2.add(me, { description: "The homepage of the workspace" });
|
|
1507
|
-
var ze = e2.optional(e2.url());
|
|
1508
|
-
o2.add(ze, { description: "The documentation site for the workspace" });
|
|
1509
|
-
var ge = e2.optional(e2.url());
|
|
1510
|
-
o2.add(ge, { description: "The development portal site for the workspace" });
|
|
1511
|
-
var fe = e2.optional(e2.url());
|
|
1512
|
-
o2.add(fe, { description: "The licensing site for the workspace" });
|
|
1513
|
-
var ue = e2.optional(e2.url());
|
|
1514
|
-
o2.add(ue, { description: "The contact site for the workspace" });
|
|
1515
|
-
var ke = e2.optional(e2.url());
|
|
1516
|
-
o2.add(ke, { description: "The support site for the workspace. If not provided, this is defaulted to the `contact` config value" });
|
|
1517
|
-
var we = e2._default(e2.string().check(e2.trim(), e2.toLowerCase()), "main");
|
|
1518
|
-
o2.add(we, { description: "The branch of the workspace" });
|
|
1519
|
-
var Se = e2.optional(e2.string().check(e2.trim(), e2.toLowerCase()));
|
|
1520
|
-
o2.add(Se, { description: "A tag specifying the version pre-release identifier" });
|
|
1521
|
-
var be = e2.optional(e2.string().check(e2.trim(), e2.toLowerCase()));
|
|
1522
|
-
o2.add(be, { description: "The owner of the package" });
|
|
1523
|
-
var xe = e2._default(e2.enum(["development", "test", "production"]).check(e2.trim(), e2.toLowerCase()), "production");
|
|
1524
|
-
o2.add(xe, { description: "The current runtime environment mode for the package" });
|
|
1525
|
-
var Te = e2.string().check(e2.trim(), e2.toLowerCase());
|
|
1526
|
-
o2.add(Te, { description: "The root directory of the workspace" });
|
|
1527
|
-
var ve = e2._default(e2.boolean(), false);
|
|
1528
|
-
o2.add(ve, { description: "Should all known types of workspace caching be skipped?" });
|
|
1529
|
-
var ye = e2._default(e2.enum(["npm", "yarn", "pnpm", "bun"]), "npm");
|
|
1530
|
-
o2.add(ye, { description: "The JavaScript/TypeScript package manager used by the repository" });
|
|
1531
|
-
var Ce = e2._default(e2.string().check(e2.trim()), "America/New_York");
|
|
1532
|
-
o2.add(Ce, { description: "The default timezone of the workspace" });
|
|
1533
|
-
var _e = e2._default(e2.string().check(e2.trim()), "en-US");
|
|
1534
|
-
o2.add(_e, { description: "The default locale of the workspace" });
|
|
1535
|
-
var Le = e2._default(e2.enum(["silent", "fatal", "error", "warn", "success", "info", "performance", "debug", "trace", "all"]), "info");
|
|
1536
|
-
o2.add(Le, { description: "The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)." });
|
|
1537
|
-
var je = e2._default(e2.boolean(), true);
|
|
1538
|
-
o2.add(je, { description: "Should the logging of the current Storm Workspace configuration be skipped?" });
|
|
1539
|
-
var Ae = e2._default(e2.nullable(e2.string().check(e2.trim())), null);
|
|
1540
|
-
o2.add(Ae, { description: "The filepath of the Storm config. When this field is null, no config file was found in the current workspace." });
|
|
1541
|
-
var x = e2._default(e2.record(e2.string(), e2.any()), {});
|
|
1542
|
-
o2.add(x, { description: "Configuration of each used extension" });
|
|
1543
|
-
var Ne = e2.object({ $schema: se, extends: _, name: ne, variant: K, namespace: de, organization: pe, repository: he, license: le, homepage: me, docs: ze, portal: ge, licensing: fe, contact: ue, support: ke, branch: we, preid: Se, owner: be, bot: A2, release: N, socials: J, error: ee, mode: xe, workspaceRoot: Te, skipCache: ve, directories: q, packageManager: ye, timezone: Ce, locale: _e, logLevel: Le, skipConfigLogging: je, registry: y, configFile: Ae, colors: e2.union([b, C]), extensions: x });
|
|
1544
|
-
o2.add(x, { description: "Storm Workspace config values used during various dev-ops processes. This type is a combination of the StormPackageConfig and StormProject types. It represents the config of the entire monorepo." });
|
|
1545
|
-
|
|
1546
|
-
// ../config/dist/chunk-YKRE3MWC.js
|
|
1547
|
-
init_esm_shims();
|
|
1548
|
-
var e3 = ["dark", "light", "base", "brand", "alternate", "accent", "link", "success", "help", "info", "warning", "danger", "fatal", "performance", "positive", "negative"];
|
|
1549
|
-
|
|
1550
|
-
// ../config-tools/dist/chunk-A5JXMY6X.js
|
|
1551
|
-
var getExtensionEnv = (extensionName) => {
|
|
1552
|
-
const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
|
|
1553
|
-
return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
|
|
1554
|
-
const name = key.replace(prefix, "").split("_").map(
|
|
1555
|
-
(i3) => i3.length > 0 ? i3.trim().charAt(0).toUpperCase() + i3.trim().slice(1) : ""
|
|
1556
|
-
).join("");
|
|
1557
|
-
if (name) {
|
|
1558
|
-
ret[name] = process.env[key];
|
|
1559
|
-
}
|
|
1560
|
-
return ret;
|
|
1561
|
-
}, {});
|
|
1562
|
-
};
|
|
1563
|
-
var getConfigEnv = () => {
|
|
1564
|
-
const prefix = "STORM_";
|
|
1565
|
-
let config = {
|
|
1566
|
-
extends: process.env[`${prefix}EXTENDS`] || void 0,
|
|
1567
|
-
name: process.env[`${prefix}NAME`] || void 0,
|
|
1568
|
-
variant: process.env[`${prefix}VARIANT`] || void 0,
|
|
1569
|
-
namespace: process.env[`${prefix}NAMESPACE`] || void 0,
|
|
1570
|
-
owner: process.env[`${prefix}OWNER`] || void 0,
|
|
1571
|
-
bot: {
|
|
1572
|
-
name: process.env[`${prefix}BOT_NAME`] || void 0,
|
|
1573
|
-
email: process.env[`${prefix}BOT_EMAIL`] || void 0
|
|
1574
|
-
},
|
|
1575
|
-
release: {
|
|
1576
|
-
banner: {
|
|
1577
|
-
url: process.env[`${prefix}RELEASE_BANNER_URL`] || void 0,
|
|
1578
|
-
alt: process.env[`${prefix}RELEASE_BANNER_ALT`] || void 0
|
|
1579
|
-
},
|
|
1580
|
-
header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
|
|
1581
|
-
footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
|
|
1582
|
-
},
|
|
1583
|
-
error: {
|
|
1584
|
-
codesFile: process.env[`${prefix}ERROR_CODES_FILE`] || void 0,
|
|
1585
|
-
url: process.env[`${prefix}ERROR_URL`] || void 0
|
|
1586
|
-
},
|
|
1587
|
-
socials: {
|
|
1588
|
-
twitter: process.env[`${prefix}SOCIAL_TWITTER`] || void 0,
|
|
1589
|
-
discord: process.env[`${prefix}SOCIAL_DISCORD`] || void 0,
|
|
1590
|
-
telegram: process.env[`${prefix}SOCIAL_TELEGRAM`] || void 0,
|
|
1591
|
-
slack: process.env[`${prefix}SOCIAL_SLACK`] || void 0,
|
|
1592
|
-
medium: process.env[`${prefix}SOCIAL_MEDIUM`] || void 0,
|
|
1593
|
-
github: process.env[`${prefix}SOCIAL_GITHUB`] || void 0
|
|
1594
|
-
},
|
|
1595
|
-
organization: process.env[`${prefix}ORG`] || process.env[`${prefix}ORGANIZATION`] || process.env[`${prefix}ORG_NAME`] || process.env[`${prefix}ORGANIZATION_NAME`] ? process.env[`${prefix}ORG_DESCRIPTION`] || process.env[`${prefix}ORGANIZATION_DESCRIPTION`] || process.env[`${prefix}ORG_URL`] || process.env[`${prefix}ORGANIZATION_URL`] || process.env[`${prefix}ORG_LOGO`] || process.env[`${prefix}ORGANIZATION_LOGO`] ? {
|
|
1596
|
-
name: process.env[`${prefix}ORG`] || process.env[`${prefix}ORGANIZATION`] || process.env[`${prefix}ORG_NAME`] || process.env[`${prefix}ORGANIZATION_NAME`],
|
|
1597
|
-
description: process.env[`${prefix}ORG_DESCRIPTION`] || process.env[`${prefix}ORGANIZATION_DESCRIPTION`] || void 0,
|
|
1598
|
-
url: process.env[`${prefix}ORG_URL`] || process.env[`${prefix}ORGANIZATION_URL`] || void 0,
|
|
1599
|
-
logo: process.env[`${prefix}ORG_LOGO`] || process.env[`${prefix}ORGANIZATION_LOGO`] || void 0,
|
|
1600
|
-
icon: process.env[`${prefix}ORG_ICON`] || process.env[`${prefix}ORGANIZATION_ICON`] || void 0
|
|
1601
|
-
} : process.env[`${prefix}ORG`] || process.env[`${prefix}ORGANIZATION`] || process.env[`${prefix}ORG_NAME`] || process.env[`${prefix}ORGANIZATION_NAME`] : void 0,
|
|
1602
|
-
packageManager: process.env[`${prefix}PACKAGE_MANAGER`] || void 0,
|
|
1603
|
-
license: process.env[`${prefix}LICENSE`] || void 0,
|
|
1604
|
-
homepage: process.env[`${prefix}HOMEPAGE`] || void 0,
|
|
1605
|
-
docs: process.env[`${prefix}DOCS`] || void 0,
|
|
1606
|
-
portal: process.env[`${prefix}PORTAL`] || void 0,
|
|
1607
|
-
licensing: process.env[`${prefix}LICENSING`] || void 0,
|
|
1608
|
-
contact: process.env[`${prefix}CONTACT`] || void 0,
|
|
1609
|
-
support: process.env[`${prefix}SUPPORT`] || void 0,
|
|
1610
|
-
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
1611
|
-
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
1612
|
-
configFile: process.env[`${prefix}WORKSPACE_CONFIG_FILE`] ? correctPaths2(process.env[`${prefix}WORKSPACE_CONFIG_FILE`]) : void 0,
|
|
1613
|
-
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? correctPaths2(process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
1614
|
-
directories: {
|
|
1615
|
-
cache: process.env[`${prefix}CACHE_DIR`] ? correctPaths2(process.env[`${prefix}CACHE_DIR`]) : process.env[`${prefix}CACHE_DIRECTORY`] ? correctPaths2(process.env[`${prefix}CACHE_DIRECTORY`]) : void 0,
|
|
1616
|
-
data: process.env[`${prefix}DATA_DIR`] ? correctPaths2(process.env[`${prefix}DATA_DIR`]) : process.env[`${prefix}DATA_DIRECTORY`] ? correctPaths2(process.env[`${prefix}DATA_DIRECTORY`]) : void 0,
|
|
1617
|
-
config: process.env[`${prefix}CONFIG_DIR`] ? correctPaths2(process.env[`${prefix}CONFIG_DIR`]) : process.env[`${prefix}CONFIG_DIRECTORY`] ? correctPaths2(process.env[`${prefix}CONFIG_DIRECTORY`]) : void 0,
|
|
1618
|
-
temp: process.env[`${prefix}TEMP_DIR`] ? correctPaths2(process.env[`${prefix}TEMP_DIR`]) : process.env[`${prefix}TEMP_DIRECTORY`] ? correctPaths2(process.env[`${prefix}TEMP_DIRECTORY`]) : void 0,
|
|
1619
|
-
log: process.env[`${prefix}LOG_DIR`] ? correctPaths2(process.env[`${prefix}LOG_DIR`]) : process.env[`${prefix}LOG_DIRECTORY`] ? correctPaths2(process.env[`${prefix}LOG_DIRECTORY`]) : void 0,
|
|
1620
|
-
build: process.env[`${prefix}BUILD_DIR`] ? correctPaths2(process.env[`${prefix}BUILD_DIR`]) : process.env[`${prefix}BUILD_DIRECTORY`] ? correctPaths2(process.env[`${prefix}BUILD_DIRECTORY`]) : void 0
|
|
1621
|
-
},
|
|
1622
|
-
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
1623
|
-
mode: (process.env[`${prefix}MODE`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT) || void 0,
|
|
1624
|
-
// ci:
|
|
1625
|
-
// process.env[`${prefix}CI`] !== undefined
|
|
1626
|
-
// ? Boolean(
|
|
1627
|
-
// process.env[`${prefix}CI`] ??
|
|
1628
|
-
// process.env.CI ??
|
|
1629
|
-
// process.env.CONTINUOUS_INTEGRATION
|
|
1630
|
-
// )
|
|
1631
|
-
// : undefined,
|
|
1632
|
-
repository: process.env[`${prefix}REPOSITORY`] || void 0,
|
|
1633
|
-
branch: process.env[`${prefix}BRANCH`] || void 0,
|
|
1634
|
-
preid: process.env[`${prefix}PRE_ID`] || void 0,
|
|
1635
|
-
registry: {
|
|
1636
|
-
github: process.env[`${prefix}REGISTRY_GITHUB`] || void 0,
|
|
1637
|
-
npm: process.env[`${prefix}REGISTRY_NPM`] || void 0,
|
|
1638
|
-
cargo: process.env[`${prefix}REGISTRY_CARGO`] || void 0,
|
|
1639
|
-
cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
|
|
1640
|
-
container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
|
|
1641
|
-
},
|
|
1642
|
-
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
|
|
1643
|
-
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
1644
|
-
) ? getLogLevelLabel2(
|
|
1645
|
-
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
1646
|
-
) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
1647
|
-
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
1648
|
-
};
|
|
1649
|
-
const themeNames = Object.keys(process.env).filter(
|
|
1650
|
-
(envKey) => envKey.startsWith(`${prefix}COLOR_`) && e3.every(
|
|
1651
|
-
(colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)
|
|
1652
|
-
)
|
|
1653
|
-
);
|
|
1654
|
-
config.colors = themeNames.length > 0 ? themeNames.reduce(
|
|
1655
|
-
(ret, themeName) => {
|
|
1656
|
-
ret[themeName] = getThemeColorsEnv(prefix, themeName);
|
|
1657
|
-
return ret;
|
|
1658
|
-
},
|
|
1659
|
-
{}
|
|
1660
|
-
) : getThemeColorsEnv(prefix);
|
|
1661
|
-
if (config.docs === s) {
|
|
1662
|
-
if (config.homepage === r) {
|
|
1663
|
-
config.docs = `${r}/projects/${config.name}/docs`;
|
|
1664
|
-
} else {
|
|
1665
|
-
config.docs = `${config.homepage}/docs`;
|
|
1666
|
-
}
|
|
1667
|
-
}
|
|
1668
|
-
if (config.licensing === a) {
|
|
1669
|
-
if (config.homepage === r) {
|
|
1670
|
-
config.licensing = `${r}/projects/${config.name}/licensing`;
|
|
1671
|
-
} else {
|
|
1672
|
-
config.licensing = `${config.homepage}/docs`;
|
|
1673
|
-
}
|
|
1674
|
-
}
|
|
1675
|
-
const serializedConfig = process.env[`${prefix}WORKSPACE_CONFIG`];
|
|
1676
|
-
if (serializedConfig) {
|
|
1677
|
-
const parsed = JSON.parse(serializedConfig);
|
|
1678
|
-
config = {
|
|
1679
|
-
...config,
|
|
1680
|
-
...parsed,
|
|
1681
|
-
colors: { ...config.colors, ...parsed.colors },
|
|
1682
|
-
extensions: { ...config.extensions, ...parsed.extensions }
|
|
1683
|
-
};
|
|
1684
|
-
}
|
|
1685
|
-
return config;
|
|
1686
|
-
};
|
|
1687
|
-
var getThemeColorsEnv = (prefix, theme) => {
|
|
1688
|
-
const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
|
|
1689
|
-
return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorsEnv(prefix + themeName) : getSingleThemeColorsEnv(prefix + themeName);
|
|
1690
|
-
};
|
|
1691
|
-
var getSingleThemeColorsEnv = (prefix) => {
|
|
1692
|
-
const gradient = [];
|
|
1693
|
-
if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
|
|
1694
|
-
gradient.push(
|
|
1695
|
-
process.env[`${prefix}GRADIENT_START`],
|
|
1696
|
-
process.env[`${prefix}GRADIENT_END`]
|
|
1697
|
-
);
|
|
1698
|
-
} else if (process.env[`${prefix}GRADIENT_0`] || process.env[`${prefix}GRADIENT_1`]) {
|
|
1699
|
-
let index = process.env[`${prefix}GRADIENT_0`] ? 0 : 1;
|
|
1700
|
-
while (process.env[`${prefix}GRADIENT_${index}`]) {
|
|
1701
|
-
gradient.push(process.env[`${prefix}GRADIENT_${index}`]);
|
|
1702
|
-
index++;
|
|
1703
|
-
}
|
|
1704
|
-
}
|
|
1705
|
-
return {
|
|
1706
|
-
dark: process.env[`${prefix}DARK`],
|
|
1707
|
-
light: process.env[`${prefix}LIGHT`],
|
|
1708
|
-
brand: process.env[`${prefix}BRAND`],
|
|
1709
|
-
alternate: process.env[`${prefix}ALTERNATE`],
|
|
1710
|
-
accent: process.env[`${prefix}ACCENT`],
|
|
1711
|
-
link: process.env[`${prefix}LINK`],
|
|
1712
|
-
help: process.env[`${prefix}HELP`],
|
|
1713
|
-
success: process.env[`${prefix}SUCCESS`],
|
|
1714
|
-
info: process.env[`${prefix}INFO`],
|
|
1715
|
-
debug: process.env[`${prefix}DEBUG`],
|
|
1716
|
-
warning: process.env[`${prefix}WARNING`],
|
|
1717
|
-
danger: process.env[`${prefix}DANGER`],
|
|
1718
|
-
fatal: process.env[`${prefix}FATAL`],
|
|
1719
|
-
performance: process.env[`${prefix}PERFORMANCE`],
|
|
1720
|
-
positive: process.env[`${prefix}POSITIVE`],
|
|
1721
|
-
negative: process.env[`${prefix}NEGATIVE`],
|
|
1722
|
-
gradient
|
|
1723
|
-
};
|
|
1724
|
-
};
|
|
1725
|
-
var getMultiThemeColorsEnv = (prefix) => {
|
|
1726
|
-
return {
|
|
1727
|
-
light: getBaseThemeColorsEnv(`${prefix}_LIGHT_`),
|
|
1728
|
-
dark: getBaseThemeColorsEnv(`${prefix}_DARK_`)
|
|
1729
|
-
};
|
|
1730
|
-
};
|
|
1731
|
-
var getBaseThemeColorsEnv = (prefix) => {
|
|
1732
|
-
const gradient = [];
|
|
1733
|
-
if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
|
|
1734
|
-
gradient.push(
|
|
1735
|
-
process.env[`${prefix}GRADIENT_START`],
|
|
1736
|
-
process.env[`${prefix}GRADIENT_END`]
|
|
1737
|
-
);
|
|
1738
|
-
} else if (process.env[`${prefix}GRADIENT_0`] || process.env[`${prefix}GRADIENT_1`]) {
|
|
1739
|
-
let index = process.env[`${prefix}GRADIENT_0`] ? 0 : 1;
|
|
1740
|
-
while (process.env[`${prefix}GRADIENT_${index}`]) {
|
|
1741
|
-
gradient.push(process.env[`${prefix}GRADIENT_${index}`]);
|
|
1742
|
-
index++;
|
|
1743
|
-
}
|
|
1744
|
-
}
|
|
1745
|
-
return {
|
|
1746
|
-
foreground: process.env[`${prefix}FOREGROUND`],
|
|
1747
|
-
background: process.env[`${prefix}BACKGROUND`],
|
|
1748
|
-
brand: process.env[`${prefix}BRAND`],
|
|
1749
|
-
alternate: process.env[`${prefix}ALTERNATE`],
|
|
1750
|
-
accent: process.env[`${prefix}ACCENT`],
|
|
1751
|
-
link: process.env[`${prefix}LINK`],
|
|
1752
|
-
help: process.env[`${prefix}HELP`],
|
|
1753
|
-
success: process.env[`${prefix}SUCCESS`],
|
|
1754
|
-
info: process.env[`${prefix}INFO`],
|
|
1755
|
-
debug: process.env[`${prefix}DEBUG`],
|
|
1756
|
-
warning: process.env[`${prefix}WARNING`],
|
|
1757
|
-
danger: process.env[`${prefix}DANGER`],
|
|
1758
|
-
fatal: process.env[`${prefix}FATAL`],
|
|
1759
|
-
performance: process.env[`${prefix}PERFORMANCE`],
|
|
1760
|
-
positive: process.env[`${prefix}POSITIVE`],
|
|
1761
|
-
negative: process.env[`${prefix}NEGATIVE`],
|
|
1762
|
-
gradient
|
|
1763
|
-
};
|
|
1764
|
-
};
|
|
1765
|
-
|
|
1766
|
-
// ../config-tools/dist/chunk-7UEOVCKZ.js
|
|
1767
|
-
init_esm_shims();
|
|
1768
|
-
|
|
1769
|
-
// ../config-tools/dist/chunk-LF3SAK2O.js
|
|
1770
|
-
init_esm_shims();
|
|
1771
|
-
|
|
1772
|
-
// ../config-tools/dist/chunk-RUKM6FCF.js
|
|
1773
|
-
init_esm_shims();
|
|
1774
|
-
import { existsSync as existsSync5 } from "node:fs";
|
|
1775
|
-
import { join as join3 } from "node:path";
|
|
1776
|
-
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
1777
|
-
var depth = 0;
|
|
1778
|
-
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
1779
|
-
const _startPath = startPath ?? process.cwd();
|
|
1780
|
-
if (endDirectoryNames.some(
|
|
1781
|
-
(endDirName) => existsSync5(join3(_startPath, endDirName))
|
|
1782
|
-
)) {
|
|
1783
|
-
return _startPath;
|
|
1784
|
-
}
|
|
1785
|
-
if (endFileNames.some((endFileName) => existsSync5(join3(_startPath, endFileName)))) {
|
|
1786
|
-
return _startPath;
|
|
1787
|
-
}
|
|
1788
|
-
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
1789
|
-
const parent = join3(_startPath, "..");
|
|
1790
|
-
return findFolderUp(parent, endFileNames, endDirectoryNames);
|
|
1791
|
-
}
|
|
1792
|
-
return void 0;
|
|
1793
|
-
}
|
|
1794
|
-
|
|
1795
|
-
// ../config-tools/dist/chunk-LF3SAK2O.js
|
|
1796
|
-
var rootFiles = [
|
|
1797
|
-
"storm-workspace.json",
|
|
1798
|
-
"storm-workspace.yaml",
|
|
1799
|
-
"storm-workspace.yml",
|
|
1800
|
-
"storm-workspace.js",
|
|
1801
|
-
"storm-workspace.ts",
|
|
1802
|
-
".storm-workspace.json",
|
|
1803
|
-
".storm-workspace.yaml",
|
|
1804
|
-
".storm-workspace.yml",
|
|
1805
|
-
".storm-workspace.js",
|
|
1806
|
-
".storm-workspace.ts",
|
|
1807
|
-
"lerna.json",
|
|
1808
|
-
"nx.json",
|
|
1809
|
-
"turbo.json",
|
|
1810
|
-
"npm-workspace.json",
|
|
1811
|
-
"yarn-workspace.json",
|
|
1812
|
-
"pnpm-workspace.json",
|
|
1813
|
-
"npm-workspace.yaml",
|
|
1814
|
-
"yarn-workspace.yaml",
|
|
1815
|
-
"pnpm-workspace.yaml",
|
|
1816
|
-
"npm-workspace.yml",
|
|
1817
|
-
"yarn-workspace.yml",
|
|
1818
|
-
"pnpm-workspace.yml",
|
|
1819
|
-
"npm-lock.json",
|
|
1820
|
-
"yarn-lock.json",
|
|
1821
|
-
"pnpm-lock.json",
|
|
1822
|
-
"npm-lock.yaml",
|
|
1823
|
-
"yarn-lock.yaml",
|
|
1824
|
-
"pnpm-lock.yaml",
|
|
1825
|
-
"npm-lock.yml",
|
|
1826
|
-
"yarn-lock.yml",
|
|
1827
|
-
"pnpm-lock.yml",
|
|
1828
|
-
"bun.lockb"
|
|
1829
|
-
];
|
|
1830
|
-
var rootDirectories = [
|
|
1831
|
-
".storm-workspace",
|
|
1832
|
-
".nx",
|
|
1833
|
-
".git",
|
|
1834
|
-
".github",
|
|
1835
|
-
".vscode",
|
|
1836
|
-
".verdaccio"
|
|
1837
|
-
];
|
|
1838
|
-
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
1839
|
-
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
1840
|
-
return correctPaths2(
|
|
1841
|
-
process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH
|
|
1842
|
-
);
|
|
1843
|
-
}
|
|
1844
|
-
return correctPaths2(
|
|
1845
|
-
findFolderUp(
|
|
1846
|
-
pathInsideMonorepo ?? process.cwd(),
|
|
1847
|
-
rootFiles,
|
|
1848
|
-
rootDirectories
|
|
1849
|
-
)
|
|
1850
|
-
);
|
|
1851
|
-
}
|
|
1852
|
-
function findWorkspaceRoot2(pathInsideMonorepo) {
|
|
1853
|
-
const result = findWorkspaceRootSafe(pathInsideMonorepo);
|
|
1854
|
-
if (!result) {
|
|
1855
|
-
throw new Error(
|
|
1856
|
-
`Cannot find workspace root upwards from known path. Files search list includes:
|
|
1857
|
-
${rootFiles.join(
|
|
1858
|
-
"\n"
|
|
1859
|
-
)}
|
|
1860
|
-
Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
|
|
1861
|
-
);
|
|
1862
|
-
}
|
|
1863
|
-
return result;
|
|
1864
|
-
}
|
|
1865
|
-
|
|
1866
|
-
// ../config-tools/dist/chunk-EN32U2DR.js
|
|
1867
|
-
init_esm_shims();
|
|
1868
|
-
|
|
1869
|
-
// ../config-tools/dist/chunk-5DQF4GNF.js
|
|
1870
|
-
init_esm_shims();
|
|
1871
|
-
var DEFAULT_COLOR_CONFIG = {
|
|
1872
|
-
light: {
|
|
1873
|
-
background: "#fafafa",
|
|
1874
|
-
foreground: "#1d1e22",
|
|
1875
|
-
brand: "#1fb2a6",
|
|
1876
|
-
alternate: "#db2777",
|
|
1877
|
-
help: "#5C4EE5",
|
|
1878
|
-
success: "#087f5b",
|
|
1879
|
-
info: "#0550ae",
|
|
1880
|
-
debug: "#8afafc",
|
|
1881
|
-
warning: "#e3b341",
|
|
1882
|
-
danger: "#D8314A",
|
|
1883
|
-
fatal: "#51070f",
|
|
1884
|
-
performance: "#13c302",
|
|
1885
|
-
link: "#3fa6ff",
|
|
1886
|
-
positive: "#22c55e",
|
|
1887
|
-
negative: "#dc2626",
|
|
1888
|
-
gradient: ["#1fb2a6", "#db2777", "#5C4EE5"]
|
|
1889
|
-
},
|
|
1890
|
-
dark: {
|
|
1891
|
-
background: "#1d1e22",
|
|
1892
|
-
foreground: "#cbd5e1",
|
|
1893
|
-
brand: "#2dd4bf",
|
|
1894
|
-
alternate: "#db2777",
|
|
1895
|
-
help: "#818cf8",
|
|
1896
|
-
success: "#10b981",
|
|
1897
|
-
info: "#58a6ff",
|
|
1898
|
-
debug: "#8afafc",
|
|
1899
|
-
warning: "#f3d371",
|
|
1900
|
-
danger: "#D8314A",
|
|
1901
|
-
fatal: "#a40e26",
|
|
1902
|
-
performance: "#80fd74",
|
|
1903
|
-
link: "#3fa6ff",
|
|
1904
|
-
positive: "#22c55e",
|
|
1905
|
-
negative: "#dc2626",
|
|
1906
|
-
gradient: ["#1fb2a6", "#db2777", "#818cf8"]
|
|
1907
|
-
}
|
|
1908
|
-
};
|
|
1909
|
-
|
|
1910
|
-
// ../config-tools/dist/chunk-JZAYHDV3.js
|
|
1911
|
-
init_esm_shims();
|
|
1912
|
-
var formatTimestamp = (fullDateTime = false, date = /* @__PURE__ */ new Date()) => {
|
|
1913
|
-
return fullDateTime ? `${date.toLocaleDateString()} ${date.toLocaleTimeString()}` : `${date.toLocaleTimeString()}`;
|
|
1914
|
-
};
|
|
1915
|
-
|
|
1916
|
-
// ../config-tools/dist/chunk-HVVJHTFS.js
|
|
1917
|
-
init_esm_shims();
|
|
1918
|
-
import chalk2 from "chalk";
|
|
1919
|
-
var chalkDefault = {
|
|
1920
|
-
hex: (_3) => (message) => message,
|
|
1921
|
-
bgHex: (_3) => ({
|
|
1922
|
-
whiteBright: (message) => message,
|
|
1923
|
-
white: (message) => message
|
|
1632
|
+
var match = {
|
|
1633
|
+
ordinalNumber: buildMatchPatternFn({
|
|
1634
|
+
matchPattern: matchOrdinalNumberPattern,
|
|
1635
|
+
parsePattern: parseOrdinalNumberPattern,
|
|
1636
|
+
valueCallback: (value) => parseInt(value, 10)
|
|
1924
1637
|
}),
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1638
|
+
era: buildMatchFn({
|
|
1639
|
+
matchPatterns: matchEraPatterns,
|
|
1640
|
+
defaultMatchWidth: "wide",
|
|
1641
|
+
parsePatterns: parseEraPatterns,
|
|
1642
|
+
defaultParseWidth: "any"
|
|
1643
|
+
}),
|
|
1644
|
+
quarter: buildMatchFn({
|
|
1645
|
+
matchPatterns: matchQuarterPatterns,
|
|
1646
|
+
defaultMatchWidth: "wide",
|
|
1647
|
+
parsePatterns: parseQuarterPatterns,
|
|
1648
|
+
defaultParseWidth: "any",
|
|
1649
|
+
valueCallback: (index) => index + 1
|
|
1650
|
+
}),
|
|
1651
|
+
month: buildMatchFn({
|
|
1652
|
+
matchPatterns: matchMonthPatterns,
|
|
1653
|
+
defaultMatchWidth: "wide",
|
|
1654
|
+
parsePatterns: parseMonthPatterns,
|
|
1655
|
+
defaultParseWidth: "any"
|
|
1656
|
+
}),
|
|
1657
|
+
day: buildMatchFn({
|
|
1658
|
+
matchPatterns: matchDayPatterns,
|
|
1659
|
+
defaultMatchWidth: "wide",
|
|
1660
|
+
parsePatterns: parseDayPatterns,
|
|
1661
|
+
defaultParseWidth: "any"
|
|
1662
|
+
}),
|
|
1663
|
+
dayPeriod: buildMatchFn({
|
|
1664
|
+
matchPatterns: matchDayPeriodPatterns,
|
|
1665
|
+
defaultMatchWidth: "any",
|
|
1666
|
+
parsePatterns: parseDayPeriodPatterns,
|
|
1667
|
+
defaultParseWidth: "any"
|
|
1668
|
+
})
|
|
1941
1669
|
};
|
|
1942
|
-
var
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1670
|
+
var enUS = {
|
|
1671
|
+
code: "en-US",
|
|
1672
|
+
formatDistance,
|
|
1673
|
+
formatLong,
|
|
1674
|
+
formatRelative,
|
|
1675
|
+
localize,
|
|
1676
|
+
match,
|
|
1677
|
+
options: {
|
|
1678
|
+
weekStartsOn: 0,
|
|
1679
|
+
firstWeekContainsDate: 1
|
|
1946
1680
|
}
|
|
1947
|
-
return _chalk;
|
|
1948
1681
|
};
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
// ../config-tools/dist/chunk-G2MK47WL.js
|
|
1954
|
-
init_esm_shims();
|
|
1955
|
-
function isUnicodeSupported2() {
|
|
1956
|
-
if (process.platform !== "win32") {
|
|
1957
|
-
return process.env.TERM !== "linux";
|
|
1958
|
-
}
|
|
1959
|
-
return Boolean(process.env.WT_SESSION) || // Windows Terminal
|
|
1960
|
-
Boolean(process.env.TERMINUS_SUBLIME) || // Terminus (<0.2.27)
|
|
1961
|
-
process.env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
|
|
1962
|
-
process.env.TERM_PROGRAM === "Terminus-Sublime" || process.env.TERM_PROGRAM === "vscode" || process.env.TERM === "xterm-256color" || process.env.TERM === "alacritty" || process.env.TERM === "rxvt-unicode" || process.env.TERM === "rxvt-unicode-256color" || process.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
1682
|
+
var defaultOptions = {};
|
|
1683
|
+
function getDefaultOptions() {
|
|
1684
|
+
return defaultOptions;
|
|
1963
1685
|
}
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
var useIcon2 = (c3, fallback) => isUnicodeSupported2() ? c3 : fallback;
|
|
1967
|
-
var CONSOLE_ICONS2 = {
|
|
1968
|
-
[LogLevelLabel2.ERROR]: useIcon2("\u2718", "\xD7"),
|
|
1969
|
-
[LogLevelLabel2.FATAL]: useIcon2("\u{1F571}", "\xD7"),
|
|
1970
|
-
[LogLevelLabel2.WARN]: useIcon2("\u26A0", "\u203C"),
|
|
1971
|
-
[LogLevelLabel2.INFO]: useIcon2("\u2139", "i"),
|
|
1972
|
-
[LogLevelLabel2.PERFORMANCE]: useIcon2("\u23F1", "\u23F1"),
|
|
1973
|
-
[LogLevelLabel2.SUCCESS]: useIcon2("\u2714", "\u221A"),
|
|
1974
|
-
[LogLevelLabel2.DEBUG]: useIcon2("\u{1F6E0}", "D"),
|
|
1975
|
-
[LogLevelLabel2.TRACE]: useIcon2("\u2699", "T"),
|
|
1976
|
-
[LogLevelLabel2.ALL]: useIcon2("\u2709", "\u2192")
|
|
1977
|
-
};
|
|
1978
|
-
|
|
1979
|
-
// ../config-tools/dist/chunk-EN32U2DR.js
|
|
1980
|
-
var daysInYear = 365.2425;
|
|
1981
|
-
var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1e3;
|
|
1982
|
-
var minTime = -maxTime;
|
|
1983
|
-
var minutesInMonth = 43200;
|
|
1984
|
-
var minutesInDay = 1440;
|
|
1985
|
-
var secondsInHour = 3600;
|
|
1986
|
-
var secondsInDay = secondsInHour * 24;
|
|
1987
|
-
var secondsInWeek = secondsInDay * 7;
|
|
1988
|
-
var secondsInYear = secondsInDay * daysInYear;
|
|
1989
|
-
var secondsInMonth = secondsInYear / 12;
|
|
1990
|
-
var secondsInQuarter = secondsInMonth * 3;
|
|
1991
|
-
var constructFromSymbol = Symbol.for("constructDateFrom");
|
|
1992
|
-
function constructFrom(date, value) {
|
|
1993
|
-
if (typeof date === "function") return date(value);
|
|
1994
|
-
if (date && typeof date === "object" && constructFromSymbol in date)
|
|
1995
|
-
return date[constructFromSymbol](value);
|
|
1996
|
-
if (date instanceof Date) return new date.constructor(value);
|
|
1997
|
-
return new Date(value);
|
|
1686
|
+
function toDate(argument, context) {
|
|
1687
|
+
return constructFrom(context || argument, argument);
|
|
1998
1688
|
}
|
|
1999
|
-
function
|
|
2000
|
-
|
|
1689
|
+
function getTimezoneOffsetInMilliseconds(date) {
|
|
1690
|
+
const _date = toDate(date);
|
|
1691
|
+
const utcDate = new Date(
|
|
1692
|
+
Date.UTC(
|
|
1693
|
+
_date.getFullYear(),
|
|
1694
|
+
_date.getMonth(),
|
|
1695
|
+
_date.getDate(),
|
|
1696
|
+
_date.getHours(),
|
|
1697
|
+
_date.getMinutes(),
|
|
1698
|
+
_date.getSeconds(),
|
|
1699
|
+
_date.getMilliseconds()
|
|
1700
|
+
)
|
|
1701
|
+
);
|
|
1702
|
+
utcDate.setUTCFullYear(_date.getFullYear());
|
|
1703
|
+
return +date - +utcDate;
|
|
2001
1704
|
}
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
},
|
|
2060
|
-
almostXYears: {
|
|
2061
|
-
one: "almost 1 year",
|
|
2062
|
-
other: "almost {{count}} years"
|
|
2063
|
-
}
|
|
2064
|
-
};
|
|
2065
|
-
var formatDistance = (token, count, options) => {
|
|
2066
|
-
let result;
|
|
2067
|
-
const tokenValue = formatDistanceLocale[token];
|
|
2068
|
-
if (typeof tokenValue === "string") {
|
|
2069
|
-
result = tokenValue;
|
|
2070
|
-
} else if (count === 1) {
|
|
2071
|
-
result = tokenValue.one;
|
|
2072
|
-
} else {
|
|
2073
|
-
result = tokenValue.other.replace("{{count}}", count.toString());
|
|
1705
|
+
function normalizeDates(context, ...dates) {
|
|
1706
|
+
const normalize = constructFrom.bind(
|
|
1707
|
+
null,
|
|
1708
|
+
context || dates.find((date) => typeof date === "object")
|
|
1709
|
+
);
|
|
1710
|
+
return dates.map(normalize);
|
|
1711
|
+
}
|
|
1712
|
+
function compareAsc(dateLeft, dateRight) {
|
|
1713
|
+
const diff = +toDate(dateLeft) - +toDate(dateRight);
|
|
1714
|
+
if (diff < 0) return -1;
|
|
1715
|
+
else if (diff > 0) return 1;
|
|
1716
|
+
return diff;
|
|
1717
|
+
}
|
|
1718
|
+
function differenceInCalendarMonths(laterDate, earlierDate, options) {
|
|
1719
|
+
const [laterDate_, earlierDate_] = normalizeDates(
|
|
1720
|
+
options?.in,
|
|
1721
|
+
laterDate,
|
|
1722
|
+
earlierDate
|
|
1723
|
+
);
|
|
1724
|
+
const yearsDiff = laterDate_.getFullYear() - earlierDate_.getFullYear();
|
|
1725
|
+
const monthsDiff = laterDate_.getMonth() - earlierDate_.getMonth();
|
|
1726
|
+
return yearsDiff * 12 + monthsDiff;
|
|
1727
|
+
}
|
|
1728
|
+
function endOfDay(date, options) {
|
|
1729
|
+
const _date = toDate(date, options?.in);
|
|
1730
|
+
_date.setHours(23, 59, 59, 999);
|
|
1731
|
+
return _date;
|
|
1732
|
+
}
|
|
1733
|
+
function endOfMonth(date, options) {
|
|
1734
|
+
const _date = toDate(date, options?.in);
|
|
1735
|
+
const month = _date.getMonth();
|
|
1736
|
+
_date.setFullYear(_date.getFullYear(), month + 1, 0);
|
|
1737
|
+
_date.setHours(23, 59, 59, 999);
|
|
1738
|
+
return _date;
|
|
1739
|
+
}
|
|
1740
|
+
function isLastDayOfMonth(date, options) {
|
|
1741
|
+
const _date = toDate(date, options?.in);
|
|
1742
|
+
return +endOfDay(_date, options) === +endOfMonth(_date, options);
|
|
1743
|
+
}
|
|
1744
|
+
function differenceInMonths(laterDate, earlierDate, options) {
|
|
1745
|
+
const [laterDate_, workingLaterDate, earlierDate_] = normalizeDates(
|
|
1746
|
+
options?.in,
|
|
1747
|
+
laterDate,
|
|
1748
|
+
laterDate,
|
|
1749
|
+
earlierDate
|
|
1750
|
+
);
|
|
1751
|
+
const sign = compareAsc(workingLaterDate, earlierDate_);
|
|
1752
|
+
const difference = Math.abs(
|
|
1753
|
+
differenceInCalendarMonths(workingLaterDate, earlierDate_)
|
|
1754
|
+
);
|
|
1755
|
+
if (difference < 1) return 0;
|
|
1756
|
+
if (workingLaterDate.getMonth() === 1 && workingLaterDate.getDate() > 27)
|
|
1757
|
+
workingLaterDate.setDate(30);
|
|
1758
|
+
workingLaterDate.setMonth(workingLaterDate.getMonth() - sign * difference);
|
|
1759
|
+
let isLastMonthNotFull = compareAsc(workingLaterDate, earlierDate_) === -sign;
|
|
1760
|
+
if (isLastDayOfMonth(laterDate_) && difference === 1 && compareAsc(laterDate_, earlierDate_) === 1) {
|
|
1761
|
+
isLastMonthNotFull = false;
|
|
2074
1762
|
}
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
1763
|
+
const result = sign * (difference - +isLastMonthNotFull);
|
|
1764
|
+
return result === 0 ? 0 : result;
|
|
1765
|
+
}
|
|
1766
|
+
function getRoundingMethod(method) {
|
|
1767
|
+
return (number) => {
|
|
1768
|
+
const round = method ? Math[method] : Math.trunc;
|
|
1769
|
+
const result = round(number);
|
|
1770
|
+
return result === 0 ? 0 : result;
|
|
1771
|
+
};
|
|
1772
|
+
}
|
|
1773
|
+
function differenceInMilliseconds(laterDate, earlierDate) {
|
|
1774
|
+
return +toDate(laterDate) - +toDate(earlierDate);
|
|
1775
|
+
}
|
|
1776
|
+
function differenceInSeconds(laterDate, earlierDate, options) {
|
|
1777
|
+
const diff = differenceInMilliseconds(laterDate, earlierDate) / 1e3;
|
|
1778
|
+
return getRoundingMethod(options?.roundingMethod)(diff);
|
|
1779
|
+
}
|
|
1780
|
+
function formatDistance2(laterDate, earlierDate, options) {
|
|
1781
|
+
const defaultOptions2 = getDefaultOptions();
|
|
1782
|
+
const locale = options?.locale ?? defaultOptions2.locale ?? enUS;
|
|
1783
|
+
const minutesInAlmostTwoDays = 2520;
|
|
1784
|
+
const comparison = compareAsc(laterDate, earlierDate);
|
|
1785
|
+
if (isNaN(comparison)) throw new RangeError("Invalid time value");
|
|
1786
|
+
const localizeOptions = Object.assign({}, options, {
|
|
1787
|
+
addSuffix: options?.addSuffix,
|
|
1788
|
+
comparison
|
|
1789
|
+
});
|
|
1790
|
+
const [laterDate_, earlierDate_] = normalizeDates(
|
|
1791
|
+
options?.in,
|
|
1792
|
+
...comparison > 0 ? [earlierDate, laterDate] : [laterDate, earlierDate]
|
|
1793
|
+
);
|
|
1794
|
+
const seconds = differenceInSeconds(earlierDate_, laterDate_);
|
|
1795
|
+
const offsetInSeconds = (getTimezoneOffsetInMilliseconds(earlierDate_) - getTimezoneOffsetInMilliseconds(laterDate_)) / 1e3;
|
|
1796
|
+
const minutes = Math.round((seconds - offsetInSeconds) / 60);
|
|
1797
|
+
let months;
|
|
1798
|
+
if (minutes < 2) {
|
|
1799
|
+
if (options?.includeSeconds) {
|
|
1800
|
+
if (seconds < 5) {
|
|
1801
|
+
return locale.formatDistance("lessThanXSeconds", 5, localizeOptions);
|
|
1802
|
+
} else if (seconds < 10) {
|
|
1803
|
+
return locale.formatDistance("lessThanXSeconds", 10, localizeOptions);
|
|
1804
|
+
} else if (seconds < 20) {
|
|
1805
|
+
return locale.formatDistance("lessThanXSeconds", 20, localizeOptions);
|
|
1806
|
+
} else if (seconds < 40) {
|
|
1807
|
+
return locale.formatDistance("halfAMinute", 0, localizeOptions);
|
|
1808
|
+
} else if (seconds < 60) {
|
|
1809
|
+
return locale.formatDistance("lessThanXMinutes", 1, localizeOptions);
|
|
1810
|
+
} else {
|
|
1811
|
+
return locale.formatDistance("xMinutes", 1, localizeOptions);
|
|
1812
|
+
}
|
|
2078
1813
|
} else {
|
|
2079
|
-
|
|
1814
|
+
if (minutes === 0) {
|
|
1815
|
+
return locale.formatDistance("lessThanXMinutes", 1, localizeOptions);
|
|
1816
|
+
} else {
|
|
1817
|
+
return locale.formatDistance("xMinutes", minutes, localizeOptions);
|
|
1818
|
+
}
|
|
2080
1819
|
}
|
|
1820
|
+
} else if (minutes < 45) {
|
|
1821
|
+
return locale.formatDistance("xMinutes", minutes, localizeOptions);
|
|
1822
|
+
} else if (minutes < 90) {
|
|
1823
|
+
return locale.formatDistance("aboutXHours", 1, localizeOptions);
|
|
1824
|
+
} else if (minutes < minutesInDay) {
|
|
1825
|
+
const hours = Math.round(minutes / 60);
|
|
1826
|
+
return locale.formatDistance("aboutXHours", hours, localizeOptions);
|
|
1827
|
+
} else if (minutes < minutesInAlmostTwoDays) {
|
|
1828
|
+
return locale.formatDistance("xDays", 1, localizeOptions);
|
|
1829
|
+
} else if (minutes < minutesInMonth) {
|
|
1830
|
+
const days = Math.round(minutes / minutesInDay);
|
|
1831
|
+
return locale.formatDistance("xDays", days, localizeOptions);
|
|
1832
|
+
} else if (minutes < minutesInMonth * 2) {
|
|
1833
|
+
months = Math.round(minutes / minutesInMonth);
|
|
1834
|
+
return locale.formatDistance("aboutXMonths", months, localizeOptions);
|
|
2081
1835
|
}
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
const
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
long: "MMMM do, y",
|
|
2094
|
-
medium: "MMM d, y",
|
|
2095
|
-
short: "MM/dd/yyyy"
|
|
2096
|
-
};
|
|
2097
|
-
var timeFormats = {
|
|
2098
|
-
full: "h:mm:ss a zzzz",
|
|
2099
|
-
long: "h:mm:ss a z",
|
|
2100
|
-
medium: "h:mm:ss a",
|
|
2101
|
-
short: "h:mm a"
|
|
2102
|
-
};
|
|
2103
|
-
var dateTimeFormats = {
|
|
2104
|
-
full: "{{date}} 'at' {{time}}",
|
|
2105
|
-
long: "{{date}} 'at' {{time}}",
|
|
2106
|
-
medium: "{{date}}, {{time}}",
|
|
2107
|
-
short: "{{date}}, {{time}}"
|
|
2108
|
-
};
|
|
2109
|
-
var formatLong = {
|
|
2110
|
-
date: buildFormatLongFn({
|
|
2111
|
-
formats: dateFormats,
|
|
2112
|
-
defaultWidth: "full"
|
|
2113
|
-
}),
|
|
2114
|
-
time: buildFormatLongFn({
|
|
2115
|
-
formats: timeFormats,
|
|
2116
|
-
defaultWidth: "full"
|
|
2117
|
-
}),
|
|
2118
|
-
dateTime: buildFormatLongFn({
|
|
2119
|
-
formats: dateTimeFormats,
|
|
2120
|
-
defaultWidth: "full"
|
|
2121
|
-
})
|
|
2122
|
-
};
|
|
2123
|
-
var formatRelativeLocale = {
|
|
2124
|
-
lastWeek: "'last' eeee 'at' p",
|
|
2125
|
-
yesterday: "'yesterday at' p",
|
|
2126
|
-
today: "'today at' p",
|
|
2127
|
-
tomorrow: "'tomorrow at' p",
|
|
2128
|
-
nextWeek: "eeee 'at' p",
|
|
2129
|
-
other: "P"
|
|
2130
|
-
};
|
|
2131
|
-
var formatRelative = (token, _date, _baseDate, _options) => formatRelativeLocale[token];
|
|
2132
|
-
function buildLocalizeFn(args) {
|
|
2133
|
-
return (value, options) => {
|
|
2134
|
-
const context = options?.context ? String(options.context) : "standalone";
|
|
2135
|
-
let valuesArray;
|
|
2136
|
-
if (context === "formatting" && args.formattingValues) {
|
|
2137
|
-
const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
2138
|
-
const width = options?.width ? String(options.width) : defaultWidth;
|
|
2139
|
-
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
1836
|
+
months = differenceInMonths(earlierDate_, laterDate_);
|
|
1837
|
+
if (months < 12) {
|
|
1838
|
+
const nearestMonth = Math.round(minutes / minutesInMonth);
|
|
1839
|
+
return locale.formatDistance("xMonths", nearestMonth, localizeOptions);
|
|
1840
|
+
} else {
|
|
1841
|
+
const monthsSinceStartOfYear = months % 12;
|
|
1842
|
+
const years = Math.trunc(months / 12);
|
|
1843
|
+
if (monthsSinceStartOfYear < 3) {
|
|
1844
|
+
return locale.formatDistance("aboutXYears", years, localizeOptions);
|
|
1845
|
+
} else if (monthsSinceStartOfYear < 9) {
|
|
1846
|
+
return locale.formatDistance("overXYears", years, localizeOptions);
|
|
2140
1847
|
} else {
|
|
2141
|
-
|
|
2142
|
-
const width = options?.width ? String(options.width) : args.defaultWidth;
|
|
2143
|
-
valuesArray = args.values[width] || args.values[defaultWidth];
|
|
1848
|
+
return locale.formatDistance("almostXYears", years + 1, localizeOptions);
|
|
2144
1849
|
}
|
|
2145
|
-
|
|
2146
|
-
|
|
1850
|
+
}
|
|
1851
|
+
}
|
|
1852
|
+
function formatDistanceToNow2(date, options) {
|
|
1853
|
+
return formatDistance2(date, constructNow(date), options);
|
|
1854
|
+
}
|
|
1855
|
+
var getLogFn = (logLevel = LogLevel2.INFO, config = {}, options = {}) => {
|
|
1856
|
+
const {
|
|
1857
|
+
chalk: _chalk = getChalk(),
|
|
1858
|
+
fullDateTime = false,
|
|
1859
|
+
hideDateTime = false
|
|
1860
|
+
} = options;
|
|
1861
|
+
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;
|
|
1862
|
+
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel2.INFO;
|
|
1863
|
+
if (logLevel > getLogLevel2(configLogLevel) || logLevel <= LogLevel2.SILENT || getLogLevel2(configLogLevel) <= LogLevel2.SILENT) {
|
|
1864
|
+
return (_3) => {
|
|
1865
|
+
};
|
|
1866
|
+
}
|
|
1867
|
+
if (typeof logLevel === "number" && LogLevel2.FATAL >= logLevel) {
|
|
1868
|
+
return (message) => {
|
|
1869
|
+
console.error(
|
|
1870
|
+
`
|
|
1871
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.fatal ?? DEFAULT_COLOR_CONFIG.dark.fatal)(
|
|
1872
|
+
`[${CONSOLE_ICONS2[LogLevelLabel2.FATAL]} Fatal] `
|
|
1873
|
+
)}${_chalk.bold.whiteBright(formatLogMessage2(message))}
|
|
1874
|
+
`
|
|
1875
|
+
);
|
|
1876
|
+
};
|
|
1877
|
+
}
|
|
1878
|
+
if (typeof logLevel === "number" && LogLevel2.ERROR >= logLevel) {
|
|
1879
|
+
return (message) => {
|
|
1880
|
+
console.error(
|
|
1881
|
+
`
|
|
1882
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.danger ?? DEFAULT_COLOR_CONFIG.dark.danger)(
|
|
1883
|
+
`[${CONSOLE_ICONS2[LogLevelLabel2.ERROR]} Error] `
|
|
1884
|
+
)}${_chalk.bold.whiteBright(formatLogMessage2(message))}
|
|
1885
|
+
`
|
|
1886
|
+
);
|
|
1887
|
+
};
|
|
1888
|
+
}
|
|
1889
|
+
if (typeof logLevel === "number" && LogLevel2.WARN >= logLevel) {
|
|
1890
|
+
return (message) => {
|
|
1891
|
+
console.warn(
|
|
1892
|
+
`
|
|
1893
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.warning ?? DEFAULT_COLOR_CONFIG.dark.warning)(
|
|
1894
|
+
`[${CONSOLE_ICONS2[LogLevelLabel2.WARN]} Warn] `
|
|
1895
|
+
)}${_chalk.bold.whiteBright(formatLogMessage2(message))}
|
|
1896
|
+
`
|
|
1897
|
+
);
|
|
1898
|
+
};
|
|
1899
|
+
}
|
|
1900
|
+
if (typeof logLevel === "number" && LogLevel2.SUCCESS >= logLevel) {
|
|
1901
|
+
return (message) => {
|
|
1902
|
+
console.info(
|
|
1903
|
+
`
|
|
1904
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.success ?? DEFAULT_COLOR_CONFIG.dark.success)(
|
|
1905
|
+
`[${CONSOLE_ICONS2[LogLevelLabel2.SUCCESS]} Success] `
|
|
1906
|
+
)}${_chalk.bold.whiteBright(formatLogMessage2(message))}
|
|
1907
|
+
`
|
|
1908
|
+
);
|
|
1909
|
+
};
|
|
1910
|
+
}
|
|
1911
|
+
if (typeof logLevel === "number" && LogLevel2.INFO >= logLevel) {
|
|
1912
|
+
return (message) => {
|
|
1913
|
+
console.info(
|
|
1914
|
+
`
|
|
1915
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.info ?? DEFAULT_COLOR_CONFIG.dark.info)(
|
|
1916
|
+
`[${CONSOLE_ICONS2[LogLevelLabel2.INFO]} Info] `
|
|
1917
|
+
)}${_chalk.bold.whiteBright(formatLogMessage2(message))}
|
|
1918
|
+
`
|
|
1919
|
+
);
|
|
1920
|
+
};
|
|
1921
|
+
}
|
|
1922
|
+
if (typeof logLevel === "number" && LogLevel2.PERFORMANCE >= logLevel) {
|
|
1923
|
+
return (message) => {
|
|
1924
|
+
console.debug(
|
|
1925
|
+
`
|
|
1926
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.performance ?? DEFAULT_COLOR_CONFIG.dark.performance)(
|
|
1927
|
+
`[${CONSOLE_ICONS2[LogLevelLabel2.PERFORMANCE]} Performance] `
|
|
1928
|
+
)}${_chalk.bold.whiteBright(formatLogMessage2(message))}
|
|
1929
|
+
`
|
|
1930
|
+
);
|
|
1931
|
+
};
|
|
1932
|
+
}
|
|
1933
|
+
if (typeof logLevel === "number" && LogLevel2.DEBUG >= logLevel) {
|
|
1934
|
+
return (message) => {
|
|
1935
|
+
console.debug(
|
|
1936
|
+
`
|
|
1937
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.debug ?? DEFAULT_COLOR_CONFIG.dark.debug)(
|
|
1938
|
+
`[${CONSOLE_ICONS2[LogLevelLabel2.DEBUG]} Debug] `
|
|
1939
|
+
)}${_chalk.bold.whiteBright(formatLogMessage2(message))}
|
|
1940
|
+
`
|
|
1941
|
+
);
|
|
1942
|
+
};
|
|
1943
|
+
}
|
|
1944
|
+
if (typeof logLevel === "number" && LogLevel2.TRACE >= logLevel) {
|
|
1945
|
+
return (message) => {
|
|
1946
|
+
console.debug(
|
|
1947
|
+
`
|
|
1948
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex("#bbbbbb")(
|
|
1949
|
+
`[${CONSOLE_ICONS2[LogLevelLabel2.TRACE]} Trace] `
|
|
1950
|
+
)}${_chalk.bold.whiteBright(formatLogMessage2(message))}
|
|
1951
|
+
`
|
|
1952
|
+
);
|
|
1953
|
+
};
|
|
1954
|
+
}
|
|
1955
|
+
return (message) => {
|
|
1956
|
+
console.log(
|
|
1957
|
+
`
|
|
1958
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.brand ?? DEFAULT_COLOR_CONFIG.dark.brand)(
|
|
1959
|
+
`[${CONSOLE_ICONS2[LogLevelLabel2.ALL]} System] `
|
|
1960
|
+
)}${_chalk.bold.whiteBright(formatLogMessage2(message))}
|
|
1961
|
+
`
|
|
1962
|
+
);
|
|
2147
1963
|
};
|
|
2148
|
-
}
|
|
2149
|
-
var eraValues = {
|
|
2150
|
-
narrow: ["B", "A"],
|
|
2151
|
-
abbreviated: ["BC", "AD"],
|
|
2152
|
-
wide: ["Before Christ", "Anno Domini"]
|
|
2153
|
-
};
|
|
2154
|
-
var quarterValues = {
|
|
2155
|
-
narrow: ["1", "2", "3", "4"],
|
|
2156
|
-
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
2157
|
-
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
2158
|
-
};
|
|
2159
|
-
var monthValues = {
|
|
2160
|
-
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
2161
|
-
abbreviated: [
|
|
2162
|
-
"Jan",
|
|
2163
|
-
"Feb",
|
|
2164
|
-
"Mar",
|
|
2165
|
-
"Apr",
|
|
2166
|
-
"May",
|
|
2167
|
-
"Jun",
|
|
2168
|
-
"Jul",
|
|
2169
|
-
"Aug",
|
|
2170
|
-
"Sep",
|
|
2171
|
-
"Oct",
|
|
2172
|
-
"Nov",
|
|
2173
|
-
"Dec"
|
|
2174
|
-
],
|
|
2175
|
-
wide: [
|
|
2176
|
-
"January",
|
|
2177
|
-
"February",
|
|
2178
|
-
"March",
|
|
2179
|
-
"April",
|
|
2180
|
-
"May",
|
|
2181
|
-
"June",
|
|
2182
|
-
"July",
|
|
2183
|
-
"August",
|
|
2184
|
-
"September",
|
|
2185
|
-
"October",
|
|
2186
|
-
"November",
|
|
2187
|
-
"December"
|
|
2188
|
-
]
|
|
2189
1964
|
};
|
|
2190
|
-
var
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
1965
|
+
var writeWarning2 = (message, config) => getLogFn(LogLevel2.WARN, config)(message);
|
|
1966
|
+
var writePerformance = (message, config) => getLogFn(LogLevel2.PERFORMANCE, config)(message);
|
|
1967
|
+
var writeDebug2 = (message, config) => getLogFn(LogLevel2.DEBUG, config)(message);
|
|
1968
|
+
var writeTrace2 = (message, config) => getLogFn(LogLevel2.TRACE, config)(message);
|
|
1969
|
+
var getStopwatch = (name) => {
|
|
1970
|
+
const start = /* @__PURE__ */ new Date();
|
|
1971
|
+
return () => {
|
|
1972
|
+
writePerformance(
|
|
1973
|
+
`The${name ? ` ${name}` : ""} process took ${formatDistanceToNow2(start, {
|
|
1974
|
+
includeSeconds: true
|
|
1975
|
+
})} to complete`
|
|
1976
|
+
);
|
|
1977
|
+
};
|
|
2203
1978
|
};
|
|
2204
|
-
var
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
midnight: "mi",
|
|
2209
|
-
noon: "n",
|
|
2210
|
-
morning: "morning",
|
|
2211
|
-
afternoon: "afternoon",
|
|
2212
|
-
evening: "evening",
|
|
2213
|
-
night: "night"
|
|
2214
|
-
},
|
|
2215
|
-
abbreviated: {
|
|
2216
|
-
am: "AM",
|
|
2217
|
-
pm: "PM",
|
|
2218
|
-
midnight: "midnight",
|
|
2219
|
-
noon: "noon",
|
|
2220
|
-
morning: "morning",
|
|
2221
|
-
afternoon: "afternoon",
|
|
2222
|
-
evening: "evening",
|
|
2223
|
-
night: "night"
|
|
2224
|
-
},
|
|
2225
|
-
wide: {
|
|
2226
|
-
am: "a.m.",
|
|
2227
|
-
pm: "p.m.",
|
|
2228
|
-
midnight: "midnight",
|
|
2229
|
-
noon: "noon",
|
|
2230
|
-
morning: "morning",
|
|
2231
|
-
afternoon: "afternoon",
|
|
2232
|
-
evening: "evening",
|
|
2233
|
-
night: "night"
|
|
1979
|
+
var MAX_DEPTH = 10;
|
|
1980
|
+
var formatLogMessage2 = (message, options = {}, depth2 = 0) => {
|
|
1981
|
+
if (depth2 > MAX_DEPTH) {
|
|
1982
|
+
return "<max depth>";
|
|
2234
1983
|
}
|
|
1984
|
+
const prefix = options.prefix ?? "";
|
|
1985
|
+
const skip = options.skip ?? [];
|
|
1986
|
+
const sort = options.sort ?? true;
|
|
1987
|
+
return typeof message === "undefined" || message === null ? "<empty>" : typeof message === "string" ? !message ? "<empty string>" : message : Array.isArray(message) ? `
|
|
1988
|
+
${message.sort(
|
|
1989
|
+
sort ? (a3, b2) => !a3 && !b2 ? 0 : !a3 ? 1 : !b2 ? -1 : String(a3).localeCompare(String(b2)) : void 0
|
|
1990
|
+
).map(
|
|
1991
|
+
(item, index) => ` ${prefix}> #${index} = ${formatLogMessage2(
|
|
1992
|
+
item,
|
|
1993
|
+
{ prefix: `${prefix}--`, skip, sort },
|
|
1994
|
+
depth2 + 1
|
|
1995
|
+
)}`
|
|
1996
|
+
).join("\n")}` : typeof message === "object" && message ? `
|
|
1997
|
+
${Object.keys(message).filter(
|
|
1998
|
+
(key) => typeof key !== "string" || !skip.map((k2) => k2.toLowerCase().trim()).includes(key.toLowerCase().trim())
|
|
1999
|
+
).sort(
|
|
2000
|
+
sort ? (a3, b2) => !a3 && !b2 ? 0 : !a3 ? 1 : !b2 ? -1 : String(a3).localeCompare(String(b2)) : void 0
|
|
2001
|
+
).map(
|
|
2002
|
+
(key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" && message[key] ? Object.keys(message[key]).filter(
|
|
2003
|
+
(key2) => typeof key2 !== "string" || !skip.map((k2) => k2.toLowerCase().trim()).includes(key2.toLowerCase().trim())
|
|
2004
|
+
).length === 0 ? "{}" : formatLogMessage2(
|
|
2005
|
+
message[key],
|
|
2006
|
+
{ prefix: `${prefix}--`, skip, sort },
|
|
2007
|
+
depth2 + 1
|
|
2008
|
+
) : message[key]}`
|
|
2009
|
+
).join("\n")}` : String(message);
|
|
2235
2010
|
};
|
|
2236
|
-
var
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
noon: "n",
|
|
2242
|
-
morning: "in the morning",
|
|
2243
|
-
afternoon: "in the afternoon",
|
|
2244
|
-
evening: "in the evening",
|
|
2245
|
-
night: "at night"
|
|
2246
|
-
},
|
|
2247
|
-
abbreviated: {
|
|
2248
|
-
am: "AM",
|
|
2249
|
-
pm: "PM",
|
|
2250
|
-
midnight: "midnight",
|
|
2251
|
-
noon: "noon",
|
|
2252
|
-
morning: "in the morning",
|
|
2253
|
-
afternoon: "in the afternoon",
|
|
2254
|
-
evening: "in the evening",
|
|
2255
|
-
night: "at night"
|
|
2256
|
-
},
|
|
2257
|
-
wide: {
|
|
2258
|
-
am: "a.m.",
|
|
2259
|
-
pm: "p.m.",
|
|
2260
|
-
midnight: "midnight",
|
|
2261
|
-
noon: "noon",
|
|
2262
|
-
morning: "in the morning",
|
|
2263
|
-
afternoon: "in the afternoon",
|
|
2264
|
-
evening: "in the evening",
|
|
2265
|
-
night: "at night"
|
|
2011
|
+
var _isFunction = (value) => {
|
|
2012
|
+
try {
|
|
2013
|
+
return value instanceof Function || typeof value === "function" || !!(value?.constructor && value?.call && value?.apply);
|
|
2014
|
+
} catch {
|
|
2015
|
+
return false;
|
|
2266
2016
|
}
|
|
2267
2017
|
};
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2018
|
+
|
|
2019
|
+
// ../config-tools/dist/chunk-KVJGV2WN.js
|
|
2020
|
+
import { loadConfig as loadConfig2 } from "c12";
|
|
2021
|
+
import defu3 from "defu";
|
|
2022
|
+
var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
2023
|
+
const workspacePath = filePath || findWorkspaceRoot2(filePath);
|
|
2024
|
+
const configs = await Promise.all([
|
|
2025
|
+
loadConfig2({
|
|
2026
|
+
cwd: workspacePath,
|
|
2027
|
+
packageJson: true,
|
|
2028
|
+
name: fileName,
|
|
2029
|
+
envName: fileName?.toUpperCase(),
|
|
2030
|
+
jitiOptions: {
|
|
2031
|
+
debug: false,
|
|
2032
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths2(
|
|
2033
|
+
process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
|
|
2034
|
+
"jiti"
|
|
2035
|
+
)
|
|
2036
|
+
},
|
|
2037
|
+
...options
|
|
2038
|
+
}),
|
|
2039
|
+
loadConfig2({
|
|
2040
|
+
cwd: workspacePath,
|
|
2041
|
+
packageJson: true,
|
|
2042
|
+
name: fileName,
|
|
2043
|
+
envName: fileName?.toUpperCase(),
|
|
2044
|
+
jitiOptions: {
|
|
2045
|
+
debug: false,
|
|
2046
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths2(
|
|
2047
|
+
process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
|
|
2048
|
+
"jiti"
|
|
2049
|
+
)
|
|
2050
|
+
},
|
|
2051
|
+
configFile: fileName,
|
|
2052
|
+
...options
|
|
2053
|
+
})
|
|
2054
|
+
]);
|
|
2055
|
+
return defu3(configs[0] ?? {}, configs[1] ?? {});
|
|
2056
|
+
};
|
|
2057
|
+
var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
2058
|
+
const workspacePath = filePath ? filePath : findWorkspaceRoot2(filePath);
|
|
2059
|
+
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
2060
|
+
let config = result.config;
|
|
2061
|
+
const configFile = result.configFile;
|
|
2062
|
+
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
2063
|
+
writeTrace2(
|
|
2064
|
+
`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
|
|
2065
|
+
{
|
|
2066
|
+
logLevel: "all"
|
|
2067
|
+
}
|
|
2068
|
+
);
|
|
2069
|
+
}
|
|
2070
|
+
if (additionalFileNames && additionalFileNames.length > 0) {
|
|
2071
|
+
const results = await Promise.all(
|
|
2072
|
+
additionalFileNames.map(
|
|
2073
|
+
(fileName) => getConfigFileByName(fileName, workspacePath)
|
|
2074
|
+
)
|
|
2075
|
+
);
|
|
2076
|
+
for (const result2 of results) {
|
|
2077
|
+
if (result2?.config && result2?.configFile && Object.keys(result2.config).length > 0) {
|
|
2078
|
+
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
2079
|
+
writeTrace2(
|
|
2080
|
+
`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
|
|
2081
|
+
{
|
|
2082
|
+
logLevel: "all"
|
|
2083
|
+
}
|
|
2084
|
+
);
|
|
2085
|
+
}
|
|
2086
|
+
config = defu3(result2.config ?? {}, config ?? {});
|
|
2087
|
+
}
|
|
2279
2088
|
}
|
|
2280
2089
|
}
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
values: eraValues,
|
|
2287
|
-
defaultWidth: "wide"
|
|
2288
|
-
}),
|
|
2289
|
-
quarter: buildLocalizeFn({
|
|
2290
|
-
values: quarterValues,
|
|
2291
|
-
defaultWidth: "wide",
|
|
2292
|
-
argumentCallback: (quarter) => quarter - 1
|
|
2293
|
-
}),
|
|
2294
|
-
month: buildLocalizeFn({
|
|
2295
|
-
values: monthValues,
|
|
2296
|
-
defaultWidth: "wide"
|
|
2297
|
-
}),
|
|
2298
|
-
day: buildLocalizeFn({
|
|
2299
|
-
values: dayValues,
|
|
2300
|
-
defaultWidth: "wide"
|
|
2301
|
-
}),
|
|
2302
|
-
dayPeriod: buildLocalizeFn({
|
|
2303
|
-
values: dayPeriodValues,
|
|
2304
|
-
defaultWidth: "wide",
|
|
2305
|
-
formattingValues: formattingDayPeriodValues,
|
|
2306
|
-
defaultFormattingWidth: "wide"
|
|
2307
|
-
})
|
|
2090
|
+
if (!config || Object.keys(config).length === 0) {
|
|
2091
|
+
return void 0;
|
|
2092
|
+
}
|
|
2093
|
+
config.configFile = configFile;
|
|
2094
|
+
return config;
|
|
2308
2095
|
};
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2096
|
+
|
|
2097
|
+
// ../config-tools/dist/chunk-RGET2UQV.js
|
|
2098
|
+
init_esm_shims();
|
|
2099
|
+
|
|
2100
|
+
// ../config/dist/index.js
|
|
2101
|
+
init_esm_shims();
|
|
2102
|
+
|
|
2103
|
+
// ../config/dist/chunk-5QIMO5EY.js
|
|
2104
|
+
init_esm_shims();
|
|
2105
|
+
|
|
2106
|
+
// ../config/dist/chunk-HPWJK4AX.js
|
|
2107
|
+
init_esm_shims();
|
|
2108
|
+
|
|
2109
|
+
// ../config/dist/chunk-TYDRIJER.js
|
|
2110
|
+
init_esm_shims();
|
|
2111
|
+
var s = "https://docs.stormsoftware.com";
|
|
2112
|
+
var r = "https://stormsoftware.com";
|
|
2113
|
+
var t = "https://stormsoftware.com/contact";
|
|
2114
|
+
var a = "https://stormsoftware.com/license";
|
|
2115
|
+
var i = "Apache-2.0";
|
|
2116
|
+
var o = "https://discord.gg/MQ6YVzakM5";
|
|
2117
|
+
var e = "https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA";
|
|
2118
|
+
var E = `
|
|
2119
|
+
Storm Software is an open source software development organization with the mission is to make software development more accessible. Our ideal future is one where anyone can create software without years of prior development experience serving as a barrier to entry. We hope to achieve this via LLMs, Generative AI, and intuitive, high-level data modeling/programming languages.
|
|
2120
|
+
|
|
2121
|
+
Join us on [Discord](${o}) to chat with the team, receive release notifications, ask questions, and get involved.
|
|
2122
|
+
|
|
2123
|
+
If this sounds interesting, and you would like to help us in creating the next generation of development tools, please reach out on our [website](${t}) or join our [Slack](${e}) channel!
|
|
2124
|
+
`;
|
|
2125
|
+
var S = "tools/errors/codes.json";
|
|
2126
|
+
var A = "The workspace's banner image";
|
|
2127
|
+
|
|
2128
|
+
// ../config/dist/chunk-HPWJK4AX.js
|
|
2129
|
+
import * as e2 from "zod/v4/mini";
|
|
2130
|
+
var o2 = e2.registry();
|
|
2131
|
+
var t2 = e2.string().check(e2.length(7), e2.toLowerCase(), e2.regex(/^#([0-9a-f]{3}){1,2}$/i), e2.trim());
|
|
2132
|
+
o2.add(t2, { description: "A base schema for describing the format of colors" });
|
|
2133
|
+
var a2 = e2._default(t2, "#151718");
|
|
2134
|
+
o2.add(a2, { description: "The dark background color of the workspace" });
|
|
2135
|
+
var c = e2._default(t2, "#cbd5e1");
|
|
2136
|
+
o2.add(c, { description: "The light background color of the workspace" });
|
|
2137
|
+
var i2 = e2._default(t2, "#1fb2a6");
|
|
2138
|
+
o2.add(i2, { description: "The primary brand specific color of the workspace" });
|
|
2139
|
+
var s2 = e2.optional(t2);
|
|
2140
|
+
o2.add(s2, { description: "The alternate brand specific color of the workspace" });
|
|
2141
|
+
var n = e2.optional(t2);
|
|
2142
|
+
o2.add(n, { description: "The secondary brand specific color of the workspace" });
|
|
2143
|
+
var d = e2._default(t2, "#3fa6ff");
|
|
2144
|
+
o2.add(d, { description: "The color used to display hyperlink text" });
|
|
2145
|
+
var p = e2._default(t2, "#818cf8");
|
|
2146
|
+
o2.add(p, { description: "The second brand specific color of the workspace" });
|
|
2147
|
+
var h = e2._default(t2, "#45b27e");
|
|
2148
|
+
o2.add(h, { description: "The success color of the workspace" });
|
|
2149
|
+
var l = e2._default(t2, "#38bdf8");
|
|
2150
|
+
o2.add(l, { description: "The informational color of the workspace" });
|
|
2151
|
+
var m = e2._default(t2, "#8afafc");
|
|
2152
|
+
o2.add(m, { description: "The debug color of the workspace" });
|
|
2153
|
+
var z2 = e2._default(t2, "#f3d371");
|
|
2154
|
+
o2.add(z2, { description: "The warning color of the workspace" });
|
|
2155
|
+
var g = e2._default(t2, "#d8314a");
|
|
2156
|
+
o2.add(g, { description: "The danger color of the workspace" });
|
|
2157
|
+
var f = e2.optional(t2);
|
|
2158
|
+
o2.add(f, { description: "The fatal color of the workspace" });
|
|
2159
|
+
var u = e2._default(t2, "#80fd74");
|
|
2160
|
+
o2.add(u, { description: "The performance color of the workspace" });
|
|
2161
|
+
var k = e2._default(t2, "#4ade80");
|
|
2162
|
+
o2.add(k, { description: "The positive number color of the workspace" });
|
|
2163
|
+
var w = e2._default(t2, "#ef4444");
|
|
2164
|
+
o2.add(w, { description: "The negative number color of the workspace" });
|
|
2165
|
+
var S2 = e2.optional(e2.array(t2));
|
|
2166
|
+
o2.add(S2, { description: "The color stops for the base gradient color pattern used in the workspace" });
|
|
2167
|
+
var Re = e2.object({ foreground: c, background: a2, brand: i2, alternate: s2, accent: n, link: d, help: p, success: h, info: l, debug: m, warning: z2, danger: g, fatal: f, performance: u, positive: k, negative: w, gradient: S2 });
|
|
2168
|
+
var Ue = e2.object({ foreground: a2, background: c, brand: i2, alternate: s2, accent: n, link: d, help: p, success: h, info: l, debug: m, warning: z2, danger: g, fatal: f, performance: u, positive: k, negative: w, gradient: S2 });
|
|
2169
|
+
var De = e2.object({ dark: Re, light: Ue });
|
|
2170
|
+
var Be = e2.object({ dark: a2, light: c, brand: i2, alternate: s2, accent: n, link: d, help: p, success: h, info: l, debug: m, warning: z2, danger: g, fatal: f, performance: u, positive: k, negative: w, gradient: S2 });
|
|
2171
|
+
var r2 = e2.optional(e2.url());
|
|
2172
|
+
o2.add(r2, { description: "A remote registry URL used to publish distributable packages" });
|
|
2173
|
+
var y = e2._default(e2.object({ github: r2, npm: r2, cargo: r2, cyclone: r2, container: r2 }), {});
|
|
2174
|
+
o2.add(y, { description: "A list of remote registry URLs used by Storm Software" });
|
|
2175
|
+
var b = e2.union([Be, De]);
|
|
2176
|
+
o2.add(b, { description: "Colors used for various workspace elements" });
|
|
2177
|
+
var C = e2.record(e2.union([e2.union([e2.literal("base"), e2.string()]), e2.string()]), b);
|
|
2178
|
+
o2.add(C, { description: "Storm theme config values used for styling various package elements" });
|
|
2179
|
+
var _ = e2.optional(e2.union([e2.string().check(e2.trim()), e2.array(e2.string().check(e2.trim()))]));
|
|
2180
|
+
o2.add(_, { description: "The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration." });
|
|
2181
|
+
var L = e2.string().check(e2.trim());
|
|
2182
|
+
o2.add(L, { description: "The workspace bot user's name (this is the bot that will be used to perform various tasks)" });
|
|
2183
|
+
var j = e2.string().check(e2.trim());
|
|
2184
|
+
o2.add(j, { description: "The email of the workspace bot" });
|
|
2185
|
+
var A2 = e2.object({ name: L, email: j });
|
|
2186
|
+
o2.add(A2, { description: "The workspace's bot user's config used to automated various operations tasks" });
|
|
2187
|
+
var R = e2.optional(e2.string().check(e2.trim(), e2.url()));
|
|
2188
|
+
o2.add(R, { description: "A URL to a banner image used to display the workspace's release" });
|
|
2189
|
+
var U = e2._default(e2.string().check(e2.trim()), A);
|
|
2190
|
+
o2.add(U, { description: "The alt text for the workspace's release banner image" });
|
|
2191
|
+
var D = e2.object({ url: R, alt: U });
|
|
2192
|
+
o2.add(D, { description: "The workspace's banner image used during the release process" });
|
|
2193
|
+
var B = e2.optional(e2.string().check(e2.trim()));
|
|
2194
|
+
o2.add(B, { description: "A header message appended to the start of the workspace's release notes" });
|
|
2195
|
+
var F = e2.optional(e2.string().check(e2.trim()));
|
|
2196
|
+
o2.add(F, { description: "A footer message appended to the end of the workspace's release notes" });
|
|
2197
|
+
var N = e2.object({ banner: e2.union([D, e2.string().check(e2.trim(), e2.url())]), header: B, footer: F });
|
|
2198
|
+
o2.add(N, { description: "The workspace's release config used during the release process" });
|
|
2199
|
+
var E2 = e2.optional(e2.string().check(e2.trim()));
|
|
2200
|
+
o2.add(E2, { description: "A Twitter/X account associated with the organization/project" });
|
|
2201
|
+
var M = e2.optional(e2.string().check(e2.trim()));
|
|
2202
|
+
o2.add(M, { description: "A Discord account associated with the organization/project" });
|
|
2203
|
+
var O = e2.optional(e2.string().check(e2.trim()));
|
|
2204
|
+
o2.add(O, { description: "A Telegram account associated with the organization/project" });
|
|
2205
|
+
var I = e2.optional(e2.string().check(e2.trim()));
|
|
2206
|
+
o2.add(I, { description: "A Slack account associated with the organization/project" });
|
|
2207
|
+
var G = e2.optional(e2.string().check(e2.trim()));
|
|
2208
|
+
o2.add(G, { description: "A Medium account associated with the organization/project" });
|
|
2209
|
+
var H = e2.optional(e2.string().check(e2.trim()));
|
|
2210
|
+
o2.add(H, { description: "A GitHub account associated with the organization/project" });
|
|
2211
|
+
var J = e2.object({ twitter: E2, discord: M, telegram: O, slack: I, medium: G, github: H });
|
|
2212
|
+
o2.add(J, { description: "The workspace's account config used to store various social media links" });
|
|
2213
|
+
var W = e2.optional(e2.string().check(e2.trim()));
|
|
2214
|
+
o2.add(W, { description: "The directory used to store the environment's cached file data" });
|
|
2215
|
+
var P = e2.optional(e2.string().check(e2.trim()));
|
|
2216
|
+
o2.add(P, { description: "The directory used to store the environment's data files" });
|
|
2217
|
+
var $ = e2.optional(e2.string().check(e2.trim()));
|
|
2218
|
+
o2.add($, { description: "The directory used to store the environment's configuration files" });
|
|
2219
|
+
var V = e2.optional(e2.string().check(e2.trim()));
|
|
2220
|
+
o2.add(V, { description: "The directory used to store the environment's temp files" });
|
|
2221
|
+
var X = e2.optional(e2.string().check(e2.trim()));
|
|
2222
|
+
o2.add(X, { description: "The directory used to store the environment's log files" });
|
|
2223
|
+
var Y = e2._default(e2.string().check(e2.trim()), "dist");
|
|
2224
|
+
o2.add(Y, { description: "The directory used to store the workspace's distributable files after a build (relative to the workspace root)" });
|
|
2225
|
+
var q = e2.object({ cache: W, data: P, config: $, temp: V, log: X, build: Y });
|
|
2226
|
+
o2.add(q, { description: "Various directories used by the workspace to store data, cache, and configuration files" });
|
|
2227
|
+
var K = e2._default(e2.enum(["minimal", "monorepo"]), "monorepo");
|
|
2228
|
+
o2.add(K, { description: "The variant of the workspace. This can be used to enable or disable certain features or configurations." });
|
|
2229
|
+
var Q = e2._default(e2.string().check(e2.trim()), S);
|
|
2230
|
+
o2.add(Q, { description: "The path to the workspace's error codes JSON file" });
|
|
2231
|
+
var Z = e2.optional(e2.url());
|
|
2232
|
+
o2.add(Z, { description: "A URL to a page that looks up the workspace's error messages given a specific error code" });
|
|
2233
|
+
var ee = e2.object({ codesFile: Q, url: Z });
|
|
2234
|
+
o2.add(ee, { description: "The workspace's error config used when creating error details during a system error" });
|
|
2235
|
+
var oe = e2.optional(e2.string().check(e2.trim(), e2.toLowerCase()));
|
|
2236
|
+
o2.add(oe, { description: "The name of the organization" });
|
|
2237
|
+
var te = e2.optional(e2.string().check(e2.trim()));
|
|
2238
|
+
o2.add(te, { description: "A description of the organization" });
|
|
2239
|
+
var re = e2.optional(e2.url());
|
|
2240
|
+
o2.add(re, { description: "A URL to the organization's logo image" });
|
|
2241
|
+
var ae = e2.optional(e2.url());
|
|
2242
|
+
o2.add(ae, { description: "A URL to the organization's icon image" });
|
|
2243
|
+
var ce = e2.optional(e2.url());
|
|
2244
|
+
o2.add(ce, { description: "A URL to a page that provides more information about the organization" });
|
|
2245
|
+
var ie = e2.object({ name: oe, description: te, logo: re, icon: ae, url: ce });
|
|
2246
|
+
o2.add(ie, { description: "The workspace's organization details" });
|
|
2247
|
+
var se = e2._default(e2.string().check(e2.trim(), e2.toLowerCase()), "https://public.storm-cdn.com/schemas/storm-workspace.schema.json");
|
|
2248
|
+
o2.add(se, { description: "The URL or file path to the JSON schema file that describes the Storm configuration file" });
|
|
2249
|
+
var ne = e2.string().check(e2.trim(), e2.toLowerCase());
|
|
2250
|
+
o2.add(ne, { description: "The name of the workspace/project/service/package/scope using this configuration" });
|
|
2251
|
+
var de = e2.string().check(e2.trim(), e2.toLowerCase());
|
|
2252
|
+
o2.add(de, { description: "The namespace of the workspace/project/service/package/scope using this configuration" });
|
|
2253
|
+
var pe = e2.union([ie, e2.string().check(e2.trim(), e2.toLowerCase())]);
|
|
2254
|
+
o2.add(pe, { description: "The organization of the workspace. This can be a string or an object containing the organization's details" });
|
|
2255
|
+
var he = e2.string().check(e2.trim(), e2.toLowerCase());
|
|
2256
|
+
o2.add(he, { description: "The repo URL of the workspace (i.e. the GitHub repository URL)" });
|
|
2257
|
+
var le = e2._default(e2.string().check(e2.trim()), "Apache-2.0");
|
|
2258
|
+
o2.add(le, { description: "The license type of the package" });
|
|
2259
|
+
var me = e2.optional(e2.url());
|
|
2260
|
+
o2.add(me, { description: "The homepage of the workspace" });
|
|
2261
|
+
var ze = e2.optional(e2.url());
|
|
2262
|
+
o2.add(ze, { description: "The documentation site for the workspace" });
|
|
2263
|
+
var ge = e2.optional(e2.url());
|
|
2264
|
+
o2.add(ge, { description: "The development portal site for the workspace" });
|
|
2265
|
+
var fe = e2.optional(e2.url());
|
|
2266
|
+
o2.add(fe, { description: "The licensing site for the workspace" });
|
|
2267
|
+
var ue = e2.optional(e2.url());
|
|
2268
|
+
o2.add(ue, { description: "The contact site for the workspace" });
|
|
2269
|
+
var ke = e2.optional(e2.url());
|
|
2270
|
+
o2.add(ke, { description: "The support site for the workspace. If not provided, this is defaulted to the `contact` config value" });
|
|
2271
|
+
var we = e2._default(e2.string().check(e2.trim(), e2.toLowerCase()), "main");
|
|
2272
|
+
o2.add(we, { description: "The branch of the workspace" });
|
|
2273
|
+
var Se = e2.optional(e2.string().check(e2.trim(), e2.toLowerCase()));
|
|
2274
|
+
o2.add(Se, { description: "A tag specifying the version pre-release identifier" });
|
|
2275
|
+
var be = e2.optional(e2.string().check(e2.trim(), e2.toLowerCase()));
|
|
2276
|
+
o2.add(be, { description: "The owner of the package" });
|
|
2277
|
+
var xe = e2._default(e2.enum(["development", "test", "production"]).check(e2.trim(), e2.toLowerCase()), "production");
|
|
2278
|
+
o2.add(xe, { description: "The current runtime environment mode for the package" });
|
|
2279
|
+
var Te = e2.string().check(e2.trim(), e2.toLowerCase());
|
|
2280
|
+
o2.add(Te, { description: "The root directory of the workspace" });
|
|
2281
|
+
var ve = e2._default(e2.boolean(), false);
|
|
2282
|
+
o2.add(ve, { description: "Should all known types of workspace caching be skipped?" });
|
|
2283
|
+
var ye = e2._default(e2.enum(["npm", "yarn", "pnpm", "bun"]), "npm");
|
|
2284
|
+
o2.add(ye, { description: "The JavaScript/TypeScript package manager used by the repository" });
|
|
2285
|
+
var Ce = e2._default(e2.string().check(e2.trim()), "America/New_York");
|
|
2286
|
+
o2.add(Ce, { description: "The default timezone of the workspace" });
|
|
2287
|
+
var _e = e2._default(e2.string().check(e2.trim()), "en-US");
|
|
2288
|
+
o2.add(_e, { description: "The default locale of the workspace" });
|
|
2289
|
+
var Le = e2._default(e2.enum(["silent", "fatal", "error", "warn", "success", "info", "performance", "debug", "trace", "all"]), "info");
|
|
2290
|
+
o2.add(Le, { description: "The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)." });
|
|
2291
|
+
var je = e2._default(e2.boolean(), true);
|
|
2292
|
+
o2.add(je, { description: "Should the logging of the current Storm Workspace configuration be skipped?" });
|
|
2293
|
+
var Ae = e2._default(e2.nullable(e2.string().check(e2.trim())), null);
|
|
2294
|
+
o2.add(Ae, { description: "The filepath of the Storm config. When this field is null, no config file was found in the current workspace." });
|
|
2295
|
+
var x = e2._default(e2.record(e2.string(), e2.any()), {});
|
|
2296
|
+
o2.add(x, { description: "Configuration of each used extension" });
|
|
2297
|
+
var Ne = e2.object({ $schema: se, extends: _, name: ne, variant: K, namespace: de, organization: pe, repository: he, license: le, homepage: me, docs: ze, portal: ge, licensing: fe, contact: ue, support: ke, branch: we, preid: Se, owner: be, bot: A2, release: N, socials: J, error: ee, mode: xe, workspaceRoot: Te, skipCache: ve, directories: q, packageManager: ye, timezone: Ce, locale: _e, logLevel: Le, skipConfigLogging: je, registry: y, configFile: Ae, colors: e2.union([b, C]), extensions: x });
|
|
2298
|
+
o2.add(x, { description: "Storm Workspace config values used during various dev-ops processes. This type is a combination of the StormPackageConfig and StormProject types. It represents the config of the entire monorepo." });
|
|
2299
|
+
|
|
2300
|
+
// ../config/dist/chunk-YKRE3MWC.js
|
|
2301
|
+
init_esm_shims();
|
|
2302
|
+
var e3 = ["dark", "light", "base", "brand", "alternate", "accent", "link", "success", "help", "info", "warning", "danger", "fatal", "performance", "positive", "negative"];
|
|
2303
|
+
|
|
2304
|
+
// ../config-tools/dist/chunk-RGET2UQV.js
|
|
2305
|
+
import { existsSync as existsSync6 } from "node:fs";
|
|
2306
|
+
import { readFile as readFile5 } from "node:fs/promises";
|
|
2307
|
+
import { join as join4 } from "node:path";
|
|
2308
|
+
async function getPackageJsonConfig(root) {
|
|
2309
|
+
let license = i;
|
|
2310
|
+
let homepage = void 0;
|
|
2311
|
+
let support = void 0;
|
|
2312
|
+
let name = void 0;
|
|
2313
|
+
let namespace = void 0;
|
|
2314
|
+
let repository = void 0;
|
|
2315
|
+
const workspaceRoot = findWorkspaceRoot2(root);
|
|
2316
|
+
if (existsSync6(join4(workspaceRoot, "package.json"))) {
|
|
2317
|
+
const file = await readFile5(
|
|
2318
|
+
joinPaths2(workspaceRoot, "package.json"),
|
|
2319
|
+
"utf8"
|
|
2322
2320
|
);
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
}
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
}
|
|
2362
|
-
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
|
|
2363
|
-
var parseOrdinalNumberPattern = /\d+/i;
|
|
2364
|
-
var matchEraPatterns = {
|
|
2365
|
-
narrow: /^(b|a)/i,
|
|
2366
|
-
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
2367
|
-
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
2368
|
-
};
|
|
2369
|
-
var parseEraPatterns = {
|
|
2370
|
-
any: [/^b/i, /^(a|c)/i]
|
|
2371
|
-
};
|
|
2372
|
-
var matchQuarterPatterns = {
|
|
2373
|
-
narrow: /^[1234]/i,
|
|
2374
|
-
abbreviated: /^q[1234]/i,
|
|
2375
|
-
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
2376
|
-
};
|
|
2377
|
-
var parseQuarterPatterns = {
|
|
2378
|
-
any: [/1/i, /2/i, /3/i, /4/i]
|
|
2379
|
-
};
|
|
2380
|
-
var matchMonthPatterns = {
|
|
2381
|
-
narrow: /^[jfmasond]/i,
|
|
2382
|
-
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
2383
|
-
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
2384
|
-
};
|
|
2385
|
-
var parseMonthPatterns = {
|
|
2386
|
-
narrow: [
|
|
2387
|
-
/^j/i,
|
|
2388
|
-
/^f/i,
|
|
2389
|
-
/^m/i,
|
|
2390
|
-
/^a/i,
|
|
2391
|
-
/^m/i,
|
|
2392
|
-
/^j/i,
|
|
2393
|
-
/^j/i,
|
|
2394
|
-
/^a/i,
|
|
2395
|
-
/^s/i,
|
|
2396
|
-
/^o/i,
|
|
2397
|
-
/^n/i,
|
|
2398
|
-
/^d/i
|
|
2399
|
-
],
|
|
2400
|
-
any: [
|
|
2401
|
-
/^ja/i,
|
|
2402
|
-
/^f/i,
|
|
2403
|
-
/^mar/i,
|
|
2404
|
-
/^ap/i,
|
|
2405
|
-
/^may/i,
|
|
2406
|
-
/^jun/i,
|
|
2407
|
-
/^jul/i,
|
|
2408
|
-
/^au/i,
|
|
2409
|
-
/^s/i,
|
|
2410
|
-
/^o/i,
|
|
2411
|
-
/^n/i,
|
|
2412
|
-
/^d/i
|
|
2413
|
-
]
|
|
2414
|
-
};
|
|
2415
|
-
var matchDayPatterns = {
|
|
2416
|
-
narrow: /^[smtwf]/i,
|
|
2417
|
-
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
2418
|
-
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
2419
|
-
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
2420
|
-
};
|
|
2421
|
-
var parseDayPatterns = {
|
|
2422
|
-
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
2423
|
-
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
2424
|
-
};
|
|
2425
|
-
var matchDayPeriodPatterns = {
|
|
2426
|
-
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
2427
|
-
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
2428
|
-
};
|
|
2429
|
-
var parseDayPeriodPatterns = {
|
|
2430
|
-
any: {
|
|
2431
|
-
am: /^a/i,
|
|
2432
|
-
pm: /^p/i,
|
|
2433
|
-
midnight: /^mi/i,
|
|
2434
|
-
noon: /^no/i,
|
|
2435
|
-
morning: /morning/i,
|
|
2436
|
-
afternoon: /afternoon/i,
|
|
2437
|
-
evening: /evening/i,
|
|
2438
|
-
night: /night/i
|
|
2439
|
-
}
|
|
2440
|
-
};
|
|
2441
|
-
var match = {
|
|
2442
|
-
ordinalNumber: buildMatchPatternFn({
|
|
2443
|
-
matchPattern: matchOrdinalNumberPattern,
|
|
2444
|
-
parsePattern: parseOrdinalNumberPattern,
|
|
2445
|
-
valueCallback: (value) => parseInt(value, 10)
|
|
2446
|
-
}),
|
|
2447
|
-
era: buildMatchFn({
|
|
2448
|
-
matchPatterns: matchEraPatterns,
|
|
2449
|
-
defaultMatchWidth: "wide",
|
|
2450
|
-
parsePatterns: parseEraPatterns,
|
|
2451
|
-
defaultParseWidth: "any"
|
|
2452
|
-
}),
|
|
2453
|
-
quarter: buildMatchFn({
|
|
2454
|
-
matchPatterns: matchQuarterPatterns,
|
|
2455
|
-
defaultMatchWidth: "wide",
|
|
2456
|
-
parsePatterns: parseQuarterPatterns,
|
|
2457
|
-
defaultParseWidth: "any",
|
|
2458
|
-
valueCallback: (index) => index + 1
|
|
2459
|
-
}),
|
|
2460
|
-
month: buildMatchFn({
|
|
2461
|
-
matchPatterns: matchMonthPatterns,
|
|
2462
|
-
defaultMatchWidth: "wide",
|
|
2463
|
-
parsePatterns: parseMonthPatterns,
|
|
2464
|
-
defaultParseWidth: "any"
|
|
2465
|
-
}),
|
|
2466
|
-
day: buildMatchFn({
|
|
2467
|
-
matchPatterns: matchDayPatterns,
|
|
2468
|
-
defaultMatchWidth: "wide",
|
|
2469
|
-
parsePatterns: parseDayPatterns,
|
|
2470
|
-
defaultParseWidth: "any"
|
|
2471
|
-
}),
|
|
2472
|
-
dayPeriod: buildMatchFn({
|
|
2473
|
-
matchPatterns: matchDayPeriodPatterns,
|
|
2474
|
-
defaultMatchWidth: "any",
|
|
2475
|
-
parsePatterns: parseDayPeriodPatterns,
|
|
2476
|
-
defaultParseWidth: "any"
|
|
2477
|
-
})
|
|
2478
|
-
};
|
|
2479
|
-
var enUS = {
|
|
2480
|
-
code: "en-US",
|
|
2481
|
-
formatDistance,
|
|
2482
|
-
formatLong,
|
|
2483
|
-
formatRelative,
|
|
2484
|
-
localize,
|
|
2485
|
-
match,
|
|
2486
|
-
options: {
|
|
2487
|
-
weekStartsOn: 0,
|
|
2488
|
-
firstWeekContainsDate: 1
|
|
2489
|
-
}
|
|
2490
|
-
};
|
|
2491
|
-
var defaultOptions = {};
|
|
2492
|
-
function getDefaultOptions() {
|
|
2493
|
-
return defaultOptions;
|
|
2494
|
-
}
|
|
2495
|
-
function toDate(argument, context) {
|
|
2496
|
-
return constructFrom(context || argument, argument);
|
|
2497
|
-
}
|
|
2498
|
-
function getTimezoneOffsetInMilliseconds(date) {
|
|
2499
|
-
const _date = toDate(date);
|
|
2500
|
-
const utcDate = new Date(
|
|
2501
|
-
Date.UTC(
|
|
2502
|
-
_date.getFullYear(),
|
|
2503
|
-
_date.getMonth(),
|
|
2504
|
-
_date.getDate(),
|
|
2505
|
-
_date.getHours(),
|
|
2506
|
-
_date.getMinutes(),
|
|
2507
|
-
_date.getSeconds(),
|
|
2508
|
-
_date.getMilliseconds()
|
|
2509
|
-
)
|
|
2510
|
-
);
|
|
2511
|
-
utcDate.setUTCFullYear(_date.getFullYear());
|
|
2512
|
-
return +date - +utcDate;
|
|
2513
|
-
}
|
|
2514
|
-
function normalizeDates(context, ...dates) {
|
|
2515
|
-
const normalize = constructFrom.bind(
|
|
2516
|
-
null,
|
|
2517
|
-
context || dates.find((date) => typeof date === "object")
|
|
2518
|
-
);
|
|
2519
|
-
return dates.map(normalize);
|
|
2520
|
-
}
|
|
2521
|
-
function compareAsc(dateLeft, dateRight) {
|
|
2522
|
-
const diff = +toDate(dateLeft) - +toDate(dateRight);
|
|
2523
|
-
if (diff < 0) return -1;
|
|
2524
|
-
else if (diff > 0) return 1;
|
|
2525
|
-
return diff;
|
|
2526
|
-
}
|
|
2527
|
-
function differenceInCalendarMonths(laterDate, earlierDate, options) {
|
|
2528
|
-
const [laterDate_, earlierDate_] = normalizeDates(
|
|
2529
|
-
options?.in,
|
|
2530
|
-
laterDate,
|
|
2531
|
-
earlierDate
|
|
2532
|
-
);
|
|
2533
|
-
const yearsDiff = laterDate_.getFullYear() - earlierDate_.getFullYear();
|
|
2534
|
-
const monthsDiff = laterDate_.getMonth() - earlierDate_.getMonth();
|
|
2535
|
-
return yearsDiff * 12 + monthsDiff;
|
|
2536
|
-
}
|
|
2537
|
-
function endOfDay(date, options) {
|
|
2538
|
-
const _date = toDate(date, options?.in);
|
|
2539
|
-
_date.setHours(23, 59, 59, 999);
|
|
2540
|
-
return _date;
|
|
2541
|
-
}
|
|
2542
|
-
function endOfMonth(date, options) {
|
|
2543
|
-
const _date = toDate(date, options?.in);
|
|
2544
|
-
const month = _date.getMonth();
|
|
2545
|
-
_date.setFullYear(_date.getFullYear(), month + 1, 0);
|
|
2546
|
-
_date.setHours(23, 59, 59, 999);
|
|
2547
|
-
return _date;
|
|
2321
|
+
if (file) {
|
|
2322
|
+
const packageJson = JSON.parse(file);
|
|
2323
|
+
if (packageJson.name) {
|
|
2324
|
+
name = packageJson.name;
|
|
2325
|
+
}
|
|
2326
|
+
if (packageJson.namespace) {
|
|
2327
|
+
namespace = packageJson.namespace;
|
|
2328
|
+
}
|
|
2329
|
+
if (packageJson.repository) {
|
|
2330
|
+
if (typeof packageJson.repository === "string") {
|
|
2331
|
+
repository = packageJson.repository;
|
|
2332
|
+
} else if (packageJson.repository.url) {
|
|
2333
|
+
repository = packageJson.repository.url;
|
|
2334
|
+
}
|
|
2335
|
+
}
|
|
2336
|
+
if (packageJson.license) {
|
|
2337
|
+
license = packageJson.license;
|
|
2338
|
+
}
|
|
2339
|
+
if (packageJson.homepage) {
|
|
2340
|
+
homepage = packageJson.homepage;
|
|
2341
|
+
}
|
|
2342
|
+
if (packageJson.bugs) {
|
|
2343
|
+
if (typeof packageJson.bugs === "string") {
|
|
2344
|
+
support = packageJson.bugs;
|
|
2345
|
+
} else if (packageJson.bugs.url) {
|
|
2346
|
+
support = packageJson.bugs.url;
|
|
2347
|
+
}
|
|
2348
|
+
}
|
|
2349
|
+
}
|
|
2350
|
+
}
|
|
2351
|
+
return {
|
|
2352
|
+
workspaceRoot,
|
|
2353
|
+
name,
|
|
2354
|
+
namespace,
|
|
2355
|
+
repository,
|
|
2356
|
+
license,
|
|
2357
|
+
homepage,
|
|
2358
|
+
support
|
|
2359
|
+
};
|
|
2548
2360
|
}
|
|
2549
|
-
function
|
|
2550
|
-
|
|
2551
|
-
|
|
2361
|
+
function applyDefaultConfig(config) {
|
|
2362
|
+
if (!config.support && config.contact) {
|
|
2363
|
+
config.support = config.contact;
|
|
2364
|
+
}
|
|
2365
|
+
if (!config.contact && config.support) {
|
|
2366
|
+
config.contact = config.support;
|
|
2367
|
+
}
|
|
2368
|
+
if (config.homepage) {
|
|
2369
|
+
if (!config.docs) {
|
|
2370
|
+
config.docs = `${config.homepage}/docs`;
|
|
2371
|
+
}
|
|
2372
|
+
if (!config.license) {
|
|
2373
|
+
config.license = `${config.homepage}/license`;
|
|
2374
|
+
}
|
|
2375
|
+
if (!config.support) {
|
|
2376
|
+
config.support = `${config.homepage}/support`;
|
|
2377
|
+
}
|
|
2378
|
+
if (!config.contact) {
|
|
2379
|
+
config.contact = `${config.homepage}/contact`;
|
|
2380
|
+
}
|
|
2381
|
+
if (!config.error?.codesFile || !config?.error?.url) {
|
|
2382
|
+
config.error ??= { codesFile: S };
|
|
2383
|
+
if (config.homepage) {
|
|
2384
|
+
config.error.url ??= `${config.homepage}/errors`;
|
|
2385
|
+
}
|
|
2386
|
+
}
|
|
2387
|
+
}
|
|
2388
|
+
return config;
|
|
2552
2389
|
}
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2390
|
+
|
|
2391
|
+
// ../config-tools/dist/chunk-SDSQ2HHF.js
|
|
2392
|
+
init_esm_shims();
|
|
2393
|
+
var setExtensionEnv = (extensionName, extension) => {
|
|
2394
|
+
for (const key of Object.keys(extension ?? {})) {
|
|
2395
|
+
if (extension[key]) {
|
|
2396
|
+
const result = key?.replace(
|
|
2397
|
+
/([A-Z])+/g,
|
|
2398
|
+
(input) => input ? input[0]?.toUpperCase() + input.slice(1) : ""
|
|
2399
|
+
).split(/(?=[A-Z])|[.\-\s_]/).map((x2) => x2.toLowerCase()) ?? [];
|
|
2400
|
+
let extensionKey;
|
|
2401
|
+
if (result.length === 0) {
|
|
2402
|
+
return;
|
|
2403
|
+
}
|
|
2404
|
+
if (result.length === 1) {
|
|
2405
|
+
extensionKey = result[0]?.toUpperCase() ?? "";
|
|
2406
|
+
} else {
|
|
2407
|
+
extensionKey = result.reduce((ret, part) => {
|
|
2408
|
+
return `${ret}_${part.toLowerCase()}`;
|
|
2409
|
+
});
|
|
2410
|
+
}
|
|
2411
|
+
process.env[`STORM_EXTENSION_${extensionName.toUpperCase()}_${extensionKey.toUpperCase()}`] = extension[key];
|
|
2412
|
+
}
|
|
2413
|
+
}
|
|
2414
|
+
};
|
|
2415
|
+
var setConfigEnv = (config) => {
|
|
2416
|
+
const prefix = "STORM_";
|
|
2417
|
+
if (config.extends) {
|
|
2418
|
+
process.env[`${prefix}EXTENDS`] = Array.isArray(config.extends) ? JSON.stringify(config.extends) : config.extends;
|
|
2419
|
+
}
|
|
2420
|
+
if (config.name) {
|
|
2421
|
+
process.env[`${prefix}NAME`] = config.name;
|
|
2422
|
+
}
|
|
2423
|
+
if (config.variant) {
|
|
2424
|
+
process.env[`${prefix}VARIANT`] = config.variant;
|
|
2425
|
+
}
|
|
2426
|
+
if (config.namespace) {
|
|
2427
|
+
process.env[`${prefix}NAMESPACE`] = config.namespace;
|
|
2428
|
+
}
|
|
2429
|
+
if (config.owner) {
|
|
2430
|
+
process.env[`${prefix}OWNER`] = config.owner;
|
|
2431
|
+
}
|
|
2432
|
+
if (config.bot) {
|
|
2433
|
+
process.env[`${prefix}BOT_NAME`] = config.bot.name;
|
|
2434
|
+
process.env[`${prefix}BOT_EMAIL`] = config.bot.email;
|
|
2435
|
+
}
|
|
2436
|
+
if (config.error) {
|
|
2437
|
+
process.env[`${prefix}ERROR_CODES_FILE`] = config.error.codesFile;
|
|
2438
|
+
process.env[`${prefix}ERROR_URL`] = config.error.url;
|
|
2439
|
+
}
|
|
2440
|
+
if (config.release) {
|
|
2441
|
+
if (config.release.banner) {
|
|
2442
|
+
if (typeof config.release.banner === "string") {
|
|
2443
|
+
process.env[`${prefix}RELEASE_BANNER`] = config.release.banner;
|
|
2444
|
+
process.env[`${prefix}RELEASE_BANNER_URL`] = config.release.banner;
|
|
2445
|
+
} else {
|
|
2446
|
+
process.env[`${prefix}RELEASE_BANNER`] = config.release.banner.url;
|
|
2447
|
+
process.env[`${prefix}RELEASE_BANNER_URL`] = config.release.banner.url;
|
|
2448
|
+
process.env[`${prefix}RELEASE_BANNER_ALT`] = config.release.banner.alt;
|
|
2449
|
+
}
|
|
2450
|
+
}
|
|
2451
|
+
process.env[`${prefix}RELEASE_HEADER`] = config.release.header;
|
|
2452
|
+
process.env[`${prefix}RELEASE_FOOTER`] = config.release.footer;
|
|
2453
|
+
}
|
|
2454
|
+
if (config.socials) {
|
|
2455
|
+
if (config.socials.twitter) {
|
|
2456
|
+
process.env[`${prefix}SOCIAL_TWITTER`] = config.socials.twitter;
|
|
2457
|
+
}
|
|
2458
|
+
if (config.socials.discord) {
|
|
2459
|
+
process.env[`${prefix}SOCIAL_DISCORD`] = config.socials.discord;
|
|
2460
|
+
}
|
|
2461
|
+
if (config.socials.telegram) {
|
|
2462
|
+
process.env[`${prefix}SOCIAL_TELEGRAM`] = config.socials.telegram;
|
|
2463
|
+
}
|
|
2464
|
+
if (config.socials.slack) {
|
|
2465
|
+
process.env[`${prefix}SOCIAL_SLACK`] = config.socials.slack;
|
|
2466
|
+
}
|
|
2467
|
+
if (config.socials.medium) {
|
|
2468
|
+
process.env[`${prefix}SOCIAL_MEDIUM`] = config.socials.medium;
|
|
2469
|
+
}
|
|
2470
|
+
if (config.socials.github) {
|
|
2471
|
+
process.env[`${prefix}SOCIAL_GITHUB`] = config.socials.github;
|
|
2472
|
+
}
|
|
2473
|
+
}
|
|
2474
|
+
if (config.organization) {
|
|
2475
|
+
if (typeof config.organization === "string") {
|
|
2476
|
+
process.env[`${prefix}ORG`] = config.organization;
|
|
2477
|
+
process.env[`${prefix}ORG_NAME`] = config.organization;
|
|
2478
|
+
process.env[`${prefix}ORGANIZATION`] = config.organization;
|
|
2479
|
+
process.env[`${prefix}ORGANIZATION_NAME`] = config.organization;
|
|
2480
|
+
} else {
|
|
2481
|
+
process.env[`${prefix}ORG`] = config.organization.name;
|
|
2482
|
+
process.env[`${prefix}ORG_NAME`] = config.organization.name;
|
|
2483
|
+
process.env[`${prefix}ORGANIZATION`] = config.organization.name;
|
|
2484
|
+
process.env[`${prefix}ORGANIZATION_NAME`] = config.organization.name;
|
|
2485
|
+
if (config.organization.url) {
|
|
2486
|
+
process.env[`${prefix}ORG_URL`] = config.organization.url;
|
|
2487
|
+
process.env[`${prefix}ORGANIZATION_URL`] = config.organization.url;
|
|
2488
|
+
}
|
|
2489
|
+
if (config.organization.description) {
|
|
2490
|
+
process.env[`${prefix}ORG_DESCRIPTION`] = config.organization.description;
|
|
2491
|
+
process.env[`${prefix}ORGANIZATION_DESCRIPTION`] = config.organization.description;
|
|
2492
|
+
}
|
|
2493
|
+
if (config.organization.logo) {
|
|
2494
|
+
process.env[`${prefix}ORG_LOGO`] = config.organization.logo;
|
|
2495
|
+
process.env[`${prefix}ORGANIZATION_LOGO`] = config.organization.logo;
|
|
2496
|
+
}
|
|
2497
|
+
if (config.organization.icon) {
|
|
2498
|
+
process.env[`${prefix}ORG_ICON`] = config.organization.icon;
|
|
2499
|
+
process.env[`${prefix}ORGANIZATION_ICON`] = config.organization.icon;
|
|
2500
|
+
}
|
|
2501
|
+
}
|
|
2502
|
+
}
|
|
2503
|
+
if (config.packageManager) {
|
|
2504
|
+
process.env[`${prefix}PACKAGE_MANAGER`] = config.packageManager;
|
|
2505
|
+
}
|
|
2506
|
+
if (config.license) {
|
|
2507
|
+
process.env[`${prefix}LICENSE`] = config.license;
|
|
2508
|
+
}
|
|
2509
|
+
if (config.homepage) {
|
|
2510
|
+
process.env[`${prefix}HOMEPAGE`] = config.homepage;
|
|
2511
|
+
}
|
|
2512
|
+
if (config.docs) {
|
|
2513
|
+
process.env[`${prefix}DOCS`] = config.docs;
|
|
2514
|
+
}
|
|
2515
|
+
if (config.portal) {
|
|
2516
|
+
process.env[`${prefix}PORTAL`] = config.portal;
|
|
2517
|
+
}
|
|
2518
|
+
if (config.licensing) {
|
|
2519
|
+
process.env[`${prefix}LICENSING`] = config.licensing;
|
|
2520
|
+
}
|
|
2521
|
+
if (config.contact) {
|
|
2522
|
+
process.env[`${prefix}CONTACT`] = config.contact;
|
|
2523
|
+
}
|
|
2524
|
+
if (config.support) {
|
|
2525
|
+
process.env[`${prefix}SUPPORT`] = config.support;
|
|
2526
|
+
}
|
|
2527
|
+
if (config.timezone) {
|
|
2528
|
+
process.env[`${prefix}TIMEZONE`] = config.timezone;
|
|
2529
|
+
process.env.TZ = config.timezone;
|
|
2530
|
+
process.env.DEFAULT_TIMEZONE = config.timezone;
|
|
2531
|
+
process.env.TIMEZONE = config.timezone;
|
|
2532
|
+
}
|
|
2533
|
+
if (config.locale) {
|
|
2534
|
+
process.env[`${prefix}LOCALE`] = config.locale;
|
|
2535
|
+
process.env.DEFAULT_LOCALE = config.locale;
|
|
2536
|
+
process.env.LOCALE = config.locale;
|
|
2537
|
+
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
2538
|
+
}
|
|
2539
|
+
if (config.configFile) {
|
|
2540
|
+
process.env[`${prefix}WORKSPACE_CONFIG_FILE`] = correctPaths2(
|
|
2541
|
+
config.configFile
|
|
2542
|
+
);
|
|
2543
|
+
}
|
|
2544
|
+
if (config.workspaceRoot) {
|
|
2545
|
+
process.env[`${prefix}WORKSPACE_ROOT`] = correctPaths2(config.workspaceRoot);
|
|
2546
|
+
process.env.NX_WORKSPACE_ROOT = correctPaths2(config.workspaceRoot);
|
|
2547
|
+
process.env.NX_WORKSPACE_ROOT_PATH = correctPaths2(config.workspaceRoot);
|
|
2548
|
+
}
|
|
2549
|
+
if (config.directories) {
|
|
2550
|
+
if (!config.skipCache && config.directories.cache) {
|
|
2551
|
+
process.env[`${prefix}CACHE_DIR`] = correctPaths2(
|
|
2552
|
+
config.directories.cache
|
|
2553
|
+
);
|
|
2554
|
+
process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
|
|
2555
|
+
}
|
|
2556
|
+
if (config.directories.data) {
|
|
2557
|
+
process.env[`${prefix}DATA_DIR`] = correctPaths2(config.directories.data);
|
|
2558
|
+
process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
|
|
2559
|
+
}
|
|
2560
|
+
if (config.directories.config) {
|
|
2561
|
+
process.env[`${prefix}CONFIG_DIR`] = correctPaths2(
|
|
2562
|
+
config.directories.config
|
|
2563
|
+
);
|
|
2564
|
+
process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
|
|
2565
|
+
}
|
|
2566
|
+
if (config.directories.temp) {
|
|
2567
|
+
process.env[`${prefix}TEMP_DIR`] = correctPaths2(config.directories.temp);
|
|
2568
|
+
process.env[`${prefix}TEMP_DIRECTORY`] = process.env[`${prefix}TEMP_DIR`];
|
|
2569
|
+
}
|
|
2570
|
+
if (config.directories.log) {
|
|
2571
|
+
process.env[`${prefix}LOG_DIR`] = correctPaths2(config.directories.log);
|
|
2572
|
+
process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
|
|
2573
|
+
}
|
|
2574
|
+
if (config.directories.build) {
|
|
2575
|
+
process.env[`${prefix}BUILD_DIR`] = correctPaths2(
|
|
2576
|
+
config.directories.build
|
|
2577
|
+
);
|
|
2578
|
+
process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
|
|
2579
|
+
}
|
|
2571
2580
|
}
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
const round = method ? Math[method] : Math.trunc;
|
|
2578
|
-
const result = round(number);
|
|
2579
|
-
return result === 0 ? 0 : result;
|
|
2580
|
-
};
|
|
2581
|
-
}
|
|
2582
|
-
function differenceInMilliseconds(laterDate, earlierDate) {
|
|
2583
|
-
return +toDate(laterDate) - +toDate(earlierDate);
|
|
2584
|
-
}
|
|
2585
|
-
function differenceInSeconds(laterDate, earlierDate, options) {
|
|
2586
|
-
const diff = differenceInMilliseconds(laterDate, earlierDate) / 1e3;
|
|
2587
|
-
return getRoundingMethod(options?.roundingMethod)(diff);
|
|
2588
|
-
}
|
|
2589
|
-
function formatDistance2(laterDate, earlierDate, options) {
|
|
2590
|
-
const defaultOptions2 = getDefaultOptions();
|
|
2591
|
-
const locale = options?.locale ?? defaultOptions2.locale ?? enUS;
|
|
2592
|
-
const minutesInAlmostTwoDays = 2520;
|
|
2593
|
-
const comparison = compareAsc(laterDate, earlierDate);
|
|
2594
|
-
if (isNaN(comparison)) throw new RangeError("Invalid time value");
|
|
2595
|
-
const localizeOptions = Object.assign({}, options, {
|
|
2596
|
-
addSuffix: options?.addSuffix,
|
|
2597
|
-
comparison
|
|
2598
|
-
});
|
|
2599
|
-
const [laterDate_, earlierDate_] = normalizeDates(
|
|
2600
|
-
options?.in,
|
|
2601
|
-
...comparison > 0 ? [earlierDate, laterDate] : [laterDate, earlierDate]
|
|
2602
|
-
);
|
|
2603
|
-
const seconds = differenceInSeconds(earlierDate_, laterDate_);
|
|
2604
|
-
const offsetInSeconds = (getTimezoneOffsetInMilliseconds(earlierDate_) - getTimezoneOffsetInMilliseconds(laterDate_)) / 1e3;
|
|
2605
|
-
const minutes = Math.round((seconds - offsetInSeconds) / 60);
|
|
2606
|
-
let months;
|
|
2607
|
-
if (minutes < 2) {
|
|
2608
|
-
if (options?.includeSeconds) {
|
|
2609
|
-
if (seconds < 5) {
|
|
2610
|
-
return locale.formatDistance("lessThanXSeconds", 5, localizeOptions);
|
|
2611
|
-
} else if (seconds < 10) {
|
|
2612
|
-
return locale.formatDistance("lessThanXSeconds", 10, localizeOptions);
|
|
2613
|
-
} else if (seconds < 20) {
|
|
2614
|
-
return locale.formatDistance("lessThanXSeconds", 20, localizeOptions);
|
|
2615
|
-
} else if (seconds < 40) {
|
|
2616
|
-
return locale.formatDistance("halfAMinute", 0, localizeOptions);
|
|
2617
|
-
} else if (seconds < 60) {
|
|
2618
|
-
return locale.formatDistance("lessThanXMinutes", 1, localizeOptions);
|
|
2619
|
-
} else {
|
|
2620
|
-
return locale.formatDistance("xMinutes", 1, localizeOptions);
|
|
2621
|
-
}
|
|
2622
|
-
} else {
|
|
2623
|
-
if (minutes === 0) {
|
|
2624
|
-
return locale.formatDistance("lessThanXMinutes", 1, localizeOptions);
|
|
2625
|
-
} else {
|
|
2626
|
-
return locale.formatDistance("xMinutes", minutes, localizeOptions);
|
|
2627
|
-
}
|
|
2581
|
+
if (config.skipCache !== void 0) {
|
|
2582
|
+
process.env[`${prefix}SKIP_CACHE`] = String(config.skipCache);
|
|
2583
|
+
if (config.skipCache) {
|
|
2584
|
+
process.env.NX_SKIP_NX_CACHE ??= String(config.skipCache);
|
|
2585
|
+
process.env.NX_CACHE_PROJECT_GRAPH ??= String(config.skipCache);
|
|
2628
2586
|
}
|
|
2629
|
-
} else if (minutes < 45) {
|
|
2630
|
-
return locale.formatDistance("xMinutes", minutes, localizeOptions);
|
|
2631
|
-
} else if (minutes < 90) {
|
|
2632
|
-
return locale.formatDistance("aboutXHours", 1, localizeOptions);
|
|
2633
|
-
} else if (minutes < minutesInDay) {
|
|
2634
|
-
const hours = Math.round(minutes / 60);
|
|
2635
|
-
return locale.formatDistance("aboutXHours", hours, localizeOptions);
|
|
2636
|
-
} else if (minutes < minutesInAlmostTwoDays) {
|
|
2637
|
-
return locale.formatDistance("xDays", 1, localizeOptions);
|
|
2638
|
-
} else if (minutes < minutesInMonth) {
|
|
2639
|
-
const days = Math.round(minutes / minutesInDay);
|
|
2640
|
-
return locale.formatDistance("xDays", days, localizeOptions);
|
|
2641
|
-
} else if (minutes < minutesInMonth * 2) {
|
|
2642
|
-
months = Math.round(minutes / minutesInMonth);
|
|
2643
|
-
return locale.formatDistance("aboutXMonths", months, localizeOptions);
|
|
2644
2587
|
}
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
}
|
|
2650
|
-
|
|
2651
|
-
const
|
|
2652
|
-
|
|
2653
|
-
return locale.formatDistance("aboutXYears", years, localizeOptions);
|
|
2654
|
-
} else if (monthsSinceStartOfYear < 9) {
|
|
2655
|
-
return locale.formatDistance("overXYears", years, localizeOptions);
|
|
2656
|
-
} else {
|
|
2657
|
-
return locale.formatDistance("almostXYears", years + 1, localizeOptions);
|
|
2588
|
+
if (config.mode) {
|
|
2589
|
+
process.env[`${prefix}MODE`] = config.mode;
|
|
2590
|
+
process.env.NODE_ENV = config.mode;
|
|
2591
|
+
process.env.ENVIRONMENT = config.mode;
|
|
2592
|
+
}
|
|
2593
|
+
if (config.colors?.base?.light || config.colors?.base?.dark) {
|
|
2594
|
+
for (const key of Object.keys(config.colors)) {
|
|
2595
|
+
setThemeColorsEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
|
|
2658
2596
|
}
|
|
2597
|
+
} else {
|
|
2598
|
+
setThemeColorsEnv(
|
|
2599
|
+
`${prefix}COLOR_`,
|
|
2600
|
+
config.colors
|
|
2601
|
+
);
|
|
2659
2602
|
}
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
return formatDistance2(date, constructNow(date), options);
|
|
2663
|
-
}
|
|
2664
|
-
var getLogFn = (logLevel = LogLevel2.INFO, config = {}, options = {}) => {
|
|
2665
|
-
const {
|
|
2666
|
-
chalk: _chalk = getChalk(),
|
|
2667
|
-
fullDateTime = false,
|
|
2668
|
-
hideDateTime = false
|
|
2669
|
-
} = options;
|
|
2670
|
-
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;
|
|
2671
|
-
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel2.INFO;
|
|
2672
|
-
if (logLevel > getLogLevel2(configLogLevel) || logLevel <= LogLevel2.SILENT || getLogLevel2(configLogLevel) <= LogLevel2.SILENT) {
|
|
2673
|
-
return (_3) => {
|
|
2674
|
-
};
|
|
2603
|
+
if (config.repository) {
|
|
2604
|
+
process.env[`${prefix}REPOSITORY`] = config.repository;
|
|
2675
2605
|
}
|
|
2676
|
-
if (
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2606
|
+
if (config.branch) {
|
|
2607
|
+
process.env[`${prefix}BRANCH`] = config.branch;
|
|
2608
|
+
}
|
|
2609
|
+
if (config.preid) {
|
|
2610
|
+
process.env[`${prefix}PRE_ID`] = String(config.preid);
|
|
2611
|
+
}
|
|
2612
|
+
if (config.registry) {
|
|
2613
|
+
if (config.registry.github) {
|
|
2614
|
+
process.env[`${prefix}REGISTRY_GITHUB`] = String(config.registry.github);
|
|
2615
|
+
}
|
|
2616
|
+
if (config.registry.npm) {
|
|
2617
|
+
process.env[`${prefix}REGISTRY_NPM`] = String(config.registry.npm);
|
|
2618
|
+
}
|
|
2619
|
+
if (config.registry.cargo) {
|
|
2620
|
+
process.env[`${prefix}REGISTRY_CARGO`] = String(config.registry.cargo);
|
|
2621
|
+
}
|
|
2622
|
+
if (config.registry.cyclone) {
|
|
2623
|
+
process.env[`${prefix}REGISTRY_CYCLONE`] = String(
|
|
2624
|
+
config.registry.cyclone
|
|
2684
2625
|
);
|
|
2685
|
-
}
|
|
2626
|
+
}
|
|
2627
|
+
if (config.registry.container) {
|
|
2628
|
+
process.env[`${prefix}REGISTRY_CONTAINER`] = String(
|
|
2629
|
+
config.registry.container
|
|
2630
|
+
);
|
|
2631
|
+
}
|
|
2632
|
+
}
|
|
2633
|
+
if (config.logLevel) {
|
|
2634
|
+
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
2635
|
+
process.env.LOG_LEVEL = String(config.logLevel);
|
|
2636
|
+
process.env.NX_VERBOSE_LOGGING = String(
|
|
2637
|
+
getLogLevel2(config.logLevel) >= LogLevel2.DEBUG ? true : false
|
|
2638
|
+
);
|
|
2639
|
+
process.env.RUST_BACKTRACE = getLogLevel2(config.logLevel) >= LogLevel2.DEBUG ? "full" : "none";
|
|
2640
|
+
}
|
|
2641
|
+
if (config.skipConfigLogging !== void 0) {
|
|
2642
|
+
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(
|
|
2643
|
+
config.skipConfigLogging
|
|
2644
|
+
);
|
|
2645
|
+
}
|
|
2646
|
+
process.env[`${prefix}WORKSPACE_CONFIG`] = JSON.stringify(config);
|
|
2647
|
+
for (const key of Object.keys(config.extensions ?? {})) {
|
|
2648
|
+
if (config.extensions[key] && Object.keys(config.extensions[key])) {
|
|
2649
|
+
setExtensionEnv(key, config.extensions[key]);
|
|
2650
|
+
}
|
|
2651
|
+
}
|
|
2652
|
+
};
|
|
2653
|
+
var setThemeColorsEnv = (prefix, config) => {
|
|
2654
|
+
return config?.light?.brand || config?.dark?.brand ? setMultiThemeColorsEnv(prefix, config) : setSingleThemeColorsEnv(prefix, config);
|
|
2655
|
+
};
|
|
2656
|
+
var setSingleThemeColorsEnv = (prefix, config) => {
|
|
2657
|
+
if (config.dark) {
|
|
2658
|
+
process.env[`${prefix}DARK`] = config.dark;
|
|
2659
|
+
}
|
|
2660
|
+
if (config.light) {
|
|
2661
|
+
process.env[`${prefix}LIGHT`] = config.light;
|
|
2662
|
+
}
|
|
2663
|
+
if (config.brand) {
|
|
2664
|
+
process.env[`${prefix}BRAND`] = config.brand;
|
|
2665
|
+
}
|
|
2666
|
+
if (config.alternate) {
|
|
2667
|
+
process.env[`${prefix}ALTERNATE`] = config.alternate;
|
|
2668
|
+
}
|
|
2669
|
+
if (config.accent) {
|
|
2670
|
+
process.env[`${prefix}ACCENT`] = config.accent;
|
|
2671
|
+
}
|
|
2672
|
+
if (config.link) {
|
|
2673
|
+
process.env[`${prefix}LINK`] = config.link;
|
|
2674
|
+
}
|
|
2675
|
+
if (config.help) {
|
|
2676
|
+
process.env[`${prefix}HELP`] = config.help;
|
|
2677
|
+
}
|
|
2678
|
+
if (config.success) {
|
|
2679
|
+
process.env[`${prefix}SUCCESS`] = config.success;
|
|
2680
|
+
}
|
|
2681
|
+
if (config.info) {
|
|
2682
|
+
process.env[`${prefix}INFO`] = config.info;
|
|
2683
|
+
}
|
|
2684
|
+
if (config.debug) {
|
|
2685
|
+
process.env[`${prefix}DEBUG`] = config.debug;
|
|
2686
|
+
}
|
|
2687
|
+
if (config.warning) {
|
|
2688
|
+
process.env[`${prefix}WARNING`] = config.warning;
|
|
2689
|
+
}
|
|
2690
|
+
if (config.danger) {
|
|
2691
|
+
process.env[`${prefix}DANGER`] = config.danger;
|
|
2692
|
+
}
|
|
2693
|
+
if (config.fatal) {
|
|
2694
|
+
process.env[`${prefix}FATAL`] = config.fatal;
|
|
2695
|
+
}
|
|
2696
|
+
if (config.performance) {
|
|
2697
|
+
process.env[`${prefix}PERFORMANCE`] = config.performance;
|
|
2698
|
+
}
|
|
2699
|
+
if (config.positive) {
|
|
2700
|
+
process.env[`${prefix}POSITIVE`] = config.positive;
|
|
2701
|
+
}
|
|
2702
|
+
if (config.negative) {
|
|
2703
|
+
process.env[`${prefix}NEGATIVE`] = config.negative;
|
|
2704
|
+
}
|
|
2705
|
+
if (config.gradient) {
|
|
2706
|
+
for (let i3 = 0; i3 < config.gradient.length; i3++) {
|
|
2707
|
+
process.env[`${prefix}GRADIENT_${i3}`] = config.gradient[i3];
|
|
2708
|
+
}
|
|
2709
|
+
}
|
|
2710
|
+
};
|
|
2711
|
+
var setMultiThemeColorsEnv = (prefix, config) => {
|
|
2712
|
+
return {
|
|
2713
|
+
light: setBaseThemeColorsEnv(`${prefix}LIGHT_`, config.light),
|
|
2714
|
+
dark: setBaseThemeColorsEnv(`${prefix}DARK_`, config.dark)
|
|
2715
|
+
};
|
|
2716
|
+
};
|
|
2717
|
+
var setBaseThemeColorsEnv = (prefix, config) => {
|
|
2718
|
+
if (config.foreground) {
|
|
2719
|
+
process.env[`${prefix}FOREGROUND`] = config.foreground;
|
|
2720
|
+
}
|
|
2721
|
+
if (config.background) {
|
|
2722
|
+
process.env[`${prefix}BACKGROUND`] = config.background;
|
|
2723
|
+
}
|
|
2724
|
+
if (config.brand) {
|
|
2725
|
+
process.env[`${prefix}BRAND`] = config.brand;
|
|
2726
|
+
}
|
|
2727
|
+
if (config.alternate) {
|
|
2728
|
+
process.env[`${prefix}ALTERNATE`] = config.alternate;
|
|
2729
|
+
}
|
|
2730
|
+
if (config.accent) {
|
|
2731
|
+
process.env[`${prefix}ACCENT`] = config.accent;
|
|
2686
2732
|
}
|
|
2687
|
-
if (
|
|
2688
|
-
|
|
2689
|
-
console.error(
|
|
2690
|
-
`
|
|
2691
|
-
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.danger ?? DEFAULT_COLOR_CONFIG.dark.danger)(
|
|
2692
|
-
`[${CONSOLE_ICONS2[LogLevelLabel2.ERROR]} Error] `
|
|
2693
|
-
)}${_chalk.bold.whiteBright(formatLogMessage2(message))}
|
|
2694
|
-
`
|
|
2695
|
-
);
|
|
2696
|
-
};
|
|
2733
|
+
if (config.link) {
|
|
2734
|
+
process.env[`${prefix}LINK`] = config.link;
|
|
2697
2735
|
}
|
|
2698
|
-
if (
|
|
2699
|
-
|
|
2700
|
-
console.warn(
|
|
2701
|
-
`
|
|
2702
|
-
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.warning ?? DEFAULT_COLOR_CONFIG.dark.warning)(
|
|
2703
|
-
`[${CONSOLE_ICONS2[LogLevelLabel2.WARN]} Warn] `
|
|
2704
|
-
)}${_chalk.bold.whiteBright(formatLogMessage2(message))}
|
|
2705
|
-
`
|
|
2706
|
-
);
|
|
2707
|
-
};
|
|
2736
|
+
if (config.help) {
|
|
2737
|
+
process.env[`${prefix}HELP`] = config.help;
|
|
2708
2738
|
}
|
|
2709
|
-
if (
|
|
2710
|
-
|
|
2711
|
-
console.info(
|
|
2712
|
-
`
|
|
2713
|
-
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.success ?? DEFAULT_COLOR_CONFIG.dark.success)(
|
|
2714
|
-
`[${CONSOLE_ICONS2[LogLevelLabel2.SUCCESS]} Success] `
|
|
2715
|
-
)}${_chalk.bold.whiteBright(formatLogMessage2(message))}
|
|
2716
|
-
`
|
|
2717
|
-
);
|
|
2718
|
-
};
|
|
2739
|
+
if (config.success) {
|
|
2740
|
+
process.env[`${prefix}SUCCESS`] = config.success;
|
|
2719
2741
|
}
|
|
2720
|
-
if (
|
|
2721
|
-
|
|
2722
|
-
console.info(
|
|
2723
|
-
`
|
|
2724
|
-
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.info ?? DEFAULT_COLOR_CONFIG.dark.info)(
|
|
2725
|
-
`[${CONSOLE_ICONS2[LogLevelLabel2.INFO]} Info] `
|
|
2726
|
-
)}${_chalk.bold.whiteBright(formatLogMessage2(message))}
|
|
2727
|
-
`
|
|
2728
|
-
);
|
|
2729
|
-
};
|
|
2742
|
+
if (config.info) {
|
|
2743
|
+
process.env[`${prefix}INFO`] = config.info;
|
|
2730
2744
|
}
|
|
2731
|
-
if (
|
|
2732
|
-
|
|
2733
|
-
console.debug(
|
|
2734
|
-
`
|
|
2735
|
-
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.performance ?? DEFAULT_COLOR_CONFIG.dark.performance)(
|
|
2736
|
-
`[${CONSOLE_ICONS2[LogLevelLabel2.PERFORMANCE]} Performance] `
|
|
2737
|
-
)}${_chalk.bold.whiteBright(formatLogMessage2(message))}
|
|
2738
|
-
`
|
|
2739
|
-
);
|
|
2740
|
-
};
|
|
2745
|
+
if (config.debug) {
|
|
2746
|
+
process.env[`${prefix}DEBUG`] = config.debug;
|
|
2741
2747
|
}
|
|
2742
|
-
if (
|
|
2743
|
-
|
|
2744
|
-
console.debug(
|
|
2745
|
-
`
|
|
2746
|
-
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.debug ?? DEFAULT_COLOR_CONFIG.dark.debug)(
|
|
2747
|
-
`[${CONSOLE_ICONS2[LogLevelLabel2.DEBUG]} Debug] `
|
|
2748
|
-
)}${_chalk.bold.whiteBright(formatLogMessage2(message))}
|
|
2749
|
-
`
|
|
2750
|
-
);
|
|
2751
|
-
};
|
|
2748
|
+
if (config.warning) {
|
|
2749
|
+
process.env[`${prefix}WARNING`] = config.warning;
|
|
2752
2750
|
}
|
|
2753
|
-
if (
|
|
2754
|
-
|
|
2755
|
-
console.debug(
|
|
2756
|
-
`
|
|
2757
|
-
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex("#bbbbbb")(
|
|
2758
|
-
`[${CONSOLE_ICONS2[LogLevelLabel2.TRACE]} Trace] `
|
|
2759
|
-
)}${_chalk.bold.whiteBright(formatLogMessage2(message))}
|
|
2760
|
-
`
|
|
2761
|
-
);
|
|
2762
|
-
};
|
|
2751
|
+
if (config.danger) {
|
|
2752
|
+
process.env[`${prefix}DANGER`] = config.danger;
|
|
2763
2753
|
}
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
`
|
|
2767
|
-
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.brand ?? DEFAULT_COLOR_CONFIG.dark.brand)(
|
|
2768
|
-
`[${CONSOLE_ICONS2[LogLevelLabel2.ALL]} System] `
|
|
2769
|
-
)}${_chalk.bold.whiteBright(formatLogMessage2(message))}
|
|
2770
|
-
`
|
|
2771
|
-
);
|
|
2772
|
-
};
|
|
2773
|
-
};
|
|
2774
|
-
var writeWarning2 = (message, config) => getLogFn(LogLevel2.WARN, config)(message);
|
|
2775
|
-
var writePerformance = (message, config) => getLogFn(LogLevel2.PERFORMANCE, config)(message);
|
|
2776
|
-
var writeDebug2 = (message, config) => getLogFn(LogLevel2.DEBUG, config)(message);
|
|
2777
|
-
var writeTrace2 = (message, config) => getLogFn(LogLevel2.TRACE, config)(message);
|
|
2778
|
-
var getStopwatch = (name) => {
|
|
2779
|
-
const start = /* @__PURE__ */ new Date();
|
|
2780
|
-
return () => {
|
|
2781
|
-
writePerformance(
|
|
2782
|
-
`The${name ? ` ${name}` : ""} process took ${formatDistanceToNow2(start, {
|
|
2783
|
-
includeSeconds: true
|
|
2784
|
-
})} to complete`
|
|
2785
|
-
);
|
|
2786
|
-
};
|
|
2787
|
-
};
|
|
2788
|
-
var MAX_DEPTH = 10;
|
|
2789
|
-
var formatLogMessage2 = (message, options = {}, depth2 = 0) => {
|
|
2790
|
-
if (depth2 > MAX_DEPTH) {
|
|
2791
|
-
return "<max depth>";
|
|
2754
|
+
if (config.fatal) {
|
|
2755
|
+
process.env[`${prefix}FATAL`] = config.fatal;
|
|
2792
2756
|
}
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
)
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
${Object.keys(message).filter(
|
|
2807
|
-
(key) => typeof key !== "string" || !skip.map((k2) => k2.toLowerCase().trim()).includes(key.toLowerCase().trim())
|
|
2808
|
-
).sort(
|
|
2809
|
-
sort ? (a3, b2) => !a3 && !b2 ? 0 : !a3 ? 1 : !b2 ? -1 : String(a3).localeCompare(String(b2)) : void 0
|
|
2810
|
-
).map(
|
|
2811
|
-
(key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" && message[key] ? Object.keys(message[key]).filter(
|
|
2812
|
-
(key2) => typeof key2 !== "string" || !skip.map((k2) => k2.toLowerCase().trim()).includes(key2.toLowerCase().trim())
|
|
2813
|
-
).length === 0 ? "{}" : formatLogMessage2(
|
|
2814
|
-
message[key],
|
|
2815
|
-
{ prefix: `${prefix}--`, skip, sort },
|
|
2816
|
-
depth2 + 1
|
|
2817
|
-
) : message[key]}`
|
|
2818
|
-
).join("\n")}` : String(message);
|
|
2819
|
-
};
|
|
2820
|
-
var _isFunction = (value) => {
|
|
2821
|
-
try {
|
|
2822
|
-
return value instanceof Function || typeof value === "function" || !!(value?.constructor && value?.call && value?.apply);
|
|
2823
|
-
} catch {
|
|
2824
|
-
return false;
|
|
2757
|
+
if (config.performance) {
|
|
2758
|
+
process.env[`${prefix}PERFORMANCE`] = config.performance;
|
|
2759
|
+
}
|
|
2760
|
+
if (config.positive) {
|
|
2761
|
+
process.env[`${prefix}POSITIVE`] = config.positive;
|
|
2762
|
+
}
|
|
2763
|
+
if (config.negative) {
|
|
2764
|
+
process.env[`${prefix}NEGATIVE`] = config.negative;
|
|
2765
|
+
}
|
|
2766
|
+
if (config.gradient) {
|
|
2767
|
+
for (let i3 = 0; i3 < config.gradient.length; i3++) {
|
|
2768
|
+
process.env[`${prefix}GRADIENT_${i3}`] = config.gradient[i3];
|
|
2769
|
+
}
|
|
2825
2770
|
}
|
|
2826
2771
|
};
|
|
2827
2772
|
|
|
2828
|
-
// ../config-tools/dist/chunk-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
name
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths2(
|
|
2842
|
-
process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
|
|
2843
|
-
"jiti"
|
|
2844
|
-
)
|
|
2845
|
-
},
|
|
2846
|
-
...options
|
|
2847
|
-
}),
|
|
2848
|
-
loadConfig2({
|
|
2849
|
-
cwd: workspacePath,
|
|
2850
|
-
packageJson: true,
|
|
2851
|
-
name: fileName,
|
|
2852
|
-
envName: fileName?.toUpperCase(),
|
|
2853
|
-
jitiOptions: {
|
|
2854
|
-
debug: false,
|
|
2855
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths2(
|
|
2856
|
-
process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
|
|
2857
|
-
"jiti"
|
|
2858
|
-
)
|
|
2859
|
-
},
|
|
2860
|
-
configFile: fileName,
|
|
2861
|
-
...options
|
|
2862
|
-
})
|
|
2863
|
-
]);
|
|
2864
|
-
return defu3(configs[0] ?? {}, configs[1] ?? {});
|
|
2773
|
+
// ../config-tools/dist/chunk-A5JXMY6X.js
|
|
2774
|
+
init_esm_shims();
|
|
2775
|
+
var getExtensionEnv = (extensionName) => {
|
|
2776
|
+
const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
|
|
2777
|
+
return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
|
|
2778
|
+
const name = key.replace(prefix, "").split("_").map(
|
|
2779
|
+
(i3) => i3.length > 0 ? i3.trim().charAt(0).toUpperCase() + i3.trim().slice(1) : ""
|
|
2780
|
+
).join("");
|
|
2781
|
+
if (name) {
|
|
2782
|
+
ret[name] = process.env[key];
|
|
2783
|
+
}
|
|
2784
|
+
return ret;
|
|
2785
|
+
}, {});
|
|
2865
2786
|
};
|
|
2866
|
-
var
|
|
2867
|
-
const
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
}
|
|
2877
|
-
|
|
2787
|
+
var getConfigEnv = () => {
|
|
2788
|
+
const prefix = "STORM_";
|
|
2789
|
+
let config = {
|
|
2790
|
+
extends: process.env[`${prefix}EXTENDS`] || void 0,
|
|
2791
|
+
name: process.env[`${prefix}NAME`] || void 0,
|
|
2792
|
+
variant: process.env[`${prefix}VARIANT`] || void 0,
|
|
2793
|
+
namespace: process.env[`${prefix}NAMESPACE`] || void 0,
|
|
2794
|
+
owner: process.env[`${prefix}OWNER`] || void 0,
|
|
2795
|
+
bot: {
|
|
2796
|
+
name: process.env[`${prefix}BOT_NAME`] || void 0,
|
|
2797
|
+
email: process.env[`${prefix}BOT_EMAIL`] || void 0
|
|
2798
|
+
},
|
|
2799
|
+
release: {
|
|
2800
|
+
banner: {
|
|
2801
|
+
url: process.env[`${prefix}RELEASE_BANNER_URL`] || void 0,
|
|
2802
|
+
alt: process.env[`${prefix}RELEASE_BANNER_ALT`] || void 0
|
|
2803
|
+
},
|
|
2804
|
+
header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
|
|
2805
|
+
footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
|
|
2806
|
+
},
|
|
2807
|
+
error: {
|
|
2808
|
+
codesFile: process.env[`${prefix}ERROR_CODES_FILE`] || void 0,
|
|
2809
|
+
url: process.env[`${prefix}ERROR_URL`] || void 0
|
|
2810
|
+
},
|
|
2811
|
+
socials: {
|
|
2812
|
+
twitter: process.env[`${prefix}SOCIAL_TWITTER`] || void 0,
|
|
2813
|
+
discord: process.env[`${prefix}SOCIAL_DISCORD`] || void 0,
|
|
2814
|
+
telegram: process.env[`${prefix}SOCIAL_TELEGRAM`] || void 0,
|
|
2815
|
+
slack: process.env[`${prefix}SOCIAL_SLACK`] || void 0,
|
|
2816
|
+
medium: process.env[`${prefix}SOCIAL_MEDIUM`] || void 0,
|
|
2817
|
+
github: process.env[`${prefix}SOCIAL_GITHUB`] || void 0
|
|
2818
|
+
},
|
|
2819
|
+
organization: process.env[`${prefix}ORG`] || process.env[`${prefix}ORGANIZATION`] || process.env[`${prefix}ORG_NAME`] || process.env[`${prefix}ORGANIZATION_NAME`] ? process.env[`${prefix}ORG_DESCRIPTION`] || process.env[`${prefix}ORGANIZATION_DESCRIPTION`] || process.env[`${prefix}ORG_URL`] || process.env[`${prefix}ORGANIZATION_URL`] || process.env[`${prefix}ORG_LOGO`] || process.env[`${prefix}ORGANIZATION_LOGO`] ? {
|
|
2820
|
+
name: process.env[`${prefix}ORG`] || process.env[`${prefix}ORGANIZATION`] || process.env[`${prefix}ORG_NAME`] || process.env[`${prefix}ORGANIZATION_NAME`],
|
|
2821
|
+
description: process.env[`${prefix}ORG_DESCRIPTION`] || process.env[`${prefix}ORGANIZATION_DESCRIPTION`] || void 0,
|
|
2822
|
+
url: process.env[`${prefix}ORG_URL`] || process.env[`${prefix}ORGANIZATION_URL`] || void 0,
|
|
2823
|
+
logo: process.env[`${prefix}ORG_LOGO`] || process.env[`${prefix}ORGANIZATION_LOGO`] || void 0,
|
|
2824
|
+
icon: process.env[`${prefix}ORG_ICON`] || process.env[`${prefix}ORGANIZATION_ICON`] || void 0
|
|
2825
|
+
} : process.env[`${prefix}ORG`] || process.env[`${prefix}ORGANIZATION`] || process.env[`${prefix}ORG_NAME`] || process.env[`${prefix}ORGANIZATION_NAME`] : void 0,
|
|
2826
|
+
packageManager: process.env[`${prefix}PACKAGE_MANAGER`] || void 0,
|
|
2827
|
+
license: process.env[`${prefix}LICENSE`] || void 0,
|
|
2828
|
+
homepage: process.env[`${prefix}HOMEPAGE`] || void 0,
|
|
2829
|
+
docs: process.env[`${prefix}DOCS`] || void 0,
|
|
2830
|
+
portal: process.env[`${prefix}PORTAL`] || void 0,
|
|
2831
|
+
licensing: process.env[`${prefix}LICENSING`] || void 0,
|
|
2832
|
+
contact: process.env[`${prefix}CONTACT`] || void 0,
|
|
2833
|
+
support: process.env[`${prefix}SUPPORT`] || void 0,
|
|
2834
|
+
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
2835
|
+
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
2836
|
+
configFile: process.env[`${prefix}WORKSPACE_CONFIG_FILE`] ? correctPaths2(process.env[`${prefix}WORKSPACE_CONFIG_FILE`]) : void 0,
|
|
2837
|
+
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? correctPaths2(process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
2838
|
+
directories: {
|
|
2839
|
+
cache: process.env[`${prefix}CACHE_DIR`] ? correctPaths2(process.env[`${prefix}CACHE_DIR`]) : process.env[`${prefix}CACHE_DIRECTORY`] ? correctPaths2(process.env[`${prefix}CACHE_DIRECTORY`]) : void 0,
|
|
2840
|
+
data: process.env[`${prefix}DATA_DIR`] ? correctPaths2(process.env[`${prefix}DATA_DIR`]) : process.env[`${prefix}DATA_DIRECTORY`] ? correctPaths2(process.env[`${prefix}DATA_DIRECTORY`]) : void 0,
|
|
2841
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? correctPaths2(process.env[`${prefix}CONFIG_DIR`]) : process.env[`${prefix}CONFIG_DIRECTORY`] ? correctPaths2(process.env[`${prefix}CONFIG_DIRECTORY`]) : void 0,
|
|
2842
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? correctPaths2(process.env[`${prefix}TEMP_DIR`]) : process.env[`${prefix}TEMP_DIRECTORY`] ? correctPaths2(process.env[`${prefix}TEMP_DIRECTORY`]) : void 0,
|
|
2843
|
+
log: process.env[`${prefix}LOG_DIR`] ? correctPaths2(process.env[`${prefix}LOG_DIR`]) : process.env[`${prefix}LOG_DIRECTORY`] ? correctPaths2(process.env[`${prefix}LOG_DIRECTORY`]) : void 0,
|
|
2844
|
+
build: process.env[`${prefix}BUILD_DIR`] ? correctPaths2(process.env[`${prefix}BUILD_DIR`]) : process.env[`${prefix}BUILD_DIRECTORY`] ? correctPaths2(process.env[`${prefix}BUILD_DIRECTORY`]) : void 0
|
|
2845
|
+
},
|
|
2846
|
+
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
2847
|
+
mode: (process.env[`${prefix}MODE`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT) || void 0,
|
|
2848
|
+
// ci:
|
|
2849
|
+
// process.env[`${prefix}CI`] !== undefined
|
|
2850
|
+
// ? Boolean(
|
|
2851
|
+
// process.env[`${prefix}CI`] ??
|
|
2852
|
+
// process.env.CI ??
|
|
2853
|
+
// process.env.CONTINUOUS_INTEGRATION
|
|
2854
|
+
// )
|
|
2855
|
+
// : undefined,
|
|
2856
|
+
repository: process.env[`${prefix}REPOSITORY`] || void 0,
|
|
2857
|
+
branch: process.env[`${prefix}BRANCH`] || void 0,
|
|
2858
|
+
preid: process.env[`${prefix}PRE_ID`] || void 0,
|
|
2859
|
+
registry: {
|
|
2860
|
+
github: process.env[`${prefix}REGISTRY_GITHUB`] || void 0,
|
|
2861
|
+
npm: process.env[`${prefix}REGISTRY_NPM`] || void 0,
|
|
2862
|
+
cargo: process.env[`${prefix}REGISTRY_CARGO`] || void 0,
|
|
2863
|
+
cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
|
|
2864
|
+
container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
|
|
2865
|
+
},
|
|
2866
|
+
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
|
|
2867
|
+
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
2868
|
+
) ? getLogLevelLabel2(
|
|
2869
|
+
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
2870
|
+
) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
2871
|
+
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
2872
|
+
};
|
|
2873
|
+
const themeNames = Object.keys(process.env).filter(
|
|
2874
|
+
(envKey) => envKey.startsWith(`${prefix}COLOR_`) && e3.every(
|
|
2875
|
+
(colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)
|
|
2876
|
+
)
|
|
2877
|
+
);
|
|
2878
|
+
config.colors = themeNames.length > 0 ? themeNames.reduce(
|
|
2879
|
+
(ret, themeName) => {
|
|
2880
|
+
ret[themeName] = getThemeColorsEnv(prefix, themeName);
|
|
2881
|
+
return ret;
|
|
2882
|
+
},
|
|
2883
|
+
{}
|
|
2884
|
+
) : getThemeColorsEnv(prefix);
|
|
2885
|
+
if (config.docs === s) {
|
|
2886
|
+
if (config.homepage === r) {
|
|
2887
|
+
config.docs = `${r}/projects/${config.name}/docs`;
|
|
2888
|
+
} else {
|
|
2889
|
+
config.docs = `${config.homepage}/docs`;
|
|
2890
|
+
}
|
|
2878
2891
|
}
|
|
2879
|
-
if (
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
);
|
|
2885
|
-
for (const result2 of results) {
|
|
2886
|
-
if (result2?.config && result2?.configFile && Object.keys(result2.config).length > 0) {
|
|
2887
|
-
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
2888
|
-
writeTrace2(
|
|
2889
|
-
`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
|
|
2890
|
-
{
|
|
2891
|
-
logLevel: "all"
|
|
2892
|
-
}
|
|
2893
|
-
);
|
|
2894
|
-
}
|
|
2895
|
-
config = defu3(result2.config ?? {}, config ?? {});
|
|
2896
|
-
}
|
|
2892
|
+
if (config.licensing === a) {
|
|
2893
|
+
if (config.homepage === r) {
|
|
2894
|
+
config.licensing = `${r}/projects/${config.name}/licensing`;
|
|
2895
|
+
} else {
|
|
2896
|
+
config.licensing = `${config.homepage}/docs`;
|
|
2897
2897
|
}
|
|
2898
2898
|
}
|
|
2899
|
-
|
|
2900
|
-
|
|
2899
|
+
const serializedConfig = process.env[`${prefix}WORKSPACE_CONFIG`];
|
|
2900
|
+
if (serializedConfig) {
|
|
2901
|
+
const parsed = JSON.parse(serializedConfig);
|
|
2902
|
+
config = {
|
|
2903
|
+
...config,
|
|
2904
|
+
...parsed,
|
|
2905
|
+
colors: { ...config.colors, ...parsed.colors },
|
|
2906
|
+
extensions: { ...config.extensions, ...parsed.extensions }
|
|
2907
|
+
};
|
|
2901
2908
|
}
|
|
2902
|
-
config.configFile = configFile;
|
|
2903
2909
|
return config;
|
|
2904
2910
|
};
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
let name = void 0;
|
|
2916
|
-
let namespace = void 0;
|
|
2917
|
-
let repository = void 0;
|
|
2918
|
-
const workspaceRoot = findWorkspaceRoot2(root);
|
|
2919
|
-
if (existsSync6(join4(workspaceRoot, "package.json"))) {
|
|
2920
|
-
const file = await readFile5(
|
|
2921
|
-
joinPaths2(workspaceRoot, "package.json"),
|
|
2922
|
-
"utf8"
|
|
2911
|
+
var getThemeColorsEnv = (prefix, theme) => {
|
|
2912
|
+
const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
|
|
2913
|
+
return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorsEnv(prefix + themeName) : getSingleThemeColorsEnv(prefix + themeName);
|
|
2914
|
+
};
|
|
2915
|
+
var getSingleThemeColorsEnv = (prefix) => {
|
|
2916
|
+
const gradient = [];
|
|
2917
|
+
if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
|
|
2918
|
+
gradient.push(
|
|
2919
|
+
process.env[`${prefix}GRADIENT_START`],
|
|
2920
|
+
process.env[`${prefix}GRADIENT_END`]
|
|
2923
2921
|
);
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
if (packageJson.namespace) {
|
|
2930
|
-
namespace = packageJson.namespace;
|
|
2931
|
-
}
|
|
2932
|
-
if (packageJson.repository) {
|
|
2933
|
-
if (typeof packageJson.repository === "string") {
|
|
2934
|
-
repository = packageJson.repository;
|
|
2935
|
-
} else if (packageJson.repository.url) {
|
|
2936
|
-
repository = packageJson.repository.url;
|
|
2937
|
-
}
|
|
2938
|
-
}
|
|
2939
|
-
if (packageJson.license) {
|
|
2940
|
-
license = packageJson.license;
|
|
2941
|
-
}
|
|
2942
|
-
if (packageJson.homepage) {
|
|
2943
|
-
homepage = packageJson.homepage;
|
|
2944
|
-
}
|
|
2945
|
-
if (packageJson.bugs) {
|
|
2946
|
-
if (typeof packageJson.bugs === "string") {
|
|
2947
|
-
support = packageJson.bugs;
|
|
2948
|
-
} else if (packageJson.bugs.url) {
|
|
2949
|
-
support = packageJson.bugs.url;
|
|
2950
|
-
}
|
|
2951
|
-
}
|
|
2922
|
+
} else if (process.env[`${prefix}GRADIENT_0`] || process.env[`${prefix}GRADIENT_1`]) {
|
|
2923
|
+
let index = process.env[`${prefix}GRADIENT_0`] ? 0 : 1;
|
|
2924
|
+
while (process.env[`${prefix}GRADIENT_${index}`]) {
|
|
2925
|
+
gradient.push(process.env[`${prefix}GRADIENT_${index}`]);
|
|
2926
|
+
index++;
|
|
2952
2927
|
}
|
|
2953
2928
|
}
|
|
2954
2929
|
return {
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2930
|
+
dark: process.env[`${prefix}DARK`],
|
|
2931
|
+
light: process.env[`${prefix}LIGHT`],
|
|
2932
|
+
brand: process.env[`${prefix}BRAND`],
|
|
2933
|
+
alternate: process.env[`${prefix}ALTERNATE`],
|
|
2934
|
+
accent: process.env[`${prefix}ACCENT`],
|
|
2935
|
+
link: process.env[`${prefix}LINK`],
|
|
2936
|
+
help: process.env[`${prefix}HELP`],
|
|
2937
|
+
success: process.env[`${prefix}SUCCESS`],
|
|
2938
|
+
info: process.env[`${prefix}INFO`],
|
|
2939
|
+
debug: process.env[`${prefix}DEBUG`],
|
|
2940
|
+
warning: process.env[`${prefix}WARNING`],
|
|
2941
|
+
danger: process.env[`${prefix}DANGER`],
|
|
2942
|
+
fatal: process.env[`${prefix}FATAL`],
|
|
2943
|
+
performance: process.env[`${prefix}PERFORMANCE`],
|
|
2944
|
+
positive: process.env[`${prefix}POSITIVE`],
|
|
2945
|
+
negative: process.env[`${prefix}NEGATIVE`],
|
|
2946
|
+
gradient
|
|
2962
2947
|
};
|
|
2963
|
-
}
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
config.contact = `${config.homepage}/contact`;
|
|
2983
|
-
}
|
|
2984
|
-
if (!config.error?.codesFile || !config?.error?.url) {
|
|
2985
|
-
config.error ??= { codesFile: S };
|
|
2986
|
-
if (config.homepage) {
|
|
2987
|
-
config.error.url ??= `${config.homepage}/errors`;
|
|
2988
|
-
}
|
|
2948
|
+
};
|
|
2949
|
+
var getMultiThemeColorsEnv = (prefix) => {
|
|
2950
|
+
return {
|
|
2951
|
+
light: getBaseThemeColorsEnv(`${prefix}_LIGHT_`),
|
|
2952
|
+
dark: getBaseThemeColorsEnv(`${prefix}_DARK_`)
|
|
2953
|
+
};
|
|
2954
|
+
};
|
|
2955
|
+
var getBaseThemeColorsEnv = (prefix) => {
|
|
2956
|
+
const gradient = [];
|
|
2957
|
+
if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
|
|
2958
|
+
gradient.push(
|
|
2959
|
+
process.env[`${prefix}GRADIENT_START`],
|
|
2960
|
+
process.env[`${prefix}GRADIENT_END`]
|
|
2961
|
+
);
|
|
2962
|
+
} else if (process.env[`${prefix}GRADIENT_0`] || process.env[`${prefix}GRADIENT_1`]) {
|
|
2963
|
+
let index = process.env[`${prefix}GRADIENT_0`] ? 0 : 1;
|
|
2964
|
+
while (process.env[`${prefix}GRADIENT_${index}`]) {
|
|
2965
|
+
gradient.push(process.env[`${prefix}GRADIENT_${index}`]);
|
|
2966
|
+
index++;
|
|
2989
2967
|
}
|
|
2990
2968
|
}
|
|
2991
|
-
return
|
|
2992
|
-
}
|
|
2969
|
+
return {
|
|
2970
|
+
foreground: process.env[`${prefix}FOREGROUND`],
|
|
2971
|
+
background: process.env[`${prefix}BACKGROUND`],
|
|
2972
|
+
brand: process.env[`${prefix}BRAND`],
|
|
2973
|
+
alternate: process.env[`${prefix}ALTERNATE`],
|
|
2974
|
+
accent: process.env[`${prefix}ACCENT`],
|
|
2975
|
+
link: process.env[`${prefix}LINK`],
|
|
2976
|
+
help: process.env[`${prefix}HELP`],
|
|
2977
|
+
success: process.env[`${prefix}SUCCESS`],
|
|
2978
|
+
info: process.env[`${prefix}INFO`],
|
|
2979
|
+
debug: process.env[`${prefix}DEBUG`],
|
|
2980
|
+
warning: process.env[`${prefix}WARNING`],
|
|
2981
|
+
danger: process.env[`${prefix}DANGER`],
|
|
2982
|
+
fatal: process.env[`${prefix}FATAL`],
|
|
2983
|
+
performance: process.env[`${prefix}PERFORMANCE`],
|
|
2984
|
+
positive: process.env[`${prefix}POSITIVE`],
|
|
2985
|
+
negative: process.env[`${prefix}NEGATIVE`],
|
|
2986
|
+
gradient
|
|
2987
|
+
};
|
|
2988
|
+
};
|
|
2993
2989
|
|
|
2994
2990
|
// ../config/dist/schema.js
|
|
2995
2991
|
init_esm_shims();
|
|
2996
2992
|
|
|
2997
|
-
// ../config-tools/dist/chunk-
|
|
2993
|
+
// ../config-tools/dist/chunk-6VD3CYGA.js
|
|
2998
2994
|
import defu4 from "defu";
|
|
2999
2995
|
import { existsSync as existsSync7 } from "node:fs";
|
|
3000
2996
|
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
@@ -3095,7 +3091,7 @@ ${formatLogMessage2(config)}`,
|
|
|
3095
3091
|
return config;
|
|
3096
3092
|
};
|
|
3097
3093
|
|
|
3098
|
-
// ../config-tools/dist/chunk-
|
|
3094
|
+
// ../config-tools/dist/chunk-RL5DRDS6.js
|
|
3099
3095
|
function getConfig(workspaceRoot, skipLogs = false) {
|
|
3100
3096
|
return loadStormWorkspaceConfig(workspaceRoot, skipLogs);
|
|
3101
3097
|
}
|