Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

yaml-crypt

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yaml-crypt - npm Package Compare versions

Comparing version 0.3.3 to 0.3.4

43

bin/yaml-crypt-cli.js

@@ -32,16 +32,20 @@ #!/usr/bin/env node

} catch (e) {
if (e instanceof ExitError) {
process.exit(e.status);
} else if (e instanceof UsageError || e instanceof UnknownError) {
console.error(`${module.exports.name}: error: ${e.message}`);
process.exit(5);
} else if (e instanceof ConfigurationError) {
console.error(`${module.exports.name}: could not parse configuration: ${e.message}`);
process.exit(6);
} else {
throw e;
}
handleError(e);
}
}
function handleError(e) {
if (e instanceof ExitError) {
process.exit(e.status);
} else if (e instanceof UsageError || e instanceof UnknownError) {
console.error(`${module.exports.name}: error: ${e.message}`);
process.exit(5);
} else if (e instanceof ConfigurationError) {
console.error(`${module.exports.name}: could not parse configuration: ${e.message}`);
process.exit(6);
} else {
throw e;
}
}
function config() {

@@ -329,3 +333,4 @@ const home = `${os.homedir()}/.yaml-crypt`;

} else {
const result = tryDecrypt(opts, keys, crypt => crypt.decryptRaw(buf));
const str = buf.toString("utf8");
const result = tryDecrypt(opts, keys, crypt => crypt.decryptRaw(str));
output.write(result);

@@ -362,3 +367,7 @@ }

if (typeof input === 'string' || input instanceof String || Buffer.isBuffer(input)) {
callback(input);
try {
callback(input);
} catch (e) {
handleError(e);
}
} else {

@@ -375,3 +384,7 @@ const ret = [];

input.on('end', () => {
callback(Buffer.concat(ret, len));
try {
callback(Buffer.concat(ret, len));
} catch (e) {
handleError(e);
}
});

@@ -586,3 +599,3 @@ }

} else {
throw new Error('no matching key to decrypt the given data!');
throw new UsageError('no matching key to decrypt the given data!');
}

@@ -589,0 +602,0 @@ }

{
"name": "yaml-crypt",
"version": "0.3.3",
"version": "0.3.4",
"description": "Encrypt and decrypt YAML documents",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -200,3 +200,3 @@ const fs = require('fs');

const options = {
'stdin': input,
'stdin': Buffer.from(input),
'stdout': new Out()

@@ -203,0 +203,0 @@ };

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc