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();
|
package/bin/create-assistant.js
CHANGED
|
@@ -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
|
-
|
|
62
|
-
|
|
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`);
|