@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/package.json
CHANGED
package/src/base/index.js
CHANGED
|
@@ -391230,8 +391230,7 @@ __export(base_exports, {
|
|
|
391230
391230
|
module.exports = __toCommonJS(base_exports);
|
|
391231
391231
|
|
|
391232
391232
|
// packages/workspace-tools/src/utils/apply-workspace-tokens.ts
|
|
391233
|
-
var
|
|
391234
|
-
var applyWorkspaceExecutorTokens = (option, tokenizerOptions) => {
|
|
391233
|
+
var applyWorkspaceExecutorTokens = async (option, tokenizerOptions) => {
|
|
391235
391234
|
let result = option;
|
|
391236
391235
|
if (!result) {
|
|
391237
391236
|
return result;
|
|
@@ -391274,14 +391273,15 @@ var applyWorkspaceExecutorTokens = (option, tokenizerOptions) => {
|
|
|
391274
391273
|
result = result.replaceAll("{sourceRoot}", sourceRoot);
|
|
391275
391274
|
}
|
|
391276
391275
|
if (result.includes("{workspaceRoot}")) {
|
|
391276
|
+
const { findWorkspaceRoot } = await import("@storm-software/config-tools");
|
|
391277
391277
|
result = result.replaceAll(
|
|
391278
391278
|
"{workspaceRoot}",
|
|
391279
|
-
tokenizerOptions.workspaceRoot ??
|
|
391279
|
+
tokenizerOptions.workspaceRoot ?? findWorkspaceRoot()
|
|
391280
391280
|
);
|
|
391281
391281
|
}
|
|
391282
391282
|
return result;
|
|
391283
391283
|
};
|
|
391284
|
-
var applyWorkspaceGeneratorTokens = (option, tokenizerOptions) => {
|
|
391284
|
+
var applyWorkspaceGeneratorTokens = async (option, tokenizerOptions) => {
|
|
391285
391285
|
let result = option;
|
|
391286
391286
|
if (!result) {
|
|
391287
391287
|
return result;
|
|
@@ -391297,30 +391297,33 @@ var applyWorkspaceGeneratorTokens = (option, tokenizerOptions) => {
|
|
|
391297
391297
|
}
|
|
391298
391298
|
}
|
|
391299
391299
|
if (result.includes("{workspaceRoot}")) {
|
|
391300
|
+
const { findWorkspaceRoot } = await import("@storm-software/config-tools");
|
|
391300
391301
|
result = result.replaceAll(
|
|
391301
391302
|
"{workspaceRoot}",
|
|
391302
|
-
tokenizerOptions.workspaceRoot ?? tokenizerOptions.config?.workspaceRoot ??
|
|
391303
|
+
tokenizerOptions.workspaceRoot ?? tokenizerOptions.config?.workspaceRoot ?? findWorkspaceRoot()
|
|
391303
391304
|
);
|
|
391304
391305
|
}
|
|
391305
391306
|
return result;
|
|
391306
391307
|
};
|
|
391307
|
-
var applyWorkspaceTokens = (options8, config, tokenizerFn) => {
|
|
391308
|
-
|
|
391309
|
-
if (!result) {
|
|
391308
|
+
var applyWorkspaceTokens = async (options8, config, tokenizerFn) => {
|
|
391309
|
+
if (!options8) {
|
|
391310
391310
|
return {};
|
|
391311
391311
|
}
|
|
391312
|
-
|
|
391312
|
+
const result = {};
|
|
391313
|
+
for (const option of Object.keys(options8)) {
|
|
391313
391314
|
if (typeof options8[option] === "string") {
|
|
391314
|
-
|
|
391315
|
+
result[option] = await Promise.resolve(tokenizerFn(options8[option], config));
|
|
391315
391316
|
} else if (Array.isArray(options8[option])) {
|
|
391316
|
-
|
|
391317
|
-
(
|
|
391317
|
+
result[option] = await Promise.all(
|
|
391318
|
+
options8[option].map(
|
|
391319
|
+
async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, config)) : item
|
|
391320
|
+
)
|
|
391318
391321
|
);
|
|
391319
391322
|
} else if (typeof options8[option] === "object") {
|
|
391320
|
-
|
|
391323
|
+
result[option] = await applyWorkspaceTokens(options8[option], config, tokenizerFn);
|
|
391321
391324
|
}
|
|
391322
|
-
|
|
391323
|
-
|
|
391325
|
+
}
|
|
391326
|
+
return result;
|
|
391324
391327
|
};
|
|
391325
391328
|
|
|
391326
391329
|
// packages/workspace-tools/src/base/base-executor.ts
|
|
@@ -391333,7 +391336,7 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
|
|
|
391333
391336
|
writeInfo,
|
|
391334
391337
|
writeSuccess,
|
|
391335
391338
|
writeTrace,
|
|
391336
|
-
findWorkspaceRoot
|
|
391339
|
+
findWorkspaceRoot,
|
|
391337
391340
|
loadStormConfig
|
|
391338
391341
|
} = await import("@storm-software/config-tools");
|
|
391339
391342
|
const stopwatch = getStopwatch(name);
|
|
@@ -391347,7 +391350,7 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
|
|
|
391347
391350
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
391348
391351
|
);
|
|
391349
391352
|
}
|
|
391350
|
-
const workspaceRoot =
|
|
391353
|
+
const workspaceRoot = findWorkspaceRoot();
|
|
391351
391354
|
const projectRoot = context.projectsConfigurations.projects[context.projectName]?.root ?? workspaceRoot;
|
|
391352
391355
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? workspaceRoot;
|
|
391353
391356
|
const projectName = context.projectsConfigurations.projects[context.projectName]?.name ?? context.projectName;
|
|
@@ -391382,7 +391385,7 @@ ${Object.keys(options8).map(
|
|
|
391382
391385
|
(key2) => ` - ${key2}=${_isFunction(options8[key2]) ? "<function>" : JSON.stringify(options8[key2])}`
|
|
391383
391386
|
).join("\n")}`
|
|
391384
391387
|
);
|
|
391385
|
-
const tokenized = applyWorkspaceTokens(
|
|
391388
|
+
const tokenized = await applyWorkspaceTokens(
|
|
391386
391389
|
options8,
|
|
391387
391390
|
{
|
|
391388
391391
|
config,
|
|
@@ -391490,7 +391493,7 @@ ${Object.keys(process.env).map((key2) => ` - ${key2}=${JSON.stringify(process.en
|
|
|
391490
391493
|
`Generator schema options \u2699\uFE0F
|
|
391491
391494
|
${Object.keys(options8 ?? {}).map((key2) => ` - ${key2}=${JSON.stringify(options8[key2])}`).join("\n")}`
|
|
391492
391495
|
);
|
|
391493
|
-
const tokenized = applyWorkspaceTokens(
|
|
391496
|
+
const tokenized = await applyWorkspaceTokens(
|
|
391494
391497
|
options8,
|
|
391495
391498
|
{ workspaceRoot: tree.root, config },
|
|
391496
391499
|
applyWorkspaceGeneratorTokens
|
|
@@ -455128,8 +455128,7 @@ glob.glob = glob;
|
|
|
455128
455128
|
var import_fileutils = require("nx/src/utils/fileutils.js");
|
|
455129
455129
|
|
|
455130
455130
|
// packages/workspace-tools/src/utils/apply-workspace-tokens.ts
|
|
455131
|
-
var
|
|
455132
|
-
var applyWorkspaceExecutorTokens = (option, tokenizerOptions) => {
|
|
455131
|
+
var applyWorkspaceExecutorTokens = async (option, tokenizerOptions) => {
|
|
455133
455132
|
let result = option;
|
|
455134
455133
|
if (!result) {
|
|
455135
455134
|
return result;
|
|
@@ -455172,30 +455171,33 @@ var applyWorkspaceExecutorTokens = (option, tokenizerOptions) => {
|
|
|
455172
455171
|
result = result.replaceAll("{sourceRoot}", sourceRoot);
|
|
455173
455172
|
}
|
|
455174
455173
|
if (result.includes("{workspaceRoot}")) {
|
|
455174
|
+
const { findWorkspaceRoot } = await import("@storm-software/config-tools");
|
|
455175
455175
|
result = result.replaceAll(
|
|
455176
455176
|
"{workspaceRoot}",
|
|
455177
|
-
tokenizerOptions.workspaceRoot ??
|
|
455177
|
+
tokenizerOptions.workspaceRoot ?? findWorkspaceRoot()
|
|
455178
455178
|
);
|
|
455179
455179
|
}
|
|
455180
455180
|
return result;
|
|
455181
455181
|
};
|
|
455182
|
-
var applyWorkspaceTokens = (options8, config, tokenizerFn) => {
|
|
455183
|
-
|
|
455184
|
-
if (!result) {
|
|
455182
|
+
var applyWorkspaceTokens = async (options8, config, tokenizerFn) => {
|
|
455183
|
+
if (!options8) {
|
|
455185
455184
|
return {};
|
|
455186
455185
|
}
|
|
455187
|
-
|
|
455186
|
+
const result = {};
|
|
455187
|
+
for (const option of Object.keys(options8)) {
|
|
455188
455188
|
if (typeof options8[option] === "string") {
|
|
455189
|
-
|
|
455189
|
+
result[option] = await Promise.resolve(tokenizerFn(options8[option], config));
|
|
455190
455190
|
} else if (Array.isArray(options8[option])) {
|
|
455191
|
-
|
|
455192
|
-
(
|
|
455191
|
+
result[option] = await Promise.all(
|
|
455192
|
+
options8[option].map(
|
|
455193
|
+
async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, config)) : item
|
|
455194
|
+
)
|
|
455193
455195
|
);
|
|
455194
455196
|
} else if (typeof options8[option] === "object") {
|
|
455195
|
-
|
|
455197
|
+
result[option] = await applyWorkspaceTokens(options8[option], config, tokenizerFn);
|
|
455196
455198
|
}
|
|
455197
|
-
|
|
455198
|
-
|
|
455199
|
+
}
|
|
455200
|
+
return result;
|
|
455199
455201
|
};
|
|
455200
455202
|
|
|
455201
455203
|
// packages/workspace-tools/src/base/base-executor.ts
|
|
@@ -455208,7 +455210,7 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
|
|
|
455208
455210
|
writeInfo,
|
|
455209
455211
|
writeSuccess,
|
|
455210
455212
|
writeTrace,
|
|
455211
|
-
findWorkspaceRoot
|
|
455213
|
+
findWorkspaceRoot,
|
|
455212
455214
|
loadStormConfig
|
|
455213
455215
|
} = await import("@storm-software/config-tools");
|
|
455214
455216
|
const stopwatch = getStopwatch(name);
|
|
@@ -455222,7 +455224,7 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
|
|
|
455222
455224
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
455223
455225
|
);
|
|
455224
455226
|
}
|
|
455225
|
-
const workspaceRoot =
|
|
455227
|
+
const workspaceRoot = findWorkspaceRoot();
|
|
455226
455228
|
const projectRoot = context.projectsConfigurations.projects[context.projectName]?.root ?? workspaceRoot;
|
|
455227
455229
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? workspaceRoot;
|
|
455228
455230
|
const projectName = context.projectsConfigurations.projects[context.projectName]?.name ?? context.projectName;
|
|
@@ -455257,7 +455259,7 @@ ${Object.keys(options8).map(
|
|
|
455257
455259
|
(key2) => ` - ${key2}=${_isFunction(options8[key2]) ? "<function>" : JSON.stringify(options8[key2])}`
|
|
455258
455260
|
).join("\n")}`
|
|
455259
455261
|
);
|
|
455260
|
-
const tokenized = applyWorkspaceTokens(
|
|
455262
|
+
const tokenized = await applyWorkspaceTokens(
|
|
455261
455263
|
options8,
|
|
455262
455264
|
{
|
|
455263
455265
|
config,
|
|
@@ -455331,8 +455333,10 @@ var removeExtension = (filePath) => {
|
|
|
455331
455333
|
|
|
455332
455334
|
// packages/workspace-tools/src/utils/get-project-configurations.ts
|
|
455333
455335
|
var import_retrieve_workspace_files = require("nx/src/project-graph/utils/retrieve-workspace-files");
|
|
455334
|
-
var
|
|
455335
|
-
|
|
455336
|
+
var getProjectConfigurations = async () => {
|
|
455337
|
+
const { findWorkspaceRoot } = await import("@storm-software/config-tools");
|
|
455338
|
+
return (0, import_retrieve_workspace_files.retrieveProjectConfigurationsWithoutPluginInference)(findWorkspaceRoot());
|
|
455339
|
+
};
|
|
455336
455340
|
|
|
455337
455341
|
// packages/workspace-tools/src/utils/get-project-deps.ts
|
|
455338
455342
|
function getExtraDependencies(projectName, graph) {
|
|
@@ -455561,8 +455565,8 @@ var applyDefaultOptions = (options8) => {
|
|
|
455561
455565
|
return options8;
|
|
455562
455566
|
};
|
|
455563
455567
|
var runTsupBuild = async (context, config, options8) => {
|
|
455564
|
-
const { LogLevel, getLogLevel, writeInfo, writeWarning, findWorkspaceRoot
|
|
455565
|
-
const workspaceRoot = config?.workspaceRoot ??
|
|
455568
|
+
const { LogLevel, getLogLevel, writeInfo, writeWarning, findWorkspaceRoot } = await import("@storm-software/config-tools");
|
|
455569
|
+
const workspaceRoot = config?.workspaceRoot ?? findWorkspaceRoot();
|
|
455566
455570
|
const stormEnv = Object.keys(options8.env ?? {}).filter((key2) => key2.startsWith("STORM_")).reduce((ret, key2) => {
|
|
455567
455571
|
ret[key2] = options8.env?.[key2];
|
|
455568
455572
|
return ret;
|
|
@@ -455726,7 +455730,7 @@ async function tsupExecutorFn(options8, context, config) {
|
|
|
455726
455730
|
writeSuccess,
|
|
455727
455731
|
writeTrace,
|
|
455728
455732
|
writeWarning,
|
|
455729
|
-
findWorkspaceRoot
|
|
455733
|
+
findWorkspaceRoot
|
|
455730
455734
|
} = await import("@storm-software/config-tools");
|
|
455731
455735
|
writeInfo(config, "\u{1F4E6} Running Storm build executor on the workspace");
|
|
455732
455736
|
writeDebug(
|
|
@@ -455742,7 +455746,7 @@ ${Object.keys(options8).map(
|
|
|
455742
455746
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
455743
455747
|
);
|
|
455744
455748
|
}
|
|
455745
|
-
const workspaceRoot =
|
|
455749
|
+
const workspaceRoot = findWorkspaceRoot();
|
|
455746
455750
|
const projectRoot = context.projectsConfigurations.projects[context.projectName]?.root ?? workspaceRoot;
|
|
455747
455751
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? workspaceRoot;
|
|
455748
455752
|
if (options8.clean !== false) {
|
|
@@ -448947,8 +448947,7 @@ __export(executor_exports, {
|
|
|
448947
448947
|
module.exports = __toCommonJS(executor_exports);
|
|
448948
448948
|
|
|
448949
448949
|
// packages/workspace-tools/src/utils/apply-workspace-tokens.ts
|
|
448950
|
-
var
|
|
448951
|
-
var applyWorkspaceExecutorTokens = (option, tokenizerOptions) => {
|
|
448950
|
+
var applyWorkspaceExecutorTokens = async (option, tokenizerOptions) => {
|
|
448952
448951
|
let result = option;
|
|
448953
448952
|
if (!result) {
|
|
448954
448953
|
return result;
|
|
@@ -448991,30 +448990,33 @@ var applyWorkspaceExecutorTokens = (option, tokenizerOptions) => {
|
|
|
448991
448990
|
result = result.replaceAll("{sourceRoot}", sourceRoot);
|
|
448992
448991
|
}
|
|
448993
448992
|
if (result.includes("{workspaceRoot}")) {
|
|
448993
|
+
const { findWorkspaceRoot } = await import("@storm-software/config-tools");
|
|
448994
448994
|
result = result.replaceAll(
|
|
448995
448995
|
"{workspaceRoot}",
|
|
448996
|
-
tokenizerOptions.workspaceRoot ??
|
|
448996
|
+
tokenizerOptions.workspaceRoot ?? findWorkspaceRoot()
|
|
448997
448997
|
);
|
|
448998
448998
|
}
|
|
448999
448999
|
return result;
|
|
449000
449000
|
};
|
|
449001
|
-
var applyWorkspaceTokens = (options8, config, tokenizerFn) => {
|
|
449002
|
-
|
|
449003
|
-
if (!result) {
|
|
449001
|
+
var applyWorkspaceTokens = async (options8, config, tokenizerFn) => {
|
|
449002
|
+
if (!options8) {
|
|
449004
449003
|
return {};
|
|
449005
449004
|
}
|
|
449006
|
-
|
|
449005
|
+
const result = {};
|
|
449006
|
+
for (const option of Object.keys(options8)) {
|
|
449007
449007
|
if (typeof options8[option] === "string") {
|
|
449008
|
-
|
|
449008
|
+
result[option] = await Promise.resolve(tokenizerFn(options8[option], config));
|
|
449009
449009
|
} else if (Array.isArray(options8[option])) {
|
|
449010
|
-
|
|
449011
|
-
(
|
|
449010
|
+
result[option] = await Promise.all(
|
|
449011
|
+
options8[option].map(
|
|
449012
|
+
async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, config)) : item
|
|
449013
|
+
)
|
|
449012
449014
|
);
|
|
449013
449015
|
} else if (typeof options8[option] === "object") {
|
|
449014
|
-
|
|
449016
|
+
result[option] = await applyWorkspaceTokens(options8[option], config, tokenizerFn);
|
|
449015
449017
|
}
|
|
449016
|
-
|
|
449017
|
-
|
|
449018
|
+
}
|
|
449019
|
+
return result;
|
|
449018
449020
|
};
|
|
449019
449021
|
|
|
449020
449022
|
// packages/workspace-tools/src/base/base-executor.ts
|
|
@@ -449027,7 +449029,7 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
|
|
|
449027
449029
|
writeInfo,
|
|
449028
449030
|
writeSuccess,
|
|
449029
449031
|
writeTrace,
|
|
449030
|
-
findWorkspaceRoot
|
|
449032
|
+
findWorkspaceRoot,
|
|
449031
449033
|
loadStormConfig
|
|
449032
449034
|
} = await import("@storm-software/config-tools");
|
|
449033
449035
|
const stopwatch = getStopwatch(name);
|
|
@@ -449041,7 +449043,7 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
|
|
|
449041
449043
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
449042
449044
|
);
|
|
449043
449045
|
}
|
|
449044
|
-
const workspaceRoot =
|
|
449046
|
+
const workspaceRoot = findWorkspaceRoot();
|
|
449045
449047
|
const projectRoot = context.projectsConfigurations.projects[context.projectName]?.root ?? workspaceRoot;
|
|
449046
449048
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? workspaceRoot;
|
|
449047
449049
|
const projectName = context.projectsConfigurations.projects[context.projectName]?.name ?? context.projectName;
|
|
@@ -449076,7 +449078,7 @@ ${Object.keys(options8).map(
|
|
|
449076
449078
|
(key2) => ` - ${key2}=${_isFunction(options8[key2]) ? "<function>" : JSON.stringify(options8[key2])}`
|
|
449077
449079
|
).join("\n")}`
|
|
449078
449080
|
);
|
|
449079
|
-
const tokenized = applyWorkspaceTokens(
|
|
449081
|
+
const tokenized = await applyWorkspaceTokens(
|
|
449080
449082
|
options8,
|
|
449081
449083
|
{
|
|
449082
449084
|
config,
|
|
@@ -449372,8 +449374,8 @@ var applyDefaultOptions = (options8) => {
|
|
|
449372
449374
|
return options8;
|
|
449373
449375
|
};
|
|
449374
449376
|
var runTsupBuild = async (context, config, options8) => {
|
|
449375
|
-
const { LogLevel, getLogLevel, writeInfo, writeWarning, findWorkspaceRoot
|
|
449376
|
-
const workspaceRoot = config?.workspaceRoot ??
|
|
449377
|
+
const { LogLevel, getLogLevel, writeInfo, writeWarning, findWorkspaceRoot } = await import("@storm-software/config-tools");
|
|
449378
|
+
const workspaceRoot = config?.workspaceRoot ?? findWorkspaceRoot();
|
|
449377
449379
|
const stormEnv = Object.keys(options8.env ?? {}).filter((key2) => key2.startsWith("STORM_")).reduce((ret, key2) => {
|
|
449378
449380
|
ret[key2] = options8.env?.[key2];
|
|
449379
449381
|
return ret;
|
|
@@ -455712,8 +455714,10 @@ var import_fileutils = require("nx/src/utils/fileutils.js");
|
|
|
455712
455714
|
|
|
455713
455715
|
// packages/workspace-tools/src/utils/get-project-configurations.ts
|
|
455714
455716
|
var import_retrieve_workspace_files = require("nx/src/project-graph/utils/retrieve-workspace-files");
|
|
455715
|
-
var
|
|
455716
|
-
|
|
455717
|
+
var getProjectConfigurations = async () => {
|
|
455718
|
+
const { findWorkspaceRoot } = await import("@storm-software/config-tools");
|
|
455719
|
+
return (0, import_retrieve_workspace_files.retrieveProjectConfigurationsWithoutPluginInference)(findWorkspaceRoot());
|
|
455720
|
+
};
|
|
455717
455721
|
|
|
455718
455722
|
// packages/workspace-tools/src/utils/get-project-deps.ts
|
|
455719
455723
|
function getExtraDependencies(projectName, graph) {
|
|
@@ -455758,7 +455762,7 @@ async function tsupExecutorFn(options8, context, config) {
|
|
|
455758
455762
|
writeSuccess,
|
|
455759
455763
|
writeTrace,
|
|
455760
455764
|
writeWarning,
|
|
455761
|
-
findWorkspaceRoot
|
|
455765
|
+
findWorkspaceRoot
|
|
455762
455766
|
} = await import("@storm-software/config-tools");
|
|
455763
455767
|
writeInfo(config, "\u{1F4E6} Running Storm build executor on the workspace");
|
|
455764
455768
|
writeDebug(
|
|
@@ -455774,7 +455778,7 @@ ${Object.keys(options8).map(
|
|
|
455774
455778
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
455775
455779
|
);
|
|
455776
455780
|
}
|
|
455777
|
-
const workspaceRoot =
|
|
455781
|
+
const workspaceRoot = findWorkspaceRoot();
|
|
455778
455782
|
const projectRoot = context.projectsConfigurations.projects[context.projectName]?.root ?? workspaceRoot;
|
|
455779
455783
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? workspaceRoot;
|
|
455780
455784
|
if (options8.clean !== false) {
|
|
@@ -448947,8 +448947,7 @@ __export(executor_exports, {
|
|
|
448947
448947
|
module.exports = __toCommonJS(executor_exports);
|
|
448948
448948
|
|
|
448949
448949
|
// packages/workspace-tools/src/utils/apply-workspace-tokens.ts
|
|
448950
|
-
var
|
|
448951
|
-
var applyWorkspaceExecutorTokens = (option, tokenizerOptions) => {
|
|
448950
|
+
var applyWorkspaceExecutorTokens = async (option, tokenizerOptions) => {
|
|
448952
448951
|
let result = option;
|
|
448953
448952
|
if (!result) {
|
|
448954
448953
|
return result;
|
|
@@ -448991,30 +448990,33 @@ var applyWorkspaceExecutorTokens = (option, tokenizerOptions) => {
|
|
|
448991
448990
|
result = result.replaceAll("{sourceRoot}", sourceRoot);
|
|
448992
448991
|
}
|
|
448993
448992
|
if (result.includes("{workspaceRoot}")) {
|
|
448993
|
+
const { findWorkspaceRoot } = await import("@storm-software/config-tools");
|
|
448994
448994
|
result = result.replaceAll(
|
|
448995
448995
|
"{workspaceRoot}",
|
|
448996
|
-
tokenizerOptions.workspaceRoot ??
|
|
448996
|
+
tokenizerOptions.workspaceRoot ?? findWorkspaceRoot()
|
|
448997
448997
|
);
|
|
448998
448998
|
}
|
|
448999
448999
|
return result;
|
|
449000
449000
|
};
|
|
449001
|
-
var applyWorkspaceTokens = (options8, config, tokenizerFn) => {
|
|
449002
|
-
|
|
449003
|
-
if (!result) {
|
|
449001
|
+
var applyWorkspaceTokens = async (options8, config, tokenizerFn) => {
|
|
449002
|
+
if (!options8) {
|
|
449004
449003
|
return {};
|
|
449005
449004
|
}
|
|
449006
|
-
|
|
449005
|
+
const result = {};
|
|
449006
|
+
for (const option of Object.keys(options8)) {
|
|
449007
449007
|
if (typeof options8[option] === "string") {
|
|
449008
|
-
|
|
449008
|
+
result[option] = await Promise.resolve(tokenizerFn(options8[option], config));
|
|
449009
449009
|
} else if (Array.isArray(options8[option])) {
|
|
449010
|
-
|
|
449011
|
-
(
|
|
449010
|
+
result[option] = await Promise.all(
|
|
449011
|
+
options8[option].map(
|
|
449012
|
+
async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, config)) : item
|
|
449013
|
+
)
|
|
449012
449014
|
);
|
|
449013
449015
|
} else if (typeof options8[option] === "object") {
|
|
449014
|
-
|
|
449016
|
+
result[option] = await applyWorkspaceTokens(options8[option], config, tokenizerFn);
|
|
449015
449017
|
}
|
|
449016
|
-
|
|
449017
|
-
|
|
449018
|
+
}
|
|
449019
|
+
return result;
|
|
449018
449020
|
};
|
|
449019
449021
|
|
|
449020
449022
|
// packages/workspace-tools/src/base/base-executor.ts
|
|
@@ -449027,7 +449029,7 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
|
|
|
449027
449029
|
writeInfo,
|
|
449028
449030
|
writeSuccess,
|
|
449029
449031
|
writeTrace,
|
|
449030
|
-
findWorkspaceRoot
|
|
449032
|
+
findWorkspaceRoot,
|
|
449031
449033
|
loadStormConfig
|
|
449032
449034
|
} = await import("@storm-software/config-tools");
|
|
449033
449035
|
const stopwatch = getStopwatch(name);
|
|
@@ -449041,7 +449043,7 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
|
|
|
449041
449043
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
449042
449044
|
);
|
|
449043
449045
|
}
|
|
449044
|
-
const workspaceRoot =
|
|
449046
|
+
const workspaceRoot = findWorkspaceRoot();
|
|
449045
449047
|
const projectRoot = context.projectsConfigurations.projects[context.projectName]?.root ?? workspaceRoot;
|
|
449046
449048
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? workspaceRoot;
|
|
449047
449049
|
const projectName = context.projectsConfigurations.projects[context.projectName]?.name ?? context.projectName;
|
|
@@ -449076,7 +449078,7 @@ ${Object.keys(options8).map(
|
|
|
449076
449078
|
(key2) => ` - ${key2}=${_isFunction(options8[key2]) ? "<function>" : JSON.stringify(options8[key2])}`
|
|
449077
449079
|
).join("\n")}`
|
|
449078
449080
|
);
|
|
449079
|
-
const tokenized = applyWorkspaceTokens(
|
|
449081
|
+
const tokenized = await applyWorkspaceTokens(
|
|
449080
449082
|
options8,
|
|
449081
449083
|
{
|
|
449082
449084
|
config,
|
|
@@ -449372,8 +449374,8 @@ var applyDefaultOptions = (options8) => {
|
|
|
449372
449374
|
return options8;
|
|
449373
449375
|
};
|
|
449374
449376
|
var runTsupBuild = async (context, config, options8) => {
|
|
449375
|
-
const { LogLevel, getLogLevel, writeInfo, writeWarning, findWorkspaceRoot
|
|
449376
|
-
const workspaceRoot = config?.workspaceRoot ??
|
|
449377
|
+
const { LogLevel, getLogLevel, writeInfo, writeWarning, findWorkspaceRoot } = await import("@storm-software/config-tools");
|
|
449378
|
+
const workspaceRoot = config?.workspaceRoot ?? findWorkspaceRoot();
|
|
449377
449379
|
const stormEnv = Object.keys(options8.env ?? {}).filter((key2) => key2.startsWith("STORM_")).reduce((ret, key2) => {
|
|
449378
449380
|
ret[key2] = options8.env?.[key2];
|
|
449379
449381
|
return ret;
|
|
@@ -455712,8 +455714,10 @@ var import_fileutils = require("nx/src/utils/fileutils.js");
|
|
|
455712
455714
|
|
|
455713
455715
|
// packages/workspace-tools/src/utils/get-project-configurations.ts
|
|
455714
455716
|
var import_retrieve_workspace_files = require("nx/src/project-graph/utils/retrieve-workspace-files");
|
|
455715
|
-
var
|
|
455716
|
-
|
|
455717
|
+
var getProjectConfigurations = async () => {
|
|
455718
|
+
const { findWorkspaceRoot } = await import("@storm-software/config-tools");
|
|
455719
|
+
return (0, import_retrieve_workspace_files.retrieveProjectConfigurationsWithoutPluginInference)(findWorkspaceRoot());
|
|
455720
|
+
};
|
|
455717
455721
|
|
|
455718
455722
|
// packages/workspace-tools/src/utils/get-project-deps.ts
|
|
455719
455723
|
function getExtraDependencies(projectName, graph) {
|
|
@@ -455758,7 +455762,7 @@ async function tsupExecutorFn(options8, context, config) {
|
|
|
455758
455762
|
writeSuccess,
|
|
455759
455763
|
writeTrace,
|
|
455760
455764
|
writeWarning,
|
|
455761
|
-
findWorkspaceRoot
|
|
455765
|
+
findWorkspaceRoot
|
|
455762
455766
|
} = await import("@storm-software/config-tools");
|
|
455763
455767
|
writeInfo(config, "\u{1F4E6} Running Storm build executor on the workspace");
|
|
455764
455768
|
writeDebug(
|
|
@@ -455774,7 +455778,7 @@ ${Object.keys(options8).map(
|
|
|
455774
455778
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
455775
455779
|
);
|
|
455776
455780
|
}
|
|
455777
|
-
const workspaceRoot =
|
|
455781
|
+
const workspaceRoot = findWorkspaceRoot();
|
|
455778
455782
|
const projectRoot = context.projectsConfigurations.projects[context.projectName]?.root ?? workspaceRoot;
|
|
455779
455783
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? workspaceRoot;
|
|
455780
455784
|
if (options8.clean !== false) {
|
|
@@ -448947,8 +448947,7 @@ __export(executor_exports, {
|
|
|
448947
448947
|
module.exports = __toCommonJS(executor_exports);
|
|
448948
448948
|
|
|
448949
448949
|
// packages/workspace-tools/src/utils/apply-workspace-tokens.ts
|
|
448950
|
-
var
|
|
448951
|
-
var applyWorkspaceExecutorTokens = (option, tokenizerOptions) => {
|
|
448950
|
+
var applyWorkspaceExecutorTokens = async (option, tokenizerOptions) => {
|
|
448952
448951
|
let result = option;
|
|
448953
448952
|
if (!result) {
|
|
448954
448953
|
return result;
|
|
@@ -448991,30 +448990,33 @@ var applyWorkspaceExecutorTokens = (option, tokenizerOptions) => {
|
|
|
448991
448990
|
result = result.replaceAll("{sourceRoot}", sourceRoot);
|
|
448992
448991
|
}
|
|
448993
448992
|
if (result.includes("{workspaceRoot}")) {
|
|
448993
|
+
const { findWorkspaceRoot } = await import("@storm-software/config-tools");
|
|
448994
448994
|
result = result.replaceAll(
|
|
448995
448995
|
"{workspaceRoot}",
|
|
448996
|
-
tokenizerOptions.workspaceRoot ??
|
|
448996
|
+
tokenizerOptions.workspaceRoot ?? findWorkspaceRoot()
|
|
448997
448997
|
);
|
|
448998
448998
|
}
|
|
448999
448999
|
return result;
|
|
449000
449000
|
};
|
|
449001
|
-
var applyWorkspaceTokens = (options8, config, tokenizerFn) => {
|
|
449002
|
-
|
|
449003
|
-
if (!result) {
|
|
449001
|
+
var applyWorkspaceTokens = async (options8, config, tokenizerFn) => {
|
|
449002
|
+
if (!options8) {
|
|
449004
449003
|
return {};
|
|
449005
449004
|
}
|
|
449006
|
-
|
|
449005
|
+
const result = {};
|
|
449006
|
+
for (const option of Object.keys(options8)) {
|
|
449007
449007
|
if (typeof options8[option] === "string") {
|
|
449008
|
-
|
|
449008
|
+
result[option] = await Promise.resolve(tokenizerFn(options8[option], config));
|
|
449009
449009
|
} else if (Array.isArray(options8[option])) {
|
|
449010
|
-
|
|
449011
|
-
(
|
|
449010
|
+
result[option] = await Promise.all(
|
|
449011
|
+
options8[option].map(
|
|
449012
|
+
async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, config)) : item
|
|
449013
|
+
)
|
|
449012
449014
|
);
|
|
449013
449015
|
} else if (typeof options8[option] === "object") {
|
|
449014
|
-
|
|
449016
|
+
result[option] = await applyWorkspaceTokens(options8[option], config, tokenizerFn);
|
|
449015
449017
|
}
|
|
449016
|
-
|
|
449017
|
-
|
|
449018
|
+
}
|
|
449019
|
+
return result;
|
|
449018
449020
|
};
|
|
449019
449021
|
|
|
449020
449022
|
// packages/workspace-tools/src/base/base-executor.ts
|
|
@@ -449027,7 +449029,7 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
|
|
|
449027
449029
|
writeInfo,
|
|
449028
449030
|
writeSuccess,
|
|
449029
449031
|
writeTrace,
|
|
449030
|
-
findWorkspaceRoot
|
|
449032
|
+
findWorkspaceRoot,
|
|
449031
449033
|
loadStormConfig
|
|
449032
449034
|
} = await import("@storm-software/config-tools");
|
|
449033
449035
|
const stopwatch = getStopwatch(name);
|
|
@@ -449041,7 +449043,7 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
|
|
|
449041
449043
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
449042
449044
|
);
|
|
449043
449045
|
}
|
|
449044
|
-
const workspaceRoot =
|
|
449046
|
+
const workspaceRoot = findWorkspaceRoot();
|
|
449045
449047
|
const projectRoot = context.projectsConfigurations.projects[context.projectName]?.root ?? workspaceRoot;
|
|
449046
449048
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? workspaceRoot;
|
|
449047
449049
|
const projectName = context.projectsConfigurations.projects[context.projectName]?.name ?? context.projectName;
|
|
@@ -449076,7 +449078,7 @@ ${Object.keys(options8).map(
|
|
|
449076
449078
|
(key2) => ` - ${key2}=${_isFunction(options8[key2]) ? "<function>" : JSON.stringify(options8[key2])}`
|
|
449077
449079
|
).join("\n")}`
|
|
449078
449080
|
);
|
|
449079
|
-
const tokenized = applyWorkspaceTokens(
|
|
449081
|
+
const tokenized = await applyWorkspaceTokens(
|
|
449080
449082
|
options8,
|
|
449081
449083
|
{
|
|
449082
449084
|
config,
|
|
@@ -449372,8 +449374,8 @@ var applyDefaultOptions = (options8) => {
|
|
|
449372
449374
|
return options8;
|
|
449373
449375
|
};
|
|
449374
449376
|
var runTsupBuild = async (context, config, options8) => {
|
|
449375
|
-
const { LogLevel, getLogLevel, writeInfo, writeWarning, findWorkspaceRoot
|
|
449376
|
-
const workspaceRoot = config?.workspaceRoot ??
|
|
449377
|
+
const { LogLevel, getLogLevel, writeInfo, writeWarning, findWorkspaceRoot } = await import("@storm-software/config-tools");
|
|
449378
|
+
const workspaceRoot = config?.workspaceRoot ?? findWorkspaceRoot();
|
|
449377
449379
|
const stormEnv = Object.keys(options8.env ?? {}).filter((key2) => key2.startsWith("STORM_")).reduce((ret, key2) => {
|
|
449378
449380
|
ret[key2] = options8.env?.[key2];
|
|
449379
449381
|
return ret;
|
|
@@ -455712,8 +455714,10 @@ var import_fileutils = require("nx/src/utils/fileutils.js");
|
|
|
455712
455714
|
|
|
455713
455715
|
// packages/workspace-tools/src/utils/get-project-configurations.ts
|
|
455714
455716
|
var import_retrieve_workspace_files = require("nx/src/project-graph/utils/retrieve-workspace-files");
|
|
455715
|
-
var
|
|
455716
|
-
|
|
455717
|
+
var getProjectConfigurations = async () => {
|
|
455718
|
+
const { findWorkspaceRoot } = await import("@storm-software/config-tools");
|
|
455719
|
+
return (0, import_retrieve_workspace_files.retrieveProjectConfigurationsWithoutPluginInference)(findWorkspaceRoot());
|
|
455720
|
+
};
|
|
455717
455721
|
|
|
455718
455722
|
// packages/workspace-tools/src/utils/get-project-deps.ts
|
|
455719
455723
|
function getExtraDependencies(projectName, graph) {
|
|
@@ -455758,7 +455762,7 @@ async function tsupExecutorFn(options8, context, config) {
|
|
|
455758
455762
|
writeSuccess,
|
|
455759
455763
|
writeTrace,
|
|
455760
455764
|
writeWarning,
|
|
455761
|
-
findWorkspaceRoot
|
|
455765
|
+
findWorkspaceRoot
|
|
455762
455766
|
} = await import("@storm-software/config-tools");
|
|
455763
455767
|
writeInfo(config, "\u{1F4E6} Running Storm build executor on the workspace");
|
|
455764
455768
|
writeDebug(
|
|
@@ -455774,7 +455778,7 @@ ${Object.keys(options8).map(
|
|
|
455774
455778
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
455775
455779
|
);
|
|
455776
455780
|
}
|
|
455777
|
-
const workspaceRoot =
|
|
455781
|
+
const workspaceRoot = findWorkspaceRoot();
|
|
455778
455782
|
const projectRoot = context.projectsConfigurations.projects[context.projectName]?.root ?? workspaceRoot;
|
|
455779
455783
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? workspaceRoot;
|
|
455780
455784
|
if (options8.clean !== false) {
|