create-prisma-php-app 1.23.5 → 1.23.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/dist/index.js +7 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -166,9 +166,13 @@ async function main() {
|
|
|
166
166
|
"app",
|
|
167
167
|
"swagger-docs"
|
|
168
168
|
);
|
|
169
|
-
// Check if the directory exists
|
|
170
|
-
if (
|
|
171
|
-
|
|
169
|
+
// Check if the directory exists
|
|
170
|
+
if (fs.existsSync(swaggerDocsPath)) {
|
|
171
|
+
// If it exists and is not empty, remove it before cloning
|
|
172
|
+
if (fs.readdirSync(swaggerDocsPath).length > 0) {
|
|
173
|
+
console.log("Removing existing swagger-docs directory...");
|
|
174
|
+
fs.rmSync(swaggerDocsPath, { recursive: true, force: true });
|
|
175
|
+
}
|
|
172
176
|
}
|
|
173
177
|
// Clone the Git repository into the swagger-docs directory
|
|
174
178
|
execSync(
|