secure-env-ts
Advanced tools
Comparing version 1.2.2 to 1.2.3
@@ -37,3 +37,3 @@ #! /usr/bin/env node | ||
const outputFile = argv.out || argv.o; | ||
const inputFile = argv._[0]; | ||
const inputFile = argv._[0] || argv.i; | ||
const secret = argv.secret || argv.s; | ||
@@ -43,4 +43,4 @@ const encryptionAlgo = argv.algo || argv.a; | ||
if (argv.decrypt || argv.d) | ||
(0, log_1.default)((0, cryptography_1.decrypt)({ secret, file: outputFile, decryptionAlgo: encryptionAlgo }), log_1.logTypes.INFO); | ||
(0, log_1.default)((0, cryptography_1.decrypt)({ secret, inputFile, outputFile, decryptionAlgo: encryptionAlgo }), log_1.logTypes.INFO); | ||
else | ||
(0, cryptography_1.encrypt)({ secret, inputFile, outputFile, encryptionAlgo }); |
@@ -11,7 +11,12 @@ /// <reference types="node" /> | ||
/** | ||
* Path to the encrypted env file.\ | ||
* Default: `.env.enc` | ||
* The env file to encrypt.\ | ||
* Default: `.env` | ||
* */ | ||
file?: fs.PathLike; | ||
inputFile?: fs.PathLike; | ||
/** | ||
* The path and name of the generated file \ | ||
* Default: `${inputFile}.enc` | ||
* */ | ||
outputFile?: fs.PathLike; | ||
/** | ||
* The decryption algorithm to use.\ | ||
@@ -18,0 +23,0 @@ * Default: `aes256` |
@@ -33,3 +33,3 @@ "use strict"; | ||
const secret = options.secret || 'mySecret'; | ||
const inputFile = options.file || '.env.enc'; | ||
const inputFile = options.inputFile || '.env.enc'; | ||
const decryptionAlgo = options.decryptionAlgo || 'aes256'; | ||
@@ -36,0 +36,0 @@ const ivLength = options.ivLength || 16; |
{ | ||
"name": "secure-env-ts", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "Use ENVs securely with encryption", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
25606
329
0