@wp-playground/blueprints 0.9.28 → 0.9.29
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.js +5 -5
- package/lib/blueprint.d.ts +2 -1
- package/lib/resources.d.ts +6 -3
- package/lib/steps/activate-plugin.d.ts +5 -1
- package/lib/steps/request.d.ts +2 -1
- package/lib/steps/reset-data.d.ts +2 -2
- package/lib/steps/run-php-with-options.d.ts +2 -1
- package/lib/steps/run-php.d.ts +3 -1
- package/lib/steps/wp-cli.d.ts +4 -3
- package/lib/utils/flatten-directory.d.ts +2 -2
- package/package.json +11 -11
package/index.js
CHANGED
|
@@ -11400,13 +11400,13 @@ function Ft(r, {
|
|
|
11400
11400
|
resource: "url",
|
|
11401
11401
|
/**
|
|
11402
11402
|
* Use compression for downloading the wp-cli.phar file.
|
|
11403
|
-
* The official release, hosted at raw.githubusercontent.com, is ~7MB
|
|
11404
|
-
* transfer is uncompressed. playground.wordpress.net supports
|
|
11405
|
-
* and only transmits ~1.4MB.
|
|
11403
|
+
* The official release, hosted at raw.githubusercontent.com, is ~7MB
|
|
11404
|
+
* and the transfer is uncompressed. playground.wordpress.net supports
|
|
11405
|
+
* transfer compression and only transmits ~1.4MB.
|
|
11406
11406
|
*
|
|
11407
11407
|
* @TODO: minify the wp-cli.phar file. It can be as small as 1MB when all the
|
|
11408
|
-
* whitespaces and are removed, and even 500KB when libraries
|
|
11409
|
-
* JavaScript parser or Composer are removed.
|
|
11408
|
+
* whitespaces and are removed, and even 500KB when libraries
|
|
11409
|
+
* like the JavaScript parser or Composer are removed.
|
|
11410
11410
|
*/
|
|
11411
11411
|
url: "https://playground.wordpress.net/wp-cli.phar"
|
|
11412
11412
|
},
|
package/lib/blueprint.d.ts
CHANGED
|
@@ -32,7 +32,8 @@ export interface Blueprint {
|
|
|
32
32
|
*/
|
|
33
33
|
author: string;
|
|
34
34
|
/**
|
|
35
|
-
* Relevant categories to help users find your Blueprint in the future
|
|
35
|
+
* Relevant categories to help users find your Blueprint in the future
|
|
36
|
+
* Blueprints section on WordPress.org.
|
|
36
37
|
*/
|
|
37
38
|
categories?: string[];
|
|
38
39
|
};
|
package/lib/resources.d.ts
CHANGED
|
@@ -69,7 +69,8 @@ export declare abstract class Resource {
|
|
|
69
69
|
get isAsync(): boolean;
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
72
|
-
* A `Resource` that represents a file in the VFS (virtual file system) of the
|
|
72
|
+
* A `Resource` that represents a file in the VFS (virtual file system) of the
|
|
73
|
+
* playground.
|
|
73
74
|
*/
|
|
74
75
|
export declare class VFSResource extends Resource {
|
|
75
76
|
private resource;
|
|
@@ -173,7 +174,8 @@ export declare class CorePluginResource extends FetchResource {
|
|
|
173
174
|
*/
|
|
174
175
|
export declare function toDirectoryZipName(rawInput: string): string;
|
|
175
176
|
/**
|
|
176
|
-
* A decorator for a resource that adds functionality such as progress tracking
|
|
177
|
+
* A decorator for a resource that adds functionality such as progress tracking
|
|
178
|
+
* and caching.
|
|
177
179
|
*/
|
|
178
180
|
export declare class DecoratedResource<T extends Resource> extends Resource {
|
|
179
181
|
private resource;
|
|
@@ -200,7 +202,8 @@ export declare class CachedResource<T extends Resource> extends DecoratedResourc
|
|
|
200
202
|
resolve(): Promise<File>;
|
|
201
203
|
}
|
|
202
204
|
/**
|
|
203
|
-
* A decorator for a resource that adds concurrency control functionality
|
|
205
|
+
* A decorator for a resource that adds concurrency control functionality
|
|
206
|
+
* through a semaphore.
|
|
204
207
|
*/
|
|
205
208
|
export declare class SemaphoreResource<T extends Resource> extends DecoratedResource<T> {
|
|
206
209
|
private readonly semaphore;
|
|
@@ -13,7 +13,11 @@ import { StepHandler } from '.';
|
|
|
13
13
|
*/
|
|
14
14
|
export interface ActivatePluginStep {
|
|
15
15
|
step: 'activatePlugin';
|
|
16
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* Path to the plugin directory as absolute path
|
|
18
|
+
* (/wordpress/wp-content/plugins/plugin-name); or the plugin entry file
|
|
19
|
+
* relative to the plugins directory (plugin-name/plugin-name.php).
|
|
20
|
+
*/
|
|
17
21
|
pluginPath: string;
|
|
18
22
|
/** Optional. Plugin name to display in the progress bar. */
|
|
19
23
|
pluginName?: string;
|
package/lib/steps/request.d.ts
CHANGED
|
@@ -24,7 +24,8 @@ import { StepHandler } from '.';
|
|
|
24
24
|
export interface RequestStep {
|
|
25
25
|
step: 'request';
|
|
26
26
|
/**
|
|
27
|
-
* Request details (See
|
|
27
|
+
* Request details (See
|
|
28
|
+
* /wordpress-playground/api/universal/interface/PHPRequest)
|
|
28
29
|
*/
|
|
29
30
|
request: PHPRequest;
|
|
30
31
|
}
|
|
@@ -13,8 +13,8 @@ export interface ResetDataStep {
|
|
|
13
13
|
step: 'resetData';
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
* Deletes WordPress posts and comments and sets the auto increment sequence
|
|
17
|
-
* posts and comments tables to 0.
|
|
16
|
+
* Deletes WordPress posts and comments and sets the auto increment sequence
|
|
17
|
+
* for the posts and comments tables to 0.
|
|
18
18
|
*
|
|
19
19
|
* @param playground Playground client.
|
|
20
20
|
*/
|
|
@@ -20,7 +20,8 @@ import { PHPRunOptions } from '../../../../../php-wasm/universal/src/index.ts';
|
|
|
20
20
|
export interface RunPHPWithOptionsStep {
|
|
21
21
|
step: 'runPHPWithOptions';
|
|
22
22
|
/**
|
|
23
|
-
* Run options (See
|
|
23
|
+
* Run options (See
|
|
24
|
+
* /wordpress-playground/api/universal/interface/PHPRunOptions/))
|
|
24
25
|
*/
|
|
25
26
|
options: PHPRunOptions;
|
|
26
27
|
}
|
package/lib/steps/run-php.d.ts
CHANGED
|
@@ -8,7 +8,9 @@ import { StepHandler } from '.';
|
|
|
8
8
|
* <code>
|
|
9
9
|
* {
|
|
10
10
|
* "step": "runPHP",
|
|
11
|
-
* "code": "<?php require_once 'wordpress/wp-load.php';
|
|
11
|
+
* "code": "<?php require_once 'wordpress/wp-load.php';
|
|
12
|
+
* wp_insert_post(array('post_title' => 'wp-load.php required for WP
|
|
13
|
+
* functionality', 'post_status' => 'publish')); ?>"
|
|
12
14
|
* }
|
|
13
15
|
* </code>
|
|
14
16
|
*/
|
package/lib/steps/wp-cli.d.ts
CHANGED
|
@@ -8,7 +8,8 @@ import { StepHandler } from '.';
|
|
|
8
8
|
* <code>
|
|
9
9
|
* {
|
|
10
10
|
* "step": "wp-cli",
|
|
11
|
-
* "command": "wp post create --post_title='Test post' --post_excerpt='Some
|
|
11
|
+
* "command": "wp post create --post_title='Test post' --post_excerpt='Some
|
|
12
|
+
* content'"
|
|
12
13
|
* }
|
|
13
14
|
* </code>
|
|
14
15
|
*/
|
|
@@ -26,8 +27,8 @@ export interface WPCLIStep {
|
|
|
26
27
|
export declare const wpCLI: StepHandler<WPCLIStep, Promise<PHPResponse>>;
|
|
27
28
|
/**
|
|
28
29
|
* Naive shell command parser.
|
|
29
|
-
* Ensures that commands like `wp option set blogname "My blog name"` are split
|
|
30
|
-
* `['wp', 'option', 'set', 'blogname', 'My blog name']` instead of
|
|
30
|
+
* Ensures that commands like `wp option set blogname "My blog name"` are split
|
|
31
|
+
* into `['wp', 'option', 'set', 'blogname', 'My blog name']` instead of
|
|
31
32
|
* `['wp', 'option', 'set', 'blogname', 'My', 'blog', 'name']`.
|
|
32
33
|
*
|
|
33
34
|
* @param command
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { UniversalPHP } from '../../../../../php-wasm/universal/src/index.ts';
|
|
2
2
|
/**
|
|
3
3
|
* Flattens a directory.
|
|
4
|
-
* If the directory contains only one file, it will be moved to the parent
|
|
5
|
-
* Otherwise, the directory will be renamed to the default name.
|
|
4
|
+
* If the directory contains only one file, it will be moved to the parent
|
|
5
|
+
* directory. Otherwise, the directory will be renamed to the default name.
|
|
6
6
|
*
|
|
7
7
|
* @param php Playground client.
|
|
8
8
|
* @param directoryPath The directory to flatten.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wp-playground/blueprints",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.29",
|
|
4
4
|
"exports": {
|
|
5
5
|
".": {
|
|
6
6
|
"import": "./index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"access": "public",
|
|
22
22
|
"directory": "../../../dist/packages/playground/blueprints"
|
|
23
23
|
},
|
|
24
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "79ef61d98407b1a90f622f6bef8f91001c568d00",
|
|
25
25
|
"engines": {
|
|
26
26
|
"node": ">=18.18.0",
|
|
27
27
|
"npm": ">=8.11.0"
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
"ajv": "8.12.0",
|
|
31
31
|
"comlink": "^4.4.1",
|
|
32
32
|
"ini": "4.1.2",
|
|
33
|
-
"@php-wasm/node-polyfills": "0.9.
|
|
34
|
-
"@php-wasm/universal": "0.9.
|
|
35
|
-
"@wp-playground/common": "0.9.
|
|
36
|
-
"@php-wasm/node": "0.9.
|
|
37
|
-
"@php-wasm/progress": "0.9.
|
|
38
|
-
"@php-wasm/util": "0.9.
|
|
39
|
-
"@php-wasm/logger": "0.9.
|
|
40
|
-
"@wp-playground/wordpress": "0.9.
|
|
41
|
-
"@php-wasm/scopes": "0.9.
|
|
33
|
+
"@php-wasm/node-polyfills": "0.9.29",
|
|
34
|
+
"@php-wasm/universal": "0.9.29",
|
|
35
|
+
"@wp-playground/common": "0.9.29",
|
|
36
|
+
"@php-wasm/node": "0.9.29",
|
|
37
|
+
"@php-wasm/progress": "0.9.29",
|
|
38
|
+
"@php-wasm/util": "0.9.29",
|
|
39
|
+
"@php-wasm/logger": "0.9.29",
|
|
40
|
+
"@wp-playground/wordpress": "0.9.29",
|
|
41
|
+
"@php-wasm/scopes": "0.9.29"
|
|
42
42
|
}
|
|
43
43
|
}
|