@storm-software/k8s-tools 0.24.50 → 0.24.52
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 +15 -0
- package/README.md +1 -1
- package/dist/{chunk-EGAM4DSZ.mjs → chunk-2BTFNEDO.mjs} +2 -2
- package/dist/{chunk-ESW5AXT2.mjs → chunk-57SYOGC4.mjs} +2 -2
- package/dist/{chunk-RJJUCC2C.js → chunk-64PANJDZ.js} +3 -3
- package/dist/{chunk-27AKWD73.js → chunk-7LLISIHM.js} +25 -25
- package/dist/{chunk-27ZC57FP.js → chunk-7NBM7KT7.js} +8 -8
- package/dist/{chunk-R64Y2LSB.js → chunk-A2GC2ZJ6.js} +2 -2
- package/dist/{chunk-VN4RW7JL.mjs → chunk-AOIBIGXI.mjs} +1 -1
- package/dist/{chunk-5WJ3PXBA.js → chunk-AW7LR6WY.js} +4 -4
- package/dist/{chunk-MYQII3CB.js → chunk-M7UG2WDO.js} +4 -4
- package/dist/{chunk-UHK34HTM.mjs → chunk-N533536N.mjs} +2 -2
- package/dist/{chunk-JA42WPMD.mjs → chunk-QMHHRTLH.mjs} +1 -1
- package/dist/{chunk-73SZZ5JH.js → chunk-QPQNIGQZ.js} +6 -6
- package/dist/{chunk-DKUH4YV2.mjs → chunk-SI4JQREN.mjs} +2 -2
- package/dist/{chunk-HS7SC5NU.mjs → chunk-SPU642IC.mjs} +2 -2
- package/dist/{chunk-IGXHTXQH.mjs → chunk-YKCY2BFI.mjs} +8 -8
- package/dist/{chunk-X3EJWLQF.js → chunk-YYSIGZVO.js} +19 -19
- package/dist/{executor-DEatrcJs.d.ts → executor-yTjQjOIj.d.ts} +2 -2
- package/dist/{executor-CumACYb8.d.mts → executor-z_O4xSua.d.mts} +2 -2
- package/dist/executors.d.mts +2 -2
- package/dist/executors.d.ts +2 -2
- package/dist/executors.js +5 -5
- package/dist/executors.mjs +4 -4
- package/dist/{generator-CQG_XJ0l.d.ts → generator-CbhBzMc6.d.ts} +2 -2
- package/dist/{generator-C6GKj2Md.d.mts → generator-DM4nSpsg.d.mts} +2 -2
- package/dist/{generator-UBiKRKhk.d.mts → generator-DqXN4wEq.d.mts} +2 -2
- package/dist/{generator-CoEmhb2l.d.ts → generator-Dto9n53o.d.ts} +2 -2
- package/dist/generators.d.mts +3 -3
- package/dist/generators.d.ts +3 -3
- package/dist/generators.js +6 -6
- package/dist/generators.mjs +5 -5
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +9 -9
- package/dist/index.mjs +8 -8
- package/dist/src/executors/container-publish/executor.d.mts +2 -2
- package/dist/src/executors/container-publish/executor.d.ts +2 -2
- package/dist/src/executors/container-publish/executor.js +4 -4
- package/dist/src/executors/container-publish/executor.mjs +3 -3
- package/dist/src/executors/helm-package/executor.d.mts +2 -2
- package/dist/src/executors/helm-package/executor.d.ts +2 -2
- package/dist/src/executors/helm-package/executor.js +4 -4
- package/dist/src/executors/helm-package/executor.mjs +3 -3
- package/dist/src/generators/helm-chart/generator.d.mts +2 -2
- package/dist/src/generators/helm-chart/generator.d.ts +2 -2
- package/dist/src/generators/helm-chart/generator.js +5 -5
- package/dist/src/generators/helm-chart/generator.mjs +4 -4
- package/dist/src/generators/helm-dependency/generator.d.mts +2 -2
- package/dist/src/generators/helm-dependency/generator.d.ts +2 -2
- package/dist/src/generators/helm-dependency/generator.js +5 -5
- package/dist/src/generators/helm-dependency/generator.mjs +4 -4
- package/dist/src/plugins/docker/index.js +3 -3
- package/dist/src/plugins/docker/index.mjs +2 -2
- package/dist/{types-BXfk4hPO.d.mts → types-PmpUoA3H.d.mts} +21 -5
- package/dist/{types-BXfk4hPO.d.ts → types-PmpUoA3H.d.ts} +21 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Storm Ops - K8s Tools
|
|
4
4
|
|
|
5
|
+
## [0.24.52](https://github.com/storm-software/storm-ops/releases/tag/k8s-tools%400.24.52) (2025-04-02)
|
|
6
|
+
|
|
7
|
+
### Miscellaneous
|
|
8
|
+
|
|
9
|
+
- **k8s-tools:** Update all references to `StormConfig` to point to
|
|
10
|
+
`StormWorkspaceConfig`
|
|
11
|
+
([3ccd974a7](https://github.com/storm-software/storm-ops/commit/3ccd974a7))
|
|
12
|
+
|
|
13
|
+
## [0.24.51](https://github.com/storm-software/storm-ops/releases/tag/k8s-tools%400.24.51) (2025-03-18)
|
|
14
|
+
|
|
15
|
+
### Miscellaneous
|
|
16
|
+
|
|
17
|
+
- **monorepo:** Regenerate README markdown files
|
|
18
|
+
([4a6eeab3f](https://github.com/storm-software/storm-ops/commit/4a6eeab3f))
|
|
19
|
+
|
|
5
20
|
## [0.24.50](https://github.com/storm-software/storm-ops/releases/tag/k8s-tools%400.24.50) (2025-03-18)
|
|
6
21
|
|
|
7
22
|
### Miscellaneous
|
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
21
21
|
|
|
22
22
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
23
23
|
|
|
24
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
25
25
|
|
|
26
26
|
<!-- prettier-ignore-start -->
|
|
27
27
|
<!-- markdownlint-disable -->
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
} from "./chunk-QSYJ4VHO.mjs";
|
|
4
4
|
import {
|
|
5
5
|
applyWorkspaceTokens
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AOIBIGXI.mjs";
|
|
7
7
|
import {
|
|
8
8
|
findWorkspaceRoot,
|
|
9
9
|
getConfig
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-YKCY2BFI.mjs";
|
|
11
11
|
import {
|
|
12
12
|
__name
|
|
13
13
|
} from "./chunk-2BPV2XV2.mjs";
|
|
@@ -8,7 +8,7 @@ var _chunkIOT45LXVjs = require('./chunk-IOT45LXV.js');
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunk7NBM7KT7js = require('./chunk-7NBM7KT7.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
@@ -35,8 +35,8 @@ var createNodes = [
|
|
|
35
35
|
if (_optionalChain([projectJson, 'optionalAccess', _2 => _2.name])) {
|
|
36
36
|
return {};
|
|
37
37
|
}
|
|
38
|
-
const workspaceRoot =
|
|
39
|
-
const config = await
|
|
38
|
+
const workspaceRoot = _chunk7NBM7KT7js.findWorkspaceRoot.call(void 0, );
|
|
39
|
+
const config = await _chunk7NBM7KT7js.getConfig.call(void 0, workspaceRoot);
|
|
40
40
|
Object.keys(projectJson).forEach((key) => {
|
|
41
41
|
if (!project[key]) {
|
|
42
42
|
project[key] = projectJson[key];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkA2GC2ZJ6js = require('./chunk-A2GC2ZJ6.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -14,7 +14,7 @@ var _chunkR64Y2LSBjs = require('./chunk-R64Y2LSB.js');
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunk7NBM7KT7js = require('./chunk-7NBM7KT7.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
var _chunk2GAU2GHGjs = require('./chunk-2GAU2GHG.js');
|
|
@@ -25,50 +25,50 @@ var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
|
25
25
|
// ../workspace-tools/src/base/base-executor.ts
|
|
26
26
|
var _defu = require('defu');
|
|
27
27
|
var withRunExecutor = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (name, executorFn, executorOptions = {}) => async (_options, context) => {
|
|
28
|
-
const stopwatch =
|
|
28
|
+
const stopwatch = _chunk7NBM7KT7js.getStopwatch.call(void 0, name);
|
|
29
29
|
let options = _options;
|
|
30
30
|
let config = {};
|
|
31
31
|
try {
|
|
32
32
|
if (!_optionalChain([context, 'access', _ => _.projectsConfigurations, 'optionalAccess', _2 => _2.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
33
33
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
34
34
|
}
|
|
35
|
-
const workspaceRoot =
|
|
35
|
+
const workspaceRoot = _chunk7NBM7KT7js.findWorkspaceRoot.call(void 0, );
|
|
36
36
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root || workspaceRoot;
|
|
37
37
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot || projectRoot || workspaceRoot;
|
|
38
38
|
const projectName = context.projectName;
|
|
39
39
|
config.workspaceRoot = workspaceRoot;
|
|
40
|
-
|
|
40
|
+
_chunk7NBM7KT7js.writeInfo.call(void 0, `\u26A1 Running the ${name} executor for ${projectName} `, config);
|
|
41
41
|
if (!executorOptions.skipReadingConfig) {
|
|
42
|
-
|
|
42
|
+
_chunk7NBM7KT7js.writeTrace.call(void 0, `Loading the Storm Config from environment variables and storm.config.js file...
|
|
43
43
|
- workspaceRoot: ${workspaceRoot}
|
|
44
44
|
- projectRoot: ${projectRoot}
|
|
45
45
|
- sourceRoot: ${sourceRoot}
|
|
46
46
|
- projectName: ${projectName}
|
|
47
47
|
`, config);
|
|
48
|
-
config = await
|
|
48
|
+
config = await _chunk7NBM7KT7js.getConfig.call(void 0, workspaceRoot);
|
|
49
49
|
}
|
|
50
50
|
if (_optionalChain([executorOptions, 'optionalAccess', _3 => _3.hooks, 'optionalAccess', _4 => _4.applyDefaultOptions])) {
|
|
51
|
-
|
|
51
|
+
_chunk7NBM7KT7js.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
52
52
|
options = await Promise.resolve(executorOptions.hooks.applyDefaultOptions(options, config));
|
|
53
|
-
|
|
53
|
+
_chunk7NBM7KT7js.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
54
54
|
}
|
|
55
|
-
|
|
56
|
-
${
|
|
55
|
+
_chunk7NBM7KT7js.writeTrace.call(void 0, `Executor schema options \u2699\uFE0F
|
|
56
|
+
${_chunk7NBM7KT7js.formatLogMessage.call(void 0, options)}
|
|
57
57
|
`, config);
|
|
58
|
-
const tokenized = await
|
|
58
|
+
const tokenized = await _chunkA2GC2ZJ6js.applyWorkspaceTokens.call(void 0, options, _defu.defu.call(void 0, {
|
|
59
59
|
workspaceRoot,
|
|
60
60
|
projectRoot,
|
|
61
61
|
sourceRoot,
|
|
62
62
|
projectName,
|
|
63
63
|
config
|
|
64
|
-
}, config, context.projectsConfigurations.projects[context.projectName]),
|
|
65
|
-
|
|
66
|
-
${
|
|
64
|
+
}, config, context.projectsConfigurations.projects[context.projectName]), _chunkA2GC2ZJ6js.applyWorkspaceProjectTokens);
|
|
65
|
+
_chunk7NBM7KT7js.writeTrace.call(void 0, `Executor schema tokenized options \u2699\uFE0F
|
|
66
|
+
${_chunk7NBM7KT7js.formatLogMessage.call(void 0, tokenized)}
|
|
67
67
|
`, config);
|
|
68
68
|
if (_optionalChain([executorOptions, 'optionalAccess', _5 => _5.hooks, 'optionalAccess', _6 => _6.preProcess])) {
|
|
69
|
-
|
|
69
|
+
_chunk7NBM7KT7js.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
70
70
|
await Promise.resolve(executorOptions.hooks.preProcess(tokenized, config));
|
|
71
|
-
|
|
71
|
+
_chunk7NBM7KT7js.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
72
72
|
}
|
|
73
73
|
const ret = executorFn(tokenized, context, config);
|
|
74
74
|
if (_isFunction(_optionalChain([ret, 'optionalAccess', _7 => _7.next]))) {
|
|
@@ -78,26 +78,26 @@ ${_chunk27ZC57FPjs.formatLogMessage.call(void 0, tokenized)}
|
|
|
78
78
|
}
|
|
79
79
|
const result = await Promise.resolve(ret);
|
|
80
80
|
if (result && (!result.success || result.error && _optionalChain([result, 'optionalAccess', _8 => _8.error, 'optionalAccess', _9 => _9.message]) && typeof _optionalChain([result, 'optionalAccess', _10 => _10.error, 'optionalAccess', _11 => _11.message]) === "string" && _optionalChain([result, 'optionalAccess', _12 => _12.error, 'optionalAccess', _13 => _13.name]) && typeof _optionalChain([result, 'optionalAccess', _14 => _14.error, 'optionalAccess', _15 => _15.name]) === "string")) {
|
|
81
|
-
|
|
82
|
-
${
|
|
81
|
+
_chunk7NBM7KT7js.writeTrace.call(void 0, `Failure determined by the ${name} executor
|
|
82
|
+
${_chunk7NBM7KT7js.formatLogMessage.call(void 0, result)}`, config);
|
|
83
83
|
console.error(result);
|
|
84
84
|
throw new Error(`The ${name} executor failed to run`, {
|
|
85
85
|
cause: _optionalChain([result, 'optionalAccess', _16 => _16.error])
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
88
|
if (_optionalChain([executorOptions, 'optionalAccess', _17 => _17.hooks, 'optionalAccess', _18 => _18.postProcess])) {
|
|
89
|
-
|
|
89
|
+
_chunk7NBM7KT7js.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
90
90
|
await Promise.resolve(executorOptions.hooks.postProcess(config));
|
|
91
|
-
|
|
91
|
+
_chunk7NBM7KT7js.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
92
92
|
}
|
|
93
|
-
|
|
93
|
+
_chunk7NBM7KT7js.writeSuccess.call(void 0, `Completed running the ${name} task executor!
|
|
94
94
|
`, config);
|
|
95
95
|
return {
|
|
96
96
|
success: true
|
|
97
97
|
};
|
|
98
98
|
} catch (error) {
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
_chunk7NBM7KT7js.writeFatal.call(void 0, "A fatal error occurred while running the executor - the process was forced to terminate", config);
|
|
100
|
+
_chunk7NBM7KT7js.writeError.call(void 0, `An exception was thrown in the executor's process
|
|
101
101
|
- Details: ${error.message}
|
|
102
102
|
- Stacktrace: ${error.stack}`, config);
|
|
103
103
|
return {
|
|
@@ -146,7 +146,7 @@ async function serveExecutor(options, context, config) {
|
|
|
146
146
|
remote: options.remote
|
|
147
147
|
});
|
|
148
148
|
} else {
|
|
149
|
-
|
|
149
|
+
_chunk7NBM7KT7js.writeWarning.call(void 0, `Chart packaged at: ${chartPath}`, config);
|
|
150
150
|
}
|
|
151
151
|
return {
|
|
152
152
|
success: true
|
|
@@ -366,7 +366,7 @@ var WorkspaceDirectoryConfigSchema = _zod2.default.object({
|
|
|
366
366
|
log: _zod2.default.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
367
367
|
build: _zod2.default.string().trim().default("dist").describe("The directory used to store the workspace's distributable files after a build (relative to the workspace root)")
|
|
368
368
|
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
369
|
-
var
|
|
369
|
+
var stormWorkspaceConfigSchema = _zod2.default.object({
|
|
370
370
|
$schema: _zod2.default.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
|
|
371
371
|
extends: ExtendsSchema.optional(),
|
|
372
372
|
name: _zod2.default.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
|
|
@@ -1243,7 +1243,7 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(vo
|
|
|
1243
1243
|
// ../config-tools/src/create-storm-config.ts
|
|
1244
1244
|
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
1245
1245
|
var _static_cache = void 0;
|
|
1246
|
-
var
|
|
1246
|
+
var createStormWorkspaceConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (extensionName, schema, workspaceRoot, skipLogs = false) => {
|
|
1247
1247
|
let result;
|
|
1248
1248
|
if (!_optionalChain([_static_cache, 'optionalAccess', _54 => _54.data]) || !_optionalChain([_static_cache, 'optionalAccess', _55 => _55.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
1249
1249
|
let _workspaceRoot = workspaceRoot;
|
|
@@ -1258,7 +1258,7 @@ var createStormConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, asy
|
|
|
1258
1258
|
logLevel: "all"
|
|
1259
1259
|
});
|
|
1260
1260
|
}
|
|
1261
|
-
result = await
|
|
1261
|
+
result = await stormWorkspaceConfigSchema.parseAsync(_defu2.default.call(void 0, configEnv, configFile, defaultConfig));
|
|
1262
1262
|
result.workspaceRoot ??= _workspaceRoot;
|
|
1263
1263
|
} else {
|
|
1264
1264
|
result = _static_cache.data;
|
|
@@ -1274,7 +1274,7 @@ var createStormConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, asy
|
|
|
1274
1274
|
data: result
|
|
1275
1275
|
};
|
|
1276
1276
|
return result;
|
|
1277
|
-
}, "
|
|
1277
|
+
}, "createStormWorkspaceConfig");
|
|
1278
1278
|
var createConfigExtension = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (extensionName, schema) => {
|
|
1279
1279
|
const extension_cache_key = {
|
|
1280
1280
|
extensionName
|
|
@@ -1289,19 +1289,19 @@ var createConfigExtension = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0,
|
|
|
1289
1289
|
_extension_cache.set(extension_cache_key, extension);
|
|
1290
1290
|
return extension;
|
|
1291
1291
|
}, "createConfigExtension");
|
|
1292
|
-
var
|
|
1293
|
-
const config = await
|
|
1292
|
+
var loadStormWorkspaceConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (workspaceRoot, skipLogs = false) => {
|
|
1293
|
+
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
1294
1294
|
setConfigEnv(config);
|
|
1295
1295
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
1296
1296
|
writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
|
|
1297
1297
|
${formatLogMessage(config)}`, config);
|
|
1298
1298
|
}
|
|
1299
1299
|
return config;
|
|
1300
|
-
}, "
|
|
1300
|
+
}, "loadStormWorkspaceConfig");
|
|
1301
1301
|
|
|
1302
1302
|
// ../config-tools/src/get-config.ts
|
|
1303
1303
|
var getConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (workspaceRoot, skipLogs = false) => {
|
|
1304
|
-
return
|
|
1304
|
+
return loadStormWorkspaceConfig(workspaceRoot, skipLogs);
|
|
1305
1305
|
}, "getConfig");
|
|
1306
1306
|
|
|
1307
1307
|
|
|
@@ -1,6 +1,6 @@
|
|
|
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
|
|
3
|
+
var _chunk7NBM7KT7js = require('./chunk-7NBM7KT7.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
@@ -32,7 +32,7 @@ var applyWorkspaceBaseTokens = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
if (result.includes("{workspaceRoot}")) {
|
|
35
|
-
result = result.replaceAll("{workspaceRoot}", _nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _2 => _2.config, 'optionalAccess', _3 => _3.workspaceRoot]))), () => (
|
|
35
|
+
result = result.replaceAll("{workspaceRoot}", _nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _2 => _2.config, 'optionalAccess', _3 => _3.workspaceRoot]))), () => ( _chunk7NBM7KT7js.findWorkspaceRoot.call(void 0, ))));
|
|
36
36
|
}
|
|
37
37
|
return result;
|
|
38
38
|
}, "applyWorkspaceBaseTokens");
|
|
@@ -1,9 +1,9 @@
|
|
|
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
|
|
3
|
+
var _chunkYYSIGZVOjs = require('./chunk-YYSIGZVO.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk7NBM7KT7js = require('./chunk-7NBM7KT7.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
@@ -12,7 +12,7 @@ var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
|
12
12
|
var _devkit = require('@nx/devkit');
|
|
13
13
|
var _jsyaml = require('js-yaml'); var _jsyaml2 = _interopRequireDefault(_jsyaml);
|
|
14
14
|
async function helmDependencyGeneratorFn(tree, options, config) {
|
|
15
|
-
|
|
15
|
+
_chunk7NBM7KT7js.writeDebug.call(void 0, "\u{1F4DD} Preparing to add Helm Dependency", config);
|
|
16
16
|
const project = _devkit.readProjectConfiguration.call(void 0, tree, options.project);
|
|
17
17
|
if (!_optionalChain([project, 'access', _ => _.targets, 'optionalAccess', _2 => _2["helm-package"]])) {
|
|
18
18
|
throw new Error(`Project ${options.project} does not have a helm target. Please run the chart generator first.`);
|
|
@@ -27,7 +27,7 @@ async function helmDependencyGeneratorFn(tree, options, config) {
|
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
_chunk3GQAWCBQjs.__name.call(void 0, helmDependencyGeneratorFn, "helmDependencyGeneratorFn");
|
|
30
|
-
var generator_default =
|
|
30
|
+
var generator_default = _chunkYYSIGZVOjs.withRunGenerator.call(void 0, "Helm Dependency", helmDependencyGeneratorFn);
|
|
31
31
|
function addDependencyToConfig(project, name, url) {
|
|
32
32
|
return {
|
|
33
33
|
...project,
|
|
@@ -1,9 +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
|
|
3
|
+
var _chunkYYSIGZVOjs = require('./chunk-YYSIGZVO.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk7NBM7KT7js = require('./chunk-7NBM7KT7.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
@@ -12,7 +12,7 @@ var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
|
12
12
|
var _devkit = require('@nx/devkit');
|
|
13
13
|
var _path = require('path');
|
|
14
14
|
async function helmChartGeneratorFn(tree, options, config) {
|
|
15
|
-
|
|
15
|
+
_chunk7NBM7KT7js.writeDebug.call(void 0, "\u{1F4DD} Preparing to write Helm Chart", config);
|
|
16
16
|
const project = _devkit.readProjectConfiguration.call(void 0, tree, options.project);
|
|
17
17
|
if (_optionalChain([project, 'access', _ => _.targets, 'optionalAccess', _2 => _2["helm-package"]])) {
|
|
18
18
|
throw new Error(`Project ${options.project} already has a helm target. Please remove it before running this command.`);
|
|
@@ -49,7 +49,7 @@ async function helmChartGeneratorFn(tree, options, config) {
|
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
51
|
_chunk3GQAWCBQjs.__name.call(void 0, helmChartGeneratorFn, "helmChartGeneratorFn");
|
|
52
|
-
var generator_default =
|
|
52
|
+
var generator_default = _chunkYYSIGZVOjs.withRunGenerator.call(void 0, "Helm Chart", helmChartGeneratorFn);
|
|
53
53
|
|
|
54
54
|
|
|
55
55
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
applyWorkspaceBaseTokens,
|
|
3
3
|
applyWorkspaceTokens
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-AOIBIGXI.mjs";
|
|
5
5
|
import {
|
|
6
6
|
findWorkspaceRoot,
|
|
7
7
|
getConfig,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
writeInfo,
|
|
13
13
|
writeSuccess,
|
|
14
14
|
writeTrace
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-YKCY2BFI.mjs";
|
|
16
16
|
import {
|
|
17
17
|
__name
|
|
18
18
|
} from "./chunk-2BPV2XV2.mjs";
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
var _chunkIOT45LXVjs = require('./chunk-IOT45LXV.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkA2GC2ZJ6js = require('./chunk-A2GC2ZJ6.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunk7NBM7KT7js = require('./chunk-7NBM7KT7.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
@@ -59,7 +59,7 @@ var applyWorkspaceExecutorTokens = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(
|
|
|
59
59
|
result = result.replaceAll("{sourceRoot}", sourceRoot);
|
|
60
60
|
}
|
|
61
61
|
if (result.includes("{workspaceRoot}")) {
|
|
62
|
-
result = result.replaceAll("{workspaceRoot}", _nullishCoalesce(tokenizerOptions.workspaceRoot, () => (
|
|
62
|
+
result = result.replaceAll("{workspaceRoot}", _nullishCoalesce(tokenizerOptions.workspaceRoot, () => ( _chunk7NBM7KT7js.findWorkspaceRoot.call(void 0, ))));
|
|
63
63
|
}
|
|
64
64
|
return result;
|
|
65
65
|
}, "applyWorkspaceExecutorTokens");
|
|
@@ -72,8 +72,8 @@ async function* publishExecutor(options, context) {
|
|
|
72
72
|
throw new Error("The executor requires a projectName.");
|
|
73
73
|
}
|
|
74
74
|
console.info(`\u{1F680} Running Storm Container Registry Publish executor on the ${context.projectName} crate`);
|
|
75
|
-
const workspaceRoot =
|
|
76
|
-
const config = await
|
|
75
|
+
const workspaceRoot = _chunk7NBM7KT7js.findWorkspaceRoot.call(void 0, );
|
|
76
|
+
const config = await _chunk7NBM7KT7js.getConfig.call(void 0, workspaceRoot);
|
|
77
77
|
const projectConfig = _optionalChain([context, 'access', _2 => _2.projectsConfigurations, 'optionalAccess', _3 => _3.projects, 'access', _4 => _4[context.projectName]]);
|
|
78
78
|
if (!projectConfig) {
|
|
79
79
|
throw new Error(`The executor requires a valid projectsConfiguration - No configuration found for project ${context.projectName}`);
|
|
@@ -82,7 +82,7 @@ async function* publishExecutor(options, context) {
|
|
|
82
82
|
const sourceRoot = _nullishCoalesce(_optionalChain([projectConfig, 'optionalAccess', _6 => _6.sourceRoot]), () => ( workspaceRoot));
|
|
83
83
|
const projectName = _nullishCoalesce(_optionalChain([projectConfig, 'optionalAccess', _7 => _7.name]), () => ( context.projectName));
|
|
84
84
|
config.workspaceRoot = workspaceRoot;
|
|
85
|
-
const tokenized = await
|
|
85
|
+
const tokenized = await _chunkA2GC2ZJ6js.applyWorkspaceTokens.call(void 0, options, {
|
|
86
86
|
config,
|
|
87
87
|
workspaceRoot,
|
|
88
88
|
projectRoot,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
applyWorkspaceProjectTokens,
|
|
3
3
|
applyWorkspaceTokens
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-AOIBIGXI.mjs";
|
|
5
5
|
import {
|
|
6
6
|
findWorkspaceRoot,
|
|
7
7
|
formatLogMessage,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
writeSuccess,
|
|
15
15
|
writeTrace,
|
|
16
16
|
writeWarning
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-YKCY2BFI.mjs";
|
|
18
18
|
import {
|
|
19
19
|
createHelmClient
|
|
20
20
|
} from "./chunk-4LVLYUQO.mjs";
|
|
@@ -366,7 +366,7 @@ var WorkspaceDirectoryConfigSchema = z.object({
|
|
|
366
366
|
log: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
367
367
|
build: z.string().trim().default("dist").describe("The directory used to store the workspace's distributable files after a build (relative to the workspace root)")
|
|
368
368
|
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
369
|
-
var
|
|
369
|
+
var stormWorkspaceConfigSchema = z.object({
|
|
370
370
|
$schema: z.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
|
|
371
371
|
extends: ExtendsSchema.optional(),
|
|
372
372
|
name: z.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
|
|
@@ -1243,7 +1243,7 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
|
|
|
1243
1243
|
// ../config-tools/src/create-storm-config.ts
|
|
1244
1244
|
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
1245
1245
|
var _static_cache = void 0;
|
|
1246
|
-
var
|
|
1246
|
+
var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot, skipLogs = false) => {
|
|
1247
1247
|
let result;
|
|
1248
1248
|
if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 8e3) {
|
|
1249
1249
|
let _workspaceRoot = workspaceRoot;
|
|
@@ -1258,7 +1258,7 @@ var createStormConfig = /* @__PURE__ */ __name(async (extensionName, schema, wor
|
|
|
1258
1258
|
logLevel: "all"
|
|
1259
1259
|
});
|
|
1260
1260
|
}
|
|
1261
|
-
result = await
|
|
1261
|
+
result = await stormWorkspaceConfigSchema.parseAsync(defu2(configEnv, configFile, defaultConfig));
|
|
1262
1262
|
result.workspaceRoot ??= _workspaceRoot;
|
|
1263
1263
|
} else {
|
|
1264
1264
|
result = _static_cache.data;
|
|
@@ -1274,7 +1274,7 @@ var createStormConfig = /* @__PURE__ */ __name(async (extensionName, schema, wor
|
|
|
1274
1274
|
data: result
|
|
1275
1275
|
};
|
|
1276
1276
|
return result;
|
|
1277
|
-
}, "
|
|
1277
|
+
}, "createStormWorkspaceConfig");
|
|
1278
1278
|
var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
|
|
1279
1279
|
const extension_cache_key = {
|
|
1280
1280
|
extensionName
|
|
@@ -1289,19 +1289,19 @@ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
|
|
|
1289
1289
|
_extension_cache.set(extension_cache_key, extension);
|
|
1290
1290
|
return extension;
|
|
1291
1291
|
}, "createConfigExtension");
|
|
1292
|
-
var
|
|
1293
|
-
const config = await
|
|
1292
|
+
var loadStormWorkspaceConfig = /* @__PURE__ */ __name(async (workspaceRoot, skipLogs = false) => {
|
|
1293
|
+
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
1294
1294
|
setConfigEnv(config);
|
|
1295
1295
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
1296
1296
|
writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
|
|
1297
1297
|
${formatLogMessage(config)}`, config);
|
|
1298
1298
|
}
|
|
1299
1299
|
return config;
|
|
1300
|
-
}, "
|
|
1300
|
+
}, "loadStormWorkspaceConfig");
|
|
1301
1301
|
|
|
1302
1302
|
// ../config-tools/src/get-config.ts
|
|
1303
1303
|
var getConfig = /* @__PURE__ */ __name((workspaceRoot, skipLogs = false) => {
|
|
1304
|
-
return
|
|
1304
|
+
return loadStormWorkspaceConfig(workspaceRoot, skipLogs);
|
|
1305
1305
|
}, "getConfig");
|
|
1306
1306
|
|
|
1307
1307
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkA2GC2ZJ6js = require('./chunk-A2GC2ZJ6.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -12,7 +12,7 @@ var _chunkR64Y2LSBjs = require('./chunk-R64Y2LSB.js');
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunk7NBM7KT7js = require('./chunk-7NBM7KT7.js');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
@@ -21,34 +21,34 @@ var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
|
21
21
|
var withRunGenerator = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (name, generatorFn, generatorOptions = {
|
|
22
22
|
skipReadingConfig: false
|
|
23
23
|
}) => async (tree, _options) => {
|
|
24
|
-
const stopwatch =
|
|
24
|
+
const stopwatch = _chunk7NBM7KT7js.getStopwatch.call(void 0, name);
|
|
25
25
|
let options = _options;
|
|
26
26
|
let config;
|
|
27
27
|
try {
|
|
28
|
-
|
|
28
|
+
_chunk7NBM7KT7js.writeInfo.call(void 0, `\u26A1 Running the ${name} generator...
|
|
29
29
|
|
|
30
30
|
`, config);
|
|
31
|
-
const workspaceRoot =
|
|
31
|
+
const workspaceRoot = _chunk7NBM7KT7js.findWorkspaceRoot.call(void 0, );
|
|
32
32
|
if (!generatorOptions.skipReadingConfig) {
|
|
33
|
-
|
|
33
|
+
_chunk7NBM7KT7js.writeDebug.call(void 0, `Loading the Storm Config from environment variables and storm.config.js file...
|
|
34
34
|
- workspaceRoot: ${workspaceRoot}`, config);
|
|
35
|
-
config = await
|
|
35
|
+
config = await _chunk7NBM7KT7js.getConfig.call(void 0, workspaceRoot);
|
|
36
36
|
}
|
|
37
37
|
if (_optionalChain([generatorOptions, 'optionalAccess', _ => _.hooks, 'optionalAccess', _2 => _2.applyDefaultOptions])) {
|
|
38
|
-
|
|
38
|
+
_chunk7NBM7KT7js.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
39
39
|
options = await Promise.resolve(generatorOptions.hooks.applyDefaultOptions(options, config));
|
|
40
|
-
|
|
40
|
+
_chunk7NBM7KT7js.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
41
41
|
}
|
|
42
|
-
|
|
42
|
+
_chunk7NBM7KT7js.writeTrace.call(void 0, `Generator schema options \u2699\uFE0F
|
|
43
43
|
${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`, config);
|
|
44
|
-
const tokenized = await
|
|
44
|
+
const tokenized = await _chunkA2GC2ZJ6js.applyWorkspaceTokens.call(void 0, options, {
|
|
45
45
|
workspaceRoot: tree.root,
|
|
46
46
|
config
|
|
47
|
-
},
|
|
47
|
+
}, _chunkA2GC2ZJ6js.applyWorkspaceBaseTokens);
|
|
48
48
|
if (_optionalChain([generatorOptions, 'optionalAccess', _3 => _3.hooks, 'optionalAccess', _4 => _4.preProcess])) {
|
|
49
|
-
|
|
49
|
+
_chunk7NBM7KT7js.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
50
50
|
await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
|
|
51
|
-
|
|
51
|
+
_chunk7NBM7KT7js.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
52
52
|
}
|
|
53
53
|
const result = await Promise.resolve(generatorFn(tree, tokenized, config));
|
|
54
54
|
if (result) {
|
|
@@ -61,18 +61,18 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
if (_optionalChain([generatorOptions, 'optionalAccess', _14 => _14.hooks, 'optionalAccess', _15 => _15.postProcess])) {
|
|
64
|
-
|
|
64
|
+
_chunk7NBM7KT7js.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
65
65
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
66
|
-
|
|
66
|
+
_chunk7NBM7KT7js.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
67
67
|
}
|
|
68
68
|
return () => {
|
|
69
|
-
|
|
69
|
+
_chunk7NBM7KT7js.writeSuccess.call(void 0, `Completed running the ${name} generator!
|
|
70
70
|
`, config);
|
|
71
71
|
};
|
|
72
72
|
} catch (error) {
|
|
73
73
|
return () => {
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
_chunk7NBM7KT7js.writeFatal.call(void 0, "A fatal error occurred while running the generator - the process was forced to terminate", config);
|
|
75
|
+
_chunk7NBM7KT7js.writeError.call(void 0, `An exception was thrown in the generator's process
|
|
76
76
|
- Details: ${error.message}
|
|
77
77
|
- Stacktrace: ${error.stack}`, config);
|
|
78
78
|
};
|