@heroku/heroku-cli-util 9.1.3-beta.7 → 9.1.3-beta.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/index.d.ts CHANGED
@@ -4,6 +4,7 @@ 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
6
  import { getPsqlConfigs, sshTunnel } from './utils/pg/bastion';
7
+ import { getConfigVarNameFromAttachment } from './utils/pg/config-vars';
7
8
  import DatabaseResolver from './utils/pg/databases';
8
9
  import getHost from './utils/pg/host';
9
10
  import PsqlService from './utils/pg/psql';
@@ -41,6 +42,7 @@ export declare const utils: {
41
42
  host: typeof getHost;
42
43
  psql: {
43
44
  exec(connectionDetails: ConnectionDetailsWithAttachment, query: string, psqlCmdArgs?: string[]): Promise<string>;
45
+ getConfigVarNameFromAttachment: typeof getConfigVarNameFromAttachment;
44
46
  getPsqlConfigs: typeof getPsqlConfigs;
45
47
  sshTunnel: typeof sshTunnel;
46
48
  };
package/dist/index.js CHANGED
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const ambiguous_1 = require("./errors/ambiguous");
6
6
  const not_found_1 = require("./errors/not-found");
7
7
  const bastion_1 = require("./utils/pg/bastion");
8
+ const config_vars_1 = require("./utils/pg/config-vars");
8
9
  const databases_1 = tslib_1.__importDefault(require("./utils/pg/databases"));
9
10
  const host_1 = tslib_1.__importDefault(require("./utils/pg/host"));
10
11
  const psql_1 = tslib_1.__importDefault(require("./utils/pg/psql"));
@@ -47,6 +48,7 @@ exports.utils = {
47
48
  const psqlService = new psql_1.default(connectionDetails);
48
49
  return psqlService.execQuery(query, psqlCmdArgs);
49
50
  },
51
+ getConfigVarNameFromAttachment: config_vars_1.getConfigVarNameFromAttachment,
50
52
  getPsqlConfigs: bastion_1.getPsqlConfigs,
51
53
  sshTunnel: bastion_1.sshTunnel,
52
54
  },
@@ -57,7 +57,7 @@ export default class DatabaseResolver {
57
57
  * @param config - The record of app config vars with their values
58
58
  * @returns Connection details with attachment information
59
59
  */
60
- private getConnectionDetails;
60
+ getConnectionDetails(attachment: ExtendedAddonAttachment, config?: Record<string, string>): ConnectionDetailsWithAttachment;
61
61
  /**
62
62
  * Helper function that attempts to find a single addon attachment matching the given database identifier
63
63
  * (attachment name, id, or config var name).
@@ -130,6 +130,7 @@ class DatabaseResolver {
130
130
  * @param config - The record of app config vars with their values
131
131
  * @returns Connection details with attachment information
132
132
  */
133
+ // eslint-disable-next-line perfectionist/sort-classes
133
134
  getConnectionDetails(attachment, config = {}) {
134
135
  const connStringVar = (0, config_vars_1.getConfigVarNameFromAttachment)(attachment, config);
135
136
  // build the default payload for non-bastion dbs
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heroku/heroku-cli-util",
3
- "version": "9.1.3-beta.7",
3
+ "version": "9.1.3-beta.9",
4
4
  "description": "Set of helpful CLI utilities",
5
5
  "author": "Heroku",
6
6
  "license": "ISC",