All files / src/seeding seeding.service.ts

70.37% Statements 19/27
100% Branches 0/0
50% Functions 1/2
68% Lines 17/25

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 356x 6x 6x 6x 6x 6x 6x 6x     6x 6x     6x 6x 6x 6x 6x 6x 6x                            
import { Injectable, Logger } from '@nestjs/common';
import { ContextTemplateSeedingService } from './context-template-seeding.service';
import { SystemPromptSeedingService } from './system-prompt-seeding.service';
import { CustomSnippetSeedingService } from './custom-snippet-seeding.service';
import { McpConfigSeedingService } from './mcp-config-seeding.service';
import { CustomVariableSeedingService } from './custom-variable-seeding.service';
import { SubAgentSeedingService } from './sub-agent-seeding.service';
import { ContextSnippetSeedingService } from './context-snippet-seeding.service';
 
@Injectable()
export class SeedingService {
  private readonly logger = new Logger(SeedingService.name);
 
  constructor(
    private readonly systemPromptSeedingService: SystemPromptSeedingService,
    private readonly contextTemplateSeedingService: ContextTemplateSeedingService,
    private readonly customSnippetSeedingService: CustomSnippetSeedingService,
    private readonly mcpConfigSeedingService: McpConfigSeedingService,
    private readonly customVariableSeedingService: CustomVariableSeedingService,
    private readonly subAgentSeedingService: SubAgentSeedingService,
    private readonly contextSnippetSeedingService: ContextSnippetSeedingService,
  ) {}
 
  async seed() {
    await this.systemPromptSeedingService.seed();
    await this.contextTemplateSeedingService.seed();
    await this.customSnippetSeedingService.seed();
    await this.mcpConfigSeedingService.seed();
    await this.customVariableSeedingService.seed();
    await this.subAgentSeedingService.seed();
    await this.contextSnippetSeedingService.seed();
    this.logger.log('Seeding complete.');
  }
}