@wp-playground/client 0.9.29 → 0.9.31

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.
Files changed (4) hide show
  1. package/index.cjs +25 -25
  2. package/index.d.ts +5 -15
  3. package/index.js +1389 -1409
  4. package/package.json +9 -8
package/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  export * from '../../blueprints/src/index.ts';
2
2
  export type { HTTPMethod, PHPRunOptions, PHPRequest, PHPResponse, UniversalPHP, PHPOutput, PHPResponseData, ErrnoError, PHPRequestHandler, PHPRequestHandlerConfiguration, PHPRequestHeaders, SupportedPHPVersion, RmDirOptions, RuntimeType, } from '../../../php-wasm/universal/src/index.ts';
3
3
  export { setPhpIniEntries, SupportedPHPVersions, SupportedPHPVersionsList, LatestSupportedPHPVersion, } from '../../../php-wasm/universal/src/index.ts';
4
- export type { PlaygroundClient } from '../../remote/src/index.ts';
4
+ export type { PlaygroundClient, MountDescriptor } from '../../remote/src/index.ts';
5
5
  export { phpVar, phpVars } from '../../../php-wasm/util/src/index.ts';
6
6
  import { Blueprint, OnStepCompleted } from '../../blueprints/src/index.ts';
7
7
  import { ProgressTracker } from '../../../php-wasm/progress/src/index.ts';
8
- import { PlaygroundClient } from '../../remote/src/index.ts';
8
+ import type { MountDescriptor, PlaygroundClient } from '../../remote/src/index.ts';
9
9
  export interface StartPlaygroundOptions {
10
10
  iframe: HTMLIFrameElement;
11
11
  remoteUrl: string;
@@ -36,6 +36,8 @@ export interface StartPlaygroundOptions {
36
36
  */
37
37
  onBeforeBlueprint?: () => Promise<void>;
38
38
  siteSlug?: string;
39
+ mounts?: Array<MountDescriptor>;
40
+ shouldInstallWordPress?: boolean;
39
41
  }
40
42
  /**
41
43
  * Loads playground in iframe and returns a PlaygroundClient instance.
@@ -44,16 +46,4 @@ export interface StartPlaygroundOptions {
44
46
  * @param options Options for loading the playground.
45
47
  * @returns A PlaygroundClient instance.
46
48
  */
47
- export declare function startPlaygroundWeb({ iframe, blueprint, remoteUrl, progressTracker, disableProgressBar, onBlueprintStepCompleted, onClientConnected, sapiName, onBeforeBlueprint, siteSlug, }: StartPlaygroundOptions): Promise<PlaygroundClient>;
48
- /**
49
- * @deprecated Use `startPlayground` instead.
50
- *
51
- * @param iframe Any iframe with Playground's remote.html loaded.
52
- * @param options Optional. If `loadRemote` is set, the iframe's `src` will be set to that URL.
53
- * In other words, use this option if your iframe doesn't have
54
- * remote.html already
55
- * loaded.
56
- */
57
- export declare function connectPlayground(iframe: HTMLIFrameElement, options?: {
58
- loadRemote?: string;
59
- }): Promise<PlaygroundClient>;
49
+ export declare function startPlaygroundWeb({ iframe, blueprint, remoteUrl, progressTracker, disableProgressBar, onBlueprintStepCompleted, onClientConnected, sapiName, onBeforeBlueprint, mounts, shouldInstallWordPress, }: StartPlaygroundOptions): Promise<PlaygroundClient>;