@storm-software/workspace-tools 1.62.5 → 1.62.7
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/index.js +109 -84
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/base/index.js +52 -37
- package/src/executors/tsup/executor.js +74 -57
- package/src/executors/tsup-browser/executor.js +74 -57
- package/src/executors/tsup-neutral/executor.js +74 -57
- package/src/executors/tsup-node/executor.js +74 -57
- package/src/executors/typia/executor.js +28 -21
- package/src/generators/browser-library/generator.js +26 -20
- package/src/generators/config-schema/generator.js +30 -24
- package/src/generators/neutral-library/generator.js +26 -20
- package/src/generators/node-library/generator.js +26 -20
- package/src/generators/preset/generator.js +26 -20
- package/src/generators/release-version/generator.js +31 -25
- package/src/utils/index.js +24 -23
|
@@ -4479,20 +4479,20 @@ var require_typescript = __commonJS({
|
|
|
4479
4479
|
})();
|
|
4480
4480
|
}
|
|
4481
4481
|
});
|
|
4482
|
-
var
|
|
4482
|
+
var LogLevel, Debug;
|
|
4483
4483
|
var init_debug = __esm2({
|
|
4484
4484
|
"src/compiler/debug.ts"() {
|
|
4485
4485
|
"use strict";
|
|
4486
4486
|
init_ts2();
|
|
4487
4487
|
init_ts2();
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
return
|
|
4495
|
-
})(
|
|
4488
|
+
LogLevel = /* @__PURE__ */ ((LogLevel3) => {
|
|
4489
|
+
LogLevel3[LogLevel3["Off"] = 0] = "Off";
|
|
4490
|
+
LogLevel3[LogLevel3["Error"] = 1] = "Error";
|
|
4491
|
+
LogLevel3[LogLevel3["Warning"] = 2] = "Warning";
|
|
4492
|
+
LogLevel3[LogLevel3["Info"] = 3] = "Info";
|
|
4493
|
+
LogLevel3[LogLevel3["Verbose"] = 4] = "Verbose";
|
|
4494
|
+
return LogLevel3;
|
|
4495
|
+
})(LogLevel || {});
|
|
4496
4496
|
((Debug2) => {
|
|
4497
4497
|
let currentAssertionLevel = 0;
|
|
4498
4498
|
Debug2.currentLogLevel = 2;
|
|
@@ -187061,12 +187061,12 @@ ${options8.prefix}` : "\n" : options8.prefix
|
|
|
187061
187061
|
"src/server/utilitiesPublic.ts"() {
|
|
187062
187062
|
"use strict";
|
|
187063
187063
|
init_ts7();
|
|
187064
|
-
LogLevel22 = /* @__PURE__ */ ((
|
|
187065
|
-
|
|
187066
|
-
|
|
187067
|
-
|
|
187068
|
-
|
|
187069
|
-
return
|
|
187064
|
+
LogLevel22 = /* @__PURE__ */ ((LogLevel3) => {
|
|
187065
|
+
LogLevel3[LogLevel3["terse"] = 0] = "terse";
|
|
187066
|
+
LogLevel3[LogLevel3["normal"] = 1] = "normal";
|
|
187067
|
+
LogLevel3[LogLevel3["requestTime"] = 2] = "requestTime";
|
|
187068
|
+
LogLevel3[LogLevel3["verbose"] = 3] = "verbose";
|
|
187069
|
+
return LogLevel3;
|
|
187070
187070
|
})(LogLevel22 || {});
|
|
187071
187071
|
emptyArray22 = createSortedArray22();
|
|
187072
187072
|
Msg2 = /* @__PURE__ */ ((Msg22) => {
|
|
@@ -198597,7 +198597,7 @@ ${e3.message}`;
|
|
|
198597
198597
|
LanguageVariant: () => LanguageVariant,
|
|
198598
198598
|
LexicalEnvironmentFlags: () => LexicalEnvironmentFlags,
|
|
198599
198599
|
ListFormat: () => ListFormat,
|
|
198600
|
-
LogLevel: () =>
|
|
198600
|
+
LogLevel: () => LogLevel,
|
|
198601
198601
|
MemberOverrideStatus: () => MemberOverrideStatus,
|
|
198602
198602
|
ModifierFlags: () => ModifierFlags,
|
|
198603
198603
|
ModuleDetectionKind: () => ModuleDetectionKind,
|
|
@@ -201001,7 +201001,7 @@ ${e3.message}`;
|
|
|
201001
201001
|
LanguageVariant: () => LanguageVariant,
|
|
201002
201002
|
LexicalEnvironmentFlags: () => LexicalEnvironmentFlags,
|
|
201003
201003
|
ListFormat: () => ListFormat,
|
|
201004
|
-
LogLevel: () =>
|
|
201004
|
+
LogLevel: () => LogLevel,
|
|
201005
201005
|
MemberOverrideStatus: () => MemberOverrideStatus,
|
|
201006
201006
|
ModifierFlags: () => ModifierFlags,
|
|
201007
201007
|
ModuleDetectionKind: () => ModuleDetectionKind,
|
|
@@ -448946,9 +448946,6 @@ __export(executor_exports, {
|
|
|
448946
448946
|
});
|
|
448947
448947
|
module.exports = __toCommonJS(executor_exports);
|
|
448948
448948
|
|
|
448949
|
-
// packages/workspace-tools/src/base/base-executor.ts
|
|
448950
|
-
var import_config_tools2 = require("@storm-software/config-tools");
|
|
448951
|
-
|
|
448952
448949
|
// packages/workspace-tools/src/utils/apply-workspace-tokens.ts
|
|
448953
448950
|
var import_config_tools = require("@storm-software/config-tools");
|
|
448954
448951
|
var applyWorkspaceExecutorTokens = (option, tokenizerOptions) => {
|
|
@@ -449022,24 +449019,34 @@ var applyWorkspaceTokens = (options8, config, tokenizerFn) => {
|
|
|
449022
449019
|
|
|
449023
449020
|
// packages/workspace-tools/src/base/base-executor.ts
|
|
449024
449021
|
var withRunExecutor = (name, executorFn, executorOptions) => async (_options, context) => {
|
|
449025
|
-
const
|
|
449022
|
+
const {
|
|
449023
|
+
getStopwatch,
|
|
449024
|
+
writeDebug,
|
|
449025
|
+
writeError,
|
|
449026
|
+
writeFatal,
|
|
449027
|
+
writeInfo,
|
|
449028
|
+
writeSuccess,
|
|
449029
|
+
writeTrace,
|
|
449030
|
+
findWorkspaceRoot: findWorkspaceRoot3,
|
|
449031
|
+
loadStormConfig
|
|
449032
|
+
} = await import("@storm-software/config-tools");
|
|
449033
|
+
const stopwatch = getStopwatch(name);
|
|
449026
449034
|
let options8 = _options;
|
|
449027
449035
|
let config;
|
|
449028
449036
|
try {
|
|
449029
|
-
|
|
449037
|
+
writeInfo(config, `\u26A1 Running the ${name} executor...
|
|
449030
449038
|
`);
|
|
449031
449039
|
if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
449032
449040
|
throw new Error(
|
|
449033
449041
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
449034
449042
|
);
|
|
449035
449043
|
}
|
|
449036
|
-
const workspaceRoot = (
|
|
449044
|
+
const workspaceRoot = findWorkspaceRoot3();
|
|
449037
449045
|
const projectRoot = context.projectsConfigurations.projects[context.projectName]?.root ?? workspaceRoot;
|
|
449038
449046
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? workspaceRoot;
|
|
449039
449047
|
const projectName = context.projectsConfigurations.projects[context.projectName]?.name ?? context.projectName;
|
|
449040
449048
|
if (!executorOptions.skipReadingConfig) {
|
|
449041
|
-
|
|
449042
|
-
(0, import_config_tools2.writeDebug)(
|
|
449049
|
+
writeDebug(
|
|
449043
449050
|
config,
|
|
449044
449051
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
449045
449052
|
- workspaceRoot: ${workspaceRoot}
|
|
@@ -449049,7 +449056,7 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
|
|
|
449049
449056
|
`
|
|
449050
449057
|
);
|
|
449051
449058
|
config = await loadStormConfig(workspaceRoot);
|
|
449052
|
-
|
|
449059
|
+
writeTrace(
|
|
449053
449060
|
config,
|
|
449054
449061
|
`Loaded Storm config into env:
|
|
449055
449062
|
${Object.keys(process.env).filter((key2) => key2.startsWith("STORM_")).map(
|
|
@@ -449058,11 +449065,11 @@ ${Object.keys(process.env).filter((key2) => key2.startsWith("STORM_")).map(
|
|
|
449058
449065
|
);
|
|
449059
449066
|
}
|
|
449060
449067
|
if (executorOptions?.hooks?.applyDefaultOptions) {
|
|
449061
|
-
|
|
449068
|
+
writeDebug(config, "Running the applyDefaultOptions hook...");
|
|
449062
449069
|
options8 = await Promise.resolve(executorOptions.hooks.applyDefaultOptions(options8, config));
|
|
449063
|
-
|
|
449070
|
+
writeDebug(config, "Completed the applyDefaultOptions hook");
|
|
449064
449071
|
}
|
|
449065
|
-
|
|
449072
|
+
writeTrace(
|
|
449066
449073
|
config,
|
|
449067
449074
|
`Executor schema options \u2699\uFE0F
|
|
449068
449075
|
${Object.keys(options8).map(
|
|
@@ -449083,9 +449090,9 @@ ${Object.keys(options8).map(
|
|
|
449083
449090
|
applyWorkspaceExecutorTokens
|
|
449084
449091
|
);
|
|
449085
449092
|
if (executorOptions?.hooks?.preProcess) {
|
|
449086
|
-
|
|
449093
|
+
writeDebug(config, "Running the preProcess hook...");
|
|
449087
449094
|
await Promise.resolve(executorOptions.hooks.preProcess(tokenized, config));
|
|
449088
|
-
|
|
449095
|
+
writeDebug(config, "Completed the preProcess hook");
|
|
449089
449096
|
}
|
|
449090
449097
|
const result = await Promise.resolve(executorFn(tokenized, context, config));
|
|
449091
449098
|
if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
|
|
@@ -449094,21 +449101,21 @@ ${Object.keys(options8).map(
|
|
|
449094
449101
|
});
|
|
449095
449102
|
}
|
|
449096
449103
|
if (executorOptions?.hooks?.postProcess) {
|
|
449097
|
-
|
|
449104
|
+
writeDebug(config, "Running the postProcess hook...");
|
|
449098
449105
|
await Promise.resolve(executorOptions.hooks.postProcess(config));
|
|
449099
|
-
|
|
449106
|
+
writeDebug(config, "Completed the postProcess hook");
|
|
449100
449107
|
}
|
|
449101
|
-
|
|
449108
|
+
writeSuccess(config, `Completed running the ${name} task executor!
|
|
449102
449109
|
`);
|
|
449103
449110
|
return {
|
|
449104
449111
|
success: true
|
|
449105
449112
|
};
|
|
449106
449113
|
} catch (error) {
|
|
449107
|
-
|
|
449114
|
+
writeFatal(
|
|
449108
449115
|
config,
|
|
449109
449116
|
"A fatal error occurred while running the executor - the process was forced to terminate"
|
|
449110
449117
|
);
|
|
449111
|
-
|
|
449118
|
+
writeError(
|
|
449112
449119
|
config,
|
|
449113
449120
|
`An exception was thrown in the executor's process
|
|
449114
449121
|
- Details: ${error.message}
|
|
@@ -449165,7 +449172,6 @@ var import_esbuild_decorators = __toESM(require_src());
|
|
|
449165
449172
|
var import_devkit2 = __toESM(require_devkit());
|
|
449166
449173
|
var import_get_custom_transformers_factory = __toESM(require_get_custom_transformers_factory());
|
|
449167
449174
|
var import_normalize_options = __toESM(require_normalize_options());
|
|
449168
|
-
var import_config_tools3 = require("@storm-software/config-tools");
|
|
449169
449175
|
|
|
449170
449176
|
// node_modules/.pnpm/esbuild-plugin-define@0.4.0_esbuild@0.19.12/node_modules/esbuild-plugin-define/dist/mjs/utils.js
|
|
449171
449177
|
var makeKey = (...inputs) => inputs.filter((input) => !!input).join(".");
|
|
@@ -449366,7 +449372,8 @@ var applyDefaultOptions = (options8) => {
|
|
|
449366
449372
|
return options8;
|
|
449367
449373
|
};
|
|
449368
449374
|
var runTsupBuild = async (context, config, options8) => {
|
|
449369
|
-
const
|
|
449375
|
+
const { LogLevel, getLogLevel, writeInfo, writeWarning, findWorkspaceRoot: findWorkspaceRoot3 } = await import("@storm-software/config-tools");
|
|
449376
|
+
const workspaceRoot = config?.workspaceRoot ?? findWorkspaceRoot3();
|
|
449370
449377
|
const stormEnv = Object.keys(options8.env ?? {}).filter((key2) => key2.startsWith("STORM_")).reduce((ret, key2) => {
|
|
449371
449378
|
ret[key2] = options8.env?.[key2];
|
|
449372
449379
|
return ret;
|
|
@@ -449425,7 +449432,7 @@ ${options8.banner}
|
|
|
449425
449432
|
outputPath: options8.outputPath
|
|
449426
449433
|
};
|
|
449427
449434
|
if (options8.getConfig) {
|
|
449428
|
-
|
|
449435
|
+
writeInfo(config, "\u26A1 Running the Build process");
|
|
449429
449436
|
const getConfigFns = [options8.getConfig];
|
|
449430
449437
|
const tsupConfig = (0, import_tsup.defineConfig)(
|
|
449431
449438
|
getConfigFns.map(
|
|
@@ -449438,8 +449445,8 @@ ${options8.banner}
|
|
|
449438
449445
|
} else {
|
|
449439
449446
|
await build(tsupConfig, config);
|
|
449440
449447
|
}
|
|
449441
|
-
} else if (
|
|
449442
|
-
|
|
449448
|
+
} else if (getLogLevel(config?.logLevel ?? "debug") >= LogLevel.WARN) {
|
|
449449
|
+
writeWarning(
|
|
449443
449450
|
config,
|
|
449444
449451
|
"The Build process did not run because no `getConfig` parameter was provided"
|
|
449445
449452
|
);
|
|
@@ -449474,6 +449481,7 @@ function getNormalizedTsConfig(workspaceRoot, outputPath, options8) {
|
|
|
449474
449481
|
return tsConfig;
|
|
449475
449482
|
}
|
|
449476
449483
|
var build = async (options8, config) => {
|
|
449484
|
+
const { writeDebug } = await import("@storm-software/config-tools");
|
|
449477
449485
|
if (Array.isArray(options8)) {
|
|
449478
449486
|
await Promise.all(options8.map((buildOptions) => build(buildOptions, config)));
|
|
449479
449487
|
} else {
|
|
@@ -449481,7 +449489,7 @@ var build = async (options8, config) => {
|
|
|
449481
449489
|
if (_isFunction2(tsupOptions)) {
|
|
449482
449490
|
tsupOptions = await Promise.resolve(tsupOptions({}));
|
|
449483
449491
|
}
|
|
449484
|
-
|
|
449492
|
+
writeDebug(
|
|
449485
449493
|
config,
|
|
449486
449494
|
`\u2699\uFE0F Tsup Build options:
|
|
449487
449495
|
${!_isFunction2(tsupOptions) ? Object.keys(tsupOptions).map(
|
|
@@ -449523,7 +449531,6 @@ var createTypeScriptCompilationOptions = (normalizedOptions, projectName) => {
|
|
|
449523
449531
|
var import_node_fs = require("node:fs");
|
|
449524
449532
|
var import_devkit3 = __toESM(require_devkit());
|
|
449525
449533
|
var import_js = __toESM(require_src6());
|
|
449526
|
-
var import_config_tools5 = require("@storm-software/config-tools");
|
|
449527
449534
|
var import_fs_extra = __toESM(require_lib5());
|
|
449528
449535
|
|
|
449529
449536
|
// node_modules/.pnpm/minimatch@9.0.3/node_modules/minimatch/dist/mjs/index.js
|
|
@@ -455705,8 +455712,8 @@ var import_fileutils = require("nx/src/utils/fileutils.js");
|
|
|
455705
455712
|
|
|
455706
455713
|
// packages/workspace-tools/src/utils/get-project-configurations.ts
|
|
455707
455714
|
var import_retrieve_workspace_files = require("nx/src/project-graph/utils/retrieve-workspace-files");
|
|
455708
|
-
var
|
|
455709
|
-
var getProjectConfigurations = () => (0, import_retrieve_workspace_files.retrieveProjectConfigurationsWithoutPluginInference)((0,
|
|
455715
|
+
var import_config_tools2 = require("@storm-software/config-tools");
|
|
455716
|
+
var getProjectConfigurations = () => (0, import_retrieve_workspace_files.retrieveProjectConfigurationsWithoutPluginInference)((0, import_config_tools2.findWorkspaceRoot)());
|
|
455710
455717
|
|
|
455711
455718
|
// packages/workspace-tools/src/utils/get-project-deps.ts
|
|
455712
455719
|
function getExtraDependencies(projectName, graph) {
|
|
@@ -455743,8 +455750,18 @@ function getExtraDependencies(projectName, graph) {
|
|
|
455743
455750
|
|
|
455744
455751
|
// packages/workspace-tools/src/executors/tsup/executor.ts
|
|
455745
455752
|
async function tsupExecutorFn(options8, context, config) {
|
|
455746
|
-
|
|
455747
|
-
|
|
455753
|
+
const {
|
|
455754
|
+
LogLevel,
|
|
455755
|
+
getLogLevel,
|
|
455756
|
+
writeDebug,
|
|
455757
|
+
writeInfo,
|
|
455758
|
+
writeSuccess,
|
|
455759
|
+
writeTrace,
|
|
455760
|
+
writeWarning,
|
|
455761
|
+
findWorkspaceRoot: findWorkspaceRoot3
|
|
455762
|
+
} = await import("@storm-software/config-tools");
|
|
455763
|
+
writeInfo(config, "\u{1F4E6} Running Storm build executor on the workspace");
|
|
455764
|
+
writeDebug(
|
|
455748
455765
|
config,
|
|
455749
455766
|
`\u2699\uFE0F Executor options:
|
|
455750
455767
|
${Object.keys(options8).map(
|
|
@@ -455757,11 +455774,11 @@ ${Object.keys(options8).map(
|
|
|
455757
455774
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
455758
455775
|
);
|
|
455759
455776
|
}
|
|
455760
|
-
const workspaceRoot = (
|
|
455777
|
+
const workspaceRoot = findWorkspaceRoot3();
|
|
455761
455778
|
const projectRoot = context.projectsConfigurations.projects[context.projectName]?.root ?? workspaceRoot;
|
|
455762
455779
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? workspaceRoot;
|
|
455763
455780
|
if (options8.clean !== false) {
|
|
455764
|
-
|
|
455781
|
+
writeInfo(config, `\u{1F9F9} Cleaning output path: ${options8.outputPath}`);
|
|
455765
455782
|
(0, import_fs_extra.removeSync)(options8.outputPath);
|
|
455766
455783
|
}
|
|
455767
455784
|
const assets = Array.from(options8.assets);
|
|
@@ -455830,13 +455847,13 @@ ${Object.keys(options8).map(
|
|
|
455830
455847
|
const implicitDependencies = context.projectsConfigurations.projects[context.projectName]?.implicitDependencies;
|
|
455831
455848
|
const internalDependencies = [];
|
|
455832
455849
|
const projectConfigs = await Promise.resolve(getProjectConfigurations());
|
|
455833
|
-
if (
|
|
455834
|
-
|
|
455850
|
+
if (getLogLevel(config?.logLevel) >= LogLevel.TRACE) {
|
|
455851
|
+
writeDebug(config, "Project Configs:");
|
|
455835
455852
|
console.log(projectConfigs);
|
|
455836
455853
|
}
|
|
455837
455854
|
if (implicitDependencies && implicitDependencies.length > 0) {
|
|
455838
455855
|
options8.external = implicitDependencies.reduce((ret, key2) => {
|
|
455839
|
-
|
|
455856
|
+
writeDebug(config, `\u26A1 Adding implicit dependency: ${key2}`);
|
|
455840
455857
|
const projectConfig = projectConfigs[key2];
|
|
455841
455858
|
if (projectConfig?.targets?.build) {
|
|
455842
455859
|
const projectPackageJson = (0, import_devkit3.readJsonFile)(projectConfig.targets?.build.options.project);
|
|
@@ -455861,7 +455878,7 @@ ${Object.keys(options8).map(
|
|
|
455861
455878
|
externalDependencies.push(thirdPartyDependency);
|
|
455862
455879
|
}
|
|
455863
455880
|
}
|
|
455864
|
-
|
|
455881
|
+
writeTrace(
|
|
455865
455882
|
config,
|
|
455866
455883
|
`Building with the following dependencies marked as external:
|
|
455867
455884
|
${externalDependencies.map((dep) => {
|
|
@@ -455888,7 +455905,7 @@ ${externalDependencies.map((dep) => {
|
|
|
455888
455905
|
while (propertyKey.startsWith("/")) {
|
|
455889
455906
|
propertyKey = propertyKey.substring(1);
|
|
455890
455907
|
}
|
|
455891
|
-
|
|
455908
|
+
writeDebug(
|
|
455892
455909
|
config,
|
|
455893
455910
|
`Trying to add entry point ${propertyKey} at "${(0, import_devkit3.joinPathFragments)(
|
|
455894
455911
|
filePath.path,
|
|
@@ -456008,10 +456025,10 @@ ${externalDependencies.map((dep) => {
|
|
|
456008
456025
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
456009
456026
|
packageJson.repository.directory ??= projectRoot ? projectRoot : (0, import_devkit3.joinPathFragments)("packages", context.projectName);
|
|
456010
456027
|
const packageJsonPath = (0, import_devkit3.joinPathFragments)(context.root, options8.outputPath, "package.json");
|
|
456011
|
-
|
|
456028
|
+
writeDebug(config, `\u26A1 Writing package.json file to: ${packageJsonPath}`);
|
|
456012
456029
|
(0, import_node_fs.writeFileSync)(packageJsonPath, JSON.stringify(packageJson));
|
|
456013
456030
|
} else {
|
|
456014
|
-
|
|
456031
|
+
writeWarning(config, "Skipping writing to package.json file");
|
|
456015
456032
|
}
|
|
456016
456033
|
if (options8.includeSrc === true) {
|
|
456017
456034
|
const files = globSync([
|
|
@@ -456047,7 +456064,7 @@ ${(0, import_node_fs.readFileSync)(file, "utf-8")}`,
|
|
|
456047
456064
|
)
|
|
456048
456065
|
)
|
|
456049
456066
|
);
|
|
456050
|
-
|
|
456067
|
+
writeSuccess(config, "\u26A1 The Build process has completed successfully");
|
|
456051
456068
|
return {
|
|
456052
456069
|
success: true
|
|
456053
456070
|
};
|