@wp-playground/remote 3.1.59 → 3.1.61
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/README.md +13 -0
- package/lib/blueprints-worker.d.ts +9 -0
- package/lib/boot-playground-remote.d.ts +15 -0
- package/lib/config.d.ts +20 -0
- package/lib/connect-shared-runtime.d.ts +15 -0
- package/lib/connect-wordpress-origin.d.ts +40 -0
- package/lib/dev-server.d.ts +12 -0
- package/lib/offline-mode-cache.d.ts +26 -1
- package/lib/playground-client.d.ts +20 -0
- package/lib/playground-worker-endpoint.d.ts +32 -1
- package/lib/request-wordpress-url.d.ts +10 -0
- package/lib/shared-playground-worker.d.ts +2 -0
- package/lib/shared-runtime-service-worker.d.ts +8 -0
- package/lib/shared-runtime.d.ts +36 -0
- package/lib/wordpress-bridge.d.ts +1 -0
- package/lib/wordpress-origin.d.ts +9 -0
- package/lib/wordpress-popup.d.ts +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,6 +6,19 @@ This library was generated with [Nx](https://nx.dev).
|
|
|
6
6
|
|
|
7
7
|
Run `nx build playground-remote` to build the library.
|
|
8
8
|
|
|
9
|
+
## Development
|
|
10
|
+
|
|
11
|
+
`npm run dev` starts this package in the website's `wordpress-frame` Vite mode.
|
|
12
|
+
The website proxies its trusted module requests from port 5400 to this server
|
|
13
|
+
while keeping the app Host header. Direct browser requests to port 4400 can load
|
|
14
|
+
only the WordPress HTTP helper and worker loaders. They cannot load the PHP/API
|
|
15
|
+
documents or arbitrary source modules. The helper imports its code from the app
|
|
16
|
+
port so it still knows which parent may send PHP responses.
|
|
17
|
+
|
|
18
|
+
`nx dev playground-remote` remains a standalone same-origin server. Personal WP,
|
|
19
|
+
sync, and non-loopback forwarded hosts also retain their previous routing.
|
|
20
|
+
See the [website development guide](../website/README.md#development).
|
|
21
|
+
|
|
9
22
|
## Running unit tests
|
|
10
23
|
|
|
11
24
|
Run `nx test playground-remote` to execute the unit tests via [Jest](https://jestjs.io).
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { EmscriptenDownloadMonitor } from '@php-wasm/progress';
|
|
2
|
+
import { PlaygroundWorkerEndpoint, type WorkerBootOptions } from './playground-worker-endpoint';
|
|
3
|
+
export declare class PlaygroundWorkerEndpointBlueprints extends PlaygroundWorkerEndpoint {
|
|
4
|
+
constructor(monitor: EmscriptenDownloadMonitor, privateReady: () => void, privateError: (error: Error) => void);
|
|
5
|
+
private ready;
|
|
6
|
+
private failed;
|
|
7
|
+
/** Boot PHP using the app document's origin choice, including when script bytes are cached. */
|
|
8
|
+
boot({ scope, useWordPressSandbox, mounts, wpVersion, wordPressZip, sqliteDriverVersion, phpVersion, sapiName, extensions, withNetworking, shouldInstallWordPress, wordpressInstallMode, blueprint, corsProxyUrl, pathAliases, }: WorkerBootOptions): Promise<void>;
|
|
9
|
+
}
|
|
@@ -3,4 +3,19 @@ export type { MountDescriptor, WorkerBootOptions };
|
|
|
3
3
|
import type { WebClientMixin } from './playground-client';
|
|
4
4
|
type PHPRemoteApi = WebClientMixin & Pick<PlaygroundWorkerEndpoint, 'cli'>;
|
|
5
5
|
export declare const serviceWorkerUrl: URL;
|
|
6
|
+
/**
|
|
7
|
+
* Start remote.html's PHP host and expose its client API to the embedding window.
|
|
8
|
+
*
|
|
9
|
+
* This document and the PHP worker stay on the app origin. PHP keeps access to
|
|
10
|
+
* the site's OPFS files or user-picked directory handles there. With a separate
|
|
11
|
+
* origin configured, the rendered WordPress iframe uses wordPressSiteUrl; this
|
|
12
|
+
* document and PHP do not move.
|
|
13
|
+
*
|
|
14
|
+
* The returned API's boot() method starts PHP and connects HTTP requests to it.
|
|
15
|
+
* With separate origins it creates a hidden WordPress-origin request iframe;
|
|
16
|
+
* with one origin a dedicated runtime uses the existing service-worker listener.
|
|
17
|
+
* Same-origin shared runtimes receive requests directly through MessagePorts.
|
|
18
|
+
* The WordPress request connection is separate from the full client API exposed
|
|
19
|
+
* to the embedding window: rendered WordPress does not receive that API here.
|
|
20
|
+
*/
|
|
6
21
|
export declare function bootPlaygroundRemote(): Promise<import("@php-wasm/universal").PublicAPI<PHPRemoteApi, import("@php-wasm/universal").RemoteAPI<PlaygroundWorkerEndpoint>>>;
|
package/lib/config.d.ts
CHANGED
|
@@ -1,2 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* App origin, taken from the loaded module URL rather than the current document.
|
|
3
|
+
* The WordPress-origin helper also imports this code from the app host, so using
|
|
4
|
+
* location.origin there would incorrectly identify the WordPress host as the app.
|
|
5
|
+
*/
|
|
6
|
+
export declare const playgroundOrigin: string;
|
|
7
|
+
/**
|
|
8
|
+
* Fixed sandbox origin available to ?reprint sessions. The flag selects this
|
|
9
|
+
* origin; its value must never supply a hostname. Normal sessions keep WordPress
|
|
10
|
+
* on the app origin. PHP, OPFS, and directory handles stay there in both modes.
|
|
11
|
+
* Loopback development offers the remote server's existing port; standalone and
|
|
12
|
+
* custom hosts without a configured sandbox keep one origin.
|
|
13
|
+
*/
|
|
14
|
+
export declare const wordPressSandboxOrigin: string;
|
|
15
|
+
/**
|
|
16
|
+
* Select once for this document. remote.html sends its choice in PHP boot options.
|
|
17
|
+
* Helper and thumbnail documents already on the sandbox origin keep
|
|
18
|
+
* that origin even though ordinary WordPress URLs do not contain the flag.
|
|
19
|
+
* Service workers route by their own origin, never by a tab's startup flag.
|
|
20
|
+
*/
|
|
1
21
|
export declare const wordPressSiteUrl: string;
|
|
2
22
|
export declare const DOCROOT = "/wordpress";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { PlaygroundWorkerEndpoint, WorkerBootOptions } from './playground-worker-endpoint';
|
|
2
|
+
export type SharedRuntimeAPI = PlaygroundWorkerEndpoint & {
|
|
3
|
+
shutdownSharedRuntime(): Promise<void>;
|
|
4
|
+
beginSharedBoot(options: WorkerBootOptions): Promise<boolean>;
|
|
5
|
+
finishSharedRuntimeInitialization(): Promise<void>;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Join this site's shared PHP worker, preserving remote.html's origin choice.
|
|
9
|
+
* Sandbox sessions use the HTTP helper, not a direct app-service-worker port.
|
|
10
|
+
*/
|
|
11
|
+
export declare function connectSharedRuntime(scope: string, version: string, clientVersion: string, onProgress?: (caption: string) => void): Promise<{
|
|
12
|
+
api: import("@php-wasm/web").RemoteAPI<SharedRuntimeAPI>;
|
|
13
|
+
register: (serviceWorker: ServiceWorker) => void;
|
|
14
|
+
isRetired: () => boolean;
|
|
15
|
+
}>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { RemoteAPI } from '@php-wasm/universal';
|
|
2
|
+
import type { PlaygroundWorkerEndpoint } from './playground-worker-endpoint';
|
|
3
|
+
/**
|
|
4
|
+
* Connect WordPress HTTP requests on a separate origin to this app-origin PHP worker.
|
|
5
|
+
*
|
|
6
|
+
* For example, remote.html on playground.wordpress.net runs PHP, but the visible
|
|
7
|
+
* WordPress iframe loads wp.playground.wordpress.net/scope:site-a/. The WordPress
|
|
8
|
+
* service worker cannot message remote.html directly: it can only reach windows
|
|
9
|
+
* on its own origin. This function creates a hidden WordPress-origin iframe as
|
|
10
|
+
* a sibling of the visible WordPress iframe. Requests take this path:
|
|
11
|
+
*
|
|
12
|
+
* WordPress page -> WordPress service worker -> hidden iframe
|
|
13
|
+
* -> remote.html (this listener) -> the supplied PHP worker.
|
|
14
|
+
*
|
|
15
|
+
* Only messages from that exact hidden iframe, at the configured WordPress origin,
|
|
16
|
+
* with the supplied scope reach PHP. The HTTP URL must also use that origin and
|
|
17
|
+
* scope. The connection exposes two operations: HTTP requests and the directory
|
|
18
|
+
* name for shared WordPress assets. It does not forward the full PHP API, file
|
|
19
|
+
* handles, mount options, or requests for a different scope. Response status and
|
|
20
|
+
* headers return as message data; body chunks travel through a MessagePort.
|
|
21
|
+
*
|
|
22
|
+
* Call after PHP has booted. Resolves when the helper reports its service worker
|
|
23
|
+
* is ready, not when a WordPress page has loaded. On success, the hidden iframe
|
|
24
|
+
* and listener remain for the lifetime of remote.html. If no ready message arrives
|
|
25
|
+
* within 30 seconds, both are removed and the promise rejects.
|
|
26
|
+
*
|
|
27
|
+
* After connection, reject app-service-worker HTTP requests for this scope with
|
|
28
|
+
* 404. That worker also serves ordinary, same-origin sites. Returning this site's
|
|
29
|
+
* HTML there would let its scripts run on the app origin with app storage access.
|
|
30
|
+
* The rejection listener lasts with remote.html and survives worker restarts.
|
|
31
|
+
*
|
|
32
|
+
* The scope selects a PHP instance; it does not prove which WordPress page made
|
|
33
|
+
* the HTTP request. Pages sharing the WordPress origin can still request another
|
|
34
|
+
* running site's known scope. This connection also does not prevent WordPress
|
|
35
|
+
* from embedding a fresh app/API document and connecting to that separate API.
|
|
36
|
+
*
|
|
37
|
+
* @param client The already-booted PHP worker that will serve this site's requests.
|
|
38
|
+
* @param scope The site's URL routing scope, as supplied in its PHP boot options.
|
|
39
|
+
*/
|
|
40
|
+
export declare function connectWordPressOrigin(client: RemoteAPI<PlaygroundWorkerEndpoint>, scope: string): Promise<void>;
|
package/lib/dev-server.d.ts
CHANGED
|
@@ -1 +1,13 @@
|
|
|
1
|
+
/** Local aliases shared by origin selection and the remote Vite host checks. */
|
|
2
|
+
export declare const localDevelopmentHostnames: Set<string>;
|
|
3
|
+
/**
|
|
4
|
+
* Map the normal website dev origin to the existing remote server's HTTP port.
|
|
5
|
+
*
|
|
6
|
+
* For example, http://127.0.0.1:5400 uses WordPress on :4400. Keep PHP and its
|
|
7
|
+
* handles on :5400; only rendered pages and their HTTP helper use the other port.
|
|
8
|
+
* Do not rewrite standalone remote, Personal WP, preview, HTTPS, or tunnel URLs:
|
|
9
|
+
* those servers have different routing or cannot expose the local remote port.
|
|
10
|
+
* Call only in development; production origins still come from the build setting.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getWordPressDevelopmentOrigin(app: URL): string | undefined;
|
|
1
13
|
export declare function isDevServer(url: URL): boolean;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export declare function cacheFirstFetch(request: Request): Promise<Response>;
|
|
2
2
|
export declare function networkFirstFetch(request: Request): Promise<Response>;
|
|
3
|
+
/** Fetch the directory index without serving upstream HTML or headers on the app origin. */
|
|
4
|
+
export declare function fetchBlueprintsIndex(): Promise<Response>;
|
|
3
5
|
/**
|
|
4
6
|
* For offline mode to work we need to cache all required assets.
|
|
5
7
|
*
|
|
@@ -7,7 +9,7 @@ export declare function networkFirstFetch(request: Request): Promise<Response>;
|
|
|
7
9
|
* file and contain JavaScript, CSS, and other assets required to load the
|
|
8
10
|
* site without making any network requests.
|
|
9
11
|
*/
|
|
10
|
-
export declare function cacheOfflineModeAssetsForCurrentRelease(): Promise<any>;
|
|
12
|
+
export declare function cacheOfflineModeAssetsForCurrentRelease(excludedAssets?: readonly string[]): Promise<any>;
|
|
11
13
|
/**
|
|
12
14
|
* Remove outdated files from the cache.
|
|
13
15
|
*
|
|
@@ -25,5 +27,28 @@ export declare function purgeEverythingFromPreviousRelease(): Promise<boolean[]>
|
|
|
25
27
|
*/
|
|
26
28
|
export declare function hasCachedResponse(url: string, queryOptions?: CacheQueryOptions): Promise<boolean>;
|
|
27
29
|
export declare function putCachedResponse(request: RequestInfo, response: Response): Promise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* Decide whether this worker may use Playground's CacheStorage for a URL.
|
|
32
|
+
*
|
|
33
|
+
* Only the app-origin worker may use CacheStorage for shared platform downloads.
|
|
34
|
+
* WordPress code can open and change any cache on the WordPress origin, including
|
|
35
|
+
* Playground's cache. Giving the cache a special name does not protect it.
|
|
36
|
+
*
|
|
37
|
+
* For example, a plugin could store a fake response under the cache key
|
|
38
|
+
* https://playground.wordpress.net/wp-6.9/wordpress-static.zip. Without the origin
|
|
39
|
+
* guard, the archive shortcut below would allow the WordPress worker to reuse
|
|
40
|
+
* those attacker-written bytes as a WordPress download. The app hostname in the
|
|
41
|
+
* key does not protect the entry: the cache still belongs to the WordPress origin.
|
|
42
|
+
*
|
|
43
|
+
* Reject WordPress-origin CacheStorage before checking the requested URL. The app
|
|
44
|
+
* can still cache its own shared downloads, and WordPress-side fetches can use the
|
|
45
|
+
* browser HTTP cache. This rule does not disable HTTP caching or require a separate
|
|
46
|
+
* copy of every download for each Playground.
|
|
47
|
+
*
|
|
48
|
+
* On the app origin, the WordPress static-archive shortcut is checked first.
|
|
49
|
+
* For other URLs, exclude live scoped responses, PHP endpoints, and Vite
|
|
50
|
+
* development assets. The final origin check also rejects other ports, which
|
|
51
|
+
* may serve a live site's responses rather than reusable platform files.
|
|
52
|
+
*/
|
|
28
53
|
export declare function shouldCacheUrl(url: URL): boolean;
|
|
29
54
|
export declare function isCurrentServiceWorkerActive(): boolean;
|
|
@@ -92,6 +92,26 @@ export interface WebClientMixin extends ProgressReceiver {
|
|
|
92
92
|
*/
|
|
93
93
|
unmountOpfs(mountpoint: string): Promise<void>;
|
|
94
94
|
boot(options: WorkerBootOptions): Promise<void>;
|
|
95
|
+
/**
|
|
96
|
+
* Retires the shared runtime for all connected tabs. Stops accepting new work,
|
|
97
|
+
* drains active operations, flushes and unmounts OPFS, and disposes PHP before
|
|
98
|
+
* confirming shutdown. Rejects if retirement fails. Dedicated runtimes ignore this call.
|
|
99
|
+
*/
|
|
100
|
+
shutdownSharedRuntime(): Promise<void>;
|
|
101
|
+
/**
|
|
102
|
+
* Whether this connection owns initial Blueprint execution. Always true for a
|
|
103
|
+
* dedicated runtime. Used by the client startup handlers, not application code.
|
|
104
|
+
* @internal
|
|
105
|
+
*/
|
|
106
|
+
shouldRunStartupBlueprint(): Promise<boolean>;
|
|
107
|
+
/**
|
|
108
|
+
* Signals that the initializing connection has finished its startup Blueprint,
|
|
109
|
+
* allowing waiting tabs to attach. Only that connection may complete initialization.
|
|
110
|
+
* Used by the client startup handlers, including after Blueprint errors so recovery
|
|
111
|
+
* tools remain available. Dedicated runtimes ignore this call.
|
|
112
|
+
* @internal
|
|
113
|
+
*/
|
|
114
|
+
finishSharedRuntimeInitialization(): Promise<void>;
|
|
95
115
|
}
|
|
96
116
|
export type SiteThumbnail = {
|
|
97
117
|
/** The encoded image's MIME type. */
|
|
@@ -13,6 +13,8 @@ export interface MountDescriptor {
|
|
|
13
13
|
initialSyncDirection: 'opfs-to-memfs' | 'memfs-to-opfs';
|
|
14
14
|
}
|
|
15
15
|
export type WorkerBootOptions = {
|
|
16
|
+
/** remote.html selects this from its startup flag, not the cached worker URL. */
|
|
17
|
+
useWordPressSandbox?: boolean;
|
|
16
18
|
wpVersion?: string;
|
|
17
19
|
/** A caller-provided WordPress archive used instead of downloading one. */
|
|
18
20
|
wordPressZip?: File;
|
|
@@ -71,7 +73,22 @@ export declare abstract class PlaygroundWorkerEndpoint extends PHPWorker {
|
|
|
71
73
|
private emailParsingQueue;
|
|
72
74
|
protected downloadMonitor: EmscriptenDownloadMonitor;
|
|
73
75
|
constructor(monitor: EmscriptenDownloadMonitor);
|
|
74
|
-
|
|
76
|
+
/** Use the boot message's choice so a cached script cannot select another tab's mode. */
|
|
77
|
+
protected computeSiteUrl(scope: string, useWordPressSandbox?: boolean): string;
|
|
78
|
+
/**
|
|
79
|
+
* Create the PHP runtime pool and route siteUrl requests into its WordPress files.
|
|
80
|
+
*
|
|
81
|
+
* siteUrl is WordPress's public scoped URL, even when PHP runs on the app origin.
|
|
82
|
+
* For each PHP instance, define PLAYGROUND_PARENT_ORIGIN in split-origin mode.
|
|
83
|
+
* The injected WordPress scripts use it to send navigation, pointer, thumbnail,
|
|
84
|
+
* and tool messages back to remote.html instead of assuming their parent shares
|
|
85
|
+
* WordPress's origin. The value comes from the app module URL, not user input.
|
|
86
|
+
*
|
|
87
|
+
* Known remote asset paths get a marked 404 when absent from the local files.
|
|
88
|
+
* The service worker uses that marker to fetch the shared public asset instead
|
|
89
|
+
* of treating every missing URL, including PHP routes, as a static download.
|
|
90
|
+
* Existing runtime hooks set up networking, mail capture, and shared files.
|
|
91
|
+
*/
|
|
75
92
|
protected createRequestHandler({ siteUrl, sapiName, corsProxyUrl, knownRemoteAssetPaths, extensions, withNetworking, phpVersion, pathAliases, onProgress, }: {
|
|
76
93
|
siteUrl: string;
|
|
77
94
|
sapiName: string;
|
|
@@ -83,6 +100,20 @@ export declare abstract class PlaygroundWorkerEndpoint extends PHPWorker {
|
|
|
83
100
|
pathAliases?: PathAlias[];
|
|
84
101
|
onProgress?: (caption: string) => void;
|
|
85
102
|
}): Promise<PHPRequestHandler>;
|
|
103
|
+
/**
|
|
104
|
+
* Finish WordPress startup and identify static files omitted from minified builds.
|
|
105
|
+
*
|
|
106
|
+
* Enable outbound networking only after installation, then read the installed
|
|
107
|
+
* WordPress version. A saved site may contain a different version than requested;
|
|
108
|
+
* using the requested version could select the wrong public asset directory.
|
|
109
|
+
*
|
|
110
|
+
* Older saved sites may lack wordpress-remote-asset-paths. Fetch that list from
|
|
111
|
+
* the installed version's directory on the shared app origin and save it in the
|
|
112
|
+
* site's files. The WordPress host serves virtual site pages, not these platform
|
|
113
|
+
* downloads. Add the listed paths to the set used by createRequestHandler() to
|
|
114
|
+
* distinguish omitted static files from normal WordPress 404s. If recovery fails,
|
|
115
|
+
* log a warning and continue startup without the missing list.
|
|
116
|
+
*/
|
|
86
117
|
protected finalizeAfterBoot(requestHandler: any, withNetworking: boolean, knownRemoteAssetPaths: Set<string>): Promise<void>;
|
|
87
118
|
protected getRequestHandler(required?: true): PHPRequestHandler;
|
|
88
119
|
protected getRequestHandler(required: false): PHPRequestHandler | undefined;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ask the WordPress document for its live location, including changes from pushState().
|
|
3
|
+
* Such changes do not update iframe.src and may have happened since the last URL report.
|
|
4
|
+
*
|
|
5
|
+
* Send a new reply port only to the expected WordPress origin. Each call has its own
|
|
6
|
+
* port, so a late reply to an earlier request cannot satisfy this one. Return undefined
|
|
7
|
+
* if no reply arrives within 500ms or the request fails. The caller can then try reading
|
|
8
|
+
* location directly or use iframe.src. A timeout does not prove the page has no reporter.
|
|
9
|
+
*/
|
|
10
|
+
export declare function requestWordPressUrl(frame: HTMLIFrameElement, wordPressOrigin: string): Promise<string | undefined>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference lib="webworker" />
|
|
2
|
+
export declare function registerSharedRuntime(event: ExtendableMessageEvent): void;
|
|
3
|
+
/** Restores a direct route after ServiceWorker eviction, contacting one remote document. */
|
|
4
|
+
export declare function hasSharedRuntime(scope: string): Promise<boolean>;
|
|
5
|
+
export declare function sendSharedRuntimeRequest(message: {
|
|
6
|
+
method: string;
|
|
7
|
+
args: any[];
|
|
8
|
+
}, scope: string, requestClient?: Pick<FetchEvent, 'clientId' | 'resultingClientId'>): Promise<any>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { PlaygroundWorkerEndpoint } from './playground-worker-endpoint';
|
|
2
|
+
export declare const RELOAD_REQUIRED = "playground-reload-required";
|
|
3
|
+
export declare const RUNTIME_CLOSED = "playground-runtime-closed";
|
|
4
|
+
/** One runtime per site; connected documents never own its lifetime. */
|
|
5
|
+
export declare class SharedRuntime {
|
|
6
|
+
private bootPromise?;
|
|
7
|
+
private initialized;
|
|
8
|
+
private initializer?;
|
|
9
|
+
private initializationComplete;
|
|
10
|
+
private resolveInitialization;
|
|
11
|
+
private rejectInitialization;
|
|
12
|
+
private active;
|
|
13
|
+
private retiring?;
|
|
14
|
+
private retired;
|
|
15
|
+
private closed;
|
|
16
|
+
private runtimeId;
|
|
17
|
+
private ports;
|
|
18
|
+
private servicePorts;
|
|
19
|
+
private readiness;
|
|
20
|
+
constructor(endpoint: PlaygroundWorkerEndpoint, version: string, onClose: () => void);
|
|
21
|
+
private endpoint;
|
|
22
|
+
private version;
|
|
23
|
+
private close;
|
|
24
|
+
connect(port: MessagePort, ready: () => void, failed: (error: Error) => void): void;
|
|
25
|
+
registerServicePort(port: MessagePort): void;
|
|
26
|
+
/** Serves HTTP once through a direct port and keeps retirement waiting for the body. */
|
|
27
|
+
handleServiceWorkerRequest(message: {
|
|
28
|
+
method: string;
|
|
29
|
+
args: any[];
|
|
30
|
+
requestId: number;
|
|
31
|
+
}, port: MessagePort): Promise<void>;
|
|
32
|
+
api(port?: MessagePort): PlaygroundWorkerEndpoint;
|
|
33
|
+
retire(): Promise<void>;
|
|
34
|
+
private beginBoot;
|
|
35
|
+
private run;
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Select the configured sandbox for ?reprint; never take a hostname from its value.
|
|
3
|
+
*
|
|
4
|
+
* For example, app/remote.html?reprint selects the sandbox. A WordPress page
|
|
5
|
+
* already on that sandbox keeps it without putting ?reprint on every navigation.
|
|
6
|
+
* Other app documents use the app origin.
|
|
7
|
+
* The presence of the flag enables the sandbox, even for ?reprint=0.
|
|
8
|
+
*/
|
|
9
|
+
export declare function selectWordPressOrigin(context: URL, appOrigin: string, sandboxOrigin: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wp-playground/remote",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.61",
|
|
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": "
|
|
28
|
+
"gitHead": "1e779217fceedb5b29b1359a196dc97ce40f31de"
|
|
29
29
|
}
|