@storm-software/workspace-tools 1.42.4 → 1.43.1
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/CHANGELOG.md +14 -0
- package/README.md +1 -1
- package/index.js +382 -285
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/base/index.js +362 -265
- package/src/executors/design-tokens/executor.js +235 -131
- package/src/executors/tsup/executor.js +234 -129
- package/src/executors/tsup-browser/executor.js +233 -128
- package/src/executors/tsup-neutral/executor.js +233 -128
- package/src/executors/tsup-node/executor.js +233 -128
- package/src/generators/browser-library/generator.js +251 -149
- package/src/generators/config-schema/generator.js +221 -109
- package/src/generators/neutral-library/generator.js +251 -149
- package/src/generators/node-library/generator.js +251 -149
- package/src/generators/preset/generator.js +220 -108
|
@@ -16390,14 +16390,14 @@ var require_share = __commonJS({
|
|
|
16390
16390
|
resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe();
|
|
16391
16391
|
resetConnection = void 0;
|
|
16392
16392
|
};
|
|
16393
|
-
var
|
|
16393
|
+
var reset2 = function() {
|
|
16394
16394
|
cancelReset();
|
|
16395
16395
|
connection = subject = void 0;
|
|
16396
16396
|
hasCompleted = hasErrored = false;
|
|
16397
16397
|
};
|
|
16398
16398
|
var resetAndUnsubscribe = function() {
|
|
16399
16399
|
var conn = connection;
|
|
16400
|
-
|
|
16400
|
+
reset2();
|
|
16401
16401
|
conn === null || conn === void 0 ? void 0 : conn.unsubscribe();
|
|
16402
16402
|
};
|
|
16403
16403
|
return lift_1.operate(function(source, subscriber) {
|
|
@@ -16421,13 +16421,13 @@ var require_share = __commonJS({
|
|
|
16421
16421
|
error: function(err) {
|
|
16422
16422
|
hasErrored = true;
|
|
16423
16423
|
cancelReset();
|
|
16424
|
-
resetConnection = handleReset(
|
|
16424
|
+
resetConnection = handleReset(reset2, resetOnError, err);
|
|
16425
16425
|
dest.error(err);
|
|
16426
16426
|
},
|
|
16427
16427
|
complete: function() {
|
|
16428
16428
|
hasCompleted = true;
|
|
16429
16429
|
cancelReset();
|
|
16430
|
-
resetConnection = handleReset(
|
|
16430
|
+
resetConnection = handleReset(reset2, resetOnComplete);
|
|
16431
16431
|
dest.complete();
|
|
16432
16432
|
}
|
|
16433
16433
|
});
|
|
@@ -16437,13 +16437,13 @@ var require_share = __commonJS({
|
|
|
16437
16437
|
};
|
|
16438
16438
|
}
|
|
16439
16439
|
exports.share = share;
|
|
16440
|
-
function handleReset(
|
|
16440
|
+
function handleReset(reset2, on) {
|
|
16441
16441
|
var args = [];
|
|
16442
16442
|
for (var _i = 2; _i < arguments.length; _i++) {
|
|
16443
16443
|
args[_i - 2] = arguments[_i];
|
|
16444
16444
|
}
|
|
16445
16445
|
if (on === true) {
|
|
16446
|
-
|
|
16446
|
+
reset2();
|
|
16447
16447
|
return;
|
|
16448
16448
|
}
|
|
16449
16449
|
if (on === false) {
|
|
@@ -16452,7 +16452,7 @@ var require_share = __commonJS({
|
|
|
16452
16452
|
var onSubscriber = new Subscriber_1.SafeSubscriber({
|
|
16453
16453
|
next: function() {
|
|
16454
16454
|
onSubscriber.unsubscribe();
|
|
16455
|
-
|
|
16455
|
+
reset2();
|
|
16456
16456
|
}
|
|
16457
16457
|
});
|
|
16458
16458
|
return innerFrom_1.innerFrom(on.apply(void 0, __spreadArray2([], __read2(args)))).subscribe(onSubscriber);
|
|
@@ -32205,7 +32205,7 @@ var require_array2 = __commonJS({
|
|
|
32205
32205
|
parent.enabled = choices.every((ch) => ch.enabled === true);
|
|
32206
32206
|
parent = parent.parent;
|
|
32207
32207
|
}
|
|
32208
|
-
|
|
32208
|
+
reset2(this, this.choices);
|
|
32209
32209
|
this.emit("toggle", choice, this);
|
|
32210
32210
|
return choice;
|
|
32211
32211
|
}
|
|
@@ -32503,7 +32503,7 @@ var require_array2 = __commonJS({
|
|
|
32503
32503
|
}
|
|
32504
32504
|
}
|
|
32505
32505
|
get choices() {
|
|
32506
|
-
return
|
|
32506
|
+
return reset2(this, this.state.choices || []);
|
|
32507
32507
|
}
|
|
32508
32508
|
set visible(visible) {
|
|
32509
32509
|
this.state.visible = visible;
|
|
@@ -32551,7 +32551,7 @@ var require_array2 = __commonJS({
|
|
|
32551
32551
|
return this.multiple ? this.enabled : this.focused;
|
|
32552
32552
|
}
|
|
32553
32553
|
};
|
|
32554
|
-
function
|
|
32554
|
+
function reset2(prompt, choices) {
|
|
32555
32555
|
if (choices instanceof Promise)
|
|
32556
32556
|
return choices;
|
|
32557
32557
|
if (typeof choices === "function") {
|
|
@@ -46812,7 +46812,7 @@ var require_chunk_UIX4URMV = __commonJS({
|
|
|
46812
46812
|
magentaBright: () => magentaBright,
|
|
46813
46813
|
red: () => red,
|
|
46814
46814
|
redBright: () => redBright,
|
|
46815
|
-
reset: () =>
|
|
46815
|
+
reset: () => reset2,
|
|
46816
46816
|
strikethrough: () => strikethrough,
|
|
46817
46817
|
underline: () => underline,
|
|
46818
46818
|
white: () => white,
|
|
@@ -46889,7 +46889,7 @@ var require_chunk_UIX4URMV = __commonJS({
|
|
|
46889
46889
|
{}
|
|
46890
46890
|
);
|
|
46891
46891
|
var {
|
|
46892
|
-
reset,
|
|
46892
|
+
reset: reset2,
|
|
46893
46893
|
bold: bold2,
|
|
46894
46894
|
dim: dim2,
|
|
46895
46895
|
italic,
|
|
@@ -78733,7 +78733,7 @@ var require_rollup = __commonJS({
|
|
|
78733
78733
|
{}
|
|
78734
78734
|
);
|
|
78735
78735
|
var {
|
|
78736
|
-
reset,
|
|
78736
|
+
reset: reset2,
|
|
78737
78737
|
bold: bold$1,
|
|
78738
78738
|
dim: dim$1,
|
|
78739
78739
|
italic,
|
|
@@ -93603,19 +93603,19 @@ ${outro}`;
|
|
|
93603
93603
|
function keep(key, value) {
|
|
93604
93604
|
if (++num > limit) {
|
|
93605
93605
|
prev = curr;
|
|
93606
|
-
|
|
93606
|
+
reset3(1);
|
|
93607
93607
|
++num;
|
|
93608
93608
|
}
|
|
93609
93609
|
curr[key] = value;
|
|
93610
93610
|
}
|
|
93611
|
-
function
|
|
93611
|
+
function reset3(isPartial) {
|
|
93612
93612
|
num = 0;
|
|
93613
93613
|
curr = /* @__PURE__ */ Object.create(null);
|
|
93614
93614
|
isPartial || (prev = /* @__PURE__ */ Object.create(null));
|
|
93615
93615
|
}
|
|
93616
|
-
|
|
93616
|
+
reset3();
|
|
93617
93617
|
return {
|
|
93618
|
-
clear:
|
|
93618
|
+
clear: reset3,
|
|
93619
93619
|
has: function(key) {
|
|
93620
93620
|
return curr[key] !== void 0 || prev[key] !== void 0;
|
|
93621
93621
|
},
|
|
@@ -126354,6 +126354,7 @@ var LogLevel = {
|
|
|
126354
126354
|
ERROR: 20,
|
|
126355
126355
|
WARN: 30,
|
|
126356
126356
|
INFO: 40,
|
|
126357
|
+
SUCCESS: 45,
|
|
126357
126358
|
DEBUG: 60,
|
|
126358
126359
|
TRACE: 70,
|
|
126359
126360
|
ALL: 100
|
|
@@ -130151,6 +130152,8 @@ var getDefaultConfig = (config = {}, root) => {
|
|
|
130151
130152
|
// packages/config-tools/src/utilities/get-log-level.ts
|
|
130152
130153
|
var getLogLevel = (label) => {
|
|
130153
130154
|
switch (label) {
|
|
130155
|
+
case "all":
|
|
130156
|
+
return LogLevel.ALL;
|
|
130154
130157
|
case "trace":
|
|
130155
130158
|
return LogLevel.TRACE;
|
|
130156
130159
|
case "debug":
|
|
@@ -130170,6 +130173,9 @@ var getLogLevel = (label) => {
|
|
|
130170
130173
|
}
|
|
130171
130174
|
};
|
|
130172
130175
|
var getLogLevelLabel = (logLevel) => {
|
|
130176
|
+
if (logLevel >= LogLevel.ALL) {
|
|
130177
|
+
return LogLevelLabel.ALL;
|
|
130178
|
+
}
|
|
130173
130179
|
if (logLevel >= LogLevel.TRACE) {
|
|
130174
130180
|
return LogLevelLabel.TRACE;
|
|
130175
130181
|
}
|
|
@@ -130194,71 +130200,100 @@ var getLogLevelLabel = (logLevel) => {
|
|
|
130194
130200
|
return LogLevelLabel.INFO;
|
|
130195
130201
|
};
|
|
130196
130202
|
|
|
130197
|
-
// packages/config-tools/src/
|
|
130198
|
-
var
|
|
130199
|
-
|
|
130200
|
-
|
|
130201
|
-
|
|
130202
|
-
if (name) {
|
|
130203
|
-
ret[name] = process.env[key];
|
|
130204
|
-
}
|
|
130205
|
-
return ret;
|
|
130206
|
-
}, {});
|
|
130207
|
-
};
|
|
130208
|
-
var getConfigEnv = () => {
|
|
130209
|
-
const prefix = "STORM_";
|
|
130210
|
-
let config = {
|
|
130211
|
-
name: process.env[`${prefix}NAME`],
|
|
130212
|
-
namespace: process.env[`${prefix}NAMESPACE`],
|
|
130213
|
-
owner: process.env[`${prefix}OWNER`],
|
|
130214
|
-
worker: process.env[`${prefix}WORKER`],
|
|
130215
|
-
organization: process.env[`${prefix}ORGANIZATION`],
|
|
130216
|
-
packageManager: process.env[`${prefix}PACKAGE_MANAGER`],
|
|
130217
|
-
license: process.env[`${prefix}LICENSE`],
|
|
130218
|
-
homepage: process.env[`${prefix}HOMEPAGE`],
|
|
130219
|
-
timezone: process.env[`${prefix}TIMEZONE`] ?? process.env.TZ,
|
|
130220
|
-
locale: process.env[`${prefix}LOCALE`] ?? process.env.LOCALE,
|
|
130221
|
-
configFile: process.env[`${prefix}CONFIG_FILE`],
|
|
130222
|
-
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`],
|
|
130223
|
-
packageDirectory: process.env[`${prefix}PACKAGE_DIRECTORY`],
|
|
130224
|
-
buildDirectory: process.env[`${prefix}BUILD_DIRECTORY`],
|
|
130225
|
-
runtimeVersion: process.env[`${prefix}RUNTIME_VERSION`],
|
|
130226
|
-
runtimeDirectory: process.env[`${prefix}RUNTIME_DIRECTORY`],
|
|
130227
|
-
env: process.env[`${prefix}ENV`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT,
|
|
130228
|
-
ci: Boolean(process.env[`${prefix}CI`] ?? process.env.CI ?? process.env.CONTINUOUS_INTEGRATION),
|
|
130229
|
-
colors: {
|
|
130230
|
-
primary: process.env[`${prefix}COLOR_PRIMARY`],
|
|
130231
|
-
background: process.env[`${prefix}COLOR_BACKGROUND`],
|
|
130232
|
-
success: process.env[`${prefix}COLOR_SUCCESS`],
|
|
130233
|
-
info: process.env[`${prefix}COLOR_INFO`],
|
|
130234
|
-
warning: process.env[`${prefix}COLOR_WARNING`],
|
|
130235
|
-
error: process.env[`${prefix}COLOR_ERROR`],
|
|
130236
|
-
fatal: process.env[`${prefix}COLOR_FATAL`]
|
|
130237
|
-
},
|
|
130238
|
-
repository: process.env[`${prefix}REPOSITORY`],
|
|
130239
|
-
branch: process.env[`${prefix}BRANCH`],
|
|
130240
|
-
preMajor: Boolean(process.env[`${prefix}PRE_MAJOR`]),
|
|
130241
|
-
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : LogLevelLabel.INFO,
|
|
130242
|
-
extensions: {}
|
|
130243
|
-
};
|
|
130244
|
-
const serializedConfig = process.env[`${prefix}CONFIG`];
|
|
130245
|
-
if (serializedConfig) {
|
|
130246
|
-
const parsed = JSON.parse(serializedConfig);
|
|
130247
|
-
config = {
|
|
130248
|
-
...config,
|
|
130249
|
-
...parsed,
|
|
130250
|
-
colors: { ...config.colors, ...parsed.colors },
|
|
130251
|
-
extensions: { ...config.extensions, ...parsed.extensions }
|
|
130203
|
+
// packages/config-tools/src/utilities/logger.ts
|
|
130204
|
+
var chalk = __toESM(require_source(), 1);
|
|
130205
|
+
var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
|
|
130206
|
+
if (typeof logLevel === "number" && (logLevel >= getLogLevel(config.logLevel ?? process.env?.STORM_LOG_LEVEL) || logLevel <= LogLevel.SILENT) || typeof logLevel === "string" && getLogLevel(logLevel) >= getLogLevel(config.logLevel ?? process.env?.STORM_LOG_LEVEL)) {
|
|
130207
|
+
return (_) => {
|
|
130252
130208
|
};
|
|
130253
130209
|
}
|
|
130254
|
-
|
|
130255
|
-
|
|
130256
|
-
|
|
130257
|
-
|
|
130258
|
-
|
|
130259
|
-
|
|
130260
|
-
|
|
130261
|
-
|
|
130210
|
+
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
|
|
130211
|
+
return (message) => {
|
|
130212
|
+
console.error(
|
|
130213
|
+
` ${chalk.bold.bgHex(config?.colors?.fatal ? config.colors.fatal : "#1fb2a6").inverse("\n\n \u{1F480} Fatal ")} ${chalk.reset.hex(
|
|
130214
|
+
config?.colors?.fatal ? config.colors.fatal : "#1fb2a6"
|
|
130215
|
+
)(message)}
|
|
130216
|
+
`
|
|
130217
|
+
);
|
|
130218
|
+
};
|
|
130219
|
+
}
|
|
130220
|
+
if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel || typeof logLevel === "string" && LogLevel.ERROR >= getLogLevel(logLevel)) {
|
|
130221
|
+
return (message) => {
|
|
130222
|
+
console.error(
|
|
130223
|
+
` ${chalk.bold.bgHex(config?.colors?.error ? config.colors.error : "#7d1a1a").inverse("\n\n \u{1F6D1} Error ")} ${chalk.reset.hex(
|
|
130224
|
+
config?.colors?.error ? config.colors.error : "#7d1a1a"
|
|
130225
|
+
)(message)}
|
|
130226
|
+
`
|
|
130227
|
+
);
|
|
130228
|
+
};
|
|
130229
|
+
}
|
|
130230
|
+
if (typeof logLevel === "number" && LogLevel.WARN >= logLevel || typeof logLevel === "string" && LogLevel.WARN >= getLogLevel(logLevel)) {
|
|
130231
|
+
return (message) => {
|
|
130232
|
+
console.warn(
|
|
130233
|
+
` ${chalk.bold.bgHex(config?.colors?.warning ? config.colors.warning : "#fcc419").inverse("\n\n \u26A0\uFE0F Warn ")} ${chalk.reset.hex(
|
|
130234
|
+
config?.colors?.warning ? config.colors.warning : "#fcc419"
|
|
130235
|
+
)(message)}
|
|
130236
|
+
`
|
|
130237
|
+
);
|
|
130238
|
+
};
|
|
130239
|
+
}
|
|
130240
|
+
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
|
|
130241
|
+
return (message) => {
|
|
130242
|
+
console.info(
|
|
130243
|
+
` ${chalk.bold.bgHex(config?.colors?.info ? config.colors.info : "#0ea5e9").inverse("\n\n \u{1F4EC} Info ")} ${chalk.reset.hex(
|
|
130244
|
+
config?.colors?.info ? config.colors.info : "#0ea5e9"
|
|
130245
|
+
)(message)}
|
|
130246
|
+
`
|
|
130247
|
+
);
|
|
130248
|
+
};
|
|
130249
|
+
}
|
|
130250
|
+
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
|
|
130251
|
+
return (message) => {
|
|
130252
|
+
console.info(
|
|
130253
|
+
` ${chalk.bold.bgHex(config?.colors?.success ? config.colors.success : "#087f5b").inverse("\n\n \u{1F389} Success ")} ${chalk.reset.hex(
|
|
130254
|
+
config?.colors?.success ? config.colors.success : "#087f5b"
|
|
130255
|
+
)(message)}
|
|
130256
|
+
`
|
|
130257
|
+
);
|
|
130258
|
+
};
|
|
130259
|
+
}
|
|
130260
|
+
if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel || typeof logLevel === "string" && LogLevel.DEBUG >= getLogLevel(logLevel)) {
|
|
130261
|
+
return (message) => {
|
|
130262
|
+
console.debug(
|
|
130263
|
+
` ${chalk.bold.bgHex(config?.colors?.primary ? config.colors.primary : "#1fb2a6").inverse("\n\n \u{1F9EA} Debug ")} ${chalk.reset.hex(
|
|
130264
|
+
config?.colors?.primary ? config.colors.primary : "#1fb2a6"
|
|
130265
|
+
)(message)}
|
|
130266
|
+
`
|
|
130267
|
+
);
|
|
130268
|
+
};
|
|
130269
|
+
}
|
|
130270
|
+
return (message) => {
|
|
130271
|
+
console.log(
|
|
130272
|
+
` ${chalk.bold.bgHex(config?.colors?.primary ? config.colors.primary : "#1fb2a6").inverse("\n\n \u{1F4E2} System ")} ${chalk.bold.hex(
|
|
130273
|
+
config?.colors?.primary ? config.colors.primary : "#1fb2a6"
|
|
130274
|
+
)(message)}
|
|
130275
|
+
`
|
|
130276
|
+
);
|
|
130277
|
+
};
|
|
130278
|
+
};
|
|
130279
|
+
var writeFatal = (config, message) => getLogFn(config, LogLevel.FATAL)(message);
|
|
130280
|
+
var writeError = (config, message) => getLogFn(config, LogLevel.ERROR)(message);
|
|
130281
|
+
var writeInfo = (config, message) => getLogFn(config, LogLevel.INFO)(message);
|
|
130282
|
+
var writeSuccess = (config, message) => getLogFn(config, LogLevel.SUCCESS)(message);
|
|
130283
|
+
var writeDebug = (config, message) => getLogFn(config, LogLevel.DEBUG)(message);
|
|
130284
|
+
var writeTrace = (config, message) => getLogFn(config, LogLevel.TRACE)(message);
|
|
130285
|
+
var getStopwatch = (name) => {
|
|
130286
|
+
const start = process.hrtime();
|
|
130287
|
+
return () => {
|
|
130288
|
+
const end = process.hrtime(start);
|
|
130289
|
+
console.info(
|
|
130290
|
+
chalk.dim(
|
|
130291
|
+
`\u23F1\uFE0F The${name ? ` ${name}` : ""} process took ${Math.round(
|
|
130292
|
+
end[0] * 1e3 + end[1] / 1e6
|
|
130293
|
+
)}ms to complete`
|
|
130294
|
+
)
|
|
130295
|
+
);
|
|
130296
|
+
};
|
|
130262
130297
|
};
|
|
130263
130298
|
|
|
130264
130299
|
// packages/config-tools/src/env/set-env.ts
|
|
@@ -130395,6 +130430,83 @@ var setConfigEnv = (config) => {
|
|
|
130395
130430
|
}
|
|
130396
130431
|
};
|
|
130397
130432
|
|
|
130433
|
+
// packages/config-tools/src/utilities/prepare-workspace.ts
|
|
130434
|
+
var prepareWorkspace = async () => {
|
|
130435
|
+
const _STORM_CONFIG = getDefaultConfig({
|
|
130436
|
+
...await getConfigFile(),
|
|
130437
|
+
...getConfigEnv()
|
|
130438
|
+
});
|
|
130439
|
+
setConfigEnv(_STORM_CONFIG);
|
|
130440
|
+
return _STORM_CONFIG;
|
|
130441
|
+
};
|
|
130442
|
+
|
|
130443
|
+
// packages/config-tools/src/env/get-env.ts
|
|
130444
|
+
var getExtensionEnv = (extensionName) => {
|
|
130445
|
+
const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
|
|
130446
|
+
return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
|
|
130447
|
+
const name = key.replace(prefix, "").split("_").map((i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : "").join("");
|
|
130448
|
+
if (name) {
|
|
130449
|
+
ret[name] = process.env[key];
|
|
130450
|
+
}
|
|
130451
|
+
return ret;
|
|
130452
|
+
}, {});
|
|
130453
|
+
};
|
|
130454
|
+
var getConfigEnv = () => {
|
|
130455
|
+
const prefix = "STORM_";
|
|
130456
|
+
let config = {
|
|
130457
|
+
name: process.env[`${prefix}NAME`],
|
|
130458
|
+
namespace: process.env[`${prefix}NAMESPACE`],
|
|
130459
|
+
owner: process.env[`${prefix}OWNER`],
|
|
130460
|
+
worker: process.env[`${prefix}WORKER`],
|
|
130461
|
+
organization: process.env[`${prefix}ORGANIZATION`],
|
|
130462
|
+
packageManager: process.env[`${prefix}PACKAGE_MANAGER`],
|
|
130463
|
+
license: process.env[`${prefix}LICENSE`],
|
|
130464
|
+
homepage: process.env[`${prefix}HOMEPAGE`],
|
|
130465
|
+
timezone: process.env[`${prefix}TIMEZONE`] ?? process.env.TZ,
|
|
130466
|
+
locale: process.env[`${prefix}LOCALE`] ?? process.env.LOCALE,
|
|
130467
|
+
configFile: process.env[`${prefix}CONFIG_FILE`],
|
|
130468
|
+
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`],
|
|
130469
|
+
packageDirectory: process.env[`${prefix}PACKAGE_DIRECTORY`],
|
|
130470
|
+
buildDirectory: process.env[`${prefix}BUILD_DIRECTORY`],
|
|
130471
|
+
runtimeVersion: process.env[`${prefix}RUNTIME_VERSION`],
|
|
130472
|
+
runtimeDirectory: process.env[`${prefix}RUNTIME_DIRECTORY`],
|
|
130473
|
+
env: process.env[`${prefix}ENV`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT,
|
|
130474
|
+
ci: Boolean(process.env[`${prefix}CI`] ?? process.env.CI ?? process.env.CONTINUOUS_INTEGRATION),
|
|
130475
|
+
colors: {
|
|
130476
|
+
primary: process.env[`${prefix}COLOR_PRIMARY`],
|
|
130477
|
+
background: process.env[`${prefix}COLOR_BACKGROUND`],
|
|
130478
|
+
success: process.env[`${prefix}COLOR_SUCCESS`],
|
|
130479
|
+
info: process.env[`${prefix}COLOR_INFO`],
|
|
130480
|
+
warning: process.env[`${prefix}COLOR_WARNING`],
|
|
130481
|
+
error: process.env[`${prefix}COLOR_ERROR`],
|
|
130482
|
+
fatal: process.env[`${prefix}COLOR_FATAL`]
|
|
130483
|
+
},
|
|
130484
|
+
repository: process.env[`${prefix}REPOSITORY`],
|
|
130485
|
+
branch: process.env[`${prefix}BRANCH`],
|
|
130486
|
+
preMajor: Boolean(process.env[`${prefix}PRE_MAJOR`]),
|
|
130487
|
+
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : LogLevelLabel.INFO,
|
|
130488
|
+
extensions: {}
|
|
130489
|
+
};
|
|
130490
|
+
const serializedConfig = process.env[`${prefix}CONFIG`];
|
|
130491
|
+
if (serializedConfig) {
|
|
130492
|
+
const parsed = JSON.parse(serializedConfig);
|
|
130493
|
+
config = {
|
|
130494
|
+
...config,
|
|
130495
|
+
...parsed,
|
|
130496
|
+
colors: { ...config.colors, ...parsed.colors },
|
|
130497
|
+
extensions: { ...config.extensions, ...parsed.extensions }
|
|
130498
|
+
};
|
|
130499
|
+
}
|
|
130500
|
+
const extensionPrefix = `${prefix}EXTENSION_`;
|
|
130501
|
+
return Object.keys(process.env).filter((key) => key.startsWith(extensionPrefix)).reduce((ret, key) => {
|
|
130502
|
+
const extensionName = key.substring(prefix.length, key.indexOf("_", prefix.length)).split("_").map((i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : "").join("");
|
|
130503
|
+
if (extensionName) {
|
|
130504
|
+
ret.extensions[extensionName] = getExtensionEnv(extensionName);
|
|
130505
|
+
}
|
|
130506
|
+
return ret;
|
|
130507
|
+
}, config);
|
|
130508
|
+
};
|
|
130509
|
+
|
|
130398
130510
|
// node_modules/.pnpm/esbuild-plugin-define@0.4.0_esbuild@0.19.5/node_modules/esbuild-plugin-define/dist/mjs/utils.js
|
|
130399
130511
|
var makeKey = (...inputs) => inputs.filter((input) => !!input).join(".");
|
|
130400
130512
|
function convertToDefineObject(data) {
|
|
@@ -136620,9 +136732,6 @@ var import_prettier = require("prettier");
|
|
|
136620
136732
|
var import_tsup = __toESM(require_dist6());
|
|
136621
136733
|
var ts = __toESM(require("typescript"));
|
|
136622
136734
|
|
|
136623
|
-
// packages/workspace-tools/src/base/base-executor.ts
|
|
136624
|
-
var chalk = __toESM(require_source());
|
|
136625
|
-
|
|
136626
136735
|
// packages/workspace-tools/src/utils/get-workspace-root.ts
|
|
136627
136736
|
var import_find_workspace_root2 = require("nx/src/utils/find-workspace-root.js");
|
|
136628
136737
|
var getWorkspaceRoot = () => {
|
|
@@ -136710,12 +136819,12 @@ var applyWorkspaceTokens = (options, config, tokenizerFn) => {
|
|
|
136710
136819
|
|
|
136711
136820
|
// packages/workspace-tools/src/base/base-executor.ts
|
|
136712
136821
|
var withRunExecutor = (name, executorFn, executorOptions) => async (_options, context) => {
|
|
136713
|
-
const
|
|
136822
|
+
const stopwatch = getStopwatch(name);
|
|
136714
136823
|
let options = _options;
|
|
136824
|
+
let config;
|
|
136715
136825
|
try {
|
|
136716
|
-
|
|
136717
|
-
|
|
136718
|
-
`));
|
|
136826
|
+
writeInfo(config, `\u26A1 Running the ${name} executor...
|
|
136827
|
+
`);
|
|
136719
136828
|
if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
136720
136829
|
throw new Error(
|
|
136721
136830
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
@@ -136725,35 +136834,33 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
|
|
|
136725
136834
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
136726
136835
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot;
|
|
136727
136836
|
const projectName = context.projectsConfigurations.projects[context.projectName].name;
|
|
136728
|
-
let config;
|
|
136729
136837
|
if (!executorOptions.skipReadingConfig) {
|
|
136730
|
-
|
|
136731
|
-
|
|
136732
|
-
|
|
136733
|
-
-
|
|
136734
|
-
-
|
|
136735
|
-
-
|
|
136736
|
-
|
|
136737
|
-
);
|
|
136738
|
-
config = getDefaultConfig({
|
|
136739
|
-
...await getConfigFile(),
|
|
136740
|
-
...getConfigEnv()
|
|
136741
|
-
});
|
|
136742
|
-
setConfigEnv(config);
|
|
136743
|
-
getLogLevel(config.logLevel) >= LogLevel.DEBUG && console.info(
|
|
136744
|
-
chalk.dim(
|
|
136745
|
-
`Loaded Storm config into env:
|
|
136746
|
-
${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\n")}
|
|
136838
|
+
writeDebug(
|
|
136839
|
+
config,
|
|
136840
|
+
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
136841
|
+
- workspaceRoot: ${workspaceRoot}
|
|
136842
|
+
- projectRoot: ${projectRoot}
|
|
136843
|
+
- sourceRoot: ${sourceRoot}
|
|
136844
|
+
- projectName: ${projectName}
|
|
136747
136845
|
`
|
|
136748
|
-
|
|
136846
|
+
);
|
|
136847
|
+
config = await prepareWorkspace();
|
|
136848
|
+
writeTrace(
|
|
136849
|
+
config,
|
|
136850
|
+
`Loaded Storm config into env:
|
|
136851
|
+
${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[key])}`).join("\n")}`
|
|
136749
136852
|
);
|
|
136750
136853
|
}
|
|
136751
136854
|
if (executorOptions?.hooks?.applyDefaultOptions) {
|
|
136752
|
-
|
|
136855
|
+
writeDebug(config, "Running the applyDefaultOptions hook...");
|
|
136753
136856
|
options = await Promise.resolve(executorOptions.hooks.applyDefaultOptions(options, config));
|
|
136754
|
-
|
|
136857
|
+
writeDebug(config, "Completed the applyDefaultOptions hook");
|
|
136755
136858
|
}
|
|
136756
|
-
|
|
136859
|
+
writeTrace(
|
|
136860
|
+
config,
|
|
136861
|
+
`Executor schema options \u2699\uFE0F
|
|
136862
|
+
${Object.keys(options).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`
|
|
136863
|
+
);
|
|
136757
136864
|
const tokenized = applyWorkspaceTokens(
|
|
136758
136865
|
options,
|
|
136759
136866
|
{
|
|
@@ -136768,9 +136875,9 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
|
|
|
136768
136875
|
applyWorkspaceExecutorTokens
|
|
136769
136876
|
);
|
|
136770
136877
|
if (executorOptions?.hooks?.preProcess) {
|
|
136771
|
-
|
|
136878
|
+
writeDebug(config, "Running the preProcess hook...");
|
|
136772
136879
|
await Promise.resolve(executorOptions.hooks.preProcess(tokenized, config));
|
|
136773
|
-
|
|
136880
|
+
writeDebug(config, "Completed the preProcess hook");
|
|
136774
136881
|
}
|
|
136775
136882
|
const result = await Promise.resolve(executorFn(tokenized, context, config));
|
|
136776
136883
|
if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
|
|
@@ -136779,34 +136886,31 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
|
|
|
136779
136886
|
});
|
|
136780
136887
|
}
|
|
136781
136888
|
if (executorOptions?.hooks?.postProcess) {
|
|
136782
|
-
|
|
136889
|
+
writeDebug(config, "Running the postProcess hook...");
|
|
136783
136890
|
await Promise.resolve(executorOptions.hooks.postProcess(config));
|
|
136784
|
-
|
|
136891
|
+
writeDebug(config, "Completed the postProcess hook");
|
|
136785
136892
|
}
|
|
136786
|
-
|
|
136787
|
-
|
|
136788
|
-
|
|
136789
|
-
\u{1F389} Successfully completed running the ${name} executor!
|
|
136790
|
-
|
|
136791
|
-
`)
|
|
136792
|
-
);
|
|
136893
|
+
writeSuccess(config, `Completed running the ${name} task executor!
|
|
136894
|
+
`);
|
|
136793
136895
|
return {
|
|
136794
136896
|
success: true
|
|
136795
136897
|
};
|
|
136796
136898
|
} catch (error) {
|
|
136797
|
-
|
|
136798
|
-
|
|
136799
|
-
error
|
|
136899
|
+
writeFatal(
|
|
136900
|
+
config,
|
|
136901
|
+
"A fatal error occurred while running the executor - the process was forced to terminate"
|
|
136902
|
+
);
|
|
136903
|
+
writeError(
|
|
136904
|
+
config,
|
|
136905
|
+
`An exception was thrown in the executor's process
|
|
136906
|
+
- Details: ${error.message}
|
|
136907
|
+
- Stacktrace: ${error.stack}`
|
|
136800
136908
|
);
|
|
136801
136909
|
return {
|
|
136802
136910
|
success: false
|
|
136803
136911
|
};
|
|
136804
136912
|
} finally {
|
|
136805
|
-
|
|
136806
|
-
chalk.dim(
|
|
136807
|
-
`\u23F1\uFE0F The${name ? ` ${name}` : ""} generator took ${Date.now() - startTime}ms to complete`
|
|
136808
|
-
)
|
|
136809
|
-
);
|
|
136913
|
+
stopwatch();
|
|
136810
136914
|
}
|
|
136811
136915
|
};
|
|
136812
136916
|
|
|
@@ -136883,9 +136987,10 @@ function defaultConfig({
|
|
|
136883
136987
|
outExtension
|
|
136884
136988
|
};
|
|
136885
136989
|
}
|
|
136886
|
-
function getConfig(workspaceRoot, projectRoot, getConfigFn, { outputPath, tsConfig,
|
|
136990
|
+
function getConfig(workspaceRoot, projectRoot, getConfigFn, { outputPath, tsConfig, platform, ...rest }) {
|
|
136887
136991
|
return getConfigFn({
|
|
136888
136992
|
...rest,
|
|
136993
|
+
additionalEntryPoints: [],
|
|
136889
136994
|
outDir: outputPath,
|
|
136890
136995
|
tsconfig: tsConfig,
|
|
136891
136996
|
workspaceRoot,
|