@mikro-orm/seeder 7.0.2-dev.13 → 7.0.2-dev.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Factory.d.ts +1 -0
- package/Factory.js +1 -0
- package/SeedManager.d.ts +1 -0
- package/SeedManager.js +1 -0
- package/Seeder.d.ts +1 -0
- package/Seeder.js +1 -0
- package/package.json +2 -2
package/Factory.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { EntityData, EntityManager, Constructor } from '@mikro-orm/core';
|
|
2
|
+
/** Base class for entity factories used in seeding. Provides methods to create and persist test entities. */
|
|
2
3
|
export declare abstract class Factory<TEntity extends object, TInput = EntityData<TEntity>> {
|
|
3
4
|
protected readonly em: EntityManager;
|
|
4
5
|
abstract readonly model: Constructor<TEntity>;
|
package/Factory.js
CHANGED
package/SeedManager.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type Constructor, type EntityManager, type ISeedManager, type MikroORM } from '@mikro-orm/core';
|
|
2
2
|
import type { Seeder } from './Seeder.js';
|
|
3
|
+
/** Manages discovery and execution of database seeders. */
|
|
3
4
|
export declare class SeedManager implements ISeedManager {
|
|
4
5
|
#private;
|
|
5
6
|
constructor(em: EntityManager);
|
package/SeedManager.js
CHANGED
package/Seeder.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Dictionary, EntityManager } from '@mikro-orm/core';
|
|
2
|
+
/** Base class for database seeders. Extend this class and implement `run()` to populate the database with data. */
|
|
2
3
|
export declare abstract class Seeder<T extends Dictionary = Dictionary> {
|
|
3
4
|
abstract run(em: EntityManager, context?: T): void | Promise<void>;
|
|
4
5
|
protected call(em: EntityManager, seeders: {
|
package/Seeder.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/seeder",
|
|
3
|
-
"version": "7.0.2-dev.
|
|
3
|
+
"version": "7.0.2-dev.14",
|
|
4
4
|
"description": "Seeder package for MikroORM.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data-mapper",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@mikro-orm/core": "^7.0.1"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@mikro-orm/core": "7.0.2-dev.
|
|
54
|
+
"@mikro-orm/core": "7.0.2-dev.14"
|
|
55
55
|
},
|
|
56
56
|
"engines": {
|
|
57
57
|
"node": ">= 22.17.0"
|