milkio 1.0.0-alpha.57 → 1.0.0-alpha.58

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.
@@ -0,0 +1,7 @@
1
+ import type { MilkioWorld } from '..'
2
+
3
+ export function bootstrap<BootstrapInitT extends BootstrapInit>(init: BootstrapInitT): BootstrapInitT {
4
+ return init
5
+ }
6
+
7
+ export type BootstrapInit = (world: MilkioWorld) => Promise<void> | void
package/handler/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { $context, ContextHttp, Results, Logger, $meta, MilkioWorld } from '..'
1
+ import type { MilkioWorld } from '..'
2
2
 
3
3
  export function handler<HandlerInitT extends HandlerInit>(init: HandlerInitT): HandlerInitT {
4
4
  return init
package/index.ts CHANGED
@@ -3,6 +3,7 @@ export * from '@southern-aurora/tson'
3
3
  export * from './types'
4
4
  export * from './config'
5
5
  export * from './execute'
6
+ export * from './bootstrap'
6
7
  export * from './event'
7
8
  export * from './handler'
8
9
  export * from './world'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "milkio",
3
3
  "type": "module",
4
- "version": "1.0.0-alpha.57",
4
+ "version": "1.0.0-alpha.58",
5
5
  "module": "index.ts",
6
6
  "scripts": {},
7
7
  "peerDependencies": {
package/world/index.ts CHANGED
@@ -17,7 +17,7 @@ export interface MilkioInit {
17
17
  executeId?: (request: Request) => string | Promise<string>
18
18
  onLoggerSubmitting?: LoggerSubmittingHandler
19
19
  onLoggerInserting?: LoggerInsertingHandler
20
- bootstraps?: Array<(world: MilkioWorld<any>) => Promise<void>>
20
+ bootstraps?: Array<(world: MilkioWorld) => Promise<void> | void>
21
21
  }
22
22
 
23
23
  export type MilkioRuntimeInit<T extends MilkioInit> = Mixin<