milkio 1.0.0-beta.149 → 1.0.0-beta.150

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/action/index.d.ts CHANGED
@@ -1,11 +1,10 @@
1
- import type { MilkioContext } from "../index.ts";
2
- export declare function action<ActionInitT extends ActionInit>(init: ActionInitT): Action<ActionInitT>;
1
+ import { MilkioMeta } from "../meta/index.ts";
2
+ import { MilkioContext } from "../context/index.ts";
3
3
  export type ActionInit = {
4
4
  meta?: Record<any, any>;
5
5
  handler: (context: MilkioContext, params: any) => Promise<unknown>;
6
6
  };
7
7
  export type Action<ActionInitT extends ActionInit> = {
8
- $milkioType: "action";
9
- meta: any;
8
+ meta?: MilkioMeta;
10
9
  handler: ActionInitT["handler"];
11
10
  };
@@ -10,9 +10,7 @@ export interface MilkioContext {
10
10
  headers: Headers;
11
11
  config: Readonly<Awaited<ReturnType<$types["configSchema"]["get"]>>>;
12
12
  typia: Readonly<$types["generated"]["typiaSchema"]>;
13
- call: <Module extends Promise<{
14
- default: Action<any>;
15
- }>>(module: Module, params: Parameters<Awaited<Module>["default"]["handler"]>[1]) => Promise<ReturnType<Awaited<Module>["default"]["handler"]>>;
13
+ call: <Module extends Promise<Action<any>>>(module: Module, params: Parameters<Awaited<Module>["handler"]>[1]) => Promise<ReturnType<Awaited<Module>["handler"]>>;
16
14
  onFinally: (handler: () => void | Promise<void>) => void;
17
15
  }
18
16
  export interface ContextHttp<ParamsParsed = any> {
@@ -1,7 +1,8 @@
1
1
  import type { MilkioContext, MilkioMeta, Logger, Results, GeneratedInit } from "../index.ts";
2
2
  export declare function __initExecuter(generated: GeneratedInit, runtime: any): {
3
3
  __call: (context: MilkioContext, module: {
4
- default: any;
4
+ meta: any;
5
+ handler: any;
5
6
  }, params?: any) => Promise<any>;
6
7
  __execute: (routeSchema: any, options: {
7
8
  createdExecuteId: string;