feat: restore advanced module setup experience

This commit is contained in:
reaper
2026-08-14 12:30:50 -05:00
parent ccc897a931
commit 3d77f0ac93
6 changed files with 55 additions and 24 deletions
@@ -12,6 +12,7 @@ function wpArgs(context, network) {
exports.projectCreate = async function projectCreate(context) {
const s = context.settings
const title = String(s.title || '').trim() || context.projectName
const base = wpArgs(context, false)
const networkBase = wpArgs(context, true)
const siteUrl = context.urls.https
@@ -19,10 +20,10 @@ exports.projectCreate = async function projectCreate(context) {
await context.run('start', 'docker', ['compose', '-f', `${context.directory}/.aurora/compose.yaml`, 'up', '-d', '--build', '--remove-orphans'])
await context.run('download', 'docker', [...base, 'core', 'download', `--locale=${s.locale || 'en_US'}`, '--force'])
await context.run('config', 'docker', [...networkBase, 'config', 'create', '--dbname=db', '--dbuser=db', '--dbpass=db', '--dbhost=db:3306', '--skip-check', '--force'])
await context.run('install', 'docker', [...networkBase, 'core', 'install', `--url=${siteUrl}`, `--title=${s.title}`, `--admin_user=${s.admin_user}`, `--admin_password=${s.admin_password}`, `--admin_email=${s.admin_email}`, '--skip-email'])
await context.run('install', 'docker', [...networkBase, 'core', 'install', `--url=${siteUrl}`, `--title=${title}`, `--admin_user=${s.admin_user}`, `--admin_password=${s.admin_password}`, `--admin_email=${s.admin_email}`, '--skip-email'])
await context.run('verify-install', 'docker', [...networkBase, 'core', 'is-installed'])
if (s.multisite !== 'none') {
await context.run('multisite-convert', 'docker', [...networkBase, 'core', 'multisite-convert', `--title=${s.title}`, ...(s.multisite === 'subdomain' ? ['--subdomains'] : [])])
await context.run('multisite-convert', 'docker', [...networkBase, 'core', 'multisite-convert', `--title=${title}`, ...(s.multisite === 'subdomain' ? ['--subdomains'] : [])])
await context.run('verify-network', 'docker', [...networkBase, 'core', 'is-installed', '--network'])
await context.run('verify-network-db', 'docker', [...networkBase, 'db', 'query', "SHOW TABLES LIKE 'wp_blogs';", '--skip-column-names'])
}
@@ -1,7 +1,7 @@
{
"id": "wordpress",
"name": "WordPress",
"version": "1.0.0",
"version": "1.1.0",
"category": "application",
"description": "WordPress CMS provisioning and WP-CLI tooling.",
"main": "main/index.cjs",
@@ -12,14 +12,15 @@
"settings": [],
"creation": {
"databases": ["mariadb"],
"intro": { "title": "WordPress install", "description": "Core downloads automatically and the project starts for setup.", "icon": "globe" },
"setup": [
{ "id": "locale", "label": "Locale", "type": "select", "default": "en_US", "options": ["en_US", "en_GB", "de_DE", "fr_FR", "es_ES"] },
{ "id": "title", "label": "Site title", "type": "text", "default": "Aurora Site" },
{ "id": "admin_user", "label": "Admin username", "type": "text", "default": "admin" },
{ "id": "admin_password", "label": "Admin password", "type": "text", "default": "" },
{ "id": "admin_email", "label": "Admin email", "type": "text", "default": "[email protected]est" },
{ "id": "multisite", "label": "Site mode", "type": "select", "default": "none", "options": ["none", "subdirectory", "subdomain"] },
{ "id": "wp_debug", "label": "Enable WP_DEBUG", "type": "boolean", "default": true }
{ "id": "title", "label": "Site title", "type": "text", "default": "", "placeholder": "My WordPress Site", "icon": "title", "span": 2 },
{ "id": "admin_user", "label": "Admin username", "type": "text", "default": "admin", "required": true, "icon": "user" },
{ "id": "admin_password", "label": "Admin password", "type": "text", "default": "", "required": true, "secret": true, "icon": "key" },
{ "id": "admin_email", "label": "Admin email", "type": "text", "default": "", "required": true, "placeholder": "[email protected]", "icon": "mail", "span": 2 },
{ "id": "locale", "label": "Select language", "type": "select", "default": "en_US", "advanced": true, "icon": "globe", "options": ["en_US", "en_GB", "de_DE", "es_ES", "fr_FR", "it_IT", "pt_BR", "nl_NL", "ja"], "optionLabels": { "en_US": "English (United States)", "en_GB": "English (UK)", "de_DE": "German", "es_ES": "Spanish (Spain)", "fr_FR": "French (France)", "it_IT": "Italian", "pt_BR": "Portuguese (Brazil)", "nl_NL": "Dutch", "ja": "Japanese" } },
{ "id": "multisite", "label": "Is this a WordPress Multisite?", "type": "select", "default": "none", "advanced": true, "icon": "settings", "options": ["none", "subdirectory", "subdomain"], "optionLabels": { "none": "No", "subdirectory": "Yes Subdirectory", "subdomain": "Yes Subdomain" } },
{ "id": "wp_debug", "label": "Enable WP_DEBUG", "type": "boolean", "default": true, "advanced": true }
]
},
"project": { "adminPath": "/wp-admin/" }
@@ -1,6 +1,6 @@
{
"name": "@aurora/module-wordpress",
"version": "1.0.0",
"version": "1.1.0",
"private": true,
"description": "WordPress application module for Aurora Dockside",
"files": ["manifest.json", "main", "README.md"]