@domain.js/main 0.4.5 → 0.4.6

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.
@@ -21,7 +21,7 @@ export declare function Main(cnf: Cnf, deps: Deps): Readonly<{
21
21
  auto: <F extends (...args: any[]) => any>(fn: F, schema: Schema[], errorFn: Function, extra: any) => (...args: Parameters<F>) => ReturnType<F>;
22
22
  validate: (schema: Schema, data: any) => boolean;
23
23
  compile: (schema: Schema) => ajv.ValidateFunction<unknown>;
24
- /** intance of Ajv */
24
+ /** instance of Ajv */
25
25
  ajv: import("ajv").default;
26
26
  }>;
27
27
  export declare const Deps: string[];
@@ -75,7 +75,7 @@ function Main(cnf, deps) {
75
75
  auto,
76
76
  validate,
77
77
  compile,
78
- /** intance of Ajv */
78
+ /** instance of Ajv */
79
79
  ajv,
80
80
  });
81
81
  }
@@ -164,6 +164,8 @@ function BridgeSocket(io, domain) {
164
164
  catch (e) {
165
165
  console.error(e);
166
166
  }
167
+ if (client.quit)
168
+ client.quit();
167
169
  });
168
170
  });
169
171
  }
@@ -1,5 +1,6 @@
1
1
  /** 将 readonly string[] 转换成联合类型 */
2
2
  export declare type ReadonlyArray2union<T extends ReadonlyArray<any>> = T extends ReadonlyArray<infer A> ? A : never;
3
+ declare type Type = "string" | "number" | "integer" | "object" | "array" | "boolean";
3
4
  /** 接口参数 schema 定义的类型 */
4
5
  export interface ParamsSchema<Params extends {}, Keys extends string | number | symbol = keyof Params> {
5
6
  /** 接口整体描述信息 */
@@ -17,6 +18,7 @@ export interface ParamsSchema<Params extends {}, Keys extends string | number |
17
18
  /** 当前参数的描述信息 */
18
19
  description: string;
19
20
  /** 当前参数的类型 */
20
- type: "string" | "number" | "integer" | "object" | "array" | "boolean";
21
+ type: Type | [Type];
21
22
  }>;
22
23
  }
24
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domain.js/main",
3
- "version": "0.4.5",
3
+ "version": "0.4.6",
4
4
  "description": "DDD framework",
5
5
  "main": "dist/index.js",
6
6
  "bin": {