milkio 0.2.4 → 0.2.5

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.2.4",
5
+ "version": "0.2.5",
6
6
  "peerDependencies": {
7
7
  "typescript": "^5.4.2"
8
8
  },
@@ -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
  }