@wp-playground/remote 3.1.43 → 3.1.45

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.
@@ -0,0 +1 @@
1
+ export declare function isDevServer(url: URL): boolean;
package/lib/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './boot-playground-remote';
2
+ export * from './dev-server';
2
3
  export * from './playground-client';
3
4
  export { MinifiedWordPressVersions, MinifiedWordPressVersionsList, LatestMinifiedWordPressVersion, } from '@wp-playground/wordpress-builds';
@@ -49,6 +49,14 @@ export interface WebClientMixin extends ProgressReceiver {
49
49
  onMessage(listener: MessageListener): Promise<() => Promise<void>>;
50
50
  mountOpfs(options: MountDescriptor, onProgress?: SyncProgressCallback): Promise<void>;
51
51
  flushOpfs(mountpoint: string): Promise<void>;
52
+ /**
53
+ * Flushes and detaches an OPFS mount.
54
+ *
55
+ * On success, clears its tracking. If the final flush fails, keeps the mount
56
+ * registered for retry and rejects with the original persistence error.
57
+ * Other unmount failures clear tracking because the mount did not guarantee
58
+ * that it remained live.
59
+ */
52
60
  unmountOpfs(mountpoint: string): Promise<void>;
53
61
  boot(options: WorkerBootOptions): Promise<void>;
54
62
  }
@@ -14,6 +14,8 @@ export interface MountDescriptor {
14
14
  }
15
15
  export type WorkerBootOptions = {
16
16
  wpVersion?: string;
17
+ /** A caller-provided WordPress archive used instead of downloading one. */
18
+ wordPressZip?: File;
17
19
  sqliteDriverVersion?: string;
18
20
  phpVersion?: AllPHPVersion;
19
21
  sapiName?: string;
@@ -24,9 +26,7 @@ export type WorkerBootOptions = {
24
26
  /** @deprecated Use `wordpressInstallMode` instead. */
25
27
  shouldInstallWordPress?: boolean;
26
28
  corsProxyUrl?: string;
27
- /** When true, skip default WP install and run Blueprints v2 in the worker */
28
- experimentalBlueprintsV2Runner?: boolean;
29
- /** Blueprint v2 declaration to run in the worker when experimental mode is on */
29
+ /** Blueprint v2 declaration used for worker-side execution or preflight checks. */
30
30
  blueprint?: BlueprintDeclaration;
31
31
  /**
32
32
  * How to handle WordPress installation.
@@ -54,7 +54,6 @@ export declare abstract class PlaygroundWorkerEndpoint extends PHPWorker {
54
54
  * A string representing the version of WordPress that was loaded.
55
55
  */
56
56
  loadedWordPressVersion: string | undefined;
57
- blueprintMessageListeners: Array<(message: any) => void | Promise<void>>;
58
57
  unmounts: Record<string, () => any>;
59
58
  private opfsMounts;
60
59
  private networkTransport;
@@ -101,10 +100,17 @@ export declare abstract class PlaygroundWorkerEndpoint extends PHPWorker {
101
100
  hasOpfsMount(mountpoint: string): Promise<boolean>;
102
101
  mountOpfs(options: MountDescriptor, onProgress?: SyncProgressCallback): Promise<void>;
103
102
  flushOpfs(mountpoint: string): Promise<void>;
103
+ /**
104
+ * Flushes and detaches an OPFS mount.
105
+ *
106
+ * On success, clears its tracking. If the final flush fails, keeps the mount
107
+ * registered for retry and rejects with the original persistence error.
108
+ * Other unmount failures clear tracking because the mount did not guarantee
109
+ * that it remained live.
110
+ */
104
111
  unmountOpfs(mountpoint: string): Promise<void>;
105
112
  backfillStaticFilesRemovedFromMinifiedBuild(): Promise<void>;
106
113
  hasCachedStaticFilesRemovedFromMinifiedBuild(): Promise<boolean>;
107
- onBlueprintMessage(listener: (message: any) => void | Promise<void>): Promise<() => Promise<void>>;
108
114
  abstract boot(_: any): Promise<void>;
109
115
  /**
110
116
  * Pre-fetch the slow initial burst of wp_update_* requests to greatly
@@ -7,6 +7,7 @@ export interface ProgressBarOptions {
7
7
  declare class ProgressBar {
8
8
  element: HTMLDivElement;
9
9
  captionElement: HTMLHeadingElement;
10
+ statusElement: HTMLDivElement;
10
11
  caption: string;
11
12
  progress: number;
12
13
  isIndefinite: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wp-playground/remote",
3
- "version": "3.1.43",
3
+ "version": "3.1.45",
4
4
  "description": "WordPress Playground remote host",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,5 +25,5 @@
25
25
  "access": "public",
26
26
  "directory": "../../../dist/packages/playground/remote"
27
27
  },
28
- "gitHead": "7cc9b0e4e673406ca2d1eaf9cbcb40fdb86563fe"
28
+ "gitHead": "d8132e032daf7c1ac2fd568af48444d84a59ced2"
29
29
  }
@@ -1 +0,0 @@
1
- export {};