@mittwald/cli 1.0.0-alpha.3 → 1.0.0-alpha.5
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/README.md +490 -749
- package/dist/esm/commands/app/dependency/getSystemsoftware.d.ts +3 -0
- package/dist/esm/commands/app/{getSystemsoftware.js → dependency/getSystemsoftware.js} +1 -1
- package/dist/esm/commands/app/dependency/getSystemsoftwareversion.d.ts +3 -0
- package/dist/esm/commands/app/{getSystemsoftwareversion.js → dependency/getSystemsoftwareversion.js} +1 -1
- package/dist/esm/commands/app/{listSystemsoftwares.d.ts → dependency/listSystemsoftwares.d.ts} +2 -2
- package/dist/esm/commands/app/{listSystemsoftwares.js → dependency/listSystemsoftwares.js} +1 -1
- package/dist/esm/commands/app/{listSystemsoftwareversions.d.ts → dependency/listSystemsoftwareversions.d.ts} +3 -3
- package/dist/esm/commands/app/{listSystemsoftwareversions.js → dependency/listSystemsoftwareversions.js} +1 -1
- package/dist/esm/commands/app/install/wordpress.d.ts +15 -0
- package/dist/esm/commands/app/install/wordpress.js +80 -0
- package/dist/esm/commands/app/versions.d.ts +12 -0
- package/dist/esm/commands/app/versions.js +53 -0
- package/dist/esm/commands/domain/dnszone/get.d.ts +3 -0
- package/dist/esm/commands/domain/{dnsZoneGetSpecific.js → dnszone/get.js} +1 -1
- package/dist/esm/commands/domain/dnszone/list.d.ts +3 -0
- package/dist/esm/commands/domain/{dnsZonesForProject.js → dnszone/list.js} +1 -1
- package/dist/esm/commands/domain/{getSpecificDomainOwnership.d.ts → ownership/get.d.ts} +1 -1
- package/dist/esm/commands/domain/{getSpecificDomainOwnership.js → ownership/get.js} +1 -1
- package/dist/esm/commands/domain/{listDomainOwnerships.d.ts → ownership/list.d.ts} +2 -2
- package/dist/esm/commands/domain/{listDomainOwnerships.js → ownership/list.js} +1 -1
- package/dist/esm/commands/org/invite/get.d.ts +3 -0
- package/dist/esm/commands/{customer/getCustomerInvite.js → org/invite/get.js} +1 -1
- package/dist/esm/commands/{customer/listCustomerInvites.d.ts → org/invite/list-own.d.ts} +2 -2
- package/dist/esm/commands/{customer/listCustomerInvites.js → org/invite/list-own.js} +1 -1
- package/dist/esm/commands/{customer/listInvitesForCustomer.d.ts → org/invite/list.d.ts} +2 -2
- package/dist/esm/commands/{customer/listInvitesForCustomer.js → org/invite/list.js} +1 -1
- package/dist/esm/commands/{customer/listCustomers.d.ts → org/list.d.ts} +2 -0
- package/dist/esm/commands/org/list.js +28 -0
- package/dist/esm/commands/org/membership/get.d.ts +3 -0
- package/dist/esm/commands/{customer/getCustomerMembership.js → org/membership/get.js} +1 -1
- package/dist/esm/commands/{customer/listCustomerMemberships.d.ts → org/membership/list-own.d.ts} +2 -2
- package/dist/esm/commands/{customer/listCustomerMemberships.js → org/membership/list-own.js} +1 -1
- package/dist/esm/commands/{customer/listMembershipsForCustomer.d.ts → org/membership/list.d.ts} +2 -2
- package/dist/esm/commands/{customer/listMembershipsForCustomer.js → org/membership/list.js} +1 -1
- package/dist/esm/commands/project/cronjob/execution/get.d.ts +3 -0
- package/dist/esm/commands/{cronjob/getExecution.js → project/cronjob/execution/get.js} +1 -1
- package/dist/esm/commands/{cronjob/listExecutions.d.ts → project/cronjob/execution/list.d.ts} +4 -2
- package/dist/esm/commands/project/cronjob/execution/list.js +22 -0
- package/dist/esm/commands/project/cronjob/get.d.ts +3 -0
- package/dist/esm/commands/{cronjob/getCronjob.js → project/cronjob/get.js} +1 -1
- package/dist/esm/commands/{cronjob/listCronjobs.d.ts → project/cronjob/list.d.ts} +4 -2
- package/dist/esm/commands/project/cronjob/list.js +26 -0
- package/dist/esm/lib/app/appHelpers.d.ts +4 -0
- package/dist/esm/lib/app/appHelpers.js +43 -0
- package/dist/esm/lib/app/appVersionHelpers.d.ts +5 -0
- package/dist/esm/lib/app/appVersionHelpers.js +35 -0
- package/package.json +3 -1
- package/dist/esm/commands/app/getApp.d.ts +0 -3
- package/dist/esm/commands/app/getApp.js +0 -6
- package/dist/esm/commands/app/getAppversion.d.ts +0 -3
- package/dist/esm/commands/app/getAppversion.js +0 -6
- package/dist/esm/commands/app/getSystemsoftware.d.ts +0 -3
- package/dist/esm/commands/app/getSystemsoftwareversion.d.ts +0 -3
- package/dist/esm/commands/app/listAppinstallations.d.ts +0 -9
- package/dist/esm/commands/app/listAppinstallations.js +0 -6
- package/dist/esm/commands/app/listApps.d.ts +0 -9
- package/dist/esm/commands/app/listApps.js +0 -6
- package/dist/esm/commands/app/listAppversions.d.ts +0 -9
- package/dist/esm/commands/app/listAppversions.js +0 -6
- package/dist/esm/commands/app/retrieveStatus.d.ts +0 -3
- package/dist/esm/commands/app/retrieveStatus.js +0 -6
- package/dist/esm/commands/cronjob/getCronjob.d.ts +0 -3
- package/dist/esm/commands/cronjob/getExecution.d.ts +0 -3
- package/dist/esm/commands/cronjob/listCronjobs.js +0 -6
- package/dist/esm/commands/cronjob/listExecutions.js +0 -6
- package/dist/esm/commands/customer/getCustomerCategory.d.ts +0 -3
- package/dist/esm/commands/customer/getCustomerCategory.js +0 -6
- package/dist/esm/commands/customer/getCustomerInvite.d.ts +0 -3
- package/dist/esm/commands/customer/getCustomerMembership.d.ts +0 -3
- package/dist/esm/commands/customer/getCustomerTokenInvite.d.ts +0 -3
- package/dist/esm/commands/customer/getCustomerTokenInvite.js +0 -6
- package/dist/esm/commands/customer/listCustomers.js +0 -6
- package/dist/esm/commands/customer/listOfCustomerCategories.d.ts +0 -9
- package/dist/esm/commands/customer/listOfCustomerCategories.js +0 -6
- package/dist/esm/commands/domain/dnsZoneGetSpecific.d.ts +0 -3
- package/dist/esm/commands/domain/dnsZonesForProject.d.ts +0 -3
- /package/dist/esm/commands/app/{getAppinstallation.d.ts → get.d.ts} +0 -0
- /package/dist/esm/commands/app/{getAppinstallation.js → get.js} +0 -0
- /package/dist/esm/commands/article/{getArticle.d.ts → get.d.ts} +0 -0
- /package/dist/esm/commands/article/{getArticle.js → get.js} +0 -0
- /package/dist/esm/commands/article/{listArticles.d.ts → list.d.ts} +0 -0
- /package/dist/esm/commands/article/{listArticles.js → list.js} +0 -0
- /package/dist/esm/commands/domain/{getHandleFields.d.ts → get-handle.d.ts} +0 -0
- /package/dist/esm/commands/domain/{getHandleFields.js → get-handle.js} +0 -0
- /package/dist/esm/commands/{customer/isCustomerLegallyCompetent.d.ts → org/can-order.d.ts} +0 -0
- /package/dist/esm/commands/{customer/isCustomerLegallyCompetent.js → org/can-order.js} +0 -0
- /package/dist/esm/commands/{customer/getCustomer.d.ts → org/get.d.ts} +0 -0
- /package/dist/esm/commands/{customer/getCustomer.js → org/get.js} +0 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { assertStatus } from "@mittwald/api-client-commons";
|
|
2
|
+
import { gt } from "semver";
|
|
3
|
+
// Get latest available Internal App Version for App UUID
|
|
4
|
+
export async function getLatestAvailableAppVersionForApp(apiClient, appId) {
|
|
5
|
+
const versions = await apiClient.app.listAppversions({
|
|
6
|
+
pathParameters: {
|
|
7
|
+
appId,
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
assertStatus(versions, 200);
|
|
11
|
+
if (versions.data.length === 0) {
|
|
12
|
+
return undefined;
|
|
13
|
+
}
|
|
14
|
+
let latestVersion = "0.0.0";
|
|
15
|
+
for (const version of versions.data) {
|
|
16
|
+
if (gt(version.internalVersion, latestVersion)) {
|
|
17
|
+
latestVersion = version.internalVersion;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return versions.data.find((item) => item.internalVersion === latestVersion);
|
|
21
|
+
}
|
|
22
|
+
// App Version UUID from App Version irellevant if internal or external
|
|
23
|
+
export async function getAppVersionUuidFromAppVersion(apiClient, appId, appVersion) {
|
|
24
|
+
const versions = await apiClient.app.listAppversions({
|
|
25
|
+
pathParameters: {
|
|
26
|
+
appId,
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
if (!appVersion) {
|
|
30
|
+
return getLatestAvailableAppVersionForApp(apiClient, appId);
|
|
31
|
+
}
|
|
32
|
+
assertStatus(versions, 200);
|
|
33
|
+
return versions.data.find((item) => item.internalVersion === appVersion ||
|
|
34
|
+
item.externalVersion === appVersion);
|
|
35
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/cli",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.5",
|
|
4
4
|
"description": "Auto-generated CLI for the mittwald API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
"parse-duration": "^1.1.0",
|
|
56
56
|
"pretty-bytes": "^6.1.0",
|
|
57
57
|
"react": "^18.2.0",
|
|
58
|
+
"semver": "^7.5.4",
|
|
58
59
|
"tempfile": "^5.0.0"
|
|
59
60
|
},
|
|
60
61
|
"resolutions": {
|
|
@@ -72,6 +73,7 @@
|
|
|
72
73
|
"@types/parse-duration": "^0.3.0",
|
|
73
74
|
"@types/pretty-bytes": "^5.2.0",
|
|
74
75
|
"@types/react": "^18",
|
|
76
|
+
"@types/semver": "^7.5.0",
|
|
75
77
|
"@typescript-eslint/eslint-plugin": "^5.61.0",
|
|
76
78
|
"@typescript-eslint/parser": "^5.61.0",
|
|
77
79
|
"@yarnpkg/pnpify": "^4.0.0-rc.48",
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
/* prettier-ignore */
|
|
3
|
-
/* This file is auto-generated with acg (@mittwald/api-code-generator) */
|
|
4
|
-
import { GeneratedAppGetAppversion } from "../../generated/app/getAppversion.js";
|
|
5
|
-
export default class Get extends GeneratedAppGetAppversion {
|
|
6
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Simplify } from "@mittwald/api-client-commons";
|
|
2
|
-
import { MittwaldAPIV2 } from "@mittwald/api-client";
|
|
3
|
-
import { SuccessfulResponse } from "../../types.js";
|
|
4
|
-
import { GeneratedAppListAppinstallations, Response } from "../../generated/app/listAppinstallations.js";
|
|
5
|
-
type ResponseItem = Simplify<MittwaldAPIV2.Paths.V2ProjectsProjectIdAppinstallations.Get.Responses.$200.Content.ApplicationJson[number]>;
|
|
6
|
-
export default class List extends GeneratedAppListAppinstallations<ResponseItem> {
|
|
7
|
-
protected mapData(data: SuccessfulResponse<Response, 200>["data"]): MittwaldAPIV2.Components.Schemas.AppAppInstallation[];
|
|
8
|
-
}
|
|
9
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Simplify } from "@mittwald/api-client-commons";
|
|
2
|
-
import { MittwaldAPIV2 } from "@mittwald/api-client";
|
|
3
|
-
import { SuccessfulResponse } from "../../types.js";
|
|
4
|
-
import { GeneratedAppListApps, Response } from "../../generated/app/listApps.js";
|
|
5
|
-
type ResponseItem = Simplify<MittwaldAPIV2.Paths.V2Apps.Get.Responses.$200.Content.ApplicationJson[number]>;
|
|
6
|
-
export default class List extends GeneratedAppListApps<ResponseItem> {
|
|
7
|
-
protected mapData(data: SuccessfulResponse<Response, 200>["data"]): MittwaldAPIV2.Components.Schemas.AppApp[];
|
|
8
|
-
}
|
|
9
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Simplify } from "@mittwald/api-client-commons";
|
|
2
|
-
import { MittwaldAPIV2 } from "@mittwald/api-client";
|
|
3
|
-
import { SuccessfulResponse } from "../../types.js";
|
|
4
|
-
import { GeneratedAppListAppversions, Response } from "../../generated/app/listAppversions.js";
|
|
5
|
-
type ResponseItem = Simplify<MittwaldAPIV2.Paths.V2AppsAppIdVersions.Get.Responses.$200.Content.ApplicationJson[number]>;
|
|
6
|
-
export default class List extends GeneratedAppListAppversions<ResponseItem> {
|
|
7
|
-
protected mapData(data: SuccessfulResponse<Response, 200>["data"]): MittwaldAPIV2.Components.Schemas.AppAppVersion[];
|
|
8
|
-
}
|
|
9
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
/* prettier-ignore */
|
|
3
|
-
/* This file is auto-generated with acg (@mittwald/api-code-generator) */
|
|
4
|
-
import { GeneratedAppRetrieveStatus } from "../../generated/app/retrieveStatus.js";
|
|
5
|
-
export default class Get extends GeneratedAppRetrieveStatus {
|
|
6
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
/* prettier-ignore */
|
|
3
|
-
/* This file is auto-generated with acg (@mittwald/api-code-generator) */
|
|
4
|
-
import { GeneratedCustomerGetCustomerCategory } from "../../generated/customer/getCustomerCategory.js";
|
|
5
|
-
export default class Get extends GeneratedCustomerGetCustomerCategory {
|
|
6
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
/* prettier-ignore */
|
|
3
|
-
/* This file is auto-generated with acg (@mittwald/api-code-generator) */
|
|
4
|
-
import { GeneratedCustomerGetCustomerTokenInvite } from "../../generated/customer/getCustomerTokenInvite.js";
|
|
5
|
-
export default class Get extends GeneratedCustomerGetCustomerTokenInvite {
|
|
6
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Simplify } from "@mittwald/api-client-commons";
|
|
2
|
-
import { MittwaldAPIV2 } from "@mittwald/api-client";
|
|
3
|
-
import { SuccessfulResponse } from "../../types.js";
|
|
4
|
-
import { GeneratedCustomerListOfCustomerCategories, Response } from "../../generated/customer/listOfCustomerCategories.js";
|
|
5
|
-
type ResponseItem = Simplify<Required<MittwaldAPIV2.Paths.V2CustomerCategories.Get.Responses.$200.Content.ApplicationJson>["categories"][number]>;
|
|
6
|
-
export default class List extends GeneratedCustomerListOfCustomerCategories<ResponseItem> {
|
|
7
|
-
protected mapData(data: SuccessfulResponse<Response, 200>["data"]): MittwaldAPIV2.Components.Schemas.CustomerCategory[];
|
|
8
|
-
}
|
|
9
|
-
export {};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|