@php-wasm/node 2.0.5 → 2.0.8

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/index.js CHANGED
@@ -677,7 +677,7 @@ function init2(RuntimeName, PHPLoader) {
677
677
  };
678
678
  var wasmTableMirror = [];
679
679
  var wasmTable = new WebAssembly.Table({
680
- initial: 16555,
680
+ initial: 16556,
681
681
  element: "anyfunc"
682
682
  });
683
683
  var getWasmTableEntry = (funcPtr) => {
@@ -5752,27 +5752,21 @@ function init2(RuntimeName, PHPLoader) {
5752
5752
  1: "exclusive",
5753
5753
  2: "unlocked"
5754
5754
  },
5755
- is_shared_fs_node(node) {
5756
- if (node?.isSharedFS) {
5757
- return true;
5758
- }
5759
- if (!node?.mount?.opts?.fs?.lookupPath || !node?.mount?.type?.realPath) {
5760
- return false;
5761
- }
5762
- if (node.mount.type !== NODEFS) {
5763
- return false;
5764
- }
5765
- const vfsPath = node.mount.type.realPath(node);
5766
- try {
5767
- const underlyingNode = node.mount.opts.fs.lookupPath(vfsPath)?.node;
5768
- return !!underlyingNode?.isSharedFS;
5769
- } catch (e) {
5770
- return false;
5771
- }
5772
- },
5773
5755
  is_path_to_shared_fs(path33) {
5774
- const { node } = FS.lookupPath(path33);
5775
- return locking.is_shared_fs_node(node);
5756
+ _js_wasm_trace("is_path_to_shared_fs(%s)", path33);
5757
+ const { node } = FS.lookupPath(path33, { noent_okay: true });
5758
+ if (node.mount.type !== PROXYFS) {
5759
+ return !!node.isSharedFS;
5760
+ }
5761
+ const nodePath2 = PROXYFS.realPath(node);
5762
+ const backingFs = node?.mount?.opts?.fs;
5763
+ if (backingFs) {
5764
+ const { node: backingNode } = backingFs.lookupPath(nodePath2, {
5765
+ noent_okay: true
5766
+ });
5767
+ return !!backingNode?.isSharedFS;
5768
+ }
5769
+ return false;
5776
5770
  },
5777
5771
  get_fd_access_mode(fd) {
5778
5772
  const emscripten_F_GETFL = Number("3");
@@ -5787,8 +5781,23 @@ function init2(RuntimeName, PHPLoader) {
5787
5781
  }
5788
5782
  },
5789
5783
  get_native_path_from_vfs_path(vfsPath) {
5790
- const { node } = FS.lookupPath(vfsPath);
5791
- return NODEFS.realPath(node);
5784
+ const { node } = FS.lookupPath(vfsPath, {});
5785
+ if (node.mount.type === NODEFS) {
5786
+ return NODEFS.realPath(node);
5787
+ } else if (node.mount.type === PROXYFS) {
5788
+ const { node: backingNode, path: backingPath } = node.mount.opts.fs.lookupPath(vfsPath);
5789
+ _js_wasm_trace(
5790
+ "backingNode for %s: %s",
5791
+ vfsPath,
5792
+ backingPath,
5793
+ backingNode
5794
+ );
5795
+ return backingNode.mount.type.realPath(backingNode);
5796
+ } else {
5797
+ throw new Error(
5798
+ `Unsupported filesystem type for path ${vfsPath}`
5799
+ );
5800
+ }
5792
5801
  },
5793
5802
  check_lock_params(fd, l_type) {
5794
5803
  const emscripten_O_RDONLY = Number("0");
@@ -25208,13 +25217,13 @@ ${e}`);
25208
25217
  Module["createContext"] = Browser.createContext;
25209
25218
  registerPostMainLoop(() => SDL.audio?.queueNewAudioData?.());
25210
25219
  var ASM_CONSTS = {
25211
- 16328094: ($0) => {
25220
+ 16328046: ($0) => {
25212
25221
  if (!$0) {
25213
25222
  AL.alcErr = 40964;
25214
25223
  return 1;
25215
25224
  }
25216
25225
  },
25217
- 16328142: ($0) => {
25226
+ 16328094: ($0) => {
25218
25227
  if (!AL.currentCtx) {
25219
25228
  err("alGetProcAddress() called without a valid context");
25220
25229
  return 1;
@@ -28059,15 +28068,15 @@ ${e}`);
28059
28068
  PHPLoader["malloc"] = _malloc;
28060
28069
  PHPLoader["free"] = typeof _free === "function" ? _free : PHPLoader["_wasm_free"];
28061
28070
  if (typeof NODEFS === "object") {
28062
- const originalCreateNode = NODEFS.createNode;
28071
+ const originalNodeFsCreateNode = NODEFS.createNode;
28063
28072
  NODEFS.createNode = function createNodeWithSharedFlag() {
28064
- const node = originalCreateNode.apply(NODEFS, arguments);
28073
+ const node = originalNodeFsCreateNode.apply(NODEFS, arguments);
28065
28074
  node.isSharedFS = true;
28066
28075
  return node;
28067
28076
  };
28068
28077
  var originalHashAddNode = FS.hashAddNode;
28069
28078
  FS.hashAddNode = function hashAddNodeIfNotSharedFS(node) {
28070
- if (typeof locking === "object" && locking?.is_shared_fs_node(node)) {
28079
+ if (node?.isSharedFS) {
28071
28080
  return;
28072
28081
  }
28073
28082
  return originalHashAddNode.apply(FS, arguments);
@@ -28083,9 +28092,9 @@ var dependencyFilename, dependenciesTotalSize, phpVersionString;
28083
28092
  var init_php_8_4 = __esm({
28084
28093
  "packages/php-wasm/node/jspi/php_8_4.js"() {
28085
28094
  "use strict";
28086
- dependencyFilename = path.join(__dirname + "/jspi", "8_4_10", "php_8_4.wasm");
28087
- dependenciesTotalSize = 36372438;
28088
- phpVersionString = "8.4.10";
28095
+ dependencyFilename = path.join(__dirname + "/jspi", "8_4_11", "php_8_4.wasm");
28096
+ dependenciesTotalSize = 36373389;
28097
+ phpVersionString = "8.4.11";
28089
28098
  }
28090
28099
  });
28091
28100
 
@@ -28746,7 +28755,7 @@ function init3(RuntimeName, PHPLoader) {
28746
28755
  };
28747
28756
  var wasmTableMirror = [];
28748
28757
  var wasmTable = new WebAssembly.Table({
28749
- initial: 15738,
28758
+ initial: 15739,
28750
28759
  element: "anyfunc"
28751
28760
  });
28752
28761
  var getWasmTableEntry = (funcPtr) => {
@@ -33821,27 +33830,21 @@ function init3(RuntimeName, PHPLoader) {
33821
33830
  1: "exclusive",
33822
33831
  2: "unlocked"
33823
33832
  },
33824
- is_shared_fs_node(node) {
33825
- if (node?.isSharedFS) {
33826
- return true;
33827
- }
33828
- if (!node?.mount?.opts?.fs?.lookupPath || !node?.mount?.type?.realPath) {
33829
- return false;
33830
- }
33831
- if (node.mount.type !== NODEFS) {
33832
- return false;
33833
- }
33834
- const vfsPath = node.mount.type.realPath(node);
33835
- try {
33836
- const underlyingNode = node.mount.opts.fs.lookupPath(vfsPath)?.node;
33837
- return !!underlyingNode?.isSharedFS;
33838
- } catch (e) {
33839
- return false;
33840
- }
33841
- },
33842
33833
  is_path_to_shared_fs(path33) {
33843
- const { node } = FS.lookupPath(path33);
33844
- return locking.is_shared_fs_node(node);
33834
+ _js_wasm_trace("is_path_to_shared_fs(%s)", path33);
33835
+ const { node } = FS.lookupPath(path33, { noent_okay: true });
33836
+ if (node.mount.type !== PROXYFS) {
33837
+ return !!node.isSharedFS;
33838
+ }
33839
+ const nodePath2 = PROXYFS.realPath(node);
33840
+ const backingFs = node?.mount?.opts?.fs;
33841
+ if (backingFs) {
33842
+ const { node: backingNode } = backingFs.lookupPath(nodePath2, {
33843
+ noent_okay: true
33844
+ });
33845
+ return !!backingNode?.isSharedFS;
33846
+ }
33847
+ return false;
33845
33848
  },
33846
33849
  get_fd_access_mode(fd) {
33847
33850
  const emscripten_F_GETFL = Number("3");
@@ -33856,8 +33859,23 @@ function init3(RuntimeName, PHPLoader) {
33856
33859
  }
33857
33860
  },
33858
33861
  get_native_path_from_vfs_path(vfsPath) {
33859
- const { node } = FS.lookupPath(vfsPath);
33860
- return NODEFS.realPath(node);
33862
+ const { node } = FS.lookupPath(vfsPath, {});
33863
+ if (node.mount.type === NODEFS) {
33864
+ return NODEFS.realPath(node);
33865
+ } else if (node.mount.type === PROXYFS) {
33866
+ const { node: backingNode, path: backingPath } = node.mount.opts.fs.lookupPath(vfsPath);
33867
+ _js_wasm_trace(
33868
+ "backingNode for %s: %s",
33869
+ vfsPath,
33870
+ backingPath,
33871
+ backingNode
33872
+ );
33873
+ return backingNode.mount.type.realPath(backingNode);
33874
+ } else {
33875
+ throw new Error(
33876
+ `Unsupported filesystem type for path ${vfsPath}`
33877
+ );
33878
+ }
33861
33879
  },
33862
33880
  check_lock_params(fd, l_type) {
33863
33881
  const emscripten_O_RDONLY = Number("0");
@@ -53277,13 +53295,13 @@ ${e}`);
53277
53295
  Module["createContext"] = Browser.createContext;
53278
53296
  registerPostMainLoop(() => SDL.audio?.queueNewAudioData?.());
53279
53297
  var ASM_CONSTS = {
53280
- 13232622: ($0) => {
53298
+ 13232510: ($0) => {
53281
53299
  if (!$0) {
53282
53300
  AL.alcErr = 40964;
53283
53301
  return 1;
53284
53302
  }
53285
53303
  },
53286
- 13232670: ($0) => {
53304
+ 13232558: ($0) => {
53287
53305
  if (!AL.currentCtx) {
53288
53306
  err("alGetProcAddress() called without a valid context");
53289
53307
  return 1;
@@ -56128,15 +56146,15 @@ ${e}`);
56128
56146
  PHPLoader["malloc"] = _malloc;
56129
56147
  PHPLoader["free"] = typeof _free === "function" ? _free : PHPLoader["_wasm_free"];
56130
56148
  if (typeof NODEFS === "object") {
56131
- const originalCreateNode = NODEFS.createNode;
56149
+ const originalNodeFsCreateNode = NODEFS.createNode;
56132
56150
  NODEFS.createNode = function createNodeWithSharedFlag() {
56133
- const node = originalCreateNode.apply(NODEFS, arguments);
56151
+ const node = originalNodeFsCreateNode.apply(NODEFS, arguments);
56134
56152
  node.isSharedFS = true;
56135
56153
  return node;
56136
56154
  };
56137
56155
  var originalHashAddNode = FS.hashAddNode;
56138
56156
  FS.hashAddNode = function hashAddNodeIfNotSharedFS(node) {
56139
- if (typeof locking === "object" && locking?.is_shared_fs_node(node)) {
56157
+ if (node?.isSharedFS) {
56140
56158
  return;
56141
56159
  }
56142
56160
  return originalHashAddNode.apply(FS, arguments);
@@ -56152,9 +56170,9 @@ var dependencyFilename2, dependenciesTotalSize2, phpVersionString2;
56152
56170
  var init_php_8_3 = __esm({
56153
56171
  "packages/php-wasm/node/jspi/php_8_3.js"() {
56154
56172
  "use strict";
56155
- dependencyFilename2 = path2.join(__dirname + "/jspi", "8_3_23", "php_8_3.wasm");
56156
- dependenciesTotalSize2 = 32571921;
56157
- phpVersionString2 = "8.3.23";
56173
+ dependencyFilename2 = path2.join(__dirname + "/jspi", "8_3_24", "php_8_3.wasm");
56174
+ dependenciesTotalSize2 = 32572592;
56175
+ phpVersionString2 = "8.3.24";
56158
56176
  }
56159
56177
  });
56160
56178
 
@@ -61890,27 +61908,21 @@ function init4(RuntimeName, PHPLoader) {
61890
61908
  1: "exclusive",
61891
61909
  2: "unlocked"
61892
61910
  },
61893
- is_shared_fs_node(node) {
61894
- if (node?.isSharedFS) {
61895
- return true;
61896
- }
61897
- if (!node?.mount?.opts?.fs?.lookupPath || !node?.mount?.type?.realPath) {
61898
- return false;
61899
- }
61900
- if (node.mount.type !== NODEFS) {
61901
- return false;
61902
- }
61903
- const vfsPath = node.mount.type.realPath(node);
61904
- try {
61905
- const underlyingNode = node.mount.opts.fs.lookupPath(vfsPath)?.node;
61906
- return !!underlyingNode?.isSharedFS;
61907
- } catch (e) {
61908
- return false;
61909
- }
61910
- },
61911
61911
  is_path_to_shared_fs(path33) {
61912
- const { node } = FS.lookupPath(path33);
61913
- return locking.is_shared_fs_node(node);
61912
+ _js_wasm_trace("is_path_to_shared_fs(%s)", path33);
61913
+ const { node } = FS.lookupPath(path33, { noent_okay: true });
61914
+ if (node.mount.type !== PROXYFS) {
61915
+ return !!node.isSharedFS;
61916
+ }
61917
+ const nodePath2 = PROXYFS.realPath(node);
61918
+ const backingFs = node?.mount?.opts?.fs;
61919
+ if (backingFs) {
61920
+ const { node: backingNode } = backingFs.lookupPath(nodePath2, {
61921
+ noent_okay: true
61922
+ });
61923
+ return !!backingNode?.isSharedFS;
61924
+ }
61925
+ return false;
61914
61926
  },
61915
61927
  get_fd_access_mode(fd) {
61916
61928
  const emscripten_F_GETFL = Number("3");
@@ -61925,8 +61937,23 @@ function init4(RuntimeName, PHPLoader) {
61925
61937
  }
61926
61938
  },
61927
61939
  get_native_path_from_vfs_path(vfsPath) {
61928
- const { node } = FS.lookupPath(vfsPath);
61929
- return NODEFS.realPath(node);
61940
+ const { node } = FS.lookupPath(vfsPath, {});
61941
+ if (node.mount.type === NODEFS) {
61942
+ return NODEFS.realPath(node);
61943
+ } else if (node.mount.type === PROXYFS) {
61944
+ const { node: backingNode, path: backingPath } = node.mount.opts.fs.lookupPath(vfsPath);
61945
+ _js_wasm_trace(
61946
+ "backingNode for %s: %s",
61947
+ vfsPath,
61948
+ backingPath,
61949
+ backingNode
61950
+ );
61951
+ return backingNode.mount.type.realPath(backingNode);
61952
+ } else {
61953
+ throw new Error(
61954
+ `Unsupported filesystem type for path ${vfsPath}`
61955
+ );
61956
+ }
61930
61957
  },
61931
61958
  check_lock_params(fd, l_type) {
61932
61959
  const emscripten_O_RDONLY = Number("0");
@@ -84197,15 +84224,15 @@ ${e}`);
84197
84224
  PHPLoader["malloc"] = _malloc;
84198
84225
  PHPLoader["free"] = typeof _free === "function" ? _free : PHPLoader["_wasm_free"];
84199
84226
  if (typeof NODEFS === "object") {
84200
- const originalCreateNode = NODEFS.createNode;
84227
+ const originalNodeFsCreateNode = NODEFS.createNode;
84201
84228
  NODEFS.createNode = function createNodeWithSharedFlag() {
84202
- const node = originalCreateNode.apply(NODEFS, arguments);
84229
+ const node = originalNodeFsCreateNode.apply(NODEFS, arguments);
84203
84230
  node.isSharedFS = true;
84204
84231
  return node;
84205
84232
  };
84206
84233
  var originalHashAddNode = FS.hashAddNode;
84207
84234
  FS.hashAddNode = function hashAddNodeIfNotSharedFS(node) {
84208
- if (typeof locking === "object" && locking?.is_shared_fs_node(node)) {
84235
+ if (node?.isSharedFS) {
84209
84236
  return;
84210
84237
  }
84211
84238
  return originalHashAddNode.apply(FS, arguments);
@@ -89959,27 +89986,21 @@ function init5(RuntimeName, PHPLoader) {
89959
89986
  1: "exclusive",
89960
89987
  2: "unlocked"
89961
89988
  },
89962
- is_shared_fs_node(node) {
89963
- if (node?.isSharedFS) {
89964
- return true;
89965
- }
89966
- if (!node?.mount?.opts?.fs?.lookupPath || !node?.mount?.type?.realPath) {
89967
- return false;
89968
- }
89969
- if (node.mount.type !== NODEFS) {
89970
- return false;
89971
- }
89972
- const vfsPath = node.mount.type.realPath(node);
89973
- try {
89974
- const underlyingNode = node.mount.opts.fs.lookupPath(vfsPath)?.node;
89975
- return !!underlyingNode?.isSharedFS;
89976
- } catch (e) {
89977
- return false;
89978
- }
89979
- },
89980
89989
  is_path_to_shared_fs(path33) {
89981
- const { node } = FS.lookupPath(path33);
89982
- return locking.is_shared_fs_node(node);
89990
+ _js_wasm_trace("is_path_to_shared_fs(%s)", path33);
89991
+ const { node } = FS.lookupPath(path33, { noent_okay: true });
89992
+ if (node.mount.type !== PROXYFS) {
89993
+ return !!node.isSharedFS;
89994
+ }
89995
+ const nodePath2 = PROXYFS.realPath(node);
89996
+ const backingFs = node?.mount?.opts?.fs;
89997
+ if (backingFs) {
89998
+ const { node: backingNode } = backingFs.lookupPath(nodePath2, {
89999
+ noent_okay: true
90000
+ });
90001
+ return !!backingNode?.isSharedFS;
90002
+ }
90003
+ return false;
89983
90004
  },
89984
90005
  get_fd_access_mode(fd) {
89985
90006
  const emscripten_F_GETFL = Number("3");
@@ -89994,8 +90015,23 @@ function init5(RuntimeName, PHPLoader) {
89994
90015
  }
89995
90016
  },
89996
90017
  get_native_path_from_vfs_path(vfsPath) {
89997
- const { node } = FS.lookupPath(vfsPath);
89998
- return NODEFS.realPath(node);
90018
+ const { node } = FS.lookupPath(vfsPath, {});
90019
+ if (node.mount.type === NODEFS) {
90020
+ return NODEFS.realPath(node);
90021
+ } else if (node.mount.type === PROXYFS) {
90022
+ const { node: backingNode, path: backingPath } = node.mount.opts.fs.lookupPath(vfsPath);
90023
+ _js_wasm_trace(
90024
+ "backingNode for %s: %s",
90025
+ vfsPath,
90026
+ backingPath,
90027
+ backingNode
90028
+ );
90029
+ return backingNode.mount.type.realPath(backingNode);
90030
+ } else {
90031
+ throw new Error(
90032
+ `Unsupported filesystem type for path ${vfsPath}`
90033
+ );
90034
+ }
89999
90035
  },
90000
90036
  check_lock_params(fd, l_type) {
90001
90037
  const emscripten_O_RDONLY = Number("0");
@@ -112266,15 +112302,15 @@ ${e}`);
112266
112302
  PHPLoader["malloc"] = _malloc;
112267
112303
  PHPLoader["free"] = typeof _free === "function" ? _free : PHPLoader["_wasm_free"];
112268
112304
  if (typeof NODEFS === "object") {
112269
- const originalCreateNode = NODEFS.createNode;
112305
+ const originalNodeFsCreateNode = NODEFS.createNode;
112270
112306
  NODEFS.createNode = function createNodeWithSharedFlag() {
112271
- const node = originalCreateNode.apply(NODEFS, arguments);
112307
+ const node = originalNodeFsCreateNode.apply(NODEFS, arguments);
112272
112308
  node.isSharedFS = true;
112273
112309
  return node;
112274
112310
  };
112275
112311
  var originalHashAddNode = FS.hashAddNode;
112276
112312
  FS.hashAddNode = function hashAddNodeIfNotSharedFS(node) {
112277
- if (typeof locking === "object" && locking?.is_shared_fs_node(node)) {
112313
+ if (node?.isSharedFS) {
112278
112314
  return;
112279
112315
  }
112280
112316
  return originalHashAddNode.apply(FS, arguments);
@@ -118028,27 +118064,21 @@ function init6(RuntimeName, PHPLoader) {
118028
118064
  1: "exclusive",
118029
118065
  2: "unlocked"
118030
118066
  },
118031
- is_shared_fs_node(node) {
118032
- if (node?.isSharedFS) {
118033
- return true;
118034
- }
118035
- if (!node?.mount?.opts?.fs?.lookupPath || !node?.mount?.type?.realPath) {
118036
- return false;
118037
- }
118038
- if (node.mount.type !== NODEFS) {
118039
- return false;
118040
- }
118041
- const vfsPath = node.mount.type.realPath(node);
118042
- try {
118043
- const underlyingNode = node.mount.opts.fs.lookupPath(vfsPath)?.node;
118044
- return !!underlyingNode?.isSharedFS;
118045
- } catch (e) {
118046
- return false;
118047
- }
118048
- },
118049
118067
  is_path_to_shared_fs(path33) {
118050
- const { node } = FS.lookupPath(path33);
118051
- return locking.is_shared_fs_node(node);
118068
+ _js_wasm_trace("is_path_to_shared_fs(%s)", path33);
118069
+ const { node } = FS.lookupPath(path33, { noent_okay: true });
118070
+ if (node.mount.type !== PROXYFS) {
118071
+ return !!node.isSharedFS;
118072
+ }
118073
+ const nodePath2 = PROXYFS.realPath(node);
118074
+ const backingFs = node?.mount?.opts?.fs;
118075
+ if (backingFs) {
118076
+ const { node: backingNode } = backingFs.lookupPath(nodePath2, {
118077
+ noent_okay: true
118078
+ });
118079
+ return !!backingNode?.isSharedFS;
118080
+ }
118081
+ return false;
118052
118082
  },
118053
118083
  get_fd_access_mode(fd) {
118054
118084
  const emscripten_F_GETFL = Number("3");
@@ -118063,8 +118093,23 @@ function init6(RuntimeName, PHPLoader) {
118063
118093
  }
118064
118094
  },
118065
118095
  get_native_path_from_vfs_path(vfsPath) {
118066
- const { node } = FS.lookupPath(vfsPath);
118067
- return NODEFS.realPath(node);
118096
+ const { node } = FS.lookupPath(vfsPath, {});
118097
+ if (node.mount.type === NODEFS) {
118098
+ return NODEFS.realPath(node);
118099
+ } else if (node.mount.type === PROXYFS) {
118100
+ const { node: backingNode, path: backingPath } = node.mount.opts.fs.lookupPath(vfsPath);
118101
+ _js_wasm_trace(
118102
+ "backingNode for %s: %s",
118103
+ vfsPath,
118104
+ backingPath,
118105
+ backingNode
118106
+ );
118107
+ return backingNode.mount.type.realPath(backingNode);
118108
+ } else {
118109
+ throw new Error(
118110
+ `Unsupported filesystem type for path ${vfsPath}`
118111
+ );
118112
+ }
118068
118113
  },
118069
118114
  check_lock_params(fd, l_type) {
118070
118115
  const emscripten_O_RDONLY = Number("0");
@@ -140335,15 +140380,15 @@ ${e}`);
140335
140380
  PHPLoader["malloc"] = _malloc;
140336
140381
  PHPLoader["free"] = typeof _free === "function" ? _free : PHPLoader["_wasm_free"];
140337
140382
  if (typeof NODEFS === "object") {
140338
- const originalCreateNode = NODEFS.createNode;
140383
+ const originalNodeFsCreateNode = NODEFS.createNode;
140339
140384
  NODEFS.createNode = function createNodeWithSharedFlag() {
140340
- const node = originalCreateNode.apply(NODEFS, arguments);
140385
+ const node = originalNodeFsCreateNode.apply(NODEFS, arguments);
140341
140386
  node.isSharedFS = true;
140342
140387
  return node;
140343
140388
  };
140344
140389
  var originalHashAddNode = FS.hashAddNode;
140345
140390
  FS.hashAddNode = function hashAddNodeIfNotSharedFS(node) {
140346
- if (typeof locking === "object" && locking?.is_shared_fs_node(node)) {
140391
+ if (node?.isSharedFS) {
140347
140392
  return;
140348
140393
  }
140349
140394
  return originalHashAddNode.apply(FS, arguments);
@@ -146097,27 +146142,21 @@ function init7(RuntimeName, PHPLoader) {
146097
146142
  1: "exclusive",
146098
146143
  2: "unlocked"
146099
146144
  },
146100
- is_shared_fs_node(node) {
146101
- if (node?.isSharedFS) {
146102
- return true;
146103
- }
146104
- if (!node?.mount?.opts?.fs?.lookupPath || !node?.mount?.type?.realPath) {
146105
- return false;
146106
- }
146107
- if (node.mount.type !== NODEFS) {
146108
- return false;
146109
- }
146110
- const vfsPath = node.mount.type.realPath(node);
146111
- try {
146112
- const underlyingNode = node.mount.opts.fs.lookupPath(vfsPath)?.node;
146113
- return !!underlyingNode?.isSharedFS;
146114
- } catch (e) {
146115
- return false;
146116
- }
146117
- },
146118
146145
  is_path_to_shared_fs(path33) {
146119
- const { node } = FS.lookupPath(path33);
146120
- return locking.is_shared_fs_node(node);
146146
+ _js_wasm_trace("is_path_to_shared_fs(%s)", path33);
146147
+ const { node } = FS.lookupPath(path33, { noent_okay: true });
146148
+ if (node.mount.type !== PROXYFS) {
146149
+ return !!node.isSharedFS;
146150
+ }
146151
+ const nodePath2 = PROXYFS.realPath(node);
146152
+ const backingFs = node?.mount?.opts?.fs;
146153
+ if (backingFs) {
146154
+ const { node: backingNode } = backingFs.lookupPath(nodePath2, {
146155
+ noent_okay: true
146156
+ });
146157
+ return !!backingNode?.isSharedFS;
146158
+ }
146159
+ return false;
146121
146160
  },
146122
146161
  get_fd_access_mode(fd) {
146123
146162
  const emscripten_F_GETFL = Number("3");
@@ -146132,8 +146171,23 @@ function init7(RuntimeName, PHPLoader) {
146132
146171
  }
146133
146172
  },
146134
146173
  get_native_path_from_vfs_path(vfsPath) {
146135
- const { node } = FS.lookupPath(vfsPath);
146136
- return NODEFS.realPath(node);
146174
+ const { node } = FS.lookupPath(vfsPath, {});
146175
+ if (node.mount.type === NODEFS) {
146176
+ return NODEFS.realPath(node);
146177
+ } else if (node.mount.type === PROXYFS) {
146178
+ const { node: backingNode, path: backingPath } = node.mount.opts.fs.lookupPath(vfsPath);
146179
+ _js_wasm_trace(
146180
+ "backingNode for %s: %s",
146181
+ vfsPath,
146182
+ backingPath,
146183
+ backingNode
146184
+ );
146185
+ return backingNode.mount.type.realPath(backingNode);
146186
+ } else {
146187
+ throw new Error(
146188
+ `Unsupported filesystem type for path ${vfsPath}`
146189
+ );
146190
+ }
146137
146191
  },
146138
146192
  check_lock_params(fd, l_type) {
146139
146193
  const emscripten_O_RDONLY = Number("0");
@@ -168404,15 +168458,15 @@ ${e}`);
168404
168458
  PHPLoader["malloc"] = _malloc;
168405
168459
  PHPLoader["free"] = typeof _free === "function" ? _free : PHPLoader["_wasm_free"];
168406
168460
  if (typeof NODEFS === "object") {
168407
- const originalCreateNode = NODEFS.createNode;
168461
+ const originalNodeFsCreateNode = NODEFS.createNode;
168408
168462
  NODEFS.createNode = function createNodeWithSharedFlag() {
168409
- const node = originalCreateNode.apply(NODEFS, arguments);
168463
+ const node = originalNodeFsCreateNode.apply(NODEFS, arguments);
168410
168464
  node.isSharedFS = true;
168411
168465
  return node;
168412
168466
  };
168413
168467
  var originalHashAddNode = FS.hashAddNode;
168414
168468
  FS.hashAddNode = function hashAddNodeIfNotSharedFS(node) {
168415
- if (typeof locking === "object" && locking?.is_shared_fs_node(node)) {
168469
+ if (node?.isSharedFS) {
168416
168470
  return;
168417
168471
  }
168418
168472
  return originalHashAddNode.apply(FS, arguments);
@@ -174166,27 +174220,21 @@ function init8(RuntimeName, PHPLoader) {
174166
174220
  1: "exclusive",
174167
174221
  2: "unlocked"
174168
174222
  },
174169
- is_shared_fs_node(node) {
174170
- if (node?.isSharedFS) {
174171
- return true;
174172
- }
174173
- if (!node?.mount?.opts?.fs?.lookupPath || !node?.mount?.type?.realPath) {
174174
- return false;
174175
- }
174176
- if (node.mount.type !== NODEFS) {
174177
- return false;
174178
- }
174179
- const vfsPath = node.mount.type.realPath(node);
174180
- try {
174181
- const underlyingNode = node.mount.opts.fs.lookupPath(vfsPath)?.node;
174182
- return !!underlyingNode?.isSharedFS;
174183
- } catch (e) {
174184
- return false;
174185
- }
174186
- },
174187
174223
  is_path_to_shared_fs(path33) {
174188
- const { node } = FS.lookupPath(path33);
174189
- return locking.is_shared_fs_node(node);
174224
+ _js_wasm_trace("is_path_to_shared_fs(%s)", path33);
174225
+ const { node } = FS.lookupPath(path33, { noent_okay: true });
174226
+ if (node.mount.type !== PROXYFS) {
174227
+ return !!node.isSharedFS;
174228
+ }
174229
+ const nodePath2 = PROXYFS.realPath(node);
174230
+ const backingFs = node?.mount?.opts?.fs;
174231
+ if (backingFs) {
174232
+ const { node: backingNode } = backingFs.lookupPath(nodePath2, {
174233
+ noent_okay: true
174234
+ });
174235
+ return !!backingNode?.isSharedFS;
174236
+ }
174237
+ return false;
174190
174238
  },
174191
174239
  get_fd_access_mode(fd) {
174192
174240
  const emscripten_F_GETFL = Number("3");
@@ -174201,8 +174249,23 @@ function init8(RuntimeName, PHPLoader) {
174201
174249
  }
174202
174250
  },
174203
174251
  get_native_path_from_vfs_path(vfsPath) {
174204
- const { node } = FS.lookupPath(vfsPath);
174205
- return NODEFS.realPath(node);
174252
+ const { node } = FS.lookupPath(vfsPath, {});
174253
+ if (node.mount.type === NODEFS) {
174254
+ return NODEFS.realPath(node);
174255
+ } else if (node.mount.type === PROXYFS) {
174256
+ const { node: backingNode, path: backingPath } = node.mount.opts.fs.lookupPath(vfsPath);
174257
+ _js_wasm_trace(
174258
+ "backingNode for %s: %s",
174259
+ vfsPath,
174260
+ backingPath,
174261
+ backingNode
174262
+ );
174263
+ return backingNode.mount.type.realPath(backingNode);
174264
+ } else {
174265
+ throw new Error(
174266
+ `Unsupported filesystem type for path ${vfsPath}`
174267
+ );
174268
+ }
174206
174269
  },
174207
174270
  check_lock_params(fd, l_type) {
174208
174271
  const emscripten_O_RDONLY = Number("0");
@@ -196473,15 +196536,15 @@ ${e}`);
196473
196536
  PHPLoader["malloc"] = _malloc;
196474
196537
  PHPLoader["free"] = typeof _free === "function" ? _free : PHPLoader["_wasm_free"];
196475
196538
  if (typeof NODEFS === "object") {
196476
- const originalCreateNode = NODEFS.createNode;
196539
+ const originalNodeFsCreateNode = NODEFS.createNode;
196477
196540
  NODEFS.createNode = function createNodeWithSharedFlag() {
196478
- const node = originalCreateNode.apply(NODEFS, arguments);
196541
+ const node = originalNodeFsCreateNode.apply(NODEFS, arguments);
196479
196542
  node.isSharedFS = true;
196480
196543
  return node;
196481
196544
  };
196482
196545
  var originalHashAddNode = FS.hashAddNode;
196483
196546
  FS.hashAddNode = function hashAddNodeIfNotSharedFS(node) {
196484
- if (typeof locking === "object" && locking?.is_shared_fs_node(node)) {
196547
+ if (node?.isSharedFS) {
196485
196548
  return;
196486
196549
  }
196487
196550
  return originalHashAddNode.apply(FS, arguments);
@@ -202235,27 +202298,21 @@ function init9(RuntimeName, PHPLoader) {
202235
202298
  1: "exclusive",
202236
202299
  2: "unlocked"
202237
202300
  },
202238
- is_shared_fs_node(node) {
202239
- if (node?.isSharedFS) {
202240
- return true;
202241
- }
202242
- if (!node?.mount?.opts?.fs?.lookupPath || !node?.mount?.type?.realPath) {
202243
- return false;
202244
- }
202245
- if (node.mount.type !== NODEFS) {
202246
- return false;
202247
- }
202248
- const vfsPath = node.mount.type.realPath(node);
202249
- try {
202250
- const underlyingNode = node.mount.opts.fs.lookupPath(vfsPath)?.node;
202251
- return !!underlyingNode?.isSharedFS;
202252
- } catch (e) {
202253
- return false;
202254
- }
202255
- },
202256
202301
  is_path_to_shared_fs(path33) {
202257
- const { node } = FS.lookupPath(path33);
202258
- return locking.is_shared_fs_node(node);
202302
+ _js_wasm_trace("is_path_to_shared_fs(%s)", path33);
202303
+ const { node } = FS.lookupPath(path33, { noent_okay: true });
202304
+ if (node.mount.type !== PROXYFS) {
202305
+ return !!node.isSharedFS;
202306
+ }
202307
+ const nodePath2 = PROXYFS.realPath(node);
202308
+ const backingFs = node?.mount?.opts?.fs;
202309
+ if (backingFs) {
202310
+ const { node: backingNode } = backingFs.lookupPath(nodePath2, {
202311
+ noent_okay: true
202312
+ });
202313
+ return !!backingNode?.isSharedFS;
202314
+ }
202315
+ return false;
202259
202316
  },
202260
202317
  get_fd_access_mode(fd) {
202261
202318
  const emscripten_F_GETFL = Number("3");
@@ -202270,8 +202327,23 @@ function init9(RuntimeName, PHPLoader) {
202270
202327
  }
202271
202328
  },
202272
202329
  get_native_path_from_vfs_path(vfsPath) {
202273
- const { node } = FS.lookupPath(vfsPath);
202274
- return NODEFS.realPath(node);
202330
+ const { node } = FS.lookupPath(vfsPath, {});
202331
+ if (node.mount.type === NODEFS) {
202332
+ return NODEFS.realPath(node);
202333
+ } else if (node.mount.type === PROXYFS) {
202334
+ const { node: backingNode, path: backingPath } = node.mount.opts.fs.lookupPath(vfsPath);
202335
+ _js_wasm_trace(
202336
+ "backingNode for %s: %s",
202337
+ vfsPath,
202338
+ backingPath,
202339
+ backingNode
202340
+ );
202341
+ return backingNode.mount.type.realPath(backingNode);
202342
+ } else {
202343
+ throw new Error(
202344
+ `Unsupported filesystem type for path ${vfsPath}`
202345
+ );
202346
+ }
202275
202347
  },
202276
202348
  check_lock_params(fd, l_type) {
202277
202349
  const emscripten_O_RDONLY = Number("0");
@@ -224542,15 +224614,15 @@ ${e}`);
224542
224614
  PHPLoader["malloc"] = _malloc;
224543
224615
  PHPLoader["free"] = typeof _free === "function" ? _free : PHPLoader["_wasm_free"];
224544
224616
  if (typeof NODEFS === "object") {
224545
- const originalCreateNode = NODEFS.createNode;
224617
+ const originalNodeFsCreateNode = NODEFS.createNode;
224546
224618
  NODEFS.createNode = function createNodeWithSharedFlag() {
224547
- const node = originalCreateNode.apply(NODEFS, arguments);
224619
+ const node = originalNodeFsCreateNode.apply(NODEFS, arguments);
224548
224620
  node.isSharedFS = true;
224549
224621
  return node;
224550
224622
  };
224551
224623
  var originalHashAddNode = FS.hashAddNode;
224552
224624
  FS.hashAddNode = function hashAddNodeIfNotSharedFS(node) {
224553
- if (typeof locking === "object" && locking?.is_shared_fs_node(node)) {
224625
+ if (node?.isSharedFS) {
224554
224626
  return;
224555
224627
  }
224556
224628
  return originalHashAddNode.apply(FS, arguments);
@@ -225225,7 +225297,7 @@ function init10(RuntimeName, PHPLoader) {
225225
225297
  };
225226
225298
  var wasmTableMirror = [];
225227
225299
  var wasmTable = new WebAssembly.Table({
225228
- initial: 16954,
225300
+ initial: 16955,
225229
225301
  element: "anyfunc"
225230
225302
  });
225231
225303
  var getWasmTableEntry = (funcPtr) => {
@@ -230397,27 +230469,21 @@ function init10(RuntimeName, PHPLoader) {
230397
230469
  1: "exclusive",
230398
230470
  2: "unlocked"
230399
230471
  },
230400
- is_shared_fs_node(node) {
230401
- if (node?.isSharedFS) {
230402
- return true;
230403
- }
230404
- if (!node?.mount?.opts?.fs?.lookupPath || !node?.mount?.type?.realPath) {
230405
- return false;
230406
- }
230407
- if (node.mount.type !== NODEFS) {
230408
- return false;
230409
- }
230410
- const vfsPath = node.mount.type.realPath(node);
230411
- try {
230412
- const underlyingNode = node.mount.opts.fs.lookupPath(vfsPath)?.node;
230413
- return !!underlyingNode?.isSharedFS;
230414
- } catch (e) {
230415
- return false;
230416
- }
230417
- },
230418
230472
  is_path_to_shared_fs(path33) {
230419
- const { node } = FS.lookupPath(path33);
230420
- return locking.is_shared_fs_node(node);
230473
+ _js_wasm_trace("is_path_to_shared_fs(%s)", path33);
230474
+ const { node } = FS.lookupPath(path33, { noent_okay: true });
230475
+ if (node.mount.type !== PROXYFS) {
230476
+ return !!node.isSharedFS;
230477
+ }
230478
+ const nodePath2 = PROXYFS.realPath(node);
230479
+ const backingFs = node?.mount?.opts?.fs;
230480
+ if (backingFs) {
230481
+ const { node: backingNode } = backingFs.lookupPath(nodePath2, {
230482
+ noent_okay: true
230483
+ });
230484
+ return !!backingNode?.isSharedFS;
230485
+ }
230486
+ return false;
230421
230487
  },
230422
230488
  get_fd_access_mode(fd) {
230423
230489
  const emscripten_F_GETFL = Number("3");
@@ -230432,8 +230498,23 @@ function init10(RuntimeName, PHPLoader) {
230432
230498
  }
230433
230499
  },
230434
230500
  get_native_path_from_vfs_path(vfsPath) {
230435
- const { node } = FS.lookupPath(vfsPath);
230436
- return NODEFS.realPath(node);
230501
+ const { node } = FS.lookupPath(vfsPath, {});
230502
+ if (node.mount.type === NODEFS) {
230503
+ return NODEFS.realPath(node);
230504
+ } else if (node.mount.type === PROXYFS) {
230505
+ const { node: backingNode, path: backingPath } = node.mount.opts.fs.lookupPath(vfsPath);
230506
+ _js_wasm_trace(
230507
+ "backingNode for %s: %s",
230508
+ vfsPath,
230509
+ backingPath,
230510
+ backingNode
230511
+ );
230512
+ return backingNode.mount.type.realPath(backingNode);
230513
+ } else {
230514
+ throw new Error(
230515
+ `Unsupported filesystem type for path ${vfsPath}`
230516
+ );
230517
+ }
230437
230518
  },
230438
230519
  check_lock_params(fd, l_type) {
230439
230520
  const emscripten_O_RDONLY = Number("0");
@@ -250297,13 +250378,13 @@ ${e}`);
250297
250378
  Module["createContext"] = Browser.createContext;
250298
250379
  registerPostMainLoop(() => SDL.audio?.queueNewAudioData?.());
250299
250380
  var ASM_CONSTS = {
250300
- 16327533: ($0) => {
250381
+ 16327421: ($0) => {
250301
250382
  if (!$0) {
250302
250383
  AL.alcErr = 40964;
250303
250384
  return 1;
250304
250385
  }
250305
250386
  },
250306
- 16327581: ($0) => {
250387
+ 16327469: ($0) => {
250307
250388
  if (!AL.currentCtx) {
250308
250389
  err("alGetProcAddress() called without a valid context");
250309
250390
  return 1;
@@ -253565,15 +253646,15 @@ ${e}`);
253565
253646
  PHPLoader["malloc"] = _malloc;
253566
253647
  PHPLoader["free"] = typeof _free === "function" ? _free : PHPLoader["_wasm_free"];
253567
253648
  if (typeof NODEFS === "object") {
253568
- const originalCreateNode = NODEFS.createNode;
253649
+ const originalNodeFsCreateNode = NODEFS.createNode;
253569
253650
  NODEFS.createNode = function createNodeWithSharedFlag() {
253570
- const node = originalCreateNode.apply(NODEFS, arguments);
253651
+ const node = originalNodeFsCreateNode.apply(NODEFS, arguments);
253571
253652
  node.isSharedFS = true;
253572
253653
  return node;
253573
253654
  };
253574
253655
  var originalHashAddNode = FS.hashAddNode;
253575
253656
  FS.hashAddNode = function hashAddNodeIfNotSharedFS(node) {
253576
- if (typeof locking === "object" && locking?.is_shared_fs_node(node)) {
253657
+ if (node?.isSharedFS) {
253577
253658
  return;
253578
253659
  }
253579
253660
  return originalHashAddNode.apply(FS, arguments);
@@ -253589,9 +253670,9 @@ var dependencyFilename9, dependenciesTotalSize9, phpVersionString9;
253589
253670
  var init_php_8_42 = __esm({
253590
253671
  "packages/php-wasm/node/asyncify/php_8_4.js"() {
253591
253672
  "use strict";
253592
- dependencyFilename9 = path9.join(__dirname + "/asyncify", "8_4_10", "php_8_4.wasm");
253593
- dependenciesTotalSize9 = 36942485;
253594
- phpVersionString9 = "8.4.10";
253673
+ dependencyFilename9 = path9.join(__dirname + "/asyncify", "8_4_11", "php_8_4.wasm");
253674
+ dependenciesTotalSize9 = 36945699;
253675
+ phpVersionString9 = "8.4.11";
253595
253676
  }
253596
253677
  });
253597
253678
 
@@ -254106,7 +254187,7 @@ function init11(RuntimeName, PHPLoader) {
254106
254187
  newDSO("__main__", 0, wasmImports);
254107
254188
  }
254108
254189
  };
254109
- var ___heap_base = 15213312;
254190
+ var ___heap_base = 15213248;
254110
254191
  var alignMemory = (size, alignment) => {
254111
254192
  return Math.ceil(size / alignment) * alignment;
254112
254193
  };
@@ -254248,7 +254329,7 @@ function init11(RuntimeName, PHPLoader) {
254248
254329
  };
254249
254330
  var wasmTableMirror = [];
254250
254331
  var wasmTable = new WebAssembly.Table({
254251
- initial: 16130,
254332
+ initial: 16131,
254252
254333
  element: "anyfunc"
254253
254334
  });
254254
254335
  var getWasmTableEntry = (funcPtr) => {
@@ -254869,11 +254950,11 @@ function init11(RuntimeName, PHPLoader) {
254869
254950
  { value: "i32", mutable: false },
254870
254951
  1024
254871
254952
  );
254872
- var ___stack_high = 15213312;
254873
- var ___stack_low = 14164736;
254953
+ var ___stack_high = 15213248;
254954
+ var ___stack_low = 14164672;
254874
254955
  var ___stack_pointer = new WebAssembly.Global(
254875
254956
  { value: "i32", mutable: true },
254876
- 15213312
254957
+ 15213248
254877
254958
  );
254878
254959
  var PATH = {
254879
254960
  isAbs: (path33) => path33.charAt(0) === "/",
@@ -259420,27 +259501,21 @@ function init11(RuntimeName, PHPLoader) {
259420
259501
  1: "exclusive",
259421
259502
  2: "unlocked"
259422
259503
  },
259423
- is_shared_fs_node(node) {
259424
- if (node?.isSharedFS) {
259425
- return true;
259426
- }
259427
- if (!node?.mount?.opts?.fs?.lookupPath || !node?.mount?.type?.realPath) {
259428
- return false;
259429
- }
259430
- if (node.mount.type !== NODEFS) {
259431
- return false;
259432
- }
259433
- const vfsPath = node.mount.type.realPath(node);
259434
- try {
259435
- const underlyingNode = node.mount.opts.fs.lookupPath(vfsPath)?.node;
259436
- return !!underlyingNode?.isSharedFS;
259437
- } catch (e) {
259438
- return false;
259439
- }
259440
- },
259441
259504
  is_path_to_shared_fs(path33) {
259442
- const { node } = FS.lookupPath(path33);
259443
- return locking.is_shared_fs_node(node);
259505
+ _js_wasm_trace("is_path_to_shared_fs(%s)", path33);
259506
+ const { node } = FS.lookupPath(path33, { noent_okay: true });
259507
+ if (node.mount.type !== PROXYFS) {
259508
+ return !!node.isSharedFS;
259509
+ }
259510
+ const nodePath2 = PROXYFS.realPath(node);
259511
+ const backingFs = node?.mount?.opts?.fs;
259512
+ if (backingFs) {
259513
+ const { node: backingNode } = backingFs.lookupPath(nodePath2, {
259514
+ noent_okay: true
259515
+ });
259516
+ return !!backingNode?.isSharedFS;
259517
+ }
259518
+ return false;
259444
259519
  },
259445
259520
  get_fd_access_mode(fd) {
259446
259521
  const emscripten_F_GETFL = Number("3");
@@ -259455,8 +259530,23 @@ function init11(RuntimeName, PHPLoader) {
259455
259530
  }
259456
259531
  },
259457
259532
  get_native_path_from_vfs_path(vfsPath) {
259458
- const { node } = FS.lookupPath(vfsPath);
259459
- return NODEFS.realPath(node);
259533
+ const { node } = FS.lookupPath(vfsPath, {});
259534
+ if (node.mount.type === NODEFS) {
259535
+ return NODEFS.realPath(node);
259536
+ } else if (node.mount.type === PROXYFS) {
259537
+ const { node: backingNode, path: backingPath } = node.mount.opts.fs.lookupPath(vfsPath);
259538
+ _js_wasm_trace(
259539
+ "backingNode for %s: %s",
259540
+ vfsPath,
259541
+ backingPath,
259542
+ backingNode
259543
+ );
259544
+ return backingNode.mount.type.realPath(backingNode);
259545
+ } else {
259546
+ throw new Error(
259547
+ `Unsupported filesystem type for path ${vfsPath}`
259548
+ );
259549
+ }
259460
259550
  },
259461
259551
  check_lock_params(fd, l_type) {
259462
259552
  const emscripten_O_RDONLY = Number("0");
@@ -279320,13 +279410,13 @@ ${e}`);
279320
279410
  Module["createContext"] = Browser.createContext;
279321
279411
  registerPostMainLoop(() => SDL.audio?.queueNewAudioData?.());
279322
279412
  var ASM_CONSTS = {
279323
- 13232061: ($0) => {
279413
+ 13231949: ($0) => {
279324
279414
  if (!$0) {
279325
279415
  AL.alcErr = 40964;
279326
279416
  return 1;
279327
279417
  }
279328
279418
  },
279329
- 13232109: ($0) => {
279419
+ 13231997: ($0) => {
279330
279420
  if (!AL.currentCtx) {
279331
279421
  err("alGetProcAddress() called without a valid context");
279332
279422
  return 1;
@@ -282601,15 +282691,15 @@ ${e}`);
282601
282691
  PHPLoader["malloc"] = _malloc;
282602
282692
  PHPLoader["free"] = typeof _free === "function" ? _free : PHPLoader["_wasm_free"];
282603
282693
  if (typeof NODEFS === "object") {
282604
- const originalCreateNode = NODEFS.createNode;
282694
+ const originalNodeFsCreateNode = NODEFS.createNode;
282605
282695
  NODEFS.createNode = function createNodeWithSharedFlag() {
282606
- const node = originalCreateNode.apply(NODEFS, arguments);
282696
+ const node = originalNodeFsCreateNode.apply(NODEFS, arguments);
282607
282697
  node.isSharedFS = true;
282608
282698
  return node;
282609
282699
  };
282610
282700
  var originalHashAddNode = FS.hashAddNode;
282611
282701
  FS.hashAddNode = function hashAddNodeIfNotSharedFS(node) {
282612
- if (typeof locking === "object" && locking?.is_shared_fs_node(node)) {
282702
+ if (node?.isSharedFS) {
282613
282703
  return;
282614
282704
  }
282615
282705
  return originalHashAddNode.apply(FS, arguments);
@@ -282625,9 +282715,9 @@ var dependencyFilename10, dependenciesTotalSize10, phpVersionString10;
282625
282715
  var init_php_8_32 = __esm({
282626
282716
  "packages/php-wasm/node/asyncify/php_8_3.js"() {
282627
282717
  "use strict";
282628
- dependencyFilename10 = path10.join(__dirname + "/asyncify", "8_3_23", "php_8_3.wasm");
282629
- dependenciesTotalSize10 = 33145262;
282630
- phpVersionString10 = "8.3.23";
282718
+ dependencyFilename10 = path10.join(__dirname + "/asyncify", "8_3_24", "php_8_3.wasm");
282719
+ dependenciesTotalSize10 = 33148094;
282720
+ phpVersionString10 = "8.3.24";
282631
282721
  }
282632
282722
  });
282633
282723
 
@@ -288456,27 +288546,21 @@ function init12(RuntimeName, PHPLoader) {
288456
288546
  1: "exclusive",
288457
288547
  2: "unlocked"
288458
288548
  },
288459
- is_shared_fs_node(node) {
288460
- if (node?.isSharedFS) {
288461
- return true;
288462
- }
288463
- if (!node?.mount?.opts?.fs?.lookupPath || !node?.mount?.type?.realPath) {
288464
- return false;
288465
- }
288466
- if (node.mount.type !== NODEFS) {
288467
- return false;
288468
- }
288469
- const vfsPath = node.mount.type.realPath(node);
288470
- try {
288471
- const underlyingNode = node.mount.opts.fs.lookupPath(vfsPath)?.node;
288472
- return !!underlyingNode?.isSharedFS;
288473
- } catch (e) {
288474
- return false;
288475
- }
288476
- },
288477
288549
  is_path_to_shared_fs(path33) {
288478
- const { node } = FS.lookupPath(path33);
288479
- return locking.is_shared_fs_node(node);
288550
+ _js_wasm_trace("is_path_to_shared_fs(%s)", path33);
288551
+ const { node } = FS.lookupPath(path33, { noent_okay: true });
288552
+ if (node.mount.type !== PROXYFS) {
288553
+ return !!node.isSharedFS;
288554
+ }
288555
+ const nodePath2 = PROXYFS.realPath(node);
288556
+ const backingFs = node?.mount?.opts?.fs;
288557
+ if (backingFs) {
288558
+ const { node: backingNode } = backingFs.lookupPath(nodePath2, {
288559
+ noent_okay: true
288560
+ });
288561
+ return !!backingNode?.isSharedFS;
288562
+ }
288563
+ return false;
288480
288564
  },
288481
288565
  get_fd_access_mode(fd) {
288482
288566
  const emscripten_F_GETFL = Number("3");
@@ -288491,8 +288575,23 @@ function init12(RuntimeName, PHPLoader) {
288491
288575
  }
288492
288576
  },
288493
288577
  get_native_path_from_vfs_path(vfsPath) {
288494
- const { node } = FS.lookupPath(vfsPath);
288495
- return NODEFS.realPath(node);
288578
+ const { node } = FS.lookupPath(vfsPath, {});
288579
+ if (node.mount.type === NODEFS) {
288580
+ return NODEFS.realPath(node);
288581
+ } else if (node.mount.type === PROXYFS) {
288582
+ const { node: backingNode, path: backingPath } = node.mount.opts.fs.lookupPath(vfsPath);
288583
+ _js_wasm_trace(
288584
+ "backingNode for %s: %s",
288585
+ vfsPath,
288586
+ backingPath,
288587
+ backingNode
288588
+ );
288589
+ return backingNode.mount.type.realPath(backingNode);
288590
+ } else {
288591
+ throw new Error(
288592
+ `Unsupported filesystem type for path ${vfsPath}`
288593
+ );
288594
+ }
288496
288595
  },
288497
288596
  check_lock_params(fd, l_type) {
288498
288597
  const emscripten_O_RDONLY = Number("0");
@@ -311637,15 +311736,15 @@ ${e}`);
311637
311736
  PHPLoader["malloc"] = _malloc;
311638
311737
  PHPLoader["free"] = typeof _free === "function" ? _free : PHPLoader["_wasm_free"];
311639
311738
  if (typeof NODEFS === "object") {
311640
- const originalCreateNode = NODEFS.createNode;
311739
+ const originalNodeFsCreateNode = NODEFS.createNode;
311641
311740
  NODEFS.createNode = function createNodeWithSharedFlag() {
311642
- const node = originalCreateNode.apply(NODEFS, arguments);
311741
+ const node = originalNodeFsCreateNode.apply(NODEFS, arguments);
311643
311742
  node.isSharedFS = true;
311644
311743
  return node;
311645
311744
  };
311646
311745
  var originalHashAddNode = FS.hashAddNode;
311647
311746
  FS.hashAddNode = function hashAddNodeIfNotSharedFS(node) {
311648
- if (typeof locking === "object" && locking?.is_shared_fs_node(node)) {
311747
+ if (node?.isSharedFS) {
311649
311748
  return;
311650
311749
  }
311651
311750
  return originalHashAddNode.apply(FS, arguments);
@@ -311662,7 +311761,7 @@ var init_php_8_22 = __esm({
311662
311761
  "packages/php-wasm/node/asyncify/php_8_2.js"() {
311663
311762
  "use strict";
311664
311763
  dependencyFilename11 = path11.join(__dirname + "/asyncify", "8_2_29", "php_8_2.wasm");
311665
- dependenciesTotalSize11 = 32040568;
311764
+ dependenciesTotalSize11 = 32043737;
311666
311765
  phpVersionString11 = "8.2.29";
311667
311766
  }
311668
311767
  });
@@ -317492,27 +317591,21 @@ function init13(RuntimeName, PHPLoader) {
317492
317591
  1: "exclusive",
317493
317592
  2: "unlocked"
317494
317593
  },
317495
- is_shared_fs_node(node) {
317496
- if (node?.isSharedFS) {
317497
- return true;
317498
- }
317499
- if (!node?.mount?.opts?.fs?.lookupPath || !node?.mount?.type?.realPath) {
317500
- return false;
317501
- }
317502
- if (node.mount.type !== NODEFS) {
317503
- return false;
317504
- }
317505
- const vfsPath = node.mount.type.realPath(node);
317506
- try {
317507
- const underlyingNode = node.mount.opts.fs.lookupPath(vfsPath)?.node;
317508
- return !!underlyingNode?.isSharedFS;
317509
- } catch (e) {
317510
- return false;
317511
- }
317512
- },
317513
317594
  is_path_to_shared_fs(path33) {
317514
- const { node } = FS.lookupPath(path33);
317515
- return locking.is_shared_fs_node(node);
317595
+ _js_wasm_trace("is_path_to_shared_fs(%s)", path33);
317596
+ const { node } = FS.lookupPath(path33, { noent_okay: true });
317597
+ if (node.mount.type !== PROXYFS) {
317598
+ return !!node.isSharedFS;
317599
+ }
317600
+ const nodePath2 = PROXYFS.realPath(node);
317601
+ const backingFs = node?.mount?.opts?.fs;
317602
+ if (backingFs) {
317603
+ const { node: backingNode } = backingFs.lookupPath(nodePath2, {
317604
+ noent_okay: true
317605
+ });
317606
+ return !!backingNode?.isSharedFS;
317607
+ }
317608
+ return false;
317516
317609
  },
317517
317610
  get_fd_access_mode(fd) {
317518
317611
  const emscripten_F_GETFL = Number("3");
@@ -317527,8 +317620,23 @@ function init13(RuntimeName, PHPLoader) {
317527
317620
  }
317528
317621
  },
317529
317622
  get_native_path_from_vfs_path(vfsPath) {
317530
- const { node } = FS.lookupPath(vfsPath);
317531
- return NODEFS.realPath(node);
317623
+ const { node } = FS.lookupPath(vfsPath, {});
317624
+ if (node.mount.type === NODEFS) {
317625
+ return NODEFS.realPath(node);
317626
+ } else if (node.mount.type === PROXYFS) {
317627
+ const { node: backingNode, path: backingPath } = node.mount.opts.fs.lookupPath(vfsPath);
317628
+ _js_wasm_trace(
317629
+ "backingNode for %s: %s",
317630
+ vfsPath,
317631
+ backingPath,
317632
+ backingNode
317633
+ );
317634
+ return backingNode.mount.type.realPath(backingNode);
317635
+ } else {
317636
+ throw new Error(
317637
+ `Unsupported filesystem type for path ${vfsPath}`
317638
+ );
317639
+ }
317532
317640
  },
317533
317641
  check_lock_params(fd, l_type) {
317534
317642
  const emscripten_O_RDONLY = Number("0");
@@ -340673,15 +340781,15 @@ ${e}`);
340673
340781
  PHPLoader["malloc"] = _malloc;
340674
340782
  PHPLoader["free"] = typeof _free === "function" ? _free : PHPLoader["_wasm_free"];
340675
340783
  if (typeof NODEFS === "object") {
340676
- const originalCreateNode = NODEFS.createNode;
340784
+ const originalNodeFsCreateNode = NODEFS.createNode;
340677
340785
  NODEFS.createNode = function createNodeWithSharedFlag() {
340678
- const node = originalCreateNode.apply(NODEFS, arguments);
340786
+ const node = originalNodeFsCreateNode.apply(NODEFS, arguments);
340679
340787
  node.isSharedFS = true;
340680
340788
  return node;
340681
340789
  };
340682
340790
  var originalHashAddNode = FS.hashAddNode;
340683
340791
  FS.hashAddNode = function hashAddNodeIfNotSharedFS(node) {
340684
- if (typeof locking === "object" && locking?.is_shared_fs_node(node)) {
340792
+ if (node?.isSharedFS) {
340685
340793
  return;
340686
340794
  }
340687
340795
  return originalHashAddNode.apply(FS, arguments);
@@ -340698,7 +340806,7 @@ var init_php_8_12 = __esm({
340698
340806
  "packages/php-wasm/node/asyncify/php_8_1.js"() {
340699
340807
  "use strict";
340700
340808
  dependencyFilename12 = path12.join(__dirname + "/asyncify", "8_1_33", "php_8_1.wasm");
340701
- dependenciesTotalSize12 = 31648487;
340809
+ dependenciesTotalSize12 = 31651651;
340702
340810
  phpVersionString12 = "8.1.33";
340703
340811
  }
340704
340812
  });
@@ -346528,27 +346636,21 @@ function init14(RuntimeName, PHPLoader) {
346528
346636
  1: "exclusive",
346529
346637
  2: "unlocked"
346530
346638
  },
346531
- is_shared_fs_node(node) {
346532
- if (node?.isSharedFS) {
346533
- return true;
346534
- }
346535
- if (!node?.mount?.opts?.fs?.lookupPath || !node?.mount?.type?.realPath) {
346536
- return false;
346537
- }
346538
- if (node.mount.type !== NODEFS) {
346539
- return false;
346540
- }
346541
- const vfsPath = node.mount.type.realPath(node);
346542
- try {
346543
- const underlyingNode = node.mount.opts.fs.lookupPath(vfsPath)?.node;
346544
- return !!underlyingNode?.isSharedFS;
346545
- } catch (e) {
346546
- return false;
346547
- }
346548
- },
346549
346639
  is_path_to_shared_fs(path33) {
346550
- const { node } = FS.lookupPath(path33);
346551
- return locking.is_shared_fs_node(node);
346640
+ _js_wasm_trace("is_path_to_shared_fs(%s)", path33);
346641
+ const { node } = FS.lookupPath(path33, { noent_okay: true });
346642
+ if (node.mount.type !== PROXYFS) {
346643
+ return !!node.isSharedFS;
346644
+ }
346645
+ const nodePath2 = PROXYFS.realPath(node);
346646
+ const backingFs = node?.mount?.opts?.fs;
346647
+ if (backingFs) {
346648
+ const { node: backingNode } = backingFs.lookupPath(nodePath2, {
346649
+ noent_okay: true
346650
+ });
346651
+ return !!backingNode?.isSharedFS;
346652
+ }
346653
+ return false;
346552
346654
  },
346553
346655
  get_fd_access_mode(fd) {
346554
346656
  const emscripten_F_GETFL = Number("3");
@@ -346563,8 +346665,23 @@ function init14(RuntimeName, PHPLoader) {
346563
346665
  }
346564
346666
  },
346565
346667
  get_native_path_from_vfs_path(vfsPath) {
346566
- const { node } = FS.lookupPath(vfsPath);
346567
- return NODEFS.realPath(node);
346668
+ const { node } = FS.lookupPath(vfsPath, {});
346669
+ if (node.mount.type === NODEFS) {
346670
+ return NODEFS.realPath(node);
346671
+ } else if (node.mount.type === PROXYFS) {
346672
+ const { node: backingNode, path: backingPath } = node.mount.opts.fs.lookupPath(vfsPath);
346673
+ _js_wasm_trace(
346674
+ "backingNode for %s: %s",
346675
+ vfsPath,
346676
+ backingPath,
346677
+ backingNode
346678
+ );
346679
+ return backingNode.mount.type.realPath(backingNode);
346680
+ } else {
346681
+ throw new Error(
346682
+ `Unsupported filesystem type for path ${vfsPath}`
346683
+ );
346684
+ }
346568
346685
  },
346569
346686
  check_lock_params(fd, l_type) {
346570
346687
  const emscripten_O_RDONLY = Number("0");
@@ -369696,15 +369813,15 @@ ${e}`);
369696
369813
  PHPLoader["malloc"] = _malloc;
369697
369814
  PHPLoader["free"] = typeof _free === "function" ? _free : PHPLoader["_wasm_free"];
369698
369815
  if (typeof NODEFS === "object") {
369699
- const originalCreateNode = NODEFS.createNode;
369816
+ const originalNodeFsCreateNode = NODEFS.createNode;
369700
369817
  NODEFS.createNode = function createNodeWithSharedFlag() {
369701
- const node = originalCreateNode.apply(NODEFS, arguments);
369818
+ const node = originalNodeFsCreateNode.apply(NODEFS, arguments);
369702
369819
  node.isSharedFS = true;
369703
369820
  return node;
369704
369821
  };
369705
369822
  var originalHashAddNode = FS.hashAddNode;
369706
369823
  FS.hashAddNode = function hashAddNodeIfNotSharedFS(node) {
369707
- if (typeof locking === "object" && locking?.is_shared_fs_node(node)) {
369824
+ if (node?.isSharedFS) {
369708
369825
  return;
369709
369826
  }
369710
369827
  return originalHashAddNode.apply(FS, arguments);
@@ -369721,7 +369838,7 @@ var init_php_8_02 = __esm({
369721
369838
  "packages/php-wasm/node/asyncify/php_8_0.js"() {
369722
369839
  "use strict";
369723
369840
  dependencyFilename13 = path13.join(__dirname + "/asyncify", "8_0_30", "php_8_0.wasm");
369724
- dependenciesTotalSize13 = 31315360;
369841
+ dependenciesTotalSize13 = 31318489;
369725
369842
  phpVersionString13 = "8.0.30";
369726
369843
  }
369727
369844
  });
@@ -375551,27 +375668,21 @@ function init15(RuntimeName, PHPLoader) {
375551
375668
  1: "exclusive",
375552
375669
  2: "unlocked"
375553
375670
  },
375554
- is_shared_fs_node(node) {
375555
- if (node?.isSharedFS) {
375556
- return true;
375557
- }
375558
- if (!node?.mount?.opts?.fs?.lookupPath || !node?.mount?.type?.realPath) {
375559
- return false;
375560
- }
375561
- if (node.mount.type !== NODEFS) {
375562
- return false;
375563
- }
375564
- const vfsPath = node.mount.type.realPath(node);
375565
- try {
375566
- const underlyingNode = node.mount.opts.fs.lookupPath(vfsPath)?.node;
375567
- return !!underlyingNode?.isSharedFS;
375568
- } catch (e) {
375569
- return false;
375570
- }
375571
- },
375572
375671
  is_path_to_shared_fs(path33) {
375573
- const { node } = FS.lookupPath(path33);
375574
- return locking.is_shared_fs_node(node);
375672
+ _js_wasm_trace("is_path_to_shared_fs(%s)", path33);
375673
+ const { node } = FS.lookupPath(path33, { noent_okay: true });
375674
+ if (node.mount.type !== PROXYFS) {
375675
+ return !!node.isSharedFS;
375676
+ }
375677
+ const nodePath2 = PROXYFS.realPath(node);
375678
+ const backingFs = node?.mount?.opts?.fs;
375679
+ if (backingFs) {
375680
+ const { node: backingNode } = backingFs.lookupPath(nodePath2, {
375681
+ noent_okay: true
375682
+ });
375683
+ return !!backingNode?.isSharedFS;
375684
+ }
375685
+ return false;
375575
375686
  },
375576
375687
  get_fd_access_mode(fd) {
375577
375688
  const emscripten_F_GETFL = Number("3");
@@ -375586,8 +375697,23 @@ function init15(RuntimeName, PHPLoader) {
375586
375697
  }
375587
375698
  },
375588
375699
  get_native_path_from_vfs_path(vfsPath) {
375589
- const { node } = FS.lookupPath(vfsPath);
375590
- return NODEFS.realPath(node);
375700
+ const { node } = FS.lookupPath(vfsPath, {});
375701
+ if (node.mount.type === NODEFS) {
375702
+ return NODEFS.realPath(node);
375703
+ } else if (node.mount.type === PROXYFS) {
375704
+ const { node: backingNode, path: backingPath } = node.mount.opts.fs.lookupPath(vfsPath);
375705
+ _js_wasm_trace(
375706
+ "backingNode for %s: %s",
375707
+ vfsPath,
375708
+ backingPath,
375709
+ backingNode
375710
+ );
375711
+ return backingNode.mount.type.realPath(backingNode);
375712
+ } else {
375713
+ throw new Error(
375714
+ `Unsupported filesystem type for path ${vfsPath}`
375715
+ );
375716
+ }
375591
375717
  },
375592
375718
  check_lock_params(fd, l_type) {
375593
375719
  const emscripten_O_RDONLY = Number("0");
@@ -398706,15 +398832,15 @@ ${e}`);
398706
398832
  PHPLoader["malloc"] = _malloc;
398707
398833
  PHPLoader["free"] = typeof _free === "function" ? _free : PHPLoader["_wasm_free"];
398708
398834
  if (typeof NODEFS === "object") {
398709
- const originalCreateNode = NODEFS.createNode;
398835
+ const originalNodeFsCreateNode = NODEFS.createNode;
398710
398836
  NODEFS.createNode = function createNodeWithSharedFlag() {
398711
- const node = originalCreateNode.apply(NODEFS, arguments);
398837
+ const node = originalNodeFsCreateNode.apply(NODEFS, arguments);
398712
398838
  node.isSharedFS = true;
398713
398839
  return node;
398714
398840
  };
398715
398841
  var originalHashAddNode = FS.hashAddNode;
398716
398842
  FS.hashAddNode = function hashAddNodeIfNotSharedFS(node) {
398717
- if (typeof locking === "object" && locking?.is_shared_fs_node(node)) {
398843
+ if (node?.isSharedFS) {
398718
398844
  return;
398719
398845
  }
398720
398846
  return originalHashAddNode.apply(FS, arguments);
@@ -398731,7 +398857,7 @@ var init_php_7_42 = __esm({
398731
398857
  "packages/php-wasm/node/asyncify/php_7_4.js"() {
398732
398858
  "use strict";
398733
398859
  dependencyFilename14 = path14.join(__dirname + "/asyncify", "7_4_33", "php_7_4.wasm");
398734
- dependenciesTotalSize14 = 30107713;
398860
+ dependenciesTotalSize14 = 30110863;
398735
398861
  phpVersionString14 = "7.4.33";
398736
398862
  }
398737
398863
  });
@@ -404561,27 +404687,21 @@ function init16(RuntimeName, PHPLoader) {
404561
404687
  1: "exclusive",
404562
404688
  2: "unlocked"
404563
404689
  },
404564
- is_shared_fs_node(node) {
404565
- if (node?.isSharedFS) {
404566
- return true;
404567
- }
404568
- if (!node?.mount?.opts?.fs?.lookupPath || !node?.mount?.type?.realPath) {
404569
- return false;
404570
- }
404571
- if (node.mount.type !== NODEFS) {
404572
- return false;
404573
- }
404574
- const vfsPath = node.mount.type.realPath(node);
404575
- try {
404576
- const underlyingNode = node.mount.opts.fs.lookupPath(vfsPath)?.node;
404577
- return !!underlyingNode?.isSharedFS;
404578
- } catch (e) {
404579
- return false;
404580
- }
404581
- },
404582
404690
  is_path_to_shared_fs(path33) {
404583
- const { node } = FS.lookupPath(path33);
404584
- return locking.is_shared_fs_node(node);
404691
+ _js_wasm_trace("is_path_to_shared_fs(%s)", path33);
404692
+ const { node } = FS.lookupPath(path33, { noent_okay: true });
404693
+ if (node.mount.type !== PROXYFS) {
404694
+ return !!node.isSharedFS;
404695
+ }
404696
+ const nodePath2 = PROXYFS.realPath(node);
404697
+ const backingFs = node?.mount?.opts?.fs;
404698
+ if (backingFs) {
404699
+ const { node: backingNode } = backingFs.lookupPath(nodePath2, {
404700
+ noent_okay: true
404701
+ });
404702
+ return !!backingNode?.isSharedFS;
404703
+ }
404704
+ return false;
404585
404705
  },
404586
404706
  get_fd_access_mode(fd) {
404587
404707
  const emscripten_F_GETFL = Number("3");
@@ -404596,8 +404716,23 @@ function init16(RuntimeName, PHPLoader) {
404596
404716
  }
404597
404717
  },
404598
404718
  get_native_path_from_vfs_path(vfsPath) {
404599
- const { node } = FS.lookupPath(vfsPath);
404600
- return NODEFS.realPath(node);
404719
+ const { node } = FS.lookupPath(vfsPath, {});
404720
+ if (node.mount.type === NODEFS) {
404721
+ return NODEFS.realPath(node);
404722
+ } else if (node.mount.type === PROXYFS) {
404723
+ const { node: backingNode, path: backingPath } = node.mount.opts.fs.lookupPath(vfsPath);
404724
+ _js_wasm_trace(
404725
+ "backingNode for %s: %s",
404726
+ vfsPath,
404727
+ backingPath,
404728
+ backingNode
404729
+ );
404730
+ return backingNode.mount.type.realPath(backingNode);
404731
+ } else {
404732
+ throw new Error(
404733
+ `Unsupported filesystem type for path ${vfsPath}`
404734
+ );
404735
+ }
404601
404736
  },
404602
404737
  check_lock_params(fd, l_type) {
404603
404738
  const emscripten_O_RDONLY = Number("0");
@@ -427703,15 +427838,15 @@ ${e}`);
427703
427838
  PHPLoader["malloc"] = _malloc;
427704
427839
  PHPLoader["free"] = typeof _free === "function" ? _free : PHPLoader["_wasm_free"];
427705
427840
  if (typeof NODEFS === "object") {
427706
- const originalCreateNode = NODEFS.createNode;
427841
+ const originalNodeFsCreateNode = NODEFS.createNode;
427707
427842
  NODEFS.createNode = function createNodeWithSharedFlag() {
427708
- const node = originalCreateNode.apply(NODEFS, arguments);
427843
+ const node = originalNodeFsCreateNode.apply(NODEFS, arguments);
427709
427844
  node.isSharedFS = true;
427710
427845
  return node;
427711
427846
  };
427712
427847
  var originalHashAddNode = FS.hashAddNode;
427713
427848
  FS.hashAddNode = function hashAddNodeIfNotSharedFS(node) {
427714
- if (typeof locking === "object" && locking?.is_shared_fs_node(node)) {
427849
+ if (node?.isSharedFS) {
427715
427850
  return;
427716
427851
  }
427717
427852
  return originalHashAddNode.apply(FS, arguments);
@@ -427728,7 +427863,7 @@ var init_php_7_32 = __esm({
427728
427863
  "packages/php-wasm/node/asyncify/php_7_3.js"() {
427729
427864
  "use strict";
427730
427865
  dependencyFilename15 = path15.join(__dirname + "/asyncify", "7_3_33", "php_7_3.wasm");
427731
- dependenciesTotalSize15 = 29695998;
427866
+ dependenciesTotalSize15 = 29698903;
427732
427867
  phpVersionString15 = "7.3.33";
427733
427868
  }
427734
427869
  });
@@ -433558,27 +433693,21 @@ function init17(RuntimeName, PHPLoader) {
433558
433693
  1: "exclusive",
433559
433694
  2: "unlocked"
433560
433695
  },
433561
- is_shared_fs_node(node) {
433562
- if (node?.isSharedFS) {
433563
- return true;
433564
- }
433565
- if (!node?.mount?.opts?.fs?.lookupPath || !node?.mount?.type?.realPath) {
433566
- return false;
433567
- }
433568
- if (node.mount.type !== NODEFS) {
433569
- return false;
433570
- }
433571
- const vfsPath = node.mount.type.realPath(node);
433572
- try {
433573
- const underlyingNode = node.mount.opts.fs.lookupPath(vfsPath)?.node;
433574
- return !!underlyingNode?.isSharedFS;
433575
- } catch (e) {
433576
- return false;
433577
- }
433578
- },
433579
433696
  is_path_to_shared_fs(path33) {
433580
- const { node } = FS.lookupPath(path33);
433581
- return locking.is_shared_fs_node(node);
433697
+ _js_wasm_trace("is_path_to_shared_fs(%s)", path33);
433698
+ const { node } = FS.lookupPath(path33, { noent_okay: true });
433699
+ if (node.mount.type !== PROXYFS) {
433700
+ return !!node.isSharedFS;
433701
+ }
433702
+ const nodePath2 = PROXYFS.realPath(node);
433703
+ const backingFs = node?.mount?.opts?.fs;
433704
+ if (backingFs) {
433705
+ const { node: backingNode } = backingFs.lookupPath(nodePath2, {
433706
+ noent_okay: true
433707
+ });
433708
+ return !!backingNode?.isSharedFS;
433709
+ }
433710
+ return false;
433582
433711
  },
433583
433712
  get_fd_access_mode(fd) {
433584
433713
  const emscripten_F_GETFL = Number("3");
@@ -433593,8 +433722,23 @@ function init17(RuntimeName, PHPLoader) {
433593
433722
  }
433594
433723
  },
433595
433724
  get_native_path_from_vfs_path(vfsPath) {
433596
- const { node } = FS.lookupPath(vfsPath);
433597
- return NODEFS.realPath(node);
433725
+ const { node } = FS.lookupPath(vfsPath, {});
433726
+ if (node.mount.type === NODEFS) {
433727
+ return NODEFS.realPath(node);
433728
+ } else if (node.mount.type === PROXYFS) {
433729
+ const { node: backingNode, path: backingPath } = node.mount.opts.fs.lookupPath(vfsPath);
433730
+ _js_wasm_trace(
433731
+ "backingNode for %s: %s",
433732
+ vfsPath,
433733
+ backingPath,
433734
+ backingNode
433735
+ );
433736
+ return backingNode.mount.type.realPath(backingNode);
433737
+ } else {
433738
+ throw new Error(
433739
+ `Unsupported filesystem type for path ${vfsPath}`
433740
+ );
433741
+ }
433598
433742
  },
433599
433743
  check_lock_params(fd, l_type) {
433600
433744
  const emscripten_O_RDONLY = Number("0");
@@ -456686,15 +456830,15 @@ ${e}`);
456686
456830
  PHPLoader["malloc"] = _malloc;
456687
456831
  PHPLoader["free"] = typeof _free === "function" ? _free : PHPLoader["_wasm_free"];
456688
456832
  if (typeof NODEFS === "object") {
456689
- const originalCreateNode = NODEFS.createNode;
456833
+ const originalNodeFsCreateNode = NODEFS.createNode;
456690
456834
  NODEFS.createNode = function createNodeWithSharedFlag() {
456691
- const node = originalCreateNode.apply(NODEFS, arguments);
456835
+ const node = originalNodeFsCreateNode.apply(NODEFS, arguments);
456692
456836
  node.isSharedFS = true;
456693
456837
  return node;
456694
456838
  };
456695
456839
  var originalHashAddNode = FS.hashAddNode;
456696
456840
  FS.hashAddNode = function hashAddNodeIfNotSharedFS(node) {
456697
- if (typeof locking === "object" && locking?.is_shared_fs_node(node)) {
456841
+ if (node?.isSharedFS) {
456698
456842
  return;
456699
456843
  }
456700
456844
  return originalHashAddNode.apply(FS, arguments);
@@ -456711,7 +456855,7 @@ var init_php_7_22 = __esm({
456711
456855
  "packages/php-wasm/node/asyncify/php_7_2.js"() {
456712
456856
  "use strict";
456713
456857
  dependencyFilename16 = path16.join(__dirname + "/asyncify", "7_2_34", "php_7_2.wasm");
456714
- dependenciesTotalSize16 = 29379142;
456858
+ dependenciesTotalSize16 = 29381880;
456715
456859
  phpVersionString16 = "7.2.34";
456716
456860
  }
456717
456861
  });
@@ -457472,7 +457616,7 @@ async function loadNodeRuntime(phpVersion, options = {}) {
457472
457616
  )
457473
457617
  );
457474
457618
  const symlinkPath = joinPaths(
457475
- `/internals/symlinks`,
457619
+ `/internal/symlinks`,
457476
457620
  absoluteSourcePath
457477
457621
  );
457478
457622
  if (!FSHelpers3.fileExists(phpRuntime.FS, symlinkPath) && fs4.existsSync(absoluteSourcePath)) {
@@ -457809,12 +457953,7 @@ var FileLock = class _FileLock {
457809
457953
  }
457810
457954
  return true;
457811
457955
  }
457812
- if (this.doesAConflictingLockExist({
457813
- type: op.type,
457814
- start: 0n,
457815
- end: MAX_64BIT_OFFSET,
457816
- pid: op.pid
457817
- })) {
457956
+ if (this.isThereAConflictWithRequestedWholeFileLock(op)) {
457818
457957
  return false;
457819
457958
  }
457820
457959
  if (!this.ensureCompatibleNativeLock({
@@ -457885,7 +458024,7 @@ var FileLock = class _FileLock {
457885
458024
  }
457886
458025
  return true;
457887
458026
  }
457888
- if (this.doesAConflictingLockExist(requestedLock)) {
458027
+ if (this.isThereAConflictWithRequestedRangeLock(requestedLock)) {
457889
458028
  return false;
457890
458029
  }
457891
458030
  if (!this.ensureCompatibleNativeLock({
@@ -458033,14 +458172,61 @@ var FileLock = class _FileLock {
458033
458172
  }
458034
458173
  }
458035
458174
  /**
458036
- * Check if a conflicting lock exists.
458175
+ * Check if a lock exists that conflicts with the requested range lock.
458037
458176
  *
458038
458177
  * @param requestedLock The desired byte range lock.
458039
458178
  * @returns True if a conflicting lock exists, false otherwise.
458040
458179
  */
458041
- doesAConflictingLockExist(requestedLock) {
458180
+ isThereAConflictWithRequestedRangeLock(requestedLock) {
458042
458181
  return this.findFirstConflictingByteRangeLock(requestedLock) !== void 0;
458043
458182
  }
458183
+ /**
458184
+ * Check if a lock exists that conflicts with the requested whole-file lock.
458185
+ *
458186
+ * @param requestedLock The desired whole-file lock.
458187
+ * @returns True if a conflicting lock exists, false otherwise.
458188
+ */
458189
+ isThereAConflictWithRequestedWholeFileLock(requestedLock) {
458190
+ if (requestedLock.type === "exclusive") {
458191
+ if (this.wholeFileLock.type === "exclusive" && (this.wholeFileLock.fd !== requestedLock.fd || this.wholeFileLock.pid !== requestedLock.pid)) {
458192
+ return true;
458193
+ }
458194
+ if (this.wholeFileLock.type === "shared" && Array.from(this.wholeFileLock.pidFds).some(
458195
+ ([pid]) => pid !== requestedLock.pid
458196
+ )) {
458197
+ return true;
458198
+ }
458199
+ const overlappingLocks = this.rangeLocks.findOverlapping({
458200
+ type: "unlocked",
458201
+ start: 0n,
458202
+ end: MAX_64BIT_OFFSET,
458203
+ pid: -1
458204
+ });
458205
+ if (overlappingLocks.length > 0) {
458206
+ return true;
458207
+ }
458208
+ return false;
458209
+ }
458210
+ if (requestedLock.type === "shared") {
458211
+ if (this.wholeFileLock.type === "exclusive" && this.wholeFileLock.pid !== requestedLock.pid) {
458212
+ return true;
458213
+ }
458214
+ const overlappingLocks = this.rangeLocks.findOverlapping({
458215
+ type: "unlocked",
458216
+ start: 0n,
458217
+ end: MAX_64BIT_OFFSET,
458218
+ pid: -1
458219
+ });
458220
+ const exclusiveRangeLocks = overlappingLocks.filter(
458221
+ (lock) => lock.type === "exclusive"
458222
+ );
458223
+ if (exclusiveRangeLocks.length > 0) {
458224
+ return true;
458225
+ }
458226
+ return false;
458227
+ }
458228
+ return false;
458229
+ }
458044
458230
  };
458045
458231
  var IntervalNode = class {
458046
458232
  constructor(range) {