@wp-playground/blueprints 0.6.13 → 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/blueprint-schema.json +10 -27
- package/index.cjs +14 -14
- package/index.d.ts +27 -11
- package/index.js +666 -653
- package/lib/steps/define-site-url.d.ts +6 -9
- package/lib/steps/install-asset.d.ts +5 -1
- package/lib/steps/install-plugin.d.ts +2 -1
- package/lib/steps/install-theme.d.ts +2 -1
- package/package.json +3 -3
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
import { StepHandler } from '.';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* @hasRunnableExample
|
|
5
|
-
* @example
|
|
3
|
+
* Changes the site URL of the WordPress installation.
|
|
6
4
|
*
|
|
7
|
-
*
|
|
8
|
-
* {
|
|
9
|
-
* "step": "defineSiteUrl",
|
|
10
|
-
* "siteUrl": "https://playground.wordpress.net"
|
|
11
|
-
* }
|
|
12
|
-
* </code>
|
|
5
|
+
* @inheritDoc defineSiteUrl
|
|
13
6
|
*/
|
|
14
7
|
export interface DefineSiteUrlStep {
|
|
15
8
|
step: 'defineSiteUrl';
|
|
@@ -19,6 +12,10 @@ export interface DefineSiteUrlStep {
|
|
|
19
12
|
/**
|
|
20
13
|
* Sets WP_HOME and WP_SITEURL constants for the WordPress installation.
|
|
21
14
|
*
|
|
15
|
+
* Beware: Using this step makes no sense on playground.wordpress.net.
|
|
16
|
+
* It is useful when you're building a custom Playground-based tool like wp-now,
|
|
17
|
+
* or deploying Playground on a custom domain.
|
|
18
|
+
*
|
|
22
19
|
* @param playground The playground client.
|
|
23
20
|
* @param siteUrl
|
|
24
21
|
*/
|
|
@@ -13,11 +13,15 @@ export interface InstallAssetOptions {
|
|
|
13
13
|
* </code>
|
|
14
14
|
*/
|
|
15
15
|
targetPath: string;
|
|
16
|
+
/**
|
|
17
|
+
* What to do if the asset already exists.
|
|
18
|
+
*/
|
|
19
|
+
ifAlreadyInstalled?: 'overwrite' | 'skip' | 'error';
|
|
16
20
|
}
|
|
17
21
|
/**
|
|
18
22
|
* Install asset: Extract folder from zip file and move it to target
|
|
19
23
|
*/
|
|
20
|
-
export declare function installAsset(playground: UniversalPHP, { targetPath, zipFile }: InstallAssetOptions): Promise<{
|
|
24
|
+
export declare function installAsset(playground: UniversalPHP, { targetPath, zipFile, ifAlreadyInstalled, }: InstallAssetOptions): Promise<{
|
|
21
25
|
assetFolderPath: string;
|
|
22
26
|
assetFolderName: string;
|
|
23
27
|
}>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { StepHandler } from '.';
|
|
2
|
+
import { InstallAssetOptions } from './install-asset';
|
|
2
3
|
/**
|
|
3
4
|
* @inheritDoc installPlugin
|
|
4
5
|
* @hasRunnableExample
|
|
@@ -19,7 +20,7 @@ import { StepHandler } from '.';
|
|
|
19
20
|
* }
|
|
20
21
|
* </code>
|
|
21
22
|
*/
|
|
22
|
-
export interface InstallPluginStep<ResourceType> {
|
|
23
|
+
export interface InstallPluginStep<ResourceType> extends Pick<InstallAssetOptions, 'ifAlreadyInstalled'> {
|
|
23
24
|
/**
|
|
24
25
|
* The step identifier.
|
|
25
26
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { StepHandler } from '.';
|
|
2
|
+
import { InstallAssetOptions } from './install-asset';
|
|
2
3
|
/**
|
|
3
4
|
* @inheritDoc installTheme
|
|
4
5
|
* @hasRunnableExample
|
|
@@ -18,7 +19,7 @@ import { StepHandler } from '.';
|
|
|
18
19
|
* }
|
|
19
20
|
* </code>
|
|
20
21
|
*/
|
|
21
|
-
export interface InstallThemeStep<ResourceType> {
|
|
22
|
+
export interface InstallThemeStep<ResourceType> extends Pick<InstallAssetOptions, 'ifAlreadyInstalled'> {
|
|
22
23
|
/**
|
|
23
24
|
* The step identifier.
|
|
24
25
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wp-playground/blueprints",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.15",
|
|
4
4
|
"exports": {
|
|
5
5
|
".": {
|
|
6
6
|
"import": "./index.js",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"access": "public",
|
|
22
22
|
"directory": "../../../dist/packages/playground/blueprints"
|
|
23
23
|
},
|
|
24
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "e05126da329a26535905b0ab65415d20118f0197",
|
|
25
25
|
"engines": {
|
|
26
|
-
"node": ">=18.18.
|
|
26
|
+
"node": ">=18.18.0",
|
|
27
27
|
"npm": ">=8.11.0"
|
|
28
28
|
}
|
|
29
29
|
}
|