@storm-software/k8s-tools 0.23.2 → 0.23.4

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.
Files changed (57) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +1 -1
  3. package/dist/{chunk-7SAHBYCR.js → chunk-2KQ424CX.js} +2 -2
  4. package/dist/{chunk-O47HD2XS.js → chunk-4DFXY52M.js} +25 -25
  5. package/dist/{chunk-F26OPCDG.mjs → chunk-6YMDSAA2.mjs} +1 -1
  6. package/dist/{chunk-65PPRXAW.mjs → chunk-A7MW7UFA.mjs} +4 -4
  7. package/dist/{chunk-4QH2MTXK.js → chunk-CBICNJ6E.js} +111 -58
  8. package/dist/{chunk-OABQKZJH.js → chunk-CYX2EGNR.js} +4 -4
  9. package/dist/{chunk-6U6BC45C.js → chunk-HOFDLRYP.js} +4 -4
  10. package/dist/{chunk-DGFLUWWO.mjs → chunk-LYAWWCAB.mjs} +3 -3
  11. package/dist/{chunk-ILJQ7PUY.js → chunk-PHZZBOSZ.js} +3 -3
  12. package/dist/{chunk-DQV7NKM7.mjs → chunk-QHVQC4QN.mjs} +2 -2
  13. package/dist/{chunk-WWDN4BEK.mjs → chunk-QPQOI6C5.mjs} +4 -4
  14. package/dist/{chunk-EW7TITVO.mjs → chunk-ROJAE6RK.mjs} +103 -50
  15. package/dist/{chunk-IBVTMWHS.mjs → chunk-TDTK6IFT.mjs} +4 -4
  16. package/dist/{chunk-6C5CWDYY.mjs → chunk-TSVC2RVE.mjs} +2 -2
  17. package/dist/{chunk-SXNPLQHC.js → chunk-UAYQFQHK.js} +6 -6
  18. package/dist/{chunk-6BXA3PGH.js → chunk-WEKPYGWO.js} +19 -19
  19. package/dist/{executor-DY-z8MOl.d.mts → executor-D71n4jMa.d.mts} +1 -1
  20. package/dist/{executor-Dr6UXfvX.d.ts → executor-MTqWZB_j.d.ts} +1 -1
  21. package/dist/executors.d.mts +2 -2
  22. package/dist/executors.d.ts +2 -2
  23. package/dist/executors.js +5 -5
  24. package/dist/executors.mjs +4 -4
  25. package/dist/{generator-B5bCfIUV.d.ts → generator-CIKNY8lm.d.ts} +1 -1
  26. package/dist/{generator-Cad7bXVB.d.mts → generator-DwMlsudq.d.mts} +1 -1
  27. package/dist/{generator-D7M45zOU.d.ts → generator-p_07U7ir.d.ts} +1 -1
  28. package/dist/{generator-BIe65kKR.d.mts → generator-uvcWUyND.d.mts} +1 -1
  29. package/dist/generators.d.mts +3 -3
  30. package/dist/generators.d.ts +3 -3
  31. package/dist/generators.js +6 -6
  32. package/dist/generators.mjs +5 -5
  33. package/dist/index.d.mts +4 -4
  34. package/dist/index.d.ts +4 -4
  35. package/dist/index.js +9 -9
  36. package/dist/index.mjs +8 -8
  37. package/dist/src/executors/container-publish/executor.d.mts +1 -1
  38. package/dist/src/executors/container-publish/executor.d.ts +1 -1
  39. package/dist/src/executors/container-publish/executor.js +4 -4
  40. package/dist/src/executors/container-publish/executor.mjs +3 -3
  41. package/dist/src/executors/helm-package/executor.d.mts +2 -2
  42. package/dist/src/executors/helm-package/executor.d.ts +2 -2
  43. package/dist/src/executors/helm-package/executor.js +4 -4
  44. package/dist/src/executors/helm-package/executor.mjs +3 -3
  45. package/dist/src/generators/helm-chart/generator.d.mts +2 -2
  46. package/dist/src/generators/helm-chart/generator.d.ts +2 -2
  47. package/dist/src/generators/helm-chart/generator.js +5 -5
  48. package/dist/src/generators/helm-chart/generator.mjs +4 -4
  49. package/dist/src/generators/helm-dependency/generator.d.mts +2 -2
  50. package/dist/src/generators/helm-dependency/generator.d.ts +2 -2
  51. package/dist/src/generators/helm-dependency/generator.js +5 -5
  52. package/dist/src/generators/helm-dependency/generator.mjs +4 -4
  53. package/dist/src/plugins/docker/index.js +3 -3
  54. package/dist/src/plugins/docker/index.mjs +2 -2
  55. package/dist/{types-CIJRaFHD.d.mts → types-BQ21E8Xn.d.mts} +3 -3
  56. package/dist/{types-CIJRaFHD.d.ts → types-BQ21E8Xn.d.ts} +3 -3
  57. package/package.json +1 -1
@@ -7,8 +7,8 @@ import {
7
7
  } from "./chunk-RVFKH45R.mjs";
8
8
  import {
9
9
  findWorkspaceRoot,
10
- loadStormConfig
11
- } from "./chunk-EW7TITVO.mjs";
10
+ getConfig
11
+ } from "./chunk-ROJAE6RK.mjs";
12
12
  import {
13
13
  __name
14
14
  } from "./chunk-XUV4U54K.mjs";
@@ -36,7 +36,7 @@ var createNodes = [
36
36
  return {};
37
37
  }
38
38
  const workspaceRoot = findWorkspaceRoot();
39
- const config = await loadStormConfig(workspaceRoot);
39
+ const config = await getConfig(workspaceRoot);
40
40
  Object.keys(projectJson).forEach((key) => {
41
41
  if (!project[key]) {
42
42
  project[key] = projectJson[key];
@@ -8,7 +8,7 @@ var _chunkIOT45LXVjs = require('./chunk-IOT45LXV.js');
8
8
 
9
9
 
10
10
 
11
- var _chunk4QH2MTXKjs = require('./chunk-4QH2MTXK.js');
11
+ var _chunkCBICNJ6Ejs = require('./chunk-CBICNJ6E.js');
12
12
 
13
13
 
14
14
  var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
@@ -35,8 +35,8 @@ var createNodes = [
35
35
  if (_optionalChain([projectJson, 'optionalAccess', _2 => _2.name])) {
36
36
  return {};
37
37
  }
38
- const workspaceRoot = _chunk4QH2MTXKjs.findWorkspaceRoot.call(void 0, );
39
- const config = await _chunk4QH2MTXKjs.loadStormConfig.call(void 0, workspaceRoot);
38
+ const workspaceRoot = _chunkCBICNJ6Ejs.findWorkspaceRoot.call(void 0, );
39
+ const config = await _chunkCBICNJ6Ejs.getConfig.call(void 0, workspaceRoot);
40
40
  Object.keys(projectJson).forEach((key) => {
41
41
  if (!project[key]) {
42
42
  project[key] = projectJson[key];
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  withRunGenerator
3
- } from "./chunk-IBVTMWHS.mjs";
3
+ } from "./chunk-TDTK6IFT.mjs";
4
4
  import {
5
5
  writeDebug
6
- } from "./chunk-EW7TITVO.mjs";
6
+ } from "./chunk-ROJAE6RK.mjs";
7
7
  import {
8
8
  __name
9
9
  } from "./chunk-XUV4U54K.mjs";
@@ -3,11 +3,11 @@ import {
3
3
  } from "./chunk-RVFKH45R.mjs";
4
4
  import {
5
5
  applyWorkspaceTokens
6
- } from "./chunk-F26OPCDG.mjs";
6
+ } from "./chunk-6YMDSAA2.mjs";
7
7
  import {
8
8
  findWorkspaceRoot,
9
- loadStormConfig
10
- } from "./chunk-EW7TITVO.mjs";
9
+ getConfig
10
+ } from "./chunk-ROJAE6RK.mjs";
11
11
  import {
12
12
  __name
13
13
  } from "./chunk-XUV4U54K.mjs";
@@ -73,7 +73,7 @@ async function* publishExecutor(options, context) {
73
73
  }
74
74
  console.info(`\u{1F680} Running Storm Container Registry Publish executor on the ${context.projectName} crate`);
75
75
  const workspaceRoot = findWorkspaceRoot();
76
- const config = await loadStormConfig(workspaceRoot);
76
+ const config = await getConfig(workspaceRoot);
77
77
  const projectConfig = context.projectsConfigurations?.projects[context.projectName];
78
78
  if (!projectConfig) {
79
79
  throw new Error(`The executor requires a valid projectsConfiguration - No configuration found for project ${context.projectName}`);
@@ -205,6 +205,8 @@ var ColorConfigMapSchema = z.union([
205
205
  }),
206
206
  z.record(z.string(), ColorConfigSchema)
207
207
  ]);
208
+ 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.");
209
+ 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.");
208
210
  var WorkspaceBotConfigSchema = z.object({
209
211
  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)"),
210
212
  email: z.string().trim().email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
@@ -219,11 +221,11 @@ var WorkspaceDirectoryConfigSchema = z.object({
219
221
  }).describe("Various directories used by the workspace to store data, cache, and configuration files");
220
222
  var StormConfigSchema = z.object({
221
223
  $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"),
222
- extends: z.string().trim().optional().describe("The path to a base JSON file to use as a configuration preset file"),
224
+ extends: ExtendsSchema.optional(),
223
225
  name: z.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
224
226
  namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
225
227
  organization: z.string().trim().default("storm-software").describe("The organization of the workspace"),
226
- repository: z.string().trim().url().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
228
+ repository: z.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
227
229
  license: z.string().trim().default("Apache-2.0").describe("The license type of the package"),
228
230
  homepage: z.string().trim().url().default(STORM_DEFAULT_HOMEPAGE).describe("The homepage of the workspace"),
229
231
  docs: z.string().trim().url().default(STORM_DEFAULT_DOCS).describe("The base documentation site for the workspace"),
@@ -286,7 +288,8 @@ var COLOR_KEYS = [
286
288
  ];
287
289
 
288
290
  // ../config-tools/src/utilities/get-default-config.ts
289
- import { existsSync as existsSync2, readFileSync } from "node:fs";
291
+ import { existsSync as existsSync2 } from "node:fs";
292
+ import { readFile } from "node:fs/promises";
290
293
  import { join as join2 } from "node:path";
291
294
  var DEFAULT_COLOR_CONFIG = {
292
295
  "light": {
@@ -316,17 +319,15 @@ var DEFAULT_COLOR_CONFIG = {
316
319
  "negative": "#dc2626"
317
320
  }
318
321
  };
319
- var getDefaultConfig = /* @__PURE__ */ __name((root) => {
322
+ var getDefaultConfig = /* @__PURE__ */ __name(async (root) => {
320
323
  let license = STORM_DEFAULT_LICENSE;
321
324
  let homepage = STORM_DEFAULT_HOMEPAGE;
322
- let name;
323
- let namespace;
324
- let repository;
325
+ let name = void 0;
326
+ let namespace = void 0;
327
+ let repository = void 0;
325
328
  const workspaceRoot = findWorkspaceRoot(root);
326
329
  if (existsSync2(join2(workspaceRoot, "package.json"))) {
327
- const file = readFileSync(join2(workspaceRoot, "package.json"), {
328
- encoding: "utf8"
329
- });
330
+ const file = await readFile(joinPaths(workspaceRoot, "package.json"), "utf8");
330
331
  if (file) {
331
332
  const packageJson = JSON.parse(file);
332
333
  if (packageJson.name) {
@@ -335,8 +336,12 @@ var getDefaultConfig = /* @__PURE__ */ __name((root) => {
335
336
  if (packageJson.namespace) {
336
337
  namespace = packageJson.namespace;
337
338
  }
338
- if (packageJson.repository?.url) {
339
- repository = packageJson.repository?.url;
339
+ if (packageJson.repository) {
340
+ if (typeof packageJson.repository === "string") {
341
+ repository = packageJson.repository;
342
+ } else if (packageJson.repository.url) {
343
+ repository = packageJson.repository.url;
344
+ }
340
345
  }
341
346
  if (packageJson.license) {
342
347
  license = packageJson.license;
@@ -541,7 +546,6 @@ var writeInfo = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.IN
541
546
  var writeSuccess = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.SUCCESS, config)(message), "writeSuccess");
542
547
  var writeDebug = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.DEBUG, config)(message), "writeDebug");
543
548
  var writeTrace = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.TRACE, config)(message), "writeTrace");
544
- var writeSystem = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.ALL, config)(message), "writeSystem");
545
549
  var getStopwatch = /* @__PURE__ */ __name((name) => {
546
550
  const start = process.hrtime();
547
551
  return () => {
@@ -585,19 +589,19 @@ import { loadConfig } from "c12";
585
589
  import defu from "defu";
586
590
  var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, options = {}) => {
587
591
  const workspacePath = filePath || findWorkspaceRoot(filePath);
588
- let config = await loadConfig({
589
- cwd: workspacePath,
590
- packageJson: true,
591
- name: fileName,
592
- envName: fileName?.toUpperCase(),
593
- jitiOptions: {
594
- debug: false,
595
- fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
596
- },
597
- ...options
598
- });
599
- if (!config || Object.keys(config).length === 0) {
600
- config = await loadConfig({
592
+ const configs = await Promise.all([
593
+ loadConfig({
594
+ cwd: workspacePath,
595
+ packageJson: true,
596
+ name: fileName,
597
+ envName: fileName?.toUpperCase(),
598
+ jitiOptions: {
599
+ debug: false,
600
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
601
+ },
602
+ ...options
603
+ }),
604
+ loadConfig({
601
605
  cwd: workspacePath,
602
606
  packageJson: true,
603
607
  name: fileName,
@@ -608,9 +612,9 @@ var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, opti
608
612
  },
609
613
  configFile: fileName,
610
614
  ...options
611
- });
612
- }
613
- return config;
615
+ })
616
+ ]);
617
+ return defu(configs[0] ?? {}, configs[1] ?? {});
614
618
  }, "getConfigFileByName");
615
619
  var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames = []) => {
616
620
  const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
@@ -618,7 +622,7 @@ var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames
618
622
  let config = result.config;
619
623
  const configFile = result.configFile;
620
624
  if (config && configFile && Object.keys(config).length > 0) {
621
- writeSystem(`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
625
+ writeTrace(`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
622
626
  logLevel: "all"
623
627
  });
624
628
  }
@@ -626,7 +630,7 @@ var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames
626
630
  const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
627
631
  for (const result2 of results) {
628
632
  if (result2?.config && result2?.configFile && Object.keys(result2.config).length > 0) {
629
- writeSystem(`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
633
+ writeTrace(`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
630
634
  logLevel: "all"
631
635
  });
632
636
  config = defu(result2.config ?? {}, config ?? {});
@@ -641,6 +645,16 @@ var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames
641
645
  }, "getConfigFile");
642
646
 
643
647
  // ../config-tools/src/env/get-env.ts
648
+ var getExtensionEnv = /* @__PURE__ */ __name((extensionName) => {
649
+ const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
650
+ return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
651
+ const name = key.replace(prefix, "").split("_").map((i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : "").join("");
652
+ if (name) {
653
+ ret[name] = process.env[key];
654
+ }
655
+ return ret;
656
+ }, {});
657
+ }, "getExtensionEnv");
644
658
  var getConfigEnv = /* @__PURE__ */ __name(() => {
645
659
  const prefix = "STORM_";
646
660
  let config = {
@@ -800,7 +814,7 @@ var setExtensionEnv = /* @__PURE__ */ __name((extensionName, extension) => {
800
814
  var setConfigEnv = /* @__PURE__ */ __name((config) => {
801
815
  const prefix = "STORM_";
802
816
  if (config.extends) {
803
- process.env[`${prefix}EXTENDS`] = config.extends;
817
+ process.env[`${prefix}EXTENDS`] = Array.isArray(config.extends) ? JSON.stringify(config.extends) : config.extends;
804
818
  }
805
819
  if (config.name) {
806
820
  process.env[`${prefix}NAME`] = config.name;
@@ -1030,30 +1044,69 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
1030
1044
  }, "setBaseThemeColorConfigEnv");
1031
1045
 
1032
1046
  // ../config-tools/src/create-storm-config.ts
1047
+ var _extension_cache = /* @__PURE__ */ new WeakMap();
1033
1048
  var _static_cache = void 0;
1034
- var loadStormConfig = /* @__PURE__ */ __name(async (workspaceRoot) => {
1035
- let config = {};
1036
- if (_static_cache?.data && _static_cache?.timestamp && _static_cache.timestamp >= Date.now() + 3e4) {
1037
- writeTrace(`Configuration cache hit - ${_static_cache.timestamp}`, _static_cache.data);
1038
- return _static_cache.data;
1039
- }
1040
- let _workspaceRoot = workspaceRoot;
1041
- if (!_workspaceRoot) {
1042
- _workspaceRoot = findWorkspaceRoot();
1043
- }
1044
- const configFile = await getConfigFile(_workspaceRoot);
1045
- if (!configFile) {
1046
- 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", {
1047
- logLevel: "all"
1048
- });
1049
+ var createStormConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot, skipLogs = false) => {
1050
+ let result;
1051
+ if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 8e3) {
1052
+ let _workspaceRoot = workspaceRoot;
1053
+ if (!_workspaceRoot) {
1054
+ _workspaceRoot = findWorkspaceRoot();
1055
+ }
1056
+ const configEnv = getConfigEnv();
1057
+ const defaultConfig = await getDefaultConfig(_workspaceRoot);
1058
+ const configFile = await getConfigFile(_workspaceRoot);
1059
+ if (!configFile && !skipLogs) {
1060
+ 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", {
1061
+ logLevel: "all"
1062
+ });
1063
+ }
1064
+ result = await StormConfigSchema.parseAsync(defu2(configEnv, configFile, defaultConfig));
1065
+ result.workspaceRoot ??= _workspaceRoot;
1066
+ } else {
1067
+ result = _static_cache.data;
1049
1068
  }
1050
- config = defu2(getConfigEnv(), configFile, getDefaultConfig(_workspaceRoot));
1069
+ if (schema && extensionName) {
1070
+ result.extensions = {
1071
+ ...result.extensions,
1072
+ [extensionName]: createConfigExtension(extensionName, schema)
1073
+ };
1074
+ }
1075
+ _static_cache = {
1076
+ timestamp: Date.now(),
1077
+ data: result
1078
+ };
1079
+ return result;
1080
+ }, "createStormConfig");
1081
+ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
1082
+ const extension_cache_key = {
1083
+ extensionName
1084
+ };
1085
+ if (_extension_cache.has(extension_cache_key)) {
1086
+ return _extension_cache.get(extension_cache_key);
1087
+ }
1088
+ let extension = getExtensionEnv(extensionName);
1089
+ if (schema) {
1090
+ extension = schema.parse(extension);
1091
+ }
1092
+ _extension_cache.set(extension_cache_key, extension);
1093
+ return extension;
1094
+ }, "createConfigExtension");
1095
+ var loadStormConfig = /* @__PURE__ */ __name(async (workspaceRoot, skipLogs = false) => {
1096
+ const config = await createStormConfig(void 0, void 0, workspaceRoot, skipLogs);
1051
1097
  setConfigEnv(config);
1052
- writeTrace(`\u2699\uFE0F Using Storm configuration:
1098
+ if (!skipLogs) {
1099
+ writeTrace(`\u2699\uFE0F Using Storm configuration:
1053
1100
  ${formatLogMessage(config)}`, config);
1101
+ }
1054
1102
  return config;
1055
1103
  }, "loadStormConfig");
1056
1104
 
1105
+ // ../config-tools/src/get-config.ts
1106
+ var getConfig = /* @__PURE__ */ __name((workspaceRoot, skipLogs = false) => {
1107
+ return loadStormConfig(workspaceRoot, skipLogs);
1108
+ }, "getConfig");
1109
+
1057
1110
  export {
1058
1111
  findWorkspaceRoot,
1059
1112
  writeFatal,
@@ -1065,5 +1118,5 @@ export {
1065
1118
  writeTrace,
1066
1119
  getStopwatch,
1067
1120
  formatLogMessage,
1068
- loadStormConfig
1121
+ getConfig
1069
1122
  };
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  applyWorkspaceBaseTokens,
3
3
  applyWorkspaceTokens
4
- } from "./chunk-F26OPCDG.mjs";
4
+ } from "./chunk-6YMDSAA2.mjs";
5
5
  import {
6
6
  findWorkspaceRoot,
7
+ getConfig,
7
8
  getStopwatch,
8
- loadStormConfig,
9
9
  writeDebug,
10
10
  writeError,
11
11
  writeFatal,
12
12
  writeInfo,
13
13
  writeSuccess,
14
14
  writeTrace
15
- } from "./chunk-EW7TITVO.mjs";
15
+ } from "./chunk-ROJAE6RK.mjs";
16
16
  import {
17
17
  __name
18
18
  } from "./chunk-XUV4U54K.mjs";
@@ -32,7 +32,7 @@ var withRunGenerator = /* @__PURE__ */ __name((name, generatorFn, generatorOptio
32
32
  if (!generatorOptions.skipReadingConfig) {
33
33
  writeDebug(`Loading the Storm Config from environment variables and storm.config.js file...
34
34
  - workspaceRoot: ${workspaceRoot}`, config);
35
- config = await loadStormConfig(workspaceRoot);
35
+ config = await getConfig(workspaceRoot);
36
36
  }
37
37
  if (generatorOptions?.hooks?.applyDefaultOptions) {
38
38
  writeDebug("Running the applyDefaultOptions hook...", config);
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  withRunGenerator
3
- } from "./chunk-IBVTMWHS.mjs";
3
+ } from "./chunk-TDTK6IFT.mjs";
4
4
  import {
5
5
  writeDebug
6
- } from "./chunk-EW7TITVO.mjs";
6
+ } from "./chunk-ROJAE6RK.mjs";
7
7
  import {
8
8
  __dirname,
9
9
  __name
@@ -3,11 +3,11 @@
3
3
  var _chunkIOT45LXVjs = require('./chunk-IOT45LXV.js');
4
4
 
5
5
 
6
- var _chunk7SAHBYCRjs = require('./chunk-7SAHBYCR.js');
6
+ var _chunk2KQ424CXjs = require('./chunk-2KQ424CX.js');
7
7
 
8
8
 
9
9
 
10
- var _chunk4QH2MTXKjs = require('./chunk-4QH2MTXK.js');
10
+ var _chunkCBICNJ6Ejs = require('./chunk-CBICNJ6E.js');
11
11
 
12
12
 
13
13
  var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
@@ -59,7 +59,7 @@ var applyWorkspaceExecutorTokens = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(
59
59
  result = result.replaceAll("{sourceRoot}", sourceRoot);
60
60
  }
61
61
  if (result.includes("{workspaceRoot}")) {
62
- result = result.replaceAll("{workspaceRoot}", _nullishCoalesce(tokenizerOptions.workspaceRoot, () => ( _chunk4QH2MTXKjs.findWorkspaceRoot.call(void 0, ))));
62
+ result = result.replaceAll("{workspaceRoot}", _nullishCoalesce(tokenizerOptions.workspaceRoot, () => ( _chunkCBICNJ6Ejs.findWorkspaceRoot.call(void 0, ))));
63
63
  }
64
64
  return result;
65
65
  }, "applyWorkspaceExecutorTokens");
@@ -72,8 +72,8 @@ async function* publishExecutor(options, context) {
72
72
  throw new Error("The executor requires a projectName.");
73
73
  }
74
74
  console.info(`\u{1F680} Running Storm Container Registry Publish executor on the ${context.projectName} crate`);
75
- const workspaceRoot = _chunk4QH2MTXKjs.findWorkspaceRoot.call(void 0, );
76
- const config = await _chunk4QH2MTXKjs.loadStormConfig.call(void 0, workspaceRoot);
75
+ const workspaceRoot = _chunkCBICNJ6Ejs.findWorkspaceRoot.call(void 0, );
76
+ const config = await _chunkCBICNJ6Ejs.getConfig.call(void 0, workspaceRoot);
77
77
  const projectConfig = _optionalChain([context, 'access', _2 => _2.projectsConfigurations, 'optionalAccess', _3 => _3.projects, 'access', _4 => _4[context.projectName]]);
78
78
  if (!projectConfig) {
79
79
  throw new Error(`The executor requires a valid projectsConfiguration - No configuration found for project ${context.projectName}`);
@@ -82,7 +82,7 @@ async function* publishExecutor(options, context) {
82
82
  const sourceRoot = _nullishCoalesce(_optionalChain([projectConfig, 'optionalAccess', _6 => _6.sourceRoot]), () => ( workspaceRoot));
83
83
  const projectName = _nullishCoalesce(_optionalChain([projectConfig, 'optionalAccess', _7 => _7.name]), () => ( context.projectName));
84
84
  config.workspaceRoot = workspaceRoot;
85
- const tokenized = await _chunk7SAHBYCRjs.applyWorkspaceTokens.call(void 0, options, {
85
+ const tokenized = await _chunk2KQ424CXjs.applyWorkspaceTokens.call(void 0, options, {
86
86
  config,
87
87
  workspaceRoot,
88
88
  projectRoot,
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
- var _chunk7SAHBYCRjs = require('./chunk-7SAHBYCR.js');
4
+ var _chunk2KQ424CXjs = require('./chunk-2KQ424CX.js');
5
5
 
6
6
 
7
7
 
@@ -12,7 +12,7 @@ var _chunk7SAHBYCRjs = require('./chunk-7SAHBYCR.js');
12
12
 
13
13
 
14
14
 
15
- var _chunk4QH2MTXKjs = require('./chunk-4QH2MTXK.js');
15
+ var _chunkCBICNJ6Ejs = require('./chunk-CBICNJ6E.js');
16
16
 
17
17
 
18
18
  var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
@@ -21,34 +21,34 @@ var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
21
21
  var withRunGenerator = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (name, generatorFn, generatorOptions = {
22
22
  skipReadingConfig: false
23
23
  }) => async (tree, _options) => {
24
- const stopwatch = _chunk4QH2MTXKjs.getStopwatch.call(void 0, name);
24
+ const stopwatch = _chunkCBICNJ6Ejs.getStopwatch.call(void 0, name);
25
25
  let options = _options;
26
26
  let config;
27
27
  try {
28
- _chunk4QH2MTXKjs.writeInfo.call(void 0, `\u26A1 Running the ${name} generator...
28
+ _chunkCBICNJ6Ejs.writeInfo.call(void 0, `\u26A1 Running the ${name} generator...
29
29
 
30
30
  `, config);
31
- const workspaceRoot = _chunk4QH2MTXKjs.findWorkspaceRoot.call(void 0, );
31
+ const workspaceRoot = _chunkCBICNJ6Ejs.findWorkspaceRoot.call(void 0, );
32
32
  if (!generatorOptions.skipReadingConfig) {
33
- _chunk4QH2MTXKjs.writeDebug.call(void 0, `Loading the Storm Config from environment variables and storm.config.js file...
33
+ _chunkCBICNJ6Ejs.writeDebug.call(void 0, `Loading the Storm Config from environment variables and storm.config.js file...
34
34
  - workspaceRoot: ${workspaceRoot}`, config);
35
- config = await _chunk4QH2MTXKjs.loadStormConfig.call(void 0, workspaceRoot);
35
+ config = await _chunkCBICNJ6Ejs.getConfig.call(void 0, workspaceRoot);
36
36
  }
37
37
  if (_optionalChain([generatorOptions, 'optionalAccess', _ => _.hooks, 'optionalAccess', _2 => _2.applyDefaultOptions])) {
38
- _chunk4QH2MTXKjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
38
+ _chunkCBICNJ6Ejs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
39
39
  options = await Promise.resolve(generatorOptions.hooks.applyDefaultOptions(options, config));
40
- _chunk4QH2MTXKjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
40
+ _chunkCBICNJ6Ejs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
41
41
  }
42
- _chunk4QH2MTXKjs.writeTrace.call(void 0, `Generator schema options \u2699\uFE0F
42
+ _chunkCBICNJ6Ejs.writeTrace.call(void 0, `Generator schema options \u2699\uFE0F
43
43
  ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`, config);
44
- const tokenized = await _chunk7SAHBYCRjs.applyWorkspaceTokens.call(void 0, options, {
44
+ const tokenized = await _chunk2KQ424CXjs.applyWorkspaceTokens.call(void 0, options, {
45
45
  workspaceRoot: tree.root,
46
46
  config
47
- }, _chunk7SAHBYCRjs.applyWorkspaceBaseTokens);
47
+ }, _chunk2KQ424CXjs.applyWorkspaceBaseTokens);
48
48
  if (_optionalChain([generatorOptions, 'optionalAccess', _3 => _3.hooks, 'optionalAccess', _4 => _4.preProcess])) {
49
- _chunk4QH2MTXKjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
49
+ _chunkCBICNJ6Ejs.writeDebug.call(void 0, "Running the preProcess hook...", config);
50
50
  await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
51
- _chunk4QH2MTXKjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
51
+ _chunkCBICNJ6Ejs.writeDebug.call(void 0, "Completed the preProcess hook", config);
52
52
  }
53
53
  const result = await Promise.resolve(generatorFn(tree, tokenized, config));
54
54
  if (result) {
@@ -61,18 +61,18 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
61
61
  }
62
62
  }
63
63
  if (_optionalChain([generatorOptions, 'optionalAccess', _14 => _14.hooks, 'optionalAccess', _15 => _15.postProcess])) {
64
- _chunk4QH2MTXKjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
64
+ _chunkCBICNJ6Ejs.writeDebug.call(void 0, "Running the postProcess hook...", config);
65
65
  await Promise.resolve(generatorOptions.hooks.postProcess(config));
66
- _chunk4QH2MTXKjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
66
+ _chunkCBICNJ6Ejs.writeDebug.call(void 0, "Completed the postProcess hook", config);
67
67
  }
68
68
  return () => {
69
- _chunk4QH2MTXKjs.writeSuccess.call(void 0, `Completed running the ${name} generator!
69
+ _chunkCBICNJ6Ejs.writeSuccess.call(void 0, `Completed running the ${name} generator!
70
70
  `, config);
71
71
  };
72
72
  } catch (error) {
73
73
  return () => {
74
- _chunk4QH2MTXKjs.writeFatal.call(void 0, "A fatal error occurred while running the generator - the process was forced to terminate", config);
75
- _chunk4QH2MTXKjs.writeError.call(void 0, `An exception was thrown in the generator's process
74
+ _chunkCBICNJ6Ejs.writeFatal.call(void 0, "A fatal error occurred while running the generator - the process was forced to terminate", config);
75
+ _chunkCBICNJ6Ejs.writeError.call(void 0, `An exception was thrown in the generator's process
76
76
  - Details: ${error.message}
77
77
  - Stacktrace: ${error.stack}`, config);
78
78
  };
@@ -1,5 +1,5 @@
1
1
  import { ExecutorContext, PromiseExecutor } from '@nx/devkit';
2
- import { S as StormConfig } from './types-CIJRaFHD.mjs';
2
+ import { S as StormConfig } from './types-BQ21E8Xn.mjs';
3
3
 
4
4
  // Generated by @storm-software/untyped
5
5
  // Do not edit this file directly
@@ -1,5 +1,5 @@
1
1
  import { ExecutorContext, PromiseExecutor } from '@nx/devkit';
2
- import { S as StormConfig } from './types-CIJRaFHD.js';
2
+ import { S as StormConfig } from './types-BQ21E8Xn.js';
3
3
 
4
4
  // Generated by @storm-software/untyped
5
5
  // Do not edit this file directly
@@ -1,6 +1,6 @@
1
1
  export { getRegistryVersion } from './src/executors/container-publish/executor.mjs';
2
2
  export { C as ContainerPublishExecutorSchema } from './schema.d-Cx_3iG9A.mjs';
3
- export { H as HelmPackageExecutorSchema, s as serveExecutor } from './executor-DY-z8MOl.mjs';
3
+ export { H as HelmPackageExecutorSchema, s as serveExecutor } from './executor-D71n4jMa.mjs';
4
4
  import '@nx/devkit';
5
- import './types-CIJRaFHD.mjs';
5
+ import './types-BQ21E8Xn.mjs';
6
6
  import 'zod';
@@ -1,6 +1,6 @@
1
1
  export { getRegistryVersion } from './src/executors/container-publish/executor.js';
2
2
  export { C as ContainerPublishExecutorSchema } from './schema.d-Cx_3iG9A.js';
3
- export { H as HelmPackageExecutorSchema, s as serveExecutor } from './executor-Dr6UXfvX.js';
3
+ export { H as HelmPackageExecutorSchema, s as serveExecutor } from './executor-MTqWZB_j.js';
4
4
  import '@nx/devkit';
5
- import './types-CIJRaFHD.js';
5
+ import './types-BQ21E8Xn.js';
6
6
  import 'zod';
package/dist/executors.js CHANGED
@@ -1,13 +1,13 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-XO66D74Z.js');
2
2
 
3
3
 
4
- var _chunkSXNPLQHCjs = require('./chunk-SXNPLQHC.js');
4
+ var _chunkUAYQFQHKjs = require('./chunk-UAYQFQHK.js');
5
5
 
6
6
 
7
- var _chunkO47HD2XSjs = require('./chunk-O47HD2XS.js');
7
+ var _chunk4DFXY52Mjs = require('./chunk-4DFXY52M.js');
8
8
  require('./chunk-IOT45LXV.js');
9
- require('./chunk-7SAHBYCR.js');
10
- require('./chunk-4QH2MTXK.js');
9
+ require('./chunk-2KQ424CX.js');
10
+ require('./chunk-CBICNJ6E.js');
11
11
  require('./chunk-2GAU2GHG.js');
12
12
  require('./chunk-LFNGKV6F.js');
13
13
  require('./chunk-EAQFLLRB.js');
@@ -15,4 +15,4 @@ require('./chunk-3GQAWCBQ.js');
15
15
 
16
16
 
17
17
 
18
- exports.getRegistryVersion = _chunkSXNPLQHCjs.getRegistryVersion; exports.serveExecutor = _chunkO47HD2XSjs.serveExecutor;
18
+ exports.getRegistryVersion = _chunkUAYQFQHKjs.getRegistryVersion; exports.serveExecutor = _chunk4DFXY52Mjs.serveExecutor;
@@ -1,13 +1,13 @@
1
1
  import "./chunk-YSCEY447.mjs";
2
2
  import {
3
3
  getRegistryVersion
4
- } from "./chunk-WWDN4BEK.mjs";
4
+ } from "./chunk-QPQOI6C5.mjs";
5
5
  import {
6
6
  serveExecutor
7
- } from "./chunk-65PPRXAW.mjs";
7
+ } from "./chunk-A7MW7UFA.mjs";
8
8
  import "./chunk-RVFKH45R.mjs";
9
- import "./chunk-F26OPCDG.mjs";
10
- import "./chunk-EW7TITVO.mjs";
9
+ import "./chunk-6YMDSAA2.mjs";
10
+ import "./chunk-ROJAE6RK.mjs";
11
11
  import "./chunk-6V45YKVB.mjs";
12
12
  import "./chunk-UDLI3L7V.mjs";
13
13
  import "./chunk-OA63SGD6.mjs";
@@ -1,7 +1,7 @@
1
1
  import { B as BaseGeneratorSchema, a as BaseGeneratorResult } from './types-BCBFBwnJ.js';
2
2
  import * as _nx_devkit from '@nx/devkit';
3
3
  import { Tree } from '@nx/devkit';
4
- import { S as StormConfig } from './types-CIJRaFHD.js';
4
+ import { S as StormConfig } from './types-BQ21E8Xn.js';
5
5
 
6
6
  interface HelmChartGeneratorSchema extends BaseGeneratorSchema {
7
7
  /** Name of the chart */
@@ -1,7 +1,7 @@
1
1
  import { B as BaseGeneratorSchema, a as BaseGeneratorResult } from './types-BCBFBwnJ.mjs';
2
2
  import * as _nx_devkit from '@nx/devkit';
3
3
  import { Tree } from '@nx/devkit';
4
- import { S as StormConfig } from './types-CIJRaFHD.mjs';
4
+ import { S as StormConfig } from './types-BQ21E8Xn.mjs';
5
5
 
6
6
  interface HelmChartGeneratorSchema extends BaseGeneratorSchema {
7
7
  /** Name of the chart */
@@ -1,7 +1,7 @@
1
1
  import { B as BaseGeneratorSchema, a as BaseGeneratorResult } from './types-BCBFBwnJ.js';
2
2
  import * as _nx_devkit from '@nx/devkit';
3
3
  import { Tree } from '@nx/devkit';
4
- import { S as StormConfig } from './types-CIJRaFHD.js';
4
+ import { S as StormConfig } from './types-BQ21E8Xn.js';
5
5
 
6
6
  interface HelmDependencyGeneratorSchema extends BaseGeneratorSchema {
7
7
  /** Project name */
@@ -1,7 +1,7 @@
1
1
  import { B as BaseGeneratorSchema, a as BaseGeneratorResult } from './types-BCBFBwnJ.mjs';
2
2
  import * as _nx_devkit from '@nx/devkit';
3
3
  import { Tree } from '@nx/devkit';
4
- import { S as StormConfig } from './types-CIJRaFHD.mjs';
4
+ import { S as StormConfig } from './types-BQ21E8Xn.mjs';
5
5
 
6
6
  interface HelmDependencyGeneratorSchema extends BaseGeneratorSchema {
7
7
  /** Project name */