@mittwald/cli 1.0.0-alpha.10
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/LICENSE +21 -0
- package/README.md +2469 -0
- package/bin/dev +17 -0
- package/bin/dev.cmd +3 -0
- package/bin/mw.cmd +3 -0
- package/bin/run.js +9 -0
- package/dist/esm/BaseCommand.d.ts +11 -0
- package/dist/esm/BaseCommand.js +44 -0
- package/dist/esm/DeleteBaseCommand.d.ts +12 -0
- package/dist/esm/DeleteBaseCommand.js +43 -0
- package/dist/esm/ExtendedBaseCommand.d.ts +7 -0
- package/dist/esm/ExtendedBaseCommand.js +16 -0
- package/dist/esm/Flags.d.ts +1 -0
- package/dist/esm/Flags.js +1 -0
- package/dist/esm/Formatter.d.ts +18 -0
- package/dist/esm/Formatter.js +33 -0
- package/dist/esm/GetBaseCommand.d.ts +17 -0
- package/dist/esm/GetBaseCommand.js +27 -0
- package/dist/esm/Helpers.d.ts +6 -0
- package/dist/esm/Helpers.js +30 -0
- package/dist/esm/ListBaseCommand.d.ts +20 -0
- package/dist/esm/ListBaseCommand.js +60 -0
- package/dist/esm/Printer.d.ts +15 -0
- package/dist/esm/Printer.js +30 -0
- package/dist/esm/Translator.d.ts +6 -0
- package/dist/esm/Translator.js +64 -0
- package/dist/esm/commands/app/delete.d.ts +12 -0
- package/dist/esm/commands/app/delete.js +45 -0
- package/dist/esm/commands/app/dependency/getSystemsoftware.d.ts +3 -0
- package/dist/esm/commands/app/dependency/getSystemsoftware.js +6 -0
- package/dist/esm/commands/app/dependency/getSystemsoftwareversion.d.ts +3 -0
- package/dist/esm/commands/app/dependency/getSystemsoftwareversion.js +6 -0
- package/dist/esm/commands/app/dependency/listSystemsoftwares.d.ts +9 -0
- package/dist/esm/commands/app/dependency/listSystemsoftwares.js +6 -0
- package/dist/esm/commands/app/dependency/listSystemsoftwareversions.d.ts +9 -0
- package/dist/esm/commands/app/dependency/listSystemsoftwareversions.js +6 -0
- package/dist/esm/commands/app/get.d.ts +3 -0
- package/dist/esm/commands/app/get.js +6 -0
- package/dist/esm/commands/app/install/wordpress.d.ts +23 -0
- package/dist/esm/commands/app/install/wordpress.js +112 -0
- package/dist/esm/commands/app/list.d.ts +15 -0
- package/dist/esm/commands/app/list.js +58 -0
- package/dist/esm/commands/app/versions.d.ts +12 -0
- package/dist/esm/commands/app/versions.js +53 -0
- package/dist/esm/commands/article/get.d.ts +3 -0
- package/dist/esm/commands/article/get.js +6 -0
- package/dist/esm/commands/article/list.d.ts +9 -0
- package/dist/esm/commands/article/list.js +6 -0
- package/dist/esm/commands/context/get.d.ts +10 -0
- package/dist/esm/commands/context/get.js +39 -0
- package/dist/esm/commands/context/set.d.ts +11 -0
- package/dist/esm/commands/context/set.js +37 -0
- package/dist/esm/commands/contract/getBaseItemOfContract.d.ts +3 -0
- package/dist/esm/commands/contract/getBaseItemOfContract.js +6 -0
- package/dist/esm/commands/contract/getDetailOfContract.d.ts +3 -0
- package/dist/esm/commands/contract/getDetailOfContract.js +6 -0
- package/dist/esm/commands/contract/getDetailOfContractByDomain.d.ts +3 -0
- package/dist/esm/commands/contract/getDetailOfContractByDomain.js +6 -0
- package/dist/esm/commands/contract/getDetailOfContractByProject.d.ts +3 -0
- package/dist/esm/commands/contract/getDetailOfContractByProject.js +6 -0
- package/dist/esm/commands/contract/getDetailOfContractByServer.d.ts +3 -0
- package/dist/esm/commands/contract/getDetailOfContractByServer.js +6 -0
- package/dist/esm/commands/contract/getDetailOfContractItem.d.ts +3 -0
- package/dist/esm/commands/contract/getDetailOfContractItem.js +6 -0
- package/dist/esm/commands/contract/getNextTerminationDateForItem.d.ts +3 -0
- package/dist/esm/commands/contract/getNextTerminationDateForItem.js +6 -0
- package/dist/esm/commands/contract/invoiceDetailOfInvoice.d.ts +3 -0
- package/dist/esm/commands/contract/invoiceDetailOfInvoice.js +6 -0
- package/dist/esm/commands/contract/invoiceGetDetailOfInvoiceSettings.d.ts +3 -0
- package/dist/esm/commands/contract/invoiceGetDetailOfInvoiceSettings.js +6 -0
- package/dist/esm/commands/contract/invoiceListCustomerInvoices.d.ts +9 -0
- package/dist/esm/commands/contract/invoiceListCustomerInvoices.js +6 -0
- package/dist/esm/commands/contract/listContracts.d.ts +9 -0
- package/dist/esm/commands/contract/listContracts.js +6 -0
- package/dist/esm/commands/contract/orderGetOrder.d.ts +3 -0
- package/dist/esm/commands/contract/orderGetOrder.js +6 -0
- package/dist/esm/commands/contract/orderListCustomerOrders.d.ts +9 -0
- package/dist/esm/commands/contract/orderListCustomerOrders.js +6 -0
- package/dist/esm/commands/contract/orderListProjectOrders.d.ts +9 -0
- package/dist/esm/commands/contract/orderListProjectOrders.js +6 -0
- package/dist/esm/commands/conversation/categories.d.ts +11 -0
- package/dist/esm/commands/conversation/categories.js +16 -0
- package/dist/esm/commands/conversation/close.d.ts +8 -0
- package/dist/esm/commands/conversation/close.js +24 -0
- package/dist/esm/commands/conversation/create.d.ts +13 -0
- package/dist/esm/commands/conversation/create.js +50 -0
- package/dist/esm/commands/conversation/list.d.ts +11 -0
- package/dist/esm/commands/conversation/list.js +28 -0
- package/dist/esm/commands/conversation/reply.d.ts +13 -0
- package/dist/esm/commands/conversation/reply.js +30 -0
- package/dist/esm/commands/conversation/show.d.ts +8 -0
- package/dist/esm/commands/conversation/show.js +78 -0
- package/dist/esm/commands/conversation/show2.d.ts +11 -0
- package/dist/esm/commands/conversation/show2.js +40 -0
- package/dist/esm/commands/database/mysql/charsets.d.ts +9 -0
- package/dist/esm/commands/database/mysql/charsets.js +6 -0
- package/dist/esm/commands/database/mysql/get.d.ts +3 -0
- package/dist/esm/commands/database/mysql/get.js +6 -0
- package/dist/esm/commands/database/mysql/list.d.ts +11 -0
- package/dist/esm/commands/database/mysql/list.js +54 -0
- package/dist/esm/commands/database/mysql/user/get.d.ts +3 -0
- package/dist/esm/commands/database/mysql/user/get.js +6 -0
- package/dist/esm/commands/database/mysql/user/getMysqlUserPhpMyAdminUrl.d.ts +3 -0
- package/dist/esm/commands/database/mysql/user/getMysqlUserPhpMyAdminUrl.js +7 -0
- package/dist/esm/commands/database/mysql/user/list.d.ts +9 -0
- package/dist/esm/commands/database/mysql/user/list.js +6 -0
- package/dist/esm/commands/database/mysql/versions.d.ts +9 -0
- package/dist/esm/commands/database/mysql/versions.js +6 -0
- package/dist/esm/commands/database/redis/get.d.ts +3 -0
- package/dist/esm/commands/database/redis/get.js +6 -0
- package/dist/esm/commands/database/redis/list.d.ts +9 -0
- package/dist/esm/commands/database/redis/list.js +6 -0
- package/dist/esm/commands/database/redis/versions.d.ts +9 -0
- package/dist/esm/commands/database/redis/versions.js +6 -0
- package/dist/esm/commands/domain/dnszone/get.d.ts +3 -0
- package/dist/esm/commands/domain/dnszone/get.js +6 -0
- package/dist/esm/commands/domain/dnszone/list.d.ts +3 -0
- package/dist/esm/commands/domain/dnszone/list.js +6 -0
- package/dist/esm/commands/domain/get-handle.d.ts +3 -0
- package/dist/esm/commands/domain/get-handle.js +6 -0
- package/dist/esm/commands/domain/get.d.ts +3 -0
- package/dist/esm/commands/domain/get.js +6 -0
- package/dist/esm/commands/domain/list.d.ts +17 -0
- package/dist/esm/commands/domain/list.js +20 -0
- package/dist/esm/commands/domain/ownership/get.d.ts +3 -0
- package/dist/esm/commands/domain/ownership/get.js +6 -0
- package/dist/esm/commands/domain/ownership/list.d.ts +9 -0
- package/dist/esm/commands/domain/ownership/list.js +6 -0
- package/dist/esm/commands/domain/tld/get.d.ts +3 -0
- package/dist/esm/commands/domain/tld/get.js +6 -0
- package/dist/esm/commands/domain/tld/list.d.ts +9 -0
- package/dist/esm/commands/domain/tld/list.js +6 -0
- package/dist/esm/commands/domain/virtualhost/get.d.ts +3 -0
- package/dist/esm/commands/domain/virtualhost/get.js +6 -0
- package/dist/esm/commands/domain/virtualhost/list.d.ts +20 -0
- package/dist/esm/commands/domain/virtualhost/list.js +52 -0
- package/dist/esm/commands/login/reset.d.ts +12 -0
- package/dist/esm/commands/login/reset.js +39 -0
- package/dist/esm/commands/login/status.d.ts +5 -0
- package/dist/esm/commands/login/status.js +29 -0
- package/dist/esm/commands/login/token.d.ts +10 -0
- package/dist/esm/commands/login/token.js +40 -0
- package/dist/esm/commands/mail/address/create.d.ts +20 -0
- package/dist/esm/commands/mail/address/create.js +61 -0
- package/dist/esm/commands/mail/address/delete.d.ts +13 -0
- package/dist/esm/commands/mail/address/delete.js +22 -0
- package/dist/esm/commands/mail/address/get.d.ts +3 -0
- package/dist/esm/commands/mail/address/get.js +6 -0
- package/dist/esm/commands/mail/address/list.d.ts +20 -0
- package/dist/esm/commands/mail/address/list.js +63 -0
- package/dist/esm/commands/mail/deliverybox/get.d.ts +3 -0
- package/dist/esm/commands/mail/deliverybox/get.js +6 -0
- package/dist/esm/commands/mail/deliverybox/list.d.ts +12 -0
- package/dist/esm/commands/mail/deliverybox/list.js +25 -0
- package/dist/esm/commands/org/get.d.ts +14 -0
- package/dist/esm/commands/org/get.js +52 -0
- package/dist/esm/commands/org/invite/get.d.ts +3 -0
- package/dist/esm/commands/org/invite/get.js +6 -0
- package/dist/esm/commands/org/invite/list-own.d.ts +9 -0
- package/dist/esm/commands/org/invite/list-own.js +6 -0
- package/dist/esm/commands/org/invite/list.d.ts +9 -0
- package/dist/esm/commands/org/invite/list.js +6 -0
- package/dist/esm/commands/org/list.d.ts +11 -0
- package/dist/esm/commands/org/list.js +28 -0
- package/dist/esm/commands/org/membership/get.d.ts +3 -0
- package/dist/esm/commands/org/membership/get.js +6 -0
- package/dist/esm/commands/org/membership/list-own.d.ts +9 -0
- package/dist/esm/commands/org/membership/list-own.js +6 -0
- package/dist/esm/commands/org/membership/list.d.ts +9 -0
- package/dist/esm/commands/org/membership/list.js +6 -0
- package/dist/esm/commands/project/backup/get.d.ts +3 -0
- package/dist/esm/commands/project/backup/get.js +6 -0
- package/dist/esm/commands/project/backup/list.d.ts +19 -0
- package/dist/esm/commands/project/backup/list.js +32 -0
- package/dist/esm/commands/project/backupschedule/get.d.ts +3 -0
- package/dist/esm/commands/project/backupschedule/get.js +6 -0
- package/dist/esm/commands/project/backupschedule/list.d.ts +13 -0
- package/dist/esm/commands/project/backupschedule/list.js +21 -0
- package/dist/esm/commands/project/create.d.ts +19 -0
- package/dist/esm/commands/project/create.js +71 -0
- package/dist/esm/commands/project/cronjob/execution/get.d.ts +16 -0
- package/dist/esm/commands/project/cronjob/execution/get.js +27 -0
- package/dist/esm/commands/project/cronjob/execution/list.d.ts +18 -0
- package/dist/esm/commands/project/cronjob/execution/list.js +42 -0
- package/dist/esm/commands/project/cronjob/execution/logs.d.ts +15 -0
- package/dist/esm/commands/project/cronjob/execution/logs.js +74 -0
- package/dist/esm/commands/project/cronjob/get.d.ts +3 -0
- package/dist/esm/commands/project/cronjob/get.js +6 -0
- package/dist/esm/commands/project/cronjob/list.d.ts +19 -0
- package/dist/esm/commands/project/cronjob/list.js +45 -0
- package/dist/esm/commands/project/delete.d.ts +14 -0
- package/dist/esm/commands/project/delete.js +20 -0
- package/dist/esm/commands/project/filesystem/usage.d.ts +14 -0
- package/dist/esm/commands/project/filesystem/usage.js +53 -0
- package/dist/esm/commands/project/get.d.ts +14 -0
- package/dist/esm/commands/project/get.js +78 -0
- package/dist/esm/commands/project/invite/get.d.ts +3 -0
- package/dist/esm/commands/project/invite/get.js +6 -0
- package/dist/esm/commands/project/invite/list-own.d.ts +11 -0
- package/dist/esm/commands/project/invite/list-own.js +29 -0
- package/dist/esm/commands/project/invite/list.d.ts +12 -0
- package/dist/esm/commands/project/invite/list.js +32 -0
- package/dist/esm/commands/project/list-react.d.ts +11 -0
- package/dist/esm/commands/project/list-react.js +42 -0
- package/dist/esm/commands/project/list.d.ts +12 -0
- package/dist/esm/commands/project/list.js +33 -0
- package/dist/esm/commands/project/membership/get-own.d.ts +4 -0
- package/dist/esm/commands/project/membership/get-own.js +11 -0
- package/dist/esm/commands/project/membership/get.d.ts +3 -0
- package/dist/esm/commands/project/membership/get.js +6 -0
- package/dist/esm/commands/project/membership/list-own.d.ts +11 -0
- package/dist/esm/commands/project/membership/list-own.js +28 -0
- package/dist/esm/commands/project/membership/list.d.ts +25 -0
- package/dist/esm/commands/project/membership/list.js +46 -0
- package/dist/esm/commands/project/sftp-user/list.d.ts +13 -0
- package/dist/esm/commands/project/sftp-user/list.js +24 -0
- package/dist/esm/commands/project/ssh-user/list.d.ts +13 -0
- package/dist/esm/commands/project/ssh-user/list.js +24 -0
- package/dist/esm/commands/project/ssh.d.ts +8 -0
- package/dist/esm/commands/project/ssh.js +24 -0
- package/dist/esm/commands/project/update.d.ts +8 -0
- package/dist/esm/commands/project/update.js +12 -0
- package/dist/esm/commands/server/get.d.ts +3 -0
- package/dist/esm/commands/server/get.js +6 -0
- package/dist/esm/commands/server/list.d.ts +11 -0
- package/dist/esm/commands/server/list.js +41 -0
- package/dist/esm/commands/user/api-token/create.d.ts +17 -0
- package/dist/esm/commands/user/api-token/create.js +64 -0
- package/dist/esm/commands/user/api-token/get.d.ts +3 -0
- package/dist/esm/commands/user/api-token/get.js +6 -0
- package/dist/esm/commands/user/api-token/list.d.ts +11 -0
- package/dist/esm/commands/user/api-token/list.js +23 -0
- package/dist/esm/commands/user/api-token/revoke.d.ts +13 -0
- package/dist/esm/commands/user/api-token/revoke.js +21 -0
- package/dist/esm/commands/user/get.d.ts +3 -0
- package/dist/esm/commands/user/get.js +6 -0
- package/dist/esm/commands/user/session/get.d.ts +3 -0
- package/dist/esm/commands/user/session/get.js +6 -0
- package/dist/esm/commands/user/session/list.d.ts +11 -0
- package/dist/esm/commands/user/session/list.js +26 -0
- package/dist/esm/commands/user/ssh-key/create.d.ts +13 -0
- package/dist/esm/commands/user/ssh-key/create.js +77 -0
- package/dist/esm/commands/user/ssh-key/delete.d.ts +13 -0
- package/dist/esm/commands/user/ssh-key/delete.js +22 -0
- package/dist/esm/commands/user/ssh-key/get.d.ts +3 -0
- package/dist/esm/commands/user/ssh-key/get.js +6 -0
- package/dist/esm/commands/user/ssh-key/list.d.ts +11 -0
- package/dist/esm/commands/user/ssh-key/list.js +21 -0
- package/dist/esm/generated/app/getApp.d.ts +16 -0
- package/dist/esm/generated/app/getApp.js +25 -0
- package/dist/esm/generated/app/getAppinstallation.d.ts +16 -0
- package/dist/esm/generated/app/getAppinstallation.js +25 -0
- package/dist/esm/generated/app/getAppversion.d.ts +16 -0
- package/dist/esm/generated/app/getAppversion.js +29 -0
- package/dist/esm/generated/app/getSystemsoftware.d.ts +16 -0
- package/dist/esm/generated/app/getSystemsoftware.js +25 -0
- package/dist/esm/generated/app/getSystemsoftwareversion.d.ts +16 -0
- package/dist/esm/generated/app/getSystemsoftwareversion.js +29 -0
- package/dist/esm/generated/app/listAppinstallations.d.ts +13 -0
- package/dist/esm/generated/app/listAppinstallations.js +24 -0
- package/dist/esm/generated/app/listApps.d.ts +13 -0
- package/dist/esm/generated/app/listApps.js +17 -0
- package/dist/esm/generated/app/listAppversions.d.ts +13 -0
- package/dist/esm/generated/app/listAppversions.js +24 -0
- package/dist/esm/generated/app/listSystemsoftwares.d.ts +13 -0
- package/dist/esm/generated/app/listSystemsoftwares.js +17 -0
- package/dist/esm/generated/app/listSystemsoftwareversions.d.ts +13 -0
- package/dist/esm/generated/app/listSystemsoftwareversions.js +24 -0
- package/dist/esm/generated/app/retrieveStatus.d.ts +14 -0
- package/dist/esm/generated/app/retrieveStatus.js +24 -0
- package/dist/esm/generated/article/getArticle.d.ts +16 -0
- package/dist/esm/generated/article/getArticle.js +25 -0
- package/dist/esm/generated/article/listArticles.d.ts +13 -0
- package/dist/esm/generated/article/listArticles.js +17 -0
- package/dist/esm/generated/backup/getProjectBackup.d.ts +16 -0
- package/dist/esm/generated/backup/getProjectBackup.js +25 -0
- package/dist/esm/generated/backup/getProjectBackupSchedule.d.ts +16 -0
- package/dist/esm/generated/backup/getProjectBackupSchedule.js +25 -0
- package/dist/esm/generated/backup/listProjectBackupSchedules.d.ts +13 -0
- package/dist/esm/generated/backup/listProjectBackupSchedules.js +24 -0
- package/dist/esm/generated/backup/listProjectBackups.d.ts +13 -0
- package/dist/esm/generated/backup/listProjectBackups.js +24 -0
- package/dist/esm/generated/contract/getBaseItemOfContract.d.ts +14 -0
- package/dist/esm/generated/contract/getBaseItemOfContract.js +24 -0
- package/dist/esm/generated/contract/getDetailOfContract.d.ts +16 -0
- package/dist/esm/generated/contract/getDetailOfContract.js +25 -0
- package/dist/esm/generated/contract/getDetailOfContractByDomain.d.ts +14 -0
- package/dist/esm/generated/contract/getDetailOfContractByDomain.js +24 -0
- package/dist/esm/generated/contract/getDetailOfContractByProject.d.ts +14 -0
- package/dist/esm/generated/contract/getDetailOfContractByProject.js +24 -0
- package/dist/esm/generated/contract/getDetailOfContractByServer.d.ts +14 -0
- package/dist/esm/generated/contract/getDetailOfContractByServer.js +24 -0
- package/dist/esm/generated/contract/getDetailOfContractItem.d.ts +16 -0
- package/dist/esm/generated/contract/getDetailOfContractItem.js +29 -0
- package/dist/esm/generated/contract/getNextTerminationDateForItem.d.ts +15 -0
- package/dist/esm/generated/contract/getNextTerminationDateForItem.js +28 -0
- package/dist/esm/generated/contract/invoiceDetailOfInvoice.d.ts +16 -0
- package/dist/esm/generated/contract/invoiceDetailOfInvoice.js +29 -0
- package/dist/esm/generated/contract/invoiceGetDetailOfInvoiceSettings.d.ts +14 -0
- package/dist/esm/generated/contract/invoiceGetDetailOfInvoiceSettings.js +24 -0
- package/dist/esm/generated/contract/invoiceListCustomerInvoices.d.ts +13 -0
- package/dist/esm/generated/contract/invoiceListCustomerInvoices.js +24 -0
- package/dist/esm/generated/contract/listContracts.d.ts +13 -0
- package/dist/esm/generated/contract/listContracts.js +24 -0
- package/dist/esm/generated/contract/orderGetOrder.d.ts +16 -0
- package/dist/esm/generated/contract/orderGetOrder.js +25 -0
- package/dist/esm/generated/contract/orderListCustomerOrders.d.ts +13 -0
- package/dist/esm/generated/contract/orderListCustomerOrders.js +24 -0
- package/dist/esm/generated/contract/orderListProjectOrders.d.ts +13 -0
- package/dist/esm/generated/contract/orderListProjectOrders.js +24 -0
- package/dist/esm/generated/conversation/getCategory.d.ts +16 -0
- package/dist/esm/generated/conversation/getCategory.js +25 -0
- package/dist/esm/generated/conversation/getConversation.d.ts +16 -0
- package/dist/esm/generated/conversation/getConversation.js +25 -0
- package/dist/esm/generated/conversation/listCategories.d.ts +13 -0
- package/dist/esm/generated/conversation/listCategories.js +17 -0
- package/dist/esm/generated/conversation/listConversations.d.ts +13 -0
- package/dist/esm/generated/conversation/listConversations.js +17 -0
- package/dist/esm/generated/conversation/listMessagesByConversation.d.ts +13 -0
- package/dist/esm/generated/conversation/listMessagesByConversation.js +24 -0
- package/dist/esm/generated/cronjob/getCronjob.d.ts +16 -0
- package/dist/esm/generated/cronjob/getCronjob.js +25 -0
- package/dist/esm/generated/cronjob/getExecution.d.ts +16 -0
- package/dist/esm/generated/cronjob/getExecution.js +29 -0
- package/dist/esm/generated/customer/getCustomerCategory.d.ts +16 -0
- package/dist/esm/generated/customer/getCustomerCategory.js +25 -0
- package/dist/esm/generated/customer/getCustomerInvite.d.ts +16 -0
- package/dist/esm/generated/customer/getCustomerInvite.js +25 -0
- package/dist/esm/generated/customer/getCustomerMembership.d.ts +16 -0
- package/dist/esm/generated/customer/getCustomerMembership.js +25 -0
- package/dist/esm/generated/customer/listCustomerInvites.d.ts +13 -0
- package/dist/esm/generated/customer/listCustomerInvites.js +17 -0
- package/dist/esm/generated/customer/listCustomerMemberships.d.ts +13 -0
- package/dist/esm/generated/customer/listCustomerMemberships.js +17 -0
- package/dist/esm/generated/customer/listCustomers.d.ts +13 -0
- package/dist/esm/generated/customer/listCustomers.js +17 -0
- package/dist/esm/generated/customer/listInvitesForCustomer.d.ts +13 -0
- package/dist/esm/generated/customer/listInvitesForCustomer.js +24 -0
- package/dist/esm/generated/customer/listMembershipsForCustomer.d.ts +13 -0
- package/dist/esm/generated/customer/listMembershipsForCustomer.js +24 -0
- package/dist/esm/generated/customer/listOfCustomerCategories.d.ts +13 -0
- package/dist/esm/generated/customer/listOfCustomerCategories.js +17 -0
- package/dist/esm/generated/database/getMysqlDatabase.d.ts +16 -0
- package/dist/esm/generated/database/getMysqlDatabase.js +25 -0
- package/dist/esm/generated/database/getMysqlUser.d.ts +16 -0
- package/dist/esm/generated/database/getMysqlUser.js +25 -0
- package/dist/esm/generated/database/getMysqlUserPhpMyAdminUrl.d.ts +14 -0
- package/dist/esm/generated/database/getMysqlUserPhpMyAdminUrl.js +24 -0
- package/dist/esm/generated/database/getRedisDatabase.d.ts +16 -0
- package/dist/esm/generated/database/getRedisDatabase.js +25 -0
- package/dist/esm/generated/database/listMysqlCharsets.d.ts +13 -0
- package/dist/esm/generated/database/listMysqlCharsets.js +17 -0
- package/dist/esm/generated/database/listMysqlDatabases.d.ts +13 -0
- package/dist/esm/generated/database/listMysqlDatabases.js +24 -0
- package/dist/esm/generated/database/listMysqlUsers.d.ts +13 -0
- package/dist/esm/generated/database/listMysqlUsers.js +24 -0
- package/dist/esm/generated/database/listMysqlVersions.d.ts +13 -0
- package/dist/esm/generated/database/listMysqlVersions.js +17 -0
- package/dist/esm/generated/database/listRedisDatabases.d.ts +13 -0
- package/dist/esm/generated/database/listRedisDatabases.js +24 -0
- package/dist/esm/generated/database/listRedisVersions.d.ts +13 -0
- package/dist/esm/generated/database/listRedisVersions.js +17 -0
- package/dist/esm/generated/domain/dnsZoneGetSpecific.d.ts +16 -0
- package/dist/esm/generated/domain/dnsZoneGetSpecific.js +25 -0
- package/dist/esm/generated/domain/dnsZonesForProject.d.ts +14 -0
- package/dist/esm/generated/domain/dnsZonesForProject.js +24 -0
- package/dist/esm/generated/domain/getDomain.d.ts +16 -0
- package/dist/esm/generated/domain/getDomain.js +25 -0
- package/dist/esm/generated/domain/getHandleFields.d.ts +16 -0
- package/dist/esm/generated/domain/getHandleFields.js +25 -0
- package/dist/esm/generated/domain/getSpecificDomainOwnership.d.ts +16 -0
- package/dist/esm/generated/domain/getSpecificDomainOwnership.js +25 -0
- package/dist/esm/generated/domain/getToplevelDomain.d.ts +16 -0
- package/dist/esm/generated/domain/getToplevelDomain.js +25 -0
- package/dist/esm/generated/domain/ingressGetSpecific.d.ts +16 -0
- package/dist/esm/generated/domain/ingressGetSpecific.js +25 -0
- package/dist/esm/generated/domain/listDomainOwnerships.d.ts +13 -0
- package/dist/esm/generated/domain/listDomainOwnerships.js +24 -0
- package/dist/esm/generated/domain/listToplevelDomains.d.ts +13 -0
- package/dist/esm/generated/domain/listToplevelDomains.js +17 -0
- package/dist/esm/generated/file/getFile.d.ts +16 -0
- package/dist/esm/generated/file/getFile.js +25 -0
- package/dist/esm/generated/file/getFileMeta.d.ts +14 -0
- package/dist/esm/generated/file/getFileMeta.js +24 -0
- package/dist/esm/generated/file/getFileTokenRules.d.ts +16 -0
- package/dist/esm/generated/file/getFileTokenRules.js +25 -0
- package/dist/esm/generated/file/getFileTypeRules.d.ts +16 -0
- package/dist/esm/generated/file/getFileTypeRules.js +25 -0
- package/dist/esm/generated/mail/deliveryboxGetSpecific.d.ts +16 -0
- package/dist/esm/generated/mail/deliveryboxGetSpecific.js +25 -0
- package/dist/esm/generated/mail/deliveryboxList.d.ts +13 -0
- package/dist/esm/generated/mail/deliveryboxList.js +24 -0
- package/dist/esm/generated/mail/mailaddressGetSpecific.d.ts +16 -0
- package/dist/esm/generated/mail/mailaddressGetSpecific.js +25 -0
- package/dist/esm/generated/mail/mailaddressList.d.ts +13 -0
- package/dist/esm/generated/mail/mailaddressList.js +24 -0
- package/dist/esm/generated/mail/projectsettingGetSpecific.d.ts +14 -0
- package/dist/esm/generated/mail/projectsettingGetSpecific.js +24 -0
- package/dist/esm/generated/notification/newsletterGetInfo.d.ts +14 -0
- package/dist/esm/generated/notification/newsletterGetInfo.js +16 -0
- package/dist/esm/generated/notification/scountUnreadNotifications.d.ts +14 -0
- package/dist/esm/generated/notification/scountUnreadNotifications.js +16 -0
- package/dist/esm/generated/notification/slistNotifications.d.ts +13 -0
- package/dist/esm/generated/notification/slistNotifications.js +17 -0
- package/dist/esm/generated/project/getProject.d.ts +16 -0
- package/dist/esm/generated/project/getProject.js +25 -0
- package/dist/esm/generated/project/getProjectInvite.d.ts +16 -0
- package/dist/esm/generated/project/getProjectInvite.js +25 -0
- package/dist/esm/generated/project/getProjectMembership.d.ts +16 -0
- package/dist/esm/generated/project/getProjectMembership.js +25 -0
- package/dist/esm/generated/project/getSelfMembershipForProject.d.ts +14 -0
- package/dist/esm/generated/project/getSelfMembershipForProject.js +24 -0
- package/dist/esm/generated/project/getServer.d.ts +16 -0
- package/dist/esm/generated/project/getServer.js +25 -0
- package/dist/esm/generated/project/listInvitesForProject.d.ts +13 -0
- package/dist/esm/generated/project/listInvitesForProject.js +24 -0
- package/dist/esm/generated/project/listMembershipsForProject.d.ts +13 -0
- package/dist/esm/generated/project/listMembershipsForProject.js +24 -0
- package/dist/esm/generated/project/listProjectInvites.d.ts +13 -0
- package/dist/esm/generated/project/listProjectInvites.js +17 -0
- package/dist/esm/generated/project/listProjectMemberships.d.ts +13 -0
- package/dist/esm/generated/project/listProjectMemberships.js +17 -0
- package/dist/esm/generated/project/listProjects.d.ts +13 -0
- package/dist/esm/generated/project/listProjects.js +17 -0
- package/dist/esm/generated/project/listServers.d.ts +13 -0
- package/dist/esm/generated/project/listServers.js +17 -0
- package/dist/esm/generated/sshsftpUser/sftpUserGetSftpUser.d.ts +16 -0
- package/dist/esm/generated/sshsftpUser/sftpUserGetSftpUser.js +25 -0
- package/dist/esm/generated/sshsftpUser/sftpUserListSftpUsers.d.ts +13 -0
- package/dist/esm/generated/sshsftpUser/sftpUserListSftpUsers.js +24 -0
- package/dist/esm/generated/sshsftpUser/sshUserGetSshUser.d.ts +16 -0
- package/dist/esm/generated/sshsftpUser/sshUserGetSshUser.js +25 -0
- package/dist/esm/generated/sshsftpUser/sshUserListSshUsers.d.ts +13 -0
- package/dist/esm/generated/sshsftpUser/sshUserListSshUsers.js +24 -0
- package/dist/esm/generated/user/getApiToken.d.ts +16 -0
- package/dist/esm/generated/user/getApiToken.js +25 -0
- package/dist/esm/generated/user/getPersonalizedSettings.d.ts +14 -0
- package/dist/esm/generated/user/getPersonalizedSettings.js +24 -0
- package/dist/esm/generated/user/getSession.d.ts +16 -0
- package/dist/esm/generated/user/getSession.js +25 -0
- package/dist/esm/generated/user/getSshKey.d.ts +16 -0
- package/dist/esm/generated/user/getSshKey.js +25 -0
- package/dist/esm/generated/user/getUser.d.ts +14 -0
- package/dist/esm/generated/user/getUser.js +16 -0
- package/dist/esm/generated/user/listApiTokens.d.ts +13 -0
- package/dist/esm/generated/user/listApiTokens.js +17 -0
- package/dist/esm/generated/user/listFeedback.d.ts +13 -0
- package/dist/esm/generated/user/listFeedback.js +24 -0
- package/dist/esm/generated/user/listSessions.d.ts +13 -0
- package/dist/esm/generated/user/listSessions.js +17 -0
- package/dist/esm/generated/user/listSshKeys.d.ts +13 -0
- package/dist/esm/generated/user/listSshKeys.js +17 -0
- package/dist/esm/lib/app/appHelpers.d.ts +4 -0
- package/dist/esm/lib/app/appHelpers.js +43 -0
- package/dist/esm/lib/app/appVersionHelpers.d.ts +5 -0
- package/dist/esm/lib/app/appVersionHelpers.js +35 -0
- package/dist/esm/lib/bytes.d.ts +1 -0
- package/dist/esm/lib/bytes.js +16 -0
- package/dist/esm/lib/context.d.ts +16 -0
- package/dist/esm/lib/context.js +42 -0
- package/dist/esm/lib/context_flags.d.ts +18 -0
- package/dist/esm/lib/context_flags.js +42 -0
- package/dist/esm/lib/conversation/message_input.d.ts +10 -0
- package/dist/esm/lib/conversation/message_input.js +49 -0
- package/dist/esm/lib/handleError.d.ts +11 -0
- package/dist/esm/lib/handleError.js +28 -0
- package/dist/esm/lib/mergeObjects.d.ts +1 -0
- package/dist/esm/lib/mergeObjects.js +6 -0
- package/dist/esm/lib/notify.d.ts +2 -0
- package/dist/esm/lib/notify.js +5 -0
- package/dist/esm/lib/org/flags.d.ts +5 -0
- package/dist/esm/lib/org/flags.js +2 -0
- package/dist/esm/lib/project/flags.d.ts +5 -0
- package/dist/esm/lib/project/flags.js +3 -0
- package/dist/esm/lib/server/flags.d.ts +5 -0
- package/dist/esm/lib/server/flags.js +3 -0
- package/dist/esm/lib/viewhelpers/date.d.ts +5 -0
- package/dist/esm/lib/viewhelpers/date.js +23 -0
- package/dist/esm/lib/viewhelpers/removeLineBreaks.d.ts +1 -0
- package/dist/esm/lib/viewhelpers/removeLineBreaks.js +1 -0
- package/dist/esm/lib/viewhelpers/size.d.ts +1 -0
- package/dist/esm/lib/viewhelpers/size.js +4 -0
- package/dist/esm/lib/viewhelpers/tui.d.ts +2 -0
- package/dist/esm/lib/viewhelpers/tui.js +13 -0
- package/dist/esm/lib/wait.d.ts +1 -0
- package/dist/esm/lib/wait.js +12 -0
- package/dist/esm/rendering/lib/getTerminalWidth.d.ts +1 -0
- package/dist/esm/rendering/lib/getTerminalWidth.js +2 -0
- package/dist/esm/rendering/react/ComponentPrinter.d.ts +7 -0
- package/dist/esm/rendering/react/ComponentPrinter.js +13 -0
- package/dist/esm/rendering/react/ExecRenderBaseCommand.d.ts +8 -0
- package/dist/esm/rendering/react/ExecRenderBaseCommand.js +15 -0
- package/dist/esm/rendering/react/RenderBaseCommand.d.ts +19 -0
- package/dist/esm/rendering/react/RenderBaseCommand.js +45 -0
- package/dist/esm/rendering/react/components/ByteFormat.d.ts +4 -0
- package/dist/esm/rendering/react/components/ByteFormat.js +12 -0
- package/dist/esm/rendering/react/components/Conversation/ConversationMessage.d.ts +8 -0
- package/dist/esm/rendering/react/components/Conversation/ConversationMessage.js +12 -0
- package/dist/esm/rendering/react/components/Conversation/ConversationMessages.d.ts +8 -0
- package/dist/esm/rendering/react/components/Conversation/ConversationMessages.js +13 -0
- package/dist/esm/rendering/react/components/Conversation/ConversationMeta.d.ts +6 -0
- package/dist/esm/rendering/react/components/Conversation/ConversationMeta.js +25 -0
- package/dist/esm/rendering/react/components/Conversation/ConversationStatusUpdate.d.ts +8 -0
- package/dist/esm/rendering/react/components/Conversation/ConversationStatusUpdate.js +6 -0
- package/dist/esm/rendering/react/components/CreatedAt.d.ts +8 -0
- package/dist/esm/rendering/react/components/CreatedAt.js +10 -0
- package/dist/esm/rendering/react/components/Filename.d.ts +4 -0
- package/dist/esm/rendering/react/components/Filename.js +5 -0
- package/dist/esm/rendering/react/components/FormattedDate.d.ts +8 -0
- package/dist/esm/rendering/react/components/FormattedDate.js +16 -0
- package/dist/esm/rendering/react/components/Header.d.ts +6 -0
- package/dist/esm/rendering/react/components/Header.js +6 -0
- package/dist/esm/rendering/react/components/IDAndShortID.d.ts +7 -0
- package/dist/esm/rendering/react/components/IDAndShortID.js +6 -0
- package/dist/esm/rendering/react/components/JSONView.d.ts +7 -0
- package/dist/esm/rendering/react/components/JSONView.js +3 -0
- package/dist/esm/rendering/react/components/ListItem.d.ts +3 -0
- package/dist/esm/rendering/react/components/ListItem.js +5 -0
- package/dist/esm/rendering/react/components/Note.d.ts +10 -0
- package/dist/esm/rendering/react/components/Note.js +8 -0
- package/dist/esm/rendering/react/components/Organization/CustomerIDAndNumber.d.ts +7 -0
- package/dist/esm/rendering/react/components/Organization/CustomerIDAndNumber.js +6 -0
- package/dist/esm/rendering/react/components/Organization/OrganizationOrderEligibility.d.ts +6 -0
- package/dist/esm/rendering/react/components/Organization/OrganizationOrderEligibility.js +9 -0
- package/dist/esm/rendering/react/components/Organization/OrganizationOwner.d.ts +6 -0
- package/dist/esm/rendering/react/components/Organization/OrganizationOwner.js +14 -0
- package/dist/esm/rendering/react/components/ProjectEnabled.d.ts +6 -0
- package/dist/esm/rendering/react/components/ProjectEnabled.js +9 -0
- package/dist/esm/rendering/react/components/ProjectReadiness.d.ts +7 -0
- package/dist/esm/rendering/react/components/ProjectReadiness.js +16 -0
- package/dist/esm/rendering/react/components/ProjectStatus.d.ts +7 -0
- package/dist/esm/rendering/react/components/ProjectStatus.js +8 -0
- package/dist/esm/rendering/react/components/Render.d.ts +6 -0
- package/dist/esm/rendering/react/components/Render.js +5 -0
- package/dist/esm/rendering/react/components/SingleResult.d.ts +10 -0
- package/dist/esm/rendering/react/components/SingleResult.js +15 -0
- package/dist/esm/rendering/react/components/Success.d.ts +9 -0
- package/dist/esm/rendering/react/components/Success.js +6 -0
- package/dist/esm/rendering/react/components/Table/BodyCell.d.ts +7 -0
- package/dist/esm/rendering/react/components/Table/BodyCell.js +7 -0
- package/dist/esm/rendering/react/components/Table/BodyRow.d.ts +7 -0
- package/dist/esm/rendering/react/components/Table/BodyRow.js +7 -0
- package/dist/esm/rendering/react/components/Table/BodyRows.d.ts +7 -0
- package/dist/esm/rendering/react/components/Table/BodyRows.js +6 -0
- package/dist/esm/rendering/react/components/Table/CellData.d.ts +6 -0
- package/dist/esm/rendering/react/components/Table/CellData.js +32 -0
- package/dist/esm/rendering/react/components/Table/CellLayout.d.ts +8 -0
- package/dist/esm/rendering/react/components/Table/CellLayout.js +17 -0
- package/dist/esm/rendering/react/components/Table/HeaderCell.d.ts +7 -0
- package/dist/esm/rendering/react/components/Table/HeaderCell.js +7 -0
- package/dist/esm/rendering/react/components/Table/HeaderRow.d.ts +8 -0
- package/dist/esm/rendering/react/components/Table/HeaderRow.js +7 -0
- package/dist/esm/rendering/react/components/Table/RowLayout.d.ts +5 -0
- package/dist/esm/rendering/react/components/Table/RowLayout.js +3 -0
- package/dist/esm/rendering/react/components/Table/Table.d.ts +10 -0
- package/dist/esm/rendering/react/components/Table/Table.js +21 -0
- package/dist/esm/rendering/react/components/Table/context.d.ts +9 -0
- package/dist/esm/rendering/react/components/Table/context.js +7 -0
- package/dist/esm/rendering/react/components/Table/index.d.ts +1 -0
- package/dist/esm/rendering/react/components/Table/index.js +1 -0
- package/dist/esm/rendering/react/components/Table/model/Cell.d.ts +19 -0
- package/dist/esm/rendering/react/components/Table/model/Cell.js +24 -0
- package/dist/esm/rendering/react/components/Table/model/Column.d.ts +16 -0
- package/dist/esm/rendering/react/components/Table/model/Column.js +35 -0
- package/dist/esm/rendering/react/components/Table/model/ColumnName.d.ts +7 -0
- package/dist/esm/rendering/react/components/Table/model/ColumnName.js +17 -0
- package/dist/esm/rendering/react/components/Table/model/ColumnOptions.d.ts +25 -0
- package/dist/esm/rendering/react/components/Table/model/ColumnOptions.js +41 -0
- package/dist/esm/rendering/react/components/Table/model/Row.d.ts +14 -0
- package/dist/esm/rendering/react/components/Table/model/Row.js +37 -0
- package/dist/esm/rendering/react/components/Table/model/Table.d.ts +19 -0
- package/dist/esm/rendering/react/components/Table/model/Table.js +48 -0
- package/dist/esm/rendering/react/components/Table/model/index.d.ts +5 -0
- package/dist/esm/rendering/react/components/Table/model/index.js +5 -0
- package/dist/esm/rendering/react/components/Value.d.ts +5 -0
- package/dist/esm/rendering/react/components/Value.js +8 -0
- package/dist/esm/rendering/react/components/WithoutLineBreaks.d.ts +2 -0
- package/dist/esm/rendering/react/components/WithoutLineBreaks.js +7 -0
- package/dist/esm/rendering/react/context.d.ts +9 -0
- package/dist/esm/rendering/react/context.js +7 -0
- package/dist/esm/rendering/react/hooks/useMyUserProfile.d.ts +2 -0
- package/dist/esm/rendering/react/hooks/useMyUserProfile.js +17 -0
- package/dist/esm/rendering/react/json/JsonCollectionProvider.d.ts +2 -0
- package/dist/esm/rendering/react/json/JsonCollectionProvider.js +10 -0
- package/dist/esm/rendering/react/json/JsonRenderer.d.ts +2 -0
- package/dist/esm/rendering/react/json/JsonRenderer.js +14 -0
- package/dist/esm/rendering/react/json/RenderJson.d.ts +7 -0
- package/dist/esm/rendering/react/json/RenderJson.js +19 -0
- package/dist/esm/rendering/react/json/context.d.ts +5 -0
- package/dist/esm/rendering/react/json/context.js +4 -0
- package/dist/esm/rendering/react/json/lib/unpackJsonData.d.ts +1 -0
- package/dist/esm/rendering/react/json/lib/unpackJsonData.js +5 -0
- package/dist/esm/rendering/react/lib/observable-value/ObservableValue.d.ts +10 -0
- package/dist/esm/rendering/react/lib/observable-value/ObservableValue.js +25 -0
- package/dist/esm/rendering/react/lib/observable-value/types.d.ts +2 -0
- package/dist/esm/rendering/react/lib/observable-value/types.js +1 -0
- package/dist/esm/rendering/react/lib/observable-value/useWatchObservableValue.d.ts +2 -0
- package/dist/esm/rendering/react/lib/observable-value/useWatchObservableValue.js +9 -0
- package/dist/esm/rendering/react/measure/MeasureChildren.d.ts +8 -0
- package/dist/esm/rendering/react/measure/MeasureChildren.js +19 -0
- package/dist/esm/rendering/react/measure/MeasureContextProvider.d.ts +2 -0
- package/dist/esm/rendering/react/measure/MeasureContextProvider.js +10 -0
- package/dist/esm/rendering/react/measure/MeasureRenderer.d.ts +2 -0
- package/dist/esm/rendering/react/measure/MeasureRenderer.js +22 -0
- package/dist/esm/rendering/react/measure/context.d.ts +18 -0
- package/dist/esm/rendering/react/measure/context.js +48 -0
- package/dist/esm/rendering/react/process.d.ts +42 -0
- package/dist/esm/rendering/react/process.js +24 -0
- package/dist/esm/rendering/react/process_fancy.d.ts +28 -0
- package/dist/esm/rendering/react/process_fancy.js +221 -0
- package/dist/esm/rendering/react/process_flags.d.ts +9 -0
- package/dist/esm/rendering/react/process_flags.js +15 -0
- package/dist/esm/rendering/react/process_quiet.d.ts +12 -0
- package/dist/esm/rendering/react/process_quiet.js +29 -0
- package/dist/esm/rendering/setup/FlagSupportedSetup.d.ts +15 -0
- package/dist/esm/rendering/setup/FlagSupportedSetup.js +22 -0
- package/dist/esm/rendering/setup/TableRenderSetup.d.ts +11 -0
- package/dist/esm/rendering/setup/TableRenderSetup.js +24 -0
- package/dist/esm/rendering/setup/usePromiseSetup.d.ts +12 -0
- package/dist/esm/rendering/setup/usePromiseSetup.js +11 -0
- package/dist/esm/types.d.ts +8 -0
- package/dist/esm/types.js +1 -0
- package/package.json +159 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* prettier-ignore */
|
|
3
|
+
/* This file is auto-generated with acg (@mittwald/api-code-generator) */
|
|
4
|
+
import { Args } from "@oclif/core";
|
|
5
|
+
import { GetBaseCommand } from "../../GetBaseCommand.js";
|
|
6
|
+
export class GeneratedUserGetSession extends GetBaseCommand {
|
|
7
|
+
static description = "Get a specific Session";
|
|
8
|
+
static flags = {
|
|
9
|
+
...GetBaseCommand.baseFlags,
|
|
10
|
+
};
|
|
11
|
+
static args = {
|
|
12
|
+
tokenId: Args.string({
|
|
13
|
+
description: "tokenId to identify the concrete Session",
|
|
14
|
+
required: true,
|
|
15
|
+
}),
|
|
16
|
+
};
|
|
17
|
+
async getData() {
|
|
18
|
+
return await this.apiClient.user.getSession({
|
|
19
|
+
pathParameters: await this.mapParams(this.args),
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
mapParams(input) {
|
|
23
|
+
return input;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
2
|
+
import { GetBaseCommand } from "../../GetBaseCommand.js";
|
|
3
|
+
export type PathParams = MittwaldAPIV2.Paths.V2UsersSelfSshKeys.Get.Parameters.Path;
|
|
4
|
+
type APIResponse = Awaited<ReturnType<MittwaldAPIV2Client["user"]["getSshKey"]>>;
|
|
5
|
+
export declare abstract class GeneratedUserGetSshKey extends GetBaseCommand<typeof GeneratedUserGetSshKey, APIResponse> {
|
|
6
|
+
static description: string;
|
|
7
|
+
static flags: {
|
|
8
|
+
[x: string]: import("@oclif/core/lib/interfaces/parser.js").CompletableFlag<any>;
|
|
9
|
+
};
|
|
10
|
+
static args: {
|
|
11
|
+
sshKeyId: import("@oclif/core/lib/interfaces/parser.js").Arg<string, Record<string, unknown>>;
|
|
12
|
+
};
|
|
13
|
+
protected getData(): Promise<APIResponse>;
|
|
14
|
+
protected mapParams(input: PathParams): Promise<PathParams> | PathParams;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* prettier-ignore */
|
|
3
|
+
/* This file is auto-generated with acg (@mittwald/api-code-generator) */
|
|
4
|
+
import { Args } from "@oclif/core";
|
|
5
|
+
import { GetBaseCommand } from "../../GetBaseCommand.js";
|
|
6
|
+
export class GeneratedUserGetSshKey extends GetBaseCommand {
|
|
7
|
+
static description = "Get a specific stored SshKey";
|
|
8
|
+
static flags = {
|
|
9
|
+
...GetBaseCommand.baseFlags,
|
|
10
|
+
};
|
|
11
|
+
static args = {
|
|
12
|
+
sshKeyId: Args.string({
|
|
13
|
+
description: "undefined",
|
|
14
|
+
required: true,
|
|
15
|
+
}),
|
|
16
|
+
};
|
|
17
|
+
async getData() {
|
|
18
|
+
return await this.apiClient.user.getSshKey({
|
|
19
|
+
pathParameters: await this.mapParams(this.args),
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
mapParams(input) {
|
|
23
|
+
return input;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
2
|
+
import { GetBaseCommand } from "../../GetBaseCommand.js";
|
|
3
|
+
export type PathParams = MittwaldAPIV2.Paths.V2UsersUserId.Get.Parameters.Path;
|
|
4
|
+
type APIResponse = Awaited<ReturnType<MittwaldAPIV2Client["user"]["getUser"]>>;
|
|
5
|
+
export declare abstract class GeneratedUserGetUser extends GetBaseCommand<typeof GeneratedUserGetUser, APIResponse> {
|
|
6
|
+
static description: string;
|
|
7
|
+
static flags: {
|
|
8
|
+
[x: string]: import("@oclif/core/lib/interfaces/parser.js").CompletableFlag<any>;
|
|
9
|
+
};
|
|
10
|
+
static args: {};
|
|
11
|
+
protected getData(): Promise<APIResponse>;
|
|
12
|
+
protected mapParams(input: PathParams): Promise<PathParams> | PathParams;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { GetBaseCommand } from "../../GetBaseCommand.js";
|
|
2
|
+
export class GeneratedUserGetUser extends GetBaseCommand {
|
|
3
|
+
static description = "Get profile information for a user.";
|
|
4
|
+
static flags = {
|
|
5
|
+
...GetBaseCommand.baseFlags,
|
|
6
|
+
};
|
|
7
|
+
static args = {};
|
|
8
|
+
async getData() {
|
|
9
|
+
return await this.apiClient.user.getUser({
|
|
10
|
+
pathParameters: await this.mapParams(this.args),
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
mapParams(input) {
|
|
14
|
+
return input;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
2
|
+
import { ListBaseCommand } from "../../ListBaseCommand.js";
|
|
3
|
+
export type PathParams = MittwaldAPIV2.Paths.V2UsersSelfApiTokens.Get.Parameters.Path;
|
|
4
|
+
export type Response = Awaited<ReturnType<MittwaldAPIV2Client["user"]["listApiTokens"]>>;
|
|
5
|
+
export declare abstract class GeneratedUserListApiTokens<TItem extends Record<string, unknown>> extends ListBaseCommand<typeof GeneratedUserListApiTokens, TItem, Response> {
|
|
6
|
+
static description: string;
|
|
7
|
+
static args: {};
|
|
8
|
+
static flags: {
|
|
9
|
+
[x: string]: import("@oclif/core/lib/interfaces/parser.js").CompletableFlag<any>;
|
|
10
|
+
};
|
|
11
|
+
getData(): Promise<Response>;
|
|
12
|
+
protected mapParams(input: PathParams): Promise<PathParams> | PathParams;
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ListBaseCommand } from "../../ListBaseCommand.js";
|
|
2
|
+
export class GeneratedUserListApiTokens extends ListBaseCommand {
|
|
3
|
+
static description = "List all ApiTokens of the user";
|
|
4
|
+
static args = {};
|
|
5
|
+
static flags = {
|
|
6
|
+
...ListBaseCommand.baseFlags,
|
|
7
|
+
};
|
|
8
|
+
async getData() {
|
|
9
|
+
const pathParams = {};
|
|
10
|
+
return await this.apiClient.user.listApiTokens({
|
|
11
|
+
pathParameters: await this.mapParams(pathParams),
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
mapParams(input) {
|
|
15
|
+
return input;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
2
|
+
import { ListBaseCommand } from "../../ListBaseCommand.js";
|
|
3
|
+
export type PathParams = MittwaldAPIV2.Paths.V2UsersUserIdFeedback.Get.Parameters.Path;
|
|
4
|
+
export type Response = Awaited<ReturnType<MittwaldAPIV2Client["user"]["listFeedback"]>>;
|
|
5
|
+
export declare abstract class GeneratedUserListFeedback<TItem extends Record<string, unknown>> extends ListBaseCommand<typeof GeneratedUserListFeedback, TItem, Response> {
|
|
6
|
+
static description: string;
|
|
7
|
+
static args: {};
|
|
8
|
+
static flags: {
|
|
9
|
+
"user-id": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
10
|
+
};
|
|
11
|
+
getData(): Promise<Response>;
|
|
12
|
+
protected mapParams(input: PathParams): Promise<PathParams> | PathParams;
|
|
13
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Flags } from "@oclif/core";
|
|
2
|
+
import { ListBaseCommand } from "../../ListBaseCommand.js";
|
|
3
|
+
export class GeneratedUserListFeedback extends ListBaseCommand {
|
|
4
|
+
static description = "Submitted feedback of the given user.";
|
|
5
|
+
static args = {};
|
|
6
|
+
static flags = {
|
|
7
|
+
...ListBaseCommand.baseFlags,
|
|
8
|
+
"user-id": Flags.string({
|
|
9
|
+
description: "`self` or the id of a user.",
|
|
10
|
+
required: true,
|
|
11
|
+
}),
|
|
12
|
+
};
|
|
13
|
+
async getData() {
|
|
14
|
+
const pathParams = {
|
|
15
|
+
userId: this.flags["user-id"],
|
|
16
|
+
};
|
|
17
|
+
return await this.apiClient.user.listFeedback({
|
|
18
|
+
pathParameters: await this.mapParams(pathParams),
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
mapParams(input) {
|
|
22
|
+
return input;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
2
|
+
import { ListBaseCommand } from "../../ListBaseCommand.js";
|
|
3
|
+
export type PathParams = MittwaldAPIV2.Paths.V2UsersSelfSessions.Get.Parameters.Path;
|
|
4
|
+
export type Response = Awaited<ReturnType<MittwaldAPIV2Client["user"]["listSessions"]>>;
|
|
5
|
+
export declare abstract class GeneratedUserListSessions<TItem extends Record<string, unknown>> extends ListBaseCommand<typeof GeneratedUserListSessions, TItem, Response> {
|
|
6
|
+
static description: string;
|
|
7
|
+
static args: {};
|
|
8
|
+
static flags: {
|
|
9
|
+
[x: string]: import("@oclif/core/lib/interfaces/parser.js").CompletableFlag<any>;
|
|
10
|
+
};
|
|
11
|
+
getData(): Promise<Response>;
|
|
12
|
+
protected mapParams(input: PathParams): Promise<PathParams> | PathParams;
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ListBaseCommand } from "../../ListBaseCommand.js";
|
|
2
|
+
export class GeneratedUserListSessions extends ListBaseCommand {
|
|
3
|
+
static description = "List all active sessions";
|
|
4
|
+
static args = {};
|
|
5
|
+
static flags = {
|
|
6
|
+
...ListBaseCommand.baseFlags,
|
|
7
|
+
};
|
|
8
|
+
async getData() {
|
|
9
|
+
const pathParams = {};
|
|
10
|
+
return await this.apiClient.user.listSessions({
|
|
11
|
+
pathParameters: await this.mapParams(pathParams),
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
mapParams(input) {
|
|
15
|
+
return input;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
2
|
+
import { ListBaseCommand } from "../../ListBaseCommand.js";
|
|
3
|
+
export type PathParams = MittwaldAPIV2.Paths.V2UsersSelfSshKeys.Get.Parameters.Path;
|
|
4
|
+
export type Response = Awaited<ReturnType<MittwaldAPIV2Client["user"]["listSshKeys"]>>;
|
|
5
|
+
export declare abstract class GeneratedUserListSshKeys<TItem extends Record<string, unknown>> extends ListBaseCommand<typeof GeneratedUserListSshKeys, TItem, Response> {
|
|
6
|
+
static description: string;
|
|
7
|
+
static args: {};
|
|
8
|
+
static flags: {
|
|
9
|
+
[x: string]: import("@oclif/core/lib/interfaces/parser.js").CompletableFlag<any>;
|
|
10
|
+
};
|
|
11
|
+
getData(): Promise<Response>;
|
|
12
|
+
protected mapParams(input: PathParams): Promise<PathParams> | PathParams;
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ListBaseCommand } from "../../ListBaseCommand.js";
|
|
2
|
+
export class GeneratedUserListSshKeys extends ListBaseCommand {
|
|
3
|
+
static description = "Get your stored ssh keys";
|
|
4
|
+
static args = {};
|
|
5
|
+
static flags = {
|
|
6
|
+
...ListBaseCommand.baseFlags,
|
|
7
|
+
};
|
|
8
|
+
async getData() {
|
|
9
|
+
const pathParams = {};
|
|
10
|
+
return await this.apiClient.user.listSshKeys({
|
|
11
|
+
pathParameters: await this.mapParams(pathParams),
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
mapParams(input) {
|
|
15
|
+
return input;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
2
|
+
export declare function getAppUuidFromAppName(apiClient: MittwaldAPIV2Client, softwareName: string): Promise<string>;
|
|
3
|
+
export declare function getAppNameFromUuid(apiClient: MittwaldAPIV2Client, uuid: string): Promise<string>;
|
|
4
|
+
export declare function getAppVersionFromUuid(apiClient: MittwaldAPIV2Client, appId: string, appVersionId: string): Promise<string>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { assertStatus } from "@mittwald/api-client-commons";
|
|
2
|
+
import { isUuid } from "../../Helpers.js";
|
|
3
|
+
// Get App UUID from App Name
|
|
4
|
+
export async function getAppUuidFromAppName(apiClient, softwareName) {
|
|
5
|
+
const apps = await apiClient.app.listApps();
|
|
6
|
+
assertStatus(apps, 200);
|
|
7
|
+
const foundApp = apps.data.find((item) => {
|
|
8
|
+
return (item.name.toLowerCase().replace(/[!. ]/g, "") ===
|
|
9
|
+
softwareName.toLowerCase().replace(/[!. ]/g, ""));
|
|
10
|
+
});
|
|
11
|
+
if (foundApp) {
|
|
12
|
+
return foundApp.id;
|
|
13
|
+
}
|
|
14
|
+
throw new Error("Access Denied.");
|
|
15
|
+
}
|
|
16
|
+
// Get App Human readable Name from App UUID
|
|
17
|
+
export async function getAppNameFromUuid(apiClient, uuid) {
|
|
18
|
+
if (!isUuid(uuid)) {
|
|
19
|
+
throw new Error("Given UUID not valid.");
|
|
20
|
+
}
|
|
21
|
+
const apps = await apiClient.app.listApps();
|
|
22
|
+
assertStatus(apps, 200);
|
|
23
|
+
const foundApp = apps.data.find((item) => {
|
|
24
|
+
return item.id === uuid;
|
|
25
|
+
});
|
|
26
|
+
if (foundApp) {
|
|
27
|
+
return foundApp.name;
|
|
28
|
+
}
|
|
29
|
+
throw new Error("App not found.");
|
|
30
|
+
}
|
|
31
|
+
// Get App Human Readable Version from App Version
|
|
32
|
+
export async function getAppVersionFromUuid(apiClient, appId, appVersionId) {
|
|
33
|
+
if (!isUuid(appId) && !isUuid(appVersionId)) {
|
|
34
|
+
throw new Error("Given UUID not valid.");
|
|
35
|
+
}
|
|
36
|
+
const appVersion = await apiClient.app.getAppversion({
|
|
37
|
+
pathParameters: { appId: appId, appVersionId: appVersionId },
|
|
38
|
+
});
|
|
39
|
+
if (appVersion.data.externalVersion) {
|
|
40
|
+
return appVersion.data.externalVersion;
|
|
41
|
+
}
|
|
42
|
+
throw new Error("AppVersion not found.");
|
|
43
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { MittwaldAPIV2, MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
2
|
+
type AppVersion = MittwaldAPIV2.Components.Schemas.AppAppVersion;
|
|
3
|
+
export declare function getLatestAvailableAppVersionForApp(apiClient: MittwaldAPIV2Client, appId: string): Promise<AppVersion | undefined>;
|
|
4
|
+
export declare function getAppVersionUuidFromAppVersion(apiClient: MittwaldAPIV2Client, appId: string, appVersion: string | undefined): Promise<AppVersion | undefined>;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { assertStatus } from "@mittwald/api-client-commons";
|
|
2
|
+
import { gt } from "semver";
|
|
3
|
+
// Get latest available Internal App Version for App UUID
|
|
4
|
+
export async function getLatestAvailableAppVersionForApp(apiClient, appId) {
|
|
5
|
+
const versions = await apiClient.app.listAppversions({
|
|
6
|
+
pathParameters: {
|
|
7
|
+
appId,
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
assertStatus(versions, 200);
|
|
11
|
+
if (versions.data.length === 0) {
|
|
12
|
+
return undefined;
|
|
13
|
+
}
|
|
14
|
+
let latestVersion = "0.0.0";
|
|
15
|
+
for (const version of versions.data) {
|
|
16
|
+
if (gt(version.internalVersion, latestVersion)) {
|
|
17
|
+
latestVersion = version.internalVersion;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return versions.data.find((item) => item.internalVersion === latestVersion);
|
|
21
|
+
}
|
|
22
|
+
// App Version UUID from App Version irellevant if internal or external
|
|
23
|
+
export async function getAppVersionUuidFromAppVersion(apiClient, appId, appVersion) {
|
|
24
|
+
const versions = await apiClient.app.listAppversions({
|
|
25
|
+
pathParameters: {
|
|
26
|
+
appId,
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
if (!appVersion) {
|
|
30
|
+
return getLatestAvailableAppVersionForApp(apiClient, appId);
|
|
31
|
+
}
|
|
32
|
+
assertStatus(versions, 200);
|
|
33
|
+
return versions.data.find((item) => item.internalVersion === appVersion ||
|
|
34
|
+
item.externalVersion === appVersion);
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function parseBytes(input: string): number;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export function parseBytes(input) {
|
|
2
|
+
const numeric = parseInt(input.replace(/[^0-9]/g, ""), 10);
|
|
3
|
+
if (`${numeric}` == input) {
|
|
4
|
+
return numeric;
|
|
5
|
+
}
|
|
6
|
+
if (input.toLowerCase().endsWith("gi")) {
|
|
7
|
+
return numeric * (1 << 30);
|
|
8
|
+
}
|
|
9
|
+
if (input.toLowerCase().endsWith("mi")) {
|
|
10
|
+
return numeric * (1 << 20);
|
|
11
|
+
}
|
|
12
|
+
if (input.toLowerCase().endsWith("ki")) {
|
|
13
|
+
return numeric * (1 << 10);
|
|
14
|
+
}
|
|
15
|
+
throw new Error("unsupported byte unit; supported are 'gi', 'mi', 'ki'");
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Config } from "@oclif/core";
|
|
2
|
+
export declare class Context {
|
|
3
|
+
private readonly config;
|
|
4
|
+
private readonly contextData;
|
|
5
|
+
constructor(config: Config);
|
|
6
|
+
private initializeContextData;
|
|
7
|
+
private persist;
|
|
8
|
+
private setContextValue;
|
|
9
|
+
getContextValue(key: string): Promise<string | undefined>;
|
|
10
|
+
setProjectId: (id: string) => Promise<void>;
|
|
11
|
+
setServerId: (id: string) => Promise<void>;
|
|
12
|
+
setOrgId: (id: string) => Promise<void>;
|
|
13
|
+
projectId: () => Promise<string | undefined>;
|
|
14
|
+
serverId: () => Promise<string | undefined>;
|
|
15
|
+
orgId: () => Promise<string | undefined>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as fs from "fs/promises";
|
|
2
|
+
import * as path from "path";
|
|
3
|
+
export class Context {
|
|
4
|
+
config;
|
|
5
|
+
contextData;
|
|
6
|
+
constructor(config) {
|
|
7
|
+
this.config = config;
|
|
8
|
+
this.contextData = this.initializeContextData();
|
|
9
|
+
}
|
|
10
|
+
async initializeContextData() {
|
|
11
|
+
try {
|
|
12
|
+
const contents = await fs.readFile(path.join(this.config.configDir, "context.json"), "utf-8");
|
|
13
|
+
return JSON.parse(contents);
|
|
14
|
+
}
|
|
15
|
+
catch (e) {
|
|
16
|
+
if (e instanceof Error && "code" in e && e.code === "ENOENT") {
|
|
17
|
+
return {};
|
|
18
|
+
}
|
|
19
|
+
throw e;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
async persist(data) {
|
|
23
|
+
await fs.writeFile(path.join(this.config.configDir, "context.json"), JSON.stringify(data), "utf-8");
|
|
24
|
+
}
|
|
25
|
+
async setContextValue(key, value) {
|
|
26
|
+
const data = await this.contextData;
|
|
27
|
+
return await this.persist({ ...data, [key]: value });
|
|
28
|
+
}
|
|
29
|
+
async getContextValue(key) {
|
|
30
|
+
const data = await this.contextData;
|
|
31
|
+
if (key in data) {
|
|
32
|
+
return data[key];
|
|
33
|
+
}
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
setProjectId = (id) => this.setContextValue("project-id", id);
|
|
37
|
+
setServerId = (id) => this.setContextValue("server-id", id);
|
|
38
|
+
setOrgId = (id) => this.setContextValue("org-id", id);
|
|
39
|
+
projectId = () => this.getContextValue("project-id");
|
|
40
|
+
serverId = () => this.getContextValue("server-id");
|
|
41
|
+
orgId = () => this.getContextValue("org-id");
|
|
42
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Config } from "@oclif/core";
|
|
2
|
+
import { Arg, ArgOutput, FlagOutput, OptionFlag } from "@oclif/core/lib/interfaces/parser.js";
|
|
3
|
+
import { MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
4
|
+
import { AlphabetLowercase } from "@oclif/core/lib/interfaces/index.js";
|
|
5
|
+
type ContextFlags = {
|
|
6
|
+
[k: string]: OptionFlag<unknown>;
|
|
7
|
+
};
|
|
8
|
+
type ContextArgs = {
|
|
9
|
+
[k: string]: Arg<unknown>;
|
|
10
|
+
};
|
|
11
|
+
export type FlagSet = {
|
|
12
|
+
flags: ContextFlags;
|
|
13
|
+
args: ContextArgs;
|
|
14
|
+
withId: (apiClient: MittwaldAPIV2Client, flags: FlagOutput, args: ArgOutput, cfg: Config) => Promise<string>;
|
|
15
|
+
};
|
|
16
|
+
export type NormalizeFn = (apiClient: MittwaldAPIV2Client, id: string) => string | Promise<string>;
|
|
17
|
+
export declare function makeFlagSet(name: string, char: AlphabetLowercase, normalize?: NormalizeFn): FlagSet;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Args, Flags } from "@oclif/core";
|
|
2
|
+
import { Context } from "./context.js";
|
|
3
|
+
export function makeFlagSet(name, char, normalize = (_, id) => id) {
|
|
4
|
+
const flagName = `${name}-id`;
|
|
5
|
+
const flags = {
|
|
6
|
+
[flagName]: Flags.string({
|
|
7
|
+
char,
|
|
8
|
+
required: false,
|
|
9
|
+
description: `ID or short ID of a ${name}; this flag is optional if a default ${name} is set in the context`,
|
|
10
|
+
}),
|
|
11
|
+
};
|
|
12
|
+
const args = {
|
|
13
|
+
[flagName]: Args.string({
|
|
14
|
+
description: `ID or short ID of a ${name}; this argument is optional if a default ${name} is set in the context`,
|
|
15
|
+
}),
|
|
16
|
+
};
|
|
17
|
+
const idFromArgsOrFlag = (flags, args) => {
|
|
18
|
+
if (args[flagName]) {
|
|
19
|
+
return args[flagName];
|
|
20
|
+
}
|
|
21
|
+
if (flags[flagName]) {
|
|
22
|
+
return flags[flagName];
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
};
|
|
26
|
+
const withId = async (apiClient, flags, args, cfg) => {
|
|
27
|
+
const idInput = idFromArgsOrFlag(flags, args);
|
|
28
|
+
if (idInput) {
|
|
29
|
+
return normalize(apiClient, idInput);
|
|
30
|
+
}
|
|
31
|
+
const idFromContext = await new Context(cfg).getContextValue(flagName);
|
|
32
|
+
if (idFromContext) {
|
|
33
|
+
return idFromContext;
|
|
34
|
+
}
|
|
35
|
+
throw new Error(`No ${name} ID given. Please specify one with --${flagName} or set a default server with 'mittwald context set --${flagName} <${flagName}>'`);
|
|
36
|
+
};
|
|
37
|
+
return {
|
|
38
|
+
flags,
|
|
39
|
+
args,
|
|
40
|
+
withId,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const messageFlags: {
|
|
2
|
+
message: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
3
|
+
"message-from": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
4
|
+
editor: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
5
|
+
};
|
|
6
|
+
export declare function retrieveMessage(flags: {
|
|
7
|
+
message?: string;
|
|
8
|
+
"message-from"?: string;
|
|
9
|
+
editor: string;
|
|
10
|
+
}): Promise<string | undefined>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Flags } from "@oclif/core";
|
|
2
|
+
import * as fs from "fs";
|
|
3
|
+
import * as cp from "child_process";
|
|
4
|
+
import tempfile from "tempfile";
|
|
5
|
+
export const messageFlags = {
|
|
6
|
+
message: Flags.string({
|
|
7
|
+
description: "The body of the message to send; if neither this nor --message-from is given, an editor will be opened to enter the message.",
|
|
8
|
+
exclusive: ["message-from"],
|
|
9
|
+
}),
|
|
10
|
+
"message-from": Flags.string({
|
|
11
|
+
description: "A file from which to read the message to send; may be '-' to read from stdin. If neither this nor --message is given, an editor will be opened to enter the message.",
|
|
12
|
+
exclusive: ["message"],
|
|
13
|
+
}),
|
|
14
|
+
editor: Flags.string({
|
|
15
|
+
description: "The editor to use when opening the message for editing; will respect your EDITOR environment variable, and fall back on 'vim' if that is not set.",
|
|
16
|
+
default: process.env.EDITOR || "vim",
|
|
17
|
+
}),
|
|
18
|
+
};
|
|
19
|
+
export async function retrieveMessage(flags) {
|
|
20
|
+
if (flags.message) {
|
|
21
|
+
return flags.message;
|
|
22
|
+
}
|
|
23
|
+
if (flags["message-from"]) {
|
|
24
|
+
if (flags["message-from"] === "-") {
|
|
25
|
+
// Needs to be "readFileSync" because (according to the typings, at least)
|
|
26
|
+
// only that supports reading directly from an open file descriptor.
|
|
27
|
+
// Ding, ding.
|
|
28
|
+
return fs.readFileSync(process.stdin.fd, "utf-8");
|
|
29
|
+
}
|
|
30
|
+
return fs.readFileSync(flags["message-from"], "utf-8");
|
|
31
|
+
}
|
|
32
|
+
return retrieveMessageFromEditor(flags.editor);
|
|
33
|
+
}
|
|
34
|
+
async function retrieveMessageFromEditor(editor) {
|
|
35
|
+
const tmp = tempfile({ extension: ".md" });
|
|
36
|
+
try {
|
|
37
|
+
let args = [tmp];
|
|
38
|
+
if (editor === "vim") {
|
|
39
|
+
args = ["-c", "syntax on", "-c", "set filetype=markdown", ...args];
|
|
40
|
+
}
|
|
41
|
+
cp.spawnSync(editor, args, {
|
|
42
|
+
stdio: "inherit",
|
|
43
|
+
});
|
|
44
|
+
return fs.readFileSync(tmp, "utf-8");
|
|
45
|
+
}
|
|
46
|
+
finally {
|
|
47
|
+
fs.unlinkSync(tmp);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { OclifError, PrettyPrintableError } from "@oclif/core/lib/interfaces/index.js";
|
|
2
|
+
import { ApiClientError, AxiosResponse } from "@mittwald/api-client-commons";
|
|
3
|
+
import { MittwaldAPIV2 } from "@mittwald/api-client";
|
|
4
|
+
import CommonsValidationErrors = MittwaldAPIV2.Components.Schemas.CommonsValidationErrors;
|
|
5
|
+
export declare const handleError: (error: Error & Partial<PrettyPrintableError> & Partial<OclifError> & {
|
|
6
|
+
skipOclifErrorHandling?: boolean;
|
|
7
|
+
}) => void;
|
|
8
|
+
export declare function isUnexpectedError(err: unknown): boolean;
|
|
9
|
+
export declare function isValidationError(err: unknown): err is ApiClientError<CommonsValidationErrors> & {
|
|
10
|
+
response: AxiosResponse<CommonsValidationErrors>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import oclif from "@oclif/core";
|
|
2
|
+
import { ApiClientError } from "@mittwald/api-client-commons";
|
|
3
|
+
export const handleError = (error) => {
|
|
4
|
+
if (!isUnexpectedError(error)) {
|
|
5
|
+
process.exit(1);
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
if (error instanceof ApiClientError) {
|
|
9
|
+
const responseJson = JSON.stringify(error.response?.data, undefined, 2);
|
|
10
|
+
const errorMessage = `\
|
|
11
|
+
${error.message}
|
|
12
|
+
|
|
13
|
+
Response:
|
|
14
|
+
─────────
|
|
15
|
+
${responseJson}`;
|
|
16
|
+
error = new Error(errorMessage, {
|
|
17
|
+
cause: error,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
oclif.Errors.handle(error);
|
|
21
|
+
};
|
|
22
|
+
export function isUnexpectedError(err) {
|
|
23
|
+
return !isValidationError(err);
|
|
24
|
+
}
|
|
25
|
+
export function isValidationError(err) {
|
|
26
|
+
return (err instanceof ApiClientError &&
|
|
27
|
+
err.response?.data?.type === "ValidationError");
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const mergeObjects: <T1, T2>(obj1: T1, obj2: T2) => T1 & T2;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const orgFlags: {
|
|
2
|
+
[k: string]: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<unknown>;
|
|
3
|
+
}, orgArgs: {
|
|
4
|
+
[k: string]: import("@oclif/core/lib/interfaces/parser.js").Arg<unknown>;
|
|
5
|
+
}, withOrgId: (apiClient: import("@mittwald/api-client").MittwaldAPIV2Client, flags: import("@oclif/core/lib/interfaces/parser.js").FlagOutput, args: import("@oclif/core/lib/interfaces/parser.js").ArgOutput, cfg: import("@oclif/core").Config) => Promise<string>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const projectFlags: {
|
|
2
|
+
[k: string]: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<unknown>;
|
|
3
|
+
}, projectArgs: {
|
|
4
|
+
[k: string]: import("@oclif/core/lib/interfaces/parser.js").Arg<unknown>;
|
|
5
|
+
}, withProjectId: (apiClient: import("@mittwald/api-client").MittwaldAPIV2Client, flags: import("@oclif/core/lib/interfaces/parser.js").FlagOutput, args: import("@oclif/core/lib/interfaces/parser.js").ArgOutput, cfg: import("@oclif/core").Config) => Promise<string>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const serverFlags: {
|
|
2
|
+
[k: string]: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<unknown>;
|
|
3
|
+
}, serverArgs: {
|
|
4
|
+
[k: string]: import("@oclif/core/lib/interfaces/parser.js").Arg<unknown>;
|
|
5
|
+
}, withServerId: (apiClient: import("@mittwald/api-client").MittwaldAPIV2Client, flags: import("@oclif/core/lib/interfaces/parser.js").FlagOutput, args: import("@oclif/core/lib/interfaces/parser.js").ArgOutput, cfg: import("@oclif/core").Config) => Promise<string>;
|