Skip to content

Commit

Permalink
Minor fixes and sequelize scripts (#548)
Browse files Browse the repository at this point in the history
v3.0.1
  • Loading branch information
jersonlopez authored Oct 27, 2021
1 parent 87798d0 commit 2db50bc
Show file tree
Hide file tree
Showing 13 changed files with 21,219 additions and 9,858 deletions.
6 changes: 3 additions & 3 deletions generators/app/constants.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const templatePackageJson = require('./dependencies/package.json');

const { engines } = require('../../package.json');
const { engines } = require('./dependencies/package.json');

exports.NODE_DEFAULT_VERSION = engines.node;
exports.NPM_DEFAULT_VERSION = engines.npm;
Expand All @@ -17,8 +17,8 @@ exports.CI_OPTIONS = ['jenkins', 'travis'];
exports.TESTING_OPTIONS = ['jest-supertest', 'mocha-chai'];

exports.TRAINING_CONFIG = {
projectName: 'WTraining',
projectDescription: 'WTraining',
projectName: 'w-training',
projectDescription: 'w-training',
nodeVersion: exports.NODE_DEFAULT_VERSION,
npmVersion: exports.NPM_DEFAULT_VERSION,
documentationRequiresAuth: false,
Expand Down
64 changes: 34 additions & 30 deletions generators/app/dependencies/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
"cacheDirectories": [
"node_modules"
],
"engines": {
"node": "14.17.0",
"npm": "6.14.13"
},
"main": "app.js",
"author": "Wolox",
"homepage": "",
Expand All @@ -18,51 +22,51 @@
"email": "[email protected]"
},
"dependencies": {
"axios": "^0.19.2",
"axios": "^0.24.0",
"bcryptjs": "^2.4.3",
"body-parser": "^1.18.2",
"cors": "^2.8.4",
"express": "^4.16.2",
"body-parser": "^1.19.0",
"cors": "^2.8.5",
"express": "^4.17.1",
"express-wolox-logger": "^2.0.0",
"factory-girl": "^5.0.4",
"helmet": "^3.20.0",
"jwt-simple": "^0.5.1",
"mongodb": "^3.3.0-beta2",
"mongoose": "^5.9.10",
"mysql2": "^2.1.0",
"pg": "^7.4.1",
"rollbar": "^2.3.9",
"sequelize": "^5.21.5",
"sqlite3": "^4.0.4",
"swagger-ui-express": "^4.0.7",
"tedious": "^7.0.0",
"umzug": "^2.1.0"
"helmet": "^4.6.0",
"jwt-simple": "^0.5.6",
"mongodb": "^4.1.3",
"mongoose": "^6.0.12",
"mysql2": "^2.3.2",
"pg": "^8.7.1",
"rollbar": "^2.24.0",
"sequelize": "^6.8.0",
"sqlite3": "^5.0.2",
"swagger-ui-express": "^4.1.6",
"tedious": "^14.0.0",
"umzug": "^2.3.0"
},
"devDependencies": {
"babel": "6.23.0",
"babel-core": "^6.26.3",
"babel-eslint": "^10.1.0",
"babel-jest": "^25.1.0",
"babel-jest": "^27.3.1",
"babel-preset-es2015": "6.24.1",
"chai": "^4.1.2",
"chai-http": "^4.2.0",
"coveralls": "^3.0.0",
"dotenv": "^8.2.0",
"chai": "^4.3.4",
"chai-http": "^4.3.0",
"coveralls": "^3.1.1",
"dotenv": "^10.0.0",
"eslint": "^6.8.0",
"eslint-config-wolox": "^4.0.0",
"eslint-config-wolox-node": "^3.0.0",
"eslint-plugin-import": "^2.17.3",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-prettier": "^3.0.1",
"husky": "^4.2.3",
"husky": "^7.0.4",
"istanbul": "^0.4.3",
"jest": "^25.1.0",
"mocha": "^7.1.0",
"mocha-lcov-reporter": "^1.2.0",
"nodemon": "^2.0.2",
"jest": "^27.3.1",
"mocha": "^9.1.3",
"mocha-lcov-reporter": "^1.3.0",
"nodemon": "^2.0.14",
"prettier": "^1.15.3",
"prettier-eslint": "^9.0.1",
"prompt": "^1.0.0",
"sequelize-cli": "^5.5.1",
"supertest": "^4.0.2"
"prompt": "^1.2.0",
"sequelize-cli": "^6.2.0",
"supertest": "^6.1.6"
}
}
2 changes: 1 addition & 1 deletion generators/app/prompts.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = flattenPrompts([
{
type: 'confirm',
name: 'inTraining',
message: 'Are you in WTraining ?',
message: 'Are you in w-training ?',
promptsNegative: [
{
type: 'input',
Expand Down
5 changes: 2 additions & 3 deletions generators/app/templates/config/db.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ module.exports = {
database: config.name,
host: config.host,
port: config.port,
dialect: '<%= sequelizeDialect %>',
logging: true
dialect: '<%= sequelizeDialect %>'
},
testing: {
username: config.username,
Expand All @@ -36,4 +35,4 @@ module.exports = {
const connectionString = `mongodb://${host}:${port}/${name}`;
module.exports = mongoose.connect(connectionString);
<%}%>
<%}%>
3 changes: 2 additions & 1 deletion generators/app/templates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"migrations-test": "NODE_ENV=testing sequelize db:migrate",<%}}%>
"start": "node server.js",
"seed": "sequelize db:seed:all",
"create-seed": "sequelize seed:generate --name"
"create-seed": "sequelize seed:generate --name",
"create-migration": "sequelize migration:generate --name"
},
"cacheDirectories": [
"node_modules"
Expand Down
Loading

0 comments on commit 2db50bc

Please sign in to comment.