@certd/midway-flyway-js 1.38.8 → 1.38.9

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/flyway.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { QueryRunner } from 'typeorm';
2
+ export declare function setFlywayLogger(logger: any): void;
2
3
  export declare class Flyway {
3
4
  scriptDir: any;
4
5
  flywayTableName: any;
package/dist/flyway.js CHANGED
@@ -28,6 +28,11 @@ const DefaultLogger = {
28
28
  console.error(args);
29
29
  },
30
30
  };
31
+ let customLogger = null;
32
+ export function setFlywayLogger(logger) {
33
+ customLogger = logger;
34
+ }
35
+ ;
31
36
  export class Flyway {
32
37
  scriptDir;
33
38
  flywayTableName;
@@ -40,7 +45,7 @@ export class Flyway {
40
45
  this.flywayTableName = opts.flywayTableName ?? 'flyway_history';
41
46
  this.baseline = opts.baseline ?? false;
42
47
  this.allowHashNotMatch = opts.allowHashNotMatch ?? false;
43
- this.logger = opts.logger || DefaultLogger;
48
+ this.logger = customLogger || opts.logger || DefaultLogger;
44
49
  this.connection = opts.connection;
45
50
  }
46
51
  async run(ignores) {
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export { FlywayConfiguration as Configuration } from './configuration.js';
2
- export { Flyway } from './flyway.js';
2
+ export { Flyway, setFlywayLogger } from './flyway.js';
3
3
  export { FlywayHistory } from './entity.js';
package/dist/index.js CHANGED
@@ -1,6 +1,3 @@
1
- // src/index.ts
2
1
  export { FlywayConfiguration as Configuration } from './configuration.js';
3
- // eslint-disable-next-line node/no-unpublished-import
4
- export { Flyway } from './flyway.js';
5
- // eslint-disable-next-line node/no-unpublished-import
2
+ export { Flyway, setFlywayLogger } from './flyway.js';
6
3
  export { FlywayHistory } from './entity.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@certd/midway-flyway-js",
3
- "version": "1.38.8",
3
+ "version": "1.38.9",
4
4
  "description": "midway with flyway, sql upgrade way ",
5
5
  "private": false,
6
6
  "type": "module",
@@ -46,5 +46,5 @@
46
46
  "typeorm": "^0.3.11",
47
47
  "typescript": "^5.4.2"
48
48
  },
49
- "gitHead": "4fda6cbcde3d398d7f4dc3ee7e8ea90e691098db"
49
+ "gitHead": "b30cb5d7dc8311af4863da7dc8781f7264ba0545"
50
50
  }