@wp-playground/cli 3.0.54 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blueprints-v1/blueprints-v1-handler.d.ts +4 -6
- package/blueprints-v1/worker-thread-v1.d.ts +15 -44
- package/blueprints-v2/blueprints-v2-handler.d.ts +5 -7
- package/blueprints-v2/worker-thread-v2.d.ts +10 -21
- package/cli.cjs +1 -1
- package/cli.js +1 -1
- package/index.cjs +1 -1
- package/index.js +1 -1
- package/load-balancer.d.ts +18 -11
- package/package.json +15 -18
- package/process-id-allocator.d.ts +9 -0
- package/run-cli-D-GS-Yv7.cjs +66 -0
- package/run-cli-D-GS-Yv7.cjs.map +1 -0
- package/{run-cli-Cxpf7CoX.js → run-cli-FHDubnX7.js} +591 -650
- package/run-cli-FHDubnX7.js.map +1 -0
- package/run-cli.d.ts +10 -6
- package/worker-thread-v1.cjs +2 -2
- package/worker-thread-v1.cjs.map +1 -1
- package/worker-thread-v1.js +90 -109
- package/worker-thread-v1.js.map +1 -1
- package/worker-thread-v2.cjs +8 -8
- package/worker-thread-v2.cjs.map +1 -1
- package/worker-thread-v2.js +187 -200
- package/worker-thread-v2.js.map +1 -1
- package/run-cli-Cxpf7CoX.js.map +0 -1
- package/run-cli-DHqpmO6s.cjs +0 -66
- package/run-cli-DHqpmO6s.cjs.map +0 -1
package/worker-thread-v2.js
CHANGED
|
@@ -1,59 +1,58 @@
|
|
|
1
|
-
import { logger as
|
|
2
|
-
import { createNodeFsMountHandler as
|
|
3
|
-
import { EmscriptenDownloadMonitor as
|
|
4
|
-
import { exposeAPI as
|
|
5
|
-
import { sprintf as
|
|
1
|
+
import { logger as T, errorLogPath as H } from "@php-wasm/logger";
|
|
2
|
+
import { createNodeFsMountHandler as W, loadNodeRuntime as M, bindUserSpace as $ } from "@php-wasm/node";
|
|
3
|
+
import { EmscriptenDownloadMonitor as I } from "@php-wasm/progress";
|
|
4
|
+
import { exposeAPI as v, PHPWorker as A, consumeAPISync as S, setPhpIniEntries as L, writeFiles as B, sandboxedSpawnHandlerFactory as C, PHPResponse as E, PHPExecutionFailureError as F, consumeAPI as g, releaseApiProxy as U } from "@php-wasm/universal";
|
|
5
|
+
import { joinPaths as q, sprintf as D } from "@php-wasm/util";
|
|
6
6
|
import { runBlueprintV2 as O } from "@wp-playground/blueprints";
|
|
7
|
-
import {
|
|
8
|
-
import { existsSync as
|
|
9
|
-
import
|
|
10
|
-
import { rootCertificates as
|
|
11
|
-
import { MessageChannel as
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
for (const r of e)
|
|
7
|
+
import { setupPlatformLevelMuPlugins as j, preloadPhpInfoRoute as V, bootRequestHandler as N } from "@wp-playground/wordpress";
|
|
8
|
+
import { existsSync as G } from "fs";
|
|
9
|
+
import m from "path";
|
|
10
|
+
import { rootCertificates as Y } from "tls";
|
|
11
|
+
import { MessageChannel as z, parentPort as K } from "worker_threads";
|
|
12
|
+
import { s as J, b as Q } from "./run-cli-FHDubnX7.js";
|
|
13
|
+
async function b(s, e) {
|
|
14
|
+
for (const t of e)
|
|
16
15
|
try {
|
|
17
|
-
s.mkdir(
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
s.mkdir(t.vfsPath), await s.mount(
|
|
17
|
+
t.vfsPath,
|
|
18
|
+
W(t.hostPath)
|
|
20
19
|
);
|
|
21
20
|
} catch {
|
|
22
|
-
|
|
23
|
-
`\x1B[31m\x1B[1mError mounting path ${
|
|
21
|
+
a.stderr(
|
|
22
|
+
`\x1B[31m\x1B[1mError mounting path ${t.hostPath} at ${t.vfsPath}\x1B[0m
|
|
24
23
|
`
|
|
25
24
|
), process.exit(1);
|
|
26
25
|
}
|
|
27
26
|
}
|
|
28
|
-
function
|
|
27
|
+
function X(s, e, ...t) {
|
|
29
28
|
console.log(
|
|
30
29
|
performance.now().toFixed(6).padStart(15, "0"),
|
|
31
30
|
s.toString().padStart(16, "0"),
|
|
32
|
-
|
|
31
|
+
D(e, ...t)
|
|
33
32
|
);
|
|
34
33
|
}
|
|
35
34
|
Object.defineProperty(process.stdout, "isTTY", { value: !0 });
|
|
36
35
|
Object.defineProperty(process.stderr, "isTTY", { value: !0 });
|
|
37
|
-
const
|
|
36
|
+
const a = {
|
|
38
37
|
lastWriteWasProgress: !1,
|
|
39
38
|
progress(s) {
|
|
40
|
-
|
|
41
|
-
`), process.stdout.write("\r\x1B[K" + s),
|
|
39
|
+
Q(process.stdout) && (process.stdout.isTTY ? (a.lastWriteWasProgress || process.stdout.write(`
|
|
40
|
+
`), process.stdout.write("\r\x1B[K" + s), a.lastWriteWasProgress = !0) : console.log(s));
|
|
42
41
|
},
|
|
43
42
|
stdout(s) {
|
|
44
43
|
process.stdout.write(`
|
|
45
44
|
|
|
46
45
|
|
|
47
|
-
`),
|
|
46
|
+
`), a.lastWriteWasProgress && (a.lastWriteWasProgress = !1), process.stdout.write(s);
|
|
48
47
|
},
|
|
49
48
|
stderr(s) {
|
|
50
49
|
process.stdout.write(`
|
|
51
50
|
|
|
52
51
|
|
|
53
|
-
`),
|
|
52
|
+
`), a.lastWriteWasProgress && (a.lastWriteWasProgress = !1), process.stderr.write(s);
|
|
54
53
|
}
|
|
55
54
|
};
|
|
56
|
-
class
|
|
55
|
+
class Z extends A {
|
|
57
56
|
constructor(e) {
|
|
58
57
|
super(void 0, e), this.booted = !1, this.blueprintTargetResolved = !1, this.phpInstancesThatNeedMountsAfterTargetResolved = /* @__PURE__ */ new Set();
|
|
59
58
|
}
|
|
@@ -67,76 +66,67 @@ class Q extends L {
|
|
|
67
66
|
* @see phpwasm-emscripten-library-file-locking-for-node.js
|
|
68
67
|
*/
|
|
69
68
|
async useFileLockManager(e) {
|
|
70
|
-
|
|
69
|
+
this.fileLockManager = await S(e);
|
|
71
70
|
}
|
|
72
|
-
async
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
71
|
+
async bootWordPress(e, t) {
|
|
72
|
+
const o = await this.__internal_getRequestHandler().getPrimaryPhp();
|
|
73
|
+
if (o.defineConstant("WP_DEBUG", "true"), o.defineConstant("WP_DEBUG_LOG", "true"), o.defineConstant("WP_DEBUG_DISPLAY", "false"), o.defineConstant("WP_HOME", e.siteUrl), o.defineConstant("WP_SITEURL", e.siteUrl), await L(o, {
|
|
74
|
+
"openssl.cafile": "/internal/shared/ca-bundle.crt",
|
|
75
|
+
allow_url_fopen: "1",
|
|
76
|
+
disable_functions: ""
|
|
77
|
+
}), await j(o), await B(o, "/", {
|
|
78
|
+
"/internal/shared/ca-bundle.crt": Y.join(`
|
|
79
79
|
`)
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
this.phpInstancesThatNeedMountsAfterTargetResolved.delete(
|
|
88
|
-
o
|
|
89
|
-
);
|
|
90
|
-
}));
|
|
91
|
-
},
|
|
92
|
-
spawnHandler: () => x(
|
|
93
|
-
() => T(e, this.fileLockManager)
|
|
94
|
-
)
|
|
95
|
-
};
|
|
96
|
-
await this.bootRequestHandler(c);
|
|
97
|
-
const p = this.__internal_getPHP();
|
|
98
|
-
if (e.mode === "mount-only") {
|
|
99
|
-
await m(p, e.mountsAfterWpInstall || []);
|
|
80
|
+
}), await V(
|
|
81
|
+
o,
|
|
82
|
+
q(new URL(e.siteUrl).pathname, "phpinfo.php")
|
|
83
|
+
), e.mode === "mount-only") {
|
|
84
|
+
await this.applyPostInstallMountsToAllWorkers(
|
|
85
|
+
t
|
|
86
|
+
);
|
|
100
87
|
return;
|
|
101
88
|
}
|
|
102
|
-
await this.runBlueprintV2(
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
89
|
+
await this.runBlueprintV2(
|
|
90
|
+
{
|
|
91
|
+
// TODO: Do we really want to create a new object or can we pass args directly?
|
|
92
|
+
...e
|
|
93
|
+
},
|
|
94
|
+
t
|
|
95
|
+
);
|
|
106
96
|
}
|
|
107
97
|
async bootWorker(e) {
|
|
108
98
|
await this.bootRequestHandler({
|
|
109
99
|
...e,
|
|
110
|
-
onPHPInstanceCreated: async (
|
|
111
|
-
await
|
|
100
|
+
onPHPInstanceCreated: async (t) => {
|
|
101
|
+
await b(t, e.mountsBeforeWpInstall || []), await b(t, e.mountsAfterWpInstall || []), t.isDir("/wordpress/wp-content") || t.mkdir("/wordpress/wp-content"), t.isDir("/wordpress/wp-content/database") || t.mkdir("/wordpress/wp-content/database"), t.isFile("/wordpress/wp-content/database/.htaccess") || t.writeFile(
|
|
112
102
|
"/wordpress/wp-content/database/.htaccess",
|
|
113
103
|
"deny from all"
|
|
114
|
-
),
|
|
104
|
+
), t.isFile("/wordpress/wp-content/database/index.php") || t.writeFile(
|
|
115
105
|
"/wordpress/wp-content/database/index.php",
|
|
116
106
|
"deny from all"
|
|
117
107
|
);
|
|
118
108
|
},
|
|
119
|
-
spawnHandler: () =>
|
|
120
|
-
() =>
|
|
109
|
+
spawnHandler: () => C(
|
|
110
|
+
() => ee(e, this.fileLockManager)
|
|
121
111
|
)
|
|
122
112
|
});
|
|
123
113
|
}
|
|
124
|
-
async runBlueprintV2(e) {
|
|
125
|
-
const
|
|
126
|
-
let
|
|
114
|
+
async runBlueprintV2(e, t) {
|
|
115
|
+
const o = this.__internal_getRequestHandler(), { php: u, reap: h } = await o.instanceManager.acquirePHPInstance(), w = this.__internal_getPHP();
|
|
116
|
+
let f = () => {
|
|
127
117
|
};
|
|
128
118
|
if (typeof e.blueprint == "string") {
|
|
129
|
-
const n =
|
|
130
|
-
|
|
119
|
+
const n = m.resolve(process.cwd(), e.blueprint);
|
|
120
|
+
G(n) && (w.mkdir("/internal/shared/cwd"), f = await w.mount(
|
|
131
121
|
"/internal/shared/cwd",
|
|
132
|
-
|
|
133
|
-
), e.blueprint =
|
|
122
|
+
W(m.dirname(n))
|
|
123
|
+
), e.blueprint = m.join(
|
|
134
124
|
"/internal/shared/cwd",
|
|
135
|
-
|
|
125
|
+
m.basename(e.blueprint)
|
|
136
126
|
));
|
|
137
127
|
}
|
|
138
128
|
try {
|
|
139
|
-
const
|
|
129
|
+
const i = [
|
|
140
130
|
"mode",
|
|
141
131
|
"db-engine",
|
|
142
132
|
"db-host",
|
|
@@ -146,47 +136,40 @@ class Q extends L {
|
|
|
146
136
|
"db-path",
|
|
147
137
|
"truncate-new-site-directory",
|
|
148
138
|
"allow"
|
|
149
|
-
].filter((
|
|
150
|
-
|
|
151
|
-
const
|
|
152
|
-
php:
|
|
139
|
+
].filter((r) => r in e).map((r) => `--${r}=${e[r]}`);
|
|
140
|
+
i.push(`--site-url=${e.siteUrl}`);
|
|
141
|
+
const l = await O({
|
|
142
|
+
php: u,
|
|
153
143
|
blueprint: e.blueprint,
|
|
154
144
|
blueprintOverrides: {
|
|
155
145
|
additionalSteps: e["additional-blueprint-steps"],
|
|
156
146
|
wordpressVersion: e.wp
|
|
157
147
|
},
|
|
158
|
-
cliArgs:
|
|
159
|
-
onMessage: async (
|
|
160
|
-
switch (
|
|
148
|
+
cliArgs: i,
|
|
149
|
+
onMessage: async (r) => {
|
|
150
|
+
switch (r.type) {
|
|
161
151
|
case "blueprint.target_resolved": {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
this.phpInstancesThatNeedMountsAfterTargetResolved.delete(
|
|
166
|
-
a
|
|
167
|
-
), await m(
|
|
168
|
-
a,
|
|
169
|
-
e.mountsAfterWpInstall || []
|
|
170
|
-
);
|
|
171
|
-
}
|
|
152
|
+
this.blueprintTargetResolved || (this.blueprintTargetResolved = !0, await this.applyPostInstallMountsToAllWorkers(
|
|
153
|
+
t
|
|
154
|
+
));
|
|
172
155
|
break;
|
|
173
156
|
}
|
|
174
157
|
case "blueprint.progress": {
|
|
175
|
-
const
|
|
158
|
+
const p = `${r.caption.trim()} – ${r.progress.toFixed(
|
|
176
159
|
2
|
|
177
160
|
)}%`;
|
|
178
|
-
|
|
161
|
+
a.progress(p);
|
|
179
162
|
break;
|
|
180
163
|
}
|
|
181
164
|
case "blueprint.error": {
|
|
182
|
-
const
|
|
183
|
-
e.verbosity === "debug" &&
|
|
184
|
-
`${
|
|
185
|
-
at ${
|
|
186
|
-
` + (
|
|
165
|
+
const p = "\x1B[31m", c = "\x1B[1m", d = "\x1B[0m";
|
|
166
|
+
e.verbosity === "debug" && r.details ? a.stderr(
|
|
167
|
+
`${p}${c}Fatal error:${d} Uncaught ${r.details.exception}: ${r.details.message}
|
|
168
|
+
at ${r.details.file}:${r.details.line}
|
|
169
|
+
` + (r.details.trace ? r.details.trace + `
|
|
187
170
|
` : "")
|
|
188
|
-
) :
|
|
189
|
-
`${
|
|
171
|
+
) : a.stderr(
|
|
172
|
+
`${p}${c}Error:${d} ${r.message}
|
|
190
173
|
`
|
|
191
174
|
);
|
|
192
175
|
break;
|
|
@@ -194,169 +177,173 @@ class Q extends L {
|
|
|
194
177
|
}
|
|
195
178
|
}
|
|
196
179
|
});
|
|
197
|
-
if (e.verbosity === "debug" && (
|
|
180
|
+
if (e.verbosity === "debug" && (l.stdout.pipeTo(
|
|
198
181
|
new WritableStream({
|
|
199
|
-
write(
|
|
200
|
-
process.stdout.write(
|
|
182
|
+
write(r) {
|
|
183
|
+
process.stdout.write(r);
|
|
201
184
|
}
|
|
202
185
|
})
|
|
203
|
-
),
|
|
186
|
+
), l.stderr.pipeTo(
|
|
204
187
|
new WritableStream({
|
|
205
|
-
write(
|
|
206
|
-
process.stderr.write(
|
|
188
|
+
write(r) {
|
|
189
|
+
process.stderr.write(r);
|
|
207
190
|
}
|
|
208
191
|
})
|
|
209
|
-
)), await
|
|
210
|
-
const
|
|
211
|
-
throw new
|
|
212
|
-
`PHP.run() failed with exit code ${
|
|
213
|
-
|
|
192
|
+
)), await l.finished, await l.exitCode !== 0) {
|
|
193
|
+
const r = await E.fromStreamedResponse(l);
|
|
194
|
+
throw new F(
|
|
195
|
+
`PHP.run() failed with exit code ${r.exitCode}. ${r.errors} ${r.text}`,
|
|
196
|
+
r,
|
|
214
197
|
"request"
|
|
215
198
|
);
|
|
216
199
|
}
|
|
217
200
|
} catch (n) {
|
|
218
|
-
let
|
|
201
|
+
let i = "";
|
|
219
202
|
try {
|
|
220
|
-
|
|
203
|
+
i = u.readFileAsText(H);
|
|
221
204
|
} catch {
|
|
222
205
|
}
|
|
223
|
-
throw n.phpLogs =
|
|
206
|
+
throw n.phpLogs = i, n;
|
|
224
207
|
} finally {
|
|
225
|
-
|
|
208
|
+
h(), f();
|
|
226
209
|
}
|
|
227
210
|
}
|
|
228
211
|
async bootRequestHandler({
|
|
229
212
|
siteUrl: e,
|
|
230
|
-
allow:
|
|
231
|
-
phpVersion:
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
spawnHandler: v
|
|
213
|
+
allow: t,
|
|
214
|
+
phpVersion: o,
|
|
215
|
+
processId: u,
|
|
216
|
+
createFiles: h,
|
|
217
|
+
constants: w,
|
|
218
|
+
phpIniEntries: f,
|
|
219
|
+
trace: n,
|
|
220
|
+
nativeInternalDirPath: i,
|
|
221
|
+
withIntl: l,
|
|
222
|
+
withRedis: r,
|
|
223
|
+
withMemcached: p,
|
|
224
|
+
withXdebug: c,
|
|
225
|
+
pathAliases: d,
|
|
226
|
+
onPHPInstanceCreated: k,
|
|
227
|
+
spawnHandler: x
|
|
246
228
|
}) {
|
|
247
229
|
if (this.booted)
|
|
248
230
|
throw new Error("Playground already booted");
|
|
249
231
|
this.booted = !0;
|
|
250
|
-
let y = n;
|
|
251
|
-
const H = n + l - 1;
|
|
252
232
|
try {
|
|
253
|
-
const P = await
|
|
233
|
+
const P = await N({
|
|
254
234
|
siteUrl: e,
|
|
255
|
-
createPhpRuntime: async () => {
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
ENV: {
|
|
263
|
-
DOCROOT: "/wordpress"
|
|
264
|
-
},
|
|
265
|
-
phpWasmInitOptions: { nativeInternalDirPath: t }
|
|
235
|
+
createPhpRuntime: async () => await M(o, {
|
|
236
|
+
fileLockManager: this.fileLockManager,
|
|
237
|
+
emscriptenOptions: {
|
|
238
|
+
processId: u,
|
|
239
|
+
trace: n ? X : void 0,
|
|
240
|
+
ENV: {
|
|
241
|
+
DOCROOT: "/wordpress"
|
|
266
242
|
},
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
243
|
+
nativeInternalDirPath: i,
|
|
244
|
+
bindUserSpace: (R) => $(
|
|
245
|
+
{
|
|
246
|
+
fileLockManager: this.fileLockManager
|
|
247
|
+
},
|
|
248
|
+
R
|
|
249
|
+
)
|
|
250
|
+
},
|
|
251
|
+
followSymlinks: t?.includes("follow-symlinks"),
|
|
252
|
+
withIntl: l,
|
|
253
|
+
withRedis: r,
|
|
254
|
+
withMemcached: p,
|
|
255
|
+
withXdebug: c
|
|
256
|
+
}),
|
|
274
257
|
maxPhpInstances: 1,
|
|
275
|
-
onPHPInstanceCreated:
|
|
258
|
+
onPHPInstanceCreated: k,
|
|
276
259
|
sapiName: "cli",
|
|
277
|
-
createFiles:
|
|
278
|
-
constants:
|
|
279
|
-
phpIniEntries:
|
|
280
|
-
pathAliases:
|
|
260
|
+
createFiles: h,
|
|
261
|
+
constants: w,
|
|
262
|
+
phpIniEntries: f,
|
|
263
|
+
pathAliases: d,
|
|
281
264
|
cookieStore: !1,
|
|
282
|
-
spawnHandler:
|
|
265
|
+
spawnHandler: x
|
|
283
266
|
});
|
|
284
267
|
this.__internal_setRequestHandler(P);
|
|
285
|
-
const
|
|
286
|
-
await this.setPrimaryPHP(
|
|
268
|
+
const _ = await P.getPrimaryPhp();
|
|
269
|
+
await this.setPrimaryPHP(_), te();
|
|
287
270
|
} catch (P) {
|
|
288
|
-
throw
|
|
271
|
+
throw re(P), P;
|
|
289
272
|
}
|
|
290
273
|
}
|
|
274
|
+
async mountAfterWordPressInstall(e) {
|
|
275
|
+
await b(this.__internal_getPHP(), e);
|
|
276
|
+
}
|
|
277
|
+
async applyPostInstallMountsToAllWorkers(e) {
|
|
278
|
+
const t = g(e);
|
|
279
|
+
await t(), t[U]();
|
|
280
|
+
}
|
|
291
281
|
// Provide a named disposal method that can be invoked via comlink.
|
|
292
282
|
async dispose() {
|
|
293
283
|
await this[Symbol.asyncDispose]();
|
|
294
284
|
}
|
|
295
285
|
}
|
|
296
|
-
async function
|
|
286
|
+
async function ee({
|
|
297
287
|
siteUrl: s,
|
|
298
288
|
allow: e,
|
|
299
|
-
phpVersion:
|
|
300
|
-
createFiles:
|
|
301
|
-
constants:
|
|
302
|
-
phpIniEntries:
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
const b = await K("v2"), h = I(
|
|
313
|
-
b.phpPort
|
|
289
|
+
phpVersion: t,
|
|
290
|
+
createFiles: o,
|
|
291
|
+
constants: u,
|
|
292
|
+
phpIniEntries: h,
|
|
293
|
+
trace: w,
|
|
294
|
+
nativeInternalDirPath: f,
|
|
295
|
+
withXdebug: n,
|
|
296
|
+
pathAliases: i,
|
|
297
|
+
mountsBeforeWpInstall: l,
|
|
298
|
+
mountsAfterWpInstall: r
|
|
299
|
+
}, p) {
|
|
300
|
+
const c = await J("v2"), d = g(
|
|
301
|
+
c.phpPort
|
|
314
302
|
);
|
|
315
|
-
return
|
|
303
|
+
return d.useFileLockManager(p), await d.bootWorker({
|
|
316
304
|
siteUrl: s,
|
|
317
305
|
allow: e,
|
|
318
|
-
phpVersion:
|
|
319
|
-
createFiles:
|
|
320
|
-
constants:
|
|
321
|
-
phpIniEntries:
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
mountsAfterWpInstall: f
|
|
306
|
+
phpVersion: t,
|
|
307
|
+
createFiles: o,
|
|
308
|
+
constants: u,
|
|
309
|
+
phpIniEntries: h,
|
|
310
|
+
processId: c.processId,
|
|
311
|
+
trace: w,
|
|
312
|
+
nativeInternalDirPath: f,
|
|
313
|
+
withXdebug: n,
|
|
314
|
+
pathAliases: i,
|
|
315
|
+
mountsBeforeWpInstall: l,
|
|
316
|
+
mountsAfterWpInstall: r
|
|
330
317
|
}), {
|
|
331
|
-
php:
|
|
318
|
+
php: d,
|
|
332
319
|
reap: () => {
|
|
333
320
|
try {
|
|
334
|
-
|
|
321
|
+
d.dispose();
|
|
335
322
|
} catch {
|
|
336
323
|
}
|
|
337
324
|
try {
|
|
338
|
-
|
|
325
|
+
c.worker.terminate();
|
|
339
326
|
} catch {
|
|
340
327
|
}
|
|
341
328
|
}
|
|
342
329
|
};
|
|
343
330
|
}
|
|
344
331
|
process.on("unhandledRejection", (s) => {
|
|
345
|
-
|
|
332
|
+
T.error("Unhandled rejection:", s);
|
|
346
333
|
});
|
|
347
|
-
const
|
|
348
|
-
new
|
|
334
|
+
const y = new z(), [te, re] = v(
|
|
335
|
+
new Z(new I()),
|
|
349
336
|
void 0,
|
|
350
|
-
|
|
337
|
+
y.port1
|
|
351
338
|
);
|
|
352
|
-
|
|
339
|
+
K?.postMessage(
|
|
353
340
|
{
|
|
354
341
|
command: "worker-script-initialized",
|
|
355
|
-
phpPort:
|
|
342
|
+
phpPort: y.port2
|
|
356
343
|
},
|
|
357
|
-
[
|
|
344
|
+
[y.port2]
|
|
358
345
|
);
|
|
359
346
|
export {
|
|
360
|
-
|
|
347
|
+
Z as PlaygroundCliBlueprintV2Worker
|
|
361
348
|
};
|
|
362
349
|
//# sourceMappingURL=worker-thread-v2.js.map
|