@aicore/libcommonutils
Advanced tools
Comparing version 1.0.12 to 1.0.13
{ | ||
"name": "@aicore/libcommonutils", | ||
"version": "1.0.12", | ||
"version": "1.0.13", | ||
"description": "Common util libraries used by various modules. This library is created to prevent code duplication", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
import * as crypto from "crypto"; | ||
/** | ||
* This function helps to get configurations for mySQL DB | ||
* @typedef {Object} MySqlConfigs | ||
* @property {string} host - hostname or ip address | ||
* @property {string} port - port on which MySql server is listening | ||
* @property {string} database - name of database to do operations | ||
* @property {string} user - name of user who has permissions to do operation | ||
* @property {string} password - password of the user for authentication | ||
* | ||
*/ | ||
/** | ||
* It returns a JavaScript object with the host, port, database, user, and password for a MySQL database | ||
* @returns {MySqlConfigs} An object with the following properties: | ||
* host: The value of the environment variable MY_SQL_SERVER or 'localhost' | ||
* port: The value of the environment variable MY_SQL_SERVER_PORT or '3306' | ||
* database: The value of the environment variable MY_SQL_SERVER_DB or a random hex string | ||
* user: The value of the environment variable MY_SQL_USER or a random hex string | ||
* password : The value of the environment variable MY_SQL_PASSWORD or a random hex string | ||
*/ | ||
export function getMySqlConfigs() { | ||
@@ -8,0 +24,0 @@ const host = process.env.MY_SQL_SERVER || 'localhost'; |
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
50828
141