From 7f520b1bbe946cf3ddbb4334b28a4405545cfcd8 Mon Sep 17 00:00:00 2001 From: AVVS Date: Fri, 26 Oct 2018 10:57:16 -0700 Subject: [PATCH 1/2] fix: updates deps --- package.json | 21 ++-- src/accounts/init-admin.js | 1 - src/actions/remove.js | 4 +- src/auth/oauth/index.js | 2 +- src/auth/oauth/strategies/facebook.js | 17 ++- src/auth/oauth/utils/detach.js | 4 +- src/users.js | 39 +++--- src/utils/get-value.js | 8 ++ test/docker-compose.sentinel.yml | 4 +- test/docker-compose.yml | 4 +- test/suites/amqp.js | 2 +- test/suites/bearer/strategy.js | 2 +- test/suites/getMetadata.js | 10 +- test/suites/list.js | 23 ++-- test/suites/verify.js | 4 +- yarn.lock | 170 ++++++++++++++++---------- 16 files changed, 181 insertions(+), 134 deletions(-) create mode 100644 src/utils/get-value.js diff --git a/package.json b/package.json index 1b20067c3..a8ee8ae4a 100644 --- a/package.json +++ b/package.json @@ -28,9 +28,9 @@ }, "homepage": "https://github.com/makeomatic/ms-users#readme", "dependencies": { - "@microfleet/core": "^12.0.0", + "@microfleet/core": "^13.2.1", "@microfleet/transport-amqp": "^13.1.2", - "@microfleet/validation": "^8.0.0", + "@microfleet/validation": "^8.1.0", "bell": "^9.3.1", "bluebird": "^3.5.2", "bunyan": "^1.8.12", @@ -41,15 +41,16 @@ "dlock": "^8.1.0", "flake-idgen": "^1.1.0", "get-stdin": "^6.0.0", + "get-value": "^3.0.1", "handlebars": "^4.0.12", "hapi": "^17.6.0", - "ioredis": "^4.1.0", + "ioredis": "^4.2.0", "is": "^3.2.1", "jsonwebtoken": "^8.3.0", "jwa": "^1.1.6", "lodash": "^4.17.11", "moment": "^2.22.2", - "ms-conf": "^3.3.0", + "ms-conf": "^3.3.1", "ms-flakeless": "^4.1.0", "ms-mailer-client": "^8.0.1", "ms-mailer-templates": "^1.10.0", @@ -75,10 +76,10 @@ "@babel/plugin-proposal-object-rest-spread": "^7.0.0", "@babel/plugin-transform-strict-mode": "^7.0.0", "@babel/register": "^7.0.0", - "@makeomatic/deploy": "^8.0.1", - "@semantic-release/changelog": "^3.0.0", - "@semantic-release/exec": "^3.1.3", - "@semantic-release/git": "^7.0.4", + "@makeomatic/deploy": "^8.2.3", + "@semantic-release/changelog": "^3.0.1", + "@semantic-release/exec": "^3.3.0", + "@semantic-release/git": "^7.0.5", "apidoc": "^0.17.6", "apidoc-plugin-schema": "^0.1.8", "babel-eslint": "^10.0.1", @@ -87,7 +88,7 @@ "cheerio": "^1.0.0-rc.2", "codecov": "^3.1.0", "cross-env": "^5.2.0", - "eslint": "^5.7.0", + "eslint": "^5.8.0", "eslint-config-makeomatic": "^3.0.0", "eslint-plugin-import": "^2.14.0", "eslint-plugin-mocha": "^5.2.0", @@ -100,7 +101,7 @@ "nyc": "^13.1.0", "puppeteer": "1.4.0", "rimraf": "^2.6.1", - "sinon": "^7.0.0" + "sinon": "^7.1.0" }, "engines": { "node": ">= 8.9.0", diff --git a/src/accounts/init-admin.js b/src/accounts/init-admin.js index bed44ccd1..a716f8bae 100644 --- a/src/accounts/init-admin.js +++ b/src/accounts/init-admin.js @@ -11,7 +11,6 @@ module.exports = function initAccounts() { return Promise .delay(config.initAdminAccountsDelay) .return(accounts) - // @todo use router dispatch, because a schema can contains default params .map((account) => { const userData = { audience, diff --git a/src/actions/remove.js b/src/actions/remove.js index b372689c3..1a643aac1 100644 --- a/src/actions/remove.js +++ b/src/actions/remove.js @@ -1,8 +1,8 @@ const { ActionTransport } = require('@microfleet/core'); const Promise = require('bluebird'); const Errors = require('common-errors'); -const get = require('lodash/get'); const intersection = require('lodash/intersection'); +const get = require('../utils/get-value'); const key = require('../utils/key'); const { getInternalData } = require('../utils/userData'); const getMetadata = require('../utils/getMetadata'); @@ -81,7 +81,7 @@ async function removeUser({ params }) { // remove refs to SSO account for (const provider of SSO_PROVIDERS) { - const uid = get(internal, `${provider}.uid`, false); + const uid = get(internal, `${provider}.uid`, { default: false }); if (uid) { transaction.hdel(USERS_SSO_TO_ID, uid); diff --git a/src/auth/oauth/index.js b/src/auth/oauth/index.js index ea2d3aea5..4c12d86fe 100644 --- a/src/auth/oauth/index.js +++ b/src/auth/oauth/index.js @@ -1,8 +1,8 @@ const Promise = require('bluebird'); const Errors = require('common-errors'); -const get = require('lodash/get'); const partial = require('lodash/partial'); +const get = require('../../utils/get-value'); const getUid = require('./utils/uid'); const refresh = require('./utils/refresh'); const extractJWT = require('./utils/extractJWT'); diff --git a/src/auth/oauth/strategies/facebook.js b/src/auth/oauth/strategies/facebook.js index 7a5042d49..3416e25af 100644 --- a/src/auth/oauth/strategies/facebook.js +++ b/src/auth/oauth/strategies/facebook.js @@ -1,9 +1,9 @@ const Promise = require('bluebird'); const Crypto = require('crypto'); const differenceWith = require('lodash/differenceWith'); -const get = require('lodash/get'); const defaults = require('lodash/defaults'); const Urls = require('../utils/fb-urls'); +const get = require('../../../utils/get-value'); const FIELDS = [ 'id', @@ -46,7 +46,7 @@ function defaultProfileHandler(profile) { credentials.raw = profile; // if we have actual picture - if (get(profile, 'picture.data.is_silhouette', true) === false) { + if (get(profile, 'picture.data.is_silhouette', { default: true }) === false) { credentials.profile.picture = profile.picture.data.url; } @@ -93,12 +93,11 @@ function verifyPermissions(permissions) { function profileFactory(fields, profileHandler = defaultProfileHandler) { return async function obtainProfile(credentials, params, getter) { - // eslint-disable-next-line camelcase - const appsecret_proof = Crypto.createHmac('sha256', this.clientSecret) + const ap = Crypto.createHmac('sha256', this.clientSecret) .update(credentials.token) .digest('hex'); - const requiredPermissions = get(this, 'provider.scope', []); + const requiredPermissions = get(this, 'provider.scope', { default: [] }); const ctx = { fields, credentials, @@ -106,10 +105,10 @@ function profileFactory(fields, profileHandler = defaultProfileHandler) { }; return Promise - .bind(ctx, [getter, { appsecret_proof }]) + .bind(ctx, [getter, { appsecret_proof: ap }]) .spread(fetchPermissions) .tap(verifyPermissions) - .return([getter, { appsecret_proof, fields }]) + .return([getter, { appsecret_proof: ap, fields }]) .spread(fetchProfile) .then(profileHandler); }; @@ -132,8 +131,8 @@ exports.options = (options) => { Urls.setVersion(apiVersion); } - const fields = get(options, 'fields', FIELDS); - const profileHandler = get(options, 'profileHandler', defaultProfileHandler); + const fields = get(options, 'fields', { default: FIELDS }); + const profileHandler = get(options, 'profileHandler', { default: defaultProfileHandler }); const configuredOptions = { scope, diff --git a/src/auth/oauth/utils/detach.js b/src/auth/oauth/utils/detach.js index 21e320d13..f18cfd11f 100644 --- a/src/auth/oauth/utils/detach.js +++ b/src/auth/oauth/utils/detach.js @@ -1,6 +1,6 @@ -const get = require('lodash/get'); const Errors = require('common-errors'); +const get = require('../../../utils/get-value'); const redisKey = require('../../../utils/key'); const updateMetadata = require('../../../utils/updateMetadata'); const handlePipeline = require('../../../utils/pipelineError'); @@ -17,7 +17,7 @@ module.exports = function detach(provider, userData) { const userDataKey = redisKey(userId, USERS_DATA); const pipeline = redis.pipeline(); - const uid = get(userData, [provider, 'uid'], false); + const uid = get(userData, [provider, 'uid'], { default: false }); if (!uid) { throw Errors.HttpStatusError(412, `${provider} account not found`); } diff --git a/src/users.js b/src/users.js index 2bf87197d..ffc355b92 100644 --- a/src/users.js +++ b/src/users.js @@ -1,19 +1,19 @@ -const Mservice = require('@microfleet/core'); +const { Microfleet, ConnectorsTypes } = require('@microfleet/core'); const Mailer = require('ms-mailer-client'); const merge = require('lodash/merge'); const assert = require('assert'); const fsort = require('redis-filtered-sort'); const TokenManager = require('ms-token'); const LockManager = require('dlock'); -const get = require('lodash/get'); const RedisCluster = require('ioredis').Cluster; const Flakeless = require('ms-flakeless'); const conf = require('./config'); +const get = require('./utils/get-value'); /** * @namespace Users */ -module.exports = class Users extends Mservice { +module.exports = class Users extends Microfleet { /** * Configuration options for the service * @type {Object} @@ -63,11 +63,11 @@ module.exports = class Users extends Mservice { this.flake = new Flakeless(config.flake); this.on('plugin:connect:amqp', (amqp) => { - this._mailer = new Mailer(amqp, config.mailer); + this.mailer = new Mailer(amqp, config.mailer); }); this.on('plugin:close:amqp', () => { - this._mailer = null; + this.mailer = null; }); this.on(`plugin:connect:${this.redisType}`, (redis) => { @@ -80,16 +80,16 @@ module.exports = class Users extends Mservice { this.on('plugin:start:http', (server) => { // if oAuth is enabled - initiate the strategy - if (get(config, 'oauth.enabled', false) === true) { + if (get(config, 'oauth.enabled', { default: false }) === true) { assert.equal(config.http.server.handler, 'hapi', 'oAuth must be used with hapi.js webserver'); const OAuthStrategyHandler = require('./auth/oauth/hapi'); - this._oauth = new OAuthStrategyHandler(server, config); + this.oauth = new OAuthStrategyHandler(server, config); } }); this.on('plugin:stop:http', () => { - this._oauth = null; + this.oauth = null; }); // cleanup connections @@ -100,28 +100,25 @@ module.exports = class Users extends Mservice { // add migration connector if (config.migrations.enabled === true) { - this.addConnector(Mservice.ConnectorsTypes.migration, () => ( + this.addConnector(ConnectorsTypes.migration, () => ( this.migrate('redis', `${__dirname}/migrations`) )); } - // adds mailer connector - this._defineGetter('mailer'); - // ensure we close connection when needed - this.addDestructor(Mservice.ConnectorsTypes.database, () => ( - this._pubsub.quit().reflect() + this.addDestructor(ConnectorsTypes.database, () => ( + this.pubsub.quit().reflect() )); // add lock manager - this.addConnector(Mservice.ConnectorsTypes.migration, async () => { - this._pubsub = redisDuplicate(this.redis); - await this._pubsub.connect(); + this.addConnector(ConnectorsTypes.migration, async () => { + this.pubsub = redisDuplicate(this.redis); + await this.pubsub.connect(); this.dlock = new LockManager({ ...config.lockManager, - client: this._redis, - pubsub: this._pubsub, + client: this.redis, + pubsub: this.pubsub, log: this.log, }); @@ -129,13 +126,13 @@ module.exports = class Users extends Mservice { }); // init account seed - this.addConnector(Mservice.ConnectorsTypes.application, () => ( + this.addConnector(ConnectorsTypes.application, () => ( this.initAdminAccounts() )); // fake accounts for development if (process.env.NODE_ENV === 'development') { - this.addConnector(Mservice.ConnectorsTypes.application, () => ( + this.addConnector(ConnectorsTypes.application, () => ( this.initFakeAccounts() )); } diff --git a/src/utils/get-value.js b/src/utils/get-value.js new file mode 100644 index 000000000..992947627 --- /dev/null +++ b/src/utils/get-value.js @@ -0,0 +1,8 @@ +const get = require('get-value'); + +const { hasOwnProperty } = Object.prototype; +const isValid = (key, obj) => hasOwnProperty.call(obj, key) && obj[key] !== undefined; + +module.exports = (target, path, options = {}) => { + return get(target, path, { ...options, isValid }); +}; diff --git a/test/docker-compose.sentinel.yml b/test/docker-compose.sentinel.yml index d7290320b..220246d7d 100644 --- a/test/docker-compose.sentinel.yml +++ b/test/docker-compose.sentinel.yml @@ -82,8 +82,8 @@ services: - rabbitmq working_dir: /src volumes: - - ${PWD}:/src - - ./configs:/configs + - ${PWD}:/src:cached + - ./configs:/configs:cached extra_hosts: - "ms-users.local:172.16.238.12" environment: diff --git a/test/docker-compose.yml b/test/docker-compose.yml index f0edbab4f..8aead060c 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -66,8 +66,8 @@ services: - rabbitmq working_dir: /src volumes: - - ${PWD}:/src - - ./configs:/configs + - ${PWD}:/src:cached + - ./configs:/configs:cached extra_hosts: - "ms-users.local:172.16.238.12" environment: diff --git a/test/suites/amqp.js b/test/suites/amqp.js index a84505e8d..b5940e991 100644 --- a/test/suites/amqp.js +++ b/test/suites/amqp.js @@ -6,7 +6,7 @@ describe('#AMQP', function AMQPSuite() { afterEach(global.clearRedis); it('should be able to make requests using AMQP transport', function test() { - const { defaultAudience: audience } = this.users._config.jwt; + const { defaultAudience: audience } = this.users.config.jwt; return this.users.amqp.publishAndWait('users.verify', { token: 'invalid-token', audience }) .reflect() diff --git a/test/suites/bearer/strategy.js b/test/suites/bearer/strategy.js index d9261039d..f0ebb3030 100644 --- a/test/suites/bearer/strategy.js +++ b/test/suites/bearer/strategy.js @@ -51,7 +51,7 @@ describe('/_/me', function verifySuite() { const { hashingFunction: algorithm, secret, issuer, defaultAudience, - } = this.users._config.jwt; + } = this.users.config.jwt; const token = jwt.sign({ username: 'vitaly' }, secret, { algorithm, audience: defaultAudience, issuer }); diff --git a/test/suites/getMetadata.js b/test/suites/getMetadata.js index e65657914..49241c7fb 100644 --- a/test/suites/getMetadata.js +++ b/test/suites/getMetadata.js @@ -6,7 +6,7 @@ describe('#getMetadata', function getMetadataSuite() { afterEach(global.clearRedis); it('must reject to return metadata on a non-existing username', function test() { - const { defaultAudience: audience } = this.users._config.jwt; + const { defaultAudience: audience } = this.users.config.jwt; return this.dispatch('users.getMetadata', { username: 'noob', audience }) .reflect() @@ -27,7 +27,9 @@ describe('#getMetadata', function getMetadataSuite() { .dispatch('users.register', { username, password: '123', audience, metadata: { name: { q: 'verynicedata' } }, }) - .then(({ user }) => (this.firstUserId = user.id)); + .then(({ user }) => { + this.firstUserId = user.id; + }); }); beforeEach(function pretest() { @@ -35,7 +37,9 @@ describe('#getMetadata', function getMetadataSuite() { .dispatch('users.register', { username: usernameB, password: '123', audience, metadata: { name: 'boredom' }, }) - .then(({ user }) => (this.secondUserId = user.id)); + .then(({ user }) => { + this.secondUserId = user.id; + }); }); beforeEach(function pretest() { diff --git a/test/suites/list.js b/test/suites/list.js index c1279fc88..99a872102 100644 --- a/test/suites/list.js +++ b/test/suites/list.js @@ -1,8 +1,8 @@ const { inspectPromise } = require('@makeomatic/deploy'); const Promise = require('bluebird'); const { expect } = require('chai'); -const redisKey = require('../../src/utils/key.js'); const ld = require('lodash'); +const redisKey = require('../../src/utils/key.js'); describe('#list', function listSuite() { this.timeout(50000); @@ -13,7 +13,7 @@ describe('#list', function listSuite() { afterEach('reset redis', global.clearRedis); beforeEach('populate redis', function populateRedis() { - const audience = this.users._config.jwt.defaultAudience; + const audience = this.users.config.jwt.defaultAudience; const promises = []; const { USERS_INDEX, USERS_METADATA } = require('../../src/constants'); @@ -27,15 +27,16 @@ describe('#list', function listSuite() { }, }; - promises.push(this.users._redis - .pipeline() - .sadd(USERS_INDEX, user.id) - .hmset( - redisKey(user.id, USERS_METADATA, audience), - ld.mapValues(user.metadata, JSON.stringify.bind(JSON)) - ) - .exec() - ); + promises.push(( + this.users.redis + .pipeline() + .sadd(USERS_INDEX, user.id) + .hmset( + redisKey(user.id, USERS_METADATA, audience), + ld.mapValues(user.metadata, JSON.stringify.bind(JSON)) + ) + .exec() + )); }); this.audience = audience; diff --git a/test/suites/verify.js b/test/suites/verify.js index 5bf3a4d47..9b04b2fe8 100644 --- a/test/suites/verify.js +++ b/test/suites/verify.js @@ -8,7 +8,7 @@ describe('#verify', function verifySuite() { afterEach(global.clearRedis); it('must reject on an invalid JWT token', function test() { - const { defaultAudience: audience } = this.users._config.jwt; + const { defaultAudience: audience } = this.users.config.jwt; return simpleDispatcher(this.users.router)('users.verify', { token: 'invalid-token', audience }) .reflect() @@ -25,7 +25,7 @@ describe('#verify', function verifySuite() { const { hashingFunction: algorithm, secret, issuer, defaultAudience, - } = this.users._config.jwt; + } = this.users.config.jwt; const token = jwt.sign({ username: 'vitaly' }, secret, { algorithm, audience: defaultAudience, issuer }); return simpleDispatcher(this.users.router)('users.verify', { token, audience: defaultAudience }) diff --git a/yarn.lock b/yarn.lock index 6a2617273..2f4483431 100644 --- a/yarn.lock +++ b/yarn.lock @@ -219,7 +219,7 @@ lodash "^4.17.10" to-fast-properties "^2.0.0" -"@commitlint/cli@^7.1.2": +"@commitlint/cli@^7.2.1": version "7.2.1" resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-7.2.1.tgz#dbb9eeb1f5015a129bb0801fbc1115eb1dcd513b" integrity sha512-PUHWGoQOx8m6ZSpZPSHb+YISFAvW7jiWvCJOQiViKHZC8CLKu4bjyc/AwP8gBte0RsTGAu1ekiitp5Q0NcLGcA== @@ -361,27 +361,31 @@ camelcase "^5.0.0" prettier "^1.13.7" -"@makeomatic/deploy@^8.0.1": - version "8.0.1" - resolved "https://registry.yarnpkg.com/@makeomatic/deploy/-/deploy-8.0.1.tgz#2fa0d60aa6012e1daa22e53aec478227f200affc" - integrity sha512-PJDdfFzvEqT2FKFqJppONuyFkMkzWPUNiq7HiwH87XlLc0Z75Z3G2r+B3n2ohTgsh6z9heAnKLFsCvxBSEZW3w== +"@makeomatic/deploy@^8.2.3": + version "8.2.3" + resolved "https://registry.yarnpkg.com/@makeomatic/deploy/-/deploy-8.2.3.tgz#91934d3231535f2aef21eab4bc47d9da5e48e66a" + integrity sha512-RhnkAZrAO4BPRI9jd/W29yZPSluIBvFnIlJBuqlWfPy7WtpRwipJfQOxQffvjygc265KF7OSE6orbumZKYPhVg== dependencies: - "@commitlint/cli" "^7.1.2" + "@commitlint/cli" "^7.2.1" bluebird "^3.5.2" chrome-launcher "^0.10.5" chrome-remote-interface "^0.26.1" death "^1.1.0" find-up "^3.0.0" glob "^7.1.3" - husky "^1.1.0" + husky "^1.1.2" + hyperid "^1.4.1" is "^3.2.1" + js-yaml "^3.12.0" lodash.get "^4.4.2" + lodash.merge "^4.6.1" lodash.set "^4.3.2" - ms-conf "^3.3.0" + ms-conf "^3.3.1" npm-path "^2.0.4" - pino "^5.6.3" + pino "^5.8.0" + read-pkg "^4.0.1" rimraf "^2.6.2" - semantic-release "15.9.17" + semantic-release "15.9.x" shelljs "^0.8.2" yargs "^12.0.2" @@ -404,10 +408,10 @@ debug "^3.1.0" lodash "^4.17.10" -"@microfleet/core@^12.0.0": - version "12.0.0" - resolved "https://registry.yarnpkg.com/@microfleet/core/-/core-12.0.0.tgz#f32aac53141369c2cc44bcf5c34aebe7d79d0d7e" - integrity sha512-mbbaaKqvyLQUisyC8cOI57wPnxxNpeo9TEZab87QHP3MGnFvVyJJiP+l6D/Z7qIO2I08dB/uV0BKV9AjVk3+pA== +"@microfleet/core@^13.2.1": + version "13.2.1" + resolved "https://registry.yarnpkg.com/@microfleet/core/-/core-13.2.1.tgz#3fa4559f7125aa5b12b73eebc5dfd1318bf57e67" + integrity sha512-r7fna2sRedvZuJ7ff4Aci6GQX5U0aBDz/tyEj4EfjVhyEXN2fd9lfs3j9VPgxOKPPX+tTEFaj8cgyCzjyDdeYQ== dependencies: bluebird "^3.5.2" bluebird-retry "^0.11.0" @@ -417,9 +421,12 @@ debug "^4.1.0" event-to-promise "^0.8.0" eventemitter3 "^3.1.0" + get-value "^3.0.1" glob "^7.1.3" is "^3.2.1" lodash "^4.17.11" + lodash.intersection "^4.4.0" + lodash.partial "^4.2.1" opentracing "^0.14.3" semver "^5.6.0" sort-by "^1.1.1" @@ -447,10 +454,10 @@ pino "^4.17.6" uuid "^3.3.2" -"@microfleet/validation@^8.0.0": - version "8.0.0" - resolved "https://registry.yarnpkg.com/@microfleet/validation/-/validation-8.0.0.tgz#400c5a956d14f5787676f7ff3a3feb4baa62295f" - integrity sha512-V41BhhQkQuoHWc37Bj/utsJ3NgJJJ0o3J1hQJAmxjtyfU92lf16FYezd/yysmVqNoZVm65tUpTqOrt00km3uew== +"@microfleet/validation@^8.1.0": + version "8.1.0" + resolved "https://registry.yarnpkg.com/@microfleet/validation/-/validation-8.1.0.tgz#ff401ef44a2c3b472393a406b2289265913e77f7" + integrity sha512-iAjVRhlhD4NKbbkPpHArbrWUFIRZMm9Dec3Vvfp2Q6YsWtu/eamenJLUBAw0bnz0Dojn42Yhmcr6nkBgtVPMIw== dependencies: ajv "^6.5.4" ajv-keywords "^3.2.0" @@ -488,10 +495,10 @@ node-fetch "^2.1.1" url-template "^2.0.8" -"@semantic-release/changelog@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@semantic-release/changelog/-/changelog-3.0.0.tgz#e01514b517e775cea47aef7df5f5685c7aff2bf2" - integrity sha512-d577qELFMc98WSbXIErQJHRHJSx1j1PqaxEb62d/g9DnRNgaT/JZ7l1c13LtEvWQzwekuGeVb3sk/y8w4nqBHw== +"@semantic-release/changelog@^3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@semantic-release/changelog/-/changelog-3.0.1.tgz#d39a8130aa33c54541e529322769a1c8c51dfc54" + integrity sha512-N3lWwS3SUQmjBI/IoxwfQwPHAeQgYkvM63nzBpYkp2DXQ9zdLs5ZYpD1oln//wWCKVSIY2tPDs7KD4LVVh6u5Q== dependencies: "@semantic-release/error" "^2.1.0" aggregate-error "^1.0.0" @@ -515,21 +522,22 @@ resolved "https://registry.yarnpkg.com/@semantic-release/error/-/error-2.2.0.tgz#ee9d5a09c9969eade1ec864776aeda5c5cddbbf0" integrity sha512-9Tj/qn+y2j+sjCI3Jd+qseGtHjOAeg7dU2/lVcqIQ9TV3QDaDXDYXcoOHU+7o2Hwh8L8ymL4gfuO7KxDs3q2zg== -"@semantic-release/exec@^3.1.3": - version "3.1.3" - resolved "https://registry.yarnpkg.com/@semantic-release/exec/-/exec-3.1.3.tgz#4afef8005904567e007c4830d54a718877c5ed39" - integrity sha512-B9pqgHHorSjxVPD5can6K9XQl5pVlmyXaFKs0p+gQF3iMwg3lTByZFAAHm0OkkzW0uOVA17CAchTloebrn+HrQ== +"@semantic-release/exec@^3.3.0": + version "3.3.0" + resolved "https://registry.yarnpkg.com/@semantic-release/exec/-/exec-3.3.0.tgz#3ceaf66084cee82fb4babde387583259701ed381" + integrity sha512-6a5nMGLyYJUl5me4orEIA89mf1Roz1jEVlv0GgIJv1k/yjEcmWicYQ76PrPfUzh81sVtfHfK0zLN5Vikz8f5oA== dependencies: "@semantic-release/error" "^2.1.0" + aggregate-error "^1.0.0" debug "^4.0.0" execa "^1.0.0" lodash "^4.17.4" parse-json "^4.0.0" -"@semantic-release/git@^7.0.4": - version "7.0.4" - resolved "https://registry.yarnpkg.com/@semantic-release/git/-/git-7.0.4.tgz#b10c85744044d797ebf979eb0fa1e6e499b4100c" - integrity sha512-/kdHnetgogIC/W5CDYQ1xmxy+4KQG7MqkgnqcPi4dj8tXCJrmVy9XAR2LySUhRTtnDniLq0H29DsD9HW5x+PKQ== +"@semantic-release/git@^7.0.5": + version "7.0.5" + resolved "https://registry.yarnpkg.com/@semantic-release/git/-/git-7.0.5.tgz#640e66683dbbb0a0771e9968e2dc15ec5facaf38" + integrity sha512-90TDMAQw9S5BXjygpEb8zdwLCnUmP5G2GfKHUvmFapFNh3UsI1AJljEUe5hJh/GOuHiyBD/whnCMYExsp8a34Q== dependencies: "@semantic-release/error" "^2.1.0" aggregate-error "^1.0.0" @@ -2461,10 +2469,10 @@ dotenv@^5.0.1: resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-5.0.1.tgz#a5317459bd3d79ab88cff6e44057a6a3fbb1fcef" integrity sha512-4As8uPrjfwb7VXC+WnLCbXK7y+Ueb2B3zgNCePYfhxS1PYeaO1YTeplffTEcbfLhvFNGLAz90VvJs9yomG7bow== -dotenv@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-6.0.0.tgz#24e37c041741c5f4b25324958ebbc34bca965935" - integrity sha512-FlWbnhgjtwD+uNLUGHbMykMOYQaTivdHEmYwAKFjn6GKe/CqY0fNae93ZHTd20snh9ZLr8mTzIL9m0APQ1pjQg== +dotenv@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-6.1.0.tgz#9853b6ca98292acb7dec67a95018fa40bccff42c" + integrity sha512-/veDn2ztgRlB7gKmE3i9f6CmDIyXAy6d5nBq+whO9SLX+Zs1sXEgFLPi+aSuWqUuusMfbi84fT8j34fs1HaYUw== dtrace-provider@~0.8: version "0.8.7" @@ -2746,10 +2754,10 @@ eslint@5.x.x: table "^4.0.3" text-table "^0.2.0" -eslint@^5.7.0: - version "5.7.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.7.0.tgz#55c326d6fb2ad45fcbd0ce17c3846f025d1d819c" - integrity sha512-zYCeFQahsxffGl87U2aJ7DPyH8CbWgxBC213Y8+TCanhUTf2gEvfq3EKpHmEcozTLyPmGe9LZdMAwC/CpJBM5A== +eslint@^5.8.0: + version "5.8.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.8.0.tgz#91fbf24f6e0471e8fdf681a4d9dd1b2c9f28309b" + integrity sha512-Zok6Bru3y2JprqTNm14mgQ15YQu/SMDkWdnmHfFg770DIUlmMFd/gqqzCHekxzjHZJxXv3tmTpH0C1icaYJsRQ== dependencies: "@babel/code-frame" "^7.0.0" ajv "^6.5.3" @@ -3388,6 +3396,13 @@ get-value@^2.0.3, get-value@^2.0.6: resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= +get-value@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-3.0.1.tgz#5efd2a157f1d6a516d7524e124ac52d0a39ef5a8" + integrity sha512-mKZj9JLQrwMBtj5wxi6MH8Z5eSKaERpAwjg43dPtlGI1ZVEgH/qC7T8/6R2OBSUA+zzHBZgICsVJaEIV2tKTDA== + dependencies: + isobject "^3.0.1" + getpass@^0.1.1: version "0.1.7" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" @@ -3761,7 +3776,7 @@ humanize-ms@^1.2.1: dependencies: ms "^2.0.0" -husky@^1.1.0: +husky@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/husky/-/husky-1.1.2.tgz#574c2bb16958db8a8120b63306efaff110525c23" integrity sha512-9TdkUpBeEOjz0AnFdUN4i3w8kEbOsVs9/WSeJqWLq2OO6bcKQhVW64Zi+pVd/AMRLpN3QTINb6ZXiELczvdmqQ== @@ -3777,6 +3792,14 @@ husky@^1.1.0: run-node "^1.0.0" slash "^2.0.0" +hyperid@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/hyperid/-/hyperid-1.4.1.tgz#5df41b25a86171661b37534c3404655ae7657d29" + integrity sha512-rtuRoJyEPZZEGN25T1PC2/IYxdApJEYbBB+8e7vZMFnfhZV7HobkpUr7z1gZvcxqleg4OVg0YrMEtfmIoV85gQ== + dependencies: + uuid "^3.2.1" + uuid-parse "^1.0.0" + iconv-lite@^0.4.17, iconv-lite@^0.4.4, iconv-lite@~0.4.13: version "0.4.23" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" @@ -3943,10 +3966,10 @@ ioredis-lock@^3.4.0: lodash.foreach "^4.5.0" uuid "^3.0.0" -ioredis@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/ioredis/-/ioredis-4.1.0.tgz#77374eeeb6c019e136b3cd84193d264f48ecfc59" - integrity sha512-TcYrEJjWdz8s0ce06hAIo/Ehm8xcBbhgWj2p5ZED/dc2gXG6NYEGmDRq/SU5lmrCPK9330Nf9RtY53pYwOiyVA== +ioredis@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/ioredis/-/ioredis-4.2.0.tgz#f0f76fa5067a51c365ef1411f6572478a825971d" + integrity sha512-PdxZGNJBfPiR2RI6DkqmiacL1+ML3gaqEiaC5QXWQt9eSTlGj+BwDCct0s8irn1ed8GyzAHTzcjvU9fmnl6D7A== dependencies: cluster-key-slot "^1.0.6" debug "^3.1.0" @@ -4819,6 +4842,11 @@ lodash.includes@^4.3.0: resolved "https://registry.yarnpkg.com/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f" integrity sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8= +lodash.intersection@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.intersection/-/lodash.intersection-4.4.0.tgz#0a11ba631d0e95c23c7f2f4cbb9a692ed178e705" + integrity sha1-ChG6Yx0OlcI8fy9Mu5ppLtF45wU= + lodash.isboolean@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz#6c2e171db2a257cd96802fd43b01b20d5f5870f6" @@ -4869,6 +4897,11 @@ lodash.once@^4.0.0: resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" integrity sha1-DdOXEhPHxW34gJd9UEyI+0cal6w= +lodash.partial@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/lodash.partial/-/lodash.partial-4.2.1.tgz#49f3d8cfdaa3bff8b3a91d127e923245418961d4" + integrity sha1-SfPYz9qjv/izqR0SfpIyRUGJYdQ= + lodash.pick@4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" @@ -5351,15 +5384,15 @@ move-concurrently@^1.0.1: rimraf "^2.5.4" run-queue "^1.0.3" -ms-conf@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/ms-conf/-/ms-conf-3.3.0.tgz#14bc72def20383305505e519780b52228ed6d5d2" - integrity sha512-Ng9RG8ev8cin2r8zOfNgjT82zVcc0yKe/fQhEMtXC/T//UpSIwJXVqAskxKiH2TozNUwNUadozdEqQmHyus47Q== +ms-conf@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/ms-conf/-/ms-conf-3.3.1.tgz#e4a4cf5395cfeb105feb50fe92887ec0f48094ef" + integrity sha512-tqqgrhAE1MZ+3Q/1HECYVM1SrxwoYwatCS5YTjfNpPTV6yE5DEOUwV5hu4VF9Wv7l2wVvSGQk2GV8AT7JMa7Dw== dependencies: camelcase "^5.0.0" confidence "^3.0.2" - debug "^4.0.1" - dotenv "^6.0.0" + debug "^4.1.0" + dotenv "^6.1.0" eventemitter3 "^3.1.0" glob "^7.1.3" lodash.merge "^4.6.1" @@ -5506,10 +5539,10 @@ nigel@3.x.x: hoek "5.x.x" vise "3.x.x" -nise@^1.4.5: - version "1.4.5" - resolved "https://registry.yarnpkg.com/nise/-/nise-1.4.5.tgz#979a97a19c48d627bb53703726ae8d53ce8d4b3e" - integrity sha512-OHRVvdxKgwZELf2DTgsJEIA4MOq8XWvpSUzoOXyxJ2mY0mMENWC66+70AShLR2z05B1dzrzWlUQJmJERlOUpZw== +nise@^1.4.6: + version "1.4.6" + resolved "https://registry.yarnpkg.com/nise/-/nise-1.4.6.tgz#76cc3915925056ae6c405dd8ad5d12bde570c19f" + integrity sha512-1GedetLKzmqmgwabuMSqPsT7oumdR77SBpDfNNJhADRIeA3LN/2RVqR4fFqwvzhAqcTef6PPCzQwITE/YQ8S8A== dependencies: "@sinonjs/formatio" "3.0.0" just-extend "^3.0.0" @@ -6410,7 +6443,7 @@ pino-std-serializers@^2.0.0: resolved "https://registry.yarnpkg.com/pino-std-serializers/-/pino-std-serializers-2.2.0.tgz#2c97a636dcbe6947a7be518f5d06b7804f5c48ae" integrity sha512-Ef95yX2/cUb5knEmHCpvkfrvjWBx0CTcBwB3WAneX8o0WpEf8y+lmR/XMkgAbJ/Ak2mHbo0eL5ANy8qDqpH1xw== -pino-std-serializers@^2.2.1: +pino-std-serializers@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pino-std-serializers/-/pino-std-serializers-2.3.0.tgz#34eeaab97c055c28e22c0542ae55978e7e427786" integrity sha512-klfGoOsP6sJH7ON796G4xoUSx2fkpFgKHO4YVVO2zmz31jR+etzc/QzGJILaOIiCD6HTCFgkPx+XN8nk+ruqPw== @@ -6429,16 +6462,16 @@ pino@^4.17.6: quick-format-unescaped "^1.1.2" split2 "^2.2.0" -pino@^5.6.3: - version "5.7.0" - resolved "https://registry.yarnpkg.com/pino/-/pino-5.7.0.tgz#9ca520788662646877e050e8d0704f71735e1b12" - integrity sha512-V2ST6/C7KokFH2b94MeN2ItXIu+q948CFAT5JmtbW6H0v3xmZOCJvLyYFWFwrZWgKJd05y/F1EgZcl3clkV/mA== +pino@^5.8.0: + version "5.8.0" + resolved "https://registry.yarnpkg.com/pino/-/pino-5.8.0.tgz#b566f78617c53c2bae91d30ad62d52cd1074df4a" + integrity sha512-L+nysfU1DMoMku+/4DTsBNFl/ajFzPWMGFQ7Gs3Cuo60Iya4ixPzHSxBUT6po2lQRexW9iEj8oCAIGpEXBeIZQ== dependencies: fast-json-parse "^1.0.3" fast-redact "^1.2.0" fast-safe-stringify "^2.0.6" flatstr "^1.0.5" - pino-std-serializers "^2.2.1" + pino-std-serializers "^2.3.0" pump "^3.0.0" quick-format-unescaped "^3.0.0" sonic-boom "^0.6.1" @@ -7184,7 +7217,7 @@ secure-keys@^1.0.0: resolved "https://registry.yarnpkg.com/secure-keys/-/secure-keys-1.0.0.tgz#f0c82d98a3b139a8776a8808050b824431087fca" integrity sha1-8MgtmKOxOah3aogIBQuCRDEIf8o= -semantic-release@15.9.17: +semantic-release@15.9.x: version "15.9.17" resolved "https://registry.yarnpkg.com/semantic-release/-/semantic-release-15.9.17.tgz#fe3eb554e1e186da167b30c61bb1f9a454ebeabc" integrity sha512-Z+LAJBuPD2pcPpRdF0zC9bwHeZkNUqgENEkWzuFdcpocA0FmFZVLMPcdZGR1+jVOjD1yiLli3MMCFYrpegIxTg== @@ -7345,10 +7378,10 @@ signale@^1.2.1: figures "^2.0.0" pkg-conf "^2.1.0" -sinon@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/sinon/-/sinon-7.0.0.tgz#99f2e5198d90a01ccbcebd4dc181a24827cb90dd" - integrity sha512-8OrSYFPZ9xaECfi1ayVMd0ihYCW2OZYgX3rBczrB990gHZMM+aftvhNTJazGz/luS0Us9NWgD5P3KGQ7kYZvGg== +sinon@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/sinon/-/sinon-7.1.0.tgz#819b63002ee09a90a3b50a0da4e0bdecb2e3f345" + integrity sha512-ffASxced8xr8eU0EGyfj9K++bRCtv/NyOFOxl7UBD86YH97oZjVxvecMhObwRlXe27GRUa6rVFEn67khPZ29rQ== dependencies: "@sinonjs/commons" "^1.0.2" "@sinonjs/formatio" "^3.0.0" @@ -7356,7 +7389,7 @@ sinon@^7.0.0: diff "^3.5.0" lodash.get "^4.4.2" lolex "^3.0.0" - nise "^1.4.5" + nise "^1.4.6" supports-color "^5.5.0" type-detect "^4.0.8" @@ -8216,7 +8249,12 @@ util-extend@^1.0.1: resolved "https://registry.yarnpkg.com/util-extend/-/util-extend-1.0.3.tgz#a7c216d267545169637b3b6edc6ca9119e2ff93f" integrity sha1-p8IW0mdUUWljeztu3GypEZ4v+T8= -uuid@^3.0.0, uuid@^3.0.1, uuid@^3.3.2: +uuid-parse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/uuid-parse/-/uuid-parse-1.0.0.tgz#f4657717624b0e4b88af36f98d89589a5bbee569" + integrity sha1-9GV3F2JLDkuIrzb5jYlYmlu+5Wk= + +uuid@^3.0.0, uuid@^3.0.1, uuid@^3.2.1, uuid@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== From cfae7b694a8ef632652b175fe5855513174fa2cf Mon Sep 17 00:00:00 2001 From: AVVS Date: Fri, 26 Oct 2018 11:13:04 -0700 Subject: [PATCH 2/2] fix: rename passError -> passAuthError --- src/actions/_/me.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/actions/_/me.js b/src/actions/_/me.js index 6e8a25fdb..62e688f1f 100644 --- a/src/actions/_/me.js +++ b/src/actions/_/me.js @@ -29,7 +29,7 @@ async function Me({ auth }) { Me.auth = { name: 'bearer', strategy: 'required', - passError: true, + passAuthError: true, }; Me.schema = 'me'; Me.transports = [ActionTransport.http, ActionTransport.amqp];