Some checks failed
Deploy Dimension47 / deploy (push) Failing after 23s
- Add battle module with sessions, maps, tokens, and combatants - Implement WebSocket gateway for real-time battle updates - Add map upload with configurable grid system - Create battle canvas with token rendering and drag support - Support PC tokens from characters and NPC tokens from templates - Add initiative tracking and round management - GM-only controls for token manipulation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
52 lines
1.3 KiB
TypeScript
52 lines
1.3 KiB
TypeScript
import { Module } from '@nestjs/common';
|
|
import { JwtModule } from '@nestjs/jwt';
|
|
import { ConfigModule, ConfigService } from '@nestjs/config';
|
|
import { MulterModule } from '@nestjs/platform-express';
|
|
import { memoryStorage } from 'multer';
|
|
|
|
// Controllers
|
|
import { BattleController } from './battle.controller';
|
|
import { BattleMapsController } from './battle-maps.controller';
|
|
import { CombatantsController } from './combatants.controller';
|
|
|
|
// Services
|
|
import { BattleService } from './battle.service';
|
|
import { BattleMapsService } from './battle-maps.service';
|
|
import { CombatantsService } from './combatants.service';
|
|
|
|
// Gateway
|
|
import { BattleGateway } from './battle.gateway';
|
|
|
|
@Module({
|
|
imports: [
|
|
JwtModule.registerAsync({
|
|
imports: [ConfigModule],
|
|
useFactory: async (configService: ConfigService) => ({
|
|
secret: configService.get<string>('JWT_SECRET'),
|
|
}),
|
|
inject: [ConfigService],
|
|
}),
|
|
MulterModule.register({
|
|
storage: memoryStorage(),
|
|
}),
|
|
],
|
|
controllers: [
|
|
BattleController,
|
|
BattleMapsController,
|
|
CombatantsController,
|
|
],
|
|
providers: [
|
|
BattleService,
|
|
BattleMapsService,
|
|
CombatantsService,
|
|
BattleGateway,
|
|
],
|
|
exports: [
|
|
BattleService,
|
|
BattleMapsService,
|
|
CombatantsService,
|
|
BattleGateway,
|
|
],
|
|
})
|
|
export class BattleModule {}
|