@wp-playground/remote 3.1.21 → 3.1.22

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.
@@ -1,5 +1,6 @@
1
1
  import type { PlaygroundWorkerEndpoint, WorkerBootOptions, MountDescriptor } from './playground-worker-endpoint';
2
2
  export type { MountDescriptor, WorkerBootOptions };
3
3
  import type { WebClientMixin } from './playground-client';
4
+ type PHPRemoteApi = WebClientMixin & Pick<PlaygroundWorkerEndpoint, 'cli'>;
4
5
  export declare const serviceWorkerUrl: URL;
5
- export declare function bootPlaygroundRemote(): Promise<import("@php-wasm/universal").PublicAPI<WebClientMixin, import("@php-wasm/universal").RemoteAPI<PlaygroundWorkerEndpoint>>>;
6
+ export declare function bootPlaygroundRemote(): Promise<import("@php-wasm/universal").PublicAPI<PHPRemoteApi, import("@php-wasm/universal").RemoteAPI<PlaygroundWorkerEndpoint>>>;
@@ -1,9 +1,9 @@
1
1
  import type { FilesystemOperation } from '@php-wasm/fs-journal';
2
2
  import type { EmscriptenDownloadMonitor } from '@php-wasm/progress';
3
- import type { SyncProgressCallback } from '@php-wasm/web';
3
+ import type { PHPWebExtension, SyncProgressCallback } from '@php-wasm/web';
4
4
  import type { MountDevice } from '@wp-playground/storage';
5
5
  import { createMemoizedFetch } from '@wp-playground/common';
6
- import type { AllPHPVersion, PathAlias, PHP } from '@php-wasm/universal';
6
+ import type { AllPHPVersion, PathAlias, PHP, PHPRequestHandler } from '@php-wasm/universal';
7
7
  import { PHPWorker } from '@php-wasm/universal';
8
8
  import type { BlueprintDeclaration } from '@wp-playground/blueprints';
9
9
  import type { WordPressInstallMode } from '@wp-playground/wordpress';
@@ -18,7 +18,7 @@ export type WorkerBootOptions = {
18
18
  phpVersion?: AllPHPVersion;
19
19
  sapiName?: string;
20
20
  scope: string;
21
- withIntl: boolean;
21
+ extensions?: PHPWebExtension[];
22
22
  withNetworking: boolean;
23
23
  mounts?: Array<MountDescriptor>;
24
24
  shouldInstallWordPress?: boolean;
@@ -57,21 +57,24 @@ export declare abstract class PlaygroundWorkerEndpoint extends PHPWorker {
57
57
  unmounts: Record<string, () => any>;
58
58
  private opfsMounts;
59
59
  private networkTransport;
60
+ private requestHandler;
60
61
  protected downloadMonitor: EmscriptenDownloadMonitor;
61
62
  protected memoizedFetch: ReturnType<typeof createMemoizedFetch>;
62
63
  constructor(monitor: EmscriptenDownloadMonitor);
63
64
  protected computeSiteUrl(scope: string): string;
64
- protected createRequestHandler({ siteUrl, sapiName, corsProxyUrl, knownRemoteAssetPaths, withIntl, withNetworking, phpVersion, pathAliases, }: {
65
+ protected createRequestHandler({ siteUrl, sapiName, corsProxyUrl, knownRemoteAssetPaths, extensions, withNetworking, phpVersion, pathAliases, }: {
65
66
  siteUrl: string;
66
67
  sapiName: string;
67
68
  corsProxyUrl?: string;
68
69
  knownRemoteAssetPaths: Set<string>;
69
- withIntl: boolean;
70
+ extensions?: PHPWebExtension[];
70
71
  withNetworking: boolean;
71
72
  phpVersion: AllPHPVersion;
72
73
  pathAliases?: PathAlias[];
73
- }): Promise<import("@php-wasm/universal").PHPRequestHandler>;
74
+ }): Promise<PHPRequestHandler>;
74
75
  protected finalizeAfterBoot(requestHandler: any, withNetworking: boolean, knownRemoteAssetPaths: Set<string>): Promise<void>;
76
+ protected getRequestHandler(required?: true): PHPRequestHandler;
77
+ protected getRequestHandler(required: false): PHPRequestHandler | undefined;
75
78
  /**
76
79
  * @returns WordPress module details, including the static assets directory and default theme.
77
80
  */
@@ -55,8 +55,8 @@ import type { PHP } from '@php-wasm/universal';
55
55
  * By skipping existing files, we ensure that the backfill process doesn't overwrite any user
56
56
  * changes.
57
57
  */
58
- export declare function backfillStaticFilesRemovedFromMinifiedBuild(php: PHP): Promise<void>;
59
- export declare function hasCachedStaticFilesRemovedFromMinifiedBuild(php: PHP): Promise<boolean>;
58
+ export declare function backfillStaticFilesRemovedFromMinifiedBuild(php?: PHP): Promise<void>;
59
+ export declare function hasCachedStaticFilesRemovedFromMinifiedBuild(php?: PHP): Promise<boolean>;
60
60
  /**
61
61
  * Returns the URL of the wordpress-static.zip file containing all the
62
62
  * static assets missing from the currently load minified build.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wp-playground/remote",
3
- "version": "3.1.21",
3
+ "version": "3.1.22",
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": "5864051cbf4c2a55656112d99a3f1b076bcd67cd"
28
+ "gitHead": "04c986b63dd56fe74e4ed0cf04d00cae7ac050bf"
29
29
  }