mittwald / cli Goto Github PK
View Code? Open in Web Editor NEWThe mittwald command-line interface
License: MIT License
The mittwald command-line interface
License: MIT License
When i try the ddev pull mittwald
i get the following error after long time of waiting:
╭──────────────────────────────────────────────────────────────────────────────╮
│ ERROR │
│ │
│ An error occurred while executing this command: │
│ │
│ AxiosError: Request failed with status code 403 │
│ │
│ If you believe this to be a bug, please open an issue at │
│ https://github.com/mittwald/cli/issues/new │
│ (https://github.com/mittwald/cli/issues/new). │
╰──────────────────────────────────────────────────────────────────────────────╯
ERROR STACK TRACE
Please provide this when opening a bug report.
AxiosError: Request failed with status code 403
at settle (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/settle.js:19:12)
at IncomingMessage.handleStreamEnd (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/adapters/http.js:589:11)
at IncomingMessage.emit (node:events:529:35)
at endReadableNT (node:internal/streams/readable:1400:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
at Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:45:41)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:40:14)
at async Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:40:14)
at async Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:40:14)
at async Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:40:14)
at async Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:40:14)
at async Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:40:14)
at async Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:40:14)
at async Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:40:14)
at Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:45:41)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:40:14)
at async Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:40:14)
at async Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:40:14)
at async Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:40:14)
at async Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:40:14)
at async Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:40:14)
at async Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:40:14)
at async normalizeAppInstallationId (file:///usr/lib/node_modules/@mittwald/cli/dist/normalize_id.js:29:30)
at Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:45:41)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:40:14)
at async Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:40:14)
at async Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:40:14)
at async Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:40:14)
at async Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:40:14)
at async Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:40:14)
at async normalizeAppInstallationId (file:///usr/lib/node_modules/@mittwald/cli/dist/normalize_id.js:29:30)
at async Set.run (file:///usr/lib/node_modules/@mittwald/cli/dist/commands/context/set.js:42:36)
at Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:45:41)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:40:14)
at async Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:40:14)
at async Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:40:14)
at async Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:40:14)
at async Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:40:14)
at async normalizeAppInstallationId (file:///usr/lib/node_modules/@mittwald/cli/dist/normalize_id.js:29:30)
at async Set.run (file:///usr/lib/node_modules/@mittwald/cli/dist/commands/context/set.js:42:36)
at async Set._run (/usr/lib/node_modules/@mittwald/cli/node_modules/@oclif/core/lib/command.js:304:22)
at Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:45:41)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:40:14)
at async Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:40:14)
at async Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:40:14)
at async Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:40:14)
at async normalizeAppInstallationId (file:///usr/lib/node_modules/@mittwald/cli/dist/normalize_id.js:29:30)
at async Set.run (file:///usr/lib/node_modules/@mittwald/cli/dist/commands/context/set.js:42:36)
at async Set._run (/usr/lib/node_modules/@mittwald/cli/node_modules/@oclif/core/lib/command.js:304:22)
at async Config.runCommand (/usr/lib/node_modules/@mittwald/cli/node_modules/@oclif/core/lib/config/config.js:432:25)
at Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:45:41)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:40:14)
at async Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:40:14)
at async Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:40:14)
at async normalizeAppInstallationId (file:///usr/lib/node_modules/@mittwald/cli/dist/normalize_id.js:29:30)
at async Set.run (file:///usr/lib/node_modules/@mittwald/cli/dist/commands/context/set.js:42:36)
at async Set._run (/usr/lib/node_modules/@mittwald/cli/node_modules/@oclif/core/lib/command.js:304:22)
at async Config.runCommand (/usr/lib/node_modules/@mittwald/cli/node_modules/@oclif/core/lib/config/config.js:432:25)
at async Object.run (/usr/lib/node_modules/@mittwald/cli/node_modules/@oclif/core/lib/main.js:87:16)
Pull failed: exit status 1
A working API key and SSH user are stored. I can use all functions such as app list or app create, so I assume that I have both read and write access to my apps.
stop frozen backup_id exports in case …
Using the native ssh
command its possible to set an identity file using the option -i
.
-i identity_file
Selects a file from which the identity (private key) for public key authentication is read. You can also specify a public key file to use the corresponding private key that is loaded in ssh-agent(1) when the private key file is not present locally. The default is
~/.ssh/id_rsa, ~/.ssh/id_ecdsa, ~/.ssh/id_ecdsa_sk, ~/.ssh/id_ed25519, ~/.ssh/id_ed25519_sk and ~/.ssh/id_dsa. Identity files may also be specified on a per-host basis in the configuration file. It is possible to have multiple -i options (and multiple identities specified
in configuration files). If no certificates have been explicitly specified by the CertificateFile directive, ssh will also try to load certificate information from the filename obtained by appending -cert.pub to identity filenames.
It would be great if the command mw project ssh
would support a similar option.
Since the identity file is user based it can be used for all projects. So another option would be to add a command like mw login identity-file
to set the file globally, so it must not be provided every time the command project ssh
is used.
I’m not able to figure out how the --filter
option of the list commands should be used.
tried it using the command project list
. I have tried every combination I was able to think about. Some examples
mw project list --filter="customerId=8b454f648fb5"
mw project list --filter "customerId=8b454f648fb5"
mw project list --filter "customerId=8b454f648fb5"
mw project list --filter="customer-id=8b454f648fb5"
Everything produce the same error:
│ ERROR │
│ │
│ An error occurred while executing this command: │
│ │
│ Error: Filter flag has an invalid value │
│ │
The OCLIF documentation provides this example:
$ example-cli users --filter="company=Group"
ERROR STACK TRACE
Please provide this when opening a bug report.
Error: Filter flag has an invalid value
at Table.display (/opt/homebrew/Cellar/mw/1.0.0-alpha.21/libexec/node_modules/@oclif/core/lib/cli-ux/styled/table.js:68:23)
at Object.table (/opt/homebrew/Cellar/mw/1.0.0-alpha.21/libexec/node_modules/@oclif/core/lib/cli-ux/styled/table.js:271:39)
at ListFormatter.log (file:///opt/homebrew/Cellar/mw/1.0.0-alpha.21/libexec/dist/esm/Formatter.js:31:12)
at List.run (file:///opt/homebrew/Cellar/mw/1.0.0-alpha.21/libexec/dist/esm/ListBaseCommand.js:27:24)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async List._run (/opt/homebrew/Cellar/mw/1.0.0-alpha.21/libexec/node_modules/@oclif/core/lib/command.js:117:22)
at async Config.runCommand (/opt/homebrew/Cellar/mw/1.0.0-alpha.21/libexec/node_modules/@oclif/core/lib/config/config.js:329:25)
at async Object.run (/opt/homebrew/Cellar/mw/1.0.0-alpha.21/libexec/node_modules/@oclif/core/lib/main.js:89:16)
Add an "app ssh" command that works similar to the "project ssh" command.
/Users/thueske [thueske@MBP-M1-Hueske] [11:38]
> mw app install php -p a028837b-3507-41c2-9402-cb46cd88e0d8 --site-title="WordPress" -q -w
ERROR Text string "233ea8ec-2f23-4469-93f4-4eb68c93d328" must be rendered inside <Text> component
file:///opt/homebrew/Cellar/mw/1.0.0-alpha.20/libexec/node_modules/ink/build/reconciler.js:127:19
- createTextInstance (file:///opt/homebrew/Cellar/mw/1.0.0-alpha.20/libexec/node_modules/ink/build/reconciler.js:127:19)
- completeWork (/opt/homebrew/Cellar/mw/1.0.0-alpha.20/libexec/node_modules/react-reconciler/cjs/react-reconciler.development.js:13653:40)
- completeUnitOfWork (/opt/homebrew/Cellar/mw/1.0.0-alpha.20/libexec/node_modules/react-reconciler/cjs/react-reconciler.development.js:18736:16)
- performUnitOfWork (/opt/homebrew/Cellar/mw/1.0.0-alpha.20/libexec/node_modules/react-reconciler/cjs/react-reconciler.development.js:18711:5)
- workLoopSync (/opt/homebrew/Cellar/mw/1.0.0-alpha.20/libexec/node_modules/react-reconciler/cjs/react-reconciler.development.js:18609:5)
- renderRootSync (/opt/homebrew/Cellar/mw/1.0.0-alpha.20/libexec/node_modules/react-reconciler/cjs/react-reconciler.development.js:18577:7)
- performSyncWorkOnRoot (/opt/homebrew/Cellar/mw/1.0.0-alpha.20/libexec/node_modules/react-reconciler/cjs/react-reconciler.development.js:18193:20)
- flushSyncCallbacks (/opt/homebrew/Cellar/mw/1.0.0-alpha.20/libexec/node_modules/react-reconciler/cjs/react-reconciler.development.js:2936:22)
- flushSyncCallbacksOnlyInLegacyMode (/opt/homebrew/Cellar/mw/1.0.0-alpha.20/libexec/node_modules/react-reconciler/cjs/react-reconciler.development.js:2915:5)
- scheduleUpdateOnFiber (/opt/homebrew/Cellar/mw/1.0.0-alpha.20/libexec/node_modules/react-reconciler/cjs/react-reconciler.development.js:17646:7)
I’ve currently set the org-id
context
~ ❯ mw context get
Current CLI context
--project-id not set
--server-id not set
--org-id 65543619-a808-4787-bf1d-×××××××
When calling mw project list
all project are listed, wich includes projects from other organisations.
It would be great to have to option to filter the output by the current context org-id
or server-id
.
I downloaded the latest arm64.pkg release and installed it, but I would like to switch to homebrew now. How do I uninstall the cli?
Executing the command:
/Users/thueske [thueske@MBP-M1-Hueske] [11:27]
> mw project create -s b54845e8-81ad-462e-983a-2f00c5e040c6 -d "Example Project" -q -w
Throws the following error:
ERROR Text string "a2371f43-6343-4465-8a2f-469d10fd807a" must be rendered inside <Text> component
file:///opt/homebrew/Cellar/mw/1.0.0-alpha.20/libexec/node_modules/ink/build/reconciler.js:127:19
- createTextInstance (file:///opt/homebrew/Cellar/mw/1.0.0-alpha.20/libexec/node_modules/ink/build/reconciler.js:127:19)
- completeWork (/opt/homebrew/Cellar/mw/1.0.0-alpha.20/libexec/node_modules/react-reconciler/cjs/react-reconciler.development.js:13653:40)
- completeUnitOfWork (/opt/homebrew/Cellar/mw/1.0.0-alpha.20/libexec/node_modules/react-reconciler/cjs/react-reconciler.development.js:18736:16)
- performUnitOfWork (/opt/homebrew/Cellar/mw/1.0.0-alpha.20/libexec/node_modules/react-reconciler/cjs/react-reconciler.development.js:18711:5)
- workLoopSync (/opt/homebrew/Cellar/mw/1.0.0-alpha.20/libexec/node_modules/react-reconciler/cjs/react-reconciler.development.js:18609:5)
- renderRootSync (/opt/homebrew/Cellar/mw/1.0.0-alpha.20/libexec/node_modules/react-reconciler/cjs/react-reconciler.development.js:18577:7)
- performSyncWorkOnRoot (/opt/homebrew/Cellar/mw/1.0.0-alpha.20/libexec/node_modules/react-reconciler/cjs/react-reconciler.development.js:18193:20)
- flushSyncCallbacks (/opt/homebrew/Cellar/mw/1.0.0-alpha.20/libexec/node_modules/react-reconciler/cjs/react-reconciler.development.js:2936:22)
- flushSyncCallbacksOnlyInLegacyMode (/opt/homebrew/Cellar/mw/1.0.0-alpha.20/libexec/node_modules/react-reconciler/cjs/react-reconciler.development.js:2915:5)
- scheduleUpdateOnFiber (/opt/homebrew/Cellar/mw/1.0.0-alpha.20/libexec/node_modules/react-reconciler/cjs/react-reconciler.development.js:17646:7)
The project is nevertheless created without any problems.
/Users/thueske [thueske@MBP-M1-Hueske] [11:27]
> mw project
Manage your projects, and also any kinds of user memberships concerning these projects.
[...]
COMMANDS
project create Get the details of a project
Why is this a flag and not an argument? I assumed that flags _should_ be optional an required input is given as argument.
Originally posted by @LukasFritzeDev in #243 (comment)
https://mittwald.slack.com/archives/D24QQTCAW/p1691402686295629
> mw domain list --project-id [project ID A]
ID
───────────────────────────────────
> mw domain list --project-id [project ID B]
>
lock projects for security reason to avoid accidentally erasure
(additionally introduce project status option "active/inactive")
I would be great to add aliasses in bulk mode with cli
found myself using the command line for migration of large number of mailboxes with great fun!
mw mail --help
[…]
mail address Create a new mail address
mail deliverybox Get a specific deliverybox
mw app install
app install nextcloud Creates new Shopware 6 installation.
The error messages include the hint to open a bug report.
Please provide this when opening a bug report.
I think it would be be useful to add a link to this Github project to save the user searching for the project.
See oclif/core#999 for context.
Support for a [mysql options file](https://dev.mysql.com/doc/refman/8.0/en/option-files.html) would be awesome
--defaults-extra-file="~/files/.my.cnf"
This is only a feature idea and could also be a improvement for a follow up pull request.
Originally posted by @LukasFritzeDev in #243 (comment)
When i make ddev pull
I receive the following error:
Authenticating...
Set installation ID to xxx
Set project ID to xxx
connecting to 'ssh.vehlage.project.host' as 'xxx@xxx'
Obtaining databases...
Dumping a MySQL database
✅ fetching database. done
✅ fetching main user. done
✅ fetching project. done
✅ creating a temporary database user. done
❌ starting mysqldump via SSH on project p-xxx. error
An error occurred during this operation:
AxiosError: Request failed with status code 412
✅ removing temporary database user. done
╭──────────────────────────────────────────────────────────────────────────────╮
│ ERROR │
│ │
│ An error occurred while executing this command: │
│ │
│ AxiosError: Request failed with status code 412 │
│ │
│ If you believe this to be a bug, please open an issue at │
│ https://github.com/mittwald/cli/issues/new │
│ (https://github.com/mittwald/cli/issues/new). │
╰──────────────────────────────────────────────────────────────────────────────╯
ERROR STACK TRACE
Please provide this when opening a bug report.
AxiosError: Request failed with status code 412
at settle (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/settle.js:19:12)
at IncomingMessage.handleStreamEnd (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/adapters/http.js:589:11)
at IncomingMessage.emit (node:events:529:35)
at endReadableNT (node:internal/streams/readable:1400:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
at Axios.request (file:///usr/lib/node_modules/@mittwald/cli/node_modules/axios/lib/core/Axios.js:45:41)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async getSSHConnectionForProject (file:///usr/lib/node_modules/@mittwald/cli/dist/lib/ssh/project.js:3:29)
at async executeViaSSH (file:///usr/lib/node_modules/@mittwald/cli/dist/lib/ssh/exec.js:5:28)
at async FancyProcessRenderer.runStep (file:///usr/lib/node_modules/@mittwald/cli/dist/rendering/process/process_fancy.js:42:28)
at async Dump.exec (file:///usr/lib/node_modules/@mittwald/cli/dist/commands/database/mysql/dump.js:69:9)
at async Dump.run (file:///usr/lib/node_modules/@mittwald/cli/dist/rendering/react/ExecRenderBaseCommand.js:18:24)
at async Dump._run (/usr/lib/node_modules/@mittwald/cli/node_modules/@oclif/core/lib/command.js:304:22)
at async Config.runCommand (/usr/lib/node_modules/@mittwald/cli/node_modules/@oclif/core/lib/config/config.js:432:25)
at async Object.run (/usr/lib/node_modules/@mittwald/cli/node_modules/@oclif/core/lib/main.js:87:16)
Pull failed: failed to exec set -eu -o pipefail
database_output="/var/www/html/.ddev/.downloads/db.sql.gz"
database_id="${MITTWALD_DATABASE_ID:-}"
if [[ -z "${database_id}" ]] ; then
database_id=$(mw app get -ojson | jq -r 'if has("linkedDatabases") then ((.linkedDatabases[] | select(.purpose == "primary")).databaseId) else empty end')
fi
if [[ -n "${database_id:-}" ]] ; then
mw database mysql dump "${database_id}" --gzip -o "${database_output}"
else
echo "app has no linked database; skipping database import"
echo "" | gzip > "${database_output}"
fi
on web: exit status 1
niristius commented 4 days ago
So I deleted the old branch since it was kinda stale and I am still trying to understand Node, yarn and oclif a bit more.
And since the changes are rather trivial I started over.Sadly the yarn generate:readme command still adds newlines where they dont belong.
I tried
using Node 18, 20, 22
using oclif 4.14, 4.13, 4.12, 4.10, 3.17, 3.16, 3.15, 3.14
still no cigar.
@martin-helmich please advise
I have the same exact problem (see here). Also for some reason, the generated readme looks entirely different after a fresh repo clone.
Also yarn format
changes the README formatting yet another way (which to be fair, is probably expected).
for testing or demo issues (e.g. new customers) it would be nice to create an api-token just for one project without creating a new account
To download the latest backup, I have to do two steps:
# get the latest backup id
mw backup list -o json | jq '.[0].id'
# download the backup
mw backup download <BACKUP-ID>
It would be awesome to have a “well known” ID latest
which can be used to do this automatically:
mw backup download latest
Or this could be a flag, if given the BACKUP-ID would be optional:
mw backup download --latest
Currently, the mw ddev init
command inspects an app's .linkedDatabases
fields; however, this field is (currently) only set on mittwald-managed applications, and not on custom apps.
Proposed solution:
--database-id
to the mw ddev init
command with which the user can (optionally) provide the ID of the linked databasemw ddev init
calls.--without-database
to explicitly initialize a project without a databasemw update
Error: ENOENT: no such file or directory, open '/opt/homebrew/Cellar/mw/1.0.0-alpha.29/lib/client/bin/mw'
Code: ENOENT
@mittwald/cli: Updating CLI from 1.0.0-alpha.29 to 1.0.0-alpha.41-2c79e9d... !
╭──────────────────────────────────────────────────────────────────────────────╮
│ ERROR │
│ │
│ An error occurred while executing this command: │
│ │
│ Error: ENOENT: no such file or directory, open │
│ '/Users/twestpfahl/.local/share/mw/channel' │
│ │
│ If you believe this to be a bug, please open an issue at │
│ https://github.com/mittwald/cli/issues/new. │
╰──────────────────────────────────────────────────────────────────────────────╯
ERROR STACK TRACE
Please provide this when opening a bug report.
Error: ENOENT: no such file or directory, open '/Users/twestpfahl/.local/share/mw/channel'
Context:
❯ mw --version
@mittwald/cli/1.0.0-alpha.29 darwin-arm64 node-v18.11.0
Not sure if this is a layer 8 problem or if this has been fixed already, but on my machine an mw update
from 1.0.0-alpha.29 to 1.0.0-alpha.41 did not work.
I did the "update" now manually via
brew uninstall mittwaldw/cli/mw
brew install mittwaldw/cli/mw
Works only if it has been set via mw context set --project-id
, but not with flag --project-id
.
The projectID should also not be necessary to get a Domain, according to the API -> here.
But the command enforces it:
❯ mw domain get <my-domain-id>
ERROR No project ID given. Please consult the --help page of this command or set a default project with 'mittwald context set --project-id <project-id>'
When running the get command mw database mysql get
with the flag --output json
the dates are formatted as an ISO date string as expected.
~ ❯ mw database mysql get e404f33f-fce3-4f5b-ad47-************ --output json
{
"createdAt": "2023-09-10T14:57:03.000Z",
"id": "e404f33f-fce3-4f5b-ad47-************",
"updatedAt": "2023-09-10T14:57:05.000Z",
...
}
Using the list command mw database mysql list --output json
the date is shown in a human readable format.
~ ❯ mw database mysql list --output json
[
{
"id": "e404f33f-fce3-4f5b-ad47-************",
"createdAt": "25 minutes ago",
...
}
]
If --output json
is used, for all commands dates should be formatted as ISO dates.
The option --sort
for mw project list
has no effect.
None of these commands produces an error, but the output table is sorted by created at
.
mw project list --sort="customer-id" --extended
mw project list --sort="organisationId" --extended
mw project list --sort="customerId" --extended
If I show the list of available apps with mw app list
, it show "1.0.0" for PHP and Node.js, which isn't correct.
using mw-cli with cmd:
mw ddev init a-x11aaa --project-name K-PRJ-MW
To have to projekt cloned from mStudio as local ddev
First, ddev asks the project type and the remote database to use (shouldn't it be clear, with the app <-> db-relation?)
Then, it breaks with:
╭──────────────────────────────────────────────────────────────────────────────╮
│ ERROR │
│ │
│ An error occurred while executing this command: │
│ │
│ Error: ddev exited with code 1 │
│ │
│ If you believe this to be a bug, please open an issue at │
│ https://github.com/mittwald/cli/issues/new. │
╰──────────────────────────────────────────────────────────────────────────────╯
ERROR STACK TRACE
Please provide this when opening a bug report.
Error: ddev exited with code 1
at ChildProcess.<anonymous> (file:///opt/homebrew/Cellar/mw/1.0.0-alpha.47/libexec/dist/rendering/process/process_exec.js:26:24)
at ChildProcess.emit (node:events:513:28)
at ChildProcess._handle.onexit (node:internal/child_process:291:12)
Any clue?
Thanks, Thomas
The command mw mail deliverybox list
should use the project-id context instead of complaining about a missing flag project-id
.
~ ❯ mw context get
Current CLI context
--project-id e294bb27-a208-4512-ade3-21e4b1e917c5
--server-id not set
--org-id 65543619-a808-4787-bf1d-8b454f648fb5
╭──────────────────────────────────────────────────────────────────────────────╮
│ NOTE │
│ Use the mw context set command to set one of the values listed above. │
╰──────────────────────────────────────────────────────────────────────────────╯
~ ❯ mw mail deliverybox list
╭──────────────────────────────────────────────────────────────────────────────╮
│ INVALID COMMAND FLAGS │
│ │
│ The flags that you provided for this command were invalid. The following │
│ error occurred: │
│ Missing required flag project-id │
│ See more help with --help │
╰──────────────────────────────────────────────────────────────────────────────╯
Creating a new MySQL database works, but fetching the created user fails:
mw database mysql create --description="my description" --version="8.0"
Creating a new MySQL database
❓ enter password for default user: ********************************************************************************************************************************
✅ creating MySQL database. done
✅ fetching database. done
❌ fetching user. error
An error occurred during this operation:
ApiClientError: Unexpected response status (expected 200, got: 403)
╭──────────────────────────────────────────────────────────────────────────────╮
│ API CLIENT ERROR │
│ │
│ An error occurred while communicating with the API: Unexpected response │
│ status (expected 200, got: 403) │
│ │
│ { │
│ "params": { │
│ "traceId": "f727d21f1f6ad105" │
│ }, │
│ "message": "access denied; verdict: abstain", │
│ "type": "PermissionDenied" │
│ } │
╰──────────────────────────────────────────────────────────────────────────────╯
ERROR STACK TRACE
Please provide this when opening a bug report.
ApiClientError: Unexpected response status (expected 200, got: 403)
at ApiClientError.fromResponse (file:///var/lib/nvm/versions/node/v18.17.0/lib/node_modules/@mittwald/cli/node_modules/@mittwald/api-client-commons/dist/esm/core/ApiClientError.js:9:16)
at assertOneOfStatus (file:///var/lib/nvm/versions/node/v18.17.0/lib/node_modules/@mittwald/cli/node_modules/@mittwald/api-client-commons/dist/esm/types/assertOneOfStatus.js:4:30)
at assertStatus (file:///var/lib/nvm/versions/node/v18.17.0/lib/node_modules/@mittwald/cli/node_modules/@mittwald/api-client-commons/dist/esm/types/assertStatus.js:3:5)
at file:///var/lib/nvm/versions/node/v18.17.0/lib/node_modules/@mittwald/cli/dist/commands/database/mysql/create.js:86:13
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async FancyProcessRenderer.runStep (file:///var/lib/nvm/versions/node/v18.17.0/lib/node_modules/@mittwald/cli/dist/rendering/process/process_fancy.js:42:28)
at async Create.exec (file:///var/lib/nvm/versions/node/v18.17.0/lib/node_modules/@mittwald/cli/dist/commands/database/mysql/create.js:82:22)
at async Create.run (file:///var/lib/nvm/versions/node/v18.17.0/lib/node_modules/@mittwald/cli/dist/rendering/react/ExecRenderBaseCommand.js:18:24)
at async Create._run (/var/lib/nvm/versions/node/v18.17.0/lib/node_modules/@mittwald/cli/node_modules/@oclif/core/lib/command.js:304:22)
at async Config.runCommand (/var/lib/nvm/versions/node/v18.17.0/lib/node_modules/@mittwald/cli/node_modules/@oclif/core/lib/config/config.js:426:25)
Based on a feedback by @thueske:
Was mir jedoch noch nicht ganz klar ist und mich im ersten Moment verwirrt hat: Innerhalb mw project finde ich Cronjobs, Backups, Memberships, SFTP usw. Die Datenbanken, Domains und Mails hingegen auf oberster Ebene :thinking_face: Das hat sich mir jetzt nicht direkt erschlossen und ich würde es unter Projekt erwarten.
This is generally inconsistent, and as to not nest commands too deeply, I'd be in favour of placing the backup
, ssh-user
, sftp-user
and cronjob
commands on the top-level (next to database
, domain
and other project-related) commands, so that the project
topic is reserved for editing the project aggregate in itself.
PR incoming.
Als Nutzer möchte ich mich nicht nur in das Default-Environment meines Projekts per SSH verbinden, sondern auch in die Apps, um z.B. die korrekte PHP-Version zur Verfügung zu haben.
Improvement idea (maybe another PR): Use Dirname as default value. So if an empty name is given, the directory name is used.
Originally posted by @LukasFritzeDev in #220 (comment)
I have a App of type Custom PHP app
with a manually installed WordPress.
When trying to init an DDEV project using mw ddev init
I get this Error:
Error: Automatic project type detection failed.
I think in this case we have multiple options to handle this more gracefully:
--project-type=ddev
as a default for DDEVI just created some mail addresses with mailboxes using mw mail address create --random-password --enable-spam-protection --quiet --address ...
. After this I wanted to ad a forward address in addition to the mailbox. This is currently not possible with the CLI.
mw mail address create
to force a mailbox even if --forward-to
option is setTrying to execute mw user get
gives the following error message
╭──────────────────────────────────────────────────────────────────────────────╮
│ API CLIENT ERROR │
│ │
│ An error occurred while communicating with the API: Unexpected response │
│ status (expected 200, got: 403) │
│ │
│ { │
│ "params": { │
│ "traceId": "6bd48b719a2dd228" │
│ }, │
│ "message": "No permissions to user or not existing", │
│ "type": "VError" │
│ } │
╰──────────────────────────────────────────────────────────────────────────────╯
ERROR STACK TRACE
Please provide this when opening a bug report.
ApiClientError: Unexpected response status (expected 200, got: 403)
at ApiClientError.fromResponse (file:///opt/homebrew/Cellar/mw/1.0.0-alpha.21/libexec/node_modules/@mittwald/api-client-commons/dist/esm/core/ApiClientError.js:9:16)
at assertStatus (file:///opt/homebrew/Cellar/mw/1.0.0-alpha.21/libexec/node_modules/@mittwald/api-client-commons/dist/esm/types/assertStatus.js:4:30)
at Get.run (file:///opt/homebrew/Cellar/mw/1.0.0-alpha.21/libexec/dist/esm/GetBaseCommand.js:24:9)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Get._run (/opt/homebrew/Cellar/mw/1.0.0-alpha.21/libexec/node_modules/@oclif/core/lib/command.js:117:22)
at async Config.runCommand (/opt/homebrew/Cellar/mw/1.0.0-alpha.21/libexec/node_modules/@oclif/core/lib/config/config.js:329:25)
at async Object.run (/opt/homebrew/Cellar/mw/1.0.0-alpha.21/libexec/node_modules/@oclif/core/lib/main.js:89:16)
The user is logged in, mw login status
gives the user data and other command such as mw project list
are working as well.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.