@mittwald/cli 1.0.0-alpha.20 → 1.0.0-alpha.21
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 +15 -27
- package/dist/esm/BaseCommand.js +1 -0
- package/dist/esm/commands/app/copy.d.ts +1 -0
- package/dist/esm/commands/app/copy.js +1 -0
- package/dist/esm/commands/app/dependency/list.js +1 -1
- package/dist/esm/commands/app/dependency/versions.js +1 -1
- package/dist/esm/commands/app/install/php.js +1 -1
- package/dist/esm/commands/app/list.d.ts +1 -1
- package/dist/esm/commands/app/list.js +1 -1
- package/dist/esm/commands/database/mysql/create.d.ts +1 -0
- package/dist/esm/commands/database/mysql/create.js +1 -1
- package/dist/esm/commands/database/mysql/list.d.ts +1 -1
- package/dist/esm/commands/database/mysql/list.js +1 -1
- package/dist/esm/commands/database/redis/create.d.ts +1 -0
- package/dist/esm/commands/database/redis/create.js +1 -1
- package/dist/esm/commands/database/redis/list.d.ts +1 -1
- package/dist/esm/commands/database/redis/list.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/esm/commands/domain/virtualhost/list.d.ts +1 -0
- package/dist/esm/commands/domain/virtualhost/list.js +1 -1
- package/dist/esm/commands/mail/address/create.d.ts +1 -0
- package/dist/esm/commands/mail/address/create.js +1 -1
- package/dist/esm/commands/mail/address/list.d.ts +1 -1
- package/dist/esm/commands/mail/address/list.js +1 -1
- package/dist/esm/commands/org/delete.d.ts +1 -1
- package/dist/esm/commands/org/delete.js +1 -1
- package/dist/esm/commands/org/get.d.ts +1 -1
- package/dist/esm/commands/org/get.js +1 -1
- package/dist/esm/commands/org/invite/list.d.ts +1 -1
- package/dist/esm/commands/org/invite/list.js +1 -1
- package/dist/esm/commands/org/invite.d.ts +1 -0
- package/dist/esm/commands/org/invite.js +1 -1
- package/dist/esm/commands/org/membership/list.d.ts +1 -1
- package/dist/esm/commands/org/membership/list.js +1 -1
- package/dist/esm/commands/project/backup/create.d.ts +1 -0
- package/dist/esm/commands/project/backup/create.js +1 -1
- package/dist/esm/commands/project/backup/list.d.ts +1 -1
- package/dist/esm/commands/project/backup/list.js +1 -1
- package/dist/esm/commands/project/backupschedule/list.d.ts +1 -1
- package/dist/esm/commands/project/backupschedule/list.js +1 -1
- package/dist/esm/commands/project/create.d.ts +1 -0
- package/dist/esm/commands/project/create.js +2 -2
- package/dist/esm/commands/project/cronjob/list.d.ts +1 -1
- package/dist/esm/commands/project/cronjob/list.js +1 -1
- package/dist/esm/commands/project/delete.d.ts +1 -1
- package/dist/esm/commands/project/delete.js +1 -1
- package/dist/esm/commands/project/filesystem/usage.d.ts +1 -1
- package/dist/esm/commands/project/filesystem/usage.js +1 -1
- package/dist/esm/commands/project/get.d.ts +1 -1
- package/dist/esm/commands/project/get.js +2 -2
- package/dist/esm/commands/project/list.d.ts +10 -2
- package/dist/esm/commands/project/list.js +10 -2
- package/dist/esm/commands/project/ssh.d.ts +1 -1
- package/dist/esm/commands/project/ssh.js +1 -1
- package/dist/esm/commands/project/update.d.ts +1 -1
- package/dist/esm/commands/project/update.js +1 -1
- package/dist/esm/lib/app/Installer.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/mysql/flags.js +1 -1
- package/dist/esm/lib/database/redis/flags.js +1 -1
- 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/server/flags.d.ts +11 -3
- package/dist/esm/rendering/react/ExecRenderBaseCommand.js +11 -1
- package/dist/esm/rendering/react/components/ErrorBox.js +27 -1
- package/package.json +37 -3
- 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/listDomainOwnerships.d.ts +0 -13
- package/dist/esm/generated/domain/listDomainOwnerships.js +0 -21
package/README.md
CHANGED
|
@@ -174,7 +174,6 @@ USAGE
|
|
|
174
174
|
* [`mw project invite list`](#mw-project-invite-list)
|
|
175
175
|
* [`mw project invite list-own`](#mw-project-invite-list-own)
|
|
176
176
|
* [`mw project list`](#mw-project-list)
|
|
177
|
-
* [`mw project list-react`](#mw-project-list-react)
|
|
178
177
|
* [`mw project membership get MEMBERSHIPID`](#mw-project-membership-get-membershipid)
|
|
179
178
|
* [`mw project membership get-own`](#mw-project-membership-get-own)
|
|
180
179
|
* [`mw project membership list`](#mw-project-membership-list)
|
|
@@ -200,6 +199,8 @@ USAGE
|
|
|
200
199
|
|
|
201
200
|
## `mw app copy INSTALLATION-ID`
|
|
202
201
|
|
|
202
|
+
Copy an app within a project
|
|
203
|
+
|
|
203
204
|
```
|
|
204
205
|
USAGE
|
|
205
206
|
$ mw app copy INSTALLATION-ID --description <value> [-q]
|
|
@@ -211,6 +212,9 @@ FLAGS
|
|
|
211
212
|
-q, --quiet suppress process output and only display a machine-readable summary.
|
|
212
213
|
--description=<value> (required) set a description for the new app installation
|
|
213
214
|
|
|
215
|
+
DESCRIPTION
|
|
216
|
+
Copy an app within a project
|
|
217
|
+
|
|
214
218
|
FLAG DESCRIPTIONS
|
|
215
219
|
-q, --quiet suppress process output and only display a machine-readable summary.
|
|
216
220
|
|
|
@@ -220,7 +224,7 @@ FLAG DESCRIPTIONS
|
|
|
220
224
|
|
|
221
225
|
## `mw app dependency list`
|
|
222
226
|
|
|
223
|
-
|
|
227
|
+
Get all available dependencies
|
|
224
228
|
|
|
225
229
|
```
|
|
226
230
|
USAGE
|
|
@@ -239,7 +243,7 @@ FLAGS
|
|
|
239
243
|
--sort=<value> property to sort by (prepend '-' for descending)
|
|
240
244
|
|
|
241
245
|
DESCRIPTION
|
|
242
|
-
|
|
246
|
+
Get all available dependencies
|
|
243
247
|
```
|
|
244
248
|
|
|
245
249
|
## `mw app dependency update INSTALLATION-ID`
|
|
@@ -280,7 +284,7 @@ FLAG DESCRIPTIONS
|
|
|
280
284
|
|
|
281
285
|
## `mw app dependency versions SYSTEMSOFTWARE`
|
|
282
286
|
|
|
283
|
-
|
|
287
|
+
Get all available versions of a particular dependency
|
|
284
288
|
|
|
285
289
|
```
|
|
286
290
|
USAGE
|
|
@@ -302,7 +306,7 @@ FLAGS
|
|
|
302
306
|
--sort=<value> property to sort by (prepend '-' for descending)
|
|
303
307
|
|
|
304
308
|
DESCRIPTION
|
|
305
|
-
|
|
309
|
+
Get all available versions of a particular dependency
|
|
306
310
|
```
|
|
307
311
|
|
|
308
312
|
## `mw app get INSTALLATION-ID`
|
|
@@ -2779,7 +2783,7 @@ FLAG DESCRIPTIONS
|
|
|
2779
2783
|
|
|
2780
2784
|
## `mw project create`
|
|
2781
2785
|
|
|
2782
|
-
|
|
2786
|
+
Create a new project
|
|
2783
2787
|
|
|
2784
2788
|
```
|
|
2785
2789
|
USAGE
|
|
@@ -2794,7 +2798,7 @@ FLAGS
|
|
|
2794
2798
|
--wait-timeout=<value> [default: 600] The number of seconds to wait for the resource to be ready.
|
|
2795
2799
|
|
|
2796
2800
|
DESCRIPTION
|
|
2797
|
-
|
|
2801
|
+
Create a new project
|
|
2798
2802
|
|
|
2799
2803
|
FLAG DESCRIPTIONS
|
|
2800
2804
|
-q, --quiet suppress process output and only display a machine-readable summary.
|
|
@@ -2976,7 +2980,7 @@ DESCRIPTION
|
|
|
2976
2980
|
|
|
2977
2981
|
## `mw project get [PROJECT-ID]`
|
|
2978
2982
|
|
|
2979
|
-
Get a
|
|
2983
|
+
Get details of a project
|
|
2980
2984
|
|
|
2981
2985
|
```
|
|
2982
2986
|
USAGE
|
|
@@ -2990,7 +2994,7 @@ FLAGS
|
|
|
2990
2994
|
<options: json|yaml>
|
|
2991
2995
|
|
|
2992
2996
|
DESCRIPTION
|
|
2993
|
-
Get a
|
|
2997
|
+
Get details of a project
|
|
2994
2998
|
```
|
|
2995
2999
|
|
|
2996
3000
|
## `mw project invite get INVITEID`
|
|
@@ -3063,7 +3067,7 @@ DESCRIPTION
|
|
|
3063
3067
|
|
|
3064
3068
|
## `mw project list`
|
|
3065
3069
|
|
|
3066
|
-
List
|
|
3070
|
+
List all projects that you have access to
|
|
3067
3071
|
|
|
3068
3072
|
```
|
|
3069
3073
|
USAGE
|
|
@@ -3082,23 +3086,7 @@ FLAGS
|
|
|
3082
3086
|
--sort=<value> property to sort by (prepend '-' for descending)
|
|
3083
3087
|
|
|
3084
3088
|
DESCRIPTION
|
|
3085
|
-
List
|
|
3086
|
-
```
|
|
3087
|
-
|
|
3088
|
-
## `mw project list-react`
|
|
3089
|
-
|
|
3090
|
-
```
|
|
3091
|
-
USAGE
|
|
3092
|
-
$ mw project list-react -o txt|json [--wait] [--columns <value> | ] [--extended] [--noTruncate]
|
|
3093
|
-
|
|
3094
|
-
FLAGS
|
|
3095
|
-
-o, --output=<option> (required) [default: txt] The output format to use; use 'txt' for a human readable text
|
|
3096
|
-
representation, and 'json' for a machine-readable JSON representation.
|
|
3097
|
-
<options: txt|json>
|
|
3098
|
-
--columns=<value> only show provided columns (comma-seperated)
|
|
3099
|
-
--extended show extra columns
|
|
3100
|
-
--noTruncate do not truncate output to fit screen
|
|
3101
|
-
--wait
|
|
3089
|
+
List all projects that you have access to
|
|
3102
3090
|
```
|
|
3103
3091
|
|
|
3104
3092
|
## `mw project membership get MEMBERSHIPID`
|
package/dist/esm/BaseCommand.js
CHANGED
|
@@ -13,6 +13,7 @@ export class BaseCommand extends Command {
|
|
|
13
13
|
throw new Error(`Could not get token from either config file (${this.getTokenFilename()}) or environment`);
|
|
14
14
|
}
|
|
15
15
|
this.apiClient = MittwaldAPIV2Client.newWithToken(token);
|
|
16
|
+
this.apiClient.axios.defaults.headers["User-Agent"] = `mittwald-cli/${this.config.version}`;
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
19
|
getTokenFilename() {
|
|
@@ -4,6 +4,7 @@ type Result = {
|
|
|
4
4
|
appInstallationId: string;
|
|
5
5
|
};
|
|
6
6
|
export declare class Copy extends ExecRenderBaseCommand<typeof Copy, Result> {
|
|
7
|
+
static description: string;
|
|
7
8
|
static args: {
|
|
8
9
|
"installation-id": import("@oclif/core/lib/interfaces/parser.js").Arg<string, Record<string, unknown>>;
|
|
9
10
|
};
|
|
@@ -6,6 +6,7 @@ import { Flags } from "@oclif/core";
|
|
|
6
6
|
import { assertStatus } from "@mittwald/api-client-commons";
|
|
7
7
|
import { Success } from "../../rendering/react/components/Success.js";
|
|
8
8
|
export class Copy extends ExecRenderBaseCommand {
|
|
9
|
+
static description = "Copy an app within a project";
|
|
9
10
|
static args = { ...appInstallationFlags };
|
|
10
11
|
static flags = {
|
|
11
12
|
...processFlags,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ListBaseCommand } from "../../../ListBaseCommand.js";
|
|
2
2
|
export class List extends ListBaseCommand {
|
|
3
|
-
static description = "
|
|
3
|
+
static description = "Get all available dependencies";
|
|
4
4
|
static args = {};
|
|
5
5
|
static flags = {
|
|
6
6
|
...ListBaseCommand.baseFlags,
|
|
@@ -3,7 +3,7 @@ import { ListBaseCommand } from "../../../ListBaseCommand.js";
|
|
|
3
3
|
import { SemVer } from "semver";
|
|
4
4
|
import { Args } from "@oclif/core";
|
|
5
5
|
export class Versions extends ListBaseCommand {
|
|
6
|
-
static description = "
|
|
6
|
+
static description = "Get all available versions of a particular dependency";
|
|
7
7
|
static args = {
|
|
8
8
|
systemsoftware: Args.string({
|
|
9
9
|
description: "name of the systemsoftware for which to list versions",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExecRenderBaseCommand } from "../../../rendering/react/ExecRenderBaseCommand.js";
|
|
2
2
|
import { AppInstaller, } from "../../../lib/app/Installer.js";
|
|
3
|
-
const installer = new AppInstaller("
|
|
3
|
+
const installer = new AppInstaller("34220303-cb87-4592-8a95-2eb20a97b2ac", "PHP Project", ["version", "site-title", "wait"]);
|
|
4
4
|
export default class InstallPhp extends ExecRenderBaseCommand {
|
|
5
5
|
static description = installer.description;
|
|
6
6
|
static flags = installer.flags;
|
|
@@ -15,7 +15,7 @@ type ExtendedResponseItem = ResponseItem & {
|
|
|
15
15
|
export default class List extends ListBaseCommand<typeof List, ResponseItem, Response> {
|
|
16
16
|
static description: string;
|
|
17
17
|
static flags: {
|
|
18
|
-
|
|
18
|
+
"project-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string>;
|
|
19
19
|
};
|
|
20
20
|
protected getData(): Promise<Response>;
|
|
21
21
|
protected mapData(data: SuccessfulResponse<Response, 200>["data"]): Promise<ExtendedResponseItem[]>;
|
|
@@ -9,7 +9,7 @@ export default class List extends ListBaseCommand {
|
|
|
9
9
|
...projectFlags,
|
|
10
10
|
};
|
|
11
11
|
async getData() {
|
|
12
|
-
const projectId = await withProjectId(this.apiClient, this.flags, this.args, this.config);
|
|
12
|
+
const projectId = await withProjectId(this.apiClient, List, this.flags, this.args, this.config);
|
|
13
13
|
const apps = await this.apiClient.app.listAppinstallations({
|
|
14
14
|
pathParameters: { projectId },
|
|
15
15
|
});
|
|
@@ -15,6 +15,7 @@ export declare class Create extends ExecRenderBaseCommand<typeof Create, Result>
|
|
|
15
15
|
"user-external": import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
16
16
|
"user-access-level": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
17
17
|
quiet: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
18
|
+
"project-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string>;
|
|
18
19
|
};
|
|
19
20
|
protected exec(): Promise<Result>;
|
|
20
21
|
private getPassword;
|
|
@@ -46,7 +46,7 @@ export class Create extends ExecRenderBaseCommand {
|
|
|
46
46
|
};
|
|
47
47
|
async exec() {
|
|
48
48
|
const p = makeProcessRenderer(this.flags, "Creating a new MySQL database");
|
|
49
|
-
const projectId = await withProjectId(this.apiClient, this.flags, this.args, this.config);
|
|
49
|
+
const projectId = await withProjectId(this.apiClient, Create, this.flags, this.args, this.config);
|
|
50
50
|
const { description, version, collation, "character-set": characterSet, "user-external": externalAccess, "user-access-level": accessLevel, } = this.flags;
|
|
51
51
|
const password = await this.getPassword(p);
|
|
52
52
|
const db = await p.runStep("creating MySQL database", async () => {
|
|
@@ -10,7 +10,7 @@ export declare class List extends ListBaseCommand<typeof List, ResponseItem, Res
|
|
|
10
10
|
static description: string;
|
|
11
11
|
static args: {};
|
|
12
12
|
static flags: {
|
|
13
|
-
|
|
13
|
+
"project-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string>;
|
|
14
14
|
};
|
|
15
15
|
getData(): Promise<Response>;
|
|
16
16
|
protected mapData(data: SuccessfulResponse<Response, 200>["data"]): MittwaldAPIV2.Components.Schemas.DatabaseMySqlDatabase[];
|
|
@@ -9,7 +9,7 @@ export class List extends ListBaseCommand {
|
|
|
9
9
|
...projectFlags,
|
|
10
10
|
};
|
|
11
11
|
async getData() {
|
|
12
|
-
const projectId = await withProjectId(this.apiClient, this.flags, this.args, this.config);
|
|
12
|
+
const projectId = await withProjectId(this.apiClient, List, this.flags, this.args, this.config);
|
|
13
13
|
return await this.apiClient.database.listMysqlDatabases({
|
|
14
14
|
pathParameters: { projectId },
|
|
15
15
|
});
|
|
@@ -12,6 +12,7 @@ export declare class Create extends ExecRenderBaseCommand<typeof Create, Result>
|
|
|
12
12
|
"max-memory": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
13
13
|
"max-memory-policy": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
14
14
|
quiet: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
15
|
+
"project-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string>;
|
|
15
16
|
};
|
|
16
17
|
protected exec(): Promise<Result>;
|
|
17
18
|
protected render({ databaseId }: Result): ReactNode;
|
|
@@ -47,7 +47,7 @@ export class Create extends ExecRenderBaseCommand {
|
|
|
47
47
|
};
|
|
48
48
|
async exec() {
|
|
49
49
|
const p = makeProcessRenderer(this.flags, "Creating a new Redis database");
|
|
50
|
-
const projectId = await withProjectId(this.apiClient, this.flags, this.args, this.config);
|
|
50
|
+
const projectId = await withProjectId(this.apiClient, Create, this.flags, this.args, this.config);
|
|
51
51
|
const { description, version, "max-memory": maxMemory, "max-memory-policy": maxMemoryPolicy, persistent, } = this.flags;
|
|
52
52
|
const db = await p.runStep("creating Redis database", async () => {
|
|
53
53
|
const r = await this.apiClient.database.createRedisDatabase({
|
|
@@ -10,7 +10,7 @@ export declare class List extends ListBaseCommand<typeof List, ResponseItem, Res
|
|
|
10
10
|
static description: string;
|
|
11
11
|
static args: {};
|
|
12
12
|
static flags: {
|
|
13
|
-
|
|
13
|
+
"project-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string>;
|
|
14
14
|
};
|
|
15
15
|
getData(): Promise<Response>;
|
|
16
16
|
protected mapData(data: SuccessfulResponse<Response, 200>["data"]): MittwaldAPIV2.Components.Schemas.DatabaseRedisDatabase[];
|
|
@@ -8,7 +8,7 @@ export class List extends ListBaseCommand {
|
|
|
8
8
|
...projectFlags,
|
|
9
9
|
};
|
|
10
10
|
async getData() {
|
|
11
|
-
const projectId = await withProjectId(this.apiClient, this.flags, this.args, this.config);
|
|
11
|
+
const projectId = await withProjectId(this.apiClient, List, this.flags, this.args, this.config);
|
|
12
12
|
return await this.apiClient.database.listRedisDatabases({
|
|
13
13
|
pathParameters: { projectId },
|
|
14
14
|
});
|
|
@@ -6,11 +6,11 @@ import { ListColumns } from "../../../Formatter.js";
|
|
|
6
6
|
type ResponseItem = Simplify<MittwaldAPIV2.Paths.V2RedisVersions.Get.Responses.$200.Content.ApplicationJson[number]>;
|
|
7
7
|
export type PathParams = MittwaldAPIV2.Paths.V2RedisVersions.Get.Parameters.Path;
|
|
8
8
|
export type Response = Awaited<ReturnType<MittwaldAPIV2Client["database"]["listRedisVersions"]>>;
|
|
9
|
-
export default class
|
|
9
|
+
export default class Versions extends ListBaseCommand<typeof Versions, ResponseItem, Response> {
|
|
10
10
|
static description: string;
|
|
11
11
|
static args: {};
|
|
12
12
|
static flags: {
|
|
13
|
-
|
|
13
|
+
"project-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string>;
|
|
14
14
|
};
|
|
15
15
|
getData(): Promise<Response>;
|
|
16
16
|
protected mapData(data: SuccessfulResponse<Response, 200>["data"]): MittwaldAPIV2.Components.Schemas.DatabaseRedisVersion[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ListBaseCommand } from "../../../ListBaseCommand.js";
|
|
2
2
|
import { projectFlags, withProjectId } from "../../../lib/project/flags.js";
|
|
3
|
-
export default class
|
|
3
|
+
export default class Versions extends ListBaseCommand {
|
|
4
4
|
static description = "List available Redis versions.";
|
|
5
5
|
static args = {};
|
|
6
6
|
static flags = {
|
|
@@ -8,7 +8,7 @@ export default class List extends ListBaseCommand {
|
|
|
8
8
|
...projectFlags,
|
|
9
9
|
};
|
|
10
10
|
async getData() {
|
|
11
|
-
const projectId = await withProjectId(this.apiClient, this.flags, this.args, this.config);
|
|
11
|
+
const projectId = await withProjectId(this.apiClient, Versions, this.flags, this.args, this.config);
|
|
12
12
|
return await this.apiClient.database.listRedisVersions({
|
|
13
13
|
pathParameters: {},
|
|
14
14
|
queryParameters: { projectId },
|
|
@@ -9,7 +9,7 @@ export declare class List extends ListBaseCommand<typeof List, ResponseItem, Res
|
|
|
9
9
|
static description: string;
|
|
10
10
|
static args: {};
|
|
11
11
|
static flags: {
|
|
12
|
-
|
|
12
|
+
"project-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string>;
|
|
13
13
|
};
|
|
14
14
|
getData(): Promise<Response>;
|
|
15
15
|
protected mapData(data: SuccessfulResponse<Response, 200>["data"]): ResponseItem[] | Promise<ResponseItem[]>;
|
|
@@ -8,7 +8,7 @@ export class List extends ListBaseCommand {
|
|
|
8
8
|
...projectFlags,
|
|
9
9
|
};
|
|
10
10
|
async getData() {
|
|
11
|
-
const projectId = await withProjectId(this.apiClient, this.flags, this.args, this.config);
|
|
11
|
+
const projectId = await withProjectId(this.apiClient, List, this.flags, this.args, this.config);
|
|
12
12
|
const pathParams = { projectId };
|
|
13
13
|
return await this.apiClient.domain.listDomains({
|
|
14
14
|
pathParameters: pathParams,
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { Simplify } from "@mittwald/api-client-commons";
|
|
2
|
-
import { MittwaldAPIV2 } from "@mittwald/api-client";
|
|
2
|
+
import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
3
3
|
import { SuccessfulResponse } from "../../../types.js";
|
|
4
|
-
import {
|
|
4
|
+
import { ListBaseCommand } from "../../../ListBaseCommand.js";
|
|
5
5
|
type ResponseItem = Simplify<MittwaldAPIV2.Paths.V2ProjectsProjectIdDomainOwnerships.Get.Responses.$200.Content.ApplicationJson[number]>;
|
|
6
|
-
|
|
6
|
+
type Response = Awaited<ReturnType<MittwaldAPIV2Client["domain"]["listDomainOwnerships"]>>;
|
|
7
|
+
export declare class List extends ListBaseCommand<typeof List, ResponseItem, Response> {
|
|
8
|
+
static description: string;
|
|
9
|
+
static args: {};
|
|
10
|
+
static flags: {
|
|
11
|
+
"project-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string>;
|
|
12
|
+
};
|
|
13
|
+
getData(): Promise<Response>;
|
|
7
14
|
protected mapData(data: SuccessfulResponse<Response, 200>["data"]): MittwaldAPIV2.Components.Schemas.DomainDomainOwnership[];
|
|
8
15
|
}
|
|
9
16
|
export {};
|
|
@@ -1,7 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
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 domain ownerships of a project.";
|
|
5
|
+
static args = {};
|
|
6
|
+
static flags = {
|
|
7
|
+
...ListBaseCommand.baseFlags,
|
|
8
|
+
...projectFlags,
|
|
9
|
+
};
|
|
10
|
+
async getData() {
|
|
11
|
+
const pathParameters = {
|
|
12
|
+
projectId: await withProjectId(this.apiClient, List, this.flags, this.args, this.config),
|
|
13
|
+
};
|
|
14
|
+
return await this.apiClient.domain.listDomainOwnerships({
|
|
15
|
+
pathParameters,
|
|
16
|
+
});
|
|
17
|
+
}
|
|
3
18
|
mapData(data) {
|
|
4
|
-
console.log(data);
|
|
5
19
|
return data;
|
|
6
20
|
}
|
|
7
21
|
}
|
|
@@ -18,6 +18,7 @@ export default class Create extends ExecRenderBaseCommand<typeof Create, CreateR
|
|
|
18
18
|
"path-to-dir": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
19
19
|
"path-to-app": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
20
20
|
"path-to-url": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
21
|
+
"project-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string>;
|
|
21
22
|
quiet: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
22
23
|
};
|
|
23
24
|
protected exec(): Promise<CreateResult>;
|
|
@@ -50,7 +50,7 @@ export default class Create extends ExecRenderBaseCommand {
|
|
|
50
50
|
}),
|
|
51
51
|
};
|
|
52
52
|
async exec() {
|
|
53
|
-
const projectId = await withProjectId(this.apiClient, this.flags, this.args, this.config);
|
|
53
|
+
const projectId = await withProjectId(this.apiClient, Create, this.flags, this.args, this.config);
|
|
54
54
|
const process = makeProcessRenderer(this.flags, "Creating a new ingress");
|
|
55
55
|
const { hostname } = this.flags;
|
|
56
56
|
const paths = [];
|
|
@@ -11,6 +11,7 @@ export declare class List extends ListBaseCommand<typeof List, ResponseItem, Res
|
|
|
11
11
|
static args: {};
|
|
12
12
|
static flags: {
|
|
13
13
|
all: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
14
|
+
"project-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string>;
|
|
14
15
|
};
|
|
15
16
|
getData(): Promise<Response>;
|
|
16
17
|
protected mapParams(input: PathParams): Promise<PathParams> | PathParams;
|
|
@@ -16,7 +16,7 @@ export class List extends ListBaseCommand {
|
|
|
16
16
|
if (this.flags.all) {
|
|
17
17
|
return await this.apiClient.domain.ingressListAccessible({});
|
|
18
18
|
}
|
|
19
|
-
const projectId = await withProjectId(this.apiClient, this.flags, this.args, this.config);
|
|
19
|
+
const projectId = await withProjectId(this.apiClient, List, this.flags, this.args, this.config);
|
|
20
20
|
return await this.apiClient.domain.ingressListForProject({
|
|
21
21
|
pathParameters: { projectId },
|
|
22
22
|
});
|
|
@@ -16,6 +16,7 @@ export default class Create extends ExecRenderBaseCommand<typeof Create, CreateR
|
|
|
16
16
|
password: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
17
17
|
"random-password": import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
18
18
|
quiet: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
19
|
+
"project-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string>;
|
|
19
20
|
};
|
|
20
21
|
static examples: {
|
|
21
22
|
description: string;
|
|
@@ -67,7 +67,7 @@ export default class Create extends ExecRenderBaseCommand {
|
|
|
67
67
|
}
|
|
68
68
|
async exec() {
|
|
69
69
|
const { flags } = await this.parse(Create);
|
|
70
|
-
const projectId = await withProjectId(this.apiClient, flags, {}, this.config);
|
|
70
|
+
const projectId = await withProjectId(this.apiClient, Create, flags, {}, this.config);
|
|
71
71
|
const process = makeProcessRenderer(flags, "Creating a new mail address");
|
|
72
72
|
const [password, passwordGenerated] = await this.getPassword(process);
|
|
73
73
|
const response = await process.runStep("creating mail address", async () => {
|
|
@@ -10,7 +10,7 @@ export declare class List extends ListBaseCommand<typeof List, ResponseItem, Res
|
|
|
10
10
|
static description: string;
|
|
11
11
|
static args: {};
|
|
12
12
|
static flags: {
|
|
13
|
-
|
|
13
|
+
"project-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string>;
|
|
14
14
|
};
|
|
15
15
|
getData(): Promise<Response>;
|
|
16
16
|
protected mapData(data: SuccessfulResponse<Response, 200>["data"]): MittwaldAPIV2.Components.Schemas.MailMailAddress[];
|
|
@@ -23,7 +23,7 @@ export class List extends ListBaseCommand {
|
|
|
23
23
|
async mapParams(input) {
|
|
24
24
|
return {
|
|
25
25
|
...input,
|
|
26
|
-
projectId: await withProjectId(this.apiClient, this.flags, this.args, this.config),
|
|
26
|
+
projectId: await withProjectId(this.apiClient, List, this.flags, this.args, this.config),
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
getColumns(data) {
|
|
@@ -7,7 +7,7 @@ export default class Delete extends DeleteBaseCommand<typeof Delete> {
|
|
|
7
7
|
quiet: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
8
8
|
};
|
|
9
9
|
static args: {
|
|
10
|
-
|
|
10
|
+
"org-id": import("@oclif/core/lib/interfaces/parser.js").Arg<string>;
|
|
11
11
|
};
|
|
12
12
|
protected deleteResource(): Promise<void>;
|
|
13
13
|
}
|
|
@@ -7,7 +7,7 @@ export default class Delete extends DeleteBaseCommand {
|
|
|
7
7
|
static flags = { ...DeleteBaseCommand.baseFlags };
|
|
8
8
|
static args = { ...orgArgs };
|
|
9
9
|
async deleteResource() {
|
|
10
|
-
const customerId = await withOrgId(this.apiClient, {}, this.args, this.config);
|
|
10
|
+
const customerId = await withOrgId(this.apiClient, Delete, {}, this.args, this.config);
|
|
11
11
|
const response = await this.apiClient.customer.deleteCustomer({
|
|
12
12
|
pathParameters: { customerId },
|
|
13
13
|
});
|
|
@@ -8,7 +8,7 @@ export declare class Get extends RenderBaseCommand<typeof Get> {
|
|
|
8
8
|
[x: string]: import("@oclif/core/lib/interfaces/parser.js").CompletableFlag<any>;
|
|
9
9
|
};
|
|
10
10
|
static args: {
|
|
11
|
-
|
|
11
|
+
"org-id": import("@oclif/core/lib/interfaces/parser.js").Arg<string>;
|
|
12
12
|
};
|
|
13
13
|
protected render(): ReactNode;
|
|
14
14
|
}
|
|
@@ -39,7 +39,7 @@ export class Get extends RenderBaseCommand {
|
|
|
39
39
|
};
|
|
40
40
|
static args = { ...orgArgs };
|
|
41
41
|
render() {
|
|
42
|
-
const customerId = usePromise(() => withOrgId(this.apiClient, this.flags, this.args, this.config), []);
|
|
42
|
+
const customerId = usePromise(() => withOrgId(this.apiClient, Get, this.flags, this.args, this.config), []);
|
|
43
43
|
const customerResponse = usePromise((id) => this.apiClient.customer.getCustomer({
|
|
44
44
|
pathParameters: { customerId: id },
|
|
45
45
|
}), [customerId]);
|
|
@@ -10,7 +10,7 @@ export declare abstract class List extends ListBaseCommand<typeof List, Response
|
|
|
10
10
|
static description: string;
|
|
11
11
|
static args: {};
|
|
12
12
|
static flags: {
|
|
13
|
-
|
|
13
|
+
"org-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string>;
|
|
14
14
|
};
|
|
15
15
|
getData(): Promise<Response>;
|
|
16
16
|
protected mapData(data: SuccessfulResponse<Response, 200>["data"]): MittwaldAPIV2.Components.Schemas.MembershipCustomerInvite[];
|
|
@@ -9,7 +9,7 @@ export class List extends ListBaseCommand {
|
|
|
9
9
|
...orgFlags,
|
|
10
10
|
};
|
|
11
11
|
async getData() {
|
|
12
|
-
const customerId = await withOrgId(this.apiClient, this.flags, this.args, this.config);
|
|
12
|
+
const customerId = await withOrgId(this.apiClient, List, this.flags, this.args, this.config);
|
|
13
13
|
return await this.apiClient.customer.listInvitesForCustomer({
|
|
14
14
|
pathParameters: { customerId },
|
|
15
15
|
});
|
|
@@ -10,6 +10,7 @@ export declare class Invite extends ExecRenderBaseCommand<typeof Invite, {
|
|
|
10
10
|
role: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
11
11
|
message: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
12
12
|
quiet: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
13
|
+
"org-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string>;
|
|
13
14
|
};
|
|
14
15
|
protected exec(): Promise<{
|
|
15
16
|
inviteId: string;
|
|
@@ -27,7 +27,7 @@ export class Invite extends ExecRenderBaseCommand {
|
|
|
27
27
|
static flags = { ...orgFlags, ...processFlags, ...inviteFlags };
|
|
28
28
|
async exec() {
|
|
29
29
|
const process = makeProcessRenderer(this.flags, "Inviting user to organization");
|
|
30
|
-
const customerId = await withOrgId(this.apiClient, this.flags, this.args, this.config);
|
|
30
|
+
const customerId = await withOrgId(this.apiClient, Invite, this.flags, this.args, this.config);
|
|
31
31
|
const invite = await process.runStep("Creating invite", async () => {
|
|
32
32
|
const result = await this.apiClient.customer.createCustomerInvite({
|
|
33
33
|
pathParameters: { customerId },
|
|
@@ -13,7 +13,7 @@ export declare class List extends ListBaseCommand<typeof List, ResponseItem, Res
|
|
|
13
13
|
static description: string;
|
|
14
14
|
static args: {};
|
|
15
15
|
static flags: {
|
|
16
|
-
|
|
16
|
+
"org-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string>;
|
|
17
17
|
};
|
|
18
18
|
getData(): Promise<Response>;
|
|
19
19
|
protected mapData(data: SuccessfulResponse<Response, 200>["data"]): Promise<(MittwaldAPIV2.Components.Schemas.MembershipCustomerMembership | {
|
|
@@ -9,7 +9,7 @@ export class List extends ListBaseCommand {
|
|
|
9
9
|
...orgFlags,
|
|
10
10
|
};
|
|
11
11
|
async getData() {
|
|
12
|
-
const customerId = await withOrgId(this.apiClient, this.flags, this.args, this.config);
|
|
12
|
+
const customerId = await withOrgId(this.apiClient, List, this.flags, this.args, this.config);
|
|
13
13
|
return await this.apiClient.customer.listMembershipsForCustomer({
|
|
14
14
|
pathParameters: { customerId },
|
|
15
15
|
});
|
|
@@ -10,6 +10,7 @@ export declare class Create extends ExecRenderBaseCommand<typeof Create, CreateR
|
|
|
10
10
|
"wait-timeout": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<number, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
11
11
|
expires: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
12
12
|
description: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
13
|
+
"project-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string>;
|
|
13
14
|
quiet: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
14
15
|
};
|
|
15
16
|
protected exec(): Promise<CreateResult>;
|
|
@@ -21,7 +21,7 @@ export class Create extends ExecRenderBaseCommand {
|
|
|
21
21
|
};
|
|
22
22
|
async exec() {
|
|
23
23
|
const p = makeProcessRenderer(this.flags, "Creating backup");
|
|
24
|
-
const projectId = await withProjectId(this.apiClient, this.flags, this.args, this.config);
|
|
24
|
+
const projectId = await withProjectId(this.apiClient, Create, this.flags, this.args, this.config);
|
|
25
25
|
const { description } = this.flags;
|
|
26
26
|
const expirationTime = expirationDateFromFlags(this.flags);
|
|
27
27
|
const backup = await p.runStep("creating backup", async () => {
|
|
@@ -10,7 +10,7 @@ export declare class List extends ListBaseCommand<typeof List, ListItem, ListRes
|
|
|
10
10
|
static description: string;
|
|
11
11
|
static args: {};
|
|
12
12
|
static flags: {
|
|
13
|
-
|
|
13
|
+
"project-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string>;
|
|
14
14
|
};
|
|
15
15
|
protected mapData(data: SuccessfulResponse<ListResponse, 200>["data"]): ListItem[] | Promise<ListItem[]>;
|
|
16
16
|
getData(): Promise<ListResponse>;
|
|
@@ -12,7 +12,7 @@ export class List extends ListBaseCommand {
|
|
|
12
12
|
return data;
|
|
13
13
|
}
|
|
14
14
|
async getData() {
|
|
15
|
-
const projectId = await withProjectId(this.apiClient, this.flags, {}, this.config);
|
|
15
|
+
const projectId = await withProjectId(this.apiClient, List, this.flags, {}, this.config);
|
|
16
16
|
return await this.apiClient.backup.listProjectBackups({
|
|
17
17
|
pathParameters: { projectId },
|
|
18
18
|
});
|
|
@@ -10,7 +10,7 @@ export declare class List extends ListBaseCommand<typeof List, ResponseItem, Res
|
|
|
10
10
|
static description: string;
|
|
11
11
|
static args: {};
|
|
12
12
|
static flags: {
|
|
13
|
-
|
|
13
|
+
"project-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string>;
|
|
14
14
|
};
|
|
15
15
|
getData(): Promise<Response>;
|
|
16
16
|
protected mapData(data: SuccessfulResponse<Response, 200>["data"]): BackupProjectBackupSchedule[];
|