@php-wasm/node 0.1.19 → 0.1.24

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 (3) hide show
  1. package/index.cjs +26 -24
  2. package/index.d.ts +10 -4
  3. package/package.json +3 -3
package/index.d.ts CHANGED
@@ -302,11 +302,11 @@ export interface WithNodeFilesystem {
302
302
  /**
303
303
  * Mounts a Node.js filesystem to a given path in the PHP filesystem.
304
304
  *
305
- * @param settings - The Node.js filesystem settings.
306
- * @param path - The path to mount the filesystem to.
305
+ * @param localPath - The path of a real local directory you want to mount.
306
+ * @param virtualFSPath - Where to mount it in the virtual filesystem.
307
307
  * @see {@link https://emscripten.org/docs/api_reference/Filesystem-API.html#FS.mount}
308
308
  */
309
- mount(settings: any, path: string): void;
309
+ mount(localPath: string | MountSettings, virtualFSPath: string): void;
310
310
  }
311
311
  export interface WithFilesystem {
312
312
  /**
@@ -316,6 +316,10 @@ export interface WithFilesystem {
316
316
  *
317
317
  * @param path - The directory path to create.
318
318
  */
319
+ mkdir(path: string): void;
320
+ /**
321
+ * @deprecated Use mkdir instead.
322
+ */
319
323
  mkdirTree(path: string): void;
320
324
  /**
321
325
  * Reads a file from the PHP filesystem and returns it as a string.
@@ -478,6 +482,8 @@ declare abstract class BasePHP implements WithPHPIniBindings, WithFilesystem, Wi
478
482
  setSkipShebang(shouldSkip: boolean): void;
479
483
  addServerGlobalEntry(key: string, value: string): void;
480
484
  /** @inheritDoc */
485
+ mkdir(path: string): void;
486
+ /** @inheritDoc */
481
487
  mkdirTree(path: string): void;
482
488
  /** @inheritDoc */
483
489
  readFileAsText(path: string): string;
@@ -494,7 +500,7 @@ declare abstract class BasePHP implements WithPHPIniBindings, WithFilesystem, Wi
494
500
  /** @inheritDoc */
495
501
  fileExists(path: string): boolean;
496
502
  /** @inheritDoc */
497
- mount(settings: MountSettings, path: string): void;
503
+ mount(localPath: string | MountSettings, virtualFSPath: string): void;
498
504
  }
499
505
  /**
500
506
  * Output of the PHP.wasm runtime.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@php-wasm/node",
3
- "version": "0.1.19",
3
+ "version": "0.1.24",
4
4
  "description": "PHP.wasm for Node.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,9 +26,9 @@
26
26
  "directory": "../../../dist/packages/php-wasm/node"
27
27
  },
28
28
  "license": "(GPL-2.0-or-later OR MPL-2.0)",
29
- "main": "index.js",
29
+ "main": "index.cjs",
30
30
  "types": "index.d.ts",
31
- "gitHead": "ce0d93a79ad524677200b7e956ae1543d774696e",
31
+ "gitHead": "d1945324a1e5e47da61102d5e91de5fdf614f959",
32
32
  "dependencies": {
33
33
  "comlink": "4.4.1",
34
34
  "express": "4.18.2",