@php-wasm/web 0.9.46 → 1.0.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/index.js +79 -133
- package/lib/get-php-loader-module.d.ts +1 -1
- package/lib/index.d.ts +0 -1
- package/package.json +7 -7
- package/{kitchen-sink → php/asyncify}/7_0_33/php_7_0.wasm +0 -0
- package/{kitchen-sink → php/asyncify}/7_1_30/php_7_1.wasm +0 -0
- package/{kitchen-sink → php/asyncify}/7_2_34/php_7_2.wasm +0 -0
- package/{kitchen-sink → php/asyncify}/7_3_33/php_7_3.wasm +0 -0
- package/{kitchen-sink → php/asyncify}/7_4_33/php_7_4.wasm +0 -0
- package/{kitchen-sink → php/asyncify}/8_0_30/php_8_0.wasm +0 -0
- package/{kitchen-sink → php/asyncify}/8_1_23/php_8_1.wasm +0 -0
- package/{kitchen-sink → php/asyncify}/8_2_10/php_8_2.wasm +0 -0
- package/{kitchen-sink → php/asyncify}/8_3_0/php_8_3.wasm +0 -0
- package/php/asyncify/php_7_0.js +105 -0
- package/php/asyncify/php_7_1.js +105 -0
- package/php/asyncify/php_7_2.js +105 -0
- package/php/asyncify/php_7_3.js +105 -0
- package/php/asyncify/php_7_4.js +105 -0
- package/php/asyncify/php_8_0.js +105 -0
- package/php/asyncify/php_8_1.js +105 -0
- package/php/asyncify/php_8_2.js +105 -0
- package/php/asyncify/php_8_3.js +105 -0
- package/php/jspi/7_0_33/php_7_0.wasm +0 -0
- package/php/jspi/7_1_30/php_7_1.wasm +0 -0
- package/php/jspi/7_2_34/php_7_2.wasm +0 -0
- package/php/jspi/7_3_33/php_7_3.wasm +0 -0
- package/php/jspi/7_4_33/php_7_4.wasm +0 -0
- package/php/jspi/8_0_30/php_8_0.wasm +0 -0
- package/php/jspi/8_1_23/php_8_1.wasm +0 -0
- package/php/jspi/8_2_10/php_8_2.wasm +0 -0
- package/php/jspi/8_3_0/php_8_3.wasm +0 -0
- package/php/jspi/php_7_0.js +105 -0
- package/php/jspi/php_7_1.js +105 -0
- package/php/jspi/php_7_2.js +105 -0
- package/php/jspi/php_7_3.js +105 -0
- package/php/jspi/php_7_4.js +105 -0
- package/php/jspi/php_8_0.js +105 -0
- package/php/jspi/php_8_1.js +105 -0
- package/php/jspi/php_8_2.js +105 -0
- package/php/jspi/php_8_3.js +105 -0
- package/kitchen-sink/8_3/php_8_3.wasm +0 -0
- package/kitchen-sink/php_7_0.js +0 -105
- package/kitchen-sink/php_7_1.js +0 -105
- package/kitchen-sink/php_7_2.js +0 -105
- package/kitchen-sink/php_7_3.js +0 -105
- package/kitchen-sink/php_7_4.js +0 -105
- package/kitchen-sink/php_8_0.js +0 -105
- package/kitchen-sink/php_8_1.js +0 -105
- package/kitchen-sink/php_8_2.js +0 -105
- package/kitchen-sink/php_8_3.js +0 -105
- package/lib/register-service-worker.d.ts +0 -33
- package/light/7_0_33/php_7_0.wasm +0 -0
- package/light/7_1_30/php_7_1.wasm +0 -0
- package/light/7_2_34/php_7_2.wasm +0 -0
- package/light/7_3_33/php_7_3.wasm +0 -0
- package/light/7_4_33/php_7_4.wasm +0 -0
- package/light/8_0_30/php_8_0.wasm +0 -0
- package/light/8_1_23/php_8_1.wasm +0 -0
- package/light/8_2_10/php_8_2.wasm +0 -0
- package/light/8_3/php_8_3.wasm +0 -0
- package/light/8_3_0/php_8_3.wasm +0 -0
- package/light/php_7_0.js +0 -105
- package/light/php_7_1.js +0 -105
- package/light/php_7_2.js +0 -105
- package/light/php_7_3.js +0 -105
- package/light/php_7_4.js +0 -105
- package/light/php_8_0.js +0 -105
- package/light/php_8_1.js +0 -105
- package/light/php_8_2.js +0 -105
- package/light/php_8_3.js +0 -105
package/index.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { PHPResponse as
|
|
1
|
+
import { PHPResponse as R, LatestSupportedPHPVersion as b, loadPHPRuntime as z, FSHelpers as p, __private__dont__use as g } from "@php-wasm/universal";
|
|
2
2
|
import * as f from "comlink";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { jspi as L } from "wasm-feature-detect";
|
|
4
|
+
import { Semaphore as O, joinPaths as k } from "@php-wasm/util";
|
|
5
5
|
import { logger as h } from "@php-wasm/logger";
|
|
6
|
-
import { journalFSEvents as
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
const e = r instanceof Worker ? r : f.windowEndpoint(r, t), n = f.wrap(e), a =
|
|
6
|
+
import { journalFSEvents as v } from "@php-wasm/fs-journal";
|
|
7
|
+
function B(r, t = void 0) {
|
|
8
|
+
W();
|
|
9
|
+
const e = r instanceof Worker ? r : f.windowEndpoint(r, t), n = f.wrap(e), a = y(n);
|
|
10
10
|
return new Proxy(a, {
|
|
11
11
|
get: (i, s) => s === "isConnected" ? async () => {
|
|
12
12
|
for (; ; )
|
|
13
13
|
try {
|
|
14
|
-
await
|
|
14
|
+
await S(n.isConnected(), 200);
|
|
15
15
|
break;
|
|
16
16
|
} catch {
|
|
17
17
|
}
|
|
18
18
|
} : n[s]
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
-
async function
|
|
21
|
+
async function S(r, t) {
|
|
22
22
|
return new Promise((e, n) => {
|
|
23
23
|
setTimeout(n, t), r.then(e);
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
|
|
26
|
+
function G(r, t) {
|
|
27
|
+
W();
|
|
28
28
|
const e = Promise.resolve();
|
|
29
29
|
let n, a;
|
|
30
30
|
const i = new Promise((c, u) => {
|
|
31
31
|
n = c, a = u;
|
|
32
|
-
}), s =
|
|
32
|
+
}), s = y(r), o = new Proxy(s, {
|
|
33
33
|
get: (c, u) => u === "isConnected" ? () => e : u === "isReady" ? () => i : u in c ? c[u] : t == null ? void 0 : t[u]
|
|
34
34
|
});
|
|
35
35
|
return f.expose(
|
|
@@ -37,11 +37,11 @@ function X(r, t) {
|
|
|
37
37
|
typeof window < "u" ? f.windowEndpoint(self.parent) : void 0
|
|
38
38
|
), [n, a, o];
|
|
39
39
|
}
|
|
40
|
-
let
|
|
41
|
-
function
|
|
42
|
-
if (
|
|
40
|
+
let P = !1;
|
|
41
|
+
function W() {
|
|
42
|
+
if (P)
|
|
43
43
|
return;
|
|
44
|
-
|
|
44
|
+
P = !0, f.transferHandlers.set("EVENT", {
|
|
45
45
|
canHandle: (e) => e instanceof CustomEvent,
|
|
46
46
|
serialize: (e) => [
|
|
47
47
|
{
|
|
@@ -65,7 +65,7 @@ function v() {
|
|
|
65
65
|
return [e.toRawData(), []];
|
|
66
66
|
},
|
|
67
67
|
deserialize(e) {
|
|
68
|
-
return
|
|
68
|
+
return R.fromRawData(e);
|
|
69
69
|
}
|
|
70
70
|
});
|
|
71
71
|
const r = f.transferHandlers.get("throw"), t = r == null ? void 0 : r.serialize;
|
|
@@ -74,14 +74,14 @@ function v() {
|
|
|
74
74
|
return e.response && (n[0].value.response = e.response), e.source && (n[0].value.source = e.source), n;
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function y(r) {
|
|
78
78
|
return new Proxy(r, {
|
|
79
79
|
get(t, e) {
|
|
80
80
|
switch (typeof t[e]) {
|
|
81
81
|
case "function":
|
|
82
82
|
return (...n) => t[e](...n);
|
|
83
83
|
case "object":
|
|
84
|
-
return t[e] === null ? t[e] :
|
|
84
|
+
return t[e] === null ? t[e] : y(t[e]);
|
|
85
85
|
case "undefined":
|
|
86
86
|
case "number":
|
|
87
87
|
case "string":
|
|
@@ -92,52 +92,52 @@ function g(r) {
|
|
|
92
92
|
}
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
|
-
async function
|
|
96
|
-
if (
|
|
95
|
+
async function M(r = b) {
|
|
96
|
+
if (await L())
|
|
97
97
|
switch (r) {
|
|
98
98
|
case "8.3":
|
|
99
|
-
return await import("./
|
|
99
|
+
return await import("./jspi/php_8_3.js");
|
|
100
100
|
case "8.2":
|
|
101
|
-
return await import("./
|
|
101
|
+
return await import("./jspi/php_8_2.js");
|
|
102
102
|
case "8.1":
|
|
103
|
-
return await import("./
|
|
103
|
+
return await import("./jspi/php_8_1.js");
|
|
104
104
|
case "8.0":
|
|
105
|
-
return await import("./
|
|
105
|
+
return await import("./jspi/php_8_0.js");
|
|
106
106
|
case "7.4":
|
|
107
|
-
return await import("./
|
|
107
|
+
return await import("./jspi/php_7_4.js");
|
|
108
108
|
case "7.3":
|
|
109
|
-
return await import("./
|
|
109
|
+
return await import("./jspi/php_7_3.js");
|
|
110
110
|
case "7.2":
|
|
111
|
-
return await import("./
|
|
111
|
+
return await import("./jspi/php_7_2.js");
|
|
112
112
|
case "7.1":
|
|
113
|
-
return await import("./
|
|
113
|
+
return await import("./jspi/php_7_1.js");
|
|
114
114
|
case "7.0":
|
|
115
|
-
return await import("./
|
|
115
|
+
return await import("./jspi/php_7_0.js");
|
|
116
116
|
}
|
|
117
117
|
else
|
|
118
118
|
switch (r) {
|
|
119
119
|
case "8.3":
|
|
120
|
-
return await import("./
|
|
120
|
+
return await import("./asyncify/php_8_3.js");
|
|
121
121
|
case "8.2":
|
|
122
|
-
return await import("./
|
|
122
|
+
return await import("./asyncify/php_8_2.js");
|
|
123
123
|
case "8.1":
|
|
124
|
-
return await import("./
|
|
124
|
+
return await import("./asyncify/php_8_1.js");
|
|
125
125
|
case "8.0":
|
|
126
|
-
return await import("./
|
|
126
|
+
return await import("./asyncify/php_8_0.js");
|
|
127
127
|
case "7.4":
|
|
128
|
-
return await import("./
|
|
128
|
+
return await import("./asyncify/php_7_4.js");
|
|
129
129
|
case "7.3":
|
|
130
|
-
return await import("./
|
|
130
|
+
return await import("./asyncify/php_7_3.js");
|
|
131
131
|
case "7.2":
|
|
132
|
-
return await import("./
|
|
132
|
+
return await import("./asyncify/php_7_2.js");
|
|
133
133
|
case "7.1":
|
|
134
|
-
return await import("./
|
|
134
|
+
return await import("./asyncify/php_7_1.js");
|
|
135
135
|
case "7.0":
|
|
136
|
-
return await import("./
|
|
136
|
+
return await import("./asyncify/php_7_0.js");
|
|
137
137
|
}
|
|
138
138
|
throw new Error(`Unsupported PHP version ${r}`);
|
|
139
139
|
}
|
|
140
|
-
const
|
|
140
|
+
const I = () => ({
|
|
141
141
|
websocket: {
|
|
142
142
|
decorator: (r) => class extends r {
|
|
143
143
|
constructor() {
|
|
@@ -152,67 +152,15 @@ const _ = () => ({
|
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
});
|
|
155
|
-
async function
|
|
156
|
-
var
|
|
157
|
-
const e =
|
|
158
|
-
return (
|
|
155
|
+
async function Q(r, t = {}) {
|
|
156
|
+
var n;
|
|
157
|
+
const e = await M(r);
|
|
158
|
+
return (n = t.onPhpLoaderModuleLoaded) == null || n.call(t, e), await z(e, {
|
|
159
159
|
...t.emscriptenOptions || {},
|
|
160
|
-
...
|
|
160
|
+
...I()
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
|
-
|
|
164
|
-
const $ = new Promise((r) => {
|
|
165
|
-
b = r;
|
|
166
|
-
});
|
|
167
|
-
function ee(r) {
|
|
168
|
-
if (!r)
|
|
169
|
-
throw new y("PHP API client must be a valid client object.");
|
|
170
|
-
b(r);
|
|
171
|
-
}
|
|
172
|
-
async function te(r) {
|
|
173
|
-
const t = navigator.serviceWorker;
|
|
174
|
-
if (!t)
|
|
175
|
-
throw window.isSecureContext ? new y(
|
|
176
|
-
"Service workers are not supported in your browser."
|
|
177
|
-
) : new y(
|
|
178
|
-
"WordPress Playground uses service workers and may only work on HTTPS and http://localhost/ sites, but the current site is neither."
|
|
179
|
-
);
|
|
180
|
-
const e = await t.register(r, {
|
|
181
|
-
type: "module",
|
|
182
|
-
// Always bypass HTTP cache when fetching the new Service Worker script:
|
|
183
|
-
updateViaCache: "none"
|
|
184
|
-
});
|
|
185
|
-
try {
|
|
186
|
-
await e.update();
|
|
187
|
-
} catch (n) {
|
|
188
|
-
h.error("Failed to update service worker.", n);
|
|
189
|
-
}
|
|
190
|
-
return {
|
|
191
|
-
/**
|
|
192
|
-
* Establishes the communication bridge between the service worker and the web worker
|
|
193
|
-
* where the current site is running.
|
|
194
|
-
*
|
|
195
|
-
* @param scope The string prefix used in the site URL served by the currently
|
|
196
|
-
* running remote.html. E.g. for a prefix like `/scope:playground/`,
|
|
197
|
-
* the scope would be `playground`. See the `@php-wasm/scopes` package
|
|
198
|
-
* for more details.
|
|
199
|
-
*/
|
|
200
|
-
startServiceWorkerCommunicationBridge({ scope: n }) {
|
|
201
|
-
navigator.serviceWorker.addEventListener(
|
|
202
|
-
"message",
|
|
203
|
-
async function(i) {
|
|
204
|
-
if (n && i.data.scope !== n)
|
|
205
|
-
return;
|
|
206
|
-
const s = await $, o = i.data.args || [], c = i.data.method, u = await s[c](...o);
|
|
207
|
-
i.source.postMessage(
|
|
208
|
-
M(i.data.requestId, u)
|
|
209
|
-
);
|
|
210
|
-
}
|
|
211
|
-
), t.startMessages();
|
|
212
|
-
}
|
|
213
|
-
};
|
|
214
|
-
}
|
|
215
|
-
function re(r, t) {
|
|
163
|
+
function X(r, t) {
|
|
216
164
|
window.addEventListener("message", (e) => {
|
|
217
165
|
e.source === r.contentWindow && (t && e.origin !== t || typeof e.data != "object" || e.data.type !== "relay" || window.parent.postMessage(e.data, "*"));
|
|
218
166
|
}), window.addEventListener("message", (e) => {
|
|
@@ -220,7 +168,7 @@ function re(r, t) {
|
|
|
220
168
|
e.source === window.parent && (typeof e.data != "object" || e.data.type !== "relay" || (n = r == null ? void 0 : r.contentWindow) == null || n.postMessage(e.data));
|
|
221
169
|
});
|
|
222
170
|
}
|
|
223
|
-
async function
|
|
171
|
+
async function Y(r) {
|
|
224
172
|
const t = new Worker(r, { type: "module" });
|
|
225
173
|
return new Promise((e, n) => {
|
|
226
174
|
t.onerror = (i) => {
|
|
@@ -235,7 +183,7 @@ async function ne(r) {
|
|
|
235
183
|
t.addEventListener("message", a);
|
|
236
184
|
});
|
|
237
185
|
}
|
|
238
|
-
function
|
|
186
|
+
function Z(r, t = { initialSync: {} }) {
|
|
239
187
|
return t = {
|
|
240
188
|
...t,
|
|
241
189
|
initialSync: {
|
|
@@ -243,17 +191,17 @@ function ae(r, t = { initialSync: {} }) {
|
|
|
243
191
|
direction: t.initialSync.direction ?? "opfs-to-memfs"
|
|
244
192
|
}
|
|
245
193
|
}, async function(e, n, a) {
|
|
246
|
-
return t.initialSync.direction === "opfs-to-memfs" ? (p.fileExists(n, a) && p.rmdir(n, a), p.mkdir(n, a), await
|
|
194
|
+
return t.initialSync.direction === "opfs-to-memfs" ? (p.fileExists(n, a) && p.rmdir(n, a), p.mkdir(n, a), await _(n, r, a)) : await x(
|
|
247
195
|
n,
|
|
248
196
|
r,
|
|
249
197
|
a,
|
|
250
198
|
t.initialSync.onProgress
|
|
251
|
-
),
|
|
199
|
+
), A(e, r, a);
|
|
252
200
|
};
|
|
253
201
|
}
|
|
254
|
-
async function
|
|
202
|
+
async function _(r, t, e) {
|
|
255
203
|
p.mkdir(r, e);
|
|
256
|
-
const n = new
|
|
204
|
+
const n = new O({
|
|
257
205
|
concurrency: 40
|
|
258
206
|
}), a = [], i = [
|
|
259
207
|
[t, e]
|
|
@@ -262,7 +210,7 @@ async function q(r, t, e) {
|
|
|
262
210
|
const [s, o] = i.pop();
|
|
263
211
|
for await (const c of s.values()) {
|
|
264
212
|
const u = n.run(async () => {
|
|
265
|
-
const w =
|
|
213
|
+
const w = k(
|
|
266
214
|
o,
|
|
267
215
|
c.name
|
|
268
216
|
);
|
|
@@ -301,21 +249,21 @@ async function x(r, t, e, n) {
|
|
|
301
249
|
r.readdir(w).filter(
|
|
302
250
|
(d) => d !== "." && d !== ".."
|
|
303
251
|
).map(async (d) => {
|
|
304
|
-
const m =
|
|
305
|
-
if (
|
|
252
|
+
const m = k(w, d);
|
|
253
|
+
if (!$(r, m)) {
|
|
306
254
|
a.push([l, m, d]);
|
|
307
255
|
return;
|
|
308
256
|
}
|
|
309
|
-
const
|
|
257
|
+
const D = await l.getDirectoryHandle(d, {
|
|
310
258
|
create: !0
|
|
311
259
|
});
|
|
312
|
-
return await i(m,
|
|
260
|
+
return await i(m, D);
|
|
313
261
|
})
|
|
314
262
|
);
|
|
315
263
|
}
|
|
316
264
|
await i(e, t);
|
|
317
265
|
let s = 0;
|
|
318
|
-
const o = n &&
|
|
266
|
+
const o = n && j(n, 100), c = 100, u = /* @__PURE__ */ new Set();
|
|
319
267
|
try {
|
|
320
268
|
for (const [w, l, d] of a) {
|
|
321
269
|
const m = C(
|
|
@@ -338,7 +286,7 @@ async function x(r, t, e, n) {
|
|
|
338
286
|
await Promise.allSettled(u);
|
|
339
287
|
}
|
|
340
288
|
}
|
|
341
|
-
function
|
|
289
|
+
function $(r, t) {
|
|
342
290
|
return r.isDir(r.lookupPath(t, { follow: !0 }).node.mode);
|
|
343
291
|
}
|
|
344
292
|
async function C(r, t, e, n) {
|
|
@@ -363,10 +311,10 @@ async function C(r, t, e, n) {
|
|
|
363
311
|
await s.close();
|
|
364
312
|
}
|
|
365
313
|
}
|
|
366
|
-
function
|
|
367
|
-
const n = [], a =
|
|
314
|
+
function A(r, t, e) {
|
|
315
|
+
const n = [], a = v(r, e, (o) => {
|
|
368
316
|
n.push(o);
|
|
369
|
-
}), i = new
|
|
317
|
+
}), i = new J(r, t, e);
|
|
370
318
|
async function s() {
|
|
371
319
|
const o = await r.semaphore.acquire();
|
|
372
320
|
try {
|
|
@@ -380,17 +328,17 @@ function J(r, t, e) {
|
|
|
380
328
|
a(), r.removeEventListener("request.end", s);
|
|
381
329
|
};
|
|
382
330
|
}
|
|
383
|
-
class
|
|
331
|
+
class J {
|
|
384
332
|
constructor(t, e, n) {
|
|
385
|
-
this.php = t, this.opfs = e, this.memfsRoot =
|
|
333
|
+
this.php = t, this.opfs = e, this.memfsRoot = E(n);
|
|
386
334
|
}
|
|
387
335
|
toOpfsPath(t) {
|
|
388
|
-
return
|
|
336
|
+
return E(t.substring(this.memfsRoot.length));
|
|
389
337
|
}
|
|
390
338
|
async processEntry(t) {
|
|
391
339
|
if (!t.path.startsWith(this.memfsRoot) || t.path === this.memfsRoot)
|
|
392
340
|
return;
|
|
393
|
-
const e = this.toOpfsPath(t.path), n = await
|
|
341
|
+
const e = this.toOpfsPath(t.path), n = await T(this.opfs, e), a = H(e);
|
|
394
342
|
if (a)
|
|
395
343
|
try {
|
|
396
344
|
if (t.operation === "DELETE")
|
|
@@ -410,11 +358,11 @@ class j {
|
|
|
410
358
|
await C(
|
|
411
359
|
n,
|
|
412
360
|
a,
|
|
413
|
-
this.php[
|
|
361
|
+
this.php[g].FS,
|
|
414
362
|
t.path
|
|
415
363
|
);
|
|
416
364
|
else if (t.operation === "RENAME" && t.toPath.startsWith(this.memfsRoot)) {
|
|
417
|
-
const i = this.toOpfsPath(t.toPath), s = await
|
|
365
|
+
const i = this.toOpfsPath(t.toPath), s = await T(
|
|
418
366
|
this.opfs,
|
|
419
367
|
i
|
|
420
368
|
), o = H(i);
|
|
@@ -426,7 +374,7 @@ class j {
|
|
|
426
374
|
}
|
|
427
375
|
);
|
|
428
376
|
await x(
|
|
429
|
-
this.php[
|
|
377
|
+
this.php[g].FS,
|
|
430
378
|
c,
|
|
431
379
|
t.toPath
|
|
432
380
|
), await n.removeEntry(a, {
|
|
@@ -440,13 +388,13 @@ class j {
|
|
|
440
388
|
}
|
|
441
389
|
}
|
|
442
390
|
}
|
|
443
|
-
function
|
|
391
|
+
function E(r) {
|
|
444
392
|
return r.replace(/\/$/, "").replace(/\/\/+/g, "/");
|
|
445
393
|
}
|
|
446
394
|
function H(r) {
|
|
447
395
|
return r.substring(r.lastIndexOf("/") + 1);
|
|
448
396
|
}
|
|
449
|
-
async function
|
|
397
|
+
async function T(r, t) {
|
|
450
398
|
const e = t.replace(/^\/+|\/+$/g, "").replace(/\/+/, "/");
|
|
451
399
|
if (!e)
|
|
452
400
|
return r;
|
|
@@ -458,7 +406,7 @@ async function W(r, t) {
|
|
|
458
406
|
}
|
|
459
407
|
return a;
|
|
460
408
|
}
|
|
461
|
-
function
|
|
409
|
+
function j(r, t) {
|
|
462
410
|
let e = 0, n, a;
|
|
463
411
|
return function(...s) {
|
|
464
412
|
a = s;
|
|
@@ -472,13 +420,11 @@ function B(r, t) {
|
|
|
472
420
|
};
|
|
473
421
|
}
|
|
474
422
|
export {
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
re as setupPostMessageRelay,
|
|
483
|
-
ne as spawnPHPWorkerThread
|
|
423
|
+
B as consumeAPI,
|
|
424
|
+
Z as createDirectoryHandleMountHandler,
|
|
425
|
+
G as exposeAPI,
|
|
426
|
+
M as getPHPLoaderModule,
|
|
427
|
+
Q as loadWebRuntime,
|
|
428
|
+
X as setupPostMessageRelay,
|
|
429
|
+
Y as spawnPHPWorkerThread
|
|
484
430
|
};
|
|
@@ -6,4 +6,4 @@ import { PHPLoaderModule, SupportedPHPVersion } from '@php-wasm/universal';
|
|
|
6
6
|
* @param variant Internal. Do not use.
|
|
7
7
|
* @returns The PHP loader module.
|
|
8
8
|
*/
|
|
9
|
-
export declare function getPHPLoaderModule(version?: SupportedPHPVersion
|
|
9
|
+
export declare function getPHPLoaderModule(version?: SupportedPHPVersion): Promise<PHPLoaderModule>;
|
package/lib/index.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ export type { WithAPIState as WithIsReady } from './api';
|
|
|
3
3
|
export type { LoaderOptions as PHPWebLoaderOptions } from './load-runtime';
|
|
4
4
|
export { loadWebRuntime } from './load-runtime';
|
|
5
5
|
export { getPHPLoaderModule } from './get-php-loader-module';
|
|
6
|
-
export { registerServiceWorker, setPhpInstanceUsedByServiceWorker, } from './register-service-worker';
|
|
7
6
|
export { setupPostMessageRelay } from './setup-post-message-relay';
|
|
8
7
|
export { spawnPHPWorkerThread } from './worker-thread/spawn-php-worker-thread';
|
|
9
8
|
export { createDirectoryHandleMountHandler } from './directory-handle-mount';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@php-wasm/web",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "PHP.wasm for the web",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"type": "module",
|
|
30
30
|
"main": "index.js",
|
|
31
31
|
"types": "index.d.ts",
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "55aa00a7ccb5b1b0996aa49d8b37a6ce67b055d4",
|
|
33
33
|
"engines": {
|
|
34
34
|
"node": ">=16.15.1",
|
|
35
35
|
"npm": ">=8.11.0"
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
"comlink": "^4.4.1",
|
|
39
39
|
"express": "4.19.2",
|
|
40
40
|
"ini": "4.1.2",
|
|
41
|
+
"wasm-feature-detect": "1.8.0",
|
|
41
42
|
"ws": "8.18.0",
|
|
42
43
|
"yargs": "17.7.2",
|
|
43
|
-
"@php-wasm/universal": "0.
|
|
44
|
-
"@php-wasm/util": "0.
|
|
45
|
-
"@php-wasm/logger": "0.
|
|
46
|
-
"@php-wasm/fs-journal": "0.
|
|
47
|
-
"@php-wasm/web-service-worker": "0.9.46"
|
|
44
|
+
"@php-wasm/universal": "1.0.1",
|
|
45
|
+
"@php-wasm/util": "1.0.1",
|
|
46
|
+
"@php-wasm/logger": "1.0.1",
|
|
47
|
+
"@php-wasm/fs-journal": "1.0.1"
|
|
48
48
|
}
|
|
49
49
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|