@php-wasm/node 1.1.4 → 1.1.5

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.cjs CHANGED
@@ -4509,9 +4509,24 @@ function init(RuntimeName, PHPLoader) {
4509
4509
  var allocateUTF8OnStack = stringToUTF8OnStack;
4510
4510
  var PHPWASM = {
4511
4511
  init: function() {
4512
+ Module["ENV"] = Module["ENV"] || {};
4513
+ Module["ENV"]["PATH"] = [
4514
+ Module["ENV"]["PATH"],
4515
+ "/internal/shared/bin"
4516
+ ].filter(Boolean).join(":");
4512
4517
  FS.mkdir("/internal");
4513
4518
  FS.mkdir("/internal/shared");
4514
4519
  FS.mkdir("/internal/shared/preload");
4520
+ FS.mkdir("/internal/shared/bin");
4521
+ const originalOnRuntimeInitialized = Module["onRuntimeInitialized"];
4522
+ Module["onRuntimeInitialized"] = () => {
4523
+ FS.writeFile(
4524
+ "/internal/shared/bin/php",
4525
+ new TextEncoder().encode('#!/bin/sh\nphp "$@"')
4526
+ );
4527
+ FS.chmod("/internal/shared/bin/php", 493);
4528
+ originalOnRuntimeInitialized();
4529
+ };
4515
4530
  FS.registerDevice(FS.makedev(64, 0), {
4516
4531
  open: () => {
4517
4532
  },
@@ -4871,12 +4886,19 @@ function init(RuntimeName, PHPLoader) {
4871
4886
  if (node?.isSharedFS) {
4872
4887
  return true;
4873
4888
  }
4874
- if (!node?.mount?.opts?.fs?.lookupPath) {
4889
+ if (!node?.mount?.opts?.fs?.lookupPath || !node?.mount?.type?.realPath) {
4890
+ return false;
4891
+ }
4892
+ if (node.mount.type !== NODEFS) {
4893
+ return false;
4894
+ }
4895
+ const vfsPath = node.mount.type.realPath(node);
4896
+ try {
4897
+ const underlyingNode = node.mount.opts.fs.lookupPath(vfsPath)?.node;
4898
+ return !!underlyingNode?.isSharedFS;
4899
+ } catch (e) {
4875
4900
  return false;
4876
4901
  }
4877
- const vfsPath = NODEFS.realPath(node);
4878
- const underlyingNode = node.mount.opts.fs.lookupPath(vfsPath)?.node;
4879
- return !!underlyingNode?.isSharedFS;
4880
4902
  },
4881
4903
  is_path_to_shared_fs(path17) {
4882
4904
  const { node } = FS.lookupPath(path17);
@@ -12568,9 +12590,24 @@ function init2(RuntimeName, PHPLoader) {
12568
12590
  var allocateUTF8OnStack = stringToUTF8OnStack;
12569
12591
  var PHPWASM = {
12570
12592
  init: function() {
12593
+ Module["ENV"] = Module["ENV"] || {};
12594
+ Module["ENV"]["PATH"] = [
12595
+ Module["ENV"]["PATH"],
12596
+ "/internal/shared/bin"
12597
+ ].filter(Boolean).join(":");
12571
12598
  FS.mkdir("/internal");
12572
12599
  FS.mkdir("/internal/shared");
12573
12600
  FS.mkdir("/internal/shared/preload");
12601
+ FS.mkdir("/internal/shared/bin");
12602
+ const originalOnRuntimeInitialized = Module["onRuntimeInitialized"];
12603
+ Module["onRuntimeInitialized"] = () => {
12604
+ FS.writeFile(
12605
+ "/internal/shared/bin/php",
12606
+ new TextEncoder().encode('#!/bin/sh\nphp "$@"')
12607
+ );
12608
+ FS.chmod("/internal/shared/bin/php", 493);
12609
+ originalOnRuntimeInitialized();
12610
+ };
12574
12611
  FS.registerDevice(FS.makedev(64, 0), {
12575
12612
  open: () => {
12576
12613
  },
@@ -12930,12 +12967,19 @@ function init2(RuntimeName, PHPLoader) {
12930
12967
  if (node?.isSharedFS) {
12931
12968
  return true;
12932
12969
  }
12933
- if (!node?.mount?.opts?.fs?.lookupPath) {
12970
+ if (!node?.mount?.opts?.fs?.lookupPath || !node?.mount?.type?.realPath) {
12971
+ return false;
12972
+ }
12973
+ if (node.mount.type !== NODEFS) {
12974
+ return false;
12975
+ }
12976
+ const vfsPath = node.mount.type.realPath(node);
12977
+ try {
12978
+ const underlyingNode = node.mount.opts.fs.lookupPath(vfsPath)?.node;
12979
+ return !!underlyingNode?.isSharedFS;
12980
+ } catch (e) {
12934
12981
  return false;
12935
12982
  }
12936
- const vfsPath = NODEFS.realPath(node);
12937
- const underlyingNode = node.mount.opts.fs.lookupPath(vfsPath)?.node;
12938
- return !!underlyingNode?.isSharedFS;
12939
12983
  },
12940
12984
  is_path_to_shared_fs(path17) {
12941
12985
  const { node } = FS.lookupPath(path17);
@@ -20627,9 +20671,24 @@ function init3(RuntimeName, PHPLoader) {
20627
20671
  var allocateUTF8OnStack = stringToUTF8OnStack;
20628
20672
  var PHPWASM = {
20629
20673
  init: function() {
20674
+ Module["ENV"] = Module["ENV"] || {};
20675
+ Module["ENV"]["PATH"] = [
20676
+ Module["ENV"]["PATH"],
20677
+ "/internal/shared/bin"
20678
+ ].filter(Boolean).join(":");
20630
20679
  FS.mkdir("/internal");
20631
20680
  FS.mkdir("/internal/shared");
20632
20681
  FS.mkdir("/internal/shared/preload");
20682
+ FS.mkdir("/internal/shared/bin");
20683
+ const originalOnRuntimeInitialized = Module["onRuntimeInitialized"];
20684
+ Module["onRuntimeInitialized"] = () => {
20685
+ FS.writeFile(
20686
+ "/internal/shared/bin/php",
20687
+ new TextEncoder().encode('#!/bin/sh\nphp "$@"')
20688
+ );
20689
+ FS.chmod("/internal/shared/bin/php", 493);
20690
+ originalOnRuntimeInitialized();
20691
+ };
20633
20692
  FS.registerDevice(FS.makedev(64, 0), {
20634
20693
  open: () => {
20635
20694
  },
@@ -20989,12 +21048,19 @@ function init3(RuntimeName, PHPLoader) {
20989
21048
  if (node?.isSharedFS) {
20990
21049
  return true;
20991
21050
  }
20992
- if (!node?.mount?.opts?.fs?.lookupPath) {
21051
+ if (!node?.mount?.opts?.fs?.lookupPath || !node?.mount?.type?.realPath) {
21052
+ return false;
21053
+ }
21054
+ if (node.mount.type !== NODEFS) {
21055
+ return false;
21056
+ }
21057
+ const vfsPath = node.mount.type.realPath(node);
21058
+ try {
21059
+ const underlyingNode = node.mount.opts.fs.lookupPath(vfsPath)?.node;
21060
+ return !!underlyingNode?.isSharedFS;
21061
+ } catch (e) {
20993
21062
  return false;
20994
21063
  }
20995
- const vfsPath = NODEFS.realPath(node);
20996
- const underlyingNode = node.mount.opts.fs.lookupPath(vfsPath)?.node;
20997
- return !!underlyingNode?.isSharedFS;
20998
21064
  },
20999
21065
  is_path_to_shared_fs(path17) {
21000
21066
  const { node } = FS.lookupPath(path17);
@@ -28686,9 +28752,24 @@ function init4(RuntimeName, PHPLoader) {
28686
28752
  var allocateUTF8OnStack = stringToUTF8OnStack;
28687
28753
  var PHPWASM = {
28688
28754
  init: function() {
28755
+ Module["ENV"] = Module["ENV"] || {};
28756
+ Module["ENV"]["PATH"] = [
28757
+ Module["ENV"]["PATH"],
28758
+ "/internal/shared/bin"
28759
+ ].filter(Boolean).join(":");
28689
28760
  FS.mkdir("/internal");
28690
28761
  FS.mkdir("/internal/shared");
28691
28762
  FS.mkdir("/internal/shared/preload");
28763
+ FS.mkdir("/internal/shared/bin");
28764
+ const originalOnRuntimeInitialized = Module["onRuntimeInitialized"];
28765
+ Module["onRuntimeInitialized"] = () => {
28766
+ FS.writeFile(
28767
+ "/internal/shared/bin/php",
28768
+ new TextEncoder().encode('#!/bin/sh\nphp "$@"')
28769
+ );
28770
+ FS.chmod("/internal/shared/bin/php", 493);
28771
+ originalOnRuntimeInitialized();
28772
+ };
28692
28773
  FS.registerDevice(FS.makedev(64, 0), {
28693
28774
  open: () => {
28694
28775
  },
@@ -29048,12 +29129,19 @@ function init4(RuntimeName, PHPLoader) {
29048
29129
  if (node?.isSharedFS) {
29049
29130
  return true;
29050
29131
  }
29051
- if (!node?.mount?.opts?.fs?.lookupPath) {
29132
+ if (!node?.mount?.opts?.fs?.lookupPath || !node?.mount?.type?.realPath) {
29133
+ return false;
29134
+ }
29135
+ if (node.mount.type !== NODEFS) {
29136
+ return false;
29137
+ }
29138
+ const vfsPath = node.mount.type.realPath(node);
29139
+ try {
29140
+ const underlyingNode = node.mount.opts.fs.lookupPath(vfsPath)?.node;
29141
+ return !!underlyingNode?.isSharedFS;
29142
+ } catch (e) {
29052
29143
  return false;
29053
29144
  }
29054
- const vfsPath = NODEFS.realPath(node);
29055
- const underlyingNode = node.mount.opts.fs.lookupPath(vfsPath)?.node;
29056
- return !!underlyingNode?.isSharedFS;
29057
29145
  },
29058
29146
  is_path_to_shared_fs(path17) {
29059
29147
  const { node } = FS.lookupPath(path17);
@@ -36742,9 +36830,24 @@ function init5(RuntimeName, PHPLoader) {
36742
36830
  var allocateUTF8OnStack = stringToUTF8OnStack;
36743
36831
  var PHPWASM = {
36744
36832
  init: function() {
36833
+ Module["ENV"] = Module["ENV"] || {};
36834
+ Module["ENV"]["PATH"] = [
36835
+ Module["ENV"]["PATH"],
36836
+ "/internal/shared/bin"
36837
+ ].filter(Boolean).join(":");
36745
36838
  FS.mkdir("/internal");
36746
36839
  FS.mkdir("/internal/shared");
36747
36840
  FS.mkdir("/internal/shared/preload");
36841
+ FS.mkdir("/internal/shared/bin");
36842
+ const originalOnRuntimeInitialized = Module["onRuntimeInitialized"];
36843
+ Module["onRuntimeInitialized"] = () => {
36844
+ FS.writeFile(
36845
+ "/internal/shared/bin/php",
36846
+ new TextEncoder().encode('#!/bin/sh\nphp "$@"')
36847
+ );
36848
+ FS.chmod("/internal/shared/bin/php", 493);
36849
+ originalOnRuntimeInitialized();
36850
+ };
36748
36851
  FS.registerDevice(FS.makedev(64, 0), {
36749
36852
  open: () => {
36750
36853
  },
@@ -37104,12 +37207,19 @@ function init5(RuntimeName, PHPLoader) {
37104
37207
  if (node?.isSharedFS) {
37105
37208
  return true;
37106
37209
  }
37107
- if (!node?.mount?.opts?.fs?.lookupPath) {
37210
+ if (!node?.mount?.opts?.fs?.lookupPath || !node?.mount?.type?.realPath) {
37211
+ return false;
37212
+ }
37213
+ if (node.mount.type !== NODEFS) {
37214
+ return false;
37215
+ }
37216
+ const vfsPath = node.mount.type.realPath(node);
37217
+ try {
37218
+ const underlyingNode = node.mount.opts.fs.lookupPath(vfsPath)?.node;
37219
+ return !!underlyingNode?.isSharedFS;
37220
+ } catch (e) {
37108
37221
  return false;
37109
37222
  }
37110
- const vfsPath = NODEFS.realPath(node);
37111
- const underlyingNode = node.mount.opts.fs.lookupPath(vfsPath)?.node;
37112
- return !!underlyingNode?.isSharedFS;
37113
37223
  },
37114
37224
  is_path_to_shared_fs(path17) {
37115
37225
  const { node } = FS.lookupPath(path17);
@@ -44750,9 +44860,24 @@ function init6(RuntimeName, PHPLoader) {
44750
44860
  var allocateUTF8OnStack = stringToUTF8OnStack;
44751
44861
  var PHPWASM = {
44752
44862
  init: function() {
44863
+ Module["ENV"] = Module["ENV"] || {};
44864
+ Module["ENV"]["PATH"] = [
44865
+ Module["ENV"]["PATH"],
44866
+ "/internal/shared/bin"
44867
+ ].filter(Boolean).join(":");
44753
44868
  FS.mkdir("/internal");
44754
44869
  FS.mkdir("/internal/shared");
44755
44870
  FS.mkdir("/internal/shared/preload");
44871
+ FS.mkdir("/internal/shared/bin");
44872
+ const originalOnRuntimeInitialized = Module["onRuntimeInitialized"];
44873
+ Module["onRuntimeInitialized"] = () => {
44874
+ FS.writeFile(
44875
+ "/internal/shared/bin/php",
44876
+ new TextEncoder().encode('#!/bin/sh\nphp "$@"')
44877
+ );
44878
+ FS.chmod("/internal/shared/bin/php", 493);
44879
+ originalOnRuntimeInitialized();
44880
+ };
44756
44881
  FS.registerDevice(FS.makedev(64, 0), {
44757
44882
  open: () => {
44758
44883
  },
@@ -45112,12 +45237,19 @@ function init6(RuntimeName, PHPLoader) {
45112
45237
  if (node?.isSharedFS) {
45113
45238
  return true;
45114
45239
  }
45115
- if (!node?.mount?.opts?.fs?.lookupPath) {
45240
+ if (!node?.mount?.opts?.fs?.lookupPath || !node?.mount?.type?.realPath) {
45241
+ return false;
45242
+ }
45243
+ if (node.mount.type !== NODEFS) {
45244
+ return false;
45245
+ }
45246
+ const vfsPath = node.mount.type.realPath(node);
45247
+ try {
45248
+ const underlyingNode = node.mount.opts.fs.lookupPath(vfsPath)?.node;
45249
+ return !!underlyingNode?.isSharedFS;
45250
+ } catch (e) {
45116
45251
  return false;
45117
45252
  }
45118
- const vfsPath = NODEFS.realPath(node);
45119
- const underlyingNode = node.mount.opts.fs.lookupPath(vfsPath)?.node;
45120
- return !!underlyingNode?.isSharedFS;
45121
45253
  },
45122
45254
  is_path_to_shared_fs(path17) {
45123
45255
  const { node } = FS.lookupPath(path17);
@@ -52762,9 +52894,24 @@ function init7(RuntimeName, PHPLoader) {
52762
52894
  var allocateUTF8OnStack = stringToUTF8OnStack;
52763
52895
  var PHPWASM = {
52764
52896
  init: function() {
52897
+ Module["ENV"] = Module["ENV"] || {};
52898
+ Module["ENV"]["PATH"] = [
52899
+ Module["ENV"]["PATH"],
52900
+ "/internal/shared/bin"
52901
+ ].filter(Boolean).join(":");
52765
52902
  FS.mkdir("/internal");
52766
52903
  FS.mkdir("/internal/shared");
52767
52904
  FS.mkdir("/internal/shared/preload");
52905
+ FS.mkdir("/internal/shared/bin");
52906
+ const originalOnRuntimeInitialized = Module["onRuntimeInitialized"];
52907
+ Module["onRuntimeInitialized"] = () => {
52908
+ FS.writeFile(
52909
+ "/internal/shared/bin/php",
52910
+ new TextEncoder().encode('#!/bin/sh\nphp "$@"')
52911
+ );
52912
+ FS.chmod("/internal/shared/bin/php", 493);
52913
+ originalOnRuntimeInitialized();
52914
+ };
52768
52915
  FS.registerDevice(FS.makedev(64, 0), {
52769
52916
  open: () => {
52770
52917
  },
@@ -53124,12 +53271,19 @@ function init7(RuntimeName, PHPLoader) {
53124
53271
  if (node?.isSharedFS) {
53125
53272
  return true;
53126
53273
  }
53127
- if (!node?.mount?.opts?.fs?.lookupPath) {
53274
+ if (!node?.mount?.opts?.fs?.lookupPath || !node?.mount?.type?.realPath) {
53275
+ return false;
53276
+ }
53277
+ if (node.mount.type !== NODEFS) {
53278
+ return false;
53279
+ }
53280
+ const vfsPath = node.mount.type.realPath(node);
53281
+ try {
53282
+ const underlyingNode = node.mount.opts.fs.lookupPath(vfsPath)?.node;
53283
+ return !!underlyingNode?.isSharedFS;
53284
+ } catch (e) {
53128
53285
  return false;
53129
53286
  }
53130
- const vfsPath = NODEFS.realPath(node);
53131
- const underlyingNode = node.mount.opts.fs.lookupPath(vfsPath)?.node;
53132
- return !!underlyingNode?.isSharedFS;
53133
53287
  },
53134
53288
  is_path_to_shared_fs(path17) {
53135
53289
  const { node } = FS.lookupPath(path17);
@@ -60769,9 +60923,24 @@ function init8(RuntimeName, PHPLoader) {
60769
60923
  var allocateUTF8OnStack = stringToUTF8OnStack;
60770
60924
  var PHPWASM = {
60771
60925
  init: function() {
60926
+ Module["ENV"] = Module["ENV"] || {};
60927
+ Module["ENV"]["PATH"] = [
60928
+ Module["ENV"]["PATH"],
60929
+ "/internal/shared/bin"
60930
+ ].filter(Boolean).join(":");
60772
60931
  FS.mkdir("/internal");
60773
60932
  FS.mkdir("/internal/shared");
60774
60933
  FS.mkdir("/internal/shared/preload");
60934
+ FS.mkdir("/internal/shared/bin");
60935
+ const originalOnRuntimeInitialized = Module["onRuntimeInitialized"];
60936
+ Module["onRuntimeInitialized"] = () => {
60937
+ FS.writeFile(
60938
+ "/internal/shared/bin/php",
60939
+ new TextEncoder().encode('#!/bin/sh\nphp "$@"')
60940
+ );
60941
+ FS.chmod("/internal/shared/bin/php", 493);
60942
+ originalOnRuntimeInitialized();
60943
+ };
60775
60944
  FS.registerDevice(FS.makedev(64, 0), {
60776
60945
  open: () => {
60777
60946
  },
@@ -61131,12 +61300,19 @@ function init8(RuntimeName, PHPLoader) {
61131
61300
  if (node?.isSharedFS) {
61132
61301
  return true;
61133
61302
  }
61134
- if (!node?.mount?.opts?.fs?.lookupPath) {
61303
+ if (!node?.mount?.opts?.fs?.lookupPath || !node?.mount?.type?.realPath) {
61304
+ return false;
61305
+ }
61306
+ if (node.mount.type !== NODEFS) {
61307
+ return false;
61308
+ }
61309
+ const vfsPath = node.mount.type.realPath(node);
61310
+ try {
61311
+ const underlyingNode = node.mount.opts.fs.lookupPath(vfsPath)?.node;
61312
+ return !!underlyingNode?.isSharedFS;
61313
+ } catch (e) {
61135
61314
  return false;
61136
61315
  }
61137
- const vfsPath = NODEFS.realPath(node);
61138
- const underlyingNode = node.mount.opts.fs.lookupPath(vfsPath)?.node;
61139
- return !!underlyingNode?.isSharedFS;
61140
61316
  },
61141
61317
  is_path_to_shared_fs(path17) {
61142
61318
  const { node } = FS.lookupPath(path17);
@@ -70389,9 +70565,24 @@ function init9(RuntimeName, PHPLoader) {
70389
70565
  }
70390
70566
  var PHPWASM = {
70391
70567
  init: function() {
70568
+ Module["ENV"] = Module["ENV"] || {};
70569
+ Module["ENV"]["PATH"] = [
70570
+ Module["ENV"]["PATH"],
70571
+ "/internal/shared/bin"
70572
+ ].filter(Boolean).join(":");
70392
70573
  FS.mkdir("/internal");
70393
70574
  FS.mkdir("/internal/shared");
70394
70575
  FS.mkdir("/internal/shared/preload");
70576
+ FS.mkdir("/internal/shared/bin");
70577
+ const originalOnRuntimeInitialized = Module["onRuntimeInitialized"];
70578
+ Module["onRuntimeInitialized"] = () => {
70579
+ FS.writeFile(
70580
+ "/internal/shared/bin/php",
70581
+ new TextEncoder().encode('#!/bin/sh\nphp "$@"')
70582
+ );
70583
+ FS.chmod("/internal/shared/bin/php", 493);
70584
+ originalOnRuntimeInitialized();
70585
+ };
70395
70586
  FS.registerDevice(FS.makedev(64, 0), {
70396
70587
  open: () => {
70397
70588
  },
@@ -78642,9 +78833,24 @@ function init10(RuntimeName, PHPLoader) {
78642
78833
  }
78643
78834
  var PHPWASM = {
78644
78835
  init: function() {
78836
+ Module["ENV"] = Module["ENV"] || {};
78837
+ Module["ENV"]["PATH"] = [
78838
+ Module["ENV"]["PATH"],
78839
+ "/internal/shared/bin"
78840
+ ].filter(Boolean).join(":");
78645
78841
  FS.mkdir("/internal");
78646
78842
  FS.mkdir("/internal/shared");
78647
78843
  FS.mkdir("/internal/shared/preload");
78844
+ FS.mkdir("/internal/shared/bin");
78845
+ const originalOnRuntimeInitialized = Module["onRuntimeInitialized"];
78846
+ Module["onRuntimeInitialized"] = () => {
78847
+ FS.writeFile(
78848
+ "/internal/shared/bin/php",
78849
+ new TextEncoder().encode('#!/bin/sh\nphp "$@"')
78850
+ );
78851
+ FS.chmod("/internal/shared/bin/php", 493);
78852
+ originalOnRuntimeInitialized();
78853
+ };
78648
78854
  FS.registerDevice(FS.makedev(64, 0), {
78649
78855
  open: () => {
78650
78856
  },
@@ -86917,9 +87123,24 @@ function init11(RuntimeName, PHPLoader) {
86917
87123
  }
86918
87124
  var PHPWASM = {
86919
87125
  init: function() {
87126
+ Module["ENV"] = Module["ENV"] || {};
87127
+ Module["ENV"]["PATH"] = [
87128
+ Module["ENV"]["PATH"],
87129
+ "/internal/shared/bin"
87130
+ ].filter(Boolean).join(":");
86920
87131
  FS.mkdir("/internal");
86921
87132
  FS.mkdir("/internal/shared");
86922
87133
  FS.mkdir("/internal/shared/preload");
87134
+ FS.mkdir("/internal/shared/bin");
87135
+ const originalOnRuntimeInitialized = Module["onRuntimeInitialized"];
87136
+ Module["onRuntimeInitialized"] = () => {
87137
+ FS.writeFile(
87138
+ "/internal/shared/bin/php",
87139
+ new TextEncoder().encode('#!/bin/sh\nphp "$@"')
87140
+ );
87141
+ FS.chmod("/internal/shared/bin/php", 493);
87142
+ originalOnRuntimeInitialized();
87143
+ };
86923
87144
  FS.registerDevice(FS.makedev(64, 0), {
86924
87145
  open: () => {
86925
87146
  },
@@ -95191,9 +95412,24 @@ function init12(RuntimeName, PHPLoader) {
95191
95412
  }
95192
95413
  var PHPWASM = {
95193
95414
  init: function() {
95415
+ Module["ENV"] = Module["ENV"] || {};
95416
+ Module["ENV"]["PATH"] = [
95417
+ Module["ENV"]["PATH"],
95418
+ "/internal/shared/bin"
95419
+ ].filter(Boolean).join(":");
95194
95420
  FS.mkdir("/internal");
95195
95421
  FS.mkdir("/internal/shared");
95196
95422
  FS.mkdir("/internal/shared/preload");
95423
+ FS.mkdir("/internal/shared/bin");
95424
+ const originalOnRuntimeInitialized = Module["onRuntimeInitialized"];
95425
+ Module["onRuntimeInitialized"] = () => {
95426
+ FS.writeFile(
95427
+ "/internal/shared/bin/php",
95428
+ new TextEncoder().encode('#!/bin/sh\nphp "$@"')
95429
+ );
95430
+ FS.chmod("/internal/shared/bin/php", 493);
95431
+ originalOnRuntimeInitialized();
95432
+ };
95197
95433
  FS.registerDevice(FS.makedev(64, 0), {
95198
95434
  open: () => {
95199
95435
  },
@@ -103438,9 +103674,24 @@ function init13(RuntimeName, PHPLoader) {
103438
103674
  }
103439
103675
  var PHPWASM = {
103440
103676
  init: function() {
103677
+ Module["ENV"] = Module["ENV"] || {};
103678
+ Module["ENV"]["PATH"] = [
103679
+ Module["ENV"]["PATH"],
103680
+ "/internal/shared/bin"
103681
+ ].filter(Boolean).join(":");
103441
103682
  FS.mkdir("/internal");
103442
103683
  FS.mkdir("/internal/shared");
103443
103684
  FS.mkdir("/internal/shared/preload");
103685
+ FS.mkdir("/internal/shared/bin");
103686
+ const originalOnRuntimeInitialized = Module["onRuntimeInitialized"];
103687
+ Module["onRuntimeInitialized"] = () => {
103688
+ FS.writeFile(
103689
+ "/internal/shared/bin/php",
103690
+ new TextEncoder().encode('#!/bin/sh\nphp "$@"')
103691
+ );
103692
+ FS.chmod("/internal/shared/bin/php", 493);
103693
+ originalOnRuntimeInitialized();
103694
+ };
103444
103695
  FS.registerDevice(FS.makedev(64, 0), {
103445
103696
  open: () => {
103446
103697
  },
@@ -111676,9 +111927,24 @@ function init14(RuntimeName, PHPLoader) {
111676
111927
  }
111677
111928
  var PHPWASM = {
111678
111929
  init: function() {
111930
+ Module["ENV"] = Module["ENV"] || {};
111931
+ Module["ENV"]["PATH"] = [
111932
+ Module["ENV"]["PATH"],
111933
+ "/internal/shared/bin"
111934
+ ].filter(Boolean).join(":");
111679
111935
  FS.mkdir("/internal");
111680
111936
  FS.mkdir("/internal/shared");
111681
111937
  FS.mkdir("/internal/shared/preload");
111938
+ FS.mkdir("/internal/shared/bin");
111939
+ const originalOnRuntimeInitialized = Module["onRuntimeInitialized"];
111940
+ Module["onRuntimeInitialized"] = () => {
111941
+ FS.writeFile(
111942
+ "/internal/shared/bin/php",
111943
+ new TextEncoder().encode('#!/bin/sh\nphp "$@"')
111944
+ );
111945
+ FS.chmod("/internal/shared/bin/php", 493);
111946
+ originalOnRuntimeInitialized();
111947
+ };
111682
111948
  FS.registerDevice(FS.makedev(64, 0), {
111683
111949
  open: () => {
111684
111950
  },
@@ -119876,9 +120142,24 @@ function init15(RuntimeName, PHPLoader) {
119876
120142
  }
119877
120143
  var PHPWASM = {
119878
120144
  init: function() {
120145
+ Module["ENV"] = Module["ENV"] || {};
120146
+ Module["ENV"]["PATH"] = [
120147
+ Module["ENV"]["PATH"],
120148
+ "/internal/shared/bin"
120149
+ ].filter(Boolean).join(":");
119879
120150
  FS.mkdir("/internal");
119880
120151
  FS.mkdir("/internal/shared");
119881
120152
  FS.mkdir("/internal/shared/preload");
120153
+ FS.mkdir("/internal/shared/bin");
120154
+ const originalOnRuntimeInitialized = Module["onRuntimeInitialized"];
120155
+ Module["onRuntimeInitialized"] = () => {
120156
+ FS.writeFile(
120157
+ "/internal/shared/bin/php",
120158
+ new TextEncoder().encode('#!/bin/sh\nphp "$@"')
120159
+ );
120160
+ FS.chmod("/internal/shared/bin/php", 493);
120161
+ originalOnRuntimeInitialized();
120162
+ };
119882
120163
  FS.registerDevice(FS.makedev(64, 0), {
119883
120164
  open: () => {
119884
120165
  },
@@ -128071,9 +128352,24 @@ function init16(RuntimeName, PHPLoader) {
128071
128352
  }
128072
128353
  var PHPWASM = {
128073
128354
  init: function() {
128355
+ Module["ENV"] = Module["ENV"] || {};
128356
+ Module["ENV"]["PATH"] = [
128357
+ Module["ENV"]["PATH"],
128358
+ "/internal/shared/bin"
128359
+ ].filter(Boolean).join(":");
128074
128360
  FS.mkdir("/internal");
128075
128361
  FS.mkdir("/internal/shared");
128076
128362
  FS.mkdir("/internal/shared/preload");
128363
+ FS.mkdir("/internal/shared/bin");
128364
+ const originalOnRuntimeInitialized = Module["onRuntimeInitialized"];
128365
+ Module["onRuntimeInitialized"] = () => {
128366
+ FS.writeFile(
128367
+ "/internal/shared/bin/php",
128368
+ new TextEncoder().encode('#!/bin/sh\nphp "$@"')
128369
+ );
128370
+ FS.chmod("/internal/shared/bin/php", 493);
128371
+ originalOnRuntimeInitialized();
128372
+ };
128077
128373
  FS.registerDevice(FS.makedev(64, 0), {
128078
128374
  open: () => {
128079
128375
  },