milkio 1.0.16 → 1.0.18
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/context/index.d.ts +2 -1
- package/index.js +34 -19
- package/package.json +1 -1
- package/types/index.d.ts +8 -0
- package/utils/build-cors-headers.d.ts +2 -0
- package/world/index.d.ts +3 -5
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -66,3 +66,11 @@ export type BreadRead<T, U extends Record<any, any> = {}> = Omit<{
|
|
|
66
66
|
export type BreadEdit<U extends Record<any, any> = {}> = U;
|
|
67
67
|
export type BreadAdd<U extends Record<any, any> = {}> = U;
|
|
68
68
|
export type BreadDelete<U extends Record<any, any> = {}> = U;
|
|
69
|
+
export interface CorsConfig {
|
|
70
|
+
corsAllowMethods?: string[];
|
|
71
|
+
corsAllowHeaders?: string[];
|
|
72
|
+
corsExposeHeaders?: string[];
|
|
73
|
+
corsAllowOrigin?: string;
|
|
74
|
+
corsAllowCredentials?: boolean;
|
|
75
|
+
corsMaxAge?: number;
|
|
76
|
+
}
|
package/world/index.d.ts
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { type $types, __initListener, __initEventManager, type ExecuteId, type Logger, type Mixin, type GeneratedInit, type Ping, type LoggerSubmittingHandler, type LoggerInsertingHandler } from "../index.ts";
|
|
1
|
+
import { type $types, __initListener, __initEventManager, type ExecuteId, type Logger, type Mixin, type GeneratedInit, type Ping, type LoggerSubmittingHandler, type LoggerInsertingHandler, type CorsConfig } from "../index.ts";
|
|
2
2
|
export interface MilkioInit {
|
|
3
3
|
port: number;
|
|
4
4
|
develop: boolean;
|
|
5
5
|
fetchEnv?: (key: string) => string | undefined;
|
|
6
6
|
accessKey?: string;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
corsAllowHeaders?: string;
|
|
10
|
-
corsAllowOrigin?: string;
|
|
7
|
+
http?: {
|
|
8
|
+
cors?: CorsConfig;
|
|
11
9
|
};
|
|
12
10
|
ignorePathLevel?: number;
|
|
13
11
|
realIp?: (headers: Headers) => string;
|