@storm-software/workspace-tools 1.62.6 → 1.62.8
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 +24 -0
- package/README.md +1 -1
- package/index.js +111 -84
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/base/index.js +54 -37
- package/src/executors/tsup/executor.js +75 -57
- package/src/executors/tsup-browser/executor.js +75 -57
- package/src/executors/tsup-neutral/executor.js +75 -57
- package/src/executors/tsup-node/executor.js +75 -57
- package/src/executors/typia/executor.js +29 -21
- package/src/generators/browser-library/generator.js +27 -20
- package/src/generators/config-schema/generator.js +31 -24
- package/src/generators/neutral-library/generator.js +27 -20
- package/src/generators/node-library/generator.js +27 -20
- package/src/generators/preset/generator.js +27 -20
- package/src/generators/release-version/generator.js +32 -25
- package/src/utils/index.js +24 -23
package/package.json
CHANGED
package/src/base/index.js
CHANGED
|
@@ -391229,9 +391229,6 @@ __export(base_exports, {
|
|
|
391229
391229
|
});
|
|
391230
391230
|
module.exports = __toCommonJS(base_exports);
|
|
391231
391231
|
|
|
391232
|
-
// packages/workspace-tools/src/base/base-executor.ts
|
|
391233
|
-
var import_config_tools2 = require("@storm-software/config-tools");
|
|
391234
|
-
|
|
391235
391232
|
// packages/workspace-tools/src/utils/apply-workspace-tokens.ts
|
|
391236
391233
|
var import_config_tools = require("@storm-software/config-tools");
|
|
391237
391234
|
var applyWorkspaceExecutorTokens = (option, tokenizerOptions) => {
|
|
@@ -391328,23 +391325,34 @@ var applyWorkspaceTokens = (options8, config, tokenizerFn) => {
|
|
|
391328
391325
|
|
|
391329
391326
|
// packages/workspace-tools/src/base/base-executor.ts
|
|
391330
391327
|
var withRunExecutor = (name, executorFn, executorOptions) => async (_options, context) => {
|
|
391331
|
-
const
|
|
391328
|
+
const {
|
|
391329
|
+
getStopwatch,
|
|
391330
|
+
writeDebug,
|
|
391331
|
+
writeError,
|
|
391332
|
+
writeFatal,
|
|
391333
|
+
writeInfo,
|
|
391334
|
+
writeSuccess,
|
|
391335
|
+
writeTrace,
|
|
391336
|
+
findWorkspaceRoot: findWorkspaceRoot2,
|
|
391337
|
+
loadStormConfig
|
|
391338
|
+
} = await import("@storm-software/config-tools");
|
|
391339
|
+
const stopwatch = getStopwatch(name);
|
|
391332
391340
|
let options8 = _options;
|
|
391333
391341
|
let config;
|
|
391334
391342
|
try {
|
|
391335
|
-
|
|
391343
|
+
writeInfo(config, `\u26A1 Running the ${name} executor...
|
|
391336
391344
|
`);
|
|
391337
391345
|
if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
391338
391346
|
throw new Error(
|
|
391339
391347
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
391340
391348
|
);
|
|
391341
391349
|
}
|
|
391342
|
-
const workspaceRoot = (
|
|
391350
|
+
const workspaceRoot = findWorkspaceRoot2();
|
|
391343
391351
|
const projectRoot = context.projectsConfigurations.projects[context.projectName]?.root ?? workspaceRoot;
|
|
391344
391352
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? workspaceRoot;
|
|
391345
391353
|
const projectName = context.projectsConfigurations.projects[context.projectName]?.name ?? context.projectName;
|
|
391346
391354
|
if (!executorOptions.skipReadingConfig) {
|
|
391347
|
-
|
|
391355
|
+
writeDebug(
|
|
391348
391356
|
config,
|
|
391349
391357
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
391350
391358
|
- workspaceRoot: ${workspaceRoot}
|
|
@@ -391353,8 +391361,8 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
|
|
|
391353
391361
|
- projectName: ${projectName}
|
|
391354
391362
|
`
|
|
391355
391363
|
);
|
|
391356
|
-
config = await
|
|
391357
|
-
|
|
391364
|
+
config = await loadStormConfig(workspaceRoot);
|
|
391365
|
+
writeTrace(
|
|
391358
391366
|
config,
|
|
391359
391367
|
`Loaded Storm config into env:
|
|
391360
391368
|
${Object.keys(process.env).filter((key2) => key2.startsWith("STORM_")).map(
|
|
@@ -391363,11 +391371,11 @@ ${Object.keys(process.env).filter((key2) => key2.startsWith("STORM_")).map(
|
|
|
391363
391371
|
);
|
|
391364
391372
|
}
|
|
391365
391373
|
if (executorOptions?.hooks?.applyDefaultOptions) {
|
|
391366
|
-
|
|
391374
|
+
writeDebug(config, "Running the applyDefaultOptions hook...");
|
|
391367
391375
|
options8 = await Promise.resolve(executorOptions.hooks.applyDefaultOptions(options8, config));
|
|
391368
|
-
|
|
391376
|
+
writeDebug(config, "Completed the applyDefaultOptions hook");
|
|
391369
391377
|
}
|
|
391370
|
-
|
|
391378
|
+
writeTrace(
|
|
391371
391379
|
config,
|
|
391372
391380
|
`Executor schema options \u2699\uFE0F
|
|
391373
391381
|
${Object.keys(options8).map(
|
|
@@ -391388,9 +391396,9 @@ ${Object.keys(options8).map(
|
|
|
391388
391396
|
applyWorkspaceExecutorTokens
|
|
391389
391397
|
);
|
|
391390
391398
|
if (executorOptions?.hooks?.preProcess) {
|
|
391391
|
-
|
|
391399
|
+
writeDebug(config, "Running the preProcess hook...");
|
|
391392
391400
|
await Promise.resolve(executorOptions.hooks.preProcess(tokenized, config));
|
|
391393
|
-
|
|
391401
|
+
writeDebug(config, "Completed the preProcess hook");
|
|
391394
391402
|
}
|
|
391395
391403
|
const result = await Promise.resolve(executorFn(tokenized, context, config));
|
|
391396
391404
|
if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
|
|
@@ -391399,21 +391407,21 @@ ${Object.keys(options8).map(
|
|
|
391399
391407
|
});
|
|
391400
391408
|
}
|
|
391401
391409
|
if (executorOptions?.hooks?.postProcess) {
|
|
391402
|
-
|
|
391410
|
+
writeDebug(config, "Running the postProcess hook...");
|
|
391403
391411
|
await Promise.resolve(executorOptions.hooks.postProcess(config));
|
|
391404
|
-
|
|
391412
|
+
writeDebug(config, "Completed the postProcess hook");
|
|
391405
391413
|
}
|
|
391406
|
-
|
|
391414
|
+
writeSuccess(config, `Completed running the ${name} task executor!
|
|
391407
391415
|
`);
|
|
391408
391416
|
return {
|
|
391409
391417
|
success: true
|
|
391410
391418
|
};
|
|
391411
391419
|
} catch (error) {
|
|
391412
|
-
|
|
391420
|
+
writeFatal(
|
|
391413
391421
|
config,
|
|
391414
391422
|
"A fatal error occurred while running the executor - the process was forced to terminate"
|
|
391415
391423
|
);
|
|
391416
|
-
|
|
391424
|
+
writeError(
|
|
391417
391425
|
config,
|
|
391418
391426
|
`An exception was thrown in the executor's process
|
|
391419
391427
|
- Details: ${error.message}
|
|
@@ -391435,40 +391443,49 @@ var _isFunction = (value) => {
|
|
|
391435
391443
|
};
|
|
391436
391444
|
|
|
391437
391445
|
// packages/workspace-tools/src/base/base-generator.ts
|
|
391438
|
-
var import_config_tools3 = require("@storm-software/config-tools");
|
|
391439
|
-
var import_config_tools4 = require("@storm-software/config-tools");
|
|
391440
391446
|
var withRunGenerator = (name, generatorFn, generatorOptions = {
|
|
391441
391447
|
skipReadingConfig: false
|
|
391442
391448
|
}) => async (tree, _options) => {
|
|
391443
|
-
const
|
|
391449
|
+
const {
|
|
391450
|
+
getStopwatch,
|
|
391451
|
+
writeDebug,
|
|
391452
|
+
writeError,
|
|
391453
|
+
writeFatal,
|
|
391454
|
+
writeInfo,
|
|
391455
|
+
writeSuccess,
|
|
391456
|
+
writeTrace,
|
|
391457
|
+
findWorkspaceRootSafe,
|
|
391458
|
+
loadStormConfig
|
|
391459
|
+
} = await import("@storm-software/config-tools");
|
|
391460
|
+
const stopwatch = getStopwatch(name);
|
|
391444
391461
|
let options8 = _options;
|
|
391445
391462
|
let config;
|
|
391446
391463
|
try {
|
|
391447
|
-
|
|
391464
|
+
writeInfo(config, `\u26A1 Running the ${name} generator...
|
|
391448
391465
|
|
|
391449
391466
|
`);
|
|
391450
|
-
const workspaceRoot =
|
|
391467
|
+
const workspaceRoot = findWorkspaceRootSafe();
|
|
391451
391468
|
if (!generatorOptions.skipReadingConfig) {
|
|
391452
|
-
|
|
391469
|
+
writeDebug(
|
|
391453
391470
|
config,
|
|
391454
391471
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
391455
391472
|
- workspaceRoot: ${workspaceRoot}`
|
|
391456
391473
|
);
|
|
391457
|
-
config = await
|
|
391458
|
-
|
|
391474
|
+
config = await loadStormConfig(workspaceRoot);
|
|
391475
|
+
writeTrace(
|
|
391459
391476
|
config,
|
|
391460
391477
|
`Loaded Storm config into env:
|
|
391461
391478
|
${Object.keys(process.env).map((key2) => ` - ${key2}=${JSON.stringify(process.env[key2])}`).join("\n")}`
|
|
391462
391479
|
);
|
|
391463
391480
|
}
|
|
391464
391481
|
if (generatorOptions?.hooks?.applyDefaultOptions) {
|
|
391465
|
-
|
|
391482
|
+
writeDebug(config, "Running the applyDefaultOptions hook...");
|
|
391466
391483
|
options8 = await Promise.resolve(
|
|
391467
391484
|
generatorOptions.hooks.applyDefaultOptions(options8, config)
|
|
391468
391485
|
);
|
|
391469
|
-
|
|
391486
|
+
writeDebug(config, "Completed the applyDefaultOptions hook");
|
|
391470
391487
|
}
|
|
391471
|
-
|
|
391488
|
+
writeTrace(
|
|
391472
391489
|
config,
|
|
391473
391490
|
`Generator schema options \u2699\uFE0F
|
|
391474
391491
|
${Object.keys(options8 ?? {}).map((key2) => ` - ${key2}=${JSON.stringify(options8[key2])}`).join("\n")}`
|
|
@@ -391479,9 +391496,9 @@ ${Object.keys(options8 ?? {}).map((key2) => ` - ${key2}=${JSON.stringify(options
|
|
|
391479
391496
|
applyWorkspaceGeneratorTokens
|
|
391480
391497
|
);
|
|
391481
391498
|
if (generatorOptions?.hooks?.preProcess) {
|
|
391482
|
-
|
|
391499
|
+
writeDebug(config, "Running the preProcess hook...");
|
|
391483
391500
|
await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
|
|
391484
|
-
|
|
391501
|
+
writeDebug(config, "Completed the preProcess hook");
|
|
391485
391502
|
}
|
|
391486
391503
|
const result = await Promise.resolve(generatorFn(tree, tokenized, config));
|
|
391487
391504
|
if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
|
|
@@ -391490,22 +391507,22 @@ ${Object.keys(options8 ?? {}).map((key2) => ` - ${key2}=${JSON.stringify(options
|
|
|
391490
391507
|
});
|
|
391491
391508
|
}
|
|
391492
391509
|
if (generatorOptions?.hooks?.postProcess) {
|
|
391493
|
-
|
|
391510
|
+
writeDebug(config, "Running the postProcess hook...");
|
|
391494
391511
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
391495
|
-
|
|
391512
|
+
writeDebug(config, "Completed the postProcess hook");
|
|
391496
391513
|
}
|
|
391497
|
-
|
|
391514
|
+
writeSuccess(config, `Completed running the ${name} task executor!
|
|
391498
391515
|
`);
|
|
391499
391516
|
return {
|
|
391500
391517
|
...result,
|
|
391501
391518
|
success: true
|
|
391502
391519
|
};
|
|
391503
391520
|
} catch (error) {
|
|
391504
|
-
|
|
391521
|
+
writeFatal(
|
|
391505
391522
|
config,
|
|
391506
391523
|
"A fatal error occurred while running the generator - the process was forced to terminate"
|
|
391507
391524
|
);
|
|
391508
|
-
|
|
391525
|
+
writeError(
|
|
391509
391526
|
config,
|
|
391510
391527
|
`An exception was thrown in the generator's process
|
|
391511
391528
|
- Details: ${error.message}
|
|
@@ -176229,20 +176229,20 @@ var require_typescript = __commonJS({
|
|
|
176229
176229
|
})();
|
|
176230
176230
|
}
|
|
176231
176231
|
});
|
|
176232
|
-
var
|
|
176232
|
+
var LogLevel, Debug;
|
|
176233
176233
|
var init_debug = __esm2({
|
|
176234
176234
|
"src/compiler/debug.ts"() {
|
|
176235
176235
|
"use strict";
|
|
176236
176236
|
init_ts2();
|
|
176237
176237
|
init_ts2();
|
|
176238
|
-
|
|
176239
|
-
|
|
176240
|
-
|
|
176241
|
-
|
|
176242
|
-
|
|
176243
|
-
|
|
176244
|
-
return
|
|
176245
|
-
})(
|
|
176238
|
+
LogLevel = /* @__PURE__ */ ((LogLevel3) => {
|
|
176239
|
+
LogLevel3[LogLevel3["Off"] = 0] = "Off";
|
|
176240
|
+
LogLevel3[LogLevel3["Error"] = 1] = "Error";
|
|
176241
|
+
LogLevel3[LogLevel3["Warning"] = 2] = "Warning";
|
|
176242
|
+
LogLevel3[LogLevel3["Info"] = 3] = "Info";
|
|
176243
|
+
LogLevel3[LogLevel3["Verbose"] = 4] = "Verbose";
|
|
176244
|
+
return LogLevel3;
|
|
176245
|
+
})(LogLevel || {});
|
|
176246
176246
|
((Debug2) => {
|
|
176247
176247
|
let currentAssertionLevel = 0;
|
|
176248
176248
|
Debug2.currentLogLevel = 2;
|
|
@@ -358811,12 +358811,12 @@ ${options8.prefix}` : "\n" : options8.prefix
|
|
|
358811
358811
|
"src/server/utilitiesPublic.ts"() {
|
|
358812
358812
|
"use strict";
|
|
358813
358813
|
init_ts7();
|
|
358814
|
-
LogLevel22 = /* @__PURE__ */ ((
|
|
358815
|
-
|
|
358816
|
-
|
|
358817
|
-
|
|
358818
|
-
|
|
358819
|
-
return
|
|
358814
|
+
LogLevel22 = /* @__PURE__ */ ((LogLevel3) => {
|
|
358815
|
+
LogLevel3[LogLevel3["terse"] = 0] = "terse";
|
|
358816
|
+
LogLevel3[LogLevel3["normal"] = 1] = "normal";
|
|
358817
|
+
LogLevel3[LogLevel3["requestTime"] = 2] = "requestTime";
|
|
358818
|
+
LogLevel3[LogLevel3["verbose"] = 3] = "verbose";
|
|
358819
|
+
return LogLevel3;
|
|
358820
358820
|
})(LogLevel22 || {});
|
|
358821
358821
|
emptyArray22 = createSortedArray22();
|
|
358822
358822
|
Msg2 = /* @__PURE__ */ ((Msg22) => {
|
|
@@ -370347,7 +370347,7 @@ ${e3.message}`;
|
|
|
370347
370347
|
LanguageVariant: () => LanguageVariant,
|
|
370348
370348
|
LexicalEnvironmentFlags: () => LexicalEnvironmentFlags,
|
|
370349
370349
|
ListFormat: () => ListFormat,
|
|
370350
|
-
LogLevel: () =>
|
|
370350
|
+
LogLevel: () => LogLevel,
|
|
370351
370351
|
MemberOverrideStatus: () => MemberOverrideStatus,
|
|
370352
370352
|
ModifierFlags: () => ModifierFlags,
|
|
370353
370353
|
ModuleDetectionKind: () => ModuleDetectionKind,
|
|
@@ -372751,7 +372751,7 @@ ${e3.message}`;
|
|
|
372751
372751
|
LanguageVariant: () => LanguageVariant,
|
|
372752
372752
|
LexicalEnvironmentFlags: () => LexicalEnvironmentFlags,
|
|
372753
372753
|
ListFormat: () => ListFormat,
|
|
372754
|
-
LogLevel: () =>
|
|
372754
|
+
LogLevel: () => LogLevel,
|
|
372755
372755
|
MemberOverrideStatus: () => MemberOverrideStatus,
|
|
372756
372756
|
ModifierFlags: () => ModifierFlags,
|
|
372757
372757
|
ModuleDetectionKind: () => ModuleDetectionKind,
|
|
@@ -448948,7 +448948,6 @@ module.exports = __toCommonJS(executor_exports);
|
|
|
448948
448948
|
var import_node_fs = require("node:fs");
|
|
448949
448949
|
var import_devkit3 = __toESM(require_devkit());
|
|
448950
448950
|
var import_js = __toESM(require_src5());
|
|
448951
|
-
var import_config_tools5 = require("@storm-software/config-tools");
|
|
448952
448951
|
var import_fs_extra = __toESM(require_lib4());
|
|
448953
448952
|
|
|
448954
448953
|
// node_modules/.pnpm/minimatch@9.0.3/node_modules/minimatch/dist/mjs/index.js
|
|
@@ -455128,9 +455127,6 @@ glob.glob = glob;
|
|
|
455128
455127
|
// packages/workspace-tools/src/executors/tsup/executor.ts
|
|
455129
455128
|
var import_fileutils = require("nx/src/utils/fileutils.js");
|
|
455130
455129
|
|
|
455131
|
-
// packages/workspace-tools/src/base/base-executor.ts
|
|
455132
|
-
var import_config_tools2 = require("@storm-software/config-tools");
|
|
455133
|
-
|
|
455134
455130
|
// packages/workspace-tools/src/utils/apply-workspace-tokens.ts
|
|
455135
455131
|
var import_config_tools = require("@storm-software/config-tools");
|
|
455136
455132
|
var applyWorkspaceExecutorTokens = (option, tokenizerOptions) => {
|
|
@@ -455204,23 +455200,34 @@ var applyWorkspaceTokens = (options8, config, tokenizerFn) => {
|
|
|
455204
455200
|
|
|
455205
455201
|
// packages/workspace-tools/src/base/base-executor.ts
|
|
455206
455202
|
var withRunExecutor = (name, executorFn, executorOptions) => async (_options, context) => {
|
|
455207
|
-
const
|
|
455203
|
+
const {
|
|
455204
|
+
getStopwatch,
|
|
455205
|
+
writeDebug,
|
|
455206
|
+
writeError,
|
|
455207
|
+
writeFatal,
|
|
455208
|
+
writeInfo,
|
|
455209
|
+
writeSuccess,
|
|
455210
|
+
writeTrace,
|
|
455211
|
+
findWorkspaceRoot: findWorkspaceRoot3,
|
|
455212
|
+
loadStormConfig
|
|
455213
|
+
} = await import("@storm-software/config-tools");
|
|
455214
|
+
const stopwatch = getStopwatch(name);
|
|
455208
455215
|
let options8 = _options;
|
|
455209
455216
|
let config;
|
|
455210
455217
|
try {
|
|
455211
|
-
|
|
455218
|
+
writeInfo(config, `\u26A1 Running the ${name} executor...
|
|
455212
455219
|
`);
|
|
455213
455220
|
if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
455214
455221
|
throw new Error(
|
|
455215
455222
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
455216
455223
|
);
|
|
455217
455224
|
}
|
|
455218
|
-
const workspaceRoot = (
|
|
455225
|
+
const workspaceRoot = findWorkspaceRoot3();
|
|
455219
455226
|
const projectRoot = context.projectsConfigurations.projects[context.projectName]?.root ?? workspaceRoot;
|
|
455220
455227
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? workspaceRoot;
|
|
455221
455228
|
const projectName = context.projectsConfigurations.projects[context.projectName]?.name ?? context.projectName;
|
|
455222
455229
|
if (!executorOptions.skipReadingConfig) {
|
|
455223
|
-
|
|
455230
|
+
writeDebug(
|
|
455224
455231
|
config,
|
|
455225
455232
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
455226
455233
|
- workspaceRoot: ${workspaceRoot}
|
|
@@ -455229,8 +455236,8 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
|
|
|
455229
455236
|
- projectName: ${projectName}
|
|
455230
455237
|
`
|
|
455231
455238
|
);
|
|
455232
|
-
config = await
|
|
455233
|
-
|
|
455239
|
+
config = await loadStormConfig(workspaceRoot);
|
|
455240
|
+
writeTrace(
|
|
455234
455241
|
config,
|
|
455235
455242
|
`Loaded Storm config into env:
|
|
455236
455243
|
${Object.keys(process.env).filter((key2) => key2.startsWith("STORM_")).map(
|
|
@@ -455239,11 +455246,11 @@ ${Object.keys(process.env).filter((key2) => key2.startsWith("STORM_")).map(
|
|
|
455239
455246
|
);
|
|
455240
455247
|
}
|
|
455241
455248
|
if (executorOptions?.hooks?.applyDefaultOptions) {
|
|
455242
|
-
|
|
455249
|
+
writeDebug(config, "Running the applyDefaultOptions hook...");
|
|
455243
455250
|
options8 = await Promise.resolve(executorOptions.hooks.applyDefaultOptions(options8, config));
|
|
455244
|
-
|
|
455251
|
+
writeDebug(config, "Completed the applyDefaultOptions hook");
|
|
455245
455252
|
}
|
|
455246
|
-
|
|
455253
|
+
writeTrace(
|
|
455247
455254
|
config,
|
|
455248
455255
|
`Executor schema options \u2699\uFE0F
|
|
455249
455256
|
${Object.keys(options8).map(
|
|
@@ -455264,9 +455271,9 @@ ${Object.keys(options8).map(
|
|
|
455264
455271
|
applyWorkspaceExecutorTokens
|
|
455265
455272
|
);
|
|
455266
455273
|
if (executorOptions?.hooks?.preProcess) {
|
|
455267
|
-
|
|
455274
|
+
writeDebug(config, "Running the preProcess hook...");
|
|
455268
455275
|
await Promise.resolve(executorOptions.hooks.preProcess(tokenized, config));
|
|
455269
|
-
|
|
455276
|
+
writeDebug(config, "Completed the preProcess hook");
|
|
455270
455277
|
}
|
|
455271
455278
|
const result = await Promise.resolve(executorFn(tokenized, context, config));
|
|
455272
455279
|
if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
|
|
@@ -455275,21 +455282,21 @@ ${Object.keys(options8).map(
|
|
|
455275
455282
|
});
|
|
455276
455283
|
}
|
|
455277
455284
|
if (executorOptions?.hooks?.postProcess) {
|
|
455278
|
-
|
|
455285
|
+
writeDebug(config, "Running the postProcess hook...");
|
|
455279
455286
|
await Promise.resolve(executorOptions.hooks.postProcess(config));
|
|
455280
|
-
|
|
455287
|
+
writeDebug(config, "Completed the postProcess hook");
|
|
455281
455288
|
}
|
|
455282
|
-
|
|
455289
|
+
writeSuccess(config, `Completed running the ${name} task executor!
|
|
455283
455290
|
`);
|
|
455284
455291
|
return {
|
|
455285
455292
|
success: true
|
|
455286
455293
|
};
|
|
455287
455294
|
} catch (error) {
|
|
455288
|
-
|
|
455295
|
+
writeFatal(
|
|
455289
455296
|
config,
|
|
455290
455297
|
"A fatal error occurred while running the executor - the process was forced to terminate"
|
|
455291
455298
|
);
|
|
455292
|
-
|
|
455299
|
+
writeError(
|
|
455293
455300
|
config,
|
|
455294
455301
|
`An exception was thrown in the executor's process
|
|
455295
455302
|
- Details: ${error.message}
|
|
@@ -455324,8 +455331,8 @@ var removeExtension = (filePath) => {
|
|
|
455324
455331
|
|
|
455325
455332
|
// packages/workspace-tools/src/utils/get-project-configurations.ts
|
|
455326
455333
|
var import_retrieve_workspace_files = require("nx/src/project-graph/utils/retrieve-workspace-files");
|
|
455327
|
-
var
|
|
455328
|
-
var getProjectConfigurations = () => (0, import_retrieve_workspace_files.retrieveProjectConfigurationsWithoutPluginInference)((0,
|
|
455334
|
+
var import_config_tools2 = require("@storm-software/config-tools");
|
|
455335
|
+
var getProjectConfigurations = () => (0, import_retrieve_workspace_files.retrieveProjectConfigurationsWithoutPluginInference)((0, import_config_tools2.findWorkspaceRoot)());
|
|
455329
455336
|
|
|
455330
455337
|
// packages/workspace-tools/src/utils/get-project-deps.ts
|
|
455331
455338
|
function getExtraDependencies(projectName, graph) {
|
|
@@ -455366,7 +455373,6 @@ var import_esbuild_decorators = __toESM(require_src6());
|
|
|
455366
455373
|
var import_devkit2 = __toESM(require_devkit());
|
|
455367
455374
|
var import_get_custom_transformers_factory = __toESM(require_get_custom_transformers_factory());
|
|
455368
455375
|
var import_normalize_options = __toESM(require_normalize_options());
|
|
455369
|
-
var import_config_tools4 = require("@storm-software/config-tools");
|
|
455370
455376
|
|
|
455371
455377
|
// node_modules/.pnpm/esbuild-plugin-define@0.4.0_esbuild@0.19.12/node_modules/esbuild-plugin-define/dist/mjs/utils.js
|
|
455372
455378
|
var makeKey = (...inputs) => inputs.filter((input) => !!input).join(".");
|
|
@@ -455555,7 +455561,8 @@ var applyDefaultOptions = (options8) => {
|
|
|
455555
455561
|
return options8;
|
|
455556
455562
|
};
|
|
455557
455563
|
var runTsupBuild = async (context, config, options8) => {
|
|
455558
|
-
const
|
|
455564
|
+
const { LogLevel, getLogLevel, writeInfo, writeWarning, findWorkspaceRoot: findWorkspaceRoot3 } = await import("@storm-software/config-tools");
|
|
455565
|
+
const workspaceRoot = config?.workspaceRoot ?? findWorkspaceRoot3();
|
|
455559
455566
|
const stormEnv = Object.keys(options8.env ?? {}).filter((key2) => key2.startsWith("STORM_")).reduce((ret, key2) => {
|
|
455560
455567
|
ret[key2] = options8.env?.[key2];
|
|
455561
455568
|
return ret;
|
|
@@ -455614,7 +455621,7 @@ ${options8.banner}
|
|
|
455614
455621
|
outputPath: options8.outputPath
|
|
455615
455622
|
};
|
|
455616
455623
|
if (options8.getConfig) {
|
|
455617
|
-
|
|
455624
|
+
writeInfo(config, "\u26A1 Running the Build process");
|
|
455618
455625
|
const getConfigFns = [options8.getConfig];
|
|
455619
455626
|
const tsupConfig = (0, import_tsup.defineConfig)(
|
|
455620
455627
|
getConfigFns.map(
|
|
@@ -455627,8 +455634,8 @@ ${options8.banner}
|
|
|
455627
455634
|
} else {
|
|
455628
455635
|
await build(tsupConfig, config);
|
|
455629
455636
|
}
|
|
455630
|
-
} else if (
|
|
455631
|
-
|
|
455637
|
+
} else if (getLogLevel(config?.logLevel ?? "debug") >= LogLevel.WARN) {
|
|
455638
|
+
writeWarning(
|
|
455632
455639
|
config,
|
|
455633
455640
|
"The Build process did not run because no `getConfig` parameter was provided"
|
|
455634
455641
|
);
|
|
@@ -455663,6 +455670,7 @@ function getNormalizedTsConfig(workspaceRoot, outputPath, options8) {
|
|
|
455663
455670
|
return tsConfig;
|
|
455664
455671
|
}
|
|
455665
455672
|
var build = async (options8, config) => {
|
|
455673
|
+
const { writeDebug } = await import("@storm-software/config-tools");
|
|
455666
455674
|
if (Array.isArray(options8)) {
|
|
455667
455675
|
await Promise.all(options8.map((buildOptions) => build(buildOptions, config)));
|
|
455668
455676
|
} else {
|
|
@@ -455670,7 +455678,7 @@ var build = async (options8, config) => {
|
|
|
455670
455678
|
if (_isFunction2(tsupOptions)) {
|
|
455671
455679
|
tsupOptions = await Promise.resolve(tsupOptions({}));
|
|
455672
455680
|
}
|
|
455673
|
-
|
|
455681
|
+
writeDebug(
|
|
455674
455682
|
config,
|
|
455675
455683
|
`\u2699\uFE0F Tsup Build options:
|
|
455676
455684
|
${!_isFunction2(tsupOptions) ? Object.keys(tsupOptions).map(
|
|
@@ -455710,8 +455718,18 @@ var createTypeScriptCompilationOptions = (normalizedOptions, projectName) => {
|
|
|
455710
455718
|
|
|
455711
455719
|
// packages/workspace-tools/src/executors/tsup/executor.ts
|
|
455712
455720
|
async function tsupExecutorFn(options8, context, config) {
|
|
455713
|
-
|
|
455714
|
-
|
|
455721
|
+
const {
|
|
455722
|
+
LogLevel,
|
|
455723
|
+
getLogLevel,
|
|
455724
|
+
writeDebug,
|
|
455725
|
+
writeInfo,
|
|
455726
|
+
writeSuccess,
|
|
455727
|
+
writeTrace,
|
|
455728
|
+
writeWarning,
|
|
455729
|
+
findWorkspaceRoot: findWorkspaceRoot3
|
|
455730
|
+
} = await import("@storm-software/config-tools");
|
|
455731
|
+
writeInfo(config, "\u{1F4E6} Running Storm build executor on the workspace");
|
|
455732
|
+
writeDebug(
|
|
455715
455733
|
config,
|
|
455716
455734
|
`\u2699\uFE0F Executor options:
|
|
455717
455735
|
${Object.keys(options8).map(
|
|
@@ -455724,11 +455742,11 @@ ${Object.keys(options8).map(
|
|
|
455724
455742
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
455725
455743
|
);
|
|
455726
455744
|
}
|
|
455727
|
-
const workspaceRoot = (
|
|
455745
|
+
const workspaceRoot = findWorkspaceRoot3();
|
|
455728
455746
|
const projectRoot = context.projectsConfigurations.projects[context.projectName]?.root ?? workspaceRoot;
|
|
455729
455747
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? workspaceRoot;
|
|
455730
455748
|
if (options8.clean !== false) {
|
|
455731
|
-
|
|
455749
|
+
writeInfo(config, `\u{1F9F9} Cleaning output path: ${options8.outputPath}`);
|
|
455732
455750
|
(0, import_fs_extra.removeSync)(options8.outputPath);
|
|
455733
455751
|
}
|
|
455734
455752
|
const assets = Array.from(options8.assets);
|
|
@@ -455797,13 +455815,13 @@ ${Object.keys(options8).map(
|
|
|
455797
455815
|
const implicitDependencies = context.projectsConfigurations.projects[context.projectName]?.implicitDependencies;
|
|
455798
455816
|
const internalDependencies = [];
|
|
455799
455817
|
const projectConfigs = await Promise.resolve(getProjectConfigurations());
|
|
455800
|
-
if (
|
|
455801
|
-
|
|
455818
|
+
if (getLogLevel(config?.logLevel) >= LogLevel.TRACE) {
|
|
455819
|
+
writeDebug(config, "Project Configs:");
|
|
455802
455820
|
console.log(projectConfigs);
|
|
455803
455821
|
}
|
|
455804
455822
|
if (implicitDependencies && implicitDependencies.length > 0) {
|
|
455805
455823
|
options8.external = implicitDependencies.reduce((ret, key2) => {
|
|
455806
|
-
|
|
455824
|
+
writeDebug(config, `\u26A1 Adding implicit dependency: ${key2}`);
|
|
455807
455825
|
const projectConfig = projectConfigs[key2];
|
|
455808
455826
|
if (projectConfig?.targets?.build) {
|
|
455809
455827
|
const projectPackageJson = (0, import_devkit3.readJsonFile)(projectConfig.targets?.build.options.project);
|
|
@@ -455828,7 +455846,7 @@ ${Object.keys(options8).map(
|
|
|
455828
455846
|
externalDependencies.push(thirdPartyDependency);
|
|
455829
455847
|
}
|
|
455830
455848
|
}
|
|
455831
|
-
|
|
455849
|
+
writeTrace(
|
|
455832
455850
|
config,
|
|
455833
455851
|
`Building with the following dependencies marked as external:
|
|
455834
455852
|
${externalDependencies.map((dep) => {
|
|
@@ -455855,7 +455873,7 @@ ${externalDependencies.map((dep) => {
|
|
|
455855
455873
|
while (propertyKey.startsWith("/")) {
|
|
455856
455874
|
propertyKey = propertyKey.substring(1);
|
|
455857
455875
|
}
|
|
455858
|
-
|
|
455876
|
+
writeDebug(
|
|
455859
455877
|
config,
|
|
455860
455878
|
`Trying to add entry point ${propertyKey} at "${(0, import_devkit3.joinPathFragments)(
|
|
455861
455879
|
filePath.path,
|
|
@@ -455975,10 +455993,10 @@ ${externalDependencies.map((dep) => {
|
|
|
455975
455993
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
455976
455994
|
packageJson.repository.directory ??= projectRoot ? projectRoot : (0, import_devkit3.joinPathFragments)("packages", context.projectName);
|
|
455977
455995
|
const packageJsonPath = (0, import_devkit3.joinPathFragments)(context.root, options8.outputPath, "package.json");
|
|
455978
|
-
|
|
455996
|
+
writeDebug(config, `\u26A1 Writing package.json file to: ${packageJsonPath}`);
|
|
455979
455997
|
(0, import_node_fs.writeFileSync)(packageJsonPath, JSON.stringify(packageJson));
|
|
455980
455998
|
} else {
|
|
455981
|
-
|
|
455999
|
+
writeWarning(config, "Skipping writing to package.json file");
|
|
455982
456000
|
}
|
|
455983
456001
|
if (options8.includeSrc === true) {
|
|
455984
456002
|
const files = globSync([
|
|
@@ -456014,7 +456032,7 @@ ${(0, import_node_fs.readFileSync)(file, "utf-8")}`,
|
|
|
456014
456032
|
)
|
|
456015
456033
|
)
|
|
456016
456034
|
);
|
|
456017
|
-
|
|
456035
|
+
writeSuccess(config, "\u26A1 The Build process has completed successfully");
|
|
456018
456036
|
return {
|
|
456019
456037
|
success: true
|
|
456020
456038
|
};
|