@wp-playground/cli 3.1.35 → 3.1.38
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 +93 -20
- 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-DxD1h5dy.js → run-cli-B6snvP5v.js} +282 -267
- package/run-cli-B6snvP5v.js.map +1 -0
- package/run-cli-CsqeBu36.cjs +65 -0
- package/run-cli-CsqeBu36.cjs.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-C1cUS9na.cjs +0 -65
- package/run-cli-C1cUS9na.cjs.map +0 -1
- package/run-cli-DxD1h5dy.js.map +0 -1
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { logger as h, LogSeverity as O, errorLogPath as
|
|
2
|
-
import { consumeAPI as
|
|
3
|
-
import { resolveRemoteBlueprint as
|
|
4
|
-
import { RecommendedPHPVersion as T, zipDirectory as
|
|
5
|
-
import
|
|
6
|
-
import { MessageChannel as
|
|
7
|
-
import { createNodeFsMountHandler as
|
|
8
|
-
import d, { basename as _, join as
|
|
9
|
-
import { exec as
|
|
10
|
-
import { promisify as
|
|
11
|
-
import
|
|
12
|
-
import { Readable as
|
|
13
|
-
import { pipeline as
|
|
14
|
-
import
|
|
15
|
-
import { NodeJsFilesystem as
|
|
16
|
-
import { EmscriptenDownloadMonitor as
|
|
17
|
-
import { resolveWordPressRelease as
|
|
18
|
-
import
|
|
19
|
-
import { createRequire as
|
|
1
|
+
import { logger as h, LogSeverity as O, errorLogPath as re } from "@php-wasm/logger";
|
|
2
|
+
import { consumeAPI as he, isLegacyPHPVersion as Q, AllPHPVersions as Ce, isPHPNextVersion as Te, ProcessIdAllocator as Ae, printDebugDetails as De, HttpCookieStore as Re, FileLockManagerInMemory as Le, StreamedPHPResponse as oe, SupportedPHPVersions as j, createObjectPoolProxy as We, exposeAPI as Be, PHPResponse as Ue, exposeSyncAPI as _e } from "@php-wasm/universal";
|
|
3
|
+
import { resolveRemoteBlueprint as He, resolveRuntimeConfiguration as ne, compileBlueprintV1 as we, isBlueprintBundle as Ne, runBlueprintV1Steps as ie } from "@wp-playground/blueprints";
|
|
4
|
+
import { RecommendedPHPVersion as T, zipDirectory as Fe } from "@wp-playground/common";
|
|
5
|
+
import m, { existsSync as X, rmSync as Oe, mkdirSync as z, readdirSync as je } from "fs";
|
|
6
|
+
import { MessageChannel as be, Worker as se } from "worker_threads";
|
|
7
|
+
import { createNodeFsMountHandler as Ve } from "@php-wasm/node";
|
|
8
|
+
import d, { basename as _, join as Z } from "path";
|
|
9
|
+
import { exec as ye } from "child_process";
|
|
10
|
+
import { promisify as qe } from "util";
|
|
11
|
+
import ge from "express";
|
|
12
|
+
import { Readable as ze } from "stream";
|
|
13
|
+
import { pipeline as Ge } from "stream/promises";
|
|
14
|
+
import Ye from "yargs";
|
|
15
|
+
import { NodeJsFilesystem as Qe, OverlayFilesystem as Xe, InMemoryFilesystem as Ze, ZipFilesystem as Je } from "@wp-playground/storage";
|
|
16
|
+
import { EmscriptenDownloadMonitor as Ke, ProgressTracker as et } from "@php-wasm/progress";
|
|
17
|
+
import { resolveWordPressRelease as tt } from "@wp-playground/wordpress";
|
|
18
|
+
import A from "fs-extra";
|
|
19
|
+
import { createRequire as rt } from "module";
|
|
20
20
|
import B from "os";
|
|
21
|
-
import { startBridge as
|
|
22
|
-
import { dir as
|
|
23
|
-
import { CLIOutput as
|
|
24
|
-
import { createHash as
|
|
25
|
-
import { PHPMYADMIN_INSTALL_PATH as ue, getPhpMyAdminInstallSteps as
|
|
21
|
+
import { startBridge as ot } from "@php-wasm/xdebug-bridge";
|
|
22
|
+
import { dir as nt, setGracefulCleanup as it } from "tmp-promise";
|
|
23
|
+
import { CLIOutput as st, removeTempDirSymlink as at, createTempDirSymlink as ae, makeXdebugConfig as lt, DEFAULT_PATH_SKIPPINGS as le, clearXdebugIDEConfig as ut, addXdebugIDEConfig as dt } from "@php-wasm/cli-util";
|
|
24
|
+
import { createHash as pt } from "crypto";
|
|
25
|
+
import { PHPMYADMIN_INSTALL_PATH as ue, getPhpMyAdminInstallSteps as ct, PHPMYADMIN_ENTRY_PATH as mt } from "@wp-playground/tools";
|
|
26
26
|
import { jspi as de } from "wasm-feature-detect";
|
|
27
27
|
function V(e) {
|
|
28
28
|
const t = [];
|
|
@@ -34,7 +34,7 @@ function V(e) {
|
|
|
34
34
|
If your path contains a colon, e.g. C:\\myplugin, use the --mount-dir option instead.
|
|
35
35
|
Example: --mount-dir C:\\my-plugin /wordpress/wp-content/plugins/my-plugin`);
|
|
36
36
|
const [i, o] = n;
|
|
37
|
-
if (!
|
|
37
|
+
if (!X(i))
|
|
38
38
|
throw new Error(`Host path does not exist: ${i}`);
|
|
39
39
|
t.push({ hostPath: i, vfsPath: o });
|
|
40
40
|
}
|
|
@@ -46,7 +46,7 @@ function pe(e) {
|
|
|
46
46
|
const t = [];
|
|
47
47
|
for (let r = 0; r < e.length; r += 2) {
|
|
48
48
|
const n = e[r], i = e[r + 1];
|
|
49
|
-
if (!
|
|
49
|
+
if (!X(n))
|
|
50
50
|
throw new Error(`Host path does not exist: ${n}`);
|
|
51
51
|
t.push({
|
|
52
52
|
hostPath: d.resolve(process.cwd(), n),
|
|
@@ -55,11 +55,11 @@ function pe(e) {
|
|
|
55
55
|
}
|
|
56
56
|
return t;
|
|
57
57
|
}
|
|
58
|
-
async function
|
|
58
|
+
async function vr(e, t) {
|
|
59
59
|
for (const r of t)
|
|
60
60
|
await e.mount(
|
|
61
61
|
r.vfsPath,
|
|
62
|
-
|
|
62
|
+
Ve(r.hostPath)
|
|
63
63
|
);
|
|
64
64
|
}
|
|
65
65
|
const ce = {
|
|
@@ -81,7 +81,7 @@ const ce = {
|
|
|
81
81
|
`
|
|
82
82
|
}
|
|
83
83
|
};
|
|
84
|
-
function
|
|
84
|
+
function Pe(e) {
|
|
85
85
|
if (typeof e.autoMount != "string")
|
|
86
86
|
return e;
|
|
87
87
|
const t = e.autoMount, r = [...e.mount || []], n = [...e["mount-before-install"] || []], i = {
|
|
@@ -92,7 +92,7 @@ function ge(e) {
|
|
|
92
92
|
...e["additional-blueprint-steps"] || []
|
|
93
93
|
]
|
|
94
94
|
};
|
|
95
|
-
if (
|
|
95
|
+
if (bt(t)) {
|
|
96
96
|
const a = `/wordpress/wp-content/plugins/${_(t)}`;
|
|
97
97
|
r.push({
|
|
98
98
|
hostPath: t,
|
|
@@ -102,7 +102,7 @@ function ge(e) {
|
|
|
102
102
|
step: "activatePlugin",
|
|
103
103
|
pluginPath: `/wordpress/wp-content/plugins/${_(t)}`
|
|
104
104
|
});
|
|
105
|
-
} else if (
|
|
105
|
+
} else if (wt(t)) {
|
|
106
106
|
const o = _(t), a = `/wordpress/wp-content/themes/${o}`;
|
|
107
107
|
r.push({
|
|
108
108
|
hostPath: t,
|
|
@@ -117,44 +117,44 @@ function ge(e) {
|
|
|
117
117
|
themeFolderName: o
|
|
118
118
|
}
|
|
119
119
|
);
|
|
120
|
-
} else if (
|
|
121
|
-
const o =
|
|
120
|
+
} else if (ht(t)) {
|
|
121
|
+
const o = m.readdirSync(t);
|
|
122
122
|
for (const a of o)
|
|
123
123
|
a !== "index.php" && r.push({
|
|
124
|
-
hostPath:
|
|
124
|
+
hostPath: Z(t, a),
|
|
125
125
|
vfsPath: `/wordpress/wp-content/${a}`,
|
|
126
126
|
autoMounted: !0
|
|
127
127
|
});
|
|
128
128
|
i["additional-blueprint-steps"].push(ce);
|
|
129
|
-
} else
|
|
129
|
+
} else ft(t) && (n.push({
|
|
130
130
|
hostPath: t,
|
|
131
131
|
vfsPath: "/wordpress",
|
|
132
132
|
autoMounted: !0
|
|
133
133
|
}), i.mode = "apply-to-existing-site", i["additional-blueprint-steps"].push(ce), i.wordpressInstallMode || (i.wordpressInstallMode = "install-from-existing-files-if-needed"));
|
|
134
134
|
return i;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
137
|
-
const t =
|
|
136
|
+
function ft(e) {
|
|
137
|
+
const t = m.readdirSync(e);
|
|
138
138
|
return t.includes("wp-admin") && t.includes("wp-includes") && t.includes("wp-content");
|
|
139
139
|
}
|
|
140
|
-
function
|
|
141
|
-
const t =
|
|
140
|
+
function ht(e) {
|
|
141
|
+
const t = m.readdirSync(e);
|
|
142
142
|
return t.includes("themes") || t.includes("plugins") || t.includes("mu-plugins") || t.includes("uploads");
|
|
143
143
|
}
|
|
144
|
-
function
|
|
145
|
-
if (!
|
|
144
|
+
function wt(e) {
|
|
145
|
+
if (!m.readdirSync(e).includes("style.css"))
|
|
146
146
|
return !1;
|
|
147
|
-
const r =
|
|
147
|
+
const r = m.readFileSync(Z(e, "style.css"), "utf8");
|
|
148
148
|
return !!/^(?:[ \t]*<\?php)?[ \t/*#@]*Theme Name:(.*)$/im.exec(r);
|
|
149
149
|
}
|
|
150
|
-
function
|
|
151
|
-
const t =
|
|
150
|
+
function bt(e) {
|
|
151
|
+
const t = m.readdirSync(e), r = /^(?:[ \t]*<\?php)?[ \t/*#@]*Plugin Name:(.*)$/im;
|
|
152
152
|
return !!t.filter((i) => i.endsWith(".php")).find((i) => {
|
|
153
|
-
const o =
|
|
153
|
+
const o = m.readFileSync(Z(e, i), "utf8");
|
|
154
154
|
return !!r.exec(o);
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
|
-
function
|
|
157
|
+
function yt(e) {
|
|
158
158
|
if (e.length % 2 !== 0)
|
|
159
159
|
throw new Error(
|
|
160
160
|
"Invalid constant definition format. Expected pairs of NAME value"
|
|
@@ -168,7 +168,7 @@ function wt(e) {
|
|
|
168
168
|
}
|
|
169
169
|
return t;
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function gt(e) {
|
|
172
172
|
if (e.length % 2 !== 0)
|
|
173
173
|
throw new Error(
|
|
174
174
|
"Invalid boolean constant definition format. Expected pairs of NAME value"
|
|
@@ -189,7 +189,7 @@ function bt(e) {
|
|
|
189
189
|
}
|
|
190
190
|
return t;
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function Pt(e) {
|
|
193
193
|
if (e.length % 2 !== 0)
|
|
194
194
|
throw new Error(
|
|
195
195
|
"Invalid number constant definition format. Expected pairs of NAME value"
|
|
@@ -208,7 +208,7 @@ function yt(e) {
|
|
|
208
208
|
}
|
|
209
209
|
return t;
|
|
210
210
|
}
|
|
211
|
-
function
|
|
211
|
+
function vt(e = {}, t = {}, r = {}) {
|
|
212
212
|
const n = {}, i = /* @__PURE__ */ new Set(), o = (a, l) => {
|
|
213
213
|
for (const u in a) {
|
|
214
214
|
if (i.has(u))
|
|
@@ -220,48 +220,48 @@ function gt(e = {}, t = {}, r = {}) {
|
|
|
220
220
|
};
|
|
221
221
|
return o(e, "string"), o(t, "bool"), o(r, "number"), n;
|
|
222
222
|
}
|
|
223
|
-
function
|
|
224
|
-
return
|
|
223
|
+
function J(e) {
|
|
224
|
+
return vt(
|
|
225
225
|
e.define,
|
|
226
226
|
e["define-bool"],
|
|
227
227
|
e["define-number"]
|
|
228
228
|
);
|
|
229
229
|
}
|
|
230
|
-
const
|
|
231
|
-
function
|
|
230
|
+
const St = qe(ye);
|
|
231
|
+
function xt(e) {
|
|
232
232
|
return new Promise((t) => {
|
|
233
233
|
if (e === 0) return t(!1);
|
|
234
|
-
const r =
|
|
234
|
+
const r = ge().listen(e);
|
|
235
235
|
r.once("listening", () => r.close(() => t(!1))), r.once(
|
|
236
236
|
"error",
|
|
237
237
|
(n) => t(n.code === "EADDRINUSE")
|
|
238
238
|
);
|
|
239
239
|
});
|
|
240
240
|
}
|
|
241
|
-
async function
|
|
242
|
-
const t =
|
|
241
|
+
async function Et(e) {
|
|
242
|
+
const t = ge(), r = await new Promise((a, l) => {
|
|
243
243
|
const u = t.listen(e.port, () => {
|
|
244
|
-
const
|
|
245
|
-
|
|
244
|
+
const p = u.address();
|
|
245
|
+
p === null || typeof p == "string" ? l(new Error("Server address is not available")) : a(u);
|
|
246
246
|
}).once("error", l);
|
|
247
247
|
});
|
|
248
248
|
t.use("/", async (a, l) => {
|
|
249
249
|
try {
|
|
250
250
|
const u = {
|
|
251
251
|
url: a.url,
|
|
252
|
-
headers:
|
|
252
|
+
headers: Mt(a),
|
|
253
253
|
method: a.method,
|
|
254
|
-
body: await
|
|
255
|
-
},
|
|
256
|
-
await
|
|
254
|
+
body: await kt(a)
|
|
255
|
+
}, p = await e.handleRequest(u);
|
|
256
|
+
await $t(p, l);
|
|
257
257
|
} catch (u) {
|
|
258
258
|
h.error(u), l.headersSent || (l.statusCode = 500, l.end("Internal Server Error"));
|
|
259
259
|
}
|
|
260
260
|
});
|
|
261
261
|
const i = r.address().port, o = process.env.CODESPACE_NAME;
|
|
262
|
-
return o &&
|
|
262
|
+
return o && It(i, o), await e.onBind(r, i);
|
|
263
263
|
}
|
|
264
|
-
async function
|
|
264
|
+
async function $t(e, t) {
|
|
265
265
|
const [r, n] = await Promise.all([
|
|
266
266
|
e.headers,
|
|
267
267
|
e.httpStatusCode
|
|
@@ -269,16 +269,16 @@ async function xt(e, t) {
|
|
|
269
269
|
t.statusCode = n;
|
|
270
270
|
for (const o in r)
|
|
271
271
|
t.setHeader(o, r[o]);
|
|
272
|
-
const i =
|
|
272
|
+
const i = ze.fromWeb(e.stdout);
|
|
273
273
|
try {
|
|
274
|
-
await
|
|
274
|
+
await Ge(i, t);
|
|
275
275
|
} catch (o) {
|
|
276
276
|
if (o instanceof Error && "code" in o && (o.code === "ERR_STREAM_PREMATURE_CLOSE" || o.code === "ERR_STREAM_UNABLE_TO_PIPE"))
|
|
277
277
|
return;
|
|
278
278
|
throw o;
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
|
-
const
|
|
281
|
+
const kt = async (e) => await new Promise((t) => {
|
|
282
282
|
const r = [];
|
|
283
283
|
e.on("data", (n) => {
|
|
284
284
|
r.push(n);
|
|
@@ -286,39 +286,39 @@ const Et = async (e) => await new Promise((t) => {
|
|
|
286
286
|
t(new Uint8Array(Buffer.concat(r)));
|
|
287
287
|
});
|
|
288
288
|
});
|
|
289
|
-
async function
|
|
289
|
+
async function It(e, t) {
|
|
290
290
|
h.log(`Publishing port ${e}...`);
|
|
291
291
|
const r = `gh codespace ports visibility ${e}:public -c ${t}`;
|
|
292
292
|
for (let n = 0; n < 10; n++)
|
|
293
293
|
try {
|
|
294
|
-
await
|
|
294
|
+
await St(r);
|
|
295
295
|
return;
|
|
296
296
|
} catch {
|
|
297
297
|
await new Promise((i) => setTimeout(i, 2e3));
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
|
-
const
|
|
300
|
+
const Mt = (e) => {
|
|
301
301
|
const t = {};
|
|
302
302
|
if (e.rawHeaders && e.rawHeaders.length)
|
|
303
303
|
for (let r = 0; r < e.rawHeaders.length; r += 2)
|
|
304
304
|
t[e.rawHeaders[r].toLowerCase()] = e.rawHeaders[r + 1];
|
|
305
305
|
return t;
|
|
306
306
|
};
|
|
307
|
-
function
|
|
307
|
+
function Ct(e) {
|
|
308
308
|
return /^latest$|^beta$|^trunk$|^nightly$|^(?:(\d+)\.(\d+)(?:\.(\d+))?)((?:-beta(?:\d+)?)|(?:-RC(?:\d+)?))?$/.test(e);
|
|
309
309
|
}
|
|
310
|
-
async function
|
|
310
|
+
async function Tt({
|
|
311
311
|
sourceString: e,
|
|
312
312
|
blueprintMayReadAdjacentFiles: t
|
|
313
313
|
}) {
|
|
314
314
|
if (!e)
|
|
315
315
|
return;
|
|
316
316
|
if (e.startsWith("http://") || e.startsWith("https://"))
|
|
317
|
-
return await
|
|
317
|
+
return await He(e);
|
|
318
318
|
let r = d.resolve(process.cwd(), e);
|
|
319
|
-
if (!
|
|
319
|
+
if (!m.existsSync(r))
|
|
320
320
|
throw new Error(`Blueprint file does not exist: ${r}`);
|
|
321
|
-
const n =
|
|
321
|
+
const n = m.statSync(r);
|
|
322
322
|
if (n.isDirectory() && (r = d.join(r, "blueprint.json")), !n.isFile() && n.isSymbolicLink())
|
|
323
323
|
throw new Error(
|
|
324
324
|
`Blueprint path is neither a file nor a directory: ${r}`
|
|
@@ -326,11 +326,11 @@ async function Mt({
|
|
|
326
326
|
const i = d.extname(r);
|
|
327
327
|
switch (i) {
|
|
328
328
|
case ".zip":
|
|
329
|
-
return
|
|
330
|
-
|
|
329
|
+
return Je.fromArrayBuffer(
|
|
330
|
+
m.readFileSync(r).buffer
|
|
331
331
|
);
|
|
332
332
|
case ".json": {
|
|
333
|
-
const o =
|
|
333
|
+
const o = m.readFileSync(r, "utf-8");
|
|
334
334
|
try {
|
|
335
335
|
JSON.parse(o);
|
|
336
336
|
} catch {
|
|
@@ -338,9 +338,9 @@ async function Mt({
|
|
|
338
338
|
`Blueprint file at ${r} is not a valid JSON file`
|
|
339
339
|
);
|
|
340
340
|
}
|
|
341
|
-
const a = d.dirname(r), l = new
|
|
342
|
-
return new
|
|
343
|
-
new
|
|
341
|
+
const a = d.dirname(r), l = new Qe(a);
|
|
342
|
+
return new Xe([
|
|
343
|
+
new Ze({
|
|
344
344
|
"blueprint.json": o
|
|
345
345
|
}),
|
|
346
346
|
/**
|
|
@@ -366,7 +366,7 @@ You can allow this Blueprint to read files from the same parent directory by exp
|
|
|
366
366
|
);
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
|
-
function
|
|
369
|
+
function ve(e) {
|
|
370
370
|
const t = [];
|
|
371
371
|
e.intl && t.push("intl"), e.redis && t.push("redis"), e.memcached && t.push("memcached"), e.xdebug && t.push(
|
|
372
372
|
typeof e.xdebug == "object" ? { name: "xdebug", options: e.xdebug } : "xdebug"
|
|
@@ -380,7 +380,7 @@ function Pe(e) {
|
|
|
380
380
|
});
|
|
381
381
|
return t;
|
|
382
382
|
}
|
|
383
|
-
class
|
|
383
|
+
class At {
|
|
384
384
|
constructor(t, r) {
|
|
385
385
|
this.args = t, this.siteUrl = r.siteUrl, this.phpVersion = t.php, this.cliOutput = r.cliOutput;
|
|
386
386
|
}
|
|
@@ -401,7 +401,7 @@ class Tt {
|
|
|
401
401
|
fileLockManagerPort: r,
|
|
402
402
|
nativeInternalDirPath: n
|
|
403
403
|
}) {
|
|
404
|
-
const i =
|
|
404
|
+
const i = he(t.phpPort);
|
|
405
405
|
await i.useFileLockManager(r);
|
|
406
406
|
const o = {
|
|
407
407
|
...this.args,
|
|
@@ -409,21 +409,21 @@ class Tt {
|
|
|
409
409
|
siteUrl: this.siteUrl,
|
|
410
410
|
processId: t.processId,
|
|
411
411
|
trace: this.args.verbosity === "debug",
|
|
412
|
-
extensions:
|
|
412
|
+
extensions: ve(this.args),
|
|
413
413
|
nativeInternalDirPath: n,
|
|
414
414
|
mountsBeforeWpInstall: this.args["mount-before-install"] || [],
|
|
415
415
|
mountsAfterWpInstall: this.args.mount || [],
|
|
416
|
-
constants:
|
|
416
|
+
constants: J(this.args)
|
|
417
417
|
};
|
|
418
418
|
return await i.bootWorker(o), i;
|
|
419
419
|
}
|
|
420
420
|
}
|
|
421
421
|
const G = d.join(B.homedir(), ".wordpress-playground");
|
|
422
|
-
async function
|
|
422
|
+
async function Dt(e = "trunk") {
|
|
423
423
|
const t = typeof __dirname < "u" ? __dirname : import.meta.dirname;
|
|
424
424
|
let r = d.join(t, "sqlite-database-integration.zip");
|
|
425
|
-
if (!
|
|
426
|
-
const n =
|
|
425
|
+
if (!A.existsSync(r)) {
|
|
426
|
+
const n = rt(import.meta.url), i = d.dirname(
|
|
427
427
|
n.resolve("@wp-playground/wordpress-builds/package.json")
|
|
428
428
|
);
|
|
429
429
|
r = d.join(
|
|
@@ -433,14 +433,14 @@ async function Ct(e = "trunk") {
|
|
|
433
433
|
`sqlite-database-integration-${e}.zip`
|
|
434
434
|
);
|
|
435
435
|
}
|
|
436
|
-
return new File([await
|
|
436
|
+
return new File([await A.readFile(r)], d.basename(r));
|
|
437
437
|
}
|
|
438
|
-
async function
|
|
438
|
+
async function Rt(e, t, r) {
|
|
439
439
|
const n = d.join(G, t);
|
|
440
|
-
return
|
|
440
|
+
return A.existsSync(n) || (A.ensureDirSync(G), await Lt(e, n, r)), Se(n);
|
|
441
441
|
}
|
|
442
|
-
async function
|
|
443
|
-
const i = (await r.monitorFetch(fetch(e))).body.getReader(), o = `${t}.partial`, a =
|
|
442
|
+
async function Lt(e, t, r) {
|
|
443
|
+
const i = (await r.monitorFetch(fetch(e))).body.getReader(), o = `${t}.partial`, a = A.createWriteStream(o);
|
|
444
444
|
for (; ; ) {
|
|
445
445
|
const { done: l, value: u } = await i.read();
|
|
446
446
|
if (u && a.write(u), l)
|
|
@@ -448,16 +448,16 @@ async function Dt(e, t, r) {
|
|
|
448
448
|
}
|
|
449
449
|
a.close(), a.closed || await new Promise((l, u) => {
|
|
450
450
|
a.on("finish", () => {
|
|
451
|
-
|
|
452
|
-
}), a.on("error", (
|
|
453
|
-
|
|
451
|
+
A.renameSync(o, t), l(null);
|
|
452
|
+
}), a.on("error", (p) => {
|
|
453
|
+
A.removeSync(o), u(p);
|
|
454
454
|
});
|
|
455
455
|
});
|
|
456
456
|
}
|
|
457
|
-
function
|
|
458
|
-
return new File([
|
|
457
|
+
function Se(e, t) {
|
|
458
|
+
return new File([A.readFileSync(e)], _(e));
|
|
459
459
|
}
|
|
460
|
-
class
|
|
460
|
+
class Wt {
|
|
461
461
|
constructor(t, r) {
|
|
462
462
|
this.args = t, this.siteUrl = r.siteUrl, this.cliOutput = r.cliOutput;
|
|
463
463
|
}
|
|
@@ -466,23 +466,23 @@ class Rt {
|
|
|
466
466
|
}
|
|
467
467
|
async bootWordPress(t, r) {
|
|
468
468
|
let n, i, o;
|
|
469
|
-
const a = new
|
|
469
|
+
const a = new Ke();
|
|
470
470
|
if (this.args.wordpressInstallMode === "download-and-install") {
|
|
471
|
-
let
|
|
472
|
-
a.addEventListener("progress", (
|
|
473
|
-
if (
|
|
471
|
+
let p = !1;
|
|
472
|
+
a.addEventListener("progress", (C) => {
|
|
473
|
+
if (p)
|
|
474
474
|
return;
|
|
475
|
-
const { loaded: E, total:
|
|
476
|
-
Math.min(100, 100 * E /
|
|
475
|
+
const { loaded: E, total: f } = C.detail, $ = Math.floor(
|
|
476
|
+
Math.min(100, 100 * E / f)
|
|
477
477
|
);
|
|
478
|
-
|
|
478
|
+
p = $ === 100, this.cliOutput.updateProgress(
|
|
479
479
|
"Downloading WordPress",
|
|
480
480
|
$
|
|
481
481
|
);
|
|
482
|
-
}), n = await
|
|
482
|
+
}), n = await tt(this.args.wp), o = d.join(
|
|
483
483
|
G,
|
|
484
484
|
`prebuilt-wp-content-for-wp-${n.version}.zip`
|
|
485
|
-
), i =
|
|
485
|
+
), i = m.existsSync(o) ? Se(o) : await Rt(
|
|
486
486
|
n.releaseUrl,
|
|
487
487
|
`${n.version}.zip`,
|
|
488
488
|
a
|
|
@@ -495,8 +495,8 @@ class Rt {
|
|
|
495
495
|
h.debug("Skipping SQLite integration plugin setup..."), l = void 0;
|
|
496
496
|
else {
|
|
497
497
|
this.cliOutput.updateProgress("Preparing SQLite database");
|
|
498
|
-
const
|
|
499
|
-
l = await
|
|
498
|
+
const p = this.args.php || T, E = Q(p) ? "v3.0.0-rc.3-php52" : "trunk";
|
|
499
|
+
l = await Dt(E);
|
|
500
500
|
}
|
|
501
501
|
this.cliOutput.updateProgress("Booting WordPress");
|
|
502
502
|
const u = await ne(
|
|
@@ -510,14 +510,14 @@ class Rt {
|
|
|
510
510
|
wordpressInstallMode: this.args.wordpressInstallMode || "download-and-install",
|
|
511
511
|
wordPressZip: i && await i.arrayBuffer(),
|
|
512
512
|
sqliteIntegrationPluginZip: await l?.arrayBuffer(),
|
|
513
|
-
constants:
|
|
513
|
+
constants: J(this.args)
|
|
514
514
|
},
|
|
515
515
|
r
|
|
516
|
-
), o && !this.args["mount-before-install"] && !
|
|
516
|
+
), o && !this.args["mount-before-install"] && !m.existsSync(o) && (this.cliOutput.updateProgress("Caching WordPress for next boot"), m.writeFileSync(
|
|
517
517
|
o,
|
|
518
518
|
// Comlink proxy is not assignable to UniversalPHP but
|
|
519
519
|
// proxies all method calls transparently at runtime.
|
|
520
|
-
await
|
|
520
|
+
await Fe(
|
|
521
521
|
t,
|
|
522
522
|
"/wordpress"
|
|
523
523
|
)
|
|
@@ -528,7 +528,7 @@ class Rt {
|
|
|
528
528
|
fileLockManagerPort: r,
|
|
529
529
|
nativeInternalDirPath: n
|
|
530
530
|
}) {
|
|
531
|
-
const i =
|
|
531
|
+
const i = he(
|
|
532
532
|
t.phpPort
|
|
533
533
|
);
|
|
534
534
|
await i.isConnected();
|
|
@@ -543,13 +543,13 @@ class Rt {
|
|
|
543
543
|
processId: t.processId,
|
|
544
544
|
followSymlinks: this.args.followSymlinks === !0,
|
|
545
545
|
trace: this.args.experimentalTrace === !0,
|
|
546
|
-
extensions:
|
|
546
|
+
extensions: ve(this.args),
|
|
547
547
|
nativeInternalDirPath: n,
|
|
548
548
|
pathAliases: this.args.pathAliases
|
|
549
549
|
}), await i.isReady(), i;
|
|
550
550
|
}
|
|
551
551
|
async compileInputBlueprint(t) {
|
|
552
|
-
const r = this.getEffectiveBlueprint(), n = new
|
|
552
|
+
const r = this.getEffectiveBlueprint(), n = new et();
|
|
553
553
|
let i = "", o = !1;
|
|
554
554
|
return n.addEventListener("progress", (a) => {
|
|
555
555
|
if (o)
|
|
@@ -557,14 +557,14 @@ class Rt {
|
|
|
557
557
|
o = a.detail.progress === 100;
|
|
558
558
|
const l = Math.floor(a.detail.progress);
|
|
559
559
|
i = a.detail.caption || i || "Running Blueprint", this.cliOutput.updateProgress(i.trim(), l);
|
|
560
|
-
}), await
|
|
560
|
+
}), await we(r, {
|
|
561
561
|
progress: n,
|
|
562
562
|
additionalSteps: t
|
|
563
563
|
});
|
|
564
564
|
}
|
|
565
565
|
getEffectiveBlueprint() {
|
|
566
566
|
const t = this.args.blueprint;
|
|
567
|
-
return
|
|
567
|
+
return Ne(t) ? t : {
|
|
568
568
|
login: this.args.login,
|
|
569
569
|
...t || {},
|
|
570
570
|
preferredVersions: {
|
|
@@ -575,8 +575,8 @@ class Rt {
|
|
|
575
575
|
};
|
|
576
576
|
}
|
|
577
577
|
}
|
|
578
|
-
async function
|
|
579
|
-
const n = `${d.basename(process.argv0)}${e}${process.pid}-`, i = await
|
|
578
|
+
async function Bt(e, t = !0) {
|
|
579
|
+
const n = `${d.basename(process.argv0)}${e}${process.pid}-`, i = await nt({
|
|
580
580
|
prefix: n,
|
|
581
581
|
/*
|
|
582
582
|
* Allow recursive cleanup on process exit.
|
|
@@ -588,16 +588,16 @@ async function Lt(e, t = !0) {
|
|
|
588
588
|
*/
|
|
589
589
|
unsafeCleanup: !0
|
|
590
590
|
});
|
|
591
|
-
return t &&
|
|
591
|
+
return t && it(), i;
|
|
592
592
|
}
|
|
593
|
-
async function
|
|
594
|
-
const i = (await
|
|
593
|
+
async function Ut(e, t, r) {
|
|
594
|
+
const i = (await _t(
|
|
595
595
|
e,
|
|
596
596
|
t,
|
|
597
597
|
r
|
|
598
598
|
)).map(
|
|
599
599
|
(o) => new Promise((a) => {
|
|
600
|
-
|
|
600
|
+
m.rm(o, { recursive: !0 }, (l) => {
|
|
601
601
|
l ? h.warn(
|
|
602
602
|
`Failed to delete stale Playground temp dir: ${o}`,
|
|
603
603
|
l
|
|
@@ -609,11 +609,11 @@ async function Wt(e, t, r) {
|
|
|
609
609
|
);
|
|
610
610
|
await Promise.all(i);
|
|
611
611
|
}
|
|
612
|
-
async function
|
|
612
|
+
async function _t(e, t, r) {
|
|
613
613
|
try {
|
|
614
|
-
const n =
|
|
614
|
+
const n = m.readdirSync(r).map((o) => d.join(r, o)), i = [];
|
|
615
615
|
for (const o of n)
|
|
616
|
-
await
|
|
616
|
+
await Ht(
|
|
617
617
|
e,
|
|
618
618
|
t,
|
|
619
619
|
o
|
|
@@ -623,8 +623,8 @@ async function Bt(e, t, r) {
|
|
|
623
623
|
return h.warn(`Failed to find stale Playground temp dirs: ${n}`), [];
|
|
624
624
|
}
|
|
625
625
|
}
|
|
626
|
-
async function
|
|
627
|
-
if (!
|
|
626
|
+
async function Ht(e, t, r) {
|
|
627
|
+
if (!m.lstatSync(r).isDirectory())
|
|
628
628
|
return !1;
|
|
629
629
|
const i = d.basename(r);
|
|
630
630
|
if (!i.includes(e))
|
|
@@ -638,12 +638,12 @@ async function Ut(e, t, r) {
|
|
|
638
638
|
executableName: o[1],
|
|
639
639
|
pid: o[2]
|
|
640
640
|
};
|
|
641
|
-
if (
|
|
641
|
+
if (Nt(a.pid))
|
|
642
642
|
return !1;
|
|
643
643
|
const l = Date.now() - t;
|
|
644
|
-
return
|
|
644
|
+
return m.statSync(r).mtime.getTime() < l;
|
|
645
645
|
}
|
|
646
|
-
function
|
|
646
|
+
function Nt(e, t) {
|
|
647
647
|
try {
|
|
648
648
|
return process.kill(Number(e), 0), !0;
|
|
649
649
|
} catch (r) {
|
|
@@ -657,10 +657,10 @@ function _t(e, t) {
|
|
|
657
657
|
), !0);
|
|
658
658
|
}
|
|
659
659
|
}
|
|
660
|
-
function
|
|
660
|
+
function Ft(e) {
|
|
661
661
|
return process.env.CI === "true" || process.env.CI === "1" || process.env.GITHUB_ACTIONS === "true" || process.env.GITHUB_ACTIONS === "1" || (process.env.TERM || "").toLowerCase() === "dumb" ? !1 : e ? !!e.isTTY : process.stdout.isTTY;
|
|
662
662
|
}
|
|
663
|
-
class
|
|
663
|
+
class Ot extends st {
|
|
664
664
|
constructor() {
|
|
665
665
|
super(...arguments), this.lastProgressLine = "", this.progressActive = !1;
|
|
666
666
|
}
|
|
@@ -671,7 +671,7 @@ class Ht extends nt {
|
|
|
671
671
|
* This prevents progress spam in logs - users only see the final outcome.
|
|
672
672
|
*/
|
|
673
673
|
get shouldRender() {
|
|
674
|
-
return
|
|
674
|
+
return Ft(this.writeStream);
|
|
675
675
|
}
|
|
676
676
|
printBanner() {
|
|
677
677
|
if (this.isQuiet) return;
|
|
@@ -788,12 +788,14 @@ ${this.green("Ready!")} WordPress is running on ${this.bold(t)} ${this.dim(`(${r
|
|
|
788
788
|
);
|
|
789
789
|
}
|
|
790
790
|
}
|
|
791
|
-
const
|
|
791
|
+
const K = {
|
|
792
792
|
Quiet: { name: "quiet", severity: O.Fatal },
|
|
793
793
|
Normal: { name: "normal", severity: O.Info },
|
|
794
794
|
Debug: { name: "debug", severity: O.Debug }
|
|
795
|
-
}
|
|
796
|
-
|
|
795
|
+
}, me = Ce.filter(
|
|
796
|
+
(e) => !Te(e)
|
|
797
|
+
);
|
|
798
|
+
async function jt(e) {
|
|
797
799
|
try {
|
|
798
800
|
const t = {
|
|
799
801
|
"site-url": {
|
|
@@ -804,7 +806,7 @@ async function Ft(e) {
|
|
|
804
806
|
describe: "PHP version to use.",
|
|
805
807
|
type: "string",
|
|
806
808
|
default: T,
|
|
807
|
-
choices:
|
|
809
|
+
choices: me
|
|
808
810
|
},
|
|
809
811
|
wp: {
|
|
810
812
|
describe: "WordPress version to use.",
|
|
@@ -816,21 +818,21 @@ async function Ft(e) {
|
|
|
816
818
|
type: "string",
|
|
817
819
|
nargs: 2,
|
|
818
820
|
array: !0,
|
|
819
|
-
coerce:
|
|
821
|
+
coerce: yt
|
|
820
822
|
},
|
|
821
823
|
"define-bool": {
|
|
822
824
|
describe: 'Define PHP boolean constants (can be used multiple times). Format: NAME value. Value must be "true", "false", "1", or "0". Examples: --define-bool WP_DEBUG true --define-bool MY_FEATURE false',
|
|
823
825
|
type: "string",
|
|
824
826
|
nargs: 2,
|
|
825
827
|
array: !0,
|
|
826
|
-
coerce:
|
|
828
|
+
coerce: gt
|
|
827
829
|
},
|
|
828
830
|
"define-number": {
|
|
829
831
|
describe: "Define PHP number constants (can be used multiple times). Format: NAME value. Examples: --define-number LIMIT 100 --define-number RATE 45.67",
|
|
830
832
|
type: "string",
|
|
831
833
|
nargs: 2,
|
|
832
834
|
array: !0,
|
|
833
|
-
coerce:
|
|
835
|
+
coerce: Pt
|
|
834
836
|
},
|
|
835
837
|
// @TODO: Support read-only mounts, e.g. via WORKERFS, a custom
|
|
836
838
|
// ReadOnlyNODEFS, or by copying the files into MEMFS
|
|
@@ -907,7 +909,7 @@ async function Ft(e) {
|
|
|
907
909
|
verbosity: {
|
|
908
910
|
describe: "Output logs and progress messages.",
|
|
909
911
|
type: "string",
|
|
910
|
-
choices: Object.values(
|
|
912
|
+
choices: Object.values(K).map(
|
|
911
913
|
(s) => s.name
|
|
912
914
|
),
|
|
913
915
|
default: "normal"
|
|
@@ -1035,7 +1037,7 @@ Warning: Following symlinks will expose files outside mounted directories to Pla
|
|
|
1035
1037
|
describe: "PHP version to use.",
|
|
1036
1038
|
type: "string",
|
|
1037
1039
|
default: T,
|
|
1038
|
-
choices:
|
|
1040
|
+
choices: me
|
|
1039
1041
|
},
|
|
1040
1042
|
wp: {
|
|
1041
1043
|
describe: "WordPress version to use.",
|
|
@@ -1105,7 +1107,7 @@ Warning: Following symlinks will expose files outside mounted directories to Pla
|
|
|
1105
1107
|
type: "string",
|
|
1106
1108
|
default: "wordpress.zip"
|
|
1107
1109
|
}
|
|
1108
|
-
}, o =
|
|
1110
|
+
}, o = Ye(e).usage("Usage: wp-playground <command> [options]").command(
|
|
1109
1111
|
"start",
|
|
1110
1112
|
"Start a local WordPress server with automatic project detection (recommended)",
|
|
1111
1113
|
(s) => s.usage(
|
|
@@ -1157,7 +1159,7 @@ Examples:
|
|
|
1157
1159
|
throw new Error(
|
|
1158
1160
|
"The --phpmyadmin option requires SQLite setup. Remove --skip-sqlite-setup to use phpMyAdmin."
|
|
1159
1161
|
);
|
|
1160
|
-
if (s.wp !== void 0 && typeof s.wp == "string" && !
|
|
1162
|
+
if (s.wp !== void 0 && typeof s.wp == "string" && !Ct(s.wp))
|
|
1161
1163
|
try {
|
|
1162
1164
|
new URL(s.wp);
|
|
1163
1165
|
} catch {
|
|
@@ -1178,7 +1180,7 @@ Examples:
|
|
|
1178
1180
|
if (s._[0] !== "start" && typeof y == "string" && y) {
|
|
1179
1181
|
let x = !1;
|
|
1180
1182
|
try {
|
|
1181
|
-
x =
|
|
1183
|
+
x = m.statSync(y).isDirectory();
|
|
1182
1184
|
} catch {
|
|
1183
1185
|
x = !1;
|
|
1184
1186
|
}
|
|
@@ -1206,11 +1208,13 @@ Examples:
|
|
|
1206
1208
|
"build-snapshot",
|
|
1207
1209
|
"php"
|
|
1208
1210
|
].includes(l) || (o.showHelp(), process.exit(1));
|
|
1209
|
-
const u = a.define || {},
|
|
1210
|
-
|
|
1211
|
+
const u = a.define || {}, p = a["define-bool"] || {}, C = a["define-number"] || {}, E = (s) => s in u || s in p || s in C, f = a.php || T;
|
|
1212
|
+
Q(f) || (E("WP_DEBUG") || (p.WP_DEBUG = !0), E("WP_DEBUG_LOG") || (p.WP_DEBUG_LOG = !0), E("WP_DEBUG_DISPLAY") || (p.WP_DEBUG_DISPLAY = !1));
|
|
1211
1213
|
const k = {
|
|
1212
1214
|
...a,
|
|
1213
1215
|
define: u,
|
|
1216
|
+
"define-bool": p,
|
|
1217
|
+
"define-number": C,
|
|
1214
1218
|
command: l,
|
|
1215
1219
|
mount: [
|
|
1216
1220
|
...a.mount || [],
|
|
@@ -1232,32 +1236,42 @@ Examples:
|
|
|
1232
1236
|
[Symbol.asyncDispose]: async () => {
|
|
1233
1237
|
process.off("SIGINT", D), process.off("SIGTERM", D), await M[Symbol.asyncDispose]();
|
|
1234
1238
|
},
|
|
1235
|
-
[
|
|
1239
|
+
[ee]: { cliServer: M }
|
|
1236
1240
|
};
|
|
1237
1241
|
} catch (t) {
|
|
1238
1242
|
console.error(t);
|
|
1239
1243
|
const r = process.argv.includes("--debug");
|
|
1240
1244
|
if (t instanceof Error)
|
|
1241
1245
|
if (r)
|
|
1242
|
-
|
|
1246
|
+
De(t);
|
|
1243
1247
|
else {
|
|
1244
|
-
const n = [];
|
|
1245
|
-
let
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1248
|
+
const n = [], i = /* @__PURE__ */ new Set();
|
|
1249
|
+
let o = t;
|
|
1250
|
+
for (let a = 0; o && a < 20; a++) {
|
|
1251
|
+
if (i.has(o)) {
|
|
1252
|
+
n.push("[Circular error cause]"), o = void 0;
|
|
1253
|
+
break;
|
|
1254
|
+
}
|
|
1255
|
+
i.add(o), n.push(Y(o)), o = o.cause instanceof Error ? o.cause : void 0;
|
|
1256
|
+
}
|
|
1257
|
+
o && n.push("[Error cause chain truncated]"), console.error(
|
|
1250
1258
|
"\x1B[1m" + n.join(" caused by: ") + "\x1B[0m"
|
|
1251
1259
|
);
|
|
1252
1260
|
}
|
|
1253
1261
|
else
|
|
1254
|
-
console.error("\x1B[1m" +
|
|
1262
|
+
console.error("\x1B[1m" + Y(t) + "\x1B[0m");
|
|
1255
1263
|
process.exit(1);
|
|
1256
1264
|
}
|
|
1257
1265
|
}
|
|
1258
|
-
function
|
|
1259
|
-
if (e instanceof Error)
|
|
1260
|
-
|
|
1266
|
+
function Y(e) {
|
|
1267
|
+
if (e instanceof Error) {
|
|
1268
|
+
if (e.message)
|
|
1269
|
+
return e.message;
|
|
1270
|
+
const t = [];
|
|
1271
|
+
e.name && e.name !== "Error" && t.push(e.name);
|
|
1272
|
+
const r = e;
|
|
1273
|
+
return r.errno !== void 0 && t.push(`errno: ${r.errno}`), r.code !== void 0 && t.push(`code: ${r.code}`), t.length > 0 ? t.join(" — ") : e.stack || String(e);
|
|
1274
|
+
}
|
|
1261
1275
|
if (e && typeof e == "object") {
|
|
1262
1276
|
const t = [], r = e;
|
|
1263
1277
|
if (r.name && t.push(String(r.name)), r.message && t.push(String(r.message)), r.errno !== void 0 && t.push(`errno: ${r.errno}`), t.length > 0)
|
|
@@ -1270,7 +1284,7 @@ function Se(e) {
|
|
|
1270
1284
|
}
|
|
1271
1285
|
return String(e);
|
|
1272
1286
|
}
|
|
1273
|
-
function
|
|
1287
|
+
function fe(e, t) {
|
|
1274
1288
|
return e.find(
|
|
1275
1289
|
(r) => r.vfsPath.replace(/\/$/, "") === t.replace(/\/$/, "")
|
|
1276
1290
|
);
|
|
@@ -1279,19 +1293,19 @@ function xe(e) {
|
|
|
1279
1293
|
const t = Math.max(1, B.cpus().length - 1);
|
|
1280
1294
|
return e === void 0 ? Math.min(6, t) : e === "auto" ? t : e;
|
|
1281
1295
|
}
|
|
1282
|
-
const
|
|
1296
|
+
const ee = Symbol("playground-cli-testing");
|
|
1283
1297
|
async function Ee(e) {
|
|
1284
1298
|
let t;
|
|
1285
|
-
const r = e.internalCookieStore ? new
|
|
1299
|
+
const r = e.internalCookieStore ? new Re() : void 0, n = [], i = /* @__PURE__ */ new Map(), o = new Ot({
|
|
1286
1300
|
verbosity: e.verbosity || "normal"
|
|
1287
1301
|
});
|
|
1288
|
-
if (e.command === "start" && (e =
|
|
1289
|
-
const
|
|
1302
|
+
if (e.command === "start" && (e = Vt(e, o)), 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) {
|
|
1303
|
+
const f = Object.values(K).find(
|
|
1290
1304
|
($) => $.name === e.verbosity
|
|
1291
1305
|
).severity;
|
|
1292
|
-
h.setSeverityFilterLevel(
|
|
1306
|
+
h.setSeverityFilterLevel(f);
|
|
1293
1307
|
}
|
|
1294
|
-
e.intl || (e.intl = !0), e.redis === void 0 && (e.redis = await de()), e.memcached === void 0 && (e.memcached = await de()),
|
|
1308
|
+
e.intl || (e.intl = !0), e.redis === void 0 && (e.redis = await de()), e.memcached === void 0 && (e.memcached = await de()), Q(e.php || T) && (e.intl = !1, e.redis = !1, e.memcached = !1, e.xdebug = !1), e.phpmyadmin && (e.phpmyadmin === !0 && (e.phpmyadmin = "/phpmyadmin"), e.pathAliases = [
|
|
1295
1309
|
{
|
|
1296
1310
|
urlPrefix: e.phpmyadmin,
|
|
1297
1311
|
fsPath: ue
|
|
@@ -1310,41 +1324,41 @@ async function Ee(e) {
|
|
|
1310
1324
|
],
|
|
1311
1325
|
blueprint: typeof e.blueprint == "string" ? e.blueprint : void 0
|
|
1312
1326
|
}));
|
|
1313
|
-
const l = e.command === "server" ? e.port ?? 9400 : 0, u = new
|
|
1314
|
-
let
|
|
1315
|
-
const E = await
|
|
1316
|
-
port: e.port ? e.port : await
|
|
1317
|
-
onBind: async (
|
|
1327
|
+
const l = e.command === "server" ? e.port ?? 9400 : 0, u = new Le();
|
|
1328
|
+
let p = !1, C = !0;
|
|
1329
|
+
const E = await Et({
|
|
1330
|
+
port: e.port ? e.port : await xt(l) ? 0 : l,
|
|
1331
|
+
onBind: async (f, $) => {
|
|
1318
1332
|
const k = "127.0.0.1", M = `http://${k}:${$}`, D = e["site-url"] || M;
|
|
1319
1333
|
e["experimental-multi-worker"] !== void 0 && h.warn(
|
|
1320
1334
|
"--experimental-multi-worker is deprecated and its value is ignored. Use --workers=<n|auto> instead."
|
|
1321
1335
|
);
|
|
1322
1336
|
const s = xe(e.workers);
|
|
1323
1337
|
if (s < 6) {
|
|
1324
|
-
const
|
|
1338
|
+
const c = "Running fewer than 6 workers may increase the likelihood of deadlock due to workers blocking on file locks.";
|
|
1325
1339
|
e.workers === void 0 ? h.warn(
|
|
1326
|
-
`The default worker count has been reduced to ${s} because this machine has only ${B.cpus().length} CPU(s). ` +
|
|
1340
|
+
`The default worker count has been reduced to ${s} because this machine has only ${B.cpus().length} CPU(s). ` + c
|
|
1327
1341
|
) : h.warn(
|
|
1328
|
-
`Worker count (${s}) is below the recommended threshold (6). ` +
|
|
1342
|
+
`Worker count (${s}) is below the recommended threshold (6). ` + c
|
|
1329
1343
|
);
|
|
1330
1344
|
}
|
|
1331
|
-
const b = "-playground-cli-site-", y = await
|
|
1345
|
+
const b = "-playground-cli-site-", y = await Bt(b);
|
|
1332
1346
|
h.debug(`Native temp dir for VFS root: ${y.path}`);
|
|
1333
|
-
const x = "WP Playground CLI - Listen for Xdebug",
|
|
1334
|
-
if (await
|
|
1335
|
-
const
|
|
1336
|
-
hostPath: d.join(".", d.sep,
|
|
1347
|
+
const x = "WP Playground CLI - Listen for Xdebug", H = ".playground-xdebug-root", N = d.join(process.cwd(), H);
|
|
1348
|
+
if (await at(N), e.xdebug) {
|
|
1349
|
+
const c = {
|
|
1350
|
+
hostPath: d.join(".", d.sep, H),
|
|
1337
1351
|
vfsPath: "/"
|
|
1338
1352
|
}, w = e.php || T;
|
|
1339
1353
|
if (j.includes(w) && j.indexOf(w) <= j.indexOf("8.5"))
|
|
1340
1354
|
await ae(
|
|
1341
1355
|
y.path,
|
|
1342
|
-
|
|
1356
|
+
N,
|
|
1343
1357
|
process.platform
|
|
1344
|
-
), e.xdebug =
|
|
1358
|
+
), e.xdebug = lt({
|
|
1345
1359
|
cwd: process.cwd(),
|
|
1346
1360
|
mounts: [
|
|
1347
|
-
|
|
1361
|
+
c,
|
|
1348
1362
|
...e["mount-before-install"] || [],
|
|
1349
1363
|
...e.mount || []
|
|
1350
1364
|
],
|
|
@@ -1361,22 +1375,22 @@ async function Ee(e) {
|
|
|
1361
1375
|
else if (e.experimentalUnsafeIdeIntegration) {
|
|
1362
1376
|
await ae(
|
|
1363
1377
|
y.path,
|
|
1364
|
-
|
|
1378
|
+
N,
|
|
1365
1379
|
process.platform
|
|
1366
1380
|
);
|
|
1367
1381
|
try {
|
|
1368
|
-
await
|
|
1382
|
+
await ut(
|
|
1369
1383
|
x,
|
|
1370
1384
|
process.cwd()
|
|
1371
1385
|
);
|
|
1372
|
-
const P = typeof e.xdebug == "object" ? e.xdebug : {}, v = await
|
|
1386
|
+
const P = typeof e.xdebug == "object" ? e.xdebug : {}, v = await dt({
|
|
1373
1387
|
name: x,
|
|
1374
1388
|
host: k,
|
|
1375
1389
|
port: $,
|
|
1376
1390
|
ides: e.experimentalUnsafeIdeIntegration,
|
|
1377
1391
|
cwd: process.cwd(),
|
|
1378
1392
|
mounts: [
|
|
1379
|
-
|
|
1393
|
+
c,
|
|
1380
1394
|
...e["mount-before-install"] || [],
|
|
1381
1395
|
...e.mount || []
|
|
1382
1396
|
],
|
|
@@ -1446,13 +1460,13 @@ async function Ee(e) {
|
|
|
1446
1460
|
}
|
|
1447
1461
|
}
|
|
1448
1462
|
const ke = d.dirname(y.path), Ie = 2 * 24 * 60 * 60 * 1e3;
|
|
1449
|
-
|
|
1463
|
+
Ut(
|
|
1450
1464
|
b,
|
|
1451
1465
|
Ie,
|
|
1452
1466
|
ke
|
|
1453
1467
|
);
|
|
1454
|
-
const
|
|
1455
|
-
z(
|
|
1468
|
+
const te = d.join(y.path, "internal");
|
|
1469
|
+
z(te);
|
|
1456
1470
|
const Me = [
|
|
1457
1471
|
"wordpress",
|
|
1458
1472
|
"tools",
|
|
@@ -1465,37 +1479,37 @@ async function Ee(e) {
|
|
|
1465
1479
|
"tmp",
|
|
1466
1480
|
"home"
|
|
1467
1481
|
];
|
|
1468
|
-
for (const
|
|
1469
|
-
const w = (P) => P.vfsPath === `/${
|
|
1482
|
+
for (const c of Me) {
|
|
1483
|
+
const w = (P) => P.vfsPath === `/${c}`;
|
|
1470
1484
|
if (!(e["mount-before-install"]?.some(w) || e.mount?.some(w))) {
|
|
1471
1485
|
const P = d.join(
|
|
1472
1486
|
y.path,
|
|
1473
|
-
|
|
1487
|
+
c
|
|
1474
1488
|
);
|
|
1475
1489
|
z(P), e["mount-before-install"] === void 0 && (e["mount-before-install"] = []), e["mount-before-install"].unshift({
|
|
1476
|
-
vfsPath: `/${
|
|
1490
|
+
vfsPath: `/${c}`,
|
|
1477
1491
|
hostPath: P
|
|
1478
1492
|
});
|
|
1479
1493
|
}
|
|
1480
1494
|
}
|
|
1481
1495
|
if (e["mount-before-install"])
|
|
1482
|
-
for (const
|
|
1496
|
+
for (const c of e["mount-before-install"])
|
|
1483
1497
|
h.debug(
|
|
1484
|
-
`Mount before WP install: ${
|
|
1498
|
+
`Mount before WP install: ${c.vfsPath} -> ${c.hostPath}`
|
|
1485
1499
|
);
|
|
1486
1500
|
if (e.mount)
|
|
1487
|
-
for (const
|
|
1501
|
+
for (const c of e.mount)
|
|
1488
1502
|
h.debug(
|
|
1489
|
-
`Mount after WP install: ${
|
|
1503
|
+
`Mount after WP install: ${c.vfsPath} -> ${c.hostPath}`
|
|
1490
1504
|
);
|
|
1491
1505
|
let R;
|
|
1492
|
-
e["experimental-blueprints-v2-runner"] ? R = new
|
|
1506
|
+
e["experimental-blueprints-v2-runner"] ? R = new At(e, {
|
|
1493
1507
|
siteUrl: D,
|
|
1494
1508
|
cliOutput: o
|
|
1495
|
-
}) : (R = new
|
|
1509
|
+
}) : (R = new Wt(e, {
|
|
1496
1510
|
siteUrl: D,
|
|
1497
1511
|
cliOutput: o
|
|
1498
|
-
}), typeof e.blueprint == "string" && (e.blueprint = await
|
|
1512
|
+
}), typeof e.blueprint == "string" && (e.blueprint = await Tt({
|
|
1499
1513
|
sourceString: e.blueprint,
|
|
1500
1514
|
blueprintMayReadAdjacentFiles: e["blueprint-may-read-adjacent-files"] === !0
|
|
1501
1515
|
})));
|
|
@@ -1505,12 +1519,12 @@ async function Ee(e) {
|
|
|
1505
1519
|
n.map(async (w) => {
|
|
1506
1520
|
await i.get(w)?.dispose(), await w.worker.terminate();
|
|
1507
1521
|
})
|
|
1508
|
-
),
|
|
1509
|
-
|
|
1522
|
+
), f && await new Promise((w) => {
|
|
1523
|
+
f.close(w), f.closeAllConnections();
|
|
1510
1524
|
}), await y.cleanup());
|
|
1511
1525
|
};
|
|
1512
1526
|
try {
|
|
1513
|
-
const
|
|
1527
|
+
const c = [], w = R.getWorkerType();
|
|
1514
1528
|
for (let g = 0; g < s; g++) {
|
|
1515
1529
|
const P = $e(w, {
|
|
1516
1530
|
onExit: (v) => {
|
|
@@ -1522,10 +1536,10 @@ async function Ee(e) {
|
|
|
1522
1536
|
}).then(
|
|
1523
1537
|
async (v) => {
|
|
1524
1538
|
n.push(v);
|
|
1525
|
-
const S = await
|
|
1539
|
+
const S = await qt(u), I = await R.bootRequestHandler({
|
|
1526
1540
|
worker: v,
|
|
1527
1541
|
fileLockManagerPort: S,
|
|
1528
|
-
nativeInternalDirPath:
|
|
1542
|
+
nativeInternalDirPath: te
|
|
1529
1543
|
});
|
|
1530
1544
|
return i.set(
|
|
1531
1545
|
v,
|
|
@@ -1533,16 +1547,16 @@ async function Ee(e) {
|
|
|
1533
1547
|
), [v, I];
|
|
1534
1548
|
}
|
|
1535
1549
|
);
|
|
1536
|
-
|
|
1550
|
+
c.push(P), g === 0 && await P;
|
|
1537
1551
|
}
|
|
1538
|
-
await Promise.all(
|
|
1552
|
+
await Promise.all(c), t = We(
|
|
1539
1553
|
n.map(
|
|
1540
1554
|
(g) => i.get(g)
|
|
1541
1555
|
)
|
|
1542
1556
|
);
|
|
1543
1557
|
{
|
|
1544
|
-
const g = new
|
|
1545
|
-
if (await
|
|
1558
|
+
const g = new be(), P = g.port1, v = g.port2;
|
|
1559
|
+
if (await Be(
|
|
1546
1560
|
{
|
|
1547
1561
|
applyPostInstallMountsToAllWorkers: async () => {
|
|
1548
1562
|
for (const S of i.values())
|
|
@@ -1556,7 +1570,7 @@ async function Ee(e) {
|
|
|
1556
1570
|
), await R.bootWordPress(
|
|
1557
1571
|
t,
|
|
1558
1572
|
v
|
|
1559
|
-
), P.close(),
|
|
1573
|
+
), P.close(), p = !0, !e["experimental-blueprints-v2-runner"]) {
|
|
1560
1574
|
const S = await R.compileInputBlueprint(
|
|
1561
1575
|
e["additional-blueprint-steps"] || []
|
|
1562
1576
|
);
|
|
@@ -1568,11 +1582,11 @@ async function Ee(e) {
|
|
|
1568
1582
|
if (e.phpmyadmin && !await t.fileExists(
|
|
1569
1583
|
`${ue}/index.php`
|
|
1570
1584
|
)) {
|
|
1571
|
-
const S = await
|
|
1585
|
+
const S = await ct(), I = await we({ steps: S });
|
|
1572
1586
|
await ie(I, t);
|
|
1573
1587
|
}
|
|
1574
1588
|
if (e.command === "build-snapshot") {
|
|
1575
|
-
await
|
|
1589
|
+
await Gt(t, e.outfile), o.printStatus(`Exported to ${e.outfile}`), await W();
|
|
1576
1590
|
return;
|
|
1577
1591
|
} else if (e.command === "run-blueprint") {
|
|
1578
1592
|
o.finishProgress("Done"), await W();
|
|
@@ -1606,56 +1620,57 @@ async function Ee(e) {
|
|
|
1606
1620
|
if (o.finishProgress(), o.printReady(M, s), e.phpmyadmin) {
|
|
1607
1621
|
const g = d.join(
|
|
1608
1622
|
e.phpmyadmin,
|
|
1609
|
-
|
|
1623
|
+
mt
|
|
1610
1624
|
);
|
|
1611
1625
|
o.printPhpMyAdminUrl(
|
|
1612
1626
|
new URL(g, M).toString()
|
|
1613
1627
|
);
|
|
1614
1628
|
}
|
|
1615
|
-
return e.xdebug && e.experimentalDevtools && (await
|
|
1629
|
+
return e.xdebug && e.experimentalDevtools && (await ot({
|
|
1616
1630
|
phpInstance: t,
|
|
1617
|
-
phpRoot: "/wordpress"
|
|
1631
|
+
phpRoot: "/wordpress",
|
|
1632
|
+
excludedPaths: ["/internal"]
|
|
1618
1633
|
})).start(), {
|
|
1619
1634
|
playground: t,
|
|
1620
|
-
server:
|
|
1635
|
+
server: f,
|
|
1621
1636
|
serverUrl: M,
|
|
1622
1637
|
[Symbol.asyncDispose]: W,
|
|
1623
|
-
[
|
|
1638
|
+
[ee]: {
|
|
1624
1639
|
workerThreadCount: s
|
|
1625
1640
|
}
|
|
1626
1641
|
};
|
|
1627
|
-
} catch (
|
|
1642
|
+
} catch (c) {
|
|
1628
1643
|
if (e.verbosity !== "debug")
|
|
1629
|
-
throw
|
|
1644
|
+
throw c;
|
|
1630
1645
|
let w = "";
|
|
1631
|
-
throw await t?.fileExists(
|
|
1646
|
+
throw await t?.fileExists(re) && (w = await t.readFileAsText(re)), await W(), new Error(w, { cause: c });
|
|
1632
1647
|
}
|
|
1633
1648
|
},
|
|
1634
|
-
async handleRequest(
|
|
1635
|
-
if (!
|
|
1649
|
+
async handleRequest(f) {
|
|
1650
|
+
if (!p)
|
|
1636
1651
|
return oe.forHttpCode(
|
|
1637
1652
|
502,
|
|
1638
1653
|
"WordPress is not ready yet"
|
|
1639
1654
|
);
|
|
1640
|
-
if (
|
|
1641
|
-
|
|
1655
|
+
if (C) {
|
|
1656
|
+
C = !1;
|
|
1642
1657
|
const k = {
|
|
1643
1658
|
"Content-Type": ["text/plain"],
|
|
1644
1659
|
"Content-Length": ["0"],
|
|
1645
|
-
Location: [
|
|
1660
|
+
Location: [f.url]
|
|
1646
1661
|
};
|
|
1647
|
-
return
|
|
1662
|
+
return f.headers?.cookie?.includes(
|
|
1648
1663
|
"playground_auto_login_already_happened"
|
|
1649
1664
|
) && (k["Set-Cookie"] = [
|
|
1650
1665
|
"playground_auto_login_already_happened=1; Max-Age=0; Expires=Thu, 01 Jan 1970 00:00:00 GMT; Path=/"
|
|
1651
1666
|
]), oe.fromPHPResponse(
|
|
1652
|
-
new
|
|
1667
|
+
new Ue(302, k, new Uint8Array())
|
|
1653
1668
|
);
|
|
1654
1669
|
}
|
|
1655
|
-
r && (
|
|
1656
|
-
...
|
|
1670
|
+
r && (f = {
|
|
1671
|
+
...f,
|
|
1657
1672
|
headers: {
|
|
1658
|
-
...
|
|
1673
|
+
...f.headers,
|
|
1659
1674
|
// While we have an internal cookie store, we
|
|
1660
1675
|
// completely replace the incoming request's Cookie
|
|
1661
1676
|
// header with the cookies from our store. This avoids
|
|
@@ -1664,26 +1679,26 @@ async function Ee(e) {
|
|
|
1664
1679
|
cookie: r.getCookieRequestHeader()
|
|
1665
1680
|
}
|
|
1666
1681
|
});
|
|
1667
|
-
const $ = await t.requestStreamed(
|
|
1682
|
+
const $ = await t.requestStreamed(f);
|
|
1668
1683
|
if (r) {
|
|
1669
1684
|
const k = await $.headers;
|
|
1670
1685
|
r.rememberCookiesFromResponseHeaders(k), delete k["set-cookie"];
|
|
1671
1686
|
}
|
|
1672
1687
|
return $;
|
|
1673
1688
|
}
|
|
1674
|
-
}).catch((
|
|
1675
|
-
o.printError(
|
|
1689
|
+
}).catch((f) => {
|
|
1690
|
+
o.printError(Y(f)), process.exit(1);
|
|
1676
1691
|
});
|
|
1677
|
-
return E && e.command === "start" && !e.skipBrowser &&
|
|
1692
|
+
return E && e.command === "start" && !e.skipBrowser && zt(E.serverUrl), E;
|
|
1678
1693
|
}
|
|
1679
|
-
function
|
|
1694
|
+
function Vt(e, t) {
|
|
1680
1695
|
let r = { ...e, command: "server" };
|
|
1681
1696
|
const n = e.autoMount !== !1;
|
|
1682
|
-
delete r.autoMount, delete r["auto-mount"], n && (r.autoMount = d.resolve(process.cwd(), r.path ?? ""), r =
|
|
1683
|
-
const i =
|
|
1697
|
+
delete r.autoMount, delete r["auto-mount"], n && (r.autoMount = d.resolve(process.cwd(), r.path ?? ""), r = Pe(r), delete r.autoMount);
|
|
1698
|
+
const i = fe(
|
|
1684
1699
|
r["mount-before-install"] || [],
|
|
1685
1700
|
"/wordpress"
|
|
1686
|
-
) ||
|
|
1701
|
+
) || fe(r.mount || [], "/wordpress");
|
|
1687
1702
|
if (i)
|
|
1688
1703
|
t.print(
|
|
1689
1704
|
`Site files stored at: ${i?.hostPath}`
|
|
@@ -1697,15 +1712,15 @@ function Ot(e, t) {
|
|
|
1697
1712
|
"You may still remove the site's directory manually if you wish."
|
|
1698
1713
|
), process.exit(1));
|
|
1699
1714
|
else {
|
|
1700
|
-
const o = r.autoMount || process.cwd(), a =
|
|
1715
|
+
const o = r.autoMount || process.cwd(), a = pt("sha256").update(o).digest("hex"), l = B.homedir(), u = d.join(
|
|
1701
1716
|
l,
|
|
1702
1717
|
".wordpress-playground/sites",
|
|
1703
1718
|
a
|
|
1704
1719
|
);
|
|
1705
|
-
t.print(`Site files stored at: ${u}`),
|
|
1720
|
+
t.print(`Site files stored at: ${u}`), X(u) && e.reset && (t.print("Resetting site..."), Oe(u, { recursive: !0, force: !0 })), z(u, { recursive: !0 }), r["mount-before-install"] = [
|
|
1706
1721
|
...r["mount-before-install"] || [],
|
|
1707
1722
|
{ vfsPath: "/wordpress", hostPath: u }
|
|
1708
|
-
], r.wordpressInstallMode =
|
|
1723
|
+
], r.wordpressInstallMode = je(u).length === 0 ? (
|
|
1709
1724
|
// Only download WordPress on the first run when the site directory is still
|
|
1710
1725
|
// empty.
|
|
1711
1726
|
"download-and-install"
|
|
@@ -1716,7 +1731,7 @@ function Ot(e, t) {
|
|
|
1716
1731
|
}
|
|
1717
1732
|
return r;
|
|
1718
1733
|
}
|
|
1719
|
-
const q = new
|
|
1734
|
+
const q = new Ae();
|
|
1720
1735
|
function $e(e, { onExit: t } = {}) {
|
|
1721
1736
|
let r;
|
|
1722
1737
|
return e === "v1" ? r = new se(new URL("./worker-thread-v1.js", import.meta.url)) : r = new se(new URL("./worker-thread-v2.js", import.meta.url)), new Promise((n, i) => {
|
|
@@ -1729,11 +1744,11 @@ function $e(e, { onExit: t } = {}) {
|
|
|
1729
1744
|
});
|
|
1730
1745
|
}), r.once("error", function(l) {
|
|
1731
1746
|
q.release(o), console.error(l);
|
|
1732
|
-
const u = l?.message || (l ? String(l) : "unknown error"),
|
|
1747
|
+
const u = l?.message || (l ? String(l) : "unknown error"), p = new Error(
|
|
1733
1748
|
`Worker failed to load. Original error: ${u}`,
|
|
1734
1749
|
{ cause: l }
|
|
1735
1750
|
);
|
|
1736
|
-
i(
|
|
1751
|
+
i(p);
|
|
1737
1752
|
});
|
|
1738
1753
|
let a = !1;
|
|
1739
1754
|
r.once("spawn", () => {
|
|
@@ -1743,11 +1758,11 @@ function $e(e, { onExit: t } = {}) {
|
|
|
1743
1758
|
});
|
|
1744
1759
|
});
|
|
1745
1760
|
}
|
|
1746
|
-
async function
|
|
1747
|
-
const { port1: t, port2: r } = new
|
|
1748
|
-
return await
|
|
1761
|
+
async function qt(e) {
|
|
1762
|
+
const { port1: t, port2: r } = new be();
|
|
1763
|
+
return await _e(e, t), r;
|
|
1749
1764
|
}
|
|
1750
|
-
function
|
|
1765
|
+
function zt(e) {
|
|
1751
1766
|
const t = B.platform();
|
|
1752
1767
|
let r;
|
|
1753
1768
|
switch (t) {
|
|
@@ -1761,11 +1776,11 @@ function Vt(e) {
|
|
|
1761
1776
|
r = `xdg-open "${e}"`;
|
|
1762
1777
|
break;
|
|
1763
1778
|
}
|
|
1764
|
-
|
|
1779
|
+
ye(r, (n) => {
|
|
1765
1780
|
n && h.debug(`Could not open browser: ${n.message}`);
|
|
1766
1781
|
});
|
|
1767
1782
|
}
|
|
1768
|
-
async function
|
|
1783
|
+
async function Gt(e, t) {
|
|
1769
1784
|
await e.run({
|
|
1770
1785
|
code: `<?php
|
|
1771
1786
|
$zip = new ZipArchive();
|
|
@@ -1787,28 +1802,28 @@ async function qt(e, t) {
|
|
|
1787
1802
|
`
|
|
1788
1803
|
});
|
|
1789
1804
|
const r = await e.readFileAsBuffer("/tmp/build.zip");
|
|
1790
|
-
|
|
1805
|
+
m.writeFileSync(t, r);
|
|
1791
1806
|
}
|
|
1792
|
-
const
|
|
1807
|
+
const Sr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1793
1808
|
__proto__: null,
|
|
1794
|
-
LogVerbosity:
|
|
1795
|
-
internalsKeyForTesting:
|
|
1796
|
-
mergeDefinedConstants:
|
|
1797
|
-
parseOptionsAndRunCLI:
|
|
1809
|
+
LogVerbosity: K,
|
|
1810
|
+
internalsKeyForTesting: ee,
|
|
1811
|
+
mergeDefinedConstants: J,
|
|
1812
|
+
parseOptionsAndRunCLI: jt,
|
|
1798
1813
|
resolveWorkerCount: xe,
|
|
1799
1814
|
runCLI: Ee,
|
|
1800
1815
|
spawnWorkerThread: $e
|
|
1801
1816
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1802
1817
|
export {
|
|
1803
|
-
|
|
1818
|
+
K as L,
|
|
1804
1819
|
Ee as a,
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1820
|
+
vr as b,
|
|
1821
|
+
Ft as c,
|
|
1822
|
+
Sr as d,
|
|
1823
|
+
ee as i,
|
|
1824
|
+
J as m,
|
|
1825
|
+
jt as p,
|
|
1811
1826
|
xe as r,
|
|
1812
1827
|
$e as s
|
|
1813
1828
|
};
|
|
1814
|
-
//# sourceMappingURL=run-cli-
|
|
1829
|
+
//# sourceMappingURL=run-cli-B6snvP5v.js.map
|