@php-wasm/web-8-1 3.1.20 → 3.1.22
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/asyncify/8_1_34/php_8_1.wasm +0 -0
- package/asyncify/php_8_1.js +10140 -82
- package/jspi/8_1_34/php_8_1.wasm +0 -0
- package/jspi/php_8_1.js +40 -20
- package/package.json +3 -3
package/jspi/8_1_34/php_8_1.wasm
CHANGED
|
Binary file
|
package/jspi/php_8_1.js
CHANGED
|
@@ -7017,7 +7017,11 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
7017
7017
|
stdoutParentFd = std[1]?.parent,
|
|
7018
7018
|
stderrChildFd = std[2]?.child,
|
|
7019
7019
|
stderrParentFd = std[2]?.parent;
|
|
7020
|
+
const detachPipeDataListeners = [];
|
|
7020
7021
|
cp.on('exit', function (code) {
|
|
7022
|
+
for (const detach of detachPipeDataListeners) {
|
|
7023
|
+
detach();
|
|
7024
|
+
}
|
|
7021
7025
|
for (const fd of [stdoutChildFd, stderrChildFd, stdinChildFd]) {
|
|
7022
7026
|
if (FS.streams[fd] && !FS.isClosed(FS.streams[fd])) {
|
|
7023
7027
|
FS.close(FS.streams[fd]);
|
|
@@ -7029,30 +7033,46 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
7029
7033
|
if (stdoutChildFd) {
|
|
7030
7034
|
const stdoutStream = SYSCALLS.getStreamFromFD(stdoutChildFd);
|
|
7031
7035
|
let stdoutAt = 0;
|
|
7032
|
-
|
|
7033
|
-
|
|
7034
|
-
stdoutStream
|
|
7035
|
-
|
|
7036
|
-
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
|
|
7036
|
+
const onStdoutData = function (data) {
|
|
7037
|
+
try {
|
|
7038
|
+
stdoutStream.stream_ops.write(
|
|
7039
|
+
stdoutStream,
|
|
7040
|
+
data,
|
|
7041
|
+
0,
|
|
7042
|
+
data.length,
|
|
7043
|
+
stdoutAt
|
|
7044
|
+
);
|
|
7045
|
+
stdoutAt += data.length;
|
|
7046
|
+
} catch {
|
|
7047
|
+
cp.stdout.off('data', onStdoutData);
|
|
7048
|
+
}
|
|
7049
|
+
};
|
|
7050
|
+
cp.stdout.on('data', onStdoutData);
|
|
7051
|
+
detachPipeDataListeners.push(() =>
|
|
7052
|
+
cp.stdout.off('data', onStdoutData)
|
|
7053
|
+
);
|
|
7042
7054
|
}
|
|
7043
7055
|
if (stderrChildFd) {
|
|
7044
7056
|
const stderrStream = SYSCALLS.getStreamFromFD(stderrChildFd);
|
|
7045
7057
|
let stderrAt = 0;
|
|
7046
|
-
|
|
7047
|
-
|
|
7048
|
-
stderrStream
|
|
7049
|
-
|
|
7050
|
-
|
|
7051
|
-
|
|
7052
|
-
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
|
|
7058
|
+
const onStderrData = function (data) {
|
|
7059
|
+
try {
|
|
7060
|
+
stderrStream.stream_ops.write(
|
|
7061
|
+
stderrStream,
|
|
7062
|
+
data,
|
|
7063
|
+
0,
|
|
7064
|
+
data.length,
|
|
7065
|
+
stderrAt
|
|
7066
|
+
);
|
|
7067
|
+
stderrAt += data.length;
|
|
7068
|
+
} catch {
|
|
7069
|
+
cp.stderr.off('data', onStderrData);
|
|
7070
|
+
}
|
|
7071
|
+
};
|
|
7072
|
+
cp.stderr.on('data', onStderrData);
|
|
7073
|
+
detachPipeDataListeners.push(() =>
|
|
7074
|
+
cp.stderr.off('data', onStderrData)
|
|
7075
|
+
);
|
|
7056
7076
|
}
|
|
7057
7077
|
try {
|
|
7058
7078
|
await new Promise((resolve, reject) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@php-wasm/web-8-1",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.22",
|
|
4
4
|
"description": "PHP 8.1 WebAssembly binaries for web",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"node": ">=20.10.0",
|
|
36
36
|
"npm": ">=10.2.3"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "04c986b63dd56fe74e4ed0cf04d00cae7ac050bf",
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"ini": "4.1.2",
|
|
41
41
|
"wasm-feature-detect": "1.8.0",
|
|
42
|
-
"@php-wasm/universal": "3.1.
|
|
42
|
+
"@php-wasm/universal": "3.1.22"
|
|
43
43
|
},
|
|
44
44
|
"packageManager": "npm@10.9.2",
|
|
45
45
|
"overrides": {
|