@wp-playground/cli 3.1.19 → 3.1.20
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/cli.cjs +1 -1
- package/cli.js +1 -1
- package/index.cjs +1 -1
- package/index.js +1 -1
- package/package.json +17 -16
- package/{run-cli-DGeb628T.cjs → run-cli-B6Dm34vQ.cjs} +4 -4
- package/{run-cli-D1CmUFoL.js.map → run-cli-B6Dm34vQ.cjs.map} +1 -1
- package/{run-cli-D1CmUFoL.js → run-cli-B9kBDU12.js} +68 -68
- package/run-cli-B9kBDU12.js.map +1 -0
- package/sqlite-database-integration.zip +0 -0
- package/worker-thread-v1.cjs +1 -1
- package/worker-thread-v1.js +1 -1
- package/worker-thread-v2.cjs +1 -1
- package/worker-thread-v2.js +1 -1
- package/run-cli-DGeb628T.cjs.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { logger as y, LogSeverity as F, errorLogPath as
|
|
2
|
-
import { consumeAPI as
|
|
3
|
-
import { resolveRemoteBlueprint as Le, resolveRuntimeConfiguration as
|
|
1
|
+
import { logger as y, LogSeverity as F, errorLogPath as re } from "@php-wasm/logger";
|
|
2
|
+
import { consumeAPI as he, ProcessIdAllocator as ke, SupportedPHPVersions as U, printDebugDetails as Me, HttpCookieStore as Ce, FileLockManagerInMemory as Ae, StreamedPHPResponse as oe, createObjectPoolProxy as Be, exposeAPI as De, PHPResponse as Re, exposeSyncAPI as We } from "@php-wasm/universal";
|
|
3
|
+
import { resolveRemoteBlueprint as Le, resolveRuntimeConfiguration as se, compileBlueprintV1 as we, isBlueprintBundle as _e, runBlueprintV1Steps as ie } from "@wp-playground/blueprints";
|
|
4
4
|
import { zipDirectory as Ue, RecommendedPHPVersion as D } from "@wp-playground/common";
|
|
5
5
|
import p, { existsSync as G, rmdirSync as He, mkdirSync as q, readdirSync as Ne } from "fs";
|
|
6
|
-
import { MessageChannel as
|
|
6
|
+
import { MessageChannel as ye, Worker as ne } from "worker_threads";
|
|
7
7
|
import { createNodeFsMountHandler as Oe } from "@php-wasm/node";
|
|
8
|
-
import d, { basename as _, join as
|
|
8
|
+
import d, { basename as _, join as Q } from "path";
|
|
9
9
|
import { exec as be } from "child_process";
|
|
10
10
|
import { promisify as Fe } from "util";
|
|
11
11
|
import ge from "express";
|
|
@@ -17,13 +17,13 @@ import { EmscriptenDownloadMonitor as Xe, ProgressTracker as Ze } from "@php-was
|
|
|
17
17
|
import { resolveWordPressRelease as Je } from "@wp-playground/wordpress";
|
|
18
18
|
import k from "fs-extra";
|
|
19
19
|
import { createRequire as Ke } from "module";
|
|
20
|
-
import
|
|
20
|
+
import X from "os";
|
|
21
21
|
import { startBridge as et } from "@php-wasm/xdebug-bridge";
|
|
22
22
|
import { dir as tt, setGracefulCleanup as rt } from "tmp-promise";
|
|
23
|
-
import { removeTempDirSymlink as ot, createTempDirSymlink as
|
|
23
|
+
import { removeTempDirSymlink as ot, createTempDirSymlink as ae, makeXdebugConfig as st, DEFAULT_PATH_SKIPPINGS as le, clearXdebugIDEConfig as it, addXdebugIDEConfig as nt } from "@php-wasm/cli-util";
|
|
24
24
|
import { createHash as at } from "crypto";
|
|
25
|
-
import { PHPMYADMIN_INSTALL_PATH as
|
|
26
|
-
import { jspi as
|
|
25
|
+
import { PHPMYADMIN_INSTALL_PATH as ue, getPhpMyAdminInstallSteps as lt, PHPMYADMIN_ENTRY_PATH as ut } from "@wp-playground/tools";
|
|
26
|
+
import { jspi as de } from "wasm-feature-detect";
|
|
27
27
|
function j(e) {
|
|
28
28
|
const t = [];
|
|
29
29
|
for (const r of e) {
|
|
@@ -40,7 +40,7 @@ function j(e) {
|
|
|
40
40
|
}
|
|
41
41
|
return t;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function ce(e) {
|
|
44
44
|
if (e.length % 2 !== 0)
|
|
45
45
|
throw new Error("Invalid mount format. Expected: /host/path /vfs/path");
|
|
46
46
|
const t = [];
|
|
@@ -62,7 +62,7 @@ async function br(e, t) {
|
|
|
62
62
|
Oe(r.hostPath)
|
|
63
63
|
);
|
|
64
64
|
}
|
|
65
|
-
const
|
|
65
|
+
const pe = {
|
|
66
66
|
step: "runPHP",
|
|
67
67
|
code: {
|
|
68
68
|
filename: "activate-theme.php",
|
|
@@ -119,16 +119,16 @@ function Pe(e) {
|
|
|
119
119
|
const i = p.readdirSync(t);
|
|
120
120
|
for (const n of i)
|
|
121
121
|
n !== "index.php" && r.push({
|
|
122
|
-
hostPath:
|
|
122
|
+
hostPath: Q(t, n),
|
|
123
123
|
vfsPath: `/wordpress/wp-content/${n}`,
|
|
124
124
|
autoMounted: !0
|
|
125
125
|
});
|
|
126
|
-
s["additional-blueprint-steps"].push(
|
|
126
|
+
s["additional-blueprint-steps"].push(pe);
|
|
127
127
|
} else dt(t) && (o.push({
|
|
128
128
|
hostPath: t,
|
|
129
129
|
vfsPath: "/wordpress",
|
|
130
130
|
autoMounted: !0
|
|
131
|
-
}), s.mode = "apply-to-existing-site", s["additional-blueprint-steps"].push(
|
|
131
|
+
}), s.mode = "apply-to-existing-site", s["additional-blueprint-steps"].push(pe), s.wordpressInstallMode || (s.wordpressInstallMode = "install-from-existing-files-if-needed"));
|
|
132
132
|
return s;
|
|
133
133
|
}
|
|
134
134
|
function dt(e) {
|
|
@@ -142,13 +142,13 @@ function ct(e) {
|
|
|
142
142
|
function pt(e) {
|
|
143
143
|
if (!p.readdirSync(e).includes("style.css"))
|
|
144
144
|
return !1;
|
|
145
|
-
const r = p.readFileSync(
|
|
145
|
+
const r = p.readFileSync(Q(e, "style.css"), "utf8");
|
|
146
146
|
return !!/^(?:[ \t]*<\?php)?[ \t/*#@]*Theme Name:(.*)$/im.exec(r);
|
|
147
147
|
}
|
|
148
148
|
function mt(e) {
|
|
149
149
|
const t = p.readdirSync(e), r = /^(?:[ \t]*<\?php)?[ \t/*#@]*Plugin Name:(.*)$/im;
|
|
150
150
|
return !!t.filter((s) => s.endsWith(".php")).find((s) => {
|
|
151
|
-
const i = p.readFileSync(
|
|
151
|
+
const i = p.readFileSync(Q(e, s), "utf8");
|
|
152
152
|
return !!r.exec(i);
|
|
153
153
|
});
|
|
154
154
|
}
|
|
@@ -218,7 +218,7 @@ function yt(e = {}, t = {}, r = {}) {
|
|
|
218
218
|
};
|
|
219
219
|
return i(e, "string"), i(t, "bool"), i(r, "number"), o;
|
|
220
220
|
}
|
|
221
|
-
function
|
|
221
|
+
function Z(e) {
|
|
222
222
|
return yt(
|
|
223
223
|
e.define,
|
|
224
224
|
e["define-bool"],
|
|
@@ -385,7 +385,7 @@ class It {
|
|
|
385
385
|
fileLockManagerPort: r,
|
|
386
386
|
nativeInternalDirPath: o
|
|
387
387
|
}) {
|
|
388
|
-
const s =
|
|
388
|
+
const s = he(t.phpPort);
|
|
389
389
|
await s.useFileLockManager(r);
|
|
390
390
|
const i = {
|
|
391
391
|
...this.args,
|
|
@@ -400,12 +400,12 @@ class It {
|
|
|
400
400
|
nativeInternalDirPath: o,
|
|
401
401
|
mountsBeforeWpInstall: this.args["mount-before-install"] || [],
|
|
402
402
|
mountsAfterWpInstall: this.args.mount || [],
|
|
403
|
-
constants:
|
|
403
|
+
constants: Z(this.args)
|
|
404
404
|
};
|
|
405
405
|
return await s.bootWorker(i), s;
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
|
-
const z = d.join(
|
|
408
|
+
const z = d.join(X.homedir(), ".wordpress-playground");
|
|
409
409
|
async function kt() {
|
|
410
410
|
const e = typeof __dirname < "u" ? __dirname : import.meta.dirname;
|
|
411
411
|
let t = d.join(e, "sqlite-database-integration.zip");
|
|
@@ -479,7 +479,7 @@ class At {
|
|
|
479
479
|
}
|
|
480
480
|
let l;
|
|
481
481
|
this.args.skipSqliteSetup ? (y.debug("Skipping SQLite integration plugin setup..."), l = void 0) : (this.cliOutput.updateProgress("Preparing SQLite database"), l = await kt()), this.cliOutput.updateProgress("Booting WordPress");
|
|
482
|
-
const u = await
|
|
482
|
+
const u = await se(
|
|
483
483
|
this.getEffectiveBlueprint()
|
|
484
484
|
);
|
|
485
485
|
return await t.bootWordPress(
|
|
@@ -489,7 +489,7 @@ class At {
|
|
|
489
489
|
wordpressInstallMode: this.args.wordpressInstallMode || "download-and-install",
|
|
490
490
|
wordPressZip: s && await s.arrayBuffer(),
|
|
491
491
|
sqliteIntegrationPluginZip: await l?.arrayBuffer(),
|
|
492
|
-
constants:
|
|
492
|
+
constants: Z(this.args)
|
|
493
493
|
},
|
|
494
494
|
r
|
|
495
495
|
), i && !this.args["mount-before-install"] && !p.existsSync(i) && (this.cliOutput.updateProgress("Caching WordPress for next boot"), p.writeFileSync(
|
|
@@ -507,11 +507,11 @@ class At {
|
|
|
507
507
|
fileLockManagerPort: r,
|
|
508
508
|
nativeInternalDirPath: o
|
|
509
509
|
}) {
|
|
510
|
-
const s =
|
|
510
|
+
const s = he(
|
|
511
511
|
t.phpPort
|
|
512
512
|
);
|
|
513
513
|
await s.isConnected();
|
|
514
|
-
const i = await
|
|
514
|
+
const i = await se(
|
|
515
515
|
this.getEffectiveBlueprint()
|
|
516
516
|
);
|
|
517
517
|
return await s.useFileLockManager(r), await s.bootRequestHandler({
|
|
@@ -539,7 +539,7 @@ class At {
|
|
|
539
539
|
i = n.detail.progress === 100;
|
|
540
540
|
const l = Math.floor(n.detail.progress);
|
|
541
541
|
s = n.detail.caption || s || "Running Blueprint", this.cliOutput.updateProgress(s.trim(), l);
|
|
542
|
-
}), await
|
|
542
|
+
}), await we(r, {
|
|
543
543
|
progress: o,
|
|
544
544
|
additionalSteps: t
|
|
545
545
|
});
|
|
@@ -805,7 +805,7 @@ ${this.green("Ready!")} WordPress is running on ${this.bold(t)} ${this.dim(`(${r
|
|
|
805
805
|
);
|
|
806
806
|
}
|
|
807
807
|
}
|
|
808
|
-
const
|
|
808
|
+
const J = {
|
|
809
809
|
Quiet: { name: "quiet", severity: F.Fatal },
|
|
810
810
|
Normal: { name: "normal", severity: F.Info },
|
|
811
811
|
Debug: { name: "debug", severity: F.Debug }
|
|
@@ -870,14 +870,14 @@ async function Ht(e) {
|
|
|
870
870
|
type: "array",
|
|
871
871
|
nargs: 2,
|
|
872
872
|
array: !0,
|
|
873
|
-
coerce:
|
|
873
|
+
coerce: ce
|
|
874
874
|
},
|
|
875
875
|
"mount-dir-before-install": {
|
|
876
876
|
describe: 'Mount a directory before WordPress installation (can be used multiple times). Format: "/host/path" "/vfs/path"',
|
|
877
877
|
type: "string",
|
|
878
878
|
nargs: 2,
|
|
879
879
|
array: !0,
|
|
880
|
-
coerce:
|
|
880
|
+
coerce: ce
|
|
881
881
|
},
|
|
882
882
|
login: {
|
|
883
883
|
describe: "Should log the user in",
|
|
@@ -924,7 +924,7 @@ async function Ht(e) {
|
|
|
924
924
|
verbosity: {
|
|
925
925
|
describe: "Output logs and progress messages.",
|
|
926
926
|
type: "string",
|
|
927
|
-
choices: Object.values(
|
|
927
|
+
choices: Object.values(J).map(
|
|
928
928
|
(a) => a.name
|
|
929
929
|
),
|
|
930
930
|
default: "normal"
|
|
@@ -1223,7 +1223,7 @@ Examples:
|
|
|
1223
1223
|
[Symbol.asyncDispose]: async () => {
|
|
1224
1224
|
process.off("SIGINT", T), process.off("SIGTERM", T), await w[Symbol.asyncDispose]();
|
|
1225
1225
|
},
|
|
1226
|
-
[
|
|
1226
|
+
[K]: { cliServer: w }
|
|
1227
1227
|
};
|
|
1228
1228
|
} catch (t) {
|
|
1229
1229
|
console.error(t);
|
|
@@ -1261,25 +1261,25 @@ function Se(e) {
|
|
|
1261
1261
|
}
|
|
1262
1262
|
return String(e);
|
|
1263
1263
|
}
|
|
1264
|
-
function
|
|
1264
|
+
function me(e, t) {
|
|
1265
1265
|
return e.find(
|
|
1266
1266
|
(r) => r.vfsPath.replace(/\/$/, "") === t.replace(/\/$/, "")
|
|
1267
1267
|
);
|
|
1268
1268
|
}
|
|
1269
|
-
const
|
|
1269
|
+
const K = Symbol("playground-cli-testing"), C = (e) => process.stdout.isTTY ? "\x1B[1m" + e + "\x1B[0m" : e, Nt = (e) => process.stdout.isTTY ? "\x1B[31m" + e + "\x1B[0m" : e, fe = (e) => process.stdout.isTTY ? `\x1B[2m${e}\x1B[0m` : e, L = (e) => process.stdout.isTTY ? `\x1B[3m${e}\x1B[0m` : e, V = (e) => process.stdout.isTTY ? `\x1B[33m${e}\x1B[0m` : e;
|
|
1270
1270
|
async function xe(e) {
|
|
1271
1271
|
let t;
|
|
1272
1272
|
const r = e.internalCookieStore ? new Ce() : void 0, o = [], s = /* @__PURE__ */ new Map();
|
|
1273
1273
|
if (e.command === "start" && (e = Ot(e)), e.autoMount !== void 0 && (e.autoMount === "" && (e = { ...e, autoMount: process.cwd() }), e = Pe(e)), e.wordpressInstallMode === void 0 && (e.wordpressInstallMode = "download-and-install"), e.quiet && (e.verbosity = "quiet", delete e.quiet), e.debug && (e.verbosity = "debug", delete e.debug), e.verbosity) {
|
|
1274
|
-
const c = Object.values(
|
|
1274
|
+
const c = Object.values(J).find(
|
|
1275
1275
|
(x) => x.name === e.verbosity
|
|
1276
1276
|
).severity;
|
|
1277
1277
|
y.setSeverityFilterLevel(c);
|
|
1278
1278
|
}
|
|
1279
|
-
e.intl || (e.intl = !0), e.redis === void 0 && (e.redis = await
|
|
1279
|
+
e.intl || (e.intl = !0), e.redis === void 0 && (e.redis = await de()), e.memcached === void 0 && (e.memcached = await de()), e.phpmyadmin && (e.phpmyadmin === !0 && (e.phpmyadmin = "/phpmyadmin"), e.pathAliases = [
|
|
1280
1280
|
{
|
|
1281
1281
|
urlPrefix: e.phpmyadmin,
|
|
1282
|
-
fsPath:
|
|
1282
|
+
fsPath: ue
|
|
1283
1283
|
}
|
|
1284
1284
|
]);
|
|
1285
1285
|
const i = new Ut({
|
|
@@ -1306,16 +1306,16 @@ async function xe(e) {
|
|
|
1306
1306
|
onBind: async (c, x) => {
|
|
1307
1307
|
const w = "127.0.0.1", T = `http://${w}:${x}`, a = e["site-url"] || T, E = 6, P = "-playground-cli-site-", I = await Bt(P);
|
|
1308
1308
|
y.debug(`Native temp dir for VFS root: ${I.path}`);
|
|
1309
|
-
const R = "WP Playground CLI - Listen for Xdebug",
|
|
1309
|
+
const R = "WP Playground CLI - Listen for Xdebug", ee = ".playground-xdebug-root", H = d.join(process.cwd(), ee);
|
|
1310
1310
|
if (await ot(H), e.xdebug) {
|
|
1311
1311
|
const m = {
|
|
1312
|
-
hostPath: d.join(".", d.sep,
|
|
1312
|
+
hostPath: d.join(".", d.sep, ee),
|
|
1313
1313
|
vfsPath: "/"
|
|
1314
1314
|
};
|
|
1315
1315
|
if (U.indexOf(
|
|
1316
1316
|
e.php || D
|
|
1317
1317
|
) <= U.indexOf("8.5"))
|
|
1318
|
-
await
|
|
1318
|
+
await ae(
|
|
1319
1319
|
I.path,
|
|
1320
1320
|
H,
|
|
1321
1321
|
process.platform
|
|
@@ -1326,16 +1326,16 @@ async function xe(e) {
|
|
|
1326
1326
|
...e["mount-before-install"] || [],
|
|
1327
1327
|
...e.mount || []
|
|
1328
1328
|
],
|
|
1329
|
-
pathSkippings: [...
|
|
1329
|
+
pathSkippings: [...le]
|
|
1330
1330
|
}), console.log(C("Xdebug configured successfully")), console.log(
|
|
1331
1331
|
V("Playground source root: ") + ".playground-xdebug-root" + L(
|
|
1332
|
-
|
|
1332
|
+
fe(
|
|
1333
1333
|
" – you can set breakpoints and preview Playground's VFS structure in there."
|
|
1334
1334
|
)
|
|
1335
1335
|
)
|
|
1336
1336
|
);
|
|
1337
1337
|
else if (e.experimentalUnsafeIdeIntegration) {
|
|
1338
|
-
await
|
|
1338
|
+
await ae(
|
|
1339
1339
|
I.path,
|
|
1340
1340
|
H,
|
|
1341
1341
|
process.platform
|
|
@@ -1356,7 +1356,7 @@ async function xe(e) {
|
|
|
1356
1356
|
...e["mount-before-install"] || [],
|
|
1357
1357
|
...e.mount || []
|
|
1358
1358
|
],
|
|
1359
|
-
pathSkippings: [...
|
|
1359
|
+
pathSkippings: [...le],
|
|
1360
1360
|
ideKey: f.ideKey || "WPPLAYGROUNDCLI"
|
|
1361
1361
|
}), v = e.experimentalUnsafeIdeIntegration, S = v.includes("vscode"), $ = v.includes("phpstorm"), W = Object.values(b);
|
|
1362
1362
|
console.log(""), W.length > 0 ? (console.log(
|
|
@@ -1365,7 +1365,7 @@ async function xe(e) {
|
|
|
1365
1365
|
V("Updated IDE config: ") + W.join(" ")
|
|
1366
1366
|
), console.log(
|
|
1367
1367
|
V("Playground source root: ") + ".playground-xdebug-root" + L(
|
|
1368
|
-
|
|
1368
|
+
fe(
|
|
1369
1369
|
" – you can set breakpoints and preview Playground's VFS structure in there."
|
|
1370
1370
|
)
|
|
1371
1371
|
)
|
|
@@ -1415,8 +1415,8 @@ async function xe(e) {
|
|
|
1415
1415
|
Te,
|
|
1416
1416
|
$e
|
|
1417
1417
|
);
|
|
1418
|
-
const
|
|
1419
|
-
q(
|
|
1418
|
+
const te = d.join(I.path, "internal");
|
|
1419
|
+
q(te);
|
|
1420
1420
|
const Ie = [
|
|
1421
1421
|
"wordpress",
|
|
1422
1422
|
"tools",
|
|
@@ -1489,7 +1489,7 @@ async function xe(e) {
|
|
|
1489
1489
|
const S = await Ft(l), $ = await A.bootRequestHandler({
|
|
1490
1490
|
worker: v,
|
|
1491
1491
|
fileLockManagerPort: S,
|
|
1492
|
-
nativeInternalDirPath:
|
|
1492
|
+
nativeInternalDirPath: te
|
|
1493
1493
|
});
|
|
1494
1494
|
return s.set(
|
|
1495
1495
|
v,
|
|
@@ -1505,7 +1505,7 @@ async function xe(e) {
|
|
|
1505
1505
|
)
|
|
1506
1506
|
);
|
|
1507
1507
|
{
|
|
1508
|
-
const f = new
|
|
1508
|
+
const f = new ye(), b = f.port1, v = f.port2;
|
|
1509
1509
|
if (await De(
|
|
1510
1510
|
{
|
|
1511
1511
|
applyPostInstallMountsToAllWorkers: async () => {
|
|
@@ -1524,16 +1524,16 @@ async function xe(e) {
|
|
|
1524
1524
|
const S = await A.compileInputBlueprint(
|
|
1525
1525
|
e["additional-blueprint-steps"] || []
|
|
1526
1526
|
);
|
|
1527
|
-
S && await
|
|
1527
|
+
S && await ie(
|
|
1528
1528
|
S,
|
|
1529
1529
|
t
|
|
1530
1530
|
);
|
|
1531
1531
|
}
|
|
1532
1532
|
if (e.phpmyadmin && !await t.fileExists(
|
|
1533
|
-
`${
|
|
1533
|
+
`${ue}/index.php`
|
|
1534
1534
|
)) {
|
|
1535
|
-
const S = await lt(), $ = await
|
|
1536
|
-
await
|
|
1535
|
+
const S = await lt(), $ = await we({ steps: S });
|
|
1536
|
+
await ie($, t);
|
|
1537
1537
|
}
|
|
1538
1538
|
if (e.command === "build-snapshot") {
|
|
1539
1539
|
await Vt(t, e.outfile), i.printStatus(`Exported to ${e.outfile}`), await B();
|
|
@@ -1584,7 +1584,7 @@ async function xe(e) {
|
|
|
1584
1584
|
server: c,
|
|
1585
1585
|
serverUrl: T,
|
|
1586
1586
|
[Symbol.asyncDispose]: B,
|
|
1587
|
-
[
|
|
1587
|
+
[K]: {
|
|
1588
1588
|
workerThreadCount: E
|
|
1589
1589
|
}
|
|
1590
1590
|
};
|
|
@@ -1592,12 +1592,12 @@ async function xe(e) {
|
|
|
1592
1592
|
if (e.verbosity !== "debug")
|
|
1593
1593
|
throw m;
|
|
1594
1594
|
let g = "";
|
|
1595
|
-
throw await t?.fileExists(
|
|
1595
|
+
throw await t?.fileExists(re) && (g = await t.readFileAsText(re)), await B(), new Error(g, { cause: m });
|
|
1596
1596
|
}
|
|
1597
1597
|
},
|
|
1598
1598
|
async handleRequest(c) {
|
|
1599
1599
|
if (!u)
|
|
1600
|
-
return
|
|
1600
|
+
return oe.forHttpCode(
|
|
1601
1601
|
502,
|
|
1602
1602
|
"WordPress is not ready yet"
|
|
1603
1603
|
);
|
|
@@ -1612,7 +1612,7 @@ async function xe(e) {
|
|
|
1612
1612
|
"playground_auto_login_already_happened"
|
|
1613
1613
|
) && (w["Set-Cookie"] = [
|
|
1614
1614
|
"playground_auto_login_already_happened=1; Max-Age=0; Expires=Thu, 01 Jan 1970 00:00:00 GMT; Path=/"
|
|
1615
|
-
]),
|
|
1615
|
+
]), oe.fromPHPResponse(
|
|
1616
1616
|
new Re(302, w, new Uint8Array())
|
|
1617
1617
|
);
|
|
1618
1618
|
}
|
|
@@ -1643,10 +1643,10 @@ async function xe(e) {
|
|
|
1643
1643
|
function Ot(e) {
|
|
1644
1644
|
let t = { ...e, command: "server" };
|
|
1645
1645
|
e.noAutoMount || (t.autoMount = d.resolve(process.cwd(), t.path ?? ""), t = Pe(t), delete t.autoMount);
|
|
1646
|
-
const r =
|
|
1646
|
+
const r = me(
|
|
1647
1647
|
t["mount-before-install"] || [],
|
|
1648
1648
|
"/wordpress"
|
|
1649
|
-
) ||
|
|
1649
|
+
) || me(t.mount || [], "/wordpress");
|
|
1650
1650
|
if (r)
|
|
1651
1651
|
console.log("Site files stored at:", r?.hostPath), e.reset && (console.log(""), console.log(
|
|
1652
1652
|
Nt(
|
|
@@ -1658,7 +1658,7 @@ function Ot(e) {
|
|
|
1658
1658
|
"You may still remove the site's directory manually if you wish."
|
|
1659
1659
|
), process.exit(1));
|
|
1660
1660
|
else {
|
|
1661
|
-
const o = t.autoMount || process.cwd(), s = at("sha256").update(o).digest("hex"), i =
|
|
1661
|
+
const o = t.autoMount || process.cwd(), s = at("sha256").update(o).digest("hex"), i = X.homedir(), n = d.join(
|
|
1662
1662
|
i,
|
|
1663
1663
|
".wordpress-playground/sites",
|
|
1664
1664
|
s
|
|
@@ -1680,7 +1680,7 @@ function Ot(e) {
|
|
|
1680
1680
|
const Y = new ke();
|
|
1681
1681
|
function Ee(e, { onExit: t } = {}) {
|
|
1682
1682
|
let r;
|
|
1683
|
-
return e === "v1" ? r = new
|
|
1683
|
+
return e === "v1" ? r = new ne(new URL("./worker-thread-v1.js", import.meta.url)) : r = new ne(new URL("./worker-thread-v2.js", import.meta.url)), new Promise((o, s) => {
|
|
1684
1684
|
const i = Y.claim();
|
|
1685
1685
|
r.once("message", function(l) {
|
|
1686
1686
|
l.command === "worker-script-initialized" && o({
|
|
@@ -1705,11 +1705,11 @@ function Ee(e, { onExit: t } = {}) {
|
|
|
1705
1705
|
});
|
|
1706
1706
|
}
|
|
1707
1707
|
async function Ft(e) {
|
|
1708
|
-
const { port1: t, port2: r } = new
|
|
1708
|
+
const { port1: t, port2: r } = new ye();
|
|
1709
1709
|
return await We(e, t), r;
|
|
1710
1710
|
}
|
|
1711
1711
|
function jt(e) {
|
|
1712
|
-
const t =
|
|
1712
|
+
const t = X.platform();
|
|
1713
1713
|
let r;
|
|
1714
1714
|
switch (t) {
|
|
1715
1715
|
case "darwin":
|
|
@@ -1752,22 +1752,22 @@ async function Vt(e, t) {
|
|
|
1752
1752
|
}
|
|
1753
1753
|
const gr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1754
1754
|
__proto__: null,
|
|
1755
|
-
LogVerbosity:
|
|
1756
|
-
internalsKeyForTesting:
|
|
1757
|
-
mergeDefinedConstants:
|
|
1755
|
+
LogVerbosity: J,
|
|
1756
|
+
internalsKeyForTesting: K,
|
|
1757
|
+
mergeDefinedConstants: Z,
|
|
1758
1758
|
parseOptionsAndRunCLI: Ht,
|
|
1759
1759
|
runCLI: xe,
|
|
1760
1760
|
spawnWorkerThread: Ee
|
|
1761
1761
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1762
1762
|
export {
|
|
1763
|
-
|
|
1763
|
+
J as L,
|
|
1764
1764
|
br as a,
|
|
1765
1765
|
_t as b,
|
|
1766
1766
|
gr as c,
|
|
1767
|
-
|
|
1768
|
-
|
|
1767
|
+
K as i,
|
|
1768
|
+
Z as m,
|
|
1769
1769
|
Ht as p,
|
|
1770
1770
|
xe as r,
|
|
1771
1771
|
Ee as s
|
|
1772
1772
|
};
|
|
1773
|
-
//# sourceMappingURL=run-cli-
|
|
1773
|
+
//# sourceMappingURL=run-cli-B9kBDU12.js.map
|