@szegedsw/lib-node
Version:
A little framework published by Szeged Software Zrt. in order to enhance api endpoint security and create reuseable code. Email module, Logging system, and much more. Further improvements are expected.
89 lines • 2.55 kB
TypeScript
import Mail from "nodemailer/lib/mailer";
export declare const dotenvSettings: {
initCryptModule: boolean;
cryptoKeys: string[];
toSnakeCase: boolean;
path: string;
dist: boolean;
};
/**
* @class extend this class, declare properties then call super() and this.init(this) from constructor
* The super() call will load the .env file into process.env
* Then try to get the properties from the .env file and load it to the class
*/
export declare class DotenvConfig {
settings: {
initCryptModule: boolean;
cryptoKeys: string[];
toSnakeCase: boolean;
path: string;
dist: boolean;
};
[key: string]: any;
nodeEnv: string;
nodeSsl: boolean;
nodeSslKey: string;
nodeSslCert: string;
nodeSslCa: string;
nodePort: number;
nodeApiName: string;
cookieName: string;
cookieSecure: boolean;
cookieSecret: string;
cookieHttponly: boolean;
sessionTimeout: number;
databaseType: string;
databaseUser: string;
databasePassword: string;
databaseAuthSource: string;
databaseHost: string;
databasePort: number;
databaseSid: string;
databaseName: string;
databaseOwner: string;
databaseSsl: boolean;
databasePoolSize: number;
databasePoolMin: number;
databasePoolMax: number;
databasePoolIncrement: number;
databaseIdleTimeout: number;
databaseConnectionTimeout: number;
databaseRownum: number;
databaseDebug: boolean;
databaseSecret: string;
emailUser: string;
emailPassword: string;
emailHost: string;
emailPort: number;
emailSecure: boolean;
emailPoolSize: number;
emailLogger: boolean;
emailSubject: string;
emailAdmins: string[];
emailLogs: string[];
emailEvents: string[];
get emailAttachments(): Mail.Attachment[];
emailRejectUnauthorized: boolean;
emailReplyTo: string;
auditLogMethods: string[];
maskPassKeys: string[];
clientVersion: string;
upgradeNoteInterval: number;
cryptoSecretAes: string;
cryptoSecretHmac: string;
cryptoInitVector: string;
downloadDirectory: string;
uploadDirectory: string;
logDirectory: string;
constructor(settings?: {
initCryptModule: boolean;
cryptoKeys: string[];
toSnakeCase: boolean;
path: string;
dist: boolean;
});
init<T extends DotenvConfig>(object: T): void;
path(dist?: boolean): string | undefined;
checkSettings(): void;
}
//# sourceMappingURL=dotenv.config.d.ts.map