@mittwald/cli 1.0.0-alpha.24 → 1.0.0-alpha.25
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 +91 -28
- package/dist/esm/commands/app/create/static.d.ts +12 -0
- package/dist/esm/commands/app/create/static.js +13 -0
- package/dist/esm/commands/database/mysql/list.js +0 -6
- package/dist/esm/commands/project/sftp-user/list.d.ts +9 -3
- package/dist/esm/commands/project/sftp-user/list.js +15 -10
- package/dist/esm/commands/project/ssh-user/list.d.ts +9 -3
- package/dist/esm/commands/project/ssh-user/list.js +13 -10
- package/dist/esm/rendering/react/components/AppInstallation/AppInstallationDetails.js +9 -0
- package/package.json +1 -1
- package/dist/esm/generated/sshsftpUser/sftpUserGetSftpUser.d.ts +0 -16
- package/dist/esm/generated/sshsftpUser/sftpUserGetSftpUser.js +0 -25
- package/dist/esm/generated/sshsftpUser/sftpUserListSftpUsers.d.ts +0 -13
- package/dist/esm/generated/sshsftpUser/sftpUserListSftpUsers.js +0 -22
- package/dist/esm/generated/sshsftpUser/sshUserGetSshUser.d.ts +0 -16
- package/dist/esm/generated/sshsftpUser/sshUserGetSshUser.js +0 -25
- package/dist/esm/generated/sshsftpUser/sshUserListSshUsers.d.ts +0 -13
- package/dist/esm/generated/sshsftpUser/sshUserListSshUsers.js +0 -22
package/README.md
CHANGED
|
@@ -82,6 +82,7 @@ USAGE
|
|
|
82
82
|
* [`mw app copy INSTALLATION-ID`](#mw-app-copy-installation-id)
|
|
83
83
|
* [`mw app create node`](#mw-app-create-node)
|
|
84
84
|
* [`mw app create php`](#mw-app-create-php)
|
|
85
|
+
* [`mw app create static`](#mw-app-create-static)
|
|
85
86
|
* [`mw app dependency list`](#mw-app-dependency-list)
|
|
86
87
|
* [`mw app dependency update INSTALLATION-ID`](#mw-app-dependency-update-installation-id)
|
|
87
88
|
* [`mw app dependency versions SYSTEMSOFTWARE`](#mw-app-dependency-versions-systemsoftware)
|
|
@@ -306,6 +307,54 @@ FLAG DESCRIPTIONS
|
|
|
306
307
|
installation is finished
|
|
307
308
|
```
|
|
308
309
|
|
|
310
|
+
## `mw app create static`
|
|
311
|
+
|
|
312
|
+
Creates new custom static site installation.
|
|
313
|
+
|
|
314
|
+
```
|
|
315
|
+
USAGE
|
|
316
|
+
$ mw app create static --document-root <value> [-p <value>] [-q] [--site-title <value>] [-w] [--json]
|
|
317
|
+
|
|
318
|
+
FLAGS
|
|
319
|
+
-p, --project-id=<value> ID or short ID of a project; this flag is optional if a default project is set in the
|
|
320
|
+
context
|
|
321
|
+
-q, --quiet suppress process output and only display a machine-readable summary.
|
|
322
|
+
-w, --wait Wait for your custom static site to be ready.
|
|
323
|
+
--document-root=<value> (required) [default: /] The document root from which your custom static site will be served
|
|
324
|
+
(relative to the installation path)
|
|
325
|
+
--json
|
|
326
|
+
--site-title=<value> Site Title for your custom static site installation.
|
|
327
|
+
|
|
328
|
+
DESCRIPTION
|
|
329
|
+
Creates new custom static site installation.
|
|
330
|
+
|
|
331
|
+
FLAG DESCRIPTIONS
|
|
332
|
+
-p, --project-id=<value> ID or short ID of a project; this flag is optional if a default project is set in the context
|
|
333
|
+
|
|
334
|
+
May contain a short ID or a full ID of a project; you can also use the "mw context set --project-id=<VALUE>" command
|
|
335
|
+
to persistently set a default project for all commands that accept this flag.
|
|
336
|
+
|
|
337
|
+
-q, --quiet suppress process output and only display a machine-readable summary.
|
|
338
|
+
|
|
339
|
+
This flag controls if you want to see the process output or only a summary. When using mw non-interactively (e.g. in
|
|
340
|
+
scripts), you can use this flag to easily get the IDs of created resources for further processing.
|
|
341
|
+
|
|
342
|
+
--document-root=<value>
|
|
343
|
+
|
|
344
|
+
The document root from which your custom static site will be served (relative to the installation path)
|
|
345
|
+
|
|
346
|
+
This is the document root from which the files of your application will be served by the web server. This directory
|
|
347
|
+
is specified relative to the installation path.
|
|
348
|
+
|
|
349
|
+
--site-title=<value> Site Title for your custom static site installation.
|
|
350
|
+
|
|
351
|
+
Site Title which will be displayed in the Tab and at the top of the Frontend of your custom static site
|
|
352
|
+
installation.
|
|
353
|
+
It is also the Title shown in the App-Overview in the mStudio.
|
|
354
|
+
If none is given the Software Name and the given Project will be used. The Title can be changed after the
|
|
355
|
+
installation is finished
|
|
356
|
+
```
|
|
357
|
+
|
|
309
358
|
## `mw app dependency list`
|
|
310
359
|
|
|
311
360
|
Get all available dependencies
|
|
@@ -3154,27 +3203,34 @@ DESCRIPTION
|
|
|
3154
3203
|
|
|
3155
3204
|
## `mw project sftp-user list`
|
|
3156
3205
|
|
|
3157
|
-
|
|
3206
|
+
List all SFTP users for a project.
|
|
3158
3207
|
|
|
3159
3208
|
```
|
|
3160
3209
|
USAGE
|
|
3161
|
-
$ mw project sftp-user list
|
|
3162
|
-
|
|
3210
|
+
$ mw project sftp-user list [--columns <value> | -x] [--sort <value>] [--filter <value>] [--output csv|json|yaml | |
|
|
3211
|
+
[--csv | --no-truncate]] [--no-header | ] [-p <value>]
|
|
3163
3212
|
|
|
3164
3213
|
FLAGS
|
|
3165
|
-
-
|
|
3166
|
-
|
|
3167
|
-
--
|
|
3168
|
-
--
|
|
3169
|
-
--
|
|
3170
|
-
--
|
|
3171
|
-
--
|
|
3172
|
-
|
|
3173
|
-
--
|
|
3174
|
-
|
|
3214
|
+
-p, --project-id=<value> ID or short ID of a project; this flag is optional if a default project is set in the
|
|
3215
|
+
context
|
|
3216
|
+
-x, --extended show extra columns
|
|
3217
|
+
--columns=<value> only show provided columns (comma-separated)
|
|
3218
|
+
--csv output is csv format [alias: --output=csv]
|
|
3219
|
+
--filter=<value> filter property by partial string matching, ex: name=foo
|
|
3220
|
+
--no-header hide table header from output
|
|
3221
|
+
--no-truncate do not truncate output to fit screen
|
|
3222
|
+
--output=<option> output in a more machine friendly format
|
|
3223
|
+
<options: csv|json|yaml>
|
|
3224
|
+
--sort=<value> property to sort by (prepend '-' for descending)
|
|
3175
3225
|
|
|
3176
3226
|
DESCRIPTION
|
|
3177
|
-
|
|
3227
|
+
List all SFTP users for a project.
|
|
3228
|
+
|
|
3229
|
+
FLAG DESCRIPTIONS
|
|
3230
|
+
-p, --project-id=<value> ID or short ID of a project; this flag is optional if a default project is set in the context
|
|
3231
|
+
|
|
3232
|
+
May contain a short ID or a full ID of a project; you can also use the "mw context set --project-id=<VALUE>" command
|
|
3233
|
+
to persistently set a default project for all commands that accept this flag.
|
|
3178
3234
|
```
|
|
3179
3235
|
|
|
3180
3236
|
## `mw project ssh [PROJECT-ID]`
|
|
@@ -3194,27 +3250,34 @@ DESCRIPTION
|
|
|
3194
3250
|
|
|
3195
3251
|
## `mw project ssh-user list`
|
|
3196
3252
|
|
|
3197
|
-
|
|
3253
|
+
List all SSH users for a project.
|
|
3198
3254
|
|
|
3199
3255
|
```
|
|
3200
3256
|
USAGE
|
|
3201
|
-
$ mw project ssh-user list
|
|
3202
|
-
|
|
3257
|
+
$ mw project ssh-user list [--columns <value> | -x] [--sort <value>] [--filter <value>] [--output csv|json|yaml | |
|
|
3258
|
+
[--csv | --no-truncate]] [--no-header | ] [-p <value>]
|
|
3203
3259
|
|
|
3204
3260
|
FLAGS
|
|
3205
|
-
-
|
|
3206
|
-
|
|
3207
|
-
--
|
|
3208
|
-
--
|
|
3209
|
-
--
|
|
3210
|
-
--
|
|
3211
|
-
--
|
|
3212
|
-
|
|
3213
|
-
--
|
|
3214
|
-
|
|
3261
|
+
-p, --project-id=<value> ID or short ID of a project; this flag is optional if a default project is set in the
|
|
3262
|
+
context
|
|
3263
|
+
-x, --extended show extra columns
|
|
3264
|
+
--columns=<value> only show provided columns (comma-separated)
|
|
3265
|
+
--csv output is csv format [alias: --output=csv]
|
|
3266
|
+
--filter=<value> filter property by partial string matching, ex: name=foo
|
|
3267
|
+
--no-header hide table header from output
|
|
3268
|
+
--no-truncate do not truncate output to fit screen
|
|
3269
|
+
--output=<option> output in a more machine friendly format
|
|
3270
|
+
<options: csv|json|yaml>
|
|
3271
|
+
--sort=<value> property to sort by (prepend '-' for descending)
|
|
3215
3272
|
|
|
3216
3273
|
DESCRIPTION
|
|
3217
|
-
|
|
3274
|
+
List all SSH users for a project.
|
|
3275
|
+
|
|
3276
|
+
FLAG DESCRIPTIONS
|
|
3277
|
+
-p, --project-id=<value> ID or short ID of a project; this flag is optional if a default project is set in the context
|
|
3278
|
+
|
|
3279
|
+
May contain a short ID or a full ID of a project; you can also use the "mw context set --project-id=<VALUE>" command
|
|
3280
|
+
to persistently set a default project for all commands that accept this flag.
|
|
3218
3281
|
```
|
|
3219
3282
|
|
|
3220
3283
|
## `mw project update [PROJECT-ID]`
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ExecRenderBaseCommand } from "../../../rendering/react/ExecRenderBaseCommand.js";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { AppInstallationResult, AppInstaller } from "../../../lib/app/Installer.js";
|
|
4
|
+
export declare const staticInstaller: AppInstaller<"site-title" | "document-root" | "wait">;
|
|
5
|
+
export default class InstallNode extends ExecRenderBaseCommand<typeof InstallNode, AppInstallationResult> {
|
|
6
|
+
static description: string;
|
|
7
|
+
static flags: import("@oclif/core/lib/interfaces/parser.js").FlagInput<import("../../../lib/app/flags.js").RelevantFlags<readonly ("site-title" | "document-root" | "wait")[]>>;
|
|
8
|
+
protected exec(): Promise<{
|
|
9
|
+
appInstallationId: string;
|
|
10
|
+
}>;
|
|
11
|
+
protected render(result: AppInstallationResult): React.ReactNode;
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ExecRenderBaseCommand } from "../../../rendering/react/ExecRenderBaseCommand.js";
|
|
2
|
+
import { AppInstaller, } from "../../../lib/app/Installer.js";
|
|
3
|
+
export const staticInstaller = new AppInstaller("d20baefd-81d2-42aa-bfba-9a3220ae839b", "custom static site", ["document-root", "site-title", "wait"]);
|
|
4
|
+
export default class InstallNode extends ExecRenderBaseCommand {
|
|
5
|
+
static description = staticInstaller.description;
|
|
6
|
+
static flags = staticInstaller.flags;
|
|
7
|
+
async exec() {
|
|
8
|
+
return staticInstaller.exec(this.apiClient, this.args, this.flags, this.config);
|
|
9
|
+
}
|
|
10
|
+
render(result) {
|
|
11
|
+
return staticInstaller.render(result, this.flags);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { formatBytes } from "../../../lib/viewhelpers/size.js";
|
|
2
1
|
import { ListBaseCommand } from "../../../ListBaseCommand.js";
|
|
3
2
|
import { projectFlags, withProjectId } from "../../../lib/project/flags.js";
|
|
4
3
|
export class List extends ListBaseCommand {
|
|
@@ -53,11 +52,6 @@ export class List extends ListBaseCommand {
|
|
|
53
52
|
get: (row) => row.characterSettings?.collation,
|
|
54
53
|
extended: true,
|
|
55
54
|
},
|
|
56
|
-
size: {
|
|
57
|
-
header: "Size",
|
|
58
|
-
// there is an error in the API mapping
|
|
59
|
-
get: (row) => formatBytes(row.size.low),
|
|
60
|
-
},
|
|
61
55
|
createdAt: commonColumns.createdAt,
|
|
62
56
|
};
|
|
63
57
|
}
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
import { GeneratedSftpUserListSftpUsers, PathParams } from "../../../generated/sshsftpUser/sftpUserListSftpUsers.js";
|
|
2
1
|
import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
3
2
|
import { Simplify } from "@mittwald/api-client-commons";
|
|
4
3
|
import { SuccessfulResponse } from "../../../types.js";
|
|
5
4
|
import { ListColumns } from "../../../Formatter.js";
|
|
5
|
+
import { ListBaseCommand } from "../../../ListBaseCommand.js";
|
|
6
6
|
type SftpUserResponse = Awaited<ReturnType<MittwaldAPIV2Client["sshsftpUser"]["sftpUserListSftpUsers"]>>;
|
|
7
7
|
type SftpUserResponseItem = Simplify<MittwaldAPIV2.Paths.V2ProjectsProjectIdSftpUsers.Get.Responses.$200.Content.ApplicationJson[number]>;
|
|
8
|
-
|
|
8
|
+
type Response = Awaited<ReturnType<MittwaldAPIV2Client["sshsftpUser"]["sftpUserListSftpUsers"]>>;
|
|
9
|
+
export default class List extends ListBaseCommand<typeof List, SftpUserResponseItem, Response> {
|
|
10
|
+
static description: string;
|
|
11
|
+
static args: {};
|
|
12
|
+
static flags: {
|
|
13
|
+
"project-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string>;
|
|
14
|
+
};
|
|
15
|
+
getData(): Promise<Response>;
|
|
9
16
|
protected mapData(data: SuccessfulResponse<SftpUserResponse, 200>["data"]): SftpUserResponseItem[];
|
|
10
|
-
protected mapParams(input: PathParams): Promise<PathParams>;
|
|
11
17
|
protected getColumns(data: SftpUserResponseItem[]): ListColumns<SftpUserResponseItem>;
|
|
12
18
|
}
|
|
13
19
|
export {};
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { ListBaseCommand } from "../../../ListBaseCommand.js";
|
|
2
|
+
import { projectFlags, withProjectId } from "../../../lib/project/flags.js";
|
|
3
|
+
export default class List extends ListBaseCommand {
|
|
4
|
+
static description = "List all SFTP users for a project.";
|
|
5
|
+
static args = {};
|
|
6
|
+
static flags = {
|
|
7
|
+
...ListBaseCommand.baseFlags,
|
|
8
|
+
...projectFlags,
|
|
9
|
+
};
|
|
10
|
+
async getData() {
|
|
11
|
+
const projectId = await withProjectId(this.apiClient, List, this.flags, this.args, this.config);
|
|
12
|
+
return await this.apiClient.sshsftpUser.sftpUserListSftpUsers({
|
|
13
|
+
projectId,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
7
16
|
mapData(data) {
|
|
8
17
|
return data;
|
|
9
18
|
}
|
|
10
|
-
async mapParams(input) {
|
|
11
|
-
input.projectId = await normalizeProjectIdToUuid(this.apiClient, input.projectId);
|
|
12
|
-
return super.mapParams(input);
|
|
13
|
-
}
|
|
14
19
|
getColumns(data) {
|
|
15
20
|
const baseColumns = super.getColumns(data);
|
|
16
21
|
return {
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
import { GeneratedSshUserListSshUsers, PathParams } from "../../../generated/sshsftpUser/sshUserListSshUsers.js";
|
|
2
1
|
import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
3
2
|
import { Simplify } from "@mittwald/api-client-commons";
|
|
4
3
|
import { SuccessfulResponse } from "../../../types.js";
|
|
5
4
|
import { ListColumns } from "../../../Formatter.js";
|
|
5
|
+
import { ListBaseCommand } from "../../../ListBaseCommand.js";
|
|
6
6
|
type SshUserResponse = Awaited<ReturnType<MittwaldAPIV2Client["sshsftpUser"]["sftpUserListSftpUsers"]>>;
|
|
7
7
|
type SshUserResponseItem = Simplify<MittwaldAPIV2.Paths.V2ProjectsProjectIdSftpUsers.Get.Responses.$200.Content.ApplicationJson[number]>;
|
|
8
|
-
|
|
8
|
+
type Response = Awaited<ReturnType<MittwaldAPIV2Client["sshsftpUser"]["sshUserListSshUsers"]>>;
|
|
9
|
+
export declare class List extends ListBaseCommand<typeof List, SshUserResponseItem, Response> {
|
|
10
|
+
static description: string;
|
|
11
|
+
static args: {};
|
|
12
|
+
static flags: {
|
|
13
|
+
"project-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string>;
|
|
14
|
+
};
|
|
15
|
+
getData(): Promise<Response>;
|
|
9
16
|
protected mapData(data: SuccessfulResponse<SshUserResponse, 200>["data"]): SshUserResponseItem[];
|
|
10
|
-
protected mapParams(input: PathParams): Promise<PathParams>;
|
|
11
17
|
protected getColumns(data: SshUserResponseItem[]): ListColumns<SshUserResponseItem>;
|
|
12
18
|
}
|
|
13
19
|
export {};
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { ListBaseCommand } from "../../../ListBaseCommand.js";
|
|
2
|
+
import { projectFlags, withProjectId } from "../../../lib/project/flags.js";
|
|
3
|
+
export class List extends ListBaseCommand {
|
|
4
|
+
static description = "List all SSH users for a project.";
|
|
5
|
+
static args = {};
|
|
6
|
+
static flags = {
|
|
7
|
+
...ListBaseCommand.baseFlags,
|
|
8
|
+
...projectFlags,
|
|
9
|
+
};
|
|
10
|
+
async getData() {
|
|
11
|
+
const projectId = await withProjectId(this.apiClient, List, this.flags, this.args, this.config);
|
|
12
|
+
return await this.apiClient.sshsftpUser.sshUserListSshUsers({ projectId });
|
|
13
|
+
}
|
|
7
14
|
mapData(data) {
|
|
8
15
|
return data;
|
|
9
16
|
}
|
|
10
|
-
async mapParams(input) {
|
|
11
|
-
input.projectId = await normalizeProjectIdToUuid(this.apiClient, input.projectId);
|
|
12
|
-
return super.mapParams(input);
|
|
13
|
-
}
|
|
14
17
|
getColumns(data) {
|
|
15
18
|
const baseColumns = super.getColumns(data);
|
|
16
19
|
return {
|
|
@@ -7,18 +7,27 @@ import { AppSystemSoftware } from "./AppSystemSoftware.js";
|
|
|
7
7
|
import { Box, Text } from "ink";
|
|
8
8
|
import { phpInstaller } from "../../../../commands/app/create/php.js";
|
|
9
9
|
import { nodeInstaller } from "../../../../commands/app/create/node.js";
|
|
10
|
+
import { useProject } from "../../../../lib/project/hooks.js";
|
|
11
|
+
import { IDAndShortID } from "../IDAndShortID.js";
|
|
10
12
|
export const AppInstallationDetails = ({ app, appInstallation }) => {
|
|
11
13
|
const customInstallation = [phpInstaller.appId, nodeInstaller.appId].includes(app.id);
|
|
12
14
|
const desiredAppVersion = useAppVersion(app.id, appInstallation.appVersion.desired);
|
|
13
15
|
const currentAppVersion = appInstallation.appVersion.current
|
|
14
16
|
? useAppVersion(app.id, appInstallation.appVersion.current)
|
|
15
17
|
: undefined;
|
|
18
|
+
const project = appInstallation.projectId
|
|
19
|
+
? useProject(appInstallation.projectId)
|
|
20
|
+
: null;
|
|
16
21
|
const rows = {
|
|
17
22
|
"Installation ID": _jsx(Value, { children: appInstallation.id }),
|
|
18
23
|
App: (_jsx(SingleResultTable, { rows: {
|
|
19
24
|
ID: _jsx(Value, { children: app.id }),
|
|
20
25
|
Name: _jsx(Value, { children: app.name }),
|
|
21
26
|
} })),
|
|
27
|
+
Project: project ? (_jsx(SingleResultTable, { rows: {
|
|
28
|
+
ID: _jsx(IDAndShortID, { object: project }),
|
|
29
|
+
Description: _jsx(Value, { children: project.description }),
|
|
30
|
+
} })) : (_jsx(Value, { notSet: true })),
|
|
22
31
|
"Installation Path": _jsx(Value, { children: appInstallation.installationPath }),
|
|
23
32
|
"Document root (in installation path)": (_jsx(Value, { children: appInstallation.customDocumentRoot ?? "/" })),
|
|
24
33
|
Description: _jsx(Value, { children: appInstallation.description }),
|
package/package.json
CHANGED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
2
|
-
import { GetBaseCommand } from "../../GetBaseCommand.js";
|
|
3
|
-
export type PathParams = MittwaldAPIV2.Paths.V2SftpUsersSftpUserId.Get.Parameters.Path;
|
|
4
|
-
type APIResponse = Awaited<ReturnType<MittwaldAPIV2Client["sshsftpUser"]["sftpUserGetSftpUser"]>>;
|
|
5
|
-
export declare abstract class GeneratedSftpUserGetSftpUser extends GetBaseCommand<typeof GeneratedSftpUserGetSftpUser, 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
|
-
sftpUserId: 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 GeneratedSftpUserGetSftpUser extends GetBaseCommand {
|
|
7
|
-
static description = "Get an SFTPUser.";
|
|
8
|
-
static flags = {
|
|
9
|
-
...GetBaseCommand.baseFlags,
|
|
10
|
-
};
|
|
11
|
-
static args = {
|
|
12
|
-
sftpUserId: Args.string({
|
|
13
|
-
description: "ID of the SFTPUser to get.",
|
|
14
|
-
required: true,
|
|
15
|
-
}),
|
|
16
|
-
};
|
|
17
|
-
async getData() {
|
|
18
|
-
return await this.apiClient.sshsftpUser.sftpUserGetSftpUser({
|
|
19
|
-
...(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.V2ProjectsProjectIdSftpUsers.Get.Parameters.Path;
|
|
4
|
-
export type Response = Awaited<ReturnType<MittwaldAPIV2Client["sshsftpUser"]["sftpUserListSftpUsers"]>>;
|
|
5
|
-
export declare abstract class GeneratedSftpUserListSftpUsers<TItem extends Record<string, unknown>> extends ListBaseCommand<typeof GeneratedSftpUserListSftpUsers, TItem, Response> {
|
|
6
|
-
static description: string;
|
|
7
|
-
static args: {};
|
|
8
|
-
static flags: {
|
|
9
|
-
"project-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
10
|
-
};
|
|
11
|
-
getData(): Promise<Response>;
|
|
12
|
-
protected mapParams(input: PathParams): Promise<PathParams> | PathParams;
|
|
13
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Flags } from "@oclif/core";
|
|
2
|
-
import { ListBaseCommand } from "../../ListBaseCommand.js";
|
|
3
|
-
export class GeneratedSftpUserListSftpUsers extends ListBaseCommand {
|
|
4
|
-
static description = "Get all SFTPUsers for a Project.";
|
|
5
|
-
static args = {};
|
|
6
|
-
static flags = {
|
|
7
|
-
...ListBaseCommand.baseFlags,
|
|
8
|
-
"project-id": Flags.string({
|
|
9
|
-
description: "ID of the Project to request SFTPUsers for.",
|
|
10
|
-
required: true,
|
|
11
|
-
}),
|
|
12
|
-
};
|
|
13
|
-
async getData() {
|
|
14
|
-
const pathParams = {
|
|
15
|
-
projectId: this.flags["project-id"],
|
|
16
|
-
};
|
|
17
|
-
return await this.apiClient.sshsftpUser.sftpUserListSftpUsers((await this.mapParams(pathParams)));
|
|
18
|
-
}
|
|
19
|
-
mapParams(input) {
|
|
20
|
-
return input;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
2
|
-
import { GetBaseCommand } from "../../GetBaseCommand.js";
|
|
3
|
-
export type PathParams = MittwaldAPIV2.Paths.V2SshUsersSshUserId.Get.Parameters.Path;
|
|
4
|
-
type APIResponse = Awaited<ReturnType<MittwaldAPIV2Client["sshsftpUser"]["sshUserGetSshUser"]>>;
|
|
5
|
-
export declare abstract class GeneratedSshUserGetSshUser extends GetBaseCommand<typeof GeneratedSshUserGetSshUser, 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
|
-
sshUserId: 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 GeneratedSshUserGetSshUser extends GetBaseCommand {
|
|
7
|
-
static description = "Get an SSHUser.";
|
|
8
|
-
static flags = {
|
|
9
|
-
...GetBaseCommand.baseFlags,
|
|
10
|
-
};
|
|
11
|
-
static args = {
|
|
12
|
-
sshUserId: Args.string({
|
|
13
|
-
description: "ID of the SSHUser to be retrieved.",
|
|
14
|
-
required: true,
|
|
15
|
-
}),
|
|
16
|
-
};
|
|
17
|
-
async getData() {
|
|
18
|
-
return await this.apiClient.sshsftpUser.sshUserGetSshUser({
|
|
19
|
-
...(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.V2ProjectsProjectIdSshUsers.Get.Parameters.Path;
|
|
4
|
-
export type Response = Awaited<ReturnType<MittwaldAPIV2Client["sshsftpUser"]["sshUserListSshUsers"]>>;
|
|
5
|
-
export declare abstract class GeneratedSshUserListSshUsers<TItem extends Record<string, unknown>> extends ListBaseCommand<typeof GeneratedSshUserListSshUsers, TItem, Response> {
|
|
6
|
-
static description: string;
|
|
7
|
-
static args: {};
|
|
8
|
-
static flags: {
|
|
9
|
-
"project-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
10
|
-
};
|
|
11
|
-
getData(): Promise<Response>;
|
|
12
|
-
protected mapParams(input: PathParams): Promise<PathParams> | PathParams;
|
|
13
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Flags } from "@oclif/core";
|
|
2
|
-
import { ListBaseCommand } from "../../ListBaseCommand.js";
|
|
3
|
-
export class GeneratedSshUserListSshUsers extends ListBaseCommand {
|
|
4
|
-
static description = "Get all SSHUsers for a Project.";
|
|
5
|
-
static args = {};
|
|
6
|
-
static flags = {
|
|
7
|
-
...ListBaseCommand.baseFlags,
|
|
8
|
-
"project-id": Flags.string({
|
|
9
|
-
description: "ID of the Project to retrieve SSHUsers for.",
|
|
10
|
-
required: true,
|
|
11
|
-
}),
|
|
12
|
-
};
|
|
13
|
-
async getData() {
|
|
14
|
-
const pathParams = {
|
|
15
|
-
projectId: this.flags["project-id"],
|
|
16
|
-
};
|
|
17
|
-
return await this.apiClient.sshsftpUser.sshUserListSshUsers((await this.mapParams(pathParams)));
|
|
18
|
-
}
|
|
19
|
-
mapParams(input) {
|
|
20
|
-
return input;
|
|
21
|
-
}
|
|
22
|
-
}
|