Skip to content

Commit 1ea9746

Browse files
Merge pull request #410 from nmarklund10/nmarklund10/issue-408/add-auditing
Nmarklund10/issue 408/add auditing
2 parents 2200fd4 + 07bd362 commit 1ea9746

11 files changed

Lines changed: 15673 additions & 6228 deletions

File tree

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Bmore Responsive CI
1+
name: Bmore-Responsive
22

33
on: push
44

@@ -30,15 +30,28 @@ jobs:
3030
- name: Install npm packages
3131
run: npm install
3232

33-
# - name: Audit npm packages
34-
# run: npm audit
33+
- name: Audit npm packages
34+
run: npm audit
3535

3636
lint:
3737
runs-on: ubuntu-latest
3838

3939
steps:
4040
- uses: actions/checkout@v2
4141

42+
- name: Restore node modules
43+
uses: actions/cache@v2
44+
env:
45+
cache-name: cache-node-modules
46+
with:
47+
# npm cache files are stored in `~/.npm` on Linux/macOS
48+
path: ~/.npm
49+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
50+
restore-keys: |
51+
${{ runner.os }}-build-${{ env.cache-name }}-
52+
${{ runner.os }}-build-
53+
${{ runner.os }}-
54+
4255
- name: install eslint
4356
run: npm install eslint
4457

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build Status](https://travis-ci.org/CodeForBaltimore/Bmore-Responsive.svg?branch=master)](https://travis-ci.org/CodeForBaltimore/Bmore-Responsive) [![codecov](https://codecov.io/gh/CodeForBaltimore/Bmore-Responsive/branch/master/graph/badge.svg)](https://codecov.io/gh/CodeForBaltimore/Bmore-Responsive) [![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/CodeForBaltimore/Bmore-Responsive.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/CodeForBaltimore/Bmore-Responsive/context:javascript) [![Known Vulnerabilities](https://snyk.io/test/github/CodeForBaltimore/Bmore-Responsive/badge.svg)](https://snyk.io/test/github/CodeForBaltimore/Bmore-Responsive)
1+
[![Build Status](https://github.com/CodeForBaltimore/Bmore-Responsive/actions/workflows/ci.yml/badge.svg)](https://github.com/CodeForBaltimore/Bmore-Responsive/actions/workflows/ci.yml) [![codecov](https://codecov.io/gh/CodeForBaltimore/Bmore-Responsive/branch/master/graph/badge.svg)](https://codecov.io/gh/CodeForBaltimore/Bmore-Responsive) [![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/CodeForBaltimore/Bmore-Responsive.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/CodeForBaltimore/Bmore-Responsive/context:javascript) [![Known Vulnerabilities](https://snyk.io/test/github/CodeForBaltimore/Bmore-Responsive/badge.svg)](https://snyk.io/test/github/CodeForBaltimore/Bmore-Responsive)
22

33
# Bmore Responsive
44

package-lock.json

Lines changed: 15630 additions & 6204 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,12 @@
3434
"dependencies": {
3535
"@babel/core": "7.12.17",
3636
"@babel/node": "7.12.17",
37+
"@types/bluebird": "^3.5.36",
38+
"ansi-regex": "^6.0.1",
39+
"browserslist": "^4.19.3",
3740
"casbin": "4.7.2",
3841
"casbin-sequelize-adapter": "2.1.0",
39-
"chai": "4.3.0",
42+
"chai": "^4.3.6",
4043
"complexity": "0.0.6",
4144
"cors": "2.8.5",
4245
"crypto": "1.0.1",
@@ -48,33 +51,37 @@
4851
"json2csv": "^5.0.6",
4952
"jsonwebtoken": "8.5.1",
5053
"lodash": "^4.17.21",
51-
"mocha": "8.3.0",
54+
"mocha": "^9.2.1",
5255
"morgan": "1.10.0",
53-
"nodemailer": "^6.4.18",
56+
"nodemailer": "^6.7.2",
5457
"nodemon": "2.0.7",
5558
"nunjucks": "^3.2.3",
5659
"pg": "^8.5.1",
57-
"random-words": "1.1.1",
58-
"sequelize": "5.22.3",
59-
"snyk": "^1.459.0",
60+
"random-words": "^1.1.2",
61+
"sequelize": "^6.17.0",
62+
"sequelize-typescript": "^2.0.0",
63+
"snyk": "^1.860.0",
6064
"supertest": "4.0.2",
61-
"swagger-ui-express": "4.1.6",
65+
"swagger-ui-express": "^4.3.0",
6266
"tls": "0.0.1",
6367
"uuid4": "1.1.4",
64-
"validator": "12.2.0"
68+
"validator": "^13.7.0",
69+
"webpack": "^5.70.0"
6570
},
6671
"devDependencies": {
6772
"@babel/compat-data": "7.8.6",
6873
"@babel/polyfill": "7.8.3",
6974
"@babel/preset-env": "7.8.4",
7075
"@babel/register": "7.8.3",
7176
"all-contributors-cli": "6.14.1",
77+
"babel-core": "^6.26.3",
78+
"babel-loader": "^8.2.3",
7279
"chakram": "^1.5.0",
7380
"codecov": "3.7.2",
74-
"eslint": "7.7.0",
81+
"eslint": "^8.10.0",
7582
"eslint-plugin-mocha": "8.0.0",
7683
"nyc": "15.0.0",
77-
"sequelize-cli": "5.5.1"
84+
"sequelize-cli": "^6.4.1"
7885
},
7986
"resolutions": {
8087
"@babel/preset-env": "7.8.4"

src/models/contact.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,4 @@ const contact = (sequelize, DataTypes) => {
9292
return Contact
9393
}
9494

95-
export default contact
95+
module.exports = contact

src/models/entity-contact.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const entityContact = (sequelize, DataTypes) => {
3333
})
3434

3535
EntityContact.createIfNew = async (ec) => {
36-
let whereQuery = {
36+
let whereQuery = {
3737
entityId: ec.entityId,
3838
contactId: ec.contactId,
3939
}
@@ -59,4 +59,4 @@ const entityContact = (sequelize, DataTypes) => {
5959
return EntityContact
6060
}
6161

62-
export default entityContact
62+
module.exports = entityContact

src/models/entity.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ const entity = (sequelize, DataTypes) => {
5353
const entity = await Entity.findOne({
5454
where: { id }
5555
})
56-
56+
5757
return entity
5858
}
5959

6060
Entity.findByName = async (name) => {
6161
const entity = await Entity.findOne({
6262
where: { name }
6363
})
64-
64+
6565
return entity
6666
}
6767

@@ -87,4 +87,4 @@ const entity = (sequelize, DataTypes) => {
8787
return Entity
8888
}
8989

90-
export default entity
90+
module.exports = entity

src/models/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ fs
5757
return (file.indexOf('.') !== 0) && (file !== basename) && (file.slice(-3) === '.js')
5858
})
5959
.forEach(file => {
60-
models[_.upperFirst(_.camelCase(file.replace('.js', '')))] = sequelize.import(`./${file.replace('.js', '')}`)
60+
models[_.upperFirst(_.camelCase(file.replace('.js', '')))] = require(`./${file.replace('.js', '')}`)(sequelize, Sequelize.DataTypes)
6161
})
6262

6363
// Bringing it all together easily for use.

src/models/user-role.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ const userRole = (sequelize, DataTypes) => {
3636
return UserRole
3737
}
3838

39-
export default userRole
39+
module.exports = userRole

src/models/user.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,4 @@ const user = (sequelize, DataTypes) => {
134134
return User
135135
}
136136

137-
export default user
137+
module.exports = user

0 commit comments

Comments
 (0)