@storm-software/k8s-tools 0.25.19 → 0.25.21

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 (63) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +1 -1
  3. package/dist/chunk-27DDDFDE.mjs +29 -0
  4. package/dist/{chunk-RKHT4PWO.js → chunk-2SIDLIM5.js} +47 -31
  5. package/dist/{chunk-2GAU2GHG.js → chunk-4AADQIGW.js} +35 -102
  6. package/dist/{chunk-T5WNZJOD.js → chunk-7QVOU2PT.js} +3 -11
  7. package/dist/{chunk-3OATAJ3B.js → chunk-A7ARE63F.js} +83 -55
  8. package/dist/chunk-ARIMP3W4.mjs +155 -0
  9. package/dist/{chunk-TNVATOCF.mjs → chunk-BBY7MXHG.mjs} +93 -54
  10. package/dist/{chunk-OIKG7EMC.js → chunk-DD5DCADP.js} +32 -16
  11. package/dist/{chunk-IQYUMTUG.js → chunk-GQUK4O4E.js} +30 -23
  12. package/dist/{chunk-UC4ZBDTX.mjs → chunk-HGXQ6SSU.mjs} +5 -7
  13. package/dist/{chunk-LFNGKV6F.js → chunk-JSFRUBG5.js} +1 -8
  14. package/dist/{chunk-LLSJITI4.mjs → chunk-KVKKT3AU.mjs} +24 -13
  15. package/dist/{chunk-QKTRYJDT.mjs → chunk-MDGD27YL.mjs} +32 -16
  16. package/dist/{chunk-A2UL7VJH.mjs → chunk-MKWEGZBN.mjs} +31 -24
  17. package/dist/{chunk-YY3TH3F7.mjs → chunk-MQZUEUAT.mjs} +26 -21
  18. package/dist/{chunk-F37JQGEZ.mjs → chunk-MWMS7P7U.mjs} +333 -208
  19. package/dist/{chunk-X7ALQPYH.js → chunk-NMNRCEUZ.js} +21 -12
  20. package/dist/{chunk-T3C63ATM.mjs → chunk-NWIIGYA4.mjs} +68 -40
  21. package/dist/{chunk-NJPZBNWH.mjs → chunk-QHFQ2OBL.mjs} +2 -10
  22. package/dist/chunk-RECJ3G6F.js +21 -0
  23. package/dist/{chunk-IOT45LXV.js → chunk-RUPAIXLM.js} +59 -38
  24. package/dist/chunk-RUROM5AC.mjs +136 -0
  25. package/dist/{chunk-PDHZDUK3.js → chunk-SGNASGK5.js} +94 -55
  26. package/dist/{chunk-ARMCUBMY.js → chunk-UWVOFPSW.js} +334 -209
  27. package/dist/{chunk-RDQRJI4Y.mjs → chunk-VREITNWP.mjs} +36 -20
  28. package/dist/{chunk-EAQFLLRB.js → chunk-XKOZIQT3.js} +6 -8
  29. package/dist/{chunk-G7TAEXNU.js → chunk-Y2HMMGO2.js} +28 -23
  30. package/dist/{chunk-YHT26DWR.mjs → chunk-YXXZO2AJ.mjs} +0 -7
  31. package/dist/executors.js +10 -10
  32. package/dist/executors.mjs +9 -9
  33. package/dist/generators.js +7 -7
  34. package/dist/generators.mjs +6 -6
  35. package/dist/index.js +15 -15
  36. package/dist/index.mjs +14 -14
  37. package/dist/src/executors/container-publish/executor.js +6 -6
  38. package/dist/src/executors/container-publish/executor.mjs +5 -5
  39. package/dist/src/executors/helm-package/executor.js +8 -8
  40. package/dist/src/executors/helm-package/executor.mjs +7 -7
  41. package/dist/src/generators/helm-chart/generator.js +6 -6
  42. package/dist/src/generators/helm-chart/generator.mjs +5 -5
  43. package/dist/src/generators/helm-dependency/generator.js +6 -6
  44. package/dist/src/generators/helm-dependency/generator.mjs +5 -5
  45. package/dist/src/plugins/docker/index.js +5 -5
  46. package/dist/src/plugins/docker/index.mjs +4 -4
  47. package/dist/src/types.js +3 -3
  48. package/dist/src/types.mjs +2 -2
  49. package/dist/src/utils/client.js +5 -5
  50. package/dist/src/utils/client.mjs +4 -4
  51. package/dist/src/utils/ensure-init.js +3 -3
  52. package/dist/src/utils/ensure-init.mjs +2 -2
  53. package/dist/src/utils/index.js +6 -6
  54. package/dist/src/utils/index.mjs +5 -5
  55. package/dist/src/utils/prettier.js +3 -3
  56. package/dist/src/utils/prettier.mjs +2 -2
  57. package/dist/tsup.config.js +3 -8
  58. package/dist/tsup.config.mjs +3 -8
  59. package/package.json +1 -1
  60. package/dist/chunk-3GQAWCBQ.js +0 -13
  61. package/dist/chunk-5JZUTREX.mjs +0 -134
  62. package/dist/chunk-L2DHGVS5.mjs +0 -21
  63. package/dist/chunk-ZNGN7YLH.mjs +0 -203
@@ -1,12 +1,9 @@
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
- var _chunkARMCUBMYjs = require('./chunk-ARMCUBMY.js');
4
-
5
-
6
- var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
3
+ var _chunkUWVOFPSWjs = require('./chunk-UWVOFPSW.js');
7
4
 
8
5
  // ../config-tools/src/utilities/apply-workspace-tokens.ts
9
- var applyWorkspaceBaseTokens = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (option, tokenParams) => {
6
+ var applyWorkspaceBaseTokens = async (option, tokenParams) => {
10
7
  let result = option;
11
8
  if (!result) {
12
9
  return result;
@@ -16,7 +13,10 @@ var applyWorkspaceBaseTokens = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void
16
13
  if (optionKeys.some((optionKey) => result.includes(`{${optionKey}}`))) {
17
14
  for (const optionKey of optionKeys) {
18
15
  if (result.includes(`{${optionKey}}`)) {
19
- result = result.replaceAll(`{${optionKey}}`, _optionalChain([tokenParams, 'optionalAccess', _ => _[optionKey]]) || "");
16
+ result = result.replaceAll(
17
+ `{${optionKey}}`,
18
+ _optionalChain([tokenParams, 'optionalAccess', _ => _[optionKey]]) || ""
19
+ );
20
20
  }
21
21
  }
22
22
  }
@@ -26,37 +26,53 @@ var applyWorkspaceBaseTokens = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void
26
26
  if (configKeys.some((configKey) => result.includes(`{${configKey}}`))) {
27
27
  for (const configKey of configKeys) {
28
28
  if (result.includes(`{${configKey}}`)) {
29
- result = result.replaceAll(`{${configKey}}`, tokenParams.config[configKey] || "");
29
+ result = result.replaceAll(
30
+ `{${configKey}}`,
31
+ tokenParams.config[configKey] || ""
32
+ );
30
33
  }
31
34
  }
32
35
  }
33
36
  }
34
37
  if (result.includes("{workspaceRoot}")) {
35
- result = result.replaceAll("{workspaceRoot}", _nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _2 => _2.config, 'optionalAccess', _3 => _3.workspaceRoot]))), () => ( _chunkARMCUBMYjs.findWorkspaceRoot.call(void 0, ))));
38
+ result = result.replaceAll(
39
+ "{workspaceRoot}",
40
+ _nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _2 => _2.config, 'optionalAccess', _3 => _3.workspaceRoot]))), () => ( _chunkUWVOFPSWjs.findWorkspaceRoot.call(void 0, )))
41
+ );
36
42
  }
37
43
  return result;
38
- }, "applyWorkspaceBaseTokens");
39
- var applyWorkspaceProjectTokens = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (option, tokenParams) => {
44
+ };
45
+ var applyWorkspaceProjectTokens = (option, tokenParams) => {
40
46
  return applyWorkspaceBaseTokens(option, tokenParams);
41
- }, "applyWorkspaceProjectTokens");
42
- var applyWorkspaceTokens = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, tokenParams, tokenizerFn) => {
47
+ };
48
+ var applyWorkspaceTokens = async (options, tokenParams, tokenizerFn) => {
43
49
  if (!options) {
44
50
  return {};
45
51
  }
46
52
  const result = {};
47
53
  for (const option of Object.keys(options)) {
48
54
  if (typeof options[option] === "string") {
49
- result[option] = await Promise.resolve(tokenizerFn(options[option], tokenParams));
55
+ result[option] = await Promise.resolve(
56
+ tokenizerFn(options[option], tokenParams)
57
+ );
50
58
  } else if (Array.isArray(options[option])) {
51
- result[option] = await Promise.all(options[option].map(async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, tokenParams)) : item));
59
+ result[option] = await Promise.all(
60
+ options[option].map(
61
+ async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, tokenParams)) : item
62
+ )
63
+ );
52
64
  } else if (typeof options[option] === "object") {
53
- result[option] = await applyWorkspaceTokens(options[option], tokenParams, tokenizerFn);
65
+ result[option] = await applyWorkspaceTokens(
66
+ options[option],
67
+ tokenParams,
68
+ tokenizerFn
69
+ );
54
70
  } else {
55
71
  result[option] = options[option];
56
72
  }
57
73
  }
58
74
  return result;
59
- }, "applyWorkspaceTokens");
75
+ };
60
76
 
61
77
 
62
78
 
@@ -1,24 +1,37 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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
- var _chunkRKHT4PWOjs = require('./chunk-RKHT4PWO.js');
3
+ var _chunk2SIDLIM5js = require('./chunk-2SIDLIM5.js');
4
4
 
5
5
 
6
- var _chunkARMCUBMYjs = require('./chunk-ARMCUBMY.js');
6
+ var _chunkUWVOFPSWjs = require('./chunk-UWVOFPSW.js');
7
+
8
+ // src/generators/helm-dependency/generator.ts
9
+
7
10
 
8
11
 
9
- var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
10
12
 
11
- // src/generators/helm-dependency/generator.ts
12
13
  var _devkit = require('@nx/devkit');
13
14
  var _jsyaml = require('js-yaml'); var _jsyaml2 = _interopRequireDefault(_jsyaml);
14
15
  async function helmDependencyGeneratorFn(tree, options, config) {
15
- _chunkARMCUBMYjs.writeDebug.call(void 0, "\u{1F4DD} Preparing to add Helm Dependency", config);
16
+ _chunkUWVOFPSWjs.writeDebug.call(void 0, "\u{1F4DD} Preparing to add Helm Dependency", config);
16
17
  const project = _devkit.readProjectConfiguration.call(void 0, tree, options.project);
17
18
  if (!_optionalChain([project, 'access', _ => _.targets, 'optionalAccess', _2 => _2["helm-package"]])) {
18
- throw new Error(`Project ${options.project} does not have a helm target. Please run the chart generator first.`);
19
+ throw new Error(
20
+ `Project ${options.project} does not have a helm target. Please run the chart generator first.`
21
+ );
19
22
  }
20
- _devkit.updateProjectConfiguration.call(void 0, tree, options.project, addDependencyToConfig(project, options.repositoryName, options.repository));
21
- updateChartYaml(tree, project, options.chartName, options.chartVersion, options.repository);
23
+ _devkit.updateProjectConfiguration.call(void 0,
24
+ tree,
25
+ options.project,
26
+ addDependencyToConfig(project, options.repositoryName, options.repository)
27
+ );
28
+ updateChartYaml(
29
+ tree,
30
+ project,
31
+ options.chartName,
32
+ options.chartVersion,
33
+ options.repository
34
+ );
22
35
  if (options.format) {
23
36
  await _devkit.formatFiles.call(void 0, tree);
24
37
  }
@@ -26,8 +39,10 @@ async function helmDependencyGeneratorFn(tree, options, config) {
26
39
  success: true
27
40
  };
28
41
  }
29
- _chunk3GQAWCBQjs.__name.call(void 0, helmDependencyGeneratorFn, "helmDependencyGeneratorFn");
30
- var generator_default = _chunkRKHT4PWOjs.withRunGenerator.call(void 0, "Helm Dependency", helmDependencyGeneratorFn);
42
+ var generator_default = _chunk2SIDLIM5js.withRunGenerator.call(void 0,
43
+ "Helm Dependency",
44
+ helmDependencyGeneratorFn
45
+ );
31
46
  function addDependencyToConfig(project, name, url) {
32
47
  return {
33
48
  ...project,
@@ -41,23 +56,14 @@ function addDependencyToConfig(project, name, url) {
41
56
  ..._optionalChain([project, 'access', _8 => _8.targets, 'optionalAccess', _9 => _9["helm-package"], 'optionalAccess', _10 => _10.options, 'access', _11 => _11.dependencies]),
42
57
  repositories: _optionalChain([project, 'access', _12 => _12.targets, 'optionalAccess', _13 => _13["helm-package"], 'optionalAccess', _14 => _14.options, 'access', _15 => _15.dependencies, 'access', _16 => _16.repositories]) ? [
43
58
  ...project.targets["helm-package"].options.dependencies.repositories,
44
- {
45
- name,
46
- url
47
- }
48
- ] : [
49
- {
50
- name,
51
- url
52
- }
53
- ]
59
+ { name, url }
60
+ ] : [{ name, url }]
54
61
  }
55
62
  }
56
63
  }
57
64
  }
58
65
  };
59
66
  }
60
- _chunk3GQAWCBQjs.__name.call(void 0, addDependencyToConfig, "addDependencyToConfig");
61
67
  function updateChartYaml(tree, project, name, version, repository) {
62
68
  const chartFolder = _optionalChain([project, 'access', _17 => _17.targets, 'optionalAccess', _18 => _18["helm-package"], 'optionalAccess', _19 => _19.options, 'access', _20 => _20.chartFolder]);
63
69
  const chartPath = `${chartFolder}/Chart.yaml`;
@@ -73,7 +79,9 @@ function updateChartYaml(tree, project, name, version, repository) {
73
79
  if (!chartContents.dependencies) {
74
80
  chartContents.dependencies = [];
75
81
  }
76
- const existingDependency = chartContents.dependencies.find((dep) => dep.name === name);
82
+ const existingDependency = chartContents.dependencies.find(
83
+ (dep) => dep.name === name
84
+ );
77
85
  if (existingDependency) {
78
86
  existingDependency.version = version;
79
87
  existingDependency.repository = repository;
@@ -90,7 +98,6 @@ function updateChartYaml(tree, project, name, version, repository) {
90
98
  throw new Error("Failed to parse Chart.yaml");
91
99
  }
92
100
  }
93
- _chunk3GQAWCBQjs.__name.call(void 0, updateChartYaml, "updateChartYaml");
94
101
 
95
102
 
96
103
 
@@ -1,14 +1,12 @@
1
- import {
2
- __name
3
- } from "./chunk-L2DHGVS5.mjs";
4
-
5
1
  // src/utils/ensure-init.ts
6
- var ensureInitialized = /* @__PURE__ */ __name((target, propertyKey, descriptor) => {
2
+ var ensureInitialized = (target, propertyKey, descriptor) => {
7
3
  const originalMethod = descriptor.value;
8
4
  descriptor.value = async function(...arguments_) {
9
5
  const self = this;
10
6
  if (self.initialized === void 0 || typeof self.initialize !== "function") {
11
- throw new TypeError(`The ensureInitialized decorator can only be applied in classes with an 'initialized' property and 'initialize' method.`);
7
+ throw new TypeError(
8
+ `The ensureInitialized decorator can only be applied in classes with an 'initialized' property and 'initialize' method.`
9
+ );
12
10
  }
13
11
  if (!self.initialized) {
14
12
  await self.initialize();
@@ -16,7 +14,7 @@ var ensureInitialized = /* @__PURE__ */ __name((target, propertyKey, descriptor)
16
14
  return originalMethod.apply(this, arguments_);
17
15
  };
18
16
  return descriptor;
19
- }, "ensureInitialized");
17
+ };
20
18
 
21
19
  export {
22
20
  ensureInitialized
@@ -1,12 +1,5 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;
2
-
3
- var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
4
-
5
- // src/types.ts
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;// src/types.ts
6
2
  var AbstractHelmClient = (_class = class {constructor() { _class.prototype.__init.call(this); }
7
- static {
8
- _chunk3GQAWCBQjs.__name.call(void 0, this, "AbstractHelmClient");
9
- }
10
3
  __init() {this.initialized = false}
11
4
  async initialize() {
12
5
  throw new Error("Method not implemented.");
@@ -1,22 +1,28 @@
1
1
  import {
2
2
  withRunGenerator
3
- } from "./chunk-RDQRJI4Y.mjs";
3
+ } from "./chunk-VREITNWP.mjs";
4
4
  import {
5
5
  writeDebug
6
- } from "./chunk-F37JQGEZ.mjs";
6
+ } from "./chunk-MWMS7P7U.mjs";
7
7
  import {
8
- __dirname,
9
- __name
10
- } from "./chunk-L2DHGVS5.mjs";
8
+ __dirname
9
+ } from "./chunk-27DDDFDE.mjs";
11
10
 
12
11
  // src/generators/helm-chart/generator.ts
13
- import { formatFiles, generateFiles, readProjectConfiguration, updateProjectConfiguration } from "@nx/devkit";
12
+ import {
13
+ formatFiles,
14
+ generateFiles,
15
+ readProjectConfiguration,
16
+ updateProjectConfiguration
17
+ } from "@nx/devkit";
14
18
  import { join } from "path";
15
19
  async function helmChartGeneratorFn(tree, options, config) {
16
20
  writeDebug("\u{1F4DD} Preparing to write Helm Chart", config);
17
21
  const project = readProjectConfiguration(tree, options.project);
18
22
  if (project.targets?.["helm-package"]) {
19
- throw new Error(`Project ${options.project} already has a helm target. Please remove it before running this command.`);
23
+ throw new Error(
24
+ `Project ${options.project} already has a helm target. Please remove it before running this command.`
25
+ );
20
26
  }
21
27
  updateProjectConfiguration(tree, options.project, {
22
28
  ...project,
@@ -24,9 +30,7 @@ async function helmChartGeneratorFn(tree, options, config) {
24
30
  ...project.targets,
25
31
  "helm-package": {
26
32
  executor: "@storm-software/k8s-tools:helm-package",
27
- outputs: [
28
- "{options.outputFolder}"
29
- ],
33
+ outputs: ["{options.outputFolder}"],
30
34
  options: {
31
35
  chartFolder: `${project.root}/${options.chartFolder}`,
32
36
  outputFolder: "{workspaceRoot}/dist/charts/{projectRoot}",
@@ -41,7 +45,12 @@ async function helmChartGeneratorFn(tree, options, config) {
41
45
  }
42
46
  }
43
47
  });
44
- generateFiles(tree, join(__dirname, "files", "chart"), join(project.root, options.chartFolder ?? ""), options);
48
+ generateFiles(
49
+ tree,
50
+ join(__dirname, "files", "chart"),
51
+ join(project.root, options.chartFolder ?? ""),
52
+ options
53
+ );
45
54
  if (options.format) {
46
55
  await formatFiles(tree);
47
56
  }
@@ -49,8 +58,10 @@ async function helmChartGeneratorFn(tree, options, config) {
49
58
  success: true
50
59
  };
51
60
  }
52
- __name(helmChartGeneratorFn, "helmChartGeneratorFn");
53
- var generator_default = withRunGenerator("Helm Chart", helmChartGeneratorFn);
61
+ var generator_default = withRunGenerator(
62
+ "Helm Chart",
63
+ helmChartGeneratorFn
64
+ );
54
65
 
55
66
  export {
56
67
  helmChartGeneratorFn,
@@ -1,12 +1,9 @@
1
1
  import {
2
2
  findWorkspaceRoot
3
- } from "./chunk-F37JQGEZ.mjs";
4
- import {
5
- __name
6
- } from "./chunk-L2DHGVS5.mjs";
3
+ } from "./chunk-MWMS7P7U.mjs";
7
4
 
8
5
  // ../config-tools/src/utilities/apply-workspace-tokens.ts
9
- var applyWorkspaceBaseTokens = /* @__PURE__ */ __name(async (option, tokenParams) => {
6
+ var applyWorkspaceBaseTokens = async (option, tokenParams) => {
10
7
  let result = option;
11
8
  if (!result) {
12
9
  return result;
@@ -16,7 +13,10 @@ var applyWorkspaceBaseTokens = /* @__PURE__ */ __name(async (option, tokenParams
16
13
  if (optionKeys.some((optionKey) => result.includes(`{${optionKey}}`))) {
17
14
  for (const optionKey of optionKeys) {
18
15
  if (result.includes(`{${optionKey}}`)) {
19
- result = result.replaceAll(`{${optionKey}}`, tokenParams?.[optionKey] || "");
16
+ result = result.replaceAll(
17
+ `{${optionKey}}`,
18
+ tokenParams?.[optionKey] || ""
19
+ );
20
20
  }
21
21
  }
22
22
  }
@@ -26,37 +26,53 @@ var applyWorkspaceBaseTokens = /* @__PURE__ */ __name(async (option, tokenParams
26
26
  if (configKeys.some((configKey) => result.includes(`{${configKey}}`))) {
27
27
  for (const configKey of configKeys) {
28
28
  if (result.includes(`{${configKey}}`)) {
29
- result = result.replaceAll(`{${configKey}}`, tokenParams.config[configKey] || "");
29
+ result = result.replaceAll(
30
+ `{${configKey}}`,
31
+ tokenParams.config[configKey] || ""
32
+ );
30
33
  }
31
34
  }
32
35
  }
33
36
  }
34
37
  if (result.includes("{workspaceRoot}")) {
35
- result = result.replaceAll("{workspaceRoot}", tokenParams.workspaceRoot ?? tokenParams.config?.workspaceRoot ?? findWorkspaceRoot());
38
+ result = result.replaceAll(
39
+ "{workspaceRoot}",
40
+ tokenParams.workspaceRoot ?? tokenParams.config?.workspaceRoot ?? findWorkspaceRoot()
41
+ );
36
42
  }
37
43
  return result;
38
- }, "applyWorkspaceBaseTokens");
39
- var applyWorkspaceProjectTokens = /* @__PURE__ */ __name((option, tokenParams) => {
44
+ };
45
+ var applyWorkspaceProjectTokens = (option, tokenParams) => {
40
46
  return applyWorkspaceBaseTokens(option, tokenParams);
41
- }, "applyWorkspaceProjectTokens");
42
- var applyWorkspaceTokens = /* @__PURE__ */ __name(async (options, tokenParams, tokenizerFn) => {
47
+ };
48
+ var applyWorkspaceTokens = async (options, tokenParams, tokenizerFn) => {
43
49
  if (!options) {
44
50
  return {};
45
51
  }
46
52
  const result = {};
47
53
  for (const option of Object.keys(options)) {
48
54
  if (typeof options[option] === "string") {
49
- result[option] = await Promise.resolve(tokenizerFn(options[option], tokenParams));
55
+ result[option] = await Promise.resolve(
56
+ tokenizerFn(options[option], tokenParams)
57
+ );
50
58
  } else if (Array.isArray(options[option])) {
51
- result[option] = await Promise.all(options[option].map(async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, tokenParams)) : item));
59
+ result[option] = await Promise.all(
60
+ options[option].map(
61
+ async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, tokenParams)) : item
62
+ )
63
+ );
52
64
  } else if (typeof options[option] === "object") {
53
- result[option] = await applyWorkspaceTokens(options[option], tokenParams, tokenizerFn);
65
+ result[option] = await applyWorkspaceTokens(
66
+ options[option],
67
+ tokenParams,
68
+ tokenizerFn
69
+ );
54
70
  } else {
55
71
  result[option] = options[option];
56
72
  }
57
73
  }
58
74
  return result;
59
- }, "applyWorkspaceTokens");
75
+ };
60
76
 
61
77
  export {
62
78
  applyWorkspaceBaseTokens,
@@ -1,24 +1,37 @@
1
1
  import {
2
2
  withRunGenerator
3
- } from "./chunk-RDQRJI4Y.mjs";
3
+ } from "./chunk-VREITNWP.mjs";
4
4
  import {
5
5
  writeDebug
6
- } from "./chunk-F37JQGEZ.mjs";
7
- import {
8
- __name
9
- } from "./chunk-L2DHGVS5.mjs";
6
+ } from "./chunk-MWMS7P7U.mjs";
10
7
 
11
8
  // src/generators/helm-dependency/generator.ts
12
- import { formatFiles, readProjectConfiguration, updateProjectConfiguration } from "@nx/devkit";
9
+ import {
10
+ formatFiles,
11
+ readProjectConfiguration,
12
+ updateProjectConfiguration
13
+ } from "@nx/devkit";
13
14
  import yaml from "js-yaml";
14
15
  async function helmDependencyGeneratorFn(tree, options, config) {
15
16
  writeDebug("\u{1F4DD} Preparing to add Helm Dependency", config);
16
17
  const project = readProjectConfiguration(tree, options.project);
17
18
  if (!project.targets?.["helm-package"]) {
18
- throw new Error(`Project ${options.project} does not have a helm target. Please run the chart generator first.`);
19
+ throw new Error(
20
+ `Project ${options.project} does not have a helm target. Please run the chart generator first.`
21
+ );
19
22
  }
20
- updateProjectConfiguration(tree, options.project, addDependencyToConfig(project, options.repositoryName, options.repository));
21
- updateChartYaml(tree, project, options.chartName, options.chartVersion, options.repository);
23
+ updateProjectConfiguration(
24
+ tree,
25
+ options.project,
26
+ addDependencyToConfig(project, options.repositoryName, options.repository)
27
+ );
28
+ updateChartYaml(
29
+ tree,
30
+ project,
31
+ options.chartName,
32
+ options.chartVersion,
33
+ options.repository
34
+ );
22
35
  if (options.format) {
23
36
  await formatFiles(tree);
24
37
  }
@@ -26,8 +39,10 @@ async function helmDependencyGeneratorFn(tree, options, config) {
26
39
  success: true
27
40
  };
28
41
  }
29
- __name(helmDependencyGeneratorFn, "helmDependencyGeneratorFn");
30
- var generator_default = withRunGenerator("Helm Dependency", helmDependencyGeneratorFn);
42
+ var generator_default = withRunGenerator(
43
+ "Helm Dependency",
44
+ helmDependencyGeneratorFn
45
+ );
31
46
  function addDependencyToConfig(project, name, url) {
32
47
  return {
33
48
  ...project,
@@ -41,23 +56,14 @@ function addDependencyToConfig(project, name, url) {
41
56
  ...project.targets?.["helm-package"]?.options.dependencies,
42
57
  repositories: project.targets?.["helm-package"]?.options.dependencies.repositories ? [
43
58
  ...project.targets["helm-package"].options.dependencies.repositories,
44
- {
45
- name,
46
- url
47
- }
48
- ] : [
49
- {
50
- name,
51
- url
52
- }
53
- ]
59
+ { name, url }
60
+ ] : [{ name, url }]
54
61
  }
55
62
  }
56
63
  }
57
64
  }
58
65
  };
59
66
  }
60
- __name(addDependencyToConfig, "addDependencyToConfig");
61
67
  function updateChartYaml(tree, project, name, version, repository) {
62
68
  const chartFolder = project.targets?.["helm-package"]?.options.chartFolder;
63
69
  const chartPath = `${chartFolder}/Chart.yaml`;
@@ -73,7 +79,9 @@ function updateChartYaml(tree, project, name, version, repository) {
73
79
  if (!chartContents.dependencies) {
74
80
  chartContents.dependencies = [];
75
81
  }
76
- const existingDependency = chartContents.dependencies.find((dep) => dep.name === name);
82
+ const existingDependency = chartContents.dependencies.find(
83
+ (dep) => dep.name === name
84
+ );
77
85
  if (existingDependency) {
78
86
  existingDependency.version = version;
79
87
  existingDependency.repository = repository;
@@ -90,7 +98,6 @@ function updateChartYaml(tree, project, name, version, repository) {
90
98
  throw new Error("Failed to parse Chart.yaml");
91
99
  }
92
100
  }
93
- __name(updateChartYaml, "updateChartYaml");
94
101
 
95
102
  export {
96
103
  helmDependencyGeneratorFn,
@@ -4,17 +4,17 @@ import {
4
4
  hasProjectTag,
5
5
  isEqualProjectTag,
6
6
  setDefaultProjectTags
7
- } from "./chunk-5JZUTREX.mjs";
7
+ } from "./chunk-ARIMP3W4.mjs";
8
8
  import {
9
9
  findWorkspaceRoot,
10
10
  getConfig
11
- } from "./chunk-F37JQGEZ.mjs";
12
- import {
13
- __name
14
- } from "./chunk-L2DHGVS5.mjs";
11
+ } from "./chunk-MWMS7P7U.mjs";
15
12
 
16
13
  // src/plugins/docker/_dockerfile.ts
17
- import { joinPathFragments, readJsonFile } from "@nx/devkit";
14
+ import {
15
+ joinPathFragments,
16
+ readJsonFile
17
+ } from "@nx/devkit";
18
18
  import { existsSync } from "node:fs";
19
19
  var name = "storm-software/docker";
20
20
  var description = "Plugin for parsing Dockerfile files";
@@ -61,10 +61,14 @@ var createNodes = [
61
61
  if (packageManager) {
62
62
  if (packageManager.type === "Cargo.toml") {
63
63
  tag = packageManager.content.package.version;
64
- labels.push(`org.opencontainers.image.description=${packageManager.content.package.description}`);
64
+ labels.push(
65
+ `org.opencontainers.image.description=${packageManager.content.package.description}`
66
+ );
65
67
  } else if (packageManager.type === "package.json") {
66
68
  tag = packageManager.content.version;
67
- labels.push(`org.opencontainers.image.description=${packageManager.content.description}`);
69
+ labels.push(
70
+ `org.opencontainers.image.description=${packageManager.content.description}`
71
+ );
68
72
  }
69
73
  }
70
74
  project.targets = {
@@ -76,9 +80,7 @@ var createNodes = [
76
80
  engine,
77
81
  labels,
78
82
  push: true,
79
- platforms: [
80
- "linux/amd64"
81
- ],
83
+ platforms: ["linux/amd64"],
82
84
  metadata: {
83
85
  images: [
84
86
  `${config.namespace ? config.namespace : "storm-software"}/${project.name?.replace(`${config.namespace}-`, "")}`,
@@ -117,7 +119,11 @@ var createNodes = [
117
119
  }
118
120
  }
119
121
  };
120
- if ((isEqualProjectTag(project, ProjectTagConstants.ProjectType.TAG_ID, ProjectTagConstants.ProjectType.APPLICATION) || project.projectType === "application") && hasProjectTag(project, ProjectTagConstants.Registry.TAG_ID)) {
122
+ if ((isEqualProjectTag(
123
+ project,
124
+ ProjectTagConstants.ProjectType.TAG_ID,
125
+ ProjectTagConstants.ProjectType.APPLICATION
126
+ ) || project.projectType === "application") && hasProjectTag(project, ProjectTagConstants.Registry.TAG_ID)) {
121
127
  if (project.targets["nx-release-publish"]) {
122
128
  project.targets["nx-release-publish"] = {
123
129
  ...project.targets["nx-release-publish"],
@@ -136,10 +142,7 @@ var createNodes = [
136
142
  "rust",
137
143
  "^production"
138
144
  ],
139
- dependsOn: [
140
- "build",
141
- "^nx-release-publish"
142
- ],
145
+ dependsOn: ["build", "^nx-release-publish"],
143
146
  executor: "@storm-software/k8s-tools:container-publish",
144
147
  options: {
145
148
  packageRoot: project.root
@@ -166,15 +169,17 @@ var createNodes = [
166
169
  };
167
170
  }
168
171
  ];
169
- var createDependencies = /* @__PURE__ */ __name((_, context) => {
172
+ var createDependencies = (_, context) => {
170
173
  return [];
171
- }, "createDependencies");
172
- var titleCase = /* @__PURE__ */ __name((input) => {
174
+ };
175
+ var titleCase = (input) => {
173
176
  if (!input) {
174
177
  return "";
175
178
  }
176
- return input.split(/(?=[A-Z])|[\.\-\s_]/).map((s) => s.trim()).filter((s) => !!s).map((s) => s ? s.toLowerCase().charAt(0).toUpperCase() + s.toLowerCase().slice(1) : s).join(" ");
177
- }, "titleCase");
179
+ return input.split(/(?=[A-Z])|[\.\-\s_]/).map((s) => s.trim()).filter((s) => !!s).map(
180
+ (s) => s ? s.toLowerCase().charAt(0).toUpperCase() + s.toLowerCase().slice(1) : s
181
+ ).join(" ");
182
+ };
178
183
 
179
184
  export {
180
185
  name,