@orion-js/migrations 3.12.0 → 3.13.1

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/dist/index.d.ts DELETED
@@ -1,39 +0,0 @@
1
- // Generated by dts-bundle-generator v9.5.1
2
-
3
- import { ExecutionContext } from '@orion-js/dogs';
4
- import { Collection } from '@orion-js/mongodb';
5
-
6
- export type MigrationId = `scnmg-${string}`;
7
- export declare class MigrationSchema {
8
- _id: MigrationId;
9
- name: string;
10
- completedAt: Date;
11
- }
12
- export declare class MigrationsRepo {
13
- collection: Collection<MigrationSchema>;
14
- getCompletedMigrationNames(): Promise<string[]>;
15
- saveCompletedMigration(name: string): Promise<void>;
16
- }
17
- export interface Options {
18
- lockTime?: number;
19
- omitJob?: boolean;
20
- }
21
- export declare function loadMigrations(migrationServices: any[], options?: Options): MigrationExecutable[];
22
- export interface MigrationServiceOptions {
23
- name: string;
24
- useMongoTransactions: false;
25
- }
26
- export declare function MigrationService(options: MigrationServiceOptions): ClassDecorator;
27
- export type MigrationExecutable = {
28
- runMigration(context: ExecutionContext): Promise<void>;
29
- } & MigrationServiceOptions;
30
- export declare function getMigrationsFromServices(services: any[]): MigrationExecutable[];
31
- export declare class MigrationsService {
32
- private migrationsRepo;
33
- getNextMigration(migrationsList: MigrationExecutable[]): Promise<MigrationExecutable>;
34
- runMigrations(migrationsList: MigrationExecutable[], context: ExecutionContext): Promise<void>;
35
- runMigration(func: (context: ExecutionContext) => Promise<void>, context: ExecutionContext): Promise<void>;
36
- runAsTransaction(func: (context: ExecutionContext) => Promise<void>, context: ExecutionContext): Promise<void>;
37
- }
38
-
39
- export {};