@wp-playground/client 3.1.34 → 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.
- package/index.cjs +76 -73
- package/index.d.ts +11 -21
- package/index.js +1755 -1725
- 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
|
|
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;
|
|
@@ -5470,26 +5473,13 @@ export interface StartPlaygroundOptions {
|
|
|
5470
5473
|
sapiName?: string;
|
|
5471
5474
|
mounts?: Array<MountDescriptor>;
|
|
5472
5475
|
/**
|
|
5473
|
-
*
|
|
5476
|
+
* @deprecated Use `wordpressInstallMode` instead.
|
|
5474
5477
|
*
|
|
5475
|
-
*
|
|
5476
|
-
* from `mounts` or a
|
|
5477
|
-
*
|
|
5478
|
-
* This option cannot be set to `true` when `shouldBootWordPress` is `false`,
|
|
5479
|
-
* 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.
|
|
5480
5481
|
*/
|
|
5481
5482
|
shouldInstallWordPress?: boolean;
|
|
5482
|
-
/**
|
|
5483
|
-
* Whether to run WordPress boot setup.
|
|
5484
|
-
*
|
|
5485
|
-
* This is separate from `shouldInstallWordPress` because saved sites can boot
|
|
5486
|
-
* from existing WordPress files without downloading or installing a fresh copy.
|
|
5487
|
-
* Set this to `false` for PHP-only Playgrounds.
|
|
5488
|
-
*
|
|
5489
|
-
* If `shouldInstallWordPress` is `false` and this option is `true`, WordPress
|
|
5490
|
-
* files must already be present, for example via `mounts` or a saved site.
|
|
5491
|
-
*/
|
|
5492
|
-
shouldBootWordPress?: boolean;
|
|
5493
5483
|
/**
|
|
5494
5484
|
* The string prefix used in the site URL served by the currently
|
|
5495
5485
|
* running remote.html. E.g. for a prefix like `/scope:playground/`,
|
|
@@ -5521,7 +5511,7 @@ export interface StartPlaygroundOptions {
|
|
|
5521
5511
|
sqliteDriverVersion?: string;
|
|
5522
5512
|
/**
|
|
5523
5513
|
* How to handle WordPress installation.
|
|
5524
|
-
* Defaults to
|
|
5514
|
+
* Defaults to `download-and-install`.
|
|
5525
5515
|
*/
|
|
5526
5516
|
wordpressInstallMode?: WordPressInstallMode;
|
|
5527
5517
|
/**
|