@storm-software/k8s-tools 0.17.1 → 0.19.0

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 (145) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/chunk-2GAU2GHG.js +203 -0
  3. package/dist/chunk-2QNNUD5M.js +86 -0
  4. package/dist/chunk-3GQAWCBQ.js +13 -0
  5. package/dist/chunk-3J7KBHMJ.mjs +0 -0
  6. package/dist/chunk-6V45YKVB.mjs +203 -0
  7. package/dist/chunk-7AV2CVBT.mjs +169 -0
  8. package/dist/chunk-7BCSLKT3.js +98 -0
  9. package/dist/chunk-7IJP4RLN.mjs +63 -0
  10. package/dist/chunk-AFPEYAYK.js +61 -0
  11. package/dist/chunk-DHBG5ASJ.js +1 -0
  12. package/dist/chunk-DZ5UCMNL.mjs +1063 -0
  13. package/dist/chunk-EAQFLLRB.js +23 -0
  14. package/dist/chunk-EISL3C34.js +169 -0
  15. package/dist/chunk-GDXB64KG.js +1063 -0
  16. package/dist/chunk-GOVHOOTS.js +184 -0
  17. package/dist/chunk-IOT45LXV.js +134 -0
  18. package/dist/chunk-LFNGKV6F.js +18 -0
  19. package/dist/chunk-LSBSNYPQ.mjs +86 -0
  20. package/dist/chunk-O7U3AH6A.mjs +58 -0
  21. package/dist/chunk-OA63SGD6.mjs +23 -0
  22. package/dist/chunk-OBT35QXS.mjs +59 -0
  23. package/dist/chunk-OXY6AHKS.js +57 -0
  24. package/dist/chunk-Q6DDBFXE.mjs +147 -0
  25. package/dist/chunk-RVFKH45R.mjs +134 -0
  26. package/dist/chunk-T5WNZJOD.js +63 -0
  27. package/dist/chunk-TUDMFJIT.mjs +98 -0
  28. package/dist/chunk-U76ID4TS.js +1 -0
  29. package/dist/chunk-UDLI3L7V.mjs +18 -0
  30. package/dist/chunk-UWJTAL4W.js +59 -0
  31. package/{src/plugins/docker/index.js → dist/chunk-W7DPLC4K.mjs} +46 -68
  32. package/dist/chunk-WWU25UQ4.mjs +0 -0
  33. package/dist/chunk-XMPMWMWQ.js +147 -0
  34. package/dist/chunk-XO66D74Z.js +1 -0
  35. package/dist/chunk-XUV4U54K.mjs +21 -0
  36. package/dist/chunk-YSCEY447.mjs +0 -0
  37. package/dist/chunk-ZO7MGNKJ.mjs +61 -0
  38. package/dist/executor-DY-z8MOl.d.mts +53 -0
  39. package/dist/executor-Dr6UXfvX.d.ts +53 -0
  40. package/dist/executors.d.mts +6 -0
  41. package/dist/executors.d.ts +6 -0
  42. package/dist/executors.js +19 -0
  43. package/dist/executors.mjs +19 -0
  44. package/dist/generator-B5bCfIUV.d.ts +24 -0
  45. package/dist/generator-BIe65kKR.d.mts +28 -0
  46. package/dist/generator-Cad7bXVB.d.mts +24 -0
  47. package/dist/generator-D7M45zOU.d.ts +28 -0
  48. package/dist/generators.d.mts +6 -0
  49. package/dist/generators.d.ts +6 -0
  50. package/dist/generators.js +15 -0
  51. package/dist/generators.mjs +15 -0
  52. package/dist/index.d.mts +15 -0
  53. package/dist/index.d.ts +15 -0
  54. package/dist/index.js +57 -0
  55. package/dist/index.mjs +57 -0
  56. package/dist/schema.d-Cx_3iG9A.d.mts +150 -0
  57. package/dist/schema.d-Cx_3iG9A.d.ts +150 -0
  58. package/dist/src/executors/container-publish/executor.d.mts +11 -0
  59. package/dist/src/executors/container-publish/executor.d.ts +11 -0
  60. package/dist/src/executors/container-publish/executor.js +13 -0
  61. package/dist/src/executors/container-publish/executor.mjs +13 -0
  62. package/dist/src/executors/helm-package/executor.d.mts +4 -0
  63. package/dist/src/executors/helm-package/executor.d.ts +4 -0
  64. package/dist/src/executors/helm-package/executor.js +15 -0
  65. package/dist/src/executors/helm-package/executor.mjs +15 -0
  66. package/{src → dist/src}/executors/helm-package/schema.d.ts +1 -1
  67. package/dist/src/generators/helm-chart/generator.d.mts +5 -0
  68. package/dist/src/generators/helm-chart/generator.d.ts +5 -0
  69. package/dist/src/generators/helm-chart/generator.js +12 -0
  70. package/dist/src/generators/helm-chart/generator.mjs +12 -0
  71. package/{src → dist/src}/generators/helm-chart/schema.d.ts +4 -1
  72. package/dist/src/generators/helm-dependency/generator.d.mts +5 -0
  73. package/dist/src/generators/helm-dependency/generator.d.ts +5 -0
  74. package/dist/src/generators/helm-dependency/generator.js +12 -0
  75. package/dist/src/generators/helm-dependency/generator.mjs +12 -0
  76. package/{src → dist/src}/generators/helm-dependency/schema.d.ts +4 -1
  77. package/dist/src/plugins/docker/index.d.mts +12 -0
  78. package/dist/src/plugins/docker/index.d.ts +12 -0
  79. package/dist/src/plugins/docker/index.js +15 -0
  80. package/dist/src/plugins/docker/index.mjs +15 -0
  81. package/dist/src/types.d.mts +31 -0
  82. package/{src → dist/src}/types.d.ts +9 -6
  83. package/dist/src/types.js +7 -0
  84. package/dist/src/types.mjs +7 -0
  85. package/dist/src/utils/client.d.mts +35 -0
  86. package/{src → dist/src}/utils/client.d.ts +7 -3
  87. package/dist/src/utils/client.js +11 -0
  88. package/dist/src/utils/client.mjs +11 -0
  89. package/dist/src/utils/ensure-init.d.mts +11 -0
  90. package/{src → dist/src}/utils/ensure-init.d.ts +3 -1
  91. package/dist/src/utils/ensure-init.js +7 -0
  92. package/dist/src/utils/ensure-init.mjs +7 -0
  93. package/dist/src/utils/index.d.mts +6 -0
  94. package/dist/src/utils/index.d.ts +6 -0
  95. package/dist/src/utils/index.js +21 -0
  96. package/dist/src/utils/index.mjs +21 -0
  97. package/dist/src/utils/prettier.d.mts +13 -0
  98. package/dist/src/utils/prettier.d.ts +13 -0
  99. package/dist/src/utils/prettier.js +9 -0
  100. package/dist/src/utils/prettier.mjs +9 -0
  101. package/dist/tsup.config.d.mts +5 -0
  102. package/dist/tsup.config.d.ts +5 -0
  103. package/dist/tsup.config.js +36 -0
  104. package/dist/tsup.config.mjs +36 -0
  105. package/dist/types-BCBFBwnJ.d.mts +20 -0
  106. package/dist/types-BCBFBwnJ.d.ts +20 -0
  107. package/dist/types-CIJRaFHD.d.mts +1185 -0
  108. package/dist/types-CIJRaFHD.d.ts +1185 -0
  109. package/executors.json +4 -4
  110. package/generators.json +4 -4
  111. package/package.json +1 -1
  112. package/index.d.ts +0 -1
  113. package/index.js +0 -3269
  114. package/meta.json +0 -654
  115. package/src/executors/container-publish/executor.d.ts +0 -7
  116. package/src/executors/container-publish/executor.js +0 -199
  117. package/src/executors/helm-package/executor.d.ts +0 -8
  118. package/src/executors/helm-package/executor.js +0 -242
  119. package/src/executors/index.d.ts +0 -2
  120. package/src/generators/helm-chart/files/chart/.helmignore +0 -23
  121. package/src/generators/helm-chart/generator.d.ts +0 -8
  122. package/src/generators/helm-chart/generator.js +0 -79
  123. package/src/generators/helm-dependency/generator.d.ts +0 -8
  124. package/src/generators/helm-dependency/generator.js +0 -2747
  125. package/src/generators/index.d.ts +0 -2
  126. package/src/index.d.ts +0 -3
  127. package/src/plugins/docker/_dockerfile.d.ts +0 -9
  128. package/src/plugins/docker/index.d.ts +0 -1
  129. package/src/plugins/index.d.ts +0 -1
  130. package/src/utils/prettier.d.ts +0 -9
  131. /package/{src → dist/src}/executors/container-publish/schema.d.ts +0 -0
  132. /package/{src → dist/src}/executors/container-publish/schema.json +0 -0
  133. /package/{src → dist/src}/executors/helm-package/schema.json +0 -0
  134. /package/{src → dist/src}/generators/helm-chart/files/chart/Chart.yaml.template +0 -0
  135. /package/{src → dist/src}/generators/helm-chart/files/chart/templates/NOTES.txt +0 -0
  136. /package/{src → dist/src}/generators/helm-chart/files/chart/templates/_helpers.yaml +0 -0
  137. /package/{src → dist/src}/generators/helm-chart/files/chart/templates/deployment.yaml +0 -0
  138. /package/{src → dist/src}/generators/helm-chart/files/chart/templates/hpa.yaml +0 -0
  139. /package/{src → dist/src}/generators/helm-chart/files/chart/templates/ingress.yaml +0 -0
  140. /package/{src → dist/src}/generators/helm-chart/files/chart/templates/service.yaml +0 -0
  141. /package/{src → dist/src}/generators/helm-chart/files/chart/templates/serviceaccount.yaml +0 -0
  142. /package/{src → dist/src}/generators/helm-chart/files/chart/templates/test/test-connection.yaml +0 -0
  143. /package/{src → dist/src}/generators/helm-chart/files/chart/values.yaml +0 -0
  144. /package/{src → dist/src}/generators/helm-chart/schema.json +0 -0
  145. /package/{src → dist/src}/generators/helm-dependency/schema.json +0 -0
@@ -1,39 +1,22 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name2 in all)
7
- __defProp(target, name2, { get: all[name2], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
1
+ import {
2
+ ProjectTagConstants,
3
+ getPackageInfo,
4
+ hasProjectTag,
5
+ isEqualProjectTag,
6
+ setDefaultProjectTags
7
+ } from "./chunk-RVFKH45R.mjs";
8
+ import {
9
+ findWorkspaceRoot,
10
+ loadStormConfig
11
+ } from "./chunk-DZ5UCMNL.mjs";
12
+ import {
13
+ __name
14
+ } from "./chunk-XUV4U54K.mjs";
18
15
 
19
- // packages/k8s-tools/src/plugins/docker/index.ts
20
- var docker_exports = {};
21
- __export(docker_exports, {
22
- createDependencies: () => createDependencies,
23
- createNodes: () => createNodes,
24
- description: () => description,
25
- name: () => name
26
- });
27
- module.exports = __toCommonJS(docker_exports);
28
-
29
- // packages/k8s-tools/src/plugins/docker/_dockerfile.ts
30
- var import_devkit = require("@nx/devkit");
31
- var import_create_storm_config = require("@storm-software/config-tools/create-storm-config");
32
- var import_find_workspace_root = require("@storm-software/config-tools/utilities/find-workspace-root");
33
- var import_package_helpers = require("@storm-software/workspace-tools/utils/package-helpers");
34
- var import_project_tags = require("@storm-software/workspace-tools/utils/project-tags");
35
- var import_node_fs = require("node:fs");
36
- var name = "storm-software/docker/dockerfile";
16
+ // src/plugins/docker/_dockerfile.ts
17
+ import { joinPathFragments, readJsonFile } from "@nx/devkit";
18
+ import { existsSync } from "node:fs";
19
+ var name = "storm-software/docker";
37
20
  var description = "Plugin for parsing Dockerfile files";
38
21
  var createNodes = [
39
22
  "*/**/{Dockerfile,Dockerfile.*}",
@@ -44,16 +27,16 @@ var createNodes = [
44
27
  return {};
45
28
  }
46
29
  const root = dockerFilePath.substring(dockerFilePath.lastIndexOf("/") + 1);
47
- const projectJsonPath = (0, import_devkit.joinPathFragments)(root, "project.json");
48
- if (!(0, import_node_fs.existsSync)(projectJsonPath)) {
30
+ const projectJsonPath = joinPathFragments(root, "project.json");
31
+ if (!existsSync(projectJsonPath)) {
49
32
  return {};
50
33
  }
51
- const projectJson = (0, import_devkit.readJsonFile)(projectJsonPath);
34
+ const projectJson = readJsonFile(projectJsonPath);
52
35
  if (projectJson?.name) {
53
36
  return {};
54
37
  }
55
- const workspaceRoot = (0, import_find_workspace_root.findWorkspaceRoot)();
56
- const config = await (0, import_create_storm_config.loadStormConfig)(workspaceRoot);
38
+ const workspaceRoot = findWorkspaceRoot();
39
+ const config = await loadStormConfig(workspaceRoot);
57
40
  Object.keys(projectJson).forEach((key) => {
58
41
  if (!project[key]) {
59
42
  project[key] = projectJson[key];
@@ -74,18 +57,14 @@ var createNodes = [
74
57
  `org.opencontainers.image.source=${config.repository}`
75
58
  ];
76
59
  let tag = "latest";
77
- const packageManager = (0, import_package_helpers.getPackageInfo)(project);
60
+ const packageManager = getPackageInfo(project);
78
61
  if (packageManager) {
79
62
  if (packageManager.type === "Cargo.toml") {
80
63
  tag = packageManager.content.package.version;
81
- labels.push(
82
- `org.opencontainers.image.description=${packageManager.content.package.description}`
83
- );
64
+ labels.push(`org.opencontainers.image.description=${packageManager.content.package.description}`);
84
65
  } else if (packageManager.type === "package.json") {
85
66
  tag = packageManager.content.version;
86
- labels.push(
87
- `org.opencontainers.image.description=${packageManager.content.description}`
88
- );
67
+ labels.push(`org.opencontainers.image.description=${packageManager.content.description}`);
89
68
  }
90
69
  }
91
70
  project.targets = {
@@ -97,7 +76,9 @@ var createNodes = [
97
76
  engine,
98
77
  labels,
99
78
  push: true,
100
- platforms: ["linux/amd64"],
79
+ platforms: [
80
+ "linux/amd64"
81
+ ],
101
82
  metadata: {
102
83
  images: [
103
84
  `${config.namespace ? config.namespace : "storm-software"}/${project.name?.replace(`${config.namespace}-`, "")}`,
@@ -136,11 +117,7 @@ var createNodes = [
136
117
  }
137
118
  }
138
119
  };
139
- if (((0, import_project_tags.isEqualProjectTag)(
140
- project,
141
- import_project_tags.ProjectTagConstants.ProjectType.TAG_ID,
142
- import_project_tags.ProjectTagConstants.ProjectType.APPLICATION
143
- ) || project.projectType === "application") && (0, import_project_tags.hasProjectTag)(project, import_project_tags.ProjectTagConstants.Registry.TAG_ID)) {
120
+ if ((isEqualProjectTag(project, ProjectTagConstants.ProjectType.TAG_ID, ProjectTagConstants.ProjectType.APPLICATION) || project.projectType === "application") && hasProjectTag(project, ProjectTagConstants.Registry.TAG_ID)) {
144
121
  if (project.targets["nx-release-publish"]) {
145
122
  project.targets["nx-release-publish"] = {
146
123
  ...project.targets["nx-release-publish"],
@@ -159,7 +136,10 @@ var createNodes = [
159
136
  "rust",
160
137
  "^production"
161
138
  ],
162
- dependsOn: ["build", "^nx-release-publish"],
139
+ dependsOn: [
140
+ "build",
141
+ "^nx-release-publish"
142
+ ],
163
143
  executor: "@storm-software/k8s-tools:container-publish",
164
144
  options: {
165
145
  packageRoot: project.root
@@ -167,7 +147,7 @@ var createNodes = [
167
147
  };
168
148
  }
169
149
  }
170
- (0, import_project_tags.setDefaultProjectTags)(project);
150
+ setDefaultProjectTags(project);
171
151
  const projects = {};
172
152
  const externalNodes = {};
173
153
  projects[project.root] = {
@@ -186,21 +166,19 @@ var createNodes = [
186
166
  };
187
167
  }
188
168
  ];
189
- var createDependencies = (_, context) => {
169
+ var createDependencies = /* @__PURE__ */ __name((_, context) => {
190
170
  return [];
191
- };
192
- var titleCase = (input) => {
171
+ }, "createDependencies");
172
+ var titleCase = /* @__PURE__ */ __name((input) => {
193
173
  if (!input) {
194
174
  return "";
195
175
  }
196
- return input.split(/(?=[A-Z])|[\.\-\s_]/).map((s) => s.trim()).filter((s) => !!s).map(
197
- (s) => s ? s.toLowerCase().charAt(0).toUpperCase() + s.toLowerCase().slice(1) : s
198
- ).join(" ");
199
- };
200
- // Annotate the CommonJS export names for ESM import in node:
201
- 0 && (module.exports = {
202
- createDependencies,
203
- createNodes,
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");
178
+
179
+ export {
180
+ name,
204
181
  description,
205
- name
206
- });
182
+ createNodes,
183
+ createDependencies
184
+ };
File without changes
@@ -0,0 +1,147 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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
+
3
+ var _chunkUWJTAL4Wjs = require('./chunk-UWJTAL4W.js');
4
+
5
+
6
+ var _chunkIOT45LXVjs = require('./chunk-IOT45LXV.js');
7
+
8
+
9
+ var _chunkAFPEYAYKjs = require('./chunk-AFPEYAYK.js');
10
+
11
+
12
+
13
+ var _chunkGDXB64KGjs = require('./chunk-GDXB64KG.js');
14
+
15
+
16
+ var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
17
+
18
+ // src/executors/container-publish/executor.ts
19
+ var _devkit = require('@nx/devkit');
20
+ var _https = require('https'); var _https2 = _interopRequireDefault(_https);
21
+ async function* publishExecutor(options, context) {
22
+ const isDryRun = process.env.NX_DRY_RUN === "true" || options.dryRun || false;
23
+ if (!context.projectName) {
24
+ throw new Error("The executor requires a projectName.");
25
+ }
26
+ console.info(`\u{1F680} Running Storm Container Registry Publish executor on the ${context.projectName} crate`);
27
+ const workspaceRoot = _chunkGDXB64KGjs.findWorkspaceRoot.call(void 0, );
28
+ const config = await _chunkGDXB64KGjs.loadStormConfig.call(void 0, workspaceRoot);
29
+ const projectConfig = _optionalChain([context, 'access', _ => _.projectsConfigurations, 'optionalAccess', _2 => _2.projects, 'access', _3 => _3[context.projectName]]);
30
+ if (!projectConfig) {
31
+ throw new Error(`The executor requires a valid projectsConfiguration - No configuration found for project ${context.projectName}`);
32
+ }
33
+ const projectRoot = _nullishCoalesce(_optionalChain([projectConfig, 'optionalAccess', _4 => _4.root]), () => ( workspaceRoot));
34
+ const sourceRoot = _nullishCoalesce(_optionalChain([projectConfig, 'optionalAccess', _5 => _5.sourceRoot]), () => ( workspaceRoot));
35
+ const projectName = _nullishCoalesce(_optionalChain([projectConfig, 'optionalAccess', _6 => _6.name]), () => ( context.projectName));
36
+ config.workspaceRoot = workspaceRoot;
37
+ const tokenized = await _chunkAFPEYAYKjs.applyWorkspaceTokens.call(void 0, options, {
38
+ config,
39
+ workspaceRoot,
40
+ projectRoot,
41
+ sourceRoot,
42
+ projectName,
43
+ ...projectConfig
44
+ }, _chunkUWJTAL4Wjs.applyWorkspaceExecutorTokens);
45
+ tokenized.engine ??= "docker";
46
+ tokenized.registry ??= config.registry.container;
47
+ try {
48
+ if (isDryRun) {
49
+ console.log(`Would publish to ${tokenized.registry}, but [dry-run] was set`);
50
+ } else {
51
+ console.log(`Published to ${tokenized.registry}`);
52
+ const packageManager = _chunkIOT45LXVjs.getPackageInfo.call(void 0, projectConfig);
53
+ if (packageManager) {
54
+ tokenized["build-args"] ??= [
55
+ "ENVIRONMENT=production",
56
+ "DEBUG_IMAGE=false"
57
+ ];
58
+ tokenized["labels"] ??= [];
59
+ let version = "";
60
+ if (process.env.TAG) {
61
+ version = process.env.TAG;
62
+ } else {
63
+ if (packageManager.type === "Cargo.toml") {
64
+ version = packageManager.content.package.version;
65
+ } else if (packageManager.type === "package.json") {
66
+ version = packageManager.content.version;
67
+ }
68
+ }
69
+ tokenized["build-args"].push(`RELEASE=${version}`);
70
+ tokenized["labels"].push(`org.opencontainers.image.version=${version}`);
71
+ const tags = await getRegistryVersion(projectName, config);
72
+ if (tags.length === 0) {
73
+ tokenized["labels"].push(`org.opencontainers.image.created=${(/* @__PURE__ */ new Date()).toISOString()}`);
74
+ } else if (tags.includes(version)) {
75
+ console.warn(`Skipped package "${projectName}" because v${version} already exists in ${tokenized.registry}`);
76
+ return {
77
+ success: true
78
+ };
79
+ }
80
+ } else {
81
+ console.warn(`No package manager found for project "${projectName}" - Skipping container publishing`);
82
+ return {
83
+ success: true
84
+ };
85
+ }
86
+ const { project, target, configuration } = _devkit.parseTargetString.call(void 0, "container", context);
87
+ for await (const output of await _devkit.runExecutor.call(void 0, {
88
+ project,
89
+ target,
90
+ configuration
91
+ }, tokenized, context)) {
92
+ if (!output.success) {
93
+ throw new Error("Could not compile application files");
94
+ }
95
+ yield;
96
+ }
97
+ }
98
+ return {
99
+ success: true
100
+ };
101
+ } catch (error) {
102
+ console.error(`Failed to publish to ${tokenized.registry}`);
103
+ console.error(error);
104
+ console.log("");
105
+ return {
106
+ success: false
107
+ };
108
+ }
109
+ }
110
+ _chunk3GQAWCBQjs.__name.call(void 0, publishExecutor, "publishExecutor");
111
+ var getRegistryVersion = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (name, config) => {
112
+ if (!name) {
113
+ throw new Error("The `getRegistryVersion` function requires a container name.");
114
+ }
115
+ try {
116
+ const tagsApiUrl = `${config.registry.container}/v2/namespaces/${encodeURIComponent(config.namespace ? config.namespace : "storm-software")}/repositories/${encodeURIComponent(name.replace(`${config.namespace}-`, ""))}/tags`;
117
+ console.log(`Checking for existing version at ${tagsApiUrl}`);
118
+ return new Promise((resolve, reject) => _https2.default.get(tagsApiUrl, (res) => {
119
+ if (res.statusCode === 404) {
120
+ console.log(`No existing version found at ${tagsApiUrl}`);
121
+ return resolve([]);
122
+ }
123
+ res.on("data", (data) => {
124
+ if (data) {
125
+ console.log(`Existing versions found at ${tagsApiUrl} - ${data}`);
126
+ const json = JSON.parse(data.toString());
127
+ return resolve(json.results.filter((result) => result.status === "active" && result.name && result.name !== "latest").map((result) => result.name));
128
+ }
129
+ return reject(new Error("No data returned from container registry, expected a 404 if no tags exist"));
130
+ });
131
+ }).on("error", (e) => {
132
+ throw e;
133
+ }));
134
+ } catch (error) {
135
+ console.error(`Failed to get version from ${config.registry.container}`);
136
+ console.error(error);
137
+ console.log("");
138
+ throw new Error(`Could not get version from container registry - ${config.registry.container}`, {
139
+ cause: error
140
+ });
141
+ }
142
+ }, "getRegistryVersion");
143
+
144
+
145
+
146
+
147
+ exports.publishExecutor = publishExecutor; exports.getRegistryVersion = getRegistryVersion;
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,21 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
4
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
5
+ }) : x)(function(x) {
6
+ if (typeof require !== "undefined") return require.apply(this, arguments);
7
+ throw Error('Dynamic require of "' + x + '" is not supported');
8
+ });
9
+
10
+ // ../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.49.1_@types+node@22.10.7__@swc+core@1.7.26_@swc+helpers_ekim6y52mwpq6ssxiprcp44dam/node_modules/tsup/assets/esm_shims.js
11
+ import { fileURLToPath } from "url";
12
+ import path from "path";
13
+ var getFilename = /* @__PURE__ */ __name(() => fileURLToPath(import.meta.url), "getFilename");
14
+ var getDirname = /* @__PURE__ */ __name(() => path.dirname(getFilename()), "getDirname");
15
+ var __dirname = /* @__PURE__ */ getDirname();
16
+
17
+ export {
18
+ __name,
19
+ __require,
20
+ __dirname
21
+ };
File without changes
@@ -0,0 +1,61 @@
1
+ import {
2
+ findWorkspaceRoot
3
+ } from "./chunk-DZ5UCMNL.mjs";
4
+ import {
5
+ __name
6
+ } from "./chunk-XUV4U54K.mjs";
7
+
8
+ // ../config-tools/src/utilities/apply-workspace-tokens.ts
9
+ var applyWorkspaceBaseTokens = /* @__PURE__ */ __name(async (option, tokenizerOptions) => {
10
+ let result = option;
11
+ if (!result) {
12
+ return result;
13
+ }
14
+ if (tokenizerOptions) {
15
+ const optionKeys = Object.keys(tokenizerOptions);
16
+ if (optionKeys.some((optionKey) => result.includes(`{${optionKey}}`))) {
17
+ for (const optionKey of optionKeys) {
18
+ if (result.includes(`{${optionKey}}`)) {
19
+ result = result.replaceAll(`{${optionKey}}`, tokenizerOptions.config?.[optionKey] ?? "");
20
+ }
21
+ }
22
+ }
23
+ }
24
+ if (tokenizerOptions.config) {
25
+ const configKeys = Object.keys(tokenizerOptions.config);
26
+ if (configKeys.some((configKey) => result.includes(`{${configKey}}`))) {
27
+ for (const configKey of configKeys) {
28
+ if (result.includes(`{${configKey}}`)) {
29
+ result = result.replaceAll(`{${configKey}}`, tokenizerOptions.config[configKey]);
30
+ }
31
+ }
32
+ }
33
+ }
34
+ if (result.includes("{workspaceRoot}")) {
35
+ result = result.replaceAll("{workspaceRoot}", tokenizerOptions.workspaceRoot ?? tokenizerOptions.config?.workspaceRoot ?? findWorkspaceRoot());
36
+ }
37
+ return result;
38
+ }, "applyWorkspaceBaseTokens");
39
+ var applyWorkspaceTokens = /* @__PURE__ */ __name(async (options, config, tokenizerFn) => {
40
+ if (!options) {
41
+ return {};
42
+ }
43
+ const result = {};
44
+ for (const option of Object.keys(options)) {
45
+ if (typeof options[option] === "string") {
46
+ result[option] = await Promise.resolve(tokenizerFn(options[option], config));
47
+ } else if (Array.isArray(options[option])) {
48
+ result[option] = await Promise.all(options[option].map(async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, config)) : item));
49
+ } else if (typeof options[option] === "object") {
50
+ result[option] = await applyWorkspaceTokens(options[option], config, tokenizerFn);
51
+ } else {
52
+ result[option] = options[option];
53
+ }
54
+ }
55
+ return result;
56
+ }, "applyWorkspaceTokens");
57
+
58
+ export {
59
+ applyWorkspaceBaseTokens,
60
+ applyWorkspaceTokens
61
+ };
@@ -0,0 +1,53 @@
1
+ import { ExecutorContext, PromiseExecutor } from '@nx/devkit';
2
+ import { S as StormConfig } from './types-CIJRaFHD.mjs';
3
+
4
+ // Generated by @storm-software/untyped
5
+ // Do not edit this file directly
6
+
7
+ interface BaseExecutorSchema {
8
+ /**
9
+ * Output Path
10
+ *
11
+ * The output path for the build
12
+ *
13
+ * @default "dist/{projectRoot}"
14
+ *
15
+ * @format path
16
+ */
17
+ outputPath?: string,
18
+ }
19
+
20
+ interface HelmPackageExecutorSchema extends BaseExecutorSchema {
21
+ /** Folder where the chart is stored */
22
+ chartFolder: string;
23
+ /** Folder to store the packaged chart */
24
+ outputFolder: string;
25
+ /** Push the chart to a remote registry */
26
+ push?: boolean;
27
+ /** Remote registry to publish the chart */
28
+ remote?: string;
29
+ /** Options related to dependencies */
30
+ dependencies?: {
31
+ /** Runs `helm dependency update` before packaging */
32
+ update?: boolean;
33
+ /** Runs `helm dependency build` before packaging */
34
+ build?: boolean;
35
+ /** List of repositories to add with `helm repo add` before packaging */
36
+ repositories?: {
37
+ /** Name of the repository */
38
+ name?: string;
39
+ /** URL of the repository */
40
+ url?: string;
41
+ [k: string]: unknown;
42
+ }[];
43
+ [k: string]: unknown;
44
+ };
45
+ [k: string]: unknown;
46
+ }
47
+
48
+ declare function serveExecutor(options: HelmPackageExecutorSchema, context: ExecutorContext, config?: StormConfig): Promise<{
49
+ success: boolean;
50
+ }>;
51
+ declare const _default: PromiseExecutor<HelmPackageExecutorSchema>;
52
+
53
+ export { type HelmPackageExecutorSchema as H, _default as _, serveExecutor as s };
@@ -0,0 +1,53 @@
1
+ import { ExecutorContext, PromiseExecutor } from '@nx/devkit';
2
+ import { S as StormConfig } from './types-CIJRaFHD.js';
3
+
4
+ // Generated by @storm-software/untyped
5
+ // Do not edit this file directly
6
+
7
+ interface BaseExecutorSchema {
8
+ /**
9
+ * Output Path
10
+ *
11
+ * The output path for the build
12
+ *
13
+ * @default "dist/{projectRoot}"
14
+ *
15
+ * @format path
16
+ */
17
+ outputPath?: string,
18
+ }
19
+
20
+ interface HelmPackageExecutorSchema extends BaseExecutorSchema {
21
+ /** Folder where the chart is stored */
22
+ chartFolder: string;
23
+ /** Folder to store the packaged chart */
24
+ outputFolder: string;
25
+ /** Push the chart to a remote registry */
26
+ push?: boolean;
27
+ /** Remote registry to publish the chart */
28
+ remote?: string;
29
+ /** Options related to dependencies */
30
+ dependencies?: {
31
+ /** Runs `helm dependency update` before packaging */
32
+ update?: boolean;
33
+ /** Runs `helm dependency build` before packaging */
34
+ build?: boolean;
35
+ /** List of repositories to add with `helm repo add` before packaging */
36
+ repositories?: {
37
+ /** Name of the repository */
38
+ name?: string;
39
+ /** URL of the repository */
40
+ url?: string;
41
+ [k: string]: unknown;
42
+ }[];
43
+ [k: string]: unknown;
44
+ };
45
+ [k: string]: unknown;
46
+ }
47
+
48
+ declare function serveExecutor(options: HelmPackageExecutorSchema, context: ExecutorContext, config?: StormConfig): Promise<{
49
+ success: boolean;
50
+ }>;
51
+ declare const _default: PromiseExecutor<HelmPackageExecutorSchema>;
52
+
53
+ export { type HelmPackageExecutorSchema as H, _default as _, serveExecutor as s };
@@ -0,0 +1,6 @@
1
+ export { getRegistryVersion } from './src/executors/container-publish/executor.mjs';
2
+ export { C as ContainerPublishExecutorSchema } from './schema.d-Cx_3iG9A.mjs';
3
+ export { H as HelmPackageExecutorSchema, s as serveExecutor } from './executor-DY-z8MOl.mjs';
4
+ import '@nx/devkit';
5
+ import './types-CIJRaFHD.mjs';
6
+ import 'zod';
@@ -0,0 +1,6 @@
1
+ export { getRegistryVersion } from './src/executors/container-publish/executor.js';
2
+ export { C as ContainerPublishExecutorSchema } from './schema.d-Cx_3iG9A.js';
3
+ export { H as HelmPackageExecutorSchema, s as serveExecutor } from './executor-Dr6UXfvX.js';
4
+ import '@nx/devkit';
5
+ import './types-CIJRaFHD.js';
6
+ import 'zod';
@@ -0,0 +1,19 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-XO66D74Z.js');
2
+
3
+
4
+ var _chunkXMPMWMWQjs = require('./chunk-XMPMWMWQ.js');
5
+
6
+
7
+ var _chunkEISL3C34js = require('./chunk-EISL3C34.js');
8
+ require('./chunk-UWJTAL4W.js');
9
+ require('./chunk-IOT45LXV.js');
10
+ require('./chunk-AFPEYAYK.js');
11
+ require('./chunk-GDXB64KG.js');
12
+ require('./chunk-2GAU2GHG.js');
13
+ require('./chunk-LFNGKV6F.js');
14
+ require('./chunk-EAQFLLRB.js');
15
+ require('./chunk-3GQAWCBQ.js');
16
+
17
+
18
+
19
+ exports.getRegistryVersion = _chunkXMPMWMWQjs.getRegistryVersion; exports.serveExecutor = _chunkEISL3C34js.serveExecutor;
@@ -0,0 +1,19 @@
1
+ import "./chunk-YSCEY447.mjs";
2
+ import {
3
+ getRegistryVersion
4
+ } from "./chunk-Q6DDBFXE.mjs";
5
+ import {
6
+ serveExecutor
7
+ } from "./chunk-7AV2CVBT.mjs";
8
+ import "./chunk-OBT35QXS.mjs";
9
+ import "./chunk-RVFKH45R.mjs";
10
+ import "./chunk-ZO7MGNKJ.mjs";
11
+ import "./chunk-DZ5UCMNL.mjs";
12
+ import "./chunk-6V45YKVB.mjs";
13
+ import "./chunk-UDLI3L7V.mjs";
14
+ import "./chunk-OA63SGD6.mjs";
15
+ import "./chunk-XUV4U54K.mjs";
16
+ export {
17
+ getRegistryVersion,
18
+ serveExecutor
19
+ };
@@ -0,0 +1,24 @@
1
+ import { B as BaseGeneratorSchema, a as BaseGeneratorResult } from './types-BCBFBwnJ.js';
2
+ import * as _nx_devkit from '@nx/devkit';
3
+ import { Tree } from '@nx/devkit';
4
+ import { S as StormConfig } from './types-CIJRaFHD.js';
5
+
6
+ interface HelmChartGeneratorSchema extends BaseGeneratorSchema {
7
+ /** Name of the chart */
8
+ name: string;
9
+ /** Name of the project to add the chart to */
10
+ project: string;
11
+ /** Folder to store the chart */
12
+ chartFolder?: string;
13
+ /** Format the generated chart */
14
+ format?: boolean;
15
+
16
+ [k: string]: unknown;
17
+ }
18
+
19
+ declare function helmChartGeneratorFn(tree: Tree, options: HelmChartGeneratorSchema, config?: StormConfig): Promise<{
20
+ success: boolean;
21
+ }>;
22
+ declare const _default: (tree: Tree, _options: HelmChartGeneratorSchema) => Promise<_nx_devkit.GeneratorCallback | BaseGeneratorResult>;
23
+
24
+ export { type HelmChartGeneratorSchema as H, _default as _, helmChartGeneratorFn as h };
@@ -0,0 +1,28 @@
1
+ import { B as BaseGeneratorSchema, a as BaseGeneratorResult } from './types-BCBFBwnJ.mjs';
2
+ import * as _nx_devkit from '@nx/devkit';
3
+ import { Tree } from '@nx/devkit';
4
+ import { S as StormConfig } from './types-CIJRaFHD.mjs';
5
+
6
+ interface HelmDependencyGeneratorSchema extends BaseGeneratorSchema {
7
+ /** Project name */
8
+ project: string;
9
+ /** Chart Name of the Dependency */
10
+ chartName?: string;
11
+ /** Chart Version of the Dependency */
12
+ chartVersion?: string;
13
+ /** Repository of the Dependency */
14
+ repository: string;
15
+ /** Repository Name of the Dependency */
16
+ repositoryName: string;
17
+ /** Format the generated files */
18
+ format?: boolean;
19
+
20
+ [k: string]: unknown;
21
+ }
22
+
23
+ declare function helmDependencyGeneratorFn(tree: Tree, options: HelmDependencyGeneratorSchema, config?: StormConfig): Promise<{
24
+ success: boolean;
25
+ }>;
26
+ declare const _default: (tree: Tree, _options: HelmDependencyGeneratorSchema) => Promise<_nx_devkit.GeneratorCallback | BaseGeneratorResult>;
27
+
28
+ export { type HelmDependencyGeneratorSchema as H, _default as _, helmDependencyGeneratorFn as h };
@@ -0,0 +1,24 @@
1
+ import { B as BaseGeneratorSchema, a as BaseGeneratorResult } from './types-BCBFBwnJ.mjs';
2
+ import * as _nx_devkit from '@nx/devkit';
3
+ import { Tree } from '@nx/devkit';
4
+ import { S as StormConfig } from './types-CIJRaFHD.mjs';
5
+
6
+ interface HelmChartGeneratorSchema extends BaseGeneratorSchema {
7
+ /** Name of the chart */
8
+ name: string;
9
+ /** Name of the project to add the chart to */
10
+ project: string;
11
+ /** Folder to store the chart */
12
+ chartFolder?: string;
13
+ /** Format the generated chart */
14
+ format?: boolean;
15
+
16
+ [k: string]: unknown;
17
+ }
18
+
19
+ declare function helmChartGeneratorFn(tree: Tree, options: HelmChartGeneratorSchema, config?: StormConfig): Promise<{
20
+ success: boolean;
21
+ }>;
22
+ declare const _default: (tree: Tree, _options: HelmChartGeneratorSchema) => Promise<_nx_devkit.GeneratorCallback | BaseGeneratorResult>;
23
+
24
+ export { type HelmChartGeneratorSchema as H, _default as _, helmChartGeneratorFn as h };