@wp-playground/blueprints 0.6.14 → 0.6.15

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/index.d.ts CHANGED
@@ -932,16 +932,9 @@ export interface ActivatePluginStep {
932
932
  */
933
933
  export declare const activatePlugin: StepHandler<ActivatePluginStep>;
934
934
  /**
935
- * @inheritDoc defineSiteUrl
936
- * @hasRunnableExample
937
- * @example
935
+ * Changes the site URL of the WordPress installation.
938
936
  *
939
- * <code>
940
- * {
941
- * "step": "defineSiteUrl",
942
- * "siteUrl": "https://playground.wordpress.net"
943
- * }
944
- * </code>
937
+ * @inheritDoc defineSiteUrl
945
938
  */
946
939
  export interface DefineSiteUrlStep {
947
940
  step: "defineSiteUrl";
@@ -951,10 +944,33 @@ export interface DefineSiteUrlStep {
951
944
  /**
952
945
  * Sets WP_HOME and WP_SITEURL constants for the WordPress installation.
953
946
  *
947
+ * Beware: Using this step makes no sense on playground.wordpress.net.
948
+ * It is useful when you're building a custom Playground-based tool like wp-now,
949
+ * or deploying Playground on a custom domain.
950
+ *
954
951
  * @param playground The playground client.
955
952
  * @param siteUrl
956
953
  */
957
954
  export declare const defineSiteUrl: StepHandler<DefineSiteUrlStep>;
955
+ export interface InstallAssetOptions {
956
+ /**
957
+ * The zip file to install.
958
+ */
959
+ zipFile: File;
960
+ /**
961
+ * Target path to extract the main folder.
962
+ * @example
963
+ *
964
+ * <code>
965
+ * const targetPath = `${await playground.documentRoot}/wp-content/plugins`;
966
+ * </code>
967
+ */
968
+ targetPath: string;
969
+ /**
970
+ * What to do if the asset already exists.
971
+ */
972
+ ifAlreadyInstalled?: "overwrite" | "skip" | "error";
973
+ }
958
974
  /**
959
975
  * @inheritDoc installPlugin
960
976
  * @hasRunnableExample
@@ -975,7 +991,7 @@ export declare const defineSiteUrl: StepHandler<DefineSiteUrlStep>;
975
991
  * }
976
992
  * </code>
977
993
  */
978
- export interface InstallPluginStep<ResourceType> {
994
+ export interface InstallPluginStep<ResourceType> extends Pick<InstallAssetOptions, "ifAlreadyInstalled"> {
979
995
  /**
980
996
  * The step identifier.
981
997
  */
@@ -1022,7 +1038,7 @@ export declare const installPlugin: StepHandler<InstallPluginStep<File>>;
1022
1038
  * }
1023
1039
  * </code>
1024
1040
  */
1025
- export interface InstallThemeStep<ResourceType> {
1041
+ export interface InstallThemeStep<ResourceType> extends Pick<InstallAssetOptions, "ifAlreadyInstalled"> {
1026
1042
  /**
1027
1043
  * The step identifier.
1028
1044
  */