@wp-playground/blueprints 1.1.2 → 1.1.3
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-validator.js +177 -133
- package/blueprint-schema.json +3 -0
- package/blueprints.phar +0 -0
- package/index.cjs +150 -38
- package/index.cjs.map +1 -1
- package/index.js +2202 -2046
- package/index.js.map +1 -1
- package/lib/blueprint.d.ts +1 -0
- package/lib/compile.d.ts +1 -0
- package/lib/v2.d.ts +41 -0
- package/package.json +13 -13
package/lib/blueprint.d.ts
CHANGED
package/lib/compile.d.ts
CHANGED
package/lib/v2.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { UniversalPHP } from '@php-wasm/universal';
|
|
2
|
+
import type { BlueprintDeclaration } from './blueprint';
|
|
3
|
+
interface RunV2Options {
|
|
4
|
+
php: UniversalPHP;
|
|
5
|
+
blueprint: BlueprintV2Declaration | ParsedBlueprintV2Declaration;
|
|
6
|
+
siteUrl: string;
|
|
7
|
+
documentRoot: string;
|
|
8
|
+
hooks?: {
|
|
9
|
+
afterBlueprintTargetResolved?: (php: UniversalPHP) => void | Promise<void>;
|
|
10
|
+
beforeWordPressFiles?: (php: UniversalPHP) => void | Promise<void>;
|
|
11
|
+
onProgress?: (progress: number, caption: string) => void;
|
|
12
|
+
/**
|
|
13
|
+
* A hook that is called when an error occurs. It provides succinct
|
|
14
|
+
* error messages and structured details. Useful for reporting specific
|
|
15
|
+
* errors to the user without displaying the full stack trace.
|
|
16
|
+
*
|
|
17
|
+
* @param message The error message.
|
|
18
|
+
* @param details The error details.
|
|
19
|
+
*/
|
|
20
|
+
onError?: (message: string, details?: PHPExceptionDetails) => void;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export type PHPExceptionDetails = {
|
|
24
|
+
exception: string;
|
|
25
|
+
message: string;
|
|
26
|
+
file: string;
|
|
27
|
+
line: number;
|
|
28
|
+
trace: string;
|
|
29
|
+
};
|
|
30
|
+
export declare function runBlueprintV2(options: RunV2Options): Promise<any>;
|
|
31
|
+
export type BlueprintV2Declaration = string | BlueprintDeclaration | undefined;
|
|
32
|
+
export type ParsedBlueprintV2Declaration = {
|
|
33
|
+
type: 'inline-file';
|
|
34
|
+
contents: string;
|
|
35
|
+
} | {
|
|
36
|
+
type: 'file-reference';
|
|
37
|
+
reference: string;
|
|
38
|
+
};
|
|
39
|
+
export declare function parseBlueprintDeclaration(source: BlueprintV2Declaration | ParsedBlueprintV2Declaration): ParsedBlueprintV2Declaration;
|
|
40
|
+
export declare function getV2Runner(): Promise<File>;
|
|
41
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wp-playground/blueprints",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
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": "977f8e90eabb2c8d4eed75677ddd9fb6c13274ae",
|
|
25
25
|
"engines": {
|
|
26
26
|
"node": ">=20.18.3",
|
|
27
27
|
"npm": ">=10.1.0"
|
|
@@ -47,17 +47,17 @@
|
|
|
47
47
|
"wasm-feature-detect": "1.8.0",
|
|
48
48
|
"ws": "8.18.1",
|
|
49
49
|
"yargs": "17.7.2",
|
|
50
|
-
"@php-wasm/node-polyfills": "1.1.
|
|
51
|
-
"@php-wasm/universal": "1.1.
|
|
52
|
-
"@php-wasm/stream-compression": "1.1.
|
|
53
|
-
"@wp-playground/storage": "1.1.
|
|
54
|
-
"@wp-playground/common": "1.1.
|
|
55
|
-
"@php-wasm/node": "1.1.
|
|
56
|
-
"@php-wasm/progress": "1.1.
|
|
57
|
-
"@php-wasm/util": "1.1.
|
|
58
|
-
"@php-wasm/logger": "1.1.
|
|
59
|
-
"@php-wasm/web": "1.1.
|
|
60
|
-
"@wp-playground/wordpress": "1.1.
|
|
50
|
+
"@php-wasm/node-polyfills": "1.1.3",
|
|
51
|
+
"@php-wasm/universal": "1.1.3",
|
|
52
|
+
"@php-wasm/stream-compression": "1.1.3",
|
|
53
|
+
"@wp-playground/storage": "1.1.3",
|
|
54
|
+
"@wp-playground/common": "1.1.3",
|
|
55
|
+
"@php-wasm/node": "1.1.3",
|
|
56
|
+
"@php-wasm/progress": "1.1.3",
|
|
57
|
+
"@php-wasm/util": "1.1.3",
|
|
58
|
+
"@php-wasm/logger": "1.1.3",
|
|
59
|
+
"@php-wasm/web": "1.1.3",
|
|
60
|
+
"@wp-playground/wordpress": "1.1.3"
|
|
61
61
|
},
|
|
62
62
|
"overrides": {
|
|
63
63
|
"rollup": "^4.34.6",
|