diff --git a/README.md b/README.md index 9eef9722..6099da45 100644 --- a/README.md +++ b/README.md @@ -82,14 +82,18 @@ USAGE * [`mw app copy INSTALLATION-ID`](#mw-app-copy-installation-id) * [`mw app create node`](#mw-app-create-node) * [`mw app create php`](#mw-app-create-php) +* [`mw app create python`](#mw-app-create-python) * [`mw app create static`](#mw-app-create-static) * [`mw app dependency list`](#mw-app-dependency-list) * [`mw app dependency update INSTALLATION-ID`](#mw-app-dependency-update-installation-id) * [`mw app dependency versions SYSTEMSOFTWARE`](#mw-app-dependency-versions-systemsoftware) * [`mw app get INSTALLATION-ID`](#mw-app-get-installation-id) * [`mw app install contao`](#mw-app-install-contao) +* [`mw app install drupal`](#mw-app-install-drupal) +* [`mw app install grav`](#mw-app-install-grav) * [`mw app install joomla`](#mw-app-install-joomla) * [`mw app install matomo`](#mw-app-install-matomo) +* [`mw app install nextcloud`](#mw-app-install-nextcloud) * [`mw app install shopware5`](#mw-app-install-shopware5) * [`mw app install shopware6`](#mw-app-install-shopware6) * [`mw app install typo3`](#mw-app-install-typo3) @@ -319,6 +323,54 @@ FLAG DESCRIPTIONS installation is finished ``` +## `mw app create python` + +Creates new custom python site installation. + +``` +USAGE + $ mw app create python --document-root [-p ] [-q] [--site-title ] [-w] [--json] + +FLAGS + -p, --project-id= ID or short ID of a project; this flag is optional if a default project is set in the + context + -q, --quiet suppress process output and only display a machine-readable summary. + -w, --wait Wait for your custom python site to be ready. + --document-root= (required) [default: /] The document root from which your custom python site will be served + (relative to the installation path) + --json + --site-title= Site Title for your custom python site installation. + +DESCRIPTION + Creates new custom python site installation. + +FLAG DESCRIPTIONS + -p, --project-id= ID or short ID of a project; this flag is optional if a default project is set in the context + + May contain a short ID or a full ID of a project; you can also use the "mw context set --project-id=" command + to persistently set a default project for all commands that accept this flag. + + -q, --quiet suppress process output and only display a machine-readable summary. + + This flag controls if you want to see the process output or only a summary. When using mw non-interactively (e.g. in + scripts), you can use this flag to easily get the IDs of created resources for further processing. + + --document-root= + + The document root from which your custom python site will be served (relative to the installation path) + + This is the document root from which the files of your application will be served by the web server. This directory + is specified relative to the installation path. + + --site-title= Site Title for your custom python site installation. + + Site Title which will be displayed in the Tab and at the top of the Frontend of your custom python site + installation. + It is also the Title shown in the App-Overview in the mStudio. + If none is given the Software Name and the given Project will be used. The Title can be changed after the + installation is finished +``` + ## `mw app create static` Creates new custom static site installation. @@ -563,6 +615,162 @@ FLAG DESCRIPTIONS If none is given the Contao will be installed in the latest available version. ``` +## `mw app install drupal` + +Creates new Drupal installation. + +``` +USAGE + $ mw app install drupal --version [-p ] [-q] [--host ] [--admin-user ] [--admin-email + ] [--admin-pass ] [--site-title ] [-w] [--json] + +FLAGS + -p, --project-id= ID or short ID of a project; this flag is optional if a default project is set in the + context + -q, --quiet suppress process output and only display a machine-readable summary. + -w, --wait Wait for your Drupal to be ready. + --admin-email= E-Mail-Address of your administrator-user. + --admin-pass= Password of your administrator-user. + --admin-user= Username for your administrator-user. + --host= Host to initially configure your Drupal installation with; needs to be created separately. + --json + --site-title= Site Title for your Drupal installation. + --version= (required) [default: latest] Version of Drupal to be installed. + +DESCRIPTION + Creates new Drupal installation. + +FLAG DESCRIPTIONS + -p, --project-id= ID or short ID of a project; this flag is optional if a default project is set in the context + + May contain a short ID or a full ID of a project; you can also use the "mw context set --project-id=" command + to persistently set a default project for all commands that accept this flag. + + -q, --quiet suppress process output and only display a machine-readable summary. + + This flag controls if you want to see the process output or only a summary. When using mw non-interactively (e.g. in + scripts), you can use this flag to easily get the IDs of created resources for further processing. + + --admin-email= E-Mail-Address of your administrator-user. + + E-Mail-Address that will correlate to the first administrator-user which will be created during the Drupal + installation. + If not given your mStudio Account-E-Mail-Address will be used. This E-Mail-Address can be changed after the + installation is finished. + + --admin-pass= Password of your administrator-user. + + Password that will correlate to the first administrator-user which will be created during the Drupal installation. + If not given a random secure Password will be generated and sent to stdout. This Password can be changed after the + installation is finished + + --admin-user= Username for your administrator-user. + + Username of the first administrator-user which will be created during the Drupal installation. + If not given an adequate username will be created from your mStudio Account Data. + After the installation is finished the Username can be changed and additional administrator-users can be created. + + --host= Host to initially configure your Drupal installation with; needs to be created separately. + + Specify a host which will be used during the installation and as an initial host for the Drupal configuration. + If not given the default host for the given Project will be used. + This does not change the target of the used Host and can be changed later by configuring the Host and your Drupal + installation. + + --site-title= Site Title for your Drupal installation. + + Site Title which will be displayed in the Tab and at the top of the Frontend of your Drupal installation. + It is also the Title shown in the App-Overview in the mStudio. + If none is given the Software Name and the given Project will be used. The Title can be changed after the + installation is finished + + --version= Version of Drupal to be installed. + + Specify the Version in which your Drupal will be installed. + If none is given the Drupal will be installed in the latest available version. +``` + +## `mw app install grav` + +Creates new Grav installation. + +``` +USAGE + $ mw app install grav --version [-p ] [-q] [--admin-user ] [--admin-email ] + [--admin-pass ] [--admin-firstname ] [--admin-lastname ] [--site-title ] [-w] [--json] + +FLAGS + -p, --project-id= ID or short ID of a project; this flag is optional if a default project is set in the + context + -q, --quiet suppress process output and only display a machine-readable summary. + -w, --wait Wait for your Grav to be ready. + --admin-email= E-Mail-Address of your administrator-user. + --admin-firstname= Firstname of your administrator-user. + --admin-lastname= Lastname of your administrator-user. + --admin-pass= Password of your administrator-user. + --admin-user= Username for your administrator-user. + --json + --site-title= Site Title for your Grav installation. + --version= (required) [default: latest] Version of Grav to be installed. + +DESCRIPTION + Creates new Grav installation. + +FLAG DESCRIPTIONS + -p, --project-id= ID or short ID of a project; this flag is optional if a default project is set in the context + + May contain a short ID or a full ID of a project; you can also use the "mw context set --project-id=" command + to persistently set a default project for all commands that accept this flag. + + -q, --quiet suppress process output and only display a machine-readable summary. + + This flag controls if you want to see the process output or only a summary. When using mw non-interactively (e.g. in + scripts), you can use this flag to easily get the IDs of created resources for further processing. + + --admin-email= E-Mail-Address of your administrator-user. + + E-Mail-Address that will correlate to the first administrator-user which will be created during the Grav + installation. + If not given your mStudio Account-E-Mail-Address will be used. This E-Mail-Address can be changed after the + installation is finished. + + --admin-firstname= Firstname of your administrator-user. + + Firstname that will correlate to the first administrator-user which will be created during the Grav installation. + If none is given your mStudio Account-Firstname will be used. This Firstname can be changed after the installation + is finished + + --admin-lastname= Lastname of your administrator-user. + + Lastname that will correlate to the first administrator-user which will be created during the Grav installation. + If none is given your mStudio Account-Firstname will be used. This Lastname can be changed after the installation is + finished + + --admin-pass= Password of your administrator-user. + + Password that will correlate to the first administrator-user which will be created during the Grav installation. + If not given a random secure Password will be generated and sent to stdout. This Password can be changed after the + installation is finished + + --admin-user= Username for your administrator-user. + + Username of the first administrator-user which will be created during the Grav installation. + If not given an adequate username will be created from your mStudio Account Data. + After the installation is finished the Username can be changed and additional administrator-users can be created. + + --site-title= Site Title for your Grav installation. + + Site Title which will be displayed in the Tab and at the top of the Frontend of your Grav installation. + It is also the Title shown in the App-Overview in the mStudio. + If none is given the Software Name and the given Project will be used. The Title can be changed after the + installation is finished + + --version= Version of Grav to be installed. + + Specify the Version in which your Grav will be installed. + If none is given the Grav will be installed in the latest available version. +``` + ## `mw app install joomla` Creates new Joomla! installation. @@ -728,6 +936,83 @@ FLAG DESCRIPTIONS If none is given the Matomo will be installed in the latest available version. ``` +## `mw app install nextcloud` + +Creates new Shopware 6 installation. + +``` +USAGE + $ mw app install nextcloud --version [-p ] [-q] [--host ] [--admin-user ] [--admin-email + ] [--admin-pass ] [--site-title ] [-w] [--json] + +FLAGS + -p, --project-id= ID or short ID of a project; this flag is optional if a default project is set in the + context + -q, --quiet suppress process output and only display a machine-readable summary. + -w, --wait Wait for your Shopware 6 to be ready. + --admin-email= E-Mail-Address of your administrator-user. + --admin-pass= Password of your administrator-user. + --admin-user= Username for your administrator-user. + --host= Host to initially configure your Shopware 6 installation with; needs to be created + separately. + --json + --site-title= Site Title for your Shopware 6 installation. + --version= (required) [default: latest] Version of Shopware 6 to be installed. + +DESCRIPTION + Creates new Shopware 6 installation. + +FLAG DESCRIPTIONS + -p, --project-id= ID or short ID of a project; this flag is optional if a default project is set in the context + + May contain a short ID or a full ID of a project; you can also use the "mw context set --project-id=" command + to persistently set a default project for all commands that accept this flag. + + -q, --quiet suppress process output and only display a machine-readable summary. + + This flag controls if you want to see the process output or only a summary. When using mw non-interactively (e.g. in + scripts), you can use this flag to easily get the IDs of created resources for further processing. + + --admin-email= E-Mail-Address of your administrator-user. + + E-Mail-Address that will correlate to the first administrator-user which will be created during the Shopware 6 + installation. + If not given your mStudio Account-E-Mail-Address will be used. This E-Mail-Address can be changed after the + installation is finished. + + --admin-pass= Password of your administrator-user. + + Password that will correlate to the first administrator-user which will be created during the Shopware 6 + installation. + If not given a random secure Password will be generated and sent to stdout. This Password can be changed after the + installation is finished + + --admin-user= Username for your administrator-user. + + Username of the first administrator-user which will be created during the Shopware 6 installation. + If not given an adequate username will be created from your mStudio Account Data. + After the installation is finished the Username can be changed and additional administrator-users can be created. + + --host= Host to initially configure your Shopware 6 installation with; needs to be created separately. + + Specify a host which will be used during the installation and as an initial host for the Shopware 6 configuration. + If not given the default host for the given Project will be used. + This does not change the target of the used Host and can be changed later by configuring the Host and your Shopware + 6 installation. + + --site-title= Site Title for your Shopware 6 installation. + + Site Title which will be displayed in the Tab and at the top of the Frontend of your Shopware 6 installation. + It is also the Title shown in the App-Overview in the mStudio. + If none is given the Software Name and the given Project will be used. The Title can be changed after the + installation is finished + + --version= Version of Shopware 6 to be installed. + + Specify the Version in which your Shopware 6 will be installed. + If none is given the Shopware 6 will be installed in the latest available version. +``` + ## `mw app install shopware5` Creates new Shopware 5 installation. diff --git a/src/commands/app/create/python.tsx b/src/commands/app/create/python.tsx new file mode 100644 index 00000000..b0316e4f --- /dev/null +++ b/src/commands/app/create/python.tsx @@ -0,0 +1,33 @@ +import { ExecRenderBaseCommand } from "../../../rendering/react/ExecRenderBaseCommand.js"; +import React from "react"; +import { + AppInstallationResult, + AppInstaller, +} from "../../../lib/app/Installer.js"; + +export const pythonInstaller = new AppInstaller( + "be57d166-dae9-4480-bae2-da3f3c6f0a2e", + "custom python site", + ["document-root", "site-title", "wait"] as const, +); + +export default class InstallPython extends ExecRenderBaseCommand< + typeof InstallPython, + AppInstallationResult +> { + static description = pythonInstaller.description; + static flags = pythonInstaller.flags; + + protected async exec(): Promise<{ appInstallationId: string }> { + return pythonInstaller.exec( + this.apiClient, + this.args, + this.flags, + this.config, + ); + } + + protected render(result: AppInstallationResult): React.ReactNode { + return pythonInstaller.render(result, this.flags); + } +} diff --git a/src/commands/app/create/static.tsx b/src/commands/app/create/static.tsx index 5206d9f5..94cab438 100644 --- a/src/commands/app/create/static.tsx +++ b/src/commands/app/create/static.tsx @@ -11,8 +11,8 @@ export const staticInstaller = new AppInstaller( ["document-root", "site-title", "wait"] as const, ); -export default class InstallNode extends ExecRenderBaseCommand< - typeof InstallNode, +export default class InstallStatic extends ExecRenderBaseCommand< + typeof InstallStatic, AppInstallationResult > { static description = staticInstaller.description; diff --git a/src/commands/app/install/drupal.tsx b/src/commands/app/install/drupal.tsx new file mode 100644 index 00000000..c022563a --- /dev/null +++ b/src/commands/app/install/drupal.tsx @@ -0,0 +1,36 @@ +import { ExecRenderBaseCommand } from "../../../rendering/react/ExecRenderBaseCommand.js"; +import React from "react"; +import { + AppInstallationResult, + AppInstaller, +} from "../../../lib/app/Installer.js"; + +const installer = new AppInstaller( + "3d8a261a-3d6f-4e09-b68c-bfe90aece514", + "Drupal", + [ + "version", + "host", + "admin-user", + "admin-email", + "admin-pass", + "site-title", + "wait", + ] as const, +); + +export default class InstallDrupal extends ExecRenderBaseCommand< + typeof InstallDrupal, + AppInstallationResult +> { + static description = installer.description; + static flags = installer.flags; + + protected async exec(): Promise<{ appInstallationId: string }> { + return installer.exec(this.apiClient, this.args, this.flags, this.config); + } + + protected render(result: AppInstallationResult): React.ReactNode { + return installer.render(result, this.flags); + } +} diff --git a/src/commands/app/install/grav.tsx b/src/commands/app/install/grav.tsx new file mode 100644 index 00000000..c2759ee8 --- /dev/null +++ b/src/commands/app/install/grav.tsx @@ -0,0 +1,37 @@ +import { ExecRenderBaseCommand } from "../../../rendering/react/ExecRenderBaseCommand.js"; +import React from "react"; +import { + AppInstallationResult, + AppInstaller, +} from "../../../lib/app/Installer.js"; + +const installer = new AppInstaller( + "d3a465da-75a2-44ab-8e81-6960055f6255", + "Grav", + [ + "version", + "admin-user", + "admin-email", + "admin-pass", + "admin-firstname", + "admin-lastname", + "site-title", + "wait", + ] as const, +); + +export default class InstallGrav extends ExecRenderBaseCommand< + typeof InstallGrav, + AppInstallationResult +> { + static description = installer.description; + static flags = installer.flags; + + protected async exec(): Promise<{ appInstallationId: string }> { + return installer.exec(this.apiClient, this.args, this.flags, this.config); + } + + protected render(result: AppInstallationResult): React.ReactNode { + return installer.render(result, this.flags); + } +} diff --git a/src/commands/app/install/nextcloud.tsx b/src/commands/app/install/nextcloud.tsx new file mode 100644 index 00000000..bdbf0471 --- /dev/null +++ b/src/commands/app/install/nextcloud.tsx @@ -0,0 +1,36 @@ +import { ExecRenderBaseCommand } from "../../../rendering/react/ExecRenderBaseCommand.js"; +import React from "react"; +import { + AppInstallationResult, + AppInstaller, +} from "../../../lib/app/Installer.js"; + +const installer = new AppInstaller( + "0b97d59f-ee13-4f18-a1f6-53e1beaf2e70", + "Shopware 6", + [ + "version", + "host", + "admin-user", + "admin-email", + "admin-pass", + "site-title", + "wait", + ] as const, +); + +export default class InstallNextcloud extends ExecRenderBaseCommand< + typeof InstallNextcloud, + AppInstallationResult +> { + static description = installer.description; + static flags = installer.flags; + + protected async exec(): Promise<{ appInstallationId: string }> { + return installer.exec(this.apiClient, this.args, this.flags, this.config); + } + + protected render(result: AppInstallationResult): React.ReactNode { + return installer.render(result, this.flags); + } +}