@storm-software/k8s-tools 0.42.88 → 0.42.90
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 +18 -0
- package/README.md +1 -1
- package/dist/executors.js +5 -5
- package/dist/executors.mjs +4 -4
- package/dist/index.js +14 -14
- package/dist/index.mjs +16 -16
- package/dist/src/executors/helm-package/executor.js +4 -4
- package/dist/src/executors/helm-package/executor.mjs +3 -3
- package/dist/src/utils/client.js +3 -3
- package/dist/src/utils/client.mjs +2 -2
- package/dist/src/utils/index.js +3 -3
- package/dist/src/utils/index.mjs +2 -2
- package/package.json +5 -5
- package/dist/chunk-FHZPLUCG.mjs +0 -202
- package/dist/chunk-HFH5PRDJ.mjs +0 -136
- package/dist/chunk-M5IOCZK5.js +0 -136
- package/dist/chunk-N6F63TBC.js +0 -202
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Storm Ops - K8s Tools
|
|
4
4
|
|
|
5
|
+
## [0.42.89](https://github.com/storm-software/storm-ops/releases/tag/k8s-tools%400.42.89) (02/18/2026)
|
|
6
|
+
|
|
7
|
+
### Miscellaneous
|
|
8
|
+
|
|
9
|
+
- **monorepo:** Regenerate `README.md` markdown files ([b29a804ae](https://github.com/storm-software/storm-ops/commit/b29a804ae))
|
|
10
|
+
|
|
11
|
+
### Updated Dependencies
|
|
12
|
+
|
|
13
|
+
- Updated **workspace-tools** to **v1.294.33**
|
|
14
|
+
- Updated **config-tools** to **v1.189.1**
|
|
15
|
+
- Updated **config** to **v1.135.2**
|
|
16
|
+
|
|
17
|
+
## [0.42.88](https://github.com/storm-software/storm-ops/releases/tag/k8s-tools%400.42.88) (01/28/2026)
|
|
18
|
+
|
|
19
|
+
### Updated Dependencies
|
|
20
|
+
|
|
21
|
+
- Updated **workspace-tools** to **v1.294.32**
|
|
22
|
+
|
|
5
23
|
## [0.42.87](https://github.com/storm-software/storm-ops/releases/tag/k8s-tools%400.42.87) (01/28/2026)
|
|
6
24
|
|
|
7
25
|
### Updated Dependencies
|
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
27
27
|
|
|
28
28
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
29
29
|
|
|
30
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
31
31
|
|
|
32
32
|
<!-- prettier-ignore-start -->
|
|
33
33
|
<!-- markdownlint-disable -->
|
package/dist/executors.js
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
var _chunkXRJWCLHZjs = require('./chunk-XRJWCLHZ.js');
|
|
5
|
-
require('./chunk-KBSSJUPW.js');
|
|
6
5
|
|
|
7
6
|
|
|
8
|
-
var
|
|
7
|
+
var _chunkR2KZRP7Bjs = require('./chunk-R2KZRP7B.js');
|
|
8
|
+
require('./chunk-KBSSJUPW.js');
|
|
9
9
|
require('./chunk-5KOGMQTW.js');
|
|
10
10
|
require('./chunk-PJSA4K3H.js');
|
|
11
|
-
require('./chunk-
|
|
12
|
-
require('./chunk-XKOZIQT3.js');
|
|
11
|
+
require('./chunk-4AADQIGW.js');
|
|
13
12
|
require('./chunk-JSFRUBG5.js');
|
|
13
|
+
require('./chunk-XKOZIQT3.js');
|
|
14
14
|
require('./chunk-RECJ3G6F.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
exports.getRegistryVersion = _chunkXRJWCLHZjs.getRegistryVersion; exports.serveExecutor =
|
|
18
|
+
exports.getRegistryVersion = _chunkXRJWCLHZjs.getRegistryVersion; exports.serveExecutor = _chunkR2KZRP7Bjs.serveExecutor;
|
package/dist/executors.mjs
CHANGED
|
@@ -2,15 +2,15 @@ import "./chunk-YSCEY447.mjs";
|
|
|
2
2
|
import {
|
|
3
3
|
getRegistryVersion
|
|
4
4
|
} from "./chunk-U6GM7OXA.mjs";
|
|
5
|
-
import "./chunk-WS2G4IWW.mjs";
|
|
6
5
|
import {
|
|
7
6
|
serveExecutor
|
|
8
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-NAS5PXQT.mjs";
|
|
8
|
+
import "./chunk-WS2G4IWW.mjs";
|
|
9
9
|
import "./chunk-C4ZGS3L3.mjs";
|
|
10
10
|
import "./chunk-TOP3LZ4E.mjs";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-HGXQ6SSU.mjs";
|
|
11
|
+
import "./chunk-HK6QKQTS.mjs";
|
|
13
12
|
import "./chunk-YXXZO2AJ.mjs";
|
|
13
|
+
import "./chunk-HGXQ6SSU.mjs";
|
|
14
14
|
import "./chunk-KBO64DJX.mjs";
|
|
15
15
|
export {
|
|
16
16
|
getRegistryVersion,
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkHDXZYG3Njs = require('./chunk-HDXZYG3N.js');
|
|
6
|
+
require('./chunk-XO66D74Z.js');
|
|
6
7
|
|
|
7
8
|
|
|
9
|
+
var _chunkXRJWCLHZjs = require('./chunk-XRJWCLHZ.js');
|
|
8
10
|
|
|
9
11
|
|
|
10
|
-
var
|
|
11
|
-
require('./chunk-
|
|
12
|
+
var _chunkR2KZRP7Bjs = require('./chunk-R2KZRP7B.js');
|
|
13
|
+
require('./chunk-KBSSJUPW.js');
|
|
12
14
|
require('./chunk-DHBG5ASJ.js');
|
|
13
15
|
|
|
14
16
|
|
|
@@ -17,25 +19,23 @@ var _chunkIBAKQ6JTjs = require('./chunk-IBAKQ6JT.js');
|
|
|
17
19
|
|
|
18
20
|
var _chunkBAP6PTS2js = require('./chunk-BAP6PTS2.js');
|
|
19
21
|
require('./chunk-Q7ATSVB3.js');
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
var _chunkXRJWCLHZjs = require('./chunk-XRJWCLHZ.js');
|
|
23
|
-
require('./chunk-KBSSJUPW.js');
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
var _chunkN6F63TBCjs = require('./chunk-N6F63TBC.js');
|
|
27
22
|
require('./chunk-5KOGMQTW.js');
|
|
28
23
|
require('./chunk-PJSA4K3H.js');
|
|
24
|
+
require('./chunk-U76ID4TS.js');
|
|
29
25
|
|
|
30
26
|
|
|
31
27
|
|
|
32
|
-
var
|
|
28
|
+
var _chunk7QVOU2PTjs = require('./chunk-7QVOU2PT.js');
|
|
33
29
|
|
|
34
30
|
|
|
35
|
-
|
|
31
|
+
|
|
32
|
+
var _chunk4AADQIGWjs = require('./chunk-4AADQIGW.js');
|
|
36
33
|
|
|
37
34
|
|
|
38
35
|
var _chunkJSFRUBG5js = require('./chunk-JSFRUBG5.js');
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
var _chunkXKOZIQT3js = require('./chunk-XKOZIQT3.js');
|
|
39
39
|
require('./chunk-RECJ3G6F.js');
|
|
40
40
|
|
|
41
41
|
|
|
@@ -51,4 +51,4 @@ require('./chunk-RECJ3G6F.js');
|
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
exports.AbstractHelmClient = _chunkJSFRUBG5js.AbstractHelmClient; exports.HelmClient =
|
|
54
|
+
exports.AbstractHelmClient = _chunkJSFRUBG5js.AbstractHelmClient; exports.HelmClient = _chunk4AADQIGWjs.HelmClient; exports.addToPrettierIgnore = _chunk7QVOU2PTjs.addToPrettierIgnore; exports.createHelmClient = _chunk4AADQIGWjs.createHelmClient; exports.createNodesV2 = _chunkHDXZYG3Njs.createNodesV2; exports.description = _chunkHDXZYG3Njs.description; exports.ensureInitialized = _chunkXKOZIQT3js.ensureInitialized; exports.getRegistryVersion = _chunkXRJWCLHZjs.getRegistryVersion; exports.helmChartGeneratorFn = _chunkIBAKQ6JTjs.helmChartGeneratorFn; exports.helmDependencyGeneratorFn = _chunkBAP6PTS2js.helmDependencyGeneratorFn; exports.name = _chunkHDXZYG3Njs.name; exports.resolveUserExistingPrettierConfig = _chunk7QVOU2PTjs.resolveUserExistingPrettierConfig; exports.serveExecutor = _chunkR2KZRP7Bjs.serveExecutor;
|
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import "./chunk-WWU25UQ4.mjs";
|
|
2
|
-
import {
|
|
3
|
-
addToPrettierIgnore,
|
|
4
|
-
resolveUserExistingPrettierConfig
|
|
5
|
-
} from "./chunk-REHYFBT4.mjs";
|
|
6
1
|
import {
|
|
7
2
|
createNodesV2,
|
|
8
3
|
description,
|
|
9
4
|
name
|
|
10
5
|
} from "./chunk-7R63AGBK.mjs";
|
|
11
6
|
import "./chunk-YSCEY447.mjs";
|
|
7
|
+
import {
|
|
8
|
+
getRegistryVersion
|
|
9
|
+
} from "./chunk-U6GM7OXA.mjs";
|
|
10
|
+
import {
|
|
11
|
+
serveExecutor
|
|
12
|
+
} from "./chunk-NAS5PXQT.mjs";
|
|
13
|
+
import "./chunk-WS2G4IWW.mjs";
|
|
12
14
|
import "./chunk-3J7KBHMJ.mjs";
|
|
13
15
|
import {
|
|
14
16
|
helmChartGeneratorFn
|
|
@@ -17,25 +19,23 @@ import {
|
|
|
17
19
|
helmDependencyGeneratorFn
|
|
18
20
|
} from "./chunk-LWRIUXY4.mjs";
|
|
19
21
|
import "./chunk-HXMLPGRB.mjs";
|
|
20
|
-
import {
|
|
21
|
-
getRegistryVersion
|
|
22
|
-
} from "./chunk-U6GM7OXA.mjs";
|
|
23
|
-
import "./chunk-WS2G4IWW.mjs";
|
|
24
|
-
import {
|
|
25
|
-
serveExecutor
|
|
26
|
-
} from "./chunk-FHZPLUCG.mjs";
|
|
27
22
|
import "./chunk-C4ZGS3L3.mjs";
|
|
28
23
|
import "./chunk-TOP3LZ4E.mjs";
|
|
24
|
+
import "./chunk-WWU25UQ4.mjs";
|
|
25
|
+
import {
|
|
26
|
+
addToPrettierIgnore,
|
|
27
|
+
resolveUserExistingPrettierConfig
|
|
28
|
+
} from "./chunk-REHYFBT4.mjs";
|
|
29
29
|
import {
|
|
30
30
|
HelmClient,
|
|
31
31
|
createHelmClient
|
|
32
|
-
} from "./chunk-
|
|
33
|
-
import {
|
|
34
|
-
ensureInitialized
|
|
35
|
-
} from "./chunk-HGXQ6SSU.mjs";
|
|
32
|
+
} from "./chunk-HK6QKQTS.mjs";
|
|
36
33
|
import {
|
|
37
34
|
AbstractHelmClient
|
|
38
35
|
} from "./chunk-YXXZO2AJ.mjs";
|
|
36
|
+
import {
|
|
37
|
+
ensureInitialized
|
|
38
|
+
} from "./chunk-HGXQ6SSU.mjs";
|
|
39
39
|
import "./chunk-KBO64DJX.mjs";
|
|
40
40
|
export {
|
|
41
41
|
AbstractHelmClient,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkR2KZRP7Bjs = require('../../../chunk-R2KZRP7B.js');
|
|
5
5
|
require('../../../chunk-5KOGMQTW.js');
|
|
6
6
|
require('../../../chunk-PJSA4K3H.js');
|
|
7
|
-
require('../../../chunk-
|
|
8
|
-
require('../../../chunk-XKOZIQT3.js');
|
|
7
|
+
require('../../../chunk-4AADQIGW.js');
|
|
9
8
|
require('../../../chunk-JSFRUBG5.js');
|
|
9
|
+
require('../../../chunk-XKOZIQT3.js');
|
|
10
10
|
require('../../../chunk-RECJ3G6F.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
exports.default =
|
|
14
|
+
exports.default = _chunkR2KZRP7Bjs.executor_default; exports.serveExecutor = _chunkR2KZRP7Bjs.serveExecutor;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
executor_default,
|
|
3
3
|
serveExecutor
|
|
4
|
-
} from "../../../chunk-
|
|
4
|
+
} from "../../../chunk-NAS5PXQT.mjs";
|
|
5
5
|
import "../../../chunk-C4ZGS3L3.mjs";
|
|
6
6
|
import "../../../chunk-TOP3LZ4E.mjs";
|
|
7
|
-
import "../../../chunk-
|
|
8
|
-
import "../../../chunk-HGXQ6SSU.mjs";
|
|
7
|
+
import "../../../chunk-HK6QKQTS.mjs";
|
|
9
8
|
import "../../../chunk-YXXZO2AJ.mjs";
|
|
9
|
+
import "../../../chunk-HGXQ6SSU.mjs";
|
|
10
10
|
import "../../../chunk-KBO64DJX.mjs";
|
|
11
11
|
export {
|
|
12
12
|
executor_default as default,
|
package/dist/src/utils/client.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../../chunk-XKOZIQT3.js');
|
|
4
|
+
var _chunk4AADQIGWjs = require('../../chunk-4AADQIGW.js');
|
|
6
5
|
require('../../chunk-JSFRUBG5.js');
|
|
6
|
+
require('../../chunk-XKOZIQT3.js');
|
|
7
7
|
require('../../chunk-RECJ3G6F.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.HelmClient =
|
|
11
|
+
exports.HelmClient = _chunk4AADQIGWjs.HelmClient; exports.createHelmClient = _chunk4AADQIGWjs.createHelmClient;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
HelmClient,
|
|
3
3
|
createHelmClient
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-HGXQ6SSU.mjs";
|
|
4
|
+
} from "../../chunk-HK6QKQTS.mjs";
|
|
6
5
|
import "../../chunk-YXXZO2AJ.mjs";
|
|
6
|
+
import "../../chunk-HGXQ6SSU.mjs";
|
|
7
7
|
import "../../chunk-KBO64DJX.mjs";
|
|
8
8
|
export {
|
|
9
9
|
HelmClient,
|
package/dist/src/utils/index.js
CHANGED
|
@@ -6,11 +6,11 @@ var _chunk7QVOU2PTjs = require('../../chunk-7QVOU2PT.js');
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunk4AADQIGWjs = require('../../chunk-4AADQIGW.js');
|
|
10
|
+
require('../../chunk-JSFRUBG5.js');
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
var _chunkXKOZIQT3js = require('../../chunk-XKOZIQT3.js');
|
|
13
|
-
require('../../chunk-JSFRUBG5.js');
|
|
14
14
|
require('../../chunk-RECJ3G6F.js');
|
|
15
15
|
|
|
16
16
|
|
|
@@ -18,4 +18,4 @@ require('../../chunk-RECJ3G6F.js');
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
exports.HelmClient =
|
|
21
|
+
exports.HelmClient = _chunk4AADQIGWjs.HelmClient; exports.addToPrettierIgnore = _chunk7QVOU2PTjs.addToPrettierIgnore; exports.createHelmClient = _chunk4AADQIGWjs.createHelmClient; exports.ensureInitialized = _chunkXKOZIQT3js.ensureInitialized; exports.resolveUserExistingPrettierConfig = _chunk7QVOU2PTjs.resolveUserExistingPrettierConfig;
|
package/dist/src/utils/index.mjs
CHANGED
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
HelmClient,
|
|
8
8
|
createHelmClient
|
|
9
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-HK6QKQTS.mjs";
|
|
10
|
+
import "../../chunk-YXXZO2AJ.mjs";
|
|
10
11
|
import {
|
|
11
12
|
ensureInitialized
|
|
12
13
|
} from "../../chunk-HGXQ6SSU.mjs";
|
|
13
|
-
import "../../chunk-YXXZO2AJ.mjs";
|
|
14
14
|
import "../../chunk-KBO64DJX.mjs";
|
|
15
15
|
export {
|
|
16
16
|
HelmClient,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/k8s-tools",
|
|
3
|
-
"version": "0.42.
|
|
3
|
+
"version": "0.42.90",
|
|
4
4
|
"description": "Tools for managing Kubernetes (k8s) infrastructure within a Nx workspace.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "github",
|
|
@@ -140,9 +140,9 @@
|
|
|
140
140
|
"nx": { "optional": false }
|
|
141
141
|
},
|
|
142
142
|
"dependencies": {
|
|
143
|
-
"@storm-software/config": "^1.135.
|
|
144
|
-
"@storm-software/config-tools": "^1.189.
|
|
145
|
-
"@storm-software/workspace-tools": "^1.294.
|
|
143
|
+
"@storm-software/config": "^1.135.3",
|
|
144
|
+
"@storm-software/config-tools": "^1.189.2",
|
|
145
|
+
"@storm-software/workspace-tools": "^1.294.34",
|
|
146
146
|
"defu": "6.1.4",
|
|
147
147
|
"yaml": "^2.8.2"
|
|
148
148
|
},
|
|
@@ -160,5 +160,5 @@
|
|
|
160
160
|
"publishConfig": { "access": "public" },
|
|
161
161
|
"executors": "./executors.json",
|
|
162
162
|
"generators": "./generators.json",
|
|
163
|
-
"gitHead": "
|
|
163
|
+
"gitHead": "f802411a3ecd34e4715cab07613af9487bf29285"
|
|
164
164
|
}
|
package/dist/chunk-FHZPLUCG.mjs
DELETED
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
applyWorkspaceProjectTokens,
|
|
3
|
-
applyWorkspaceTokens
|
|
4
|
-
} from "./chunk-C4ZGS3L3.mjs";
|
|
5
|
-
import {
|
|
6
|
-
brandIcon,
|
|
7
|
-
findWorkspaceRoot,
|
|
8
|
-
formatLogMessage,
|
|
9
|
-
getConfig,
|
|
10
|
-
getStopwatch,
|
|
11
|
-
writeDebug,
|
|
12
|
-
writeError,
|
|
13
|
-
writeFatal,
|
|
14
|
-
writeInfo,
|
|
15
|
-
writeSuccess,
|
|
16
|
-
writeTrace,
|
|
17
|
-
writeWarning
|
|
18
|
-
} from "./chunk-TOP3LZ4E.mjs";
|
|
19
|
-
import {
|
|
20
|
-
createHelmClient
|
|
21
|
-
} from "./chunk-HFH5PRDJ.mjs";
|
|
22
|
-
|
|
23
|
-
// ../workspace-tools/src/base/base-executor.ts
|
|
24
|
-
import { defu } from "defu";
|
|
25
|
-
var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_options, context) => {
|
|
26
|
-
const stopwatch = getStopwatch(name);
|
|
27
|
-
let options = _options;
|
|
28
|
-
let config = {};
|
|
29
|
-
try {
|
|
30
|
-
if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
31
|
-
throw new Error(
|
|
32
|
-
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
const workspaceRoot = findWorkspaceRoot();
|
|
36
|
-
const projectRoot = context.projectsConfigurations.projects[context.projectName].root || workspaceRoot;
|
|
37
|
-
const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot || projectRoot || workspaceRoot;
|
|
38
|
-
const projectName = context.projectName;
|
|
39
|
-
config.workspaceRoot = workspaceRoot;
|
|
40
|
-
writeInfo(
|
|
41
|
-
`${brandIcon(config)} Running the ${name} executor for ${projectName} `,
|
|
42
|
-
config
|
|
43
|
-
);
|
|
44
|
-
if (!executorOptions.skipReadingConfig) {
|
|
45
|
-
writeTrace(
|
|
46
|
-
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
47
|
-
- workspaceRoot: ${workspaceRoot}
|
|
48
|
-
- projectRoot: ${projectRoot}
|
|
49
|
-
- sourceRoot: ${sourceRoot}
|
|
50
|
-
- projectName: ${projectName}
|
|
51
|
-
`,
|
|
52
|
-
config
|
|
53
|
-
);
|
|
54
|
-
config = await getConfig(workspaceRoot);
|
|
55
|
-
}
|
|
56
|
-
if (executorOptions?.hooks?.applyDefaultOptions) {
|
|
57
|
-
writeDebug("Running the applyDefaultOptions hook...", config);
|
|
58
|
-
options = await Promise.resolve(
|
|
59
|
-
executorOptions.hooks.applyDefaultOptions(options, config)
|
|
60
|
-
);
|
|
61
|
-
writeDebug("Completed the applyDefaultOptions hook", config);
|
|
62
|
-
}
|
|
63
|
-
writeTrace(
|
|
64
|
-
`Executor schema options \u2699\uFE0F
|
|
65
|
-
${formatLogMessage(options)}
|
|
66
|
-
`,
|
|
67
|
-
config
|
|
68
|
-
);
|
|
69
|
-
const tokenized = await applyWorkspaceTokens(
|
|
70
|
-
options,
|
|
71
|
-
defu(
|
|
72
|
-
{ workspaceRoot, projectRoot, sourceRoot, projectName, config },
|
|
73
|
-
config,
|
|
74
|
-
context.projectsConfigurations.projects[context.projectName]
|
|
75
|
-
),
|
|
76
|
-
applyWorkspaceProjectTokens
|
|
77
|
-
);
|
|
78
|
-
writeTrace(
|
|
79
|
-
`Executor schema tokenized options \u2699\uFE0F
|
|
80
|
-
${formatLogMessage(tokenized)}
|
|
81
|
-
`,
|
|
82
|
-
config
|
|
83
|
-
);
|
|
84
|
-
if (executorOptions?.hooks?.preProcess) {
|
|
85
|
-
writeDebug("Running the preProcess hook...", config);
|
|
86
|
-
await Promise.resolve(
|
|
87
|
-
executorOptions.hooks.preProcess(tokenized, config)
|
|
88
|
-
);
|
|
89
|
-
writeDebug("Completed the preProcess hook", config);
|
|
90
|
-
}
|
|
91
|
-
const ret = executorFn(tokenized, context, config);
|
|
92
|
-
if (_isFunction(ret?.next)) {
|
|
93
|
-
const asyncGen = ret;
|
|
94
|
-
for await (const iter of asyncGen) {
|
|
95
|
-
void iter;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
const result = await Promise.resolve(
|
|
99
|
-
ret
|
|
100
|
-
);
|
|
101
|
-
if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
|
|
102
|
-
throw new Error(
|
|
103
|
-
`Failure determined while running the ${name} executor
|
|
104
|
-
${formatLogMessage(
|
|
105
|
-
result
|
|
106
|
-
)}`,
|
|
107
|
-
{
|
|
108
|
-
cause: result?.error
|
|
109
|
-
}
|
|
110
|
-
);
|
|
111
|
-
}
|
|
112
|
-
if (executorOptions?.hooks?.postProcess) {
|
|
113
|
-
writeDebug("Running the postProcess hook...", config);
|
|
114
|
-
await Promise.resolve(executorOptions.hooks.postProcess(config));
|
|
115
|
-
writeDebug("Completed the postProcess hook", config);
|
|
116
|
-
}
|
|
117
|
-
writeSuccess(`Completed running the ${name} task executor!
|
|
118
|
-
`, config);
|
|
119
|
-
return {
|
|
120
|
-
success: true
|
|
121
|
-
};
|
|
122
|
-
} catch (error) {
|
|
123
|
-
writeFatal(
|
|
124
|
-
"A fatal error occurred while running the executor - the process was forced to terminate",
|
|
125
|
-
config
|
|
126
|
-
);
|
|
127
|
-
writeError(
|
|
128
|
-
`An exception was thrown in the executor's process
|
|
129
|
-
- Details: ${error.message}
|
|
130
|
-
- Stacktrace: ${error.stack}`,
|
|
131
|
-
config
|
|
132
|
-
);
|
|
133
|
-
return {
|
|
134
|
-
success: false
|
|
135
|
-
};
|
|
136
|
-
} finally {
|
|
137
|
-
stopwatch();
|
|
138
|
-
}
|
|
139
|
-
};
|
|
140
|
-
var _isFunction = (value) => {
|
|
141
|
-
try {
|
|
142
|
-
return value instanceof Function || typeof value === "function" || !!(value?.constructor && value?.call && value?.apply);
|
|
143
|
-
} catch (e) {
|
|
144
|
-
return false;
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
// src/executors/helm-package/executor.ts
|
|
149
|
-
async function serveExecutor(options, context, config) {
|
|
150
|
-
if (!context?.projectName || !context?.projectsConfigurations?.projects?.[context.projectName]?.root) {
|
|
151
|
-
throw new Error("Nx executor context was invalid");
|
|
152
|
-
}
|
|
153
|
-
const helm = createHelmClient();
|
|
154
|
-
if (options.dependencies?.repositories) {
|
|
155
|
-
for (const repository of options.dependencies.repositories) {
|
|
156
|
-
if (repository.name && repository.url) {
|
|
157
|
-
helm.addRepository(repository.name, repository.url);
|
|
158
|
-
} else {
|
|
159
|
-
throw new Error("Repository name and url are required");
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
if (options.dependencies?.update) {
|
|
164
|
-
helm.dependencyUpdate(options.chartFolder);
|
|
165
|
-
}
|
|
166
|
-
if (options.dependencies?.build) {
|
|
167
|
-
helm.dependencyBuild(options.chartFolder);
|
|
168
|
-
}
|
|
169
|
-
const chartPath = await helm.package({
|
|
170
|
-
chartFolder: options.chartFolder,
|
|
171
|
-
outputFolder: options.outputFolder
|
|
172
|
-
});
|
|
173
|
-
if (options.push && chartPath && options.remote) {
|
|
174
|
-
helm.push({
|
|
175
|
-
chartPath,
|
|
176
|
-
remote: options.remote
|
|
177
|
-
});
|
|
178
|
-
} else {
|
|
179
|
-
writeWarning(`Chart packaged at: ${chartPath}`, config);
|
|
180
|
-
}
|
|
181
|
-
return {
|
|
182
|
-
success: true
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
var executor_default = withRunExecutor(
|
|
186
|
-
"Helm Chart Package executor",
|
|
187
|
-
serveExecutor,
|
|
188
|
-
{
|
|
189
|
-
skipReadingConfig: false,
|
|
190
|
-
hooks: {
|
|
191
|
-
applyDefaultOptions: (options) => {
|
|
192
|
-
options.port ??= 4500;
|
|
193
|
-
return options;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
);
|
|
198
|
-
|
|
199
|
-
export {
|
|
200
|
-
serveExecutor,
|
|
201
|
-
executor_default
|
|
202
|
-
};
|
package/dist/chunk-HFH5PRDJ.mjs
DELETED
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ensureInitialized
|
|
3
|
-
} from "./chunk-HGXQ6SSU.mjs";
|
|
4
|
-
import {
|
|
5
|
-
AbstractHelmClient
|
|
6
|
-
} from "./chunk-YXXZO2AJ.mjs";
|
|
7
|
-
import {
|
|
8
|
-
__decorateClass
|
|
9
|
-
} from "./chunk-KBO64DJX.mjs";
|
|
10
|
-
|
|
11
|
-
// src/utils/client.ts
|
|
12
|
-
import { execSync } from "node:child_process";
|
|
13
|
-
var HelmClient = class extends AbstractHelmClient {
|
|
14
|
-
/**
|
|
15
|
-
* Creates an instance of HelmClient
|
|
16
|
-
*/
|
|
17
|
-
constructor() {
|
|
18
|
-
super();
|
|
19
|
-
}
|
|
20
|
-
package(options) {
|
|
21
|
-
let chartPath = void 0;
|
|
22
|
-
let output = {};
|
|
23
|
-
try {
|
|
24
|
-
output = this.runCommand([
|
|
25
|
-
"helm",
|
|
26
|
-
"package",
|
|
27
|
-
options.chartFolder,
|
|
28
|
-
"-d",
|
|
29
|
-
options.outputFolder
|
|
30
|
-
]);
|
|
31
|
-
} catch (err) {
|
|
32
|
-
if (err?.stderr.length > 0 && err?.exitCode !== 0) {
|
|
33
|
-
throw new Error(`Failed to package chart: ${err.stderr}`);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
if (output?.stderr.length > 0 && output?.exitCode !== 0) {
|
|
37
|
-
throw new Error(`Failed to package chart: ${output.stderr}`);
|
|
38
|
-
}
|
|
39
|
-
const match = output.stdout?.match(
|
|
40
|
-
/Successfully packaged chart and saved it to: (.+)/
|
|
41
|
-
);
|
|
42
|
-
if (!match || match.length < 2) {
|
|
43
|
-
throw new Error("Failed to parse chart path from helm output");
|
|
44
|
-
}
|
|
45
|
-
chartPath = match[1]?.trim();
|
|
46
|
-
return new Promise((resolve) => resolve(chartPath));
|
|
47
|
-
}
|
|
48
|
-
push(options) {
|
|
49
|
-
try {
|
|
50
|
-
this.runCommand(["helm", "push", options.chartPath, options.remote]);
|
|
51
|
-
} catch (err) {
|
|
52
|
-
if (err?.stderr.length > 0 && err?.exitCode !== 0) {
|
|
53
|
-
throw new Error(`Failed to push chart: ${err.stderr}`);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
dependencyUpdate(chartFolder) {
|
|
58
|
-
try {
|
|
59
|
-
this.runCommand(["helm", "dependency", "update", chartFolder]);
|
|
60
|
-
} catch (err) {
|
|
61
|
-
if (err?.stderr.length > 0 && err?.exitCode !== 0) {
|
|
62
|
-
throw new Error(`Failed to update chart dependencies: ${err.stderr}`);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
dependencyBuild(chartFolder) {
|
|
67
|
-
try {
|
|
68
|
-
this.runCommand(["helm", "dependency", "build", chartFolder]);
|
|
69
|
-
} catch (err) {
|
|
70
|
-
if (err?.stderr.length > 0 && err?.exitCode !== 0) {
|
|
71
|
-
throw new Error(`Failed to build chart dependencies: ${err.stderr}`);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
addRepository(name, url) {
|
|
76
|
-
try {
|
|
77
|
-
this.runCommand(["helm", "repo", "add", name, url]);
|
|
78
|
-
} catch (err) {
|
|
79
|
-
if (err?.stderr.length > 0 && err?.exitCode !== 0) {
|
|
80
|
-
throw new Error(`Failed to add repository: ${err.stderr}`);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Initialize Helm
|
|
86
|
-
*
|
|
87
|
-
* @returns A promise
|
|
88
|
-
*/
|
|
89
|
-
async initialize() {
|
|
90
|
-
if (this.initialized) {
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
try {
|
|
94
|
-
this.runCommand(["helm", "version"]);
|
|
95
|
-
} catch (err) {
|
|
96
|
-
if (err?.stderr.length > 0 && err?.exitCode !== 0) {
|
|
97
|
-
throw new Error(`Helm is not installed: ${err.stderr}`);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
return new Promise((resolve) => {
|
|
101
|
-
this.initialized = true;
|
|
102
|
-
resolve();
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
runCommand(commands) {
|
|
106
|
-
return execSync(commands.filter(Boolean).join(" "), {
|
|
107
|
-
encoding: "utf8",
|
|
108
|
-
windowsHide: true,
|
|
109
|
-
maxBuffer: 1024 * 1e6,
|
|
110
|
-
stdio: "pipe"
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
__decorateClass([
|
|
115
|
-
ensureInitialized
|
|
116
|
-
], HelmClient.prototype, "package", 1);
|
|
117
|
-
__decorateClass([
|
|
118
|
-
ensureInitialized
|
|
119
|
-
], HelmClient.prototype, "push", 1);
|
|
120
|
-
__decorateClass([
|
|
121
|
-
ensureInitialized
|
|
122
|
-
], HelmClient.prototype, "dependencyUpdate", 1);
|
|
123
|
-
__decorateClass([
|
|
124
|
-
ensureInitialized
|
|
125
|
-
], HelmClient.prototype, "dependencyBuild", 1);
|
|
126
|
-
__decorateClass([
|
|
127
|
-
ensureInitialized
|
|
128
|
-
], HelmClient.prototype, "addRepository", 1);
|
|
129
|
-
var createHelmClient = () => {
|
|
130
|
-
return new HelmClient();
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
export {
|
|
134
|
-
HelmClient,
|
|
135
|
-
createHelmClient
|
|
136
|
-
};
|
package/dist/chunk-M5IOCZK5.js
DELETED
|
@@ -1,136 +0,0 @@
|
|
|
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
|
-
|
|
3
|
-
var _chunkXKOZIQT3js = require('./chunk-XKOZIQT3.js');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var _chunkJSFRUBG5js = require('./chunk-JSFRUBG5.js');
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _chunkRECJ3G6Fjs = require('./chunk-RECJ3G6F.js');
|
|
10
|
-
|
|
11
|
-
// src/utils/client.ts
|
|
12
|
-
var _child_process = require('child_process');
|
|
13
|
-
var HelmClient = class extends _chunkJSFRUBG5js.AbstractHelmClient {
|
|
14
|
-
/**
|
|
15
|
-
* Creates an instance of HelmClient
|
|
16
|
-
*/
|
|
17
|
-
constructor() {
|
|
18
|
-
super();
|
|
19
|
-
}
|
|
20
|
-
package(options) {
|
|
21
|
-
let chartPath = void 0;
|
|
22
|
-
let output = {};
|
|
23
|
-
try {
|
|
24
|
-
output = this.runCommand([
|
|
25
|
-
"helm",
|
|
26
|
-
"package",
|
|
27
|
-
options.chartFolder,
|
|
28
|
-
"-d",
|
|
29
|
-
options.outputFolder
|
|
30
|
-
]);
|
|
31
|
-
} catch (err) {
|
|
32
|
-
if (_optionalChain([err, 'optionalAccess', _ => _.stderr, 'access', _2 => _2.length]) > 0 && _optionalChain([err, 'optionalAccess', _3 => _3.exitCode]) !== 0) {
|
|
33
|
-
throw new Error(`Failed to package chart: ${err.stderr}`);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
if (_optionalChain([output, 'optionalAccess', _4 => _4.stderr, 'access', _5 => _5.length]) > 0 && _optionalChain([output, 'optionalAccess', _6 => _6.exitCode]) !== 0) {
|
|
37
|
-
throw new Error(`Failed to package chart: ${output.stderr}`);
|
|
38
|
-
}
|
|
39
|
-
const match = _optionalChain([output, 'access', _7 => _7.stdout, 'optionalAccess', _8 => _8.match, 'call', _9 => _9(
|
|
40
|
-
/Successfully packaged chart and saved it to: (.+)/
|
|
41
|
-
)]);
|
|
42
|
-
if (!match || match.length < 2) {
|
|
43
|
-
throw new Error("Failed to parse chart path from helm output");
|
|
44
|
-
}
|
|
45
|
-
chartPath = _optionalChain([match, 'access', _10 => _10[1], 'optionalAccess', _11 => _11.trim, 'call', _12 => _12()]);
|
|
46
|
-
return new Promise((resolve) => resolve(chartPath));
|
|
47
|
-
}
|
|
48
|
-
push(options) {
|
|
49
|
-
try {
|
|
50
|
-
this.runCommand(["helm", "push", options.chartPath, options.remote]);
|
|
51
|
-
} catch (err) {
|
|
52
|
-
if (_optionalChain([err, 'optionalAccess', _13 => _13.stderr, 'access', _14 => _14.length]) > 0 && _optionalChain([err, 'optionalAccess', _15 => _15.exitCode]) !== 0) {
|
|
53
|
-
throw new Error(`Failed to push chart: ${err.stderr}`);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
dependencyUpdate(chartFolder) {
|
|
58
|
-
try {
|
|
59
|
-
this.runCommand(["helm", "dependency", "update", chartFolder]);
|
|
60
|
-
} catch (err) {
|
|
61
|
-
if (_optionalChain([err, 'optionalAccess', _16 => _16.stderr, 'access', _17 => _17.length]) > 0 && _optionalChain([err, 'optionalAccess', _18 => _18.exitCode]) !== 0) {
|
|
62
|
-
throw new Error(`Failed to update chart dependencies: ${err.stderr}`);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
dependencyBuild(chartFolder) {
|
|
67
|
-
try {
|
|
68
|
-
this.runCommand(["helm", "dependency", "build", chartFolder]);
|
|
69
|
-
} catch (err) {
|
|
70
|
-
if (_optionalChain([err, 'optionalAccess', _19 => _19.stderr, 'access', _20 => _20.length]) > 0 && _optionalChain([err, 'optionalAccess', _21 => _21.exitCode]) !== 0) {
|
|
71
|
-
throw new Error(`Failed to build chart dependencies: ${err.stderr}`);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
addRepository(name, url) {
|
|
76
|
-
try {
|
|
77
|
-
this.runCommand(["helm", "repo", "add", name, url]);
|
|
78
|
-
} catch (err) {
|
|
79
|
-
if (_optionalChain([err, 'optionalAccess', _22 => _22.stderr, 'access', _23 => _23.length]) > 0 && _optionalChain([err, 'optionalAccess', _24 => _24.exitCode]) !== 0) {
|
|
80
|
-
throw new Error(`Failed to add repository: ${err.stderr}`);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Initialize Helm
|
|
86
|
-
*
|
|
87
|
-
* @returns A promise
|
|
88
|
-
*/
|
|
89
|
-
async initialize() {
|
|
90
|
-
if (this.initialized) {
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
try {
|
|
94
|
-
this.runCommand(["helm", "version"]);
|
|
95
|
-
} catch (err) {
|
|
96
|
-
if (_optionalChain([err, 'optionalAccess', _25 => _25.stderr, 'access', _26 => _26.length]) > 0 && _optionalChain([err, 'optionalAccess', _27 => _27.exitCode]) !== 0) {
|
|
97
|
-
throw new Error(`Helm is not installed: ${err.stderr}`);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
return new Promise((resolve) => {
|
|
101
|
-
this.initialized = true;
|
|
102
|
-
resolve();
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
runCommand(commands) {
|
|
106
|
-
return _child_process.execSync.call(void 0, commands.filter(Boolean).join(" "), {
|
|
107
|
-
encoding: "utf8",
|
|
108
|
-
windowsHide: true,
|
|
109
|
-
maxBuffer: 1024 * 1e6,
|
|
110
|
-
stdio: "pipe"
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
_chunkRECJ3G6Fjs.__decorateClass.call(void 0, [
|
|
115
|
-
_chunkXKOZIQT3js.ensureInitialized
|
|
116
|
-
], HelmClient.prototype, "package", 1);
|
|
117
|
-
_chunkRECJ3G6Fjs.__decorateClass.call(void 0, [
|
|
118
|
-
_chunkXKOZIQT3js.ensureInitialized
|
|
119
|
-
], HelmClient.prototype, "push", 1);
|
|
120
|
-
_chunkRECJ3G6Fjs.__decorateClass.call(void 0, [
|
|
121
|
-
_chunkXKOZIQT3js.ensureInitialized
|
|
122
|
-
], HelmClient.prototype, "dependencyUpdate", 1);
|
|
123
|
-
_chunkRECJ3G6Fjs.__decorateClass.call(void 0, [
|
|
124
|
-
_chunkXKOZIQT3js.ensureInitialized
|
|
125
|
-
], HelmClient.prototype, "dependencyBuild", 1);
|
|
126
|
-
_chunkRECJ3G6Fjs.__decorateClass.call(void 0, [
|
|
127
|
-
_chunkXKOZIQT3js.ensureInitialized
|
|
128
|
-
], HelmClient.prototype, "addRepository", 1);
|
|
129
|
-
var createHelmClient = () => {
|
|
130
|
-
return new HelmClient();
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
exports.HelmClient = HelmClient; exports.createHelmClient = createHelmClient;
|
package/dist/chunk-N6F63TBC.js
DELETED
|
@@ -1,202 +0,0 @@
|
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
var _chunk5KOGMQTWjs = require('./chunk-5KOGMQTW.js');
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
var _chunkPJSA4K3Hjs = require('./chunk-PJSA4K3H.js');
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var _chunkM5IOCZK5js = require('./chunk-M5IOCZK5.js');
|
|
22
|
-
|
|
23
|
-
// ../workspace-tools/src/base/base-executor.ts
|
|
24
|
-
var _defu = require('defu');
|
|
25
|
-
var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_options, context) => {
|
|
26
|
-
const stopwatch = _chunkPJSA4K3Hjs.getStopwatch.call(void 0, name);
|
|
27
|
-
let options = _options;
|
|
28
|
-
let config = {};
|
|
29
|
-
try {
|
|
30
|
-
if (!_optionalChain([context, 'access', _ => _.projectsConfigurations, 'optionalAccess', _2 => _2.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
31
|
-
throw new Error(
|
|
32
|
-
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
const workspaceRoot = _chunkPJSA4K3Hjs.findWorkspaceRoot.call(void 0, );
|
|
36
|
-
const projectRoot = context.projectsConfigurations.projects[context.projectName].root || workspaceRoot;
|
|
37
|
-
const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot || projectRoot || workspaceRoot;
|
|
38
|
-
const projectName = context.projectName;
|
|
39
|
-
config.workspaceRoot = workspaceRoot;
|
|
40
|
-
_chunkPJSA4K3Hjs.writeInfo.call(void 0,
|
|
41
|
-
`${_chunkPJSA4K3Hjs.brandIcon.call(void 0, config)} Running the ${name} executor for ${projectName} `,
|
|
42
|
-
config
|
|
43
|
-
);
|
|
44
|
-
if (!executorOptions.skipReadingConfig) {
|
|
45
|
-
_chunkPJSA4K3Hjs.writeTrace.call(void 0,
|
|
46
|
-
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
47
|
-
- workspaceRoot: ${workspaceRoot}
|
|
48
|
-
- projectRoot: ${projectRoot}
|
|
49
|
-
- sourceRoot: ${sourceRoot}
|
|
50
|
-
- projectName: ${projectName}
|
|
51
|
-
`,
|
|
52
|
-
config
|
|
53
|
-
);
|
|
54
|
-
config = await _chunkPJSA4K3Hjs.getConfig.call(void 0, workspaceRoot);
|
|
55
|
-
}
|
|
56
|
-
if (_optionalChain([executorOptions, 'optionalAccess', _3 => _3.hooks, 'optionalAccess', _4 => _4.applyDefaultOptions])) {
|
|
57
|
-
_chunkPJSA4K3Hjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
58
|
-
options = await Promise.resolve(
|
|
59
|
-
executorOptions.hooks.applyDefaultOptions(options, config)
|
|
60
|
-
);
|
|
61
|
-
_chunkPJSA4K3Hjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
62
|
-
}
|
|
63
|
-
_chunkPJSA4K3Hjs.writeTrace.call(void 0,
|
|
64
|
-
`Executor schema options \u2699\uFE0F
|
|
65
|
-
${_chunkPJSA4K3Hjs.formatLogMessage.call(void 0, options)}
|
|
66
|
-
`,
|
|
67
|
-
config
|
|
68
|
-
);
|
|
69
|
-
const tokenized = await _chunk5KOGMQTWjs.applyWorkspaceTokens.call(void 0,
|
|
70
|
-
options,
|
|
71
|
-
_defu.defu.call(void 0,
|
|
72
|
-
{ workspaceRoot, projectRoot, sourceRoot, projectName, config },
|
|
73
|
-
config,
|
|
74
|
-
context.projectsConfigurations.projects[context.projectName]
|
|
75
|
-
),
|
|
76
|
-
_chunk5KOGMQTWjs.applyWorkspaceProjectTokens
|
|
77
|
-
);
|
|
78
|
-
_chunkPJSA4K3Hjs.writeTrace.call(void 0,
|
|
79
|
-
`Executor schema tokenized options \u2699\uFE0F
|
|
80
|
-
${_chunkPJSA4K3Hjs.formatLogMessage.call(void 0, tokenized)}
|
|
81
|
-
`,
|
|
82
|
-
config
|
|
83
|
-
);
|
|
84
|
-
if (_optionalChain([executorOptions, 'optionalAccess', _5 => _5.hooks, 'optionalAccess', _6 => _6.preProcess])) {
|
|
85
|
-
_chunkPJSA4K3Hjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
86
|
-
await Promise.resolve(
|
|
87
|
-
executorOptions.hooks.preProcess(tokenized, config)
|
|
88
|
-
);
|
|
89
|
-
_chunkPJSA4K3Hjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
90
|
-
}
|
|
91
|
-
const ret = executorFn(tokenized, context, config);
|
|
92
|
-
if (_isFunction(_optionalChain([ret, 'optionalAccess', _7 => _7.next]))) {
|
|
93
|
-
const asyncGen = ret;
|
|
94
|
-
for await (const iter of asyncGen) {
|
|
95
|
-
void iter;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
const result = await Promise.resolve(
|
|
99
|
-
ret
|
|
100
|
-
);
|
|
101
|
-
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")) {
|
|
102
|
-
throw new Error(
|
|
103
|
-
`Failure determined while running the ${name} executor
|
|
104
|
-
${_chunkPJSA4K3Hjs.formatLogMessage.call(void 0,
|
|
105
|
-
result
|
|
106
|
-
)}`,
|
|
107
|
-
{
|
|
108
|
-
cause: _optionalChain([result, 'optionalAccess', _16 => _16.error])
|
|
109
|
-
}
|
|
110
|
-
);
|
|
111
|
-
}
|
|
112
|
-
if (_optionalChain([executorOptions, 'optionalAccess', _17 => _17.hooks, 'optionalAccess', _18 => _18.postProcess])) {
|
|
113
|
-
_chunkPJSA4K3Hjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
114
|
-
await Promise.resolve(executorOptions.hooks.postProcess(config));
|
|
115
|
-
_chunkPJSA4K3Hjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
116
|
-
}
|
|
117
|
-
_chunkPJSA4K3Hjs.writeSuccess.call(void 0, `Completed running the ${name} task executor!
|
|
118
|
-
`, config);
|
|
119
|
-
return {
|
|
120
|
-
success: true
|
|
121
|
-
};
|
|
122
|
-
} catch (error) {
|
|
123
|
-
_chunkPJSA4K3Hjs.writeFatal.call(void 0,
|
|
124
|
-
"A fatal error occurred while running the executor - the process was forced to terminate",
|
|
125
|
-
config
|
|
126
|
-
);
|
|
127
|
-
_chunkPJSA4K3Hjs.writeError.call(void 0,
|
|
128
|
-
`An exception was thrown in the executor's process
|
|
129
|
-
- Details: ${error.message}
|
|
130
|
-
- Stacktrace: ${error.stack}`,
|
|
131
|
-
config
|
|
132
|
-
);
|
|
133
|
-
return {
|
|
134
|
-
success: false
|
|
135
|
-
};
|
|
136
|
-
} finally {
|
|
137
|
-
stopwatch();
|
|
138
|
-
}
|
|
139
|
-
};
|
|
140
|
-
var _isFunction = (value) => {
|
|
141
|
-
try {
|
|
142
|
-
return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess', _19 => _19.constructor]) && _optionalChain([value, 'optionalAccess', _20 => _20.call]) && _optionalChain([value, 'optionalAccess', _21 => _21.apply]));
|
|
143
|
-
} catch (e) {
|
|
144
|
-
return false;
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
// src/executors/helm-package/executor.ts
|
|
149
|
-
async function serveExecutor(options, context, config) {
|
|
150
|
-
if (!_optionalChain([context, 'optionalAccess', _22 => _22.projectName]) || !_optionalChain([context, 'optionalAccess', _23 => _23.projectsConfigurations, 'optionalAccess', _24 => _24.projects, 'optionalAccess', _25 => _25[context.projectName], 'optionalAccess', _26 => _26.root])) {
|
|
151
|
-
throw new Error("Nx executor context was invalid");
|
|
152
|
-
}
|
|
153
|
-
const helm = _chunkM5IOCZK5js.createHelmClient.call(void 0, );
|
|
154
|
-
if (_optionalChain([options, 'access', _27 => _27.dependencies, 'optionalAccess', _28 => _28.repositories])) {
|
|
155
|
-
for (const repository of options.dependencies.repositories) {
|
|
156
|
-
if (repository.name && repository.url) {
|
|
157
|
-
helm.addRepository(repository.name, repository.url);
|
|
158
|
-
} else {
|
|
159
|
-
throw new Error("Repository name and url are required");
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
if (_optionalChain([options, 'access', _29 => _29.dependencies, 'optionalAccess', _30 => _30.update])) {
|
|
164
|
-
helm.dependencyUpdate(options.chartFolder);
|
|
165
|
-
}
|
|
166
|
-
if (_optionalChain([options, 'access', _31 => _31.dependencies, 'optionalAccess', _32 => _32.build])) {
|
|
167
|
-
helm.dependencyBuild(options.chartFolder);
|
|
168
|
-
}
|
|
169
|
-
const chartPath = await helm.package({
|
|
170
|
-
chartFolder: options.chartFolder,
|
|
171
|
-
outputFolder: options.outputFolder
|
|
172
|
-
});
|
|
173
|
-
if (options.push && chartPath && options.remote) {
|
|
174
|
-
helm.push({
|
|
175
|
-
chartPath,
|
|
176
|
-
remote: options.remote
|
|
177
|
-
});
|
|
178
|
-
} else {
|
|
179
|
-
_chunkPJSA4K3Hjs.writeWarning.call(void 0, `Chart packaged at: ${chartPath}`, config);
|
|
180
|
-
}
|
|
181
|
-
return {
|
|
182
|
-
success: true
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
var executor_default = withRunExecutor(
|
|
186
|
-
"Helm Chart Package executor",
|
|
187
|
-
serveExecutor,
|
|
188
|
-
{
|
|
189
|
-
skipReadingConfig: false,
|
|
190
|
-
hooks: {
|
|
191
|
-
applyDefaultOptions: (options) => {
|
|
192
|
-
options.port ??= 4500;
|
|
193
|
-
return options;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
);
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
exports.serveExecutor = serveExecutor; exports.executor_default = executor_default;
|