@wp-playground/cli 3.0.43 → 3.0.45
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/blueprints-v1/worker-thread-v1.d.ts +9 -0
- package/blueprints-v2/blueprints-v2-handler.d.ts +1 -1
- package/blueprints-v2/worker-thread-v2.d.ts +8 -1
- package/cli-output.d.ts +2 -0
- package/cli.cjs +1 -1
- package/cli.js +1 -1
- package/defines.d.ts +53 -0
- package/index.cjs +1 -1
- package/index.js +6 -5
- package/package.json +14 -14
- package/{run-cli-NcKUE5gJ.js → run-cli-BK0MGgcU.js} +448 -322
- package/run-cli-BK0MGgcU.js.map +1 -0
- package/run-cli-BUDz-Yr3.cjs +64 -0
- package/run-cli-BUDz-Yr3.cjs.map +1 -0
- package/run-cli.d.ts +18 -1
- package/sqlite-database-integration-develop.zip +0 -0
- package/worker-thread-v1.cjs +2 -2
- package/worker-thread-v1.cjs.map +1 -1
- package/worker-thread-v1.js +33 -33
- package/worker-thread-v1.js.map +1 -1
- package/worker-thread-v2.cjs +6 -6
- package/worker-thread-v2.cjs.map +1 -1
- package/worker-thread-v2.js +88 -86
- package/worker-thread-v2.js.map +1 -1
- package/run-cli-B8Dv6R-o.cjs +0 -64
- package/run-cli-B8Dv6R-o.cjs.map +0 -1
- package/run-cli-NcKUE5gJ.js.map +0 -1
|
@@ -24,8 +24,15 @@ export type WorkerBootOptions = {
|
|
|
24
24
|
*/
|
|
25
25
|
internalCookieStore?: boolean;
|
|
26
26
|
withIntl?: boolean;
|
|
27
|
+
withRedis?: boolean;
|
|
28
|
+
withMemcached?: boolean;
|
|
27
29
|
withXdebug?: boolean;
|
|
28
30
|
nativeInternalDirPath: string;
|
|
31
|
+
/**
|
|
32
|
+
* PHP constants to define via php.defineConstant().
|
|
33
|
+
* Process-specific, set for each PHP instance.
|
|
34
|
+
*/
|
|
35
|
+
constants?: Record<string, string | number | boolean | null>;
|
|
29
36
|
};
|
|
30
37
|
export type PrimaryWorkerBootOptions = WorkerBootOptions & {
|
|
31
38
|
wordpressInstallMode: WordPressInstallMode;
|
|
@@ -45,6 +52,8 @@ interface WorkerBootRequestHandlerOptions {
|
|
|
45
52
|
mountsBeforeWpInstall: Array<Mount>;
|
|
46
53
|
mountsAfterWpInstall: Array<Mount>;
|
|
47
54
|
withIntl?: boolean;
|
|
55
|
+
withRedis?: boolean;
|
|
56
|
+
withMemcached?: boolean;
|
|
48
57
|
withXdebug?: boolean;
|
|
49
58
|
}
|
|
50
59
|
export declare class PlaygroundCliBlueprintV1Worker extends PHPWorker {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { RemoteAPI } from '@php-wasm/universal';
|
|
3
3
|
import type { PlaygroundCliBlueprintV2Worker } from './worker-thread-v2';
|
|
4
4
|
import type { MessagePort as NodeMessagePort } from 'worker_threads';
|
|
5
|
-
import type
|
|
5
|
+
import { type RunCLIArgs, type SpawnedWorker, type WorkerType } from '../run-cli';
|
|
6
6
|
import type { CLIOutput } from '../cli-output';
|
|
7
7
|
/**
|
|
8
8
|
* Boots Playground CLI workers using Blueprint version 2.
|
|
@@ -19,6 +19,11 @@ export type PrimaryWorkerBootArgs = Omit<RunCLIArgs, 'mount-before-install' | 'm
|
|
|
19
19
|
nativeInternalDirPath: string;
|
|
20
20
|
mountsBeforeWpInstall?: Array<Mount>;
|
|
21
21
|
mountsAfterWpInstall?: Array<Mount>;
|
|
22
|
+
/**
|
|
23
|
+
* PHP constants to define via php.defineConstant().
|
|
24
|
+
* Process-specific, set for each PHP instance.
|
|
25
|
+
*/
|
|
26
|
+
constants?: Record<string, string | number | boolean | null>;
|
|
22
27
|
};
|
|
23
28
|
type WorkerRunBlueprintArgs = Omit<RunCLIArgs, 'mount-before-install' | 'mount'> & {
|
|
24
29
|
siteUrl: string;
|
|
@@ -37,6 +42,8 @@ export type SecondaryWorkerBootArgs = {
|
|
|
37
42
|
trace: boolean;
|
|
38
43
|
nativeInternalDirPath: string;
|
|
39
44
|
withIntl?: boolean;
|
|
45
|
+
withRedis?: boolean;
|
|
46
|
+
withMemcached?: boolean;
|
|
40
47
|
withXdebug?: boolean;
|
|
41
48
|
mountsBeforeWpInstall?: Array<Mount>;
|
|
42
49
|
mountsAfterWpInstall?: Array<Mount>;
|
|
@@ -64,7 +71,7 @@ export declare class PlaygroundCliBlueprintV2Worker extends PHPWorker {
|
|
|
64
71
|
bootAndSetUpInitialWorker(args: PrimaryWorkerBootArgs): Promise<void>;
|
|
65
72
|
bootWorker(args: SecondaryWorkerBootArgs): Promise<void>;
|
|
66
73
|
runBlueprintV2(args: WorkerRunBlueprintArgs): Promise<void>;
|
|
67
|
-
bootRequestHandler({ siteUrl, allow, phpVersion, createFiles, constants, phpIniEntries, firstProcessId, processIdSpaceLength, trace, nativeInternalDirPath, withIntl, withXdebug, onPHPInstanceCreated, spawnHandler, }: WorkerBootRequestHandlerOptions): Promise<void>;
|
|
74
|
+
bootRequestHandler({ siteUrl, allow, phpVersion, createFiles, constants, phpIniEntries, firstProcessId, processIdSpaceLength, trace, nativeInternalDirPath, withIntl, withRedis, withMemcached, withXdebug, onPHPInstanceCreated, spawnHandler, }: WorkerBootRequestHandlerOptions): Promise<void>;
|
|
68
75
|
dispose(): Promise<void>;
|
|
69
76
|
}
|
|
70
77
|
export {};
|
package/cli-output.d.ts
CHANGED
|
@@ -26,6 +26,8 @@ export interface ConfigSummary {
|
|
|
26
26
|
port: number;
|
|
27
27
|
xdebug: boolean;
|
|
28
28
|
intl: boolean;
|
|
29
|
+
redis: boolean;
|
|
30
|
+
memcached: boolean;
|
|
29
31
|
/** All mounts (both manual and auto-detected). Auto-mounts have autoMounted: true */
|
|
30
32
|
mounts: Mount[];
|
|
31
33
|
blueprint?: string;
|
package/cli.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const s=require("./run-cli-
|
|
1
|
+
"use strict";const s=require("./run-cli-BUDz-Yr3.cjs"),r=process.argv.slice(2);s.parseOptionsAndRunCLI(r);
|
|
2
2
|
//# sourceMappingURL=cli.cjs.map
|
package/cli.js
CHANGED
package/defines.d.ts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parse an array of constant name-value pairs into a constants object.
|
|
3
|
+
* Works similarly to parseMountDirArguments - each pair of array elements
|
|
4
|
+
* represents a constant name and its value.
|
|
5
|
+
*
|
|
6
|
+
* Format: --define NAME value
|
|
7
|
+
* Examples:
|
|
8
|
+
* --define API_KEY secret
|
|
9
|
+
* --define CON=ST "va=lu=e"
|
|
10
|
+
*
|
|
11
|
+
* @param defines - An array where each pair is [name, value]
|
|
12
|
+
* @returns An object mapping constant names to their string values
|
|
13
|
+
*/
|
|
14
|
+
export declare function parseDefineStringArguments(defines: string[]): Record<string, string>;
|
|
15
|
+
/**
|
|
16
|
+
* Parse an array of constant name-value pairs into a boolean constants object.
|
|
17
|
+
* Works similarly to parseMountDirArguments - each pair of array elements
|
|
18
|
+
* represents a constant name and its value.
|
|
19
|
+
*
|
|
20
|
+
* Format: --define-bool NAME value
|
|
21
|
+
* Examples:
|
|
22
|
+
* --define-bool WP_DEBUG true
|
|
23
|
+
* --define-bool WP_DEBUG_LOG false
|
|
24
|
+
*
|
|
25
|
+
* @param defines - An array where each pair is [name, value]
|
|
26
|
+
* @returns An object mapping constant names to their boolean values
|
|
27
|
+
*/
|
|
28
|
+
export declare function parseDefineBoolArguments(defines: string[]): Record<string, boolean>;
|
|
29
|
+
/**
|
|
30
|
+
* Parse an array of constant name-value pairs into a number constants object.
|
|
31
|
+
* Works similarly to parseMountDirArguments - each pair of array elements
|
|
32
|
+
* represents a constant name and its value.
|
|
33
|
+
*
|
|
34
|
+
* Format: --define-number NAME value
|
|
35
|
+
* Examples:
|
|
36
|
+
* --define-number LIMIT 100
|
|
37
|
+
* --define-number RATE 45.67
|
|
38
|
+
*
|
|
39
|
+
* @param defines - An array where each pair is [name, value]
|
|
40
|
+
* @returns An object mapping constant names to their numeric values
|
|
41
|
+
*/
|
|
42
|
+
export declare function parseDefineNumberArguments(defines: string[]): Record<string, number>;
|
|
43
|
+
/**
|
|
44
|
+
* Merge all constants from CLI arguments.
|
|
45
|
+
*
|
|
46
|
+
* @param args - CLI arguments
|
|
47
|
+
* @returns Merged constants
|
|
48
|
+
*/
|
|
49
|
+
export declare function mergeDefinedConstants(args: {
|
|
50
|
+
define?: Record<string, string>;
|
|
51
|
+
'define-bool'?: Record<string, boolean>;
|
|
52
|
+
'define-number'?: Record<string, number>;
|
|
53
|
+
}): Record<string, string | number | boolean>;
|
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-BUDz-Yr3.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
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { L as
|
|
1
|
+
import { L as r, i as a, m as n, p as o, r as t, s as i } from "./run-cli-BK0MGgcU.js";
|
|
2
2
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
n as
|
|
6
|
-
o as
|
|
3
|
+
r as LogVerbosity,
|
|
4
|
+
a as internalsKeyForTesting,
|
|
5
|
+
n as mergeDefinedConstants,
|
|
6
|
+
o as parseOptionsAndRunCLI,
|
|
7
|
+
t as runCLI,
|
|
7
8
|
i as spawnWorkerThread
|
|
8
9
|
};
|
|
9
10
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wp-playground/cli",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.45",
|
|
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": "90da64a5068b13069ea9faf8ff9f5b1e36fd6099",
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@zip.js/zip.js": "2.7.57",
|
|
40
40
|
"ajv": "8.12.0",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"pify": "2.3.0",
|
|
55
55
|
"ps-man": "1.1.8",
|
|
56
56
|
"readable-stream": "3.6.2",
|
|
57
|
-
"selfsigned": "
|
|
57
|
+
"selfsigned": "5.5.0",
|
|
58
58
|
"sha.js": "2.4.12",
|
|
59
59
|
"simple-get": "4.0.1",
|
|
60
60
|
"tmp-promise": "3.0.3",
|
|
@@ -62,17 +62,17 @@
|
|
|
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.45",
|
|
66
|
+
"@php-wasm/progress": "3.0.45",
|
|
67
|
+
"@php-wasm/universal": "3.0.45",
|
|
68
|
+
"@wp-playground/blueprints": "3.0.45",
|
|
69
|
+
"@wp-playground/common": "3.0.45",
|
|
70
|
+
"@wp-playground/wordpress": "3.0.45",
|
|
71
|
+
"@php-wasm/node": "3.0.45",
|
|
72
|
+
"@php-wasm/util": "3.0.45",
|
|
73
|
+
"@php-wasm/cli-util": "3.0.45",
|
|
74
|
+
"@wp-playground/storage": "3.0.45",
|
|
75
|
+
"@php-wasm/xdebug-bridge": "3.0.45"
|
|
76
76
|
},
|
|
77
77
|
"packageManager": "npm@10.9.2",
|
|
78
78
|
"overrides": {
|