milkio 1.0.21 → 1.1.0
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/event/index.d.ts +2 -0
- package/execute/index.d.ts +1 -0
- package/index.js +419 -1591
- package/listener/index.d.ts +2 -1
- package/package.json +1 -1
- package/utils/build-cors-headers.d.ts +1 -1
- package/utils/create-id.d.ts +3 -1
- package/utils/trie.d.ts +2 -0
- package/world/index.d.ts +2 -0
- package/utils/revive-json-parse.d.ts +0 -1
package/listener/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { Mixin, GeneratedInit } from "../index.ts";
|
|
|
2
2
|
import type { __initExecuter } from "../execute/index.ts";
|
|
3
3
|
export type MilkioHttpRequest = Request;
|
|
4
4
|
export type MilkioHttpResponse = Mixin<ResponseInit, {
|
|
5
|
-
body:
|
|
5
|
+
body: string | ReadableStream<Uint8Array> | Uint8Array | ArrayBuffer | Blob | null;
|
|
6
6
|
status: number;
|
|
7
7
|
headers: Record<string, string>;
|
|
8
8
|
}>;
|
|
@@ -13,6 +13,7 @@ export declare function __initListener(generated: GeneratedInit, runtime: any, e
|
|
|
13
13
|
envMode?: string;
|
|
14
14
|
env?: Record<any, any>;
|
|
15
15
|
routeSchema?: any;
|
|
16
|
+
rawResponse?: boolean;
|
|
16
17
|
}) => Promise<Response>;
|
|
17
18
|
handleMessage: (port: {
|
|
18
19
|
postMessage(message: any): void;
|
package/package.json
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { CorsConfig } from "../index.ts";
|
|
2
|
-
export declare function buildCorsHeaders(cors: CorsConfig | undefined): Record<string, string>;
|
|
2
|
+
export declare function buildCorsHeaders(cors: CorsConfig | undefined, origin?: string | null): Record<string, string>;
|
package/utils/create-id.d.ts
CHANGED
package/utils/trie.d.ts
CHANGED
package/world/index.d.ts
CHANGED
|
@@ -28,6 +28,8 @@ export type MilkioRuntimeInit<T extends MilkioInit> = Mixin<T, {
|
|
|
28
28
|
emit: Awaited<ReturnType<typeof __initEventManager>>["emit"];
|
|
29
29
|
emitAnyApproved: Awaited<ReturnType<typeof __initEventManager>>["emitAnyApproved"];
|
|
30
30
|
emitAllApproved: Awaited<ReturnType<typeof __initEventManager>>["emitAllApproved"];
|
|
31
|
+
_hasEmitHandlers: Awaited<ReturnType<typeof __initEventManager>>["_hasEmitHandlers"];
|
|
32
|
+
_emitHandlersVersion: number;
|
|
31
33
|
}>;
|
|
32
34
|
export declare function createWorld<MilkioOptions extends MilkioInit>(generated: GeneratedInit, configSchema: {
|
|
33
35
|
get: () => Promise<Record<any, any>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function reviveJSONParse<T>(json: T): T;
|