@php-wasm/node-7-4 3.0.42 → 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
@@ -7,13 +7,15 @@ const require = createRequire(import.meta.url);
7
7
  import path from 'path';
8
8
  import { fileURLToPath } from 'url';
9
9
 
10
+ // Determine the current directory path. In CJS mode, __dirname is available.
11
+ // In ESM mode, we derive it from import.meta.url.
10
12
  const currentDirPath =
11
13
  typeof __dirname !== 'undefined'
12
14
  ? __dirname
13
15
  : path.dirname(fileURLToPath(import.meta.url));
14
16
  const dependencyFilename = path.join(currentDirPath, '7_4_33', 'php_7_4.wasm');
15
17
  export { dependencyFilename };
16
- export const dependenciesTotalSize = 22934485;
18
+ export const dependenciesTotalSize = 22934545;
17
19
  const phpVersionString = '7.4.33';
18
20
  export function init(RuntimeName, PHPLoader) {
19
21
  // The rest of the code comes from the built php.js file and esm-suffix.js
@@ -31327,6 +31329,27 @@ export function init(RuntimeName, PHPLoader) {
31327
31329
 
31328
31330
  var _getdtablesize = () => abort('missing function: ${name}');
31329
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
+
31330
31353
  var webSockets = new HandleAllocator();
31331
31354
 
31332
31355
  var WS = {
@@ -31746,6 +31769,10 @@ export function init(RuntimeName, PHPLoader) {
31746
31769
  // invocation, so that we will immediately be able to queue the newest
31747
31770
  // produced audio samples.
31748
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
+ }
31749
31776
  // End JS library code
31750
31777
 
31751
31778
  // include: postlibrary.js
@@ -31781,6 +31808,9 @@ export function init(RuntimeName, PHPLoader) {
31781
31808
  Module['addRunDependency'] = addRunDependency;
31782
31809
  Module['removeRunDependency'] = removeRunDependency;
31783
31810
  Module['ccall'] = ccall;
31811
+ Module['UTF8ToString'] = UTF8ToString;
31812
+ Module['stringToUTF8'] = stringToUTF8;
31813
+ Module['lengthBytesUTF8'] = lengthBytesUTF8;
31784
31814
  Module['FS_preloadFile'] = FS_preloadFile;
31785
31815
  Module['FS_unlink'] = FS_unlink;
31786
31816
  Module['FS_createPath'] = FS_createPath;
@@ -31810,13 +31840,13 @@ export function init(RuntimeName, PHPLoader) {
31810
31840
  // end include: postlibrary.js
31811
31841
 
31812
31842
  var ASM_CONSTS = {
31813
- 11305393: ($0) => {
31843
+ 11305425: ($0) => {
31814
31844
  if (!$0) {
31815
31845
  AL.alcErr = 0xa004;
31816
31846
  return 1;
31817
31847
  }
31818
31848
  },
31819
- 11305441: ($0) => {
31849
+ 11305473: ($0) => {
31820
31850
  if (!AL.currentCtx) {
31821
31851
  err('alGetProcAddress() called without a valid context');
31822
31852
  return 1;
@@ -32299,7 +32329,7 @@ export function init(RuntimeName, PHPLoader) {
32299
32329
  wasmExports['__indirect_function_table'];
32300
32330
  }
32301
32331
 
32302
- var ___heap_base = 12520320;
32332
+ var ___heap_base = 12520384;
32303
32333
 
32304
32334
  var wasmImports = {
32305
32335
  /** @export */
@@ -32761,6 +32791,8 @@ export function init(RuntimeName, PHPLoader) {
32761
32791
  /** @export */
32762
32792
  __cxa_throw: ___cxa_throw,
32763
32793
  /** @export */
32794
+ __emscripten_lookup_name: ___emscripten_lookup_name,
32795
+ /** @export */
32764
32796
  __resumeException: ___resumeException,
32765
32797
  /** @export */
32766
32798
  __syscall__newselect: ___syscall__newselect,
Binary file
package/jspi/php_7_4.js CHANGED
@@ -7,13 +7,15 @@ const require = createRequire(import.meta.url);
7
7
  import path from 'path';
8
8
  import { fileURLToPath } from 'url';
9
9
 
10
+ // Determine the current directory path. In CJS mode, __dirname is available.
11
+ // In ESM mode, we derive it from import.meta.url.
10
12
  const currentDirPath =
11
13
  typeof __dirname !== 'undefined'
12
14
  ? __dirname
13
15
  : path.dirname(fileURLToPath(import.meta.url));
14
16
  const dependencyFilename = path.join(currentDirPath, '7_4_33', 'php_7_4.wasm');
15
17
  export { dependencyFilename };
16
- export const dependenciesTotalSize = 22427158;
18
+ export const dependenciesTotalSize = 22427191;
17
19
  const phpVersionString = '7.4.33';
18
20
  export function init(RuntimeName, PHPLoader) {
19
21
  // The rest of the code comes from the built php.js file and esm-suffix.js
@@ -18005,7 +18007,7 @@ export function init(RuntimeName, PHPLoader) {
18005
18007
  var Asyncify = {
18006
18008
  instrumentWasmImports(imports) {
18007
18009
  var importPattern =
18008
- /^(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__.*)$/;
18010
+ /^(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__.*)$/;
18009
18011
 
18010
18012
  for (let [x, original] of Object.entries(imports)) {
18011
18013
  if (typeof original == 'function') {
@@ -30522,6 +30524,31 @@ export function init(RuntimeName, PHPLoader) {
30522
30524
 
30523
30525
  var _getdtablesize = () => abort('missing function: ${name}');
30524
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
+
30525
30552
  var webSockets = new HandleAllocator();
30526
30553
 
30527
30554
  var WS = {
@@ -30913,6 +30940,11 @@ export function init(RuntimeName, PHPLoader) {
30913
30940
  // invocation, so that we will immediately be able to queue the newest
30914
30941
  // produced audio samples.
30915
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;
30916
30948
  // End JS library code
30917
30949
 
30918
30950
  // include: postlibrary.js
@@ -30948,6 +30980,9 @@ export function init(RuntimeName, PHPLoader) {
30948
30980
  Module['addRunDependency'] = addRunDependency;
30949
30981
  Module['removeRunDependency'] = removeRunDependency;
30950
30982
  Module['ccall'] = ccall;
30983
+ Module['UTF8ToString'] = UTF8ToString;
30984
+ Module['stringToUTF8'] = stringToUTF8;
30985
+ Module['lengthBytesUTF8'] = lengthBytesUTF8;
30951
30986
  Module['FS_preloadFile'] = FS_preloadFile;
30952
30987
  Module['FS_unlink'] = FS_unlink;
30953
30988
  Module['FS_createPath'] = FS_createPath;
@@ -30974,13 +31009,13 @@ export function init(RuntimeName, PHPLoader) {
30974
31009
  // end include: postlibrary.js
30975
31010
 
30976
31011
  var ASM_CONSTS = {
30977
- 11305954: ($0) => {
31012
+ 11305986: ($0) => {
30978
31013
  if (!$0) {
30979
31014
  AL.alcErr = 0xa004;
30980
31015
  return 1;
30981
31016
  }
30982
31017
  },
30983
- 11306002: ($0) => {
31018
+ 11306034: ($0) => {
30984
31019
  if (!AL.currentCtx) {
30985
31020
  err('alGetProcAddress() called without a valid context');
30986
31021
  return 1;
@@ -31468,7 +31503,7 @@ export function init(RuntimeName, PHPLoader) {
31468
31503
  ___cpp_exception = wasmExports['__cpp_exception'];
31469
31504
  }
31470
31505
 
31471
- var ___heap_base = 12521440;
31506
+ var ___heap_base = 12521504;
31472
31507
 
31473
31508
  var wasmImports = {
31474
31509
  /** @export */
@@ -31908,6 +31943,8 @@ export function init(RuntimeName, PHPLoader) {
31908
31943
  /** @export */
31909
31944
  __call_sighandler: ___call_sighandler,
31910
31945
  /** @export */
31946
+ __emscripten_lookup_name: ___emscripten_lookup_name,
31947
+ /** @export */
31911
31948
  __syscall__newselect: ___syscall__newselect,
31912
31949
  /** @export */
31913
31950
  __syscall_accept4: ___syscall_accept4,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@php-wasm/node-7-4",
3
- "version": "3.0.42",
3
+ "version": "3.0.44",
4
4
  "description": "PHP 7.4 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": "5f92a69369203e2926e08c3a690c7d3baafd2744",
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.42"
43
+ "@php-wasm/universal": "3.0.44"
44
44
  },
45
45
  "packageManager": "npm@10.9.2",
46
46
  "overrides": {