@mikro-orm/migrations-mongodb 7.0.2-dev.13 → 7.0.2-dev.15

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.
@@ -1,4 +1,5 @@
1
1
  import { MigrationGenerator } from './MigrationGenerator.js';
2
+ /** Generates MongoDB migration files in CommonJS JavaScript format. */
2
3
  export declare class JSMigrationGenerator extends MigrationGenerator {
3
4
  /**
4
5
  * @inheritDoc
@@ -1,4 +1,5 @@
1
1
  import { MigrationGenerator } from './MigrationGenerator.js';
2
+ /** Generates MongoDB migration files in CommonJS JavaScript format. */
2
3
  export class JSMigrationGenerator extends MigrationGenerator {
3
4
  /**
4
5
  * @inheritDoc
package/Migration.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import type { Configuration, Transaction, EntityName } from '@mikro-orm/core';
2
2
  import type { MongoDriver } from '@mikro-orm/mongodb';
3
3
  import type { Collection, ClientSession, Document, Db } from 'mongodb';
4
+ /** Base class for MongoDB migrations. Extend this class and implement `up()` (and optionally `down()`). */
4
5
  export declare abstract class Migration {
5
6
  protected readonly driver: MongoDriver;
6
7
  protected readonly config: Configuration;
package/Migration.js CHANGED
@@ -1,3 +1,4 @@
1
+ /** Base class for MongoDB migrations. Extend this class and implement `up()` (and optionally `down()`). */
1
2
  export class Migration {
2
3
  driver;
3
4
  config;
@@ -1,5 +1,6 @@
1
1
  import { type IMigrationGenerator, type MaybePromise, type MigrationsOptions, type NamingStrategy } from '@mikro-orm/core';
2
2
  import type { MongoDriver } from '@mikro-orm/mongodb';
3
+ /** Base class for generating MongoDB migration source files. */
3
4
  export declare abstract class MigrationGenerator implements IMigrationGenerator {
4
5
  protected readonly driver: MongoDriver;
5
6
  protected readonly namingStrategy: NamingStrategy;
@@ -1,3 +1,4 @@
1
+ /** Base class for generating MongoDB migration source files. */
1
2
  export class MigrationGenerator {
2
3
  driver;
3
4
  namingStrategy;
@@ -1,6 +1,7 @@
1
1
  import type { MigrationsOptions, Transaction } from '@mikro-orm/core';
2
2
  import type { MongoDriver } from '@mikro-orm/mongodb';
3
3
  import type { Migration } from './Migration.js';
4
+ /** Executes individual MongoDB migration files within optional transaction contexts. */
4
5
  export declare class MigrationRunner {
5
6
  protected readonly driver: MongoDriver;
6
7
  protected readonly options: MigrationsOptions;
@@ -1,3 +1,4 @@
1
+ /** Executes individual MongoDB migration files within optional transaction contexts. */
1
2
  export class MigrationRunner {
2
3
  driver;
3
4
  options;
@@ -1,6 +1,7 @@
1
1
  import { type EntitySchema, type MigrationsOptions, type Transaction } from '@mikro-orm/core';
2
2
  import type { MongoDriver } from '@mikro-orm/mongodb';
3
3
  import type { MigrationRow } from './typings.js';
4
+ /** Tracks executed MongoDB migrations in a collection. */
4
5
  export declare class MigrationStorage {
5
6
  protected readonly driver: MongoDriver;
6
7
  protected readonly options: MigrationsOptions;
@@ -1,4 +1,5 @@
1
1
  import { defineEntity, p, } from '@mikro-orm/core';
2
+ /** Tracks executed MongoDB migrations in a collection. */
2
3
  export class MigrationStorage {
3
4
  driver;
4
5
  options;
package/Migrator.d.ts CHANGED
@@ -3,6 +3,7 @@ import { AbstractMigrator } from '@mikro-orm/core/migrations';
3
3
  import type { MongoDriver } from '@mikro-orm/mongodb';
4
4
  import { MigrationStorage } from './MigrationStorage.js';
5
5
  import type { MigrationResult } from './typings.js';
6
+ /** Manages MongoDB migrations: creation, execution, and rollback. */
6
7
  export declare class Migrator extends AbstractMigrator<MongoDriver> {
7
8
  static register(orm: MikroORM): void;
8
9
  protected createRunner(): IMigrationRunner;
package/Migrator.js CHANGED
@@ -3,6 +3,7 @@ import { MigrationRunner } from './MigrationRunner.js';
3
3
  import { MigrationStorage } from './MigrationStorage.js';
4
4
  import { TSMigrationGenerator } from './TSMigrationGenerator.js';
5
5
  import { JSMigrationGenerator } from './JSMigrationGenerator.js';
6
+ /** Manages MongoDB migrations: creation, execution, and rollback. */
6
7
  export class Migrator extends AbstractMigrator {
7
8
  static register(orm) {
8
9
  orm.config.registerExtension('@mikro-orm/migrator', () => new Migrator(orm.em));
@@ -1,4 +1,5 @@
1
1
  import { MigrationGenerator } from './MigrationGenerator.js';
2
+ /** Generates MongoDB migration files in TypeScript format. */
2
3
  export declare class TSMigrationGenerator extends MigrationGenerator {
3
4
  /**
4
5
  * @inheritDoc
@@ -1,4 +1,5 @@
1
1
  import { MigrationGenerator } from './MigrationGenerator.js';
2
+ /** Generates MongoDB migration files in TypeScript format. */
2
3
  export class TSMigrationGenerator extends MigrationGenerator {
3
4
  /**
4
5
  * @inheritDoc
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/migrations-mongodb",
3
- "version": "7.0.2-dev.13",
3
+ "version": "7.0.2-dev.15",
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
  "keywords": [
6
6
  "data-mapper",
@@ -47,14 +47,14 @@
47
47
  "copy": "node ../../scripts/copy.mjs"
48
48
  },
49
49
  "dependencies": {
50
- "@mikro-orm/mongodb": "7.0.2-dev.13",
50
+ "@mikro-orm/mongodb": "7.0.2-dev.15",
51
51
  "mongodb": "7.1.0"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@mikro-orm/core": "^7.0.1"
55
55
  },
56
56
  "peerDependencies": {
57
- "@mikro-orm/core": "7.0.2-dev.13"
57
+ "@mikro-orm/core": "7.0.2-dev.15"
58
58
  },
59
59
  "engines": {
60
60
  "node": ">= 22.17.0"