@heroku/heroku-cli-util 9.1.3-beta.2 → 9.1.3-beta.4

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 CHANGED
@@ -3,6 +3,7 @@ import { AmbiguousError } from './errors/ambiguous';
3
3
  import { NotFound } from './errors/not-found';
4
4
  import { AddOnWithRelatedData, ExtendedAddonAttachment, Link } from './types/pg/data-api';
5
5
  import { ConnectionDetails, ConnectionDetailsWithAttachment, TunnelConfig } from './types/pg/tunnel';
6
+ import { getPsqlConfigs } from './utils/pg/bastion';
6
7
  import DatabaseResolver from './utils/pg/databases';
7
8
  import getHost from './utils/pg/host';
8
9
  import PsqlService from './utils/pg/psql';
@@ -15,11 +16,6 @@ import { table } from './ux/table';
15
16
  import { wait } from './ux/wait';
16
17
  export type { AddOnWithRelatedData, ExtendedAddonAttachment, Link, } from './types/pg/data-api';
17
18
  export type { ConnectionDetails, ConnectionDetailsWithAttachment, TunnelConfig, } from './types/pg/tunnel';
18
- export declare const pg: {
19
- DatabaseResolver: typeof DatabaseResolver;
20
- PsqlService: typeof PsqlService;
21
- getHost: typeof getHost;
22
- };
23
19
  /** @deprecated Use direct type imports instead */
24
20
  export declare const types: {
25
21
  pg: {
@@ -37,12 +33,15 @@ export declare const utils: {
37
33
  NotFound: typeof NotFound;
38
34
  };
39
35
  pg: {
36
+ DatabaseResolver: typeof DatabaseResolver;
37
+ PsqlService: typeof PsqlService;
40
38
  fetcher: {
41
39
  database(heroku: APIClient, appId: string, attachmentId?: string, namespace?: string): Promise<ConnectionDetailsWithAttachment>;
42
40
  };
43
41
  host: typeof getHost;
44
42
  psql: {
45
43
  exec(connectionDetails: ConnectionDetailsWithAttachment, query: string, psqlCmdArgs?: string[]): Promise<string>;
44
+ getPsqlConfigs: typeof getPsqlConfigs;
46
45
  };
47
46
  };
48
47
  };
package/dist/index.js CHANGED
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.hux = exports.utils = exports.types = exports.pg = void 0;
3
+ exports.hux = exports.utils = exports.types = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const ambiguous_1 = require("./errors/ambiguous");
6
6
  const not_found_1 = require("./errors/not-found");
7
+ const bastion_1 = require("./utils/pg/bastion");
7
8
  const databases_1 = tslib_1.__importDefault(require("./utils/pg/databases"));
8
9
  const host_1 = tslib_1.__importDefault(require("./utils/pg/host"));
9
10
  const psql_1 = tslib_1.__importDefault(require("./utils/pg/psql"));
@@ -14,12 +15,6 @@ const styled_json_1 = require("./ux/styled-json");
14
15
  const styled_object_1 = require("./ux/styled-object");
15
16
  const table_1 = require("./ux/table");
16
17
  const wait_1 = require("./ux/wait");
17
- // Export PG classes and functions for direct import
18
- exports.pg = {
19
- DatabaseResolver: databases_1.default,
20
- PsqlService: psql_1.default,
21
- getHost: host_1.default,
22
- };
23
18
  // Keep const types for backward compatibility (deprecated)
24
19
  /** @deprecated Use direct type imports instead */
25
20
  exports.types = {
@@ -38,6 +33,8 @@ exports.utils = {
38
33
  NotFound: not_found_1.NotFound, // This should be NotFoundError for consistency, but we're keeping it for backwards compatibility
39
34
  },
40
35
  pg: {
36
+ DatabaseResolver: databases_1.default,
37
+ PsqlService: psql_1.default,
41
38
  fetcher: {
42
39
  database(heroku, appId, attachmentId, namespace) {
43
40
  const databaseResolver = new databases_1.default(heroku);
@@ -50,6 +47,7 @@ exports.utils = {
50
47
  const psqlService = new psql_1.default(connectionDetails);
51
48
  return psqlService.execQuery(query, psqlCmdArgs);
52
49
  },
50
+ getPsqlConfigs: bastion_1.getPsqlConfigs,
53
51
  },
54
52
  },
55
53
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heroku/heroku-cli-util",
3
- "version": "9.1.3-beta.2",
3
+ "version": "9.1.3-beta.4",
4
4
  "description": "Set of helpful CLI utilities",
5
5
  "author": "Heroku",
6
6
  "license": "ISC",