@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.
- package/index.cjs +26 -24
- package/index.d.ts +10 -4
- 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
|
|
306
|
-
* @param
|
|
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(
|
|
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(
|
|
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.
|
|
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.
|
|
29
|
+
"main": "index.cjs",
|
|
30
30
|
"types": "index.d.ts",
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "d1945324a1e5e47da61102d5e91de5fdf614f959",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"comlink": "4.4.1",
|
|
34
34
|
"express": "4.18.2",
|