@mittwald/cli 1.0.0-alpha.20 → 1.0.0-alpha.22
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 +126 -176
- package/dist/esm/BaseCommand.js +1 -0
- package/dist/esm/Translator.js +2 -1
- package/dist/esm/commands/app/copy.d.ts +1 -0
- package/dist/esm/commands/app/copy.js +2 -1
- package/dist/esm/commands/app/{install → create}/node.d.ts +3 -2
- package/dist/esm/commands/app/create/node.js +13 -0
- package/dist/esm/commands/app/{install → create}/php.d.ts +3 -2
- package/dist/esm/commands/app/create/php.js +13 -0
- package/dist/esm/commands/app/dependency/list.js +1 -1
- package/dist/esm/commands/app/dependency/update.js +2 -2
- package/dist/esm/commands/app/dependency/versions.js +2 -2
- package/dist/esm/commands/app/list.d.ts +1 -1
- package/dist/esm/commands/app/list.js +7 -2
- package/dist/esm/commands/app/ssh.d.ts +11 -0
- package/dist/esm/commands/app/ssh.js +46 -0
- package/dist/esm/commands/app/uninstall.js +1 -1
- package/dist/esm/commands/app/versions.js +1 -1
- package/dist/esm/commands/conversation/close.js +1 -1
- package/dist/esm/commands/conversation/create.js +1 -1
- package/dist/esm/commands/conversation/reply.js +1 -1
- package/dist/esm/commands/conversation/show.js +2 -2
- package/dist/esm/commands/conversation/show2.js +1 -3
- package/dist/esm/commands/database/mysql/charsets.js +1 -3
- package/dist/esm/commands/database/mysql/create.d.ts +1 -0
- package/dist/esm/commands/database/mysql/create.js +4 -4
- package/dist/esm/commands/database/mysql/delete.js +1 -1
- package/dist/esm/commands/database/mysql/get.js +1 -1
- package/dist/esm/commands/database/mysql/list.d.ts +1 -1
- package/dist/esm/commands/database/mysql/list.js +2 -2
- package/dist/esm/commands/database/mysql/phpmyadmin.js +2 -2
- package/dist/esm/commands/database/mysql/user/get.js +1 -1
- package/dist/esm/commands/database/mysql/user/list.js +1 -3
- package/dist/esm/commands/database/redis/create.d.ts +1 -0
- package/dist/esm/commands/database/redis/create.js +3 -3
- package/dist/esm/commands/database/redis/get.js +1 -1
- package/dist/esm/commands/database/redis/list.d.ts +1 -1
- package/dist/esm/commands/database/redis/list.js +2 -2
- package/dist/esm/commands/database/redis/versions.d.ts +2 -2
- package/dist/esm/commands/database/redis/versions.js +2 -2
- package/dist/esm/commands/domain/list.d.ts +1 -1
- package/dist/esm/commands/domain/list.js +2 -4
- package/dist/esm/commands/domain/ownership/list.d.ts +10 -3
- package/dist/esm/commands/domain/ownership/list.js +17 -3
- package/dist/esm/commands/domain/virtualhost/create.d.ts +1 -0
- package/dist/esm/commands/domain/virtualhost/create.js +3 -3
- package/dist/esm/commands/domain/virtualhost/delete.js +1 -1
- package/dist/esm/commands/domain/virtualhost/get.js +4 -4
- package/dist/esm/commands/domain/virtualhost/list.d.ts +1 -0
- package/dist/esm/commands/domain/virtualhost/list.js +2 -2
- package/dist/esm/commands/mail/address/create.d.ts +1 -0
- package/dist/esm/commands/mail/address/create.js +2 -2
- package/dist/esm/commands/mail/address/delete.js +1 -1
- package/dist/esm/commands/mail/address/list.d.ts +1 -1
- package/dist/esm/commands/mail/address/list.js +2 -4
- package/dist/esm/commands/org/delete.d.ts +1 -1
- package/dist/esm/commands/org/delete.js +2 -2
- package/dist/esm/commands/org/get.d.ts +1 -1
- package/dist/esm/commands/org/get.js +3 -3
- package/dist/esm/commands/org/invite/list-own.js +1 -1
- package/dist/esm/commands/org/invite/list.d.ts +1 -1
- package/dist/esm/commands/org/invite/list.js +2 -2
- package/dist/esm/commands/org/invite/revoke.js +2 -2
- package/dist/esm/commands/org/invite.d.ts +1 -0
- package/dist/esm/commands/org/invite.js +2 -2
- package/dist/esm/commands/org/list.js +1 -3
- package/dist/esm/commands/org/membership/list-own.js +2 -4
- package/dist/esm/commands/org/membership/list.d.ts +2 -1
- package/dist/esm/commands/org/membership/list.js +3 -3
- package/dist/esm/commands/org/membership/revoke.js +3 -3
- package/dist/esm/commands/project/backup/create.d.ts +1 -0
- package/dist/esm/commands/project/backup/create.js +3 -3
- package/dist/esm/commands/project/backup/delete.js +1 -1
- package/dist/esm/commands/project/backup/download.js +3 -3
- package/dist/esm/commands/project/backup/list.d.ts +1 -1
- package/dist/esm/commands/project/backup/list.js +2 -2
- package/dist/esm/commands/project/backupschedule/list.d.ts +1 -1
- package/dist/esm/commands/project/backupschedule/list.js +2 -2
- package/dist/esm/commands/project/create.d.ts +1 -0
- package/dist/esm/commands/project/create.js +4 -4
- package/dist/esm/commands/project/cronjob/execution/get.js +1 -1
- package/dist/esm/commands/project/cronjob/execution/list.js +1 -3
- package/dist/esm/commands/project/cronjob/execution/logs.js +4 -3
- package/dist/esm/commands/project/cronjob/list.d.ts +1 -1
- package/dist/esm/commands/project/cronjob/list.js +2 -4
- package/dist/esm/commands/project/delete.d.ts +1 -1
- package/dist/esm/commands/project/delete.js +2 -2
- package/dist/esm/commands/project/filesystem/usage.d.ts +1 -1
- package/dist/esm/commands/project/filesystem/usage.js +3 -3
- package/dist/esm/commands/project/get.d.ts +1 -1
- package/dist/esm/commands/project/get.js +6 -6
- package/dist/esm/commands/project/list.d.ts +10 -2
- package/dist/esm/commands/project/list.js +10 -2
- package/dist/esm/commands/project/membership/list.js +1 -1
- package/dist/esm/commands/project/ssh.d.ts +1 -1
- package/dist/esm/commands/project/ssh.js +2 -2
- package/dist/esm/commands/project/update.d.ts +1 -1
- package/dist/esm/commands/project/update.js +1 -1
- package/dist/esm/commands/user/api-token/revoke.js +1 -1
- package/dist/esm/commands/user/ssh-key/delete.js +1 -1
- package/dist/esm/generated/conversation/getCategory.js +1 -1
- package/dist/esm/generated/conversation/getConversation.js +1 -1
- package/dist/esm/generated/conversation/listCategories.js +1 -3
- package/dist/esm/generated/conversation/listConversations.js +1 -3
- package/dist/esm/generated/conversation/listMessagesByConversation.js +1 -3
- package/dist/esm/generated/cronjob/getCronjob.js +1 -1
- package/dist/esm/generated/cronjob/getExecution.js +1 -1
- package/dist/esm/generated/domain/dnsZoneGetSpecific.js +1 -1
- package/dist/esm/generated/domain/dnsZonesForProject.js +1 -1
- package/dist/esm/generated/domain/getDomain.js +1 -1
- package/dist/esm/generated/domain/getHandleFields.js +1 -1
- package/dist/esm/generated/domain/getSpecificDomainOwnership.js +1 -1
- package/dist/esm/generated/file/getFile.js +1 -1
- package/dist/esm/generated/file/getFileMeta.js +1 -1
- package/dist/esm/generated/file/getFileTokenRules.js +1 -1
- package/dist/esm/generated/file/getFileTypeRules.js +1 -1
- package/dist/esm/generated/mail/deliveryboxGetSpecific.js +1 -1
- package/dist/esm/generated/mail/deliveryboxList.js +1 -3
- package/dist/esm/generated/mail/mailaddressGetSpecific.js +1 -1
- package/dist/esm/generated/mail/mailaddressList.js +1 -3
- package/dist/esm/generated/mail/projectsettingGetSpecific.js +1 -1
- package/dist/esm/generated/notification/newsletterGetInfo.js +1 -1
- package/dist/esm/generated/notification/scountUnreadNotifications.js +1 -1
- package/dist/esm/generated/notification/slistNotifications.js +1 -3
- package/dist/esm/generated/project/getProject.js +1 -1
- package/dist/esm/generated/project/getProjectInvite.js +1 -1
- package/dist/esm/generated/project/getProjectMembership.js +1 -1
- package/dist/esm/generated/project/getSelfMembershipForProject.js +1 -1
- package/dist/esm/generated/project/getServer.js +1 -1
- package/dist/esm/generated/project/listInvitesForProject.js +1 -3
- package/dist/esm/generated/project/listMembershipsForProject.js +1 -3
- package/dist/esm/generated/project/listProjectInvites.js +1 -3
- package/dist/esm/generated/project/listProjectMemberships.js +1 -3
- package/dist/esm/generated/project/listProjects.js +1 -3
- package/dist/esm/generated/project/listServers.js +1 -3
- package/dist/esm/generated/sshsftpUser/sftpUserGetSftpUser.js +1 -1
- package/dist/esm/generated/sshsftpUser/sftpUserListSftpUsers.js +1 -3
- package/dist/esm/generated/sshsftpUser/sshUserGetSshUser.js +1 -1
- package/dist/esm/generated/sshsftpUser/sshUserListSshUsers.js +1 -3
- package/dist/esm/generated/user/getApiToken.js +1 -1
- package/dist/esm/generated/user/getPersonalizedSettings.js +1 -1
- package/dist/esm/generated/user/getSession.js +1 -1
- package/dist/esm/generated/user/getSshKey.js +1 -1
- package/dist/esm/generated/user/getUser.js +1 -1
- package/dist/esm/generated/user/listApiTokens.js +1 -3
- package/dist/esm/generated/user/listFeedback.js +1 -3
- package/dist/esm/generated/user/listSessions.js +1 -3
- package/dist/esm/generated/user/listSshKeys.js +1 -3
- package/dist/esm/lib/app/Installer.d.ts +1 -1
- package/dist/esm/lib/app/Installer.js +3 -3
- package/dist/esm/lib/app/hooks.js +7 -8
- package/dist/esm/lib/app/install.js +1 -1
- package/dist/esm/lib/app/uuid.js +2 -1
- package/dist/esm/lib/app/versions.js +2 -6
- package/dist/esm/lib/app/wait.js +1 -1
- package/dist/esm/lib/context_flags.d.ts +20 -9
- package/dist/esm/lib/context_flags.js +25 -2
- package/dist/esm/lib/database/common.js +1 -1
- package/dist/esm/lib/database/mysql/connect.js +2 -2
- package/dist/esm/lib/database/mysql/flags.js +2 -2
- package/dist/esm/lib/database/redis/connect.js +1 -1
- package/dist/esm/lib/database/redis/flags.js +2 -2
- package/dist/esm/lib/handleError.js +3 -20
- package/dist/esm/lib/org/flags.d.ts +11 -3
- package/dist/esm/lib/project/flags.d.ts +11 -3
- package/dist/esm/lib/project/hooks.js +1 -1
- package/dist/esm/lib/project/ingress.js +1 -1
- package/dist/esm/lib/project/shortId.js +1 -1
- package/dist/esm/lib/projectbackup/hooks.js +2 -2
- package/dist/esm/lib/server/flags.d.ts +11 -3
- package/dist/esm/rendering/lib/getTerminalWidth.d.ts +1 -1
- package/dist/esm/rendering/lib/getTerminalWidth.js +1 -1
- package/dist/esm/rendering/react/ExecRenderBaseCommand.js +11 -1
- package/dist/esm/rendering/react/RenderBaseCommand.js +5 -1
- package/dist/esm/rendering/react/components/AppInstallation/AppInstallationDetails.js +5 -2
- package/dist/esm/rendering/react/components/Conversation/ConversationMeta.js +1 -3
- package/dist/esm/rendering/react/components/ErrorBox.js +27 -1
- package/dist/esm/rendering/react/components/Table/model/Column.d.ts +1 -1
- package/dist/esm/rendering/react/components/Table/model/Column.js +5 -2
- package/dist/esm/rendering/react/components/Table/model/ColumnOptions.js +1 -1
- package/dist/esm/rendering/react/hooks/useIncreaseInkStdoutColumns.d.ts +1 -0
- package/dist/esm/rendering/react/hooks/useIncreaseInkStdoutColumns.js +9 -0
- package/dist/esm/rendering/react/hooks/useMyUserProfile.js +1 -3
- package/dist/esm/rendering/react/measure/MeasureContextProvider.js +6 -2
- package/package.json +41 -9
- package/dist/esm/commands/app/install/node.js +0 -13
- package/dist/esm/commands/app/install/php.js +0 -13
- package/dist/esm/commands/domain/tld/get.d.ts +0 -3
- package/dist/esm/commands/domain/tld/get.js +0 -6
- package/dist/esm/commands/domain/tld/list.d.ts +0 -9
- package/dist/esm/commands/domain/tld/list.js +0 -6
- package/dist/esm/commands/project/list-react.d.ts +0 -11
- package/dist/esm/commands/project/list-react.js +0 -42
- package/dist/esm/generated/domain/getToplevelDomain.d.ts +0 -16
- package/dist/esm/generated/domain/getToplevelDomain.js +0 -25
- package/dist/esm/generated/domain/listDomainOwnerships.d.ts +0 -13
- package/dist/esm/generated/domain/listDomainOwnerships.js +0 -21
- package/dist/esm/generated/domain/listToplevelDomains.d.ts +0 -13
- package/dist/esm/generated/domain/listToplevelDomains.js +0 -17
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Box } from "ink";
|
|
3
|
-
import { useRef } from "react";
|
|
3
|
+
import { useLayoutEffect, useRef, useState, } from "react";
|
|
4
4
|
import { createMeasureContext, measureContext } from "./context.js";
|
|
5
5
|
import { MeasureRenderer } from "./MeasureRenderer.js";
|
|
6
6
|
export const MeasureContextProvider = (props) => {
|
|
7
7
|
const { children } = props;
|
|
8
8
|
const context = useRef(createMeasureContext()).current;
|
|
9
|
-
|
|
9
|
+
const [isMeasuring, setIsMeasuring] = useState(true);
|
|
10
|
+
useLayoutEffect(() => {
|
|
11
|
+
setIsMeasuring(false);
|
|
12
|
+
}, []);
|
|
13
|
+
return (_jsx(measureContext.Provider, { value: context, children: _jsxs(Box, { flexDirection: "column", gap: 1, children: [_jsx(Box, { children: _jsx(MeasureRenderer, {}) }), _jsx(Box, { height: isMeasuring ? 0 : undefined, overflow: isMeasuring ? "hidden" : undefined, children: children })] }) }));
|
|
10
14
|
};
|
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.22",
|
|
4
4
|
"description": "Hand-crafted CLI for the mittwald API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -44,13 +44,14 @@
|
|
|
44
44
|
"bin"
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@mittwald/api-client": "^
|
|
48
|
-
"@mittwald/api-client-commons": "^
|
|
49
|
-
"@mittwald/react-use-promise": "^1.
|
|
47
|
+
"@mittwald/api-client": "^3.0.7",
|
|
48
|
+
"@mittwald/api-client-commons": "^4.1.0",
|
|
49
|
+
"@mittwald/react-use-promise": "^1.3.3",
|
|
50
50
|
"@oclif/core": "^2.8.5",
|
|
51
51
|
"@oclif/plugin-help": "^5.2.9",
|
|
52
52
|
"@oclif/plugin-update": "^3.1.28",
|
|
53
53
|
"@oclif/plugin-warn-if-update-available": "^2.0.45",
|
|
54
|
+
"axios": "^1.5.0",
|
|
54
55
|
"chalk": "^5.3.0",
|
|
55
56
|
"date-fns": "^2.30.0",
|
|
56
57
|
"humanize-string": "^3.0.0",
|
|
@@ -68,9 +69,6 @@
|
|
|
68
69
|
"semver": "^7.5.4",
|
|
69
70
|
"tempfile": "^5.0.0"
|
|
70
71
|
},
|
|
71
|
-
"resolutions": {
|
|
72
|
-
"@mittwald/api-client-commons": "^3.1.0"
|
|
73
|
-
},
|
|
74
72
|
"devDependencies": {
|
|
75
73
|
"@types/chalk": "^2.2.0",
|
|
76
74
|
"@types/copyfiles": "^2.4.1",
|
|
@@ -118,7 +116,15 @@
|
|
|
118
116
|
"topicSeparator": " ",
|
|
119
117
|
"topics": {
|
|
120
118
|
"app": {
|
|
121
|
-
"description": "Manage apps, and app installations in your projects"
|
|
119
|
+
"description": "Manage apps, and app installations in your projects",
|
|
120
|
+
"subtopics": {
|
|
121
|
+
"install": {
|
|
122
|
+
"description": "Install apps in your projects"
|
|
123
|
+
},
|
|
124
|
+
"dependency": {
|
|
125
|
+
"description": "Manage the system dependencies of your apps"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
122
128
|
},
|
|
123
129
|
"article": {
|
|
124
130
|
"description": "Query available hosting articles"
|
|
@@ -148,7 +154,33 @@
|
|
|
148
154
|
"description": "Manage your organizations, and also any kinds of user memberships concerning these organizations."
|
|
149
155
|
},
|
|
150
156
|
"project": {
|
|
151
|
-
"description": "Manage your projects, and also any kinds of user memberships concerning these projects."
|
|
157
|
+
"description": "Manage your projects, and also any kinds of user memberships concerning these projects.",
|
|
158
|
+
"subtopics": {
|
|
159
|
+
"backup": {
|
|
160
|
+
"description": "Manage backups of your projects"
|
|
161
|
+
},
|
|
162
|
+
"backupschedule": {
|
|
163
|
+
"description": "Manage backup schedules of your projects"
|
|
164
|
+
},
|
|
165
|
+
"cronjob": {
|
|
166
|
+
"description": "Manage cronjobs of your projects"
|
|
167
|
+
},
|
|
168
|
+
"filesystem": {
|
|
169
|
+
"description": "Interact with the filesystem of your project"
|
|
170
|
+
},
|
|
171
|
+
"invite": {
|
|
172
|
+
"description": "Invite users to your projects and manage their invitations"
|
|
173
|
+
},
|
|
174
|
+
"membership": {
|
|
175
|
+
"description": "Control who gets to work on your projects, and who doesn't"
|
|
176
|
+
},
|
|
177
|
+
"sftp-user": {
|
|
178
|
+
"description": "Manage SFTP users of your projects"
|
|
179
|
+
},
|
|
180
|
+
"ssh-user": {
|
|
181
|
+
"description": "Manage SSH users of your projects"
|
|
182
|
+
}
|
|
183
|
+
}
|
|
152
184
|
},
|
|
153
185
|
"server": {
|
|
154
186
|
"description": "Manage your servers"
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ExecRenderBaseCommand } from "../../../rendering/react/ExecRenderBaseCommand.js";
|
|
2
|
-
import { AppInstaller, } from "../../../lib/app/Installer.js";
|
|
3
|
-
const installer = new AppInstaller("3e7f920b-a711-4d2f-9871-661e1b41a2f0", "Node.js Project", ["version", "site-title", "wait"]);
|
|
4
|
-
export default class InstallNode extends ExecRenderBaseCommand {
|
|
5
|
-
static description = installer.description;
|
|
6
|
-
static flags = installer.flags;
|
|
7
|
-
async exec() {
|
|
8
|
-
return installer.exec(this.apiClient, this.args, this.flags, this.config);
|
|
9
|
-
}
|
|
10
|
-
render(result) {
|
|
11
|
-
return installer.render(result, this.flags);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ExecRenderBaseCommand } from "../../../rendering/react/ExecRenderBaseCommand.js";
|
|
2
|
-
import { AppInstaller, } from "../../../lib/app/Installer.js";
|
|
3
|
-
const installer = new AppInstaller("3e7f920b-a711-4d2f-9871-661e1b41a2f0", "PHP Project", ["version", "site-title", "wait"]);
|
|
4
|
-
export default class InstallPhp extends ExecRenderBaseCommand {
|
|
5
|
-
static description = installer.description;
|
|
6
|
-
static flags = installer.flags;
|
|
7
|
-
async exec() {
|
|
8
|
-
return installer.exec(this.apiClient, this.args, this.flags, this.config);
|
|
9
|
-
}
|
|
10
|
-
render(result) {
|
|
11
|
-
return installer.render(result, this.flags);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
/* prettier-ignore */
|
|
3
|
-
/* This file is auto-generated with acg (@mittwald/api-code-generator) */
|
|
4
|
-
import { GeneratedDomainGetToplevelDomain } from "../../../generated/domain/getToplevelDomain.js";
|
|
5
|
-
export default class Get extends GeneratedDomainGetToplevelDomain {
|
|
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 { GeneratedDomainListToplevelDomains, Response } from "../../../generated/domain/listToplevelDomains.js";
|
|
5
|
-
type ResponseItem = Simplify<MittwaldAPIV2.Paths.V2ToplevelDomains.Get.Responses.$200.Content.ApplicationJson[number]>;
|
|
6
|
-
export default class List extends GeneratedDomainListToplevelDomains<ResponseItem> {
|
|
7
|
-
protected mapData(data: SuccessfulResponse<Response, 200>["data"]): MittwaldAPIV2.Components.Schemas.DomainTopLevel[];
|
|
8
|
-
}
|
|
9
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { RenderBaseCommand } from "../../rendering/react/RenderBaseCommand.js";
|
|
3
|
-
export default class List extends RenderBaseCommand<typeof List> {
|
|
4
|
-
static flags: {
|
|
5
|
-
columns: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
6
|
-
extended: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
7
|
-
noTruncate: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
8
|
-
wait: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<any>;
|
|
9
|
-
};
|
|
10
|
-
protected render(): React.ReactNode;
|
|
11
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { assertStatus } from "@mittwald/api-client-commons";
|
|
3
|
-
import { usePromise } from "@mittwald/react-use-promise";
|
|
4
|
-
import { RenderBaseCommand } from "../../rendering/react/RenderBaseCommand.js";
|
|
5
|
-
import { useRenderContext } from "../../rendering/react/context.js";
|
|
6
|
-
import { Table } from "../../rendering/react/components/Table/index.js";
|
|
7
|
-
import { UsePromiseRenderSetup } from "../../rendering/setup/usePromiseSetup.js";
|
|
8
|
-
import { TableRenderSetup } from "../../rendering/setup/TableRenderSetup.js";
|
|
9
|
-
import { ProjectStatus } from "../../rendering/react/components/Project/ProjectStatus.js";
|
|
10
|
-
const usePromiseSetup = new UsePromiseRenderSetup();
|
|
11
|
-
const tableSetupInstance = new TableRenderSetup();
|
|
12
|
-
export default class List extends RenderBaseCommand {
|
|
13
|
-
static flags = {
|
|
14
|
-
...usePromiseSetup.flags,
|
|
15
|
-
...tableSetupInstance.flags,
|
|
16
|
-
...RenderBaseCommand.buildFlags(),
|
|
17
|
-
};
|
|
18
|
-
render() {
|
|
19
|
-
const { apiClient } = useRenderContext();
|
|
20
|
-
const tableSetup = tableSetupInstance.getSetup(this.flags);
|
|
21
|
-
const usePromiseOptions = usePromiseSetup.getSetup(this.flags);
|
|
22
|
-
const projects = usePromise(apiClient.project.listProjects, [], usePromiseOptions);
|
|
23
|
-
assertStatus(projects, 200);
|
|
24
|
-
return (_jsx(Table, { data: projects.data, setup: tableSetup, columns: {
|
|
25
|
-
id: {
|
|
26
|
-
isUuid: true,
|
|
27
|
-
},
|
|
28
|
-
shortId: {
|
|
29
|
-
minWidth: 8,
|
|
30
|
-
},
|
|
31
|
-
customerId: {
|
|
32
|
-
isUuid: true,
|
|
33
|
-
extended: true,
|
|
34
|
-
},
|
|
35
|
-
description: {},
|
|
36
|
-
status: {
|
|
37
|
-
render: (project) => _jsx(ProjectStatus, { project: project }),
|
|
38
|
-
},
|
|
39
|
-
createdAt: {},
|
|
40
|
-
} }));
|
|
41
|
-
}
|
|
42
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
2
|
-
import { GetBaseCommand } from "../../GetBaseCommand.js";
|
|
3
|
-
export type PathParams = MittwaldAPIV2.Paths.V2ToplevelDomainsTld.Get.Parameters.Path;
|
|
4
|
-
type APIResponse = Awaited<ReturnType<MittwaldAPIV2Client["domain"]["getToplevelDomain"]>>;
|
|
5
|
-
export declare abstract class GeneratedDomainGetToplevelDomain extends GetBaseCommand<typeof GeneratedDomainGetToplevelDomain, APIResponse> {
|
|
6
|
-
static description: string;
|
|
7
|
-
static flags: {
|
|
8
|
-
[x: string]: import("@oclif/core/lib/interfaces/parser.js").CompletableFlag<any>;
|
|
9
|
-
};
|
|
10
|
-
static args: {
|
|
11
|
-
tld: import("@oclif/core/lib/interfaces/parser.js").Arg<string, Record<string, unknown>>;
|
|
12
|
-
};
|
|
13
|
-
protected getData(): Promise<APIResponse>;
|
|
14
|
-
protected mapParams(input: PathParams): Promise<PathParams> | PathParams;
|
|
15
|
-
}
|
|
16
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
/* prettier-ignore */
|
|
3
|
-
/* This file is auto-generated with acg (@mittwald/api-code-generator) */
|
|
4
|
-
import { Args } from "@oclif/core";
|
|
5
|
-
import { GetBaseCommand } from "../../GetBaseCommand.js";
|
|
6
|
-
export class GeneratedDomainGetToplevelDomain extends GetBaseCommand {
|
|
7
|
-
static description = "Get a toplevel domain.";
|
|
8
|
-
static flags = {
|
|
9
|
-
...GetBaseCommand.baseFlags,
|
|
10
|
-
};
|
|
11
|
-
static args = {
|
|
12
|
-
tld: Args.string({
|
|
13
|
-
description: "undefined",
|
|
14
|
-
required: true,
|
|
15
|
-
}),
|
|
16
|
-
};
|
|
17
|
-
async getData() {
|
|
18
|
-
return await this.apiClient.domain.getToplevelDomain({
|
|
19
|
-
pathParameters: await this.mapParams(this.args),
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
mapParams(input) {
|
|
23
|
-
return input;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
2
|
-
import { ListBaseCommand } from "../../ListBaseCommand.js";
|
|
3
|
-
export type PathParams = MittwaldAPIV2.Paths.V2ProjectsProjectIdDomainOwnerships.Get.Parameters.Path;
|
|
4
|
-
export type Response = Awaited<ReturnType<MittwaldAPIV2Client["domain"]["listDomainOwnerships"]>>;
|
|
5
|
-
export declare abstract class GeneratedDomainListDomainOwnerships<TItem extends Record<string, unknown>> extends ListBaseCommand<typeof GeneratedDomainListDomainOwnerships, TItem, Response> {
|
|
6
|
-
static description: string;
|
|
7
|
-
static args: {};
|
|
8
|
-
static flags: {
|
|
9
|
-
[x: string]: import("@oclif/core/lib/interfaces/parser.js").CompletableFlag<any> | import("@oclif/core/lib/interfaces/parser.js").OptionFlag<unknown>;
|
|
10
|
-
};
|
|
11
|
-
getData(): Promise<Response>;
|
|
12
|
-
protected mapParams(input: PathParams): Promise<PathParams> | PathParams;
|
|
13
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ListBaseCommand } from "../../ListBaseCommand.js";
|
|
2
|
-
import { projectFlags, withProjectId } from "../../lib/project/flags.js";
|
|
3
|
-
export class GeneratedDomainListDomainOwnerships extends ListBaseCommand {
|
|
4
|
-
static description = "List all domain ownerships of a project.";
|
|
5
|
-
static args = {};
|
|
6
|
-
static flags = {
|
|
7
|
-
...ListBaseCommand.baseFlags,
|
|
8
|
-
...projectFlags,
|
|
9
|
-
};
|
|
10
|
-
async getData() {
|
|
11
|
-
const pathParams = {
|
|
12
|
-
projectId: await withProjectId(this.apiClient, this.flags, this.args, this.config),
|
|
13
|
-
};
|
|
14
|
-
return await this.apiClient.domain.listDomainOwnerships({
|
|
15
|
-
pathParameters: await this.mapParams(pathParams),
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
mapParams(input) {
|
|
19
|
-
return input;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
2
|
-
import { ListBaseCommand } from "../../ListBaseCommand.js";
|
|
3
|
-
export type PathParams = MittwaldAPIV2.Paths.V2ToplevelDomains.Get.Parameters.Path;
|
|
4
|
-
export type Response = Awaited<ReturnType<MittwaldAPIV2Client["domain"]["listToplevelDomains"]>>;
|
|
5
|
-
export declare abstract class GeneratedDomainListToplevelDomains<TItem extends Record<string, unknown>> extends ListBaseCommand<typeof GeneratedDomainListToplevelDomains, TItem, Response> {
|
|
6
|
-
static description: string;
|
|
7
|
-
static args: {};
|
|
8
|
-
static flags: {
|
|
9
|
-
[x: string]: import("@oclif/core/lib/interfaces/parser.js").CompletableFlag<any>;
|
|
10
|
-
};
|
|
11
|
-
getData(): Promise<Response>;
|
|
12
|
-
protected mapParams(input: PathParams): Promise<PathParams> | PathParams;
|
|
13
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ListBaseCommand } from "../../ListBaseCommand.js";
|
|
2
|
-
export class GeneratedDomainListToplevelDomains extends ListBaseCommand {
|
|
3
|
-
static description = "List all supported toplevel domains.";
|
|
4
|
-
static args = {};
|
|
5
|
-
static flags = {
|
|
6
|
-
...ListBaseCommand.baseFlags,
|
|
7
|
-
};
|
|
8
|
-
async getData() {
|
|
9
|
-
const pathParams = {};
|
|
10
|
-
return await this.apiClient.domain.listToplevelDomains({
|
|
11
|
-
pathParameters: await this.mapParams(pathParams),
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
mapParams(input) {
|
|
15
|
-
return input;
|
|
16
|
-
}
|
|
17
|
-
}
|