@storm-software/workspace-tools 1.62.7 → 1.62.9
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/declarations.d.ts +1 -1
- package/index.js +47 -42
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/base/index.js +22 -19
- package/src/executors/tsup/executor.js +26 -22
- package/src/executors/tsup-browser/executor.js +26 -22
- package/src/executors/tsup-neutral/executor.js +26 -22
- package/src/executors/tsup-node/executor.js +26 -22
- package/src/executors/typia/executor.js +22 -20
- package/src/generators/browser-library/generator.js +16 -14
- package/src/generators/config-schema/generator.js +22 -18
- package/src/generators/neutral-library/generator.js +16 -14
- package/src/generators/node-library/generator.js +16 -14
- package/src/generators/preset/generator.js +16 -14
- package/src/generators/release-version/generator.js +23 -21
- package/src/utils/index.js +24 -19
package/src/utils/index.js
CHANGED
|
@@ -459217,8 +459217,7 @@ __export(utils_exports, {
|
|
|
459217
459217
|
module.exports = __toCommonJS(utils_exports);
|
|
459218
459218
|
|
|
459219
459219
|
// packages/workspace-tools/src/utils/apply-workspace-tokens.ts
|
|
459220
|
-
var
|
|
459221
|
-
var applyWorkspaceExecutorTokens = (option, tokenizerOptions) => {
|
|
459220
|
+
var applyWorkspaceExecutorTokens = async (option, tokenizerOptions) => {
|
|
459222
459221
|
let result = option;
|
|
459223
459222
|
if (!result) {
|
|
459224
459223
|
return result;
|
|
@@ -459261,14 +459260,15 @@ var applyWorkspaceExecutorTokens = (option, tokenizerOptions) => {
|
|
|
459261
459260
|
result = result.replaceAll("{sourceRoot}", sourceRoot);
|
|
459262
459261
|
}
|
|
459263
459262
|
if (result.includes("{workspaceRoot}")) {
|
|
459263
|
+
const { findWorkspaceRoot } = await import("@storm-software/config-tools");
|
|
459264
459264
|
result = result.replaceAll(
|
|
459265
459265
|
"{workspaceRoot}",
|
|
459266
|
-
tokenizerOptions.workspaceRoot ??
|
|
459266
|
+
tokenizerOptions.workspaceRoot ?? findWorkspaceRoot()
|
|
459267
459267
|
);
|
|
459268
459268
|
}
|
|
459269
459269
|
return result;
|
|
459270
459270
|
};
|
|
459271
|
-
var applyWorkspaceGeneratorTokens = (option, tokenizerOptions) => {
|
|
459271
|
+
var applyWorkspaceGeneratorTokens = async (option, tokenizerOptions) => {
|
|
459272
459272
|
let result = option;
|
|
459273
459273
|
if (!result) {
|
|
459274
459274
|
return result;
|
|
@@ -459284,30 +459284,33 @@ var applyWorkspaceGeneratorTokens = (option, tokenizerOptions) => {
|
|
|
459284
459284
|
}
|
|
459285
459285
|
}
|
|
459286
459286
|
if (result.includes("{workspaceRoot}")) {
|
|
459287
|
+
const { findWorkspaceRoot } = await import("@storm-software/config-tools");
|
|
459287
459288
|
result = result.replaceAll(
|
|
459288
459289
|
"{workspaceRoot}",
|
|
459289
|
-
tokenizerOptions.workspaceRoot ?? tokenizerOptions.config?.workspaceRoot ??
|
|
459290
|
+
tokenizerOptions.workspaceRoot ?? tokenizerOptions.config?.workspaceRoot ?? findWorkspaceRoot()
|
|
459290
459291
|
);
|
|
459291
459292
|
}
|
|
459292
459293
|
return result;
|
|
459293
459294
|
};
|
|
459294
|
-
var applyWorkspaceTokens = (options8, config, tokenizerFn) => {
|
|
459295
|
-
|
|
459296
|
-
if (!result) {
|
|
459295
|
+
var applyWorkspaceTokens = async (options8, config, tokenizerFn) => {
|
|
459296
|
+
if (!options8) {
|
|
459297
459297
|
return {};
|
|
459298
459298
|
}
|
|
459299
|
-
|
|
459299
|
+
const result = {};
|
|
459300
|
+
for (const option of Object.keys(options8)) {
|
|
459300
459301
|
if (typeof options8[option] === "string") {
|
|
459301
|
-
|
|
459302
|
+
result[option] = await Promise.resolve(tokenizerFn(options8[option], config));
|
|
459302
459303
|
} else if (Array.isArray(options8[option])) {
|
|
459303
|
-
|
|
459304
|
-
(
|
|
459304
|
+
result[option] = await Promise.all(
|
|
459305
|
+
options8[option].map(
|
|
459306
|
+
async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, config)) : item
|
|
459307
|
+
)
|
|
459305
459308
|
);
|
|
459306
459309
|
} else if (typeof options8[option] === "object") {
|
|
459307
|
-
|
|
459310
|
+
result[option] = await applyWorkspaceTokens(options8[option], config, tokenizerFn);
|
|
459308
459311
|
}
|
|
459309
|
-
|
|
459310
|
-
|
|
459312
|
+
}
|
|
459313
|
+
return result;
|
|
459311
459314
|
};
|
|
459312
459315
|
|
|
459313
459316
|
// packages/workspace-tools/src/utils/file-path-utils.ts
|
|
@@ -459358,8 +459361,10 @@ ${commentStart} ----------------------------------------------------------------
|
|
|
459358
459361
|
|
|
459359
459362
|
// packages/workspace-tools/src/utils/get-project-configurations.ts
|
|
459360
459363
|
var import_retrieve_workspace_files = require("nx/src/project-graph/utils/retrieve-workspace-files");
|
|
459361
|
-
var
|
|
459362
|
-
|
|
459364
|
+
var getProjectConfigurations = async () => {
|
|
459365
|
+
const { findWorkspaceRoot } = await import("@storm-software/config-tools");
|
|
459366
|
+
return (0, import_retrieve_workspace_files.retrieveProjectConfigurationsWithoutPluginInference)(findWorkspaceRoot());
|
|
459367
|
+
};
|
|
459363
459368
|
var getProjectConfiguration = (projectName) => getProjectConfigurations()?.[projectName];
|
|
459364
459369
|
|
|
459365
459370
|
// packages/workspace-tools/src/utils/get-project-deps.ts
|
|
@@ -459635,8 +459640,8 @@ var applyDefaultOptions = (options8) => {
|
|
|
459635
459640
|
return options8;
|
|
459636
459641
|
};
|
|
459637
459642
|
var runTsupBuild = async (context, config, options8) => {
|
|
459638
|
-
const { LogLevel, getLogLevel, writeInfo, writeWarning, findWorkspaceRoot
|
|
459639
|
-
const workspaceRoot = config?.workspaceRoot ??
|
|
459643
|
+
const { LogLevel, getLogLevel, writeInfo, writeWarning, findWorkspaceRoot } = await import("@storm-software/config-tools");
|
|
459644
|
+
const workspaceRoot = config?.workspaceRoot ?? findWorkspaceRoot();
|
|
459640
459645
|
const stormEnv = Object.keys(options8.env ?? {}).filter((key2) => key2.startsWith("STORM_")).reduce((ret, key2) => {
|
|
459641
459646
|
ret[key2] = options8.env?.[key2];
|
|
459642
459647
|
return ret;
|