@oliasoft-open-source/node-json-migrator 4.5.4 → 4.6.0-beta-2

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.cts CHANGED
@@ -23,6 +23,7 @@ type TMigration = {
23
23
  skippedFileHashes?: string[];
24
24
  sequenceFromHistory?: string;
25
25
  script?: string;
26
+ filePath?: string;
26
27
  migrator?: (payload: TPayload, metaData?: TMetaData) => TPayload;
27
28
  };
28
29
  type TRecordDetails = {
@@ -102,13 +103,16 @@ declare const getPlannedMigrations: ({ config }: {
102
103
  fileName: string;
103
104
  sequence: string;
104
105
  }[];
105
- plannedMigrations: TMigration[] & any[];
106
+ plannedMigrations: TMigration[] & {
107
+ fileHash: string;
108
+ migrator: (...args: unknown[]) => unknown;
109
+ }[];
106
110
  nextVersion: string;
107
111
  }>;
108
112
 
109
113
  declare const getPlannedVersion: ({ config }: {
110
114
  config: any;
111
- }) => Promise<any>;
115
+ }) => Promise<string>;
112
116
 
113
117
  /**
114
118
  * Migrates a payload
@@ -144,8 +148,7 @@ declare const migrateAll: ({ config, beforeMigrateRecord, afterMigrateRecord, on
144
148
  * - lodash flow https://lodash.com/docs/4.17.15#flow
145
149
  *
146
150
  * Implementation includes exception handling to extend errors with the filename
147
- * until module-with-string fixes its stack trace handling (see OW-8879 and
148
- * https://github.com/exuanbo/module-from-string/issues/18)
151
+ * until native dynamic imports fix their stack trace handling (see OW-8879)
149
152
  */
150
153
  declare const pipe: (migrations: TMigration[], payload: TPayload, metaData?: TMetaData) => TPayload;
151
154
 
package/dist/index.d.mts CHANGED
@@ -23,6 +23,7 @@ type TMigration = {
23
23
  skippedFileHashes?: string[];
24
24
  sequenceFromHistory?: string;
25
25
  script?: string;
26
+ filePath?: string;
26
27
  migrator?: (payload: TPayload, metaData?: TMetaData) => TPayload;
27
28
  };
28
29
  type TRecordDetails = {
@@ -102,13 +103,16 @@ declare const getPlannedMigrations: ({ config }: {
102
103
  fileName: string;
103
104
  sequence: string;
104
105
  }[];
105
- plannedMigrations: TMigration[] & any[];
106
+ plannedMigrations: TMigration[] & {
107
+ fileHash: string;
108
+ migrator: (...args: unknown[]) => unknown;
109
+ }[];
106
110
  nextVersion: string;
107
111
  }>;
108
112
 
109
113
  declare const getPlannedVersion: ({ config }: {
110
114
  config: any;
111
- }) => Promise<any>;
115
+ }) => Promise<string>;
112
116
 
113
117
  /**
114
118
  * Migrates a payload
@@ -144,8 +148,7 @@ declare const migrateAll: ({ config, beforeMigrateRecord, afterMigrateRecord, on
144
148
  * - lodash flow https://lodash.com/docs/4.17.15#flow
145
149
  *
146
150
  * Implementation includes exception handling to extend errors with the filename
147
- * until module-with-string fixes its stack trace handling (see OW-8879 and
148
- * https://github.com/exuanbo/module-from-string/issues/18)
151
+ * until native dynamic imports fix their stack trace handling (see OW-8879)
149
152
  */
150
153
  declare const pipe: (migrations: TMigration[], payload: TPayload, metaData?: TMetaData) => TPayload;
151
154