@mikro-orm/migrations-mongodb 6.4.5-dev.6 → 6.4.5-dev.7
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/MigrationGenerator.d.ts +2 -2
- package/MigrationGenerator.js +1 -1
- package/package.json +3 -3
package/MigrationGenerator.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type IMigrationGenerator, type MigrationsOptions, type NamingStrategy } from '@mikro-orm/core';
|
|
1
|
+
import { type IMigrationGenerator, type MaybePromise, type MigrationsOptions, type NamingStrategy } from '@mikro-orm/core';
|
|
2
2
|
import type { MongoDriver } from '@mikro-orm/mongodb';
|
|
3
3
|
export declare abstract class MigrationGenerator implements IMigrationGenerator {
|
|
4
4
|
protected readonly driver: MongoDriver;
|
|
@@ -22,5 +22,5 @@ export declare abstract class MigrationGenerator implements IMigrationGenerator
|
|
|
22
22
|
abstract generateMigrationFile(className: string, diff: {
|
|
23
23
|
up: string[];
|
|
24
24
|
down: string[];
|
|
25
|
-
}): string
|
|
25
|
+
}): MaybePromise<string>;
|
|
26
26
|
}
|
package/MigrationGenerator.js
CHANGED
|
@@ -24,7 +24,7 @@ class MigrationGenerator {
|
|
|
24
24
|
const timestamp = new Date().toISOString().replace(/[-T:]|\.\d{3}z$/ig, '');
|
|
25
25
|
const className = this.namingStrategy.classToMigrationName(timestamp, name);
|
|
26
26
|
const fileName = `${this.options.fileName(timestamp, name)}.${this.options.emit}`;
|
|
27
|
-
const ret = this.generateMigrationFile(className, diff);
|
|
27
|
+
const ret = await this.generateMigrationFile(className, diff);
|
|
28
28
|
await (0, fs_extra_1.writeFile)(path + '/' + fileName, ret, { flush: true });
|
|
29
29
|
return [ret, fileName];
|
|
30
30
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/migrations-mongodb",
|
|
3
|
-
"version": "6.4.5-dev.
|
|
3
|
+
"version": "6.4.5-dev.7",
|
|
4
4
|
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.mjs",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@mikro-orm/mongodb": "6.4.5-dev.
|
|
61
|
+
"@mikro-orm/mongodb": "6.4.5-dev.7",
|
|
62
62
|
"fs-extra": "11.3.0",
|
|
63
63
|
"mongodb": "6.12.0",
|
|
64
64
|
"umzug": "3.8.2"
|
|
@@ -67,6 +67,6 @@
|
|
|
67
67
|
"@mikro-orm/core": "^6.4.4"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
|
-
"@mikro-orm/core": "6.4.5-dev.
|
|
70
|
+
"@mikro-orm/core": "6.4.5-dev.7"
|
|
71
71
|
}
|
|
72
72
|
}
|