@storm-software/workspace-tools 1.43.4 → 1.43.6
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 +15 -0
- package/index.js +477 -461
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/base/index.js +51 -20
- package/src/executors/design-tokens/executor.js +50 -19
- package/src/executors/tsup/executor.js +457 -441
- package/src/executors/tsup-browser/executor.js +457 -441
- package/src/executors/tsup-neutral/executor.js +457 -441
- package/src/executors/tsup-node/executor.js +457 -441
- package/src/generators/browser-library/generator.js +50 -19
- package/src/generators/config-schema/generator.js +55 -24
- package/src/generators/neutral-library/generator.js +50 -19
- package/src/generators/node-library/generator.js +50 -19
- package/src/generators/preset/generator.js +50 -19
package/package.json
CHANGED
package/src/base/index.js
CHANGED
|
@@ -43545,17 +43545,17 @@ var LogLevelLabel = {
|
|
|
43545
43545
|
};
|
|
43546
43546
|
|
|
43547
43547
|
// packages/config-tools/src/utilities/find-up.ts
|
|
43548
|
-
var
|
|
43549
|
-
var
|
|
43548
|
+
var import_node_fs = require("node:fs");
|
|
43549
|
+
var import_node_path = require("node:path");
|
|
43550
43550
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
43551
43551
|
var depth = 0;
|
|
43552
43552
|
function findFolderUp(startPath, endFileNames) {
|
|
43553
43553
|
const _startPath = startPath ?? process.cwd();
|
|
43554
|
-
if (endFileNames.some((endFileName) => (0,
|
|
43554
|
+
if (endFileNames.some((endFileName) => (0, import_node_fs.existsSync)((0, import_node_path.join)(_startPath, endFileName)))) {
|
|
43555
43555
|
return _startPath;
|
|
43556
43556
|
}
|
|
43557
43557
|
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
43558
|
-
const parent = (0,
|
|
43558
|
+
const parent = (0, import_node_path.join)(_startPath, "..");
|
|
43559
43559
|
return findFolderUp(parent, endFileNames);
|
|
43560
43560
|
}
|
|
43561
43561
|
return void 0;
|
|
@@ -43614,8 +43614,8 @@ Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
|
|
|
43614
43614
|
}
|
|
43615
43615
|
|
|
43616
43616
|
// packages/config-tools/src/utilities/get-default-config.ts
|
|
43617
|
-
var
|
|
43618
|
-
var
|
|
43617
|
+
var import_node_fs2 = require("node:fs");
|
|
43618
|
+
var import_node_path2 = require("node:path");
|
|
43619
43619
|
|
|
43620
43620
|
// node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/index.mjs
|
|
43621
43621
|
var util;
|
|
@@ -47284,8 +47284,8 @@ var getDefaultConfig = (config = {}, root) => {
|
|
|
47284
47284
|
let license = DefaultStormConfig.license;
|
|
47285
47285
|
let homepage = DefaultStormConfig.homepage;
|
|
47286
47286
|
const workspaceRoot = findWorkspaceRoot(root);
|
|
47287
|
-
if ((0,
|
|
47288
|
-
const file = (0,
|
|
47287
|
+
if ((0, import_node_fs2.existsSync)((0, import_node_path2.join)(workspaceRoot, "package.json"))) {
|
|
47288
|
+
const file = (0, import_node_fs2.readFileSync)((0, import_node_path2.join)(workspaceRoot, "package.json"), {
|
|
47289
47289
|
encoding: "utf-8"
|
|
47290
47290
|
});
|
|
47291
47291
|
if (file) {
|
|
@@ -47386,12 +47386,14 @@ var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
|
|
|
47386
47386
|
console.error(
|
|
47387
47387
|
`
|
|
47388
47388
|
|
|
47389
|
+
|
|
47389
47390
|
${chalk.bold.hex(config?.colors?.fatal ? config.colors.fatal : "#1fb2a6")(
|
|
47390
47391
|
">"
|
|
47391
47392
|
)} ${chalk.bold.bgHex(config?.colors?.fatal ? config.colors.fatal : "#1fb2a6").white(" \u{1F480} Fatal ")} ${chalk.reset.hex(
|
|
47392
47393
|
config?.colors?.fatal ? config.colors.fatal : "#1fb2a6"
|
|
47393
47394
|
)(message)}
|
|
47394
47395
|
|
|
47396
|
+
|
|
47395
47397
|
`
|
|
47396
47398
|
);
|
|
47397
47399
|
};
|
|
@@ -47401,12 +47403,14 @@ var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
|
|
|
47401
47403
|
console.error(
|
|
47402
47404
|
`
|
|
47403
47405
|
|
|
47406
|
+
|
|
47404
47407
|
${chalk.bold.hex(config?.colors?.error ? config.colors.error : "#7d1a1a")(
|
|
47405
47408
|
">"
|
|
47406
47409
|
)} ${chalk.bold.bgHex(config?.colors?.error ? config.colors.error : "#7d1a1a").white(" \u{1F6D1} Error ")} ${chalk.reset.hex(
|
|
47407
47410
|
config?.colors?.error ? config.colors.error : "#7d1a1a"
|
|
47408
47411
|
)(message)}
|
|
47409
47412
|
|
|
47413
|
+
|
|
47410
47414
|
`
|
|
47411
47415
|
);
|
|
47412
47416
|
};
|
|
@@ -47416,12 +47420,14 @@ var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
|
|
|
47416
47420
|
console.warn(
|
|
47417
47421
|
`
|
|
47418
47422
|
|
|
47423
|
+
|
|
47419
47424
|
${chalk.bold.hex(config?.colors?.warning ? config.colors.warning : "#fcc419")(
|
|
47420
47425
|
">"
|
|
47421
47426
|
)} ${chalk.bold.bgHex(config?.colors?.warning ? config.colors.warning : "#fcc419").white(" \u26A0\uFE0F Warn ")} ${chalk.reset.hex(
|
|
47422
47427
|
config?.colors?.warning ? config.colors.warning : "#fcc419"
|
|
47423
47428
|
)(message)}
|
|
47424
47429
|
|
|
47430
|
+
|
|
47425
47431
|
`
|
|
47426
47432
|
);
|
|
47427
47433
|
};
|
|
@@ -47431,12 +47437,14 @@ var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
|
|
|
47431
47437
|
console.info(
|
|
47432
47438
|
`
|
|
47433
47439
|
|
|
47440
|
+
|
|
47434
47441
|
${chalk.bold.hex(config?.colors?.info ? config.colors.info : "#0ea5e9")(
|
|
47435
47442
|
">"
|
|
47436
47443
|
)} ${chalk.bold.bgHex(config?.colors?.info ? config.colors.info : "#0ea5e9").white(" \u{1F4EC} Info ")} ${chalk.reset.hex(
|
|
47437
47444
|
config?.colors?.info ? config.colors.info : "#0ea5e9"
|
|
47438
47445
|
)(message)}
|
|
47439
47446
|
|
|
47447
|
+
|
|
47440
47448
|
`
|
|
47441
47449
|
);
|
|
47442
47450
|
};
|
|
@@ -47446,12 +47454,14 @@ var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
|
|
|
47446
47454
|
console.info(
|
|
47447
47455
|
`
|
|
47448
47456
|
|
|
47457
|
+
|
|
47449
47458
|
${chalk.bold.hex(config?.colors?.success ? config.colors.success : "#087f5b")(
|
|
47450
47459
|
">"
|
|
47451
47460
|
)} ${chalk.bold.bgHex(config?.colors?.success ? config.colors.success : "#087f5b").white(" \u{1F389} Success ")} ${chalk.reset.hex(
|
|
47452
47461
|
config?.colors?.success ? config.colors.success : "#087f5b"
|
|
47453
47462
|
)(message)}
|
|
47454
47463
|
|
|
47464
|
+
|
|
47455
47465
|
`
|
|
47456
47466
|
);
|
|
47457
47467
|
};
|
|
@@ -47461,12 +47471,14 @@ var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
|
|
|
47461
47471
|
console.debug(
|
|
47462
47472
|
`
|
|
47463
47473
|
|
|
47474
|
+
|
|
47464
47475
|
${chalk.bold.hex(config?.colors?.primary ? config.colors.primary : "#1fb2a6")(
|
|
47465
47476
|
">"
|
|
47466
47477
|
)} ${chalk.bold.bgHex(config?.colors?.primary ? config.colors.primary : "#1fb2a6").white(" \u{1F9EA} Debug ")} ${chalk.reset.hex(
|
|
47467
47478
|
config?.colors?.primary ? config.colors.primary : "#1fb2a6"
|
|
47468
47479
|
)(message)}
|
|
47469
47480
|
|
|
47481
|
+
|
|
47470
47482
|
`
|
|
47471
47483
|
);
|
|
47472
47484
|
};
|
|
@@ -47475,18 +47487,21 @@ var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
|
|
|
47475
47487
|
console.log(
|
|
47476
47488
|
`
|
|
47477
47489
|
|
|
47490
|
+
|
|
47478
47491
|
${chalk.bold.hex(config?.colors?.primary ? config.colors.primary : "#1fb2a6")(
|
|
47479
47492
|
">"
|
|
47480
47493
|
)} ${chalk.bold.bgHex(config?.colors?.primary ? config.colors.primary : "#1fb2a6").white(" \u{1F4E2} System ")} ${chalk.bold.hex(
|
|
47481
47494
|
config?.colors?.primary ? config.colors.primary : "#1fb2a6"
|
|
47482
47495
|
)(message)}
|
|
47483
47496
|
|
|
47497
|
+
|
|
47484
47498
|
`
|
|
47485
47499
|
);
|
|
47486
47500
|
};
|
|
47487
47501
|
};
|
|
47488
47502
|
var writeFatal = (config, message) => getLogFn(config, LogLevel.FATAL)(message);
|
|
47489
47503
|
var writeError = (config, message) => getLogFn(config, LogLevel.ERROR)(message);
|
|
47504
|
+
var writeWarning = (config, message) => getLogFn(config, LogLevel.WARN)(message);
|
|
47490
47505
|
var writeInfo = (config, message) => getLogFn(config, LogLevel.INFO)(message);
|
|
47491
47506
|
var writeSuccess = (config, message) => getLogFn(config, LogLevel.SUCCESS)(message);
|
|
47492
47507
|
var writeDebug = (config, message) => getLogFn(config, LogLevel.DEBUG)(message);
|
|
@@ -47639,16 +47654,6 @@ var setConfigEnv = (config) => {
|
|
|
47639
47654
|
}
|
|
47640
47655
|
};
|
|
47641
47656
|
|
|
47642
|
-
// packages/config-tools/src/utilities/prepare-workspace.ts
|
|
47643
|
-
var prepareWorkspace = async () => {
|
|
47644
|
-
const _STORM_CONFIG = getDefaultConfig({
|
|
47645
|
-
...await getConfigFile(),
|
|
47646
|
-
...getConfigEnv()
|
|
47647
|
-
});
|
|
47648
|
-
setConfigEnv(_STORM_CONFIG);
|
|
47649
|
-
return _STORM_CONFIG;
|
|
47650
|
-
};
|
|
47651
|
-
|
|
47652
47657
|
// packages/config-tools/src/env/get-env.ts
|
|
47653
47658
|
var getExtensionEnv = (extensionName) => {
|
|
47654
47659
|
const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
|
|
@@ -47716,6 +47721,32 @@ var getConfigEnv = () => {
|
|
|
47716
47721
|
}, config);
|
|
47717
47722
|
};
|
|
47718
47723
|
|
|
47724
|
+
// packages/config-tools/src/create-storm-config.ts
|
|
47725
|
+
var loadStormConfig = async (workspaceRoot) => {
|
|
47726
|
+
let config = {};
|
|
47727
|
+
let _workspaceRoot = workspaceRoot;
|
|
47728
|
+
if (!_workspaceRoot) {
|
|
47729
|
+
_workspaceRoot = findWorkspaceRoot();
|
|
47730
|
+
}
|
|
47731
|
+
const configFile = await getDefaultConfig(
|
|
47732
|
+
{
|
|
47733
|
+
...await getConfigFile(_workspaceRoot),
|
|
47734
|
+
...getConfigEnv()
|
|
47735
|
+
},
|
|
47736
|
+
_workspaceRoot
|
|
47737
|
+
);
|
|
47738
|
+
if (configFile) {
|
|
47739
|
+
config = StormConfigSchema.parse(configFile);
|
|
47740
|
+
} else {
|
|
47741
|
+
writeWarning(
|
|
47742
|
+
config,
|
|
47743
|
+
"No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.config.js` file to the root of your workspace if it is not."
|
|
47744
|
+
);
|
|
47745
|
+
}
|
|
47746
|
+
setConfigEnv(config);
|
|
47747
|
+
return config;
|
|
47748
|
+
};
|
|
47749
|
+
|
|
47719
47750
|
// packages/workspace-tools/src/utils/get-workspace-root.ts
|
|
47720
47751
|
var import_find_workspace_root2 = require("nx/src/utils/find-workspace-root.js");
|
|
47721
47752
|
var getWorkspaceRoot = () => {
|
|
@@ -47854,7 +47885,7 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
|
|
|
47854
47885
|
- projectName: ${projectName}
|
|
47855
47886
|
`
|
|
47856
47887
|
);
|
|
47857
|
-
config = await
|
|
47888
|
+
config = await loadStormConfig(workspaceRoot);
|
|
47858
47889
|
writeTrace(
|
|
47859
47890
|
config,
|
|
47860
47891
|
`Loaded Storm config into env:
|
|
@@ -47942,7 +47973,7 @@ var withRunGenerator = (name, generatorFn, generatorOptions = {
|
|
|
47942
47973
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
47943
47974
|
- workspaceRoot: ${workspaceRoot}`
|
|
47944
47975
|
);
|
|
47945
|
-
config = await
|
|
47976
|
+
config = await loadStormConfig(workspaceRoot);
|
|
47946
47977
|
writeTrace(
|
|
47947
47978
|
config,
|
|
47948
47979
|
`Loaded Storm config into env:
|
|
@@ -61461,17 +61461,17 @@ var LogLevelLabel = {
|
|
|
61461
61461
|
};
|
|
61462
61462
|
|
|
61463
61463
|
// packages/config-tools/src/utilities/find-up.ts
|
|
61464
|
-
var
|
|
61465
|
-
var
|
|
61464
|
+
var import_node_fs = require("node:fs");
|
|
61465
|
+
var import_node_path = require("node:path");
|
|
61466
61466
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
61467
61467
|
var depth = 0;
|
|
61468
61468
|
function findFolderUp(startPath, endFileNames) {
|
|
61469
61469
|
const _startPath = startPath ?? process.cwd();
|
|
61470
|
-
if (endFileNames.some((endFileName) => (0,
|
|
61470
|
+
if (endFileNames.some((endFileName) => (0, import_node_fs.existsSync)((0, import_node_path.join)(_startPath, endFileName)))) {
|
|
61471
61471
|
return _startPath;
|
|
61472
61472
|
}
|
|
61473
61473
|
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
61474
|
-
const parent = (0,
|
|
61474
|
+
const parent = (0, import_node_path.join)(_startPath, "..");
|
|
61475
61475
|
return findFolderUp(parent, endFileNames);
|
|
61476
61476
|
}
|
|
61477
61477
|
return void 0;
|
|
@@ -61530,8 +61530,8 @@ Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
|
|
|
61530
61530
|
}
|
|
61531
61531
|
|
|
61532
61532
|
// packages/config-tools/src/utilities/get-default-config.ts
|
|
61533
|
-
var
|
|
61534
|
-
var
|
|
61533
|
+
var import_node_fs2 = require("node:fs");
|
|
61534
|
+
var import_node_path2 = require("node:path");
|
|
61535
61535
|
|
|
61536
61536
|
// node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/index.mjs
|
|
61537
61537
|
var util;
|
|
@@ -65200,8 +65200,8 @@ var getDefaultConfig = (config = {}, root) => {
|
|
|
65200
65200
|
let license = DefaultStormConfig.license;
|
|
65201
65201
|
let homepage = DefaultStormConfig.homepage;
|
|
65202
65202
|
const workspaceRoot = findWorkspaceRoot(root);
|
|
65203
|
-
if ((0,
|
|
65204
|
-
const file = (0,
|
|
65203
|
+
if ((0, import_node_fs2.existsSync)((0, import_node_path2.join)(workspaceRoot, "package.json"))) {
|
|
65204
|
+
const file = (0, import_node_fs2.readFileSync)((0, import_node_path2.join)(workspaceRoot, "package.json"), {
|
|
65205
65205
|
encoding: "utf-8"
|
|
65206
65206
|
});
|
|
65207
65207
|
if (file) {
|
|
@@ -65302,12 +65302,14 @@ var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
|
|
|
65302
65302
|
console.error(
|
|
65303
65303
|
`
|
|
65304
65304
|
|
|
65305
|
+
|
|
65305
65306
|
${chalk.bold.hex(config?.colors?.fatal ? config.colors.fatal : "#1fb2a6")(
|
|
65306
65307
|
">"
|
|
65307
65308
|
)} ${chalk.bold.bgHex(config?.colors?.fatal ? config.colors.fatal : "#1fb2a6").white(" \u{1F480} Fatal ")} ${chalk.reset.hex(
|
|
65308
65309
|
config?.colors?.fatal ? config.colors.fatal : "#1fb2a6"
|
|
65309
65310
|
)(message)}
|
|
65310
65311
|
|
|
65312
|
+
|
|
65311
65313
|
`
|
|
65312
65314
|
);
|
|
65313
65315
|
};
|
|
@@ -65317,12 +65319,14 @@ var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
|
|
|
65317
65319
|
console.error(
|
|
65318
65320
|
`
|
|
65319
65321
|
|
|
65322
|
+
|
|
65320
65323
|
${chalk.bold.hex(config?.colors?.error ? config.colors.error : "#7d1a1a")(
|
|
65321
65324
|
">"
|
|
65322
65325
|
)} ${chalk.bold.bgHex(config?.colors?.error ? config.colors.error : "#7d1a1a").white(" \u{1F6D1} Error ")} ${chalk.reset.hex(
|
|
65323
65326
|
config?.colors?.error ? config.colors.error : "#7d1a1a"
|
|
65324
65327
|
)(message)}
|
|
65325
65328
|
|
|
65329
|
+
|
|
65326
65330
|
`
|
|
65327
65331
|
);
|
|
65328
65332
|
};
|
|
@@ -65332,12 +65336,14 @@ var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
|
|
|
65332
65336
|
console.warn(
|
|
65333
65337
|
`
|
|
65334
65338
|
|
|
65339
|
+
|
|
65335
65340
|
${chalk.bold.hex(config?.colors?.warning ? config.colors.warning : "#fcc419")(
|
|
65336
65341
|
">"
|
|
65337
65342
|
)} ${chalk.bold.bgHex(config?.colors?.warning ? config.colors.warning : "#fcc419").white(" \u26A0\uFE0F Warn ")} ${chalk.reset.hex(
|
|
65338
65343
|
config?.colors?.warning ? config.colors.warning : "#fcc419"
|
|
65339
65344
|
)(message)}
|
|
65340
65345
|
|
|
65346
|
+
|
|
65341
65347
|
`
|
|
65342
65348
|
);
|
|
65343
65349
|
};
|
|
@@ -65347,12 +65353,14 @@ var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
|
|
|
65347
65353
|
console.info(
|
|
65348
65354
|
`
|
|
65349
65355
|
|
|
65356
|
+
|
|
65350
65357
|
${chalk.bold.hex(config?.colors?.info ? config.colors.info : "#0ea5e9")(
|
|
65351
65358
|
">"
|
|
65352
65359
|
)} ${chalk.bold.bgHex(config?.colors?.info ? config.colors.info : "#0ea5e9").white(" \u{1F4EC} Info ")} ${chalk.reset.hex(
|
|
65353
65360
|
config?.colors?.info ? config.colors.info : "#0ea5e9"
|
|
65354
65361
|
)(message)}
|
|
65355
65362
|
|
|
65363
|
+
|
|
65356
65364
|
`
|
|
65357
65365
|
);
|
|
65358
65366
|
};
|
|
@@ -65362,12 +65370,14 @@ var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
|
|
|
65362
65370
|
console.info(
|
|
65363
65371
|
`
|
|
65364
65372
|
|
|
65373
|
+
|
|
65365
65374
|
${chalk.bold.hex(config?.colors?.success ? config.colors.success : "#087f5b")(
|
|
65366
65375
|
">"
|
|
65367
65376
|
)} ${chalk.bold.bgHex(config?.colors?.success ? config.colors.success : "#087f5b").white(" \u{1F389} Success ")} ${chalk.reset.hex(
|
|
65368
65377
|
config?.colors?.success ? config.colors.success : "#087f5b"
|
|
65369
65378
|
)(message)}
|
|
65370
65379
|
|
|
65380
|
+
|
|
65371
65381
|
`
|
|
65372
65382
|
);
|
|
65373
65383
|
};
|
|
@@ -65377,12 +65387,14 @@ var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
|
|
|
65377
65387
|
console.debug(
|
|
65378
65388
|
`
|
|
65379
65389
|
|
|
65390
|
+
|
|
65380
65391
|
${chalk.bold.hex(config?.colors?.primary ? config.colors.primary : "#1fb2a6")(
|
|
65381
65392
|
">"
|
|
65382
65393
|
)} ${chalk.bold.bgHex(config?.colors?.primary ? config.colors.primary : "#1fb2a6").white(" \u{1F9EA} Debug ")} ${chalk.reset.hex(
|
|
65383
65394
|
config?.colors?.primary ? config.colors.primary : "#1fb2a6"
|
|
65384
65395
|
)(message)}
|
|
65385
65396
|
|
|
65397
|
+
|
|
65386
65398
|
`
|
|
65387
65399
|
);
|
|
65388
65400
|
};
|
|
@@ -65391,18 +65403,21 @@ var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
|
|
|
65391
65403
|
console.log(
|
|
65392
65404
|
`
|
|
65393
65405
|
|
|
65406
|
+
|
|
65394
65407
|
${chalk.bold.hex(config?.colors?.primary ? config.colors.primary : "#1fb2a6")(
|
|
65395
65408
|
">"
|
|
65396
65409
|
)} ${chalk.bold.bgHex(config?.colors?.primary ? config.colors.primary : "#1fb2a6").white(" \u{1F4E2} System ")} ${chalk.bold.hex(
|
|
65397
65410
|
config?.colors?.primary ? config.colors.primary : "#1fb2a6"
|
|
65398
65411
|
)(message)}
|
|
65399
65412
|
|
|
65413
|
+
|
|
65400
65414
|
`
|
|
65401
65415
|
);
|
|
65402
65416
|
};
|
|
65403
65417
|
};
|
|
65404
65418
|
var writeFatal = (config, message) => getLogFn(config, LogLevel.FATAL)(message);
|
|
65405
65419
|
var writeError = (config, message) => getLogFn(config, LogLevel.ERROR)(message);
|
|
65420
|
+
var writeWarning = (config, message) => getLogFn(config, LogLevel.WARN)(message);
|
|
65406
65421
|
var writeInfo = (config, message) => getLogFn(config, LogLevel.INFO)(message);
|
|
65407
65422
|
var writeSuccess = (config, message) => getLogFn(config, LogLevel.SUCCESS)(message);
|
|
65408
65423
|
var writeDebug = (config, message) => getLogFn(config, LogLevel.DEBUG)(message);
|
|
@@ -65555,16 +65570,6 @@ var setConfigEnv = (config) => {
|
|
|
65555
65570
|
}
|
|
65556
65571
|
};
|
|
65557
65572
|
|
|
65558
|
-
// packages/config-tools/src/utilities/prepare-workspace.ts
|
|
65559
|
-
var prepareWorkspace = async () => {
|
|
65560
|
-
const _STORM_CONFIG = getDefaultConfig({
|
|
65561
|
-
...await getConfigFile(),
|
|
65562
|
-
...getConfigEnv()
|
|
65563
|
-
});
|
|
65564
|
-
setConfigEnv(_STORM_CONFIG);
|
|
65565
|
-
return _STORM_CONFIG;
|
|
65566
|
-
};
|
|
65567
|
-
|
|
65568
65573
|
// packages/config-tools/src/env/get-env.ts
|
|
65569
65574
|
var getExtensionEnv = (extensionName) => {
|
|
65570
65575
|
const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
|
|
@@ -65632,6 +65637,32 @@ var getConfigEnv = () => {
|
|
|
65632
65637
|
}, config);
|
|
65633
65638
|
};
|
|
65634
65639
|
|
|
65640
|
+
// packages/config-tools/src/create-storm-config.ts
|
|
65641
|
+
var loadStormConfig = async (workspaceRoot) => {
|
|
65642
|
+
let config = {};
|
|
65643
|
+
let _workspaceRoot = workspaceRoot;
|
|
65644
|
+
if (!_workspaceRoot) {
|
|
65645
|
+
_workspaceRoot = findWorkspaceRoot();
|
|
65646
|
+
}
|
|
65647
|
+
const configFile = await getDefaultConfig(
|
|
65648
|
+
{
|
|
65649
|
+
...await getConfigFile(_workspaceRoot),
|
|
65650
|
+
...getConfigEnv()
|
|
65651
|
+
},
|
|
65652
|
+
_workspaceRoot
|
|
65653
|
+
);
|
|
65654
|
+
if (configFile) {
|
|
65655
|
+
config = StormConfigSchema.parse(configFile);
|
|
65656
|
+
} else {
|
|
65657
|
+
writeWarning(
|
|
65658
|
+
config,
|
|
65659
|
+
"No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.config.js` file to the root of your workspace if it is not."
|
|
65660
|
+
);
|
|
65661
|
+
}
|
|
65662
|
+
setConfigEnv(config);
|
|
65663
|
+
return config;
|
|
65664
|
+
};
|
|
65665
|
+
|
|
65635
65666
|
// packages/workspace-tools/src/utils/get-workspace-root.ts
|
|
65636
65667
|
var import_find_workspace_root2 = require("nx/src/utils/find-workspace-root.js");
|
|
65637
65668
|
var getWorkspaceRoot = () => {
|
|
@@ -65744,7 +65775,7 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
|
|
|
65744
65775
|
- projectName: ${projectName}
|
|
65745
65776
|
`
|
|
65746
65777
|
);
|
|
65747
|
-
config = await
|
|
65778
|
+
config = await loadStormConfig(workspaceRoot);
|
|
65748
65779
|
writeTrace(
|
|
65749
65780
|
config,
|
|
65750
65781
|
`Loaded Storm config into env:
|