milkio 0.2.4 → 0.2.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.
- package/api-test/index.ts +2 -1
- package/package.json +1 -1
- package/scripts/gen-significant.ts +2 -1
package/api-test/index.ts
CHANGED
|
@@ -17,7 +17,8 @@ export const executeApiTests = async <Path extends Array<keyof (typeof schema)["
|
|
|
17
17
|
const apiTestHooks = await import("../../../src/api-test.ts");
|
|
18
18
|
await apiTestHooks.default.onBootstrap();
|
|
19
19
|
|
|
20
|
-
for (
|
|
20
|
+
for (const pathRaw of pathArr) {
|
|
21
|
+
let path = pathRaw.replaceAll("\\", "/");
|
|
21
22
|
if (path.startsWith("/")) path = path.slice(1) as Path[number];
|
|
22
23
|
|
|
23
24
|
tests.push(
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import ejs from "ejs";
|
|
2
|
-
import { join } from "node:path";
|
|
2
|
+
import { join, dirname } from "node:path";
|
|
3
3
|
import { existsSync, mkdirSync } from "node:fs";
|
|
4
4
|
import { cwd, exit } from "node:process";
|
|
5
5
|
import { unlink, writeFile } from "node:fs/promises";
|
|
@@ -99,6 +99,7 @@ export const randParams = async () => typia.random<ParamsT>();
|
|
|
99
99
|
`.trim();
|
|
100
100
|
// export const paramsSchema = typia.json.application<[{ data: ParamsT }], "swagger">();
|
|
101
101
|
|
|
102
|
+
if (!existsSync(dirname(filePath))) mkdirSync(dirname(filePath), { recursive: true });
|
|
102
103
|
await writeFile(filePath, ejs.render(template, { ...templateVars, path }));
|
|
103
104
|
}
|
|
104
105
|
}
|