milkio 0.0.19 → 0.0.20

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "milkio",
3
3
  "type": "module",
4
4
  "module": "index.ts",
5
- "version": "0.0.19",
5
+ "version": "0.0.20",
6
6
  "peerDependencies": {
7
7
  "typescript": "^5.4.2"
8
8
  },
@@ -97,7 +97,7 @@ import type * as <%= utils.camel(path.slice(0, -3).replaceAll('/', '$')) %> from
97
97
  type ParamsT = Parameters<typeof <%= utils.camel(path.replaceAll('/', '$').slice(0, -${3})) %>['api']['action']>[0];
98
98
  export const validateParams = async (params: any) => typia.misc.validatePrune<ParamsT>(params);
99
99
  type ResultsT = Awaited<ReturnType<typeof <%= utils.camel(path.replaceAll('/', '$').slice(0, -${3})) %>['api']['action']>>;
100
- export const validateResults = async (results: any) => { _validate(typia.validate<TSONEncode<ExecuteResultSuccess<ResultsT>>>(results)); return typia.json.stringify<TSONEncode<ExecuteResultSuccess<ResultsT>>>(results); };
100
+ export const validateResults = async (results: any) => { _validate(typia.validate<TSONEncode<ExecuteResultSuccess<ResultsT> | ExecuteResultFail>>(results)); return typia.json.stringify<TSONEncode<ExecuteResultSuccess<ResultsT>>>(results); };
101
101
  export const randParams = async () => typia.random<ParamsT>();
102
102
  `.trim()
103
103
  // export const paramsSchema = typia.json.application<[{ data: ParamsT }], "swagger">();
package/templates/api.ts CHANGED
@@ -8,7 +8,7 @@ await createTemplate(async (tools) => {
8
8
  import { defineApi, defineApiTest } from "milkio"
9
9
 
10
10
  /**
11
- * ${tools.name} ${tools.src()}
11
+ * ${tools.name}
12
12
  */
13
13
  export const api = defineApi({
14
14
  meta: {