New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

countries-loader

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

countries-loader - npm Package Compare versions

Comparing version 1.0.0 to 1.0.3

.example.env

10

package.json
{
"name": "countries-loader",
"version": "1.0.0",
"version": "1.0.3",
"description": "load countries, states, cities using cli",
"author": "Khalid Ansari (khalid283)",
"license": "MIT",
"main": "dist/index.js",
"scripts": {

@@ -19,7 +22,8 @@ "start": "tsc && node -r dotenv/config dist/index.js",

},
"author": "",
"license": "MIT",
"bugs": {
"url": "https://github.com/khalid283/countries-loader/issues"
},
"bin": {
"countries-loader": "./dist/index.js"
},
"homepage": "https://github.com/khalid283/countries-loader#readme",

@@ -26,0 +30,0 @@ "dependencies": {

@@ -1,7 +0,14 @@

import mysql, { Connection } from "mysql2";
import { config } from "../config/config";
import * as mysql from "mysql2";
import { Connection } from "mysql2";
export const getConnection = async (): Promise<Connection> => {
return new Promise((resolve) => {
const connection = mysql.createConnection(config);
const connection = mysql.createConnection({
host: process.env.DB_HOST,
user: process.env.DB_USERNAME,
password: process.env.DB_PASSWORD,
database: process.env.DB_DATABASE,
port: Number(process.env.DB_PORT) || 3306,
charset: process.env.DB_CHARSET,
});
connection.connect((err) => {

@@ -8,0 +15,0 @@ if (err) {

@@ -0,1 +1,2 @@

#! /usr/bin/env node
import * as clear from "clear";

@@ -7,7 +8,8 @@ import * as figlet from "figlet";

const ascii = chalk.default.bold.blueBright;
const blue = chalk.default.bold.blue;
const red = chalk.default.bold.red;
require("dotenv").config();
const ascii = chalk.bold.blueBright;
const blue = chalk.bold.blue;
const red = chalk.bold.red;
clear.default();
clear();

@@ -34,2 +36,5 @@ console.log(ascii(figlet.textSync("Country Loader", { horizontalLayout: "full" })));

program.option("-s, --states", "load states");
program.option("-ci, --cities", "load cities");
program.parse(process.argv);
{
"compilerOptions": {
"module": "commonjs",
"esModuleInterop": true,
"target": "es6",

@@ -6,0 +5,0 @@ "moduleResolution": "node",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc