diff --git a/.github/workflows/linux-release.yml b/.github/workflows/linux-release.yml index 11be0f5..2b52111 100644 --- a/.github/workflows/linux-release.yml +++ b/.github/workflows/linux-release.yml @@ -38,7 +38,7 @@ jobs: test -f dist/native-runtime/aurora-native-0.1.0-linux-x64.tar.gz test -f dist/linux-unpacked/resources/native-runtime/aurora-native-0.1.0-linux-x64.tar.gz cmp dist/native-runtime/aurora-native-0.1.0-linux-x64.tar.gz dist/linux-unpacked/resources/native-runtime/aurora-native-0.1.0-linux-x64.tar.gz - test -f dist/linux-unpacked/resources/module-catalog/wordpress-1.2.1.pac + test -f dist/linux-unpacked/resources/module-catalog/wordpress-1.2.2.pac test -f dist/linux-unpacked/resources/module-catalog/drupal-1.0.0.pac - name: Create checksums diff --git a/.github/workflows/macos-release.yml b/.github/workflows/macos-release.yml index e655909..1cf659e 100644 --- a/.github/workflows/macos-release.yml +++ b/.github/workflows/macos-release.yml @@ -76,10 +76,10 @@ jobs: - name: Verify embedded PAC catalog run: | - test -f dist/module-catalog/wordpress-1.2.1.pac - test -f "dist/mac-universal/Aurora Dockside.app/Contents/Resources/module-catalog/wordpress-1.2.1.pac" - cmp dist/module-catalog/wordpress-1.2.1.pac "dist/mac-universal/Aurora Dockside.app/Contents/Resources/module-catalog/wordpress-1.2.1.pac" - unzip -t "dist/mac-universal/Aurora Dockside.app/Contents/Resources/module-catalog/wordpress-1.2.1.pac" + test -f dist/module-catalog/wordpress-1.2.2.pac + test -f "dist/mac-universal/Aurora Dockside.app/Contents/Resources/module-catalog/wordpress-1.2.2.pac" + cmp dist/module-catalog/wordpress-1.2.2.pac "dist/mac-universal/Aurora Dockside.app/Contents/Resources/module-catalog/wordpress-1.2.2.pac" + unzip -t "dist/mac-universal/Aurora Dockside.app/Contents/Resources/module-catalog/wordpress-1.2.2.pac" - name: Create checksums run: | diff --git a/package-lock.json b/package-lock.json index e64365c..cae2d78 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "aurora-dockside", - "version": "2.0.0-alpha.38", + "version": "2.0.0-alpha.39", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "aurora-dockside", - "version": "2.0.0-alpha.38", + "version": "2.0.0-alpha.39", "hasInstallScript": true, "dependencies": { "@electron-toolkit/preload": "^3.0.2", diff --git a/package.json b/package.json index 9595804..8ee3b1b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aurora-dockside", - "version": "2.0.0-alpha.38", + "version": "2.0.0-alpha.39", "description": "A modern, modular Docker development platform for building, running, and managing web applications locally.", "desktopName": "aurora-dockside.desktop", "main": "./out/main/index.js", diff --git a/packages/aurora-module-wordpress/main/index.cjs b/packages/aurora-module-wordpress/main/index.cjs index 786d6a1..0e962a9 100644 --- a/packages/aurora-module-wordpress/main/index.cjs +++ b/packages/aurora-module-wordpress/main/index.cjs @@ -73,12 +73,24 @@ exports.projectCreate = async function projectCreate(context) { '--remove-orphans' ]) } - await context.run( - 'download', - command, - [...base, 'core', 'download', `--locale=${s.locale || 'en_US'}`, '--force'], - native ? context.native.commandEnvironment : undefined - ) + if (native && nativePhpPrefix.length) { + const target = Buffer.from(context.directory, 'utf8').toString('base64') + const locale = encodeURIComponent(String(s.locale || 'en_US')) + const download = `$target=base64_decode('${target}');$work=$target.DIRECTORY_SEPARATOR.'.aurora'.DIRECTORY_SEPARATOR.'wordpress-download';$archive=$work.'.zip';@mkdir($work,0777,true);$api=json_decode(file_get_contents('https://api.wordpress.org/core/version-check/1.7/?locale=${locale}'),true);$offer=$api['offers'][0]??null;$url=$offer['packages']['full']??$offer['download']??null;if(!$url||!copy($url,$archive))throw new Exception('Unable to download WordPress.');$zip=new ZipArchive();if($zip->open($archive)!==true)throw new Exception('Unable to open WordPress archive.');if(!$zip->extractTo($work))throw new Exception('Unable to extract WordPress archive.');$zip->close();$source=$work.DIRECTORY_SEPARATOR.'wordpress';foreach(scandir($source) as $entry){if($entry==='.'||$entry==='..')continue;if(!rename($source.DIRECTORY_SEPARATOR.$entry,$target.DIRECTORY_SEPARATOR.$entry))throw new Exception('Unable to install WordPress file: '.$entry);}@rmdir($source);@rmdir($work);@unlink($archive);` + await context.run( + 'download', + context.native.php, + [...nativePhpPrefix, '-r', download], + context.native.commandEnvironment + ) + } else { + await context.run( + 'download', + command, + [...base, 'core', 'download', `--locale=${s.locale || 'en_US'}`, '--force'], + native ? context.native.commandEnvironment : undefined + ) + } await context.run( 'config', command, diff --git a/packages/aurora-module-wordpress/manifest.json b/packages/aurora-module-wordpress/manifest.json index b015613..faf7f4c 100644 --- a/packages/aurora-module-wordpress/manifest.json +++ b/packages/aurora-module-wordpress/manifest.json @@ -1,7 +1,7 @@ { "id": "wordpress", "name": "WordPress", - "version": "1.2.1", + "version": "1.2.2", "category": "application", "description": "WordPress CMS provisioning and WP-CLI tooling.", "main": "main/index.cjs", diff --git a/packages/aurora-module-wordpress/package.json b/packages/aurora-module-wordpress/package.json index 4ae5253..2189ab6 100644 --- a/packages/aurora-module-wordpress/package.json +++ b/packages/aurora-module-wordpress/package.json @@ -1,6 +1,6 @@ { "name": "@aurora/module-wordpress", - "version": "1.2.1", + "version": "1.2.2", "private": true, "description": "WordPress application module for Aurora Dockside", "files": [