New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

envkey

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

envkey - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

fetch.js

60

index.js

@@ -1,61 +0,3 @@

var dotenv = require("dotenv").config()
module.exports = require("./loader.js").load()
if (process.env.ENVKEY){
var ffi = require("ffi"),
path = require('path')
var platform = process.platform,
arch = process.arch,
isUnix = platform != "win32",
platformParts,
lib
if (!isUnix){
throw "Envkey currently only supports linux and OSX"
} else if (platform == "darwin"){
platformParts = arch == "x64" ? ["darwin-10.6-amd64"] : ["darwin-10.6-386"]
} else {
if (arch == "x64"){
platformParts = ["linux-amd64", "linux-arm64"]
} else if (arch == "ia32"){
platformParts = ["linux-386"]
} else {
platformParts = ["linux-arm64", "linux-arm-7", "linux-arm-6", "linux-arm-5"]
}
}
for (var i = 0; i < platformParts.length; i++) {
var part = platformParts[i],
libPath = path.join(process.cwd(), "node_modules", "envkey", "ext", ["envkey", part].join("-"))
try {
lib = ffi.Library(libPath, {
EnvJson: ['string', ['string']]
})
break
} catch (e) {
continue
}
}
if(!lib){
throw "There was a problem loading Evkey on your platform"
}
try {
var res = lib.EnvJson(process.env.ENVKEY)
json = JSON.parse(res)
for (k in json){
if(!process.env[k]){
process.env[k] = json[k]
}
}
console.log("ENVKEY: vars loaded and decrypted - access with process.env.YOUR_VAR_NAME")
} catch (e) {
throw "Envkey invalid. Couldn't load vars."
}
}
{
"name": "envkey",
"version": "0.1.1",
"version": "0.2.0",
"description": "Envkey secures and simplifies app secrets and config by storing it in an encrypted vault and granting access to developers and servers.",

@@ -18,2 +18,3 @@ "main": "index.js",

"dependencies": {
"command-line-args": "^4.0.2",
"dotenv": "^4.0.0",

@@ -20,0 +21,0 @@ "ffi": "^2.2.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