Open simon-tannai opened 3 months ago
In the other hand, it's working well when I'm importing manually all the entities and factories:
private readonly options: DataSourceOptions & SeederOptions = {
...databaseConfig,
entities: [
MyFirstEntity,
[...]
MySecondEntity,
],
factories: [
MyFirstFactory,
[...]
MySecondFactory,
],
seeds: [MainSeeder],
}
+1
Can you please provide a repository for reproduction.
Versions
Reproduction
Additional Details
Commands: ```JSON { "cli": "node ./dist/apps/cli/main", "cli:dev": "ts-node ./apps/cli/src/main" } ``` Datasource: ```typescript private readonly options: DataSourceOptions & SeederOptions = { ...databaseConfig, factories: [join(__dirname, '..', '..', '..', '..', 'apps', 'my-app', 'src', '**', '*.factory{.ts,.js}')], seeds: [MainSeeder], } ```Steps to reproduce
I'm using
nest-commander
to create a CLI application to seed a database into a production-like environment.In dev' env', the seeding is working well. But in production-like env' (after TS build), it's not working.
It looks typeorm-extension is not working without
ts-node
?What is Expected?
Running seeds into production-like environment without
ts-node
.What is actually happening?