@mittwald/cli 1.5.1 → 1.6.0
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/dist/commands/app/dependency/list.d.ts +1 -0
- package/dist/commands/app/dependency/versions.d.ts +1 -0
- package/dist/commands/app/get.js +1 -2
- package/dist/commands/app/list-upgrade-candidates.d.ts +1 -0
- package/dist/commands/app/list.d.ts +1 -0
- package/dist/commands/backup/delete.d.ts +1 -0
- package/dist/commands/backup/get.js +1 -2
- package/dist/commands/backup/list.d.ts +1 -0
- package/dist/commands/backup/schedule/list.d.ts +1 -0
- package/dist/commands/container/delete.d.ts +1 -0
- package/dist/commands/container/list.d.ts +1 -0
- package/dist/commands/container/logs.d.ts +1 -0
- package/dist/commands/conversation/categories.d.ts +1 -0
- package/dist/commands/conversation/create.d.ts +1 -0
- package/dist/commands/conversation/list.d.ts +1 -0
- package/dist/commands/conversation/reply.d.ts +1 -0
- package/dist/commands/cronjob/delete.d.ts +1 -0
- package/dist/commands/cronjob/execution/get.d.ts +1 -1
- package/dist/commands/cronjob/execution/list.d.ts +1 -0
- package/dist/commands/cronjob/execution/logs.d.ts +1 -0
- package/dist/commands/cronjob/get.js +1 -2
- package/dist/commands/cronjob/list.d.ts +1 -0
- package/dist/commands/database/list.d.ts +1 -0
- package/dist/commands/database/mysql/charsets.d.ts +1 -0
- package/dist/commands/database/mysql/delete.d.ts +1 -0
- package/dist/commands/database/mysql/get.d.ts +1 -1
- package/dist/commands/database/mysql/list.d.ts +1 -0
- package/dist/commands/database/mysql/user/delete.d.ts +1 -0
- package/dist/commands/database/mysql/user/get.d.ts +1 -1
- package/dist/commands/database/mysql/user/list.d.ts +1 -0
- package/dist/commands/database/mysql/versions.d.ts +1 -0
- package/dist/commands/database/redis/get.d.ts +1 -1
- package/dist/commands/database/redis/list.d.ts +1 -0
- package/dist/commands/database/redis/versions.d.ts +1 -0
- package/dist/commands/domain/dnszone/get.js +1 -2
- package/dist/commands/domain/dnszone/list.d.ts +1 -0
- package/dist/commands/domain/get.js +1 -2
- package/dist/commands/domain/list.d.ts +1 -0
- package/dist/commands/domain/virtualhost/delete.d.ts +1 -0
- package/dist/commands/domain/virtualhost/get.js +1 -2
- package/dist/commands/domain/virtualhost/list.d.ts +1 -0
- package/dist/commands/extension/list-installed.d.ts +1 -0
- package/dist/commands/extension/list.d.ts +1 -0
- package/dist/commands/mail/address/delete.d.ts +1 -0
- package/dist/commands/mail/address/get.d.ts +1 -1
- package/dist/commands/mail/address/list.d.ts +1 -0
- package/dist/commands/mail/deliverybox/delete.d.ts +1 -0
- package/dist/commands/mail/deliverybox/get.d.ts +1 -1
- package/dist/commands/mail/deliverybox/list.d.ts +1 -0
- package/dist/commands/org/delete.d.ts +1 -0
- package/dist/commands/org/get.js +1 -2
- package/dist/commands/org/invite/list-own.d.ts +1 -0
- package/dist/commands/org/invite/list.d.ts +1 -0
- package/dist/commands/org/list.d.ts +1 -0
- package/dist/commands/org/membership/list-own.d.ts +1 -0
- package/dist/commands/org/membership/list.d.ts +1 -0
- package/dist/commands/project/delete.d.ts +1 -0
- package/dist/commands/project/filesystem/usage.js +1 -2
- package/dist/commands/project/get.js +1 -2
- package/dist/commands/project/invite/get.d.ts +1 -1
- package/dist/commands/project/invite/list-own.d.ts +1 -0
- package/dist/commands/project/invite/list.d.ts +1 -0
- package/dist/commands/project/list.d.ts +1 -0
- package/dist/commands/project/membership/get-own.d.ts +1 -0
- package/dist/commands/project/membership/get.d.ts +1 -1
- package/dist/commands/project/membership/list-own.d.ts +1 -0
- package/dist/commands/project/membership/list.d.ts +1 -0
- package/dist/commands/registry/delete.d.ts +1 -0
- package/dist/commands/registry/list.d.ts +1 -0
- package/dist/commands/server/get.d.ts +1 -1
- package/dist/commands/server/list.d.ts +1 -0
- package/dist/commands/sftp-user/delete.d.ts +1 -0
- package/dist/commands/sftp-user/list.d.ts +1 -0
- package/dist/commands/ssh-user/delete.d.ts +1 -0
- package/dist/commands/ssh-user/list.d.ts +1 -0
- package/dist/commands/stack/delete.d.ts +1 -0
- package/dist/commands/stack/deploy.js +1 -8
- package/dist/commands/stack/list.d.ts +1 -0
- package/dist/commands/stack/ps.d.ts +1 -0
- package/dist/commands/stack/ps.js +1 -1
- package/dist/commands/user/api-token/get.d.ts +1 -1
- package/dist/commands/user/api-token/list.d.ts +1 -0
- package/dist/commands/user/api-token/revoke.d.ts +1 -0
- package/dist/commands/user/get.d.ts +1 -1
- package/dist/commands/user/session/get.d.ts +1 -1
- package/dist/commands/user/session/list.d.ts +1 -0
- package/dist/commands/user/ssh-key/delete.d.ts +1 -0
- package/dist/commands/user/ssh-key/get.d.ts +1 -1
- package/dist/commands/user/ssh-key/list.d.ts +1 -0
- package/dist/lib/basecommands/BaseCommand.d.ts +7 -5
- package/dist/lib/basecommands/BaseCommand.js +25 -8
- package/dist/lib/basecommands/CommandFlags.d.ts +3 -3
- package/dist/lib/basecommands/CoreBaseCommand.d.ts +12 -0
- package/dist/lib/basecommands/CoreBaseCommand.js +16 -0
- package/dist/lib/basecommands/DeleteBaseCommand.d.ts +1 -0
- package/dist/lib/basecommands/DeleteBaseCommand.js +1 -0
- package/dist/lib/basecommands/ExecRenderBaseCommand.d.ts +3 -0
- package/dist/lib/basecommands/ExecRenderBaseCommand.js +3 -0
- package/dist/lib/basecommands/ExtendedBaseCommand.d.ts +3 -0
- package/dist/lib/basecommands/ExtendedBaseCommand.js +3 -0
- package/dist/lib/basecommands/GetBaseCommand.d.ts +1 -1
- package/dist/lib/basecommands/GetBaseCommand.js +1 -0
- package/dist/lib/basecommands/ListBaseCommand.d.ts +1 -0
- package/dist/lib/basecommands/ListBaseCommand.js +1 -0
- package/dist/lib/basecommands/UnauthenticatedBaseCommand.d.ts +10 -0
- package/dist/lib/basecommands/UnauthenticatedBaseCommand.js +16 -0
- package/dist/lib/resources/stack/enrich.d.ts +2 -2
- package/dist/lib/resources/stack/enrich.js +1 -31
- package/package.json +8 -8
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { assertStatus, } from "@mittwald/api-client";
|
|
2
1
|
import { readFile } from "fs/promises";
|
|
3
2
|
import { parse } from "envfile";
|
|
4
|
-
export async function enrichStackDefinition(
|
|
3
|
+
export async function enrichStackDefinition(input) {
|
|
5
4
|
const enriched = structuredClone(input);
|
|
6
5
|
for (const serviceName of Object.keys(input.services ?? {})) {
|
|
7
6
|
let service = enriched.services[serviceName];
|
|
8
|
-
service = await setCommandAndEntrypointFromImage(apiClient, projectId, service);
|
|
9
7
|
service = await setEnvironmentFromEnvFile(service);
|
|
10
8
|
enriched.services[serviceName] = service;
|
|
11
9
|
}
|
|
@@ -25,31 +23,3 @@ async function setEnvironmentFromEnvFile(service) {
|
|
|
25
23
|
};
|
|
26
24
|
return enriched;
|
|
27
25
|
}
|
|
28
|
-
async function setCommandAndEntrypointFromImage(apiClient, projectId, service) {
|
|
29
|
-
const enriched = structuredClone(service);
|
|
30
|
-
const resp = await apiClient.container.getContainerImageConfig({
|
|
31
|
-
queryParameters: {
|
|
32
|
-
imageReference: service.image,
|
|
33
|
-
useCredentialsForProjectId: projectId,
|
|
34
|
-
},
|
|
35
|
-
});
|
|
36
|
-
assertStatus(resp, 200);
|
|
37
|
-
if (service.ports === undefined) {
|
|
38
|
-
enriched.ports = (resp.data.exposedPorts ?? []).map((p) => p.port);
|
|
39
|
-
}
|
|
40
|
-
if (service.command === undefined) {
|
|
41
|
-
let command = resp.data.command;
|
|
42
|
-
if (typeof command === "string") {
|
|
43
|
-
command = [command];
|
|
44
|
-
}
|
|
45
|
-
enriched.command = command;
|
|
46
|
-
}
|
|
47
|
-
if (service.entrypoint === undefined) {
|
|
48
|
-
let entrypoint = resp.data.entrypoint;
|
|
49
|
-
if (typeof entrypoint === "string") {
|
|
50
|
-
entrypoint = [entrypoint];
|
|
51
|
-
}
|
|
52
|
-
enriched.entrypoint = entrypoint;
|
|
53
|
-
}
|
|
54
|
-
return enriched;
|
|
55
|
-
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Hand-crafted CLI for the mittwald API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"type": "module",
|
|
18
18
|
"engines": {
|
|
19
|
-
"node": ">=
|
|
19
|
+
"node": ">=20.0.0"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
22
|
"clean": "(rimraf --glob dist tsconfig.*.tsbuildinfo) | true",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"marked-terminal": "^7.3.0",
|
|
63
63
|
"open": "^10.0.3",
|
|
64
64
|
"parse-duration": "^2.0.1",
|
|
65
|
-
"pretty-bytes": "^
|
|
65
|
+
"pretty-bytes": "^7.0.0",
|
|
66
66
|
"react": "^18.2.0",
|
|
67
67
|
"semver": "^7.5.4",
|
|
68
68
|
"semver-parser": "^4.1.6",
|
|
@@ -73,10 +73,10 @@
|
|
|
73
73
|
"uuid": "^11.0.3"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
|
-
"@jest/globals": "^
|
|
76
|
+
"@jest/globals": "^30.0.4",
|
|
77
77
|
"@oclif/test": "^4.0.4",
|
|
78
78
|
"@types/js-yaml": "^4.0.9",
|
|
79
|
-
"@types/node": "^
|
|
79
|
+
"@types/node": "^24.0.10",
|
|
80
80
|
"@types/react": "^18",
|
|
81
81
|
"@types/semver": "^7.5.0",
|
|
82
82
|
"@types/shell-escape": "^0.2.3",
|
|
@@ -88,11 +88,11 @@
|
|
|
88
88
|
"eslint-plugin-json": "^4.0.1",
|
|
89
89
|
"eslint-plugin-prettier": "^5.5.1",
|
|
90
90
|
"globals": "^16.0.0",
|
|
91
|
-
"jest": "^
|
|
91
|
+
"jest": "^30.0.4",
|
|
92
92
|
"license-checker-rseidelsohn": "^4.2.6",
|
|
93
93
|
"nock": "^14.0.0",
|
|
94
94
|
"oclif": "^4.14.31",
|
|
95
|
-
"prettier": "~3.
|
|
95
|
+
"prettier": "~3.6.2",
|
|
96
96
|
"prettier-plugin-jsdoc": "^1.3.2",
|
|
97
97
|
"prettier-plugin-package": "^1.4.0",
|
|
98
98
|
"prettier-plugin-sort-json": "^4.1.1",
|
|
@@ -223,7 +223,7 @@
|
|
|
223
223
|
],
|
|
224
224
|
"update": {
|
|
225
225
|
"node": {
|
|
226
|
-
"version": "
|
|
226
|
+
"version": "20.19.3"
|
|
227
227
|
},
|
|
228
228
|
"s3": {
|
|
229
229
|
"xz": true,
|