diff --git a/package.json b/package.json index 4f62452..6adfe8f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "schluessel", - "version": "1.0.0", + "version": "1.0.1", "description": "Rails like credentials store for database passwords, API keys, etc. encrypted in your repository.", "type": "commonjs", "main": "index.js", diff --git a/src/cred.js b/src/cred.js index d48415f..5ecdf92 100644 --- a/src/cred.js +++ b/src/cred.js @@ -18,7 +18,7 @@ const loadKeyFromFile = () => { } const buffer = fs.readFileSync(files.keyFile); - if (!errors.test_base64.test(buffer.toString('ascii'))) { + if (!errors.testBase64.test(buffer.toString('ascii'))) { throw new errors.InvalidFormat(files.keyFile); } @@ -35,7 +35,7 @@ const loadKeyFromEnv = () => { if (typeof keyStr === 'undefined') { return undefined; } - if (!errors.test_base64.test(keyStr)) { + if (!errors.testBase64.test(keyStr)) { throw new errors.InvalidFormat(`NODE_MASTER_KEY = ${keyStr}`); } @@ -77,7 +77,7 @@ const loadVault = () => { } const buffer = fs.readFileSync(files.vaultFile); - if (!errors.test_base64.test(buffer.toString('ascii'))) { + if (!errors.testBase64.test(buffer.toString('ascii'))) { throw new errors.InvalidFormat(files.vaultFile); } diff --git a/src/error.js b/src/error.js index b168419..a5f7906 100644 --- a/src/error.js +++ b/src/error.js @@ -18,5 +18,5 @@ module.exports = { WrongKey, WrongKeysize, InvalidFormat, - test_base64: /^[0-9a-zA-Z/+=]+[\s]?$/, + testBase64: /^[0-9a-zA-Z/+=]+[\s]?$/, }; diff --git a/src/error/keyfile_not_found_error.js b/src/error/keyfile_not_found_error.js index 8c3ebdf..825cec4 100644 --- a/src/error/keyfile_not_found_error.js +++ b/src/error/keyfile_not_found_error.js @@ -9,6 +9,6 @@ const files = require('../files.js'); module.exports = class KeyfileNotFound extends Error { constructor() { super('The key file could not be found.'); - this.keyfile_path = files.key_file; + this.keyfilePath = files.keyFile; } }; diff --git a/src/error/vaultfile_not_found_error.js b/src/error/vaultfile_not_found_error.js index 027c55b..809d836 100644 --- a/src/error/vaultfile_not_found_error.js +++ b/src/error/vaultfile_not_found_error.js @@ -9,6 +9,6 @@ const files = require('../files.js'); module.exports = class VaultfileNotFound extends Error { constructor() { super('The vault file could not be found.'); - this.vaultfile_path = files.vault_file; + this.vaultfilePath = files.vaultFile; } };