@wp-playground/cli 3.0.46 → 3.0.51
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/README.md +1 -0
- package/blueprints-v1/download.d.ts +1 -1
- package/blueprints-v1/worker-thread-v1.d.ts +7 -1
- package/blueprints-v2/worker-thread-v2.d.ts +3 -2
- package/cli-output.d.ts +4 -0
- package/cli.cjs +1 -1
- package/cli.js +1 -1
- package/index.cjs +1 -1
- package/index.js +1 -1
- package/package.json +19 -16
- package/{run-cli-BK0MGgcU.js → run-cli-Cxpf7CoX.js} +535 -475
- package/run-cli-Cxpf7CoX.js.map +1 -0
- package/run-cli-DHqpmO6s.cjs +66 -0
- package/run-cli-DHqpmO6s.cjs.map +1 -0
- package/run-cli.d.ts +3 -1
- package/{sqlite-database-integration-develop.zip → sqlite-database-integration.zip} +0 -0
- package/worker-thread-v1.cjs +2 -2
- package/worker-thread-v1.cjs.map +1 -1
- package/worker-thread-v1.js +26 -24
- package/worker-thread-v1.js.map +1 -1
- package/worker-thread-v2.cjs +5 -5
- package/worker-thread-v2.cjs.map +1 -1
- package/worker-thread-v2.js +63 -61
- package/worker-thread-v2.js.map +1 -1
- package/run-cli-BK0MGgcU.js.map +0 -1
- package/run-cli-BUDz-Yr3.cjs +0 -64
- package/run-cli-BUDz-Yr3.cjs.map +0 -1
package/README.md
CHANGED
|
@@ -98,6 +98,7 @@ The `server` command supports the following optional arguments:
|
|
|
98
98
|
- `--debug`: Print the PHP error log if an error occurs during boot.
|
|
99
99
|
- `--follow-symlinks`: Allow Playground to follow symlinks by automatically mounting symlinked directories and files encountered in mounted directories. ⚠️ Warning: Following symlinks will expose files outside mounted directories to Playground and could be a security risk.
|
|
100
100
|
- `--experimental-multi-worker`: Enables experimental multi-worker support. It needs JSPI and a /wordpress directory on a real filesystem. You can pass a positive number to use a specific number of workers, otherwise, it defaults to the number of CPUs minus one.
|
|
101
|
+
- `--phpmyadmin[=<path>]`: Install phpMyAdmin for database management. The phpMyAdmin URL will be printed after boot. Optionally specify a custom URL path (default: `/phpmyadmin`).
|
|
101
102
|
- `--internal-cookie-store`: Enables Playground's internal cookie handling. When active, Playground uses an HttpCookieStore to manage and persist cookies across requests. If disabled, cookies are handled externally, like by a browser in Node.js.
|
|
102
103
|
|
|
103
104
|
## Need some help with the CLI?
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EmscriptenDownloadMonitor } from '@php-wasm/progress';
|
|
2
2
|
export declare const CACHE_FOLDER: string;
|
|
3
|
-
export declare function fetchSqliteIntegration(
|
|
3
|
+
export declare function fetchSqliteIntegration(): Promise<File>;
|
|
4
4
|
export declare function cachedDownload(remoteUrl: string, cacheKey: string, monitor: EmscriptenDownloadMonitor): Promise<File>;
|
|
5
5
|
export declare function readAsFile(path: string, fileName?: string): File;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import type { FileLockManager } from '@php-wasm/node';
|
|
3
3
|
import { EmscriptenDownloadMonitor } from '@php-wasm/progress';
|
|
4
|
-
import type { RemoteAPI, SupportedPHPVersion } from '@php-wasm/universal';
|
|
4
|
+
import type { PathAlias, RemoteAPI, SupportedPHPVersion } from '@php-wasm/universal';
|
|
5
5
|
import { PHPWorker } from '@php-wasm/universal';
|
|
6
6
|
import { type WordPressInstallMode } from '@wp-playground/wordpress';
|
|
7
7
|
import { type MessagePort } from 'worker_threads';
|
|
@@ -33,6 +33,11 @@ export type WorkerBootOptions = {
|
|
|
33
33
|
* Process-specific, set for each PHP instance.
|
|
34
34
|
*/
|
|
35
35
|
constants?: Record<string, string | number | boolean | null>;
|
|
36
|
+
/**
|
|
37
|
+
* Path aliases that map URL prefixes to filesystem paths outside
|
|
38
|
+
* the document root. Similar to Nginx's `alias` directive.
|
|
39
|
+
*/
|
|
40
|
+
pathAliases?: PathAlias[];
|
|
36
41
|
};
|
|
37
42
|
export type PrimaryWorkerBootOptions = WorkerBootOptions & {
|
|
38
43
|
wordpressInstallMode: WordPressInstallMode;
|
|
@@ -55,6 +60,7 @@ interface WorkerBootRequestHandlerOptions {
|
|
|
55
60
|
withRedis?: boolean;
|
|
56
61
|
withMemcached?: boolean;
|
|
57
62
|
withXdebug?: boolean;
|
|
63
|
+
pathAliases?: PathAlias[];
|
|
58
64
|
}
|
|
59
65
|
export declare class PlaygroundCliBlueprintV1Worker extends PHPWorker {
|
|
60
66
|
booted: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import type { FileLockManager } from '@php-wasm/node';
|
|
3
3
|
import { EmscriptenDownloadMonitor } from '@php-wasm/progress';
|
|
4
|
-
import type { PHP, FileTree, RemoteAPI, SupportedPHPVersion, SpawnHandler } from '@php-wasm/universal';
|
|
4
|
+
import type { PathAlias, PHP, FileTree, RemoteAPI, SupportedPHPVersion, SpawnHandler } from '@php-wasm/universal';
|
|
5
5
|
import { PHPWorker } from '@php-wasm/universal';
|
|
6
6
|
import { type BlueprintV1Declaration } from '@wp-playground/blueprints';
|
|
7
7
|
import { type ParsedBlueprintV2String, type RawBlueprintV2Data } from '@wp-playground/blueprints';
|
|
@@ -45,6 +45,7 @@ export type SecondaryWorkerBootArgs = {
|
|
|
45
45
|
withRedis?: boolean;
|
|
46
46
|
withMemcached?: boolean;
|
|
47
47
|
withXdebug?: boolean;
|
|
48
|
+
pathAliases?: PathAlias[];
|
|
48
49
|
mountsBeforeWpInstall?: Array<Mount>;
|
|
49
50
|
mountsAfterWpInstall?: Array<Mount>;
|
|
50
51
|
};
|
|
@@ -71,7 +72,7 @@ export declare class PlaygroundCliBlueprintV2Worker extends PHPWorker {
|
|
|
71
72
|
bootAndSetUpInitialWorker(args: PrimaryWorkerBootArgs): Promise<void>;
|
|
72
73
|
bootWorker(args: SecondaryWorkerBootArgs): Promise<void>;
|
|
73
74
|
runBlueprintV2(args: WorkerRunBlueprintArgs): Promise<void>;
|
|
74
|
-
bootRequestHandler({ siteUrl, allow, phpVersion, createFiles, constants, phpIniEntries, firstProcessId, processIdSpaceLength, trace, nativeInternalDirPath, withIntl, withRedis, withMemcached, withXdebug, onPHPInstanceCreated, spawnHandler, }: WorkerBootRequestHandlerOptions): Promise<void>;
|
|
75
|
+
bootRequestHandler({ siteUrl, allow, phpVersion, createFiles, constants, phpIniEntries, firstProcessId, processIdSpaceLength, trace, nativeInternalDirPath, withIntl, withRedis, withMemcached, withXdebug, pathAliases, onPHPInstanceCreated, spawnHandler, }: WorkerBootRequestHandlerOptions): Promise<void>;
|
|
75
76
|
dispose(): Promise<void>;
|
|
76
77
|
}
|
|
77
78
|
export {};
|
package/cli-output.d.ts
CHANGED
|
@@ -113,4 +113,8 @@ export declare class CLIOutput {
|
|
|
113
113
|
*/
|
|
114
114
|
printReady(url: string, workerCount: number): void;
|
|
115
115
|
printWarning(message: string): void;
|
|
116
|
+
/**
|
|
117
|
+
* Prints the phpMyAdmin URL when the --phpmyadmin flag is enabled.
|
|
118
|
+
*/
|
|
119
|
+
printPhpMyAdminUrl(url: string): void;
|
|
116
120
|
}
|
package/cli.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const s=require("./run-cli-
|
|
1
|
+
"use strict";const s=require("./run-cli-DHqpmO6s.cjs"),r=process.argv.slice(2);s.parseOptionsAndRunCLI(r);
|
|
2
2
|
//# sourceMappingURL=cli.cjs.map
|
package/cli.js
CHANGED
package/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./run-cli-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./run-cli-DHqpmO6s.cjs");exports.LogVerbosity=e.LogVerbosity;exports.internalsKeyForTesting=e.internalsKeyForTesting;exports.mergeDefinedConstants=e.mergeDefinedConstants;exports.parseOptionsAndRunCLI=e.parseOptionsAndRunCLI;exports.runCLI=e.runCLI;exports.spawnWorkerThread=e.spawnWorkerThread;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wp-playground/cli",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.51",
|
|
4
4
|
"description": "WordPress Playground CLI",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"bin": {
|
|
35
35
|
"wp-playground-cli": "wp-playground.js"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "ebc05da827807f3311ed1de8711fa74266183fab",
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@zip.js/zip.js": "2.7.57",
|
|
40
40
|
"ajv": "8.12.0",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"crc-32": "1.2.2",
|
|
44
44
|
"diff3": "0.0.4",
|
|
45
45
|
"express": "4.22.0",
|
|
46
|
-
"fast-xml-parser": "5.3.
|
|
46
|
+
"fast-xml-parser": "^5.3.4",
|
|
47
47
|
"fs-extra": "11.1.1",
|
|
48
48
|
"ignore": "5.3.2",
|
|
49
49
|
"ini": "4.1.2",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"minimisted": "2.0.1",
|
|
52
52
|
"octokit": "3.1.2",
|
|
53
53
|
"pako": "1.0.10",
|
|
54
|
-
"pify": "
|
|
54
|
+
"pify": "4.0.1",
|
|
55
55
|
"ps-man": "1.1.8",
|
|
56
56
|
"readable-stream": "3.6.2",
|
|
57
57
|
"selfsigned": "5.5.0",
|
|
@@ -62,17 +62,18 @@
|
|
|
62
62
|
"ws": "8.18.3",
|
|
63
63
|
"xml2js": "0.6.2",
|
|
64
64
|
"yargs": "17.7.2",
|
|
65
|
-
"@php-wasm/logger": "3.0.
|
|
66
|
-
"@php-wasm/progress": "3.0.
|
|
67
|
-
"@php-wasm/universal": "3.0.
|
|
68
|
-
"@wp-playground/blueprints": "3.0.
|
|
69
|
-
"@wp-playground/common": "3.0.
|
|
70
|
-
"@wp-playground/wordpress": "3.0.
|
|
71
|
-
"@php-wasm/node": "3.0.
|
|
72
|
-
"@php-wasm/util": "3.0.
|
|
73
|
-
"@php-wasm/cli-util": "3.0.
|
|
74
|
-
"@wp-playground/storage": "3.0.
|
|
75
|
-
"@php-wasm/xdebug-bridge": "3.0.
|
|
65
|
+
"@php-wasm/logger": "3.0.51",
|
|
66
|
+
"@php-wasm/progress": "3.0.51",
|
|
67
|
+
"@php-wasm/universal": "3.0.51",
|
|
68
|
+
"@wp-playground/blueprints": "3.0.51",
|
|
69
|
+
"@wp-playground/common": "3.0.51",
|
|
70
|
+
"@wp-playground/wordpress": "3.0.51",
|
|
71
|
+
"@php-wasm/node": "3.0.51",
|
|
72
|
+
"@php-wasm/util": "3.0.51",
|
|
73
|
+
"@php-wasm/cli-util": "3.0.51",
|
|
74
|
+
"@wp-playground/storage": "3.0.51",
|
|
75
|
+
"@php-wasm/xdebug-bridge": "3.0.51",
|
|
76
|
+
"@wp-playground/tools": "3.0.51"
|
|
76
77
|
},
|
|
77
78
|
"packageManager": "npm@10.9.2",
|
|
78
79
|
"overrides": {
|
|
@@ -83,7 +84,9 @@
|
|
|
83
84
|
"@playwright/test": "1.55.1",
|
|
84
85
|
"ws": "8.18.3",
|
|
85
86
|
"tmp": "0.2.5",
|
|
86
|
-
"form-data": "^4.0.4"
|
|
87
|
+
"form-data": "^4.0.4",
|
|
88
|
+
"lodash": "^4.17.23",
|
|
89
|
+
"glob": "^9.3.0"
|
|
87
90
|
},
|
|
88
91
|
"optionalDependencies": {
|
|
89
92
|
"fs-ext": "2.1.1"
|