@wp-playground/client 3.1.33 → 3.1.35

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.
Files changed (4) hide show
  1. package/index.cjs +77 -74
  2. package/index.d.ts +15 -21
  3. package/index.js +1937 -1906
  4. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -5272,8 +5272,10 @@ export type SyncProgress = {
5272
5272
  files: number;
5273
5273
  /** The number of all files that need to be synced. */
5274
5274
  total: number;
5275
+ /** The current stage of the initial sync. */
5276
+ phase?: "copying" | "flushing";
5275
5277
  };
5276
- export type SyncProgressCallback = (progress: SyncProgress) => void;
5278
+ export type SyncProgressCallback = (progress: SyncProgress) => void | Promise<void>;
5277
5279
  declare function createMemoizedFetch(originalFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>): (url: string, options?: RequestInit) => Promise<Response>;
5278
5280
  export interface MountDescriptor {
5279
5281
  mountpoint: string;
@@ -5289,8 +5291,8 @@ export type WorkerBootOptions = {
5289
5291
  extensions?: PHPWebExtension[];
5290
5292
  withNetworking: boolean;
5291
5293
  mounts?: Array<MountDescriptor>;
5294
+ /** @deprecated Use `wordpressInstallMode` instead. */
5292
5295
  shouldInstallWordPress?: boolean;
5293
- shouldBootWordPress?: boolean;
5294
5296
  corsProxyUrl?: string;
5295
5297
  /** When true, skip default WP install and run Blueprints v2 in the worker */
5296
5298
  experimentalBlueprintsV2Runner?: boolean;
@@ -5298,7 +5300,7 @@ export type WorkerBootOptions = {
5298
5300
  blueprint?: BlueprintDeclaration;
5299
5301
  /**
5300
5302
  * How to handle WordPress installation.
5301
- * Defaults to 'install-from-existing-files-if-needed'.
5303
+ * Defaults to `download-and-install`.
5302
5304
  */
5303
5305
  wordpressInstallMode?: WordPressInstallMode;
5304
5306
  /**
@@ -5354,6 +5356,7 @@ declare abstract class PlaygroundWorkerEndpoint extends PHPWorker {
5354
5356
  all: {
5355
5357
  trunk: string;
5356
5358
  beta: string;
5359
+ "7.0": string;
5357
5360
  "6.9": string;
5358
5361
  "6.8": string;
5359
5362
  "6.7": string;
@@ -5444,6 +5447,10 @@ export interface StartPlaygroundOptions {
5444
5447
  progressTracker?: ProgressTracker;
5445
5448
  disableProgressBar?: boolean;
5446
5449
  blueprint?: BlueprintV1;
5450
+ /**
5451
+ * PHP extensions to install before the runtime starts.
5452
+ */
5453
+ extensions?: PHPWebExtension[];
5447
5454
  /**
5448
5455
  * Prefer experimental Blueprints v2 PHP runner instead of TypeScript steps
5449
5456
  */
@@ -5466,26 +5473,13 @@ export interface StartPlaygroundOptions {
5466
5473
  sapiName?: string;
5467
5474
  mounts?: Array<MountDescriptor>;
5468
5475
  /**
5469
- * Whether to download/install WordPress files.
5470
- *
5471
- * Set this to `false` when WordPress files are already available, for example
5472
- * from `mounts` or a saved site.
5476
+ * @deprecated Use `wordpressInstallMode` instead.
5473
5477
  *
5474
- * This option cannot be set to `true` when `shouldBootWordPress` is `false`,
5475
- * because installing WordPress requires running the WordPress boot setup.
5478
+ * Whether to download/install WordPress files. Set this to `false` when
5479
+ * WordPress files are already available, for example from `mounts` or a
5480
+ * saved site.
5476
5481
  */
5477
5482
  shouldInstallWordPress?: boolean;
5478
- /**
5479
- * Whether to run WordPress boot setup.
5480
- *
5481
- * This is separate from `shouldInstallWordPress` because saved sites can boot
5482
- * from existing WordPress files without downloading or installing a fresh copy.
5483
- * Set this to `false` for PHP-only Playgrounds.
5484
- *
5485
- * If `shouldInstallWordPress` is `false` and this option is `true`, WordPress
5486
- * files must already be present, for example via `mounts` or a saved site.
5487
- */
5488
- shouldBootWordPress?: boolean;
5489
5483
  /**
5490
5484
  * The string prefix used in the site URL served by the currently
5491
5485
  * running remote.html. E.g. for a prefix like `/scope:playground/`,
@@ -5517,7 +5511,7 @@ export interface StartPlaygroundOptions {
5517
5511
  sqliteDriverVersion?: string;
5518
5512
  /**
5519
5513
  * How to handle WordPress installation.
5520
- * Defaults to 'install-from-existing-files-if-needed'.
5514
+ * Defaults to `download-and-install`.
5521
5515
  */
5522
5516
  wordpressInstallMode?: WordPressInstallMode;
5523
5517
  /**