@squiz/db-lib 1.21.1-alpha.34 → 1.21.1-alpha.39

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,36 +2,36 @@
2
2
  1 info using npm@9.5.0
3
3
  2 info using node@v18.15.0
4
4
  3 timing npm:load:whichnode Completed in 1ms
5
- 4 timing config:load:defaults Completed in 2ms
6
- 5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 1ms
7
- 6 timing config:load:builtin Completed in 1ms
5
+ 4 timing config:load:defaults Completed in 3ms
6
+ 5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 0ms
7
+ 6 timing config:load:builtin Completed in 0ms
8
8
  7 timing config:load:cli Completed in 2ms
9
9
  8 timing config:load:env Completed in 2ms
10
10
  9 info found workspace root at /builds/developer-experience/cmp
11
11
  10 timing config:load:file:/builds/developer-experience/cmp/.npmrc Completed in 0ms
12
- 11 timing config:load:project Completed in 21ms
12
+ 11 timing config:load:project Completed in 20ms
13
13
  12 timing config:load:file:/root/.npmrc Completed in 1ms
14
14
  13 timing config:load:user Completed in 1ms
15
15
  14 timing config:load:file:/usr/local/etc/npmrc Completed in 1ms
16
16
  15 timing config:load:global Completed in 1ms
17
17
  16 timing config:load:setEnvs Completed in 1ms
18
- 17 timing config:load Completed in 31ms
19
- 18 timing npm:load:configload Completed in 31ms
18
+ 17 timing config:load Completed in 30ms
19
+ 18 timing npm:load:configload Completed in 30ms
20
20
  19 timing npm:load:mkdirpcache Completed in 0ms
21
21
  20 timing npm:load:mkdirplogs Completed in 1ms
22
22
  21 verbose title npm run compile
23
23
  22 verbose argv "run" "compile" "--"
24
24
  23 timing npm:load:setTitle Completed in 1ms
25
- 24 timing config:load:flatten Completed in 4ms
26
- 25 timing npm:load:display Completed in 5ms
27
- 26 verbose logfile logs-max:10 dir:/builds/developer-experience/cmp/packages/db-lib/.npm/_logs/2023-03-22T06_38_29_003Z-
28
- 27 verbose logfile /builds/developer-experience/cmp/packages/db-lib/.npm/_logs/2023-03-22T06_38_29_003Z-debug-0.log
25
+ 24 timing config:load:flatten Completed in 5ms
26
+ 25 timing npm:load:display Completed in 6ms
27
+ 26 verbose logfile logs-max:10 dir:/builds/developer-experience/cmp/packages/db-lib/.npm/_logs/2023-03-23T06_44_53_424Z-
28
+ 27 verbose logfile /builds/developer-experience/cmp/packages/db-lib/.npm/_logs/2023-03-23T06_44_53_424Z-debug-0.log
29
29
  28 timing npm:load:logFile Completed in 3ms
30
- 29 timing npm:load:timers Completed in 0ms
30
+ 29 timing npm:load:timers Completed in 1ms
31
31
  30 timing npm:load:configScope Completed in 0ms
32
- 31 timing npm:load Completed in 44ms
32
+ 31 timing npm:load Completed in 43ms
33
33
  32 silly logfile done cleaning log files
34
- 33 timing command:run Completed in 2715ms
34
+ 33 timing command:run Completed in 3440ms
35
35
  34 verbose exit 0
36
- 35 timing npm Completed in 2773ms
36
+ 35 timing npm Completed in 3495ms
37
37
  36 info ok
package/lib/Migrator.d.ts CHANGED
@@ -1,4 +1,8 @@
1
1
  import { PoolClient } from 'pg';
2
+ import { Logger } from '@squiz/dx-logger-lib';
3
+ export type Migration = {
4
+ (db: PoolClient, logger: Logger): Promise<void>;
5
+ };
2
6
  export declare class Migrator {
3
7
  protected migrationDir: string;
4
8
  protected migrationList: string[];
package/lib/index.d.ts CHANGED
@@ -4,4 +4,4 @@ export * from './Migrator';
4
4
  export * from './Repositories';
5
5
  export * from './getConnectionInfo';
6
6
  export * from './PostgresErrorCodes';
7
- export { Pool } from 'pg';
7
+ export { Pool, PoolClient } from 'pg';
package/lib/index.js CHANGED
@@ -14744,7 +14744,7 @@ var require_logger = __commonJS({
14744
14744
  var { warn } = require_common();
14745
14745
  var config = require_config2();
14746
14746
  var formatRegExp = /%[scdjifoO%]/g;
14747
- var Logger = class extends Transform {
14747
+ var Logger2 = class extends Transform {
14748
14748
  /**
14749
14749
  * Constructor function for the Logger object responsible for persisting log
14750
14750
  * messages and metadata to one or more transports.
@@ -15240,7 +15240,7 @@ var require_logger = __commonJS({
15240
15240
  }
15241
15241
  return value;
15242
15242
  }
15243
- Object.defineProperty(Logger.prototype, "transports", {
15243
+ Object.defineProperty(Logger2.prototype, "transports", {
15244
15244
  configurable: false,
15245
15245
  enumerable: true,
15246
15246
  get() {
@@ -15248,7 +15248,7 @@ var require_logger = __commonJS({
15248
15248
  return !Array.isArray(pipes) ? [pipes].filter(Boolean) : pipes;
15249
15249
  }
15250
15250
  });
15251
- module2.exports = Logger;
15251
+ module2.exports = Logger2;
15252
15252
  }
15253
15253
  });
15254
15254
 
@@ -15258,14 +15258,14 @@ var require_create_logger = __commonJS({
15258
15258
  "use strict";
15259
15259
  var { LEVEL } = require_triple_beam();
15260
15260
  var config = require_config2();
15261
- var Logger = require_logger();
15261
+ var Logger2 = require_logger();
15262
15262
  var debug = require_node2()("winston:create-logger");
15263
15263
  function isLevelEnabledFunctionName(level) {
15264
15264
  return "is" + level.charAt(0).toUpperCase() + level.slice(1) + "Enabled";
15265
15265
  }
15266
15266
  module2.exports = function(opts = {}) {
15267
15267
  opts.levels = opts.levels || config.npm.levels;
15268
- class DerivedLogger extends Logger {
15268
+ class DerivedLogger extends Logger2 {
15269
15269
  /**
15270
15270
  * Create a new class derived logger for which the levels can be attached to
15271
15271
  * the prototype of. This is a V8 optimization that is well know to increase
@@ -35229,6 +35229,7 @@ __export(src_exports, {
35229
35229
  DEFAULT_PAGE_SIZE: () => DEFAULT_PAGE_SIZE,
35230
35230
  Migrator: () => Migrator,
35231
35231
  Pool: () => import_pg2.Pool,
35232
+ PoolClient: () => import_pg2.PoolClient,
35232
35233
  PostgresErrorCode: () => PostgresErrorCode,
35233
35234
  getConnectionInfo: () => getConnectionInfo
35234
35235
  });
@@ -35913,6 +35914,7 @@ var import_pg2 = __toESM(require_lib2());
35913
35914
  DEFAULT_PAGE_SIZE,
35914
35915
  Migrator,
35915
35916
  Pool,
35917
+ PoolClient,
35916
35918
  PostgresErrorCode,
35917
35919
  getConnectionInfo
35918
35920
  });