@php-wasm/web 0.6.6 → 0.6.8
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.d.ts +17 -1
- package/index.js +169 -150
- package/kitchen-sink/7_0_33/php_7_0.wasm +0 -0
- package/kitchen-sink/7_1_30/php_7_1.wasm +0 -0
- package/kitchen-sink/7_2_34/php_7_2.wasm +0 -0
- package/kitchen-sink/7_3_33/php_7_3.wasm +0 -0
- package/kitchen-sink/7_4_33/php_7_4.wasm +0 -0
- package/kitchen-sink/8_0_30/php_8_0.wasm +0 -0
- package/kitchen-sink/8_1_23/php_8_1.wasm +0 -0
- package/kitchen-sink/8_2_10/php_8_2.wasm +0 -0
- package/kitchen-sink/8_3_0/php_8_3.wasm +0 -0
- package/kitchen-sink/php_7_0.js +2 -2
- package/kitchen-sink/php_7_1.js +2 -2
- package/kitchen-sink/php_7_2.js +2 -2
- package/kitchen-sink/php_7_3.js +2 -2
- package/kitchen-sink/php_7_4.js +2 -2
- package/kitchen-sink/php_8_0.js +2 -2
- package/kitchen-sink/php_8_1.js +2 -2
- package/kitchen-sink/php_8_2.js +2 -2
- package/kitchen-sink/php_8_3.js +2 -2
- package/light/7_0_33/php_7_0.wasm +0 -0
- package/light/7_1_30/php_7_1.wasm +0 -0
- package/light/7_2_34/php_7_2.wasm +0 -0
- package/light/7_3_33/php_7_3.wasm +0 -0
- package/light/7_4_33/php_7_4.wasm +0 -0
- package/light/8_0_30/php_8_0.wasm +0 -0
- package/light/8_1_23/php_8_1.wasm +0 -0
- package/light/8_2_10/php_8_2.wasm +0 -0
- package/light/8_3_0/php_8_3.wasm +0 -0
- package/light/php_7_0.js +2 -2
- package/light/php_7_1.js +2 -2
- package/light/php_7_2.js +2 -2
- package/light/php_7_3.js +2 -2
- package/light/php_7_4.js +2 -2
- package/light/php_8_0.js +2 -2
- package/light/php_8_1.js +2 -2
- package/light/php_8_2.js +2 -2
- package/light/php_8_3.js +2 -2
- package/package.json +6 -5
package/index.d.ts
CHANGED
|
@@ -76,6 +76,13 @@ declare class PHPResponse implements PHPResponseData {
|
|
|
76
76
|
export interface PHPRequestEndEvent {
|
|
77
77
|
type: "request.end";
|
|
78
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* Represents an error event related to the PHP request.
|
|
81
|
+
*/
|
|
82
|
+
export interface PHPRequestErrorEvent {
|
|
83
|
+
type: "request.error";
|
|
84
|
+
error: Error;
|
|
85
|
+
}
|
|
79
86
|
/**
|
|
80
87
|
* Represents a PHP runtime initialization event.
|
|
81
88
|
*/
|
|
@@ -93,7 +100,7 @@ export interface PHPRuntimeBeforeDestroyEvent {
|
|
|
93
100
|
* This is intentionally not an extension of CustomEvent
|
|
94
101
|
* to make it isomorphic between different JavaScript runtimes.
|
|
95
102
|
*/
|
|
96
|
-
export type PHPEvent = PHPRequestEndEvent | PHPRuntimeInitializedEvent | PHPRuntimeBeforeDestroyEvent;
|
|
103
|
+
export type PHPEvent = PHPRequestEndEvent | PHPRequestErrorEvent | PHPRuntimeInitializedEvent | PHPRuntimeBeforeDestroyEvent;
|
|
97
104
|
/**
|
|
98
105
|
* A callback function that handles PHP events.
|
|
99
106
|
*/
|
|
@@ -570,6 +577,10 @@ declare const SupportedPHPVersions: readonly [
|
|
|
570
577
|
"7.0"
|
|
571
578
|
];
|
|
572
579
|
export type SupportedPHPVersion = (typeof SupportedPHPVersions)[number];
|
|
580
|
+
export type RewriteRule = {
|
|
581
|
+
match: RegExp;
|
|
582
|
+
replacement: string;
|
|
583
|
+
};
|
|
573
584
|
export interface PHPRequestHandlerConfiguration {
|
|
574
585
|
/**
|
|
575
586
|
* The directory in the PHP filesystem where the server will look
|
|
@@ -580,9 +591,14 @@ export interface PHPRequestHandlerConfiguration {
|
|
|
580
591
|
* Request Handler URL. Used to populate $_SERVER details like HTTP_HOST.
|
|
581
592
|
*/
|
|
582
593
|
absoluteUrl?: string;
|
|
594
|
+
/**
|
|
595
|
+
* Rewrite rules
|
|
596
|
+
*/
|
|
597
|
+
rewriteRules?: RewriteRule[];
|
|
583
598
|
}
|
|
584
599
|
declare class PHPRequestHandler implements RequestHandler {
|
|
585
600
|
#private;
|
|
601
|
+
rewriteRules: RewriteRule[];
|
|
586
602
|
/**
|
|
587
603
|
* The PHP instance
|
|
588
604
|
*/
|