@storm-software/k8s-tools 0.30.1 → 0.31.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -0
- package/README.md +1 -1
- package/dist/chunk-NHN57PGK.js +200 -0
- package/dist/{chunk-BBY7MXHG.mjs → chunk-O2NTRG6T.mjs} +1 -1
- package/dist/{chunk-SGNASGK5.js → chunk-QC45ZBCD.js} +2 -2
- package/dist/chunk-RGCWOU4G.mjs +200 -0
- package/dist/{chunk-ARIMP3W4.mjs → chunk-WV3ZYQE2.mjs} +13 -12
- package/dist/{chunk-RUPAIXLM.js → chunk-XZP5ZUYN.js} +13 -12
- package/dist/executors.js +3 -3
- package/dist/executors.mjs +2 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -6
- package/dist/index.mjs +5 -7
- package/dist/src/executors/container-publish/executor.js +3 -3
- package/dist/src/executors/container-publish/executor.mjs +2 -2
- package/dist/src/plugins/docker/index.d.mts +3 -4
- package/dist/src/plugins/docker/index.d.ts +3 -4
- package/dist/src/plugins/docker/index.js +3 -5
- package/dist/src/plugins/docker/index.mjs +4 -6
- package/package.json +4 -4
- package/dist/chunk-MQZUEUAT.mjs +0 -189
- package/dist/chunk-Y2HMMGO2.js +0 -189
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,47 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Storm Ops - K8s Tools
|
|
4
4
|
|
|
5
|
+
## [0.31.0](https://github.com/storm-software/storm-ops/releases/tag/k8s-tools%400.31.0) (2025-05-08)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
- **git-tools:** Update release process to ensure package.json is updated
|
|
10
|
+
- **k8s-tools:** Update Nx plugin to support `createNodesV2`
|
|
11
|
+
- **config-tools:** Added TOML utilities module
|
|
12
|
+
|
|
13
|
+
### Miscellaneous
|
|
14
|
+
|
|
15
|
+
- **monorepo:** Regenerate README markdown files
|
|
16
|
+
|
|
17
|
+
### Updated Dependencies
|
|
18
|
+
|
|
19
|
+
- Updated workspace-tools to 1.273.0
|
|
20
|
+
- Updated workspace-tools to 1.273.0
|
|
21
|
+
- Updated config-tools to 1.169.0
|
|
22
|
+
- Updated config-tools to 1.169.0
|
|
23
|
+
- Updated config to 1.119.0
|
|
24
|
+
- Updated config to 1.119.0
|
|
25
|
+
|
|
26
|
+
## [0.30.2](https://github.com/storm-software/storm-ops/releases/tag/k8s-tools%400.30.2) (2025-05-07)
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
- **git-tools:** Remove auto-commit on versioning step
|
|
31
|
+
- **git-tools:** Update versioning to commit changes
|
|
32
|
+
|
|
33
|
+
### Miscellaneous
|
|
34
|
+
|
|
35
|
+
- **monorepo:** Regenerate README markdown files
|
|
36
|
+
|
|
37
|
+
### Updated Dependencies
|
|
38
|
+
|
|
39
|
+
- Updated workspace-tools to 1.272.2
|
|
40
|
+
- Updated workspace-tools to 1.272.2
|
|
41
|
+
- Updated config-tools to 1.168.2
|
|
42
|
+
- Updated config-tools to 1.168.2
|
|
43
|
+
- Updated config to 1.118.2
|
|
44
|
+
- Updated config to 1.118.2
|
|
45
|
+
|
|
5
46
|
## [0.30.1](https://github.com/storm-software/storm-ops/releases/tag/k8s-tools%400.30.1) (2025-05-07)
|
|
6
47
|
|
|
7
48
|
### Updated Dependencies
|
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 -->
|
|
@@ -0,0 +1,200 @@
|
|
|
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
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _chunkXZP5ZUYNjs = require('./chunk-XZP5ZUYN.js');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
var _chunkUWVOFPSWjs = require('./chunk-UWVOFPSW.js');
|
|
12
|
+
|
|
13
|
+
// src/plugins/docker/_dockerfile.ts
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
var _devkit = require('@nx/devkit');
|
|
19
|
+
var _fs = require('fs');
|
|
20
|
+
var name = "storm-software/docker";
|
|
21
|
+
var description = "Plugin for parsing Dockerfile files";
|
|
22
|
+
var createNodesV2 = [
|
|
23
|
+
"*/**/{Dockerfile,Dockerfile.*}",
|
|
24
|
+
async (configFiles, options, context) => {
|
|
25
|
+
return await _devkit.createNodesFromFiles.call(void 0,
|
|
26
|
+
async (dockerFilePath, options2 = {
|
|
27
|
+
defaultEngine: "docker"
|
|
28
|
+
}, context2) => {
|
|
29
|
+
try {
|
|
30
|
+
if (!dockerFilePath) {
|
|
31
|
+
return {};
|
|
32
|
+
}
|
|
33
|
+
const root = dockerFilePath.substring(
|
|
34
|
+
dockerFilePath.lastIndexOf("/") + 1
|
|
35
|
+
);
|
|
36
|
+
const projectJsonPath = _devkit.joinPathFragments.call(void 0, root, "project.json");
|
|
37
|
+
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
38
|
+
return {};
|
|
39
|
+
}
|
|
40
|
+
const projectJson = _devkit.readJsonFile.call(void 0, projectJsonPath);
|
|
41
|
+
if (_optionalChain([projectJson, 'optionalAccess', _ => _.name])) {
|
|
42
|
+
return {};
|
|
43
|
+
}
|
|
44
|
+
const workspaceRoot = _chunkUWVOFPSWjs.findWorkspaceRoot.call(void 0, );
|
|
45
|
+
const config = await _chunkUWVOFPSWjs.getConfig.call(void 0, workspaceRoot);
|
|
46
|
+
Object.keys(projectJson).forEach((key) => {
|
|
47
|
+
if (!project[key]) {
|
|
48
|
+
project[key] = projectJson[key];
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
const project = {
|
|
52
|
+
root,
|
|
53
|
+
name: _optionalChain([projectJson, 'optionalAccess', _2 => _2.name])
|
|
54
|
+
};
|
|
55
|
+
const engine = _nullishCoalesce(options2.defaultEngine, () => ( "docker"));
|
|
56
|
+
const labels = [
|
|
57
|
+
`org.opencontainers.image.ref.name=${project.name}`,
|
|
58
|
+
`org.opencontainers.image.title=${titleCase(project.name)}`,
|
|
59
|
+
`org.opencontainers.image.authors=${config.organization ? titleCase(config.organization) : "Storm Software"}`,
|
|
60
|
+
`org.opencontainers.image.vendor=${config.organization ? titleCase(config.organization) : "Storm Software"}`,
|
|
61
|
+
`org.opencontainers.image.documentation=${config.docs}`,
|
|
62
|
+
`org.opencontainers.image.url=${config.homepage}`,
|
|
63
|
+
`org.opencontainers.image.source=${config.repository}`
|
|
64
|
+
];
|
|
65
|
+
let tag = "latest";
|
|
66
|
+
const packageManager = _chunkXZP5ZUYNjs.getPackageInfo.call(void 0, project);
|
|
67
|
+
if (packageManager) {
|
|
68
|
+
if (packageManager.type === "Cargo.toml") {
|
|
69
|
+
tag = packageManager.content.package.version;
|
|
70
|
+
labels.push(
|
|
71
|
+
`org.opencontainers.image.description=${packageManager.content.package.description}`
|
|
72
|
+
);
|
|
73
|
+
} else if (packageManager.type === "package.json") {
|
|
74
|
+
tag = packageManager.content.version;
|
|
75
|
+
labels.push(
|
|
76
|
+
`org.opencontainers.image.description=${packageManager.content.description}`
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
project.targets = {
|
|
81
|
+
...project.targets,
|
|
82
|
+
container: {
|
|
83
|
+
executor: "@nx-tools/nx-container:build",
|
|
84
|
+
options: {
|
|
85
|
+
file: dockerFilePath,
|
|
86
|
+
engine,
|
|
87
|
+
labels,
|
|
88
|
+
push: true,
|
|
89
|
+
platforms: ["linux/amd64"],
|
|
90
|
+
metadata: {
|
|
91
|
+
images: [
|
|
92
|
+
`${config.namespace ? config.namespace : "storm-software"}/${_optionalChain([project, 'access', _3 => _3.name, 'optionalAccess', _4 => _4.replace, 'call', _5 => _5(`${config.namespace}-`, "")])}`,
|
|
93
|
+
`ghcr.io/${config.organization ? config.organization : "storm-software"}/${project.name}`
|
|
94
|
+
],
|
|
95
|
+
tags: [
|
|
96
|
+
"type=schedule",
|
|
97
|
+
"type=ref,event=branch",
|
|
98
|
+
"type=ref,event=tag",
|
|
99
|
+
"type=ref,event=pr",
|
|
100
|
+
"type=semver,pattern={{version}}",
|
|
101
|
+
"type=semver,pattern={{major}}.{{minor}}",
|
|
102
|
+
"type=semver,pattern={{major}}",
|
|
103
|
+
"type=sha"
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
defaultConfiguration: "production",
|
|
108
|
+
configurations: {
|
|
109
|
+
development: {
|
|
110
|
+
quiet: false,
|
|
111
|
+
"build-args": [
|
|
112
|
+
"ENVIRONMENT=development",
|
|
113
|
+
"DEBUG_IMAGE=true",
|
|
114
|
+
`RELEASE=${tag}`
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
production: {
|
|
118
|
+
quiet: true,
|
|
119
|
+
"build-args": [
|
|
120
|
+
"ENVIRONMENT=production",
|
|
121
|
+
"DEBUG_IMAGE=false",
|
|
122
|
+
`RELEASE=${tag}`
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
if ((_chunkXZP5ZUYNjs.isEqualProjectTag.call(void 0,
|
|
129
|
+
project,
|
|
130
|
+
_chunkXZP5ZUYNjs.ProjectTagConstants.ProjectType.TAG_ID,
|
|
131
|
+
_chunkXZP5ZUYNjs.ProjectTagConstants.ProjectType.APPLICATION
|
|
132
|
+
) || project.projectType === "application") && _chunkXZP5ZUYNjs.hasProjectTag.call(void 0, project, _chunkXZP5ZUYNjs.ProjectTagConstants.Registry.TAG_ID)) {
|
|
133
|
+
if (project.targets["nx-release-publish"]) {
|
|
134
|
+
project.targets["nx-release-publish"] = {
|
|
135
|
+
...project.targets["nx-release-publish"],
|
|
136
|
+
executor: "@storm-software/k8s-tools:container-publish",
|
|
137
|
+
options: {
|
|
138
|
+
packageRoot: project.root
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
} else {
|
|
142
|
+
project.targets["nx-release-publish"] = {
|
|
143
|
+
cache: true,
|
|
144
|
+
inputs: [
|
|
145
|
+
"linting",
|
|
146
|
+
"testing",
|
|
147
|
+
"documentation",
|
|
148
|
+
"rust",
|
|
149
|
+
"^production"
|
|
150
|
+
],
|
|
151
|
+
dependsOn: ["build", "^nx-release-publish"],
|
|
152
|
+
executor: "@storm-software/k8s-tools:container-publish",
|
|
153
|
+
options: {
|
|
154
|
+
packageRoot: project.root
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
_chunkXZP5ZUYNjs.setDefaultProjectTags.call(void 0, project);
|
|
160
|
+
const projects = {};
|
|
161
|
+
const externalNodes = {};
|
|
162
|
+
projects[project.root] = {
|
|
163
|
+
...project,
|
|
164
|
+
release: {
|
|
165
|
+
...project.release,
|
|
166
|
+
version: {
|
|
167
|
+
..._optionalChain([project, 'access', _6 => _6.release, 'optionalAccess', _7 => _7.version]),
|
|
168
|
+
generator: "@storm-software/workspace-tools:release-version"
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
return {
|
|
173
|
+
projects,
|
|
174
|
+
externalNodes
|
|
175
|
+
};
|
|
176
|
+
} catch (e) {
|
|
177
|
+
console.error(e);
|
|
178
|
+
return {};
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
configFiles,
|
|
182
|
+
options,
|
|
183
|
+
context
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
];
|
|
187
|
+
var titleCase = (input) => {
|
|
188
|
+
if (!input) {
|
|
189
|
+
return "";
|
|
190
|
+
}
|
|
191
|
+
return input.split(/(?=[A-Z])|[\.\-\s_]/).map((s) => s.trim()).filter((s) => !!s).map(
|
|
192
|
+
(s) => s ? s.toLowerCase().charAt(0).toUpperCase() + s.toLowerCase().slice(1) : s
|
|
193
|
+
).join(" ");
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
exports.name = name; exports.description = description; exports.createNodesV2 = createNodesV2;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkXZP5ZUYNjs = require('./chunk-XZP5ZUYN.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkDD5DCADPjs = require('./chunk-DD5DCADP.js');
|
|
@@ -113,7 +113,7 @@ async function* publishExecutor(options, context) {
|
|
|
113
113
|
);
|
|
114
114
|
} else {
|
|
115
115
|
console.log(`Published to ${tokenized.registry}`);
|
|
116
|
-
const packageManager =
|
|
116
|
+
const packageManager = _chunkXZP5ZUYNjs.getPackageInfo.call(void 0, projectConfig);
|
|
117
117
|
if (packageManager) {
|
|
118
118
|
tokenized["build-args"] ??= [
|
|
119
119
|
"ENVIRONMENT=production",
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ProjectTagConstants,
|
|
3
|
+
getPackageInfo,
|
|
4
|
+
hasProjectTag,
|
|
5
|
+
isEqualProjectTag,
|
|
6
|
+
setDefaultProjectTags
|
|
7
|
+
} from "./chunk-WV3ZYQE2.mjs";
|
|
8
|
+
import {
|
|
9
|
+
findWorkspaceRoot,
|
|
10
|
+
getConfig
|
|
11
|
+
} from "./chunk-MWMS7P7U.mjs";
|
|
12
|
+
|
|
13
|
+
// src/plugins/docker/_dockerfile.ts
|
|
14
|
+
import {
|
|
15
|
+
createNodesFromFiles,
|
|
16
|
+
joinPathFragments,
|
|
17
|
+
readJsonFile
|
|
18
|
+
} from "@nx/devkit";
|
|
19
|
+
import { existsSync } from "node:fs";
|
|
20
|
+
var name = "storm-software/docker";
|
|
21
|
+
var description = "Plugin for parsing Dockerfile files";
|
|
22
|
+
var createNodesV2 = [
|
|
23
|
+
"*/**/{Dockerfile,Dockerfile.*}",
|
|
24
|
+
async (configFiles, options, context) => {
|
|
25
|
+
return await createNodesFromFiles(
|
|
26
|
+
async (dockerFilePath, options2 = {
|
|
27
|
+
defaultEngine: "docker"
|
|
28
|
+
}, context2) => {
|
|
29
|
+
try {
|
|
30
|
+
if (!dockerFilePath) {
|
|
31
|
+
return {};
|
|
32
|
+
}
|
|
33
|
+
const root = dockerFilePath.substring(
|
|
34
|
+
dockerFilePath.lastIndexOf("/") + 1
|
|
35
|
+
);
|
|
36
|
+
const projectJsonPath = joinPathFragments(root, "project.json");
|
|
37
|
+
if (!existsSync(projectJsonPath)) {
|
|
38
|
+
return {};
|
|
39
|
+
}
|
|
40
|
+
const projectJson = readJsonFile(projectJsonPath);
|
|
41
|
+
if (projectJson?.name) {
|
|
42
|
+
return {};
|
|
43
|
+
}
|
|
44
|
+
const workspaceRoot = findWorkspaceRoot();
|
|
45
|
+
const config = await getConfig(workspaceRoot);
|
|
46
|
+
Object.keys(projectJson).forEach((key) => {
|
|
47
|
+
if (!project[key]) {
|
|
48
|
+
project[key] = projectJson[key];
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
const project = {
|
|
52
|
+
root,
|
|
53
|
+
name: projectJson?.name
|
|
54
|
+
};
|
|
55
|
+
const engine = options2.defaultEngine ?? "docker";
|
|
56
|
+
const labels = [
|
|
57
|
+
`org.opencontainers.image.ref.name=${project.name}`,
|
|
58
|
+
`org.opencontainers.image.title=${titleCase(project.name)}`,
|
|
59
|
+
`org.opencontainers.image.authors=${config.organization ? titleCase(config.organization) : "Storm Software"}`,
|
|
60
|
+
`org.opencontainers.image.vendor=${config.organization ? titleCase(config.organization) : "Storm Software"}`,
|
|
61
|
+
`org.opencontainers.image.documentation=${config.docs}`,
|
|
62
|
+
`org.opencontainers.image.url=${config.homepage}`,
|
|
63
|
+
`org.opencontainers.image.source=${config.repository}`
|
|
64
|
+
];
|
|
65
|
+
let tag = "latest";
|
|
66
|
+
const packageManager = getPackageInfo(project);
|
|
67
|
+
if (packageManager) {
|
|
68
|
+
if (packageManager.type === "Cargo.toml") {
|
|
69
|
+
tag = packageManager.content.package.version;
|
|
70
|
+
labels.push(
|
|
71
|
+
`org.opencontainers.image.description=${packageManager.content.package.description}`
|
|
72
|
+
);
|
|
73
|
+
} else if (packageManager.type === "package.json") {
|
|
74
|
+
tag = packageManager.content.version;
|
|
75
|
+
labels.push(
|
|
76
|
+
`org.opencontainers.image.description=${packageManager.content.description}`
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
project.targets = {
|
|
81
|
+
...project.targets,
|
|
82
|
+
container: {
|
|
83
|
+
executor: "@nx-tools/nx-container:build",
|
|
84
|
+
options: {
|
|
85
|
+
file: dockerFilePath,
|
|
86
|
+
engine,
|
|
87
|
+
labels,
|
|
88
|
+
push: true,
|
|
89
|
+
platforms: ["linux/amd64"],
|
|
90
|
+
metadata: {
|
|
91
|
+
images: [
|
|
92
|
+
`${config.namespace ? config.namespace : "storm-software"}/${project.name?.replace(`${config.namespace}-`, "")}`,
|
|
93
|
+
`ghcr.io/${config.organization ? config.organization : "storm-software"}/${project.name}`
|
|
94
|
+
],
|
|
95
|
+
tags: [
|
|
96
|
+
"type=schedule",
|
|
97
|
+
"type=ref,event=branch",
|
|
98
|
+
"type=ref,event=tag",
|
|
99
|
+
"type=ref,event=pr",
|
|
100
|
+
"type=semver,pattern={{version}}",
|
|
101
|
+
"type=semver,pattern={{major}}.{{minor}}",
|
|
102
|
+
"type=semver,pattern={{major}}",
|
|
103
|
+
"type=sha"
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
defaultConfiguration: "production",
|
|
108
|
+
configurations: {
|
|
109
|
+
development: {
|
|
110
|
+
quiet: false,
|
|
111
|
+
"build-args": [
|
|
112
|
+
"ENVIRONMENT=development",
|
|
113
|
+
"DEBUG_IMAGE=true",
|
|
114
|
+
`RELEASE=${tag}`
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
production: {
|
|
118
|
+
quiet: true,
|
|
119
|
+
"build-args": [
|
|
120
|
+
"ENVIRONMENT=production",
|
|
121
|
+
"DEBUG_IMAGE=false",
|
|
122
|
+
`RELEASE=${tag}`
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
if ((isEqualProjectTag(
|
|
129
|
+
project,
|
|
130
|
+
ProjectTagConstants.ProjectType.TAG_ID,
|
|
131
|
+
ProjectTagConstants.ProjectType.APPLICATION
|
|
132
|
+
) || project.projectType === "application") && hasProjectTag(project, ProjectTagConstants.Registry.TAG_ID)) {
|
|
133
|
+
if (project.targets["nx-release-publish"]) {
|
|
134
|
+
project.targets["nx-release-publish"] = {
|
|
135
|
+
...project.targets["nx-release-publish"],
|
|
136
|
+
executor: "@storm-software/k8s-tools:container-publish",
|
|
137
|
+
options: {
|
|
138
|
+
packageRoot: project.root
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
} else {
|
|
142
|
+
project.targets["nx-release-publish"] = {
|
|
143
|
+
cache: true,
|
|
144
|
+
inputs: [
|
|
145
|
+
"linting",
|
|
146
|
+
"testing",
|
|
147
|
+
"documentation",
|
|
148
|
+
"rust",
|
|
149
|
+
"^production"
|
|
150
|
+
],
|
|
151
|
+
dependsOn: ["build", "^nx-release-publish"],
|
|
152
|
+
executor: "@storm-software/k8s-tools:container-publish",
|
|
153
|
+
options: {
|
|
154
|
+
packageRoot: project.root
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
setDefaultProjectTags(project);
|
|
160
|
+
const projects = {};
|
|
161
|
+
const externalNodes = {};
|
|
162
|
+
projects[project.root] = {
|
|
163
|
+
...project,
|
|
164
|
+
release: {
|
|
165
|
+
...project.release,
|
|
166
|
+
version: {
|
|
167
|
+
...project.release?.version,
|
|
168
|
+
generator: "@storm-software/workspace-tools:release-version"
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
return {
|
|
173
|
+
projects,
|
|
174
|
+
externalNodes
|
|
175
|
+
};
|
|
176
|
+
} catch (e) {
|
|
177
|
+
console.error(e);
|
|
178
|
+
return {};
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
configFiles,
|
|
182
|
+
options,
|
|
183
|
+
context
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
];
|
|
187
|
+
var titleCase = (input) => {
|
|
188
|
+
if (!input) {
|
|
189
|
+
return "";
|
|
190
|
+
}
|
|
191
|
+
return input.split(/(?=[A-Z])|[\.\-\s_]/).map((s) => s.trim()).filter((s) => !!s).map(
|
|
192
|
+
(s) => s ? s.toLowerCase().charAt(0).toUpperCase() + s.toLowerCase().slice(1) : s
|
|
193
|
+
).join(" ");
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
export {
|
|
197
|
+
name,
|
|
198
|
+
description,
|
|
199
|
+
createNodesV2
|
|
200
|
+
};
|
|
@@ -3,6 +3,19 @@ import {
|
|
|
3
3
|
joinPathFragments,
|
|
4
4
|
readJsonFile
|
|
5
5
|
} from "@nx/devkit";
|
|
6
|
+
|
|
7
|
+
// ../config-tools/src/utilities/toml.ts
|
|
8
|
+
import TOML from "@ltd/j-toml";
|
|
9
|
+
function parseCargoToml(cargoString) {
|
|
10
|
+
if (!cargoString) {
|
|
11
|
+
throw new Error("Cargo.toml is empty");
|
|
12
|
+
}
|
|
13
|
+
return TOML.parse(cargoString, {
|
|
14
|
+
x: { comment: true }
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// ../workspace-tools/src/utils/package-helpers.ts
|
|
6
19
|
import { existsSync } from "node:fs";
|
|
7
20
|
|
|
8
21
|
// ../workspace-tools/src/utils/project-tags.ts
|
|
@@ -108,18 +121,6 @@ var setDefaultProjectTags = (project, plugin) => {
|
|
|
108
121
|
}
|
|
109
122
|
};
|
|
110
123
|
|
|
111
|
-
// ../workspace-tools/src/utils/toml.ts
|
|
112
|
-
import TOML from "@ltd/j-toml";
|
|
113
|
-
import { logger } from "@nx/devkit";
|
|
114
|
-
function parseCargoToml(cargoString) {
|
|
115
|
-
if (!cargoString) {
|
|
116
|
-
throw new Error("Cargo.toml is empty");
|
|
117
|
-
}
|
|
118
|
-
return TOML.parse(cargoString, {
|
|
119
|
-
x: { comment: true }
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
|
|
123
124
|
// ../workspace-tools/src/utils/package-helpers.ts
|
|
124
125
|
var getPackageInfo = (project) => {
|
|
125
126
|
if (isEqualProjectTag(
|
|
@@ -3,6 +3,19 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
var _devkit = require('@nx/devkit');
|
|
6
|
+
|
|
7
|
+
// ../config-tools/src/utilities/toml.ts
|
|
8
|
+
var _jtoml = require('@ltd/j-toml'); var _jtoml2 = _interopRequireDefault(_jtoml);
|
|
9
|
+
function parseCargoToml(cargoString) {
|
|
10
|
+
if (!cargoString) {
|
|
11
|
+
throw new Error("Cargo.toml is empty");
|
|
12
|
+
}
|
|
13
|
+
return _jtoml2.default.parse(cargoString, {
|
|
14
|
+
x: { comment: true }
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// ../workspace-tools/src/utils/package-helpers.ts
|
|
6
19
|
var _fs = require('fs');
|
|
7
20
|
|
|
8
21
|
// ../workspace-tools/src/utils/project-tags.ts
|
|
@@ -108,18 +121,6 @@ var setDefaultProjectTags = (project, plugin) => {
|
|
|
108
121
|
}
|
|
109
122
|
};
|
|
110
123
|
|
|
111
|
-
// ../workspace-tools/src/utils/toml.ts
|
|
112
|
-
var _jtoml = require('@ltd/j-toml'); var _jtoml2 = _interopRequireDefault(_jtoml);
|
|
113
|
-
|
|
114
|
-
function parseCargoToml(cargoString) {
|
|
115
|
-
if (!cargoString) {
|
|
116
|
-
throw new Error("Cargo.toml is empty");
|
|
117
|
-
}
|
|
118
|
-
return _jtoml2.default.parse(cargoString, {
|
|
119
|
-
x: { comment: true }
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
|
|
123
124
|
// ../workspace-tools/src/utils/package-helpers.ts
|
|
124
125
|
var getPackageInfo = (project) => {
|
|
125
126
|
if (isEqualProjectTag(
|
package/dist/executors.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-XO66D74Z.js');
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkQC45ZBCDjs = require('./chunk-QC45ZBCD.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkA7ARE63Fjs = require('./chunk-A7ARE63F.js');
|
|
8
|
-
require('./chunk-
|
|
8
|
+
require('./chunk-XZP5ZUYN.js');
|
|
9
9
|
require('./chunk-DD5DCADP.js');
|
|
10
10
|
require('./chunk-UWVOFPSW.js');
|
|
11
11
|
require('./chunk-4AADQIGW.js');
|
|
@@ -15,4 +15,4 @@ require('./chunk-RECJ3G6F.js');
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
exports.getRegistryVersion =
|
|
18
|
+
exports.getRegistryVersion = _chunkQC45ZBCDjs.getRegistryVersion; exports.serveExecutor = _chunkA7ARE63Fjs.serveExecutor;
|
package/dist/executors.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "./chunk-YSCEY447.mjs";
|
|
2
2
|
import {
|
|
3
3
|
getRegistryVersion
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-O2NTRG6T.mjs";
|
|
5
5
|
import {
|
|
6
6
|
serveExecutor
|
|
7
7
|
} from "./chunk-NWIIGYA4.mjs";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-WV3ZYQE2.mjs";
|
|
9
9
|
import "./chunk-MDGD27YL.mjs";
|
|
10
10
|
import "./chunk-MWMS7P7U.mjs";
|
|
11
11
|
import "./chunk-RUROM5AC.mjs";
|
package/dist/index.d.mts
CHANGED
|
@@ -3,7 +3,7 @@ export { C as ContainerPublishExecutorSchema } from './schema.d-Cx_3iG9A.mjs';
|
|
|
3
3
|
export { H as HelmPackageExecutorSchema, s as serveExecutor } from './executor-DrSw4Xm3.mjs';
|
|
4
4
|
export { H as HelmChartGeneratorSchema, h as helmChartGeneratorFn } from './generator-CB8TPfuo.mjs';
|
|
5
5
|
export { H as HelmDependencyGeneratorSchema, h as helmDependencyGeneratorFn } from './generator-C4BB5aOn.mjs';
|
|
6
|
-
export { DockerFilePluginOptions,
|
|
6
|
+
export { DockerFilePluginOptions, createNodesV2, description, name } from './src/plugins/docker/index.mjs';
|
|
7
7
|
export { AbstractHelmClient, Initializable, PackageOptions, PrettierConfig, PushOptions } from './src/types.mjs';
|
|
8
8
|
export { HelmClient, createHelmClient } from './src/utils/client.mjs';
|
|
9
9
|
export { ensureInitialized } from './src/utils/ensure-init.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { C as ContainerPublishExecutorSchema } from './schema.d-Cx_3iG9A.js';
|
|
|
3
3
|
export { H as HelmPackageExecutorSchema, s as serveExecutor } from './executor-DrSw4Xm3.js';
|
|
4
4
|
export { H as HelmChartGeneratorSchema, h as helmChartGeneratorFn } from './generator-CB8TPfuo.js';
|
|
5
5
|
export { H as HelmDependencyGeneratorSchema, h as helmDependencyGeneratorFn } from './generator-C4BB5aOn.js';
|
|
6
|
-
export { DockerFilePluginOptions,
|
|
6
|
+
export { DockerFilePluginOptions, createNodesV2, description, name } from './src/plugins/docker/index.js';
|
|
7
7
|
export { AbstractHelmClient, Initializable, PackageOptions, PrettierConfig, PushOptions } from './src/types.js';
|
|
8
8
|
export { HelmClient, createHelmClient } from './src/utils/client.js';
|
|
9
9
|
export { ensureInitialized } from './src/utils/ensure-init.js';
|
package/dist/index.js
CHANGED
|
@@ -2,16 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
var _chunkY2HMMGO2js = require('./chunk-Y2HMMGO2.js');
|
|
5
|
+
var _chunkNHN57PGKjs = require('./chunk-NHN57PGK.js');
|
|
7
6
|
require('./chunk-XO66D74Z.js');
|
|
8
7
|
|
|
9
8
|
|
|
10
|
-
var
|
|
9
|
+
var _chunkQC45ZBCDjs = require('./chunk-QC45ZBCD.js');
|
|
11
10
|
|
|
12
11
|
|
|
13
12
|
var _chunkA7ARE63Fjs = require('./chunk-A7ARE63F.js');
|
|
14
|
-
require('./chunk-
|
|
13
|
+
require('./chunk-XZP5ZUYN.js');
|
|
15
14
|
require('./chunk-DHBG5ASJ.js');
|
|
16
15
|
|
|
17
16
|
|
|
@@ -52,5 +51,4 @@ require('./chunk-RECJ3G6F.js');
|
|
|
52
51
|
|
|
53
52
|
|
|
54
53
|
|
|
55
|
-
|
|
56
|
-
exports.AbstractHelmClient = _chunkJSFRUBG5js.AbstractHelmClient; exports.HelmClient = _chunk4AADQIGWjs.HelmClient; exports.addToPrettierIgnore = _chunk7QVOU2PTjs.addToPrettierIgnore; exports.createDependencies = _chunkY2HMMGO2js.createDependencies; exports.createHelmClient = _chunk4AADQIGWjs.createHelmClient; exports.createNodes = _chunkY2HMMGO2js.createNodes; exports.description = _chunkY2HMMGO2js.description; exports.ensureInitialized = _chunkXKOZIQT3js.ensureInitialized; exports.getRegistryVersion = _chunkSGNASGK5js.getRegistryVersion; exports.helmChartGeneratorFn = _chunkNMNRCEUZjs.helmChartGeneratorFn; exports.helmDependencyGeneratorFn = _chunkGQUK4O4Ejs.helmDependencyGeneratorFn; exports.name = _chunkY2HMMGO2js.name; exports.resolveUserExistingPrettierConfig = _chunk7QVOU2PTjs.resolveUserExistingPrettierConfig; exports.serveExecutor = _chunkA7ARE63Fjs.serveExecutor;
|
|
54
|
+
exports.AbstractHelmClient = _chunkJSFRUBG5js.AbstractHelmClient; exports.HelmClient = _chunk4AADQIGWjs.HelmClient; exports.addToPrettierIgnore = _chunk7QVOU2PTjs.addToPrettierIgnore; exports.createHelmClient = _chunk4AADQIGWjs.createHelmClient; exports.createNodesV2 = _chunkNHN57PGKjs.createNodesV2; exports.description = _chunkNHN57PGKjs.description; exports.ensureInitialized = _chunkXKOZIQT3js.ensureInitialized; exports.getRegistryVersion = _chunkQC45ZBCDjs.getRegistryVersion; exports.helmChartGeneratorFn = _chunkNMNRCEUZjs.helmChartGeneratorFn; exports.helmDependencyGeneratorFn = _chunkGQUK4O4Ejs.helmDependencyGeneratorFn; exports.name = _chunkNHN57PGKjs.name; exports.resolveUserExistingPrettierConfig = _chunk7QVOU2PTjs.resolveUserExistingPrettierConfig; exports.serveExecutor = _chunkA7ARE63Fjs.serveExecutor;
|
package/dist/index.mjs
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
createNodes,
|
|
2
|
+
createNodesV2,
|
|
4
3
|
description,
|
|
5
4
|
name
|
|
6
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-RGCWOU4G.mjs";
|
|
7
6
|
import "./chunk-YSCEY447.mjs";
|
|
8
7
|
import {
|
|
9
8
|
getRegistryVersion
|
|
10
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-O2NTRG6T.mjs";
|
|
11
10
|
import {
|
|
12
11
|
serveExecutor
|
|
13
12
|
} from "./chunk-NWIIGYA4.mjs";
|
|
14
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-WV3ZYQE2.mjs";
|
|
15
14
|
import "./chunk-3J7KBHMJ.mjs";
|
|
16
15
|
import {
|
|
17
16
|
helmChartGeneratorFn
|
|
@@ -42,9 +41,8 @@ export {
|
|
|
42
41
|
AbstractHelmClient,
|
|
43
42
|
HelmClient,
|
|
44
43
|
addToPrettierIgnore,
|
|
45
|
-
createDependencies,
|
|
46
44
|
createHelmClient,
|
|
47
|
-
|
|
45
|
+
createNodesV2,
|
|
48
46
|
description,
|
|
49
47
|
ensureInitialized,
|
|
50
48
|
getRegistryVersion,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../../../chunk-
|
|
4
|
+
var _chunkQC45ZBCDjs = require('../../../chunk-QC45ZBCD.js');
|
|
5
|
+
require('../../../chunk-XZP5ZUYN.js');
|
|
6
6
|
require('../../../chunk-DD5DCADP.js');
|
|
7
7
|
require('../../../chunk-UWVOFPSW.js');
|
|
8
8
|
require('../../../chunk-RECJ3G6F.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
exports.default =
|
|
12
|
+
exports.default = _chunkQC45ZBCDjs.publishExecutor; exports.getRegistryVersion = _chunkQC45ZBCDjs.getRegistryVersion;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getRegistryVersion,
|
|
3
3
|
publishExecutor
|
|
4
|
-
} from "../../../chunk-
|
|
5
|
-
import "../../../chunk-
|
|
4
|
+
} from "../../../chunk-O2NTRG6T.mjs";
|
|
5
|
+
import "../../../chunk-WV3ZYQE2.mjs";
|
|
6
6
|
import "../../../chunk-MDGD27YL.mjs";
|
|
7
7
|
import "../../../chunk-MWMS7P7U.mjs";
|
|
8
8
|
import "../../../chunk-27DDDFDE.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CreateNodesV2 } from '@nx/devkit';
|
|
2
2
|
import { E as ExternalContainerExecutorSchema } from '../../../schema.d-Cx_3iG9A.mjs';
|
|
3
3
|
|
|
4
4
|
declare const name = "storm-software/docker";
|
|
@@ -6,7 +6,6 @@ declare const description = "Plugin for parsing Dockerfile files";
|
|
|
6
6
|
interface DockerFilePluginOptions {
|
|
7
7
|
defaultEngine?: ExternalContainerExecutorSchema["engine"];
|
|
8
8
|
}
|
|
9
|
-
declare const
|
|
10
|
-
declare const createDependencies: CreateDependencies;
|
|
9
|
+
declare const createNodesV2: CreateNodesV2<DockerFilePluginOptions>;
|
|
11
10
|
|
|
12
|
-
export { type DockerFilePluginOptions,
|
|
11
|
+
export { type DockerFilePluginOptions, createNodesV2, description, name };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CreateNodesV2 } from '@nx/devkit';
|
|
2
2
|
import { E as ExternalContainerExecutorSchema } from '../../../schema.d-Cx_3iG9A.js';
|
|
3
3
|
|
|
4
4
|
declare const name = "storm-software/docker";
|
|
@@ -6,7 +6,6 @@ declare const description = "Plugin for parsing Dockerfile files";
|
|
|
6
6
|
interface DockerFilePluginOptions {
|
|
7
7
|
defaultEngine?: ExternalContainerExecutorSchema["engine"];
|
|
8
8
|
}
|
|
9
|
-
declare const
|
|
10
|
-
declare const createDependencies: CreateDependencies;
|
|
9
|
+
declare const createNodesV2: CreateNodesV2<DockerFilePluginOptions>;
|
|
11
10
|
|
|
12
|
-
export { type DockerFilePluginOptions,
|
|
11
|
+
export { type DockerFilePluginOptions, createNodesV2, description, name };
|
|
@@ -2,14 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
require('../../../chunk-RUPAIXLM.js');
|
|
5
|
+
var _chunkNHN57PGKjs = require('../../../chunk-NHN57PGK.js');
|
|
6
|
+
require('../../../chunk-XZP5ZUYN.js');
|
|
8
7
|
require('../../../chunk-UWVOFPSW.js');
|
|
9
8
|
require('../../../chunk-RECJ3G6F.js');
|
|
10
9
|
|
|
11
10
|
|
|
12
11
|
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
exports.createDependencies = _chunkY2HMMGO2js.createDependencies; exports.createNodes = _chunkY2HMMGO2js.createNodes; exports.description = _chunkY2HMMGO2js.description; exports.name = _chunkY2HMMGO2js.name;
|
|
13
|
+
exports.createNodesV2 = _chunkNHN57PGKjs.createNodesV2; exports.description = _chunkNHN57PGKjs.description; exports.name = _chunkNHN57PGKjs.name;
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
createNodes,
|
|
2
|
+
createNodesV2,
|
|
4
3
|
description,
|
|
5
4
|
name
|
|
6
|
-
} from "../../../chunk-
|
|
7
|
-
import "../../../chunk-
|
|
5
|
+
} from "../../../chunk-RGCWOU4G.mjs";
|
|
6
|
+
import "../../../chunk-WV3ZYQE2.mjs";
|
|
8
7
|
import "../../../chunk-MWMS7P7U.mjs";
|
|
9
8
|
import "../../../chunk-27DDDFDE.mjs";
|
|
10
9
|
export {
|
|
11
|
-
|
|
12
|
-
createNodes,
|
|
10
|
+
createNodesV2,
|
|
13
11
|
description,
|
|
14
12
|
name
|
|
15
13
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/k8s-tools",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.1",
|
|
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.
|
|
144
|
-
"@storm-software/config-tools": "^1.
|
|
145
|
-
"@storm-software/workspace-tools": "^1.
|
|
143
|
+
"@storm-software/config": "^1.119.1",
|
|
144
|
+
"@storm-software/config-tools": "^1.169.1",
|
|
145
|
+
"@storm-software/workspace-tools": "^1.273.1",
|
|
146
146
|
"js-yaml": "^4.1.0"
|
|
147
147
|
},
|
|
148
148
|
"devDependencies": {
|
package/dist/chunk-MQZUEUAT.mjs
DELETED
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ProjectTagConstants,
|
|
3
|
-
getPackageInfo,
|
|
4
|
-
hasProjectTag,
|
|
5
|
-
isEqualProjectTag,
|
|
6
|
-
setDefaultProjectTags
|
|
7
|
-
} from "./chunk-ARIMP3W4.mjs";
|
|
8
|
-
import {
|
|
9
|
-
findWorkspaceRoot,
|
|
10
|
-
getConfig
|
|
11
|
-
} from "./chunk-MWMS7P7U.mjs";
|
|
12
|
-
|
|
13
|
-
// src/plugins/docker/_dockerfile.ts
|
|
14
|
-
import {
|
|
15
|
-
joinPathFragments,
|
|
16
|
-
readJsonFile
|
|
17
|
-
} from "@nx/devkit";
|
|
18
|
-
import { existsSync } from "node:fs";
|
|
19
|
-
var name = "storm-software/docker";
|
|
20
|
-
var description = "Plugin for parsing Dockerfile files";
|
|
21
|
-
var createNodes = [
|
|
22
|
-
"*/**/{Dockerfile,Dockerfile.*}",
|
|
23
|
-
async (dockerFilePath, opts = {
|
|
24
|
-
defaultEngine: "docker"
|
|
25
|
-
}, _) => {
|
|
26
|
-
if (!dockerFilePath) {
|
|
27
|
-
return {};
|
|
28
|
-
}
|
|
29
|
-
const root = dockerFilePath.substring(dockerFilePath.lastIndexOf("/") + 1);
|
|
30
|
-
const projectJsonPath = joinPathFragments(root, "project.json");
|
|
31
|
-
if (!existsSync(projectJsonPath)) {
|
|
32
|
-
return {};
|
|
33
|
-
}
|
|
34
|
-
const projectJson = readJsonFile(projectJsonPath);
|
|
35
|
-
if (projectJson?.name) {
|
|
36
|
-
return {};
|
|
37
|
-
}
|
|
38
|
-
const workspaceRoot = findWorkspaceRoot();
|
|
39
|
-
const config = await getConfig(workspaceRoot);
|
|
40
|
-
Object.keys(projectJson).forEach((key) => {
|
|
41
|
-
if (!project[key]) {
|
|
42
|
-
project[key] = projectJson[key];
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
const project = {
|
|
46
|
-
root,
|
|
47
|
-
name: projectJson?.name
|
|
48
|
-
};
|
|
49
|
-
const engine = opts.defaultEngine ?? "docker";
|
|
50
|
-
const labels = [
|
|
51
|
-
`org.opencontainers.image.ref.name=${project.name}`,
|
|
52
|
-
`org.opencontainers.image.title=${titleCase(project.name)}`,
|
|
53
|
-
`org.opencontainers.image.authors=${config.organization ? titleCase(config.organization) : "Storm Software"}`,
|
|
54
|
-
`org.opencontainers.image.vendor=${config.organization ? titleCase(config.organization) : "Storm Software"}`,
|
|
55
|
-
`org.opencontainers.image.documentation=${config.docs}`,
|
|
56
|
-
`org.opencontainers.image.url=${config.homepage}`,
|
|
57
|
-
`org.opencontainers.image.source=${config.repository}`
|
|
58
|
-
];
|
|
59
|
-
let tag = "latest";
|
|
60
|
-
const packageManager = getPackageInfo(project);
|
|
61
|
-
if (packageManager) {
|
|
62
|
-
if (packageManager.type === "Cargo.toml") {
|
|
63
|
-
tag = packageManager.content.package.version;
|
|
64
|
-
labels.push(
|
|
65
|
-
`org.opencontainers.image.description=${packageManager.content.package.description}`
|
|
66
|
-
);
|
|
67
|
-
} else if (packageManager.type === "package.json") {
|
|
68
|
-
tag = packageManager.content.version;
|
|
69
|
-
labels.push(
|
|
70
|
-
`org.opencontainers.image.description=${packageManager.content.description}`
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
project.targets = {
|
|
75
|
-
...project.targets,
|
|
76
|
-
container: {
|
|
77
|
-
executor: "@nx-tools/nx-container:build",
|
|
78
|
-
options: {
|
|
79
|
-
file: dockerFilePath,
|
|
80
|
-
engine,
|
|
81
|
-
labels,
|
|
82
|
-
push: true,
|
|
83
|
-
platforms: ["linux/amd64"],
|
|
84
|
-
metadata: {
|
|
85
|
-
images: [
|
|
86
|
-
`${config.namespace ? config.namespace : "storm-software"}/${project.name?.replace(`${config.namespace}-`, "")}`,
|
|
87
|
-
`ghcr.io/${config.organization ? config.organization : "storm-software"}/${project.name}`
|
|
88
|
-
],
|
|
89
|
-
tags: [
|
|
90
|
-
"type=schedule",
|
|
91
|
-
"type=ref,event=branch",
|
|
92
|
-
"type=ref,event=tag",
|
|
93
|
-
"type=ref,event=pr",
|
|
94
|
-
"type=semver,pattern={{version}}",
|
|
95
|
-
"type=semver,pattern={{major}}.{{minor}}",
|
|
96
|
-
"type=semver,pattern={{major}}",
|
|
97
|
-
"type=sha"
|
|
98
|
-
]
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
defaultConfiguration: "production",
|
|
102
|
-
configurations: {
|
|
103
|
-
development: {
|
|
104
|
-
quiet: false,
|
|
105
|
-
"build-args": [
|
|
106
|
-
"ENVIRONMENT=development",
|
|
107
|
-
"DEBUG_IMAGE=true",
|
|
108
|
-
`RELEASE=${tag}`
|
|
109
|
-
]
|
|
110
|
-
},
|
|
111
|
-
production: {
|
|
112
|
-
quiet: true,
|
|
113
|
-
"build-args": [
|
|
114
|
-
"ENVIRONMENT=production",
|
|
115
|
-
"DEBUG_IMAGE=false",
|
|
116
|
-
`RELEASE=${tag}`
|
|
117
|
-
]
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
if ((isEqualProjectTag(
|
|
123
|
-
project,
|
|
124
|
-
ProjectTagConstants.ProjectType.TAG_ID,
|
|
125
|
-
ProjectTagConstants.ProjectType.APPLICATION
|
|
126
|
-
) || project.projectType === "application") && hasProjectTag(project, ProjectTagConstants.Registry.TAG_ID)) {
|
|
127
|
-
if (project.targets["nx-release-publish"]) {
|
|
128
|
-
project.targets["nx-release-publish"] = {
|
|
129
|
-
...project.targets["nx-release-publish"],
|
|
130
|
-
executor: "@storm-software/k8s-tools:container-publish",
|
|
131
|
-
options: {
|
|
132
|
-
packageRoot: project.root
|
|
133
|
-
}
|
|
134
|
-
};
|
|
135
|
-
} else {
|
|
136
|
-
project.targets["nx-release-publish"] = {
|
|
137
|
-
cache: true,
|
|
138
|
-
inputs: [
|
|
139
|
-
"linting",
|
|
140
|
-
"testing",
|
|
141
|
-
"documentation",
|
|
142
|
-
"rust",
|
|
143
|
-
"^production"
|
|
144
|
-
],
|
|
145
|
-
dependsOn: ["build", "^nx-release-publish"],
|
|
146
|
-
executor: "@storm-software/k8s-tools:container-publish",
|
|
147
|
-
options: {
|
|
148
|
-
packageRoot: project.root
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
setDefaultProjectTags(project);
|
|
154
|
-
const projects = {};
|
|
155
|
-
const externalNodes = {};
|
|
156
|
-
projects[project.root] = {
|
|
157
|
-
...project,
|
|
158
|
-
release: {
|
|
159
|
-
...project.release,
|
|
160
|
-
version: {
|
|
161
|
-
...project.release?.version,
|
|
162
|
-
generator: "@storm-software/workspace-tools:release-version"
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
};
|
|
166
|
-
return {
|
|
167
|
-
projects,
|
|
168
|
-
externalNodes
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
];
|
|
172
|
-
var createDependencies = (_, context) => {
|
|
173
|
-
return [];
|
|
174
|
-
};
|
|
175
|
-
var titleCase = (input) => {
|
|
176
|
-
if (!input) {
|
|
177
|
-
return "";
|
|
178
|
-
}
|
|
179
|
-
return input.split(/(?=[A-Z])|[\.\-\s_]/).map((s) => s.trim()).filter((s) => !!s).map(
|
|
180
|
-
(s) => s ? s.toLowerCase().charAt(0).toUpperCase() + s.toLowerCase().slice(1) : s
|
|
181
|
-
).join(" ");
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
export {
|
|
185
|
-
name,
|
|
186
|
-
description,
|
|
187
|
-
createNodes,
|
|
188
|
-
createDependencies
|
|
189
|
-
};
|
package/dist/chunk-Y2HMMGO2.js
DELETED
|
@@ -1,189 +0,0 @@
|
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var _chunkRUPAIXLMjs = require('./chunk-RUPAIXLM.js');
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var _chunkUWVOFPSWjs = require('./chunk-UWVOFPSW.js');
|
|
12
|
-
|
|
13
|
-
// src/plugins/docker/_dockerfile.ts
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
var _devkit = require('@nx/devkit');
|
|
18
|
-
var _fs = require('fs');
|
|
19
|
-
var name = "storm-software/docker";
|
|
20
|
-
var description = "Plugin for parsing Dockerfile files";
|
|
21
|
-
var createNodes = [
|
|
22
|
-
"*/**/{Dockerfile,Dockerfile.*}",
|
|
23
|
-
async (dockerFilePath, opts = {
|
|
24
|
-
defaultEngine: "docker"
|
|
25
|
-
}, _) => {
|
|
26
|
-
if (!dockerFilePath) {
|
|
27
|
-
return {};
|
|
28
|
-
}
|
|
29
|
-
const root = dockerFilePath.substring(dockerFilePath.lastIndexOf("/") + 1);
|
|
30
|
-
const projectJsonPath = _devkit.joinPathFragments.call(void 0, root, "project.json");
|
|
31
|
-
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
32
|
-
return {};
|
|
33
|
-
}
|
|
34
|
-
const projectJson = _devkit.readJsonFile.call(void 0, projectJsonPath);
|
|
35
|
-
if (_optionalChain([projectJson, 'optionalAccess', _2 => _2.name])) {
|
|
36
|
-
return {};
|
|
37
|
-
}
|
|
38
|
-
const workspaceRoot = _chunkUWVOFPSWjs.findWorkspaceRoot.call(void 0, );
|
|
39
|
-
const config = await _chunkUWVOFPSWjs.getConfig.call(void 0, workspaceRoot);
|
|
40
|
-
Object.keys(projectJson).forEach((key) => {
|
|
41
|
-
if (!project[key]) {
|
|
42
|
-
project[key] = projectJson[key];
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
const project = {
|
|
46
|
-
root,
|
|
47
|
-
name: _optionalChain([projectJson, 'optionalAccess', _3 => _3.name])
|
|
48
|
-
};
|
|
49
|
-
const engine = _nullishCoalesce(opts.defaultEngine, () => ( "docker"));
|
|
50
|
-
const labels = [
|
|
51
|
-
`org.opencontainers.image.ref.name=${project.name}`,
|
|
52
|
-
`org.opencontainers.image.title=${titleCase(project.name)}`,
|
|
53
|
-
`org.opencontainers.image.authors=${config.organization ? titleCase(config.organization) : "Storm Software"}`,
|
|
54
|
-
`org.opencontainers.image.vendor=${config.organization ? titleCase(config.organization) : "Storm Software"}`,
|
|
55
|
-
`org.opencontainers.image.documentation=${config.docs}`,
|
|
56
|
-
`org.opencontainers.image.url=${config.homepage}`,
|
|
57
|
-
`org.opencontainers.image.source=${config.repository}`
|
|
58
|
-
];
|
|
59
|
-
let tag = "latest";
|
|
60
|
-
const packageManager = _chunkRUPAIXLMjs.getPackageInfo.call(void 0, project);
|
|
61
|
-
if (packageManager) {
|
|
62
|
-
if (packageManager.type === "Cargo.toml") {
|
|
63
|
-
tag = packageManager.content.package.version;
|
|
64
|
-
labels.push(
|
|
65
|
-
`org.opencontainers.image.description=${packageManager.content.package.description}`
|
|
66
|
-
);
|
|
67
|
-
} else if (packageManager.type === "package.json") {
|
|
68
|
-
tag = packageManager.content.version;
|
|
69
|
-
labels.push(
|
|
70
|
-
`org.opencontainers.image.description=${packageManager.content.description}`
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
project.targets = {
|
|
75
|
-
...project.targets,
|
|
76
|
-
container: {
|
|
77
|
-
executor: "@nx-tools/nx-container:build",
|
|
78
|
-
options: {
|
|
79
|
-
file: dockerFilePath,
|
|
80
|
-
engine,
|
|
81
|
-
labels,
|
|
82
|
-
push: true,
|
|
83
|
-
platforms: ["linux/amd64"],
|
|
84
|
-
metadata: {
|
|
85
|
-
images: [
|
|
86
|
-
`${config.namespace ? config.namespace : "storm-software"}/${_optionalChain([project, 'access', _4 => _4.name, 'optionalAccess', _5 => _5.replace, 'call', _6 => _6(`${config.namespace}-`, "")])}`,
|
|
87
|
-
`ghcr.io/${config.organization ? config.organization : "storm-software"}/${project.name}`
|
|
88
|
-
],
|
|
89
|
-
tags: [
|
|
90
|
-
"type=schedule",
|
|
91
|
-
"type=ref,event=branch",
|
|
92
|
-
"type=ref,event=tag",
|
|
93
|
-
"type=ref,event=pr",
|
|
94
|
-
"type=semver,pattern={{version}}",
|
|
95
|
-
"type=semver,pattern={{major}}.{{minor}}",
|
|
96
|
-
"type=semver,pattern={{major}}",
|
|
97
|
-
"type=sha"
|
|
98
|
-
]
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
defaultConfiguration: "production",
|
|
102
|
-
configurations: {
|
|
103
|
-
development: {
|
|
104
|
-
quiet: false,
|
|
105
|
-
"build-args": [
|
|
106
|
-
"ENVIRONMENT=development",
|
|
107
|
-
"DEBUG_IMAGE=true",
|
|
108
|
-
`RELEASE=${tag}`
|
|
109
|
-
]
|
|
110
|
-
},
|
|
111
|
-
production: {
|
|
112
|
-
quiet: true,
|
|
113
|
-
"build-args": [
|
|
114
|
-
"ENVIRONMENT=production",
|
|
115
|
-
"DEBUG_IMAGE=false",
|
|
116
|
-
`RELEASE=${tag}`
|
|
117
|
-
]
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
if ((_chunkRUPAIXLMjs.isEqualProjectTag.call(void 0,
|
|
123
|
-
project,
|
|
124
|
-
_chunkRUPAIXLMjs.ProjectTagConstants.ProjectType.TAG_ID,
|
|
125
|
-
_chunkRUPAIXLMjs.ProjectTagConstants.ProjectType.APPLICATION
|
|
126
|
-
) || project.projectType === "application") && _chunkRUPAIXLMjs.hasProjectTag.call(void 0, project, _chunkRUPAIXLMjs.ProjectTagConstants.Registry.TAG_ID)) {
|
|
127
|
-
if (project.targets["nx-release-publish"]) {
|
|
128
|
-
project.targets["nx-release-publish"] = {
|
|
129
|
-
...project.targets["nx-release-publish"],
|
|
130
|
-
executor: "@storm-software/k8s-tools:container-publish",
|
|
131
|
-
options: {
|
|
132
|
-
packageRoot: project.root
|
|
133
|
-
}
|
|
134
|
-
};
|
|
135
|
-
} else {
|
|
136
|
-
project.targets["nx-release-publish"] = {
|
|
137
|
-
cache: true,
|
|
138
|
-
inputs: [
|
|
139
|
-
"linting",
|
|
140
|
-
"testing",
|
|
141
|
-
"documentation",
|
|
142
|
-
"rust",
|
|
143
|
-
"^production"
|
|
144
|
-
],
|
|
145
|
-
dependsOn: ["build", "^nx-release-publish"],
|
|
146
|
-
executor: "@storm-software/k8s-tools:container-publish",
|
|
147
|
-
options: {
|
|
148
|
-
packageRoot: project.root
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
_chunkRUPAIXLMjs.setDefaultProjectTags.call(void 0, project);
|
|
154
|
-
const projects = {};
|
|
155
|
-
const externalNodes = {};
|
|
156
|
-
projects[project.root] = {
|
|
157
|
-
...project,
|
|
158
|
-
release: {
|
|
159
|
-
...project.release,
|
|
160
|
-
version: {
|
|
161
|
-
..._optionalChain([project, 'access', _7 => _7.release, 'optionalAccess', _8 => _8.version]),
|
|
162
|
-
generator: "@storm-software/workspace-tools:release-version"
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
};
|
|
166
|
-
return {
|
|
167
|
-
projects,
|
|
168
|
-
externalNodes
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
];
|
|
172
|
-
var createDependencies = (_, context) => {
|
|
173
|
-
return [];
|
|
174
|
-
};
|
|
175
|
-
var titleCase = (input) => {
|
|
176
|
-
if (!input) {
|
|
177
|
-
return "";
|
|
178
|
-
}
|
|
179
|
-
return input.split(/(?=[A-Z])|[\.\-\s_]/).map((s) => s.trim()).filter((s) => !!s).map(
|
|
180
|
-
(s) => s ? s.toLowerCase().charAt(0).toUpperCase() + s.toLowerCase().slice(1) : s
|
|
181
|
-
).join(" ");
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
exports.name = name; exports.description = description; exports.createNodes = createNodes; exports.createDependencies = createDependencies;
|