Skip to content

Commit

Permalink
feat: remove useFactories helper method (#29)
Browse files Browse the repository at this point in the history
BREAKING CHANGE This method will no longer be available as is useless in new architecture
  • Loading branch information
jorgebodega committed Dec 20, 2021
1 parent c030e89 commit 6fbeaba
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 77 deletions.
10 changes: 0 additions & 10 deletions src/commands/seed.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Arguments, Argv, CommandModule, exit } from 'yargs'
import ora, { Ora } from 'ora'
import { gray } from 'chalk'
import { configureConnection, fetchConnection } from '../connection'
import { useFactories } from '../useFactories'
import { Seeder } from '../seeder'
import { useSeeders } from '../useSeeders'
import { runSeeder } from '../runSeeder'
Expand Down Expand Up @@ -58,15 +57,6 @@ export class SeedCommand implements CommandModule {
panic(spinner, error as Error, 'Could not load the config file!')
}

// Find all factories and seed with help of the config
spinner.start('Importing Factories')
try {
await useFactories()
spinner.succeed('Factories are imported')
} catch (error) {
panic(spinner, error as Error, 'Could not import factories!')
}

// Show seeds in the console
spinner.start('Importing Seeders')
let seeders: Seeder[] = []
Expand Down
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ export * from './factoriesMap'
export * from './runSeeder'
export * from './seeder'
export * from './types'
export * from './useFactories'
export * from './useSeeders'
30 changes: 0 additions & 30 deletions src/useFactories.ts

This file was deleted.

12 changes: 0 additions & 12 deletions test/useFactories/useFactoriesWithError.test.ts

This file was deleted.

12 changes: 0 additions & 12 deletions test/useFactories/useFactoriesWithMultipleFactories.test.ts

This file was deleted.

12 changes: 0 additions & 12 deletions test/useFactories/useFactoriesWithSingleFactorie.test.ts

This file was deleted.

0 comments on commit 6fbeaba

Please sign in to comment.