@mittwald/cli 1.0.0-alpha.28 → 1.0.0-alpha.29
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 +106 -61
- package/dist/esm/ExtendedBaseCommand.d.ts +1 -1
- package/dist/esm/commands/app/copy.d.ts +1 -0
- package/dist/esm/commands/app/dependency/update.d.ts +1 -0
- package/dist/esm/commands/app/get.d.ts +1 -0
- package/dist/esm/commands/app/ssh.d.ts +1 -0
- package/dist/esm/commands/app/uninstall.d.ts +1 -0
- package/dist/esm/commands/context/set.d.ts +1 -0
- package/dist/esm/commands/context/set.js +10 -0
- package/dist/esm/commands/cronjob/create.d.ts +1 -0
- package/dist/esm/commands/cronjob/create.js +1 -0
- package/dist/esm/commands/database/mysql/phpmyadmin.js +1 -1
- package/dist/esm/commands/database/mysql/user/list.d.ts +1 -1
- package/dist/esm/commands/database/mysql/user/list.js +1 -1
- package/dist/esm/commands/domain/dnszone/get.d.ts +9 -8
- package/dist/esm/commands/domain/dnszone/get.js +22 -9
- package/dist/esm/commands/domain/dnszone/list.d.ts +12 -6
- package/dist/esm/commands/domain/dnszone/list.js +63 -8
- package/dist/esm/commands/domain/dnszone/update.d.ts +28 -0
- package/dist/esm/commands/domain/dnszone/update.js +176 -0
- package/dist/esm/commands/domain/get.d.ts +9 -7
- package/dist/esm/commands/domain/get.js +23 -10
- package/dist/esm/commands/domain/list.d.ts +3 -1
- package/dist/esm/commands/domain/list.js +28 -2
- package/dist/esm/commands/domain/virtualhost/create.d.ts +1 -3
- package/dist/esm/commands/domain/virtualhost/create.js +5 -21
- package/dist/esm/commands/domain/virtualhost/get.js +1 -13
- package/dist/esm/commands/mail/address/delete.js +1 -1
- package/dist/esm/commands/org/invite/list-own.d.ts +1 -1
- package/dist/esm/commands/org/invite/revoke.js +2 -2
- package/dist/esm/commands/org/membership/list-own.d.ts +1 -1
- package/dist/esm/commands/org/membership/revoke.js +2 -2
- package/dist/esm/commands/project/invite/get.js +1 -1
- package/dist/esm/commands/project/membership/get.js +1 -1
- package/dist/esm/lib/app/flags.d.ts +2 -5
- package/dist/esm/lib/app/flags.js +17 -3
- package/dist/esm/lib/context.d.ts +3 -1
- package/dist/esm/lib/context.js +2 -0
- package/dist/esm/lib/context_flags.d.ts +17 -3
- package/dist/esm/lib/context_flags.js +21 -15
- package/dist/esm/lib/context_user.d.ts +1 -1
- package/dist/esm/lib/context_user.js +11 -4
- package/dist/esm/lib/database/mysql/connect.js +1 -1
- package/dist/esm/lib/domain/dnszone/flags.d.ts +1 -0
- package/dist/esm/lib/domain/dnszone/flags.js +19 -0
- package/dist/esm/lib/domain/dnszone/records.d.ts +17 -0
- package/dist/esm/lib/domain/dnszone/records.js +18 -0
- package/dist/esm/lib/domain/flags.d.ts +1 -0
- package/dist/esm/lib/domain/flags.js +20 -0
- package/dist/esm/lib/org/flags.d.ts +1 -5
- package/dist/esm/lib/project/flags.d.ts +15 -5
- package/dist/esm/lib/project/flags.js +51 -1
- package/dist/esm/lib/server/flags.d.ts +1 -5
- package/dist/esm/rendering/process/components/ProcessValidationErrors.js +3 -1
- package/dist/esm/rendering/react/RenderBaseCommand.d.ts +1 -1
- package/dist/esm/rendering/react/components/BooleanValue.d.ts +4 -0
- package/dist/esm/rendering/react/components/BooleanValue.js +9 -0
- package/dist/esm/rendering/react/components/DnsZone/DnsZoneDetails.d.ts +6 -0
- package/dist/esm/rendering/react/components/DnsZone/DnsZoneDetails.js +12 -0
- package/dist/esm/rendering/react/components/DnsZone/DnsZoneRecords.d.ts +6 -0
- package/dist/esm/rendering/react/components/DnsZone/DnsZoneRecords.js +17 -0
- package/dist/esm/rendering/react/components/DnsZone/DnsZoneRecordsA.d.ts +4 -0
- package/dist/esm/rendering/react/components/DnsZone/DnsZoneRecordsA.js +14 -0
- package/dist/esm/rendering/react/components/DnsZone/DnsZoneRecordsAAAA.d.ts +4 -0
- package/dist/esm/rendering/react/components/DnsZone/DnsZoneRecordsAAAA.js +14 -0
- package/dist/esm/rendering/react/components/DnsZone/DnsZoneRecordsMX.d.ts +4 -0
- package/dist/esm/rendering/react/components/DnsZone/DnsZoneRecordsMX.js +13 -0
- package/dist/esm/rendering/react/components/DnsZone/DnsZoneRecordsSRV.d.ts +4 -0
- package/dist/esm/rendering/react/components/DnsZone/DnsZoneRecordsSRV.js +9 -0
- package/dist/esm/rendering/react/components/DnsZone/DnsZoneRecordsTXT.d.ts +4 -0
- package/dist/esm/rendering/react/components/DnsZone/DnsZoneRecordsTXT.js +9 -0
- package/dist/esm/rendering/react/components/DnsZone/RecordComponent.d.ts +4 -0
- package/dist/esm/rendering/react/components/DnsZone/RecordComponent.js +1 -0
- package/dist/esm/rendering/react/components/DnsZone/RecordSetManagedByMittwald.d.ts +1 -0
- package/dist/esm/rendering/react/components/DnsZone/RecordSetManagedByMittwald.js +3 -0
- package/dist/esm/rendering/react/components/DnsZone/RecordSetValues.d.ts +4 -0
- package/dist/esm/rendering/react/components/DnsZone/RecordSetValues.js +5 -0
- package/dist/esm/rendering/react/components/Domain/DomainBaseDetails.d.ts +6 -0
- package/dist/esm/rendering/react/components/Domain/DomainBaseDetails.js +13 -0
- package/dist/esm/rendering/react/components/Domain/DomainDetails.d.ts +6 -0
- package/dist/esm/rendering/react/components/Domain/DomainDetails.js +7 -0
- package/dist/esm/rendering/react/components/Domain/DomainHandle.d.ts +7 -0
- package/dist/esm/rendering/react/components/Domain/DomainHandle.js +24 -0
- package/dist/esm/rendering/react/components/Project/ProjectSimpleStatus.d.ts +7 -0
- package/dist/esm/rendering/react/components/Project/ProjectSimpleStatus.js +19 -0
- package/dist/esm/rendering/react/components/Project/ProjectStatus.d.ts +2 -2
- package/dist/esm/rendering/react/components/Project/ProjectStatus.js +2 -2
- package/dist/esm/rendering/react/components/Value.js +1 -1
- package/package.json +10 -11
- package/dist/esm/commands/domain/ownership/get.d.ts +0 -15
- package/dist/esm/commands/domain/ownership/get.js +0 -19
- package/dist/esm/commands/domain/ownership/list.d.ts +0 -16
- package/dist/esm/commands/domain/ownership/list.js +0 -17
- package/dist/esm/rendering/react/components/Ingress/DomainOwnership.d.ts +0 -8
- package/dist/esm/rendering/react/components/Ingress/DomainOwnership.js +0 -7
- package/dist/esm/rendering/react/components/Project/ProjectReadiness.d.ts +0 -7
- package/dist/esm/rendering/react/components/Project/ProjectReadiness.js +0 -16
package/README.md
CHANGED
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
|
|
25
25
|
#### macOS, using Homebrew
|
|
26
26
|
|
|
27
|
-
Installation using [Homebrew](https://brew.sh/) is the recommended way of
|
|
27
|
+
Installation using [Homebrew](https://brew.sh/) is the recommended way of
|
|
28
|
+
installation on macOS.
|
|
28
29
|
|
|
29
30
|
```shell
|
|
30
31
|
$ brew tap mittwald/cli
|
|
@@ -33,11 +34,17 @@ $ brew install mw
|
|
|
33
34
|
|
|
34
35
|
#### Windows, using the Installer
|
|
35
36
|
|
|
36
|
-
Find the appropriate Windows installer from the
|
|
37
|
+
Find the appropriate Windows installer from the
|
|
38
|
+
[releases page](https://github.com/mittwald/cli/releases) and run the installer.
|
|
39
|
+
After running the installer, you should be able to use the `mw` command on
|
|
40
|
+
either the CMD prompt or PowerShell.
|
|
37
41
|
|
|
38
42
|
#### Any OS, using Node.js+NPM
|
|
39
43
|
|
|
40
|
-
Installing the CLI via NPM will work on any OS; however we cannot guarantee
|
|
44
|
+
Installing the CLI via NPM will work on any OS; however we cannot guarantee
|
|
45
|
+
stability, because functionality of the CLI may depend in the Node.js runtime
|
|
46
|
+
already installed on your system. Also, the automatic upgrade will not work when
|
|
47
|
+
using NPM; remember to run `npm upgrade -g @mittwald/cli` occasionally.
|
|
41
48
|
|
|
42
49
|
```shell
|
|
43
50
|
$ npm install -g @mittwald/cli
|
|
@@ -45,7 +52,12 @@ $ npm install -g @mittwald/cli
|
|
|
45
52
|
|
|
46
53
|
#### Any OS, using Docker
|
|
47
54
|
|
|
48
|
-
There is also the
|
|
55
|
+
There is also the
|
|
56
|
+
[`mittwald/cli` Docker image](https://hub.docker.com/r/mittwald/cli) that you
|
|
57
|
+
can use instead of installing the CLI on your system. In case of the Docker
|
|
58
|
+
container, authentication works a bit differently than described below: Make
|
|
59
|
+
sure that there is an environment variable `MITTWALD_API_TOKEN` present on your
|
|
60
|
+
system; you can then pass that environment variable into your container:
|
|
49
61
|
|
|
50
62
|
```shell
|
|
51
63
|
$ export MITTWALD_API_TOKEN=<enter token here>
|
|
@@ -54,7 +66,9 @@ $ docker run --rm -it -e MITTWALD_API_TOKEN mittwald/cli help
|
|
|
54
66
|
|
|
55
67
|
### Authentication
|
|
56
68
|
|
|
57
|
-
To use the CLI, you will need an
|
|
69
|
+
To use the CLI, you will need an
|
|
70
|
+
[mStudio API token](https://studio.mittwald.de/app/profile/api-tokens). With
|
|
71
|
+
your token in your clipboard, run the `mw login token` command:
|
|
58
72
|
|
|
59
73
|
```shell
|
|
60
74
|
$ mw login token
|
|
@@ -64,13 +78,22 @@ token saved to '/Users/mhelmich/.config/mw/token'
|
|
|
64
78
|
|
|
65
79
|
### Setting up shell autocompletion
|
|
66
80
|
|
|
67
|
-
The `mw` CLI offers a lot of commands and flags, and it can be hard to remember
|
|
81
|
+
The `mw` CLI offers a lot of commands and flags, and it can be hard to remember
|
|
82
|
+
all of them. To make your life easier, the CLI offers autocompletion for the
|
|
83
|
+
Bash and ZSH shells. To enable autocompletion, run the following command:
|
|
68
84
|
|
|
69
85
|
```shell
|
|
70
86
|
$ mw autocomplete
|
|
71
87
|
```
|
|
72
88
|
|
|
73
|
-
After that, follow the instructions printed by that command (those are specific
|
|
89
|
+
After that, follow the instructions printed by that command (those are specific
|
|
90
|
+
to your shell -- Bash, ZSH and Powershell are supported).
|
|
91
|
+
|
|
92
|
+
## Contributing
|
|
93
|
+
|
|
94
|
+
If you are a developer (either at @mittwald or an external contributor) and want
|
|
95
|
+
to contribute to the CLI, please refer to the [CONTRIBUTING.md](CONTRIBUTING.md)
|
|
96
|
+
document.
|
|
74
97
|
|
|
75
98
|
## Usage
|
|
76
99
|
|
|
@@ -154,12 +177,11 @@ USAGE
|
|
|
154
177
|
* [`mw database redis list`](#mw-database-redis-list)
|
|
155
178
|
* [`mw database redis shell DATABASE-ID`](#mw-database-redis-shell-database-id)
|
|
156
179
|
* [`mw database redis versions`](#mw-database-redis-versions)
|
|
157
|
-
* [`mw domain dnszone get
|
|
180
|
+
* [`mw domain dnszone get DNSZONE-ID`](#mw-domain-dnszone-get-dnszone-id)
|
|
158
181
|
* [`mw domain dnszone list`](#mw-domain-dnszone-list)
|
|
182
|
+
* [`mw domain dnszone update DNSZONE-ID RECORD-SET`](#mw-domain-dnszone-update-dnszone-id-record-set)
|
|
159
183
|
* [`mw domain get DOMAIN-ID`](#mw-domain-get-domain-id)
|
|
160
184
|
* [`mw domain list`](#mw-domain-list)
|
|
161
|
-
* [`mw domain ownership get DOMAINOWNERSHIPID`](#mw-domain-ownership-get-domainownershipid)
|
|
162
|
-
* [`mw domain ownership list`](#mw-domain-ownership-list)
|
|
163
185
|
* [`mw domain virtualhost create`](#mw-domain-virtualhost-create)
|
|
164
186
|
* [`mw domain virtualhost delete VIRTUAL-HOST-ID`](#mw-domain-virtualhost-delete-virtual-host-id)
|
|
165
187
|
* [`mw domain virtualhost get INGRESS-ID`](#mw-domain-virtualhost-get-ingress-id)
|
|
@@ -1538,7 +1560,7 @@ EXAMPLES
|
|
|
1538
1560
|
$ mw autocomplete --refresh-cache
|
|
1539
1561
|
```
|
|
1540
1562
|
|
|
1541
|
-
_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v3.0.
|
|
1563
|
+
_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v3.0.5/src/commands/autocomplete/index.ts)_
|
|
1542
1564
|
|
|
1543
1565
|
## `mw backup create`
|
|
1544
1566
|
|
|
@@ -1762,12 +1784,13 @@ Set context values for the current project, org or server
|
|
|
1762
1784
|
|
|
1763
1785
|
```
|
|
1764
1786
|
USAGE
|
|
1765
|
-
$ mw context set [--project-id <value>] [--server-id <value>] [--org-id <value>]
|
|
1787
|
+
$ mw context set [--project-id <value>] [--server-id <value>] [--org-id <value>] [--installation-id <value>]
|
|
1766
1788
|
|
|
1767
1789
|
FLAGS
|
|
1768
|
-
--
|
|
1769
|
-
--
|
|
1770
|
-
--
|
|
1790
|
+
--installation-id=<value> ID or short ID of an app installation
|
|
1791
|
+
--org-id=<value> ID or short ID of an organization
|
|
1792
|
+
--project-id=<value> ID or short ID of a project
|
|
1793
|
+
--server-id=<value> ID or short ID of a server
|
|
1771
1794
|
|
|
1772
1795
|
DESCRIPTION
|
|
1773
1796
|
Set context values for the current project, org or server
|
|
@@ -1914,12 +1937,14 @@ Create a new cron job
|
|
|
1914
1937
|
|
|
1915
1938
|
```
|
|
1916
1939
|
USAGE
|
|
1917
|
-
$ mw cronjob create --description <value> --interval <value> [-i <value>] [-q] [--disable] [--email
|
|
1918
|
-
[--url <value> | --command <value>] [--interpreter <value>]
|
|
1940
|
+
$ mw cronjob create --description <value> --interval <value> [-p <value>] [-i <value>] [-q] [--disable] [--email
|
|
1941
|
+
<value>] [--url <value> | --command <value>] [--interpreter <value>]
|
|
1919
1942
|
|
|
1920
1943
|
FLAGS
|
|
1921
1944
|
-i, --installation-id=<value> ID or short ID of an app installation; this flag is optional if a default app
|
|
1922
1945
|
installation is set in the context
|
|
1946
|
+
-p, --project-id=<value> ID or short ID of a project; this flag is optional if a default project is set in the
|
|
1947
|
+
context
|
|
1923
1948
|
-q, --quiet suppress process output and only display a machine-readable summary.
|
|
1924
1949
|
--command=<value> Command to execute for the cron job; either this or `--url` is required.
|
|
1925
1950
|
--description=<value> (required) Description of the cron job
|
|
@@ -1934,10 +1959,15 @@ FLAG DESCRIPTIONS
|
|
|
1934
1959
|
|
|
1935
1960
|
ID or short ID of an app installation; this flag is optional if a default app installation is set in the context
|
|
1936
1961
|
|
|
1937
|
-
May contain a short ID or a full ID of an app installation
|
|
1962
|
+
May contain a short ID or a full ID of an app installation.; you can also use the "mw context set
|
|
1938
1963
|
--installation-id=<VALUE>" command to persistently set a default app installation for all commands that accept this
|
|
1939
1964
|
flag.
|
|
1940
1965
|
|
|
1966
|
+
-p, --project-id=<value> ID or short ID of a project; this flag is optional if a default project is set in the context
|
|
1967
|
+
|
|
1968
|
+
May contain a short ID or a full ID of a project; you can also use the "mw context set --project-id=<VALUE>" command
|
|
1969
|
+
to persistently set a default project for all commands that accept this flag.
|
|
1970
|
+
|
|
1941
1971
|
-q, --quiet suppress process output and only display a machine-readable summary.
|
|
1942
1972
|
|
|
1943
1973
|
This flag controls if you want to see the process output or only a summary. When using mw non-interactively (e.g. in
|
|
@@ -2584,16 +2614,16 @@ FLAG DESCRIPTIONS
|
|
|
2584
2614
|
to persistently set a default project for all commands that accept this flag.
|
|
2585
2615
|
```
|
|
2586
2616
|
|
|
2587
|
-
## `mw domain dnszone get
|
|
2617
|
+
## `mw domain dnszone get DNSZONE-ID`
|
|
2588
2618
|
|
|
2589
2619
|
gets a specific zone
|
|
2590
2620
|
|
|
2591
2621
|
```
|
|
2592
2622
|
USAGE
|
|
2593
|
-
$ mw domain dnszone get
|
|
2623
|
+
$ mw domain dnszone get DNSZONE-ID [-o json|yaml | | ]
|
|
2594
2624
|
|
|
2595
2625
|
ARGUMENTS
|
|
2596
|
-
|
|
2626
|
+
DNSZONE-ID ID or domain name of a DNS zone
|
|
2597
2627
|
|
|
2598
2628
|
FLAGS
|
|
2599
2629
|
-o, --output=<option> output in a more machine friendly format
|
|
@@ -2605,20 +2635,26 @@ DESCRIPTION
|
|
|
2605
2635
|
|
|
2606
2636
|
## `mw domain dnszone list`
|
|
2607
2637
|
|
|
2608
|
-
|
|
2638
|
+
list all DNS zones by project ID
|
|
2609
2639
|
|
|
2610
2640
|
```
|
|
2611
2641
|
USAGE
|
|
2612
|
-
$ mw domain dnszone list [-o json|yaml | | ] [-p
|
|
2642
|
+
$ mw domain dnszone list [--columns <value> | -x] [--no-header | [--csv | --no-truncate]] [-o json|yaml|csv | | ] [-p
|
|
2643
|
+
<value>]
|
|
2613
2644
|
|
|
2614
2645
|
FLAGS
|
|
2615
2646
|
-o, --output=<option> output in a more machine friendly format
|
|
2616
|
-
<options: json|yaml>
|
|
2647
|
+
<options: json|yaml|csv>
|
|
2617
2648
|
-p, --project-id=<value> ID or short ID of a project; this flag is optional if a default project is set in the
|
|
2618
2649
|
context
|
|
2650
|
+
-x, --extended show extra columns
|
|
2651
|
+
--columns=<value> only show provided columns (comma-separated)
|
|
2652
|
+
--csv output is csv format [alias: --output=csv]
|
|
2653
|
+
--no-header hide table header from output
|
|
2654
|
+
--no-truncate do not truncate output to fit screen
|
|
2619
2655
|
|
|
2620
2656
|
DESCRIPTION
|
|
2621
|
-
|
|
2657
|
+
list all DNS zones by project ID
|
|
2622
2658
|
|
|
2623
2659
|
FLAG DESCRIPTIONS
|
|
2624
2660
|
-p, --project-id=<value> ID or short ID of a project; this flag is optional if a default project is set in the context
|
|
@@ -2627,81 +2663,90 @@ FLAG DESCRIPTIONS
|
|
|
2627
2663
|
to persistently set a default project for all commands that accept this flag.
|
|
2628
2664
|
```
|
|
2629
2665
|
|
|
2630
|
-
## `mw domain
|
|
2666
|
+
## `mw domain dnszone update DNSZONE-ID RECORD-SET`
|
|
2631
2667
|
|
|
2632
|
-
|
|
2668
|
+
Updates a record set of a DNS zone
|
|
2633
2669
|
|
|
2634
2670
|
```
|
|
2635
2671
|
USAGE
|
|
2636
|
-
$ mw domain
|
|
2672
|
+
$ mw domain dnszone update DNSZONE-ID RECORD-SET [-q] [-p <value>] [--record <value> | --managed | --unset] [--ttl
|
|
2673
|
+
<value>]
|
|
2637
2674
|
|
|
2638
2675
|
ARGUMENTS
|
|
2639
|
-
|
|
2676
|
+
DNSZONE-ID ID or domain name of a DNS zone
|
|
2677
|
+
RECORD-SET (a|mx|txt|srv|cname) The record type of the record set
|
|
2640
2678
|
|
|
2641
2679
|
FLAGS
|
|
2642
|
-
-
|
|
2643
|
-
|
|
2680
|
+
-p, --project-id=<value> ID or short ID of a project; this flag is optional if a default project is set in the
|
|
2681
|
+
context
|
|
2682
|
+
-q, --quiet suppress process output and only display a machine-readable summary.
|
|
2683
|
+
--managed Reset this record set to fully-managed (only for A and MX records)
|
|
2684
|
+
--record=<value>... The records to set; may not be used with --managed
|
|
2685
|
+
--ttl=<value> The TTL of the record set; omit to use the default TTL
|
|
2686
|
+
--unset Set this to remove all records from the record set
|
|
2644
2687
|
|
|
2645
2688
|
DESCRIPTION
|
|
2646
|
-
|
|
2647
|
-
```
|
|
2648
|
-
|
|
2649
|
-
## `mw domain list`
|
|
2689
|
+
Updates a record set of a DNS zone
|
|
2650
2690
|
|
|
2651
|
-
|
|
2691
|
+
EXAMPLES
|
|
2692
|
+
Set A and AAAA records
|
|
2652
2693
|
|
|
2653
|
-
|
|
2654
|
-
USAGE
|
|
2655
|
-
$ mw domain list [--columns <value> | -x] [--no-header | [--csv | --no-truncate]] [-o json|yaml|csv | | ] [-p
|
|
2656
|
-
<value>]
|
|
2694
|
+
$ mw domain dnszone update domain.example a --record 203.0.113.123 --record 2001:db8::1
|
|
2657
2695
|
|
|
2658
|
-
|
|
2659
|
-
-o, --output=<option> output in a more machine friendly format
|
|
2660
|
-
<options: json|yaml|csv>
|
|
2661
|
-
-p, --project-id=<value> ID or short ID of a project; this flag is optional if a default project is set in the
|
|
2662
|
-
context
|
|
2663
|
-
-x, --extended show extra columns
|
|
2664
|
-
--columns=<value> only show provided columns (comma-separated)
|
|
2665
|
-
--csv output is csv format [alias: --output=csv]
|
|
2666
|
-
--no-header hide table header from output
|
|
2667
|
-
--no-truncate do not truncate output to fit screen
|
|
2696
|
+
Set MX records
|
|
2668
2697
|
|
|
2669
|
-
|
|
2670
|
-
|
|
2698
|
+
$ mw domain dnszone update domain.example mx --record "10 mail1.domain.example" --record "20 \
|
|
2699
|
+
mail2.domain.example"
|
|
2671
2700
|
|
|
2672
2701
|
FLAG DESCRIPTIONS
|
|
2673
2702
|
-p, --project-id=<value> ID or short ID of a project; this flag is optional if a default project is set in the context
|
|
2674
2703
|
|
|
2675
2704
|
May contain a short ID or a full ID of a project; you can also use the "mw context set --project-id=<VALUE>" command
|
|
2676
2705
|
to persistently set a default project for all commands that accept this flag.
|
|
2706
|
+
|
|
2707
|
+
-q, --quiet suppress process output and only display a machine-readable summary.
|
|
2708
|
+
|
|
2709
|
+
This flag controls if you want to see the process output or only a summary. When using mw non-interactively (e.g. in
|
|
2710
|
+
scripts), you can use this flag to easily get the IDs of created resources for further processing.
|
|
2711
|
+
|
|
2712
|
+
--record=<value>... The records to set; may not be used with --managed
|
|
2713
|
+
|
|
2714
|
+
The format depends on the record set type:
|
|
2715
|
+
|
|
2716
|
+
- for "a" records, this parameter should contain a IPv4 or IPv6 address (we will automatically create an A or AAAA
|
|
2717
|
+
record)
|
|
2718
|
+
- for "mx" records, the parameter should be formatted as "<priority> <fqdn>", e.g. "10 mail.example.com"
|
|
2719
|
+
- for "srv" records, the parameter should be formatted as "<priority> <weight> <port> <fqdn>", e.g. "10 1 5060
|
|
2720
|
+
sip.example.com"
|
|
2721
|
+
- for "txt" records, the parameter should be a string containing the TXT record value.
|
|
2677
2722
|
```
|
|
2678
2723
|
|
|
2679
|
-
## `mw domain
|
|
2724
|
+
## `mw domain get DOMAIN-ID`
|
|
2680
2725
|
|
|
2681
|
-
|
|
2726
|
+
gets a specific domain
|
|
2682
2727
|
|
|
2683
2728
|
```
|
|
2684
2729
|
USAGE
|
|
2685
|
-
$ mw domain
|
|
2730
|
+
$ mw domain get DOMAIN-ID [-o json|yaml | | ]
|
|
2686
2731
|
|
|
2687
2732
|
ARGUMENTS
|
|
2688
|
-
|
|
2733
|
+
DOMAIN-ID ID or domain name of a domain
|
|
2689
2734
|
|
|
2690
2735
|
FLAGS
|
|
2691
2736
|
-o, --output=<option> output in a more machine friendly format
|
|
2692
2737
|
<options: json|yaml>
|
|
2693
2738
|
|
|
2694
2739
|
DESCRIPTION
|
|
2695
|
-
|
|
2740
|
+
gets a specific domain
|
|
2696
2741
|
```
|
|
2697
2742
|
|
|
2698
|
-
## `mw domain
|
|
2743
|
+
## `mw domain list`
|
|
2699
2744
|
|
|
2700
|
-
List
|
|
2745
|
+
List domains belonging to a project.
|
|
2701
2746
|
|
|
2702
2747
|
```
|
|
2703
2748
|
USAGE
|
|
2704
|
-
$ mw domain
|
|
2749
|
+
$ mw domain list [--columns <value> | -x] [--no-header | [--csv | --no-truncate]] [-o json|yaml|csv | | ] [-p
|
|
2705
2750
|
<value>]
|
|
2706
2751
|
|
|
2707
2752
|
FLAGS
|
|
@@ -2716,7 +2761,7 @@ FLAGS
|
|
|
2716
2761
|
--no-truncate do not truncate output to fit screen
|
|
2717
2762
|
|
|
2718
2763
|
DESCRIPTION
|
|
2719
|
-
List
|
|
2764
|
+
List domains belonging to a project.
|
|
2720
2765
|
|
|
2721
2766
|
FLAG DESCRIPTIONS
|
|
2722
2767
|
-p, --project-id=<value> ID or short ID of a project; this flag is optional if a default project is set in the context
|
|
@@ -5,7 +5,7 @@ export declare abstract class ExtendedBaseCommand<T extends typeof BaseCommand>
|
|
|
5
5
|
protected flags: CommandFlags<T>;
|
|
6
6
|
protected args: CommandArgs<T>;
|
|
7
7
|
init(): Promise<void>;
|
|
8
|
-
withAppInstallationId(command: CommandType<"installation"> | "flag" | "arg"): Promise<string>;
|
|
8
|
+
withAppInstallationId(command: CommandType<"installation" | "project"> | "flag" | "arg"): Promise<string>;
|
|
9
9
|
withProjectId(command: CommandType<"project"> | "flag" | "arg"): Promise<string>;
|
|
10
10
|
withServerId(command: CommandType<"server"> | "flag" | "arg"): Promise<string>;
|
|
11
11
|
}
|
|
@@ -6,6 +6,7 @@ type Result = {
|
|
|
6
6
|
export declare class Copy extends ExecRenderBaseCommand<typeof Copy, Result> {
|
|
7
7
|
static description: string;
|
|
8
8
|
static args: {
|
|
9
|
+
"project-id": import("@oclif/core/lib/interfaces/parser.js").Arg<string>;
|
|
9
10
|
"installation-id": import("@oclif/core/lib/interfaces/parser.js").Arg<string>;
|
|
10
11
|
};
|
|
11
12
|
static flags: {
|
|
@@ -3,6 +3,7 @@ import { ReactNode } from "react";
|
|
|
3
3
|
export default class Update extends ExecRenderBaseCommand<typeof Update, void> {
|
|
4
4
|
static summary: string;
|
|
5
5
|
static args: {
|
|
6
|
+
"project-id": import("@oclif/core/lib/interfaces/parser.js").Arg<string>;
|
|
6
7
|
"installation-id": import("@oclif/core/lib/interfaces/parser.js").Arg<string>;
|
|
7
8
|
};
|
|
8
9
|
static examples: {
|
|
@@ -6,6 +6,7 @@ export default class Get extends RenderBaseCommand<typeof Get> {
|
|
|
6
6
|
[x: string]: import("@oclif/core/lib/interfaces/parser.js").Flag<any>;
|
|
7
7
|
};
|
|
8
8
|
static args: {
|
|
9
|
+
"project-id": import("@oclif/core/lib/interfaces/parser.js").Arg<string>;
|
|
9
10
|
"installation-id": import("@oclif/core/lib/interfaces/parser.js").Arg<string>;
|
|
10
11
|
};
|
|
11
12
|
protected render(): ReactNode;
|
|
@@ -2,6 +2,7 @@ import { ExtendedBaseCommand } from "../../ExtendedBaseCommand.js";
|
|
|
2
2
|
export default class Ssh extends ExtendedBaseCommand<typeof Ssh> {
|
|
3
3
|
static description: string;
|
|
4
4
|
static args: {
|
|
5
|
+
"project-id": import("@oclif/core/lib/interfaces/parser.js").Arg<string>;
|
|
5
6
|
"installation-id": import("@oclif/core/lib/interfaces/parser.js").Arg<string>;
|
|
6
7
|
};
|
|
7
8
|
static flags: {
|
|
@@ -3,6 +3,7 @@ export default class Uninstall extends DeleteBaseCommand<typeof Uninstall> {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static resourceName: string;
|
|
5
5
|
static args: {
|
|
6
|
+
"project-id": import("@oclif/core/lib/interfaces/parser.js").Arg<string>;
|
|
6
7
|
"installation-id": import("@oclif/core/lib/interfaces/parser.js").Arg<string>;
|
|
7
8
|
};
|
|
8
9
|
protected deleteResource(): Promise<void>;
|
|
@@ -6,6 +6,7 @@ export declare class Set extends BaseCommand {
|
|
|
6
6
|
"project-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
7
7
|
"server-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
8
8
|
"org-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
9
|
+
"installation-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
9
10
|
};
|
|
10
11
|
run(): Promise<void>;
|
|
11
12
|
}
|
|
@@ -2,6 +2,7 @@ import { Flags } from "@oclif/core";
|
|
|
2
2
|
import { Context } from "../../lib/context.js";
|
|
3
3
|
import { BaseCommand } from "../../BaseCommand.js";
|
|
4
4
|
import { normalizeCustomerIdToUuid, normalizeProjectIdToUuid, normalizeServerIdToUuid, } from "../../Helpers.js";
|
|
5
|
+
import { normalizeAppInstallationId } from "../../lib/app/flags.js";
|
|
5
6
|
export class Set extends BaseCommand {
|
|
6
7
|
static summary = "Set context values for the current project, org or server";
|
|
7
8
|
static description = "The context allows you to persistently set values for common parameters, like --project-id or --server-id, so you don't have to specify them on every command.";
|
|
@@ -15,6 +16,10 @@ export class Set extends BaseCommand {
|
|
|
15
16
|
"org-id": Flags.string({
|
|
16
17
|
description: "ID or short ID of an organization",
|
|
17
18
|
}),
|
|
19
|
+
"installation-id": Flags.string({
|
|
20
|
+
description: "ID or short ID of an app installation",
|
|
21
|
+
aliases: ["app-id", "app-installation-id"],
|
|
22
|
+
}),
|
|
18
23
|
};
|
|
19
24
|
async run() {
|
|
20
25
|
const { flags } = await this.parse(Set);
|
|
@@ -34,5 +39,10 @@ export class Set extends BaseCommand {
|
|
|
34
39
|
await ctx.setOrgId(orgId);
|
|
35
40
|
this.log(`Set organization ID to ${orgId}`);
|
|
36
41
|
}
|
|
42
|
+
if (flags["installation-id"]) {
|
|
43
|
+
const installationId = await normalizeAppInstallationId(this.apiClient, (await ctx.projectId())?.value ?? "", flags["installation-id"]);
|
|
44
|
+
await ctx.setAppInstallationId(installationId);
|
|
45
|
+
this.log(`Set installation ID to ${installationId}`);
|
|
46
|
+
}
|
|
37
47
|
}
|
|
38
48
|
}
|
|
@@ -14,6 +14,7 @@ export declare class Create extends ExecRenderBaseCommand<typeof Create, Result>
|
|
|
14
14
|
interpreter: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
15
15
|
command: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
16
16
|
quiet: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
17
|
+
"project-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string>;
|
|
17
18
|
"installation-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string>;
|
|
18
19
|
};
|
|
19
20
|
protected exec(): Promise<Result>;
|
|
@@ -9,7 +9,7 @@ export class PhpMyAdmin extends BaseCommand {
|
|
|
9
9
|
const { flags, args } = await this.parse(PhpMyAdmin);
|
|
10
10
|
const databaseId = await withMySQLId(this.apiClient, flags, args, this.config);
|
|
11
11
|
const users = await this.apiClient.database.listMysqlUsers({
|
|
12
|
-
databaseId,
|
|
12
|
+
mysqlDatabaseId: databaseId,
|
|
13
13
|
});
|
|
14
14
|
assertStatus(users, 200);
|
|
15
15
|
const mainUser = users.data.find((u) => u.mainUser);
|
|
@@ -3,7 +3,7 @@ import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
|
3
3
|
import { SuccessfulResponse } from "../../../../types.js";
|
|
4
4
|
import { ListBaseCommand } from "../../../../ListBaseCommand.js";
|
|
5
5
|
import { ListColumns } from "../../../../Formatter.js";
|
|
6
|
-
type ResponseItem = Simplify<MittwaldAPIV2.Paths.
|
|
6
|
+
type ResponseItem = Simplify<MittwaldAPIV2.Paths.V2MysqlDatabasesMysqlDatabaseIdUsers.Get.Responses.$200.Content.ApplicationJson[number]>;
|
|
7
7
|
type Response = Awaited<ReturnType<MittwaldAPIV2Client["database"]["listMysqlUsers"]>>;
|
|
8
8
|
export declare class List extends ListBaseCommand<typeof List, ResponseItem, Response> {
|
|
9
9
|
static description: string;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { MittwaldAPIV2
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export declare
|
|
1
|
+
import { MittwaldAPIV2 } from "@mittwald/api-client";
|
|
2
|
+
import { RenderBaseCommand } from "../../../rendering/react/RenderBaseCommand.js";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import DnsZone = MittwaldAPIV2.Components.Schemas.DnsZone;
|
|
5
|
+
export declare class Get extends RenderBaseCommand<typeof Get> {
|
|
6
6
|
static description: string;
|
|
7
7
|
static flags: {
|
|
8
8
|
[x: string]: import("@oclif/core/lib/interfaces/parser.js").Flag<any>;
|
|
9
9
|
};
|
|
10
10
|
static args: {
|
|
11
|
-
|
|
11
|
+
"project-id": import("@oclif/core/lib/interfaces/parser.js").Arg<string>;
|
|
12
|
+
"dnszone-id": import("@oclif/core/lib/interfaces/parser.js").Arg<string>;
|
|
12
13
|
};
|
|
13
|
-
protected
|
|
14
|
+
protected render(): React.ReactNode;
|
|
15
|
+
protected getDnsZone(): Promise<DnsZone>;
|
|
14
16
|
}
|
|
15
|
-
export {};
|
|
@@ -1,19 +1,32 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { GetBaseCommand } from "../../../GetBaseCommand.js";
|
|
3
|
-
|
|
3
|
+
import { RenderBaseCommand } from "../../../rendering/react/RenderBaseCommand.js";
|
|
4
|
+
import { dnsZoneArgs, withDnsZoneId, } from "../../../lib/domain/dnszone/flags.js";
|
|
5
|
+
import { assertStatus } from "@mittwald/api-client-commons";
|
|
6
|
+
import { usePromise } from "@mittwald/react-use-promise";
|
|
7
|
+
import { DnsZoneDetails } from "../../../rendering/react/components/DnsZone/DnsZoneDetails.js";
|
|
8
|
+
import { RenderJson } from "../../../rendering/react/json/RenderJson.js";
|
|
9
|
+
export class Get extends RenderBaseCommand {
|
|
4
10
|
static description = "gets a specific zone";
|
|
5
11
|
static flags = {
|
|
6
12
|
...GetBaseCommand.baseFlags,
|
|
7
13
|
};
|
|
8
14
|
static args = {
|
|
9
|
-
|
|
10
|
-
description: "id of the zone you want to get",
|
|
11
|
-
required: true,
|
|
12
|
-
}),
|
|
15
|
+
...dnsZoneArgs,
|
|
13
16
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
render() {
|
|
18
|
+
const dnsZone = usePromise(() => this.getDnsZone(), []);
|
|
19
|
+
if (this.flags.output === "json") {
|
|
20
|
+
return _jsx(RenderJson, { name: "dnsZone", data: dnsZone });
|
|
21
|
+
}
|
|
22
|
+
return _jsx(DnsZoneDetails, { dnsZone: dnsZone });
|
|
23
|
+
}
|
|
24
|
+
async getDnsZone() {
|
|
25
|
+
const dnsZoneId = await withDnsZoneId(this.apiClient, Get, this.flags, this.args, this.config);
|
|
26
|
+
const response = await this.apiClient.domain.dnsGetDnsZone({
|
|
27
|
+
dnsZoneId,
|
|
17
28
|
});
|
|
29
|
+
assertStatus(response, 200);
|
|
30
|
+
return response.data;
|
|
18
31
|
}
|
|
19
32
|
}
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import { MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
2
|
+
import { ListBaseCommand } from "../../../ListBaseCommand.js";
|
|
3
|
+
import { Simplify } from "@mittwald/api-client-commons";
|
|
4
|
+
import { SuccessfulResponse } from "../../../types.js";
|
|
5
|
+
import { ListColumns } from "../../../Formatter.js";
|
|
6
|
+
type ResponseItem = Simplify<MittwaldAPIV2.Paths.V2ProjectsProjectIdDnsZones.Get.Responses.$200.Content.ApplicationJson[number]>;
|
|
7
|
+
type Response = Awaited<ReturnType<MittwaldAPIV2Client["domain"]["dnsListDnsZones"]>>;
|
|
8
|
+
export default class List extends ListBaseCommand<typeof List, ResponseItem, Response> {
|
|
5
9
|
static description: string;
|
|
10
|
+
static args: {};
|
|
6
11
|
static flags: {
|
|
7
12
|
"project-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string>;
|
|
8
13
|
};
|
|
9
|
-
|
|
10
|
-
protected
|
|
14
|
+
getData(): Promise<Response>;
|
|
15
|
+
protected mapData(data: SuccessfulResponse<Response, 200>["data"]): ResponseItem[] | Promise<ResponseItem[]>;
|
|
16
|
+
protected getColumns(data: ResponseItem[]): ListColumns<ResponseItem>;
|
|
11
17
|
}
|
|
12
18
|
export {};
|