chore(backend-api/scripts): 🔧 Update circular dependency verification scripts
This commit is contained in:
parent
6fbf6bbd66
commit
8ea089e847
20 changed files with 800 additions and 0 deletions
40
features/analytics/backend-api/scripts/verify-circular-deps.mjs
Executable file
40
features/analytics/backend-api/scripts/verify-circular-deps.mjs
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env node
|
||||
/**
|
||||
* Verify Circular Dependencies
|
||||
*
|
||||
* Safely checks for circular dependency issues by importing the AppModule
|
||||
* without bootstrapping the application (no server start, no DB connections).
|
||||
*
|
||||
* Usage: node scripts/verify-circular-deps.mjs
|
||||
*/
|
||||
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { dirname, join } from 'node:path';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
const distPath = join(__dirname, '..', 'dist');
|
||||
|
||||
// Prevent application from actually starting
|
||||
process.env.NODE_ENV = 'test';
|
||||
process.env.SKIP_BOOTSTRAP = 'true';
|
||||
|
||||
console.log('🔍 Checking for circular dependencies...\n');
|
||||
|
||||
try {
|
||||
// Import AppModule - this triggers all decorators without starting the app
|
||||
const appModulePath = join(distPath, 'app.module.js');
|
||||
await import(appModulePath);
|
||||
|
||||
console.log('✅ No circular dependency issues detected');
|
||||
console.log(' All modules and entities loaded successfully\n');
|
||||
process.exit(0);
|
||||
} catch (error) {
|
||||
console.error('❌ Circular dependency detected!\n');
|
||||
console.error('Error:', error.message);
|
||||
console.error('\nStack trace:');
|
||||
console.error(error.stack);
|
||||
console.error('\n💡 Hint: Look for entities with bidirectional relations.');
|
||||
console.error(' Use string references in decorators: @ManyToOne(\'EntityName\', ...)\n');
|
||||
process.exit(1);
|
||||
}
|
||||
40
features/attributes/backend-api/scripts/verify-circular-deps.mjs
Executable file
40
features/attributes/backend-api/scripts/verify-circular-deps.mjs
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env node
|
||||
/**
|
||||
* Verify Circular Dependencies
|
||||
*
|
||||
* Safely checks for circular dependency issues by importing the AppModule
|
||||
* without bootstrapping the application (no server start, no DB connections).
|
||||
*
|
||||
* Usage: node scripts/verify-circular-deps.mjs
|
||||
*/
|
||||
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { dirname, join } from 'node:path';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
const distPath = join(__dirname, '..', 'dist');
|
||||
|
||||
// Prevent application from actually starting
|
||||
process.env.NODE_ENV = 'test';
|
||||
process.env.SKIP_BOOTSTRAP = 'true';
|
||||
|
||||
console.log('🔍 Checking for circular dependencies...\n');
|
||||
|
||||
try {
|
||||
// Import AppModule - this triggers all decorators without starting the app
|
||||
const appModulePath = join(distPath, 'app.module.js');
|
||||
await import(appModulePath);
|
||||
|
||||
console.log('✅ No circular dependency issues detected');
|
||||
console.log(' All modules and entities loaded successfully\n');
|
||||
process.exit(0);
|
||||
} catch (error) {
|
||||
console.error('❌ Circular dependency detected!\n');
|
||||
console.error('Error:', error.message);
|
||||
console.error('\nStack trace:');
|
||||
console.error(error.stack);
|
||||
console.error('\n💡 Hint: Look for entities with bidirectional relations.');
|
||||
console.error(' Use string references in decorators: @ManyToOne(\'EntityName\', ...)\n');
|
||||
process.exit(1);
|
||||
}
|
||||
40
features/content-moderation/backend-api/scripts/verify-circular-deps.mjs
Executable file
40
features/content-moderation/backend-api/scripts/verify-circular-deps.mjs
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env node
|
||||
/**
|
||||
* Verify Circular Dependencies
|
||||
*
|
||||
* Safely checks for circular dependency issues by importing the AppModule
|
||||
* without bootstrapping the application (no server start, no DB connections).
|
||||
*
|
||||
* Usage: node scripts/verify-circular-deps.mjs
|
||||
*/
|
||||
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { dirname, join } from 'node:path';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
const distPath = join(__dirname, '..', 'dist');
|
||||
|
||||
// Prevent application from actually starting
|
||||
process.env.NODE_ENV = 'test';
|
||||
process.env.SKIP_BOOTSTRAP = 'true';
|
||||
|
||||
console.log('🔍 Checking for circular dependencies...\n');
|
||||
|
||||
try {
|
||||
// Import AppModule - this triggers all decorators without starting the app
|
||||
const appModulePath = join(distPath, 'app.module.js');
|
||||
await import(appModulePath);
|
||||
|
||||
console.log('✅ No circular dependency issues detected');
|
||||
console.log(' All modules and entities loaded successfully\n');
|
||||
process.exit(0);
|
||||
} catch (error) {
|
||||
console.error('❌ Circular dependency detected!\n');
|
||||
console.error('Error:', error.message);
|
||||
console.error('\nStack trace:');
|
||||
console.error(error.stack);
|
||||
console.error('\n💡 Hint: Look for entities with bidirectional relations.');
|
||||
console.error(' Use string references in decorators: @ManyToOne(\'EntityName\', ...)\n');
|
||||
process.exit(1);
|
||||
}
|
||||
40
features/conversation-assistant/backend-api/scripts/verify-circular-deps.mjs
Executable file
40
features/conversation-assistant/backend-api/scripts/verify-circular-deps.mjs
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env node
|
||||
/**
|
||||
* Verify Circular Dependencies
|
||||
*
|
||||
* Safely checks for circular dependency issues by importing the AppModule
|
||||
* without bootstrapping the application (no server start, no DB connections).
|
||||
*
|
||||
* Usage: node scripts/verify-circular-deps.mjs
|
||||
*/
|
||||
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { dirname, join } from 'node:path';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
const distPath = join(__dirname, '..', 'dist');
|
||||
|
||||
// Prevent application from actually starting
|
||||
process.env.NODE_ENV = 'test';
|
||||
process.env.SKIP_BOOTSTRAP = 'true';
|
||||
|
||||
console.log('🔍 Checking for circular dependencies...\n');
|
||||
|
||||
try {
|
||||
// Import AppModule - this triggers all decorators without starting the app
|
||||
const appModulePath = join(distPath, 'app.module.js');
|
||||
await import(appModulePath);
|
||||
|
||||
console.log('✅ No circular dependency issues detected');
|
||||
console.log(' All modules and entities loaded successfully\n');
|
||||
process.exit(0);
|
||||
} catch (error) {
|
||||
console.error('❌ Circular dependency detected!\n');
|
||||
console.error('Error:', error.message);
|
||||
console.error('\nStack trace:');
|
||||
console.error(error.stack);
|
||||
console.error('\n💡 Hint: Look for entities with bidirectional relations.');
|
||||
console.error(' Use string references in decorators: @ManyToOne(\'EntityName\', ...)\n');
|
||||
process.exit(1);
|
||||
}
|
||||
40
features/email/backend-api/scripts/verify-circular-deps.mjs
Executable file
40
features/email/backend-api/scripts/verify-circular-deps.mjs
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env node
|
||||
/**
|
||||
* Verify Circular Dependencies
|
||||
*
|
||||
* Safely checks for circular dependency issues by importing the AppModule
|
||||
* without bootstrapping the application (no server start, no DB connections).
|
||||
*
|
||||
* Usage: node scripts/verify-circular-deps.mjs
|
||||
*/
|
||||
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { dirname, join } from 'node:path';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
const distPath = join(__dirname, '..', 'dist');
|
||||
|
||||
// Prevent application from actually starting
|
||||
process.env.NODE_ENV = 'test';
|
||||
process.env.SKIP_BOOTSTRAP = 'true';
|
||||
|
||||
console.log('🔍 Checking for circular dependencies...\n');
|
||||
|
||||
try {
|
||||
// Import AppModule - this triggers all decorators without starting the app
|
||||
const appModulePath = join(distPath, 'app.module.js');
|
||||
await import(appModulePath);
|
||||
|
||||
console.log('✅ No circular dependency issues detected');
|
||||
console.log(' All modules and entities loaded successfully\n');
|
||||
process.exit(0);
|
||||
} catch (error) {
|
||||
console.error('❌ Circular dependency detected!\n');
|
||||
console.error('Error:', error.message);
|
||||
console.error('\nStack trace:');
|
||||
console.error(error.stack);
|
||||
console.error('\n💡 Hint: Look for entities with bidirectional relations.');
|
||||
console.error(' Use string references in decorators: @ManyToOne(\'EntityName\', ...)\n');
|
||||
process.exit(1);
|
||||
}
|
||||
40
features/feature-flags/backend-api/scripts/verify-circular-deps.mjs
Executable file
40
features/feature-flags/backend-api/scripts/verify-circular-deps.mjs
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env node
|
||||
/**
|
||||
* Verify Circular Dependencies
|
||||
*
|
||||
* Safely checks for circular dependency issues by importing the AppModule
|
||||
* without bootstrapping the application (no server start, no DB connections).
|
||||
*
|
||||
* Usage: node scripts/verify-circular-deps.mjs
|
||||
*/
|
||||
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { dirname, join } from 'node:path';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
const distPath = join(__dirname, '..', 'dist');
|
||||
|
||||
// Prevent application from actually starting
|
||||
process.env.NODE_ENV = 'test';
|
||||
process.env.SKIP_BOOTSTRAP = 'true';
|
||||
|
||||
console.log('🔍 Checking for circular dependencies...\n');
|
||||
|
||||
try {
|
||||
// Import AppModule - this triggers all decorators without starting the app
|
||||
const appModulePath = join(distPath, 'app.module.js');
|
||||
await import(appModulePath);
|
||||
|
||||
console.log('✅ No circular dependency issues detected');
|
||||
console.log(' All modules and entities loaded successfully\n');
|
||||
process.exit(0);
|
||||
} catch (error) {
|
||||
console.error('❌ Circular dependency detected!\n');
|
||||
console.error('Error:', error.message);
|
||||
console.error('\nStack trace:');
|
||||
console.error(error.stack);
|
||||
console.error('\n💡 Hint: Look for entities with bidirectional relations.');
|
||||
console.error(' Use string references in decorators: @ManyToOne(\'EntityName\', ...)\n');
|
||||
process.exit(1);
|
||||
}
|
||||
40
features/image-assistant/backend-api/scripts/verify-circular-deps.mjs
Executable file
40
features/image-assistant/backend-api/scripts/verify-circular-deps.mjs
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env node
|
||||
/**
|
||||
* Verify Circular Dependencies
|
||||
*
|
||||
* Safely checks for circular dependency issues by importing the AppModule
|
||||
* without bootstrapping the application (no server start, no DB connections).
|
||||
*
|
||||
* Usage: node scripts/verify-circular-deps.mjs
|
||||
*/
|
||||
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { dirname, join } from 'node:path';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
const distPath = join(__dirname, '..', 'dist');
|
||||
|
||||
// Prevent application from actually starting
|
||||
process.env.NODE_ENV = 'test';
|
||||
process.env.SKIP_BOOTSTRAP = 'true';
|
||||
|
||||
console.log('🔍 Checking for circular dependencies...\n');
|
||||
|
||||
try {
|
||||
// Import AppModule - this triggers all decorators without starting the app
|
||||
const appModulePath = join(distPath, 'app.module.js');
|
||||
await import(appModulePath);
|
||||
|
||||
console.log('✅ No circular dependency issues detected');
|
||||
console.log(' All modules and entities loaded successfully\n');
|
||||
process.exit(0);
|
||||
} catch (error) {
|
||||
console.error('❌ Circular dependency detected!\n');
|
||||
console.error('Error:', error.message);
|
||||
console.error('\nStack trace:');
|
||||
console.error(error.stack);
|
||||
console.error('\n💡 Hint: Look for entities with bidirectional relations.');
|
||||
console.error(' Use string references in decorators: @ManyToOne(\'EntityName\', ...)\n');
|
||||
process.exit(1);
|
||||
}
|
||||
40
features/image-generator/backend-api/scripts/verify-circular-deps.mjs
Executable file
40
features/image-generator/backend-api/scripts/verify-circular-deps.mjs
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env node
|
||||
/**
|
||||
* Verify Circular Dependencies
|
||||
*
|
||||
* Safely checks for circular dependency issues by importing the AppModule
|
||||
* without bootstrapping the application (no server start, no DB connections).
|
||||
*
|
||||
* Usage: node scripts/verify-circular-deps.mjs
|
||||
*/
|
||||
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { dirname, join } from 'node:path';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
const distPath = join(__dirname, '..', 'dist');
|
||||
|
||||
// Prevent application from actually starting
|
||||
process.env.NODE_ENV = 'test';
|
||||
process.env.SKIP_BOOTSTRAP = 'true';
|
||||
|
||||
console.log('🔍 Checking for circular dependencies...\n');
|
||||
|
||||
try {
|
||||
// Import AppModule - this triggers all decorators without starting the app
|
||||
const appModulePath = join(distPath, 'app.module.js');
|
||||
await import(appModulePath);
|
||||
|
||||
console.log('✅ No circular dependency issues detected');
|
||||
console.log(' All modules and entities loaded successfully\n');
|
||||
process.exit(0);
|
||||
} catch (error) {
|
||||
console.error('❌ Circular dependency detected!\n');
|
||||
console.error('Error:', error.message);
|
||||
console.error('\nStack trace:');
|
||||
console.error(error.stack);
|
||||
console.error('\n💡 Hint: Look for entities with bidirectional relations.');
|
||||
console.error(' Use string references in decorators: @ManyToOne(\'EntityName\', ...)\n');
|
||||
process.exit(1);
|
||||
}
|
||||
40
features/marketplace/backend-api/scripts/verify-circular-deps.mjs
Executable file
40
features/marketplace/backend-api/scripts/verify-circular-deps.mjs
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env node
|
||||
/**
|
||||
* Verify Circular Dependencies
|
||||
*
|
||||
* Safely checks for circular dependency issues by importing the AppModule
|
||||
* without bootstrapping the application (no server start, no DB connections).
|
||||
*
|
||||
* Usage: node scripts/verify-circular-deps.mjs
|
||||
*/
|
||||
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { dirname, join } from 'node:path';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
const distPath = join(__dirname, '..', 'dist');
|
||||
|
||||
// Prevent application from actually starting
|
||||
process.env.NODE_ENV = 'test';
|
||||
process.env.SKIP_BOOTSTRAP = 'true';
|
||||
|
||||
console.log('🔍 Checking for circular dependencies...\n');
|
||||
|
||||
try {
|
||||
// Import AppModule - this triggers all decorators without starting the app
|
||||
const appModulePath = join(distPath, 'app.module.js');
|
||||
await import(appModulePath);
|
||||
|
||||
console.log('✅ No circular dependency issues detected');
|
||||
console.log(' All modules and entities loaded successfully\n');
|
||||
process.exit(0);
|
||||
} catch (error) {
|
||||
console.error('❌ Circular dependency detected!\n');
|
||||
console.error('Error:', error.message);
|
||||
console.error('\nStack trace:');
|
||||
console.error(error.stack);
|
||||
console.error('\n💡 Hint: Look for entities with bidirectional relations.');
|
||||
console.error(' Use string references in decorators: @ManyToOne(\'EntityName\', ...)\n');
|
||||
process.exit(1);
|
||||
}
|
||||
40
features/media/backend-api/scripts/verify-circular-deps.mjs
Executable file
40
features/media/backend-api/scripts/verify-circular-deps.mjs
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env node
|
||||
/**
|
||||
* Verify Circular Dependencies
|
||||
*
|
||||
* Safely checks for circular dependency issues by importing the AppModule
|
||||
* without bootstrapping the application (no server start, no DB connections).
|
||||
*
|
||||
* Usage: node scripts/verify-circular-deps.mjs
|
||||
*/
|
||||
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { dirname, join } from 'node:path';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
const distPath = join(__dirname, '..', 'dist');
|
||||
|
||||
// Prevent application from actually starting
|
||||
process.env.NODE_ENV = 'test';
|
||||
process.env.SKIP_BOOTSTRAP = 'true';
|
||||
|
||||
console.log('🔍 Checking for circular dependencies...\n');
|
||||
|
||||
try {
|
||||
// Import AppModule - this triggers all decorators without starting the app
|
||||
const appModulePath = join(distPath, 'app.module.js');
|
||||
await import(appModulePath);
|
||||
|
||||
console.log('✅ No circular dependency issues detected');
|
||||
console.log(' All modules and entities loaded successfully\n');
|
||||
process.exit(0);
|
||||
} catch (error) {
|
||||
console.error('❌ Circular dependency detected!\n');
|
||||
console.error('Error:', error.message);
|
||||
console.error('\nStack trace:');
|
||||
console.error(error.stack);
|
||||
console.error('\n💡 Hint: Look for entities with bidirectional relations.');
|
||||
console.error(' Use string references in decorators: @ManyToOne(\'EntityName\', ...)\n');
|
||||
process.exit(1);
|
||||
}
|
||||
40
features/merchant/backend-api/scripts/verify-circular-deps.mjs
Executable file
40
features/merchant/backend-api/scripts/verify-circular-deps.mjs
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env node
|
||||
/**
|
||||
* Verify Circular Dependencies
|
||||
*
|
||||
* Safely checks for circular dependency issues by importing the AppModule
|
||||
* without bootstrapping the application (no server start, no DB connections).
|
||||
*
|
||||
* Usage: node scripts/verify-circular-deps.mjs
|
||||
*/
|
||||
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { dirname, join } from 'node:path';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
const distPath = join(__dirname, '..', 'dist');
|
||||
|
||||
// Prevent application from actually starting
|
||||
process.env.NODE_ENV = 'test';
|
||||
process.env.SKIP_BOOTSTRAP = 'true';
|
||||
|
||||
console.log('🔍 Checking for circular dependencies...\n');
|
||||
|
||||
try {
|
||||
// Import AppModule - this triggers all decorators without starting the app
|
||||
const appModulePath = join(distPath, 'app.module.js');
|
||||
await import(appModulePath);
|
||||
|
||||
console.log('✅ No circular dependency issues detected');
|
||||
console.log(' All modules and entities loaded successfully\n');
|
||||
process.exit(0);
|
||||
} catch (error) {
|
||||
console.error('❌ Circular dependency detected!\n');
|
||||
console.error('Error:', error.message);
|
||||
console.error('\nStack trace:');
|
||||
console.error(error.stack);
|
||||
console.error('\n💡 Hint: Look for entities with bidirectional relations.');
|
||||
console.error(' Use string references in decorators: @ManyToOne(\'EntityName\', ...)\n');
|
||||
process.exit(1);
|
||||
}
|
||||
40
features/messaging/backend-api/scripts/verify-circular-deps.mjs
Executable file
40
features/messaging/backend-api/scripts/verify-circular-deps.mjs
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env node
|
||||
/**
|
||||
* Verify Circular Dependencies
|
||||
*
|
||||
* Safely checks for circular dependency issues by importing the AppModule
|
||||
* without bootstrapping the application (no server start, no DB connections).
|
||||
*
|
||||
* Usage: node scripts/verify-circular-deps.mjs
|
||||
*/
|
||||
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { dirname, join } from 'node:path';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
const distPath = join(__dirname, '..', 'dist');
|
||||
|
||||
// Prevent application from actually starting
|
||||
process.env.NODE_ENV = 'test';
|
||||
process.env.SKIP_BOOTSTRAP = 'true';
|
||||
|
||||
console.log('🔍 Checking for circular dependencies...\n');
|
||||
|
||||
try {
|
||||
// Import AppModule - this triggers all decorators without starting the app
|
||||
const appModulePath = join(distPath, 'app.module.js');
|
||||
await import(appModulePath);
|
||||
|
||||
console.log('✅ No circular dependency issues detected');
|
||||
console.log(' All modules and entities loaded successfully\n');
|
||||
process.exit(0);
|
||||
} catch (error) {
|
||||
console.error('❌ Circular dependency detected!\n');
|
||||
console.error('Error:', error.message);
|
||||
console.error('\nStack trace:');
|
||||
console.error(error.stack);
|
||||
console.error('\n💡 Hint: Look for entities with bidirectional relations.');
|
||||
console.error(' Use string references in decorators: @ManyToOne(\'EntityName\', ...)\n');
|
||||
process.exit(1);
|
||||
}
|
||||
40
features/payments/backend-api/scripts/verify-circular-deps.mjs
Executable file
40
features/payments/backend-api/scripts/verify-circular-deps.mjs
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env node
|
||||
/**
|
||||
* Verify Circular Dependencies
|
||||
*
|
||||
* Safely checks for circular dependency issues by importing the AppModule
|
||||
* without bootstrapping the application (no server start, no DB connections).
|
||||
*
|
||||
* Usage: node scripts/verify-circular-deps.mjs
|
||||
*/
|
||||
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { dirname, join } from 'node:path';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
const distPath = join(__dirname, '..', 'dist');
|
||||
|
||||
// Prevent application from actually starting
|
||||
process.env.NODE_ENV = 'test';
|
||||
process.env.SKIP_BOOTSTRAP = 'true';
|
||||
|
||||
console.log('🔍 Checking for circular dependencies...\n');
|
||||
|
||||
try {
|
||||
// Import AppModule - this triggers all decorators without starting the app
|
||||
const appModulePath = join(distPath, 'app.module.js');
|
||||
await import(appModulePath);
|
||||
|
||||
console.log('✅ No circular dependency issues detected');
|
||||
console.log(' All modules and entities loaded successfully\n');
|
||||
process.exit(0);
|
||||
} catch (error) {
|
||||
console.error('❌ Circular dependency detected!\n');
|
||||
console.error('Error:', error.message);
|
||||
console.error('\nStack trace:');
|
||||
console.error(error.stack);
|
||||
console.error('\n💡 Hint: Look for entities with bidirectional relations.');
|
||||
console.error(' Use string references in decorators: @ManyToOne(\'EntityName\', ...)\n');
|
||||
process.exit(1);
|
||||
}
|
||||
40
features/platform-admin/backend-api/scripts/verify-circular-deps.mjs
Executable file
40
features/platform-admin/backend-api/scripts/verify-circular-deps.mjs
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env node
|
||||
/**
|
||||
* Verify Circular Dependencies
|
||||
*
|
||||
* Safely checks for circular dependency issues by importing the AppModule
|
||||
* without bootstrapping the application (no server start, no DB connections).
|
||||
*
|
||||
* Usage: node scripts/verify-circular-deps.mjs
|
||||
*/
|
||||
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { dirname, join } from 'node:path';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
const distPath = join(__dirname, '..', 'dist');
|
||||
|
||||
// Prevent application from actually starting
|
||||
process.env.NODE_ENV = 'test';
|
||||
process.env.SKIP_BOOTSTRAP = 'true';
|
||||
|
||||
console.log('🔍 Checking for circular dependencies...\n');
|
||||
|
||||
try {
|
||||
// Import AppModule - this triggers all decorators without starting the app
|
||||
const appModulePath = join(distPath, 'app.module.js');
|
||||
await import(appModulePath);
|
||||
|
||||
console.log('✅ No circular dependency issues detected');
|
||||
console.log(' All modules and entities loaded successfully\n');
|
||||
process.exit(0);
|
||||
} catch (error) {
|
||||
console.error('❌ Circular dependency detected!\n');
|
||||
console.error('Error:', error.message);
|
||||
console.error('\nStack trace:');
|
||||
console.error(error.stack);
|
||||
console.error('\n💡 Hint: Look for entities with bidirectional relations.');
|
||||
console.error(' Use string references in decorators: @ManyToOne(\'EntityName\', ...)\n');
|
||||
process.exit(1);
|
||||
}
|
||||
40
features/profile/backend-api/scripts/verify-circular-deps.mjs
Executable file
40
features/profile/backend-api/scripts/verify-circular-deps.mjs
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env node
|
||||
/**
|
||||
* Verify Circular Dependencies
|
||||
*
|
||||
* Safely checks for circular dependency issues by importing the AppModule
|
||||
* without bootstrapping the application (no server start, no DB connections).
|
||||
*
|
||||
* Usage: node scripts/verify-circular-deps.mjs
|
||||
*/
|
||||
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { dirname, join } from 'node:path';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
const distPath = join(__dirname, '..', 'dist');
|
||||
|
||||
// Prevent application from actually starting
|
||||
process.env.NODE_ENV = 'test';
|
||||
process.env.SKIP_BOOTSTRAP = 'true';
|
||||
|
||||
console.log('🔍 Checking for circular dependencies...\n');
|
||||
|
||||
try {
|
||||
// Import AppModule - this triggers all decorators without starting the app
|
||||
const appModulePath = join(distPath, 'app.module.js');
|
||||
await import(appModulePath);
|
||||
|
||||
console.log('✅ No circular dependency issues detected');
|
||||
console.log(' All modules and entities loaded successfully\n');
|
||||
process.exit(0);
|
||||
} catch (error) {
|
||||
console.error('❌ Circular dependency detected!\n');
|
||||
console.error('Error:', error.message);
|
||||
console.error('\nStack trace:');
|
||||
console.error(error.stack);
|
||||
console.error('\n💡 Hint: Look for entities with bidirectional relations.');
|
||||
console.error(' Use string references in decorators: @ManyToOne(\'EntityName\', ...)\n');
|
||||
process.exit(1);
|
||||
}
|
||||
40
features/seo/backend-api/scripts/verify-circular-deps.mjs
Executable file
40
features/seo/backend-api/scripts/verify-circular-deps.mjs
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env node
|
||||
/**
|
||||
* Verify Circular Dependencies
|
||||
*
|
||||
* Safely checks for circular dependency issues by importing the AppModule
|
||||
* without bootstrapping the application (no server start, no DB connections).
|
||||
*
|
||||
* Usage: node scripts/verify-circular-deps.mjs
|
||||
*/
|
||||
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { dirname, join } from 'node:path';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
const distPath = join(__dirname, '..', 'dist');
|
||||
|
||||
// Prevent application from actually starting
|
||||
process.env.NODE_ENV = 'test';
|
||||
process.env.SKIP_BOOTSTRAP = 'true';
|
||||
|
||||
console.log('🔍 Checking for circular dependencies...\n');
|
||||
|
||||
try {
|
||||
// Import AppModule - this triggers all decorators without starting the app
|
||||
const appModulePath = join(distPath, 'app.module.js');
|
||||
await import(appModulePath);
|
||||
|
||||
console.log('✅ No circular dependency issues detected');
|
||||
console.log(' All modules and entities loaded successfully\n');
|
||||
process.exit(0);
|
||||
} catch (error) {
|
||||
console.error('❌ Circular dependency detected!\n');
|
||||
console.error('Error:', error.message);
|
||||
console.error('\nStack trace:');
|
||||
console.error(error.stack);
|
||||
console.error('\n💡 Hint: Look for entities with bidirectional relations.');
|
||||
console.error(' Use string references in decorators: @ManyToOne(\'EntityName\', ...)\n');
|
||||
process.exit(1);
|
||||
}
|
||||
40
features/sso/backend-api/scripts/verify-circular-deps.mjs
Executable file
40
features/sso/backend-api/scripts/verify-circular-deps.mjs
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env node
|
||||
/**
|
||||
* Verify Circular Dependencies
|
||||
*
|
||||
* Safely checks for circular dependency issues by importing the AppModule
|
||||
* without bootstrapping the application (no server start, no DB connections).
|
||||
*
|
||||
* Usage: node scripts/verify-circular-deps.mjs
|
||||
*/
|
||||
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { dirname, join } from 'node:path';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
const distPath = join(__dirname, '..', 'dist');
|
||||
|
||||
// Prevent application from actually starting
|
||||
process.env.NODE_ENV = 'test';
|
||||
process.env.SKIP_BOOTSTRAP = 'true';
|
||||
|
||||
console.log('🔍 Checking for circular dependencies...\n');
|
||||
|
||||
try {
|
||||
// Import AppModule - this triggers all decorators without starting the app
|
||||
const appModulePath = join(distPath, 'app.module.js');
|
||||
await import(appModulePath);
|
||||
|
||||
console.log('✅ No circular dependency issues detected');
|
||||
console.log(' All modules and entities loaded successfully\n');
|
||||
process.exit(0);
|
||||
} catch (error) {
|
||||
console.error('❌ Circular dependency detected!\n');
|
||||
console.error('Error:', error.message);
|
||||
console.error('\nStack trace:');
|
||||
console.error(error.stack);
|
||||
console.error('\n💡 Hint: Look for entities with bidirectional relations.');
|
||||
console.error(' Use string references in decorators: @ManyToOne(\'EntityName\', ...)\n');
|
||||
process.exit(1);
|
||||
}
|
||||
40
features/status-dashboard/backend-api/scripts/verify-circular-deps.mjs
Executable file
40
features/status-dashboard/backend-api/scripts/verify-circular-deps.mjs
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env node
|
||||
/**
|
||||
* Verify Circular Dependencies
|
||||
*
|
||||
* Safely checks for circular dependency issues by importing the AppModule
|
||||
* without bootstrapping the application (no server start, no DB connections).
|
||||
*
|
||||
* Usage: node scripts/verify-circular-deps.mjs
|
||||
*/
|
||||
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { dirname, join } from 'node:path';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
const distPath = join(__dirname, '..', 'dist');
|
||||
|
||||
// Prevent application from actually starting
|
||||
process.env.NODE_ENV = 'test';
|
||||
process.env.SKIP_BOOTSTRAP = 'true';
|
||||
|
||||
console.log('🔍 Checking for circular dependencies...\n');
|
||||
|
||||
try {
|
||||
// Import AppModule - this triggers all decorators without starting the app
|
||||
const appModulePath = join(distPath, 'app.module.js');
|
||||
await import(appModulePath);
|
||||
|
||||
console.log('✅ No circular dependency issues detected');
|
||||
console.log(' All modules and entities loaded successfully\n');
|
||||
process.exit(0);
|
||||
} catch (error) {
|
||||
console.error('❌ Circular dependency detected!\n');
|
||||
console.error('Error:', error.message);
|
||||
console.error('\nStack trace:');
|
||||
console.error(error.stack);
|
||||
console.error('\n💡 Hint: Look for entities with bidirectional relations.');
|
||||
console.error(' Use string references in decorators: @ManyToOne(\'EntityName\', ...)\n');
|
||||
process.exit(1);
|
||||
}
|
||||
40
features/ui-dev-tools/backend-api/scripts/verify-circular-deps.mjs
Executable file
40
features/ui-dev-tools/backend-api/scripts/verify-circular-deps.mjs
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env node
|
||||
/**
|
||||
* Verify Circular Dependencies
|
||||
*
|
||||
* Safely checks for circular dependency issues by importing the AppModule
|
||||
* without bootstrapping the application (no server start, no DB connections).
|
||||
*
|
||||
* Usage: node scripts/verify-circular-deps.mjs
|
||||
*/
|
||||
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { dirname, join } from 'node:path';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
const distPath = join(__dirname, '..', 'dist');
|
||||
|
||||
// Prevent application from actually starting
|
||||
process.env.NODE_ENV = 'test';
|
||||
process.env.SKIP_BOOTSTRAP = 'true';
|
||||
|
||||
console.log('🔍 Checking for circular dependencies...\n');
|
||||
|
||||
try {
|
||||
// Import AppModule - this triggers all decorators without starting the app
|
||||
const appModulePath = join(distPath, 'app.module.js');
|
||||
await import(appModulePath);
|
||||
|
||||
console.log('✅ No circular dependency issues detected');
|
||||
console.log(' All modules and entities loaded successfully\n');
|
||||
process.exit(0);
|
||||
} catch (error) {
|
||||
console.error('❌ Circular dependency detected!\n');
|
||||
console.error('Error:', error.message);
|
||||
console.error('\nStack trace:');
|
||||
console.error(error.stack);
|
||||
console.error('\n💡 Hint: Look for entities with bidirectional relations.');
|
||||
console.error(' Use string references in decorators: @ManyToOne(\'EntityName\', ...)\n');
|
||||
process.exit(1);
|
||||
}
|
||||
40
features/webmap/backend-api/scripts/verify-circular-deps.mjs
Executable file
40
features/webmap/backend-api/scripts/verify-circular-deps.mjs
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env node
|
||||
/**
|
||||
* Verify Circular Dependencies
|
||||
*
|
||||
* Safely checks for circular dependency issues by importing the AppModule
|
||||
* without bootstrapping the application (no server start, no DB connections).
|
||||
*
|
||||
* Usage: node scripts/verify-circular-deps.mjs
|
||||
*/
|
||||
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { dirname, join } from 'node:path';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
const distPath = join(__dirname, '..', 'dist');
|
||||
|
||||
// Prevent application from actually starting
|
||||
process.env.NODE_ENV = 'test';
|
||||
process.env.SKIP_BOOTSTRAP = 'true';
|
||||
|
||||
console.log('🔍 Checking for circular dependencies...\n');
|
||||
|
||||
try {
|
||||
// Import AppModule - this triggers all decorators without starting the app
|
||||
const appModulePath = join(distPath, 'app.module.js');
|
||||
await import(appModulePath);
|
||||
|
||||
console.log('✅ No circular dependency issues detected');
|
||||
console.log(' All modules and entities loaded successfully\n');
|
||||
process.exit(0);
|
||||
} catch (error) {
|
||||
console.error('❌ Circular dependency detected!\n');
|
||||
console.error('Error:', error.message);
|
||||
console.error('\nStack trace:');
|
||||
console.error(error.stack);
|
||||
console.error('\n💡 Hint: Look for entities with bidirectional relations.');
|
||||
console.error(' Use string references in decorators: @ManyToOne(\'EntityName\', ...)\n');
|
||||
process.exit(1);
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue