dotencr
Version:
Encrypt and decrypt individual lines inside a .env file. Supports multiple encryption keys. Keys and dotenv files can be read text file or read from the environment.
34 lines (33 loc) • 1.39 kB
TypeScript
/// <reference types="node" />
/**
* Create a new path using the destination folder and original file name.
*
* @param filePath - original file path
* @param destinationPath - destination folder
* @returns path using the destination folder and original file name
*/ export declare const replaceFilePath: (filePath: string, destinationPath: string, ext?: string | undefined) => string;
/**
* Create the backup file path. The new file name includes the extension of ".bak"
*
* @param filePath - original file path
* @param destinationPath - destination folder
* @returns path using the destination folder and original file name plus ".bak"
*/
export declare const createBackupFilePath: (filePath: string, destinationPath: string) => string;
/**
* Search for files using the specified pattern
*
* @param filePatterns The double-star character ** is supported by default
* @returns array of files found including paths
* @see https://www.npmjs.com/package/glob
*/
export declare const fileGlob: (filePatterns: string[]) => string[];
/**
* Recursively sort an object by the property keys names.
*
* @param obj
* @returns sorted object
*/
export declare const sortObjectByKeys: (obj: object) => any;
export declare const loadBufferFromFile: (bufferOrFilePath: string | Buffer) => string;
export declare const loadObjectFromFile: (objectOrFilePath: string | object) => object;