@php-wasm/web-8-1 3.1.19 → 3.1.21
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 +41 -21
- package/jspi/8_1_34/php_8_1.wasm +0 -0
- package/jspi/php_8_1.js +40 -20
- package/package.json +5 -4
|
Binary file
|
package/asyncify/php_8_1.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dependencyFilename from './8_1_34/php_8_1.wasm';
|
|
2
2
|
export { dependencyFilename };
|
|
3
|
-
export const dependenciesTotalSize =
|
|
3
|
+
export const dependenciesTotalSize = 20775956;
|
|
4
4
|
const phpVersionString = '8.1.34';
|
|
5
5
|
export function init(RuntimeName, PHPLoader) {
|
|
6
6
|
// The rest of the code comes from the built php.js file and esm-suffix.js
|
|
@@ -7147,7 +7147,11 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
7147
7147
|
stdoutParentFd = std[1]?.parent,
|
|
7148
7148
|
stderrChildFd = std[2]?.child,
|
|
7149
7149
|
stderrParentFd = std[2]?.parent;
|
|
7150
|
+
const detachPipeDataListeners = [];
|
|
7150
7151
|
cp.on('exit', function (code) {
|
|
7152
|
+
for (const detach of detachPipeDataListeners) {
|
|
7153
|
+
detach();
|
|
7154
|
+
}
|
|
7151
7155
|
for (const fd of [stdoutChildFd, stderrChildFd, stdinChildFd]) {
|
|
7152
7156
|
if (FS.streams[fd] && !FS.isClosed(FS.streams[fd])) {
|
|
7153
7157
|
FS.close(FS.streams[fd]);
|
|
@@ -7159,30 +7163,46 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
7159
7163
|
if (stdoutChildFd) {
|
|
7160
7164
|
const stdoutStream = SYSCALLS.getStreamFromFD(stdoutChildFd);
|
|
7161
7165
|
let stdoutAt = 0;
|
|
7162
|
-
|
|
7163
|
-
|
|
7164
|
-
stdoutStream
|
|
7165
|
-
|
|
7166
|
-
|
|
7167
|
-
|
|
7168
|
-
|
|
7169
|
-
|
|
7170
|
-
|
|
7171
|
-
|
|
7166
|
+
const onStdoutData = function (data) {
|
|
7167
|
+
try {
|
|
7168
|
+
stdoutStream.stream_ops.write(
|
|
7169
|
+
stdoutStream,
|
|
7170
|
+
data,
|
|
7171
|
+
0,
|
|
7172
|
+
data.length,
|
|
7173
|
+
stdoutAt
|
|
7174
|
+
);
|
|
7175
|
+
stdoutAt += data.length;
|
|
7176
|
+
} catch {
|
|
7177
|
+
cp.stdout.off('data', onStdoutData);
|
|
7178
|
+
}
|
|
7179
|
+
};
|
|
7180
|
+
cp.stdout.on('data', onStdoutData);
|
|
7181
|
+
detachPipeDataListeners.push(() =>
|
|
7182
|
+
cp.stdout.off('data', onStdoutData)
|
|
7183
|
+
);
|
|
7172
7184
|
}
|
|
7173
7185
|
if (stderrChildFd) {
|
|
7174
7186
|
const stderrStream = SYSCALLS.getStreamFromFD(stderrChildFd);
|
|
7175
7187
|
let stderrAt = 0;
|
|
7176
|
-
|
|
7177
|
-
|
|
7178
|
-
stderrStream
|
|
7179
|
-
|
|
7180
|
-
|
|
7181
|
-
|
|
7182
|
-
|
|
7183
|
-
|
|
7184
|
-
|
|
7185
|
-
|
|
7188
|
+
const onStderrData = function (data) {
|
|
7189
|
+
try {
|
|
7190
|
+
stderrStream.stream_ops.write(
|
|
7191
|
+
stderrStream,
|
|
7192
|
+
data,
|
|
7193
|
+
0,
|
|
7194
|
+
data.length,
|
|
7195
|
+
stderrAt
|
|
7196
|
+
);
|
|
7197
|
+
stderrAt += data.length;
|
|
7198
|
+
} catch {
|
|
7199
|
+
cp.stderr.off('data', onStderrData);
|
|
7200
|
+
}
|
|
7201
|
+
};
|
|
7202
|
+
cp.stderr.on('data', onStderrData);
|
|
7203
|
+
detachPipeDataListeners.push(() =>
|
|
7204
|
+
cp.stderr.off('data', onStderrData)
|
|
7205
|
+
);
|
|
7186
7206
|
}
|
|
7187
7207
|
try {
|
|
7188
7208
|
await new Promise((resolve, reject) => {
|
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.21",
|
|
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": "5864051cbf4c2a55656112d99a3f1b076bcd67cd",
|
|
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.21"
|
|
43
43
|
},
|
|
44
44
|
"packageManager": "npm@10.9.2",
|
|
45
45
|
"overrides": {
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"tmp": "0.2.5",
|
|
52
52
|
"form-data": "^4.0.4",
|
|
53
53
|
"lodash": "^4.17.23",
|
|
54
|
-
"glob": "^9.3.0"
|
|
54
|
+
"glob": "^9.3.0",
|
|
55
|
+
"webpackbar": "^7.0.0"
|
|
55
56
|
}
|
|
56
57
|
}
|