@php-wasm/node 1.0.28 → 1.1.0

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.
Files changed (51) hide show
  1. package/README.md +6 -14
  2. package/asyncify/7_2_34/php_7_2.wasm +0 -0
  3. package/asyncify/7_3_33/php_7_3.wasm +0 -0
  4. package/asyncify/7_4_33/php_7_4.wasm +0 -0
  5. package/asyncify/8_0_30/php_8_0.wasm +0 -0
  6. package/asyncify/8_1_23/php_8_1.wasm +0 -0
  7. package/asyncify/8_2_10/php_8_2.wasm +0 -0
  8. package/asyncify/8_3_0/php_8_3.wasm +0 -0
  9. package/asyncify/8_4_0/php_8_4.wasm +0 -0
  10. package/asyncify/php_7_2.js +9365 -7478
  11. package/asyncify/php_7_3.js +9365 -7478
  12. package/asyncify/php_7_4.js +9372 -7506
  13. package/asyncify/php_8_0.js +9419 -7518
  14. package/asyncify/php_8_1.js +9454 -7565
  15. package/asyncify/php_8_2.js +9457 -7572
  16. package/asyncify/php_8_3.js +2390 -1874
  17. package/asyncify/php_8_4.js +2390 -1874
  18. package/index.cjs +35929 -58836
  19. package/index.js +35919 -58828
  20. package/jspi/7_2_34/php_7_2.wasm +0 -0
  21. package/jspi/7_3_33/php_7_3.wasm +0 -0
  22. package/jspi/7_4_33/php_7_4.wasm +0 -0
  23. package/jspi/8_0_30/php_8_0.wasm +0 -0
  24. package/jspi/8_1_23/php_8_1.wasm +0 -0
  25. package/jspi/8_2_10/php_8_2.wasm +0 -0
  26. package/jspi/8_3_0/php_8_3.wasm +0 -0
  27. package/jspi/8_4_0/php_8_4.wasm +0 -0
  28. package/jspi/php_7_2.js +8578 -7082
  29. package/jspi/php_7_3.js +8577 -7081
  30. package/jspi/php_7_4.js +8582 -7107
  31. package/jspi/php_8_0.js +8594 -7122
  32. package/jspi/php_8_1.js +8630 -7169
  33. package/jspi/php_8_2.js +8633 -7176
  34. package/jspi/php_8_3.js +8633 -7176
  35. package/jspi/php_8_4.js +2249 -1962
  36. package/lib/data/with-icu-data.d.ts +2 -0
  37. package/lib/load-runtime.d.ts +2 -1
  38. package/lib/networking/inbound-tcp-to-ws-proxy.d.ts +1 -1
  39. package/lib/networking/with-networking.d.ts +1 -1
  40. package/lib/node-fs-mount.d.ts +1 -1
  41. package/lib/use-host-filesystem.d.ts +1 -1
  42. package/package.json +20 -14
  43. package/shared/icudt74l.dat +0 -0
  44. package/asyncify/7_0_33/php_7_0.wasm +0 -0
  45. package/asyncify/7_1_30/php_7_1.wasm +0 -0
  46. package/asyncify/php_7_0.js +0 -7498
  47. package/asyncify/php_7_1.js +0 -7484
  48. package/jspi/7_0_33/php_7_0.wasm +0 -0
  49. package/jspi/7_1_30/php_7_1.wasm +0 -0
  50. package/jspi/php_7_0.js +0 -7107
  51. package/jspi/php_7_1.js +0 -7107
package/README.md CHANGED
@@ -15,23 +15,15 @@ WS proxy.
15
15
  Here's how to use it:
16
16
 
17
17
  ```js
18
- import { PHP } from '@php-wasm/node';
19
- const php = PHP.load('8.0', {
20
- requestHandler: {
21
- documentRoot: new URL('./', import.meta.url).pathname,
22
- },
23
- });
18
+ import { PHP } from '@php-wasm/universal';
19
+ import { loadNodeRuntime } from '@php-wasm/node';
24
20
 
25
- // Create and run a script directly
26
- php.writeFile('./index.php', `<?php echo "Hello " . $_POST['name']; ?>`);
27
- await php.run({ scriptPath: './index.php' });
21
+ const php = new PHP(await loadNodeRuntime('8.3'));
28
22
 
29
- // Or use the familiar HTTP concepts:
30
- const response = await php.request({
31
- method: 'POST',
32
- url: '/index.php',
33
- data: { name: 'John' },
23
+ const output = await php.run({
24
+ code: '<?php phpinfo(); ?>',
34
25
  });
26
+
35
27
  console.log(response.text);
36
28
  ```
37
29
 
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file