netcore-blueprint 0.0.96 → 0.0.97

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.
@@ -11,6 +11,7 @@ const { addProjectReferencesToCsproj, copyRecursive } = require('../lib/replacer
11
11
 
12
12
  const sourceModuleName = "AiAssistantModule";
13
13
  const assistantName = "__ASSISTANT_NAME__";
14
+ const force = process.argv.includes('--force');
14
15
 
15
16
  // =======================
16
17
  // FIND SOLUTION ROOT
@@ -58,8 +59,14 @@ if (!fs.existsSync(templateRoot)) {
58
59
  }
59
60
 
60
61
  if (fs.existsSync(targetModuleRoot)) {
61
- console.error(`❌ Module already exists: ${targetModuleRoot}`);
62
- process.exit(1);
62
+ if (!force) {
63
+ console.error(`❌ Target module already exists: ${targetModuleRoot}`);
64
+ console.error(` Use --force to overwrite.`);
65
+ process.exit(1);
66
+ }
67
+
68
+ console.log(`🔥 --force detected. Removing existing module: ${targetModuleRoot}`);
69
+ fs.rmSync(targetModuleRoot, { recursive: true, force: true });
63
70
  }
64
71
 
65
72
  console.log(`📦 Creating assistant module`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "netcore-blueprint",
3
- "version": "0.0.96",
3
+ "version": "0.0.97",
4
4
  "description": "A custom project blueprint",
5
5
  "main": "create.js",
6
6
  "bin": {