@storm-software/workspace-tools 1.71.1 → 1.72.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 +19 -0
- package/README.md +43 -7
- package/index.js +874 -800
- package/meta.json +1 -1
- package/package.json +3 -3
- package/src/base/index.js +240 -191
- package/src/executors/rolldown/executor.js +93 -67
- package/src/executors/tsup/executor.js +102 -72
- package/src/executors/tsup-browser/executor.js +102 -72
- package/src/executors/tsup-neutral/executor.js +102 -72
- package/src/executors/tsup-node/executor.js +102 -72
- package/src/executors/typia/executor.js +653 -628
- package/src/executors/unbuild/executor.js +93 -67
- package/src/generators/browser-library/generator.js +211 -168
- package/src/generators/config-schema/generator.js +86 -62
- package/src/generators/neutral-library/generator.js +211 -168
- package/src/generators/node-library/generator.js +211 -168
- package/src/generators/preset/files/docs/readme-templates/README.footer.md.template +33 -4
- package/src/generators/preset/files/docs/readme-templates/README.header.md.template +3 -1
- package/src/generators/preset/files/nx.json +5 -1
- package/src/generators/preset/generator.js +136 -91
- package/src/generators/preset/schema.d.ts +1 -0
- package/src/generators/preset/schema.json +10 -0
- package/src/generators/release-version/generator.js +96 -72
- package/src/utils/index.js +619 -600
|
@@ -2473,9 +2473,9 @@ var require_semver2 = __commonJS({
|
|
|
2473
2473
|
}
|
|
2474
2474
|
});
|
|
2475
2475
|
|
|
2476
|
-
// node_modules/.pnpm/@nx+js@18.2.3_@swc-node+register@1.9.0_@swc+core@1.4.
|
|
2476
|
+
// node_modules/.pnpm/@nx+js@18.2.3_@swc-node+register@1.9.0_@swc+core@1.4.13_@swc+wasm@1.4.14_@types+node@20.12.7__7yvzkpqiior6ja4nnzizxbgxvy/node_modules/@nx/js/src/generators/release-version/utils/update-lock-file.js
|
|
2477
2477
|
var require_update_lock_file = __commonJS({
|
|
2478
|
-
"node_modules/.pnpm/@nx+js@18.2.3_@swc-node+register@1.9.0_@swc+core@1.4.
|
|
2478
|
+
"node_modules/.pnpm/@nx+js@18.2.3_@swc-node+register@1.9.0_@swc+core@1.4.13_@swc+wasm@1.4.14_@types+node@20.12.7__7yvzkpqiior6ja4nnzizxbgxvy/node_modules/@nx/js/src/generators/release-version/utils/update-lock-file.js"(exports2) {
|
|
2479
2479
|
"use strict";
|
|
2480
2480
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
2481
2481
|
exports2.updateLockFile = void 0;
|
|
@@ -72423,8 +72423,9 @@ var init_schema = __esm({
|
|
|
72423
72423
|
"packages/config/src/schema.ts"() {
|
|
72424
72424
|
init_lib();
|
|
72425
72425
|
ColorConfigSchema = z4.object({
|
|
72426
|
+
dark: z4.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1d232a").describe("The dark background color of the workspace"),
|
|
72427
|
+
light: z4.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#f4f4f5").describe("The light background color of the workspace"),
|
|
72426
72428
|
primary: z4.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0ea5e9").describe("The primary color of the workspace"),
|
|
72427
|
-
background: z4.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1d232a").describe("The background color of the workspace"),
|
|
72428
72429
|
success: z4.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#087f5b").describe("The success color of the workspace"),
|
|
72429
72430
|
info: z4.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0ea5e9").describe("The informational color of the workspace"),
|
|
72430
72431
|
warning: z4.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#fcc419").describe("The warning color of the workspace"),
|
|
@@ -72459,7 +72460,7 @@ var init_schema = __esm({
|
|
|
72459
72460
|
skipCache: z4.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
|
72460
72461
|
cacheDirectory: z4.string().trim().default("node_modules/.cache/storm").describe("The directory used to store the workspace's cached file data"),
|
|
72461
72462
|
buildDirectory: z4.string().trim().default("dist").describe("The build directory for the workspace"),
|
|
72462
|
-
|
|
72463
|
+
outputDirectory: z4.string().trim().default("node_modules/.storm").describe("The runtime directory of Storm"),
|
|
72463
72464
|
runtimeVersion: z4.string().trim().regex(
|
|
72464
72465
|
/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/
|
|
72465
72466
|
).default("1.0.0").describe("The global version of the Storm runtime"),
|
|
@@ -72522,7 +72523,8 @@ var init_get_default_config = __esm({
|
|
|
72522
72523
|
init_find_workspace_root();
|
|
72523
72524
|
DEFAULT_COLOR_CONFIG = {
|
|
72524
72525
|
primary: "#1fb2a6",
|
|
72525
|
-
|
|
72526
|
+
dark: "#1d232a",
|
|
72527
|
+
light: "#f4f4f5",
|
|
72526
72528
|
success: "#087f5b",
|
|
72527
72529
|
info: "#0ea5e9",
|
|
72528
72530
|
warning: "#fcc419",
|
|
@@ -74267,7 +74269,7 @@ var init_logger = __esm({
|
|
|
74267
74269
|
init_types2();
|
|
74268
74270
|
init_get_log_level();
|
|
74269
74271
|
init_chalk();
|
|
74270
|
-
getLogFn = (
|
|
74272
|
+
getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
74271
74273
|
let _chalk = getChalk();
|
|
74272
74274
|
const configLogLevel = config.logLevel ?? process.env?.STORM_LOG_LEVEL ?? LogLevelLabel.INFO;
|
|
74273
74275
|
if (typeof logLevel === "number" && (logLevel >= getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT) || typeof logLevel === "string" && getLogLevel(logLevel) >= getLogLevel(configLogLevel)) {
|
|
@@ -74301,7 +74303,7 @@ ${_chalk.bold.hex(config?.colors?.error ? config.colors.error : "#7d1a1a")(">")}
|
|
|
74301
74303
|
return (message) => {
|
|
74302
74304
|
console.warn(
|
|
74303
74305
|
`
|
|
74304
|
-
${_chalk.bold.hex(config?.colors?.warning ? config.colors.warning : "#fcc419")("> ")} ${_chalk.bold.bgHex(config?.colors?.warning ? config.colors.warning : "#fcc419").whiteBright("
|
|
74306
|
+
${_chalk.bold.hex(config?.colors?.warning ? config.colors.warning : "#fcc419")("> ")} ${_chalk.bold.bgHex(config?.colors?.warning ? config.colors.warning : "#fcc419").whiteBright(" \u26A0 Warn ")} ${_chalk.hex(
|
|
74305
74307
|
config?.colors?.warning ? config.colors.warning : "#fcc419"
|
|
74306
74308
|
)(message)}
|
|
74307
74309
|
`
|
|
@@ -74351,14 +74353,14 @@ ${_chalk.bold.hex(config?.colors?.primary ? config.colors.primary : "#1fb2a6")("
|
|
|
74351
74353
|
);
|
|
74352
74354
|
};
|
|
74353
74355
|
};
|
|
74354
|
-
writeFatal = (
|
|
74355
|
-
writeError = (
|
|
74356
|
-
writeWarning = (
|
|
74357
|
-
writeInfo = (
|
|
74358
|
-
writeSuccess = (
|
|
74359
|
-
writeDebug = (
|
|
74360
|
-
writeTrace = (
|
|
74361
|
-
writeSystem = (
|
|
74356
|
+
writeFatal = (message, config) => getLogFn(LogLevel.FATAL, config)(message);
|
|
74357
|
+
writeError = (message, config) => getLogFn(LogLevel.ERROR, config)(message);
|
|
74358
|
+
writeWarning = (message, config) => getLogFn(LogLevel.WARN, config)(message);
|
|
74359
|
+
writeInfo = (message, config) => getLogFn(LogLevel.INFO, config)(message);
|
|
74360
|
+
writeSuccess = (message, config) => getLogFn(LogLevel.SUCCESS, config)(message);
|
|
74361
|
+
writeDebug = (message, config) => getLogFn(LogLevel.DEBUG, config)(message);
|
|
74362
|
+
writeTrace = (message, config) => getLogFn(LogLevel.TRACE, config)(message);
|
|
74363
|
+
writeSystem = (message, config) => getLogFn(LogLevel.ALL, config)(message);
|
|
74362
74364
|
getStopwatch = (name) => {
|
|
74363
74365
|
const start = process.hrtime();
|
|
74364
74366
|
return () => {
|
|
@@ -74382,40 +74384,43 @@ var init_process_handler = __esm({
|
|
|
74382
74384
|
"packages/config-tools/src/utilities/process-handler.ts"() {
|
|
74383
74385
|
init_logger();
|
|
74384
74386
|
exitWithError = (config) => {
|
|
74385
|
-
writeFatal(
|
|
74387
|
+
writeFatal("Exiting script with an error status...", config);
|
|
74386
74388
|
process.exit(1);
|
|
74387
74389
|
};
|
|
74388
74390
|
exitWithSuccess = (config) => {
|
|
74389
|
-
writeSuccess(
|
|
74391
|
+
writeSuccess("Script completed successfully. Exiting...", config);
|
|
74390
74392
|
process.exit(0);
|
|
74391
74393
|
};
|
|
74392
74394
|
handleProcess = (config) => {
|
|
74393
74395
|
writeTrace(
|
|
74394
|
-
|
|
74395
|
-
|
|
74396
|
+
`Using the following arguments to process the script: ${process.argv.join(", ")}`,
|
|
74397
|
+
config
|
|
74396
74398
|
);
|
|
74397
74399
|
process.on("unhandledRejection", (error) => {
|
|
74398
|
-
writeError(
|
|
74400
|
+
writeError(
|
|
74401
|
+
`An Unhandled Rejection occurred while running the program: ${error}`,
|
|
74402
|
+
config
|
|
74403
|
+
);
|
|
74399
74404
|
exitWithError(config);
|
|
74400
74405
|
});
|
|
74401
74406
|
process.on("uncaughtException", (error) => {
|
|
74402
74407
|
writeError(
|
|
74403
|
-
config,
|
|
74404
74408
|
`An Uncaught Exception occurred while running the program: ${error.message}
|
|
74405
|
-
Stacktrace: ${error.stack}
|
|
74409
|
+
Stacktrace: ${error.stack}`,
|
|
74410
|
+
config
|
|
74406
74411
|
);
|
|
74407
74412
|
exitWithError(config);
|
|
74408
74413
|
});
|
|
74409
74414
|
process.on("SIGTERM", (signal) => {
|
|
74410
|
-
writeError(
|
|
74415
|
+
writeError(`The program terminated with signal code: ${signal}`, config);
|
|
74411
74416
|
exitWithError(config);
|
|
74412
74417
|
});
|
|
74413
74418
|
process.on("SIGINT", (signal) => {
|
|
74414
|
-
writeError(
|
|
74419
|
+
writeError(`The program terminated with signal code: ${signal}`, config);
|
|
74415
74420
|
exitWithError(config);
|
|
74416
74421
|
});
|
|
74417
74422
|
process.on("SIGHUP", (signal) => {
|
|
74418
|
-
writeError(
|
|
74423
|
+
writeError(`The program terminated with signal code: ${signal}`, config);
|
|
74419
74424
|
exitWithError(config);
|
|
74420
74425
|
});
|
|
74421
74426
|
};
|
|
@@ -74555,7 +74560,9 @@ var init_get_env = __esm({
|
|
|
74555
74560
|
getExtensionEnv = (extensionName) => {
|
|
74556
74561
|
const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
|
|
74557
74562
|
return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
|
|
74558
|
-
const name = key.replace(prefix, "").split("_").map(
|
|
74563
|
+
const name = key.replace(prefix, "").split("_").map(
|
|
74564
|
+
(i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : ""
|
|
74565
|
+
).join("");
|
|
74559
74566
|
if (name) {
|
|
74560
74567
|
ret[name] = process.env[key];
|
|
74561
74568
|
}
|
|
@@ -74583,14 +74590,15 @@ var init_get_env = __esm({
|
|
|
74583
74590
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
74584
74591
|
cacheDirectory: correctPaths(process.env[`${prefix}CACHE_DIRECTORY`]),
|
|
74585
74592
|
runtimeVersion: process.env[`${prefix}RUNTIME_VERSION`],
|
|
74586
|
-
|
|
74593
|
+
outputDirectory: correctPaths(process.env[`${prefix}OUTPUT_DIRECTORY`]),
|
|
74587
74594
|
env: process.env[`${prefix}ENV`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT,
|
|
74588
74595
|
ci: process.env[`${prefix}CI`] !== void 0 ? Boolean(
|
|
74589
74596
|
process.env[`${prefix}CI`] ?? process.env.CI ?? process.env.CONTINUOUS_INTEGRATION
|
|
74590
74597
|
) : void 0,
|
|
74591
74598
|
colors: {
|
|
74592
74599
|
primary: process.env[`${prefix}COLOR_PRIMARY`],
|
|
74593
|
-
|
|
74600
|
+
dark: process.env[`${prefix}COLOR_DARK`],
|
|
74601
|
+
light: process.env[`${prefix}COLOR_LIGHT`],
|
|
74594
74602
|
success: process.env[`${prefix}COLOR_SUCCESS`],
|
|
74595
74603
|
info: process.env[`${prefix}COLOR_INFO`],
|
|
74596
74604
|
warning: process.env[`${prefix}COLOR_WARNING`],
|
|
@@ -74601,7 +74609,11 @@ var init_get_env = __esm({
|
|
|
74601
74609
|
branch: process.env[`${prefix}BRANCH`],
|
|
74602
74610
|
preid: process.env[`${prefix}PRE_ID`],
|
|
74603
74611
|
externalPackagePatterns: process.env[`${prefix}EXTERNAL_PACKAGE_PATTERNS`] ? JSON.parse(process.env[`${prefix}EXTERNAL_PACKAGE_PATTERNS`]) : [],
|
|
74604
|
-
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
|
|
74612
|
+
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
|
|
74613
|
+
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
74614
|
+
) ? getLogLevelLabel(
|
|
74615
|
+
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
74616
|
+
) : process.env[`${prefix}LOG_LEVEL`] : void 0
|
|
74605
74617
|
};
|
|
74606
74618
|
const serializedConfig = process.env[`${prefix}CONFIG`];
|
|
74607
74619
|
if (serializedConfig) {
|
|
@@ -74696,10 +74708,14 @@ var init_set_env = __esm({
|
|
|
74696
74708
|
process.env.NX_WORKSPACE_ROOT_PATH = correctPaths(config.workspaceRoot);
|
|
74697
74709
|
}
|
|
74698
74710
|
if (config.packageDirectory) {
|
|
74699
|
-
process.env[`${prefix}PACKAGE_DIRECTORY`] = correctPaths(
|
|
74711
|
+
process.env[`${prefix}PACKAGE_DIRECTORY`] = correctPaths(
|
|
74712
|
+
config.packageDirectory
|
|
74713
|
+
);
|
|
74700
74714
|
}
|
|
74701
74715
|
if (config.buildDirectory) {
|
|
74702
|
-
process.env[`${prefix}BUILD_DIRECTORY`] = correctPaths(
|
|
74716
|
+
process.env[`${prefix}BUILD_DIRECTORY`] = correctPaths(
|
|
74717
|
+
config.buildDirectory
|
|
74718
|
+
);
|
|
74703
74719
|
}
|
|
74704
74720
|
if (config.skipCache !== void 0) {
|
|
74705
74721
|
process.env[`${prefix}SKIP_CACHE`] = String(config.skipCache);
|
|
@@ -74709,13 +74725,17 @@ var init_set_env = __esm({
|
|
|
74709
74725
|
}
|
|
74710
74726
|
}
|
|
74711
74727
|
if (!config.skipCache && config.cacheDirectory) {
|
|
74712
|
-
process.env[`${prefix}CACHE_DIRECTORY`] = correctPaths(
|
|
74728
|
+
process.env[`${prefix}CACHE_DIRECTORY`] = correctPaths(
|
|
74729
|
+
config.cacheDirectory
|
|
74730
|
+
);
|
|
74713
74731
|
}
|
|
74714
74732
|
if (config.runtimeVersion) {
|
|
74715
74733
|
process.env[`${prefix}RUNTIME_VERSION`] = config.runtimeVersion;
|
|
74716
74734
|
}
|
|
74717
|
-
if (config.
|
|
74718
|
-
process.env[`${prefix}
|
|
74735
|
+
if (config.outputDirectory) {
|
|
74736
|
+
process.env[`${prefix}OUTPUT_DIRECTORY`] = correctPaths(
|
|
74737
|
+
config.outputDirectory
|
|
74738
|
+
);
|
|
74719
74739
|
}
|
|
74720
74740
|
if (config.env) {
|
|
74721
74741
|
process.env[`${prefix}ENV`] = config.env;
|
|
@@ -74730,8 +74750,11 @@ var init_set_env = __esm({
|
|
|
74730
74750
|
if (config.colors.primary) {
|
|
74731
74751
|
process.env[`${prefix}COLOR_PRIMARY`] = config.colors.primary;
|
|
74732
74752
|
}
|
|
74733
|
-
if (config.colors.
|
|
74734
|
-
process.env[`${prefix}
|
|
74753
|
+
if (config.colors.dark) {
|
|
74754
|
+
process.env[`${prefix}COLOR_DARK`] = config.colors.dark;
|
|
74755
|
+
}
|
|
74756
|
+
if (config.colors.light) {
|
|
74757
|
+
process.env[`${prefix}COLOR_LIGHT`] = config.colors.light;
|
|
74735
74758
|
}
|
|
74736
74759
|
if (config.colors.success) {
|
|
74737
74760
|
process.env[`${prefix}COLOR_SUCCESS`] = config.colors.success;
|
|
@@ -74812,10 +74835,7 @@ var init_create_storm_config = __esm({
|
|
|
74812
74835
|
if (schema && extensionName) {
|
|
74813
74836
|
result.extensions = {
|
|
74814
74837
|
...result.extensions,
|
|
74815
|
-
[extensionName]: createConfigExtension(
|
|
74816
|
-
extensionName,
|
|
74817
|
-
schema
|
|
74818
|
-
)
|
|
74838
|
+
[extensionName]: createConfigExtension(extensionName, schema)
|
|
74819
74839
|
};
|
|
74820
74840
|
}
|
|
74821
74841
|
_static_cache = result;
|
|
@@ -74842,8 +74862,8 @@ var init_create_storm_config = __esm({
|
|
|
74842
74862
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
74843
74863
|
if (!configFile) {
|
|
74844
74864
|
writeWarning(
|
|
74845
|
-
|
|
74846
|
-
|
|
74865
|
+
"No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.config.js` file to the root of your workspace if it is not.\n",
|
|
74866
|
+
{ logLevel: "all" }
|
|
74847
74867
|
);
|
|
74848
74868
|
}
|
|
74849
74869
|
config = StormConfigSchema.parse(
|
|
@@ -74924,9 +74944,9 @@ var init_src2 = __esm({
|
|
|
74924
74944
|
}
|
|
74925
74945
|
});
|
|
74926
74946
|
|
|
74927
|
-
// node_modules/.pnpm/@nx+js@18.2.3_@swc-node+register@1.9.0_@swc+core@1.4.
|
|
74947
|
+
// node_modules/.pnpm/@nx+js@18.2.3_@swc-node+register@1.9.0_@swc+core@1.4.13_@swc+wasm@1.4.14_@types+node@20.12.7__7yvzkpqiior6ja4nnzizxbgxvy/node_modules/@nx/js/src/generators/release-version/utils/package.js
|
|
74928
74948
|
var require_package2 = __commonJS({
|
|
74929
|
-
"node_modules/.pnpm/@nx+js@18.2.3_@swc-node+register@1.9.0_@swc+core@1.4.
|
|
74949
|
+
"node_modules/.pnpm/@nx+js@18.2.3_@swc-node+register@1.9.0_@swc+core@1.4.13_@swc+wasm@1.4.14_@types+node@20.12.7__7yvzkpqiior6ja4nnzizxbgxvy/node_modules/@nx/js/src/generators/release-version/utils/package.js"(exports2) {
|
|
74930
74950
|
"use strict";
|
|
74931
74951
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
74932
74952
|
exports2.Package = void 0;
|
|
@@ -77236,9 +77256,9 @@ var require_npa = __commonJS({
|
|
|
77236
77256
|
}
|
|
77237
77257
|
});
|
|
77238
77258
|
|
|
77239
|
-
// node_modules/.pnpm/@nx+js@18.2.3_@swc-node+register@1.9.0_@swc+core@1.4.
|
|
77259
|
+
// node_modules/.pnpm/@nx+js@18.2.3_@swc-node+register@1.9.0_@swc+core@1.4.13_@swc+wasm@1.4.14_@types+node@20.12.7__7yvzkpqiior6ja4nnzizxbgxvy/node_modules/@nx/js/src/generators/release-version/utils/resolve-version-spec.js
|
|
77240
77260
|
var require_resolve_version_spec = __commonJS({
|
|
77241
|
-
"node_modules/.pnpm/@nx+js@18.2.3_@swc-node+register@1.9.0_@swc+core@1.4.
|
|
77261
|
+
"node_modules/.pnpm/@nx+js@18.2.3_@swc-node+register@1.9.0_@swc+core@1.4.13_@swc+wasm@1.4.14_@types+node@20.12.7__7yvzkpqiior6ja4nnzizxbgxvy/node_modules/@nx/js/src/generators/release-version/utils/resolve-version-spec.js"(exports2) {
|
|
77242
77262
|
"use strict";
|
|
77243
77263
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
77244
77264
|
exports2.resolveVersionSpec = void 0;
|
|
@@ -77265,9 +77285,9 @@ var require_resolve_version_spec = __commonJS({
|
|
|
77265
77285
|
}
|
|
77266
77286
|
});
|
|
77267
77287
|
|
|
77268
|
-
// node_modules/.pnpm/@nx+js@18.2.3_@swc-node+register@1.9.0_@swc+core@1.4.
|
|
77288
|
+
// node_modules/.pnpm/@nx+js@18.2.3_@swc-node+register@1.9.0_@swc+core@1.4.13_@swc+wasm@1.4.14_@types+node@20.12.7__7yvzkpqiior6ja4nnzizxbgxvy/node_modules/@nx/js/src/generators/release-version/utils/resolve-local-package-dependencies.js
|
|
77269
77289
|
var require_resolve_local_package_dependencies = __commonJS({
|
|
77270
|
-
"node_modules/.pnpm/@nx+js@18.2.3_@swc-node+register@1.9.0_@swc+core@1.4.
|
|
77290
|
+
"node_modules/.pnpm/@nx+js@18.2.3_@swc-node+register@1.9.0_@swc+core@1.4.13_@swc+wasm@1.4.14_@types+node@20.12.7__7yvzkpqiior6ja4nnzizxbgxvy/node_modules/@nx/js/src/generators/release-version/utils/resolve-local-package-dependencies.js"(exports2) {
|
|
77271
77291
|
"use strict";
|
|
77272
77292
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
77273
77293
|
exports2.resolveLocalPackageDependencies = void 0;
|
|
@@ -77371,34 +77391,34 @@ var withRunGenerator = (name, generatorFn, generatorOptions = {
|
|
|
77371
77391
|
let options = _options;
|
|
77372
77392
|
let config;
|
|
77373
77393
|
try {
|
|
77374
|
-
writeInfo2(
|
|
77394
|
+
writeInfo2(`\u26A1 Running the ${name} generator...
|
|
77375
77395
|
|
|
77376
|
-
|
|
77396
|
+
`, config);
|
|
77377
77397
|
const workspaceRoot = findWorkspaceRoot2();
|
|
77378
77398
|
if (!generatorOptions.skipReadingConfig) {
|
|
77379
77399
|
writeDebug2(
|
|
77380
|
-
config,
|
|
77381
77400
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
77382
|
-
- workspaceRoot: ${workspaceRoot}
|
|
77401
|
+
- workspaceRoot: ${workspaceRoot}`,
|
|
77402
|
+
config
|
|
77383
77403
|
);
|
|
77384
77404
|
config = await loadStormConfig2(workspaceRoot);
|
|
77385
77405
|
writeTrace2(
|
|
77386
|
-
config,
|
|
77387
77406
|
`Loaded Storm config into env:
|
|
77388
|
-
${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[key])}`).join("\n")}
|
|
77407
|
+
${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[key])}`).join("\n")}`,
|
|
77408
|
+
config
|
|
77389
77409
|
);
|
|
77390
77410
|
}
|
|
77391
77411
|
if (generatorOptions?.hooks?.applyDefaultOptions) {
|
|
77392
|
-
writeDebug2(
|
|
77412
|
+
writeDebug2("Running the applyDefaultOptions hook...", config);
|
|
77393
77413
|
options = await Promise.resolve(
|
|
77394
77414
|
generatorOptions.hooks.applyDefaultOptions(options, config)
|
|
77395
77415
|
);
|
|
77396
|
-
writeDebug2(
|
|
77416
|
+
writeDebug2("Completed the applyDefaultOptions hook", config);
|
|
77397
77417
|
}
|
|
77398
77418
|
writeTrace2(
|
|
77399
|
-
config,
|
|
77400
77419
|
`Generator schema options \u2699\uFE0F
|
|
77401
|
-
${Object.keys(options ?? {}).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}
|
|
77420
|
+
${Object.keys(options ?? {}).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`,
|
|
77421
|
+
config
|
|
77402
77422
|
);
|
|
77403
77423
|
const tokenized = await applyWorkspaceTokens(
|
|
77404
77424
|
options,
|
|
@@ -77406,37 +77426,41 @@ ${Object.keys(options ?? {}).map((key) => ` - ${key}=${JSON.stringify(options[ke
|
|
|
77406
77426
|
applyWorkspaceBaseTokens
|
|
77407
77427
|
);
|
|
77408
77428
|
if (generatorOptions?.hooks?.preProcess) {
|
|
77409
|
-
writeDebug2(
|
|
77410
|
-
await Promise.resolve(
|
|
77411
|
-
|
|
77429
|
+
writeDebug2("Running the preProcess hook...", config);
|
|
77430
|
+
await Promise.resolve(
|
|
77431
|
+
generatorOptions.hooks.preProcess(tokenized, config)
|
|
77432
|
+
);
|
|
77433
|
+
writeDebug2("Completed the preProcess hook", config);
|
|
77412
77434
|
}
|
|
77413
|
-
const result = await Promise.resolve(
|
|
77435
|
+
const result = await Promise.resolve(
|
|
77436
|
+
generatorFn(tree, tokenized, config)
|
|
77437
|
+
);
|
|
77414
77438
|
if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
|
|
77415
77439
|
throw new Error(`The ${name} generator failed to run`, {
|
|
77416
77440
|
cause: result?.error
|
|
77417
77441
|
});
|
|
77418
77442
|
}
|
|
77419
77443
|
if (generatorOptions?.hooks?.postProcess) {
|
|
77420
|
-
writeDebug2(
|
|
77444
|
+
writeDebug2("Running the postProcess hook...", config);
|
|
77421
77445
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
77422
|
-
writeDebug2(
|
|
77446
|
+
writeDebug2("Completed the postProcess hook", config);
|
|
77423
77447
|
}
|
|
77424
|
-
writeSuccess2(
|
|
77425
|
-
|
|
77448
|
+
writeSuccess2(`Completed running the ${name} task executor!
|
|
77449
|
+
`, config);
|
|
77426
77450
|
return {
|
|
77427
77451
|
...result,
|
|
77428
77452
|
success: true
|
|
77429
77453
|
};
|
|
77430
77454
|
} catch (error) {
|
|
77431
77455
|
writeFatal2(
|
|
77432
|
-
|
|
77433
|
-
|
|
77456
|
+
"A fatal error occurred while running the generator - the process was forced to terminate",
|
|
77457
|
+
config
|
|
77434
77458
|
);
|
|
77435
77459
|
writeError2(
|
|
77436
|
-
config,
|
|
77437
77460
|
`An exception was thrown in the generator's process
|
|
77438
77461
|
- Details: ${error.message}
|
|
77439
|
-
- Stacktrace: ${error.stack}
|
|
77462
|
+
- Stacktrace: ${error.stack}`,
|
|
77463
|
+
config
|
|
77440
77464
|
);
|
|
77441
77465
|
return {
|
|
77442
77466
|
success: false
|
|
@@ -80429,9 +80453,9 @@ To fix this you will either need to add a package.json or Cargo.toml file at tha
|
|
|
80429
80453
|
tree.exists(packageJsonPath) ? packageJsonPath : cargoTomlPath
|
|
80430
80454
|
);
|
|
80431
80455
|
const log = (msg) => {
|
|
80432
|
-
writeInfo2(
|
|
80456
|
+
writeInfo2(`${projectName}: ${msg}`, config);
|
|
80433
80457
|
};
|
|
80434
|
-
writeInfo2(
|
|
80458
|
+
writeInfo2(`Running release version for project: ${project.name}`, config);
|
|
80435
80459
|
let packageName;
|
|
80436
80460
|
let currentVersionFromDisk;
|
|
80437
80461
|
if (tree.exists(packageJsonPath)) {
|