namecheap / node-vault-client

A Vault Client implemented in pure javascript for HashiCorp Vault
Apache License 2.0
22 stars 21 forks source link

Blinking input cursor after running read #31

Open mgbell opened 1 year ago

mgbell commented 1 year ago

Hi there,

I'm very likely missing something obvious by staring at this for too long (and I am new to using Vault and AWS), however I've got an issue with using this library I can't figure out. I'm able to successfully connect to Vault and read a secret, however after running my script, the console.log returns the values I need, but I'm then left with a blinking cursor to suggest further input is required. The only way for me to then exit is to hit CTRL + C:


const vaultClient = VaultClient.boot('main', {
    api: { url: 'redacted' },
    auth: {
        type: 'iam',
        config: { role: 'redacted' }
    },
});

vaultClient.read('secret/path').then(result => {
    return result;
});
.catch(e => console.error(e)); 

I've tried using return instead of console.log, but I can't seem to get it working. All I need is to get the value from __data out of the response returned. Any help on this likely very-stupid-on-my-part issue would be much appreciated! req

mgbell commented 1 year ago

I know this isn't a priority issue but any thoughts/input on this when possible would be great, thanks in advance.