bmad-odoo 1.0.4 → 1.0.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bmad-odoo",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "BMAD Framework mở rộng cho phát triển Odoo ERP - 10 AI Agents, 44+ Workflows, hỗ trợ tiếng Việt",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -421,27 +421,43 @@ function printSuccessMessage(selectedIde) {
421
421
 
422
422
  // Main function
423
423
  async function main() {
424
+ console.log('\n🚀 BMAD-Odoo postinstall script starting...\n');
425
+
424
426
  const projectRoot = getProjectRoot();
425
427
  const packageRoot = path.join(__dirname, '..');
426
428
 
429
+ console.log(`📂 Package root: ${packageRoot}`);
430
+ console.log(`📂 Project root: ${projectRoot || 'NOT FOUND'}\n`);
431
+
427
432
  if (!projectRoot) {
428
433
  logWarning('Không tìm thấy project root. Bỏ qua auto-setup.');
429
- logWarning('Bạn có thể setup thủ công theo hướng dẫn trong README.md\n');
430
- return;
434
+ logWarning('Bạn có thể setup thủ công bằng lệnh: npx bmad-odoo-setup\n');
435
+ process.exit(0);
431
436
  }
432
437
 
433
438
  // Check if running interactively (has stdin)
434
439
  const isInteractive = process.stdin.isTTY;
435
440
 
436
- if (isInteractive) {
437
- await interactiveSetup(projectRoot, packageRoot);
438
- } else {
439
- autoSetup(projectRoot, packageRoot);
441
+ console.log(`🔧 Interactive mode: ${isInteractive ? 'YES' : 'NO (using auto-setup)'}\n`);
442
+
443
+ try {
444
+ if (isInteractive) {
445
+ await interactiveSetup(projectRoot, packageRoot);
446
+ } else {
447
+ autoSetup(projectRoot, packageRoot);
448
+ }
449
+ } catch (error) {
450
+ logError(`Lỗi trong quá trình setup: ${error.message}`);
451
+ console.error(error.stack);
452
+ logWarning('Bạn có thể setup thủ công bằng lệnh: npx bmad-odoo-setup\n');
453
+ process.exit(0); // Don't fail npm install
440
454
  }
441
455
  }
442
456
 
443
457
  // Run the script
444
458
  main().catch((error) => {
445
- logError(`Lỗi trong quá trình setup: ${error.message}`);
446
- logWarning('Bạn có thể setup thủ công theo hướng dẫn trong README.md\n');
459
+ logError(`Lỗi fatal: ${error.message}`);
460
+ console.error(error.stack);
461
+ logWarning('Bạn có thể setup thủ công bằng lệnh: npx bmad-odoo-setup\n');
462
+ process.exit(0); // Don't fail npm install
447
463
  });