@php-wasm/web 0.6.2 → 0.6.4

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 (39) hide show
  1. package/index.d.ts +9 -22
  2. package/index.js +362 -346
  3. package/kitchen-sink/7_0_33/php_7_0.wasm +0 -0
  4. package/kitchen-sink/7_1_30/php_7_1.wasm +0 -0
  5. package/kitchen-sink/7_2_34/php_7_2.wasm +0 -0
  6. package/kitchen-sink/7_3_33/php_7_3.wasm +0 -0
  7. package/kitchen-sink/7_4_33/php_7_4.wasm +0 -0
  8. package/kitchen-sink/8_0_30/php_8_0.wasm +0 -0
  9. package/kitchen-sink/8_1_23/php_8_1.wasm +0 -0
  10. package/kitchen-sink/8_2_10/php_8_2.wasm +0 -0
  11. package/kitchen-sink/8_3_0/php_8_3.wasm +0 -0
  12. package/kitchen-sink/php_7_0.js +20 -3
  13. package/kitchen-sink/php_7_1.js +20 -3
  14. package/kitchen-sink/php_7_2.js +20 -3
  15. package/kitchen-sink/php_7_3.js +20 -3
  16. package/kitchen-sink/php_7_4.js +20 -3
  17. package/kitchen-sink/php_8_0.js +20 -3
  18. package/kitchen-sink/php_8_1.js +20 -3
  19. package/kitchen-sink/php_8_2.js +20 -3
  20. package/kitchen-sink/php_8_3.js +20 -3
  21. package/light/7_0_33/php_7_0.wasm +0 -0
  22. package/light/7_1_30/php_7_1.wasm +0 -0
  23. package/light/7_2_34/php_7_2.wasm +0 -0
  24. package/light/7_3_33/php_7_3.wasm +0 -0
  25. package/light/7_4_33/php_7_4.wasm +0 -0
  26. package/light/8_0_30/php_8_0.wasm +0 -0
  27. package/light/8_1_23/php_8_1.wasm +0 -0
  28. package/light/8_2_10/php_8_2.wasm +0 -0
  29. package/light/8_3_0/php_8_3.wasm +0 -0
  30. package/light/php_7_0.js +20 -3
  31. package/light/php_7_1.js +20 -3
  32. package/light/php_7_2.js +20 -3
  33. package/light/php_7_3.js +20 -3
  34. package/light/php_7_4.js +20 -3
  35. package/light/php_8_0.js +20 -3
  36. package/light/php_8_1.js +20 -3
  37. package/light/php_8_2.js +20 -3
  38. package/light/php_8_3.js +20 -3
  39. package/package.json +5 -5
package/index.d.ts CHANGED
@@ -192,7 +192,7 @@ export interface RequestHandler {
192
192
  * headers: {
193
193
  * 'X-foo': 'bar',
194
194
  * },
195
- * formData: {
195
+ * body: {
196
196
  * foo: 'bar',
197
197
  * },
198
198
  * });
@@ -499,18 +499,11 @@ export interface PHPRequest {
499
499
  */
500
500
  headers?: PHPRequestHeaders;
501
501
  /**
502
- * Uploaded files
502
+ * Request body.
503
+ * If an object is given, the request will be encoded as multipart
504
+ * and sent with a `multipart/form-data` header.
503
505
  */
504
- files?: Record<string, File>;
505
- /**
506
- * Request body without the files.
507
- */
508
- body?: string;
509
- /**
510
- * Form data. If set, the request body will be ignored and
511
- * the content-type header will be set to `application/x-www-form-urlencoded`.
512
- */
513
- formData?: Record<string, unknown>;
506
+ body?: string | Uint8Array | Record<string, string | Uint8Array | File>;
514
507
  }
515
508
  export interface PHPRunOptions {
516
509
  /**
@@ -534,13 +527,13 @@ export interface PHPRunOptions {
534
527
  */
535
528
  headers?: PHPRequestHeaders;
536
529
  /**
537
- * Request body without the files.
530
+ * Request body.
538
531
  */
539
- body?: string;
532
+ body?: string | Uint8Array;
540
533
  /**
541
- * Uploaded files.
534
+ * Environment variables to set for this run.
542
535
  */
543
- fileInfos?: FileInfo[];
536
+ env?: Record<string, string>;
544
537
  /**
545
538
  * The code snippet to eval instead of a php file.
546
539
  */
@@ -551,12 +544,6 @@ export interface PHPRunOptions {
551
544
  */
552
545
  throwOnError?: boolean;
553
546
  }
554
- export interface FileInfo {
555
- key: string;
556
- name: string;
557
- type: string;
558
- data: Uint8Array;
559
- }
560
547
  export interface RmDirOptions {
561
548
  /**
562
549
  * If true, recursively removes the directory and all its contents.