fix: load native PHP extensions for WordPress
This commit is contained in:
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "aurora-dockside",
|
"name": "aurora-dockside",
|
||||||
"version": "2.0.0-alpha.31",
|
"version": "2.0.0-alpha.32",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "aurora-dockside",
|
"name": "aurora-dockside",
|
||||||
"version": "2.0.0-alpha.31",
|
"version": "2.0.0-alpha.32",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@electron-toolkit/preload": "^3.0.2",
|
"@electron-toolkit/preload": "^3.0.2",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "aurora-dockside",
|
"name": "aurora-dockside",
|
||||||
"version": "2.0.0-alpha.31",
|
"version": "2.0.0-alpha.32",
|
||||||
"description": "A modern, modular Docker development platform for building, running, and managing web applications locally.",
|
"description": "A modern, modular Docker development platform for building, running, and managing web applications locally.",
|
||||||
"desktopName": "aurora-dockside.desktop",
|
"desktopName": "aurora-dockside.desktop",
|
||||||
"main": "./out/main/index.js",
|
"main": "./out/main/index.js",
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ exports.projectCreate = async function projectCreate(context) {
|
|||||||
const s = context.settings
|
const s = context.settings
|
||||||
const title = String(s.title || '').trim() || context.projectName
|
const title = String(s.title || '').trim() || context.projectName
|
||||||
const native = context.environment.runtimeEngine === 'native'
|
const native = context.environment.runtimeEngine === 'native'
|
||||||
|
const nativePhpPrefix = native ? context.native.phpPrefixArgs || [] : []
|
||||||
const nativePrefix = native ? context.native.wpPrefixArgs || [] : []
|
const nativePrefix = native ? context.native.wpPrefixArgs || [] : []
|
||||||
const base = native ? [...nativePrefix, `--path=${context.directory}`] : wpArgs(context, false)
|
const base = native ? [...nativePrefix, `--path=${context.directory}`] : wpArgs(context, false)
|
||||||
const networkBase = native ? base : wpArgs(context, true)
|
const networkBase = native ? base : wpArgs(context, true)
|
||||||
@@ -48,7 +49,7 @@ exports.projectCreate = async function projectCreate(context) {
|
|||||||
await context.native.start()
|
await context.native.start()
|
||||||
const port = Number(context.native.databasePort)
|
const port = Number(context.native.databasePort)
|
||||||
const bootstrap = `$db=new mysqli('127.0.0.1','root','',null,${port});if($db->connect_error)throw new Exception($db->connect_error);$db->query('CREATE DATABASE IF NOT EXISTS db');$db->query("CREATE USER IF NOT EXISTS 'db'@'127.0.0.1' IDENTIFIED BY 'db'");$db->query("GRANT ALL ON db.* TO 'db'@'127.0.0.1'");`
|
const bootstrap = `$db=new mysqli('127.0.0.1','root','',null,${port});if($db->connect_error)throw new Exception($db->connect_error);$db->query('CREATE DATABASE IF NOT EXISTS db');$db->query("CREATE USER IF NOT EXISTS 'db'@'127.0.0.1' IDENTIFIED BY 'db'");$db->query("GRANT ALL ON db.* TO 'db'@'127.0.0.1'");`
|
||||||
await context.run('database', context.native.php, ['-r', bootstrap])
|
await context.run('database', context.native.php, [...nativePhpPrefix, '-r', bootstrap])
|
||||||
} else {
|
} else {
|
||||||
await context.ensureRouter()
|
await context.ensureRouter()
|
||||||
await context.run('start', 'docker', [
|
await context.run('start', 'docker', [
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"id": "wordpress",
|
"id": "wordpress",
|
||||||
"name": "WordPress",
|
"name": "WordPress",
|
||||||
"version": "1.2.0",
|
"version": "1.2.1",
|
||||||
"category": "application",
|
"category": "application",
|
||||||
"description": "WordPress CMS provisioning and WP-CLI tooling.",
|
"description": "WordPress CMS provisioning and WP-CLI tooling.",
|
||||||
"main": "main/index.cjs",
|
"main": "main/index.cjs",
|
||||||
@@ -12,15 +12,89 @@
|
|||||||
"settings": [],
|
"settings": [],
|
||||||
"creation": {
|
"creation": {
|
||||||
"databases": ["mariadb", "mysql"],
|
"databases": ["mariadb", "mysql"],
|
||||||
"intro": { "title": "WordPress install", "description": "Core downloads automatically and the project starts for setup.", "icon": "globe" },
|
"intro": {
|
||||||
|
"title": "WordPress install",
|
||||||
|
"description": "Core downloads automatically and the project starts for setup.",
|
||||||
|
"icon": "globe"
|
||||||
|
},
|
||||||
"setup": [
|
"setup": [
|
||||||
{ "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": "title",
|
||||||
{ "id": "admin_password", "label": "Admin password", "type": "text", "default": "", "required": true, "secret": true, "icon": "key" },
|
"label": "Site title",
|
||||||
{ "id": "admin_email", "label": "Admin email", "type": "text", "default": "", "required": true, "placeholder": "[email protected]", "icon": "mail", "span": 2 },
|
"type": "text",
|
||||||
{ "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" } },
|
"default": "",
|
||||||
{ "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" } },
|
"placeholder": "My WordPress Site",
|
||||||
{ "id": "wp_debug", "label": "Enable WP_DEBUG", "type": "boolean", "default": true, "advanced": true }
|
"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": {
|
"project": {
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
{
|
{
|
||||||
"name": "@aurora/module-wordpress",
|
"name": "@aurora/module-wordpress",
|
||||||
"version": "1.2.0",
|
"version": "1.2.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "WordPress application module for Aurora Dockside",
|
"description": "WordPress application module for Aurora Dockside",
|
||||||
"files": ["manifest.json", "main", "README.md"]
|
"files": [
|
||||||
|
"manifest.json",
|
||||||
|
"main",
|
||||||
|
"README.md"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,6 +118,10 @@ export async function runModuleLifecycleHook(
|
|||||||
urls: urls ? Object.freeze(urls) : undefined,
|
urls: urls ? Object.freeze(urls) : undefined,
|
||||||
native: nativeDefinition
|
native: nativeDefinition
|
||||||
? Object.freeze({
|
? Object.freeze({
|
||||||
|
phpPrefixArgs:
|
||||||
|
process.platform === 'win32'
|
||||||
|
? ['-c', join(directory!, '.aurora', 'native', 'config', 'php.ini')]
|
||||||
|
: [],
|
||||||
php:
|
php:
|
||||||
process.platform === 'win32'
|
process.platform === 'win32'
|
||||||
? join(runtimeRoot(), 'bin', 'php', 'php.exe')
|
? join(runtimeRoot(), 'bin', 'php', 'php.exe')
|
||||||
@@ -128,7 +132,13 @@ export async function runModuleLifecycleHook(
|
|||||||
: join(runtimeRoot(), 'bin', 'wp'),
|
: join(runtimeRoot(), 'bin', 'wp'),
|
||||||
wpPrefixArgs:
|
wpPrefixArgs:
|
||||||
process.platform === 'win32'
|
process.platform === 'win32'
|
||||||
? ['-d', 'memory_limit=512M', join(runtimeRoot(), 'tools', 'wp-cli.phar')]
|
? [
|
||||||
|
'-c',
|
||||||
|
join(directory!, '.aurora', 'native', 'config', 'php.ini'),
|
||||||
|
'-d',
|
||||||
|
'memory_limit=512M',
|
||||||
|
join(runtimeRoot(), 'tools', 'wp-cli.phar')
|
||||||
|
]
|
||||||
: [],
|
: [],
|
||||||
databaseHost: '127.0.0.1',
|
databaseHost: '127.0.0.1',
|
||||||
databasePort: nativeDefinition.ports.database,
|
databasePort: nativeDefinition.ports.database,
|
||||||
|
|||||||
@@ -145,6 +145,10 @@ it.runIf(Boolean(process.env.AURORA_NATIVE_WORDPRESS_SMOKE_ROOT))(
|
|||||||
https: `http://127.0.0.1:${definition.ports.http}`
|
https: `http://127.0.0.1:${definition.ports.http}`
|
||||||
},
|
},
|
||||||
native: {
|
native: {
|
||||||
|
phpPrefixArgs:
|
||||||
|
process.platform === 'win32'
|
||||||
|
? ['-c', join(root, '.aurora', 'native', 'config', 'php.ini')]
|
||||||
|
: [],
|
||||||
php: runtimeCommand(runtime, 'php'),
|
php: runtimeCommand(runtime, 'php'),
|
||||||
wp:
|
wp:
|
||||||
process.platform === 'win32'
|
process.platform === 'win32'
|
||||||
@@ -152,7 +156,13 @@ it.runIf(Boolean(process.env.AURORA_NATIVE_WORDPRESS_SMOKE_ROOT))(
|
|||||||
: join(runtime, 'bin', 'wp'),
|
: join(runtime, 'bin', 'wp'),
|
||||||
wpPrefixArgs:
|
wpPrefixArgs:
|
||||||
process.platform === 'win32'
|
process.platform === 'win32'
|
||||||
? ['-d', 'memory_limit=512M', join(runtime, 'tools', 'wp-cli.phar')]
|
? [
|
||||||
|
'-c',
|
||||||
|
join(root, '.aurora', 'native', 'config', 'php.ini'),
|
||||||
|
'-d',
|
||||||
|
'memory_limit=512M',
|
||||||
|
join(runtime, 'tools', 'wp-cli.phar')
|
||||||
|
]
|
||||||
: [],
|
: [],
|
||||||
databasePort: definition.ports.database,
|
databasePort: definition.ports.database,
|
||||||
start: () => startNativeProject(definition)
|
start: () => startNativeProject(definition)
|
||||||
|
|||||||
Reference in New Issue
Block a user