@wp-playground/remote 3.1.50 → 3.1.52

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.
@@ -24,5 +24,6 @@ export declare function purgeEverythingFromPreviousRelease(): Promise<boolean[]>
24
24
  * Ignores the search part of the URL by default.
25
25
  */
26
26
  export declare function hasCachedResponse(url: string, queryOptions?: CacheQueryOptions): Promise<boolean>;
27
+ export declare function putCachedResponse(request: RequestInfo, response: Response): Promise<void>;
27
28
  export declare function shouldCacheUrl(url: URL): boolean;
28
29
  export declare function isCurrentServiceWorkerActive(): boolean;
@@ -6,6 +6,7 @@ import type { MessageListener, UniversalPHP } from '@php-wasm/universal';
6
6
  import type { RemoteAPI, SyncProgressCallback } from '@php-wasm/web';
7
7
  import type { ProgressBarOptions } from './progress-bar';
8
8
  import type { PlaygroundWorkerEndpoint, MountDescriptor, WorkerBootOptions } from './playground-worker-endpoint';
9
+ export type { BootProgressEvent } from './playground-worker-endpoint';
9
10
  export interface WebClientMixin extends ProgressReceiver {
10
11
  /**
11
12
  * Sets the progress bar options.
@@ -2,7 +2,6 @@ import type { FilesystemOperation } from '@php-wasm/fs-journal';
2
2
  import type { EmscriptenDownloadMonitor } from '@php-wasm/progress';
3
3
  import type { PHPWebExtension, SyncProgressCallback } from '@php-wasm/web';
4
4
  import type { MountDevice } from '@wp-playground/storage';
5
- import { createMemoizedFetch } from '@wp-playground/common';
6
5
  import type { AllPHPVersion, PathAlias, PHP, PHPRequestHandler } from '@php-wasm/universal';
7
6
  import { PHPWorker } from '@php-wasm/universal';
8
7
  import type { BlueprintDeclaration } from '@wp-playground/blueprints';
@@ -40,6 +39,15 @@ export type WorkerBootOptions = {
40
39
  pathAliases?: PathAlias[];
41
40
  };
42
41
  /** @inheritDoc PHPClient */
42
+ /**
43
+ * Dispatched by the worker as the runtime boot advances to a new step.
44
+ * Listen with `addEventListener('boot.progress', ...)`.
45
+ */
46
+ export interface BootProgressEvent {
47
+ type: 'boot.progress';
48
+ /** Human-readable description of the step that just started. */
49
+ caption: string;
50
+ }
43
51
  export declare abstract class PlaygroundWorkerEndpoint extends PHPWorker {
44
52
  booted: boolean;
45
53
  /**
@@ -59,10 +67,9 @@ export declare abstract class PlaygroundWorkerEndpoint extends PHPWorker {
59
67
  private networkTransport;
60
68
  private requestHandler;
61
69
  protected downloadMonitor: EmscriptenDownloadMonitor;
62
- protected memoizedFetch: ReturnType<typeof createMemoizedFetch>;
63
70
  constructor(monitor: EmscriptenDownloadMonitor);
64
71
  protected computeSiteUrl(scope: string): string;
65
- protected createRequestHandler({ siteUrl, sapiName, corsProxyUrl, knownRemoteAssetPaths, extensions, withNetworking, phpVersion, pathAliases, }: {
72
+ protected createRequestHandler({ siteUrl, sapiName, corsProxyUrl, knownRemoteAssetPaths, extensions, withNetworking, phpVersion, pathAliases, onProgress, }: {
66
73
  siteUrl: string;
67
74
  sapiName: string;
68
75
  corsProxyUrl?: string;
@@ -71,6 +78,7 @@ export declare abstract class PlaygroundWorkerEndpoint extends PHPWorker {
71
78
  withNetworking: boolean;
72
79
  phpVersion: AllPHPVersion;
73
80
  pathAliases?: PathAlias[];
81
+ onProgress?: (caption: string) => void;
74
82
  }): Promise<PHPRequestHandler>;
75
83
  protected finalizeAfterBoot(requestHandler: any, withNetworking: boolean, knownRemoteAssetPaths: Set<string>): Promise<void>;
76
84
  protected getRequestHandler(required?: true): PHPRequestHandler;
@@ -86,6 +94,7 @@ export declare abstract class PlaygroundWorkerEndpoint extends PHPWorker {
86
94
  all: {
87
95
  trunk: string;
88
96
  beta: string;
97
+ "7.1": string;
89
98
  "7.0": string;
90
99
  "6.9": string;
91
100
  "6.8": string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wp-playground/remote",
3
- "version": "3.1.50",
3
+ "version": "3.1.52",
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": "5cf38771ff2d430cf683d33b3d8f28731552ef82"
28
+ "gitHead": "a6ed3872674399baa47c2f55fe1e660633fc8051"
29
29
  }