Skip to content

Commit

Permalink
Merge pull request #48 from Aclify/feat/upgrade
Browse files Browse the repository at this point in the history
feat(packages.json): packages updated
  • Loading branch information
rimiti authored Sep 25, 2020
2 parents 62a5031 + facec83 commit b724abf
Show file tree
Hide file tree
Showing 3 changed files with 2,044 additions and 1,965 deletions.
3 changes: 3 additions & 0 deletions __tests__/tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ import * as Aclify from '../src';
it('Should return 403', (done: Function) => {
const request = httpMocks.createRequest({method: 'GET', url: '/blogs'});
const response = httpMocks.createResponse();
// @ts-ignore
acl.middleware(0, 'joed', 'GET')(request, response, (err: Aclify.HttpError) => {
expect(err.name).toEqual('HttpError');
expect(err.errorCode).toEqual(403);
Expand All @@ -95,6 +96,7 @@ import * as Aclify from '../src';
it('Should return 401', (done: Function) => {
const request = httpMocks.createRequest({method: 'GET', url: '/blogs'});
const response = httpMocks.createResponse();
// @ts-ignore
acl.middleware(0, undefined, 'GET')(request, response, (err: Aclify.HttpError) => {
expect(err.name).toEqual('HttpError');
expect(err.errorCode).toEqual(401);
Expand All @@ -109,6 +111,7 @@ import * as Aclify from '../src';
await acl.addUserRoles('joed', 'member');
await acl.allow('member', '/blogs', ['POST']);
await acl.isAllowed('joed', '/blogs', 'POST');
// @ts-ignore
acl.middleware(0, 'joed', 'POST')(request, response, (err: Aclify.HttpError) => {
setTimeout(() => {
expect(err).toBeInstanceOf(Error);
Expand Down
36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,26 @@
},
"homepage": "https://github.com/aclify/aclify#readme",
"dependencies": {
"bluebird": "^3.5.4",
"lodash": "^4.17.11"
"bluebird": "3.7.2",
"lodash": "4.17.20"
},
"devDependencies": {
"@types/bluebird": "^3.5.26",
"@types/express": "^4.16.1",
"@types/jest": "^24.0.12",
"@types/lodash": "^4.14.124",
"@types/node": "^12.0.0",
"@types/redis": "^2.8.12",
"jest": "^24.8.0",
"mongodb": "^3.2.3",
"node-mocks-http": "^1.7.5",
"prettier": "^1.17.0",
"redis": "^2.8.0",
"ts-jest": "^24.0.2",
"tslint": "^5.16.0",
"tslint-config-prettier": "^1.18.0",
"tslint-microsoft-contrib": "^6.1.1",
"typescript": "^3.4.5"
"@types/bluebird": "3.5.32",
"@types/express": "4.17.8",
"@types/jest": "26.0.14",
"@types/lodash": "4.14.161",
"@types/node": "14.11.2",
"@types/redis": "2.8.27",
"jest": "26.4.2",
"mongodb": "3.6.2",
"node-mocks-http": "1.9.0",
"prettier": "2.1.2",
"redis": "3.0.2",
"ts-jest": "26.4.0",
"tslint": "6.1.3",
"tslint-config-prettier": "1.18.0",
"tslint-microsoft-contrib": "6.2.0",
"typescript": "4.0.3"
},
"scripts": {
"clean": "rm -rf dist coverage jest_0",
Expand Down
Loading

0 comments on commit b724abf

Please sign in to comment.