@storm-software/k8s-tools 0.0.1 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/generators.json +2 -0
- package/index.js +75 -163
- package/meta.json +1 -1
- package/package.json +6 -6
- package/src/generators/helm-chart/generator.d.ts +8 -0
- package/src/generators/helm-chart/generator.js +44 -86
- package/src/generators/helm-dependency/generator.d.ts +8 -0
- package/src/generators/helm-dependency/generator.js +33 -81
- package/{packages/k8s-tools/src → src}/types.d.ts +1 -1
- package/packages/build-tools/src/build/index.d.ts +0 -3
- package/packages/build-tools/src/build/rolldown.d.ts +0 -20
- package/packages/build-tools/src/build/ts-build.d.ts +0 -20
- package/packages/build-tools/src/build/unbuild.d.ts +0 -20
- package/packages/build-tools/src/cli/index.d.ts +0 -2
- package/packages/build-tools/src/config/browser-config.d.ts +0 -2
- package/packages/build-tools/src/config/default-config.d.ts +0 -2
- package/packages/build-tools/src/config/get-config.d.ts +0 -2
- package/packages/build-tools/src/config/get-rolldown-config.d.ts +0 -6
- package/packages/build-tools/src/config/get-unbuild-config.d.ts +0 -6
- package/packages/build-tools/src/config/index.d.ts +0 -7
- package/packages/build-tools/src/config/neutral-config.d.ts +0 -2
- package/packages/build-tools/src/config/node-config.d.ts +0 -3
- package/packages/build-tools/src/index.d.ts +0 -6
- package/packages/build-tools/src/plugins/analyze-plugin.d.ts +0 -4
- package/packages/build-tools/src/plugins/index.d.ts +0 -4
- package/packages/build-tools/src/plugins/swc-plugin.d.ts +0 -2
- package/packages/build-tools/src/plugins/ts-resolve.d.ts +0 -6
- package/packages/build-tools/src/plugins/type-definitions.d.ts +0 -7
- package/packages/build-tools/src/types.d.ts +0 -213
- package/packages/build-tools/src/utils/apply-default-options.d.ts +0 -6
- package/packages/build-tools/src/utils/generate-package-json.d.ts +0 -7
- package/packages/build-tools/src/utils/get-entry-points.d.ts +0 -3
- package/packages/build-tools/src/utils/get-file-banner.d.ts +0 -8
- package/packages/build-tools/src/utils/get-project-deps.d.ts +0 -5
- package/packages/build-tools/src/utils/index.d.ts +0 -7
- package/packages/build-tools/src/utils/out-extension.d.ts +0 -8
- package/packages/build-tools/src/utils/run-tsup-build.d.ts +0 -3
- package/packages/build-tools/src/utils/task-graph.d.ts +0 -6
- package/packages/config/src/constants.d.ts +0 -3
- package/packages/config/src/define-config.d.ts +0 -174
- package/packages/config/src/index.d.ts +0 -12
- package/packages/config/src/schema.d.ts +0 -1915
- package/packages/config/src/types.d.ts +0 -23
- package/packages/config-tools/src/config-file/get-config-file.d.ts +0 -16
- package/packages/config-tools/src/config-file/index.d.ts +0 -1
- package/packages/config-tools/src/create-storm-config.d.ts +0 -26
- package/packages/config-tools/src/env/get-env.d.ts +0 -15
- package/packages/config-tools/src/env/index.d.ts +0 -2
- package/packages/config-tools/src/env/set-env.d.ts +0 -14
- package/packages/config-tools/src/index.d.ts +0 -13
- package/packages/config-tools/src/types.d.ts +0 -33
- package/packages/config-tools/src/utilities/apply-workspace-tokens.d.ts +0 -4
- package/packages/config-tools/src/utilities/chalk.d.ts +0 -23
- package/packages/config-tools/src/utilities/correct-paths.d.ts +0 -1
- package/packages/config-tools/src/utilities/file-path-utils.d.ts +0 -2
- package/packages/config-tools/src/utilities/find-up.d.ts +0 -4
- package/packages/config-tools/src/utilities/find-workspace-root.d.ts +0 -14
- package/packages/config-tools/src/utilities/get-default-config.d.ts +0 -15
- package/packages/config-tools/src/utilities/get-log-level.d.ts +0 -15
- package/packages/config-tools/src/utilities/index.d.ts +0 -10
- package/packages/config-tools/src/utilities/logger.d.ts +0 -74
- package/packages/config-tools/src/utilities/process-handler.d.ts +0 -4
- package/packages/config-tools/src/utilities/run.d.ts +0 -18
- package/packages/k8s-tools/src/generators/helm-chart/generator.d.ts +0 -5
- package/packages/k8s-tools/src/generators/helm-dependency/generator.d.ts +0 -5
- package/packages/workspace-tools/index.d.ts +0 -32
- package/packages/workspace-tools/src/base/base-executor.d.ts +0 -7
- package/packages/workspace-tools/src/base/base-generator.d.ts +0 -4
- package/packages/workspace-tools/src/base/index.d.ts +0 -3
- package/packages/workspace-tools/src/base/typescript-library-generator.d.ts +0 -8
- package/packages/workspace-tools/src/executors/cargo-publish/executor.d.ts +0 -6
- package/packages/workspace-tools/src/executors/clean-package/constants.d.ts +0 -4
- package/packages/workspace-tools/src/executors/clean-package/executor.d.ts +0 -8
- package/packages/workspace-tools/src/executors/clean-package/types.d.ts +0 -8
- package/packages/workspace-tools/src/executors/clean-package/utils.d.ts +0 -4
- package/packages/workspace-tools/src/executors/npm-publish/executor.d.ts +0 -6
- package/packages/workspace-tools/src/executors/rolldown/executor.d.ts +0 -9
- package/packages/workspace-tools/src/executors/size-limit/executor.d.ts +0 -8
- package/packages/workspace-tools/src/executors/tsup/executor.d.ts +0 -8
- package/packages/workspace-tools/src/executors/tsup-browser/executor.d.ts +0 -8
- package/packages/workspace-tools/src/executors/tsup-neutral/executor.d.ts +0 -8
- package/packages/workspace-tools/src/executors/tsup-node/executor.d.ts +0 -8
- package/packages/workspace-tools/src/executors/typia/executor.d.ts +0 -8
- package/packages/workspace-tools/src/executors/unbuild/executor.d.ts +0 -9
- package/packages/workspace-tools/src/generators/config-schema/generator.d.ts +0 -13
- package/packages/workspace-tools/src/generators/init/init.d.ts +0 -4
- package/packages/workspace-tools/src/generators/node-library/generator.d.ts +0 -5
- package/packages/workspace-tools/src/generators/preset/generator.d.ts +0 -5
- package/packages/workspace-tools/src/generators/release-version/generator.d.ts +0 -13
- package/packages/workspace-tools/src/utils/apply-workspace-tokens.d.ts +0 -8
- package/packages/workspace-tools/src/utils/cargo.d.ts +0 -26
- package/packages/workspace-tools/src/utils/create-cli-options.d.ts +0 -1
- package/packages/workspace-tools/src/utils/get-project-configurations.d.ts +0 -13
- package/packages/workspace-tools/src/utils/index.d.ts +0 -9
- package/packages/workspace-tools/src/utils/lock-file.d.ts +0 -23
- package/packages/workspace-tools/src/utils/project-tags.d.ts +0 -30
- package/packages/workspace-tools/src/utils/toml.d.ts +0 -167
- package/packages/workspace-tools/src/utils/typia-transform.d.ts +0 -2
- package/packages/workspace-tools/src/utils/versions.d.ts +0 -18
- /package/{packages/k8s-tools/index.d.ts → index.d.ts} +0 -0
- /package/{packages/k8s-tools/src → src}/executors/helm-package/executor.d.ts +0 -0
- /package/{packages/k8s-tools/src → src}/executors/index.d.ts +0 -0
- /package/{packages/k8s-tools/src → src}/generators/index.d.ts +0 -0
- /package/{packages/k8s-tools/src → src}/index.d.ts +0 -0
- /package/{packages/k8s-tools/src → src}/utils/client.d.ts +0 -0
- /package/{packages/k8s-tools/src → src}/utils/ensure-init.d.ts +0 -0
- /package/{packages/k8s-tools/src → src}/utils/prettier.d.ts +0 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
## 0.1.1 (2024-08-27)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
- **k8s-tools:** Resolved issue invoking generator functions
|
|
6
|
+
([405367cb](https://github.com/storm-software/storm-ops/commit/405367cb))
|
|
7
|
+
|
|
8
|
+
## 0.1.0 (2024-08-23)
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
- **k8s-tools:** Initial code check-in of k8s tools
|
|
13
|
+
([cac95faa](https://github.com/storm-software/storm-ops/commit/cac95faa))
|
package/generators.json
CHANGED
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
"helm-chart": {
|
|
4
4
|
"factory": "./src/generators/helm-chart/generator",
|
|
5
5
|
"schema": "./src/generators/helm-chart/schema.json",
|
|
6
|
+
"aliases": ["add-chart", "chart"],
|
|
6
7
|
"description": "Generate a new Helm chart"
|
|
7
8
|
},
|
|
8
9
|
"helm-dependency": {
|
|
9
10
|
"factory": "./src/generators/helm-dependency/generator",
|
|
10
11
|
"schema": "./src/generators/helm-dependency/schema.json",
|
|
12
|
+
"aliases": ["add-dependency", "dependency"],
|
|
11
13
|
"description": "Generate a new dependency for an existing Helm chart"
|
|
12
14
|
}
|
|
13
15
|
}
|
package/index.js
CHANGED
|
@@ -1052,10 +1052,8 @@ var require_exec = __commonJS({
|
|
|
1052
1052
|
// packages/k8s-tools/index.ts
|
|
1053
1053
|
var k8s_tools_exports = {};
|
|
1054
1054
|
__export(k8s_tools_exports, {
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
helmDependencyGenerator: () => helmDependencyGenerator,
|
|
1058
|
-
helmDependencySchematic: () => helmDependencySchematic,
|
|
1055
|
+
helmChartGeneratorFn: () => helmChartGeneratorFn,
|
|
1056
|
+
helmDependencyGeneratorFn: () => helmDependencyGeneratorFn,
|
|
1059
1057
|
serveExecutor: () => serveExecutor
|
|
1060
1058
|
});
|
|
1061
1059
|
module.exports = __toCommonJS(k8s_tools_exports);
|
|
@@ -1246,97 +1244,59 @@ var executor_default = (0, import_workspace_tools.withRunExecutor)(
|
|
|
1246
1244
|
|
|
1247
1245
|
// packages/k8s-tools/src/generators/helm-chart/generator.ts
|
|
1248
1246
|
var import_devkit = require("@nx/devkit");
|
|
1247
|
+
var import_workspace_tools2 = require("@storm-software/workspace-tools");
|
|
1249
1248
|
var import_path = require("path");
|
|
1250
|
-
async function
|
|
1251
|
-
const {
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
writeTrace,
|
|
1258
|
-
findWorkspaceRoot,
|
|
1259
|
-
loadStormConfig
|
|
1260
|
-
} = await import("@storm-software/config-tools");
|
|
1261
|
-
const stopwatch = getStopwatch("Storm Helm Chart generator");
|
|
1262
|
-
let config;
|
|
1263
|
-
try {
|
|
1264
|
-
writeInfo(`\u26A1 Running the Storm Helm Chart generator...
|
|
1265
|
-
|
|
1266
|
-
`, config);
|
|
1267
|
-
const workspaceRoot = findWorkspaceRoot();
|
|
1268
|
-
writeDebug(
|
|
1269
|
-
`Loading the Storm Config from environment variables and storm.json file...
|
|
1270
|
-
- workspaceRoot: ${workspaceRoot}`,
|
|
1271
|
-
config
|
|
1272
|
-
);
|
|
1273
|
-
config = await loadStormConfig(workspaceRoot);
|
|
1274
|
-
writeTrace(
|
|
1275
|
-
`Loaded Storm config into env:
|
|
1276
|
-
${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[key])}`).join("\n")}`,
|
|
1277
|
-
config
|
|
1249
|
+
async function helmChartGeneratorFn(tree, options, config) {
|
|
1250
|
+
const { writeTrace } = await import("@storm-software/config-tools");
|
|
1251
|
+
writeTrace("\u{1F4DD} Preparing to write Helm Chart", config);
|
|
1252
|
+
const project = (0, import_devkit.readProjectConfiguration)(tree, options.project);
|
|
1253
|
+
if (project.targets?.["helm-package"]) {
|
|
1254
|
+
throw new Error(
|
|
1255
|
+
`Project ${options.project} already has a helm target. Please remove it before running this command.`
|
|
1278
1256
|
);
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
"helm-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
outputFolder: "{workspaceRoot}/dist/charts/{projectRoot}",
|
|
1297
|
-
push: false,
|
|
1298
|
-
remote: "oci://localhost:5000/helm-charts",
|
|
1299
|
-
dependencies: {
|
|
1300
|
-
update: true,
|
|
1301
|
-
build: true,
|
|
1302
|
-
repositories: []
|
|
1303
|
-
}
|
|
1304
|
-
}
|
|
1257
|
+
}
|
|
1258
|
+
(0, import_devkit.updateProjectConfiguration)(tree, options.project, {
|
|
1259
|
+
...project,
|
|
1260
|
+
targets: {
|
|
1261
|
+
...project.targets,
|
|
1262
|
+
"helm-package": {
|
|
1263
|
+
executor: "@storm-software/k8s-tools:helm-package",
|
|
1264
|
+
outputs: ["{options.outputFolder}"],
|
|
1265
|
+
options: {
|
|
1266
|
+
chartFolder: `${project.root}/${options.chartFolder}`,
|
|
1267
|
+
outputFolder: "{workspaceRoot}/dist/charts/{projectRoot}",
|
|
1268
|
+
push: false,
|
|
1269
|
+
remote: "oci://localhost:5000/helm-charts",
|
|
1270
|
+
dependencies: {
|
|
1271
|
+
update: true,
|
|
1272
|
+
build: true,
|
|
1273
|
+
repositories: []
|
|
1305
1274
|
}
|
|
1306
1275
|
}
|
|
1307
|
-
});
|
|
1308
|
-
(0, import_devkit.generateFiles)(
|
|
1309
|
-
tree,
|
|
1310
|
-
(0, import_path.join)(__dirname, "files", "chart"),
|
|
1311
|
-
(0, import_path.join)(project.root, options.chartFolder ?? ""),
|
|
1312
|
-
options
|
|
1313
|
-
);
|
|
1314
|
-
if (options.format) {
|
|
1315
|
-
await (0, import_devkit.formatFiles)(tree);
|
|
1316
1276
|
}
|
|
1317
|
-
}
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
- Details: ${error.message}
|
|
1328
|
-
- Stacktrace: ${error.stack}`,
|
|
1329
|
-
config
|
|
1330
|
-
);
|
|
1331
|
-
};
|
|
1332
|
-
} finally {
|
|
1333
|
-
stopwatch();
|
|
1277
|
+
}
|
|
1278
|
+
});
|
|
1279
|
+
(0, import_devkit.generateFiles)(
|
|
1280
|
+
tree,
|
|
1281
|
+
(0, import_path.join)(__dirname, "files", "chart"),
|
|
1282
|
+
(0, import_path.join)(project.root, options.chartFolder ?? ""),
|
|
1283
|
+
options
|
|
1284
|
+
);
|
|
1285
|
+
if (options.format) {
|
|
1286
|
+
await (0, import_devkit.formatFiles)(tree);
|
|
1334
1287
|
}
|
|
1288
|
+
return {
|
|
1289
|
+
success: true
|
|
1290
|
+
};
|
|
1335
1291
|
}
|
|
1336
|
-
var
|
|
1292
|
+
var generator_default = (0, import_workspace_tools2.withRunGenerator)(
|
|
1293
|
+
"Helm Chart",
|
|
1294
|
+
helmChartGeneratorFn
|
|
1295
|
+
);
|
|
1337
1296
|
|
|
1338
1297
|
// packages/k8s-tools/src/generators/helm-dependency/generator.ts
|
|
1339
1298
|
var import_devkit2 = require("@nx/devkit");
|
|
1299
|
+
var import_workspace_tools3 = require("@storm-software/workspace-tools");
|
|
1340
1300
|
|
|
1341
1301
|
// node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/dist/js-yaml.mjs
|
|
1342
1302
|
function isNothing(subject) {
|
|
@@ -3961,83 +3921,37 @@ var jsYaml = {
|
|
|
3961
3921
|
var js_yaml_default = jsYaml;
|
|
3962
3922
|
|
|
3963
3923
|
// packages/k8s-tools/src/generators/helm-dependency/generator.ts
|
|
3964
|
-
async function
|
|
3965
|
-
const {
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
writeTrace,
|
|
3972
|
-
findWorkspaceRoot,
|
|
3973
|
-
loadStormConfig
|
|
3974
|
-
} = await import("@storm-software/config-tools");
|
|
3975
|
-
const stopwatch = getStopwatch("Storm Worker generator");
|
|
3976
|
-
let config;
|
|
3977
|
-
try {
|
|
3978
|
-
writeInfo(`\u26A1 Running the Storm Worker generator...
|
|
3979
|
-
|
|
3980
|
-
`, config);
|
|
3981
|
-
const workspaceRoot = findWorkspaceRoot();
|
|
3982
|
-
writeDebug(
|
|
3983
|
-
`Loading the Storm Config from environment variables and storm.json file...
|
|
3984
|
-
- workspaceRoot: ${workspaceRoot}`,
|
|
3985
|
-
config
|
|
3924
|
+
async function helmDependencyGeneratorFn(tree, options, config) {
|
|
3925
|
+
const { writeTrace } = await import("@storm-software/config-tools");
|
|
3926
|
+
writeTrace("\u{1F4DD} Preparing to add Helm Dependency", config);
|
|
3927
|
+
const project = (0, import_devkit2.readProjectConfiguration)(tree, options.project);
|
|
3928
|
+
if (!project.targets?.["helm-package"]) {
|
|
3929
|
+
throw new Error(
|
|
3930
|
+
`Project ${options.project} does not have a helm target. Please run the chart generator first.`
|
|
3986
3931
|
);
|
|
3987
|
-
config = await loadStormConfig(workspaceRoot);
|
|
3988
|
-
writeTrace(
|
|
3989
|
-
`Loaded Storm config into env:
|
|
3990
|
-
${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[key])}`).join("\n")}`,
|
|
3991
|
-
config
|
|
3992
|
-
);
|
|
3993
|
-
const tasks = [];
|
|
3994
|
-
tasks.push(async () => {
|
|
3995
|
-
const project = (0, import_devkit2.readProjectConfiguration)(tree, options.project);
|
|
3996
|
-
if (!project.targets?.["helm-package"]) {
|
|
3997
|
-
throw new Error(
|
|
3998
|
-
`Project ${options.project} does not have a helm target. Please run the chart generator first.`
|
|
3999
|
-
);
|
|
4000
|
-
}
|
|
4001
|
-
(0, import_devkit2.updateProjectConfiguration)(
|
|
4002
|
-
tree,
|
|
4003
|
-
options.project,
|
|
4004
|
-
addDependencyToConfig(
|
|
4005
|
-
project,
|
|
4006
|
-
options.repositoryName,
|
|
4007
|
-
options.repository
|
|
4008
|
-
)
|
|
4009
|
-
);
|
|
4010
|
-
updateChartYaml(
|
|
4011
|
-
tree,
|
|
4012
|
-
project,
|
|
4013
|
-
options.chartName,
|
|
4014
|
-
options.chartVersion,
|
|
4015
|
-
options.repository
|
|
4016
|
-
);
|
|
4017
|
-
if (options.format) {
|
|
4018
|
-
await (0, import_devkit2.formatFiles)(tree);
|
|
4019
|
-
}
|
|
4020
|
-
});
|
|
4021
|
-
return (0, import_devkit2.runTasksInSerial)(...tasks);
|
|
4022
|
-
} catch (error) {
|
|
4023
|
-
return () => {
|
|
4024
|
-
writeFatal(
|
|
4025
|
-
"A fatal error occurred while running the generator - the process was forced to terminate",
|
|
4026
|
-
config
|
|
4027
|
-
);
|
|
4028
|
-
writeError(
|
|
4029
|
-
`An exception was thrown in the generator's process
|
|
4030
|
-
- Details: ${error.message}
|
|
4031
|
-
- Stacktrace: ${error.stack}`,
|
|
4032
|
-
config
|
|
4033
|
-
);
|
|
4034
|
-
};
|
|
4035
|
-
} finally {
|
|
4036
|
-
stopwatch();
|
|
4037
3932
|
}
|
|
3933
|
+
(0, import_devkit2.updateProjectConfiguration)(
|
|
3934
|
+
tree,
|
|
3935
|
+
options.project,
|
|
3936
|
+
addDependencyToConfig(project, options.repositoryName, options.repository)
|
|
3937
|
+
);
|
|
3938
|
+
updateChartYaml(
|
|
3939
|
+
tree,
|
|
3940
|
+
project,
|
|
3941
|
+
options.chartName,
|
|
3942
|
+
options.chartVersion,
|
|
3943
|
+
options.repository
|
|
3944
|
+
);
|
|
3945
|
+
if (options.format) {
|
|
3946
|
+
await (0, import_devkit2.formatFiles)(tree);
|
|
3947
|
+
}
|
|
3948
|
+
return {
|
|
3949
|
+
success: true
|
|
3950
|
+
};
|
|
4038
3951
|
}
|
|
4039
|
-
var
|
|
4040
|
-
|
|
3952
|
+
var generator_default2 = (0, import_workspace_tools3.withRunGenerator)(
|
|
3953
|
+
"Helm Dependency",
|
|
3954
|
+
helmDependencyGeneratorFn
|
|
4041
3955
|
);
|
|
4042
3956
|
function addDependencyToConfig(project, name, url) {
|
|
4043
3957
|
return {
|
|
@@ -4096,10 +4010,8 @@ function updateChartYaml(tree, project, name, version, repository) {
|
|
|
4096
4010
|
}
|
|
4097
4011
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4098
4012
|
0 && (module.exports = {
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
helmDependencyGenerator,
|
|
4102
|
-
helmDependencySchematic,
|
|
4013
|
+
helmChartGeneratorFn,
|
|
4014
|
+
helmDependencyGeneratorFn,
|
|
4103
4015
|
serveExecutor
|
|
4104
4016
|
});
|
|
4105
4017
|
/*! Bundled license information:
|
package/meta.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io-util.js":{"bytes":7922,"imports":[{"path":"fs","kind":"require-call","external":true},{"path":"path","kind":"require-call","external":true}],"format":"cjs"},"node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io.js":{"bytes":11782,"imports":[{"path":"assert","kind":"require-call","external":true},{"path":"path","kind":"require-call","external":true},{"path":"node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io-util.js","kind":"require-call","original":"./io-util"}],"format":"cjs"},"node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/toolrunner.js":{"bytes":25282,"imports":[{"path":"os","kind":"require-call","external":true},{"path":"events","kind":"require-call","external":true},{"path":"child_process","kind":"require-call","external":true},{"path":"path","kind":"require-call","external":true},{"path":"node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io.js","kind":"require-call","original":"@actions/io"},{"path":"node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io-util.js","kind":"require-call","original":"@actions/io/lib/io-util"},{"path":"timers","kind":"require-call","external":true}],"format":"cjs"},"node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/exec.js":{"bytes":5011,"imports":[{"path":"string_decoder","kind":"require-call","external":true},{"path":"node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/toolrunner.js","kind":"require-call","original":"./toolrunner"}],"format":"cjs"},"packages/k8s-tools/src/types.ts":{"bytes":859,"imports":[{"path":"prettier","kind":"import-statement","external":true}],"format":"esm"},"packages/k8s-tools/src/utils/ensure-init.ts":{"bytes":956,"imports":[{"path":"../types","kind":"import-statement","external":true}],"format":"esm"},"packages/k8s-tools/src/utils/client.ts":{"bytes":3120,"imports":[{"path":"node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/exec.js","kind":"import-statement","original":"@actions/exec"},{"path":"packages/k8s-tools/src/types.ts","kind":"import-statement","original":"../types"},{"path":"packages/k8s-tools/src/utils/ensure-init.ts","kind":"import-statement","original":"./ensure-init"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"packages/k8s-tools/src/executors/helm-package/executor.ts":{"bytes":1993,"imports":[{"path":"@storm-software/workspace-tools","kind":"import-statement","external":true},{"path":"packages/k8s-tools/src/utils/client.ts","kind":"import-statement","original":"../../utils/client"},{"path":"./schema","kind":"import-statement","external":true},{"path":"@storm-software/config-tools","kind":"dynamic-import","external":true}],"format":"esm"},"packages/k8s-tools/src/executors/index.ts":{"bytes":41,"imports":[{"path":"packages/k8s-tools/src/executors/helm-package/executor.ts","kind":"import-statement","original":"./helm-package/executor"}],"format":"esm"},"packages/k8s-tools/src/generators/helm-chart/generator.ts":{"bytes":3098,"imports":[{"path":"@nx/devkit","kind":"import-statement","external":true},{"path":"@storm-software/config","kind":"import-statement","external":true},{"path":"path","kind":"import-statement","external":true},{"path":"@storm-software/config-tools","kind":"dynamic-import","external":true}],"format":"esm"},"node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/dist/js-yaml.mjs":{"bytes":107533,"imports":[],"format":"esm"},"packages/k8s-tools/src/generators/helm-dependency/generator.ts":{"bytes":4670,"imports":[{"path":"@nx/devkit","kind":"import-statement","external":true},{"path":"@storm-software/config","kind":"import-statement","external":true},{"path":"node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/dist/js-yaml.mjs","kind":"import-statement","original":"js-yaml"},{"path":"@storm-software/config-tools","kind":"dynamic-import","external":true}],"format":"esm"},"packages/k8s-tools/src/generators/index.ts":{"bytes":85,"imports":[{"path":"packages/k8s-tools/src/generators/helm-chart/generator.ts","kind":"import-statement","original":"./helm-chart/generator"},{"path":"packages/k8s-tools/src/generators/helm-dependency/generator.ts","kind":"import-statement","original":"./helm-dependency/generator"}],"format":"esm"},"packages/k8s-tools/src/index.ts":{"bytes":59,"imports":[{"path":"packages/k8s-tools/src/executors/index.ts","kind":"import-statement","original":"./executors"},{"path":"packages/k8s-tools/src/generators/index.ts","kind":"import-statement","original":"./generators"}],"format":"esm"},"packages/k8s-tools/index.ts":{"bytes":23,"imports":[{"path":"packages/k8s-tools/src/index.ts","kind":"import-statement","original":"./src"}],"format":"esm"}},"outputs":{"dist/packages/k8s-tools/index.js":{"imports":[{"path":"fs","kind":"require-call","external":true},{"path":"path","kind":"require-call","external":true},{"path":"assert","kind":"require-call","external":true},{"path":"path","kind":"require-call","external":true},{"path":"os","kind":"require-call","external":true},{"path":"events","kind":"require-call","external":true},{"path":"child_process","kind":"require-call","external":true},{"path":"path","kind":"require-call","external":true},{"path":"timers","kind":"require-call","external":true},{"path":"string_decoder","kind":"require-call","external":true},{"path":"@storm-software/workspace-tools","kind":"require-call","external":true},{"path":"@storm-software/config-tools","kind":"dynamic-import","external":true},{"path":"@nx/devkit","kind":"require-call","external":true},{"path":"path","kind":"require-call","external":true},{"path":"@storm-software/config-tools","kind":"dynamic-import","external":true},{"path":"@nx/devkit","kind":"require-call","external":true},{"path":"@storm-software/config-tools","kind":"dynamic-import","external":true}],"exports":[],"entryPoint":"packages/k8s-tools/index.ts","inputs":{"node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io-util.js":{"bytesInOutput":6851},"node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io.js":{"bytesInOutput":9387},"node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/toolrunner.js":{"bytesInOutput":16633},"node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/exec.js":{"bytesInOutput":4288},"packages/k8s-tools/index.ts":{"bytesInOutput":361},"packages/k8s-tools/src/executors/helm-package/executor.ts":{"bytesInOutput":1564},"packages/k8s-tools/src/utils/client.ts":{"bytesInOutput":2941},"packages/k8s-tools/src/types.ts":{"bytesInOutput":134},"packages/k8s-tools/src/utils/ensure-init.ts":{"bytesInOutput":579},"packages/k8s-tools/src/executors/index.ts":{"bytesInOutput":0},"packages/k8s-tools/src/index.ts":{"bytesInOutput":0},"packages/k8s-tools/src/generators/helm-chart/generator.ts":{"bytesInOutput":2826},"packages/k8s-tools/src/generators/index.ts":{"bytesInOutput":0},"packages/k8s-tools/src/generators/helm-dependency/generator.ts":{"bytesInOutput":3963},"node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/dist/js-yaml.mjs":{"bytesInOutput":87999}},"bytes":140726},"dist/packages/k8s-tools/src/executors/helm-package/executor.js":{"imports":[{"path":"fs","kind":"require-call","external":true},{"path":"path","kind":"require-call","external":true},{"path":"assert","kind":"require-call","external":true},{"path":"path","kind":"require-call","external":true},{"path":"os","kind":"require-call","external":true},{"path":"events","kind":"require-call","external":true},{"path":"child_process","kind":"require-call","external":true},{"path":"path","kind":"require-call","external":true},{"path":"timers","kind":"require-call","external":true},{"path":"string_decoder","kind":"require-call","external":true},{"path":"@storm-software/workspace-tools","kind":"require-call","external":true},{"path":"@storm-software/config-tools","kind":"dynamic-import","external":true}],"exports":[],"entryPoint":"packages/k8s-tools/src/executors/helm-package/executor.ts","inputs":{"node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io-util.js":{"bytesInOutput":6851},"node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io.js":{"bytesInOutput":9387},"node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/toolrunner.js":{"bytesInOutput":16631},"node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/exec.js":{"bytesInOutput":4288},"packages/k8s-tools/src/executors/helm-package/executor.ts":{"bytesInOutput":1745},"packages/k8s-tools/src/utils/client.ts":{"bytesInOutput":2941},"packages/k8s-tools/src/types.ts":{"bytesInOutput":134},"packages/k8s-tools/src/utils/ensure-init.ts":{"bytesInOutput":579}},"bytes":45222},"dist/packages/k8s-tools/src/generators/helm-chart/generator.js":{"imports":[{"path":"@nx/devkit","kind":"require-call","external":true},{"path":"path","kind":"require-call","external":true},{"path":"@storm-software/config-tools","kind":"dynamic-import","external":true}],"exports":[],"entryPoint":"packages/k8s-tools/src/generators/helm-chart/generator.ts","inputs":{"packages/k8s-tools/src/generators/helm-chart/generator.ts":{"bytesInOutput":3113}},"bytes":4691},"dist/packages/k8s-tools/src/generators/helm-dependency/generator.js":{"imports":[{"path":"@nx/devkit","kind":"require-call","external":true},{"path":"@storm-software/config-tools","kind":"dynamic-import","external":true}],"exports":[],"entryPoint":"packages/k8s-tools/src/generators/helm-dependency/generator.ts","inputs":{"packages/k8s-tools/src/generators/helm-dependency/generator.ts":{"bytesInOutput":4269},"node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/dist/js-yaml.mjs":{"bytesInOutput":87999}},"bytes":94136}}}
|
|
1
|
+
{"inputs":{"node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io-util.js":{"bytes":7922,"imports":[{"path":"fs","kind":"require-call","external":true},{"path":"path","kind":"require-call","external":true}],"format":"cjs"},"node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io.js":{"bytes":11782,"imports":[{"path":"assert","kind":"require-call","external":true},{"path":"path","kind":"require-call","external":true},{"path":"node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io-util.js","kind":"require-call","original":"./io-util"}],"format":"cjs"},"node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/toolrunner.js":{"bytes":25282,"imports":[{"path":"os","kind":"require-call","external":true},{"path":"events","kind":"require-call","external":true},{"path":"child_process","kind":"require-call","external":true},{"path":"path","kind":"require-call","external":true},{"path":"node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io.js","kind":"require-call","original":"@actions/io"},{"path":"node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io-util.js","kind":"require-call","original":"@actions/io/lib/io-util"},{"path":"timers","kind":"require-call","external":true}],"format":"cjs"},"node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/exec.js":{"bytes":5011,"imports":[{"path":"string_decoder","kind":"require-call","external":true},{"path":"node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/toolrunner.js","kind":"require-call","original":"./toolrunner"}],"format":"cjs"},"packages/k8s-tools/src/types.ts":{"bytes":859,"imports":[{"path":"prettier","kind":"import-statement","external":true}],"format":"esm"},"packages/k8s-tools/src/utils/ensure-init.ts":{"bytes":956,"imports":[{"path":"../types","kind":"import-statement","external":true}],"format":"esm"},"packages/k8s-tools/src/utils/client.ts":{"bytes":3120,"imports":[{"path":"node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/exec.js","kind":"import-statement","original":"@actions/exec"},{"path":"packages/k8s-tools/src/types.ts","kind":"import-statement","original":"../types"},{"path":"packages/k8s-tools/src/utils/ensure-init.ts","kind":"import-statement","original":"./ensure-init"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"packages/k8s-tools/src/executors/helm-package/executor.ts":{"bytes":1993,"imports":[{"path":"@storm-software/workspace-tools","kind":"import-statement","external":true},{"path":"packages/k8s-tools/src/utils/client.ts","kind":"import-statement","original":"../../utils/client"},{"path":"./schema","kind":"import-statement","external":true},{"path":"@storm-software/config-tools","kind":"dynamic-import","external":true}],"format":"esm"},"packages/k8s-tools/src/executors/index.ts":{"bytes":41,"imports":[{"path":"packages/k8s-tools/src/executors/helm-package/executor.ts","kind":"import-statement","original":"./helm-package/executor"}],"format":"esm"},"packages/k8s-tools/src/generators/helm-chart/generator.ts":{"bytes":1794,"imports":[{"path":"@nx/devkit","kind":"import-statement","external":true},{"path":"@storm-software/config","kind":"import-statement","external":true},{"path":"@storm-software/workspace-tools","kind":"import-statement","external":true},{"path":"path","kind":"import-statement","external":true},{"path":"@storm-software/config-tools","kind":"dynamic-import","external":true}],"format":"esm"},"node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/dist/js-yaml.mjs":{"bytes":107533,"imports":[],"format":"esm"},"packages/k8s-tools/src/generators/helm-dependency/generator.ts":{"bytes":3394,"imports":[{"path":"@nx/devkit","kind":"import-statement","external":true},{"path":"@storm-software/config","kind":"import-statement","external":true},{"path":"@storm-software/workspace-tools","kind":"import-statement","external":true},{"path":"node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/dist/js-yaml.mjs","kind":"import-statement","original":"js-yaml"},{"path":"@storm-software/config-tools","kind":"dynamic-import","external":true}],"format":"esm"},"packages/k8s-tools/src/generators/index.ts":{"bytes":85,"imports":[{"path":"packages/k8s-tools/src/generators/helm-chart/generator.ts","kind":"import-statement","original":"./helm-chart/generator"},{"path":"packages/k8s-tools/src/generators/helm-dependency/generator.ts","kind":"import-statement","original":"./helm-dependency/generator"}],"format":"esm"},"packages/k8s-tools/src/index.ts":{"bytes":59,"imports":[{"path":"packages/k8s-tools/src/executors/index.ts","kind":"import-statement","original":"./executors"},{"path":"packages/k8s-tools/src/generators/index.ts","kind":"import-statement","original":"./generators"}],"format":"esm"},"packages/k8s-tools/index.ts":{"bytes":23,"imports":[{"path":"packages/k8s-tools/src/index.ts","kind":"import-statement","original":"./src"}],"format":"esm"}},"outputs":{"dist/packages/k8s-tools/index.js":{"imports":[{"path":"fs","kind":"require-call","external":true},{"path":"path","kind":"require-call","external":true},{"path":"assert","kind":"require-call","external":true},{"path":"path","kind":"require-call","external":true},{"path":"os","kind":"require-call","external":true},{"path":"events","kind":"require-call","external":true},{"path":"child_process","kind":"require-call","external":true},{"path":"path","kind":"require-call","external":true},{"path":"timers","kind":"require-call","external":true},{"path":"string_decoder","kind":"require-call","external":true},{"path":"@storm-software/workspace-tools","kind":"require-call","external":true},{"path":"@storm-software/config-tools","kind":"dynamic-import","external":true},{"path":"@nx/devkit","kind":"require-call","external":true},{"path":"@storm-software/workspace-tools","kind":"require-call","external":true},{"path":"path","kind":"require-call","external":true},{"path":"@storm-software/config-tools","kind":"dynamic-import","external":true},{"path":"@nx/devkit","kind":"require-call","external":true},{"path":"@storm-software/workspace-tools","kind":"require-call","external":true},{"path":"@storm-software/config-tools","kind":"dynamic-import","external":true}],"exports":[],"entryPoint":"packages/k8s-tools/index.ts","inputs":{"node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io-util.js":{"bytesInOutput":6851},"node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io.js":{"bytesInOutput":9387},"node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/toolrunner.js":{"bytesInOutput":16633},"node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/exec.js":{"bytesInOutput":4288},"packages/k8s-tools/index.ts":{"bytesInOutput":263},"packages/k8s-tools/src/executors/helm-package/executor.ts":{"bytesInOutput":1564},"packages/k8s-tools/src/utils/client.ts":{"bytesInOutput":2941},"packages/k8s-tools/src/types.ts":{"bytesInOutput":134},"packages/k8s-tools/src/utils/ensure-init.ts":{"bytesInOutput":579},"packages/k8s-tools/src/executors/index.ts":{"bytesInOutput":0},"packages/k8s-tools/src/index.ts":{"bytesInOutput":0},"packages/k8s-tools/src/generators/helm-chart/generator.ts":{"bytesInOutput":1668},"packages/k8s-tools/src/generators/index.ts":{"bytesInOutput":0},"packages/k8s-tools/src/generators/helm-dependency/generator.ts":{"bytesInOutput":2831},"node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/dist/js-yaml.mjs":{"bytesInOutput":87999}},"bytes":138293},"dist/packages/k8s-tools/src/executors/helm-package/executor.js":{"imports":[{"path":"fs","kind":"require-call","external":true},{"path":"path","kind":"require-call","external":true},{"path":"assert","kind":"require-call","external":true},{"path":"path","kind":"require-call","external":true},{"path":"os","kind":"require-call","external":true},{"path":"events","kind":"require-call","external":true},{"path":"child_process","kind":"require-call","external":true},{"path":"path","kind":"require-call","external":true},{"path":"timers","kind":"require-call","external":true},{"path":"string_decoder","kind":"require-call","external":true},{"path":"@storm-software/workspace-tools","kind":"require-call","external":true},{"path":"@storm-software/config-tools","kind":"dynamic-import","external":true}],"exports":[],"entryPoint":"packages/k8s-tools/src/executors/helm-package/executor.ts","inputs":{"node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io-util.js":{"bytesInOutput":6851},"node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io.js":{"bytesInOutput":9387},"node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/toolrunner.js":{"bytesInOutput":16631},"node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/exec.js":{"bytesInOutput":4288},"packages/k8s-tools/src/executors/helm-package/executor.ts":{"bytesInOutput":1745},"packages/k8s-tools/src/utils/client.ts":{"bytesInOutput":2941},"packages/k8s-tools/src/types.ts":{"bytesInOutput":134},"packages/k8s-tools/src/utils/ensure-init.ts":{"bytesInOutput":579}},"bytes":45222},"dist/packages/k8s-tools/src/generators/helm-chart/generator.js":{"imports":[{"path":"@nx/devkit","kind":"require-call","external":true},{"path":"@storm-software/workspace-tools","kind":"require-call","external":true},{"path":"path","kind":"require-call","external":true},{"path":"@storm-software/config-tools","kind":"dynamic-import","external":true}],"exports":[],"entryPoint":"packages/k8s-tools/src/generators/helm-chart/generator.ts","inputs":{"packages/k8s-tools/src/generators/helm-chart/generator.ts":{"bytesInOutput":1865}},"bytes":3423},"dist/packages/k8s-tools/src/generators/helm-dependency/generator.js":{"imports":[{"path":"@nx/devkit","kind":"require-call","external":true},{"path":"@storm-software/workspace-tools","kind":"require-call","external":true},{"path":"@storm-software/config-tools","kind":"dynamic-import","external":true}],"exports":[],"entryPoint":"packages/k8s-tools/src/generators/helm-dependency/generator.ts","inputs":{"packages/k8s-tools/src/generators/helm-dependency/generator.ts":{"bytesInOutput":3033},"node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/dist/js-yaml.mjs":{"bytesInOutput":87999}},"bytes":92875}}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/k8s-tools",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"description": "⚡ A Nx plugin package that contains various executors, generators, and utilities that assist in managing k8s IoC.",
|
|
6
6
|
"repository": {
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"monorepo"
|
|
42
42
|
],
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@nx/devkit": "^19.
|
|
45
|
-
"nx": "^19.
|
|
44
|
+
"@nx/devkit": "^19.6.2",
|
|
45
|
+
"nx": "^19.6.2"
|
|
46
46
|
},
|
|
47
47
|
"peerDependenciesMeta": {
|
|
48
48
|
"@nx/devkit": {
|
|
@@ -54,14 +54,14 @@
|
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@actions/exec": "^1.1.1",
|
|
57
|
-
"@nx/devkit": "^19.
|
|
58
|
-
"@nx/workspace": "^19.
|
|
57
|
+
"@nx/devkit": "^19.6.2",
|
|
58
|
+
"@nx/workspace": "^19.6.2",
|
|
59
59
|
"js-yaml": "^4.1.0",
|
|
60
60
|
"tslib": "^2.6.3"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@types/js-yaml": "4.0.9",
|
|
64
|
-
"nx": "^19.
|
|
64
|
+
"nx": "^19.6.2"
|
|
65
65
|
},
|
|
66
66
|
"publishConfig": {
|
|
67
67
|
"access": "public"
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Tree } from "@nx/devkit";
|
|
2
|
+
import { StormConfig } from "@storm-software/config";
|
|
3
|
+
import type { HelmChartGeneratorSchema } from "./schema";
|
|
4
|
+
export declare function helmChartGeneratorFn(tree: Tree, options: HelmChartGeneratorSchema, config?: StormConfig): Promise<{
|
|
5
|
+
success: boolean;
|
|
6
|
+
}>;
|
|
7
|
+
declare const _default: (tree: Tree, _options: HelmChartGeneratorSchema) => Promise<import("@nx/devkit").GeneratorCallback | import("packages/workspace-tools/declarations").BaseGeneratorResult>;
|
|
8
|
+
export default _default;
|
|
@@ -30,102 +30,60 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
var generator_exports = {};
|
|
31
31
|
__export(generator_exports, {
|
|
32
32
|
default: () => generator_default,
|
|
33
|
-
|
|
34
|
-
helmChartSchematic: () => helmChartSchematic
|
|
33
|
+
helmChartGeneratorFn: () => helmChartGeneratorFn
|
|
35
34
|
});
|
|
36
35
|
module.exports = __toCommonJS(generator_exports);
|
|
37
36
|
var import_devkit = require("@nx/devkit");
|
|
37
|
+
var import_workspace_tools = require("@storm-software/workspace-tools");
|
|
38
38
|
var import_path = require("path");
|
|
39
|
-
async function
|
|
40
|
-
const {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
writeTrace,
|
|
47
|
-
findWorkspaceRoot,
|
|
48
|
-
loadStormConfig
|
|
49
|
-
} = await import("@storm-software/config-tools");
|
|
50
|
-
const stopwatch = getStopwatch("Storm Helm Chart generator");
|
|
51
|
-
let config;
|
|
52
|
-
try {
|
|
53
|
-
writeInfo(`\u26A1 Running the Storm Helm Chart generator...
|
|
54
|
-
|
|
55
|
-
`, config);
|
|
56
|
-
const workspaceRoot = findWorkspaceRoot();
|
|
57
|
-
writeDebug(
|
|
58
|
-
`Loading the Storm Config from environment variables and storm.json file...
|
|
59
|
-
- workspaceRoot: ${workspaceRoot}`,
|
|
60
|
-
config
|
|
61
|
-
);
|
|
62
|
-
config = await loadStormConfig(workspaceRoot);
|
|
63
|
-
writeTrace(
|
|
64
|
-
`Loaded Storm config into env:
|
|
65
|
-
${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[key])}`).join("\n")}`,
|
|
66
|
-
config
|
|
39
|
+
async function helmChartGeneratorFn(tree, options, config) {
|
|
40
|
+
const { writeTrace } = await import("@storm-software/config-tools");
|
|
41
|
+
writeTrace("\u{1F4DD} Preparing to write Helm Chart", config);
|
|
42
|
+
const project = (0, import_devkit.readProjectConfiguration)(tree, options.project);
|
|
43
|
+
if (project.targets?.["helm-package"]) {
|
|
44
|
+
throw new Error(
|
|
45
|
+
`Project ${options.project} already has a helm target. Please remove it before running this command.`
|
|
67
46
|
);
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
"helm-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
outputFolder: "{workspaceRoot}/dist/charts/{projectRoot}",
|
|
86
|
-
push: false,
|
|
87
|
-
remote: "oci://localhost:5000/helm-charts",
|
|
88
|
-
dependencies: {
|
|
89
|
-
update: true,
|
|
90
|
-
build: true,
|
|
91
|
-
repositories: []
|
|
92
|
-
}
|
|
93
|
-
}
|
|
47
|
+
}
|
|
48
|
+
(0, import_devkit.updateProjectConfiguration)(tree, options.project, {
|
|
49
|
+
...project,
|
|
50
|
+
targets: {
|
|
51
|
+
...project.targets,
|
|
52
|
+
"helm-package": {
|
|
53
|
+
executor: "@storm-software/k8s-tools:helm-package",
|
|
54
|
+
outputs: ["{options.outputFolder}"],
|
|
55
|
+
options: {
|
|
56
|
+
chartFolder: `${project.root}/${options.chartFolder}`,
|
|
57
|
+
outputFolder: "{workspaceRoot}/dist/charts/{projectRoot}",
|
|
58
|
+
push: false,
|
|
59
|
+
remote: "oci://localhost:5000/helm-charts",
|
|
60
|
+
dependencies: {
|
|
61
|
+
update: true,
|
|
62
|
+
build: true,
|
|
63
|
+
repositories: []
|
|
94
64
|
}
|
|
95
65
|
}
|
|
96
|
-
});
|
|
97
|
-
(0, import_devkit.generateFiles)(
|
|
98
|
-
tree,
|
|
99
|
-
(0, import_path.join)(__dirname, "files", "chart"),
|
|
100
|
-
(0, import_path.join)(project.root, options.chartFolder ?? ""),
|
|
101
|
-
options
|
|
102
|
-
);
|
|
103
|
-
if (options.format) {
|
|
104
|
-
await (0, import_devkit.formatFiles)(tree);
|
|
105
66
|
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
- Details: ${error.message}
|
|
117
|
-
- Stacktrace: ${error.stack}`,
|
|
118
|
-
config
|
|
119
|
-
);
|
|
120
|
-
};
|
|
121
|
-
} finally {
|
|
122
|
-
stopwatch();
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
(0, import_devkit.generateFiles)(
|
|
70
|
+
tree,
|
|
71
|
+
(0, import_path.join)(__dirname, "files", "chart"),
|
|
72
|
+
(0, import_path.join)(project.root, options.chartFolder ?? ""),
|
|
73
|
+
options
|
|
74
|
+
);
|
|
75
|
+
if (options.format) {
|
|
76
|
+
await (0, import_devkit.formatFiles)(tree);
|
|
123
77
|
}
|
|
78
|
+
return {
|
|
79
|
+
success: true
|
|
80
|
+
};
|
|
124
81
|
}
|
|
125
|
-
var generator_default =
|
|
126
|
-
|
|
82
|
+
var generator_default = (0, import_workspace_tools.withRunGenerator)(
|
|
83
|
+
"Helm Chart",
|
|
84
|
+
helmChartGeneratorFn
|
|
85
|
+
);
|
|
127
86
|
// Annotate the CommonJS export names for ESM import in node:
|
|
128
87
|
0 && (module.exports = {
|
|
129
|
-
|
|
130
|
-
helmChartSchematic
|
|
88
|
+
helmChartGeneratorFn
|
|
131
89
|
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Tree } from "@nx/devkit";
|
|
2
|
+
import { StormConfig } from "@storm-software/config";
|
|
3
|
+
import type { HelmDependencyGeneratorSchema } from "./schema";
|
|
4
|
+
export declare function helmDependencyGeneratorFn(tree: Tree, options: HelmDependencyGeneratorSchema, config?: StormConfig): Promise<{
|
|
5
|
+
success: boolean;
|
|
6
|
+
}>;
|
|
7
|
+
declare const _default: (tree: Tree, _options: HelmDependencyGeneratorSchema) => Promise<import("@nx/devkit").GeneratorCallback | import("packages/workspace-tools/declarations").BaseGeneratorResult>;
|
|
8
|
+
export default _default;
|