@salla.sa/cli
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -51,5 +51,5 @@ // Import Deps | ||
// if not found then create new user | ||
!(await SallaORM.Sequelize.User.findOne({ where: { email: data.email } })) | ||
!(await SallaORM.models.User.findOne({ where: { email: data.email } })) | ||
) { | ||
let user = await SallaORM.Sequelize.User.create({ | ||
let user = await SallaORM.models.User.create({ | ||
username: data.name, | ||
@@ -63,3 +63,3 @@ email: data.email, | ||
SallaORM.Sequelize.OauthTokens.create({ | ||
SallaORM.models.OauthTokens.create({ | ||
user_id: data.id, | ||
@@ -66,0 +66,0 @@ merchant: data.store.id, |
let mongoose = require("mongoose"); | ||
const server = process.env.DATABASE_SERVER; // REPLACE WITH YOUR DB SERVER | ||
const database = "my_app_db"; // REPLACE WITH YOUR DB NAME | ||
const username = process.env.DATABASE_USERNAME; // REPLACE WITH YOUR DB NAME | ||
const password = process.env.DATABASE_PASSWORD; // REPLACE WITH YOUR DB NAME | ||
const database = process.env.DATABASE_NAME; // REPLACE WITH YOUR DB NAME | ||
const username = process.env.DATABASE_USERNAME; // REPLACE WITH YOUR DB USERNAME | ||
const password = process.env.DATABASE_PASSWORD; // REPLACE WITH YOUR DB PASSWORD | ||
require("./schemas/users"); | ||
@@ -8,0 +8,0 @@ require("./schemas/oauthtokens"); |
@@ -14,3 +14,3 @@ const { Sequelize, DataTypes } = require("sequelize"); | ||
password: process.env.DATABASE_PASSWORD, | ||
database: "my_app_db", | ||
database: process.env.DATABASE_NAME, | ||
dialect: "mysql", | ||
@@ -17,0 +17,0 @@ logging: true, |
@@ -5,9 +5,9 @@ var typeorm = require("typeorm"); | ||
type: "mysql", | ||
host: "localhost", | ||
host: process.env.DATABASE_SERVER, | ||
//port: 5432, | ||
username: process.env.DATABASE_USERNAME || "test", | ||
password: process.env.DATABASE_PASSWORD || "YOUR-PASSWORD", | ||
database: "my_app_db", | ||
username: process.env.DATABASE_USERNAME, | ||
password: process.env.DATABASE_PASSWORD, | ||
database: process.env.DATABASE_NAME, | ||
synchronize: true, | ||
entities: [require("./entity/oAuthToken"), require("./entity/User")], | ||
}); |
{ | ||
"name": "@salla.sa/cli", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "The Official Salla Command Line Interface", | ||
@@ -5,0 +5,0 @@ "author": "Salla App (https://github.com/SallaApp)", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
150249976
25