@php-wasm/node 1.1.4 → 1.2.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 (56) hide show
  1. package/asyncify/7_2_34/php_7_2.wasm +0 -0
  2. package/asyncify/7_3_33/php_7_3.wasm +0 -0
  3. package/asyncify/7_4_33/php_7_4.wasm +0 -0
  4. package/asyncify/8_0_30/php_8_0.wasm +0 -0
  5. package/asyncify/8_1_23/php_8_1.wasm +0 -0
  6. package/asyncify/8_2_10/php_8_2.wasm +0 -0
  7. package/asyncify/8_3_0/php_8_3.wasm +0 -0
  8. package/asyncify/8_4_0/php_8_4.wasm +0 -0
  9. package/asyncify/php_7_2.js +55 -33
  10. package/asyncify/php_7_3.js +55 -33
  11. package/asyncify/php_7_4.js +63 -41
  12. package/asyncify/php_8_0.js +67 -45
  13. package/asyncify/php_8_1.js +56 -34
  14. package/asyncify/php_8_2.js +56 -34
  15. package/asyncify/php_8_3.js +56 -34
  16. package/asyncify/php_8_4.js +55 -33
  17. package/index.cjs +230308 -70174
  18. package/index.js +229696 -69447
  19. package/jspi/7_2_34/php_7_2.wasm +0 -0
  20. package/jspi/7_3_33/php_7_3.wasm +0 -0
  21. package/jspi/7_4_33/php_7_4.wasm +0 -0
  22. package/jspi/8_0_30/php_8_0.wasm +0 -0
  23. package/jspi/8_1_23/php_8_1.wasm +0 -0
  24. package/jspi/8_2_10/php_8_2.wasm +0 -0
  25. package/jspi/8_3_0/php_8_3.wasm +0 -0
  26. package/jspi/8_4_0/php_8_4.wasm +0 -0
  27. package/jspi/extensions/xdebug/7_2/xdebug.la +35 -0
  28. package/jspi/extensions/xdebug/7_2/xdebug.so +0 -0
  29. package/jspi/extensions/xdebug/7_3/xdebug.la +35 -0
  30. package/jspi/extensions/xdebug/7_3/xdebug.so +0 -0
  31. package/jspi/extensions/xdebug/7_4/xdebug.la +35 -0
  32. package/jspi/extensions/xdebug/7_4/xdebug.so +0 -0
  33. package/jspi/extensions/xdebug/8_0/xdebug.la +35 -0
  34. package/jspi/extensions/xdebug/8_0/xdebug.so +0 -0
  35. package/jspi/extensions/xdebug/8_1/xdebug.la +35 -0
  36. package/jspi/extensions/xdebug/8_1/xdebug.so +0 -0
  37. package/jspi/extensions/xdebug/8_2/xdebug.la +35 -0
  38. package/jspi/extensions/xdebug/8_2/xdebug.so +0 -0
  39. package/jspi/extensions/xdebug/8_3/xdebug.la +35 -0
  40. package/jspi/extensions/xdebug/8_3/xdebug.so +0 -0
  41. package/jspi/extensions/xdebug/8_4/xdebug.la +35 -0
  42. package/jspi/extensions/xdebug/8_4/xdebug.so +0 -0
  43. package/jspi/php_7_2.js +27165 -2210
  44. package/jspi/php_7_3.js +27165 -2210
  45. package/jspi/php_7_4.js +27164 -2214
  46. package/jspi/php_8_0.js +27265 -2327
  47. package/jspi/php_8_1.js +27258 -2356
  48. package/jspi/php_8_2.js +27258 -2359
  49. package/jspi/php_8_3.js +27258 -2359
  50. package/jspi/php_8_4.js +27258 -2359
  51. package/lib/file-lock-manager-for-node.d.ts +10 -2
  52. package/lib/load-runtime.d.ts +1 -0
  53. package/lib/xdebug/get-xdebug-extension-module.d.ts +2 -0
  54. package/lib/xdebug/with-xdebug.d.ts +2 -0
  55. package/package.json +8 -8
  56. package/fs_ext.node +0 -0
@@ -1,3 +1,4 @@
1
+ type NativeFlockSync = (fd: number, flags: 'sh' | 'ex' | 'shnb' | 'exnb' | 'un') => void;
1
2
  import type { FileLockManager, RequestedRangeLock, WholeFileLock, WholeFileLockOp, Pid, Fd } from './file-lock-manager';
2
3
  /**
3
4
  * This is the file lock manager for use within JS runtimes like Node.js.
@@ -6,8 +7,14 @@ import type { FileLockManager, RequestedRangeLock, WholeFileLock, WholeFileLockO
6
7
  * It provides methods for locking and unlocking files, as well as finding conflicting locks.
7
8
  */
8
9
  export declare class FileLockManagerForNode implements FileLockManager {
10
+ nativeFlockSync: NativeFlockSync;
9
11
  locks: Map<string, FileLock>;
10
- constructor();
12
+ /**
13
+ * Create a new FileLockManagerForNode instance.
14
+ *
15
+ * @param nativeFlockSync A synchronous flock() function to lock files via the host OS.
16
+ */
17
+ constructor(nativeFlockSync?: NativeFlockSync);
11
18
  /**
12
19
  * Lock the whole file.
13
20
  *
@@ -73,7 +80,7 @@ export declare class FileLock {
73
80
  * @param mode The type of lock to acquire
74
81
  * @returns A FileLock instance if the lock was acquired, undefined otherwise
75
82
  */
76
- static maybeCreate(path: string, mode: Exclude<WholeFileLock['type'], 'unlocked'>): FileLock | undefined;
83
+ static maybeCreate(path: string, mode: Exclude<WholeFileLock['type'], 'unlocked'>, nativeFlockSync: NativeFlockSync): FileLock | undefined;
77
84
  private nativeLock;
78
85
  private wholeFileLock;
79
86
  private rangeLocks;
@@ -147,3 +154,4 @@ export declare class FileLock {
147
154
  */
148
155
  private doesAConflictingLockExist;
149
156
  }
157
+ export {};
@@ -3,6 +3,7 @@ import type { FileLockManager } from './file-lock-manager';
3
3
  export interface PHPLoaderOptions {
4
4
  emscriptenOptions?: EmscriptenOptions;
5
5
  followSymlinks?: boolean;
6
+ withXdebug?: boolean;
6
7
  }
7
8
  type PHPLoaderOptionsForNode = PHPLoaderOptions & {
8
9
  emscriptenOptions?: EmscriptenOptions & {
@@ -0,0 +1,2 @@
1
+ import type { SupportedPHPVersion } from '@php-wasm/universal';
2
+ export declare function getXdebugExtensionModule(version?: SupportedPHPVersion): Promise<any>;
@@ -0,0 +1,2 @@
1
+ import type { EmscriptenOptions } from '@php-wasm/universal';
2
+ export declare function withXdebug(version: "8.4" | "8.3" | "8.2" | "8.1" | "8.0" | "7.4" | "7.3" | "7.2" | undefined, options: EmscriptenOptions): Promise<EmscriptenOptions>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@php-wasm/node",
3
- "version": "1.1.4",
3
+ "version": "1.2.0",
4
4
  "description": "PHP.wasm for Node.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "license": "GPL-2.0-or-later",
40
40
  "types": "index.d.ts",
41
- "gitHead": "ed646326d99ba84bad911d65b6634265f508f073",
41
+ "gitHead": "b16d08b0c59d561eb392069ca9208515b9925401",
42
42
  "engines": {
43
43
  "node": ">=20.18.3",
44
44
  "npm": ">=10.1.0"
@@ -51,12 +51,12 @@
51
51
  "wasm-feature-detect": "1.8.0",
52
52
  "ws": "8.18.1",
53
53
  "yargs": "17.7.2",
54
- "@php-wasm/node-polyfills": "1.1.4",
55
- "@php-wasm/universal": "1.1.4",
56
- "@php-wasm/logger": "1.1.4",
57
- "@php-wasm/util": "1.1.4",
58
- "@wp-playground/common": "1.1.4",
59
- "@wp-playground/wordpress": "1.1.4"
54
+ "@php-wasm/node-polyfills": "1.2.0",
55
+ "@php-wasm/universal": "1.2.0",
56
+ "@php-wasm/logger": "1.2.0",
57
+ "@php-wasm/util": "1.2.0",
58
+ "@wp-playground/common": "1.2.0",
59
+ "@wp-playground/wordpress": "1.2.0"
60
60
  },
61
61
  "overrides": {
62
62
  "rollup": "^4.34.6",
package/fs_ext.node DELETED
Binary file