@wp-playground/wordpress 1.0.28 → 1.1.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.
- package/LICENSE +339 -0
- package/boot.d.ts +25 -1
- package/index.cjs +696 -0
- package/index.cjs.map +1 -0
- package/index.d.ts +2 -1
- package/index.js +661 -42
- package/index.js.map +1 -1
- package/package.json +29 -16
- package/rewrite-wp-config.d.ts +22 -0
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wp-playground/wordpress",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "WordPress-related plumbing for WordPress Playground",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,32 +15,45 @@
|
|
|
15
15
|
"url": "https://github.com/adamziel"
|
|
16
16
|
}
|
|
17
17
|
],
|
|
18
|
+
"license": "GPL-2.0-or-later",
|
|
18
19
|
"type": "module",
|
|
20
|
+
"main": "./index.cjs",
|
|
21
|
+
"module": "./index.js",
|
|
19
22
|
"types": "index.d.ts",
|
|
20
|
-
"main": "./index.js",
|
|
21
|
-
"typings": "./index.d.ts",
|
|
22
|
-
"license": "GPL-2.0-or-later",
|
|
23
23
|
"engines": {
|
|
24
|
-
"node": ">=
|
|
25
|
-
"npm": ">=
|
|
24
|
+
"node": ">=20.18.3",
|
|
25
|
+
"npm": ">=10.1.0"
|
|
26
|
+
},
|
|
27
|
+
"exports": {
|
|
28
|
+
".": {
|
|
29
|
+
"import": "./index.js",
|
|
30
|
+
"require": "./index.cjs"
|
|
31
|
+
},
|
|
32
|
+
"./package.json": "./package.json"
|
|
26
33
|
},
|
|
27
34
|
"publishConfig": {
|
|
28
35
|
"access": "public",
|
|
29
36
|
"directory": "../../../dist/packages/playground/wordpress"
|
|
30
37
|
},
|
|
31
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "9dbbe2b22ccbacda9c0da4444c51d5739e784302",
|
|
32
39
|
"dependencies": {
|
|
33
40
|
"comlink": "^4.4.1",
|
|
34
|
-
"
|
|
35
|
-
"express": "4.19.2",
|
|
41
|
+
"express": "4.21.2",
|
|
36
42
|
"ini": "4.1.2",
|
|
37
43
|
"wasm-feature-detect": "1.8.0",
|
|
38
|
-
"ws": "8.18.
|
|
44
|
+
"ws": "8.18.1",
|
|
39
45
|
"yargs": "17.7.2",
|
|
40
|
-
"@php-wasm/universal": "1.0
|
|
41
|
-
"@php-wasm/util": "1.0
|
|
42
|
-
"@php-wasm/logger": "1.0
|
|
43
|
-
"@wp-playground/common": "1.0
|
|
44
|
-
"@php-wasm/node": "1.0
|
|
46
|
+
"@php-wasm/universal": "1.1.0",
|
|
47
|
+
"@php-wasm/util": "1.1.0",
|
|
48
|
+
"@php-wasm/logger": "1.1.0",
|
|
49
|
+
"@wp-playground/common": "1.1.0",
|
|
50
|
+
"@php-wasm/node": "1.1.0"
|
|
51
|
+
},
|
|
52
|
+
"overrides": {
|
|
53
|
+
"rollup": "^4.34.6",
|
|
54
|
+
"react": "18.3.1",
|
|
55
|
+
"react-dom": "18.3.1",
|
|
56
|
+
"typescript": "5.4.5",
|
|
57
|
+
"ws": "^8.18.0"
|
|
45
58
|
}
|
|
46
|
-
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { UniversalPHP } from '@php-wasm/universal';
|
|
2
|
+
/**
|
|
3
|
+
* Defines constants in a WordPress "wp-config.php" file.
|
|
4
|
+
*
|
|
5
|
+
* @param php The PHP instance.
|
|
6
|
+
* @param wpConfigPath The path to the "wp-config.php" file.
|
|
7
|
+
* @param constants The constants to define.
|
|
8
|
+
* @param whenAlreadyDefined What to do if the constant is already defined.
|
|
9
|
+
* Possible values are:
|
|
10
|
+
* 'rewrite' - Rewrite the constant, using the new value.
|
|
11
|
+
* 'skip' - Skip the definition, keeping the existing value.
|
|
12
|
+
*/
|
|
13
|
+
export declare function defineWpConfigConstants(php: UniversalPHP, wpConfigPath: string, constants: Record<string, unknown>, whenAlreadyDefined?: 'rewrite' | 'skip'): Promise<void>;
|
|
14
|
+
/**
|
|
15
|
+
* Ensures that the "wp-config.php" file exists and required constants are defined.
|
|
16
|
+
*
|
|
17
|
+
* When a required constant is missing, it will be defined with a default value.
|
|
18
|
+
*
|
|
19
|
+
* @param php The PHP instance.
|
|
20
|
+
* @param documentRoot The path to the document root.
|
|
21
|
+
*/
|
|
22
|
+
export declare function ensureWpConfig(php: UniversalPHP, documentRoot: string): Promise<void>;
|