@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,15 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Header } from "./Header.js";
|
|
3
|
+
import { Box, Text } from "ink";
|
|
4
|
+
export function SingleResultTable({ rows }) {
|
|
5
|
+
const maxColumnWidth = Object.keys(rows)
|
|
6
|
+
.map((r) => r.length)
|
|
7
|
+
.reduce((a, b) => Math.max(a, b), 0);
|
|
8
|
+
const renderedRows = Object.keys(rows).map((key, idx) => {
|
|
9
|
+
return (_jsxs(Box, { flexDirection: "row", children: [_jsx(Box, { width: maxColumnWidth + 3, children: _jsx(Text, { children: key }) }), _jsx(Box, { children: rows[key] })] }, idx));
|
|
10
|
+
});
|
|
11
|
+
return _jsx(Box, { flexDirection: "column", children: renderedRows });
|
|
12
|
+
}
|
|
13
|
+
export function SingleResult({ title, rows }) {
|
|
14
|
+
return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Box, { marginY: 1, children: _jsx(Header, { title: title }) }), _jsx(SingleResultTable, { rows: rows })] }));
|
|
15
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from "ink";
|
|
3
|
+
export const Success = (props) => {
|
|
4
|
+
const { title = "Success", color = "#00B785", width = 80 } = props;
|
|
5
|
+
return (_jsxs(Box, { width: width, borderStyle: "round", borderColor: color, flexDirection: "column", paddingX: 2, children: [_jsx(Text, { bold: true, underline: true, color: color, children: title.toUpperCase() }), _jsx(Text, { wrap: "wrap", color: color, children: props.children })] }));
|
|
6
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { CellLayout } from "./CellLayout.js";
|
|
3
|
+
import { CellData } from "./CellData.js";
|
|
4
|
+
export const BodyCell = (props) => {
|
|
5
|
+
const { cell } = props;
|
|
6
|
+
return (_jsx(CellLayout, { col: cell.column, children: _jsx(CellData, { data: cell.getData() }) }));
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { BodyCell } from "./BodyCell.js";
|
|
3
|
+
import { RowLayout } from "./RowLayout.js";
|
|
4
|
+
export const BodyRow = (props) => {
|
|
5
|
+
const { row } = props;
|
|
6
|
+
return (_jsx(RowLayout, { children: row.table.columns.map((col) => (_jsx(BodyCell, { cell: row.getCell(col.name) }, col.name.value))) }));
|
|
7
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { BodyRow } from "./BodyRow.js";
|
|
3
|
+
export const BodyRows = (props) => {
|
|
4
|
+
const { table } = props;
|
|
5
|
+
return (_jsx(_Fragment, { children: table.rows.map((row) => (_jsx(BodyRow, { row: row }, row.index))) }));
|
|
6
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { isValidElement } from "react";
|
|
3
|
+
import { FormattedDate } from "../FormattedDate.js";
|
|
4
|
+
import { JSONView } from "../JSONView.js";
|
|
5
|
+
import { parseDate } from "../../../../lib/viewhelpers/date.js";
|
|
6
|
+
import { Value } from "../Value.js";
|
|
7
|
+
export const CellData = (props) => {
|
|
8
|
+
const { data } = props;
|
|
9
|
+
if (data === null || data === undefined) {
|
|
10
|
+
return _jsx(Value, { notSet: true });
|
|
11
|
+
}
|
|
12
|
+
if (isValidElement(data)) {
|
|
13
|
+
return data;
|
|
14
|
+
}
|
|
15
|
+
if (data instanceof Date) {
|
|
16
|
+
return _jsx(FormattedDate, { date: data, relative: true });
|
|
17
|
+
}
|
|
18
|
+
if (typeof data === "string") {
|
|
19
|
+
const date = parseDate(data);
|
|
20
|
+
if (date) {
|
|
21
|
+
return _jsx(FormattedDate, { relative: true, date: data });
|
|
22
|
+
}
|
|
23
|
+
return data;
|
|
24
|
+
}
|
|
25
|
+
if (typeof data === "object") {
|
|
26
|
+
return _jsx(JSONView, { inline: true, json: data });
|
|
27
|
+
}
|
|
28
|
+
if (typeof data === "boolean") {
|
|
29
|
+
return data ? "yes" : "no";
|
|
30
|
+
}
|
|
31
|
+
return "";
|
|
32
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as Model from "./model/index.js";
|
|
2
|
+
import { Box } from "ink";
|
|
3
|
+
import { ComponentProps, FC, PropsWithChildren } from "react";
|
|
4
|
+
interface Props extends ComponentProps<typeof Box> {
|
|
5
|
+
col: Model.Column;
|
|
6
|
+
}
|
|
7
|
+
export declare const CellLayout: FC<PropsWithChildren<Props>>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from "ink";
|
|
3
|
+
import { MeasureChildren } from "../../measure/MeasureChildren.js";
|
|
4
|
+
import { WithoutLineBreaks } from "../WithoutLineBreaks.js";
|
|
5
|
+
import { useTableContext } from "./context.js";
|
|
6
|
+
export const CellLayout = (props) => {
|
|
7
|
+
const { col, children, ...boxProps } = props;
|
|
8
|
+
const { setup } = useTableContext();
|
|
9
|
+
const { noTruncate } = setup;
|
|
10
|
+
const width = col.useWidth();
|
|
11
|
+
const minWidth = col.options.minWidth;
|
|
12
|
+
if (!col.options.isVisible) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
const wrap = noTruncate ? "wrap" : "truncate";
|
|
16
|
+
return (_jsx(Box, { width: width, minWidth: minWidth, ...boxProps, children: _jsx(MeasureChildren, { onDimensionChange: (dim) => col.onCellMeasured(dim), children: _jsx(Text, { wrap: wrap, children: _jsx(WithoutLineBreaks, { children: children }) }) }) }));
|
|
17
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Text } from "ink";
|
|
3
|
+
import { CellLayout } from "./CellLayout.js";
|
|
4
|
+
export const HeaderCell = (props) => {
|
|
5
|
+
const { col } = props;
|
|
6
|
+
return (_jsx(CellLayout, { col: col, borderStyle: "single", borderTop: false, borderLeft: false, borderRight: false, children: _jsx(Text, { bold: true, children: col.options.header ?? col.name.humanizedName }) }));
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { RowLayout } from "./RowLayout.js";
|
|
3
|
+
import { HeaderCell } from "./HeaderCell.js";
|
|
4
|
+
export const HeaderRow = (props) => {
|
|
5
|
+
const { table, ...boxProps } = props;
|
|
6
|
+
return (_jsx(RowLayout, { ...boxProps, children: table.columns.map((col) => (_jsx(HeaderCell, { col: col }, col.name.value))) }));
|
|
7
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TableColumnsInput } from "./model/index.js";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
import { TableRenderSetupOutput } from "../../../setup/TableRenderSetup.js";
|
|
4
|
+
interface Props<TData> {
|
|
5
|
+
data: TData[];
|
|
6
|
+
setup: TableRenderSetupOutput;
|
|
7
|
+
columns?: TableColumnsInput<TData>;
|
|
8
|
+
}
|
|
9
|
+
export declare function Table<TData>(props: Props<TData>): ReactNode;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as Model from "./model/index.js";
|
|
3
|
+
import { useRef } from "react";
|
|
4
|
+
import { Box } from "ink";
|
|
5
|
+
import { useRenderContext } from "../../context.js";
|
|
6
|
+
import { RenderJson } from "../../json/RenderJson.js";
|
|
7
|
+
import { MeasureContextProvider } from "../../measure/MeasureContextProvider.js";
|
|
8
|
+
import { HeaderRow } from "./HeaderRow.js";
|
|
9
|
+
import { BodyRows } from "./BodyRows.js";
|
|
10
|
+
import { buildTableContext, TableContextProvider } from "./context.js";
|
|
11
|
+
export function Table(props) {
|
|
12
|
+
const { data, columns, setup } = props;
|
|
13
|
+
const { renderAsJson } = useRenderContext();
|
|
14
|
+
if (renderAsJson) {
|
|
15
|
+
return _jsx(RenderJson, { name: "data", data: data });
|
|
16
|
+
}
|
|
17
|
+
const table = useRef(new Model.Table(data, setup, columns)).current;
|
|
18
|
+
return (_jsx(TableContextProvider, { value: buildTableContext({
|
|
19
|
+
setup,
|
|
20
|
+
}), children: _jsx(MeasureContextProvider, { children: _jsxs(Box, { flexDirection: "column", children: [_jsx(HeaderRow, { marginBottom: 1, table: table }), _jsx(BodyRows, { table: table })] }) }) }));
|
|
21
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TableRenderSetupOutput } from "../../../setup/TableRenderSetup.js";
|
|
3
|
+
interface TableContext {
|
|
4
|
+
setup: TableRenderSetupOutput;
|
|
5
|
+
}
|
|
6
|
+
export declare const buildTableContext: (ctx?: Partial<TableContext>) => TableContext;
|
|
7
|
+
export declare const useTableContext: () => TableContext;
|
|
8
|
+
export declare const TableContextProvider: import("react").Provider<TableContext>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createContext, useContext } from "react";
|
|
2
|
+
export const buildTableContext = (ctx = {}) => ({
|
|
3
|
+
...ctx,
|
|
4
|
+
});
|
|
5
|
+
const context = createContext(buildTableContext());
|
|
6
|
+
export const useTableContext = () => useContext(context);
|
|
7
|
+
export const TableContextProvider = context.Provider;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Table } from "./Table.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Table } from "./Table.js";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Row } from "./Row.js";
|
|
2
|
+
import { Column } from "./Column.js";
|
|
3
|
+
import { ColumnName } from "./ColumnName.js";
|
|
4
|
+
export type TableCellMapper<T> = (data: T) => string;
|
|
5
|
+
export interface CellDataObject<T> {
|
|
6
|
+
name: string;
|
|
7
|
+
data: T;
|
|
8
|
+
mapper?: TableCellMapper<T>;
|
|
9
|
+
}
|
|
10
|
+
export declare class Cell<T = unknown> {
|
|
11
|
+
readonly name: ColumnName;
|
|
12
|
+
private readonly data;
|
|
13
|
+
readonly row: Row;
|
|
14
|
+
private constructor();
|
|
15
|
+
static fromObject<T>(row: Row, object: CellDataObject<T>): Cell<T>;
|
|
16
|
+
static empty(row: Row, name: string): Cell<undefined>;
|
|
17
|
+
get column(): Column;
|
|
18
|
+
getData(): unknown;
|
|
19
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ColumnName } from "./ColumnName.js";
|
|
2
|
+
export class Cell {
|
|
3
|
+
name;
|
|
4
|
+
data;
|
|
5
|
+
row;
|
|
6
|
+
constructor(row, name, data) {
|
|
7
|
+
this.row = row;
|
|
8
|
+
this.name = new ColumnName(name);
|
|
9
|
+
this.data = data;
|
|
10
|
+
}
|
|
11
|
+
static fromObject(row, object) {
|
|
12
|
+
return new Cell(row, object.name, object.data);
|
|
13
|
+
}
|
|
14
|
+
static empty(row, name) {
|
|
15
|
+
return new Cell(row, name, undefined);
|
|
16
|
+
}
|
|
17
|
+
get column() {
|
|
18
|
+
return this.row.table.getColumn(this.name);
|
|
19
|
+
}
|
|
20
|
+
getData() {
|
|
21
|
+
const renderer = this.column.options.cellRenderer;
|
|
22
|
+
return renderer ? renderer(this.row.data) : this.data;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ObservableValue } from "../../../lib/observable-value/ObservableValue.js";
|
|
2
|
+
import { Table } from "./Table.js";
|
|
3
|
+
import { Dimension } from "../../../measure/context.js";
|
|
4
|
+
import { ColumnOptions, ColumnOptionsInput } from "./ColumnOptions.js";
|
|
5
|
+
import { ColumnName } from "./ColumnName.js";
|
|
6
|
+
export declare class Column {
|
|
7
|
+
readonly table: Table;
|
|
8
|
+
readonly name: ColumnName;
|
|
9
|
+
readonly options: ColumnOptions;
|
|
10
|
+
readonly maxCellWidth: ObservableValue<number>;
|
|
11
|
+
private readonly proportionalWidth;
|
|
12
|
+
constructor(table: Table, name: string, optionsInput?: ColumnOptionsInput<any>);
|
|
13
|
+
private updateProportionalWidth;
|
|
14
|
+
onCellMeasured(dimension: Dimension): void;
|
|
15
|
+
useWidth(): string;
|
|
16
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ObservableValue } from "../../../lib/observable-value/ObservableValue.js";
|
|
2
|
+
import { ColumnOptions } from "./ColumnOptions.js";
|
|
3
|
+
import { ColumnName } from "./ColumnName.js";
|
|
4
|
+
import { useWatchObservableValue } from "../../../lib/observable-value/useWatchObservableValue.js";
|
|
5
|
+
import { getTerminalWidth } from "../../../../lib/getTerminalWidth.js";
|
|
6
|
+
export class Column {
|
|
7
|
+
table;
|
|
8
|
+
name;
|
|
9
|
+
options;
|
|
10
|
+
maxCellWidth = new ObservableValue(0);
|
|
11
|
+
proportionalWidth = new ObservableValue("0%");
|
|
12
|
+
constructor(table, name, optionsInput) {
|
|
13
|
+
this.table = table;
|
|
14
|
+
this.name = new ColumnName(name);
|
|
15
|
+
this.table.overallWidth.observe((width) => this.updateProportionalWidth(width));
|
|
16
|
+
this.options = new ColumnOptions(this, optionsInput);
|
|
17
|
+
}
|
|
18
|
+
updateProportionalWidth(overallWidth) {
|
|
19
|
+
const thisWidth = this.maxCellWidth.value;
|
|
20
|
+
const quotient = thisWidth / overallWidth;
|
|
21
|
+
const percentage = Math.round(quotient * 100);
|
|
22
|
+
this.proportionalWidth.updateValue(`${percentage}%`);
|
|
23
|
+
}
|
|
24
|
+
onCellMeasured(dimension) {
|
|
25
|
+
const termWidth = getTerminalWidth();
|
|
26
|
+
const boundary = Math.round(termWidth / 2);
|
|
27
|
+
const boundedWidth = Math.min(dimension.width, boundary);
|
|
28
|
+
if (this.maxCellWidth.value < boundedWidth) {
|
|
29
|
+
this.maxCellWidth.updateValue(boundedWidth);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
useWidth() {
|
|
33
|
+
return useWatchObservableValue(this.proportionalWidth);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import humanizeString from "humanize-string";
|
|
2
|
+
export class ColumnName {
|
|
3
|
+
value;
|
|
4
|
+
constructor(value) {
|
|
5
|
+
this.value = value;
|
|
6
|
+
}
|
|
7
|
+
matches(name) {
|
|
8
|
+
return (this.value.toLowerCase().trim() ===
|
|
9
|
+
ColumnName.getNameValue(name).toLowerCase().trim());
|
|
10
|
+
}
|
|
11
|
+
get humanizedName() {
|
|
12
|
+
return humanizeString(this.value);
|
|
13
|
+
}
|
|
14
|
+
static getNameValue(name) {
|
|
15
|
+
return name instanceof ColumnName ? name.value : name;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Column } from "./Column.js";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
type CellRenderer<TData = unknown> = (data: TData) => ReactNode;
|
|
4
|
+
export interface ColumnOptionsInput<TData = unknown> {
|
|
5
|
+
isVisible?: boolean;
|
|
6
|
+
isUuid?: boolean;
|
|
7
|
+
minWidth?: number;
|
|
8
|
+
header?: ReactNode;
|
|
9
|
+
extended?: boolean;
|
|
10
|
+
render?: CellRenderer<TData>;
|
|
11
|
+
}
|
|
12
|
+
export declare class ColumnOptions {
|
|
13
|
+
private static absoluteMinWidth;
|
|
14
|
+
readonly column: Column;
|
|
15
|
+
readonly input?: ColumnOptionsInput;
|
|
16
|
+
readonly minWidth: number;
|
|
17
|
+
readonly header?: ReactNode;
|
|
18
|
+
readonly isVisible: boolean;
|
|
19
|
+
readonly isExtended: boolean;
|
|
20
|
+
readonly cellRenderer?: CellRenderer;
|
|
21
|
+
constructor(column: Column, input?: ColumnOptionsInput);
|
|
22
|
+
private calculateMinWidth;
|
|
23
|
+
private getIsVisible;
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { getTerminalWidth } from "../../../../lib/getTerminalWidth.js";
|
|
2
|
+
export class ColumnOptions {
|
|
3
|
+
static absoluteMinWidth = 5;
|
|
4
|
+
column;
|
|
5
|
+
input;
|
|
6
|
+
minWidth;
|
|
7
|
+
header;
|
|
8
|
+
isVisible;
|
|
9
|
+
isExtended;
|
|
10
|
+
cellRenderer;
|
|
11
|
+
constructor(column, input) {
|
|
12
|
+
this.column = column;
|
|
13
|
+
this.input = input;
|
|
14
|
+
this.minWidth = this.calculateMinWidth();
|
|
15
|
+
this.header = input?.header;
|
|
16
|
+
this.isExtended = input?.extended ?? false;
|
|
17
|
+
this.isVisible = this.getIsVisible();
|
|
18
|
+
this.cellRenderer = input?.render;
|
|
19
|
+
}
|
|
20
|
+
calculateMinWidth() {
|
|
21
|
+
if (this.input?.minWidth) {
|
|
22
|
+
return this.input.minWidth;
|
|
23
|
+
}
|
|
24
|
+
if (this.input?.isUuid) {
|
|
25
|
+
return 36;
|
|
26
|
+
}
|
|
27
|
+
const termWidth = getTerminalWidth();
|
|
28
|
+
const relativeMinWidth = Math.round(termWidth / 20);
|
|
29
|
+
return Math.max(ColumnOptions.absoluteMinWidth, relativeMinWidth);
|
|
30
|
+
}
|
|
31
|
+
getIsVisible() {
|
|
32
|
+
if (this.input === undefined) {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
const { extended: extendTableOption, visibleColumns } = this.column.table.tableOptions ?? {};
|
|
36
|
+
const fulfillsExtended = !this.isExtended || extendTableOption === true;
|
|
37
|
+
const isHidden = !!visibleColumns &&
|
|
38
|
+
!visibleColumns.some((name) => this.column.name.matches(name));
|
|
39
|
+
return !isHidden && fulfillsExtended;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Cell } from "./Cell.js";
|
|
2
|
+
import { Table } from "./Table.js";
|
|
3
|
+
import { ColumnName } from "./ColumnName.js";
|
|
4
|
+
export declare class Row<T = unknown> {
|
|
5
|
+
readonly table: Table<T>;
|
|
6
|
+
readonly cells: Cell[];
|
|
7
|
+
readonly data: T;
|
|
8
|
+
readonly index: number;
|
|
9
|
+
private constructor();
|
|
10
|
+
static fromObject<T>(table: Table<T>, index: number, dataItem: T): Row<T>;
|
|
11
|
+
private buildCells;
|
|
12
|
+
getCell(name: string | ColumnName): Cell;
|
|
13
|
+
collectColumnNamesFromCells(): ColumnName[];
|
|
14
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Cell } from "./Cell.js";
|
|
2
|
+
import { ColumnName } from "./ColumnName.js";
|
|
3
|
+
export class Row {
|
|
4
|
+
table;
|
|
5
|
+
cells;
|
|
6
|
+
data;
|
|
7
|
+
index;
|
|
8
|
+
constructor(table, index, dataItem) {
|
|
9
|
+
this.table = table;
|
|
10
|
+
this.index = index;
|
|
11
|
+
this.cells = this.buildCells(dataItem);
|
|
12
|
+
this.data = dataItem;
|
|
13
|
+
}
|
|
14
|
+
static fromObject(table, index, dataItem) {
|
|
15
|
+
return new Row(table, index, dataItem);
|
|
16
|
+
}
|
|
17
|
+
buildCells(object) {
|
|
18
|
+
if (typeof object === "object" && object !== null) {
|
|
19
|
+
const entries = Object.entries(object);
|
|
20
|
+
return entries.map(([name, data]) => Cell.fromObject(this, {
|
|
21
|
+
name,
|
|
22
|
+
data,
|
|
23
|
+
}));
|
|
24
|
+
}
|
|
25
|
+
return [];
|
|
26
|
+
}
|
|
27
|
+
getCell(name) {
|
|
28
|
+
const cell = this.cells.find((c) => c.name.matches(name));
|
|
29
|
+
if (!cell) {
|
|
30
|
+
return Cell.empty(this, ColumnName.getNameValue(name));
|
|
31
|
+
}
|
|
32
|
+
return cell;
|
|
33
|
+
}
|
|
34
|
+
collectColumnNamesFromCells() {
|
|
35
|
+
return this.cells.map((cell) => cell.name);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Row } from "./Row.js";
|
|
2
|
+
import { Column } from "./Column.js";
|
|
3
|
+
import { ObservableValue } from "../../../lib/observable-value/ObservableValue.js";
|
|
4
|
+
import { ColumnOptionsInput } from "./ColumnOptions.js";
|
|
5
|
+
import { TableRenderSetupOutput } from "../../../../setup/TableRenderSetup.js";
|
|
6
|
+
import { ColumnName } from "./ColumnName.js";
|
|
7
|
+
export type TableOptions = TableRenderSetupOutput;
|
|
8
|
+
export type TableColumnsInput<TData = unknown> = Record<string, ColumnOptionsInput<TData>>;
|
|
9
|
+
export declare class Table<T = unknown> {
|
|
10
|
+
readonly rows: Row<T>[];
|
|
11
|
+
readonly columns: Column[];
|
|
12
|
+
readonly overallWidth: ObservableValue<number>;
|
|
13
|
+
readonly tableOptions?: TableOptions;
|
|
14
|
+
constructor(data: T[], tableOptions?: TableOptions, columnOptionsInput?: TableColumnsInput<T>);
|
|
15
|
+
private buildRows;
|
|
16
|
+
private handleColumnWidthChanged;
|
|
17
|
+
private buildColumns;
|
|
18
|
+
getColumn(name: ColumnName | string): Column;
|
|
19
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Row } from "./Row.js";
|
|
2
|
+
import { Column } from "./Column.js";
|
|
3
|
+
import { ObservableValue } from "../../../lib/observable-value/ObservableValue.js";
|
|
4
|
+
export class Table {
|
|
5
|
+
rows;
|
|
6
|
+
columns;
|
|
7
|
+
overallWidth = new ObservableValue(0);
|
|
8
|
+
tableOptions;
|
|
9
|
+
constructor(data, tableOptions, columnOptionsInput) {
|
|
10
|
+
this.tableOptions = Object.freeze(tableOptions);
|
|
11
|
+
this.rows = this.buildRows(data);
|
|
12
|
+
this.columns = this.buildColumns(this.rows, columnOptionsInput);
|
|
13
|
+
}
|
|
14
|
+
buildRows(data) {
|
|
15
|
+
return data.map((item, index) => Row.fromObject(this, index, item));
|
|
16
|
+
}
|
|
17
|
+
handleColumnWidthChanged() {
|
|
18
|
+
const overallWidth = this.columns.reduce((width, col) => width + col.maxCellWidth.value, 0);
|
|
19
|
+
this.overallWidth.updateValue(overallWidth);
|
|
20
|
+
}
|
|
21
|
+
buildColumns(rows, columnOptions) {
|
|
22
|
+
const columnsMap = new Map();
|
|
23
|
+
const addColumn = (columnName) => {
|
|
24
|
+
const options = columnOptions ? columnOptions[columnName] : {};
|
|
25
|
+
const column = new Column(this, columnName, options);
|
|
26
|
+
columnsMap.set(columnName, column);
|
|
27
|
+
column.maxCellWidth.observe(() => this.handleColumnWidthChanged());
|
|
28
|
+
};
|
|
29
|
+
for (const row of rows) {
|
|
30
|
+
const columns = columnOptions
|
|
31
|
+
? Object.entries(columnOptions).map(([name]) => name)
|
|
32
|
+
: row.collectColumnNamesFromCells().map((n) => n.value);
|
|
33
|
+
for (const column of columns) {
|
|
34
|
+
if (!columnsMap.has(column)) {
|
|
35
|
+
addColumn(column);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return Array.from(columnsMap.values());
|
|
40
|
+
}
|
|
41
|
+
getColumn(name) {
|
|
42
|
+
const col = this.columns.find((col) => col.name.matches(name));
|
|
43
|
+
if (!col) {
|
|
44
|
+
throw new Error(`Could not get column with ID ${name}`);
|
|
45
|
+
}
|
|
46
|
+
return col;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Text } from "ink";
|
|
3
|
+
export const Value = ({ children, notSet }) => {
|
|
4
|
+
if (notSet) {
|
|
5
|
+
return _jsx(Text, { color: "gray", children: "not set" });
|
|
6
|
+
}
|
|
7
|
+
return _jsx(Text, { color: "blue", children: children });
|
|
8
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Text, Transform } from "ink";
|
|
3
|
+
import { removeLineBreaks } from "../../../lib/viewhelpers/removeLineBreaks.js";
|
|
4
|
+
export const WithoutLineBreaks = (props) => {
|
|
5
|
+
const { children } = props;
|
|
6
|
+
return (_jsx(Transform, { transform: removeLineBreaks, children: _jsx(Text, { children: children }) }));
|
|
7
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { MittwaldAPIV2Client } from "@mittwald/api-client";
|
|
3
|
+
export interface RenderContext {
|
|
4
|
+
apiClient: MittwaldAPIV2Client;
|
|
5
|
+
renderAsJson: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const renderContext: import("react").Context<RenderContext>;
|
|
8
|
+
export declare const RenderContextProvider: import("react").Provider<RenderContext>;
|
|
9
|
+
export declare const useRenderContext: () => RenderContext;
|