@php-wasm/web-7-4 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/7_4_33/php_7_4.wasm +0 -0
- package/asyncify/php_7_4.js +41 -21
- package/jspi/7_4_33/php_7_4.wasm +0 -0
- package/jspi/php_7_4.js +40 -20
- package/package.json +5 -4
|
Binary file
|
package/asyncify/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 = 16945307;
|
|
4
4
|
const phpVersionString = '7.4.33';
|
|
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
|
|
@@ -7136,7 +7136,11 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
7136
7136
|
stdoutParentFd = std[1]?.parent,
|
|
7137
7137
|
stderrChildFd = std[2]?.child,
|
|
7138
7138
|
stderrParentFd = std[2]?.parent;
|
|
7139
|
+
const detachPipeDataListeners = [];
|
|
7139
7140
|
cp.on('exit', function (code) {
|
|
7141
|
+
for (const detach of detachPipeDataListeners) {
|
|
7142
|
+
detach();
|
|
7143
|
+
}
|
|
7140
7144
|
for (const fd of [stdoutChildFd, stderrChildFd, stdinChildFd]) {
|
|
7141
7145
|
if (FS.streams[fd] && !FS.isClosed(FS.streams[fd])) {
|
|
7142
7146
|
FS.close(FS.streams[fd]);
|
|
@@ -7148,30 +7152,46 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
7148
7152
|
if (stdoutChildFd) {
|
|
7149
7153
|
const stdoutStream = SYSCALLS.getStreamFromFD(stdoutChildFd);
|
|
7150
7154
|
let stdoutAt = 0;
|
|
7151
|
-
|
|
7152
|
-
|
|
7153
|
-
stdoutStream
|
|
7154
|
-
|
|
7155
|
-
|
|
7156
|
-
|
|
7157
|
-
|
|
7158
|
-
|
|
7159
|
-
|
|
7160
|
-
|
|
7155
|
+
const onStdoutData = function (data) {
|
|
7156
|
+
try {
|
|
7157
|
+
stdoutStream.stream_ops.write(
|
|
7158
|
+
stdoutStream,
|
|
7159
|
+
data,
|
|
7160
|
+
0,
|
|
7161
|
+
data.length,
|
|
7162
|
+
stdoutAt
|
|
7163
|
+
);
|
|
7164
|
+
stdoutAt += data.length;
|
|
7165
|
+
} catch {
|
|
7166
|
+
cp.stdout.off('data', onStdoutData);
|
|
7167
|
+
}
|
|
7168
|
+
};
|
|
7169
|
+
cp.stdout.on('data', onStdoutData);
|
|
7170
|
+
detachPipeDataListeners.push(() =>
|
|
7171
|
+
cp.stdout.off('data', onStdoutData)
|
|
7172
|
+
);
|
|
7161
7173
|
}
|
|
7162
7174
|
if (stderrChildFd) {
|
|
7163
7175
|
const stderrStream = SYSCALLS.getStreamFromFD(stderrChildFd);
|
|
7164
7176
|
let stderrAt = 0;
|
|
7165
|
-
|
|
7166
|
-
|
|
7167
|
-
stderrStream
|
|
7168
|
-
|
|
7169
|
-
|
|
7170
|
-
|
|
7171
|
-
|
|
7172
|
-
|
|
7173
|
-
|
|
7174
|
-
|
|
7177
|
+
const onStderrData = function (data) {
|
|
7178
|
+
try {
|
|
7179
|
+
stderrStream.stream_ops.write(
|
|
7180
|
+
stderrStream,
|
|
7181
|
+
data,
|
|
7182
|
+
0,
|
|
7183
|
+
data.length,
|
|
7184
|
+
stderrAt
|
|
7185
|
+
);
|
|
7186
|
+
stderrAt += data.length;
|
|
7187
|
+
} catch {
|
|
7188
|
+
cp.stderr.off('data', onStderrData);
|
|
7189
|
+
}
|
|
7190
|
+
};
|
|
7191
|
+
cp.stderr.on('data', onStderrData);
|
|
7192
|
+
detachPipeDataListeners.push(() =>
|
|
7193
|
+
cp.stderr.off('data', onStderrData)
|
|
7194
|
+
);
|
|
7175
7195
|
}
|
|
7176
7196
|
try {
|
|
7177
7197
|
await new Promise((resolve, reject) => {
|
package/jspi/7_4_33/php_7_4.wasm
CHANGED
|
Binary file
|
package/jspi/php_7_4.js
CHANGED
|
@@ -7006,7 +7006,11 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
7006
7006
|
stdoutParentFd = std[1]?.parent,
|
|
7007
7007
|
stderrChildFd = std[2]?.child,
|
|
7008
7008
|
stderrParentFd = std[2]?.parent;
|
|
7009
|
+
const detachPipeDataListeners = [];
|
|
7009
7010
|
cp.on('exit', function (code) {
|
|
7011
|
+
for (const detach of detachPipeDataListeners) {
|
|
7012
|
+
detach();
|
|
7013
|
+
}
|
|
7010
7014
|
for (const fd of [stdoutChildFd, stderrChildFd, stdinChildFd]) {
|
|
7011
7015
|
if (FS.streams[fd] && !FS.isClosed(FS.streams[fd])) {
|
|
7012
7016
|
FS.close(FS.streams[fd]);
|
|
@@ -7018,30 +7022,46 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
7018
7022
|
if (stdoutChildFd) {
|
|
7019
7023
|
const stdoutStream = SYSCALLS.getStreamFromFD(stdoutChildFd);
|
|
7020
7024
|
let stdoutAt = 0;
|
|
7021
|
-
|
|
7022
|
-
|
|
7023
|
-
stdoutStream
|
|
7024
|
-
|
|
7025
|
-
|
|
7026
|
-
|
|
7027
|
-
|
|
7028
|
-
|
|
7029
|
-
|
|
7030
|
-
|
|
7025
|
+
const onStdoutData = function (data) {
|
|
7026
|
+
try {
|
|
7027
|
+
stdoutStream.stream_ops.write(
|
|
7028
|
+
stdoutStream,
|
|
7029
|
+
data,
|
|
7030
|
+
0,
|
|
7031
|
+
data.length,
|
|
7032
|
+
stdoutAt
|
|
7033
|
+
);
|
|
7034
|
+
stdoutAt += data.length;
|
|
7035
|
+
} catch {
|
|
7036
|
+
cp.stdout.off('data', onStdoutData);
|
|
7037
|
+
}
|
|
7038
|
+
};
|
|
7039
|
+
cp.stdout.on('data', onStdoutData);
|
|
7040
|
+
detachPipeDataListeners.push(() =>
|
|
7041
|
+
cp.stdout.off('data', onStdoutData)
|
|
7042
|
+
);
|
|
7031
7043
|
}
|
|
7032
7044
|
if (stderrChildFd) {
|
|
7033
7045
|
const stderrStream = SYSCALLS.getStreamFromFD(stderrChildFd);
|
|
7034
7046
|
let stderrAt = 0;
|
|
7035
|
-
|
|
7036
|
-
|
|
7037
|
-
stderrStream
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
|
|
7047
|
+
const onStderrData = function (data) {
|
|
7048
|
+
try {
|
|
7049
|
+
stderrStream.stream_ops.write(
|
|
7050
|
+
stderrStream,
|
|
7051
|
+
data,
|
|
7052
|
+
0,
|
|
7053
|
+
data.length,
|
|
7054
|
+
stderrAt
|
|
7055
|
+
);
|
|
7056
|
+
stderrAt += data.length;
|
|
7057
|
+
} catch {
|
|
7058
|
+
cp.stderr.off('data', onStderrData);
|
|
7059
|
+
}
|
|
7060
|
+
};
|
|
7061
|
+
cp.stderr.on('data', onStderrData);
|
|
7062
|
+
detachPipeDataListeners.push(() =>
|
|
7063
|
+
cp.stderr.off('data', onStderrData)
|
|
7064
|
+
);
|
|
7045
7065
|
}
|
|
7046
7066
|
try {
|
|
7047
7067
|
await new Promise((resolve, reject) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@php-wasm/web-7-4",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.21",
|
|
4
4
|
"description": "PHP 7.4 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
|
}
|