@storm-software/workspace-tools 1.72.3 → 1.73.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/index.js +374 -156
- package/meta.json +1 -1
- package/package.json +2 -2
- package/src/base/index.js +366 -148
- package/src/executors/rolldown/executor.js +362 -144
- package/src/executors/tsup/executor.js +362 -144
- package/src/executors/tsup-browser/executor.js +362 -144
- package/src/executors/tsup-neutral/executor.js +362 -144
- package/src/executors/tsup-node/executor.js +362 -144
- package/src/executors/typia/executor.js +362 -144
- package/src/executors/unbuild/executor.js +362 -144
- package/src/generators/browser-library/generator.js +362 -144
- package/src/generators/config-schema/generator.js +356 -138
- package/src/generators/neutral-library/generator.js +362 -144
- package/src/generators/node-library/generator.js +362 -144
- package/src/generators/preset/files/.github/workflows/build-release.yml.template +1 -1
- package/src/generators/preset/generator.js +356 -138
- package/src/generators/release-version/generator.js +358 -140
- package/src/utils/index.js +358 -140
|
@@ -49131,8 +49131,8 @@ var require_pax = __commonJS({
|
|
|
49131
49131
|
return len + s2;
|
|
49132
49132
|
}
|
|
49133
49133
|
};
|
|
49134
|
-
Pax.parse = (string, ex, g4) => new Pax(
|
|
49135
|
-
var
|
|
49134
|
+
Pax.parse = (string, ex, g4) => new Pax(merge3(parseKV(string), ex), g4);
|
|
49135
|
+
var merge3 = (a2, b6) => b6 ? Object.keys(a2).reduce((s2, k4) => (s2[k4] = a2[k4], s2), b6) : a2;
|
|
49136
49136
|
var parseKV = (string) => string.replace(/\n$/, "").split("\n").reduce(parseKVLine, /* @__PURE__ */ Object.create(null));
|
|
49137
49137
|
var parseKVLine = (set2, line) => {
|
|
49138
49138
|
const n = parseInt(line, 10);
|
|
@@ -68968,64 +68968,6 @@ var require_cjs = __commonJS({
|
|
|
68968
68968
|
}
|
|
68969
68969
|
});
|
|
68970
68970
|
|
|
68971
|
-
// packages/config-tools/src/config-file/get-config-file.ts
|
|
68972
|
-
var import_deepmerge, getConfigFileByName, getConfigFile;
|
|
68973
|
-
var init_get_config_file = __esm({
|
|
68974
|
-
"packages/config-tools/src/config-file/get-config-file.ts"() {
|
|
68975
|
-
init_find_workspace_root();
|
|
68976
|
-
init_dist10();
|
|
68977
|
-
import_deepmerge = __toESM(require_cjs());
|
|
68978
|
-
getConfigFileByName = async (fileName, filePath) => {
|
|
68979
|
-
const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
|
|
68980
|
-
return loadConfig({
|
|
68981
|
-
cwd: workspacePath,
|
|
68982
|
-
packageJson: true,
|
|
68983
|
-
name: fileName,
|
|
68984
|
-
envName: fileName?.toUpperCase(),
|
|
68985
|
-
jitiOptions: {
|
|
68986
|
-
debug: true,
|
|
68987
|
-
cache: process.env.STORM_CACHE ? process.env.STORM_CACHE_DIRECTORY : false
|
|
68988
|
-
}
|
|
68989
|
-
});
|
|
68990
|
-
};
|
|
68991
|
-
getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
68992
|
-
const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
|
|
68993
|
-
let { config, configFile } = await loadConfig({
|
|
68994
|
-
cwd: workspacePath,
|
|
68995
|
-
name: "storm"
|
|
68996
|
-
});
|
|
68997
|
-
if (additionalFileNames && additionalFileNames.length > 0) {
|
|
68998
|
-
const results = await Promise.all(
|
|
68999
|
-
additionalFileNames.map(
|
|
69000
|
-
(fileName) => loadConfig({
|
|
69001
|
-
cwd: workspacePath,
|
|
69002
|
-
name: fileName
|
|
69003
|
-
})
|
|
69004
|
-
)
|
|
69005
|
-
);
|
|
69006
|
-
for (const result of results) {
|
|
69007
|
-
if (result) {
|
|
69008
|
-
config = (0, import_deepmerge.default)(config ?? {}, result.config ?? {});
|
|
69009
|
-
}
|
|
69010
|
-
}
|
|
69011
|
-
}
|
|
69012
|
-
if (!config) {
|
|
69013
|
-
return void 0;
|
|
69014
|
-
}
|
|
69015
|
-
config.configFile = configFile;
|
|
69016
|
-
config.runtimeVersion = "0.0.1";
|
|
69017
|
-
return config;
|
|
69018
|
-
};
|
|
69019
|
-
}
|
|
69020
|
-
});
|
|
69021
|
-
|
|
69022
|
-
// packages/config-tools/src/config-file/index.ts
|
|
69023
|
-
var init_config_file = __esm({
|
|
69024
|
-
"packages/config-tools/src/config-file/index.ts"() {
|
|
69025
|
-
init_get_config_file();
|
|
69026
|
-
}
|
|
69027
|
-
});
|
|
69028
|
-
|
|
69029
68971
|
// node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/index.mjs
|
|
69030
68972
|
function setErrorMap(map) {
|
|
69031
68973
|
overrideErrorMap = map;
|
|
@@ -72760,23 +72702,71 @@ var init_lib = __esm({
|
|
|
72760
72702
|
});
|
|
72761
72703
|
|
|
72762
72704
|
// packages/config/src/schema.ts
|
|
72763
|
-
var ColorConfigSchema, StormConfigSchema;
|
|
72705
|
+
var DarkColorSchema, LightColorSchema, PrimaryColorSchema, SecondaryColorSchema, TertiaryColorSchema, AccentColorSchema, SuccessColorSchema, InfoColorSchema, WarningColorSchema, ErrorColorSchema, FatalColorSchema, DarkThemeColorConfigSchema, LightThemeColorConfigSchema, MultiThemeColorConfigSchema, SingleThemeColorConfigSchema, ColorConfigSchema, ColorConfigMapSchema, StormConfigSchema;
|
|
72764
72706
|
var init_schema = __esm({
|
|
72765
72707
|
"packages/config/src/schema.ts"() {
|
|
72766
72708
|
init_lib();
|
|
72767
|
-
|
|
72768
|
-
|
|
72769
|
-
|
|
72770
|
-
|
|
72771
|
-
|
|
72772
|
-
|
|
72773
|
-
|
|
72774
|
-
|
|
72775
|
-
|
|
72776
|
-
|
|
72777
|
-
|
|
72778
|
-
|
|
72779
|
-
|
|
72709
|
+
DarkColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1d232a").describe("The dark background color of the workspace");
|
|
72710
|
+
LightColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#f4f4f5").describe("The light background color of the workspace");
|
|
72711
|
+
PrimaryColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1fb2a6").describe("The primary color of the workspace");
|
|
72712
|
+
SecondaryColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0ea5e9").describe("The secondary color of the workspace");
|
|
72713
|
+
TertiaryColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#ec5990").describe("The tertiary color of the workspace");
|
|
72714
|
+
AccentColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#6366f1").describe("The accent color of the workspace");
|
|
72715
|
+
SuccessColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#087f5b").describe("The success color of the workspace");
|
|
72716
|
+
InfoColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0ea5e9").describe("The informational color of the workspace");
|
|
72717
|
+
WarningColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#fcc419").describe("The warning color of the workspace");
|
|
72718
|
+
ErrorColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#990000").describe("The error color of the workspace");
|
|
72719
|
+
FatalColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#7d1a1a").describe("The fatal color of the workspace");
|
|
72720
|
+
DarkThemeColorConfigSchema = z2.object({
|
|
72721
|
+
foreground: LightColorSchema,
|
|
72722
|
+
background: DarkColorSchema,
|
|
72723
|
+
primary: PrimaryColorSchema,
|
|
72724
|
+
secondary: SecondaryColorSchema,
|
|
72725
|
+
tertiary: TertiaryColorSchema,
|
|
72726
|
+
accent: AccentColorSchema,
|
|
72727
|
+
success: SuccessColorSchema,
|
|
72728
|
+
info: InfoColorSchema,
|
|
72729
|
+
warning: WarningColorSchema,
|
|
72730
|
+
error: ErrorColorSchema,
|
|
72731
|
+
fatal: FatalColorSchema
|
|
72732
|
+
});
|
|
72733
|
+
LightThemeColorConfigSchema = z2.object({
|
|
72734
|
+
foreground: DarkColorSchema,
|
|
72735
|
+
background: LightColorSchema,
|
|
72736
|
+
primary: PrimaryColorSchema,
|
|
72737
|
+
secondary: SecondaryColorSchema,
|
|
72738
|
+
tertiary: TertiaryColorSchema,
|
|
72739
|
+
accent: AccentColorSchema,
|
|
72740
|
+
success: SuccessColorSchema,
|
|
72741
|
+
info: InfoColorSchema,
|
|
72742
|
+
warning: WarningColorSchema,
|
|
72743
|
+
error: ErrorColorSchema,
|
|
72744
|
+
fatal: FatalColorSchema
|
|
72745
|
+
});
|
|
72746
|
+
MultiThemeColorConfigSchema = z2.object({
|
|
72747
|
+
dark: DarkThemeColorConfigSchema,
|
|
72748
|
+
light: LightThemeColorConfigSchema
|
|
72749
|
+
});
|
|
72750
|
+
SingleThemeColorConfigSchema = z2.object({
|
|
72751
|
+
dark: DarkColorSchema,
|
|
72752
|
+
light: LightColorSchema,
|
|
72753
|
+
primary: PrimaryColorSchema,
|
|
72754
|
+
secondary: SecondaryColorSchema,
|
|
72755
|
+
tertiary: TertiaryColorSchema,
|
|
72756
|
+
accent: AccentColorSchema,
|
|
72757
|
+
success: SuccessColorSchema,
|
|
72758
|
+
info: InfoColorSchema,
|
|
72759
|
+
warning: WarningColorSchema,
|
|
72760
|
+
error: ErrorColorSchema,
|
|
72761
|
+
fatal: FatalColorSchema
|
|
72762
|
+
});
|
|
72763
|
+
ColorConfigSchema = SingleThemeColorConfigSchema.or(
|
|
72764
|
+
MultiThemeColorConfigSchema
|
|
72765
|
+
).describe("Colors used for various workspace elements");
|
|
72766
|
+
ColorConfigMapSchema = z2.union([
|
|
72767
|
+
z2.object({ "base": ColorConfigSchema }),
|
|
72768
|
+
z2.record(z2.string(), ColorConfigSchema)
|
|
72769
|
+
]);
|
|
72780
72770
|
StormConfigSchema = z2.object({
|
|
72781
72771
|
extends: z2.string().trim().optional().describe(
|
|
72782
72772
|
"The path to a base JSON file to use as a configuration preset file"
|
|
@@ -72827,7 +72817,7 @@ var init_schema = __esm({
|
|
|
72827
72817
|
configFile: z2.string().trim().nullable().default(null).describe(
|
|
72828
72818
|
"The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
|
|
72829
72819
|
),
|
|
72830
|
-
colors: ColorConfigSchema.describe(
|
|
72820
|
+
colors: ColorConfigSchema.or(ColorConfigMapSchema).describe(
|
|
72831
72821
|
"Storm theme config values used for styling various package elements"
|
|
72832
72822
|
),
|
|
72833
72823
|
extensions: z2.record(z2.any()).optional().default({}).describe("Configuration of each used extension")
|
|
@@ -72838,8 +72828,22 @@ var init_schema = __esm({
|
|
|
72838
72828
|
});
|
|
72839
72829
|
|
|
72840
72830
|
// packages/config/src/types.ts
|
|
72831
|
+
var COLOR_KEYS;
|
|
72841
72832
|
var init_types = __esm({
|
|
72842
72833
|
"packages/config/src/types.ts"() {
|
|
72834
|
+
COLOR_KEYS = [
|
|
72835
|
+
"dark",
|
|
72836
|
+
"light",
|
|
72837
|
+
"primary",
|
|
72838
|
+
"secondary",
|
|
72839
|
+
"tertiary",
|
|
72840
|
+
"accent",
|
|
72841
|
+
"success",
|
|
72842
|
+
"info",
|
|
72843
|
+
"warning",
|
|
72844
|
+
"error",
|
|
72845
|
+
"fatal"
|
|
72846
|
+
];
|
|
72843
72847
|
}
|
|
72844
72848
|
});
|
|
72845
72849
|
|
|
@@ -74611,14 +74615,16 @@ var init_chalk = __esm({
|
|
|
74611
74615
|
});
|
|
74612
74616
|
|
|
74613
74617
|
// packages/config-tools/src/utilities/logger.ts
|
|
74614
|
-
var getLogFn, writeFatal, writeError, writeWarning, writeInfo, writeSuccess, writeDebug, writeTrace, writeSystem, getStopwatch;
|
|
74618
|
+
var getLogFn, writeFatal, writeError, writeWarning, writeInfo, writeSuccess, writeDebug, writeTrace, writeSystem, getStopwatch, formatLogMessage, _isFunction;
|
|
74615
74619
|
var init_logger = __esm({
|
|
74616
74620
|
"packages/config-tools/src/utilities/logger.ts"() {
|
|
74617
74621
|
init_types2();
|
|
74618
74622
|
init_get_log_level();
|
|
74619
74623
|
init_chalk();
|
|
74624
|
+
init_get_default_config();
|
|
74620
74625
|
getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
74621
74626
|
let _chalk = getChalk();
|
|
74627
|
+
const colors = !config.colors?.dark && !config.colors?.["base"] && !config.colors?.["base"]?.dark ? DEFAULT_COLOR_CONFIG : config.colors?.dark && typeof config.colors.dark === "string" ? config.colors : config.colors?.["base"]?.dark && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : config.colors?.["base"] ? config.colors?.["base"] : DEFAULT_COLOR_CONFIG;
|
|
74622
74628
|
const configLogLevel = config.logLevel ?? process.env?.STORM_LOG_LEVEL ?? LogLevelLabel.INFO;
|
|
74623
74629
|
if (typeof logLevel === "number" && (logLevel >= getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT) || typeof logLevel === "string" && getLogLevel(logLevel) >= getLogLevel(configLogLevel)) {
|
|
74624
74630
|
return (_6) => {
|
|
@@ -74628,9 +74634,9 @@ var init_logger = __esm({
|
|
|
74628
74634
|
return (message) => {
|
|
74629
74635
|
console.error(
|
|
74630
74636
|
`
|
|
74631
|
-
${_chalk.bold.hex(
|
|
74632
|
-
|
|
74633
|
-
)(message)}
|
|
74637
|
+
${_chalk.bold.hex(colors.error ?? "#f85149")(">")} ${_chalk.bold.bgHex(colors.fatal ?? "#b62324").whiteBright(
|
|
74638
|
+
" \u{1F480} Fatal "
|
|
74639
|
+
)} ${_chalk.hex(colors.error ?? "#f85149")(formatLogMessage(message))}
|
|
74634
74640
|
|
|
74635
74641
|
`
|
|
74636
74642
|
);
|
|
@@ -74640,9 +74646,9 @@ ${_chalk.bold.hex(config?.colors?.error ? config.colors.error : "#7d1a1a")(">")}
|
|
|
74640
74646
|
return (message) => {
|
|
74641
74647
|
console.error(
|
|
74642
74648
|
`
|
|
74643
|
-
${_chalk.bold.hex(
|
|
74644
|
-
|
|
74645
|
-
)(message)}
|
|
74649
|
+
${_chalk.bold.hex(colors.error ?? "#f85149")(">")} ${_chalk.bold.bgHex(colors.error ?? "#f85149").whiteBright(
|
|
74650
|
+
" \u2718 Error "
|
|
74651
|
+
)} ${_chalk.hex(colors.error ?? "#f85149")(formatLogMessage(message))}
|
|
74646
74652
|
`
|
|
74647
74653
|
);
|
|
74648
74654
|
};
|
|
@@ -74651,9 +74657,9 @@ ${_chalk.bold.hex(config?.colors?.error ? config.colors.error : "#7d1a1a")(">")}
|
|
|
74651
74657
|
return (message) => {
|
|
74652
74658
|
console.warn(
|
|
74653
74659
|
`
|
|
74654
|
-
${_chalk.bold.hex(
|
|
74655
|
-
|
|
74656
|
-
)(message)}
|
|
74660
|
+
${_chalk.bold.hex(colors.warning ?? "#e3b341")("> ")} ${_chalk.bold.bgHex(colors.warning ?? "#e3b341").whiteBright(
|
|
74661
|
+
" \u26A0 Warn "
|
|
74662
|
+
)} ${_chalk.hex(colors.warning ?? "#e3b341")(formatLogMessage(message))}
|
|
74657
74663
|
`
|
|
74658
74664
|
);
|
|
74659
74665
|
};
|
|
@@ -74662,9 +74668,9 @@ ${_chalk.bold.hex(config?.colors?.warning ? config.colors.warning : "#fcc419")("
|
|
|
74662
74668
|
return (message) => {
|
|
74663
74669
|
console.info(
|
|
74664
74670
|
`
|
|
74665
|
-
${_chalk.bold.hex(
|
|
74666
|
-
|
|
74667
|
-
)(message)}
|
|
74671
|
+
${_chalk.bold.hex(colors.success ?? "#56d364")(">")} ${_chalk.bold.bgHex(colors.success ?? "#56d364").whiteBright(
|
|
74672
|
+
" \u2713 Success "
|
|
74673
|
+
)} ${_chalk.hex(colors.success ?? "#56d364")(formatLogMessage(message))}
|
|
74668
74674
|
`
|
|
74669
74675
|
);
|
|
74670
74676
|
};
|
|
@@ -74673,9 +74679,9 @@ ${_chalk.bold.hex(config?.colors?.success ? config.colors.success : "#087f5b")("
|
|
|
74673
74679
|
return (message) => {
|
|
74674
74680
|
console.info(
|
|
74675
74681
|
`
|
|
74676
|
-
${_chalk.bold.hex(
|
|
74677
|
-
|
|
74678
|
-
)(message)}
|
|
74682
|
+
${_chalk.bold.hex(colors.info ?? "#58a6ff")(">")} ${_chalk.bold.bgHex(colors.info ?? "#58a6ff").whiteBright(
|
|
74683
|
+
" \u2139 Info "
|
|
74684
|
+
)} ${_chalk.hex(colors.info ?? "#58a6ff")(formatLogMessage(message))}
|
|
74679
74685
|
`
|
|
74680
74686
|
);
|
|
74681
74687
|
};
|
|
@@ -74684,9 +74690,9 @@ ${_chalk.bold.hex(config?.colors?.info ? config.colors.info : "#0ea5e9")(">")} $
|
|
|
74684
74690
|
return (message) => {
|
|
74685
74691
|
console.debug(
|
|
74686
74692
|
`
|
|
74687
|
-
${_chalk.bold.hex(
|
|
74688
|
-
|
|
74689
|
-
)(message)}
|
|
74693
|
+
${_chalk.bold.hex(colors.primary ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.primary ?? "#1fb2a6").whiteBright(
|
|
74694
|
+
" \u{1F6E0} Debug "
|
|
74695
|
+
)} ${_chalk.hex(colors.primary ?? "#1fb2a6")(formatLogMessage(message))}
|
|
74690
74696
|
`
|
|
74691
74697
|
);
|
|
74692
74698
|
};
|
|
@@ -74694,9 +74700,9 @@ ${_chalk.bold.hex(config?.colors?.primary ? config.colors.primary : "#1fb2a6")("
|
|
|
74694
74700
|
return (message) => {
|
|
74695
74701
|
console.log(
|
|
74696
74702
|
`
|
|
74697
|
-
${_chalk.bold.hex(
|
|
74698
|
-
|
|
74699
|
-
)(message)}
|
|
74703
|
+
${_chalk.bold.hex(colors.primary ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.primary ?? "#1fb2a6").whiteBright(
|
|
74704
|
+
" \u2709 System "
|
|
74705
|
+
)} ${_chalk.hex(colors.primary ?? "#1fb2a6")(formatLogMessage(message))}
|
|
74700
74706
|
`
|
|
74701
74707
|
);
|
|
74702
74708
|
};
|
|
@@ -74723,6 +74729,19 @@ ${_chalk.bold.hex(config?.colors?.primary ? config.colors.primary : "#1fb2a6")("
|
|
|
74723
74729
|
);
|
|
74724
74730
|
};
|
|
74725
74731
|
};
|
|
74732
|
+
formatLogMessage = (message, prefix = "-") => {
|
|
74733
|
+
return typeof message === "string" ? message : typeof message === "object" ? Object.keys(message).map(
|
|
74734
|
+
(key) => ` ${prefix} ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" ? `
|
|
74735
|
+
${formatLogMessage(message[key], `${prefix}-`)}` : message[key]}`
|
|
74736
|
+
).join("\n") : message;
|
|
74737
|
+
};
|
|
74738
|
+
_isFunction = (value2) => {
|
|
74739
|
+
try {
|
|
74740
|
+
return value2 instanceof Function || typeof value2 === "function" || !!(value2?.constructor && value2?.call && value2?.apply);
|
|
74741
|
+
} catch (e2) {
|
|
74742
|
+
return false;
|
|
74743
|
+
}
|
|
74744
|
+
};
|
|
74726
74745
|
}
|
|
74727
74746
|
});
|
|
74728
74747
|
|
|
@@ -74899,10 +74918,99 @@ var init_utilities = __esm({
|
|
|
74899
74918
|
}
|
|
74900
74919
|
});
|
|
74901
74920
|
|
|
74921
|
+
// packages/config-tools/src/config-file/get-config-file.ts
|
|
74922
|
+
var import_deepmerge, getConfigFileByName, getConfigFile;
|
|
74923
|
+
var init_get_config_file = __esm({
|
|
74924
|
+
"packages/config-tools/src/config-file/get-config-file.ts"() {
|
|
74925
|
+
init_find_workspace_root();
|
|
74926
|
+
init_dist10();
|
|
74927
|
+
import_deepmerge = __toESM(require_cjs());
|
|
74928
|
+
init_utilities();
|
|
74929
|
+
getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
74930
|
+
const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
|
|
74931
|
+
let config = loadConfig({
|
|
74932
|
+
cwd: workspacePath,
|
|
74933
|
+
packageJson: true,
|
|
74934
|
+
name: fileName,
|
|
74935
|
+
envName: fileName?.toUpperCase(),
|
|
74936
|
+
jitiOptions: {
|
|
74937
|
+
debug: true,
|
|
74938
|
+
cache: process.env.STORM_CACHE ? process.env.STORM_CACHE_DIRECTORY : false
|
|
74939
|
+
},
|
|
74940
|
+
...options
|
|
74941
|
+
});
|
|
74942
|
+
if (!config || Object.keys(config).length === 0) {
|
|
74943
|
+
config = loadConfig({
|
|
74944
|
+
cwd: workspacePath,
|
|
74945
|
+
packageJson: true,
|
|
74946
|
+
name: fileName,
|
|
74947
|
+
envName: fileName?.toUpperCase(),
|
|
74948
|
+
jitiOptions: {
|
|
74949
|
+
debug: true,
|
|
74950
|
+
cache: process.env.STORM_CACHE ? process.env.STORM_CACHE_DIRECTORY : false
|
|
74951
|
+
},
|
|
74952
|
+
configFile: fileName,
|
|
74953
|
+
...options
|
|
74954
|
+
});
|
|
74955
|
+
}
|
|
74956
|
+
return config;
|
|
74957
|
+
};
|
|
74958
|
+
getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
74959
|
+
const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
|
|
74960
|
+
let { config, configFile } = await getConfigFileByName(
|
|
74961
|
+
"storm",
|
|
74962
|
+
workspacePath
|
|
74963
|
+
);
|
|
74964
|
+
if (config && Object.keys(config).length > 0) {
|
|
74965
|
+
writeTrace(
|
|
74966
|
+
`Found Storm configuration file "${configFile}" at "${workspacePath}"`,
|
|
74967
|
+
{
|
|
74968
|
+
logLevel: "all"
|
|
74969
|
+
}
|
|
74970
|
+
);
|
|
74971
|
+
writeTrace(config, { logLevel: "all" });
|
|
74972
|
+
}
|
|
74973
|
+
if (additionalFileNames && additionalFileNames.length > 0) {
|
|
74974
|
+
const results = await Promise.all(
|
|
74975
|
+
additionalFileNames.map(
|
|
74976
|
+
(fileName) => getConfigFileByName(fileName, workspacePath)
|
|
74977
|
+
)
|
|
74978
|
+
);
|
|
74979
|
+
for (const result of results) {
|
|
74980
|
+
if (result?.config && Object.keys(result.config).length > 0) {
|
|
74981
|
+
writeTrace(
|
|
74982
|
+
`Found additional configuration file "${result.configFile}" at "${workspacePath}"`,
|
|
74983
|
+
{
|
|
74984
|
+
logLevel: "all"
|
|
74985
|
+
}
|
|
74986
|
+
);
|
|
74987
|
+
writeTrace(result.config, { logLevel: "all" });
|
|
74988
|
+
config = (0, import_deepmerge.default)(config ?? {}, result.config ?? {});
|
|
74989
|
+
}
|
|
74990
|
+
}
|
|
74991
|
+
}
|
|
74992
|
+
if (!config) {
|
|
74993
|
+
return void 0;
|
|
74994
|
+
}
|
|
74995
|
+
config.configFile = configFile;
|
|
74996
|
+
config.runtimeVersion = "0.0.1";
|
|
74997
|
+
return config;
|
|
74998
|
+
};
|
|
74999
|
+
}
|
|
75000
|
+
});
|
|
75001
|
+
|
|
75002
|
+
// packages/config-tools/src/config-file/index.ts
|
|
75003
|
+
var init_config_file = __esm({
|
|
75004
|
+
"packages/config-tools/src/config-file/index.ts"() {
|
|
75005
|
+
init_get_config_file();
|
|
75006
|
+
}
|
|
75007
|
+
});
|
|
75008
|
+
|
|
74902
75009
|
// packages/config-tools/src/env/get-env.ts
|
|
74903
|
-
var getExtensionEnv, getConfigEnv;
|
|
75010
|
+
var getExtensionEnv, getConfigEnv, getThemeColorConfigEnv, getSingleThemeColorConfigEnv, getMultiThemeColorConfigEnv, getBaseThemeColorConfigEnv;
|
|
74904
75011
|
var init_get_env = __esm({
|
|
74905
75012
|
"packages/config-tools/src/env/get-env.ts"() {
|
|
75013
|
+
init_src();
|
|
74906
75014
|
init_utilities();
|
|
74907
75015
|
init_correct_paths();
|
|
74908
75016
|
getExtensionEnv = (extensionName) => {
|
|
@@ -74943,16 +75051,6 @@ var init_get_env = __esm({
|
|
|
74943
75051
|
ci: process.env[`${prefix}CI`] !== void 0 ? Boolean(
|
|
74944
75052
|
process.env[`${prefix}CI`] ?? process.env.CI ?? process.env.CONTINUOUS_INTEGRATION
|
|
74945
75053
|
) : void 0,
|
|
74946
|
-
colors: {
|
|
74947
|
-
primary: process.env[`${prefix}COLOR_PRIMARY`],
|
|
74948
|
-
dark: process.env[`${prefix}COLOR_DARK`],
|
|
74949
|
-
light: process.env[`${prefix}COLOR_LIGHT`],
|
|
74950
|
-
success: process.env[`${prefix}COLOR_SUCCESS`],
|
|
74951
|
-
info: process.env[`${prefix}COLOR_INFO`],
|
|
74952
|
-
warning: process.env[`${prefix}COLOR_WARNING`],
|
|
74953
|
-
error: process.env[`${prefix}COLOR_ERROR`],
|
|
74954
|
-
fatal: process.env[`${prefix}COLOR_FATAL`]
|
|
74955
|
-
},
|
|
74956
75054
|
repository: process.env[`${prefix}REPOSITORY`],
|
|
74957
75055
|
branch: process.env[`${prefix}BRANCH`],
|
|
74958
75056
|
preid: process.env[`${prefix}PRE_ID`],
|
|
@@ -74963,6 +75061,18 @@ var init_get_env = __esm({
|
|
|
74963
75061
|
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
74964
75062
|
) : process.env[`${prefix}LOG_LEVEL`] : void 0
|
|
74965
75063
|
};
|
|
75064
|
+
const themeNames = Object.keys(process.env).filter(
|
|
75065
|
+
(envKey) => envKey.startsWith(`${prefix}COLOR_`) && COLOR_KEYS.every(
|
|
75066
|
+
(colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)
|
|
75067
|
+
)
|
|
75068
|
+
);
|
|
75069
|
+
config.colors = themeNames.length > 0 ? themeNames.reduce(
|
|
75070
|
+
(ret, themeName) => {
|
|
75071
|
+
ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
|
|
75072
|
+
return ret;
|
|
75073
|
+
},
|
|
75074
|
+
{}
|
|
75075
|
+
) : getThemeColorConfigEnv(prefix);
|
|
74966
75076
|
const serializedConfig = process.env[`${prefix}CONFIG`];
|
|
74967
75077
|
if (serializedConfig) {
|
|
74968
75078
|
const parsed = JSON.parse(serializedConfig);
|
|
@@ -74975,11 +75085,53 @@ var init_get_env = __esm({
|
|
|
74975
75085
|
}
|
|
74976
75086
|
return config;
|
|
74977
75087
|
};
|
|
75088
|
+
getThemeColorConfigEnv = (prefix, theme) => {
|
|
75089
|
+
const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
|
|
75090
|
+
return process.env[`${prefix}${themeName}LIGHT_PRIMARY`] || process.env[`${prefix}${themeName}DARK_PRIMARY`] ? getMultiThemeColorConfigEnv(prefix + themeName) : getSingleThemeColorConfigEnv(prefix + themeName);
|
|
75091
|
+
};
|
|
75092
|
+
getSingleThemeColorConfigEnv = (prefix) => {
|
|
75093
|
+
return {
|
|
75094
|
+
dark: process.env[`${prefix}DARK`],
|
|
75095
|
+
light: process.env[`${prefix}LIGHT`],
|
|
75096
|
+
primary: process.env[`${prefix}PRIMARY`],
|
|
75097
|
+
secondary: process.env[`${prefix}SECONDARY`],
|
|
75098
|
+
tertiary: process.env[`${prefix}TERTIARY`],
|
|
75099
|
+
accent: process.env[`${prefix}ACCENT`],
|
|
75100
|
+
success: process.env[`${prefix}SUCCESS`],
|
|
75101
|
+
info: process.env[`${prefix}INFO`],
|
|
75102
|
+
warning: process.env[`${prefix}WARNING`],
|
|
75103
|
+
error: process.env[`${prefix}ERROR`],
|
|
75104
|
+
fatal: process.env[`${prefix}FATAL`]
|
|
75105
|
+
};
|
|
75106
|
+
};
|
|
75107
|
+
getMultiThemeColorConfigEnv = (prefix) => {
|
|
75108
|
+
return {
|
|
75109
|
+
light: getBaseThemeColorConfigEnv(
|
|
75110
|
+
`${prefix}_LIGHT_`
|
|
75111
|
+
),
|
|
75112
|
+
dark: getBaseThemeColorConfigEnv(`${prefix}_DARK_`)
|
|
75113
|
+
};
|
|
75114
|
+
};
|
|
75115
|
+
getBaseThemeColorConfigEnv = (prefix) => {
|
|
75116
|
+
return {
|
|
75117
|
+
foreground: process.env[`${prefix}FOREGROUND`],
|
|
75118
|
+
background: process.env[`${prefix}BACKGROUND`],
|
|
75119
|
+
primary: process.env[`${prefix}PRIMARY`],
|
|
75120
|
+
secondary: process.env[`${prefix}SECONDARY`],
|
|
75121
|
+
tertiary: process.env[`${prefix}TERTIARY`],
|
|
75122
|
+
accent: process.env[`${prefix}ACCENT`],
|
|
75123
|
+
success: process.env[`${prefix}SUCCESS`],
|
|
75124
|
+
info: process.env[`${prefix}INFO`],
|
|
75125
|
+
warning: process.env[`${prefix}WARNING`],
|
|
75126
|
+
error: process.env[`${prefix}ERROR`],
|
|
75127
|
+
fatal: process.env[`${prefix}FATAL`]
|
|
75128
|
+
};
|
|
75129
|
+
};
|
|
74978
75130
|
}
|
|
74979
75131
|
});
|
|
74980
75132
|
|
|
74981
75133
|
// packages/config-tools/src/env/set-env.ts
|
|
74982
|
-
var setExtensionEnv, setConfigEnv;
|
|
75134
|
+
var setExtensionEnv, setConfigEnv, setThemeColorConfigEnv, setSingleThemeColorConfigEnv, setMultiThemeColorConfigEnv, setBaseThemeColorConfigEnv;
|
|
74983
75135
|
var init_set_env = __esm({
|
|
74984
75136
|
"packages/config-tools/src/env/set-env.ts"() {
|
|
74985
75137
|
init_types2();
|
|
@@ -75095,29 +75247,15 @@ var init_set_env = __esm({
|
|
|
75095
75247
|
process.env.CI = String(config.ci);
|
|
75096
75248
|
process.env.CONTINUOUS_INTEGRATION = String(config.ci);
|
|
75097
75249
|
}
|
|
75098
|
-
if (config.colors.
|
|
75099
|
-
|
|
75100
|
-
|
|
75101
|
-
|
|
75102
|
-
|
|
75103
|
-
|
|
75104
|
-
|
|
75105
|
-
|
|
75106
|
-
|
|
75107
|
-
if (config.colors.success) {
|
|
75108
|
-
process.env[`${prefix}COLOR_SUCCESS`] = config.colors.success;
|
|
75109
|
-
}
|
|
75110
|
-
if (config.colors.info) {
|
|
75111
|
-
process.env[`${prefix}COLOR_INFO`] = config.colors.info;
|
|
75112
|
-
}
|
|
75113
|
-
if (config.colors.warning) {
|
|
75114
|
-
process.env[`${prefix}COLOR_WARNING`] = config.colors.warning;
|
|
75115
|
-
}
|
|
75116
|
-
if (config.colors.error) {
|
|
75117
|
-
process.env[`${prefix}COLOR_ERROR`] = config.colors.error;
|
|
75118
|
-
}
|
|
75119
|
-
if (config.colors.fatal) {
|
|
75120
|
-
process.env[`${prefix}COLOR_FATAL`] = config.colors.fatal;
|
|
75250
|
+
if (config.colors?.base?.light || config.colors?.base?.dark) {
|
|
75251
|
+
for (const key of Object.keys(config.colors)) {
|
|
75252
|
+
setThemeColorConfigEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
|
|
75253
|
+
}
|
|
75254
|
+
} else {
|
|
75255
|
+
setThemeColorConfigEnv(
|
|
75256
|
+
`${prefix}COLOR_`,
|
|
75257
|
+
config.colors
|
|
75258
|
+
);
|
|
75121
75259
|
}
|
|
75122
75260
|
if (config.repository) {
|
|
75123
75261
|
process.env[`${prefix}REPOSITORY`] = config.repository;
|
|
@@ -75146,11 +75284,90 @@ var init_set_env = __esm({
|
|
|
75146
75284
|
config.extensions[key] && Object.keys(config.extensions[key]) && setExtensionEnv(key, config.extensions[key]);
|
|
75147
75285
|
}
|
|
75148
75286
|
};
|
|
75287
|
+
setThemeColorConfigEnv = (prefix, config) => {
|
|
75288
|
+
return config?.light?.primary || config?.dark?.primary ? setMultiThemeColorConfigEnv(prefix, config) : setSingleThemeColorConfigEnv(prefix, config);
|
|
75289
|
+
};
|
|
75290
|
+
setSingleThemeColorConfigEnv = (prefix, config) => {
|
|
75291
|
+
if (config.dark) {
|
|
75292
|
+
process.env[`${prefix}DARK`] = config.dark;
|
|
75293
|
+
}
|
|
75294
|
+
if (config.light) {
|
|
75295
|
+
process.env[`${prefix}LIGHT`] = config.light;
|
|
75296
|
+
}
|
|
75297
|
+
if (config.primary) {
|
|
75298
|
+
process.env[`${prefix}PRIMARY`] = config.primary;
|
|
75299
|
+
}
|
|
75300
|
+
if (config.secondary) {
|
|
75301
|
+
process.env[`${prefix}SECONDARY`] = config.secondary;
|
|
75302
|
+
}
|
|
75303
|
+
if (config.tertiary) {
|
|
75304
|
+
process.env[`${prefix}TERTIARY`] = config.tertiary;
|
|
75305
|
+
}
|
|
75306
|
+
if (config.accent) {
|
|
75307
|
+
process.env[`${prefix}ACCENT`] = config.accent;
|
|
75308
|
+
}
|
|
75309
|
+
if (config.success) {
|
|
75310
|
+
process.env[`${prefix}SUCCESS`] = config.success;
|
|
75311
|
+
}
|
|
75312
|
+
if (config.info) {
|
|
75313
|
+
process.env[`${prefix}INFO`] = config.info;
|
|
75314
|
+
}
|
|
75315
|
+
if (config.warning) {
|
|
75316
|
+
process.env[`${prefix}WARNING`] = config.warning;
|
|
75317
|
+
}
|
|
75318
|
+
if (config.error) {
|
|
75319
|
+
process.env[`${prefix}ERROR`] = config.error;
|
|
75320
|
+
}
|
|
75321
|
+
if (config.fatal) {
|
|
75322
|
+
process.env[`${prefix}FATAL`] = config.fatal;
|
|
75323
|
+
}
|
|
75324
|
+
};
|
|
75325
|
+
setMultiThemeColorConfigEnv = (prefix, config) => {
|
|
75326
|
+
return {
|
|
75327
|
+
light: setBaseThemeColorConfigEnv(`${prefix}_LIGHT_`, config.light),
|
|
75328
|
+
dark: setBaseThemeColorConfigEnv(`${prefix}_DARK_`, config.dark)
|
|
75329
|
+
};
|
|
75330
|
+
};
|
|
75331
|
+
setBaseThemeColorConfigEnv = (prefix, config) => {
|
|
75332
|
+
if (config.foreground) {
|
|
75333
|
+
process.env[`${prefix}FOREGROUND`] = config.foreground;
|
|
75334
|
+
}
|
|
75335
|
+
if (config.background) {
|
|
75336
|
+
process.env[`${prefix}BACKGROUND`] = config.background;
|
|
75337
|
+
}
|
|
75338
|
+
if (config.primary) {
|
|
75339
|
+
process.env[`${prefix}PRIMARY`] = config.primary;
|
|
75340
|
+
}
|
|
75341
|
+
if (config.secondary) {
|
|
75342
|
+
process.env[`${prefix}SECONDARY`] = config.secondary;
|
|
75343
|
+
}
|
|
75344
|
+
if (config.tertiary) {
|
|
75345
|
+
process.env[`${prefix}TERTIARY`] = config.tertiary;
|
|
75346
|
+
}
|
|
75347
|
+
if (config.accent) {
|
|
75348
|
+
process.env[`${prefix}ACCENT`] = config.accent;
|
|
75349
|
+
}
|
|
75350
|
+
if (config.success) {
|
|
75351
|
+
process.env[`${prefix}SUCCESS`] = config.success;
|
|
75352
|
+
}
|
|
75353
|
+
if (config.info) {
|
|
75354
|
+
process.env[`${prefix}INFO`] = config.info;
|
|
75355
|
+
}
|
|
75356
|
+
if (config.warning) {
|
|
75357
|
+
process.env[`${prefix}WARNING`] = config.warning;
|
|
75358
|
+
}
|
|
75359
|
+
if (config.error) {
|
|
75360
|
+
process.env[`${prefix}ERROR`] = config.error;
|
|
75361
|
+
}
|
|
75362
|
+
if (config.fatal) {
|
|
75363
|
+
process.env[`${prefix}FATAL`] = config.fatal;
|
|
75364
|
+
}
|
|
75365
|
+
};
|
|
75149
75366
|
}
|
|
75150
75367
|
});
|
|
75151
75368
|
|
|
75152
75369
|
// packages/config-tools/src/create-storm-config.ts
|
|
75153
|
-
var _extension_cache, _static_cache, createConfig, createStormConfig, createConfigExtension, loadStormConfig;
|
|
75370
|
+
var import_deepmerge2, _extension_cache, _static_cache, createConfig, createStormConfig, createConfigExtension, loadStormConfig;
|
|
75154
75371
|
var init_create_storm_config = __esm({
|
|
75155
75372
|
"packages/config-tools/src/create-storm-config.ts"() {
|
|
75156
75373
|
init_get_config_file();
|
|
@@ -75159,6 +75376,7 @@ var init_create_storm_config = __esm({
|
|
|
75159
75376
|
init_schema();
|
|
75160
75377
|
init_utilities();
|
|
75161
75378
|
init_get_default_config();
|
|
75379
|
+
import_deepmerge2 = __toESM(require_cjs());
|
|
75162
75380
|
_extension_cache = /* @__PURE__ */ new WeakMap();
|
|
75163
75381
|
_static_cache = void 0;
|
|
75164
75382
|
createConfig = (workspaceRoot) => {
|
|
@@ -75207,7 +75425,9 @@ var init_create_storm_config = __esm({
|
|
|
75207
75425
|
if (!_workspaceRoot) {
|
|
75208
75426
|
_workspaceRoot = findWorkspaceRoot();
|
|
75209
75427
|
}
|
|
75210
|
-
|
|
75428
|
+
let configFile = await getConfigFile(
|
|
75429
|
+
_workspaceRoot
|
|
75430
|
+
);
|
|
75211
75431
|
if (!configFile) {
|
|
75212
75432
|
writeWarning(
|
|
75213
75433
|
"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",
|
|
@@ -75216,10 +75436,7 @@ var init_create_storm_config = __esm({
|
|
|
75216
75436
|
}
|
|
75217
75437
|
config = StormConfigSchema.parse(
|
|
75218
75438
|
await getDefaultConfig(
|
|
75219
|
-
{
|
|
75220
|
-
...getConfigEnv(),
|
|
75221
|
-
...configFile
|
|
75222
|
-
},
|
|
75439
|
+
(0, import_deepmerge2.default)(getConfigEnv(), configFile, {}),
|
|
75223
75440
|
_workspaceRoot
|
|
75224
75441
|
)
|
|
75225
75442
|
);
|
|
@@ -75257,6 +75474,7 @@ __export(src_exports, {
|
|
|
75257
75474
|
findFileName: () => findFileName,
|
|
75258
75475
|
findWorkspaceRoot: () => findWorkspaceRoot,
|
|
75259
75476
|
findWorkspaceRootSafe: () => findWorkspaceRootSafe,
|
|
75477
|
+
formatLogMessage: () => formatLogMessage,
|
|
75260
75478
|
getChalk: () => getChalk,
|
|
75261
75479
|
getConfigEnv: () => getConfigEnv,
|
|
75262
75480
|
getConfigFile: () => getConfigFile,
|
|
@@ -77822,7 +78040,7 @@ ${Object.keys(options ?? {}).map((key) => ` - ${key}=${JSON.stringify(options[ke
|
|
|
77822
78040
|
var import_node_child_process6 = require("node:child_process");
|
|
77823
78041
|
var import_git = require("nx/src/command-line/release/utils/git");
|
|
77824
78042
|
var import_resolve_semver_specifier = require("nx/src/command-line/release/utils/resolve-semver-specifier");
|
|
77825
|
-
var
|
|
78043
|
+
var import_config3 = require("nx/src/command-line/release/config/config");
|
|
77826
78044
|
var import_semver2 = __toESM(require_semver2());
|
|
77827
78045
|
var import_resolve_local_package_dependencies = __toESM(require_resolve_local_package_dependencies());
|
|
77828
78046
|
|
|
@@ -80983,7 +81201,7 @@ To fix this you will either need to add a package.json or Cargo.toml file at tha
|
|
|
80983
81201
|
}
|
|
80984
81202
|
case "prompt": {
|
|
80985
81203
|
const maybeLogReleaseGroup = (log2) => {
|
|
80986
|
-
if (options.releaseGroup.name ===
|
|
81204
|
+
if (options.releaseGroup.name === import_config3.IMPLICIT_DEFAULT_RELEASE_GROUP) {
|
|
80987
81205
|
return log2;
|
|
80988
81206
|
}
|
|
80989
81207
|
return `${log2} within release group "${options.releaseGroup.name}"`;
|