Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fold wordpress-importer download into download-wp-server-files
Register the wordpress-importer plugin as an entry in the existing
FILES_TO_DOWNLOAD registry instead of a standalone script, reusing the shared
fetch/extract/retry plumbing. No behavior change; the plugin still downloads
into wp-files/ at install time and ships in the CLI bundle.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
  • Loading branch information
wojtekn and claude committed Jul 2, 2026
commit 9cf322a94da3d28811ad28b87ec11e7b650c9362
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"start": "npm -w studio-app run start",
"start:test": "DEV_CONFIG_DIR=/tmp/studio-test npm -w studio-app run start",
"start-wayland": "npm -w studio-app run start-wayland",
"postinstall": "patch-package --patch-dir apps/studio/patches && node ./scripts/remove-fs-ext-other-platform-binaries.mjs && tsx ./scripts/download-wp-server-files.ts && node ./scripts/download-available-site-translations.mjs && tsx ./scripts/download-agent-skills.ts && tsx ./scripts/download-wordpress-importer.ts && tsx ./scripts/download-php-binary.ts",
"postinstall": "patch-package --patch-dir apps/studio/patches && node ./scripts/remove-fs-ext-other-platform-binaries.mjs && tsx ./scripts/download-wp-server-files.ts && node ./scripts/download-available-site-translations.mjs && tsx ./scripts/download-agent-skills.ts && tsx ./scripts/download-php-binary.ts",
"package": "tsx ./scripts/package-in-isolation.ts package",
"make": "tsx ./scripts/package-in-isolation.ts make",
"make:windows-x64": "tsx ./scripts/package-in-isolation.ts make:windows-x64",
Expand Down Expand Up @@ -60,7 +60,6 @@
"test:metrics": "npx playwright test --config=./tools/metrics/playwright.metrics.config.ts",
"download-language-packs": "tsx ./scripts/download-language-packs.ts",
"download-agent-skills": "tsx ./scripts/download-agent-skills.ts",
"download-wordpress-importer": "tsx ./scripts/download-wordpress-importer.ts",
"download:php-binary": "tsx ./scripts/download-php-binary.ts",
"eval": "npm run cli:build --silent && npx promptfoo@0.121.4 eval -c scripts/eval/promptfoo.config.yaml",
"eval:view": "npx promptfoo@0.121.4 view"
Expand Down
53 changes: 0 additions & 53 deletions scripts/download-wordpress-importer.ts

This file was deleted.

10 changes: 10 additions & 0 deletions scripts/download-wp-server-files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ async function fetchWithRetry( name: string, url: string ): Promise< Buffer > {
}

const WP_SERVER_FILES_PATH = path.join( import.meta.dirname, '..', 'wp-files' );

// Pinned so builds are reproducible. Bump deliberately.
const WORDPRESS_IMPORTER_VERSION = '0.9.5';
const PHPMYADMIN_PATCH_FILES_PATH = path.join( import.meta.dirname, '..', 'apps', 'cli', 'php' );
const PHPMYADMIN_LOCAL_PATCH_FILES = new Map< string, string >( [
[ 'config.inc.php', path.join( PHPMYADMIN_PATCH_FILES_PATH, 'config.inc.php' ) ],
Expand Down Expand Up @@ -116,6 +119,13 @@ const FILES_TO_DOWNLOAD: FileToDownload[] = [
getUrl: () => PHPMYADMIN_DOWNLOAD_URL,
destinationPath: path.join( WP_SERVER_FILES_PATH, 'phpmyadmin' ),
},
{
name: 'wordpress-importer',
description: `wordpress-importer ${ WORDPRESS_IMPORTER_VERSION }`,
getUrl: () =>
`https://downloads.wordpress.org/plugin/wordpress-importer.${ WORDPRESS_IMPORTER_VERSION }.zip`,
destinationPath: WP_SERVER_FILES_PATH,
},
{
name: 'reprint',
description: `reprint.phar`,
Expand Down
Loading