-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #700 from mittwald/feature/add-magento
Add magento installation command
- Loading branch information
Showing
4 changed files
with
200 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { ExecRenderBaseCommand } from "../../../lib/basecommands/ExecRenderBaseCommand.js"; | ||
import React from "react"; | ||
import { | ||
AppInstallationResult, | ||
AppInstaller, | ||
} from "../../../lib/resources/app/Installer.js"; | ||
|
||
export const magento2Installer = new AppInstaller( | ||
"03c7cd76-7e0d-4504-932c-06947b370020", | ||
"Magento 2", | ||
[ | ||
"version", | ||
"host", | ||
"admin-user", | ||
"admin-email", | ||
"admin-pass", | ||
"admin-firstname", | ||
"admin-lastname", | ||
"site-title", | ||
"shop-email", | ||
"shop-lang", | ||
"shop-currency", | ||
"opensearch-host", | ||
"opensearch-port", | ||
] as const, | ||
{ "shop-lang": "de_DE" }, | ||
); | ||
|
||
export default class InstallMagento2 extends ExecRenderBaseCommand< | ||
typeof InstallMagento2, | ||
AppInstallationResult | ||
> { | ||
static description = magento2Installer.description; | ||
static flags = magento2Installer.flags; | ||
|
||
protected async exec(): Promise<{ appInstallationId: string }> { | ||
return magento2Installer.exec( | ||
this.apiClient, | ||
this.args, | ||
this.flags, | ||
this.config, | ||
); | ||
} | ||
|
||
protected render(result: AppInstallationResult): React.ReactNode { | ||
return magento2Installer.render(result, this.flags); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters