@storm-software/k8s-tools 0.23.2 → 0.23.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/dist/{chunk-7SAHBYCR.js → chunk-2KQ424CX.js} +2 -2
- package/dist/{chunk-O47HD2XS.js → chunk-4DFXY52M.js} +25 -25
- package/dist/{chunk-F26OPCDG.mjs → chunk-6YMDSAA2.mjs} +1 -1
- package/dist/{chunk-65PPRXAW.mjs → chunk-A7MW7UFA.mjs} +4 -4
- package/dist/{chunk-4QH2MTXK.js → chunk-CBICNJ6E.js} +111 -58
- package/dist/{chunk-OABQKZJH.js → chunk-CYX2EGNR.js} +4 -4
- package/dist/{chunk-6U6BC45C.js → chunk-HOFDLRYP.js} +4 -4
- package/dist/{chunk-DGFLUWWO.mjs → chunk-LYAWWCAB.mjs} +3 -3
- package/dist/{chunk-ILJQ7PUY.js → chunk-PHZZBOSZ.js} +3 -3
- package/dist/{chunk-DQV7NKM7.mjs → chunk-QHVQC4QN.mjs} +2 -2
- package/dist/{chunk-WWDN4BEK.mjs → chunk-QPQOI6C5.mjs} +4 -4
- package/dist/{chunk-EW7TITVO.mjs → chunk-ROJAE6RK.mjs} +103 -50
- package/dist/{chunk-IBVTMWHS.mjs → chunk-TDTK6IFT.mjs} +4 -4
- package/dist/{chunk-6C5CWDYY.mjs → chunk-TSVC2RVE.mjs} +2 -2
- package/dist/{chunk-SXNPLQHC.js → chunk-UAYQFQHK.js} +6 -6
- package/dist/{chunk-6BXA3PGH.js → chunk-WEKPYGWO.js} +19 -19
- package/dist/{executor-DY-z8MOl.d.mts → executor-D71n4jMa.d.mts} +1 -1
- package/dist/{executor-Dr6UXfvX.d.ts → executor-MTqWZB_j.d.ts} +1 -1
- 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-B5bCfIUV.d.ts → generator-CIKNY8lm.d.ts} +1 -1
- package/dist/{generator-Cad7bXVB.d.mts → generator-DwMlsudq.d.mts} +1 -1
- package/dist/{generator-D7M45zOU.d.ts → generator-p_07U7ir.d.ts} +1 -1
- package/dist/{generator-BIe65kKR.d.mts → generator-uvcWUyND.d.mts} +1 -1
- 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 +1 -1
- package/dist/src/executors/container-publish/executor.d.ts +1 -1
- 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-CIJRaFHD.d.mts → types-BQ21E8Xn.d.mts} +3 -3
- package/dist/{types-CIJRaFHD.d.ts → types-BQ21E8Xn.d.ts} +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## 0.23.4 (2025-01-23)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
- **monorepo:** Resolve issue with internal package referencing ([cdc11477](https://github.com/storm-software/storm-ops/commit/cdc11477))
|
|
6
|
+
|
|
7
|
+
## 0.23.3 (2025-01-22)
|
|
8
|
+
|
|
9
|
+
### Miscellaneous
|
|
10
|
+
|
|
11
|
+
- **monorepo:** Update the workspace's `storm.json` config to use the new preset repository ([95067c70](https://github.com/storm-software/storm-ops/commit/95067c70))
|
|
12
|
+
|
|
1
13
|
## 0.23.2 (2025-01-22)
|
|
2
14
|
|
|
3
15
|
### Bug Fixes
|
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 -->
|
|
@@ -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 _chunkCBICNJ6Ejs = require('./chunk-CBICNJ6E.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]))), () => ( _chunkCBICNJ6Ejs.findWorkspaceRoot.call(void 0, ))));
|
|
36
36
|
}
|
|
37
37
|
return result;
|
|
38
38
|
}, "applyWorkspaceBaseTokens");
|
|
@@ -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 _chunk2KQ424CXjs = require('./chunk-2KQ424CX.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -14,7 +14,7 @@ var _chunk7SAHBYCRjs = require('./chunk-7SAHBYCR.js');
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkCBICNJ6Ejs = require('./chunk-CBICNJ6E.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
var _chunk2GAU2GHGjs = require('./chunk-2GAU2GHG.js');
|
|
@@ -25,52 +25,52 @@ 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 = _chunkCBICNJ6Ejs.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 = _chunkCBICNJ6Ejs.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
|
+
_chunkCBICNJ6Ejs.writeInfo.call(void 0, `
|
|
41
41
|
\u26A1 Running the ${name} executor for ${projectName}
|
|
42
42
|
`, config);
|
|
43
43
|
if (!executorOptions.skipReadingConfig) {
|
|
44
|
-
|
|
44
|
+
_chunkCBICNJ6Ejs.writeTrace.call(void 0, `Loading the Storm Config from environment variables and storm.config.js file...
|
|
45
45
|
- workspaceRoot: ${workspaceRoot}
|
|
46
46
|
- projectRoot: ${projectRoot}
|
|
47
47
|
- sourceRoot: ${sourceRoot}
|
|
48
48
|
- projectName: ${projectName}
|
|
49
49
|
`, config);
|
|
50
|
-
config = await
|
|
50
|
+
config = await _chunkCBICNJ6Ejs.getConfig.call(void 0, workspaceRoot);
|
|
51
51
|
}
|
|
52
52
|
if (_optionalChain([executorOptions, 'optionalAccess', _3 => _3.hooks, 'optionalAccess', _4 => _4.applyDefaultOptions])) {
|
|
53
|
-
|
|
53
|
+
_chunkCBICNJ6Ejs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
54
54
|
options = await Promise.resolve(executorOptions.hooks.applyDefaultOptions(options, config));
|
|
55
|
-
|
|
55
|
+
_chunkCBICNJ6Ejs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
56
56
|
}
|
|
57
|
-
|
|
58
|
-
${
|
|
57
|
+
_chunkCBICNJ6Ejs.writeTrace.call(void 0, `Executor schema options \u2699\uFE0F
|
|
58
|
+
${_chunkCBICNJ6Ejs.formatLogMessage.call(void 0, options)}
|
|
59
59
|
`, config);
|
|
60
|
-
const tokenized = await
|
|
60
|
+
const tokenized = await _chunk2KQ424CXjs.applyWorkspaceTokens.call(void 0, options, _defu.defu.call(void 0, {
|
|
61
61
|
workspaceRoot,
|
|
62
62
|
projectRoot,
|
|
63
63
|
sourceRoot,
|
|
64
64
|
projectName,
|
|
65
65
|
config
|
|
66
|
-
}, config, context.projectsConfigurations.projects[context.projectName]),
|
|
67
|
-
|
|
68
|
-
${
|
|
66
|
+
}, config, context.projectsConfigurations.projects[context.projectName]), _chunk2KQ424CXjs.applyWorkspaceProjectTokens);
|
|
67
|
+
_chunkCBICNJ6Ejs.writeTrace.call(void 0, `Executor schema tokenized options \u2699\uFE0F
|
|
68
|
+
${_chunkCBICNJ6Ejs.formatLogMessage.call(void 0, tokenized)}
|
|
69
69
|
`, config);
|
|
70
70
|
if (_optionalChain([executorOptions, 'optionalAccess', _5 => _5.hooks, 'optionalAccess', _6 => _6.preProcess])) {
|
|
71
|
-
|
|
71
|
+
_chunkCBICNJ6Ejs.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
72
72
|
await Promise.resolve(executorOptions.hooks.preProcess(tokenized, config));
|
|
73
|
-
|
|
73
|
+
_chunkCBICNJ6Ejs.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
74
74
|
}
|
|
75
75
|
const ret = executorFn(tokenized, context, config);
|
|
76
76
|
if (_isFunction(_optionalChain([ret, 'optionalAccess', _7 => _7.next]))) {
|
|
@@ -80,26 +80,26 @@ ${_chunk4QH2MTXKjs.formatLogMessage.call(void 0, tokenized)}
|
|
|
80
80
|
}
|
|
81
81
|
const result = await Promise.resolve(ret);
|
|
82
82
|
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")) {
|
|
83
|
-
|
|
84
|
-
${
|
|
83
|
+
_chunkCBICNJ6Ejs.writeTrace.call(void 0, `Failure determined by the ${name} executor
|
|
84
|
+
${_chunkCBICNJ6Ejs.formatLogMessage.call(void 0, result)}`, config);
|
|
85
85
|
console.error(result);
|
|
86
86
|
throw new Error(`The ${name} executor failed to run`, {
|
|
87
87
|
cause: _optionalChain([result, 'optionalAccess', _16 => _16.error])
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
90
|
if (_optionalChain([executorOptions, 'optionalAccess', _17 => _17.hooks, 'optionalAccess', _18 => _18.postProcess])) {
|
|
91
|
-
|
|
91
|
+
_chunkCBICNJ6Ejs.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
92
92
|
await Promise.resolve(executorOptions.hooks.postProcess(config));
|
|
93
|
-
|
|
93
|
+
_chunkCBICNJ6Ejs.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
94
94
|
}
|
|
95
|
-
|
|
95
|
+
_chunkCBICNJ6Ejs.writeSuccess.call(void 0, `Completed running the ${name} task executor!
|
|
96
96
|
`, config);
|
|
97
97
|
return {
|
|
98
98
|
success: true
|
|
99
99
|
};
|
|
100
100
|
} catch (error) {
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
_chunkCBICNJ6Ejs.writeFatal.call(void 0, "A fatal error occurred while running the executor - the process was forced to terminate", config);
|
|
102
|
+
_chunkCBICNJ6Ejs.writeError.call(void 0, `An exception was thrown in the executor's process
|
|
103
103
|
- Details: ${error.message}
|
|
104
104
|
- Stacktrace: ${error.stack}`, config);
|
|
105
105
|
return {
|
|
@@ -148,7 +148,7 @@ async function serveExecutor(options, context, config) {
|
|
|
148
148
|
remote: options.remote
|
|
149
149
|
});
|
|
150
150
|
} else {
|
|
151
|
-
|
|
151
|
+
_chunkCBICNJ6Ejs.writeWarning.call(void 0, `Chart packaged at: ${chartPath}`, config);
|
|
152
152
|
}
|
|
153
153
|
return {
|
|
154
154
|
success: true
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
applyWorkspaceProjectTokens,
|
|
3
3
|
applyWorkspaceTokens
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6YMDSAA2.mjs";
|
|
5
5
|
import {
|
|
6
6
|
findWorkspaceRoot,
|
|
7
7
|
formatLogMessage,
|
|
8
|
+
getConfig,
|
|
8
9
|
getStopwatch,
|
|
9
|
-
loadStormConfig,
|
|
10
10
|
writeDebug,
|
|
11
11
|
writeError,
|
|
12
12
|
writeFatal,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
writeSuccess,
|
|
15
15
|
writeTrace,
|
|
16
16
|
writeWarning
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-ROJAE6RK.mjs";
|
|
18
18
|
import {
|
|
19
19
|
createHelmClient
|
|
20
20
|
} from "./chunk-6V45YKVB.mjs";
|
|
@@ -47,7 +47,7 @@ var withRunExecutor = /* @__PURE__ */ __name((name, executorFn, executorOptions
|
|
|
47
47
|
- sourceRoot: ${sourceRoot}
|
|
48
48
|
- projectName: ${projectName}
|
|
49
49
|
`, config);
|
|
50
|
-
config = await
|
|
50
|
+
config = await getConfig(workspaceRoot);
|
|
51
51
|
}
|
|
52
52
|
if (executorOptions?.hooks?.applyDefaultOptions) {
|
|
53
53
|
writeDebug("Running the applyDefaultOptions hook...", config);
|
|
@@ -205,6 +205,8 @@ var ColorConfigMapSchema = _zod2.default.union([
|
|
|
205
205
|
}),
|
|
206
206
|
_zod2.default.record(_zod2.default.string(), ColorConfigSchema)
|
|
207
207
|
]);
|
|
208
|
+
var ExtendsItemSchema = _zod2.default.string().trim().describe("The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration.");
|
|
209
|
+
var ExtendsSchema = ExtendsItemSchema.or(_zod2.default.array(ExtendsItemSchema)).describe("The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration.");
|
|
208
210
|
var WorkspaceBotConfigSchema = _zod2.default.object({
|
|
209
211
|
name: _zod2.default.string().trim().default("Stormie-Bot").describe("The workspace bot user's name (this is the bot that will be used to perform various tasks)"),
|
|
210
212
|
email: _zod2.default.string().trim().email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
|
|
@@ -219,11 +221,11 @@ var WorkspaceDirectoryConfigSchema = _zod2.default.object({
|
|
|
219
221
|
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
220
222
|
var StormConfigSchema = _zod2.default.object({
|
|
221
223
|
$schema: _zod2.default.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
|
|
222
|
-
extends:
|
|
224
|
+
extends: ExtendsSchema.optional(),
|
|
223
225
|
name: _zod2.default.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
|
|
224
226
|
namespace: _zod2.default.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
225
227
|
organization: _zod2.default.string().trim().default("storm-software").describe("The organization of the workspace"),
|
|
226
|
-
repository: _zod2.default.string().trim().
|
|
228
|
+
repository: _zod2.default.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
227
229
|
license: _zod2.default.string().trim().default("Apache-2.0").describe("The license type of the package"),
|
|
228
230
|
homepage: _zod2.default.string().trim().url().default(STORM_DEFAULT_HOMEPAGE).describe("The homepage of the workspace"),
|
|
229
231
|
docs: _zod2.default.string().trim().url().default(STORM_DEFAULT_DOCS).describe("The base documentation site for the workspace"),
|
|
@@ -287,6 +289,7 @@ var COLOR_KEYS = [
|
|
|
287
289
|
|
|
288
290
|
// ../config-tools/src/utilities/get-default-config.ts
|
|
289
291
|
|
|
292
|
+
var _promises = require('fs/promises');
|
|
290
293
|
|
|
291
294
|
var DEFAULT_COLOR_CONFIG = {
|
|
292
295
|
"light": {
|
|
@@ -316,17 +319,15 @@ var DEFAULT_COLOR_CONFIG = {
|
|
|
316
319
|
"negative": "#dc2626"
|
|
317
320
|
}
|
|
318
321
|
};
|
|
319
|
-
var getDefaultConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (root) => {
|
|
322
|
+
var getDefaultConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (root) => {
|
|
320
323
|
let license = STORM_DEFAULT_LICENSE;
|
|
321
324
|
let homepage = STORM_DEFAULT_HOMEPAGE;
|
|
322
|
-
let name;
|
|
323
|
-
let namespace;
|
|
324
|
-
let repository;
|
|
325
|
+
let name = void 0;
|
|
326
|
+
let namespace = void 0;
|
|
327
|
+
let repository = void 0;
|
|
325
328
|
const workspaceRoot = findWorkspaceRoot(root);
|
|
326
329
|
if (_fs.existsSync.call(void 0, _path.join.call(void 0, workspaceRoot, "package.json"))) {
|
|
327
|
-
const file =
|
|
328
|
-
encoding: "utf8"
|
|
329
|
-
});
|
|
330
|
+
const file = await _promises.readFile.call(void 0, joinPaths(workspaceRoot, "package.json"), "utf8");
|
|
330
331
|
if (file) {
|
|
331
332
|
const packageJson = JSON.parse(file);
|
|
332
333
|
if (packageJson.name) {
|
|
@@ -335,8 +336,12 @@ var getDefaultConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (roo
|
|
|
335
336
|
if (packageJson.namespace) {
|
|
336
337
|
namespace = packageJson.namespace;
|
|
337
338
|
}
|
|
338
|
-
if (
|
|
339
|
-
|
|
339
|
+
if (packageJson.repository) {
|
|
340
|
+
if (typeof packageJson.repository === "string") {
|
|
341
|
+
repository = packageJson.repository;
|
|
342
|
+
} else if (packageJson.repository.url) {
|
|
343
|
+
repository = packageJson.repository.url;
|
|
344
|
+
}
|
|
340
345
|
}
|
|
341
346
|
if (packageJson.license) {
|
|
342
347
|
license = packageJson.license;
|
|
@@ -381,7 +386,7 @@ var chalkDefault = {
|
|
|
381
386
|
};
|
|
382
387
|
var getChalk = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, () => {
|
|
383
388
|
let _chalk = _chalk3.default;
|
|
384
|
-
if (!_optionalChain([_chalk, 'optionalAccess',
|
|
389
|
+
if (!_optionalChain([_chalk, 'optionalAccess', _2 => _2.hex]) || !_optionalChain([_chalk, 'optionalAccess', _3 => _3.bold, 'optionalAccess', _4 => _4.hex]) || !_optionalChain([_chalk, 'optionalAccess', _5 => _5.bgHex]) || !_optionalChain([_chalk, 'optionalAccess', _6 => _6.whiteBright])) {
|
|
385
390
|
_chalk = chalkDefault;
|
|
386
391
|
}
|
|
387
392
|
return _chalk;
|
|
@@ -473,7 +478,7 @@ var getLogLevelLabel = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (log
|
|
|
473
478
|
|
|
474
479
|
// ../config-tools/src/logger/console.ts
|
|
475
480
|
var getLogFn = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
|
|
476
|
-
const colors = !_optionalChain([config, 'access',
|
|
481
|
+
const colors = !_optionalChain([config, 'access', _7 => _7.colors, 'optionalAccess', _8 => _8.dark]) && !_optionalChain([config, 'access', _9 => _9.colors, 'optionalAccess', _10 => _10["base"]]) && !_optionalChain([config, 'access', _11 => _11.colors, 'optionalAccess', _12 => _12["base"], 'optionalAccess', _13 => _13.dark]) ? DEFAULT_COLOR_CONFIG : _optionalChain([config, 'access', _14 => _14.colors, 'optionalAccess', _15 => _15.dark]) && typeof config.colors.dark === "string" ? config.colors : _optionalChain([config, 'access', _16 => _16.colors, 'optionalAccess', _17 => _17["base"], 'optionalAccess', _18 => _18.dark]) && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : _optionalChain([config, 'access', _19 => _19.colors, 'optionalAccess', _20 => _20["base"]]) ? _optionalChain([config, 'access', _21 => _21.colors, 'optionalAccess', _22 => _22["base"]]) : DEFAULT_COLOR_CONFIG;
|
|
477
482
|
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
|
|
478
483
|
if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
|
|
479
484
|
return (_) => {
|
|
@@ -541,7 +546,6 @@ var writeInfo = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (message, c
|
|
|
541
546
|
var writeSuccess = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.SUCCESS, config)(message), "writeSuccess");
|
|
542
547
|
var writeDebug = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.DEBUG, config)(message), "writeDebug");
|
|
543
548
|
var writeTrace = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.TRACE, config)(message), "writeTrace");
|
|
544
|
-
var writeSystem = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.ALL, config)(message), "writeSystem");
|
|
545
549
|
var getStopwatch = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (name) => {
|
|
546
550
|
const start = process.hrtime();
|
|
547
551
|
return () => {
|
|
@@ -571,7 +575,7 @@ ${Object.keys(message).filter((key) => !skip.includes(key)).map((key) => ` ${pre
|
|
|
571
575
|
}, "formatLogMessage");
|
|
572
576
|
var _isFunction = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (value) => {
|
|
573
577
|
try {
|
|
574
|
-
return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess',
|
|
578
|
+
return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess', _23 => _23.constructor]) && _optionalChain([value, 'optionalAccess', _24 => _24.call]) && _optionalChain([value, 'optionalAccess', _25 => _25.apply]));
|
|
575
579
|
} catch (e) {
|
|
576
580
|
return false;
|
|
577
581
|
}
|
|
@@ -585,32 +589,32 @@ var _c12 = require('c12');
|
|
|
585
589
|
|
|
586
590
|
var getConfigFileByName = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (fileName, filePath, options = {}) => {
|
|
587
591
|
const workspacePath = filePath || findWorkspaceRoot(filePath);
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
592
|
+
const configs = await Promise.all([
|
|
593
|
+
_c12.loadConfig.call(void 0, {
|
|
594
|
+
cwd: workspacePath,
|
|
595
|
+
packageJson: true,
|
|
596
|
+
name: fileName,
|
|
597
|
+
envName: _optionalChain([fileName, 'optionalAccess', _26 => _26.toUpperCase, 'call', _27 => _27()]),
|
|
598
|
+
jitiOptions: {
|
|
599
|
+
debug: false,
|
|
600
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
601
|
+
},
|
|
602
|
+
...options
|
|
603
|
+
}),
|
|
604
|
+
_c12.loadConfig.call(void 0, {
|
|
601
605
|
cwd: workspacePath,
|
|
602
606
|
packageJson: true,
|
|
603
607
|
name: fileName,
|
|
604
|
-
envName: _optionalChain([fileName, 'optionalAccess',
|
|
608
|
+
envName: _optionalChain([fileName, 'optionalAccess', _28 => _28.toUpperCase, 'call', _29 => _29()]),
|
|
605
609
|
jitiOptions: {
|
|
606
610
|
debug: false,
|
|
607
611
|
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
608
612
|
},
|
|
609
613
|
configFile: fileName,
|
|
610
614
|
...options
|
|
611
|
-
})
|
|
612
|
-
|
|
613
|
-
return
|
|
615
|
+
})
|
|
616
|
+
]);
|
|
617
|
+
return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
|
|
614
618
|
}, "getConfigFileByName");
|
|
615
619
|
var getConfigFile = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (filePath, additionalFileNames = []) => {
|
|
616
620
|
const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
|
|
@@ -618,15 +622,15 @@ var getConfigFile = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (
|
|
|
618
622
|
let config = result.config;
|
|
619
623
|
const configFile = result.configFile;
|
|
620
624
|
if (config && configFile && Object.keys(config).length > 0) {
|
|
621
|
-
|
|
625
|
+
writeTrace(`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
|
|
622
626
|
logLevel: "all"
|
|
623
627
|
});
|
|
624
628
|
}
|
|
625
629
|
if (additionalFileNames && additionalFileNames.length > 0) {
|
|
626
630
|
const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
|
|
627
631
|
for (const result2 of results) {
|
|
628
|
-
if (_optionalChain([result2, 'optionalAccess',
|
|
629
|
-
|
|
632
|
+
if (_optionalChain([result2, 'optionalAccess', _30 => _30.config]) && _optionalChain([result2, 'optionalAccess', _31 => _31.configFile]) && Object.keys(result2.config).length > 0) {
|
|
633
|
+
writeTrace(`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
|
|
630
634
|
logLevel: "all"
|
|
631
635
|
});
|
|
632
636
|
config = _defu2.default.call(void 0, _nullishCoalesce(result2.config, () => ( {})), _nullishCoalesce(config, () => ( {})));
|
|
@@ -641,6 +645,16 @@ var getConfigFile = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (
|
|
|
641
645
|
}, "getConfigFile");
|
|
642
646
|
|
|
643
647
|
// ../config-tools/src/env/get-env.ts
|
|
648
|
+
var getExtensionEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (extensionName) => {
|
|
649
|
+
const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
|
|
650
|
+
return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
|
|
651
|
+
const name = key.replace(prefix, "").split("_").map((i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : "").join("");
|
|
652
|
+
if (name) {
|
|
653
|
+
ret[name] = process.env[key];
|
|
654
|
+
}
|
|
655
|
+
return ret;
|
|
656
|
+
}, {});
|
|
657
|
+
}, "getExtensionEnv");
|
|
644
658
|
var getConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, () => {
|
|
645
659
|
const prefix = "STORM_";
|
|
646
660
|
let config = {
|
|
@@ -781,13 +795,13 @@ var getBaseThemeColorConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(vo
|
|
|
781
795
|
var setExtensionEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (extensionName, extension) => {
|
|
782
796
|
for (const key of Object.keys(_nullishCoalesce(extension, () => ( {})))) {
|
|
783
797
|
if (extension[key]) {
|
|
784
|
-
const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess',
|
|
798
|
+
const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess', _32 => _32.replace, 'call', _33 => _33(/([A-Z])+/g, (input) => input ? _optionalChain([input, 'access', _34 => _34[0], 'optionalAccess', _35 => _35.toUpperCase, 'call', _36 => _36()]) + input.slice(1) : ""), 'access', _37 => _37.split, 'call', _38 => _38(/(?=[A-Z])|[.\-\s_]/), 'access', _39 => _39.map, 'call', _40 => _40((x) => x.toLowerCase())]), () => ( []));
|
|
785
799
|
let extensionKey;
|
|
786
800
|
if (result.length === 0) {
|
|
787
801
|
return;
|
|
788
802
|
}
|
|
789
803
|
if (result.length === 1) {
|
|
790
|
-
extensionKey = _nullishCoalesce(_optionalChain([result, 'access',
|
|
804
|
+
extensionKey = _nullishCoalesce(_optionalChain([result, 'access', _41 => _41[0], 'optionalAccess', _42 => _42.toUpperCase, 'call', _43 => _43()]), () => ( ""));
|
|
791
805
|
} else {
|
|
792
806
|
extensionKey = result.reduce((ret, part) => {
|
|
793
807
|
return `${ret}_${part.toLowerCase()}`;
|
|
@@ -800,7 +814,7 @@ var setExtensionEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (exte
|
|
|
800
814
|
var setConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (config) => {
|
|
801
815
|
const prefix = "STORM_";
|
|
802
816
|
if (config.extends) {
|
|
803
|
-
process.env[`${prefix}EXTENDS`] = config.extends;
|
|
817
|
+
process.env[`${prefix}EXTENDS`] = Array.isArray(config.extends) ? JSON.stringify(config.extends) : config.extends;
|
|
804
818
|
}
|
|
805
819
|
if (config.name) {
|
|
806
820
|
process.env[`${prefix}NAME`] = config.name;
|
|
@@ -884,7 +898,7 @@ var setConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (config)
|
|
|
884
898
|
process.env.NODE_ENV = config.env;
|
|
885
899
|
process.env.ENVIRONMENT = config.env;
|
|
886
900
|
}
|
|
887
|
-
if (_optionalChain([config, 'access',
|
|
901
|
+
if (_optionalChain([config, 'access', _44 => _44.colors, 'optionalAccess', _45 => _45.base, 'optionalAccess', _46 => _46.light]) || _optionalChain([config, 'access', _47 => _47.colors, 'optionalAccess', _48 => _48.base, 'optionalAccess', _49 => _49.dark])) {
|
|
888
902
|
for (const key of Object.keys(config.colors)) {
|
|
889
903
|
setThemeColorConfigEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
|
|
890
904
|
}
|
|
@@ -932,7 +946,7 @@ var setConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (config)
|
|
|
932
946
|
}
|
|
933
947
|
}, "setConfigEnv");
|
|
934
948
|
var setThemeColorConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (prefix, config) => {
|
|
935
|
-
return _optionalChain([config, 'optionalAccess',
|
|
949
|
+
return _optionalChain([config, 'optionalAccess', _50 => _50.light, 'optionalAccess', _51 => _51.brand]) || _optionalChain([config, 'optionalAccess', _52 => _52.dark, 'optionalAccess', _53 => _53.brand]) ? setMultiThemeColorConfigEnv(prefix, config) : setSingleThemeColorConfigEnv(prefix, config);
|
|
936
950
|
}, "setThemeColorConfigEnv");
|
|
937
951
|
var setSingleThemeColorConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (prefix, config) => {
|
|
938
952
|
if (config.dark) {
|
|
@@ -1030,30 +1044,69 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(vo
|
|
|
1030
1044
|
}, "setBaseThemeColorConfigEnv");
|
|
1031
1045
|
|
|
1032
1046
|
// ../config-tools/src/create-storm-config.ts
|
|
1047
|
+
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
1033
1048
|
var _static_cache = void 0;
|
|
1034
|
-
var
|
|
1035
|
-
let
|
|
1036
|
-
if (_optionalChain([_static_cache, 'optionalAccess',
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
}
|
|
1049
|
+
var createStormConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (extensionName, schema, workspaceRoot, skipLogs = false) => {
|
|
1050
|
+
let result;
|
|
1051
|
+
if (!_optionalChain([_static_cache, 'optionalAccess', _54 => _54.data]) || !_optionalChain([_static_cache, 'optionalAccess', _55 => _55.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
1052
|
+
let _workspaceRoot = workspaceRoot;
|
|
1053
|
+
if (!_workspaceRoot) {
|
|
1054
|
+
_workspaceRoot = findWorkspaceRoot();
|
|
1055
|
+
}
|
|
1056
|
+
const configEnv = getConfigEnv();
|
|
1057
|
+
const defaultConfig = await getDefaultConfig(_workspaceRoot);
|
|
1058
|
+
const configFile = await getConfigFile(_workspaceRoot);
|
|
1059
|
+
if (!configFile && !skipLogs) {
|
|
1060
|
+
writeWarning("No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.json` file to the root of your workspace if it is not.\n", {
|
|
1061
|
+
logLevel: "all"
|
|
1062
|
+
});
|
|
1063
|
+
}
|
|
1064
|
+
result = await StormConfigSchema.parseAsync(_defu2.default.call(void 0, configEnv, configFile, defaultConfig));
|
|
1065
|
+
result.workspaceRoot ??= _workspaceRoot;
|
|
1066
|
+
} else {
|
|
1067
|
+
result = _static_cache.data;
|
|
1049
1068
|
}
|
|
1050
|
-
|
|
1069
|
+
if (schema && extensionName) {
|
|
1070
|
+
result.extensions = {
|
|
1071
|
+
...result.extensions,
|
|
1072
|
+
[extensionName]: createConfigExtension(extensionName, schema)
|
|
1073
|
+
};
|
|
1074
|
+
}
|
|
1075
|
+
_static_cache = {
|
|
1076
|
+
timestamp: Date.now(),
|
|
1077
|
+
data: result
|
|
1078
|
+
};
|
|
1079
|
+
return result;
|
|
1080
|
+
}, "createStormConfig");
|
|
1081
|
+
var createConfigExtension = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (extensionName, schema) => {
|
|
1082
|
+
const extension_cache_key = {
|
|
1083
|
+
extensionName
|
|
1084
|
+
};
|
|
1085
|
+
if (_extension_cache.has(extension_cache_key)) {
|
|
1086
|
+
return _extension_cache.get(extension_cache_key);
|
|
1087
|
+
}
|
|
1088
|
+
let extension = getExtensionEnv(extensionName);
|
|
1089
|
+
if (schema) {
|
|
1090
|
+
extension = schema.parse(extension);
|
|
1091
|
+
}
|
|
1092
|
+
_extension_cache.set(extension_cache_key, extension);
|
|
1093
|
+
return extension;
|
|
1094
|
+
}, "createConfigExtension");
|
|
1095
|
+
var loadStormConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (workspaceRoot, skipLogs = false) => {
|
|
1096
|
+
const config = await createStormConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
1051
1097
|
setConfigEnv(config);
|
|
1052
|
-
|
|
1098
|
+
if (!skipLogs) {
|
|
1099
|
+
writeTrace(`\u2699\uFE0F Using Storm configuration:
|
|
1053
1100
|
${formatLogMessage(config)}`, config);
|
|
1101
|
+
}
|
|
1054
1102
|
return config;
|
|
1055
1103
|
}, "loadStormConfig");
|
|
1056
1104
|
|
|
1105
|
+
// ../config-tools/src/get-config.ts
|
|
1106
|
+
var getConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (workspaceRoot, skipLogs = false) => {
|
|
1107
|
+
return loadStormConfig(workspaceRoot, skipLogs);
|
|
1108
|
+
}, "getConfig");
|
|
1109
|
+
|
|
1057
1110
|
|
|
1058
1111
|
|
|
1059
1112
|
|
|
@@ -1066,4 +1119,4 @@ ${formatLogMessage(config)}`, config);
|
|
|
1066
1119
|
|
|
1067
1120
|
|
|
1068
1121
|
|
|
1069
|
-
exports.findWorkspaceRoot = findWorkspaceRoot; exports.writeFatal = writeFatal; exports.writeError = writeError; exports.writeWarning = writeWarning; exports.writeInfo = writeInfo; exports.writeSuccess = writeSuccess; exports.writeDebug = writeDebug; exports.writeTrace = writeTrace; exports.getStopwatch = getStopwatch; exports.formatLogMessage = formatLogMessage; exports.
|
|
1122
|
+
exports.findWorkspaceRoot = findWorkspaceRoot; exports.writeFatal = writeFatal; exports.writeError = writeError; exports.writeWarning = writeWarning; exports.writeInfo = writeInfo; exports.writeSuccess = writeSuccess; exports.writeDebug = writeDebug; exports.writeTrace = writeTrace; exports.getStopwatch = getStopwatch; exports.formatLogMessage = formatLogMessage; exports.getConfig = getConfig;
|
|
@@ -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 _chunkWEKPYGWOjs = require('./chunk-WEKPYGWO.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkCBICNJ6Ejs = require('./chunk-CBICNJ6E.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
|
+
_chunkCBICNJ6Ejs.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 = _chunkWEKPYGWOjs.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 _chunkWEKPYGWOjs = require('./chunk-WEKPYGWO.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkCBICNJ6Ejs = require('./chunk-CBICNJ6E.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
|
+
_chunkCBICNJ6Ejs.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 = _chunkWEKPYGWOjs.withRunGenerator.call(void 0, "Helm Chart", helmChartGeneratorFn);
|
|
53
53
|
|
|
54
54
|
|
|
55
55
|
|