@storm-software/tsup 0.2.244 → 0.2.247
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{chunk-5A65TKUX.js → chunk-47ZU2HYO.js} +1 -1
- package/dist/{chunk-GBANGFK6.js → chunk-65OUHNDV.js} +2 -5
- package/dist/{chunk-DN7CN2YQ.js → chunk-CYC2JQFZ.js} +1379 -2294
- package/dist/{chunk-47XYLSL2.js → chunk-MMAU3VJM.js} +2 -2
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +2 -2
- package/dist/index.cjs +891 -1809
- package/dist/index.js +16 -16
- package/dist/options.cjs +1427 -2313
- package/dist/options.js +3 -3
- package/dist/rollup.cjs +2186 -878
- package/dist/types.js +2 -2
- package/package.json +18 -18
package/dist/options.cjs
CHANGED
|
@@ -34,13 +34,36 @@ __export(options_exports, {
|
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(options_exports);
|
|
36
36
|
|
|
37
|
-
// ../build-tools/
|
|
38
|
-
var
|
|
39
|
-
|
|
37
|
+
// ../build-tools/src/config.ts
|
|
38
|
+
var DEFAULT_JS_BANNER = `
|
|
39
|
+
// ---------------------------------------
|
|
40
|
+
// \u{1F5F2} Built by Storm Software
|
|
41
|
+
// ---------------------------------------
|
|
42
|
+
`;
|
|
43
|
+
var DEFAULT_CSS_BANNER = `
|
|
44
|
+
/* ---------------------------------------
|
|
45
|
+
\u{1F5F2} Built by Storm Software
|
|
46
|
+
--------------------------------------- */
|
|
47
|
+
`;
|
|
48
|
+
var DEFAULT_ENVIRONMENT = "production";
|
|
49
|
+
var DEFAULT_ORGANIZATION = "storm-software";
|
|
40
50
|
|
|
41
|
-
// ../
|
|
51
|
+
// ../config-tools/src/logger/console.ts
|
|
42
52
|
var import_formatDistanceToNow = require("date-fns/formatDistanceToNow");
|
|
43
|
-
|
|
53
|
+
|
|
54
|
+
// ../config-tools/src/types.ts
|
|
55
|
+
var LogLevel = {
|
|
56
|
+
SILENT: 0,
|
|
57
|
+
FATAL: 10,
|
|
58
|
+
ERROR: 20,
|
|
59
|
+
WARN: 30,
|
|
60
|
+
SUCCESS: 35,
|
|
61
|
+
INFO: 40,
|
|
62
|
+
PERFORMANCE: 50,
|
|
63
|
+
DEBUG: 60,
|
|
64
|
+
TRACE: 70,
|
|
65
|
+
ALL: 100
|
|
66
|
+
};
|
|
44
67
|
var LogLevelLabel = {
|
|
45
68
|
SILENT: "silent",
|
|
46
69
|
FATAL: "fatal",
|
|
@@ -53,6 +76,81 @@ var LogLevelLabel = {
|
|
|
53
76
|
TRACE: "trace",
|
|
54
77
|
ALL: "all"
|
|
55
78
|
};
|
|
79
|
+
|
|
80
|
+
// ../config-tools/src/utilities/colors.ts
|
|
81
|
+
var DEFAULT_COLOR_CONFIG = {
|
|
82
|
+
light: {
|
|
83
|
+
background: "#fafafa",
|
|
84
|
+
foreground: "#1d1e22",
|
|
85
|
+
brand: "#1fb2a6",
|
|
86
|
+
alternate: "#db2777",
|
|
87
|
+
discovery: "#5C4EE5",
|
|
88
|
+
success: "#087f5b",
|
|
89
|
+
info: "#0550ae",
|
|
90
|
+
debug: "#8afafc",
|
|
91
|
+
warning: "#e3b341",
|
|
92
|
+
danger: "#D8314A",
|
|
93
|
+
fatal: "#51070f",
|
|
94
|
+
performance: "#13c302",
|
|
95
|
+
link: "#3fa6ff",
|
|
96
|
+
positive: "#22c55e",
|
|
97
|
+
negative: "#dc2626",
|
|
98
|
+
gradient: ["#1fb2a6", "#db2777", "#5C4EE5"]
|
|
99
|
+
},
|
|
100
|
+
dark: {
|
|
101
|
+
background: "#1e2124",
|
|
102
|
+
foreground: "#cbd5e1",
|
|
103
|
+
brand: "#2dd4bf",
|
|
104
|
+
alternate: "#db2777",
|
|
105
|
+
discovery: "#818cf8",
|
|
106
|
+
success: "#10b981",
|
|
107
|
+
info: "#58a6ff",
|
|
108
|
+
debug: "#8afafc",
|
|
109
|
+
warning: "#f3d371",
|
|
110
|
+
danger: "#D8314A",
|
|
111
|
+
fatal: "#a40e26",
|
|
112
|
+
performance: "#80fd74",
|
|
113
|
+
link: "#3fa6ff",
|
|
114
|
+
positive: "#22c55e",
|
|
115
|
+
negative: "#dc2626",
|
|
116
|
+
gradient: ["#1fb2a6", "#db2777", "#818cf8"]
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
// ../config-tools/src/logger/chalk.ts
|
|
121
|
+
var import_chalk = __toESM(require("chalk"), 1);
|
|
122
|
+
var chalkDefault = {
|
|
123
|
+
hex: (_) => (message) => message,
|
|
124
|
+
bgHex: (_) => ({
|
|
125
|
+
whiteBright: (message) => message,
|
|
126
|
+
white: (message) => message
|
|
127
|
+
}),
|
|
128
|
+
white: (message) => message,
|
|
129
|
+
whiteBright: (message) => message,
|
|
130
|
+
gray: (message) => message,
|
|
131
|
+
bold: {
|
|
132
|
+
hex: (_) => (message) => message,
|
|
133
|
+
bgHex: (_) => ({
|
|
134
|
+
whiteBright: (message) => message,
|
|
135
|
+
white: (message) => message
|
|
136
|
+
}),
|
|
137
|
+
whiteBright: (message) => message,
|
|
138
|
+
white: (message) => message
|
|
139
|
+
},
|
|
140
|
+
dim: {
|
|
141
|
+
hex: (_) => (message) => message,
|
|
142
|
+
gray: (message) => message
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
var getChalk = () => {
|
|
146
|
+
let _chalk = import_chalk.default;
|
|
147
|
+
if (!_chalk?.hex || !_chalk?.bold?.hex || !_chalk?.bgHex || !_chalk?.whiteBright || !_chalk?.white) {
|
|
148
|
+
_chalk = chalkDefault;
|
|
149
|
+
}
|
|
150
|
+
return _chalk;
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
// ../config-tools/src/logger/is-unicode-supported.ts
|
|
56
154
|
function isUnicodeSupported() {
|
|
57
155
|
if (process.platform !== "win32") {
|
|
58
156
|
return process.env.TERM !== "linux";
|
|
@@ -62,7 +160,9 @@ function isUnicodeSupported() {
|
|
|
62
160
|
process.env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
|
|
63
161
|
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";
|
|
64
162
|
}
|
|
65
|
-
|
|
163
|
+
|
|
164
|
+
// ../config-tools/src/logger/console-icons.ts
|
|
165
|
+
var useIcon = (c, fallback) => isUnicodeSupported() ? c : fallback;
|
|
66
166
|
var CONSOLE_ICONS = {
|
|
67
167
|
[LogLevelLabel.ERROR]: useIcon("\u2718", "\xD7"),
|
|
68
168
|
[LogLevelLabel.FATAL]: useIcon("\u{1F571}", "\xD7"),
|
|
@@ -75,1839 +175,164 @@ var CONSOLE_ICONS = {
|
|
|
75
175
|
[LogLevelLabel.ALL]: useIcon("\u2709", "\u2192")
|
|
76
176
|
};
|
|
77
177
|
|
|
78
|
-
// ../
|
|
79
|
-
var
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
var import_node_fs2 = require("fs");
|
|
83
|
-
var import_promises = require("fs/promises");
|
|
84
|
-
var import_node_path2 = require("path");
|
|
85
|
-
var import_defu2 = __toESM(require("defu"), 1);
|
|
86
|
-
var import_node_fs3 = require("fs");
|
|
87
|
-
var import_node_fs4 = require("fs");
|
|
88
|
-
var import_promises2 = require("fs/promises");
|
|
89
|
-
var STORM_DEFAULT_CONTACT = "https://stormsoftware.com/contact";
|
|
90
|
-
var STORM_DEFAULT_SOCIAL_DISCORD = "https://discord.gg/MQ6YVzakM5";
|
|
91
|
-
var STORM_DEFAULT_SOCIAL_SLACK = "https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA";
|
|
92
|
-
var STORM_DEFAULT_RELEASE_FOOTER = `
|
|
93
|
-
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.
|
|
178
|
+
// ../config-tools/src/logger/format-timestamp.ts
|
|
179
|
+
var formatTimestamp = (fullDateTime = false, date = /* @__PURE__ */ new Date()) => {
|
|
180
|
+
return fullDateTime ? `${date.toLocaleDateString()} ${date.toLocaleTimeString()}` : `${date.toLocaleTimeString()}`;
|
|
181
|
+
};
|
|
94
182
|
|
|
95
|
-
|
|
183
|
+
// ../config-tools/src/logger/get-log-level.ts
|
|
184
|
+
var getLogLevel = (label) => {
|
|
185
|
+
switch (label) {
|
|
186
|
+
case "all":
|
|
187
|
+
return LogLevel.ALL;
|
|
188
|
+
case "trace":
|
|
189
|
+
return LogLevel.TRACE;
|
|
190
|
+
case "debug":
|
|
191
|
+
return LogLevel.DEBUG;
|
|
192
|
+
case "performance":
|
|
193
|
+
return LogLevel.PERFORMANCE;
|
|
194
|
+
case "info":
|
|
195
|
+
return LogLevel.INFO;
|
|
196
|
+
case "warn":
|
|
197
|
+
return LogLevel.WARN;
|
|
198
|
+
case "error":
|
|
199
|
+
return LogLevel.ERROR;
|
|
200
|
+
case "fatal":
|
|
201
|
+
return LogLevel.FATAL;
|
|
202
|
+
case "silent":
|
|
203
|
+
return LogLevel.SILENT;
|
|
204
|
+
default:
|
|
205
|
+
return LogLevel.INFO;
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
var getLogLevelLabel = (logLevel = LogLevel.INFO) => {
|
|
209
|
+
if (logLevel >= LogLevel.ALL) {
|
|
210
|
+
return LogLevelLabel.ALL;
|
|
211
|
+
}
|
|
212
|
+
if (logLevel >= LogLevel.TRACE) {
|
|
213
|
+
return LogLevelLabel.TRACE;
|
|
214
|
+
}
|
|
215
|
+
if (logLevel >= LogLevel.DEBUG) {
|
|
216
|
+
return LogLevelLabel.DEBUG;
|
|
217
|
+
}
|
|
218
|
+
if (logLevel >= LogLevel.PERFORMANCE) {
|
|
219
|
+
return LogLevelLabel.PERFORMANCE;
|
|
220
|
+
}
|
|
221
|
+
if (logLevel >= LogLevel.INFO) {
|
|
222
|
+
return LogLevelLabel.INFO;
|
|
223
|
+
}
|
|
224
|
+
if (logLevel >= LogLevel.WARN) {
|
|
225
|
+
return LogLevelLabel.WARN;
|
|
226
|
+
}
|
|
227
|
+
if (logLevel >= LogLevel.ERROR) {
|
|
228
|
+
return LogLevelLabel.ERROR;
|
|
229
|
+
}
|
|
230
|
+
if (logLevel >= LogLevel.FATAL) {
|
|
231
|
+
return LogLevelLabel.FATAL;
|
|
232
|
+
}
|
|
233
|
+
if (logLevel <= LogLevel.SILENT) {
|
|
234
|
+
return LogLevelLabel.SILENT;
|
|
235
|
+
}
|
|
236
|
+
return LogLevelLabel.INFO;
|
|
237
|
+
};
|
|
96
238
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
var STORM_DEFAULT_ERROR_CODES_FILE = "tools/errors/codes.json";
|
|
100
|
-
var STORM_DEFAULT_BANNER_ALT = "The workspace's banner image";
|
|
101
|
-
var schemaRegistry = z.registry();
|
|
102
|
-
var colorSchema = z.string().check(
|
|
103
|
-
z.length(7),
|
|
104
|
-
z.toLowerCase(),
|
|
105
|
-
z.regex(/^#([0-9a-f]{3}){1,2}$/i),
|
|
106
|
-
z.trim()
|
|
107
|
-
);
|
|
108
|
-
schemaRegistry.add(colorSchema, {
|
|
109
|
-
description: "A base schema for describing the format of colors"
|
|
110
|
-
});
|
|
111
|
-
var darkColorSchema = z._default(colorSchema, "#1e2124");
|
|
112
|
-
schemaRegistry.add(darkColorSchema, {
|
|
113
|
-
description: "The dark background color of the workspace"
|
|
114
|
-
});
|
|
115
|
-
var lightColorSchema = z._default(colorSchema, "#cbd5e1");
|
|
116
|
-
schemaRegistry.add(lightColorSchema, {
|
|
117
|
-
description: "The light background color of the workspace"
|
|
118
|
-
});
|
|
119
|
-
var brandColorSchema = z._default(colorSchema, "#1fb2a6");
|
|
120
|
-
schemaRegistry.add(brandColorSchema, {
|
|
121
|
-
description: "The primary brand specific color of the workspace"
|
|
122
|
-
});
|
|
123
|
-
var alternateColorSchema = z.optional(colorSchema);
|
|
124
|
-
schemaRegistry.add(alternateColorSchema, {
|
|
125
|
-
description: "The alternate brand specific color of the workspace"
|
|
126
|
-
});
|
|
127
|
-
var accentColorSchema = z.optional(colorSchema);
|
|
128
|
-
schemaRegistry.add(accentColorSchema, {
|
|
129
|
-
description: "The secondary brand specific color of the workspace"
|
|
130
|
-
});
|
|
131
|
-
var linkColorSchema = z._default(colorSchema, "#3fa6ff");
|
|
132
|
-
schemaRegistry.add(linkColorSchema, {
|
|
133
|
-
description: "The color used to display hyperlink text"
|
|
134
|
-
});
|
|
135
|
-
var discoveryColorSchema = z._default(colorSchema, "#818cf8");
|
|
136
|
-
schemaRegistry.add(discoveryColorSchema, {
|
|
137
|
-
description: "The second brand specific color of the workspace"
|
|
138
|
-
});
|
|
139
|
-
var successColorSchema = z._default(colorSchema, "#45b27e");
|
|
140
|
-
schemaRegistry.add(successColorSchema, {
|
|
141
|
-
description: "The success color of the workspace"
|
|
142
|
-
});
|
|
143
|
-
var infoColorSchema = z._default(colorSchema, "#38bdf8");
|
|
144
|
-
schemaRegistry.add(infoColorSchema, {
|
|
145
|
-
description: "The informational color of the workspace"
|
|
146
|
-
});
|
|
147
|
-
var debugColorSchema = z._default(colorSchema, "#8afafc");
|
|
148
|
-
schemaRegistry.add(debugColorSchema, {
|
|
149
|
-
description: "The debug color of the workspace"
|
|
150
|
-
});
|
|
151
|
-
var warningColorSchema = z._default(colorSchema, "#f3d371");
|
|
152
|
-
schemaRegistry.add(warningColorSchema, {
|
|
153
|
-
description: "The warning color of the workspace"
|
|
154
|
-
});
|
|
155
|
-
var dangerColorSchema = z._default(colorSchema, "#d8314a");
|
|
156
|
-
schemaRegistry.add(dangerColorSchema, {
|
|
157
|
-
description: "The danger color of the workspace"
|
|
158
|
-
});
|
|
159
|
-
var fatalColorSchema = z.optional(colorSchema);
|
|
160
|
-
schemaRegistry.add(fatalColorSchema, {
|
|
161
|
-
description: "The fatal color of the workspace"
|
|
162
|
-
});
|
|
163
|
-
var performanceColorSchema = z._default(colorSchema, "#80fd74");
|
|
164
|
-
schemaRegistry.add(performanceColorSchema, {
|
|
165
|
-
description: "The performance color of the workspace"
|
|
166
|
-
});
|
|
167
|
-
var positiveColorSchema = z._default(colorSchema, "#4ade80");
|
|
168
|
-
schemaRegistry.add(positiveColorSchema, {
|
|
169
|
-
description: "The positive number color of the workspace"
|
|
170
|
-
});
|
|
171
|
-
var negativeColorSchema = z._default(colorSchema, "#ef4444");
|
|
172
|
-
schemaRegistry.add(negativeColorSchema, {
|
|
173
|
-
description: "The negative number color of the workspace"
|
|
174
|
-
});
|
|
175
|
-
var gradientStopsSchema = z.optional(z.array(colorSchema));
|
|
176
|
-
schemaRegistry.add(gradientStopsSchema, {
|
|
177
|
-
description: "The color stops for the base gradient color pattern used in the workspace"
|
|
178
|
-
});
|
|
179
|
-
var darkColorsSchema = z.object({
|
|
180
|
-
foreground: lightColorSchema,
|
|
181
|
-
background: darkColorSchema,
|
|
182
|
-
brand: brandColorSchema,
|
|
183
|
-
alternate: alternateColorSchema,
|
|
184
|
-
accent: accentColorSchema,
|
|
185
|
-
link: linkColorSchema,
|
|
186
|
-
discovery: discoveryColorSchema,
|
|
187
|
-
success: successColorSchema,
|
|
188
|
-
info: infoColorSchema,
|
|
189
|
-
debug: debugColorSchema,
|
|
190
|
-
warning: warningColorSchema,
|
|
191
|
-
danger: dangerColorSchema,
|
|
192
|
-
fatal: fatalColorSchema,
|
|
193
|
-
performance: performanceColorSchema,
|
|
194
|
-
positive: positiveColorSchema,
|
|
195
|
-
negative: negativeColorSchema,
|
|
196
|
-
gradient: gradientStopsSchema
|
|
197
|
-
});
|
|
198
|
-
var lightColorsSchema = z.object({
|
|
199
|
-
foreground: darkColorSchema,
|
|
200
|
-
background: lightColorSchema,
|
|
201
|
-
brand: brandColorSchema,
|
|
202
|
-
alternate: alternateColorSchema,
|
|
203
|
-
accent: accentColorSchema,
|
|
204
|
-
link: linkColorSchema,
|
|
205
|
-
discovery: discoveryColorSchema,
|
|
206
|
-
success: successColorSchema,
|
|
207
|
-
info: infoColorSchema,
|
|
208
|
-
debug: debugColorSchema,
|
|
209
|
-
warning: warningColorSchema,
|
|
210
|
-
danger: dangerColorSchema,
|
|
211
|
-
fatal: fatalColorSchema,
|
|
212
|
-
performance: performanceColorSchema,
|
|
213
|
-
positive: positiveColorSchema,
|
|
214
|
-
negative: negativeColorSchema,
|
|
215
|
-
gradient: gradientStopsSchema
|
|
216
|
-
});
|
|
217
|
-
var multiColorsSchema = z.object({
|
|
218
|
-
dark: darkColorsSchema,
|
|
219
|
-
light: lightColorsSchema
|
|
220
|
-
});
|
|
221
|
-
var singleColorsSchema = z.object({
|
|
222
|
-
dark: darkColorSchema,
|
|
223
|
-
light: lightColorSchema,
|
|
224
|
-
brand: brandColorSchema,
|
|
225
|
-
alternate: alternateColorSchema,
|
|
226
|
-
accent: accentColorSchema,
|
|
227
|
-
link: linkColorSchema,
|
|
228
|
-
discovery: discoveryColorSchema,
|
|
229
|
-
success: successColorSchema,
|
|
230
|
-
info: infoColorSchema,
|
|
231
|
-
debug: debugColorSchema,
|
|
232
|
-
warning: warningColorSchema,
|
|
233
|
-
danger: dangerColorSchema,
|
|
234
|
-
fatal: fatalColorSchema,
|
|
235
|
-
performance: performanceColorSchema,
|
|
236
|
-
positive: positiveColorSchema,
|
|
237
|
-
negative: negativeColorSchema,
|
|
238
|
-
gradient: gradientStopsSchema
|
|
239
|
-
});
|
|
240
|
-
var registryUrlConfigSchema = z.optional(z.url());
|
|
241
|
-
schemaRegistry.add(registryUrlConfigSchema, {
|
|
242
|
-
description: "A remote registry URL used to publish distributable packages"
|
|
243
|
-
});
|
|
244
|
-
var registrySchema = z._default(
|
|
245
|
-
z.object({
|
|
246
|
-
github: registryUrlConfigSchema,
|
|
247
|
-
npm: registryUrlConfigSchema,
|
|
248
|
-
cargo: registryUrlConfigSchema,
|
|
249
|
-
cyclone: registryUrlConfigSchema,
|
|
250
|
-
container: registryUrlConfigSchema
|
|
251
|
-
}),
|
|
252
|
-
{}
|
|
253
|
-
);
|
|
254
|
-
schemaRegistry.add(registrySchema, {
|
|
255
|
-
description: "A list of remote registry URLs used by Storm Software"
|
|
256
|
-
});
|
|
257
|
-
var colorsSchema = z.union([singleColorsSchema, multiColorsSchema]);
|
|
258
|
-
schemaRegistry.add(colorsSchema, {
|
|
259
|
-
description: "Colors used for various workspace elements"
|
|
260
|
-
});
|
|
261
|
-
var themeColorsSchema = z.record(
|
|
262
|
-
z.union([z.union([z.literal("base"), z.string()]), z.string()]),
|
|
263
|
-
colorsSchema
|
|
264
|
-
);
|
|
265
|
-
schemaRegistry.add(themeColorsSchema, {
|
|
266
|
-
description: "Storm theme config values used for styling various package elements"
|
|
267
|
-
});
|
|
268
|
-
var extendsSchema = z.optional(
|
|
269
|
-
z.union([z.string().check(z.trim()), z.array(z.string().check(z.trim()))])
|
|
270
|
-
);
|
|
271
|
-
schemaRegistry.add(extendsSchema, {
|
|
272
|
-
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."
|
|
273
|
-
});
|
|
274
|
-
var workspaceBotNameSchema = z.string().check(z.trim());
|
|
275
|
-
schemaRegistry.add(workspaceBotNameSchema, {
|
|
276
|
-
description: "The workspace bot user's name (this is the bot that will be used to perform various tasks)"
|
|
277
|
-
});
|
|
278
|
-
var workspaceBotEmailSchema = z.string().check(z.trim());
|
|
279
|
-
schemaRegistry.add(workspaceBotEmailSchema, {
|
|
280
|
-
description: "The email of the workspace bot"
|
|
281
|
-
});
|
|
282
|
-
var workspaceBotSchema = z.object({
|
|
283
|
-
name: workspaceBotNameSchema,
|
|
284
|
-
email: workspaceBotEmailSchema
|
|
285
|
-
});
|
|
286
|
-
schemaRegistry.add(workspaceBotSchema, {
|
|
287
|
-
description: "The workspace's bot user's config used to automated various operations tasks"
|
|
288
|
-
});
|
|
289
|
-
var workspaceReleaseBannerUrlSchema = z.optional(
|
|
290
|
-
z.string().check(z.trim(), z.url())
|
|
291
|
-
);
|
|
292
|
-
schemaRegistry.add(workspaceReleaseBannerUrlSchema, {
|
|
293
|
-
description: "A URL to a banner image used to display the workspace's release"
|
|
294
|
-
});
|
|
295
|
-
var workspaceReleaseBannerAltSchema = z._default(
|
|
296
|
-
z.string().check(z.trim()),
|
|
297
|
-
STORM_DEFAULT_BANNER_ALT
|
|
298
|
-
);
|
|
299
|
-
schemaRegistry.add(workspaceReleaseBannerAltSchema, {
|
|
300
|
-
description: "The alt text for the workspace's release banner image"
|
|
301
|
-
});
|
|
302
|
-
var workspaceReleaseBannerSchema = z.object({
|
|
303
|
-
url: workspaceReleaseBannerUrlSchema,
|
|
304
|
-
alt: workspaceReleaseBannerAltSchema
|
|
305
|
-
});
|
|
306
|
-
schemaRegistry.add(workspaceReleaseBannerSchema, {
|
|
307
|
-
description: "The workspace's banner image used during the release process"
|
|
308
|
-
});
|
|
309
|
-
var workspaceReleaseHeaderSchema = z.optional(
|
|
310
|
-
z.string().check(z.trim())
|
|
311
|
-
);
|
|
312
|
-
schemaRegistry.add(workspaceReleaseHeaderSchema, {
|
|
313
|
-
description: "A header message appended to the start of the workspace's release notes"
|
|
314
|
-
});
|
|
315
|
-
var workspaceReleaseFooterSchema = z.optional(
|
|
316
|
-
z.string().check(z.trim())
|
|
317
|
-
);
|
|
318
|
-
schemaRegistry.add(workspaceReleaseFooterSchema, {
|
|
319
|
-
description: "A footer message appended to the end of the workspace's release notes"
|
|
320
|
-
});
|
|
321
|
-
var workspaceReleaseSchema = z.object({
|
|
322
|
-
banner: z.union([
|
|
323
|
-
workspaceReleaseBannerSchema,
|
|
324
|
-
z.string().check(z.trim(), z.url())
|
|
325
|
-
]),
|
|
326
|
-
header: workspaceReleaseHeaderSchema,
|
|
327
|
-
footer: workspaceReleaseFooterSchema
|
|
328
|
-
});
|
|
329
|
-
schemaRegistry.add(workspaceReleaseSchema, {
|
|
330
|
-
description: "The workspace's release config used during the release process"
|
|
331
|
-
});
|
|
332
|
-
var workspaceSocialsTwitterSchema = z.optional(
|
|
333
|
-
z.string().check(z.trim())
|
|
334
|
-
);
|
|
335
|
-
schemaRegistry.add(workspaceSocialsTwitterSchema, {
|
|
336
|
-
description: "A Twitter/X account associated with the organization/project"
|
|
337
|
-
});
|
|
338
|
-
var workspaceSocialsDiscordSchema = z.optional(
|
|
339
|
-
z.string().check(z.trim())
|
|
340
|
-
);
|
|
341
|
-
schemaRegistry.add(workspaceSocialsDiscordSchema, {
|
|
342
|
-
description: "A Discord account associated with the organization/project"
|
|
343
|
-
});
|
|
344
|
-
var workspaceSocialsTelegramSchema = z.optional(
|
|
345
|
-
z.string().check(z.trim())
|
|
346
|
-
);
|
|
347
|
-
schemaRegistry.add(workspaceSocialsTelegramSchema, {
|
|
348
|
-
description: "A Telegram account associated with the organization/project"
|
|
349
|
-
});
|
|
350
|
-
var workspaceSocialsSlackSchema = z.optional(
|
|
351
|
-
z.string().check(z.trim())
|
|
352
|
-
);
|
|
353
|
-
schemaRegistry.add(workspaceSocialsSlackSchema, {
|
|
354
|
-
description: "A Slack account associated with the organization/project"
|
|
355
|
-
});
|
|
356
|
-
var workspaceSocialsMediumSchema = z.optional(
|
|
357
|
-
z.string().check(z.trim())
|
|
358
|
-
);
|
|
359
|
-
schemaRegistry.add(workspaceSocialsMediumSchema, {
|
|
360
|
-
description: "A Medium account associated with the organization/project"
|
|
361
|
-
});
|
|
362
|
-
var workspaceSocialsGithubSchema = z.optional(
|
|
363
|
-
z.string().check(z.trim())
|
|
364
|
-
);
|
|
365
|
-
schemaRegistry.add(workspaceSocialsGithubSchema, {
|
|
366
|
-
description: "A GitHub account associated with the organization/project"
|
|
367
|
-
});
|
|
368
|
-
var workspaceSocialsSchema = z.object({
|
|
369
|
-
twitter: workspaceSocialsTwitterSchema,
|
|
370
|
-
discord: workspaceSocialsDiscordSchema,
|
|
371
|
-
telegram: workspaceSocialsTelegramSchema,
|
|
372
|
-
slack: workspaceSocialsSlackSchema,
|
|
373
|
-
medium: workspaceSocialsMediumSchema,
|
|
374
|
-
github: workspaceSocialsGithubSchema
|
|
375
|
-
});
|
|
376
|
-
schemaRegistry.add(workspaceSocialsSchema, {
|
|
377
|
-
description: "The workspace's account config used to store various social media links"
|
|
378
|
-
});
|
|
379
|
-
var workspaceDirectoryCacheSchema = z.optional(
|
|
380
|
-
z.string().check(z.trim())
|
|
381
|
-
);
|
|
382
|
-
schemaRegistry.add(workspaceDirectoryCacheSchema, {
|
|
383
|
-
description: "The directory used to store the environment's cached file data"
|
|
384
|
-
});
|
|
385
|
-
var workspaceDirectoryDataSchema = z.optional(
|
|
386
|
-
z.string().check(z.trim())
|
|
387
|
-
);
|
|
388
|
-
schemaRegistry.add(workspaceDirectoryDataSchema, {
|
|
389
|
-
description: "The directory used to store the environment's data files"
|
|
390
|
-
});
|
|
391
|
-
var workspaceDirectoryConfigSchema = z.optional(
|
|
392
|
-
z.string().check(z.trim())
|
|
393
|
-
);
|
|
394
|
-
schemaRegistry.add(workspaceDirectoryConfigSchema, {
|
|
395
|
-
description: "The directory used to store the environment's configuration files"
|
|
396
|
-
});
|
|
397
|
-
var workspaceDirectoryTempSchema = z.optional(
|
|
398
|
-
z.string().check(z.trim())
|
|
399
|
-
);
|
|
400
|
-
schemaRegistry.add(workspaceDirectoryTempSchema, {
|
|
401
|
-
description: "The directory used to store the environment's temp files"
|
|
402
|
-
});
|
|
403
|
-
var workspaceDirectoryLogSchema = z.optional(
|
|
404
|
-
z.string().check(z.trim())
|
|
405
|
-
);
|
|
406
|
-
schemaRegistry.add(workspaceDirectoryLogSchema, {
|
|
407
|
-
description: "The directory used to store the environment's log files"
|
|
408
|
-
});
|
|
409
|
-
var workspaceDirectoryBuildSchema = z._default(
|
|
410
|
-
z.string().check(z.trim()),
|
|
411
|
-
"dist"
|
|
412
|
-
);
|
|
413
|
-
schemaRegistry.add(workspaceDirectoryBuildSchema, {
|
|
414
|
-
description: "The directory used to store the workspace's distributable files after a build (relative to the workspace root)"
|
|
415
|
-
});
|
|
416
|
-
var workspaceDirectorySchema = z.object({
|
|
417
|
-
cache: workspaceDirectoryCacheSchema,
|
|
418
|
-
data: workspaceDirectoryDataSchema,
|
|
419
|
-
config: workspaceDirectoryConfigSchema,
|
|
420
|
-
temp: workspaceDirectoryTempSchema,
|
|
421
|
-
log: workspaceDirectoryLogSchema,
|
|
422
|
-
build: workspaceDirectoryBuildSchema
|
|
423
|
-
});
|
|
424
|
-
schemaRegistry.add(workspaceDirectorySchema, {
|
|
425
|
-
description: "Various directories used by the workspace to store data, cache, and configuration files"
|
|
426
|
-
});
|
|
427
|
-
var variantSchema = z._default(
|
|
428
|
-
z.enum(["minimal", "monorepo"]),
|
|
429
|
-
"monorepo"
|
|
430
|
-
);
|
|
431
|
-
schemaRegistry.add(variantSchema, {
|
|
432
|
-
description: "The variant of the workspace. This can be used to enable or disable certain features or configurations."
|
|
433
|
-
});
|
|
434
|
-
var errorCodesFileSchema = z._default(
|
|
435
|
-
z.string().check(z.trim()),
|
|
436
|
-
STORM_DEFAULT_ERROR_CODES_FILE
|
|
437
|
-
);
|
|
438
|
-
schemaRegistry.add(errorCodesFileSchema, {
|
|
439
|
-
description: "The path to the workspace's error codes JSON file"
|
|
440
|
-
});
|
|
441
|
-
var errorUrlSchema = z.optional(z.url());
|
|
442
|
-
schemaRegistry.add(errorUrlSchema, {
|
|
443
|
-
description: "A URL to a page that looks up the workspace's error messages given a specific error code"
|
|
444
|
-
});
|
|
445
|
-
var errorSchema = z.object({
|
|
446
|
-
codesFile: errorCodesFileSchema,
|
|
447
|
-
url: errorUrlSchema
|
|
448
|
-
});
|
|
449
|
-
schemaRegistry.add(errorSchema, {
|
|
450
|
-
description: "The workspace's error config used when creating error details during a system error"
|
|
451
|
-
});
|
|
452
|
-
var organizationNameSchema = z.optional(
|
|
453
|
-
z.string().check(z.trim(), z.toLowerCase())
|
|
454
|
-
);
|
|
455
|
-
schemaRegistry.add(organizationNameSchema, {
|
|
456
|
-
description: "The name of the organization"
|
|
457
|
-
});
|
|
458
|
-
var organizationDescriptionSchema = z.optional(
|
|
459
|
-
z.string().check(z.trim())
|
|
460
|
-
);
|
|
461
|
-
schemaRegistry.add(organizationDescriptionSchema, {
|
|
462
|
-
description: "A description of the organization"
|
|
463
|
-
});
|
|
464
|
-
var organizationLogoSchema = z.optional(z.url());
|
|
465
|
-
schemaRegistry.add(organizationLogoSchema, {
|
|
466
|
-
description: "A URL to the organization's logo image"
|
|
467
|
-
});
|
|
468
|
-
var organizationIconSchema = z.optional(z.url());
|
|
469
|
-
schemaRegistry.add(organizationIconSchema, {
|
|
470
|
-
description: "A URL to the organization's icon image"
|
|
471
|
-
});
|
|
472
|
-
var organizationUrlSchema = z.optional(z.url());
|
|
473
|
-
schemaRegistry.add(organizationUrlSchema, {
|
|
474
|
-
description: "A URL to a page that provides more information about the organization"
|
|
475
|
-
});
|
|
476
|
-
var organizationSchema = z.object({
|
|
477
|
-
name: organizationNameSchema,
|
|
478
|
-
description: organizationDescriptionSchema,
|
|
479
|
-
logo: organizationLogoSchema,
|
|
480
|
-
icon: organizationIconSchema,
|
|
481
|
-
url: organizationUrlSchema
|
|
482
|
-
});
|
|
483
|
-
schemaRegistry.add(organizationSchema, {
|
|
484
|
-
description: "The workspace's organization details"
|
|
485
|
-
});
|
|
486
|
-
var schemaNameSchema = z._default(
|
|
487
|
-
z.string().check(z.trim(), z.toLowerCase()),
|
|
488
|
-
"https://public.storm-cdn.com/schemas/storm-workspace.schema.json"
|
|
489
|
-
);
|
|
490
|
-
schemaRegistry.add(schemaNameSchema, {
|
|
491
|
-
description: "The URL or file path to the JSON schema file that describes the Storm configuration file"
|
|
492
|
-
});
|
|
493
|
-
var nameSchema = z.string().check(z.trim(), z.toLowerCase());
|
|
494
|
-
schemaRegistry.add(nameSchema, {
|
|
495
|
-
description: "The name of the workspace/project/service/package/scope using this configuration"
|
|
496
|
-
});
|
|
497
|
-
var namespaceSchema = z.string().check(z.trim(), z.toLowerCase());
|
|
498
|
-
schemaRegistry.add(namespaceSchema, {
|
|
499
|
-
description: "The namespace of the workspace/project/service/package/scope using this configuration"
|
|
500
|
-
});
|
|
501
|
-
var orgSchema = z.union([
|
|
502
|
-
organizationSchema,
|
|
503
|
-
z.string().check(z.trim(), z.toLowerCase())
|
|
504
|
-
]);
|
|
505
|
-
schemaRegistry.add(orgSchema, {
|
|
506
|
-
description: "The organization of the workspace. This can be a string or an object containing the organization's details"
|
|
507
|
-
});
|
|
508
|
-
var repositorySchema = z.string().check(z.trim(), z.toLowerCase());
|
|
509
|
-
schemaRegistry.add(repositorySchema, {
|
|
510
|
-
description: "The repo URL of the workspace (i.e. the GitHub repository URL)"
|
|
511
|
-
});
|
|
512
|
-
var licenseSchema = z._default(
|
|
513
|
-
z.string().check(z.trim()),
|
|
514
|
-
"Apache-2.0"
|
|
515
|
-
);
|
|
516
|
-
schemaRegistry.add(licenseSchema, {
|
|
517
|
-
description: "The license type of the package"
|
|
518
|
-
});
|
|
519
|
-
var homepageSchema = z.optional(z.url());
|
|
520
|
-
schemaRegistry.add(homepageSchema, {
|
|
521
|
-
description: "The homepage of the workspace"
|
|
522
|
-
});
|
|
523
|
-
var docsSchema = z.optional(z.url());
|
|
524
|
-
schemaRegistry.add(docsSchema, {
|
|
525
|
-
description: "The documentation site for the workspace"
|
|
526
|
-
});
|
|
527
|
-
var portalSchema = z.optional(z.url());
|
|
528
|
-
schemaRegistry.add(portalSchema, {
|
|
529
|
-
description: "The development portal site for the workspace"
|
|
530
|
-
});
|
|
531
|
-
var licensingSchema = z.optional(z.url());
|
|
532
|
-
schemaRegistry.add(licensingSchema, {
|
|
533
|
-
description: "The licensing site for the workspace"
|
|
534
|
-
});
|
|
535
|
-
var contactSchema = z.optional(z.url());
|
|
536
|
-
schemaRegistry.add(contactSchema, {
|
|
537
|
-
description: "The contact site for the workspace"
|
|
538
|
-
});
|
|
539
|
-
var supportSchema = z.optional(z.url());
|
|
540
|
-
schemaRegistry.add(supportSchema, {
|
|
541
|
-
description: "The support site for the workspace. If not provided, this is defaulted to the `contact` config value"
|
|
542
|
-
});
|
|
543
|
-
var branchSchema = z._default(
|
|
544
|
-
z.string().check(z.trim(), z.toLowerCase()),
|
|
545
|
-
"main"
|
|
546
|
-
);
|
|
547
|
-
schemaRegistry.add(branchSchema, {
|
|
548
|
-
description: "The branch of the workspace"
|
|
549
|
-
});
|
|
550
|
-
var preidSchema = z.optional(
|
|
551
|
-
z.string().check(z.trim(), z.toLowerCase())
|
|
552
|
-
);
|
|
553
|
-
schemaRegistry.add(preidSchema, {
|
|
554
|
-
description: "A tag specifying the version pre-release identifier"
|
|
555
|
-
});
|
|
556
|
-
var ownerSchema = z.optional(
|
|
557
|
-
z.string().check(z.trim(), z.toLowerCase())
|
|
558
|
-
);
|
|
559
|
-
schemaRegistry.add(ownerSchema, {
|
|
560
|
-
description: "The owner of the package"
|
|
561
|
-
});
|
|
562
|
-
var modeSchema = z._default(
|
|
563
|
-
z.enum(["development", "test", "production"]).check(z.trim(), z.toLowerCase()),
|
|
564
|
-
"production"
|
|
565
|
-
);
|
|
566
|
-
schemaRegistry.add(modeSchema, {
|
|
567
|
-
description: "The current runtime environment mode for the package"
|
|
568
|
-
});
|
|
569
|
-
var workspaceRootSchema = z.string().check(z.trim(), z.toLowerCase());
|
|
570
|
-
schemaRegistry.add(workspaceRootSchema, {
|
|
571
|
-
description: "The root directory of the workspace"
|
|
572
|
-
});
|
|
573
|
-
var skipCacheSchema = z._default(z.boolean(), false);
|
|
574
|
-
schemaRegistry.add(skipCacheSchema, {
|
|
575
|
-
description: "Should all known types of workspace caching be skipped?"
|
|
576
|
-
});
|
|
577
|
-
var packageManagerSchema = z._default(
|
|
578
|
-
z.enum(["npm", "yarn", "pnpm", "bun"]),
|
|
579
|
-
"npm"
|
|
580
|
-
);
|
|
581
|
-
schemaRegistry.add(packageManagerSchema, {
|
|
582
|
-
description: "The JavaScript/TypeScript package manager used by the repository"
|
|
583
|
-
});
|
|
584
|
-
var timezoneSchema = z._default(
|
|
585
|
-
z.string().check(z.trim()),
|
|
586
|
-
"America/New_York"
|
|
587
|
-
);
|
|
588
|
-
schemaRegistry.add(timezoneSchema, {
|
|
589
|
-
description: "The default timezone of the workspace"
|
|
590
|
-
});
|
|
591
|
-
var localeSchema = z._default(z.string().check(z.trim()), "en-US");
|
|
592
|
-
schemaRegistry.add(localeSchema, {
|
|
593
|
-
description: "The default locale of the workspace"
|
|
594
|
-
});
|
|
595
|
-
var logLevelSchema = z._default(
|
|
596
|
-
z.enum([
|
|
597
|
-
"silent",
|
|
598
|
-
"fatal",
|
|
599
|
-
"error",
|
|
600
|
-
"warn",
|
|
601
|
-
"success",
|
|
602
|
-
"info",
|
|
603
|
-
"performance",
|
|
604
|
-
"debug",
|
|
605
|
-
"trace",
|
|
606
|
-
"all"
|
|
607
|
-
]),
|
|
608
|
-
"info"
|
|
609
|
-
);
|
|
610
|
-
schemaRegistry.add(logLevelSchema, {
|
|
611
|
-
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`)."
|
|
612
|
-
});
|
|
613
|
-
var skipConfigLoggingSchema = z._default(z.boolean(), true);
|
|
614
|
-
schemaRegistry.add(skipConfigLoggingSchema, {
|
|
615
|
-
description: "Should the logging of the current Storm Workspace configuration be skipped?"
|
|
616
|
-
});
|
|
617
|
-
var configFileSchema = z._default(
|
|
618
|
-
z.nullable(z.string().check(z.trim())),
|
|
619
|
-
null
|
|
620
|
-
);
|
|
621
|
-
schemaRegistry.add(configFileSchema, {
|
|
622
|
-
description: "The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
|
|
623
|
-
});
|
|
624
|
-
var extensionsSchema = z._default(z.record(z.string(), z.any()), {});
|
|
625
|
-
schemaRegistry.add(extensionsSchema, {
|
|
626
|
-
description: "Configuration of each used extension"
|
|
627
|
-
});
|
|
628
|
-
var workspaceConfigSchema = z.object({
|
|
629
|
-
$schema: schemaNameSchema,
|
|
630
|
-
extends: extendsSchema,
|
|
631
|
-
name: nameSchema,
|
|
632
|
-
variant: variantSchema,
|
|
633
|
-
namespace: namespaceSchema,
|
|
634
|
-
organization: orgSchema,
|
|
635
|
-
repository: repositorySchema,
|
|
636
|
-
license: licenseSchema,
|
|
637
|
-
homepage: homepageSchema,
|
|
638
|
-
docs: docsSchema,
|
|
639
|
-
portal: portalSchema,
|
|
640
|
-
licensing: licensingSchema,
|
|
641
|
-
contact: contactSchema,
|
|
642
|
-
support: supportSchema,
|
|
643
|
-
branch: branchSchema,
|
|
644
|
-
preid: preidSchema,
|
|
645
|
-
owner: ownerSchema,
|
|
646
|
-
bot: workspaceBotSchema,
|
|
647
|
-
release: workspaceReleaseSchema,
|
|
648
|
-
socials: workspaceSocialsSchema,
|
|
649
|
-
error: errorSchema,
|
|
650
|
-
mode: modeSchema,
|
|
651
|
-
workspaceRoot: workspaceRootSchema,
|
|
652
|
-
skipCache: skipCacheSchema,
|
|
653
|
-
directories: workspaceDirectorySchema,
|
|
654
|
-
packageManager: packageManagerSchema,
|
|
655
|
-
timezone: timezoneSchema,
|
|
656
|
-
locale: localeSchema,
|
|
657
|
-
logLevel: logLevelSchema,
|
|
658
|
-
skipConfigLogging: skipConfigLoggingSchema,
|
|
659
|
-
registry: registrySchema,
|
|
660
|
-
configFile: configFileSchema,
|
|
661
|
-
colors: z.union([colorsSchema, themeColorsSchema]),
|
|
662
|
-
extensions: extensionsSchema
|
|
663
|
-
});
|
|
664
|
-
schemaRegistry.add(extensionsSchema, {
|
|
665
|
-
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."
|
|
666
|
-
});
|
|
667
|
-
|
|
668
|
-
// ../build-tools/dist/chunk-JCFRYUYP.mjs
|
|
669
|
-
var import_create_task_graph = require("nx/src/tasks-runner/create-task-graph");
|
|
670
|
-
|
|
671
|
-
// ../build-tools/dist/chunk-44MPIE3V.mjs
|
|
672
|
-
var import_internal = require("@nx/js/internal");
|
|
673
|
-
var import_glob = require("glob");
|
|
674
|
-
var import_promises3 = require("fs/promises");
|
|
675
|
-
|
|
676
|
-
// ../build-tools/dist/chunk-V3HXNKBB.mjs
|
|
677
|
-
var import_internal2 = require("@nx/js/internal");
|
|
678
|
-
var import_glob2 = require("glob");
|
|
679
|
-
var import_node_fs5 = require("fs");
|
|
680
|
-
var import_promises4 = require("fs/promises");
|
|
681
|
-
var import_project_graph = require("nx/src/project-graph/project-graph");
|
|
682
|
-
|
|
683
|
-
// ../build-tools/dist/chunk-UFGXOQSU.mjs
|
|
684
|
-
var import_glob3 = require("glob");
|
|
685
|
-
|
|
686
|
-
// ../build-tools/dist/chunk-TJ6NHBO5.mjs
|
|
687
|
-
var DEFAULT_JS_BANNER = `
|
|
688
|
-
// ---------------------------------------
|
|
689
|
-
// \u{1F5F2} Built by Storm Software
|
|
690
|
-
// ---------------------------------------
|
|
691
|
-
`;
|
|
692
|
-
var DEFAULT_CSS_BANNER = `
|
|
693
|
-
/* ---------------------------------------
|
|
694
|
-
\u{1F5F2} Built by Storm Software
|
|
695
|
-
--------------------------------------- */
|
|
696
|
-
`;
|
|
697
|
-
var DEFAULT_ENVIRONMENT = "production";
|
|
698
|
-
var DEFAULT_ORGANIZATION = "storm-software";
|
|
699
|
-
|
|
700
|
-
// ../build-tools/dist/chunk-FEQZSI32.mjs
|
|
701
|
-
var getEnv = (builder, options) => {
|
|
702
|
-
return {
|
|
703
|
-
STORM_BUILD: builder,
|
|
704
|
-
STORM_ORG: options.orgName || DEFAULT_ORGANIZATION,
|
|
705
|
-
STORM_NAME: options.name,
|
|
706
|
-
STORM_MODE: options.mode || DEFAULT_ENVIRONMENT,
|
|
707
|
-
STORM_PLATFORM: options.platform,
|
|
708
|
-
STORM_FORMAT: JSON.stringify(options.format),
|
|
709
|
-
STORM_TARGET: JSON.stringify(options.target),
|
|
710
|
-
...options.env
|
|
711
|
-
};
|
|
712
|
-
};
|
|
713
|
-
|
|
714
|
-
// ../build-tools/dist/chunk-7YKXR5JJ.mjs
|
|
715
|
-
var import_core = require("@swc/core");
|
|
716
|
-
|
|
717
|
-
// ../build-tools/dist/chunk-W7UFCEAQ.mjs
|
|
718
|
-
var import_node_fs6 = __toESM(require("fs"), 1);
|
|
719
|
-
var import_node_module = require("module");
|
|
720
|
-
var import_node_path3 = __toESM(require("path"), 1);
|
|
721
|
-
var import_resolve = __toESM(require("resolve"), 1);
|
|
722
|
-
|
|
723
|
-
// ../build-tools/dist/chunk-VGLIZ2H3.mjs
|
|
724
|
-
var import_devkit = require("@nx/devkit");
|
|
725
|
-
var import_path = require("path");
|
|
726
|
-
|
|
727
|
-
// ../config-tools/dist/chunk-RUKM6FCF.js
|
|
728
|
-
var import_node_fs7 = require("fs");
|
|
729
|
-
var import_node_path4 = require("path");
|
|
730
|
-
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
731
|
-
var depth = 0;
|
|
732
|
-
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
733
|
-
const _startPath = startPath ?? process.cwd();
|
|
734
|
-
if (endDirectoryNames.some(
|
|
735
|
-
(endDirName) => (0, import_node_fs7.existsSync)((0, import_node_path4.join)(_startPath, endDirName))
|
|
736
|
-
)) {
|
|
737
|
-
return _startPath;
|
|
738
|
-
}
|
|
739
|
-
if (endFileNames.some((endFileName) => (0, import_node_fs7.existsSync)((0, import_node_path4.join)(_startPath, endFileName)))) {
|
|
740
|
-
return _startPath;
|
|
741
|
-
}
|
|
742
|
-
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
743
|
-
const parent = (0, import_node_path4.join)(_startPath, "..");
|
|
744
|
-
return findFolderUp(parent, endFileNames, endDirectoryNames);
|
|
745
|
-
}
|
|
746
|
-
return void 0;
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
// ../config-tools/dist/chunk-V3GMJ4TX.js
|
|
750
|
-
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
751
|
-
function normalizeWindowsPath(input = "") {
|
|
752
|
-
if (!input) {
|
|
753
|
-
return input;
|
|
754
|
-
}
|
|
755
|
-
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r3) => r3.toUpperCase());
|
|
756
|
-
}
|
|
757
|
-
var _UNC_REGEX = /^[/\\]{2}/;
|
|
758
|
-
var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
759
|
-
var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
760
|
-
var correctPaths2 = function(path2) {
|
|
761
|
-
if (!path2 || path2.length === 0) {
|
|
762
|
-
return ".";
|
|
763
|
-
}
|
|
764
|
-
path2 = normalizeWindowsPath(path2);
|
|
765
|
-
const isUNCPath = path2?.match(_UNC_REGEX);
|
|
766
|
-
const isPathAbsolute = isAbsolute(path2);
|
|
767
|
-
const trailingSeparator = path2[path2.length - 1] === "/";
|
|
768
|
-
path2 = normalizeString(path2, !isPathAbsolute);
|
|
769
|
-
if (path2.length === 0) {
|
|
770
|
-
if (isPathAbsolute) {
|
|
771
|
-
return "/";
|
|
772
|
-
}
|
|
773
|
-
return trailingSeparator ? "./" : ".";
|
|
774
|
-
}
|
|
775
|
-
if (trailingSeparator) {
|
|
776
|
-
path2 += "/";
|
|
777
|
-
}
|
|
778
|
-
if (_DRIVE_LETTER_RE.test(path2)) {
|
|
779
|
-
path2 += "/";
|
|
780
|
-
}
|
|
781
|
-
if (isUNCPath) {
|
|
782
|
-
if (!isPathAbsolute) {
|
|
783
|
-
return `//./${path2}`;
|
|
784
|
-
}
|
|
785
|
-
return `//${path2}`;
|
|
786
|
-
}
|
|
787
|
-
return isPathAbsolute && !isAbsolute(path2) ? `/${path2}` : path2;
|
|
788
|
-
};
|
|
789
|
-
var joinPaths2 = function(...segments) {
|
|
790
|
-
let path2 = "";
|
|
791
|
-
for (const seg of segments) {
|
|
792
|
-
if (!seg) {
|
|
793
|
-
continue;
|
|
794
|
-
}
|
|
795
|
-
if (path2.length > 0) {
|
|
796
|
-
const pathTrailing = path2[path2.length - 1] === "/";
|
|
797
|
-
const segLeading = seg[0] === "/";
|
|
798
|
-
const both = pathTrailing && segLeading;
|
|
799
|
-
if (both) {
|
|
800
|
-
path2 += seg.slice(1);
|
|
801
|
-
} else {
|
|
802
|
-
path2 += pathTrailing || segLeading ? seg : `/${seg}`;
|
|
803
|
-
}
|
|
804
|
-
} else {
|
|
805
|
-
path2 += seg;
|
|
806
|
-
}
|
|
807
|
-
}
|
|
808
|
-
return correctPaths2(path2);
|
|
809
|
-
};
|
|
810
|
-
function normalizeString(path2, allowAboveRoot) {
|
|
811
|
-
let res = "";
|
|
812
|
-
let lastSegmentLength = 0;
|
|
813
|
-
let lastSlash = -1;
|
|
814
|
-
let dots = 0;
|
|
815
|
-
let char = null;
|
|
816
|
-
for (let index = 0; index <= path2.length; ++index) {
|
|
817
|
-
if (index < path2.length) {
|
|
818
|
-
char = path2[index];
|
|
819
|
-
} else if (char === "/") {
|
|
820
|
-
break;
|
|
821
|
-
} else {
|
|
822
|
-
char = "/";
|
|
823
|
-
}
|
|
824
|
-
if (char === "/") {
|
|
825
|
-
if (lastSlash === index - 1 || dots === 1) {
|
|
826
|
-
} else if (dots === 2) {
|
|
827
|
-
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
828
|
-
if (res.length > 2) {
|
|
829
|
-
const lastSlashIndex = res.lastIndexOf("/");
|
|
830
|
-
if (lastSlashIndex === -1) {
|
|
831
|
-
res = "";
|
|
832
|
-
lastSegmentLength = 0;
|
|
833
|
-
} else {
|
|
834
|
-
res = res.slice(0, lastSlashIndex);
|
|
835
|
-
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
836
|
-
}
|
|
837
|
-
lastSlash = index;
|
|
838
|
-
dots = 0;
|
|
839
|
-
continue;
|
|
840
|
-
} else if (res.length > 0) {
|
|
841
|
-
res = "";
|
|
842
|
-
lastSegmentLength = 0;
|
|
843
|
-
lastSlash = index;
|
|
844
|
-
dots = 0;
|
|
845
|
-
continue;
|
|
846
|
-
}
|
|
847
|
-
}
|
|
848
|
-
if (allowAboveRoot) {
|
|
849
|
-
res += res.length > 0 ? "/.." : "..";
|
|
850
|
-
lastSegmentLength = 2;
|
|
851
|
-
}
|
|
852
|
-
} else {
|
|
853
|
-
if (res.length > 0) {
|
|
854
|
-
res += `/${path2.slice(lastSlash + 1, index)}`;
|
|
855
|
-
} else {
|
|
856
|
-
res = path2.slice(lastSlash + 1, index);
|
|
857
|
-
}
|
|
858
|
-
lastSegmentLength = index - lastSlash - 1;
|
|
859
|
-
}
|
|
860
|
-
lastSlash = index;
|
|
861
|
-
dots = 0;
|
|
862
|
-
} else if (char === "." && dots !== -1) {
|
|
863
|
-
++dots;
|
|
864
|
-
} else {
|
|
865
|
-
dots = -1;
|
|
866
|
-
}
|
|
867
|
-
}
|
|
868
|
-
return res;
|
|
869
|
-
}
|
|
870
|
-
var isAbsolute = function(p3) {
|
|
871
|
-
return _IS_ABSOLUTE_RE.test(p3);
|
|
872
|
-
};
|
|
873
|
-
|
|
874
|
-
// ../config-tools/dist/chunk-LF3SAK2O.js
|
|
875
|
-
var rootFiles = [
|
|
876
|
-
"storm-workspace.json",
|
|
877
|
-
"storm-workspace.yaml",
|
|
878
|
-
"storm-workspace.yml",
|
|
879
|
-
"storm-workspace.js",
|
|
880
|
-
"storm-workspace.ts",
|
|
881
|
-
".storm-workspace.json",
|
|
882
|
-
".storm-workspace.yaml",
|
|
883
|
-
".storm-workspace.yml",
|
|
884
|
-
".storm-workspace.js",
|
|
885
|
-
".storm-workspace.ts",
|
|
886
|
-
"lerna.json",
|
|
887
|
-
"nx.json",
|
|
888
|
-
"turbo.json",
|
|
889
|
-
"npm-workspace.json",
|
|
890
|
-
"yarn-workspace.json",
|
|
891
|
-
"pnpm-workspace.json",
|
|
892
|
-
"npm-workspace.yaml",
|
|
893
|
-
"yarn-workspace.yaml",
|
|
894
|
-
"pnpm-workspace.yaml",
|
|
895
|
-
"npm-workspace.yml",
|
|
896
|
-
"yarn-workspace.yml",
|
|
897
|
-
"pnpm-workspace.yml",
|
|
898
|
-
"npm-lock.json",
|
|
899
|
-
"yarn-lock.json",
|
|
900
|
-
"pnpm-lock.json",
|
|
901
|
-
"npm-lock.yaml",
|
|
902
|
-
"yarn-lock.yaml",
|
|
903
|
-
"pnpm-lock.yaml",
|
|
904
|
-
"npm-lock.yml",
|
|
905
|
-
"yarn-lock.yml",
|
|
906
|
-
"pnpm-lock.yml",
|
|
907
|
-
"bun.lockb"
|
|
908
|
-
];
|
|
909
|
-
var rootDirectories = [
|
|
910
|
-
".storm-workspace",
|
|
911
|
-
".nx",
|
|
912
|
-
".git",
|
|
913
|
-
".github",
|
|
914
|
-
".vscode",
|
|
915
|
-
".verdaccio"
|
|
916
|
-
];
|
|
917
|
-
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
918
|
-
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
919
|
-
return correctPaths2(
|
|
920
|
-
process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH
|
|
921
|
-
);
|
|
922
|
-
}
|
|
923
|
-
return correctPaths2(
|
|
924
|
-
findFolderUp(
|
|
925
|
-
pathInsideMonorepo ?? process.cwd(),
|
|
926
|
-
rootFiles,
|
|
927
|
-
rootDirectories
|
|
928
|
-
)
|
|
929
|
-
);
|
|
930
|
-
}
|
|
931
|
-
function findWorkspaceRoot2(pathInsideMonorepo) {
|
|
932
|
-
const result = findWorkspaceRootSafe(pathInsideMonorepo);
|
|
933
|
-
if (!result) {
|
|
934
|
-
throw new Error(
|
|
935
|
-
`Cannot find workspace root upwards from known path. Files search list includes:
|
|
936
|
-
${rootFiles.join(
|
|
937
|
-
"\n"
|
|
938
|
-
)}
|
|
939
|
-
Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
|
|
940
|
-
);
|
|
941
|
-
}
|
|
942
|
-
return result;
|
|
943
|
-
}
|
|
944
|
-
|
|
945
|
-
// ../config-tools/dist/chunk-5J2SS4QU.js
|
|
946
|
-
var DEFAULT_COLOR_CONFIG = {
|
|
947
|
-
light: {
|
|
948
|
-
background: "#fafafa",
|
|
949
|
-
foreground: "#1d1e22",
|
|
950
|
-
brand: "#1fb2a6",
|
|
951
|
-
alternate: "#db2777",
|
|
952
|
-
discovery: "#5C4EE5",
|
|
953
|
-
success: "#087f5b",
|
|
954
|
-
info: "#0550ae",
|
|
955
|
-
debug: "#8afafc",
|
|
956
|
-
warning: "#e3b341",
|
|
957
|
-
danger: "#D8314A",
|
|
958
|
-
fatal: "#51070f",
|
|
959
|
-
performance: "#13c302",
|
|
960
|
-
link: "#3fa6ff",
|
|
961
|
-
positive: "#22c55e",
|
|
962
|
-
negative: "#dc2626",
|
|
963
|
-
gradient: ["#1fb2a6", "#db2777", "#5C4EE5"]
|
|
964
|
-
},
|
|
965
|
-
dark: {
|
|
966
|
-
background: "#1e2124",
|
|
967
|
-
foreground: "#cbd5e1",
|
|
968
|
-
brand: "#2dd4bf",
|
|
969
|
-
alternate: "#db2777",
|
|
970
|
-
discovery: "#818cf8",
|
|
971
|
-
success: "#10b981",
|
|
972
|
-
info: "#58a6ff",
|
|
973
|
-
debug: "#8afafc",
|
|
974
|
-
warning: "#f3d371",
|
|
975
|
-
danger: "#D8314A",
|
|
976
|
-
fatal: "#a40e26",
|
|
977
|
-
performance: "#80fd74",
|
|
978
|
-
link: "#3fa6ff",
|
|
979
|
-
positive: "#22c55e",
|
|
980
|
-
negative: "#dc2626",
|
|
981
|
-
gradient: ["#1fb2a6", "#db2777", "#818cf8"]
|
|
982
|
-
}
|
|
983
|
-
};
|
|
984
|
-
|
|
985
|
-
// ../config-tools/dist/chunk-HVVJHTFS.js
|
|
986
|
-
var import_chalk2 = __toESM(require("chalk"), 1);
|
|
987
|
-
var chalkDefault = {
|
|
988
|
-
hex: (_3) => (message) => message,
|
|
989
|
-
bgHex: (_3) => ({
|
|
990
|
-
whiteBright: (message) => message,
|
|
991
|
-
white: (message) => message
|
|
992
|
-
}),
|
|
993
|
-
white: (message) => message,
|
|
994
|
-
whiteBright: (message) => message,
|
|
995
|
-
gray: (message) => message,
|
|
996
|
-
bold: {
|
|
997
|
-
hex: (_3) => (message) => message,
|
|
998
|
-
bgHex: (_3) => ({
|
|
999
|
-
whiteBright: (message) => message,
|
|
1000
|
-
white: (message) => message
|
|
1001
|
-
}),
|
|
1002
|
-
whiteBright: (message) => message,
|
|
1003
|
-
white: (message) => message
|
|
1004
|
-
},
|
|
1005
|
-
dim: {
|
|
1006
|
-
hex: (_3) => (message) => message,
|
|
1007
|
-
gray: (message) => message
|
|
1008
|
-
}
|
|
1009
|
-
};
|
|
1010
|
-
var getChalk = () => {
|
|
1011
|
-
let _chalk = import_chalk2.default;
|
|
1012
|
-
if (!_chalk?.hex || !_chalk?.bold?.hex || !_chalk?.bgHex || !_chalk?.whiteBright || !_chalk?.white) {
|
|
1013
|
-
_chalk = chalkDefault;
|
|
1014
|
-
}
|
|
1015
|
-
return _chalk;
|
|
1016
|
-
};
|
|
1017
|
-
|
|
1018
|
-
// ../config-tools/dist/chunk-G2MK47WL.js
|
|
1019
|
-
function isUnicodeSupported2() {
|
|
1020
|
-
if (process.platform !== "win32") {
|
|
1021
|
-
return process.env.TERM !== "linux";
|
|
1022
|
-
}
|
|
1023
|
-
return Boolean(process.env.WT_SESSION) || // Windows Terminal
|
|
1024
|
-
Boolean(process.env.TERMINUS_SUBLIME) || // Terminus (<0.2.27)
|
|
1025
|
-
process.env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
|
|
1026
|
-
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";
|
|
1027
|
-
}
|
|
1028
|
-
|
|
1029
|
-
// ../config-tools/dist/chunk-RALMUN5C.js
|
|
1030
|
-
var LogLevel2 = {
|
|
1031
|
-
SILENT: 0,
|
|
1032
|
-
FATAL: 10,
|
|
1033
|
-
ERROR: 20,
|
|
1034
|
-
WARN: 30,
|
|
1035
|
-
SUCCESS: 35,
|
|
1036
|
-
INFO: 40,
|
|
1037
|
-
PERFORMANCE: 50,
|
|
1038
|
-
DEBUG: 60,
|
|
1039
|
-
TRACE: 70,
|
|
1040
|
-
ALL: 100
|
|
1041
|
-
};
|
|
1042
|
-
var LogLevelLabel2 = {
|
|
1043
|
-
SILENT: "silent",
|
|
1044
|
-
FATAL: "fatal",
|
|
1045
|
-
ERROR: "error",
|
|
1046
|
-
WARN: "warn",
|
|
1047
|
-
SUCCESS: "success",
|
|
1048
|
-
INFO: "info",
|
|
1049
|
-
PERFORMANCE: "performance",
|
|
1050
|
-
DEBUG: "debug",
|
|
1051
|
-
TRACE: "trace",
|
|
1052
|
-
ALL: "all"
|
|
1053
|
-
};
|
|
1054
|
-
|
|
1055
|
-
// ../config-tools/dist/chunk-ZFNAUMQS.js
|
|
1056
|
-
var useIcon2 = (c3, fallback) => isUnicodeSupported2() ? c3 : fallback;
|
|
1057
|
-
var CONSOLE_ICONS2 = {
|
|
1058
|
-
[LogLevelLabel2.ERROR]: useIcon2("\u2718", "\xD7"),
|
|
1059
|
-
[LogLevelLabel2.FATAL]: useIcon2("\u{1F571}", "\xD7"),
|
|
1060
|
-
[LogLevelLabel2.WARN]: useIcon2("\u26A0", "\u203C"),
|
|
1061
|
-
[LogLevelLabel2.INFO]: useIcon2("\u2139", "i"),
|
|
1062
|
-
[LogLevelLabel2.PERFORMANCE]: useIcon2("\u23F1", "\u23F1"),
|
|
1063
|
-
[LogLevelLabel2.SUCCESS]: useIcon2("\u2714", "\u221A"),
|
|
1064
|
-
[LogLevelLabel2.DEBUG]: useIcon2("\u{1F6E0}", "D"),
|
|
1065
|
-
[LogLevelLabel2.TRACE]: useIcon2("\u2699", "T"),
|
|
1066
|
-
[LogLevelLabel2.ALL]: useIcon2("\u2709", "\u2192")
|
|
1067
|
-
};
|
|
1068
|
-
|
|
1069
|
-
// ../config-tools/dist/chunk-JZAYHDV3.js
|
|
1070
|
-
var formatTimestamp = (fullDateTime = false, date = /* @__PURE__ */ new Date()) => {
|
|
1071
|
-
return fullDateTime ? `${date.toLocaleDateString()} ${date.toLocaleTimeString()}` : `${date.toLocaleTimeString()}`;
|
|
1072
|
-
};
|
|
1073
|
-
|
|
1074
|
-
// ../config-tools/dist/chunk-SXPH7ILL.js
|
|
1075
|
-
var getLogLevel2 = (label) => {
|
|
1076
|
-
switch (label) {
|
|
1077
|
-
case "all":
|
|
1078
|
-
return LogLevel2.ALL;
|
|
1079
|
-
case "trace":
|
|
1080
|
-
return LogLevel2.TRACE;
|
|
1081
|
-
case "debug":
|
|
1082
|
-
return LogLevel2.DEBUG;
|
|
1083
|
-
case "performance":
|
|
1084
|
-
return LogLevel2.PERFORMANCE;
|
|
1085
|
-
case "info":
|
|
1086
|
-
return LogLevel2.INFO;
|
|
1087
|
-
case "warn":
|
|
1088
|
-
return LogLevel2.WARN;
|
|
1089
|
-
case "error":
|
|
1090
|
-
return LogLevel2.ERROR;
|
|
1091
|
-
case "fatal":
|
|
1092
|
-
return LogLevel2.FATAL;
|
|
1093
|
-
case "silent":
|
|
1094
|
-
return LogLevel2.SILENT;
|
|
1095
|
-
default:
|
|
1096
|
-
return LogLevel2.INFO;
|
|
1097
|
-
}
|
|
1098
|
-
};
|
|
1099
|
-
var getLogLevelLabel2 = (logLevel = LogLevel2.INFO) => {
|
|
1100
|
-
if (logLevel >= LogLevel2.ALL) {
|
|
1101
|
-
return LogLevelLabel2.ALL;
|
|
1102
|
-
}
|
|
1103
|
-
if (logLevel >= LogLevel2.TRACE) {
|
|
1104
|
-
return LogLevelLabel2.TRACE;
|
|
1105
|
-
}
|
|
1106
|
-
if (logLevel >= LogLevel2.DEBUG) {
|
|
1107
|
-
return LogLevelLabel2.DEBUG;
|
|
1108
|
-
}
|
|
1109
|
-
if (logLevel >= LogLevel2.PERFORMANCE) {
|
|
1110
|
-
return LogLevelLabel2.PERFORMANCE;
|
|
1111
|
-
}
|
|
1112
|
-
if (logLevel >= LogLevel2.INFO) {
|
|
1113
|
-
return LogLevelLabel2.INFO;
|
|
1114
|
-
}
|
|
1115
|
-
if (logLevel >= LogLevel2.WARN) {
|
|
1116
|
-
return LogLevelLabel2.WARN;
|
|
1117
|
-
}
|
|
1118
|
-
if (logLevel >= LogLevel2.ERROR) {
|
|
1119
|
-
return LogLevelLabel2.ERROR;
|
|
1120
|
-
}
|
|
1121
|
-
if (logLevel >= LogLevel2.FATAL) {
|
|
1122
|
-
return LogLevelLabel2.FATAL;
|
|
1123
|
-
}
|
|
1124
|
-
if (logLevel <= LogLevel2.SILENT) {
|
|
1125
|
-
return LogLevelLabel2.SILENT;
|
|
1126
|
-
}
|
|
1127
|
-
return LogLevelLabel2.INFO;
|
|
1128
|
-
};
|
|
1129
|
-
|
|
1130
|
-
// ../config-tools/dist/chunk-D3FRXXDE.js
|
|
1131
|
-
var daysInYear = 365.2425;
|
|
1132
|
-
var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1e3;
|
|
1133
|
-
var minTime = -maxTime;
|
|
1134
|
-
var minutesInMonth = 43200;
|
|
1135
|
-
var minutesInDay = 1440;
|
|
1136
|
-
var secondsInHour = 3600;
|
|
1137
|
-
var secondsInDay = secondsInHour * 24;
|
|
1138
|
-
var secondsInWeek = secondsInDay * 7;
|
|
1139
|
-
var secondsInYear = secondsInDay * daysInYear;
|
|
1140
|
-
var secondsInMonth = secondsInYear / 12;
|
|
1141
|
-
var secondsInQuarter = secondsInMonth * 3;
|
|
1142
|
-
var constructFromSymbol = Symbol.for("constructDateFrom");
|
|
1143
|
-
function constructFrom(date, value) {
|
|
1144
|
-
if (typeof date === "function") return date(value);
|
|
1145
|
-
if (date && typeof date === "object" && constructFromSymbol in date)
|
|
1146
|
-
return date[constructFromSymbol](value);
|
|
1147
|
-
if (date instanceof Date) return new date.constructor(value);
|
|
1148
|
-
return new Date(value);
|
|
1149
|
-
}
|
|
1150
|
-
function constructNow(date) {
|
|
1151
|
-
return constructFrom(date, Date.now());
|
|
1152
|
-
}
|
|
1153
|
-
var formatDistanceLocale = {
|
|
1154
|
-
lessThanXSeconds: {
|
|
1155
|
-
one: "less than a second",
|
|
1156
|
-
other: "less than {{count}} seconds"
|
|
1157
|
-
},
|
|
1158
|
-
xSeconds: {
|
|
1159
|
-
one: "1 second",
|
|
1160
|
-
other: "{{count}} seconds"
|
|
1161
|
-
},
|
|
1162
|
-
halfAMinute: "half a minute",
|
|
1163
|
-
lessThanXMinutes: {
|
|
1164
|
-
one: "less than a minute",
|
|
1165
|
-
other: "less than {{count}} minutes"
|
|
1166
|
-
},
|
|
1167
|
-
xMinutes: {
|
|
1168
|
-
one: "1 minute",
|
|
1169
|
-
other: "{{count}} minutes"
|
|
1170
|
-
},
|
|
1171
|
-
aboutXHours: {
|
|
1172
|
-
one: "about 1 hour",
|
|
1173
|
-
other: "about {{count}} hours"
|
|
1174
|
-
},
|
|
1175
|
-
xHours: {
|
|
1176
|
-
one: "1 hour",
|
|
1177
|
-
other: "{{count}} hours"
|
|
1178
|
-
},
|
|
1179
|
-
xDays: {
|
|
1180
|
-
one: "1 day",
|
|
1181
|
-
other: "{{count}} days"
|
|
1182
|
-
},
|
|
1183
|
-
aboutXWeeks: {
|
|
1184
|
-
one: "about 1 week",
|
|
1185
|
-
other: "about {{count}} weeks"
|
|
1186
|
-
},
|
|
1187
|
-
xWeeks: {
|
|
1188
|
-
one: "1 week",
|
|
1189
|
-
other: "{{count}} weeks"
|
|
1190
|
-
},
|
|
1191
|
-
aboutXMonths: {
|
|
1192
|
-
one: "about 1 month",
|
|
1193
|
-
other: "about {{count}} months"
|
|
1194
|
-
},
|
|
1195
|
-
xMonths: {
|
|
1196
|
-
one: "1 month",
|
|
1197
|
-
other: "{{count}} months"
|
|
1198
|
-
},
|
|
1199
|
-
aboutXYears: {
|
|
1200
|
-
one: "about 1 year",
|
|
1201
|
-
other: "about {{count}} years"
|
|
1202
|
-
},
|
|
1203
|
-
xYears: {
|
|
1204
|
-
one: "1 year",
|
|
1205
|
-
other: "{{count}} years"
|
|
1206
|
-
},
|
|
1207
|
-
overXYears: {
|
|
1208
|
-
one: "over 1 year",
|
|
1209
|
-
other: "over {{count}} years"
|
|
1210
|
-
},
|
|
1211
|
-
almostXYears: {
|
|
1212
|
-
one: "almost 1 year",
|
|
1213
|
-
other: "almost {{count}} years"
|
|
1214
|
-
}
|
|
1215
|
-
};
|
|
1216
|
-
var formatDistance = (token, count, options) => {
|
|
1217
|
-
let result;
|
|
1218
|
-
const tokenValue = formatDistanceLocale[token];
|
|
1219
|
-
if (typeof tokenValue === "string") {
|
|
1220
|
-
result = tokenValue;
|
|
1221
|
-
} else if (count === 1) {
|
|
1222
|
-
result = tokenValue.one;
|
|
1223
|
-
} else {
|
|
1224
|
-
result = tokenValue.other.replace("{{count}}", count.toString());
|
|
1225
|
-
}
|
|
1226
|
-
if (options?.addSuffix) {
|
|
1227
|
-
if (options.comparison && options.comparison > 0) {
|
|
1228
|
-
return "in " + result;
|
|
1229
|
-
} else {
|
|
1230
|
-
return result + " ago";
|
|
1231
|
-
}
|
|
1232
|
-
}
|
|
1233
|
-
return result;
|
|
1234
|
-
};
|
|
1235
|
-
function buildFormatLongFn(args) {
|
|
1236
|
-
return (options = {}) => {
|
|
1237
|
-
const width = options.width ? String(options.width) : args.defaultWidth;
|
|
1238
|
-
const format2 = args.formats[width] || args.formats[args.defaultWidth];
|
|
1239
|
-
return format2;
|
|
1240
|
-
};
|
|
1241
|
-
}
|
|
1242
|
-
var dateFormats = {
|
|
1243
|
-
full: "EEEE, MMMM do, y",
|
|
1244
|
-
long: "MMMM do, y",
|
|
1245
|
-
medium: "MMM d, y",
|
|
1246
|
-
short: "MM/dd/yyyy"
|
|
1247
|
-
};
|
|
1248
|
-
var timeFormats = {
|
|
1249
|
-
full: "h:mm:ss a zzzz",
|
|
1250
|
-
long: "h:mm:ss a z",
|
|
1251
|
-
medium: "h:mm:ss a",
|
|
1252
|
-
short: "h:mm a"
|
|
1253
|
-
};
|
|
1254
|
-
var dateTimeFormats = {
|
|
1255
|
-
full: "{{date}} 'at' {{time}}",
|
|
1256
|
-
long: "{{date}} 'at' {{time}}",
|
|
1257
|
-
medium: "{{date}}, {{time}}",
|
|
1258
|
-
short: "{{date}}, {{time}}"
|
|
1259
|
-
};
|
|
1260
|
-
var formatLong = {
|
|
1261
|
-
date: buildFormatLongFn({
|
|
1262
|
-
formats: dateFormats,
|
|
1263
|
-
defaultWidth: "full"
|
|
1264
|
-
}),
|
|
1265
|
-
time: buildFormatLongFn({
|
|
1266
|
-
formats: timeFormats,
|
|
1267
|
-
defaultWidth: "full"
|
|
1268
|
-
}),
|
|
1269
|
-
dateTime: buildFormatLongFn({
|
|
1270
|
-
formats: dateTimeFormats,
|
|
1271
|
-
defaultWidth: "full"
|
|
1272
|
-
})
|
|
1273
|
-
};
|
|
1274
|
-
var formatRelativeLocale = {
|
|
1275
|
-
lastWeek: "'last' eeee 'at' p",
|
|
1276
|
-
yesterday: "'yesterday at' p",
|
|
1277
|
-
today: "'today at' p",
|
|
1278
|
-
tomorrow: "'tomorrow at' p",
|
|
1279
|
-
nextWeek: "eeee 'at' p",
|
|
1280
|
-
other: "P"
|
|
1281
|
-
};
|
|
1282
|
-
var formatRelative = (token, _date, _baseDate, _options) => formatRelativeLocale[token];
|
|
1283
|
-
function buildLocalizeFn(args) {
|
|
1284
|
-
return (value, options) => {
|
|
1285
|
-
const context = options?.context ? String(options.context) : "standalone";
|
|
1286
|
-
let valuesArray;
|
|
1287
|
-
if (context === "formatting" && args.formattingValues) {
|
|
1288
|
-
const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
1289
|
-
const width = options?.width ? String(options.width) : defaultWidth;
|
|
1290
|
-
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
1291
|
-
} else {
|
|
1292
|
-
const defaultWidth = args.defaultWidth;
|
|
1293
|
-
const width = options?.width ? String(options.width) : args.defaultWidth;
|
|
1294
|
-
valuesArray = args.values[width] || args.values[defaultWidth];
|
|
1295
|
-
}
|
|
1296
|
-
const index = args.argumentCallback ? args.argumentCallback(value) : value;
|
|
1297
|
-
return valuesArray[index];
|
|
1298
|
-
};
|
|
1299
|
-
}
|
|
1300
|
-
var eraValues = {
|
|
1301
|
-
narrow: ["B", "A"],
|
|
1302
|
-
abbreviated: ["BC", "AD"],
|
|
1303
|
-
wide: ["Before Christ", "Anno Domini"]
|
|
1304
|
-
};
|
|
1305
|
-
var quarterValues = {
|
|
1306
|
-
narrow: ["1", "2", "3", "4"],
|
|
1307
|
-
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
1308
|
-
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
1309
|
-
};
|
|
1310
|
-
var monthValues = {
|
|
1311
|
-
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
1312
|
-
abbreviated: [
|
|
1313
|
-
"Jan",
|
|
1314
|
-
"Feb",
|
|
1315
|
-
"Mar",
|
|
1316
|
-
"Apr",
|
|
1317
|
-
"May",
|
|
1318
|
-
"Jun",
|
|
1319
|
-
"Jul",
|
|
1320
|
-
"Aug",
|
|
1321
|
-
"Sep",
|
|
1322
|
-
"Oct",
|
|
1323
|
-
"Nov",
|
|
1324
|
-
"Dec"
|
|
1325
|
-
],
|
|
1326
|
-
wide: [
|
|
1327
|
-
"January",
|
|
1328
|
-
"February",
|
|
1329
|
-
"March",
|
|
1330
|
-
"April",
|
|
1331
|
-
"May",
|
|
1332
|
-
"June",
|
|
1333
|
-
"July",
|
|
1334
|
-
"August",
|
|
1335
|
-
"September",
|
|
1336
|
-
"October",
|
|
1337
|
-
"November",
|
|
1338
|
-
"December"
|
|
1339
|
-
]
|
|
1340
|
-
};
|
|
1341
|
-
var dayValues = {
|
|
1342
|
-
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
1343
|
-
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
1344
|
-
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
1345
|
-
wide: [
|
|
1346
|
-
"Sunday",
|
|
1347
|
-
"Monday",
|
|
1348
|
-
"Tuesday",
|
|
1349
|
-
"Wednesday",
|
|
1350
|
-
"Thursday",
|
|
1351
|
-
"Friday",
|
|
1352
|
-
"Saturday"
|
|
1353
|
-
]
|
|
1354
|
-
};
|
|
1355
|
-
var dayPeriodValues = {
|
|
1356
|
-
narrow: {
|
|
1357
|
-
am: "a",
|
|
1358
|
-
pm: "p",
|
|
1359
|
-
midnight: "mi",
|
|
1360
|
-
noon: "n",
|
|
1361
|
-
morning: "morning",
|
|
1362
|
-
afternoon: "afternoon",
|
|
1363
|
-
evening: "evening",
|
|
1364
|
-
night: "night"
|
|
1365
|
-
},
|
|
1366
|
-
abbreviated: {
|
|
1367
|
-
am: "AM",
|
|
1368
|
-
pm: "PM",
|
|
1369
|
-
midnight: "midnight",
|
|
1370
|
-
noon: "noon",
|
|
1371
|
-
morning: "morning",
|
|
1372
|
-
afternoon: "afternoon",
|
|
1373
|
-
evening: "evening",
|
|
1374
|
-
night: "night"
|
|
1375
|
-
},
|
|
1376
|
-
wide: {
|
|
1377
|
-
am: "a.m.",
|
|
1378
|
-
pm: "p.m.",
|
|
1379
|
-
midnight: "midnight",
|
|
1380
|
-
noon: "noon",
|
|
1381
|
-
morning: "morning",
|
|
1382
|
-
afternoon: "afternoon",
|
|
1383
|
-
evening: "evening",
|
|
1384
|
-
night: "night"
|
|
1385
|
-
}
|
|
1386
|
-
};
|
|
1387
|
-
var formattingDayPeriodValues = {
|
|
1388
|
-
narrow: {
|
|
1389
|
-
am: "a",
|
|
1390
|
-
pm: "p",
|
|
1391
|
-
midnight: "mi",
|
|
1392
|
-
noon: "n",
|
|
1393
|
-
morning: "in the morning",
|
|
1394
|
-
afternoon: "in the afternoon",
|
|
1395
|
-
evening: "in the evening",
|
|
1396
|
-
night: "at night"
|
|
1397
|
-
},
|
|
1398
|
-
abbreviated: {
|
|
1399
|
-
am: "AM",
|
|
1400
|
-
pm: "PM",
|
|
1401
|
-
midnight: "midnight",
|
|
1402
|
-
noon: "noon",
|
|
1403
|
-
morning: "in the morning",
|
|
1404
|
-
afternoon: "in the afternoon",
|
|
1405
|
-
evening: "in the evening",
|
|
1406
|
-
night: "at night"
|
|
1407
|
-
},
|
|
1408
|
-
wide: {
|
|
1409
|
-
am: "a.m.",
|
|
1410
|
-
pm: "p.m.",
|
|
1411
|
-
midnight: "midnight",
|
|
1412
|
-
noon: "noon",
|
|
1413
|
-
morning: "in the morning",
|
|
1414
|
-
afternoon: "in the afternoon",
|
|
1415
|
-
evening: "in the evening",
|
|
1416
|
-
night: "at night"
|
|
1417
|
-
}
|
|
1418
|
-
};
|
|
1419
|
-
var ordinalNumber = (dirtyNumber, _options) => {
|
|
1420
|
-
const number = Number(dirtyNumber);
|
|
1421
|
-
const rem100 = number % 100;
|
|
1422
|
-
if (rem100 > 20 || rem100 < 10) {
|
|
1423
|
-
switch (rem100 % 10) {
|
|
1424
|
-
case 1:
|
|
1425
|
-
return number + "st";
|
|
1426
|
-
case 2:
|
|
1427
|
-
return number + "nd";
|
|
1428
|
-
case 3:
|
|
1429
|
-
return number + "rd";
|
|
1430
|
-
}
|
|
1431
|
-
}
|
|
1432
|
-
return number + "th";
|
|
1433
|
-
};
|
|
1434
|
-
var localize = {
|
|
1435
|
-
ordinalNumber,
|
|
1436
|
-
era: buildLocalizeFn({
|
|
1437
|
-
values: eraValues,
|
|
1438
|
-
defaultWidth: "wide"
|
|
1439
|
-
}),
|
|
1440
|
-
quarter: buildLocalizeFn({
|
|
1441
|
-
values: quarterValues,
|
|
1442
|
-
defaultWidth: "wide",
|
|
1443
|
-
argumentCallback: (quarter) => quarter - 1
|
|
1444
|
-
}),
|
|
1445
|
-
month: buildLocalizeFn({
|
|
1446
|
-
values: monthValues,
|
|
1447
|
-
defaultWidth: "wide"
|
|
1448
|
-
}),
|
|
1449
|
-
day: buildLocalizeFn({
|
|
1450
|
-
values: dayValues,
|
|
1451
|
-
defaultWidth: "wide"
|
|
1452
|
-
}),
|
|
1453
|
-
dayPeriod: buildLocalizeFn({
|
|
1454
|
-
values: dayPeriodValues,
|
|
1455
|
-
defaultWidth: "wide",
|
|
1456
|
-
formattingValues: formattingDayPeriodValues,
|
|
1457
|
-
defaultFormattingWidth: "wide"
|
|
1458
|
-
})
|
|
1459
|
-
};
|
|
1460
|
-
function buildMatchFn(args) {
|
|
1461
|
-
return (string3, options = {}) => {
|
|
1462
|
-
const width = options.width;
|
|
1463
|
-
const matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
|
1464
|
-
const matchResult = string3.match(matchPattern);
|
|
1465
|
-
if (!matchResult) {
|
|
1466
|
-
return null;
|
|
1467
|
-
}
|
|
1468
|
-
const matchedString = matchResult[0];
|
|
1469
|
-
const parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
|
|
1470
|
-
const key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString)) : (
|
|
1471
|
-
// [TODO] -- I challenge you to fix the type
|
|
1472
|
-
findKey(parsePatterns, (pattern) => pattern.test(matchedString))
|
|
1473
|
-
);
|
|
1474
|
-
let value;
|
|
1475
|
-
value = args.valueCallback ? args.valueCallback(key) : key;
|
|
1476
|
-
value = options.valueCallback ? (
|
|
1477
|
-
// [TODO] -- I challenge you to fix the type
|
|
1478
|
-
options.valueCallback(value)
|
|
1479
|
-
) : value;
|
|
1480
|
-
const rest = string3.slice(matchedString.length);
|
|
1481
|
-
return { value, rest };
|
|
1482
|
-
};
|
|
1483
|
-
}
|
|
1484
|
-
function findKey(object3, predicate) {
|
|
1485
|
-
for (const key in object3) {
|
|
1486
|
-
if (Object.prototype.hasOwnProperty.call(object3, key) && predicate(object3[key])) {
|
|
1487
|
-
return key;
|
|
1488
|
-
}
|
|
1489
|
-
}
|
|
1490
|
-
return void 0;
|
|
1491
|
-
}
|
|
1492
|
-
function findIndex(array3, predicate) {
|
|
1493
|
-
for (let key = 0; key < array3.length; key++) {
|
|
1494
|
-
if (predicate(array3[key])) {
|
|
1495
|
-
return key;
|
|
1496
|
-
}
|
|
1497
|
-
}
|
|
1498
|
-
return void 0;
|
|
1499
|
-
}
|
|
1500
|
-
function buildMatchPatternFn(args) {
|
|
1501
|
-
return (string3, options = {}) => {
|
|
1502
|
-
const matchResult = string3.match(args.matchPattern);
|
|
1503
|
-
if (!matchResult) return null;
|
|
1504
|
-
const matchedString = matchResult[0];
|
|
1505
|
-
const parseResult = string3.match(args.parsePattern);
|
|
1506
|
-
if (!parseResult) return null;
|
|
1507
|
-
let value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
|
|
1508
|
-
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
1509
|
-
const rest = string3.slice(matchedString.length);
|
|
1510
|
-
return { value, rest };
|
|
1511
|
-
};
|
|
1512
|
-
}
|
|
1513
|
-
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
|
|
1514
|
-
var parseOrdinalNumberPattern = /\d+/i;
|
|
1515
|
-
var matchEraPatterns = {
|
|
1516
|
-
narrow: /^(b|a)/i,
|
|
1517
|
-
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
1518
|
-
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
1519
|
-
};
|
|
1520
|
-
var parseEraPatterns = {
|
|
1521
|
-
any: [/^b/i, /^(a|c)/i]
|
|
1522
|
-
};
|
|
1523
|
-
var matchQuarterPatterns = {
|
|
1524
|
-
narrow: /^[1234]/i,
|
|
1525
|
-
abbreviated: /^q[1234]/i,
|
|
1526
|
-
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
1527
|
-
};
|
|
1528
|
-
var parseQuarterPatterns = {
|
|
1529
|
-
any: [/1/i, /2/i, /3/i, /4/i]
|
|
1530
|
-
};
|
|
1531
|
-
var matchMonthPatterns = {
|
|
1532
|
-
narrow: /^[jfmasond]/i,
|
|
1533
|
-
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
1534
|
-
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
1535
|
-
};
|
|
1536
|
-
var parseMonthPatterns = {
|
|
1537
|
-
narrow: [
|
|
1538
|
-
/^j/i,
|
|
1539
|
-
/^f/i,
|
|
1540
|
-
/^m/i,
|
|
1541
|
-
/^a/i,
|
|
1542
|
-
/^m/i,
|
|
1543
|
-
/^j/i,
|
|
1544
|
-
/^j/i,
|
|
1545
|
-
/^a/i,
|
|
1546
|
-
/^s/i,
|
|
1547
|
-
/^o/i,
|
|
1548
|
-
/^n/i,
|
|
1549
|
-
/^d/i
|
|
1550
|
-
],
|
|
1551
|
-
any: [
|
|
1552
|
-
/^ja/i,
|
|
1553
|
-
/^f/i,
|
|
1554
|
-
/^mar/i,
|
|
1555
|
-
/^ap/i,
|
|
1556
|
-
/^may/i,
|
|
1557
|
-
/^jun/i,
|
|
1558
|
-
/^jul/i,
|
|
1559
|
-
/^au/i,
|
|
1560
|
-
/^s/i,
|
|
1561
|
-
/^o/i,
|
|
1562
|
-
/^n/i,
|
|
1563
|
-
/^d/i
|
|
1564
|
-
]
|
|
1565
|
-
};
|
|
1566
|
-
var matchDayPatterns = {
|
|
1567
|
-
narrow: /^[smtwf]/i,
|
|
1568
|
-
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
1569
|
-
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
1570
|
-
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
1571
|
-
};
|
|
1572
|
-
var parseDayPatterns = {
|
|
1573
|
-
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
1574
|
-
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
1575
|
-
};
|
|
1576
|
-
var matchDayPeriodPatterns = {
|
|
1577
|
-
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
1578
|
-
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
1579
|
-
};
|
|
1580
|
-
var parseDayPeriodPatterns = {
|
|
1581
|
-
any: {
|
|
1582
|
-
am: /^a/i,
|
|
1583
|
-
pm: /^p/i,
|
|
1584
|
-
midnight: /^mi/i,
|
|
1585
|
-
noon: /^no/i,
|
|
1586
|
-
morning: /morning/i,
|
|
1587
|
-
afternoon: /afternoon/i,
|
|
1588
|
-
evening: /evening/i,
|
|
1589
|
-
night: /night/i
|
|
1590
|
-
}
|
|
1591
|
-
};
|
|
1592
|
-
var match = {
|
|
1593
|
-
ordinalNumber: buildMatchPatternFn({
|
|
1594
|
-
matchPattern: matchOrdinalNumberPattern,
|
|
1595
|
-
parsePattern: parseOrdinalNumberPattern,
|
|
1596
|
-
valueCallback: (value) => parseInt(value, 10)
|
|
1597
|
-
}),
|
|
1598
|
-
era: buildMatchFn({
|
|
1599
|
-
matchPatterns: matchEraPatterns,
|
|
1600
|
-
defaultMatchWidth: "wide",
|
|
1601
|
-
parsePatterns: parseEraPatterns,
|
|
1602
|
-
defaultParseWidth: "any"
|
|
1603
|
-
}),
|
|
1604
|
-
quarter: buildMatchFn({
|
|
1605
|
-
matchPatterns: matchQuarterPatterns,
|
|
1606
|
-
defaultMatchWidth: "wide",
|
|
1607
|
-
parsePatterns: parseQuarterPatterns,
|
|
1608
|
-
defaultParseWidth: "any",
|
|
1609
|
-
valueCallback: (index) => index + 1
|
|
1610
|
-
}),
|
|
1611
|
-
month: buildMatchFn({
|
|
1612
|
-
matchPatterns: matchMonthPatterns,
|
|
1613
|
-
defaultMatchWidth: "wide",
|
|
1614
|
-
parsePatterns: parseMonthPatterns,
|
|
1615
|
-
defaultParseWidth: "any"
|
|
1616
|
-
}),
|
|
1617
|
-
day: buildMatchFn({
|
|
1618
|
-
matchPatterns: matchDayPatterns,
|
|
1619
|
-
defaultMatchWidth: "wide",
|
|
1620
|
-
parsePatterns: parseDayPatterns,
|
|
1621
|
-
defaultParseWidth: "any"
|
|
1622
|
-
}),
|
|
1623
|
-
dayPeriod: buildMatchFn({
|
|
1624
|
-
matchPatterns: matchDayPeriodPatterns,
|
|
1625
|
-
defaultMatchWidth: "any",
|
|
1626
|
-
parsePatterns: parseDayPeriodPatterns,
|
|
1627
|
-
defaultParseWidth: "any"
|
|
1628
|
-
})
|
|
1629
|
-
};
|
|
1630
|
-
var enUS = {
|
|
1631
|
-
code: "en-US",
|
|
1632
|
-
formatDistance,
|
|
1633
|
-
formatLong,
|
|
1634
|
-
formatRelative,
|
|
1635
|
-
localize,
|
|
1636
|
-
match,
|
|
1637
|
-
options: {
|
|
1638
|
-
weekStartsOn: 0,
|
|
1639
|
-
firstWeekContainsDate: 1
|
|
1640
|
-
}
|
|
1641
|
-
};
|
|
1642
|
-
var defaultOptions = {};
|
|
1643
|
-
function getDefaultOptions() {
|
|
1644
|
-
return defaultOptions;
|
|
1645
|
-
}
|
|
1646
|
-
function toDate(argument, context) {
|
|
1647
|
-
return constructFrom(context || argument, argument);
|
|
1648
|
-
}
|
|
1649
|
-
function getTimezoneOffsetInMilliseconds(date) {
|
|
1650
|
-
const _date = toDate(date);
|
|
1651
|
-
const utcDate = new Date(
|
|
1652
|
-
Date.UTC(
|
|
1653
|
-
_date.getFullYear(),
|
|
1654
|
-
_date.getMonth(),
|
|
1655
|
-
_date.getDate(),
|
|
1656
|
-
_date.getHours(),
|
|
1657
|
-
_date.getMinutes(),
|
|
1658
|
-
_date.getSeconds(),
|
|
1659
|
-
_date.getMilliseconds()
|
|
1660
|
-
)
|
|
1661
|
-
);
|
|
1662
|
-
utcDate.setUTCFullYear(_date.getFullYear());
|
|
1663
|
-
return +date - +utcDate;
|
|
1664
|
-
}
|
|
1665
|
-
function normalizeDates(context, ...dates) {
|
|
1666
|
-
const normalize = constructFrom.bind(
|
|
1667
|
-
null,
|
|
1668
|
-
context || dates.find((date) => typeof date === "object")
|
|
1669
|
-
);
|
|
1670
|
-
return dates.map(normalize);
|
|
1671
|
-
}
|
|
1672
|
-
function compareAsc(dateLeft, dateRight) {
|
|
1673
|
-
const diff = +toDate(dateLeft) - +toDate(dateRight);
|
|
1674
|
-
if (diff < 0) return -1;
|
|
1675
|
-
else if (diff > 0) return 1;
|
|
1676
|
-
return diff;
|
|
1677
|
-
}
|
|
1678
|
-
function differenceInCalendarMonths(laterDate, earlierDate, options) {
|
|
1679
|
-
const [laterDate_, earlierDate_] = normalizeDates(
|
|
1680
|
-
options?.in,
|
|
1681
|
-
laterDate,
|
|
1682
|
-
earlierDate
|
|
1683
|
-
);
|
|
1684
|
-
const yearsDiff = laterDate_.getFullYear() - earlierDate_.getFullYear();
|
|
1685
|
-
const monthsDiff = laterDate_.getMonth() - earlierDate_.getMonth();
|
|
1686
|
-
return yearsDiff * 12 + monthsDiff;
|
|
1687
|
-
}
|
|
1688
|
-
function endOfDay(date, options) {
|
|
1689
|
-
const _date = toDate(date, options?.in);
|
|
1690
|
-
_date.setHours(23, 59, 59, 999);
|
|
1691
|
-
return _date;
|
|
1692
|
-
}
|
|
1693
|
-
function endOfMonth(date, options) {
|
|
1694
|
-
const _date = toDate(date, options?.in);
|
|
1695
|
-
const month = _date.getMonth();
|
|
1696
|
-
_date.setFullYear(_date.getFullYear(), month + 1, 0);
|
|
1697
|
-
_date.setHours(23, 59, 59, 999);
|
|
1698
|
-
return _date;
|
|
1699
|
-
}
|
|
1700
|
-
function isLastDayOfMonth(date, options) {
|
|
1701
|
-
const _date = toDate(date, options?.in);
|
|
1702
|
-
return +endOfDay(_date, options) === +endOfMonth(_date, options);
|
|
1703
|
-
}
|
|
1704
|
-
function differenceInMonths(laterDate, earlierDate, options) {
|
|
1705
|
-
const [laterDate_, workingLaterDate, earlierDate_] = normalizeDates(
|
|
1706
|
-
options?.in,
|
|
1707
|
-
laterDate,
|
|
1708
|
-
laterDate,
|
|
1709
|
-
earlierDate
|
|
1710
|
-
);
|
|
1711
|
-
const sign = compareAsc(workingLaterDate, earlierDate_);
|
|
1712
|
-
const difference = Math.abs(
|
|
1713
|
-
differenceInCalendarMonths(workingLaterDate, earlierDate_)
|
|
1714
|
-
);
|
|
1715
|
-
if (difference < 1) return 0;
|
|
1716
|
-
if (workingLaterDate.getMonth() === 1 && workingLaterDate.getDate() > 27)
|
|
1717
|
-
workingLaterDate.setDate(30);
|
|
1718
|
-
workingLaterDate.setMonth(workingLaterDate.getMonth() - sign * difference);
|
|
1719
|
-
let isLastMonthNotFull = compareAsc(workingLaterDate, earlierDate_) === -sign;
|
|
1720
|
-
if (isLastDayOfMonth(laterDate_) && difference === 1 && compareAsc(laterDate_, earlierDate_) === 1) {
|
|
1721
|
-
isLastMonthNotFull = false;
|
|
1722
|
-
}
|
|
1723
|
-
const result = sign * (difference - +isLastMonthNotFull);
|
|
1724
|
-
return result === 0 ? 0 : result;
|
|
1725
|
-
}
|
|
1726
|
-
function getRoundingMethod(method) {
|
|
1727
|
-
return (number) => {
|
|
1728
|
-
const round = method ? Math[method] : Math.trunc;
|
|
1729
|
-
const result = round(number);
|
|
1730
|
-
return result === 0 ? 0 : result;
|
|
1731
|
-
};
|
|
1732
|
-
}
|
|
1733
|
-
function differenceInMilliseconds(laterDate, earlierDate) {
|
|
1734
|
-
return +toDate(laterDate) - +toDate(earlierDate);
|
|
1735
|
-
}
|
|
1736
|
-
function differenceInSeconds(laterDate, earlierDate, options) {
|
|
1737
|
-
const diff = differenceInMilliseconds(laterDate, earlierDate) / 1e3;
|
|
1738
|
-
return getRoundingMethod(options?.roundingMethod)(diff);
|
|
1739
|
-
}
|
|
1740
|
-
function formatDistance2(laterDate, earlierDate, options) {
|
|
1741
|
-
const defaultOptions2 = getDefaultOptions();
|
|
1742
|
-
const locale = options?.locale ?? defaultOptions2.locale ?? enUS;
|
|
1743
|
-
const minutesInAlmostTwoDays = 2520;
|
|
1744
|
-
const comparison = compareAsc(laterDate, earlierDate);
|
|
1745
|
-
if (isNaN(comparison)) throw new RangeError("Invalid time value");
|
|
1746
|
-
const localizeOptions = Object.assign({}, options, {
|
|
1747
|
-
addSuffix: options?.addSuffix,
|
|
1748
|
-
comparison
|
|
1749
|
-
});
|
|
1750
|
-
const [laterDate_, earlierDate_] = normalizeDates(
|
|
1751
|
-
options?.in,
|
|
1752
|
-
...comparison > 0 ? [earlierDate, laterDate] : [laterDate, earlierDate]
|
|
1753
|
-
);
|
|
1754
|
-
const seconds = differenceInSeconds(earlierDate_, laterDate_);
|
|
1755
|
-
const offsetInSeconds = (getTimezoneOffsetInMilliseconds(earlierDate_) - getTimezoneOffsetInMilliseconds(laterDate_)) / 1e3;
|
|
1756
|
-
const minutes = Math.round((seconds - offsetInSeconds) / 60);
|
|
1757
|
-
let months;
|
|
1758
|
-
if (minutes < 2) {
|
|
1759
|
-
if (options?.includeSeconds) {
|
|
1760
|
-
if (seconds < 5) {
|
|
1761
|
-
return locale.formatDistance("lessThanXSeconds", 5, localizeOptions);
|
|
1762
|
-
} else if (seconds < 10) {
|
|
1763
|
-
return locale.formatDistance("lessThanXSeconds", 10, localizeOptions);
|
|
1764
|
-
} else if (seconds < 20) {
|
|
1765
|
-
return locale.formatDistance("lessThanXSeconds", 20, localizeOptions);
|
|
1766
|
-
} else if (seconds < 40) {
|
|
1767
|
-
return locale.formatDistance("halfAMinute", 0, localizeOptions);
|
|
1768
|
-
} else if (seconds < 60) {
|
|
1769
|
-
return locale.formatDistance("lessThanXMinutes", 1, localizeOptions);
|
|
1770
|
-
} else {
|
|
1771
|
-
return locale.formatDistance("xMinutes", 1, localizeOptions);
|
|
1772
|
-
}
|
|
1773
|
-
} else {
|
|
1774
|
-
if (minutes === 0) {
|
|
1775
|
-
return locale.formatDistance("lessThanXMinutes", 1, localizeOptions);
|
|
1776
|
-
} else {
|
|
1777
|
-
return locale.formatDistance("xMinutes", minutes, localizeOptions);
|
|
1778
|
-
}
|
|
1779
|
-
}
|
|
1780
|
-
} else if (minutes < 45) {
|
|
1781
|
-
return locale.formatDistance("xMinutes", minutes, localizeOptions);
|
|
1782
|
-
} else if (minutes < 90) {
|
|
1783
|
-
return locale.formatDistance("aboutXHours", 1, localizeOptions);
|
|
1784
|
-
} else if (minutes < minutesInDay) {
|
|
1785
|
-
const hours = Math.round(minutes / 60);
|
|
1786
|
-
return locale.formatDistance("aboutXHours", hours, localizeOptions);
|
|
1787
|
-
} else if (minutes < minutesInAlmostTwoDays) {
|
|
1788
|
-
return locale.formatDistance("xDays", 1, localizeOptions);
|
|
1789
|
-
} else if (minutes < minutesInMonth) {
|
|
1790
|
-
const days = Math.round(minutes / minutesInDay);
|
|
1791
|
-
return locale.formatDistance("xDays", days, localizeOptions);
|
|
1792
|
-
} else if (minutes < minutesInMonth * 2) {
|
|
1793
|
-
months = Math.round(minutes / minutesInMonth);
|
|
1794
|
-
return locale.formatDistance("aboutXMonths", months, localizeOptions);
|
|
1795
|
-
}
|
|
1796
|
-
months = differenceInMonths(earlierDate_, laterDate_);
|
|
1797
|
-
if (months < 12) {
|
|
1798
|
-
const nearestMonth = Math.round(minutes / minutesInMonth);
|
|
1799
|
-
return locale.formatDistance("xMonths", nearestMonth, localizeOptions);
|
|
1800
|
-
} else {
|
|
1801
|
-
const monthsSinceStartOfYear = months % 12;
|
|
1802
|
-
const years = Math.trunc(months / 12);
|
|
1803
|
-
if (monthsSinceStartOfYear < 3) {
|
|
1804
|
-
return locale.formatDistance("aboutXYears", years, localizeOptions);
|
|
1805
|
-
} else if (monthsSinceStartOfYear < 9) {
|
|
1806
|
-
return locale.formatDistance("overXYears", years, localizeOptions);
|
|
1807
|
-
} else {
|
|
1808
|
-
return locale.formatDistance("almostXYears", years + 1, localizeOptions);
|
|
1809
|
-
}
|
|
1810
|
-
}
|
|
1811
|
-
}
|
|
1812
|
-
function formatDistanceToNow2(date, options) {
|
|
1813
|
-
return formatDistance2(date, constructNow(date), options);
|
|
1814
|
-
}
|
|
1815
|
-
var getLogFn = (logLevel = LogLevel2.INFO, config = {}, options = {}) => {
|
|
239
|
+
// ../config-tools/src/logger/console.ts
|
|
240
|
+
var getLogFn = (logLevel = LogLevel.INFO, config = {}, options = {}) => {
|
|
1816
241
|
const {
|
|
1817
242
|
chalk: _chalk = getChalk(),
|
|
1818
243
|
fullDateTime = false,
|
|
1819
244
|
hideDateTime = false
|
|
1820
245
|
} = options;
|
|
1821
246
|
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;
|
|
1822
|
-
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL ||
|
|
1823
|
-
if (logLevel >
|
|
1824
|
-
return (
|
|
247
|
+
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
|
|
248
|
+
if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
|
|
249
|
+
return (_) => {
|
|
1825
250
|
};
|
|
1826
251
|
}
|
|
1827
|
-
if (typeof logLevel === "number" &&
|
|
252
|
+
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel) {
|
|
1828
253
|
return (message) => {
|
|
1829
254
|
console.error(
|
|
1830
255
|
`
|
|
1831
256
|
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.fatal ?? DEFAULT_COLOR_CONFIG.dark.fatal)(
|
|
1832
|
-
`[${
|
|
1833
|
-
)}${_chalk.bold.whiteBright(
|
|
257
|
+
`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal] `
|
|
258
|
+
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
1834
259
|
`
|
|
1835
260
|
);
|
|
1836
261
|
};
|
|
1837
262
|
}
|
|
1838
|
-
if (typeof logLevel === "number" &&
|
|
263
|
+
if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel) {
|
|
1839
264
|
return (message) => {
|
|
1840
265
|
console.error(
|
|
1841
266
|
`
|
|
1842
267
|
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.danger ?? DEFAULT_COLOR_CONFIG.dark.danger)(
|
|
1843
|
-
`[${
|
|
1844
|
-
)}${_chalk.bold.whiteBright(
|
|
268
|
+
`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error] `
|
|
269
|
+
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
1845
270
|
`
|
|
1846
271
|
);
|
|
1847
272
|
};
|
|
1848
273
|
}
|
|
1849
|
-
if (typeof logLevel === "number" &&
|
|
274
|
+
if (typeof logLevel === "number" && LogLevel.WARN >= logLevel) {
|
|
1850
275
|
return (message) => {
|
|
1851
276
|
console.warn(
|
|
1852
277
|
`
|
|
1853
278
|
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.warning ?? DEFAULT_COLOR_CONFIG.dark.warning)(
|
|
1854
|
-
`[${
|
|
1855
|
-
)}${_chalk.bold.whiteBright(
|
|
279
|
+
`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn] `
|
|
280
|
+
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
1856
281
|
`
|
|
1857
282
|
);
|
|
1858
283
|
};
|
|
1859
284
|
}
|
|
1860
|
-
if (typeof logLevel === "number" &&
|
|
285
|
+
if (typeof logLevel === "number" && LogLevel.SUCCESS >= logLevel) {
|
|
1861
286
|
return (message) => {
|
|
1862
287
|
console.info(
|
|
1863
288
|
`
|
|
1864
289
|
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.success ?? DEFAULT_COLOR_CONFIG.dark.success)(
|
|
1865
|
-
`[${
|
|
1866
|
-
)}${_chalk.bold.whiteBright(
|
|
290
|
+
`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success] `
|
|
291
|
+
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
1867
292
|
`
|
|
1868
293
|
);
|
|
1869
294
|
};
|
|
1870
295
|
}
|
|
1871
|
-
if (typeof logLevel === "number" &&
|
|
296
|
+
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel) {
|
|
1872
297
|
return (message) => {
|
|
1873
298
|
console.info(
|
|
1874
299
|
`
|
|
1875
300
|
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.info ?? DEFAULT_COLOR_CONFIG.dark.info)(
|
|
1876
|
-
`[${
|
|
1877
|
-
)}${_chalk.bold.whiteBright(
|
|
301
|
+
`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info] `
|
|
302
|
+
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
1878
303
|
`
|
|
1879
304
|
);
|
|
1880
305
|
};
|
|
1881
306
|
}
|
|
1882
|
-
if (typeof logLevel === "number" &&
|
|
307
|
+
if (typeof logLevel === "number" && LogLevel.PERFORMANCE >= logLevel) {
|
|
1883
308
|
return (message) => {
|
|
1884
309
|
console.debug(
|
|
1885
310
|
`
|
|
1886
311
|
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.performance ?? DEFAULT_COLOR_CONFIG.dark.performance)(
|
|
1887
|
-
`[${
|
|
1888
|
-
)}${_chalk.bold.whiteBright(
|
|
312
|
+
`[${CONSOLE_ICONS[LogLevelLabel.PERFORMANCE]} Performance] `
|
|
313
|
+
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
1889
314
|
`
|
|
1890
315
|
);
|
|
1891
316
|
};
|
|
1892
317
|
}
|
|
1893
|
-
if (typeof logLevel === "number" &&
|
|
318
|
+
if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel) {
|
|
1894
319
|
return (message) => {
|
|
1895
320
|
console.debug(
|
|
1896
321
|
`
|
|
1897
322
|
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.debug ?? DEFAULT_COLOR_CONFIG.dark.debug)(
|
|
1898
|
-
`[${
|
|
1899
|
-
)}${_chalk.bold.whiteBright(
|
|
323
|
+
`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug] `
|
|
324
|
+
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
1900
325
|
`
|
|
1901
326
|
);
|
|
1902
327
|
};
|
|
1903
328
|
}
|
|
1904
|
-
if (typeof logLevel === "number" &&
|
|
329
|
+
if (typeof logLevel === "number" && LogLevel.TRACE >= logLevel) {
|
|
1905
330
|
return (message) => {
|
|
1906
331
|
console.debug(
|
|
1907
332
|
`
|
|
1908
333
|
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex("#bbbbbb")(
|
|
1909
|
-
`[${
|
|
1910
|
-
)}${_chalk.bold.whiteBright(
|
|
334
|
+
`[${CONSOLE_ICONS[LogLevelLabel.TRACE]} Trace] `
|
|
335
|
+
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
1911
336
|
`
|
|
1912
337
|
);
|
|
1913
338
|
};
|
|
@@ -1916,28 +341,28 @@ ${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.
|
|
|
1916
341
|
console.log(
|
|
1917
342
|
`
|
|
1918
343
|
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.brand ?? DEFAULT_COLOR_CONFIG.dark.brand)(
|
|
1919
|
-
`[${
|
|
1920
|
-
)}${_chalk.bold.whiteBright(
|
|
344
|
+
`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System] `
|
|
345
|
+
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
1921
346
|
`
|
|
1922
347
|
);
|
|
1923
348
|
};
|
|
1924
349
|
};
|
|
1925
|
-
var
|
|
1926
|
-
var writePerformance = (message, config) => getLogFn(
|
|
1927
|
-
var
|
|
1928
|
-
var
|
|
350
|
+
var writeWarning = (message, config) => getLogFn(LogLevel.WARN, config)(message);
|
|
351
|
+
var writePerformance = (message, config) => getLogFn(LogLevel.PERFORMANCE, config)(message);
|
|
352
|
+
var writeDebug = (message, config) => getLogFn(LogLevel.DEBUG, config)(message);
|
|
353
|
+
var writeTrace = (message, config) => getLogFn(LogLevel.TRACE, config)(message);
|
|
1929
354
|
var getStopwatch = (name) => {
|
|
1930
355
|
const start = /* @__PURE__ */ new Date();
|
|
1931
356
|
return () => {
|
|
1932
357
|
writePerformance(
|
|
1933
|
-
`The${name ? ` ${name}` : ""} process took ${
|
|
358
|
+
`The${name ? ` ${name}` : ""} process took ${(0, import_formatDistanceToNow.formatDistanceToNow)(start, {
|
|
1934
359
|
includeSeconds: true
|
|
1935
360
|
})} to complete`
|
|
1936
361
|
);
|
|
1937
362
|
};
|
|
1938
363
|
};
|
|
1939
364
|
var MAX_DEPTH = 10;
|
|
1940
|
-
var
|
|
365
|
+
var formatLogMessage = (message, options = {}, depth2 = 0) => {
|
|
1941
366
|
if (depth2 > MAX_DEPTH) {
|
|
1942
367
|
return "<max depth>";
|
|
1943
368
|
}
|
|
@@ -1946,22 +371,22 @@ var formatLogMessage2 = (message, options = {}, depth2 = 0) => {
|
|
|
1946
371
|
const sort = options.sort ?? true;
|
|
1947
372
|
return typeof message === "undefined" || message === null ? "<empty>" : typeof message === "string" ? !message ? "<empty string>" : message : Array.isArray(message) ? `
|
|
1948
373
|
${message.sort(
|
|
1949
|
-
sort ? (
|
|
374
|
+
sort ? (a, b) => !a && !b ? 0 : !a ? 1 : !b ? -1 : String(a).localeCompare(String(b)) : void 0
|
|
1950
375
|
).map(
|
|
1951
|
-
(item, index) => ` ${prefix}> #${index} = ${
|
|
376
|
+
(item, index) => ` ${prefix}> #${index} = ${formatLogMessage(
|
|
1952
377
|
item,
|
|
1953
378
|
{ prefix: `${prefix}--`, skip, sort },
|
|
1954
379
|
depth2 + 1
|
|
1955
380
|
)}`
|
|
1956
381
|
).join("\n")}` : typeof message === "object" && message ? `
|
|
1957
382
|
${Object.keys(message).filter(
|
|
1958
|
-
(key) => typeof key !== "string" || !skip.map((
|
|
383
|
+
(key) => typeof key !== "string" || !skip.map((k) => k.toLowerCase().trim()).includes(key.toLowerCase().trim())
|
|
1959
384
|
).sort(
|
|
1960
|
-
sort ? (
|
|
385
|
+
sort ? (a, b) => !a && !b ? 0 : !a ? 1 : !b ? -1 : String(a).localeCompare(String(b)) : void 0
|
|
1961
386
|
).map(
|
|
1962
387
|
(key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" && message[key] ? Object.keys(message[key]).filter(
|
|
1963
|
-
(key2) => typeof key2 !== "string" || !skip.map((
|
|
1964
|
-
).length === 0 ? "{}" :
|
|
388
|
+
(key2) => typeof key2 !== "string" || !skip.map((k) => k.toLowerCase().trim()).includes(key2.toLowerCase().trim())
|
|
389
|
+
).length === 0 ? "{}" : formatLogMessage(
|
|
1965
390
|
message[key],
|
|
1966
391
|
{ prefix: `${prefix}--`, skip, sort },
|
|
1967
392
|
depth2 + 1
|
|
@@ -1976,292 +401,879 @@ var _isFunction = (value) => {
|
|
|
1976
401
|
}
|
|
1977
402
|
};
|
|
1978
403
|
|
|
1979
|
-
// ../
|
|
1980
|
-
var
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
404
|
+
// ../build-tools/src/plugins/swc.ts
|
|
405
|
+
var import_core = require("@swc/core");
|
|
406
|
+
|
|
407
|
+
// ../build-tools/src/plugins/ts-resolve.ts
|
|
408
|
+
var import_node_fs = __toESM(require("fs"));
|
|
409
|
+
var import_node_module = require("module");
|
|
410
|
+
var import_node_path = __toESM(require("path"));
|
|
411
|
+
var import_resolve = __toESM(require("resolve"));
|
|
412
|
+
|
|
413
|
+
// ../build-tools/src/plugins/type-definitions.ts
|
|
414
|
+
var import_devkit = require("@nx/devkit");
|
|
415
|
+
var import_path = require("path");
|
|
416
|
+
|
|
417
|
+
// ../build-tools/src/utilities/copy-assets.ts
|
|
418
|
+
var import_internal = require("@nx/js/internal");
|
|
419
|
+
|
|
420
|
+
// ../config-tools/src/utilities/correct-paths.ts
|
|
421
|
+
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
422
|
+
function normalizeWindowsPath(input = "") {
|
|
423
|
+
if (!input) {
|
|
424
|
+
return input;
|
|
425
|
+
}
|
|
426
|
+
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
427
|
+
}
|
|
428
|
+
var _UNC_REGEX = /^[/\\]{2}/;
|
|
429
|
+
var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
430
|
+
var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
431
|
+
var correctPaths = function(path2) {
|
|
432
|
+
if (!path2 || path2.length === 0) {
|
|
433
|
+
return ".";
|
|
434
|
+
}
|
|
435
|
+
path2 = normalizeWindowsPath(path2);
|
|
436
|
+
const isUNCPath = path2?.match(_UNC_REGEX);
|
|
437
|
+
const isPathAbsolute = isAbsolute(path2);
|
|
438
|
+
const trailingSeparator = path2[path2.length - 1] === "/";
|
|
439
|
+
path2 = normalizeString(path2, !isPathAbsolute);
|
|
440
|
+
if (path2.length === 0) {
|
|
441
|
+
if (isPathAbsolute) {
|
|
442
|
+
return "/";
|
|
443
|
+
}
|
|
444
|
+
return trailingSeparator ? "./" : ".";
|
|
445
|
+
}
|
|
446
|
+
if (trailingSeparator) {
|
|
447
|
+
path2 += "/";
|
|
448
|
+
}
|
|
449
|
+
if (_DRIVE_LETTER_RE.test(path2)) {
|
|
450
|
+
path2 += "/";
|
|
451
|
+
}
|
|
452
|
+
if (isUNCPath) {
|
|
453
|
+
if (!isPathAbsolute) {
|
|
454
|
+
return `//./${path2}`;
|
|
455
|
+
}
|
|
456
|
+
return `//${path2}`;
|
|
457
|
+
}
|
|
458
|
+
return isPathAbsolute && !isAbsolute(path2) ? `/${path2}` : path2;
|
|
2016
459
|
};
|
|
2017
|
-
var
|
|
2018
|
-
|
|
2019
|
-
const
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
460
|
+
var joinPaths = function(...segments) {
|
|
461
|
+
let path2 = "";
|
|
462
|
+
for (const seg of segments) {
|
|
463
|
+
if (!seg) {
|
|
464
|
+
continue;
|
|
465
|
+
}
|
|
466
|
+
if (path2.length > 0) {
|
|
467
|
+
const pathTrailing = path2[path2.length - 1] === "/";
|
|
468
|
+
const segLeading = seg[0] === "/";
|
|
469
|
+
const both = pathTrailing && segLeading;
|
|
470
|
+
if (both) {
|
|
471
|
+
path2 += seg.slice(1);
|
|
472
|
+
} else {
|
|
473
|
+
path2 += pathTrailing || segLeading ? seg : `/${seg}`;
|
|
2027
474
|
}
|
|
2028
|
-
|
|
475
|
+
} else {
|
|
476
|
+
path2 += seg;
|
|
477
|
+
}
|
|
2029
478
|
}
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
479
|
+
return correctPaths(path2);
|
|
480
|
+
};
|
|
481
|
+
function normalizeString(path2, allowAboveRoot) {
|
|
482
|
+
let res = "";
|
|
483
|
+
let lastSegmentLength = 0;
|
|
484
|
+
let lastSlash = -1;
|
|
485
|
+
let dots = 0;
|
|
486
|
+
let char = null;
|
|
487
|
+
for (let index = 0; index <= path2.length; ++index) {
|
|
488
|
+
if (index < path2.length) {
|
|
489
|
+
char = path2[index];
|
|
490
|
+
} else if (char === "/") {
|
|
491
|
+
break;
|
|
492
|
+
} else {
|
|
493
|
+
char = "/";
|
|
494
|
+
}
|
|
495
|
+
if (char === "/") {
|
|
496
|
+
if (lastSlash === index - 1 || dots === 1) {
|
|
497
|
+
} else if (dots === 2) {
|
|
498
|
+
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
499
|
+
if (res.length > 2) {
|
|
500
|
+
const lastSlashIndex = res.lastIndexOf("/");
|
|
501
|
+
if (lastSlashIndex === -1) {
|
|
502
|
+
res = "";
|
|
503
|
+
lastSegmentLength = 0;
|
|
504
|
+
} else {
|
|
505
|
+
res = res.slice(0, lastSlashIndex);
|
|
506
|
+
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
2043
507
|
}
|
|
2044
|
-
|
|
508
|
+
lastSlash = index;
|
|
509
|
+
dots = 0;
|
|
510
|
+
continue;
|
|
511
|
+
} else if (res.length > 0) {
|
|
512
|
+
res = "";
|
|
513
|
+
lastSegmentLength = 0;
|
|
514
|
+
lastSlash = index;
|
|
515
|
+
dots = 0;
|
|
516
|
+
continue;
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
if (allowAboveRoot) {
|
|
520
|
+
res += res.length > 0 ? "/.." : "..";
|
|
521
|
+
lastSegmentLength = 2;
|
|
522
|
+
}
|
|
523
|
+
} else {
|
|
524
|
+
if (res.length > 0) {
|
|
525
|
+
res += `/${path2.slice(lastSlash + 1, index)}`;
|
|
526
|
+
} else {
|
|
527
|
+
res = path2.slice(lastSlash + 1, index);
|
|
2045
528
|
}
|
|
2046
|
-
|
|
529
|
+
lastSegmentLength = index - lastSlash - 1;
|
|
2047
530
|
}
|
|
531
|
+
lastSlash = index;
|
|
532
|
+
dots = 0;
|
|
533
|
+
} else if (char === "." && dots !== -1) {
|
|
534
|
+
++dots;
|
|
535
|
+
} else {
|
|
536
|
+
dots = -1;
|
|
2048
537
|
}
|
|
2049
538
|
}
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
return config;
|
|
539
|
+
return res;
|
|
540
|
+
}
|
|
541
|
+
var isAbsolute = function(p) {
|
|
542
|
+
return _IS_ABSOLUTE_RE.test(p);
|
|
2055
543
|
};
|
|
2056
544
|
|
|
2057
|
-
// ../
|
|
2058
|
-
var
|
|
2059
|
-
var
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
var
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
var
|
|
545
|
+
// ../build-tools/src/utilities/copy-assets.ts
|
|
546
|
+
var import_glob = require("glob");
|
|
547
|
+
var import_promises = require("fs/promises");
|
|
548
|
+
|
|
549
|
+
// ../build-tools/src/utilities/generate-package-json.ts
|
|
550
|
+
var import_internal2 = require("@nx/js/internal");
|
|
551
|
+
|
|
552
|
+
// ../config-tools/src/utilities/find-up.ts
|
|
553
|
+
var import_node_fs2 = require("fs");
|
|
554
|
+
var import_node_path2 = require("path");
|
|
555
|
+
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
556
|
+
var depth = 0;
|
|
557
|
+
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
558
|
+
const _startPath = startPath ?? process.cwd();
|
|
559
|
+
if (endDirectoryNames.some(
|
|
560
|
+
(endDirName) => (0, import_node_fs2.existsSync)((0, import_node_path2.join)(_startPath, endDirName))
|
|
561
|
+
)) {
|
|
562
|
+
return _startPath;
|
|
563
|
+
}
|
|
564
|
+
if (endFileNames.some((endFileName) => (0, import_node_fs2.existsSync)((0, import_node_path2.join)(_startPath, endFileName)))) {
|
|
565
|
+
return _startPath;
|
|
566
|
+
}
|
|
567
|
+
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
568
|
+
const parent = (0, import_node_path2.join)(_startPath, "..");
|
|
569
|
+
return findFolderUp(parent, endFileNames, endDirectoryNames);
|
|
570
|
+
}
|
|
571
|
+
return void 0;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
575
|
+
var rootFiles = [
|
|
576
|
+
"storm-workspace.json",
|
|
577
|
+
"storm-workspace.yaml",
|
|
578
|
+
"storm-workspace.yml",
|
|
579
|
+
"storm-workspace.js",
|
|
580
|
+
"storm-workspace.ts",
|
|
581
|
+
".storm-workspace.json",
|
|
582
|
+
".storm-workspace.yaml",
|
|
583
|
+
".storm-workspace.yml",
|
|
584
|
+
".storm-workspace.js",
|
|
585
|
+
".storm-workspace.ts",
|
|
586
|
+
"lerna.json",
|
|
587
|
+
"nx.json",
|
|
588
|
+
"turbo.json",
|
|
589
|
+
"npm-workspace.json",
|
|
590
|
+
"yarn-workspace.json",
|
|
591
|
+
"pnpm-workspace.json",
|
|
592
|
+
"npm-workspace.yaml",
|
|
593
|
+
"yarn-workspace.yaml",
|
|
594
|
+
"pnpm-workspace.yaml",
|
|
595
|
+
"npm-workspace.yml",
|
|
596
|
+
"yarn-workspace.yml",
|
|
597
|
+
"pnpm-workspace.yml",
|
|
598
|
+
"npm-lock.json",
|
|
599
|
+
"yarn-lock.json",
|
|
600
|
+
"pnpm-lock.json",
|
|
601
|
+
"npm-lock.yaml",
|
|
602
|
+
"yarn-lock.yaml",
|
|
603
|
+
"pnpm-lock.yaml",
|
|
604
|
+
"npm-lock.yml",
|
|
605
|
+
"yarn-lock.yml",
|
|
606
|
+
"pnpm-lock.yml",
|
|
607
|
+
"bun.lockb"
|
|
608
|
+
];
|
|
609
|
+
var rootDirectories = [
|
|
610
|
+
".storm-workspace",
|
|
611
|
+
".nx",
|
|
612
|
+
".git",
|
|
613
|
+
".github",
|
|
614
|
+
".vscode",
|
|
615
|
+
".verdaccio"
|
|
616
|
+
];
|
|
617
|
+
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
618
|
+
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
619
|
+
return correctPaths(
|
|
620
|
+
process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH
|
|
621
|
+
);
|
|
622
|
+
}
|
|
623
|
+
return correctPaths(
|
|
624
|
+
findFolderUp(
|
|
625
|
+
pathInsideMonorepo ?? process.cwd(),
|
|
626
|
+
rootFiles,
|
|
627
|
+
rootDirectories
|
|
628
|
+
)
|
|
629
|
+
);
|
|
630
|
+
}
|
|
631
|
+
function findWorkspaceRoot(pathInsideMonorepo) {
|
|
632
|
+
const result = findWorkspaceRootSafe(pathInsideMonorepo);
|
|
633
|
+
if (!result) {
|
|
634
|
+
throw new Error(
|
|
635
|
+
`Cannot find workspace root upwards from known path. Files search list includes:
|
|
636
|
+
${rootFiles.join(
|
|
637
|
+
"\n"
|
|
638
|
+
)}
|
|
639
|
+
Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
|
|
640
|
+
);
|
|
641
|
+
}
|
|
642
|
+
return result;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
// ../build-tools/src/utilities/generate-package-json.ts
|
|
646
|
+
var import_glob2 = require("glob");
|
|
647
|
+
var import_node_fs3 = require("fs");
|
|
648
|
+
var import_promises2 = require("fs/promises");
|
|
649
|
+
var import_project_graph = require("nx/src/project-graph/project-graph");
|
|
650
|
+
|
|
651
|
+
// ../config-tools/src/config-file/get-config-file.ts
|
|
652
|
+
var import_c12 = require("c12");
|
|
653
|
+
var import_defu = __toESM(require("defu"), 1);
|
|
654
|
+
|
|
655
|
+
// ../config/src/constants.ts
|
|
656
|
+
var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
|
|
657
|
+
var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
|
|
658
|
+
var STORM_DEFAULT_CONTACT = "https://stormsoftware.com/contact";
|
|
659
|
+
var STORM_DEFAULT_LICENSING = "https://stormsoftware.com/license";
|
|
660
|
+
var STORM_DEFAULT_LICENSE = "Apache-2.0";
|
|
661
|
+
var STORM_DEFAULT_SOCIAL_DISCORD = "https://discord.gg/MQ6YVzakM5";
|
|
662
|
+
var STORM_DEFAULT_SOCIAL_SLACK = "https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA";
|
|
663
|
+
var STORM_DEFAULT_RELEASE_FOOTER = `
|
|
2066
664
|
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.
|
|
2067
665
|
|
|
2068
|
-
Join us on [Discord](${
|
|
666
|
+
Join us on [Discord](${STORM_DEFAULT_SOCIAL_DISCORD}) to chat with the team, receive release notifications, ask questions, and get involved.
|
|
2069
667
|
|
|
2070
|
-
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](${
|
|
668
|
+
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](${STORM_DEFAULT_CONTACT}) or join our [Slack](${STORM_DEFAULT_SOCIAL_SLACK}) channel!
|
|
2071
669
|
`;
|
|
2072
|
-
var
|
|
2073
|
-
var
|
|
670
|
+
var STORM_DEFAULT_ERROR_CODES_FILE = "tools/errors/codes.json";
|
|
671
|
+
var STORM_DEFAULT_BANNER_ALT = "The workspace's banner image";
|
|
2074
672
|
|
|
2075
|
-
// ../config/
|
|
2076
|
-
var
|
|
2077
|
-
var
|
|
2078
|
-
var
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
var
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
var
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
var
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
var
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
var
|
|
2245
|
-
|
|
673
|
+
// ../config/src/schema.ts
|
|
674
|
+
var z = __toESM(require("zod/v4/mini"), 1);
|
|
675
|
+
var schemaRegistry = z.registry();
|
|
676
|
+
var colorSchema = z.string().check(
|
|
677
|
+
z.length(7),
|
|
678
|
+
z.toLowerCase(),
|
|
679
|
+
z.regex(/^#([0-9a-f]{3}){1,2}$/i),
|
|
680
|
+
z.trim()
|
|
681
|
+
);
|
|
682
|
+
schemaRegistry.add(colorSchema, {
|
|
683
|
+
description: "A base schema for describing the format of colors"
|
|
684
|
+
});
|
|
685
|
+
var darkColorSchema = z._default(colorSchema, "#1e2124");
|
|
686
|
+
schemaRegistry.add(darkColorSchema, {
|
|
687
|
+
description: "The dark background color of the workspace"
|
|
688
|
+
});
|
|
689
|
+
var lightColorSchema = z._default(colorSchema, "#cbd5e1");
|
|
690
|
+
schemaRegistry.add(lightColorSchema, {
|
|
691
|
+
description: "The light background color of the workspace"
|
|
692
|
+
});
|
|
693
|
+
var brandColorSchema = z._default(colorSchema, "#1fb2a6");
|
|
694
|
+
schemaRegistry.add(brandColorSchema, {
|
|
695
|
+
description: "The primary brand specific color of the workspace"
|
|
696
|
+
});
|
|
697
|
+
var alternateColorSchema = z.optional(colorSchema);
|
|
698
|
+
schemaRegistry.add(alternateColorSchema, {
|
|
699
|
+
description: "The alternate brand specific color of the workspace"
|
|
700
|
+
});
|
|
701
|
+
var accentColorSchema = z.optional(colorSchema);
|
|
702
|
+
schemaRegistry.add(accentColorSchema, {
|
|
703
|
+
description: "The secondary brand specific color of the workspace"
|
|
704
|
+
});
|
|
705
|
+
var linkColorSchema = z._default(colorSchema, "#3fa6ff");
|
|
706
|
+
schemaRegistry.add(linkColorSchema, {
|
|
707
|
+
description: "The color used to display hyperlink text"
|
|
708
|
+
});
|
|
709
|
+
var discoveryColorSchema = z._default(colorSchema, "#818cf8");
|
|
710
|
+
schemaRegistry.add(discoveryColorSchema, {
|
|
711
|
+
description: "The second brand specific color of the workspace"
|
|
712
|
+
});
|
|
713
|
+
var successColorSchema = z._default(colorSchema, "#45b27e");
|
|
714
|
+
schemaRegistry.add(successColorSchema, {
|
|
715
|
+
description: "The success color of the workspace"
|
|
716
|
+
});
|
|
717
|
+
var infoColorSchema = z._default(colorSchema, "#38bdf8");
|
|
718
|
+
schemaRegistry.add(infoColorSchema, {
|
|
719
|
+
description: "The informational color of the workspace"
|
|
720
|
+
});
|
|
721
|
+
var debugColorSchema = z._default(colorSchema, "#8afafc");
|
|
722
|
+
schemaRegistry.add(debugColorSchema, {
|
|
723
|
+
description: "The debug color of the workspace"
|
|
724
|
+
});
|
|
725
|
+
var warningColorSchema = z._default(colorSchema, "#f3d371");
|
|
726
|
+
schemaRegistry.add(warningColorSchema, {
|
|
727
|
+
description: "The warning color of the workspace"
|
|
728
|
+
});
|
|
729
|
+
var dangerColorSchema = z._default(colorSchema, "#d8314a");
|
|
730
|
+
schemaRegistry.add(dangerColorSchema, {
|
|
731
|
+
description: "The danger color of the workspace"
|
|
732
|
+
});
|
|
733
|
+
var fatalColorSchema = z.optional(colorSchema);
|
|
734
|
+
schemaRegistry.add(fatalColorSchema, {
|
|
735
|
+
description: "The fatal color of the workspace"
|
|
736
|
+
});
|
|
737
|
+
var performanceColorSchema = z._default(colorSchema, "#80fd74");
|
|
738
|
+
schemaRegistry.add(performanceColorSchema, {
|
|
739
|
+
description: "The performance color of the workspace"
|
|
740
|
+
});
|
|
741
|
+
var positiveColorSchema = z._default(colorSchema, "#4ade80");
|
|
742
|
+
schemaRegistry.add(positiveColorSchema, {
|
|
743
|
+
description: "The positive number color of the workspace"
|
|
744
|
+
});
|
|
745
|
+
var negativeColorSchema = z._default(colorSchema, "#ef4444");
|
|
746
|
+
schemaRegistry.add(negativeColorSchema, {
|
|
747
|
+
description: "The negative number color of the workspace"
|
|
748
|
+
});
|
|
749
|
+
var gradientStopsSchema = z.optional(z.array(colorSchema));
|
|
750
|
+
schemaRegistry.add(gradientStopsSchema, {
|
|
751
|
+
description: "The color stops for the base gradient color pattern used in the workspace"
|
|
752
|
+
});
|
|
753
|
+
var darkColorsSchema = z.object({
|
|
754
|
+
foreground: lightColorSchema,
|
|
755
|
+
background: darkColorSchema,
|
|
756
|
+
brand: brandColorSchema,
|
|
757
|
+
alternate: alternateColorSchema,
|
|
758
|
+
accent: accentColorSchema,
|
|
759
|
+
link: linkColorSchema,
|
|
760
|
+
discovery: discoveryColorSchema,
|
|
761
|
+
success: successColorSchema,
|
|
762
|
+
info: infoColorSchema,
|
|
763
|
+
debug: debugColorSchema,
|
|
764
|
+
warning: warningColorSchema,
|
|
765
|
+
danger: dangerColorSchema,
|
|
766
|
+
fatal: fatalColorSchema,
|
|
767
|
+
performance: performanceColorSchema,
|
|
768
|
+
positive: positiveColorSchema,
|
|
769
|
+
negative: negativeColorSchema,
|
|
770
|
+
gradient: gradientStopsSchema
|
|
771
|
+
});
|
|
772
|
+
var lightColorsSchema = z.object({
|
|
773
|
+
foreground: darkColorSchema,
|
|
774
|
+
background: lightColorSchema,
|
|
775
|
+
brand: brandColorSchema,
|
|
776
|
+
alternate: alternateColorSchema,
|
|
777
|
+
accent: accentColorSchema,
|
|
778
|
+
link: linkColorSchema,
|
|
779
|
+
discovery: discoveryColorSchema,
|
|
780
|
+
success: successColorSchema,
|
|
781
|
+
info: infoColorSchema,
|
|
782
|
+
debug: debugColorSchema,
|
|
783
|
+
warning: warningColorSchema,
|
|
784
|
+
danger: dangerColorSchema,
|
|
785
|
+
fatal: fatalColorSchema,
|
|
786
|
+
performance: performanceColorSchema,
|
|
787
|
+
positive: positiveColorSchema,
|
|
788
|
+
negative: negativeColorSchema,
|
|
789
|
+
gradient: gradientStopsSchema
|
|
790
|
+
});
|
|
791
|
+
var multiColorsSchema = z.object({
|
|
792
|
+
dark: darkColorsSchema,
|
|
793
|
+
light: lightColorsSchema
|
|
794
|
+
});
|
|
795
|
+
var singleColorsSchema = z.object({
|
|
796
|
+
dark: darkColorSchema,
|
|
797
|
+
light: lightColorSchema,
|
|
798
|
+
brand: brandColorSchema,
|
|
799
|
+
alternate: alternateColorSchema,
|
|
800
|
+
accent: accentColorSchema,
|
|
801
|
+
link: linkColorSchema,
|
|
802
|
+
discovery: discoveryColorSchema,
|
|
803
|
+
success: successColorSchema,
|
|
804
|
+
info: infoColorSchema,
|
|
805
|
+
debug: debugColorSchema,
|
|
806
|
+
warning: warningColorSchema,
|
|
807
|
+
danger: dangerColorSchema,
|
|
808
|
+
fatal: fatalColorSchema,
|
|
809
|
+
performance: performanceColorSchema,
|
|
810
|
+
positive: positiveColorSchema,
|
|
811
|
+
negative: negativeColorSchema,
|
|
812
|
+
gradient: gradientStopsSchema
|
|
813
|
+
});
|
|
814
|
+
var registryUrlConfigSchema = z.optional(z.url());
|
|
815
|
+
schemaRegistry.add(registryUrlConfigSchema, {
|
|
816
|
+
description: "A remote registry URL used to publish distributable packages"
|
|
817
|
+
});
|
|
818
|
+
var registrySchema = z._default(
|
|
819
|
+
z.object({
|
|
820
|
+
github: registryUrlConfigSchema,
|
|
821
|
+
npm: registryUrlConfigSchema,
|
|
822
|
+
cargo: registryUrlConfigSchema,
|
|
823
|
+
cyclone: registryUrlConfigSchema,
|
|
824
|
+
container: registryUrlConfigSchema
|
|
825
|
+
}),
|
|
826
|
+
{}
|
|
827
|
+
);
|
|
828
|
+
schemaRegistry.add(registrySchema, {
|
|
829
|
+
description: "A list of remote registry URLs used by Storm Software"
|
|
830
|
+
});
|
|
831
|
+
var colorsSchema = z.union([singleColorsSchema, multiColorsSchema]);
|
|
832
|
+
schemaRegistry.add(colorsSchema, {
|
|
833
|
+
description: "Colors used for various workspace elements"
|
|
834
|
+
});
|
|
835
|
+
var themeColorsSchema = z.record(
|
|
836
|
+
z.union([z.union([z.literal("base"), z.string()]), z.string()]),
|
|
837
|
+
colorsSchema
|
|
838
|
+
);
|
|
839
|
+
schemaRegistry.add(themeColorsSchema, {
|
|
840
|
+
description: "Storm theme config values used for styling various package elements"
|
|
841
|
+
});
|
|
842
|
+
var extendsSchema = z.optional(
|
|
843
|
+
z.union([z.string().check(z.trim()), z.array(z.string().check(z.trim()))])
|
|
844
|
+
);
|
|
845
|
+
schemaRegistry.add(extendsSchema, {
|
|
846
|
+
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."
|
|
847
|
+
});
|
|
848
|
+
var workspaceBotNameSchema = z.string().check(z.trim());
|
|
849
|
+
schemaRegistry.add(workspaceBotNameSchema, {
|
|
850
|
+
description: "The workspace bot user's name (this is the bot that will be used to perform various tasks)"
|
|
851
|
+
});
|
|
852
|
+
var workspaceBotEmailSchema = z.string().check(z.trim());
|
|
853
|
+
schemaRegistry.add(workspaceBotEmailSchema, {
|
|
854
|
+
description: "The email of the workspace bot"
|
|
855
|
+
});
|
|
856
|
+
var workspaceBotSchema = z.object({
|
|
857
|
+
name: workspaceBotNameSchema,
|
|
858
|
+
email: workspaceBotEmailSchema
|
|
859
|
+
});
|
|
860
|
+
schemaRegistry.add(workspaceBotSchema, {
|
|
861
|
+
description: "The workspace's bot user's config used to automated various operations tasks"
|
|
862
|
+
});
|
|
863
|
+
var workspaceReleaseBannerUrlSchema = z.optional(
|
|
864
|
+
z.string().check(z.trim(), z.url())
|
|
865
|
+
);
|
|
866
|
+
schemaRegistry.add(workspaceReleaseBannerUrlSchema, {
|
|
867
|
+
description: "A URL to a banner image used to display the workspace's release"
|
|
868
|
+
});
|
|
869
|
+
var workspaceReleaseBannerAltSchema = z._default(
|
|
870
|
+
z.string().check(z.trim()),
|
|
871
|
+
STORM_DEFAULT_BANNER_ALT
|
|
872
|
+
);
|
|
873
|
+
schemaRegistry.add(workspaceReleaseBannerAltSchema, {
|
|
874
|
+
description: "The alt text for the workspace's release banner image"
|
|
875
|
+
});
|
|
876
|
+
var workspaceReleaseBannerSchema = z.object({
|
|
877
|
+
url: workspaceReleaseBannerUrlSchema,
|
|
878
|
+
alt: workspaceReleaseBannerAltSchema
|
|
879
|
+
});
|
|
880
|
+
schemaRegistry.add(workspaceReleaseBannerSchema, {
|
|
881
|
+
description: "The workspace's banner image used during the release process"
|
|
882
|
+
});
|
|
883
|
+
var workspaceReleaseHeaderSchema = z.optional(
|
|
884
|
+
z.string().check(z.trim())
|
|
885
|
+
);
|
|
886
|
+
schemaRegistry.add(workspaceReleaseHeaderSchema, {
|
|
887
|
+
description: "A header message appended to the start of the workspace's release notes"
|
|
888
|
+
});
|
|
889
|
+
var workspaceReleaseFooterSchema = z.optional(
|
|
890
|
+
z.string().check(z.trim())
|
|
891
|
+
);
|
|
892
|
+
schemaRegistry.add(workspaceReleaseFooterSchema, {
|
|
893
|
+
description: "A footer message appended to the end of the workspace's release notes"
|
|
894
|
+
});
|
|
895
|
+
var workspaceReleaseSchema = z.object({
|
|
896
|
+
banner: z.union([
|
|
897
|
+
workspaceReleaseBannerSchema,
|
|
898
|
+
z.string().check(z.trim(), z.url())
|
|
899
|
+
]),
|
|
900
|
+
header: workspaceReleaseHeaderSchema,
|
|
901
|
+
footer: workspaceReleaseFooterSchema
|
|
902
|
+
});
|
|
903
|
+
schemaRegistry.add(workspaceReleaseSchema, {
|
|
904
|
+
description: "The workspace's release config used during the release process"
|
|
905
|
+
});
|
|
906
|
+
var workspaceSocialsTwitterSchema = z.optional(
|
|
907
|
+
z.string().check(z.trim())
|
|
908
|
+
);
|
|
909
|
+
schemaRegistry.add(workspaceSocialsTwitterSchema, {
|
|
910
|
+
description: "A Twitter/X account associated with the organization/project"
|
|
911
|
+
});
|
|
912
|
+
var workspaceSocialsDiscordSchema = z.optional(
|
|
913
|
+
z.string().check(z.trim())
|
|
914
|
+
);
|
|
915
|
+
schemaRegistry.add(workspaceSocialsDiscordSchema, {
|
|
916
|
+
description: "A Discord account associated with the organization/project"
|
|
917
|
+
});
|
|
918
|
+
var workspaceSocialsTelegramSchema = z.optional(
|
|
919
|
+
z.string().check(z.trim())
|
|
920
|
+
);
|
|
921
|
+
schemaRegistry.add(workspaceSocialsTelegramSchema, {
|
|
922
|
+
description: "A Telegram account associated with the organization/project"
|
|
923
|
+
});
|
|
924
|
+
var workspaceSocialsSlackSchema = z.optional(
|
|
925
|
+
z.string().check(z.trim())
|
|
926
|
+
);
|
|
927
|
+
schemaRegistry.add(workspaceSocialsSlackSchema, {
|
|
928
|
+
description: "A Slack account associated with the organization/project"
|
|
929
|
+
});
|
|
930
|
+
var workspaceSocialsMediumSchema = z.optional(
|
|
931
|
+
z.string().check(z.trim())
|
|
932
|
+
);
|
|
933
|
+
schemaRegistry.add(workspaceSocialsMediumSchema, {
|
|
934
|
+
description: "A Medium account associated with the organization/project"
|
|
935
|
+
});
|
|
936
|
+
var workspaceSocialsGithubSchema = z.optional(
|
|
937
|
+
z.string().check(z.trim())
|
|
938
|
+
);
|
|
939
|
+
schemaRegistry.add(workspaceSocialsGithubSchema, {
|
|
940
|
+
description: "A GitHub account associated with the organization/project"
|
|
941
|
+
});
|
|
942
|
+
var workspaceSocialsSchema = z.object({
|
|
943
|
+
twitter: workspaceSocialsTwitterSchema,
|
|
944
|
+
discord: workspaceSocialsDiscordSchema,
|
|
945
|
+
telegram: workspaceSocialsTelegramSchema,
|
|
946
|
+
slack: workspaceSocialsSlackSchema,
|
|
947
|
+
medium: workspaceSocialsMediumSchema,
|
|
948
|
+
github: workspaceSocialsGithubSchema
|
|
949
|
+
});
|
|
950
|
+
schemaRegistry.add(workspaceSocialsSchema, {
|
|
951
|
+
description: "The workspace's account config used to store various social media links"
|
|
952
|
+
});
|
|
953
|
+
var workspaceDirectoryCacheSchema = z.optional(
|
|
954
|
+
z.string().check(z.trim())
|
|
955
|
+
);
|
|
956
|
+
schemaRegistry.add(workspaceDirectoryCacheSchema, {
|
|
957
|
+
description: "The directory used to store the environment's cached file data"
|
|
958
|
+
});
|
|
959
|
+
var workspaceDirectoryDataSchema = z.optional(
|
|
960
|
+
z.string().check(z.trim())
|
|
961
|
+
);
|
|
962
|
+
schemaRegistry.add(workspaceDirectoryDataSchema, {
|
|
963
|
+
description: "The directory used to store the environment's data files"
|
|
964
|
+
});
|
|
965
|
+
var workspaceDirectoryConfigSchema = z.optional(
|
|
966
|
+
z.string().check(z.trim())
|
|
967
|
+
);
|
|
968
|
+
schemaRegistry.add(workspaceDirectoryConfigSchema, {
|
|
969
|
+
description: "The directory used to store the environment's configuration files"
|
|
970
|
+
});
|
|
971
|
+
var workspaceDirectoryTempSchema = z.optional(
|
|
972
|
+
z.string().check(z.trim())
|
|
973
|
+
);
|
|
974
|
+
schemaRegistry.add(workspaceDirectoryTempSchema, {
|
|
975
|
+
description: "The directory used to store the environment's temp files"
|
|
976
|
+
});
|
|
977
|
+
var workspaceDirectoryLogSchema = z.optional(
|
|
978
|
+
z.string().check(z.trim())
|
|
979
|
+
);
|
|
980
|
+
schemaRegistry.add(workspaceDirectoryLogSchema, {
|
|
981
|
+
description: "The directory used to store the environment's log files"
|
|
982
|
+
});
|
|
983
|
+
var workspaceDirectoryBuildSchema = z._default(
|
|
984
|
+
z.string().check(z.trim()),
|
|
985
|
+
"dist"
|
|
986
|
+
);
|
|
987
|
+
schemaRegistry.add(workspaceDirectoryBuildSchema, {
|
|
988
|
+
description: "The directory used to store the workspace's distributable files after a build (relative to the workspace root)"
|
|
989
|
+
});
|
|
990
|
+
var workspaceDirectorySchema = z.object({
|
|
991
|
+
cache: workspaceDirectoryCacheSchema,
|
|
992
|
+
data: workspaceDirectoryDataSchema,
|
|
993
|
+
config: workspaceDirectoryConfigSchema,
|
|
994
|
+
temp: workspaceDirectoryTempSchema,
|
|
995
|
+
log: workspaceDirectoryLogSchema,
|
|
996
|
+
build: workspaceDirectoryBuildSchema
|
|
997
|
+
});
|
|
998
|
+
schemaRegistry.add(workspaceDirectorySchema, {
|
|
999
|
+
description: "Various directories used by the workspace to store data, cache, and configuration files"
|
|
1000
|
+
});
|
|
1001
|
+
var variantSchema = z._default(
|
|
1002
|
+
z.enum(["minimal", "monorepo"]),
|
|
1003
|
+
"monorepo"
|
|
1004
|
+
);
|
|
1005
|
+
schemaRegistry.add(variantSchema, {
|
|
1006
|
+
description: "The variant of the workspace. This can be used to enable or disable certain features or configurations."
|
|
1007
|
+
});
|
|
1008
|
+
var errorCodesFileSchema = z._default(
|
|
1009
|
+
z.string().check(z.trim()),
|
|
1010
|
+
STORM_DEFAULT_ERROR_CODES_FILE
|
|
1011
|
+
);
|
|
1012
|
+
schemaRegistry.add(errorCodesFileSchema, {
|
|
1013
|
+
description: "The path to the workspace's error codes JSON file"
|
|
1014
|
+
});
|
|
1015
|
+
var errorUrlSchema = z.optional(z.url());
|
|
1016
|
+
schemaRegistry.add(errorUrlSchema, {
|
|
1017
|
+
description: "A URL to a page that looks up the workspace's error messages given a specific error code"
|
|
1018
|
+
});
|
|
1019
|
+
var errorSchema = z.object({
|
|
1020
|
+
codesFile: errorCodesFileSchema,
|
|
1021
|
+
url: errorUrlSchema
|
|
1022
|
+
});
|
|
1023
|
+
schemaRegistry.add(errorSchema, {
|
|
1024
|
+
description: "The workspace's error config used when creating error details during a system error"
|
|
1025
|
+
});
|
|
1026
|
+
var organizationNameSchema = z.optional(
|
|
1027
|
+
z.string().check(z.trim(), z.toLowerCase())
|
|
1028
|
+
);
|
|
1029
|
+
schemaRegistry.add(organizationNameSchema, {
|
|
1030
|
+
description: "The name of the organization"
|
|
1031
|
+
});
|
|
1032
|
+
var organizationDescriptionSchema = z.optional(
|
|
1033
|
+
z.string().check(z.trim())
|
|
1034
|
+
);
|
|
1035
|
+
schemaRegistry.add(organizationDescriptionSchema, {
|
|
1036
|
+
description: "A description of the organization"
|
|
1037
|
+
});
|
|
1038
|
+
var organizationLogoSchema = z.optional(z.url());
|
|
1039
|
+
schemaRegistry.add(organizationLogoSchema, {
|
|
1040
|
+
description: "A URL to the organization's logo image"
|
|
1041
|
+
});
|
|
1042
|
+
var organizationIconSchema = z.optional(z.url());
|
|
1043
|
+
schemaRegistry.add(organizationIconSchema, {
|
|
1044
|
+
description: "A URL to the organization's icon image"
|
|
1045
|
+
});
|
|
1046
|
+
var organizationUrlSchema = z.optional(z.url());
|
|
1047
|
+
schemaRegistry.add(organizationUrlSchema, {
|
|
1048
|
+
description: "A URL to a page that provides more information about the organization"
|
|
1049
|
+
});
|
|
1050
|
+
var organizationSchema = z.object({
|
|
1051
|
+
name: organizationNameSchema,
|
|
1052
|
+
description: organizationDescriptionSchema,
|
|
1053
|
+
logo: organizationLogoSchema,
|
|
1054
|
+
icon: organizationIconSchema,
|
|
1055
|
+
url: organizationUrlSchema
|
|
1056
|
+
});
|
|
1057
|
+
schemaRegistry.add(organizationSchema, {
|
|
1058
|
+
description: "The workspace's organization details"
|
|
1059
|
+
});
|
|
1060
|
+
var schemaNameSchema = z._default(
|
|
1061
|
+
z.string().check(z.trim(), z.toLowerCase()),
|
|
1062
|
+
"https://public.storm-cdn.com/schemas/storm-workspace.schema.json"
|
|
1063
|
+
);
|
|
1064
|
+
schemaRegistry.add(schemaNameSchema, {
|
|
1065
|
+
description: "The URL or file path to the JSON schema file that describes the Storm configuration file"
|
|
1066
|
+
});
|
|
1067
|
+
var nameSchema = z.string().check(z.trim(), z.toLowerCase());
|
|
1068
|
+
schemaRegistry.add(nameSchema, {
|
|
1069
|
+
description: "The name of the workspace/project/service/package/scope using this configuration"
|
|
1070
|
+
});
|
|
1071
|
+
var namespaceSchema = z.string().check(z.trim(), z.toLowerCase());
|
|
1072
|
+
schemaRegistry.add(namespaceSchema, {
|
|
1073
|
+
description: "The namespace of the workspace/project/service/package/scope using this configuration"
|
|
1074
|
+
});
|
|
1075
|
+
var orgSchema = z.union([
|
|
1076
|
+
organizationSchema,
|
|
1077
|
+
z.string().check(z.trim(), z.toLowerCase())
|
|
1078
|
+
]);
|
|
1079
|
+
schemaRegistry.add(orgSchema, {
|
|
1080
|
+
description: "The organization of the workspace. This can be a string or an object containing the organization's details"
|
|
1081
|
+
});
|
|
1082
|
+
var repositorySchema = z.string().check(z.trim(), z.toLowerCase());
|
|
1083
|
+
schemaRegistry.add(repositorySchema, {
|
|
1084
|
+
description: "The repo URL of the workspace (i.e. the GitHub repository URL)"
|
|
1085
|
+
});
|
|
1086
|
+
var licenseSchema = z._default(
|
|
1087
|
+
z.string().check(z.trim()),
|
|
1088
|
+
"Apache-2.0"
|
|
1089
|
+
);
|
|
1090
|
+
schemaRegistry.add(licenseSchema, {
|
|
1091
|
+
description: "The license type of the package"
|
|
1092
|
+
});
|
|
1093
|
+
var homepageSchema = z.optional(z.url());
|
|
1094
|
+
schemaRegistry.add(homepageSchema, {
|
|
1095
|
+
description: "The homepage of the workspace"
|
|
1096
|
+
});
|
|
1097
|
+
var docsSchema = z.optional(z.url());
|
|
1098
|
+
schemaRegistry.add(docsSchema, {
|
|
1099
|
+
description: "The documentation site for the workspace"
|
|
1100
|
+
});
|
|
1101
|
+
var portalSchema = z.optional(z.url());
|
|
1102
|
+
schemaRegistry.add(portalSchema, {
|
|
1103
|
+
description: "The development portal site for the workspace"
|
|
1104
|
+
});
|
|
1105
|
+
var licensingSchema = z.optional(z.url());
|
|
1106
|
+
schemaRegistry.add(licensingSchema, {
|
|
1107
|
+
description: "The licensing site for the workspace"
|
|
1108
|
+
});
|
|
1109
|
+
var contactSchema = z.optional(z.url());
|
|
1110
|
+
schemaRegistry.add(contactSchema, {
|
|
1111
|
+
description: "The contact site for the workspace"
|
|
1112
|
+
});
|
|
1113
|
+
var supportSchema = z.optional(z.url());
|
|
1114
|
+
schemaRegistry.add(supportSchema, {
|
|
1115
|
+
description: "The support site for the workspace. If not provided, this is defaulted to the `contact` config value"
|
|
1116
|
+
});
|
|
1117
|
+
var branchSchema = z._default(
|
|
1118
|
+
z.string().check(z.trim(), z.toLowerCase()),
|
|
1119
|
+
"main"
|
|
1120
|
+
);
|
|
1121
|
+
schemaRegistry.add(branchSchema, {
|
|
1122
|
+
description: "The branch of the workspace"
|
|
1123
|
+
});
|
|
1124
|
+
var preidSchema = z.optional(
|
|
1125
|
+
z.string().check(z.trim(), z.toLowerCase())
|
|
1126
|
+
);
|
|
1127
|
+
schemaRegistry.add(preidSchema, {
|
|
1128
|
+
description: "A tag specifying the version pre-release identifier"
|
|
1129
|
+
});
|
|
1130
|
+
var ownerSchema = z.optional(
|
|
1131
|
+
z.string().check(z.trim(), z.toLowerCase())
|
|
1132
|
+
);
|
|
1133
|
+
schemaRegistry.add(ownerSchema, {
|
|
1134
|
+
description: "The owner of the package"
|
|
1135
|
+
});
|
|
1136
|
+
var modeSchema = z._default(
|
|
1137
|
+
z.enum(["development", "test", "production"]).check(z.trim(), z.toLowerCase()),
|
|
1138
|
+
"production"
|
|
1139
|
+
);
|
|
1140
|
+
schemaRegistry.add(modeSchema, {
|
|
1141
|
+
description: "The current runtime environment mode for the package"
|
|
1142
|
+
});
|
|
1143
|
+
var workspaceRootSchema = z.string().check(z.trim(), z.toLowerCase());
|
|
1144
|
+
schemaRegistry.add(workspaceRootSchema, {
|
|
1145
|
+
description: "The root directory of the workspace"
|
|
1146
|
+
});
|
|
1147
|
+
var skipCacheSchema = z._default(z.boolean(), false);
|
|
1148
|
+
schemaRegistry.add(skipCacheSchema, {
|
|
1149
|
+
description: "Should all known types of workspace caching be skipped?"
|
|
1150
|
+
});
|
|
1151
|
+
var packageManagerSchema = z._default(
|
|
1152
|
+
z.enum(["npm", "yarn", "pnpm", "bun"]),
|
|
1153
|
+
"npm"
|
|
1154
|
+
);
|
|
1155
|
+
schemaRegistry.add(packageManagerSchema, {
|
|
1156
|
+
description: "The JavaScript/TypeScript package manager used by the repository"
|
|
1157
|
+
});
|
|
1158
|
+
var timezoneSchema = z._default(
|
|
1159
|
+
z.string().check(z.trim()),
|
|
1160
|
+
"America/New_York"
|
|
1161
|
+
);
|
|
1162
|
+
schemaRegistry.add(timezoneSchema, {
|
|
1163
|
+
description: "The default timezone of the workspace"
|
|
1164
|
+
});
|
|
1165
|
+
var localeSchema = z._default(z.string().check(z.trim()), "en-US");
|
|
1166
|
+
schemaRegistry.add(localeSchema, {
|
|
1167
|
+
description: "The default locale of the workspace"
|
|
1168
|
+
});
|
|
1169
|
+
var logLevelSchema = z._default(
|
|
1170
|
+
z.enum([
|
|
1171
|
+
"silent",
|
|
1172
|
+
"fatal",
|
|
1173
|
+
"error",
|
|
1174
|
+
"warn",
|
|
1175
|
+
"success",
|
|
1176
|
+
"info",
|
|
1177
|
+
"performance",
|
|
1178
|
+
"debug",
|
|
1179
|
+
"trace",
|
|
1180
|
+
"all"
|
|
1181
|
+
]),
|
|
1182
|
+
"info"
|
|
1183
|
+
);
|
|
1184
|
+
schemaRegistry.add(logLevelSchema, {
|
|
1185
|
+
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`)."
|
|
1186
|
+
});
|
|
1187
|
+
var skipConfigLoggingSchema = z._default(z.boolean(), true);
|
|
1188
|
+
schemaRegistry.add(skipConfigLoggingSchema, {
|
|
1189
|
+
description: "Should the logging of the current Storm Workspace configuration be skipped?"
|
|
1190
|
+
});
|
|
1191
|
+
var configFileSchema = z._default(
|
|
1192
|
+
z.nullable(z.string().check(z.trim())),
|
|
1193
|
+
null
|
|
1194
|
+
);
|
|
1195
|
+
schemaRegistry.add(configFileSchema, {
|
|
1196
|
+
description: "The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
|
|
1197
|
+
});
|
|
1198
|
+
var extensionsSchema = z._default(z.record(z.string(), z.any()), {});
|
|
1199
|
+
schemaRegistry.add(extensionsSchema, {
|
|
1200
|
+
description: "Configuration of each used extension"
|
|
1201
|
+
});
|
|
1202
|
+
var workspaceConfigSchema = z.object({
|
|
1203
|
+
$schema: schemaNameSchema,
|
|
1204
|
+
extends: extendsSchema,
|
|
1205
|
+
name: nameSchema,
|
|
1206
|
+
variant: variantSchema,
|
|
1207
|
+
namespace: namespaceSchema,
|
|
1208
|
+
organization: orgSchema,
|
|
1209
|
+
repository: repositorySchema,
|
|
1210
|
+
license: licenseSchema,
|
|
1211
|
+
homepage: homepageSchema,
|
|
1212
|
+
docs: docsSchema,
|
|
1213
|
+
portal: portalSchema,
|
|
1214
|
+
licensing: licensingSchema,
|
|
1215
|
+
contact: contactSchema,
|
|
1216
|
+
support: supportSchema,
|
|
1217
|
+
branch: branchSchema,
|
|
1218
|
+
preid: preidSchema,
|
|
1219
|
+
owner: ownerSchema,
|
|
1220
|
+
bot: workspaceBotSchema,
|
|
1221
|
+
release: workspaceReleaseSchema,
|
|
1222
|
+
socials: workspaceSocialsSchema,
|
|
1223
|
+
error: errorSchema,
|
|
1224
|
+
mode: modeSchema,
|
|
1225
|
+
workspaceRoot: workspaceRootSchema,
|
|
1226
|
+
skipCache: skipCacheSchema,
|
|
1227
|
+
directories: workspaceDirectorySchema,
|
|
1228
|
+
packageManager: packageManagerSchema,
|
|
1229
|
+
timezone: timezoneSchema,
|
|
1230
|
+
locale: localeSchema,
|
|
1231
|
+
logLevel: logLevelSchema,
|
|
1232
|
+
skipConfigLogging: skipConfigLoggingSchema,
|
|
1233
|
+
registry: registrySchema,
|
|
1234
|
+
configFile: configFileSchema,
|
|
1235
|
+
colors: z.union([colorsSchema, themeColorsSchema]),
|
|
1236
|
+
extensions: extensionsSchema
|
|
1237
|
+
});
|
|
1238
|
+
schemaRegistry.add(extensionsSchema, {
|
|
1239
|
+
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."
|
|
1240
|
+
});
|
|
2246
1241
|
|
|
2247
|
-
// ../config/
|
|
2248
|
-
var
|
|
1242
|
+
// ../config/src/types.ts
|
|
1243
|
+
var COLOR_KEYS = [
|
|
1244
|
+
"dark",
|
|
1245
|
+
"light",
|
|
1246
|
+
"base",
|
|
1247
|
+
"brand",
|
|
1248
|
+
"alternate",
|
|
1249
|
+
"accent",
|
|
1250
|
+
"link",
|
|
1251
|
+
"success",
|
|
1252
|
+
"discovery",
|
|
1253
|
+
"info",
|
|
1254
|
+
"warning",
|
|
1255
|
+
"danger",
|
|
1256
|
+
"fatal",
|
|
1257
|
+
"performance",
|
|
1258
|
+
"positive",
|
|
1259
|
+
"negative"
|
|
1260
|
+
];
|
|
2249
1261
|
|
|
2250
|
-
// ../config-tools/
|
|
2251
|
-
var
|
|
2252
|
-
var
|
|
2253
|
-
var
|
|
1262
|
+
// ../config-tools/src/utilities/get-default-config.ts
|
|
1263
|
+
var import_node_fs4 = require("fs");
|
|
1264
|
+
var import_promises3 = require("fs/promises");
|
|
1265
|
+
var import_node_path3 = require("path");
|
|
2254
1266
|
async function getPackageJsonConfig(root) {
|
|
2255
|
-
let license =
|
|
1267
|
+
let license = STORM_DEFAULT_LICENSE;
|
|
2256
1268
|
let homepage = void 0;
|
|
2257
1269
|
let support = void 0;
|
|
2258
1270
|
let name = void 0;
|
|
2259
1271
|
let namespace = void 0;
|
|
2260
1272
|
let repository = void 0;
|
|
2261
|
-
const workspaceRoot =
|
|
2262
|
-
if ((0,
|
|
2263
|
-
const file = await (0,
|
|
2264
|
-
|
|
1273
|
+
const workspaceRoot = findWorkspaceRoot(root);
|
|
1274
|
+
if ((0, import_node_fs4.existsSync)((0, import_node_path3.join)(workspaceRoot, "package.json"))) {
|
|
1275
|
+
const file = await (0, import_promises3.readFile)(
|
|
1276
|
+
joinPaths(workspaceRoot, "package.json"),
|
|
2265
1277
|
"utf8"
|
|
2266
1278
|
);
|
|
2267
1279
|
if (file) {
|
|
@@ -2325,23 +1337,319 @@ function applyDefaultConfig(config) {
|
|
|
2325
1337
|
config.contact = `${config.homepage}/contact`;
|
|
2326
1338
|
}
|
|
2327
1339
|
if (!config.error?.codesFile || !config?.error?.url) {
|
|
2328
|
-
config.error ??= { codesFile:
|
|
1340
|
+
config.error ??= { codesFile: STORM_DEFAULT_ERROR_CODES_FILE };
|
|
2329
1341
|
if (config.homepage) {
|
|
2330
1342
|
config.error.url ??= `${config.homepage}/errors`;
|
|
2331
1343
|
}
|
|
2332
1344
|
}
|
|
2333
1345
|
}
|
|
2334
|
-
return config;
|
|
2335
|
-
}
|
|
1346
|
+
return config;
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
// ../config-tools/src/config-file/get-config-file.ts
|
|
1350
|
+
var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
1351
|
+
const workspacePath = filePath || findWorkspaceRoot(filePath);
|
|
1352
|
+
const configs = await Promise.all([
|
|
1353
|
+
(0, import_c12.loadConfig)({
|
|
1354
|
+
cwd: workspacePath,
|
|
1355
|
+
packageJson: true,
|
|
1356
|
+
name: fileName,
|
|
1357
|
+
envName: fileName?.toUpperCase(),
|
|
1358
|
+
jitiOptions: {
|
|
1359
|
+
debug: false,
|
|
1360
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(
|
|
1361
|
+
process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
|
|
1362
|
+
"jiti"
|
|
1363
|
+
)
|
|
1364
|
+
},
|
|
1365
|
+
...options
|
|
1366
|
+
}),
|
|
1367
|
+
(0, import_c12.loadConfig)({
|
|
1368
|
+
cwd: workspacePath,
|
|
1369
|
+
packageJson: true,
|
|
1370
|
+
name: fileName,
|
|
1371
|
+
envName: fileName?.toUpperCase(),
|
|
1372
|
+
jitiOptions: {
|
|
1373
|
+
debug: false,
|
|
1374
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(
|
|
1375
|
+
process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
|
|
1376
|
+
"jiti"
|
|
1377
|
+
)
|
|
1378
|
+
},
|
|
1379
|
+
configFile: fileName,
|
|
1380
|
+
...options
|
|
1381
|
+
})
|
|
1382
|
+
]);
|
|
1383
|
+
return (0, import_defu.default)(configs[0] ?? {}, configs[1] ?? {});
|
|
1384
|
+
};
|
|
1385
|
+
var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
1386
|
+
const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
|
|
1387
|
+
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
1388
|
+
let config = result.config;
|
|
1389
|
+
const configFile = result.configFile;
|
|
1390
|
+
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
1391
|
+
writeTrace(
|
|
1392
|
+
`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
|
|
1393
|
+
{
|
|
1394
|
+
logLevel: "all"
|
|
1395
|
+
}
|
|
1396
|
+
);
|
|
1397
|
+
}
|
|
1398
|
+
if (additionalFileNames && additionalFileNames.length > 0) {
|
|
1399
|
+
const results = await Promise.all(
|
|
1400
|
+
additionalFileNames.map(
|
|
1401
|
+
(fileName) => getConfigFileByName(fileName, workspacePath)
|
|
1402
|
+
)
|
|
1403
|
+
);
|
|
1404
|
+
for (const result2 of results) {
|
|
1405
|
+
if (result2?.config && result2?.configFile && Object.keys(result2.config).length > 0) {
|
|
1406
|
+
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
1407
|
+
writeTrace(
|
|
1408
|
+
`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
|
|
1409
|
+
{
|
|
1410
|
+
logLevel: "all"
|
|
1411
|
+
}
|
|
1412
|
+
);
|
|
1413
|
+
}
|
|
1414
|
+
config = (0, import_defu.default)(result2.config ?? {}, config ?? {});
|
|
1415
|
+
}
|
|
1416
|
+
}
|
|
1417
|
+
}
|
|
1418
|
+
if (!config || Object.keys(config).length === 0) {
|
|
1419
|
+
return void 0;
|
|
1420
|
+
}
|
|
1421
|
+
config.configFile = configFile;
|
|
1422
|
+
return config;
|
|
1423
|
+
};
|
|
1424
|
+
|
|
1425
|
+
// ../config-tools/src/create-storm-config.ts
|
|
1426
|
+
var import_defu2 = __toESM(require("defu"), 1);
|
|
1427
|
+
var import_node_fs5 = require("fs");
|
|
1428
|
+
|
|
1429
|
+
// ../config-tools/src/env/get-env.ts
|
|
1430
|
+
var getExtensionEnv = (extensionName) => {
|
|
1431
|
+
const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
|
|
1432
|
+
return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
|
|
1433
|
+
const name = key.replace(prefix, "").split("_").map(
|
|
1434
|
+
(i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : ""
|
|
1435
|
+
).join("");
|
|
1436
|
+
if (name) {
|
|
1437
|
+
ret[name] = process.env[key];
|
|
1438
|
+
}
|
|
1439
|
+
return ret;
|
|
1440
|
+
}, {});
|
|
1441
|
+
};
|
|
1442
|
+
var getConfigEnv = () => {
|
|
1443
|
+
const prefix = "STORM_";
|
|
1444
|
+
let config = {
|
|
1445
|
+
extends: process.env[`${prefix}EXTENDS`] || void 0,
|
|
1446
|
+
name: process.env[`${prefix}NAME`] || void 0,
|
|
1447
|
+
variant: process.env[`${prefix}VARIANT`] || void 0,
|
|
1448
|
+
namespace: process.env[`${prefix}NAMESPACE`] || void 0,
|
|
1449
|
+
owner: process.env[`${prefix}OWNER`] || void 0,
|
|
1450
|
+
bot: {
|
|
1451
|
+
name: process.env[`${prefix}BOT_NAME`] || void 0,
|
|
1452
|
+
email: process.env[`${prefix}BOT_EMAIL`] || void 0
|
|
1453
|
+
},
|
|
1454
|
+
release: {
|
|
1455
|
+
banner: {
|
|
1456
|
+
url: process.env[`${prefix}RELEASE_BANNER_URL`] || void 0,
|
|
1457
|
+
alt: process.env[`${prefix}RELEASE_BANNER_ALT`] || void 0
|
|
1458
|
+
},
|
|
1459
|
+
header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
|
|
1460
|
+
footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
|
|
1461
|
+
},
|
|
1462
|
+
error: {
|
|
1463
|
+
codesFile: process.env[`${prefix}ERROR_CODES_FILE`] || void 0,
|
|
1464
|
+
url: process.env[`${prefix}ERROR_URL`] || void 0
|
|
1465
|
+
},
|
|
1466
|
+
socials: {
|
|
1467
|
+
twitter: process.env[`${prefix}SOCIAL_TWITTER`] || void 0,
|
|
1468
|
+
discord: process.env[`${prefix}SOCIAL_DISCORD`] || void 0,
|
|
1469
|
+
telegram: process.env[`${prefix}SOCIAL_TELEGRAM`] || void 0,
|
|
1470
|
+
slack: process.env[`${prefix}SOCIAL_SLACK`] || void 0,
|
|
1471
|
+
medium: process.env[`${prefix}SOCIAL_MEDIUM`] || void 0,
|
|
1472
|
+
github: process.env[`${prefix}SOCIAL_GITHUB`] || void 0
|
|
1473
|
+
},
|
|
1474
|
+
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`] ? {
|
|
1475
|
+
name: process.env[`${prefix}ORG`] || process.env[`${prefix}ORGANIZATION`] || process.env[`${prefix}ORG_NAME`] || process.env[`${prefix}ORGANIZATION_NAME`],
|
|
1476
|
+
description: process.env[`${prefix}ORG_DESCRIPTION`] || process.env[`${prefix}ORGANIZATION_DESCRIPTION`] || void 0,
|
|
1477
|
+
url: process.env[`${prefix}ORG_URL`] || process.env[`${prefix}ORGANIZATION_URL`] || void 0,
|
|
1478
|
+
logo: process.env[`${prefix}ORG_LOGO`] || process.env[`${prefix}ORGANIZATION_LOGO`] || void 0,
|
|
1479
|
+
icon: process.env[`${prefix}ORG_ICON`] || process.env[`${prefix}ORGANIZATION_ICON`] || void 0
|
|
1480
|
+
} : process.env[`${prefix}ORG`] || process.env[`${prefix}ORGANIZATION`] || process.env[`${prefix}ORG_NAME`] || process.env[`${prefix}ORGANIZATION_NAME`] : void 0,
|
|
1481
|
+
packageManager: process.env[`${prefix}PACKAGE_MANAGER`] || void 0,
|
|
1482
|
+
license: process.env[`${prefix}LICENSE`] || void 0,
|
|
1483
|
+
homepage: process.env[`${prefix}HOMEPAGE`] || void 0,
|
|
1484
|
+
docs: process.env[`${prefix}DOCS`] || void 0,
|
|
1485
|
+
portal: process.env[`${prefix}PORTAL`] || void 0,
|
|
1486
|
+
licensing: process.env[`${prefix}LICENSING`] || void 0,
|
|
1487
|
+
contact: process.env[`${prefix}CONTACT`] || void 0,
|
|
1488
|
+
support: process.env[`${prefix}SUPPORT`] || void 0,
|
|
1489
|
+
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
1490
|
+
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
1491
|
+
configFile: process.env[`${prefix}WORKSPACE_CONFIG_FILE`] ? correctPaths(process.env[`${prefix}WORKSPACE_CONFIG_FILE`]) : void 0,
|
|
1492
|
+
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? correctPaths(process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
1493
|
+
directories: {
|
|
1494
|
+
cache: process.env[`${prefix}CACHE_DIR`] ? correctPaths(process.env[`${prefix}CACHE_DIR`]) : process.env[`${prefix}CACHE_DIRECTORY`] ? correctPaths(process.env[`${prefix}CACHE_DIRECTORY`]) : void 0,
|
|
1495
|
+
data: process.env[`${prefix}DATA_DIR`] ? correctPaths(process.env[`${prefix}DATA_DIR`]) : process.env[`${prefix}DATA_DIRECTORY`] ? correctPaths(process.env[`${prefix}DATA_DIRECTORY`]) : void 0,
|
|
1496
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? correctPaths(process.env[`${prefix}CONFIG_DIR`]) : process.env[`${prefix}CONFIG_DIRECTORY`] ? correctPaths(process.env[`${prefix}CONFIG_DIRECTORY`]) : void 0,
|
|
1497
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? correctPaths(process.env[`${prefix}TEMP_DIR`]) : process.env[`${prefix}TEMP_DIRECTORY`] ? correctPaths(process.env[`${prefix}TEMP_DIRECTORY`]) : void 0,
|
|
1498
|
+
log: process.env[`${prefix}LOG_DIR`] ? correctPaths(process.env[`${prefix}LOG_DIR`]) : process.env[`${prefix}LOG_DIRECTORY`] ? correctPaths(process.env[`${prefix}LOG_DIRECTORY`]) : void 0,
|
|
1499
|
+
build: process.env[`${prefix}BUILD_DIR`] ? correctPaths(process.env[`${prefix}BUILD_DIR`]) : process.env[`${prefix}BUILD_DIRECTORY`] ? correctPaths(process.env[`${prefix}BUILD_DIRECTORY`]) : void 0
|
|
1500
|
+
},
|
|
1501
|
+
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
1502
|
+
mode: (process.env[`${prefix}MODE`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT) || void 0,
|
|
1503
|
+
// ci:
|
|
1504
|
+
// process.env[`${prefix}CI`] !== undefined
|
|
1505
|
+
// ? Boolean(
|
|
1506
|
+
// process.env[`${prefix}CI`] ??
|
|
1507
|
+
// process.env.CI ??
|
|
1508
|
+
// process.env.CONTINUOUS_INTEGRATION
|
|
1509
|
+
// )
|
|
1510
|
+
// : undefined,
|
|
1511
|
+
repository: process.env[`${prefix}REPOSITORY`] || void 0,
|
|
1512
|
+
branch: process.env[`${prefix}BRANCH`] || void 0,
|
|
1513
|
+
preid: process.env[`${prefix}PRE_ID`] || void 0,
|
|
1514
|
+
registry: {
|
|
1515
|
+
github: process.env[`${prefix}REGISTRY_GITHUB`] || void 0,
|
|
1516
|
+
npm: process.env[`${prefix}REGISTRY_NPM`] || void 0,
|
|
1517
|
+
cargo: process.env[`${prefix}REGISTRY_CARGO`] || void 0,
|
|
1518
|
+
cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
|
|
1519
|
+
container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
|
|
1520
|
+
},
|
|
1521
|
+
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
|
|
1522
|
+
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
1523
|
+
) ? getLogLevelLabel(
|
|
1524
|
+
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
1525
|
+
) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
1526
|
+
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
1527
|
+
};
|
|
1528
|
+
const themeNames = Object.keys(process.env).filter(
|
|
1529
|
+
(envKey) => envKey.startsWith(`${prefix}COLOR_`) && COLOR_KEYS.every(
|
|
1530
|
+
(colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)
|
|
1531
|
+
)
|
|
1532
|
+
);
|
|
1533
|
+
config.colors = themeNames.length > 0 ? themeNames.reduce(
|
|
1534
|
+
(ret, themeName) => {
|
|
1535
|
+
ret[themeName] = getThemeColorsEnv(prefix, themeName);
|
|
1536
|
+
return ret;
|
|
1537
|
+
},
|
|
1538
|
+
{}
|
|
1539
|
+
) : getThemeColorsEnv(prefix);
|
|
1540
|
+
if (config.docs === STORM_DEFAULT_DOCS) {
|
|
1541
|
+
if (config.homepage === STORM_DEFAULT_HOMEPAGE) {
|
|
1542
|
+
config.docs = `${STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
|
|
1543
|
+
} else {
|
|
1544
|
+
config.docs = `${config.homepage}/docs`;
|
|
1545
|
+
}
|
|
1546
|
+
}
|
|
1547
|
+
if (config.licensing === STORM_DEFAULT_LICENSING) {
|
|
1548
|
+
if (config.homepage === STORM_DEFAULT_HOMEPAGE) {
|
|
1549
|
+
config.licensing = `${STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
|
|
1550
|
+
} else {
|
|
1551
|
+
config.licensing = `${config.homepage}/docs`;
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
const serializedConfig = process.env[`${prefix}WORKSPACE_CONFIG`];
|
|
1555
|
+
if (serializedConfig) {
|
|
1556
|
+
const parsed = JSON.parse(serializedConfig);
|
|
1557
|
+
config = {
|
|
1558
|
+
...config,
|
|
1559
|
+
...parsed,
|
|
1560
|
+
colors: { ...config.colors, ...parsed.colors },
|
|
1561
|
+
extensions: { ...config.extensions, ...parsed.extensions }
|
|
1562
|
+
};
|
|
1563
|
+
}
|
|
1564
|
+
return config;
|
|
1565
|
+
};
|
|
1566
|
+
var getThemeColorsEnv = (prefix, theme) => {
|
|
1567
|
+
const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
|
|
1568
|
+
return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorsEnv(prefix + themeName) : getSingleThemeColorsEnv(prefix + themeName);
|
|
1569
|
+
};
|
|
1570
|
+
var getSingleThemeColorsEnv = (prefix) => {
|
|
1571
|
+
const gradient = [];
|
|
1572
|
+
if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
|
|
1573
|
+
gradient.push(
|
|
1574
|
+
process.env[`${prefix}GRADIENT_START`],
|
|
1575
|
+
process.env[`${prefix}GRADIENT_END`]
|
|
1576
|
+
);
|
|
1577
|
+
} else if (process.env[`${prefix}GRADIENT_0`] || process.env[`${prefix}GRADIENT_1`]) {
|
|
1578
|
+
let index = process.env[`${prefix}GRADIENT_0`] ? 0 : 1;
|
|
1579
|
+
while (process.env[`${prefix}GRADIENT_${index}`]) {
|
|
1580
|
+
gradient.push(process.env[`${prefix}GRADIENT_${index}`]);
|
|
1581
|
+
index++;
|
|
1582
|
+
}
|
|
1583
|
+
}
|
|
1584
|
+
return {
|
|
1585
|
+
dark: process.env[`${prefix}DARK`],
|
|
1586
|
+
light: process.env[`${prefix}LIGHT`],
|
|
1587
|
+
brand: process.env[`${prefix}BRAND`],
|
|
1588
|
+
alternate: process.env[`${prefix}ALTERNATE`],
|
|
1589
|
+
accent: process.env[`${prefix}ACCENT`],
|
|
1590
|
+
link: process.env[`${prefix}LINK`],
|
|
1591
|
+
discovery: process.env[`${prefix}DISCOVERY`],
|
|
1592
|
+
success: process.env[`${prefix}SUCCESS`],
|
|
1593
|
+
info: process.env[`${prefix}INFO`],
|
|
1594
|
+
debug: process.env[`${prefix}DEBUG`],
|
|
1595
|
+
warning: process.env[`${prefix}WARNING`],
|
|
1596
|
+
danger: process.env[`${prefix}DANGER`],
|
|
1597
|
+
fatal: process.env[`${prefix}FATAL`],
|
|
1598
|
+
performance: process.env[`${prefix}PERFORMANCE`],
|
|
1599
|
+
positive: process.env[`${prefix}POSITIVE`],
|
|
1600
|
+
negative: process.env[`${prefix}NEGATIVE`],
|
|
1601
|
+
gradient
|
|
1602
|
+
};
|
|
1603
|
+
};
|
|
1604
|
+
var getMultiThemeColorsEnv = (prefix) => {
|
|
1605
|
+
return {
|
|
1606
|
+
light: getBaseThemeColorsEnv(`${prefix}_LIGHT_`),
|
|
1607
|
+
dark: getBaseThemeColorsEnv(`${prefix}_DARK_`)
|
|
1608
|
+
};
|
|
1609
|
+
};
|
|
1610
|
+
var getBaseThemeColorsEnv = (prefix) => {
|
|
1611
|
+
const gradient = [];
|
|
1612
|
+
if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
|
|
1613
|
+
gradient.push(
|
|
1614
|
+
process.env[`${prefix}GRADIENT_START`],
|
|
1615
|
+
process.env[`${prefix}GRADIENT_END`]
|
|
1616
|
+
);
|
|
1617
|
+
} else if (process.env[`${prefix}GRADIENT_0`] || process.env[`${prefix}GRADIENT_1`]) {
|
|
1618
|
+
let index = process.env[`${prefix}GRADIENT_0`] ? 0 : 1;
|
|
1619
|
+
while (process.env[`${prefix}GRADIENT_${index}`]) {
|
|
1620
|
+
gradient.push(process.env[`${prefix}GRADIENT_${index}`]);
|
|
1621
|
+
index++;
|
|
1622
|
+
}
|
|
1623
|
+
}
|
|
1624
|
+
return {
|
|
1625
|
+
foreground: process.env[`${prefix}FOREGROUND`],
|
|
1626
|
+
background: process.env[`${prefix}BACKGROUND`],
|
|
1627
|
+
brand: process.env[`${prefix}BRAND`],
|
|
1628
|
+
alternate: process.env[`${prefix}ALTERNATE`],
|
|
1629
|
+
accent: process.env[`${prefix}ACCENT`],
|
|
1630
|
+
link: process.env[`${prefix}LINK`],
|
|
1631
|
+
discovery: process.env[`${prefix}DISCOVERY`],
|
|
1632
|
+
success: process.env[`${prefix}SUCCESS`],
|
|
1633
|
+
info: process.env[`${prefix}INFO`],
|
|
1634
|
+
debug: process.env[`${prefix}DEBUG`],
|
|
1635
|
+
warning: process.env[`${prefix}WARNING`],
|
|
1636
|
+
danger: process.env[`${prefix}DANGER`],
|
|
1637
|
+
fatal: process.env[`${prefix}FATAL`],
|
|
1638
|
+
performance: process.env[`${prefix}PERFORMANCE`],
|
|
1639
|
+
positive: process.env[`${prefix}POSITIVE`],
|
|
1640
|
+
negative: process.env[`${prefix}NEGATIVE`],
|
|
1641
|
+
gradient
|
|
1642
|
+
};
|
|
1643
|
+
};
|
|
2336
1644
|
|
|
2337
|
-
// ../config-tools/
|
|
1645
|
+
// ../config-tools/src/env/set-env.ts
|
|
2338
1646
|
var setExtensionEnv = (extensionName, extension) => {
|
|
2339
1647
|
for (const key of Object.keys(extension ?? {})) {
|
|
2340
1648
|
if (extension[key]) {
|
|
2341
1649
|
const result = key?.replace(
|
|
2342
1650
|
/([A-Z])+/g,
|
|
2343
1651
|
(input) => input ? input[0]?.toUpperCase() + input.slice(1) : ""
|
|
2344
|
-
).split(/(?=[A-Z])|[.\-\s_]/).map((
|
|
1652
|
+
).split(/(?=[A-Z])|[.\-\s_]/).map((x) => x.toLowerCase()) ?? [];
|
|
2345
1653
|
let extensionKey;
|
|
2346
1654
|
if (result.length === 0) {
|
|
2347
1655
|
return;
|
|
@@ -2482,42 +1790,42 @@ var setConfigEnv = (config) => {
|
|
|
2482
1790
|
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
2483
1791
|
}
|
|
2484
1792
|
if (config.configFile) {
|
|
2485
|
-
process.env[`${prefix}WORKSPACE_CONFIG_FILE`] =
|
|
1793
|
+
process.env[`${prefix}WORKSPACE_CONFIG_FILE`] = correctPaths(
|
|
2486
1794
|
config.configFile
|
|
2487
1795
|
);
|
|
2488
1796
|
}
|
|
2489
1797
|
if (config.workspaceRoot) {
|
|
2490
|
-
process.env[`${prefix}WORKSPACE_ROOT`] =
|
|
2491
|
-
process.env.NX_WORKSPACE_ROOT =
|
|
2492
|
-
process.env.NX_WORKSPACE_ROOT_PATH =
|
|
1798
|
+
process.env[`${prefix}WORKSPACE_ROOT`] = correctPaths(config.workspaceRoot);
|
|
1799
|
+
process.env.NX_WORKSPACE_ROOT = correctPaths(config.workspaceRoot);
|
|
1800
|
+
process.env.NX_WORKSPACE_ROOT_PATH = correctPaths(config.workspaceRoot);
|
|
2493
1801
|
}
|
|
2494
1802
|
if (config.directories) {
|
|
2495
1803
|
if (!config.skipCache && config.directories.cache) {
|
|
2496
|
-
process.env[`${prefix}CACHE_DIR`] =
|
|
1804
|
+
process.env[`${prefix}CACHE_DIR`] = correctPaths(
|
|
2497
1805
|
config.directories.cache
|
|
2498
1806
|
);
|
|
2499
1807
|
process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
|
|
2500
1808
|
}
|
|
2501
1809
|
if (config.directories.data) {
|
|
2502
|
-
process.env[`${prefix}DATA_DIR`] =
|
|
1810
|
+
process.env[`${prefix}DATA_DIR`] = correctPaths(config.directories.data);
|
|
2503
1811
|
process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
|
|
2504
1812
|
}
|
|
2505
1813
|
if (config.directories.config) {
|
|
2506
|
-
process.env[`${prefix}CONFIG_DIR`] =
|
|
1814
|
+
process.env[`${prefix}CONFIG_DIR`] = correctPaths(
|
|
2507
1815
|
config.directories.config
|
|
2508
1816
|
);
|
|
2509
1817
|
process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
|
|
2510
1818
|
}
|
|
2511
1819
|
if (config.directories.temp) {
|
|
2512
|
-
process.env[`${prefix}TEMP_DIR`] =
|
|
1820
|
+
process.env[`${prefix}TEMP_DIR`] = correctPaths(config.directories.temp);
|
|
2513
1821
|
process.env[`${prefix}TEMP_DIRECTORY`] = process.env[`${prefix}TEMP_DIR`];
|
|
2514
1822
|
}
|
|
2515
1823
|
if (config.directories.log) {
|
|
2516
|
-
process.env[`${prefix}LOG_DIR`] =
|
|
1824
|
+
process.env[`${prefix}LOG_DIR`] = correctPaths(config.directories.log);
|
|
2517
1825
|
process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
|
|
2518
1826
|
}
|
|
2519
1827
|
if (config.directories.build) {
|
|
2520
|
-
process.env[`${prefix}BUILD_DIR`] =
|
|
1828
|
+
process.env[`${prefix}BUILD_DIR`] = correctPaths(
|
|
2521
1829
|
config.directories.build
|
|
2522
1830
|
);
|
|
2523
1831
|
process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
|
|
@@ -2579,9 +1887,9 @@ var setConfigEnv = (config) => {
|
|
|
2579
1887
|
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
2580
1888
|
process.env.LOG_LEVEL = String(config.logLevel);
|
|
2581
1889
|
process.env.NX_VERBOSE_LOGGING = String(
|
|
2582
|
-
|
|
1890
|
+
getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false
|
|
2583
1891
|
);
|
|
2584
|
-
process.env.RUST_BACKTRACE =
|
|
1892
|
+
process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none";
|
|
2585
1893
|
}
|
|
2586
1894
|
if (config.skipConfigLogging !== void 0) {
|
|
2587
1895
|
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(
|
|
@@ -2648,8 +1956,8 @@ var setSingleThemeColorsEnv = (prefix, config) => {
|
|
|
2648
1956
|
process.env[`${prefix}NEGATIVE`] = config.negative;
|
|
2649
1957
|
}
|
|
2650
1958
|
if (config.gradient) {
|
|
2651
|
-
for (let
|
|
2652
|
-
process.env[`${prefix}GRADIENT_${
|
|
1959
|
+
for (let i = 0; i < config.gradient.length; i++) {
|
|
1960
|
+
process.env[`${prefix}GRADIENT_${i}`] = config.gradient[i];
|
|
2653
1961
|
}
|
|
2654
1962
|
}
|
|
2655
1963
|
};
|
|
@@ -2709,231 +2017,13 @@ var setBaseThemeColorsEnv = (prefix, config) => {
|
|
|
2709
2017
|
process.env[`${prefix}NEGATIVE`] = config.negative;
|
|
2710
2018
|
}
|
|
2711
2019
|
if (config.gradient) {
|
|
2712
|
-
for (let
|
|
2713
|
-
process.env[`${prefix}GRADIENT_${
|
|
2714
|
-
}
|
|
2715
|
-
}
|
|
2716
|
-
};
|
|
2717
|
-
|
|
2718
|
-
// ../config-tools/dist/chunk-2RLMTBVZ.js
|
|
2719
|
-
var getExtensionEnv = (extensionName) => {
|
|
2720
|
-
const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
|
|
2721
|
-
return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
|
|
2722
|
-
const name = key.replace(prefix, "").split("_").map(
|
|
2723
|
-
(i3) => i3.length > 0 ? i3.trim().charAt(0).toUpperCase() + i3.trim().slice(1) : ""
|
|
2724
|
-
).join("");
|
|
2725
|
-
if (name) {
|
|
2726
|
-
ret[name] = process.env[key];
|
|
2727
|
-
}
|
|
2728
|
-
return ret;
|
|
2729
|
-
}, {});
|
|
2730
|
-
};
|
|
2731
|
-
var getConfigEnv = () => {
|
|
2732
|
-
const prefix = "STORM_";
|
|
2733
|
-
let config = {
|
|
2734
|
-
extends: process.env[`${prefix}EXTENDS`] || void 0,
|
|
2735
|
-
name: process.env[`${prefix}NAME`] || void 0,
|
|
2736
|
-
variant: process.env[`${prefix}VARIANT`] || void 0,
|
|
2737
|
-
namespace: process.env[`${prefix}NAMESPACE`] || void 0,
|
|
2738
|
-
owner: process.env[`${prefix}OWNER`] || void 0,
|
|
2739
|
-
bot: {
|
|
2740
|
-
name: process.env[`${prefix}BOT_NAME`] || void 0,
|
|
2741
|
-
email: process.env[`${prefix}BOT_EMAIL`] || void 0
|
|
2742
|
-
},
|
|
2743
|
-
release: {
|
|
2744
|
-
banner: {
|
|
2745
|
-
url: process.env[`${prefix}RELEASE_BANNER_URL`] || void 0,
|
|
2746
|
-
alt: process.env[`${prefix}RELEASE_BANNER_ALT`] || void 0
|
|
2747
|
-
},
|
|
2748
|
-
header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
|
|
2749
|
-
footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
|
|
2750
|
-
},
|
|
2751
|
-
error: {
|
|
2752
|
-
codesFile: process.env[`${prefix}ERROR_CODES_FILE`] || void 0,
|
|
2753
|
-
url: process.env[`${prefix}ERROR_URL`] || void 0
|
|
2754
|
-
},
|
|
2755
|
-
socials: {
|
|
2756
|
-
twitter: process.env[`${prefix}SOCIAL_TWITTER`] || void 0,
|
|
2757
|
-
discord: process.env[`${prefix}SOCIAL_DISCORD`] || void 0,
|
|
2758
|
-
telegram: process.env[`${prefix}SOCIAL_TELEGRAM`] || void 0,
|
|
2759
|
-
slack: process.env[`${prefix}SOCIAL_SLACK`] || void 0,
|
|
2760
|
-
medium: process.env[`${prefix}SOCIAL_MEDIUM`] || void 0,
|
|
2761
|
-
github: process.env[`${prefix}SOCIAL_GITHUB`] || void 0
|
|
2762
|
-
},
|
|
2763
|
-
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`] ? {
|
|
2764
|
-
name: process.env[`${prefix}ORG`] || process.env[`${prefix}ORGANIZATION`] || process.env[`${prefix}ORG_NAME`] || process.env[`${prefix}ORGANIZATION_NAME`],
|
|
2765
|
-
description: process.env[`${prefix}ORG_DESCRIPTION`] || process.env[`${prefix}ORGANIZATION_DESCRIPTION`] || void 0,
|
|
2766
|
-
url: process.env[`${prefix}ORG_URL`] || process.env[`${prefix}ORGANIZATION_URL`] || void 0,
|
|
2767
|
-
logo: process.env[`${prefix}ORG_LOGO`] || process.env[`${prefix}ORGANIZATION_LOGO`] || void 0,
|
|
2768
|
-
icon: process.env[`${prefix}ORG_ICON`] || process.env[`${prefix}ORGANIZATION_ICON`] || void 0
|
|
2769
|
-
} : process.env[`${prefix}ORG`] || process.env[`${prefix}ORGANIZATION`] || process.env[`${prefix}ORG_NAME`] || process.env[`${prefix}ORGANIZATION_NAME`] : void 0,
|
|
2770
|
-
packageManager: process.env[`${prefix}PACKAGE_MANAGER`] || void 0,
|
|
2771
|
-
license: process.env[`${prefix}LICENSE`] || void 0,
|
|
2772
|
-
homepage: process.env[`${prefix}HOMEPAGE`] || void 0,
|
|
2773
|
-
docs: process.env[`${prefix}DOCS`] || void 0,
|
|
2774
|
-
portal: process.env[`${prefix}PORTAL`] || void 0,
|
|
2775
|
-
licensing: process.env[`${prefix}LICENSING`] || void 0,
|
|
2776
|
-
contact: process.env[`${prefix}CONTACT`] || void 0,
|
|
2777
|
-
support: process.env[`${prefix}SUPPORT`] || void 0,
|
|
2778
|
-
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
2779
|
-
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
2780
|
-
configFile: process.env[`${prefix}WORKSPACE_CONFIG_FILE`] ? correctPaths2(process.env[`${prefix}WORKSPACE_CONFIG_FILE`]) : void 0,
|
|
2781
|
-
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? correctPaths2(process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
2782
|
-
directories: {
|
|
2783
|
-
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,
|
|
2784
|
-
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,
|
|
2785
|
-
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,
|
|
2786
|
-
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,
|
|
2787
|
-
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,
|
|
2788
|
-
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
|
|
2789
|
-
},
|
|
2790
|
-
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
2791
|
-
mode: (process.env[`${prefix}MODE`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT) || void 0,
|
|
2792
|
-
// ci:
|
|
2793
|
-
// process.env[`${prefix}CI`] !== undefined
|
|
2794
|
-
// ? Boolean(
|
|
2795
|
-
// process.env[`${prefix}CI`] ??
|
|
2796
|
-
// process.env.CI ??
|
|
2797
|
-
// process.env.CONTINUOUS_INTEGRATION
|
|
2798
|
-
// )
|
|
2799
|
-
// : undefined,
|
|
2800
|
-
repository: process.env[`${prefix}REPOSITORY`] || void 0,
|
|
2801
|
-
branch: process.env[`${prefix}BRANCH`] || void 0,
|
|
2802
|
-
preid: process.env[`${prefix}PRE_ID`] || void 0,
|
|
2803
|
-
registry: {
|
|
2804
|
-
github: process.env[`${prefix}REGISTRY_GITHUB`] || void 0,
|
|
2805
|
-
npm: process.env[`${prefix}REGISTRY_NPM`] || void 0,
|
|
2806
|
-
cargo: process.env[`${prefix}REGISTRY_CARGO`] || void 0,
|
|
2807
|
-
cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
|
|
2808
|
-
container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
|
|
2809
|
-
},
|
|
2810
|
-
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
|
|
2811
|
-
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
2812
|
-
) ? getLogLevelLabel2(
|
|
2813
|
-
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
2814
|
-
) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
2815
|
-
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
2816
|
-
};
|
|
2817
|
-
const themeNames = Object.keys(process.env).filter(
|
|
2818
|
-
(envKey) => envKey.startsWith(`${prefix}COLOR_`) && e3.every(
|
|
2819
|
-
(colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)
|
|
2820
|
-
)
|
|
2821
|
-
);
|
|
2822
|
-
config.colors = themeNames.length > 0 ? themeNames.reduce(
|
|
2823
|
-
(ret, themeName) => {
|
|
2824
|
-
ret[themeName] = getThemeColorsEnv(prefix, themeName);
|
|
2825
|
-
return ret;
|
|
2826
|
-
},
|
|
2827
|
-
{}
|
|
2828
|
-
) : getThemeColorsEnv(prefix);
|
|
2829
|
-
if (config.docs === s) {
|
|
2830
|
-
if (config.homepage === r) {
|
|
2831
|
-
config.docs = `${r}/projects/${config.name}/docs`;
|
|
2832
|
-
} else {
|
|
2833
|
-
config.docs = `${config.homepage}/docs`;
|
|
2834
|
-
}
|
|
2835
|
-
}
|
|
2836
|
-
if (config.licensing === a) {
|
|
2837
|
-
if (config.homepage === r) {
|
|
2838
|
-
config.licensing = `${r}/projects/${config.name}/licensing`;
|
|
2839
|
-
} else {
|
|
2840
|
-
config.licensing = `${config.homepage}/docs`;
|
|
2841
|
-
}
|
|
2842
|
-
}
|
|
2843
|
-
const serializedConfig = process.env[`${prefix}WORKSPACE_CONFIG`];
|
|
2844
|
-
if (serializedConfig) {
|
|
2845
|
-
const parsed = JSON.parse(serializedConfig);
|
|
2846
|
-
config = {
|
|
2847
|
-
...config,
|
|
2848
|
-
...parsed,
|
|
2849
|
-
colors: { ...config.colors, ...parsed.colors },
|
|
2850
|
-
extensions: { ...config.extensions, ...parsed.extensions }
|
|
2851
|
-
};
|
|
2852
|
-
}
|
|
2853
|
-
return config;
|
|
2854
|
-
};
|
|
2855
|
-
var getThemeColorsEnv = (prefix, theme) => {
|
|
2856
|
-
const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
|
|
2857
|
-
return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorsEnv(prefix + themeName) : getSingleThemeColorsEnv(prefix + themeName);
|
|
2858
|
-
};
|
|
2859
|
-
var getSingleThemeColorsEnv = (prefix) => {
|
|
2860
|
-
const gradient = [];
|
|
2861
|
-
if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
|
|
2862
|
-
gradient.push(
|
|
2863
|
-
process.env[`${prefix}GRADIENT_START`],
|
|
2864
|
-
process.env[`${prefix}GRADIENT_END`]
|
|
2865
|
-
);
|
|
2866
|
-
} else if (process.env[`${prefix}GRADIENT_0`] || process.env[`${prefix}GRADIENT_1`]) {
|
|
2867
|
-
let index = process.env[`${prefix}GRADIENT_0`] ? 0 : 1;
|
|
2868
|
-
while (process.env[`${prefix}GRADIENT_${index}`]) {
|
|
2869
|
-
gradient.push(process.env[`${prefix}GRADIENT_${index}`]);
|
|
2870
|
-
index++;
|
|
2871
|
-
}
|
|
2872
|
-
}
|
|
2873
|
-
return {
|
|
2874
|
-
dark: process.env[`${prefix}DARK`],
|
|
2875
|
-
light: process.env[`${prefix}LIGHT`],
|
|
2876
|
-
brand: process.env[`${prefix}BRAND`],
|
|
2877
|
-
alternate: process.env[`${prefix}ALTERNATE`],
|
|
2878
|
-
accent: process.env[`${prefix}ACCENT`],
|
|
2879
|
-
link: process.env[`${prefix}LINK`],
|
|
2880
|
-
discovery: process.env[`${prefix}DISCOVERY`],
|
|
2881
|
-
success: process.env[`${prefix}SUCCESS`],
|
|
2882
|
-
info: process.env[`${prefix}INFO`],
|
|
2883
|
-
debug: process.env[`${prefix}DEBUG`],
|
|
2884
|
-
warning: process.env[`${prefix}WARNING`],
|
|
2885
|
-
danger: process.env[`${prefix}DANGER`],
|
|
2886
|
-
fatal: process.env[`${prefix}FATAL`],
|
|
2887
|
-
performance: process.env[`${prefix}PERFORMANCE`],
|
|
2888
|
-
positive: process.env[`${prefix}POSITIVE`],
|
|
2889
|
-
negative: process.env[`${prefix}NEGATIVE`],
|
|
2890
|
-
gradient
|
|
2891
|
-
};
|
|
2892
|
-
};
|
|
2893
|
-
var getMultiThemeColorsEnv = (prefix) => {
|
|
2894
|
-
return {
|
|
2895
|
-
light: getBaseThemeColorsEnv(`${prefix}_LIGHT_`),
|
|
2896
|
-
dark: getBaseThemeColorsEnv(`${prefix}_DARK_`)
|
|
2897
|
-
};
|
|
2898
|
-
};
|
|
2899
|
-
var getBaseThemeColorsEnv = (prefix) => {
|
|
2900
|
-
const gradient = [];
|
|
2901
|
-
if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
|
|
2902
|
-
gradient.push(
|
|
2903
|
-
process.env[`${prefix}GRADIENT_START`],
|
|
2904
|
-
process.env[`${prefix}GRADIENT_END`]
|
|
2905
|
-
);
|
|
2906
|
-
} else if (process.env[`${prefix}GRADIENT_0`] || process.env[`${prefix}GRADIENT_1`]) {
|
|
2907
|
-
let index = process.env[`${prefix}GRADIENT_0`] ? 0 : 1;
|
|
2908
|
-
while (process.env[`${prefix}GRADIENT_${index}`]) {
|
|
2909
|
-
gradient.push(process.env[`${prefix}GRADIENT_${index}`]);
|
|
2910
|
-
index++;
|
|
2020
|
+
for (let i = 0; i < config.gradient.length; i++) {
|
|
2021
|
+
process.env[`${prefix}GRADIENT_${i}`] = config.gradient[i];
|
|
2911
2022
|
}
|
|
2912
2023
|
}
|
|
2913
|
-
return {
|
|
2914
|
-
foreground: process.env[`${prefix}FOREGROUND`],
|
|
2915
|
-
background: process.env[`${prefix}BACKGROUND`],
|
|
2916
|
-
brand: process.env[`${prefix}BRAND`],
|
|
2917
|
-
alternate: process.env[`${prefix}ALTERNATE`],
|
|
2918
|
-
accent: process.env[`${prefix}ACCENT`],
|
|
2919
|
-
link: process.env[`${prefix}LINK`],
|
|
2920
|
-
discovery: process.env[`${prefix}DISCOVERY`],
|
|
2921
|
-
success: process.env[`${prefix}SUCCESS`],
|
|
2922
|
-
info: process.env[`${prefix}INFO`],
|
|
2923
|
-
debug: process.env[`${prefix}DEBUG`],
|
|
2924
|
-
warning: process.env[`${prefix}WARNING`],
|
|
2925
|
-
danger: process.env[`${prefix}DANGER`],
|
|
2926
|
-
fatal: process.env[`${prefix}FATAL`],
|
|
2927
|
-
performance: process.env[`${prefix}PERFORMANCE`],
|
|
2928
|
-
positive: process.env[`${prefix}POSITIVE`],
|
|
2929
|
-
negative: process.env[`${prefix}NEGATIVE`],
|
|
2930
|
-
gradient
|
|
2931
|
-
};
|
|
2932
2024
|
};
|
|
2933
2025
|
|
|
2934
|
-
// ../config-tools/
|
|
2935
|
-
var import_defu4 = __toESM(require("defu"), 1);
|
|
2936
|
-
var import_node_fs9 = require("fs");
|
|
2026
|
+
// ../config-tools/src/create-storm-config.ts
|
|
2937
2027
|
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
2938
2028
|
var _static_cache = void 0;
|
|
2939
2029
|
var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, skipLogs = false, useDefault = true) => {
|
|
@@ -2941,13 +2031,13 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
2941
2031
|
if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 8e3) {
|
|
2942
2032
|
let _workspaceRoot = workspaceRoot;
|
|
2943
2033
|
if (!_workspaceRoot) {
|
|
2944
|
-
_workspaceRoot =
|
|
2034
|
+
_workspaceRoot = findWorkspaceRoot();
|
|
2945
2035
|
}
|
|
2946
2036
|
const configEnv = getConfigEnv();
|
|
2947
2037
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
2948
2038
|
if (!configFile) {
|
|
2949
2039
|
if (!skipLogs) {
|
|
2950
|
-
|
|
2040
|
+
writeWarning(
|
|
2951
2041
|
"No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n",
|
|
2952
2042
|
{ logLevel: "all" }
|
|
2953
2043
|
);
|
|
@@ -2957,17 +2047,17 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
2957
2047
|
}
|
|
2958
2048
|
}
|
|
2959
2049
|
const defaultConfig = await getPackageJsonConfig(_workspaceRoot);
|
|
2960
|
-
const configInput = (0,
|
|
2050
|
+
const configInput = (0, import_defu2.default)(
|
|
2961
2051
|
configEnv,
|
|
2962
2052
|
configFile,
|
|
2963
2053
|
defaultConfig
|
|
2964
2054
|
);
|
|
2965
2055
|
if (!configInput.variant) {
|
|
2966
|
-
configInput.variant = (0,
|
|
2056
|
+
configInput.variant = (0, import_node_fs5.existsSync)(joinPaths(_workspaceRoot, "nx.json")) || (0, import_node_fs5.existsSync)(joinPaths(_workspaceRoot, ".nx")) || (0, import_node_fs5.existsSync)(joinPaths(_workspaceRoot, "lerna.json")) || (0, import_node_fs5.existsSync)(joinPaths(_workspaceRoot, "turbo.json")) ? "monorepo" : "minimal";
|
|
2967
2057
|
}
|
|
2968
2058
|
try {
|
|
2969
2059
|
const parseResult = await Promise.resolve(
|
|
2970
|
-
|
|
2060
|
+
workspaceConfigSchema._zod.parse(
|
|
2971
2061
|
{ value: configInput, issues: [] },
|
|
2972
2062
|
{ async: true }
|
|
2973
2063
|
)
|
|
@@ -2978,7 +2068,7 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
2978
2068
|
throw new Error(
|
|
2979
2069
|
`Failed to parse Storm Workspace configuration${error?.message ? `: ${error.message}` : ""}
|
|
2980
2070
|
|
|
2981
|
-
Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${
|
|
2071
|
+
Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${formatLogMessage(
|
|
2982
2072
|
configInput
|
|
2983
2073
|
)}`,
|
|
2984
2074
|
{
|
|
@@ -3023,32 +2113,56 @@ var loadStormWorkspaceConfig = async (workspaceRoot, skipLogs = false) => {
|
|
|
3023
2113
|
);
|
|
3024
2114
|
setConfigEnv(config);
|
|
3025
2115
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
3026
|
-
|
|
2116
|
+
writeTrace(
|
|
3027
2117
|
`\u2699\uFE0F Using Storm Workspace configuration:
|
|
3028
|
-
${
|
|
2118
|
+
${formatLogMessage(config)}`,
|
|
3029
2119
|
config
|
|
3030
2120
|
);
|
|
3031
2121
|
}
|
|
3032
2122
|
return config;
|
|
3033
2123
|
};
|
|
3034
2124
|
|
|
3035
|
-
// ../config-tools/
|
|
2125
|
+
// ../config-tools/src/get-config.ts
|
|
3036
2126
|
function getConfig(workspaceRoot, skipLogs = false) {
|
|
3037
2127
|
return loadStormWorkspaceConfig(workspaceRoot, skipLogs);
|
|
3038
2128
|
}
|
|
3039
2129
|
function getWorkspaceConfig(skipLogs = true, options = {}) {
|
|
3040
2130
|
let workspaceRoot = options.workspaceRoot;
|
|
3041
2131
|
if (!workspaceRoot) {
|
|
3042
|
-
workspaceRoot =
|
|
2132
|
+
workspaceRoot = findWorkspaceRoot(options.cwd);
|
|
3043
2133
|
}
|
|
3044
2134
|
return getConfig(workspaceRoot, skipLogs);
|
|
3045
2135
|
}
|
|
3046
2136
|
|
|
2137
|
+
// ../build-tools/src/utilities/get-entry-points.ts
|
|
2138
|
+
var import_glob3 = require("glob");
|
|
2139
|
+
|
|
2140
|
+
// ../build-tools/src/utilities/get-env.ts
|
|
2141
|
+
var getEnv = (builder, options) => {
|
|
2142
|
+
return {
|
|
2143
|
+
STORM_BUILD: builder,
|
|
2144
|
+
STORM_ORG: options.orgName || DEFAULT_ORGANIZATION,
|
|
2145
|
+
STORM_NAME: options.name,
|
|
2146
|
+
STORM_MODE: options.mode || DEFAULT_ENVIRONMENT,
|
|
2147
|
+
STORM_PLATFORM: options.platform,
|
|
2148
|
+
STORM_FORMAT: JSON.stringify(options.format),
|
|
2149
|
+
STORM_TARGET: JSON.stringify(options.target),
|
|
2150
|
+
...options.env
|
|
2151
|
+
};
|
|
2152
|
+
};
|
|
2153
|
+
|
|
2154
|
+
// ../build-tools/src/utilities/read-nx-config.ts
|
|
2155
|
+
var import_node_fs6 = require("fs");
|
|
2156
|
+
var import_promises4 = require("fs/promises");
|
|
2157
|
+
|
|
2158
|
+
// ../build-tools/src/utilities/task-graph.ts
|
|
2159
|
+
var import_create_task_graph = require("nx/src/tasks-runner/create-task-graph");
|
|
2160
|
+
|
|
3047
2161
|
// src/options.ts
|
|
3048
|
-
var
|
|
3049
|
-
var
|
|
3050
|
-
var
|
|
3051
|
-
var
|
|
2162
|
+
var import_defu3 = __toESM(require("defu"), 1);
|
|
2163
|
+
var import_node_fs7 = require("fs");
|
|
2164
|
+
var import_promises5 = __toESM(require("fs/promises"), 1);
|
|
2165
|
+
var import_find_workspace_root5 = require("nx/src/utils/find-workspace-root");
|
|
3052
2166
|
|
|
3053
2167
|
// src/constants.ts
|
|
3054
2168
|
var DEFAULT_BUILD_OPTIONS = {
|
|
@@ -3095,7 +2209,7 @@ var DEFAULT_BUILD_OPTIONS = {
|
|
|
3095
2209
|
// src/options.ts
|
|
3096
2210
|
async function resolveOptions(userOptions) {
|
|
3097
2211
|
const projectRoot = userOptions.projectRoot;
|
|
3098
|
-
const workspaceRoot = (0,
|
|
2212
|
+
const workspaceRoot = (0, import_find_workspace_root5.findWorkspaceRoot)(projectRoot);
|
|
3099
2213
|
if (!workspaceRoot) {
|
|
3100
2214
|
throw new Error("Cannot find Nx workspace root");
|
|
3101
2215
|
}
|
|
@@ -3103,39 +2217,39 @@ async function resolveOptions(userOptions) {
|
|
|
3103
2217
|
workspaceRoot: workspaceRoot.dir
|
|
3104
2218
|
});
|
|
3105
2219
|
if (!userOptions.silent) {
|
|
3106
|
-
|
|
2220
|
+
writeDebug(" \u2699\uFE0F Resolving build options", workspaceConfig);
|
|
3107
2221
|
}
|
|
3108
2222
|
const stopwatch = getStopwatch("Build options resolution");
|
|
3109
|
-
const projectJsonPath =
|
|
2223
|
+
const projectJsonPath = joinPaths(
|
|
3110
2224
|
workspaceRoot.dir,
|
|
3111
2225
|
projectRoot,
|
|
3112
2226
|
"project.json"
|
|
3113
2227
|
);
|
|
3114
|
-
if (!(0,
|
|
2228
|
+
if (!(0, import_node_fs7.existsSync)(projectJsonPath)) {
|
|
3115
2229
|
throw new Error("Cannot find project.json configuration");
|
|
3116
2230
|
}
|
|
3117
|
-
const projectJsonFile = await
|
|
2231
|
+
const projectJsonFile = await import_promises5.default.readFile(projectJsonPath, "utf8");
|
|
3118
2232
|
const projectJson = JSON.parse(projectJsonFile);
|
|
3119
2233
|
const projectName = projectJson.name || userOptions.name;
|
|
3120
|
-
const options = (0,
|
|
2234
|
+
const options = (0, import_defu3.default)(userOptions, DEFAULT_BUILD_OPTIONS);
|
|
3121
2235
|
options.name ??= projectName;
|
|
3122
|
-
const packageJsonPath =
|
|
2236
|
+
const packageJsonPath = joinPaths(
|
|
3123
2237
|
workspaceRoot.dir,
|
|
3124
2238
|
options.projectRoot,
|
|
3125
2239
|
"package.json"
|
|
3126
2240
|
);
|
|
3127
|
-
if (!(0,
|
|
2241
|
+
if (!(0, import_node_fs7.existsSync)(packageJsonPath)) {
|
|
3128
2242
|
throw new Error("Cannot find package.json configuration");
|
|
3129
2243
|
}
|
|
3130
2244
|
const env = getEnv("esbuild", options);
|
|
3131
2245
|
const resolvedOptions = {
|
|
3132
2246
|
name: projectName,
|
|
3133
|
-
entry: [
|
|
2247
|
+
entry: [joinPaths(workspaceRoot.dir, projectRoot, "src/index.ts")],
|
|
3134
2248
|
clean: true,
|
|
3135
2249
|
workspaceConfig,
|
|
3136
2250
|
...options,
|
|
3137
|
-
outDir: options.outputPath ||
|
|
3138
|
-
tsconfig: userOptions.tsconfig === null ? void 0 : userOptions.tsconfig ? userOptions.tsconfig :
|
|
2251
|
+
outDir: options.outputPath || joinPaths(workspaceConfig.workspaceRoot, "dist", options.projectRoot),
|
|
2252
|
+
tsconfig: userOptions.tsconfig === null ? void 0 : userOptions.tsconfig ? userOptions.tsconfig : joinPaths(workspaceRoot.dir, projectRoot, "tsconfig.json"),
|
|
3139
2253
|
env: Object.keys(env).filter((key) => env[key] !== void 0).reduce((ret, key) => {
|
|
3140
2254
|
const value = JSON.stringify(env[key]);
|
|
3141
2255
|
const safeKey = key.replaceAll("(", "").replaceAll(")", "");
|
|
@@ -3149,10 +2263,10 @@ async function resolveOptions(userOptions) {
|
|
|
3149
2263
|
if (!resolvedOptions.silent) {
|
|
3150
2264
|
stopwatch();
|
|
3151
2265
|
if (resolvedOptions.verbose) {
|
|
3152
|
-
|
|
2266
|
+
writeDebug(
|
|
3153
2267
|
` \u2699\uFE0F Build options resolved:
|
|
3154
2268
|
|
|
3155
|
-
${
|
|
2269
|
+
${formatLogMessage(resolvedOptions)}`,
|
|
3156
2270
|
{ ...workspaceConfig, logLevel: "all" }
|
|
3157
2271
|
);
|
|
3158
2272
|
}
|