@php-wasm/web 0.6.14 → 0.6.16
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 +154 -134
- package/kitchen-sink/7_0_33/php_7_0.wasm +0 -0
- package/kitchen-sink/7_1_30/php_7_1.wasm +0 -0
- package/kitchen-sink/7_2_34/php_7_2.wasm +0 -0
- package/kitchen-sink/7_3_33/php_7_3.wasm +0 -0
- package/kitchen-sink/7_4_33/php_7_4.wasm +0 -0
- package/kitchen-sink/8_0_30/php_8_0.wasm +0 -0
- package/kitchen-sink/8_1_23/php_8_1.wasm +0 -0
- package/kitchen-sink/8_2_10/php_8_2.wasm +0 -0
- package/kitchen-sink/8_3_0/php_8_3.wasm +0 -0
- package/kitchen-sink/php_7_0.js +1 -1
- package/kitchen-sink/php_7_1.js +1 -1
- package/kitchen-sink/php_7_2.js +1 -1
- package/kitchen-sink/php_7_3.js +1 -1
- package/kitchen-sink/php_7_4.js +1 -1
- package/kitchen-sink/php_8_0.js +1 -1
- package/kitchen-sink/php_8_1.js +1 -1
- package/kitchen-sink/php_8_2.js +1 -1
- package/kitchen-sink/php_8_3.js +1 -1
- 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_0/php_8_3.wasm +0 -0
- package/light/php_7_0.js +1 -1
- package/light/php_7_1.js +1 -1
- package/light/php_7_2.js +1 -1
- package/light/php_7_3.js +1 -1
- package/light/php_7_4.js +1 -1
- package/light/php_8_0.js +1 -1
- package/light/php_8_1.js +1 -1
- package/light/php_8_2.js +1 -1
- package/light/php_8_3.js +1 -1
- package/package.json +6 -6
package/index.js
CHANGED
|
@@ -2,11 +2,11 @@ var K = (e, t, r) => {
|
|
|
2
2
|
if (!t.has(e))
|
|
3
3
|
throw TypeError("Cannot " + r);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
5
|
+
var u = (e, t, r) => (K(e, t, "read from private field"), r ? r.call(e) : t.get(e)), d = (e, t, r) => {
|
|
6
6
|
if (t.has(e))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
8
|
t instanceof WeakSet ? t.add(e) : t.set(e, r);
|
|
9
|
-
},
|
|
9
|
+
}, p = (e, t, r, s) => (K(e, t, "write to private field"), s ? s.call(e, r) : t.set(e, r), r);
|
|
10
10
|
var f = (e, t, r) => (K(e, t, "access private method"), r);
|
|
11
11
|
const currentJsRuntime$1 = function() {
|
|
12
12
|
var e;
|
|
@@ -61,8 +61,8 @@ if (currentJsRuntime$1 === "NODE") {
|
|
|
61
61
|
r + o.byteLength
|
|
62
62
|
).arrayBuffer(), l = new Uint8Array(a);
|
|
63
63
|
new Uint8Array(o.buffer).set(l);
|
|
64
|
-
const
|
|
65
|
-
n.byobRequest.respond(
|
|
64
|
+
const c = l.byteLength;
|
|
65
|
+
n.byobRequest.respond(c), r += c, r >= s.size && n.close();
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
68
|
});
|
|
@@ -431,7 +431,7 @@ class PHPBrowser {
|
|
|
431
431
|
constructor(t, r = {}) {
|
|
432
432
|
d(this, R, void 0);
|
|
433
433
|
d(this, T, void 0);
|
|
434
|
-
this.requestHandler = t,
|
|
434
|
+
this.requestHandler = t, p(this, R, {}), p(this, T, {
|
|
435
435
|
handleRedirects: !1,
|
|
436
436
|
maxRedirects: 4,
|
|
437
437
|
...r
|
|
@@ -459,7 +459,7 @@ class PHPBrowser {
|
|
|
459
459
|
cookie: this.serializeCookies()
|
|
460
460
|
}
|
|
461
461
|
});
|
|
462
|
-
if (s.headers["set-cookie"] && this.setCookies(s.headers["set-cookie"]),
|
|
462
|
+
if (s.headers["set-cookie"] && this.setCookies(s.headers["set-cookie"]), u(this, T).handleRedirects && s.headers.location && r < u(this, T).maxRedirects) {
|
|
463
463
|
const n = new URL(
|
|
464
464
|
s.headers.location[0],
|
|
465
465
|
this.requestHandler.absoluteUrl
|
|
@@ -497,15 +497,15 @@ class PHPBrowser {
|
|
|
497
497
|
if (!r.includes("="))
|
|
498
498
|
continue;
|
|
499
499
|
const s = r.indexOf("="), n = r.substring(0, s), o = r.substring(s + 1).split(";")[0];
|
|
500
|
-
|
|
500
|
+
u(this, R)[n] = o;
|
|
501
501
|
} catch (s) {
|
|
502
502
|
console.error(s);
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
505
|
serializeCookies() {
|
|
506
506
|
const t = [];
|
|
507
|
-
for (const r in
|
|
508
|
-
t.push(`${r}=${
|
|
507
|
+
for (const r in u(this, R))
|
|
508
|
+
t.push(`${r}=${u(this, R)[r]}`);
|
|
509
509
|
return t.join("; ");
|
|
510
510
|
}
|
|
511
511
|
}
|
|
@@ -522,16 +522,16 @@ function ensurePathPrefix(e, t) {
|
|
|
522
522
|
}
|
|
523
523
|
async function encodeAsMultipart(e) {
|
|
524
524
|
const t = `----${Math.random().toString(36).slice(2)}`, r = `multipart/form-data; boundary=${t}`, s = new TextEncoder(), n = [];
|
|
525
|
-
for (const [l,
|
|
525
|
+
for (const [l, c] of Object.entries(e))
|
|
526
526
|
n.push(`--${t}\r
|
|
527
|
-
`), n.push(`Content-Disposition: form-data; name="${l}"`),
|
|
528
|
-
`),
|
|
527
|
+
`), n.push(`Content-Disposition: form-data; name="${l}"`), c instanceof File && n.push(`; filename="${c.name}"`), n.push(`\r
|
|
528
|
+
`), c instanceof File && (n.push("Content-Type: application/octet-stream"), n.push(`\r
|
|
529
529
|
`)), n.push(`\r
|
|
530
|
-
`),
|
|
530
|
+
`), c instanceof File ? n.push(await fileToUint8Array(c)) : n.push(c), n.push(`\r
|
|
531
531
|
`);
|
|
532
532
|
n.push(`--${t}--\r
|
|
533
533
|
`);
|
|
534
|
-
const o = n.reduce((l,
|
|
534
|
+
const o = n.reduce((l, c) => l + c.length, 0), i = new Uint8Array(o);
|
|
535
535
|
let a = 0;
|
|
536
536
|
for (const l of n)
|
|
537
537
|
i.set(
|
|
@@ -588,23 +588,23 @@ class PHPRequestHandler {
|
|
|
588
588
|
d(this, y, void 0);
|
|
589
589
|
d(this, C, void 0);
|
|
590
590
|
d(this, S, void 0);
|
|
591
|
-
|
|
591
|
+
p(this, S, new Semaphore({ concurrency: 1 }));
|
|
592
592
|
const {
|
|
593
593
|
documentRoot: s = "/www/",
|
|
594
594
|
absoluteUrl: n = typeof location == "object" ? location == null ? void 0 : location.href : "",
|
|
595
595
|
rewriteRules: o = []
|
|
596
596
|
} = r;
|
|
597
|
-
this.php = t,
|
|
597
|
+
this.php = t, p(this, g, s);
|
|
598
598
|
const i = new URL(n);
|
|
599
|
-
|
|
600
|
-
const a =
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
a ? `:${
|
|
604
|
-
].join("")),
|
|
605
|
-
`${
|
|
606
|
-
|
|
607
|
-
|
|
599
|
+
p(this, N, i.hostname), p(this, b, i.port ? Number(i.port) : i.protocol === "https:" ? 443 : 80), p(this, H, (i.protocol || "").replace(":", ""));
|
|
600
|
+
const a = u(this, b) !== 443 && u(this, b) !== 80;
|
|
601
|
+
p(this, k, [
|
|
602
|
+
u(this, N),
|
|
603
|
+
a ? `:${u(this, b)}` : ""
|
|
604
|
+
].join("")), p(this, y, i.pathname.replace(/\/+$/, "")), p(this, C, [
|
|
605
|
+
`${u(this, H)}://`,
|
|
606
|
+
u(this, k),
|
|
607
|
+
u(this, y)
|
|
608
608
|
].join("")), this.rewriteRules = o;
|
|
609
609
|
}
|
|
610
610
|
/** @inheritDoc */
|
|
@@ -614,18 +614,18 @@ class PHPRequestHandler {
|
|
|
614
614
|
/** @inheritDoc */
|
|
615
615
|
internalUrlToPath(t) {
|
|
616
616
|
const r = new URL(t);
|
|
617
|
-
return r.pathname.startsWith(
|
|
617
|
+
return r.pathname.startsWith(u(this, y)) && (r.pathname = r.pathname.slice(u(this, y).length)), toRelativeUrl(r);
|
|
618
618
|
}
|
|
619
619
|
get isRequestRunning() {
|
|
620
|
-
return
|
|
620
|
+
return u(this, S).running > 0;
|
|
621
621
|
}
|
|
622
622
|
/** @inheritDoc */
|
|
623
623
|
get absoluteUrl() {
|
|
624
|
-
return
|
|
624
|
+
return u(this, C);
|
|
625
625
|
}
|
|
626
626
|
/** @inheritDoc */
|
|
627
627
|
get documentRoot() {
|
|
628
|
-
return
|
|
628
|
+
return u(this, g);
|
|
629
629
|
}
|
|
630
630
|
/** @inheritDoc */
|
|
631
631
|
async request(t) {
|
|
@@ -634,9 +634,12 @@ class PHPRequestHandler {
|
|
|
634
634
|
t.url.split("#")[0],
|
|
635
635
|
r ? void 0 : DEFAULT_BASE_URL
|
|
636
636
|
), n = applyRewriteRules(
|
|
637
|
-
removePathPrefix(
|
|
637
|
+
removePathPrefix(
|
|
638
|
+
decodeURIComponent(s.pathname),
|
|
639
|
+
u(this, y)
|
|
640
|
+
),
|
|
638
641
|
this.rewriteRules
|
|
639
|
-
), o =
|
|
642
|
+
), o = joinPaths(u(this, g), n);
|
|
640
643
|
return seemsLikeAPHPRequestHandlerPath(o) ? await f(this, O, X).call(this, t, s) : f(this, L, Z).call(this, o);
|
|
641
644
|
}
|
|
642
645
|
}
|
|
@@ -667,7 +670,7 @@ g = new WeakMap(), H = new WeakMap(), N = new WeakMap(), b = new WeakMap(), k =
|
|
|
667
670
|
);
|
|
668
671
|
}, O = new WeakSet(), X = async function(t, r) {
|
|
669
672
|
var n;
|
|
670
|
-
if (
|
|
673
|
+
if (u(this, S).running > 0 && ((n = t.headers) == null ? void 0 : n["x-request-issuer"]) === "php")
|
|
671
674
|
return console.warn(
|
|
672
675
|
"Possible deadlock: Called request() before the previous request() have finished. PHP likely issued an HTTP call to itself. Normally this would lead to infinite waiting as Request 1 holds the lock that the Request 2 is waiting to acquire. That's not useful, so PHPRequestHandler will return error 502 instead."
|
|
673
676
|
), new PHPResponse(
|
|
@@ -675,26 +678,26 @@ g = new WeakMap(), H = new WeakMap(), N = new WeakMap(), b = new WeakMap(), k =
|
|
|
675
678
|
{},
|
|
676
679
|
new TextEncoder().encode("502 Bad Gateway")
|
|
677
680
|
);
|
|
678
|
-
const s = await
|
|
681
|
+
const s = await u(this, S).acquire();
|
|
679
682
|
try {
|
|
680
|
-
this.php.addServerGlobalEntry("REMOTE_ADDR", "127.0.0.1"), this.php.addServerGlobalEntry("DOCUMENT_ROOT",
|
|
683
|
+
this.php.addServerGlobalEntry("REMOTE_ADDR", "127.0.0.1"), this.php.addServerGlobalEntry("DOCUMENT_ROOT", u(this, g)), this.php.addServerGlobalEntry(
|
|
681
684
|
"HTTPS",
|
|
682
|
-
|
|
685
|
+
u(this, C).startsWith("https://") ? "on" : ""
|
|
683
686
|
);
|
|
684
687
|
let o = "GET";
|
|
685
688
|
const i = {
|
|
686
|
-
host:
|
|
689
|
+
host: u(this, k),
|
|
687
690
|
...normalizeHeaders(t.headers || {})
|
|
688
691
|
};
|
|
689
692
|
let a = t.body;
|
|
690
693
|
if (typeof a == "object" && !(a instanceof Uint8Array)) {
|
|
691
694
|
o = "POST";
|
|
692
|
-
const { bytes:
|
|
693
|
-
a =
|
|
695
|
+
const { bytes: c, contentType: h } = await encodeAsMultipart(a);
|
|
696
|
+
a = c, i["content-type"] = h;
|
|
694
697
|
}
|
|
695
698
|
let l;
|
|
696
699
|
try {
|
|
697
|
-
l = f(this, U, ee).call(this, r.pathname);
|
|
700
|
+
l = f(this, U, ee).call(this, decodeURIComponent(r.pathname));
|
|
698
701
|
} catch {
|
|
699
702
|
return new PHPResponse(
|
|
700
703
|
404,
|
|
@@ -702,24 +705,31 @@ g = new WeakMap(), H = new WeakMap(), N = new WeakMap(), b = new WeakMap(), k =
|
|
|
702
705
|
new TextEncoder().encode("404 File not found")
|
|
703
706
|
);
|
|
704
707
|
}
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
708
|
+
try {
|
|
709
|
+
return await this.php.run({
|
|
710
|
+
relativeUri: ensurePathPrefix(
|
|
711
|
+
toRelativeUrl(r),
|
|
712
|
+
u(this, y)
|
|
713
|
+
),
|
|
714
|
+
protocol: u(this, H),
|
|
715
|
+
method: t.method || o,
|
|
716
|
+
body: a,
|
|
717
|
+
scriptPath: l,
|
|
718
|
+
headers: i
|
|
719
|
+
});
|
|
720
|
+
} catch (c) {
|
|
721
|
+
const h = c;
|
|
722
|
+
if (h != null && h.response)
|
|
723
|
+
return h.response;
|
|
724
|
+
throw c;
|
|
725
|
+
}
|
|
716
726
|
} finally {
|
|
717
727
|
s();
|
|
718
728
|
}
|
|
719
729
|
}, U = new WeakSet(), ee = function(t) {
|
|
720
|
-
let r = removePathPrefix(t,
|
|
721
|
-
r = applyRewriteRules(r, this.rewriteRules), r.includes(".php") ? r = r.split(".php")[0] + ".php" : this.php.isDir(`${
|
|
722
|
-
const s = `${
|
|
730
|
+
let r = removePathPrefix(t, u(this, y));
|
|
731
|
+
r = applyRewriteRules(r, this.rewriteRules), r.includes(".php") ? r = r.split(".php")[0] + ".php" : this.php.isDir(`${u(this, g)}${r}`) ? (r.endsWith("/") || (r = `${r}/`), r = `${r}index.php`) : r = "/index.php";
|
|
732
|
+
const s = `${u(this, g)}${r}`;
|
|
723
733
|
if (this.php.fileExists(s))
|
|
724
734
|
return s;
|
|
725
735
|
throw new Error(`File not found: ${s}`);
|
|
@@ -872,8 +882,8 @@ function rethrowFileSystemError(e = "") {
|
|
|
872
882
|
} catch (a) {
|
|
873
883
|
const l = typeof a == "object" ? a == null ? void 0 : a.errno : null;
|
|
874
884
|
if (l in FileErrorCodes) {
|
|
875
|
-
const
|
|
876
|
-
throw new Error(`${_}: ${
|
|
885
|
+
const c = FileErrorCodes[l], h = typeof i[0] == "string" ? i[0] : null, _ = h !== null ? e.replaceAll("{path}", h) : e;
|
|
886
|
+
throw new Error(`${_}: ${c}`, {
|
|
877
887
|
cause: a
|
|
878
888
|
});
|
|
879
889
|
}
|
|
@@ -924,6 +934,11 @@ var __defProp = Object.defineProperty, __getOwnPropDesc = Object.getOwnPropertyD
|
|
|
924
934
|
return s && n && __defProp(t, r, n), n;
|
|
925
935
|
};
|
|
926
936
|
const STRING = "string", NUMBER = "number", __private__dont__use = Symbol("__private__dont__use");
|
|
937
|
+
class PHPExecutionFailureError extends Error {
|
|
938
|
+
constructor(t, r, s) {
|
|
939
|
+
super(t), this.response = r, this.source = s;
|
|
940
|
+
}
|
|
941
|
+
}
|
|
927
942
|
var x, F, A, w, E, v, P, M, W, te, q, re, B, se, D, ne, $, ie, z, oe, j, ae, G, le, V, ce, J, ue, Q, de, Y, he;
|
|
928
943
|
class BasePHP {
|
|
929
944
|
/**
|
|
@@ -954,26 +969,26 @@ class BasePHP {
|
|
|
954
969
|
d(this, v, void 0);
|
|
955
970
|
d(this, P, void 0);
|
|
956
971
|
d(this, M, void 0);
|
|
957
|
-
|
|
972
|
+
p(this, x, []), p(this, w, !1), p(this, E, null), p(this, v, {}), p(this, P, /* @__PURE__ */ new Map()), p(this, M, []), this.semaphore = new Semaphore({ concurrency: 1 }), e !== void 0 && this.initializeRuntime(e), t && (this.requestHandler = new PHPBrowser(
|
|
958
973
|
new PHPRequestHandler(this, t)
|
|
959
974
|
));
|
|
960
975
|
}
|
|
961
976
|
addEventListener(e, t) {
|
|
962
|
-
|
|
977
|
+
u(this, P).has(e) || u(this, P).set(e, /* @__PURE__ */ new Set()), u(this, P).get(e).add(t);
|
|
963
978
|
}
|
|
964
979
|
removeEventListener(e, t) {
|
|
965
980
|
var r;
|
|
966
|
-
(r =
|
|
981
|
+
(r = u(this, P).get(e)) == null || r.delete(t);
|
|
967
982
|
}
|
|
968
983
|
dispatchEvent(e) {
|
|
969
|
-
const t =
|
|
984
|
+
const t = u(this, P).get(e.type);
|
|
970
985
|
if (t)
|
|
971
986
|
for (const r of t)
|
|
972
987
|
r(e);
|
|
973
988
|
}
|
|
974
989
|
/** @inheritDoc */
|
|
975
990
|
async onMessage(e) {
|
|
976
|
-
|
|
991
|
+
u(this, M).push(e);
|
|
977
992
|
}
|
|
978
993
|
/** @inheritDoc */
|
|
979
994
|
async setSpawnHandler(handler) {
|
|
@@ -1004,13 +1019,13 @@ class BasePHP {
|
|
|
1004
1019
|
if (!t)
|
|
1005
1020
|
throw new Error("Invalid PHP runtime id.");
|
|
1006
1021
|
this[__private__dont__use] = t, t.onMessage = async (r) => {
|
|
1007
|
-
for (const s of
|
|
1022
|
+
for (const s of u(this, M)) {
|
|
1008
1023
|
const n = await s(r);
|
|
1009
1024
|
if (n)
|
|
1010
1025
|
return n;
|
|
1011
1026
|
}
|
|
1012
1027
|
return "";
|
|
1013
|
-
},
|
|
1028
|
+
}, p(this, E, improveWASMErrorReporting(t)), this.dispatchEvent({
|
|
1014
1029
|
type: "runtime.initialized"
|
|
1015
1030
|
});
|
|
1016
1031
|
}
|
|
@@ -1025,13 +1040,13 @@ class BasePHP {
|
|
|
1025
1040
|
throw new Error(
|
|
1026
1041
|
"Could not set SAPI name. This can only be done before the PHP WASM module is initialized.Did you already dispatch any requests?"
|
|
1027
1042
|
);
|
|
1028
|
-
|
|
1043
|
+
p(this, A, e);
|
|
1029
1044
|
}
|
|
1030
1045
|
/** @inheritDoc */
|
|
1031
1046
|
setPhpIniPath(e) {
|
|
1032
|
-
if (
|
|
1047
|
+
if (u(this, w))
|
|
1033
1048
|
throw new Error("Cannot set PHP ini path after calling run().");
|
|
1034
|
-
|
|
1049
|
+
p(this, F, e), this[__private__dont__use].ccall(
|
|
1035
1050
|
"wasm_set_phpini_path",
|
|
1036
1051
|
null,
|
|
1037
1052
|
["string"],
|
|
@@ -1040,9 +1055,9 @@ class BasePHP {
|
|
|
1040
1055
|
}
|
|
1041
1056
|
/** @inheritDoc */
|
|
1042
1057
|
setPhpIniEntry(e, t) {
|
|
1043
|
-
if (
|
|
1058
|
+
if (u(this, w))
|
|
1044
1059
|
throw new Error("Cannot set PHP ini entries after calling run().");
|
|
1045
|
-
|
|
1060
|
+
u(this, x).push([e, t]);
|
|
1046
1061
|
}
|
|
1047
1062
|
/** @inheritDoc */
|
|
1048
1063
|
chdir(e) {
|
|
@@ -1059,7 +1074,7 @@ class BasePHP {
|
|
|
1059
1074
|
const t = await this.semaphore.acquire();
|
|
1060
1075
|
let r;
|
|
1061
1076
|
try {
|
|
1062
|
-
if (
|
|
1077
|
+
if (u(this, w) || (f(this, W, te).call(this), p(this, w, !0)), e.scriptPath && !this.fileExists(e.scriptPath))
|
|
1063
1078
|
throw new Error(
|
|
1064
1079
|
`The script path "${e.scriptPath}" does not exist.`
|
|
1065
1080
|
);
|
|
@@ -1071,15 +1086,13 @@ class BasePHP {
|
|
|
1071
1086
|
f(this, J, ue).call(this, a, o[a]);
|
|
1072
1087
|
const i = await f(this, Y, he).call(this);
|
|
1073
1088
|
if (i.exitCode !== 0) {
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
const l = new Error(
|
|
1080
|
-
`PHP.run() failed with exit code ${i.exitCode} and the following output: ` + i.errors
|
|
1089
|
+
console.warn("PHP.run() output was:", i.text);
|
|
1090
|
+
const a = new PHPExecutionFailureError(
|
|
1091
|
+
`PHP.run() failed with exit code ${i.exitCode} and the following output: ` + i.errors,
|
|
1092
|
+
i,
|
|
1093
|
+
"request"
|
|
1081
1094
|
);
|
|
1082
|
-
throw
|
|
1095
|
+
throw console.error(a), a;
|
|
1083
1096
|
}
|
|
1084
1097
|
return i;
|
|
1085
1098
|
} catch (s) {
|
|
@@ -1100,7 +1113,7 @@ class BasePHP {
|
|
|
1100
1113
|
}
|
|
1101
1114
|
}
|
|
1102
1115
|
addServerGlobalEntry(e, t) {
|
|
1103
|
-
|
|
1116
|
+
u(this, v)[e] = t;
|
|
1104
1117
|
}
|
|
1105
1118
|
defineConstant(e, t) {
|
|
1106
1119
|
let r = {};
|
|
@@ -1196,7 +1209,7 @@ class BasePHP {
|
|
|
1196
1209
|
this.exit();
|
|
1197
1210
|
} catch {
|
|
1198
1211
|
}
|
|
1199
|
-
if (this.initializeRuntime(e),
|
|
1212
|
+
if (this.initializeRuntime(e), u(this, F) && this.setPhpIniPath(u(this, F)), u(this, A) && this.setSapiName(u(this, A)), this.requestHandler) {
|
|
1200
1213
|
const r = this.documentRoot;
|
|
1201
1214
|
copyFS(t, this[__private__dont__use].FS, r);
|
|
1202
1215
|
}
|
|
@@ -1209,7 +1222,7 @@ class BasePHP {
|
|
|
1209
1222
|
this[__private__dont__use]._exit(e);
|
|
1210
1223
|
} catch {
|
|
1211
1224
|
}
|
|
1212
|
-
|
|
1225
|
+
p(this, w, !1), p(this, E, null), delete this[__private__dont__use].onMessage, delete this[__private__dont__use];
|
|
1213
1226
|
}
|
|
1214
1227
|
}
|
|
1215
1228
|
x = new WeakMap(), F = new WeakMap(), A = new WeakMap(), w = new WeakMap(), E = new WeakMap(), v = new WeakMap(), P = new WeakMap(), M = new WeakMap(), W = new WeakSet(), te = function() {
|
|
@@ -1224,8 +1237,8 @@ x = new WeakMap(), F = new WeakMap(), A = new WeakMap(), w = new WeakMap(), E =
|
|
|
1224
1237
|
}
|
|
1225
1238
|
}
|
|
1226
1239
|
}`
|
|
1227
|
-
),
|
|
1228
|
-
const e =
|
|
1240
|
+
), u(this, x).length > 0) {
|
|
1241
|
+
const e = u(this, x).map(([t, r]) => `${t}=${r}`).join(`
|
|
1229
1242
|
`) + `
|
|
1230
1243
|
|
|
1231
1244
|
`;
|
|
@@ -1349,12 +1362,12 @@ x = new WeakMap(), F = new WeakMap(), A = new WeakMap(), w = new WeakMap(), E =
|
|
|
1349
1362
|
[e]
|
|
1350
1363
|
);
|
|
1351
1364
|
}, V = new WeakSet(), ce = function() {
|
|
1352
|
-
for (const e in
|
|
1365
|
+
for (const e in u(this, v))
|
|
1353
1366
|
this[__private__dont__use].ccall(
|
|
1354
1367
|
"wasm_add_SERVER_entry",
|
|
1355
1368
|
null,
|
|
1356
1369
|
[STRING, STRING],
|
|
1357
|
-
[e,
|
|
1370
|
+
[e, u(this, v)[e]]
|
|
1358
1371
|
);
|
|
1359
1372
|
}, J = new WeakSet(), ue = function(e, t) {
|
|
1360
1373
|
this[__private__dont__use].ccall(
|
|
@@ -1376,11 +1389,11 @@ x = new WeakMap(), F = new WeakMap(), A = new WeakMap(), w = new WeakMap(), E =
|
|
|
1376
1389
|
try {
|
|
1377
1390
|
e = await new Promise((o, i) => {
|
|
1378
1391
|
var l;
|
|
1379
|
-
t = (
|
|
1380
|
-
console.error(
|
|
1381
|
-
const
|
|
1382
|
-
|
|
1383
|
-
}, (l =
|
|
1392
|
+
t = (c) => {
|
|
1393
|
+
console.error(c), console.error(c.error);
|
|
1394
|
+
const h = new Error("Rethrown");
|
|
1395
|
+
h.cause = c.error, h.betterMessage = c.message, i(h);
|
|
1396
|
+
}, (l = u(this, E)) == null || l.addEventListener(
|
|
1384
1397
|
"error",
|
|
1385
1398
|
t
|
|
1386
1399
|
);
|
|
@@ -1394,8 +1407,8 @@ x = new WeakMap(), F = new WeakMap(), A = new WeakMap(), w = new WeakMap(), E =
|
|
|
1394
1407
|
return a instanceof Promise ? a.then(o, i) : o(a);
|
|
1395
1408
|
});
|
|
1396
1409
|
} catch (o) {
|
|
1397
|
-
for (const
|
|
1398
|
-
typeof this[
|
|
1410
|
+
for (const c in this)
|
|
1411
|
+
typeof this[c] == "function" && (this[c] = () => {
|
|
1399
1412
|
throw new Error(
|
|
1400
1413
|
"PHP runtime has crashed – see the earlier error for details."
|
|
1401
1414
|
);
|
|
@@ -1404,11 +1417,11 @@ x = new WeakMap(), F = new WeakMap(), A = new WeakMap(), w = new WeakMap(), E =
|
|
|
1404
1417
|
const i = o, a = "betterMessage" in i ? i.betterMessage : i.message, l = new Error(a);
|
|
1405
1418
|
throw l.cause = i, console.error(l), l;
|
|
1406
1419
|
} finally {
|
|
1407
|
-
(n =
|
|
1420
|
+
(n = u(this, E)) == null || n.removeEventListener("error", t), p(this, v, {});
|
|
1408
1421
|
}
|
|
1409
1422
|
const { headers: r, httpStatusCode: s } = f(this, q, re).call(this);
|
|
1410
1423
|
return new PHPResponse(
|
|
1411
|
-
s,
|
|
1424
|
+
e === 0 ? s : 500,
|
|
1412
1425
|
r,
|
|
1413
1426
|
this.readFileAsBuffer("/internal/stdout"),
|
|
1414
1427
|
this.readFileAsText("/internal/stderr"),
|
|
@@ -1518,44 +1531,44 @@ function expose(e, t = globalThis, r = ["*"]) {
|
|
|
1518
1531
|
return;
|
|
1519
1532
|
}
|
|
1520
1533
|
const { id: o, type: i, path: a } = Object.assign({ path: [] }, n.data), l = (n.data.argumentList || []).map(fromWireValue);
|
|
1521
|
-
let
|
|
1534
|
+
let c;
|
|
1522
1535
|
try {
|
|
1523
|
-
const
|
|
1536
|
+
const h = a.slice(0, -1).reduce((m, I) => m[I], e), _ = a.reduce((m, I) => m[I], e);
|
|
1524
1537
|
switch (i) {
|
|
1525
1538
|
case "GET":
|
|
1526
|
-
|
|
1539
|
+
c = _;
|
|
1527
1540
|
break;
|
|
1528
1541
|
case "SET":
|
|
1529
|
-
|
|
1542
|
+
h[a.slice(-1)[0]] = fromWireValue(n.data.value), c = !0;
|
|
1530
1543
|
break;
|
|
1531
1544
|
case "APPLY":
|
|
1532
|
-
|
|
1545
|
+
c = _.apply(h, l);
|
|
1533
1546
|
break;
|
|
1534
1547
|
case "CONSTRUCT":
|
|
1535
1548
|
{
|
|
1536
1549
|
const m = new _(...l);
|
|
1537
|
-
|
|
1550
|
+
c = proxy(m);
|
|
1538
1551
|
}
|
|
1539
1552
|
break;
|
|
1540
1553
|
case "ENDPOINT":
|
|
1541
1554
|
{
|
|
1542
1555
|
const { port1: m, port2: I } = new MessageChannel();
|
|
1543
|
-
expose(e, I),
|
|
1556
|
+
expose(e, I), c = transfer(m, [m]);
|
|
1544
1557
|
}
|
|
1545
1558
|
break;
|
|
1546
1559
|
case "RELEASE":
|
|
1547
|
-
|
|
1560
|
+
c = void 0;
|
|
1548
1561
|
break;
|
|
1549
1562
|
default:
|
|
1550
1563
|
return;
|
|
1551
1564
|
}
|
|
1552
|
-
} catch (
|
|
1553
|
-
|
|
1565
|
+
} catch (h) {
|
|
1566
|
+
c = { value: h, [throwMarker]: 0 };
|
|
1554
1567
|
}
|
|
1555
|
-
Promise.resolve(
|
|
1556
|
-
const [_, m] = toWireValue(
|
|
1568
|
+
Promise.resolve(c).catch((h) => ({ value: h, [throwMarker]: 0 })).then((h) => {
|
|
1569
|
+
const [_, m] = toWireValue(h);
|
|
1557
1570
|
t.postMessage(Object.assign(Object.assign({}, _), { id: o }), m), i === "RELEASE" && (t.removeEventListener("message", s), closeEndPoint(t), finalizer in e && typeof e[finalizer] == "function" && e[finalizer]());
|
|
1558
|
-
}).catch((
|
|
1571
|
+
}).catch((h) => {
|
|
1559
1572
|
const [_, m] = toWireValue({
|
|
1560
1573
|
value: new TypeError("Unserializable return value"),
|
|
1561
1574
|
[throwMarker]: 0
|
|
@@ -1617,12 +1630,12 @@ function createProxy(e, t = [], r = function() {
|
|
|
1617
1630
|
},
|
|
1618
1631
|
set(o, i, a) {
|
|
1619
1632
|
throwIfProxyReleased(s);
|
|
1620
|
-
const [l,
|
|
1633
|
+
const [l, c] = toWireValue(a);
|
|
1621
1634
|
return requestResponseMessage(e, {
|
|
1622
1635
|
type: "SET",
|
|
1623
|
-
path: [...t, i].map((
|
|
1636
|
+
path: [...t, i].map((h) => h.toString()),
|
|
1624
1637
|
value: l
|
|
1625
|
-
},
|
|
1638
|
+
}, c).then(fromWireValue);
|
|
1626
1639
|
},
|
|
1627
1640
|
apply(o, i, a) {
|
|
1628
1641
|
throwIfProxyReleased(s);
|
|
@@ -1633,19 +1646,19 @@ function createProxy(e, t = [], r = function() {
|
|
|
1633
1646
|
}).then(fromWireValue);
|
|
1634
1647
|
if (l === "bind")
|
|
1635
1648
|
return createProxy(e, t.slice(0, -1));
|
|
1636
|
-
const [
|
|
1649
|
+
const [c, h] = processArguments(a);
|
|
1637
1650
|
return requestResponseMessage(e, {
|
|
1638
1651
|
type: "APPLY",
|
|
1639
1652
|
path: t.map((_) => _.toString()),
|
|
1640
|
-
argumentList:
|
|
1641
|
-
},
|
|
1653
|
+
argumentList: c
|
|
1654
|
+
}, h).then(fromWireValue);
|
|
1642
1655
|
},
|
|
1643
1656
|
construct(o, i) {
|
|
1644
1657
|
throwIfProxyReleased(s);
|
|
1645
1658
|
const [a, l] = processArguments(i);
|
|
1646
1659
|
return requestResponseMessage(e, {
|
|
1647
1660
|
type: "CONSTRUCT",
|
|
1648
|
-
path: t.map((
|
|
1661
|
+
path: t.map((c) => c.toString()),
|
|
1649
1662
|
argumentList: a
|
|
1650
1663
|
}, l).then(fromWireValue);
|
|
1651
1664
|
}
|
|
@@ -1736,10 +1749,10 @@ function exposeAPI(e, t) {
|
|
|
1736
1749
|
setupTransferHandlers();
|
|
1737
1750
|
const r = Promise.resolve();
|
|
1738
1751
|
let s, n;
|
|
1739
|
-
const o = new Promise((l,
|
|
1740
|
-
s = l, n =
|
|
1752
|
+
const o = new Promise((l, c) => {
|
|
1753
|
+
s = l, n = c;
|
|
1741
1754
|
}), i = proxyClone(e), a = new Proxy(i, {
|
|
1742
|
-
get: (l,
|
|
1755
|
+
get: (l, c) => c === "isConnected" ? () => r : c === "isReady" ? () => o : c in l ? l[c] : t == null ? void 0 : t[c]
|
|
1743
1756
|
});
|
|
1744
1757
|
return expose(
|
|
1745
1758
|
a,
|
|
@@ -1748,34 +1761,41 @@ function exposeAPI(e, t) {
|
|
|
1748
1761
|
}
|
|
1749
1762
|
let isTransferHandlersSetup = !1;
|
|
1750
1763
|
function setupTransferHandlers() {
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1764
|
+
if (isTransferHandlersSetup)
|
|
1765
|
+
return;
|
|
1766
|
+
isTransferHandlersSetup = !0, transferHandlers.set("EVENT", {
|
|
1767
|
+
canHandle: (r) => r instanceof CustomEvent,
|
|
1768
|
+
serialize: (r) => [
|
|
1754
1769
|
{
|
|
1755
|
-
detail:
|
|
1770
|
+
detail: r.detail
|
|
1756
1771
|
},
|
|
1757
1772
|
[]
|
|
1758
1773
|
],
|
|
1759
|
-
deserialize: (
|
|
1774
|
+
deserialize: (r) => r
|
|
1760
1775
|
}), transferHandlers.set("FUNCTION", {
|
|
1761
|
-
canHandle: (
|
|
1762
|
-
serialize(
|
|
1776
|
+
canHandle: (r) => typeof r == "function",
|
|
1777
|
+
serialize(r) {
|
|
1763
1778
|
console.debug("[Comlink][Performance] Proxying a function");
|
|
1764
|
-
const { port1:
|
|
1765
|
-
return expose(
|
|
1779
|
+
const { port1: s, port2: n } = new MessageChannel();
|
|
1780
|
+
return expose(r, s), [n, [n]];
|
|
1766
1781
|
},
|
|
1767
|
-
deserialize(
|
|
1768
|
-
return
|
|
1782
|
+
deserialize(r) {
|
|
1783
|
+
return r.start(), wrap(r);
|
|
1769
1784
|
}
|
|
1770
1785
|
}), transferHandlers.set("PHPResponse", {
|
|
1771
|
-
canHandle: (
|
|
1772
|
-
serialize(
|
|
1773
|
-
return [
|
|
1786
|
+
canHandle: (r) => typeof r == "object" && r !== null && "headers" in r && "bytes" in r && "errors" in r && "exitCode" in r && "httpStatusCode" in r,
|
|
1787
|
+
serialize(r) {
|
|
1788
|
+
return [r.toRawData(), []];
|
|
1774
1789
|
},
|
|
1775
|
-
deserialize(
|
|
1776
|
-
return PHPResponse.fromRawData(
|
|
1790
|
+
deserialize(r) {
|
|
1791
|
+
return PHPResponse.fromRawData(r);
|
|
1777
1792
|
}
|
|
1778
|
-
})
|
|
1793
|
+
});
|
|
1794
|
+
const e = transferHandlers.get("throw"), t = e == null ? void 0 : e.serialize;
|
|
1795
|
+
e.serialize = ({ value: r }) => {
|
|
1796
|
+
const s = t({ value: r });
|
|
1797
|
+
return r.response && (s[0].value.response = r.response), r.source && (s[0].value.source = r.source), s;
|
|
1798
|
+
};
|
|
1779
1799
|
}
|
|
1780
1800
|
function proxyClone(e) {
|
|
1781
1801
|
return new Proxy(e, {
|
|
@@ -2022,8 +2042,8 @@ async function registerServiceWorker(e, t, r) {
|
|
|
2022
2042
|
async function(i) {
|
|
2023
2043
|
if (t && i.data.scope !== t)
|
|
2024
2044
|
return;
|
|
2025
|
-
const a = i.data.args || [], l = i.data.method,
|
|
2026
|
-
i.source.postMessage(responseTo(i.data.requestId,
|
|
2045
|
+
const a = i.data.args || [], l = i.data.method, c = await e[l](...a);
|
|
2046
|
+
i.source.postMessage(responseTo(i.data.requestId, c));
|
|
2027
2047
|
}
|
|
2028
2048
|
), s.startMessages();
|
|
2029
2049
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/kitchen-sink/php_7_0.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dependencyFilename from './7_0_33/php_7_0.wasm';
|
|
2
2
|
export { dependencyFilename };
|
|
3
|
-
export const dependenciesTotalSize =
|
|
3
|
+
export const dependenciesTotalSize = 10638709;
|
|
4
4
|
export function init(RuntimeName, PHPLoader) {
|
|
5
5
|
/**
|
|
6
6
|
* Overrides Emscripten's default ExitStatus object which gets
|
package/kitchen-sink/php_7_1.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dependencyFilename from './7_1_30/php_7_1.wasm';
|
|
2
2
|
export { dependencyFilename };
|
|
3
|
-
export const dependenciesTotalSize =
|
|
3
|
+
export const dependenciesTotalSize = 11078277;
|
|
4
4
|
export function init(RuntimeName, PHPLoader) {
|
|
5
5
|
/**
|
|
6
6
|
* Overrides Emscripten's default ExitStatus object which gets
|
package/kitchen-sink/php_7_2.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dependencyFilename from './7_2_34/php_7_2.wasm';
|
|
2
2
|
export { dependencyFilename };
|
|
3
|
-
export const dependenciesTotalSize =
|
|
3
|
+
export const dependenciesTotalSize = 11712687;
|
|
4
4
|
export function init(RuntimeName, PHPLoader) {
|
|
5
5
|
/**
|
|
6
6
|
* Overrides Emscripten's default ExitStatus object which gets
|
package/kitchen-sink/php_7_3.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dependencyFilename from './7_3_33/php_7_3.wasm';
|
|
2
2
|
export { dependencyFilename };
|
|
3
|
-
export const dependenciesTotalSize =
|
|
3
|
+
export const dependenciesTotalSize = 11775233;
|
|
4
4
|
export function init(RuntimeName, PHPLoader) {
|
|
5
5
|
/**
|
|
6
6
|
* Overrides Emscripten's default ExitStatus object which gets
|
package/kitchen-sink/php_7_4.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dependencyFilename from './7_4_33/php_7_4.wasm';
|
|
2
2
|
export { dependencyFilename };
|
|
3
|
-
export const dependenciesTotalSize =
|
|
3
|
+
export const dependenciesTotalSize = 11945564;
|
|
4
4
|
export function init(RuntimeName, PHPLoader) {
|
|
5
5
|
/**
|
|
6
6
|
* Overrides Emscripten's default ExitStatus object which gets
|
package/kitchen-sink/php_8_0.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dependencyFilename from './8_0_30/php_8_0.wasm';
|
|
2
2
|
export { dependencyFilename };
|
|
3
|
-
export const dependenciesTotalSize =
|
|
3
|
+
export const dependenciesTotalSize = 11611342;
|
|
4
4
|
export function init(RuntimeName, PHPLoader) {
|
|
5
5
|
/**
|
|
6
6
|
* Overrides Emscripten's default ExitStatus object which gets
|
package/kitchen-sink/php_8_1.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dependencyFilename from './8_1_23/php_8_1.wasm';
|
|
2
2
|
export { dependencyFilename };
|
|
3
|
-
export const dependenciesTotalSize =
|
|
3
|
+
export const dependenciesTotalSize = 11541678;
|
|
4
4
|
export function init(RuntimeName, PHPLoader) {
|
|
5
5
|
/**
|
|
6
6
|
* Overrides Emscripten's default ExitStatus object which gets
|
package/kitchen-sink/php_8_2.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dependencyFilename from './8_2_10/php_8_2.wasm';
|
|
2
2
|
export { dependencyFilename };
|
|
3
|
-
export const dependenciesTotalSize =
|
|
3
|
+
export const dependenciesTotalSize = 11787173;
|
|
4
4
|
export function init(RuntimeName, PHPLoader) {
|
|
5
5
|
/**
|
|
6
6
|
* Overrides Emscripten's default ExitStatus object which gets
|
package/kitchen-sink/php_8_3.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dependencyFilename from './8_3_0/php_8_3.wasm';
|
|
2
2
|
export { dependencyFilename };
|
|
3
|
-
export const dependenciesTotalSize =
|
|
3
|
+
export const dependenciesTotalSize = 12043974;
|
|
4
4
|
export function init(RuntimeName, PHPLoader) {
|
|
5
5
|
/**
|
|
6
6
|
* Overrides Emscripten's default ExitStatus object which gets
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/light/8_3_0/php_8_3.wasm
CHANGED
|
Binary file
|
package/light/php_7_0.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dependencyFilename from './7_0_33/php_7_0.wasm';
|
|
2
2
|
export { dependencyFilename };
|
|
3
|
-
export const dependenciesTotalSize =
|
|
3
|
+
export const dependenciesTotalSize = 5285931;
|
|
4
4
|
export function init(RuntimeName, PHPLoader) {
|
|
5
5
|
/**
|
|
6
6
|
* Overrides Emscripten's default ExitStatus object which gets
|
package/light/php_7_1.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dependencyFilename from './7_1_30/php_7_1.wasm';
|
|
2
2
|
export { dependencyFilename };
|
|
3
|
-
export const dependenciesTotalSize =
|
|
3
|
+
export const dependenciesTotalSize = 5429562;
|
|
4
4
|
export function init(RuntimeName, PHPLoader) {
|
|
5
5
|
/**
|
|
6
6
|
* Overrides Emscripten's default ExitStatus object which gets
|
package/light/php_7_2.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dependencyFilename from './7_2_34/php_7_2.wasm';
|
|
2
2
|
export { dependencyFilename };
|
|
3
|
-
export const dependenciesTotalSize =
|
|
3
|
+
export const dependenciesTotalSize = 5772780;
|
|
4
4
|
export function init(RuntimeName, PHPLoader) {
|
|
5
5
|
/**
|
|
6
6
|
* Overrides Emscripten's default ExitStatus object which gets
|
package/light/php_7_3.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dependencyFilename from './7_3_33/php_7_3.wasm';
|
|
2
2
|
export { dependencyFilename };
|
|
3
|
-
export const dependenciesTotalSize =
|
|
3
|
+
export const dependenciesTotalSize = 5700756;
|
|
4
4
|
export function init(RuntimeName, PHPLoader) {
|
|
5
5
|
/**
|
|
6
6
|
* Overrides Emscripten's default ExitStatus object which gets
|
package/light/php_7_4.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dependencyFilename from './7_4_33/php_7_4.wasm';
|
|
2
2
|
export { dependencyFilename };
|
|
3
|
-
export const dependenciesTotalSize =
|
|
3
|
+
export const dependenciesTotalSize = 5783248;
|
|
4
4
|
export function init(RuntimeName, PHPLoader) {
|
|
5
5
|
/**
|
|
6
6
|
* Overrides Emscripten's default ExitStatus object which gets
|
package/light/php_8_0.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dependencyFilename from './8_0_30/php_8_0.wasm';
|
|
2
2
|
export { dependencyFilename };
|
|
3
|
-
export const dependenciesTotalSize =
|
|
3
|
+
export const dependenciesTotalSize = 5579515;
|
|
4
4
|
export function init(RuntimeName, PHPLoader) {
|
|
5
5
|
/**
|
|
6
6
|
* Overrides Emscripten's default ExitStatus object which gets
|
package/light/php_8_1.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dependencyFilename from './8_1_23/php_8_1.wasm';
|
|
2
2
|
export { dependencyFilename };
|
|
3
|
-
export const dependenciesTotalSize =
|
|
3
|
+
export const dependenciesTotalSize = 5382815;
|
|
4
4
|
export function init(RuntimeName, PHPLoader) {
|
|
5
5
|
/**
|
|
6
6
|
* Overrides Emscripten's default ExitStatus object which gets
|
package/light/php_8_2.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dependencyFilename from './8_2_10/php_8_2.wasm';
|
|
2
2
|
export { dependencyFilename };
|
|
3
|
-
export const dependenciesTotalSize =
|
|
3
|
+
export const dependenciesTotalSize = 5496659;
|
|
4
4
|
export function init(RuntimeName, PHPLoader) {
|
|
5
5
|
/**
|
|
6
6
|
* Overrides Emscripten's default ExitStatus object which gets
|
package/light/php_8_3.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dependencyFilename from './8_3_0/php_8_3.wasm';
|
|
2
2
|
export { dependencyFilename };
|
|
3
|
-
export const dependenciesTotalSize =
|
|
3
|
+
export const dependenciesTotalSize = 5587879;
|
|
4
4
|
export function init(RuntimeName, PHPLoader) {
|
|
5
5
|
/**
|
|
6
6
|
* Overrides Emscripten's default ExitStatus object which gets
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@php-wasm/web",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.16",
|
|
4
4
|
"description": "PHP.wasm for the web",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
"type": "module",
|
|
30
30
|
"main": "index.js",
|
|
31
31
|
"types": "index.d.ts",
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "1981567e7eacecbc4a18c870267c20bf489afd8f",
|
|
33
33
|
"engines": {
|
|
34
34
|
"node": ">=16.15.1",
|
|
35
35
|
"npm": ">=8.11.0"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"comlink": "^4.4.1",
|
|
39
|
-
"@php-wasm/universal": "0.6.
|
|
40
|
-
"@php-wasm/util": "0.6.
|
|
41
|
-
"@php-wasm/web-service-worker": "0.6.
|
|
42
|
-
"@php-wasm/progress": "0.6.
|
|
39
|
+
"@php-wasm/universal": "0.6.16",
|
|
40
|
+
"@php-wasm/util": "0.6.16",
|
|
41
|
+
"@php-wasm/web-service-worker": "0.6.16",
|
|
42
|
+
"@php-wasm/progress": "0.6.16"
|
|
43
43
|
}
|
|
44
44
|
}
|