From dbae29ab5a62e88f5eb157aac9f39bea40bfd3b2 Mon Sep 17 00:00:00 2001 From: Martin Helmich Date: Wed, 29 May 2024 16:44:00 +0200 Subject: [PATCH 01/11] Add "app update" command to change entrypoint+docroot --- src/commands/app/update.tsx | 137 ++++++++++++++++++++++++ src/commands/app/upgrade.tsx | 8 +- src/rendering/process/process.tsx | 2 +- src/rendering/process/process_fancy.tsx | 2 +- 4 files changed, 140 insertions(+), 9 deletions(-) create mode 100644 src/commands/app/update.tsx diff --git a/src/commands/app/update.tsx b/src/commands/app/update.tsx new file mode 100644 index 000000000..80cc13a51 --- /dev/null +++ b/src/commands/app/update.tsx @@ -0,0 +1,137 @@ +import { ExecRenderBaseCommand } from "../../lib/basecommands/ExecRenderBaseCommand.js"; +import React, { ReactNode } from "react"; +import { + appInstallationArgs, + withAppInstallationId, +} from "../../lib/resources/app/flags.js"; +import { + makeProcessRenderer, + processFlags, +} from "../../rendering/process/process_flags.js"; +import { MittwaldAPIV2 } from "@mittwald/api-client"; +import { Success } from "../../rendering/react/components/Success.js"; +import { Value } from "../../rendering/react/components/Value.js"; +import { Flags } from "@oclif/core"; +import { CommandFlags } from "../../lib/basecommands/CommandFlags.js"; + +type AppSavedUserInput = MittwaldAPIV2.Components.Schemas.AppSavedUserInput; +type AppAppUpdatePolicy = MittwaldAPIV2.Components.Schemas.AppAppUpdatePolicy; + +/** + * This is a carefully selected subset of the "patchAppinstallation" request + * body; the type needs to be inlined, because it's not exported from the API + * client. + */ +type UpdateBody = { + customDocumentRoot?: string; + description?: string; + updatePolicy?: AppAppUpdatePolicy; + userInputs?: AppSavedUserInput[]; +}; + +export class Update extends ExecRenderBaseCommand { + static summary = + "Update properties of an app installation (use 'upgrade' to update the app version)"; + static args = { ...appInstallationArgs }; + static flags = { + ...processFlags, + description: Flags.string({ + summary: "update the description of the app installation", + description: + "This flag updates the description of the app installation. If omitted, the description will not be changed.", + default: undefined, + required: false, + }), + entrypoint: Flags.string({ + summary: + "update the entrypoint of the app installation (Python and Node.js only)", + description: + "Updates the entrypoint of the app installation. If omitted, the entrypoint will not be changed. Note that this field is only available for some types of apps (like Python and Node.js).", + required: false, + default: undefined, + }), + "document-root": Flags.string({ + summary: "update the document root of the app installation", + description: + "Updates the document root of the app installation. If omitted, the document root will not be changed. Note that not all apps support this field.", + required: false, + default: undefined, + }), + }; + + protected async exec(): Promise { + const p = makeProcessRenderer(this.flags, "Updating app installation"); + const appInstallationId = await withAppInstallationId( + this.apiClient, + Update, + this.flags, + this.args, + this.config, + ); + + const [updateBody, info] = buildUpdateBodyFromFlags(this.flags); + + info.forEach((i) => p.addInfo(i)); + + if (Object.keys(updateBody).length === 0) { + p.addInfo("skipping update"); + await p.complete(No changes to apply); + return; + } + + this.debug("updating app installation: %O", updateBody); + + await p.runStep("updating app", async () => { + await this.apiClient.app.patchAppinstallation({ + appInstallationId, + data: updateBody, + }); + }); + + await p.complete(App installation successfully updated); + } + + protected render(): React.ReactNode { + return undefined; + } +} + +function buildUpdateBodyFromFlags( + flags: CommandFlags, +): [UpdateBody, ReactNode[]] { + const updateBody: UpdateBody = {}; + const info: ReactNode[] = []; + + if (flags.entrypoint) { + info.push(); + updateBody.userInputs = [ + ...(updateBody.userInputs || []), + { + name: "entrypoint", + value: flags.entrypoint, + }, + ]; + } + + if (flags["document-root"]) { + info.push( + , + ); + updateBody.customDocumentRoot = flags["document-root"]; + } + + if (flags.description !== undefined) { + info.push(); + updateBody.description = flags.description; + } + + return [updateBody, info]; +} + +function UpdateFieldInfo({ name, value }: { name: string; value: string }) { + return ( + <> + setting {name} to {value} + + ); +} diff --git a/src/commands/app/upgrade.tsx b/src/commands/app/upgrade.tsx index 837630599..f3783ece4 100644 --- a/src/commands/app/upgrade.tsx +++ b/src/commands/app/upgrade.tsx @@ -3,7 +3,6 @@ import { appInstallationArgs, withAppInstallationId, } from "../../lib/resources/app/flags.js"; -import { projectFlags } from "../../lib/resources/project/flags.js"; import { Flags, ux } from "@oclif/core"; import React, { ReactNode } from "react"; import { Text } from "ink"; @@ -19,7 +18,6 @@ import { } from "../../lib/resources/app/versions.js"; import { makeProcessRenderer, - ProcessFlags, processFlags, } from "../../rendering/process/process_flags.js"; import { Success } from "../../rendering/react/components/Success.js"; @@ -47,16 +45,12 @@ export class UpgradeApp extends ExecRenderBaseCommand { char: "f", description: "Do not ask for confirmation.", }), - ...projectFlags, ...processFlags, ...waitFlags, }; protected async exec(): Promise { - const process = makeProcessRenderer( - this.flags as ProcessFlags, - "App upgrade", - ); + const process = makeProcessRenderer(this.flags, "App upgrade"); const appInstallationId: string = await withAppInstallationId( this.apiClient, UpgradeApp, diff --git a/src/rendering/process/process.tsx b/src/rendering/process/process.tsx index fce29bfcd..591a4425c 100644 --- a/src/rendering/process/process.tsx +++ b/src/rendering/process/process.tsx @@ -110,7 +110,7 @@ export interface ProcessRenderer { start(): void; addStep(title: ReactNode): RunnableHandler; runStep(title: ReactNode, fn: () => Promise): Promise; - addInfo(title: ReactElement): void; + addInfo(title: ReactNode): void; addConfirmation(question: ReactElement): Promise; addInput(question: ReactNode, mask?: boolean): Promise; addSelect( diff --git a/src/rendering/process/process_fancy.tsx b/src/rendering/process/process_fancy.tsx index 4715f201d..fb0ea84c8 100644 --- a/src/rendering/process/process_fancy.tsx +++ b/src/rendering/process/process_fancy.tsx @@ -68,7 +68,7 @@ export class FancyProcessRenderer implements ProcessRenderer { } } - public addInfo(title: ReactElement) { + public addInfo(title: ReactNode) { this.start(); if (this.currentHandler !== null) { From 7991b3a35ba07915e576862dd7ebf72eda677f83 Mon Sep 17 00:00:00 2001 From: Martin Helmich Date: Wed, 29 May 2024 16:44:44 +0200 Subject: [PATCH 02/11] Update README --- README.md | 50 +++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 76aa41ee3..919d05073 100644 --- a/README.md +++ b/README.md @@ -139,6 +139,7 @@ USAGE * [`mw app list-upgrade-candidates [INSTALLATION-ID]`](#mw-app-list-upgrade-candidates-installation-id) * [`mw app ssh [INSTALLATION-ID]`](#mw-app-ssh-installation-id) * [`mw app uninstall [INSTALLATION-ID]`](#mw-app-uninstall-installation-id) +* [`mw app update [INSTALLATION-ID]`](#mw-app-update-installation-id) * [`mw app upgrade [INSTALLATION-ID]`](#mw-app-upgrade-installation-id) * [`mw app upload [INSTALLATION-ID]`](#mw-app-upload-installation-id) * [`mw app versions [APP]`](#mw-app-versions-app) @@ -1896,14 +1897,52 @@ FLAG DESCRIPTIONS scripts), you can use this flag to easily get the IDs of created resources for further processing. ``` +## `mw app update [INSTALLATION-ID]` + +Update properties of an app installation (use 'upgrade' to update the app version) + +``` +USAGE + $ mw app update [INSTALLATION-ID] [-q] [--description ] [--entrypoint ] [--document-root ] + +ARGUMENTS + INSTALLATION-ID ID or short ID of an app installation; this argument is optional if a default app installation is set + in the context. + +FLAGS + -q, --quiet suppress process output and only display a machine-readable summary. + --description= update the description of the app installation + --document-root= update the document root of the app installation + --entrypoint= update the entrypoint of the app installation (Python and Node.js only) + +FLAG DESCRIPTIONS + -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. + + --description= update the description of the app installation + + This flag updates the description of the app installation. If omitted, the description will not be changed. + + --document-root= update the document root of the app installation + + Updates the document root of the app installation. If omitted, the document root will not be changed. Note that not + all apps support this field. + + --entrypoint= update the entrypoint of the app installation (Python and Node.js only) + + Updates the entrypoint of the app installation. If omitted, the entrypoint will not be changed. Note that this field + is only available for some types of apps (like Python and Node.js). +``` + ## `mw app upgrade [INSTALLATION-ID]` Upgrade app installation to target version ``` USAGE - $ mw app upgrade [INSTALLATION-ID] [--target-version ] [-f] [-p ] [-q] [-w] [--wait-timeout - ] + $ mw app upgrade [INSTALLATION-ID] [--target-version ] [-f] [-q] [-w] [--wait-timeout ] ARGUMENTS INSTALLATION-ID ID or short ID of an app installation; this argument is optional if a default app installation is set @@ -1911,8 +1950,6 @@ ARGUMENTS FLAGS -f, --force Do not ask for confirmation. - -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 the resource to be ready. --target-version= target version to upgrade app to; if omitted, target version will be prompted @@ -1924,11 +1961,6 @@ DESCRIPTION Upgrade app installation to target version 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 From 67af55244b085a16890328b4aa3954f9a6d97fd9 Mon Sep 17 00:00:00 2001 From: Michel Hopfner Date: Tue, 20 Aug 2024 10:29:36 +0200 Subject: [PATCH 03/11] implement reactive dependency upgrade for app upgrades --- README.md | 540 +++++++++++++++++++++++++---------- src/commands/app/upgrade.tsx | 162 +++++++++-- 2 files changed, 526 insertions(+), 176 deletions(-) diff --git a/README.md b/README.md index b99f3fbbe..2ce37f813 100644 --- a/README.md +++ b/README.md @@ -149,7 +149,10 @@ USAGE * [`mw backup download BACKUP-ID`](#mw-backup-download-backup-id) * [`mw backup get BACKUP-ID`](#mw-backup-get-backup-id) * [`mw backup list`](#mw-backup-list) +* [`mw backup schedule create`](#mw-backup-schedule-create) +* [`mw backup schedule delete [BACKUP-SCHEDULE-ID]`](#mw-backup-schedule-delete-backup-schedule-id) * [`mw backup schedule list`](#mw-backup-schedule-list) +* [`mw backup schedule update [BACKUP-SCHEDULE-ID]`](#mw-backup-schedule-update-backup-schedule-id) * [`mw context get`](#mw-context-get) * [`mw context reset`](#mw-context-reset) * [`mw context set`](#mw-context-set) @@ -169,6 +172,7 @@ USAGE * [`mw cronjob execution logs CRONJOB-ID EXECUTION-ID`](#mw-cronjob-execution-logs-cronjob-id-execution-id) * [`mw cronjob get CRONJOB-ID`](#mw-cronjob-get-cronjob-id) * [`mw cronjob list`](#mw-cronjob-list) +* [`mw cronjob update CRONJOB-ID`](#mw-cronjob-update-cronjob-id) * [`mw database mysql charsets`](#mw-database-mysql-charsets) * [`mw database mysql create`](#mw-database-mysql-create) * [`mw database mysql delete DATABASE-ID`](#mw-database-mysql-delete-database-id) @@ -179,9 +183,11 @@ USAGE * [`mw database mysql phpmyadmin DATABASE-ID`](#mw-database-mysql-phpmyadmin-database-id) * [`mw database mysql port-forward DATABASE-ID`](#mw-database-mysql-port-forward-database-id) * [`mw database mysql shell DATABASE-ID`](#mw-database-mysql-shell-database-id) +* [`mw database mysql user create [DATABASE-ID]`](#mw-database-mysql-user-create-database-id) * [`mw database mysql user delete USER-ID`](#mw-database-mysql-user-delete-user-id) * [`mw database mysql user get ID`](#mw-database-mysql-user-get-id) * [`mw database mysql user list`](#mw-database-mysql-user-list) +* [`mw database mysql user update [DATABASE-ID]`](#mw-database-mysql-user-update-database-id) * [`mw database mysql versions`](#mw-database-mysql-versions) * [`mw database redis create`](#mw-database-redis-create) * [`mw database redis get ID`](#mw-database-redis-get-id) @@ -248,10 +254,14 @@ USAGE * [`mw project update [PROJECT-ID]`](#mw-project-update-project-id) * [`mw server get [SERVER-ID]`](#mw-server-get-server-id) * [`mw server list`](#mw-server-list) +* [`mw sftp-user create`](#mw-sftp-user-create) * [`mw sftp-user delete SFTP-USER-ID`](#mw-sftp-user-delete-sftp-user-id) * [`mw sftp-user list`](#mw-sftp-user-list) +* [`mw sftp-user update SFTP-USER-ID`](#mw-sftp-user-update-sftp-user-id) +* [`mw ssh-user create`](#mw-ssh-user-create) * [`mw ssh-user delete SSH-USER-ID`](#mw-ssh-user-delete-ssh-user-id) * [`mw ssh-user list`](#mw-ssh-user-list) +* [`mw ssh-user update SSH-USER-ID`](#mw-ssh-user-update-ssh-user-id) * [`mw update [CHANNEL]`](#mw-update-channel) * [`mw user api-token create`](#mw-user-api-token-create) * [`mw user api-token get TOKEN-ID`](#mw-user-api-token-get-token-id) @@ -315,9 +325,7 @@ DESCRIPTION Creates new custom Node.js 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 + -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. @@ -363,9 +371,7 @@ DESCRIPTION Creates new custom PHP 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 + -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. @@ -412,9 +418,7 @@ 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 + -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. @@ -460,9 +464,7 @@ DESCRIPTION Creates new custom static 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 + -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. @@ -516,8 +518,7 @@ Update the dependencies of an app ``` USAGE - $ mw app dependency update [INSTALLATION-ID] --set ... [-q] [--update-policy - none|inheritedFromApp|patchLevel|all] + $ mw app dependency update [INSTALLATION-ID] --set [-q] [--update-policy none|inheritedFromApp|patchLevel|all] ARGUMENTS INSTALLATION-ID ID or short ID of an app installation; this argument is optional if a default app installation is set @@ -581,7 +582,7 @@ Download the filesystem of an app within a project to your local machine ``` USAGE $ mw app download [INSTALLATION-ID] --target [-q] [--ssh-user ] [--ssh-identity-file ] - [--exclude ...] [--dry-run] [--delete] + [--exclude ] [--dry-run] [--delete] ARGUMENTS INSTALLATION-ID ID or short ID of an app installation; this argument is optional if a default app installation is set @@ -689,9 +690,7 @@ DESCRIPTION Creates new Contao 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 + -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. @@ -778,9 +777,7 @@ 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 + -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. @@ -857,9 +854,7 @@ 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 + -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. @@ -943,9 +938,7 @@ DESCRIPTION Creates new Joomla! 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 + -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. @@ -1032,9 +1025,7 @@ DESCRIPTION Creates new Matomo 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 + -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. @@ -1109,9 +1100,7 @@ DESCRIPTION Creates new Moodle 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 + -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. @@ -1186,9 +1175,7 @@ DESCRIPTION Creates new NEOS 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 + -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. @@ -1263,9 +1250,7 @@ DESCRIPTION Creates new Nextcloud 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 + -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. @@ -1344,9 +1329,7 @@ DESCRIPTION Creates new PrestaShop 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 + -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. @@ -1441,9 +1424,7 @@ DESCRIPTION Creates new Shopware 5 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 + -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. @@ -1555,9 +1536,7 @@ 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 + -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. @@ -1665,9 +1644,7 @@ DESCRIPTION Creates new TYPO3 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 + -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. @@ -1749,9 +1726,7 @@ DESCRIPTION Creates new WordPress 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 + -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. @@ -1824,9 +1799,7 @@ DESCRIPTION List installed apps in a project. 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 + -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. @@ -1979,7 +1952,8 @@ Upgrade app installation to target version ``` USAGE - $ mw app upgrade [INSTALLATION-ID] [--target-version ] [-f] [-q] [-w] [--wait-timeout ] + $ mw app upgrade [INSTALLATION-ID] [--target-version ] [-f] [-p ] [-q] [-w] [--wait-timeout + ] ARGUMENTS INSTALLATION-ID ID or short ID of an app installation; this argument is optional if a default app installation is set @@ -1987,6 +1961,8 @@ ARGUMENTS FLAGS -f, --force Do not ask for confirmation. + -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 the resource to be ready. --target-version= target version to upgrade app to; if omitted, target version will be prompted @@ -1998,6 +1974,11 @@ DESCRIPTION Upgrade app installation to target version 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 @@ -2011,7 +1992,7 @@ Upload the filesystem of an app to a project ``` USAGE $ mw app upload [INSTALLATION-ID] --source [-q] [--ssh-user ] [--ssh-identity-file ] - [--exclude ...] [--dry-run] [--delete] + [--exclude ] [--dry-run] [--delete] ARGUMENTS INSTALLATION-ID ID or short ID of an app installation; this argument is optional if a default app installation is set @@ -2115,7 +2096,7 @@ EXAMPLES $ mw autocomplete --refresh-cache ``` -_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v3.1.5/src/commands/autocomplete/index.ts)_ +_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v3.1.7/src/commands/autocomplete/index.ts)_ ## `mw backup create` @@ -2139,9 +2120,7 @@ ALIASES $ mw project backup create 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 + -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. @@ -2278,12 +2257,65 @@ ALIASES $ mw project backup list FLAG DESCRIPTIONS - -p, --project-id= + -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. +``` + +## `mw backup schedule create` - ID or short ID of a project; this flag is optional if a default project is set in the context +Create a new backup schedule + +``` +USAGE + $ mw backup schedule create --schedule --ttl [-p ] [-q] [--description ] + +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. + --description= Set the description for the backup schedule + --schedule= (required) Define the schedule itself + --ttl= (required) Define the backup storage period in days, for through this schedule created + backups + +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. +``` + +## `mw backup schedule delete [BACKUP-SCHEDULE-ID]` + +Delete a backup schedule + +``` +USAGE + $ mw backup schedule delete [BACKUP-SCHEDULE-ID] [-q] [-f] [--backup-schedule-id ] + +ARGUMENTS + BACKUP-SCHEDULE-ID ID of schedule to delete + +FLAGS + -f, --force Do not ask for confirmation + -q, --quiet suppress process output and only display a machine-readable summary. + --backup-schedule-id= ID of backup schedule to delete + +DESCRIPTION + Delete a backup schedule + +FLAG DESCRIPTIONS + -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. ``` ## `mw backup schedule list` @@ -2314,14 +2346,41 @@ ALIASES $ mw project backupschedule list 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 + -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. ``` +## `mw backup schedule update [BACKUP-SCHEDULE-ID]` + +Update an existing backup schedule + +``` +USAGE + $ mw backup schedule update [BACKUP-SCHEDULE-ID] [-q] [--backup-schedule-id ] [--description ] [--schedule + ] [--ttl ] + +ARGUMENTS + BACKUP-SCHEDULE-ID Define the backup schedule that is to be updated + +FLAGS + -q, --quiet suppress process output and only display a machine-readable summary. + --backup-schedule-id= Define the backup schedule that is to be updated + --description= Set the description for the backup schedule + --schedule= Define the schedule itself + --ttl= Define the backup storage period in days, for through this schedule created backups + +DESCRIPTION + Update an existing backup schedule + +FLAG DESCRIPTIONS + -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. +``` + ## `mw context get` Print an overview of currently set context parameters @@ -2744,14 +2803,47 @@ ALIASES $ mw project cronjob list 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 + -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. ``` +## `mw cronjob update CRONJOB-ID` + +Update an existing cron job + +``` +USAGE + $ mw cronjob update CRONJOB-ID [--description ] [--interval ] [--disable | --enable] [--email + ] [--timeout ] [--url ] [--command ] [--interpreter bash|php] [-q] + +ARGUMENTS + CRONJOB-ID ID of the cron job to be updated. + +FLAGS + -q, --quiet suppress process output and only display a machine-readable summary. + --command= Set file and parameters to execute on cron job execution + --description= Set cron job description + --disable Disable cron job automated execution + --email= Set target email to send error messages to + --enable Enable cron job automated execution + --interpreter=