@wp-playground/wordpress 3.1.20 → 3.1.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/boot.d.ts CHANGED
@@ -13,6 +13,11 @@ export type DatabaseType = 'sqlite' | 'mysql' | 'custom';
13
13
  export declare function bootWordPressAndRequestHandler(options: BootRequestHandlerOptions & BootWordPressOptions): Promise<PHPRequestHandler>;
14
14
  export interface BootRequestHandlerOptions {
15
15
  createPhpRuntime: (isPrimary?: boolean) => Promise<number>;
16
+ /**
17
+ * PHP version string (e.g. '8.3', '5.2'). Used to gate
18
+ * legacy-PHP-specific behavior in the boot chain.
19
+ */
20
+ phpVersion?: string;
16
21
  onPHPInstanceCreated?: PHPInstanceCreatedHook;
17
22
  maxPhpInstances?: number;
18
23
  /**
@@ -92,6 +97,8 @@ export interface BootRequestHandlerOptions {
92
97
  }
93
98
  export type WordPressInstallMode = 'download-and-install' | 'install-from-existing-files' | 'install-from-existing-files-if-needed' | 'do-not-attempt-installing';
94
99
  export interface BootWordPressOptions {
100
+ /** PHP version string (e.g. '8.3', '5.2'). */
101
+ phpVersion?: string;
95
102
  /**
96
103
  * Mounting and Copying is handled via hooks for starters.
97
104
  *
@@ -0,0 +1,9 @@
1
+ import type { PHPRequestHandler } from '@php-wasm/universal';
2
+ /**
3
+ * Checks if database prerequisites are in place before attempting WordPress installation.
4
+ * This performs lightweight checks that don't require WordPress to be installed.
5
+ */
6
+ export declare function assertDatabasePrerequisites(requestHandler: PHPRequestHandler, { usesSqlite, hasCustomDatabasePath, }: {
7
+ usesSqlite: boolean;
8
+ hasCustomDatabasePath: boolean;
9
+ }): Promise<void>;