@wp-playground/cli 3.1.0 → 3.1.2

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.
@@ -1,30 +1,32 @@
1
- import { logger as g, LogSeverity as L, errorLogPath as Q } from "@php-wasm/logger";
2
- import { PHPResponse as H, consumeAPI as ne, SupportedPHPVersions as X, printDebugDetails as be, HttpCookieStore as ge, FileLockManagerInMemory as Pe, createObjectPoolProxy as ve, exposeAPI as xe, exposeSyncAPI as Se } from "@php-wasm/universal";
3
- import { resolveRemoteBlueprint as Ie, resolveRuntimeConfiguration as Z, compileBlueprintV1 as ae, isBlueprintBundle as $e, runBlueprintV1Steps as J } from "@wp-playground/blueprints";
4
- import { zipDirectory as Te, RecommendedPHPVersion as D } from "@wp-playground/common";
5
- import c, { existsSync as j, rmdirSync as Ee, mkdirSync as N, readdirSync as ke } from "fs";
1
+ import { logger as g, LogSeverity as L, errorLogPath as G } from "@php-wasm/logger";
2
+ import { consumeAPI as ne, SupportedPHPVersions as Q, printDebugDetails as be, HttpCookieStore as ge, FileLockManagerInMemory as Pe, StreamedPHPResponse as X, createObjectPoolProxy as ve, exposeAPI as Se, PHPResponse as xe, exposeSyncAPI as Ie } from "@php-wasm/universal";
3
+ import { resolveRemoteBlueprint as $e, resolveRuntimeConfiguration as Z, compileBlueprintV1 as ae, isBlueprintBundle as Te, runBlueprintV1Steps as J } from "@wp-playground/blueprints";
4
+ import { zipDirectory as Ee, RecommendedPHPVersion as C } from "@wp-playground/common";
5
+ import c, { existsSync as O, rmdirSync as ke, mkdirSync as _, readdirSync as Me } from "fs";
6
6
  import { MessageChannel as le, Worker as K } from "worker_threads";
7
- import { createNodeFsMountHandler as Me } from "@php-wasm/node";
8
- import u, { basename as C, join as de } from "path";
9
- import Be from "express";
10
- import V, { cpus as Ae } from "os";
11
- import Ce from "yargs";
12
- import { NodeJsFilesystem as De, OverlayFilesystem as Re, InMemoryFilesystem as We, ZipFilesystem as Le } from "@wp-playground/storage";
13
- import { EmscriptenDownloadMonitor as Ue, ProgressTracker as Fe } from "@php-wasm/progress";
14
- import { resolveWordPressRelease as _e } from "@wp-playground/wordpress";
7
+ import { createNodeFsMountHandler as Be } from "@php-wasm/node";
8
+ import u, { basename as A, join as de } from "path";
9
+ import Ae from "express";
10
+ import { Readable as Ce } from "stream";
11
+ import { pipeline as De } from "stream/promises";
12
+ import j, { cpus as Re } from "os";
13
+ import We from "yargs";
14
+ import { NodeJsFilesystem as Le, OverlayFilesystem as Ue, InMemoryFilesystem as Fe, ZipFilesystem as He } from "@wp-playground/storage";
15
+ import { EmscriptenDownloadMonitor as _e, ProgressTracker as Ne } from "@php-wasm/progress";
16
+ import { resolveWordPressRelease as Oe } from "@wp-playground/wordpress";
15
17
  import I from "fs-extra";
16
- import { createRequire as He } from "module";
17
- import { startBridge as Ne } from "@php-wasm/xdebug-bridge";
18
- import { exec as Oe } from "child_process";
19
- import { dir as je, setGracefulCleanup as Ve } from "tmp-promise";
20
- import Ye from "ps-man";
21
- import { removeTempDirSymlink as qe, createTempDirSymlink as ze, clearXdebugIDEConfig as Ge, addXdebugIDEConfig as Qe } from "@php-wasm/cli-util";
22
- import { createHash as Xe } from "crypto";
23
- import { PHPMYADMIN_INSTALL_PATH as ee, getPhpMyAdminInstallSteps as Ze, PHPMYADMIN_ENTRY_PATH as Je } from "@wp-playground/tools";
18
+ import { createRequire as je } from "module";
19
+ import { startBridge as Ve } from "@php-wasm/xdebug-bridge";
20
+ import { exec as Ye } from "child_process";
21
+ import { dir as qe, setGracefulCleanup as ze } from "tmp-promise";
22
+ import Ge from "ps-man";
23
+ import { removeTempDirSymlink as Qe, createTempDirSymlink as Xe, clearXdebugIDEConfig as Ze, addXdebugIDEConfig as Je } from "@php-wasm/cli-util";
24
+ import { createHash as Ke } from "crypto";
25
+ import { PHPMYADMIN_INSTALL_PATH as ee, getPhpMyAdminInstallSteps as et, PHPMYADMIN_ENTRY_PATH as tt } from "@wp-playground/tools";
24
26
  import { jspi as te } from "wasm-feature-detect";
25
- const Ke = 2 ** 31 - 1;
26
- class et {
27
- constructor(t = 1, r = Ke) {
27
+ const rt = 2 ** 31 - 1;
28
+ class ot {
29
+ constructor(t = 1, r = rt) {
28
30
  this.claimed = /* @__PURE__ */ new Set(), this.initialId = t, this.maxId = r, this.nextId = t;
29
31
  }
30
32
  claim() {
@@ -51,10 +53,10 @@ function U(e) {
51
53
  Expected format: /host/path:/vfs/path.
52
54
  If your path contains a colon, e.g. C:\\myplugin, use the --mount-dir option instead.
53
55
  Example: --mount-dir C:\\my-plugin /wordpress/wp-content/plugins/my-plugin`);
54
- const [s, i] = o;
55
- if (!j(s))
56
- throw new Error(`Host path does not exist: ${s}`);
57
- t.push({ hostPath: s, vfsPath: i });
56
+ const [i, s] = o;
57
+ if (!O(i))
58
+ throw new Error(`Host path does not exist: ${i}`);
59
+ t.push({ hostPath: i, vfsPath: s });
58
60
  }
59
61
  return t;
60
62
  }
@@ -63,21 +65,21 @@ function re(e) {
63
65
  throw new Error("Invalid mount format. Expected: /host/path /vfs/path");
64
66
  const t = [];
65
67
  for (let r = 0; r < e.length; r += 2) {
66
- const o = e[r], s = e[r + 1];
67
- if (!j(o))
68
+ const o = e[r], i = e[r + 1];
69
+ if (!O(o))
68
70
  throw new Error(`Host path does not exist: ${o}`);
69
71
  t.push({
70
72
  hostPath: u.resolve(process.cwd(), o),
71
- vfsPath: s
73
+ vfsPath: i
72
74
  });
73
75
  }
74
76
  return t;
75
77
  }
76
- async function nr(e, t) {
78
+ async function cr(e, t) {
77
79
  for (const r of t)
78
80
  await e.mount(
79
81
  r.vfsPath,
80
- Me(r.hostPath)
82
+ Be(r.hostPath)
81
83
  );
82
84
  }
83
85
  const oe = {
@@ -100,7 +102,7 @@ const oe = {
100
102
  }
101
103
  };
102
104
  function ue(e) {
103
- const t = e.autoMount, r = [...e.mount || []], o = [...e["mount-before-install"] || []], s = {
105
+ const t = e.autoMount, r = [...e.mount || []], o = [...e["mount-before-install"] || []], i = {
104
106
  ...e,
105
107
  mount: r,
106
108
  "mount-before-install": o,
@@ -108,193 +110,200 @@ function ue(e) {
108
110
  ...e["additional-blueprint-steps"] || []
109
111
  ]
110
112
  };
111
- if (st(t)) {
112
- const a = `/wordpress/wp-content/plugins/${C(t)}`;
113
+ if (at(t)) {
114
+ const n = `/wordpress/wp-content/plugins/${A(t)}`;
113
115
  r.push({
114
116
  hostPath: t,
115
- vfsPath: a,
117
+ vfsPath: n,
116
118
  autoMounted: !0
117
- }), s["additional-blueprint-steps"].push({
119
+ }), i["additional-blueprint-steps"].push({
118
120
  step: "activatePlugin",
119
- pluginPath: `/wordpress/wp-content/plugins/${C(t)}`
121
+ pluginPath: `/wordpress/wp-content/plugins/${A(t)}`
120
122
  });
121
- } else if (ot(t)) {
122
- const i = C(t), a = `/wordpress/wp-content/themes/${i}`;
123
+ } else if (nt(t)) {
124
+ const s = A(t), n = `/wordpress/wp-content/themes/${s}`;
123
125
  r.push({
124
126
  hostPath: t,
125
- vfsPath: a,
127
+ vfsPath: n,
126
128
  autoMounted: !0
127
- }), s["additional-blueprint-steps"].push(
129
+ }), i["additional-blueprint-steps"].push(
128
130
  e["experimental-blueprints-v2-runner"] ? {
129
131
  step: "activateTheme",
130
- themeDirectoryName: i
132
+ themeDirectoryName: s
131
133
  } : {
132
134
  step: "activateTheme",
133
- themeFolderName: i
135
+ themeFolderName: s
134
136
  }
135
137
  );
136
- } else if (rt(t)) {
137
- const i = c.readdirSync(t);
138
- for (const a of i)
139
- a !== "index.php" && r.push({
140
- hostPath: `${t}/${a}`,
141
- vfsPath: `/wordpress/wp-content/${a}`,
138
+ } else if (st(t)) {
139
+ const s = c.readdirSync(t);
140
+ for (const n of s)
141
+ n !== "index.php" && r.push({
142
+ hostPath: `${t}/${n}`,
143
+ vfsPath: `/wordpress/wp-content/${n}`,
142
144
  autoMounted: !0
143
145
  });
144
- s["additional-blueprint-steps"].push(oe);
145
- } else tt(t) && (o.push({
146
+ i["additional-blueprint-steps"].push(oe);
147
+ } else it(t) && (o.push({
146
148
  hostPath: t,
147
149
  vfsPath: "/wordpress",
148
150
  autoMounted: !0
149
- }), s.mode = "apply-to-existing-site", s["additional-blueprint-steps"].push(oe), s.wordpressInstallMode || (s.wordpressInstallMode = "install-from-existing-files-if-needed"));
150
- return s;
151
+ }), i.mode = "apply-to-existing-site", i["additional-blueprint-steps"].push(oe), i.wordpressInstallMode || (i.wordpressInstallMode = "install-from-existing-files-if-needed"));
152
+ return i;
151
153
  }
152
- function tt(e) {
154
+ function it(e) {
153
155
  const t = c.readdirSync(e);
154
156
  return t.includes("wp-admin") && t.includes("wp-includes") && t.includes("wp-content");
155
157
  }
156
- function rt(e) {
158
+ function st(e) {
157
159
  const t = c.readdirSync(e);
158
160
  return t.includes("themes") || t.includes("plugins") || t.includes("mu-plugins") || t.includes("uploads");
159
161
  }
160
- function ot(e) {
162
+ function nt(e) {
161
163
  if (!c.readdirSync(e).includes("style.css"))
162
164
  return !1;
163
165
  const r = c.readFileSync(de(e, "style.css"), "utf8");
164
166
  return !!/^(?:[ \t]*<\?php)?[ \t/*#@]*Theme Name:(.*)$/im.exec(r);
165
167
  }
166
- function st(e) {
168
+ function at(e) {
167
169
  const t = c.readdirSync(e), r = /^(?:[ \t]*<\?php)?[ \t/*#@]*Plugin Name:(.*)$/im;
168
- return !!t.filter((s) => s.endsWith(".php")).find((s) => {
169
- const i = c.readFileSync(de(e, s), "utf8");
170
- return !!r.exec(i);
170
+ return !!t.filter((i) => i.endsWith(".php")).find((i) => {
171
+ const s = c.readFileSync(de(e, i), "utf8");
172
+ return !!r.exec(s);
171
173
  });
172
174
  }
173
- function it(e) {
175
+ function lt(e) {
174
176
  if (e.length % 2 !== 0)
175
177
  throw new Error(
176
178
  "Invalid constant definition format. Expected pairs of NAME value"
177
179
  );
178
180
  const t = {};
179
181
  for (let r = 0; r < e.length; r += 2) {
180
- const o = e[r], s = e[r + 1];
182
+ const o = e[r], i = e[r + 1];
181
183
  if (!o || !o.trim())
182
184
  throw new Error("Constant name cannot be empty");
183
- t[o.trim()] = s;
185
+ t[o.trim()] = i;
184
186
  }
185
187
  return t;
186
188
  }
187
- function nt(e) {
189
+ function dt(e) {
188
190
  if (e.length % 2 !== 0)
189
191
  throw new Error(
190
192
  "Invalid boolean constant definition format. Expected pairs of NAME value"
191
193
  );
192
194
  const t = {};
193
195
  for (let r = 0; r < e.length; r += 2) {
194
- const o = e[r], s = e[r + 1].trim().toLowerCase();
196
+ const o = e[r], i = e[r + 1].trim().toLowerCase();
195
197
  if (!o || !o.trim())
196
198
  throw new Error("Constant name cannot be empty");
197
- if (s === "true" || s === "1")
199
+ if (i === "true" || i === "1")
198
200
  t[o.trim()] = !0;
199
- else if (s === "false" || s === "0")
201
+ else if (i === "false" || i === "0")
200
202
  t[o.trim()] = !1;
201
203
  else
202
204
  throw new Error(
203
- `Invalid boolean value for constant "${o}": "${s}". Must be "true", "false", "1", or "0".`
205
+ `Invalid boolean value for constant "${o}": "${i}". Must be "true", "false", "1", or "0".`
204
206
  );
205
207
  }
206
208
  return t;
207
209
  }
208
- function at(e) {
210
+ function ut(e) {
209
211
  if (e.length % 2 !== 0)
210
212
  throw new Error(
211
213
  "Invalid number constant definition format. Expected pairs of NAME value"
212
214
  );
213
215
  const t = {};
214
216
  for (let r = 0; r < e.length; r += 2) {
215
- const o = e[r], s = e[r + 1].trim();
217
+ const o = e[r], i = e[r + 1].trim();
216
218
  if (!o || !o.trim())
217
219
  throw new Error("Constant name cannot be empty");
218
- const i = Number(s);
219
- if (isNaN(i))
220
+ const s = Number(i);
221
+ if (isNaN(s))
220
222
  throw new Error(
221
- `Invalid number value for constant "${o}": "${s}". Must be a valid number.`
223
+ `Invalid number value for constant "${o}": "${i}". Must be a valid number.`
222
224
  );
223
- t[o.trim()] = i;
225
+ t[o.trim()] = s;
224
226
  }
225
227
  return t;
226
228
  }
227
- function lt(e = {}, t = {}, r = {}) {
228
- const o = {}, s = /* @__PURE__ */ new Set(), i = (a, l) => {
229
- for (const d in a) {
230
- if (s.has(d))
229
+ function pt(e = {}, t = {}, r = {}) {
230
+ const o = {}, i = /* @__PURE__ */ new Set(), s = (n, l) => {
231
+ for (const d in n) {
232
+ if (i.has(d))
231
233
  throw new Error(
232
234
  `Constant "${d}" is defined multiple times across different --define-${l} flags`
233
235
  );
234
- s.add(d), o[d] = a[d];
236
+ i.add(d), o[d] = n[d];
235
237
  }
236
238
  };
237
- return i(e, "string"), i(t, "bool"), i(r, "number"), o;
239
+ return s(e, "string"), s(t, "bool"), s(r, "number"), o;
238
240
  }
239
241
  function pe(e) {
240
- return lt(
242
+ return pt(
241
243
  e.define,
242
244
  e["define-bool"],
243
245
  e["define-number"]
244
246
  );
245
247
  }
246
- async function dt(e) {
247
- const t = Be(), r = await new Promise((i, a) => {
248
+ async function ct(e) {
249
+ const t = Ae(), r = await new Promise((s, n) => {
248
250
  const l = t.listen(e.port, () => {
249
251
  const d = l.address();
250
- d === null || typeof d == "string" ? a(new Error("Server address is not available")) : i(l);
252
+ d === null || typeof d == "string" ? n(new Error("Server address is not available")) : s(l);
251
253
  });
252
254
  });
253
- t.use("/", async (i, a) => {
254
- let l;
255
+ t.use("/", async (s, n) => {
255
256
  try {
256
- l = await e.handleRequest({
257
- url: i.url,
258
- headers: pt(i),
259
- method: i.method,
260
- body: await ut(i)
261
- });
262
- } catch (d) {
263
- g.error(d), l = H.forHttpCode(500);
257
+ const l = {
258
+ url: s.url,
259
+ headers: ft(s),
260
+ method: s.method,
261
+ body: await ht(s)
262
+ }, d = await e.handleRequest(l);
263
+ await mt(d, n);
264
+ } catch (l) {
265
+ g.error(l), n.headersSent || (n.statusCode = 500, n.end("Internal Server Error"));
264
266
  }
265
- a.statusCode = l.httpStatusCode;
266
- for (const d in l.headers)
267
- a.setHeader(d, l.headers[d]);
268
- a.end(l.bytes);
269
267
  });
270
- const s = r.address().port;
271
- return await e.onBind(r, s);
268
+ const i = r.address().port;
269
+ return await e.onBind(r, i);
270
+ }
271
+ async function mt(e, t) {
272
+ const [r, o] = await Promise.all([
273
+ e.headers,
274
+ e.httpStatusCode
275
+ ]);
276
+ t.statusCode = o;
277
+ for (const s in r)
278
+ t.setHeader(s, r[s]);
279
+ const i = Ce.fromWeb(e.stdout);
280
+ await De(i, t);
272
281
  }
273
- const ut = async (e) => await new Promise((t) => {
282
+ const ht = async (e) => await new Promise((t) => {
274
283
  const r = [];
275
284
  e.on("data", (o) => {
276
285
  r.push(o);
277
286
  }), e.on("end", () => {
278
287
  t(new Uint8Array(Buffer.concat(r)));
279
288
  });
280
- }), pt = (e) => {
289
+ }), ft = (e) => {
281
290
  const t = {};
282
291
  if (e.rawHeaders && e.rawHeaders.length)
283
292
  for (let r = 0; r < e.rawHeaders.length; r += 2)
284
293
  t[e.rawHeaders[r].toLowerCase()] = e.rawHeaders[r + 1];
285
294
  return t;
286
295
  };
287
- function ct(e) {
296
+ function wt(e) {
288
297
  return /^latest$|^trunk$|^nightly$|^(?:(\d+)\.(\d+)(?:\.(\d+))?)((?:-beta(?:\d+)?)|(?:-RC(?:\d+)?))?$/.test(e);
289
298
  }
290
- async function mt({
299
+ async function yt({
291
300
  sourceString: e,
292
301
  blueprintMayReadAdjacentFiles: t
293
302
  }) {
294
303
  if (!e)
295
304
  return;
296
305
  if (e.startsWith("http://") || e.startsWith("https://"))
297
- return await Ie(e);
306
+ return await $e(e);
298
307
  let r = u.resolve(process.cwd(), e);
299
308
  if (!c.existsSync(r))
300
309
  throw new Error(`Blueprint file does not exist: ${r}`);
@@ -303,25 +312,25 @@ async function mt({
303
312
  throw new Error(
304
313
  `Blueprint path is neither a file nor a directory: ${r}`
305
314
  );
306
- const s = u.extname(r);
307
- switch (s) {
315
+ const i = u.extname(r);
316
+ switch (i) {
308
317
  case ".zip":
309
- return Le.fromArrayBuffer(
318
+ return He.fromArrayBuffer(
310
319
  c.readFileSync(r).buffer
311
320
  );
312
321
  case ".json": {
313
- const i = c.readFileSync(r, "utf-8");
322
+ const s = c.readFileSync(r, "utf-8");
314
323
  try {
315
- JSON.parse(i);
324
+ JSON.parse(s);
316
325
  } catch {
317
326
  throw new Error(
318
327
  `Blueprint file at ${r} is not a valid JSON file`
319
328
  );
320
329
  }
321
- const a = u.dirname(r), l = new De(a);
322
- return new Re([
323
- new We({
324
- "blueprint.json": i
330
+ const n = u.dirname(r), l = new Le(n);
331
+ return new Ue([
332
+ new Fe({
333
+ "blueprint.json": s
325
334
  }),
326
335
  /**
327
336
  * Wrap the NodeJS filesystem to prevent access to local files
@@ -342,11 +351,11 @@ You can allow this Blueprint to read files from the same parent directory by exp
342
351
  }
343
352
  default:
344
353
  throw new Error(
345
- `Unsupported blueprint file extension: ${s}. Only .zip and .json files are supported.`
354
+ `Unsupported blueprint file extension: ${i}. Only .zip and .json files are supported.`
346
355
  );
347
356
  }
348
357
  }
349
- class ht {
358
+ class bt {
350
359
  constructor(t, r) {
351
360
  this.args = t, this.siteUrl = r.siteUrl, this.phpVersion = t.php, this.cliOutput = r.cliOutput;
352
361
  }
@@ -367,9 +376,9 @@ class ht {
367
376
  fileLockManagerPort: r,
368
377
  nativeInternalDirPath: o
369
378
  }) {
370
- const s = ne(t.phpPort);
371
- await s.useFileLockManager(r);
372
- const i = {
379
+ const i = ne(t.phpPort);
380
+ await i.useFileLockManager(r);
381
+ const s = {
373
382
  ...this.args,
374
383
  phpVersion: this.phpVersion,
375
384
  siteUrl: this.siteUrl,
@@ -384,15 +393,15 @@ class ht {
384
393
  mountsAfterWpInstall: this.args.mount || [],
385
394
  constants: pe(this.args)
386
395
  };
387
- return await s.bootWorker(i), s;
396
+ return await i.bootWorker(s), i;
388
397
  }
389
398
  }
390
- const O = u.join(V.homedir(), ".wordpress-playground");
391
- async function ft() {
399
+ const N = u.join(j.homedir(), ".wordpress-playground");
400
+ async function gt() {
392
401
  const e = typeof __dirname < "u" ? __dirname : import.meta.dirname;
393
402
  let t = u.join(e, "sqlite-database-integration.zip");
394
403
  if (!I.existsSync(t)) {
395
- const r = He(import.meta.url), o = u.dirname(
404
+ const r = je(import.meta.url), o = u.dirname(
396
405
  r.resolve("@wp-playground/wordpress-builds/package.json")
397
406
  );
398
407
  t = u.join(
@@ -404,29 +413,29 @@ async function ft() {
404
413
  }
405
414
  return new File([await I.readFile(t)], u.basename(t));
406
415
  }
407
- async function wt(e, t, r) {
408
- const o = u.join(O, t);
409
- return I.existsSync(o) || (I.ensureDirSync(O), await yt(e, o, r)), ce(o);
416
+ async function Pt(e, t, r) {
417
+ const o = u.join(N, t);
418
+ return I.existsSync(o) || (I.ensureDirSync(N), await vt(e, o, r)), ce(o);
410
419
  }
411
- async function yt(e, t, r) {
412
- const s = (await r.monitorFetch(fetch(e))).body.getReader(), i = `${t}.partial`, a = I.createWriteStream(i);
420
+ async function vt(e, t, r) {
421
+ const i = (await r.monitorFetch(fetch(e))).body.getReader(), s = `${t}.partial`, n = I.createWriteStream(s);
413
422
  for (; ; ) {
414
- const { done: l, value: d } = await s.read();
415
- if (d && a.write(d), l)
423
+ const { done: l, value: d } = await i.read();
424
+ if (d && n.write(d), l)
416
425
  break;
417
426
  }
418
- a.close(), a.closed || await new Promise((l, d) => {
419
- a.on("finish", () => {
420
- I.renameSync(i, t), l(null);
421
- }), a.on("error", (S) => {
422
- I.removeSync(i), d(S);
427
+ n.close(), n.closed || await new Promise((l, d) => {
428
+ n.on("finish", () => {
429
+ I.renameSync(s, t), l(null);
430
+ }), n.on("error", (x) => {
431
+ I.removeSync(s), d(x);
423
432
  });
424
433
  });
425
434
  }
426
435
  function ce(e, t) {
427
- return new File([I.readFileSync(e)], C(e));
436
+ return new File([I.readFileSync(e)], A(e));
428
437
  }
429
- class bt {
438
+ class St {
430
439
  constructor(t, r) {
431
440
  this.args = t, this.siteUrl = r.siteUrl, this.cliOutput = r.cliOutput;
432
441
  }
@@ -434,33 +443,33 @@ class bt {
434
443
  return "v1";
435
444
  }
436
445
  async bootWordPress(t, r) {
437
- let o, s, i;
438
- const a = new Ue();
446
+ let o, i, s;
447
+ const n = new _e();
439
448
  if (this.args.wordpressInstallMode === "download-and-install") {
440
- let S = !1;
441
- a.addEventListener("progress", (x) => {
442
- if (S)
449
+ let x = !1;
450
+ n.addEventListener("progress", (S) => {
451
+ if (x)
443
452
  return;
444
- const { loaded: p, total: n } = x.detail, f = Math.floor(
445
- Math.min(100, 100 * p / n)
453
+ const { loaded: p, total: a } = S.detail, m = Math.floor(
454
+ Math.min(100, 100 * p / a)
446
455
  );
447
- S = f === 100, this.cliOutput.updateProgress(
456
+ x = m === 100, this.cliOutput.updateProgress(
448
457
  "Downloading WordPress",
449
- f
458
+ m
450
459
  );
451
- }), o = await _e(this.args.wp), i = u.join(
452
- O,
460
+ }), o = await Oe(this.args.wp), s = u.join(
461
+ N,
453
462
  `prebuilt-wp-content-for-wp-${o.version}.zip`
454
- ), s = c.existsSync(i) ? ce(i) : await wt(
463
+ ), i = c.existsSync(s) ? ce(s) : await Pt(
455
464
  o.releaseUrl,
456
465
  `${o.version}.zip`,
457
- a
466
+ n
458
467
  ), g.debug(
459
468
  `Resolved WordPress release URL: ${o?.releaseUrl}`
460
469
  );
461
470
  }
462
471
  let l;
463
- this.args.skipSqliteSetup ? (g.debug("Skipping SQLite integration plugin setup..."), l = void 0) : (this.cliOutput.updateProgress("Preparing SQLite database"), l = await ft()), this.cliOutput.updateProgress("Booting WordPress");
472
+ this.args.skipSqliteSetup ? (g.debug("Skipping SQLite integration plugin setup..."), l = void 0) : (this.cliOutput.updateProgress("Preparing SQLite database"), l = await gt()), this.cliOutput.updateProgress("Booting WordPress");
464
473
  const d = await Z(
465
474
  this.getEffectiveBlueprint()
466
475
  );
@@ -469,16 +478,16 @@ class bt {
469
478
  wpVersion: d.wpVersion,
470
479
  siteUrl: this.siteUrl,
471
480
  wordpressInstallMode: this.args.wordpressInstallMode || "download-and-install",
472
- wordPressZip: s && await s.arrayBuffer(),
481
+ wordPressZip: i && await i.arrayBuffer(),
473
482
  sqliteIntegrationPluginZip: await l?.arrayBuffer(),
474
483
  constants: pe(this.args)
475
484
  },
476
485
  r
477
- ), i && !this.args["mount-before-install"] && !c.existsSync(i) && (this.cliOutput.updateProgress("Caching WordPress for next boot"), c.writeFileSync(
478
- i,
486
+ ), s && !this.args["mount-before-install"] && !c.existsSync(s) && (this.cliOutput.updateProgress("Caching WordPress for next boot"), c.writeFileSync(
487
+ s,
479
488
  // Comlink proxy is not assignable to UniversalPHP but
480
489
  // proxies all method calls transparently at runtime.
481
- await Te(
490
+ await Ee(
482
491
  t,
483
492
  "/wordpress"
484
493
  )
@@ -489,15 +498,15 @@ class bt {
489
498
  fileLockManagerPort: r,
490
499
  nativeInternalDirPath: o
491
500
  }) {
492
- const s = ne(
501
+ const i = ne(
493
502
  t.phpPort
494
503
  );
495
- await s.isConnected();
496
- const i = await Z(
504
+ await i.isConnected();
505
+ const s = await Z(
497
506
  this.getEffectiveBlueprint()
498
507
  );
499
- return await s.useFileLockManager(r), await s.bootRequestHandler({
500
- phpVersion: i.phpVersion,
508
+ return await i.useFileLockManager(r), await i.bootRequestHandler({
509
+ phpVersion: s.phpVersion,
501
510
  siteUrl: this.siteUrl,
502
511
  mountsBeforeWpInstall: this.args["mount-before-install"] || [],
503
512
  mountsAfterWpInstall: this.args.mount || [],
@@ -510,17 +519,17 @@ class bt {
510
519
  withXdebug: !!this.args.xdebug,
511
520
  nativeInternalDirPath: o,
512
521
  pathAliases: this.args.pathAliases
513
- }), await s.isReady(), s;
522
+ }), await i.isReady(), i;
514
523
  }
515
524
  async compileInputBlueprint(t) {
516
- const r = this.getEffectiveBlueprint(), o = new Fe();
517
- let s = "", i = !1;
518
- return o.addEventListener("progress", (a) => {
519
- if (i)
525
+ const r = this.getEffectiveBlueprint(), o = new Ne();
526
+ let i = "", s = !1;
527
+ return o.addEventListener("progress", (n) => {
528
+ if (s)
520
529
  return;
521
- i = a.detail.progress === 100;
522
- const l = Math.floor(a.detail.progress);
523
- s = a.detail.caption || s || "Running Blueprint", this.cliOutput.updateProgress(s.trim(), l);
530
+ s = n.detail.progress === 100;
531
+ const l = Math.floor(n.detail.progress);
532
+ i = n.detail.caption || i || "Running Blueprint", this.cliOutput.updateProgress(i.trim(), l);
524
533
  }), await ae(r, {
525
534
  progress: o,
526
535
  additionalSteps: t
@@ -528,19 +537,19 @@ class bt {
528
537
  }
529
538
  getEffectiveBlueprint() {
530
539
  const t = this.args.blueprint;
531
- return $e(t) ? t : {
540
+ return Te(t) ? t : {
532
541
  login: this.args.login,
533
542
  ...t || {},
534
543
  preferredVersions: {
535
- php: this.args.php ?? t?.preferredVersions?.php ?? D,
544
+ php: this.args.php ?? t?.preferredVersions?.php ?? C,
536
545
  wp: this.args.wp ?? t?.preferredVersions?.wp ?? "latest",
537
546
  ...t?.preferredVersions || {}
538
547
  }
539
548
  };
540
549
  }
541
550
  }
542
- async function gt(e, t = !0) {
543
- const o = `${u.basename(process.argv0)}${e}${process.pid}-`, s = await je({
551
+ async function xt(e, t = !0) {
552
+ const o = `${u.basename(process.argv0)}${e}${process.pid}-`, i = await qe({
544
553
  prefix: o,
545
554
  /*
546
555
  * Allow recursive cleanup on process exit.
@@ -552,83 +561,83 @@ async function gt(e, t = !0) {
552
561
  */
553
562
  unsafeCleanup: !0
554
563
  });
555
- return t && Ve(), s;
564
+ return t && ze(), i;
556
565
  }
557
- async function Pt(e, t, r) {
558
- const s = (await vt(
566
+ async function It(e, t, r) {
567
+ const i = (await $t(
559
568
  e,
560
569
  t,
561
570
  r
562
571
  )).map(
563
- (i) => new Promise((a) => {
564
- c.rm(i, { recursive: !0 }, (l) => {
572
+ (s) => new Promise((n) => {
573
+ c.rm(s, { recursive: !0 }, (l) => {
565
574
  l ? g.warn(
566
- `Failed to delete stale Playground temp dir: ${i}`,
575
+ `Failed to delete stale Playground temp dir: ${s}`,
567
576
  l
568
577
  ) : g.info(
569
- `Deleted stale Playground temp dir: ${i}`
570
- ), a();
578
+ `Deleted stale Playground temp dir: ${s}`
579
+ ), n();
571
580
  });
572
581
  })
573
582
  );
574
- await Promise.all(s);
583
+ await Promise.all(i);
575
584
  }
576
- async function vt(e, t, r) {
585
+ async function $t(e, t, r) {
577
586
  try {
578
- const o = c.readdirSync(r).map((i) => u.join(r, i)), s = [];
579
- for (const i of o)
580
- await xt(
587
+ const o = c.readdirSync(r).map((s) => u.join(r, s)), i = [];
588
+ for (const s of o)
589
+ await Tt(
581
590
  e,
582
591
  t,
583
- i
584
- ) && s.push(i);
585
- return s;
592
+ s
593
+ ) && i.push(s);
594
+ return i;
586
595
  } catch (o) {
587
596
  return g.warn(`Failed to find stale Playground temp dirs: ${o}`), [];
588
597
  }
589
598
  }
590
- async function xt(e, t, r) {
599
+ async function Tt(e, t, r) {
591
600
  if (!c.lstatSync(r).isDirectory())
592
601
  return !1;
593
- const s = u.basename(r);
594
- if (!s.includes(e))
602
+ const i = u.basename(r);
603
+ if (!i.includes(e))
595
604
  return !1;
596
- const i = s.match(
605
+ const s = i.match(
597
606
  new RegExp(`^(.+)${e}(\\d+)-`)
598
607
  );
599
- if (!i)
608
+ if (!s)
600
609
  return !1;
601
- const a = {
602
- executableName: i[1],
603
- pid: i[2]
610
+ const n = {
611
+ executableName: s[1],
612
+ pid: s[2]
604
613
  };
605
- if (await St(a.pid, a.executableName))
614
+ if (await Et(n.pid, n.executableName))
606
615
  return !1;
607
616
  const l = Date.now() - t;
608
617
  return c.statSync(r).mtime.getTime() < l;
609
618
  }
610
- async function St(e, t) {
619
+ async function Et(e, t) {
611
620
  const [r] = await new Promise(
612
- (o, s) => {
613
- Ye.list(
621
+ (o, i) => {
622
+ Ge.list(
614
623
  {
615
624
  pid: e,
616
625
  name: t,
617
626
  // Remove path from executable name in the results.
618
627
  clean: !0
619
628
  },
620
- (i, a) => {
621
- i ? s(i) : o(a);
629
+ (s, n) => {
630
+ s ? i(s) : o(n);
622
631
  }
623
632
  );
624
633
  }
625
634
  );
626
635
  return !!r && r.pid === e && r.command === t;
627
636
  }
628
- function It(e) {
637
+ function kt(e) {
629
638
  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;
630
639
  }
631
- class $t {
640
+ class Mt {
632
641
  constructor(t) {
633
642
  this.lastProgressLine = "", this.progressActive = !1, this.verbosity = t.verbosity, this.writeStream = t.writeStream || process.stdout;
634
643
  }
@@ -642,7 +651,7 @@ class $t {
642
651
  * This prevents progress spam in logs - users only see the final outcome.
643
652
  */
644
653
  get shouldRender() {
645
- return It(this.writeStream);
654
+ return kt(this.writeStream);
646
655
  }
647
656
  get isQuiet() {
648
657
  return this.verbosity === "quiet";
@@ -695,10 +704,10 @@ ${t}
695
704
  );
696
705
  const o = [];
697
706
  if (t.intl && o.push("intl"), t.redis && o.push("redis"), t.memcached && o.push("memcached"), t.xdebug && o.push(this.yellow("xdebug")), o.length > 0 && r.push(`${this.dim("Extensions")} ${o.join(", ")}`), t.mounts.length > 0)
698
- for (const s of t.mounts) {
699
- const i = s.autoMounted ? ` ${this.dim("(auto-mount)")}` : "";
707
+ for (const i of t.mounts) {
708
+ const s = i.autoMounted ? ` ${this.dim("(auto-mount)")}` : "";
700
709
  r.push(
701
- `${this.dim("Mount")} ${s.hostPath} ${this.dim("→")} ${s.vfsPath}${i}`
710
+ `${this.dim("Mount")} ${i.hostPath} ${this.dim("→")} ${i.vfsPath}${s}`
702
711
  );
703
712
  }
704
713
  t.blueprint && r.push(`${this.dim("Blueprint")} ${t.blueprint}`), this.writeStream.write(r.join(`
@@ -795,8 +804,8 @@ const me = {
795
804
  Quiet: { name: "quiet", severity: L.Fatal },
796
805
  Normal: { name: "normal", severity: L.Info },
797
806
  Debug: { name: "debug", severity: L.Debug }
798
- }, Tt = 10;
799
- async function ar(e) {
807
+ }, Bt = 10;
808
+ async function mr(e) {
800
809
  try {
801
810
  const t = {
802
811
  "site-url": {
@@ -806,8 +815,8 @@ async function ar(e) {
806
815
  php: {
807
816
  describe: "PHP version to use.",
808
817
  type: "string",
809
- default: D,
810
- choices: X
818
+ default: C,
819
+ choices: Q
811
820
  },
812
821
  wp: {
813
822
  describe: "WordPress version to use.",
@@ -819,21 +828,21 @@ async function ar(e) {
819
828
  type: "string",
820
829
  nargs: 2,
821
830
  array: !0,
822
- coerce: it
831
+ coerce: lt
823
832
  },
824
833
  "define-bool": {
825
834
  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',
826
835
  type: "string",
827
836
  nargs: 2,
828
837
  array: !0,
829
- coerce: nt
838
+ coerce: dt
830
839
  },
831
840
  "define-number": {
832
841
  describe: "Define PHP number constants (can be used multiple times). Format: NAME value. Examples: --define-number LIMIT 100 --define-number RATE 45.67",
833
842
  type: "string",
834
843
  nargs: 2,
835
844
  array: !0,
836
- coerce: at
845
+ coerce: ut
837
846
  },
838
847
  // @TODO: Support read-only mounts, e.g. via WORKERFS, a custom
839
848
  // ReadOnlyNODEFS, or by copying the files into MEMFS
@@ -909,7 +918,7 @@ async function ar(e) {
909
918
  describe: "Output logs and progress messages.",
910
919
  type: "string",
911
920
  choices: Object.values(me).map(
912
- (n) => n.name
921
+ (a) => a.name
913
922
  ),
914
923
  default: "normal"
915
924
  },
@@ -969,7 +978,7 @@ Warning: Following symlinks will expose files outside mounted directories to Pla
969
978
  // supported IDEs and, if needed, will create the relevant
970
979
  // config file for each.
971
980
  choices: ["", "vscode", "phpstorm"],
972
- coerce: (n) => n === "" ? ["vscode", "phpstorm"] : [n]
981
+ coerce: (a) => a === "" ? ["vscode", "phpstorm"] : [a]
973
982
  },
974
983
  "experimental-blueprints-v2-runner": {
975
984
  describe: "Use the experimental Blueprint V2 runner.",
@@ -988,7 +997,7 @@ Warning: Following symlinks will expose files outside mounted directories to Pla
988
997
  phpmyadmin: {
989
998
  describe: "Install phpMyAdmin for database management. The phpMyAdmin URL will be printed after boot. Optionally specify a custom URL path (default: /phpmyadmin).",
990
999
  type: "string",
991
- coerce: (n) => n === "" ? "/phpmyadmin" : n
1000
+ coerce: (a) => a === "" ? "/phpmyadmin" : a
992
1001
  }
993
1002
  }, r = {
994
1003
  port: {
@@ -1014,8 +1023,8 @@ Warning: Following symlinks will expose files outside mounted directories to Pla
1014
1023
  php: {
1015
1024
  describe: "PHP version to use.",
1016
1025
  type: "string",
1017
- default: D,
1018
- choices: X
1026
+ default: C,
1027
+ choices: Q
1019
1028
  },
1020
1029
  wp: {
1021
1030
  describe: "WordPress version to use.",
@@ -1079,16 +1088,16 @@ Warning: Following symlinks will expose files outside mounted directories to Pla
1079
1088
  "define-number": t["define-number"],
1080
1089
  // Tools
1081
1090
  phpmyadmin: t.phpmyadmin
1082
- }, s = {
1091
+ }, i = {
1083
1092
  outfile: {
1084
1093
  describe: "When building, write to this output file.",
1085
1094
  type: "string",
1086
1095
  default: "wordpress.zip"
1087
1096
  }
1088
- }, i = Ce(e).usage("Usage: wp-playground <command> [options]").command(
1097
+ }, s = We(e).usage("Usage: wp-playground <command> [options]").command(
1089
1098
  "start",
1090
1099
  "Start a local WordPress server with automatic project detection (recommended)",
1091
- (n) => n.usage(
1100
+ (a) => a.usage(
1092
1101
  `Usage: wp-playground start [options]
1093
1102
 
1094
1103
  The easiest way to run WordPress locally. Automatically detects
@@ -1105,103 +1114,103 @@ Examples:
1105
1114
  ).command(
1106
1115
  "server",
1107
1116
  "Start a local WordPress server (advanced, low-level)",
1108
- (n) => n.options({
1117
+ (a) => a.options({
1109
1118
  ...t,
1110
1119
  ...r
1111
1120
  })
1112
1121
  ).command(
1113
1122
  "run-blueprint",
1114
1123
  "Execute a Blueprint without starting a server",
1115
- (n) => n.options({ ...t })
1124
+ (a) => a.options({ ...t })
1116
1125
  ).command(
1117
1126
  "build-snapshot",
1118
1127
  "Build a ZIP snapshot of a WordPress site based on a Blueprint",
1119
- (n) => n.options({
1128
+ (a) => a.options({
1120
1129
  ...t,
1121
- ...s
1130
+ ...i
1122
1131
  })
1123
1132
  ).demandCommand(1, "Please specify a command").strictCommands().conflicts(
1124
1133
  "experimental-unsafe-ide-integration",
1125
1134
  "experimental-devtools"
1126
- ).showHelpOnFail(!1).fail((n, f, y) => {
1127
- if (f)
1128
- throw f;
1129
- n && n.includes("Please specify a command") && (y.showHelp(), console.error(`
1130
- ` + n), process.exit(1)), console.error(n), process.exit(1);
1131
- }).strictOptions().check(async (n) => {
1132
- if (n["skip-wordpress-install"] === !0 && (n["wordpress-install-mode"] = "do-not-attempt-installing", n.wordpressInstallMode = "do-not-attempt-installing"), n.wp !== void 0 && typeof n.wp == "string" && !ct(n.wp))
1135
+ ).showHelpOnFail(!1).fail((a, m, y) => {
1136
+ if (m)
1137
+ throw m;
1138
+ a && a.includes("Please specify a command") && (y.showHelp(), console.error(`
1139
+ ` + a), process.exit(1)), console.error(a), process.exit(1);
1140
+ }).strictOptions().check(async (a) => {
1141
+ if (a["skip-wordpress-install"] === !0 && (a["wordpress-install-mode"] = "do-not-attempt-installing", a.wordpressInstallMode = "do-not-attempt-installing"), a.wp !== void 0 && typeof a.wp == "string" && !wt(a.wp))
1133
1142
  try {
1134
- new URL(n.wp);
1143
+ new URL(a.wp);
1135
1144
  } catch {
1136
1145
  throw new Error(
1137
1146
  'Unrecognized WordPress version. Please use "latest", a URL, or a numeric version such as "6.2", "6.0.1", "6.2-beta1", or "6.2-RC1"'
1138
1147
  );
1139
1148
  }
1140
- const f = n["site-url"];
1141
- if (typeof f == "string" && f.trim() !== "")
1149
+ const m = a["site-url"];
1150
+ if (typeof m == "string" && m.trim() !== "")
1142
1151
  try {
1143
- new URL(f);
1152
+ new URL(m);
1144
1153
  } catch {
1145
1154
  throw new Error(
1146
- `Invalid site-url "${f}". Please provide a valid URL (e.g., http://localhost:8080 or https://example.com)`
1155
+ `Invalid site-url "${m}". Please provide a valid URL (e.g., http://localhost:8080 or https://example.com)`
1147
1156
  );
1148
1157
  }
1149
- if (n["auto-mount"]) {
1158
+ if (a["auto-mount"]) {
1150
1159
  let y = !1;
1151
1160
  try {
1152
1161
  y = c.statSync(
1153
- n["auto-mount"]
1162
+ a["auto-mount"]
1154
1163
  ).isDirectory();
1155
1164
  } catch {
1156
1165
  y = !1;
1157
1166
  }
1158
1167
  if (!y)
1159
1168
  throw new Error(
1160
- `The specified --auto-mount path is not a directory: '${n["auto-mount"]}'.`
1169
+ `The specified --auto-mount path is not a directory: '${a["auto-mount"]}'.`
1161
1170
  );
1162
1171
  }
1163
- if (n["experimental-blueprints-v2-runner"] === !0)
1172
+ if (a["experimental-blueprints-v2-runner"] === !0)
1164
1173
  throw new Error(
1165
1174
  "Blueprints v2 are temporarily disabled while we rework their runtime implementation."
1166
1175
  );
1167
- if (n.mode !== void 0)
1176
+ if (a.mode !== void 0)
1168
1177
  throw new Error(
1169
1178
  "The --mode option requires the --experimentalBlueprintsV2Runner flag."
1170
1179
  );
1171
1180
  return !0;
1172
1181
  });
1173
- i.wrap(i.terminalWidth());
1174
- const a = await i.argv, l = a._[0];
1182
+ s.wrap(s.terminalWidth());
1183
+ const n = await s.argv, l = n._[0];
1175
1184
  ["start", "run-blueprint", "server", "build-snapshot"].includes(
1176
1185
  l
1177
- ) || (i.showHelp(), process.exit(1));
1178
- const d = a.define || {};
1186
+ ) || (s.showHelp(), process.exit(1));
1187
+ const d = n.define || {};
1179
1188
  !("WP_DEBUG" in d) && !("WP_DEBUG_LOG" in d) && !("WP_DEBUG_DISPLAY" in d) && (d.WP_DEBUG = "true", d.WP_DEBUG_LOG = "true", d.WP_DEBUG_DISPLAY = "true");
1180
- const S = {
1181
- ...a,
1189
+ const x = {
1190
+ ...n,
1182
1191
  define: d,
1183
1192
  command: l,
1184
1193
  mount: [
1185
- ...a.mount || [],
1186
- ...a["mount-dir"] || []
1194
+ ...n.mount || [],
1195
+ ...n["mount-dir"] || []
1187
1196
  ],
1188
1197
  "mount-before-install": [
1189
- ...a["mount-before-install"] || [],
1190
- ...a["mount-dir-before-install"] || []
1198
+ ...n["mount-before-install"] || [],
1199
+ ...n["mount-dir-before-install"] || []
1191
1200
  ]
1192
- }, x = await Mt(S);
1193
- x === void 0 && process.exit(0);
1201
+ }, S = await Dt(x);
1202
+ S === void 0 && process.exit(0);
1194
1203
  const p = /* @__PURE__ */ (() => {
1195
- let n;
1204
+ let a;
1196
1205
  return async () => {
1197
- n === void 0 && (n = x[Symbol.asyncDispose]()), await n, process.exit(0);
1206
+ a === void 0 && (a = S[Symbol.asyncDispose]()), await a, process.exit(0);
1198
1207
  };
1199
1208
  })();
1200
1209
  return process.on("SIGINT", p), process.on("SIGTERM", p), {
1201
1210
  [Symbol.asyncDispose]: async () => {
1202
- process.off("SIGINT", p), process.off("SIGTERM", p), await x[Symbol.asyncDispose]();
1211
+ process.off("SIGINT", p), process.off("SIGTERM", p), await S[Symbol.asyncDispose]();
1203
1212
  },
1204
- [he]: { cliServer: x }
1213
+ [he]: { cliServer: S }
1205
1214
  };
1206
1215
  } catch (t) {
1207
1216
  if (console.error(t), !(t instanceof Error))
@@ -1210,10 +1219,10 @@ Examples:
1210
1219
  be(t);
1211
1220
  else {
1212
1221
  const o = [];
1213
- let s = t;
1222
+ let i = t;
1214
1223
  do
1215
- o.push(s.message), s = s.cause;
1216
- while (s instanceof Error);
1224
+ o.push(i.message), i = i.cause;
1225
+ while (i instanceof Error);
1217
1226
  console.error(
1218
1227
  "\x1B[1m" + o.join(" caused by: ") + "\x1B[0m"
1219
1228
  );
@@ -1221,18 +1230,18 @@ Examples:
1221
1230
  process.exit(1);
1222
1231
  }
1223
1232
  }
1224
- function se(e, t) {
1233
+ function ie(e, t) {
1225
1234
  return e.find(
1226
1235
  (r) => r.vfsPath.replace(/\/$/, "") === t.replace(/\/$/, "")
1227
1236
  );
1228
1237
  }
1229
- const he = Symbol("playground-cli-testing"), k = (e) => process.stdout.isTTY ? "\x1B[1m" + e + "\x1B[0m" : e, Et = (e) => process.stdout.isTTY ? "\x1B[31m" + e + "\x1B[0m" : e, kt = (e) => process.stdout.isTTY ? `\x1B[2m${e}\x1B[0m` : e, F = (e) => process.stdout.isTTY ? `\x1B[3m${e}\x1B[0m` : e, ie = (e) => process.stdout.isTTY ? `\x1B[33m${e}\x1B[0m` : e;
1230
- async function Mt(e) {
1238
+ const he = Symbol("playground-cli-testing"), k = (e) => process.stdout.isTTY ? "\x1B[1m" + e + "\x1B[0m" : e, At = (e) => process.stdout.isTTY ? "\x1B[31m" + e + "\x1B[0m" : e, Ct = (e) => process.stdout.isTTY ? `\x1B[2m${e}\x1B[0m` : e, F = (e) => process.stdout.isTTY ? `\x1B[3m${e}\x1B[0m` : e, se = (e) => process.stdout.isTTY ? `\x1B[33m${e}\x1B[0m` : e;
1239
+ async function Dt(e) {
1231
1240
  let t;
1232
- const r = e.internalCookieStore ? new ge() : void 0, o = [], s = /* @__PURE__ */ new Map();
1233
- if (e.command === "start" && (e = Bt(e)), e.autoMount !== void 0 && (e.autoMount === "" && (e = { ...e, autoMount: process.cwd() }), e = ue(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) {
1241
+ const r = e.internalCookieStore ? new ge() : void 0, o = [], i = /* @__PURE__ */ new Map();
1242
+ if (e.command === "start" && (e = Rt(e)), e.autoMount !== void 0 && (e.autoMount === "" && (e = { ...e, autoMount: process.cwd() }), e = ue(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) {
1234
1243
  const p = Object.values(me).find(
1235
- (n) => n.name === e.verbosity
1244
+ (a) => a.name === e.verbosity
1236
1245
  ).severity;
1237
1246
  g.setSeverityFilterLevel(p);
1238
1247
  }
@@ -1248,11 +1257,11 @@ async function Mt(e) {
1248
1257
  }
1249
1258
  ];
1250
1259
  }
1251
- const i = new $t({
1260
+ const s = new Mt({
1252
1261
  verbosity: e.verbosity || "normal"
1253
1262
  });
1254
- e.command === "server" && (i.printBanner(), i.printConfig({
1255
- phpVersion: e.php || D,
1263
+ e.command === "server" && (s.printBanner(), s.printConfig({
1264
+ phpVersion: e.php || C,
1256
1265
  wpVersion: e.wp || "latest",
1257
1266
  port: e.port || 9400,
1258
1267
  xdebug: !!e.xdebug,
@@ -1265,53 +1274,53 @@ async function Mt(e) {
1265
1274
  ],
1266
1275
  blueprint: typeof e.blueprint == "string" ? e.blueprint : void 0
1267
1276
  }));
1268
- const a = e.command === "server" ? e.port ?? 9400 : 0, l = new Pe();
1269
- let d = !1, S = !0;
1270
- const x = await dt({
1271
- port: a,
1272
- onBind: async (p, n) => {
1273
- const f = "127.0.0.1", y = `http://${f}:${n}`, R = e["site-url"] || y, M = Math.max(
1274
- Ae().length - 1,
1275
- Tt
1276
- ), Y = "-playground-cli-site-", T = await gt(Y);
1277
+ const n = e.command === "server" ? e.port ?? 9400 : 0, l = new Pe();
1278
+ let d = !1, x = !0;
1279
+ const S = await ct({
1280
+ port: n,
1281
+ onBind: async (p, a) => {
1282
+ const m = "127.0.0.1", y = `http://${m}:${a}`, D = e["site-url"] || y, R = Math.max(
1283
+ Re().length - 1,
1284
+ Bt
1285
+ ), V = "-playground-cli-site-", T = await xt(V);
1277
1286
  g.debug(`Native temp dir for VFS root: ${T.path}`);
1278
- const B = "WP Playground CLI - Listen for Xdebug", q = ".playground-xdebug-root", z = u.join(process.cwd(), q);
1279
- if (await qe(z), e.xdebug && e.experimentalUnsafeIdeIntegration) {
1280
- await ze(
1287
+ const M = "WP Playground CLI - Listen for Xdebug", Y = ".playground-xdebug-root", q = u.join(process.cwd(), Y);
1288
+ if (await Qe(q), e.xdebug && e.experimentalUnsafeIdeIntegration) {
1289
+ await Xe(
1281
1290
  T.path,
1282
- z,
1291
+ q,
1283
1292
  process.platform
1284
1293
  );
1285
- const m = {
1286
- hostPath: u.join(".", u.sep, q),
1294
+ const h = {
1295
+ hostPath: u.join(".", u.sep, Y),
1287
1296
  vfsPath: "/"
1288
1297
  };
1289
1298
  try {
1290
- await Ge(B, process.cwd());
1291
- const w = typeof e.xdebug == "object" ? e.xdebug : void 0, h = await Qe({
1292
- name: B,
1293
- host: f,
1294
- port: n,
1299
+ await Ze(M, process.cwd());
1300
+ const w = typeof e.xdebug == "object" ? e.xdebug : void 0, f = await Je({
1301
+ name: M,
1302
+ host: m,
1303
+ port: a,
1295
1304
  ides: e.experimentalUnsafeIdeIntegration,
1296
1305
  cwd: process.cwd(),
1297
1306
  mounts: [
1298
- m,
1307
+ h,
1299
1308
  ...e["mount-before-install"] || [],
1300
1309
  ...e.mount || []
1301
1310
  ],
1302
1311
  ideKey: w?.ideKey
1303
- }), b = e.experimentalUnsafeIdeIntegration, P = b.includes("vscode"), v = b.includes("phpstorm"), $ = Object.values(h);
1312
+ }), b = e.experimentalUnsafeIdeIntegration, P = b.includes("vscode"), v = b.includes("phpstorm"), $ = Object.values(f);
1304
1313
  console.log(""), $.length > 0 ? (console.log(k("Xdebug configured successfully")), console.log(
1305
- ie("Updated IDE config: ") + $.join(" ")
1314
+ se("Updated IDE config: ") + $.join(" ")
1306
1315
  ), console.log(
1307
- ie("Playground source root: ") + ".playground-xdebug-root" + F(
1308
- kt(
1316
+ se("Playground source root: ") + ".playground-xdebug-root" + F(
1317
+ Ct(
1309
1318
  " – you can set breakpoints and preview Playground's VFS structure in there."
1310
1319
  )
1311
1320
  )
1312
1321
  )) : (console.log(k("Xdebug configuration failed.")), console.log(
1313
1322
  "No IDE-specific project settings directory was found in the current working directory."
1314
- )), console.log(""), P && h.vscode && (console.log(k("VS Code / Cursor instructions:")), console.log(
1323
+ )), console.log(""), P && f.vscode && (console.log(k("VS Code / Cursor instructions:")), console.log(
1315
1324
  " 1. Ensure you have installed an IDE extension for PHP Debugging"
1316
1325
  ), console.log(
1317
1326
  ` (The ${k("PHP Debug")} extension by ${k(
@@ -1321,15 +1330,15 @@ async function Mt(e) {
1321
1330
  " 2. Open the Run and Debug panel on the left sidebar"
1322
1331
  ), console.log(
1323
1332
  ` 3. Select "${F(
1324
- B
1333
+ M
1325
1334
  )}" from the dropdown`
1326
1335
  ), console.log(' 3. Click "start debugging"'), console.log(
1327
1336
  " 5. Set a breakpoint. For example, in .playground-xdebug-root/wordpress/index.php"
1328
1337
  ), console.log(
1329
1338
  " 6. Visit Playground in your browser to hit the breakpoint"
1330
- ), v && console.log("")), v && h.phpstorm && (console.log(k("PhpStorm instructions:")), console.log(
1339
+ ), v && console.log("")), v && f.phpstorm && (console.log(k("PhpStorm instructions:")), console.log(
1331
1340
  ` 1. Choose "${F(
1332
- B
1341
+ M
1333
1342
  )}" debug configuration in the toolbar`
1334
1343
  ), console.log(" 2. Click the debug button (bug icon)`"), console.log(
1335
1344
  " 3. Set a breakpoint. For example, in .playground-xdebug-root/wordpress/index.php"
@@ -1343,13 +1352,13 @@ async function Mt(e) {
1343
1352
  }
1344
1353
  }
1345
1354
  const fe = u.dirname(T.path), we = 2 * 24 * 60 * 60 * 1e3;
1346
- Pt(
1347
- Y,
1355
+ It(
1356
+ V,
1348
1357
  we,
1349
1358
  fe
1350
1359
  );
1351
- const G = u.join(T.path, "internal");
1352
- N(G);
1360
+ const z = u.join(T.path, "internal");
1361
+ _(z);
1353
1362
  const ye = [
1354
1363
  "wordpress",
1355
1364
  "tools",
@@ -1362,89 +1371,89 @@ async function Mt(e) {
1362
1371
  "tmp",
1363
1372
  "home"
1364
1373
  ];
1365
- for (const m of ye) {
1366
- const w = (b) => b.vfsPath === `/${m}`;
1374
+ for (const h of ye) {
1375
+ const w = (b) => b.vfsPath === `/${h}`;
1367
1376
  if (!(e["mount-before-install"]?.some(w) || e.mount?.some(w))) {
1368
1377
  const b = u.join(
1369
1378
  T.path,
1370
- m
1379
+ h
1371
1380
  );
1372
- N(b), e["mount-before-install"] === void 0 && (e["mount-before-install"] = []), e["mount-before-install"].unshift({
1373
- vfsPath: `/${m}`,
1381
+ _(b), e["mount-before-install"] === void 0 && (e["mount-before-install"] = []), e["mount-before-install"].unshift({
1382
+ vfsPath: `/${h}`,
1374
1383
  hostPath: b
1375
1384
  });
1376
1385
  }
1377
1386
  }
1378
1387
  if (e["mount-before-install"])
1379
- for (const m of e["mount-before-install"])
1388
+ for (const h of e["mount-before-install"])
1380
1389
  g.debug(
1381
- `Mount before WP install: ${m.vfsPath} -> ${m.hostPath}`
1390
+ `Mount before WP install: ${h.vfsPath} -> ${h.hostPath}`
1382
1391
  );
1383
1392
  if (e.mount)
1384
- for (const m of e.mount)
1393
+ for (const h of e.mount)
1385
1394
  g.debug(
1386
- `Mount after WP install: ${m.vfsPath} -> ${m.hostPath}`
1395
+ `Mount after WP install: ${h.vfsPath} -> ${h.hostPath}`
1387
1396
  );
1388
1397
  let E;
1389
- e["experimental-blueprints-v2-runner"] ? E = new ht(e, {
1390
- siteUrl: R,
1391
- cliOutput: i
1392
- }) : (E = new bt(e, {
1393
- siteUrl: R,
1394
- cliOutput: i
1395
- }), typeof e.blueprint == "string" && (e.blueprint = await mt({
1398
+ e["experimental-blueprints-v2-runner"] ? E = new bt(e, {
1399
+ siteUrl: D,
1400
+ cliOutput: s
1401
+ }) : (E = new St(e, {
1402
+ siteUrl: D,
1403
+ cliOutput: s
1404
+ }), typeof e.blueprint == "string" && (e.blueprint = await yt({
1396
1405
  sourceString: e.blueprint,
1397
1406
  blueprintMayReadAdjacentFiles: e["blueprint-may-read-adjacent-files"] === !0
1398
1407
  })));
1399
1408
  let W = !1;
1400
- const A = async function() {
1409
+ const B = async function() {
1401
1410
  W || (W = !0, await Promise.all(
1402
1411
  o.map(async (w) => {
1403
- await s.get(w)?.dispose(), await w.worker.terminate();
1412
+ await i.get(w)?.dispose(), await w.worker.terminate();
1404
1413
  })
1405
1414
  ), p && await new Promise((w) => {
1406
1415
  p.close(w), p.closeAllConnections();
1407
1416
  }), await T.cleanup());
1408
1417
  };
1409
1418
  try {
1410
- const m = [], w = E.getWorkerType();
1411
- for (let h = 0; h < M; h++) {
1412
- const b = At(w, {
1419
+ const h = [], w = E.getWorkerType();
1420
+ for (let f = 0; f < R; f++) {
1421
+ const b = Wt(w, {
1413
1422
  onExit: (P) => {
1414
1423
  W || P === 0 && g.error(
1415
- `Worker ${h} exited with code ${P}
1424
+ `Worker ${f} exited with code ${P}
1416
1425
  `
1417
1426
  );
1418
1427
  }
1419
1428
  }).then(
1420
1429
  async (P) => {
1421
1430
  o.push(P);
1422
- const v = await Ct(l), $ = await E.bootRequestHandler({
1431
+ const v = await Lt(l), $ = await E.bootRequestHandler({
1423
1432
  worker: P,
1424
1433
  fileLockManagerPort: v,
1425
- nativeInternalDirPath: G
1434
+ nativeInternalDirPath: z
1426
1435
  });
1427
- return s.set(
1436
+ return i.set(
1428
1437
  P,
1429
1438
  $
1430
1439
  ), [P, $];
1431
1440
  }
1432
1441
  );
1433
- m.push(b), h === 0 && await b;
1442
+ h.push(b), f === 0 && await b;
1434
1443
  }
1435
- await Promise.all(m), t = ve(
1444
+ await Promise.all(h), t = ve(
1436
1445
  o.map(
1437
- (h) => s.get(h)
1446
+ (f) => i.get(f)
1438
1447
  )
1439
1448
  );
1440
1449
  {
1441
- const h = new le(), b = h.port1, P = h.port2;
1442
- if (await xe(
1450
+ const f = new le(), b = f.port1, P = f.port2;
1451
+ if (await Se(
1443
1452
  {
1444
1453
  applyPostInstallMountsToAllWorkers: async () => {
1445
1454
  await Promise.all(
1446
1455
  Array.from(
1447
- s.values()
1456
+ i.values()
1448
1457
  ).map(
1449
1458
  (v) => v.mountAfterWordPressInstall(
1450
1459
  e.mount || []
@@ -1470,63 +1479,65 @@ async function Mt(e) {
1470
1479
  if (e.phpmyadmin && !await t.fileExists(
1471
1480
  `${ee}/index.php`
1472
1481
  )) {
1473
- const v = await Ze(), $ = await ae({ steps: v });
1482
+ const v = await et(), $ = await ae({ steps: v });
1474
1483
  await J($, t);
1475
1484
  }
1476
1485
  if (e.command === "build-snapshot") {
1477
- await Rt(t, e.outfile), i.printStatus(`Exported to ${e.outfile}`), await A();
1486
+ await Ft(t, e.outfile), s.printStatus(`Exported to ${e.outfile}`), await B();
1478
1487
  return;
1479
1488
  } else if (e.command === "run-blueprint") {
1480
- i.finishProgress("Done"), await A();
1489
+ s.finishProgress("Done"), await B();
1481
1490
  return;
1482
1491
  }
1483
1492
  }
1484
- if (i.finishProgress(), i.printReady(y, M), i.finishProgress(), i.printReady(y, M), e.phpmyadmin) {
1485
- const h = u.join(
1493
+ if (s.finishProgress(), s.printReady(y, R), e.phpmyadmin) {
1494
+ const f = u.join(
1486
1495
  e.phpmyadmin,
1487
- Je
1496
+ tt
1488
1497
  );
1489
- i.printPhpMyAdminUrl(
1490
- new URL(h, y).toString()
1498
+ s.printPhpMyAdminUrl(
1499
+ new URL(f, y).toString()
1491
1500
  );
1492
1501
  }
1493
- return e.xdebug && e.experimentalDevtools && (await Ne({
1502
+ return e.xdebug && e.experimentalDevtools && (await Ve({
1494
1503
  phpInstance: t,
1495
1504
  phpRoot: "/wordpress"
1496
1505
  })).start(), {
1497
1506
  playground: t,
1498
1507
  server: p,
1499
1508
  serverUrl: y,
1500
- [Symbol.asyncDispose]: A,
1509
+ [Symbol.asyncDispose]: B,
1501
1510
  [he]: {
1502
- workerThreadCount: M
1511
+ workerThreadCount: R
1503
1512
  }
1504
1513
  };
1505
- } catch (m) {
1514
+ } catch (h) {
1506
1515
  if (e.verbosity !== "debug")
1507
- throw m;
1516
+ throw h;
1508
1517
  let w = "";
1509
- throw await t?.fileExists(Q) && (w = await t.readFileAsText(Q)), await A(), new Error(w, { cause: m });
1518
+ throw await t?.fileExists(G) && (w = await t.readFileAsText(G)), await B(), new Error(w, { cause: h });
1510
1519
  }
1511
1520
  },
1512
1521
  async handleRequest(p) {
1513
1522
  if (!d)
1514
- return H.forHttpCode(
1523
+ return X.forHttpCode(
1515
1524
  502,
1516
1525
  "WordPress is not ready yet"
1517
1526
  );
1518
- if (S) {
1519
- S = !1;
1520
- const f = {
1527
+ if (x) {
1528
+ x = !1;
1529
+ const m = {
1521
1530
  "Content-Type": ["text/plain"],
1522
1531
  "Content-Length": ["0"],
1523
1532
  Location: [p.url]
1524
1533
  };
1525
1534
  return p.headers?.cookie?.includes(
1526
1535
  "playground_auto_login_already_happened"
1527
- ) && (f["Set-Cookie"] = [
1536
+ ) && (m["Set-Cookie"] = [
1528
1537
  "playground_auto_login_already_happened=1; Max-Age=0; Expires=Thu, 01 Jan 1970 00:00:00 GMT; Path=/"
1529
- ]), new H(302, f, new Uint8Array());
1538
+ ]), X.fromPHPResponse(
1539
+ new xe(302, m, new Uint8Array())
1540
+ );
1530
1541
  }
1531
1542
  r && (p = {
1532
1543
  ...p,
@@ -1540,24 +1551,26 @@ async function Mt(e) {
1540
1551
  cookie: r.getCookieRequestHeader()
1541
1552
  }
1542
1553
  });
1543
- const n = await t.request(p);
1544
- return r && (r.rememberCookiesFromResponseHeaders(
1545
- n.headers
1546
- ), delete n.headers["set-cookie"]), n;
1554
+ const a = await t.requestStreamed(p);
1555
+ if (r) {
1556
+ const m = await a.headers;
1557
+ r.rememberCookiesFromResponseHeaders(m), delete m["set-cookie"];
1558
+ }
1559
+ return a;
1547
1560
  }
1548
1561
  });
1549
- return x && e.command === "start" && !e.skipBrowser && Dt(x.serverUrl), x;
1562
+ return S && e.command === "start" && !e.skipBrowser && Ut(S.serverUrl), S;
1550
1563
  }
1551
- function Bt(e) {
1564
+ function Rt(e) {
1552
1565
  let t = { ...e, command: "server" };
1553
1566
  e.noAutoMount || (t.autoMount = u.resolve(process.cwd(), t.path ?? ""), t = ue(t), delete t.autoMount);
1554
- const r = se(
1567
+ const r = ie(
1555
1568
  t["mount-before-install"] || [],
1556
1569
  "/wordpress"
1557
- ) || se(t.mount || [], "/wordpress");
1570
+ ) || ie(t.mount || [], "/wordpress");
1558
1571
  if (r)
1559
1572
  console.log("Site files stored at:", r?.hostPath), e.reset && (console.log(""), console.log(
1560
- Et(
1573
+ At(
1561
1574
  "This site is not managed by Playground CLI and cannot be reset."
1562
1575
  )
1563
1576
  ), console.log(
@@ -1566,15 +1579,15 @@ function Bt(e) {
1566
1579
  "You may still remove the site's directory manually if you wish."
1567
1580
  ), process.exit(1));
1568
1581
  else {
1569
- const o = t.autoMount || process.cwd(), s = Xe("sha256").update(o).digest("hex"), i = V.homedir(), a = u.join(
1570
- i,
1582
+ const o = t.autoMount || process.cwd(), i = Ke("sha256").update(o).digest("hex"), s = j.homedir(), n = u.join(
1583
+ s,
1571
1584
  ".wordpress-playground/sites",
1572
- s
1585
+ i
1573
1586
  );
1574
- console.log("Site files stored at:", a), j(a) && e.reset && (console.log("Resetting site..."), Ee(a, { recursive: !0 })), N(a, { recursive: !0 }), t["mount-before-install"] = [
1587
+ console.log("Site files stored at:", n), O(n) && e.reset && (console.log("Resetting site..."), ke(n, { recursive: !0 })), _(n, { recursive: !0 }), t["mount-before-install"] = [
1575
1588
  ...t["mount-before-install"] || [],
1576
- { vfsPath: "/wordpress", hostPath: a }
1577
- ], t.wordpressInstallMode = ke(a).length === 0 ? (
1589
+ { vfsPath: "/wordpress", hostPath: n }
1590
+ ], t.wordpressInstallMode = Me(n).length === 0 ? (
1578
1591
  // Only download WordPress on the first run when the site directory is still
1579
1592
  // empty.
1580
1593
  "download-and-install"
@@ -1585,38 +1598,38 @@ function Bt(e) {
1585
1598
  }
1586
1599
  return t;
1587
1600
  }
1588
- const _ = new et();
1589
- function At(e, { onExit: t } = {}) {
1601
+ const H = new ot();
1602
+ function Wt(e, { onExit: t } = {}) {
1590
1603
  let r;
1591
- return e === "v1" ? r = new K(new URL("./worker-thread-v1.js", import.meta.url)) : r = new K(new URL("./worker-thread-v2.js", import.meta.url)), new Promise((o, s) => {
1592
- const i = _.claim();
1604
+ return e === "v1" ? r = new K(new URL("./worker-thread-v1.js", import.meta.url)) : r = new K(new URL("./worker-thread-v2.js", import.meta.url)), new Promise((o, i) => {
1605
+ const s = H.claim();
1593
1606
  r.once("message", function(l) {
1594
1607
  l.command === "worker-script-initialized" && o({
1595
- processId: i,
1608
+ processId: s,
1596
1609
  worker: r,
1597
1610
  phpPort: l.phpPort
1598
1611
  });
1599
1612
  }), r.once("error", function(l) {
1600
- _.release(i), console.error(l);
1613
+ H.release(s), console.error(l);
1601
1614
  const d = new Error(
1602
1615
  `Worker failed to load worker. ${l.message ? `Original error: ${l.message}` : ""}`
1603
1616
  );
1604
- s(d);
1617
+ i(d);
1605
1618
  });
1606
- let a = !1;
1619
+ let n = !1;
1607
1620
  r.once("spawn", () => {
1608
- a = !0;
1621
+ n = !0;
1609
1622
  }), r.once("exit", (l) => {
1610
- _.release(i), a || s(new Error(`Worker exited before spawning: ${l}`)), t?.(l);
1623
+ H.release(s), n || i(new Error(`Worker exited before spawning: ${l}`)), t?.(l);
1611
1624
  });
1612
1625
  });
1613
1626
  }
1614
- async function Ct(e) {
1627
+ async function Lt(e) {
1615
1628
  const { port1: t, port2: r } = new le();
1616
- return await Se(e, t), r;
1629
+ return await Ie(e, t), r;
1617
1630
  }
1618
- function Dt(e) {
1619
- const t = V.platform();
1631
+ function Ut(e) {
1632
+ const t = j.platform();
1620
1633
  let r;
1621
1634
  switch (t) {
1622
1635
  case "darwin":
@@ -1629,11 +1642,11 @@ function Dt(e) {
1629
1642
  r = `xdg-open "${e}"`;
1630
1643
  break;
1631
1644
  }
1632
- Oe(r, (o) => {
1645
+ Ye(r, (o) => {
1633
1646
  o && g.debug(`Could not open browser: ${o.message}`);
1634
1647
  });
1635
1648
  }
1636
- async function Rt(e, t) {
1649
+ async function Ft(e, t) {
1637
1650
  await e.run({
1638
1651
  code: `<?php
1639
1652
  $zip = new ZipArchive();
@@ -1659,12 +1672,12 @@ async function Rt(e, t) {
1659
1672
  }
1660
1673
  export {
1661
1674
  me as L,
1662
- nr as a,
1663
- It as b,
1675
+ cr as a,
1676
+ kt as b,
1664
1677
  he as i,
1665
1678
  pe as m,
1666
- ar as p,
1667
- Mt as r,
1668
- At as s
1679
+ mr as p,
1680
+ Dt as r,
1681
+ Wt as s
1669
1682
  };
1670
- //# sourceMappingURL=run-cli-BzYAH0YF.js.map
1683
+ //# sourceMappingURL=run-cli-C8e0UxH1.js.map