@openstax/ts-utils 1.21.0 → 1.21.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.
@@ -1,6 +1,6 @@
1
- import { ConfigProviderForConfig } from '../../config';
2
1
  import postgres, { Sql } from 'postgres';
3
- import type { Logger } from "../logger";
2
+ import { ConfigProviderForConfig } from '../../config';
3
+ import type { Logger } from '../logger';
4
4
  declare type Config = {
5
5
  host: string;
6
6
  readHost: string;
@@ -28,7 +28,7 @@ export declare const postgresConnection: <C extends string = "local">(initialize
28
28
  down: () => Promise<void[]>;
29
29
  };
30
30
  export declare type PostgresConnection = ReturnType<ReturnType<ReturnType<typeof postgresConnection>>>;
31
- interface Migration {
31
+ export interface Migration {
32
32
  name: string;
33
33
  up: (db: Sql) => Promise<void>;
34
34
  }
@@ -4,11 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.postgresConnection = void 0;
7
- const helpers_1 = require("../../misc/helpers");
7
+ const postgres_1 = __importDefault(require("postgres"));
8
+ const assertions_1 = require("../../assertions");
8
9
  const config_1 = require("../../config");
9
10
  const guards_1 = require("../../guards");
10
- const assertions_1 = require("../../assertions");
11
- const postgres_1 = __importDefault(require("postgres"));
11
+ const helpers_1 = require("../../misc/helpers");
12
12
  const postgresConnection = (initializer) => (configProvider) => {
13
13
  const config = configProvider[(0, guards_1.ifDefined)(initializer.configSpace, 'local')];
14
14
  const host = (0, helpers_1.once)(() => (0, config_1.resolveConfigValue)(config.host));