From 6541ad1c68c5d764f1ef211b0c6d77b263a1520f Mon Sep 17 00:00:00 2001 From: mlakdawala-sf <73096294+mlakdawala-sf@users.noreply.github.com> Date: Sat, 14 Nov 2020 17:39:37 +0530 Subject: [PATCH] feat(authentication-service): LB4-Authorization dependancy upgrade (#92) * feat(authentication-service): casbin integration BREAKING CHANGE: Loopback4-authorization authorize metadata changes RPMS-413 * fix(authentication-service): removed code smells RPMS-413 * fix(authentication-service): code smells, and added name attribute to entity RPMS-413 * feat(authentication-service): update lb4-authorization to 3.1.1 Updated controller authorize decorator RPMS-413 * feat(core): updated project dependencies, resolved test script issues Updated loopback4-authorization to 3.1.1, and added loopback/metadata in in-mail and video conferencing services, as test cases were failing. RPMS-413 Co-authored-by: Mudassir Lakdawala --- packages/core/package-lock.json | 388 +++- packages/core/package.json | 4 +- .../src/components/bearer-verifier/keys.ts | 1 + .../package-lock.json | 309 ++- sandbox/auth-multitenant-example/package.json | 2 +- .../src/controllers/home-page.controller.ts | 2 +- .../src/controllers/ping.controller.ts | 2 +- .../package-lock.json | 362 +++- .../notification-socket-example/package.json | 2 +- .../src/controllers/home-page.controller.ts | 2 +- .../src/controllers/ping.controller.ts | 2 +- sandbox/testing/package-lock.json | 1752 +++-------------- sandbox/testing/package.json | 2 +- .../src/controllers/home-page.controller.ts | 2 +- .../src/controllers/ping.controller.ts | 2 +- .../authentication-service/package-lock.json | 735 +++++-- services/authentication-service/package.json | 3 +- .../src/controllers/auth-client.controller.ts | 16 +- .../controllers/forget-password.controller.ts | 6 +- .../src/controllers/otp.controller.ts | 6 +- .../src/models/index.ts | 3 + .../src/models/user-level-resource.model.ts | 54 + .../src/modules/auth/login.controller.ts | 37 +- .../src/modules/auth/logout.controller.ts | 2 +- .../modules/auth/models/auth-user.model.ts | 8 +- .../src/repositories/index.ts | 3 + .../user-level-resource.repository.ts | 43 + services/in-mail-service/package-lock.json | 1532 +++++++++++++- services/in-mail-service/package.json | 3 +- .../src/controllers/collector.controller.ts | 8 +- .../src/controllers/originator.controller.ts | 16 +- .../reply-and-forward.controller.ts | 4 +- .../notification-service/package-lock.json | 754 +++++-- services/notification-service/package.json | 2 +- ...tification-notification-user.controller.ts | 8 +- ...tification-user-notification.controller.ts | 2 +- .../notification-user.controller.ts | 18 +- .../controllers/notification.controller.ts | 10 +- .../pubnub-notification.controller.ts | 4 +- services/scheduler-service/package-lock.json | 628 ++++-- services/scheduler-service/package.json | 2 +- .../src/controllers/attachment.controller.ts | 16 +- .../src/controllers/attendee.controller.ts | 16 +- .../controllers/calendar-event.controller.ts | 8 +- .../calendar-subscription.controller.ts | 8 +- .../calendar-working-hour.controller.ts | 8 +- .../src/controllers/calendar.controller.ts | 18 +- .../event-attachment.controller.ts | 8 +- .../controllers/event-attendee.controller.ts | 8 +- .../src/controllers/event.controller.ts | 20 +- .../src/controllers/settings.controller.ts | 16 +- .../controllers/subscription.controller.ts | 18 +- .../src/controllers/theme.controller.ts | 16 +- .../controllers/working-hour.controller.ts | 16 +- .../package-lock.json | 598 ++++-- .../video-conferencing-service/package.json | 3 +- .../video-chat-archive.controller.ts | 10 +- .../video-chat-session.controller.ts | 12 +- 58 files changed, 5045 insertions(+), 2495 deletions(-) create mode 100644 services/authentication-service/src/models/user-level-resource.model.ts create mode 100644 services/authentication-service/src/repositories/user-level-resource.repository.ts diff --git a/packages/core/package-lock.json b/packages/core/package-lock.json index 833b2b2bb0..1539cbad88 100644 --- a/packages/core/package-lock.json +++ b/packages/core/package-lock.json @@ -1079,6 +1079,20 @@ "@types/node": "*" } }, + "@types/pg": { + "version": "7.14.6", + "resolved": "https://registry.npmjs.org/@types/pg/-/pg-7.14.6.tgz", + "integrity": "sha512-mf6kYvuYS2CObDxtsw5imE4vOvq+XHJtiJNFXir/fn9nxZtIFQ3/ECpokm8fNkxKBh7nQhyegHwNg1NIW+yYJA==", + "requires": { + "@types/node": "*", + "@types/pg-types": "*" + } + }, + "@types/pg-types": { + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@types/pg-types/-/pg-types-1.11.5.tgz", + "integrity": "sha512-L8ogeT6vDzT1vxlW3KITTCt+BVXXVkLXfZ/XNm6UqbcJgxf+KPO7yjWx7dQQE8RW07KopL10x2gNMs41+IkMGQ==" + }, "@types/qs": { "version": "6.9.3", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.3.tgz", @@ -1287,8 +1301,7 @@ "ansi-regex": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" }, "ansi-styles": { "version": "3.2.1", @@ -1395,6 +1408,11 @@ "array-filter": "^1.0.0" } }, + "await-lock": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/await-lock/-/await-lock-2.1.0.tgz", + "integrity": "sha512-t7Zm5YGgEEc/3eYAicF32m/TNvL+XOeYZy9CvBUeJY/szM7frLolFylhrlZNWV/ohWhcUXygrBGjYmoQdxF4CQ==" + }, "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -1541,7 +1559,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, "requires": { "fill-range": "^7.0.1" } @@ -1568,6 +1585,11 @@ "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, + "buffer-writer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/buffer-writer/-/buffer-writer-2.0.0.tgz", + "integrity": "sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw==" + }, "bunyan": { "version": "1.8.14", "resolved": "https://registry.npmjs.org/bunyan/-/bunyan-1.8.14.tgz", @@ -1655,6 +1677,27 @@ "upper-case-first": "^2.0.1" } }, + "casbin": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/casbin/-/casbin-5.2.0.tgz", + "integrity": "sha512-9qqcTAx0ysgF6xz1Mq83B7yD9inG4iEZ85tMZBmkXCIsECD9yAE8XhaONn7GhlnTave10k3ktGJ+9qNItXe30A==", + "requires": { + "await-lock": "^2.0.1", + "expression-eval": "^2.0.0", + "ip": "^1.1.5", + "micromatch": "^4.0.2" + } + }, + "casbin-pg-adapter": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/casbin-pg-adapter/-/casbin-pg-adapter-1.4.0.tgz", + "integrity": "sha512-9T0i+t0XwdnsBFl+20ojAED9+05SN4haJDLOJTUh9liHO+yBi6SXwSboD0MLzserFkxCs8VJJ+BNJlavExlU+A==", + "requires": { + "casbin": "^5.0.4", + "node-pg-migrate": "^5.1.0", + "pg": "^8.2.1" + } + }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -2243,8 +2286,7 @@ "emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "enabled": { "version": "1.0.2", @@ -2327,6 +2369,11 @@ "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", "dev": true }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -2584,6 +2631,14 @@ "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-5.1.3.tgz", "integrity": "sha512-TINcxve5510pXj4n9/1AMupkj3iWxl3JuZaWhCdYDlZeoCPqweGZrxbrlqTCFb1CT5wli7s8e2SH/Qz2c9GorA==" }, + "expression-eval": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/expression-eval/-/expression-eval-2.1.0.tgz", + "integrity": "sha512-FUJO/Akvl/JOWkvlqZaqbkhsEWlCJWDeZG4tzX96UH68D9FeRgYgtb55C2qtqbORC0Q6x5419EDjWu4IT9kQfg==", + "requires": { + "jsep": "^0.3.0" + } + }, "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -2658,7 +2713,6 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, "requires": { "to-regex-range": "^5.0.1" } @@ -2859,8 +2913,7 @@ "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" }, "get-package-type": { "version": "0.1.0", @@ -3326,6 +3379,11 @@ "standard-as-callback": "^2.0.1" } }, + "ip": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" + }, "ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -3384,8 +3442,7 @@ "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" }, "is-glob": { "version": "4.0.1", @@ -3404,8 +3461,7 @@ "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" }, "is-number-object": { "version": "1.0.4", @@ -3633,6 +3689,11 @@ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, + "jsep": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/jsep/-/jsep-0.3.5.tgz", + "integrity": "sha512-AoRLBDc6JNnKjNcmonituEABS5bcfqDhQAWWXNTFrqu6nVXBpBAGfcoTGZMFlIrh9FjmE1CQyX9CTNwZrXMMDA==" + }, "jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -4190,11 +4251,92 @@ } }, "loopback4-authorization": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/loopback4-authorization/-/loopback4-authorization-2.3.2.tgz", - "integrity": "sha512-9vMmcqRFWQOsAv1iocsWuZKkM33DUGmelGu6rQy7zsEAUnP5XgiRBJSUVZ/wbZnCbPvz9UughtBEHY7FzpCj6Q==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/loopback4-authorization/-/loopback4-authorization-3.1.1.tgz", + "integrity": "sha512-qcFRNnJsMwpUZwszaRftQ5rJUaU3p/0iO/gx/1ifaLeBfnTJ0t8lMYUGU1xnOU2ya8VTvauHJgx0gwCSnoWlbQ==", "requires": { - "lodash": "^4.17.11" + "@loopback/core": "^2.9.2", + "casbin": "^5.1.5", + "casbin-pg-adapter": "^1.4.0", + "lodash": "^4.17.19" + }, + "dependencies": { + "@loopback/context": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.13.0.tgz", + "integrity": "sha512-3R+6Mxm2QOAW8cjhEPaxP3i+uj1y9vkW7Ie91kuFa16yVHgOMrxPkcBmxduH5x4Cd1ZEKmtR/iVTfvRKoBYVxA==", + "requires": { + "@loopback/metadata": "^3.0.3", + "@types/debug": "^4.1.5", + "debug": "^4.2.0", + "hyperid": "^2.0.5", + "p-event": "^4.2.0", + "tslib": "^2.0.3", + "uuid": "^8.3.1" + } + }, + "@loopback/core": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@loopback/core/-/core-2.12.0.tgz", + "integrity": "sha512-kdJZzIF7PA9TjnKoEtfhn2G41stmS8gIsweJAbiG7i+S4REbZLGR4KBHzDtSyfeeDCcxayouGzKwi/BT8gWDgQ==", + "requires": { + "@loopback/context": "^3.13.0", + "debug": "^4.2.0", + "tslib": "^2.0.3" + } + }, + "@loopback/metadata": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-3.0.3.tgz", + "integrity": "sha512-VsY3XfQC42Icne5d4wrRgXAEWTmaC9xhzM8e9CmPlYvONfUG3HGPiUIIPWQYElN4IW+hhW56vId4pNI2vh974A==", + "requires": { + "debug": "^4.2.0", + "lodash": "^4.17.20", + "reflect-metadata": "^0.1.13", + "tslib": "^2.0.3" + }, + "dependencies": { + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + } + } + }, + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" + } + }, + "p-event": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/p-event/-/p-event-4.2.0.tgz", + "integrity": "sha512-KXatOjCRXXkSePPb1Nbi0p0m+gQAwdlbhi4wQKJPI1HsMQS9g+Sqp2o+QHziPr7eYJyOZet836KoHEVM1mwOrQ==", + "requires": { + "p-timeout": "^3.1.0" + } + }, + "p-timeout": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", + "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", + "requires": { + "p-finally": "^1.0.0" + } + }, + "tslib": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" + }, + "uuid": { + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", + "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==" + } } }, "loopback4-helmet": { @@ -4782,6 +4924,15 @@ "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" }, + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + }, "mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", @@ -5112,6 +5263,95 @@ "http2-client": "^1.2.5" } }, + "node-pg-migrate": { + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/node-pg-migrate/-/node-pg-migrate-5.9.0.tgz", + "integrity": "sha512-FXXPzP45B/Vj7C23j4QFKvUfe+k2fCfGcaVG6LNdJ8powA+f5V9nLuihuPZRlhUb0xIWWxqc2qUKIPPGuGJS5g==", + "requires": { + "@types/pg": "^7.4.0", + "decamelize": "^4.0.0", + "lodash": "~4.17.0", + "mkdirp": "~1.0.0", + "yargs": "~16.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==" + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "y18n": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz", + "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==" + }, + "yargs": { + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.1.0.tgz", + "integrity": "sha512-upWFJOmDdHN0syLuESuvXDmrRcWd1QafJolHskzaw79uZa7/x53gxQKiR07W59GWY1tFhhU/Th9DrtSfpS782g==", + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.2", + "yargs-parser": "^20.2.2" + } + }, + "yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==" + } + } + }, "node-preload": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", @@ -5676,6 +5916,11 @@ "release-zalgo": "^1.0.0" } }, + "packet-reader": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/packet-reader/-/packet-reader-1.0.0.tgz", + "integrity": "sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ==" + }, "param-case": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.3.tgz", @@ -5851,11 +6096,64 @@ "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, + "pg": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.5.0.tgz", + "integrity": "sha512-h+KHEwce67pAQilZhMCpCx1RC7rR1US7mdjwvKzHRaRxKQxbbFtv5UlwjzqILQ1dwhK+RVGqOVcahE/2KOcaeA==", + "requires": { + "buffer-writer": "2.0.0", + "packet-reader": "1.0.0", + "pg-connection-string": "^2.4.0", + "pg-pool": "^3.2.2", + "pg-protocol": "^1.4.0", + "pg-types": "^2.1.0", + "pgpass": "1.x" + } + }, + "pg-connection-string": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.4.0.tgz", + "integrity": "sha512-3iBXuv7XKvxeMrIgym7njT+HlZkwZqqGX4Bu9cci8xHZNT+Um1gWKqCsAzcC0d95rcKMU5WBg6YRUcHyV0HZKQ==" + }, + "pg-int8": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", + "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==" + }, + "pg-pool": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.2.2.tgz", + "integrity": "sha512-ORJoFxAlmmros8igi608iVEbQNNZlp89diFVx6yV5v+ehmpMY9sK6QgpmgoXbmkNaBAx8cOOZh9g80kJv1ooyA==" + }, + "pg-protocol": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.4.0.tgz", + "integrity": "sha512-El+aXWcwG/8wuFICMQjM5ZSAm6OWiJicFdNYo+VY3QP+8vI4SvLIWVe51PppTzMhikUJR+PsyIFKqfdXPz/yxA==" + }, + "pg-types": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", + "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", + "requires": { + "pg-int8": "1.0.1", + "postgres-array": "~2.0.0", + "postgres-bytea": "~1.0.0", + "postgres-date": "~1.0.4", + "postgres-interval": "^1.1.0" + } + }, + "pgpass": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.4.tgz", + "integrity": "sha512-YmuA56alyBq7M59vxVBfPJrGSozru8QAdoNlWuW3cz8l+UX3cWge0vTvjKhsSHSJpo3Bom8/Mm6hf0TR5GY0+w==", + "requires": { + "split2": "^3.1.1" + } + }, "picomatch": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", - "dev": true + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==" }, "pkg-dir": { "version": "4.2.0", @@ -5902,6 +6200,29 @@ } } }, + "postgres-array": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", + "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==" + }, + "postgres-bytea": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz", + "integrity": "sha1-AntTPAqokOJtFy1Hz5zOzFIazTU=" + }, + "postgres-date": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", + "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==" + }, + "postgres-interval": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", + "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", + "requires": { + "xtend": "^4.0.0" + } + }, "prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -6166,8 +6487,7 @@ "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, "require-main-filename": { "version": "2.0.0", @@ -6526,6 +6846,26 @@ "which": "^2.0.1" } }, + "split2": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", + "integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==", + "requires": { + "readable-stream": "^3.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -6576,7 +6916,6 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", - "dev": true, "requires": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -6640,7 +6979,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, "requires": { "ansi-regex": "^5.0.0" } @@ -6844,7 +7182,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, "requires": { "is-number": "^7.0.0" } @@ -7271,6 +7608,11 @@ "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.3.tgz", "integrity": "sha512-HgS+X6zAztGa9zIK3Y3LXuJes33Lz9x+YyTxgrkIdabu2vqcGOWwdfCpf1hWLRrd553wd4QCDf6BBO6FfdsRiQ==" }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + }, "y18n": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", diff --git a/packages/core/package.json b/packages/core/package.json index 2f8913eba8..2a3f59c25d 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -45,14 +45,14 @@ "@loopback/core": "^2.7.0", "@loopback/repository": "^2.5.1", "@loopback/rest": "^5.0.1", - "@loopback/service-proxy": "^2.3.4", + "@loopback/service-proxy": "^2.2.6", "i18n": "^0.10.0", "jsonwebtoken": "^8.5.1", "lodash": "^4.17.19", "logform": "^2.1.2", "loopback-datasource-juggler": "^4.21.2", "loopback4-authentication": "^4.0.1", - "loopback4-authorization": "^2.3.2", + "loopback4-authorization": "3.1.1", "loopback4-helmet": "^1.0.3", "loopback4-ratelimiter": "^1.0.0", "loopback4-soft-delete": "^2.0.0", diff --git a/packages/core/src/components/bearer-verifier/keys.ts b/packages/core/src/components/bearer-verifier/keys.ts index 18bfece06e..c2bd9dc61d 100644 --- a/packages/core/src/components/bearer-verifier/keys.ts +++ b/packages/core/src/components/bearer-verifier/keys.ts @@ -39,4 +39,5 @@ export interface IAuthUserWithPermissions< tenantId?: TID; userTenantId?: UTID; passwordExpiryTime?: Date; + allowedResources?: string[]; } diff --git a/sandbox/auth-multitenant-example/package-lock.json b/sandbox/auth-multitenant-example/package-lock.json index 76186ff907..83708ec73a 100644 --- a/sandbox/auth-multitenant-example/package-lock.json +++ b/sandbox/auth-multitenant-example/package-lock.json @@ -1,5 +1,5 @@ { - "name": "auth-multitenant-example", + "name": "@sourceloop/auth-multitenant-example", "version": "1.1.0-alpha.20", "lockfileVersion": 1, "requires": true, @@ -941,8 +941,7 @@ "@types/node": { "version": "10.17.27", "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.27.tgz", - "integrity": "sha512-J0oqm9ZfAXaPdwNXMMgAhylw5fhmXkToJd06vuDUSAgEDZ/n/69/69UmyBZbc+zT34UnShuDSBqvim3SPnozJg==", - "dev": true + "integrity": "sha512-J0oqm9ZfAXaPdwNXMMgAhylw5fhmXkToJd06vuDUSAgEDZ/n/69/69UmyBZbc+zT34UnShuDSBqvim3SPnozJg==" }, "@types/on-finished": { "version": "2.3.1", @@ -959,6 +958,20 @@ } } }, + "@types/pg": { + "version": "7.14.6", + "resolved": "https://registry.npmjs.org/@types/pg/-/pg-7.14.6.tgz", + "integrity": "sha512-mf6kYvuYS2CObDxtsw5imE4vOvq+XHJtiJNFXir/fn9nxZtIFQ3/ECpokm8fNkxKBh7nQhyegHwNg1NIW+yYJA==", + "requires": { + "@types/node": "*", + "@types/pg-types": "*" + } + }, + "@types/pg-types": { + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@types/pg-types/-/pg-types-1.11.5.tgz", + "integrity": "sha512-L8ogeT6vDzT1vxlW3KITTCt+BVXXVkLXfZ/XNm6UqbcJgxf+KPO7yjWx7dQQE8RW07KopL10x2gNMs41+IkMGQ==" + }, "@types/qs": { "version": "6.9.3", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.3.tgz", @@ -1177,8 +1190,7 @@ "ansi-regex": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" }, "ansi-styles": { "version": "3.2.1", @@ -1304,6 +1316,11 @@ "array-filter": "^1.0.0" } }, + "await-lock": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/await-lock/-/await-lock-2.1.0.tgz", + "integrity": "sha512-t7Zm5YGgEEc/3eYAicF32m/TNvL+XOeYZy9CvBUeJY/szM7frLolFylhrlZNWV/ohWhcUXygrBGjYmoQdxF4CQ==" + }, "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -1449,7 +1466,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, "requires": { "fill-range": "^7.0.1" } @@ -1562,6 +1578,53 @@ "upper-case-first": "^2.0.1" } }, + "casbin": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/casbin/-/casbin-5.2.0.tgz", + "integrity": "sha512-9qqcTAx0ysgF6xz1Mq83B7yD9inG4iEZ85tMZBmkXCIsECD9yAE8XhaONn7GhlnTave10k3ktGJ+9qNItXe30A==", + "requires": { + "await-lock": "^2.0.1", + "expression-eval": "^2.0.0", + "ip": "^1.1.5", + "micromatch": "^4.0.2" + } + }, + "casbin-pg-adapter": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/casbin-pg-adapter/-/casbin-pg-adapter-1.4.0.tgz", + "integrity": "sha512-9T0i+t0XwdnsBFl+20ojAED9+05SN4haJDLOJTUh9liHO+yBi6SXwSboD0MLzserFkxCs8VJJ+BNJlavExlU+A==", + "requires": { + "casbin": "^5.0.4", + "node-pg-migrate": "^5.1.0", + "pg": "^8.2.1" + }, + "dependencies": { + "pg": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.5.0.tgz", + "integrity": "sha512-h+KHEwce67pAQilZhMCpCx1RC7rR1US7mdjwvKzHRaRxKQxbbFtv5UlwjzqILQ1dwhK+RVGqOVcahE/2KOcaeA==", + "requires": { + "buffer-writer": "2.0.0", + "packet-reader": "1.0.0", + "pg-connection-string": "^2.4.0", + "pg-pool": "^3.2.2", + "pg-protocol": "^1.4.0", + "pg-types": "^2.1.0", + "pgpass": "1.x" + } + }, + "pg-connection-string": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.4.0.tgz", + "integrity": "sha512-3iBXuv7XKvxeMrIgym7njT+HlZkwZqqGX4Bu9cci8xHZNT+Um1gWKqCsAzcC0d95rcKMU5WBg6YRUcHyV0HZKQ==" + }, + "pg-pool": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.2.2.tgz", + "integrity": "sha512-ORJoFxAlmmros8igi608iVEbQNNZlp89diFVx6yV5v+ehmpMY9sK6QgpmgoXbmkNaBAx8cOOZh9g80kJv1ooyA==" + } + } + }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -2084,6 +2147,11 @@ "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", "dev": true }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -2387,6 +2455,14 @@ } } }, + "expression-eval": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/expression-eval/-/expression-eval-2.1.0.tgz", + "integrity": "sha512-FUJO/Akvl/JOWkvlqZaqbkhsEWlCJWDeZG4tzX96UH68D9FeRgYgtb55C2qtqbORC0Q6x5419EDjWu4IT9kQfg==", + "requires": { + "jsep": "^0.3.0" + } + }, "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -2439,7 +2515,6 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, "requires": { "to-regex-range": "^5.0.1" } @@ -2644,8 +2719,7 @@ "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" }, "get-package-type": { "version": "0.1.0", @@ -2956,6 +3030,11 @@ "standard-as-callback": "^2.0.1" } }, + "ip": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" + }, "ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -3029,8 +3108,7 @@ "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" }, "is-number-object": { "version": "1.0.4", @@ -3292,6 +3370,11 @@ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, + "jsep": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/jsep/-/jsep-0.3.5.tgz", + "integrity": "sha512-AoRLBDc6JNnKjNcmonituEABS5bcfqDhQAWWXNTFrqu6nVXBpBAGfcoTGZMFlIrh9FjmE1CQyX9CTNwZrXMMDA==" + }, "jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -3890,11 +3973,76 @@ } }, "loopback4-authorization": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/loopback4-authorization/-/loopback4-authorization-2.3.2.tgz", - "integrity": "sha512-9vMmcqRFWQOsAv1iocsWuZKkM33DUGmelGu6rQy7zsEAUnP5XgiRBJSUVZ/wbZnCbPvz9UughtBEHY7FzpCj6Q==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/loopback4-authorization/-/loopback4-authorization-3.1.1.tgz", + "integrity": "sha512-qcFRNnJsMwpUZwszaRftQ5rJUaU3p/0iO/gx/1ifaLeBfnTJ0t8lMYUGU1xnOU2ya8VTvauHJgx0gwCSnoWlbQ==", "requires": { - "lodash": "^4.17.11" + "@loopback/core": "^2.9.2", + "casbin": "^5.1.5", + "casbin-pg-adapter": "^1.4.0", + "lodash": "^4.17.19" + }, + "dependencies": { + "@loopback/context": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.13.0.tgz", + "integrity": "sha512-3R+6Mxm2QOAW8cjhEPaxP3i+uj1y9vkW7Ie91kuFa16yVHgOMrxPkcBmxduH5x4Cd1ZEKmtR/iVTfvRKoBYVxA==", + "requires": { + "@loopback/metadata": "^3.0.3", + "@types/debug": "^4.1.5", + "debug": "^4.2.0", + "hyperid": "^2.0.5", + "p-event": "^4.2.0", + "tslib": "^2.0.3", + "uuid": "^8.3.1" + } + }, + "@loopback/core": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@loopback/core/-/core-2.12.0.tgz", + "integrity": "sha512-kdJZzIF7PA9TjnKoEtfhn2G41stmS8gIsweJAbiG7i+S4REbZLGR4KBHzDtSyfeeDCcxayouGzKwi/BT8gWDgQ==", + "requires": { + "@loopback/context": "^3.13.0", + "debug": "^4.2.0", + "tslib": "^2.0.3" + } + }, + "@loopback/metadata": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-3.0.3.tgz", + "integrity": "sha512-VsY3XfQC42Icne5d4wrRgXAEWTmaC9xhzM8e9CmPlYvONfUG3HGPiUIIPWQYElN4IW+hhW56vId4pNI2vh974A==", + "requires": { + "debug": "^4.2.0", + "lodash": "^4.17.20", + "reflect-metadata": "^0.1.13", + "tslib": "^2.0.3" + }, + "dependencies": { + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + } + } + }, + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" + } + }, + "tslib": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" + }, + "uuid": { + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", + "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==" + } } }, "lower-case": { @@ -3979,6 +4127,15 @@ "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" }, + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + }, "mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", @@ -4246,6 +4403,115 @@ "http2-client": "^1.2.5" } }, + "node-pg-migrate": { + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/node-pg-migrate/-/node-pg-migrate-5.9.0.tgz", + "integrity": "sha512-FXXPzP45B/Vj7C23j4QFKvUfe+k2fCfGcaVG6LNdJ8powA+f5V9nLuihuPZRlhUb0xIWWxqc2qUKIPPGuGJS5g==", + "requires": { + "@types/pg": "^7.4.0", + "decamelize": "^4.0.0", + "lodash": "~4.17.0", + "mkdirp": "~1.0.0", + "yargs": "~16.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==" + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "y18n": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz", + "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==" + }, + "yargs": { + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.1.0.tgz", + "integrity": "sha512-upWFJOmDdHN0syLuESuvXDmrRcWd1QafJolHskzaw79uZa7/x53gxQKiR07W59GWY1tFhhU/Th9DrtSfpS782g==", + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.2", + "yargs-parser": "^20.2.2" + } + }, + "yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==" + } + } + }, "node-preload": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", @@ -4995,6 +5261,11 @@ "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-2.0.10.tgz", "integrity": "sha512-qdwzY92bHf3nwzIUcj+zJ0Qo5lpG/YxchahxIN8+ZVmXqkahKXsnl2aiJPHLYN9o5mB/leG+Xh6XKxtP7e0sjg==" }, + "pg-protocol": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.4.0.tgz", + "integrity": "sha512-El+aXWcwG/8wuFICMQjM5ZSAm6OWiJicFdNYo+VY3QP+8vI4SvLIWVe51PppTzMhikUJR+PsyIFKqfdXPz/yxA==" + }, "pg-types": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", @@ -5018,8 +5289,7 @@ "picomatch": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", - "dev": true + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==" }, "pkg-dir": { "version": "4.2.0", @@ -5323,8 +5593,7 @@ "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, "require-main-filename": { "version": "2.0.0", @@ -5768,7 +6037,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, "requires": { "ansi-regex": "^5.0.0" } @@ -5943,7 +6211,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, "requires": { "is-number": "^7.0.0" } diff --git a/sandbox/auth-multitenant-example/package.json b/sandbox/auth-multitenant-example/package.json index f2779f9b1e..ada1b77e41 100644 --- a/sandbox/auth-multitenant-example/package.json +++ b/sandbox/auth-multitenant-example/package.json @@ -60,7 +60,7 @@ "loopback-connector-kv-redis": "^3.0.3", "loopback-connector-postgresql": "^3.9.1", "loopback4-authentication": "^4.0.1", - "loopback4-authorization": "^2.3.2", + "loopback4-authorization": "3.1.1", "tslib": "^1.10.0" }, "devDependencies": { diff --git a/sandbox/auth-multitenant-example/src/controllers/home-page.controller.ts b/sandbox/auth-multitenant-example/src/controllers/home-page.controller.ts index 862b8c56b2..96b880b85e 100644 --- a/sandbox/auth-multitenant-example/src/controllers/home-page.controller.ts +++ b/sandbox/auth-multitenant-example/src/controllers/home-page.controller.ts @@ -18,7 +18,7 @@ export class HomePageController { ); } - @authorize(['*']) + @authorize({permissions: ['*']}) @get('/', { responses: { [STATUS_CODE.OK]: { diff --git a/sandbox/auth-multitenant-example/src/controllers/ping.controller.ts b/sandbox/auth-multitenant-example/src/controllers/ping.controller.ts index 0765dc3802..8362efcfe8 100644 --- a/sandbox/auth-multitenant-example/src/controllers/ping.controller.ts +++ b/sandbox/auth-multitenant-example/src/controllers/ping.controller.ts @@ -37,7 +37,7 @@ export class PingController { ) {} // Map to `GET /ping` - @authorize(['*']) + @authorize({permissions: ['*']}) @get('/ping', { responses: { '200': PING_RESPONSE, diff --git a/sandbox/notification-socket-example/package-lock.json b/sandbox/notification-socket-example/package-lock.json index 9fc9dbcf40..e1010c5853 100644 --- a/sandbox/notification-socket-example/package-lock.json +++ b/sandbox/notification-socket-example/package-lock.json @@ -1176,6 +1176,20 @@ "@types/node": "*" } }, + "@types/pg": { + "version": "7.14.6", + "resolved": "https://registry.npmjs.org/@types/pg/-/pg-7.14.6.tgz", + "integrity": "sha512-mf6kYvuYS2CObDxtsw5imE4vOvq+XHJtiJNFXir/fn9nxZtIFQ3/ECpokm8fNkxKBh7nQhyegHwNg1NIW+yYJA==", + "requires": { + "@types/node": "*", + "@types/pg-types": "*" + } + }, + "@types/pg-types": { + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@types/pg-types/-/pg-types-1.11.5.tgz", + "integrity": "sha512-L8ogeT6vDzT1vxlW3KITTCt+BVXXVkLXfZ/XNm6UqbcJgxf+KPO7yjWx7dQQE8RW07KopL10x2gNMs41+IkMGQ==" + }, "@types/qs": { "version": "6.9.5", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.5.tgz", @@ -1399,8 +1413,7 @@ "ansi-regex": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" }, "ansi-styles": { "version": "3.2.1", @@ -1502,6 +1515,11 @@ "array-filter": "^1.0.0" } }, + "await-lock": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/await-lock/-/await-lock-2.1.0.tgz", + "integrity": "sha512-t7Zm5YGgEEc/3eYAicF32m/TNvL+XOeYZy9CvBUeJY/szM7frLolFylhrlZNWV/ohWhcUXygrBGjYmoQdxF4CQ==" + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -1604,7 +1622,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, "requires": { "fill-range": "^7.0.1" } @@ -1621,6 +1638,11 @@ "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, + "buffer-writer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/buffer-writer/-/buffer-writer-2.0.0.tgz", + "integrity": "sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw==" + }, "bytes": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", @@ -1689,6 +1711,27 @@ } } }, + "casbin": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/casbin/-/casbin-5.2.0.tgz", + "integrity": "sha512-9qqcTAx0ysgF6xz1Mq83B7yD9inG4iEZ85tMZBmkXCIsECD9yAE8XhaONn7GhlnTave10k3ktGJ+9qNItXe30A==", + "requires": { + "await-lock": "^2.0.1", + "expression-eval": "^2.0.0", + "ip": "^1.1.5", + "micromatch": "^4.0.2" + } + }, + "casbin-pg-adapter": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/casbin-pg-adapter/-/casbin-pg-adapter-1.4.0.tgz", + "integrity": "sha512-9T0i+t0XwdnsBFl+20ojAED9+05SN4haJDLOJTUh9liHO+yBi6SXwSboD0MLzserFkxCs8VJJ+BNJlavExlU+A==", + "requires": { + "casbin": "^5.0.4", + "node-pg-migrate": "^5.1.0", + "pg": "^8.2.1" + } + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -2146,6 +2189,11 @@ "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", "dev": true }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -2486,6 +2534,14 @@ } } }, + "expression-eval": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/expression-eval/-/expression-eval-2.1.0.tgz", + "integrity": "sha512-FUJO/Akvl/JOWkvlqZaqbkhsEWlCJWDeZG4tzX96UH68D9FeRgYgtb55C2qtqbORC0Q6x5419EDjWu4IT9kQfg==", + "requires": { + "jsep": "^0.3.0" + } + }, "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -2557,7 +2613,6 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, "requires": { "to-regex-range": "^5.0.1" } @@ -2749,8 +2804,7 @@ "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" }, "get-package-type": { "version": "0.1.0", @@ -3009,6 +3063,11 @@ "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-3.0.1.tgz", "integrity": "sha512-CYdFeFexxhv/Bcny+Q0BfOV+ltRlJcd4BBZBYFX/O0u4npJrgZtIcjokegtiSMAvlMTJ+Koq0GBCc//3bueQxw==" }, + "ip": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" + }, "ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -3087,8 +3146,7 @@ "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" }, "is-number-object": { "version": "1.0.4", @@ -3347,6 +3405,11 @@ "xmlcreate": "^2.0.3" } }, + "jsep": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/jsep/-/jsep-0.3.5.tgz", + "integrity": "sha512-AoRLBDc6JNnKjNcmonituEABS5bcfqDhQAWWXNTFrqu6nVXBpBAGfcoTGZMFlIrh9FjmE1CQyX9CTNwZrXMMDA==" + }, "jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -3558,11 +3621,61 @@ } }, "loopback4-authorization": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/loopback4-authorization/-/loopback4-authorization-2.3.2.tgz", - "integrity": "sha512-9vMmcqRFWQOsAv1iocsWuZKkM33DUGmelGu6rQy7zsEAUnP5XgiRBJSUVZ/wbZnCbPvz9UughtBEHY7FzpCj6Q==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/loopback4-authorization/-/loopback4-authorization-3.1.1.tgz", + "integrity": "sha512-qcFRNnJsMwpUZwszaRftQ5rJUaU3p/0iO/gx/1ifaLeBfnTJ0t8lMYUGU1xnOU2ya8VTvauHJgx0gwCSnoWlbQ==", "requires": { - "lodash": "^4.17.11" + "@loopback/core": "^2.9.2", + "casbin": "^5.1.5", + "casbin-pg-adapter": "^1.4.0", + "lodash": "^4.17.19" + }, + "dependencies": { + "@loopback/context": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.13.0.tgz", + "integrity": "sha512-3R+6Mxm2QOAW8cjhEPaxP3i+uj1y9vkW7Ie91kuFa16yVHgOMrxPkcBmxduH5x4Cd1ZEKmtR/iVTfvRKoBYVxA==", + "requires": { + "@loopback/metadata": "^3.0.3", + "@types/debug": "^4.1.5", + "debug": "^4.2.0", + "hyperid": "^2.0.5", + "p-event": "^4.2.0", + "tslib": "^2.0.3", + "uuid": "^8.3.1" + } + }, + "@loopback/core": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@loopback/core/-/core-2.12.0.tgz", + "integrity": "sha512-kdJZzIF7PA9TjnKoEtfhn2G41stmS8gIsweJAbiG7i+S4REbZLGR4KBHzDtSyfeeDCcxayouGzKwi/BT8gWDgQ==", + "requires": { + "@loopback/context": "^3.13.0", + "debug": "^4.2.0", + "tslib": "^2.0.3" + } + }, + "@loopback/metadata": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-3.0.3.tgz", + "integrity": "sha512-VsY3XfQC42Icne5d4wrRgXAEWTmaC9xhzM8e9CmPlYvONfUG3HGPiUIIPWQYElN4IW+hhW56vId4pNI2vh974A==", + "requires": { + "debug": "^4.2.0", + "lodash": "^4.17.20", + "reflect-metadata": "^0.1.13", + "tslib": "^2.0.3" + } + }, + "tslib": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" + }, + "uuid": { + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", + "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==" + } } }, "lower-case": { @@ -3655,7 +3768,6 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", - "dev": true, "requires": { "braces": "^3.0.1", "picomatch": "^2.0.5" @@ -3875,6 +3987,115 @@ "http2-client": "^1.2.5" } }, + "node-pg-migrate": { + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/node-pg-migrate/-/node-pg-migrate-5.9.0.tgz", + "integrity": "sha512-FXXPzP45B/Vj7C23j4QFKvUfe+k2fCfGcaVG6LNdJ8powA+f5V9nLuihuPZRlhUb0xIWWxqc2qUKIPPGuGJS5g==", + "requires": { + "@types/pg": "^7.4.0", + "decamelize": "^4.0.0", + "lodash": "~4.17.0", + "mkdirp": "~1.0.0", + "yargs": "~16.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==" + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "y18n": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz", + "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==" + }, + "yargs": { + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.1.0.tgz", + "integrity": "sha512-upWFJOmDdHN0syLuESuvXDmrRcWd1QafJolHskzaw79uZa7/x53gxQKiR07W59GWY1tFhhU/Th9DrtSfpS782g==", + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.2", + "yargs-parser": "^20.2.2" + } + }, + "yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==" + } + } + }, "node-preload": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", @@ -4455,6 +4676,11 @@ "release-zalgo": "^1.0.0" } }, + "packet-reader": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/packet-reader/-/packet-reader-1.0.0.tgz", + "integrity": "sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ==" + }, "param-case": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.3.tgz", @@ -4550,11 +4776,64 @@ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true }, + "pg": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.5.0.tgz", + "integrity": "sha512-h+KHEwce67pAQilZhMCpCx1RC7rR1US7mdjwvKzHRaRxKQxbbFtv5UlwjzqILQ1dwhK+RVGqOVcahE/2KOcaeA==", + "requires": { + "buffer-writer": "2.0.0", + "packet-reader": "1.0.0", + "pg-connection-string": "^2.4.0", + "pg-pool": "^3.2.2", + "pg-protocol": "^1.4.0", + "pg-types": "^2.1.0", + "pgpass": "1.x" + } + }, + "pg-connection-string": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.4.0.tgz", + "integrity": "sha512-3iBXuv7XKvxeMrIgym7njT+HlZkwZqqGX4Bu9cci8xHZNT+Um1gWKqCsAzcC0d95rcKMU5WBg6YRUcHyV0HZKQ==" + }, + "pg-int8": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", + "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==" + }, + "pg-pool": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.2.2.tgz", + "integrity": "sha512-ORJoFxAlmmros8igi608iVEbQNNZlp89diFVx6yV5v+ehmpMY9sK6QgpmgoXbmkNaBAx8cOOZh9g80kJv1ooyA==" + }, + "pg-protocol": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.4.0.tgz", + "integrity": "sha512-El+aXWcwG/8wuFICMQjM5ZSAm6OWiJicFdNYo+VY3QP+8vI4SvLIWVe51PppTzMhikUJR+PsyIFKqfdXPz/yxA==" + }, + "pg-types": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", + "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", + "requires": { + "pg-int8": "1.0.1", + "postgres-array": "~2.0.0", + "postgres-bytea": "~1.0.0", + "postgres-date": "~1.0.4", + "postgres-interval": "^1.1.0" + } + }, + "pgpass": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.4.tgz", + "integrity": "sha512-YmuA56alyBq7M59vxVBfPJrGSozru8QAdoNlWuW3cz8l+UX3cWge0vTvjKhsSHSJpo3Bom8/Mm6hf0TR5GY0+w==", + "requires": { + "split2": "^3.1.1" + } + }, "picomatch": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", - "dev": true + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==" }, "pkg-dir": { "version": "4.2.0", @@ -4604,6 +4883,29 @@ } } }, + "postgres-array": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", + "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==" + }, + "postgres-bytea": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz", + "integrity": "sha1-AntTPAqokOJtFy1Hz5zOzFIazTU=" + }, + "postgres-date": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", + "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==" + }, + "postgres-interval": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", + "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", + "requires": { + "xtend": "^4.0.0" + } + }, "prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -4800,8 +5102,7 @@ "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, "require-main-filename": { "version": "2.0.0", @@ -5181,6 +5482,26 @@ "which": "^2.0.1" } }, + "split2": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", + "integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==", + "requires": { + "readable-stream": "^3.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -5266,7 +5587,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, "requires": { "ansi-regex": "^5.0.0" } @@ -5431,7 +5751,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, "requires": { "is-number": "^7.0.0" } @@ -5760,6 +6079,11 @@ "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.3.tgz", "integrity": "sha512-HgS+X6zAztGa9zIK3Y3LXuJes33Lz9x+YyTxgrkIdabu2vqcGOWwdfCpf1hWLRrd553wd4QCDf6BBO6FfdsRiQ==" }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + }, "y18n": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", diff --git a/sandbox/notification-socket-example/package.json b/sandbox/notification-socket-example/package.json index 6a7b21c1e5..48b7e2d2aa 100644 --- a/sandbox/notification-socket-example/package.json +++ b/sandbox/notification-socket-example/package.json @@ -56,7 +56,7 @@ "@loopback/service-proxy": "^2.3.0", "@sourceloop/core": "^1.0.0-alpha.14", "@sourceloop/notification-service": "^1.0.0-alpha.19", - "loopback4-authorization": "^2.3.2", + "loopback4-authorization": "3.1.1", "tslib": "^2.0.0" }, "devDependencies": { diff --git a/sandbox/notification-socket-example/src/controllers/home-page.controller.ts b/sandbox/notification-socket-example/src/controllers/home-page.controller.ts index 8862ab8c56..cd22ec1262 100644 --- a/sandbox/notification-socket-example/src/controllers/home-page.controller.ts +++ b/sandbox/notification-socket-example/src/controllers/home-page.controller.ts @@ -19,7 +19,7 @@ export class HomePageController { ); } - @authorize(['*']) + @authorize({permissions: ['*']}) @get('/', { responses: { [STATUS_CODE.OK]: { diff --git a/sandbox/notification-socket-example/src/controllers/ping.controller.ts b/sandbox/notification-socket-example/src/controllers/ping.controller.ts index 8f02c33a7c..fbc98ab26e 100644 --- a/sandbox/notification-socket-example/src/controllers/ping.controller.ts +++ b/sandbox/notification-socket-example/src/controllers/ping.controller.ts @@ -37,7 +37,7 @@ export class PingController { constructor(@inject(RestBindings.Http.REQUEST) private req: Request) {} // Map to `GET /ping` - @authorize(['*']) + @authorize({permissions: ['*']}) @get('/ping', { responses: { '200': PING_RESPONSE, diff --git a/sandbox/testing/package-lock.json b/sandbox/testing/package-lock.json index 38c94f8924..ad6e22351f 100644 --- a/sandbox/testing/package-lock.json +++ b/sandbox/testing/package-lock.json @@ -240,16 +240,6 @@ "to-fast-properties": "^2.0.0" } }, - "@dabh/diagnostics": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.2.tgz", - "integrity": "sha512-+A1YivoVDNNVCdfozHSR8v/jyuuLTMXwjWuxPFlFlUapXoGc+Gj9mDlTDDfrwl7rXCl2tNZ0kE8sIBO6YOn96Q==", - "requires": { - "colorspace": "1.1.x", - "enabled": "2.0.x", - "kuler": "^2.0.0" - } - }, "@hapi/address": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz", @@ -859,53 +849,6 @@ "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", "dev": true }, - "@sourceloop/core": { - "version": "1.0.0-alpha.3", - "resolved": "https://registry.npmjs.org/@sourceloop/core/-/core-1.0.0-alpha.3.tgz", - "integrity": "sha512-E6cIFNXrGbo6krk3uuy51NHCAYI3RqE0q/a9l8FwYcriwjHxPz9vkikKh1hb8L8Pv7xR9+0F+YhnOEUaKgY9rQ==", - "requires": { - "@loopback/boot": "^2.3.1", - "@loopback/context": "^3.8.1", - "@loopback/core": "^2.7.0", - "@loopback/repository": "^2.5.1", - "@loopback/rest": "^5.0.1", - "@loopback/service-proxy": "^2.3.1", - "i18n": "^0.10.0", - "jsonwebtoken": "^8.5.1", - "lodash": "^4.17.15", - "logform": "^2.1.2", - "loopback-datasource-juggler": "^4.21.2", - "loopback4-authentication": "^3.0.1", - "loopback4-authorization": "^2.3.2", - "loopback4-helmet": "^1.0.3", - "loopback4-ratelimiter": "^1.0.0", - "loopback4-soft-delete": "^2.0.0", - "moment": "^2.26.0", - "moment-timezone": "^0.5.31", - "tslib": "^1.10.0", - "winston": "^3.2.1" - } - }, - "@sourceloop/notification-service": { - "version": "1.0.0-alpha.3", - "resolved": "https://registry.npmjs.org/@sourceloop/notification-service/-/notification-service-1.0.0-alpha.3.tgz", - "integrity": "sha512-8xSQlQXtKJJNtfAKcH67x6jsxZpKRVb9EmL/zz6nr5tRhnTA3L8NaYCc2GdmxcDzkYbxl879+1tlWH+1+B1Rag==", - "requires": { - "@loopback/boot": "^2.3.1", - "@loopback/context": "^3.8.2", - "@loopback/core": "^2.7.0", - "@loopback/repository": "^2.5.1", - "@loopback/rest": "^5.0.1", - "@sourceloop/core": "^1.0.0-alpha.3", - "aws-sdk": "^2.694.0", - "lodash": "^4.17.15", - "loopback4-authentication": "^3.0.1", - "loopback4-authorization": "^2.3.2", - "loopback4-notifications": "^1.0.0", - "pubnub": "^4.28.0", - "tslib": "^1.10.0" - } - }, "@types/body-parser": { "version": "1.19.0", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.0.tgz", @@ -1049,8 +992,7 @@ "@types/node": { "version": "10.17.26", "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.26.tgz", - "integrity": "sha512-myMwkO2Cr82kirHY8uknNRHEVtn0wV3DTQfkrjx17jmkstDRZ24gNUdl8AHXVyVclTYI/bNjgTPTAWvWLqXqkw==", - "dev": true + "integrity": "sha512-myMwkO2Cr82kirHY8uknNRHEVtn0wV3DTQfkrjx17jmkstDRZ24gNUdl8AHXVyVclTYI/bNjgTPTAWvWLqXqkw==" }, "@types/on-finished": { "version": "2.3.1", @@ -1067,6 +1009,20 @@ } } }, + "@types/pg": { + "version": "7.14.6", + "resolved": "https://registry.npmjs.org/@types/pg/-/pg-7.14.6.tgz", + "integrity": "sha512-mf6kYvuYS2CObDxtsw5imE4vOvq+XHJtiJNFXir/fn9nxZtIFQ3/ECpokm8fNkxKBh7nQhyegHwNg1NIW+yYJA==", + "requires": { + "@types/node": "*", + "@types/pg-types": "*" + } + }, + "@types/pg-types": { + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@types/pg-types/-/pg-types-1.11.5.tgz", + "integrity": "sha512-L8ogeT6vDzT1vxlW3KITTCt+BVXXVkLXfZ/XNm6UqbcJgxf+KPO7yjWx7dQQE8RW07KopL10x2gNMs41+IkMGQ==" + }, "@types/qs": { "version": "6.9.3", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.3.tgz", @@ -1299,8 +1255,7 @@ "ansi-regex": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" }, "ansi-styles": { "version": "3.2.1", @@ -1353,29 +1308,6 @@ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "asn1.js": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", - "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", - "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - }, "ast-types": { "version": "0.13.3", "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.3.tgz", @@ -1411,6 +1343,11 @@ "array-filter": "^1.0.0" } }, + "await-lock": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/await-lock/-/await-lock-2.1.0.tgz", + "integrity": "sha512-t7Zm5YGgEEc/3eYAicF32m/TNvL+XOeYZy9CvBUeJY/szM7frLolFylhrlZNWV/ohWhcUXygrBGjYmoQdxF4CQ==" + }, "aws-sdk": { "version": "2.694.0", "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.694.0.tgz", @@ -1434,16 +1371,6 @@ } } }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" - }, - "aws4": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.0.tgz", - "integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==" - }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -1454,24 +1381,11 @@ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" }, - "base64url": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", - "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==" - }, "bcp47": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/bcp47/-/bcp47-1.1.2.tgz", "integrity": "sha1-NUvjMH/9CEM6ePXh4glYRfifx/4=" }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "requires": { - "tweetnacl": "^0.14.3" - } - }, "better-ajv-errors": { "version": "0.6.7", "resolved": "https://registry.npmjs.org/better-ajv-errors/-/better-ajv-errors-0.6.7.tgz", @@ -1507,11 +1421,6 @@ "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" }, - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" - }, "body-parser": { "version": "1.19.0", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", @@ -1571,11 +1480,6 @@ } } }, - "bowser": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.9.0.tgz", - "integrity": "sha512-2ld76tuLBNFekRgmJfT2+3j5MIrP6bFict8WAIT3beq+srz1gcKNAdNKMqHqauQt63NmAa88HfP1/Ypa9Er3HA==" - }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1589,16 +1493,10 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, "requires": { "fill-range": "^7.0.1" } }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" - }, "browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", @@ -1615,11 +1513,6 @@ "isarray": "^1.0.0" } }, - "buffer-equal-constant-time": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" - }, "buffer-from": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", @@ -1631,53 +1524,11 @@ "resolved": "https://registry.npmjs.org/buffer-writer/-/buffer-writer-2.0.0.tgz", "integrity": "sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw==" }, - "bunyan": { - "version": "1.8.14", - "resolved": "https://registry.npmjs.org/bunyan/-/bunyan-1.8.14.tgz", - "integrity": "sha512-LlahJUxXzZLuw/hetUQJmRgZ1LF6+cr5TPpRj6jf327AsiIq2jhYEH4oqUUkVKTor+9w2BT3oxVwhzE5lw9tcg==", - "requires": { - "dtrace-provider": "~0.8", - "moment": "^2.19.3", - "mv": "~2", - "safe-json-stringify": "~1" - } - }, "bytes": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" }, - "cache-manager": { - "version": "2.11.1", - "resolved": "https://registry.npmjs.org/cache-manager/-/cache-manager-2.11.1.tgz", - "integrity": "sha512-XhUuc9eYwkzpK89iNewFwtvcDYMUsvtwzHeyEOPJna/WsVsXcrzsA1ft2M0QqPNunEzLhNCYPo05tEfG+YuNow==", - "requires": { - "async": "1.5.2", - "lodash.clonedeep": "4.5.0", - "lru-cache": "4.0.0" - }, - "dependencies": { - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" - }, - "lru-cache": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.0.0.tgz", - "integrity": "sha1-tcvwFVbBaWb+vlTO7A+03JDfbCg=", - "requires": { - "pseudomap": "^1.0.1", - "yallist": "^2.0.0" - } - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" - } - } - }, "caching-transform": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", @@ -1717,11 +1568,6 @@ "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, - "camelize": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.0.tgz", - "integrity": "sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs=" - }, "capital-case": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/capital-case/-/capital-case-1.0.3.tgz", @@ -1732,10 +1578,52 @@ "upper-case-first": "^2.0.1" } }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + "casbin": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/casbin/-/casbin-5.2.0.tgz", + "integrity": "sha512-9qqcTAx0ysgF6xz1Mq83B7yD9inG4iEZ85tMZBmkXCIsECD9yAE8XhaONn7GhlnTave10k3ktGJ+9qNItXe30A==", + "requires": { + "await-lock": "^2.0.1", + "expression-eval": "^2.0.0", + "ip": "^1.1.5", + "micromatch": "^4.0.2" + } + }, + "casbin-pg-adapter": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/casbin-pg-adapter/-/casbin-pg-adapter-1.4.0.tgz", + "integrity": "sha512-9T0i+t0XwdnsBFl+20ojAED9+05SN4haJDLOJTUh9liHO+yBi6SXwSboD0MLzserFkxCs8VJJ+BNJlavExlU+A==", + "requires": { + "casbin": "^5.0.4", + "node-pg-migrate": "^5.1.0", + "pg": "^8.2.1" + }, + "dependencies": { + "pg": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.5.0.tgz", + "integrity": "sha512-h+KHEwce67pAQilZhMCpCx1RC7rR1US7mdjwvKzHRaRxKQxbbFtv5UlwjzqILQ1dwhK+RVGqOVcahE/2KOcaeA==", + "requires": { + "buffer-writer": "2.0.0", + "packet-reader": "1.0.0", + "pg-connection-string": "^2.4.0", + "pg-pool": "^3.2.2", + "pg-protocol": "^1.4.0", + "pg-types": "^2.1.0", + "pgpass": "1.x" + } + }, + "pg-connection-string": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.4.0.tgz", + "integrity": "sha512-3iBXuv7XKvxeMrIgym7njT+HlZkwZqqGX4Bu9cci8xHZNT+Um1gWKqCsAzcC0d95rcKMU5WBg6YRUcHyV0HZKQ==" + }, + "pg-pool": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.2.2.tgz", + "integrity": "sha512-ORJoFxAlmmros8igi608iVEbQNNZlp89diFVx6yV5v+ehmpMY9sK6QgpmgoXbmkNaBAx8cOOZh9g80kJv1ooyA==" + } + } }, "cbor-js": { "version": "0.1.0", @@ -1880,16 +1768,6 @@ } } }, - "clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=" - }, - "cluster-key-slot": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/cluster-key-slot/-/cluster-key-slot-1.1.0.tgz", - "integrity": "sha512-2Nii8p3RwAPiFwsnZvukotvow2rIHM+yQ6ZcBXGHdniadkYGZYiGmkHJIbZPIV9nfv7m/U1IPMVVcAhoWFeklw==" - }, "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -1901,15 +1779,6 @@ "integrity": "sha512-cadkfKp6932H8UkhzE/gcUqhRMNf8jHzkAN7+5Myabswaghu4xABTgPHDCjW+dBAJxj/SpkTYokpzDqY4pCzQw==", "dev": true }, - "color": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/color/-/color-3.0.0.tgz", - "integrity": "sha512-jCpd5+s0s0t7p3pHQKpnJ0TpQKKdleP71LWcA0aqiljpiuAkOSUFN/dyH8ZwF0hRmFlrIuRhufds1QyEP9EB+w==", - "requires": { - "color-convert": "^1.9.1", - "color-string": "^1.5.2" - } - }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -1923,29 +1792,6 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, - "color-string": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.3.tgz", - "integrity": "sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==", - "requires": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - } - }, - "colors": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", - "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==" - }, - "colorspace": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.2.tgz", - "integrity": "sha512-vt+OoIP2d76xLhjwbBaucYlNSpPsrJWPlBTtwCpQKIu6/CSMutyzX93O/Do0qzpH3YoHEes8YEFXyZ797rEhzQ==", - "requires": { - "color": "3.0.x", - "text-hex": "1.0.x" - } - }, "combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -1995,11 +1841,6 @@ } } }, - "content-security-policy-builder": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/content-security-policy-builder/-/content-security-policy-builder-2.1.0.tgz", - "integrity": "sha512-/MtLWhJVvJNkA9dVLAp6fg9LxD2gfI6R2Fi1hPmfjYXSahJJzcfvoeDOxSyp4NvxMuwWv3WMssE9o31DoULHrQ==" - }, "content-type": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", @@ -2072,19 +1913,6 @@ "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", "integrity": "sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=" }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "dasherize": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dasherize/-/dasherize-2.0.0.tgz", - "integrity": "sha1-bYCcnNDPe7iVLYD8hPoT1H3bEwg=" - }, "data-uri-to-buffer": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-1.2.0.tgz", @@ -2146,14 +1974,6 @@ "strip-bom": "^4.0.0" } }, - "defaults": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", - "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", - "requires": { - "clone": "^1.0.2" - } - }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -2184,11 +2004,6 @@ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" }, - "denque": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/denque/-/denque-1.4.1.tgz", - "integrity": "sha512-OfzPuSZKGcgr96rf1oODnfjqBFmr1DVoc/TrItj3Ohe0Ah1C5WX5Baquw/9U9KovnQ88EqmJbD66rKYUQYN1tQ==" - }, "depd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", @@ -2214,11 +2029,6 @@ "esutils": "^2.0.2" } }, - "dont-sniff-mimetype": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/dont-sniff-mimetype/-/dont-sniff-mimetype-1.1.0.tgz", - "integrity": "sha512-ZjI4zqTaxveH2/tTlzS1wFp+7ncxNZaIEWYg3lzZRHkKf5zPT/MnEG6WL0BhHMJUabkh8GeU5NL5j+rEUCb7Ug==" - }, "dot-case": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.3.tgz", @@ -2228,37 +2038,6 @@ "tslib": "^1.10.0" } }, - "double-ended-queue": { - "version": "2.1.0-0", - "resolved": "https://registry.npmjs.org/double-ended-queue/-/double-ended-queue-2.1.0-0.tgz", - "integrity": "sha1-ED01J/0xUo9AGIEwyEHv3XgmTlw=" - }, - "dtrace-provider": { - "version": "0.8.8", - "resolved": "https://registry.npmjs.org/dtrace-provider/-/dtrace-provider-0.8.8.tgz", - "integrity": "sha512-b7Z7cNtHPhH9EJhNNbbeqTcXB8LGFFZhq1PGgEvpeHlzd36bhbdTWoE/Ba/YguqpBSlAPKnARWhVlhunCMwfxg==", - "optional": true, - "requires": { - "nan": "^2.14.0" - } - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "ecdsa-sig-formatter": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", - "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", - "requires": { - "safe-buffer": "^5.0.1" - } - }, "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -2269,30 +2048,10 @@ "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.7.4.tgz", "integrity": "sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==" }, - "elliptic": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", - "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - } - }, "emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "enabled": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/enabled/-/enabled-2.0.0.tgz", - "integrity": "sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==" + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "encodeurl": { "version": "1.0.2", @@ -2375,6 +2134,11 @@ "es6-promise": "^4.0.3" } }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -2736,10 +2500,13 @@ } } }, - "express-rate-limit": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-5.1.3.tgz", - "integrity": "sha512-TINcxve5510pXj4n9/1AMupkj3iWxl3JuZaWhCdYDlZeoCPqweGZrxbrlqTCFb1CT5wli7s8e2SH/Qz2c9GorA==" + "expression-eval": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/expression-eval/-/expression-eval-2.1.0.tgz", + "integrity": "sha512-FUJO/Akvl/JOWkvlqZaqbkhsEWlCJWDeZG4tzX96UH68D9FeRgYgtb55C2qtqbORC0Q6x5419EDjWu4IT9kQfg==", + "requires": { + "jsep": "^0.3.0" + } }, "extend": { "version": "3.0.2", @@ -2757,11 +2524,6 @@ "tmp": "^0.0.33" } }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" - }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -2782,16 +2544,6 @@ "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==" }, - "feature-policy": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/feature-policy/-/feature-policy-0.3.0.tgz", - "integrity": "sha512-ZtijOTFN7TzCujt1fnNhfWPFPSHeZkesff9AXZj+UEjYBynWNUIYpC87Ve4wHzyexQsImicLu7WsC2LHq7/xrQ==" - }, - "fecha": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.0.tgz", - "integrity": "sha512-aN3pcx/DSmtyoovUudctc8+6Hl4T+hI9GBBHLjA76jdZl7+b1sgh5g4k+u/GL3dTy1/pnYzKp69FpJ0OicE3Wg==" - }, "figures": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", @@ -2827,7 +2579,6 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, "requires": { "to-regex-range": "^5.0.1" } @@ -2926,11 +2677,6 @@ "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", "dev": true }, - "fn.name": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz", - "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==" - }, "foreach": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", @@ -2946,11 +2692,6 @@ "signal-exit": "^3.0.2" } }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" - }, "form-data": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", @@ -3058,8 +2799,7 @@ "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" }, "get-package-type": { "version": "0.1.0", @@ -3109,14 +2849,6 @@ } } }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "requires": { - "assert-plus": "^1.0.0" - } - }, "glob": { "version": "7.1.6", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", @@ -3174,20 +2906,6 @@ "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", "dev": true }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" - }, - "har-validator": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", - "requires": { - "ajv": "^6.5.5", - "har-schema": "^2.0.0" - } - }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -3206,15 +2924,6 @@ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==" }, - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, "hasha": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.0.tgz", @@ -3240,68 +2949,6 @@ "tslib": "^1.10.0" } }, - "helmet": { - "version": "3.23.3", - "resolved": "https://registry.npmjs.org/helmet/-/helmet-3.23.3.tgz", - "integrity": "sha512-U3MeYdzPJQhtvqAVBPntVgAvNSOJyagwZwyKsFdyRa8TV3pOKVFljalPOCxbw5Wwf2kncGhmP0qHjyazIdNdSA==", - "requires": { - "depd": "2.0.0", - "dont-sniff-mimetype": "1.1.0", - "feature-policy": "0.3.0", - "helmet-crossdomain": "0.4.0", - "helmet-csp": "2.10.0", - "hide-powered-by": "1.1.0", - "hpkp": "2.0.0", - "hsts": "2.2.0", - "nocache": "2.1.0", - "referrer-policy": "1.2.0", - "x-xss-protection": "1.3.0" - } - }, - "helmet-crossdomain": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/helmet-crossdomain/-/helmet-crossdomain-0.4.0.tgz", - "integrity": "sha512-AB4DTykRw3HCOxovD1nPR16hllrVImeFp5VBV9/twj66lJ2nU75DP8FPL0/Jp4jj79JhTfG+pFI2MD02kWJ+fA==" - }, - "helmet-csp": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/helmet-csp/-/helmet-csp-2.10.0.tgz", - "integrity": "sha512-Rz953ZNEFk8sT2XvewXkYN0Ho4GEZdjAZy4stjiEQV3eN7GDxg1QKmYggH7otDyIA7uGA6XnUMVSgeJwbR5X+w==", - "requires": { - "bowser": "2.9.0", - "camelize": "1.0.0", - "content-security-policy-builder": "2.1.0", - "dasherize": "2.0.0" - } - }, - "hide-powered-by": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/hide-powered-by/-/hide-powered-by-1.1.0.tgz", - "integrity": "sha512-Io1zA2yOA1YJslkr+AJlWSf2yWFkKjvkcL9Ni1XSUqnGLr/qRQe2UI3Cn/J9MsJht7yEVCe0SscY1HgVMujbgg==" - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "hpkp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hpkp/-/hpkp-2.0.0.tgz", - "integrity": "sha1-EOFCJk52IVpdMMROxD3mTe5tFnI=" - }, - "hsts": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/hsts/-/hsts-2.2.0.tgz", - "integrity": "sha512-ToaTnQ2TbJkochoVcdXYm4HOCliNozlviNsg+X2XQLQvZNI/kCHR9rZxVYpJB3UPcHz80PgxRyWQ7PdU1r+VBQ==", - "requires": { - "depd": "2.0.0" - } - }, "html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -3351,16 +2998,6 @@ } } }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, "http-status": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/http-status/-/http-status-1.4.2.tgz", @@ -3420,26 +3057,6 @@ } } }, - "i18n": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/i18n/-/i18n-0.10.0.tgz", - "integrity": "sha512-lCSpIm/ZLUCQMAv+UAjSEYzPq96KG7fIx6o1mNQ0MuTBzXpPgd31t4WLzbPG10nKTLJzj9176dgOG7C0wUquSA==", - "requires": { - "debug": "*", - "make-plural": "^6.2.1", - "math-interval-parser": "^2.0.1", - "messageformat": "^2.3.0", - "mustache": "^4.0.1", - "sprintf-js": "^1.1.2" - }, - "dependencies": { - "sprintf-js": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", - "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==" - } - } - }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -3578,22 +3195,6 @@ "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-3.0.1.tgz", "integrity": "sha512-CYdFeFexxhv/Bcny+Q0BfOV+ltRlJcd4BBZBYFX/O0u4npJrgZtIcjokegtiSMAvlMTJ+Koq0GBCc//3bueQxw==" }, - "ioredis": { - "version": "4.17.3", - "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-4.17.3.tgz", - "integrity": "sha512-iRvq4BOYzNFkDnSyhx7cmJNOi1x/HWYe+A4VXHBu4qpwJaGT1Mp+D2bVGJntH9K/Z/GeOM/Nprb8gB3bmitz1Q==", - "requires": { - "cluster-key-slot": "^1.1.0", - "debug": "^4.1.1", - "denque": "^1.1.0", - "lodash.defaults": "^4.2.0", - "lodash.flatten": "^4.4.0", - "redis-commands": "1.5.0", - "redis-errors": "^1.2.0", - "redis-parser": "^3.0.0", - "standard-as-callback": "^2.0.1" - } - }, "ip": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", @@ -3609,11 +3210,6 @@ "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==" }, - "is-arrayish": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", - "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" - }, "is-bigint": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.0.tgz", @@ -3657,8 +3253,7 @@ "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" }, "is-glob": { "version": "4.0.1", @@ -3677,8 +3272,7 @@ "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" }, "is-number-object": { "version": "1.0.4", @@ -3730,7 +3324,8 @@ "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true }, "is-weakmap": { "version": "2.0.1", @@ -3758,11 +3353,6 @@ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" - }, "istanbul-lib-coverage": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", @@ -3924,10 +3514,10 @@ "xmlcreate": "^2.0.3" } }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + "jsep": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/jsep/-/jsep-0.3.5.tgz", + "integrity": "sha512-AoRLBDc6JNnKjNcmonituEABS5bcfqDhQAWWXNTFrqu6nVXBpBAGfcoTGZMFlIrh9FjmE1CQyX9CTNwZrXMMDA==" }, "jsesc": { "version": "2.5.2", @@ -3943,11 +3533,6 @@ "deep-equal": "^2.0.3" } }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" - }, "json-schema-compare": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/json-schema-compare/-/json-schema-compare-0.2.2.tgz", @@ -3967,11 +3552,6 @@ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" - }, "json-to-ast": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/json-to-ast/-/json-to-ast-2.1.0.tgz", @@ -4007,81 +3587,12 @@ "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=", "dev": true }, - "jsonwebtoken": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", - "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", - "requires": { - "jws": "^3.2.2", - "lodash.includes": "^4.3.0", - "lodash.isboolean": "^3.0.3", - "lodash.isinteger": "^4.0.4", - "lodash.isnumber": "^3.0.3", - "lodash.isplainobject": "^4.0.6", - "lodash.isstring": "^4.0.1", - "lodash.once": "^4.0.0", - "ms": "^2.1.1", - "semver": "^5.6.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - } - } - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, "just-extend": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.1.0.tgz", "integrity": "sha512-ApcjaOdVTJ7y4r08xI5wIqpvwS48Q0PBG4DJROcEkH1f8MdAiNFyFxz3xoL0LWAVwjrwPYZdVHHxhRHcx/uGLA==", "dev": true }, - "jwa": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", - "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", - "requires": { - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" - } - }, - "jwk-to-pem": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/jwk-to-pem/-/jwk-to-pem-1.2.6.tgz", - "integrity": "sha1-1QfOzkAInFJI4J7GgmaiAwqcYyU=", - "requires": { - "asn1.js": "^4.5.2", - "elliptic": "^6.2.3", - "safe-buffer": "^5.0.1" - } - }, - "jws": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", - "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", - "requires": { - "jwa": "^1.4.1", - "safe-buffer": "^5.0.1" - } - }, - "kuler": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", - "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==" - }, "lcid": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/lcid/-/lcid-3.1.1.tgz", @@ -4126,21 +3637,6 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=" - }, - "lodash.defaults": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", - "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=" - }, - "lodash.flatten": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", - "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=" - }, "lodash.flattendeep": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", @@ -4153,41 +3649,6 @@ "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", "dev": true }, - "lodash.includes": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", - "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8=" - }, - "lodash.isboolean": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", - "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=" - }, - "lodash.isinteger": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", - "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M=" - }, - "lodash.isnumber": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", - "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w=" - }, - "lodash.isplainobject": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=" - }, - "lodash.isstring": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" - }, - "lodash.once": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", - "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" - }, "log-symbols": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", @@ -4197,18 +3658,6 @@ "chalk": "^2.4.2" } }, - "logform": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/logform/-/logform-2.2.0.tgz", - "integrity": "sha512-N0qPlqfypFx7UHNn4B3lzS/b0uLqt2hmuoa+PpuXNYgozdJYAyauF5Ky0BWVjrxDlMWiT3qN4zPq3vVAfZy7Yg==", - "requires": { - "colors": "^1.2.1", - "fast-safe-stringify": "^2.0.4", - "fecha": "^4.2.0", - "ms": "^2.1.1", - "triple-beam": "^1.3.0" - } - }, "loopback-connector": { "version": "4.11.0", "resolved": "https://registry.npmjs.org/loopback-connector/-/loopback-connector-4.11.0.tgz", @@ -4229,149 +3678,10 @@ } } }, - "loopback-connector-kv-redis": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/loopback-connector-kv-redis/-/loopback-connector-kv-redis-3.0.3.tgz", - "integrity": "sha512-01eX6cC++W8DRwIHmnE7z8NrCQhqB+R48eAh+xT4PsEjDGmmRnA5HxQa5I3NJnL8+X1qEzSESkH/+QTo5tkxaQ==", - "requires": { - "debug": "^4.1.1", - "ioredis": "^4.9.3", - "loopback-connector": "^4.0.0", - "strong-globalize": "^4.1.0" - }, - "dependencies": { - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "requires": { - "pump": "^3.0.0" - } - }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==" - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" - }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "requires": { - "invert-kv": "^2.0.0" - } - }, - "mem": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", - "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - } - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "requires": { - "path-key": "^2.0.0" - } - }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" - }, - "strong-globalize": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/strong-globalize/-/strong-globalize-4.1.3.tgz", - "integrity": "sha512-SJegV7w5D4AodEspZJtJ7rls3fmi+Zc0PdyJCqBsg4RN9B8TC80/uAI2fikC+s1Jp9FLvr2vDX8f0Fqc62M4OA==", - "requires": { - "accept-language": "^3.0.18", - "debug": "^4.1.1", - "globalize": "^1.4.2", - "lodash": "^4.17.4", - "md5": "^2.2.1", - "mkdirp": "^0.5.1", - "os-locale": "^3.1.0", - "yamljs": "^0.3.0" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "loopback-connector-postgresql": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/loopback-connector-postgresql/-/loopback-connector-postgresql-3.9.1.tgz", - "integrity": "sha512-shLmcZvbjKCuGNkF3i0xoycIe1VnvcPL4lh9VLc0r8c/7EpeSEmudtyauxOKCtgspbhtlJgAULE9ugUwykDMKQ==", + "loopback-connector-postgresql": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/loopback-connector-postgresql/-/loopback-connector-postgresql-3.9.1.tgz", + "integrity": "sha512-shLmcZvbjKCuGNkF3i0xoycIe1VnvcPL4lh9VLc0r8c/7EpeSEmudtyauxOKCtgspbhtlJgAULE9ugUwykDMKQ==", "requires": { "async": "^0.9.0", "bluebird": "^3.4.6", @@ -4592,269 +3902,79 @@ } } }, - "loopback4-authentication": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/loopback4-authentication/-/loopback4-authentication-3.0.1.tgz", - "integrity": "sha512-U1guSMCou71VDTsdPI8mm15eqZ6902L7+BhTBg0u5FvWsUyouLfYOmxbb1qfrCe1q7+W7+VMlk+m8j2aOqX3bA==", - "requires": { - "@loopback/core": "^2.7.0", - "passport": "^0.4.1", - "passport-azure-ad": "^4.2.1", - "passport-google-oauth20": "^2.0.0", - "passport-http-bearer": "^1.0.1", - "passport-local": "^1.0.0", - "passport-oauth2-client-password": "^0.1.2" - } - }, "loopback4-authorization": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/loopback4-authorization/-/loopback4-authorization-2.3.2.tgz", - "integrity": "sha512-9vMmcqRFWQOsAv1iocsWuZKkM33DUGmelGu6rQy7zsEAUnP5XgiRBJSUVZ/wbZnCbPvz9UughtBEHY7FzpCj6Q==", - "requires": { - "lodash": "^4.17.11" - } - }, - "loopback4-helmet": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/loopback4-helmet/-/loopback4-helmet-1.1.0.tgz", - "integrity": "sha512-uP+ShPrNKVjL5k/VUSnaExMIESQ7/pYBm3dygsNhJegiDbwo69WC5hooIhSOzsOCn59DQpAslRI7UHLfCZXCBA==", - "requires": { - "@loopback/boot": "^2.3.1", - "@loopback/context": "^3.8.1", - "@loopback/core": "^2.7.0", - "@loopback/rest": "^5.0.1", - "helmet": "^3.23.3" - } - }, - "loopback4-notifications": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/loopback4-notifications/-/loopback4-notifications-1.0.0.tgz", - "integrity": "sha512-TDl+d0yi7uD3yw8uHSgMxYuR66k2m1hVq8/5EXJ7a/6UfFNGaWlvGuVY35XhtcjwWP5P6GLfTFwUtEZLvQHXBw==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/loopback4-authorization/-/loopback4-authorization-3.1.1.tgz", + "integrity": "sha512-qcFRNnJsMwpUZwszaRftQ5rJUaU3p/0iO/gx/1ifaLeBfnTJ0t8lMYUGU1xnOU2ya8VTvauHJgx0gwCSnoWlbQ==", "requires": { - "@loopback/boot": "^2.3.1", - "@loopback/context": "^3.8.1", - "@loopback/core": "^2.7.0", - "@loopback/rest": "^5.0.1", - "tslib": "^1.10.0" - } - }, - "loopback4-ratelimiter": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/loopback4-ratelimiter/-/loopback4-ratelimiter-1.0.0.tgz", - "integrity": "sha512-CaRuwRc1FwcZ4duqbM6YRWW5WqLTf47xcR7Fn1KsrA/k3ZM+LkN1cuTgOJaEpB+huAEoMgwOhmFA1hFGvzhK+g==", - "requires": { - "@loopback/boot": "^1.7.4", - "@loopback/context": "^2.1.1", - "@loopback/core": "^1.12.4", - "@loopback/repository": "^2.3.0", - "@loopback/rest": "^3.3.2", - "express-rate-limit": "^5.1.3", - "loopback-connector-kv-redis": "^3.0.3", - "rate-limit-redis": "^1.7.0" + "@loopback/core": "^2.9.2", + "casbin": "^5.1.5", + "casbin-pg-adapter": "^1.4.0", + "lodash": "^4.17.19" }, "dependencies": { - "@loopback/boot": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/@loopback/boot/-/boot-1.7.4.tgz", - "integrity": "sha512-31mgqBCM5aEe/P+fSPh07S2PR0WNVoHl3kIoHMn6VNVXHz8BsCD249m09E3wGFP8QgqDOnuMKdYeJi99cHNzkg==", - "requires": { - "@loopback/context": "^2.1.1", - "@loopback/core": "^1.12.4", - "@loopback/model-api-builder": "^1.1.4", - "@loopback/repository": "^1.19.1", - "@loopback/service-proxy": "^1.3.17", - "@types/debug": "^4.1.5", - "@types/glob": "^7.1.1", - "debug": "^4.1.1", - "glob": "^7.1.6" - }, - "dependencies": { - "@loopback/repository": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/@loopback/repository/-/repository-1.19.1.tgz", - "integrity": "sha512-7LwZEOtjkzz3mu9TVyOyNolW30pWt862d6IzZRQL9JRGpDkTlbIralm18sICyVF6UgBNX+IcK+IpA6CrhktlFg==", - "requires": { - "@loopback/context": "^2.1.1", - "@loopback/core": "^1.12.4", - "@types/debug": "^4.1.5", - "debug": "^4.1.1", - "lodash": "^4.17.15", - "loopback-datasource-juggler": "^4.18.1" - } - } - } - }, "@loopback/context": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@loopback/context/-/context-2.1.1.tgz", - "integrity": "sha512-shkzVZZLua7MTjBvaBbFz9Q3/8M21kdgX0XiGc5M6RWkUL6+ipuyVcPEQMC+L6KNn7omZxDNdagbfwcTB97wmA==", + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.13.0.tgz", + "integrity": "sha512-3R+6Mxm2QOAW8cjhEPaxP3i+uj1y9vkW7Ie91kuFa16yVHgOMrxPkcBmxduH5x4Cd1ZEKmtR/iVTfvRKoBYVxA==", "requires": { - "@loopback/metadata": "^1.4.1", - "debug": "^4.1.1", - "p-event": "^4.1.0", - "uuid": "^3.4.0" + "@loopback/metadata": "^3.0.3", + "@types/debug": "^4.1.5", + "debug": "^4.2.0", + "hyperid": "^2.0.5", + "p-event": "^4.2.0", + "tslib": "^2.0.3", + "uuid": "^8.3.1" } }, "@loopback/core": { - "version": "1.12.4", - "resolved": "https://registry.npmjs.org/@loopback/core/-/core-1.12.4.tgz", - "integrity": "sha512-W1OzwhBc1GUcwQVNzhQMf3tpvhEDKkh+2HPLZVOuYxN+b66uZI7poTxKSJ156dgNGAi+luCvkZiGkNQXS1tpRA==", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@loopback/core/-/core-2.12.0.tgz", + "integrity": "sha512-kdJZzIF7PA9TjnKoEtfhn2G41stmS8gIsweJAbiG7i+S4REbZLGR4KBHzDtSyfeeDCcxayouGzKwi/BT8gWDgQ==", "requires": { - "@loopback/context": "^2.1.1", - "debug": "^4.1.1", - "p-event": "^4.1.0" + "@loopback/context": "^3.13.0", + "debug": "^4.2.0", + "tslib": "^2.0.3" } }, "@loopback/metadata": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-1.4.1.tgz", - "integrity": "sha512-3nPHeaoztNrU61oIKnDP2E4aTqDsRPnsDThgTXeE3IPejNnp5WBneaRDXpUz9Ql/KYZ/IZLRUkRCzEE3DPBbRQ==", - "requires": { - "debug": "^4.1.1", - "lodash": "^4.17.15", - "reflect-metadata": "^0.1.13" - } - }, - "@loopback/model-api-builder": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@loopback/model-api-builder/-/model-api-builder-1.1.4.tgz", - "integrity": "sha512-jul5/r8XpihB0qjFP1ie8dn68gxM2GfXewTSfl/cirualGBOuZL8fNno7HpAmQkebNMB3dQLAOFZApz/1PjGcA==" - }, - "@loopback/rest": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/@loopback/rest/-/rest-3.3.2.tgz", - "integrity": "sha512-AopU01+ybk6c8vAdk/ukZQyCnd3xruInYRHtiVKiQqRLBMNAIzRJV58lH8h8ifEqtKMcF9SSXdav/RDl30rgZg==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-3.0.3.tgz", + "integrity": "sha512-VsY3XfQC42Icne5d4wrRgXAEWTmaC9xhzM8e9CmPlYvONfUG3HGPiUIIPWQYElN4IW+hhW56vId4pNI2vh974A==", "requires": { - "@loopback/context": "^3.6.0", - "@loopback/core": "^2.4.2", - "@loopback/http-server": "^2.1.2", - "@loopback/openapi-v3": "^3.3.0", - "@openapi-contrib/openapi-schema-to-json-schema": "^3.0.0", - "@types/body-parser": "^1.19.0", - "@types/cors": "^2.8.6", - "@types/express": "^4.17.6", - "@types/express-serve-static-core": "^4.17.5", - "@types/http-errors": "^1.6.3", - "@types/on-finished": "^2.3.1", - "@types/serve-static": "1.13.3", - "@types/type-is": "^1.6.3", - "ajv": "^6.12.2", - "ajv-errors": "^1.0.1", - "ajv-keywords": "^3.4.1", - "body-parser": "^1.19.0", - "cors": "^2.8.5", - "debug": "^4.1.1", - "express": "^4.17.1", - "http-errors": "^1.7.3", - "js-yaml": "^3.13.1", - "json-schema-compare": "^0.2.2", - "lodash": "^4.17.15", - "on-finished": "^2.3.0", - "path-to-regexp": "^6.1.0", - "qs": "^6.9.3", - "strong-error-handler": "^3.4.0", - "tslib": "^1.11.1", - "type-is": "^1.6.18", - "validator": "^13.0.0" + "debug": "^4.2.0", + "lodash": "^4.17.20", + "reflect-metadata": "^0.1.13", + "tslib": "^2.0.3" }, "dependencies": { - "@loopback/context": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.9.2.tgz", - "integrity": "sha512-dqbklyluFWZHAsUH2et+vESJHtpXqJ6hXLefysaFr7QPZ8pOMQutef9D4RcGt2bQH2gRAnYj6jXwEAgiINqPuQ==", - "requires": { - "@loopback/metadata": "^2.2.2", - "@types/debug": "^4.1.5", - "debug": "^4.1.1", - "hyperid": "^2.0.5", - "p-event": "^4.2.0", - "tslib": "^2.0.0", - "uuid": "^8.2.0" - }, - "dependencies": { - "tslib": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.0.tgz", - "integrity": "sha512-lTqkx847PI7xEDYJntxZH89L2/aXInsyF2luSafe/+0fHOMjlBNXdH6th7f70qxLDhul7KZK0zC8V5ZIyHl0/g==" - } - } - }, - "@loopback/core": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/@loopback/core/-/core-2.9.1.tgz", - "integrity": "sha512-aQNW2mHWdfOKYDsDKXzK7k1+DTgMvBf6FX2otoDt3jLrISHbzSay6RMZo7wZC02vGep/SBD2FnXw5kIxx1p6Cg==", - "requires": { - "@loopback/context": "^3.9.2", - "debug": "^4.1.1", - "tslib": "^2.0.0" - }, - "dependencies": { - "tslib": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.0.tgz", - "integrity": "sha512-lTqkx847PI7xEDYJntxZH89L2/aXInsyF2luSafe/+0fHOMjlBNXdH6th7f70qxLDhul7KZK0zC8V5ZIyHl0/g==" - } - } - }, - "@loopback/metadata": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-2.2.2.tgz", - "integrity": "sha512-Kx5LCtuo+KlM8FXbHNU/lKptf5IM47Ca/EF9b7pLfmFP1+Amc4SLIwawhJhnp/JZyV6oHqdfTxvxRavUcAuhqA==", - "requires": { - "debug": "^4.1.1", - "lodash": "^4.17.15", - "reflect-metadata": "^0.1.13", - "tslib": "^2.0.0" - }, - "dependencies": { - "tslib": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.0.tgz", - "integrity": "sha512-lTqkx847PI7xEDYJntxZH89L2/aXInsyF2luSafe/+0fHOMjlBNXdH6th7f70qxLDhul7KZK0zC8V5ZIyHl0/g==" - } - } - }, - "uuid": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.2.0.tgz", - "integrity": "sha512-CYpGiFTUrmI6OBMkAdjSDM0k5h8SkkiTP4WAjQgDgNB1S3Ou9VBEvr6q0Kv2H1mMk7IWfxYGpMH5sd5AvcIV2Q==" + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" } } }, - "@loopback/service-proxy": { - "version": "1.3.17", - "resolved": "https://registry.npmjs.org/@loopback/service-proxy/-/service-proxy-1.3.17.tgz", - "integrity": "sha512-EUQKWssgDaOc81+oQYIk+RSOwpe8xMW5RPaPucJ18HXOU+GCi4mjMBZqYSZJGtGks1FssIfNikkDOQr6ABgTaw==", + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", "requires": { - "@loopback/context": "^2.1.1", - "@loopback/core": "^1.12.4", - "loopback-datasource-juggler": "^4.18.1" + "ms": "2.1.2" } }, - "@types/serve-static": { - "version": "1.13.3", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.3.tgz", - "integrity": "sha512-oprSwp094zOglVrXdlo/4bAHtKTAxX6VT8FOZlBKrmyLbNvE1zxZyJ6yikMVtHIvwP45+ZQGJn+FdXGKTozq0g==", - "requires": { - "@types/express-serve-static-core": "*", - "@types/mime": "*" - } + "tslib": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" }, "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", + "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==" } } }, - "loopback4-soft-delete": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/loopback4-soft-delete/-/loopback4-soft-delete-2.0.0.tgz", - "integrity": "sha512-XBP2xaz9ZBPYSY09l60ZTOc/dq81JevhfoI4ImF7/mVcDVa8io8t6nvv/JeTZlim49Rx+MtJsMgQnpEqi63J2Q==", - "requires": { - "@loopback/core": "^2.7.0" - } - }, "lower-case": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.1.tgz", @@ -4888,11 +4008,6 @@ } } }, - "make-plural": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/make-plural/-/make-plural-6.2.1.tgz", - "integrity": "sha512-AmkruwJ9EjvyTv6AM8MBMK3TAeOJvhgTv5YQXzF0EP2qawhpvMjDpHvsdOIIT0Vn+BB0+IogmYZ1z+Ulm/m0Fg==" - }, "map-age-cleaner": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", @@ -4901,11 +4016,6 @@ "p-defer": "^1.0.0" } }, - "math-interval-parser": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/math-interval-parser/-/math-interval-parser-2.0.1.tgz", - "integrity": "sha512-VmlAmb0UJwlvMyx8iPhXUDnVW1F9IrGEd9CIOmv+XL8AErCUUuozoDMrgImvnYt2A+53qVX/tPW6YJurMKYsvA==" - }, "md5": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/md5/-/md5-2.2.1.tgz", @@ -4941,41 +4051,20 @@ "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" }, - "messageformat": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/messageformat/-/messageformat-2.3.0.tgz", - "integrity": "sha512-uTzvsv0lTeQxYI2y1NPa1lItL5VRI8Gb93Y2K2ue5gBPyrbJxfDi/EYWxh2PKv5yO42AJeeqblS9MJSh/IEk4w==", - "requires": { - "make-plural": "^4.3.0", - "messageformat-formatters": "^2.0.1", - "messageformat-parser": "^4.1.2" - }, - "dependencies": { - "make-plural": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/make-plural/-/make-plural-4.3.0.tgz", - "integrity": "sha512-xTYd4JVHpSCW+aqDof6w/MebaMVNTVYBZhbB/vi513xXdiPT92JMVCo0Jq8W2UZnzYRFeVbQiQ+I25l13JuKvA==", - "requires": { - "minimist": "^1.2.0" - } - } - } - }, - "messageformat-formatters": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/messageformat-formatters/-/messageformat-formatters-2.0.1.tgz", - "integrity": "sha512-E/lQRXhtHwGuiQjI7qxkLp8AHbMD5r2217XNe/SREbBlSawe0lOqsFb7rflZJmlQFSULNLIqlcjjsCPlB3m3Mg==" - }, - "messageformat-parser": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/messageformat-parser/-/messageformat-parser-4.1.3.tgz", - "integrity": "sha512-2fU3XDCanRqeOCkn7R5zW5VQHWf+T3hH65SzuqRvjatBK7r4uyFa5mEX+k6F9Bd04LVM5G4/BHBTUJsOdW7uyg==" - }, "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" }, + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + }, "mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", @@ -4999,16 +4088,6 @@ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" - }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -5127,19 +4206,6 @@ } } }, - "moment": { - "version": "2.27.0", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.27.0.tgz", - "integrity": "sha512-al0MUK7cpIcglMv3YF13qSgdAIqxHTO7brRtaz3DlSULbqfazqkc5kEjNrLDOM7fsjshoFIihnU8snrP7zUvhQ==" - }, - "moment-timezone": { - "version": "0.5.31", - "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.31.tgz", - "integrity": "sha512-+GgHNg8xRhMXfEbv81iDtrVeTcWt0kWmTEY1XQK14dICTXnWJnT0dxdlPspwqF3keKMVPXwayEsk1DI0AA/jdA==", - "requires": { - "moment": ">= 2.9.0" - } - }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -5156,58 +4222,12 @@ "safe-buffer": "^5.1.2" } }, - "mustache": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.0.1.tgz", - "integrity": "sha512-yL5VE97+OXn4+Er3THSmTdCFCtx5hHWzrolvH+JObZnUYwuaG7XV+Ch4fR2cIrcYI0tFHxS7iyFYl14bW8y2sA==" - }, "mute-stream": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", "dev": true }, - "mv": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/mv/-/mv-2.1.1.tgz", - "integrity": "sha1-rmzg1vbV4KT32JN5jQPB6pVZtqI=", - "optional": true, - "requires": { - "mkdirp": "~0.5.1", - "ncp": "~2.0.0", - "rimraf": "~2.4.0" - }, - "dependencies": { - "glob": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", - "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", - "optional": true, - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "rimraf": { - "version": "2.4.5", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.4.5.tgz", - "integrity": "sha1-7nEM5dk6j9uFb7Xqj/Di11k0sto=", - "optional": true, - "requires": { - "glob": "^6.0.1" - } - } - } - }, - "nan": { - "version": "2.14.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz", - "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==", - "optional": true - }, "nanoid": { "version": "2.1.11", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-2.1.11.tgz", @@ -5219,12 +4239,6 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, - "ncp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", - "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=", - "optional": true - }, "negotiator": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", @@ -5279,11 +4293,6 @@ "tslib": "^1.10.0" } }, - "nocache": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/nocache/-/nocache-2.1.0.tgz", - "integrity": "sha512-0L9FvHG3nfnnmaEQPjT9xhfN4ISk0A8/2j4M37Np4mcDesJjHgEUfgPhdCyZuFI954tjokaIj/A3NdpFNdEh4Q==" - }, "node-environment-flags": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", @@ -5311,6 +4320,95 @@ "http2-client": "^1.2.5" } }, + "node-pg-migrate": { + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/node-pg-migrate/-/node-pg-migrate-5.9.0.tgz", + "integrity": "sha512-FXXPzP45B/Vj7C23j4QFKvUfe+k2fCfGcaVG6LNdJ8powA+f5V9nLuihuPZRlhUb0xIWWxqc2qUKIPPGuGJS5g==", + "requires": { + "@types/pg": "^7.4.0", + "decamelize": "^4.0.0", + "lodash": "~4.17.0", + "mkdirp": "~1.0.0", + "yargs": "~16.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==" + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "y18n": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz", + "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==" + }, + "yargs": { + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.1.0.tgz", + "integrity": "sha512-upWFJOmDdHN0syLuESuvXDmrRcWd1QafJolHskzaw79uZa7/x53gxQKiR07W59GWY1tFhhU/Th9DrtSfpS782g==", + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.2", + "yargs-parser": "^20.2.2" + } + }, + "yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==" + } + } + }, "node-preload": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", @@ -5681,16 +4779,6 @@ } } }, - "oauth": { - "version": "0.9.14", - "resolved": "https://registry.npmjs.org/oauth/-/oauth-0.9.14.tgz", - "integrity": "sha1-xXSIg6QLU94wrenKvyEAQUuKCXE=" - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" - }, "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -5752,14 +4840,6 @@ "wrappy": "1" } }, - "one-time": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz", - "integrity": "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==", - "requires": { - "fn.name": "1.x.x" - } - }, "onetime": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", @@ -5943,98 +5023,6 @@ "tslib": "^1.10.0" } }, - "passport": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/passport/-/passport-0.4.1.tgz", - "integrity": "sha512-IxXgZZs8d7uFSt3eqNjM9NQ3g3uQCW5avD8mRNoXV99Yig50vjuaez6dQK2qC0kVWPRTujxY0dWgGfT09adjYg==", - "requires": { - "passport-strategy": "1.x.x", - "pause": "0.0.1" - } - }, - "passport-azure-ad": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/passport-azure-ad/-/passport-azure-ad-4.2.1.tgz", - "integrity": "sha512-pyaGhuvxHTUu/jrCCBOtR3GoSC12+u7B/iEQVK7z+JdDQZE/I+3oMgN1Ls4umnb5TfPuVyM76kvjqwB9kAjBgw==", - "requires": { - "async": "^1.5.2", - "base64url": "^3.0.0", - "bunyan": "^1.8.0", - "cache-manager": "^2.0.0", - "jwk-to-pem": "^1.2.6", - "jws": "^3.1.3", - "lodash": "^4.11.2", - "oauth": "0.9.14", - "passport": "^0.3.2", - "request": "^2.72.0", - "valid-url": "^1.0.6" - }, - "dependencies": { - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" - }, - "passport": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/passport/-/passport-0.3.2.tgz", - "integrity": "sha1-ndAJ+RXo/glbASSgG4+C2gdRAQI=", - "requires": { - "passport-strategy": "1.x.x", - "pause": "0.0.1" - } - } - } - }, - "passport-google-oauth20": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/passport-google-oauth20/-/passport-google-oauth20-2.0.0.tgz", - "integrity": "sha512-KSk6IJ15RoxuGq7D1UKK/8qKhNfzbLeLrG3gkLZ7p4A6DBCcv7xpyQwuXtWdpyR0+E0mwkpjY1VfPOhxQrKzdQ==", - "requires": { - "passport-oauth2": "1.x.x" - } - }, - "passport-http-bearer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/passport-http-bearer/-/passport-http-bearer-1.0.1.tgz", - "integrity": "sha1-FHRp6jZp4qhMYWfvmdu3fh8AmKg=", - "requires": { - "passport-strategy": "1.x.x" - } - }, - "passport-local": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/passport-local/-/passport-local-1.0.0.tgz", - "integrity": "sha1-H+YyaMkudWBmJkN+O5BmYsFbpu4=", - "requires": { - "passport-strategy": "1.x.x" - } - }, - "passport-oauth2": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/passport-oauth2/-/passport-oauth2-1.5.0.tgz", - "integrity": "sha512-kqBt6vR/5VlCK8iCx1/KpY42kQ+NEHZwsSyt4Y6STiNjU+wWICG1i8ucc1FapXDGO15C5O5VZz7+7vRzrDPXXQ==", - "requires": { - "base64url": "3.x.x", - "oauth": "0.9.x", - "passport-strategy": "1.x.x", - "uid2": "0.0.x", - "utils-merge": "1.x.x" - } - }, - "passport-oauth2-client-password": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/passport-oauth2-client-password/-/passport-oauth2-client-password-0.1.2.tgz", - "integrity": "sha1-TzeLZ4uS0W270jOmxwZSAJPlYbo=", - "requires": { - "passport-strategy": "1.x.x" - } - }, - "passport-strategy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/passport-strategy/-/passport-strategy-1.0.0.tgz", - "integrity": "sha1-tVOaqPwiWj0a0XlHbd8ja0QPUuQ=" - }, "path-case": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/path-case/-/path-case-3.0.3.tgz", @@ -6071,16 +5059,6 @@ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.1.0.tgz", "integrity": "sha512-h9DqehX3zZZDCEm+xbfU0ZmwCGFCAAraPJWMXJ4+v32NjZJilVg3k1TcKsRgIb8IQ/izZSaydDc1OhJCZvs2Dw==" }, - "pause": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz", - "integrity": "sha1-HUCLP9t2kjuVQ9lvtMnf1TXZy10=" - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" - }, "pg": { "version": "7.18.2", "resolved": "https://registry.npmjs.org/pg/-/pg-7.18.2.tgz", @@ -6123,6 +5101,11 @@ "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-2.0.10.tgz", "integrity": "sha512-qdwzY92bHf3nwzIUcj+zJ0Qo5lpG/YxchahxIN8+ZVmXqkahKXsnl2aiJPHLYN9o5mB/leG+Xh6XKxtP7e0sjg==" }, + "pg-protocol": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.4.0.tgz", + "integrity": "sha512-El+aXWcwG/8wuFICMQjM5ZSAm6OWiJicFdNYo+VY3QP+8vI4SvLIWVe51PppTzMhikUJR+PsyIFKqfdXPz/yxA==" + }, "pg-types": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", @@ -6146,8 +5129,7 @@ "picomatch": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", - "dev": true + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==" }, "pkg-dir": { "version": "4.2.0", @@ -6278,16 +5260,6 @@ "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" - }, - "psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" - }, "pubnub": { "version": "4.28.0", "resolved": "https://registry.npmjs.org/pubnub/-/pubnub-4.28.0.tgz", @@ -6336,15 +5308,6 @@ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" }, - "rate-limit-redis": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/rate-limit-redis/-/rate-limit-redis-1.7.0.tgz", - "integrity": "sha512-GwqpbMt0riTvra+NiFfX8BKuTdcX7xt0KpU0IahBopjRMzno0niqEKKNaQeNewOzkIz0fOO/R2CSWwfIZdf6oA==", - "requires": { - "defaults": "^1.0.3", - "redis": "^2.8.0" - } - }, "raw-body": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", @@ -6410,46 +5373,6 @@ "picomatch": "^2.0.4" } }, - "redis": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/redis/-/redis-2.8.0.tgz", - "integrity": "sha512-M1OkonEQwtRmZv4tEWF2VgpG0JWJ8Fv1PhlgT5+B+uNq2cA3Rt1Yt/ryoR+vQNOQcIEgdCdfH0jr3bDpihAw1A==", - "requires": { - "double-ended-queue": "^2.1.0-0", - "redis-commands": "^1.2.0", - "redis-parser": "^2.6.0" - }, - "dependencies": { - "redis-parser": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-2.6.0.tgz", - "integrity": "sha1-Uu0J2srBCPGmMcB+m2mUHnoZUEs=" - } - } - }, - "redis-commands": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.5.0.tgz", - "integrity": "sha512-6KxamqpZ468MeQC3bkWmCB1fp56XL64D4Kf0zJSwDZbVLLm7KFkoIcHrgRvQ+sk8dnhySs7+yBg94yIkAK7aJg==" - }, - "redis-errors": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz", - "integrity": "sha1-62LSrbFeTq9GEMBK/hUpOEJQq60=" - }, - "redis-parser": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-3.0.0.tgz", - "integrity": "sha1-tm2CjNyv5rS4pCin3vTGvKwxyLQ=", - "requires": { - "redis-errors": "^1.0.0" - } - }, - "referrer-policy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/referrer-policy/-/referrer-policy-1.2.0.tgz", - "integrity": "sha512-LgQJIuS6nAy1Jd88DCQRemyE3mS+ispwlqMk3b0yjZ257fI1v9c+/p6SD5gP5FGyXUIgrNOAfmyioHwZtYv2VA==" - }, "reflect-metadata": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", @@ -6491,60 +5414,10 @@ "es6-error": "^4.0.1" } }, - "request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "dependencies": { - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" - }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" - } - } - }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, "require-main-filename": { "version": "2.0.0", @@ -6606,12 +5479,6 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, - "safe-json-stringify": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/safe-json-stringify/-/safe-json-stringify-1.2.0.tgz", - "integrity": "sha512-gH8eh2nZudPQO6TytOvbxnuhYBOvDBBLW52tz5q6X58lJcd/tkmqFR+5Z9adS8aJtURSXWThWy/xJtJwixErvg==", - "optional": true - }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -6796,14 +5663,6 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" }, - "simple-swizzle": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", - "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", - "requires": { - "is-arrayish": "^0.3.1" - } - }, "sinon": { "version": "9.0.2", "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.0.2.tgz", @@ -6954,37 +5813,11 @@ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" }, - "sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, "stable": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==" }, - "stack-trace": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", - "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" - }, - "standard-as-callback": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/standard-as-callback/-/standard-as-callback-2.0.1.tgz", - "integrity": "sha512-NQOxSeB8gOI5WjSaxjBgog2QFw55FV8TkS6Y07BiB3VJ8xNTvUYm0wl0s8ObgQ5NhdpnNfigMIKjgPESzgr4tg==" - }, "statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", @@ -6999,7 +5832,6 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", - "dev": true, "requires": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -7063,7 +5895,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, "requires": { "ansi-regex": "^5.0.0" } @@ -7252,11 +6083,6 @@ "minimatch": "^3.0.4" } }, - "text-hex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz", - "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==" - }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -7292,7 +6118,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, "requires": { "is-number": "^7.0.0" } @@ -7302,25 +6127,11 @@ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" }, - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - } - }, "traverse": { "version": "0.6.6", "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=" }, - "triple-beam": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz", - "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==" - }, "tslib": { "version": "1.13.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", @@ -7335,19 +6146,6 @@ "tslib": "^1.8.1" } }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" - }, "type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -7393,11 +6191,6 @@ "integrity": "sha512-hSAifV3k+i6lEoCJ2k6R2Z/rp/H3+8sdmcn5NrS3/3kE7+RyZXm9aqvxWqjEXHAd8b0pShatpcdMTvEdvAJltQ==", "dev": true }, - "uid2": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/uid2/-/uid2-0.0.3.tgz", - "integrity": "sha1-SDEm4Rd03y9xuLY53NeZw3YWK4I=" - }, "universalify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz", @@ -7475,11 +6268,6 @@ "integrity": "sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ==", "dev": true }, - "valid-url": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/valid-url/-/valid-url-1.0.9.tgz", - "integrity": "sha1-HBRHm0DxOXp1eC8RXkCGRHQzogA=" - }, "validator": { "version": "13.1.0", "resolved": "https://registry.npmjs.org/validator/-/validator-13.1.0.tgz", @@ -7490,16 +6278,6 @@ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -7592,43 +6370,6 @@ } } }, - "winston": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/winston/-/winston-3.3.3.tgz", - "integrity": "sha512-oEXTISQnC8VlSAKf1KYSSd7J6IWuRPQqDdo8eoRNaYKLvwSb5+79Z3Yi1lrl6KDpU6/VWaxpakDAtb1oQ4n9aw==", - "requires": { - "@dabh/diagnostics": "^2.0.2", - "async": "^3.1.0", - "is-stream": "^2.0.0", - "logform": "^2.2.0", - "one-time": "^1.0.0", - "readable-stream": "^3.4.0", - "stack-trace": "0.0.x", - "triple-beam": "^1.3.0", - "winston-transport": "^4.4.0" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, - "winston-transport": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.4.0.tgz", - "integrity": "sha512-Lc7/p3GtqtqPBYYtS6KCN3c77/2QCev51DvcJKbkFPQNoj1sinkGwLGFDxkXY9J6p9+EPnYs+D90uwbnaiURTw==", - "requires": { - "readable-stream": "^2.3.7", - "triple-beam": "^1.2.0" - } - }, "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", @@ -7711,11 +6452,6 @@ "typedarray-to-buffer": "^3.1.5" } }, - "x-xss-protection": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/x-xss-protection/-/x-xss-protection-1.3.0.tgz", - "integrity": "sha512-kpyBI9TlVipZO4diReZMAHWtS0MMa/7Kgx8hwG/EuZLiA6sg4Ah/4TRdASHhRRN3boobzcYgFRUFSgHRge6Qhg==" - }, "xml2js": { "version": "0.4.19", "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", diff --git a/sandbox/testing/package.json b/sandbox/testing/package.json index 002f95fb10..2670d075c9 100644 --- a/sandbox/testing/package.json +++ b/sandbox/testing/package.json @@ -57,7 +57,7 @@ "@sourceloop/notification-service": "^1.0.0-alpha.19", "aws-sdk": "^2.694.0", "loopback-connector-postgresql": "^3.9.1", - "loopback4-authorization": "^2.3.2", + "loopback4-authorization": "3.1.1", "pubnub": "^4.28.0", "tslib": "^1.10.0" }, diff --git a/sandbox/testing/src/controllers/home-page.controller.ts b/sandbox/testing/src/controllers/home-page.controller.ts index d8de87125a..075ad53dbe 100644 --- a/sandbox/testing/src/controllers/home-page.controller.ts +++ b/sandbox/testing/src/controllers/home-page.controller.ts @@ -18,7 +18,7 @@ export class HomePageController { ); } - @authorize(['*']) + @authorize({permissions: ['*']}) @get('/', { responses: { [STATUS_CODE.OK]: { diff --git a/sandbox/testing/src/controllers/ping.controller.ts b/sandbox/testing/src/controllers/ping.controller.ts index d25774a39c..c6e7c0719b 100644 --- a/sandbox/testing/src/controllers/ping.controller.ts +++ b/sandbox/testing/src/controllers/ping.controller.ts @@ -38,7 +38,7 @@ export class PingController { ) {} // Map to `GET /ping` - @authorize(['*']) + @authorize({permissions: ['*']}) @get('/ping', { responses: { '200': PING_RESPONSE, diff --git a/services/authentication-service/package-lock.json b/services/authentication-service/package-lock.json index 74c28055f5..ee6073a42a 100644 --- a/services/authentication-service/package-lock.json +++ b/services/authentication-service/package-lock.json @@ -435,50 +435,52 @@ } }, "@loopback/context": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.9.2.tgz", - "integrity": "sha512-dqbklyluFWZHAsUH2et+vESJHtpXqJ6hXLefysaFr7QPZ8pOMQutef9D4RcGt2bQH2gRAnYj6jXwEAgiINqPuQ==", + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.13.0.tgz", + "integrity": "sha512-3R+6Mxm2QOAW8cjhEPaxP3i+uj1y9vkW7Ie91kuFa16yVHgOMrxPkcBmxduH5x4Cd1ZEKmtR/iVTfvRKoBYVxA==", "requires": { - "@loopback/metadata": "^2.2.2", + "@loopback/metadata": "^3.0.3", "@types/debug": "^4.1.5", - "debug": "^4.1.1", + "debug": "^4.2.0", "hyperid": "^2.0.5", "p-event": "^4.2.0", - "tslib": "^2.0.0", - "uuid": "^8.2.0" + "tslib": "^2.0.3", + "uuid": "^8.3.1" }, "dependencies": { "@loopback/metadata": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-2.2.2.tgz", - "integrity": "sha512-Kx5LCtuo+KlM8FXbHNU/lKptf5IM47Ca/EF9b7pLfmFP1+Amc4SLIwawhJhnp/JZyV6oHqdfTxvxRavUcAuhqA==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-3.0.3.tgz", + "integrity": "sha512-VsY3XfQC42Icne5d4wrRgXAEWTmaC9xhzM8e9CmPlYvONfUG3HGPiUIIPWQYElN4IW+hhW56vId4pNI2vh974A==", "requires": { - "debug": "^4.1.1", - "lodash": "^4.17.15", + "debug": "^4.2.0", + "lodash": "^4.17.20", "reflect-metadata": "^0.1.13", - "tslib": "^2.0.0" + "tslib": "^2.0.3" } }, - "p-event": { + "debug": { "version": "4.2.0", - "resolved": "https://registry.npmjs.org/p-event/-/p-event-4.2.0.tgz", - "integrity": "sha512-KXatOjCRXXkSePPb1Nbi0p0m+gQAwdlbhi4wQKJPI1HsMQS9g+Sqp2o+QHziPr7eYJyOZet836KoHEVM1mwOrQ==", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", "requires": { - "p-timeout": "^3.1.0" + "ms": "2.1.2" } }, - "p-timeout": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", - "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", - "requires": { - "p-finally": "^1.0.0" - } + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" }, "tslib": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.0.tgz", - "integrity": "sha512-lTqkx847PI7xEDYJntxZH89L2/aXInsyF2luSafe/+0fHOMjlBNXdH6th7f70qxLDhul7KZK0zC8V5ZIyHl0/g==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" + }, + "uuid": { + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", + "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==" } } }, @@ -1133,12 +1135,12 @@ "dev": true }, "@sourceloop/core": { - "version": "1.0.0-alpha.8", - "resolved": "https://registry.npmjs.org/@sourceloop/core/-/core-1.0.0-alpha.8.tgz", - "integrity": "sha512-P6a4Gx6dwZqEzRoPvo6xM4kona8sf9BfN2JUL8CiJz6K9yuTbbuU6n/IXzYPbzez5Wz+zl3tzsGf8f4wIgc3KQ==", + "version": "1.0.0-alpha.14", + "resolved": "https://registry.npmjs.org/@sourceloop/core/-/core-1.0.0-alpha.14.tgz", + "integrity": "sha512-sOckHOfjLjpv8qJ/7mZx7+5LORsSUy8oPU1QFCMi/SiKnYG7jUQknN4HUk98qODIxaShtPHo3DLyCo7/Z0rQLA==", "requires": { "@loopback/boot": "^2.3.1", - "@loopback/context": "^3.8.1", + "@loopback/context": "^3.9.4", "@loopback/core": "^2.7.0", "@loopback/repository": "^2.5.1", "@loopback/rest": "^5.0.1", @@ -1159,62 +1161,30 @@ "winston": "^3.2.1" }, "dependencies": { - "@loopback/metadata": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-2.2.4.tgz", - "integrity": "sha512-sU4xPhxZSsJeWdw3oO2dWjqq6BR1Sb+Rx6W9xhHEDPVGaor5ae8unIcIpK6tnRdt6yjK22s295ao18lE2S3BJA==", - "requires": { - "debug": "^4.1.1", - "lodash": "^4.17.19", - "reflect-metadata": "^0.1.13", - "tslib": "^2.0.0" - }, - "dependencies": { - "tslib": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", - "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" - } - } - }, "@loopback/service-proxy": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/@loopback/service-proxy/-/service-proxy-2.3.6.tgz", - "integrity": "sha512-Xr7tFU4X0jf68nyzQP9BJviU9+gHUA/d9fBBu/phqVHoJjklBUJqdHVmpv/ydRyTzPi8mfitmjCVJGeB47UopQ==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/@loopback/service-proxy/-/service-proxy-2.3.8.tgz", + "integrity": "sha512-WRErlDsmDSC+4wb+2J0u8hdNKoYxX6jXNzhSvZ2DPp7oubZPC8LeKcjMr1nNWkdT9vEbJYmoQP4kUC6LCDFfnQ==", "requires": { - "@loopback/core": "^2.9.3", + "@loopback/core": "^2.9.5", "loopback-datasource-juggler": "^4.24.0", - "tslib": "^2.0.0" + "tslib": "^2.0.1" }, "dependencies": { - "@loopback/context": { - "version": "3.9.4", - "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.9.4.tgz", - "integrity": "sha512-Ch7X5gea3SRDwrJetJ5fthbNFBTcGIwxTMR11dvxrZClQUAOGX3M1LIjXhJq9HFXxVlxavL9Vp6BYL2Gg0QLMQ==", - "requires": { - "@loopback/metadata": "^2.2.4", - "@types/debug": "^4.1.5", - "debug": "^4.1.1", - "hyperid": "^2.0.5", - "p-event": "^4.2.0", - "tslib": "^2.0.0", - "uuid": "^8.3.0" - } - }, "@loopback/core": { - "version": "2.9.3", - "resolved": "https://registry.npmjs.org/@loopback/core/-/core-2.9.3.tgz", - "integrity": "sha512-Wjun6YprRp6Ay0OMP/+IEx9IMnlk1r+XPkkmfrcbv3mbkEh+JSdOmjv6plWbzpllnZwkYII1C41C7bdgDm7BCw==", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@loopback/core/-/core-2.12.0.tgz", + "integrity": "sha512-kdJZzIF7PA9TjnKoEtfhn2G41stmS8gIsweJAbiG7i+S4REbZLGR4KBHzDtSyfeeDCcxayouGzKwi/BT8gWDgQ==", "requires": { - "@loopback/context": "^3.9.4", - "debug": "^4.1.1", - "tslib": "^2.0.0" + "@loopback/context": "^3.13.0", + "debug": "^4.2.0", + "tslib": "^2.0.3" } }, "loopback-datasource-juggler": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/loopback-datasource-juggler/-/loopback-datasource-juggler-4.24.0.tgz", - "integrity": "sha512-v4UwAdSzsOVnRicBk6BuUjkwxk7TuJHUkbpXQxlVjSZCYx2WpSzapuEuhBIWUtoY5JMsE2S+xArl2qqrnSg3KA==", + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/loopback-datasource-juggler/-/loopback-datasource-juggler-4.26.0.tgz", + "integrity": "sha512-/R40jUGDrnRBgTh121L4Y7sHDF0KxbgSAN4gLJKp8xGNQ6KpkSQyqZkmap98eN7B75RES78DS3MGghsYMvAJ3Q==", "requires": { "async": "^3.1.0", "change-case": "^4.1.1", @@ -1222,33 +1192,105 @@ "depd": "^2.0.0", "inflection": "^1.6.0", "lodash": "^4.17.11", - "loopback-connector": "^4.4.0", + "loopback-connector": "^5.0.0", "minimatch": "^3.0.3", "qs": "^6.5.0", "shortid": "^2.2.6", - "strong-globalize": "^5.0.2", + "strong-globalize": "^6.0.5", "traverse": "^0.6.6", - "uuid": "^7.0.0" - }, - "dependencies": { - "uuid": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz", - "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==" - } + "uuid": "^8.3.1" } }, "tslib": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", - "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" + } + } + }, + "cldrjs": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/cldrjs/-/cldrjs-0.5.5.tgz", + "integrity": "sha512-KDwzwbmLIPfCgd8JERVDpQKrUUM1U4KpFJJg2IROv89rF172lLufoJnqJ/Wea6fXL5bO6WjuLMzY8V52UWPvkA==" + }, + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" + } + }, + "globalize": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/globalize/-/globalize-1.6.0.tgz", + "integrity": "sha512-MTuAU3Tnbtga8PvxbpSPdQNIs6K5UdATWIuarWJK2Z3e1DghXpxb/GmShSVagzHqCOYgZr7N/Hi7D1mrHG30jQ==", + "requires": { + "cldrjs": "^0.5.4" + } + }, + "loopback-connector": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/loopback-connector/-/loopback-connector-5.0.1.tgz", + "integrity": "sha512-aSPT6x5WZdoW9ylyNE4CxGqFbIqC9cSEZJwWkCincso27PXlZPj52POoF6pgxug9mkH7MrbXuP3SSDLkLq5oQQ==", + "requires": { + "async": "^3.2.0", + "bluebird": "^3.7.2", + "debug": "^4.1.1", + "msgpack5": "^4.2.0", + "strong-globalize": "^6.0.4", + "uuid": "^8.3.0" + } + }, + "loopback4-authorization": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/loopback4-authorization/-/loopback4-authorization-2.3.2.tgz", + "integrity": "sha512-9vMmcqRFWQOsAv1iocsWuZKkM33DUGmelGu6rQy7zsEAUnP5XgiRBJSUVZ/wbZnCbPvz9UughtBEHY7FzpCj6Q==", + "requires": { + "lodash": "^4.17.11" + } + }, + "md5": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz", + "integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==", + "requires": { + "charenc": "0.0.2", + "crypt": "0.0.2", + "is-buffer": "~1.1.6" + } + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + }, + "strong-globalize": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/strong-globalize/-/strong-globalize-6.0.5.tgz", + "integrity": "sha512-7nfUli41TieV9/TSc0N62ve5Q4nfrpy/T0nNNy6TyD3vst79QWmeylCyd3q1gDxh8dqGEtabLNCdPQP1Iuvecw==", + "requires": { + "accept-language": "^3.0.18", + "debug": "^4.2.0", + "globalize": "^1.6.0", + "lodash": "^4.17.20", + "md5": "^2.3.0", + "mkdirp": "^1.0.4", + "os-locale": "^5.0.0", + "yamljs": "^0.3.0" + }, + "dependencies": { + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" } } }, "uuid": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.0.tgz", - "integrity": "sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ==" + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", + "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==" } } }, @@ -1363,6 +1405,11 @@ "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-1.6.3.tgz", "integrity": "sha512-4KCE/agIcoQ9bIfa4sBxbZdnORzRjIw8JNQPLfqoNv7wQl/8f8mRbW68Q8wBsQFoJkPUHGlQYZ9sqi5WpfGSEQ==" }, + "@types/i18n": { + "version": "0.8.8", + "resolved": "https://registry.npmjs.org/@types/i18n/-/i18n-0.8.8.tgz", + "integrity": "sha512-RI4LFAraGrimMTxXkediCMXGVLC6ksXIIo3U+d3E4n+Mhw3uIDbmokO7DHlPB/eu6Tn6KBv4IUE1WrrEDRdNUQ==" + }, "@types/json-schema": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.4.tgz", @@ -1461,6 +1508,20 @@ "@types/passport": "*" } }, + "@types/pg": { + "version": "7.14.6", + "resolved": "https://registry.npmjs.org/@types/pg/-/pg-7.14.6.tgz", + "integrity": "sha512-mf6kYvuYS2CObDxtsw5imE4vOvq+XHJtiJNFXir/fn9nxZtIFQ3/ECpokm8fNkxKBh7nQhyegHwNg1NIW+yYJA==", + "requires": { + "@types/node": "*", + "@types/pg-types": "*" + } + }, + "@types/pg-types": { + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@types/pg-types/-/pg-types-1.11.5.tgz", + "integrity": "sha512-L8ogeT6vDzT1vxlW3KITTCt+BVXXVkLXfZ/XNm6UqbcJgxf+KPO7yjWx7dQQE8RW07KopL10x2gNMs41+IkMGQ==" + }, "@types/qs": { "version": "6.9.3", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.3.tgz", @@ -1674,8 +1735,7 @@ "ansi-regex": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" }, "ansi-styles": { "version": "3.2.1", @@ -1803,6 +1863,11 @@ "array-filter": "^1.0.0" } }, + "await-lock": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/await-lock/-/await-lock-2.1.0.tgz", + "integrity": "sha512-t7Zm5YGgEEc/3eYAicF32m/TNvL+XOeYZy9CvBUeJY/szM7frLolFylhrlZNWV/ohWhcUXygrBGjYmoQdxF4CQ==" + }, "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -1958,7 +2023,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, "requires": { "fill-range": "^7.0.1" } @@ -1985,6 +2049,11 @@ "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, + "buffer-writer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/buffer-writer/-/buffer-writer-2.0.0.tgz", + "integrity": "sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw==" + }, "bunyan": { "version": "1.8.14", "resolved": "https://registry.npmjs.org/bunyan/-/bunyan-1.8.14.tgz", @@ -2071,6 +2140,27 @@ "upper-case-first": "^2.0.1" } }, + "casbin": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/casbin/-/casbin-5.2.0.tgz", + "integrity": "sha512-9qqcTAx0ysgF6xz1Mq83B7yD9inG4iEZ85tMZBmkXCIsECD9yAE8XhaONn7GhlnTave10k3ktGJ+9qNItXe30A==", + "requires": { + "await-lock": "^2.0.1", + "expression-eval": "^2.0.0", + "ip": "^1.1.5", + "micromatch": "^4.0.2" + } + }, + "casbin-pg-adapter": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/casbin-pg-adapter/-/casbin-pg-adapter-1.4.0.tgz", + "integrity": "sha512-9T0i+t0XwdnsBFl+20ojAED9+05SN4haJDLOJTUh9liHO+yBi6SXwSboD0MLzserFkxCs8VJJ+BNJlavExlU+A==", + "requires": { + "casbin": "^5.0.4", + "node-pg-migrate": "^5.1.0", + "pg": "^8.2.1" + } + }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -2306,9 +2396,9 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, "color-string": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.3.tgz", - "integrity": "sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==", + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.4.tgz", + "integrity": "sha512-57yF5yt8Xa3czSEW1jfQDE79Idk0+AkN/4KWad6tbdxUmAs3MvjxlWSWD4deYytcRfoZ9nhKyFl1kj5tBvidbw==", "requires": { "color-name": "^1.0.0", "simple-swizzle": "^0.2.2" @@ -2685,8 +2775,7 @@ "emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "enabled": { "version": "2.0.0", @@ -2761,6 +2850,11 @@ "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", "dev": true }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -3012,6 +3106,14 @@ "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-5.1.3.tgz", "integrity": "sha512-TINcxve5510pXj4n9/1AMupkj3iWxl3JuZaWhCdYDlZeoCPqweGZrxbrlqTCFb1CT5wli7s8e2SH/Qz2c9GorA==" }, + "expression-eval": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/expression-eval/-/expression-eval-2.1.0.tgz", + "integrity": "sha512-FUJO/Akvl/JOWkvlqZaqbkhsEWlCJWDeZG4tzX96UH68D9FeRgYgtb55C2qtqbORC0Q6x5419EDjWu4IT9kQfg==", + "requires": { + "jsep": "^0.3.0" + } + }, "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -3094,7 +3196,6 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, "requires": { "to-regex-range": "^5.0.1" } @@ -3359,8 +3460,7 @@ "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" }, "get-package-type": { "version": "0.1.0", @@ -3819,21 +3919,34 @@ "integrity": "sha512-CYdFeFexxhv/Bcny+Q0BfOV+ltRlJcd4BBZBYFX/O0u4npJrgZtIcjokegtiSMAvlMTJ+Koq0GBCc//3bueQxw==" }, "ioredis": { - "version": "4.17.3", - "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-4.17.3.tgz", - "integrity": "sha512-iRvq4BOYzNFkDnSyhx7cmJNOi1x/HWYe+A4VXHBu4qpwJaGT1Mp+D2bVGJntH9K/Z/GeOM/Nprb8gB3bmitz1Q==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-4.19.2.tgz", + "integrity": "sha512-SZSIwMrbd96b7rJvJwyTWSP6XQ0m1kAIIqBnwglJKrIJ6na7TeY4F2EV2vDY0xm/fLrUY8cEg81dR7kVFt2sKA==", "requires": { "cluster-key-slot": "^1.1.0", "debug": "^4.1.1", "denque": "^1.1.0", "lodash.defaults": "^4.2.0", "lodash.flatten": "^4.4.0", - "redis-commands": "1.5.0", + "p-map": "^2.1.0", + "redis-commands": "1.6.0", "redis-errors": "^1.2.0", "redis-parser": "^3.0.0", "standard-as-callback": "^2.0.1" + }, + "dependencies": { + "p-map": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==" + } } }, + "ip": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" + }, "ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -3892,8 +4005,7 @@ "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" }, "is-glob": { "version": "4.0.1", @@ -3912,8 +4024,7 @@ "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" }, "is-number-object": { "version": "1.0.4", @@ -4169,6 +4280,11 @@ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, + "jsep": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/jsep/-/jsep-0.3.5.tgz", + "integrity": "sha512-AoRLBDc6JNnKjNcmonituEABS5bcfqDhQAWWXNTFrqu6nVXBpBAGfcoTGZMFlIrh9FjmE1CQyX9CTNwZrXMMDA==" + }, "jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -4677,11 +4793,76 @@ } }, "loopback4-authorization": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/loopback4-authorization/-/loopback4-authorization-2.3.2.tgz", - "integrity": "sha512-9vMmcqRFWQOsAv1iocsWuZKkM33DUGmelGu6rQy7zsEAUnP5XgiRBJSUVZ/wbZnCbPvz9UughtBEHY7FzpCj6Q==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/loopback4-authorization/-/loopback4-authorization-3.1.1.tgz", + "integrity": "sha512-qcFRNnJsMwpUZwszaRftQ5rJUaU3p/0iO/gx/1ifaLeBfnTJ0t8lMYUGU1xnOU2ya8VTvauHJgx0gwCSnoWlbQ==", "requires": { - "lodash": "^4.17.11" + "@loopback/core": "^2.9.2", + "casbin": "^5.1.5", + "casbin-pg-adapter": "^1.4.0", + "lodash": "^4.17.19" + }, + "dependencies": { + "@loopback/context": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.13.0.tgz", + "integrity": "sha512-3R+6Mxm2QOAW8cjhEPaxP3i+uj1y9vkW7Ie91kuFa16yVHgOMrxPkcBmxduH5x4Cd1ZEKmtR/iVTfvRKoBYVxA==", + "requires": { + "@loopback/metadata": "^3.0.3", + "@types/debug": "^4.1.5", + "debug": "^4.2.0", + "hyperid": "^2.0.5", + "p-event": "^4.2.0", + "tslib": "^2.0.3", + "uuid": "^8.3.1" + } + }, + "@loopback/core": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@loopback/core/-/core-2.12.0.tgz", + "integrity": "sha512-kdJZzIF7PA9TjnKoEtfhn2G41stmS8gIsweJAbiG7i+S4REbZLGR4KBHzDtSyfeeDCcxayouGzKwi/BT8gWDgQ==", + "requires": { + "@loopback/context": "^3.13.0", + "debug": "^4.2.0", + "tslib": "^2.0.3" + } + }, + "@loopback/metadata": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-3.0.3.tgz", + "integrity": "sha512-VsY3XfQC42Icne5d4wrRgXAEWTmaC9xhzM8e9CmPlYvONfUG3HGPiUIIPWQYElN4IW+hhW56vId4pNI2vh974A==", + "requires": { + "debug": "^4.2.0", + "lodash": "^4.17.20", + "reflect-metadata": "^0.1.13", + "tslib": "^2.0.3" + }, + "dependencies": { + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + } + } + }, + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" + } + }, + "tslib": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" + }, + "uuid": { + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", + "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==" + } } }, "loopback4-helmet": { @@ -4817,65 +4998,94 @@ }, "dependencies": { "@loopback/context": { - "version": "3.9.4", - "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.9.4.tgz", - "integrity": "sha512-Ch7X5gea3SRDwrJetJ5fthbNFBTcGIwxTMR11dvxrZClQUAOGX3M1LIjXhJq9HFXxVlxavL9Vp6BYL2Gg0QLMQ==", + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.13.0.tgz", + "integrity": "sha512-3R+6Mxm2QOAW8cjhEPaxP3i+uj1y9vkW7Ie91kuFa16yVHgOMrxPkcBmxduH5x4Cd1ZEKmtR/iVTfvRKoBYVxA==", "requires": { - "@loopback/metadata": "^2.2.4", + "@loopback/metadata": "^3.0.3", "@types/debug": "^4.1.5", - "debug": "^4.1.1", + "debug": "^4.2.0", "hyperid": "^2.0.5", "p-event": "^4.2.0", - "tslib": "^2.0.0", - "uuid": "^8.3.0" + "tslib": "^2.0.3", + "uuid": "^8.3.1" }, "dependencies": { + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" + } + }, "tslib": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", - "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" } } }, "@loopback/core": { - "version": "2.9.3", - "resolved": "https://registry.npmjs.org/@loopback/core/-/core-2.9.3.tgz", - "integrity": "sha512-Wjun6YprRp6Ay0OMP/+IEx9IMnlk1r+XPkkmfrcbv3mbkEh+JSdOmjv6plWbzpllnZwkYII1C41C7bdgDm7BCw==", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@loopback/core/-/core-2.12.0.tgz", + "integrity": "sha512-kdJZzIF7PA9TjnKoEtfhn2G41stmS8gIsweJAbiG7i+S4REbZLGR4KBHzDtSyfeeDCcxayouGzKwi/BT8gWDgQ==", "requires": { - "@loopback/context": "^3.9.4", - "debug": "^4.1.1", - "tslib": "^2.0.0" + "@loopback/context": "^3.13.0", + "debug": "^4.2.0", + "tslib": "^2.0.3" }, "dependencies": { + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" + } + }, "tslib": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", - "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" } } }, "@loopback/metadata": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-2.2.4.tgz", - "integrity": "sha512-sU4xPhxZSsJeWdw3oO2dWjqq6BR1Sb+Rx6W9xhHEDPVGaor5ae8unIcIpK6tnRdt6yjK22s295ao18lE2S3BJA==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-3.0.3.tgz", + "integrity": "sha512-VsY3XfQC42Icne5d4wrRgXAEWTmaC9xhzM8e9CmPlYvONfUG3HGPiUIIPWQYElN4IW+hhW56vId4pNI2vh974A==", "requires": { - "debug": "^4.1.1", - "lodash": "^4.17.19", + "debug": "^4.2.0", + "lodash": "^4.17.20", "reflect-metadata": "^0.1.13", - "tslib": "^2.0.0" + "tslib": "^2.0.3" }, "dependencies": { + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + }, "tslib": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", - "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" } } }, "uuid": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.0.tgz", - "integrity": "sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ==" + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", + "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==" } } }, @@ -4916,9 +5126,9 @@ } }, "path-to-regexp": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.1.0.tgz", - "integrity": "sha512-h9DqehX3zZZDCEm+xbfU0ZmwCGFCAAraPJWMXJ4+v32NjZJilVg3k1TcKsRgIb8IQ/izZSaydDc1OhJCZvs2Dw==" + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.0.tgz", + "integrity": "sha512-f66KywYG6+43afgE/8j/GoiNyygk/bnoCbps++3ErRKsIYkGGupyv07R2Ok5m9i67Iqc+T2g1eAUGUPzWhYTyg==" }, "setprototypeof": { "version": "1.2.0", @@ -5062,6 +5272,15 @@ "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" }, + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + }, "mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", @@ -5441,6 +5660,95 @@ "http2-client": "^1.2.5" } }, + "node-pg-migrate": { + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/node-pg-migrate/-/node-pg-migrate-5.9.0.tgz", + "integrity": "sha512-FXXPzP45B/Vj7C23j4QFKvUfe+k2fCfGcaVG6LNdJ8powA+f5V9nLuihuPZRlhUb0xIWWxqc2qUKIPPGuGJS5g==", + "requires": { + "@types/pg": "^7.4.0", + "decamelize": "^4.0.0", + "lodash": "~4.17.0", + "mkdirp": "~1.0.0", + "yargs": "~16.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==" + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "y18n": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz", + "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==" + }, + "yargs": { + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.1.0.tgz", + "integrity": "sha512-upWFJOmDdHN0syLuESuvXDmrRcWd1QafJolHskzaw79uZa7/x53gxQKiR07W59GWY1tFhhU/Th9DrtSfpS782g==", + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.2", + "yargs-parser": "^20.2.2" + } + }, + "yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==" + } + } + }, "node-pre-gyp": { "version": "0.15.0", "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.15.0.tgz", @@ -6106,6 +6414,11 @@ "release-zalgo": "^1.0.0" } }, + "packet-reader": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/packet-reader/-/packet-reader-1.0.0.tgz", + "integrity": "sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ==" + }, "param-case": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.3.tgz", @@ -6281,11 +6594,64 @@ "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, + "pg": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.5.0.tgz", + "integrity": "sha512-h+KHEwce67pAQilZhMCpCx1RC7rR1US7mdjwvKzHRaRxKQxbbFtv5UlwjzqILQ1dwhK+RVGqOVcahE/2KOcaeA==", + "requires": { + "buffer-writer": "2.0.0", + "packet-reader": "1.0.0", + "pg-connection-string": "^2.4.0", + "pg-pool": "^3.2.2", + "pg-protocol": "^1.4.0", + "pg-types": "^2.1.0", + "pgpass": "1.x" + } + }, + "pg-connection-string": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.4.0.tgz", + "integrity": "sha512-3iBXuv7XKvxeMrIgym7njT+HlZkwZqqGX4Bu9cci8xHZNT+Um1gWKqCsAzcC0d95rcKMU5WBg6YRUcHyV0HZKQ==" + }, + "pg-int8": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", + "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==" + }, + "pg-pool": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.2.2.tgz", + "integrity": "sha512-ORJoFxAlmmros8igi608iVEbQNNZlp89diFVx6yV5v+ehmpMY9sK6QgpmgoXbmkNaBAx8cOOZh9g80kJv1ooyA==" + }, + "pg-protocol": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.4.0.tgz", + "integrity": "sha512-El+aXWcwG/8wuFICMQjM5ZSAm6OWiJicFdNYo+VY3QP+8vI4SvLIWVe51PppTzMhikUJR+PsyIFKqfdXPz/yxA==" + }, + "pg-types": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", + "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", + "requires": { + "pg-int8": "1.0.1", + "postgres-array": "~2.0.0", + "postgres-bytea": "~1.0.0", + "postgres-date": "~1.0.4", + "postgres-interval": "^1.1.0" + } + }, + "pgpass": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.4.tgz", + "integrity": "sha512-YmuA56alyBq7M59vxVBfPJrGSozru8QAdoNlWuW3cz8l+UX3cWge0vTvjKhsSHSJpo3Bom8/Mm6hf0TR5GY0+w==", + "requires": { + "split2": "^3.1.1" + } + }, "picomatch": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", - "dev": true + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==" }, "pkg-dir": { "version": "4.2.0", @@ -6332,6 +6698,29 @@ } } }, + "postgres-array": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", + "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==" + }, + "postgres-bytea": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz", + "integrity": "sha1-AntTPAqokOJtFy1Hz5zOzFIazTU=" + }, + "postgres-date": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", + "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==" + }, + "postgres-interval": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", + "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", + "requires": { + "xtend": "^4.0.0" + } + }, "prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -6499,9 +6888,9 @@ } }, "redis-commands": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.5.0.tgz", - "integrity": "sha512-6KxamqpZ468MeQC3bkWmCB1fp56XL64D4Kf0zJSwDZbVLLm7KFkoIcHrgRvQ+sk8dnhySs7+yBg94yIkAK7aJg==" + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.6.0.tgz", + "integrity": "sha512-2jnZ0IkjZxvguITjFTrGiLyzQZcTvaw8DAaCXxZq/dsHXz7KfMQ3OUJy7Tz9vnRtZRVz6VRCPDvruvU8Ts44wQ==" }, "redis-errors": { "version": "1.2.0", @@ -6614,8 +7003,7 @@ "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, "require-main-filename": { "version": "2.0.0", @@ -6978,6 +7366,26 @@ "which": "^2.0.1" } }, + "split2": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", + "integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==", + "requires": { + "readable-stream": "^3.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -7028,7 +7436,6 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", - "dev": true, "requires": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -7092,7 +7499,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, "requires": { "ansi-regex": "^5.0.0" } @@ -7321,7 +7727,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, "requires": { "is-number": "^7.0.0" } @@ -7480,11 +7885,6 @@ "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" }, - "uuid": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.2.0.tgz", - "integrity": "sha512-CYpGiFTUrmI6OBMkAdjSDM0k5h8SkkiTP4WAjQgDgNB1S3Ou9VBEvr6q0Kv2H1mMk7IWfxYGpMH5sd5AvcIV2Q==" - }, "uuid-parse": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/uuid-parse/-/uuid-parse-1.1.0.tgz", @@ -7738,6 +8138,11 @@ "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.3.tgz", "integrity": "sha512-HgS+X6zAztGa9zIK3Y3LXuJes33Lz9x+YyTxgrkIdabu2vqcGOWwdfCpf1hWLRrd553wd4QCDf6BBO6FfdsRiQ==" }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + }, "y18n": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", diff --git a/services/authentication-service/package.json b/services/authentication-service/package.json index 5ebbb3182b..85dca20239 100644 --- a/services/authentication-service/package.json +++ b/services/authentication-service/package.json @@ -49,13 +49,14 @@ "@loopback/rest": "^5.0.1", "@loopback/rest-explorer": "^2.2.2", "@sourceloop/core": "^1.0.0-alpha.14", + "@types/i18n": "^0.8.6", "bcrypt": "^5.0.0", "dotenv": "^8.2.0", "dotenv-extended": "^2.8.0", "jsonwebtoken": "^8.5.1", "lodash": "^4.17.19", "loopback4-authentication": "^4.0.1", - "loopback4-authorization": "^2.3.2", + "loopback4-authorization": "3.1.1", "loopback4-helmet": "^1.1.0", "moment": "^2.27.0", "moment-timezone": "^0.5.31", diff --git a/services/authentication-service/src/controllers/auth-client.controller.ts b/services/authentication-service/src/controllers/auth-client.controller.ts index 2389c122cf..b962a7b4cf 100644 --- a/services/authentication-service/src/controllers/auth-client.controller.ts +++ b/services/authentication-service/src/controllers/auth-client.controller.ts @@ -32,7 +32,7 @@ export class AuthClientController { ) {} @authenticate(STRATEGY.BEARER) - @authorize([PermissionKey.NotAllowed]) + @authorize({permissions: [PermissionKey.NotAllowed]}) @post(baseUrl, { responses: { [STATUS_CODE.OK]: { @@ -55,7 +55,7 @@ export class AuthClientController { } @authenticate(STRATEGY.BEARER) - @authorize([PermissionKey.NotAllowed]) + @authorize({permissions: [PermissionKey.NotAllowed]}) @get(`${baseUrl}/count`, { responses: { [STATUS_CODE.OK]: { @@ -72,7 +72,7 @@ export class AuthClientController { } @authenticate(STRATEGY.BEARER) - @authorize([PermissionKey.NotAllowed]) + @authorize({permissions: [PermissionKey.NotAllowed]}) @get(baseUrl, { responses: { [STATUS_CODE.OK]: { @@ -93,7 +93,7 @@ export class AuthClientController { } @authenticate(STRATEGY.BEARER) - @authorize([PermissionKey.NotAllowed]) + @authorize({permissions: [PermissionKey.NotAllowed]}) @patch(baseUrl, { responses: { [STATUS_CODE.OK]: { @@ -118,7 +118,7 @@ export class AuthClientController { } @authenticate(STRATEGY.BEARER) - @authorize([PermissionKey.NotAllowed]) + @authorize({permissions: [PermissionKey.NotAllowed]}) @get(`${baseUrl}/{id}`, { responses: { [STATUS_CODE.OK]: { @@ -132,7 +132,7 @@ export class AuthClientController { } @authenticate(STRATEGY.BEARER) - @authorize([PermissionKey.NotAllowed]) + @authorize({permissions: [PermissionKey.NotAllowed]}) @patch(`${baseUrl}/{id}`, { responses: { '204': { @@ -155,7 +155,7 @@ export class AuthClientController { } @authenticate(STRATEGY.BEARER) - @authorize([PermissionKey.NotAllowed]) + @authorize({permissions: [PermissionKey.NotAllowed]}) @put(`${baseUrl}/{id}`, { responses: { '204': { @@ -171,7 +171,7 @@ export class AuthClientController { } @authenticate(STRATEGY.BEARER) - @authorize([PermissionKey.NotAllowed]) + @authorize({permissions: [PermissionKey.NotAllowed]}) @del(`${baseUrl}/{id}`, { responses: { '204': { diff --git a/services/authentication-service/src/controllers/forget-password.controller.ts b/services/authentication-service/src/controllers/forget-password.controller.ts index 1f7ac51ec4..8744f037c9 100644 --- a/services/authentication-service/src/controllers/forget-password.controller.ts +++ b/services/authentication-service/src/controllers/forget-password.controller.ts @@ -44,7 +44,7 @@ export class ForgetPasswordController { ) {} @authenticateClient(STRATEGY.CLIENT_PASSWORD) - @authorize(['*']) + @authorize({permissions: ['*']}) @post(`auth/forget-password`, { responses: { [STATUS_CODE.OK]: { @@ -112,7 +112,7 @@ export class ForgetPasswordController { } } - @authorize(['*']) + @authorize({permissions: ['*']}) @get(`auth/verify-reset-password-link`, { responses: { [STATUS_CODE.OK]: { @@ -148,7 +148,7 @@ export class ForgetPasswordController { } @authenticateClient(STRATEGY.CLIENT_PASSWORD) - @authorize(['*']) + @authorize({permissions: ['*']}) @patch(`auth/reset-password`, { responses: { [STATUS_CODE.NO_CONTENT]: { diff --git a/services/authentication-service/src/controllers/otp.controller.ts b/services/authentication-service/src/controllers/otp.controller.ts index 4baf8eba9a..a2b1160295 100644 --- a/services/authentication-service/src/controllers/otp.controller.ts +++ b/services/authentication-service/src/controllers/otp.controller.ts @@ -21,7 +21,7 @@ export class OtpController { public otpRepository: OtpRepository, ) {} - @authorize(['*']) + @authorize({permissions: ['*']}) @post('/otp-caches', { responses: { [STATUS_CODE.OK]: { @@ -43,7 +43,7 @@ export class OtpController { await this.otpRepository.set(otp.username, otp, {ttl: otpCacheTtl}); } - @authorize(['*']) + @authorize({permissions: ['*']}) @get('/otp-caches/{id}', { responses: { [STATUS_CODE.OK]: { @@ -56,7 +56,7 @@ export class OtpController { return this.otpRepository.get(id); } - @authorize(['*']) + @authorize({permissions: ['*']}) @del('/otp-caches/{id}', { responses: { '204': { diff --git a/services/authentication-service/src/models/index.ts b/services/authentication-service/src/models/index.ts index 24e646af0d..fcea875592 100644 --- a/services/authentication-service/src/models/index.ts +++ b/services/authentication-service/src/models/index.ts @@ -13,10 +13,12 @@ import {RefreshTokenRequest} from './refresh-token-request.model'; import {ForgetPasswordResponseDto} from './forget-password-response-dto.model'; import {ForgetPasswordDto} from './forget-password-dto.model'; import {ResetPasswordWithClient} from './reset-password-with-client.model'; +import {UserLevelResource} from './user-level-resource.model'; export * from './user.model'; export * from './tenant.model'; export * from './role.model'; +export * from './user-level-resource.model'; export * from './user-level-permission.model'; export * from './auth-client.model'; export * from './refresh-token.model'; @@ -37,6 +39,7 @@ export const models = [ Role, AuthClient, UserLevelPermission, + UserLevelResource, RefreshToken, RevokedToken, UserCredentials, diff --git a/services/authentication-service/src/models/user-level-resource.model.ts b/services/authentication-service/src/models/user-level-resource.model.ts new file mode 100644 index 0000000000..bca21ed878 --- /dev/null +++ b/services/authentication-service/src/models/user-level-resource.model.ts @@ -0,0 +1,54 @@ +import {belongsTo, model, property} from '@loopback/repository'; +import {UserModifiableEntity} from '@sourceloop/core'; +import {IUserResource} from 'loopback4-authorization'; + +import {UserTenant} from './user-tenant.model'; + +@model({ + name: 'user_resources', +}) +export class UserLevelResource extends UserModifiableEntity + implements IUserResource { + @property({ + type: 'string', + id: true, + name: 'id', + }) + id?: string; + + @belongsTo( + () => UserTenant, + {keyFrom: 'user_tenant_id', name: 'userTenant'}, + { + name: 'user_tenant_id', + required: true, + }, + ) + userTenantId: string; + + @property({ + type: 'string', + required: true, + name: 'resource_name', + }) + resourceName: string; + + @property({ + type: 'string', + required: true, + name: 'resource_value', + }) + resourceValue: string; + + @property({ + type: 'boolean', + required: true, + default: true, + name: 'allowed', + }) + allowed: boolean; + + constructor(data?: Partial) { + super(data); + } +} diff --git a/services/authentication-service/src/modules/auth/login.controller.ts b/services/authentication-service/src/modules/auth/login.controller.ts index 10380ff77d..e3c6481598 100644 --- a/services/authentication-service/src/modules/auth/login.controller.ts +++ b/services/authentication-service/src/modules/auth/login.controller.ts @@ -51,6 +51,7 @@ import { RevokedTokenRepository, RoleRepository, UserLevelPermissionRepository, + UserLevelResourceRepository, UserRepository, UserTenantRepository, } from '../../repositories'; @@ -95,6 +96,8 @@ export class LoginController { public roleRepo: RoleRepository, @repository(UserLevelPermissionRepository) public utPermsRepo: UserLevelPermissionRepository, + @repository(UserLevelResourceRepository) + public userResourcesRepository: UserLevelResourceRepository, @repository(UserTenantRepository) public userTenantRepo: UserTenantRepository, @repository(RefreshTokenRepository) @@ -110,7 +113,7 @@ export class LoginController { @authenticateClient(STRATEGY.CLIENT_PASSWORD) @authenticate(STRATEGY.LOCAL) - @authorize(['*']) + @authorize({permissions: ['*']}) @post('/auth/login', { description: 'Gets you the code that will be used for getting token (webapps)', @@ -169,7 +172,7 @@ export class LoginController { @authenticateClient(STRATEGY.CLIENT_PASSWORD) @authenticate(STRATEGY.OAUTH2_RESOURCE_OWNER_GRANT) - @authorize(['*']) + @authorize({permissions: ['*']}) @post('/auth/login-token', { description: 'Gets you refresh token and access token in one hit. (mobile app)', @@ -235,7 +238,7 @@ export class LoginController { } } - @authorize(['*']) + @authorize({permissions: ['*']}) @post('/auth/token', { description: ' Send the code received from the above api and this api will send you refresh token and access token (webapps)', @@ -293,7 +296,7 @@ export class LoginController { } } - @authorize(['*']) + @authorize({permissions: ['*']}) @post('/auth/token-refresh', { description: ' Gets you a new access and refresh token once your access token is expired. (both mobile and web)\n', @@ -355,7 +358,7 @@ export class LoginController { }, queryGen, ) - @authorize(['*']) + @authorize({permissions: ['*']}) @get('/auth/google', { responses: { [STATUS_CODE.OK]: { @@ -388,7 +391,7 @@ export class LoginController { }, queryGen, ) - @authorize(['*']) + @authorize({permissions: ['*']}) @get('/auth/google-auth-redirect', { responses: { [STATUS_CODE.OK]: { @@ -453,7 +456,7 @@ export class LoginController { }, keycloakQueryGen, ) - @authorize(['*']) + @authorize({permissions: ['*']}) @get('/auth/keycloak', { responses: { [STATUS_CODE.OK]: { @@ -487,7 +490,7 @@ export class LoginController { }, keycloakQueryGen, ) - @authorize(['*']) + @authorize({permissions: ['*']}) @get('/auth/keycloak-auth-redirect', { responses: { [STATUS_CODE.OK]: { @@ -538,7 +541,7 @@ export class LoginController { } @authenticate(STRATEGY.BEARER, {passReqToCallback: true}) - @authorize(['*']) + @authorize({permissions: ['*']}) @patch(`auth/change-password`, { responses: { [STATUS_CODE.OK]: { @@ -624,7 +627,7 @@ export class LoginController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize(['*']) + @authorize({permissions: ['*']}) @get('/auth/me', { description: 'To get the user details', responses: { @@ -713,6 +716,20 @@ export class LoginController { const size = 32; const ms = 1000; + const userResources = await this.userResourcesRepository.find({ + where: { + userTenantId: userTenant.id, + }, + fields: { + resourceName: true, + resourceValue: true, + allowed: true, + }, + }); + authUser.allowedResources = userResources.map( + userResource => + `${userResource.resourceName}/${userResource.resourceValue}`, + ); const utPerms = await this.utPermsRepo.find({ where: { userTenantId: userTenant.id, diff --git a/services/authentication-service/src/modules/auth/logout.controller.ts b/services/authentication-service/src/modules/auth/logout.controller.ts index 0fc8c933ff..93e5c5c354 100644 --- a/services/authentication-service/src/modules/auth/logout.controller.ts +++ b/services/authentication-service/src/modules/auth/logout.controller.ts @@ -37,7 +37,7 @@ export class LogoutController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize(['*']) + @authorize({permissions: ['*']}) @post('/logout', { description: 'To logout', responses: { diff --git a/services/authentication-service/src/modules/auth/models/auth-user.model.ts b/services/authentication-service/src/modules/auth/models/auth-user.model.ts index 6b6fca8144..d2410f133c 100644 --- a/services/authentication-service/src/modules/auth/models/auth-user.model.ts +++ b/services/authentication-service/src/modules/auth/models/auth-user.model.ts @@ -54,7 +54,7 @@ export class AuthUser extends User implements IAuthUserWithPermissions { 1. userAgent 2. deviceId `, }) - deviceInfo: DeviceInfo; + deviceInfo?: DeviceInfo; @property({ type: 'string', @@ -81,6 +81,12 @@ export class AuthUser extends User implements IAuthUserWithPermissions { }) passwordExpiryTime?: Date; + @property({ + type: 'array', + itemType: 'string', + }) + allowedResources?: string[]; + @property({ type: 'number', jsonSchema: { diff --git a/services/authentication-service/src/repositories/index.ts b/services/authentication-service/src/repositories/index.ts index 976aee816a..9c98de3ed7 100644 --- a/services/authentication-service/src/repositories/index.ts +++ b/services/authentication-service/src/repositories/index.ts @@ -7,12 +7,14 @@ import {TenantConfigRepository} from './tenant-config.repository'; import {TenantRepository} from './tenant.repository'; import {UserCredentialsRepository} from './user-credentials.repository'; import {UserLevelPermissionRepository} from './user-level-permission.repository'; +import {UserLevelResourceRepository} from './user-level-resource.repository'; import {UserTenantRepository} from './user-tenant.repository'; import {UserRepository} from './user.repository'; export * from './user.repository'; export * from './role.repository'; export * from './user-level-permission.repository'; +export * from './user-level-resource.repository'; export * from './refresh-token.repository'; export * from './auth-client.repository'; export * from './revoked-token.repository'; @@ -34,4 +36,5 @@ export const repositories = [ TenantConfigRepository, UserTenantRepository, TenantRepository, + UserLevelResourceRepository, ]; diff --git a/services/authentication-service/src/repositories/user-level-resource.repository.ts b/services/authentication-service/src/repositories/user-level-resource.repository.ts new file mode 100644 index 0000000000..245b31b4fa --- /dev/null +++ b/services/authentication-service/src/repositories/user-level-resource.repository.ts @@ -0,0 +1,43 @@ +import {Getter, inject} from '@loopback/core'; +import {BelongsToAccessor, repository, juggler} from '@loopback/repository'; +import {AuthenticationBindings} from 'loopback4-authentication'; +import { + DefaultUserModifyCrudRepository, + IAuthUserWithPermissions, +} from '@sourceloop/core'; + +import {UserLevelResource, UserTenant} from '../models'; + +import {UserTenantRepository} from './user-tenant.repository'; +import {AuthDbSourceName} from '../types'; + +export class UserLevelResourceRepository extends DefaultUserModifyCrudRepository< + UserLevelResource, + typeof UserLevelResource.prototype.id +> { + public readonly userTenant: BelongsToAccessor< + UserTenant, + typeof UserLevelResource.prototype.id + >; + + constructor( + @inject(`datasources.${AuthDbSourceName}`) + dataSource: juggler.DataSource, + @inject.getter(AuthenticationBindings.CURRENT_USER) + protected readonly getCurrentUser: Getter< + IAuthUserWithPermissions | undefined + >, + @repository.getter('UserTenantRepository') + protected userTenantRepositoryGetter: Getter, + ) { + super(UserLevelResource, dataSource, getCurrentUser); + this.userTenant = this.createBelongsToAccessorFor( + 'userTenant', + userTenantRepositoryGetter, + ); + this.registerInclusionResolver( + 'userTenant', + this.userTenant.inclusionResolver, + ); + } +} diff --git a/services/in-mail-service/package-lock.json b/services/in-mail-service/package-lock.json index c557b6e2ab..0b73be657d 100644 --- a/services/in-mail-service/package-lock.json +++ b/services/in-mail-service/package-lock.json @@ -235,6 +235,24 @@ "to-fast-properties": "^2.0.0" } }, + "@dabh/diagnostics": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.2.tgz", + "integrity": "sha512-+A1YivoVDNNVCdfozHSR8v/jyuuLTMXwjWuxPFlFlUapXoGc+Gj9mDlTDDfrwl7rXCl2tNZ0kE8sIBO6YOn96Q==", + "requires": { + "colorspace": "1.1.x", + "enabled": "2.0.x", + "kuler": "^2.0.0" + } + }, + "@exlinc/keycloak-passport": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@exlinc/keycloak-passport/-/keycloak-passport-1.0.2.tgz", + "integrity": "sha512-mUZdBq5peaHRNf8pd6XxgNWk4aY477Gy9XqF0WGHBmCygA2tX4EOvnoI/yHhu0ceAY08g3ng9BbEFKlSMRHWcg==", + "requires": { + "passport-oauth2": "^1.4.0" + } + }, "@hapi/address": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz", @@ -485,17 +503,53 @@ } }, "@loopback/context": { - "version": "3.9.4", - "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.9.4.tgz", - "integrity": "sha512-Ch7X5gea3SRDwrJetJ5fthbNFBTcGIwxTMR11dvxrZClQUAOGX3M1LIjXhJq9HFXxVlxavL9Vp6BYL2Gg0QLMQ==", + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.13.0.tgz", + "integrity": "sha512-3R+6Mxm2QOAW8cjhEPaxP3i+uj1y9vkW7Ie91kuFa16yVHgOMrxPkcBmxduH5x4Cd1ZEKmtR/iVTfvRKoBYVxA==", "requires": { - "@loopback/metadata": "^2.2.4", + "@loopback/metadata": "^3.0.3", "@types/debug": "^4.1.5", - "debug": "^4.1.1", + "debug": "^4.2.0", "hyperid": "^2.0.5", "p-event": "^4.2.0", - "tslib": "^2.0.0", - "uuid": "^8.3.0" + "tslib": "^2.0.3", + "uuid": "^8.3.1" + }, + "dependencies": { + "@loopback/metadata": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-3.0.3.tgz", + "integrity": "sha512-VsY3XfQC42Icne5d4wrRgXAEWTmaC9xhzM8e9CmPlYvONfUG3HGPiUIIPWQYElN4IW+hhW56vId4pNI2vh974A==", + "requires": { + "debug": "^4.2.0", + "lodash": "^4.17.20", + "reflect-metadata": "^0.1.13", + "tslib": "^2.0.3" + } + }, + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + }, + "tslib": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" + }, + "uuid": { + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", + "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==" + } } }, "@loopback/core": { @@ -629,20 +683,33 @@ } }, "@loopback/metadata": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-2.2.6.tgz", - "integrity": "sha512-DI6MpFnGudZikdy9+YfYJ5cZWMQRRxqvsQ/SWlads/gvBh1Vwv5oM6lkHAfYNySn2X/L3B5J6P3IOo6eB9vDPg==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-3.0.3.tgz", + "integrity": "sha512-VsY3XfQC42Icne5d4wrRgXAEWTmaC9xhzM8e9CmPlYvONfUG3HGPiUIIPWQYElN4IW+hhW56vId4pNI2vh974A==", "requires": { - "debug": "^4.1.1", + "debug": "^4.2.0", "lodash": "^4.17.20", "reflect-metadata": "^0.1.13", - "tslib": "^2.0.1" + "tslib": "^2.0.3" }, "dependencies": { + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" + } + }, "lodash": { "version": "4.17.20", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + }, + "tslib": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" } } }, @@ -1007,6 +1074,43 @@ } } }, + "@loopback/service-proxy": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/@loopback/service-proxy/-/service-proxy-2.3.8.tgz", + "integrity": "sha512-WRErlDsmDSC+4wb+2J0u8hdNKoYxX6jXNzhSvZ2DPp7oubZPC8LeKcjMr1nNWkdT9vEbJYmoQP4kUC6LCDFfnQ==", + "requires": { + "@loopback/core": "^2.9.5", + "loopback-datasource-juggler": "^4.24.0", + "tslib": "^2.0.1" + }, + "dependencies": { + "@loopback/core": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@loopback/core/-/core-2.12.0.tgz", + "integrity": "sha512-kdJZzIF7PA9TjnKoEtfhn2G41stmS8gIsweJAbiG7i+S4REbZLGR4KBHzDtSyfeeDCcxayouGzKwi/BT8gWDgQ==", + "requires": { + "@loopback/context": "^3.13.0", + "debug": "^4.2.0", + "tslib": "^2.0.3" + }, + "dependencies": { + "tslib": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" + } + } + }, + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" + } + } + } + }, "@loopback/testlab": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/@loopback/testlab/-/testlab-2.0.2.tgz", @@ -1120,6 +1224,97 @@ "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==" }, + "@sourceloop/core": { + "version": "1.0.0-alpha.14", + "resolved": "https://registry.npmjs.org/@sourceloop/core/-/core-1.0.0-alpha.14.tgz", + "integrity": "sha512-sOckHOfjLjpv8qJ/7mZx7+5LORsSUy8oPU1QFCMi/SiKnYG7jUQknN4HUk98qODIxaShtPHo3DLyCo7/Z0rQLA==", + "requires": { + "@loopback/boot": "^2.3.1", + "@loopback/context": "^3.9.4", + "@loopback/core": "^2.7.0", + "@loopback/repository": "^2.5.1", + "@loopback/rest": "^5.0.1", + "@loopback/service-proxy": "^2.3.4", + "i18n": "^0.10.0", + "jsonwebtoken": "^8.5.1", + "lodash": "^4.17.19", + "logform": "^2.1.2", + "loopback-datasource-juggler": "^4.21.2", + "loopback4-authentication": "^4.0.1", + "loopback4-authorization": "^2.3.2", + "loopback4-helmet": "^1.0.3", + "loopback4-ratelimiter": "^1.0.0", + "loopback4-soft-delete": "^2.0.0", + "moment": "^2.26.0", + "moment-timezone": "^0.5.31", + "tslib": "^1.10.0", + "winston": "^3.2.1" + }, + "dependencies": { + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" + } + }, + "loopback4-authentication": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/loopback4-authentication/-/loopback4-authentication-4.0.1.tgz", + "integrity": "sha512-Ba07SIwsVo/ieU2OCJcjwULZg/GUcmGoM3UGGriQqK9dEetdXjszWn1/3iQtMNCphNoKYTWfvGx7AWbRORpKtg==", + "requires": { + "@exlinc/keycloak-passport": "^1.0.2", + "@loopback/context": "^3.9.2", + "@loopback/core": "^2.9.1", + "passport": "^0.4.1", + "passport-azure-ad": "^4.2.1", + "passport-google-oauth20": "^2.0.0", + "passport-http-bearer": "^1.0.1", + "passport-local": "^1.0.0", + "passport-oauth2-client-password": "^0.1.2" + }, + "dependencies": { + "@loopback/core": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@loopback/core/-/core-2.12.0.tgz", + "integrity": "sha512-kdJZzIF7PA9TjnKoEtfhn2G41stmS8gIsweJAbiG7i+S4REbZLGR4KBHzDtSyfeeDCcxayouGzKwi/BT8gWDgQ==", + "requires": { + "@loopback/context": "^3.13.0", + "debug": "^4.2.0", + "tslib": "^2.0.3" + } + }, + "tslib": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" + } + } + }, + "loopback4-authorization": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/loopback4-authorization/-/loopback4-authorization-2.3.2.tgz", + "integrity": "sha512-9vMmcqRFWQOsAv1iocsWuZKkM33DUGmelGu6rQy7zsEAUnP5XgiRBJSUVZ/wbZnCbPvz9UughtBEHY7FzpCj6Q==", + "requires": { + "lodash": "^4.17.11" + } + }, + "loopback4-soft-delete": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loopback4-soft-delete/-/loopback4-soft-delete-2.0.0.tgz", + "integrity": "sha512-XBP2xaz9ZBPYSY09l60ZTOc/dq81JevhfoI4ImF7/mVcDVa8io8t6nvv/JeTZlim49Rx+MtJsMgQnpEqi63J2Q==", + "requires": { + "@loopback/core": "^2.7.0" + } + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + } + } + }, "@types/body-parser": { "version": "1.19.0", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.0.tgz", @@ -1245,6 +1440,20 @@ "@types/node": "*" } }, + "@types/pg": { + "version": "7.14.6", + "resolved": "https://registry.npmjs.org/@types/pg/-/pg-7.14.6.tgz", + "integrity": "sha512-mf6kYvuYS2CObDxtsw5imE4vOvq+XHJtiJNFXir/fn9nxZtIFQ3/ECpokm8fNkxKBh7nQhyegHwNg1NIW+yYJA==", + "requires": { + "@types/node": "*", + "@types/pg-types": "*" + } + }, + "@types/pg-types": { + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@types/pg-types/-/pg-types-1.11.5.tgz", + "integrity": "sha512-L8ogeT6vDzT1vxlW3KITTCt+BVXXVkLXfZ/XNm6UqbcJgxf+KPO7yjWx7dQQE8RW07KopL10x2gNMs41+IkMGQ==" + }, "@types/qs": { "version": "6.9.3", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.3.tgz", @@ -1551,6 +1760,11 @@ "array-filter": "^1.0.0" } }, + "await-lock": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/await-lock/-/await-lock-2.1.0.tgz", + "integrity": "sha512-t7Zm5YGgEEc/3eYAicF32m/TNvL+XOeYZy9CvBUeJY/szM7frLolFylhrlZNWV/ohWhcUXygrBGjYmoQdxF4CQ==" + }, "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -1683,6 +1897,11 @@ } } }, + "bowser": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.9.0.tgz", + "integrity": "sha512-2ld76tuLBNFekRgmJfT2+3j5MIrP6bFict8WAIT3beq+srz1gcKNAdNKMqHqauQt63NmAa88HfP1/Ypa9Er3HA==" + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1696,7 +1915,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, "requires": { "fill-range": "^7.0.1" } @@ -1723,6 +1941,11 @@ "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, + "buffer-writer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/buffer-writer/-/buffer-writer-2.0.0.tgz", + "integrity": "sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw==" + }, "bunyan": { "version": "1.8.14", "resolved": "https://registry.npmjs.org/bunyan/-/bunyan-1.8.14.tgz", @@ -1800,6 +2023,11 @@ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" }, + "camelize": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.0.tgz", + "integrity": "sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs=" + }, "capital-case": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/capital-case/-/capital-case-1.0.3.tgz", @@ -1817,6 +2045,27 @@ } } }, + "casbin": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/casbin/-/casbin-5.2.0.tgz", + "integrity": "sha512-9qqcTAx0ysgF6xz1Mq83B7yD9inG4iEZ85tMZBmkXCIsECD9yAE8XhaONn7GhlnTave10k3ktGJ+9qNItXe30A==", + "requires": { + "await-lock": "^2.0.1", + "expression-eval": "^2.0.0", + "ip": "^1.1.5", + "micromatch": "^4.0.2" + } + }, + "casbin-pg-adapter": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/casbin-pg-adapter/-/casbin-pg-adapter-1.4.0.tgz", + "integrity": "sha512-9T0i+t0XwdnsBFl+20ojAED9+05SN4haJDLOJTUh9liHO+yBi6SXwSboD0MLzserFkxCs8VJJ+BNJlavExlU+A==", + "requires": { + "casbin": "^5.0.4", + "node-pg-migrate": "^5.1.0", + "pg": "^8.2.1" + } + }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -1962,6 +2211,16 @@ } } }, + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=" + }, + "cluster-key-slot": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/cluster-key-slot/-/cluster-key-slot-1.1.0.tgz", + "integrity": "sha512-2Nii8p3RwAPiFwsnZvukotvow2rIHM+yQ6ZcBXGHdniadkYGZYiGmkHJIbZPIV9nfv7m/U1IPMVVcAhoWFeklw==" + }, "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -1972,6 +2231,15 @@ "resolved": "https://registry.npmjs.org/code-error-fragment/-/code-error-fragment-0.0.230.tgz", "integrity": "sha512-cadkfKp6932H8UkhzE/gcUqhRMNf8jHzkAN7+5Myabswaghu4xABTgPHDCjW+dBAJxj/SpkTYokpzDqY4pCzQw==" }, + "color": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/color/-/color-3.0.0.tgz", + "integrity": "sha512-jCpd5+s0s0t7p3pHQKpnJ0TpQKKdleP71LWcA0aqiljpiuAkOSUFN/dyH8ZwF0hRmFlrIuRhufds1QyEP9EB+w==", + "requires": { + "color-convert": "^1.9.1", + "color-string": "^1.5.2" + } + }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -1985,6 +2253,29 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, + "color-string": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.4.tgz", + "integrity": "sha512-57yF5yt8Xa3czSEW1jfQDE79Idk0+AkN/4KWad6tbdxUmAs3MvjxlWSWD4deYytcRfoZ9nhKyFl1kj5tBvidbw==", + "requires": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==" + }, + "colorspace": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.2.tgz", + "integrity": "sha512-vt+OoIP2d76xLhjwbBaucYlNSpPsrJWPlBTtwCpQKIu6/CSMutyzX93O/Do0qzpH3YoHEes8YEFXyZ797rEhzQ==", + "requires": { + "color": "3.0.x", + "text-hex": "1.0.x" + } + }, "combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -2041,6 +2332,11 @@ } } }, + "content-security-policy-builder": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/content-security-policy-builder/-/content-security-policy-builder-2.1.0.tgz", + "integrity": "sha512-/MtLWhJVvJNkA9dVLAp6fg9LxD2gfI6R2Fi1hPmfjYXSahJJzcfvoeDOxSyp4NvxMuwWv3WMssE9o31DoULHrQ==" + }, "content-type": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", @@ -2120,6 +2416,11 @@ "assert-plus": "^1.0.0" } }, + "dasherize": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dasherize/-/dasherize-2.0.0.tgz", + "integrity": "sha1-bYCcnNDPe7iVLYD8hPoT1H3bEwg=" + }, "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", @@ -2176,6 +2477,14 @@ "strip-bom": "^4.0.0" } }, + "defaults": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "requires": { + "clone": "^1.0.2" + } + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -2189,6 +2498,11 @@ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" }, + "denque": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/denque/-/denque-1.4.1.tgz", + "integrity": "sha512-OfzPuSZKGcgr96rf1oODnfjqBFmr1DVoc/TrItj3Ohe0Ah1C5WX5Baquw/9U9KovnQ88EqmJbD66rKYUQYN1tQ==" + }, "depd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", @@ -2214,6 +2528,11 @@ "esutils": "^2.0.2" } }, + "dont-sniff-mimetype": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/dont-sniff-mimetype/-/dont-sniff-mimetype-1.1.0.tgz", + "integrity": "sha512-ZjI4zqTaxveH2/tTlzS1wFp+7ncxNZaIEWYg3lzZRHkKf5zPT/MnEG6WL0BhHMJUabkh8GeU5NL5j+rEUCb7Ug==" + }, "dot-case": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.3.tgz", @@ -2230,6 +2549,11 @@ } } }, + "double-ended-queue": { + "version": "2.1.0-0", + "resolved": "https://registry.npmjs.org/double-ended-queue/-/double-ended-queue-2.1.0-0.tgz", + "integrity": "sha1-ED01J/0xUo9AGIEwyEHv3XgmTlw=" + }, "dtrace-provider": { "version": "0.8.8", "resolved": "https://registry.npmjs.org/dtrace-provider/-/dtrace-provider-0.8.8.tgz", @@ -2288,6 +2612,11 @@ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, + "enabled": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/enabled/-/enabled-2.0.0.tgz", + "integrity": "sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==" + }, "encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", @@ -2356,6 +2685,11 @@ "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", "dev": true }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -2692,6 +3026,19 @@ } } }, + "express-rate-limit": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-5.1.3.tgz", + "integrity": "sha512-TINcxve5510pXj4n9/1AMupkj3iWxl3JuZaWhCdYDlZeoCPqweGZrxbrlqTCFb1CT5wli7s8e2SH/Qz2c9GorA==" + }, + "expression-eval": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/expression-eval/-/expression-eval-2.1.0.tgz", + "integrity": "sha512-FUJO/Akvl/JOWkvlqZaqbkhsEWlCJWDeZG4tzX96UH68D9FeRgYgtb55C2qtqbORC0Q6x5419EDjWu4IT9kQfg==", + "requires": { + "jsep": "^0.3.0" + } + }, "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -2734,6 +3081,16 @@ "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==" }, + "feature-policy": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/feature-policy/-/feature-policy-0.3.0.tgz", + "integrity": "sha512-ZtijOTFN7TzCujt1fnNhfWPFPSHeZkesff9AXZj+UEjYBynWNUIYpC87Ve4wHzyexQsImicLu7WsC2LHq7/xrQ==" + }, + "fecha": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.0.tgz", + "integrity": "sha512-aN3pcx/DSmtyoovUudctc8+6Hl4T+hI9GBBHLjA76jdZl7+b1sgh5g4k+u/GL3dTy1/pnYzKp69FpJ0OicE3Wg==" + }, "figures": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", @@ -2764,7 +3121,6 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, "requires": { "to-regex-range": "^5.0.1" } @@ -2863,6 +3219,11 @@ "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", "dev": true }, + "fn.name": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz", + "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==" + }, "foreach": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", @@ -3128,6 +3489,45 @@ } } }, + "helmet": { + "version": "3.23.3", + "resolved": "https://registry.npmjs.org/helmet/-/helmet-3.23.3.tgz", + "integrity": "sha512-U3MeYdzPJQhtvqAVBPntVgAvNSOJyagwZwyKsFdyRa8TV3pOKVFljalPOCxbw5Wwf2kncGhmP0qHjyazIdNdSA==", + "requires": { + "depd": "2.0.0", + "dont-sniff-mimetype": "1.1.0", + "feature-policy": "0.3.0", + "helmet-crossdomain": "0.4.0", + "helmet-csp": "2.10.0", + "hide-powered-by": "1.1.0", + "hpkp": "2.0.0", + "hsts": "2.2.0", + "nocache": "2.1.0", + "referrer-policy": "1.2.0", + "x-xss-protection": "1.3.0" + } + }, + "helmet-crossdomain": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/helmet-crossdomain/-/helmet-crossdomain-0.4.0.tgz", + "integrity": "sha512-AB4DTykRw3HCOxovD1nPR16hllrVImeFp5VBV9/twj66lJ2nU75DP8FPL0/Jp4jj79JhTfG+pFI2MD02kWJ+fA==" + }, + "helmet-csp": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/helmet-csp/-/helmet-csp-2.10.0.tgz", + "integrity": "sha512-Rz953ZNEFk8sT2XvewXkYN0Ho4GEZdjAZy4stjiEQV3eN7GDxg1QKmYggH7otDyIA7uGA6XnUMVSgeJwbR5X+w==", + "requires": { + "bowser": "2.9.0", + "camelize": "1.0.0", + "content-security-policy-builder": "2.1.0", + "dasherize": "2.0.0" + } + }, + "hide-powered-by": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/hide-powered-by/-/hide-powered-by-1.1.0.tgz", + "integrity": "sha512-Io1zA2yOA1YJslkr+AJlWSf2yWFkKjvkcL9Ni1XSUqnGLr/qRQe2UI3Cn/J9MsJht7yEVCe0SscY1HgVMujbgg==" + }, "hmac-drbg": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", @@ -3138,6 +3538,19 @@ "minimalistic-crypto-utils": "^1.0.1" } }, + "hpkp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hpkp/-/hpkp-2.0.0.tgz", + "integrity": "sha1-EOFCJk52IVpdMMROxD3mTe5tFnI=" + }, + "hsts": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/hsts/-/hsts-2.2.0.tgz", + "integrity": "sha512-ToaTnQ2TbJkochoVcdXYm4HOCliNozlviNsg+X2XQLQvZNI/kCHR9rZxVYpJB3UPcHz80PgxRyWQ7PdU1r+VBQ==", + "requires": { + "depd": "2.0.0" + } + }, "html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -3209,6 +3622,26 @@ } } }, + "i18n": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/i18n/-/i18n-0.10.0.tgz", + "integrity": "sha512-lCSpIm/ZLUCQMAv+UAjSEYzPq96KG7fIx6o1mNQ0MuTBzXpPgd31t4WLzbPG10nKTLJzj9176dgOG7C0wUquSA==", + "requires": { + "debug": "*", + "make-plural": "^6.2.1", + "math-interval-parser": "^2.0.1", + "messageformat": "^2.3.0", + "mustache": "^4.0.1", + "sprintf-js": "^1.1.2" + }, + "dependencies": { + "sprintf-js": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", + "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==" + } + } + }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -3342,6 +3775,35 @@ "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-3.0.1.tgz", "integrity": "sha512-CYdFeFexxhv/Bcny+Q0BfOV+ltRlJcd4BBZBYFX/O0u4npJrgZtIcjokegtiSMAvlMTJ+Koq0GBCc//3bueQxw==" }, + "ioredis": { + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-4.19.2.tgz", + "integrity": "sha512-SZSIwMrbd96b7rJvJwyTWSP6XQ0m1kAIIqBnwglJKrIJ6na7TeY4F2EV2vDY0xm/fLrUY8cEg81dR7kVFt2sKA==", + "requires": { + "cluster-key-slot": "^1.1.0", + "debug": "^4.1.1", + "denque": "^1.1.0", + "lodash.defaults": "^4.2.0", + "lodash.flatten": "^4.4.0", + "p-map": "^2.1.0", + "redis-commands": "1.6.0", + "redis-errors": "^1.2.0", + "redis-parser": "^3.0.0", + "standard-as-callback": "^2.0.1" + }, + "dependencies": { + "p-map": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==" + } + } + }, + "ip": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" + }, "ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -3352,6 +3814,11 @@ "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==" }, + "is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" + }, "is-bigint": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.0.tgz", @@ -3414,8 +3881,7 @@ "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" }, "is-number-object": { "version": "1.0.4", @@ -3670,6 +4136,11 @@ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, + "jsep": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/jsep/-/jsep-0.3.5.tgz", + "integrity": "sha512-AoRLBDc6JNnKjNcmonituEABS5bcfqDhQAWWXNTFrqu6nVXBpBAGfcoTGZMFlIrh9FjmE1CQyX9CTNwZrXMMDA==" + }, "jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -3745,6 +4216,30 @@ "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.1.0.tgz", "integrity": "sha512-CXcRvMyTlnR53xMcKnuMzfCA5i/nfblTnnr74CZb6C4vG39eu6w51t7nKmU5MfLfbTgGItliNyjO/ciNPDqClg==" }, + "jsonwebtoken": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", + "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", + "requires": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^5.6.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -3790,6 +4285,11 @@ "safe-buffer": "^5.0.1" } }, + "kuler": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", + "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==" + }, "lcid": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/lcid/-/lcid-3.1.1.tgz", @@ -3833,6 +4333,16 @@ "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=" }, + "lodash.defaults": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", + "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=" + }, + "lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=" + }, "lodash.flattendeep": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", @@ -3844,6 +4354,41 @@ "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=" }, + "lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8=" + }, + "lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=" + }, + "lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M=" + }, + "lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w=" + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=" + }, + "lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" + }, + "lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" + }, "log-symbols": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", @@ -3853,6 +4398,18 @@ "chalk": "^2.4.2" } }, + "logform": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/logform/-/logform-2.2.0.tgz", + "integrity": "sha512-N0qPlqfypFx7UHNn4B3lzS/b0uLqt2hmuoa+PpuXNYgozdJYAyauF5Ky0BWVjrxDlMWiT3qN4zPq3vVAfZy7Yg==", + "requires": { + "colors": "^1.2.1", + "fast-safe-stringify": "^2.0.4", + "fecha": "^4.2.0", + "ms": "^2.1.1", + "triple-beam": "^1.3.0" + } + }, "loopback-connector": { "version": "4.11.1", "resolved": "https://registry.npmjs.org/loopback-connector/-/loopback-connector-4.11.1.tgz", @@ -3873,31 +4430,170 @@ } } }, - "loopback-datasource-juggler": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/loopback-datasource-juggler/-/loopback-datasource-juggler-4.24.0.tgz", - "integrity": "sha512-v4UwAdSzsOVnRicBk6BuUjkwxk7TuJHUkbpXQxlVjSZCYx2WpSzapuEuhBIWUtoY5JMsE2S+xArl2qqrnSg3KA==", + "loopback-connector-kv-redis": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/loopback-connector-kv-redis/-/loopback-connector-kv-redis-3.0.3.tgz", + "integrity": "sha512-01eX6cC++W8DRwIHmnE7z8NrCQhqB+R48eAh+xT4PsEjDGmmRnA5HxQa5I3NJnL8+X1qEzSESkH/+QTo5tkxaQ==", "requires": { - "async": "^3.1.0", - "change-case": "^4.1.1", - "debug": "^4.1.0", - "depd": "^2.0.0", - "inflection": "^1.6.0", - "lodash": "^4.17.11", - "loopback-connector": "^4.4.0", - "minimatch": "^3.0.3", - "qs": "^6.5.0", - "shortid": "^2.2.6", - "strong-globalize": "^5.0.2", - "traverse": "^0.6.6", - "uuid": "^7.0.0" + "debug": "^4.1.1", + "ioredis": "^4.9.3", + "loopback-connector": "^4.0.0", + "strong-globalize": "^4.1.0" }, "dependencies": { - "uuid": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz", - "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==" - } + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "requires": { + "pump": "^3.0.0" + } + }, + "invert-kv": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==" + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "lcid": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", + "requires": { + "invert-kv": "^2.0.0" + } + }, + "mem": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", + "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", + "requires": { + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^2.0.0", + "p-is-promise": "^2.0.0" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "requires": { + "path-key": "^2.0.0" + } + }, + "os-locale": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", + "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "requires": { + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" + } + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" + }, + "strong-globalize": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/strong-globalize/-/strong-globalize-4.1.3.tgz", + "integrity": "sha512-SJegV7w5D4AodEspZJtJ7rls3fmi+Zc0PdyJCqBsg4RN9B8TC80/uAI2fikC+s1Jp9FLvr2vDX8f0Fqc62M4OA==", + "requires": { + "accept-language": "^3.0.18", + "debug": "^4.1.1", + "globalize": "^1.4.2", + "lodash": "^4.17.4", + "md5": "^2.2.1", + "mkdirp": "^0.5.1", + "os-locale": "^3.1.0", + "yamljs": "^0.3.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "loopback-datasource-juggler": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/loopback-datasource-juggler/-/loopback-datasource-juggler-4.24.0.tgz", + "integrity": "sha512-v4UwAdSzsOVnRicBk6BuUjkwxk7TuJHUkbpXQxlVjSZCYx2WpSzapuEuhBIWUtoY5JMsE2S+xArl2qqrnSg3KA==", + "requires": { + "async": "^3.1.0", + "change-case": "^4.1.1", + "debug": "^4.1.0", + "depd": "^2.0.0", + "inflection": "^1.6.0", + "lodash": "^4.17.11", + "loopback-connector": "^4.4.0", + "minimatch": "^3.0.3", + "qs": "^6.5.0", + "shortid": "^2.2.6", + "strong-globalize": "^5.0.2", + "traverse": "^0.6.6", + "uuid": "^7.0.0" + }, + "dependencies": { + "uuid": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz", + "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==" + } } }, "loopback4-authentication": { @@ -3915,11 +4611,358 @@ } }, "loopback4-authorization": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/loopback4-authorization/-/loopback4-authorization-2.3.2.tgz", - "integrity": "sha512-9vMmcqRFWQOsAv1iocsWuZKkM33DUGmelGu6rQy7zsEAUnP5XgiRBJSUVZ/wbZnCbPvz9UughtBEHY7FzpCj6Q==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/loopback4-authorization/-/loopback4-authorization-3.1.1.tgz", + "integrity": "sha512-qcFRNnJsMwpUZwszaRftQ5rJUaU3p/0iO/gx/1ifaLeBfnTJ0t8lMYUGU1xnOU2ya8VTvauHJgx0gwCSnoWlbQ==", + "requires": { + "@loopback/core": "^2.9.2", + "casbin": "^5.1.5", + "casbin-pg-adapter": "^1.4.0", + "lodash": "^4.17.19" + }, + "dependencies": { + "@loopback/context": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.13.0.tgz", + "integrity": "sha512-3R+6Mxm2QOAW8cjhEPaxP3i+uj1y9vkW7Ie91kuFa16yVHgOMrxPkcBmxduH5x4Cd1ZEKmtR/iVTfvRKoBYVxA==", + "requires": { + "@loopback/metadata": "^3.0.3", + "@types/debug": "^4.1.5", + "debug": "^4.2.0", + "hyperid": "^2.0.5", + "p-event": "^4.2.0", + "tslib": "^2.0.3", + "uuid": "^8.3.1" + } + }, + "@loopback/core": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@loopback/core/-/core-2.12.0.tgz", + "integrity": "sha512-kdJZzIF7PA9TjnKoEtfhn2G41stmS8gIsweJAbiG7i+S4REbZLGR4KBHzDtSyfeeDCcxayouGzKwi/BT8gWDgQ==", + "requires": { + "@loopback/context": "^3.13.0", + "debug": "^4.2.0", + "tslib": "^2.0.3" + } + }, + "@loopback/metadata": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-3.0.3.tgz", + "integrity": "sha512-VsY3XfQC42Icne5d4wrRgXAEWTmaC9xhzM8e9CmPlYvONfUG3HGPiUIIPWQYElN4IW+hhW56vId4pNI2vh974A==", + "requires": { + "debug": "^4.2.0", + "lodash": "^4.17.20", + "reflect-metadata": "^0.1.13", + "tslib": "^2.0.3" + }, + "dependencies": { + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + } + } + }, + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" + } + }, + "tslib": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" + }, + "uuid": { + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", + "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==" + } + } + }, + "loopback4-helmet": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/loopback4-helmet/-/loopback4-helmet-1.1.0.tgz", + "integrity": "sha512-uP+ShPrNKVjL5k/VUSnaExMIESQ7/pYBm3dygsNhJegiDbwo69WC5hooIhSOzsOCn59DQpAslRI7UHLfCZXCBA==", "requires": { - "lodash": "^4.17.11" + "@loopback/boot": "^2.3.1", + "@loopback/context": "^3.8.1", + "@loopback/core": "^2.7.0", + "@loopback/rest": "^5.0.1", + "helmet": "^3.23.3" + } + }, + "loopback4-ratelimiter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/loopback4-ratelimiter/-/loopback4-ratelimiter-1.0.0.tgz", + "integrity": "sha512-CaRuwRc1FwcZ4duqbM6YRWW5WqLTf47xcR7Fn1KsrA/k3ZM+LkN1cuTgOJaEpB+huAEoMgwOhmFA1hFGvzhK+g==", + "requires": { + "@loopback/boot": "^1.7.4", + "@loopback/context": "^2.1.1", + "@loopback/core": "^1.12.4", + "@loopback/repository": "^2.3.0", + "@loopback/rest": "^3.3.2", + "express-rate-limit": "^5.1.3", + "loopback-connector-kv-redis": "^3.0.3", + "rate-limit-redis": "^1.7.0" + }, + "dependencies": { + "@loopback/boot": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/@loopback/boot/-/boot-1.7.4.tgz", + "integrity": "sha512-31mgqBCM5aEe/P+fSPh07S2PR0WNVoHl3kIoHMn6VNVXHz8BsCD249m09E3wGFP8QgqDOnuMKdYeJi99cHNzkg==", + "requires": { + "@loopback/context": "^2.1.1", + "@loopback/core": "^1.12.4", + "@loopback/model-api-builder": "^1.1.4", + "@loopback/repository": "^1.19.1", + "@loopback/service-proxy": "^1.3.17", + "@types/debug": "^4.1.5", + "@types/glob": "^7.1.1", + "debug": "^4.1.1", + "glob": "^7.1.6" + }, + "dependencies": { + "@loopback/repository": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/@loopback/repository/-/repository-1.19.1.tgz", + "integrity": "sha512-7LwZEOtjkzz3mu9TVyOyNolW30pWt862d6IzZRQL9JRGpDkTlbIralm18sICyVF6UgBNX+IcK+IpA6CrhktlFg==", + "requires": { + "@loopback/context": "^2.1.1", + "@loopback/core": "^1.12.4", + "@types/debug": "^4.1.5", + "debug": "^4.1.1", + "lodash": "^4.17.15", + "loopback-datasource-juggler": "^4.18.1" + } + } + } + }, + "@loopback/context": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@loopback/context/-/context-2.1.1.tgz", + "integrity": "sha512-shkzVZZLua7MTjBvaBbFz9Q3/8M21kdgX0XiGc5M6RWkUL6+ipuyVcPEQMC+L6KNn7omZxDNdagbfwcTB97wmA==", + "requires": { + "@loopback/metadata": "^1.4.1", + "debug": "^4.1.1", + "p-event": "^4.1.0", + "uuid": "^3.4.0" + } + }, + "@loopback/core": { + "version": "1.12.4", + "resolved": "https://registry.npmjs.org/@loopback/core/-/core-1.12.4.tgz", + "integrity": "sha512-W1OzwhBc1GUcwQVNzhQMf3tpvhEDKkh+2HPLZVOuYxN+b66uZI7poTxKSJ156dgNGAi+luCvkZiGkNQXS1tpRA==", + "requires": { + "@loopback/context": "^2.1.1", + "debug": "^4.1.1", + "p-event": "^4.1.0" + } + }, + "@loopback/metadata": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-1.4.1.tgz", + "integrity": "sha512-3nPHeaoztNrU61oIKnDP2E4aTqDsRPnsDThgTXeE3IPejNnp5WBneaRDXpUz9Ql/KYZ/IZLRUkRCzEE3DPBbRQ==", + "requires": { + "debug": "^4.1.1", + "lodash": "^4.17.15", + "reflect-metadata": "^0.1.13" + } + }, + "@loopback/model-api-builder": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@loopback/model-api-builder/-/model-api-builder-1.1.4.tgz", + "integrity": "sha512-jul5/r8XpihB0qjFP1ie8dn68gxM2GfXewTSfl/cirualGBOuZL8fNno7HpAmQkebNMB3dQLAOFZApz/1PjGcA==" + }, + "@loopback/rest": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/@loopback/rest/-/rest-3.3.2.tgz", + "integrity": "sha512-AopU01+ybk6c8vAdk/ukZQyCnd3xruInYRHtiVKiQqRLBMNAIzRJV58lH8h8ifEqtKMcF9SSXdav/RDl30rgZg==", + "requires": { + "@loopback/context": "^3.6.0", + "@loopback/core": "^2.4.2", + "@loopback/http-server": "^2.1.2", + "@loopback/openapi-v3": "^3.3.0", + "@openapi-contrib/openapi-schema-to-json-schema": "^3.0.0", + "@types/body-parser": "^1.19.0", + "@types/cors": "^2.8.6", + "@types/express": "^4.17.6", + "@types/express-serve-static-core": "^4.17.5", + "@types/http-errors": "^1.6.3", + "@types/on-finished": "^2.3.1", + "@types/serve-static": "1.13.3", + "@types/type-is": "^1.6.3", + "ajv": "^6.12.2", + "ajv-errors": "^1.0.1", + "ajv-keywords": "^3.4.1", + "body-parser": "^1.19.0", + "cors": "^2.8.5", + "debug": "^4.1.1", + "express": "^4.17.1", + "http-errors": "^1.7.3", + "js-yaml": "^3.13.1", + "json-schema-compare": "^0.2.2", + "lodash": "^4.17.15", + "on-finished": "^2.3.0", + "path-to-regexp": "^6.1.0", + "qs": "^6.9.3", + "strong-error-handler": "^3.4.0", + "tslib": "^1.11.1", + "type-is": "^1.6.18", + "validator": "^13.0.0" + }, + "dependencies": { + "@loopback/context": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.13.0.tgz", + "integrity": "sha512-3R+6Mxm2QOAW8cjhEPaxP3i+uj1y9vkW7Ie91kuFa16yVHgOMrxPkcBmxduH5x4Cd1ZEKmtR/iVTfvRKoBYVxA==", + "requires": { + "@loopback/metadata": "^3.0.3", + "@types/debug": "^4.1.5", + "debug": "^4.2.0", + "hyperid": "^2.0.5", + "p-event": "^4.2.0", + "tslib": "^2.0.3", + "uuid": "^8.3.1" + }, + "dependencies": { + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" + } + }, + "tslib": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" + } + } + }, + "@loopback/core": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@loopback/core/-/core-2.12.0.tgz", + "integrity": "sha512-kdJZzIF7PA9TjnKoEtfhn2G41stmS8gIsweJAbiG7i+S4REbZLGR4KBHzDtSyfeeDCcxayouGzKwi/BT8gWDgQ==", + "requires": { + "@loopback/context": "^3.13.0", + "debug": "^4.2.0", + "tslib": "^2.0.3" + }, + "dependencies": { + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" + } + }, + "tslib": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" + } + } + }, + "@loopback/metadata": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-3.0.3.tgz", + "integrity": "sha512-VsY3XfQC42Icne5d4wrRgXAEWTmaC9xhzM8e9CmPlYvONfUG3HGPiUIIPWQYElN4IW+hhW56vId4pNI2vh974A==", + "requires": { + "debug": "^4.2.0", + "lodash": "^4.17.20", + "reflect-metadata": "^0.1.13", + "tslib": "^2.0.3" + }, + "dependencies": { + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + }, + "tslib": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" + } + } + }, + "uuid": { + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", + "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==" + } + } + }, + "@loopback/service-proxy": { + "version": "1.3.17", + "resolved": "https://registry.npmjs.org/@loopback/service-proxy/-/service-proxy-1.3.17.tgz", + "integrity": "sha512-EUQKWssgDaOc81+oQYIk+RSOwpe8xMW5RPaPucJ18HXOU+GCi4mjMBZqYSZJGtGks1FssIfNikkDOQr6ABgTaw==", + "requires": { + "@loopback/context": "^2.1.1", + "@loopback/core": "^1.12.4", + "loopback-datasource-juggler": "^4.18.1" + } + }, + "@types/serve-static": { + "version": "1.13.3", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.3.tgz", + "integrity": "sha512-oprSwp094zOglVrXdlo/4bAHtKTAxX6VT8FOZlBKrmyLbNvE1zxZyJ6yikMVtHIvwP45+ZQGJn+FdXGKTozq0g==", + "requires": { + "@types/express-serve-static-core": "*", + "@types/mime": "*" + } + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + }, + "http-errors": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.0.tgz", + "integrity": "sha512-4I8r0C5JDhT5VkvI47QktDW75rNlGVsUf/8hzjCC/wkWI/jdTRmBb9aI7erSG82r1bjKY3F6k28WnsVxB1C73A==", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + } + }, + "path-to-regexp": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.0.tgz", + "integrity": "sha512-f66KywYG6+43afgE/8j/GoiNyygk/bnoCbps++3ErRKsIYkGGupyv07R2Ok5m9i67Iqc+T2g1eAUGUPzWhYTyg==" + }, + "setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + } } }, "loopback4-soft-delete": { @@ -4129,6 +5172,11 @@ } } }, + "make-plural": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/make-plural/-/make-plural-6.2.2.tgz", + "integrity": "sha512-8iTuFioatnTTmb/YJjywkVIHLjcwkFD9Ms0JpxjEm9Mo8eQYkh1z+55dwv4yc1jQ8ftVBxWQbihvZL1DfzGGWA==" + }, "map-age-cleaner": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", @@ -4137,6 +5185,11 @@ "p-defer": "^1.0.0" } }, + "math-interval-parser": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/math-interval-parser/-/math-interval-parser-2.0.1.tgz", + "integrity": "sha512-VmlAmb0UJwlvMyx8iPhXUDnVW1F9IrGEd9CIOmv+XL8AErCUUuozoDMrgImvnYt2A+53qVX/tPW6YJurMKYsvA==" + }, "md5": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz", @@ -4172,11 +5225,50 @@ "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" }, + "messageformat": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/messageformat/-/messageformat-2.3.0.tgz", + "integrity": "sha512-uTzvsv0lTeQxYI2y1NPa1lItL5VRI8Gb93Y2K2ue5gBPyrbJxfDi/EYWxh2PKv5yO42AJeeqblS9MJSh/IEk4w==", + "requires": { + "make-plural": "^4.3.0", + "messageformat-formatters": "^2.0.1", + "messageformat-parser": "^4.1.2" + }, + "dependencies": { + "make-plural": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/make-plural/-/make-plural-4.3.0.tgz", + "integrity": "sha512-xTYd4JVHpSCW+aqDof6w/MebaMVNTVYBZhbB/vi513xXdiPT92JMVCo0Jq8W2UZnzYRFeVbQiQ+I25l13JuKvA==", + "requires": { + "minimist": "^1.2.0" + } + } + } + }, + "messageformat-formatters": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/messageformat-formatters/-/messageformat-formatters-2.0.1.tgz", + "integrity": "sha512-E/lQRXhtHwGuiQjI7qxkLp8AHbMD5r2217XNe/SREbBlSawe0lOqsFb7rflZJmlQFSULNLIqlcjjsCPlB3m3Mg==" + }, + "messageformat-parser": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/messageformat-parser/-/messageformat-parser-4.1.3.tgz", + "integrity": "sha512-2fU3XDCanRqeOCkn7R5zW5VQHWf+T3hH65SzuqRvjatBK7r4uyFa5mEX+k6F9Bd04LVM5G4/BHBTUJsOdW7uyg==" + }, "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" }, + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + }, "mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", @@ -4331,8 +5423,15 @@ "moment": { "version": "2.27.0", "resolved": "https://registry.npmjs.org/moment/-/moment-2.27.0.tgz", - "integrity": "sha512-al0MUK7cpIcglMv3YF13qSgdAIqxHTO7brRtaz3DlSULbqfazqkc5kEjNrLDOM7fsjshoFIihnU8snrP7zUvhQ==", - "optional": true + "integrity": "sha512-al0MUK7cpIcglMv3YF13qSgdAIqxHTO7brRtaz3DlSULbqfazqkc5kEjNrLDOM7fsjshoFIihnU8snrP7zUvhQ==" + }, + "moment-timezone": { + "version": "0.5.31", + "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.31.tgz", + "integrity": "sha512-+GgHNg8xRhMXfEbv81iDtrVeTcWt0kWmTEY1XQK14dICTXnWJnT0dxdlPspwqF3keKMVPXwayEsk1DI0AA/jdA==", + "requires": { + "moment": ">= 2.9.0" + } }, "ms": { "version": "2.1.2", @@ -4350,6 +5449,11 @@ "safe-buffer": "^5.1.2" } }, + "mustache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.0.1.tgz", + "integrity": "sha512-yL5VE97+OXn4+Er3THSmTdCFCtx5hHWzrolvH+JObZnUYwuaG7XV+Ch4fR2cIrcYI0tFHxS7iyFYl14bW8y2sA==" + }, "mute-stream": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", @@ -4422,8 +5526,7 @@ "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" }, "nise": { "version": "4.0.4", @@ -4468,6 +5571,11 @@ } } }, + "nocache": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/nocache/-/nocache-2.1.0.tgz", + "integrity": "sha512-0L9FvHG3nfnnmaEQPjT9xhfN4ISk0A8/2j4M37Np4mcDesJjHgEUfgPhdCyZuFI954tjokaIj/A3NdpFNdEh4Q==" + }, "node-environment-flags": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", @@ -4494,6 +5602,95 @@ "http2-client": "^1.2.5" } }, + "node-pg-migrate": { + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/node-pg-migrate/-/node-pg-migrate-5.9.0.tgz", + "integrity": "sha512-FXXPzP45B/Vj7C23j4QFKvUfe+k2fCfGcaVG6LNdJ8powA+f5V9nLuihuPZRlhUb0xIWWxqc2qUKIPPGuGJS5g==", + "requires": { + "@types/pg": "^7.4.0", + "decamelize": "^4.0.0", + "lodash": "~4.17.0", + "mkdirp": "~1.0.0", + "yargs": "~16.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==" + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "y18n": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz", + "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==" + }, + "yargs": { + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.1.0.tgz", + "integrity": "sha512-upWFJOmDdHN0syLuESuvXDmrRcWd1QafJolHskzaw79uZa7/x53gxQKiR07W59GWY1tFhhU/Th9DrtSfpS782g==", + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.2", + "yargs-parser": "^20.2.2" + } + }, + "yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==" + } + } + }, "node-preload": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", @@ -4916,6 +6113,14 @@ "wrappy": "1" } }, + "one-time": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz", + "integrity": "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==", + "requires": { + "fn.name": "1.x.x" + } + }, "onetime": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", @@ -5033,6 +6238,11 @@ "release-zalgo": "^1.0.0" } }, + "packet-reader": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/packet-reader/-/packet-reader-1.0.0.tgz", + "integrity": "sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ==" + }, "param-case": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.3.tgz", @@ -5229,11 +6439,64 @@ "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, + "pg": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.5.0.tgz", + "integrity": "sha512-h+KHEwce67pAQilZhMCpCx1RC7rR1US7mdjwvKzHRaRxKQxbbFtv5UlwjzqILQ1dwhK+RVGqOVcahE/2KOcaeA==", + "requires": { + "buffer-writer": "2.0.0", + "packet-reader": "1.0.0", + "pg-connection-string": "^2.4.0", + "pg-pool": "^3.2.2", + "pg-protocol": "^1.4.0", + "pg-types": "^2.1.0", + "pgpass": "1.x" + } + }, + "pg-connection-string": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.4.0.tgz", + "integrity": "sha512-3iBXuv7XKvxeMrIgym7njT+HlZkwZqqGX4Bu9cci8xHZNT+Um1gWKqCsAzcC0d95rcKMU5WBg6YRUcHyV0HZKQ==" + }, + "pg-int8": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", + "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==" + }, + "pg-pool": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.2.2.tgz", + "integrity": "sha512-ORJoFxAlmmros8igi608iVEbQNNZlp89diFVx6yV5v+ehmpMY9sK6QgpmgoXbmkNaBAx8cOOZh9g80kJv1ooyA==" + }, + "pg-protocol": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.4.0.tgz", + "integrity": "sha512-El+aXWcwG/8wuFICMQjM5ZSAm6OWiJicFdNYo+VY3QP+8vI4SvLIWVe51PppTzMhikUJR+PsyIFKqfdXPz/yxA==" + }, + "pg-types": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", + "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", + "requires": { + "pg-int8": "1.0.1", + "postgres-array": "~2.0.0", + "postgres-bytea": "~1.0.0", + "postgres-date": "~1.0.4", + "postgres-interval": "^1.1.0" + } + }, + "pgpass": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.4.tgz", + "integrity": "sha512-YmuA56alyBq7M59vxVBfPJrGSozru8QAdoNlWuW3cz8l+UX3cWge0vTvjKhsSHSJpo3Bom8/Mm6hf0TR5GY0+w==", + "requires": { + "split2": "^3.1.1" + } + }, "picomatch": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", - "dev": true + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==" }, "pkg-dir": { "version": "4.2.0", @@ -5280,6 +6543,29 @@ } } }, + "postgres-array": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", + "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==" + }, + "postgres-bytea": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz", + "integrity": "sha1-AntTPAqokOJtFy1Hz5zOzFIazTU=" + }, + "postgres-date": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", + "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==" + }, + "postgres-interval": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", + "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", + "requires": { + "xtend": "^4.0.0" + } + }, "prelude-ls": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", @@ -5361,6 +6647,15 @@ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" }, + "rate-limit-redis": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/rate-limit-redis/-/rate-limit-redis-1.7.0.tgz", + "integrity": "sha512-GwqpbMt0riTvra+NiFfX8BKuTdcX7xt0KpU0IahBopjRMzno0niqEKKNaQeNewOzkIz0fOO/R2CSWwfIZdf6oA==", + "requires": { + "defaults": "^1.0.3", + "redis": "^2.8.0" + } + }, "raw-body": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", @@ -5402,6 +6697,46 @@ "picomatch": "^2.0.4" } }, + "redis": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/redis/-/redis-2.8.0.tgz", + "integrity": "sha512-M1OkonEQwtRmZv4tEWF2VgpG0JWJ8Fv1PhlgT5+B+uNq2cA3Rt1Yt/ryoR+vQNOQcIEgdCdfH0jr3bDpihAw1A==", + "requires": { + "double-ended-queue": "^2.1.0-0", + "redis-commands": "^1.2.0", + "redis-parser": "^2.6.0" + }, + "dependencies": { + "redis-parser": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-2.6.0.tgz", + "integrity": "sha1-Uu0J2srBCPGmMcB+m2mUHnoZUEs=" + } + } + }, + "redis-commands": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.6.0.tgz", + "integrity": "sha512-2jnZ0IkjZxvguITjFTrGiLyzQZcTvaw8DAaCXxZq/dsHXz7KfMQ3OUJy7Tz9vnRtZRVz6VRCPDvruvU8Ts44wQ==" + }, + "redis-errors": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz", + "integrity": "sha1-62LSrbFeTq9GEMBK/hUpOEJQq60=" + }, + "redis-parser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-3.0.0.tgz", + "integrity": "sha1-tm2CjNyv5rS4pCin3vTGvKwxyLQ=", + "requires": { + "redis-errors": "^1.0.0" + } + }, + "referrer-policy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/referrer-policy/-/referrer-policy-1.2.0.tgz", + "integrity": "sha512-LgQJIuS6nAy1Jd88DCQRemyE3mS+ispwlqMk3b0yjZ257fI1v9c+/p6SD5gP5FGyXUIgrNOAfmyioHwZtYv2VA==" + }, "reflect-metadata": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", @@ -5747,6 +7082,14 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" }, + "simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", + "requires": { + "is-arrayish": "^0.3.1" + } + }, "sinon": { "version": "9.0.3", "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.0.3.tgz", @@ -5854,6 +7197,26 @@ "which": "^2.0.1" } }, + "split2": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", + "integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==", + "requires": { + "readable-stream": "^3.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -5880,6 +7243,16 @@ "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==" }, + "stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" + }, + "standard-as-callback": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/standard-as-callback/-/standard-as-callback-2.0.1.tgz", + "integrity": "sha512-NQOxSeB8gOI5WjSaxjBgog2QFw55FV8TkS6Y07BiB3VJ8xNTvUYm0wl0s8ObgQ5NhdpnNfigMIKjgPESzgr4tg==" + }, "statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", @@ -5967,6 +7340,11 @@ "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", "dev": true }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" + }, "strip-final-newline": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", @@ -6137,6 +7515,11 @@ "minimatch": "^3.0.4" } }, + "text-hex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz", + "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==" + }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -6168,7 +7551,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, "requires": { "is-number": "^7.0.0" } @@ -6197,6 +7579,11 @@ "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=" }, + "triple-beam": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz", + "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==" + }, "tslib": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", @@ -6472,6 +7859,43 @@ } } }, + "winston": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.3.3.tgz", + "integrity": "sha512-oEXTISQnC8VlSAKf1KYSSd7J6IWuRPQqDdo8eoRNaYKLvwSb5+79Z3Yi1lrl6KDpU6/VWaxpakDAtb1oQ4n9aw==", + "requires": { + "@dabh/diagnostics": "^2.0.2", + "async": "^3.1.0", + "is-stream": "^2.0.0", + "logform": "^2.2.0", + "one-time": "^1.0.0", + "readable-stream": "^3.4.0", + "stack-trace": "0.0.x", + "triple-beam": "^1.3.0", + "winston-transport": "^4.4.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "winston-transport": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.4.0.tgz", + "integrity": "sha512-Lc7/p3GtqtqPBYYtS6KCN3c77/2QCev51DvcJKbkFPQNoj1sinkGwLGFDxkXY9J6p9+EPnYs+D90uwbnaiURTw==", + "requires": { + "readable-stream": "^2.3.7", + "triple-beam": "^1.2.0" + } + }, "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", @@ -6555,11 +7979,21 @@ "typedarray-to-buffer": "^3.1.5" } }, + "x-xss-protection": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/x-xss-protection/-/x-xss-protection-1.3.0.tgz", + "integrity": "sha512-kpyBI9TlVipZO4diReZMAHWtS0MMa/7Kgx8hwG/EuZLiA6sg4Ah/4TRdASHhRRN3boobzcYgFRUFSgHRge6Qhg==" + }, "xmlcreate": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.3.tgz", "integrity": "sha512-HgS+X6zAztGa9zIK3Y3LXuJes33Lz9x+YyTxgrkIdabu2vqcGOWwdfCpf1hWLRrd553wd4QCDf6BBO6FfdsRiQ==" }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + }, "y18n": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", diff --git a/services/in-mail-service/package.json b/services/in-mail-service/package.json index 30005a4ec4..e234bf270d 100644 --- a/services/in-mail-service/package.json +++ b/services/in-mail-service/package.json @@ -48,13 +48,14 @@ "@loopback/boot": "^2.3.2", "@loopback/context": "^3.9.4", "@loopback/core": "^2.7.0", + "@loopback/metadata": "^3.0.3", "@loopback/openapi-v3": "^3.0.0", "@loopback/repository": "^2.5.1", "@loopback/repository-tests": "^0.12.13", "@loopback/rest": "^5.0.1", "@sourceloop/core": "^1.0.0-alpha.14", "loopback4-authentication": "^3.0.1", - "loopback4-authorization": "^2.3.2", + "loopback4-authorization": "3.1.1", "loopback4-soft-delete": "^3.0.0", "tslib": "^2.0.1" }, diff --git a/services/in-mail-service/src/controllers/collector.controller.ts b/services/in-mail-service/src/controllers/collector.controller.ts index 31d7aed1c2..3b1c928581 100644 --- a/services/in-mail-service/src/controllers/collector.controller.ts +++ b/services/in-mail-service/src/controllers/collector.controller.ts @@ -49,7 +49,7 @@ export class CollectorController { } @authenticate(STRATEGY.BEARER) - @authorize([PermissionsEnums.GetThread]) + @authorize({permissions: [PermissionsEnums.GetThread]}) @get('threads/{threadId}', { summary: 'GET Thread Message API. Collect complete single message thread based on thread identity.', @@ -148,7 +148,7 @@ export class CollectorController { } @authenticate(STRATEGY.BEARER) - @authorize([PermissionsEnums.GetInMail]) + @authorize({permissions: [PermissionsEnums.GetInMail]}) @get('mails/{messageId}', { summary: 'GET Message API. Collect a single message based on message identity.', @@ -235,7 +235,7 @@ export class CollectorController { } @authenticate(STRATEGY.BEARER) - @authorize([PermissionsEnums.GetThread]) + @authorize({permissions: [PermissionsEnums.GetThread]}) @get('threads', { summary: 'Thread List API. Collect a list of all threads.', responses: { @@ -299,7 +299,7 @@ export class CollectorController { } @authenticate(STRATEGY.BEARER) - @authorize([PermissionsEnums.GetInMails]) + @authorize({permissions: [PermissionsEnums.GetInMails]}) @get('mails', { summary: 'Collect a list of all messages.', responses: { diff --git a/services/in-mail-service/src/controllers/originator.controller.ts b/services/in-mail-service/src/controllers/originator.controller.ts index 0b68ca3f64..0ccbd88eab 100644 --- a/services/in-mail-service/src/controllers/originator.controller.ts +++ b/services/in-mail-service/src/controllers/originator.controller.ts @@ -115,7 +115,7 @@ export class OriginatorController { return String(type === 'user' ? this.user.id : this.user.email); } @authenticate(STRATEGY.BEARER) - @authorize([PermissionsEnums.ComposeMail]) + @authorize({permissions: [PermissionsEnums.ComposeMail]}) @post('mails', { summary: 'ComposeAPI. For drafting, reply on and create new message', responses: { @@ -246,7 +246,7 @@ export class OriginatorController { } } @authenticate(STRATEGY.BEARER) - @authorize([PermissionsEnums.UpdateMail]) + @authorize({permissions: [PermissionsEnums.UpdateMail]}) @put('mails/{messageId}', { summary: 'Update API. Update draft messages.', responses: { @@ -386,7 +386,7 @@ export class OriginatorController { } @authenticate(STRATEGY.BEARER) - @authorize([PermissionsEnums.AddAttachments]) + @authorize({permissions: [PermissionsEnums.AddAttachments]}) @post('mails/{messageId}/attachments', { summary: 'API provides an interface for adding attachment before message is sent.', @@ -471,7 +471,7 @@ export class OriginatorController { } @authenticate(STRATEGY.BEARER) - @authorize([PermissionsEnums.DeleteAttachment]) + @authorize({permissions: [PermissionsEnums.DeleteAttachment]}) @del('mails/{messageId}/attachments/{attachmentId}', { summary: 'API provides an interface for removing attachment before message is sent', @@ -513,7 +513,7 @@ export class OriginatorController { return {item: attachmentId}; } @authenticate(STRATEGY.BEARER) - @authorize([PermissionsEnums.TrashMail]) + @authorize({permissions: [PermissionsEnums.TrashMail]}) @del('mails/bulk/{storage}/{action}', { summary: 'API for moving mails to trash and then delete', responses: { @@ -592,7 +592,7 @@ export class OriginatorController { return {items: groups}; } @authenticate(STRATEGY.BEARER) - @authorize([PermissionsEnums.RestoreMail]) + @authorize({permissions: [PermissionsEnums.RestoreMail]}) @patch('mails/bulk/restore', { summary: 'API provides an interface for restore message from trash.', responses: { @@ -655,7 +655,7 @@ export class OriginatorController { }; } @authenticate(STRATEGY.BEARER) - @authorize([PermissionsEnums.ComposeMail]) + @authorize({permissions: [PermissionsEnums.ComposeMail]}) @patch('mails/{messageId}/send', { summary: 'API for sending a drafted message.', responses: { @@ -723,7 +723,7 @@ export class OriginatorController { } @authenticate(STRATEGY.BEARER) - @authorize([PermissionsEnums.UpdateMail]) + @authorize({permissions: [PermissionsEnums.UpdateMail]}) @patch('mails/marking/{markType}', { summary: 'API provides interface to mark read, unread and important', responses: { diff --git a/services/in-mail-service/src/controllers/reply-and-forward.controller.ts b/services/in-mail-service/src/controllers/reply-and-forward.controller.ts index ba6851e856..eebaaa499d 100644 --- a/services/in-mail-service/src/controllers/reply-and-forward.controller.ts +++ b/services/in-mail-service/src/controllers/reply-and-forward.controller.ts @@ -103,7 +103,7 @@ export class ReplyAndForwardController { return String(type === 'user' ? this.user.id : this.user.email); } @authenticate(STRATEGY.BEARER) - @authorize([PermissionsEnums.ReplyMail]) + @authorize({permissions: [PermissionsEnums.ReplyMail]}) @patch('threads/{threadId}/mails/{messageId}/replies', { summary: 'API provides interface to reply to a single message', responses: { @@ -262,7 +262,7 @@ export class ReplyAndForwardController { } } @authenticate(STRATEGY.BEARER) - @authorize([PermissionsEnums.ComposeMail]) + @authorize({permissions: [PermissionsEnums.ComposeMail]}) @patch('threads/{threadId}/forward', { summary: 'API provides interface to forward single message.', responses: { diff --git a/services/notification-service/package-lock.json b/services/notification-service/package-lock.json index 664006c5f6..f522f0e7ee 100644 --- a/services/notification-service/package-lock.json +++ b/services/notification-service/package-lock.json @@ -435,33 +435,52 @@ } }, "@loopback/context": { - "version": "3.8.2", - "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.8.2.tgz", - "integrity": "sha512-zcQZ9c6vckgVmco4NWJUj+3IGO9B6NiMTbAWI772Ed7j6jwn+9N4MEWBQXzuVbocNayyp+YcOhJNxILylxd4iQ==", + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.13.0.tgz", + "integrity": "sha512-3R+6Mxm2QOAW8cjhEPaxP3i+uj1y9vkW7Ie91kuFa16yVHgOMrxPkcBmxduH5x4Cd1ZEKmtR/iVTfvRKoBYVxA==", "requires": { - "@loopback/metadata": "^2.1.6", + "@loopback/metadata": "^3.0.3", "@types/debug": "^4.1.5", - "debug": "^4.1.1", - "p-event": "^4.1.0", - "tslib": "^2.0.0", - "uuid": "^8.1.0" + "debug": "^4.2.0", + "hyperid": "^2.0.5", + "p-event": "^4.2.0", + "tslib": "^2.0.3", + "uuid": "^8.3.1" }, "dependencies": { "@loopback/metadata": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-2.1.6.tgz", - "integrity": "sha512-wbB8ne0zy4+2gkooKfIk3LskakV1uJ+yjSCfOo26ZEGzgyWH0hhjgBRxUcEX37sv3R2Cde9OtHpwFhz5GBJlOw==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-3.0.3.tgz", + "integrity": "sha512-VsY3XfQC42Icne5d4wrRgXAEWTmaC9xhzM8e9CmPlYvONfUG3HGPiUIIPWQYElN4IW+hhW56vId4pNI2vh974A==", "requires": { - "debug": "^4.1.1", - "lodash": "^4.17.15", + "debug": "^4.2.0", + "lodash": "^4.17.20", "reflect-metadata": "^0.1.13", - "tslib": "^2.0.0" + "tslib": "^2.0.3" + } + }, + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" } }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + }, "tslib": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.0.tgz", - "integrity": "sha512-lTqkx847PI7xEDYJntxZH89L2/aXInsyF2luSafe/+0fHOMjlBNXdH6th7f70qxLDhul7KZK0zC8V5ZIyHl0/g==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" + }, + "uuid": { + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", + "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==" } } }, @@ -835,12 +854,12 @@ "dev": true }, "@sourceloop/core": { - "version": "1.0.0-alpha.8", - "resolved": "https://registry.npmjs.org/@sourceloop/core/-/core-1.0.0-alpha.8.tgz", - "integrity": "sha512-P6a4Gx6dwZqEzRoPvo6xM4kona8sf9BfN2JUL8CiJz6K9yuTbbuU6n/IXzYPbzez5Wz+zl3tzsGf8f4wIgc3KQ==", + "version": "1.0.0-alpha.14", + "resolved": "https://registry.npmjs.org/@sourceloop/core/-/core-1.0.0-alpha.14.tgz", + "integrity": "sha512-sOckHOfjLjpv8qJ/7mZx7+5LORsSUy8oPU1QFCMi/SiKnYG7jUQknN4HUk98qODIxaShtPHo3DLyCo7/Z0rQLA==", "requires": { "@loopback/boot": "^2.3.1", - "@loopback/context": "^3.8.1", + "@loopback/context": "^3.9.4", "@loopback/core": "^2.7.0", "@loopback/repository": "^2.5.1", "@loopback/rest": "^5.0.1", @@ -861,62 +880,30 @@ "winston": "^3.2.1" }, "dependencies": { - "@loopback/metadata": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-2.2.4.tgz", - "integrity": "sha512-sU4xPhxZSsJeWdw3oO2dWjqq6BR1Sb+Rx6W9xhHEDPVGaor5ae8unIcIpK6tnRdt6yjK22s295ao18lE2S3BJA==", - "requires": { - "debug": "^4.1.1", - "lodash": "^4.17.19", - "reflect-metadata": "^0.1.13", - "tslib": "^2.0.0" - }, - "dependencies": { - "tslib": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", - "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" - } - } - }, "@loopback/service-proxy": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/@loopback/service-proxy/-/service-proxy-2.3.6.tgz", - "integrity": "sha512-Xr7tFU4X0jf68nyzQP9BJviU9+gHUA/d9fBBu/phqVHoJjklBUJqdHVmpv/ydRyTzPi8mfitmjCVJGeB47UopQ==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/@loopback/service-proxy/-/service-proxy-2.3.8.tgz", + "integrity": "sha512-WRErlDsmDSC+4wb+2J0u8hdNKoYxX6jXNzhSvZ2DPp7oubZPC8LeKcjMr1nNWkdT9vEbJYmoQP4kUC6LCDFfnQ==", "requires": { - "@loopback/core": "^2.9.3", + "@loopback/core": "^2.9.5", "loopback-datasource-juggler": "^4.24.0", - "tslib": "^2.0.0" + "tslib": "^2.0.1" }, "dependencies": { - "@loopback/context": { - "version": "3.9.4", - "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.9.4.tgz", - "integrity": "sha512-Ch7X5gea3SRDwrJetJ5fthbNFBTcGIwxTMR11dvxrZClQUAOGX3M1LIjXhJq9HFXxVlxavL9Vp6BYL2Gg0QLMQ==", - "requires": { - "@loopback/metadata": "^2.2.4", - "@types/debug": "^4.1.5", - "debug": "^4.1.1", - "hyperid": "^2.0.5", - "p-event": "^4.2.0", - "tslib": "^2.0.0", - "uuid": "^8.3.0" - } - }, "@loopback/core": { - "version": "2.9.3", - "resolved": "https://registry.npmjs.org/@loopback/core/-/core-2.9.3.tgz", - "integrity": "sha512-Wjun6YprRp6Ay0OMP/+IEx9IMnlk1r+XPkkmfrcbv3mbkEh+JSdOmjv6plWbzpllnZwkYII1C41C7bdgDm7BCw==", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@loopback/core/-/core-2.12.0.tgz", + "integrity": "sha512-kdJZzIF7PA9TjnKoEtfhn2G41stmS8gIsweJAbiG7i+S4REbZLGR4KBHzDtSyfeeDCcxayouGzKwi/BT8gWDgQ==", "requires": { - "@loopback/context": "^3.9.4", - "debug": "^4.1.1", - "tslib": "^2.0.0" + "@loopback/context": "^3.13.0", + "debug": "^4.2.0", + "tslib": "^2.0.3" } }, "loopback-datasource-juggler": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/loopback-datasource-juggler/-/loopback-datasource-juggler-4.24.0.tgz", - "integrity": "sha512-v4UwAdSzsOVnRicBk6BuUjkwxk7TuJHUkbpXQxlVjSZCYx2WpSzapuEuhBIWUtoY5JMsE2S+xArl2qqrnSg3KA==", + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/loopback-datasource-juggler/-/loopback-datasource-juggler-4.26.0.tgz", + "integrity": "sha512-/R40jUGDrnRBgTh121L4Y7sHDF0KxbgSAN4gLJKp8xGNQ6KpkSQyqZkmap98eN7B75RES78DS3MGghsYMvAJ3Q==", "requires": { "async": "^3.1.0", "change-case": "^4.1.1", @@ -924,29 +911,56 @@ "depd": "^2.0.0", "inflection": "^1.6.0", "lodash": "^4.17.11", - "loopback-connector": "^4.4.0", + "loopback-connector": "^5.0.0", "minimatch": "^3.0.3", "qs": "^6.5.0", "shortid": "^2.2.6", - "strong-globalize": "^5.0.2", + "strong-globalize": "^6.0.5", "traverse": "^0.6.6", - "uuid": "^7.0.0" - }, - "dependencies": { - "uuid": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz", - "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==" - } + "uuid": "^8.3.1" } }, "tslib": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", - "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" } } }, + "cldrjs": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/cldrjs/-/cldrjs-0.5.5.tgz", + "integrity": "sha512-KDwzwbmLIPfCgd8JERVDpQKrUUM1U4KpFJJg2IROv89rF172lLufoJnqJ/Wea6fXL5bO6WjuLMzY8V52UWPvkA==" + }, + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" + } + }, + "globalize": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/globalize/-/globalize-1.6.0.tgz", + "integrity": "sha512-MTuAU3Tnbtga8PvxbpSPdQNIs6K5UdATWIuarWJK2Z3e1DghXpxb/GmShSVagzHqCOYgZr7N/Hi7D1mrHG30jQ==", + "requires": { + "cldrjs": "^0.5.4" + } + }, + "loopback-connector": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/loopback-connector/-/loopback-connector-5.0.1.tgz", + "integrity": "sha512-aSPT6x5WZdoW9ylyNE4CxGqFbIqC9cSEZJwWkCincso27PXlZPj52POoF6pgxug9mkH7MrbXuP3SSDLkLq5oQQ==", + "requires": { + "async": "^3.2.0", + "bluebird": "^3.7.2", + "debug": "^4.1.1", + "msgpack5": "^4.2.0", + "strong-globalize": "^6.0.4", + "uuid": "^8.3.0" + } + }, "loopback4-authentication": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/loopback4-authentication/-/loopback4-authentication-4.0.1.tgz", @@ -963,41 +977,72 @@ "passport-oauth2-client-password": "^0.1.2" }, "dependencies": { - "@loopback/context": { - "version": "3.9.4", - "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.9.4.tgz", - "integrity": "sha512-Ch7X5gea3SRDwrJetJ5fthbNFBTcGIwxTMR11dvxrZClQUAOGX3M1LIjXhJq9HFXxVlxavL9Vp6BYL2Gg0QLMQ==", - "requires": { - "@loopback/metadata": "^2.2.4", - "@types/debug": "^4.1.5", - "debug": "^4.1.1", - "hyperid": "^2.0.5", - "p-event": "^4.2.0", - "tslib": "^2.0.0", - "uuid": "^8.3.0" - } - }, "@loopback/core": { - "version": "2.9.3", - "resolved": "https://registry.npmjs.org/@loopback/core/-/core-2.9.3.tgz", - "integrity": "sha512-Wjun6YprRp6Ay0OMP/+IEx9IMnlk1r+XPkkmfrcbv3mbkEh+JSdOmjv6plWbzpllnZwkYII1C41C7bdgDm7BCw==", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@loopback/core/-/core-2.12.0.tgz", + "integrity": "sha512-kdJZzIF7PA9TjnKoEtfhn2G41stmS8gIsweJAbiG7i+S4REbZLGR4KBHzDtSyfeeDCcxayouGzKwi/BT8gWDgQ==", "requires": { - "@loopback/context": "^3.9.4", - "debug": "^4.1.1", - "tslib": "^2.0.0" + "@loopback/context": "^3.13.0", + "debug": "^4.2.0", + "tslib": "^2.0.3" } }, "tslib": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", - "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" + } + } + }, + "loopback4-authorization": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/loopback4-authorization/-/loopback4-authorization-2.3.2.tgz", + "integrity": "sha512-9vMmcqRFWQOsAv1iocsWuZKkM33DUGmelGu6rQy7zsEAUnP5XgiRBJSUVZ/wbZnCbPvz9UughtBEHY7FzpCj6Q==", + "requires": { + "lodash": "^4.17.11" + } + }, + "md5": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz", + "integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==", + "requires": { + "charenc": "0.0.2", + "crypt": "0.0.2", + "is-buffer": "~1.1.6" + } + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + }, + "strong-globalize": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/strong-globalize/-/strong-globalize-6.0.5.tgz", + "integrity": "sha512-7nfUli41TieV9/TSc0N62ve5Q4nfrpy/T0nNNy6TyD3vst79QWmeylCyd3q1gDxh8dqGEtabLNCdPQP1Iuvecw==", + "requires": { + "accept-language": "^3.0.18", + "debug": "^4.2.0", + "globalize": "^1.6.0", + "lodash": "^4.17.20", + "md5": "^2.3.0", + "mkdirp": "^1.0.4", + "os-locale": "^5.0.0", + "yamljs": "^0.3.0" + }, + "dependencies": { + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" } } }, "uuid": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.0.tgz", - "integrity": "sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ==" + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", + "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==" } } }, @@ -1146,6 +1191,20 @@ "@types/node": "*" } }, + "@types/pg": { + "version": "7.14.6", + "resolved": "https://registry.npmjs.org/@types/pg/-/pg-7.14.6.tgz", + "integrity": "sha512-mf6kYvuYS2CObDxtsw5imE4vOvq+XHJtiJNFXir/fn9nxZtIFQ3/ECpokm8fNkxKBh7nQhyegHwNg1NIW+yYJA==", + "requires": { + "@types/node": "*", + "@types/pg-types": "*" + } + }, + "@types/pg-types": { + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@types/pg-types/-/pg-types-1.11.5.tgz", + "integrity": "sha512-L8ogeT6vDzT1vxlW3KITTCt+BVXXVkLXfZ/XNm6UqbcJgxf+KPO7yjWx7dQQE8RW07KopL10x2gNMs41+IkMGQ==" + }, "@types/qs": { "version": "6.9.3", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.3.tgz", @@ -1370,8 +1429,7 @@ "ansi-regex": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" }, "ansi-styles": { "version": "3.2.1", @@ -1483,6 +1541,11 @@ "array-filter": "^1.0.0" } }, + "await-lock": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/await-lock/-/await-lock-2.1.0.tgz", + "integrity": "sha512-t7Zm5YGgEEc/3eYAicF32m/TNvL+XOeYZy9CvBUeJY/szM7frLolFylhrlZNWV/ohWhcUXygrBGjYmoQdxF4CQ==" + }, "aws-sdk": { "version": "2.694.0", "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.694.0.tgz", @@ -1657,7 +1720,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, "requires": { "fill-range": "^7.0.1" } @@ -1694,6 +1756,11 @@ "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, + "buffer-writer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/buffer-writer/-/buffer-writer-2.0.0.tgz", + "integrity": "sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw==" + }, "bunyan": { "version": "1.8.12", "resolved": "https://registry.npmjs.org/bunyan/-/bunyan-1.8.12.tgz", @@ -1781,6 +1848,27 @@ "upper-case-first": "^2.0.1" } }, + "casbin": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/casbin/-/casbin-5.2.0.tgz", + "integrity": "sha512-9qqcTAx0ysgF6xz1Mq83B7yD9inG4iEZ85tMZBmkXCIsECD9yAE8XhaONn7GhlnTave10k3ktGJ+9qNItXe30A==", + "requires": { + "await-lock": "^2.0.1", + "expression-eval": "^2.0.0", + "ip": "^1.1.5", + "micromatch": "^4.0.2" + } + }, + "casbin-pg-adapter": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/casbin-pg-adapter/-/casbin-pg-adapter-1.4.0.tgz", + "integrity": "sha512-9T0i+t0XwdnsBFl+20ojAED9+05SN4haJDLOJTUh9liHO+yBi6SXwSboD0MLzserFkxCs8VJJ+BNJlavExlU+A==", + "requires": { + "casbin": "^5.0.4", + "node-pg-migrate": "^5.1.0", + "pg": "^8.2.1" + } + }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -2015,9 +2103,9 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, "color-string": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.3.tgz", - "integrity": "sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==", + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.4.tgz", + "integrity": "sha512-57yF5yt8Xa3czSEW1jfQDE79Idk0+AkN/4KWad6tbdxUmAs3MvjxlWSWD4deYytcRfoZ9nhKyFl1kj5tBvidbw==", "requires": { "color-name": "^1.0.0", "simple-swizzle": "^0.2.2" @@ -2377,8 +2465,7 @@ "emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "enabled": { "version": "2.0.0", @@ -2466,6 +2553,11 @@ "es6-promise": "^4.0.3" } }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -2776,6 +2868,14 @@ "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-5.1.3.tgz", "integrity": "sha512-TINcxve5510pXj4n9/1AMupkj3iWxl3JuZaWhCdYDlZeoCPqweGZrxbrlqTCFb1CT5wli7s8e2SH/Qz2c9GorA==" }, + "expression-eval": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/expression-eval/-/expression-eval-2.1.0.tgz", + "integrity": "sha512-FUJO/Akvl/JOWkvlqZaqbkhsEWlCJWDeZG4tzX96UH68D9FeRgYgtb55C2qtqbORC0Q6x5419EDjWu4IT9kQfg==", + "requires": { + "jsep": "^0.3.0" + } + }, "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -2854,7 +2954,6 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, "requires": { "to-regex-range": "^5.0.1" } @@ -3085,8 +3184,7 @@ "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" }, "get-package-type": { "version": "0.1.0", @@ -3612,19 +3710,27 @@ "integrity": "sha512-CYdFeFexxhv/Bcny+Q0BfOV+ltRlJcd4BBZBYFX/O0u4npJrgZtIcjokegtiSMAvlMTJ+Koq0GBCc//3bueQxw==" }, "ioredis": { - "version": "4.17.3", - "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-4.17.3.tgz", - "integrity": "sha512-iRvq4BOYzNFkDnSyhx7cmJNOi1x/HWYe+A4VXHBu4qpwJaGT1Mp+D2bVGJntH9K/Z/GeOM/Nprb8gB3bmitz1Q==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-4.19.2.tgz", + "integrity": "sha512-SZSIwMrbd96b7rJvJwyTWSP6XQ0m1kAIIqBnwglJKrIJ6na7TeY4F2EV2vDY0xm/fLrUY8cEg81dR7kVFt2sKA==", "requires": { "cluster-key-slot": "^1.1.0", "debug": "^4.1.1", "denque": "^1.1.0", "lodash.defaults": "^4.2.0", "lodash.flatten": "^4.4.0", - "redis-commands": "1.5.0", + "p-map": "^2.1.0", + "redis-commands": "1.6.0", "redis-errors": "^1.2.0", "redis-parser": "^3.0.0", "standard-as-callback": "^2.0.1" + }, + "dependencies": { + "p-map": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==" + } } }, "ip": { @@ -3690,8 +3796,7 @@ "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" }, "is-glob": { "version": "4.0.1", @@ -3710,8 +3815,7 @@ "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" }, "is-number-object": { "version": "1.0.4", @@ -3944,6 +4048,11 @@ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, + "jsep": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/jsep/-/jsep-0.3.5.tgz", + "integrity": "sha512-AoRLBDc6JNnKjNcmonituEABS5bcfqDhQAWWXNTFrqu6nVXBpBAGfcoTGZMFlIrh9FjmE1CQyX9CTNwZrXMMDA==" + }, "jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -4438,11 +4547,76 @@ } }, "loopback4-authorization": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/loopback4-authorization/-/loopback4-authorization-2.3.2.tgz", - "integrity": "sha512-9vMmcqRFWQOsAv1iocsWuZKkM33DUGmelGu6rQy7zsEAUnP5XgiRBJSUVZ/wbZnCbPvz9UughtBEHY7FzpCj6Q==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/loopback4-authorization/-/loopback4-authorization-3.1.1.tgz", + "integrity": "sha512-qcFRNnJsMwpUZwszaRftQ5rJUaU3p/0iO/gx/1ifaLeBfnTJ0t8lMYUGU1xnOU2ya8VTvauHJgx0gwCSnoWlbQ==", "requires": { - "lodash": "^4.17.11" + "@loopback/core": "^2.9.2", + "casbin": "^5.1.5", + "casbin-pg-adapter": "^1.4.0", + "lodash": "^4.17.19" + }, + "dependencies": { + "@loopback/context": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.13.0.tgz", + "integrity": "sha512-3R+6Mxm2QOAW8cjhEPaxP3i+uj1y9vkW7Ie91kuFa16yVHgOMrxPkcBmxduH5x4Cd1ZEKmtR/iVTfvRKoBYVxA==", + "requires": { + "@loopback/metadata": "^3.0.3", + "@types/debug": "^4.1.5", + "debug": "^4.2.0", + "hyperid": "^2.0.5", + "p-event": "^4.2.0", + "tslib": "^2.0.3", + "uuid": "^8.3.1" + } + }, + "@loopback/core": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@loopback/core/-/core-2.12.0.tgz", + "integrity": "sha512-kdJZzIF7PA9TjnKoEtfhn2G41stmS8gIsweJAbiG7i+S4REbZLGR4KBHzDtSyfeeDCcxayouGzKwi/BT8gWDgQ==", + "requires": { + "@loopback/context": "^3.13.0", + "debug": "^4.2.0", + "tslib": "^2.0.3" + } + }, + "@loopback/metadata": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-3.0.3.tgz", + "integrity": "sha512-VsY3XfQC42Icne5d4wrRgXAEWTmaC9xhzM8e9CmPlYvONfUG3HGPiUIIPWQYElN4IW+hhW56vId4pNI2vh974A==", + "requires": { + "debug": "^4.2.0", + "lodash": "^4.17.20", + "reflect-metadata": "^0.1.13", + "tslib": "^2.0.3" + }, + "dependencies": { + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + } + } + }, + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" + } + }, + "tslib": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" + }, + "uuid": { + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", + "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==" + } } }, "loopback4-helmet": { @@ -4590,65 +4764,94 @@ }, "dependencies": { "@loopback/context": { - "version": "3.9.4", - "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.9.4.tgz", - "integrity": "sha512-Ch7X5gea3SRDwrJetJ5fthbNFBTcGIwxTMR11dvxrZClQUAOGX3M1LIjXhJq9HFXxVlxavL9Vp6BYL2Gg0QLMQ==", + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.13.0.tgz", + "integrity": "sha512-3R+6Mxm2QOAW8cjhEPaxP3i+uj1y9vkW7Ie91kuFa16yVHgOMrxPkcBmxduH5x4Cd1ZEKmtR/iVTfvRKoBYVxA==", "requires": { - "@loopback/metadata": "^2.2.4", + "@loopback/metadata": "^3.0.3", "@types/debug": "^4.1.5", - "debug": "^4.1.1", + "debug": "^4.2.0", "hyperid": "^2.0.5", "p-event": "^4.2.0", - "tslib": "^2.0.0", - "uuid": "^8.3.0" + "tslib": "^2.0.3", + "uuid": "^8.3.1" }, "dependencies": { + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" + } + }, "tslib": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", - "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" } } }, "@loopback/core": { - "version": "2.9.3", - "resolved": "https://registry.npmjs.org/@loopback/core/-/core-2.9.3.tgz", - "integrity": "sha512-Wjun6YprRp6Ay0OMP/+IEx9IMnlk1r+XPkkmfrcbv3mbkEh+JSdOmjv6plWbzpllnZwkYII1C41C7bdgDm7BCw==", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@loopback/core/-/core-2.12.0.tgz", + "integrity": "sha512-kdJZzIF7PA9TjnKoEtfhn2G41stmS8gIsweJAbiG7i+S4REbZLGR4KBHzDtSyfeeDCcxayouGzKwi/BT8gWDgQ==", "requires": { - "@loopback/context": "^3.9.4", - "debug": "^4.1.1", - "tslib": "^2.0.0" + "@loopback/context": "^3.13.0", + "debug": "^4.2.0", + "tslib": "^2.0.3" }, "dependencies": { + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" + } + }, "tslib": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", - "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" } } }, "@loopback/metadata": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-2.2.4.tgz", - "integrity": "sha512-sU4xPhxZSsJeWdw3oO2dWjqq6BR1Sb+Rx6W9xhHEDPVGaor5ae8unIcIpK6tnRdt6yjK22s295ao18lE2S3BJA==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-3.0.3.tgz", + "integrity": "sha512-VsY3XfQC42Icne5d4wrRgXAEWTmaC9xhzM8e9CmPlYvONfUG3HGPiUIIPWQYElN4IW+hhW56vId4pNI2vh974A==", "requires": { - "debug": "^4.1.1", - "lodash": "^4.17.19", + "debug": "^4.2.0", + "lodash": "^4.17.20", "reflect-metadata": "^0.1.13", - "tslib": "^2.0.0" + "tslib": "^2.0.3" }, "dependencies": { + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + }, "tslib": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", - "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" } } }, "uuid": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.0.tgz", - "integrity": "sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ==" + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", + "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==" } } }, @@ -4689,9 +4892,9 @@ } }, "path-to-regexp": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.1.0.tgz", - "integrity": "sha512-h9DqehX3zZZDCEm+xbfU0ZmwCGFCAAraPJWMXJ4+v32NjZJilVg3k1TcKsRgIb8IQ/izZSaydDc1OhJCZvs2Dw==" + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.0.tgz", + "integrity": "sha512-f66KywYG6+43afgE/8j/GoiNyygk/bnoCbps++3ErRKsIYkGGupyv07R2Ok5m9i67Iqc+T2g1eAUGUPzWhYTyg==" }, "setprototypeof": { "version": "1.2.0", @@ -4835,6 +5038,15 @@ "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" }, + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + }, "mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", @@ -5170,6 +5382,95 @@ "http2-client": "^1.2.5" } }, + "node-pg-migrate": { + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/node-pg-migrate/-/node-pg-migrate-5.9.0.tgz", + "integrity": "sha512-FXXPzP45B/Vj7C23j4QFKvUfe+k2fCfGcaVG6LNdJ8powA+f5V9nLuihuPZRlhUb0xIWWxqc2qUKIPPGuGJS5g==", + "requires": { + "@types/pg": "^7.4.0", + "decamelize": "^4.0.0", + "lodash": "~4.17.0", + "mkdirp": "~1.0.0", + "yargs": "~16.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==" + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "y18n": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz", + "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==" + }, + "yargs": { + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.1.0.tgz", + "integrity": "sha512-upWFJOmDdHN0syLuESuvXDmrRcWd1QafJolHskzaw79uZa7/x53gxQKiR07W59GWY1tFhhU/Th9DrtSfpS782g==", + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.2", + "yargs-parser": "^20.2.2" + } + }, + "yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==" + } + } + }, "node-preload": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", @@ -5764,6 +6065,11 @@ "release-zalgo": "^1.0.0" } }, + "packet-reader": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/packet-reader/-/packet-reader-1.0.0.tgz", + "integrity": "sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ==" + }, "param-case": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.3.tgz", @@ -5934,11 +6240,64 @@ "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, + "pg": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.5.0.tgz", + "integrity": "sha512-h+KHEwce67pAQilZhMCpCx1RC7rR1US7mdjwvKzHRaRxKQxbbFtv5UlwjzqILQ1dwhK+RVGqOVcahE/2KOcaeA==", + "requires": { + "buffer-writer": "2.0.0", + "packet-reader": "1.0.0", + "pg-connection-string": "^2.4.0", + "pg-pool": "^3.2.2", + "pg-protocol": "^1.4.0", + "pg-types": "^2.1.0", + "pgpass": "1.x" + } + }, + "pg-connection-string": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.4.0.tgz", + "integrity": "sha512-3iBXuv7XKvxeMrIgym7njT+HlZkwZqqGX4Bu9cci8xHZNT+Um1gWKqCsAzcC0d95rcKMU5WBg6YRUcHyV0HZKQ==" + }, + "pg-int8": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", + "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==" + }, + "pg-pool": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.2.2.tgz", + "integrity": "sha512-ORJoFxAlmmros8igi608iVEbQNNZlp89diFVx6yV5v+ehmpMY9sK6QgpmgoXbmkNaBAx8cOOZh9g80kJv1ooyA==" + }, + "pg-protocol": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.4.0.tgz", + "integrity": "sha512-El+aXWcwG/8wuFICMQjM5ZSAm6OWiJicFdNYo+VY3QP+8vI4SvLIWVe51PppTzMhikUJR+PsyIFKqfdXPz/yxA==" + }, + "pg-types": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", + "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", + "requires": { + "pg-int8": "1.0.1", + "postgres-array": "~2.0.0", + "postgres-bytea": "~1.0.0", + "postgres-date": "~1.0.4", + "postgres-interval": "^1.1.0" + } + }, + "pgpass": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.4.tgz", + "integrity": "sha512-YmuA56alyBq7M59vxVBfPJrGSozru8QAdoNlWuW3cz8l+UX3cWge0vTvjKhsSHSJpo3Bom8/Mm6hf0TR5GY0+w==", + "requires": { + "split2": "^3.1.1" + } + }, "picomatch": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", - "dev": true + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==" }, "pkg-dir": { "version": "4.2.0", @@ -5985,6 +6344,29 @@ } } }, + "postgres-array": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", + "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==" + }, + "postgres-bytea": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz", + "integrity": "sha1-AntTPAqokOJtFy1Hz5zOzFIazTU=" + }, + "postgres-date": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", + "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==" + }, + "postgres-interval": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", + "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", + "requires": { + "xtend": "^4.0.0" + } + }, "prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -6187,9 +6569,9 @@ } }, "redis-commands": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.5.0.tgz", - "integrity": "sha512-6KxamqpZ468MeQC3bkWmCB1fp56XL64D4Kf0zJSwDZbVLLm7KFkoIcHrgRvQ+sk8dnhySs7+yBg94yIkAK7aJg==" + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.6.0.tgz", + "integrity": "sha512-2jnZ0IkjZxvguITjFTrGiLyzQZcTvaw8DAaCXxZq/dsHXz7KfMQ3OUJy7Tz9vnRtZRVz6VRCPDvruvU8Ts44wQ==" }, "redis-errors": { "version": "1.2.0", @@ -6302,8 +6684,7 @@ "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, "require-main-filename": { "version": "2.0.0", @@ -6700,6 +7081,26 @@ "which": "^2.0.1" } }, + "split2": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", + "integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==", + "requires": { + "readable-stream": "^3.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -6750,7 +7151,6 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", - "dev": true, "requires": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -6814,7 +7214,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, "requires": { "ansi-regex": "^5.0.0" } @@ -7040,7 +7439,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, "requires": { "is-number": "^7.0.0" } @@ -7207,11 +7605,6 @@ "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" }, - "uuid": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.1.0.tgz", - "integrity": "sha512-CI18flHDznR0lq54xBycOVmphdCYnQLKn8abKn7PXUiKUGdEd+/l9LWNJmugXel4hXq7S+RMNl34ecyC9TntWg==" - }, "uuid-parse": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/uuid-parse/-/uuid-parse-1.1.0.tgz", @@ -7488,6 +7881,11 @@ "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz", "integrity": "sha1-UqY+VsoLhKfzpfPWGHLxJq16WUM=" }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + }, "y18n": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", diff --git a/services/notification-service/package.json b/services/notification-service/package.json index 77bbd4868e..e18d761847 100644 --- a/services/notification-service/package.json +++ b/services/notification-service/package.json @@ -51,7 +51,7 @@ "aws-sdk": "^2.694.0", "lodash": "^4.17.15", "loopback4-authentication": "^3.0.1", - "loopback4-authorization": "^2.3.2", + "loopback4-authorization": "3.1.1", "loopback4-notifications": "^1.0.0", "pubnub": "^4.28.0", "tslib": "^1.10.0" diff --git a/services/notification-service/src/controllers/notification-notification-user.controller.ts b/services/notification-service/src/controllers/notification-notification-user.controller.ts index b9348d2f14..49e7fe667d 100644 --- a/services/notification-service/src/controllers/notification-notification-user.controller.ts +++ b/services/notification-service/src/controllers/notification-notification-user.controller.ts @@ -30,7 +30,7 @@ export class NotificationNotificationUserController { ) {} @authenticate(STRATEGY.BEARER) - @authorize([PermissionKey.ViewNotification]) + @authorize({permissions: [PermissionKey.ViewNotification]}) @get(basePath, { responses: { '200': { @@ -54,7 +54,7 @@ export class NotificationNotificationUserController { } @authenticate(STRATEGY.BEARER) - @authorize([PermissionKey.CreateNotification]) + @authorize({permissions: [PermissionKey.CreateNotification]}) @post(basePath, { responses: { '200': { @@ -88,7 +88,7 @@ export class NotificationNotificationUserController { } @authenticate(STRATEGY.BEARER) - @authorize([PermissionKey.UpdateNotification]) + @authorize({permissions: [PermissionKey.UpdateNotification]}) @patch(basePath, { responses: { '200': { @@ -116,7 +116,7 @@ export class NotificationNotificationUserController { } @authenticate(STRATEGY.BEARER) - @authorize([PermissionKey.DeleteNotification]) + @authorize({permissions: [PermissionKey.DeleteNotification]}) @del(basePath, { responses: { '200': { diff --git a/services/notification-service/src/controllers/notification-user-notification.controller.ts b/services/notification-service/src/controllers/notification-user-notification.controller.ts index 46385d3c64..30c2668c92 100644 --- a/services/notification-service/src/controllers/notification-user-notification.controller.ts +++ b/services/notification-service/src/controllers/notification-user-notification.controller.ts @@ -14,7 +14,7 @@ export class NotificationUserNotificationController { ) {} @authenticate(STRATEGY.BEARER) - @authorize([PermissionKey.ViewNotification]) + @authorize({permissions: [PermissionKey.ViewNotification]}) @get('/notification-users/{id}/notification', { responses: { '200': { diff --git a/services/notification-service/src/controllers/notification-user.controller.ts b/services/notification-service/src/controllers/notification-user.controller.ts index 00e2f98211..c9ac4bda0c 100644 --- a/services/notification-service/src/controllers/notification-user.controller.ts +++ b/services/notification-service/src/controllers/notification-user.controller.ts @@ -45,7 +45,7 @@ export class NotificationUserController { ) {} @authenticate(STRATEGY.BEARER) - @authorize([PermissionKey.ViewNotification]) + @authorize({permissions: [PermissionKey.ViewNotification]}) @post(basePath, { responses: { [STATUS_CODE.OK]: { @@ -80,7 +80,7 @@ export class NotificationUserController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewNotification]) + @authorize({permissions: [PermissionKey.ViewNotification]}) @post(`${basePath}/bulk`, { responses: { [STATUS_CODE.OK]: { @@ -121,7 +121,7 @@ export class NotificationUserController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewNotification]) + @authorize({permissions: [PermissionKey.ViewNotification]}) @get(`${basePath}/count`, { responses: { [STATUS_CODE.OK]: { @@ -144,7 +144,7 @@ export class NotificationUserController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewNotification]) + @authorize({permissions: [PermissionKey.ViewNotification]}) @get(basePath, { responses: { [STATUS_CODE.OK]: { @@ -171,7 +171,7 @@ export class NotificationUserController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewNotification]) + @authorize({permissions: [PermissionKey.ViewNotification]}) @patch(basePath, { responses: { [STATUS_CODE.OK]: { @@ -203,7 +203,7 @@ export class NotificationUserController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewNotification]) + @authorize({permissions: [PermissionKey.ViewNotification]}) @get(`${basePath}/{id}`, { responses: { [STATUS_CODE.OK]: { @@ -225,7 +225,7 @@ export class NotificationUserController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewNotification]) + @authorize({permissions: [PermissionKey.ViewNotification]}) @patch(`${basePath}/{id}`, { responses: { '204': { @@ -253,7 +253,7 @@ export class NotificationUserController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewNotification]) + @authorize({permissions: [PermissionKey.ViewNotification]}) @put(`${basePath}/{id}`, { responses: { '204': { @@ -274,7 +274,7 @@ export class NotificationUserController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewNotification]) + @authorize({permissions: [PermissionKey.ViewNotification]}) @del(`${basePath}/{id}`, { responses: { '204': { diff --git a/services/notification-service/src/controllers/notification.controller.ts b/services/notification-service/src/controllers/notification.controller.ts index e634f5f486..0b33d01853 100644 --- a/services/notification-service/src/controllers/notification.controller.ts +++ b/services/notification-service/src/controllers/notification.controller.ts @@ -41,7 +41,7 @@ export class NotificationController { ) {} @authenticate(STRATEGY.BEARER) - @authorize([PermissionKey.CreateNotification]) + @authorize({permissions: [PermissionKey.CreateNotification]}) @post('/notifications', { responses: { [STATUS_CODE.OK]: { @@ -78,7 +78,7 @@ export class NotificationController { } @authenticate(STRATEGY.BEARER) - @authorize([PermissionKey.CreateNotification]) + @authorize({permissions: [PermissionKey.CreateNotification]}) @post('/notifications/bulk', { responses: { [STATUS_CODE.OK]: { @@ -128,7 +128,7 @@ export class NotificationController { } @authenticate(STRATEGY.BEARER) - @authorize([PermissionKey.ViewNotification]) + @authorize({permissions: [PermissionKey.ViewNotification]}) @get('/notifications/count', { responses: { [STATUS_CODE.OK]: { @@ -145,7 +145,7 @@ export class NotificationController { } @authenticate(STRATEGY.BEARER) - @authorize(['*']) + @authorize({permissions: ['*']}) @get('/notifications', { responses: { [STATUS_CODE.OK]: { @@ -166,7 +166,7 @@ export class NotificationController { } @authenticate(STRATEGY.BEARER) - @authorize([PermissionKey.ViewNotification]) + @authorize({permissions: [PermissionKey.ViewNotification]}) @get('/notifications/{id}', { responses: { [STATUS_CODE.OK]: { diff --git a/services/notification-service/src/controllers/pubnub-notification.controller.ts b/services/notification-service/src/controllers/pubnub-notification.controller.ts index f200518fbc..45039fc939 100644 --- a/services/notification-service/src/controllers/pubnub-notification.controller.ts +++ b/services/notification-service/src/controllers/pubnub-notification.controller.ts @@ -45,7 +45,7 @@ export class PubnubNotificationController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.CanGetNotificationAccess]) + @authorize({permissions: [PermissionKey.CanGetNotificationAccess]}) @patch('/notifications/access/{id}', { responses: { [STATUS_CODE.OK]: { @@ -92,7 +92,7 @@ export class PubnubNotificationController { }); } - @authorize(['*']) + @authorize({permissions: ['*']}) @del('/notifications/access/{id}', { responses: { [STATUS_CODE.OK]: { diff --git a/services/scheduler-service/package-lock.json b/services/scheduler-service/package-lock.json index 12b4dd4312..a6d7dae886 100644 --- a/services/scheduler-service/package-lock.json +++ b/services/scheduler-service/package-lock.json @@ -435,50 +435,52 @@ } }, "@loopback/context": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.9.0.tgz", - "integrity": "sha512-fmHxALWqmCk5xWe3Xz/Gdt32BA0knl4/fJzj4erqqhrL9YfpWDoNN2JqP2OmeqkLI9u+Q1fMJkhRKikW1KmBuw==", + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.13.0.tgz", + "integrity": "sha512-3R+6Mxm2QOAW8cjhEPaxP3i+uj1y9vkW7Ie91kuFa16yVHgOMrxPkcBmxduH5x4Cd1ZEKmtR/iVTfvRKoBYVxA==", "requires": { - "@loopback/metadata": "^2.2.0", + "@loopback/metadata": "^3.0.3", "@types/debug": "^4.1.5", - "debug": "^4.1.1", + "debug": "^4.2.0", "hyperid": "^2.0.5", "p-event": "^4.2.0", - "tslib": "^2.0.0", - "uuid": "^8.1.0" + "tslib": "^2.0.3", + "uuid": "^8.3.1" }, "dependencies": { "@loopback/metadata": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-2.2.1.tgz", - "integrity": "sha512-PK+9X2IMTFlwrkiNllLz4chjCbWifsbNmh4ZqN0/M4Zb39D4mlFxlHizUi8krZFhRf32aR1hghYI9kiQntBpXw==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-3.0.3.tgz", + "integrity": "sha512-VsY3XfQC42Icne5d4wrRgXAEWTmaC9xhzM8e9CmPlYvONfUG3HGPiUIIPWQYElN4IW+hhW56vId4pNI2vh974A==", "requires": { - "debug": "^4.1.1", - "lodash": "^4.17.15", + "debug": "^4.2.0", + "lodash": "^4.17.20", "reflect-metadata": "^0.1.13", - "tslib": "^2.0.0" + "tslib": "^2.0.3" } }, - "p-event": { + "debug": { "version": "4.2.0", - "resolved": "https://registry.npmjs.org/p-event/-/p-event-4.2.0.tgz", - "integrity": "sha512-KXatOjCRXXkSePPb1Nbi0p0m+gQAwdlbhi4wQKJPI1HsMQS9g+Sqp2o+QHziPr7eYJyOZet836KoHEVM1mwOrQ==", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", "requires": { - "p-timeout": "^3.1.0" + "ms": "2.1.2" } }, - "p-timeout": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", - "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", - "requires": { - "p-finally": "^1.0.0" - } + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" }, "tslib": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.0.tgz", - "integrity": "sha512-lTqkx847PI7xEDYJntxZH89L2/aXInsyF2luSafe/+0fHOMjlBNXdH6th7f70qxLDhul7KZK0zC8V5ZIyHl0/g==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" + }, + "uuid": { + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", + "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==" } } }, @@ -1073,12 +1075,12 @@ "dev": true }, "@sourceloop/core": { - "version": "1.0.0-alpha.8", - "resolved": "https://registry.npmjs.org/@sourceloop/core/-/core-1.0.0-alpha.8.tgz", - "integrity": "sha512-P6a4Gx6dwZqEzRoPvo6xM4kona8sf9BfN2JUL8CiJz6K9yuTbbuU6n/IXzYPbzez5Wz+zl3tzsGf8f4wIgc3KQ==", + "version": "1.0.0-alpha.14", + "resolved": "https://registry.npmjs.org/@sourceloop/core/-/core-1.0.0-alpha.14.tgz", + "integrity": "sha512-sOckHOfjLjpv8qJ/7mZx7+5LORsSUy8oPU1QFCMi/SiKnYG7jUQknN4HUk98qODIxaShtPHo3DLyCo7/Z0rQLA==", "requires": { "@loopback/boot": "^2.3.1", - "@loopback/context": "^3.8.1", + "@loopback/context": "^3.9.4", "@loopback/core": "^2.7.0", "@loopback/repository": "^2.5.1", "@loopback/rest": "^5.0.1", @@ -1099,62 +1101,30 @@ "winston": "^3.2.1" }, "dependencies": { - "@loopback/metadata": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-2.2.4.tgz", - "integrity": "sha512-sU4xPhxZSsJeWdw3oO2dWjqq6BR1Sb+Rx6W9xhHEDPVGaor5ae8unIcIpK6tnRdt6yjK22s295ao18lE2S3BJA==", - "requires": { - "debug": "^4.1.1", - "lodash": "^4.17.19", - "reflect-metadata": "^0.1.13", - "tslib": "^2.0.0" - }, - "dependencies": { - "tslib": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", - "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" - } - } - }, "@loopback/service-proxy": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/@loopback/service-proxy/-/service-proxy-2.3.6.tgz", - "integrity": "sha512-Xr7tFU4X0jf68nyzQP9BJviU9+gHUA/d9fBBu/phqVHoJjklBUJqdHVmpv/ydRyTzPi8mfitmjCVJGeB47UopQ==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/@loopback/service-proxy/-/service-proxy-2.3.8.tgz", + "integrity": "sha512-WRErlDsmDSC+4wb+2J0u8hdNKoYxX6jXNzhSvZ2DPp7oubZPC8LeKcjMr1nNWkdT9vEbJYmoQP4kUC6LCDFfnQ==", "requires": { - "@loopback/core": "^2.9.3", + "@loopback/core": "^2.9.5", "loopback-datasource-juggler": "^4.24.0", - "tslib": "^2.0.0" + "tslib": "^2.0.1" }, "dependencies": { - "@loopback/context": { - "version": "3.9.4", - "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.9.4.tgz", - "integrity": "sha512-Ch7X5gea3SRDwrJetJ5fthbNFBTcGIwxTMR11dvxrZClQUAOGX3M1LIjXhJq9HFXxVlxavL9Vp6BYL2Gg0QLMQ==", - "requires": { - "@loopback/metadata": "^2.2.4", - "@types/debug": "^4.1.5", - "debug": "^4.1.1", - "hyperid": "^2.0.5", - "p-event": "^4.2.0", - "tslib": "^2.0.0", - "uuid": "^8.3.0" - } - }, "@loopback/core": { - "version": "2.9.3", - "resolved": "https://registry.npmjs.org/@loopback/core/-/core-2.9.3.tgz", - "integrity": "sha512-Wjun6YprRp6Ay0OMP/+IEx9IMnlk1r+XPkkmfrcbv3mbkEh+JSdOmjv6plWbzpllnZwkYII1C41C7bdgDm7BCw==", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@loopback/core/-/core-2.12.0.tgz", + "integrity": "sha512-kdJZzIF7PA9TjnKoEtfhn2G41stmS8gIsweJAbiG7i+S4REbZLGR4KBHzDtSyfeeDCcxayouGzKwi/BT8gWDgQ==", "requires": { - "@loopback/context": "^3.9.4", - "debug": "^4.1.1", - "tslib": "^2.0.0" + "@loopback/context": "^3.13.0", + "debug": "^4.2.0", + "tslib": "^2.0.3" } }, "loopback-datasource-juggler": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/loopback-datasource-juggler/-/loopback-datasource-juggler-4.24.0.tgz", - "integrity": "sha512-v4UwAdSzsOVnRicBk6BuUjkwxk7TuJHUkbpXQxlVjSZCYx2WpSzapuEuhBIWUtoY5JMsE2S+xArl2qqrnSg3KA==", + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/loopback-datasource-juggler/-/loopback-datasource-juggler-4.26.0.tgz", + "integrity": "sha512-/R40jUGDrnRBgTh121L4Y7sHDF0KxbgSAN4gLJKp8xGNQ6KpkSQyqZkmap98eN7B75RES78DS3MGghsYMvAJ3Q==", "requires": { "async": "^3.1.0", "change-case": "^4.1.1", @@ -1162,29 +1132,56 @@ "depd": "^2.0.0", "inflection": "^1.6.0", "lodash": "^4.17.11", - "loopback-connector": "^4.4.0", + "loopback-connector": "^5.0.0", "minimatch": "^3.0.3", "qs": "^6.5.0", "shortid": "^2.2.6", - "strong-globalize": "^5.0.2", + "strong-globalize": "^6.0.5", "traverse": "^0.6.6", - "uuid": "^7.0.0" - }, - "dependencies": { - "uuid": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz", - "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==" - } + "uuid": "^8.3.1" } }, "tslib": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", - "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" } } }, + "cldrjs": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/cldrjs/-/cldrjs-0.5.5.tgz", + "integrity": "sha512-KDwzwbmLIPfCgd8JERVDpQKrUUM1U4KpFJJg2IROv89rF172lLufoJnqJ/Wea6fXL5bO6WjuLMzY8V52UWPvkA==" + }, + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" + } + }, + "globalize": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/globalize/-/globalize-1.6.0.tgz", + "integrity": "sha512-MTuAU3Tnbtga8PvxbpSPdQNIs6K5UdATWIuarWJK2Z3e1DghXpxb/GmShSVagzHqCOYgZr7N/Hi7D1mrHG30jQ==", + "requires": { + "cldrjs": "^0.5.4" + } + }, + "loopback-connector": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/loopback-connector/-/loopback-connector-5.0.1.tgz", + "integrity": "sha512-aSPT6x5WZdoW9ylyNE4CxGqFbIqC9cSEZJwWkCincso27PXlZPj52POoF6pgxug9mkH7MrbXuP3SSDLkLq5oQQ==", + "requires": { + "async": "^3.2.0", + "bluebird": "^3.7.2", + "debug": "^4.1.1", + "msgpack5": "^4.2.0", + "strong-globalize": "^6.0.4", + "uuid": "^8.3.0" + } + }, "loopback4-authentication": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/loopback4-authentication/-/loopback4-authentication-4.0.1.tgz", @@ -1201,37 +1198,46 @@ "passport-oauth2-client-password": "^0.1.2" }, "dependencies": { - "@loopback/context": { - "version": "3.9.4", - "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.9.4.tgz", - "integrity": "sha512-Ch7X5gea3SRDwrJetJ5fthbNFBTcGIwxTMR11dvxrZClQUAOGX3M1LIjXhJq9HFXxVlxavL9Vp6BYL2Gg0QLMQ==", - "requires": { - "@loopback/metadata": "^2.2.4", - "@types/debug": "^4.1.5", - "debug": "^4.1.1", - "hyperid": "^2.0.5", - "p-event": "^4.2.0", - "tslib": "^2.0.0", - "uuid": "^8.3.0" - } - }, "@loopback/core": { - "version": "2.9.3", - "resolved": "https://registry.npmjs.org/@loopback/core/-/core-2.9.3.tgz", - "integrity": "sha512-Wjun6YprRp6Ay0OMP/+IEx9IMnlk1r+XPkkmfrcbv3mbkEh+JSdOmjv6plWbzpllnZwkYII1C41C7bdgDm7BCw==", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@loopback/core/-/core-2.12.0.tgz", + "integrity": "sha512-kdJZzIF7PA9TjnKoEtfhn2G41stmS8gIsweJAbiG7i+S4REbZLGR4KBHzDtSyfeeDCcxayouGzKwi/BT8gWDgQ==", "requires": { - "@loopback/context": "^3.9.4", - "debug": "^4.1.1", - "tslib": "^2.0.0" + "@loopback/context": "^3.13.0", + "debug": "^4.2.0", + "tslib": "^2.0.3" } }, "tslib": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", - "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" } } }, + "loopback4-authorization": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/loopback4-authorization/-/loopback4-authorization-2.3.2.tgz", + "integrity": "sha512-9vMmcqRFWQOsAv1iocsWuZKkM33DUGmelGu6rQy7zsEAUnP5XgiRBJSUVZ/wbZnCbPvz9UughtBEHY7FzpCj6Q==", + "requires": { + "lodash": "^4.17.11" + } + }, + "md5": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz", + "integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==", + "requires": { + "charenc": "0.0.2", + "crypt": "0.0.2", + "is-buffer": "~1.1.6" + } + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + }, "readable-stream": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", @@ -1242,10 +1248,32 @@ "util-deprecate": "^1.0.1" } }, + "strong-globalize": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/strong-globalize/-/strong-globalize-6.0.5.tgz", + "integrity": "sha512-7nfUli41TieV9/TSc0N62ve5Q4nfrpy/T0nNNy6TyD3vst79QWmeylCyd3q1gDxh8dqGEtabLNCdPQP1Iuvecw==", + "requires": { + "accept-language": "^3.0.18", + "debug": "^4.2.0", + "globalize": "^1.6.0", + "lodash": "^4.17.20", + "md5": "^2.3.0", + "mkdirp": "^1.0.4", + "os-locale": "^5.0.0", + "yamljs": "^0.3.0" + }, + "dependencies": { + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + } + } + }, "uuid": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.0.tgz", - "integrity": "sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ==" + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", + "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==" }, "winston": { "version": "3.3.3", @@ -1412,6 +1440,20 @@ "@types/node": "*" } }, + "@types/pg": { + "version": "7.14.6", + "resolved": "https://registry.npmjs.org/@types/pg/-/pg-7.14.6.tgz", + "integrity": "sha512-mf6kYvuYS2CObDxtsw5imE4vOvq+XHJtiJNFXir/fn9nxZtIFQ3/ECpokm8fNkxKBh7nQhyegHwNg1NIW+yYJA==", + "requires": { + "@types/node": "*", + "@types/pg-types": "*" + } + }, + "@types/pg-types": { + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@types/pg-types/-/pg-types-1.11.5.tgz", + "integrity": "sha512-L8ogeT6vDzT1vxlW3KITTCt+BVXXVkLXfZ/XNm6UqbcJgxf+KPO7yjWx7dQQE8RW07KopL10x2gNMs41+IkMGQ==" + }, "@types/qs": { "version": "6.9.3", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.3.tgz", @@ -1726,6 +1768,11 @@ "array-filter": "^1.0.0" } }, + "await-lock": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/await-lock/-/await-lock-2.1.0.tgz", + "integrity": "sha512-t7Zm5YGgEEc/3eYAicF32m/TNvL+XOeYZy9CvBUeJY/szM7frLolFylhrlZNWV/ohWhcUXygrBGjYmoQdxF4CQ==" + }, "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -1872,7 +1919,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, "requires": { "fill-range": "^7.0.1" } @@ -1990,6 +2036,27 @@ "upper-case-first": "^2.0.1" } }, + "casbin": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/casbin/-/casbin-5.2.0.tgz", + "integrity": "sha512-9qqcTAx0ysgF6xz1Mq83B7yD9inG4iEZ85tMZBmkXCIsECD9yAE8XhaONn7GhlnTave10k3ktGJ+9qNItXe30A==", + "requires": { + "await-lock": "^2.0.1", + "expression-eval": "^2.0.0", + "ip": "^1.1.5", + "micromatch": "^4.0.2" + } + }, + "casbin-pg-adapter": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/casbin-pg-adapter/-/casbin-pg-adapter-1.4.0.tgz", + "integrity": "sha512-9T0i+t0XwdnsBFl+20ojAED9+05SN4haJDLOJTUh9liHO+yBi6SXwSboD0MLzserFkxCs8VJJ+BNJlavExlU+A==", + "requires": { + "casbin": "^5.0.4", + "node-pg-migrate": "^5.1.0", + "pg": "^8.2.1" + } + }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -2215,9 +2282,9 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, "color-string": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.3.tgz", - "integrity": "sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==", + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.4.tgz", + "integrity": "sha512-57yF5yt8Xa3czSEW1jfQDE79Idk0+AkN/4KWad6tbdxUmAs3MvjxlWSWD4deYytcRfoZ9nhKyFl1kj5tBvidbw==", "requires": { "color-name": "^1.0.0", "simple-swizzle": "^0.2.2" @@ -2806,6 +2873,11 @@ "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", "dev": true }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -3057,6 +3129,14 @@ "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-5.1.3.tgz", "integrity": "sha512-TINcxve5510pXj4n9/1AMupkj3iWxl3JuZaWhCdYDlZeoCPqweGZrxbrlqTCFb1CT5wli7s8e2SH/Qz2c9GorA==" }, + "expression-eval": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/expression-eval/-/expression-eval-2.1.0.tgz", + "integrity": "sha512-FUJO/Akvl/JOWkvlqZaqbkhsEWlCJWDeZG4tzX96UH68D9FeRgYgtb55C2qtqbORC0Q6x5419EDjWu4IT9kQfg==", + "requires": { + "jsep": "^0.3.0" + } + }, "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -3144,7 +3224,6 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, "requires": { "to-regex-range": "^5.0.1" } @@ -3805,21 +3884,34 @@ "integrity": "sha512-CYdFeFexxhv/Bcny+Q0BfOV+ltRlJcd4BBZBYFX/O0u4npJrgZtIcjokegtiSMAvlMTJ+Koq0GBCc//3bueQxw==" }, "ioredis": { - "version": "4.17.3", - "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-4.17.3.tgz", - "integrity": "sha512-iRvq4BOYzNFkDnSyhx7cmJNOi1x/HWYe+A4VXHBu4qpwJaGT1Mp+D2bVGJntH9K/Z/GeOM/Nprb8gB3bmitz1Q==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-4.19.2.tgz", + "integrity": "sha512-SZSIwMrbd96b7rJvJwyTWSP6XQ0m1kAIIqBnwglJKrIJ6na7TeY4F2EV2vDY0xm/fLrUY8cEg81dR7kVFt2sKA==", "requires": { "cluster-key-slot": "^1.1.0", "debug": "^4.1.1", "denque": "^1.1.0", "lodash.defaults": "^4.2.0", "lodash.flatten": "^4.4.0", - "redis-commands": "1.5.0", + "p-map": "^2.1.0", + "redis-commands": "1.6.0", "redis-errors": "^1.2.0", "redis-parser": "^3.0.0", "standard-as-callback": "^2.0.1" + }, + "dependencies": { + "p-map": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==" + } } }, + "ip": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" + }, "ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -3897,8 +3989,7 @@ "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" }, "is-number-object": { "version": "1.0.4", @@ -4154,6 +4245,11 @@ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, + "jsep": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/jsep/-/jsep-0.3.5.tgz", + "integrity": "sha512-AoRLBDc6JNnKjNcmonituEABS5bcfqDhQAWWXNTFrqu6nVXBpBAGfcoTGZMFlIrh9FjmE1CQyX9CTNwZrXMMDA==" + }, "jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -4643,11 +4739,76 @@ } }, "loopback4-authorization": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/loopback4-authorization/-/loopback4-authorization-2.3.2.tgz", - "integrity": "sha512-9vMmcqRFWQOsAv1iocsWuZKkM33DUGmelGu6rQy7zsEAUnP5XgiRBJSUVZ/wbZnCbPvz9UughtBEHY7FzpCj6Q==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/loopback4-authorization/-/loopback4-authorization-3.1.1.tgz", + "integrity": "sha512-qcFRNnJsMwpUZwszaRftQ5rJUaU3p/0iO/gx/1ifaLeBfnTJ0t8lMYUGU1xnOU2ya8VTvauHJgx0gwCSnoWlbQ==", "requires": { - "lodash": "^4.17.11" + "@loopback/core": "^2.9.2", + "casbin": "^5.1.5", + "casbin-pg-adapter": "^1.4.0", + "lodash": "^4.17.19" + }, + "dependencies": { + "@loopback/context": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.13.0.tgz", + "integrity": "sha512-3R+6Mxm2QOAW8cjhEPaxP3i+uj1y9vkW7Ie91kuFa16yVHgOMrxPkcBmxduH5x4Cd1ZEKmtR/iVTfvRKoBYVxA==", + "requires": { + "@loopback/metadata": "^3.0.3", + "@types/debug": "^4.1.5", + "debug": "^4.2.0", + "hyperid": "^2.0.5", + "p-event": "^4.2.0", + "tslib": "^2.0.3", + "uuid": "^8.3.1" + } + }, + "@loopback/core": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@loopback/core/-/core-2.12.0.tgz", + "integrity": "sha512-kdJZzIF7PA9TjnKoEtfhn2G41stmS8gIsweJAbiG7i+S4REbZLGR4KBHzDtSyfeeDCcxayouGzKwi/BT8gWDgQ==", + "requires": { + "@loopback/context": "^3.13.0", + "debug": "^4.2.0", + "tslib": "^2.0.3" + } + }, + "@loopback/metadata": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-3.0.3.tgz", + "integrity": "sha512-VsY3XfQC42Icne5d4wrRgXAEWTmaC9xhzM8e9CmPlYvONfUG3HGPiUIIPWQYElN4IW+hhW56vId4pNI2vh974A==", + "requires": { + "debug": "^4.2.0", + "lodash": "^4.17.20", + "reflect-metadata": "^0.1.13", + "tslib": "^2.0.3" + }, + "dependencies": { + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + } + } + }, + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" + } + }, + "tslib": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" + }, + "uuid": { + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", + "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==" + } } }, "loopback4-helmet": { @@ -4783,65 +4944,94 @@ }, "dependencies": { "@loopback/context": { - "version": "3.9.4", - "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.9.4.tgz", - "integrity": "sha512-Ch7X5gea3SRDwrJetJ5fthbNFBTcGIwxTMR11dvxrZClQUAOGX3M1LIjXhJq9HFXxVlxavL9Vp6BYL2Gg0QLMQ==", + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.13.0.tgz", + "integrity": "sha512-3R+6Mxm2QOAW8cjhEPaxP3i+uj1y9vkW7Ie91kuFa16yVHgOMrxPkcBmxduH5x4Cd1ZEKmtR/iVTfvRKoBYVxA==", "requires": { - "@loopback/metadata": "^2.2.4", + "@loopback/metadata": "^3.0.3", "@types/debug": "^4.1.5", - "debug": "^4.1.1", + "debug": "^4.2.0", "hyperid": "^2.0.5", "p-event": "^4.2.0", - "tslib": "^2.0.0", - "uuid": "^8.3.0" + "tslib": "^2.0.3", + "uuid": "^8.3.1" }, "dependencies": { + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" + } + }, "tslib": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", - "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" } } }, "@loopback/core": { - "version": "2.9.3", - "resolved": "https://registry.npmjs.org/@loopback/core/-/core-2.9.3.tgz", - "integrity": "sha512-Wjun6YprRp6Ay0OMP/+IEx9IMnlk1r+XPkkmfrcbv3mbkEh+JSdOmjv6plWbzpllnZwkYII1C41C7bdgDm7BCw==", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@loopback/core/-/core-2.12.0.tgz", + "integrity": "sha512-kdJZzIF7PA9TjnKoEtfhn2G41stmS8gIsweJAbiG7i+S4REbZLGR4KBHzDtSyfeeDCcxayouGzKwi/BT8gWDgQ==", "requires": { - "@loopback/context": "^3.9.4", - "debug": "^4.1.1", - "tslib": "^2.0.0" + "@loopback/context": "^3.13.0", + "debug": "^4.2.0", + "tslib": "^2.0.3" }, "dependencies": { + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" + } + }, "tslib": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", - "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" } } }, "@loopback/metadata": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-2.2.4.tgz", - "integrity": "sha512-sU4xPhxZSsJeWdw3oO2dWjqq6BR1Sb+Rx6W9xhHEDPVGaor5ae8unIcIpK6tnRdt6yjK22s295ao18lE2S3BJA==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-3.0.3.tgz", + "integrity": "sha512-VsY3XfQC42Icne5d4wrRgXAEWTmaC9xhzM8e9CmPlYvONfUG3HGPiUIIPWQYElN4IW+hhW56vId4pNI2vh974A==", "requires": { - "debug": "^4.1.1", - "lodash": "^4.17.19", + "debug": "^4.2.0", + "lodash": "^4.17.20", "reflect-metadata": "^0.1.13", - "tslib": "^2.0.0" + "tslib": "^2.0.3" }, "dependencies": { + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + }, "tslib": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", - "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" } } }, "uuid": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.0.tgz", - "integrity": "sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ==" + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", + "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==" } } }, @@ -4882,9 +5072,9 @@ } }, "path-to-regexp": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.1.0.tgz", - "integrity": "sha512-h9DqehX3zZZDCEm+xbfU0ZmwCGFCAAraPJWMXJ4+v32NjZJilVg3k1TcKsRgIb8IQ/izZSaydDc1OhJCZvs2Dw==" + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.0.tgz", + "integrity": "sha512-f66KywYG6+43afgE/8j/GoiNyygk/bnoCbps++3ErRKsIYkGGupyv07R2Ok5m9i67Iqc+T2g1eAUGUPzWhYTyg==" }, "setprototypeof": { "version": "1.2.0", @@ -5028,6 +5218,15 @@ "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" }, + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + }, "mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", @@ -5367,6 +5566,95 @@ "resolved": "https://registry.npmjs.org/node-fs/-/node-fs-0.1.7.tgz", "integrity": "sha1-MjI8zLRsn78PwRgS1FAhzDHTJbs=" }, + "node-pg-migrate": { + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/node-pg-migrate/-/node-pg-migrate-5.9.0.tgz", + "integrity": "sha512-FXXPzP45B/Vj7C23j4QFKvUfe+k2fCfGcaVG6LNdJ8powA+f5V9nLuihuPZRlhUb0xIWWxqc2qUKIPPGuGJS5g==", + "requires": { + "@types/pg": "^7.4.0", + "decamelize": "^4.0.0", + "lodash": "~4.17.0", + "mkdirp": "~1.0.0", + "yargs": "~16.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==" + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "y18n": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz", + "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==" + }, + "yargs": { + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.1.0.tgz", + "integrity": "sha512-upWFJOmDdHN0syLuESuvXDmrRcWd1QafJolHskzaw79uZa7/x53gxQKiR07W59GWY1tFhhU/Th9DrtSfpS782g==", + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.2", + "yargs-parser": "^20.2.2" + } + }, + "yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==" + } + } + }, "node-preload": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", @@ -6179,8 +6467,7 @@ "picomatch": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", - "dev": true + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==" }, "pkg-dir": { "version": "4.2.0", @@ -6443,9 +6730,9 @@ } }, "redis-commands": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.5.0.tgz", - "integrity": "sha512-6KxamqpZ468MeQC3bkWmCB1fp56XL64D4Kf0zJSwDZbVLLm7KFkoIcHrgRvQ+sk8dnhySs7+yBg94yIkAK7aJg==" + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.6.0.tgz", + "integrity": "sha512-2jnZ0IkjZxvguITjFTrGiLyzQZcTvaw8DAaCXxZq/dsHXz7KfMQ3OUJy7Tz9vnRtZRVz6VRCPDvruvU8Ts44wQ==" }, "redis-errors": { "version": "1.2.0", @@ -7276,7 +7563,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, "requires": { "is-number": "^7.0.0" } diff --git a/services/scheduler-service/package.json b/services/scheduler-service/package.json index f453066a71..46e1c9ec45 100644 --- a/services/scheduler-service/package.json +++ b/services/scheduler-service/package.json @@ -55,7 +55,7 @@ "db-migrate": "^0.11.11", "db-migrate-pg": "^1.2.2", "loopback4-authentication": "^3.0.1", - "loopback4-authorization": "^2.3.2", + "loopback4-authorization": "3.1.1", "loopback4-soft-delete": "^2.0.0", "tslib": "^1.10.0" }, diff --git a/services/scheduler-service/src/controllers/attachment.controller.ts b/services/scheduler-service/src/controllers/attachment.controller.ts index 8af7a70363..b91f22da3b 100644 --- a/services/scheduler-service/src/controllers/attachment.controller.ts +++ b/services/scheduler-service/src/controllers/attachment.controller.ts @@ -34,7 +34,7 @@ export class AttachmentController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.CreateAttachment]) + @authorize({permissions: [PermissionKey.CreateAttachment]}) @post(basePath, { responses: { [STATUS_CODE.OK]: { @@ -62,7 +62,7 @@ export class AttachmentController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewAttachment]) + @authorize({permissions: [PermissionKey.ViewAttachment]}) @get(`${basePath}/count`, { responses: { [STATUS_CODE.OK]: { @@ -80,7 +80,7 @@ export class AttachmentController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewAttachment]) + @authorize({permissions: [PermissionKey.ViewAttachment]}) @get(basePath, { responses: { [STATUS_CODE.OK]: { @@ -105,7 +105,7 @@ export class AttachmentController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.UpdateAttachment]) + @authorize({permissions: [PermissionKey.UpdateAttachment]}) @patch(basePath, { responses: { [STATUS_CODE.OK]: { @@ -131,7 +131,7 @@ export class AttachmentController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewAttachment]) + @authorize({permissions: [PermissionKey.ViewAttachment]}) @get(`${basePath}/{id}`, { responses: { [STATUS_CODE.OK]: { @@ -155,7 +155,7 @@ export class AttachmentController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.UpdateAttachment]) + @authorize({permissions: [PermissionKey.UpdateAttachment]}) @patch(`${basePath}/{id}`, { responses: { [STATUS_CODE.NO_CONTENT]: { @@ -180,7 +180,7 @@ export class AttachmentController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.UpdateAttachment]) + @authorize({permissions: [PermissionKey.UpdateAttachment]}) @put(`${basePath}/{id}`, { responses: { [STATUS_CODE.NO_CONTENT]: { @@ -198,7 +198,7 @@ export class AttachmentController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.DeleteAttachment]) + @authorize({permissions: [PermissionKey.DeleteAttachment]}) @del(`${basePath}/{id}`, { responses: { [STATUS_CODE.NO_CONTENT]: { diff --git a/services/scheduler-service/src/controllers/attendee.controller.ts b/services/scheduler-service/src/controllers/attendee.controller.ts index 67752365ed..78f39e407f 100644 --- a/services/scheduler-service/src/controllers/attendee.controller.ts +++ b/services/scheduler-service/src/controllers/attendee.controller.ts @@ -34,7 +34,7 @@ export class AttendeeController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.CreateAttendee]) + @authorize({permissions: [PermissionKey.CreateAttendee]}) @post(basePath, { responses: { [STATUS_CODE.OK]: { @@ -62,7 +62,7 @@ export class AttendeeController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewAttendee]) + @authorize({permissions: [PermissionKey.ViewAttendee]}) @get(`${basePath}/count`, { responses: { [STATUS_CODE.OK]: { @@ -78,7 +78,7 @@ export class AttendeeController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewAttendee]) + @authorize({permissions: [PermissionKey.ViewAttendee]}) @get(basePath, { responses: { [STATUS_CODE.OK]: { @@ -103,7 +103,7 @@ export class AttendeeController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.UpdateAttendee]) + @authorize({permissions: [PermissionKey.UpdateAttendee]}) @patch(basePath, { responses: { [STATUS_CODE.OK]: { @@ -129,7 +129,7 @@ export class AttendeeController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewAttendee]) + @authorize({permissions: [PermissionKey.ViewAttendee]}) @get(`${basePath}/{id}`, { responses: { [STATUS_CODE.OK]: { @@ -152,7 +152,7 @@ export class AttendeeController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.UpdateAttendee]) + @authorize({permissions: [PermissionKey.UpdateAttendee]}) @patch(`${basePath}/{id}`, { responses: { [STATUS_CODE.NO_CONTENT]: { @@ -177,7 +177,7 @@ export class AttendeeController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.UpdateAttendee]) + @authorize({permissions: [PermissionKey.UpdateAttendee]}) @put(`${basePath}/{id}`, { responses: { [STATUS_CODE.NO_CONTENT]: { @@ -195,7 +195,7 @@ export class AttendeeController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.DeleteAttendee]) + @authorize({permissions: [PermissionKey.DeleteAttendee]}) @del(`${basePath}/{id}`, { responses: { [STATUS_CODE.NO_CONTENT]: { diff --git a/services/scheduler-service/src/controllers/calendar-event.controller.ts b/services/scheduler-service/src/controllers/calendar-event.controller.ts index 40bb248558..f8880f1bec 100644 --- a/services/scheduler-service/src/controllers/calendar-event.controller.ts +++ b/services/scheduler-service/src/controllers/calendar-event.controller.ts @@ -52,7 +52,7 @@ export class CalendarEventController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewEvent]) + @authorize({permissions: [PermissionKey.ViewEvent]}) @get(basePath, { responses: { [STATUS_CODE.OK]: { @@ -122,7 +122,7 @@ export class CalendarEventController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.CreateEvent]) + @authorize({permissions: [PermissionKey.CreateEvent]}) @post(basePath, { responses: { [STATUS_CODE.OK]: { @@ -152,7 +152,7 @@ export class CalendarEventController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.UpdateEvent]) + @authorize({permissions: [PermissionKey.UpdateEvent]}) @patch(basePath, { responses: { [STATUS_CODE.OK]: { @@ -179,7 +179,7 @@ export class CalendarEventController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.DeleteEvent]) + @authorize({permissions: [PermissionKey.DeleteEvent]}) @del(basePath, { responses: { [STATUS_CODE.OK]: { diff --git a/services/scheduler-service/src/controllers/calendar-subscription.controller.ts b/services/scheduler-service/src/controllers/calendar-subscription.controller.ts index 616d055d54..5fdf4fca6c 100644 --- a/services/scheduler-service/src/controllers/calendar-subscription.controller.ts +++ b/services/scheduler-service/src/controllers/calendar-subscription.controller.ts @@ -33,7 +33,7 @@ export class CalendarSubscriptionController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewSubscription]) + @authorize({permissions: [PermissionKey.ViewSubscription]}) @get(basePath, { responses: { [STATUS_CODE.OK]: { @@ -59,7 +59,7 @@ export class CalendarSubscriptionController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.CreateSubscription]) + @authorize({permissions: [PermissionKey.CreateSubscription]}) @post(basePath, { responses: { [STATUS_CODE.OK]: { @@ -91,7 +91,7 @@ export class CalendarSubscriptionController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.UpdateSubscription]) + @authorize({permissions: [PermissionKey.UpdateSubscription]}) @patch(basePath, { responses: { [STATUS_CODE.OK]: { @@ -119,7 +119,7 @@ export class CalendarSubscriptionController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.DeleteSubscription]) + @authorize({permissions: [PermissionKey.DeleteSubscription]}) @del(basePath, { responses: { [STATUS_CODE.OK]: { diff --git a/services/scheduler-service/src/controllers/calendar-working-hour.controller.ts b/services/scheduler-service/src/controllers/calendar-working-hour.controller.ts index 5855828b79..fe5cbae460 100644 --- a/services/scheduler-service/src/controllers/calendar-working-hour.controller.ts +++ b/services/scheduler-service/src/controllers/calendar-working-hour.controller.ts @@ -33,7 +33,7 @@ export class CalendarWorkingHourController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewWorkingHour]) + @authorize({permissions: [PermissionKey.ViewWorkingHour]}) @get(basePath, { responses: { [STATUS_CODE.OK]: { @@ -56,7 +56,7 @@ export class CalendarWorkingHourController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.CreateWorkingHour]) + @authorize({permissions: [PermissionKey.CreateWorkingHour]}) @post(basePath, { responses: { [STATUS_CODE.OK]: { @@ -88,7 +88,7 @@ export class CalendarWorkingHourController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.UpdateWorkingHour]) + @authorize({permissions: [PermissionKey.UpdateWorkingHour]}) @patch(basePath, { responses: { [STATUS_CODE.OK]: { @@ -116,7 +116,7 @@ export class CalendarWorkingHourController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.DeleteWorkingHour]) + @authorize({permissions: [PermissionKey.DeleteWorkingHour]}) @del(basePath, { responses: { [STATUS_CODE.OK]: { diff --git a/services/scheduler-service/src/controllers/calendar.controller.ts b/services/scheduler-service/src/controllers/calendar.controller.ts index 08eb236884..fd8c231d05 100644 --- a/services/scheduler-service/src/controllers/calendar.controller.ts +++ b/services/scheduler-service/src/controllers/calendar.controller.ts @@ -66,7 +66,7 @@ export class CalendarController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.CreateCalendar]) + @authorize({permissions: [PermissionKey.CreateCalendar]}) @post(basePath, { responses: { [STATUS_CODE.OK]: { @@ -94,7 +94,7 @@ export class CalendarController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.CreateCalendar]) + @authorize({permissions: [PermissionKey.CreateCalendar]}) @post('/calendars/calendarSubscription', { responses: { [STATUS_CODE.OK]: { @@ -167,7 +167,7 @@ export class CalendarController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewCalendar]) + @authorize({permissions: [PermissionKey.ViewCalendar]}) @get(`${basePath}/count`, { responses: { [STATUS_CODE.OK]: { @@ -183,7 +183,7 @@ export class CalendarController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewCalendar]) + @authorize({permissions: [PermissionKey.ViewCalendar]}) @get(basePath, { responses: { [STATUS_CODE.OK]: { @@ -208,7 +208,7 @@ export class CalendarController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.UpdateCalendar]) + @authorize({permissions: [PermissionKey.UpdateCalendar]}) @patch(basePath, { responses: { [STATUS_CODE.OK]: { @@ -234,7 +234,7 @@ export class CalendarController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewCalendar]) + @authorize({permissions: [PermissionKey.ViewCalendar]}) @get(`${basePath}/{id}`, { responses: { [STATUS_CODE.OK]: { @@ -258,7 +258,7 @@ export class CalendarController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.UpdateCalendar]) + @authorize({permissions: [PermissionKey.UpdateCalendar]}) @patch(`${basePath}/{id}`, { responses: { [STATUS_CODE.NO_CONTENT]: { @@ -283,7 +283,7 @@ export class CalendarController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.UpdateCalendar]) + @authorize({permissions: [PermissionKey.UpdateCalendar]}) @put(`${basePath}/{id}`, { responses: { [STATUS_CODE.NO_CONTENT]: { @@ -325,7 +325,7 @@ export class CalendarController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.DeleteCalendar]) + @authorize({permissions: [PermissionKey.DeleteCalendar]}) @del(`${basePath}/{id}`, { responses: { [STATUS_CODE.NO_CONTENT]: { diff --git a/services/scheduler-service/src/controllers/event-attachment.controller.ts b/services/scheduler-service/src/controllers/event-attachment.controller.ts index 67e1e8c8a3..8cd1cac0d0 100644 --- a/services/scheduler-service/src/controllers/event-attachment.controller.ts +++ b/services/scheduler-service/src/controllers/event-attachment.controller.ts @@ -32,7 +32,7 @@ export class EventAttachmentController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewAttachment]) + @authorize({permissions: [PermissionKey.ViewAttachment]}) @get(basePath, { responses: { [STATUS_CODE.OK]: { @@ -55,7 +55,7 @@ export class EventAttachmentController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.CreateAttachment]) + @authorize({permissions: [PermissionKey.CreateAttachment]}) @post(basePath, { responses: { [STATUS_CODE.OK]: { @@ -87,7 +87,7 @@ export class EventAttachmentController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.UpdateAttachment]) + @authorize({permissions: [PermissionKey.UpdateAttachment]}) @patch(basePath, { responses: { [STATUS_CODE.OK]: { @@ -115,7 +115,7 @@ export class EventAttachmentController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.DeleteAttachment]) + @authorize({permissions: [PermissionKey.DeleteAttachment]}) @del(basePath, { responses: { [STATUS_CODE.OK]: { diff --git a/services/scheduler-service/src/controllers/event-attendee.controller.ts b/services/scheduler-service/src/controllers/event-attendee.controller.ts index da687330cb..3b64b77642 100644 --- a/services/scheduler-service/src/controllers/event-attendee.controller.ts +++ b/services/scheduler-service/src/controllers/event-attendee.controller.ts @@ -32,7 +32,7 @@ export class EventAttendeeController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewAttendee]) + @authorize({permissions: [PermissionKey.ViewAttendee]}) @get(basePath, { responses: { [STATUS_CODE.OK]: { @@ -55,7 +55,7 @@ export class EventAttendeeController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.CreateAttendee]) + @authorize({permissions: [PermissionKey.CreateAttendee]}) @post(basePath, { responses: { [STATUS_CODE.OK]: { @@ -87,7 +87,7 @@ export class EventAttendeeController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.UpdateAttendee]) + @authorize({permissions: [PermissionKey.UpdateAttendee]}) @patch(basePath, { responses: { [STATUS_CODE.OK]: { @@ -115,7 +115,7 @@ export class EventAttendeeController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.DeleteAttendee]) + @authorize({permissions: [PermissionKey.DeleteAttendee]}) @del(basePath, { responses: { [STATUS_CODE.OK]: { diff --git a/services/scheduler-service/src/controllers/event.controller.ts b/services/scheduler-service/src/controllers/event.controller.ts index ec4ee9d493..d26b591201 100644 --- a/services/scheduler-service/src/controllers/event.controller.ts +++ b/services/scheduler-service/src/controllers/event.controller.ts @@ -54,7 +54,7 @@ export class EventController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.CreateEvent]) + @authorize({permissions: [PermissionKey.CreateEvent]}) @post(basePath, { responses: { [STATUS_CODE.OK]: { @@ -117,7 +117,9 @@ export class EventController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewEvent, PermissionKey.ViewAttendee]) + @authorize({ + permissions: [PermissionKey.ViewEvent, PermissionKey.ViewAttendee], + }) @get('/events/freeBusy') async getFeeBusyStatus( @requestBody({ @@ -171,7 +173,7 @@ export class EventController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewEvent]) + @authorize({permissions: [PermissionKey.ViewEvent]}) @get(`${basePath}/count`, { responses: { [STATUS_CODE.OK]: { @@ -187,7 +189,7 @@ export class EventController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewEvent]) + @authorize({permissions: [PermissionKey.ViewEvent]}) @get(basePath, { responses: { [STATUS_CODE.OK]: { @@ -230,7 +232,7 @@ export class EventController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.UpdateEvent]) + @authorize({permissions: [PermissionKey.UpdateEvent]}) @patch(basePath, { responses: { [STATUS_CODE.OK]: { @@ -256,7 +258,7 @@ export class EventController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewEvent]) + @authorize({permissions: [PermissionKey.ViewEvent]}) @get(`${basePath}/{id}`, { responses: { [STATUS_CODE.OK]: { @@ -280,7 +282,7 @@ export class EventController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.UpdateEvent]) + @authorize({permissions: [PermissionKey.UpdateEvent]}) @patch(`${basePath}/{id}`, { responses: { [STATUS_CODE.NO_CONTENT]: { @@ -305,7 +307,7 @@ export class EventController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.UpdateEvent]) + @authorize({permissions: [PermissionKey.UpdateEvent]}) @put(`${basePath}/{id}`, { responses: { [STATUS_CODE.NO_CONTENT]: { @@ -323,7 +325,7 @@ export class EventController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.DeleteEvent]) + @authorize({permissions: [PermissionKey.DeleteEvent]}) @del(`${basePath}/{id}`, { responses: { [STATUS_CODE.NO_CONTENT]: { diff --git a/services/scheduler-service/src/controllers/settings.controller.ts b/services/scheduler-service/src/controllers/settings.controller.ts index 90f5026596..8bcabff495 100644 --- a/services/scheduler-service/src/controllers/settings.controller.ts +++ b/services/scheduler-service/src/controllers/settings.controller.ts @@ -34,7 +34,7 @@ export class SettingsController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.CreateSettings]) + @authorize({permissions: [PermissionKey.CreateSettings]}) @post(basePath, { responses: { [STATUS_CODE.OK]: { @@ -62,7 +62,7 @@ export class SettingsController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewSettings]) + @authorize({permissions: [PermissionKey.ViewSettings]}) @get(`${basePath}/count`, { responses: { [STATUS_CODE.OK]: { @@ -78,7 +78,7 @@ export class SettingsController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewSettings]) + @authorize({permissions: [PermissionKey.ViewSettings]}) @get(basePath, { responses: { [STATUS_CODE.OK]: { @@ -103,7 +103,7 @@ export class SettingsController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.UpdateSettings]) + @authorize({permissions: [PermissionKey.UpdateSettings]}) @patch(basePath, { responses: { [STATUS_CODE.OK]: { @@ -129,7 +129,7 @@ export class SettingsController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewSettings]) + @authorize({permissions: [PermissionKey.ViewSettings]}) @get(`${basePath}/{id}`, { responses: { [STATUS_CODE.OK]: { @@ -153,7 +153,7 @@ export class SettingsController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.UpdateSettings]) + @authorize({permissions: [PermissionKey.UpdateSettings]}) @patch(`${basePath}/{id}`, { responses: { [STATUS_CODE.NO_CONTENT]: { @@ -178,7 +178,7 @@ export class SettingsController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.UpdateSettings]) + @authorize({permissions: [PermissionKey.UpdateSettings]}) @put(`${basePath}/{id}`, { responses: { [STATUS_CODE.NO_CONTENT]: { @@ -196,7 +196,7 @@ export class SettingsController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.DeleteSettings]) + @authorize({permissions: [PermissionKey.DeleteSettings]}) @del(`${basePath}/{id}`, { responses: { [STATUS_CODE.NO_CONTENT]: { diff --git a/services/scheduler-service/src/controllers/subscription.controller.ts b/services/scheduler-service/src/controllers/subscription.controller.ts index aff37d149b..af2ed759c2 100644 --- a/services/scheduler-service/src/controllers/subscription.controller.ts +++ b/services/scheduler-service/src/controllers/subscription.controller.ts @@ -54,7 +54,7 @@ export class SubscriptionController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.CreateSubscription]) + @authorize({permissions: [PermissionKey.CreateSubscription]}) @post(basePath, { responses: { [STATUS_CODE.OK]: { @@ -84,7 +84,7 @@ export class SubscriptionController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewSubscription]) + @authorize({permissions: [PermissionKey.ViewSubscription]}) @get(`${basePath}/count`, { responses: { [STATUS_CODE.OK]: { @@ -102,7 +102,7 @@ export class SubscriptionController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewSubscription]) + @authorize({permissions: [PermissionKey.ViewSubscription]}) @get('calendars/subscriptions/me', { responses: { [STATUS_CODE.OK]: { @@ -143,7 +143,7 @@ export class SubscriptionController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewSubscription]) + @authorize({permissions: [PermissionKey.ViewSubscription]}) @get(basePath, { responses: { [STATUS_CODE.OK]: { @@ -168,7 +168,7 @@ export class SubscriptionController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.UpdateSubscription]) + @authorize({permissions: [PermissionKey.UpdateSubscription]}) @patch(basePath, { responses: { [STATUS_CODE.OK]: { @@ -194,7 +194,7 @@ export class SubscriptionController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewSubscription]) + @authorize({permissions: [PermissionKey.ViewSubscription]}) @get(`${basePath}/{id}`, { responses: { [STATUS_CODE.OK]: { @@ -218,7 +218,7 @@ export class SubscriptionController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.UpdateSubscription]) + @authorize({permissions: [PermissionKey.UpdateSubscription]}) @patch(`${basePath}/{id}`, { responses: { [STATUS_CODE.NO_CONTENT]: { @@ -243,7 +243,7 @@ export class SubscriptionController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.UpdateSubscription]) + @authorize({permissions: [PermissionKey.UpdateSubscription]}) @put(`${basePath}/{id}`, { responses: { [STATUS_CODE.NO_CONTENT]: { @@ -261,7 +261,7 @@ export class SubscriptionController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.DeleteSubscription]) + @authorize({permissions: [PermissionKey.DeleteSubscription]}) @del(`${basePath}/{id}`, { responses: { [STATUS_CODE.NO_CONTENT]: { diff --git a/services/scheduler-service/src/controllers/theme.controller.ts b/services/scheduler-service/src/controllers/theme.controller.ts index 73dd3f7201..c7d8c7728e 100644 --- a/services/scheduler-service/src/controllers/theme.controller.ts +++ b/services/scheduler-service/src/controllers/theme.controller.ts @@ -34,7 +34,7 @@ export class ThemeController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.CreateTheme]) + @authorize({permissions: [PermissionKey.CreateTheme]}) @post(basePath, { responses: { [STATUS_CODE.OK]: { @@ -62,7 +62,7 @@ export class ThemeController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewTheme]) + @authorize({permissions: [PermissionKey.ViewTheme]}) @get(`${basePath}/count`, { responses: { [STATUS_CODE.OK]: { @@ -78,7 +78,7 @@ export class ThemeController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewTheme]) + @authorize({permissions: [PermissionKey.ViewTheme]}) @get(basePath, { responses: { [STATUS_CODE.OK]: { @@ -101,7 +101,7 @@ export class ThemeController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.UpdateTheme]) + @authorize({permissions: [PermissionKey.UpdateTheme]}) @patch(basePath, { responses: { [STATUS_CODE.OK]: { @@ -127,7 +127,7 @@ export class ThemeController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewTheme]) + @authorize({permissions: [PermissionKey.ViewTheme]}) @get(`${basePath}/{id}`, { responses: { [STATUS_CODE.OK]: { @@ -151,7 +151,7 @@ export class ThemeController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.UpdateTheme]) + @authorize({permissions: [PermissionKey.UpdateTheme]}) @patch(`${basePath}/{id}`, { responses: { [STATUS_CODE.NO_CONTENT]: { @@ -176,7 +176,7 @@ export class ThemeController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.UpdateTheme]) + @authorize({permissions: [PermissionKey.UpdateTheme]}) @put(`${basePath}/{id}`, { responses: { [STATUS_CODE.NO_CONTENT]: { @@ -194,7 +194,7 @@ export class ThemeController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.DeleteTheme]) + @authorize({permissions: [PermissionKey.DeleteTheme]}) @del(`${basePath}/{id}`, { responses: { [STATUS_CODE.NO_CONTENT]: { diff --git a/services/scheduler-service/src/controllers/working-hour.controller.ts b/services/scheduler-service/src/controllers/working-hour.controller.ts index 12e19805f7..6835092d56 100644 --- a/services/scheduler-service/src/controllers/working-hour.controller.ts +++ b/services/scheduler-service/src/controllers/working-hour.controller.ts @@ -34,7 +34,7 @@ export class WorkingHourController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.CreateWorkingHour]) + @authorize({permissions: [PermissionKey.CreateWorkingHour]}) @post(basePath, { responses: { [STATUS_CODE.OK]: { @@ -64,7 +64,7 @@ export class WorkingHourController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewWorkingHour]) + @authorize({permissions: [PermissionKey.ViewWorkingHour]}) @get(`${basePath}/count`, { responses: { [STATUS_CODE.OK]: { @@ -82,7 +82,7 @@ export class WorkingHourController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewWorkingHour]) + @authorize({permissions: [PermissionKey.ViewWorkingHour]}) @get(basePath, { responses: { [STATUS_CODE.OK]: { @@ -107,7 +107,7 @@ export class WorkingHourController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.UpdateWorkingHour]) + @authorize({permissions: [PermissionKey.UpdateWorkingHour]}) @patch(basePath, { responses: { [STATUS_CODE.OK]: { @@ -133,7 +133,7 @@ export class WorkingHourController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.ViewWorkingHour]) + @authorize({permissions: [PermissionKey.ViewWorkingHour]}) @get(`${basePath}/{id}`, { responses: { [STATUS_CODE.OK]: { @@ -157,7 +157,7 @@ export class WorkingHourController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.UpdateWorkingHour]) + @authorize({permissions: [PermissionKey.UpdateWorkingHour]}) @patch(`${basePath}/{id}`, { responses: { [STATUS_CODE.NO_CONTENT]: { @@ -182,7 +182,7 @@ export class WorkingHourController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.UpdateWorkingHour]) + @authorize({permissions: [PermissionKey.UpdateWorkingHour]}) @put(`${basePath}/{id}`, { responses: { [STATUS_CODE.NO_CONTENT]: { @@ -200,7 +200,7 @@ export class WorkingHourController { @authenticate(STRATEGY.BEARER, { passReqToCallback: true, }) - @authorize([PermissionKey.DeleteWorkingHour]) + @authorize({permissions: [PermissionKey.DeleteWorkingHour]}) @del(`${basePath}/{id}`, { responses: { [STATUS_CODE.NO_CONTENT]: { diff --git a/services/video-conferencing-service/package-lock.json b/services/video-conferencing-service/package-lock.json index 251fdc60b0..d629ffba0a 100644 --- a/services/video-conferencing-service/package-lock.json +++ b/services/video-conferencing-service/package-lock.json @@ -570,19 +570,43 @@ } }, "@loopback/context": { - "version": "3.9.4", - "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.9.4.tgz", - "integrity": "sha512-Ch7X5gea3SRDwrJetJ5fthbNFBTcGIwxTMR11dvxrZClQUAOGX3M1LIjXhJq9HFXxVlxavL9Vp6BYL2Gg0QLMQ==", + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.13.0.tgz", + "integrity": "sha512-3R+6Mxm2QOAW8cjhEPaxP3i+uj1y9vkW7Ie91kuFa16yVHgOMrxPkcBmxduH5x4Cd1ZEKmtR/iVTfvRKoBYVxA==", "requires": { - "@loopback/metadata": "^2.2.4", + "@loopback/metadata": "^3.0.3", "@types/debug": "^4.1.5", - "debug": "^4.1.1", + "debug": "^4.2.0", "hyperid": "^2.0.5", "p-event": "^4.2.0", - "tslib": "^2.0.0", - "uuid": "^8.3.0" + "tslib": "^2.0.3", + "uuid": "^8.3.1" }, "dependencies": { + "@loopback/metadata": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-3.0.3.tgz", + "integrity": "sha512-VsY3XfQC42Icne5d4wrRgXAEWTmaC9xhzM8e9CmPlYvONfUG3HGPiUIIPWQYElN4IW+hhW56vId4pNI2vh974A==", + "requires": { + "debug": "^4.2.0", + "lodash": "^4.17.20", + "reflect-metadata": "^0.1.13", + "tslib": "^2.0.3" + } + }, + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + }, "p-event": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/p-event/-/p-event-4.2.0.tgz", @@ -600,14 +624,14 @@ } }, "tslib": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", - "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" }, "uuid": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.0.tgz", - "integrity": "sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ==" + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", + "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==" } } }, @@ -712,20 +736,33 @@ } }, "@loopback/metadata": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-2.2.4.tgz", - "integrity": "sha512-sU4xPhxZSsJeWdw3oO2dWjqq6BR1Sb+Rx6W9xhHEDPVGaor5ae8unIcIpK6tnRdt6yjK22s295ao18lE2S3BJA==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-3.0.3.tgz", + "integrity": "sha512-VsY3XfQC42Icne5d4wrRgXAEWTmaC9xhzM8e9CmPlYvONfUG3HGPiUIIPWQYElN4IW+hhW56vId4pNI2vh974A==", "requires": { - "debug": "^4.1.1", - "lodash": "^4.17.19", + "debug": "^4.2.0", + "lodash": "^4.17.20", "reflect-metadata": "^0.1.13", - "tslib": "^2.0.0" + "tslib": "^2.0.3" }, "dependencies": { + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + }, "tslib": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", - "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" } } }, @@ -1192,12 +1229,12 @@ "dev": true }, "@sourceloop/core": { - "version": "1.0.0-alpha.8", - "resolved": "https://registry.npmjs.org/@sourceloop/core/-/core-1.0.0-alpha.8.tgz", - "integrity": "sha512-P6a4Gx6dwZqEzRoPvo6xM4kona8sf9BfN2JUL8CiJz6K9yuTbbuU6n/IXzYPbzez5Wz+zl3tzsGf8f4wIgc3KQ==", + "version": "1.0.0-alpha.14", + "resolved": "https://registry.npmjs.org/@sourceloop/core/-/core-1.0.0-alpha.14.tgz", + "integrity": "sha512-sOckHOfjLjpv8qJ/7mZx7+5LORsSUy8oPU1QFCMi/SiKnYG7jUQknN4HUk98qODIxaShtPHo3DLyCo7/Z0rQLA==", "requires": { "@loopback/boot": "^2.3.1", - "@loopback/context": "^3.8.1", + "@loopback/context": "^3.9.4", "@loopback/core": "^2.7.0", "@loopback/repository": "^2.5.1", "@loopback/rest": "^5.0.1", @@ -1218,62 +1255,30 @@ "winston": "^3.2.1" }, "dependencies": { - "@loopback/metadata": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-2.2.4.tgz", - "integrity": "sha512-sU4xPhxZSsJeWdw3oO2dWjqq6BR1Sb+Rx6W9xhHEDPVGaor5ae8unIcIpK6tnRdt6yjK22s295ao18lE2S3BJA==", - "requires": { - "debug": "^4.1.1", - "lodash": "^4.17.19", - "reflect-metadata": "^0.1.13", - "tslib": "^2.0.0" - }, - "dependencies": { - "tslib": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", - "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" - } - } - }, "@loopback/service-proxy": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/@loopback/service-proxy/-/service-proxy-2.3.6.tgz", - "integrity": "sha512-Xr7tFU4X0jf68nyzQP9BJviU9+gHUA/d9fBBu/phqVHoJjklBUJqdHVmpv/ydRyTzPi8mfitmjCVJGeB47UopQ==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/@loopback/service-proxy/-/service-proxy-2.3.8.tgz", + "integrity": "sha512-WRErlDsmDSC+4wb+2J0u8hdNKoYxX6jXNzhSvZ2DPp7oubZPC8LeKcjMr1nNWkdT9vEbJYmoQP4kUC6LCDFfnQ==", "requires": { - "@loopback/core": "^2.9.3", + "@loopback/core": "^2.9.5", "loopback-datasource-juggler": "^4.24.0", - "tslib": "^2.0.0" + "tslib": "^2.0.1" }, "dependencies": { - "@loopback/context": { - "version": "3.9.4", - "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.9.4.tgz", - "integrity": "sha512-Ch7X5gea3SRDwrJetJ5fthbNFBTcGIwxTMR11dvxrZClQUAOGX3M1LIjXhJq9HFXxVlxavL9Vp6BYL2Gg0QLMQ==", - "requires": { - "@loopback/metadata": "^2.2.4", - "@types/debug": "^4.1.5", - "debug": "^4.1.1", - "hyperid": "^2.0.5", - "p-event": "^4.2.0", - "tslib": "^2.0.0", - "uuid": "^8.3.0" - } - }, "@loopback/core": { - "version": "2.9.3", - "resolved": "https://registry.npmjs.org/@loopback/core/-/core-2.9.3.tgz", - "integrity": "sha512-Wjun6YprRp6Ay0OMP/+IEx9IMnlk1r+XPkkmfrcbv3mbkEh+JSdOmjv6plWbzpllnZwkYII1C41C7bdgDm7BCw==", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@loopback/core/-/core-2.12.0.tgz", + "integrity": "sha512-kdJZzIF7PA9TjnKoEtfhn2G41stmS8gIsweJAbiG7i+S4REbZLGR4KBHzDtSyfeeDCcxayouGzKwi/BT8gWDgQ==", "requires": { - "@loopback/context": "^3.9.4", - "debug": "^4.1.1", - "tslib": "^2.0.0" + "@loopback/context": "^3.13.0", + "debug": "^4.2.0", + "tslib": "^2.0.3" } }, "loopback-datasource-juggler": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/loopback-datasource-juggler/-/loopback-datasource-juggler-4.24.0.tgz", - "integrity": "sha512-v4UwAdSzsOVnRicBk6BuUjkwxk7TuJHUkbpXQxlVjSZCYx2WpSzapuEuhBIWUtoY5JMsE2S+xArl2qqrnSg3KA==", + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/loopback-datasource-juggler/-/loopback-datasource-juggler-4.26.0.tgz", + "integrity": "sha512-/R40jUGDrnRBgTh121L4Y7sHDF0KxbgSAN4gLJKp8xGNQ6KpkSQyqZkmap98eN7B75RES78DS3MGghsYMvAJ3Q==", "requires": { "async": "^3.1.0", "change-case": "^4.1.1", @@ -1281,29 +1286,56 @@ "depd": "^2.0.0", "inflection": "^1.6.0", "lodash": "^4.17.11", - "loopback-connector": "^4.4.0", + "loopback-connector": "^5.0.0", "minimatch": "^3.0.3", "qs": "^6.5.0", "shortid": "^2.2.6", - "strong-globalize": "^5.0.2", + "strong-globalize": "^6.0.5", "traverse": "^0.6.6", - "uuid": "^7.0.0" - }, - "dependencies": { - "uuid": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz", - "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==" - } + "uuid": "^8.3.1" } }, "tslib": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", - "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" } } }, + "cldrjs": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/cldrjs/-/cldrjs-0.5.5.tgz", + "integrity": "sha512-KDwzwbmLIPfCgd8JERVDpQKrUUM1U4KpFJJg2IROv89rF172lLufoJnqJ/Wea6fXL5bO6WjuLMzY8V52UWPvkA==" + }, + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" + } + }, + "globalize": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/globalize/-/globalize-1.6.0.tgz", + "integrity": "sha512-MTuAU3Tnbtga8PvxbpSPdQNIs6K5UdATWIuarWJK2Z3e1DghXpxb/GmShSVagzHqCOYgZr7N/Hi7D1mrHG30jQ==", + "requires": { + "cldrjs": "^0.5.4" + } + }, + "loopback-connector": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/loopback-connector/-/loopback-connector-5.0.1.tgz", + "integrity": "sha512-aSPT6x5WZdoW9ylyNE4CxGqFbIqC9cSEZJwWkCincso27PXlZPj52POoF6pgxug9mkH7MrbXuP3SSDLkLq5oQQ==", + "requires": { + "async": "^3.2.0", + "bluebird": "^3.7.2", + "debug": "^4.1.1", + "msgpack5": "^4.2.0", + "strong-globalize": "^6.0.4", + "uuid": "^8.3.0" + } + }, "loopback4-authentication": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/loopback4-authentication/-/loopback4-authentication-4.0.1.tgz", @@ -1318,37 +1350,14 @@ "passport-http-bearer": "^1.0.1", "passport-local": "^1.0.0", "passport-oauth2-client-password": "^0.1.2" - }, - "dependencies": { - "@loopback/context": { - "version": "3.9.4", - "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.9.4.tgz", - "integrity": "sha512-Ch7X5gea3SRDwrJetJ5fthbNFBTcGIwxTMR11dvxrZClQUAOGX3M1LIjXhJq9HFXxVlxavL9Vp6BYL2Gg0QLMQ==", - "requires": { - "@loopback/metadata": "^2.2.4", - "@types/debug": "^4.1.5", - "debug": "^4.1.1", - "hyperid": "^2.0.5", - "p-event": "^4.2.0", - "tslib": "^2.0.0", - "uuid": "^8.3.0" - } - }, - "@loopback/core": { - "version": "2.9.3", - "resolved": "https://registry.npmjs.org/@loopback/core/-/core-2.9.3.tgz", - "integrity": "sha512-Wjun6YprRp6Ay0OMP/+IEx9IMnlk1r+XPkkmfrcbv3mbkEh+JSdOmjv6plWbzpllnZwkYII1C41C7bdgDm7BCw==", - "requires": { - "@loopback/context": "^3.9.4", - "debug": "^4.1.1", - "tslib": "^2.0.0" - } - }, - "tslib": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", - "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" - } + } + }, + "loopback4-authorization": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/loopback4-authorization/-/loopback4-authorization-2.3.2.tgz", + "integrity": "sha512-9vMmcqRFWQOsAv1iocsWuZKkM33DUGmelGu6rQy7zsEAUnP5XgiRBJSUVZ/wbZnCbPvz9UughtBEHY7FzpCj6Q==", + "requires": { + "lodash": "^4.17.11" } }, "loopback4-soft-delete": { @@ -1359,21 +1368,20 @@ "@loopback/core": "^2.7.0" } }, - "p-event": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/p-event/-/p-event-4.2.0.tgz", - "integrity": "sha512-KXatOjCRXXkSePPb1Nbi0p0m+gQAwdlbhi4wQKJPI1HsMQS9g+Sqp2o+QHziPr7eYJyOZet836KoHEVM1mwOrQ==", + "md5": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz", + "integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==", "requires": { - "p-timeout": "^3.1.0" + "charenc": "0.0.2", + "crypt": "0.0.2", + "is-buffer": "~1.1.6" } }, - "p-timeout": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", - "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", - "requires": { - "p-finally": "^1.0.0" - } + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" }, "readable-stream": { "version": "3.6.0", @@ -1385,10 +1393,32 @@ "util-deprecate": "^1.0.1" } }, + "strong-globalize": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/strong-globalize/-/strong-globalize-6.0.5.tgz", + "integrity": "sha512-7nfUli41TieV9/TSc0N62ve5Q4nfrpy/T0nNNy6TyD3vst79QWmeylCyd3q1gDxh8dqGEtabLNCdPQP1Iuvecw==", + "requires": { + "accept-language": "^3.0.18", + "debug": "^4.2.0", + "globalize": "^1.6.0", + "lodash": "^4.17.20", + "md5": "^2.3.0", + "mkdirp": "^1.0.4", + "os-locale": "^5.0.0", + "yamljs": "^0.3.0" + }, + "dependencies": { + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + } + } + }, "uuid": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.0.tgz", - "integrity": "sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ==" + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", + "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==" }, "winston": { "version": "3.3.3", @@ -1502,9 +1532,9 @@ } }, "@types/glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-VgNIkxK+j7Nz5P7jvUZlRvhuPSmsEfS03b0alKcq5V/STUKAa3Plemsn5mrQUO7am6OErJ4rhGEGJbACclrtRA==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w==", "requires": { "@types/minimatch": "*", "@types/node": "*" @@ -1570,6 +1600,20 @@ "resolved": "https://registry.npmjs.org/@types/opentok/-/opentok-2.9.0.tgz", "integrity": "sha512-+VwKq65XbGN7GNK7RHIOWBnsLh1Hr7A6obEjMqLhLQmdzZw1EnrKFlAqCoLrkrIK60eorB8pbooOi+iS5WIx9Q==" }, + "@types/pg": { + "version": "7.14.6", + "resolved": "https://registry.npmjs.org/@types/pg/-/pg-7.14.6.tgz", + "integrity": "sha512-mf6kYvuYS2CObDxtsw5imE4vOvq+XHJtiJNFXir/fn9nxZtIFQ3/ECpokm8fNkxKBh7nQhyegHwNg1NIW+yYJA==", + "requires": { + "@types/node": "*", + "@types/pg-types": "*" + } + }, + "@types/pg-types": { + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/@types/pg-types/-/pg-types-1.11.5.tgz", + "integrity": "sha512-L8ogeT6vDzT1vxlW3KITTCt+BVXXVkLXfZ/XNm6UqbcJgxf+KPO7yjWx7dQQE8RW07KopL10x2gNMs41+IkMGQ==" + }, "@types/qs": { "version": "6.9.3", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.3.tgz", @@ -1883,6 +1927,11 @@ "array-filter": "^1.0.0" } }, + "await-lock": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/await-lock/-/await-lock-2.1.0.tgz", + "integrity": "sha512-t7Zm5YGgEEc/3eYAicF32m/TNvL+XOeYZy9CvBUeJY/szM7frLolFylhrlZNWV/ohWhcUXygrBGjYmoQdxF4CQ==" + }, "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -2059,7 +2108,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, "requires": { "fill-range": "^7.0.1" } @@ -2177,6 +2225,27 @@ "upper-case-first": "^2.0.1" } }, + "casbin": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/casbin/-/casbin-5.2.0.tgz", + "integrity": "sha512-9qqcTAx0ysgF6xz1Mq83B7yD9inG4iEZ85tMZBmkXCIsECD9yAE8XhaONn7GhlnTave10k3ktGJ+9qNItXe30A==", + "requires": { + "await-lock": "^2.0.1", + "expression-eval": "^2.0.0", + "ip": "^1.1.5", + "micromatch": "^4.0.2" + } + }, + "casbin-pg-adapter": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/casbin-pg-adapter/-/casbin-pg-adapter-1.4.0.tgz", + "integrity": "sha512-9T0i+t0XwdnsBFl+20ojAED9+05SN4haJDLOJTUh9liHO+yBi6SXwSboD0MLzserFkxCs8VJJ+BNJlavExlU+A==", + "requires": { + "casbin": "^5.0.4", + "node-pg-migrate": "^5.1.0", + "pg": "^8.2.1" + } + }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -2361,9 +2430,9 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, "color-string": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.3.tgz", - "integrity": "sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==", + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.4.tgz", + "integrity": "sha512-57yF5yt8Xa3czSEW1jfQDE79Idk0+AkN/4KWad6tbdxUmAs3MvjxlWSWD4deYytcRfoZ9nhKyFl1kj5tBvidbw==", "requires": { "color-name": "^1.0.0", "simple-swizzle": "^0.2.2" @@ -2976,6 +3045,11 @@ "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", "dev": true }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -3322,6 +3396,14 @@ "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-5.1.3.tgz", "integrity": "sha512-TINcxve5510pXj4n9/1AMupkj3iWxl3JuZaWhCdYDlZeoCPqweGZrxbrlqTCFb1CT5wli7s8e2SH/Qz2c9GorA==" }, + "expression-eval": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/expression-eval/-/expression-eval-2.1.0.tgz", + "integrity": "sha512-FUJO/Akvl/JOWkvlqZaqbkhsEWlCJWDeZG4tzX96UH68D9FeRgYgtb55C2qtqbORC0Q6x5419EDjWu4IT9kQfg==", + "requires": { + "jsep": "^0.3.0" + } + }, "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -3409,7 +3491,6 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, "requires": { "to-regex-range": "^5.0.1" } @@ -4095,21 +4176,34 @@ "integrity": "sha512-CYdFeFexxhv/Bcny+Q0BfOV+ltRlJcd4BBZBYFX/O0u4npJrgZtIcjokegtiSMAvlMTJ+Koq0GBCc//3bueQxw==" }, "ioredis": { - "version": "4.17.3", - "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-4.17.3.tgz", - "integrity": "sha512-iRvq4BOYzNFkDnSyhx7cmJNOi1x/HWYe+A4VXHBu4qpwJaGT1Mp+D2bVGJntH9K/Z/GeOM/Nprb8gB3bmitz1Q==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-4.19.2.tgz", + "integrity": "sha512-SZSIwMrbd96b7rJvJwyTWSP6XQ0m1kAIIqBnwglJKrIJ6na7TeY4F2EV2vDY0xm/fLrUY8cEg81dR7kVFt2sKA==", "requires": { "cluster-key-slot": "^1.1.0", "debug": "^4.1.1", "denque": "^1.1.0", "lodash.defaults": "^4.2.0", "lodash.flatten": "^4.4.0", - "redis-commands": "1.5.0", + "p-map": "^2.1.0", + "redis-commands": "1.6.0", "redis-errors": "^1.2.0", "redis-parser": "^3.0.0", "standard-as-callback": "^2.0.1" + }, + "dependencies": { + "p-map": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==" + } } }, + "ip": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" + }, "ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -4187,8 +4281,7 @@ "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" }, "is-number-object": { "version": "1.0.4", @@ -4444,6 +4537,11 @@ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, + "jsep": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/jsep/-/jsep-0.3.5.tgz", + "integrity": "sha512-AoRLBDc6JNnKjNcmonituEABS5bcfqDhQAWWXNTFrqu6nVXBpBAGfcoTGZMFlIrh9FjmE1CQyX9CTNwZrXMMDA==" + }, "jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -5148,11 +5246,14 @@ } }, "loopback4-authorization": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/loopback4-authorization/-/loopback4-authorization-2.3.2.tgz", - "integrity": "sha512-9vMmcqRFWQOsAv1iocsWuZKkM33DUGmelGu6rQy7zsEAUnP5XgiRBJSUVZ/wbZnCbPvz9UughtBEHY7FzpCj6Q==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/loopback4-authorization/-/loopback4-authorization-3.1.1.tgz", + "integrity": "sha512-qcFRNnJsMwpUZwszaRftQ5rJUaU3p/0iO/gx/1ifaLeBfnTJ0t8lMYUGU1xnOU2ya8VTvauHJgx0gwCSnoWlbQ==", "requires": { - "lodash": "^4.17.11" + "@loopback/core": "^2.9.2", + "casbin": "^5.1.5", + "casbin-pg-adapter": "^1.4.0", + "lodash": "^4.17.19" } }, "loopback4-helmet": { @@ -5288,58 +5389,87 @@ }, "dependencies": { "@loopback/context": { - "version": "3.9.4", - "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.9.4.tgz", - "integrity": "sha512-Ch7X5gea3SRDwrJetJ5fthbNFBTcGIwxTMR11dvxrZClQUAOGX3M1LIjXhJq9HFXxVlxavL9Vp6BYL2Gg0QLMQ==", + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.13.0.tgz", + "integrity": "sha512-3R+6Mxm2QOAW8cjhEPaxP3i+uj1y9vkW7Ie91kuFa16yVHgOMrxPkcBmxduH5x4Cd1ZEKmtR/iVTfvRKoBYVxA==", "requires": { - "@loopback/metadata": "^2.2.4", + "@loopback/metadata": "^3.0.3", "@types/debug": "^4.1.5", - "debug": "^4.1.1", + "debug": "^4.2.0", "hyperid": "^2.0.5", "p-event": "^4.2.0", - "tslib": "^2.0.0", - "uuid": "^8.3.0" + "tslib": "^2.0.3", + "uuid": "^8.3.1" }, "dependencies": { + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" + } + }, "tslib": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", - "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" } } }, "@loopback/core": { - "version": "2.9.3", - "resolved": "https://registry.npmjs.org/@loopback/core/-/core-2.9.3.tgz", - "integrity": "sha512-Wjun6YprRp6Ay0OMP/+IEx9IMnlk1r+XPkkmfrcbv3mbkEh+JSdOmjv6plWbzpllnZwkYII1C41C7bdgDm7BCw==", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@loopback/core/-/core-2.12.0.tgz", + "integrity": "sha512-kdJZzIF7PA9TjnKoEtfhn2G41stmS8gIsweJAbiG7i+S4REbZLGR4KBHzDtSyfeeDCcxayouGzKwi/BT8gWDgQ==", "requires": { - "@loopback/context": "^3.9.4", - "debug": "^4.1.1", - "tslib": "^2.0.0" + "@loopback/context": "^3.13.0", + "debug": "^4.2.0", + "tslib": "^2.0.3" }, "dependencies": { + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" + } + }, "tslib": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", - "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" } } }, "@loopback/metadata": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-2.2.4.tgz", - "integrity": "sha512-sU4xPhxZSsJeWdw3oO2dWjqq6BR1Sb+Rx6W9xhHEDPVGaor5ae8unIcIpK6tnRdt6yjK22s295ao18lE2S3BJA==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-3.0.3.tgz", + "integrity": "sha512-VsY3XfQC42Icne5d4wrRgXAEWTmaC9xhzM8e9CmPlYvONfUG3HGPiUIIPWQYElN4IW+hhW56vId4pNI2vh974A==", "requires": { - "debug": "^4.1.1", - "lodash": "^4.17.19", + "debug": "^4.2.0", + "lodash": "^4.17.20", "reflect-metadata": "^0.1.13", - "tslib": "^2.0.0" + "tslib": "^2.0.3" }, "dependencies": { + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + }, "tslib": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", - "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" } } }, @@ -5352,9 +5482,9 @@ } }, "uuid": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.0.tgz", - "integrity": "sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ==" + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", + "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==" } } }, @@ -5510,6 +5640,15 @@ "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" }, + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + }, "mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", @@ -5854,6 +5993,95 @@ "resolved": "https://registry.npmjs.org/node-fs/-/node-fs-0.1.7.tgz", "integrity": "sha1-MjI8zLRsn78PwRgS1FAhzDHTJbs=" }, + "node-pg-migrate": { + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/node-pg-migrate/-/node-pg-migrate-5.9.0.tgz", + "integrity": "sha512-FXXPzP45B/Vj7C23j4QFKvUfe+k2fCfGcaVG6LNdJ8powA+f5V9nLuihuPZRlhUb0xIWWxqc2qUKIPPGuGJS5g==", + "requires": { + "@types/pg": "^7.4.0", + "decamelize": "^4.0.0", + "lodash": "~4.17.0", + "mkdirp": "~1.0.0", + "yargs": "~16.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==" + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "y18n": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz", + "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==" + }, + "yargs": { + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.1.0.tgz", + "integrity": "sha512-upWFJOmDdHN0syLuESuvXDmrRcWd1QafJolHskzaw79uZa7/x53gxQKiR07W59GWY1tFhhU/Th9DrtSfpS782g==", + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.2", + "yargs-parser": "^20.2.2" + } + }, + "yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==" + } + } + }, "node-preload": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", @@ -6703,8 +6931,7 @@ "picomatch": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", - "dev": true + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==" }, "pkg-dir": { "version": "4.2.0", @@ -6991,9 +7218,9 @@ } }, "redis-commands": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.5.0.tgz", - "integrity": "sha512-6KxamqpZ468MeQC3bkWmCB1fp56XL64D4Kf0zJSwDZbVLLm7KFkoIcHrgRvQ+sk8dnhySs7+yBg94yIkAK7aJg==" + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.6.0.tgz", + "integrity": "sha512-2jnZ0IkjZxvguITjFTrGiLyzQZcTvaw8DAaCXxZq/dsHXz7KfMQ3OUJy7Tz9vnRtZRVz6VRCPDvruvU8Ts44wQ==" }, "redis-errors": { "version": "1.2.0", @@ -7824,7 +8051,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, "requires": { "is-number": "^7.0.0" } diff --git a/services/video-conferencing-service/package.json b/services/video-conferencing-service/package.json index 83277bc58f..bdc8ce9e76 100644 --- a/services/video-conferencing-service/package.json +++ b/services/video-conferencing-service/package.json @@ -50,6 +50,7 @@ "@loopback/boot": "^2.4.1", "@loopback/context": "^3.9.4", "@loopback/core": "^2.9.3", + "@loopback/metadata": "^3.0.3", "@loopback/openapi-v3": "^3.0.0", "@loopback/repository": "^2.0.0", "@loopback/rest": "^5.0.1", @@ -69,7 +70,7 @@ "dotenv-extended": "^2.8.0", "loopback-connector-postgresql": "^3.9.1", "loopback4-authentication": "^3.0.1", - "loopback4-authorization": "^2.3.2", + "loopback4-authorization": "3.1.1", "loopback4-soft-delete": "^1.3.0", "moment": "^2.26.0", "opentok": "^2.10.0", diff --git a/services/video-conferencing-service/src/controllers/video-chat-archive.controller.ts b/services/video-conferencing-service/src/controllers/video-chat-archive.controller.ts index e4447cdcbe..47b4828502 100644 --- a/services/video-conferencing-service/src/controllers/video-chat-archive.controller.ts +++ b/services/video-conferencing-service/src/controllers/video-chat-archive.controller.ts @@ -25,7 +25,7 @@ export class VideoChatArchiveController { ) {} @authenticate(STRATEGY.BEARER) - @authorize([PermissionKeys.GetArchives]) + @authorize({permissions: [PermissionKeys.GetArchives]}) @get('/archives/{archiveId}', { responses: { [STATUS_CODE.OK]: { @@ -60,7 +60,7 @@ export class VideoChatArchiveController { } @authenticate(STRATEGY.BEARER) - @authorize([PermissionKeys.GetArchives]) + @authorize({permissions: [PermissionKeys.GetArchives]}) @get('/archives', { responses: { [STATUS_CODE.OK]: { @@ -79,7 +79,7 @@ export class VideoChatArchiveController { } @authenticate(STRATEGY.BEARER) - @authorize([PermissionKeys.DeleteArchive]) + @authorize({permissions: [PermissionKeys.DeleteArchive]}) @del('/archives/{archiveId}', { responses: { [STATUS_CODE.OK]: { @@ -116,7 +116,7 @@ export class VideoChatArchiveController { } @authenticate(STRATEGY.BEARER) - @authorize([PermissionKeys.SetUploadTarget]) + @authorize({permissions: [PermissionKeys.SetUploadTarget]}) @put('/archives/storage-target', { responses: { [STATUS_CODE.OK]: { @@ -147,7 +147,7 @@ export class VideoChatArchiveController { } // TO-DO: will do modifications later // @authenticate(STRATEGY.BEARER) - // @authorize([PermissionKeys.SetUploadTarget]) + // @authorize({permissions:[PermissionKeys.SetUploadTarget]}) // @del('/archives/storage-target', { // responses: { // [STATUS_CODE.OK]: { diff --git a/services/video-conferencing-service/src/controllers/video-chat-session.controller.ts b/services/video-conferencing-service/src/controllers/video-chat-session.controller.ts index c0ba3ed2bb..9f22b04120 100644 --- a/services/video-conferencing-service/src/controllers/video-chat-session.controller.ts +++ b/services/video-conferencing-service/src/controllers/video-chat-session.controller.ts @@ -47,7 +47,7 @@ export class VideoChatSessionController { ) {} @authenticate(STRATEGY.BEARER) - @authorize([PermissionKeys.CreateSession]) + @authorize({permissions: [PermissionKeys.CreateSession]}) @post('/session', { responses: { [STATUS_CODE.OK]: { @@ -112,7 +112,7 @@ export class VideoChatSessionController { } @authenticate(STRATEGY.BEARER) - @authorize([PermissionKeys.GenerateToken]) + @authorize({permissions: [PermissionKeys.GenerateToken]}) @post('/session/{meetingLinkId}/token', { responses: { [STATUS_CODE.OK]: { @@ -211,7 +211,7 @@ export class VideoChatSessionController { } @authenticate(STRATEGY.BEARER) - @authorize([PermissionKeys.EditMeeting]) + @authorize({permissions: [PermissionKeys.EditMeeting]}) @patch('/session/{meetingLinkId}', { responses: { [STATUS_CODE.NO_CONTENT]: { @@ -303,7 +303,7 @@ export class VideoChatSessionController { } @authenticate(STRATEGY.BEARER) - @authorize([PermissionKeys.StopMeeting]) + @authorize({permissions: [PermissionKeys.StopMeeting]}) @patch('/session/{meetingLinkId}/end', { responses: { [STATUS_CODE.NO_CONTENT]: { @@ -357,7 +357,7 @@ export class VideoChatSessionController { await this.auditLogRepository.create(auditLogPayload); } - @authorize(['*']) + @authorize({permissions: ['*']}) @post('/webhooks/session', { responses: { [STATUS_CODE.NO_CONTENT]: { @@ -479,7 +479,7 @@ export class VideoChatSessionController { } @authenticate(STRATEGY.BEARER) - @authorize([PermissionKeys.GetAttendees]) + @authorize({permissions: [PermissionKeys.GetAttendees]}) @get('/session/{meetingLinkId}/attendees', { parameters: [{name: 'active', schema: {type: 'string'}, in: 'query'}], responses: {