@govuk-pay/cli 0.0.34 → 0.0.36
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/package.json
CHANGED
|
@@ -4,7 +4,7 @@ exports.handler = exports.builder = exports.desc = exports.command = void 0;
|
|
|
4
4
|
const node_child_process_1 = require("node:child_process");
|
|
5
5
|
const totp_generator_1 = require("totp-generator");
|
|
6
6
|
const standardContent_1 = require("../../../core/standardContent");
|
|
7
|
-
exports.command = '
|
|
7
|
+
exports.command = 'otp <key>';
|
|
8
8
|
exports.desc = 'Create otp code';
|
|
9
9
|
const builder = (yargs) => {
|
|
10
10
|
return yargs.positional('key', {
|
package/src/commands/tunnel.js
CHANGED
|
@@ -366,15 +366,15 @@ async function printHowToTunnelText(application, environment, dbEngineVersion, d
|
|
|
366
366
|
const paySecretsPasswordName = getPaySecretsPasswordName(dbAccessType);
|
|
367
367
|
printGreen(`\nConnected tunnel to ${application} RDS database in ${environment} on port 65432\n`);
|
|
368
368
|
printGreen('Copy DB credentials to clipboard (in another window) using pay-low-pass:');
|
|
369
|
-
printGreen(`
|
|
369
|
+
printGreen(` pay-low-pass ${payLowPassDbSecretName} | pbcopy`);
|
|
370
370
|
printGreen('Alternatively, fetch credentials from pay secrets:');
|
|
371
|
-
printGreen(`
|
|
371
|
+
printGreen(` pay secrets fetch ${environment} ${application} ${paySecretsPasswordName} | pbcopy`);
|
|
372
372
|
printGreen('Open psql with:');
|
|
373
|
-
printGreen(`
|
|
373
|
+
printGreen(` psql -h 127.0.0.1 -p 65432 -U ${dbUser} -d ${application}`);
|
|
374
374
|
printGreen('Alternatively connect using docker instead of needing psql installed locally and set the password automatically using pay-low-pass:');
|
|
375
|
-
printGreen(`
|
|
375
|
+
printGreen(` docker run --rm -ti postgres:${dbEngineVersion}-alpine psql --host docker.for.mac.localhost --port 65432 --user ${dbUser} --dbname ${application}`);
|
|
376
376
|
printGreen('Or even more conveniently connect using a docker container and set the password automatically using pay-low-pass:');
|
|
377
|
-
printGreen(`
|
|
377
|
+
printGreen(` docker run -e "PGPASSWORD=$(pay-low-pass ${payLowPassDbSecretName})" --rm -ti postgres:${dbEngineVersion}-alpine psql --host docker.for.mac.localhost --port 65432 --user ${dbUser} --dbname ${application}\n`);
|
|
378
378
|
}
|
|
379
379
|
async function getDbUser(environment, application, dbAccessType) {
|
|
380
380
|
let paramName;
|