@wp-playground/client 3.1.34 → 3.1.36
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 +14 -22
- package/index.js +1792 -1736
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -1832,6 +1832,8 @@ export declare class ErrnoError extends Error {
|
|
|
1832
1832
|
node?: any;
|
|
1833
1833
|
errno: number;
|
|
1834
1834
|
}
|
|
1835
|
+
export declare const PHPNextVersion = "next";
|
|
1836
|
+
export type PHPNextVersion = typeof PHPNextVersion;
|
|
1835
1837
|
export declare const SupportedPHPVersions: readonly [
|
|
1836
1838
|
"8.5",
|
|
1837
1839
|
"8.4",
|
|
@@ -1848,7 +1850,7 @@ declare const LegacyPHPVersions: readonly [
|
|
|
1848
1850
|
"5.2"
|
|
1849
1851
|
];
|
|
1850
1852
|
export type LegacyPHPVersion = (typeof LegacyPHPVersions)[number];
|
|
1851
|
-
export type AllPHPVersion = SupportedPHPVersion | LegacyPHPVersion;
|
|
1853
|
+
export type AllPHPVersion = PHPNextVersion | SupportedPHPVersion | LegacyPHPVersion;
|
|
1852
1854
|
export interface FileTree extends Record<string, Uint8Array | string | FileTree> {
|
|
1853
1855
|
}
|
|
1854
1856
|
/**
|
|
@@ -5272,8 +5274,10 @@ export type SyncProgress = {
|
|
|
5272
5274
|
files: number;
|
|
5273
5275
|
/** The number of all files that need to be synced. */
|
|
5274
5276
|
total: number;
|
|
5277
|
+
/** The current stage of the initial sync. */
|
|
5278
|
+
phase?: "copying" | "flushing";
|
|
5275
5279
|
};
|
|
5276
|
-
export type SyncProgressCallback = (progress: SyncProgress) => void
|
|
5280
|
+
export type SyncProgressCallback = (progress: SyncProgress) => void | Promise<void>;
|
|
5277
5281
|
declare function createMemoizedFetch(originalFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>): (url: string, options?: RequestInit) => Promise<Response>;
|
|
5278
5282
|
export interface MountDescriptor {
|
|
5279
5283
|
mountpoint: string;
|
|
@@ -5289,8 +5293,8 @@ export type WorkerBootOptions = {
|
|
|
5289
5293
|
extensions?: PHPWebExtension[];
|
|
5290
5294
|
withNetworking: boolean;
|
|
5291
5295
|
mounts?: Array<MountDescriptor>;
|
|
5296
|
+
/** @deprecated Use `wordpressInstallMode` instead. */
|
|
5292
5297
|
shouldInstallWordPress?: boolean;
|
|
5293
|
-
shouldBootWordPress?: boolean;
|
|
5294
5298
|
corsProxyUrl?: string;
|
|
5295
5299
|
/** When true, skip default WP install and run Blueprints v2 in the worker */
|
|
5296
5300
|
experimentalBlueprintsV2Runner?: boolean;
|
|
@@ -5298,7 +5302,7 @@ export type WorkerBootOptions = {
|
|
|
5298
5302
|
blueprint?: BlueprintDeclaration;
|
|
5299
5303
|
/**
|
|
5300
5304
|
* How to handle WordPress installation.
|
|
5301
|
-
* Defaults to
|
|
5305
|
+
* Defaults to `download-and-install`.
|
|
5302
5306
|
*/
|
|
5303
5307
|
wordpressInstallMode?: WordPressInstallMode;
|
|
5304
5308
|
/**
|
|
@@ -5354,6 +5358,7 @@ declare abstract class PlaygroundWorkerEndpoint extends PHPWorker {
|
|
|
5354
5358
|
all: {
|
|
5355
5359
|
trunk: string;
|
|
5356
5360
|
beta: string;
|
|
5361
|
+
"7.0": string;
|
|
5357
5362
|
"6.9": string;
|
|
5358
5363
|
"6.8": string;
|
|
5359
5364
|
"6.7": string;
|
|
@@ -5470,26 +5475,13 @@ export interface StartPlaygroundOptions {
|
|
|
5470
5475
|
sapiName?: string;
|
|
5471
5476
|
mounts?: Array<MountDescriptor>;
|
|
5472
5477
|
/**
|
|
5473
|
-
*
|
|
5478
|
+
* @deprecated Use `wordpressInstallMode` instead.
|
|
5474
5479
|
*
|
|
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.
|
|
5480
|
+
* Whether to download/install WordPress files. Set this to `false` when
|
|
5481
|
+
* WordPress files are already available, for example from `mounts` or a
|
|
5482
|
+
* saved site.
|
|
5480
5483
|
*/
|
|
5481
5484
|
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
5485
|
/**
|
|
5494
5486
|
* The string prefix used in the site URL served by the currently
|
|
5495
5487
|
* running remote.html. E.g. for a prefix like `/scope:playground/`,
|
|
@@ -5521,7 +5513,7 @@ export interface StartPlaygroundOptions {
|
|
|
5521
5513
|
sqliteDriverVersion?: string;
|
|
5522
5514
|
/**
|
|
5523
5515
|
* How to handle WordPress installation.
|
|
5524
|
-
* Defaults to
|
|
5516
|
+
* Defaults to `download-and-install`.
|
|
5525
5517
|
*/
|
|
5526
5518
|
wordpressInstallMode?: WordPressInstallMode;
|
|
5527
5519
|
/**
|