@wp-playground/cli 3.1.19 → 3.1.21
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 +2 -1
- package/blueprints-v1/download.d.ts +1 -1
- package/blueprints-v1/worker-thread-v1.d.ts +3 -2
- package/cli.cjs +1 -1
- package/cli.js +1 -1
- package/index.cjs +1 -1
- package/index.js +4 -3
- package/package.json +17 -16
- package/{run-cli-D1CmUFoL.js → run-cli-C2bV7mIt.js} +674 -631
- package/run-cli-C2bV7mIt.js.map +1 -0
- package/run-cli-vtAjdYXb.cjs +66 -0
- package/run-cli-vtAjdYXb.cjs.map +1 -0
- package/run-cli.d.ts +19 -4
- package/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 +71 -68
- package/worker-thread-v1.js.map +1 -1
- package/worker-thread-v2.cjs +1 -1
- package/worker-thread-v2.js +1 -1
- package/run-cli-D1CmUFoL.js.map +0 -1
- package/run-cli-DGeb628T.cjs +0 -66
- package/run-cli-DGeb628T.cjs.map +0 -1
package/README.md
CHANGED
|
@@ -97,7 +97,8 @@ The `server` command supports the following optional arguments:
|
|
|
97
97
|
|
|
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
|
+
- `--workers=<n|auto>`: Number of request-handling worker threads. Pass a positive integer, or `auto` to use one worker per CPU core (minus one). Defaults to `min(6, cpus-1)`. Useful for multi-client workloads (e.g. parallel e2e suites) that need more than 6 in-flight requests.
|
|
101
|
+
- `--experimental-multi-worker`: Deprecated. Use `--workers=<n|auto>` instead. The value of this flag is ignored.
|
|
101
102
|
- `--phpmyadmin[=<path>]`: Install phpMyAdmin for database management. The phpMyAdmin URL will be printed after boot. Optionally specify a custom URL path (default: `/phpmyadmin`).
|
|
102
103
|
- `--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.
|
|
103
104
|
|
|
@@ -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(): Promise<File>;
|
|
3
|
+
export declare function fetchSqliteIntegration(version?: 'trunk' | 'v2.1.16' | 'v2.2.22' | 'v2.2.22-php52'): 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,13 +1,14 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import type { FileLockManager } from '@php-wasm/universal';
|
|
3
3
|
import { EmscriptenDownloadMonitor } from '@php-wasm/progress';
|
|
4
|
-
import type {
|
|
4
|
+
import type { AllPHPVersion, PathAlias } 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';
|
|
8
8
|
import type { Mount } from '@php-wasm/cli-util';
|
|
9
9
|
export type WorkerBootWordPressOptions = {
|
|
10
10
|
siteUrl: string;
|
|
11
|
+
phpVersion?: string;
|
|
11
12
|
wpVersion?: string;
|
|
12
13
|
wordpressInstallMode: WordPressInstallMode;
|
|
13
14
|
wordPressZip?: ArrayBuffer;
|
|
@@ -20,7 +21,7 @@ export type WorkerBootWordPressOptions = {
|
|
|
20
21
|
};
|
|
21
22
|
interface WorkerBootRequestHandlerOptions {
|
|
22
23
|
siteUrl: string;
|
|
23
|
-
phpVersion:
|
|
24
|
+
phpVersion: AllPHPVersion;
|
|
24
25
|
processId: number;
|
|
25
26
|
trace: boolean;
|
|
26
27
|
nativeInternalDirPath: string;
|
package/cli.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const i=require("child_process");function t(){return!("Suspending"in WebAssembly||process.env.PLAYGROUND_NO_JSPI_RESPAWN||process.versions.bun||"Deno"in globalThis||process.execArgv.includes("--experimental-wasm-jspi")||parseInt(process.versions.node.split(".")[0],10)<23)}function o(){const r=process.argv.slice(2);Promise.resolve().then(()=>require("./run-cli-
|
|
1
|
+
"use strict";const i=require("child_process");function t(){return!("Suspending"in WebAssembly||process.env.PLAYGROUND_NO_JSPI_RESPAWN||process.versions.bun||"Deno"in globalThis||process.execArgv.includes("--experimental-wasm-jspi")||parseInt(process.versions.node.split(".")[0],10)<23)}function o(){const r=process.argv.slice(2);Promise.resolve().then(()=>require("./run-cli-vtAjdYXb.cjs")).then(e=>e.runCli).then(({parseOptionsAndRunCLI:e})=>{e(r)})}if(t()){const r=Date.now(),e=i.spawn(process.execPath,["--experimental-wasm-jspi",...process.execArgv,...process.argv.slice(1)],{stdio:"inherit"});for(const s of["SIGINT","SIGTERM"])process.on(s,()=>e.kill(s));e.on("error",()=>{o()}),e.on("close",(s,n)=>{if(s!==0&&!n&&Date.now()-r<1e3){o();return}n?process.kill(process.pid,n):process.exit(s)})}else o();
|
|
2
2
|
//# sourceMappingURL=cli.cjs.map
|
package/cli.js
CHANGED
|
@@ -4,7 +4,7 @@ function t() {
|
|
|
4
4
|
}
|
|
5
5
|
function o() {
|
|
6
6
|
const r = process.argv.slice(2);
|
|
7
|
-
import("./run-cli-
|
|
7
|
+
import("./run-cli-C2bV7mIt.js").then((e) => e.d).then(({ parseOptionsAndRunCLI: e }) => {
|
|
8
8
|
e(r);
|
|
9
9
|
});
|
|
10
10
|
}
|
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-vtAjdYXb.cjs");exports.LogVerbosity=e.LogVerbosity;exports.internalsKeyForTesting=e.internalsKeyForTesting;exports.mergeDefinedConstants=e.mergeDefinedConstants;exports.parseOptionsAndRunCLI=e.parseOptionsAndRunCLI;exports.resolveWorkerCount=e.resolveWorkerCount;exports.runCLI=e.runCLI;exports.spawnWorkerThread=e.spawnWorkerThread;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { L as r, i as a, m as n, p as o, r as t,
|
|
1
|
+
import { L as r, i as a, m as n, p as o, r as t, a as i, s as p } from "./run-cli-C2bV7mIt.js";
|
|
2
2
|
export {
|
|
3
3
|
r as LogVerbosity,
|
|
4
4
|
a as internalsKeyForTesting,
|
|
5
5
|
n as mergeDefinedConstants,
|
|
6
6
|
o as parseOptionsAndRunCLI,
|
|
7
|
-
t as
|
|
8
|
-
i as
|
|
7
|
+
t as resolveWorkerCount,
|
|
8
|
+
i as runCLI,
|
|
9
|
+
p as spawnWorkerThread
|
|
9
10
|
};
|
|
10
11
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wp-playground/cli",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.21",
|
|
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": "5864051cbf4c2a55656112d99a3f1b076bcd67cd",
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@zip.js/zip.js": "2.7.57",
|
|
40
40
|
"ajv": "8.12.0",
|
|
@@ -58,21 +58,21 @@
|
|
|
58
58
|
"simple-get": "4.0.1",
|
|
59
59
|
"tmp-promise": "3.0.3",
|
|
60
60
|
"wasm-feature-detect": "1.8.0",
|
|
61
|
-
"ws": "8.18.
|
|
61
|
+
"ws": "8.18.0",
|
|
62
62
|
"xml2js": "0.6.2",
|
|
63
63
|
"yargs": "17.7.2",
|
|
64
|
-
"@wp-playground/common": "3.1.
|
|
65
|
-
"@php-wasm/logger": "3.1.
|
|
66
|
-
"@php-wasm/progress": "3.1.
|
|
67
|
-
"@php-wasm/universal": "3.1.
|
|
68
|
-
"@wp-playground/blueprints": "3.1.
|
|
69
|
-
"@wp-playground/wordpress": "3.1.
|
|
70
|
-
"@php-wasm/node": "3.1.
|
|
71
|
-
"@php-wasm/util": "3.1.
|
|
72
|
-
"@php-wasm/cli-util": "3.1.
|
|
73
|
-
"@wp-playground/storage": "3.1.
|
|
74
|
-
"@php-wasm/xdebug-bridge": "3.1.
|
|
75
|
-
"@wp-playground/tools": "3.1.
|
|
64
|
+
"@wp-playground/common": "3.1.21",
|
|
65
|
+
"@php-wasm/logger": "3.1.21",
|
|
66
|
+
"@php-wasm/progress": "3.1.21",
|
|
67
|
+
"@php-wasm/universal": "3.1.21",
|
|
68
|
+
"@wp-playground/blueprints": "3.1.21",
|
|
69
|
+
"@wp-playground/wordpress": "3.1.21",
|
|
70
|
+
"@php-wasm/node": "3.1.21",
|
|
71
|
+
"@php-wasm/util": "3.1.21",
|
|
72
|
+
"@php-wasm/cli-util": "3.1.21",
|
|
73
|
+
"@wp-playground/storage": "3.1.21",
|
|
74
|
+
"@php-wasm/xdebug-bridge": "3.1.21",
|
|
75
|
+
"@wp-playground/tools": "3.1.21"
|
|
76
76
|
},
|
|
77
77
|
"packageManager": "npm@10.9.2",
|
|
78
78
|
"overrides": {
|
|
@@ -84,6 +84,7 @@
|
|
|
84
84
|
"tmp": "0.2.5",
|
|
85
85
|
"form-data": "^4.0.4",
|
|
86
86
|
"lodash": "^4.17.23",
|
|
87
|
-
"glob": "^9.3.0"
|
|
87
|
+
"glob": "^9.3.0",
|
|
88
|
+
"webpackbar": "^7.0.0"
|
|
88
89
|
}
|
|
89
90
|
}
|