@php-wasm/web-8-5 3.1.62 → 3.1.63
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_5_12/php_8_5.wasm +0 -0
- package/asyncify/php_8_5.js +31 -27
- package/jspi/8_5_12/php_8_5.wasm +0 -0
- package/jspi/php_8_5.js +369 -365
- package/package.json +3 -3
|
Binary file
|
package/asyncify/php_8_5.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const dependencyFilename = new URL('./8_5_12/php_8_5.wasm', import.meta.url)
|
|
2
2
|
.href;
|
|
3
3
|
export { dependencyFilename };
|
|
4
|
-
export const dependenciesTotalSize =
|
|
4
|
+
export const dependenciesTotalSize = 21057841;
|
|
5
5
|
const phpVersionString = '8.5.12';
|
|
6
6
|
export function init(RuntimeName, PHPLoader) {
|
|
7
7
|
// The rest of the code comes from the built php.js file and esm-suffix.js
|
|
@@ -7188,13 +7188,11 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
7188
7188
|
envLength
|
|
7189
7189
|
) {
|
|
7190
7190
|
if (!command) {
|
|
7191
|
-
|
|
7192
|
-
return -1;
|
|
7191
|
+
return -ERRNO_CODES.EINVAL;
|
|
7193
7192
|
}
|
|
7194
7193
|
const cmdstr = UTF8ToString(command);
|
|
7195
7194
|
if (!cmdstr.length) {
|
|
7196
|
-
|
|
7197
|
-
return -1;
|
|
7195
|
+
return -ERRNO_CODES.EINVAL;
|
|
7198
7196
|
}
|
|
7199
7197
|
let argsArray = [];
|
|
7200
7198
|
if (argsLength) {
|
|
@@ -7249,13 +7247,11 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
7249
7247
|
}
|
|
7250
7248
|
} catch (e) {
|
|
7251
7249
|
if (e.code === 'SPAWN_UNSUPPORTED') {
|
|
7252
|
-
|
|
7253
|
-
return -1;
|
|
7250
|
+
return -ERRNO_CODES.ENOSYS;
|
|
7254
7251
|
}
|
|
7255
7252
|
if (typeof FS == 'undefined' || !(e.name === 'ErrnoError'))
|
|
7256
7253
|
throw e;
|
|
7257
|
-
|
|
7258
|
-
return -1;
|
|
7254
|
+
return -e.errno;
|
|
7259
7255
|
}
|
|
7260
7256
|
const ProcInfo = { pid: cp.pid, exited: false };
|
|
7261
7257
|
PHPWASM.processTable[ProcInfo.pid] = ProcInfo;
|
|
@@ -7266,7 +7262,12 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
7266
7262
|
stderrChildFd = std[2]?.child,
|
|
7267
7263
|
stderrParentFd = std[2]?.parent;
|
|
7268
7264
|
const detachPipeDataListeners = [];
|
|
7269
|
-
|
|
7265
|
+
let childPipesClosed = false;
|
|
7266
|
+
const closeChildPipes = function () {
|
|
7267
|
+
if (childPipesClosed) {
|
|
7268
|
+
return;
|
|
7269
|
+
}
|
|
7270
|
+
childPipesClosed = true;
|
|
7270
7271
|
for (const detach of detachPipeDataListeners) {
|
|
7271
7272
|
detach();
|
|
7272
7273
|
}
|
|
@@ -7275,6 +7276,9 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
7275
7276
|
FS.close(FS.streams[fd]);
|
|
7276
7277
|
}
|
|
7277
7278
|
}
|
|
7279
|
+
};
|
|
7280
|
+
cp.on('exit', function (code) {
|
|
7281
|
+
closeChildPipes();
|
|
7278
7282
|
ProcInfo.exitCode = code;
|
|
7279
7283
|
ProcInfo.exited = true;
|
|
7280
7284
|
});
|
|
@@ -7354,6 +7358,10 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
7354
7358
|
});
|
|
7355
7359
|
} catch (e) {
|
|
7356
7360
|
console.error(e);
|
|
7361
|
+
closeChildPipes();
|
|
7362
|
+
if (!ProcInfo.pid) {
|
|
7363
|
+
return -(ERRNO_CODES[e.code] ?? ERRNO_CODES.ECHILD);
|
|
7364
|
+
}
|
|
7357
7365
|
return ProcInfo.pid;
|
|
7358
7366
|
}
|
|
7359
7367
|
if (stdinChildFd) {
|
|
@@ -8216,10 +8224,7 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
8216
8224
|
return ERRNO_CODES.EWOULDBLOCK;
|
|
8217
8225
|
}
|
|
8218
8226
|
return returnCallback(async (wakeUp) => {
|
|
8219
|
-
var retries = 0;
|
|
8220
8227
|
var interval = 50;
|
|
8221
|
-
var timeout = 5e3;
|
|
8222
|
-
var maxRetries = timeout / interval;
|
|
8223
8228
|
while (true) {
|
|
8224
8229
|
var returnCode;
|
|
8225
8230
|
var stream;
|
|
@@ -8243,7 +8248,6 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
8243
8248
|
return wakeUp(0);
|
|
8244
8249
|
}
|
|
8245
8250
|
if (
|
|
8246
|
-
++retries > maxRetries ||
|
|
8247
8251
|
!stream ||
|
|
8248
8252
|
FS.isClosed(stream) ||
|
|
8249
8253
|
returnCode !== ERRNO_CODES.EWOULDBLOCK ||
|
|
@@ -9251,26 +9255,26 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
9251
9255
|
__indirect_function_table = wasmTable =
|
|
9252
9256
|
wasmExports['__indirect_function_table'];
|
|
9253
9257
|
}
|
|
9254
|
-
var _compiler_globals = (Module['_compiler_globals'] =
|
|
9255
|
-
var _executor_globals = (Module['_executor_globals'] =
|
|
9256
|
-
var _zend_ce_exception = (Module['_zend_ce_exception'] =
|
|
9258
|
+
var _compiler_globals = (Module['_compiler_globals'] = 17465320);
|
|
9259
|
+
var _executor_globals = (Module['_executor_globals'] = 17465736);
|
|
9260
|
+
var _zend_ce_exception = (Module['_zend_ce_exception'] = 17461756);
|
|
9257
9261
|
var _zend_empty_array = (Module['_zend_empty_array'] = 16964736);
|
|
9258
|
-
var _zend_ce_aggregate = (Module['_zend_ce_aggregate'] =
|
|
9259
|
-
var _zend_ce_iterator = (Module['_zend_ce_iterator'] =
|
|
9260
|
-
var _zend_ce_countable = (Module['_zend_ce_countable'] =
|
|
9262
|
+
var _zend_ce_aggregate = (Module['_zend_ce_aggregate'] = 17348128);
|
|
9263
|
+
var _zend_ce_iterator = (Module['_zend_ce_iterator'] = 17348132);
|
|
9264
|
+
var _zend_ce_countable = (Module['_zend_ce_countable'] = 17348144);
|
|
9261
9265
|
var _std_object_handlers = (Module['_std_object_handlers'] = 16962528);
|
|
9262
|
-
var _zend_empty_string = (Module['_zend_empty_string'] =
|
|
9263
|
-
var _zend_known_strings = (Module['_zend_known_strings'] =
|
|
9266
|
+
var _zend_empty_string = (Module['_zend_empty_string'] = 17463028);
|
|
9267
|
+
var _zend_known_strings = (Module['_zend_known_strings'] = 17463032);
|
|
9264
9268
|
var _zend_string_init_interned = (Module['_zend_string_init_interned'] =
|
|
9265
|
-
|
|
9269
|
+
17463100);
|
|
9266
9270
|
var ___memory_base = (Module['___memory_base'] = 0);
|
|
9267
9271
|
var ___table_base = (Module['___table_base'] = 1);
|
|
9268
9272
|
var _stdout = (Module['_stdout'] = 17341120);
|
|
9269
|
-
var _timezone = (Module['_timezone'] =
|
|
9270
|
-
var _tzname = (Module['_tzname'] =
|
|
9271
|
-
var ___heap_base =
|
|
9273
|
+
var _timezone = (Module['_timezone'] = 17796504);
|
|
9274
|
+
var _tzname = (Module['_tzname'] = 17796512);
|
|
9275
|
+
var ___heap_base = 18858208;
|
|
9272
9276
|
var __ZNSt3__25ctypeIcE2idE = (Module['__ZNSt3__25ctypeIcE2idE'] =
|
|
9273
|
-
|
|
9277
|
+
17809620);
|
|
9274
9278
|
var __ZTVN10__cxxabiv120__si_class_type_infoE = (Module[
|
|
9275
9279
|
'__ZTVN10__cxxabiv120__si_class_type_infoE'
|
|
9276
9280
|
] = 17341368);
|
package/jspi/8_5_12/php_8_5.wasm
CHANGED
|
Binary file
|