@php-wasm/universal 3.0.15 → 3.0.16
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 +3 -3
- package/index.cjs.map +1 -1
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/php-request-handler.d.ts +11 -0
- package/package.json +7 -7
package/lib/index.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export { loadPHPRuntime, getLoadedRuntime } from './load-php-runtime';
|
|
|
22
22
|
export type { Emscripten } from './emscripten-types';
|
|
23
23
|
export type { DataModule, EmscriptenOptions, PHPLoaderModule, PHPRuntime, PHPRuntimeId, RuntimeType, } from './load-php-runtime';
|
|
24
24
|
export type { PHPRequestHandlerConfiguration, RewriteRule, } from './php-request-handler';
|
|
25
|
-
export { PHPRequestHandler, applyRewriteRules } from './php-request-handler';
|
|
25
|
+
export { PHPRequestHandler, applyRewriteRules, inferMimeType, } from './php-request-handler';
|
|
26
26
|
export type { FileNotFoundGetActionCallback, FileNotFoundToInternalRedirect, FileNotFoundToResponse, FileNotFoundAction, CookieStore, } from './php-request-handler';
|
|
27
27
|
export { rotatePHPRuntime } from './rotate-php-runtime';
|
|
28
28
|
export { writeFiles } from './write-files';
|
|
@@ -230,6 +230,17 @@ export declare class PHPRequestHandler implements AsyncDisposable {
|
|
|
230
230
|
request(request: PHPRequest): Promise<PHPResponse>;
|
|
231
231
|
[Symbol.asyncDispose](): Promise<void>;
|
|
232
232
|
}
|
|
233
|
+
/**
|
|
234
|
+
* Naively infer a file mime type from its path.
|
|
235
|
+
*
|
|
236
|
+
* @todo Infer the mime type based on the file contents.
|
|
237
|
+
* A naive function like this one can be inaccurate
|
|
238
|
+
* and potentially have negative security consequences.
|
|
239
|
+
*
|
|
240
|
+
* @param path - The file path
|
|
241
|
+
* @returns The inferred mime type.
|
|
242
|
+
*/
|
|
243
|
+
export declare function inferMimeType(path: string): string;
|
|
233
244
|
/**
|
|
234
245
|
* Applies the given rewrite rules to the given path.
|
|
235
246
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@php-wasm/universal",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.16",
|
|
4
4
|
"description": "PHP.wasm – emscripten bindings for PHP",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -37,18 +37,18 @@
|
|
|
37
37
|
"module": "./index.js",
|
|
38
38
|
"types": "index.d.ts",
|
|
39
39
|
"license": "GPL-2.0-or-later",
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "1f96a559fda4946f36f8543a2715cee411a5c8f2",
|
|
41
41
|
"engines": {
|
|
42
42
|
"node": ">=20.18.3",
|
|
43
43
|
"npm": ">=10.1.0"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"ini": "4.1.2",
|
|
47
|
-
"@php-wasm/node-polyfills": "3.0.
|
|
48
|
-
"@php-wasm/logger": "3.0.
|
|
49
|
-
"@php-wasm/util": "3.0.
|
|
50
|
-
"@php-wasm/stream-compression": "3.0.
|
|
51
|
-
"@php-wasm/progress": "3.0.
|
|
47
|
+
"@php-wasm/node-polyfills": "3.0.16",
|
|
48
|
+
"@php-wasm/logger": "3.0.16",
|
|
49
|
+
"@php-wasm/util": "3.0.16",
|
|
50
|
+
"@php-wasm/stream-compression": "3.0.16",
|
|
51
|
+
"@php-wasm/progress": "3.0.16"
|
|
52
52
|
},
|
|
53
53
|
"packageManager": "npm@10.9.2",
|
|
54
54
|
"overrides": {
|