netcore-blueprint 0.0.96 → 0.0.98

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.
@@ -15,4 +15,9 @@ How to use the app
15
15
  - Default project: Shared.Infrastructure
16
16
  - Xóa Migration cũ
17
17
  - Add-Migration SeedInitialData
18
- - Update-Database
18
+ - Update-Database
19
+
20
+ 4. Thêm Assistant mới:
21
+ - Program.cs của Host.API, thêm:
22
+ + using __ASSISTANT_NAME__;
23
+ + builder.Services.Add__ASSISTANT_NAME__AssistantModule();
@@ -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.98",
4
4
  "description": "A custom project blueprint",
5
5
  "main": "create.js",
6
6
  "bin": {