@php-wasm/web 1.1.3 → 1.1.4
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 +10 -10
- package/index.cjs.map +1 -1
- package/index.js +519 -609
- package/index.js.map +1 -1
- package/lib/index.d.ts +1 -2
- package/package.json +9 -8
- package/lib/api.d.ts +0 -17
package/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export * from './api';
|
|
2
|
-
export type { WithAPIState as WithIsReady } from './api';
|
|
3
1
|
export type { LoaderOptions as PHPWebLoaderOptions } from './load-runtime';
|
|
4
2
|
export { loadWebRuntime } from './load-runtime';
|
|
5
3
|
export { getPHPLoaderModule } from './get-php-loader-module';
|
|
@@ -10,3 +8,4 @@ export type { MountDevice, MountOptions, SyncProgress, SyncProgressCallback, } f
|
|
|
10
8
|
export * from './tls/certificates';
|
|
11
9
|
export type { TCPOverFetchOptions } from './tcp-over-fetch-websocket';
|
|
12
10
|
export { fetchWithCorsProxy } from './fetch-with-cors-proxy';
|
|
11
|
+
export { consumeAPI, exposeAPI, type RemoteAPI, type PublicAPI, type WithAPIState, type WithIsReady, } from '@php-wasm/universal';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@php-wasm/web",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "PHP.wasm for the web",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -37,23 +37,24 @@
|
|
|
37
37
|
"main": "./index.cjs",
|
|
38
38
|
"module": "./index.js",
|
|
39
39
|
"types": "index.d.ts",
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "ed646326d99ba84bad911d65b6634265f508f073",
|
|
41
41
|
"engines": {
|
|
42
42
|
"node": ">=20.18.3",
|
|
43
43
|
"npm": ">=10.1.0"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"comlink": "^4.4.
|
|
46
|
+
"comlink": "^4.4.2",
|
|
47
47
|
"express": "4.21.2",
|
|
48
|
+
"fs-ext": "2.1.1",
|
|
48
49
|
"ini": "4.1.2",
|
|
49
50
|
"wasm-feature-detect": "1.8.0",
|
|
50
51
|
"ws": "8.18.1",
|
|
51
52
|
"yargs": "17.7.2",
|
|
52
|
-
"@php-wasm/
|
|
53
|
-
"@php-wasm/
|
|
54
|
-
"@php-wasm/logger": "1.1.
|
|
55
|
-
"@php-wasm/fs-journal": "1.1.
|
|
56
|
-
"@php-wasm/web-service-worker": "1.1.
|
|
53
|
+
"@php-wasm/util": "1.1.4",
|
|
54
|
+
"@php-wasm/universal": "1.1.4",
|
|
55
|
+
"@php-wasm/logger": "1.1.4",
|
|
56
|
+
"@php-wasm/fs-journal": "1.1.4",
|
|
57
|
+
"@php-wasm/web-service-worker": "1.1.4"
|
|
57
58
|
},
|
|
58
59
|
"overrides": {
|
|
59
60
|
"rollup": "^4.34.6",
|
package/lib/api.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as Comlink from 'comlink';
|
|
2
|
-
export type WithAPIState = {
|
|
3
|
-
/**
|
|
4
|
-
* Resolves to true when the remote API is ready for
|
|
5
|
-
* Comlink communication, but not necessarily fully initialized yet.
|
|
6
|
-
*/
|
|
7
|
-
isConnected: () => Promise<void>;
|
|
8
|
-
/**
|
|
9
|
-
* Resolves to true when the remote API is declares it's
|
|
10
|
-
* fully loaded and ready to be used.
|
|
11
|
-
*/
|
|
12
|
-
isReady: () => Promise<void>;
|
|
13
|
-
};
|
|
14
|
-
export type RemoteAPI<T> = Comlink.Remote<T> & WithAPIState;
|
|
15
|
-
export declare function consumeAPI<APIType>(remote: Worker | Window, context?: undefined | EventTarget): RemoteAPI<APIType>;
|
|
16
|
-
export type PublicAPI<Methods, PipedAPI = unknown> = RemoteAPI<Methods & PipedAPI>;
|
|
17
|
-
export declare function exposeAPI<Methods, PipedAPI>(apiMethods?: Methods, pipedApi?: PipedAPI): [() => void, (e: Error) => void, PublicAPI<Methods, PipedAPI>];
|