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

@dotenvx/dotenvx

Package Overview
Dependencies
Maintainers
2
Versions
189
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dotenvx/dotenvx - npm Package Compare versions

Comparing version 0.15.4 to 0.16.0

src/cli/actions/ls.js

26

package.json
{
"version": "0.15.4",
"version": "0.16.0",
"name": "@dotenvx/dotenvx",

@@ -24,3 +24,5 @@ "description": "a better dotenv–from the creator of `dotenv`",

"standard:fix": "standard --fix",
"test": "jest --verbose"
"test": "tap 'tests/**/*.test.js' --100",
"prerelease": "npm test",
"release": "standard-version"
},

@@ -34,6 +36,8 @@ "funding": "Have you seen dotenvx.com? run anywhere, cross-platform, and encrypted envs.",

"conf": "^10.2.0",
"dotenv": "^16.4.2",
"dotenv-expand": "^11.0.3",
"dotenv": "^16.4.4",
"dotenv-expand": "^11.0.6",
"execa": "^5.1.1",
"glob": "^10.3.10",
"ignore": "^5.3.0",
"object-treeify": "1.1.33",
"open": "^8.4.2",

@@ -47,12 +51,10 @@ "ora": "^5.4.1",

"devDependencies": {
"jest": "^29.7.0",
"jest-mock-process": "^2.0.0",
"capture-console": "^1.0.2",
"pkg": "^5.8.1",
"standard": "^17.1.0"
"proxyquire": "^2.1.3",
"sinon": "^14.0.1",
"standard": "^17.1.0",
"standard-version": "^9.5.0",
"tap": "^16.3.0"
},
"standard": {
"env": [
"jest"
]
},
"publishConfig": {

@@ -59,0 +61,0 @@ "access": "public"

const fs = require('fs')
const path = require('path')
const ignore = require('ignore')
const logger = require('./../../shared/logger')
const helpers = require('./../helpers')
const Precommit = require('./../../lib/services/precommit')
function precommit () {

@@ -13,2 +15,5 @@ const options = this.opts()

const precommit = new Precommit(options)
precommit.run()
// 0. handle the --install flag

@@ -15,0 +20,0 @@ if (options.install) {

@@ -17,3 +17,4 @@ const fs = require('fs')

if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) {
const filepath = helpers.resolvePath('.env.vault')
const envVaultFilepath = options.envVaultFile // .env.vault
const filepath = helpers.resolvePath(envVaultFilepath)

@@ -60,3 +61,3 @@ if (!fs.existsSync(filepath)) {

logger.successv(`injecting env (${result.injected.size}) from encrypted .env.vault`)
logger.successv(`injecting env (${result.injected.size}) from encrypted ${envVaultFilepath}`)
} catch (e) {

@@ -63,0 +64,0 @@ logger.error(e)

@@ -59,2 +59,3 @@ #!/usr/bin/env node

.option('-f, --env-file <paths...>', 'path(s) to your env file(s)', '.env')
.option('-fv, --env-vault-file <path>', 'path to your .env.vault file', '.env.vault')
.option('-o, --overload', 'override existing env variables')

@@ -100,2 +101,9 @@ .action(require('./actions/run'))

// dotenvx ls
program.command('ls')
.description('print all .env files in a tree structure')
.argument('[directory]', 'directory to list .env files from', '.')
.option('-f, --env-file <filenames...>', 'path(s) to your env file(s)', '.env*')
.action(require('./actions/ls'))
// dotenvx hub

@@ -102,0 +110,0 @@ program.addCommand(require('./commands/hub'))

@@ -5,2 +5,5 @@ const logger = require('./../shared/logger')

// services
const Ls = require('./services/ls')
const config = function (options) {

@@ -60,5 +63,3 @@ return dotenv.config(options)

for (const key in parsed) {
if (Object.prototype.hasOwnProperty.call(expanded, key)) {
result[key] = expanded[key]
}
result[key] = expanded[key]
}

@@ -109,2 +110,6 @@

const ls = function (directory, envFile) {
return new Ls(directory, envFile).run()
}
module.exports = {

@@ -116,3 +121,4 @@ config,

parseExpand,
inject
inject,
ls
}

@@ -86,4 +86,2 @@ const winston = require('winston')

return formattedMessage
default: // handle uncaught
return formattedMessage
}

@@ -90,0 +88,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