@php-wasm/node 1.1.5 → 1.2.1

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 +34 -35
  10. package/asyncify/php_7_3.js +34 -35
  11. package/asyncify/php_7_4.js +42 -43
  12. package/asyncify/php_8_0.js +46 -47
  13. package/asyncify/php_8_1.js +35 -36
  14. package/asyncify/php_8_2.js +35 -36
  15. package/asyncify/php_8_3.js +35 -36
  16. package/asyncify/php_8_4.js +34 -35
  17. package/index.cjs +227777 -67939
  18. package/index.js +227800 -67847
  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 +27099 -2181
  44. package/jspi/php_7_3.js +27099 -2181
  45. package/jspi/php_7_4.js +27098 -2185
  46. package/jspi/php_8_0.js +27127 -2226
  47. package/jspi/php_8_1.js +27134 -2269
  48. package/jspi/php_8_2.js +27134 -2272
  49. package/jspi/php_8_3.js +27134 -2272
  50. package/jspi/php_8_4.js +27134 -2272
  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 +7 -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.5",
3
+ "version": "1.2.1",
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": "ace4bc04b9b7cf814244911d8e10b53512fb2ee4",
41
+ "gitHead": "704706298eeb080e63bb652cd02ea1647e4ba657",
42
42
  "engines": {
43
43
  "node": ">=20.18.3",
44
44
  "npm": ">=10.1.0"
@@ -51,12 +51,11 @@
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.5",
55
- "@php-wasm/universal": "1.1.5",
56
- "@php-wasm/logger": "1.1.5",
57
- "@php-wasm/util": "1.1.5",
58
- "@wp-playground/common": "1.1.5",
59
- "@wp-playground/wordpress": "1.1.5"
54
+ "@php-wasm/node-polyfills": "1.2.1",
55
+ "@php-wasm/universal": "1.2.1",
56
+ "@php-wasm/logger": "1.2.1",
57
+ "@php-wasm/util": "1.2.1",
58
+ "@wp-playground/common": "1.2.1"
60
59
  },
61
60
  "overrides": {
62
61
  "rollup": "^4.34.6",
package/fs_ext.node DELETED
Binary file