@php-wasm/web 3.1.19 → 3.1.21

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.
@@ -21,6 +21,11 @@ export interface MountOptions {
21
21
  direction?: 'opfs-to-memfs' | 'memfs-to-opfs';
22
22
  onProgress?: SyncProgressCallback;
23
23
  };
24
+ onMount?: (mount: DirectoryHandleMount) => void;
25
+ }
26
+ export interface DirectoryHandleMount {
27
+ flush(): Promise<void>;
28
+ unmount(): Promise<void>;
24
29
  }
25
30
  export type SyncProgress = {
26
31
  /** The number of files that have been synced. */
@@ -29,6 +34,9 @@ export type SyncProgress = {
29
34
  total: number;
30
35
  };
31
36
  export type SyncProgressCallback = (progress: SyncProgress) => void;
37
+ interface JournalFSEventsToOpfsOptions {
38
+ maxFlushPasses?: number;
39
+ }
32
40
  export declare function createDirectoryHandleMountHandler(handle: FileSystemDirectoryHandle, options?: MountOptions): MountHandler;
33
41
  export declare function copyMemfsToOpfs(FS: Emscripten.RootFS, opfsRoot: FileSystemDirectoryHandle, memfsRoot: string, onProgress?: SyncProgressCallback): Promise<void>;
34
- export declare function journalFSEventsToOpfs(php: PHP, opfsRoot: FileSystemDirectoryHandle, memfsRoot: string): () => void;
42
+ export declare function journalFSEventsToOpfs(php: PHP, opfsRoot: FileSystemDirectoryHandle, memfsRoot: string, options?: JournalFSEventsToOpfsOptions): DirectoryHandleMount;
@@ -1,4 +1,4 @@
1
- import type { PHPLoaderModule, SupportedPHPVersion } from '@php-wasm/universal';
1
+ import type { PHPLoaderModule, AllPHPVersion } from '@php-wasm/universal';
2
2
  /**
3
3
  * Loads the PHP loader module for the given PHP version.
4
4
  *
@@ -11,4 +11,4 @@ import type { PHPLoaderModule, SupportedPHPVersion } from '@php-wasm/universal';
11
11
  * @param version The PHP version to load.
12
12
  * @returns The PHP loader module.
13
13
  */
14
- export declare function getPHPLoaderModule(version?: SupportedPHPVersion): Promise<PHPLoaderModule>;
14
+ export declare function getPHPLoaderModule(version?: AllPHPVersion): Promise<PHPLoaderModule>;
package/lib/index.d.ts CHANGED
@@ -4,7 +4,7 @@ export { getPHPLoaderModule } from './get-php-loader-module';
4
4
  export { setupPostMessageRelay } from './setup-post-message-relay';
5
5
  export { spawnPHPWorkerThread } from './worker-thread/spawn-php-worker-thread';
6
6
  export { createDirectoryHandleMountHandler } from './directory-handle-mount';
7
- export type { MountDevice, MountOptions, SyncProgress, SyncProgressCallback, } from './directory-handle-mount';
7
+ export type { DirectoryHandleMount, MountDevice, MountOptions, SyncProgress, SyncProgressCallback, } from './directory-handle-mount';
8
8
  export * from './tls/certificates';
9
9
  export type { TCPOverFetchOptions } from './tcp-over-fetch-websocket';
10
10
  export { fetchWithCorsProxy, FirewallInterferenceError, } from '@php-wasm/web-service-worker';
@@ -1,4 +1,4 @@
1
- import type { SupportedPHPVersion, EmscriptenOptions, PHPLoaderModule } from '@php-wasm/universal';
1
+ import type { AllPHPVersion, EmscriptenOptions, PHPLoaderModule } from '@php-wasm/universal';
2
2
  import type { TCPOverFetchOptions } from './tcp-over-fetch-websocket';
3
3
  export interface LoaderOptions {
4
4
  emscriptenOptions?: EmscriptenOptions;
@@ -6,4 +6,4 @@ export interface LoaderOptions {
6
6
  tcpOverFetch?: TCPOverFetchOptions;
7
7
  withIntl?: boolean;
8
8
  }
9
- export declare function loadWebRuntime(phpVersion: SupportedPHPVersion, loaderOptions?: LoaderOptions): Promise<number>;
9
+ export declare function loadWebRuntime(phpVersion: AllPHPVersion, loaderOptions?: LoaderOptions): Promise<number>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@php-wasm/web",
3
- "version": "3.1.19",
3
+ "version": "3.1.21",
4
4
  "description": "PHP.wasm for the web",
5
5
  "repository": {
6
6
  "type": "git",
@@ -37,7 +37,7 @@
37
37
  "main": "./index.cjs",
38
38
  "module": "./index.js",
39
39
  "types": "index.d.ts",
40
- "gitHead": "be542ee28a5966eeb28154cd8e3723db5ff9df07",
40
+ "gitHead": "5864051cbf4c2a55656112d99a3f1b076bcd67cd",
41
41
  "engines": {
42
42
  "node": ">=20.10.0",
43
43
  "npm": ">=10.2.3"
@@ -62,22 +62,23 @@
62
62
  "sha.js": "2.4.12",
63
63
  "simple-get": "4.0.1",
64
64
  "wasm-feature-detect": "1.8.0",
65
- "ws": "8.18.3",
65
+ "ws": "8.18.0",
66
66
  "yargs": "17.7.2",
67
- "@php-wasm/util": "3.1.19",
68
- "@php-wasm/universal": "3.1.19",
69
- "@php-wasm/logger": "3.1.19",
70
- "@php-wasm/fs-journal": "3.1.19",
71
- "@wp-playground/storage": "3.1.19",
72
- "@php-wasm/web-8-5": "3.1.19",
73
- "@php-wasm/web-8-4": "3.1.19",
74
- "@php-wasm/web-8-3": "3.1.19",
75
- "@php-wasm/web-8-2": "3.1.19",
76
- "@php-wasm/web-8-1": "3.1.19",
77
- "@php-wasm/web-8-0": "3.1.19",
78
- "@php-wasm/web-7-4": "3.1.19",
79
- "@wp-playground/common": "3.1.19",
80
- "@php-wasm/web-service-worker": "3.1.19"
67
+ "@php-wasm/util": "3.1.21",
68
+ "@php-wasm/universal": "3.1.21",
69
+ "@php-wasm/logger": "3.1.21",
70
+ "@php-wasm/fs-journal": "3.1.21",
71
+ "@wp-playground/storage": "3.1.21",
72
+ "@php-wasm/web-8-5": "3.1.21",
73
+ "@php-wasm/web-8-4": "3.1.21",
74
+ "@php-wasm/web-8-3": "3.1.21",
75
+ "@php-wasm/web-8-2": "3.1.21",
76
+ "@php-wasm/web-8-1": "3.1.21",
77
+ "@php-wasm/web-8-0": "3.1.21",
78
+ "@php-wasm/web-7-4": "3.1.21",
79
+ "@wp-playground/common": "3.1.21",
80
+ "@php-wasm/web-5-2": "3.1.21",
81
+ "@php-wasm/web-service-worker": "3.1.21"
81
82
  },
82
83
  "packageManager": "npm@10.9.2",
83
84
  "overrides": {
@@ -89,6 +90,7 @@
89
90
  "tmp": "0.2.5",
90
91
  "form-data": "^4.0.4",
91
92
  "lodash": "^4.17.23",
92
- "glob": "^9.3.0"
93
+ "glob": "^9.3.0",
94
+ "webpackbar": "^7.0.0"
93
95
  }
94
96
  }