You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP

@dotenvx/dotenvx

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dotenvx/dotenvx - npm Package Compare versions

Comparing version

to
1.25.2

@@ -5,4 +5,14 @@ # Changelog

[Unreleased](https://github.com/dotenvx/dotenvx/compare/v1.25.1...main)
[Unreleased](https://github.com/dotenvx/dotenvx/compare/v1.25.2...main)
## [1.25.2](https://github.com/dotenvx/dotenvx/compare/v1.25.1...v1.25.2)
### Added
* for binaries add pre-build step using esbuild ([#471](https://github.com/dotenvx/dotenvx/pull/471))
### Removed
* remove types for functions that were removed a while back ([2aa660](https://github.com/dotenvx/dotenvx/commit/2aa660695757143f65751a201115f074b81942a8))
## [1.25.1](https://github.com/dotenvx/dotenvx/compare/v1.25.0...v1.25.1)

@@ -9,0 +19,0 @@

{
"version": "1.25.1",
"version": "1.25.2",
"name": "@dotenvx/dotenvx",

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

"capture-console": "^1.0.2",
"esbuild": "^0.24.0",
"proxyquire": "^2.1.3",

@@ -53,0 +54,0 @@ "sinon": "^14.0.1",

@@ -128,46 +128,2 @@ import type { URL } from 'url';

/**
* Decrypt ciphertext
*
* @see https://dotenvx.com/docs
*
* @param envFile - the encrypted ciphertext string
* @param key - the decryption key(s)
*/
export function decrypt(
envFile?: string | string[],
key?: string | string[]
): string;
export type EncryptRowOutput = {
keys: string[];
filepath: string;
envFilepath: string;
publicKey: string;
privateKey: string;
privateKeyName: string;
privateKeyAdded: boolean;
envSrc: string;
changed: boolean;
error?: Error;
};
export type EncryptOutput = {
processedEnvFiles: EncryptRowOutput[];
changedFilepaths: string[];
unchangedFilepaths: string[];
};
/**
* Encrypt plaintext
*
* @see https://dotenvx.com/docs
* @param envFile - path to the .env file(s)
* @param key - keys(s) to encrypt env file(s) (default: all keys in .env file)
*/
export function encrypt(
envFile?: string | string[],
key?: string | string[]
): EncryptOutput;
/**
* List all env files in the current working directory

@@ -185,49 +141,2 @@ *

/**
* Get the value of a key from the .env file
*
* @param [key] - the key to get the value of
* @param [envs] - the environment(s) to get the value from
* @param [overload] - whether to overload the value from the .env file
* @param [DOTENV_KEY] - the decryption key string
* @param [all] - whether to return all values
*/
export function get(
key?: string,
envs?: string[],
overload?: boolean,
DOTENV_KEY?: string,
all?: boolean
): Record<string, string | undefined> | string | undefined;
export type SetOutput = {
key: string;
value: string;
filepath: string;
envFilepath: string;
envSrc: string;
changed: boolean;
encryptedValue?: string;
publicKey?: string;
privateKey?: string;
privateKeyAdded?: boolean;
privateKeyName?: string;
error?: Error;
};
/**
* Set the value of a key in the .env file
*
* @param key - the key to set the value of
* @param value - the value to set
* @param envFile - the path to the .env file
* @param [encrypt] - whether to encrypt the value
*/
export function set(
key: string,
value: string,
envFile: string | string,
encrypt?: boolean
): EncryptOutput;
export type GenExampleOutput = {

@@ -234,0 +143,0 @@ envExampleFile: string;