@storm-software/workspace-tools 1.31.9 → 1.31.11
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 +14 -0
- package/README.md +1 -1
- package/index.js +14 -17
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/base/index.js +9 -12
- package/src/executors/design-tokens/executor.js +8 -11
- package/src/executors/tsup/executor.js +10 -13
- package/src/executors/tsup-browser/executor.js +10 -13
- package/src/executors/tsup-neutral/executor.js +10 -13
- package/src/executors/tsup-node/executor.js +10 -13
- package/src/generators/browser-library/generator.js +7 -10
- package/src/generators/config-schema/generator.js +9 -12
- package/src/generators/neutral-library/generator.js +7 -10
- package/src/generators/node-library/generator.js +7 -10
- package/src/generators/preset/generator.js +7 -10
|
@@ -43504,7 +43504,7 @@ module.exports = __toCommonJS(generator_exports);
|
|
|
43504
43504
|
var import_devkit2 = __toESM(require_devkit());
|
|
43505
43505
|
|
|
43506
43506
|
// packages/config-tools/src/config-file/get-config-file.ts
|
|
43507
|
-
var import_cosmiconfig = __toESM(require_dist());
|
|
43507
|
+
var import_cosmiconfig = __toESM(require_dist(), 1);
|
|
43508
43508
|
var _static_cache = void 0;
|
|
43509
43509
|
var getConfigFileName = (fileName) => (0, import_cosmiconfig.cosmiconfig)(fileName, { cache: true }).search();
|
|
43510
43510
|
var getConfigFile = async () => {
|
|
@@ -47232,7 +47232,10 @@ var getDefaultConfig = (config = {}) => {
|
|
|
47232
47232
|
let repository = "https://github.com/storm-software/storm-stack";
|
|
47233
47233
|
let license = DefaultStormConfig.license;
|
|
47234
47234
|
let homepage = DefaultStormConfig.homepage;
|
|
47235
|
-
const workspaceRoot =
|
|
47235
|
+
const workspaceRoot = (0, import_find_workspace_root.findWorkspaceRoot)(process.cwd());
|
|
47236
|
+
if (typeof workspaceRoot !== "string") {
|
|
47237
|
+
throw new Error("Could not find workspace root");
|
|
47238
|
+
}
|
|
47236
47239
|
if ((0, import_fs.existsSync)((0, import_path.join)(workspaceRoot, "package.json"))) {
|
|
47237
47240
|
const file = (0, import_fs.readFileSync)((0, import_path.join)(workspaceRoot, "package.json"), {
|
|
47238
47241
|
encoding: "utf-8"
|
|
@@ -47260,12 +47263,6 @@ var getDefaultConfig = (config = {}) => {
|
|
|
47260
47263
|
})
|
|
47261
47264
|
);
|
|
47262
47265
|
};
|
|
47263
|
-
var getWorkspaceRoot = () => {
|
|
47264
|
-
const root = (0, import_find_workspace_root.findWorkspaceRoot)(process.cwd());
|
|
47265
|
-
process.env.STORM_WORKSPACE_ROOT ??= root?.dir;
|
|
47266
|
-
process.env.NX_WORKSPACE_ROOT_PATH ??= root?.dir;
|
|
47267
|
-
return root?.dir;
|
|
47268
|
-
};
|
|
47269
47266
|
|
|
47270
47267
|
// packages/config-tools/src/utilities/get-log-level.ts
|
|
47271
47268
|
var getLogLevel = (label) => {
|
|
@@ -47451,7 +47448,7 @@ var chalk = __toESM(require_source());
|
|
|
47451
47448
|
|
|
47452
47449
|
// packages/workspace-tools/src/utils/get-workspace-root.ts
|
|
47453
47450
|
var import_find_workspace_root2 = require("nx/src/utils/find-workspace-root.js");
|
|
47454
|
-
var
|
|
47451
|
+
var getWorkspaceRoot = () => {
|
|
47455
47452
|
const root = (0, import_find_workspace_root2.findWorkspaceRoot)(process.cwd());
|
|
47456
47453
|
process.env.STORM_WORKSPACE_ROOT ??= root?.dir;
|
|
47457
47454
|
process.env.NX_WORKSPACE_ROOT_PATH ??= root?.dir;
|
|
@@ -47480,7 +47477,7 @@ var applyWorkspaceGeneratorTokens = (option, tokenizerOptions) => {
|
|
|
47480
47477
|
if (result.includes("{workspaceRoot}")) {
|
|
47481
47478
|
result = result.replaceAll(
|
|
47482
47479
|
"{workspaceRoot}",
|
|
47483
|
-
tokenizerOptions.workspaceRoot ?? tokenizerOptions.config.workspaceRoot ??
|
|
47480
|
+
tokenizerOptions.workspaceRoot ?? tokenizerOptions.config.workspaceRoot ?? getWorkspaceRoot()
|
|
47484
47481
|
);
|
|
47485
47482
|
}
|
|
47486
47483
|
return result;
|
|
@@ -26263,7 +26263,7 @@ var import_devkit = __toESM(require_devkit());
|
|
|
26263
26263
|
var path = __toESM(require("path"));
|
|
26264
26264
|
|
|
26265
26265
|
// packages/config-tools/src/config-file/get-config-file.ts
|
|
26266
|
-
var import_cosmiconfig = __toESM(require_dist());
|
|
26266
|
+
var import_cosmiconfig = __toESM(require_dist(), 1);
|
|
26267
26267
|
var _static_cache = void 0;
|
|
26268
26268
|
var getConfigFileName = (fileName) => (0, import_cosmiconfig.cosmiconfig)(fileName, { cache: true }).search();
|
|
26269
26269
|
var getConfigFile = async () => {
|
|
@@ -29991,7 +29991,10 @@ var getDefaultConfig = (config = {}) => {
|
|
|
29991
29991
|
let repository = "https://github.com/storm-software/storm-stack";
|
|
29992
29992
|
let license = DefaultStormConfig.license;
|
|
29993
29993
|
let homepage = DefaultStormConfig.homepage;
|
|
29994
|
-
const workspaceRoot =
|
|
29994
|
+
const workspaceRoot = (0, import_find_workspace_root.findWorkspaceRoot)(process.cwd());
|
|
29995
|
+
if (typeof workspaceRoot !== "string") {
|
|
29996
|
+
throw new Error("Could not find workspace root");
|
|
29997
|
+
}
|
|
29995
29998
|
if ((0, import_fs.existsSync)((0, import_path.join)(workspaceRoot, "package.json"))) {
|
|
29996
29999
|
const file = (0, import_fs.readFileSync)((0, import_path.join)(workspaceRoot, "package.json"), {
|
|
29997
30000
|
encoding: "utf-8"
|
|
@@ -30019,12 +30022,6 @@ var getDefaultConfig = (config = {}) => {
|
|
|
30019
30022
|
})
|
|
30020
30023
|
);
|
|
30021
30024
|
};
|
|
30022
|
-
var getWorkspaceRoot = () => {
|
|
30023
|
-
const root = (0, import_find_workspace_root.findWorkspaceRoot)(process.cwd());
|
|
30024
|
-
process.env.STORM_WORKSPACE_ROOT ??= root?.dir;
|
|
30025
|
-
process.env.NX_WORKSPACE_ROOT_PATH ??= root?.dir;
|
|
30026
|
-
return root?.dir;
|
|
30027
|
-
};
|
|
30028
30025
|
|
|
30029
30026
|
// packages/config-tools/src/utilities/get-log-level.ts
|
|
30030
30027
|
var getLogLevel = (label) => {
|
|
@@ -30210,7 +30207,7 @@ var chalk = __toESM(require_source());
|
|
|
30210
30207
|
|
|
30211
30208
|
// packages/workspace-tools/src/utils/get-workspace-root.ts
|
|
30212
30209
|
var import_find_workspace_root2 = require("nx/src/utils/find-workspace-root.js");
|
|
30213
|
-
var
|
|
30210
|
+
var getWorkspaceRoot = () => {
|
|
30214
30211
|
const root = (0, import_find_workspace_root2.findWorkspaceRoot)(process.cwd());
|
|
30215
30212
|
process.env.STORM_WORKSPACE_ROOT ??= root?.dir;
|
|
30216
30213
|
process.env.NX_WORKSPACE_ROOT_PATH ??= root?.dir;
|
|
@@ -30239,7 +30236,7 @@ var applyWorkspaceGeneratorTokens = (option, tokenizerOptions) => {
|
|
|
30239
30236
|
if (result.includes("{workspaceRoot}")) {
|
|
30240
30237
|
result = result.replaceAll(
|
|
30241
30238
|
"{workspaceRoot}",
|
|
30242
|
-
tokenizerOptions.workspaceRoot ?? tokenizerOptions.config.workspaceRoot ??
|
|
30239
|
+
tokenizerOptions.workspaceRoot ?? tokenizerOptions.config.workspaceRoot ?? getWorkspaceRoot()
|
|
30243
30240
|
);
|
|
30244
30241
|
}
|
|
30245
30242
|
return result;
|