@storm-software/git-tools 2.88.1 → 2.88.3
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/{chunk-U55MG3QC.js → chunk-PLNZHR5C.js} +113 -57
- package/bin/{chunk-GZO33STH.cjs → chunk-UJOC6MGU.cjs} +122 -66
- package/bin/git.cjs +69 -69
- package/bin/git.js +4 -4
- package/bin/post-checkout.cjs +9 -9
- package/bin/post-checkout.js +3 -3
- package/bin/post-commit.cjs +9 -9
- package/bin/post-commit.js +3 -3
- package/bin/post-merge.cjs +9 -9
- package/bin/post-merge.js +3 -3
- package/bin/pre-commit.cjs +9 -9
- package/bin/pre-commit.js +3 -3
- package/bin/pre-install.cjs +9 -9
- package/bin/pre-install.js +3 -3
- package/bin/pre-push.cjs +13 -13
- package/bin/pre-push.js +3 -3
- package/bin/prepare.cjs +7 -7
- package/bin/prepare.js +3 -3
- package/bin/version-warning.cjs +5 -5
- package/bin/version-warning.js +3 -3
- package/package.json +1 -1
|
@@ -56581,6 +56581,8 @@ var ColorConfigMapSchema = z.union([
|
|
|
56581
56581
|
}),
|
|
56582
56582
|
z.record(z.string(), ColorConfigSchema)
|
|
56583
56583
|
]);
|
|
56584
|
+
var ExtendsItemSchema = z.string().trim().describe("The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration.");
|
|
56585
|
+
var ExtendsSchema = ExtendsItemSchema.or(z.array(ExtendsItemSchema)).describe("The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration.");
|
|
56584
56586
|
var WorkspaceBotConfigSchema = z.object({
|
|
56585
56587
|
name: z.string().trim().default("Stormie-Bot").describe("The workspace bot user's name (this is the bot that will be used to perform various tasks)"),
|
|
56586
56588
|
email: z.string().trim().email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
|
|
@@ -56595,11 +56597,11 @@ var WorkspaceDirectoryConfigSchema = z.object({
|
|
|
56595
56597
|
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
56596
56598
|
var StormConfigSchema = z.object({
|
|
56597
56599
|
$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"),
|
|
56598
|
-
extends:
|
|
56600
|
+
extends: ExtendsSchema.optional(),
|
|
56599
56601
|
name: z.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
|
|
56600
56602
|
namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
56601
56603
|
organization: z.string().trim().default("storm-software").describe("The organization of the workspace"),
|
|
56602
|
-
repository: z.string().trim().
|
|
56604
|
+
repository: z.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
56603
56605
|
license: z.string().trim().default("Apache-2.0").describe("The license type of the package"),
|
|
56604
56606
|
homepage: z.string().trim().url().default(STORM_DEFAULT_HOMEPAGE).describe("The homepage of the workspace"),
|
|
56605
56607
|
docs: z.string().trim().url().default(STORM_DEFAULT_DOCS).describe("The base documentation site for the workspace"),
|
|
@@ -56664,11 +56666,9 @@ var COLOR_KEYS = [
|
|
|
56664
56666
|
|
|
56665
56667
|
// ../config-tools/src/utilities/get-default-config.ts
|
|
56666
56668
|
var _fs3 = require('fs');
|
|
56669
|
+
var _promises = require('fs/promises');
|
|
56667
56670
|
var _path2 = require('path');
|
|
56668
56671
|
|
|
56669
|
-
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
56670
|
-
_chunkEM6PLOYYcjs.init_cjs_shims.call(void 0, );
|
|
56671
|
-
|
|
56672
56672
|
// ../config-tools/src/utilities/correct-paths.ts
|
|
56673
56673
|
_chunkEM6PLOYYcjs.init_cjs_shims.call(void 0, );
|
|
56674
56674
|
var import_devkit = _chunkEM6PLOYYcjs.__toESM.call(void 0, require_devkit(), 1);
|
|
@@ -56688,6 +56688,9 @@ var joinPaths = /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, (...paths)
|
|
|
56688
56688
|
return correctPaths((0, import_devkit.joinPathFragments)(...paths.map((path) => correctPaths(path))));
|
|
56689
56689
|
}, "joinPaths");
|
|
56690
56690
|
|
|
56691
|
+
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
56692
|
+
_chunkEM6PLOYYcjs.init_cjs_shims.call(void 0, );
|
|
56693
|
+
|
|
56691
56694
|
// ../config-tools/src/utilities/find-up.ts
|
|
56692
56695
|
_chunkEM6PLOYYcjs.init_cjs_shims.call(void 0, );
|
|
56693
56696
|
|
|
@@ -56790,17 +56793,15 @@ var DEFAULT_COLOR_CONFIG = {
|
|
|
56790
56793
|
"negative": "#dc2626"
|
|
56791
56794
|
}
|
|
56792
56795
|
};
|
|
56793
|
-
var getDefaultConfig = /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, (root) => {
|
|
56796
|
+
var getDefaultConfig = /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, async (root) => {
|
|
56794
56797
|
let license = STORM_DEFAULT_LICENSE;
|
|
56795
56798
|
let homepage = STORM_DEFAULT_HOMEPAGE;
|
|
56796
|
-
let name;
|
|
56797
|
-
let namespace;
|
|
56798
|
-
let repository;
|
|
56799
|
+
let name = void 0;
|
|
56800
|
+
let namespace = void 0;
|
|
56801
|
+
let repository = void 0;
|
|
56799
56802
|
const workspaceRoot = findWorkspaceRoot(root);
|
|
56800
56803
|
if (_fs3.existsSync.call(void 0, _path2.join.call(void 0, workspaceRoot, "package.json"))) {
|
|
56801
|
-
const file =
|
|
56802
|
-
encoding: "utf8"
|
|
56803
|
-
});
|
|
56804
|
+
const file = await _promises.readFile.call(void 0, joinPaths(workspaceRoot, "package.json"), "utf8");
|
|
56804
56805
|
if (file) {
|
|
56805
56806
|
const packageJson = JSON.parse(file);
|
|
56806
56807
|
if (packageJson.name) {
|
|
@@ -56809,8 +56810,12 @@ var getDefaultConfig = /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, (ro
|
|
|
56809
56810
|
if (packageJson.namespace) {
|
|
56810
56811
|
namespace = packageJson.namespace;
|
|
56811
56812
|
}
|
|
56812
|
-
if (
|
|
56813
|
-
|
|
56813
|
+
if (packageJson.repository) {
|
|
56814
|
+
if (typeof packageJson.repository === "string") {
|
|
56815
|
+
repository = packageJson.repository;
|
|
56816
|
+
} else if (packageJson.repository.url) {
|
|
56817
|
+
repository = packageJson.repository.url;
|
|
56818
|
+
}
|
|
56814
56819
|
}
|
|
56815
56820
|
if (packageJson.license) {
|
|
56816
56821
|
license = packageJson.license;
|
|
@@ -56856,7 +56861,7 @@ var chalkDefault = {
|
|
|
56856
56861
|
};
|
|
56857
56862
|
var getChalk = /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, () => {
|
|
56858
56863
|
let _chalk = import_chalk.default;
|
|
56859
|
-
if (!_optionalChain([_chalk, 'optionalAccess',
|
|
56864
|
+
if (!_optionalChain([_chalk, 'optionalAccess', _119 => _119.hex]) || !_optionalChain([_chalk, 'optionalAccess', _120 => _120.bold, 'optionalAccess', _121 => _121.hex]) || !_optionalChain([_chalk, 'optionalAccess', _122 => _122.bgHex]) || !_optionalChain([_chalk, 'optionalAccess', _123 => _123.whiteBright])) {
|
|
56860
56865
|
_chalk = chalkDefault;
|
|
56861
56866
|
}
|
|
56862
56867
|
return _chalk;
|
|
@@ -56958,7 +56963,7 @@ var isVerbose = /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, (label = L
|
|
|
56958
56963
|
|
|
56959
56964
|
// ../config-tools/src/logger/console.ts
|
|
56960
56965
|
var getLogFn = /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, (logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
|
|
56961
|
-
const colors = !_optionalChain([config, 'access',
|
|
56966
|
+
const colors = !_optionalChain([config, 'access', _124 => _124.colors, 'optionalAccess', _125 => _125.dark]) && !_optionalChain([config, 'access', _126 => _126.colors, 'optionalAccess', _127 => _127["base"]]) && !_optionalChain([config, 'access', _128 => _128.colors, 'optionalAccess', _129 => _129["base"], 'optionalAccess', _130 => _130.dark]) ? DEFAULT_COLOR_CONFIG : _optionalChain([config, 'access', _131 => _131.colors, 'optionalAccess', _132 => _132.dark]) && typeof config.colors.dark === "string" ? config.colors : _optionalChain([config, 'access', _133 => _133.colors, 'optionalAccess', _134 => _134["base"], 'optionalAccess', _135 => _135.dark]) && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : _optionalChain([config, 'access', _136 => _136.colors, 'optionalAccess', _137 => _137["base"]]) ? _optionalChain([config, 'access', _138 => _138.colors, 'optionalAccess', _139 => _139["base"]]) : DEFAULT_COLOR_CONFIG;
|
|
56962
56967
|
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
|
|
56963
56968
|
if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
|
|
56964
56969
|
return (_) => {
|
|
@@ -57026,7 +57031,6 @@ var writeInfo = /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, (message,
|
|
|
57026
57031
|
var writeSuccess = /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.SUCCESS, config)(message), "writeSuccess");
|
|
57027
57032
|
var writeDebug = /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.DEBUG, config)(message), "writeDebug");
|
|
57028
57033
|
var writeTrace = /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.TRACE, config)(message), "writeTrace");
|
|
57029
|
-
var writeSystem = /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.ALL, config)(message), "writeSystem");
|
|
57030
57034
|
var MAX_DEPTH = 4;
|
|
57031
57035
|
var formatLogMessage = /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, (message, options = {}, depth2 = 0) => {
|
|
57032
57036
|
if (depth2 > MAX_DEPTH) {
|
|
@@ -57046,7 +57050,7 @@ ${Object.keys(message).filter((key) => !skip.includes(key)).map((key) => ` ${pre
|
|
|
57046
57050
|
}, "formatLogMessage");
|
|
57047
57051
|
var _isFunction = /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, (value2) => {
|
|
57048
57052
|
try {
|
|
57049
|
-
return value2 instanceof Function || typeof value2 === "function" || !!(_optionalChain([value2, 'optionalAccess',
|
|
57053
|
+
return value2 instanceof Function || typeof value2 === "function" || !!(_optionalChain([value2, 'optionalAccess', _140 => _140.constructor]) && _optionalChain([value2, 'optionalAccess', _141 => _141.call]) && _optionalChain([value2, 'optionalAccess', _142 => _142.apply]));
|
|
57050
57054
|
} catch (e) {
|
|
57051
57055
|
return false;
|
|
57052
57056
|
}
|
|
@@ -57087,6 +57091,9 @@ Stacktrace: ${error.stack}`, config);
|
|
|
57087
57091
|
});
|
|
57088
57092
|
}, "handleProcess");
|
|
57089
57093
|
|
|
57094
|
+
// ../config-tools/src/get-config.ts
|
|
57095
|
+
_chunkEM6PLOYYcjs.init_cjs_shims.call(void 0, );
|
|
57096
|
+
|
|
57090
57097
|
// ../config-tools/src/create-storm-config.ts
|
|
57091
57098
|
_chunkEM6PLOYYcjs.init_cjs_shims.call(void 0, );
|
|
57092
57099
|
|
|
@@ -57099,7 +57106,7 @@ _chunkEM6PLOYYcjs.init_cjs_shims.call(void 0, );
|
|
|
57099
57106
|
// ../../node_modules/.pnpm/c12@2.0.1/node_modules/c12/dist/shared/c12.B4fc1S0C.mjs
|
|
57100
57107
|
_chunkEM6PLOYYcjs.init_cjs_shims.call(void 0, );
|
|
57101
57108
|
|
|
57102
|
-
|
|
57109
|
+
|
|
57103
57110
|
var _os = require('os');
|
|
57104
57111
|
|
|
57105
57112
|
// ../../node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/lib/jiti.mjs
|
|
@@ -58043,7 +58050,7 @@ async function loadDotenv(options) {
|
|
|
58043
58050
|
const parsed = dotenv.parse(await _fs3.promises.readFile(dotenvFile, "utf8"));
|
|
58044
58051
|
Object.assign(environment, parsed);
|
|
58045
58052
|
}
|
|
58046
|
-
if (!_optionalChain([options, 'access',
|
|
58053
|
+
if (!_optionalChain([options, 'access', _143 => _143.env, 'optionalAccess', _144 => _144._applied])) {
|
|
58047
58054
|
Object.assign(environment, options.env);
|
|
58048
58055
|
environment._applied = true;
|
|
58049
58056
|
}
|
|
@@ -58096,7 +58103,7 @@ function interpolate(target, source = {}, parse3 = (v) => v) {
|
|
|
58096
58103
|
}
|
|
58097
58104
|
}
|
|
58098
58105
|
_chunkEM6PLOYYcjs.__name.call(void 0, interpolate, "interpolate");
|
|
58099
|
-
var _normalize = /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, (p) => _optionalChain([p, 'optionalAccess',
|
|
58106
|
+
var _normalize = /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, (p) => _optionalChain([p, 'optionalAccess', _145 => _145.replace, 'call', _146 => _146(/\\/g, "/")]), "_normalize");
|
|
58100
58107
|
var ASYNC_LOADERS = {
|
|
58101
58108
|
".yaml": /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard2(require("./yaml-76CIIR2C.cjs"))).then((r) => r.parseYAML), ".yaml"),
|
|
58102
58109
|
".yml": /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard2(require("./yaml-76CIIR2C.cjs"))).then((r) => r.parseYAML), ".yml"),
|
|
@@ -58182,7 +58189,7 @@ async function loadConfig(options) {
|
|
|
58182
58189
|
]).filter((t) => t && typeof t === "string");
|
|
58183
58190
|
const pkgJsonFile = await _chunkJMRHG3KScjs.readPackageJSON.call(void 0, options.cwd).catch(() => {
|
|
58184
58191
|
});
|
|
58185
|
-
const values = keys.map((key) => _optionalChain([pkgJsonFile, 'optionalAccess',
|
|
58192
|
+
const values = keys.map((key) => _optionalChain([pkgJsonFile, 'optionalAccess', _147 => _147[key]]));
|
|
58186
58193
|
_configs.packageJson = _merger({}, ...values);
|
|
58187
58194
|
}
|
|
58188
58195
|
const configs = {};
|
|
@@ -58366,7 +58373,7 @@ async function resolveConfig(source, options, sourceOptions = {}) {
|
|
|
58366
58373
|
if (options.envName) {
|
|
58367
58374
|
const envConfig = {
|
|
58368
58375
|
...res.config["$" + options.envName],
|
|
58369
|
-
..._optionalChain([res, 'access',
|
|
58376
|
+
..._optionalChain([res, 'access', _148 => _148.config, 'access', _149 => _149.$env, 'optionalAccess', _150 => _150[options.envName]])
|
|
58370
58377
|
};
|
|
58371
58378
|
if (Object.keys(envConfig).length > 0) {
|
|
58372
58379
|
res.config = _merger(envConfig, res.config);
|
|
@@ -58392,32 +58399,32 @@ var import_dotenv = _chunkEM6PLOYYcjs.__toESM.call(void 0, require_main(), 1);
|
|
|
58392
58399
|
// ../config-tools/src/config-file/get-config-file.ts
|
|
58393
58400
|
var getConfigFileByName = /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, async (fileName, filePath, options = {}) => {
|
|
58394
58401
|
const workspacePath = filePath || findWorkspaceRoot(filePath);
|
|
58395
|
-
|
|
58396
|
-
|
|
58397
|
-
packageJson: true,
|
|
58398
|
-
name: fileName,
|
|
58399
|
-
envName: _optionalChain([fileName, 'optionalAccess', _155 => _155.toUpperCase, 'call', _156 => _156()]),
|
|
58400
|
-
jitiOptions: {
|
|
58401
|
-
debug: false,
|
|
58402
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
58403
|
-
},
|
|
58404
|
-
...options
|
|
58405
|
-
});
|
|
58406
|
-
if (!config || Object.keys(config).length === 0) {
|
|
58407
|
-
config = await loadConfig({
|
|
58402
|
+
const configs = await Promise.all([
|
|
58403
|
+
loadConfig({
|
|
58408
58404
|
cwd: workspacePath,
|
|
58409
58405
|
packageJson: true,
|
|
58410
58406
|
name: fileName,
|
|
58411
|
-
envName: _optionalChain([fileName, 'optionalAccess',
|
|
58407
|
+
envName: _optionalChain([fileName, 'optionalAccess', _151 => _151.toUpperCase, 'call', _152 => _152()]),
|
|
58408
|
+
jitiOptions: {
|
|
58409
|
+
debug: false,
|
|
58410
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
58411
|
+
},
|
|
58412
|
+
...options
|
|
58413
|
+
}),
|
|
58414
|
+
loadConfig({
|
|
58415
|
+
cwd: workspacePath,
|
|
58416
|
+
packageJson: true,
|
|
58417
|
+
name: fileName,
|
|
58418
|
+
envName: _optionalChain([fileName, 'optionalAccess', _153 => _153.toUpperCase, 'call', _154 => _154()]),
|
|
58412
58419
|
jitiOptions: {
|
|
58413
58420
|
debug: false,
|
|
58414
58421
|
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
58415
58422
|
},
|
|
58416
58423
|
configFile: fileName,
|
|
58417
58424
|
...options
|
|
58418
|
-
})
|
|
58419
|
-
|
|
58420
|
-
return
|
|
58425
|
+
})
|
|
58426
|
+
]);
|
|
58427
|
+
return _chunkJMRHG3KScjs.defu.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
|
|
58421
58428
|
}, "getConfigFileByName");
|
|
58422
58429
|
var getConfigFile = /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, async (filePath, additionalFileNames = []) => {
|
|
58423
58430
|
const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
|
|
@@ -58425,15 +58432,15 @@ var getConfigFile = /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, async
|
|
|
58425
58432
|
let config = result.config;
|
|
58426
58433
|
const configFile = result.configFile;
|
|
58427
58434
|
if (config && configFile && Object.keys(config).length > 0) {
|
|
58428
|
-
|
|
58435
|
+
writeTrace(`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
|
|
58429
58436
|
logLevel: "all"
|
|
58430
58437
|
});
|
|
58431
58438
|
}
|
|
58432
58439
|
if (additionalFileNames && additionalFileNames.length > 0) {
|
|
58433
58440
|
const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
|
|
58434
58441
|
for (const result2 of results) {
|
|
58435
|
-
if (_optionalChain([result2, 'optionalAccess',
|
|
58436
|
-
|
|
58442
|
+
if (_optionalChain([result2, 'optionalAccess', _155 => _155.config]) && _optionalChain([result2, 'optionalAccess', _156 => _156.configFile]) && Object.keys(result2.config).length > 0) {
|
|
58443
|
+
writeTrace(`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
|
|
58437
58444
|
logLevel: "all"
|
|
58438
58445
|
});
|
|
58439
58446
|
config = _chunkJMRHG3KScjs.defu.call(void 0, _nullishCoalesce(result2.config, () => ( {})), _nullishCoalesce(config, () => ( {})));
|
|
@@ -58449,6 +58456,16 @@ var getConfigFile = /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, async
|
|
|
58449
58456
|
|
|
58450
58457
|
// ../config-tools/src/env/get-env.ts
|
|
58451
58458
|
_chunkEM6PLOYYcjs.init_cjs_shims.call(void 0, );
|
|
58459
|
+
var getExtensionEnv = /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, (extensionName) => {
|
|
58460
|
+
const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
|
|
58461
|
+
return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
|
|
58462
|
+
const name = key.replace(prefix, "").split("_").map((i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : "").join("");
|
|
58463
|
+
if (name) {
|
|
58464
|
+
ret[name] = process.env[key];
|
|
58465
|
+
}
|
|
58466
|
+
return ret;
|
|
58467
|
+
}, {});
|
|
58468
|
+
}, "getExtensionEnv");
|
|
58452
58469
|
var getConfigEnv = /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, () => {
|
|
58453
58470
|
const prefix = "STORM_";
|
|
58454
58471
|
let config = {
|
|
@@ -58590,13 +58607,13 @@ _chunkEM6PLOYYcjs.init_cjs_shims.call(void 0, );
|
|
|
58590
58607
|
var setExtensionEnv = /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, (extensionName, extension) => {
|
|
58591
58608
|
for (const key of Object.keys(_nullishCoalesce(extension, () => ( {})))) {
|
|
58592
58609
|
if (extension[key]) {
|
|
58593
|
-
const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess',
|
|
58610
|
+
const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess', _157 => _157.replace, 'call', _158 => _158(/([A-Z])+/g, (input) => input ? _optionalChain([input, 'access', _159 => _159[0], 'optionalAccess', _160 => _160.toUpperCase, 'call', _161 => _161()]) + input.slice(1) : ""), 'access', _162 => _162.split, 'call', _163 => _163(/(?=[A-Z])|[.\-\s_]/), 'access', _164 => _164.map, 'call', _165 => _165((x) => x.toLowerCase())]), () => ( []));
|
|
58594
58611
|
let extensionKey;
|
|
58595
58612
|
if (result.length === 0) {
|
|
58596
58613
|
return;
|
|
58597
58614
|
}
|
|
58598
58615
|
if (result.length === 1) {
|
|
58599
|
-
extensionKey = _nullishCoalesce(_optionalChain([result, 'access',
|
|
58616
|
+
extensionKey = _nullishCoalesce(_optionalChain([result, 'access', _166 => _166[0], 'optionalAccess', _167 => _167.toUpperCase, 'call', _168 => _168()]), () => ( ""));
|
|
58600
58617
|
} else {
|
|
58601
58618
|
extensionKey = result.reduce((ret, part) => {
|
|
58602
58619
|
return `${ret}_${part.toLowerCase()}`;
|
|
@@ -58609,7 +58626,7 @@ var setExtensionEnv = /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, (ext
|
|
|
58609
58626
|
var setConfigEnv = /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, (config) => {
|
|
58610
58627
|
const prefix = "STORM_";
|
|
58611
58628
|
if (config.extends) {
|
|
58612
|
-
process.env[`${prefix}EXTENDS`] = config.extends;
|
|
58629
|
+
process.env[`${prefix}EXTENDS`] = Array.isArray(config.extends) ? JSON.stringify(config.extends) : config.extends;
|
|
58613
58630
|
}
|
|
58614
58631
|
if (config.name) {
|
|
58615
58632
|
process.env[`${prefix}NAME`] = config.name;
|
|
@@ -58693,7 +58710,7 @@ var setConfigEnv = /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, (config
|
|
|
58693
58710
|
process.env.NODE_ENV = config.env;
|
|
58694
58711
|
process.env.ENVIRONMENT = config.env;
|
|
58695
58712
|
}
|
|
58696
|
-
if (_optionalChain([config, 'access',
|
|
58713
|
+
if (_optionalChain([config, 'access', _169 => _169.colors, 'optionalAccess', _170 => _170.base, 'optionalAccess', _171 => _171.light]) || _optionalChain([config, 'access', _172 => _172.colors, 'optionalAccess', _173 => _173.base, 'optionalAccess', _174 => _174.dark])) {
|
|
58697
58714
|
for (const key of Object.keys(config.colors)) {
|
|
58698
58715
|
setThemeColorConfigEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
|
|
58699
58716
|
}
|
|
@@ -58741,7 +58758,7 @@ var setConfigEnv = /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, (config
|
|
|
58741
58758
|
}
|
|
58742
58759
|
}, "setConfigEnv");
|
|
58743
58760
|
var setThemeColorConfigEnv = /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, (prefix, config) => {
|
|
58744
|
-
return _optionalChain([config, 'optionalAccess',
|
|
58761
|
+
return _optionalChain([config, 'optionalAccess', _175 => _175.light, 'optionalAccess', _176 => _176.brand]) || _optionalChain([config, 'optionalAccess', _177 => _177.dark, 'optionalAccess', _178 => _178.brand]) ? setMultiThemeColorConfigEnv(prefix, config) : setSingleThemeColorConfigEnv(prefix, config);
|
|
58745
58762
|
}, "setThemeColorConfigEnv");
|
|
58746
58763
|
var setSingleThemeColorConfigEnv = /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, (prefix, config) => {
|
|
58747
58764
|
if (config.dark) {
|
|
@@ -58839,30 +58856,69 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(v
|
|
|
58839
58856
|
}, "setBaseThemeColorConfigEnv");
|
|
58840
58857
|
|
|
58841
58858
|
// ../config-tools/src/create-storm-config.ts
|
|
58859
|
+
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
58842
58860
|
var _static_cache = void 0;
|
|
58843
|
-
var
|
|
58844
|
-
let
|
|
58845
|
-
if (_optionalChain([_static_cache, 'optionalAccess',
|
|
58846
|
-
|
|
58847
|
-
|
|
58848
|
-
|
|
58849
|
-
|
|
58850
|
-
|
|
58851
|
-
|
|
58852
|
-
|
|
58853
|
-
|
|
58854
|
-
|
|
58855
|
-
|
|
58856
|
-
|
|
58857
|
-
}
|
|
58861
|
+
var createStormConfig = /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, async (extensionName, schema, workspaceRoot, skipLogs = false) => {
|
|
58862
|
+
let result;
|
|
58863
|
+
if (!_optionalChain([_static_cache, 'optionalAccess', _179 => _179.data]) || !_optionalChain([_static_cache, 'optionalAccess', _180 => _180.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
58864
|
+
let _workspaceRoot = workspaceRoot;
|
|
58865
|
+
if (!_workspaceRoot) {
|
|
58866
|
+
_workspaceRoot = findWorkspaceRoot();
|
|
58867
|
+
}
|
|
58868
|
+
const configEnv = getConfigEnv();
|
|
58869
|
+
const defaultConfig = await getDefaultConfig(_workspaceRoot);
|
|
58870
|
+
const configFile = await getConfigFile(_workspaceRoot);
|
|
58871
|
+
if (!configFile && !skipLogs) {
|
|
58872
|
+
writeWarning("No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.json` file to the root of your workspace if it is not.\n", {
|
|
58873
|
+
logLevel: "all"
|
|
58874
|
+
});
|
|
58875
|
+
}
|
|
58876
|
+
result = await StormConfigSchema.parseAsync(_chunkJMRHG3KScjs.defu.call(void 0, configEnv, configFile, defaultConfig));
|
|
58877
|
+
result.workspaceRoot ??= _workspaceRoot;
|
|
58878
|
+
} else {
|
|
58879
|
+
result = _static_cache.data;
|
|
58880
|
+
}
|
|
58881
|
+
if (schema && extensionName) {
|
|
58882
|
+
result.extensions = {
|
|
58883
|
+
...result.extensions,
|
|
58884
|
+
[extensionName]: createConfigExtension(extensionName, schema)
|
|
58885
|
+
};
|
|
58858
58886
|
}
|
|
58859
|
-
|
|
58887
|
+
_static_cache = {
|
|
58888
|
+
timestamp: Date.now(),
|
|
58889
|
+
data: result
|
|
58890
|
+
};
|
|
58891
|
+
return result;
|
|
58892
|
+
}, "createStormConfig");
|
|
58893
|
+
var createConfigExtension = /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, (extensionName, schema) => {
|
|
58894
|
+
const extension_cache_key = {
|
|
58895
|
+
extensionName
|
|
58896
|
+
};
|
|
58897
|
+
if (_extension_cache.has(extension_cache_key)) {
|
|
58898
|
+
return _extension_cache.get(extension_cache_key);
|
|
58899
|
+
}
|
|
58900
|
+
let extension = getExtensionEnv(extensionName);
|
|
58901
|
+
if (schema) {
|
|
58902
|
+
extension = schema.parse(extension);
|
|
58903
|
+
}
|
|
58904
|
+
_extension_cache.set(extension_cache_key, extension);
|
|
58905
|
+
return extension;
|
|
58906
|
+
}, "createConfigExtension");
|
|
58907
|
+
var loadStormConfig = /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, async (workspaceRoot, skipLogs = false) => {
|
|
58908
|
+
const config = await createStormConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
58860
58909
|
setConfigEnv(config);
|
|
58861
|
-
|
|
58910
|
+
if (!skipLogs) {
|
|
58911
|
+
writeTrace(`\u2699\uFE0F Using Storm configuration:
|
|
58862
58912
|
${formatLogMessage(config)}`, config);
|
|
58913
|
+
}
|
|
58863
58914
|
return config;
|
|
58864
58915
|
}, "loadStormConfig");
|
|
58865
58916
|
|
|
58917
|
+
// ../config-tools/src/get-config.ts
|
|
58918
|
+
var getConfig = /* @__PURE__ */ _chunkEM6PLOYYcjs.__name.call(void 0, (workspaceRoot, skipLogs = false) => {
|
|
58919
|
+
return loadStormConfig(workspaceRoot, skipLogs);
|
|
58920
|
+
}, "getConfig");
|
|
58921
|
+
|
|
58866
58922
|
|
|
58867
58923
|
|
|
58868
58924
|
|
|
@@ -58880,7 +58936,7 @@ ${formatLogMessage(config)}`, config);
|
|
|
58880
58936
|
|
|
58881
58937
|
|
|
58882
58938
|
|
|
58883
|
-
exports.joinPaths = joinPaths; exports.findWorkspaceRootSafe = findWorkspaceRootSafe; exports.findWorkspaceRoot = findWorkspaceRoot; exports.require_ansi_styles = require_ansi_styles; exports.require_supports_color = require_supports_color; exports.isVerbose = isVerbose; exports.writeFatal = writeFatal; exports.writeError = writeError; exports.writeWarning = writeWarning; exports.writeInfo = writeInfo; exports.writeSuccess = writeSuccess; exports.writeDebug = writeDebug; exports.exitWithError = exitWithError; exports.exitWithSuccess = exitWithSuccess; exports.handleProcess = handleProcess; exports.
|
|
58939
|
+
exports.joinPaths = joinPaths; exports.findWorkspaceRootSafe = findWorkspaceRootSafe; exports.findWorkspaceRoot = findWorkspaceRoot; exports.require_ansi_styles = require_ansi_styles; exports.require_supports_color = require_supports_color; exports.isVerbose = isVerbose; exports.writeFatal = writeFatal; exports.writeError = writeError; exports.writeWarning = writeWarning; exports.writeInfo = writeInfo; exports.writeSuccess = writeSuccess; exports.writeDebug = writeDebug; exports.exitWithError = exitWithError; exports.exitWithSuccess = exitWithSuccess; exports.handleProcess = handleProcess; exports.getConfig = getConfig;
|
|
58884
58940
|
/*! Bundled license information:
|
|
58885
58941
|
|
|
58886
58942
|
ejs/lib/ejs.js:
|