@wp-playground/client 0.9.46 → 1.0.0

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 +141 -122
  2. package/index.d.ts +13 -1
  3. package/index.js +10832 -5964
  4. package/package.json +10 -8
package/index.d.ts CHANGED
@@ -44,6 +44,18 @@ export interface StartPlaygroundOptions {
44
44
  * for more details.
45
45
  */
46
46
  scope?: string;
47
+ /**
48
+ * Proxy URL to use for cross-origin requests.
49
+ *
50
+ * For example, if corsProxy is set to "https://cors.wordpress.net/proxy.php",
51
+ * then the CORS requests to https://github.com/WordPress/wordpress-playground.git would actually
52
+ * be made to https://cors.wordpress.net/proxy.php/https://github.com/WordPress/wordpress-playground.git.
53
+ *
54
+ * The Blueprints library will arbitrarily choose which requests to proxy. If you need
55
+ * to proxy every single request, do not use this option. Instead, you should preprocess
56
+ * your Blueprint to replace all cross-origin URLs with the proxy URL.
57
+ */
58
+ corsProxy?: string;
47
59
  }
48
60
  /**
49
61
  * Loads playground in iframe and returns a PlaygroundClient instance.
@@ -52,4 +64,4 @@ export interface StartPlaygroundOptions {
52
64
  * @param options Options for loading the playground.
53
65
  * @returns A PlaygroundClient instance.
54
66
  */
55
- export declare function startPlaygroundWeb({ iframe, blueprint, remoteUrl, progressTracker, disableProgressBar, onBlueprintStepCompleted, onClientConnected, sapiName, onBeforeBlueprint, mounts, scope, shouldInstallWordPress, }: StartPlaygroundOptions): Promise<PlaygroundClient>;
67
+ export declare function startPlaygroundWeb({ iframe, blueprint, remoteUrl, progressTracker, disableProgressBar, onBlueprintStepCompleted, onClientConnected, sapiName, onBeforeBlueprint, mounts, scope, corsProxy, shouldInstallWordPress, }: StartPlaygroundOptions): Promise<PlaygroundClient>;