diff --git a/package-lock.json b/package-lock.json index f414ee75..ba89f888 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13636,6 +13636,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, "dependencies": { "semver": "^7.5.3" }, @@ -21618,7 +21619,6 @@ "lodash.deburr": "^4.1.0", "lodash.setwith": "^4.3.2", "lodash.startcase": "^4.4.0", - "make-dir": "^4.0.0", "oas": "^22.0.0", "ora": "^5.4.1", "prompts": "^2.4.2", diff --git a/packages/api/package.json b/packages/api/package.json index 0ae2159b..a9c988e4 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -47,7 +47,6 @@ "lodash.deburr": "^4.1.0", "lodash.setwith": "^4.3.2", "lodash.startcase": "^4.4.0", - "make-dir": "^4.0.0", "oas": "^22.0.0", "ora": "^5.4.1", "prompts": "^2.4.2", diff --git a/packages/api/src/storage.ts b/packages/api/src/storage.ts index f5648a5e..f2b39c80 100644 --- a/packages/api/src/storage.ts +++ b/packages/api/src/storage.ts @@ -3,7 +3,6 @@ import type { OASDocument } from 'oas/rmoas.types'; import fs from 'node:fs'; import path from 'node:path'; -import makeDir from 'make-dir'; import ssri from 'ssri'; import validateNPMPackageName from 'validate-npm-package-name'; @@ -57,9 +56,9 @@ export default class Storage { return; } - Storage.dir = makeDir.sync(path.join(process.cwd(), '.api')); + Storage.dir = fs.mkdirSync(path.join(process.cwd(), '.api'), { recursive: true }) as string; - makeDir.sync(Storage.getAPIsDir()); + fs.mkdirSync(Storage.getAPIsDir(), { recursive: true }); } /**