@php-wasm/node-8-3 3.0.43 → 3.0.44

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.
Binary file
@@ -15,7 +15,7 @@ const currentDirPath =
15
15
  : path.dirname(fileURLToPath(import.meta.url));
16
16
  const dependencyFilename = path.join(currentDirPath, '8_3_30', 'php_8_3.wasm');
17
17
  export { dependencyFilename };
18
- export const dependenciesTotalSize = 27940026;
18
+ export const dependenciesTotalSize = 27940027;
19
19
  const phpVersionString = '8.3.30';
20
20
  export function init(RuntimeName, PHPLoader) {
21
21
  // The rest of the code comes from the built php.js file and esm-suffix.js
@@ -31329,6 +31329,27 @@ export function init(RuntimeName, PHPLoader) {
31329
31329
  });
31330
31330
  };
31331
31331
 
31332
+ function ___emscripten_lookup_name(namePtr) {
31333
+ if (!ENVIRONMENT_IS_NODE) {
31334
+ return original__emscripten_lookup_name(namePtr);
31335
+ }
31336
+ if (!PHPLoader.syscalls) {
31337
+ return original__emscripten_lookup_name(namePtr);
31338
+ }
31339
+
31340
+ const hostname = UTF8ToString(namePtr);
31341
+
31342
+ let ipString = '';
31343
+ try {
31344
+ ipString = PHPLoader.syscalls.gethostbyname(hostname);
31345
+ } catch (e) {
31346
+ // Fall through to the default synthetic mapping if native DNS fails.
31347
+ }
31348
+
31349
+ return inetPton4(ipString);
31350
+ }
31351
+ ___emscripten_lookup_name.sig = 'ip';
31352
+
31332
31353
  var webSockets = new HandleAllocator();
31333
31354
 
31334
31355
  var WS = {
@@ -31748,6 +31769,10 @@ export function init(RuntimeName, PHPLoader) {
31748
31769
  // invocation, so that we will immediately be able to queue the newest
31749
31770
  // produced audio samples.
31750
31771
  registerPostMainLoop(() => SDL.audio?.queueNewAudioData?.());
31772
+ const original__emscripten_lookup_name = __emscripten_lookup_name;
31773
+ if (typeof __emscripten_lookup_name !== 'undefined') {
31774
+ __emscripten_lookup_name = ___emscripten_lookup_name;
31775
+ }
31751
31776
  // End JS library code
31752
31777
 
31753
31778
  // include: postlibrary.js
@@ -31783,6 +31808,9 @@ export function init(RuntimeName, PHPLoader) {
31783
31808
  Module['addRunDependency'] = addRunDependency;
31784
31809
  Module['removeRunDependency'] = removeRunDependency;
31785
31810
  Module['ccall'] = ccall;
31811
+ Module['UTF8ToString'] = UTF8ToString;
31812
+ Module['stringToUTF8'] = stringToUTF8;
31813
+ Module['lengthBytesUTF8'] = lengthBytesUTF8;
31786
31814
  Module['FS_preloadFile'] = FS_preloadFile;
31787
31815
  Module['FS_unlink'] = FS_unlink;
31788
31816
  Module['FS_createPath'] = FS_createPath;
@@ -32763,6 +32791,8 @@ export function init(RuntimeName, PHPLoader) {
32763
32791
  /** @export */
32764
32792
  __cxa_throw: ___cxa_throw,
32765
32793
  /** @export */
32794
+ __emscripten_lookup_name: ___emscripten_lookup_name,
32795
+ /** @export */
32766
32796
  __resumeException: ___resumeException,
32767
32797
  /** @export */
32768
32798
  __syscall__newselect: ___syscall__newselect,
Binary file
package/jspi/php_8_3.js CHANGED
@@ -18015,7 +18015,7 @@ export function init(RuntimeName, PHPLoader) {
18015
18015
  var Asyncify = {
18016
18016
  instrumentWasmImports(imports) {
18017
18017
  var importPattern =
18018
- /^(js_open_process|js_fd_read|js_waitpid|js_process_status|js_create_input_device|wasm_setsockopt|wasm_shutdown|wasm_close|wasm_recv|__syscall_fcntl64|js_flock|js_release_file_locks|js_waitpid|invoke_.*|__asyncjs__.*)$/;
18018
+ /^(js_open_process|js_fd_read|js_waitpid|js_process_status|js_create_input_device|wasm_setsockopt|wasm_shutdown|wasm_close|wasm_recv|__syscall_fcntl64|__emscripten_lookup_name|js_flock|js_release_file_locks|js_waitpid|invoke_.*|__asyncjs__.*)$/;
18019
18019
 
18020
18020
  for (let [x, original] of Object.entries(imports)) {
18021
18021
  if (typeof original == 'function') {
@@ -30524,6 +30524,31 @@ export function init(RuntimeName, PHPLoader) {
30524
30524
  });
30525
30525
  };
30526
30526
 
30527
+ var ___emscripten_lookup_name = function __emscripten_lookup_name(namePtr) {
30528
+ return Asyncify.handleAsync(async () => {
30529
+ if (!ENVIRONMENT_IS_NODE) {
30530
+ return original__emscripten_lookup_name(namePtr);
30531
+ }
30532
+ if (!PHPLoader.syscalls) {
30533
+ return original__emscripten_lookup_name(namePtr);
30534
+ }
30535
+
30536
+ const hostname = UTF8ToString(namePtr);
30537
+
30538
+ let ipString = '';
30539
+ try {
30540
+ ipString = await Promise.resolve(
30541
+ PHPLoader.syscalls.gethostbyname(hostname)
30542
+ );
30543
+ } catch (e) {
30544
+ // Fall through to the default synthetic mapping if native DNS fails.
30545
+ }
30546
+
30547
+ return inetPton4(ipString);
30548
+ });
30549
+ };
30550
+ ___emscripten_lookup_name.sig = 'ip';
30551
+
30527
30552
  var webSockets = new HandleAllocator();
30528
30553
 
30529
30554
  var WS = {
@@ -30915,6 +30940,11 @@ export function init(RuntimeName, PHPLoader) {
30915
30940
  // invocation, so that we will immediately be able to queue the newest
30916
30941
  // produced audio samples.
30917
30942
  registerPostMainLoop(() => SDL.audio?.queueNewAudioData?.());
30943
+ const original__emscripten_lookup_name = __emscripten_lookup_name;
30944
+ if (typeof __emscripten_lookup_name !== 'undefined') {
30945
+ __emscripten_lookup_name = ___emscripten_lookup_name;
30946
+ }
30947
+ ___emscripten_lookup_name.isAsync = true;
30918
30948
  // End JS library code
30919
30949
 
30920
30950
  // include: postlibrary.js
@@ -30950,6 +30980,9 @@ export function init(RuntimeName, PHPLoader) {
30950
30980
  Module['addRunDependency'] = addRunDependency;
30951
30981
  Module['removeRunDependency'] = removeRunDependency;
30952
30982
  Module['ccall'] = ccall;
30983
+ Module['UTF8ToString'] = UTF8ToString;
30984
+ Module['stringToUTF8'] = stringToUTF8;
30985
+ Module['lengthBytesUTF8'] = lengthBytesUTF8;
30953
30986
  Module['FS_preloadFile'] = FS_preloadFile;
30954
30987
  Module['FS_unlink'] = FS_unlink;
30955
30988
  Module['FS_createPath'] = FS_createPath;
@@ -31910,6 +31943,8 @@ export function init(RuntimeName, PHPLoader) {
31910
31943
  /** @export */
31911
31944
  __call_sighandler: ___call_sighandler,
31912
31945
  /** @export */
31946
+ __emscripten_lookup_name: ___emscripten_lookup_name,
31947
+ /** @export */
31913
31948
  __syscall__newselect: ___syscall__newselect,
31914
31949
  /** @export */
31915
31950
  __syscall_accept4: ___syscall_accept4,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@php-wasm/node-8-3",
3
- "version": "3.0.43",
3
+ "version": "3.0.44",
4
4
  "description": "PHP 8.3 WebAssembly binaries for node",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,12 +35,12 @@
35
35
  "node": ">=20.18.3",
36
36
  "npm": ">=10.1.0"
37
37
  },
38
- "gitHead": "a73661b5ec1f5d4bd2b1cd29789625d80561ff85",
38
+ "gitHead": "16881b9b024e961a5254be5b366fad096585c310",
39
39
  "dependencies": {
40
40
  "ini": "4.1.2",
41
41
  "wasm-feature-detect": "1.8.0",
42
42
  "ws": "8.18.3",
43
- "@php-wasm/universal": "3.0.43"
43
+ "@php-wasm/universal": "3.0.44"
44
44
  },
45
45
  "packageManager": "npm@10.9.2",
46
46
  "overrides": {