@storm-software/unbuild 0.35.1 → 0.36.0
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/README.md +1 -1
- package/bin/unbuild.cjs +55 -25
- package/bin/unbuild.js +55 -25
- package/dist/build.cjs +7 -7
- package/dist/build.d.cts +2 -0
- package/dist/build.d.ts +2 -0
- package/dist/build.js +6 -6
- package/dist/{chunk-3HGUCQU6.cjs → chunk-5XTLMOFH.cjs} +3 -3
- package/dist/{chunk-5FQVMM7I.cjs → chunk-A45F3XCO.cjs} +26 -15
- package/dist/{chunk-PLJQK2VX.js → chunk-A7ULBMR4.js} +26 -15
- package/dist/{chunk-Y7PS2HJA.cjs → chunk-AI7YECRT.cjs} +3 -3
- package/dist/{chunk-ZPWH22ZM.cjs → chunk-BZELKGMN.cjs} +2 -2
- package/dist/{chunk-2E6P5U5P.js → chunk-FLMNRVR2.js} +1 -1
- package/dist/{chunk-3M7GEZDL.js → chunk-FRURXT64.js} +1 -1
- package/dist/{chunk-TG57GPRS.js → chunk-JONED24L.js} +34 -15
- package/dist/{chunk-N5KR37LU.cjs → chunk-MXG2QBLK.cjs} +2 -2
- package/dist/{chunk-6BNX524O.cjs → chunk-PX6F2F5P.cjs} +122 -103
- package/dist/{chunk-RFEZKCMQ.js → chunk-R6HJQ5XB.js} +1 -1
- package/dist/{chunk-L3WYWYD4.js → chunk-XRMMVXZP.js} +1 -1
- package/dist/clean.cjs +3 -3
- package/dist/clean.js +2 -2
- package/dist/index.cjs +7 -7
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +6 -6
- package/dist/plugins/analyze.cjs +3 -3
- package/dist/plugins/analyze.d.cts +2 -0
- package/dist/plugins/analyze.d.ts +2 -0
- package/dist/plugins/analyze.js +2 -2
- package/dist/plugins/on-error.cjs +3 -3
- package/dist/plugins/on-error.d.cts +2 -0
- package/dist/plugins/on-error.d.ts +2 -0
- package/dist/plugins/on-error.js +2 -2
- package/dist/plugins/swc.d.cts +2 -0
- package/dist/plugins/swc.d.ts +2 -0
- package/dist/plugins/tsc.cjs +3 -3
- package/dist/plugins/tsc.d.cts +2 -0
- package/dist/plugins/tsc.d.ts +2 -0
- package/dist/plugins/tsc.js +2 -2
- package/dist/plugins/type-definitions.d.cts +2 -0
- package/dist/plugins/type-definitions.d.ts +2 -0
- package/dist/types.d.cts +47 -2
- package/dist/types.d.ts +47 -2
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
21
21
|
|
|
22
22
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
23
23
|
|
|
24
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
25
25
|
|
|
26
26
|
<!-- prettier-ignore-start -->
|
|
27
27
|
<!-- markdownlint-disable -->
|
package/bin/unbuild.cjs
CHANGED
|
@@ -129,7 +129,7 @@ var WorkspaceDirectoryConfigSchema = import_zod.default.object({
|
|
|
129
129
|
build: import_zod.default.string().trim().default("dist").describe("The directory used to store the workspace's distributable files after a build (relative to the workspace root)")
|
|
130
130
|
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
131
131
|
var StormConfigSchema = import_zod.default.object({
|
|
132
|
-
$schema: import_zod.default.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
|
|
132
|
+
$schema: import_zod.default.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
|
|
133
133
|
extends: ExtendsSchema.optional(),
|
|
134
134
|
name: import_zod.default.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
|
|
135
135
|
namespace: import_zod.default.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
@@ -171,6 +171,7 @@ var StormConfigSchema = import_zod.default.object({
|
|
|
171
171
|
"trace",
|
|
172
172
|
"all"
|
|
173
173
|
]).default("info").describe("The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."),
|
|
174
|
+
skipConfigLogging: import_zod.default.boolean().optional().describe("Should the logging of the current Storm Workspace configuration be skipped?"),
|
|
174
175
|
registry: RegistryConfigSchema,
|
|
175
176
|
configFile: import_zod.default.string().trim().nullable().default(null).describe("The filepath of the Storm config. When this field is null, no config file was found in the current workspace."),
|
|
176
177
|
colors: ColorConfigSchema.or(ColorConfigMapSchema).describe("Storm theme config values used for styling various package elements"),
|
|
@@ -364,14 +365,17 @@ var import_node_fs = require("fs");
|
|
|
364
365
|
var import_node_path = require("path");
|
|
365
366
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
366
367
|
var depth = 0;
|
|
367
|
-
function findFolderUp(startPath, endFileNames) {
|
|
368
|
+
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
368
369
|
const _startPath = startPath ?? process.cwd();
|
|
370
|
+
if (endDirectoryNames.some((endDirName) => (0, import_node_fs.existsSync)((0, import_node_path.join)(_startPath, endDirName)))) {
|
|
371
|
+
return _startPath;
|
|
372
|
+
}
|
|
369
373
|
if (endFileNames.some((endFileName) => (0, import_node_fs.existsSync)((0, import_node_path.join)(_startPath, endFileName)))) {
|
|
370
374
|
return _startPath;
|
|
371
375
|
}
|
|
372
376
|
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
373
377
|
const parent = (0, import_node_path.join)(_startPath, "..");
|
|
374
|
-
return findFolderUp(parent, endFileNames);
|
|
378
|
+
return findFolderUp(parent, endFileNames, endDirectoryNames);
|
|
375
379
|
}
|
|
376
380
|
return void 0;
|
|
377
381
|
}
|
|
@@ -379,17 +383,17 @@ __name(findFolderUp, "findFolderUp");
|
|
|
379
383
|
|
|
380
384
|
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
381
385
|
var rootFiles = [
|
|
382
|
-
"storm.json",
|
|
383
|
-
"storm.json",
|
|
384
|
-
"storm.yaml",
|
|
385
|
-
"storm.yml",
|
|
386
|
-
"storm.js",
|
|
387
|
-
"storm.ts",
|
|
388
|
-
".storm.json",
|
|
389
|
-
".storm.yaml",
|
|
390
|
-
".storm.yml",
|
|
391
|
-
".storm.js",
|
|
392
|
-
".storm.ts",
|
|
386
|
+
"storm-workspace.json",
|
|
387
|
+
"storm-workspace.json",
|
|
388
|
+
"storm-workspace.yaml",
|
|
389
|
+
"storm-workspace.yml",
|
|
390
|
+
"storm-workspace.js",
|
|
391
|
+
"storm-workspace.ts",
|
|
392
|
+
".storm-workspace.json",
|
|
393
|
+
".storm-workspace.yaml",
|
|
394
|
+
".storm-workspace.yml",
|
|
395
|
+
".storm-workspace.js",
|
|
396
|
+
".storm-workspace.ts",
|
|
393
397
|
"lerna.json",
|
|
394
398
|
"nx.json",
|
|
395
399
|
"turbo.json",
|
|
@@ -413,11 +417,18 @@ var rootFiles = [
|
|
|
413
417
|
"pnpm-lock.yml",
|
|
414
418
|
"bun.lockb"
|
|
415
419
|
];
|
|
420
|
+
var rootDirectories = [
|
|
421
|
+
".storm-workspace",
|
|
422
|
+
".nx",
|
|
423
|
+
".github",
|
|
424
|
+
".vscode",
|
|
425
|
+
".verdaccio"
|
|
426
|
+
];
|
|
416
427
|
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
417
428
|
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
418
429
|
return correctPaths(process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH);
|
|
419
430
|
}
|
|
420
|
-
return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles));
|
|
431
|
+
return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles, rootDirectories));
|
|
421
432
|
}
|
|
422
433
|
__name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
|
|
423
434
|
function findWorkspaceRoot(pathInsideMonorepo) {
|
|
@@ -792,10 +803,10 @@ var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, opti
|
|
|
792
803
|
}, "getConfigFileByName");
|
|
793
804
|
var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames = []) => {
|
|
794
805
|
const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
|
|
795
|
-
const result = await getConfigFileByName("storm", workspacePath);
|
|
806
|
+
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
796
807
|
let config = result.config;
|
|
797
808
|
const configFile = result.configFile;
|
|
798
|
-
if (config && configFile && Object.keys(config).length > 0) {
|
|
809
|
+
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
799
810
|
writeTrace(`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
|
|
800
811
|
logLevel: "all"
|
|
801
812
|
});
|
|
@@ -804,9 +815,11 @@ var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames
|
|
|
804
815
|
const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
|
|
805
816
|
for (const result2 of results) {
|
|
806
817
|
if (result2?.config && result2?.configFile && Object.keys(result2.config).length > 0) {
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
818
|
+
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
819
|
+
writeTrace(`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
|
|
820
|
+
logLevel: "all"
|
|
821
|
+
});
|
|
822
|
+
}
|
|
810
823
|
config = (0, import_defu.default)(result2.config ?? {}, config ?? {});
|
|
811
824
|
}
|
|
812
825
|
}
|
|
@@ -879,7 +892,8 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
|
|
|
879
892
|
cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
|
|
880
893
|
container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
|
|
881
894
|
},
|
|
882
|
-
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0
|
|
895
|
+
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
896
|
+
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
883
897
|
};
|
|
884
898
|
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
|
|
885
899
|
config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
|
|
@@ -1114,6 +1128,9 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
1114
1128
|
process.env.NX_VERBOSE_LOGGING = String(getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false);
|
|
1115
1129
|
process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none";
|
|
1116
1130
|
}
|
|
1131
|
+
if (config.skipConfigLogging !== void 0) {
|
|
1132
|
+
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(config.skipConfigLogging);
|
|
1133
|
+
}
|
|
1117
1134
|
process.env[`${prefix}CONFIG`] = JSON.stringify(config);
|
|
1118
1135
|
for (const key of Object.keys(config.extensions ?? {})) {
|
|
1119
1136
|
config.extensions[key] && Object.keys(config.extensions[key]) && setExtensionEnv(key, config.extensions[key]);
|
|
@@ -1231,7 +1248,7 @@ var createStormConfig = /* @__PURE__ */ __name(async (extensionName, schema, wor
|
|
|
1231
1248
|
const defaultConfig = await getDefaultConfig(_workspaceRoot);
|
|
1232
1249
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
1233
1250
|
if (!configFile && !skipLogs) {
|
|
1234
|
-
writeWarning("No Storm
|
|
1251
|
+
writeWarning("No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n", {
|
|
1235
1252
|
logLevel: "all"
|
|
1236
1253
|
});
|
|
1237
1254
|
}
|
|
@@ -1269,8 +1286,8 @@ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
|
|
|
1269
1286
|
var loadStormConfig = /* @__PURE__ */ __name(async (workspaceRoot, skipLogs = false) => {
|
|
1270
1287
|
const config = await createStormConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
1271
1288
|
setConfigEnv(config);
|
|
1272
|
-
if (!skipLogs) {
|
|
1273
|
-
writeTrace(`\u2699\uFE0F Using Storm configuration:
|
|
1289
|
+
if (!skipLogs && !config.skipConfigLogging) {
|
|
1290
|
+
writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
|
|
1274
1291
|
${formatLogMessage(config)}`, config);
|
|
1275
1292
|
}
|
|
1276
1293
|
return config;
|
|
@@ -1799,7 +1816,20 @@ async function resolveOptions(options, config) {
|
|
|
1799
1816
|
onErrorPlugin(resolvedOptions)
|
|
1800
1817
|
]);
|
|
1801
1818
|
}
|
|
1802
|
-
}, "rollup:options")
|
|
1819
|
+
}, "rollup:options"),
|
|
1820
|
+
"mkdist:entry:options": /* @__PURE__ */ __name(async (ctx, entry, opts) => {
|
|
1821
|
+
opts.esbuild ||= {};
|
|
1822
|
+
opts.esbuild.platform ??= resolvedOptions.platform;
|
|
1823
|
+
opts.esbuild.minify ??= resolvedOptions.minify ?? !resolvedOptions.debug;
|
|
1824
|
+
opts.esbuild.sourcemap ??= resolvedOptions.sourcemap ?? !!options.debug;
|
|
1825
|
+
if (options.loaders) {
|
|
1826
|
+
if (typeof options.loaders === "function") {
|
|
1827
|
+
opts.loaders = await Promise.resolve(options.loaders(ctx, entry, opts));
|
|
1828
|
+
} else {
|
|
1829
|
+
opts.loaders = options.loaders;
|
|
1830
|
+
}
|
|
1831
|
+
}
|
|
1832
|
+
}, "mkdist:entry:options")
|
|
1803
1833
|
};
|
|
1804
1834
|
stopwatch();
|
|
1805
1835
|
return resolvedOptions;
|
package/bin/unbuild.js
CHANGED
|
@@ -108,7 +108,7 @@ var WorkspaceDirectoryConfigSchema = z.object({
|
|
|
108
108
|
build: z.string().trim().default("dist").describe("The directory used to store the workspace's distributable files after a build (relative to the workspace root)")
|
|
109
109
|
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
110
110
|
var StormConfigSchema = z.object({
|
|
111
|
-
$schema: z.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
|
|
111
|
+
$schema: z.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
|
|
112
112
|
extends: ExtendsSchema.optional(),
|
|
113
113
|
name: z.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
|
|
114
114
|
namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
@@ -150,6 +150,7 @@ var StormConfigSchema = z.object({
|
|
|
150
150
|
"trace",
|
|
151
151
|
"all"
|
|
152
152
|
]).default("info").describe("The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."),
|
|
153
|
+
skipConfigLogging: z.boolean().optional().describe("Should the logging of the current Storm Workspace configuration be skipped?"),
|
|
153
154
|
registry: RegistryConfigSchema,
|
|
154
155
|
configFile: z.string().trim().nullable().default(null).describe("The filepath of the Storm config. When this field is null, no config file was found in the current workspace."),
|
|
155
156
|
colors: ColorConfigSchema.or(ColorConfigMapSchema).describe("Storm theme config values used for styling various package elements"),
|
|
@@ -343,14 +344,17 @@ import { existsSync } from "node:fs";
|
|
|
343
344
|
import { join } from "node:path";
|
|
344
345
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
345
346
|
var depth = 0;
|
|
346
|
-
function findFolderUp(startPath, endFileNames) {
|
|
347
|
+
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
347
348
|
const _startPath = startPath ?? process.cwd();
|
|
349
|
+
if (endDirectoryNames.some((endDirName) => existsSync(join(_startPath, endDirName)))) {
|
|
350
|
+
return _startPath;
|
|
351
|
+
}
|
|
348
352
|
if (endFileNames.some((endFileName) => existsSync(join(_startPath, endFileName)))) {
|
|
349
353
|
return _startPath;
|
|
350
354
|
}
|
|
351
355
|
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
352
356
|
const parent = join(_startPath, "..");
|
|
353
|
-
return findFolderUp(parent, endFileNames);
|
|
357
|
+
return findFolderUp(parent, endFileNames, endDirectoryNames);
|
|
354
358
|
}
|
|
355
359
|
return void 0;
|
|
356
360
|
}
|
|
@@ -358,17 +362,17 @@ __name(findFolderUp, "findFolderUp");
|
|
|
358
362
|
|
|
359
363
|
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
360
364
|
var rootFiles = [
|
|
361
|
-
"storm.json",
|
|
362
|
-
"storm.json",
|
|
363
|
-
"storm.yaml",
|
|
364
|
-
"storm.yml",
|
|
365
|
-
"storm.js",
|
|
366
|
-
"storm.ts",
|
|
367
|
-
".storm.json",
|
|
368
|
-
".storm.yaml",
|
|
369
|
-
".storm.yml",
|
|
370
|
-
".storm.js",
|
|
371
|
-
".storm.ts",
|
|
365
|
+
"storm-workspace.json",
|
|
366
|
+
"storm-workspace.json",
|
|
367
|
+
"storm-workspace.yaml",
|
|
368
|
+
"storm-workspace.yml",
|
|
369
|
+
"storm-workspace.js",
|
|
370
|
+
"storm-workspace.ts",
|
|
371
|
+
".storm-workspace.json",
|
|
372
|
+
".storm-workspace.yaml",
|
|
373
|
+
".storm-workspace.yml",
|
|
374
|
+
".storm-workspace.js",
|
|
375
|
+
".storm-workspace.ts",
|
|
372
376
|
"lerna.json",
|
|
373
377
|
"nx.json",
|
|
374
378
|
"turbo.json",
|
|
@@ -392,11 +396,18 @@ var rootFiles = [
|
|
|
392
396
|
"pnpm-lock.yml",
|
|
393
397
|
"bun.lockb"
|
|
394
398
|
];
|
|
399
|
+
var rootDirectories = [
|
|
400
|
+
".storm-workspace",
|
|
401
|
+
".nx",
|
|
402
|
+
".github",
|
|
403
|
+
".vscode",
|
|
404
|
+
".verdaccio"
|
|
405
|
+
];
|
|
395
406
|
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
396
407
|
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
397
408
|
return correctPaths(process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH);
|
|
398
409
|
}
|
|
399
|
-
return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles));
|
|
410
|
+
return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles, rootDirectories));
|
|
400
411
|
}
|
|
401
412
|
__name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
|
|
402
413
|
function findWorkspaceRoot(pathInsideMonorepo) {
|
|
@@ -771,10 +782,10 @@ var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, opti
|
|
|
771
782
|
}, "getConfigFileByName");
|
|
772
783
|
var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames = []) => {
|
|
773
784
|
const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
|
|
774
|
-
const result = await getConfigFileByName("storm", workspacePath);
|
|
785
|
+
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
775
786
|
let config = result.config;
|
|
776
787
|
const configFile = result.configFile;
|
|
777
|
-
if (config && configFile && Object.keys(config).length > 0) {
|
|
788
|
+
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
778
789
|
writeTrace(`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
|
|
779
790
|
logLevel: "all"
|
|
780
791
|
});
|
|
@@ -783,9 +794,11 @@ var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames
|
|
|
783
794
|
const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
|
|
784
795
|
for (const result2 of results) {
|
|
785
796
|
if (result2?.config && result2?.configFile && Object.keys(result2.config).length > 0) {
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
797
|
+
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
798
|
+
writeTrace(`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
|
|
799
|
+
logLevel: "all"
|
|
800
|
+
});
|
|
801
|
+
}
|
|
789
802
|
config = defu(result2.config ?? {}, config ?? {});
|
|
790
803
|
}
|
|
791
804
|
}
|
|
@@ -858,7 +871,8 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
|
|
|
858
871
|
cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
|
|
859
872
|
container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
|
|
860
873
|
},
|
|
861
|
-
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0
|
|
874
|
+
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
875
|
+
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
862
876
|
};
|
|
863
877
|
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
|
|
864
878
|
config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
|
|
@@ -1093,6 +1107,9 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
1093
1107
|
process.env.NX_VERBOSE_LOGGING = String(getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false);
|
|
1094
1108
|
process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none";
|
|
1095
1109
|
}
|
|
1110
|
+
if (config.skipConfigLogging !== void 0) {
|
|
1111
|
+
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(config.skipConfigLogging);
|
|
1112
|
+
}
|
|
1096
1113
|
process.env[`${prefix}CONFIG`] = JSON.stringify(config);
|
|
1097
1114
|
for (const key of Object.keys(config.extensions ?? {})) {
|
|
1098
1115
|
config.extensions[key] && Object.keys(config.extensions[key]) && setExtensionEnv(key, config.extensions[key]);
|
|
@@ -1210,7 +1227,7 @@ var createStormConfig = /* @__PURE__ */ __name(async (extensionName, schema, wor
|
|
|
1210
1227
|
const defaultConfig = await getDefaultConfig(_workspaceRoot);
|
|
1211
1228
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
1212
1229
|
if (!configFile && !skipLogs) {
|
|
1213
|
-
writeWarning("No Storm
|
|
1230
|
+
writeWarning("No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n", {
|
|
1214
1231
|
logLevel: "all"
|
|
1215
1232
|
});
|
|
1216
1233
|
}
|
|
@@ -1248,8 +1265,8 @@ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
|
|
|
1248
1265
|
var loadStormConfig = /* @__PURE__ */ __name(async (workspaceRoot, skipLogs = false) => {
|
|
1249
1266
|
const config = await createStormConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
1250
1267
|
setConfigEnv(config);
|
|
1251
|
-
if (!skipLogs) {
|
|
1252
|
-
writeTrace(`\u2699\uFE0F Using Storm configuration:
|
|
1268
|
+
if (!skipLogs && !config.skipConfigLogging) {
|
|
1269
|
+
writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
|
|
1253
1270
|
${formatLogMessage(config)}`, config);
|
|
1254
1271
|
}
|
|
1255
1272
|
return config;
|
|
@@ -1778,7 +1795,20 @@ async function resolveOptions(options, config) {
|
|
|
1778
1795
|
onErrorPlugin(resolvedOptions)
|
|
1779
1796
|
]);
|
|
1780
1797
|
}
|
|
1781
|
-
}, "rollup:options")
|
|
1798
|
+
}, "rollup:options"),
|
|
1799
|
+
"mkdist:entry:options": /* @__PURE__ */ __name(async (ctx, entry, opts) => {
|
|
1800
|
+
opts.esbuild ||= {};
|
|
1801
|
+
opts.esbuild.platform ??= resolvedOptions.platform;
|
|
1802
|
+
opts.esbuild.minify ??= resolvedOptions.minify ?? !resolvedOptions.debug;
|
|
1803
|
+
opts.esbuild.sourcemap ??= resolvedOptions.sourcemap ?? !!options.debug;
|
|
1804
|
+
if (options.loaders) {
|
|
1805
|
+
if (typeof options.loaders === "function") {
|
|
1806
|
+
opts.loaders = await Promise.resolve(options.loaders(ctx, entry, opts));
|
|
1807
|
+
} else {
|
|
1808
|
+
opts.loaders = options.loaders;
|
|
1809
|
+
}
|
|
1810
|
+
}
|
|
1811
|
+
}, "mkdist:entry:options")
|
|
1782
1812
|
};
|
|
1783
1813
|
stopwatch();
|
|
1784
1814
|
return resolvedOptions;
|
package/dist/build.cjs
CHANGED
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkPX6F2F5Pcjs = require('./chunk-PX6F2F5P.cjs');
|
|
9
9
|
require('./chunk-OD3ULBE3.cjs');
|
|
10
|
-
require('./chunk-
|
|
11
|
-
require('./chunk-
|
|
12
|
-
require('./chunk-
|
|
13
|
-
require('./chunk-
|
|
14
|
-
require('./chunk-
|
|
10
|
+
require('./chunk-5XTLMOFH.cjs');
|
|
11
|
+
require('./chunk-MXG2QBLK.cjs');
|
|
12
|
+
require('./chunk-AI7YECRT.cjs');
|
|
13
|
+
require('./chunk-BZELKGMN.cjs');
|
|
14
|
+
require('./chunk-A45F3XCO.cjs');
|
|
15
15
|
require('./chunk-BGYQAVKQ.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
@@ -20,4 +20,4 @@ require('./chunk-BGYQAVKQ.cjs');
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
exports.build =
|
|
23
|
+
exports.build = _chunkPX6F2F5Pcjs.build; exports.cleanOutputPath = _chunkPX6F2F5Pcjs.cleanOutputPath; exports.copyBuildAssets = _chunkPX6F2F5Pcjs.copyBuildAssets; exports.executeUnbuild = _chunkPX6F2F5Pcjs.executeUnbuild; exports.generatePackageJson = _chunkPX6F2F5Pcjs.generatePackageJson; exports.resolveOptions = _chunkPX6F2F5Pcjs.resolveOptions;
|
package/dist/build.d.cts
CHANGED
package/dist/build.d.ts
CHANGED
package/dist/build.js
CHANGED
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
executeUnbuild,
|
|
6
6
|
generatePackageJson,
|
|
7
7
|
resolveOptions
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-JONED24L.js";
|
|
9
9
|
import "./chunk-RBYYB7X2.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-FLMNRVR2.js";
|
|
11
|
+
import "./chunk-XRMMVXZP.js";
|
|
12
|
+
import "./chunk-R6HJQ5XB.js";
|
|
13
|
+
import "./chunk-FRURXT64.js";
|
|
14
|
+
import "./chunk-A7ULBMR4.js";
|
|
15
15
|
import "./chunk-3GQAWCBQ.js";
|
|
16
16
|
export {
|
|
17
17
|
build,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkA45F3XCOcjs = require('./chunk-A45F3XCO.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
@@ -9,8 +9,8 @@ var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
|
9
9
|
// src/clean.ts
|
|
10
10
|
var _promises = require('fs/promises');
|
|
11
11
|
async function clean(name = "Unbuild", directory, config) {
|
|
12
|
-
|
|
13
|
-
const stopwatch =
|
|
12
|
+
_chunkA45F3XCOcjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
13
|
+
const stopwatch = _chunkA45F3XCOcjs.getStopwatch.call(void 0, `${name} output clean`);
|
|
14
14
|
await cleanDirectories(name, directory, config);
|
|
15
15
|
stopwatch();
|
|
16
16
|
}
|
|
@@ -312,7 +312,7 @@ var WorkspaceDirectoryConfigSchema = _zod2.default.object({
|
|
|
312
312
|
build: _zod2.default.string().trim().default("dist").describe("The directory used to store the workspace's distributable files after a build (relative to the workspace root)")
|
|
313
313
|
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
314
314
|
var StormConfigSchema = _zod2.default.object({
|
|
315
|
-
$schema: _zod2.default.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
|
|
315
|
+
$schema: _zod2.default.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
|
|
316
316
|
extends: ExtendsSchema.optional(),
|
|
317
317
|
name: _zod2.default.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
|
|
318
318
|
namespace: _zod2.default.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
@@ -354,6 +354,7 @@ var StormConfigSchema = _zod2.default.object({
|
|
|
354
354
|
"trace",
|
|
355
355
|
"all"
|
|
356
356
|
]).default("info").describe("The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."),
|
|
357
|
+
skipConfigLogging: _zod2.default.boolean().optional().describe("Should the logging of the current Storm Workspace configuration be skipped?"),
|
|
357
358
|
registry: RegistryConfigSchema,
|
|
358
359
|
configFile: _zod2.default.string().trim().nullable().default(null).describe("The filepath of the Storm config. When this field is null, no config file was found in the current workspace."),
|
|
359
360
|
colors: ColorConfigSchema.or(ColorConfigMapSchema).describe("Storm theme config values used for styling various package elements"),
|
|
@@ -389,14 +390,17 @@ var _path = require('path');
|
|
|
389
390
|
|
|
390
391
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
391
392
|
var depth = 0;
|
|
392
|
-
function findFolderUp(startPath, endFileNames) {
|
|
393
|
+
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
393
394
|
const _startPath = _nullishCoalesce(startPath, () => ( process.cwd()));
|
|
395
|
+
if (endDirectoryNames.some((endDirName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endDirName)))) {
|
|
396
|
+
return _startPath;
|
|
397
|
+
}
|
|
394
398
|
if (endFileNames.some((endFileName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endFileName)))) {
|
|
395
399
|
return _startPath;
|
|
396
400
|
}
|
|
397
401
|
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
398
402
|
const parent = _path.join.call(void 0, _startPath, "..");
|
|
399
|
-
return findFolderUp(parent, endFileNames);
|
|
403
|
+
return findFolderUp(parent, endFileNames, endDirectoryNames);
|
|
400
404
|
}
|
|
401
405
|
return void 0;
|
|
402
406
|
}
|
|
@@ -404,17 +408,17 @@ _chunkBGYQAVKQcjs.__name.call(void 0, findFolderUp, "findFolderUp");
|
|
|
404
408
|
|
|
405
409
|
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
406
410
|
var rootFiles = [
|
|
407
|
-
"storm.json",
|
|
408
|
-
"storm.json",
|
|
409
|
-
"storm.yaml",
|
|
410
|
-
"storm.yml",
|
|
411
|
-
"storm.js",
|
|
412
|
-
"storm.ts",
|
|
413
|
-
".storm.json",
|
|
414
|
-
".storm.yaml",
|
|
415
|
-
".storm.yml",
|
|
416
|
-
".storm.js",
|
|
417
|
-
".storm.ts",
|
|
411
|
+
"storm-workspace.json",
|
|
412
|
+
"storm-workspace.json",
|
|
413
|
+
"storm-workspace.yaml",
|
|
414
|
+
"storm-workspace.yml",
|
|
415
|
+
"storm-workspace.js",
|
|
416
|
+
"storm-workspace.ts",
|
|
417
|
+
".storm-workspace.json",
|
|
418
|
+
".storm-workspace.yaml",
|
|
419
|
+
".storm-workspace.yml",
|
|
420
|
+
".storm-workspace.js",
|
|
421
|
+
".storm-workspace.ts",
|
|
418
422
|
"lerna.json",
|
|
419
423
|
"nx.json",
|
|
420
424
|
"turbo.json",
|
|
@@ -438,11 +442,18 @@ var rootFiles = [
|
|
|
438
442
|
"pnpm-lock.yml",
|
|
439
443
|
"bun.lockb"
|
|
440
444
|
];
|
|
445
|
+
var rootDirectories = [
|
|
446
|
+
".storm-workspace",
|
|
447
|
+
".nx",
|
|
448
|
+
".github",
|
|
449
|
+
".vscode",
|
|
450
|
+
".verdaccio"
|
|
451
|
+
];
|
|
441
452
|
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
442
453
|
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
443
454
|
return correctPaths(_nullishCoalesce(process.env.STORM_WORKSPACE_ROOT, () => ( process.env.NX_WORKSPACE_ROOT_PATH)));
|
|
444
455
|
}
|
|
445
|
-
return correctPaths(findFolderUp(_nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())), rootFiles));
|
|
456
|
+
return correctPaths(findFolderUp(_nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())), rootFiles, rootDirectories));
|
|
446
457
|
}
|
|
447
458
|
_chunkBGYQAVKQcjs.__name.call(void 0, findWorkspaceRootSafe, "findWorkspaceRootSafe");
|
|
448
459
|
function findWorkspaceRoot(pathInsideMonorepo) {
|
|
@@ -312,7 +312,7 @@ var WorkspaceDirectoryConfigSchema = z.object({
|
|
|
312
312
|
build: z.string().trim().default("dist").describe("The directory used to store the workspace's distributable files after a build (relative to the workspace root)")
|
|
313
313
|
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
314
314
|
var StormConfigSchema = z.object({
|
|
315
|
-
$schema: z.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
|
|
315
|
+
$schema: z.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
|
|
316
316
|
extends: ExtendsSchema.optional(),
|
|
317
317
|
name: z.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
|
|
318
318
|
namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
@@ -354,6 +354,7 @@ var StormConfigSchema = z.object({
|
|
|
354
354
|
"trace",
|
|
355
355
|
"all"
|
|
356
356
|
]).default("info").describe("The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."),
|
|
357
|
+
skipConfigLogging: z.boolean().optional().describe("Should the logging of the current Storm Workspace configuration be skipped?"),
|
|
357
358
|
registry: RegistryConfigSchema,
|
|
358
359
|
configFile: z.string().trim().nullable().default(null).describe("The filepath of the Storm config. When this field is null, no config file was found in the current workspace."),
|
|
359
360
|
colors: ColorConfigSchema.or(ColorConfigMapSchema).describe("Storm theme config values used for styling various package elements"),
|
|
@@ -389,14 +390,17 @@ import { existsSync } from "node:fs";
|
|
|
389
390
|
import { join } from "node:path";
|
|
390
391
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
391
392
|
var depth = 0;
|
|
392
|
-
function findFolderUp(startPath, endFileNames) {
|
|
393
|
+
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
393
394
|
const _startPath = startPath ?? process.cwd();
|
|
395
|
+
if (endDirectoryNames.some((endDirName) => existsSync(join(_startPath, endDirName)))) {
|
|
396
|
+
return _startPath;
|
|
397
|
+
}
|
|
394
398
|
if (endFileNames.some((endFileName) => existsSync(join(_startPath, endFileName)))) {
|
|
395
399
|
return _startPath;
|
|
396
400
|
}
|
|
397
401
|
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
398
402
|
const parent = join(_startPath, "..");
|
|
399
|
-
return findFolderUp(parent, endFileNames);
|
|
403
|
+
return findFolderUp(parent, endFileNames, endDirectoryNames);
|
|
400
404
|
}
|
|
401
405
|
return void 0;
|
|
402
406
|
}
|
|
@@ -404,17 +408,17 @@ __name(findFolderUp, "findFolderUp");
|
|
|
404
408
|
|
|
405
409
|
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
406
410
|
var rootFiles = [
|
|
407
|
-
"storm.json",
|
|
408
|
-
"storm.json",
|
|
409
|
-
"storm.yaml",
|
|
410
|
-
"storm.yml",
|
|
411
|
-
"storm.js",
|
|
412
|
-
"storm.ts",
|
|
413
|
-
".storm.json",
|
|
414
|
-
".storm.yaml",
|
|
415
|
-
".storm.yml",
|
|
416
|
-
".storm.js",
|
|
417
|
-
".storm.ts",
|
|
411
|
+
"storm-workspace.json",
|
|
412
|
+
"storm-workspace.json",
|
|
413
|
+
"storm-workspace.yaml",
|
|
414
|
+
"storm-workspace.yml",
|
|
415
|
+
"storm-workspace.js",
|
|
416
|
+
"storm-workspace.ts",
|
|
417
|
+
".storm-workspace.json",
|
|
418
|
+
".storm-workspace.yaml",
|
|
419
|
+
".storm-workspace.yml",
|
|
420
|
+
".storm-workspace.js",
|
|
421
|
+
".storm-workspace.ts",
|
|
418
422
|
"lerna.json",
|
|
419
423
|
"nx.json",
|
|
420
424
|
"turbo.json",
|
|
@@ -438,11 +442,18 @@ var rootFiles = [
|
|
|
438
442
|
"pnpm-lock.yml",
|
|
439
443
|
"bun.lockb"
|
|
440
444
|
];
|
|
445
|
+
var rootDirectories = [
|
|
446
|
+
".storm-workspace",
|
|
447
|
+
".nx",
|
|
448
|
+
".github",
|
|
449
|
+
".vscode",
|
|
450
|
+
".verdaccio"
|
|
451
|
+
];
|
|
441
452
|
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
442
453
|
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
443
454
|
return correctPaths(process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH);
|
|
444
455
|
}
|
|
445
|
-
return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles));
|
|
456
|
+
return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles, rootDirectories));
|
|
446
457
|
}
|
|
447
458
|
__name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
|
|
448
459
|
function findWorkspaceRoot(pathInsideMonorepo) {
|