From 9d19a86dde0fd2ee4f0ff60fee62f35e248bfa16 Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Sat, 10 Mar 2018 14:17:37 +0100 Subject: [PATCH 001/128] AccountsServer : File Structure Changes ( types relocation and utils relocation ) --- packages/password/src/accounts-password.ts | 2 +- .../{accounts-server.ts => AccountsServer.ts} | 5 +- ...-server.ts.snap => AccountsServer.ts.snap} | 0 .../{ => utils}/__snapshots__/email.ts.snap | 0 .../server/__tests__/{ => utils}/email.ts | 2 +- .../__tests__/{ => utils}/encryption.ts | 2 +- .../{accounts-server.ts => AccountsServer.ts} | 58 +++++++--------- packages/server/src/index.ts | 13 ++-- .../server/src/types/AccountsServerOptions.ts | 34 ++++++++++ packages/server/src/types/AuthService.ts | 11 +++ .../src/types/ConnectionInformationsType.ts | 4 ++ .../src/{types.ts => types/DBInterface.ts} | 67 +------------------ .../server/src/types/EmailTemplateType.ts | 7 ++ .../server/src/types/EmailTemplatesType.ts | 8 +++ packages/server/src/types/EmailType.ts | 3 + packages/server/src/types/JwtData.ts | 4 ++ .../server/src/types/PrepareMailFunction.ts | 11 +++ .../server/src/types/RemoveListenerHandle.ts | 2 + .../src/types/ResumeSessionValidator.ts | 6 ++ packages/server/src/types/SendMailType.ts | 1 + packages/server/src/types/TokenRecord.ts | 6 ++ .../src/types/UserObjectSanitizerFunction.ts | 7 ++ packages/server/src/{ => utils}/email.ts | 15 +---- packages/server/src/{ => utils}/encryption.ts | 0 .../{utils.ts => utils/getFirstUserEmail.ts} | 0 packages/server/src/utils/serverHooks.ts | 14 ++++ packages/server/src/{ => utils}/tokens.ts | 0 27 files changed, 162 insertions(+), 120 deletions(-) rename packages/server/__tests__/{accounts-server.ts => AccountsServer.ts} (99%) rename packages/server/__tests__/__snapshots__/{accounts-server.ts.snap => AccountsServer.ts.snap} (100%) rename packages/server/__tests__/{ => utils}/__snapshots__/email.ts.snap (100%) rename packages/server/__tests__/{ => utils}/email.ts (92%) rename packages/server/__tests__/{ => utils}/encryption.ts (96%) rename packages/server/src/{accounts-server.ts => AccountsServer.ts} (94%) create mode 100644 packages/server/src/types/AccountsServerOptions.ts create mode 100644 packages/server/src/types/AuthService.ts create mode 100644 packages/server/src/types/ConnectionInformationsType.ts rename packages/server/src/{types.ts => types/DBInterface.ts} (55%) create mode 100644 packages/server/src/types/EmailTemplateType.ts create mode 100644 packages/server/src/types/EmailTemplatesType.ts create mode 100644 packages/server/src/types/EmailType.ts create mode 100644 packages/server/src/types/JwtData.ts create mode 100644 packages/server/src/types/PrepareMailFunction.ts create mode 100644 packages/server/src/types/RemoveListenerHandle.ts create mode 100644 packages/server/src/types/ResumeSessionValidator.ts create mode 100644 packages/server/src/types/SendMailType.ts create mode 100644 packages/server/src/types/TokenRecord.ts create mode 100644 packages/server/src/types/UserObjectSanitizerFunction.ts rename packages/server/src/{ => utils}/email.ts (75%) rename packages/server/src/{ => utils}/encryption.ts (100%) rename packages/server/src/{utils.ts => utils/getFirstUserEmail.ts} (100%) create mode 100644 packages/server/src/utils/serverHooks.ts rename packages/server/src/{ => utils}/tokens.ts (100%) diff --git a/packages/password/src/accounts-password.ts b/packages/password/src/accounts-password.ts index 4458f2b1e..78409ec0e 100644 --- a/packages/password/src/accounts-password.ts +++ b/packages/password/src/accounts-password.ts @@ -21,8 +21,8 @@ import { AccountsServer, generateRandomToken, AuthService, + getFirstUserEmail } from '@accounts/server'; -import { getFirstUserEmail } from '@accounts/server/lib/utils'; import { hashPassword, bcryptPassword, verifyPassword } from './encryption'; import { PasswordCreateUserType, diff --git a/packages/server/__tests__/accounts-server.ts b/packages/server/__tests__/AccountsServer.ts similarity index 99% rename from packages/server/__tests__/accounts-server.ts rename to packages/server/__tests__/AccountsServer.ts index f46d3c059..028833455 100644 --- a/packages/server/__tests__/accounts-server.ts +++ b/packages/server/__tests__/AccountsServer.ts @@ -1,10 +1,11 @@ import * as jwtDecode from 'jwt-decode'; -import { AccountsServer, JwtData } from '../src/accounts-server'; +import { AccountsServer } from '../src/AccountsServer'; +import { JwtData } from '../src/types/JwtData' import { bcryptPassword, hashPassword, verifyPassword, -} from '../src/encryption'; +} from '../src/utils/encryption'; describe('AccountsServer', () => { const db = { diff --git a/packages/server/__tests__/__snapshots__/accounts-server.ts.snap b/packages/server/__tests__/__snapshots__/AccountsServer.ts.snap similarity index 100% rename from packages/server/__tests__/__snapshots__/accounts-server.ts.snap rename to packages/server/__tests__/__snapshots__/AccountsServer.ts.snap diff --git a/packages/server/__tests__/__snapshots__/email.ts.snap b/packages/server/__tests__/utils/__snapshots__/email.ts.snap similarity index 100% rename from packages/server/__tests__/__snapshots__/email.ts.snap rename to packages/server/__tests__/utils/__snapshots__/email.ts.snap diff --git a/packages/server/__tests__/email.ts b/packages/server/__tests__/utils/email.ts similarity index 92% rename from packages/server/__tests__/email.ts rename to packages/server/__tests__/utils/email.ts index a9d8957de..344609535 100644 --- a/packages/server/__tests__/email.ts +++ b/packages/server/__tests__/utils/email.ts @@ -1,4 +1,4 @@ -import { emailTemplates } from '../src/email'; +import { emailTemplates } from '../../src/utils/email'; describe('email', () => { describe('emailTemplates', () => { diff --git a/packages/server/__tests__/encryption.ts b/packages/server/__tests__/utils/encryption.ts similarity index 96% rename from packages/server/__tests__/encryption.ts rename to packages/server/__tests__/utils/encryption.ts index 3143fc60a..c469fcd14 100644 --- a/packages/server/__tests__/encryption.ts +++ b/packages/server/__tests__/utils/encryption.ts @@ -2,7 +2,7 @@ import { bcryptPassword, hashPassword, verifyPassword, -} from '../src/encryption'; +} from '../../src/utils/encryption'; describe('bcryptPassword', () => { it('hashes password using bcrypt', async () => { diff --git a/packages/server/src/accounts-server.ts b/packages/server/src/AccountsServer.ts similarity index 94% rename from packages/server/src/accounts-server.ts rename to packages/server/src/AccountsServer.ts index 37fa56881..2c70115dd 100644 --- a/packages/server/src/accounts-server.ts +++ b/packages/server/src/AccountsServer.ts @@ -16,26 +16,18 @@ import { generateAccessToken, generateRefreshToken, generateRandomToken, -} from './tokens'; -import { emailTemplates, EmailTemplateType, sendMail } from './email'; -import { - AccountsServerOptions, - ConnectionInformationsType, - AuthService, - DBInterface, -} from './types'; - -export interface TokenRecord { - token: string; - address: string; - when: number; - reason: string; -} +} from './utils/tokens'; -export interface JwtData { - token: string; - isImpersonated: boolean; -} +import { emailTemplates, sendMail } from './utils/email'; + +import { AccountsServerOptions } from './types/AccountsServerOptions' +import { ConnectionInformationsType } from './types/ConnectionInformationsType' +import { AuthService } from './types/AuthService' +import { DBInterface } from './types/DBInterface' +import { TokenRecord } from './types/TokenRecord' +import { JwtData } from './types/JwtData' +import { RemoveListenerHandle } from './types/RemoveListenerHandle' +import { EmailTemplateType } from './types/EmailTemplateType' const defaultOptions = { tokenSecret: 'secret', @@ -53,8 +45,6 @@ const defaultOptions = { siteUrl: 'http://localhost:3000', }; -export type RemoveListnerHandle = () => EventEmitter; - export const ServerHooks = { LoginSuccess: 'LoginSuccess', LoginError: 'LoginError', @@ -105,51 +95,51 @@ export class AccountsServer { return this.options; } - public onLoginSuccess(callback: HookListener): RemoveListnerHandle { + public onLoginSuccess(callback: HookListener): RemoveListenerHandle { return this.on(ServerHooks.LoginSuccess, callback); } - public onLoginError(callback: HookListener): RemoveListnerHandle { + public onLoginError(callback: HookListener): RemoveListenerHandle { return this.on(ServerHooks.LoginError, callback); } - public onLogoutSuccess(callback: HookListener): RemoveListnerHandle { + public onLogoutSuccess(callback: HookListener): RemoveListenerHandle { return this.on(ServerHooks.LogoutSuccess, callback); } - public onLogoutError(callback: HookListener): RemoveListnerHandle { + public onLogoutError(callback: HookListener): RemoveListenerHandle { return this.on(ServerHooks.LogoutError, callback); } - public onCreateUserSuccess(callback: HookListener): RemoveListnerHandle { + public onCreateUserSuccess(callback: HookListener): RemoveListenerHandle { return this.on(ServerHooks.CreateUserSuccess, callback); } - public onCreateUserError(callback: HookListener): RemoveListnerHandle { + public onCreateUserError(callback: HookListener): RemoveListenerHandle { return this.on(ServerHooks.CreateUserError, callback); } - public onResumeSessionSuccess(callback: HookListener): RemoveListnerHandle { + public onResumeSessionSuccess(callback: HookListener): RemoveListenerHandle { return this.on(ServerHooks.ResumeSessionSuccess, callback); } - public onResumeSessionError(callback: HookListener): RemoveListnerHandle { + public onResumeSessionError(callback: HookListener): RemoveListenerHandle { return this.on(ServerHooks.ResumeSessionError, callback); } - public onRefreshTokensSuccess(callback: HookListener): RemoveListnerHandle { + public onRefreshTokensSuccess(callback: HookListener): RemoveListenerHandle { return this.on(ServerHooks.RefreshTokensSuccess, callback); } - public onRefreshTokensError(callback: HookListener): RemoveListnerHandle { + public onRefreshTokensError(callback: HookListener): RemoveListenerHandle { return this.on(ServerHooks.RefreshTokensError, callback); } - public onImpersonationSuccess(callback: HookListener): RemoveListnerHandle { + public onImpersonationSuccess(callback: HookListener): RemoveListenerHandle { return this.on(ServerHooks.ImpersonationSuccess, callback); } - public onImpersonationError(callback: HookListener): RemoveListnerHandle { + public onImpersonationError(callback: HookListener): RemoveListenerHandle { return this.on(ServerHooks.ImpersonationError, callback); } @@ -542,7 +532,7 @@ export class AccountsServer { return this.db.setProfile(userId, { ...user.profile, ...profile }); } - public on(eventName: string, callback: HookListener): RemoveListnerHandle { + public on(eventName: string, callback: HookListener): RemoveListenerHandle { this.hooks.on(eventName, callback); return () => this.hooks.removeListener(eventName, callback); diff --git a/packages/server/src/index.ts b/packages/server/src/index.ts index aaaa1073c..e3b25a9cf 100644 --- a/packages/server/src/index.ts +++ b/packages/server/src/index.ts @@ -1,7 +1,11 @@ -import { AccountsServer } from './accounts-server'; -import * as encryption from './encryption'; -import { generateRandomToken } from './tokens'; -import { AuthService, DBInterface, ConnectionInformationsType } from './types'; +import { AccountsServer } from './AccountsServer'; +import * as encryption from './utils/encryption'; +import { generateRandomToken } from './utils/tokens'; +import { getFirstUserEmail } from './utils/getFirstUserEmail'; + +import { ConnectionInformationsType } from './types/ConnectionInformationsType' +import { AuthService } from './types/AuthService' +import { DBInterface } from './types/DBInterface' export default AccountsServer; export { @@ -11,4 +15,5 @@ export { DBInterface, generateRandomToken, ConnectionInformationsType, + getFirstUserEmail }; diff --git a/packages/server/src/types/AccountsServerOptions.ts b/packages/server/src/types/AccountsServerOptions.ts new file mode 100644 index 000000000..4c6db8be1 --- /dev/null +++ b/packages/server/src/types/AccountsServerOptions.ts @@ -0,0 +1,34 @@ +import { UserObjectType } from '@accounts/common'; +import { DBInterface } from './DBInterface' +import { EmailTemplateType } from './EmailTemplateType' +import { EmailTemplatesType } from './EmailTemplatesType' +import { UserObjectSanitizerFunction } from './UserObjectSanitizerFunction'; +import { ResumeSessionValidator } from './ResumeSessionValidator'; +import { PrepareMailFunction } from './PrepareMailFunction'; +import { SendMailType } from './SendMailType'; + +export interface AccountsServerOptions { + db: DBInterface; + tokenSecret: string; + tokenConfigs?: { + accessToken?: { + expiresIn?: string; + }; + refreshToken?: { + expiresIn?: string; + }; + }; + emailTokensExpiry?: number; + emailTemplates?: EmailTemplatesType; + userObjectSanitizer?: UserObjectSanitizerFunction; + impersonationAuthorize?: ( + user: UserObjectType, + impersonateToUser: UserObjectType + ) => Promise; + resumeSessionValidator?: ResumeSessionValidator; + siteUrl?: string; + prepareMail?: PrepareMailFunction; + sendMail?: SendMailType; + // https://github.com/eleith/emailjs#emailserverconnectoptions + email?: object; +} \ No newline at end of file diff --git a/packages/server/src/types/AuthService.ts b/packages/server/src/types/AuthService.ts new file mode 100644 index 000000000..db09cd5be --- /dev/null +++ b/packages/server/src/types/AuthService.ts @@ -0,0 +1,11 @@ +import { UserObjectType } from '@accounts/common'; +import { DBInterface } from './DBInterface' + +import { AccountsServer } from '../AccountsServer'; + +export interface AuthService { + server: AccountsServer; + serviceName: string; + setStore(store: DBInterface): void; + authenticate(params: any): Promise; +} \ No newline at end of file diff --git a/packages/server/src/types/ConnectionInformationsType.ts b/packages/server/src/types/ConnectionInformationsType.ts new file mode 100644 index 000000000..772704490 --- /dev/null +++ b/packages/server/src/types/ConnectionInformationsType.ts @@ -0,0 +1,4 @@ +export interface ConnectionInformationsType { + ip?: string; + userAgent?: string; +} \ No newline at end of file diff --git a/packages/server/src/types.ts b/packages/server/src/types/DBInterface.ts similarity index 55% rename from packages/server/src/types.ts rename to packages/server/src/types/DBInterface.ts index e6f308c01..d25834e62 100644 --- a/packages/server/src/types.ts +++ b/packages/server/src/types/DBInterface.ts @@ -1,66 +1,5 @@ -import { UserObjectType, CreateUserType, SessionType } from '@accounts/common'; -import { EmailTemplatesType, EmailTemplateType, SendMailType } from './email'; -import { AccountsServer } from './accounts-server'; - -export interface AuthService { - server: AccountsServer; - serviceName: string; - setStore(store: DBInterface): void; - authenticate(params: any): Promise; -} - -export type UserObjectSanitizerFunction = ( - userObject: UserObjectType, - omitFunction: (userDoc: object, fields: string[]) => UserObjectType, - pickFunction: (userDoc: object, fields: string[]) => UserObjectType -) => any; - -export type ResumeSessionValidator = ( - user: UserObjectType, - session: SessionType -) => Promise; - -export type PrepareMailFunction = ( - to: string, - token: string, - user: UserObjectType, - pathFragment: string, - emailTemplate: EmailTemplateType, - from: string -) => object; - -export type EmailType = EmailTemplateType & { to: string }; - -export interface AccountsServerOptions { - db: DBInterface; - tokenSecret: string; - tokenConfigs?: { - accessToken?: { - expiresIn?: string; - }; - refreshToken?: { - expiresIn?: string; - }; - }; - emailTokensExpiry?: number; - emailTemplates?: EmailTemplatesType; - userObjectSanitizer?: UserObjectSanitizerFunction; - impersonationAuthorize?: ( - user: UserObjectType, - impersonateToUser: UserObjectType - ) => Promise; - resumeSessionValidator?: ResumeSessionValidator; - siteUrl?: string; - prepareMail?: PrepareMailFunction; - sendMail?: SendMailType; - // https://github.com/eleith/emailjs#emailserverconnectoptions - email?: object; -} - -export interface ConnectionInformationsType { - ip?: string; - userAgent?: string; -} +import { UserObjectType, SessionType, CreateUserType } from '@accounts/common'; +import { ConnectionInformationsType } from './ConnectionInformationsType'; export interface DBInterface { // Find user by identity fields @@ -125,4 +64,4 @@ export interface DBInterface { ): Promise; invalidateSession(sessionId: string): Promise; invalidateAllSessions(userId: string): Promise; -} +} \ No newline at end of file diff --git a/packages/server/src/types/EmailTemplateType.ts b/packages/server/src/types/EmailTemplateType.ts new file mode 100644 index 000000000..02563f032 --- /dev/null +++ b/packages/server/src/types/EmailTemplateType.ts @@ -0,0 +1,7 @@ +import { UserObjectType } from '@accounts/common'; + +export interface EmailTemplateType { + from?: string; + subject: (user?: UserObjectType) => string; + text: (user: UserObjectType, url: string) => string; +} diff --git a/packages/server/src/types/EmailTemplatesType.ts b/packages/server/src/types/EmailTemplatesType.ts new file mode 100644 index 000000000..99cb06661 --- /dev/null +++ b/packages/server/src/types/EmailTemplatesType.ts @@ -0,0 +1,8 @@ +import { EmailTemplateType } from './EmailTemplateType' + +export interface EmailTemplatesType { + from: string; + verifyEmail: EmailTemplateType; + resetPassword: EmailTemplateType; + enrollAccount: EmailTemplateType; +} \ No newline at end of file diff --git a/packages/server/src/types/EmailType.ts b/packages/server/src/types/EmailType.ts new file mode 100644 index 000000000..4dc2f3104 --- /dev/null +++ b/packages/server/src/types/EmailType.ts @@ -0,0 +1,3 @@ +import { EmailTemplateType } from './EmailTemplateType' + +export type EmailType = EmailTemplateType & { to: string }; \ No newline at end of file diff --git a/packages/server/src/types/JwtData.ts b/packages/server/src/types/JwtData.ts new file mode 100644 index 000000000..f3c99e51f --- /dev/null +++ b/packages/server/src/types/JwtData.ts @@ -0,0 +1,4 @@ +export interface JwtData { + token: string; + isImpersonated: boolean; +} \ No newline at end of file diff --git a/packages/server/src/types/PrepareMailFunction.ts b/packages/server/src/types/PrepareMailFunction.ts new file mode 100644 index 000000000..8165ead19 --- /dev/null +++ b/packages/server/src/types/PrepareMailFunction.ts @@ -0,0 +1,11 @@ +import { UserObjectType } from '@accounts/common'; +import { EmailTemplateType } from './EmailTemplateType'; + +export type PrepareMailFunction = ( + to: string, + token: string, + user: UserObjectType, + pathFragment: string, + emailTemplate: EmailTemplateType, + from: string +) => object; diff --git a/packages/server/src/types/RemoveListenerHandle.ts b/packages/server/src/types/RemoveListenerHandle.ts new file mode 100644 index 000000000..1368bb771 --- /dev/null +++ b/packages/server/src/types/RemoveListenerHandle.ts @@ -0,0 +1,2 @@ +import { EventEmitter } from 'events'; +export type RemoveListenerHandle = () => EventEmitter; diff --git a/packages/server/src/types/ResumeSessionValidator.ts b/packages/server/src/types/ResumeSessionValidator.ts new file mode 100644 index 000000000..230cd12da --- /dev/null +++ b/packages/server/src/types/ResumeSessionValidator.ts @@ -0,0 +1,6 @@ +import { UserObjectType, SessionType } from '@accounts/common'; + +export type ResumeSessionValidator = ( + user: UserObjectType, + session: SessionType +) => Promise; \ No newline at end of file diff --git a/packages/server/src/types/SendMailType.ts b/packages/server/src/types/SendMailType.ts new file mode 100644 index 000000000..b8aab732d --- /dev/null +++ b/packages/server/src/types/SendMailType.ts @@ -0,0 +1 @@ +export type SendMailType = (mail: object) => Promise; \ No newline at end of file diff --git a/packages/server/src/types/TokenRecord.ts b/packages/server/src/types/TokenRecord.ts new file mode 100644 index 000000000..d68ecd50b --- /dev/null +++ b/packages/server/src/types/TokenRecord.ts @@ -0,0 +1,6 @@ +export interface TokenRecord { + token: string; + address: string; + when: number; + reason: string; +} \ No newline at end of file diff --git a/packages/server/src/types/UserObjectSanitizerFunction.ts b/packages/server/src/types/UserObjectSanitizerFunction.ts new file mode 100644 index 000000000..f83f191f0 --- /dev/null +++ b/packages/server/src/types/UserObjectSanitizerFunction.ts @@ -0,0 +1,7 @@ +import { UserObjectType } from '@accounts/common'; + +export type UserObjectSanitizerFunction = ( + userObject: UserObjectType, + omitFunction: (userDoc: object, fields: string[]) => UserObjectType, + pickFunction: (userDoc: object, fields: string[]) => UserObjectType +) => any; \ No newline at end of file diff --git a/packages/server/src/email.ts b/packages/server/src/utils/email.ts similarity index 75% rename from packages/server/src/email.ts rename to packages/server/src/utils/email.ts index aa6764439..8ef70d593 100644 --- a/packages/server/src/email.ts +++ b/packages/server/src/utils/email.ts @@ -1,17 +1,6 @@ import { UserObjectType } from '@accounts/common'; - -export interface EmailTemplateType { - from?: string; - subject: (user?: UserObjectType) => string; - text: (user: UserObjectType, url: string) => string; -} - -export interface EmailTemplatesType { - from: string; - verifyEmail: EmailTemplateType; - resetPassword: EmailTemplateType; - enrollAccount: EmailTemplateType; -} +import { EmailTemplateType } from '../types/EmailTemplateType'; +import { EmailTemplatesType } from '../types/EmailTemplatesType'; export const emailTemplates = { from: 'js-accounts ', diff --git a/packages/server/src/encryption.ts b/packages/server/src/utils/encryption.ts similarity index 100% rename from packages/server/src/encryption.ts rename to packages/server/src/utils/encryption.ts diff --git a/packages/server/src/utils.ts b/packages/server/src/utils/getFirstUserEmail.ts similarity index 100% rename from packages/server/src/utils.ts rename to packages/server/src/utils/getFirstUserEmail.ts diff --git a/packages/server/src/utils/serverHooks.ts b/packages/server/src/utils/serverHooks.ts new file mode 100644 index 000000000..18d76371f --- /dev/null +++ b/packages/server/src/utils/serverHooks.ts @@ -0,0 +1,14 @@ +export const ServerHooks = { + LoginSuccess: 'LoginSuccess', + LoginError: 'LoginError', + LogoutSuccess: 'LogoutSuccess', + LogoutError: 'LogoutError', + CreateUserSuccess: 'CreateUserSuccess', + CreateUserError: 'CreateUserError', + ResumeSessionSuccess: 'ResumeSessionSuccess', + ResumeSessionError: 'ResumeSessionError', + RefreshTokensSuccess: 'RefreshTokensSuccess', + RefreshTokensError: 'RefreshTokensError', + ImpersonationSuccess: 'ImpersonationSuccess', + ImpersonationError: 'ImpersonationError', +}; \ No newline at end of file diff --git a/packages/server/src/tokens.ts b/packages/server/src/utils/tokens.ts similarity index 100% rename from packages/server/src/tokens.ts rename to packages/server/src/utils/tokens.ts From df09670a4cc89db8cc3f460c82f9e1cff0b0de94 Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Sat, 10 Mar 2018 14:21:58 +0100 Subject: [PATCH 002/128] AccountsServer : ServerHooks object relocation under src/utils/serverHooks --- packages/server/src/AccountsServer.ts | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/packages/server/src/AccountsServer.ts b/packages/server/src/AccountsServer.ts index 2c70115dd..f3d94d349 100644 --- a/packages/server/src/AccountsServer.ts +++ b/packages/server/src/AccountsServer.ts @@ -19,6 +19,7 @@ import { } from './utils/tokens'; import { emailTemplates, sendMail } from './utils/email'; +import { ServerHooks } from './utils/serverHooks'; import { AccountsServerOptions } from './types/AccountsServerOptions' import { ConnectionInformationsType } from './types/ConnectionInformationsType' @@ -45,21 +46,6 @@ const defaultOptions = { siteUrl: 'http://localhost:3000', }; -export const ServerHooks = { - LoginSuccess: 'LoginSuccess', - LoginError: 'LoginError', - LogoutSuccess: 'LogoutSuccess', - LogoutError: 'LogoutError', - CreateUserSuccess: 'CreateUserSuccess', - CreateUserError: 'CreateUserError', - ResumeSessionSuccess: 'ResumeSessionSuccess', - ResumeSessionError: 'ResumeSessionError', - RefreshTokensSuccess: 'RefreshTokensSuccess', - RefreshTokensError: 'RefreshTokensError', - ImpersonationSuccess: 'ImpersonationSuccess', - ImpersonationError: 'ImpersonationError', -}; - export class AccountsServer { public options: AccountsServerOptions; private services: { [key: string]: AuthService }; From 134a5ff67f0716585d8798587da01306e79f6d05 Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Sat, 10 Mar 2018 14:54:35 +0100 Subject: [PATCH 003/128] Password : relocate isEmail() to src/utils/isEmail --- packages/password/src/accounts-password.ts | 5 +---- packages/password/src/utils/isEmail.ts | 4 ++++ 2 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 packages/password/src/utils/isEmail.ts diff --git a/packages/password/src/accounts-password.ts b/packages/password/src/accounts-password.ts index 78409ec0e..2875a8045 100644 --- a/packages/password/src/accounts-password.ts +++ b/packages/password/src/accounts-password.ts @@ -30,10 +30,7 @@ import { PasswordType, } from './types'; -export const isEmail = (email?: string) => { - const re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; - return email && re.test(email); -}; +import { isEmail } from './utils/isEmail' export interface AccountsPasswordOptions { passwordHashAlgorithm?: HashAlgorithm; diff --git a/packages/password/src/utils/isEmail.ts b/packages/password/src/utils/isEmail.ts new file mode 100644 index 000000000..2fad4d43b --- /dev/null +++ b/packages/password/src/utils/isEmail.ts @@ -0,0 +1,4 @@ +export const isEmail = (email?: string) => { + const re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; + return email && re.test(email); +}; \ No newline at end of file From 5b0cf05ac28ba185ed7d782d155eb088daf05bf9 Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Sat, 10 Mar 2018 14:55:34 +0100 Subject: [PATCH 004/128] Password : relocate encryption.ts to src/utils/encription --- packages/password/src/accounts-password.ts | 2 +- packages/password/src/{ => utils}/encryption.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename packages/password/src/{ => utils}/encryption.ts (93%) diff --git a/packages/password/src/accounts-password.ts b/packages/password/src/accounts-password.ts index 2875a8045..fc9878cbf 100644 --- a/packages/password/src/accounts-password.ts +++ b/packages/password/src/accounts-password.ts @@ -23,7 +23,7 @@ import { AuthService, getFirstUserEmail } from '@accounts/server'; -import { hashPassword, bcryptPassword, verifyPassword } from './encryption'; +import { hashPassword, bcryptPassword, verifyPassword } from './utils/encryption'; import { PasswordCreateUserType, PasswordLoginType, diff --git a/packages/password/src/encryption.ts b/packages/password/src/utils/encryption.ts similarity index 93% rename from packages/password/src/encryption.ts rename to packages/password/src/utils/encryption.ts index 5351e1d8d..02e3fdef9 100644 --- a/packages/password/src/encryption.ts +++ b/packages/password/src/utils/encryption.ts @@ -1,6 +1,6 @@ import * as bcrypt from 'bcryptjs'; import * as crypto from 'crypto'; -import { PasswordType } from './types'; +import { PasswordType } from '../types'; export const bcryptPassword = async (password: string): Promise => { const salt = await bcrypt.genSalt(10); From 972f66650bb3704a538bd695feb2fba1e42fa9e3 Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Sat, 10 Mar 2018 15:14:28 +0100 Subject: [PATCH 005/128] Password : relocating types to src/types/[typeName] --- .../__tests__/{ => utils}/encryption.ts | 6 +----- packages/password/src/accounts-password.ts | 10 ++++----- packages/password/src/types.ts | 21 ------------------- .../src/types/PasswordCreateUserType.ts | 6 ++++++ .../password/src/types/PasswordLoginType.ts | 7 +++++++ packages/password/src/types/PasswordType.ts | 8 +++++++ packages/password/src/utils/encryption.ts | 2 +- 7 files changed, 28 insertions(+), 32 deletions(-) rename packages/password/__tests__/{ => utils}/encryption.ts (90%) delete mode 100644 packages/password/src/types.ts create mode 100644 packages/password/src/types/PasswordCreateUserType.ts create mode 100644 packages/password/src/types/PasswordLoginType.ts create mode 100644 packages/password/src/types/PasswordType.ts diff --git a/packages/password/__tests__/encryption.ts b/packages/password/__tests__/utils/encryption.ts similarity index 90% rename from packages/password/__tests__/encryption.ts rename to packages/password/__tests__/utils/encryption.ts index 035d6fda2..9087f54bb 100644 --- a/packages/password/__tests__/encryption.ts +++ b/packages/password/__tests__/utils/encryption.ts @@ -1,8 +1,4 @@ -import { - bcryptPassword, - hashPassword, - verifyPassword, -} from '../src/encryption'; +import { bcryptPassword, hashPassword, verifyPassword } from '../../src/utils/encryption'; describe('encryption', () => { describe('bcryptPassword', () => { diff --git a/packages/password/src/accounts-password.ts b/packages/password/src/accounts-password.ts index fc9878cbf..799ee0bb8 100644 --- a/packages/password/src/accounts-password.ts +++ b/packages/password/src/accounts-password.ts @@ -24,11 +24,11 @@ import { getFirstUserEmail } from '@accounts/server'; import { hashPassword, bcryptPassword, verifyPassword } from './utils/encryption'; -import { - PasswordCreateUserType, - PasswordLoginType, - PasswordType, -} from './types'; + + +import { PasswordCreateUserType } from './types/PasswordCreateUserType' +import { PasswordLoginType } from './types/PasswordLoginType' +import { PasswordType } from './types/PasswordType' import { isEmail } from './utils/isEmail' diff --git a/packages/password/src/types.ts b/packages/password/src/types.ts deleted file mode 100644 index c06c2fc5e..000000000 --- a/packages/password/src/types.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { - CreateUserType, - HashAlgorithm, - LoginUserIdentityType, -} from '@accounts/common'; - -export type PasswordType = - | string - | { - digest: string; - algorithm: HashAlgorithm; - }; - -export interface PasswordLoginType { - user: string | LoginUserIdentityType; - password: PasswordType; -} - -export interface PasswordCreateUserType extends CreateUserType { - password: PasswordType; -} diff --git a/packages/password/src/types/PasswordCreateUserType.ts b/packages/password/src/types/PasswordCreateUserType.ts new file mode 100644 index 000000000..5902ff792 --- /dev/null +++ b/packages/password/src/types/PasswordCreateUserType.ts @@ -0,0 +1,6 @@ +import { CreateUserType } from '@accounts/common'; +import { PasswordType } from './PasswordType'; + +export interface PasswordCreateUserType extends CreateUserType { + password: PasswordType; +} diff --git a/packages/password/src/types/PasswordLoginType.ts b/packages/password/src/types/PasswordLoginType.ts new file mode 100644 index 000000000..410e8ee3c --- /dev/null +++ b/packages/password/src/types/PasswordLoginType.ts @@ -0,0 +1,7 @@ +import { LoginUserIdentityType } from '@accounts/common'; +import { PasswordType } from './PasswordType' + +export interface PasswordLoginType { + user: string | LoginUserIdentityType; + password: PasswordType; +} \ No newline at end of file diff --git a/packages/password/src/types/PasswordType.ts b/packages/password/src/types/PasswordType.ts new file mode 100644 index 000000000..6d91a07f2 --- /dev/null +++ b/packages/password/src/types/PasswordType.ts @@ -0,0 +1,8 @@ +import { HashAlgorithm } from '@accounts/common'; + +export type PasswordType = + | string + | { + digest: string; + algorithm: HashAlgorithm; + }; \ No newline at end of file diff --git a/packages/password/src/utils/encryption.ts b/packages/password/src/utils/encryption.ts index 02e3fdef9..0dfa2442f 100644 --- a/packages/password/src/utils/encryption.ts +++ b/packages/password/src/utils/encryption.ts @@ -1,6 +1,6 @@ import * as bcrypt from 'bcryptjs'; import * as crypto from 'crypto'; -import { PasswordType } from '../types'; +import { PasswordType } from '../types/PasswordType'; export const bcryptPassword = async (password: string): Promise => { const salt = await bcrypt.genSalt(10); From 69ca551106fb53133a1a601a289aef73f4c3deac Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Sat, 10 Mar 2018 15:21:47 +0100 Subject: [PATCH 006/128] OAuthTwitter : relocating types to src/types/[typeName] --- packages/oauth-twitter/src/accounts-oauth-twitter.ts | 10 ++++------ packages/oauth-twitter/src/index.ts | 2 +- .../src/types/AccountsOAuthTwitterOptions.ts | 4 ++++ 3 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 packages/oauth-twitter/src/types/AccountsOAuthTwitterOptions.ts diff --git a/packages/oauth-twitter/src/accounts-oauth-twitter.ts b/packages/oauth-twitter/src/accounts-oauth-twitter.ts index 7961c4d51..4646d09cb 100644 --- a/packages/oauth-twitter/src/accounts-oauth-twitter.ts +++ b/packages/oauth-twitter/src/accounts-oauth-twitter.ts @@ -1,15 +1,13 @@ import * as oauth from 'oauth'; -export interface AccountsOauthTwitterOptions { - key: string; - secret: string; -} +import { AccountsOAuthTwitterOptions } from './types/AccountsOAuthTwitterOptions'; + export class AccountsOAuthTwitter { - private options: AccountsOauthTwitterOptions; + private options: AccountsOAuthTwitterOptions; private oauth: any; - constructor(options: AccountsOauthTwitterOptions) { + constructor(options: AccountsOAuthTwitterOptions) { this.options = options; this.oauth = new oauth.OAuth( 'https://twitter.com/oauth/request_token', diff --git a/packages/oauth-twitter/src/index.ts b/packages/oauth-twitter/src/index.ts index 49db7e5ff..e6f33d53d 100644 --- a/packages/oauth-twitter/src/index.ts +++ b/packages/oauth-twitter/src/index.ts @@ -1,4 +1,4 @@ import { AccountsOAuthTwitter } from './accounts-oauth-twitter'; -export { AccountsOauthTwitterOptions } from './accounts-oauth-twitter'; +export { AccountsOAuthTwitterOptions } from './types/AccountsOAuthTwitterOptions'; export default AccountsOAuthTwitter; diff --git a/packages/oauth-twitter/src/types/AccountsOAuthTwitterOptions.ts b/packages/oauth-twitter/src/types/AccountsOAuthTwitterOptions.ts new file mode 100644 index 000000000..68a916a2a --- /dev/null +++ b/packages/oauth-twitter/src/types/AccountsOAuthTwitterOptions.ts @@ -0,0 +1,4 @@ +export interface AccountsOAuthTwitterOptions { + key: string; + secret: string; +} \ No newline at end of file From 755c0d6680022347bd1647b6c6d6134327a6158d Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Sat, 10 Mar 2018 15:38:45 +0100 Subject: [PATCH 007/128] OAuth : relocating types to src/types/[typeName] --- packages/oauth/src/accounts-oauth.ts | 16 +++------------- packages/oauth/src/types/OAuthOptions.ts | 7 +++++++ packages/oauth/src/types/OAuthUser.ts | 5 +++++ 3 files changed, 15 insertions(+), 13 deletions(-) create mode 100644 packages/oauth/src/types/OAuthOptions.ts create mode 100644 packages/oauth/src/types/OAuthUser.ts diff --git a/packages/oauth/src/accounts-oauth.ts b/packages/oauth/src/accounts-oauth.ts index 2fa95cb88..2cfb504c6 100644 --- a/packages/oauth/src/accounts-oauth.ts +++ b/packages/oauth/src/accounts-oauth.ts @@ -2,25 +2,15 @@ import { UserObjectType } from '@accounts/common'; import { AccountsServer, DBInterface, AuthService } from '@accounts/server'; import * as requestPromise from 'request-promise'; -export interface OauthUser { - id: string; - email?: string; - profile?: object; -} - -export interface OauthOptions { - [provider: string]: { - authenticate: (params: any) => Promise; - }; -} +import { OAuthOptions } from './types/OAuthOptions' export class AccountsOauth implements AuthService { public server: AccountsServer; public serviceName = 'oauth'; private db: DBInterface; - private options: OauthOptions; + private options: OAuthOptions; - constructor(options) { + constructor(options: OAuthOptions) { this.options = options; } diff --git a/packages/oauth/src/types/OAuthOptions.ts b/packages/oauth/src/types/OAuthOptions.ts new file mode 100644 index 000000000..1fa5fcb66 --- /dev/null +++ b/packages/oauth/src/types/OAuthOptions.ts @@ -0,0 +1,7 @@ +import { OAuthUser } from './OAuthUser' + +export interface OAuthOptions { + [provider: string]: { + authenticate: (params: any) => Promise; + }; +} \ No newline at end of file diff --git a/packages/oauth/src/types/OAuthUser.ts b/packages/oauth/src/types/OAuthUser.ts new file mode 100644 index 000000000..00f91e28d --- /dev/null +++ b/packages/oauth/src/types/OAuthUser.ts @@ -0,0 +1,5 @@ +export interface OAuthUser { + id: string; + email?: string; + profile?: object; +} \ No newline at end of file From adc2e839c806a881d4366322b68b167587408f46 Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Sat, 10 Mar 2018 16:09:37 +0100 Subject: [PATCH 008/128] AccountsServer : revert to kebab-case --- ...untsServer.ts.snap => account-server.ts.snap} | 0 .../{AccountsServer.ts => account-server.ts} | 4 ++-- .../{AccountsServer.ts => accounts-server.ts} | 16 ++++++++-------- packages/server/src/index.ts | 10 +++++----- ...rverOptions.ts => accounts-server-options.ts} | 14 +++++++------- .../types/{AuthService.ts => auth-service.ts} | 4 ++-- ...nsType.ts => connection-informations-type.ts} | 0 .../types/{DBInterface.ts => db-interface.ts} | 2 +- ...ailTemplateType.ts => email-template-type.ts} | 0 ...lTemplatesType.ts => email-templates-type.ts} | 2 +- .../src/types/{EmailType.ts => email-type.ts} | 2 +- .../server/src/types/{JwtData.ts => jwt-data.ts} | 0 ...eMailFunction.ts => prepare-mail-function.ts} | 2 +- ...stenerHandle.ts => remove-listener-handle.ts} | 0 ...nValidator.ts => resume-session-validator.ts} | 0 .../types/{SendMailType.ts => send-mail-type.ts} | 0 .../types/{TokenRecord.ts => token-record.ts} | 0 ...tion.ts => user-object-sanitizer-function.ts} | 0 packages/server/src/utils/email.ts | 4 ++-- ...FirstUserEmail.ts => get-first-user-email.ts} | 0 20 files changed, 30 insertions(+), 30 deletions(-) rename packages/server/__tests__/__snapshots__/{AccountsServer.ts.snap => account-server.ts.snap} (100%) rename packages/server/__tests__/{AccountsServer.ts => account-server.ts} (99%) rename packages/server/src/{AccountsServer.ts => accounts-server.ts} (97%) rename packages/server/src/types/{AccountsServerOptions.ts => accounts-server-options.ts} (62%) rename packages/server/src/types/{AuthService.ts => auth-service.ts} (70%) rename packages/server/src/types/{ConnectionInformationsType.ts => connection-informations-type.ts} (100%) rename packages/server/src/types/{DBInterface.ts => db-interface.ts} (96%) rename packages/server/src/types/{EmailTemplateType.ts => email-template-type.ts} (100%) rename packages/server/src/types/{EmailTemplatesType.ts => email-templates-type.ts} (73%) rename packages/server/src/types/{EmailType.ts => email-type.ts} (50%) rename packages/server/src/types/{JwtData.ts => jwt-data.ts} (100%) rename packages/server/src/types/{PrepareMailFunction.ts => prepare-mail-function.ts} (79%) rename packages/server/src/types/{RemoveListenerHandle.ts => remove-listener-handle.ts} (100%) rename packages/server/src/types/{ResumeSessionValidator.ts => resume-session-validator.ts} (100%) rename packages/server/src/types/{SendMailType.ts => send-mail-type.ts} (100%) rename packages/server/src/types/{TokenRecord.ts => token-record.ts} (100%) rename packages/server/src/types/{UserObjectSanitizerFunction.ts => user-object-sanitizer-function.ts} (100%) rename packages/server/src/utils/{getFirstUserEmail.ts => get-first-user-email.ts} (100%) diff --git a/packages/server/__tests__/__snapshots__/AccountsServer.ts.snap b/packages/server/__tests__/__snapshots__/account-server.ts.snap similarity index 100% rename from packages/server/__tests__/__snapshots__/AccountsServer.ts.snap rename to packages/server/__tests__/__snapshots__/account-server.ts.snap diff --git a/packages/server/__tests__/AccountsServer.ts b/packages/server/__tests__/account-server.ts similarity index 99% rename from packages/server/__tests__/AccountsServer.ts rename to packages/server/__tests__/account-server.ts index 028833455..621fada74 100644 --- a/packages/server/__tests__/AccountsServer.ts +++ b/packages/server/__tests__/account-server.ts @@ -1,6 +1,6 @@ import * as jwtDecode from 'jwt-decode'; -import { AccountsServer } from '../src/AccountsServer'; -import { JwtData } from '../src/types/JwtData' +import { AccountsServer } from '../src/accounts-server'; +import { JwtData } from '../src/types/jwt-data' import { bcryptPassword, hashPassword, diff --git a/packages/server/src/AccountsServer.ts b/packages/server/src/accounts-server.ts similarity index 97% rename from packages/server/src/AccountsServer.ts rename to packages/server/src/accounts-server.ts index f3d94d349..f4fa14dac 100644 --- a/packages/server/src/AccountsServer.ts +++ b/packages/server/src/accounts-server.ts @@ -21,14 +21,14 @@ import { import { emailTemplates, sendMail } from './utils/email'; import { ServerHooks } from './utils/serverHooks'; -import { AccountsServerOptions } from './types/AccountsServerOptions' -import { ConnectionInformationsType } from './types/ConnectionInformationsType' -import { AuthService } from './types/AuthService' -import { DBInterface } from './types/DBInterface' -import { TokenRecord } from './types/TokenRecord' -import { JwtData } from './types/JwtData' -import { RemoveListenerHandle } from './types/RemoveListenerHandle' -import { EmailTemplateType } from './types/EmailTemplateType' +import { AccountsServerOptions } from './types/accounts-server-options' +import { ConnectionInformationsType } from './types/connection-informations-type' +import { AuthService } from './types/auth-service' +import { DBInterface } from './types/db-interface' +import { TokenRecord } from './types/token-record' +import { JwtData } from './types/jwt-data' +import { RemoveListenerHandle } from './types/remove-listener-handle' +import { EmailTemplateType } from './types/email-template-type' const defaultOptions = { tokenSecret: 'secret', diff --git a/packages/server/src/index.ts b/packages/server/src/index.ts index e3b25a9cf..279dcc76f 100644 --- a/packages/server/src/index.ts +++ b/packages/server/src/index.ts @@ -1,11 +1,11 @@ -import { AccountsServer } from './AccountsServer'; +import { AccountsServer } from './accounts-server'; import * as encryption from './utils/encryption'; import { generateRandomToken } from './utils/tokens'; -import { getFirstUserEmail } from './utils/getFirstUserEmail'; +import { getFirstUserEmail } from './utils/get-first-user-email'; -import { ConnectionInformationsType } from './types/ConnectionInformationsType' -import { AuthService } from './types/AuthService' -import { DBInterface } from './types/DBInterface' +import { ConnectionInformationsType } from './types/connection-informations-type' +import { AuthService } from './types/auth-service' +import { DBInterface } from './types/db-interface' export default AccountsServer; export { diff --git a/packages/server/src/types/AccountsServerOptions.ts b/packages/server/src/types/accounts-server-options.ts similarity index 62% rename from packages/server/src/types/AccountsServerOptions.ts rename to packages/server/src/types/accounts-server-options.ts index 4c6db8be1..9b4657a21 100644 --- a/packages/server/src/types/AccountsServerOptions.ts +++ b/packages/server/src/types/accounts-server-options.ts @@ -1,11 +1,11 @@ import { UserObjectType } from '@accounts/common'; -import { DBInterface } from './DBInterface' -import { EmailTemplateType } from './EmailTemplateType' -import { EmailTemplatesType } from './EmailTemplatesType' -import { UserObjectSanitizerFunction } from './UserObjectSanitizerFunction'; -import { ResumeSessionValidator } from './ResumeSessionValidator'; -import { PrepareMailFunction } from './PrepareMailFunction'; -import { SendMailType } from './SendMailType'; +import { DBInterface } from './db-interface' +import { EmailTemplateType } from './email-template-type' +import { EmailTemplatesType } from './email-templates-type' +import { UserObjectSanitizerFunction } from './user-object-sanitizer-function'; +import { ResumeSessionValidator } from './resume-session-validator'; +import { PrepareMailFunction } from './prepare-mail-function'; +import { SendMailType } from './send-mail-type'; export interface AccountsServerOptions { db: DBInterface; diff --git a/packages/server/src/types/AuthService.ts b/packages/server/src/types/auth-service.ts similarity index 70% rename from packages/server/src/types/AuthService.ts rename to packages/server/src/types/auth-service.ts index db09cd5be..5edca8343 100644 --- a/packages/server/src/types/AuthService.ts +++ b/packages/server/src/types/auth-service.ts @@ -1,7 +1,7 @@ import { UserObjectType } from '@accounts/common'; -import { DBInterface } from './DBInterface' +import { DBInterface } from './db-interface' -import { AccountsServer } from '../AccountsServer'; +import { AccountsServer } from '../accounts-server'; export interface AuthService { server: AccountsServer; diff --git a/packages/server/src/types/ConnectionInformationsType.ts b/packages/server/src/types/connection-informations-type.ts similarity index 100% rename from packages/server/src/types/ConnectionInformationsType.ts rename to packages/server/src/types/connection-informations-type.ts diff --git a/packages/server/src/types/DBInterface.ts b/packages/server/src/types/db-interface.ts similarity index 96% rename from packages/server/src/types/DBInterface.ts rename to packages/server/src/types/db-interface.ts index d25834e62..ce951b77d 100644 --- a/packages/server/src/types/DBInterface.ts +++ b/packages/server/src/types/db-interface.ts @@ -1,5 +1,5 @@ import { UserObjectType, SessionType, CreateUserType } from '@accounts/common'; -import { ConnectionInformationsType } from './ConnectionInformationsType'; +import { ConnectionInformationsType } from './connection-informations-type'; export interface DBInterface { // Find user by identity fields diff --git a/packages/server/src/types/EmailTemplateType.ts b/packages/server/src/types/email-template-type.ts similarity index 100% rename from packages/server/src/types/EmailTemplateType.ts rename to packages/server/src/types/email-template-type.ts diff --git a/packages/server/src/types/EmailTemplatesType.ts b/packages/server/src/types/email-templates-type.ts similarity index 73% rename from packages/server/src/types/EmailTemplatesType.ts rename to packages/server/src/types/email-templates-type.ts index 99cb06661..676ecb2e6 100644 --- a/packages/server/src/types/EmailTemplatesType.ts +++ b/packages/server/src/types/email-templates-type.ts @@ -1,4 +1,4 @@ -import { EmailTemplateType } from './EmailTemplateType' +import { EmailTemplateType } from './email-template-type' export interface EmailTemplatesType { from: string; diff --git a/packages/server/src/types/EmailType.ts b/packages/server/src/types/email-type.ts similarity index 50% rename from packages/server/src/types/EmailType.ts rename to packages/server/src/types/email-type.ts index 4dc2f3104..577eb2807 100644 --- a/packages/server/src/types/EmailType.ts +++ b/packages/server/src/types/email-type.ts @@ -1,3 +1,3 @@ -import { EmailTemplateType } from './EmailTemplateType' +import { EmailTemplateType } from './email-template-type' export type EmailType = EmailTemplateType & { to: string }; \ No newline at end of file diff --git a/packages/server/src/types/JwtData.ts b/packages/server/src/types/jwt-data.ts similarity index 100% rename from packages/server/src/types/JwtData.ts rename to packages/server/src/types/jwt-data.ts diff --git a/packages/server/src/types/PrepareMailFunction.ts b/packages/server/src/types/prepare-mail-function.ts similarity index 79% rename from packages/server/src/types/PrepareMailFunction.ts rename to packages/server/src/types/prepare-mail-function.ts index 8165ead19..f79be4927 100644 --- a/packages/server/src/types/PrepareMailFunction.ts +++ b/packages/server/src/types/prepare-mail-function.ts @@ -1,5 +1,5 @@ import { UserObjectType } from '@accounts/common'; -import { EmailTemplateType } from './EmailTemplateType'; +import { EmailTemplateType } from './email-template-type'; export type PrepareMailFunction = ( to: string, diff --git a/packages/server/src/types/RemoveListenerHandle.ts b/packages/server/src/types/remove-listener-handle.ts similarity index 100% rename from packages/server/src/types/RemoveListenerHandle.ts rename to packages/server/src/types/remove-listener-handle.ts diff --git a/packages/server/src/types/ResumeSessionValidator.ts b/packages/server/src/types/resume-session-validator.ts similarity index 100% rename from packages/server/src/types/ResumeSessionValidator.ts rename to packages/server/src/types/resume-session-validator.ts diff --git a/packages/server/src/types/SendMailType.ts b/packages/server/src/types/send-mail-type.ts similarity index 100% rename from packages/server/src/types/SendMailType.ts rename to packages/server/src/types/send-mail-type.ts diff --git a/packages/server/src/types/TokenRecord.ts b/packages/server/src/types/token-record.ts similarity index 100% rename from packages/server/src/types/TokenRecord.ts rename to packages/server/src/types/token-record.ts diff --git a/packages/server/src/types/UserObjectSanitizerFunction.ts b/packages/server/src/types/user-object-sanitizer-function.ts similarity index 100% rename from packages/server/src/types/UserObjectSanitizerFunction.ts rename to packages/server/src/types/user-object-sanitizer-function.ts diff --git a/packages/server/src/utils/email.ts b/packages/server/src/utils/email.ts index 8ef70d593..573fedd31 100644 --- a/packages/server/src/utils/email.ts +++ b/packages/server/src/utils/email.ts @@ -1,6 +1,6 @@ import { UserObjectType } from '@accounts/common'; -import { EmailTemplateType } from '../types/EmailTemplateType'; -import { EmailTemplatesType } from '../types/EmailTemplatesType'; +import { EmailTemplateType } from '../types/email-template-type'; +import { EmailTemplatesType } from '../types/email-templates-type'; export const emailTemplates = { from: 'js-accounts ', diff --git a/packages/server/src/utils/getFirstUserEmail.ts b/packages/server/src/utils/get-first-user-email.ts similarity index 100% rename from packages/server/src/utils/getFirstUserEmail.ts rename to packages/server/src/utils/get-first-user-email.ts From b0b8d6aef2559fcae91fdee8788bb94836f6de39 Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Sat, 10 Mar 2018 16:12:36 +0100 Subject: [PATCH 009/128] Password : revert to kebab-case --- packages/password/src/accounts-password.ts | 6 +++--- ...sswordCreateUserType.ts => password-create-user-type.ts} | 2 +- .../types/{PasswordLoginType.ts => password-login-type.ts} | 2 +- .../src/types/{PasswordType.ts => password-type.ts} | 0 4 files changed, 5 insertions(+), 5 deletions(-) rename packages/password/src/types/{PasswordCreateUserType.ts => password-create-user-type.ts} (75%) rename packages/password/src/types/{PasswordLoginType.ts => password-login-type.ts} (77%) rename packages/password/src/types/{PasswordType.ts => password-type.ts} (100%) diff --git a/packages/password/src/accounts-password.ts b/packages/password/src/accounts-password.ts index 799ee0bb8..ed143bfe9 100644 --- a/packages/password/src/accounts-password.ts +++ b/packages/password/src/accounts-password.ts @@ -26,9 +26,9 @@ import { import { hashPassword, bcryptPassword, verifyPassword } from './utils/encryption'; -import { PasswordCreateUserType } from './types/PasswordCreateUserType' -import { PasswordLoginType } from './types/PasswordLoginType' -import { PasswordType } from './types/PasswordType' +import { PasswordCreateUserType } from './types/password-create-user-type' +import { PasswordLoginType } from './types/password-login-type' +import { PasswordType } from './types/password-type' import { isEmail } from './utils/isEmail' diff --git a/packages/password/src/types/PasswordCreateUserType.ts b/packages/password/src/types/password-create-user-type.ts similarity index 75% rename from packages/password/src/types/PasswordCreateUserType.ts rename to packages/password/src/types/password-create-user-type.ts index 5902ff792..bd63bcef5 100644 --- a/packages/password/src/types/PasswordCreateUserType.ts +++ b/packages/password/src/types/password-create-user-type.ts @@ -1,5 +1,5 @@ import { CreateUserType } from '@accounts/common'; -import { PasswordType } from './PasswordType'; +import { PasswordType } from './password-type'; export interface PasswordCreateUserType extends CreateUserType { password: PasswordType; diff --git a/packages/password/src/types/PasswordLoginType.ts b/packages/password/src/types/password-login-type.ts similarity index 77% rename from packages/password/src/types/PasswordLoginType.ts rename to packages/password/src/types/password-login-type.ts index 410e8ee3c..52aa85740 100644 --- a/packages/password/src/types/PasswordLoginType.ts +++ b/packages/password/src/types/password-login-type.ts @@ -1,5 +1,5 @@ import { LoginUserIdentityType } from '@accounts/common'; -import { PasswordType } from './PasswordType' +import { PasswordType } from './password-type' export interface PasswordLoginType { user: string | LoginUserIdentityType; diff --git a/packages/password/src/types/PasswordType.ts b/packages/password/src/types/password-type.ts similarity index 100% rename from packages/password/src/types/PasswordType.ts rename to packages/password/src/types/password-type.ts From 8a8507cb932a5cc2e77e4e984730ec2983fb635e Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Sat, 10 Mar 2018 16:15:48 +0100 Subject: [PATCH 010/128] OAuth & OAuthTwitter : revert to kebab-case --- packages/oauth-twitter/src/accounts-oauth-twitter.ts | 2 +- packages/oauth-twitter/src/index.ts | 2 +- ...OAuthTwitterOptions.ts => accounts-oauth-twitter-options.ts} | 0 packages/oauth/src/accounts-oauth.ts | 2 +- packages/oauth/src/types/{OAuthOptions.ts => oauth-options.ts} | 2 +- packages/oauth/src/types/{OAuthUser.ts => oauth-user.ts} | 0 6 files changed, 4 insertions(+), 4 deletions(-) rename packages/oauth-twitter/src/types/{AccountsOAuthTwitterOptions.ts => accounts-oauth-twitter-options.ts} (100%) rename packages/oauth/src/types/{OAuthOptions.ts => oauth-options.ts} (74%) rename packages/oauth/src/types/{OAuthUser.ts => oauth-user.ts} (100%) diff --git a/packages/oauth-twitter/src/accounts-oauth-twitter.ts b/packages/oauth-twitter/src/accounts-oauth-twitter.ts index 4646d09cb..1f22bd681 100644 --- a/packages/oauth-twitter/src/accounts-oauth-twitter.ts +++ b/packages/oauth-twitter/src/accounts-oauth-twitter.ts @@ -1,6 +1,6 @@ import * as oauth from 'oauth'; -import { AccountsOAuthTwitterOptions } from './types/AccountsOAuthTwitterOptions'; +import { AccountsOAuthTwitterOptions } from './types/accounts-oauth-twitter-options'; export class AccountsOAuthTwitter { diff --git a/packages/oauth-twitter/src/index.ts b/packages/oauth-twitter/src/index.ts index e6f33d53d..36d3876cb 100644 --- a/packages/oauth-twitter/src/index.ts +++ b/packages/oauth-twitter/src/index.ts @@ -1,4 +1,4 @@ import { AccountsOAuthTwitter } from './accounts-oauth-twitter'; -export { AccountsOAuthTwitterOptions } from './types/AccountsOAuthTwitterOptions'; +export { AccountsOAuthTwitterOptions } from './types/accounts-oauth-twitter-options'; export default AccountsOAuthTwitter; diff --git a/packages/oauth-twitter/src/types/AccountsOAuthTwitterOptions.ts b/packages/oauth-twitter/src/types/accounts-oauth-twitter-options.ts similarity index 100% rename from packages/oauth-twitter/src/types/AccountsOAuthTwitterOptions.ts rename to packages/oauth-twitter/src/types/accounts-oauth-twitter-options.ts diff --git a/packages/oauth/src/accounts-oauth.ts b/packages/oauth/src/accounts-oauth.ts index 2cfb504c6..2bafd2f2e 100644 --- a/packages/oauth/src/accounts-oauth.ts +++ b/packages/oauth/src/accounts-oauth.ts @@ -2,7 +2,7 @@ import { UserObjectType } from '@accounts/common'; import { AccountsServer, DBInterface, AuthService } from '@accounts/server'; import * as requestPromise from 'request-promise'; -import { OAuthOptions } from './types/OAuthOptions' +import { OAuthOptions } from './types/oauth-options' export class AccountsOauth implements AuthService { public server: AccountsServer; diff --git a/packages/oauth/src/types/OAuthOptions.ts b/packages/oauth/src/types/oauth-options.ts similarity index 74% rename from packages/oauth/src/types/OAuthOptions.ts rename to packages/oauth/src/types/oauth-options.ts index 1fa5fcb66..b98bc99dd 100644 --- a/packages/oauth/src/types/OAuthOptions.ts +++ b/packages/oauth/src/types/oauth-options.ts @@ -1,4 +1,4 @@ -import { OAuthUser } from './OAuthUser' +import { OAuthUser } from './oauth-user' export interface OAuthOptions { [provider: string]: { diff --git a/packages/oauth/src/types/OAuthUser.ts b/packages/oauth/src/types/oauth-user.ts similarity index 100% rename from packages/oauth/src/types/OAuthUser.ts rename to packages/oauth/src/types/oauth-user.ts From e018874b5434e2dc4f43bb36f677af90fabac4f3 Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Sat, 10 Mar 2018 16:22:41 +0100 Subject: [PATCH 011/128] Password : fix typo PasswordType --- packages/password/src/utils/encryption.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/password/src/utils/encryption.ts b/packages/password/src/utils/encryption.ts index 0dfa2442f..84fe520dd 100644 --- a/packages/password/src/utils/encryption.ts +++ b/packages/password/src/utils/encryption.ts @@ -1,6 +1,6 @@ import * as bcrypt from 'bcryptjs'; import * as crypto from 'crypto'; -import { PasswordType } from '../types/PasswordType'; +import { PasswordType } from '../types/password-type'; export const bcryptPassword = async (password: string): Promise => { const salt = await bcrypt.genSalt(10); From 4bf7d379eaabfb0bcbf071825a6ec70a2e8b5c70 Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Sat, 10 Mar 2018 18:53:16 +0100 Subject: [PATCH 012/128] AccountsServer : fix server-hooks kebeb-case --- packages/server/src/accounts-server.ts | 2 +- packages/server/src/utils/{serverHooks.ts => server-hooks.ts} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename packages/server/src/utils/{serverHooks.ts => server-hooks.ts} (100%) diff --git a/packages/server/src/accounts-server.ts b/packages/server/src/accounts-server.ts index f4fa14dac..5c03d01f2 100644 --- a/packages/server/src/accounts-server.ts +++ b/packages/server/src/accounts-server.ts @@ -19,7 +19,7 @@ import { } from './utils/tokens'; import { emailTemplates, sendMail } from './utils/email'; -import { ServerHooks } from './utils/serverHooks'; +import { ServerHooks } from './utils/server-hooks'; import { AccountsServerOptions } from './types/accounts-server-options' import { ConnectionInformationsType } from './types/connection-informations-type' diff --git a/packages/server/src/utils/serverHooks.ts b/packages/server/src/utils/server-hooks.ts similarity index 100% rename from packages/server/src/utils/serverHooks.ts rename to packages/server/src/utils/server-hooks.ts From 6f7ecdd21429d06a2c208e95f636bc85124e48fe Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Sat, 10 Mar 2018 18:59:57 +0100 Subject: [PATCH 013/128] OAuthProviderTwitter: options => config POC --- packages/oauth-twitter/src/accounts-oauth-twitter.ts | 12 ++++++------ packages/oauth-twitter/src/index.ts | 1 - .../src/types/accounts-oauth-twitter-options.ts | 4 ---- packages/oauth-twitter/src/types/configuration.ts | 4 ++++ 4 files changed, 10 insertions(+), 11 deletions(-) delete mode 100644 packages/oauth-twitter/src/types/accounts-oauth-twitter-options.ts create mode 100644 packages/oauth-twitter/src/types/configuration.ts diff --git a/packages/oauth-twitter/src/accounts-oauth-twitter.ts b/packages/oauth-twitter/src/accounts-oauth-twitter.ts index 1f22bd681..ffad0ce6d 100644 --- a/packages/oauth-twitter/src/accounts-oauth-twitter.ts +++ b/packages/oauth-twitter/src/accounts-oauth-twitter.ts @@ -1,19 +1,19 @@ import * as oauth from 'oauth'; -import { AccountsOAuthTwitterOptions } from './types/accounts-oauth-twitter-options'; +import { Configuration } from './types/configuration'; export class AccountsOAuthTwitter { - private options: AccountsOAuthTwitterOptions; + private config: Configuration; private oauth: any; - constructor(options: AccountsOAuthTwitterOptions) { - this.options = options; + constructor(config: Configuration) { + this.config = config; this.oauth = new oauth.OAuth( 'https://twitter.com/oauth/request_token', 'https://twitter.com/oauth/access_token', - this.options.key, - this.options.secret, + this.config.key, + this.config.secret, '1.0A', null, 'HMAC-SHA1' diff --git a/packages/oauth-twitter/src/index.ts b/packages/oauth-twitter/src/index.ts index 36d3876cb..b3fa767f8 100644 --- a/packages/oauth-twitter/src/index.ts +++ b/packages/oauth-twitter/src/index.ts @@ -1,4 +1,3 @@ import { AccountsOAuthTwitter } from './accounts-oauth-twitter'; -export { AccountsOAuthTwitterOptions } from './types/accounts-oauth-twitter-options'; export default AccountsOAuthTwitter; diff --git a/packages/oauth-twitter/src/types/accounts-oauth-twitter-options.ts b/packages/oauth-twitter/src/types/accounts-oauth-twitter-options.ts deleted file mode 100644 index 68a916a2a..000000000 --- a/packages/oauth-twitter/src/types/accounts-oauth-twitter-options.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface AccountsOAuthTwitterOptions { - key: string; - secret: string; -} \ No newline at end of file diff --git a/packages/oauth-twitter/src/types/configuration.ts b/packages/oauth-twitter/src/types/configuration.ts new file mode 100644 index 000000000..7732cf914 --- /dev/null +++ b/packages/oauth-twitter/src/types/configuration.ts @@ -0,0 +1,4 @@ +export interface Configuration { + key: string; + secret: string; +} \ No newline at end of file From 0c7f7b4512a7b39e33150f575ad3fc12bbc42820 Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Sun, 11 Mar 2018 16:54:41 +0100 Subject: [PATCH 014/128] Copy rest/packages/client => accounts/packages/rest-client --- packages/rest-client/.npmignore | 7 + packages/rest-client/README.md | 12 + packages/rest-client/__tests__/auth-fetch.ts | 51 ++++ packages/rest-client/__tests__/rest-client.ts | 251 ++++++++++++++++++ packages/rest-client/package.json | 61 +++++ packages/rest-client/src/auth-fetch.ts | 34 +++ packages/rest-client/src/index.ts | 2 + packages/rest-client/src/rest-client.ts | 195 ++++++++++++++ packages/rest-client/tsconfig.json | 16 ++ packages/rest-client/yarn.lock | 15 ++ 10 files changed, 644 insertions(+) create mode 100644 packages/rest-client/.npmignore create mode 100644 packages/rest-client/README.md create mode 100644 packages/rest-client/__tests__/auth-fetch.ts create mode 100644 packages/rest-client/__tests__/rest-client.ts create mode 100644 packages/rest-client/package.json create mode 100644 packages/rest-client/src/auth-fetch.ts create mode 100644 packages/rest-client/src/index.ts create mode 100644 packages/rest-client/src/rest-client.ts create mode 100644 packages/rest-client/tsconfig.json create mode 100644 packages/rest-client/yarn.lock diff --git a/packages/rest-client/.npmignore b/packages/rest-client/.npmignore new file mode 100644 index 000000000..987e688aa --- /dev/null +++ b/packages/rest-client/.npmignore @@ -0,0 +1,7 @@ +__tests__ +src/ +coverage/ +node_modules +.npmignore +tsconfig.json +yarn.lock \ No newline at end of file diff --git a/packages/rest-client/README.md b/packages/rest-client/README.md new file mode 100644 index 000000000..e4dbd96ed --- /dev/null +++ b/packages/rest-client/README.md @@ -0,0 +1,12 @@ +# @accounts/rest-client + +[![npm](https://img.shields.io/npm/v/@accounts/rest-client.svg?maxAge=2592000)](https://www.npmjs.com/package/@accounts/rest-client) +[![CircleCI](https://circleci.com/gh/accounts-js/rest.svg?style=shield)](https://circleci.com/gh/accounts-js/rest) +[![codecov](https://codecov.io/gh/accounts-js/rest/branch/master/graph/badge.svg)](https://codecov.io/gh/accounts-js/rest) +![MIT License](https://img.shields.io/badge/license-MIT-blue.svg) + +## Install + +``` +yarn add @accounts/rest-client +``` diff --git a/packages/rest-client/__tests__/auth-fetch.ts b/packages/rest-client/__tests__/auth-fetch.ts new file mode 100644 index 000000000..c890a7b1d --- /dev/null +++ b/packages/rest-client/__tests__/auth-fetch.ts @@ -0,0 +1,51 @@ +import fetch from 'node-fetch'; +import { authFetch } from '../src/auth-fetch'; + +window.fetch = jest.fn().mockImplementation(() => ({ + status: 200, + json: jest.fn().mockImplementation(() => ({ test: 'test' })), +})); + +describe('authFetch', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('should call fetch', async () => { + const accounts = { + refreshSession: jest.fn(() => Promise.resolve()), + tokens: jest.fn(() => Promise.resolve({})), + }; + await authFetch(accounts, 'path', {}); + expect(accounts.refreshSession).toBeCalled(); + expect(accounts.tokens).toBeCalled(); + }); + + it('should set access token header', async () => { + const accounts = { + refreshSession: jest.fn(() => Promise.resolve()), + tokens: jest.fn(() => Promise.resolve({ accessToken: 'accessToken' })), + }; + await authFetch(accounts, 'path', {}); + expect(accounts.refreshSession).toBeCalled(); + expect(accounts.tokens).toBeCalled(); + expect(window.fetch.mock.calls[0][1].headers['accounts-access-token']).toBe( + 'accessToken' + ); + }); + + it('should pass other headers', async () => { + const accounts = { + refreshSession: jest.fn(() => Promise.resolve()), + tokens: jest.fn(() => Promise.resolve({ accessToken: 'accessToken' })), + }; + await authFetch(accounts, 'path', { + headers: { + toto: 'toto', + }, + }); + expect(accounts.refreshSession).toBeCalled(); + expect(accounts.tokens).toBeCalled(); + expect(window.fetch.mock.calls[0][1].headers.toto).toBe('toto'); + }); +}); diff --git a/packages/rest-client/__tests__/rest-client.ts b/packages/rest-client/__tests__/rest-client.ts new file mode 100644 index 000000000..49a95e6fe --- /dev/null +++ b/packages/rest-client/__tests__/rest-client.ts @@ -0,0 +1,251 @@ +import fetch from 'node-fetch'; +import { RestClient } from '../src/rest-client'; + +window.fetch = jest.fn().mockImplementation(() => ({ + status: 200, + json: jest.fn().mockImplementation(() => ({ test: 'test' })), +})); + +window.Headers = fetch.Headers; + +describe('RestClient', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('should have a way to configure api host address and root path', () => { + const client = new RestClient({ + apiHost: 'http://localhost:3000/', + rootPath: 'accounts', + }); + + expect(client.options.apiHost).toBe('http://localhost:3000/'); + expect(client.options.rootPath).toBe('accounts'); + + return client.fetch('try').then(() => { + expect(window.fetch.mock.calls[0][0]).toBe( + 'http://localhost:3000/accounts/try' + ); + }); + }); + + describe('fetch', () => { + const client = new RestClient({ + apiHost: 'http://localhost:3000/', + rootPath: 'accounts', + }); + + it('should enable custom headers', () => + client + .fetch('route', {}, { origin: 'localhost:3000' }) + .then(() => + expect(window.fetch.mock.calls[0][1].headers.origin).toBe( + 'localhost:3000' + ) + )); + + it('should throw error', async () => { + window.fetch = jest.fn().mockImplementation(() => ({ + status: 400, + json: jest.fn().mockImplementation(() => ({ test: 'test' })), + })); + + try { + await client.fetch('route', {}, { origin: 'localhost:3000' }); + throw new Error(); + } catch (err) { + expect(window.fetch.mock.calls[0][1].headers.origin).toBe( + 'localhost:3000' + ); + } + window.fetch = jest.fn().mockImplementation(() => ({ + status: 200, + json: jest.fn().mockImplementation(() => ({ test: 'test' })), + })); + }); + + it('should throw if server did not return a response', async () => { + window.fetch = jest.fn().mockImplementation(() => null); + + try { + await client.fetch('route', {}, { origin: 'localhost:3000' }); + throw new Error(); + } catch (err) { + expect(window.fetch.mock.calls[0][1].headers.origin).toBe( + 'localhost:3000' + ); + expect(err.message).toBe('Server did not return a response'); + } + window.fetch = jest.fn().mockImplementation(() => ({ + status: 200, + json: jest.fn().mockImplementation(() => ({ test: 'test' })), + })); + }); + }); + + describe('loginWithService', () => { + const client = new RestClient({ + apiHost: 'http://localhost:3000', + rootPath: '/accounts', + }); + + it('should call fetch with authenticate path', async () => { + await client.loginWithService('password', { + user: { + username: 'toto', + }, + password: 'password', + }); + expect(window.fetch.mock.calls[0][0]).toBe( + 'http://localhost:3000/accounts/password/authenticate' + ); + expect(window.fetch.mock.calls[0][1].body).toBe( + '{"user":{"username":"toto"},"password":"password"}' + ); + }); + }); + + describe('impersonate', () => { + const client = new RestClient({ + apiHost: 'http://localhost:3000', + rootPath: '/accounts', + }); + + it('should call fetch with impersonate path', () => + client + .impersonate('token', 'user') + .then(() => + expect(window.fetch.mock.calls[0][0]).toBe( + 'http://localhost:3000/accounts/impersonate' + ) + )); + }); + + describe('refreshTokens', () => { + const client = new RestClient({ + apiHost: 'http://localhost:3000', + rootPath: '/accounts', + }); + + it('should call fetch with refreshTokens path', () => + client + .refreshTokens('accessToken', 'refreshToken') + .then(() => + expect(window.fetch.mock.calls[0][0]).toBe( + 'http://localhost:3000/accounts/refreshTokens' + ) + )); + }); + + describe('logout', () => { + const client = new RestClient({ + apiHost: 'http://localhost:3000', + rootPath: '/accounts', + }); + + it('should call fetch with logout path', () => + client + .logout('accessToken') + .then(() => + expect(window.fetch.mock.calls[0][0]).toBe( + 'http://localhost:3000/accounts/logout' + ) + )); + }); + + describe('getUser', () => { + const client = new RestClient({ + apiHost: 'http://localhost:3000', + rootPath: '/accounts', + }); + + it('should call fetch with user path', () => + client + .getUser('accessToken') + .then(() => + expect(window.fetch.mock.calls[0][0]).toBe( + 'http://localhost:3000/accounts/user' + ) + )); + }); + + describe('createUser', () => { + const client = new RestClient({ + apiHost: 'http://localhost:3000', + rootPath: '/accounts', + }); + + it('should call fetch with register path', () => + client + .createUser('user') + .then(() => + expect(window.fetch.mock.calls[0][0]).toBe( + 'http://localhost:3000/accounts/password/register' + ) + )); + }); + + describe('resetPassword', () => { + const client = new RestClient({ + apiHost: 'http://localhost:3000', + rootPath: '/accounts', + }); + + it('should call fetch with resetPassword path', () => + client + .resetPassword('token', 'resetPassword') + .then(() => + expect(window.fetch.mock.calls[0][0]).toBe( + 'http://localhost:3000/accounts/password/resetPassword' + ) + )); + }); + + describe('verifyEmail', () => { + const client = new RestClient({ + apiHost: 'http://localhost:3000', + rootPath: '/accounts', + }); + + it('should call fetch with verifyEmail path', () => + client + .verifyEmail('token') + .then(() => + expect(window.fetch.mock.calls[0][0]).toBe( + 'http://localhost:3000/accounts/password/verifyEmail' + ) + )); + }); + + describe('sendVerificationEmail', () => { + const client = new RestClient({ + apiHost: 'http://localhost:3000', + rootPath: '/accounts', + }); + + it('should call fetch with verifyEmail path', () => + client + .sendVerificationEmail('email') + .then(() => + expect(window.fetch.mock.calls[0][0]).toBe( + 'http://localhost:3000/accounts/password/sendVerificationEmail' + ) + )); + }); + + describe('sendResetPasswordEmail', () => { + const client = new RestClient({ + apiHost: 'http://localhost:3000', + rootPath: '/accounts', + }); + + it('should call fetch with verifyEmail path', () => + client + .sendResetPasswordEmail('email') + .then(() => + expect(window.fetch.mock.calls[0][0]).toBe( + 'http://localhost:3000/accounts/password/sendResetPasswordEmail' + ) + )); + }); +}); diff --git a/packages/rest-client/package.json b/packages/rest-client/package.json new file mode 100644 index 000000000..d6ae191e2 --- /dev/null +++ b/packages/rest-client/package.json @@ -0,0 +1,61 @@ +{ + "name": "@accounts/rest-client", + "version": "0.1.0-beta.2", + "description": "REST client for accounts", + "main": "lib/index", + "typings": "lib/index", + "publishConfig": { + "access": "public" + }, + "scripts": { + "start": "tsc --watch", + "precompile": "rimraf ./lib", + "compile": "tsc", + "prepublish": "npm run compile", + "test": "npm run testonly", + "testonly": "jest", + "coverage": "npm run testonly -- --coverage", + "coveralls": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage" + }, + "jest": { + "testEnvironment": "jsdom", + "transform": { + ".(ts|tsx)": "/../../node_modules/ts-jest/preprocessor.js" + }, + "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx)$", + "moduleFileExtensions": [ + "ts", + "js" + ], + "mapCoverage": true + }, + "repository": { + "type": "git", + "url": "https://github.com/js-accounts/rest/tree/master/packages/rest-client" + }, + "keywords": [ + "rest", + "graphql", + "grant", + "auth", + "authentication", + "accounts", + "users", + "oauth" + ], + "author": "Tim Mikeladze", + "license": "MIT", + "devDependencies": { + "@accounts/client": "0.1.0-beta.3", + "@accounts/common": "0.1.0-beta.3", + "@types/lodash": "4.14.104", + "node-fetch": "2.1.1" + }, + "peerDependencies": { + "@accounts/client": "^0.1.0-beta.0", + "@accounts/common": "^0.1.0-beta.0" + }, + "dependencies": { + "lodash": "^4.17.4" + } +} diff --git a/packages/rest-client/src/auth-fetch.ts b/packages/rest-client/src/auth-fetch.ts new file mode 100644 index 000000000..37599432a --- /dev/null +++ b/packages/rest-client/src/auth-fetch.ts @@ -0,0 +1,34 @@ +import { forIn } from 'lodash'; +import { AccountsClient } from '@accounts/client'; + +const headers: { [key: string]: string } = { + 'Content-Type': 'application/json', +}; + +export const authFetch = async ( + accounts: AccountsClient, + path: string, + request: any +) => { + await accounts.refreshSession(); + const { accessToken } = await accounts.tokens(); + const headersCopy = { ...headers }; + + if (accessToken) { + headersCopy['accounts-access-token'] = accessToken; + } + + /* tslint:disable no-string-literal */ + if (request['headers']) { + forIn(request['headers'], (v: string, k: string) => { + headersCopy[v] = k; + }); + } + /* tslint:enable no-string-literal */ + + const fetchOptions = { + ...request, + headers: headersCopy, + }; + return fetch(path, fetchOptions); +}; diff --git a/packages/rest-client/src/index.ts b/packages/rest-client/src/index.ts new file mode 100644 index 000000000..5f16eacb7 --- /dev/null +++ b/packages/rest-client/src/index.ts @@ -0,0 +1,2 @@ +export { RestClient } from './rest-client'; +export { authFetch } from './auth-fetch'; diff --git a/packages/rest-client/src/rest-client.ts b/packages/rest-client/src/rest-client.ts new file mode 100644 index 000000000..75d8cb72b --- /dev/null +++ b/packages/rest-client/src/rest-client.ts @@ -0,0 +1,195 @@ +import { forIn, isPlainObject } from 'lodash'; +import { TransportInterface, AccountsClient } from '@accounts/client'; +import { + AccountsError, + CreateUserType, + LoginReturnType, + UserObjectType, + ImpersonateReturnType, +} from '@accounts/common'; + +export interface OptionsType { + apiHost: string; + rootPath: string; +} + +const headers: { [key: string]: string } = { + 'Content-Type': 'application/json', +}; + +export class RestClient implements TransportInterface { + private options: OptionsType; + + constructor(options: OptionsType) { + this.options = options; + } + + public async fetch( + route: string, + args: object, + customHeaders: object = {} + ): Promise { + const fetchOptions = { + headers: this._loadHeadersObject(customHeaders), + ...args, + }; + const res = await fetch( + `${this.options.apiHost}${this.options.rootPath}/${route}`, + fetchOptions + ); + + if (res) { + if (res.status >= 400 && res.status < 600) { + const { message, loginInfo, errorCode } = await res.json(); + throw new AccountsError(message, loginInfo, errorCode); + } + return res.json(); + } else { + throw new Error('Server did not return a response'); + } + } + + public loginWithService( + provider: string, + data: any, + customHeaders?: object + ): Promise { + const args = { + method: 'POST', + body: JSON.stringify({ + ...data, + }), + }; + return this.fetch(`${provider}/authenticate`, args, customHeaders); + } + + public impersonate( + accessToken: string, + username: string, + customHeaders?: object + ): Promise { + const args = { + method: 'POST', + body: JSON.stringify({ + accessToken, + username, + }), + }; + return this.fetch('impersonate', args, customHeaders); + } + + public refreshTokens( + accessToken: string, + refreshToken: string, + customHeaders?: object + ): Promise { + const args = { + method: 'POST', + body: JSON.stringify({ + accessToken, + refreshToken, + }), + }; + return this.fetch('refreshTokens', args, customHeaders); + } + + public logout(accessToken: string, customHeaders?: object): Promise { + const args = { + method: 'POST', + body: JSON.stringify({ + accessToken, + }), + }; + return this.fetch('logout', args, customHeaders); + } + + public async getUser( + accessToken: string, + customHeaders?: object + ): Promise { + const args = { + method: 'POST', + body: JSON.stringify({ + accessToken, + }), + }; + return this.fetch('user', args, customHeaders); + } + + public async createUser( + user: CreateUserType, + customHeaders?: object + ): Promise { + const args = { + method: 'POST', + body: JSON.stringify({ user }), + }; + return this.fetch('password/register', args, customHeaders); + } + + public resetPassword( + token: string, + newPassword: string, + customHeaders?: object + ): Promise { + const args = { + method: 'POST', + body: JSON.stringify({ + token, + newPassword, + }), + }; + return this.fetch('password/resetPassword', args, customHeaders); + } + + public verifyEmail(token: string, customHeaders?: object): Promise { + const args = { + method: 'POST', + body: JSON.stringify({ + token, + }), + }; + return this.fetch('password/verifyEmail', args, customHeaders); + } + + public sendVerificationEmail( + email: string, + customHeaders?: object + ): Promise { + const args = { + method: 'POST', + body: JSON.stringify({ + email, + }), + }; + return this.fetch('password/sendVerificationEmail', args, customHeaders); + } + + public sendResetPasswordEmail( + email: string, + customHeaders?: object + ): Promise { + const args = { + method: 'POST', + body: JSON.stringify({ + email, + }), + }; + return this.fetch('password/sendResetPasswordEmail', args, customHeaders); + } + + private _loadHeadersObject(plainHeaders: object): { [key: string]: string } { + if (isPlainObject(plainHeaders)) { + const customHeaders = headers; + forIn(plainHeaders, (v: string, k: string) => { + customHeaders[k] = v; + }); + + return customHeaders; + } + + return headers; + } +} + +export default RestClient; diff --git a/packages/rest-client/tsconfig.json b/packages/rest-client/tsconfig.json new file mode 100644 index 000000000..e0945a464 --- /dev/null +++ b/packages/rest-client/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../../tsconfig", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./lib", + "lib": ["dom", "es6", "es2015", "es2016", "es2017"], + "typeRoots": [ + "node_modules/@types" + ] + }, + "exclude": [ + "node_modules", + "__tests__", + "lib" + ] +} diff --git a/packages/rest-client/yarn.lock b/packages/rest-client/yarn.lock new file mode 100644 index 000000000..6a982f55b --- /dev/null +++ b/packages/rest-client/yarn.lock @@ -0,0 +1,15 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/lodash@4.14.104": + version "4.14.104" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.104.tgz#53ee2357fa2e6e68379341d92eb2ecea4b11bb80" + +lodash@^4.17.4: + version "4.17.5" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511" + +node-fetch@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.1.1.tgz#369ca70b82f50c86496104a6c776d274f4e4a2d4" From 56480b38421a0266bee6ac16115a7457fa8c1bf1 Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Sun, 11 Mar 2018 16:57:03 +0100 Subject: [PATCH 015/128] TSLint : allow tests to use dependencies listed only in devDependencies --- tslint.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tslint.json b/tslint.json index 785fd5f61..7befafb1d 100644 --- a/tslint.json +++ b/tslint.json @@ -3,6 +3,7 @@ "@accounts/tslint-config-accounts" ], "rules": { - "no-submodule-imports": [true, "lodash", "@accounts/server"] + "no-submodule-imports": [true, "lodash", "@accounts/server"], + "no-implicit-dependencies": [true, "dev"] } } From b88caabe901df3f847b4652fd4586e48bfa092c7 Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Sun, 11 Mar 2018 16:58:00 +0100 Subject: [PATCH 016/128] Copy rest/packages/express => accounts/packages/rest-express --- packages/rest-express/.npmignore | 7 + packages/rest-express/README.md | 12 + .../__tests__/endpoints/get-user.ts | 61 +++ .../__tests__/endpoints/impersonate.ts | 73 ++++ .../__tests__/endpoints/logout.ts | 56 +++ .../endpoints/oauth/provider-callback.ts | 72 ++++ .../__tests__/endpoints/password/register.ts | 79 ++++ .../__tests__/endpoints/password/reset.ts | 143 +++++++ .../endpoints/password/verify-email.ts | 141 +++++++ .../endpoints/refresh-access-token.ts | 75 ++++ .../endpoints/service-authenticate.ts | 67 ++++ .../__tests__/express-middleware.ts | 76 ++++ .../rest-express/__tests__/user-loader.ts | 61 +++ .../__tests__/utils/get-user-agent.ts | 23 ++ packages/rest-express/package.json | 60 +++ .../rest-express/src/endpoints/get-user.ts | 16 + .../rest-express/src/endpoints/impersonate.ts | 25 ++ packages/rest-express/src/endpoints/logout.ts | 16 + .../src/endpoints/oauth/provider-callback.ts | 32 ++ .../src/endpoints/password/register.ts | 16 + .../src/endpoints/password/reset.ts | 30 ++ .../src/endpoints/password/verify-email.ts | 31 ++ .../src/endpoints/refresh-access-token.ts | 25 ++ .../src/endpoints/service-authenticate.ts | 24 ++ .../rest-express/src/express-middleware.ts | 88 +++++ packages/rest-express/src/index.ts | 3 + packages/rest-express/src/user-loader.ts | 23 ++ .../rest-express/src/utils/get-user-agent.ts | 10 + packages/rest-express/src/utils/send-error.ts | 6 + packages/rest-express/tsconfig.json | 15 + packages/rest-express/yarn.lock | 364 ++++++++++++++++++ 31 files changed, 1730 insertions(+) create mode 100644 packages/rest-express/.npmignore create mode 100644 packages/rest-express/README.md create mode 100644 packages/rest-express/__tests__/endpoints/get-user.ts create mode 100644 packages/rest-express/__tests__/endpoints/impersonate.ts create mode 100644 packages/rest-express/__tests__/endpoints/logout.ts create mode 100644 packages/rest-express/__tests__/endpoints/oauth/provider-callback.ts create mode 100644 packages/rest-express/__tests__/endpoints/password/register.ts create mode 100644 packages/rest-express/__tests__/endpoints/password/reset.ts create mode 100644 packages/rest-express/__tests__/endpoints/password/verify-email.ts create mode 100644 packages/rest-express/__tests__/endpoints/refresh-access-token.ts create mode 100644 packages/rest-express/__tests__/endpoints/service-authenticate.ts create mode 100644 packages/rest-express/__tests__/express-middleware.ts create mode 100644 packages/rest-express/__tests__/user-loader.ts create mode 100644 packages/rest-express/__tests__/utils/get-user-agent.ts create mode 100644 packages/rest-express/package.json create mode 100644 packages/rest-express/src/endpoints/get-user.ts create mode 100644 packages/rest-express/src/endpoints/impersonate.ts create mode 100644 packages/rest-express/src/endpoints/logout.ts create mode 100644 packages/rest-express/src/endpoints/oauth/provider-callback.ts create mode 100644 packages/rest-express/src/endpoints/password/register.ts create mode 100644 packages/rest-express/src/endpoints/password/reset.ts create mode 100644 packages/rest-express/src/endpoints/password/verify-email.ts create mode 100644 packages/rest-express/src/endpoints/refresh-access-token.ts create mode 100644 packages/rest-express/src/endpoints/service-authenticate.ts create mode 100644 packages/rest-express/src/express-middleware.ts create mode 100644 packages/rest-express/src/index.ts create mode 100644 packages/rest-express/src/user-loader.ts create mode 100644 packages/rest-express/src/utils/get-user-agent.ts create mode 100644 packages/rest-express/src/utils/send-error.ts create mode 100644 packages/rest-express/tsconfig.json create mode 100644 packages/rest-express/yarn.lock diff --git a/packages/rest-express/.npmignore b/packages/rest-express/.npmignore new file mode 100644 index 000000000..987e688aa --- /dev/null +++ b/packages/rest-express/.npmignore @@ -0,0 +1,7 @@ +__tests__ +src/ +coverage/ +node_modules +.npmignore +tsconfig.json +yarn.lock \ No newline at end of file diff --git a/packages/rest-express/README.md b/packages/rest-express/README.md new file mode 100644 index 000000000..eb5650079 --- /dev/null +++ b/packages/rest-express/README.md @@ -0,0 +1,12 @@ +# @accounts/rest-express + +[![npm](https://img.shields.io/npm/v/@accounts/rest-express.svg?maxAge=2592000)](https://www.npmjs.com/package/@accounts/rest-express) +[![CircleCI](https://circleci.com/gh/accounts-js/rest.svg?style=shield)](https://circleci.com/gh/accounts-js/rest) +[![codecov](https://codecov.io/gh/accounts-js/rest/branch/master/graph/badge.svg)](https://codecov.io/gh/accounts-js/rest) +![MIT License](https://img.shields.io/badge/license-MIT-blue.svg) + +## Install + +``` +yarn add @accounts/rest-express +``` diff --git a/packages/rest-express/__tests__/endpoints/get-user.ts b/packages/rest-express/__tests__/endpoints/get-user.ts new file mode 100644 index 000000000..f4ac97f69 --- /dev/null +++ b/packages/rest-express/__tests__/endpoints/get-user.ts @@ -0,0 +1,61 @@ +import { getUser } from '../../src/endpoints/get-user'; + +const res = { + json: jest.fn(), + status: jest.fn(() => res), +}; + +describe('getUser', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('calls getUser and returns the user json response', async () => { + const user = { + id: '1', + }; + const accountsServer = { + resumeSession: jest.fn(() => user), + }; + const middleware = getUser(accountsServer as any); + + const req = { + body: { + accessToken: 'token', + }, + headers: {}, + }; + const reqCopy = { ...req }; + + await middleware(req, res); + + expect(req).toEqual(reqCopy); + expect(accountsServer.resumeSession).toBeCalledWith('token'); + expect(res.json).toBeCalledWith(user); + expect(res.status).not.toBeCalled(); + }); + + it('Sends error if it was thrown on getUser', async () => { + const error = { message: 'Could not get user' }; + const accountsServer = { + resumeSession: jest.fn(() => { + throw error; + }), + }; + const middleware = getUser(accountsServer as any); + const req = { + body: { + accessToken: 'token', + }, + headers: {}, + }; + const reqCopy = { ...req }; + + await middleware(req, res); + + expect(req).toEqual(reqCopy); + expect(accountsServer.resumeSession).toBeCalledWith('token'); + expect(res.status).toBeCalledWith(400); + expect(res.json).toBeCalledWith(error); + }); +}); diff --git a/packages/rest-express/__tests__/endpoints/impersonate.ts b/packages/rest-express/__tests__/endpoints/impersonate.ts new file mode 100644 index 000000000..8c59e9781 --- /dev/null +++ b/packages/rest-express/__tests__/endpoints/impersonate.ts @@ -0,0 +1,73 @@ +import { impersonate } from '../../src/endpoints/impersonate'; + +const res = { + json: jest.fn(), + status: jest.fn(() => res), +}; + +describe('impersonate', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('calls impersonate and returns the impersonate json response', async () => { + const impersonateReturnType = { + id: '1', + }; + const accountsServer = { + impersonate: jest.fn(() => impersonateReturnType), + }; + const middleware = impersonate(accountsServer as any); + + const req = { + body: { + username: 'toto', + accessToken: 'token', + }, + headers: {}, + }; + const reqCopy = { ...req }; + + await middleware(req, res); + + expect(req).toEqual(reqCopy); + expect(accountsServer.impersonate).toBeCalledWith( + 'token', + 'toto', + null, + '' + ); + expect(res.json).toBeCalledWith(impersonateReturnType); + expect(res.status).not.toBeCalled(); + }); + + it('Sends error if it was thrown on impersonate', async () => { + const error = { message: 'Could not impersonate' }; + const accountsServer = { + impersonate: jest.fn(() => { + throw error; + }), + }; + const middleware = impersonate(accountsServer as any); + const req = { + body: { + username: 'toto', + accessToken: 'token', + }, + headers: {}, + }; + const reqCopy = { ...req }; + + await middleware(req, res); + + expect(req).toEqual(reqCopy); + expect(accountsServer.impersonate).toBeCalledWith( + 'token', + 'toto', + null, + '' + ); + expect(res.status).toBeCalledWith(400); + expect(res.json).toBeCalledWith(error); + }); +}); diff --git a/packages/rest-express/__tests__/endpoints/logout.ts b/packages/rest-express/__tests__/endpoints/logout.ts new file mode 100644 index 000000000..9a375c6df --- /dev/null +++ b/packages/rest-express/__tests__/endpoints/logout.ts @@ -0,0 +1,56 @@ +import { logout } from '../../src/endpoints/logout'; + +const res = { + json: jest.fn(), + status: jest.fn(() => res), +}; + +describe('logout', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('calls logout and returns a message if when logged out successfuly', async () => { + const accountsServer = { + logout: jest.fn(), + }; + const middleware = logout(accountsServer as any); + + const req = { + body: { + accessToken: 'token', + }, + }; + const reqCopy = { ...req }; + + await middleware(req, res); + + expect(req).toEqual(reqCopy); + expect(accountsServer.logout).toBeCalledWith('token'); + expect(res.json).toBeCalledWith({ message: 'Logged out' }); + expect(res.status).not.toBeCalled(); + }); + + it('Sends error if it was thrown on logout', async () => { + const error = { message: 'Could not logout' }; + const accountsServer = { + logout: jest.fn(() => { + throw error; + }), + }; + const middleware = logout(accountsServer as any); + const req = { + body: { + accessToken: 'token', + }, + }; + const reqCopy = { ...req }; + + await middleware(req, res); + + expect(req).toEqual(reqCopy); + expect(accountsServer.logout).toBeCalledWith('token'); + expect(res.status).toBeCalledWith(400); + expect(res.json).toBeCalledWith(error); + }); +}); diff --git a/packages/rest-express/__tests__/endpoints/oauth/provider-callback.ts b/packages/rest-express/__tests__/endpoints/oauth/provider-callback.ts new file mode 100644 index 000000000..f7a8002f2 --- /dev/null +++ b/packages/rest-express/__tests__/endpoints/oauth/provider-callback.ts @@ -0,0 +1,72 @@ +import { providerCallback } from '../../../src/endpoints/oauth/provider-callback'; + +const res = { + json: jest.fn(), + status: jest.fn(() => res), +}; + +describe('providerCallback', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('calls loginWithService and returns the user json response', async () => { + const user = { + id: '1', + }; + const accountsServer = { + loginWithService: jest.fn(() => user), + }; + const middleware = providerCallback(accountsServer as any); + + const req = { + params: { + accessToken: 'token', + }, + query: { + accessTokenSecret: 'secret', + }, + headers: {}, + }; + const reqCopy = { ...req }; + + await middleware(req, res); + + expect(req).toEqual(reqCopy); + expect(accountsServer.loginWithService).toBeCalledWith( + 'oauth', + { accessToken: 'token', accessTokenSecret: 'secret' }, + { ip: null, userAgent: '' } + ); + expect(res.json).toBeCalledWith(user); + expect(res.status).not.toBeCalled(); + }); + + it('Sends error if it was thrown on loginWithService', async () => { + const error = { message: 'Could not login' }; + const accountsServer = { + loginWithService: jest.fn(() => { + throw error; + }), + }; + const middleware = providerCallback(accountsServer as any); + const req = { + params: { + accessToken: 'token', + }, + headers: {}, + }; + const reqCopy = { ...req }; + + await middleware(req, res); + + expect(req).toEqual(reqCopy); + expect(accountsServer.loginWithService).toBeCalledWith( + 'oauth', + { accessToken: 'token' }, + { ip: null, userAgent: '' } + ); + expect(res.status).toBeCalledWith(400); + expect(res.json).toBeCalledWith(error); + }); +}); diff --git a/packages/rest-express/__tests__/endpoints/password/register.ts b/packages/rest-express/__tests__/endpoints/password/register.ts new file mode 100644 index 000000000..660ca2008 --- /dev/null +++ b/packages/rest-express/__tests__/endpoints/password/register.ts @@ -0,0 +1,79 @@ +import { registerPassword } from '../../../src/endpoints/password/register'; + +const res = { + json: jest.fn(), + status: jest.fn(() => res), +}; + +describe('registerPassword', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('calls password.createUser and returns the user json response', async () => { + const userId = '1'; + const passwordService = { + createUser: jest.fn(() => userId), + }; + const accountsServer = { + getServices: () => ({ + password: passwordService, + }), + }; + const middleware = registerPassword(accountsServer as any); + + const req = { + body: { + user: { + username: 'toto', + }, + extraFieldThatShouldNotBePassed: 'hey', + }, + headers: {}, + }; + const reqCopy = { ...req }; + + await middleware(req, res); + + expect(req).toEqual(reqCopy); + expect(accountsServer.getServices().password.createUser).toBeCalledWith({ + username: 'toto', + }); + expect(res.json).toBeCalledWith({ userId: '1' }); + expect(res.status).not.toBeCalled(); + }); + + it('Sends error if it was thrown on loginWithService', async () => { + const error = { message: 'Could not login' }; + const passwordService = { + createUser: jest.fn(() => { + throw error; + }), + }; + const accountsServer = { + getServices: () => ({ + password: passwordService, + }), + }; + const middleware = registerPassword(accountsServer as any); + const req = { + body: { + user: { + username: 'toto', + }, + extraFieldThatShouldNotBePassed: 'hey', + }, + headers: {}, + }; + const reqCopy = { ...req }; + + await middleware(req, res); + + expect(req).toEqual(reqCopy); + expect(accountsServer.getServices().password.createUser).toBeCalledWith({ + username: 'toto', + }); + expect(res.status).toBeCalledWith(400); + expect(res.json).toBeCalledWith(error); + }); +}); diff --git a/packages/rest-express/__tests__/endpoints/password/reset.ts b/packages/rest-express/__tests__/endpoints/password/reset.ts new file mode 100644 index 000000000..450c2db1e --- /dev/null +++ b/packages/rest-express/__tests__/endpoints/password/reset.ts @@ -0,0 +1,143 @@ +import { + resetPassword, + sendResetPasswordEmail, +} from '../../../src/endpoints/password/reset'; + +const res = { + json: jest.fn(), + status: jest.fn(() => res), +}; + +describe('resetPassword', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + describe('resetPassword', () => { + it('calls password.resetPassword and returns a message', async () => { + const message = 'Password changed'; + const passwordService = { + resetPassword: jest.fn(() => null), + }; + const accountsServer = { + getServices: () => ({ + password: passwordService, + }), + }; + const middleware = resetPassword(accountsServer as any); + + const req = { + body: { + token: 'token', + newPassword: 'new-password', + }, + headers: {}, + }; + const reqCopy = { ...req }; + + await middleware(req, res); + + expect(req).toEqual(reqCopy); + expect( + accountsServer.getServices().password.resetPassword + ).toBeCalledWith('token', 'new-password'); + expect(res.json).toBeCalledWith({ message }); + expect(res.status).not.toBeCalled(); + }); + + it('Sends error if it was thrown on resetPassword', async () => { + const error = { message: 'Could not reset password' }; + const passwordService = { + resetPassword: jest.fn(() => { + throw error; + }), + }; + const accountsServer = { + getServices: () => ({ + password: passwordService, + }), + }; + const middleware = resetPassword(accountsServer as any); + const req = { + body: { + token: 'token', + newPassword: 'new-password', + }, + headers: {}, + }; + const reqCopy = { ...req }; + + await middleware(req, res); + + expect(req).toEqual(reqCopy); + expect( + accountsServer.getServices().password.resetPassword + ).toBeCalledWith('token', 'new-password'); + expect(res.status).toBeCalledWith(400); + expect(res.json).toBeCalledWith(error); + }); + }); + + describe('sendResetPasswordEmail', () => { + it('calls password.sendResetPasswordEmail and returns a message', async () => { + const message = 'Email sent'; + const passwordService = { + sendResetPasswordEmail: jest.fn(() => null), + }; + const accountsServer = { + getServices: () => ({ + password: passwordService, + }), + }; + const middleware = sendResetPasswordEmail(accountsServer as any); + + const req = { + body: { + email: 'email', + }, + headers: {}, + }; + const reqCopy = { ...req }; + + await middleware(req, res); + + expect(req).toEqual(reqCopy); + expect( + accountsServer.getServices().password.sendResetPasswordEmail + ).toBeCalledWith('email'); + expect(res.json).toBeCalledWith({ message }); + expect(res.status).not.toBeCalled(); + }); + + it('Sends error if it was thrown on sendResetPasswordEmail', async () => { + const error = { message: 'Could not send reset password' }; + const passwordService = { + sendResetPasswordEmail: jest.fn(() => { + throw error; + }), + }; + const accountsServer = { + getServices: () => ({ + password: passwordService, + }), + }; + const middleware = sendResetPasswordEmail(accountsServer as any); + const req = { + body: { + email: 'email', + }, + headers: {}, + }; + const reqCopy = { ...req }; + + await middleware(req, res); + + expect(req).toEqual(reqCopy); + expect( + accountsServer.getServices().password.sendResetPasswordEmail + ).toBeCalledWith('email'); + expect(res.status).toBeCalledWith(400); + expect(res.json).toBeCalledWith(error); + }); + }); +}); diff --git a/packages/rest-express/__tests__/endpoints/password/verify-email.ts b/packages/rest-express/__tests__/endpoints/password/verify-email.ts new file mode 100644 index 000000000..fb31379ae --- /dev/null +++ b/packages/rest-express/__tests__/endpoints/password/verify-email.ts @@ -0,0 +1,141 @@ +import { + verifyEmail, + sendVerificationEmail, +} from '../../../src/endpoints/password/verify-email'; + +const res = { + json: jest.fn(), + status: jest.fn(() => res), +}; + +describe('verifyEmail', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + describe('verifyEmail', () => { + it('calls password.verifyEmail and returns a message', async () => { + const message = 'Email verified'; + const passwordService = { + verifyEmail: jest.fn(() => null), + }; + const accountsServer = { + getServices: () => ({ + password: passwordService, + }), + }; + const middleware = verifyEmail(accountsServer as any); + + const req = { + body: { + token: 'token', + }, + headers: {}, + }; + const reqCopy = { ...req }; + + await middleware(req, res); + + expect(req).toEqual(reqCopy); + expect(accountsServer.getServices().password.verifyEmail).toBeCalledWith( + 'token' + ); + expect(res.json).toBeCalledWith({ message }); + expect(res.status).not.toBeCalled(); + }); + + it('Sends error if it was thrown on verifyEmail', async () => { + const error = { message: 'Could not verify email' }; + const passwordService = { + verifyEmail: jest.fn(() => { + throw error; + }), + }; + const accountsServer = { + getServices: () => ({ + password: passwordService, + }), + }; + const middleware = verifyEmail(accountsServer as any); + const req = { + body: { + token: 'token', + }, + headers: {}, + }; + const reqCopy = { ...req }; + + await middleware(req, res); + + expect(req).toEqual(reqCopy); + expect(accountsServer.getServices().password.verifyEmail).toBeCalledWith( + 'token' + ); + expect(res.status).toBeCalledWith(400); + expect(res.json).toBeCalledWith(error); + }); + }); + + describe('sendVerificationEmail', () => { + it('calls password.sendVerificationEmail and returns a message', async () => { + const message = 'Email sent'; + const passwordService = { + sendVerificationEmail: jest.fn(() => null), + }; + const accountsServer = { + getServices: () => ({ + password: passwordService, + }), + }; + const middleware = sendVerificationEmail(accountsServer as any); + + const req = { + body: { + email: 'email', + }, + headers: {}, + }; + const reqCopy = { ...req }; + + await middleware(req, res); + + expect(req).toEqual(reqCopy); + expect( + accountsServer.getServices().password.sendVerificationEmail + ).toBeCalledWith('email'); + expect(res.json).toBeCalledWith({ message }); + expect(res.status).not.toBeCalled(); + }); + + it('Sends error if it was thrown on sendVerificationEmail', async () => { + const error = { message: 'Could not send verification email' }; + const passwordService = { + sendVerificationEmail: jest.fn(() => { + throw error; + }), + }; + const accountsServer = { + getServices: () => ({ + password: passwordService, + }), + }; + const middleware = sendVerificationEmail(accountsServer as any); + const req = { + body: { + email: 'email', + }, + headers: {}, + }; + const reqCopy = { ...req }; + + await middleware(req, res); + + expect(req).toEqual(reqCopy); + expect( + accountsServer.getServices().password.sendVerificationEmail + ).toBeCalledWith('email'); + expect(res.status).toBeCalledWith(400); + expect(res.json).toBeCalledWith(error); + }); + }); +}); diff --git a/packages/rest-express/__tests__/endpoints/refresh-access-token.ts b/packages/rest-express/__tests__/endpoints/refresh-access-token.ts new file mode 100644 index 000000000..d97b3dcfe --- /dev/null +++ b/packages/rest-express/__tests__/endpoints/refresh-access-token.ts @@ -0,0 +1,75 @@ +import { refreshAccessToken } from '../../src/endpoints/refresh-access-token'; + +const res = { + json: jest.fn(), + status: jest.fn(() => res), +}; + +describe('refreshAccessToken', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('calls refreshTokens and returns the session in json format', async () => { + const session = { + user: { + id: '1', + }, + }; + const accountsServer = { + refreshTokens: jest.fn(() => session), + }; + const middleware = refreshAccessToken(accountsServer as any); + + const req = { + headers: {}, + body: { + accessToken: 'token', + refreshToken: 'refresh', + }, + }; + const reqCopy = { ...req }; + + await middleware(req, res); + + expect(accountsServer.refreshTokens).toBeCalledWith( + 'token', + 'refresh', + null, + '' + ); + expect(req).toEqual(reqCopy); + expect(res.json).toBeCalledWith(session); + expect(res.status).not.toBeCalled(); + }); + + it('Sends error if it was thrown on refreshTokens', async () => { + const error = { message: 'error' }; + const accountsServer = { + refreshTokens: jest.fn(() => { + throw error; + }), + }; + const middleware = refreshAccessToken(accountsServer as any); + const req = { + headers: {}, + body: { + accessToken: 'token', + refreshToken: 'refresh', + }, + }; + const reqCopy = { ...req }; + + await middleware(req, res); + + expect(req).toEqual(reqCopy); + expect(accountsServer.refreshTokens).toBeCalledWith( + 'token', + 'refresh', + null, + '' + ); + expect(res.status).toBeCalledWith(400); + expect(res.json).toBeCalledWith(error); + }); +}); diff --git a/packages/rest-express/__tests__/endpoints/service-authenticate.ts b/packages/rest-express/__tests__/endpoints/service-authenticate.ts new file mode 100644 index 000000000..3873ff667 --- /dev/null +++ b/packages/rest-express/__tests__/endpoints/service-authenticate.ts @@ -0,0 +1,67 @@ +import { serviceAuthenticate } from '../../src/endpoints/service-authenticate'; + +const res = { + json: jest.fn(), + status: jest.fn(() => res), +}; + +describe('serviceAuthenticate', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('calls loginWithService and returns the user in json format', async () => { + const user = { + id: '1', + }; + const accountsServer = { + loginWithService: jest.fn(() => user), + }; + const middleware = serviceAuthenticate(accountsServer as any); + + const req = { + params: { + service: 'sms', + }, + headers: {}, + }; + const reqCopy = { ...req }; + + await middleware(req, res); + + expect(req).toEqual(reqCopy); + expect(accountsServer.loginWithService).toBeCalledWith('sms', undefined, { + ip: null, + userAgent: '', + }); + expect(res.json).toBeCalledWith(user); + expect(res.status).not.toBeCalled(); + }); + + it('Sends error if it was thrown on loginWithService', async () => { + const error = { message: 'Could not login' }; + const accountsServer = { + loginWithService: jest.fn(() => { + throw error; + }), + }; + const middleware = serviceAuthenticate(accountsServer as any); + const req = { + params: { + service: 'sms', + }, + headers: {}, + }; + const reqCopy = { ...req }; + + await middleware(req, res); + + expect(req).toEqual(reqCopy); + expect(accountsServer.loginWithService).toBeCalledWith('sms', undefined, { + ip: null, + userAgent: '', + }); + expect(res.status).toBeCalledWith(400); + expect(res.json).toBeCalledWith(error); + }); +}); diff --git a/packages/rest-express/__tests__/express-middleware.ts b/packages/rest-express/__tests__/express-middleware.ts new file mode 100644 index 000000000..6bca1701c --- /dev/null +++ b/packages/rest-express/__tests__/express-middleware.ts @@ -0,0 +1,76 @@ +import accountsExpress from '../src'; +import * as express from 'express'; + +jest.mock('express', () => { + const mockRouter = { + post: jest.fn(), + get: jest.fn(), + }; + return { + Router: () => mockRouter, + }; +}); + +const router = express.Router(); + +describe('express middleware', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('Defines default endpoints on given path fragment', () => { + accountsExpress( + { + getServices: () => ({}), + } as any, + { path: 'test' } + ); + expect(router.post.mock.calls[0][0]).toBe('test/impersonate'); + expect(router.post.mock.calls[1][0]).toBe('test/user'); + expect(router.post.mock.calls[2][0]).toBe('test/refreshTokens'); + expect(router.post.mock.calls[3][0]).toBe('test/logout'); + expect(router.post.mock.calls[4][0]).toBe('test/:service/authenticate'); + }); + + it('Defines password endpoints when password service is present', () => { + accountsExpress( + { + getServices: () => ({ + password: {}, + }), + } as any, + { path: 'test' } + ); + expect(router.post.mock.calls[0][0]).toBe('test/impersonate'); + expect(router.post.mock.calls[1][0]).toBe('test/user'); + expect(router.post.mock.calls[2][0]).toBe('test/refreshTokens'); + expect(router.post.mock.calls[3][0]).toBe('test/logout'); + expect(router.post.mock.calls[4][0]).toBe('test/:service/authenticate'); + expect(router.post.mock.calls[5][0]).toBe('test/password/register'); + expect(router.post.mock.calls[6][0]).toBe('test/password/verifyEmail'); + expect(router.post.mock.calls[7][0]).toBe('test/password/resetPassword'); + expect(router.post.mock.calls[8][0]).toBe( + 'test/password/sendVerificationEmail' + ); + expect(router.post.mock.calls[9][0]).toBe( + 'test/password/sendResetPasswordEmail' + ); + }); + + it('Defines oauth endpoints when oauth service is present', () => { + accountsExpress( + { + getServices: () => ({ + oauth: {}, + }), + } as any, + { path: 'test' } + ); + expect(router.post.mock.calls[0][0]).toBe('test/impersonate'); + expect(router.post.mock.calls[1][0]).toBe('test/user'); + expect(router.post.mock.calls[2][0]).toBe('test/refreshTokens'); + expect(router.post.mock.calls[3][0]).toBe('test/logout'); + expect(router.post.mock.calls[4][0]).toBe('test/:service/authenticate'); + expect(router.get.mock.calls[0][0]).toBe('test/oauth/:provider/callback'); + }); +}); diff --git a/packages/rest-express/__tests__/user-loader.ts b/packages/rest-express/__tests__/user-loader.ts new file mode 100644 index 000000000..064c30a4b --- /dev/null +++ b/packages/rest-express/__tests__/user-loader.ts @@ -0,0 +1,61 @@ +import accountsExpress from '../src'; +import { userLoader } from '../src/user-loader'; + +const user = { id: '1' }; +const accountsServer = { + resumeSession: jest.fn(() => user), +}; +describe('userLoader', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('does noting when request has no accessToken', async () => { + const provider = userLoader(accountsServer as any); + const req = {}; + const res = {}; + const next = jest.fn(); + await provider(req, res, next); + + expect(accountsServer.resumeSession).not.toHaveBeenCalled(); + expect(req).toEqual({}); + expect(res).toEqual({}); + expect(next).toHaveBeenCalledTimes(1); + }); + + it('load user to req object when access token is present on the headers', async () => { + const provider = userLoader(accountsServer as any); + const req = { + headers: { + 'accounts-access-token': 'token', + }, + }; + const reqCopy = { ...req }; + const res = {}; + const next = jest.fn(); + await provider(req, res, next); + + expect(accountsServer.resumeSession).toHaveBeenCalledWith('token'); + expect(req).toEqual({ ...reqCopy, user, userId: user.id }); + expect(res).toEqual({}); + expect(next).toHaveBeenCalledTimes(1); + }); + + it('load user to req object when access token is present on the body', async () => { + const provider = userLoader(accountsServer as any); + const req = { + body: { + accessToken: 'token', + }, + }; + const reqCopy = { ...req }; + const res = {}; + const next = jest.fn(); + await provider(req, res, next); + + expect(accountsServer.resumeSession).toHaveBeenCalledWith('token'); + expect(req).toEqual({ ...reqCopy, user, userId: user.id }); + expect(res).toEqual({}); + expect(next).toHaveBeenCalledTimes(1); + }); +}); diff --git a/packages/rest-express/__tests__/utils/get-user-agent.ts b/packages/rest-express/__tests__/utils/get-user-agent.ts new file mode 100644 index 000000000..db1c9fd2f --- /dev/null +++ b/packages/rest-express/__tests__/utils/get-user-agent.ts @@ -0,0 +1,23 @@ +import { getUserAgent } from '../../src/utils/get-user-agent'; + +describe('getUserAgent', () => { + it('should return header user agent', () => { + const req = { + headers: { + 'user-agent': 'agent', + }, + }; + const userAgent = getUserAgent(req); + expect(userAgent).toBe('agent'); + }); + + it('should return header UC Browser user agent', () => { + const req = { + headers: { + 'x-ucbrowser-ua': 'agent', + }, + }; + const userAgent = getUserAgent(req); + expect(userAgent).toBe('agent'); + }); +}); diff --git a/packages/rest-express/package.json b/packages/rest-express/package.json new file mode 100644 index 000000000..587cb2c4d --- /dev/null +++ b/packages/rest-express/package.json @@ -0,0 +1,60 @@ +{ + "name": "@accounts/rest-express", + "version": "0.1.0-beta.2", + "description": "Server side REST express middleware for accounts", + "main": "lib/index", + "typings": "lib/index", + "publishConfig": { + "access": "public" + }, + "scripts": { + "start": "tsc --watch", + "compile": "tsc", + "prepublish": "npm run compile", + "test": "npm run testonly", + "test:watch": "npm run testonly -- --watch --coverage", + "testonly": "jest", + "coverage": "npm run testonly -- --coverage", + "coveralls": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage" + }, + "jest": { + "testEnvironment": "node", + "transform": { + ".(ts|tsx)": "/../../node_modules/ts-jest/preprocessor.js" + }, + "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx)$", + "moduleFileExtensions": [ + "ts", + "js" + ], + "mapCoverage": true + }, + "repository": { + "type": "git", + "url": "https://github.com/js-accounts/rest/tree/master/packages/rest-express" + }, + "keywords": [ + "users", + "accounts", + "rest", + "express" + ], + "author": "Tim Mikeladze", + "license": "MIT", + "devDependencies": { + "@accounts/common": "0.1.0-beta.3", + "@accounts/server": "0.1.0-beta.3", + "@types/express": "4.11.1", + "@types/lodash": "4.14.104", + "@types/request-ip": "0.0.33" + }, + "peerDependencies": { + "@accounts/common": "^0.1.0-beta.0", + "@accounts/server": "^0.1.0-beta.0" + }, + "dependencies": { + "express": "^4.16.2", + "lodash": "^4.17.4", + "request-ip": "^2.0.2" + } +} diff --git a/packages/rest-express/src/endpoints/get-user.ts b/packages/rest-express/src/endpoints/get-user.ts new file mode 100644 index 000000000..91a8c4b9f --- /dev/null +++ b/packages/rest-express/src/endpoints/get-user.ts @@ -0,0 +1,16 @@ +import * as express from 'express'; +import { AccountsServer } from '@accounts/server'; +import { sendError } from '../utils/send-error'; + +export const getUser = (accountsServer: AccountsServer) => async ( + req: express.Request, + res: express.Response +) => { + try { + const { accessToken } = req.body; + const user = await accountsServer.resumeSession(accessToken); + res.json(user); + } catch (err) { + sendError(res, err); + } +}; diff --git a/packages/rest-express/src/endpoints/impersonate.ts b/packages/rest-express/src/endpoints/impersonate.ts new file mode 100644 index 000000000..2c620f1fb --- /dev/null +++ b/packages/rest-express/src/endpoints/impersonate.ts @@ -0,0 +1,25 @@ +import * as express from 'express'; +import * as requestIp from 'request-ip'; +import { AccountsServer } from '@accounts/server'; +import { getUserAgent } from '../utils/get-user-agent'; +import { sendError } from '../utils/send-error'; + +export const impersonate = (accountsServer: AccountsServer) => async ( + req: express.Request, + res: express.Response +) => { + try { + const { username, accessToken } = req.body; + const userAgent = getUserAgent(req); + const ip = requestIp.getClientIp(req); + const impersonateRes = await accountsServer.impersonate( + accessToken, + username, + ip, + userAgent + ); + res.json(impersonateRes); + } catch (err) { + sendError(res, err); + } +}; diff --git a/packages/rest-express/src/endpoints/logout.ts b/packages/rest-express/src/endpoints/logout.ts new file mode 100644 index 000000000..83b7723d3 --- /dev/null +++ b/packages/rest-express/src/endpoints/logout.ts @@ -0,0 +1,16 @@ +import * as express from 'express'; +import { AccountsServer } from '@accounts/server'; +import { sendError } from '../utils/send-error'; + +export const logout = (accountsServer: AccountsServer) => async ( + req: express.Request, + res: express.Response +) => { + try { + const { accessToken } = req.body; + await accountsServer.logout(accessToken); + res.json({ message: 'Logged out' }); + } catch (err) { + sendError(res, err); + } +}; diff --git a/packages/rest-express/src/endpoints/oauth/provider-callback.ts b/packages/rest-express/src/endpoints/oauth/provider-callback.ts new file mode 100644 index 000000000..ec2fbafee --- /dev/null +++ b/packages/rest-express/src/endpoints/oauth/provider-callback.ts @@ -0,0 +1,32 @@ +import * as express from 'express'; +import * as requestIp from 'request-ip'; +import { AccountsServer } from '@accounts/server'; +import { getUserAgent } from '../../utils/get-user-agent'; +import { sendError } from '../../utils/send-error'; + +interface RequestWithSession extends express.Request { + session: { [key: string]: any }; +} + +export const providerCallback = (accountsServer: AccountsServer) => async ( + req: express.Request, + res: express.Response +) => { + try { + const userAgent = getUserAgent(req); + const ip = requestIp.getClientIp(req); + const loggedInUser = await accountsServer.loginWithService( + 'oauth', + { + ...(req.params || {}), + ...(req.query || {}), + ...(req.body || {}), + ...((req as RequestWithSession).session || {}), + }, + { ip, userAgent } + ); + res.json(loggedInUser); + } catch (err) { + sendError(res, err); + } +}; diff --git a/packages/rest-express/src/endpoints/password/register.ts b/packages/rest-express/src/endpoints/password/register.ts new file mode 100644 index 000000000..c44a9a4e9 --- /dev/null +++ b/packages/rest-express/src/endpoints/password/register.ts @@ -0,0 +1,16 @@ +import * as express from 'express'; +import { AccountsServer } from '@accounts/server'; +import { sendError } from '../../utils/send-error'; + +export const registerPassword = (accountsServer: AccountsServer) => async ( + req: express.Request, + res: express.Response +) => { + try { + const password: any = accountsServer.getServices().password; + const userId = await password.createUser(req.body.user); + res.json({ userId }); + } catch (err) { + sendError(res, err); + } +}; diff --git a/packages/rest-express/src/endpoints/password/reset.ts b/packages/rest-express/src/endpoints/password/reset.ts new file mode 100644 index 000000000..33e300849 --- /dev/null +++ b/packages/rest-express/src/endpoints/password/reset.ts @@ -0,0 +1,30 @@ +import * as express from 'express'; +import { AccountsServer } from '@accounts/server'; +import { sendError } from '../../utils/send-error'; + +export const resetPassword = (accountsServer: AccountsServer) => async ( + req: express.Request, + res: express.Response +) => { + try { + const { token, newPassword } = req.body; + const password: any = accountsServer.getServices().password; + await password.resetPassword(token, newPassword); + res.json({ message: 'Password changed' }); + } catch (err) { + sendError(res, err); + } +}; + +export const sendResetPasswordEmail = ( + accountsServer: AccountsServer +) => async (req: express.Request, res: express.Response) => { + try { + const { email } = req.body; + const password: any = accountsServer.getServices().password; + await password.sendResetPasswordEmail(email); + res.json({ message: 'Email sent' }); + } catch (err) { + sendError(res, err); + } +}; diff --git a/packages/rest-express/src/endpoints/password/verify-email.ts b/packages/rest-express/src/endpoints/password/verify-email.ts new file mode 100644 index 000000000..bbd162406 --- /dev/null +++ b/packages/rest-express/src/endpoints/password/verify-email.ts @@ -0,0 +1,31 @@ +import * as express from 'express'; +import { AccountsServer } from '@accounts/server'; +import { sendError } from '../../utils/send-error'; + +export const verifyEmail = (accountsServer: AccountsServer) => async ( + req: express.Request, + res: express.Response +) => { + try { + const { token } = req.body; + const password: any = accountsServer.getServices().password; + await password.verifyEmail(token); + res.json({ message: 'Email verified' }); + } catch (err) { + sendError(res, err); + } +}; + +export const sendVerificationEmail = (accountsServer: AccountsServer) => async ( + req: express.Request, + res: express.Response +) => { + try { + const { email } = req.body; + const password: any = accountsServer.getServices().password; + await password.sendVerificationEmail(email); + res.json({ message: 'Email sent' }); + } catch (err) { + sendError(res, err); + } +}; diff --git a/packages/rest-express/src/endpoints/refresh-access-token.ts b/packages/rest-express/src/endpoints/refresh-access-token.ts new file mode 100644 index 000000000..0e2f73803 --- /dev/null +++ b/packages/rest-express/src/endpoints/refresh-access-token.ts @@ -0,0 +1,25 @@ +import * as express from 'express'; +import * as requestIp from 'request-ip'; +import { AccountsServer } from '@accounts/server'; +import { getUserAgent } from '../utils/get-user-agent'; +import { sendError } from '../utils/send-error'; + +export const refreshAccessToken = (accountsServer: AccountsServer) => async ( + req: express.Request, + res: express.Response +) => { + try { + const { accessToken, refreshToken } = req.body; + const userAgent = getUserAgent(req); + const ip = requestIp.getClientIp(req); + const refreshedSession = await accountsServer.refreshTokens( + accessToken, + refreshToken, + ip, + userAgent + ); + res.json(refreshedSession); + } catch (err) { + sendError(res, err); + } +}; diff --git a/packages/rest-express/src/endpoints/service-authenticate.ts b/packages/rest-express/src/endpoints/service-authenticate.ts new file mode 100644 index 000000000..abc1bee57 --- /dev/null +++ b/packages/rest-express/src/endpoints/service-authenticate.ts @@ -0,0 +1,24 @@ +import * as express from 'express'; +import * as requestIp from 'request-ip'; +import { AccountsServer } from '@accounts/server'; +import { getUserAgent } from '../utils/get-user-agent'; +import { sendError } from '../utils/send-error'; + +export const serviceAuthenticate = (accountsServer: AccountsServer) => async ( + req: express.Request, + res: express.Response +) => { + try { + const serviceName = req.params.service; + const userAgent = getUserAgent(req); + const ip = requestIp.getClientIp(req); + const loggedInUser = await accountsServer.loginWithService( + serviceName, + req.body, + { ip, userAgent } + ); + res.json(loggedInUser); + } catch (err) { + sendError(res, err); + } +}; diff --git a/packages/rest-express/src/express-middleware.ts b/packages/rest-express/src/express-middleware.ts new file mode 100644 index 000000000..a11728179 --- /dev/null +++ b/packages/rest-express/src/express-middleware.ts @@ -0,0 +1,88 @@ +import { providerCallback } from './endpoints/oauth/provider-callback'; +import { + resetPassword, + sendResetPasswordEmail, +} from './endpoints/password/reset'; +import { + verifyEmail, + sendVerificationEmail, +} from './endpoints/password/verify-email'; +import * as express from 'express'; +import { get, isEmpty, pick } from 'lodash'; +import * as requestIp from 'request-ip'; +import { AccountsError } from '@accounts/common'; +import { AccountsServer } from '@accounts/server'; +import { refreshAccessToken } from './endpoints/refresh-access-token'; +import { getUser } from './endpoints/get-user'; +import { impersonate } from './endpoints/impersonate'; +import { logout } from './endpoints/logout'; +import { serviceAuthenticate } from './endpoints/service-authenticate'; +import { registerPassword } from './endpoints/password/register'; +import { userLoader } from './user-loader'; + +export interface AccountsExpressOptions { + path?: string; +} + +const defaultOptions: AccountsExpressOptions = { + path: '/accounts', +}; + +const accountsExpress = ( + accountsServer: AccountsServer, + options: AccountsExpressOptions = {} +): express.Router => { + options = { ...defaultOptions, ...options }; + const { path } = options; + + const router = express.Router(); + + router.post(`${path}/impersonate`, impersonate(accountsServer)); + + router.post(`${path}/user`, getUser(accountsServer)); + + router.post(`${path}/refreshTokens`, refreshAccessToken(accountsServer)); + + router.post(`${path}/logout`, logout(accountsServer)); + + router.post( + `${path}/:service/authenticate`, + serviceAuthenticate(accountsServer) + ); + + const services = accountsServer.getServices(); + + // @accounts/password + if (services.password) { + router.post(`${path}/password/register`, registerPassword(accountsServer)); + + router.post(`${path}/password/verifyEmail`, verifyEmail(accountsServer)); + + router.post( + `${path}/password/resetPassword`, + resetPassword(accountsServer) + ); + + router.post( + `${path}/password/sendVerificationEmail`, + sendVerificationEmail(accountsServer) + ); + + router.post( + `${path}/password/sendResetPasswordEmail`, + sendResetPasswordEmail(accountsServer) + ); + } + + // @accounts/oauth + if (services.oauth) { + router.get( + `${path}/oauth/:provider/callback`, + providerCallback(accountsServer) + ); + } + + return router; +}; + +export default accountsExpress; diff --git a/packages/rest-express/src/index.ts b/packages/rest-express/src/index.ts new file mode 100644 index 000000000..01980145d --- /dev/null +++ b/packages/rest-express/src/index.ts @@ -0,0 +1,3 @@ +import middleware from './express-middleware'; +export { userLoader } from './user-loader'; +export default middleware; diff --git a/packages/rest-express/src/user-loader.ts b/packages/rest-express/src/user-loader.ts new file mode 100644 index 000000000..09795a843 --- /dev/null +++ b/packages/rest-express/src/user-loader.ts @@ -0,0 +1,23 @@ +import * as express from 'express'; +import { get, isEmpty } from 'lodash'; +import { AccountsServer } from '@accounts/server'; + +export const userLoader = (accountsServer: AccountsServer) => async ( + req: express.Request, + res: express.Response, + next: any +) => { + const accessToken = + get(req.headers, 'accounts-access-token') || + get(req.body, 'accessToken', undefined); + if (!isEmpty(accessToken)) { + try { + const user = await accountsServer.resumeSession(accessToken); + (req as any).user = user; + (req as any).userId = user.id; + } catch (e) { + // Do nothing + } + } + next(); +}; diff --git a/packages/rest-express/src/utils/get-user-agent.ts b/packages/rest-express/src/utils/get-user-agent.ts new file mode 100644 index 000000000..bb59566e9 --- /dev/null +++ b/packages/rest-express/src/utils/get-user-agent.ts @@ -0,0 +1,10 @@ +import * as express from 'express'; + +export const getUserAgent = (req: express.Request) => { + let userAgent: string = (req.headers['user-agent'] as string) || ''; + if (req.headers['x-ucbrowser-ua']) { + // special case of UC Browser + userAgent = req.headers['x-ucbrowser-ua'] as string; + } + return userAgent; +}; diff --git a/packages/rest-express/src/utils/send-error.ts b/packages/rest-express/src/utils/send-error.ts new file mode 100644 index 000000000..36b38bbc9 --- /dev/null +++ b/packages/rest-express/src/utils/send-error.ts @@ -0,0 +1,6 @@ +export const sendError = (res: any, err: any) => + res.status(400).json({ + message: err.message, + loginInfo: err.loginInfo, + errorCode: err.errorCode, + }); diff --git a/packages/rest-express/tsconfig.json b/packages/rest-express/tsconfig.json new file mode 100644 index 000000000..7a3de3c2a --- /dev/null +++ b/packages/rest-express/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../../tsconfig", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./lib", + "typeRoots": [ + "node_modules/@types" + ] + }, + "exclude": [ + "node_modules", + "__tests__", + "lib" + ] +} diff --git a/packages/rest-express/yarn.lock b/packages/rest-express/yarn.lock new file mode 100644 index 000000000..a768eba00 --- /dev/null +++ b/packages/rest-express/yarn.lock @@ -0,0 +1,364 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/body-parser@*": + version "1.16.8" + resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.16.8.tgz#687ec34140624a3bec2b1a8ea9268478ae8f3be3" + dependencies: + "@types/express" "*" + "@types/node" "*" + +"@types/events@*": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@types/events/-/events-1.2.0.tgz#81a6731ce4df43619e5c8c945383b3e62a89ea86" + +"@types/express-serve-static-core@*": + version "4.11.1" + resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.11.1.tgz#f6f7212382d59b19d696677bcaa48a37280f5d45" + dependencies: + "@types/events" "*" + "@types/node" "*" + +"@types/express@*", "@types/express@4.11.1": + version "4.11.1" + resolved "https://registry.yarnpkg.com/@types/express/-/express-4.11.1.tgz#f99663b3ab32d04cb11db612ef5dd7933f75465b" + dependencies: + "@types/body-parser" "*" + "@types/express-serve-static-core" "*" + "@types/serve-static" "*" + +"@types/lodash@4.14.104": + version "4.14.104" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.104.tgz#53ee2357fa2e6e68379341d92eb2ecea4b11bb80" + +"@types/mime@*": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@types/mime/-/mime-2.0.0.tgz#5a7306e367c539b9f6543499de8dd519fac37a8b" + +"@types/node@*": + version "9.4.6" + resolved "https://registry.yarnpkg.com/@types/node/-/node-9.4.6.tgz#d8176d864ee48753d053783e4e463aec86b8d82e" + +"@types/request-ip@0.0.33": + version "0.0.33" + resolved "https://registry.yarnpkg.com/@types/request-ip/-/request-ip-0.0.33.tgz#4c4a16f8b27a4ed906470fdac64168bc4de6c295" + dependencies: + "@types/node" "*" + +"@types/serve-static@*": + version "1.13.1" + resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.13.1.tgz#1d2801fa635d274cd97d4ec07e26b21b44127492" + dependencies: + "@types/express-serve-static-core" "*" + "@types/mime" "*" + +accepts@~1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.4.tgz#86246758c7dd6d21a6474ff084a4740ec05eb21f" + dependencies: + mime-types "~2.1.16" + negotiator "0.6.1" + +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + +body-parser@1.18.2: + version "1.18.2" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.2.tgz#87678a19d84b47d859b83199bd59bce222b10454" + dependencies: + bytes "3.0.0" + content-type "~1.0.4" + debug "2.6.9" + depd "~1.1.1" + http-errors "~1.6.2" + iconv-lite "0.4.19" + on-finished "~2.3.0" + qs "6.5.1" + raw-body "2.3.2" + type-is "~1.6.15" + +bytes@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" + +content-disposition@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" + +content-type@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + +cookie@0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" + +debug@2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + dependencies: + ms "2.0.0" + +depd@1.1.1, depd@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.1.tgz#5783b4e1c459f06fa5ca27f991f3d06e7a310359" + +destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + +encodeurl@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.1.tgz#79e3d58655346909fe6f0f45a5de68103b294d20" + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + +express@^4.16.2: + version "4.16.2" + resolved "https://registry.yarnpkg.com/express/-/express-4.16.2.tgz#e35c6dfe2d64b7dca0a5cd4f21781be3299e076c" + dependencies: + accepts "~1.3.4" + array-flatten "1.1.1" + body-parser "1.18.2" + content-disposition "0.5.2" + content-type "~1.0.4" + cookie "0.3.1" + cookie-signature "1.0.6" + debug "2.6.9" + depd "~1.1.1" + encodeurl "~1.0.1" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "1.1.0" + fresh "0.5.2" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "~2.3.0" + parseurl "~1.3.2" + path-to-regexp "0.1.7" + proxy-addr "~2.0.2" + qs "6.5.1" + range-parser "~1.2.0" + safe-buffer "5.1.1" + send "0.16.1" + serve-static "1.13.1" + setprototypeof "1.1.0" + statuses "~1.3.1" + type-is "~1.6.15" + utils-merge "1.0.1" + vary "~1.1.2" + +finalhandler@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.0.tgz#ce0b6855b45853e791b2fcc680046d88253dd7f5" + dependencies: + debug "2.6.9" + encodeurl "~1.0.1" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.2" + statuses "~1.3.1" + unpipe "~1.0.0" + +forwarded@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + +http-errors@1.6.2, http-errors@~1.6.2: + version "1.6.2" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.2.tgz#0a002cc85707192a7e7946ceedc11155f60ec736" + dependencies: + depd "1.1.1" + inherits "2.0.3" + setprototypeof "1.0.3" + statuses ">= 1.3.1 < 2" + +iconv-lite@0.4.19: + version "0.4.19" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" + +inherits@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +ipaddr.js@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.5.2.tgz#d4b505bde9946987ccf0fc58d9010ff9607e3fa0" + +is_js@^0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/is_js/-/is_js-0.9.0.tgz#0ab94540502ba7afa24c856aa985561669e9c52d" + +lodash@^4.17.4: + version "4.17.4" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + +mime-db@~1.27.0: + version "1.27.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.27.0.tgz#820f572296bbd20ec25ed55e5b5de869e5436eb1" + +mime-db@~1.30.0: + version "1.30.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.30.0.tgz#74c643da2dd9d6a45399963465b26d5ca7d71f01" + +mime-types@~2.1.15: + version "2.1.15" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.15.tgz#a4ebf5064094569237b8cf70046776d09fc92aed" + dependencies: + mime-db "~1.27.0" + +mime-types@~2.1.16: + version "2.1.17" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.17.tgz#09d7a393f03e995a79f8af857b70a9e0ab16557a" + dependencies: + mime-db "~1.30.0" + +mime@1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + +negotiator@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + dependencies: + ee-first "1.1.1" + +parseurl@~1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3" + +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + +proxy-addr@~2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.2.tgz#6571504f47bb988ec8180253f85dd7e14952bdec" + dependencies: + forwarded "~0.1.2" + ipaddr.js "1.5.2" + +qs@6.5.1: + version "6.5.1" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8" + +range-parser@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" + +raw-body@2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.2.tgz#bcd60c77d3eb93cde0050295c3f379389bc88f89" + dependencies: + bytes "3.0.0" + http-errors "1.6.2" + iconv-lite "0.4.19" + unpipe "1.0.0" + +request-ip@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/request-ip/-/request-ip-2.0.2.tgz#deeae6d4af21768497db8cd05fa37143f8f1257e" + dependencies: + is_js "^0.9.0" + +safe-buffer@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" + +send@0.16.1: + version "0.16.1" + resolved "https://registry.yarnpkg.com/send/-/send-0.16.1.tgz#a70e1ca21d1382c11d0d9f6231deb281080d7ab3" + dependencies: + debug "2.6.9" + depd "~1.1.1" + destroy "~1.0.4" + encodeurl "~1.0.1" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "~1.6.2" + mime "1.4.1" + ms "2.0.0" + on-finished "~2.3.0" + range-parser "~1.2.0" + statuses "~1.3.1" + +serve-static@1.13.1: + version "1.13.1" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.1.tgz#4c57d53404a761d8f2e7c1e8a18a47dbf278a719" + dependencies: + encodeurl "~1.0.1" + escape-html "~1.0.3" + parseurl "~1.3.2" + send "0.16.1" + +setprototypeof@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.3.tgz#66567e37043eeb4f04d91bd658c0cbefb55b8e04" + +setprototypeof@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" + +"statuses@>= 1.3.1 < 2", statuses@~1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" + +type-is@~1.6.15: + version "1.6.15" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.15.tgz#cab10fb4909e441c82842eafe1ad646c81804410" + dependencies: + media-typer "0.3.0" + mime-types "~2.1.15" + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + +vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" From ae7b8099112bc663a20b7559219488f6ec718fb9 Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Sun, 11 Mar 2018 16:59:14 +0100 Subject: [PATCH 017/128] rest-express : remove conflicting devDependencies --- packages/rest-express/package.json | 5 +-- packages/rest-express/yarn.lock | 51 ------------------------------ 2 files changed, 1 insertion(+), 55 deletions(-) diff --git a/packages/rest-express/package.json b/packages/rest-express/package.json index 587cb2c4d..58dbcc21c 100644 --- a/packages/rest-express/package.json +++ b/packages/rest-express/package.json @@ -43,10 +43,7 @@ "license": "MIT", "devDependencies": { "@accounts/common": "0.1.0-beta.3", - "@accounts/server": "0.1.0-beta.3", - "@types/express": "4.11.1", - "@types/lodash": "4.14.104", - "@types/request-ip": "0.0.33" + "@accounts/server": "0.1.0-beta.3" }, "peerDependencies": { "@accounts/common": "^0.1.0-beta.0", diff --git a/packages/rest-express/yarn.lock b/packages/rest-express/yarn.lock index a768eba00..f89f7fb55 100644 --- a/packages/rest-express/yarn.lock +++ b/packages/rest-express/yarn.lock @@ -2,57 +2,6 @@ # yarn lockfile v1 -"@types/body-parser@*": - version "1.16.8" - resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.16.8.tgz#687ec34140624a3bec2b1a8ea9268478ae8f3be3" - dependencies: - "@types/express" "*" - "@types/node" "*" - -"@types/events@*": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@types/events/-/events-1.2.0.tgz#81a6731ce4df43619e5c8c945383b3e62a89ea86" - -"@types/express-serve-static-core@*": - version "4.11.1" - resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.11.1.tgz#f6f7212382d59b19d696677bcaa48a37280f5d45" - dependencies: - "@types/events" "*" - "@types/node" "*" - -"@types/express@*", "@types/express@4.11.1": - version "4.11.1" - resolved "https://registry.yarnpkg.com/@types/express/-/express-4.11.1.tgz#f99663b3ab32d04cb11db612ef5dd7933f75465b" - dependencies: - "@types/body-parser" "*" - "@types/express-serve-static-core" "*" - "@types/serve-static" "*" - -"@types/lodash@4.14.104": - version "4.14.104" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.104.tgz#53ee2357fa2e6e68379341d92eb2ecea4b11bb80" - -"@types/mime@*": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@types/mime/-/mime-2.0.0.tgz#5a7306e367c539b9f6543499de8dd519fac37a8b" - -"@types/node@*": - version "9.4.6" - resolved "https://registry.yarnpkg.com/@types/node/-/node-9.4.6.tgz#d8176d864ee48753d053783e4e463aec86b8d82e" - -"@types/request-ip@0.0.33": - version "0.0.33" - resolved "https://registry.yarnpkg.com/@types/request-ip/-/request-ip-0.0.33.tgz#4c4a16f8b27a4ed906470fdac64168bc4de6c295" - dependencies: - "@types/node" "*" - -"@types/serve-static@*": - version "1.13.1" - resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.13.1.tgz#1d2801fa635d274cd97d4ec07e26b21b44127492" - dependencies: - "@types/express-serve-static-core" "*" - "@types/mime" "*" - accepts@~1.3.4: version "1.3.4" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.4.tgz#86246758c7dd6d21a6474ff084a4740ec05eb21f" From 26b57011616fa86ddab8afb5c289c58143f78693 Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Sun, 11 Mar 2018 17:23:13 +0100 Subject: [PATCH 018/128] Fix bootstraping : prepublish => prepublishOnly --- packages/rest-client/package.json | 2 +- packages/rest-express/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/rest-client/package.json b/packages/rest-client/package.json index d6ae191e2..78e40161e 100644 --- a/packages/rest-client/package.json +++ b/packages/rest-client/package.json @@ -11,7 +11,7 @@ "start": "tsc --watch", "precompile": "rimraf ./lib", "compile": "tsc", - "prepublish": "npm run compile", + "prepublishOnly": "npm run compile", "test": "npm run testonly", "testonly": "jest", "coverage": "npm run testonly -- --coverage", diff --git a/packages/rest-express/package.json b/packages/rest-express/package.json index 58dbcc21c..82ee08e2f 100644 --- a/packages/rest-express/package.json +++ b/packages/rest-express/package.json @@ -10,7 +10,7 @@ "scripts": { "start": "tsc --watch", "compile": "tsc", - "prepublish": "npm run compile", + "prepublishOnly": "npm run compile", "test": "npm run testonly", "test:watch": "npm run testonly -- --watch --coverage", "testonly": "jest", From 4e70296d8bc4cf42dc92d1654350ab7c15953d80 Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Sun, 11 Mar 2018 20:22:35 +0100 Subject: [PATCH 019/128] rest-express : revert devDependencies --- packages/rest-express/package.json | 5 ++- packages/rest-express/yarn.lock | 51 ++++++++++++++++++++++++++++++ tsconfig.json | 2 +- 3 files changed, 56 insertions(+), 2 deletions(-) diff --git a/packages/rest-express/package.json b/packages/rest-express/package.json index 82ee08e2f..0d2757ea3 100644 --- a/packages/rest-express/package.json +++ b/packages/rest-express/package.json @@ -43,7 +43,10 @@ "license": "MIT", "devDependencies": { "@accounts/common": "0.1.0-beta.3", - "@accounts/server": "0.1.0-beta.3" + "@accounts/server": "0.1.0-beta.3", + "@types/express": "4.11.1", + "@types/lodash": "4.14.104", + "@types/request-ip": "0.0.33" }, "peerDependencies": { "@accounts/common": "^0.1.0-beta.0", diff --git a/packages/rest-express/yarn.lock b/packages/rest-express/yarn.lock index f89f7fb55..07322add7 100644 --- a/packages/rest-express/yarn.lock +++ b/packages/rest-express/yarn.lock @@ -2,6 +2,57 @@ # yarn lockfile v1 +"@types/body-parser@*": + version "1.16.8" + resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.16.8.tgz#687ec34140624a3bec2b1a8ea9268478ae8f3be3" + dependencies: + "@types/express" "*" + "@types/node" "*" + +"@types/events@*": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@types/events/-/events-1.2.0.tgz#81a6731ce4df43619e5c8c945383b3e62a89ea86" + +"@types/express-serve-static-core@*": + version "4.11.1" + resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.11.1.tgz#f6f7212382d59b19d696677bcaa48a37280f5d45" + dependencies: + "@types/events" "*" + "@types/node" "*" + +"@types/express@*", "@types/express@4.11.1": + version "4.11.1" + resolved "https://registry.yarnpkg.com/@types/express/-/express-4.11.1.tgz#f99663b3ab32d04cb11db612ef5dd7933f75465b" + dependencies: + "@types/body-parser" "*" + "@types/express-serve-static-core" "*" + "@types/serve-static" "*" + +"@types/lodash@4.14.104": + version "4.14.104" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.104.tgz#53ee2357fa2e6e68379341d92eb2ecea4b11bb80" + +"@types/mime@*": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@types/mime/-/mime-2.0.0.tgz#5a7306e367c539b9f6543499de8dd519fac37a8b" + +"@types/node@*": + version "9.4.7" + resolved "https://registry.yarnpkg.com/@types/node/-/node-9.4.7.tgz#57d81cd98719df2c9de118f2d5f3b1120dcd7275" + +"@types/request-ip@0.0.33": + version "0.0.33" + resolved "https://registry.yarnpkg.com/@types/request-ip/-/request-ip-0.0.33.tgz#4c4a16f8b27a4ed906470fdac64168bc4de6c295" + dependencies: + "@types/node" "*" + +"@types/serve-static@*": + version "1.13.1" + resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.13.1.tgz#1d2801fa635d274cd97d4ec07e26b21b44127492" + dependencies: + "@types/express-serve-static-core" "*" + "@types/mime" "*" + accepts@~1.3.4: version "1.3.4" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.4.tgz#86246758c7dd6d21a6474ff084a4740ec05eb21f" diff --git a/tsconfig.json b/tsconfig.json index fe38d4bc4..a0c280f20 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,7 +9,7 @@ "removeComments": true, "lib": ["es6", "es2015", "es2016", "es2017"], "types": [ - "@types/node" + "node" ] } } From e120cf501fb94f8d026d754ed89eb134303e83ab Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 12 Mar 2018 12:03:31 +0000 Subject: [PATCH 020/128] Update dependency @accounts/tslint-config-accounts to v0.0.8 --- package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index b24b020b7..9239e2889 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ }, "license": "MIT", "devDependencies": { - "@accounts/tslint-config-accounts": "0.0.6", + "@accounts/tslint-config-accounts": "0.0.8", "@types/jest": "22.2.0", "@types/node": "9.4.6", "codecov": "3.0.0", diff --git a/yarn.lock b/yarn.lock index 83b11189c..f5e8c186c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,9 +2,9 @@ # yarn lockfile v1 -"@accounts/tslint-config-accounts@0.0.6": - version "0.0.6" - resolved "https://registry.yarnpkg.com/@accounts/tslint-config-accounts/-/tslint-config-accounts-0.0.6.tgz#d2ab1480f0aff7c911b2bea9fb924d7f04328931" +"@accounts/tslint-config-accounts@0.0.8": + version "0.0.8" + resolved "https://registry.yarnpkg.com/@accounts/tslint-config-accounts/-/tslint-config-accounts-0.0.8.tgz#7dd1f23a8af48f62cbaebdecab5756ca0b51ed66" dependencies: tslint-config-prettier "^1.1.0" tslint-eslint-rules "^4.1.1" From e56e75373d1bc56a942ce52dba0a5cf6c576f688 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 13 Mar 2018 08:55:33 +0000 Subject: [PATCH 021/128] Update dependency @accounts/tslint-config-accounts to v0.0.9 --- package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 9239e2889..96e0c5f5b 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ }, "license": "MIT", "devDependencies": { - "@accounts/tslint-config-accounts": "0.0.8", + "@accounts/tslint-config-accounts": "0.0.9", "@types/jest": "22.2.0", "@types/node": "9.4.6", "codecov": "3.0.0", diff --git a/yarn.lock b/yarn.lock index f5e8c186c..0c631f446 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,9 +2,9 @@ # yarn lockfile v1 -"@accounts/tslint-config-accounts@0.0.8": - version "0.0.8" - resolved "https://registry.yarnpkg.com/@accounts/tslint-config-accounts/-/tslint-config-accounts-0.0.8.tgz#7dd1f23a8af48f62cbaebdecab5756ca0b51ed66" +"@accounts/tslint-config-accounts@0.0.9": + version "0.0.9" + resolved "https://registry.yarnpkg.com/@accounts/tslint-config-accounts/-/tslint-config-accounts-0.0.9.tgz#a2073361c4127ba7c8662cd72e08a28a794a44df" dependencies: tslint-config-prettier "^1.1.0" tslint-eslint-rules "^4.1.1" From a35aa0a6c13181442b295fdff6e3f0602375a4c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pradel=20Le=CC=81o?= Date: Tue, 20 Dec 2016 17:18:31 +0100 Subject: [PATCH 022/128] Add README.md --- packages/accounts-mongo/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 packages/accounts-mongo/README.md diff --git a/packages/accounts-mongo/README.md b/packages/accounts-mongo/README.md new file mode 100644 index 000000000..5b5041963 --- /dev/null +++ b/packages/accounts-mongo/README.md @@ -0,0 +1,9 @@ +# @accounts/mongo + +*MongoDB adaptor for accounts* + +[![npm](https://img.shields.io/npm/v/@accounts/mongo.svg?maxAge=2592000)](https://www.npmjs.com/package/@accounts/mongo) [![Circle CI](https://circleci.com/gh/js-accounts/mongo.svg?style=shield)](https://circleci.com/gh/js-accounts/mongo) [![Coverage Status](https://coveralls.io/repos/github/js-accounts/mongo/badge.svg?branch=master)](https://coveralls.io/github/js-accounts/mongo?branch=master) ![MIT License](https://img.shields.io/badge/license-MIT-blue.svg) + +## Note + +This package is under active development. From 4d5d04b28af23898065f0f4fc4958d737705af97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Pradel?= Date: Wed, 21 Dec 2016 19:00:57 +0100 Subject: [PATCH 023/128] Setup repo (#2) * Setup --- packages/accounts-mongo/.babelrc | 8 + packages/accounts-mongo/.eslintrc | 8 + packages/accounts-mongo/.gitignore | 5 + packages/accounts-mongo/.npmignore | 2 + packages/accounts-mongo/circle.yml | 27 + packages/accounts-mongo/package.json | 49 + packages/accounts-mongo/src/index.js | 14 + packages/accounts-mongo/src/index.spec.js | 27 + packages/accounts-mongo/webpack.config.js | 27 + packages/accounts-mongo/yarn.lock | 3642 +++++++++++++++++++++ 10 files changed, 3809 insertions(+) create mode 100644 packages/accounts-mongo/.babelrc create mode 100644 packages/accounts-mongo/.eslintrc create mode 100644 packages/accounts-mongo/.gitignore create mode 100644 packages/accounts-mongo/.npmignore create mode 100644 packages/accounts-mongo/circle.yml create mode 100644 packages/accounts-mongo/package.json create mode 100644 packages/accounts-mongo/src/index.js create mode 100644 packages/accounts-mongo/src/index.spec.js create mode 100644 packages/accounts-mongo/webpack.config.js create mode 100644 packages/accounts-mongo/yarn.lock diff --git a/packages/accounts-mongo/.babelrc b/packages/accounts-mongo/.babelrc new file mode 100644 index 000000000..bb90267ec --- /dev/null +++ b/packages/accounts-mongo/.babelrc @@ -0,0 +1,8 @@ +{ + "presets": [ + "es2015" + ], + "plugins": [ + "transform-async-to-generator" + ] +} diff --git a/packages/accounts-mongo/.eslintrc b/packages/accounts-mongo/.eslintrc new file mode 100644 index 000000000..4f0ba832f --- /dev/null +++ b/packages/accounts-mongo/.eslintrc @@ -0,0 +1,8 @@ +{ + "parser": "babel-eslint", + "extends": "airbnb", + "env": { + "node": true, + "jest": true + } +} diff --git a/packages/accounts-mongo/.gitignore b/packages/accounts-mongo/.gitignore new file mode 100644 index 000000000..03af57388 --- /dev/null +++ b/packages/accounts-mongo/.gitignore @@ -0,0 +1,5 @@ +lib/ +node_modules/ +coverage/ +npm-debug.log +.idea diff --git a/packages/accounts-mongo/.npmignore b/packages/accounts-mongo/.npmignore new file mode 100644 index 000000000..729ea5b71 --- /dev/null +++ b/packages/accounts-mongo/.npmignore @@ -0,0 +1,2 @@ +src/ +coverage/ diff --git a/packages/accounts-mongo/circle.yml b/packages/accounts-mongo/circle.yml new file mode 100644 index 000000000..d11d11399 --- /dev/null +++ b/packages/accounts-mongo/circle.yml @@ -0,0 +1,27 @@ +machine: + node: + version: 6.2.1 + environment: + YARN_VERSION: 0.18.1 + PATH: "${PATH}:${HOME}/.yarn/bin:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin" + +dependencies: + pre: + - | + if [[ ! -e ~/.yarn/bin/yarn || $(yarn --version) != "${YARN_VERSION}" ]]; then + echo "Download and install Yarn." + curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version $YARN_VERSION + else + echo "The correct version of Yarn is already installed." + fi + override: + - yarn install + cache_directories: + - ~/.yarn + - ~/.cache/yarn + +test: + override: + - yarn test + post: + - "yarn coveralls" diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json new file mode 100644 index 000000000..1d0512dd9 --- /dev/null +++ b/packages/accounts-mongo/package.json @@ -0,0 +1,49 @@ +{ + "name": "@accounts/mongo", + "version": "0.0.0", + "description": "MongoDB adaptor for accounts", + "main": "lib/index.js", + "scripts": { + "compile": "webpack -p --config --progress", + "compile:watch": "yarn compile -- --watch", + "prepare": "yarn compile", + "test": "yarn lint && yarn testonly", + "testonly": "jest", + "lint": "eslint src", + "coverage": "yarn testonly -- --coverage", + "coveralls": "yarn coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage" + }, + "jest": { + "testEnvironment": "node", + "testRegex": "(/.*.(test|spec)).(js|jsx)$" + }, + "repository": { + "type": "git", + "url": "https://github.com/js-accounts/mongo.git" + }, + "author": "Leo Pradel", + "license": "MIT", + "bugs": { + "url": "https://github.com/js-accounts/mongo/issues" + }, + "homepage": "https://github.com/js-accounts/mongo", + "devDependencies": { + "babel-cli": "^6.16.0", + "babel-core": "^6.17.0", + "babel-eslint": "^7.0.0", + "babel-loader": "^6.2.5", + "babel-plugin-transform-async-to-generator": "^6.16.0", + "babel-preset-es2015": "^6.16.0", + "coveralls": "^2.11.14", + "eslint": "^3.7.1", + "eslint-config-airbnb": "^12.0.0", + "eslint-config-airbnb-base": "^9.0.0", + "eslint-plugin-import": "^2.0.1", + "eslint-plugin-jsx-a11y": "^2.2.3", + "eslint-plugin-react": "^6.3.0", + "jest": "^18.0.0", + "lodash": "^4.16.4", + "webpack": "^1.14.0", + "webpack-node-externals": "^1.5.4" + } +} diff --git a/packages/accounts-mongo/src/index.js b/packages/accounts-mongo/src/index.js new file mode 100644 index 000000000..0aeeebffb --- /dev/null +++ b/packages/accounts-mongo/src/index.js @@ -0,0 +1,14 @@ +class Mongo { + constructor(options) { + const defaultOptions = { + collectionName: 'users', + }; + this.options = Object.assign({}, defaultOptions, options); + } + + createUser() { // eslint-disable-line class-methods-use-this + return Promise.resolve('user'); + } +} + +export default Mongo; diff --git a/packages/accounts-mongo/src/index.spec.js b/packages/accounts-mongo/src/index.spec.js new file mode 100644 index 000000000..71bc65202 --- /dev/null +++ b/packages/accounts-mongo/src/index.spec.js @@ -0,0 +1,27 @@ +import Mongo from './index'; + +describe('Mongo', () => { + describe('#constructor', () => { + it('should have default options', () => { + const mongo = new Mongo(); + expect(mongo.options).toBeTruthy(); + }); + + it('should overwrite options', () => { + const mongo = new Mongo({ + collectionName: 'users-test', + }); + expect(mongo.options).toBeTruthy(); + expect(mongo.options.collectionName).toEqual('users-test'); + }); + }); + + describe('createUser', () => { + const mongo = new Mongo(); + + it('should resolve promise', async () => { + const ret = await mongo.createUser(); + expect(ret).toEqual('user'); + }); + }); +}); diff --git a/packages/accounts-mongo/webpack.config.js b/packages/accounts-mongo/webpack.config.js new file mode 100644 index 000000000..6dc21f067 --- /dev/null +++ b/packages/accounts-mongo/webpack.config.js @@ -0,0 +1,27 @@ +const path = require('path'); +const nodeExternals = require('webpack-node-externals'); + +module.exports = { + entry: './src/index.js', + target: 'node', + externals: [nodeExternals()], + output: { + path: path.join(__dirname, '/lib'), + filename: 'index.js', + library: '@accounts/mongo', + libraryTarget: 'umd', + }, + modulesDirectories: [ + 'src', + 'node_modules', + ], + module: { + loaders: [ + { + test: /\.js$/, + loader: 'babel', + exclude: /node_modules/, + }, + ], + }, +}; diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock new file mode 100644 index 000000000..79da1ddb1 --- /dev/null +++ b/packages/accounts-mongo/yarn.lock @@ -0,0 +1,3642 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +abab@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.3.tgz#b81de5f7274ec4e756d797cd834f303642724e5d" + +abbrev@1: + version "1.0.9" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" + +acorn-globals@^1.0.4: + version "1.0.9" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-1.0.9.tgz#55bb5e98691507b74579d0513413217c380c54cf" + dependencies: + acorn "^2.1.0" + +acorn-jsx@^3.0.0, acorn-jsx@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" + dependencies: + acorn "^3.0.4" + +acorn@^2.1.0, acorn@^2.4.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-2.7.0.tgz#ab6e7d9d886aaca8b085bc3312b79a198433f0e7" + +acorn@^3.0.0, acorn@^3.0.4: + version "3.3.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" + +acorn@^4.0.1: + version "4.0.4" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.4.tgz#17a8d6a7a6c4ef538b814ec9abac2779293bf30a" + +ajv-keywords@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.2.0.tgz#676c4f087bfe1e8b12dca6fda2f3c74f417b099c" + +ajv@^4.7.0: + version "4.10.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.10.0.tgz#7ae6169180eb199192a8b9a19fd0f47fc9ac8764" + dependencies: + co "^4.6.0" + json-stable-stringify "^1.0.1" + +align-text@^0.1.1, align-text@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" + dependencies: + kind-of "^3.0.2" + longest "^1.0.1" + repeat-string "^1.5.2" + +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + +ansi-escapes@^1.1.0, ansi-escapes@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" + +ansi-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.0.0.tgz#c5061b6e0ef8a81775e50f5d66151bf6bf371107" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + +ansicolors@~0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.2.1.tgz#be089599097b74a5c9c4a84a0cdbcdb62bd87aef" + +anymatch@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.0.tgz#a3e52fa39168c825ff57b0248126ce5a8ff95507" + dependencies: + arrify "^1.0.0" + micromatch "^2.1.5" + +append-transform@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.3.0.tgz#d6933ce4a85f09445d9ccc4cc119051b7381a813" + +aproba@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.0.4.tgz#2713680775e7614c8ba186c065d4e2e52d1072c0" + +are-we-there-yet@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz#80e470e95a084794fe1899262c5667c6e88de1b3" + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.0 || ^1.1.13" + +argparse@^1.0.7: + version "1.0.9" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" + dependencies: + sprintf-js "~1.0.2" + +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + dependencies: + arr-flatten "^1.0.1" + +arr-flatten@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.1.tgz#e5ffe54d45e19f32f216e91eb99c8ce892bb604b" + +array-differ@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031" + +array-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" + +array-union@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + dependencies: + array-uniq "^1.0.1" + +array-uniq@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + +arrify@^1.0.0, arrify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + +asn1@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + +assert-plus@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" + +assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + +assert@^1.1.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" + dependencies: + util "0.10.3" + +async-each@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" + +async@1.x, async@^1.3.0, async@^1.4.0, async@^1.4.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + +async@^0.9.0: + version "0.9.2" + resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d" + +async@~0.2.6: + version "0.2.10" + resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + +aws-sign2@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" + +aws4@^1.2.1: + version "1.5.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.5.0.tgz#0a29ffb79c31c9e712eeb087e8e7a64b4a56d755" + +babel-cli@^6.16.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-cli/-/babel-cli-6.18.0.tgz#92117f341add9dead90f6fa7d0a97c0cc08ec186" + dependencies: + babel-core "^6.18.0" + babel-polyfill "^6.16.0" + babel-register "^6.18.0" + babel-runtime "^6.9.0" + commander "^2.8.1" + convert-source-map "^1.1.0" + fs-readdir-recursive "^1.0.0" + glob "^5.0.5" + lodash "^4.2.0" + output-file-sync "^1.1.0" + path-is-absolute "^1.0.0" + slash "^1.0.0" + source-map "^0.5.0" + v8flags "^2.0.10" + optionalDependencies: + chokidar "^1.0.0" + +babel-code-frame@^6.16.0, babel-code-frame@^6.20.0: + version "6.20.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.20.0.tgz#b968f839090f9a8bc6d41938fb96cb84f7387b26" + dependencies: + chalk "^1.1.0" + esutils "^2.0.2" + js-tokens "^2.0.0" + +babel-core@^6.0.0, babel-core@^6.17.0, babel-core@^6.18.0: + version "6.21.0" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.21.0.tgz#75525480c21c803f826ef3867d22c19f080a3724" + dependencies: + babel-code-frame "^6.20.0" + babel-generator "^6.21.0" + babel-helpers "^6.16.0" + babel-messages "^6.8.0" + babel-register "^6.18.0" + babel-runtime "^6.20.0" + babel-template "^6.16.0" + babel-traverse "^6.21.0" + babel-types "^6.21.0" + babylon "^6.11.0" + convert-source-map "^1.1.0" + debug "^2.1.1" + json5 "^0.5.0" + lodash "^4.2.0" + minimatch "^3.0.2" + path-is-absolute "^1.0.0" + private "^0.1.6" + slash "^1.0.0" + source-map "^0.5.0" + +babel-eslint@^7.0.0: + version "7.1.1" + resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-7.1.1.tgz#8a6a884f085aa7060af69cfc77341c2f99370fb2" + dependencies: + babel-code-frame "^6.16.0" + babel-traverse "^6.15.0" + babel-types "^6.15.0" + babylon "^6.13.0" + lodash.pickby "^4.6.0" + +babel-generator@^6.18.0, babel-generator@^6.21.0: + version "6.21.0" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.21.0.tgz#605f1269c489a1c75deeca7ea16d43d4656c8494" + dependencies: + babel-messages "^6.8.0" + babel-runtime "^6.20.0" + babel-types "^6.21.0" + detect-indent "^4.0.0" + jsesc "^1.3.0" + lodash "^4.2.0" + source-map "^0.5.0" + +babel-helper-call-delegate@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.18.0.tgz#05b14aafa430884b034097ef29e9f067ea4133bd" + dependencies: + babel-helper-hoist-variables "^6.18.0" + babel-runtime "^6.0.0" + babel-traverse "^6.18.0" + babel-types "^6.18.0" + +babel-helper-define-map@^6.18.0, babel-helper-define-map@^6.8.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.18.0.tgz#8d6c85dc7fbb4c19be3de40474d18e97c3676ec2" + dependencies: + babel-helper-function-name "^6.18.0" + babel-runtime "^6.9.0" + babel-types "^6.18.0" + lodash "^4.2.0" + +babel-helper-function-name@^6.18.0, babel-helper-function-name@^6.8.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.18.0.tgz#68ec71aeba1f3e28b2a6f0730190b754a9bf30e6" + dependencies: + babel-helper-get-function-arity "^6.18.0" + babel-runtime "^6.0.0" + babel-template "^6.8.0" + babel-traverse "^6.18.0" + babel-types "^6.18.0" + +babel-helper-get-function-arity@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.18.0.tgz#a5b19695fd3f9cdfc328398b47dafcd7094f9f24" + dependencies: + babel-runtime "^6.0.0" + babel-types "^6.18.0" + +babel-helper-hoist-variables@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.18.0.tgz#a835b5ab8b46d6de9babefae4d98ea41e866b82a" + dependencies: + babel-runtime "^6.0.0" + babel-types "^6.18.0" + +babel-helper-optimise-call-expression@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.18.0.tgz#9261d0299ee1a4f08a6dd28b7b7c777348fd8f0f" + dependencies: + babel-runtime "^6.0.0" + babel-types "^6.18.0" + +babel-helper-regex@^6.8.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.18.0.tgz#ae0ebfd77de86cb2f1af258e2cc20b5fe893ecc6" + dependencies: + babel-runtime "^6.9.0" + babel-types "^6.18.0" + lodash "^4.2.0" + +babel-helper-remap-async-to-generator@^6.16.0: + version "6.20.3" + resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.20.3.tgz#9dd3b396f13e35ef63e538098500adc24c63c4e7" + dependencies: + babel-helper-function-name "^6.18.0" + babel-runtime "^6.20.0" + babel-template "^6.16.0" + babel-traverse "^6.20.0" + babel-types "^6.20.0" + +babel-helper-replace-supers@^6.18.0, babel-helper-replace-supers@^6.8.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.18.0.tgz#28ec69877be4144dbd64f4cc3a337e89f29a924e" + dependencies: + babel-helper-optimise-call-expression "^6.18.0" + babel-messages "^6.8.0" + babel-runtime "^6.0.0" + babel-template "^6.16.0" + babel-traverse "^6.18.0" + babel-types "^6.18.0" + +babel-helpers@^6.16.0: + version "6.16.0" + resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.16.0.tgz#1095ec10d99279460553e67eb3eee9973d3867e3" + dependencies: + babel-runtime "^6.0.0" + babel-template "^6.16.0" + +babel-jest@^18.0.0: + version "18.0.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-18.0.0.tgz#17ebba8cb3285c906d859e8707e4e79795fb65e3" + dependencies: + babel-core "^6.0.0" + babel-plugin-istanbul "^3.0.0" + babel-preset-jest "^18.0.0" + +babel-loader@^6.2.5: + version "6.2.10" + resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-6.2.10.tgz#adefc2b242320cd5d15e65b31cea0e8b1b02d4b0" + dependencies: + find-cache-dir "^0.1.1" + loader-utils "^0.2.11" + mkdirp "^0.5.1" + object-assign "^4.0.1" + +babel-messages@^6.8.0: + version "6.8.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.8.0.tgz#bf504736ca967e6d65ef0adb5a2a5f947c8e0eb9" + dependencies: + babel-runtime "^6.0.0" + +babel-plugin-check-es2015-constants@^6.3.13: + version "6.8.0" + resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.8.0.tgz#dbf024c32ed37bfda8dee1e76da02386a8d26fe7" + dependencies: + babel-runtime "^6.0.0" + +babel-plugin-istanbul@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-3.0.0.tgz#da7324520ae0b8a44b6a078e72e883374a9fab76" + dependencies: + find-up "^1.1.2" + istanbul-lib-instrument "^1.1.4" + object-assign "^4.1.0" + test-exclude "^3.2.2" + +babel-plugin-jest-hoist@^18.0.0: + version "18.0.0" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-18.0.0.tgz#4150e70ecab560e6e7344adc849498072d34e12a" + +babel-plugin-syntax-async-functions@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" + +babel-plugin-transform-async-to-generator@^6.16.0: + version "6.16.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.16.0.tgz#19ec36cb1486b59f9f468adfa42ce13908ca2999" + dependencies: + babel-helper-remap-async-to-generator "^6.16.0" + babel-plugin-syntax-async-functions "^6.8.0" + babel-runtime "^6.0.0" + +babel-plugin-transform-es2015-arrow-functions@^6.3.13: + version "6.8.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.8.0.tgz#5b63afc3181bdc9a8c4d481b5a4f3f7d7fef3d9d" + dependencies: + babel-runtime "^6.0.0" + +babel-plugin-transform-es2015-block-scoped-functions@^6.3.13: + version "6.8.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.8.0.tgz#ed95d629c4b5a71ae29682b998f70d9833eb366d" + dependencies: + babel-runtime "^6.0.0" + +babel-plugin-transform-es2015-block-scoping@^6.18.0: + version "6.21.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.21.0.tgz#e840687f922e70fb2c42bb13501838c174a115ed" + dependencies: + babel-runtime "^6.20.0" + babel-template "^6.15.0" + babel-traverse "^6.21.0" + babel-types "^6.21.0" + lodash "^4.2.0" + +babel-plugin-transform-es2015-classes@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.18.0.tgz#ffe7a17321bf83e494dcda0ae3fc72df48ffd1d9" + dependencies: + babel-helper-define-map "^6.18.0" + babel-helper-function-name "^6.18.0" + babel-helper-optimise-call-expression "^6.18.0" + babel-helper-replace-supers "^6.18.0" + babel-messages "^6.8.0" + babel-runtime "^6.9.0" + babel-template "^6.14.0" + babel-traverse "^6.18.0" + babel-types "^6.18.0" + +babel-plugin-transform-es2015-computed-properties@^6.3.13: + version "6.8.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.8.0.tgz#f51010fd61b3bd7b6b60a5fdfd307bb7a5279870" + dependencies: + babel-helper-define-map "^6.8.0" + babel-runtime "^6.0.0" + babel-template "^6.8.0" + +babel-plugin-transform-es2015-destructuring@^6.18.0: + version "6.19.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.19.0.tgz#ff1d911c4b3f4cab621bd66702a869acd1900533" + dependencies: + babel-runtime "^6.9.0" + +babel-plugin-transform-es2015-duplicate-keys@^6.6.0: + version "6.8.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.8.0.tgz#fd8f7f7171fc108cc1c70c3164b9f15a81c25f7d" + dependencies: + babel-runtime "^6.0.0" + babel-types "^6.8.0" + +babel-plugin-transform-es2015-for-of@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.18.0.tgz#4c517504db64bf8cfc119a6b8f177211f2028a70" + dependencies: + babel-runtime "^6.0.0" + +babel-plugin-transform-es2015-function-name@^6.9.0: + version "6.9.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.9.0.tgz#8c135b17dbd064e5bba56ec511baaee2fca82719" + dependencies: + babel-helper-function-name "^6.8.0" + babel-runtime "^6.9.0" + babel-types "^6.9.0" + +babel-plugin-transform-es2015-literals@^6.3.13: + version "6.8.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.8.0.tgz#50aa2e5c7958fc2ab25d74ec117e0cc98f046468" + dependencies: + babel-runtime "^6.0.0" + +babel-plugin-transform-es2015-modules-amd@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.18.0.tgz#49a054cbb762bdf9ae2d8a807076cfade6141e40" + dependencies: + babel-plugin-transform-es2015-modules-commonjs "^6.18.0" + babel-runtime "^6.0.0" + babel-template "^6.8.0" + +babel-plugin-transform-es2015-modules-commonjs@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.18.0.tgz#c15ae5bb11b32a0abdcc98a5837baa4ee8d67bcc" + dependencies: + babel-plugin-transform-strict-mode "^6.18.0" + babel-runtime "^6.0.0" + babel-template "^6.16.0" + babel-types "^6.18.0" + +babel-plugin-transform-es2015-modules-systemjs@^6.18.0: + version "6.19.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.19.0.tgz#50438136eba74527efa00a5b0fefaf1dc4071da6" + dependencies: + babel-helper-hoist-variables "^6.18.0" + babel-runtime "^6.11.6" + babel-template "^6.14.0" + +babel-plugin-transform-es2015-modules-umd@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.18.0.tgz#23351770ece5c1f8e83ed67cb1d7992884491e50" + dependencies: + babel-plugin-transform-es2015-modules-amd "^6.18.0" + babel-runtime "^6.0.0" + babel-template "^6.8.0" + +babel-plugin-transform-es2015-object-super@^6.3.13: + version "6.8.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.8.0.tgz#1b858740a5a4400887c23dcff6f4d56eea4a24c5" + dependencies: + babel-helper-replace-supers "^6.8.0" + babel-runtime "^6.0.0" + +babel-plugin-transform-es2015-parameters@^6.18.0: + version "6.21.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.21.0.tgz#46a655e6864ef984091448cdf024d87b60b2a7d8" + dependencies: + babel-helper-call-delegate "^6.18.0" + babel-helper-get-function-arity "^6.18.0" + babel-runtime "^6.9.0" + babel-template "^6.16.0" + babel-traverse "^6.21.0" + babel-types "^6.21.0" + +babel-plugin-transform-es2015-shorthand-properties@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.18.0.tgz#e2ede3b7df47bf980151926534d1dd0cbea58f43" + dependencies: + babel-runtime "^6.0.0" + babel-types "^6.18.0" + +babel-plugin-transform-es2015-spread@^6.3.13: + version "6.8.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.8.0.tgz#0217f737e3b821fa5a669f187c6ed59205f05e9c" + dependencies: + babel-runtime "^6.0.0" + +babel-plugin-transform-es2015-sticky-regex@^6.3.13: + version "6.8.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.8.0.tgz#e73d300a440a35d5c64f5c2a344dc236e3df47be" + dependencies: + babel-helper-regex "^6.8.0" + babel-runtime "^6.0.0" + babel-types "^6.8.0" + +babel-plugin-transform-es2015-template-literals@^6.6.0: + version "6.8.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.8.0.tgz#86eb876d0a2c635da4ec048b4f7de9dfc897e66b" + dependencies: + babel-runtime "^6.0.0" + +babel-plugin-transform-es2015-typeof-symbol@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.18.0.tgz#0b14c48629c90ff47a0650077f6aa699bee35798" + dependencies: + babel-runtime "^6.0.0" + +babel-plugin-transform-es2015-unicode-regex@^6.3.13: + version "6.11.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.11.0.tgz#6298ceabaad88d50a3f4f392d8de997260f6ef2c" + dependencies: + babel-helper-regex "^6.8.0" + babel-runtime "^6.0.0" + regexpu-core "^2.0.0" + +babel-plugin-transform-regenerator@^6.16.0: + version "6.21.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.21.0.tgz#75d0c7e7f84f379358f508451c68a2c5fa5a9703" + dependencies: + regenerator-transform "0.9.8" + +babel-plugin-transform-strict-mode@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.18.0.tgz#df7cf2991fe046f44163dcd110d5ca43bc652b9d" + dependencies: + babel-runtime "^6.0.0" + babel-types "^6.18.0" + +babel-polyfill@^6.16.0: + version "6.20.0" + resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.20.0.tgz#de4a371006139e20990aac0be367d398331204e7" + dependencies: + babel-runtime "^6.20.0" + core-js "^2.4.0" + regenerator-runtime "^0.10.0" + +babel-preset-es2015@^6.16.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.18.0.tgz#b8c70df84ec948c43dcf2bf770e988eb7da88312" + dependencies: + babel-plugin-check-es2015-constants "^6.3.13" + babel-plugin-transform-es2015-arrow-functions "^6.3.13" + babel-plugin-transform-es2015-block-scoped-functions "^6.3.13" + babel-plugin-transform-es2015-block-scoping "^6.18.0" + babel-plugin-transform-es2015-classes "^6.18.0" + babel-plugin-transform-es2015-computed-properties "^6.3.13" + babel-plugin-transform-es2015-destructuring "^6.18.0" + babel-plugin-transform-es2015-duplicate-keys "^6.6.0" + babel-plugin-transform-es2015-for-of "^6.18.0" + babel-plugin-transform-es2015-function-name "^6.9.0" + babel-plugin-transform-es2015-literals "^6.3.13" + babel-plugin-transform-es2015-modules-amd "^6.18.0" + babel-plugin-transform-es2015-modules-commonjs "^6.18.0" + babel-plugin-transform-es2015-modules-systemjs "^6.18.0" + babel-plugin-transform-es2015-modules-umd "^6.18.0" + babel-plugin-transform-es2015-object-super "^6.3.13" + babel-plugin-transform-es2015-parameters "^6.18.0" + babel-plugin-transform-es2015-shorthand-properties "^6.18.0" + babel-plugin-transform-es2015-spread "^6.3.13" + babel-plugin-transform-es2015-sticky-regex "^6.3.13" + babel-plugin-transform-es2015-template-literals "^6.6.0" + babel-plugin-transform-es2015-typeof-symbol "^6.18.0" + babel-plugin-transform-es2015-unicode-regex "^6.3.13" + babel-plugin-transform-regenerator "^6.16.0" + +babel-preset-jest@^18.0.0: + version "18.0.0" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-18.0.0.tgz#84faf8ca3ec65aba7d5e3f59bbaed935ab24049e" + dependencies: + babel-plugin-jest-hoist "^18.0.0" + +babel-register@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.18.0.tgz#892e2e03865078dd90ad2c715111ec4449b32a68" + dependencies: + babel-core "^6.18.0" + babel-runtime "^6.11.6" + core-js "^2.4.0" + home-or-tmp "^2.0.0" + lodash "^4.2.0" + mkdirp "^0.5.1" + source-map-support "^0.4.2" + +babel-runtime@^6.0.0, babel-runtime@^6.11.6, babel-runtime@^6.18.0, babel-runtime@^6.20.0, babel-runtime@^6.9.0: + version "6.20.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.20.0.tgz#87300bdcf4cd770f09bf0048c64204e17806d16f" + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.10.0" + +babel-template@^6.14.0, babel-template@^6.15.0, babel-template@^6.16.0, babel-template@^6.8.0: + version "6.16.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.16.0.tgz#e149dd1a9f03a35f817ddbc4d0481988e7ebc8ca" + dependencies: + babel-runtime "^6.9.0" + babel-traverse "^6.16.0" + babel-types "^6.16.0" + babylon "^6.11.0" + lodash "^4.2.0" + +babel-traverse@^6.15.0, babel-traverse@^6.16.0, babel-traverse@^6.18.0, babel-traverse@^6.20.0, babel-traverse@^6.21.0: + version "6.21.0" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.21.0.tgz#69c6365804f1a4f69eb1213f85b00a818b8c21ad" + dependencies: + babel-code-frame "^6.20.0" + babel-messages "^6.8.0" + babel-runtime "^6.20.0" + babel-types "^6.21.0" + babylon "^6.11.0" + debug "^2.2.0" + globals "^9.0.0" + invariant "^2.2.0" + lodash "^4.2.0" + +babel-types@^6.15.0, babel-types@^6.16.0, babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.20.0, babel-types@^6.21.0, babel-types@^6.8.0, babel-types@^6.9.0: + version "6.21.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.21.0.tgz#314b92168891ef6d3806b7f7a917fdf87c11a4b2" + dependencies: + babel-runtime "^6.20.0" + esutils "^2.0.2" + lodash "^4.2.0" + to-fast-properties "^1.0.1" + +babylon@^6.11.0, babylon@^6.13.0: + version "6.14.1" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.14.1.tgz#956275fab72753ad9b3435d7afe58f8bf0a29815" + +balanced-match@^0.4.1: + version "0.4.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" + +base64-js@^1.0.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.0.tgz#a39992d723584811982be5e290bb6a53d86700f1" + +bcrypt-pbkdf@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz#3ca76b85241c7170bf7d9703e7b9aa74630040d4" + dependencies: + tweetnacl "^0.14.3" + +big.js@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.1.3.tgz#4cada2193652eb3ca9ec8e55c9015669c9806978" + +binary-extensions@^1.0.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.8.0.tgz#48ec8d16df4377eae5fa5884682480af4d95c774" + +bl@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/bl/-/bl-1.1.2.tgz#fdca871a99713aa00d19e3bbba41c44787a65398" + dependencies: + readable-stream "~2.0.5" + +block-stream@*: + version "0.0.9" + resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" + dependencies: + inherits "~2.0.0" + +boom@2.x.x: + version "2.10.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" + dependencies: + hoek "2.x.x" + +brace-expansion@^1.0.0: + version "1.1.6" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9" + dependencies: + balanced-match "^0.4.1" + concat-map "0.0.1" + +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +browser-resolve@^1.11.2: + version "1.11.2" + resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" + dependencies: + resolve "1.1.7" + +browserify-aes@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-0.4.0.tgz#067149b668df31c4b58533e02d01e806d8608e2c" + dependencies: + inherits "^2.0.1" + +browserify-zlib@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.1.4.tgz#bb35f8a519f600e0fa6b8485241c979d0141fb2d" + dependencies: + pako "~0.2.0" + +bser@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bser/-/bser-1.0.2.tgz#381116970b2a6deea5646dd15dd7278444b56169" + dependencies: + node-int64 "^0.4.0" + +buffer-shims@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" + +buffer@^4.9.0: + version "4.9.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" + dependencies: + base64-js "^1.0.2" + ieee754 "^1.1.4" + isarray "^1.0.0" + +builtin-modules@^1.0.0, builtin-modules@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + +builtin-status-codes@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-2.0.0.tgz#6f22003baacf003ccd287afe6872151fddc58579" + +caller-path@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" + dependencies: + callsites "^0.2.0" + +callsites@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" + +callsites@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" + +camelcase@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + +camelcase@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" + +cardinal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/cardinal/-/cardinal-1.0.0.tgz#50e21c1b0aa37729f9377def196b5a9cec932ee9" + dependencies: + ansicolors "~0.2.1" + redeyed "~1.0.0" + +caseless@~0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" + +center-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + dependencies: + align-text "^0.1.3" + lazy-cache "^1.0.3" + +chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +chokidar@^1.0.0: + version "1.6.1" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.6.1.tgz#2f4447ab5e96e50fb3d789fd90d4c72e0e4c70c2" + dependencies: + anymatch "^1.3.0" + async-each "^1.0.0" + glob-parent "^2.0.0" + inherits "^2.0.1" + is-binary-path "^1.0.0" + is-glob "^2.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.0.0" + optionalDependencies: + fsevents "^1.0.0" + +ci-info@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.0.0.tgz#dc5285f2b4e251821683681c381c3388f46ec534" + +circular-json@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.1.tgz#be8b36aefccde8b3ca7aa2d6afc07a37242c0d2d" + +cli-cursor@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" + dependencies: + restore-cursor "^1.0.1" + +cli-table@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.1.tgz#f53b05266a8b1a0b934b3d0821e6e2dc5914ae23" + dependencies: + colors "1.0.3" + +cli-usage@^0.1.1: + version "0.1.4" + resolved "https://registry.yarnpkg.com/cli-usage/-/cli-usage-0.1.4.tgz#7c01e0dc706c234b39c933838c8e20b2175776e2" + dependencies: + marked "^0.3.6" + marked-terminal "^1.6.2" + +cli-width@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.1.0.tgz#b234ca209b29ef66fc518d9b98d5847b00edf00a" + +cliui@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + dependencies: + center-align "^0.1.1" + right-align "^0.1.1" + wordwrap "0.0.2" + +cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +clone@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + +colors@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" + +combined-stream@^1.0.5, combined-stream@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" + dependencies: + delayed-stream "~1.0.0" + +commander@^2.8.1, commander@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" + dependencies: + graceful-readlink ">= 1.0.0" + +commondir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +concat-stream@^1.4.6: + version "1.6.0" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" + dependencies: + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + +console-browserify@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" + dependencies: + date-now "^0.1.4" + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + +constants-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" + +contains-path@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" + +content-type-parser@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.1.tgz#c3e56988c53c65127fb46d4032a3a900246fdc94" + +convert-source-map@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.3.0.tgz#e9f3e9c6e2728efc2676696a70eb382f73106a67" + +core-js@^2.4.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.4.1.tgz#4de911e667b0eae9124e34254b53aea6fc618d3e" + +core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + +coveralls@^2.11.14: + version "2.11.15" + resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-2.11.15.tgz#37d3474369d66c14f33fa73a9d25cee6e099fca0" + dependencies: + js-yaml "3.6.1" + lcov-parse "0.0.10" + log-driver "1.2.5" + minimist "1.2.0" + request "2.75.0" + +cryptiles@2.x.x: + version "2.0.5" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" + dependencies: + boom "2.x.x" + +crypto-browserify@3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.3.0.tgz#b9fc75bb4a0ed61dcf1cd5dae96eb30c9c3e506c" + dependencies: + browserify-aes "0.4.0" + pbkdf2-compat "2.0.1" + ripemd160 "0.2.0" + sha.js "2.2.6" + +cssom@0.3.x, "cssom@>= 0.3.0 < 0.4.0": + version "0.3.1" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.1.tgz#c9e37ef2490e64f6d1baa10fda852257082c25d3" + +"cssstyle@>= 0.2.36 < 0.3.0": + version "0.2.37" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.2.37.tgz#541097234cb2513c83ceed3acddc27ff27987d54" + dependencies: + cssom "0.3.x" + +d@^0.1.1, d@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/d/-/d-0.1.1.tgz#da184c535d18d8ee7ba2aa229b914009fae11309" + dependencies: + es5-ext "~0.10.2" + +damerau-levenshtein@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.3.tgz#ae4f4ce0b62acae10ff63a01bb08f652f5213af2" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + dependencies: + assert-plus "^1.0.0" + +date-now@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" + +debug@2.2.0, debug@^2.1.1, debug@^2.2.0, debug@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" + dependencies: + ms "0.7.1" + +decamelize@^1.0.0, decamelize@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +deep-extend@~0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.1.tgz#efe4113d08085f4e6f9687759810f807469e2253" + +deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + +del@^2.0.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" + dependencies: + globby "^5.0.0" + is-path-cwd "^1.0.0" + is-path-in-cwd "^1.0.0" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + rimraf "^2.2.8" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + +detect-indent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" + dependencies: + repeating "^2.0.0" + +diff@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.1.0.tgz#9406c73a401e6c2b3ba901c5e2c44eb6a60c5385" + +doctrine@1.5.0, doctrine@^1.2.2: + version "1.5.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" + dependencies: + esutils "^2.0.2" + isarray "^1.0.0" + +domain-browser@^1.1.1: + version "1.1.7" + resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc" + +ecc-jsbn@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + dependencies: + jsbn "~0.1.0" + +emojis-list@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" + +enhanced-resolve@~0.9.0: + version "0.9.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-0.9.1.tgz#4d6e689b3725f86090927ccc86cd9f1635b89e2e" + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.2.0" + tapable "^0.1.8" + +"errno@>=0.1.1 <0.2.0-0", errno@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" + dependencies: + prr "~0.0.0" + +error-ex@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.0.tgz#e67b43f3e82c96ea3a584ffee0b9fc3325d802d9" + dependencies: + is-arrayish "^0.2.1" + +es5-ext@^0.10.7, es5-ext@^0.10.8, es5-ext@~0.10.11, es5-ext@~0.10.2, es5-ext@~0.10.7: + version "0.10.12" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.12.tgz#aa84641d4db76b62abba5e45fd805ecbab140047" + dependencies: + es6-iterator "2" + es6-symbol "~3.1" + +es6-iterator@2: + version "2.0.0" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.0.tgz#bd968567d61635e33c0b80727613c9cb4b096bac" + dependencies: + d "^0.1.1" + es5-ext "^0.10.7" + es6-symbol "3" + +es6-map@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.4.tgz#a34b147be224773a4d7da8072794cefa3632b897" + dependencies: + d "~0.1.1" + es5-ext "~0.10.11" + es6-iterator "2" + es6-set "~0.1.3" + es6-symbol "~3.1.0" + event-emitter "~0.3.4" + +es6-set@~0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.4.tgz#9516b6761c2964b92ff479456233a247dc707ce8" + dependencies: + d "~0.1.1" + es5-ext "~0.10.11" + es6-iterator "2" + es6-symbol "3" + event-emitter "~0.3.4" + +es6-symbol@3, es6-symbol@~3.1, es6-symbol@~3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.0.tgz#94481c655e7a7cad82eba832d97d5433496d7ffa" + dependencies: + d "~0.1.1" + es5-ext "~0.10.11" + +es6-weak-map@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.1.tgz#0d2bbd8827eb5fb4ba8f97fbfea50d43db21ea81" + dependencies: + d "^0.1.1" + es5-ext "^0.10.8" + es6-iterator "2" + es6-symbol "3" + +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +escodegen@^1.6.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" + dependencies: + esprima "^2.7.1" + estraverse "^1.9.1" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.2.0" + +escope@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" + dependencies: + es6-map "^0.1.3" + es6-weak-map "^2.0.1" + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-config-airbnb-base@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-8.0.0.tgz#c5e958a469ab8af76aff068b43d784e5afe74ca7" + +eslint-config-airbnb-base@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-9.0.0.tgz#03e135562aa6c4d0d9f1bbda96d901326bf58ad2" + +eslint-config-airbnb@^12.0.0: + version "12.0.0" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-12.0.0.tgz#ab282b756a25f03d04ac264c24d673a08a803270" + dependencies: + eslint-config-airbnb-base "^8.0.0" + +eslint-import-resolver-node@^0.2.0: + version "0.2.3" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.2.3.tgz#5add8106e8c928db2cba232bcd9efa846e3da16c" + dependencies: + debug "^2.2.0" + object-assign "^4.0.1" + resolve "^1.1.6" + +eslint-module-utils@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.0.0.tgz#a6f8c21d901358759cdc35dbac1982ae1ee58bce" + dependencies: + debug "2.2.0" + pkg-dir "^1.0.0" + +eslint-plugin-import@^2.0.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.2.0.tgz#72ba306fad305d67c4816348a4699a4229ac8b4e" + dependencies: + builtin-modules "^1.1.1" + contains-path "^0.1.0" + debug "^2.2.0" + doctrine "1.5.0" + eslint-import-resolver-node "^0.2.0" + eslint-module-utils "^2.0.0" + has "^1.0.1" + lodash.cond "^4.3.0" + minimatch "^3.0.3" + pkg-up "^1.0.0" + +eslint-plugin-jsx-a11y@^2.2.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-2.2.3.tgz#4e35cb71b8a7db702ac415c806eb8e8d9ea6c65d" + dependencies: + damerau-levenshtein "^1.0.0" + jsx-ast-utils "^1.0.0" + object-assign "^4.0.1" + +eslint-plugin-react@^6.3.0: + version "6.8.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-6.8.0.tgz#741ab5438a094532e5ce1bbb935d6832356f492d" + dependencies: + doctrine "^1.2.2" + jsx-ast-utils "^1.3.4" + +eslint@^3.7.1: + version "3.12.2" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.12.2.tgz#6be5a9aa29658252abd7f91e9132bab1f26f3c34" + dependencies: + babel-code-frame "^6.16.0" + chalk "^1.1.3" + concat-stream "^1.4.6" + debug "^2.1.1" + doctrine "^1.2.2" + escope "^3.6.0" + espree "^3.3.1" + estraverse "^4.2.0" + esutils "^2.0.2" + file-entry-cache "^2.0.0" + glob "^7.0.3" + globals "^9.14.0" + ignore "^3.2.0" + imurmurhash "^0.1.4" + inquirer "^0.12.0" + is-my-json-valid "^2.10.0" + is-resolvable "^1.0.0" + js-yaml "^3.5.1" + json-stable-stringify "^1.0.0" + levn "^0.3.0" + lodash "^4.0.0" + mkdirp "^0.5.0" + natural-compare "^1.4.0" + optionator "^0.8.2" + path-is-inside "^1.0.1" + pluralize "^1.2.1" + progress "^1.1.8" + require-uncached "^1.0.2" + shelljs "^0.7.5" + strip-bom "^3.0.0" + strip-json-comments "~1.0.1" + table "^3.7.8" + text-table "~0.2.0" + user-home "^2.0.0" + +espree@^3.3.1: + version "3.3.2" + resolved "https://registry.yarnpkg.com/espree/-/espree-3.3.2.tgz#dbf3fadeb4ecb4d4778303e50103b3d36c88b89c" + dependencies: + acorn "^4.0.1" + acorn-jsx "^3.0.0" + +esprima@^2.6.0, esprima@^2.7.1: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + +esprima@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.0.0.tgz#53cf247acda77313e551c3aa2e73342d3fb4f7d9" + +esrecurse@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.1.0.tgz#4713b6536adf7f2ac4f327d559e7756bff648220" + dependencies: + estraverse "~4.1.0" + object-assign "^4.0.1" + +estraverse@^1.9.1: + version "1.9.3" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" + +estraverse@^4.1.1, estraverse@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" + +estraverse@~4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.1.1.tgz#f6caca728933a850ef90661d0e17982ba47111a2" + +esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + +event-emitter@~0.3.4: + version "0.3.4" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.4.tgz#8d63ddfb4cfe1fae3b32ca265c4c720222080bb5" + dependencies: + d "~0.1.1" + es5-ext "~0.10.7" + +events@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" + +exec-sh@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.0.tgz#14f75de3f20d286ef933099b2ce50a90359cef10" + dependencies: + merge "^1.1.3" + +exit-hook@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + dependencies: + is-posix-bracket "^0.1.0" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + dependencies: + fill-range "^2.1.0" + +extend@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4" + +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + dependencies: + is-extglob "^1.0.0" + +extsprintf@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" + +fast-levenshtein@~2.0.4: + version "2.0.5" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.5.tgz#bd33145744519ab1c36c3ee9f31f08e9079b67f2" + +fb-watchman@^1.8.0, fb-watchman@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-1.9.0.tgz#6f268f1f347a6b3c875d1e89da7e1ed79adfc0ec" + dependencies: + bser "^1.0.2" + +figures@^1.3.5: + version "1.7.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" + dependencies: + escape-string-regexp "^1.0.5" + object-assign "^4.1.0" + +file-entry-cache@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" + dependencies: + flat-cache "^1.2.1" + object-assign "^4.0.1" + +filename-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.0.tgz#996e3e80479b98b9897f15a8a58b3d084e926775" + +fileset@0.2.x: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fileset/-/fileset-0.2.1.tgz#588ef8973c6623b2a76df465105696b96aac8067" + dependencies: + glob "5.x" + minimatch "2.x" + +fill-range@^2.1.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^1.1.3" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +find-cache-dir@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-0.1.1.tgz#c8defae57c8a52a8a784f9e31c57c742e993a0b9" + dependencies: + commondir "^1.0.1" + mkdirp "^0.5.1" + pkg-dir "^1.0.0" + +find-up@^1.0.0, find-up@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +flat-cache@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.2.2.tgz#fa86714e72c21db88601761ecf2f555d1abc6b96" + dependencies: + circular-json "^0.3.1" + del "^2.0.2" + graceful-fs "^4.1.2" + write "^0.2.1" + +for-in@^0.1.5: + version "0.1.6" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.6.tgz#c9f96e89bfad18a545af5ec3ed352a1d9e5b4dc8" + +for-own@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.4.tgz#0149b41a39088c7515f51ebe1c1386d45f935072" + dependencies: + for-in "^0.1.5" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + +form-data@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.0.0.tgz#6f0aebadcc5da16c13e1ecc11137d85f9b883b25" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.11" + +form-data@~2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.2.tgz#89c3534008b97eada4cbb157d58f6f5df025eae4" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.12" + +fs-readdir-recursive@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.0.0.tgz#8cd1745c8b4f8a29c8caec392476921ba195f560" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +fsevents@^1.0.0: + version "1.0.15" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.0.15.tgz#fa63f590f3c2ad91275e4972a6cea545fb0aae44" + dependencies: + nan "^2.3.0" + node-pre-gyp "^0.6.29" + +fstream-ignore@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" + dependencies: + fstream "^1.0.0" + inherits "2" + minimatch "^3.0.0" + +fstream@^1.0.0, fstream@^1.0.2, fstream@~1.0.10: + version "1.0.10" + resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.10.tgz#604e8a92fe26ffd9f6fae30399d4984e1ab22822" + dependencies: + graceful-fs "^4.1.2" + inherits "~2.0.0" + mkdirp ">=0.5 0" + rimraf "2" + +function-bind@^1.0.2: + version "1.1.0" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771" + +gauge@~2.7.1: + version "2.7.2" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.2.tgz#15cecc31b02d05345a5d6b0e171cdb3ad2307774" + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + supports-color "^0.2.0" + wide-align "^1.1.0" + +generate-function@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" + +generate-object-property@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" + dependencies: + is-property "^1.0.0" + +get-caller-file@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" + +getpass@^0.1.1: + version "0.1.6" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.6.tgz#283ffd9fc1256840875311c1b60e8c40187110e6" + dependencies: + assert-plus "^1.0.0" + +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + dependencies: + is-glob "^2.0.0" + +glob@5.x, glob@^5.0.5: + version "5.0.15" + resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5: + version "7.1.1" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.2" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^9.0.0, globals@^9.14.0: + version "9.14.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.14.0.tgz#8859936af0038741263053b39d0e76ca241e4034" + +globby@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" + dependencies: + array-union "^1.0.1" + arrify "^1.0.0" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +graceful-fs@^4.1.2, graceful-fs@^4.1.4, graceful-fs@^4.1.6: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +"graceful-readlink@>= 1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" + +growly@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" + +handlebars@^4.0.3: + version "4.0.6" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.6.tgz#2ce4484850537f9c97a8026d5399b935c4ed4ed7" + dependencies: + async "^1.4.0" + optimist "^0.6.1" + source-map "^0.4.4" + optionalDependencies: + uglify-js "^2.6" + +har-validator@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" + dependencies: + chalk "^1.1.1" + commander "^2.9.0" + is-my-json-valid "^2.12.4" + pinkie-promise "^2.0.0" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + +has@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28" + dependencies: + function-bind "^1.0.2" + +hawk@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" + dependencies: + boom "2.x.x" + cryptiles "2.x.x" + hoek "2.x.x" + sntp "1.x.x" + +hoek@2.x.x: + version "2.16.3" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" + +home-or-tmp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.1" + +hosted-git-info@^2.1.4: + version "2.1.5" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.1.5.tgz#0ba81d90da2e25ab34a332e6ec77936e1598118b" + +html-encoding-sniffer@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.1.tgz#79bf7a785ea495fe66165e734153f363ff5437da" + dependencies: + whatwg-encoding "^1.0.1" + +http-signature@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" + dependencies: + assert-plus "^0.2.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +https-browserify@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-0.0.1.tgz#3f91365cabe60b77ed0ebba24b454e3e09d95a82" + +iconv-lite@0.4.13, iconv-lite@^0.4.13: + version "0.4.13" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" + +ieee754@^1.1.4: + version "1.1.8" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" + +ignore@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.2.0.tgz#8d88f03c3002a0ac52114db25d2c673b0bf1e435" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + +indexof@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +inherits@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" + +ini@~1.3.0: + version "1.3.4" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" + +inquirer@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e" + dependencies: + ansi-escapes "^1.1.0" + ansi-regex "^2.0.0" + chalk "^1.0.0" + cli-cursor "^1.0.1" + cli-width "^2.0.0" + figures "^1.3.5" + lodash "^4.3.0" + readline2 "^1.0.1" + run-async "^0.1.0" + rx-lite "^3.1.2" + string-width "^1.0.1" + strip-ansi "^3.0.0" + through "^2.3.6" + +interpret@^0.6.4: + version "0.6.6" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-0.6.6.tgz#fecd7a18e7ce5ca6abfb953e1f86213a49f1625b" + +interpret@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.1.tgz#d579fb7f693b858004947af39fa0db49f795602c" + +invariant@^2.2.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" + dependencies: + loose-envify "^1.0.0" + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + dependencies: + binary-extensions "^1.0.0" + +is-buffer@^1.0.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.4.tgz#cfc86ccd5dc5a52fa80489111c6920c457e2d98b" + +is-builtin-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" + dependencies: + builtin-modules "^1.0.0" + +is-ci@^1.0.9: + version "1.0.10" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.0.10.tgz#f739336b2632365061a9d48270cd56ae3369318e" + dependencies: + ci-info "^1.0.0" + +is-dotfile@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.2.tgz#2c132383f39199f8edc268ca01b9b007d205cc4d" + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + +is-finite@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + dependencies: + is-extglob "^1.0.0" + +is-my-json-valid@^2.10.0, is-my-json-valid@^2.12.4: + version "2.15.0" + resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz#936edda3ca3c211fd98f3b2d3e08da43f7b2915b" + dependencies: + generate-function "^2.0.0" + generate-object-property "^1.1.0" + jsonpointer "^4.0.0" + xtend "^4.0.0" + +is-number@^2.0.2, is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + dependencies: + kind-of "^3.0.2" + +is-path-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" + +is-path-in-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" + dependencies: + is-path-inside "^1.0.0" + +is-path-inside@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f" + dependencies: + path-is-inside "^1.0.1" + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + +is-property@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" + +is-resolvable@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.0.0.tgz#8df57c61ea2e3c501408d100fb013cf8d6e0cc62" + dependencies: + tryit "^1.0.1" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +isexe@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-1.1.2.tgz#36f3e22e60750920f5e7241a476a8c6a42275ad0" + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + dependencies: + isarray "1.0.0" + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + +istanbul-api@^1.0.0-aplha.10: + version "1.0.0-aplha.10" + resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.0.0-aplha.10.tgz#902edf5cf5404e0eba7e00ef46408488a0d3e337" + dependencies: + async "1.x" + clone "^1.0.2" + fileset "0.2.x" + istanbul-lib-coverage "^1.0.0-alpha" + istanbul-lib-hook "^1.0.0-alpha" + istanbul-lib-instrument "^1.0.0-alpha" + istanbul-lib-report "^1.0.0-alpha" + istanbul-lib-source-maps "^1.0.0-alpha" + istanbul-reports "^1.0.0-alpha" + js-yaml "3.x" + mkdirp "0.5.x" + once "1.x" + +istanbul-lib-coverage@^1.0.0, istanbul-lib-coverage@^1.0.0-alpha, istanbul-lib-coverage@^1.0.0-alpha.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.0.0.tgz#c3f9b6d226da12424064cce87fce0fb57fdfa7a2" + +istanbul-lib-hook@^1.0.0-alpha: + version "1.0.0-alpha.4" + resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.0.0-alpha.4.tgz#8c5bb9f6fbd8526e0ae6cf639af28266906b938f" + dependencies: + append-transform "^0.3.0" + +istanbul-lib-instrument@^1.0.0-alpha, istanbul-lib-instrument@^1.1.1, istanbul-lib-instrument@^1.1.4: + version "1.3.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.3.0.tgz#19f0a973397454989b98330333063a5b56df0e58" + dependencies: + babel-generator "^6.18.0" + babel-template "^6.16.0" + babel-traverse "^6.18.0" + babel-types "^6.18.0" + babylon "^6.13.0" + istanbul-lib-coverage "^1.0.0" + semver "^5.3.0" + +istanbul-lib-report@^1.0.0-alpha: + version "1.0.0-alpha.3" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.0.0-alpha.3.tgz#32d5f6ec7f33ca3a602209e278b2e6ff143498af" + dependencies: + async "^1.4.2" + istanbul-lib-coverage "^1.0.0-alpha" + mkdirp "^0.5.1" + path-parse "^1.0.5" + rimraf "^2.4.3" + supports-color "^3.1.2" + +istanbul-lib-source-maps@^1.0.0-alpha: + version "1.1.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.1.0.tgz#9d429218f35b823560ea300a96ff0c3bbdab785f" + dependencies: + istanbul-lib-coverage "^1.0.0-alpha.0" + mkdirp "^0.5.1" + rimraf "^2.4.4" + source-map "^0.5.3" + +istanbul-reports@^1.0.0-alpha: + version "1.0.0" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.0.0.tgz#24b4eb2b1d29d50f103b369bd422f6e640aa0777" + dependencies: + handlebars "^4.0.3" + +jest-changed-files@^17.0.2: + version "17.0.2" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-17.0.2.tgz#f5657758736996f590a51b87e5c9369d904ba7b7" + +jest-cli@^18.0.0: + version "18.0.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-18.0.0.tgz#11d141f5e9158d4f02c5c303815b5280f6887c55" + dependencies: + ansi-escapes "^1.4.0" + callsites "^2.0.0" + chalk "^1.1.1" + graceful-fs "^4.1.6" + is-ci "^1.0.9" + istanbul-api "^1.0.0-aplha.10" + istanbul-lib-coverage "^1.0.0" + istanbul-lib-instrument "^1.1.1" + jest-changed-files "^17.0.2" + jest-config "^18.0.0" + jest-environment-jsdom "^18.0.0" + jest-file-exists "^17.0.0" + jest-haste-map "^18.0.0" + jest-jasmine2 "^18.0.0" + jest-mock "^18.0.0" + jest-resolve "^18.0.0" + jest-resolve-dependencies "^18.0.0" + jest-runtime "^18.0.0" + jest-snapshot "^18.0.0" + jest-util "^18.0.0" + json-stable-stringify "^1.0.0" + node-notifier "^4.6.1" + sane "~1.4.1" + strip-ansi "^3.0.1" + throat "^3.0.0" + which "^1.1.1" + worker-farm "^1.3.1" + yargs "^6.3.0" + +jest-config@^18.0.0: + version "18.0.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-18.0.0.tgz#21473ab68fef2fa79760d05419859b3c320e55e9" + dependencies: + chalk "^1.1.1" + jest-environment-jsdom "^18.0.0" + jest-environment-node "^18.0.0" + jest-jasmine2 "^18.0.0" + jest-mock "^18.0.0" + jest-resolve "^18.0.0" + jest-util "^18.0.0" + json-stable-stringify "^1.0.0" + +jest-diff@^18.0.0: + version "18.0.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-18.0.0.tgz#f24b6f8bedaae425548511ab45edbfb9fee930b7" + dependencies: + chalk "^1.1.3" + diff "^3.0.0" + jest-matcher-utils "^18.0.0" + pretty-format "^18.0.0" + +jest-environment-jsdom@^18.0.0: + version "18.0.0" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-18.0.0.tgz#7341266285abce09f13f60e9b49de899802b76c5" + dependencies: + jest-mock "^18.0.0" + jest-util "^18.0.0" + jsdom "^9.8.1" + +jest-environment-node@^18.0.0: + version "18.0.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-18.0.0.tgz#6f4947b324d6b4e17df20b1998f532c161a2821d" + dependencies: + jest-mock "^18.0.0" + jest-util "^18.0.0" + +jest-file-exists@^17.0.0: + version "17.0.0" + resolved "https://registry.yarnpkg.com/jest-file-exists/-/jest-file-exists-17.0.0.tgz#7f63eb73a1c43a13f461be261768b45af2cdd169" + +jest-haste-map@^18.0.0: + version "18.0.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-18.0.0.tgz#707d3b5ae3bcbda971c39e8b911d20ad8502c748" + dependencies: + fb-watchman "^1.9.0" + graceful-fs "^4.1.6" + multimatch "^2.1.0" + sane "~1.4.1" + worker-farm "^1.3.1" + +jest-jasmine2@^18.0.0: + version "18.0.0" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-18.0.0.tgz#05a35ee8cf61dd6d6d04826aa0e5915a2167a877" + dependencies: + graceful-fs "^4.1.6" + jest-matcher-utils "^18.0.0" + jest-matchers "^18.0.0" + jest-snapshot "^18.0.0" + jest-util "^18.0.0" + +jest-matcher-utils@^18.0.0: + version "18.0.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-18.0.0.tgz#74ad046aeb9414094fc6cd0d313847e4311f8538" + dependencies: + chalk "^1.1.3" + pretty-format "^18.0.0" + +jest-matchers@^18.0.0: + version "18.0.0" + resolved "https://registry.yarnpkg.com/jest-matchers/-/jest-matchers-18.0.0.tgz#d081e2dfd556a0c9f11c7fdc26dc1702fad50189" + dependencies: + jest-diff "^18.0.0" + jest-matcher-utils "^18.0.0" + jest-util "^18.0.0" + +jest-mock@^18.0.0: + version "18.0.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-18.0.0.tgz#5c248846ea33fa558b526f5312ab4a6765e489b3" + +jest-resolve-dependencies@^18.0.0: + version "18.0.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-18.0.0.tgz#a2980a634ae2554d8ed5922686883a2988979b70" + dependencies: + jest-file-exists "^17.0.0" + jest-resolve "^18.0.0" + +jest-resolve@^18.0.0: + version "18.0.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-18.0.0.tgz#a47b0b939d8c53fc79e907db0a5110384432f3c8" + dependencies: + browser-resolve "^1.11.2" + jest-file-exists "^17.0.0" + jest-haste-map "^18.0.0" + resolve "^1.1.6" + +jest-runtime@^18.0.0: + version "18.0.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-18.0.0.tgz#fff982dffe061b89bbea5c3b6f4d3fbf7b3cf56e" + dependencies: + babel-core "^6.0.0" + babel-jest "^18.0.0" + babel-plugin-istanbul "^3.0.0" + chalk "^1.1.3" + graceful-fs "^4.1.6" + jest-config "^18.0.0" + jest-file-exists "^17.0.0" + jest-haste-map "^18.0.0" + jest-mock "^18.0.0" + jest-resolve "^18.0.0" + jest-snapshot "^18.0.0" + jest-util "^18.0.0" + json-stable-stringify "^1.0.0" + multimatch "^2.1.0" + yargs "^6.3.0" + +jest-snapshot@^18.0.0: + version "18.0.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-18.0.0.tgz#3602c6b13cbf5788fd101bf0d73fc76104b88486" + dependencies: + jest-diff "^18.0.0" + jest-file-exists "^17.0.0" + jest-matcher-utils "^18.0.0" + jest-util "^18.0.0" + natural-compare "^1.4.0" + pretty-format "^18.0.0" + +jest-util@^18.0.0: + version "18.0.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-18.0.0.tgz#4ef7c397ad7e1ac8f9c63a482c12a31df5e376a7" + dependencies: + chalk "^1.1.1" + diff "^3.0.0" + graceful-fs "^4.1.6" + jest-file-exists "^17.0.0" + jest-mock "^18.0.0" + mkdirp "^0.5.1" + +jest@^18.0.0: + version "18.0.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-18.0.0.tgz#ef12f70befe0fcb30f1c61c0ae58748706267d4b" + dependencies: + jest-cli "^18.0.0" + +jodid25519@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967" + dependencies: + jsbn "~0.1.0" + +js-tokens@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-2.0.0.tgz#79903f5563ee778cc1162e6dcf1a0027c97f9cb5" + +js-yaml@3.6.1, js-yaml@3.x, js-yaml@^3.5.1: + version "3.6.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.6.1.tgz#6e5fe67d8b205ce4d22fad05b7781e8dadcc4b30" + dependencies: + argparse "^1.0.7" + esprima "^2.6.0" + +jsbn@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.0.tgz#650987da0dd74f4ebf5a11377a2aa2d273e97dfd" + +jsdom@^9.8.1: + version "9.9.1" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-9.9.1.tgz#84f3972ad394ab963233af8725211bce4d01bfd5" + dependencies: + abab "^1.0.0" + acorn "^2.4.0" + acorn-globals "^1.0.4" + array-equal "^1.0.0" + content-type-parser "^1.0.1" + cssom ">= 0.3.0 < 0.4.0" + cssstyle ">= 0.2.36 < 0.3.0" + escodegen "^1.6.1" + html-encoding-sniffer "^1.0.1" + iconv-lite "^0.4.13" + nwmatcher ">= 1.3.9 < 2.0.0" + parse5 "^1.5.1" + request "^2.55.0" + sax "^1.1.4" + symbol-tree ">= 3.1.0 < 4.0.0" + tough-cookie "^2.3.1" + webidl-conversions "^3.0.1" + whatwg-encoding "^1.0.1" + whatwg-url "^4.1.0" + xml-name-validator ">= 2.0.1 < 3.0.0" + +jsesc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" + +jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + +json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + dependencies: + jsonify "~0.0.0" + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + +json5@^0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + +jsonpointer@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.0.tgz#6661e161d2fc445f19f98430231343722e1fcbd5" + +jsprim@^1.2.2: + version "1.3.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.3.1.tgz#2a7256f70412a29ee3670aaca625994c4dcff252" + dependencies: + extsprintf "1.0.2" + json-schema "0.2.3" + verror "1.3.6" + +jsx-ast-utils@^1.0.0, jsx-ast-utils@^1.3.4: + version "1.3.5" + resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-1.3.5.tgz#9ba6297198d9f754594d62e59496ffb923778dd4" + dependencies: + acorn-jsx "^3.0.1" + object-assign "^4.1.0" + +kind-of@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.1.0.tgz#475d698a5e49ff5e53d14e3e732429dc8bf4cf47" + dependencies: + is-buffer "^1.0.2" + +lazy-cache@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + dependencies: + invert-kv "^1.0.0" + +lcov-parse@0.0.10: + version "0.0.10" + resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3" + +levn@^0.3.0, levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + +loader-utils@^0.2.11: + version "0.2.16" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.16.tgz#f08632066ed8282835dff88dfb52704765adee6d" + dependencies: + big.js "^3.1.3" + emojis-list "^2.0.0" + json5 "^0.5.0" + object-assign "^4.0.1" + +lodash._arraycopy@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._arraycopy/-/lodash._arraycopy-3.0.0.tgz#76e7b7c1f1fb92547374878a562ed06a3e50f6e1" + +lodash._arrayeach@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._arrayeach/-/lodash._arrayeach-3.0.0.tgz#bab156b2a90d3f1bbd5c653403349e5e5933ef9e" + +lodash._baseassign@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e" + dependencies: + lodash._basecopy "^3.0.0" + lodash.keys "^3.0.0" + +lodash._baseclone@^3.0.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/lodash._baseclone/-/lodash._baseclone-3.3.0.tgz#303519bf6393fe7e42f34d8b630ef7794e3542b7" + dependencies: + lodash._arraycopy "^3.0.0" + lodash._arrayeach "^3.0.0" + lodash._baseassign "^3.0.0" + lodash._basefor "^3.0.0" + lodash.isarray "^3.0.0" + lodash.keys "^3.0.0" + +lodash._basecopy@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" + +lodash._basefor@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/lodash._basefor/-/lodash._basefor-3.0.3.tgz#7550b4e9218ef09fad24343b612021c79b4c20c2" + +lodash._bindcallback@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e" + +lodash._getnative@^3.0.0: + version "3.9.1" + resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" + +lodash.assign@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" + +lodash.clonedeep@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-3.0.2.tgz#a0a1e40d82a5ea89ff5b147b8444ed63d92827db" + dependencies: + lodash._baseclone "^3.0.0" + lodash._bindcallback "^3.0.0" + +lodash.cond@^4.3.0: + version "4.5.2" + resolved "https://registry.yarnpkg.com/lodash.cond/-/lodash.cond-4.5.2.tgz#f471a1da486be60f6ab955d17115523dd1d255d5" + +lodash.isarguments@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" + +lodash.isarray@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" + +lodash.keys@^3.0.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" + dependencies: + lodash._getnative "^3.0.0" + lodash.isarguments "^3.0.0" + lodash.isarray "^3.0.0" + +lodash.pickby@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.pickby/-/lodash.pickby-4.6.0.tgz#7dea21d8c18d7703a27c704c15d3b84a67e33aff" + +lodash@^4.0.0, lodash@^4.16.4, lodash@^4.2.0, lodash@^4.3.0: + version "4.17.2" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.2.tgz#34a3055babe04ce42467b607d700072c7ff6bf42" + +log-driver@1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.5.tgz#7ae4ec257302fd790d557cb10c97100d857b0056" + +longest@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + +loose-envify@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.0.tgz#6b26248c42f6d4fa4b0d8542f78edfcde35642a8" + dependencies: + js-tokens "^2.0.0" + +makeerror@1.0.x: + version "1.0.11" + resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" + dependencies: + tmpl "1.0.x" + +marked-terminal@^1.6.2: + version "1.7.0" + resolved "https://registry.yarnpkg.com/marked-terminal/-/marked-terminal-1.7.0.tgz#c8c460881c772c7604b64367007ee5f77f125904" + dependencies: + cardinal "^1.0.0" + chalk "^1.1.3" + cli-table "^0.3.1" + lodash.assign "^4.2.0" + node-emoji "^1.4.1" + +marked@^0.3.6: + version "0.3.6" + resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.6.tgz#b2c6c618fccece4ef86c4fc6cb8a7cbf5aeda8d7" + +memory-fs@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.2.0.tgz#f2bb25368bc121e391c2520de92969caee0a0290" + +memory-fs@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.3.0.tgz#7bcc6b629e3a43e871d7e29aca6ae8a7f15cbb20" + dependencies: + errno "^0.1.3" + readable-stream "^2.0.1" + +merge@^1.1.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" + +micromatch@^2.1.5, micromatch@^2.3.11: + version "2.3.11" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +mime-db@~1.25.0: + version "1.25.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.25.0.tgz#c18dbd7c73a5dbf6f44a024dc0d165a1e7b1c392" + +mime-types@^2.1.11, mime-types@^2.1.12, mime-types@~2.1.7: + version "2.1.13" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.13.tgz#e07aaa9c6c6b9a7ca3012c69003ad25a39e92a88" + dependencies: + mime-db "~1.25.0" + +"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" + dependencies: + brace-expansion "^1.0.0" + +minimatch@2.x: + version "2.0.10" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7" + dependencies: + brace-expansion "^1.0.0" + +minimist@0.0.8, minimist@~0.0.1: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +minimist@1.2.0, minimist@^1.1.1, minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +ms@0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" + +multimatch@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-2.1.0.tgz#9c7906a22fb4c02919e2f5f75161b4cdbd4b2a2b" + dependencies: + array-differ "^1.0.0" + array-union "^1.0.1" + arrify "^1.0.0" + minimatch "^3.0.0" + +mute-stream@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" + +nan@^2.3.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.4.0.tgz#fb3c59d45fe4effe215f0b890f8adf6eb32d2232" + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + +node-emoji@^1.4.1: + version "1.4.3" + resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.4.3.tgz#5272f70b823c4df6d7c39f84fd8203f35b3e5d36" + dependencies: + string.prototype.codepointat "^0.2.0" + +node-int64@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" + +node-libs-browser@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-0.7.0.tgz#3e272c0819e308935e26674408d7af0e1491b83b" + dependencies: + assert "^1.1.1" + browserify-zlib "^0.1.4" + buffer "^4.9.0" + console-browserify "^1.1.0" + constants-browserify "^1.0.0" + crypto-browserify "3.3.0" + domain-browser "^1.1.1" + events "^1.0.0" + https-browserify "0.0.1" + os-browserify "^0.2.0" + path-browserify "0.0.0" + process "^0.11.0" + punycode "^1.2.4" + querystring-es3 "^0.2.0" + readable-stream "^2.0.5" + stream-browserify "^2.0.1" + stream-http "^2.3.1" + string_decoder "^0.10.25" + timers-browserify "^2.0.2" + tty-browserify "0.0.0" + url "^0.11.0" + util "^0.10.3" + vm-browserify "0.0.4" + +node-notifier@^4.6.1: + version "4.6.1" + resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-4.6.1.tgz#056d14244f3dcc1ceadfe68af9cff0c5473a33f3" + dependencies: + cli-usage "^0.1.1" + growly "^1.2.0" + lodash.clonedeep "^3.0.0" + minimist "^1.1.1" + semver "^5.1.0" + shellwords "^0.1.0" + which "^1.0.5" + +node-pre-gyp@^0.6.29: + version "0.6.32" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.32.tgz#fc452b376e7319b3d255f5f34853ef6fd8fe1fd5" + dependencies: + mkdirp "~0.5.1" + nopt "~3.0.6" + npmlog "^4.0.1" + rc "~1.1.6" + request "^2.79.0" + rimraf "~2.5.4" + semver "~5.3.0" + tar "~2.2.1" + tar-pack "~3.3.0" + +node-uuid@~1.4.7: + version "1.4.7" + resolved "https://registry.yarnpkg.com/node-uuid/-/node-uuid-1.4.7.tgz#6da5a17668c4b3dd59623bda11cf7fa4c1f60a6f" + +nopt@~3.0.6: + version "3.0.6" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" + dependencies: + abbrev "1" + +normalize-package-data@^2.3.2: + version "2.3.5" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.5.tgz#8d924f142960e1777e7ffe170543631cc7cb02df" + dependencies: + hosted-git-info "^2.1.4" + is-builtin-module "^1.0.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.0.1.tgz#47886ac1662760d4261b7d979d241709d3ce3f7a" + +npmlog@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.0.2.tgz#d03950e0e78ce1527ba26d2a7592e9348ac3e75f" + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.1" + set-blocking "~2.0.0" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + +"nwmatcher@>= 1.3.9 < 2.0.0": + version "1.3.9" + resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.3.9.tgz#8bab486ff7fa3dfd086656bbe8b17116d3692d2a" + +oauth-sign@~0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + +object-assign@^4.0.1, object-assign@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" + +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +once@1.x, once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +once@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20" + dependencies: + wrappy "1" + +onetime@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" + +optimist@^0.6.1, optimist@~0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + dependencies: + minimist "~0.0.1" + wordwrap "~0.0.2" + +optionator@^0.8.1, optionator@^0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.4" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + wordwrap "~1.0.0" + +os-browserify@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.2.1.tgz#63fc4ccee5d2d7763d26bbf8601078e6c2e0044f" + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + dependencies: + lcid "^1.0.0" + +os-tmpdir@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + +output-file-sync@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/output-file-sync/-/output-file-sync-1.1.2.tgz#d0a33eefe61a205facb90092e826598d5245ce76" + dependencies: + graceful-fs "^4.1.4" + mkdirp "^0.5.1" + object-assign "^4.1.0" + +pako@~0.2.0: + version "0.2.9" + resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + dependencies: + error-ex "^1.2.0" + +parse5@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94" + +path-browserify@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + dependencies: + pinkie-promise "^2.0.0" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +path-is-inside@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + +path-parse@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +pbkdf2-compat@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pbkdf2-compat/-/pbkdf2-compat-2.0.1.tgz#b6e0c8fa99494d94e0511575802a59a5c142f288" + +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + +pkg-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4" + dependencies: + find-up "^1.0.0" + +pkg-up@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-1.0.0.tgz#3e08fb461525c4421624a33b9f7e6d0af5b05a26" + dependencies: + find-up "^1.0.0" + +pluralize@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45" + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + +pretty-format@^18.0.0: + version "18.0.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-18.0.0.tgz#5f45c59fe2ed6749d46765429679670b08b21137" + dependencies: + ansi-styles "^2.2.1" + +private@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/private/-/private-0.1.6.tgz#55c6a976d0f9bafb9924851350fe47b9b5fbb7c1" + +process-nextick-args@~1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" + +process@^0.11.0: + version "0.11.9" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.9.tgz#7bd5ad21aa6253e7da8682264f1e11d11c0318c1" + +progress@^1.1.8: + version "1.1.8" + resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" + +prr@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" + +punycode@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" + +punycode@^1.2.4, punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + +qs@~6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.2.0.tgz#3b7848c03c2dece69a9522b0fae8c4126d745f3b" + +qs@~6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.0.tgz#f403b264f23bc01228c74131b407f18d5ea5d442" + +querystring-es3@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" + +querystring@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" + +randomatic@^1.1.3: + version "1.1.6" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.6.tgz#110dcabff397e9dcff7c0789ccc0a49adf1ec5bb" + dependencies: + is-number "^2.0.2" + kind-of "^3.0.2" + +rc@~1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.1.6.tgz#43651b76b6ae53b5c802f1151fa3fc3b059969c9" + dependencies: + deep-extend "~0.4.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~1.0.4" + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.1.0, readable-stream@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.2.tgz#a9e6fec3c7dda85f8bb1b3ba7028604556fc825e" + dependencies: + buffer-shims "^1.0.0" + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~0.10.x" + util-deprecate "~1.0.1" + +readable-stream@~2.0.5: + version "2.0.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~0.10.x" + util-deprecate "~1.0.1" + +readable-stream@~2.1.4: + version "2.1.5" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.1.5.tgz#66fa8b720e1438b364681f2ad1a63c618448c9d0" + dependencies: + buffer-shims "^1.0.0" + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~0.10.x" + util-deprecate "~1.0.1" + +readdirp@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" + dependencies: + graceful-fs "^4.1.2" + minimatch "^3.0.2" + readable-stream "^2.0.2" + set-immediate-shim "^1.0.1" + +readline2@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/readline2/-/readline2-1.0.1.tgz#41059608ffc154757b715d9989d199ffbf372e35" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + mute-stream "0.0.5" + +rechoir@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + dependencies: + resolve "^1.1.6" + +redeyed@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/redeyed/-/redeyed-1.0.1.tgz#e96c193b40c0816b00aec842698e61185e55498a" + dependencies: + esprima "~3.0.0" + +regenerate@^1.2.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260" + +regenerator-runtime@^0.10.0: + version "0.10.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.1.tgz#257f41961ce44558b18f7814af48c17559f9faeb" + +regenerator-transform@0.9.8: + version "0.9.8" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.9.8.tgz#0f88bb2bc03932ddb7b6b7312e68078f01026d6c" + dependencies: + babel-runtime "^6.18.0" + babel-types "^6.19.0" + private "^0.1.6" + +regex-cache@^0.4.2: + version "0.4.3" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" + dependencies: + is-equal-shallow "^0.1.3" + is-primitive "^2.0.0" + +regexpu-core@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" + dependencies: + regenerate "^1.2.1" + regjsgen "^0.2.0" + regjsparser "^0.1.4" + +regjsgen@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" + +regjsparser@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" + dependencies: + jsesc "~0.5.0" + +repeat-element@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + +repeat-string@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + dependencies: + is-finite "^1.0.0" + +request@2.75.0: + version "2.75.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.75.0.tgz#d2b8268a286da13eaa5d01adf5d18cc90f657d93" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + bl "~1.1.2" + caseless "~0.11.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.0.0" + har-validator "~2.0.6" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + node-uuid "~1.4.7" + oauth-sign "~0.8.1" + qs "~6.2.0" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "~0.4.1" + +request@^2.55.0, request@^2.79.0: + version "2.79.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.11.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~2.0.6" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + qs "~6.3.0" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "~0.4.1" + uuid "^3.0.0" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + +require-uncached@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" + dependencies: + caller-path "^0.1.0" + resolve-from "^1.0.0" + +resolve-from@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" + +resolve@1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + +resolve@^1.1.6: + version "1.2.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.2.0.tgz#9589c3f2f6149d1417a40becc1663db6ec6bc26c" + +restore-cursor@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" + dependencies: + exit-hook "^1.0.0" + onetime "^1.0.0" + +right-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + dependencies: + align-text "^0.1.1" + +rimraf@2, rimraf@^2.2.8, rimraf@^2.4.3, rimraf@^2.4.4, rimraf@~2.5.1, rimraf@~2.5.4: + version "2.5.4" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04" + dependencies: + glob "^7.0.5" + +ripemd160@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-0.2.0.tgz#2bf198bde167cacfa51c0a928e84b68bbe171fce" + +run-async@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389" + dependencies: + once "^1.3.0" + +rx-lite@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" + +sane@~1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/sane/-/sane-1.4.1.tgz#88f763d74040f5f0c256b6163db399bf110ac715" + dependencies: + exec-sh "^0.2.0" + fb-watchman "^1.8.0" + minimatch "^3.0.2" + minimist "^1.1.1" + walker "~1.0.5" + watch "~0.10.0" + +sax@^1.1.4: + version "1.2.1" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a" + +"semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.3.0, semver@~5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" + +set-blocking@^2.0.0, set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + +set-immediate-shim@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + +setimmediate@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + +sha.js@2.2.6: + version "2.2.6" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.2.6.tgz#17ddeddc5f722fb66501658895461977867315ba" + +shelljs@^0.7.5: + version "0.7.5" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.5.tgz#2eef7a50a21e1ccf37da00df767ec69e30ad0675" + dependencies: + glob "^7.0.0" + interpret "^1.0.0" + rechoir "^0.6.2" + +shellwords@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.0.tgz#66afd47b6a12932d9071cbfd98a52e785cd0ba14" + +signal-exit@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + +slash@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + +slice-ansi@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" + +sntp@1.x.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" + dependencies: + hoek "2.x.x" + +source-list-map@~0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-0.1.7.tgz#d4b5ce2a46535c72c7e8527c71a77d250618172e" + +source-map-support@^0.4.2: + version "0.4.6" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.6.tgz#32552aa64b458392a85eab3b0b5ee61527167aeb" + dependencies: + source-map "^0.5.3" + +source-map@^0.4.4, source-map@~0.4.1: + version "0.4.4" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" + dependencies: + amdefine ">=0.0.4" + +source-map@^0.5.0, source-map@^0.5.3, source-map@~0.5.1: + version "0.5.6" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" + +source-map@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" + dependencies: + amdefine ">=0.0.4" + +spdx-correct@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" + dependencies: + spdx-license-ids "^1.0.2" + +spdx-expression-parse@~1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" + +spdx-license-ids@^1.0.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + +sshpk@^1.7.0: + version "1.10.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.10.1.tgz#30e1a5d329244974a1af61511339d595af6638b0" + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + dashdash "^1.12.0" + getpass "^0.1.1" + optionalDependencies: + bcrypt-pbkdf "^1.0.0" + ecc-jsbn "~0.1.1" + jodid25519 "^1.0.0" + jsbn "~0.1.0" + tweetnacl "~0.14.0" + +stream-browserify@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" + dependencies: + inherits "~2.0.1" + readable-stream "^2.0.2" + +stream-http@^2.3.1: + version "2.5.0" + resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.5.0.tgz#585eee513217ed98fe199817e7313b6f772a6802" + dependencies: + builtin-status-codes "^2.0.0" + inherits "^2.0.1" + readable-stream "^2.1.0" + to-arraybuffer "^1.0.0" + xtend "^4.0.0" + +string-width@^1.0.1, string-width@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +string-width@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.0.0.tgz#635c5436cc72a6e0c387ceca278d4e2eec52687e" + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^3.0.0" + +string.prototype.codepointat@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/string.prototype.codepointat/-/string.prototype.codepointat-0.2.0.tgz#6b26e9bd3afcaa7be3b4269b526de1b82000ac78" + +string_decoder@^0.10.25, string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + +stringstream@~0.0.4: + version "0.0.5" + resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + dependencies: + is-utf8 "^0.2.0" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + +strip-json-comments@~1.0.1, strip-json-comments@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91" + +supports-color@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-0.2.0.tgz#d92de2694eb3f67323973d7ae3d8b55b4c22190a" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +supports-color@^3.1.0, supports-color@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5" + dependencies: + has-flag "^1.0.0" + +"symbol-tree@>= 3.1.0 < 4.0.0": + version "3.2.1" + resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.1.tgz#8549dd1d01fa9f893c18cc9ab0b106b4d9b168cb" + +table@^3.7.8: + version "3.8.3" + resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f" + dependencies: + ajv "^4.7.0" + ajv-keywords "^1.0.0" + chalk "^1.1.1" + lodash "^4.0.0" + slice-ansi "0.0.4" + string-width "^2.0.0" + +tapable@^0.1.8, tapable@~0.1.8: + version "0.1.10" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.1.10.tgz#29c35707c2b70e50d07482b5d202e8ed446dafd4" + +tar-pack@~3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.3.0.tgz#30931816418f55afc4d21775afdd6720cee45dae" + dependencies: + debug "~2.2.0" + fstream "~1.0.10" + fstream-ignore "~1.0.5" + once "~1.3.3" + readable-stream "~2.1.4" + rimraf "~2.5.1" + tar "~2.2.1" + uid-number "~0.0.6" + +tar@~2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" + dependencies: + block-stream "*" + fstream "^1.0.2" + inherits "2" + +test-exclude@^3.2.2: + version "3.3.0" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-3.3.0.tgz#7a17ca1239988c98367b0621456dbb7d4bc38977" + dependencies: + arrify "^1.0.1" + micromatch "^2.3.11" + object-assign "^4.1.0" + read-pkg-up "^1.0.1" + require-main-filename "^1.0.1" + +text-table@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + +throat@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/throat/-/throat-3.0.0.tgz#e7c64c867cbb3845f10877642f7b60055b8ec0d6" + +through@^2.3.6: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + +timers-browserify@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.2.tgz#ab4883cf597dcd50af211349a00fbca56ac86b86" + dependencies: + setimmediate "^1.0.4" + +tmpl@1.0.x: + version "1.0.4" + resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" + +to-arraybuffer@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" + +to-fast-properties@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.2.tgz#f3f5c0c3ba7299a7ef99427e44633257ade43320" + +tough-cookie@^2.3.1, tough-cookie@~2.3.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" + dependencies: + punycode "^1.4.1" + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + +tryit@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tryit/-/tryit-1.0.3.tgz#393be730a9446fd1ead6da59a014308f36c289cb" + +tty-browserify@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" + +tunnel-agent@~0.4.1: + version "0.4.3" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + dependencies: + prelude-ls "~1.1.2" + +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + +uglify-js@^2.6, uglify-js@~2.7.3: + version "2.7.5" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.7.5.tgz#4612c0c7baaee2ba7c487de4904ae122079f2ca8" + dependencies: + async "~0.2.6" + source-map "~0.5.1" + uglify-to-browserify "~1.0.0" + yargs "~3.10.0" + +uglify-to-browserify@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + +uid-number@~0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" + +url@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" + dependencies: + punycode "1.3.2" + querystring "0.2.0" + +user-home@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190" + +user-home@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f" + dependencies: + os-homedir "^1.0.0" + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + +util@0.10.3, util@^0.10.3: + version "0.10.3" + resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" + dependencies: + inherits "2.0.1" + +uuid@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" + +v8flags@^2.0.10: + version "2.0.11" + resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.0.11.tgz#bca8f30f0d6d60612cc2c00641e6962d42ae6881" + dependencies: + user-home "^1.1.1" + +validate-npm-package-license@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" + dependencies: + spdx-correct "~1.0.0" + spdx-expression-parse "~1.0.0" + +verror@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c" + dependencies: + extsprintf "1.0.2" + +vm-browserify@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" + dependencies: + indexof "0.0.1" + +walker@~1.0.5: + version "1.0.7" + resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" + dependencies: + makeerror "1.0.x" + +watch@~0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/watch/-/watch-0.10.0.tgz#77798b2da0f9910d595f1ace5b0c2258521f21dc" + +watchpack@^0.2.1: + version "0.2.9" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-0.2.9.tgz#62eaa4ab5e5ba35fdfc018275626e3c0f5e3fb0b" + dependencies: + async "^0.9.0" + chokidar "^1.0.0" + graceful-fs "^4.1.2" + +webidl-conversions@^3.0.0, webidl-conversions@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + +webpack-core@~0.6.9: + version "0.6.9" + resolved "https://registry.yarnpkg.com/webpack-core/-/webpack-core-0.6.9.tgz#fc571588c8558da77be9efb6debdc5a3b172bdc2" + dependencies: + source-list-map "~0.1.7" + source-map "~0.4.1" + +webpack-node-externals@^1.5.4: + version "1.5.4" + resolved "https://registry.yarnpkg.com/webpack-node-externals/-/webpack-node-externals-1.5.4.tgz#ea05ba17108a23e776c35c42e7bb0e86c225be00" + +webpack@^1.14.0: + version "1.14.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-1.14.0.tgz#54f1ffb92051a328a5b2057d6ae33c289462c823" + dependencies: + acorn "^3.0.0" + async "^1.3.0" + clone "^1.0.2" + enhanced-resolve "~0.9.0" + interpret "^0.6.4" + loader-utils "^0.2.11" + memory-fs "~0.3.0" + mkdirp "~0.5.0" + node-libs-browser "^0.7.0" + optimist "~0.6.0" + supports-color "^3.1.0" + tapable "~0.1.8" + uglify-js "~2.7.3" + watchpack "^0.2.1" + webpack-core "~0.6.9" + +whatwg-encoding@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.1.tgz#3c6c451a198ee7aec55b1ec61d0920c67801a5f4" + dependencies: + iconv-lite "0.4.13" + +whatwg-url@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-4.1.1.tgz#567074923352de781e3500d64a86aa92a971b4a4" + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +which-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" + +which@^1.0.5, which@^1.1.1: + version "1.2.12" + resolved "https://registry.yarnpkg.com/which/-/which-1.2.12.tgz#de67b5e450269f194909ef23ece4ebe416fa1192" + dependencies: + isexe "^1.1.1" + +wide-align@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.0.tgz#40edde802a71fea1f070da3e62dcda2e7add96ad" + dependencies: + string-width "^1.0.1" + +window-size@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + +window-size@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" + +wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + +wordwrap@~0.0.2: + version "0.0.3" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" + +wordwrap@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + +worker-farm@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.3.1.tgz#4333112bb49b17aa050b87895ca6b2cacf40e5ff" + dependencies: + errno ">=0.1.1 <0.2.0-0" + xtend ">=4.0.0 <4.1.0-0" + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +write@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" + dependencies: + mkdirp "^0.5.1" + +"xml-name-validator@>= 2.0.1 < 3.0.0": + version "2.0.1" + resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635" + +"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + +y18n@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + +yargs-parser@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.0.tgz#6ced869cd05a3dca6a1eaee38b68aeed4b0b4101" + dependencies: + camelcase "^3.0.0" + +yargs@^6.3.0: + version "6.5.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.5.0.tgz#a902e23a1f0fe912b2a03f6131b7ed740c9718ff" + dependencies: + camelcase "^3.0.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.2" + which-module "^1.0.0" + window-size "^0.2.0" + y18n "^3.2.1" + yargs-parser "^4.2.0" + +yargs@~3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + dependencies: + camelcase "^1.0.2" + cliui "^2.1.0" + decamelize "^1.0.0" + window-size "0.1.0" From f2c33722522321134d66fdaadaceba2215740e24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pradel=20Le=CC=81o?= Date: Thu, 22 Dec 2016 10:33:09 +0100 Subject: [PATCH 024/128] Don't run test twice --- packages/accounts-mongo/circle.yml | 4 ++-- packages/accounts-mongo/package.json | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/accounts-mongo/circle.yml b/packages/accounts-mongo/circle.yml index d11d11399..e2ed6e3e3 100644 --- a/packages/accounts-mongo/circle.yml +++ b/packages/accounts-mongo/circle.yml @@ -22,6 +22,6 @@ dependencies: test: override: - - yarn test + - yarn test-ci post: - - "yarn coveralls" + - yarn coveralls diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 1d0512dd9..f5a8a9261 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -8,10 +8,11 @@ "compile:watch": "yarn compile -- --watch", "prepare": "yarn compile", "test": "yarn lint && yarn testonly", + "test-ci": "yarn lint && yarn coverage", "testonly": "jest", "lint": "eslint src", "coverage": "yarn testonly -- --coverage", - "coveralls": "yarn coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage" + "coveralls": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage" }, "jest": { "testEnvironment": "node", From 82052966dcf0a4844648894a5bbf4268fbb8d025 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pradel=20Le=CC=81o?= Date: Fri, 23 Dec 2016 11:26:45 +0100 Subject: [PATCH 025/128] Add flowconfig file --- packages/accounts-mongo/.flowconfig | 1 + 1 file changed, 1 insertion(+) create mode 100644 packages/accounts-mongo/.flowconfig diff --git a/packages/accounts-mongo/.flowconfig b/packages/accounts-mongo/.flowconfig new file mode 100644 index 000000000..d0a2deddb --- /dev/null +++ b/packages/accounts-mongo/.flowconfig @@ -0,0 +1 @@ +[libs] From 4b7c8fd8a04e08244f5e25dfbed07b5571418b16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Pradel?= Date: Fri, 20 Jan 2017 11:00:45 +0100 Subject: [PATCH 026/128] Merge pull request #3 from js-accounts/interface Create and find user --- packages/accounts-mongo/.babelrc | 4 +- packages/accounts-mongo/.eslintrc | 11 +- packages/accounts-mongo/.flowconfig | 6 + packages/accounts-mongo/package.json | 13 +- packages/accounts-mongo/src/index.js | 133 ++++++++++- packages/accounts-mongo/src/index.spec.js | 262 +++++++++++++++++++++- packages/accounts-mongo/yarn.lock | 205 +++++++++++++++-- 7 files changed, 604 insertions(+), 30 deletions(-) diff --git a/packages/accounts-mongo/.babelrc b/packages/accounts-mongo/.babelrc index bb90267ec..a6a42104f 100644 --- a/packages/accounts-mongo/.babelrc +++ b/packages/accounts-mongo/.babelrc @@ -3,6 +3,8 @@ "es2015" ], "plugins": [ - "transform-async-to-generator" + "transform-async-to-generator", + "transform-object-rest-spread", + "transform-flow-strip-types" ] } diff --git a/packages/accounts-mongo/.eslintrc b/packages/accounts-mongo/.eslintrc index 4f0ba832f..7a1c5ba9d 100644 --- a/packages/accounts-mongo/.eslintrc +++ b/packages/accounts-mongo/.eslintrc @@ -1,8 +1,17 @@ { "parser": "babel-eslint", - "extends": "airbnb", + "extends": [ + "airbnb", + "plugin:flowtype/recommended" + ], + "plugins": [ + "flowtype" + ], "env": { "node": true, "jest": true + }, + "rules": { + "no-underscore-dangle": ["error", { "allow": ["_id"] }] } } diff --git a/packages/accounts-mongo/.flowconfig b/packages/accounts-mongo/.flowconfig index d0a2deddb..4a58bdcde 100644 --- a/packages/accounts-mongo/.flowconfig +++ b/packages/accounts-mongo/.flowconfig @@ -1 +1,7 @@ +[ignore] + +[include] + [libs] + +[options] diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index f5a8a9261..b811f5815 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -6,6 +6,8 @@ "scripts": { "compile": "webpack -p --config --progress", "compile:watch": "yarn compile -- --watch", + "flow": "flow; test $? -eq 0 -o $? -eq 2", + "flow:check": "flow check", "prepare": "yarn compile", "test": "yarn lint && yarn testonly", "test-ci": "yarn lint && yarn coverage", @@ -34,17 +36,26 @@ "babel-eslint": "^7.0.0", "babel-loader": "^6.2.5", "babel-plugin-transform-async-to-generator": "^6.16.0", + "babel-plugin-transform-flow-strip-types": "^6.21.0", + "babel-plugin-transform-object-rest-spread": "^6.20.2", "babel-preset-es2015": "^6.16.0", "coveralls": "^2.11.14", "eslint": "^3.7.1", "eslint-config-airbnb": "^12.0.0", "eslint-config-airbnb-base": "^9.0.0", + "eslint-plugin-flowtype": "^2.29.1", "eslint-plugin-import": "^2.0.1", "eslint-plugin-jsx-a11y": "^2.2.3", "eslint-plugin-react": "^6.3.0", + "flow-bin": "^0.37.4", "jest": "^18.0.0", - "lodash": "^4.16.4", "webpack": "^1.14.0", "webpack-node-externals": "^1.5.4" + }, + "dependencies": { + "@accounts/common": "^0.0.1", + "@accounts/server": "^0.0.1", + "lodash": "^4.17.3", + "mongodb": "^2.2.16" } } diff --git a/packages/accounts-mongo/src/index.js b/packages/accounts-mongo/src/index.js index 0aeeebffb..7fd33c53a 100644 --- a/packages/accounts-mongo/src/index.js +++ b/packages/accounts-mongo/src/index.js @@ -1,13 +1,138 @@ +// @flow + +import { get } from 'lodash'; +import { encryption } from '@accounts/server'; +import type { + CreateUserType, + UserObjectType, +} from '@accounts/common'; + +export type MongoOptionsType = { + collectionName: string, + timestamps: { + createdAt: string, + updatedAt: string, + } +}; + +export type MongoUserObjectType = { + username?: string, + profile?: Object, + services: { + password?: { + bcrypt: string, + }, + }, + emails?: [{ + address: string, + verified: boolean, + }], +}; + class Mongo { - constructor(options) { + options: MongoOptionsType; + // TODO definition for mongodb connection object + db: any; + collection: any; + + constructor(db: any, options: MongoOptionsType) { const defaultOptions = { collectionName: 'users', + timestamps: { + createdAt: 'createdAt', + updatedAt: 'updatedAt', + }, }; - this.options = Object.assign({}, defaultOptions, options); + this.options = { ...defaultOptions, ...options }; + if (get(db, 'constructor.define.name') !== 'Db') { + throw new Error('A valid database connection object is required'); + } + this.db = db; + this.collection = this.db.collection(this.options.collectionName); + } + + async setupIndexes(): Promise { + await this.collection.createIndex('username', { unique: 1, sparse: 1 }); + await this.collection.createIndex('emails.address', { unique: 1, sparse: 1 }); + } + + async createUser(options: CreateUserType): Promise { + const user: MongoUserObjectType = { + services: {}, + [this.options.timestamps.createdAt]: Date.now(), + }; + if (options.password) { + user.services.password = { bcrypt: await encryption.hashPassword(options.password) }; + } + if (options.username) { + user.username = options.username; + } + if (options.email) { + user.emails = [{ address: options.email.toLowerCase(), verified: false }]; + } + const ret = await this.collection.insertOne(user); + return ret.ops[0]; + } + + findUserById(userId: string): Promise { + return this.collection.findOne({ _id: userId }); + } + + findUserByEmail(email: string): Promise { + return this.collection.findOne({ 'emails.address': email.toLowerCase() }); + } + + findUserByUsername(username: string): Promise { + return this.collection.findOne({ username }); + } + + async findPasswordHash(userId: string): Promise { + const user = await this.findUserById(userId); + if (!user) { + throw new Error('User not found'); + } + return user.services.password.bcrypt; + } + + async addEmail(userId: string, newEmail: string, verified: boolean): Promise { + const ret = await this.collection.update({ _id: userId }, { + $addToSet: { + emails: { + address: newEmail.toLowerCase(), + verified, + }, + }, + }); + if (ret.result.nModified === 0) { + throw new Error('User not found'); + } + } + + async removeEmail(userId: string, email: string): Promise { + const ret = await this.collection.update({ _id: userId }, { + $pull: { emails: { address: email.toLowerCase() } }, + }); + if (ret.result.nModified === 0) { + throw new Error('User not found'); + } + } + + async setUsername(userId: string, newUsername: string): Promise { + const ret = await this.collection.update({ _id: userId }, { + $set: { username: newUsername }, + }); + if (ret.result.nModified === 0) { + throw new Error('User not found'); + } } - createUser() { // eslint-disable-line class-methods-use-this - return Promise.resolve('user'); + async setPasssword(userId: string, newPassword: string): Promise { + const ret = await this.collection.update({ _id: userId }, { + $set: { 'services.password.bcrypt': await encryption.hashPassword(newPassword) }, + }); + if (ret.result.nModified === 0) { + throw new Error('User not found'); + } } } diff --git a/packages/accounts-mongo/src/index.spec.js b/packages/accounts-mongo/src/index.spec.js index 71bc65202..304216697 100644 --- a/packages/accounts-mongo/src/index.spec.js +++ b/packages/accounts-mongo/src/index.spec.js @@ -1,27 +1,273 @@ +import mongodb from 'mongodb'; import Mongo from './index'; +let mongo; +let db; +const user = { + username: 'johndoe', + email: 'john@doe.com', + password: 'toto', + profile: {}, +}; + +function createConnection(cb) { + const url = 'mongodb://localhost:27017/accounts-mongo-tests'; + mongodb.MongoClient.connect(url, (err, dbArg) => { + db = dbArg; + mongo = new Mongo(db); + cb(err); + }); +} + +function dropDatabase(cb) { + db.dropDatabase((err) => { + if (err) return cb(err); + return cb(); + }); +} + +function closeConnection(cb) { + dropDatabase((err) => { + db.close(); + if (err) return cb(err); + return cb(); + }); +} + describe('Mongo', () => { + beforeAll(createConnection); + describe('#constructor', () => { it('should have default options', () => { - const mongo = new Mongo(); expect(mongo.options).toBeTruthy(); }); it('should overwrite options', () => { - const mongo = new Mongo({ + const mongoTestOptions = new Mongo(db, { collectionName: 'users-test', }); - expect(mongo.options).toBeTruthy(); - expect(mongo.options.collectionName).toEqual('users-test'); + expect(mongoTestOptions.options).toBeTruthy(); + expect(mongoTestOptions.options.collectionName).toEqual('users-test'); + }); + + it('should throw with an invalid database connection object', () => { + try { + new Mongo(); // eslint-disable-line no-new + throw new Error(); + } catch (err) { + expect(err.message).toBe('A valid database connection object is required'); + } + }); + }); + + describe('setupIndexes', () => { + it('should create indexes', async () => { + await mongo.setupIndexes(); + const ret = await mongo.collection.indexInformation(); + expect(ret).toBeTruthy(); + expect(ret._id_[0]).toEqual(['_id', 1]); // eslint-disable-line no-underscore-dangle + expect(ret.username_1[0]).toEqual(['username', 1]); + expect(ret['emails.address_1'][0]).toEqual(['emails.address', 1]); + }); + + afterAll((done) => { + dropDatabase(done); }); }); describe('createUser', () => { - const mongo = new Mongo(); + it('should create a new user', async () => { + const ret = await mongo.createUser(user); + expect(ret._id).toBeTruthy(); + expect(ret.emails[0].address).toBe(user.email); + expect(ret.emails[0].verified).toBe(false); + expect(ret.createdAt).toBeTruthy(); + }); + + it('should not set password', async () => { + const ret = await mongo.createUser({ email: user.email }); + expect(ret._id).toBeTruthy(); + expect(ret.services.password).not.toBeTruthy(); + }); + + it('should not set username', async () => { + const ret = await mongo.createUser({ email: user.email }); + expect(ret._id).toBeTruthy(); + expect(ret.username).not.toBeTruthy(); + }); + + it('should not set email', async () => { + const ret = await mongo.createUser({ username: user.username }); + expect(ret._id).toBeTruthy(); + expect(ret.emails).not.toBeTruthy(); + }); + + it('email should be lowercase', async () => { + const ret = await mongo.createUser({ email: 'JohN@doe.com' }); + expect(ret._id).toBeTruthy(); + expect(ret.emails[0].address).toEqual('john@doe.com'); + }); + }); + + describe('findUserById', () => { + it('should return null for not found user', async () => { + const ret = await mongo.findUserById('unknowuser'); + expect(ret).not.toBeTruthy(); + }); + + it('should return user', async () => { + const retUser = await mongo.createUser(user); + const ret = await mongo.findUserById(retUser._id); + expect(ret).toBeTruthy(); + }); + }); + + describe('findUserByEmail', () => { + it('should return null for not found user', async () => { + const ret = await mongo.findUserByEmail('unknow@user.com'); + expect(ret).not.toBeTruthy(); + }); + + it('should return user', async () => { + const ret = await mongo.findUserByEmail(user.email); + expect(ret).toBeTruthy(); + }); - it('should resolve promise', async () => { - const ret = await mongo.createUser(); - expect(ret).toEqual('user'); + it('should return user with uppercase email', async () => { + await mongo.createUser({ email: 'JOHN@DOES.COM' }); + const ret = await mongo.findUserByEmail('JOHN@DOES.COM'); + expect(ret._id).toBeTruthy(); + expect(ret.emails[0].address).toEqual('john@does.com'); }); }); + + describe('findUserByUsername', () => { + it('should return null for not found user', async () => { + const ret = await mongo.findUserByUsername('unknowuser'); + expect(ret).not.toBeTruthy(); + }); + + it('should return user', async () => { + const ret = await mongo.findUserByUsername(user.username); + expect(ret).toBeTruthy(); + }); + }); + + describe('findPasswordHash', () => { + it('should throw if user is not found', async () => { + try { + await mongo.findPasswordHash('unknowuser'); + throw new Error(); + } catch (err) { + expect(err.message).toEqual('User not found'); + } + }); + + it('should return hash', async () => { + const retUser = await mongo.createUser(user); + const ret = await mongo.findPasswordHash(retUser._id); + expect(ret).toBeTruthy(); + expect(ret).toEqual(retUser.services.password.bcrypt); + }); + }); + + describe('addEmail', () => { + it('should throw if user is not found', async () => { + try { + await mongo.addEmail('unknowuser', 'unknowemail'); + throw new Error(); + } catch (err) { + expect(err.message).toEqual('User not found'); + } + }); + + it('should add email', async () => { + const email = 'johns@doe.com'; + let retUser = await mongo.createUser(user); + await mongo.addEmail(retUser._id, email, false); + retUser = await mongo.findUserByEmail(email); + expect(retUser.emails.length).toEqual(2); + }); + + it('should add lowercase email', async () => { + const email = 'johnS@doe.com'; + let retUser = await mongo.createUser(user); + await mongo.addEmail(retUser._id, email, false); + retUser = await mongo.findUserByEmail(email); + expect(retUser.emails.length).toEqual(2); + expect(retUser.emails[1].address).toEqual('johns@doe.com'); + }); + }); + + describe('removeEmail', () => { + it('should throw if user is not found', async () => { + try { + await mongo.removeEmail('unknowuser', 'unknowemail'); + throw new Error(); + } catch (err) { + expect(err.message).toEqual('User not found'); + } + }); + + it('should remove email', async () => { + const email = 'johns@doe.com'; + let retUser = await mongo.createUser(user); + await mongo.addEmail(retUser._id, email, false); + await mongo.removeEmail(retUser._id, user.email, false); + retUser = await mongo.findUserById(retUser._id); + expect(retUser.emails.length).toEqual(1); + expect(retUser.emails[0].address).toEqual(email); + }); + + it('should remove uppercase email', async () => { + const email = 'johns@doe.com'; + let retUser = await mongo.createUser(user); + await mongo.addEmail(retUser._id, email, false); + await mongo.removeEmail(retUser._id, 'JOHN@doe.com', false); + retUser = await mongo.findUserById(retUser._id); + expect(retUser.emails.length).toEqual(1); + expect(retUser.emails[0].address).toEqual(email); + }); + }); + + describe('setUsername', () => { + it('should throw if user is not found', async () => { + try { + await mongo.setUsername('unknowuser'); + throw new Error(); + } catch (err) { + expect(err.message).toEqual('User not found'); + } + }); + + it('should change username', async () => { + const username = 'johnsdoe'; + let retUser = await mongo.createUser(user); + await mongo.setUsername(retUser._id, username); + retUser = await mongo.findUserById(retUser._id); + expect(retUser.username).toEqual(username); + }); + }); + + describe('setPasssword', () => { + it('should throw if user is not found', async () => { + try { + await mongo.setPasssword('unknowuser', 'toto'); + throw new Error(); + } catch (err) { + expect(err.message).toEqual('User not found'); + } + }); + + it('should change password', async () => { + const newPassword = 'newpass'; + let retUser = await mongo.createUser(user); + await mongo.setPasssword(retUser._id, newPassword); + retUser = await mongo.findUserById(retUser._id); + expect(retUser.services.password.bcrypt).toBeTruthy(); + expect(retUser.services.password.bcrypt).not.toEqual(newPassword); + }); + }); + + afterAll(closeConnection); }); diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index 79da1ddb1..509a74985 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -2,6 +2,24 @@ # yarn lockfile v1 +"@accounts/common@^0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@accounts/common/-/common-0.0.1.tgz#47a4eaa02d765e5a000734bde4b8d5bd63f669ec" + dependencies: + apollo-errors "^1.2.1" + lodash "^4.16.4" + +"@accounts/server@^0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@accounts/server/-/server-0.0.1.tgz#39283fdad1d96eee02e657bfdc12d3eb1b8c9a92" + dependencies: + "@accounts/common" "^0.0.1" + apollo-errors "^1.2.1" + bcryptjs "^2.4.0" + jsonwebtoken "^7.2.1" + jwt-decode "^2.1.0" + lodash "^4.16.4" + abab@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.3.tgz#b81de5f7274ec4e756d797cd834f303642724e5d" @@ -80,6 +98,12 @@ anymatch@^1.3.0: arrify "^1.0.0" micromatch "^2.1.5" +apollo-errors@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/apollo-errors/-/apollo-errors-1.2.1.tgz#08b6de091444fd73d73bb5674a3137c312b25ffb" + dependencies: + es6-error "^4.0.0" + append-transform@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.3.0.tgz#d6933ce4a85f09445d9ccc4cc119051b7381a813" @@ -389,6 +413,14 @@ babel-plugin-syntax-async-functions@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" +babel-plugin-syntax-flow@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" + +babel-plugin-syntax-object-rest-spread@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" + babel-plugin-transform-async-to-generator@^6.16.0: version "6.16.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.16.0.tgz#19ec36cb1486b59f9f468adfa42ce13908ca2999" @@ -566,6 +598,20 @@ babel-plugin-transform-es2015-unicode-regex@^6.3.13: babel-runtime "^6.0.0" regexpu-core "^2.0.0" +babel-plugin-transform-flow-strip-types@^6.21.0: + version "6.21.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.21.0.tgz#2eea3f8b5bb234339b47283feac155cfb237b948" + dependencies: + babel-plugin-syntax-flow "^6.18.0" + babel-runtime "^6.0.0" + +babel-plugin-transform-object-rest-spread@^6.20.2: + version "6.20.2" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.20.2.tgz#e816c55bba77b14c16365d87e2ae48c8fd18fc2e" + dependencies: + babel-plugin-syntax-object-rest-spread "^6.8.0" + babel-runtime "^6.20.0" + babel-plugin-transform-regenerator@^6.16.0: version "6.21.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.21.0.tgz#75d0c7e7f84f379358f508451c68a2c5fa5a9703" @@ -686,12 +732,20 @@ base64-js@^1.0.2: version "1.2.0" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.0.tgz#a39992d723584811982be5e290bb6a53d86700f1" +base64url@2.0.0, base64url@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/base64url/-/base64url-2.0.0.tgz#eac16e03ea1438eff9423d69baa36262ed1f70bb" + bcrypt-pbkdf@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz#3ca76b85241c7170bf7d9703e7b9aa74630040d4" dependencies: tweetnacl "^0.14.3" +bcryptjs@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/bcryptjs/-/bcryptjs-2.4.0.tgz#fb7f4a0b133854503fe1b2da3f25db834cf0e678" + big.js@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.1.3.tgz#4cada2193652eb3ca9ec8e55c9015669c9806978" @@ -757,6 +811,14 @@ bser@^1.0.2: dependencies: node-int64 "^0.4.0" +bson@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/bson/-/bson-1.0.1.tgz#3a5addb0f2ff88bc3436e708e4bdb8637602d72d" + +buffer-equal-constant-time@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" + buffer-shims@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" @@ -1087,6 +1149,13 @@ ecc-jsbn@~0.1.1: dependencies: jsbn "~0.1.0" +ecdsa-sig-formatter@1.0.9: + version "1.0.9" + resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz#4bc926274ec3b5abb5016e7e1d60921ac262b2a1" + dependencies: + base64url "^2.0.0" + safe-buffer "^5.0.1" + emojis-list@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" @@ -1118,6 +1187,10 @@ es5-ext@^0.10.7, es5-ext@^0.10.8, es5-ext@~0.10.11, es5-ext@~0.10.2, es5-ext@~0. es6-iterator "2" es6-symbol "~3.1" +es6-error@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.0.1.tgz#eeb3e280f57e2ec48d72a9fccaf6247d3c1f5719" + es6-iterator@2: version "2.0.0" resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.0.tgz#bd968567d61635e33c0b80727613c9cb4b096bac" @@ -1137,6 +1210,10 @@ es6-map@^0.1.3: es6-symbol "~3.1.0" event-emitter "~0.3.4" +es6-promise@3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.2.1.tgz#ec56233868032909207170c39448e24449dd1fc4" + es6-set@~0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.4.tgz#9516b6761c2964b92ff479456233a247dc707ce8" @@ -1216,6 +1293,12 @@ eslint-module-utils@^2.0.0: debug "2.2.0" pkg-dir "^1.0.0" +eslint-plugin-flowtype@^2.29.1: + version "2.29.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.29.2.tgz#91b4fde0400c4c37ca4440b43bdbc95fc405bea9" + dependencies: + lodash "^4.15.0" + eslint-plugin-import@^2.0.1: version "2.2.0" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.2.0.tgz#72ba306fad305d67c4816348a4699a4229ac8b4e" @@ -1439,6 +1522,10 @@ flat-cache@^1.2.1: graceful-fs "^4.1.2" write "^0.2.1" +flow-bin@^0.37.4: + version "0.37.4" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.37.4.tgz#3d8da2ef746e80e730d166e09040f4198969b76b" + for-in@^0.1.5: version "0.1.6" resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.6.tgz#c9f96e89bfad18a545af5ec3ed352a1d9e5b4dc8" @@ -1883,6 +1970,10 @@ isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" +isemail@1.x.x: + version "1.2.0" + resolved "https://registry.yarnpkg.com/isemail/-/isemail-1.2.0.tgz#be03df8cc3e29de4d2c5df6501263f1fa4595e9a" + isexe@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/isexe/-/isexe-1.1.2.tgz#36f3e22e60750920f5e7241a476a8c6a42275ad0" @@ -2149,6 +2240,15 @@ jodid25519@^1.0.0: dependencies: jsbn "~0.1.0" +joi@^6.10.1: + version "6.10.1" + resolved "https://registry.yarnpkg.com/joi/-/joi-6.10.1.tgz#4d50c318079122000fe5f16af1ff8e1917b77e06" + dependencies: + hoek "2.x.x" + isemail "1.x.x" + moment "2.x.x" + topo "1.x.x" + js-tokens@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-2.0.0.tgz#79903f5563ee778cc1162e6dcf1a0027c97f9cb5" @@ -2223,6 +2323,16 @@ jsonpointer@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.0.tgz#6661e161d2fc445f19f98430231343722e1fcbd5" +jsonwebtoken@^7.2.1: + version "7.2.1" + resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-7.2.1.tgz#0fc7217473fc02b4c9aa1e188aa70b51bba4fccb" + dependencies: + joi "^6.10.1" + jws "^3.1.4" + lodash.once "^4.0.0" + ms "^0.7.1" + xtend "^4.0.1" + jsprim@^1.2.2: version "1.3.1" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.3.1.tgz#2a7256f70412a29ee3670aaca625994c4dcff252" @@ -2238,6 +2348,27 @@ jsx-ast-utils@^1.0.0, jsx-ast-utils@^1.3.4: acorn-jsx "^3.0.1" object-assign "^4.1.0" +jwa@^1.1.4: + version "1.1.5" + resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.1.5.tgz#a0552ce0220742cd52e153774a32905c30e756e5" + dependencies: + base64url "2.0.0" + buffer-equal-constant-time "1.0.1" + ecdsa-sig-formatter "1.0.9" + safe-buffer "^5.0.1" + +jws@^3.1.4: + version "3.1.4" + resolved "https://registry.yarnpkg.com/jws/-/jws-3.1.4.tgz#f9e8b9338e8a847277d6444b1464f61880e050a2" + dependencies: + base64url "^2.0.0" + jwa "^1.1.4" + safe-buffer "^5.0.1" + +jwt-decode@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/jwt-decode/-/jwt-decode-2.1.0.tgz#d3079cef1689d82d56bbb7aedcfea28b12f0e36a" + kind-of@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.1.0.tgz#475d698a5e49ff5e53d14e3e732429dc8bf4cf47" @@ -2357,13 +2488,17 @@ lodash.keys@^3.0.0: lodash.isarguments "^3.0.0" lodash.isarray "^3.0.0" +lodash.once@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" + lodash.pickby@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.pickby/-/lodash.pickby-4.6.0.tgz#7dea21d8c18d7703a27c704c15d3b84a67e33aff" -lodash@^4.0.0, lodash@^4.16.4, lodash@^4.2.0, lodash@^4.3.0: - version "4.17.2" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.2.tgz#34a3055babe04ce42467b607d700072c7ff6bf42" +lodash@^4.0.0, lodash@^4.15.0, lodash@^4.16.4, lodash@^4.17.3, lodash@^4.2.0, lodash@^4.3.0: + version "4.17.3" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.3.tgz#557ed7d2a9438cac5fd5a43043ca60cb455e01f7" log-driver@1.2.5: version "1.2.5" @@ -2468,7 +2603,26 @@ mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkd dependencies: minimist "0.0.8" -ms@0.7.1: +moment@2.x.x: + version "2.17.1" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.17.1.tgz#fed9506063f36b10f066c8b59a144d7faebe1d82" + +mongodb-core@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/mongodb-core/-/mongodb-core-2.1.2.tgz#a11db773d34819cbeb97751241827137ab535aab" + dependencies: + bson "~1.0.1" + require_optional "~1.0.0" + +mongodb@^2.2.16: + version "2.2.16" + resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-2.2.16.tgz#e32ba91cf9e29f371fb38ba0c4a71c3b1f5fae77" + dependencies: + es6-promise "3.2.1" + mongodb-core "2.1.2" + readable-stream "2.1.5" + +ms@0.7.1, ms@^0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" @@ -2848,9 +3002,9 @@ read-pkg@^1.0.0: normalize-package-data "^2.3.2" path-type "^1.0.0" -"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.1.0, readable-stream@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.2.tgz#a9e6fec3c7dda85f8bb1b3ba7028604556fc825e" +readable-stream@2.1.5, readable-stream@~2.1.4: + version "2.1.5" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.1.5.tgz#66fa8b720e1438b364681f2ad1a63c618448c9d0" dependencies: buffer-shims "^1.0.0" core-util-is "~1.0.0" @@ -2860,10 +3014,11 @@ read-pkg@^1.0.0: string_decoder "~0.10.x" util-deprecate "~1.0.1" -readable-stream@~2.0.5: - version "2.0.6" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e" +"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.1.0, readable-stream@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.2.tgz#a9e6fec3c7dda85f8bb1b3ba7028604556fc825e" dependencies: + buffer-shims "^1.0.0" core-util-is "~1.0.0" inherits "~2.0.1" isarray "~1.0.0" @@ -2871,11 +3026,10 @@ readable-stream@~2.0.5: string_decoder "~0.10.x" util-deprecate "~1.0.1" -readable-stream@~2.1.4: - version "2.1.5" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.1.5.tgz#66fa8b720e1438b364681f2ad1a63c618448c9d0" +readable-stream@~2.0.5: + version "2.0.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e" dependencies: - buffer-shims "^1.0.0" core-util-is "~1.0.0" inherits "~2.0.1" isarray "~1.0.0" @@ -3033,10 +3187,21 @@ require-uncached@^1.0.2: caller-path "^0.1.0" resolve-from "^1.0.0" +require_optional@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/require_optional/-/require_optional-1.0.0.tgz#52a86137a849728eb60a55533617f8f914f59abf" + dependencies: + resolve-from "^2.0.0" + semver "^5.1.0" + resolve-from@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" +resolve-from@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-2.0.0.tgz#9480ab20e94ffa1d9e80a804c7ea147611966b57" + resolve@1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" @@ -3078,6 +3243,10 @@ rx-lite@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" +safe-buffer@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" + sane@~1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/sane/-/sane-1.4.1.tgz#88f763d74040f5f0c256b6163db399bf110ac715" @@ -3360,6 +3529,12 @@ to-fast-properties@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.2.tgz#f3f5c0c3ba7299a7ef99427e44633257ade43320" +topo@1.x.x: + version "1.1.0" + resolved "https://registry.yarnpkg.com/topo/-/topo-1.1.0.tgz#e9d751615d1bb87dc865db182fa1ca0a5ef536d5" + dependencies: + hoek "2.x.x" + tough-cookie@^2.3.1, tough-cookie@~2.3.0: version "2.3.2" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" @@ -3599,7 +3774,7 @@ write@^0.2.1: version "2.0.1" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635" -"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0: +"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" From 1c685b6377eac34e0763fa65357383ddfb237066 Mon Sep 17 00:00:00 2001 From: Tim Mikeladze Date: Sat, 21 Jan 2017 11:44:39 -0800 Subject: [PATCH 027/128] Merge pull request #5 from js-accounts/sessions Add sessions support --- packages/accounts-mongo/package.json | 34 +- packages/accounts-mongo/src/index.js | 63 +- packages/accounts-mongo/src/index.spec.js | 149 ++- packages/accounts-mongo/yarn.lock | 1097 ++++++++++++--------- 4 files changed, 792 insertions(+), 551 deletions(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index b811f5815..2446675e1 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -31,31 +31,31 @@ }, "homepage": "https://github.com/js-accounts/mongo", "devDependencies": { - "babel-cli": "^6.16.0", - "babel-core": "^6.17.0", + "babel-cli": "^6.22.2", + "babel-core": "^6.22.1", "babel-eslint": "^7.0.0", "babel-loader": "^6.2.5", - "babel-plugin-transform-async-to-generator": "^6.16.0", - "babel-plugin-transform-flow-strip-types": "^6.21.0", - "babel-plugin-transform-object-rest-spread": "^6.20.2", - "babel-preset-es2015": "^6.16.0", + "babel-plugin-transform-async-to-generator": "^6.22.0", + "babel-plugin-transform-flow-strip-types": "^6.22.0", + "babel-plugin-transform-object-rest-spread": "^6.22.0", + "babel-preset-es2015": "^6.22.0", "coveralls": "^2.11.14", - "eslint": "^3.7.1", - "eslint-config-airbnb": "^12.0.0", - "eslint-config-airbnb-base": "^9.0.0", - "eslint-plugin-flowtype": "^2.29.1", + "eslint": "^3.13.1", + "eslint-config-airbnb": "^14.0.0", + "eslint-config-airbnb-base": "^11.0.1", + "eslint-plugin-flowtype": "^2.30.0", "eslint-plugin-import": "^2.0.1", - "eslint-plugin-jsx-a11y": "^2.2.3", - "eslint-plugin-react": "^6.3.0", + "eslint-plugin-jsx-a11y": "^3.0.2", + "eslint-plugin-react": "^6.9.0", "flow-bin": "^0.37.4", - "jest": "^18.0.0", + "jest": "^18.1.0", "webpack": "^1.14.0", "webpack-node-externals": "^1.5.4" }, "dependencies": { - "@accounts/common": "^0.0.1", - "@accounts/server": "^0.0.1", - "lodash": "^4.17.3", - "mongodb": "^2.2.16" + "@accounts/common": "^0.0.2", + "@accounts/server": "^0.0.2", + "lodash": "^4.17.4", + "mongodb": "^2.2.21" } } diff --git a/packages/accounts-mongo/src/index.js b/packages/accounts-mongo/src/index.js index 7fd33c53a..a1e158244 100644 --- a/packages/accounts-mongo/src/index.js +++ b/packages/accounts-mongo/src/index.js @@ -5,10 +5,12 @@ import { encryption } from '@accounts/server'; import type { CreateUserType, UserObjectType, + SessionType, } from '@accounts/common'; export type MongoOptionsType = { collectionName: string, + sessionCollectionName: string, timestamps: { createdAt: string, updatedAt: string, @@ -34,10 +36,12 @@ class Mongo { // TODO definition for mongodb connection object db: any; collection: any; + sessionCollection: any; constructor(db: any, options: MongoOptionsType) { const defaultOptions = { collectionName: 'users', + sessionCollectionName: 'sessions', timestamps: { createdAt: 'createdAt', updatedAt: 'updatedAt', @@ -49,6 +53,7 @@ class Mongo { } this.db = db; this.collection = this.db.collection(this.options.collectionName); + this.sessionCollection = this.db.collection(this.options.sessionCollectionName); } async setupIndexes(): Promise { @@ -56,10 +61,11 @@ class Mongo { await this.collection.createIndex('emails.address', { unique: 1, sparse: 1 }); } - async createUser(options: CreateUserType): Promise { + async createUser(options: CreateUserType): Promise { const user: MongoUserObjectType = { services: {}, [this.options.timestamps.createdAt]: Date.now(), + [this.options.timestamps.updatedAt]: Date.now(), }; if (options.password) { user.services.password = { bcrypt: await encryption.hashPassword(options.password) }; @@ -71,7 +77,7 @@ class Mongo { user.emails = [{ address: options.email.toLowerCase(), verified: false }]; } const ret = await this.collection.insertOne(user); - return ret.ops[0]; + return ret.ops[0]._id; } findUserById(userId: string): Promise { @@ -88,10 +94,10 @@ class Mongo { async findPasswordHash(userId: string): Promise { const user = await this.findUserById(userId); - if (!user) { - throw new Error('User not found'); + if (user) { + return user.services.password.bcrypt; } - return user.services.password.bcrypt; + return null; } async addEmail(userId: string, newEmail: string, verified: boolean): Promise { @@ -102,6 +108,7 @@ class Mongo { verified, }, }, + $set: { [this.options.timestamps.updatedAt]: Date.now() }, }); if (ret.result.nModified === 0) { throw new Error('User not found'); @@ -111,6 +118,7 @@ class Mongo { async removeEmail(userId: string, email: string): Promise { const ret = await this.collection.update({ _id: userId }, { $pull: { emails: { address: email.toLowerCase() } }, + $set: { [this.options.timestamps.updatedAt]: Date.now() }, }); if (ret.result.nModified === 0) { throw new Error('User not found'); @@ -119,7 +127,10 @@ class Mongo { async setUsername(userId: string, newUsername: string): Promise { const ret = await this.collection.update({ _id: userId }, { - $set: { username: newUsername }, + $set: { + username: newUsername, + [this.options.timestamps.updatedAt]: Date.now(), + }, }); if (ret.result.nModified === 0) { throw new Error('User not found'); @@ -128,12 +139,50 @@ class Mongo { async setPasssword(userId: string, newPassword: string): Promise { const ret = await this.collection.update({ _id: userId }, { - $set: { 'services.password.bcrypt': await encryption.hashPassword(newPassword) }, + $set: { + 'services.password.bcrypt': await encryption.hashPassword(newPassword), + [this.options.timestamps.updatedAt]: Date.now(), + }, }); if (ret.result.nModified === 0) { throw new Error('User not found'); } } + + async createSession(userId: string, ip: string, userAgent: string): Promise { + const ret = await this.sessionCollection.insertOne({ + userId, + userAgent, + ip, + valid: true, + [this.options.timestamps.createdAt]: Date.now(), + [this.options.timestamps.updatedAt]: Date.now(), + }); + return ret.ops[0]._id; + } + + async updateSession(sessionId: string, ip: string, userAgent: string): Promise { + await this.sessionCollection.update({ _id: sessionId }, { + $set: { + ip, + userAgent, + [this.options.timestamps.updatedAt]: Date.now(), + }, + }); + } + + async invalidateSession(sessionId: string): Promise { + await this.sessionCollection.update({ _id: sessionId }, { + $set: { + valid: false, + [this.options.timestamps.updatedAt]: Date.now(), + }, + }); + } + + findSessionById(sessionId: string): Promise { + return this.sessionCollection.findOne({ _id: sessionId }); + } } export default Mongo; diff --git a/packages/accounts-mongo/src/index.spec.js b/packages/accounts-mongo/src/index.spec.js index 304216697..1be1ddab6 100644 --- a/packages/accounts-mongo/src/index.spec.js +++ b/packages/accounts-mongo/src/index.spec.js @@ -9,6 +9,11 @@ const user = { password: 'toto', profile: {}, }; +const session = { + userId: '123', + ip: '127.0.0.1', + userAgent: 'user agent', +}; function createConnection(cb) { const url = 'mongodb://localhost:27017/accounts-mongo-tests'; @@ -34,6 +39,10 @@ function closeConnection(cb) { }); } +function delay(time) { + return new Promise(resolve => setTimeout(() => resolve(), time)); +} + describe('Mongo', () => { beforeAll(createConnection); @@ -45,9 +54,11 @@ describe('Mongo', () => { it('should overwrite options', () => { const mongoTestOptions = new Mongo(db, { collectionName: 'users-test', + sessionCollectionName: 'sessions-test', }); expect(mongoTestOptions.options).toBeTruthy(); expect(mongoTestOptions.options.collectionName).toEqual('users-test'); + expect(mongoTestOptions.options.sessionCollectionName).toEqual('sessions-test'); }); it('should throw with an invalid database connection object', () => { @@ -77,33 +88,39 @@ describe('Mongo', () => { describe('createUser', () => { it('should create a new user', async () => { - const ret = await mongo.createUser(user); + const userId = await mongo.createUser(user); + const ret = await mongo.findUserById(userId); expect(ret._id).toBeTruthy(); expect(ret.emails[0].address).toBe(user.email); expect(ret.emails[0].verified).toBe(false); expect(ret.createdAt).toBeTruthy(); + expect(ret.updatedAt).toBeTruthy(); }); it('should not set password', async () => { - const ret = await mongo.createUser({ email: user.email }); + const userId = await mongo.createUser({ email: user.email }); + const ret = await mongo.findUserById(userId); expect(ret._id).toBeTruthy(); expect(ret.services.password).not.toBeTruthy(); }); it('should not set username', async () => { - const ret = await mongo.createUser({ email: user.email }); + const userId = await mongo.createUser({ email: user.email }); + const ret = await mongo.findUserById(userId); expect(ret._id).toBeTruthy(); expect(ret.username).not.toBeTruthy(); }); it('should not set email', async () => { - const ret = await mongo.createUser({ username: user.username }); + const userId = await mongo.createUser({ username: user.username }); + const ret = await mongo.findUserById(userId); expect(ret._id).toBeTruthy(); expect(ret.emails).not.toBeTruthy(); }); it('email should be lowercase', async () => { - const ret = await mongo.createUser({ email: 'JohN@doe.com' }); + const userId = await mongo.createUser({ email: 'JohN@doe.com' }); + const ret = await mongo.findUserById(userId); expect(ret._id).toBeTruthy(); expect(ret.emails[0].address).toEqual('john@doe.com'); }); @@ -116,8 +133,8 @@ describe('Mongo', () => { }); it('should return user', async () => { - const retUser = await mongo.createUser(user); - const ret = await mongo.findUserById(retUser._id); + const userId = await mongo.createUser(user); + const ret = await mongo.findUserById(userId); expect(ret).toBeTruthy(); }); }); @@ -154,18 +171,15 @@ describe('Mongo', () => { }); describe('findPasswordHash', () => { - it('should throw if user is not found', async () => { - try { - await mongo.findPasswordHash('unknowuser'); - throw new Error(); - } catch (err) { - expect(err.message).toEqual('User not found'); - } + it('should return null on not found user', async () => { + const ret = await mongo.findPasswordHash('unknowuser'); + expect(ret).toEqual(null); }); it('should return hash', async () => { - const retUser = await mongo.createUser(user); - const ret = await mongo.findPasswordHash(retUser._id); + const userId = await mongo.createUser(user); + const retUser = await mongo.findUserById(userId); + const ret = await mongo.findPasswordHash(userId); expect(ret).toBeTruthy(); expect(ret).toEqual(retUser.services.password.bcrypt); }); @@ -183,17 +197,19 @@ describe('Mongo', () => { it('should add email', async () => { const email = 'johns@doe.com'; - let retUser = await mongo.createUser(user); - await mongo.addEmail(retUser._id, email, false); - retUser = await mongo.findUserByEmail(email); + const userId = await mongo.createUser(user); + await delay(10); + await mongo.addEmail(userId, email, false); + const retUser = await mongo.findUserByEmail(email); expect(retUser.emails.length).toEqual(2); + expect(retUser.createdAt).not.toEqual(retUser.updatedAt); }); it('should add lowercase email', async () => { const email = 'johnS@doe.com'; - let retUser = await mongo.createUser(user); - await mongo.addEmail(retUser._id, email, false); - retUser = await mongo.findUserByEmail(email); + const userId = await mongo.createUser(user); + await mongo.addEmail(userId, email, false); + const retUser = await mongo.findUserByEmail(email); expect(retUser.emails.length).toEqual(2); expect(retUser.emails[1].address).toEqual('johns@doe.com'); }); @@ -211,20 +227,22 @@ describe('Mongo', () => { it('should remove email', async () => { const email = 'johns@doe.com'; - let retUser = await mongo.createUser(user); - await mongo.addEmail(retUser._id, email, false); - await mongo.removeEmail(retUser._id, user.email, false); - retUser = await mongo.findUserById(retUser._id); + const userId = await mongo.createUser(user); + await delay(10); + await mongo.addEmail(userId, email, false); + await mongo.removeEmail(userId, user.email, false); + const retUser = await mongo.findUserById(userId); expect(retUser.emails.length).toEqual(1); expect(retUser.emails[0].address).toEqual(email); + expect(retUser.createdAt).not.toEqual(retUser.updatedAt); }); it('should remove uppercase email', async () => { const email = 'johns@doe.com'; - let retUser = await mongo.createUser(user); - await mongo.addEmail(retUser._id, email, false); - await mongo.removeEmail(retUser._id, 'JOHN@doe.com', false); - retUser = await mongo.findUserById(retUser._id); + const userId = await mongo.createUser(user); + await mongo.addEmail(userId, email, false); + await mongo.removeEmail(userId, 'JOHN@doe.com', false); + const retUser = await mongo.findUserById(userId); expect(retUser.emails.length).toEqual(1); expect(retUser.emails[0].address).toEqual(email); }); @@ -242,10 +260,12 @@ describe('Mongo', () => { it('should change username', async () => { const username = 'johnsdoe'; - let retUser = await mongo.createUser(user); - await mongo.setUsername(retUser._id, username); - retUser = await mongo.findUserById(retUser._id); + const userId = await mongo.createUser(user); + await delay(10); + await mongo.setUsername(userId, username); + const retUser = await mongo.findUserById(userId); expect(retUser.username).toEqual(username); + expect(retUser.createdAt).not.toEqual(retUser.updatedAt); }); }); @@ -261,11 +281,68 @@ describe('Mongo', () => { it('should change password', async () => { const newPassword = 'newpass'; - let retUser = await mongo.createUser(user); - await mongo.setPasssword(retUser._id, newPassword); - retUser = await mongo.findUserById(retUser._id); + const userId = await mongo.createUser(user); + await delay(10); + await mongo.setPasssword(userId, newPassword); + const retUser = await mongo.findUserById(userId); expect(retUser.services.password.bcrypt).toBeTruthy(); expect(retUser.services.password.bcrypt).not.toEqual(newPassword); + expect(retUser.createdAt).not.toEqual(retUser.updatedAt); + }); + }); + + describe('createSession', () => { + it('should create session', async () => { + const sessionId = await mongo.createSession(session.userId, session.ip, session.userAgent); + const ret = await mongo.findSessionById(sessionId); + expect(ret).toBeTruthy(); + expect(ret._id).toBeTruthy(); + expect(ret.userId).toEqual(session.userId); + expect(ret.ip).toEqual(session.ip); + expect(ret.userAgent).toEqual(session.userAgent); + expect(ret.valid).toEqual(true); + expect(ret.createdAt).toBeTruthy(); + expect(ret.updatedAt).toBeTruthy(); + }); + }); + + describe('findSessionById', () => { + it('should return null for not found session', async () => { + const ret = await mongo.findSessionById('unknowsession'); + expect(ret).not.toBeTruthy(); + }); + + it('should find session', async () => { + const sessionId = await mongo.createSession(session); + const ret = await mongo.findSessionById(sessionId); + expect(ret).toBeTruthy(); + }); + }); + + describe('updateSession', () => { + it('should update session', async () => { + const sessionId = await mongo.createSession(session.userId, session.ip, session.userAgent); + await delay(10); + await mongo.updateSession(sessionId, 'new ip', 'new user agent'); + const ret = await mongo.findSessionById(sessionId); + expect(ret.userId).toEqual(session.userId); + expect(ret.ip).toEqual('new ip'); + expect(ret.userAgent).toEqual('new user agent'); + expect(ret.valid).toEqual(true); + expect(ret.createdAt).toBeTruthy(); + expect(ret.updatedAt).toBeTruthy(); + expect(ret.createdAt).not.toEqual(ret.updatedAt); + }); + }); + + describe('invalidateSession', () => { + it('invalidates a session', async () => { + const sessionId = await mongo.createSession(session.userId, session.ip, session.userAgent); + await delay(10); + await mongo.invalidateSession(sessionId); + const ret = await mongo.findSessionById(sessionId); + expect(ret.valid).toEqual(false); + expect(ret.createdAt).not.toEqual(ret.updatedAt); }); }); diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index 509a74985..e02874a9c 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -2,18 +2,18 @@ # yarn lockfile v1 -"@accounts/common@^0.0.1": - version "0.0.1" - resolved "https://registry.yarnpkg.com/@accounts/common/-/common-0.0.1.tgz#47a4eaa02d765e5a000734bde4b8d5bd63f669ec" +"@accounts/common@^0.0.2": + version "0.0.2" + resolved "https://registry.yarnpkg.com/@accounts/common/-/common-0.0.2.tgz#be040983e5d36b6ce0471dc3c85502274a8792de" dependencies: apollo-errors "^1.2.1" lodash "^4.16.4" -"@accounts/server@^0.0.1": - version "0.0.1" - resolved "https://registry.yarnpkg.com/@accounts/server/-/server-0.0.1.tgz#39283fdad1d96eee02e657bfdc12d3eb1b8c9a92" +"@accounts/server@^0.0.2": + version "0.0.2" + resolved "https://registry.yarnpkg.com/@accounts/server/-/server-0.0.2.tgz#d4bd5c2171a43fa86c0b623e9a940f1e102e5091" dependencies: - "@accounts/common" "^0.0.1" + "@accounts/common" "^0.0.2" apollo-errors "^1.2.1" bcryptjs "^2.4.0" jsonwebtoken "^7.2.1" @@ -104,9 +104,11 @@ apollo-errors@^1.2.1: dependencies: es6-error "^4.0.0" -append-transform@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.3.0.tgz#d6933ce4a85f09445d9ccc4cc119051b7381a813" +append-transform@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991" + dependencies: + default-require-extensions "^1.0.0" aproba@^1.0.3: version "1.0.4" @@ -135,10 +137,6 @@ arr-flatten@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.1.tgz#e5ffe54d45e19f32f216e91eb99c8ce892bb604b" -array-differ@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031" - array-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" @@ -157,6 +155,13 @@ array-unique@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" +array.prototype.find@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/array.prototype.find/-/array.prototype.find-2.0.1.tgz#1557f888df6c57e4d1256f20852d687a25b51fde" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.5.0" + arrify@^1.0.0, arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" @@ -183,14 +188,20 @@ async-each@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" -async@1.x, async@^1.3.0, async@^1.4.0, async@^1.4.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" - async@^0.9.0: version "0.9.2" resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d" +async@^1.3.0, async@^1.4.0, async@^1.4.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + +async@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/async/-/async-2.1.4.tgz#2d2160c7788032e4dd6cbe2502f1f9a2c8f6cde4" + dependencies: + lodash "^4.14.0" + async@~0.2.6: version "0.2.10" resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1" @@ -207,18 +218,18 @@ aws4@^1.2.1: version "1.5.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.5.0.tgz#0a29ffb79c31c9e712eeb087e8e7a64b4a56d755" -babel-cli@^6.16.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-cli/-/babel-cli-6.18.0.tgz#92117f341add9dead90f6fa7d0a97c0cc08ec186" +babel-cli@^6.22.2: + version "6.22.2" + resolved "https://registry.yarnpkg.com/babel-cli/-/babel-cli-6.22.2.tgz#3f814c8acf52759082b8fedd9627f938936ab559" dependencies: - babel-core "^6.18.0" - babel-polyfill "^6.16.0" - babel-register "^6.18.0" - babel-runtime "^6.9.0" + babel-core "^6.22.1" + babel-polyfill "^6.22.0" + babel-register "^6.22.0" + babel-runtime "^6.22.0" commander "^2.8.1" convert-source-map "^1.1.0" fs-readdir-recursive "^1.0.0" - glob "^5.0.5" + glob "^7.0.0" lodash "^4.2.0" output-file-sync "^1.1.0" path-is-absolute "^1.0.0" @@ -226,7 +237,7 @@ babel-cli@^6.16.0: source-map "^0.5.0" v8flags "^2.0.10" optionalDependencies: - chokidar "^1.0.0" + chokidar "^1.6.1" babel-code-frame@^6.16.0, babel-code-frame@^6.20.0: version "6.20.0" @@ -236,19 +247,27 @@ babel-code-frame@^6.16.0, babel-code-frame@^6.20.0: esutils "^2.0.2" js-tokens "^2.0.0" -babel-core@^6.0.0, babel-core@^6.17.0, babel-core@^6.18.0: - version "6.21.0" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.21.0.tgz#75525480c21c803f826ef3867d22c19f080a3724" +babel-code-frame@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" dependencies: - babel-code-frame "^6.20.0" - babel-generator "^6.21.0" - babel-helpers "^6.16.0" - babel-messages "^6.8.0" - babel-register "^6.18.0" - babel-runtime "^6.20.0" - babel-template "^6.16.0" - babel-traverse "^6.21.0" - babel-types "^6.21.0" + chalk "^1.1.0" + esutils "^2.0.2" + js-tokens "^3.0.0" + +babel-core@^6.0.0, babel-core@^6.22.0, babel-core@^6.22.1: + version "6.22.1" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.22.1.tgz#9c5fd658ba1772d28d721f6d25d968fc7ae21648" + dependencies: + babel-code-frame "^6.22.0" + babel-generator "^6.22.0" + babel-helpers "^6.22.0" + babel-messages "^6.22.0" + babel-register "^6.22.0" + babel-runtime "^6.22.0" + babel-template "^6.22.0" + babel-traverse "^6.22.1" + babel-types "^6.22.0" babylon "^6.11.0" convert-source-map "^1.1.0" debug "^2.1.1" @@ -270,7 +289,7 @@ babel-eslint@^7.0.0: babylon "^6.13.0" lodash.pickby "^4.6.0" -babel-generator@^6.18.0, babel-generator@^6.21.0: +babel-generator@^6.18.0: version "6.21.0" resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.21.0.tgz#605f1269c489a1c75deeca7ea16d43d4656c8494" dependencies: @@ -282,90 +301,102 @@ babel-generator@^6.18.0, babel-generator@^6.21.0: lodash "^4.2.0" source-map "^0.5.0" -babel-helper-call-delegate@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.18.0.tgz#05b14aafa430884b034097ef29e9f067ea4133bd" +babel-generator@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.22.0.tgz#d642bf4961911a8adc7c692b0c9297f325cda805" dependencies: - babel-helper-hoist-variables "^6.18.0" - babel-runtime "^6.0.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" + babel-messages "^6.22.0" + babel-runtime "^6.22.0" + babel-types "^6.22.0" + detect-indent "^4.0.0" + jsesc "^1.3.0" + lodash "^4.2.0" + source-map "^0.5.0" -babel-helper-define-map@^6.18.0, babel-helper-define-map@^6.8.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.18.0.tgz#8d6c85dc7fbb4c19be3de40474d18e97c3676ec2" +babel-helper-call-delegate@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.22.0.tgz#119921b56120f17e9dae3f74b4f5cc7bcc1b37ef" dependencies: - babel-helper-function-name "^6.18.0" - babel-runtime "^6.9.0" - babel-types "^6.18.0" + babel-helper-hoist-variables "^6.22.0" + babel-runtime "^6.22.0" + babel-traverse "^6.22.0" + babel-types "^6.22.0" + +babel-helper-define-map@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.22.0.tgz#9544e9502b2d6dfe7d00ff60e82bd5a7a89e95b7" + dependencies: + babel-helper-function-name "^6.22.0" + babel-runtime "^6.22.0" + babel-types "^6.22.0" lodash "^4.2.0" -babel-helper-function-name@^6.18.0, babel-helper-function-name@^6.8.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.18.0.tgz#68ec71aeba1f3e28b2a6f0730190b754a9bf30e6" +babel-helper-function-name@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.22.0.tgz#51f1bdc4bb89b15f57a9b249f33d742816dcbefc" dependencies: - babel-helper-get-function-arity "^6.18.0" - babel-runtime "^6.0.0" - babel-template "^6.8.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" + babel-helper-get-function-arity "^6.22.0" + babel-runtime "^6.22.0" + babel-template "^6.22.0" + babel-traverse "^6.22.0" + babel-types "^6.22.0" -babel-helper-get-function-arity@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.18.0.tgz#a5b19695fd3f9cdfc328398b47dafcd7094f9f24" +babel-helper-get-function-arity@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.22.0.tgz#0beb464ad69dc7347410ac6ade9f03a50634f5ce" dependencies: - babel-runtime "^6.0.0" - babel-types "^6.18.0" + babel-runtime "^6.22.0" + babel-types "^6.22.0" -babel-helper-hoist-variables@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.18.0.tgz#a835b5ab8b46d6de9babefae4d98ea41e866b82a" +babel-helper-hoist-variables@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.22.0.tgz#3eacbf731d80705845dd2e9718f600cfb9b4ba72" dependencies: - babel-runtime "^6.0.0" - babel-types "^6.18.0" + babel-runtime "^6.22.0" + babel-types "^6.22.0" -babel-helper-optimise-call-expression@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.18.0.tgz#9261d0299ee1a4f08a6dd28b7b7c777348fd8f0f" +babel-helper-optimise-call-expression@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.22.0.tgz#f8d5d4b40a6e2605a6a7f9d537b581bea3756d15" dependencies: - babel-runtime "^6.0.0" - babel-types "^6.18.0" + babel-runtime "^6.22.0" + babel-types "^6.22.0" -babel-helper-regex@^6.8.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.18.0.tgz#ae0ebfd77de86cb2f1af258e2cc20b5fe893ecc6" +babel-helper-regex@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.22.0.tgz#79f532be1647b1f0ee3474b5f5c3da58001d247d" dependencies: - babel-runtime "^6.9.0" - babel-types "^6.18.0" + babel-runtime "^6.22.0" + babel-types "^6.22.0" lodash "^4.2.0" -babel-helper-remap-async-to-generator@^6.16.0: - version "6.20.3" - resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.20.3.tgz#9dd3b396f13e35ef63e538098500adc24c63c4e7" +babel-helper-remap-async-to-generator@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.22.0.tgz#2186ae73278ed03b8b15ced089609da981053383" dependencies: - babel-helper-function-name "^6.18.0" - babel-runtime "^6.20.0" - babel-template "^6.16.0" - babel-traverse "^6.20.0" - babel-types "^6.20.0" + babel-helper-function-name "^6.22.0" + babel-runtime "^6.22.0" + babel-template "^6.22.0" + babel-traverse "^6.22.0" + babel-types "^6.22.0" -babel-helper-replace-supers@^6.18.0, babel-helper-replace-supers@^6.8.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.18.0.tgz#28ec69877be4144dbd64f4cc3a337e89f29a924e" +babel-helper-replace-supers@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.22.0.tgz#1fcee2270657548908c34db16bcc345f9850cf42" dependencies: - babel-helper-optimise-call-expression "^6.18.0" - babel-messages "^6.8.0" - babel-runtime "^6.0.0" - babel-template "^6.16.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" + babel-helper-optimise-call-expression "^6.22.0" + babel-messages "^6.22.0" + babel-runtime "^6.22.0" + babel-template "^6.22.0" + babel-traverse "^6.22.0" + babel-types "^6.22.0" -babel-helpers@^6.16.0: - version "6.16.0" - resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.16.0.tgz#1095ec10d99279460553e67eb3eee9973d3867e3" +babel-helpers@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.22.0.tgz#d275f55f2252b8101bff07bc0c556deda657392c" dependencies: - babel-runtime "^6.0.0" - babel-template "^6.16.0" + babel-runtime "^6.22.0" + babel-template "^6.22.0" babel-jest@^18.0.0: version "18.0.0" @@ -384,17 +415,23 @@ babel-loader@^6.2.5: mkdirp "^0.5.1" object-assign "^4.0.1" +babel-messages@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.22.0.tgz#36066a214f1217e4ed4164867669ecb39e3ea575" + dependencies: + babel-runtime "^6.22.0" + babel-messages@^6.8.0: version "6.8.0" resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.8.0.tgz#bf504736ca967e6d65ef0adb5a2a5f947c8e0eb9" dependencies: babel-runtime "^6.0.0" -babel-plugin-check-es2015-constants@^6.3.13: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.8.0.tgz#dbf024c32ed37bfda8dee1e76da02386a8d26fe7" +babel-plugin-check-es2015-constants@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" dependencies: - babel-runtime "^6.0.0" + babel-runtime "^6.22.0" babel-plugin-istanbul@^3.0.0: version "3.0.0" @@ -421,246 +458,245 @@ babel-plugin-syntax-object-rest-spread@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" -babel-plugin-transform-async-to-generator@^6.16.0: - version "6.16.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.16.0.tgz#19ec36cb1486b59f9f468adfa42ce13908ca2999" +babel-plugin-transform-async-to-generator@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.22.0.tgz#194b6938ec195ad36efc4c33a971acf00d8cd35e" dependencies: - babel-helper-remap-async-to-generator "^6.16.0" + babel-helper-remap-async-to-generator "^6.22.0" babel-plugin-syntax-async-functions "^6.8.0" - babel-runtime "^6.0.0" + babel-runtime "^6.22.0" -babel-plugin-transform-es2015-arrow-functions@^6.3.13: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.8.0.tgz#5b63afc3181bdc9a8c4d481b5a4f3f7d7fef3d9d" +babel-plugin-transform-es2015-arrow-functions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" dependencies: - babel-runtime "^6.0.0" + babel-runtime "^6.22.0" -babel-plugin-transform-es2015-block-scoped-functions@^6.3.13: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.8.0.tgz#ed95d629c4b5a71ae29682b998f70d9833eb366d" +babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141" dependencies: - babel-runtime "^6.0.0" + babel-runtime "^6.22.0" -babel-plugin-transform-es2015-block-scoping@^6.18.0: - version "6.21.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.21.0.tgz#e840687f922e70fb2c42bb13501838c174a115ed" +babel-plugin-transform-es2015-block-scoping@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.22.0.tgz#00d6e3a0bebdcfe7536b9d653b44a9141e63e47e" dependencies: - babel-runtime "^6.20.0" - babel-template "^6.15.0" - babel-traverse "^6.21.0" - babel-types "^6.21.0" + babel-runtime "^6.22.0" + babel-template "^6.22.0" + babel-traverse "^6.22.0" + babel-types "^6.22.0" lodash "^4.2.0" -babel-plugin-transform-es2015-classes@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.18.0.tgz#ffe7a17321bf83e494dcda0ae3fc72df48ffd1d9" +babel-plugin-transform-es2015-classes@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.22.0.tgz#54d44998fd823d9dca15292324161c331c1b6f14" dependencies: - babel-helper-define-map "^6.18.0" - babel-helper-function-name "^6.18.0" - babel-helper-optimise-call-expression "^6.18.0" - babel-helper-replace-supers "^6.18.0" - babel-messages "^6.8.0" - babel-runtime "^6.9.0" - babel-template "^6.14.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" + babel-helper-define-map "^6.22.0" + babel-helper-function-name "^6.22.0" + babel-helper-optimise-call-expression "^6.22.0" + babel-helper-replace-supers "^6.22.0" + babel-messages "^6.22.0" + babel-runtime "^6.22.0" + babel-template "^6.22.0" + babel-traverse "^6.22.0" + babel-types "^6.22.0" -babel-plugin-transform-es2015-computed-properties@^6.3.13: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.8.0.tgz#f51010fd61b3bd7b6b60a5fdfd307bb7a5279870" +babel-plugin-transform-es2015-computed-properties@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.22.0.tgz#7c383e9629bba4820c11b0425bdd6290f7f057e7" dependencies: - babel-helper-define-map "^6.8.0" - babel-runtime "^6.0.0" - babel-template "^6.8.0" + babel-runtime "^6.22.0" + babel-template "^6.22.0" -babel-plugin-transform-es2015-destructuring@^6.18.0: - version "6.19.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.19.0.tgz#ff1d911c4b3f4cab621bd66702a869acd1900533" +babel-plugin-transform-es2015-destructuring@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.22.0.tgz#8e0af2f885a0b2cf999d47c4c1dd23ce88cfa4c6" dependencies: - babel-runtime "^6.9.0" + babel-runtime "^6.22.0" -babel-plugin-transform-es2015-duplicate-keys@^6.6.0: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.8.0.tgz#fd8f7f7171fc108cc1c70c3164b9f15a81c25f7d" +babel-plugin-transform-es2015-duplicate-keys@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.22.0.tgz#672397031c21610d72dd2bbb0ba9fb6277e1c36b" dependencies: - babel-runtime "^6.0.0" - babel-types "^6.8.0" + babel-runtime "^6.22.0" + babel-types "^6.22.0" -babel-plugin-transform-es2015-for-of@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.18.0.tgz#4c517504db64bf8cfc119a6b8f177211f2028a70" +babel-plugin-transform-es2015-for-of@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.22.0.tgz#180467ad63aeea592a1caeee4bf1c8b3e2616265" dependencies: - babel-runtime "^6.0.0" + babel-runtime "^6.22.0" -babel-plugin-transform-es2015-function-name@^6.9.0: - version "6.9.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.9.0.tgz#8c135b17dbd064e5bba56ec511baaee2fca82719" +babel-plugin-transform-es2015-function-name@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.22.0.tgz#f5fcc8b09093f9a23c76ac3d9e392c3ec4b77104" dependencies: - babel-helper-function-name "^6.8.0" - babel-runtime "^6.9.0" - babel-types "^6.9.0" + babel-helper-function-name "^6.22.0" + babel-runtime "^6.22.0" + babel-types "^6.22.0" -babel-plugin-transform-es2015-literals@^6.3.13: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.8.0.tgz#50aa2e5c7958fc2ab25d74ec117e0cc98f046468" +babel-plugin-transform-es2015-literals@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" dependencies: - babel-runtime "^6.0.0" + babel-runtime "^6.22.0" -babel-plugin-transform-es2015-modules-amd@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.18.0.tgz#49a054cbb762bdf9ae2d8a807076cfade6141e40" +babel-plugin-transform-es2015-modules-amd@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.22.0.tgz#bf69cd34889a41c33d90dfb740e0091ccff52f21" dependencies: - babel-plugin-transform-es2015-modules-commonjs "^6.18.0" - babel-runtime "^6.0.0" - babel-template "^6.8.0" + babel-plugin-transform-es2015-modules-commonjs "^6.22.0" + babel-runtime "^6.22.0" + babel-template "^6.22.0" -babel-plugin-transform-es2015-modules-commonjs@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.18.0.tgz#c15ae5bb11b32a0abdcc98a5837baa4ee8d67bcc" +babel-plugin-transform-es2015-modules-commonjs@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.22.0.tgz#6ca04e22b8e214fb50169730657e7a07dc941145" dependencies: - babel-plugin-transform-strict-mode "^6.18.0" - babel-runtime "^6.0.0" - babel-template "^6.16.0" - babel-types "^6.18.0" + babel-plugin-transform-strict-mode "^6.22.0" + babel-runtime "^6.22.0" + babel-template "^6.22.0" + babel-types "^6.22.0" -babel-plugin-transform-es2015-modules-systemjs@^6.18.0: - version "6.19.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.19.0.tgz#50438136eba74527efa00a5b0fefaf1dc4071da6" +babel-plugin-transform-es2015-modules-systemjs@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.22.0.tgz#810cd0cd025a08383b84236b92c6e31f88e644ad" dependencies: - babel-helper-hoist-variables "^6.18.0" - babel-runtime "^6.11.6" - babel-template "^6.14.0" + babel-helper-hoist-variables "^6.22.0" + babel-runtime "^6.22.0" + babel-template "^6.22.0" -babel-plugin-transform-es2015-modules-umd@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.18.0.tgz#23351770ece5c1f8e83ed67cb1d7992884491e50" +babel-plugin-transform-es2015-modules-umd@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.22.0.tgz#60d0ba3bd23258719c64391d9bf492d648dc0fae" dependencies: - babel-plugin-transform-es2015-modules-amd "^6.18.0" - babel-runtime "^6.0.0" - babel-template "^6.8.0" + babel-plugin-transform-es2015-modules-amd "^6.22.0" + babel-runtime "^6.22.0" + babel-template "^6.22.0" -babel-plugin-transform-es2015-object-super@^6.3.13: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.8.0.tgz#1b858740a5a4400887c23dcff6f4d56eea4a24c5" +babel-plugin-transform-es2015-object-super@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.22.0.tgz#daa60e114a042ea769dd53fe528fc82311eb98fc" dependencies: - babel-helper-replace-supers "^6.8.0" - babel-runtime "^6.0.0" + babel-helper-replace-supers "^6.22.0" + babel-runtime "^6.22.0" -babel-plugin-transform-es2015-parameters@^6.18.0: - version "6.21.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.21.0.tgz#46a655e6864ef984091448cdf024d87b60b2a7d8" +babel-plugin-transform-es2015-parameters@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.22.0.tgz#57076069232019094f27da8c68bb7162fe208dbb" dependencies: - babel-helper-call-delegate "^6.18.0" - babel-helper-get-function-arity "^6.18.0" - babel-runtime "^6.9.0" - babel-template "^6.16.0" - babel-traverse "^6.21.0" - babel-types "^6.21.0" + babel-helper-call-delegate "^6.22.0" + babel-helper-get-function-arity "^6.22.0" + babel-runtime "^6.22.0" + babel-template "^6.22.0" + babel-traverse "^6.22.0" + babel-types "^6.22.0" -babel-plugin-transform-es2015-shorthand-properties@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.18.0.tgz#e2ede3b7df47bf980151926534d1dd0cbea58f43" +babel-plugin-transform-es2015-shorthand-properties@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.22.0.tgz#8ba776e0affaa60bff21e921403b8a652a2ff723" dependencies: - babel-runtime "^6.0.0" - babel-types "^6.18.0" + babel-runtime "^6.22.0" + babel-types "^6.22.0" -babel-plugin-transform-es2015-spread@^6.3.13: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.8.0.tgz#0217f737e3b821fa5a669f187c6ed59205f05e9c" +babel-plugin-transform-es2015-spread@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" dependencies: - babel-runtime "^6.0.0" + babel-runtime "^6.22.0" -babel-plugin-transform-es2015-sticky-regex@^6.3.13: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.8.0.tgz#e73d300a440a35d5c64f5c2a344dc236e3df47be" +babel-plugin-transform-es2015-sticky-regex@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.22.0.tgz#ab316829e866ee3f4b9eb96939757d19a5bc4593" dependencies: - babel-helper-regex "^6.8.0" - babel-runtime "^6.0.0" - babel-types "^6.8.0" + babel-helper-regex "^6.22.0" + babel-runtime "^6.22.0" + babel-types "^6.22.0" -babel-plugin-transform-es2015-template-literals@^6.6.0: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.8.0.tgz#86eb876d0a2c635da4ec048b4f7de9dfc897e66b" +babel-plugin-transform-es2015-template-literals@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" dependencies: - babel-runtime "^6.0.0" + babel-runtime "^6.22.0" -babel-plugin-transform-es2015-typeof-symbol@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.18.0.tgz#0b14c48629c90ff47a0650077f6aa699bee35798" +babel-plugin-transform-es2015-typeof-symbol@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.22.0.tgz#87faf2336d3b6a97f68c4d906b0cd0edeae676e1" dependencies: - babel-runtime "^6.0.0" + babel-runtime "^6.22.0" -babel-plugin-transform-es2015-unicode-regex@^6.3.13: - version "6.11.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.11.0.tgz#6298ceabaad88d50a3f4f392d8de997260f6ef2c" +babel-plugin-transform-es2015-unicode-regex@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.22.0.tgz#8d9cc27e7ee1decfe65454fb986452a04a613d20" dependencies: - babel-helper-regex "^6.8.0" - babel-runtime "^6.0.0" + babel-helper-regex "^6.22.0" + babel-runtime "^6.22.0" regexpu-core "^2.0.0" -babel-plugin-transform-flow-strip-types@^6.21.0: - version "6.21.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.21.0.tgz#2eea3f8b5bb234339b47283feac155cfb237b948" +babel-plugin-transform-flow-strip-types@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz#84cb672935d43714fdc32bce84568d87441cf7cf" dependencies: babel-plugin-syntax-flow "^6.18.0" - babel-runtime "^6.0.0" + babel-runtime "^6.22.0" -babel-plugin-transform-object-rest-spread@^6.20.2: - version "6.20.2" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.20.2.tgz#e816c55bba77b14c16365d87e2ae48c8fd18fc2e" +babel-plugin-transform-object-rest-spread@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.22.0.tgz#1d419b55e68d2e4f64a5ff3373bd67d73c8e83bc" dependencies: babel-plugin-syntax-object-rest-spread "^6.8.0" - babel-runtime "^6.20.0" + babel-runtime "^6.22.0" -babel-plugin-transform-regenerator@^6.16.0: - version "6.21.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.21.0.tgz#75d0c7e7f84f379358f508451c68a2c5fa5a9703" +babel-plugin-transform-regenerator@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.22.0.tgz#65740593a319c44522157538d690b84094617ea6" dependencies: regenerator-transform "0.9.8" -babel-plugin-transform-strict-mode@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.18.0.tgz#df7cf2991fe046f44163dcd110d5ca43bc652b9d" +babel-plugin-transform-strict-mode@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.22.0.tgz#e008df01340fdc87e959da65991b7e05970c8c7c" dependencies: - babel-runtime "^6.0.0" - babel-types "^6.18.0" + babel-runtime "^6.22.0" + babel-types "^6.22.0" -babel-polyfill@^6.16.0: - version "6.20.0" - resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.20.0.tgz#de4a371006139e20990aac0be367d398331204e7" +babel-polyfill@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.22.0.tgz#1ac99ebdcc6ba4db1e2618c387b2084a82154a3b" dependencies: - babel-runtime "^6.20.0" + babel-runtime "^6.22.0" core-js "^2.4.0" regenerator-runtime "^0.10.0" -babel-preset-es2015@^6.16.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.18.0.tgz#b8c70df84ec948c43dcf2bf770e988eb7da88312" - dependencies: - babel-plugin-check-es2015-constants "^6.3.13" - babel-plugin-transform-es2015-arrow-functions "^6.3.13" - babel-plugin-transform-es2015-block-scoped-functions "^6.3.13" - babel-plugin-transform-es2015-block-scoping "^6.18.0" - babel-plugin-transform-es2015-classes "^6.18.0" - babel-plugin-transform-es2015-computed-properties "^6.3.13" - babel-plugin-transform-es2015-destructuring "^6.18.0" - babel-plugin-transform-es2015-duplicate-keys "^6.6.0" - babel-plugin-transform-es2015-for-of "^6.18.0" - babel-plugin-transform-es2015-function-name "^6.9.0" - babel-plugin-transform-es2015-literals "^6.3.13" - babel-plugin-transform-es2015-modules-amd "^6.18.0" - babel-plugin-transform-es2015-modules-commonjs "^6.18.0" - babel-plugin-transform-es2015-modules-systemjs "^6.18.0" - babel-plugin-transform-es2015-modules-umd "^6.18.0" - babel-plugin-transform-es2015-object-super "^6.3.13" - babel-plugin-transform-es2015-parameters "^6.18.0" - babel-plugin-transform-es2015-shorthand-properties "^6.18.0" - babel-plugin-transform-es2015-spread "^6.3.13" - babel-plugin-transform-es2015-sticky-regex "^6.3.13" - babel-plugin-transform-es2015-template-literals "^6.6.0" - babel-plugin-transform-es2015-typeof-symbol "^6.18.0" - babel-plugin-transform-es2015-unicode-regex "^6.3.13" - babel-plugin-transform-regenerator "^6.16.0" +babel-preset-es2015@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.22.0.tgz#af5a98ecb35eb8af764ad8a5a05eb36dc4386835" + dependencies: + babel-plugin-check-es2015-constants "^6.22.0" + babel-plugin-transform-es2015-arrow-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoping "^6.22.0" + babel-plugin-transform-es2015-classes "^6.22.0" + babel-plugin-transform-es2015-computed-properties "^6.22.0" + babel-plugin-transform-es2015-destructuring "^6.22.0" + babel-plugin-transform-es2015-duplicate-keys "^6.22.0" + babel-plugin-transform-es2015-for-of "^6.22.0" + babel-plugin-transform-es2015-function-name "^6.22.0" + babel-plugin-transform-es2015-literals "^6.22.0" + babel-plugin-transform-es2015-modules-amd "^6.22.0" + babel-plugin-transform-es2015-modules-commonjs "^6.22.0" + babel-plugin-transform-es2015-modules-systemjs "^6.22.0" + babel-plugin-transform-es2015-modules-umd "^6.22.0" + babel-plugin-transform-es2015-object-super "^6.22.0" + babel-plugin-transform-es2015-parameters "^6.22.0" + babel-plugin-transform-es2015-shorthand-properties "^6.22.0" + babel-plugin-transform-es2015-spread "^6.22.0" + babel-plugin-transform-es2015-sticky-regex "^6.22.0" + babel-plugin-transform-es2015-template-literals "^6.22.0" + babel-plugin-transform-es2015-typeof-symbol "^6.22.0" + babel-plugin-transform-es2015-unicode-regex "^6.22.0" + babel-plugin-transform-regenerator "^6.22.0" babel-preset-jest@^18.0.0: version "18.0.0" @@ -668,36 +704,43 @@ babel-preset-jest@^18.0.0: dependencies: babel-plugin-jest-hoist "^18.0.0" -babel-register@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.18.0.tgz#892e2e03865078dd90ad2c715111ec4449b32a68" +babel-register@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.22.0.tgz#a61dd83975f9ca4a9e7d6eff3059494cd5ea4c63" dependencies: - babel-core "^6.18.0" - babel-runtime "^6.11.6" + babel-core "^6.22.0" + babel-runtime "^6.22.0" core-js "^2.4.0" home-or-tmp "^2.0.0" lodash "^4.2.0" mkdirp "^0.5.1" source-map-support "^0.4.2" -babel-runtime@^6.0.0, babel-runtime@^6.11.6, babel-runtime@^6.18.0, babel-runtime@^6.20.0, babel-runtime@^6.9.0: +babel-runtime@^6.0.0, babel-runtime@^6.20.0: version "6.20.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.20.0.tgz#87300bdcf4cd770f09bf0048c64204e17806d16f" dependencies: core-js "^2.4.0" regenerator-runtime "^0.10.0" -babel-template@^6.14.0, babel-template@^6.15.0, babel-template@^6.16.0, babel-template@^6.8.0: - version "6.16.0" - resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.16.0.tgz#e149dd1a9f03a35f817ddbc4d0481988e7ebc8ca" +babel-runtime@^6.18.0, babel-runtime@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.22.0.tgz#1cf8b4ac67c77a4ddb0db2ae1f74de52ac4ca611" dependencies: - babel-runtime "^6.9.0" - babel-traverse "^6.16.0" - babel-types "^6.16.0" + core-js "^2.4.0" + regenerator-runtime "^0.10.0" + +babel-template@^6.16.0, babel-template@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.22.0.tgz#403d110905a4626b317a2a1fcb8f3b73204b2edb" + dependencies: + babel-runtime "^6.22.0" + babel-traverse "^6.22.0" + babel-types "^6.22.0" babylon "^6.11.0" lodash "^4.2.0" -babel-traverse@^6.15.0, babel-traverse@^6.16.0, babel-traverse@^6.18.0, babel-traverse@^6.20.0, babel-traverse@^6.21.0: +babel-traverse@^6.15.0: version "6.21.0" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.21.0.tgz#69c6365804f1a4f69eb1213f85b00a818b8c21ad" dependencies: @@ -711,7 +754,21 @@ babel-traverse@^6.15.0, babel-traverse@^6.16.0, babel-traverse@^6.18.0, babel-tr invariant "^2.2.0" lodash "^4.2.0" -babel-types@^6.15.0, babel-types@^6.16.0, babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.20.0, babel-types@^6.21.0, babel-types@^6.8.0, babel-types@^6.9.0: +babel-traverse@^6.18.0, babel-traverse@^6.22.0, babel-traverse@^6.22.1: + version "6.22.1" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.22.1.tgz#3b95cd6b7427d6f1f757704908f2fc9748a5f59f" + dependencies: + babel-code-frame "^6.22.0" + babel-messages "^6.22.0" + babel-runtime "^6.22.0" + babel-types "^6.22.0" + babylon "^6.15.0" + debug "^2.2.0" + globals "^9.0.0" + invariant "^2.2.0" + lodash "^4.2.0" + +babel-types@^6.15.0, babel-types@^6.19.0, babel-types@^6.21.0: version "6.21.0" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.21.0.tgz#314b92168891ef6d3806b7f7a917fdf87c11a4b2" dependencies: @@ -720,10 +777,23 @@ babel-types@^6.15.0, babel-types@^6.16.0, babel-types@^6.18.0, babel-types@^6.19 lodash "^4.2.0" to-fast-properties "^1.0.1" +babel-types@^6.18.0, babel-types@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.22.0.tgz#2a447e8d0ea25d2512409e4175479fd78cc8b1db" + dependencies: + babel-runtime "^6.22.0" + esutils "^2.0.2" + lodash "^4.2.0" + to-fast-properties "^1.0.1" + babylon@^6.11.0, babylon@^6.13.0: version "6.14.1" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.14.1.tgz#956275fab72753ad9b3435d7afe58f8bf0a29815" +babylon@^6.15.0: + version "6.15.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.15.0.tgz#ba65cfa1a80e1759b0e89fb562e27dccae70348e" + balanced-match@^0.4.1: version "0.4.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" @@ -811,9 +881,9 @@ bser@^1.0.2: dependencies: node-int64 "^0.4.0" -bson@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/bson/-/bson-1.0.1.tgz#3a5addb0f2ff88bc3436e708e4bdb8637602d72d" +bson@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/bson/-/bson-1.0.4.tgz#93c10d39eaa5b58415cbc4052f3e53e562b0b72c" buffer-equal-constant-time@1.0.1: version "1.0.1" @@ -889,7 +959,7 @@ chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chokidar@^1.0.0: +chokidar@^1.0.0, chokidar@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.6.1.tgz#2f4447ab5e96e50fb3d789fd90d4c72e0e4c70c2" dependencies: @@ -1102,6 +1172,19 @@ deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" +default-require-extensions@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8" + dependencies: + strip-bom "^2.0.0" + +define-properties@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" + dependencies: + foreach "^2.0.5" + object-keys "^1.0.8" + del@^2.0.2: version "2.2.2" resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" @@ -1180,6 +1263,23 @@ error-ex@^1.2.0: dependencies: is-arrayish "^0.2.1" +es-abstract@^1.5.0: + version "1.6.1" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.6.1.tgz#bb8a2064120abcf928a086ea3d9043114285ec99" + dependencies: + es-to-primitive "^1.1.1" + function-bind "^1.1.0" + is-callable "^1.1.3" + is-regex "^1.0.3" + +es-to-primitive@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" + dependencies: + is-callable "^1.1.1" + is-date-object "^1.0.1" + is-symbol "^1.0.1" + es5-ext@^0.10.7, es5-ext@^0.10.8, es5-ext@~0.10.11, es5-ext@~0.10.2, es5-ext@~0.10.7: version "0.10.12" resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.12.tgz#aa84641d4db76b62abba5e45fd805ecbab140047" @@ -1264,19 +1364,15 @@ escope@^3.6.0: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint-config-airbnb-base@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-8.0.0.tgz#c5e958a469ab8af76aff068b43d784e5afe74ca7" +eslint-config-airbnb-base@^11.0.1: + version "11.0.1" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-11.0.1.tgz#5401dba284c6b7d7c8fb1c2ee19aba018f9dfa21" -eslint-config-airbnb-base@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-9.0.0.tgz#03e135562aa6c4d0d9f1bbda96d901326bf58ad2" - -eslint-config-airbnb@^12.0.0: - version "12.0.0" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-12.0.0.tgz#ab282b756a25f03d04ac264c24d673a08a803270" +eslint-config-airbnb@^14.0.0: + version "14.0.0" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-14.0.0.tgz#bfd87a71102ba3ee19c3733357000b3d5e39790f" dependencies: - eslint-config-airbnb-base "^8.0.0" + eslint-config-airbnb-base "^11.0.1" eslint-import-resolver-node@^0.2.0: version "0.2.3" @@ -1293,9 +1389,9 @@ eslint-module-utils@^2.0.0: debug "2.2.0" pkg-dir "^1.0.0" -eslint-plugin-flowtype@^2.29.1: - version "2.29.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.29.2.tgz#91b4fde0400c4c37ca4440b43bdbc95fc405bea9" +eslint-plugin-flowtype@^2.30.0: + version "2.30.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.30.0.tgz#3054a265f9c8afe3046c3d41b72d32a736f9b4ae" dependencies: lodash "^4.15.0" @@ -1314,24 +1410,25 @@ eslint-plugin-import@^2.0.1: minimatch "^3.0.3" pkg-up "^1.0.0" -eslint-plugin-jsx-a11y@^2.2.3: - version "2.2.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-2.2.3.tgz#4e35cb71b8a7db702ac415c806eb8e8d9ea6c65d" +eslint-plugin-jsx-a11y@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-3.0.2.tgz#9f0eabcafde3d2a2600d96a66adb90d099e841fe" dependencies: damerau-levenshtein "^1.0.0" jsx-ast-utils "^1.0.0" object-assign "^4.0.1" -eslint-plugin-react@^6.3.0: - version "6.8.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-6.8.0.tgz#741ab5438a094532e5ce1bbb935d6832356f492d" +eslint-plugin-react@^6.9.0: + version "6.9.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-6.9.0.tgz#54c2e9906b76f9d10142030bdc34e9d6840a0bb2" dependencies: + array.prototype.find "^2.0.1" doctrine "^1.2.2" jsx-ast-utils "^1.3.4" -eslint@^3.7.1: - version "3.12.2" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.12.2.tgz#6be5a9aa29658252abd7f91e9132bab1f26f3c34" +eslint@^3.13.1: + version "3.13.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.13.1.tgz#564d2646b5efded85df96985332edd91a23bff25" dependencies: babel-code-frame "^6.16.0" chalk "^1.1.3" @@ -1363,7 +1460,7 @@ eslint@^3.7.1: require-uncached "^1.0.2" shelljs "^0.7.5" strip-bom "^3.0.0" - strip-json-comments "~1.0.1" + strip-json-comments "~2.0.1" table "^3.7.8" text-table "~0.2.0" user-home "^2.0.0" @@ -1481,12 +1578,12 @@ filename-regex@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.0.tgz#996e3e80479b98b9897f15a8a58b3d084e926775" -fileset@0.2.x: - version "0.2.1" - resolved "https://registry.yarnpkg.com/fileset/-/fileset-0.2.1.tgz#588ef8973c6623b2a76df465105696b96aac8067" +fileset@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/fileset/-/fileset-2.0.3.tgz#8e7548a96d3cc2327ee5e674168723a333bba2a0" dependencies: - glob "5.x" - minimatch "2.x" + glob "^7.0.3" + minimatch "^3.0.3" fill-range@^2.1.0: version "2.2.3" @@ -1536,6 +1633,10 @@ for-own@^0.1.4: dependencies: for-in "^0.1.5" +foreach@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" + forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" @@ -1588,7 +1689,7 @@ fstream@^1.0.0, fstream@^1.0.2, fstream@~1.0.10: mkdirp ">=0.5 0" rimraf "2" -function-bind@^1.0.2: +function-bind@^1.0.2, function-bind@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771" @@ -1639,16 +1740,6 @@ glob-parent@^2.0.0: dependencies: is-glob "^2.0.0" -glob@5.x, glob@^5.0.5: - version "5.0.15" - resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" - dependencies: - inflight "^1.0.4" - inherits "2" - minimatch "2 || 3" - once "^1.3.0" - path-is-absolute "^1.0.0" - glob@^7.0.0, glob@^7.0.3, glob@^7.0.5: version "7.1.1" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" @@ -1863,12 +1954,20 @@ is-builtin-module@^1.0.0: dependencies: builtin-modules "^1.0.0" +is-callable@^1.1.1, is-callable@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" + is-ci@^1.0.9: version "1.0.10" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.0.10.tgz#f739336b2632365061a9d48270cd56ae3369318e" dependencies: ci-info "^1.0.0" +is-date-object@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" + is-dotfile@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.2.tgz#2c132383f39199f8edc268ca01b9b007d205cc4d" @@ -1952,12 +2051,20 @@ is-property@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" +is-regex@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.3.tgz#0d55182bddf9f2fde278220aec3a75642c908637" + is-resolvable@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.0.0.tgz#8df57c61ea2e3c501408d100fb013cf8d6e0cc62" dependencies: tryit "^1.0.1" +is-symbol@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" + is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" @@ -1988,34 +2095,33 @@ isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" -istanbul-api@^1.0.0-aplha.10: - version "1.0.0-aplha.10" - resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.0.0-aplha.10.tgz#902edf5cf5404e0eba7e00ef46408488a0d3e337" +istanbul-api@^1.1.0-alpha.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.1.1.tgz#d36e2f1560d1a43ce304c4ff7338182de61c8f73" dependencies: - async "1.x" - clone "^1.0.2" - fileset "0.2.x" - istanbul-lib-coverage "^1.0.0-alpha" - istanbul-lib-hook "^1.0.0-alpha" - istanbul-lib-instrument "^1.0.0-alpha" - istanbul-lib-report "^1.0.0-alpha" - istanbul-lib-source-maps "^1.0.0-alpha" - istanbul-reports "^1.0.0-alpha" - js-yaml "3.x" - mkdirp "0.5.x" - once "1.x" + async "^2.1.4" + fileset "^2.0.2" + istanbul-lib-coverage "^1.0.0" + istanbul-lib-hook "^1.0.0" + istanbul-lib-instrument "^1.3.0" + istanbul-lib-report "^1.0.0-alpha.3" + istanbul-lib-source-maps "^1.1.0" + istanbul-reports "^1.0.0" + js-yaml "^3.7.0" + mkdirp "^0.5.1" + once "^1.4.0" istanbul-lib-coverage@^1.0.0, istanbul-lib-coverage@^1.0.0-alpha, istanbul-lib-coverage@^1.0.0-alpha.0: version "1.0.0" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.0.0.tgz#c3f9b6d226da12424064cce87fce0fb57fdfa7a2" -istanbul-lib-hook@^1.0.0-alpha: - version "1.0.0-alpha.4" - resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.0.0-alpha.4.tgz#8c5bb9f6fbd8526e0ae6cf639af28266906b938f" +istanbul-lib-hook@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.0.0.tgz#fc5367ee27f59268e8f060b0c7aaf051d9c425c5" dependencies: - append-transform "^0.3.0" + append-transform "^0.4.0" -istanbul-lib-instrument@^1.0.0-alpha, istanbul-lib-instrument@^1.1.1, istanbul-lib-instrument@^1.1.4: +istanbul-lib-instrument@^1.1.1, istanbul-lib-instrument@^1.1.4, istanbul-lib-instrument@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.3.0.tgz#19f0a973397454989b98330333063a5b56df0e58" dependencies: @@ -2027,7 +2133,7 @@ istanbul-lib-instrument@^1.0.0-alpha, istanbul-lib-instrument@^1.1.1, istanbul-l istanbul-lib-coverage "^1.0.0" semver "^5.3.0" -istanbul-lib-report@^1.0.0-alpha: +istanbul-lib-report@^1.0.0-alpha.3: version "1.0.0-alpha.3" resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.0.0-alpha.3.tgz#32d5f6ec7f33ca3a602209e278b2e6ff143498af" dependencies: @@ -2038,7 +2144,7 @@ istanbul-lib-report@^1.0.0-alpha: rimraf "^2.4.3" supports-color "^3.1.2" -istanbul-lib-source-maps@^1.0.0-alpha: +istanbul-lib-source-maps@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.1.0.tgz#9d429218f35b823560ea300a96ff0c3bbdab785f" dependencies: @@ -2047,7 +2153,7 @@ istanbul-lib-source-maps@^1.0.0-alpha: rimraf "^2.4.4" source-map "^0.5.3" -istanbul-reports@^1.0.0-alpha: +istanbul-reports@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.0.0.tgz#24b4eb2b1d29d50f103b369bd422f6e640aa0777" dependencies: @@ -2057,30 +2163,30 @@ jest-changed-files@^17.0.2: version "17.0.2" resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-17.0.2.tgz#f5657758736996f590a51b87e5c9369d904ba7b7" -jest-cli@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-18.0.0.tgz#11d141f5e9158d4f02c5c303815b5280f6887c55" +jest-cli@^18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-18.1.0.tgz#5ead36ecad420817c2c9baa2aa7574f63257b3d6" dependencies: ansi-escapes "^1.4.0" callsites "^2.0.0" chalk "^1.1.1" graceful-fs "^4.1.6" is-ci "^1.0.9" - istanbul-api "^1.0.0-aplha.10" + istanbul-api "^1.1.0-alpha.1" istanbul-lib-coverage "^1.0.0" istanbul-lib-instrument "^1.1.1" jest-changed-files "^17.0.2" - jest-config "^18.0.0" - jest-environment-jsdom "^18.0.0" + jest-config "^18.1.0" + jest-environment-jsdom "^18.1.0" jest-file-exists "^17.0.0" - jest-haste-map "^18.0.0" - jest-jasmine2 "^18.0.0" + jest-haste-map "^18.1.0" + jest-jasmine2 "^18.1.0" jest-mock "^18.0.0" - jest-resolve "^18.0.0" - jest-resolve-dependencies "^18.0.0" - jest-runtime "^18.0.0" - jest-snapshot "^18.0.0" - jest-util "^18.0.0" + jest-resolve "^18.1.0" + jest-resolve-dependencies "^18.1.0" + jest-runtime "^18.1.0" + jest-snapshot "^18.1.0" + jest-util "^18.1.0" json-stable-stringify "^1.0.0" node-notifier "^4.6.1" sane "~1.4.1" @@ -2090,136 +2196,137 @@ jest-cli@^18.0.0: worker-farm "^1.3.1" yargs "^6.3.0" -jest-config@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-18.0.0.tgz#21473ab68fef2fa79760d05419859b3c320e55e9" +jest-config@^18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-18.1.0.tgz#6111740a6d48aab86ff5a9e6ab0b98bd993b6ff4" dependencies: chalk "^1.1.1" - jest-environment-jsdom "^18.0.0" - jest-environment-node "^18.0.0" - jest-jasmine2 "^18.0.0" + jest-environment-jsdom "^18.1.0" + jest-environment-node "^18.1.0" + jest-jasmine2 "^18.1.0" jest-mock "^18.0.0" - jest-resolve "^18.0.0" - jest-util "^18.0.0" + jest-resolve "^18.1.0" + jest-util "^18.1.0" json-stable-stringify "^1.0.0" -jest-diff@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-18.0.0.tgz#f24b6f8bedaae425548511ab45edbfb9fee930b7" +jest-diff@^18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-18.1.0.tgz#4ff79e74dd988c139195b365dc65d87f606f4803" dependencies: chalk "^1.1.3" diff "^3.0.0" - jest-matcher-utils "^18.0.0" - pretty-format "^18.0.0" + jest-matcher-utils "^18.1.0" + pretty-format "^18.1.0" -jest-environment-jsdom@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-18.0.0.tgz#7341266285abce09f13f60e9b49de899802b76c5" +jest-environment-jsdom@^18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-18.1.0.tgz#18b42f0c4ea2bae9f36cab3639b1e8f8c384e24e" dependencies: jest-mock "^18.0.0" - jest-util "^18.0.0" - jsdom "^9.8.1" + jest-util "^18.1.0" + jsdom "^9.9.1" -jest-environment-node@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-18.0.0.tgz#6f4947b324d6b4e17df20b1998f532c161a2821d" +jest-environment-node@^18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-18.1.0.tgz#4d6797572c8dda99acf5fae696eb62945547c779" dependencies: jest-mock "^18.0.0" - jest-util "^18.0.0" + jest-util "^18.1.0" jest-file-exists@^17.0.0: version "17.0.0" resolved "https://registry.yarnpkg.com/jest-file-exists/-/jest-file-exists-17.0.0.tgz#7f63eb73a1c43a13f461be261768b45af2cdd169" -jest-haste-map@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-18.0.0.tgz#707d3b5ae3bcbda971c39e8b911d20ad8502c748" +jest-haste-map@^18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-18.1.0.tgz#06839c74b770a40c1a106968851df8d281c08375" dependencies: fb-watchman "^1.9.0" graceful-fs "^4.1.6" - multimatch "^2.1.0" + micromatch "^2.3.11" sane "~1.4.1" worker-farm "^1.3.1" -jest-jasmine2@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-18.0.0.tgz#05a35ee8cf61dd6d6d04826aa0e5915a2167a877" +jest-jasmine2@^18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-18.1.0.tgz#094e104c2c189708766c77263bb2aecb5860a80b" dependencies: graceful-fs "^4.1.6" - jest-matcher-utils "^18.0.0" - jest-matchers "^18.0.0" - jest-snapshot "^18.0.0" - jest-util "^18.0.0" + jest-matcher-utils "^18.1.0" + jest-matchers "^18.1.0" + jest-snapshot "^18.1.0" + jest-util "^18.1.0" -jest-matcher-utils@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-18.0.0.tgz#74ad046aeb9414094fc6cd0d313847e4311f8538" +jest-matcher-utils@^18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-18.1.0.tgz#1ac4651955ee2a60cef1e7fcc98cdfd773c0f932" dependencies: chalk "^1.1.3" - pretty-format "^18.0.0" + pretty-format "^18.1.0" -jest-matchers@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/jest-matchers/-/jest-matchers-18.0.0.tgz#d081e2dfd556a0c9f11c7fdc26dc1702fad50189" +jest-matchers@^18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/jest-matchers/-/jest-matchers-18.1.0.tgz#0341484bf87a1fd0bac0a4d2c899e2b77a3f1ead" dependencies: - jest-diff "^18.0.0" - jest-matcher-utils "^18.0.0" - jest-util "^18.0.0" + jest-diff "^18.1.0" + jest-matcher-utils "^18.1.0" + jest-util "^18.1.0" + pretty-format "^18.1.0" jest-mock@^18.0.0: version "18.0.0" resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-18.0.0.tgz#5c248846ea33fa558b526f5312ab4a6765e489b3" -jest-resolve-dependencies@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-18.0.0.tgz#a2980a634ae2554d8ed5922686883a2988979b70" +jest-resolve-dependencies@^18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-18.1.0.tgz#8134fb5caf59c9ed842fe0152ab01c52711f1bbb" dependencies: jest-file-exists "^17.0.0" - jest-resolve "^18.0.0" + jest-resolve "^18.1.0" -jest-resolve@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-18.0.0.tgz#a47b0b939d8c53fc79e907db0a5110384432f3c8" +jest-resolve@^18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-18.1.0.tgz#6800accb536658c906cd5e29de412b1ab9ac249b" dependencies: browser-resolve "^1.11.2" jest-file-exists "^17.0.0" - jest-haste-map "^18.0.0" - resolve "^1.1.6" + jest-haste-map "^18.1.0" + resolve "^1.2.0" -jest-runtime@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-18.0.0.tgz#fff982dffe061b89bbea5c3b6f4d3fbf7b3cf56e" +jest-runtime@^18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-18.1.0.tgz#3abfd687175b21fc3b85a2b8064399e997859922" dependencies: babel-core "^6.0.0" babel-jest "^18.0.0" babel-plugin-istanbul "^3.0.0" chalk "^1.1.3" graceful-fs "^4.1.6" - jest-config "^18.0.0" + jest-config "^18.1.0" jest-file-exists "^17.0.0" - jest-haste-map "^18.0.0" + jest-haste-map "^18.1.0" jest-mock "^18.0.0" - jest-resolve "^18.0.0" - jest-snapshot "^18.0.0" - jest-util "^18.0.0" + jest-resolve "^18.1.0" + jest-snapshot "^18.1.0" + jest-util "^18.1.0" json-stable-stringify "^1.0.0" - multimatch "^2.1.0" + micromatch "^2.3.11" yargs "^6.3.0" -jest-snapshot@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-18.0.0.tgz#3602c6b13cbf5788fd101bf0d73fc76104b88486" +jest-snapshot@^18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-18.1.0.tgz#55b96d2ee639c9bce76f87f2a3fd40b71c7a5916" dependencies: - jest-diff "^18.0.0" + jest-diff "^18.1.0" jest-file-exists "^17.0.0" - jest-matcher-utils "^18.0.0" - jest-util "^18.0.0" + jest-matcher-utils "^18.1.0" + jest-util "^18.1.0" natural-compare "^1.4.0" - pretty-format "^18.0.0" + pretty-format "^18.1.0" -jest-util@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-18.0.0.tgz#4ef7c397ad7e1ac8f9c63a482c12a31df5e376a7" +jest-util@^18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-18.1.0.tgz#3a99c32114ab17f84be094382527006e6d4bfc6a" dependencies: chalk "^1.1.1" diff "^3.0.0" @@ -2228,11 +2335,11 @@ jest-util@^18.0.0: jest-mock "^18.0.0" mkdirp "^0.5.1" -jest@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/jest/-/jest-18.0.0.tgz#ef12f70befe0fcb30f1c61c0ae58748706267d4b" +jest@^18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-18.1.0.tgz#bcebf1e203dee5c2ad2091c805300a343d9e6c7d" dependencies: - jest-cli "^18.0.0" + jest-cli "^18.1.0" jodid25519@^1.0.0: version "1.0.2" @@ -2253,18 +2360,29 @@ js-tokens@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-2.0.0.tgz#79903f5563ee778cc1162e6dcf1a0027c97f9cb5" -js-yaml@3.6.1, js-yaml@3.x, js-yaml@^3.5.1: +js-tokens@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.0.tgz#a2f2a969caae142fb3cd56228358c89366957bd1" + +js-yaml@3.6.1, js-yaml@^3.5.1: version "3.6.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.6.1.tgz#6e5fe67d8b205ce4d22fad05b7781e8dadcc4b30" dependencies: argparse "^1.0.7" esprima "^2.6.0" +js-yaml@^3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" + dependencies: + argparse "^1.0.7" + esprima "^2.6.0" + jsbn@~0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.0.tgz#650987da0dd74f4ebf5a11377a2aa2d273e97dfd" -jsdom@^9.8.1: +jsdom@^9.9.1: version "9.9.1" resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-9.9.1.tgz#84f3972ad394ab963233af8725211bce4d01bfd5" dependencies: @@ -2496,7 +2614,11 @@ lodash.pickby@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.pickby/-/lodash.pickby-4.6.0.tgz#7dea21d8c18d7703a27c704c15d3b84a67e33aff" -lodash@^4.0.0, lodash@^4.15.0, lodash@^4.16.4, lodash@^4.17.3, lodash@^4.2.0, lodash@^4.3.0: +lodash@^4.0.0, lodash@^4.14.0, lodash@^4.17.4, lodash@^4.3.0: + version "4.17.4" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" + +lodash@^4.15.0, lodash@^4.16.4, lodash@^4.2.0: version "4.17.3" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.3.tgz#557ed7d2a9438cac5fd5a43043ca60cb455e01f7" @@ -2577,18 +2699,12 @@ mime-types@^2.1.11, mime-types@^2.1.12, mime-types@~2.1.7: dependencies: mime-db "~1.25.0" -"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3: +minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" dependencies: brace-expansion "^1.0.0" -minimatch@2.x: - version "2.0.10" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7" - dependencies: - brace-expansion "^1.0.0" - minimist@0.0.8, minimist@~0.0.1: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" @@ -2597,7 +2713,7 @@ minimist@1.2.0, minimist@^1.1.1, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" -mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: +"mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: @@ -2607,34 +2723,25 @@ moment@2.x.x: version "2.17.1" resolved "https://registry.yarnpkg.com/moment/-/moment-2.17.1.tgz#fed9506063f36b10f066c8b59a144d7faebe1d82" -mongodb-core@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/mongodb-core/-/mongodb-core-2.1.2.tgz#a11db773d34819cbeb97751241827137ab535aab" +mongodb-core@2.1.6: + version "2.1.6" + resolved "https://registry.yarnpkg.com/mongodb-core/-/mongodb-core-2.1.6.tgz#9d179e7487767c58993bb7c8d6685d035c346a42" dependencies: - bson "~1.0.1" + bson "~1.0.4" require_optional "~1.0.0" -mongodb@^2.2.16: - version "2.2.16" - resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-2.2.16.tgz#e32ba91cf9e29f371fb38ba0c4a71c3b1f5fae77" +mongodb@^2.2.21: + version "2.2.21" + resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-2.2.21.tgz#f7ee56489600e0ac8024c062c0857ac04ddb5f48" dependencies: es6-promise "3.2.1" - mongodb-core "2.1.2" + mongodb-core "2.1.6" readable-stream "2.1.5" ms@0.7.1, ms@^0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" -multimatch@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-2.1.0.tgz#9c7906a22fb4c02919e2f5f75161b4cdbd4b2a2b" - dependencies: - array-differ "^1.0.0" - array-union "^1.0.1" - arrify "^1.0.0" - minimatch "^3.0.0" - mute-stream@0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" @@ -2759,6 +2866,10 @@ object-assign@^4.0.1, object-assign@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" +object-keys@^1.0.8: + version "1.0.11" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" + object.omit@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" @@ -2766,15 +2877,15 @@ object.omit@^2.0.0: for-own "^0.1.4" is-extendable "^0.1.1" -once@1.x, once@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" +once@^1.3.0, once@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20" dependencies: wrappy "1" -once@~1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20" +once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" dependencies: wrappy "1" @@ -2921,9 +3032,9 @@ preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" -pretty-format@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-18.0.0.tgz#5f45c59fe2ed6749d46765429679670b08b21137" +pretty-format@^18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-18.1.0.tgz#fb65a86f7a7f9194963eee91865c1bcf1039e284" dependencies: ansi-styles "^2.2.1" @@ -3206,7 +3317,7 @@ resolve@1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" -resolve@^1.1.6: +resolve@^1.1.6, resolve@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.2.0.tgz#9589c3f2f6149d1417a40becc1663db6ec6bc26c" @@ -3431,10 +3542,14 @@ strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" -strip-json-comments@~1.0.1, strip-json-comments@~1.0.4: +strip-json-comments@~1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91" +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + supports-color@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-0.2.0.tgz#d92de2694eb3f67323973d7ae3d8b55b4c22190a" From 1e74631da14309ace64f83ac86c9001682a25862 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pradel=20Le=CC=81o?= Date: Tue, 31 Jan 2017 16:33:18 +0100 Subject: [PATCH 028/128] setProfile and compile with babel --- packages/accounts-mongo/package.json | 10 +++++----- packages/accounts-mongo/src/index.js | 14 ++++++++++++++ packages/accounts-mongo/src/index.spec.js | 18 ++++++++++++++++++ 3 files changed, 37 insertions(+), 5 deletions(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 2446675e1..3a26a4cbd 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -4,8 +4,8 @@ "description": "MongoDB adaptor for accounts", "main": "lib/index.js", "scripts": { - "compile": "webpack -p --config --progress", - "compile:watch": "yarn compile -- --watch", + "start": "webpack -p --config --progress --watch", + "compile": "babel ./src --out-dir ./lib", "flow": "flow; test $? -eq 0 -o $? -eq 2", "flow:check": "flow check", "prepare": "yarn compile", @@ -40,14 +40,14 @@ "babel-plugin-transform-object-rest-spread": "^6.22.0", "babel-preset-es2015": "^6.22.0", "coveralls": "^2.11.14", - "eslint": "^3.13.1", + "eslint": "^3.14.1", "eslint-config-airbnb": "^14.0.0", "eslint-config-airbnb-base": "^11.0.1", "eslint-plugin-flowtype": "^2.30.0", "eslint-plugin-import": "^2.0.1", "eslint-plugin-jsx-a11y": "^3.0.2", "eslint-plugin-react": "^6.9.0", - "flow-bin": "^0.37.4", + "flow-bin": "^0.38.0", "jest": "^18.1.0", "webpack": "^1.14.0", "webpack-node-externals": "^1.5.4" @@ -56,6 +56,6 @@ "@accounts/common": "^0.0.2", "@accounts/server": "^0.0.2", "lodash": "^4.17.4", - "mongodb": "^2.2.21" + "mongodb": "^2.2.22" } } diff --git a/packages/accounts-mongo/src/index.js b/packages/accounts-mongo/src/index.js index a1e158244..4a72fa9eb 100644 --- a/packages/accounts-mongo/src/index.js +++ b/packages/accounts-mongo/src/index.js @@ -149,6 +149,20 @@ class Mongo { } } + async setProfile(userId: string, profile: Object): Promise { + const ret = await this.collection.update({ _id: userId }, { + $set: { + profile, + [this.options.timestamps.updatedAt]: Date.now(), + }, + }); + if (ret.result.nModified === 0) { + throw new Error('User not found'); + } + const user = await this.findUserById(userId); + return user && user.profile; + } + async createSession(userId: string, ip: string, userAgent: string): Promise { const ret = await this.sessionCollection.insertOne({ userId, diff --git a/packages/accounts-mongo/src/index.spec.js b/packages/accounts-mongo/src/index.spec.js index 1be1ddab6..d0cc89a7c 100644 --- a/packages/accounts-mongo/src/index.spec.js +++ b/packages/accounts-mongo/src/index.spec.js @@ -291,6 +291,24 @@ describe('Mongo', () => { }); }); + describe('setProfile', () => { + it('should throw if user is not found', async () => { + try { + await mongo.setProfile('unknowuser', {}); + throw new Error(); + } catch (err) { + expect(err.message).toEqual('User not found'); + } + }); + + it('should change profile', async () => { + const userId = await mongo.createUser(user); + await delay(10); + const retUser = await mongo.setProfile(userId, { username: 'toto' }); + expect(retUser.username).toEqual('toto'); + }); + }); + describe('createSession', () => { it('should create session', async () => { const sessionId = await mongo.createSession(session.userId, session.ip, session.userAgent); From c525f0739aa2589f1fc3b458442601e10e9d8c3a Mon Sep 17 00:00:00 2001 From: Tim Mikeladze Date: Tue, 31 Jan 2017 10:02:49 -0800 Subject: [PATCH 029/128] Merge pull request #8 from js-accounts/fix-profile Don't throw on setProfile --- packages/accounts-mongo/src/index.js | 5 +---- packages/accounts-mongo/src/index.spec.js | 26 +++++++++-------------- 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/packages/accounts-mongo/src/index.js b/packages/accounts-mongo/src/index.js index 4a72fa9eb..5fbb6a11a 100644 --- a/packages/accounts-mongo/src/index.js +++ b/packages/accounts-mongo/src/index.js @@ -150,15 +150,12 @@ class Mongo { } async setProfile(userId: string, profile: Object): Promise { - const ret = await this.collection.update({ _id: userId }, { + await this.collection.update({ _id: userId }, { $set: { profile, [this.options.timestamps.updatedAt]: Date.now(), }, }); - if (ret.result.nModified === 0) { - throw new Error('User not found'); - } const user = await this.findUserById(userId); return user && user.profile; } diff --git a/packages/accounts-mongo/src/index.spec.js b/packages/accounts-mongo/src/index.spec.js index d0cc89a7c..53a7d9133 100644 --- a/packages/accounts-mongo/src/index.spec.js +++ b/packages/accounts-mongo/src/index.spec.js @@ -15,19 +15,22 @@ const session = { userAgent: 'user agent', }; +function dropDatabase(cb) { + db.dropDatabase((err) => { + if (err) return cb(err); + return cb(); + }); +} + function createConnection(cb) { const url = 'mongodb://localhost:27017/accounts-mongo-tests'; mongodb.MongoClient.connect(url, (err, dbArg) => { db = dbArg; mongo = new Mongo(db); - cb(err); - }); -} - -function dropDatabase(cb) { - db.dropDatabase((err) => { if (err) return cb(err); - return cb(); + return dropDatabase((error) => { + cb(error); + }); }); } @@ -292,15 +295,6 @@ describe('Mongo', () => { }); describe('setProfile', () => { - it('should throw if user is not found', async () => { - try { - await mongo.setProfile('unknowuser', {}); - throw new Error(); - } catch (err) { - expect(err.message).toEqual('User not found'); - } - }); - it('should change profile', async () => { const userId = await mongo.createUser(user); await delay(10); From cda17abd0538ebf14b359c69b25e2a74eae6db65 Mon Sep 17 00:00:00 2001 From: Tim Mikeladze Date: Thu, 2 Feb 2017 13:58:36 -0800 Subject: [PATCH 030/128] Update yarn lock --- packages/accounts-mongo/yarn.lock | 100 ++++++------------------------ 1 file changed, 20 insertions(+), 80 deletions(-) diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index e02874a9c..cb020ae54 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -239,15 +239,7 @@ babel-cli@^6.22.2: optionalDependencies: chokidar "^1.6.1" -babel-code-frame@^6.16.0, babel-code-frame@^6.20.0: - version "6.20.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.20.0.tgz#b968f839090f9a8bc6d41938fb96cb84f7387b26" - dependencies: - chalk "^1.1.0" - esutils "^2.0.2" - js-tokens "^2.0.0" - -babel-code-frame@^6.22.0: +babel-code-frame@^6.16.0, babel-code-frame@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" dependencies: @@ -289,19 +281,7 @@ babel-eslint@^7.0.0: babylon "^6.13.0" lodash.pickby "^4.6.0" -babel-generator@^6.18.0: - version "6.21.0" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.21.0.tgz#605f1269c489a1c75deeca7ea16d43d4656c8494" - dependencies: - babel-messages "^6.8.0" - babel-runtime "^6.20.0" - babel-types "^6.21.0" - detect-indent "^4.0.0" - jsesc "^1.3.0" - lodash "^4.2.0" - source-map "^0.5.0" - -babel-generator@^6.22.0: +babel-generator@^6.18.0, babel-generator@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.22.0.tgz#d642bf4961911a8adc7c692b0c9297f325cda805" dependencies: @@ -421,12 +401,6 @@ babel-messages@^6.22.0: dependencies: babel-runtime "^6.22.0" -babel-messages@^6.8.0: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.8.0.tgz#bf504736ca967e6d65ef0adb5a2a5f947c8e0eb9" - dependencies: - babel-runtime "^6.0.0" - babel-plugin-check-es2015-constants@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" @@ -716,13 +690,6 @@ babel-register@^6.22.0: mkdirp "^0.5.1" source-map-support "^0.4.2" -babel-runtime@^6.0.0, babel-runtime@^6.20.0: - version "6.20.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.20.0.tgz#87300bdcf4cd770f09bf0048c64204e17806d16f" - dependencies: - core-js "^2.4.0" - regenerator-runtime "^0.10.0" - babel-runtime@^6.18.0, babel-runtime@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.22.0.tgz#1cf8b4ac67c77a4ddb0db2ae1f74de52ac4ca611" @@ -740,21 +707,7 @@ babel-template@^6.16.0, babel-template@^6.22.0: babylon "^6.11.0" lodash "^4.2.0" -babel-traverse@^6.15.0: - version "6.21.0" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.21.0.tgz#69c6365804f1a4f69eb1213f85b00a818b8c21ad" - dependencies: - babel-code-frame "^6.20.0" - babel-messages "^6.8.0" - babel-runtime "^6.20.0" - babel-types "^6.21.0" - babylon "^6.11.0" - debug "^2.2.0" - globals "^9.0.0" - invariant "^2.2.0" - lodash "^4.2.0" - -babel-traverse@^6.18.0, babel-traverse@^6.22.0, babel-traverse@^6.22.1: +babel-traverse@^6.15.0, babel-traverse@^6.18.0, babel-traverse@^6.22.0, babel-traverse@^6.22.1: version "6.22.1" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.22.1.tgz#3b95cd6b7427d6f1f757704908f2fc9748a5f59f" dependencies: @@ -768,16 +721,7 @@ babel-traverse@^6.18.0, babel-traverse@^6.22.0, babel-traverse@^6.22.1: invariant "^2.2.0" lodash "^4.2.0" -babel-types@^6.15.0, babel-types@^6.19.0, babel-types@^6.21.0: - version "6.21.0" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.21.0.tgz#314b92168891ef6d3806b7f7a917fdf87c11a4b2" - dependencies: - babel-runtime "^6.20.0" - esutils "^2.0.2" - lodash "^4.2.0" - to-fast-properties "^1.0.1" - -babel-types@^6.18.0, babel-types@^6.22.0: +babel-types@^6.15.0, babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.22.0.tgz#2a447e8d0ea25d2512409e4175479fd78cc8b1db" dependencies: @@ -1426,9 +1370,9 @@ eslint-plugin-react@^6.9.0: doctrine "^1.2.2" jsx-ast-utils "^1.3.4" -eslint@^3.13.1: - version "3.13.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.13.1.tgz#564d2646b5efded85df96985332edd91a23bff25" +eslint@^3.14.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.14.1.tgz#8a62175f2255109494747a1b25128d97b8eb3d97" dependencies: babel-code-frame "^6.16.0" chalk "^1.1.3" @@ -1619,9 +1563,9 @@ flat-cache@^1.2.1: graceful-fs "^4.1.2" write "^0.2.1" -flow-bin@^0.37.4: - version "0.37.4" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.37.4.tgz#3d8da2ef746e80e730d166e09040f4198969b76b" +flow-bin@^0.38.0: + version "0.38.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.38.0.tgz#3ae096d401c969cc8b5798253fb82381e2d0237a" for-in@^0.1.5: version "0.1.6" @@ -2364,14 +2308,14 @@ js-tokens@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.0.tgz#a2f2a969caae142fb3cd56228358c89366957bd1" -js-yaml@3.6.1, js-yaml@^3.5.1: +js-yaml@3.6.1: version "3.6.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.6.1.tgz#6e5fe67d8b205ce4d22fad05b7781e8dadcc4b30" dependencies: argparse "^1.0.7" esprima "^2.6.0" -js-yaml@^3.7.0: +js-yaml@^3.5.1, js-yaml@^3.7.0: version "3.7.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" dependencies: @@ -2614,14 +2558,10 @@ lodash.pickby@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.pickby/-/lodash.pickby-4.6.0.tgz#7dea21d8c18d7703a27c704c15d3b84a67e33aff" -lodash@^4.0.0, lodash@^4.14.0, lodash@^4.17.4, lodash@^4.3.0: +lodash@^4.0.0, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.16.4, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.3.0: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" -lodash@^4.15.0, lodash@^4.16.4, lodash@^4.2.0: - version "4.17.3" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.3.tgz#557ed7d2a9438cac5fd5a43043ca60cb455e01f7" - log-driver@1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.5.tgz#7ae4ec257302fd790d557cb10c97100d857b0056" @@ -2723,19 +2663,19 @@ moment@2.x.x: version "2.17.1" resolved "https://registry.yarnpkg.com/moment/-/moment-2.17.1.tgz#fed9506063f36b10f066c8b59a144d7faebe1d82" -mongodb-core@2.1.6: - version "2.1.6" - resolved "https://registry.yarnpkg.com/mongodb-core/-/mongodb-core-2.1.6.tgz#9d179e7487767c58993bb7c8d6685d035c346a42" +mongodb-core@2.1.7: + version "2.1.7" + resolved "https://registry.yarnpkg.com/mongodb-core/-/mongodb-core-2.1.7.tgz#6a27909b98142ef2508d924c274969008954fa29" dependencies: bson "~1.0.4" require_optional "~1.0.0" -mongodb@^2.2.21: - version "2.2.21" - resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-2.2.21.tgz#f7ee56489600e0ac8024c062c0857ac04ddb5f48" +mongodb@^2.2.22: + version "2.2.22" + resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-2.2.22.tgz#d67c588fc08f922db19754b1d2e03e2d7d1319fb" dependencies: es6-promise "3.2.1" - mongodb-core "2.1.6" + mongodb-core "2.1.7" readable-stream "2.1.5" ms@0.7.1, ms@^0.7.1: From 634d8693453800ac27d5b7237aeb8a0e7b2ff530 Mon Sep 17 00:00:00 2001 From: Tim Mikeladze Date: Thu, 2 Feb 2017 13:59:39 -0800 Subject: [PATCH 031/128] 0.0.1 --- packages/accounts-mongo/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 3a26a4cbd..be61cfa45 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -1,6 +1,6 @@ { "name": "@accounts/mongo", - "version": "0.0.0", + "version": "0.0.1", "description": "MongoDB adaptor for accounts", "main": "lib/index.js", "scripts": { From 86a353f1822a4f507c427b660523d49f8e9b7b5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pradel=20Le=CC=81o?= Date: Fri, 3 Feb 2017 12:04:46 +0100 Subject: [PATCH 032/128] 0.0.2 --- packages/accounts-mongo/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index be61cfa45..1547d40ca 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -1,6 +1,6 @@ { "name": "@accounts/mongo", - "version": "0.0.1", + "version": "0.0.2", "description": "MongoDB adaptor for accounts", "main": "lib/index.js", "scripts": { From f18ba72109a366c4c5de71609dc5fd7b278b5dc9 Mon Sep 17 00:00:00 2001 From: Tim Mikeladze Date: Sat, 4 Feb 2017 09:28:49 -0800 Subject: [PATCH 033/128] Merge pull request #9 from js-accounts/add-missing-profile Fix missing profile to user --- packages/accounts-mongo/src/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/accounts-mongo/src/index.js b/packages/accounts-mongo/src/index.js index 5fbb6a11a..1d886d381 100644 --- a/packages/accounts-mongo/src/index.js +++ b/packages/accounts-mongo/src/index.js @@ -64,6 +64,7 @@ class Mongo { async createUser(options: CreateUserType): Promise { const user: MongoUserObjectType = { services: {}, + profile: {}, [this.options.timestamps.createdAt]: Date.now(), [this.options.timestamps.updatedAt]: Date.now(), }; @@ -76,6 +77,9 @@ class Mongo { if (options.email) { user.emails = [{ address: options.email.toLowerCase(), verified: false }]; } + if (options.profile) { + user.profile = options.profile; + } const ret = await this.collection.insertOne(user); return ret.ops[0]._id; } From 1e027aad0e3f9c7c3f2af1ad1165223c18184a5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Pradel?= Date: Tue, 7 Feb 2017 11:02:36 +0100 Subject: [PATCH 034/128] Merge pull request #11 from dotansimha/bugfix/object-id bugfix(object-id): added conversion to ObjectID when needed --- packages/accounts-mongo/src/index.js | 29 +++++++++++++++-------- packages/accounts-mongo/src/index.spec.js | 29 +++++++++++++++++------ 2 files changed, 41 insertions(+), 17 deletions(-) diff --git a/packages/accounts-mongo/src/index.js b/packages/accounts-mongo/src/index.js index 1d886d381..d337af378 100644 --- a/packages/accounts-mongo/src/index.js +++ b/packages/accounts-mongo/src/index.js @@ -7,6 +7,7 @@ import type { UserObjectType, SessionType, } from '@accounts/common'; +import { ObjectID } from 'mongodb'; export type MongoOptionsType = { collectionName: string, @@ -31,6 +32,14 @@ export type MongoUserObjectType = { }], }; +const toMongoID = (objectId) => { + if (typeof objectId === 'string') { + return new ObjectID(objectId); + } + + return objectId; +}; + class Mongo { options: MongoOptionsType; // TODO definition for mongodb connection object @@ -85,7 +94,7 @@ class Mongo { } findUserById(userId: string): Promise { - return this.collection.findOne({ _id: userId }); + return this.collection.findOne({ _id: toMongoID(userId) }); } findUserByEmail(email: string): Promise { @@ -97,7 +106,7 @@ class Mongo { } async findPasswordHash(userId: string): Promise { - const user = await this.findUserById(userId); + const user = await this.findUserById(toMongoID(userId)); if (user) { return user.services.password.bcrypt; } @@ -105,7 +114,7 @@ class Mongo { } async addEmail(userId: string, newEmail: string, verified: boolean): Promise { - const ret = await this.collection.update({ _id: userId }, { + const ret = await this.collection.update({ _id: toMongoID(userId) }, { $addToSet: { emails: { address: newEmail.toLowerCase(), @@ -120,7 +129,7 @@ class Mongo { } async removeEmail(userId: string, email: string): Promise { - const ret = await this.collection.update({ _id: userId }, { + const ret = await this.collection.update({ _id: toMongoID(userId) }, { $pull: { emails: { address: email.toLowerCase() } }, $set: { [this.options.timestamps.updatedAt]: Date.now() }, }); @@ -130,7 +139,7 @@ class Mongo { } async setUsername(userId: string, newUsername: string): Promise { - const ret = await this.collection.update({ _id: userId }, { + const ret = await this.collection.update({ _id: toMongoID(userId) }, { $set: { username: newUsername, [this.options.timestamps.updatedAt]: Date.now(), @@ -142,7 +151,7 @@ class Mongo { } async setPasssword(userId: string, newPassword: string): Promise { - const ret = await this.collection.update({ _id: userId }, { + const ret = await this.collection.update({ _id: toMongoID(userId) }, { $set: { 'services.password.bcrypt': await encryption.hashPassword(newPassword), [this.options.timestamps.updatedAt]: Date.now(), @@ -154,7 +163,7 @@ class Mongo { } async setProfile(userId: string, profile: Object): Promise { - await this.collection.update({ _id: userId }, { + await this.collection.update({ _id: toMongoID(userId) }, { $set: { profile, [this.options.timestamps.updatedAt]: Date.now(), @@ -177,7 +186,7 @@ class Mongo { } async updateSession(sessionId: string, ip: string, userAgent: string): Promise { - await this.sessionCollection.update({ _id: sessionId }, { + await this.sessionCollection.update({ _id: toMongoID(sessionId) }, { $set: { ip, userAgent, @@ -187,7 +196,7 @@ class Mongo { } async invalidateSession(sessionId: string): Promise { - await this.sessionCollection.update({ _id: sessionId }, { + await this.sessionCollection.update({ _id: toMongoID(sessionId) }, { $set: { valid: false, [this.options.timestamps.updatedAt]: Date.now(), @@ -196,7 +205,7 @@ class Mongo { } findSessionById(sessionId: string): Promise { - return this.sessionCollection.findOne({ _id: sessionId }); + return this.sessionCollection.findOne({ _id: toMongoID(sessionId) }); } } diff --git a/packages/accounts-mongo/src/index.spec.js b/packages/accounts-mongo/src/index.spec.js index 53a7d9133..99e5953ae 100644 --- a/packages/accounts-mongo/src/index.spec.js +++ b/packages/accounts-mongo/src/index.spec.js @@ -49,6 +49,20 @@ function delay(time) { describe('Mongo', () => { beforeAll(createConnection); + describe('toMongoID', () => { + it('should not throw when mongo id is valid', () => { + expect(async () => { + await mongo.findUserById('589871d1c9393d445745a57c'); + }).not.toThrow(); + }); + + it('should throw when mongo id is not valid', () => { + expect(() => { + mongo.findUserById('invalid_hex'); + }).toThrow(); + }); + }); + describe('#constructor', () => { it('should have default options', () => { expect(mongo.options).toBeTruthy(); @@ -131,7 +145,7 @@ describe('Mongo', () => { describe('findUserById', () => { it('should return null for not found user', async () => { - const ret = await mongo.findUserById('unknowuser'); + const ret = await mongo.findUserById('589871d1c9393d445745a57c'); expect(ret).not.toBeTruthy(); }); @@ -169,13 +183,14 @@ describe('Mongo', () => { it('should return user', async () => { const ret = await mongo.findUserByUsername(user.username); + await delay(10); expect(ret).toBeTruthy(); }); }); describe('findPasswordHash', () => { it('should return null on not found user', async () => { - const ret = await mongo.findPasswordHash('unknowuser'); + const ret = await mongo.findPasswordHash('589871d1c9393d445745a57c'); expect(ret).toEqual(null); }); @@ -191,7 +206,7 @@ describe('Mongo', () => { describe('addEmail', () => { it('should throw if user is not found', async () => { try { - await mongo.addEmail('unknowuser', 'unknowemail'); + await mongo.addEmail('589871d1c9393d445745a57c', 'unknowemail'); throw new Error(); } catch (err) { expect(err.message).toEqual('User not found'); @@ -221,7 +236,7 @@ describe('Mongo', () => { describe('removeEmail', () => { it('should throw if user is not found', async () => { try { - await mongo.removeEmail('unknowuser', 'unknowemail'); + await mongo.removeEmail('589871d1c9393d445745a57c', 'unknowemail'); throw new Error(); } catch (err) { expect(err.message).toEqual('User not found'); @@ -254,7 +269,7 @@ describe('Mongo', () => { describe('setUsername', () => { it('should throw if user is not found', async () => { try { - await mongo.setUsername('unknowuser'); + await mongo.setUsername('589871d1c9393d445745a57c'); throw new Error(); } catch (err) { expect(err.message).toEqual('User not found'); @@ -275,7 +290,7 @@ describe('Mongo', () => { describe('setPasssword', () => { it('should throw if user is not found', async () => { try { - await mongo.setPasssword('unknowuser', 'toto'); + await mongo.setPasssword('589871d1c9393d445745a57c', 'toto'); throw new Error(); } catch (err) { expect(err.message).toEqual('User not found'); @@ -320,7 +335,7 @@ describe('Mongo', () => { describe('findSessionById', () => { it('should return null for not found session', async () => { - const ret = await mongo.findSessionById('unknowsession'); + const ret = await mongo.findSessionById('589871d1c9393d445745a57c'); expect(ret).not.toBeTruthy(); }); From 24bff3cb74c8d344d2ae43d024303da5ede8fefb Mon Sep 17 00:00:00 2001 From: David Yahalomi Date: Tue, 7 Feb 2017 12:58:59 +0200 Subject: [PATCH 035/128] 0.0.3 --- packages/accounts-mongo/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 1547d40ca..ea000dbd6 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -1,6 +1,6 @@ { "name": "@accounts/mongo", - "version": "0.0.2", + "version": "0.0.3", "description": "MongoDB adaptor for accounts", "main": "lib/index.js", "scripts": { From c4d27613d1d56ce23cf15254b605bd58b20044ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pradel=20Le=CC=81o?= Date: Tue, 7 Feb 2017 18:09:03 +0100 Subject: [PATCH 036/128] Don't compile the tests --- packages/accounts-mongo/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index ea000dbd6..2b936f35c 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -5,7 +5,7 @@ "main": "lib/index.js", "scripts": { "start": "webpack -p --config --progress --watch", - "compile": "babel ./src --out-dir ./lib", + "compile": "babel ./src --out-dir ./lib --ignore *.spec.js", "flow": "flow; test $? -eq 0 -o $? -eq 2", "flow:check": "flow check", "prepare": "yarn compile", From 1f0cecc1cf9bd1dbfe4884e141873b022a34b510 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pradel=20Le=CC=81o?= Date: Tue, 7 Feb 2017 18:10:23 +0100 Subject: [PATCH 037/128] 0.0.4 --- packages/accounts-mongo/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 2b936f35c..dd2aff958 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -1,6 +1,6 @@ { "name": "@accounts/mongo", - "version": "0.0.3", + "version": "0.0.4", "description": "MongoDB adaptor for accounts", "main": "lib/index.js", "scripts": { From e641e1e606193c54e63b349865a8ff1780107209 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Pradel?= Date: Wed, 8 Feb 2017 13:35:09 +0100 Subject: [PATCH 038/128] Merge pull request #12 from js-accounts/update-readme Update README --- packages/accounts-mongo/README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/packages/accounts-mongo/README.md b/packages/accounts-mongo/README.md index 5b5041963..01cb69156 100644 --- a/packages/accounts-mongo/README.md +++ b/packages/accounts-mongo/README.md @@ -7,3 +7,27 @@ ## Note This package is under active development. + +## Install +``` +yarn add @accounts/mongo +``` + +## Usage + +```javascript +import AccountsServer from '@accounts/server'; +import MongoDBInterface from '@accounts/mongo'; + +// If you are using mongoose +mongoose.connect(process.env.MONGO_URL); +const db = mongoose.connection; + +// If you are using mongodb +const db = await mongodb.MongoClient.connect(process.env.MONGO_URL); + +AccountsServer.config({ +}, new MongoDBInterface(db)); +``` + +The users will be saved under the `users` collection. From 7133f12178576f329a669c998b0b008ca7fb506d Mon Sep 17 00:00:00 2001 From: Tim Mikeladze Date: Wed, 8 Feb 2017 13:21:58 -0800 Subject: [PATCH 039/128] Merge pull request #14 from js-accounts/fix-user-id Fix user.id not set --- packages/accounts-mongo/src/index.js | 24 +++++++++++++++++------ packages/accounts-mongo/src/index.spec.js | 17 ++++++++++++---- 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/packages/accounts-mongo/src/index.js b/packages/accounts-mongo/src/index.js index d337af378..f702bed70 100644 --- a/packages/accounts-mongo/src/index.js +++ b/packages/accounts-mongo/src/index.js @@ -93,16 +93,28 @@ class Mongo { return ret.ops[0]._id; } - findUserById(userId: string): Promise { - return this.collection.findOne({ _id: toMongoID(userId) }); + async findUserById(userId: string): Promise { + const user = await this.collection.findOne({ _id: toMongoID(userId) }); + if (user) { + user.id = user._id; + } + return user; } - findUserByEmail(email: string): Promise { - return this.collection.findOne({ 'emails.address': email.toLowerCase() }); + async findUserByEmail(email: string): Promise { + const user = await this.collection.findOne({ 'emails.address': email.toLowerCase() }); + if (user) { + user.id = user._id; + } + return user; } - findUserByUsername(username: string): Promise { - return this.collection.findOne({ username }); + async findUserByUsername(username: string): Promise { + const user = await this.collection.findOne({ username }); + if (user) { + user.id = user._id; + } + return user; } async findPasswordHash(userId: string): Promise { diff --git a/packages/accounts-mongo/src/index.spec.js b/packages/accounts-mongo/src/index.spec.js index 99e5953ae..8106644a2 100644 --- a/packages/accounts-mongo/src/index.spec.js +++ b/packages/accounts-mongo/src/index.spec.js @@ -56,10 +56,13 @@ describe('Mongo', () => { }).not.toThrow(); }); - it('should throw when mongo id is not valid', () => { - expect(() => { - mongo.findUserById('invalid_hex'); - }).toThrow(); + it('should throw when mongo id is not valid', async () => { + try { + await mongo.findUserById('invalid_hex'); + throw new Error(); + } catch (err) { + expect(err.message).toEqual('Argument passed in must be a single String of 12 bytes or a string of 24 hex characters'); + } }); }); @@ -153,6 +156,8 @@ describe('Mongo', () => { const userId = await mongo.createUser(user); const ret = await mongo.findUserById(userId); expect(ret).toBeTruthy(); + expect(ret._id).toBeTruthy(); + expect(ret.id).toBeTruthy(); }); }); @@ -165,6 +170,8 @@ describe('Mongo', () => { it('should return user', async () => { const ret = await mongo.findUserByEmail(user.email); expect(ret).toBeTruthy(); + expect(ret._id).toBeTruthy(); + expect(ret.id).toBeTruthy(); }); it('should return user with uppercase email', async () => { @@ -185,6 +192,8 @@ describe('Mongo', () => { const ret = await mongo.findUserByUsername(user.username); await delay(10); expect(ret).toBeTruthy(); + expect(ret._id).toBeTruthy(); + expect(ret.id).toBeTruthy(); }); }); From 5106fb9896fde5ba28b196b666077c556002fe70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pradel=20Le=CC=81o?= Date: Thu, 9 Feb 2017 10:34:58 +0100 Subject: [PATCH 040/128] don't check constructor.define.name on db object MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mongoose doesn’t set that --- packages/accounts-mongo/src/index.js | 5 ++--- packages/accounts-mongo/src/index.spec.js | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/accounts-mongo/src/index.js b/packages/accounts-mongo/src/index.js index f702bed70..73328dd6f 100644 --- a/packages/accounts-mongo/src/index.js +++ b/packages/accounts-mongo/src/index.js @@ -1,6 +1,5 @@ // @flow -import { get } from 'lodash'; import { encryption } from '@accounts/server'; import type { CreateUserType, @@ -57,8 +56,8 @@ class Mongo { }, }; this.options = { ...defaultOptions, ...options }; - if (get(db, 'constructor.define.name') !== 'Db') { - throw new Error('A valid database connection object is required'); + if (!db) { + throw new Error('A database connection is required'); } this.db = db; this.collection = this.db.collection(this.options.collectionName); diff --git a/packages/accounts-mongo/src/index.spec.js b/packages/accounts-mongo/src/index.spec.js index 8106644a2..e6ee877c7 100644 --- a/packages/accounts-mongo/src/index.spec.js +++ b/packages/accounts-mongo/src/index.spec.js @@ -86,7 +86,7 @@ describe('Mongo', () => { new Mongo(); // eslint-disable-line no-new throw new Error(); } catch (err) { - expect(err.message).toBe('A valid database connection object is required'); + expect(err.message).toBe('A database connection is required'); } }); }); From 9ddc3746a5119b40feece11f99dc4141c0a52f40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pradel=20Le=CC=81o?= Date: Thu, 9 Feb 2017 10:36:24 +0100 Subject: [PATCH 041/128] 0.0.5 --- packages/accounts-mongo/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index dd2aff958..825292c39 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -1,6 +1,6 @@ { "name": "@accounts/mongo", - "version": "0.0.4", + "version": "0.0.5", "description": "MongoDB adaptor for accounts", "main": "lib/index.js", "scripts": { From dfd69b36d7d0b17c058513b0850f1627a40ef981 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Pradel?= Date: Wed, 15 Feb 2017 19:56:43 +0100 Subject: [PATCH 042/128] Merge pull request #15 from js-accounts/verify-email Add functions for email verification and password change --- packages/accounts-mongo/src/index.js | 49 +++++++++++++++ packages/accounts-mongo/src/index.spec.js | 72 +++++++++++++++++++++++ 2 files changed, 121 insertions(+) diff --git a/packages/accounts-mongo/src/index.js b/packages/accounts-mongo/src/index.js index 73328dd6f..0bfa36e9b 100644 --- a/packages/accounts-mongo/src/index.js +++ b/packages/accounts-mongo/src/index.js @@ -116,6 +116,22 @@ class Mongo { return user; } + async findUserByEmailVerificationToken(token: string): Promise { + const user = await this.collection.findOne({ 'services.email.verificationTokens.token': token }); + if (user) { + user.id = user._id; + } + return user; + } + + async findUserByResetPasswordToken(token: string): Promise { + const user = await this.collection.findOne({ 'services.password.reset.token': token }); + if (user) { + user.id = user._id; + } + return user; + } + async findPasswordHash(userId: string): Promise { const user = await this.findUserById(toMongoID(userId)); if (user) { @@ -215,9 +231,42 @@ class Mongo { }); } + async invalidateAllSessions(userId: string): Promise { + await this.sessionCollection.updateMany({ userId }, { + $set: { + valid: false, + [this.options.timestamps.updatedAt]: Date.now(), + }, + }); + } + findSessionById(sessionId: string): Promise { return this.sessionCollection.findOne({ _id: toMongoID(sessionId) }); } + + async addEmailVerificationToken(userId: string, email: string, token: string): Promise { + await this.collection.update({ _id: userId }, { + $push: { + 'services.email.verificationTokens': { + token, + address: email.toLowerCase(), + when: Date.now(), + }, + }, + }); + } + + async addResetPasswordToken(userId: string, email: string, token: string): Promise { + await this.collection.update({ _id: userId }, { + $push: { + 'services.password.reset': { + token, + address: email.toLowerCase(), + when: Date.now(), + }, + }, + }); + } } export default Mongo; diff --git a/packages/accounts-mongo/src/index.spec.js b/packages/accounts-mongo/src/index.spec.js index e6ee877c7..389f0065a 100644 --- a/packages/accounts-mongo/src/index.spec.js +++ b/packages/accounts-mongo/src/index.spec.js @@ -197,6 +197,39 @@ describe('Mongo', () => { }); }); + describe('findUserByEmailVerificationToken', () => { + it('should return null for not found user', async () => { + const ret = await mongo.findUserByEmailVerificationToken('token'); + expect(ret).not.toBeTruthy(); + }); + + it('should return user', async () => { + const userId = await mongo.createUser(user); + await mongo.addEmailVerificationToken(userId, 'john@doe.com', 'token'); + const ret = await mongo.findUserByEmailVerificationToken('token'); + expect(ret).toBeTruthy(); + expect(ret._id).toBeTruthy(); + expect(ret.id).toBeTruthy(); + }); + }); + + describe('findUserByResetPasswordToken', () => { + it('should return null for not found user', async () => { + const ret = await mongo.findUserByResetPasswordToken('token'); + expect(ret).not.toBeTruthy(); + }); + + it('should return user', async () => { + const userId = await mongo.createUser(user); + await mongo.addResetPasswordToken(userId, 'john@doe.com', 'token'); + const ret = await mongo.findUserByResetPasswordToken('token'); + await delay(10); + expect(ret).toBeTruthy(); + expect(ret._id).toBeTruthy(); + expect(ret.id).toBeTruthy(); + }); + }); + describe('findPasswordHash', () => { it('should return null on not found user', async () => { const ret = await mongo.findPasswordHash('589871d1c9393d445745a57c'); @@ -382,5 +415,44 @@ describe('Mongo', () => { }); }); + describe('invalidateAllSessions', () => { + it('invalidates all sessions', async () => { + const sessionId1 = await mongo.createSession(session.userId, session.ip, session.userAgent); + const sessionId2 = await mongo.createSession(session.userId, session.ip, session.userAgent); + await delay(10); + await mongo.invalidateAllSessions(session.userId); + const session1 = await mongo.findSessionById(sessionId1); + const session2 = await mongo.findSessionById(sessionId2); + expect(session1.valid).toEqual(false); + expect(session1.createdAt).not.toEqual(session1.updatedAt); + expect(session2.valid).toEqual(false); + expect(session2.createdAt).not.toEqual(session2.updatedAt); + }); + }); + + describe('addEmailVerificationToken', () => { + it('should add a token', async () => { + const userId = await mongo.createUser(user); + await mongo.addEmailVerificationToken(userId, 'john@doe.com', 'token'); + const retUser = await mongo.findUserById(userId); + expect(retUser.services.email.verificationTokens.length).toEqual(1); + expect(retUser.services.email.verificationTokens[0].address).toEqual('john@doe.com'); + expect(retUser.services.email.verificationTokens[0].token).toEqual('token'); + expect(retUser.services.email.verificationTokens[0].when).toBeTruthy(); + }); + }); + + describe('addResetPasswordToken', () => { + it('should add a token', async () => { + const userId = await mongo.createUser(user); + await mongo.addResetPasswordToken(userId, 'john@doe.com', 'token'); + const retUser = await mongo.findUserById(userId); + expect(retUser.services.password.reset.length).toEqual(1); + expect(retUser.services.password.reset[0].address).toEqual('john@doe.com'); + expect(retUser.services.password.reset[0].token).toEqual('token'); + expect(retUser.services.password.reset[0].when).toBeTruthy(); + }); + }); + afterAll(closeConnection); }); From 7a2c2220dbe18c206950a75ba2cccc196a00d69d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Pradel?= Date: Fri, 24 Feb 2017 18:16:00 +0100 Subject: [PATCH 043/128] Merge pull request #17 from js-accounts/reset-reason Add reason param to addResetPasswordToken --- packages/accounts-mongo/src/index.js | 3 ++- packages/accounts-mongo/src/index.spec.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/accounts-mongo/src/index.js b/packages/accounts-mongo/src/index.js index 0bfa36e9b..bea62fb4e 100644 --- a/packages/accounts-mongo/src/index.js +++ b/packages/accounts-mongo/src/index.js @@ -256,13 +256,14 @@ class Mongo { }); } - async addResetPasswordToken(userId: string, email: string, token: string): Promise { + async addResetPasswordToken(userId: string, email: string, token: string, reason: string = 'reset'): Promise { await this.collection.update({ _id: userId }, { $push: { 'services.password.reset': { token, address: email.toLowerCase(), when: Date.now(), + reason, }, }, }); diff --git a/packages/accounts-mongo/src/index.spec.js b/packages/accounts-mongo/src/index.spec.js index 389f0065a..9c0098db6 100644 --- a/packages/accounts-mongo/src/index.spec.js +++ b/packages/accounts-mongo/src/index.spec.js @@ -451,6 +451,7 @@ describe('Mongo', () => { expect(retUser.services.password.reset[0].address).toEqual('john@doe.com'); expect(retUser.services.password.reset[0].token).toEqual('token'); expect(retUser.services.password.reset[0].when).toBeTruthy(); + expect(retUser.services.password.reset[0].reason).toEqual('reset'); }); }); From b632c215d83eaf26acb389d4811a8e66bc2d6c7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pradel=20Le=CC=81o?= Date: Fri, 24 Feb 2017 18:41:29 +0100 Subject: [PATCH 044/128] 0.0.6 --- packages/accounts-mongo/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 825292c39..2c1351361 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -1,6 +1,6 @@ { "name": "@accounts/mongo", - "version": "0.0.5", + "version": "0.0.6", "description": "MongoDB adaptor for accounts", "main": "lib/index.js", "scripts": { From adae1712de314dd734f920262b75b0f829f8219f Mon Sep 17 00:00:00 2001 From: Dotan Simha Date: Tue, 7 Mar 2017 14:46:59 +0200 Subject: [PATCH 045/128] Merge pull request #18 from js-accounts/feat/umd added umd build --- packages/accounts-mongo/.gitignore | 1 + packages/accounts-mongo/package.json | 19 +- packages/accounts-mongo/webpack.config.js | 8 + packages/accounts-mongo/yarn.lock | 231 +++++++++++++++++++++- 4 files changed, 252 insertions(+), 7 deletions(-) diff --git a/packages/accounts-mongo/.gitignore b/packages/accounts-mongo/.gitignore index 03af57388..6bf46d11f 100644 --- a/packages/accounts-mongo/.gitignore +++ b/packages/accounts-mongo/.gitignore @@ -3,3 +3,4 @@ node_modules/ coverage/ npm-debug.log .idea +lib-es6 diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 2c1351361..9d4cff800 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -1,11 +1,14 @@ { "name": "@accounts/mongo", - "version": "0.0.6", + "version": "0.0.7", "description": "MongoDB adaptor for accounts", "main": "lib/index.js", + "jsnext:main": "lib-es6/index.js", "scripts": { "start": "webpack -p --config --progress --watch", - "compile": "babel ./src --out-dir ./lib --ignore *.spec.js", + "compile": "npm run compile:es6 && npm run compile:umd", + "compile:es6": "babel ./src --out-dir ./lib-es6 --ignore *.spec.js", + "compile:umd": "webpack", "flow": "flow; test $? -eq 0 -o $? -eq 2", "flow:check": "flow check", "prepare": "yarn compile", @@ -38,7 +41,9 @@ "babel-plugin-transform-async-to-generator": "^6.22.0", "babel-plugin-transform-flow-strip-types": "^6.22.0", "babel-plugin-transform-object-rest-spread": "^6.22.0", + "babel-plugin-transform-runtime": "^6.23.0", "babel-preset-es2015": "^6.22.0", + "babel-preset-stage-0": "^6.22.0", "coveralls": "^2.11.14", "eslint": "^3.14.1", "eslint-config-airbnb": "^14.0.0", @@ -50,11 +55,15 @@ "flow-bin": "^0.38.0", "jest": "^18.1.0", "webpack": "^1.14.0", - "webpack-node-externals": "^1.5.4" + "webpack-node-externals": "^1.5.4", + "@accounts/common": "^0.0.9", + "@accounts/server": "^0.0.9" + }, + "peerDependencies": { + "@accounts/common": "^0.0.9", + "@accounts/server": "^0.0.9" }, "dependencies": { - "@accounts/common": "^0.0.2", - "@accounts/server": "^0.0.2", "lodash": "^4.17.4", "mongodb": "^2.2.22" } diff --git a/packages/accounts-mongo/webpack.config.js b/packages/accounts-mongo/webpack.config.js index 6dc21f067..90c7f3f5d 100644 --- a/packages/accounts-mongo/webpack.config.js +++ b/packages/accounts-mongo/webpack.config.js @@ -21,6 +21,14 @@ module.exports = { test: /\.js$/, loader: 'babel', exclude: /node_modules/, + query: { + babelrc: false, + presets: ['es2015', 'stage-0'], + plugins: [ + 'transform-flow-strip-types', + 'transform-runtime', + ], + } }, ], }, diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index cb020ae54..756bfd7e6 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -293,6 +293,22 @@ babel-generator@^6.18.0, babel-generator@^6.22.0: lodash "^4.2.0" source-map "^0.5.0" +babel-helper-bindify-decorators@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.22.0.tgz#d7f5bc261275941ac62acfc4e20dacfb8a3fe952" + dependencies: + babel-runtime "^6.22.0" + babel-traverse "^6.22.0" + babel-types "^6.22.0" + +babel-helper-builder-binary-assignment-operator-visitor@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.22.0.tgz#29df56be144d81bdeac08262bfa41d2c5e91cdcd" + dependencies: + babel-helper-explode-assignable-expression "^6.22.0" + babel-runtime "^6.22.0" + babel-types "^6.22.0" + babel-helper-call-delegate@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.22.0.tgz#119921b56120f17e9dae3f74b4f5cc7bcc1b37ef" @@ -311,6 +327,23 @@ babel-helper-define-map@^6.22.0: babel-types "^6.22.0" lodash "^4.2.0" +babel-helper-explode-assignable-expression@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.22.0.tgz#c97bf76eed3e0bae4048121f2b9dae1a4e7d0478" + dependencies: + babel-runtime "^6.22.0" + babel-traverse "^6.22.0" + babel-types "^6.22.0" + +babel-helper-explode-class@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-helper-explode-class/-/babel-helper-explode-class-6.22.0.tgz#646304924aa6388a516843ba7f1855ef8dfeb69b" + dependencies: + babel-helper-bindify-decorators "^6.22.0" + babel-runtime "^6.22.0" + babel-traverse "^6.22.0" + babel-types "^6.22.0" + babel-helper-function-name@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.22.0.tgz#51f1bdc4bb89b15f57a9b249f33d742816dcbefc" @@ -321,6 +354,16 @@ babel-helper-function-name@^6.22.0: babel-traverse "^6.22.0" babel-types "^6.22.0" +babel-helper-function-name@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.23.0.tgz#25742d67175c8903dbe4b6cb9d9e1fcb8dcf23a6" + dependencies: + babel-helper-get-function-arity "^6.22.0" + babel-runtime "^6.22.0" + babel-template "^6.23.0" + babel-traverse "^6.23.0" + babel-types "^6.23.0" + babel-helper-get-function-arity@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.22.0.tgz#0beb464ad69dc7347410ac6ade9f03a50634f5ce" @@ -401,6 +444,12 @@ babel-messages@^6.22.0: dependencies: babel-runtime "^6.22.0" +babel-messages@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" + dependencies: + babel-runtime "^6.22.0" + babel-plugin-check-es2015-constants@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" @@ -424,14 +473,62 @@ babel-plugin-syntax-async-functions@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" +babel-plugin-syntax-async-generators@^6.5.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz#6bc963ebb16eccbae6b92b596eb7f35c342a8b9a" + +babel-plugin-syntax-class-constructor-call@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-constructor-call/-/babel-plugin-syntax-class-constructor-call-6.18.0.tgz#9cb9d39fe43c8600bec8146456ddcbd4e1a76416" + +babel-plugin-syntax-class-properties@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz#d7eb23b79a317f8543962c505b827c7d6cac27de" + +babel-plugin-syntax-decorators@^6.13.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz#312563b4dbde3cc806cee3e416cceeaddd11ac0b" + +babel-plugin-syntax-do-expressions@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-do-expressions/-/babel-plugin-syntax-do-expressions-6.13.0.tgz#5747756139aa26d390d09410b03744ba07e4796d" + +babel-plugin-syntax-dynamic-import@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz#8d6a26229c83745a9982a441051572caa179b1da" + +babel-plugin-syntax-exponentiation-operator@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" + +babel-plugin-syntax-export-extensions@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-export-extensions/-/babel-plugin-syntax-export-extensions-6.13.0.tgz#70a1484f0f9089a4e84ad44bac353c95b9b12721" + babel-plugin-syntax-flow@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" +babel-plugin-syntax-function-bind@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-function-bind/-/babel-plugin-syntax-function-bind-6.13.0.tgz#48c495f177bdf31a981e732f55adc0bdd2601f46" + babel-plugin-syntax-object-rest-spread@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" +babel-plugin-syntax-trailing-function-commas@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" + +babel-plugin-transform-async-generator-functions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.22.0.tgz#a720a98153a7596f204099cd5409f4b3c05bab46" + dependencies: + babel-helper-remap-async-to-generator "^6.22.0" + babel-plugin-syntax-async-generators "^6.5.0" + babel-runtime "^6.22.0" + babel-plugin-transform-async-to-generator@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.22.0.tgz#194b6938ec195ad36efc4c33a971acf00d8cd35e" @@ -440,6 +537,40 @@ babel-plugin-transform-async-to-generator@^6.22.0: babel-plugin-syntax-async-functions "^6.8.0" babel-runtime "^6.22.0" +babel-plugin-transform-class-constructor-call@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-constructor-call/-/babel-plugin-transform-class-constructor-call-6.22.0.tgz#11a4d2216abb5b0eef298b493748f4f2f4869120" + dependencies: + babel-plugin-syntax-class-constructor-call "^6.18.0" + babel-runtime "^6.22.0" + babel-template "^6.22.0" + +babel-plugin-transform-class-properties@^6.22.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.23.0.tgz#187b747ee404399013563c993db038f34754ac3b" + dependencies: + babel-helper-function-name "^6.23.0" + babel-plugin-syntax-class-properties "^6.8.0" + babel-runtime "^6.22.0" + babel-template "^6.23.0" + +babel-plugin-transform-decorators@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.22.0.tgz#c03635b27a23b23b7224f49232c237a73988d27c" + dependencies: + babel-helper-explode-class "^6.22.0" + babel-plugin-syntax-decorators "^6.13.0" + babel-runtime "^6.22.0" + babel-template "^6.22.0" + babel-types "^6.22.0" + +babel-plugin-transform-do-expressions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-do-expressions/-/babel-plugin-transform-do-expressions-6.22.0.tgz#28ccaf92812d949c2cd1281f690c8fdc468ae9bb" + dependencies: + babel-plugin-syntax-do-expressions "^6.8.0" + babel-runtime "^6.22.0" + babel-plugin-transform-es2015-arrow-functions@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" @@ -608,6 +739,21 @@ babel-plugin-transform-es2015-unicode-regex@^6.22.0: babel-runtime "^6.22.0" regexpu-core "^2.0.0" +babel-plugin-transform-exponentiation-operator@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.22.0.tgz#d57c8335281918e54ef053118ce6eb108468084d" + dependencies: + babel-helper-builder-binary-assignment-operator-visitor "^6.22.0" + babel-plugin-syntax-exponentiation-operator "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-export-extensions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-export-extensions/-/babel-plugin-transform-export-extensions-6.22.0.tgz#53738b47e75e8218589eea946cbbd39109bbe653" + dependencies: + babel-plugin-syntax-export-extensions "^6.8.0" + babel-runtime "^6.22.0" + babel-plugin-transform-flow-strip-types@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz#84cb672935d43714fdc32bce84568d87441cf7cf" @@ -615,6 +761,13 @@ babel-plugin-transform-flow-strip-types@^6.22.0: babel-plugin-syntax-flow "^6.18.0" babel-runtime "^6.22.0" +babel-plugin-transform-function-bind@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-function-bind/-/babel-plugin-transform-function-bind-6.22.0.tgz#c6fb8e96ac296a310b8cf8ea401462407ddf6a97" + dependencies: + babel-plugin-syntax-function-bind "^6.8.0" + babel-runtime "^6.22.0" + babel-plugin-transform-object-rest-spread@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.22.0.tgz#1d419b55e68d2e4f64a5ff3373bd67d73c8e83bc" @@ -628,6 +781,12 @@ babel-plugin-transform-regenerator@^6.22.0: dependencies: regenerator-transform "0.9.8" +babel-plugin-transform-runtime@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.23.0.tgz#88490d446502ea9b8e7efb0fe09ec4d99479b1ee" + dependencies: + babel-runtime "^6.22.0" + babel-plugin-transform-strict-mode@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.22.0.tgz#e008df01340fdc87e959da65991b7e05970c8c7c" @@ -678,6 +837,41 @@ babel-preset-jest@^18.0.0: dependencies: babel-plugin-jest-hoist "^18.0.0" +babel-preset-stage-0@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-preset-stage-0/-/babel-preset-stage-0-6.22.0.tgz#707eeb5b415da769eff9c42f4547f644f9296ef9" + dependencies: + babel-plugin-transform-do-expressions "^6.22.0" + babel-plugin-transform-function-bind "^6.22.0" + babel-preset-stage-1 "^6.22.0" + +babel-preset-stage-1@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-preset-stage-1/-/babel-preset-stage-1-6.22.0.tgz#7da05bffea6ad5a10aef93e320cfc6dd465dbc1a" + dependencies: + babel-plugin-transform-class-constructor-call "^6.22.0" + babel-plugin-transform-export-extensions "^6.22.0" + babel-preset-stage-2 "^6.22.0" + +babel-preset-stage-2@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-preset-stage-2/-/babel-preset-stage-2-6.22.0.tgz#ccd565f19c245cade394b21216df704a73b27c07" + dependencies: + babel-plugin-syntax-dynamic-import "^6.18.0" + babel-plugin-transform-class-properties "^6.22.0" + babel-plugin-transform-decorators "^6.22.0" + babel-preset-stage-3 "^6.22.0" + +babel-preset-stage-3@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-preset-stage-3/-/babel-preset-stage-3-6.22.0.tgz#a4e92bbace7456fafdf651d7a7657ee0bbca9c2e" + dependencies: + babel-plugin-syntax-trailing-function-commas "^6.22.0" + babel-plugin-transform-async-generator-functions "^6.22.0" + babel-plugin-transform-async-to-generator "^6.22.0" + babel-plugin-transform-exponentiation-operator "^6.22.0" + babel-plugin-transform-object-rest-spread "^6.22.0" + babel-register@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.22.0.tgz#a61dd83975f9ca4a9e7d6eff3059494cd5ea4c63" @@ -707,6 +901,16 @@ babel-template@^6.16.0, babel-template@^6.22.0: babylon "^6.11.0" lodash "^4.2.0" +babel-template@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.23.0.tgz#04d4f270adbb3aa704a8143ae26faa529238e638" + dependencies: + babel-runtime "^6.22.0" + babel-traverse "^6.23.0" + babel-types "^6.23.0" + babylon "^6.11.0" + lodash "^4.2.0" + babel-traverse@^6.15.0, babel-traverse@^6.18.0, babel-traverse@^6.22.0, babel-traverse@^6.22.1: version "6.22.1" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.22.1.tgz#3b95cd6b7427d6f1f757704908f2fc9748a5f59f" @@ -721,6 +925,20 @@ babel-traverse@^6.15.0, babel-traverse@^6.18.0, babel-traverse@^6.22.0, babel-tr invariant "^2.2.0" lodash "^4.2.0" +babel-traverse@^6.23.0: + version "6.23.1" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.23.1.tgz#d3cb59010ecd06a97d81310065f966b699e14f48" + dependencies: + babel-code-frame "^6.22.0" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-types "^6.23.0" + babylon "^6.15.0" + debug "^2.2.0" + globals "^9.0.0" + invariant "^2.2.0" + lodash "^4.2.0" + babel-types@^6.15.0, babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.22.0.tgz#2a447e8d0ea25d2512409e4175479fd78cc8b1db" @@ -730,6 +948,15 @@ babel-types@^6.15.0, babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.22 lodash "^4.2.0" to-fast-properties "^1.0.1" +babel-types@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.23.0.tgz#bb17179d7538bad38cd0c9e115d340f77e7e9acf" + dependencies: + babel-runtime "^6.22.0" + esutils "^2.0.2" + lodash "^4.2.0" + to-fast-properties "^1.0.1" + babylon@^6.11.0, babylon@^6.13.0: version "6.14.1" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.14.1.tgz#956275fab72753ad9b3435d7afe58f8bf0a29815" @@ -2308,14 +2535,14 @@ js-tokens@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.0.tgz#a2f2a969caae142fb3cd56228358c89366957bd1" -js-yaml@3.6.1: +js-yaml@3.6.1, js-yaml@^3.5.1: version "3.6.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.6.1.tgz#6e5fe67d8b205ce4d22fad05b7781e8dadcc4b30" dependencies: argparse "^1.0.7" esprima "^2.6.0" -js-yaml@^3.5.1, js-yaml@^3.7.0: +js-yaml@^3.7.0: version "3.7.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" dependencies: From eea806273bc9edb21756f9137ecb37f1c2478503 Mon Sep 17 00:00:00 2001 From: David Yahalomi Date: Thu, 9 Mar 2017 13:30:24 +0200 Subject: [PATCH 046/128] Merge pull request #19 from js-accounts/no-auto-convert Added a flag that allows for user collection to have simple string ids --- packages/accounts-mongo/package.json | 9 ++- packages/accounts-mongo/src/index.js | 25 ++++--- packages/accounts-mongo/src/index.spec.js | 9 +++ packages/accounts-mongo/yarn.lock | 87 +++++++++++++++++------ 4 files changed, 100 insertions(+), 30 deletions(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 9d4cff800..4d3c52be0 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -12,7 +12,9 @@ "flow": "flow; test $? -eq 0 -o $? -eq 2", "flow:check": "flow check", "prepare": "yarn compile", - "test": "yarn lint && yarn testonly", + "pretest": "yarn compile", + "test": "yarn testonly", + "posttest": "yarn lint", "test-ci": "yarn lint && yarn coverage", "testonly": "jest", "lint": "eslint src", @@ -21,7 +23,10 @@ }, "jest": { "testEnvironment": "node", - "testRegex": "(/.*.(test|spec)).(js|jsx)$" + "testRegex": "(/.*.(test|spec)).(js|jsx)$", + "testPathDirs": [ + "src" + ] }, "repository": { "type": "git", diff --git a/packages/accounts-mongo/src/index.js b/packages/accounts-mongo/src/index.js index bea62fb4e..69283d217 100644 --- a/packages/accounts-mongo/src/index.js +++ b/packages/accounts-mongo/src/index.js @@ -14,7 +14,8 @@ export type MongoOptionsType = { timestamps: { createdAt: string, updatedAt: string, - } + }, + convertUserIdToMongoObjectId: boolean }; export type MongoUserObjectType = { @@ -54,6 +55,7 @@ class Mongo { createdAt: 'createdAt', updatedAt: 'updatedAt', }, + convertUserIdToMongoObjectId: true, }; this.options = { ...defaultOptions, ...options }; if (!db) { @@ -93,7 +95,8 @@ class Mongo { } async findUserById(userId: string): Promise { - const user = await this.collection.findOne({ _id: toMongoID(userId) }); + const _id = this.options.convertUserIdToMongoObjectId ? toMongoID(userId) : userId; + const user = await this.collection.findOne({ _id }); if (user) { user.id = user._id; } @@ -133,7 +136,8 @@ class Mongo { } async findPasswordHash(userId: string): Promise { - const user = await this.findUserById(toMongoID(userId)); + const id = this.options.convertUserIdToMongoObjectId ? toMongoID(userId) : userId; + const user = await this.findUserById(id); if (user) { return user.services.password.bcrypt; } @@ -141,7 +145,8 @@ class Mongo { } async addEmail(userId: string, newEmail: string, verified: boolean): Promise { - const ret = await this.collection.update({ _id: toMongoID(userId) }, { + const _id = this.options.convertUserIdToMongoObjectId ? toMongoID(userId) : userId; + const ret = await this.collection.update({ _id }, { $addToSet: { emails: { address: newEmail.toLowerCase(), @@ -156,7 +161,8 @@ class Mongo { } async removeEmail(userId: string, email: string): Promise { - const ret = await this.collection.update({ _id: toMongoID(userId) }, { + const _id = this.options.convertUserIdToMongoObjectId ? toMongoID(userId) : userId; + const ret = await this.collection.update({ _id }, { $pull: { emails: { address: email.toLowerCase() } }, $set: { [this.options.timestamps.updatedAt]: Date.now() }, }); @@ -166,7 +172,8 @@ class Mongo { } async setUsername(userId: string, newUsername: string): Promise { - const ret = await this.collection.update({ _id: toMongoID(userId) }, { + const _id = this.options.convertUserIdToMongoObjectId ? toMongoID(userId) : userId; + const ret = await this.collection.update({ _id }, { $set: { username: newUsername, [this.options.timestamps.updatedAt]: Date.now(), @@ -178,7 +185,8 @@ class Mongo { } async setPasssword(userId: string, newPassword: string): Promise { - const ret = await this.collection.update({ _id: toMongoID(userId) }, { + const _id = this.options.convertUserIdToMongoObjectId ? toMongoID(userId) : userId; + const ret = await this.collection.update({ _id }, { $set: { 'services.password.bcrypt': await encryption.hashPassword(newPassword), [this.options.timestamps.updatedAt]: Date.now(), @@ -190,7 +198,8 @@ class Mongo { } async setProfile(userId: string, profile: Object): Promise { - await this.collection.update({ _id: toMongoID(userId) }, { + const _id = this.options.convertUserIdToMongoObjectId ? toMongoID(userId) : userId; + await this.collection.update({ _id }, { $set: { profile, [this.options.timestamps.updatedAt]: Date.now(), diff --git a/packages/accounts-mongo/src/index.spec.js b/packages/accounts-mongo/src/index.spec.js index 9c0098db6..026173f18 100644 --- a/packages/accounts-mongo/src/index.spec.js +++ b/packages/accounts-mongo/src/index.spec.js @@ -64,6 +64,15 @@ describe('Mongo', () => { expect(err.message).toEqual('Argument passed in must be a single String of 12 bytes or a string of 24 hex characters'); } }); + + it('should not auto convert to mongo object id when users collection has string ids', async () => { + const mongoWithStringIds = new Mongo(db, { convertUserIdToMongoObjectId: false }); + const mockFindOne = jest.fn(); + mongoWithStringIds.collection.findOne = mockFindOne; + await mongoWithStringIds.findUserById('589871d1c9393d445745a57c'); + + expect(mockFindOne.mock.calls[0][0]).toHaveProperty('_id', '589871d1c9393d445745a57c'); + }); }); describe('#constructor', () => { diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index 756bfd7e6..0f0528116 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -2,20 +2,21 @@ # yarn lockfile v1 -"@accounts/common@^0.0.2": - version "0.0.2" - resolved "https://registry.yarnpkg.com/@accounts/common/-/common-0.0.2.tgz#be040983e5d36b6ce0471dc3c85502274a8792de" +"@accounts/common@^0.0.9": + version "0.0.9" + resolved "https://registry.yarnpkg.com/@accounts/common/-/common-0.0.9.tgz#5aa8347b81c68845331409e4a99eaf68b924ec27" dependencies: - apollo-errors "^1.2.1" lodash "^4.16.4" -"@accounts/server@^0.0.2": - version "0.0.2" - resolved "https://registry.yarnpkg.com/@accounts/server/-/server-0.0.2.tgz#d4bd5c2171a43fa86c0b623e9a940f1e102e5091" +"@accounts/server@^0.0.9": + version "0.0.9" + resolved "https://registry.yarnpkg.com/@accounts/server/-/server-0.0.9.tgz#dddcb4fbaa7ac126aca1f0c58b40c9d84820a851" dependencies: - "@accounts/common" "^0.0.2" - apollo-errors "^1.2.1" + "@accounts/common" "^0.0.9" + babel-polyfill "^6.23.0" bcryptjs "^2.4.0" + crypto "^0.0.3" + emailjs "^1.0.8" jsonwebtoken "^7.2.1" jwt-decode "^2.1.0" lodash "^4.16.4" @@ -52,6 +53,14 @@ acorn@^4.0.1: version "4.0.4" resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.4.tgz#17a8d6a7a6c4ef538b814ec9abac2779293bf30a" +addressparser@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/addressparser/-/addressparser-0.3.2.tgz#59873f35e8fcf6c7361c10239261d76e15348bb2" + +addressparser@~0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/addressparser/-/addressparser-0.2.1.tgz#d11a5b2eeda04cfefebdf3196c10ae13db6cd607" + ajv-keywords@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.2.0.tgz#676c4f087bfe1e8b12dca6fda2f3c74f417b099c" @@ -98,12 +107,6 @@ anymatch@^1.3.0: arrify "^1.0.0" micromatch "^2.1.5" -apollo-errors@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/apollo-errors/-/apollo-errors-1.2.1.tgz#08b6de091444fd73d73bb5674a3137c312b25ffb" - dependencies: - es6-error "^4.0.0" - append-transform@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991" @@ -802,6 +805,14 @@ babel-polyfill@^6.22.0: core-js "^2.4.0" regenerator-runtime "^0.10.0" +babel-polyfill@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.23.0.tgz#8364ca62df8eafb830499f699177466c3b03499d" + dependencies: + babel-runtime "^6.22.0" + core-js "^2.4.0" + regenerator-runtime "^0.10.0" + babel-preset-es2015@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.22.0.tgz#af5a98ecb35eb8af764ad8a5a05eb36dc4386835" @@ -1072,6 +1083,10 @@ buffer@^4.9.0: ieee754 "^1.1.4" isarray "^1.0.0" +bufferjs@=1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/bufferjs/-/bufferjs-1.1.0.tgz#095ffa39c5e6b40a2178a1169c9effc584a73201" + builtin-modules@^1.0.0, builtin-modules@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" @@ -1295,6 +1310,10 @@ crypto-browserify@3.3.0: ripemd160 "0.2.0" sha.js "2.2.6" +crypto@^0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/crypto/-/crypto-0.0.3.tgz#470a81b86be4c5ee17acc8207a1f5315ae20dbb0" + cssom@0.3.x, "cssom@>= 0.3.0 < 0.4.0": version "0.3.1" resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.1.tgz#c9e37ef2490e64f6d1baa10fda852257082c25d3" @@ -1410,10 +1429,27 @@ ecdsa-sig-formatter@1.0.9: base64url "^2.0.0" safe-buffer "^5.0.1" +emailjs@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/emailjs/-/emailjs-1.0.8.tgz#d4240db7670dc78aff97352092d8460edc130f66" + dependencies: + addressparser "^0.3.2" + mimelib "0.2.14" + moment "= 2.11.2" + starttls "1.0.1" + optionalDependencies: + bufferjs "=1.1.0" + emojis-list@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" +encoding@~0.1: + version "0.1.12" + resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" + dependencies: + iconv-lite "~0.4.13" + enhanced-resolve@~0.9.0: version "0.9.1" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-0.9.1.tgz#4d6e689b3725f86090927ccc86cd9f1635b89e2e" @@ -1458,10 +1494,6 @@ es5-ext@^0.10.7, es5-ext@^0.10.8, es5-ext@~0.10.11, es5-ext@~0.10.2, es5-ext@~0. es6-iterator "2" es6-symbol "~3.1" -es6-error@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.0.1.tgz#eeb3e280f57e2ec48d72a9fccaf6247d3c1f5719" - es6-iterator@2: version "2.0.0" resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.0.tgz#bd968567d61635e33c0b80727613c9cb4b096bac" @@ -2030,7 +2062,7 @@ https-browserify@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-0.0.1.tgz#3f91365cabe60b77ed0ebba24b454e3e09d95a82" -iconv-lite@0.4.13, iconv-lite@^0.4.13: +iconv-lite@0.4.13, iconv-lite@^0.4.13, iconv-lite@~0.4.13: version "0.4.13" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" @@ -2866,6 +2898,13 @@ mime-types@^2.1.11, mime-types@^2.1.12, mime-types@~2.1.7: dependencies: mime-db "~1.25.0" +mimelib@0.2.14: + version "0.2.14" + resolved "https://registry.yarnpkg.com/mimelib/-/mimelib-0.2.14.tgz#2a1aa724bd190b85bd526e6317ab6106edfd6831" + dependencies: + addressparser "~0.2.0" + encoding "~0.1" + minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" @@ -2890,6 +2929,10 @@ moment@2.x.x: version "2.17.1" resolved "https://registry.yarnpkg.com/moment/-/moment-2.17.1.tgz#fed9506063f36b10f066c8b59a144d7faebe1d82" +"moment@= 2.11.2": + version "2.11.2" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.11.2.tgz#87968e5f95ac038c2e42ac959c75819cd3f52901" + mongodb-core@2.1.7: version "2.1.7" resolved "https://registry.yarnpkg.com/mongodb-core/-/mongodb-core-2.1.7.tgz#6a27909b98142ef2508d924c274969008954fa29" @@ -3649,6 +3692,10 @@ sshpk@^1.7.0: jsbn "~0.1.0" tweetnacl "~0.14.0" +starttls@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/starttls/-/starttls-1.0.1.tgz#e6081c25de6b178f5a75f8f271c1487449183b42" + stream-browserify@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" From 77dc1d577fe87e3dd4f27259f3c339906f7f86ff Mon Sep 17 00:00:00 2001 From: David Yahalomi Date: Fri, 10 Mar 2017 12:25:39 +0200 Subject: [PATCH 047/128] 0.0.8 --- packages/accounts-mongo/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 4d3c52be0..13575dbde 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -1,6 +1,6 @@ { "name": "@accounts/mongo", - "version": "0.0.7", + "version": "0.0.8", "description": "MongoDB adaptor for accounts", "main": "lib/index.js", "jsnext:main": "lib-es6/index.js", From 727f6e3c9d15d6a96ea9654791296ae45b404008 Mon Sep 17 00:00:00 2001 From: David Yahalomi Date: Sun, 19 Mar 2017 16:52:26 +0200 Subject: [PATCH 048/128] Merge pull request #21 from js-accounts/set-reset-password Implemented setResetPassword method --- packages/accounts-mongo/.flowconfig | 1 + packages/accounts-mongo/package.json | 12 +++++------ packages/accounts-mongo/src/index.js | 22 +++++++++++++------ packages/accounts-mongo/src/index.spec.js | 2 +- packages/accounts-mongo/yarn.lock | 26 ++++++++++------------- 5 files changed, 35 insertions(+), 28 deletions(-) diff --git a/packages/accounts-mongo/.flowconfig b/packages/accounts-mongo/.flowconfig index 4a58bdcde..4720ff6c7 100644 --- a/packages/accounts-mongo/.flowconfig +++ b/packages/accounts-mongo/.flowconfig @@ -1,4 +1,5 @@ [ignore] +.*bower.json [include] diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 13575dbde..504e955bd 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -39,6 +39,8 @@ }, "homepage": "https://github.com/js-accounts/mongo", "devDependencies": { + "@accounts/common": "^0.0.10", + "@accounts/server": "^0.0.10", "babel-cli": "^6.22.2", "babel-core": "^6.22.1", "babel-eslint": "^7.0.0", @@ -57,16 +59,14 @@ "eslint-plugin-import": "^2.0.1", "eslint-plugin-jsx-a11y": "^3.0.2", "eslint-plugin-react": "^6.9.0", - "flow-bin": "^0.38.0", + "flow-bin": "^0.41.0", "jest": "^18.1.0", "webpack": "^1.14.0", - "webpack-node-externals": "^1.5.4", - "@accounts/common": "^0.0.9", - "@accounts/server": "^0.0.9" + "webpack-node-externals": "^1.5.4" }, "peerDependencies": { - "@accounts/common": "^0.0.9", - "@accounts/server": "^0.0.9" + "@accounts/common": "^0.0.10", + "@accounts/server": "^0.0.10" }, "dependencies": { "lodash": "^4.17.4", diff --git a/packages/accounts-mongo/src/index.js b/packages/accounts-mongo/src/index.js index 69283d217..b8ae2396f 100644 --- a/packages/accounts-mongo/src/index.js +++ b/packages/accounts-mongo/src/index.js @@ -1,12 +1,13 @@ // @flow -import { encryption } from '@accounts/server'; +import type { DBInterface } from '@accounts/server'; import type { CreateUserType, UserObjectType, SessionType, } from '@accounts/common'; import { ObjectID } from 'mongodb'; +import get from 'lodash/get'; export type MongoOptionsType = { collectionName: string, @@ -48,6 +49,8 @@ class Mongo { sessionCollection: any; constructor(db: any, options: MongoOptionsType) { + // eslint-disable-next-line no-unused-expressions + (this: DBInterface); const defaultOptions = { collectionName: 'users', sessionCollectionName: 'sessions', @@ -79,7 +82,7 @@ class Mongo { [this.options.timestamps.updatedAt]: Date.now(), }; if (options.password) { - user.services.password = { bcrypt: await encryption.hashPassword(options.password) }; + user.services.password = { bcrypt: options.password }; } if (options.username) { user.username = options.username; @@ -139,7 +142,7 @@ class Mongo { const id = this.options.convertUserIdToMongoObjectId ? toMongoID(userId) : userId; const user = await this.findUserById(id); if (user) { - return user.services.password.bcrypt; + return get(user, 'services.password.bcrypt'); } return null; } @@ -188,9 +191,12 @@ class Mongo { const _id = this.options.convertUserIdToMongoObjectId ? toMongoID(userId) : userId; const ret = await this.collection.update({ _id }, { $set: { - 'services.password.bcrypt': await encryption.hashPassword(newPassword), + 'services.password.bcrypt': newPassword, [this.options.timestamps.updatedAt]: Date.now(), }, + $unset: { + 'services.password.reset': '', + }, }); if (ret.result.nModified === 0) { throw new Error('User not found'); @@ -205,8 +211,7 @@ class Mongo { [this.options.timestamps.updatedAt]: Date.now(), }, }); - const user = await this.findUserById(userId); - return user && user.profile; + return profile; } async createSession(userId: string, ip: string, userAgent: string): Promise { @@ -277,6 +282,11 @@ class Mongo { }, }); } + + // eslint-disable-next-line max-len + async setResetPasssword(userId: string, email: string, newPassword: string): Promise { + await this.setPasssword(userId, newPassword); + } } export default Mongo; diff --git a/packages/accounts-mongo/src/index.spec.js b/packages/accounts-mongo/src/index.spec.js index 026173f18..34c17e33d 100644 --- a/packages/accounts-mongo/src/index.spec.js +++ b/packages/accounts-mongo/src/index.spec.js @@ -355,7 +355,7 @@ describe('Mongo', () => { await mongo.setPasssword(userId, newPassword); const retUser = await mongo.findUserById(userId); expect(retUser.services.password.bcrypt).toBeTruthy(); - expect(retUser.services.password.bcrypt).not.toEqual(newPassword); + expect(retUser.services.password.bcrypt).toEqual(newPassword); expect(retUser.createdAt).not.toEqual(retUser.updatedAt); }); }); diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index 0f0528116..0278a414b 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -2,17 +2,17 @@ # yarn lockfile v1 -"@accounts/common@^0.0.9": - version "0.0.9" - resolved "https://registry.yarnpkg.com/@accounts/common/-/common-0.0.9.tgz#5aa8347b81c68845331409e4a99eaf68b924ec27" +"@accounts/common@^0.0.10": + version "0.0.10" + resolved "https://registry.yarnpkg.com/@accounts/common/-/common-0.0.10.tgz#d9391f2ad9f2ba9da8451885ece4d68d919d2220" dependencies: lodash "^4.16.4" -"@accounts/server@^0.0.9": - version "0.0.9" - resolved "https://registry.yarnpkg.com/@accounts/server/-/server-0.0.9.tgz#dddcb4fbaa7ac126aca1f0c58b40c9d84820a851" +"@accounts/server@^0.0.10": + version "0.0.10" + resolved "https://registry.yarnpkg.com/@accounts/server/-/server-0.0.10.tgz#be37a531bc77f7cc24b487b02c35ed00bc586623" dependencies: - "@accounts/common" "^0.0.9" + "@accounts/common" "^0.0.10" babel-polyfill "^6.23.0" bcryptjs "^2.4.0" crypto "^0.0.3" @@ -1822,9 +1822,9 @@ flat-cache@^1.2.1: graceful-fs "^4.1.2" write "^0.2.1" -flow-bin@^0.38.0: - version "0.38.0" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.38.0.tgz#3ae096d401c969cc8b5798253fb82381e2d0237a" +flow-bin@^0.41.0: + version "0.41.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.41.0.tgz#8badac9a19da45004997e599bd316518db489b2e" for-in@^0.1.5: version "0.1.6" @@ -2925,11 +2925,7 @@ minimist@1.2.0, minimist@^1.1.1, minimist@^1.2.0: dependencies: minimist "0.0.8" -moment@2.x.x: - version "2.17.1" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.17.1.tgz#fed9506063f36b10f066c8b59a144d7faebe1d82" - -"moment@= 2.11.2": +moment@2.x.x, "moment@= 2.11.2": version "2.11.2" resolved "https://registry.yarnpkg.com/moment/-/moment-2.11.2.tgz#87968e5f95ac038c2e42ac959c75819cd3f52901" From cd831fd0ab01cc9b6f73b8a377b8187447c1f501 Mon Sep 17 00:00:00 2001 From: David Yahalomi Date: Wed, 29 Mar 2017 17:26:59 +0300 Subject: [PATCH 049/128] 0.0.9 --- packages/accounts-mongo/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 504e955bd..1314ce30b 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -1,6 +1,6 @@ { "name": "@accounts/mongo", - "version": "0.0.8", + "version": "0.0.9", "description": "MongoDB adaptor for accounts", "main": "lib/index.js", "jsnext:main": "lib-es6/index.js", From 49557be6ccdf76b474788113156d0d533f8dffba Mon Sep 17 00:00:00 2001 From: David Yahalomi Date: Wed, 29 Mar 2017 17:28:19 +0300 Subject: [PATCH 050/128] 0.0.10 --- packages/accounts-mongo/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 1314ce30b..15a4e9aa6 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -1,6 +1,6 @@ { "name": "@accounts/mongo", - "version": "0.0.9", + "version": "0.0.10", "description": "MongoDB adaptor for accounts", "main": "lib/index.js", "jsnext:main": "lib-es6/index.js", From b455426527eddedbf1c416666f113e0915dd1600 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Pradel?= Date: Thu, 18 May 2017 11:34:42 +0200 Subject: [PATCH 051/128] Merge pull request #23 from mdemri/caseinsensitiveusername case insensitive user name query --- packages/accounts-mongo/package.json | 2 +- packages/accounts-mongo/src/index.js | 7 +++++-- packages/accounts-mongo/src/index.spec.js | 9 +++++++++ packages/accounts-mongo/yarn.lock | 16 ++++------------ 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 15a4e9aa6..7ed8597a0 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -55,7 +55,7 @@ "eslint": "^3.14.1", "eslint-config-airbnb": "^14.0.0", "eslint-config-airbnb-base": "^11.0.1", - "eslint-plugin-flowtype": "^2.30.0", + "eslint-plugin-flowtype": "^2.33.0", "eslint-plugin-import": "^2.0.1", "eslint-plugin-jsx-a11y": "^3.0.2", "eslint-plugin-react": "^6.9.0", diff --git a/packages/accounts-mongo/src/index.js b/packages/accounts-mongo/src/index.js index b8ae2396f..6ee70e919 100644 --- a/packages/accounts-mongo/src/index.js +++ b/packages/accounts-mongo/src/index.js @@ -16,7 +16,8 @@ export type MongoOptionsType = { createdAt: string, updatedAt: string, }, - convertUserIdToMongoObjectId: boolean + convertUserIdToMongoObjectId: boolean, + caseSensitiveUserName: boolean }; export type MongoUserObjectType = { @@ -59,6 +60,7 @@ class Mongo { updatedAt: 'updatedAt', }, convertUserIdToMongoObjectId: true, + caseSensitiveUserName: true, }; this.options = { ...defaultOptions, ...options }; if (!db) { @@ -115,7 +117,8 @@ class Mongo { } async findUserByUsername(username: string): Promise { - const user = await this.collection.findOne({ username }); + const filter = this.options.caseSensitiveUserName ? { username } : { username: { $regex: new RegExp(username, 'i') } }; + const user = await this.collection.findOne(filter); if (user) { user.id = user._id; } diff --git a/packages/accounts-mongo/src/index.spec.js b/packages/accounts-mongo/src/index.spec.js index 34c17e33d..b6024e509 100644 --- a/packages/accounts-mongo/src/index.spec.js +++ b/packages/accounts-mongo/src/index.spec.js @@ -197,6 +197,15 @@ describe('Mongo', () => { expect(ret).not.toBeTruthy(); }); + it('should return username for case insensitive query', async () => { + const mongoWithOptions = new Mongo(db, { caseSensitiveUserName: false }); + const ret = await mongoWithOptions.findUserByUsername(user.username.toUpperCase()); + await delay(10); + expect(ret).toBeTruthy(); + expect(ret._id).toBeTruthy(); + expect(ret.id).toBeTruthy(); + }); + it('should return user', async () => { const ret = await mongo.findUserByUsername(user.username); await delay(10); diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index 0278a414b..720143356 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -797,15 +797,7 @@ babel-plugin-transform-strict-mode@^6.22.0: babel-runtime "^6.22.0" babel-types "^6.22.0" -babel-polyfill@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.22.0.tgz#1ac99ebdcc6ba4db1e2618c387b2084a82154a3b" - dependencies: - babel-runtime "^6.22.0" - core-js "^2.4.0" - regenerator-runtime "^0.10.0" - -babel-polyfill@^6.23.0: +babel-polyfill@^6.22.0, babel-polyfill@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.23.0.tgz#8364ca62df8eafb830499f699177466c3b03499d" dependencies: @@ -1592,9 +1584,9 @@ eslint-module-utils@^2.0.0: debug "2.2.0" pkg-dir "^1.0.0" -eslint-plugin-flowtype@^2.30.0: - version "2.30.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.30.0.tgz#3054a265f9c8afe3046c3d41b72d32a736f9b4ae" +eslint-plugin-flowtype@^2.33.0: + version "2.33.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.33.0.tgz#b2783814ed2ddcf729953b8f65ff73c90cabee4b" dependencies: lodash "^4.15.0" From 264a3e37cf1b4caccb961f0e258ed3d20d680460 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pradel=20Le=CC=81o?= Date: Thu, 18 May 2017 11:37:13 +0200 Subject: [PATCH 052/128] v0.0.11 --- packages/accounts-mongo/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 7ed8597a0..a48fff768 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -1,6 +1,6 @@ { "name": "@accounts/mongo", - "version": "0.0.10", + "version": "0.0.11", "description": "MongoDB adaptor for accounts", "main": "lib/index.js", "jsnext:main": "lib-es6/index.js", From 6f3cb073b937447c18c51fe4a8c12f6da057f5f5 Mon Sep 17 00:00:00 2001 From: David Yahalomi Date: Thu, 25 May 2017 00:24:20 +0300 Subject: [PATCH 053/128] Merge pull request #24 from js-accounts/fix-caseinsensitive-vulnerability fix case insensitive vulnerability --- packages/accounts-mongo/package.json | 2 +- packages/accounts-mongo/src/index.js | 4 +++- packages/accounts-mongo/src/index.spec.js | 14 ++++++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index a48fff768..3b067e817 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -1,6 +1,6 @@ { "name": "@accounts/mongo", - "version": "0.0.11", + "version": "0.0.12-0", "description": "MongoDB adaptor for accounts", "main": "lib/index.js", "jsnext:main": "lib-es6/index.js", diff --git a/packages/accounts-mongo/src/index.js b/packages/accounts-mongo/src/index.js index 6ee70e919..e7b45b558 100644 --- a/packages/accounts-mongo/src/index.js +++ b/packages/accounts-mongo/src/index.js @@ -117,7 +117,9 @@ class Mongo { } async findUserByUsername(username: string): Promise { - const filter = this.options.caseSensitiveUserName ? { username } : { username: { $regex: new RegExp(username, 'i') } }; + const filter = this.options.caseSensitiveUserName ? + { username } : + { $where: `obj.username && (obj.username.toLowerCase() === "${username.toLowerCase()}")` }; const user = await this.collection.findOne(filter); if (user) { user.id = user._id; diff --git a/packages/accounts-mongo/src/index.spec.js b/packages/accounts-mongo/src/index.spec.js index b6024e509..f801c816b 100644 --- a/packages/accounts-mongo/src/index.spec.js +++ b/packages/accounts-mongo/src/index.spec.js @@ -206,6 +206,20 @@ describe('Mongo', () => { expect(ret.id).toBeTruthy(); }); + it('should return null for incomplete matching user when using insensitive', async () => { + const mongoWithOptions = new Mongo(db, { caseSensitiveUserName: false }); + const ret = await mongoWithOptions.findUserByUsername('john'); + await delay(10); + expect(ret).not.toBeTruthy(); + }); + + it('should return null when using regex wildcards when using insensitive', async () => { + const mongoWithOptions = new Mongo(db, { caseSensitiveUserName: false }); + const ret = await mongoWithOptions.findUserByUsername('*'); + await delay(10); + expect(ret).not.toBeTruthy(); + }); + it('should return user', async () => { const ret = await mongo.findUserByUsername(user.username); await delay(10); From b2890e0e1eb8972f4b2cc4f613abdfaae5080404 Mon Sep 17 00:00:00 2001 From: David Yahalomi Date: Tue, 18 Jul 2017 11:28:10 +0300 Subject: [PATCH 054/128] Merge pull request #26 from stephschuster/master session options --- packages/accounts-mongo/src/index.js | 50 +++++++++++++++++------ packages/accounts-mongo/src/index.spec.js | 46 ++++++++++++++++++++- 2 files changed, 82 insertions(+), 14 deletions(-) diff --git a/packages/accounts-mongo/src/index.js b/packages/accounts-mongo/src/index.js index e7b45b558..9d1748762 100644 --- a/packages/accounts-mongo/src/index.js +++ b/packages/accounts-mongo/src/index.js @@ -17,7 +17,10 @@ export type MongoOptionsType = { updatedAt: string, }, convertUserIdToMongoObjectId: boolean, - caseSensitiveUserName: boolean + convertSessionIdToMongoObjectId: boolean, + caseSensitiveUserName: boolean, + idProvider: ?(() => string | Object), + dateProvider: (date?: Date) => any, }; export type MongoUserObjectType = { @@ -61,6 +64,9 @@ class Mongo { }, convertUserIdToMongoObjectId: true, caseSensitiveUserName: true, + convertSessionIdToMongoObjectId: true, + idProvider: null, + dateProvider: ((date?: Date) => (date ? date.getTime() : Date.now())), }; this.options = { ...defaultOptions, ...options }; if (!db) { @@ -77,7 +83,7 @@ class Mongo { } async createUser(options: CreateUserType): Promise { - const user: MongoUserObjectType = { + let user: MongoUserObjectType = { services: {}, profile: {}, [this.options.timestamps.createdAt]: Date.now(), @@ -95,6 +101,12 @@ class Mongo { if (options.profile) { user.profile = options.profile; } + if (options.idProvider) { + user = { + ...user, + _id: options.idProvider(), + }; + } const ret = await this.collection.insertOne(user); return ret.ops[0]._id; } @@ -219,33 +231,44 @@ class Mongo { return profile; } - async createSession(userId: string, ip: string, userAgent: string): Promise { - const ret = await this.sessionCollection.insertOne({ + async createSession(userId: string, ip: string, userAgent: string, + extraData: ?Object): Promise { + let session = { userId, userAgent, ip, + extraData, valid: true, - [this.options.timestamps.createdAt]: Date.now(), - [this.options.timestamps.updatedAt]: Date.now(), - }); + [this.options.timestamps.createdAt]: this.options.dateProvider(), + [this.options.timestamps.updatedAt]: this.options.dateProvider(), + }; + if (this.options.idProvider) { + session = { + ...session, + _id: this.options.idProvider(), + }; + } + const ret = await this.sessionCollection.insertOne(session); return ret.ops[0]._id; } async updateSession(sessionId: string, ip: string, userAgent: string): Promise { - await this.sessionCollection.update({ _id: toMongoID(sessionId) }, { + const _id = this.options.convertSessionIdToMongoObjectId ? toMongoID(sessionId) : sessionId; + await this.sessionCollection.update({ _id }, { $set: { ip, userAgent, - [this.options.timestamps.updatedAt]: Date.now(), + [this.options.timestamps.updatedAt]: this.options.dateProvider(), }, }); } async invalidateSession(sessionId: string): Promise { - await this.sessionCollection.update({ _id: toMongoID(sessionId) }, { + const id = this.options.convertSessionIdToMongoObjectId ? toMongoID(sessionId) : sessionId; + await this.sessionCollection.update({ _id: id }, { $set: { valid: false, - [this.options.timestamps.updatedAt]: Date.now(), + [this.options.timestamps.updatedAt]: this.options.dateProvider(), }, }); } @@ -254,13 +277,14 @@ class Mongo { await this.sessionCollection.updateMany({ userId }, { $set: { valid: false, - [this.options.timestamps.updatedAt]: Date.now(), + [this.options.timestamps.updatedAt]: this.options.dateProvider(), }, }); } findSessionById(sessionId: string): Promise { - return this.sessionCollection.findOne({ _id: toMongoID(sessionId) }); + const _id = this.options.convertSessionIdToMongoObjectId ? toMongoID(sessionId) : sessionId; + return this.sessionCollection.findOne({ _id }); } async addEmailVerificationToken(userId: string, email: string, token: string): Promise { diff --git a/packages/accounts-mongo/src/index.spec.js b/packages/accounts-mongo/src/index.spec.js index f801c816b..5d3ecf682 100644 --- a/packages/accounts-mongo/src/index.spec.js +++ b/packages/accounts-mongo/src/index.spec.js @@ -1,4 +1,4 @@ -import mongodb from 'mongodb'; +import mongodb, { ObjectID } from 'mongodb'; import Mongo from './index'; let mongo; @@ -403,8 +403,52 @@ describe('Mongo', () => { expect(ret.userAgent).toEqual(session.userAgent); expect(ret.valid).toEqual(true); expect(ret.createdAt).toBeTruthy(); + expect(ret.createdAt).toEqual(new Date(ret.createdAt).getTime()); expect(ret.updatedAt).toBeTruthy(); }); + + it('should create session with extra data', async () => { + const impersonatorUserId = '789'; + const sessionId = await mongo.createSession(session.userId, + session.ip, + session.userAgent, + { impersonatorUserId }); + const ret = await mongo.findSessionById(sessionId); + expect(ret).toBeTruthy(); + expect(ret._id).toBeTruthy(); + expect(ret.userId).toEqual(session.userId); + expect(ret.ip).toEqual(session.ip); + expect(ret.userAgent).toEqual(session.userAgent); + expect(ret.valid).toEqual(true); + expect(ret.createdAt).toEqual(new Date(ret.createdAt).getTime()); + expect(ret.updatedAt).toBeTruthy(); + expect(ret.extraData).toEqual({ impersonatorUserId }); + }); + + it('using date provider on create session', async () => { + const mongoTestOptions = new Mongo(db, { + dateProvider: (() => new Date()), + }); + const sessionId = + await mongoTestOptions.createSession(session.userId, session.ip, session.userAgent); + const ret = await mongoTestOptions.findSessionById(sessionId); + expect(ret.createdAt).toBeTruthy(); + expect(ret.createdAt).not.toEqual(new Date(ret.createdAt).getTime()); + expect(ret.createdAt).toEqual(new Date(ret.createdAt)); + }); + + it('using id provider on create session', async () => { + const mongoTestOptions = new Mongo(db, { + idProvider: () => new ObjectID().toHexString(), + convertSessionIdToMongoObjectId: false, + }); + const sessionId = + await mongoTestOptions.createSession(session.userId, session.ip, session.userAgent); + const ret = await mongoTestOptions.findSessionById(sessionId); + expect(ret._id).toBeTruthy(); + expect(ret._id).not.toEqual(new ObjectID(ret._id)); + expect(ret._id).toEqual(new ObjectID(ret._id).toHexString()); + }); }); describe('findSessionById', () => { From 36f5933db32d9836ffd60c68e1a818bc5cb5c182 Mon Sep 17 00:00:00 2001 From: David Yahalomi Date: Thu, 20 Jul 2017 17:54:52 +0300 Subject: [PATCH 055/128] 0.0.12 --- packages/accounts-mongo/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 3b067e817..1bb7abde0 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -1,6 +1,6 @@ { "name": "@accounts/mongo", - "version": "0.0.12-0", + "version": "0.0.12", "description": "MongoDB adaptor for accounts", "main": "lib/index.js", "jsnext:main": "lib-es6/index.js", From f18d6a87fb9077fe6c470b335fcc74a361a86b92 Mon Sep 17 00:00:00 2001 From: David Yahalomi Date: Sat, 16 Sep 2017 12:21:43 -0800 Subject: [PATCH 056/128] Merge pull request #25 from js-accounts/migrate-next migrate to next --- packages/accounts-mongo/.babelrc | 10 - packages/accounts-mongo/.eslintrc | 17 - packages/accounts-mongo/.flowconfig | 8 - packages/accounts-mongo/.npmignore | 2 - .../{src/index.spec.js => __tests__/index.ts} | 117 +- packages/accounts-mongo/circle.yml | 2 +- packages/accounts-mongo/package.json | 73 +- packages/accounts-mongo/src/index.js | 321 -- packages/accounts-mongo/src/index.ts | 411 +++ packages/accounts-mongo/tsconfig.json | 21 + packages/accounts-mongo/tslint.json | 5 + packages/accounts-mongo/webpack.config.js | 35 - packages/accounts-mongo/yarn.lock | 3217 +++++------------ 13 files changed, 1455 insertions(+), 2784 deletions(-) delete mode 100644 packages/accounts-mongo/.babelrc delete mode 100644 packages/accounts-mongo/.eslintrc delete mode 100644 packages/accounts-mongo/.flowconfig delete mode 100644 packages/accounts-mongo/.npmignore rename packages/accounts-mongo/{src/index.spec.js => __tests__/index.ts} (89%) delete mode 100644 packages/accounts-mongo/src/index.js create mode 100644 packages/accounts-mongo/src/index.ts create mode 100644 packages/accounts-mongo/tsconfig.json create mode 100644 packages/accounts-mongo/tslint.json delete mode 100644 packages/accounts-mongo/webpack.config.js diff --git a/packages/accounts-mongo/.babelrc b/packages/accounts-mongo/.babelrc deleted file mode 100644 index a6a42104f..000000000 --- a/packages/accounts-mongo/.babelrc +++ /dev/null @@ -1,10 +0,0 @@ -{ - "presets": [ - "es2015" - ], - "plugins": [ - "transform-async-to-generator", - "transform-object-rest-spread", - "transform-flow-strip-types" - ] -} diff --git a/packages/accounts-mongo/.eslintrc b/packages/accounts-mongo/.eslintrc deleted file mode 100644 index 7a1c5ba9d..000000000 --- a/packages/accounts-mongo/.eslintrc +++ /dev/null @@ -1,17 +0,0 @@ -{ - "parser": "babel-eslint", - "extends": [ - "airbnb", - "plugin:flowtype/recommended" - ], - "plugins": [ - "flowtype" - ], - "env": { - "node": true, - "jest": true - }, - "rules": { - "no-underscore-dangle": ["error", { "allow": ["_id"] }] - } -} diff --git a/packages/accounts-mongo/.flowconfig b/packages/accounts-mongo/.flowconfig deleted file mode 100644 index 4720ff6c7..000000000 --- a/packages/accounts-mongo/.flowconfig +++ /dev/null @@ -1,8 +0,0 @@ -[ignore] -.*bower.json - -[include] - -[libs] - -[options] diff --git a/packages/accounts-mongo/.npmignore b/packages/accounts-mongo/.npmignore deleted file mode 100644 index 729ea5b71..000000000 --- a/packages/accounts-mongo/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -src/ -coverage/ diff --git a/packages/accounts-mongo/src/index.spec.js b/packages/accounts-mongo/__tests__/index.ts similarity index 89% rename from packages/accounts-mongo/src/index.spec.js rename to packages/accounts-mongo/__tests__/index.ts index 5d3ecf682..d83b4ac29 100644 --- a/packages/accounts-mongo/src/index.spec.js +++ b/packages/accounts-mongo/__tests__/index.ts @@ -1,5 +1,6 @@ -import mongodb, { ObjectID } from 'mongodb'; -import Mongo from './index'; +import * as mongodb from 'mongodb'; +import { ObjectID } from 'mongodb'; +import Mongo from '../src'; let mongo; let db; @@ -16,8 +17,10 @@ const session = { }; function dropDatabase(cb) { - db.dropDatabase((err) => { - if (err) return cb(err); + db.dropDatabase(err => { + if (err) { + return cb(err); + } return cb(); }); } @@ -27,17 +30,21 @@ function createConnection(cb) { mongodb.MongoClient.connect(url, (err, dbArg) => { db = dbArg; mongo = new Mongo(db); - if (err) return cb(err); - return dropDatabase((error) => { + if (err) { + return cb(err); + } + return dropDatabase(error => { cb(error); }); }); } function closeConnection(cb) { - dropDatabase((err) => { + dropDatabase(err => { db.close(); - if (err) return cb(err); + if (err) { + return cb(err); + } return cb(); }); } @@ -61,17 +68,24 @@ describe('Mongo', () => { await mongo.findUserById('invalid_hex'); throw new Error(); } catch (err) { - expect(err.message).toEqual('Argument passed in must be a single String of 12 bytes or a string of 24 hex characters'); + expect(err.message).toEqual( + 'Argument passed in must be a single String of 12 bytes or a string of 24 hex characters' + ); } }); it('should not auto convert to mongo object id when users collection has string ids', async () => { - const mongoWithStringIds = new Mongo(db, { convertUserIdToMongoObjectId: false }); + const mongoWithStringIds = new Mongo(db, { + convertUserIdToMongoObjectId: false, + }); const mockFindOne = jest.fn(); mongoWithStringIds.collection.findOne = mockFindOne; await mongoWithStringIds.findUserById('589871d1c9393d445745a57c'); - expect(mockFindOne.mock.calls[0][0]).toHaveProperty('_id', '589871d1c9393d445745a57c'); + expect(mockFindOne.mock.calls[0][0]).toHaveProperty( + '_id', + '589871d1c9393d445745a57c' + ); }); }); @@ -87,12 +101,15 @@ describe('Mongo', () => { }); expect(mongoTestOptions.options).toBeTruthy(); expect(mongoTestOptions.options.collectionName).toEqual('users-test'); - expect(mongoTestOptions.options.sessionCollectionName).toEqual('sessions-test'); + expect(mongoTestOptions.options.sessionCollectionName).toEqual( + 'sessions-test' + ); }); it('should throw with an invalid database connection object', () => { try { - new Mongo(); // eslint-disable-line no-new + // tslint:disable-next-line + new Mongo(); throw new Error(); } catch (err) { expect(err.message).toBe('A database connection is required'); @@ -110,7 +127,7 @@ describe('Mongo', () => { expect(ret['emails.address_1'][0]).toEqual(['emails.address', 1]); }); - afterAll((done) => { + afterAll(done => { dropDatabase(done); }); }); @@ -199,7 +216,9 @@ describe('Mongo', () => { it('should return username for case insensitive query', async () => { const mongoWithOptions = new Mongo(db, { caseSensitiveUserName: false }); - const ret = await mongoWithOptions.findUserByUsername(user.username.toUpperCase()); + const ret = await mongoWithOptions.findUserByUsername( + user.username.toUpperCase() + ); await delay(10); expect(ret).toBeTruthy(); expect(ret._id).toBeTruthy(); @@ -394,7 +413,11 @@ describe('Mongo', () => { describe('createSession', () => { it('should create session', async () => { - const sessionId = await mongo.createSession(session.userId, session.ip, session.userAgent); + const sessionId = await mongo.createSession( + session.userId, + session.ip, + session.userAgent + ); const ret = await mongo.findSessionById(sessionId); expect(ret).toBeTruthy(); expect(ret._id).toBeTruthy(); @@ -409,10 +432,12 @@ describe('Mongo', () => { it('should create session with extra data', async () => { const impersonatorUserId = '789'; - const sessionId = await mongo.createSession(session.userId, - session.ip, - session.userAgent, - { impersonatorUserId }); + const sessionId = await mongo.createSession( + session.userId, + session.ip, + session.userAgent, + { impersonatorUserId } + ); const ret = await mongo.findSessionById(sessionId); expect(ret).toBeTruthy(); expect(ret._id).toBeTruthy(); @@ -427,10 +452,13 @@ describe('Mongo', () => { it('using date provider on create session', async () => { const mongoTestOptions = new Mongo(db, { - dateProvider: (() => new Date()), + dateProvider: () => new Date(), }); - const sessionId = - await mongoTestOptions.createSession(session.userId, session.ip, session.userAgent); + const sessionId = await mongoTestOptions.createSession( + session.userId, + session.ip, + session.userAgent + ); const ret = await mongoTestOptions.findSessionById(sessionId); expect(ret.createdAt).toBeTruthy(); expect(ret.createdAt).not.toEqual(new Date(ret.createdAt).getTime()); @@ -442,8 +470,11 @@ describe('Mongo', () => { idProvider: () => new ObjectID().toHexString(), convertSessionIdToMongoObjectId: false, }); - const sessionId = - await mongoTestOptions.createSession(session.userId, session.ip, session.userAgent); + const sessionId = await mongoTestOptions.createSession( + session.userId, + session.ip, + session.userAgent + ); const ret = await mongoTestOptions.findSessionById(sessionId); expect(ret._id).toBeTruthy(); expect(ret._id).not.toEqual(new ObjectID(ret._id)); @@ -466,7 +497,11 @@ describe('Mongo', () => { describe('updateSession', () => { it('should update session', async () => { - const sessionId = await mongo.createSession(session.userId, session.ip, session.userAgent); + const sessionId = await mongo.createSession( + session.userId, + session.ip, + session.userAgent + ); await delay(10); await mongo.updateSession(sessionId, 'new ip', 'new user agent'); const ret = await mongo.findSessionById(sessionId); @@ -482,7 +517,11 @@ describe('Mongo', () => { describe('invalidateSession', () => { it('invalidates a session', async () => { - const sessionId = await mongo.createSession(session.userId, session.ip, session.userAgent); + const sessionId = await mongo.createSession( + session.userId, + session.ip, + session.userAgent + ); await delay(10); await mongo.invalidateSession(sessionId); const ret = await mongo.findSessionById(sessionId); @@ -493,8 +532,16 @@ describe('Mongo', () => { describe('invalidateAllSessions', () => { it('invalidates all sessions', async () => { - const sessionId1 = await mongo.createSession(session.userId, session.ip, session.userAgent); - const sessionId2 = await mongo.createSession(session.userId, session.ip, session.userAgent); + const sessionId1 = await mongo.createSession( + session.userId, + session.ip, + session.userAgent + ); + const sessionId2 = await mongo.createSession( + session.userId, + session.ip, + session.userAgent + ); await delay(10); await mongo.invalidateAllSessions(session.userId); const session1 = await mongo.findSessionById(sessionId1); @@ -512,8 +559,12 @@ describe('Mongo', () => { await mongo.addEmailVerificationToken(userId, 'john@doe.com', 'token'); const retUser = await mongo.findUserById(userId); expect(retUser.services.email.verificationTokens.length).toEqual(1); - expect(retUser.services.email.verificationTokens[0].address).toEqual('john@doe.com'); - expect(retUser.services.email.verificationTokens[0].token).toEqual('token'); + expect(retUser.services.email.verificationTokens[0].address).toEqual( + 'john@doe.com' + ); + expect(retUser.services.email.verificationTokens[0].token).toEqual( + 'token' + ); expect(retUser.services.email.verificationTokens[0].when).toBeTruthy(); }); }); @@ -524,7 +575,9 @@ describe('Mongo', () => { await mongo.addResetPasswordToken(userId, 'john@doe.com', 'token'); const retUser = await mongo.findUserById(userId); expect(retUser.services.password.reset.length).toEqual(1); - expect(retUser.services.password.reset[0].address).toEqual('john@doe.com'); + expect(retUser.services.password.reset[0].address).toEqual( + 'john@doe.com' + ); expect(retUser.services.password.reset[0].token).toEqual('token'); expect(retUser.services.password.reset[0].when).toBeTruthy(); expect(retUser.services.password.reset[0].reason).toEqual('reset'); diff --git a/packages/accounts-mongo/circle.yml b/packages/accounts-mongo/circle.yml index e2ed6e3e3..90dbf9ac4 100644 --- a/packages/accounts-mongo/circle.yml +++ b/packages/accounts-mongo/circle.yml @@ -22,6 +22,6 @@ dependencies: test: override: - - yarn test-ci + - yarn test post: - yarn coveralls diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 1bb7abde0..25b949125 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -1,32 +1,33 @@ { "name": "@accounts/mongo", - "version": "0.0.12", + "version": "0.1.0", "description": "MongoDB adaptor for accounts", "main": "lib/index.js", "jsnext:main": "lib-es6/index.js", "scripts": { - "start": "webpack -p --config --progress --watch", + "start": "tsc --watch", "compile": "npm run compile:es6 && npm run compile:umd", - "compile:es6": "babel ./src --out-dir ./lib-es6 --ignore *.spec.js", - "compile:umd": "webpack", - "flow": "flow; test $? -eq 0 -o $? -eq 2", - "flow:check": "flow check", - "prepare": "yarn compile", - "pretest": "yarn compile", - "test": "yarn testonly", - "posttest": "yarn lint", - "test-ci": "yarn lint && yarn coverage", + "compile:es6": "tsc", + "compile:umd": "tsc", + "test": "yarn lint && yarn coverage && yarn prettier-diff", "testonly": "jest", - "lint": "eslint src", + "lint": "tslint -c tslint.json '{src,__tests__}/**/*.ts'", + "prettier": "prettier --single-quote --trailing-comma es5 --parser typescript '{src,__tests__}/**/*.ts'", + "prettier-diff": "yarn prettier -- --list-different", + "format": "yarn prettier -- --write", "coverage": "yarn testonly -- --coverage", "coveralls": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage" }, "jest": { - "testEnvironment": "node", - "testRegex": "(/.*.(test|spec)).(js|jsx)$", - "testPathDirs": [ - "src" - ] + "transform": { + ".(ts|tsx)": "/node_modules/ts-jest/preprocessor.js" + }, + "testRegex": "./__tests__/.*.ts$", + "moduleFileExtensions": [ + "ts", + "js" + ], + "mapCoverage": true }, "repository": { "type": "git", @@ -39,37 +40,23 @@ }, "homepage": "https://github.com/js-accounts/mongo", "devDependencies": { - "@accounts/common": "^0.0.10", - "@accounts/server": "^0.0.10", - "babel-cli": "^6.22.2", - "babel-core": "^6.22.1", - "babel-eslint": "^7.0.0", - "babel-loader": "^6.2.5", - "babel-plugin-transform-async-to-generator": "^6.22.0", - "babel-plugin-transform-flow-strip-types": "^6.22.0", - "babel-plugin-transform-object-rest-spread": "^6.22.0", - "babel-plugin-transform-runtime": "^6.23.0", - "babel-preset-es2015": "^6.22.0", - "babel-preset-stage-0": "^6.22.0", - "coveralls": "^2.11.14", - "eslint": "^3.14.1", - "eslint-config-airbnb": "^14.0.0", - "eslint-config-airbnb-base": "^11.0.1", - "eslint-plugin-flowtype": "^2.33.0", - "eslint-plugin-import": "^2.0.1", - "eslint-plugin-jsx-a11y": "^3.0.2", - "eslint-plugin-react": "^6.9.0", - "flow-bin": "^0.41.0", - "jest": "^18.1.0", - "webpack": "^1.14.0", - "webpack-node-externals": "^1.5.4" + "@accounts/server": "^0.0.17", + "@accounts/tslint-config-accounts": "^0.0.4", + "@types/jest": "^20.0.2", + "@types/mongodb": "^2.2.7", + "@types/node": "^8.0.10", + "coveralls": "^2.13.1", + "jest": "^20.0.4", + "prettier": "^1.5.2", + "ts-jest": "^20.0.7", + "tslint": "^5.5.0", + "typescript": "^2.4.1" }, "peerDependencies": { - "@accounts/common": "^0.0.10", "@accounts/server": "^0.0.10" }, "dependencies": { "lodash": "^4.17.4", - "mongodb": "^2.2.22" + "mongodb": "^2.2.30" } } diff --git a/packages/accounts-mongo/src/index.js b/packages/accounts-mongo/src/index.js deleted file mode 100644 index 9d1748762..000000000 --- a/packages/accounts-mongo/src/index.js +++ /dev/null @@ -1,321 +0,0 @@ -// @flow - -import type { DBInterface } from '@accounts/server'; -import type { - CreateUserType, - UserObjectType, - SessionType, -} from '@accounts/common'; -import { ObjectID } from 'mongodb'; -import get from 'lodash/get'; - -export type MongoOptionsType = { - collectionName: string, - sessionCollectionName: string, - timestamps: { - createdAt: string, - updatedAt: string, - }, - convertUserIdToMongoObjectId: boolean, - convertSessionIdToMongoObjectId: boolean, - caseSensitiveUserName: boolean, - idProvider: ?(() => string | Object), - dateProvider: (date?: Date) => any, -}; - -export type MongoUserObjectType = { - username?: string, - profile?: Object, - services: { - password?: { - bcrypt: string, - }, - }, - emails?: [{ - address: string, - verified: boolean, - }], -}; - -const toMongoID = (objectId) => { - if (typeof objectId === 'string') { - return new ObjectID(objectId); - } - - return objectId; -}; - -class Mongo { - options: MongoOptionsType; - // TODO definition for mongodb connection object - db: any; - collection: any; - sessionCollection: any; - - constructor(db: any, options: MongoOptionsType) { - // eslint-disable-next-line no-unused-expressions - (this: DBInterface); - const defaultOptions = { - collectionName: 'users', - sessionCollectionName: 'sessions', - timestamps: { - createdAt: 'createdAt', - updatedAt: 'updatedAt', - }, - convertUserIdToMongoObjectId: true, - caseSensitiveUserName: true, - convertSessionIdToMongoObjectId: true, - idProvider: null, - dateProvider: ((date?: Date) => (date ? date.getTime() : Date.now())), - }; - this.options = { ...defaultOptions, ...options }; - if (!db) { - throw new Error('A database connection is required'); - } - this.db = db; - this.collection = this.db.collection(this.options.collectionName); - this.sessionCollection = this.db.collection(this.options.sessionCollectionName); - } - - async setupIndexes(): Promise { - await this.collection.createIndex('username', { unique: 1, sparse: 1 }); - await this.collection.createIndex('emails.address', { unique: 1, sparse: 1 }); - } - - async createUser(options: CreateUserType): Promise { - let user: MongoUserObjectType = { - services: {}, - profile: {}, - [this.options.timestamps.createdAt]: Date.now(), - [this.options.timestamps.updatedAt]: Date.now(), - }; - if (options.password) { - user.services.password = { bcrypt: options.password }; - } - if (options.username) { - user.username = options.username; - } - if (options.email) { - user.emails = [{ address: options.email.toLowerCase(), verified: false }]; - } - if (options.profile) { - user.profile = options.profile; - } - if (options.idProvider) { - user = { - ...user, - _id: options.idProvider(), - }; - } - const ret = await this.collection.insertOne(user); - return ret.ops[0]._id; - } - - async findUserById(userId: string): Promise { - const _id = this.options.convertUserIdToMongoObjectId ? toMongoID(userId) : userId; - const user = await this.collection.findOne({ _id }); - if (user) { - user.id = user._id; - } - return user; - } - - async findUserByEmail(email: string): Promise { - const user = await this.collection.findOne({ 'emails.address': email.toLowerCase() }); - if (user) { - user.id = user._id; - } - return user; - } - - async findUserByUsername(username: string): Promise { - const filter = this.options.caseSensitiveUserName ? - { username } : - { $where: `obj.username && (obj.username.toLowerCase() === "${username.toLowerCase()}")` }; - const user = await this.collection.findOne(filter); - if (user) { - user.id = user._id; - } - return user; - } - - async findUserByEmailVerificationToken(token: string): Promise { - const user = await this.collection.findOne({ 'services.email.verificationTokens.token': token }); - if (user) { - user.id = user._id; - } - return user; - } - - async findUserByResetPasswordToken(token: string): Promise { - const user = await this.collection.findOne({ 'services.password.reset.token': token }); - if (user) { - user.id = user._id; - } - return user; - } - - async findPasswordHash(userId: string): Promise { - const id = this.options.convertUserIdToMongoObjectId ? toMongoID(userId) : userId; - const user = await this.findUserById(id); - if (user) { - return get(user, 'services.password.bcrypt'); - } - return null; - } - - async addEmail(userId: string, newEmail: string, verified: boolean): Promise { - const _id = this.options.convertUserIdToMongoObjectId ? toMongoID(userId) : userId; - const ret = await this.collection.update({ _id }, { - $addToSet: { - emails: { - address: newEmail.toLowerCase(), - verified, - }, - }, - $set: { [this.options.timestamps.updatedAt]: Date.now() }, - }); - if (ret.result.nModified === 0) { - throw new Error('User not found'); - } - } - - async removeEmail(userId: string, email: string): Promise { - const _id = this.options.convertUserIdToMongoObjectId ? toMongoID(userId) : userId; - const ret = await this.collection.update({ _id }, { - $pull: { emails: { address: email.toLowerCase() } }, - $set: { [this.options.timestamps.updatedAt]: Date.now() }, - }); - if (ret.result.nModified === 0) { - throw new Error('User not found'); - } - } - - async setUsername(userId: string, newUsername: string): Promise { - const _id = this.options.convertUserIdToMongoObjectId ? toMongoID(userId) : userId; - const ret = await this.collection.update({ _id }, { - $set: { - username: newUsername, - [this.options.timestamps.updatedAt]: Date.now(), - }, - }); - if (ret.result.nModified === 0) { - throw new Error('User not found'); - } - } - - async setPasssword(userId: string, newPassword: string): Promise { - const _id = this.options.convertUserIdToMongoObjectId ? toMongoID(userId) : userId; - const ret = await this.collection.update({ _id }, { - $set: { - 'services.password.bcrypt': newPassword, - [this.options.timestamps.updatedAt]: Date.now(), - }, - $unset: { - 'services.password.reset': '', - }, - }); - if (ret.result.nModified === 0) { - throw new Error('User not found'); - } - } - - async setProfile(userId: string, profile: Object): Promise { - const _id = this.options.convertUserIdToMongoObjectId ? toMongoID(userId) : userId; - await this.collection.update({ _id }, { - $set: { - profile, - [this.options.timestamps.updatedAt]: Date.now(), - }, - }); - return profile; - } - - async createSession(userId: string, ip: string, userAgent: string, - extraData: ?Object): Promise { - let session = { - userId, - userAgent, - ip, - extraData, - valid: true, - [this.options.timestamps.createdAt]: this.options.dateProvider(), - [this.options.timestamps.updatedAt]: this.options.dateProvider(), - }; - if (this.options.idProvider) { - session = { - ...session, - _id: this.options.idProvider(), - }; - } - const ret = await this.sessionCollection.insertOne(session); - return ret.ops[0]._id; - } - - async updateSession(sessionId: string, ip: string, userAgent: string): Promise { - const _id = this.options.convertSessionIdToMongoObjectId ? toMongoID(sessionId) : sessionId; - await this.sessionCollection.update({ _id }, { - $set: { - ip, - userAgent, - [this.options.timestamps.updatedAt]: this.options.dateProvider(), - }, - }); - } - - async invalidateSession(sessionId: string): Promise { - const id = this.options.convertSessionIdToMongoObjectId ? toMongoID(sessionId) : sessionId; - await this.sessionCollection.update({ _id: id }, { - $set: { - valid: false, - [this.options.timestamps.updatedAt]: this.options.dateProvider(), - }, - }); - } - - async invalidateAllSessions(userId: string): Promise { - await this.sessionCollection.updateMany({ userId }, { - $set: { - valid: false, - [this.options.timestamps.updatedAt]: this.options.dateProvider(), - }, - }); - } - - findSessionById(sessionId: string): Promise { - const _id = this.options.convertSessionIdToMongoObjectId ? toMongoID(sessionId) : sessionId; - return this.sessionCollection.findOne({ _id }); - } - - async addEmailVerificationToken(userId: string, email: string, token: string): Promise { - await this.collection.update({ _id: userId }, { - $push: { - 'services.email.verificationTokens': { - token, - address: email.toLowerCase(), - when: Date.now(), - }, - }, - }); - } - - async addResetPasswordToken(userId: string, email: string, token: string, reason: string = 'reset'): Promise { - await this.collection.update({ _id: userId }, { - $push: { - 'services.password.reset': { - token, - address: email.toLowerCase(), - when: Date.now(), - reason, - }, - }, - }); - } - - // eslint-disable-next-line max-len - async setResetPasssword(userId: string, email: string, newPassword: string): Promise { - await this.setPasssword(userId, newPassword); - } -} - -export default Mongo; diff --git a/packages/accounts-mongo/src/index.ts b/packages/accounts-mongo/src/index.ts new file mode 100644 index 000000000..f2de59567 --- /dev/null +++ b/packages/accounts-mongo/src/index.ts @@ -0,0 +1,411 @@ +import { ObjectID } from 'mongodb'; +import { get } from 'lodash'; +import { CreateUserType, UserObjectType, SessionType } from '@accounts/server'; + +export interface MongoOptionsType { + collectionName?: string; + sessionCollectionName?: string; + timestamps?: { + createdAt: string; + updatedAt: string; + }; + convertUserIdToMongoObjectId?: boolean; + convertSessionIdToMongoObjectId?: boolean; + caseSensitiveUserName?: boolean; + idProvider?: () => string | object; + dateProvider?: (date?: Date) => any; +} + +export interface MongoUserObjectType { + _id?: string | object; + username?: string; + profile?: object; + services: { + password?: { + bcrypt: string; + }; + }; + emails?: [ + { + address: string; + verified: boolean; + } + ]; +} + +const toMongoID = objectId => { + if (typeof objectId === 'string') { + return new ObjectID(objectId); + } + return objectId; +}; + +const defaultOptions = { + collectionName: 'users', + sessionCollectionName: 'sessions', + timestamps: { + createdAt: 'createdAt', + updatedAt: 'updatedAt', + }, + convertUserIdToMongoObjectId: true, + convertSessionIdToMongoObjectId: true, + caseSensitiveUserName: true, + idProvider: null, + dateProvider: (date?: Date) => (date ? date.getTime() : Date.now()), +}; + +export default class Mongo { + // Options of Mongo class + private options: MongoOptionsType; + // Db object + private db: any; + // Account collection + private collection: any; + // Session collection + private sessionCollection: any; + + constructor(db: any, options?: MongoOptionsType) { + this.options = { ...defaultOptions, ...options }; + if (!db) { + throw new Error('A database connection is required'); + } + this.db = db; + this.collection = this.db.collection(this.options.collectionName); + this.sessionCollection = this.db.collection( + this.options.sessionCollectionName + ); + } + + public async setupIndexes(): Promise { + await this.collection.createIndex('username', { unique: 1, sparse: 1 }); + await this.collection.createIndex('emails.address', { + unique: 1, + sparse: 1, + }); + } + + public async createUser(options: CreateUserType): Promise { + const user: MongoUserObjectType = { + services: {}, + profile: {}, + [this.options.timestamps.createdAt]: Date.now(), + [this.options.timestamps.updatedAt]: Date.now(), + }; + if (options.password) { + user.services.password = { bcrypt: options.password }; + } + if (options.username) { + user.username = options.username; + } + if (options.email) { + user.emails = [{ address: options.email.toLowerCase(), verified: false }]; + } + if (options.profile) { + user.profile = options.profile; + } + if (options.idProvider) { + user._id = options.idProvider(); + } + const ret = await this.collection.insertOne(user); + return ret.ops[0]._id; + } + + public async findUserById(userId: string): Promise { + const id = this.options.convertUserIdToMongoObjectId + ? toMongoID(userId) + : userId; + const user = await this.collection.findOne({ _id: id }); + if (user) { + user.id = user._id; + } + return user; + } + + public async findUserByEmail(email: string): Promise { + const user = await this.collection.findOne({ + 'emails.address': email.toLowerCase(), + }); + if (user) { + user.id = user._id; + } + return user; + } + + public async findUserByUsername( + username: string + ): Promise { + const filter = this.options.caseSensitiveUserName + ? { username } + : { + $where: `obj.username && (obj.username.toLowerCase() === "${username.toLowerCase()}")`, + }; + const user = await this.collection.findOne(filter); + if (user) { + user.id = user._id; + } + return user; + } + + public async findPasswordHash(userId: string): Promise { + const id = this.options.convertUserIdToMongoObjectId + ? toMongoID(userId) + : userId; + const user = await this.findUserById(id); + if (user) { + return get(user, 'services.password.bcrypt'); + } + return null; + } + + public async findUserByEmailVerificationToken( + token: string + ): Promise { + const user = await this.collection.findOne({ + 'services.email.verificationTokens.token': token, + }); + if (user) { + user.id = user._id; + } + return user; + } + + public async findUserByResetPasswordToken( + token: string + ): Promise { + const user = await this.collection.findOne({ + 'services.password.reset.token': token, + }); + if (user) { + user.id = user._id; + } + return user; + } + + public async addEmail( + userId: string, + newEmail: string, + verified: boolean + ): Promise { + const id = this.options.convertUserIdToMongoObjectId + ? toMongoID(userId) + : userId; + const ret = await this.collection.update( + { _id: id }, + { + $addToSet: { + emails: { + address: newEmail.toLowerCase(), + verified, + }, + }, + $set: { [this.options.timestamps.updatedAt]: Date.now() }, + } + ); + if (ret.result.nModified === 0) { + throw new Error('User not found'); + } + } + + public async removeEmail(userId: string, email: string): Promise { + const id = this.options.convertUserIdToMongoObjectId + ? toMongoID(userId) + : userId; + const ret = await this.collection.update( + { _id: id }, + { + $pull: { emails: { address: email.toLowerCase() } }, + $set: { [this.options.timestamps.updatedAt]: Date.now() }, + } + ); + if (ret.result.nModified === 0) { + throw new Error('User not found'); + } + } + + public async setUsername(userId: string, newUsername: string): Promise { + const id = this.options.convertUserIdToMongoObjectId + ? toMongoID(userId) + : userId; + const ret = await this.collection.update( + { _id: id }, + { + $set: { + username: newUsername, + [this.options.timestamps.updatedAt]: Date.now(), + }, + } + ); + if (ret.result.nModified === 0) { + throw new Error('User not found'); + } + } + + public async setPasssword( + userId: string, + newPassword: string + ): Promise { + const id = this.options.convertUserIdToMongoObjectId + ? toMongoID(userId) + : userId; + const ret = await this.collection.update( + { _id: id }, + { + $set: { + 'services.password.bcrypt': newPassword, + [this.options.timestamps.updatedAt]: Date.now(), + }, + $unset: { + 'services.password.reset': '', + }, + } + ); + if (ret.result.nModified === 0) { + throw new Error('User not found'); + } + } + + public async setProfile(userId: string, profile: object): Promise { + const id = this.options.convertUserIdToMongoObjectId + ? toMongoID(userId) + : userId; + await this.collection.update( + { _id: id }, + { + $set: { + profile, + [this.options.timestamps.updatedAt]: Date.now(), + }, + } + ); + return profile; + } + + public async createSession( + userId: string, + ip?: string, + userAgent?: string, + extraData?: object + ): Promise { + const session = { + userId, + userAgent, + ip, + extraData, + valid: true, + [this.options.timestamps.createdAt]: this.options.dateProvider(), + [this.options.timestamps.updatedAt]: this.options.dateProvider(), + }; + + if (this.options.idProvider) { + session._id = this.options.idProvider(); + } + + const ret = await this.sessionCollection.insertOne(session); + return ret.ops[0]._id; + } + + public async updateSession( + sessionId: string, + ip: string, + userAgent: string + ): Promise { + // tslint:disable-next-line variable-name + const _id = this.options.convertSessionIdToMongoObjectId + ? toMongoID(sessionId) + : sessionId; + await this.sessionCollection.update( + { _id }, + { + $set: { + ip, + userAgent, + [this.options.timestamps.updatedAt]: this.options.dateProvider(), + }, + } + ); + } + + public async invalidateSession(sessionId: string): Promise { + // tslint:disable-next-line variable-name + const _id = this.options.convertSessionIdToMongoObjectId + ? toMongoID(sessionId) + : sessionId; + await this.sessionCollection.update( + { _id }, + { + $set: { + valid: false, + [this.options.timestamps.updatedAt]: this.options.dateProvider(), + }, + } + ); + } + + public async invalidateAllSessions(userId: string): Promise { + await this.sessionCollection.updateMany( + { userId }, + { + $set: { + valid: false, + [this.options.timestamps.updatedAt]: this.options.dateProvider(), + }, + } + ); + } + + public findSessionById(sessionId: string): Promise { + // tslint:disable-next-line variable-name + const _id = this.options.convertSessionIdToMongoObjectId + ? toMongoID(sessionId) + : sessionId; + return this.sessionCollection.findOne({ _id }); + } + + public async addEmailVerificationToken( + userId: string, + email: string, + token: string + ): Promise { + await this.collection.update( + { _id: userId }, + { + $push: { + 'services.email.verificationTokens': { + token, + address: email.toLowerCase(), + when: Date.now(), + }, + }, + } + ); + } + + public async addResetPasswordToken( + userId: string, + email: string, + token: string, + reason: string = 'reset' + ): Promise { + await this.collection.update( + { _id: userId }, + { + $push: { + 'services.password.reset': { + token, + address: email.toLowerCase(), + when: Date.now(), + reason, + }, + }, + } + ); + } + + public async setResetPasssword( + userId: string, + email: string, + newPassword: string + ): Promise { + await this.setPasssword(userId, newPassword); + } +} diff --git a/packages/accounts-mongo/tsconfig.json b/packages/accounts-mongo/tsconfig.json new file mode 100644 index 000000000..3b035f0e3 --- /dev/null +++ b/packages/accounts-mongo/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "rootDir": "./src", + "outDir": "./lib", + "target": "es5", + "sourceMap": true, + "declaration": true, + "pretty": true, + "removeComments": true, + "lib": ["es6"], + "types": [ + "@types/node" + ] + }, + "exclude": [ + "node_modules", + "__tests__", + "lib", + "lib-es6" + ] +} diff --git a/packages/accounts-mongo/tslint.json b/packages/accounts-mongo/tslint.json new file mode 100644 index 000000000..6de63f851 --- /dev/null +++ b/packages/accounts-mongo/tslint.json @@ -0,0 +1,5 @@ +{ + "extends": [ + "@accounts/tslint-config-accounts" + ] +} diff --git a/packages/accounts-mongo/webpack.config.js b/packages/accounts-mongo/webpack.config.js deleted file mode 100644 index 90c7f3f5d..000000000 --- a/packages/accounts-mongo/webpack.config.js +++ /dev/null @@ -1,35 +0,0 @@ -const path = require('path'); -const nodeExternals = require('webpack-node-externals'); - -module.exports = { - entry: './src/index.js', - target: 'node', - externals: [nodeExternals()], - output: { - path: path.join(__dirname, '/lib'), - filename: 'index.js', - library: '@accounts/mongo', - libraryTarget: 'umd', - }, - modulesDirectories: [ - 'src', - 'node_modules', - ], - module: { - loaders: [ - { - test: /\.js$/, - loader: 'babel', - exclude: /node_modules/, - query: { - babelrc: false, - presets: ['es2015', 'stage-0'], - plugins: [ - 'transform-flow-strip-types', - 'transform-runtime', - ], - } - }, - ], - }, -}; diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index 720143356..db78dcbab 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -2,17 +2,17 @@ # yarn lockfile v1 -"@accounts/common@^0.0.10": - version "0.0.10" - resolved "https://registry.yarnpkg.com/@accounts/common/-/common-0.0.10.tgz#d9391f2ad9f2ba9da8451885ece4d68d919d2220" +"@accounts/common@^0.0.16": + version "0.0.16" + resolved "https://registry.yarnpkg.com/@accounts/common/-/common-0.0.16.tgz#41f6f6a16314c49b0b7342931b71c39146fd7255" dependencies: lodash "^4.16.4" -"@accounts/server@^0.0.10": - version "0.0.10" - resolved "https://registry.yarnpkg.com/@accounts/server/-/server-0.0.10.tgz#be37a531bc77f7cc24b487b02c35ed00bc586623" +"@accounts/server@^0.0.17": + version "0.0.17" + resolved "https://registry.yarnpkg.com/@accounts/server/-/server-0.0.17.tgz#145b901ea7758e4072616ed62d58f0a1e24f020e" dependencies: - "@accounts/common" "^0.0.10" + "@accounts/common" "^0.0.16" babel-polyfill "^6.23.0" bcryptjs "^2.4.0" crypto "^0.0.3" @@ -21,37 +21,78 @@ jwt-decode "^2.1.0" lodash "^4.16.4" -abab@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.3.tgz#b81de5f7274ec4e756d797cd834f303642724e5d" +"@accounts/tslint-config-accounts@^0.0.4": + version "0.0.4" + resolved "https://registry.yarnpkg.com/@accounts/tslint-config-accounts/-/tslint-config-accounts-0.0.4.tgz#f7ac27d290a14bb0351ca30fbc743994a4db346b" + dependencies: + tslint-config-prettier "^1.1.0" + tslint-eslint-rules "^4.1.1" -abbrev@1: - version "1.0.9" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" +"@types/babel-core@^6.7.14": + version "6.7.14" + resolved "https://registry.yarnpkg.com/@types/babel-core/-/babel-core-6.7.14.tgz#a08c900a98e8987c1a98d2ea4fa0a1805a7d131f" + dependencies: + "@types/babel-template" "*" + "@types/babel-traverse" "*" + "@types/babel-types" "*" -acorn-globals@^1.0.4: - version "1.0.9" - resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-1.0.9.tgz#55bb5e98691507b74579d0513413217c380c54cf" +"@types/babel-template@*": + version "6.7.14" + resolved "https://registry.yarnpkg.com/@types/babel-template/-/babel-template-6.7.14.tgz#8088a56f9d697d620d3d079c3ef66025b7a08d02" dependencies: - acorn "^2.1.0" + "@types/babel-types" "*" + "@types/babylon" "*" -acorn-jsx@^3.0.0, acorn-jsx@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" +"@types/babel-traverse@*": + version "6.7.17" + resolved "https://registry.yarnpkg.com/@types/babel-traverse/-/babel-traverse-6.7.17.tgz#5212a4edced81f53a6c4fb1fd7a34aa4ff6cf36b" dependencies: - acorn "^3.0.4" + "@types/babel-types" "*" -acorn@^2.1.0, acorn@^2.4.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-2.7.0.tgz#ab6e7d9d886aaca8b085bc3312b79a198433f0e7" +"@types/babel-types@*": + version "6.7.16" + resolved "https://registry.yarnpkg.com/@types/babel-types/-/babel-types-6.7.16.tgz#e2602896636858a0067971f7ca4bb8678038293f" -acorn@^3.0.0, acorn@^3.0.4: - version "3.3.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" +"@types/babylon@*": + version "6.16.1" + resolved "https://registry.yarnpkg.com/@types/babylon/-/babylon-6.16.1.tgz#e4d10ab9e43a73703a17c6f41438bede28769340" + dependencies: + "@types/babel-types" "*" + +"@types/bson@*": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@types/bson/-/bson-1.0.3.tgz#6c26f0876bf9d8cbb06edd4019e29354bf3a03e0" + dependencies: + "@types/node" "*" + +"@types/jest@^20.0.2": + version "20.0.2" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-20.0.2.tgz#86c751121fb53dbd39bb1a08c45083da13f2dc67" -acorn@^4.0.1: - version "4.0.4" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.4.tgz#17a8d6a7a6c4ef538b814ec9abac2779293bf30a" +"@types/mongodb@^2.2.7": + version "2.2.7" + resolved "https://registry.yarnpkg.com/@types/mongodb/-/mongodb-2.2.7.tgz#35c04cb60ff06d0c6ab71cc6561e41baf094fa70" + dependencies: + "@types/bson" "*" + "@types/node" "*" + +"@types/node@*", "@types/node@^8.0.10": + version "8.0.10" + resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.10.tgz#12efec9183b072d5f951cf86395a4c780f868a17" + +abab@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.3.tgz#b81de5f7274ec4e756d797cd834f303642724e5d" + +acorn-globals@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-3.1.0.tgz#fd8270f71fbb4996b004fa880ee5d46573a731bf" + dependencies: + acorn "^4.0.4" + +acorn@^4.0.4: + version "4.0.13" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" addressparser@^0.3.2: version "0.3.2" @@ -61,17 +102,6 @@ addressparser@~0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/addressparser/-/addressparser-0.2.1.tgz#d11a5b2eeda04cfefebdf3196c10ae13db6cd607" -ajv-keywords@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.2.0.tgz#676c4f087bfe1e8b12dca6fda2f3c74f417b099c" - -ajv@^4.7.0: - version "4.10.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.10.0.tgz#7ae6169180eb199192a8b9a19fd0f47fc9ac8764" - dependencies: - co "^4.6.0" - json-stable-stringify "^1.0.1" - align-text@^0.1.1, align-text@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" @@ -84,7 +114,7 @@ amdefine@>=0.0.4: version "1.0.1" resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" -ansi-escapes@^1.1.0, ansi-escapes@^1.4.0: +ansi-escapes@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" @@ -92,13 +122,23 @@ ansi-regex@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.0.0.tgz#c5061b6e0ef8a81775e50f5d66151bf6bf371107" +ansi-regex@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" -ansicolors@~0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.2.1.tgz#be089599097b74a5c9c4a84a0cdbcdb62bd87aef" +ansi-styles@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.1.0.tgz#09c202d5c917ec23188caa5c9cb9179cd9547750" + dependencies: + color-convert "^1.0.0" anymatch@^1.3.0: version "1.3.0" @@ -113,17 +153,6 @@ append-transform@^0.4.0: dependencies: default-require-extensions "^1.0.0" -aproba@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.0.4.tgz#2713680775e7614c8ba186c065d4e2e52d1072c0" - -are-we-there-yet@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz#80e470e95a084794fe1899262c5667c6e88de1b3" - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.0 || ^1.1.13" - argparse@^1.0.7: version "1.0.9" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" @@ -144,27 +173,10 @@ array-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" -array-union@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" - dependencies: - array-uniq "^1.0.1" - -array-uniq@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" - array-unique@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" -array.prototype.find@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/array.prototype.find/-/array.prototype.find-2.0.1.tgz#1557f888df6c57e4d1256f20852d687a25b51fde" - dependencies: - define-properties "^1.1.2" - es-abstract "^1.5.0" - arrify@^1.0.0, arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" @@ -181,34 +193,16 @@ assert-plus@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" -assert@^1.1.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" - dependencies: - util "0.10.3" - -async-each@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" - -async@^0.9.0: - version "0.9.2" - resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d" - -async@^1.3.0, async@^1.4.0, async@^1.4.2: +async@^1.4.0: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" async@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/async/-/async-2.1.4.tgz#2d2160c7788032e4dd6cbe2502f1f9a2c8f6cde4" + version "2.5.0" + resolved "https://registry.yarnpkg.com/async/-/async-2.5.0.tgz#843190fd6b7357a0b9e1c956edddd5ec8462b54d" dependencies: lodash "^4.14.0" -async@~0.2.6: - version "0.2.10" - resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1" - asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -221,583 +215,119 @@ aws4@^1.2.1: version "1.5.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.5.0.tgz#0a29ffb79c31c9e712eeb087e8e7a64b4a56d755" -babel-cli@^6.22.2: - version "6.22.2" - resolved "https://registry.yarnpkg.com/babel-cli/-/babel-cli-6.22.2.tgz#3f814c8acf52759082b8fedd9627f938936ab559" - dependencies: - babel-core "^6.22.1" - babel-polyfill "^6.22.0" - babel-register "^6.22.0" - babel-runtime "^6.22.0" - commander "^2.8.1" - convert-source-map "^1.1.0" - fs-readdir-recursive "^1.0.0" - glob "^7.0.0" - lodash "^4.2.0" - output-file-sync "^1.1.0" - path-is-absolute "^1.0.0" - slash "^1.0.0" - source-map "^0.5.0" - v8flags "^2.0.10" - optionalDependencies: - chokidar "^1.6.1" - -babel-code-frame@^6.16.0, babel-code-frame@^6.22.0: +babel-code-frame@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" dependencies: chalk "^1.1.0" esutils "^2.0.2" - js-tokens "^3.0.0" - -babel-core@^6.0.0, babel-core@^6.22.0, babel-core@^6.22.1: - version "6.22.1" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.22.1.tgz#9c5fd658ba1772d28d721f6d25d968fc7ae21648" - dependencies: - babel-code-frame "^6.22.0" - babel-generator "^6.22.0" - babel-helpers "^6.22.0" - babel-messages "^6.22.0" - babel-register "^6.22.0" - babel-runtime "^6.22.0" - babel-template "^6.22.0" - babel-traverse "^6.22.1" - babel-types "^6.22.0" - babylon "^6.11.0" - convert-source-map "^1.1.0" - debug "^2.1.1" - json5 "^0.5.0" - lodash "^4.2.0" - minimatch "^3.0.2" - path-is-absolute "^1.0.0" - private "^0.1.6" - slash "^1.0.0" - source-map "^0.5.0" - -babel-eslint@^7.0.0: - version "7.1.1" - resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-7.1.1.tgz#8a6a884f085aa7060af69cfc77341c2f99370fb2" - dependencies: - babel-code-frame "^6.16.0" - babel-traverse "^6.15.0" - babel-types "^6.15.0" - babylon "^6.13.0" - lodash.pickby "^4.6.0" - -babel-generator@^6.18.0, babel-generator@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.22.0.tgz#d642bf4961911a8adc7c692b0c9297f325cda805" - dependencies: - babel-messages "^6.22.0" - babel-runtime "^6.22.0" - babel-types "^6.22.0" - detect-indent "^4.0.0" - jsesc "^1.3.0" - lodash "^4.2.0" - source-map "^0.5.0" - -babel-helper-bindify-decorators@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.22.0.tgz#d7f5bc261275941ac62acfc4e20dacfb8a3fe952" - dependencies: - babel-runtime "^6.22.0" - babel-traverse "^6.22.0" - babel-types "^6.22.0" - -babel-helper-builder-binary-assignment-operator-visitor@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.22.0.tgz#29df56be144d81bdeac08262bfa41d2c5e91cdcd" - dependencies: - babel-helper-explode-assignable-expression "^6.22.0" - babel-runtime "^6.22.0" - babel-types "^6.22.0" - -babel-helper-call-delegate@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.22.0.tgz#119921b56120f17e9dae3f74b4f5cc7bcc1b37ef" - dependencies: - babel-helper-hoist-variables "^6.22.0" - babel-runtime "^6.22.0" - babel-traverse "^6.22.0" - babel-types "^6.22.0" - -babel-helper-define-map@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.22.0.tgz#9544e9502b2d6dfe7d00ff60e82bd5a7a89e95b7" - dependencies: - babel-helper-function-name "^6.22.0" - babel-runtime "^6.22.0" - babel-types "^6.22.0" - lodash "^4.2.0" - -babel-helper-explode-assignable-expression@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.22.0.tgz#c97bf76eed3e0bae4048121f2b9dae1a4e7d0478" - dependencies: - babel-runtime "^6.22.0" - babel-traverse "^6.22.0" - babel-types "^6.22.0" - -babel-helper-explode-class@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-helper-explode-class/-/babel-helper-explode-class-6.22.0.tgz#646304924aa6388a516843ba7f1855ef8dfeb69b" - dependencies: - babel-helper-bindify-decorators "^6.22.0" - babel-runtime "^6.22.0" - babel-traverse "^6.22.0" - babel-types "^6.22.0" - -babel-helper-function-name@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.22.0.tgz#51f1bdc4bb89b15f57a9b249f33d742816dcbefc" - dependencies: - babel-helper-get-function-arity "^6.22.0" - babel-runtime "^6.22.0" - babel-template "^6.22.0" - babel-traverse "^6.22.0" - babel-types "^6.22.0" - -babel-helper-function-name@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.23.0.tgz#25742d67175c8903dbe4b6cb9d9e1fcb8dcf23a6" - dependencies: - babel-helper-get-function-arity "^6.22.0" - babel-runtime "^6.22.0" - babel-template "^6.23.0" - babel-traverse "^6.23.0" - babel-types "^6.23.0" - -babel-helper-get-function-arity@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.22.0.tgz#0beb464ad69dc7347410ac6ade9f03a50634f5ce" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.22.0" - -babel-helper-hoist-variables@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.22.0.tgz#3eacbf731d80705845dd2e9718f600cfb9b4ba72" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.22.0" - -babel-helper-optimise-call-expression@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.22.0.tgz#f8d5d4b40a6e2605a6a7f9d537b581bea3756d15" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.22.0" - -babel-helper-regex@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.22.0.tgz#79f532be1647b1f0ee3474b5f5c3da58001d247d" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.22.0" - lodash "^4.2.0" - -babel-helper-remap-async-to-generator@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.22.0.tgz#2186ae73278ed03b8b15ced089609da981053383" - dependencies: - babel-helper-function-name "^6.22.0" - babel-runtime "^6.22.0" - babel-template "^6.22.0" - babel-traverse "^6.22.0" - babel-types "^6.22.0" - -babel-helper-replace-supers@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.22.0.tgz#1fcee2270657548908c34db16bcc345f9850cf42" - dependencies: - babel-helper-optimise-call-expression "^6.22.0" - babel-messages "^6.22.0" - babel-runtime "^6.22.0" - babel-template "^6.22.0" - babel-traverse "^6.22.0" - babel-types "^6.22.0" - -babel-helpers@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.22.0.tgz#d275f55f2252b8101bff07bc0c556deda657392c" - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.22.0" - -babel-jest@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-18.0.0.tgz#17ebba8cb3285c906d859e8707e4e79795fb65e3" - dependencies: - babel-core "^6.0.0" - babel-plugin-istanbul "^3.0.0" - babel-preset-jest "^18.0.0" - -babel-loader@^6.2.5: - version "6.2.10" - resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-6.2.10.tgz#adefc2b242320cd5d15e65b31cea0e8b1b02d4b0" - dependencies: - find-cache-dir "^0.1.1" - loader-utils "^0.2.11" - mkdirp "^0.5.1" - object-assign "^4.0.1" - -babel-messages@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.22.0.tgz#36066a214f1217e4ed4164867669ecb39e3ea575" - dependencies: - babel-runtime "^6.22.0" - -babel-messages@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-check-es2015-constants@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-istanbul@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-3.0.0.tgz#da7324520ae0b8a44b6a078e72e883374a9fab76" - dependencies: - find-up "^1.1.2" - istanbul-lib-instrument "^1.1.4" - object-assign "^4.1.0" - test-exclude "^3.2.2" - -babel-plugin-jest-hoist@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-18.0.0.tgz#4150e70ecab560e6e7344adc849498072d34e12a" - -babel-plugin-syntax-async-functions@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" - -babel-plugin-syntax-async-generators@^6.5.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz#6bc963ebb16eccbae6b92b596eb7f35c342a8b9a" - -babel-plugin-syntax-class-constructor-call@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-constructor-call/-/babel-plugin-syntax-class-constructor-call-6.18.0.tgz#9cb9d39fe43c8600bec8146456ddcbd4e1a76416" - -babel-plugin-syntax-class-properties@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz#d7eb23b79a317f8543962c505b827c7d6cac27de" - -babel-plugin-syntax-decorators@^6.13.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz#312563b4dbde3cc806cee3e416cceeaddd11ac0b" - -babel-plugin-syntax-do-expressions@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-do-expressions/-/babel-plugin-syntax-do-expressions-6.13.0.tgz#5747756139aa26d390d09410b03744ba07e4796d" - -babel-plugin-syntax-dynamic-import@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz#8d6a26229c83745a9982a441051572caa179b1da" - -babel-plugin-syntax-exponentiation-operator@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" - -babel-plugin-syntax-export-extensions@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-export-extensions/-/babel-plugin-syntax-export-extensions-6.13.0.tgz#70a1484f0f9089a4e84ad44bac353c95b9b12721" - -babel-plugin-syntax-flow@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" - -babel-plugin-syntax-function-bind@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-function-bind/-/babel-plugin-syntax-function-bind-6.13.0.tgz#48c495f177bdf31a981e732f55adc0bdd2601f46" - -babel-plugin-syntax-object-rest-spread@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" - -babel-plugin-syntax-trailing-function-commas@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" - -babel-plugin-transform-async-generator-functions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.22.0.tgz#a720a98153a7596f204099cd5409f4b3c05bab46" - dependencies: - babel-helper-remap-async-to-generator "^6.22.0" - babel-plugin-syntax-async-generators "^6.5.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-async-to-generator@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.22.0.tgz#194b6938ec195ad36efc4c33a971acf00d8cd35e" - dependencies: - babel-helper-remap-async-to-generator "^6.22.0" - babel-plugin-syntax-async-functions "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-class-constructor-call@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-constructor-call/-/babel-plugin-transform-class-constructor-call-6.22.0.tgz#11a4d2216abb5b0eef298b493748f4f2f4869120" - dependencies: - babel-plugin-syntax-class-constructor-call "^6.18.0" - babel-runtime "^6.22.0" - babel-template "^6.22.0" - -babel-plugin-transform-class-properties@^6.22.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.23.0.tgz#187b747ee404399013563c993db038f34754ac3b" - dependencies: - babel-helper-function-name "^6.23.0" - babel-plugin-syntax-class-properties "^6.8.0" - babel-runtime "^6.22.0" - babel-template "^6.23.0" - -babel-plugin-transform-decorators@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.22.0.tgz#c03635b27a23b23b7224f49232c237a73988d27c" - dependencies: - babel-helper-explode-class "^6.22.0" - babel-plugin-syntax-decorators "^6.13.0" - babel-runtime "^6.22.0" - babel-template "^6.22.0" - babel-types "^6.22.0" - -babel-plugin-transform-do-expressions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-do-expressions/-/babel-plugin-transform-do-expressions-6.22.0.tgz#28ccaf92812d949c2cd1281f690c8fdc468ae9bb" - dependencies: - babel-plugin-syntax-do-expressions "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-arrow-functions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-block-scoping@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.22.0.tgz#00d6e3a0bebdcfe7536b9d653b44a9141e63e47e" - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.22.0" - babel-traverse "^6.22.0" - babel-types "^6.22.0" - lodash "^4.2.0" - -babel-plugin-transform-es2015-classes@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.22.0.tgz#54d44998fd823d9dca15292324161c331c1b6f14" - dependencies: - babel-helper-define-map "^6.22.0" - babel-helper-function-name "^6.22.0" - babel-helper-optimise-call-expression "^6.22.0" - babel-helper-replace-supers "^6.22.0" - babel-messages "^6.22.0" - babel-runtime "^6.22.0" - babel-template "^6.22.0" - babel-traverse "^6.22.0" - babel-types "^6.22.0" - -babel-plugin-transform-es2015-computed-properties@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.22.0.tgz#7c383e9629bba4820c11b0425bdd6290f7f057e7" - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.22.0" - -babel-plugin-transform-es2015-destructuring@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.22.0.tgz#8e0af2f885a0b2cf999d47c4c1dd23ce88cfa4c6" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-duplicate-keys@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.22.0.tgz#672397031c21610d72dd2bbb0ba9fb6277e1c36b" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.22.0" - -babel-plugin-transform-es2015-for-of@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.22.0.tgz#180467ad63aeea592a1caeee4bf1c8b3e2616265" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-function-name@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.22.0.tgz#f5fcc8b09093f9a23c76ac3d9e392c3ec4b77104" - dependencies: - babel-helper-function-name "^6.22.0" - babel-runtime "^6.22.0" - babel-types "^6.22.0" - -babel-plugin-transform-es2015-literals@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-modules-amd@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.22.0.tgz#bf69cd34889a41c33d90dfb740e0091ccff52f21" - dependencies: - babel-plugin-transform-es2015-modules-commonjs "^6.22.0" - babel-runtime "^6.22.0" - babel-template "^6.22.0" - -babel-plugin-transform-es2015-modules-commonjs@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.22.0.tgz#6ca04e22b8e214fb50169730657e7a07dc941145" - dependencies: - babel-plugin-transform-strict-mode "^6.22.0" - babel-runtime "^6.22.0" - babel-template "^6.22.0" - babel-types "^6.22.0" - -babel-plugin-transform-es2015-modules-systemjs@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.22.0.tgz#810cd0cd025a08383b84236b92c6e31f88e644ad" - dependencies: - babel-helper-hoist-variables "^6.22.0" - babel-runtime "^6.22.0" - babel-template "^6.22.0" - -babel-plugin-transform-es2015-modules-umd@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.22.0.tgz#60d0ba3bd23258719c64391d9bf492d648dc0fae" - dependencies: - babel-plugin-transform-es2015-modules-amd "^6.22.0" - babel-runtime "^6.22.0" - babel-template "^6.22.0" - -babel-plugin-transform-es2015-object-super@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.22.0.tgz#daa60e114a042ea769dd53fe528fc82311eb98fc" - dependencies: - babel-helper-replace-supers "^6.22.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-parameters@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.22.0.tgz#57076069232019094f27da8c68bb7162fe208dbb" - dependencies: - babel-helper-call-delegate "^6.22.0" - babel-helper-get-function-arity "^6.22.0" - babel-runtime "^6.22.0" - babel-template "^6.22.0" - babel-traverse "^6.22.0" - babel-types "^6.22.0" - -babel-plugin-transform-es2015-shorthand-properties@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.22.0.tgz#8ba776e0affaa60bff21e921403b8a652a2ff723" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.22.0" - -babel-plugin-transform-es2015-spread@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-sticky-regex@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.22.0.tgz#ab316829e866ee3f4b9eb96939757d19a5bc4593" - dependencies: - babel-helper-regex "^6.22.0" - babel-runtime "^6.22.0" - babel-types "^6.22.0" + js-tokens "^3.0.0" -babel-plugin-transform-es2015-template-literals@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" +babel-core@^6.0.0, babel-core@^6.24.1: + version "6.25.0" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.25.0.tgz#7dd42b0463c742e9d5296deb3ec67a9322dad729" dependencies: + babel-code-frame "^6.22.0" + babel-generator "^6.25.0" + babel-helpers "^6.24.1" + babel-messages "^6.23.0" + babel-register "^6.24.1" babel-runtime "^6.22.0" + babel-template "^6.25.0" + babel-traverse "^6.25.0" + babel-types "^6.25.0" + babylon "^6.17.2" + convert-source-map "^1.1.0" + debug "^2.1.1" + json5 "^0.5.0" + lodash "^4.2.0" + minimatch "^3.0.2" + path-is-absolute "^1.0.0" + private "^0.1.6" + slash "^1.0.0" + source-map "^0.5.0" -babel-plugin-transform-es2015-typeof-symbol@^6.22.0: +babel-generator@^6.18.0: version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.22.0.tgz#87faf2336d3b6a97f68c4d906b0cd0edeae676e1" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.22.0.tgz#d642bf4961911a8adc7c692b0c9297f325cda805" dependencies: + babel-messages "^6.22.0" babel-runtime "^6.22.0" + babel-types "^6.22.0" + detect-indent "^4.0.0" + jsesc "^1.3.0" + lodash "^4.2.0" + source-map "^0.5.0" -babel-plugin-transform-es2015-unicode-regex@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.22.0.tgz#8d9cc27e7ee1decfe65454fb986452a04a613d20" +babel-generator@^6.25.0: + version "6.25.0" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.25.0.tgz#33a1af70d5f2890aeb465a4a7793c1df6a9ea9fc" dependencies: - babel-helper-regex "^6.22.0" + babel-messages "^6.23.0" babel-runtime "^6.22.0" - regexpu-core "^2.0.0" + babel-types "^6.25.0" + detect-indent "^4.0.0" + jsesc "^1.3.0" + lodash "^4.2.0" + source-map "^0.5.0" + trim-right "^1.0.1" -babel-plugin-transform-exponentiation-operator@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.22.0.tgz#d57c8335281918e54ef053118ce6eb108468084d" +babel-helpers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" dependencies: - babel-helper-builder-binary-assignment-operator-visitor "^6.22.0" - babel-plugin-syntax-exponentiation-operator "^6.8.0" babel-runtime "^6.22.0" + babel-template "^6.24.1" -babel-plugin-transform-export-extensions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-export-extensions/-/babel-plugin-transform-export-extensions-6.22.0.tgz#53738b47e75e8218589eea946cbbd39109bbe653" +babel-jest@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-20.0.3.tgz#e4a03b13dc10389e140fc645d09ffc4ced301671" dependencies: - babel-plugin-syntax-export-extensions "^6.8.0" - babel-runtime "^6.22.0" + babel-core "^6.0.0" + babel-plugin-istanbul "^4.0.0" + babel-preset-jest "^20.0.3" -babel-plugin-transform-flow-strip-types@^6.22.0: +babel-messages@^6.22.0: version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz#84cb672935d43714fdc32bce84568d87441cf7cf" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.22.0.tgz#36066a214f1217e4ed4164867669ecb39e3ea575" dependencies: - babel-plugin-syntax-flow "^6.18.0" babel-runtime "^6.22.0" -babel-plugin-transform-function-bind@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-function-bind/-/babel-plugin-transform-function-bind-6.22.0.tgz#c6fb8e96ac296a310b8cf8ea401462407ddf6a97" +babel-messages@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" dependencies: - babel-plugin-syntax-function-bind "^6.8.0" babel-runtime "^6.22.0" -babel-plugin-transform-object-rest-spread@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.22.0.tgz#1d419b55e68d2e4f64a5ff3373bd67d73c8e83bc" +babel-plugin-istanbul@^4.0.0, babel-plugin-istanbul@^4.1.4: + version "4.1.4" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.4.tgz#18dde84bf3ce329fddf3f4103fae921456d8e587" dependencies: - babel-plugin-syntax-object-rest-spread "^6.8.0" - babel-runtime "^6.22.0" + find-up "^2.1.0" + istanbul-lib-instrument "^1.7.2" + test-exclude "^4.1.1" -babel-plugin-transform-regenerator@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.22.0.tgz#65740593a319c44522157538d690b84094617ea6" - dependencies: - regenerator-transform "0.9.8" +babel-plugin-jest-hoist@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-20.0.3.tgz#afedc853bd3f8dc3548ea671fbe69d03cc2c1767" -babel-plugin-transform-runtime@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.23.0.tgz#88490d446502ea9b8e7efb0fe09ec4d99479b1ee" +babel-plugin-transform-es2015-modules-commonjs@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.1.tgz#d3e310b40ef664a36622200097c6d440298f2bfe" dependencies: + babel-plugin-transform-strict-mode "^6.24.1" babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-types "^6.24.1" -babel-plugin-transform-strict-mode@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.22.0.tgz#e008df01340fdc87e959da65991b7e05970c8c7c" +babel-plugin-transform-strict-mode@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" dependencies: babel-runtime "^6.22.0" - babel-types "^6.22.0" + babel-types "^6.24.1" -babel-polyfill@^6.22.0, babel-polyfill@^6.23.0: +babel-polyfill@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.23.0.tgz#8364ca62df8eafb830499f699177466c3b03499d" dependencies: @@ -805,81 +335,17 @@ babel-polyfill@^6.22.0, babel-polyfill@^6.23.0: core-js "^2.4.0" regenerator-runtime "^0.10.0" -babel-preset-es2015@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.22.0.tgz#af5a98ecb35eb8af764ad8a5a05eb36dc4386835" - dependencies: - babel-plugin-check-es2015-constants "^6.22.0" - babel-plugin-transform-es2015-arrow-functions "^6.22.0" - babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" - babel-plugin-transform-es2015-block-scoping "^6.22.0" - babel-plugin-transform-es2015-classes "^6.22.0" - babel-plugin-transform-es2015-computed-properties "^6.22.0" - babel-plugin-transform-es2015-destructuring "^6.22.0" - babel-plugin-transform-es2015-duplicate-keys "^6.22.0" - babel-plugin-transform-es2015-for-of "^6.22.0" - babel-plugin-transform-es2015-function-name "^6.22.0" - babel-plugin-transform-es2015-literals "^6.22.0" - babel-plugin-transform-es2015-modules-amd "^6.22.0" - babel-plugin-transform-es2015-modules-commonjs "^6.22.0" - babel-plugin-transform-es2015-modules-systemjs "^6.22.0" - babel-plugin-transform-es2015-modules-umd "^6.22.0" - babel-plugin-transform-es2015-object-super "^6.22.0" - babel-plugin-transform-es2015-parameters "^6.22.0" - babel-plugin-transform-es2015-shorthand-properties "^6.22.0" - babel-plugin-transform-es2015-spread "^6.22.0" - babel-plugin-transform-es2015-sticky-regex "^6.22.0" - babel-plugin-transform-es2015-template-literals "^6.22.0" - babel-plugin-transform-es2015-typeof-symbol "^6.22.0" - babel-plugin-transform-es2015-unicode-regex "^6.22.0" - babel-plugin-transform-regenerator "^6.22.0" - -babel-preset-jest@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-18.0.0.tgz#84faf8ca3ec65aba7d5e3f59bbaed935ab24049e" - dependencies: - babel-plugin-jest-hoist "^18.0.0" - -babel-preset-stage-0@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-preset-stage-0/-/babel-preset-stage-0-6.22.0.tgz#707eeb5b415da769eff9c42f4547f644f9296ef9" - dependencies: - babel-plugin-transform-do-expressions "^6.22.0" - babel-plugin-transform-function-bind "^6.22.0" - babel-preset-stage-1 "^6.22.0" - -babel-preset-stage-1@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-preset-stage-1/-/babel-preset-stage-1-6.22.0.tgz#7da05bffea6ad5a10aef93e320cfc6dd465dbc1a" - dependencies: - babel-plugin-transform-class-constructor-call "^6.22.0" - babel-plugin-transform-export-extensions "^6.22.0" - babel-preset-stage-2 "^6.22.0" - -babel-preset-stage-2@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-preset-stage-2/-/babel-preset-stage-2-6.22.0.tgz#ccd565f19c245cade394b21216df704a73b27c07" - dependencies: - babel-plugin-syntax-dynamic-import "^6.18.0" - babel-plugin-transform-class-properties "^6.22.0" - babel-plugin-transform-decorators "^6.22.0" - babel-preset-stage-3 "^6.22.0" - -babel-preset-stage-3@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-preset-stage-3/-/babel-preset-stage-3-6.22.0.tgz#a4e92bbace7456fafdf651d7a7657ee0bbca9c2e" +babel-preset-jest@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-20.0.3.tgz#cbacaadecb5d689ca1e1de1360ebfc66862c178a" dependencies: - babel-plugin-syntax-trailing-function-commas "^6.22.0" - babel-plugin-transform-async-generator-functions "^6.22.0" - babel-plugin-transform-async-to-generator "^6.22.0" - babel-plugin-transform-exponentiation-operator "^6.22.0" - babel-plugin-transform-object-rest-spread "^6.22.0" + babel-plugin-jest-hoist "^20.0.3" -babel-register@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.22.0.tgz#a61dd83975f9ca4a9e7d6eff3059494cd5ea4c63" +babel-register@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.24.1.tgz#7e10e13a2f71065bdfad5a1787ba45bca6ded75f" dependencies: - babel-core "^6.22.0" + babel-core "^6.24.1" babel-runtime "^6.22.0" core-js "^2.4.0" home-or-tmp "^2.0.0" @@ -887,14 +353,14 @@ babel-register@^6.22.0: mkdirp "^0.5.1" source-map-support "^0.4.2" -babel-runtime@^6.18.0, babel-runtime@^6.22.0: +babel-runtime@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.22.0.tgz#1cf8b4ac67c77a4ddb0db2ae1f74de52ac4ca611" dependencies: core-js "^2.4.0" regenerator-runtime "^0.10.0" -babel-template@^6.16.0, babel-template@^6.22.0: +babel-template@^6.16.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.22.0.tgz#403d110905a4626b317a2a1fcb8f3b73204b2edb" dependencies: @@ -904,17 +370,17 @@ babel-template@^6.16.0, babel-template@^6.22.0: babylon "^6.11.0" lodash "^4.2.0" -babel-template@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.23.0.tgz#04d4f270adbb3aa704a8143ae26faa529238e638" +babel-template@^6.24.1, babel-template@^6.25.0: + version "6.25.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.25.0.tgz#665241166b7c2aa4c619d71e192969552b10c071" dependencies: babel-runtime "^6.22.0" - babel-traverse "^6.23.0" - babel-types "^6.23.0" - babylon "^6.11.0" + babel-traverse "^6.25.0" + babel-types "^6.25.0" + babylon "^6.17.2" lodash "^4.2.0" -babel-traverse@^6.15.0, babel-traverse@^6.18.0, babel-traverse@^6.22.0, babel-traverse@^6.22.1: +babel-traverse@^6.18.0, babel-traverse@^6.22.0: version "6.22.1" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.22.1.tgz#3b95cd6b7427d6f1f757704908f2fc9748a5f59f" dependencies: @@ -928,21 +394,21 @@ babel-traverse@^6.15.0, babel-traverse@^6.18.0, babel-traverse@^6.22.0, babel-tr invariant "^2.2.0" lodash "^4.2.0" -babel-traverse@^6.23.0: - version "6.23.1" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.23.1.tgz#d3cb59010ecd06a97d81310065f966b699e14f48" +babel-traverse@^6.25.0: + version "6.25.0" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.25.0.tgz#2257497e2fcd19b89edc13c4c91381f9512496f1" dependencies: babel-code-frame "^6.22.0" babel-messages "^6.23.0" babel-runtime "^6.22.0" - babel-types "^6.23.0" - babylon "^6.15.0" + babel-types "^6.25.0" + babylon "^6.17.2" debug "^2.2.0" globals "^9.0.0" invariant "^2.2.0" lodash "^4.2.0" -babel-types@^6.15.0, babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.22.0: +babel-types@^6.18.0, babel-types@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.22.0.tgz#2a447e8d0ea25d2512409e4175479fd78cc8b1db" dependencies: @@ -951,16 +417,16 @@ babel-types@^6.15.0, babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.22 lodash "^4.2.0" to-fast-properties "^1.0.1" -babel-types@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.23.0.tgz#bb17179d7538bad38cd0c9e115d340f77e7e9acf" +babel-types@^6.24.1, babel-types@^6.25.0: + version "6.25.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.25.0.tgz#70afb248d5660e5d18f811d91c8303b54134a18e" dependencies: babel-runtime "^6.22.0" esutils "^2.0.2" lodash "^4.2.0" to-fast-properties "^1.0.1" -babylon@^6.11.0, babylon@^6.13.0: +babylon@^6.11.0: version "6.14.1" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.14.1.tgz#956275fab72753ad9b3435d7afe58f8bf0a29815" @@ -968,13 +434,17 @@ babylon@^6.15.0: version "6.15.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.15.0.tgz#ba65cfa1a80e1759b0e89fb562e27dccae70348e" +babylon@^6.17.2, babylon@^6.17.4: + version "6.17.4" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.17.4.tgz#3e8b7402b88d22c3423e137a1577883b15ff869a" + balanced-match@^0.4.1: version "0.4.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" -base64-js@^1.0.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.0.tgz#a39992d723584811982be5e290bb6a53d86700f1" +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" base64url@2.0.0, base64url@^2.0.0: version "2.0.0" @@ -990,26 +460,6 @@ bcryptjs@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/bcryptjs/-/bcryptjs-2.4.0.tgz#fb7f4a0b133854503fe1b2da3f25db834cf0e678" -big.js@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.1.3.tgz#4cada2193652eb3ca9ec8e55c9015669c9806978" - -binary-extensions@^1.0.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.8.0.tgz#48ec8d16df4377eae5fa5884682480af4d95c774" - -bl@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/bl/-/bl-1.1.2.tgz#fdca871a99713aa00d19e3bbba41c44787a65398" - dependencies: - readable-stream "~2.0.5" - -block-stream@*: - version "0.0.9" - resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" - dependencies: - inherits "~2.0.0" - boom@2.x.x: version "2.10.1" resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" @@ -1023,6 +473,13 @@ brace-expansion@^1.0.0: balanced-match "^0.4.1" concat-map "0.0.1" +brace-expansion@^1.1.7: + version "1.1.8" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + braces@^1.8.2: version "1.8.5" resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" @@ -1037,24 +494,18 @@ browser-resolve@^1.11.2: dependencies: resolve "1.1.7" -browserify-aes@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-0.4.0.tgz#067149b668df31c4b58533e02d01e806d8608e2c" - dependencies: - inherits "^2.0.1" - -browserify-zlib@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.1.4.tgz#bb35f8a519f600e0fa6b8485241c979d0141fb2d" - dependencies: - pako "~0.2.0" - -bser@^1.0.2: +bser@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/bser/-/bser-1.0.2.tgz#381116970b2a6deea5646dd15dd7278444b56169" dependencies: node-int64 "^0.4.0" +bser@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719" + dependencies: + node-int64 "^0.4.0" + bson@~1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/bson/-/bson-1.0.4.tgz#93c10d39eaa5b58415cbc4052f3e53e562b0b72c" @@ -1063,40 +514,18 @@ buffer-equal-constant-time@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" -buffer-shims@^1.0.0: +buffer-shims@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" -buffer@^4.9.0: - version "4.9.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - isarray "^1.0.0" - bufferjs@=1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/bufferjs/-/bufferjs-1.1.0.tgz#095ffa39c5e6b40a2178a1169c9effc584a73201" -builtin-modules@^1.0.0, builtin-modules@^1.1.1: +builtin-modules@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" -builtin-status-codes@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-2.0.0.tgz#6f22003baacf003ccd287afe6872151fddc58579" - -caller-path@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" - dependencies: - callsites "^0.2.0" - -callsites@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" - callsites@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" @@ -1109,12 +538,9 @@ camelcase@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" -cardinal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/cardinal/-/cardinal-1.0.0.tgz#50e21c1b0aa37729f9377def196b5a9cec932ee9" - dependencies: - ansicolors "~0.2.1" - redeyed "~1.0.0" +camelcase@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" caseless@~0.11.0: version "0.11.0" @@ -1127,7 +553,7 @@ center-align@^0.1.1: align-text "^0.1.3" lazy-cache "^1.0.3" -chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: +chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" dependencies: @@ -1137,52 +563,10 @@ chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chokidar@^1.0.0, chokidar@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.6.1.tgz#2f4447ab5e96e50fb3d789fd90d4c72e0e4c70c2" - dependencies: - anymatch "^1.3.0" - async-each "^1.0.0" - glob-parent "^2.0.0" - inherits "^2.0.1" - is-binary-path "^1.0.0" - is-glob "^2.0.0" - path-is-absolute "^1.0.0" - readdirp "^2.0.0" - optionalDependencies: - fsevents "^1.0.0" - ci-info@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.0.0.tgz#dc5285f2b4e251821683681c381c3388f46ec534" -circular-json@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.1.tgz#be8b36aefccde8b3ca7aa2d6afc07a37242c0d2d" - -cli-cursor@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" - dependencies: - restore-cursor "^1.0.1" - -cli-table@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.1.tgz#f53b05266a8b1a0b934b3d0821e6e2dc5914ae23" - dependencies: - colors "1.0.3" - -cli-usage@^0.1.1: - version "0.1.4" - resolved "https://registry.yarnpkg.com/cli-usage/-/cli-usage-0.1.4.tgz#7c01e0dc706c234b39c933838c8e20b2175776e2" - dependencies: - marked "^0.3.6" - marked-terminal "^1.6.2" - -cli-width@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.1.0.tgz#b234ca209b29ef66fc518d9b98d5847b00edf00a" - cliui@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" @@ -1199,21 +583,23 @@ cliui@^3.2.0: strip-ansi "^3.0.1" wrap-ansi "^2.0.0" -clone@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149" - -co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" -colors@1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" +color-convert@^1.0.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" + dependencies: + color-name "^1.1.1" + +color-name@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.2.tgz#5c8ab72b64bd2215d617ae9559ebb148475cf98d" + +colors@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" combined-stream@^1.0.5, combined-stream@~1.0.5: version "1.0.5" @@ -1221,46 +607,16 @@ combined-stream@^1.0.5, combined-stream@~1.0.5: dependencies: delayed-stream "~1.0.0" -commander@^2.8.1, commander@^2.9.0: +commander@^2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" dependencies: graceful-readlink ">= 1.0.0" -commondir@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" - concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" -concat-stream@^1.4.6: - version "1.6.0" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" - dependencies: - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - -console-browserify@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" - dependencies: - date-now "^0.1.4" - -console-control-strings@^1.0.0, console-control-strings@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" - -constants-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" - -contains-path@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" - content-type-parser@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.1.tgz#c3e56988c53c65127fb46d4032a3a900246fdc94" @@ -1269,6 +625,10 @@ convert-source-map@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.3.0.tgz#e9f3e9c6e2728efc2676696a70eb382f73106a67" +convert-source-map@^1.4.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.0.tgz#9acd70851c6d5dfdd93d9282e5edf94a03ff46b5" + core-js@^2.4.0: version "2.4.1" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.4.1.tgz#4de911e667b0eae9124e34254b53aea6fc618d3e" @@ -1277,15 +637,22 @@ core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" -coveralls@^2.11.14: - version "2.11.15" - resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-2.11.15.tgz#37d3474369d66c14f33fa73a9d25cee6e099fca0" +coveralls@^2.13.1: + version "2.13.1" + resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-2.13.1.tgz#d70bb9acc1835ec4f063ff9dac5423c17b11f178" dependencies: js-yaml "3.6.1" lcov-parse "0.0.10" log-driver "1.2.5" minimist "1.2.0" - request "2.75.0" + request "2.79.0" + +cross-spawn@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41" + dependencies: + lru-cache "^4.0.1" + which "^1.2.9" cryptiles@2.x.x: version "2.0.5" @@ -1293,63 +660,46 @@ cryptiles@2.x.x: dependencies: boom "2.x.x" -crypto-browserify@3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.3.0.tgz#b9fc75bb4a0ed61dcf1cd5dae96eb30c9c3e506c" - dependencies: - browserify-aes "0.4.0" - pbkdf2-compat "2.0.1" - ripemd160 "0.2.0" - sha.js "2.2.6" - crypto@^0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/crypto/-/crypto-0.0.3.tgz#470a81b86be4c5ee17acc8207a1f5315ae20dbb0" -cssom@0.3.x, "cssom@>= 0.3.0 < 0.4.0": +cssom@0.3.x: version "0.3.1" resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.1.tgz#c9e37ef2490e64f6d1baa10fda852257082c25d3" -"cssstyle@>= 0.2.36 < 0.3.0": +"cssom@>= 0.3.2 < 0.4.0": + version "0.3.2" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.2.tgz#b8036170c79f07a90ff2f16e22284027a243848b" + +"cssstyle@>= 0.2.37 < 0.3.0": version "0.2.37" resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.2.37.tgz#541097234cb2513c83ceed3acddc27ff27987d54" dependencies: cssom "0.3.x" -d@^0.1.1, d@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/d/-/d-0.1.1.tgz#da184c535d18d8ee7ba2aa229b914009fae11309" - dependencies: - es5-ext "~0.10.2" - -damerau-levenshtein@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.3.tgz#ae4f4ce0b62acae10ff63a01bb08f652f5213af2" - dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" dependencies: assert-plus "^1.0.0" -date-now@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" - -debug@2.2.0, debug@^2.1.1, debug@^2.2.0, debug@~2.2.0: +debug@^2.1.1, debug@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" dependencies: ms "0.7.1" +debug@^2.6.3: + version "2.6.8" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" + dependencies: + ms "2.0.0" + decamelize@^1.0.0, decamelize@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" -deep-extend@~0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.1.tgz#efe4113d08085f4e6f9687759810f807469e2253" - deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" @@ -1360,53 +710,26 @@ default-require-extensions@^1.0.0: dependencies: strip-bom "^2.0.0" -define-properties@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" - dependencies: - foreach "^2.0.5" - object-keys "^1.0.8" - -del@^2.0.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" - dependencies: - globby "^5.0.0" - is-path-cwd "^1.0.0" - is-path-in-cwd "^1.0.0" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" - rimraf "^2.2.8" - delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - detect-indent@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" dependencies: repeating "^2.0.0" -diff@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.1.0.tgz#9406c73a401e6c2b3ba901c5e2c44eb6a60c5385" +diff@^3.2.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.0.tgz#056695150d7aa93237ca7e378ac3b1682b7963b9" -doctrine@1.5.0, doctrine@^1.2.2: - version "1.5.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" +doctrine@^0.7.2: + version "0.7.2" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-0.7.2.tgz#7cb860359ba3be90e040b26b729ce4bfa654c523" dependencies: - esutils "^2.0.2" - isarray "^1.0.0" - -domain-browser@^1.1.1: - version "1.1.7" - resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc" + esutils "^1.1.6" + isarray "0.0.1" ecc-jsbn@~0.1.1: version "0.1.1" @@ -1432,25 +755,13 @@ emailjs@^1.0.8: optionalDependencies: bufferjs "=1.1.0" -emojis-list@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" - encoding@~0.1: version "0.1.12" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" dependencies: iconv-lite "~0.4.13" -enhanced-resolve@~0.9.0: - version "0.9.1" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-0.9.1.tgz#4d6e689b3725f86090927ccc86cd9f1635b89e2e" - dependencies: - graceful-fs "^4.1.2" - memory-fs "^0.2.0" - tapable "^0.1.8" - -"errno@>=0.1.1 <0.2.0-0", errno@^0.1.3: +errno@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" dependencies: @@ -1462,80 +773,11 @@ error-ex@^1.2.0: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.5.0: - version "1.6.1" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.6.1.tgz#bb8a2064120abcf928a086ea3d9043114285ec99" - dependencies: - es-to-primitive "^1.1.1" - function-bind "^1.1.0" - is-callable "^1.1.3" - is-regex "^1.0.3" - -es-to-primitive@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" - dependencies: - is-callable "^1.1.1" - is-date-object "^1.0.1" - is-symbol "^1.0.1" - -es5-ext@^0.10.7, es5-ext@^0.10.8, es5-ext@~0.10.11, es5-ext@~0.10.2, es5-ext@~0.10.7: - version "0.10.12" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.12.tgz#aa84641d4db76b62abba5e45fd805ecbab140047" - dependencies: - es6-iterator "2" - es6-symbol "~3.1" - -es6-iterator@2: - version "2.0.0" - resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.0.tgz#bd968567d61635e33c0b80727613c9cb4b096bac" - dependencies: - d "^0.1.1" - es5-ext "^0.10.7" - es6-symbol "3" - -es6-map@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.4.tgz#a34b147be224773a4d7da8072794cefa3632b897" - dependencies: - d "~0.1.1" - es5-ext "~0.10.11" - es6-iterator "2" - es6-set "~0.1.3" - es6-symbol "~3.1.0" - event-emitter "~0.3.4" - es6-promise@3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.2.1.tgz#ec56233868032909207170c39448e24449dd1fc4" -es6-set@~0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.4.tgz#9516b6761c2964b92ff479456233a247dc707ce8" - dependencies: - d "~0.1.1" - es5-ext "~0.10.11" - es6-iterator "2" - es6-symbol "3" - event-emitter "~0.3.4" - -es6-symbol@3, es6-symbol@~3.1, es6-symbol@~3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.0.tgz#94481c655e7a7cad82eba832d97d5433496d7ffa" - dependencies: - d "~0.1.1" - es5-ext "~0.10.11" - -es6-weak-map@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.1.tgz#0d2bbd8827eb5fb4ba8f97fbfea50d43db21ea81" - dependencies: - d "^0.1.1" - es5-ext "^0.10.8" - es6-iterator "2" - es6-symbol "3" - -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: +escape-string-regexp@^1.0.2: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -1550,174 +792,43 @@ escodegen@^1.6.1: optionalDependencies: source-map "~0.2.0" -escope@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" - dependencies: - es6-map "^0.1.3" - es6-weak-map "^2.0.1" - esrecurse "^4.1.0" - estraverse "^4.1.1" - -eslint-config-airbnb-base@^11.0.1: - version "11.0.1" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-11.0.1.tgz#5401dba284c6b7d7c8fb1c2ee19aba018f9dfa21" - -eslint-config-airbnb@^14.0.0: - version "14.0.0" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-14.0.0.tgz#bfd87a71102ba3ee19c3733357000b3d5e39790f" - dependencies: - eslint-config-airbnb-base "^11.0.1" - -eslint-import-resolver-node@^0.2.0: - version "0.2.3" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.2.3.tgz#5add8106e8c928db2cba232bcd9efa846e3da16c" - dependencies: - debug "^2.2.0" - object-assign "^4.0.1" - resolve "^1.1.6" - -eslint-module-utils@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.0.0.tgz#a6f8c21d901358759cdc35dbac1982ae1ee58bce" - dependencies: - debug "2.2.0" - pkg-dir "^1.0.0" - -eslint-plugin-flowtype@^2.33.0: - version "2.33.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.33.0.tgz#b2783814ed2ddcf729953b8f65ff73c90cabee4b" - dependencies: - lodash "^4.15.0" - -eslint-plugin-import@^2.0.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.2.0.tgz#72ba306fad305d67c4816348a4699a4229ac8b4e" - dependencies: - builtin-modules "^1.1.1" - contains-path "^0.1.0" - debug "^2.2.0" - doctrine "1.5.0" - eslint-import-resolver-node "^0.2.0" - eslint-module-utils "^2.0.0" - has "^1.0.1" - lodash.cond "^4.3.0" - minimatch "^3.0.3" - pkg-up "^1.0.0" - -eslint-plugin-jsx-a11y@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-3.0.2.tgz#9f0eabcafde3d2a2600d96a66adb90d099e841fe" - dependencies: - damerau-levenshtein "^1.0.0" - jsx-ast-utils "^1.0.0" - object-assign "^4.0.1" - -eslint-plugin-react@^6.9.0: - version "6.9.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-6.9.0.tgz#54c2e9906b76f9d10142030bdc34e9d6840a0bb2" - dependencies: - array.prototype.find "^2.0.1" - doctrine "^1.2.2" - jsx-ast-utils "^1.3.4" - -eslint@^3.14.1: - version "3.14.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.14.1.tgz#8a62175f2255109494747a1b25128d97b8eb3d97" - dependencies: - babel-code-frame "^6.16.0" - chalk "^1.1.3" - concat-stream "^1.4.6" - debug "^2.1.1" - doctrine "^1.2.2" - escope "^3.6.0" - espree "^3.3.1" - estraverse "^4.2.0" - esutils "^2.0.2" - file-entry-cache "^2.0.0" - glob "^7.0.3" - globals "^9.14.0" - ignore "^3.2.0" - imurmurhash "^0.1.4" - inquirer "^0.12.0" - is-my-json-valid "^2.10.0" - is-resolvable "^1.0.0" - js-yaml "^3.5.1" - json-stable-stringify "^1.0.0" - levn "^0.3.0" - lodash "^4.0.0" - mkdirp "^0.5.0" - natural-compare "^1.4.0" - optionator "^0.8.2" - path-is-inside "^1.0.1" - pluralize "^1.2.1" - progress "^1.1.8" - require-uncached "^1.0.2" - shelljs "^0.7.5" - strip-bom "^3.0.0" - strip-json-comments "~2.0.1" - table "^3.7.8" - text-table "~0.2.0" - user-home "^2.0.0" - -espree@^3.3.1: - version "3.3.2" - resolved "https://registry.yarnpkg.com/espree/-/espree-3.3.2.tgz#dbf3fadeb4ecb4d4778303e50103b3d36c88b89c" - dependencies: - acorn "^4.0.1" - acorn-jsx "^3.0.0" - esprima@^2.6.0, esprima@^2.7.1: version "2.7.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" -esprima@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.0.0.tgz#53cf247acda77313e551c3aa2e73342d3fb4f7d9" - -esrecurse@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.1.0.tgz#4713b6536adf7f2ac4f327d559e7756bff648220" - dependencies: - estraverse "~4.1.0" - object-assign "^4.0.1" +esprima@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" estraverse@^1.9.1: version "1.9.3" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" -estraverse@^4.1.1, estraverse@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" - -estraverse@~4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.1.1.tgz#f6caca728933a850ef90661d0e17982ba47111a2" +esutils@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-1.1.6.tgz#c01ccaa9ae4b897c6d0c3e210ae52f3c7a844375" esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" -event-emitter@~0.3.4: - version "0.3.4" - resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.4.tgz#8d63ddfb4cfe1fae3b32ca265c4c720222080bb5" - dependencies: - d "~0.1.1" - es5-ext "~0.10.7" - -events@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" - exec-sh@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.0.tgz#14f75de3f20d286ef933099b2ce50a90359cef10" dependencies: merge "^1.1.3" -exit-hook@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" +execa@^0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.5.1.tgz#de3fb85cb8d6e91c85bcbceb164581785cb57b36" + dependencies: + cross-spawn "^4.0.0" + get-stream "^2.2.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" expand-brackets@^0.1.4: version "0.1.5" @@ -1749,25 +860,17 @@ fast-levenshtein@~2.0.4: version "2.0.5" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.5.tgz#bd33145744519ab1c36c3ee9f31f08e9079b67f2" -fb-watchman@^1.8.0, fb-watchman@^1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-1.9.0.tgz#6f268f1f347a6b3c875d1e89da7e1ed79adfc0ec" - dependencies: - bser "^1.0.2" - -figures@^1.3.5: - version "1.7.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" +fb-watchman@^1.8.0: + version "1.9.2" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-1.9.2.tgz#a24cf47827f82d38fb59a69ad70b76e3b6ae7383" dependencies: - escape-string-regexp "^1.0.5" - object-assign "^4.1.0" + bser "1.0.2" -file-entry-cache@^2.0.0: +fb-watchman@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58" dependencies: - flat-cache "^1.2.1" - object-assign "^4.0.1" + bser "^2.0.0" filename-regex@^2.0.0: version "2.0.0" @@ -1790,33 +893,18 @@ fill-range@^2.1.0: repeat-element "^1.1.2" repeat-string "^1.5.2" -find-cache-dir@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-0.1.1.tgz#c8defae57c8a52a8a784f9e31c57c742e993a0b9" - dependencies: - commondir "^1.0.1" - mkdirp "^0.5.1" - pkg-dir "^1.0.0" - -find-up@^1.0.0, find-up@^1.1.2: +find-up@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" dependencies: path-exists "^2.0.0" pinkie-promise "^2.0.0" -flat-cache@^1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.2.2.tgz#fa86714e72c21db88601761ecf2f555d1abc6b96" +find-up@^2.0.0, find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" dependencies: - circular-json "^0.3.1" - del "^2.0.2" - graceful-fs "^4.1.2" - write "^0.2.1" - -flow-bin@^0.41.0: - version "0.41.0" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.41.0.tgz#8badac9a19da45004997e599bd316518db489b2e" + locate-path "^2.0.0" for-in@^0.1.5: version "0.1.6" @@ -1828,22 +916,10 @@ for-own@^0.1.4: dependencies: for-in "^0.1.5" -foreach@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" - forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" -form-data@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.0.0.tgz#6f0aebadcc5da16c13e1ecc11137d85f9b883b25" - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.5" - mime-types "^2.1.11" - form-data@~2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.2.tgz#89c3534008b97eada4cbb157d58f6f5df025eae4" @@ -1852,56 +928,18 @@ form-data@~2.1.1: combined-stream "^1.0.5" mime-types "^2.1.12" -fs-readdir-recursive@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.0.0.tgz#8cd1745c8b4f8a29c8caec392476921ba195f560" +fs-extra@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291" + dependencies: + graceful-fs "^4.1.2" + jsonfile "^3.0.0" + universalify "^0.1.0" fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" -fsevents@^1.0.0: - version "1.0.15" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.0.15.tgz#fa63f590f3c2ad91275e4972a6cea545fb0aae44" - dependencies: - nan "^2.3.0" - node-pre-gyp "^0.6.29" - -fstream-ignore@~1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" - dependencies: - fstream "^1.0.0" - inherits "2" - minimatch "^3.0.0" - -fstream@^1.0.0, fstream@^1.0.2, fstream@~1.0.10: - version "1.0.10" - resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.10.tgz#604e8a92fe26ffd9f6fae30399d4984e1ab22822" - dependencies: - graceful-fs "^4.1.2" - inherits "~2.0.0" - mkdirp ">=0.5 0" - rimraf "2" - -function-bind@^1.0.2, function-bind@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771" - -gauge@~2.7.1: - version "2.7.2" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.2.tgz#15cecc31b02d05345a5d6b0e171cdb3ad2307774" - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - supports-color "^0.2.0" - wide-align "^1.1.0" - generate-function@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" @@ -1916,6 +954,13 @@ get-caller-file@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" +get-stream@^2.2.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-2.3.1.tgz#5f38f93f346009666ee0150a054167f91bdd95de" + dependencies: + object-assign "^4.0.1" + pinkie-promise "^2.0.0" + getpass@^0.1.1: version "0.1.6" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.6.tgz#283ffd9fc1256840875311c1b60e8c40187110e6" @@ -1935,33 +980,22 @@ glob-parent@^2.0.0: dependencies: is-glob "^2.0.0" -glob@^7.0.0, glob@^7.0.3, glob@^7.0.5: - version "7.1.1" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" +glob@^7.0.3, glob@^7.0.5, glob@^7.1.1: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" inherits "2" - minimatch "^3.0.2" + minimatch "^3.0.4" once "^1.3.0" path-is-absolute "^1.0.0" -globals@^9.0.0, globals@^9.14.0: +globals@^9.0.0: version "9.14.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.14.0.tgz#8859936af0038741263053b39d0e76ca241e4034" -globby@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" - dependencies: - array-union "^1.0.1" - arrify "^1.0.0" - glob "^7.0.3" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" - -graceful-fs@^4.1.2, graceful-fs@^4.1.4, graceful-fs@^4.1.6: +graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6: version "4.1.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" @@ -1969,13 +1003,13 @@ graceful-fs@^4.1.2, graceful-fs@^4.1.4, graceful-fs@^4.1.6: version "1.0.1" resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" -growly@^1.2.0: +growly@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" handlebars@^4.0.3: - version "4.0.6" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.6.tgz#2ce4484850537f9c97a8026d5399b935c4ed4ed7" + version "4.0.10" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.10.tgz#3d30c718b09a3d96f23ea4cc1f403c4d3ba9ff4f" dependencies: async "^1.4.0" optimist "^0.6.1" @@ -2002,16 +1036,6 @@ has-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" -has-unicode@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - -has@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28" - dependencies: - function-bind "^1.0.2" - hawk@~3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" @@ -2050,30 +1074,10 @@ http-signature@~1.1.0: jsprim "^1.2.2" sshpk "^1.7.0" -https-browserify@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-0.0.1.tgz#3f91365cabe60b77ed0ebba24b454e3e09d95a82" - -iconv-lite@0.4.13, iconv-lite@^0.4.13, iconv-lite@~0.4.13: +iconv-lite@0.4.13, iconv-lite@~0.4.13: version "0.4.13" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" -ieee754@^1.1.4: - version "1.1.8" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" - -ignore@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.2.0.tgz#8d88f03c3002a0ac52114db25d2c673b0bf1e435" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - -indexof@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" - inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -2081,44 +1085,10 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1: +inherits@2, inherits@~2.0.1: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" -inherits@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" - -ini@~1.3.0: - version "1.3.4" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" - -inquirer@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e" - dependencies: - ansi-escapes "^1.1.0" - ansi-regex "^2.0.0" - chalk "^1.0.0" - cli-cursor "^1.0.1" - cli-width "^2.0.0" - figures "^1.3.5" - lodash "^4.3.0" - readline2 "^1.0.1" - run-async "^0.1.0" - rx-lite "^3.1.2" - string-width "^1.0.1" - strip-ansi "^3.0.0" - through "^2.3.6" - -interpret@^0.6.4: - version "0.6.6" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-0.6.6.tgz#fecd7a18e7ce5ca6abfb953e1f86213a49f1625b" - -interpret@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.1.tgz#d579fb7f693b858004947af39fa0db49f795602c" - invariant@^2.2.0: version "2.2.2" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" @@ -2133,12 +1103,6 @@ is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" -is-binary-path@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" - dependencies: - binary-extensions "^1.0.0" - is-buffer@^1.0.2: version "1.1.4" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.4.tgz#cfc86ccd5dc5a52fa80489111c6920c457e2d98b" @@ -2149,20 +1113,12 @@ is-builtin-module@^1.0.0: dependencies: builtin-modules "^1.0.0" -is-callable@^1.1.1, is-callable@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" - -is-ci@^1.0.9: +is-ci@^1.0.10: version "1.0.10" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.0.10.tgz#f739336b2632365061a9d48270cd56ae3369318e" dependencies: ci-info "^1.0.0" -is-date-object@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" - is-dotfile@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.2.tgz#2c132383f39199f8edc268ca01b9b007d205cc4d" @@ -2203,7 +1159,7 @@ is-glob@^2.0.0, is-glob@^2.0.1: dependencies: is-extglob "^1.0.0" -is-my-json-valid@^2.10.0, is-my-json-valid@^2.12.4: +is-my-json-valid@^2.12.4: version "2.15.0" resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz#936edda3ca3c211fd98f3b2d3e08da43f7b2915b" dependencies: @@ -2218,22 +1174,6 @@ is-number@^2.0.2, is-number@^2.1.0: dependencies: kind-of "^3.0.2" -is-path-cwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" - -is-path-in-cwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" - dependencies: - is-path-inside "^1.0.0" - -is-path-inside@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f" - dependencies: - path-is-inside "^1.0.1" - is-posix-bracket@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" @@ -2246,19 +1186,9 @@ is-property@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" -is-regex@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.3.tgz#0d55182bddf9f2fde278220aec3a75642c908637" - -is-resolvable@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.0.0.tgz#8df57c61ea2e3c501408d100fb013cf8d6e0cc62" - dependencies: - tryit "^1.0.1" - -is-symbol@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" +is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" is-typedarray@~1.0.0: version "1.0.0" @@ -2268,7 +1198,11 @@ is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" -isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + +isarray@1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -2276,9 +1210,9 @@ isemail@1.x.x: version "1.2.0" resolved "https://registry.yarnpkg.com/isemail/-/isemail-1.2.0.tgz#be03df8cc3e29de4d2c5df6501263f1fa4595e9a" -isexe@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-1.1.2.tgz#36f3e22e60750920f5e7241a476a8c6a42275ad0" +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" isobject@^2.0.0: version "2.1.0" @@ -2290,251 +1224,279 @@ isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" -istanbul-api@^1.1.0-alpha.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.1.1.tgz#d36e2f1560d1a43ce304c4ff7338182de61c8f73" +istanbul-api@^1.1.1: + version "1.1.10" + resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.1.10.tgz#f27e5e7125c8de13f6a80661af78f512e5439b2b" dependencies: async "^2.1.4" fileset "^2.0.2" - istanbul-lib-coverage "^1.0.0" - istanbul-lib-hook "^1.0.0" - istanbul-lib-instrument "^1.3.0" - istanbul-lib-report "^1.0.0-alpha.3" - istanbul-lib-source-maps "^1.1.0" - istanbul-reports "^1.0.0" + istanbul-lib-coverage "^1.1.1" + istanbul-lib-hook "^1.0.7" + istanbul-lib-instrument "^1.7.3" + istanbul-lib-report "^1.1.1" + istanbul-lib-source-maps "^1.2.1" + istanbul-reports "^1.1.1" js-yaml "^3.7.0" mkdirp "^0.5.1" once "^1.4.0" -istanbul-lib-coverage@^1.0.0, istanbul-lib-coverage@^1.0.0-alpha, istanbul-lib-coverage@^1.0.0-alpha.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.0.0.tgz#c3f9b6d226da12424064cce87fce0fb57fdfa7a2" +istanbul-lib-coverage@^1.0.1, istanbul-lib-coverage@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz#73bfb998885299415c93d38a3e9adf784a77a9da" -istanbul-lib-hook@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.0.0.tgz#fc5367ee27f59268e8f060b0c7aaf051d9c425c5" +istanbul-lib-hook@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.0.7.tgz#dd6607f03076578fe7d6f2a630cf143b49bacddc" dependencies: append-transform "^0.4.0" -istanbul-lib-instrument@^1.1.1, istanbul-lib-instrument@^1.1.4, istanbul-lib-instrument@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.3.0.tgz#19f0a973397454989b98330333063a5b56df0e58" +istanbul-lib-instrument@^1.4.2, istanbul-lib-instrument@^1.7.2, istanbul-lib-instrument@^1.7.3: + version "1.7.3" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.7.3.tgz#925b239163eabdd68cc4048f52c2fa4f899ecfa7" dependencies: babel-generator "^6.18.0" babel-template "^6.16.0" babel-traverse "^6.18.0" babel-types "^6.18.0" - babylon "^6.13.0" - istanbul-lib-coverage "^1.0.0" + babylon "^6.17.4" + istanbul-lib-coverage "^1.1.1" semver "^5.3.0" -istanbul-lib-report@^1.0.0-alpha.3: - version "1.0.0-alpha.3" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.0.0-alpha.3.tgz#32d5f6ec7f33ca3a602209e278b2e6ff143498af" +istanbul-lib-report@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.1.tgz#f0e55f56655ffa34222080b7a0cd4760e1405fc9" dependencies: - async "^1.4.2" - istanbul-lib-coverage "^1.0.0-alpha" + istanbul-lib-coverage "^1.1.1" mkdirp "^0.5.1" path-parse "^1.0.5" - rimraf "^2.4.3" supports-color "^3.1.2" -istanbul-lib-source-maps@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.1.0.tgz#9d429218f35b823560ea300a96ff0c3bbdab785f" +istanbul-lib-source-maps@^1.1.0, istanbul-lib-source-maps@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.1.tgz#a6fe1acba8ce08eebc638e572e294d267008aa0c" dependencies: - istanbul-lib-coverage "^1.0.0-alpha.0" + debug "^2.6.3" + istanbul-lib-coverage "^1.1.1" mkdirp "^0.5.1" - rimraf "^2.4.4" + rimraf "^2.6.1" source-map "^0.5.3" -istanbul-reports@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.0.0.tgz#24b4eb2b1d29d50f103b369bd422f6e640aa0777" +istanbul-reports@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.1.1.tgz#042be5c89e175bc3f86523caab29c014e77fee4e" dependencies: handlebars "^4.0.3" -jest-changed-files@^17.0.2: - version "17.0.2" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-17.0.2.tgz#f5657758736996f590a51b87e5c9369d904ba7b7" +jest-changed-files@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-20.0.3.tgz#9394d5cc65c438406149bef1bf4d52b68e03e3f8" -jest-cli@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-18.1.0.tgz#5ead36ecad420817c2c9baa2aa7574f63257b3d6" +jest-cli@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-20.0.4.tgz#e532b19d88ae5bc6c417e8b0593a6fe954b1dc93" dependencies: ansi-escapes "^1.4.0" callsites "^2.0.0" - chalk "^1.1.1" - graceful-fs "^4.1.6" - is-ci "^1.0.9" - istanbul-api "^1.1.0-alpha.1" - istanbul-lib-coverage "^1.0.0" - istanbul-lib-instrument "^1.1.1" - jest-changed-files "^17.0.2" - jest-config "^18.1.0" - jest-environment-jsdom "^18.1.0" - jest-file-exists "^17.0.0" - jest-haste-map "^18.1.0" - jest-jasmine2 "^18.1.0" - jest-mock "^18.0.0" - jest-resolve "^18.1.0" - jest-resolve-dependencies "^18.1.0" - jest-runtime "^18.1.0" - jest-snapshot "^18.1.0" - jest-util "^18.1.0" - json-stable-stringify "^1.0.0" - node-notifier "^4.6.1" - sane "~1.4.1" - strip-ansi "^3.0.1" + chalk "^1.1.3" + graceful-fs "^4.1.11" + is-ci "^1.0.10" + istanbul-api "^1.1.1" + istanbul-lib-coverage "^1.0.1" + istanbul-lib-instrument "^1.4.2" + istanbul-lib-source-maps "^1.1.0" + jest-changed-files "^20.0.3" + jest-config "^20.0.4" + jest-docblock "^20.0.3" + jest-environment-jsdom "^20.0.3" + jest-haste-map "^20.0.4" + jest-jasmine2 "^20.0.4" + jest-message-util "^20.0.3" + jest-regex-util "^20.0.3" + jest-resolve-dependencies "^20.0.3" + jest-runtime "^20.0.4" + jest-snapshot "^20.0.3" + jest-util "^20.0.3" + micromatch "^2.3.11" + node-notifier "^5.0.2" + pify "^2.3.0" + slash "^1.0.0" + string-length "^1.0.1" throat "^3.0.0" - which "^1.1.1" + which "^1.2.12" worker-farm "^1.3.1" - yargs "^6.3.0" + yargs "^7.0.2" -jest-config@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-18.1.0.tgz#6111740a6d48aab86ff5a9e6ab0b98bd993b6ff4" +jest-config@^20.0.0, jest-config@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-20.0.4.tgz#e37930ab2217c913605eff13e7bd763ec48faeea" dependencies: - chalk "^1.1.1" - jest-environment-jsdom "^18.1.0" - jest-environment-node "^18.1.0" - jest-jasmine2 "^18.1.0" - jest-mock "^18.0.0" - jest-resolve "^18.1.0" - jest-util "^18.1.0" - json-stable-stringify "^1.0.0" - -jest-diff@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-18.1.0.tgz#4ff79e74dd988c139195b365dc65d87f606f4803" + chalk "^1.1.3" + glob "^7.1.1" + jest-environment-jsdom "^20.0.3" + jest-environment-node "^20.0.3" + jest-jasmine2 "^20.0.4" + jest-matcher-utils "^20.0.3" + jest-regex-util "^20.0.3" + jest-resolve "^20.0.4" + jest-validate "^20.0.3" + pretty-format "^20.0.3" + +jest-diff@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-20.0.3.tgz#81f288fd9e675f0fb23c75f1c2b19445fe586617" dependencies: chalk "^1.1.3" - diff "^3.0.0" - jest-matcher-utils "^18.1.0" - pretty-format "^18.1.0" + diff "^3.2.0" + jest-matcher-utils "^20.0.3" + pretty-format "^20.0.3" -jest-environment-jsdom@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-18.1.0.tgz#18b42f0c4ea2bae9f36cab3639b1e8f8c384e24e" - dependencies: - jest-mock "^18.0.0" - jest-util "^18.1.0" - jsdom "^9.9.1" +jest-docblock@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-20.0.3.tgz#17bea984342cc33d83c50fbe1545ea0efaa44712" -jest-environment-node@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-18.1.0.tgz#4d6797572c8dda99acf5fae696eb62945547c779" +jest-environment-jsdom@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-20.0.3.tgz#048a8ac12ee225f7190417713834bb999787de99" dependencies: - jest-mock "^18.0.0" - jest-util "^18.1.0" + jest-mock "^20.0.3" + jest-util "^20.0.3" + jsdom "^9.12.0" -jest-file-exists@^17.0.0: - version "17.0.0" - resolved "https://registry.yarnpkg.com/jest-file-exists/-/jest-file-exists-17.0.0.tgz#7f63eb73a1c43a13f461be261768b45af2cdd169" +jest-environment-node@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-20.0.3.tgz#d488bc4612af2c246e986e8ae7671a099163d403" + dependencies: + jest-mock "^20.0.3" + jest-util "^20.0.3" -jest-haste-map@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-18.1.0.tgz#06839c74b770a40c1a106968851df8d281c08375" +jest-haste-map@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-20.0.4.tgz#653eb55c889ce3c021f7b94693f20a4159badf03" dependencies: - fb-watchman "^1.9.0" - graceful-fs "^4.1.6" + fb-watchman "^2.0.0" + graceful-fs "^4.1.11" + jest-docblock "^20.0.3" micromatch "^2.3.11" - sane "~1.4.1" + sane "~1.6.0" worker-farm "^1.3.1" -jest-jasmine2@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-18.1.0.tgz#094e104c2c189708766c77263bb2aecb5860a80b" +jest-jasmine2@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-20.0.4.tgz#fcc5b1411780d911d042902ef1859e852e60d5e1" dependencies: - graceful-fs "^4.1.6" - jest-matcher-utils "^18.1.0" - jest-matchers "^18.1.0" - jest-snapshot "^18.1.0" - jest-util "^18.1.0" + chalk "^1.1.3" + graceful-fs "^4.1.11" + jest-diff "^20.0.3" + jest-matcher-utils "^20.0.3" + jest-matchers "^20.0.3" + jest-message-util "^20.0.3" + jest-snapshot "^20.0.3" + once "^1.4.0" + p-map "^1.1.1" -jest-matcher-utils@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-18.1.0.tgz#1ac4651955ee2a60cef1e7fcc98cdfd773c0f932" +jest-matcher-utils@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-20.0.3.tgz#b3a6b8e37ca577803b0832a98b164f44b7815612" dependencies: chalk "^1.1.3" - pretty-format "^18.1.0" + pretty-format "^20.0.3" + +jest-matchers@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-matchers/-/jest-matchers-20.0.3.tgz#ca69db1c32db5a6f707fa5e0401abb55700dfd60" + dependencies: + jest-diff "^20.0.3" + jest-matcher-utils "^20.0.3" + jest-message-util "^20.0.3" + jest-regex-util "^20.0.3" -jest-matchers@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/jest-matchers/-/jest-matchers-18.1.0.tgz#0341484bf87a1fd0bac0a4d2c899e2b77a3f1ead" +jest-message-util@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-20.0.3.tgz#6aec2844306fcb0e6e74d5796c1006d96fdd831c" dependencies: - jest-diff "^18.1.0" - jest-matcher-utils "^18.1.0" - jest-util "^18.1.0" - pretty-format "^18.1.0" + chalk "^1.1.3" + micromatch "^2.3.11" + slash "^1.0.0" -jest-mock@^18.0.0: - version "18.0.0" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-18.0.0.tgz#5c248846ea33fa558b526f5312ab4a6765e489b3" +jest-mock@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-20.0.3.tgz#8bc070e90414aa155c11a8d64c869a0d5c71da59" -jest-resolve-dependencies@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-18.1.0.tgz#8134fb5caf59c9ed842fe0152ab01c52711f1bbb" +jest-regex-util@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-20.0.3.tgz#85bbab5d133e44625b19faf8c6aa5122d085d762" + +jest-resolve-dependencies@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-20.0.3.tgz#6e14a7b717af0f2cb3667c549de40af017b1723a" dependencies: - jest-file-exists "^17.0.0" - jest-resolve "^18.1.0" + jest-regex-util "^20.0.3" -jest-resolve@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-18.1.0.tgz#6800accb536658c906cd5e29de412b1ab9ac249b" +jest-resolve@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-20.0.4.tgz#9448b3e8b6bafc15479444c6499045b7ffe597a5" dependencies: browser-resolve "^1.11.2" - jest-file-exists "^17.0.0" - jest-haste-map "^18.1.0" - resolve "^1.2.0" + is-builtin-module "^1.0.0" + resolve "^1.3.2" -jest-runtime@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-18.1.0.tgz#3abfd687175b21fc3b85a2b8064399e997859922" +jest-runtime@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-20.0.4.tgz#a2c802219c4203f754df1404e490186169d124d8" dependencies: babel-core "^6.0.0" - babel-jest "^18.0.0" - babel-plugin-istanbul "^3.0.0" + babel-jest "^20.0.3" + babel-plugin-istanbul "^4.0.0" chalk "^1.1.3" - graceful-fs "^4.1.6" - jest-config "^18.1.0" - jest-file-exists "^17.0.0" - jest-haste-map "^18.1.0" - jest-mock "^18.0.0" - jest-resolve "^18.1.0" - jest-snapshot "^18.1.0" - jest-util "^18.1.0" - json-stable-stringify "^1.0.0" + convert-source-map "^1.4.0" + graceful-fs "^4.1.11" + jest-config "^20.0.4" + jest-haste-map "^20.0.4" + jest-regex-util "^20.0.3" + jest-resolve "^20.0.4" + jest-util "^20.0.3" + json-stable-stringify "^1.0.1" micromatch "^2.3.11" - yargs "^6.3.0" + strip-bom "3.0.0" + yargs "^7.0.2" -jest-snapshot@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-18.1.0.tgz#55b96d2ee639c9bce76f87f2a3fd40b71c7a5916" +jest-snapshot@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-20.0.3.tgz#5b847e1adb1a4d90852a7f9f125086e187c76566" dependencies: - jest-diff "^18.1.0" - jest-file-exists "^17.0.0" - jest-matcher-utils "^18.1.0" - jest-util "^18.1.0" + chalk "^1.1.3" + jest-diff "^20.0.3" + jest-matcher-utils "^20.0.3" + jest-util "^20.0.3" natural-compare "^1.4.0" - pretty-format "^18.1.0" + pretty-format "^20.0.3" -jest-util@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-18.1.0.tgz#3a99c32114ab17f84be094382527006e6d4bfc6a" +jest-util@^20.0.0, jest-util@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-20.0.3.tgz#0c07f7d80d82f4e5a67c6f8b9c3fe7f65cfd32ad" dependencies: - chalk "^1.1.1" - diff "^3.0.0" - graceful-fs "^4.1.6" - jest-file-exists "^17.0.0" - jest-mock "^18.0.0" + chalk "^1.1.3" + graceful-fs "^4.1.11" + jest-message-util "^20.0.3" + jest-mock "^20.0.3" + jest-validate "^20.0.3" + leven "^2.1.0" mkdirp "^0.5.1" -jest@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/jest/-/jest-18.1.0.tgz#bcebf1e203dee5c2ad2091c805300a343d9e6c7d" +jest-validate@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-20.0.3.tgz#d0cfd1de4f579f298484925c280f8f1d94ec3cab" + dependencies: + chalk "^1.1.3" + jest-matcher-utils "^20.0.3" + leven "^2.1.0" + pretty-format "^20.0.3" + +jest@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest/-/jest-20.0.4.tgz#3dd260c2989d6dad678b1e9cc4d91944f6d602ac" dependencies: - jest-cli "^18.1.0" + jest-cli "^20.0.4" jodid25519@^1.0.0: version "1.0.2" @@ -2559,7 +1521,7 @@ js-tokens@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.0.tgz#a2f2a969caae142fb3cd56228358c89366957bd1" -js-yaml@3.6.1, js-yaml@^3.5.1: +js-yaml@3.6.1: version "3.6.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.6.1.tgz#6e5fe67d8b205ce4d22fad05b7781e8dadcc4b30" dependencies: @@ -2567,54 +1529,49 @@ js-yaml@3.6.1, js-yaml@^3.5.1: esprima "^2.6.0" js-yaml@^3.7.0: - version "3.7.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" + version "3.9.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.9.0.tgz#4ffbbf25c2ac963b8299dc74da7e3740de1c18ce" dependencies: argparse "^1.0.7" - esprima "^2.6.0" + esprima "^4.0.0" jsbn@~0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.0.tgz#650987da0dd74f4ebf5a11377a2aa2d273e97dfd" -jsdom@^9.9.1: - version "9.9.1" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-9.9.1.tgz#84f3972ad394ab963233af8725211bce4d01bfd5" +jsdom@^9.12.0: + version "9.12.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-9.12.0.tgz#e8c546fffcb06c00d4833ca84410fed7f8a097d4" dependencies: - abab "^1.0.0" - acorn "^2.4.0" - acorn-globals "^1.0.4" + abab "^1.0.3" + acorn "^4.0.4" + acorn-globals "^3.1.0" array-equal "^1.0.0" content-type-parser "^1.0.1" - cssom ">= 0.3.0 < 0.4.0" - cssstyle ">= 0.2.36 < 0.3.0" + cssom ">= 0.3.2 < 0.4.0" + cssstyle ">= 0.2.37 < 0.3.0" escodegen "^1.6.1" html-encoding-sniffer "^1.0.1" - iconv-lite "^0.4.13" nwmatcher ">= 1.3.9 < 2.0.0" parse5 "^1.5.1" - request "^2.55.0" - sax "^1.1.4" - symbol-tree ">= 3.1.0 < 4.0.0" - tough-cookie "^2.3.1" - webidl-conversions "^3.0.1" + request "^2.79.0" + sax "^1.2.1" + symbol-tree "^3.2.1" + tough-cookie "^2.3.2" + webidl-conversions "^4.0.0" whatwg-encoding "^1.0.1" - whatwg-url "^4.1.0" - xml-name-validator ">= 2.0.1 < 3.0.0" + whatwg-url "^4.3.0" + xml-name-validator "^2.0.1" jsesc@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" -jsesc@~0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" - json-schema@0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" -json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1: +json-stable-stringify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" dependencies: @@ -2628,6 +1585,12 @@ json5@^0.5.0: version "0.5.1" resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" +jsonfile@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-3.0.1.tgz#a5ecc6f65f53f662c4415c7675a0331d0992ec66" + optionalDependencies: + graceful-fs "^4.1.6" + jsonify@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" @@ -2654,13 +1617,6 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.3.6" -jsx-ast-utils@^1.0.0, jsx-ast-utils@^1.3.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-1.3.5.tgz#9ba6297198d9f754594d62e59496ffb923778dd4" - dependencies: - acorn-jsx "^3.0.1" - object-assign "^4.1.0" - jwa@^1.1.4: version "1.1.5" resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.1.5.tgz#a0552ce0220742cd52e153774a32905c30e756e5" @@ -2702,7 +1658,11 @@ lcov-parse@0.0.10: version "0.0.10" resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3" -levn@^0.3.0, levn@~0.3.0: +leven@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" + +levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" dependencies: @@ -2719,97 +1679,27 @@ load-json-file@^1.0.0: pinkie-promise "^2.0.0" strip-bom "^2.0.0" -loader-utils@^0.2.11: - version "0.2.16" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.16.tgz#f08632066ed8282835dff88dfb52704765adee6d" - dependencies: - big.js "^3.1.3" - emojis-list "^2.0.0" - json5 "^0.5.0" - object-assign "^4.0.1" - -lodash._arraycopy@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/lodash._arraycopy/-/lodash._arraycopy-3.0.0.tgz#76e7b7c1f1fb92547374878a562ed06a3e50f6e1" - -lodash._arrayeach@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/lodash._arrayeach/-/lodash._arrayeach-3.0.0.tgz#bab156b2a90d3f1bbd5c653403349e5e5933ef9e" - -lodash._baseassign@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e" - dependencies: - lodash._basecopy "^3.0.0" - lodash.keys "^3.0.0" - -lodash._baseclone@^3.0.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/lodash._baseclone/-/lodash._baseclone-3.3.0.tgz#303519bf6393fe7e42f34d8b630ef7794e3542b7" - dependencies: - lodash._arraycopy "^3.0.0" - lodash._arrayeach "^3.0.0" - lodash._baseassign "^3.0.0" - lodash._basefor "^3.0.0" - lodash.isarray "^3.0.0" - lodash.keys "^3.0.0" - -lodash._basecopy@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" - -lodash._basefor@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/lodash._basefor/-/lodash._basefor-3.0.3.tgz#7550b4e9218ef09fad24343b612021c79b4c20c2" - -lodash._bindcallback@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e" - -lodash._getnative@^3.0.0: - version "3.9.1" - resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" - -lodash.assign@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" - -lodash.clonedeep@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-3.0.2.tgz#a0a1e40d82a5ea89ff5b147b8444ed63d92827db" +load-json-file@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" dependencies: - lodash._baseclone "^3.0.0" - lodash._bindcallback "^3.0.0" - -lodash.cond@^4.3.0: - version "4.5.2" - resolved "https://registry.yarnpkg.com/lodash.cond/-/lodash.cond-4.5.2.tgz#f471a1da486be60f6ab955d17115523dd1d255d5" - -lodash.isarguments@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" - -lodash.isarray@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + strip-bom "^3.0.0" -lodash.keys@^3.0.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" dependencies: - lodash._getnative "^3.0.0" - lodash.isarguments "^3.0.0" - lodash.isarray "^3.0.0" + p-locate "^2.0.0" + path-exists "^3.0.0" lodash.once@^4.0.0: version "4.1.1" resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" -lodash.pickby@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.pickby/-/lodash.pickby-4.6.0.tgz#7dea21d8c18d7703a27c704c15d3b84a67e33aff" - -lodash@^4.0.0, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.16.4, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.3.0: +lodash@^4.14.0, lodash@^4.16.4, lodash@^4.17.4, lodash@^4.2.0: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" @@ -2827,36 +1717,24 @@ loose-envify@^1.0.0: dependencies: js-tokens "^2.0.0" +lru-cache@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55" + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" + makeerror@1.0.x: version "1.0.11" resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" dependencies: tmpl "1.0.x" -marked-terminal@^1.6.2: - version "1.7.0" - resolved "https://registry.yarnpkg.com/marked-terminal/-/marked-terminal-1.7.0.tgz#c8c460881c772c7604b64367007ee5f77f125904" - dependencies: - cardinal "^1.0.0" - chalk "^1.1.3" - cli-table "^0.3.1" - lodash.assign "^4.2.0" - node-emoji "^1.4.1" - -marked@^0.3.6: - version "0.3.6" - resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.6.tgz#b2c6c618fccece4ef86c4fc6cb8a7cbf5aeda8d7" - -memory-fs@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.2.0.tgz#f2bb25368bc121e391c2520de92969caee0a0290" - -memory-fs@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.3.0.tgz#7bcc6b629e3a43e871d7e29aca6ae8a7f15cbb20" +mem@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" dependencies: - errno "^0.1.3" - readable-stream "^2.0.1" + mimic-fn "^1.0.0" merge@^1.1.3: version "1.2.0" @@ -2884,7 +1762,7 @@ mime-db@~1.25.0: version "1.25.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.25.0.tgz#c18dbd7c73a5dbf6f44a024dc0d165a1e7b1c392" -mime-types@^2.1.11, mime-types@^2.1.12, mime-types@~2.1.7: +mime-types@^2.1.12, mime-types@~2.1.7: version "2.1.13" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.13.tgz#e07aaa9c6c6b9a7ca3012c69003ad25a39e92a88" dependencies: @@ -2897,21 +1775,35 @@ mimelib@0.2.14: addressparser "~0.2.0" encoding "~0.1" -minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3: +mimic-fn@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" + +minimatch@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" dependencies: brace-expansion "^1.0.0" -minimist@0.0.8, minimist@~0.0.1: +minimatch@^3.0.3, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" -minimist@1.2.0, minimist@^1.1.1, minimist@^1.2.0: +minimist@1.2.0, minimist@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" -"mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: +minimist@~0.0.1: + version "0.0.10" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + +mkdirp@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: @@ -2921,110 +1813,45 @@ moment@2.x.x, "moment@= 2.11.2": version "2.11.2" resolved "https://registry.yarnpkg.com/moment/-/moment-2.11.2.tgz#87968e5f95ac038c2e42ac959c75819cd3f52901" -mongodb-core@2.1.7: - version "2.1.7" - resolved "https://registry.yarnpkg.com/mongodb-core/-/mongodb-core-2.1.7.tgz#6a27909b98142ef2508d924c274969008954fa29" +mongodb-core@2.1.14: + version "2.1.14" + resolved "https://registry.yarnpkg.com/mongodb-core/-/mongodb-core-2.1.14.tgz#13cba2764226b5be3d18992af0c963ce5ea0f0fd" dependencies: bson "~1.0.4" require_optional "~1.0.0" -mongodb@^2.2.22: - version "2.2.22" - resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-2.2.22.tgz#d67c588fc08f922db19754b1d2e03e2d7d1319fb" +mongodb@^2.2.30: + version "2.2.30" + resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-2.2.30.tgz#8ccd801f676c8172040c2f2b47e9602a0d5634ab" dependencies: es6-promise "3.2.1" - mongodb-core "2.1.7" - readable-stream "2.1.5" + mongodb-core "2.1.14" + readable-stream "2.2.7" ms@0.7.1, ms@^0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" -mute-stream@0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" - -nan@^2.3.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.4.0.tgz#fb3c59d45fe4effe215f0b890f8adf6eb32d2232" +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" -node-emoji@^1.4.1: - version "1.4.3" - resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.4.3.tgz#5272f70b823c4df6d7c39f84fd8203f35b3e5d36" - dependencies: - string.prototype.codepointat "^0.2.0" - node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" -node-libs-browser@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-0.7.0.tgz#3e272c0819e308935e26674408d7af0e1491b83b" - dependencies: - assert "^1.1.1" - browserify-zlib "^0.1.4" - buffer "^4.9.0" - console-browserify "^1.1.0" - constants-browserify "^1.0.0" - crypto-browserify "3.3.0" - domain-browser "^1.1.1" - events "^1.0.0" - https-browserify "0.0.1" - os-browserify "^0.2.0" - path-browserify "0.0.0" - process "^0.11.0" - punycode "^1.2.4" - querystring-es3 "^0.2.0" - readable-stream "^2.0.5" - stream-browserify "^2.0.1" - stream-http "^2.3.1" - string_decoder "^0.10.25" - timers-browserify "^2.0.2" - tty-browserify "0.0.0" - url "^0.11.0" - util "^0.10.3" - vm-browserify "0.0.4" - -node-notifier@^4.6.1: - version "4.6.1" - resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-4.6.1.tgz#056d14244f3dcc1ceadfe68af9cff0c5473a33f3" - dependencies: - cli-usage "^0.1.1" - growly "^1.2.0" - lodash.clonedeep "^3.0.0" - minimist "^1.1.1" - semver "^5.1.0" - shellwords "^0.1.0" - which "^1.0.5" - -node-pre-gyp@^0.6.29: - version "0.6.32" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.32.tgz#fc452b376e7319b3d255f5f34853ef6fd8fe1fd5" - dependencies: - mkdirp "~0.5.1" - nopt "~3.0.6" - npmlog "^4.0.1" - rc "~1.1.6" - request "^2.79.0" - rimraf "~2.5.4" - semver "~5.3.0" - tar "~2.2.1" - tar-pack "~3.3.0" - -node-uuid@~1.4.7: - version "1.4.7" - resolved "https://registry.yarnpkg.com/node-uuid/-/node-uuid-1.4.7.tgz#6da5a17668c4b3dd59623bda11cf7fa4c1f60a6f" - -nopt@~3.0.6: - version "3.0.6" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" +node-notifier@^5.0.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.1.2.tgz#2fa9e12605fa10009d44549d6fcd8a63dde0e4ff" dependencies: - abbrev "1" + growly "^1.3.0" + semver "^5.3.0" + shellwords "^0.1.0" + which "^1.2.12" normalize-package-data@^2.3.2: version "2.3.5" @@ -3039,14 +1866,11 @@ normalize-path@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.0.1.tgz#47886ac1662760d4261b7d979d241709d3ce3f7a" -npmlog@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.0.2.tgz#d03950e0e78ce1527ba26d2a7592e9348ac3e75f" +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.1" - set-blocking "~2.0.0" + path-key "^2.0.0" number-is-nan@^1.0.0: version "1.0.1" @@ -3060,14 +1884,14 @@ oauth-sign@~0.8.1: version "0.8.2" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" -object-assign@^4.0.1, object-assign@^4.1.0: +object-assign@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + +object-assign@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" -object-keys@^1.0.8: - version "1.0.11" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" - object.omit@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" @@ -3075,7 +1899,7 @@ object.omit@^2.0.0: for-own "^0.1.4" is-extendable "^0.1.1" -once@^1.3.0, once@~1.3.3: +once@^1.3.0: version "1.3.3" resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20" dependencies: @@ -3087,18 +1911,14 @@ once@^1.4.0: dependencies: wrappy "1" -onetime@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" - -optimist@^0.6.1, optimist@~0.6.0: +optimist@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" dependencies: minimist "~0.0.1" wordwrap "~0.0.2" -optionator@^0.8.1, optionator@^0.8.2: +optionator@^0.8.1: version "0.8.2" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" dependencies: @@ -3109,10 +1929,6 @@ optionator@^0.8.1, optionator@^0.8.2: type-check "~0.3.2" wordwrap "~1.0.0" -os-browserify@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.2.1.tgz#63fc4ccee5d2d7763d26bbf8601078e6c2e0044f" - os-homedir@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" @@ -3123,21 +1939,35 @@ os-locale@^1.4.0: dependencies: lcid "^1.0.0" +os-locale@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.0.0.tgz#15918ded510522b81ee7ae5a309d54f639fc39a4" + dependencies: + execa "^0.5.0" + lcid "^1.0.0" + mem "^1.1.0" + os-tmpdir@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" -output-file-sync@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/output-file-sync/-/output-file-sync-1.1.2.tgz#d0a33eefe61a205facb90092e826598d5245ce76" +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + +p-limit@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.1.0.tgz#b07ff2d9a5d88bec806035895a2bab66a27988bc" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" dependencies: - graceful-fs "^4.1.4" - mkdirp "^0.5.1" - object-assign "^4.1.0" + p-limit "^1.1.0" -pako@~0.2.0: - version "0.2.9" - resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" +p-map@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.1.1.tgz#05f5e4ae97a068371bc2a5cc86bfbdbc19c4ae7a" parse-glob@^3.0.4: version "3.0.4" @@ -3158,23 +1988,23 @@ parse5@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94" -path-browserify@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" - path-exists@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" dependencies: pinkie-promise "^2.0.0" +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" -path-is-inside@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" +path-key@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" path-parse@^1.0.5: version "1.0.5" @@ -3188,11 +2018,13 @@ path-type@^1.0.0: pify "^2.0.0" pinkie-promise "^2.0.0" -pbkdf2-compat@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pbkdf2-compat/-/pbkdf2-compat-2.0.1.tgz#b6e0c8fa99494d94e0511575802a59a5c142f288" +path-type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" + dependencies: + pify "^2.0.0" -pify@^2.0.0: +pify@^2.0.0, pify@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" @@ -3206,21 +2038,11 @@ pinkie@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" -pkg-dir@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4" - dependencies: - find-up "^1.0.0" - -pkg-up@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-1.0.0.tgz#3e08fb461525c4421624a33b9f7e6d0af5b05a26" +pkg-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" dependencies: - find-up "^1.0.0" - -pluralize@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45" + find-up "^2.1.0" prelude-ls@~1.1.2: version "1.1.2" @@ -3230,11 +2052,16 @@ preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" -pretty-format@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-18.1.0.tgz#fb65a86f7a7f9194963eee91865c1bcf1039e284" +prettier@^1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.5.2.tgz#7ea0751da27b93bfb6cecfcec509994f52d83bb3" + +pretty-format@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-20.0.3.tgz#020e350a560a1fe1a98dc3beb6ccffb386de8b14" dependencies: - ansi-styles "^2.2.1" + ansi-regex "^2.1.1" + ansi-styles "^3.0.0" private@^0.1.6: version "0.1.6" @@ -3244,42 +2071,22 @@ process-nextick-args@~1.0.6: version "1.0.7" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" -process@^0.11.0: - version "0.11.9" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.9.tgz#7bd5ad21aa6253e7da8682264f1e11d11c0318c1" - -progress@^1.1.8: - version "1.1.8" - resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" - prr@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" -punycode@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" +pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" -punycode@^1.2.4, punycode@^1.4.1: +punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" -qs@~6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.2.0.tgz#3b7848c03c2dece69a9522b0fae8c4126d745f3b" - qs@~6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.0.tgz#f403b264f23bc01228c74131b407f18d5ea5d442" -querystring-es3@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" - -querystring@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" - randomatic@^1.1.3: version "1.1.6" resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.6.tgz#110dcabff397e9dcff7c0789ccc0a49adf1ec5bb" @@ -3287,15 +2094,6 @@ randomatic@^1.1.3: is-number "^2.0.2" kind-of "^3.0.2" -rc@~1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.1.6.tgz#43651b76b6ae53b5c802f1151fa3fc3b059969c9" - dependencies: - deep-extend "~0.4.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~1.0.4" - read-pkg-up@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" @@ -3303,6 +2101,13 @@ read-pkg-up@^1.0.1: find-up "^1.0.0" read-pkg "^1.0.0" +read-pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" + dependencies: + find-up "^2.0.0" + read-pkg "^2.0.0" + read-pkg@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" @@ -3311,86 +2116,30 @@ read-pkg@^1.0.0: normalize-package-data "^2.3.2" path-type "^1.0.0" -readable-stream@2.1.5, readable-stream@~2.1.4: - version "2.1.5" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.1.5.tgz#66fa8b720e1438b364681f2ad1a63c618448c9d0" - dependencies: - buffer-shims "^1.0.0" - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "~1.0.0" - process-nextick-args "~1.0.6" - string_decoder "~0.10.x" - util-deprecate "~1.0.1" - -"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.1.0, readable-stream@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.2.tgz#a9e6fec3c7dda85f8bb1b3ba7028604556fc825e" +read-pkg@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" dependencies: - buffer-shims "^1.0.0" - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "~1.0.0" - process-nextick-args "~1.0.6" - string_decoder "~0.10.x" - util-deprecate "~1.0.1" + load-json-file "^2.0.0" + normalize-package-data "^2.3.2" + path-type "^2.0.0" -readable-stream@~2.0.5: - version "2.0.6" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e" +readable-stream@2.2.7: + version "2.2.7" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.7.tgz#07057acbe2467b22042d36f98c5ad507054e95b1" dependencies: + buffer-shims "~1.0.0" core-util-is "~1.0.0" inherits "~2.0.1" isarray "~1.0.0" process-nextick-args "~1.0.6" - string_decoder "~0.10.x" + string_decoder "~1.0.0" util-deprecate "~1.0.1" -readdirp@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" - dependencies: - graceful-fs "^4.1.2" - minimatch "^3.0.2" - readable-stream "^2.0.2" - set-immediate-shim "^1.0.1" - -readline2@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/readline2/-/readline2-1.0.1.tgz#41059608ffc154757b715d9989d199ffbf372e35" - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - mute-stream "0.0.5" - -rechoir@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" - dependencies: - resolve "^1.1.6" - -redeyed@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/redeyed/-/redeyed-1.0.1.tgz#e96c193b40c0816b00aec842698e61185e55498a" - dependencies: - esprima "~3.0.0" - -regenerate@^1.2.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260" - regenerator-runtime@^0.10.0: version "0.10.1" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.1.tgz#257f41961ce44558b18f7814af48c17559f9faeb" -regenerator-transform@0.9.8: - version "0.9.8" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.9.8.tgz#0f88bb2bc03932ddb7b6b7312e68078f01026d6c" - dependencies: - babel-runtime "^6.18.0" - babel-types "^6.19.0" - private "^0.1.6" - regex-cache@^0.4.2: version "0.4.3" resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" @@ -3398,24 +2147,6 @@ regex-cache@^0.4.2: is-equal-shallow "^0.1.3" is-primitive "^2.0.0" -regexpu-core@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" - dependencies: - regenerate "^1.2.1" - regjsgen "^0.2.0" - regjsparser "^0.1.4" - -regjsgen@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" - -regjsparser@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" - dependencies: - jsesc "~0.5.0" - repeat-element@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" @@ -3430,33 +2161,7 @@ repeating@^2.0.0: dependencies: is-finite "^1.0.0" -request@2.75.0: - version "2.75.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.75.0.tgz#d2b8268a286da13eaa5d01adf5d18cc90f657d93" - dependencies: - aws-sign2 "~0.6.0" - aws4 "^1.2.1" - bl "~1.1.2" - caseless "~0.11.0" - combined-stream "~1.0.5" - extend "~3.0.0" - forever-agent "~0.6.1" - form-data "~2.0.0" - har-validator "~2.0.6" - hawk "~3.1.3" - http-signature "~1.1.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.7" - node-uuid "~1.4.7" - oauth-sign "~0.8.1" - qs "~6.2.0" - stringstream "~0.0.4" - tough-cookie "~2.3.0" - tunnel-agent "~0.4.1" - -request@^2.55.0, request@^2.79.0: +request@2.79.0, request@^2.79.0: version "2.79.0" resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" dependencies: @@ -3489,13 +2194,6 @@ require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" -require-uncached@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" - dependencies: - caller-path "^0.1.0" - resolve-from "^1.0.0" - require_optional@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/require_optional/-/require_optional-1.0.0.tgz#52a86137a849728eb60a55533617f8f914f59abf" @@ -3503,10 +2201,6 @@ require_optional@~1.0.0: resolve-from "^2.0.0" semver "^5.1.0" -resolve-from@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" - resolve-from@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-2.0.0.tgz#9480ab20e94ffa1d9e80a804c7ea147611966b57" @@ -3515,16 +2209,11 @@ resolve@1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" -resolve@^1.1.6, resolve@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.2.0.tgz#9589c3f2f6149d1417a40becc1663db6ec6bc26c" - -restore-cursor@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" +resolve@^1.3.2: + version "1.3.3" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.3.tgz#655907c3469a8680dc2de3a275a8fdd69691f0e5" dependencies: - exit-hook "^1.0.0" - onetime "^1.0.0" + path-parse "^1.0.5" right-align@^0.1.1: version "0.1.3" @@ -3532,34 +2221,25 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" -rimraf@2, rimraf@^2.2.8, rimraf@^2.4.3, rimraf@^2.4.4, rimraf@~2.5.1, rimraf@~2.5.4: - version "2.5.4" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04" +rimraf@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" dependencies: glob "^7.0.5" -ripemd160@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-0.2.0.tgz#2bf198bde167cacfa51c0a928e84b68bbe171fce" - -run-async@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389" - dependencies: - once "^1.3.0" - -rx-lite@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" - safe-buffer@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" -sane@~1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/sane/-/sane-1.4.1.tgz#88f763d74040f5f0c256b6163db399bf110ac715" +safe-buffer@~5.1.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" + +sane@~1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/sane/-/sane-1.6.0.tgz#9610c452307a135d29c1fdfe2547034180c46775" dependencies: + anymatch "^1.3.0" exec-sh "^0.2.0" fb-watchman "^1.8.0" minimatch "^3.0.2" @@ -3567,38 +2247,18 @@ sane@~1.4.1: walker "~1.0.5" watch "~0.10.0" -sax@^1.1.4: - version "1.2.1" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a" +sax@^1.2.1: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" -"semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.3.0, semver@~5.3.0: +"semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" -set-blocking@^2.0.0, set-blocking@~2.0.0: +set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" -set-immediate-shim@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" - -setimmediate@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - -sha.js@2.2.6: - version "2.2.6" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.2.6.tgz#17ddeddc5f722fb66501658895461977867315ba" - -shelljs@^0.7.5: - version "0.7.5" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.5.tgz#2eef7a50a21e1ccf37da00df767ec69e30ad0675" - dependencies: - glob "^7.0.0" - interpret "^1.0.0" - rechoir "^0.6.2" - shellwords@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.0.tgz#66afd47b6a12932d9071cbfd98a52e785cd0ba14" @@ -3611,33 +2271,31 @@ slash@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" -slice-ansi@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" - sntp@1.x.x: version "1.0.9" resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" dependencies: hoek "2.x.x" -source-list-map@~0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-0.1.7.tgz#d4b5ce2a46535c72c7e8527c71a77d250618172e" - source-map-support@^0.4.2: version "0.4.6" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.6.tgz#32552aa64b458392a85eab3b0b5ee61527167aeb" dependencies: source-map "^0.5.3" -source-map@^0.4.4, source-map@~0.4.1: +source-map-support@^0.4.4: + version "0.4.15" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.15.tgz#03202df65c06d2bd8c7ec2362a193056fef8d3b1" + dependencies: + source-map "^0.5.6" + +source-map@^0.4.4: version "0.4.4" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" dependencies: amdefine ">=0.0.4" -source-map@^0.5.0, source-map@^0.5.3, source-map@~0.5.1: +source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1: version "0.5.6" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" @@ -3684,22 +2342,11 @@ starttls@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/starttls/-/starttls-1.0.1.tgz#e6081c25de6b178f5a75f8f271c1487449183b42" -stream-browserify@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" - dependencies: - inherits "~2.0.1" - readable-stream "^2.0.2" - -stream-http@^2.3.1: - version "2.5.0" - resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.5.0.tgz#585eee513217ed98fe199817e7313b6f772a6802" +string-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-1.0.1.tgz#56970fb1c38558e9e70b728bf3de269ac45adfac" dependencies: - builtin-status-codes "^2.0.0" - inherits "^2.0.1" - readable-stream "^2.1.0" - to-arraybuffer "^1.0.0" - xtend "^4.0.0" + strip-ansi "^3.0.0" string-width@^1.0.1, string-width@^1.0.2: version "1.0.2" @@ -3710,19 +2357,17 @@ string-width@^1.0.1, string-width@^1.0.2: strip-ansi "^3.0.0" string-width@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.0.0.tgz#635c5436cc72a6e0c387ceca278d4e2eec52687e" + version "2.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.0.tgz#030664561fc146c9423ec7d978fe2457437fe6d0" dependencies: is-fullwidth-code-point "^2.0.0" - strip-ansi "^3.0.0" - -string.prototype.codepointat@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/string.prototype.codepointat/-/string.prototype.codepointat-0.2.0.tgz#6b26e9bd3afcaa7be3b4269b526de1b82000ac78" + strip-ansi "^4.0.0" -string_decoder@^0.10.25, string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" +string_decoder@~1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" + dependencies: + safe-buffer "~5.1.0" stringstream@~0.0.4: version "0.0.5" @@ -3734,81 +2379,43 @@ strip-ansi@^3.0.0, strip-ansi@^3.0.1: dependencies: ansi-regex "^2.0.0" -strip-bom@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" dependencies: - is-utf8 "^0.2.0" + ansi-regex "^3.0.0" -strip-bom@^3.0.0: +strip-bom@3.0.0, strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" -strip-json-comments@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91" - -strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + dependencies: + is-utf8 "^0.2.0" -supports-color@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-0.2.0.tgz#d92de2694eb3f67323973d7ae3d8b55b4c22190a" +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" -supports-color@^3.1.0, supports-color@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5" +supports-color@^3.1.2: + version "3.2.3" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" dependencies: has-flag "^1.0.0" -"symbol-tree@>= 3.1.0 < 4.0.0": - version "3.2.1" - resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.1.tgz#8549dd1d01fa9f893c18cc9ab0b106b4d9b168cb" - -table@^3.7.8: - version "3.8.3" - resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f" - dependencies: - ajv "^4.7.0" - ajv-keywords "^1.0.0" - chalk "^1.1.1" - lodash "^4.0.0" - slice-ansi "0.0.4" - string-width "^2.0.0" - -tapable@^0.1.8, tapable@~0.1.8: - version "0.1.10" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.1.10.tgz#29c35707c2b70e50d07482b5d202e8ed446dafd4" - -tar-pack@~3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.3.0.tgz#30931816418f55afc4d21775afdd6720cee45dae" - dependencies: - debug "~2.2.0" - fstream "~1.0.10" - fstream-ignore "~1.0.5" - once "~1.3.3" - readable-stream "~2.1.4" - rimraf "~2.5.1" - tar "~2.2.1" - uid-number "~0.0.6" - -tar@~2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" - dependencies: - block-stream "*" - fstream "^1.0.2" - inherits "2" +symbol-tree@^3.2.1: + version "3.2.2" + resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" -test-exclude@^3.2.2: - version "3.3.0" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-3.3.0.tgz#7a17ca1239988c98367b0621456dbb7d4bc38977" +test-exclude@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.1.1.tgz#4d84964b0966b0087ecc334a2ce002d3d9341e26" dependencies: arrify "^1.0.1" micromatch "^2.3.11" @@ -3816,32 +2423,14 @@ test-exclude@^3.2.2: read-pkg-up "^1.0.1" require-main-filename "^1.0.1" -text-table@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - throat@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/throat/-/throat-3.0.0.tgz#e7c64c867cbb3845f10877642f7b60055b8ec0d6" - -through@^2.3.6: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - -timers-browserify@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.2.tgz#ab4883cf597dcd50af211349a00fbca56ac86b86" - dependencies: - setimmediate "^1.0.4" + version "3.2.0" + resolved "https://registry.yarnpkg.com/throat/-/throat-3.2.0.tgz#50cb0670edbc40237b9e347d7e1f88e4620af836" tmpl@1.0.x: version "1.0.4" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" -to-arraybuffer@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" - to-fast-properties@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.2.tgz#f3f5c0c3ba7299a7ef99427e44633257ade43320" @@ -3852,7 +2441,7 @@ topo@1.x.x: dependencies: hoek "2.x.x" -tough-cookie@^2.3.1, tough-cookie@~2.3.0: +tough-cookie@^2.3.2, tough-cookie@~2.3.0: version "2.3.2" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" dependencies: @@ -3862,13 +2451,66 @@ tr46@~0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" -tryit@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/tryit/-/tryit-1.0.3.tgz#393be730a9446fd1ead6da59a014308f36c289cb" +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + +ts-jest@^20.0.7: + version "20.0.7" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-20.0.7.tgz#82c99b9163f8c0a864a2b221238202fa1e623c26" + dependencies: + "@types/babel-core" "^6.7.14" + babel-core "^6.24.1" + babel-plugin-istanbul "^4.1.4" + babel-plugin-transform-es2015-modules-commonjs "^6.24.1" + babel-preset-jest "^20.0.3" + fs-extra "^3.0.0" + jest-config "^20.0.0" + jest-util "^20.0.0" + pkg-dir "^2.0.0" + source-map-support "^0.4.4" + yargs "^8.0.1" + +tslib@^1.0.0, tslib@^1.7.1: + version "1.7.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.7.1.tgz#bc8004164691923a79fe8378bbeb3da2017538ec" + +tslint-config-prettier@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/tslint-config-prettier/-/tslint-config-prettier-1.1.0.tgz#40c026a56e4da27063b3e9bcd71f4f8109fee369" -tty-browserify@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" +tslint-eslint-rules@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/tslint-eslint-rules/-/tslint-eslint-rules-4.1.1.tgz#7c30e7882f26bc276bff91d2384975c69daf88ba" + dependencies: + doctrine "^0.7.2" + tslib "^1.0.0" + tsutils "^1.4.0" + +tslint@^5.5.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.5.0.tgz#10e8dab3e3061fa61e9442e8cee3982acf20a6aa" + dependencies: + babel-code-frame "^6.22.0" + colors "^1.1.2" + commander "^2.9.0" + diff "^3.2.0" + glob "^7.1.1" + minimatch "^3.0.4" + resolve "^1.3.2" + semver "^5.3.0" + tslib "^1.7.1" + tsutils "^2.5.1" + +tsutils@^1.4.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-1.9.1.tgz#b9f9ab44e55af9681831d5f28d0aeeaf5c750cb0" + +tsutils@^2.5.1: + version "2.6.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.6.0.tgz#e5e99c79a8accd3977ce18d83fdf1d235a6c2ebb" + dependencies: + tslib "^1.7.1" tunnel-agent@~0.4.1: version "0.4.3" @@ -3884,64 +2526,35 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" -typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" +typescript@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.4.1.tgz#c3ccb16ddaa0b2314de031e7e6fee89e5ba346bc" -uglify-js@^2.6, uglify-js@~2.7.3: - version "2.7.5" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.7.5.tgz#4612c0c7baaee2ba7c487de4904ae122079f2ca8" +uglify-js@^2.6: + version "2.8.29" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" dependencies: - async "~0.2.6" source-map "~0.5.1" - uglify-to-browserify "~1.0.0" yargs "~3.10.0" + optionalDependencies: + uglify-to-browserify "~1.0.0" uglify-to-browserify@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" -uid-number@~0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" - -url@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" - dependencies: - punycode "1.3.2" - querystring "0.2.0" - -user-home@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190" - -user-home@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f" - dependencies: - os-homedir "^1.0.0" +universalify@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.0.tgz#9eb1c4651debcc670cc94f1a75762332bb967778" util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" -util@0.10.3, util@^0.10.3: - version "0.10.3" - resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" - dependencies: - inherits "2.0.1" - uuid@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" -v8flags@^2.0.10: - version "2.0.11" - resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.0.11.tgz#bca8f30f0d6d60612cc2c00641e6962d42ae6881" - dependencies: - user-home "^1.1.1" - validate-npm-package-license@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" @@ -3955,12 +2568,6 @@ verror@1.3.6: dependencies: extsprintf "1.0.2" -vm-browserify@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" - dependencies: - indexof "0.0.1" - walker@~1.0.5: version "1.0.7" resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" @@ -3971,48 +2578,13 @@ watch@~0.10.0: version "0.10.0" resolved "https://registry.yarnpkg.com/watch/-/watch-0.10.0.tgz#77798b2da0f9910d595f1ace5b0c2258521f21dc" -watchpack@^0.2.1: - version "0.2.9" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-0.2.9.tgz#62eaa4ab5e5ba35fdfc018275626e3c0f5e3fb0b" - dependencies: - async "^0.9.0" - chokidar "^1.0.0" - graceful-fs "^4.1.2" - -webidl-conversions@^3.0.0, webidl-conversions@^3.0.1: +webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" -webpack-core@~0.6.9: - version "0.6.9" - resolved "https://registry.yarnpkg.com/webpack-core/-/webpack-core-0.6.9.tgz#fc571588c8558da77be9efb6debdc5a3b172bdc2" - dependencies: - source-list-map "~0.1.7" - source-map "~0.4.1" - -webpack-node-externals@^1.5.4: - version "1.5.4" - resolved "https://registry.yarnpkg.com/webpack-node-externals/-/webpack-node-externals-1.5.4.tgz#ea05ba17108a23e776c35c42e7bb0e86c225be00" - -webpack@^1.14.0: - version "1.14.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-1.14.0.tgz#54f1ffb92051a328a5b2057d6ae33c289462c823" - dependencies: - acorn "^3.0.0" - async "^1.3.0" - clone "^1.0.2" - enhanced-resolve "~0.9.0" - interpret "^0.6.4" - loader-utils "^0.2.11" - memory-fs "~0.3.0" - mkdirp "~0.5.0" - node-libs-browser "^0.7.0" - optimist "~0.6.0" - supports-color "^3.1.0" - tapable "~0.1.8" - uglify-js "~2.7.3" - watchpack "^0.2.1" - webpack-core "~0.6.9" +webidl-conversions@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.1.tgz#8015a17ab83e7e1b311638486ace81da6ce206a0" whatwg-encoding@^1.0.1: version "1.0.1" @@ -4020,9 +2592,9 @@ whatwg-encoding@^1.0.1: dependencies: iconv-lite "0.4.13" -whatwg-url@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-4.1.1.tgz#567074923352de781e3500d64a86aa92a971b4a4" +whatwg-url@^4.3.0: + version "4.8.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-4.8.0.tgz#d2981aa9148c1e00a41c5a6131166ab4683bbcc0" dependencies: tr46 "~0.0.3" webidl-conversions "^3.0.0" @@ -4031,26 +2603,20 @@ which-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" -which@^1.0.5, which@^1.1.1: - version "1.2.12" - resolved "https://registry.yarnpkg.com/which/-/which-1.2.12.tgz#de67b5e450269f194909ef23ece4ebe416fa1192" - dependencies: - isexe "^1.1.1" +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" -wide-align@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.0.tgz#40edde802a71fea1f070da3e62dcda2e7add96ad" +which@^1.2.12, which@^1.2.9: + version "1.2.14" + resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5" dependencies: - string-width "^1.0.1" + isexe "^2.0.0" window-size@0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" -window-size@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" - wordwrap@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" @@ -4064,11 +2630,11 @@ wordwrap@~1.0.0: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" worker-farm@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.3.1.tgz#4333112bb49b17aa050b87895ca6b2cacf40e5ff" + version "1.4.1" + resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.4.1.tgz#a438bc993a7a7d133bcb6547c95eca7cff4897d8" dependencies: - errno ">=0.1.1 <0.2.0-0" - xtend ">=4.0.0 <4.1.0-0" + errno "^0.1.4" + xtend "^4.0.1" wrap-ansi@^2.0.0: version "2.1.0" @@ -4081,17 +2647,11 @@ wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" -write@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" - dependencies: - mkdirp "^0.5.1" - -"xml-name-validator@>= 2.0.1 < 3.0.0": +xml-name-validator@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635" -"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@^4.0.1: +xtend@^4.0.0, xtend@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" @@ -4099,15 +2659,25 @@ y18n@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" -yargs-parser@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.0.tgz#6ced869cd05a3dca6a1eaee38b68aeed4b0b4101" +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + +yargs-parser@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a" dependencies: camelcase "^3.0.0" -yargs@^6.3.0: - version "6.5.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.5.0.tgz#a902e23a1f0fe912b2a03f6131b7ed740c9718ff" +yargs-parser@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" + dependencies: + camelcase "^4.1.0" + +yargs@^7.0.2: + version "7.1.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8" dependencies: camelcase "^3.0.0" cliui "^3.2.0" @@ -4120,9 +2690,26 @@ yargs@^6.3.0: set-blocking "^2.0.0" string-width "^1.0.2" which-module "^1.0.0" - window-size "^0.2.0" y18n "^3.2.1" - yargs-parser "^4.2.0" + yargs-parser "^5.0.0" + +yargs@^8.0.1: + version "8.0.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360" + dependencies: + camelcase "^4.1.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^2.0.0" + read-pkg-up "^2.0.0" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^2.0.0" + which-module "^2.0.0" + y18n "^3.2.1" + yargs-parser "^7.0.0" yargs@~3.10.0: version "3.10.0" From 3590738fc4a665a5b932cc3a9347f923c44bfd78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Pradel?= Date: Sat, 23 Sep 2017 23:40:32 +0200 Subject: [PATCH 057/128] Merge pull request #28 from js-accounts/fix-password-name passsword to password --- packages/accounts-mongo/__tests__/index.ts | 6 +++--- packages/accounts-mongo/src/index.ts | 9 +++------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/packages/accounts-mongo/__tests__/index.ts b/packages/accounts-mongo/__tests__/index.ts index d83b4ac29..a0d78a7f1 100644 --- a/packages/accounts-mongo/__tests__/index.ts +++ b/packages/accounts-mongo/__tests__/index.ts @@ -380,10 +380,10 @@ describe('Mongo', () => { }); }); - describe('setPasssword', () => { + describe('setPassword', () => { it('should throw if user is not found', async () => { try { - await mongo.setPasssword('589871d1c9393d445745a57c', 'toto'); + await mongo.setPassword('589871d1c9393d445745a57c', 'toto'); throw new Error(); } catch (err) { expect(err.message).toEqual('User not found'); @@ -394,7 +394,7 @@ describe('Mongo', () => { const newPassword = 'newpass'; const userId = await mongo.createUser(user); await delay(10); - await mongo.setPasssword(userId, newPassword); + await mongo.setPassword(userId, newPassword); const retUser = await mongo.findUserById(userId); expect(retUser.services.password.bcrypt).toBeTruthy(); expect(retUser.services.password.bcrypt).toEqual(newPassword); diff --git a/packages/accounts-mongo/src/index.ts b/packages/accounts-mongo/src/index.ts index f2de59567..8503d177f 100644 --- a/packages/accounts-mongo/src/index.ts +++ b/packages/accounts-mongo/src/index.ts @@ -240,10 +240,7 @@ export default class Mongo { } } - public async setPasssword( - userId: string, - newPassword: string - ): Promise { + public async setPassword(userId: string, newPassword: string): Promise { const id = this.options.convertUserIdToMongoObjectId ? toMongoID(userId) : userId; @@ -401,11 +398,11 @@ export default class Mongo { ); } - public async setResetPasssword( + public async setResetPassword( userId: string, email: string, newPassword: string ): Promise { - await this.setPasssword(userId, newPassword); + await this.setPassword(userId, newPassword); } } From 2544e1ed006ee89cc55f8605e740a5a5b387d423 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Pradel?= Date: Wed, 15 Nov 2017 18:55:26 +0100 Subject: [PATCH 058/128] Merge pull request #30 from accounts-js/circle-ci-2 Circleci 2.0 --- packages/accounts-mongo/.circleci/config.yml | 12 +++++++++ packages/accounts-mongo/circle.yml | 27 -------------------- packages/accounts-mongo/package.json | 6 ++--- 3 files changed, 15 insertions(+), 30 deletions(-) create mode 100644 packages/accounts-mongo/.circleci/config.yml delete mode 100644 packages/accounts-mongo/circle.yml diff --git a/packages/accounts-mongo/.circleci/config.yml b/packages/accounts-mongo/.circleci/config.yml new file mode 100644 index 000000000..09b9fdf35 --- /dev/null +++ b/packages/accounts-mongo/.circleci/config.yml @@ -0,0 +1,12 @@ +version: 2 + +jobs: + build: + docker: + - image: circleci/node:8 + - image: circleci/mongo:3 + steps: + - checkout + - run: yarn install --frozen-lockfile + - run: yarn test + - run: yarn coveralls diff --git a/packages/accounts-mongo/circle.yml b/packages/accounts-mongo/circle.yml deleted file mode 100644 index 90dbf9ac4..000000000 --- a/packages/accounts-mongo/circle.yml +++ /dev/null @@ -1,27 +0,0 @@ -machine: - node: - version: 6.2.1 - environment: - YARN_VERSION: 0.18.1 - PATH: "${PATH}:${HOME}/.yarn/bin:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin" - -dependencies: - pre: - - | - if [[ ! -e ~/.yarn/bin/yarn || $(yarn --version) != "${YARN_VERSION}" ]]; then - echo "Download and install Yarn." - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version $YARN_VERSION - else - echo "The correct version of Yarn is already installed." - fi - override: - - yarn install - cache_directories: - - ~/.yarn - - ~/.cache/yarn - -test: - override: - - yarn test - post: - - yarn coveralls diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 25b949125..529aa17e4 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -13,9 +13,9 @@ "testonly": "jest", "lint": "tslint -c tslint.json '{src,__tests__}/**/*.ts'", "prettier": "prettier --single-quote --trailing-comma es5 --parser typescript '{src,__tests__}/**/*.ts'", - "prettier-diff": "yarn prettier -- --list-different", - "format": "yarn prettier -- --write", - "coverage": "yarn testonly -- --coverage", + "prettier-diff": "yarn prettier --list-different", + "format": "yarn prettier --write", + "coverage": "yarn testonly --coverage", "coveralls": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage" }, "jest": { From 0fdf4a27c4f4889bd934188841ecf54846ac1ffa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Pradel?= Date: Wed, 15 Nov 2017 19:29:03 +0100 Subject: [PATCH 059/128] Merge pull request #29 from accounts-js/verify-email verify email function --- packages/accounts-mongo/__tests__/index.ts | 27 + packages/accounts-mongo/package.json | 20 +- packages/accounts-mongo/src/index.ts | 19 + packages/accounts-mongo/yarn.lock | 983 +++++++++++++-------- 4 files changed, 682 insertions(+), 367 deletions(-) diff --git a/packages/accounts-mongo/__tests__/index.ts b/packages/accounts-mongo/__tests__/index.ts index a0d78a7f1..b65ac52f2 100644 --- a/packages/accounts-mongo/__tests__/index.ts +++ b/packages/accounts-mongo/__tests__/index.ts @@ -1,4 +1,5 @@ import * as mongodb from 'mongodb'; +// tslint:disable-next-line import { ObjectID } from 'mongodb'; import Mongo from '../src'; @@ -359,6 +360,32 @@ describe('Mongo', () => { }); }); + describe('verifyEmail', () => { + it('should throw if user is not found', async () => { + try { + await mongo.verifyEmail('589871d1c9393d445745a57c', 'unknowemail'); + throw new Error(); + } catch (err) { + expect(err.message).toEqual('User not found'); + } + }); + + it('should verify email', async () => { + const userId = await mongo.createUser(user); + await delay(10); + let retUser = await mongo.findUserById(userId); + expect(retUser.emails.length).toEqual(1); + expect(retUser.emails[0].address).toBe(user.email); + expect(retUser.emails[0].verified).toBe(false); + await mongo.verifyEmail(userId, user.email); + retUser = await mongo.findUserById(userId); + expect(retUser.emails.length).toEqual(1); + expect(retUser.emails[0].address).toBe(user.email); + expect(retUser.emails[0].verified).toBe(true); + expect(retUser.createdAt).not.toEqual(retUser.updatedAt); + }); + }); + describe('setUsername', () => { it('should throw if user is not found', async () => { try { diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 529aa17e4..e36c896e9 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -42,21 +42,21 @@ "devDependencies": { "@accounts/server": "^0.0.17", "@accounts/tslint-config-accounts": "^0.0.4", - "@types/jest": "^20.0.2", - "@types/mongodb": "^2.2.7", - "@types/node": "^8.0.10", - "coveralls": "^2.13.1", - "jest": "^20.0.4", - "prettier": "^1.5.2", - "ts-jest": "^20.0.7", - "tslint": "^5.5.0", - "typescript": "^2.4.1" + "@types/jest": "^21.1.5", + "@types/mongodb": "^2.2.15", + "@types/node": "^8.0.47", + "coveralls": "^3.0.0", + "jest": "^21.2.1", + "prettier": "^1.7.4", + "ts-jest": "^21.1.4", + "tslint": "^5.8.0", + "typescript": "^2.6.1" }, "peerDependencies": { "@accounts/server": "^0.0.10" }, "dependencies": { "lodash": "^4.17.4", - "mongodb": "^2.2.30" + "mongodb": "^2.2.33" } } diff --git a/packages/accounts-mongo/src/index.ts b/packages/accounts-mongo/src/index.ts index 8503d177f..7d1d2b6a6 100644 --- a/packages/accounts-mongo/src/index.ts +++ b/packages/accounts-mongo/src/index.ts @@ -222,6 +222,25 @@ export default class Mongo { } } + public async verifyEmail(userId: string, email: string): Promise { + const id = this.options.convertUserIdToMongoObjectId + ? toMongoID(userId) + : userId; + const ret = await this.collection.update( + { _id: id, 'emails.address': email }, + { + $set: { + 'emails.$.verified': true, + [this.options.timestamps.updatedAt]: Date.now(), + }, + $pull: { 'services.email.verificationTokens': { address: email } }, + } + ); + if (ret.result.nModified === 0) { + throw new Error('User not found'); + } + } + public async setUsername(userId: string, newUsername: string): Promise { const id = this.options.convertUserIdToMongoObjectId ? toMongoID(userId) diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index db78dcbab..75bad8d38 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -28,62 +28,39 @@ tslint-config-prettier "^1.1.0" tslint-eslint-rules "^4.1.1" -"@types/babel-core@^6.7.14": - version "6.7.14" - resolved "https://registry.yarnpkg.com/@types/babel-core/-/babel-core-6.7.14.tgz#a08c900a98e8987c1a98d2ea4fa0a1805a7d131f" - dependencies: - "@types/babel-template" "*" - "@types/babel-traverse" "*" - "@types/babel-types" "*" - -"@types/babel-template@*": - version "6.7.14" - resolved "https://registry.yarnpkg.com/@types/babel-template/-/babel-template-6.7.14.tgz#8088a56f9d697d620d3d079c3ef66025b7a08d02" - dependencies: - "@types/babel-types" "*" - "@types/babylon" "*" - -"@types/babel-traverse@*": - version "6.7.17" - resolved "https://registry.yarnpkg.com/@types/babel-traverse/-/babel-traverse-6.7.17.tgz#5212a4edced81f53a6c4fb1fd7a34aa4ff6cf36b" - dependencies: - "@types/babel-types" "*" - -"@types/babel-types@*": - version "6.7.16" - resolved "https://registry.yarnpkg.com/@types/babel-types/-/babel-types-6.7.16.tgz#e2602896636858a0067971f7ca4bb8678038293f" - -"@types/babylon@*": - version "6.16.1" - resolved "https://registry.yarnpkg.com/@types/babylon/-/babylon-6.16.1.tgz#e4d10ab9e43a73703a17c6f41438bede28769340" - dependencies: - "@types/babel-types" "*" - "@types/bson@*": version "1.0.3" resolved "https://registry.yarnpkg.com/@types/bson/-/bson-1.0.3.tgz#6c26f0876bf9d8cbb06edd4019e29354bf3a03e0" dependencies: "@types/node" "*" -"@types/jest@^20.0.2": - version "20.0.2" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-20.0.2.tgz#86c751121fb53dbd39bb1a08c45083da13f2dc67" +"@types/jest@^21.1.5": + version "21.1.5" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-21.1.5.tgz#3db93d069d12602ca115d3604550e15131d8eb7a" -"@types/mongodb@^2.2.7": - version "2.2.7" - resolved "https://registry.yarnpkg.com/@types/mongodb/-/mongodb-2.2.7.tgz#35c04cb60ff06d0c6ab71cc6561e41baf094fa70" +"@types/mongodb@^2.2.15": + version "2.2.15" + resolved "https://registry.yarnpkg.com/@types/mongodb/-/mongodb-2.2.15.tgz#42577d8a92b9840dad440acf92fea6435c1fcfb3" dependencies: "@types/bson" "*" "@types/node" "*" -"@types/node@*", "@types/node@^8.0.10": +"@types/node@*": version "8.0.10" resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.10.tgz#12efec9183b072d5f951cf86395a4c780f868a17" +"@types/node@^8.0.47": + version "8.0.47" + resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.47.tgz#968e596f91acd59069054558a00708c445ca30c2" + abab@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.3.tgz#b81de5f7274ec4e756d797cd834f303642724e5d" +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + acorn-globals@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-3.1.0.tgz#fd8270f71fbb4996b004fa880ee5d46573a731bf" @@ -102,6 +79,13 @@ addressparser@~0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/addressparser/-/addressparser-0.2.1.tgz#d11a5b2eeda04cfefebdf3196c10ae13db6cd607" +ajv@^4.9.1: + version "4.11.8" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" + dependencies: + co "^4.6.0" + json-stable-stringify "^1.0.1" + align-text@^0.1.1, align-text@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" @@ -114,18 +98,14 @@ amdefine@>=0.0.4: version "1.0.1" resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" -ansi-escapes@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" +ansi-escapes@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.0.0.tgz#ec3e8b4e9f8064fc02c3ac9b65f1c275bda8ef92" ansi-regex@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.0.0.tgz#c5061b6e0ef8a81775e50f5d66151bf6bf371107" -ansi-regex@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - ansi-regex@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" @@ -134,11 +114,11 @@ ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" -ansi-styles@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.1.0.tgz#09c202d5c917ec23188caa5c9cb9179cd9547750" +ansi-styles@^3.1.0, ansi-styles@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" dependencies: - color-convert "^1.0.0" + color-convert "^1.9.0" anymatch@^1.3.0: version "1.3.0" @@ -153,6 +133,17 @@ append-transform@^0.4.0: dependencies: default-require-extensions "^1.0.0" +aproba@^1.0.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + +are-we-there-yet@~1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz#bb5dca382bb94f05e15194373d16fd3ba1ca110d" + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.6" + argparse@^1.0.7: version "1.0.9" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" @@ -193,6 +184,10 @@ assert-plus@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" +astral-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" + async@^1.4.0: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" @@ -279,13 +274,12 @@ babel-helpers@^6.24.1: babel-runtime "^6.22.0" babel-template "^6.24.1" -babel-jest@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-20.0.3.tgz#e4a03b13dc10389e140fc645d09ffc4ced301671" +babel-jest@^21.2.0: + version "21.2.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-21.2.0.tgz#2ce059519a9374a2c46f2455b6fbef5ad75d863e" dependencies: - babel-core "^6.0.0" babel-plugin-istanbul "^4.0.0" - babel-preset-jest "^20.0.3" + babel-preset-jest "^21.2.0" babel-messages@^6.22.0: version "6.22.0" @@ -307,9 +301,13 @@ babel-plugin-istanbul@^4.0.0, babel-plugin-istanbul@^4.1.4: istanbul-lib-instrument "^1.7.2" test-exclude "^4.1.1" -babel-plugin-jest-hoist@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-20.0.3.tgz#afedc853bd3f8dc3548ea671fbe69d03cc2c1767" +babel-plugin-jest-hoist@^21.2.0: + version "21.2.0" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-21.2.0.tgz#2cef637259bd4b628a6cace039de5fcd14dbb006" + +babel-plugin-syntax-object-rest-spread@^6.13.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" babel-plugin-transform-es2015-modules-commonjs@^6.24.1: version "6.24.1" @@ -335,11 +333,12 @@ babel-polyfill@^6.23.0: core-js "^2.4.0" regenerator-runtime "^0.10.0" -babel-preset-jest@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-20.0.3.tgz#cbacaadecb5d689ca1e1de1360ebfc66862c178a" +babel-preset-jest@^21.2.0: + version "21.2.0" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-21.2.0.tgz#ff9d2bce08abd98e8a36d9a8a5189b9173b85638" dependencies: - babel-plugin-jest-hoist "^20.0.3" + babel-plugin-jest-hoist "^21.2.0" + babel-plugin-syntax-object-rest-spread "^6.13.0" babel-register@^6.24.1: version "6.24.1" @@ -460,6 +459,12 @@ bcryptjs@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/bcryptjs/-/bcryptjs-2.4.0.tgz#fb7f4a0b133854503fe1b2da3f25db834cf0e678" +block-stream@*: + version "0.0.9" + resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" + dependencies: + inherits "~2.0.0" + boom@2.x.x: version "2.10.1" resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" @@ -494,12 +499,6 @@ browser-resolve@^1.11.2: dependencies: resolve "1.1.7" -bser@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/bser/-/bser-1.0.2.tgz#381116970b2a6deea5646dd15dd7278444b56169" - dependencies: - node-int64 "^0.4.0" - bser@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719" @@ -522,7 +521,7 @@ bufferjs@=1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/bufferjs/-/bufferjs-1.1.0.tgz#095ffa39c5e6b40a2178a1169c9effc584a73201" -builtin-modules@^1.0.0: +builtin-modules@^1.0.0, builtin-modules@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" @@ -534,10 +533,6 @@ camelcase@^1.0.2: version "1.2.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" -camelcase@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" - camelcase@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" @@ -546,6 +541,10 @@ caseless@~0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + center-align@^0.1.1: version "0.1.3" resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" @@ -553,7 +552,7 @@ center-align@^0.1.1: align-text "^0.1.3" lazy-cache "^1.0.3" -chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: +chalk@^1.1.0, chalk@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" dependencies: @@ -563,6 +562,14 @@ chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" +chalk@^2.0.1, chalk@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba" + dependencies: + ansi-styles "^3.1.0" + escape-string-regexp "^1.0.5" + supports-color "^4.0.0" + ci-info@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.0.0.tgz#dc5285f2b4e251821683681c381c3388f46ec534" @@ -583,11 +590,15 @@ cliui@^3.2.0: strip-ansi "^3.0.1" wrap-ansi "^2.0.0" +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" -color-convert@^1.0.0: +color-convert@^1.9.0: version "1.9.0" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" dependencies: @@ -597,10 +608,6 @@ color-name@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.2.tgz#5c8ab72b64bd2215d617ae9559ebb148475cf98d" -colors@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" - combined-stream@^1.0.5, combined-stream@~1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" @@ -617,6 +624,10 @@ concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + content-type-parser@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.1.tgz#c3e56988c53c65127fb46d4032a3a900246fdc94" @@ -637,15 +648,15 @@ core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" -coveralls@^2.13.1: - version "2.13.1" - resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-2.13.1.tgz#d70bb9acc1835ec4f063ff9dac5423c17b11f178" +coveralls@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.0.0.tgz#22ef730330538080d29b8c151dc9146afde88a99" dependencies: - js-yaml "3.6.1" - lcov-parse "0.0.10" - log-driver "1.2.5" - minimist "1.2.0" - request "2.79.0" + js-yaml "^3.6.1" + lcov-parse "^0.0.10" + log-driver "^1.2.5" + minimist "^1.2.0" + request "^2.79.0" cross-spawn@^4.0.0: version "4.0.2" @@ -700,6 +711,10 @@ decamelize@^1.0.0, decamelize@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" +deep-extend@~0.4.0: + version "0.4.2" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f" + deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" @@ -714,12 +729,20 @@ delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + detect-indent@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" dependencies: repeating "^2.0.0" +detect-libc@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.2.tgz#71ad5d204bf17a6a6ca8f450c61454066ef461e1" + diff@^3.2.0: version "3.3.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.0.tgz#056695150d7aa93237ca7e378ac3b1682b7963b9" @@ -777,7 +800,7 @@ es6-promise@3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.2.1.tgz#ec56233868032909207170c39448e24449dd1fc4" -escape-string-regexp@^1.0.2: +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -792,7 +815,7 @@ escodegen@^1.6.1: optionalDependencies: source-map "~0.2.0" -esprima@^2.6.0, esprima@^2.7.1: +esprima@^2.7.1: version "2.7.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" @@ -842,6 +865,17 @@ expand-range@^1.8.1: dependencies: fill-range "^2.1.0" +expect@^21.2.1: + version "21.2.1" + resolved "https://registry.yarnpkg.com/expect/-/expect-21.2.1.tgz#003ac2ac7005c3c29e73b38a272d4afadd6d1d7b" + dependencies: + ansi-styles "^3.2.0" + jest-diff "^21.2.1" + jest-get-type "^21.2.0" + jest-matcher-utils "^21.2.1" + jest-message-util "^21.2.1" + jest-regex-util "^21.2.0" + extend@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4" @@ -860,12 +894,6 @@ fast-levenshtein@~2.0.4: version "2.0.5" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.5.tgz#bd33145744519ab1c36c3ee9f31f08e9079b67f2" -fb-watchman@^1.8.0: - version "1.9.2" - resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-1.9.2.tgz#a24cf47827f82d38fb59a69ad70b76e3b6ae7383" - dependencies: - bser "1.0.2" - fb-watchman@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58" @@ -928,18 +956,55 @@ form-data@~2.1.1: combined-stream "^1.0.5" mime-types "^2.1.12" -fs-extra@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291" +fs-extra@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.2.tgz#f91704c53d1b461f893452b0c307d9997647ab6b" dependencies: graceful-fs "^4.1.2" - jsonfile "^3.0.0" + jsonfile "^4.0.0" universalify "^0.1.0" fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" +fsevents@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.2.tgz#3282b713fb3ad80ede0e9fcf4611b5aa6fc033f4" + dependencies: + nan "^2.3.0" + node-pre-gyp "^0.6.36" + +fstream-ignore@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" + dependencies: + fstream "^1.0.0" + inherits "2" + minimatch "^3.0.0" + +fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2: + version "1.0.11" + resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" + dependencies: + graceful-fs "^4.1.2" + inherits "~2.0.0" + mkdirp ">=0.5 0" + rimraf "2" + +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + generate-function@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" @@ -980,7 +1045,7 @@ glob-parent@^2.0.0: dependencies: is-glob "^2.0.0" -glob@^7.0.3, glob@^7.0.5, glob@^7.1.1: +glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" dependencies: @@ -1017,6 +1082,10 @@ handlebars@^4.0.3: optionalDependencies: uglify-js "^2.6" +har-schema@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" + har-validator@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" @@ -1026,6 +1095,13 @@ har-validator@~2.0.6: is-my-json-valid "^2.12.4" pinkie-promise "^2.0.0" +har-validator@~4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" + dependencies: + ajv "^4.9.1" + har-schema "^1.0.5" + has-ansi@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" @@ -1036,7 +1112,15 @@ has-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" -hawk@~3.1.3: +has-flag@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + +hawk@3.1.3, hawk@~3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" dependencies: @@ -1078,6 +1162,10 @@ iconv-lite@0.4.13, iconv-lite@~0.4.13: version "0.4.13" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -1085,10 +1173,14 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@~2.0.1: +inherits@2, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" +ini@~1.3.0: + version "1.3.4" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" + invariant@^2.2.0: version "2.2.2" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" @@ -1287,216 +1379,230 @@ istanbul-reports@^1.1.1: dependencies: handlebars "^4.0.3" -jest-changed-files@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-20.0.3.tgz#9394d5cc65c438406149bef1bf4d52b68e03e3f8" +jest-changed-files@^21.2.0: + version "21.2.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-21.2.0.tgz#5dbeecad42f5d88b482334902ce1cba6d9798d29" + dependencies: + throat "^4.0.0" -jest-cli@^20.0.4: - version "20.0.4" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-20.0.4.tgz#e532b19d88ae5bc6c417e8b0593a6fe954b1dc93" +jest-cli@^21.2.1: + version "21.2.1" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-21.2.1.tgz#9c528b6629d651911138d228bdb033c157ec8c00" dependencies: - ansi-escapes "^1.4.0" - callsites "^2.0.0" - chalk "^1.1.3" + ansi-escapes "^3.0.0" + chalk "^2.0.1" + glob "^7.1.2" graceful-fs "^4.1.11" is-ci "^1.0.10" istanbul-api "^1.1.1" istanbul-lib-coverage "^1.0.1" istanbul-lib-instrument "^1.4.2" istanbul-lib-source-maps "^1.1.0" - jest-changed-files "^20.0.3" - jest-config "^20.0.4" - jest-docblock "^20.0.3" - jest-environment-jsdom "^20.0.3" - jest-haste-map "^20.0.4" - jest-jasmine2 "^20.0.4" - jest-message-util "^20.0.3" - jest-regex-util "^20.0.3" - jest-resolve-dependencies "^20.0.3" - jest-runtime "^20.0.4" - jest-snapshot "^20.0.3" - jest-util "^20.0.3" + jest-changed-files "^21.2.0" + jest-config "^21.2.1" + jest-environment-jsdom "^21.2.1" + jest-haste-map "^21.2.0" + jest-message-util "^21.2.1" + jest-regex-util "^21.2.0" + jest-resolve-dependencies "^21.2.0" + jest-runner "^21.2.1" + jest-runtime "^21.2.1" + jest-snapshot "^21.2.1" + jest-util "^21.2.1" micromatch "^2.3.11" node-notifier "^5.0.2" - pify "^2.3.0" + pify "^3.0.0" slash "^1.0.0" - string-length "^1.0.1" - throat "^3.0.0" + string-length "^2.0.0" + strip-ansi "^4.0.0" which "^1.2.12" worker-farm "^1.3.1" - yargs "^7.0.2" + yargs "^9.0.0" -jest-config@^20.0.0, jest-config@^20.0.4: - version "20.0.4" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-20.0.4.tgz#e37930ab2217c913605eff13e7bd763ec48faeea" +jest-config@^21.2.1: + version "21.2.1" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-21.2.1.tgz#c7586c79ead0bcc1f38c401e55f964f13bf2a480" dependencies: - chalk "^1.1.3" + chalk "^2.0.1" glob "^7.1.1" - jest-environment-jsdom "^20.0.3" - jest-environment-node "^20.0.3" - jest-jasmine2 "^20.0.4" - jest-matcher-utils "^20.0.3" - jest-regex-util "^20.0.3" - jest-resolve "^20.0.4" - jest-validate "^20.0.3" - pretty-format "^20.0.3" - -jest-diff@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-20.0.3.tgz#81f288fd9e675f0fb23c75f1c2b19445fe586617" - dependencies: - chalk "^1.1.3" + jest-environment-jsdom "^21.2.1" + jest-environment-node "^21.2.1" + jest-get-type "^21.2.0" + jest-jasmine2 "^21.2.1" + jest-regex-util "^21.2.0" + jest-resolve "^21.2.0" + jest-util "^21.2.1" + jest-validate "^21.2.1" + pretty-format "^21.2.1" + +jest-diff@^21.2.1: + version "21.2.1" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-21.2.1.tgz#46cccb6cab2d02ce98bc314011764bb95b065b4f" + dependencies: + chalk "^2.0.1" diff "^3.2.0" - jest-matcher-utils "^20.0.3" - pretty-format "^20.0.3" + jest-get-type "^21.2.0" + pretty-format "^21.2.1" -jest-docblock@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-20.0.3.tgz#17bea984342cc33d83c50fbe1545ea0efaa44712" +jest-docblock@^21.2.0: + version "21.2.0" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-21.2.0.tgz#51529c3b30d5fd159da60c27ceedc195faf8d414" -jest-environment-jsdom@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-20.0.3.tgz#048a8ac12ee225f7190417713834bb999787de99" +jest-environment-jsdom@^21.2.1: + version "21.2.1" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-21.2.1.tgz#38d9980c8259b2a608ec232deee6289a60d9d5b4" dependencies: - jest-mock "^20.0.3" - jest-util "^20.0.3" + jest-mock "^21.2.0" + jest-util "^21.2.1" jsdom "^9.12.0" -jest-environment-node@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-20.0.3.tgz#d488bc4612af2c246e986e8ae7671a099163d403" +jest-environment-node@^21.2.1: + version "21.2.1" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-21.2.1.tgz#98c67df5663c7fbe20f6e792ac2272c740d3b8c8" dependencies: - jest-mock "^20.0.3" - jest-util "^20.0.3" + jest-mock "^21.2.0" + jest-util "^21.2.1" + +jest-get-type@^21.2.0: + version "21.2.0" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-21.2.0.tgz#f6376ab9db4b60d81e39f30749c6c466f40d4a23" -jest-haste-map@^20.0.4: - version "20.0.4" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-20.0.4.tgz#653eb55c889ce3c021f7b94693f20a4159badf03" +jest-haste-map@^21.2.0: + version "21.2.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-21.2.0.tgz#1363f0a8bb4338f24f001806571eff7a4b2ff3d8" dependencies: fb-watchman "^2.0.0" graceful-fs "^4.1.11" - jest-docblock "^20.0.3" + jest-docblock "^21.2.0" micromatch "^2.3.11" - sane "~1.6.0" + sane "^2.0.0" worker-farm "^1.3.1" -jest-jasmine2@^20.0.4: - version "20.0.4" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-20.0.4.tgz#fcc5b1411780d911d042902ef1859e852e60d5e1" +jest-jasmine2@^21.2.1: + version "21.2.1" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-21.2.1.tgz#9cc6fc108accfa97efebce10c4308548a4ea7592" dependencies: - chalk "^1.1.3" + chalk "^2.0.1" + expect "^21.2.1" graceful-fs "^4.1.11" - jest-diff "^20.0.3" - jest-matcher-utils "^20.0.3" - jest-matchers "^20.0.3" - jest-message-util "^20.0.3" - jest-snapshot "^20.0.3" - once "^1.4.0" - p-map "^1.1.1" - -jest-matcher-utils@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-20.0.3.tgz#b3a6b8e37ca577803b0832a98b164f44b7815612" - dependencies: - chalk "^1.1.3" - pretty-format "^20.0.3" + jest-diff "^21.2.1" + jest-matcher-utils "^21.2.1" + jest-message-util "^21.2.1" + jest-snapshot "^21.2.1" + p-cancelable "^0.3.0" -jest-matchers@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-matchers/-/jest-matchers-20.0.3.tgz#ca69db1c32db5a6f707fa5e0401abb55700dfd60" +jest-matcher-utils@^21.2.1: + version "21.2.1" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-21.2.1.tgz#72c826eaba41a093ac2b4565f865eb8475de0f64" dependencies: - jest-diff "^20.0.3" - jest-matcher-utils "^20.0.3" - jest-message-util "^20.0.3" - jest-regex-util "^20.0.3" + chalk "^2.0.1" + jest-get-type "^21.2.0" + pretty-format "^21.2.1" -jest-message-util@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-20.0.3.tgz#6aec2844306fcb0e6e74d5796c1006d96fdd831c" +jest-message-util@^21.2.1: + version "21.2.1" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-21.2.1.tgz#bfe5d4692c84c827d1dcf41823795558f0a1acbe" dependencies: - chalk "^1.1.3" + chalk "^2.0.1" micromatch "^2.3.11" slash "^1.0.0" -jest-mock@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-20.0.3.tgz#8bc070e90414aa155c11a8d64c869a0d5c71da59" +jest-mock@^21.2.0: + version "21.2.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-21.2.0.tgz#7eb0770e7317968165f61ea2a7281131534b3c0f" -jest-regex-util@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-20.0.3.tgz#85bbab5d133e44625b19faf8c6aa5122d085d762" +jest-regex-util@^21.2.0: + version "21.2.0" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-21.2.0.tgz#1b1e33e63143babc3e0f2e6c9b5ba1eb34b2d530" -jest-resolve-dependencies@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-20.0.3.tgz#6e14a7b717af0f2cb3667c549de40af017b1723a" +jest-resolve-dependencies@^21.2.0: + version "21.2.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-21.2.0.tgz#9e231e371e1a736a1ad4e4b9a843bc72bfe03d09" dependencies: - jest-regex-util "^20.0.3" + jest-regex-util "^21.2.0" -jest-resolve@^20.0.4: - version "20.0.4" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-20.0.4.tgz#9448b3e8b6bafc15479444c6499045b7ffe597a5" +jest-resolve@^21.2.0: + version "21.2.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-21.2.0.tgz#068913ad2ba6a20218e5fd32471f3874005de3a6" dependencies: browser-resolve "^1.11.2" + chalk "^2.0.1" is-builtin-module "^1.0.0" - resolve "^1.3.2" -jest-runtime@^20.0.4: - version "20.0.4" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-20.0.4.tgz#a2c802219c4203f754df1404e490186169d124d8" +jest-runner@^21.2.1: + version "21.2.1" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-21.2.1.tgz#194732e3e518bfb3d7cbfc0fd5871246c7e1a467" + dependencies: + jest-config "^21.2.1" + jest-docblock "^21.2.0" + jest-haste-map "^21.2.0" + jest-jasmine2 "^21.2.1" + jest-message-util "^21.2.1" + jest-runtime "^21.2.1" + jest-util "^21.2.1" + pify "^3.0.0" + throat "^4.0.0" + worker-farm "^1.3.1" + +jest-runtime@^21.2.1: + version "21.2.1" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-21.2.1.tgz#99dce15309c670442eee2ebe1ff53a3cbdbbb73e" dependencies: babel-core "^6.0.0" - babel-jest "^20.0.3" + babel-jest "^21.2.0" babel-plugin-istanbul "^4.0.0" - chalk "^1.1.3" + chalk "^2.0.1" convert-source-map "^1.4.0" graceful-fs "^4.1.11" - jest-config "^20.0.4" - jest-haste-map "^20.0.4" - jest-regex-util "^20.0.3" - jest-resolve "^20.0.4" - jest-util "^20.0.3" + jest-config "^21.2.1" + jest-haste-map "^21.2.0" + jest-regex-util "^21.2.0" + jest-resolve "^21.2.0" + jest-util "^21.2.1" json-stable-stringify "^1.0.1" micromatch "^2.3.11" + slash "^1.0.0" strip-bom "3.0.0" - yargs "^7.0.2" + write-file-atomic "^2.1.0" + yargs "^9.0.0" -jest-snapshot@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-20.0.3.tgz#5b847e1adb1a4d90852a7f9f125086e187c76566" +jest-snapshot@^21.2.1: + version "21.2.1" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-21.2.1.tgz#29e49f16202416e47343e757e5eff948c07fd7b0" dependencies: - chalk "^1.1.3" - jest-diff "^20.0.3" - jest-matcher-utils "^20.0.3" - jest-util "^20.0.3" + chalk "^2.0.1" + jest-diff "^21.2.1" + jest-matcher-utils "^21.2.1" + mkdirp "^0.5.1" natural-compare "^1.4.0" - pretty-format "^20.0.3" + pretty-format "^21.2.1" -jest-util@^20.0.0, jest-util@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-20.0.3.tgz#0c07f7d80d82f4e5a67c6f8b9c3fe7f65cfd32ad" +jest-util@^21.2.1: + version "21.2.1" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-21.2.1.tgz#a274b2f726b0897494d694a6c3d6a61ab819bb78" dependencies: - chalk "^1.1.3" + callsites "^2.0.0" + chalk "^2.0.1" graceful-fs "^4.1.11" - jest-message-util "^20.0.3" - jest-mock "^20.0.3" - jest-validate "^20.0.3" - leven "^2.1.0" + jest-message-util "^21.2.1" + jest-mock "^21.2.0" + jest-validate "^21.2.1" mkdirp "^0.5.1" -jest-validate@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-20.0.3.tgz#d0cfd1de4f579f298484925c280f8f1d94ec3cab" +jest-validate@^21.2.1: + version "21.2.1" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-21.2.1.tgz#cc0cbca653cd54937ba4f2a111796774530dd3c7" dependencies: - chalk "^1.1.3" - jest-matcher-utils "^20.0.3" + chalk "^2.0.1" + jest-get-type "^21.2.0" leven "^2.1.0" - pretty-format "^20.0.3" + pretty-format "^21.2.1" -jest@^20.0.4: - version "20.0.4" - resolved "https://registry.yarnpkg.com/jest/-/jest-20.0.4.tgz#3dd260c2989d6dad678b1e9cc4d91944f6d602ac" +jest@^21.2.1: + version "21.2.1" + resolved "https://registry.yarnpkg.com/jest/-/jest-21.2.1.tgz#c964e0b47383768a1438e3ccf3c3d470327604e1" dependencies: - jest-cli "^20.0.4" + jest-cli "^21.2.1" jodid25519@^1.0.0: version "1.0.2" @@ -1521,12 +1627,12 @@ js-tokens@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.0.tgz#a2f2a969caae142fb3cd56228358c89366957bd1" -js-yaml@3.6.1: - version "3.6.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.6.1.tgz#6e5fe67d8b205ce4d22fad05b7781e8dadcc4b30" +js-yaml@^3.6.1: + version "3.10.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc" dependencies: argparse "^1.0.7" - esprima "^2.6.0" + esprima "^4.0.0" js-yaml@^3.7.0: version "3.9.0" @@ -1585,9 +1691,9 @@ json5@^0.5.0: version "0.5.1" resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" -jsonfile@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-3.0.1.tgz#a5ecc6f65f53f662c4415c7675a0331d0992ec66" +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" optionalDependencies: graceful-fs "^4.1.6" @@ -1654,7 +1760,7 @@ lcid@^1.0.0: dependencies: invert-kv "^1.0.0" -lcov-parse@0.0.10: +lcov-parse@^0.0.10: version "0.0.10" resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3" @@ -1703,7 +1809,7 @@ lodash@^4.14.0, lodash@^4.16.4, lodash@^4.17.4, lodash@^4.2.0: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" -log-driver@1.2.5: +log-driver@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.5.tgz#7ae4ec257302fd790d557cb10c97100d857b0056" @@ -1779,23 +1885,23 @@ mimic-fn@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" +minimatch@^3.0.0, minimatch@^3.0.3, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + minimatch@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" dependencies: brace-expansion "^1.0.0" -minimatch@^3.0.3, minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - dependencies: - brace-expansion "^1.1.7" - minimist@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" -minimist@1.2.0, minimist@^1.1.1: +minimist@^1.1.1, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" @@ -1803,7 +1909,7 @@ minimist@~0.0.1: version "0.0.10" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" -mkdirp@^0.5.1: +"mkdirp@>=0.5 0", mkdirp@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: @@ -1813,19 +1919,19 @@ moment@2.x.x, "moment@= 2.11.2": version "2.11.2" resolved "https://registry.yarnpkg.com/moment/-/moment-2.11.2.tgz#87968e5f95ac038c2e42ac959c75819cd3f52901" -mongodb-core@2.1.14: - version "2.1.14" - resolved "https://registry.yarnpkg.com/mongodb-core/-/mongodb-core-2.1.14.tgz#13cba2764226b5be3d18992af0c963ce5ea0f0fd" +mongodb-core@2.1.17: + version "2.1.17" + resolved "https://registry.yarnpkg.com/mongodb-core/-/mongodb-core-2.1.17.tgz#a418b337a14a14990fb510b923dee6a813173df8" dependencies: bson "~1.0.4" require_optional "~1.0.0" -mongodb@^2.2.30: - version "2.2.30" - resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-2.2.30.tgz#8ccd801f676c8172040c2f2b47e9602a0d5634ab" +mongodb@^2.2.33: + version "2.2.33" + resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-2.2.33.tgz#b537c471d34a6651b48f36fdbf29750340e08b50" dependencies: es6-promise "3.2.1" - mongodb-core "2.1.14" + mongodb-core "2.1.17" readable-stream "2.2.7" ms@0.7.1, ms@^0.7.1: @@ -1836,6 +1942,10 @@ ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" +nan@^2.3.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.7.0.tgz#d95bf721ec877e08db276ed3fc6eb78f9083ad46" + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -1853,6 +1963,29 @@ node-notifier@^5.0.2: shellwords "^0.1.0" which "^1.2.12" +node-pre-gyp@^0.6.36: + version "0.6.39" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.39.tgz#c00e96860b23c0e1420ac7befc5044e1d78d8649" + dependencies: + detect-libc "^1.0.2" + hawk "3.1.3" + mkdirp "^0.5.1" + nopt "^4.0.1" + npmlog "^4.0.2" + rc "^1.1.7" + request "2.81.0" + rimraf "^2.6.1" + semver "^5.3.0" + tar "^2.2.1" + tar-pack "^3.4.0" + +nopt@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" + dependencies: + abbrev "1" + osenv "^0.1.4" + normalize-package-data@^2.3.2: version "2.3.5" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.5.tgz#8d924f142960e1777e7ffe170543631cc7cb02df" @@ -1872,6 +2005,15 @@ npm-run-path@^2.0.0: dependencies: path-key "^2.0.0" +npmlog@^4.0.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" @@ -1905,7 +2047,7 @@ once@^1.3.0: dependencies: wrappy "1" -once@^1.4.0: +once@^1.3.3, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" dependencies: @@ -1933,12 +2075,6 @@ os-homedir@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" -os-locale@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" - dependencies: - lcid "^1.0.0" - os-locale@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.0.0.tgz#15918ded510522b81ee7ae5a309d54f639fc39a4" @@ -1947,10 +2083,21 @@ os-locale@^2.0.0: lcid "^1.0.0" mem "^1.1.0" -os-tmpdir@^1.0.1: +os-tmpdir@^1.0.0, os-tmpdir@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" +osenv@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.4.tgz#42fe6d5953df06c8064be6f176c3d05aaaa34644" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + +p-cancelable@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa" + p-finally@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" @@ -1965,10 +2112,6 @@ p-locate@^2.0.0: dependencies: p-limit "^1.1.0" -p-map@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.1.1.tgz#05f5e4ae97a068371bc2a5cc86bfbdbc19c4ae7a" - parse-glob@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" @@ -2024,10 +2167,18 @@ path-type@^2.0.0: dependencies: pify "^2.0.0" -pify@^2.0.0, pify@^2.3.0: +performance-now@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" + +pify@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" +pify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + pinkie-promise@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" @@ -2052,16 +2203,16 @@ preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" -prettier@^1.5.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.5.2.tgz#7ea0751da27b93bfb6cecfcec509994f52d83bb3" +prettier@^1.7.4: + version "1.7.4" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.7.4.tgz#5e8624ae9363c80f95ec644584ecdf55d74f93fa" -pretty-format@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-20.0.3.tgz#020e350a560a1fe1a98dc3beb6ccffb386de8b14" +pretty-format@^21.2.1: + version "21.2.1" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-21.2.1.tgz#ae5407f3cf21066cd011aa1ba5fce7b6a2eddb36" dependencies: - ansi-regex "^2.1.1" - ansi-styles "^3.0.0" + ansi-regex "^3.0.0" + ansi-styles "^3.2.0" private@^0.1.6: version "0.1.6" @@ -2087,6 +2238,10 @@ qs@~6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.0.tgz#f403b264f23bc01228c74131b407f18d5ea5d442" +qs@~6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" + randomatic@^1.1.3: version "1.1.6" resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.6.tgz#110dcabff397e9dcff7c0789ccc0a49adf1ec5bb" @@ -2094,6 +2249,15 @@ randomatic@^1.1.3: is-number "^2.0.2" kind-of "^3.0.2" +rc@^1.1.7: + version "1.2.2" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.2.tgz#d8ce9cb57e8d64d9c7badd9876c7c34cbe3c7077" + dependencies: + deep-extend "~0.4.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + read-pkg-up@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" @@ -2136,6 +2300,18 @@ readable-stream@2.2.7: string_decoder "~1.0.0" util-deprecate "~1.0.1" +readable-stream@^2.0.6, readable-stream@^2.1.4: + version "2.3.3" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + safe-buffer "~5.1.1" + string_decoder "~1.0.3" + util-deprecate "~1.0.1" + regenerator-runtime@^0.10.0: version "0.10.1" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.1.tgz#257f41961ce44558b18f7814af48c17559f9faeb" @@ -2161,7 +2337,34 @@ repeating@^2.0.0: dependencies: is-finite "^1.0.0" -request@2.79.0, request@^2.79.0: +request@2.81.0: + version "2.81.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.12.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~4.2.1" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + performance-now "^0.2.0" + qs "~6.4.0" + safe-buffer "^5.0.1" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "^0.6.0" + uuid "^3.0.0" + +request@^2.79.0: version "2.79.0" resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" dependencies: @@ -2221,6 +2424,12 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" +rimraf@2, rimraf@^2.5.1: + version "2.6.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" + dependencies: + glob "^7.0.5" + rimraf@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" @@ -2231,21 +2440,23 @@ safe-buffer@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" -safe-buffer@~5.1.0: +safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" -sane@~1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/sane/-/sane-1.6.0.tgz#9610c452307a135d29c1fdfe2547034180c46775" +sane@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/sane/-/sane-2.2.0.tgz#d6d2e2fcab00e3d283c93b912b7c3a20846f1d56" dependencies: anymatch "^1.3.0" exec-sh "^0.2.0" - fb-watchman "^1.8.0" + fb-watchman "^2.0.0" minimatch "^3.0.2" minimist "^1.1.1" walker "~1.0.5" - watch "~0.10.0" + watch "~0.18.0" + optionalDependencies: + fsevents "^1.1.1" sax@^1.2.1: version "1.2.4" @@ -2255,7 +2466,7 @@ sax@^1.2.1: version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" -set-blocking@^2.0.0: +set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -2263,7 +2474,7 @@ shellwords@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.0.tgz#66afd47b6a12932d9071cbfd98a52e785cd0ba14" -signal-exit@^3.0.0: +signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" @@ -2283,11 +2494,11 @@ source-map-support@^0.4.2: dependencies: source-map "^0.5.3" -source-map-support@^0.4.4: - version "0.4.15" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.15.tgz#03202df65c06d2bd8c7ec2362a193056fef8d3b1" +source-map-support@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.0.tgz#2018a7ad2bdf8faf2691e5fddab26bed5a2bacab" dependencies: - source-map "^0.5.6" + source-map "^0.6.0" source-map@^0.4.4: version "0.4.4" @@ -2295,10 +2506,14 @@ source-map@^0.4.4: dependencies: amdefine ">=0.0.4" -source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1: +source-map@^0.5.0, source-map@^0.5.3, source-map@~0.5.1: version "0.5.6" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" +source-map@^0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + source-map@~0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" @@ -2342,11 +2557,12 @@ starttls@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/starttls/-/starttls-1.0.1.tgz#e6081c25de6b178f5a75f8f271c1487449183b42" -string-length@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/string-length/-/string-length-1.0.1.tgz#56970fb1c38558e9e70b728bf3de269ac45adfac" +string-length@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed" dependencies: - strip-ansi "^3.0.0" + astral-regex "^1.0.0" + strip-ansi "^4.0.0" string-width@^1.0.1, string-width@^1.0.2: version "1.0.2" @@ -2363,7 +2579,7 @@ string-width@^2.0.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" -string_decoder@~1.0.0: +string_decoder@~1.0.0, string_decoder@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" dependencies: @@ -2399,6 +2615,10 @@ strip-eof@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" @@ -2409,10 +2629,37 @@ supports-color@^3.1.2: dependencies: has-flag "^1.0.0" +supports-color@^4.0.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b" + dependencies: + has-flag "^2.0.0" + symbol-tree@^3.2.1: version "3.2.2" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" +tar-pack@^3.4.0: + version "3.4.1" + resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.1.tgz#e1dbc03a9b9d3ba07e896ad027317eb679a10a1f" + dependencies: + debug "^2.2.0" + fstream "^1.0.10" + fstream-ignore "^1.0.5" + once "^1.3.3" + readable-stream "^2.1.4" + rimraf "^2.5.1" + tar "^2.2.1" + uid-number "^0.0.6" + +tar@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" + dependencies: + block-stream "*" + fstream "^1.0.2" + inherits "2" + test-exclude@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.1.1.tgz#4d84964b0966b0087ecc334a2ce002d3d9341e26" @@ -2423,9 +2670,9 @@ test-exclude@^4.1.1: read-pkg-up "^1.0.1" require-main-filename "^1.0.1" -throat@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/throat/-/throat-3.2.0.tgz#50cb0670edbc40237b9e347d7e1f88e4620af836" +throat@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a" tmpl@1.0.x: version "1.0.4" @@ -2455,21 +2702,20 @@ trim-right@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" -ts-jest@^20.0.7: - version "20.0.7" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-20.0.7.tgz#82c99b9163f8c0a864a2b221238202fa1e623c26" +ts-jest@^21.1.4: + version "21.1.4" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-21.1.4.tgz#6b720cd4ebfacbc935468e60dd395392f817095b" dependencies: - "@types/babel-core" "^6.7.14" babel-core "^6.24.1" babel-plugin-istanbul "^4.1.4" babel-plugin-transform-es2015-modules-commonjs "^6.24.1" - babel-preset-jest "^20.0.3" - fs-extra "^3.0.0" - jest-config "^20.0.0" - jest-util "^20.0.0" + babel-preset-jest "^21.2.0" + fs-extra "^4.0.0" + jest-config "^21.2.1" + jest-util "^21.2.1" pkg-dir "^2.0.0" - source-map-support "^0.4.4" - yargs "^8.0.1" + source-map-support "^0.5.0" + yargs "^10.0.3" tslib@^1.0.0, tslib@^1.7.1: version "1.7.1" @@ -2487,12 +2733,13 @@ tslint-eslint-rules@^4.1.1: tslib "^1.0.0" tsutils "^1.4.0" -tslint@^5.5.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.5.0.tgz#10e8dab3e3061fa61e9442e8cee3982acf20a6aa" +tslint@^5.8.0: + version "5.8.0" + resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.8.0.tgz#1f49ad5b2e77c76c3af4ddcae552ae4e3612eb13" dependencies: babel-code-frame "^6.22.0" - colors "^1.1.2" + builtin-modules "^1.1.1" + chalk "^2.1.0" commander "^2.9.0" diff "^3.2.0" glob "^7.1.1" @@ -2500,18 +2747,24 @@ tslint@^5.5.0: resolve "^1.3.2" semver "^5.3.0" tslib "^1.7.1" - tsutils "^2.5.1" + tsutils "^2.12.1" tsutils@^1.4.0: version "1.9.1" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-1.9.1.tgz#b9f9ab44e55af9681831d5f28d0aeeaf5c750cb0" -tsutils@^2.5.1: - version "2.6.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.6.0.tgz#e5e99c79a8accd3977ce18d83fdf1d235a6c2ebb" +tsutils@^2.12.1: + version "2.12.2" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.12.2.tgz#ad58a4865d17ec3ddb6631b6ca53be14a5656ff3" dependencies: tslib "^1.7.1" +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + dependencies: + safe-buffer "^5.0.1" + tunnel-agent@~0.4.1: version "0.4.3" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" @@ -2526,9 +2779,9 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" -typescript@^2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.4.1.tgz#c3ccb16ddaa0b2314de031e7e6fee89e5ba346bc" +typescript@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.6.1.tgz#ef39cdea27abac0b500242d6726ab90e0c846631" uglify-js@^2.6: version "2.8.29" @@ -2543,6 +2796,10 @@ uglify-to-browserify@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" +uid-number@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" + universalify@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.0.tgz#9eb1c4651debcc670cc94f1a75762332bb967778" @@ -2574,9 +2831,12 @@ walker@~1.0.5: dependencies: makeerror "1.0.x" -watch@~0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/watch/-/watch-0.10.0.tgz#77798b2da0f9910d595f1ace5b0c2258521f21dc" +watch@~0.18.0: + version "0.18.0" + resolved "https://registry.yarnpkg.com/watch/-/watch-0.18.0.tgz#28095476c6df7c90c963138990c0a5423eb4b986" + dependencies: + exec-sh "^0.2.0" + minimist "^1.2.0" webidl-conversions@^3.0.0: version "3.0.1" @@ -2599,10 +2859,6 @@ whatwg-url@^4.3.0: tr46 "~0.0.3" webidl-conversions "^3.0.0" -which-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" - which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" @@ -2613,6 +2869,12 @@ which@^1.2.12, which@^1.2.9: dependencies: isexe "^2.0.0" +wide-align@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710" + dependencies: + string-width "^1.0.2" + window-size@0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" @@ -2647,6 +2909,14 @@ wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" +write-file-atomic@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab" + dependencies: + graceful-fs "^4.1.11" + imurmurhash "^0.1.4" + signal-exit "^3.0.2" + xml-name-validator@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635" @@ -2663,39 +2933,38 @@ yallist@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" -yargs-parser@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a" - dependencies: - camelcase "^3.0.0" - yargs-parser@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" dependencies: camelcase "^4.1.0" -yargs@^7.0.2: - version "7.1.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8" +yargs-parser@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-8.0.0.tgz#21d476330e5a82279a4b881345bf066102e219c6" + dependencies: + camelcase "^4.1.0" + +yargs@^10.0.3: + version "10.0.3" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-10.0.3.tgz#6542debd9080ad517ec5048fb454efe9e4d4aaae" dependencies: - camelcase "^3.0.0" cliui "^3.2.0" decamelize "^1.1.1" + find-up "^2.1.0" get-caller-file "^1.0.1" - os-locale "^1.4.0" - read-pkg-up "^1.0.1" + os-locale "^2.0.0" require-directory "^2.1.1" require-main-filename "^1.0.1" set-blocking "^2.0.0" - string-width "^1.0.2" - which-module "^1.0.0" + string-width "^2.0.0" + which-module "^2.0.0" y18n "^3.2.1" - yargs-parser "^5.0.0" + yargs-parser "^8.0.0" -yargs@^8.0.1: - version "8.0.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360" +yargs@^9.0.0: + version "9.0.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-9.0.1.tgz#52acc23feecac34042078ee78c0c007f5085db4c" dependencies: camelcase "^4.1.0" cliui "^3.2.0" From 2f389211b610e6496b5e906276b323e9e4b86ec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pradel=20Le=CC=81o?= Date: Wed, 15 Nov 2017 19:48:52 +0100 Subject: [PATCH 060/128] Add folder to publish --- packages/accounts-mongo/package.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index e36c896e9..19a3c9b72 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -18,6 +18,10 @@ "coverage": "yarn testonly --coverage", "coveralls": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage" }, + "files": [ + "src", + "lib" + ], "jest": { "transform": { ".(ts|tsx)": "/node_modules/ts-jest/preprocessor.js" From 9d947cd3a22de0ab0f4b69b7f24ed4ffba7ef67b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pradel=20Le=CC=81o?= Date: Wed, 15 Nov 2017 19:49:51 +0100 Subject: [PATCH 061/128] FIx README links --- packages/accounts-mongo/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/accounts-mongo/README.md b/packages/accounts-mongo/README.md index 01cb69156..610dc20bc 100644 --- a/packages/accounts-mongo/README.md +++ b/packages/accounts-mongo/README.md @@ -2,7 +2,7 @@ *MongoDB adaptor for accounts* -[![npm](https://img.shields.io/npm/v/@accounts/mongo.svg?maxAge=2592000)](https://www.npmjs.com/package/@accounts/mongo) [![Circle CI](https://circleci.com/gh/js-accounts/mongo.svg?style=shield)](https://circleci.com/gh/js-accounts/mongo) [![Coverage Status](https://coveralls.io/repos/github/js-accounts/mongo/badge.svg?branch=master)](https://coveralls.io/github/js-accounts/mongo?branch=master) ![MIT License](https://img.shields.io/badge/license-MIT-blue.svg) +[![npm](https://img.shields.io/npm/v/@accounts/mongo.svg?maxAge=2592000)](https://www.npmjs.com/package/@accounts/mongo) [![Circle CI](https://circleci.com/gh/accounts-js/mongo.svg?style=shield)](https://circleci.com/gh/accounts-js/mongo) [![Coverage Status](https://coveralls.io/repos/github/accounts-js/mongo/badge.svg?branch=master)](https://coveralls.io/github/accounts-js/mongo?branch=master) ![MIT License](https://img.shields.io/badge/license-MIT-blue.svg) ## Note From 7311af2a9eeab92cf2938296f5bb8ffa430cf36f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pradel=20Le=CC=81o?= Date: Fri, 17 Nov 2017 13:43:58 +0100 Subject: [PATCH 062/128] Add options to README --- packages/accounts-mongo/README.md | 21 +++++++++++++++++++-- packages/accounts-mongo/package.json | 4 ++-- packages/accounts-mongo/src/index.ts | 8 ++++++++ packages/accounts-mongo/yarn.lock | 6 +++--- 4 files changed, 32 insertions(+), 7 deletions(-) diff --git a/packages/accounts-mongo/README.md b/packages/accounts-mongo/README.md index 610dc20bc..d81222f2c 100644 --- a/packages/accounts-mongo/README.md +++ b/packages/accounts-mongo/README.md @@ -1,14 +1,18 @@ # @accounts/mongo -*MongoDB adaptor for accounts* +_MongoDB adaptor for accounts_ -[![npm](https://img.shields.io/npm/v/@accounts/mongo.svg?maxAge=2592000)](https://www.npmjs.com/package/@accounts/mongo) [![Circle CI](https://circleci.com/gh/accounts-js/mongo.svg?style=shield)](https://circleci.com/gh/accounts-js/mongo) [![Coverage Status](https://coveralls.io/repos/github/accounts-js/mongo/badge.svg?branch=master)](https://coveralls.io/github/accounts-js/mongo?branch=master) ![MIT License](https://img.shields.io/badge/license-MIT-blue.svg) +[![npm](https://img.shields.io/npm/v/@accounts/mongo.svg?maxAge=2592000)](https://www.npmjs.com/package/@accounts/mongo) +[![Circle CI](https://circleci.com/gh/accounts-js/mongo.svg?style=shield)](https://circleci.com/gh/accounts-js/mongo) +[![Coverage Status](https://coveralls.io/repos/github/accounts-js/mongo/badge.svg?branch=master)](https://coveralls.io/github/accounts-js/mongo?branch=master) +![MIT License](https://img.shields.io/badge/license-MIT-blue.svg) ## Note This package is under active development. ## Install + ``` yarn add @accounts/mongo ``` @@ -31,3 +35,16 @@ AccountsServer.config({ ``` The users will be saved under the `users` collection. + +## Options + +| Property | Type | Default | Description | +| ------------------------------- | :---------------------: | :-----------------------------------------------------: | ------------------------------------------------------------ | +| collectionName | String | users | The users collection name. | +| sessionCollectionName | String | sessions | The sessions collection name. | +| timestamps | Object | `{ createdAt: 'createdAt', updatedAt: 'updatedAt' }` | The timestamps for the users and sessions collection. | +| convertUserIdToMongoObjectId | Boolean | true | Should the user collection use _id as string or ObjectId. | +| convertSessionIdToMongoObjectId | Boolean | true | Should the session collection use _id as string or ObjectId. | +| caseSensitiveUserName | Boolean | true | Perform case intensitive query for user name. | +| idProvider | `() => string | object` | | Function that generate the id for new objects. | +| dateProvider | `(date?: Date) => any` | `(date?: Date) => (date ? date.getTime() : Date.now())` | Function that generate the date for the timestamps. | diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 19a3c9b72..ecd8637fa 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -12,7 +12,7 @@ "test": "yarn lint && yarn coverage && yarn prettier-diff", "testonly": "jest", "lint": "tslint -c tslint.json '{src,__tests__}/**/*.ts'", - "prettier": "prettier --single-quote --trailing-comma es5 --parser typescript '{src,__tests__}/**/*.ts'", + "prettier": "prettier --single-quote --trailing-comma es5 '{src,__tests__}/**/*.ts' 'README.md'", "prettier-diff": "yarn prettier --list-different", "format": "yarn prettier --write", "coverage": "yarn testonly --coverage", @@ -51,7 +51,7 @@ "@types/node": "^8.0.47", "coveralls": "^3.0.0", "jest": "^21.2.1", - "prettier": "^1.7.4", + "prettier": "^1.8.2", "ts-jest": "^21.1.4", "tslint": "^5.8.0", "typescript": "^2.6.1" diff --git a/packages/accounts-mongo/src/index.ts b/packages/accounts-mongo/src/index.ts index 7d1d2b6a6..76d4c4078 100644 --- a/packages/accounts-mongo/src/index.ts +++ b/packages/accounts-mongo/src/index.ts @@ -3,16 +3,24 @@ import { get } from 'lodash'; import { CreateUserType, UserObjectType, SessionType } from '@accounts/server'; export interface MongoOptionsType { + // The users collection name, default 'users'. collectionName?: string; + // The sessions collection name, default 'sessions'. sessionCollectionName?: string; + // The timestamps for the users and sessions collection, default 'createdAt' and 'updatedAt'. timestamps?: { createdAt: string; updatedAt: string; }; + // Should the user collection use _id as string or ObjectId, default 'true'. convertUserIdToMongoObjectId?: boolean; + // Should the session collection use _id as string or ObjectId, default 'true'. convertSessionIdToMongoObjectId?: boolean; + // Perform case intensitive query for user name, default 'true'. caseSensitiveUserName?: boolean; + // Function that generate the id for new objects. idProvider?: () => string | object; + // Function that generate the date for the timestamps. dateProvider?: (date?: Date) => any; } diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index 75bad8d38..dde61f619 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -2203,9 +2203,9 @@ preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" -prettier@^1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.7.4.tgz#5e8624ae9363c80f95ec644584ecdf55d74f93fa" +prettier@^1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.8.2.tgz#bff83e7fd573933c607875e5ba3abbdffb96aeb8" pretty-format@^21.2.1: version "21.2.1" From 73ce7d696e04db7f25964ec77c35d20c6ae3596f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pradel=20Le=CC=81o?= Date: Fri, 17 Nov 2017 13:45:54 +0100 Subject: [PATCH 063/128] Fix README formatting --- packages/accounts-mongo/README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/accounts-mongo/README.md b/packages/accounts-mongo/README.md index d81222f2c..130fb5a25 100644 --- a/packages/accounts-mongo/README.md +++ b/packages/accounts-mongo/README.md @@ -38,13 +38,13 @@ The users will be saved under the `users` collection. ## Options -| Property | Type | Default | Description | -| ------------------------------- | :---------------------: | :-----------------------------------------------------: | ------------------------------------------------------------ | -| collectionName | String | users | The users collection name. | -| sessionCollectionName | String | sessions | The sessions collection name. | -| timestamps | Object | `{ createdAt: 'createdAt', updatedAt: 'updatedAt' }` | The timestamps for the users and sessions collection. | -| convertUserIdToMongoObjectId | Boolean | true | Should the user collection use _id as string or ObjectId. | -| convertSessionIdToMongoObjectId | Boolean | true | Should the session collection use _id as string or ObjectId. | -| caseSensitiveUserName | Boolean | true | Perform case intensitive query for user name. | -| idProvider | `() => string | object` | | Function that generate the id for new objects. | -| dateProvider | `(date?: Date) => any` | `(date?: Date) => (date ? date.getTime() : Date.now())` | Function that generate the date for the timestamps. | +| Property | Type | Default | Description | +| ------------------------------- | :--------------------: | :-----------------------------------------------------: | ------------------------------------------------------------ | +| collectionName | String | users | The users collection name. | +| sessionCollectionName | String | sessions | The sessions collection name. | +| timestamps | Object | `{ createdAt: 'createdAt', updatedAt: 'updatedAt' }` | The timestamps for the users and sessions collection. | +| convertUserIdToMongoObjectId | Boolean | true | Should the user collection use _id as string or ObjectId. | +| convertSessionIdToMongoObjectId | Boolean | true | Should the session collection use _id as string or ObjectId. | +| caseSensitiveUserName | Boolean | true | Perform case intensitive query for user name. | +| idProvider | Function | | Function that generate the id for new objects. | +| dateProvider | `(date?: Date) => any` | `(date?: Date) => (date ? date.getTime() : Date.now())` | Function that generate the date for the timestamps. | From 2f6ddb16e8c66b2b4e754d7a0d209e842dfcc916 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Pradel?= Date: Mon, 15 Jan 2018 18:17:34 +0100 Subject: [PATCH 064/128] Merge pull request #33 from accounts-js/codecov add codecov and coverage 100% --- packages/accounts-mongo/.circleci/config.yml | 2 +- packages/accounts-mongo/README.md | 2 +- packages/accounts-mongo/__tests__/index.ts | 100 +++++++++++++++++++ packages/accounts-mongo/package.json | 22 ++-- packages/accounts-mongo/src/index.ts | 28 +++--- packages/accounts-mongo/yarn.lock | 86 +++++++++++++++- 6 files changed, 215 insertions(+), 25 deletions(-) diff --git a/packages/accounts-mongo/.circleci/config.yml b/packages/accounts-mongo/.circleci/config.yml index 09b9fdf35..fa2bf469b 100644 --- a/packages/accounts-mongo/.circleci/config.yml +++ b/packages/accounts-mongo/.circleci/config.yml @@ -9,4 +9,4 @@ jobs: - checkout - run: yarn install --frozen-lockfile - run: yarn test - - run: yarn coveralls + - run: yarn codecov diff --git a/packages/accounts-mongo/README.md b/packages/accounts-mongo/README.md index 130fb5a25..58afa19fa 100644 --- a/packages/accounts-mongo/README.md +++ b/packages/accounts-mongo/README.md @@ -4,7 +4,7 @@ _MongoDB adaptor for accounts_ [![npm](https://img.shields.io/npm/v/@accounts/mongo.svg?maxAge=2592000)](https://www.npmjs.com/package/@accounts/mongo) [![Circle CI](https://circleci.com/gh/accounts-js/mongo.svg?style=shield)](https://circleci.com/gh/accounts-js/mongo) -[![Coverage Status](https://coveralls.io/repos/github/accounts-js/mongo/badge.svg?branch=master)](https://coveralls.io/github/accounts-js/mongo?branch=master) +[![codecov](https://codecov.io/gh/accounts-js/mongo/branch/master/graph/badge.svg)](https://codecov.io/gh/accounts-js/mongo) ![MIT License](https://img.shields.io/badge/license-MIT-blue.svg) ## Note diff --git a/packages/accounts-mongo/__tests__/index.ts b/packages/accounts-mongo/__tests__/index.ts index b65ac52f2..cf779dc96 100644 --- a/packages/accounts-mongo/__tests__/index.ts +++ b/packages/accounts-mongo/__tests__/index.ts @@ -171,6 +171,18 @@ describe('Mongo', () => { expect(ret._id).toBeTruthy(); expect(ret.emails[0].address).toEqual('john@doe.com'); }); + + it('call options.idProvider', async () => { + const mongoOptions = new Mongo(db, { + idProvider: () => 'toto', + convertUserIdToMongoObjectId: false, + }); + const userId = await mongoOptions.createUser({ email: 'JohN@doe.com' }); + const ret = await mongoOptions.findUserById(userId); + expect(userId).toBe('toto'); + expect(ret._id).toBeTruthy(); + expect(ret.emails[0].address).toEqual('john@doe.com'); + }); }); describe('findUserById', () => { @@ -283,6 +295,13 @@ describe('Mongo', () => { }); describe('findPasswordHash', () => { + it('should not convert id', async () => { + const mongoOptions = new Mongo(db, { + convertUserIdToMongoObjectId: false, + }); + await mongoOptions.findPasswordHash('toto'); + }); + it('should return null on not found user', async () => { const ret = await mongo.findPasswordHash('589871d1c9393d445745a57c'); expect(ret).toEqual(null); @@ -298,6 +317,13 @@ describe('Mongo', () => { }); describe('addEmail', () => { + it('should not convert id', async () => { + const mongoOptions = new Mongo(db, { + convertUserIdToMongoObjectId: false, + }); + await mongoOptions.addEmail('toto', 'hey', false); + }); + it('should throw if user is not found', async () => { try { await mongo.addEmail('589871d1c9393d445745a57c', 'unknowemail'); @@ -328,6 +354,13 @@ describe('Mongo', () => { }); describe('removeEmail', () => { + it('should not convert id', async () => { + const mongoOptions = new Mongo(db, { + convertUserIdToMongoObjectId: false, + }); + await mongoOptions.removeEmail('toto', 'hey'); + }); + it('should throw if user is not found', async () => { try { await mongo.removeEmail('589871d1c9393d445745a57c', 'unknowemail'); @@ -361,6 +394,17 @@ describe('Mongo', () => { }); describe('verifyEmail', () => { + it('should not convert id', async () => { + const mongoOptions = new Mongo(db, { + convertUserIdToMongoObjectId: false, + }); + try { + await mongoOptions.verifyEmail('toto', 'hey'); + } catch (err) { + expect(err.message).toEqual('User not found'); + } + }); + it('should throw if user is not found', async () => { try { await mongo.verifyEmail('589871d1c9393d445745a57c', 'unknowemail'); @@ -387,6 +431,17 @@ describe('Mongo', () => { }); describe('setUsername', () => { + it('should not convert id', async () => { + const mongoOptions = new Mongo(db, { + convertUserIdToMongoObjectId: false, + }); + try { + await mongoOptions.setUsername('toto', 'hey'); + } catch (err) { + expect(err.message).toEqual('User not found'); + } + }); + it('should throw if user is not found', async () => { try { await mongo.setUsername('589871d1c9393d445745a57c'); @@ -408,6 +463,17 @@ describe('Mongo', () => { }); describe('setPassword', () => { + it('should not convert id', async () => { + const mongoOptions = new Mongo(db, { + convertUserIdToMongoObjectId: false, + }); + try { + await mongoOptions.setPassword('toto', 'hey'); + } catch (err) { + expect(err.message).toEqual('User not found'); + } + }); + it('should throw if user is not found', async () => { try { await mongo.setPassword('589871d1c9393d445745a57c', 'toto'); @@ -430,6 +496,13 @@ describe('Mongo', () => { }); describe('setProfile', () => { + it('should not convert id', async () => { + const mongoOptions = new Mongo(db, { + convertUserIdToMongoObjectId: false, + }); + await mongoOptions.setProfile('toto', { username: 'toto' }); + }); + it('should change profile', async () => { const userId = await mongo.createUser(user); await delay(10); @@ -523,6 +596,13 @@ describe('Mongo', () => { }); describe('updateSession', () => { + it('should not convert id', async () => { + const mongoOptions = new Mongo(db, { + convertSessionIdToMongoObjectId: false, + }); + await mongoOptions.updateSession('toto', 'new ip', 'new user agent'); + }); + it('should update session', async () => { const sessionId = await mongo.createSession( session.userId, @@ -543,6 +623,13 @@ describe('Mongo', () => { }); describe('invalidateSession', () => { + it('should not convert id', async () => { + const mongoOptions = new Mongo(db, { + convertSessionIdToMongoObjectId: false, + }); + await mongoOptions.invalidateSession('toto'); + }); + it('invalidates a session', async () => { const sessionId = await mongo.createSession( session.userId, @@ -611,5 +698,18 @@ describe('Mongo', () => { }); }); + describe('setResetPassword', () => { + it('should change password', async () => { + const newPassword = 'newpass'; + const userId = await mongo.createUser(user); + await delay(10); + await mongo.setResetPassword(userId, 'toto', newPassword); + const retUser = await mongo.findUserById(userId); + expect(retUser.services.password.bcrypt).toBeTruthy(); + expect(retUser.services.password.bcrypt).toEqual(newPassword); + expect(retUser.createdAt).not.toEqual(retUser.updatedAt); + }); + }); + afterAll(closeConnection); }); diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index ecd8637fa..a5e1d3a8f 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -12,25 +12,24 @@ "test": "yarn lint && yarn coverage && yarn prettier-diff", "testonly": "jest", "lint": "tslint -c tslint.json '{src,__tests__}/**/*.ts'", - "prettier": "prettier --single-quote --trailing-comma es5 '{src,__tests__}/**/*.ts' 'README.md'", + "prettier": "prettier '{src,__tests__}/**/*.ts' 'README.md'", "prettier-diff": "yarn prettier --list-different", "format": "yarn prettier --write", "coverage": "yarn testonly --coverage", - "coveralls": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage" + "codecov": "codecov", + "precommit": "pretty-quick --staged" }, - "files": [ - "src", - "lib" - ], + "prettier": { + "singleQuote": true, + "trailingComma": "es5" + }, + "files": ["src", "lib"], "jest": { "transform": { ".(ts|tsx)": "/node_modules/ts-jest/preprocessor.js" }, "testRegex": "./__tests__/.*.ts$", - "moduleFileExtensions": [ - "ts", - "js" - ], + "moduleFileExtensions": ["ts", "js"], "mapCoverage": true }, "repository": { @@ -49,9 +48,12 @@ "@types/jest": "^21.1.5", "@types/mongodb": "^2.2.15", "@types/node": "^8.0.47", + "codecov": "^3.0.0", "coveralls": "^3.0.0", + "husky": "^0.14.3", "jest": "^21.2.1", "prettier": "^1.8.2", + "pretty-quick": "^1.2.0", "ts-jest": "^21.1.4", "tslint": "^5.8.0", "typescript": "^2.6.1" diff --git a/packages/accounts-mongo/src/index.ts b/packages/accounts-mongo/src/index.ts index 76d4c4078..2e1c964d9 100644 --- a/packages/accounts-mongo/src/index.ts +++ b/packages/accounts-mongo/src/index.ts @@ -96,8 +96,8 @@ export default class Mongo { const user: MongoUserObjectType = { services: {}, profile: {}, - [this.options.timestamps.createdAt]: Date.now(), - [this.options.timestamps.updatedAt]: Date.now(), + [this.options.timestamps.createdAt]: this.options.dateProvider(), + [this.options.timestamps.updatedAt]: this.options.dateProvider(), }; if (options.password) { user.services.password = { bcrypt: options.password }; @@ -111,8 +111,8 @@ export default class Mongo { if (options.profile) { user.profile = options.profile; } - if (options.idProvider) { - user._id = options.idProvider(); + if (this.options.idProvider) { + user._id = this.options.idProvider(); } const ret = await this.collection.insertOne(user); return ret.ops[0]._id; @@ -206,7 +206,9 @@ export default class Mongo { verified, }, }, - $set: { [this.options.timestamps.updatedAt]: Date.now() }, + $set: { + [this.options.timestamps.updatedAt]: this.options.dateProvider(), + }, } ); if (ret.result.nModified === 0) { @@ -222,7 +224,9 @@ export default class Mongo { { _id: id }, { $pull: { emails: { address: email.toLowerCase() } }, - $set: { [this.options.timestamps.updatedAt]: Date.now() }, + $set: { + [this.options.timestamps.updatedAt]: this.options.dateProvider(), + }, } ); if (ret.result.nModified === 0) { @@ -239,7 +243,7 @@ export default class Mongo { { $set: { 'emails.$.verified': true, - [this.options.timestamps.updatedAt]: Date.now(), + [this.options.timestamps.updatedAt]: this.options.dateProvider(), }, $pull: { 'services.email.verificationTokens': { address: email } }, } @@ -258,7 +262,7 @@ export default class Mongo { { $set: { username: newUsername, - [this.options.timestamps.updatedAt]: Date.now(), + [this.options.timestamps.updatedAt]: this.options.dateProvider(), }, } ); @@ -276,7 +280,7 @@ export default class Mongo { { $set: { 'services.password.bcrypt': newPassword, - [this.options.timestamps.updatedAt]: Date.now(), + [this.options.timestamps.updatedAt]: this.options.dateProvider(), }, $unset: { 'services.password.reset': '', @@ -297,7 +301,7 @@ export default class Mongo { { $set: { profile, - [this.options.timestamps.updatedAt]: Date.now(), + [this.options.timestamps.updatedAt]: this.options.dateProvider(), }, } ); @@ -397,7 +401,7 @@ export default class Mongo { 'services.email.verificationTokens': { token, address: email.toLowerCase(), - when: Date.now(), + when: this.options.dateProvider(), }, }, } @@ -417,7 +421,7 @@ export default class Mongo { 'services.password.reset': { token, address: email.toLowerCase(), - when: Date.now(), + when: this.options.dateProvider(), reason, }, }, diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index dde61f619..3a707c159 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -150,6 +150,10 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" +argv@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/argv/-/argv-0.0.2.tgz#ecbd16f8949b157183711b1bda334f37840185ab" + arr-diff@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" @@ -562,7 +566,7 @@ chalk@^1.1.0, chalk@^1.1.1: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.1, chalk@^2.1.0: +chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba" dependencies: @@ -598,6 +602,14 @@ code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" +codecov@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/codecov/-/codecov-3.0.0.tgz#c273b8c4f12945723e8dc9d25803d89343e5f28e" + dependencies: + argv "0.0.2" + request "2.81.0" + urlgrey "0.4.4" + color-convert@^1.9.0: version "1.9.0" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" @@ -665,6 +677,14 @@ cross-spawn@^4.0.0: lru-cache "^4.0.1" which "^1.2.9" +cross-spawn@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + cryptiles@2.x.x: version "2.0.5" resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" @@ -853,6 +873,18 @@ execa@^0.5.0: signal-exit "^3.0.0" strip-eof "^1.0.0" +execa@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.8.0.tgz#d8d76bbc1b55217ed190fd6dd49d3c774ecfc8da" + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.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" + expand-brackets@^0.1.4: version "0.1.5" resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" @@ -1026,6 +1058,10 @@ get-stream@^2.2.0: object-assign "^4.0.1" pinkie-promise "^2.0.0" +get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + getpass@^0.1.1: version "0.1.6" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.6.tgz#283ffd9fc1256840875311c1b60e8c40187110e6" @@ -1158,10 +1194,22 @@ http-signature@~1.1.0: jsprim "^1.2.2" sshpk "^1.7.0" +husky@^0.14.3: + version "0.14.3" + resolved "https://registry.yarnpkg.com/husky/-/husky-0.14.3.tgz#c69ed74e2d2779769a17ba8399b54ce0b63c12c3" + dependencies: + is-ci "^1.0.10" + normalize-path "^1.0.0" + strip-indent "^2.0.0" + iconv-lite@0.4.13, iconv-lite@~0.4.13: version "0.4.13" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" +ignore@^3.3.7: + version "3.3.7" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.7.tgz#612289bfb3c220e186a58118618d5be8c1bab021" + imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" @@ -1934,6 +1982,10 @@ mongodb@^2.2.33: mongodb-core "2.1.17" readable-stream "2.2.7" +mri@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mri/-/mri-1.1.0.tgz#5c0a3f29c8ccffbbb1ec941dcec09d71fa32f36a" + ms@0.7.1, ms@^0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" @@ -1995,6 +2047,10 @@ normalize-package-data@^2.3.2: semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" +normalize-path@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-1.0.0.tgz#32d0e472f91ff345701c15a8311018d3b0a90379" + normalize-path@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.0.1.tgz#47886ac1662760d4261b7d979d241709d3ce3f7a" @@ -2214,6 +2270,16 @@ pretty-format@^21.2.1: ansi-regex "^3.0.0" ansi-styles "^3.2.0" +pretty-quick@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pretty-quick/-/pretty-quick-1.2.0.tgz#9ed94bcf110f0df1eba8759ce16dcd15f2764be1" + dependencies: + chalk "^2.3.0" + execa "^0.8.0" + find-up "^2.1.0" + ignore "^3.3.7" + mri "^1.1.0" + private@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/private/-/private-0.1.6.tgz#55c6a976d0f9bafb9924851350fe47b9b5fbb7c1" @@ -2470,6 +2536,16 @@ set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + dependencies: + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + shellwords@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.0.tgz#66afd47b6a12932d9071cbfd98a52e785cd0ba14" @@ -2615,6 +2691,10 @@ strip-eof@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" +strip-indent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" + strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" @@ -2804,6 +2884,10 @@ universalify@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.0.tgz#9eb1c4651debcc670cc94f1a75762332bb967778" +urlgrey@0.4.4: + version "0.4.4" + resolved "https://registry.yarnpkg.com/urlgrey/-/urlgrey-0.4.4.tgz#892fe95960805e85519f1cd4389f2cb4cbb7652f" + util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" From f2c4d02f5b657b2684e60016b5890b4961be461b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Pradel?= Date: Mon, 15 Jan 2018 21:33:52 +0100 Subject: [PATCH 065/128] Merge pull request #34 from accounts-js/separate-file Renamed mongo class file --- packages/accounts-mongo/src/index.ts | 440 +-------------------------- packages/accounts-mongo/src/mongo.ts | 439 ++++++++++++++++++++++++++ 2 files changed, 440 insertions(+), 439 deletions(-) create mode 100644 packages/accounts-mongo/src/mongo.ts diff --git a/packages/accounts-mongo/src/index.ts b/packages/accounts-mongo/src/index.ts index 2e1c964d9..b9fe67879 100644 --- a/packages/accounts-mongo/src/index.ts +++ b/packages/accounts-mongo/src/index.ts @@ -1,439 +1 @@ -import { ObjectID } from 'mongodb'; -import { get } from 'lodash'; -import { CreateUserType, UserObjectType, SessionType } from '@accounts/server'; - -export interface MongoOptionsType { - // The users collection name, default 'users'. - collectionName?: string; - // The sessions collection name, default 'sessions'. - sessionCollectionName?: string; - // The timestamps for the users and sessions collection, default 'createdAt' and 'updatedAt'. - timestamps?: { - createdAt: string; - updatedAt: string; - }; - // Should the user collection use _id as string or ObjectId, default 'true'. - convertUserIdToMongoObjectId?: boolean; - // Should the session collection use _id as string or ObjectId, default 'true'. - convertSessionIdToMongoObjectId?: boolean; - // Perform case intensitive query for user name, default 'true'. - caseSensitiveUserName?: boolean; - // Function that generate the id for new objects. - idProvider?: () => string | object; - // Function that generate the date for the timestamps. - dateProvider?: (date?: Date) => any; -} - -export interface MongoUserObjectType { - _id?: string | object; - username?: string; - profile?: object; - services: { - password?: { - bcrypt: string; - }; - }; - emails?: [ - { - address: string; - verified: boolean; - } - ]; -} - -const toMongoID = objectId => { - if (typeof objectId === 'string') { - return new ObjectID(objectId); - } - return objectId; -}; - -const defaultOptions = { - collectionName: 'users', - sessionCollectionName: 'sessions', - timestamps: { - createdAt: 'createdAt', - updatedAt: 'updatedAt', - }, - convertUserIdToMongoObjectId: true, - convertSessionIdToMongoObjectId: true, - caseSensitiveUserName: true, - idProvider: null, - dateProvider: (date?: Date) => (date ? date.getTime() : Date.now()), -}; - -export default class Mongo { - // Options of Mongo class - private options: MongoOptionsType; - // Db object - private db: any; - // Account collection - private collection: any; - // Session collection - private sessionCollection: any; - - constructor(db: any, options?: MongoOptionsType) { - this.options = { ...defaultOptions, ...options }; - if (!db) { - throw new Error('A database connection is required'); - } - this.db = db; - this.collection = this.db.collection(this.options.collectionName); - this.sessionCollection = this.db.collection( - this.options.sessionCollectionName - ); - } - - public async setupIndexes(): Promise { - await this.collection.createIndex('username', { unique: 1, sparse: 1 }); - await this.collection.createIndex('emails.address', { - unique: 1, - sparse: 1, - }); - } - - public async createUser(options: CreateUserType): Promise { - const user: MongoUserObjectType = { - services: {}, - profile: {}, - [this.options.timestamps.createdAt]: this.options.dateProvider(), - [this.options.timestamps.updatedAt]: this.options.dateProvider(), - }; - if (options.password) { - user.services.password = { bcrypt: options.password }; - } - if (options.username) { - user.username = options.username; - } - if (options.email) { - user.emails = [{ address: options.email.toLowerCase(), verified: false }]; - } - if (options.profile) { - user.profile = options.profile; - } - if (this.options.idProvider) { - user._id = this.options.idProvider(); - } - const ret = await this.collection.insertOne(user); - return ret.ops[0]._id; - } - - public async findUserById(userId: string): Promise { - const id = this.options.convertUserIdToMongoObjectId - ? toMongoID(userId) - : userId; - const user = await this.collection.findOne({ _id: id }); - if (user) { - user.id = user._id; - } - return user; - } - - public async findUserByEmail(email: string): Promise { - const user = await this.collection.findOne({ - 'emails.address': email.toLowerCase(), - }); - if (user) { - user.id = user._id; - } - return user; - } - - public async findUserByUsername( - username: string - ): Promise { - const filter = this.options.caseSensitiveUserName - ? { username } - : { - $where: `obj.username && (obj.username.toLowerCase() === "${username.toLowerCase()}")`, - }; - const user = await this.collection.findOne(filter); - if (user) { - user.id = user._id; - } - return user; - } - - public async findPasswordHash(userId: string): Promise { - const id = this.options.convertUserIdToMongoObjectId - ? toMongoID(userId) - : userId; - const user = await this.findUserById(id); - if (user) { - return get(user, 'services.password.bcrypt'); - } - return null; - } - - public async findUserByEmailVerificationToken( - token: string - ): Promise { - const user = await this.collection.findOne({ - 'services.email.verificationTokens.token': token, - }); - if (user) { - user.id = user._id; - } - return user; - } - - public async findUserByResetPasswordToken( - token: string - ): Promise { - const user = await this.collection.findOne({ - 'services.password.reset.token': token, - }); - if (user) { - user.id = user._id; - } - return user; - } - - public async addEmail( - userId: string, - newEmail: string, - verified: boolean - ): Promise { - const id = this.options.convertUserIdToMongoObjectId - ? toMongoID(userId) - : userId; - const ret = await this.collection.update( - { _id: id }, - { - $addToSet: { - emails: { - address: newEmail.toLowerCase(), - verified, - }, - }, - $set: { - [this.options.timestamps.updatedAt]: this.options.dateProvider(), - }, - } - ); - if (ret.result.nModified === 0) { - throw new Error('User not found'); - } - } - - public async removeEmail(userId: string, email: string): Promise { - const id = this.options.convertUserIdToMongoObjectId - ? toMongoID(userId) - : userId; - const ret = await this.collection.update( - { _id: id }, - { - $pull: { emails: { address: email.toLowerCase() } }, - $set: { - [this.options.timestamps.updatedAt]: this.options.dateProvider(), - }, - } - ); - if (ret.result.nModified === 0) { - throw new Error('User not found'); - } - } - - public async verifyEmail(userId: string, email: string): Promise { - const id = this.options.convertUserIdToMongoObjectId - ? toMongoID(userId) - : userId; - const ret = await this.collection.update( - { _id: id, 'emails.address': email }, - { - $set: { - 'emails.$.verified': true, - [this.options.timestamps.updatedAt]: this.options.dateProvider(), - }, - $pull: { 'services.email.verificationTokens': { address: email } }, - } - ); - if (ret.result.nModified === 0) { - throw new Error('User not found'); - } - } - - public async setUsername(userId: string, newUsername: string): Promise { - const id = this.options.convertUserIdToMongoObjectId - ? toMongoID(userId) - : userId; - const ret = await this.collection.update( - { _id: id }, - { - $set: { - username: newUsername, - [this.options.timestamps.updatedAt]: this.options.dateProvider(), - }, - } - ); - if (ret.result.nModified === 0) { - throw new Error('User not found'); - } - } - - public async setPassword(userId: string, newPassword: string): Promise { - const id = this.options.convertUserIdToMongoObjectId - ? toMongoID(userId) - : userId; - const ret = await this.collection.update( - { _id: id }, - { - $set: { - 'services.password.bcrypt': newPassword, - [this.options.timestamps.updatedAt]: this.options.dateProvider(), - }, - $unset: { - 'services.password.reset': '', - }, - } - ); - if (ret.result.nModified === 0) { - throw new Error('User not found'); - } - } - - public async setProfile(userId: string, profile: object): Promise { - const id = this.options.convertUserIdToMongoObjectId - ? toMongoID(userId) - : userId; - await this.collection.update( - { _id: id }, - { - $set: { - profile, - [this.options.timestamps.updatedAt]: this.options.dateProvider(), - }, - } - ); - return profile; - } - - public async createSession( - userId: string, - ip?: string, - userAgent?: string, - extraData?: object - ): Promise { - const session = { - userId, - userAgent, - ip, - extraData, - valid: true, - [this.options.timestamps.createdAt]: this.options.dateProvider(), - [this.options.timestamps.updatedAt]: this.options.dateProvider(), - }; - - if (this.options.idProvider) { - session._id = this.options.idProvider(); - } - - const ret = await this.sessionCollection.insertOne(session); - return ret.ops[0]._id; - } - - public async updateSession( - sessionId: string, - ip: string, - userAgent: string - ): Promise { - // tslint:disable-next-line variable-name - const _id = this.options.convertSessionIdToMongoObjectId - ? toMongoID(sessionId) - : sessionId; - await this.sessionCollection.update( - { _id }, - { - $set: { - ip, - userAgent, - [this.options.timestamps.updatedAt]: this.options.dateProvider(), - }, - } - ); - } - - public async invalidateSession(sessionId: string): Promise { - // tslint:disable-next-line variable-name - const _id = this.options.convertSessionIdToMongoObjectId - ? toMongoID(sessionId) - : sessionId; - await this.sessionCollection.update( - { _id }, - { - $set: { - valid: false, - [this.options.timestamps.updatedAt]: this.options.dateProvider(), - }, - } - ); - } - - public async invalidateAllSessions(userId: string): Promise { - await this.sessionCollection.updateMany( - { userId }, - { - $set: { - valid: false, - [this.options.timestamps.updatedAt]: this.options.dateProvider(), - }, - } - ); - } - - public findSessionById(sessionId: string): Promise { - // tslint:disable-next-line variable-name - const _id = this.options.convertSessionIdToMongoObjectId - ? toMongoID(sessionId) - : sessionId; - return this.sessionCollection.findOne({ _id }); - } - - public async addEmailVerificationToken( - userId: string, - email: string, - token: string - ): Promise { - await this.collection.update( - { _id: userId }, - { - $push: { - 'services.email.verificationTokens': { - token, - address: email.toLowerCase(), - when: this.options.dateProvider(), - }, - }, - } - ); - } - - public async addResetPasswordToken( - userId: string, - email: string, - token: string, - reason: string = 'reset' - ): Promise { - await this.collection.update( - { _id: userId }, - { - $push: { - 'services.password.reset': { - token, - address: email.toLowerCase(), - when: this.options.dateProvider(), - reason, - }, - }, - } - ); - } - - public async setResetPassword( - userId: string, - email: string, - newPassword: string - ): Promise { - await this.setPassword(userId, newPassword); - } -} +export * from './mongo'; diff --git a/packages/accounts-mongo/src/mongo.ts b/packages/accounts-mongo/src/mongo.ts new file mode 100644 index 000000000..2e1c964d9 --- /dev/null +++ b/packages/accounts-mongo/src/mongo.ts @@ -0,0 +1,439 @@ +import { ObjectID } from 'mongodb'; +import { get } from 'lodash'; +import { CreateUserType, UserObjectType, SessionType } from '@accounts/server'; + +export interface MongoOptionsType { + // The users collection name, default 'users'. + collectionName?: string; + // The sessions collection name, default 'sessions'. + sessionCollectionName?: string; + // The timestamps for the users and sessions collection, default 'createdAt' and 'updatedAt'. + timestamps?: { + createdAt: string; + updatedAt: string; + }; + // Should the user collection use _id as string or ObjectId, default 'true'. + convertUserIdToMongoObjectId?: boolean; + // Should the session collection use _id as string or ObjectId, default 'true'. + convertSessionIdToMongoObjectId?: boolean; + // Perform case intensitive query for user name, default 'true'. + caseSensitiveUserName?: boolean; + // Function that generate the id for new objects. + idProvider?: () => string | object; + // Function that generate the date for the timestamps. + dateProvider?: (date?: Date) => any; +} + +export interface MongoUserObjectType { + _id?: string | object; + username?: string; + profile?: object; + services: { + password?: { + bcrypt: string; + }; + }; + emails?: [ + { + address: string; + verified: boolean; + } + ]; +} + +const toMongoID = objectId => { + if (typeof objectId === 'string') { + return new ObjectID(objectId); + } + return objectId; +}; + +const defaultOptions = { + collectionName: 'users', + sessionCollectionName: 'sessions', + timestamps: { + createdAt: 'createdAt', + updatedAt: 'updatedAt', + }, + convertUserIdToMongoObjectId: true, + convertSessionIdToMongoObjectId: true, + caseSensitiveUserName: true, + idProvider: null, + dateProvider: (date?: Date) => (date ? date.getTime() : Date.now()), +}; + +export default class Mongo { + // Options of Mongo class + private options: MongoOptionsType; + // Db object + private db: any; + // Account collection + private collection: any; + // Session collection + private sessionCollection: any; + + constructor(db: any, options?: MongoOptionsType) { + this.options = { ...defaultOptions, ...options }; + if (!db) { + throw new Error('A database connection is required'); + } + this.db = db; + this.collection = this.db.collection(this.options.collectionName); + this.sessionCollection = this.db.collection( + this.options.sessionCollectionName + ); + } + + public async setupIndexes(): Promise { + await this.collection.createIndex('username', { unique: 1, sparse: 1 }); + await this.collection.createIndex('emails.address', { + unique: 1, + sparse: 1, + }); + } + + public async createUser(options: CreateUserType): Promise { + const user: MongoUserObjectType = { + services: {}, + profile: {}, + [this.options.timestamps.createdAt]: this.options.dateProvider(), + [this.options.timestamps.updatedAt]: this.options.dateProvider(), + }; + if (options.password) { + user.services.password = { bcrypt: options.password }; + } + if (options.username) { + user.username = options.username; + } + if (options.email) { + user.emails = [{ address: options.email.toLowerCase(), verified: false }]; + } + if (options.profile) { + user.profile = options.profile; + } + if (this.options.idProvider) { + user._id = this.options.idProvider(); + } + const ret = await this.collection.insertOne(user); + return ret.ops[0]._id; + } + + public async findUserById(userId: string): Promise { + const id = this.options.convertUserIdToMongoObjectId + ? toMongoID(userId) + : userId; + const user = await this.collection.findOne({ _id: id }); + if (user) { + user.id = user._id; + } + return user; + } + + public async findUserByEmail(email: string): Promise { + const user = await this.collection.findOne({ + 'emails.address': email.toLowerCase(), + }); + if (user) { + user.id = user._id; + } + return user; + } + + public async findUserByUsername( + username: string + ): Promise { + const filter = this.options.caseSensitiveUserName + ? { username } + : { + $where: `obj.username && (obj.username.toLowerCase() === "${username.toLowerCase()}")`, + }; + const user = await this.collection.findOne(filter); + if (user) { + user.id = user._id; + } + return user; + } + + public async findPasswordHash(userId: string): Promise { + const id = this.options.convertUserIdToMongoObjectId + ? toMongoID(userId) + : userId; + const user = await this.findUserById(id); + if (user) { + return get(user, 'services.password.bcrypt'); + } + return null; + } + + public async findUserByEmailVerificationToken( + token: string + ): Promise { + const user = await this.collection.findOne({ + 'services.email.verificationTokens.token': token, + }); + if (user) { + user.id = user._id; + } + return user; + } + + public async findUserByResetPasswordToken( + token: string + ): Promise { + const user = await this.collection.findOne({ + 'services.password.reset.token': token, + }); + if (user) { + user.id = user._id; + } + return user; + } + + public async addEmail( + userId: string, + newEmail: string, + verified: boolean + ): Promise { + const id = this.options.convertUserIdToMongoObjectId + ? toMongoID(userId) + : userId; + const ret = await this.collection.update( + { _id: id }, + { + $addToSet: { + emails: { + address: newEmail.toLowerCase(), + verified, + }, + }, + $set: { + [this.options.timestamps.updatedAt]: this.options.dateProvider(), + }, + } + ); + if (ret.result.nModified === 0) { + throw new Error('User not found'); + } + } + + public async removeEmail(userId: string, email: string): Promise { + const id = this.options.convertUserIdToMongoObjectId + ? toMongoID(userId) + : userId; + const ret = await this.collection.update( + { _id: id }, + { + $pull: { emails: { address: email.toLowerCase() } }, + $set: { + [this.options.timestamps.updatedAt]: this.options.dateProvider(), + }, + } + ); + if (ret.result.nModified === 0) { + throw new Error('User not found'); + } + } + + public async verifyEmail(userId: string, email: string): Promise { + const id = this.options.convertUserIdToMongoObjectId + ? toMongoID(userId) + : userId; + const ret = await this.collection.update( + { _id: id, 'emails.address': email }, + { + $set: { + 'emails.$.verified': true, + [this.options.timestamps.updatedAt]: this.options.dateProvider(), + }, + $pull: { 'services.email.verificationTokens': { address: email } }, + } + ); + if (ret.result.nModified === 0) { + throw new Error('User not found'); + } + } + + public async setUsername(userId: string, newUsername: string): Promise { + const id = this.options.convertUserIdToMongoObjectId + ? toMongoID(userId) + : userId; + const ret = await this.collection.update( + { _id: id }, + { + $set: { + username: newUsername, + [this.options.timestamps.updatedAt]: this.options.dateProvider(), + }, + } + ); + if (ret.result.nModified === 0) { + throw new Error('User not found'); + } + } + + public async setPassword(userId: string, newPassword: string): Promise { + const id = this.options.convertUserIdToMongoObjectId + ? toMongoID(userId) + : userId; + const ret = await this.collection.update( + { _id: id }, + { + $set: { + 'services.password.bcrypt': newPassword, + [this.options.timestamps.updatedAt]: this.options.dateProvider(), + }, + $unset: { + 'services.password.reset': '', + }, + } + ); + if (ret.result.nModified === 0) { + throw new Error('User not found'); + } + } + + public async setProfile(userId: string, profile: object): Promise { + const id = this.options.convertUserIdToMongoObjectId + ? toMongoID(userId) + : userId; + await this.collection.update( + { _id: id }, + { + $set: { + profile, + [this.options.timestamps.updatedAt]: this.options.dateProvider(), + }, + } + ); + return profile; + } + + public async createSession( + userId: string, + ip?: string, + userAgent?: string, + extraData?: object + ): Promise { + const session = { + userId, + userAgent, + ip, + extraData, + valid: true, + [this.options.timestamps.createdAt]: this.options.dateProvider(), + [this.options.timestamps.updatedAt]: this.options.dateProvider(), + }; + + if (this.options.idProvider) { + session._id = this.options.idProvider(); + } + + const ret = await this.sessionCollection.insertOne(session); + return ret.ops[0]._id; + } + + public async updateSession( + sessionId: string, + ip: string, + userAgent: string + ): Promise { + // tslint:disable-next-line variable-name + const _id = this.options.convertSessionIdToMongoObjectId + ? toMongoID(sessionId) + : sessionId; + await this.sessionCollection.update( + { _id }, + { + $set: { + ip, + userAgent, + [this.options.timestamps.updatedAt]: this.options.dateProvider(), + }, + } + ); + } + + public async invalidateSession(sessionId: string): Promise { + // tslint:disable-next-line variable-name + const _id = this.options.convertSessionIdToMongoObjectId + ? toMongoID(sessionId) + : sessionId; + await this.sessionCollection.update( + { _id }, + { + $set: { + valid: false, + [this.options.timestamps.updatedAt]: this.options.dateProvider(), + }, + } + ); + } + + public async invalidateAllSessions(userId: string): Promise { + await this.sessionCollection.updateMany( + { userId }, + { + $set: { + valid: false, + [this.options.timestamps.updatedAt]: this.options.dateProvider(), + }, + } + ); + } + + public findSessionById(sessionId: string): Promise { + // tslint:disable-next-line variable-name + const _id = this.options.convertSessionIdToMongoObjectId + ? toMongoID(sessionId) + : sessionId; + return this.sessionCollection.findOne({ _id }); + } + + public async addEmailVerificationToken( + userId: string, + email: string, + token: string + ): Promise { + await this.collection.update( + { _id: userId }, + { + $push: { + 'services.email.verificationTokens': { + token, + address: email.toLowerCase(), + when: this.options.dateProvider(), + }, + }, + } + ); + } + + public async addResetPasswordToken( + userId: string, + email: string, + token: string, + reason: string = 'reset' + ): Promise { + await this.collection.update( + { _id: userId }, + { + $push: { + 'services.password.reset': { + token, + address: email.toLowerCase(), + when: this.options.dateProvider(), + reason, + }, + }, + } + ); + } + + public async setResetPassword( + userId: string, + email: string, + newPassword: string + ): Promise { + await this.setPassword(userId, newPassword); + } +} From f3e0c779c5f1660fb4d2fbedba278235e0955d2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Pradel?= Date: Wed, 28 Feb 2018 09:30:14 +0100 Subject: [PATCH 066/128] Merge pull request #31 from accounts-js/services-oauth Add oauth services functions --- packages/accounts-mongo/__tests__/index.ts | 43 +++++++++++++-- packages/accounts-mongo/package.json | 13 ++--- packages/accounts-mongo/src/mongo.ts | 37 ++++++++++++- packages/accounts-mongo/tsconfig.json | 11 +--- packages/accounts-mongo/yarn.lock | 63 +++++----------------- 5 files changed, 95 insertions(+), 72 deletions(-) diff --git a/packages/accounts-mongo/__tests__/index.ts b/packages/accounts-mongo/__tests__/index.ts index cf779dc96..225df0c46 100644 --- a/packages/accounts-mongo/__tests__/index.ts +++ b/packages/accounts-mongo/__tests__/index.ts @@ -232,7 +232,6 @@ describe('Mongo', () => { const ret = await mongoWithOptions.findUserByUsername( user.username.toUpperCase() ); - await delay(10); expect(ret).toBeTruthy(); expect(ret._id).toBeTruthy(); expect(ret.id).toBeTruthy(); @@ -241,20 +240,17 @@ describe('Mongo', () => { it('should return null for incomplete matching user when using insensitive', async () => { const mongoWithOptions = new Mongo(db, { caseSensitiveUserName: false }); const ret = await mongoWithOptions.findUserByUsername('john'); - await delay(10); expect(ret).not.toBeTruthy(); }); it('should return null when using regex wildcards when using insensitive', async () => { const mongoWithOptions = new Mongo(db, { caseSensitiveUserName: false }); const ret = await mongoWithOptions.findUserByUsername('*'); - await delay(10); expect(ret).not.toBeTruthy(); }); it('should return user', async () => { const ret = await mongo.findUserByUsername(user.username); - await delay(10); expect(ret).toBeTruthy(); expect(ret._id).toBeTruthy(); expect(ret.id).toBeTruthy(); @@ -287,7 +283,24 @@ describe('Mongo', () => { const userId = await mongo.createUser(user); await mongo.addResetPasswordToken(userId, 'john@doe.com', 'token'); const ret = await mongo.findUserByResetPasswordToken('token'); - await delay(10); + expect(ret).toBeTruthy(); + expect(ret._id).toBeTruthy(); + expect(ret.id).toBeTruthy(); + }); + }); + + describe('findUserByServiceId', () => { + it('should return null for not found user', async () => { + const ret = await mongo.findUserByServiceId('facebook', 'invalid'); + expect(ret).not.toBeTruthy(); + }); + + it('should return user', async () => { + const userId = await mongo.createUser(user); + let ret = await mongo.findUserByServiceId('facebook', '1'); + expect(ret).not.toBeTruthy(); + await mongo.setService(userId, 'facebook', { id: '1' }); + ret = await mongo.findUserByServiceId('facebook', '1'); expect(ret).toBeTruthy(); expect(ret._id).toBeTruthy(); expect(ret.id).toBeTruthy(); @@ -511,6 +524,26 @@ describe('Mongo', () => { }); }); + describe('setService', () => { + it('should not convert id', async () => { + const mongoOptions = new Mongo(db, { + convertUserIdToMongoObjectId: false, + }); + await mongoOptions.setService('toto', 'twitter', { id: '1' }); + }); + + it('should set service', async () => { + const userId = await mongo.createUser(user); + let ret = await mongo.findUserByServiceId('google', '1'); + expect(ret).not.toBeTruthy(); + await mongo.setService(userId, 'google', { id: '1' }); + ret = await mongo.findUserByServiceId('google', '1'); + expect(ret).toBeTruthy(); + expect(ret._id).toBeTruthy(); + expect(ret.id).toBeTruthy(); + }); + }); + describe('createSession', () => { it('should create session', async () => { const sessionId = await mongo.createSession( diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index a5e1d3a8f..72bf8c38e 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -3,12 +3,10 @@ "version": "0.1.0", "description": "MongoDB adaptor for accounts", "main": "lib/index.js", - "jsnext:main": "lib-es6/index.js", + "typings": "lib/index.d.ts", "scripts": { "start": "tsc --watch", - "compile": "npm run compile:es6 && npm run compile:umd", - "compile:es6": "tsc", - "compile:umd": "tsc", + "compile": "tsc", "test": "yarn lint && yarn coverage && yarn prettier-diff", "testonly": "jest", "lint": "tslint -c tslint.json '{src,__tests__}/**/*.ts'", @@ -43,9 +41,11 @@ }, "homepage": "https://github.com/js-accounts/mongo", "devDependencies": { - "@accounts/server": "^0.0.17", + "@accounts/common": "^0.1.0-alpha.04203cca", + "@accounts/server": "^0.1.0-alpha.04203cca", "@accounts/tslint-config-accounts": "^0.0.4", "@types/jest": "^21.1.5", + "@types/lodash": "^4.14.104", "@types/mongodb": "^2.2.15", "@types/node": "^8.0.47", "codecov": "^3.0.0", @@ -59,7 +59,8 @@ "typescript": "^2.6.1" }, "peerDependencies": { - "@accounts/server": "^0.0.10" + "@accounts/common": "^0.1.0", + "@accounts/server": "^0.1.0" }, "dependencies": { "lodash": "^4.17.4", diff --git a/packages/accounts-mongo/src/mongo.ts b/packages/accounts-mongo/src/mongo.ts index 2e1c964d9..cef276709 100644 --- a/packages/accounts-mongo/src/mongo.ts +++ b/packages/accounts-mongo/src/mongo.ts @@ -1,6 +1,7 @@ import { ObjectID } from 'mongodb'; import { get } from 'lodash'; -import { CreateUserType, UserObjectType, SessionType } from '@accounts/server'; +import { CreateUserType, UserObjectType, SessionType } from '@accounts/common'; +import { DBInterface } from '@accounts/server'; export interface MongoOptionsType { // The users collection name, default 'users'. @@ -62,7 +63,7 @@ const defaultOptions = { dateProvider: (date?: Date) => (date ? date.getTime() : Date.now()), }; -export default class Mongo { +export default class Mongo implements DBInterface { // Options of Mongo class private options: MongoOptionsType; // Db object @@ -189,6 +190,19 @@ export default class Mongo { return user; } + public async findUserByServiceId( + serviceName: string, + serviceId: string + ): Promise { + const user = await this.collection.findOne({ + [`services.${serviceName}.id`]: serviceId, + }); + if (user) { + user.id = user._id; + } + return user; + } + public async addEmail( userId: string, newEmail: string, @@ -308,6 +322,25 @@ export default class Mongo { return profile; } + public async setService( + userId: string, + serviceName: string, + service: object + ): Promise { + const id = this.options.convertUserIdToMongoObjectId + ? toMongoID(userId) + : userId; + await this.collection.update( + { _id: id }, + { + $set: { + [`services.${serviceName}`]: service, + [this.options.timestamps.updatedAt]: this.options.dateProvider(), + }, + } + ); + } + public async createSession( userId: string, ip?: string, diff --git a/packages/accounts-mongo/tsconfig.json b/packages/accounts-mongo/tsconfig.json index 3b035f0e3..7621d6196 100644 --- a/packages/accounts-mongo/tsconfig.json +++ b/packages/accounts-mongo/tsconfig.json @@ -8,14 +8,7 @@ "pretty": true, "removeComments": true, "lib": ["es6"], - "types": [ - "@types/node" - ] + "types": ["@types/node"] }, - "exclude": [ - "node_modules", - "__tests__", - "lib", - "lib-es6" - ] + "exclude": ["node_modules", "__tests__", "lib", "lib-es6"] } diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index 3a707c159..ee5665927 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -2,21 +2,20 @@ # yarn lockfile v1 -"@accounts/common@^0.0.16": - version "0.0.16" - resolved "https://registry.yarnpkg.com/@accounts/common/-/common-0.0.16.tgz#41f6f6a16314c49b0b7342931b71c39146fd7255" +"@accounts/common@^0.1.0-alpha.04203cca": + version "0.1.0-alpha.04203cca" + resolved "https://registry.yarnpkg.com/@accounts/common/-/common-0.1.0-alpha.04203cca.tgz#916199792e47ca5afcb6ebe2f513ac226096e10b" dependencies: lodash "^4.16.4" -"@accounts/server@^0.0.17": - version "0.0.17" - resolved "https://registry.yarnpkg.com/@accounts/server/-/server-0.0.17.tgz#145b901ea7758e4072616ed62d58f0a1e24f020e" +"@accounts/server@^0.1.0-alpha.04203cca": + version "0.1.0-alpha.04203cca" + resolved "https://registry.yarnpkg.com/@accounts/server/-/server-0.1.0-alpha.04203cca.tgz#040fbc5d216512cf1743c3e5114933e1fb8853ea" dependencies: - "@accounts/common" "^0.0.16" + "@accounts/common" "^0.1.0-alpha.04203cca" babel-polyfill "^6.23.0" bcryptjs "^2.4.0" crypto "^0.0.3" - emailjs "^1.0.8" jsonwebtoken "^7.2.1" jwt-decode "^2.1.0" lodash "^4.16.4" @@ -38,6 +37,10 @@ version "21.1.5" resolved "https://registry.yarnpkg.com/@types/jest/-/jest-21.1.5.tgz#3db93d069d12602ca115d3604550e15131d8eb7a" +"@types/lodash@^4.14.104": + version "4.14.104" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.104.tgz#53ee2357fa2e6e68379341d92eb2ecea4b11bb80" + "@types/mongodb@^2.2.15": version "2.2.15" resolved "https://registry.yarnpkg.com/@types/mongodb/-/mongodb-2.2.15.tgz#42577d8a92b9840dad440acf92fea6435c1fcfb3" @@ -71,14 +74,6 @@ acorn@^4.0.4: version "4.0.13" resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" -addressparser@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/addressparser/-/addressparser-0.3.2.tgz#59873f35e8fcf6c7361c10239261d76e15348bb2" - -addressparser@~0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/addressparser/-/addressparser-0.2.1.tgz#d11a5b2eeda04cfefebdf3196c10ae13db6cd607" - ajv@^4.9.1: version "4.11.8" resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" @@ -521,10 +516,6 @@ buffer-shims@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" -bufferjs@=1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/bufferjs/-/bufferjs-1.1.0.tgz#095ffa39c5e6b40a2178a1169c9effc584a73201" - builtin-modules@^1.0.0, builtin-modules@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" @@ -787,23 +778,6 @@ ecdsa-sig-formatter@1.0.9: base64url "^2.0.0" safe-buffer "^5.0.1" -emailjs@^1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/emailjs/-/emailjs-1.0.8.tgz#d4240db7670dc78aff97352092d8460edc130f66" - dependencies: - addressparser "^0.3.2" - mimelib "0.2.14" - moment "= 2.11.2" - starttls "1.0.1" - optionalDependencies: - bufferjs "=1.1.0" - -encoding@~0.1: - version "0.1.12" - resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" - dependencies: - iconv-lite "~0.4.13" - errno@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" @@ -1202,7 +1176,7 @@ husky@^0.14.3: normalize-path "^1.0.0" strip-indent "^2.0.0" -iconv-lite@0.4.13, iconv-lite@~0.4.13: +iconv-lite@0.4.13: version "0.4.13" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" @@ -1922,13 +1896,6 @@ mime-types@^2.1.12, mime-types@~2.1.7: dependencies: mime-db "~1.25.0" -mimelib@0.2.14: - version "0.2.14" - resolved "https://registry.yarnpkg.com/mimelib/-/mimelib-0.2.14.tgz#2a1aa724bd190b85bd526e6317ab6106edfd6831" - dependencies: - addressparser "~0.2.0" - encoding "~0.1" - mimic-fn@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" @@ -1963,7 +1930,7 @@ minimist@~0.0.1: dependencies: minimist "0.0.8" -moment@2.x.x, "moment@= 2.11.2": +moment@2.x.x: version "2.11.2" resolved "https://registry.yarnpkg.com/moment/-/moment-2.11.2.tgz#87968e5f95ac038c2e42ac959c75819cd3f52901" @@ -2629,10 +2596,6 @@ sshpk@^1.7.0: jsbn "~0.1.0" tweetnacl "~0.14.0" -starttls@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/starttls/-/starttls-1.0.1.tgz#e6081c25de6b178f5a75f8f271c1487449183b42" - string-length@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed" From 4cc0c93da9b00839ecaa9c37cef7e4def086edc9 Mon Sep 17 00:00:00 2001 From: pradel Date: Wed, 28 Feb 2018 10:23:28 +0100 Subject: [PATCH 067/128] use 0.1.0-beta.0 --- packages/accounts-mongo/package.json | 8 ++++---- packages/accounts-mongo/yarn.lock | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 72bf8c38e..cf746ded2 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -41,8 +41,8 @@ }, "homepage": "https://github.com/js-accounts/mongo", "devDependencies": { - "@accounts/common": "^0.1.0-alpha.04203cca", - "@accounts/server": "^0.1.0-alpha.04203cca", + "@accounts/common": "^0.1.0-beta.0", + "@accounts/server": "^0.1.0-beta.0", "@accounts/tslint-config-accounts": "^0.0.4", "@types/jest": "^21.1.5", "@types/lodash": "^4.14.104", @@ -59,8 +59,8 @@ "typescript": "^2.6.1" }, "peerDependencies": { - "@accounts/common": "^0.1.0", - "@accounts/server": "^0.1.0" + "@accounts/common": "^0.1.0-beta.0", + "@accounts/server": "^0.1.0-beta.0" }, "dependencies": { "lodash": "^4.17.4", diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index ee5665927..095a53f14 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -2,17 +2,17 @@ # yarn lockfile v1 -"@accounts/common@^0.1.0-alpha.04203cca": - version "0.1.0-alpha.04203cca" - resolved "https://registry.yarnpkg.com/@accounts/common/-/common-0.1.0-alpha.04203cca.tgz#916199792e47ca5afcb6ebe2f513ac226096e10b" +"@accounts/common@^0.1.0-beta.0": + version "0.1.0-beta.0" + resolved "https://registry.yarnpkg.com/@accounts/common/-/common-0.1.0-beta.0.tgz#04a9496c64bbd5ab22c2f6911cb621ba106421ca" dependencies: lodash "^4.16.4" -"@accounts/server@^0.1.0-alpha.04203cca": - version "0.1.0-alpha.04203cca" - resolved "https://registry.yarnpkg.com/@accounts/server/-/server-0.1.0-alpha.04203cca.tgz#040fbc5d216512cf1743c3e5114933e1fb8853ea" +"@accounts/server@^0.1.0-beta.0": + version "0.1.0-beta.0" + resolved "https://registry.yarnpkg.com/@accounts/server/-/server-0.1.0-beta.0.tgz#d13e7c76dc7fdfeb9cbc8e622915101db3041ff1" dependencies: - "@accounts/common" "^0.1.0-alpha.04203cca" + "@accounts/common" "^0.1.0-beta.0" babel-polyfill "^6.23.0" bcryptjs "^2.4.0" crypto "^0.0.3" From ff288d650754d0c89c6524e2578f38ef519f3e22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Pradel?= Date: Wed, 28 Feb 2018 10:25:05 +0100 Subject: [PATCH 068/128] Merge pull request #32 from accounts-js/renovate/configure Configure Renovate --- packages/accounts-mongo/renovate.json | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 packages/accounts-mongo/renovate.json diff --git a/packages/accounts-mongo/renovate.json b/packages/accounts-mongo/renovate.json new file mode 100644 index 000000000..f45d8f110 --- /dev/null +++ b/packages/accounts-mongo/renovate.json @@ -0,0 +1,5 @@ +{ + "extends": [ + "config:base" + ] +} From 8101ac32288fc24a5a275bfe05b2e65ed0ca42ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Pradel?= Date: Wed, 28 Feb 2018 10:26:39 +0100 Subject: [PATCH 069/128] Merge pull request #35 from accounts-js/renovate/pin-dependencies Pin Dependencies --- packages/accounts-mongo/package.json | 32 ++++++++++++++-------------- packages/accounts-mongo/yarn.lock | 32 ++++++++++++++-------------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index cf746ded2..541557838 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -41,22 +41,22 @@ }, "homepage": "https://github.com/js-accounts/mongo", "devDependencies": { - "@accounts/common": "^0.1.0-beta.0", - "@accounts/server": "^0.1.0-beta.0", - "@accounts/tslint-config-accounts": "^0.0.4", - "@types/jest": "^21.1.5", - "@types/lodash": "^4.14.104", - "@types/mongodb": "^2.2.15", - "@types/node": "^8.0.47", - "codecov": "^3.0.0", - "coveralls": "^3.0.0", - "husky": "^0.14.3", - "jest": "^21.2.1", - "prettier": "^1.8.2", - "pretty-quick": "^1.2.0", - "ts-jest": "^21.1.4", - "tslint": "^5.8.0", - "typescript": "^2.6.1" + "@accounts/common": "0.1.0-beta.0", + "@accounts/server": "0.1.0-beta.0", + "@accounts/tslint-config-accounts": "0.0.4", + "@types/jest": "21.1.5", + "@types/lodash": "4.14.104", + "@types/mongodb": "2.2.15", + "@types/node": "8.0.47", + "codecov": "3.0.0", + "coveralls": "3.0.0", + "husky": "0.14.3", + "jest": "21.2.1", + "prettier": "1.8.2", + "pretty-quick": "1.2.0", + "ts-jest": "21.1.4", + "tslint": "5.8.0", + "typescript": "2.6.1" }, "peerDependencies": { "@accounts/common": "^0.1.0-beta.0", diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index 095a53f14..858d3fd3e 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -2,13 +2,13 @@ # yarn lockfile v1 -"@accounts/common@^0.1.0-beta.0": +"@accounts/common@0.1.0-beta.0", "@accounts/common@^0.1.0-beta.0": version "0.1.0-beta.0" resolved "https://registry.yarnpkg.com/@accounts/common/-/common-0.1.0-beta.0.tgz#04a9496c64bbd5ab22c2f6911cb621ba106421ca" dependencies: lodash "^4.16.4" -"@accounts/server@^0.1.0-beta.0": +"@accounts/server@0.1.0-beta.0": version "0.1.0-beta.0" resolved "https://registry.yarnpkg.com/@accounts/server/-/server-0.1.0-beta.0.tgz#d13e7c76dc7fdfeb9cbc8e622915101db3041ff1" dependencies: @@ -20,7 +20,7 @@ jwt-decode "^2.1.0" lodash "^4.16.4" -"@accounts/tslint-config-accounts@^0.0.4": +"@accounts/tslint-config-accounts@0.0.4": version "0.0.4" resolved "https://registry.yarnpkg.com/@accounts/tslint-config-accounts/-/tslint-config-accounts-0.0.4.tgz#f7ac27d290a14bb0351ca30fbc743994a4db346b" dependencies: @@ -33,15 +33,15 @@ dependencies: "@types/node" "*" -"@types/jest@^21.1.5": +"@types/jest@21.1.5": version "21.1.5" resolved "https://registry.yarnpkg.com/@types/jest/-/jest-21.1.5.tgz#3db93d069d12602ca115d3604550e15131d8eb7a" -"@types/lodash@^4.14.104": +"@types/lodash@4.14.104": version "4.14.104" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.104.tgz#53ee2357fa2e6e68379341d92eb2ecea4b11bb80" -"@types/mongodb@^2.2.15": +"@types/mongodb@2.2.15": version "2.2.15" resolved "https://registry.yarnpkg.com/@types/mongodb/-/mongodb-2.2.15.tgz#42577d8a92b9840dad440acf92fea6435c1fcfb3" dependencies: @@ -52,7 +52,7 @@ version "8.0.10" resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.10.tgz#12efec9183b072d5f951cf86395a4c780f868a17" -"@types/node@^8.0.47": +"@types/node@8.0.47": version "8.0.47" resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.47.tgz#968e596f91acd59069054558a00708c445ca30c2" @@ -593,7 +593,7 @@ code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" -codecov@^3.0.0: +codecov@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/codecov/-/codecov-3.0.0.tgz#c273b8c4f12945723e8dc9d25803d89343e5f28e" dependencies: @@ -651,7 +651,7 @@ core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" -coveralls@^3.0.0: +coveralls@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.0.0.tgz#22ef730330538080d29b8c151dc9146afde88a99" dependencies: @@ -1168,7 +1168,7 @@ http-signature@~1.1.0: jsprim "^1.2.2" sshpk "^1.7.0" -husky@^0.14.3: +husky@0.14.3: version "0.14.3" resolved "https://registry.yarnpkg.com/husky/-/husky-0.14.3.tgz#c69ed74e2d2779769a17ba8399b54ce0b63c12c3" dependencies: @@ -1620,7 +1620,7 @@ jest-validate@^21.2.1: leven "^2.1.0" pretty-format "^21.2.1" -jest@^21.2.1: +jest@21.2.1: version "21.2.1" resolved "https://registry.yarnpkg.com/jest/-/jest-21.2.1.tgz#c964e0b47383768a1438e3ccf3c3d470327604e1" dependencies: @@ -2226,7 +2226,7 @@ preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" -prettier@^1.8.2: +prettier@1.8.2: version "1.8.2" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.8.2.tgz#bff83e7fd573933c607875e5ba3abbdffb96aeb8" @@ -2237,7 +2237,7 @@ pretty-format@^21.2.1: ansi-regex "^3.0.0" ansi-styles "^3.2.0" -pretty-quick@^1.2.0: +pretty-quick@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/pretty-quick/-/pretty-quick-1.2.0.tgz#9ed94bcf110f0df1eba8759ce16dcd15f2764be1" dependencies: @@ -2745,7 +2745,7 @@ trim-right@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" -ts-jest@^21.1.4: +ts-jest@21.1.4: version "21.1.4" resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-21.1.4.tgz#6b720cd4ebfacbc935468e60dd395392f817095b" dependencies: @@ -2776,7 +2776,7 @@ tslint-eslint-rules@^4.1.1: tslib "^1.0.0" tsutils "^1.4.0" -tslint@^5.8.0: +tslint@5.8.0: version "5.8.0" resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.8.0.tgz#1f49ad5b2e77c76c3af4ddcae552ae4e3612eb13" dependencies: @@ -2822,7 +2822,7 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" -typescript@^2.6.1: +typescript@2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.6.1.tgz#ef39cdea27abac0b500242d6726ab90e0c846631" From 78fd74054b73480fc9bdfd4ae7f9597eae6fbf0d Mon Sep 17 00:00:00 2001 From: pradel Date: Wed, 28 Feb 2018 10:27:41 +0100 Subject: [PATCH 070/128] move renovate to package.json --- packages/accounts-mongo/package.json | 3 +++ packages/accounts-mongo/renovate.json | 5 ----- 2 files changed, 3 insertions(+), 5 deletions(-) delete mode 100644 packages/accounts-mongo/renovate.json diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 541557838..a80bf45b2 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -21,6 +21,9 @@ "singleQuote": true, "trailingComma": "es5" }, + "renovate": { + "extends": ["config:base"] + }, "files": ["src", "lib"], "jest": { "transform": { diff --git a/packages/accounts-mongo/renovate.json b/packages/accounts-mongo/renovate.json deleted file mode 100644 index f45d8f110..000000000 --- a/packages/accounts-mongo/renovate.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": [ - "config:base" - ] -} From d5c2e666276a41abc5726d1f21acbf44e635de68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Pradel?= Date: Wed, 28 Feb 2018 10:28:37 +0100 Subject: [PATCH 071/128] Merge pull request #36 from accounts-js/renovate/accounts-tslint-config-accounts-0.x Update dependency @accounts/tslint-config-accounts to v0.0.6 --- packages/accounts-mongo/package.json | 2 +- packages/accounts-mongo/yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index a80bf45b2..d760c465e 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -46,7 +46,7 @@ "devDependencies": { "@accounts/common": "0.1.0-beta.0", "@accounts/server": "0.1.0-beta.0", - "@accounts/tslint-config-accounts": "0.0.4", + "@accounts/tslint-config-accounts": "0.0.6", "@types/jest": "21.1.5", "@types/lodash": "4.14.104", "@types/mongodb": "2.2.15", diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index 858d3fd3e..31c9931c9 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -20,9 +20,9 @@ jwt-decode "^2.1.0" lodash "^4.16.4" -"@accounts/tslint-config-accounts@0.0.4": - version "0.0.4" - resolved "https://registry.yarnpkg.com/@accounts/tslint-config-accounts/-/tslint-config-accounts-0.0.4.tgz#f7ac27d290a14bb0351ca30fbc743994a4db346b" +"@accounts/tslint-config-accounts@0.0.6": + version "0.0.6" + resolved "https://registry.yarnpkg.com/@accounts/tslint-config-accounts/-/tslint-config-accounts-0.0.6.tgz#d2ab1480f0aff7c911b2bea9fb924d7f04328931" dependencies: tslint-config-prettier "^1.1.0" tslint-eslint-rules "^4.1.1" From 3f7b02fec56a47097e4dc85f5d52ffe3a07fe497 Mon Sep 17 00:00:00 2001 From: pradel Date: Wed, 28 Feb 2018 10:40:07 +0100 Subject: [PATCH 072/128] 0.1.0-beta.0 --- packages/accounts-mongo/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index d760c465e..7ee6cd679 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -1,6 +1,6 @@ { "name": "@accounts/mongo", - "version": "0.1.0", + "version": "0.1.0-beta.0", "description": "MongoDB adaptor for accounts", "main": "lib/index.js", "typings": "lib/index.d.ts", From 53ccda6222f9e6eca73606c8d568e7c827a041d4 Mon Sep 17 00:00:00 2001 From: pradel Date: Wed, 28 Feb 2018 11:18:33 +0100 Subject: [PATCH 073/128] renovate auto merge minor and patch --- packages/accounts-mongo/package.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 7ee6cd679..dd6721d0b 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -22,7 +22,11 @@ "trailingComma": "es5" }, "renovate": { - "extends": ["config:base"] + "extends": ["config:base"], + "automerge": true, + "major": { + "automerge": false + } }, "files": ["src", "lib"], "jest": { From 6be65913456edf7564db63c3f2197d0e841fb0c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Pradel?= Date: Wed, 28 Feb 2018 11:18:58 +0100 Subject: [PATCH 074/128] Merge pull request #37 from accounts-js/renovate/jest-21.x Update dependency @types/jest to v21.1.10 --- packages/accounts-mongo/package.json | 2 +- packages/accounts-mongo/yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index dd6721d0b..15def6bf5 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -51,7 +51,7 @@ "@accounts/common": "0.1.0-beta.0", "@accounts/server": "0.1.0-beta.0", "@accounts/tslint-config-accounts": "0.0.6", - "@types/jest": "21.1.5", + "@types/jest": "21.1.10", "@types/lodash": "4.14.104", "@types/mongodb": "2.2.15", "@types/node": "8.0.47", diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index 31c9931c9..d1f70e52c 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -33,9 +33,9 @@ dependencies: "@types/node" "*" -"@types/jest@21.1.5": - version "21.1.5" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-21.1.5.tgz#3db93d069d12602ca115d3604550e15131d8eb7a" +"@types/jest@21.1.10": + version "21.1.10" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-21.1.10.tgz#dcacb5217ddf997a090cc822bba219b4b2fd7984" "@types/lodash@4.14.104": version "4.14.104" From 9e44d94eeb9ee5981dd97311ae64bf20e94c8a5a Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 28 Feb 2018 10:19:18 +0000 Subject: [PATCH 075/128] Update dependency @types/mongodb to v2.2.20 --- packages/accounts-mongo/package.json | 2 +- packages/accounts-mongo/yarn.lock | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 15def6bf5..e6e048b08 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -53,7 +53,7 @@ "@accounts/tslint-config-accounts": "0.0.6", "@types/jest": "21.1.10", "@types/lodash": "4.14.104", - "@types/mongodb": "2.2.15", + "@types/mongodb": "2.2.20", "@types/node": "8.0.47", "codecov": "3.0.0", "coveralls": "3.0.0", diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index d1f70e52c..5317b0211 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -33,6 +33,10 @@ dependencies: "@types/node" "*" +"@types/events@*": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@types/events/-/events-1.2.0.tgz#81a6731ce4df43619e5c8c945383b3e62a89ea86" + "@types/jest@21.1.10": version "21.1.10" resolved "https://registry.yarnpkg.com/@types/jest/-/jest-21.1.10.tgz#dcacb5217ddf997a090cc822bba219b4b2fd7984" @@ -41,11 +45,12 @@ version "4.14.104" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.104.tgz#53ee2357fa2e6e68379341d92eb2ecea4b11bb80" -"@types/mongodb@2.2.15": - version "2.2.15" - resolved "https://registry.yarnpkg.com/@types/mongodb/-/mongodb-2.2.15.tgz#42577d8a92b9840dad440acf92fea6435c1fcfb3" +"@types/mongodb@2.2.20": + version "2.2.20" + resolved "https://registry.yarnpkg.com/@types/mongodb/-/mongodb-2.2.20.tgz#0500eecff6b667f3ad52c94525742de882c65260" dependencies: "@types/bson" "*" + "@types/events" "*" "@types/node" "*" "@types/node@*": From d6914da7f9efa487fdf3e939baaa3338805c37d2 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 28 Feb 2018 11:12:26 +0000 Subject: [PATCH 076/128] Update dependency @types/node to v8.9.4 --- packages/accounts-mongo/package.json | 2 +- packages/accounts-mongo/yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index e6e048b08..688da5d25 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -54,7 +54,7 @@ "@types/jest": "21.1.10", "@types/lodash": "4.14.104", "@types/mongodb": "2.2.20", - "@types/node": "8.0.47", + "@types/node": "8.9.4", "codecov": "3.0.0", "coveralls": "3.0.0", "husky": "0.14.3", diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index 5317b0211..5887e9bff 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -57,9 +57,9 @@ version "8.0.10" resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.10.tgz#12efec9183b072d5f951cf86395a4c780f868a17" -"@types/node@8.0.47": - version "8.0.47" - resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.47.tgz#968e596f91acd59069054558a00708c445ca30c2" +"@types/node@8.9.4": + version "8.9.4" + resolved "https://registry.yarnpkg.com/@types/node/-/node-8.9.4.tgz#dfd327582a06c114eb6e0441fa3d6fab35edad48" abab@^1.0.3: version "1.0.3" From 574eec917f06d21127e01a816b5d51edf3d01ba9 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 28 Feb 2018 12:19:42 +0000 Subject: [PATCH 077/128] Update dependency pretty-quick to v1.4.1 --- packages/accounts-mongo/package.json | 2 +- packages/accounts-mongo/yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 688da5d25..749b9f23d 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -60,7 +60,7 @@ "husky": "0.14.3", "jest": "21.2.1", "prettier": "1.8.2", - "pretty-quick": "1.2.0", + "pretty-quick": "1.4.1", "ts-jest": "21.1.4", "tslint": "5.8.0", "typescript": "2.6.1" diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index 5887e9bff..115de2eb9 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -2242,9 +2242,9 @@ pretty-format@^21.2.1: ansi-regex "^3.0.0" ansi-styles "^3.2.0" -pretty-quick@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/pretty-quick/-/pretty-quick-1.2.0.tgz#9ed94bcf110f0df1eba8759ce16dcd15f2764be1" +pretty-quick@1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/pretty-quick/-/pretty-quick-1.4.1.tgz#9d41f778d2d4d940ec603d1293a0998e84c4722c" dependencies: chalk "^2.3.0" execa "^0.8.0" From e895c6d10b147d9a346947d8cc6182d0fdedceda Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 28 Feb 2018 13:14:12 +0000 Subject: [PATCH 078/128] Update dependency tslint to v5.9.1 --- packages/accounts-mongo/package.json | 2 +- packages/accounts-mongo/yarn.lock | 23 ++++++++++++++++------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 749b9f23d..ec7977dcc 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -62,7 +62,7 @@ "prettier": "1.8.2", "pretty-quick": "1.4.1", "ts-jest": "21.1.4", - "tslint": "5.8.0", + "tslint": "5.9.1", "typescript": "2.6.1" }, "peerDependencies": { diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index 115de2eb9..787fa9d64 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -562,7 +562,7 @@ chalk@^1.1.0, chalk@^1.1.1: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0: +chalk@^2.0.1, chalk@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba" dependencies: @@ -622,6 +622,10 @@ combined-stream@^1.0.5, combined-stream@~1.0.5: dependencies: delayed-stream "~1.0.0" +commander@^2.12.1: + version "2.14.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.14.1.tgz#2235123e37af8ca3c65df45b026dbd357b01b9aa" + commander@^2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" @@ -2769,6 +2773,10 @@ tslib@^1.0.0, tslib@^1.7.1: version "1.7.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.7.1.tgz#bc8004164691923a79fe8378bbeb3da2017538ec" +tslib@^1.8.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8" + tslint-config-prettier@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/tslint-config-prettier/-/tslint-config-prettier-1.1.0.tgz#40c026a56e4da27063b3e9bcd71f4f8109fee369" @@ -2781,20 +2789,21 @@ tslint-eslint-rules@^4.1.1: tslib "^1.0.0" tsutils "^1.4.0" -tslint@5.8.0: - version "5.8.0" - resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.8.0.tgz#1f49ad5b2e77c76c3af4ddcae552ae4e3612eb13" +tslint@5.9.1: + version "5.9.1" + resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.9.1.tgz#1255f87a3ff57eb0b0e1f0e610a8b4748046c9ae" dependencies: babel-code-frame "^6.22.0" builtin-modules "^1.1.1" - chalk "^2.1.0" - commander "^2.9.0" + chalk "^2.3.0" + commander "^2.12.1" diff "^3.2.0" glob "^7.1.1" + js-yaml "^3.7.0" minimatch "^3.0.4" resolve "^1.3.2" semver "^5.3.0" - tslib "^1.7.1" + tslib "^1.8.0" tsutils "^2.12.1" tsutils@^1.4.0: From d16d5913889cd4cab688577a160b9e1156216728 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Pradel?= Date: Wed, 28 Feb 2018 15:23:44 +0100 Subject: [PATCH 079/128] Merge pull request #45 from accounts-js/renovate/jest-22.x Update dependency @types/jest to v22 --- packages/accounts-mongo/package.json | 2 +- packages/accounts-mongo/yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index ec7977dcc..123f075ac 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -51,7 +51,7 @@ "@accounts/common": "0.1.0-beta.0", "@accounts/server": "0.1.0-beta.0", "@accounts/tslint-config-accounts": "0.0.6", - "@types/jest": "21.1.10", + "@types/jest": "22.1.3", "@types/lodash": "4.14.104", "@types/mongodb": "2.2.20", "@types/node": "8.9.4", diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index 787fa9d64..ab44ffe6d 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -37,9 +37,9 @@ version "1.2.0" resolved "https://registry.yarnpkg.com/@types/events/-/events-1.2.0.tgz#81a6731ce4df43619e5c8c945383b3e62a89ea86" -"@types/jest@21.1.10": - version "21.1.10" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-21.1.10.tgz#dcacb5217ddf997a090cc822bba219b4b2fd7984" +"@types/jest@22.1.3": + version "22.1.3" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-22.1.3.tgz#25da391935e6fac537551456f077ce03144ec168" "@types/lodash@4.14.104": version "4.14.104" From d58e03556b66421cb36f76222a54331035ff1540 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Pradel?= Date: Wed, 28 Feb 2018 15:24:20 +0100 Subject: [PATCH 080/128] Merge pull request #42 from accounts-js/renovate/ts-jest-21.x Update dependency ts-jest to v21.2.4 --- packages/accounts-mongo/package.json | 2 +- packages/accounts-mongo/yarn.lock | 161 +++++++++++++++++++++++++-- 2 files changed, 151 insertions(+), 12 deletions(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 123f075ac..53b2e2fb7 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -61,7 +61,7 @@ "jest": "21.2.1", "prettier": "1.8.2", "pretty-quick": "1.4.1", - "ts-jest": "21.1.4", + "ts-jest": "21.2.4", "tslint": "5.9.1", "typescript": "2.6.1" }, diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index ab44ffe6d..6bb126358 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -168,6 +168,18 @@ array-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" +array-filter@~0.0.0: + version "0.0.1" + resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-0.0.1.tgz#7da8cf2e26628ed732803581fd21f67cacd2eeec" + +array-map@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/array-map/-/array-map-0.0.0.tgz#88a2bab73d1cf7bcd5c1b118a003f66f665fa662" + +array-reduce@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/array-reduce/-/array-reduce-0.0.0.tgz#173899d3ffd1c7d9383e4479525dbe278cab5f2b" + array-unique@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" @@ -192,6 +204,10 @@ astral-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" +async-each@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" + async@^1.4.0: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" @@ -363,6 +379,13 @@ babel-runtime@^6.22.0: core-js "^2.4.0" regenerator-runtime "^0.10.0" +babel-runtime@^6.9.2: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + babel-template@^6.16.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.22.0.tgz#403d110905a4626b317a2a1fcb8f3b73204b2edb" @@ -463,6 +486,10 @@ bcryptjs@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/bcryptjs/-/bcryptjs-2.4.0.tgz#fb7f4a0b133854503fe1b2da3f25db834cf0e678" +binary-extensions@^1.0.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205" + block-stream@*: version "0.0.9" resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" @@ -570,6 +597,21 @@ chalk@^2.0.1, chalk@^2.3.0: escape-string-regexp "^1.0.5" supports-color "^4.0.0" +chokidar@^1.6.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" + dependencies: + anymatch "^1.3.0" + async-each "^1.0.0" + glob-parent "^2.0.0" + inherits "^2.0.1" + is-binary-path "^1.0.0" + is-glob "^2.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.0.0" + optionalDependencies: + fsevents "^1.0.0" + ci-info@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.0.0.tgz#dc5285f2b4e251821683681c381c3388f46ec534" @@ -670,6 +712,22 @@ coveralls@3.0.0: minimist "^1.2.0" request "^2.79.0" +cpx@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/cpx/-/cpx-1.5.0.tgz#185be018511d87270dedccc293171e37655ab88f" + dependencies: + babel-runtime "^6.9.2" + chokidar "^1.6.0" + duplexer "^0.1.1" + glob "^7.0.5" + glob2base "^0.0.12" + minimatch "^3.0.2" + mkdirp "^0.5.1" + resolve "^1.1.7" + safe-buffer "^5.0.1" + shell-quote "^1.6.1" + subarg "^1.0.0" + cross-spawn@^4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41" @@ -774,6 +832,10 @@ doctrine@^0.7.2: esutils "^1.1.6" isarray "0.0.1" +duplexer@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" + ecc-jsbn@~0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" @@ -936,6 +998,10 @@ fill-range@^2.1.0: repeat-element "^1.1.2" repeat-string "^1.5.2" +find-index@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/find-index/-/find-index-0.1.1.tgz#675d358b2ca3892d795a1ab47232f8b6e2e0dde4" + find-up@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" @@ -971,9 +1037,9 @@ form-data@~2.1.1: combined-stream "^1.0.5" mime-types "^2.1.12" -fs-extra@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.2.tgz#f91704c53d1b461f893452b0c307d9997647ab6b" +fs-extra@^4.0.2: + version "4.0.3" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" dependencies: graceful-fs "^4.1.2" jsonfile "^4.0.0" @@ -983,6 +1049,13 @@ fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" +fsevents@^1.0.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.3.tgz#11f82318f5fe7bb2cd22965a108e9306208216d8" + dependencies: + nan "^2.3.0" + node-pre-gyp "^0.6.39" + fsevents@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.2.tgz#3282b713fb3ad80ede0e9fcf4611b5aa6fc033f4" @@ -1064,6 +1137,12 @@ glob-parent@^2.0.0: dependencies: is-glob "^2.0.0" +glob2base@^0.0.12: + version "0.0.12" + resolved "https://registry.yarnpkg.com/glob2base/-/glob2base-0.0.12.tgz#9d419b3e28f12e83a362164a277055922c9c0d56" + dependencies: + find-index "^0.1.1" + glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" @@ -1204,7 +1283,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: +inherits@2, inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" @@ -1226,6 +1305,12 @@ is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + dependencies: + binary-extensions "^1.0.0" + is-buffer@^1.0.2: version "1.1.4" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.4.tgz#cfc86ccd5dc5a52fa80489111c6920c457e2d98b" @@ -1925,7 +2010,7 @@ minimist@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" -minimist@^1.1.1, minimist@^1.2.0: +minimist@^1.1.0, minimist@^1.1.1, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" @@ -1991,7 +2076,7 @@ node-notifier@^5.0.2: shellwords "^0.1.0" which "^1.2.12" -node-pre-gyp@^0.6.36: +node-pre-gyp@^0.6.36, node-pre-gyp@^0.6.39: version "0.6.39" resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.39.tgz#c00e96860b23c0e1420ac7befc5044e1d78d8649" dependencies: @@ -2264,6 +2349,10 @@ process-nextick-args@~1.0.6: version "1.0.7" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" +process-nextick-args@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" + prr@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" @@ -2342,6 +2431,18 @@ readable-stream@2.2.7: string_decoder "~1.0.0" util-deprecate "~1.0.1" +readable-stream@^2.0.2: + version "2.3.4" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.4.tgz#c946c3f47fa7d8eabc0b6150f4a12f69a4574071" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.0.3" + util-deprecate "~1.0.1" + readable-stream@^2.0.6, readable-stream@^2.1.4: version "2.3.3" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" @@ -2354,10 +2455,23 @@ readable-stream@^2.0.6, readable-stream@^2.1.4: string_decoder "~1.0.3" util-deprecate "~1.0.1" +readdirp@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" + dependencies: + graceful-fs "^4.1.2" + minimatch "^3.0.2" + readable-stream "^2.0.2" + set-immediate-shim "^1.0.1" + regenerator-runtime@^0.10.0: version "0.10.1" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.1.tgz#257f41961ce44558b18f7814af48c17559f9faeb" +regenerator-runtime@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + regex-cache@^0.4.2: version "0.4.3" resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" @@ -2454,6 +2568,12 @@ resolve@1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" +resolve@^1.1.7: + version "1.5.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36" + dependencies: + path-parse "^1.0.5" + resolve@^1.3.2: version "1.3.3" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.3.tgz#655907c3469a8680dc2de3a275a8fdd69691f0e5" @@ -2512,6 +2632,10 @@ set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" +set-immediate-shim@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" @@ -2522,6 +2646,15 @@ shebang-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" +shell-quote@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767" + dependencies: + array-filter "~0.0.0" + array-map "~0.0.0" + array-reduce "~0.0.0" + jsonify "~0.0.0" + shellwords@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.0.tgz#66afd47b6a12932d9071cbfd98a52e785cd0ba14" @@ -2671,6 +2804,12 @@ strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" +subarg@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/subarg/-/subarg-1.0.0.tgz#f62cf17581e996b48fc965699f54c06ae268b8d2" + dependencies: + minimist "^1.1.0" + supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" @@ -2754,17 +2893,17 @@ trim-right@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" -ts-jest@21.1.4: - version "21.1.4" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-21.1.4.tgz#6b720cd4ebfacbc935468e60dd395392f817095b" +ts-jest@21.2.4: + version "21.2.4" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-21.2.4.tgz#8fbcfbfbf0c58cced10dcc34a5190acc8c5312ef" dependencies: babel-core "^6.24.1" babel-plugin-istanbul "^4.1.4" babel-plugin-transform-es2015-modules-commonjs "^6.24.1" babel-preset-jest "^21.2.0" - fs-extra "^4.0.0" + cpx "^1.5.0" + fs-extra "^4.0.2" jest-config "^21.2.1" - jest-util "^21.2.1" pkg-dir "^2.0.0" source-map-support "^0.5.0" yargs "^10.0.3" From cbfbe2b46bf36b360cc1e3b1fd9b67ba469884fa Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 28 Feb 2018 14:16:14 +0000 Subject: [PATCH 081/128] Update dependency typescript to v2.7.2 --- packages/accounts-mongo/package.json | 2 +- packages/accounts-mongo/yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 53b2e2fb7..3286f66f6 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -63,7 +63,7 @@ "pretty-quick": "1.4.1", "ts-jest": "21.2.4", "tslint": "5.9.1", - "typescript": "2.6.1" + "typescript": "2.7.2" }, "peerDependencies": { "@accounts/common": "^0.1.0-beta.0", diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index 6bb126358..64cf34759 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -2975,9 +2975,9 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" -typescript@2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.6.1.tgz#ef39cdea27abac0b500242d6726ab90e0c846631" +typescript@2.7.2: + version "2.7.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.7.2.tgz#2d615a1ef4aee4f574425cdff7026edf81919836" uglify-js@^2.6: version "2.8.29" From e2ab5806f0e726a3b854fdfcec0e1868ab4deec2 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 28 Feb 2018 20:36:24 +0000 Subject: [PATCH 082/128] Update dependency @types/jest to v22.1.4 --- packages/accounts-mongo/package.json | 2 +- packages/accounts-mongo/yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 3286f66f6..ac4e6d8a5 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -51,7 +51,7 @@ "@accounts/common": "0.1.0-beta.0", "@accounts/server": "0.1.0-beta.0", "@accounts/tslint-config-accounts": "0.0.6", - "@types/jest": "22.1.3", + "@types/jest": "22.1.4", "@types/lodash": "4.14.104", "@types/mongodb": "2.2.20", "@types/node": "8.9.4", diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index 64cf34759..b381ca4e1 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -37,9 +37,9 @@ version "1.2.0" resolved "https://registry.yarnpkg.com/@types/events/-/events-1.2.0.tgz#81a6731ce4df43619e5c8c945383b3e62a89ea86" -"@types/jest@22.1.3": - version "22.1.3" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-22.1.3.tgz#25da391935e6fac537551456f077ce03144ec168" +"@types/jest@22.1.4": + version "22.1.4" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-22.1.4.tgz#5c0c06a9bb495c67e0a78002a952f151e2ae58a1" "@types/lodash@4.14.104": version "4.14.104" From 7b6f07b01876185ddb8f7b39826abafefed2350c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Pradel?= Date: Thu, 1 Mar 2018 14:19:53 +0100 Subject: [PATCH 083/128] Merge pull request #50 from accounts-js/feature/export-named-default export both named and default --- packages/accounts-mongo/src/index.ts | 5 ++++- packages/accounts-mongo/src/mongo.ts | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/accounts-mongo/src/index.ts b/packages/accounts-mongo/src/index.ts index b9fe67879..78dbc0347 100644 --- a/packages/accounts-mongo/src/index.ts +++ b/packages/accounts-mongo/src/index.ts @@ -1 +1,4 @@ -export * from './mongo'; +import { Mongo } from './mongo'; + +export { Mongo }; +export default Mongo; diff --git a/packages/accounts-mongo/src/mongo.ts b/packages/accounts-mongo/src/mongo.ts index cef276709..ff0284359 100644 --- a/packages/accounts-mongo/src/mongo.ts +++ b/packages/accounts-mongo/src/mongo.ts @@ -63,7 +63,7 @@ const defaultOptions = { dateProvider: (date?: Date) => (date ? date.getTime() : Date.now()), }; -export default class Mongo implements DBInterface { +export class Mongo implements DBInterface { // Options of Mongo class private options: MongoOptionsType; // Db object From 14d331578dc1f6637f6d7669983595901d2af871 Mon Sep 17 00:00:00 2001 From: pradel Date: Thu, 1 Mar 2018 14:22:07 +0100 Subject: [PATCH 084/128] 0.1.0-beta.1 --- packages/accounts-mongo/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index ac4e6d8a5..254668f55 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -1,6 +1,6 @@ { "name": "@accounts/mongo", - "version": "0.1.0-beta.0", + "version": "0.1.0-beta.1", "description": "MongoDB adaptor for accounts", "main": "lib/index.js", "typings": "lib/index.d.ts", From f389867ee062dbd1e20ac6a210fc2bdfd78dc0b1 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 1 Mar 2018 13:34:27 +0000 Subject: [PATCH 085/128] Update dependency @accounts/common to v0.1.0-beta.2 --- packages/accounts-mongo/package.json | 2 +- packages/accounts-mongo/yarn.lock | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 254668f55..69d1965f3 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -48,7 +48,7 @@ }, "homepage": "https://github.com/js-accounts/mongo", "devDependencies": { - "@accounts/common": "0.1.0-beta.0", + "@accounts/common": "0.1.0-beta.2", "@accounts/server": "0.1.0-beta.0", "@accounts/tslint-config-accounts": "0.0.6", "@types/jest": "22.1.4", diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index b381ca4e1..013a31b3d 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -2,7 +2,13 @@ # yarn lockfile v1 -"@accounts/common@0.1.0-beta.0", "@accounts/common@^0.1.0-beta.0": +"@accounts/common@0.1.0-beta.2": + version "0.1.0-beta.2" + resolved "https://registry.yarnpkg.com/@accounts/common/-/common-0.1.0-beta.2.tgz#5ea493fac393b4e045c6007ab67aa4bf3e27dcb1" + dependencies: + lodash "^4.16.4" + +"@accounts/common@^0.1.0-beta.0": version "0.1.0-beta.0" resolved "https://registry.yarnpkg.com/@accounts/common/-/common-0.1.0-beta.0.tgz#04a9496c64bbd5ab22c2f6911cb621ba106421ca" dependencies: From 9b64622cdf161942b399dd17242ed39fe3446980 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Pradel?= Date: Thu, 1 Mar 2018 16:27:41 +0100 Subject: [PATCH 086/128] Merge pull request #52 from accounts-js/renovate/accounts-server-0.x Update dependency @accounts/server to v0.1.0-beta.2 --- packages/accounts-mongo/package.json | 2 +- packages/accounts-mongo/yarn.lock | 16 +++++----------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 69d1965f3..383628799 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -49,7 +49,7 @@ "homepage": "https://github.com/js-accounts/mongo", "devDependencies": { "@accounts/common": "0.1.0-beta.2", - "@accounts/server": "0.1.0-beta.0", + "@accounts/server": "0.1.0-beta.2", "@accounts/tslint-config-accounts": "0.0.6", "@types/jest": "22.1.4", "@types/lodash": "4.14.104", diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index 013a31b3d..ac7915345 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -2,23 +2,17 @@ # yarn lockfile v1 -"@accounts/common@0.1.0-beta.2": +"@accounts/common@0.1.0-beta.2", "@accounts/common@^0.1.0-beta.2": version "0.1.0-beta.2" resolved "https://registry.yarnpkg.com/@accounts/common/-/common-0.1.0-beta.2.tgz#5ea493fac393b4e045c6007ab67aa4bf3e27dcb1" dependencies: lodash "^4.16.4" -"@accounts/common@^0.1.0-beta.0": - version "0.1.0-beta.0" - resolved "https://registry.yarnpkg.com/@accounts/common/-/common-0.1.0-beta.0.tgz#04a9496c64bbd5ab22c2f6911cb621ba106421ca" - dependencies: - lodash "^4.16.4" - -"@accounts/server@0.1.0-beta.0": - version "0.1.0-beta.0" - resolved "https://registry.yarnpkg.com/@accounts/server/-/server-0.1.0-beta.0.tgz#d13e7c76dc7fdfeb9cbc8e622915101db3041ff1" +"@accounts/server@0.1.0-beta.2": + version "0.1.0-beta.2" + resolved "https://registry.yarnpkg.com/@accounts/server/-/server-0.1.0-beta.2.tgz#db199872154f2d3d826422aa933cf88714213a9a" dependencies: - "@accounts/common" "^0.1.0-beta.0" + "@accounts/common" "^0.1.0-beta.2" babel-polyfill "^6.23.0" bcryptjs "^2.4.0" crypto "^0.0.3" From cec194950300ec6ceaa6432ef5ed104a4f339fc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Pradel?= Date: Thu, 1 Mar 2018 16:28:00 +0100 Subject: [PATCH 087/128] Merge pull request #48 from accounts-js/renovate/ts-jest-22.x Update dependency ts-jest to v22 --- packages/accounts-mongo/package.json | 2 +- packages/accounts-mongo/yarn.lock | 592 +++++++++++++++++++++++++-- 2 files changed, 570 insertions(+), 24 deletions(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 383628799..9b83cbfbd 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -61,7 +61,7 @@ "jest": "21.2.1", "prettier": "1.8.2", "pretty-quick": "1.4.1", - "ts-jest": "21.2.4", + "ts-jest": "22.4.0", "tslint": "5.9.1", "typescript": "2.7.2" }, diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index ac7915345..1b10db11d 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -27,6 +27,20 @@ tslint-config-prettier "^1.1.0" tslint-eslint-rules "^4.1.1" +"@babel/code-frame@^7.0.0-beta.35": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.40.tgz#37e2b0cf7c56026b4b21d3927cadf81adec32ac6" + dependencies: + "@babel/highlight" "7.0.0-beta.40" + +"@babel/highlight@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.40.tgz#b43d67d76bf46e1d10d227f68cddcd263786b255" + dependencies: + chalk "^2.0.0" + esutils "^2.0.2" + js-tokens "^3.0.0" + "@types/bson@*": version "1.0.3" resolved "https://registry.yarnpkg.com/@types/bson/-/bson-1.0.3.tgz#6c26f0876bf9d8cbb06edd4019e29354bf3a03e0" @@ -65,6 +79,10 @@ abab@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.3.tgz#b81de5f7274ec4e756d797cd834f303642724e5d" +abab@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz#5faad9c2c07f60dd76770f71cf025b62a63cfd4e" + abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" @@ -75,10 +93,20 @@ acorn-globals@^3.1.0: dependencies: acorn "^4.0.4" +acorn-globals@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.1.0.tgz#ab716025dbe17c54d3ef81d32ece2b2d99fe2538" + dependencies: + acorn "^5.0.0" + acorn@^4.0.4: version "4.0.13" resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" +acorn@^5.0.0, acorn@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.5.0.tgz#1abb587fbf051f94e3de20e6b26ef910b1828298" + ajv@^4.9.1: version "4.11.8" resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" @@ -86,6 +114,15 @@ ajv@^4.9.1: co "^4.6.0" json-stable-stringify "^1.0.1" +ajv@^5.1.0: + version "5.5.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" + dependencies: + co "^4.6.0" + fast-deep-equal "^1.0.0" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.3.0" + align-text@^0.1.1, align-text@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" @@ -208,6 +245,10 @@ async-each@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" +async-limiter@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" + async@^1.4.0: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" @@ -226,10 +267,18 @@ aws-sign2@~0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + aws4@^1.2.1: version "1.5.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.5.0.tgz#0a29ffb79c31c9e712eeb087e8e7a64b4a56d755" +aws4@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" + babel-code-frame@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" @@ -325,6 +374,10 @@ babel-plugin-jest-hoist@^21.2.0: version "21.2.0" resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-21.2.0.tgz#2cef637259bd4b628a6cace039de5fcd14dbb006" +babel-plugin-jest-hoist@^22.4.1: + version "22.4.1" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-22.4.1.tgz#d712fe5da8b6965f3191dacddbefdbdf4fb66d63" + babel-plugin-syntax-object-rest-spread@^6.13.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" @@ -360,6 +413,13 @@ babel-preset-jest@^21.2.0: babel-plugin-jest-hoist "^21.2.0" babel-plugin-syntax-object-rest-spread "^6.13.0" +babel-preset-jest@^22.4.0: + version "22.4.1" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-22.4.1.tgz#efa2e5f5334242a9457a068452d7d09735db172a" + dependencies: + babel-plugin-jest-hoist "^22.4.1" + babel-plugin-syntax-object-rest-spread "^6.13.0" + babel-register@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.24.1.tgz#7e10e13a2f71065bdfad5a1787ba45bca6ded75f" @@ -502,6 +562,18 @@ boom@2.x.x: dependencies: hoek "2.x.x" +boom@4.x.x: + version "4.3.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-4.3.1.tgz#4f8a3005cb4a7e3889f749030fd25b96e01d2e31" + dependencies: + hoek "4.x.x" + +boom@5.x.x: + version "5.2.0" + resolved "https://registry.yarnpkg.com/boom/-/boom-5.2.0.tgz#5dd9da6ee3a5f302077436290cb717d3f4a54e02" + dependencies: + hoek "4.x.x" + brace-expansion@^1.0.0: version "1.1.6" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9" @@ -524,6 +596,10 @@ braces@^1.8.2: preserve "^0.2.0" repeat-element "^1.1.2" +browser-process-hrtime@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.2.tgz#425d68a58d3447f02a04aa894187fce8af8b7b8e" + browser-resolve@^1.11.2: version "1.11.2" resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" @@ -589,6 +665,14 @@ chalk@^1.1.0, chalk@^1.1.1: strip-ansi "^3.0.0" supports-color "^2.0.0" +chalk@^2.0.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.1.tgz#523fe2678aec7b04e8041909292fe8b17059b796" + dependencies: + ansi-styles "^3.2.0" + escape-string-regexp "^1.0.5" + supports-color "^5.2.0" + chalk@^2.0.1, chalk@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba" @@ -632,6 +716,14 @@ cliui@^3.2.0: strip-ansi "^3.0.1" wrap-ansi "^2.0.0" +cliui@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.0.0.tgz#743d4650e05f36d1ed2575b59638d87322bfbbcc" + dependencies: + string-width "^2.1.1" + strip-ansi "^4.0.0" + wrap-ansi "^2.0.0" + co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" @@ -658,6 +750,12 @@ color-name@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.2.tgz#5c8ab72b64bd2215d617ae9559ebb148475cf98d" +combined-stream@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818" + dependencies: + delayed-stream "~1.0.0" + combined-stream@^1.0.5, combined-stream@~1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" @@ -686,6 +784,10 @@ content-type-parser@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.1.tgz#c3e56988c53c65127fb46d4032a3a900246fdc94" +content-type-parser@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.2.tgz#caabe80623e63638b2502fd4c7f12ff4ce2352e7" + convert-source-map@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.3.0.tgz#e9f3e9c6e2728efc2676696a70eb382f73106a67" @@ -749,6 +851,12 @@ cryptiles@2.x.x: dependencies: boom "2.x.x" +cryptiles@3.x.x: + version "3.1.2" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-3.1.2.tgz#a89fbb220f5ce25ec56e8c4aa8a4fd7b5b0d29fe" + dependencies: + boom "5.x.x" + crypto@^0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/crypto/-/crypto-0.0.3.tgz#470a81b86be4c5ee17acc8207a1f5315ae20dbb0" @@ -832,6 +940,12 @@ doctrine@^0.7.2: esutils "^1.1.6" isarray "0.0.1" +domexception@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90" + dependencies: + webidl-conversions "^4.0.2" + duplexer@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" @@ -880,10 +994,25 @@ escodegen@^1.6.1: optionalDependencies: source-map "~0.2.0" +escodegen@^1.9.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.9.1.tgz#dbae17ef96c8e4bedb1356f4504fa4cc2f7cb7e2" + dependencies: + esprima "^3.1.3" + estraverse "^4.2.0" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.6.1" + esprima@^2.7.1: version "2.7.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" +esprima@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" + esprima@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" @@ -892,6 +1021,10 @@ estraverse@^1.9.1: version "1.9.3" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" +estraverse@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" + esutils@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/esutils/-/esutils-1.1.6.tgz#c01ccaa9ae4b897c6d0c3e210ae52f3c7a844375" @@ -953,10 +1086,25 @@ expect@^21.2.1: jest-message-util "^21.2.1" jest-regex-util "^21.2.0" +expect@^22.4.0: + version "22.4.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-22.4.0.tgz#371edf1ae15b83b5bf5ec34b42f1584660a36c16" + dependencies: + ansi-styles "^3.2.0" + jest-diff "^22.4.0" + jest-get-type "^22.1.0" + jest-matcher-utils "^22.4.0" + jest-message-util "^22.4.0" + jest-regex-util "^22.1.0" + extend@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4" +extend@~3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" + extglob@^0.3.1: version "0.3.2" resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" @@ -967,6 +1115,14 @@ extsprintf@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" +fast-deep-equal@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" + +fast-json-stable-stringify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" + fast-levenshtein@~2.0.4: version "2.0.5" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.5.tgz#bd33145744519ab1c36c3ee9f31f08e9079b67f2" @@ -1037,7 +1193,15 @@ form-data@~2.1.1: combined-stream "^1.0.5" mime-types "^2.1.12" -fs-extra@^4.0.2: +form-data@~2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.2.tgz#4970498be604c20c005d4f5c23aecd21d6b49099" + dependencies: + asynckit "^0.4.0" + combined-stream "1.0.6" + mime-types "^2.1.12" + +fs-extra@4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" dependencies: @@ -1184,6 +1348,10 @@ har-schema@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + har-validator@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" @@ -1200,6 +1368,13 @@ har-validator@~4.2.1: ajv "^4.9.1" har-schema "^1.0.5" +har-validator@~5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd" + dependencies: + ajv "^5.1.0" + har-schema "^2.0.0" + has-ansi@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" @@ -1214,6 +1389,10 @@ has-flag@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + has-unicode@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" @@ -1227,10 +1406,23 @@ hawk@3.1.3, hawk@~3.1.3: hoek "2.x.x" sntp "1.x.x" +hawk@~6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-6.0.2.tgz#af4d914eb065f9b5ce4d9d11c1cb2126eecc3038" + dependencies: + boom "4.x.x" + cryptiles "3.x.x" + hoek "4.x.x" + sntp "2.x.x" + hoek@2.x.x: version "2.16.3" resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" +hoek@4.x.x: + version "4.2.1" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.1.tgz#9634502aa12c445dd5a7c5734b572bb8738aacbb" + home-or-tmp@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" @@ -1248,6 +1440,12 @@ html-encoding-sniffer@^1.0.1: dependencies: whatwg-encoding "^1.0.1" +html-encoding-sniffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz#e70d84b94da53aa375e11fe3a351be6642ca46f8" + dependencies: + whatwg-encoding "^1.0.1" + http-signature@~1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" @@ -1256,6 +1454,14 @@ http-signature@~1.1.0: jsprim "^1.2.2" sshpk "^1.7.0" +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + husky@0.14.3: version "0.14.3" resolved "https://registry.yarnpkg.com/husky/-/husky-0.14.3.tgz#c69ed74e2d2779769a17ba8399b54ce0b63c12c3" @@ -1268,6 +1474,10 @@ iconv-lite@0.4.13: version "0.4.13" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" +iconv-lite@0.4.19: + version "0.4.19" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" + ignore@^3.3.7: version "3.3.7" resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.7.tgz#612289bfb3c220e186a58118618d5be8c1bab021" @@ -1361,6 +1571,10 @@ is-fullwidth-code-point@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" +is-generator-fn@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-1.0.0.tgz#969d49e1bb3329f6bb7f09089be26578b2ddd46a" + is-glob@^2.0.0, is-glob@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" @@ -1551,6 +1765,22 @@ jest-config@^21.2.1: jest-validate "^21.2.1" pretty-format "^21.2.1" +jest-config@^22.4.0, jest-config@^22.4.2: + version "22.4.2" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-22.4.2.tgz#580ba5819bf81a5e48f4fd470e8b81834f45c855" + dependencies: + chalk "^2.0.1" + glob "^7.1.1" + jest-environment-jsdom "^22.4.1" + jest-environment-node "^22.4.1" + jest-get-type "^22.1.0" + jest-jasmine2 "^22.4.2" + jest-regex-util "^22.1.0" + jest-resolve "^22.4.2" + jest-util "^22.4.1" + jest-validate "^22.4.2" + pretty-format "^22.4.0" + jest-diff@^21.2.1: version "21.2.1" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-21.2.1.tgz#46cccb6cab2d02ce98bc314011764bb95b065b4f" @@ -1560,6 +1790,15 @@ jest-diff@^21.2.1: jest-get-type "^21.2.0" pretty-format "^21.2.1" +jest-diff@^22.4.0: + version "22.4.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-22.4.0.tgz#384c2b78519ca44ca126382df53f134289232525" + dependencies: + chalk "^2.0.1" + diff "^3.2.0" + jest-get-type "^22.1.0" + pretty-format "^22.4.0" + jest-docblock@^21.2.0: version "21.2.0" resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-21.2.0.tgz#51529c3b30d5fd159da60c27ceedc195faf8d414" @@ -1572,6 +1811,14 @@ jest-environment-jsdom@^21.2.1: jest-util "^21.2.1" jsdom "^9.12.0" +jest-environment-jsdom@^22.4.1: + version "22.4.1" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-22.4.1.tgz#754f408872441740100d3917e5ec40c74de6447f" + dependencies: + jest-mock "^22.2.0" + jest-util "^22.4.1" + jsdom "^11.5.1" + jest-environment-node@^21.2.1: version "21.2.1" resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-21.2.1.tgz#98c67df5663c7fbe20f6e792ac2272c740d3b8c8" @@ -1579,10 +1826,21 @@ jest-environment-node@^21.2.1: jest-mock "^21.2.0" jest-util "^21.2.1" +jest-environment-node@^22.4.1: + version "22.4.1" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-22.4.1.tgz#418850eb654596b8d6e36c2021cbedbc23df8e16" + dependencies: + jest-mock "^22.2.0" + jest-util "^22.4.1" + jest-get-type@^21.2.0: version "21.2.0" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-21.2.0.tgz#f6376ab9db4b60d81e39f30749c6c466f40d4a23" +jest-get-type@^22.1.0: + version "22.1.0" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.1.0.tgz#4e90af298ed6181edc85d2da500dbd2753e0d5a9" + jest-haste-map@^21.2.0: version "21.2.0" resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-21.2.0.tgz#1363f0a8bb4338f24f001806571eff7a4b2ff3d8" @@ -1607,6 +1865,22 @@ jest-jasmine2@^21.2.1: jest-snapshot "^21.2.1" p-cancelable "^0.3.0" +jest-jasmine2@^22.4.2: + version "22.4.2" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-22.4.2.tgz#dfd3d259579ed6f52510d8f1ab692808f0d40691" + dependencies: + chalk "^2.0.1" + co "^4.6.0" + expect "^22.4.0" + graceful-fs "^4.1.11" + is-generator-fn "^1.0.0" + jest-diff "^22.4.0" + jest-matcher-utils "^22.4.0" + jest-message-util "^22.4.0" + jest-snapshot "^22.4.0" + jest-util "^22.4.1" + source-map-support "^0.5.0" + jest-matcher-utils@^21.2.1: version "21.2.1" resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-21.2.1.tgz#72c826eaba41a093ac2b4565f865eb8475de0f64" @@ -1615,6 +1889,14 @@ jest-matcher-utils@^21.2.1: jest-get-type "^21.2.0" pretty-format "^21.2.1" +jest-matcher-utils@^22.4.0: + version "22.4.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-22.4.0.tgz#d55f5faf2270462736bdf7c7485ee931c9d4b6a1" + dependencies: + chalk "^2.0.1" + jest-get-type "^22.1.0" + pretty-format "^22.4.0" + jest-message-util@^21.2.1: version "21.2.1" resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-21.2.1.tgz#bfe5d4692c84c827d1dcf41823795558f0a1acbe" @@ -1623,14 +1905,32 @@ jest-message-util@^21.2.1: micromatch "^2.3.11" slash "^1.0.0" +jest-message-util@^22.4.0: + version "22.4.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-22.4.0.tgz#e3d861df16d2fee60cb2bc8feac2188a42579642" + dependencies: + "@babel/code-frame" "^7.0.0-beta.35" + chalk "^2.0.1" + micromatch "^2.3.11" + slash "^1.0.0" + stack-utils "^1.0.1" + jest-mock@^21.2.0: version "21.2.0" resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-21.2.0.tgz#7eb0770e7317968165f61ea2a7281131534b3c0f" +jest-mock@^22.2.0: + version "22.2.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-22.2.0.tgz#444b3f9488a7473adae09bc8a77294afded397a7" + jest-regex-util@^21.2.0: version "21.2.0" resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-21.2.0.tgz#1b1e33e63143babc3e0f2e6c9b5ba1eb34b2d530" +jest-regex-util@^22.1.0: + version "22.1.0" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-22.1.0.tgz#5daf2fe270074b6da63e5d85f1c9acc866768f53" + jest-resolve-dependencies@^21.2.0: version "21.2.0" resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-21.2.0.tgz#9e231e371e1a736a1ad4e4b9a843bc72bfe03d09" @@ -1645,6 +1945,13 @@ jest-resolve@^21.2.0: chalk "^2.0.1" is-builtin-module "^1.0.0" +jest-resolve@^22.4.2: + version "22.4.2" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-22.4.2.tgz#25d88aa4147462c9c1c6a1ba16250d3794c24d00" + dependencies: + browser-resolve "^1.11.2" + chalk "^2.0.1" + jest-runner@^21.2.1: version "21.2.1" resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-21.2.1.tgz#194732e3e518bfb3d7cbfc0fd5871246c7e1a467" @@ -1693,6 +2000,17 @@ jest-snapshot@^21.2.1: natural-compare "^1.4.0" pretty-format "^21.2.1" +jest-snapshot@^22.4.0: + version "22.4.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-22.4.0.tgz#03d3ce63f8fa7352388afc6a3c8b5ccc3a180ed7" + dependencies: + chalk "^2.0.1" + jest-diff "^22.4.0" + jest-matcher-utils "^22.4.0" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + pretty-format "^22.4.0" + jest-util@^21.2.1: version "21.2.1" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-21.2.1.tgz#a274b2f726b0897494d694a6c3d6a61ab819bb78" @@ -1705,6 +2023,18 @@ jest-util@^21.2.1: jest-validate "^21.2.1" mkdirp "^0.5.1" +jest-util@^22.4.1: + version "22.4.1" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-22.4.1.tgz#dd17c3bdb067f8e90591563ec0c42bf847dc249f" + dependencies: + callsites "^2.0.0" + chalk "^2.0.1" + graceful-fs "^4.1.11" + is-ci "^1.0.10" + jest-message-util "^22.4.0" + mkdirp "^0.5.1" + source-map "^0.6.0" + jest-validate@^21.2.1: version "21.2.1" resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-21.2.1.tgz#cc0cbca653cd54937ba4f2a111796774530dd3c7" @@ -1714,6 +2044,16 @@ jest-validate@^21.2.1: leven "^2.1.0" pretty-format "^21.2.1" +jest-validate@^22.4.2: + version "22.4.2" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-22.4.2.tgz#e789a4e056173bf97fe797a2df2d52105c57d4f4" + dependencies: + chalk "^2.0.1" + jest-config "^22.4.2" + jest-get-type "^22.1.0" + leven "^2.1.0" + pretty-format "^22.4.0" + jest@21.2.1: version "21.2.1" resolved "https://registry.yarnpkg.com/jest/-/jest-21.2.1.tgz#c964e0b47383768a1438e3ccf3c3d470327604e1" @@ -1761,6 +2101,37 @@ jsbn@~0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.0.tgz#650987da0dd74f4ebf5a11377a2aa2d273e97dfd" +jsdom@^11.5.1: + version "11.6.2" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.6.2.tgz#25d1ef332d48adf77fc5221fe2619967923f16bb" + dependencies: + abab "^1.0.4" + acorn "^5.3.0" + acorn-globals "^4.1.0" + array-equal "^1.0.0" + browser-process-hrtime "^0.1.2" + content-type-parser "^1.0.2" + cssom ">= 0.3.2 < 0.4.0" + cssstyle ">= 0.2.37 < 0.3.0" + domexception "^1.0.0" + escodegen "^1.9.0" + html-encoding-sniffer "^1.0.2" + left-pad "^1.2.0" + nwmatcher "^1.4.3" + parse5 "4.0.0" + pn "^1.1.0" + request "^2.83.0" + request-promise-native "^1.0.5" + sax "^1.2.4" + symbol-tree "^3.2.2" + tough-cookie "^2.3.3" + w3c-hr-time "^1.0.1" + webidl-conversions "^4.0.2" + whatwg-encoding "^1.0.3" + whatwg-url "^6.4.0" + ws "^4.0.0" + xml-name-validator "^3.0.0" + jsdom@^9.12.0: version "9.12.0" resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-9.12.0.tgz#e8c546fffcb06c00d4833ca84410fed7f8a097d4" @@ -1789,6 +2160,10 @@ jsesc@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" +json-schema-traverse@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" + json-schema@0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" @@ -1880,6 +2255,10 @@ lcov-parse@^0.0.10: version "0.0.10" resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3" +left-pad@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.2.0.tgz#d30a73c6b8201d8f7d8e7956ba9616087a68e0ee" + leven@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" @@ -1921,6 +2300,14 @@ lodash.once@^4.0.0: version "4.1.1" resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" +lodash.sortby@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" + +lodash@^4.13.1: + version "4.17.5" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511" + lodash@^4.14.0, lodash@^4.16.4, lodash@^4.17.4, lodash@^4.2.0: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" @@ -1984,12 +2371,22 @@ mime-db@~1.25.0: version "1.25.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.25.0.tgz#c18dbd7c73a5dbf6f44a024dc0d165a1e7b1c392" +mime-db@~1.33.0: + version "1.33.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" + mime-types@^2.1.12, mime-types@~2.1.7: version "2.1.13" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.13.tgz#e07aaa9c6c6b9a7ca3012c69003ad25a39e92a88" dependencies: mime-db "~1.25.0" +mime-types@~2.1.17: + version "2.1.18" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" + dependencies: + mime-db "~1.33.0" + mimic-fn@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" @@ -2139,7 +2536,11 @@ number-is-nan@^1.0.0: version "1.3.9" resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.3.9.tgz#8bab486ff7fa3dfd086656bbe8b17116d3692d2a" -oauth-sign@~0.8.1: +nwmatcher@^1.4.3: + version "1.4.3" + resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.3.tgz#64348e3b3d80f035b40ac11563d278f8b72db89c" + +oauth-sign@~0.8.1, oauth-sign@~0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" @@ -2244,6 +2645,10 @@ parse-json@^2.2.0: dependencies: error-ex "^1.2.0" +parse5@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" + parse5@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94" @@ -2288,6 +2693,10 @@ performance-now@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + pify@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" @@ -2312,6 +2721,10 @@ pkg-dir@^2.0.0: dependencies: find-up "^2.1.0" +pn@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" + prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" @@ -2331,6 +2744,13 @@ pretty-format@^21.2.1: ansi-regex "^3.0.0" ansi-styles "^3.2.0" +pretty-format@^22.4.0: + version "22.4.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-22.4.0.tgz#237b1f7e1c50ed03bc65c03ccc29d7c8bb7beb94" + dependencies: + ansi-regex "^3.0.0" + ansi-styles "^3.2.0" + pretty-quick@1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/pretty-quick/-/pretty-quick-1.4.1.tgz#9d41f778d2d4d940ec603d1293a0998e84c4722c" @@ -2365,6 +2785,10 @@ punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" +punycode@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d" + qs@~6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.0.tgz#f403b264f23bc01228c74131b407f18d5ea5d442" @@ -2373,6 +2797,10 @@ qs@~6.4.0: version "6.4.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" +qs@~6.5.1: + version "6.5.1" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8" + randomatic@^1.1.3: version "1.1.6" resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.6.tgz#110dcabff397e9dcff7c0789ccc0a49adf1ec5bb" @@ -2493,6 +2921,20 @@ repeating@^2.0.0: dependencies: is-finite "^1.0.0" +request-promise-core@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.1.tgz#3eee00b2c5aa83239cfb04c5700da36f81cd08b6" + dependencies: + lodash "^4.13.1" + +request-promise-native@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.5.tgz#5281770f68e0c9719e5163fd3fab482215f4fda5" + dependencies: + request-promise-core "1.1.1" + stealthy-require "^1.1.0" + tough-cookie ">=2.3.3" + request@2.81.0: version "2.81.0" resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" @@ -2545,6 +2987,33 @@ request@^2.79.0: tunnel-agent "~0.4.1" uuid "^3.0.0" +request@^2.83.0: + version "2.83.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.83.0.tgz#ca0b65da02ed62935887808e6f510381034e3356" + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.6.0" + caseless "~0.12.0" + combined-stream "~1.0.5" + extend "~3.0.1" + forever-agent "~0.6.1" + form-data "~2.3.1" + har-validator "~5.0.3" + hawk "~6.0.2" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.17" + oauth-sign "~0.8.2" + performance-now "^2.1.0" + qs "~6.5.1" + safe-buffer "^5.1.1" + stringstream "~0.0.5" + tough-cookie "~2.3.3" + tunnel-agent "^0.6.0" + uuid "^3.1.0" + require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" @@ -2602,7 +3071,7 @@ safe-buffer@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" -safe-buffer@~5.1.0, safe-buffer@~5.1.1: +safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" @@ -2620,7 +3089,7 @@ sane@^2.0.0: optionalDependencies: fsevents "^1.1.1" -sax@^1.2.1: +sax@^1.2.1, sax@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" @@ -2673,6 +3142,12 @@ sntp@1.x.x: dependencies: hoek "2.x.x" +sntp@2.x.x: + version "2.1.0" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-2.1.0.tgz#2c6cec14fedc2222739caf9b5c3d85d1cc5a2cc8" + dependencies: + hoek "4.x.x" + source-map-support@^0.4.2: version "0.4.6" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.6.tgz#32552aa64b458392a85eab3b0b5ee61527167aeb" @@ -2695,7 +3170,7 @@ source-map@^0.5.0, source-map@^0.5.3, source-map@~0.5.1: version "0.5.6" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" -source-map@^0.6.0: +source-map@^0.6.0, source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" @@ -2738,6 +3213,14 @@ sshpk@^1.7.0: jsbn "~0.1.0" tweetnacl "~0.14.0" +stack-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.1.tgz#d4f33ab54e8e38778b0ca5cfd3b3afb12db68620" + +stealthy-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" + string-length@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed" @@ -2760,13 +3243,20 @@ string-width@^2.0.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" +string-width@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + string_decoder@~1.0.0, string_decoder@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" dependencies: safe-buffer "~5.1.0" -stringstream@~0.0.4: +stringstream@~0.0.4, stringstream@~0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" @@ -2826,7 +3316,13 @@ supports-color@^4.0.0: dependencies: has-flag "^2.0.0" -symbol-tree@^3.2.1: +supports-color@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.2.0.tgz#b0d5333b1184dd3666cbe5aa0b45c5ac7ac17a4a" + dependencies: + has-flag "^3.0.0" + +symbol-tree@^3.2.1, symbol-tree@^3.2.2: version "3.2.2" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" @@ -2879,12 +3375,24 @@ topo@1.x.x: dependencies: hoek "2.x.x" +tough-cookie@>=2.3.3, tough-cookie@^2.3.3, tough-cookie@~2.3.3: + version "2.3.4" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655" + dependencies: + punycode "^1.4.1" + tough-cookie@^2.3.2, tough-cookie@~2.3.0: version "2.3.2" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" dependencies: punycode "^1.4.1" +tr46@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" + dependencies: + punycode "^2.1.0" + tr46@~0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" @@ -2893,20 +3401,19 @@ trim-right@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" -ts-jest@21.2.4: - version "21.2.4" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-21.2.4.tgz#8fbcfbfbf0c58cced10dcc34a5190acc8c5312ef" +ts-jest@22.4.0: + version "22.4.0" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-22.4.0.tgz#c9d3f9565696e0ad17e658eee96e06822af96bb9" dependencies: babel-core "^6.24.1" babel-plugin-istanbul "^4.1.4" babel-plugin-transform-es2015-modules-commonjs "^6.24.1" - babel-preset-jest "^21.2.0" + babel-preset-jest "^22.4.0" cpx "^1.5.0" - fs-extra "^4.0.2" - jest-config "^21.2.1" + fs-extra "4.0.3" + jest-config "^22.4.0" pkg-dir "^2.0.0" - source-map-support "^0.5.0" - yargs "^10.0.3" + yargs "^11.0.0" tslib@^1.0.0, tslib@^1.7.1: version "1.7.1" @@ -3012,6 +3519,10 @@ uuid@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" +uuid@^3.1.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14" + validate-npm-package-license@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" @@ -3025,6 +3536,12 @@ verror@1.3.6: dependencies: extsprintf "1.0.2" +w3c-hr-time@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz#82ac2bff63d950ea9e3189a58a65625fedf19045" + dependencies: + browser-process-hrtime "^0.1.2" + walker@~1.0.5: version "1.0.7" resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" @@ -3046,12 +3563,22 @@ webidl-conversions@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.1.tgz#8015a17ab83e7e1b311638486ace81da6ce206a0" +webidl-conversions@^4.0.1, webidl-conversions@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" + whatwg-encoding@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.1.tgz#3c6c451a198ee7aec55b1ec61d0920c67801a5f4" dependencies: iconv-lite "0.4.13" +whatwg-encoding@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.3.tgz#57c235bc8657e914d24e1a397d3c82daee0a6ba3" + dependencies: + iconv-lite "0.4.19" + whatwg-url@^4.3.0: version "4.8.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-4.8.0.tgz#d2981aa9148c1e00a41c5a6131166ab4683bbcc0" @@ -3059,6 +3586,14 @@ whatwg-url@^4.3.0: tr46 "~0.0.3" webidl-conversions "^3.0.0" +whatwg-url@^6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.4.0.tgz#08fdf2b9e872783a7a1f6216260a1d66cc722e08" + dependencies: + lodash.sortby "^4.7.0" + tr46 "^1.0.0" + webidl-conversions "^4.0.1" + which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" @@ -3117,10 +3652,21 @@ write-file-atomic@^2.1.0: imurmurhash "^0.1.4" signal-exit "^3.0.2" +ws@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-4.1.0.tgz#a979b5d7d4da68bf54efe0408967c324869a7289" + dependencies: + async-limiter "~1.0.0" + safe-buffer "~5.1.0" + xml-name-validator@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635" +xml-name-validator@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" + xtend@^4.0.0, xtend@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" @@ -3139,17 +3685,17 @@ yargs-parser@^7.0.0: dependencies: camelcase "^4.1.0" -yargs-parser@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-8.0.0.tgz#21d476330e5a82279a4b881345bf066102e219c6" +yargs-parser@^9.0.2: + version "9.0.2" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077" dependencies: camelcase "^4.1.0" -yargs@^10.0.3: - version "10.0.3" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-10.0.3.tgz#6542debd9080ad517ec5048fb454efe9e4d4aaae" +yargs@^11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.0.0.tgz#c052931006c5eee74610e5fc0354bedfd08a201b" dependencies: - cliui "^3.2.0" + cliui "^4.0.0" decamelize "^1.1.1" find-up "^2.1.0" get-caller-file "^1.0.1" @@ -3160,7 +3706,7 @@ yargs@^10.0.3: string-width "^2.0.0" which-module "^2.0.0" y18n "^3.2.1" - yargs-parser "^8.0.0" + yargs-parser "^9.0.2" yargs@^9.0.0: version "9.0.1" From 1d2c180a6ea824edfc8eb2372f257b797ebad6e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Pradel?= Date: Thu, 1 Mar 2018 16:29:47 +0100 Subject: [PATCH 088/128] Merge pull request #40 from accounts-js/renovate/prettier-1.x Update dependency prettier to v1.11.1 --- packages/accounts-mongo/README.md | 20 ++++++++++---------- packages/accounts-mongo/package.json | 2 +- packages/accounts-mongo/yarn.lock | 6 +++--- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/accounts-mongo/README.md b/packages/accounts-mongo/README.md index 58afa19fa..c2290c08c 100644 --- a/packages/accounts-mongo/README.md +++ b/packages/accounts-mongo/README.md @@ -38,13 +38,13 @@ The users will be saved under the `users` collection. ## Options -| Property | Type | Default | Description | -| ------------------------------- | :--------------------: | :-----------------------------------------------------: | ------------------------------------------------------------ | -| collectionName | String | users | The users collection name. | -| sessionCollectionName | String | sessions | The sessions collection name. | -| timestamps | Object | `{ createdAt: 'createdAt', updatedAt: 'updatedAt' }` | The timestamps for the users and sessions collection. | -| convertUserIdToMongoObjectId | Boolean | true | Should the user collection use _id as string or ObjectId. | -| convertSessionIdToMongoObjectId | Boolean | true | Should the session collection use _id as string or ObjectId. | -| caseSensitiveUserName | Boolean | true | Perform case intensitive query for user name. | -| idProvider | Function | | Function that generate the id for new objects. | -| dateProvider | `(date?: Date) => any` | `(date?: Date) => (date ? date.getTime() : Date.now())` | Function that generate the date for the timestamps. | +| Property | Type | Default | Description | +| ------------------------------- | :--------------------: | :-----------------------------------------------------: | ------------------------------------------------------------- | +| collectionName | String | users | The users collection name. | +| sessionCollectionName | String | sessions | The sessions collection name. | +| timestamps | Object | `{ createdAt: 'createdAt', updatedAt: 'updatedAt' }` | The timestamps for the users and sessions collection. | +| convertUserIdToMongoObjectId | Boolean | true | Should the user collection use \_id as string or ObjectId. | +| convertSessionIdToMongoObjectId | Boolean | true | Should the session collection use \_id as string or ObjectId. | +| caseSensitiveUserName | Boolean | true | Perform case intensitive query for user name. | +| idProvider | Function | | Function that generate the id for new objects. | +| dateProvider | `(date?: Date) => any` | `(date?: Date) => (date ? date.getTime() : Date.now())` | Function that generate the date for the timestamps. | diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 9b83cbfbd..566f8b7e9 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -59,7 +59,7 @@ "coveralls": "3.0.0", "husky": "0.14.3", "jest": "21.2.1", - "prettier": "1.8.2", + "prettier": "1.11.1", "pretty-quick": "1.4.1", "ts-jest": "22.4.0", "tslint": "5.9.1", diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index 1b10db11d..18c884f2a 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -2733,9 +2733,9 @@ preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" -prettier@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.8.2.tgz#bff83e7fd573933c607875e5ba3abbdffb96aeb8" +prettier@1.11.1: + version "1.11.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.11.1.tgz#61e43fc4cd44e68f2b0dfc2c38cd4bb0fccdcc75" pretty-format@^21.2.1: version "21.2.1" From eb774780b89b12d2c94c0736e56c08ce5aa93218 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Pradel?= Date: Thu, 1 Mar 2018 16:32:48 +0100 Subject: [PATCH 089/128] Merge pull request #46 from accounts-js/renovate/jest-monorepo Update dependency jest to v22 --- packages/accounts-mongo/package.json | 1 + packages/accounts-mongo/yarn.lock | 199 +++++++++++++-------------- 2 files changed, 96 insertions(+), 104 deletions(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 566f8b7e9..652481337 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -58,6 +58,7 @@ "codecov": "3.0.0", "coveralls": "3.0.0", "husky": "0.14.3", + "jest": "22.4.2", "jest": "21.2.1", "prettier": "1.11.1", "pretty-quick": "1.4.1", diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index 18c884f2a..01a0da758 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -75,11 +75,7 @@ version "8.9.4" resolved "https://registry.yarnpkg.com/@types/node/-/node-8.9.4.tgz#dfd327582a06c114eb6e0441fa3d6fab35edad48" -abab@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.3.tgz#b81de5f7274ec4e756d797cd834f303642724e5d" - -abab@^1.0.4: +abab@^1.0.3, abab@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz#5faad9c2c07f60dd76770f71cf025b62a63cfd4e" @@ -362,7 +358,15 @@ babel-messages@^6.23.0: dependencies: babel-runtime "^6.22.0" -babel-plugin-istanbul@^4.0.0, babel-plugin-istanbul@^4.1.4: +babel-plugin-istanbul@^4.0.0: + version "4.1.5" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.5.tgz#6760cdd977f411d3e175bb064f2bc327d99b2b6e" + dependencies: + find-up "^2.1.0" + istanbul-lib-instrument "^1.7.5" + test-exclude "^4.1.1" + +babel-plugin-istanbul@^4.1.4: version "4.1.4" resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.4.tgz#18dde84bf3ce329fddf3f4103fae921456d8e587" dependencies: @@ -524,6 +528,10 @@ babylon@^6.17.2, babylon@^6.17.4: version "6.17.4" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.17.4.tgz#3e8b7402b88d22c3423e137a1577883b15ff869a" +babylon@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + balanced-match@^0.4.1: version "0.4.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" @@ -780,11 +788,7 @@ console-control-strings@^1.0.0, console-control-strings@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" -content-type-parser@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.1.tgz#c3e56988c53c65127fb46d4032a3a900246fdc94" - -content-type-parser@^1.0.2: +content-type-parser@^1.0.1, content-type-parser@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.2.tgz#caabe80623e63638b2502fd4c7f12ff4ce2352e7" @@ -887,9 +891,9 @@ debug@^2.1.1, debug@^2.2.0: dependencies: ms "0.7.1" -debug@^2.6.3: - version "2.6.8" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" +debug@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" dependencies: ms "2.0.0" @@ -963,11 +967,11 @@ ecdsa-sig-formatter@1.0.9: base64url "^2.0.0" safe-buffer "^5.0.1" -errno@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" +errno@~0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" dependencies: - prr "~0.0.0" + prr "~1.0.1" error-ex@^1.2.0: version "1.3.0" @@ -983,18 +987,7 @@ escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" -escodegen@^1.6.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" - dependencies: - esprima "^2.7.1" - estraverse "^1.9.1" - esutils "^2.0.2" - optionator "^0.8.1" - optionalDependencies: - source-map "~0.2.0" - -escodegen@^1.9.0: +escodegen@^1.6.1, escodegen@^1.9.0: version "1.9.1" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.9.1.tgz#dbae17ef96c8e4bedb1356f4504fa4cc2f7cb7e2" dependencies: @@ -1005,10 +998,6 @@ escodegen@^1.9.0: optionalDependencies: source-map "~0.6.1" -esprima@^2.7.1: - version "2.7.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" - esprima@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" @@ -1017,10 +1006,6 @@ esprima@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" -estraverse@^1.9.1: - version "1.9.3" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" - estraverse@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" @@ -1434,13 +1419,7 @@ hosted-git-info@^2.1.4: version "2.1.5" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.1.5.tgz#0ba81d90da2e25ab34a332e6ec77936e1598118b" -html-encoding-sniffer@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.1.tgz#79bf7a785ea495fe66165e734153f363ff5437da" - dependencies: - whatwg-encoding "^1.0.1" - -html-encoding-sniffer@^1.0.2: +html-encoding-sniffer@^1.0.1, html-encoding-sniffer@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz#e70d84b94da53aa375e11fe3a351be6642ca46f8" dependencies: @@ -1647,32 +1626,48 @@ isstream@~0.1.2: resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" istanbul-api@^1.1.1: - version "1.1.10" - resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.1.10.tgz#f27e5e7125c8de13f6a80661af78f512e5439b2b" + version "1.2.2" + resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.2.2.tgz#e17cd519dd5ec4141197f246fdf380b75487f3b1" dependencies: async "^2.1.4" fileset "^2.0.2" - istanbul-lib-coverage "^1.1.1" - istanbul-lib-hook "^1.0.7" - istanbul-lib-instrument "^1.7.3" - istanbul-lib-report "^1.1.1" - istanbul-lib-source-maps "^1.2.1" - istanbul-reports "^1.1.1" + istanbul-lib-coverage "^1.1.2" + istanbul-lib-hook "^1.1.0" + istanbul-lib-instrument "^1.9.2" + istanbul-lib-report "^1.1.3" + istanbul-lib-source-maps "^1.2.3" + istanbul-reports "^1.1.4" js-yaml "^3.7.0" mkdirp "^0.5.1" once "^1.4.0" -istanbul-lib-coverage@^1.0.1, istanbul-lib-coverage@^1.1.1: +istanbul-lib-coverage@^1.0.1, istanbul-lib-coverage@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.2.tgz#4113c8ff6b7a40a1ef7350b01016331f63afde14" + +istanbul-lib-coverage@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz#73bfb998885299415c93d38a3e9adf784a77a9da" -istanbul-lib-hook@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.0.7.tgz#dd6607f03076578fe7d6f2a630cf143b49bacddc" +istanbul-lib-hook@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.1.0.tgz#8538d970372cb3716d53e55523dd54b557a8d89b" dependencies: append-transform "^0.4.0" -istanbul-lib-instrument@^1.4.2, istanbul-lib-instrument@^1.7.2, istanbul-lib-instrument@^1.7.3: +istanbul-lib-instrument@^1.4.2, istanbul-lib-instrument@^1.7.5, istanbul-lib-instrument@^1.9.2: + version "1.9.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.9.2.tgz#84905bf47f7e0b401d6b840da7bad67086b4aab6" + dependencies: + babel-generator "^6.18.0" + babel-template "^6.16.0" + babel-traverse "^6.18.0" + babel-types "^6.18.0" + babylon "^6.18.0" + istanbul-lib-coverage "^1.1.2" + semver "^5.3.0" + +istanbul-lib-instrument@^1.7.2: version "1.7.3" resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.7.3.tgz#925b239163eabdd68cc4048f52c2fa4f899ecfa7" dependencies: @@ -1684,28 +1679,28 @@ istanbul-lib-instrument@^1.4.2, istanbul-lib-instrument@^1.7.2, istanbul-lib-ins istanbul-lib-coverage "^1.1.1" semver "^5.3.0" -istanbul-lib-report@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.1.tgz#f0e55f56655ffa34222080b7a0cd4760e1405fc9" +istanbul-lib-report@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.3.tgz#2df12188c0fa77990c0d2176d2d0ba3394188259" dependencies: - istanbul-lib-coverage "^1.1.1" + istanbul-lib-coverage "^1.1.2" mkdirp "^0.5.1" path-parse "^1.0.5" supports-color "^3.1.2" -istanbul-lib-source-maps@^1.1.0, istanbul-lib-source-maps@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.1.tgz#a6fe1acba8ce08eebc638e572e294d267008aa0c" +istanbul-lib-source-maps@^1.1.0, istanbul-lib-source-maps@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.3.tgz#20fb54b14e14b3fb6edb6aca3571fd2143db44e6" dependencies: - debug "^2.6.3" - istanbul-lib-coverage "^1.1.1" + debug "^3.1.0" + istanbul-lib-coverage "^1.1.2" mkdirp "^0.5.1" rimraf "^2.6.1" source-map "^0.5.3" -istanbul-reports@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.1.1.tgz#042be5c89e175bc3f86523caab29c014e77fee4e" +istanbul-reports@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.1.4.tgz#5ccba5e22b7b5a5d91d5e0a830f89be334bf97bd" dependencies: handlebars "^4.0.3" @@ -2465,13 +2460,13 @@ node-int64@^0.4.0: resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" node-notifier@^5.0.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.1.2.tgz#2fa9e12605fa10009d44549d6fcd8a63dde0e4ff" + version "5.2.1" + resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.2.1.tgz#fa313dd08f5517db0e2502e5758d664ac69f9dea" dependencies: growly "^1.3.0" - semver "^5.3.0" - shellwords "^0.1.0" - which "^1.2.12" + semver "^5.4.1" + shellwords "^0.1.1" + which "^1.3.0" node-pre-gyp@^0.6.36, node-pre-gyp@^0.6.39: version "0.6.39" @@ -2532,11 +2527,7 @@ number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" -"nwmatcher@>= 1.3.9 < 2.0.0": - version "1.3.9" - resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.3.9.tgz#8bab486ff7fa3dfd086656bbe8b17116d3692d2a" - -nwmatcher@^1.4.3: +"nwmatcher@>= 1.3.9 < 2.0.0", nwmatcher@^1.4.3: version "1.4.3" resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.3.tgz#64348e3b3d80f035b40ac11563d278f8b72db89c" @@ -2773,9 +2764,9 @@ process-nextick-args@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" -prr@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" +prr@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" pseudomap@^1.0.2: version "1.0.2" @@ -3097,6 +3088,10 @@ sax@^1.2.1, sax@^1.2.4: version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" +semver@^5.4.1: + version "5.5.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" + set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -3124,9 +3119,9 @@ shell-quote@^1.6.1: array-reduce "~0.0.0" jsonify "~0.0.0" -shellwords@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.0.tgz#66afd47b6a12932d9071cbfd98a52e785cd0ba14" +shellwords@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" @@ -3174,12 +3169,6 @@ source-map@^0.6.0, source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" -source-map@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" - dependencies: - amdefine ">=0.0.4" - spdx-correct@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" @@ -3375,13 +3364,13 @@ topo@1.x.x: dependencies: hoek "2.x.x" -tough-cookie@>=2.3.3, tough-cookie@^2.3.3, tough-cookie@~2.3.3: +tough-cookie@>=2.3.3, tough-cookie@^2.3.2, tough-cookie@^2.3.3, tough-cookie@~2.3.3: version "2.3.4" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655" dependencies: punycode "^1.4.1" -tough-cookie@^2.3.2, tough-cookie@~2.3.0: +tough-cookie@~2.3.0: version "2.3.2" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" dependencies: @@ -3559,11 +3548,7 @@ webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" -webidl-conversions@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.1.tgz#8015a17ab83e7e1b311638486ace81da6ce206a0" - -webidl-conversions@^4.0.1, webidl-conversions@^4.0.2: +webidl-conversions@^4.0.0, webidl-conversions@^4.0.1, webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" @@ -3604,6 +3589,12 @@ which@^1.2.12, which@^1.2.9: dependencies: isexe "^2.0.0" +which@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" + dependencies: + isexe "^2.0.0" + wide-align@^1.1.0: version "1.1.2" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710" @@ -3627,11 +3618,11 @@ wordwrap@~1.0.0: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" worker-farm@^1.3.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.4.1.tgz#a438bc993a7a7d133bcb6547c95eca7cff4897d8" + version "1.5.4" + resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.5.4.tgz#4debbe46b40edefcc717ebde74a90b1ae1e909a1" dependencies: - errno "^0.1.4" - xtend "^4.0.1" + errno "~0.1.7" + xtend "~4.0.1" wrap-ansi@^2.0.0: version "2.1.0" @@ -3667,7 +3658,7 @@ xml-name-validator@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" -xtend@^4.0.0, xtend@^4.0.1: +xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" From a81517ede7e3d93433558875ac15eb3a5d37e67f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Pradel?= Date: Thu, 1 Mar 2018 16:49:11 +0100 Subject: [PATCH 090/128] Merge pull request #47 from accounts-js/renovate/mongodb-3.x Update dependency mongodb to ^3.0.0 --- packages/accounts-mongo/__tests__/index.ts | 17 +++---- packages/accounts-mongo/package.json | 6 +-- packages/accounts-mongo/src/mongo.ts | 17 ++++--- packages/accounts-mongo/yarn.lock | 54 +++++++--------------- 4 files changed, 38 insertions(+), 56 deletions(-) diff --git a/packages/accounts-mongo/__tests__/index.ts b/packages/accounts-mongo/__tests__/index.ts index 225df0c46..446648571 100644 --- a/packages/accounts-mongo/__tests__/index.ts +++ b/packages/accounts-mongo/__tests__/index.ts @@ -4,7 +4,8 @@ import { ObjectID } from 'mongodb'; import Mongo from '../src'; let mongo; -let db; +let db: mongodb.Db; +let client: mongodb.MongoClient; const user = { username: 'johndoe', email: 'john@doe.com', @@ -27,9 +28,10 @@ function dropDatabase(cb) { } function createConnection(cb) { - const url = 'mongodb://localhost:27017/accounts-mongo-tests'; - mongodb.MongoClient.connect(url, (err, dbArg) => { - db = dbArg; + const url = 'mongodb://localhost:27017'; + mongodb.MongoClient.connect(url, (err, clientMongo) => { + client = clientMongo; + db = client.db('accounts-mongo-tests'); mongo = new Mongo(db); if (err) { return cb(err); @@ -41,11 +43,11 @@ function createConnection(cb) { } function closeConnection(cb) { - dropDatabase(err => { - db.close(); + dropDatabase(async err => { if (err) { return cb(err); } + await client.close(); return cb(); }); } @@ -56,6 +58,7 @@ function delay(time) { describe('Mongo', () => { beforeAll(createConnection); + afterAll(closeConnection); describe('toMongoID', () => { it('should not throw when mongo id is valid', () => { @@ -743,6 +746,4 @@ describe('Mongo', () => { expect(retUser.createdAt).not.toEqual(retUser.updatedAt); }); }); - - afterAll(closeConnection); }); diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 652481337..8fad23a30 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -8,7 +8,7 @@ "start": "tsc --watch", "compile": "tsc", "test": "yarn lint && yarn coverage && yarn prettier-diff", - "testonly": "jest", + "testonly": "jest --forceExit", "lint": "tslint -c tslint.json '{src,__tests__}/**/*.ts'", "prettier": "prettier '{src,__tests__}/**/*.ts' 'README.md'", "prettier-diff": "yarn prettier --list-different", @@ -53,7 +53,7 @@ "@accounts/tslint-config-accounts": "0.0.6", "@types/jest": "22.1.4", "@types/lodash": "4.14.104", - "@types/mongodb": "2.2.20", + "@types/mongodb": "3.0.5", "@types/node": "8.9.4", "codecov": "3.0.0", "coveralls": "3.0.0", @@ -72,6 +72,6 @@ }, "dependencies": { "lodash": "^4.17.4", - "mongodb": "^2.2.33" + "mongodb": "^3.0.0" } } diff --git a/packages/accounts-mongo/src/mongo.ts b/packages/accounts-mongo/src/mongo.ts index ff0284359..ebbad1fa7 100644 --- a/packages/accounts-mongo/src/mongo.ts +++ b/packages/accounts-mongo/src/mongo.ts @@ -1,4 +1,4 @@ -import { ObjectID } from 'mongodb'; +import { ObjectID, Db, Collection } from 'mongodb'; import { get } from 'lodash'; import { CreateUserType, UserObjectType, SessionType } from '@accounts/common'; import { DBInterface } from '@accounts/server'; @@ -67,11 +67,11 @@ export class Mongo implements DBInterface { // Options of Mongo class private options: MongoOptionsType; // Db object - private db: any; + private db: Db; // Account collection - private collection: any; + private collection: Collection; // Session collection - private sessionCollection: any; + private sessionCollection: Collection; constructor(db: any, options?: MongoOptionsType) { this.options = { ...defaultOptions, ...options }; @@ -86,10 +86,13 @@ export class Mongo implements DBInterface { } public async setupIndexes(): Promise { - await this.collection.createIndex('username', { unique: 1, sparse: 1 }); + await this.collection.createIndex('username', { + unique: true, + sparse: true, + }); await this.collection.createIndex('emails.address', { - unique: 1, - sparse: 1, + unique: true, + sparse: true, }); } diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index 01a0da758..ea562ea5d 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -59,9 +59,9 @@ version "4.14.104" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.104.tgz#53ee2357fa2e6e68379341d92eb2ecea4b11bb80" -"@types/mongodb@2.2.20": - version "2.2.20" - resolved "https://registry.yarnpkg.com/@types/mongodb/-/mongodb-2.2.20.tgz#0500eecff6b667f3ad52c94525742de882c65260" +"@types/mongodb@3.0.5": + version "3.0.5" + resolved "https://registry.yarnpkg.com/@types/mongodb/-/mongodb-3.0.5.tgz#0143e0838a8260c7312773457f4d2ea1465ccada" dependencies: "@types/bson" "*" "@types/events" "*" @@ -628,10 +628,6 @@ buffer-equal-constant-time@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" -buffer-shims@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" - builtin-modules@^1.0.0, builtin-modules@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" @@ -979,10 +975,6 @@ error-ex@^1.2.0: dependencies: is-arrayish "^0.2.1" -es6-promise@3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.2.1.tgz#ec56233868032909207170c39448e24449dd1fc4" - escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -1472,7 +1464,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: +inherits@2, inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" @@ -2420,20 +2412,18 @@ moment@2.x.x: version "2.11.2" resolved "https://registry.yarnpkg.com/moment/-/moment-2.11.2.tgz#87968e5f95ac038c2e42ac959c75819cd3f52901" -mongodb-core@2.1.17: - version "2.1.17" - resolved "https://registry.yarnpkg.com/mongodb-core/-/mongodb-core-2.1.17.tgz#a418b337a14a14990fb510b923dee6a813173df8" +mongodb-core@3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/mongodb-core/-/mongodb-core-3.0.3.tgz#496d7dd0052dc3a2e213edf9ddcddc78b47a712c" dependencies: bson "~1.0.4" - require_optional "~1.0.0" + require_optional "^1.0.1" -mongodb@^2.2.33: - version "2.2.33" - resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-2.2.33.tgz#b537c471d34a6651b48f36fdbf29750340e08b50" +mongodb@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-3.0.3.tgz#83b33e01f26b4a2e1f8a2b3427cabbaee31df017" dependencies: - es6-promise "3.2.1" - mongodb-core "2.1.17" - readable-stream "2.2.7" + mongodb-core "3.0.3" mri@^1.1.0: version "1.1.0" @@ -2838,18 +2828,6 @@ read-pkg@^2.0.0: normalize-package-data "^2.3.2" path-type "^2.0.0" -readable-stream@2.2.7: - version "2.2.7" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.7.tgz#07057acbe2467b22042d36f98c5ad507054e95b1" - dependencies: - buffer-shims "~1.0.0" - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "~1.0.0" - process-nextick-args "~1.0.6" - string_decoder "~1.0.0" - util-deprecate "~1.0.1" - readable-stream@^2.0.2: version "2.3.4" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.4.tgz#c946c3f47fa7d8eabc0b6150f4a12f69a4574071" @@ -3013,9 +2991,9 @@ require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" -require_optional@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/require_optional/-/require_optional-1.0.0.tgz#52a86137a849728eb60a55533617f8f914f59abf" +require_optional@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require_optional/-/require_optional-1.0.1.tgz#4cf35a4247f64ca3df8c2ef208cc494b1ca8fc2e" dependencies: resolve-from "^2.0.0" semver "^5.1.0" @@ -3239,7 +3217,7 @@ string-width@^2.1.1: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" -string_decoder@~1.0.0, string_decoder@~1.0.3: +string_decoder@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" dependencies: From 47aa8b5ce3a20b8d12d1ea092ae5939a1f893225 Mon Sep 17 00:00:00 2001 From: pradel Date: Thu, 1 Mar 2018 16:51:16 +0100 Subject: [PATCH 091/128] README mongodb 3.x example --- packages/accounts-mongo/README.md | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/packages/accounts-mongo/README.md b/packages/accounts-mongo/README.md index c2290c08c..510a2b139 100644 --- a/packages/accounts-mongo/README.md +++ b/packages/accounts-mongo/README.md @@ -27,9 +27,13 @@ import MongoDBInterface from '@accounts/mongo'; mongoose.connect(process.env.MONGO_URL); const db = mongoose.connection; -// If you are using mongodb +// If you are using mongodb 2.x const db = await mongodb.MongoClient.connect(process.env.MONGO_URL); +// If you are using mongodb 3.x +const client = await mongodb.MongoClient.connect(process.env.MONGO_URL); +const db = client.db('my-db-name'); + AccountsServer.config({ }, new MongoDBInterface(db)); ``` @@ -38,13 +42,13 @@ The users will be saved under the `users` collection. ## Options -| Property | Type | Default | Description | -| ------------------------------- | :--------------------: | :-----------------------------------------------------: | ------------------------------------------------------------- | -| collectionName | String | users | The users collection name. | -| sessionCollectionName | String | sessions | The sessions collection name. | -| timestamps | Object | `{ createdAt: 'createdAt', updatedAt: 'updatedAt' }` | The timestamps for the users and sessions collection. | -| convertUserIdToMongoObjectId | Boolean | true | Should the user collection use \_id as string or ObjectId. | -| convertSessionIdToMongoObjectId | Boolean | true | Should the session collection use \_id as string or ObjectId. | -| caseSensitiveUserName | Boolean | true | Perform case intensitive query for user name. | -| idProvider | Function | | Function that generate the id for new objects. | -| dateProvider | `(date?: Date) => any` | `(date?: Date) => (date ? date.getTime() : Date.now())` | Function that generate the date for the timestamps. | +| Property | Type | Default | Description | +| ------------------------------- | :--------------------: | :-----------------------------------------------------: | ------------------------------------------------------------ | +| collectionName | String | users | The users collection name. | +| sessionCollectionName | String | sessions | The sessions collection name. | +| timestamps | Object | `{ createdAt: 'createdAt', updatedAt: 'updatedAt' }` | The timestamps for the users and sessions collection. | +| convertUserIdToMongoObjectId | Boolean | true | Should the user collection use _id as string or ObjectId. | +| convertSessionIdToMongoObjectId | Boolean | true | Should the session collection use _id as string or ObjectId. | +| caseSensitiveUserName | Boolean | true | Perform case intensitive query for user name. | +| idProvider | Function | | Function that generate the id for new objects. | +| dateProvider | `(date?: Date) => any` | `(date?: Date) => (date ? date.getTime() : Date.now())` | Function that generate the date for the timestamps. | From f24a93c9986a9b5c9ecea67de69ce37fc763fbe0 Mon Sep 17 00:00:00 2001 From: pradel Date: Thu, 1 Mar 2018 16:51:49 +0100 Subject: [PATCH 092/128] REAME update --- packages/accounts-mongo/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/accounts-mongo/README.md b/packages/accounts-mongo/README.md index 510a2b139..d14491932 100644 --- a/packages/accounts-mongo/README.md +++ b/packages/accounts-mongo/README.md @@ -28,10 +28,10 @@ mongoose.connect(process.env.MONGO_URL); const db = mongoose.connection; // If you are using mongodb 2.x -const db = await mongodb.MongoClient.connect(process.env.MONGO_URL); +const db = await mongodb.MongoClient.connect(process.env.MONGO_URL); // If you are using mongodb 3.x -const client = await mongodb.MongoClient.connect(process.env.MONGO_URL); +const client = await mongodb.MongoClient.connect(process.env.MONGO_URL); const db = client.db('my-db-name'); AccountsServer.config({ From 71f26f44659a3e38a6a0dc7fb9316aa46290d803 Mon Sep 17 00:00:00 2001 From: pradel Date: Thu, 1 Mar 2018 16:53:35 +0100 Subject: [PATCH 093/128] README example with latest server --- packages/accounts-mongo/README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/accounts-mongo/README.md b/packages/accounts-mongo/README.md index d14491932..1a054257a 100644 --- a/packages/accounts-mongo/README.md +++ b/packages/accounts-mongo/README.md @@ -20,8 +20,8 @@ yarn add @accounts/mongo ## Usage ```javascript -import AccountsServer from '@accounts/server'; -import MongoDBInterface from '@accounts/mongo'; +import { AccountsServer } from '@accounts/server'; +import { Mongo } from '@accounts/mongo'; // If you are using mongoose mongoose.connect(process.env.MONGO_URL); @@ -34,8 +34,7 @@ const db = await mongodb.MongoClient.connect(process.env.MONGO_URL); const client = await mongodb.MongoClient.connect(process.env.MONGO_URL); const db = client.db('my-db-name'); -AccountsServer.config({ -}, new MongoDBInterface(db)); +const accountsServer = new AccountsServer({ db: new MongoDBInterface(db) }); ``` The users will be saved under the `users` collection. From 0e9f597cf3d76c82129ed6fce6fdd6eb01d55ba4 Mon Sep 17 00:00:00 2001 From: pradel Date: Thu, 1 Mar 2018 16:54:16 +0100 Subject: [PATCH 094/128] pretttier --- packages/accounts-mongo/README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/accounts-mongo/README.md b/packages/accounts-mongo/README.md index 1a054257a..41f39353e 100644 --- a/packages/accounts-mongo/README.md +++ b/packages/accounts-mongo/README.md @@ -41,13 +41,13 @@ The users will be saved under the `users` collection. ## Options -| Property | Type | Default | Description | -| ------------------------------- | :--------------------: | :-----------------------------------------------------: | ------------------------------------------------------------ | -| collectionName | String | users | The users collection name. | -| sessionCollectionName | String | sessions | The sessions collection name. | -| timestamps | Object | `{ createdAt: 'createdAt', updatedAt: 'updatedAt' }` | The timestamps for the users and sessions collection. | -| convertUserIdToMongoObjectId | Boolean | true | Should the user collection use _id as string or ObjectId. | -| convertSessionIdToMongoObjectId | Boolean | true | Should the session collection use _id as string or ObjectId. | -| caseSensitiveUserName | Boolean | true | Perform case intensitive query for user name. | -| idProvider | Function | | Function that generate the id for new objects. | -| dateProvider | `(date?: Date) => any` | `(date?: Date) => (date ? date.getTime() : Date.now())` | Function that generate the date for the timestamps. | +| Property | Type | Default | Description | +| ------------------------------- | :--------------------: | :-----------------------------------------------------: | ------------------------------------------------------------- | +| collectionName | String | users | The users collection name. | +| sessionCollectionName | String | sessions | The sessions collection name. | +| timestamps | Object | `{ createdAt: 'createdAt', updatedAt: 'updatedAt' }` | The timestamps for the users and sessions collection. | +| convertUserIdToMongoObjectId | Boolean | true | Should the user collection use \_id as string or ObjectId. | +| convertSessionIdToMongoObjectId | Boolean | true | Should the session collection use \_id as string or ObjectId. | +| caseSensitiveUserName | Boolean | true | Perform case intensitive query for user name. | +| idProvider | Function | | Function that generate the id for new objects. | +| dateProvider | `(date?: Date) => any` | `(date?: Date) => (date ? date.getTime() : Date.now())` | Function that generate the date for the timestamps. | From 1c3a29b6eb22da89a9456e92e8762f90e22c5811 Mon Sep 17 00:00:00 2001 From: pradel Date: Thu, 1 Mar 2018 16:56:04 +0100 Subject: [PATCH 095/128] 0.1.0-beta.2 --- packages/accounts-mongo/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 8fad23a30..785f446ac 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -1,6 +1,6 @@ { "name": "@accounts/mongo", - "version": "0.1.0-beta.1", + "version": "0.1.0-beta.2", "description": "MongoDB adaptor for accounts", "main": "lib/index.js", "typings": "lib/index.d.ts", From ff5318953198400ba3fc011b50c3b7c7f6ad97f2 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 2 Mar 2018 12:45:40 +0000 Subject: [PATCH 096/128] Update dependency ts-jest to v22.4.1 --- packages/accounts-mongo/package.json | 2 +- packages/accounts-mongo/yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 785f446ac..6aaeeb646 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -62,7 +62,7 @@ "jest": "21.2.1", "prettier": "1.11.1", "pretty-quick": "1.4.1", - "ts-jest": "22.4.0", + "ts-jest": "22.4.1", "tslint": "5.9.1", "typescript": "2.7.2" }, diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index ea562ea5d..9290309c7 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -3368,9 +3368,9 @@ trim-right@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" -ts-jest@22.4.0: - version "22.4.0" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-22.4.0.tgz#c9d3f9565696e0ad17e658eee96e06822af96bb9" +ts-jest@22.4.1: + version "22.4.1" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-22.4.1.tgz#69defb2042d689cff9b4244365ef638ecd35f706" dependencies: babel-core "^6.24.1" babel-plugin-istanbul "^4.1.4" From 3e547d13aec7a4a23c9dd815da3bce3fc3b645ca Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 5 Mar 2018 23:12:08 +0000 Subject: [PATCH 097/128] Update dependency @types/mongodb to v3.0.6 --- packages/accounts-mongo/package.json | 2 +- packages/accounts-mongo/yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 6aaeeb646..0bb2e4535 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -53,7 +53,7 @@ "@accounts/tslint-config-accounts": "0.0.6", "@types/jest": "22.1.4", "@types/lodash": "4.14.104", - "@types/mongodb": "3.0.5", + "@types/mongodb": "3.0.6", "@types/node": "8.9.4", "codecov": "3.0.0", "coveralls": "3.0.0", diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index 9290309c7..a26704ae0 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -59,9 +59,9 @@ version "4.14.104" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.104.tgz#53ee2357fa2e6e68379341d92eb2ecea4b11bb80" -"@types/mongodb@3.0.5": - version "3.0.5" - resolved "https://registry.yarnpkg.com/@types/mongodb/-/mongodb-3.0.5.tgz#0143e0838a8260c7312773457f4d2ea1465ccada" +"@types/mongodb@3.0.6": + version "3.0.6" + resolved "https://registry.yarnpkg.com/@types/mongodb/-/mongodb-3.0.6.tgz#c702d3b7984a8b5e9ee7780bf61a7db0ec39c8ac" dependencies: "@types/bson" "*" "@types/events" "*" From 02df789bc19b55c2c99addcac6a287a5ac5bdf3a Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 6 Mar 2018 00:11:18 +0000 Subject: [PATCH 098/128] Update dependency @types/jest to v22.2.0 --- packages/accounts-mongo/package.json | 2 +- packages/accounts-mongo/yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 0bb2e4535..e7be836c1 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -51,7 +51,7 @@ "@accounts/common": "0.1.0-beta.2", "@accounts/server": "0.1.0-beta.2", "@accounts/tslint-config-accounts": "0.0.6", - "@types/jest": "22.1.4", + "@types/jest": "22.2.0", "@types/lodash": "4.14.104", "@types/mongodb": "3.0.6", "@types/node": "8.9.4", diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index a26704ae0..4e99eeef7 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -51,9 +51,9 @@ version "1.2.0" resolved "https://registry.yarnpkg.com/@types/events/-/events-1.2.0.tgz#81a6731ce4df43619e5c8c945383b3e62a89ea86" -"@types/jest@22.1.4": - version "22.1.4" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-22.1.4.tgz#5c0c06a9bb495c67e0a78002a952f151e2ae58a1" +"@types/jest@22.2.0": + version "22.2.0" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-22.2.0.tgz#55ce83139f7ad1b48b414c3927746614c6963c0f" "@types/lodash@4.14.104": version "4.14.104" From c69aaafa6becf9f3d09e2928eaca9036e730e51f Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 6 Mar 2018 00:11:34 +0000 Subject: [PATCH 099/128] Update dependency @types/mongodb to v3.0.7 --- packages/accounts-mongo/package.json | 2 +- packages/accounts-mongo/yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index e7be836c1..64c1d2859 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -53,7 +53,7 @@ "@accounts/tslint-config-accounts": "0.0.6", "@types/jest": "22.2.0", "@types/lodash": "4.14.104", - "@types/mongodb": "3.0.6", + "@types/mongodb": "3.0.7", "@types/node": "8.9.4", "codecov": "3.0.0", "coveralls": "3.0.0", diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index 4e99eeef7..1e36dfa44 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -59,9 +59,9 @@ version "4.14.104" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.104.tgz#53ee2357fa2e6e68379341d92eb2ecea4b11bb80" -"@types/mongodb@3.0.6": - version "3.0.6" - resolved "https://registry.yarnpkg.com/@types/mongodb/-/mongodb-3.0.6.tgz#c702d3b7984a8b5e9ee7780bf61a7db0ec39c8ac" +"@types/mongodb@3.0.7": + version "3.0.7" + resolved "https://registry.yarnpkg.com/@types/mongodb/-/mongodb-3.0.7.tgz#f71f403b392b1f5414b85ec395360868edb4f6e3" dependencies: "@types/bson" "*" "@types/events" "*" From a7d15418135bc3c2fba5976d1e12a1a14888b99d Mon Sep 17 00:00:00 2001 From: pradel Date: Wed, 7 Mar 2018 14:22:48 +0100 Subject: [PATCH 100/128] update README to show how to pass options --- packages/accounts-mongo/README.md | 3 +- packages/accounts-mongo/package.json | 1 - packages/accounts-mongo/yarn.lock | 654 +++++++++++---------------- 3 files changed, 270 insertions(+), 388 deletions(-) diff --git a/packages/accounts-mongo/README.md b/packages/accounts-mongo/README.md index 41f39353e..627ac5ea5 100644 --- a/packages/accounts-mongo/README.md +++ b/packages/accounts-mongo/README.md @@ -34,7 +34,8 @@ const db = await mongodb.MongoClient.connect(process.env.MONGO_URL); const client = await mongodb.MongoClient.connect(process.env.MONGO_URL); const db = client.db('my-db-name'); -const accountsServer = new AccountsServer({ db: new MongoDBInterface(db) }); +const accountsMongo = new Mongo(db, options); +const accountsServer = new AccountsServer({ db: accountsMongo }); ``` The users will be saved under the `users` collection. diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 64c1d2859..092fa51f9 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -59,7 +59,6 @@ "coveralls": "3.0.0", "husky": "0.14.3", "jest": "22.4.2", - "jest": "21.2.1", "prettier": "1.11.1", "pretty-quick": "1.4.1", "ts-jest": "22.4.1", diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index 1e36dfa44..263b7cb98 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -75,7 +75,7 @@ version "8.9.4" resolved "https://registry.yarnpkg.com/@types/node/-/node-8.9.4.tgz#dfd327582a06c114eb6e0441fa3d6fab35edad48" -abab@^1.0.3, abab@^1.0.4: +abab@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz#5faad9c2c07f60dd76770f71cf025b62a63cfd4e" @@ -83,22 +83,12 @@ abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" -acorn-globals@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-3.1.0.tgz#fd8270f71fbb4996b004fa880ee5d46573a731bf" - dependencies: - acorn "^4.0.4" - acorn-globals@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.1.0.tgz#ab716025dbe17c54d3ef81d32ece2b2d99fe2538" dependencies: acorn "^5.0.0" -acorn@^4.0.4: - version "4.0.13" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" - acorn@^5.0.0, acorn@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.5.0.tgz#1abb587fbf051f94e3de20e6b26ef910b1828298" @@ -339,12 +329,12 @@ babel-helpers@^6.24.1: babel-runtime "^6.22.0" babel-template "^6.24.1" -babel-jest@^21.2.0: - version "21.2.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-21.2.0.tgz#2ce059519a9374a2c46f2455b6fbef5ad75d863e" +babel-jest@^22.4.1: + version "22.4.1" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-22.4.1.tgz#ff53ebca45957347f27ff4666a31499fbb4c4ddd" dependencies: - babel-plugin-istanbul "^4.0.0" - babel-preset-jest "^21.2.0" + babel-plugin-istanbul "^4.1.5" + babel-preset-jest "^22.4.1" babel-messages@^6.22.0: version "6.22.0" @@ -358,14 +348,6 @@ babel-messages@^6.23.0: dependencies: babel-runtime "^6.22.0" -babel-plugin-istanbul@^4.0.0: - version "4.1.5" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.5.tgz#6760cdd977f411d3e175bb064f2bc327d99b2b6e" - dependencies: - find-up "^2.1.0" - istanbul-lib-instrument "^1.7.5" - test-exclude "^4.1.1" - babel-plugin-istanbul@^4.1.4: version "4.1.4" resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.4.tgz#18dde84bf3ce329fddf3f4103fae921456d8e587" @@ -374,9 +356,13 @@ babel-plugin-istanbul@^4.1.4: istanbul-lib-instrument "^1.7.2" test-exclude "^4.1.1" -babel-plugin-jest-hoist@^21.2.0: - version "21.2.0" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-21.2.0.tgz#2cef637259bd4b628a6cace039de5fcd14dbb006" +babel-plugin-istanbul@^4.1.5: + version "4.1.5" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.5.tgz#6760cdd977f411d3e175bb064f2bc327d99b2b6e" + dependencies: + find-up "^2.1.0" + istanbul-lib-instrument "^1.7.5" + test-exclude "^4.1.1" babel-plugin-jest-hoist@^22.4.1: version "22.4.1" @@ -410,14 +396,7 @@ babel-polyfill@^6.23.0: core-js "^2.4.0" regenerator-runtime "^0.10.0" -babel-preset-jest@^21.2.0: - version "21.2.0" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-21.2.0.tgz#ff9d2bce08abd98e8a36d9a8a5189b9173b85638" - dependencies: - babel-plugin-jest-hoist "^21.2.0" - babel-plugin-syntax-object-rest-spread "^6.13.0" - -babel-preset-jest@^22.4.0: +babel-preset-jest@^22.4.0, babel-preset-jest@^22.4.1: version "22.4.1" resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-22.4.1.tgz#efa2e5f5334242a9457a068452d7d09735db172a" dependencies: @@ -712,14 +691,6 @@ cliui@^2.1.0: right-align "^0.1.1" wordwrap "0.0.2" -cliui@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - wrap-ansi "^2.0.0" - cliui@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.0.0.tgz#743d4650e05f36d1ed2575b59638d87322bfbbcc" @@ -784,7 +755,7 @@ console-control-strings@^1.0.0, console-control-strings@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" -content-type-parser@^1.0.1, content-type-parser@^1.0.2: +content-type-parser@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.2.tgz#caabe80623e63638b2502fd4c7f12ff4ce2352e7" @@ -911,6 +882,13 @@ default-require-extensions@^1.0.0: dependencies: strip-bom "^2.0.0" +define-properties@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" + dependencies: + foreach "^2.0.5" + object-keys "^1.0.8" + delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" @@ -929,6 +907,10 @@ detect-libc@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.2.tgz#71ad5d204bf17a6a6ca8f450c61454066ef461e1" +detect-newline@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" + diff@^3.2.0: version "3.3.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.0.tgz#056695150d7aa93237ca7e378ac3b1682b7963b9" @@ -963,23 +945,35 @@ ecdsa-sig-formatter@1.0.9: base64url "^2.0.0" safe-buffer "^5.0.1" -errno@~0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" - dependencies: - prr "~1.0.1" - error-ex@^1.2.0: version "1.3.0" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.0.tgz#e67b43f3e82c96ea3a584ffee0b9fc3325d802d9" dependencies: is-arrayish "^0.2.1" +es-abstract@^1.5.1: + version "1.10.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.10.0.tgz#1ecb36c197842a00d8ee4c2dfd8646bb97d60864" + dependencies: + es-to-primitive "^1.1.1" + function-bind "^1.1.1" + has "^1.0.1" + is-callable "^1.1.3" + is-regex "^1.0.4" + +es-to-primitive@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" + dependencies: + is-callable "^1.1.1" + is-date-object "^1.0.1" + is-symbol "^1.0.1" + escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" -escodegen@^1.6.1, escodegen@^1.9.0: +escodegen@^1.9.0: version "1.9.1" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.9.1.tgz#dbae17ef96c8e4bedb1356f4504fa4cc2f7cb7e2" dependencies: @@ -1040,6 +1034,10 @@ execa@^0.8.0: signal-exit "^3.0.0" strip-eof "^1.0.0" +exit@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" + expand-brackets@^0.1.4: version "0.1.5" resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" @@ -1052,17 +1050,6 @@ expand-range@^1.8.1: dependencies: fill-range "^2.1.0" -expect@^21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/expect/-/expect-21.2.1.tgz#003ac2ac7005c3c29e73b38a272d4afadd6d1d7b" - dependencies: - ansi-styles "^3.2.0" - jest-diff "^21.2.1" - jest-get-type "^21.2.0" - jest-matcher-utils "^21.2.1" - jest-message-util "^21.2.1" - jest-regex-util "^21.2.0" - expect@^22.4.0: version "22.4.0" resolved "https://registry.yarnpkg.com/expect/-/expect-22.4.0.tgz#371edf1ae15b83b5bf5ec34b42f1584660a36c16" @@ -1142,7 +1129,7 @@ find-up@^1.0.0: path-exists "^2.0.0" pinkie-promise "^2.0.0" -find-up@^2.0.0, find-up@^2.1.0: +find-up@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" dependencies: @@ -1158,6 +1145,10 @@ for-own@^0.1.4: dependencies: for-in "^0.1.5" +foreach@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" + forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" @@ -1221,6 +1212,10 @@ fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2: mkdirp ">=0.5 0" rimraf "2" +function-bind@^1.0.2, function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + gauge@~2.7.3: version "2.7.4" resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" @@ -1374,6 +1369,12 @@ has-unicode@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" +has@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28" + dependencies: + function-bind "^1.0.2" + hawk@3.1.3, hawk@~3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" @@ -1411,7 +1412,7 @@ hosted-git-info@^2.1.4: version "2.1.5" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.1.5.tgz#0ba81d90da2e25ab34a332e6ec77936e1598118b" -html-encoding-sniffer@^1.0.1, html-encoding-sniffer@^1.0.2: +html-encoding-sniffer@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz#e70d84b94da53aa375e11fe3a351be6642ca46f8" dependencies: @@ -1453,6 +1454,13 @@ ignore@^3.3.7: version "3.3.7" resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.7.tgz#612289bfb3c220e186a58118618d5be8c1bab021" +import-local@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-1.0.0.tgz#5e4ffdc03f4fe6c009c6729beb29631c2f8227bc" + dependencies: + pkg-dir "^2.0.0" + resolve-cwd "^2.0.0" + imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" @@ -1502,12 +1510,20 @@ is-builtin-module@^1.0.0: dependencies: builtin-modules "^1.0.0" +is-callable@^1.1.1, is-callable@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" + is-ci@^1.0.10: version "1.0.10" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.0.10.tgz#f739336b2632365061a9d48270cd56ae3369318e" dependencies: ci-info "^1.0.0" +is-date-object@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" + is-dotfile@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.2.tgz#2c132383f39199f8edc268ca01b9b007d205cc4d" @@ -1579,10 +1595,20 @@ is-property@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" +is-regex@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" + dependencies: + has "^1.0.1" + is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" +is-symbol@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" + is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" @@ -1617,7 +1643,7 @@ isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" -istanbul-api@^1.1.1: +istanbul-api@^1.1.14: version "1.2.2" resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.2.2.tgz#e17cd519dd5ec4141197f246fdf380b75487f3b1" dependencies: @@ -1633,42 +1659,42 @@ istanbul-api@^1.1.1: mkdirp "^0.5.1" once "^1.4.0" -istanbul-lib-coverage@^1.0.1, istanbul-lib-coverage@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.2.tgz#4113c8ff6b7a40a1ef7350b01016331f63afde14" - istanbul-lib-coverage@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz#73bfb998885299415c93d38a3e9adf784a77a9da" +istanbul-lib-coverage@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.2.tgz#4113c8ff6b7a40a1ef7350b01016331f63afde14" + istanbul-lib-hook@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.1.0.tgz#8538d970372cb3716d53e55523dd54b557a8d89b" dependencies: append-transform "^0.4.0" -istanbul-lib-instrument@^1.4.2, istanbul-lib-instrument@^1.7.5, istanbul-lib-instrument@^1.9.2: - version "1.9.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.9.2.tgz#84905bf47f7e0b401d6b840da7bad67086b4aab6" +istanbul-lib-instrument@^1.7.2: + version "1.7.3" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.7.3.tgz#925b239163eabdd68cc4048f52c2fa4f899ecfa7" dependencies: babel-generator "^6.18.0" babel-template "^6.16.0" babel-traverse "^6.18.0" babel-types "^6.18.0" - babylon "^6.18.0" - istanbul-lib-coverage "^1.1.2" + babylon "^6.17.4" + istanbul-lib-coverage "^1.1.1" semver "^5.3.0" -istanbul-lib-instrument@^1.7.2: - version "1.7.3" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.7.3.tgz#925b239163eabdd68cc4048f52c2fa4f899ecfa7" +istanbul-lib-instrument@^1.7.5, istanbul-lib-instrument@^1.8.0, istanbul-lib-instrument@^1.9.2: + version "1.9.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.9.2.tgz#84905bf47f7e0b401d6b840da7bad67086b4aab6" dependencies: babel-generator "^6.18.0" babel-template "^6.16.0" babel-traverse "^6.18.0" babel-types "^6.18.0" - babylon "^6.17.4" - istanbul-lib-coverage "^1.1.1" + babylon "^6.18.0" + istanbul-lib-coverage "^1.1.2" semver "^5.3.0" istanbul-lib-report@^1.1.3: @@ -1680,7 +1706,7 @@ istanbul-lib-report@^1.1.3: path-parse "^1.0.5" supports-color "^3.1.2" -istanbul-lib-source-maps@^1.1.0, istanbul-lib-source-maps@^1.2.3: +istanbul-lib-source-maps@^1.2.1, istanbul-lib-source-maps@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.3.tgz#20fb54b14e14b3fb6edb6aca3571fd2143db44e6" dependencies: @@ -1696,61 +1722,50 @@ istanbul-reports@^1.1.4: dependencies: handlebars "^4.0.3" -jest-changed-files@^21.2.0: - version "21.2.0" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-21.2.0.tgz#5dbeecad42f5d88b482334902ce1cba6d9798d29" +jest-changed-files@^22.2.0: + version "22.2.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-22.2.0.tgz#517610c4a8ca0925bdc88b0ca53bd678aa8d019e" dependencies: throat "^4.0.0" -jest-cli@^21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-21.2.1.tgz#9c528b6629d651911138d228bdb033c157ec8c00" +jest-cli@^22.4.2: + version "22.4.2" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-22.4.2.tgz#e6546dc651e13d164481aa3e76e53ac4f4edab06" dependencies: ansi-escapes "^3.0.0" chalk "^2.0.1" + exit "^0.1.2" glob "^7.1.2" graceful-fs "^4.1.11" + import-local "^1.0.0" is-ci "^1.0.10" - istanbul-api "^1.1.1" - istanbul-lib-coverage "^1.0.1" - istanbul-lib-instrument "^1.4.2" - istanbul-lib-source-maps "^1.1.0" - jest-changed-files "^21.2.0" - jest-config "^21.2.1" - jest-environment-jsdom "^21.2.1" - jest-haste-map "^21.2.0" - jest-message-util "^21.2.1" - jest-regex-util "^21.2.0" - jest-resolve-dependencies "^21.2.0" - jest-runner "^21.2.1" - jest-runtime "^21.2.1" - jest-snapshot "^21.2.1" - jest-util "^21.2.1" + istanbul-api "^1.1.14" + istanbul-lib-coverage "^1.1.1" + istanbul-lib-instrument "^1.8.0" + istanbul-lib-source-maps "^1.2.1" + jest-changed-files "^22.2.0" + jest-config "^22.4.2" + jest-environment-jsdom "^22.4.1" + jest-get-type "^22.1.0" + jest-haste-map "^22.4.2" + jest-message-util "^22.4.0" + jest-regex-util "^22.1.0" + jest-resolve-dependencies "^22.1.0" + jest-runner "^22.4.2" + jest-runtime "^22.4.2" + jest-snapshot "^22.4.0" + jest-util "^22.4.1" + jest-validate "^22.4.2" + jest-worker "^22.2.2" micromatch "^2.3.11" - node-notifier "^5.0.2" - pify "^3.0.0" + node-notifier "^5.2.1" + realpath-native "^1.0.0" + rimraf "^2.5.4" slash "^1.0.0" string-length "^2.0.0" strip-ansi "^4.0.0" which "^1.2.12" - worker-farm "^1.3.1" - yargs "^9.0.0" - -jest-config@^21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-21.2.1.tgz#c7586c79ead0bcc1f38c401e55f964f13bf2a480" - dependencies: - chalk "^2.0.1" - glob "^7.1.1" - jest-environment-jsdom "^21.2.1" - jest-environment-node "^21.2.1" - jest-get-type "^21.2.0" - jest-jasmine2 "^21.2.1" - jest-regex-util "^21.2.0" - jest-resolve "^21.2.0" - jest-util "^21.2.1" - jest-validate "^21.2.1" - pretty-format "^21.2.1" + yargs "^10.0.3" jest-config@^22.4.0, jest-config@^22.4.2: version "22.4.2" @@ -1768,15 +1783,6 @@ jest-config@^22.4.0, jest-config@^22.4.2: jest-validate "^22.4.2" pretty-format "^22.4.0" -jest-diff@^21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-21.2.1.tgz#46cccb6cab2d02ce98bc314011764bb95b065b4f" - dependencies: - chalk "^2.0.1" - diff "^3.2.0" - jest-get-type "^21.2.0" - pretty-format "^21.2.1" - jest-diff@^22.4.0: version "22.4.0" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-22.4.0.tgz#384c2b78519ca44ca126382df53f134289232525" @@ -1786,17 +1792,11 @@ jest-diff@^22.4.0: jest-get-type "^22.1.0" pretty-format "^22.4.0" -jest-docblock@^21.2.0: - version "21.2.0" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-21.2.0.tgz#51529c3b30d5fd159da60c27ceedc195faf8d414" - -jest-environment-jsdom@^21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-21.2.1.tgz#38d9980c8259b2a608ec232deee6289a60d9d5b4" +jest-docblock@^22.4.0: + version "22.4.0" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-22.4.0.tgz#dbf1877e2550070cfc4d9b07a55775a0483159b8" dependencies: - jest-mock "^21.2.0" - jest-util "^21.2.1" - jsdom "^9.12.0" + detect-newline "^2.1.0" jest-environment-jsdom@^22.4.1: version "22.4.1" @@ -1806,13 +1806,6 @@ jest-environment-jsdom@^22.4.1: jest-util "^22.4.1" jsdom "^11.5.1" -jest-environment-node@^21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-21.2.1.tgz#98c67df5663c7fbe20f6e792ac2272c740d3b8c8" - dependencies: - jest-mock "^21.2.0" - jest-util "^21.2.1" - jest-environment-node@^22.4.1: version "22.4.1" resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-22.4.1.tgz#418850eb654596b8d6e36c2021cbedbc23df8e16" @@ -1820,37 +1813,21 @@ jest-environment-node@^22.4.1: jest-mock "^22.2.0" jest-util "^22.4.1" -jest-get-type@^21.2.0: - version "21.2.0" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-21.2.0.tgz#f6376ab9db4b60d81e39f30749c6c466f40d4a23" - jest-get-type@^22.1.0: version "22.1.0" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.1.0.tgz#4e90af298ed6181edc85d2da500dbd2753e0d5a9" -jest-haste-map@^21.2.0: - version "21.2.0" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-21.2.0.tgz#1363f0a8bb4338f24f001806571eff7a4b2ff3d8" +jest-haste-map@^22.4.2: + version "22.4.2" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-22.4.2.tgz#a90178e66146d4378bb076345a949071f3b015b4" dependencies: fb-watchman "^2.0.0" graceful-fs "^4.1.11" - jest-docblock "^21.2.0" + jest-docblock "^22.4.0" + jest-serializer "^22.4.0" + jest-worker "^22.2.2" micromatch "^2.3.11" sane "^2.0.0" - worker-farm "^1.3.1" - -jest-jasmine2@^21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-21.2.1.tgz#9cc6fc108accfa97efebce10c4308548a4ea7592" - dependencies: - chalk "^2.0.1" - expect "^21.2.1" - graceful-fs "^4.1.11" - jest-diff "^21.2.1" - jest-matcher-utils "^21.2.1" - jest-message-util "^21.2.1" - jest-snapshot "^21.2.1" - p-cancelable "^0.3.0" jest-jasmine2@^22.4.2: version "22.4.2" @@ -1868,13 +1845,11 @@ jest-jasmine2@^22.4.2: jest-util "^22.4.1" source-map-support "^0.5.0" -jest-matcher-utils@^21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-21.2.1.tgz#72c826eaba41a093ac2b4565f865eb8475de0f64" +jest-leak-detector@^22.4.0: + version "22.4.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-22.4.0.tgz#64da77f05b001c96d2062226e079f89989c4aa2f" dependencies: - chalk "^2.0.1" - jest-get-type "^21.2.0" - pretty-format "^21.2.1" + pretty-format "^22.4.0" jest-matcher-utils@^22.4.0: version "22.4.0" @@ -1884,14 +1859,6 @@ jest-matcher-utils@^22.4.0: jest-get-type "^22.1.0" pretty-format "^22.4.0" -jest-message-util@^21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-21.2.1.tgz#bfe5d4692c84c827d1dcf41823795558f0a1acbe" - dependencies: - chalk "^2.0.1" - micromatch "^2.3.11" - slash "^1.0.0" - jest-message-util@^22.4.0: version "22.4.0" resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-22.4.0.tgz#e3d861df16d2fee60cb2bc8feac2188a42579642" @@ -1902,35 +1869,19 @@ jest-message-util@^22.4.0: slash "^1.0.0" stack-utils "^1.0.1" -jest-mock@^21.2.0: - version "21.2.0" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-21.2.0.tgz#7eb0770e7317968165f61ea2a7281131534b3c0f" - jest-mock@^22.2.0: version "22.2.0" resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-22.2.0.tgz#444b3f9488a7473adae09bc8a77294afded397a7" -jest-regex-util@^21.2.0: - version "21.2.0" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-21.2.0.tgz#1b1e33e63143babc3e0f2e6c9b5ba1eb34b2d530" - jest-regex-util@^22.1.0: version "22.1.0" resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-22.1.0.tgz#5daf2fe270074b6da63e5d85f1c9acc866768f53" -jest-resolve-dependencies@^21.2.0: - version "21.2.0" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-21.2.0.tgz#9e231e371e1a736a1ad4e4b9a843bc72bfe03d09" - dependencies: - jest-regex-util "^21.2.0" - -jest-resolve@^21.2.0: - version "21.2.0" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-21.2.0.tgz#068913ad2ba6a20218e5fd32471f3874005de3a6" +jest-resolve-dependencies@^22.1.0: + version "22.1.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-22.1.0.tgz#340e4139fb13315cd43abc054e6c06136be51e31" dependencies: - browser-resolve "^1.11.2" - chalk "^2.0.1" - is-builtin-module "^1.0.0" + jest-regex-util "^22.1.0" jest-resolve@^22.4.2: version "22.4.2" @@ -1939,53 +1890,50 @@ jest-resolve@^22.4.2: browser-resolve "^1.11.2" chalk "^2.0.1" -jest-runner@^21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-21.2.1.tgz#194732e3e518bfb3d7cbfc0fd5871246c7e1a467" - dependencies: - jest-config "^21.2.1" - jest-docblock "^21.2.0" - jest-haste-map "^21.2.0" - jest-jasmine2 "^21.2.1" - jest-message-util "^21.2.1" - jest-runtime "^21.2.1" - jest-util "^21.2.1" - pify "^3.0.0" +jest-runner@^22.4.2: + version "22.4.2" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-22.4.2.tgz#19390ea9d99f768973e16f95a1efa351c0017e87" + dependencies: + exit "^0.1.2" + jest-config "^22.4.2" + jest-docblock "^22.4.0" + jest-haste-map "^22.4.2" + jest-jasmine2 "^22.4.2" + jest-leak-detector "^22.4.0" + jest-message-util "^22.4.0" + jest-runtime "^22.4.2" + jest-util "^22.4.1" + jest-worker "^22.2.2" throat "^4.0.0" - worker-farm "^1.3.1" -jest-runtime@^21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-21.2.1.tgz#99dce15309c670442eee2ebe1ff53a3cbdbbb73e" +jest-runtime@^22.4.2: + version "22.4.2" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-22.4.2.tgz#0de0444f65ce15ee4f2e0055133fc7c17b9168f3" dependencies: babel-core "^6.0.0" - babel-jest "^21.2.0" - babel-plugin-istanbul "^4.0.0" + babel-jest "^22.4.1" + babel-plugin-istanbul "^4.1.5" chalk "^2.0.1" convert-source-map "^1.4.0" + exit "^0.1.2" graceful-fs "^4.1.11" - jest-config "^21.2.1" - jest-haste-map "^21.2.0" - jest-regex-util "^21.2.0" - jest-resolve "^21.2.0" - jest-util "^21.2.1" + jest-config "^22.4.2" + jest-haste-map "^22.4.2" + jest-regex-util "^22.1.0" + jest-resolve "^22.4.2" + jest-util "^22.4.1" + jest-validate "^22.4.2" json-stable-stringify "^1.0.1" micromatch "^2.3.11" + realpath-native "^1.0.0" slash "^1.0.0" strip-bom "3.0.0" write-file-atomic "^2.1.0" - yargs "^9.0.0" + yargs "^10.0.3" -jest-snapshot@^21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-21.2.1.tgz#29e49f16202416e47343e757e5eff948c07fd7b0" - dependencies: - chalk "^2.0.1" - jest-diff "^21.2.1" - jest-matcher-utils "^21.2.1" - mkdirp "^0.5.1" - natural-compare "^1.4.0" - pretty-format "^21.2.1" +jest-serializer@^22.4.0: + version "22.4.0" + resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-22.4.0.tgz#b5d145b98c4b0d2c20ab686609adbb81fe23b566" jest-snapshot@^22.4.0: version "22.4.0" @@ -1998,18 +1946,6 @@ jest-snapshot@^22.4.0: natural-compare "^1.4.0" pretty-format "^22.4.0" -jest-util@^21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-21.2.1.tgz#a274b2f726b0897494d694a6c3d6a61ab819bb78" - dependencies: - callsites "^2.0.0" - chalk "^2.0.1" - graceful-fs "^4.1.11" - jest-message-util "^21.2.1" - jest-mock "^21.2.0" - jest-validate "^21.2.1" - mkdirp "^0.5.1" - jest-util@^22.4.1: version "22.4.1" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-22.4.1.tgz#dd17c3bdb067f8e90591563ec0c42bf847dc249f" @@ -2022,15 +1958,6 @@ jest-util@^22.4.1: mkdirp "^0.5.1" source-map "^0.6.0" -jest-validate@^21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-21.2.1.tgz#cc0cbca653cd54937ba4f2a111796774530dd3c7" - dependencies: - chalk "^2.0.1" - jest-get-type "^21.2.0" - leven "^2.1.0" - pretty-format "^21.2.1" - jest-validate@^22.4.2: version "22.4.2" resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-22.4.2.tgz#e789a4e056173bf97fe797a2df2d52105c57d4f4" @@ -2041,11 +1968,18 @@ jest-validate@^22.4.2: leven "^2.1.0" pretty-format "^22.4.0" -jest@21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/jest/-/jest-21.2.1.tgz#c964e0b47383768a1438e3ccf3c3d470327604e1" +jest-worker@^22.2.2: + version "22.2.2" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-22.2.2.tgz#c1f5dc39976884b81f68ec50cb8532b2cbab3390" dependencies: - jest-cli "^21.2.1" + merge-stream "^1.0.1" + +jest@22.4.2: + version "22.4.2" + resolved "https://registry.yarnpkg.com/jest/-/jest-22.4.2.tgz#34012834a49bf1bdd3bc783850ab44e4499afc20" + dependencies: + import-local "^1.0.0" + jest-cli "^22.4.2" jodid25519@^1.0.0: version "1.0.2" @@ -2119,30 +2053,6 @@ jsdom@^11.5.1: ws "^4.0.0" xml-name-validator "^3.0.0" -jsdom@^9.12.0: - version "9.12.0" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-9.12.0.tgz#e8c546fffcb06c00d4833ca84410fed7f8a097d4" - dependencies: - abab "^1.0.3" - acorn "^4.0.4" - acorn-globals "^3.1.0" - array-equal "^1.0.0" - content-type-parser "^1.0.1" - cssom ">= 0.3.2 < 0.4.0" - cssstyle ">= 0.2.37 < 0.3.0" - escodegen "^1.6.1" - html-encoding-sniffer "^1.0.1" - nwmatcher ">= 1.3.9 < 2.0.0" - parse5 "^1.5.1" - request "^2.79.0" - sax "^1.2.1" - symbol-tree "^3.2.1" - tough-cookie "^2.3.2" - webidl-conversions "^4.0.0" - whatwg-encoding "^1.0.1" - whatwg-url "^4.3.0" - xml-name-validator "^2.0.1" - jsesc@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" @@ -2267,15 +2177,6 @@ load-json-file@^1.0.0: pinkie-promise "^2.0.0" strip-bom "^2.0.0" -load-json-file@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - strip-bom "^3.0.0" - locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -2332,6 +2233,12 @@ mem@^1.1.0: dependencies: mimic-fn "^1.0.0" +merge-stream@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1" + dependencies: + readable-stream "^2.0.1" + merge@^1.1.3: version "1.2.0" resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" @@ -2449,7 +2356,7 @@ node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" -node-notifier@^5.0.2: +node-notifier@^5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.2.1.tgz#fa313dd08f5517db0e2502e5758d664ac69f9dea" dependencies: @@ -2517,7 +2424,7 @@ number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" -"nwmatcher@>= 1.3.9 < 2.0.0", nwmatcher@^1.4.3: +nwmatcher@^1.4.3: version "1.4.3" resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.3.tgz#64348e3b3d80f035b40ac11563d278f8b72db89c" @@ -2533,6 +2440,17 @@ object-assign@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" +object-keys@^1.0.8: + version "1.0.11" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" + +object.getownpropertydescriptors@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.5.1" + object.omit@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" @@ -2593,10 +2511,6 @@ osenv@^0.1.4: os-homedir "^1.0.0" os-tmpdir "^1.0.0" -p-cancelable@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa" - p-finally@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" @@ -2630,10 +2544,6 @@ parse5@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" -parse5@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94" - path-exists@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" @@ -2664,12 +2574,6 @@ path-type@^1.0.0: pify "^2.0.0" pinkie-promise "^2.0.0" -path-type@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" - dependencies: - pify "^2.0.0" - performance-now@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" @@ -2682,10 +2586,6 @@ pify@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" -pify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" - pinkie-promise@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" @@ -2718,13 +2618,6 @@ prettier@1.11.1: version "1.11.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.11.1.tgz#61e43fc4cd44e68f2b0dfc2c38cd4bb0fccdcc75" -pretty-format@^21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-21.2.1.tgz#ae5407f3cf21066cd011aa1ba5fce7b6a2eddb36" - dependencies: - ansi-regex "^3.0.0" - ansi-styles "^3.2.0" - pretty-format@^22.4.0: version "22.4.0" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-22.4.0.tgz#237b1f7e1c50ed03bc65c03ccc29d7c8bb7beb94" @@ -2754,10 +2647,6 @@ process-nextick-args@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" -prr@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" - pseudomap@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" @@ -2805,13 +2694,6 @@ read-pkg-up@^1.0.1: find-up "^1.0.0" read-pkg "^1.0.0" -read-pkg-up@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" - dependencies: - find-up "^2.0.0" - read-pkg "^2.0.0" - read-pkg@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" @@ -2820,13 +2702,17 @@ read-pkg@^1.0.0: normalize-package-data "^2.3.2" path-type "^1.0.0" -read-pkg@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" +readable-stream@^2.0.1: + version "2.3.5" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.5.tgz#b4f85003a938cbb6ecbce2a124fb1012bd1a838d" dependencies: - load-json-file "^2.0.0" - normalize-package-data "^2.3.2" - path-type "^2.0.0" + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.0.3" + util-deprecate "~1.0.1" readable-stream@^2.0.2: version "2.3.4" @@ -2861,6 +2747,12 @@ readdirp@^2.0.0: readable-stream "^2.0.2" set-immediate-shim "^1.0.1" +realpath-native@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-1.0.0.tgz#7885721a83b43bd5327609f0ddecb2482305fdf0" + dependencies: + util.promisify "^1.0.0" + regenerator-runtime@^0.10.0: version "0.10.1" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.1.tgz#257f41961ce44558b18f7814af48c17559f9faeb" @@ -2998,10 +2890,20 @@ require_optional@^1.0.1: resolve-from "^2.0.0" semver "^5.1.0" +resolve-cwd@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" + dependencies: + resolve-from "^3.0.0" + resolve-from@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-2.0.0.tgz#9480ab20e94ffa1d9e80a804c7ea147611966b57" +resolve-from@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + resolve@1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" @@ -3024,7 +2926,7 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" -rimraf@2, rimraf@^2.5.1: +rimraf@2, rimraf@^2.5.1, rimraf@^2.5.4: version "2.6.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" dependencies: @@ -3058,7 +2960,7 @@ sane@^2.0.0: optionalDependencies: fsevents "^1.1.1" -sax@^1.2.1, sax@^1.2.4: +sax@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" @@ -3239,7 +3141,7 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" -strip-bom@3.0.0, strip-bom@^3.0.0: +strip-bom@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" @@ -3289,7 +3191,7 @@ supports-color@^5.2.0: dependencies: has-flag "^3.0.0" -symbol-tree@^3.2.1, symbol-tree@^3.2.2: +symbol-tree@^3.2.2: version "3.2.2" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" @@ -3342,7 +3244,7 @@ topo@1.x.x: dependencies: hoek "2.x.x" -tough-cookie@>=2.3.3, tough-cookie@^2.3.2, tough-cookie@^2.3.3, tough-cookie@~2.3.3: +tough-cookie@>=2.3.3, tough-cookie@^2.3.3, tough-cookie@~2.3.3: version "2.3.4" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655" dependencies: @@ -3360,10 +3262,6 @@ tr46@^1.0.0: dependencies: punycode "^2.1.0" -tr46@~0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" - trim-right@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" @@ -3482,6 +3380,13 @@ util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" +util.promisify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030" + dependencies: + define-properties "^1.1.2" + object.getownpropertydescriptors "^2.0.3" + uuid@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" @@ -3522,11 +3427,7 @@ watch@~0.18.0: exec-sh "^0.2.0" minimist "^1.2.0" -webidl-conversions@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" - -webidl-conversions@^4.0.0, webidl-conversions@^4.0.1, webidl-conversions@^4.0.2: +webidl-conversions@^4.0.1, webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" @@ -3542,13 +3443,6 @@ whatwg-encoding@^1.0.3: dependencies: iconv-lite "0.4.19" -whatwg-url@^4.3.0: - version "4.8.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-4.8.0.tgz#d2981aa9148c1e00a41c5a6131166ab4683bbcc0" - dependencies: - tr46 "~0.0.3" - webidl-conversions "^3.0.0" - whatwg-url@^6.4.0: version "6.4.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.4.0.tgz#08fdf2b9e872783a7a1f6216260a1d66cc722e08" @@ -3595,13 +3489,6 @@ wordwrap@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" -worker-farm@^1.3.1: - version "1.5.4" - resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.5.4.tgz#4debbe46b40edefcc717ebde74a90b1ae1e909a1" - dependencies: - errno "~0.1.7" - xtend "~4.0.1" - wrap-ansi@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" @@ -3628,15 +3515,11 @@ ws@^4.0.0: async-limiter "~1.0.0" safe-buffer "~5.1.0" -xml-name-validator@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635" - xml-name-validator@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" -xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1: +xtend@^4.0.0, xtend@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" @@ -3648,9 +3531,9 @@ yallist@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" -yargs-parser@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" +yargs-parser@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-8.1.0.tgz#f1376a33b6629a5d063782944da732631e966950" dependencies: camelcase "^4.1.0" @@ -3660,9 +3543,9 @@ yargs-parser@^9.0.2: dependencies: camelcase "^4.1.0" -yargs@^11.0.0: - version "11.0.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.0.0.tgz#c052931006c5eee74610e5fc0354bedfd08a201b" +yargs@^10.0.3: + version "10.1.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-10.1.2.tgz#454d074c2b16a51a43e2fb7807e4f9de69ccb5c5" dependencies: cliui "^4.0.0" decamelize "^1.1.1" @@ -3675,25 +3558,24 @@ yargs@^11.0.0: string-width "^2.0.0" which-module "^2.0.0" y18n "^3.2.1" - yargs-parser "^9.0.2" + yargs-parser "^8.1.0" -yargs@^9.0.0: - version "9.0.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-9.0.1.tgz#52acc23feecac34042078ee78c0c007f5085db4c" +yargs@^11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.0.0.tgz#c052931006c5eee74610e5fc0354bedfd08a201b" dependencies: - camelcase "^4.1.0" - cliui "^3.2.0" + cliui "^4.0.0" decamelize "^1.1.1" + find-up "^2.1.0" get-caller-file "^1.0.1" os-locale "^2.0.0" - read-pkg-up "^2.0.0" require-directory "^2.1.1" require-main-filename "^1.0.1" set-blocking "^2.0.0" string-width "^2.0.0" which-module "^2.0.0" y18n "^3.2.1" - yargs-parser "^7.0.0" + yargs-parser "^9.0.2" yargs@~3.10.0: version "3.10.0" From dde6efb27b2b7581b7a2ae1e32b7d6b913ae3391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Pradel?= Date: Wed, 7 Mar 2018 16:43:26 +0100 Subject: [PATCH 101/128] Merge pull request #57 from accounts-js/feature/token-session changes for token based sessions --- packages/accounts-mongo/.gitignore | 1 + packages/accounts-mongo/__tests__/index.ts | 74 +++++++++++------ packages/accounts-mongo/package.json | 16 ++-- packages/accounts-mongo/src/mongo.ts | 38 ++++++--- packages/accounts-mongo/yarn.lock | 95 ++++++++++++---------- 5 files changed, 137 insertions(+), 87 deletions(-) diff --git a/packages/accounts-mongo/.gitignore b/packages/accounts-mongo/.gitignore index 6bf46d11f..8525e75e2 100644 --- a/packages/accounts-mongo/.gitignore +++ b/packages/accounts-mongo/.gitignore @@ -2,5 +2,6 @@ lib/ node_modules/ coverage/ npm-debug.log +yarn-error.log .idea lib-es6 diff --git a/packages/accounts-mongo/__tests__/index.ts b/packages/accounts-mongo/__tests__/index.ts index 446648571..d9b18ccf4 100644 --- a/packages/accounts-mongo/__tests__/index.ts +++ b/packages/accounts-mongo/__tests__/index.ts @@ -1,9 +1,13 @@ import * as mongodb from 'mongodb'; // tslint:disable-next-line import { ObjectID } from 'mongodb'; +import { randomBytes } from 'crypto'; import Mongo from '../src'; -let mongo; +const generateRandomToken = (length: number = 43): string => + randomBytes(length).toString('hex'); + +let mongo: Mongo; let db: mongodb.Db; let client: mongodb.MongoClient; const user = { @@ -549,17 +553,18 @@ describe('Mongo', () => { describe('createSession', () => { it('should create session', async () => { - const sessionId = await mongo.createSession( - session.userId, - session.ip, - session.userAgent - ); + const token = generateRandomToken(); + const sessionId = await mongo.createSession(session.userId, token, { + ip: session.ip, + userAgent: session.userAgent, + }); const ret = await mongo.findSessionById(sessionId); expect(ret).toBeTruthy(); expect(ret._id).toBeTruthy(); expect(ret.userId).toEqual(session.userId); expect(ret.ip).toEqual(session.ip); expect(ret.userAgent).toEqual(session.userAgent); + expect(ret.token).toEqual(token); expect(ret.valid).toEqual(true); expect(ret.createdAt).toBeTruthy(); expect(ret.createdAt).toEqual(new Date(ret.createdAt).getTime()); @@ -568,10 +573,11 @@ describe('Mongo', () => { it('should create session with extra data', async () => { const impersonatorUserId = '789'; + const token = generateRandomToken(); const sessionId = await mongo.createSession( session.userId, - session.ip, - session.userAgent, + token, + { ip: session.ip, userAgent: session.userAgent }, { impersonatorUserId } ); const ret = await mongo.findSessionById(sessionId); @@ -581,6 +587,7 @@ describe('Mongo', () => { expect(ret.ip).toEqual(session.ip); expect(ret.userAgent).toEqual(session.userAgent); expect(ret.valid).toEqual(true); + expect(ret.token).toEqual(token); expect(ret.createdAt).toEqual(new Date(ret.createdAt).getTime()); expect(ret.updatedAt).toBeTruthy(); expect(ret.extraData).toEqual({ impersonatorUserId }); @@ -618,6 +625,23 @@ describe('Mongo', () => { }); }); + describe('findSessionByToken', () => { + it('should return null for not found session', async () => { + const ret = await mongo.findSessionByToken('589871d1c9393d445745a57c'); + expect(ret).not.toBeTruthy(); + }); + + it('should find session', async () => { + const token = generateRandomToken(); + const sessionId = await mongo.createSession(session.userId, token, { + ip: session.ip, + userAgent: session.userAgent, + }); + const ret = await mongo.findSessionByToken(token); + expect(ret).toBeTruthy(); + }); + }); + describe('findSessionById', () => { it('should return null for not found session', async () => { const ret = await mongo.findSessionById('589871d1c9393d445745a57c'); @@ -640,18 +664,22 @@ describe('Mongo', () => { }); it('should update session', async () => { - const sessionId = await mongo.createSession( - session.userId, - session.ip, - session.userAgent - ); + const token = generateRandomToken(); + const sessionId = await mongo.createSession(session.userId, token, { + ip: session.ip, + userAgent: session.userAgent, + }); await delay(10); - await mongo.updateSession(sessionId, 'new ip', 'new user agent'); + await mongo.updateSession(sessionId, { + ip: 'new ip', + userAgent: 'new user agent', + }); const ret = await mongo.findSessionById(sessionId); expect(ret.userId).toEqual(session.userId); expect(ret.ip).toEqual('new ip'); expect(ret.userAgent).toEqual('new user agent'); expect(ret.valid).toEqual(true); + expect(ret.token).toEqual(token); expect(ret.createdAt).toBeTruthy(); expect(ret.updatedAt).toBeTruthy(); expect(ret.createdAt).not.toEqual(ret.updatedAt); @@ -667,11 +695,11 @@ describe('Mongo', () => { }); it('invalidates a session', async () => { - const sessionId = await mongo.createSession( - session.userId, - session.ip, - session.userAgent - ); + const token = generateRandomToken(); + const sessionId = await mongo.createSession(session.userId, token, { + ip: session.ip, + userAgent: session.userAgent, + }); await delay(10); await mongo.invalidateSession(sessionId); const ret = await mongo.findSessionById(sessionId); @@ -684,13 +712,13 @@ describe('Mongo', () => { it('invalidates all sessions', async () => { const sessionId1 = await mongo.createSession( session.userId, - session.ip, - session.userAgent + generateRandomToken(), + { ip: session.ip, userAgent: session.userAgent } ); const sessionId2 = await mongo.createSession( session.userId, - session.ip, - session.userAgent + generateRandomToken(), + { ip: session.ip, userAgent: session.userAgent } ); await delay(10); await mongo.invalidateAllSessions(session.userId); diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 092fa51f9..bf11c4728 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -7,7 +7,8 @@ "scripts": { "start": "tsc --watch", "compile": "tsc", - "test": "yarn lint && yarn coverage && yarn prettier-diff", + "test": + "yarn lint && yarn coverage && yarn prettier-diff && yarn run compile", "testonly": "jest --forceExit", "lint": "tslint -c tslint.json '{src,__tests__}/**/*.ts'", "prettier": "prettier '{src,__tests__}/**/*.ts' 'README.md'", @@ -34,8 +35,7 @@ ".(ts|tsx)": "/node_modules/ts-jest/preprocessor.js" }, "testRegex": "./__tests__/.*.ts$", - "moduleFileExtensions": ["ts", "js"], - "mapCoverage": true + "moduleFileExtensions": ["ts", "js"] }, "repository": { "type": "git", @@ -48,13 +48,13 @@ }, "homepage": "https://github.com/js-accounts/mongo", "devDependencies": { - "@accounts/common": "0.1.0-beta.2", - "@accounts/server": "0.1.0-beta.2", + "@accounts/common": "0.1.0-beta.3", + "@accounts/server": "0.1.0-beta.3", "@accounts/tslint-config-accounts": "0.0.6", "@types/jest": "22.2.0", "@types/lodash": "4.14.104", "@types/mongodb": "3.0.7", - "@types/node": "8.9.4", + "@types/node": "9.4.6", "codecov": "3.0.0", "coveralls": "3.0.0", "husky": "0.14.3", @@ -66,8 +66,8 @@ "typescript": "2.7.2" }, "peerDependencies": { - "@accounts/common": "^0.1.0-beta.0", - "@accounts/server": "^0.1.0-beta.0" + "@accounts/common": "^0.1.0-beta.3", + "@accounts/server": "^0.1.0-beta.3" }, "dependencies": { "lodash": "^4.17.4", diff --git a/packages/accounts-mongo/src/mongo.ts b/packages/accounts-mongo/src/mongo.ts index ebbad1fa7..9f61b3031 100644 --- a/packages/accounts-mongo/src/mongo.ts +++ b/packages/accounts-mongo/src/mongo.ts @@ -1,7 +1,7 @@ import { ObjectID, Db, Collection } from 'mongodb'; import { get } from 'lodash'; import { CreateUserType, UserObjectType, SessionType } from '@accounts/common'; -import { DBInterface } from '@accounts/server'; +import { DBInterface, ConnectionInformationsType } from '@accounts/server'; export interface MongoOptionsType { // The users collection name, default 'users'. @@ -86,6 +86,10 @@ export class Mongo implements DBInterface { } public async setupIndexes(): Promise { + await this.sessionCollection.createIndex('token', { + unique: true, + sparse: true, + }); await this.collection.createIndex('username', { unique: true, sparse: true, @@ -346,14 +350,15 @@ export class Mongo implements DBInterface { public async createSession( userId: string, - ip?: string, - userAgent?: string, + token: string, + connection: ConnectionInformationsType = {}, extraData?: object ): Promise { const session = { userId, - userAgent, - ip, + token, + userAgent: connection.userAgent, + ip: connection.ip, extraData, valid: true, [this.options.timestamps.createdAt]: this.options.dateProvider(), @@ -370,8 +375,7 @@ export class Mongo implements DBInterface { public async updateSession( sessionId: string, - ip: string, - userAgent: string + connection: ConnectionInformationsType ): Promise { // tslint:disable-next-line variable-name const _id = this.options.convertSessionIdToMongoObjectId @@ -381,8 +385,8 @@ export class Mongo implements DBInterface { { _id }, { $set: { - ip, - userAgent, + userAgent: connection.userAgent, + ip: connection.ip, [this.options.timestamps.updatedAt]: this.options.dateProvider(), }, } @@ -417,12 +421,24 @@ export class Mongo implements DBInterface { ); } - public findSessionById(sessionId: string): Promise { + public async findSessionByToken(token: string): Promise { + const session = await this.sessionCollection.findOne({ token }); + if (session) { + session.id = session._id; + } + return session; + } + + public async findSessionById(sessionId: string): Promise { // tslint:disable-next-line variable-name const _id = this.options.convertSessionIdToMongoObjectId ? toMongoID(sessionId) : sessionId; - return this.sessionCollection.findOne({ _id }); + const session = await this.sessionCollection.findOne({ _id }); + if (session) { + session.id = session._id; + } + return session; } public async addEmailVerificationToken( diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index 263b7cb98..1507feb69 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -2,21 +2,20 @@ # yarn lockfile v1 -"@accounts/common@0.1.0-beta.2", "@accounts/common@^0.1.0-beta.2": - version "0.1.0-beta.2" - resolved "https://registry.yarnpkg.com/@accounts/common/-/common-0.1.0-beta.2.tgz#5ea493fac393b4e045c6007ab67aa4bf3e27dcb1" +"@accounts/common@0.1.0-beta.3", "@accounts/common@^0.1.0-beta.3": + version "0.1.0-beta.3" + resolved "https://registry.yarnpkg.com/@accounts/common/-/common-0.1.0-beta.3.tgz#311a9676526160b37fcb8aec3526f3d0e0cad9e6" dependencies: lodash "^4.16.4" -"@accounts/server@0.1.0-beta.2": - version "0.1.0-beta.2" - resolved "https://registry.yarnpkg.com/@accounts/server/-/server-0.1.0-beta.2.tgz#db199872154f2d3d826422aa933cf88714213a9a" +"@accounts/server@0.1.0-beta.3": + version "0.1.0-beta.3" + resolved "https://registry.yarnpkg.com/@accounts/server/-/server-0.1.0-beta.3.tgz#fc584094bedce26c115d9e19679dcf0259a4a675" dependencies: - "@accounts/common" "^0.1.0-beta.2" + "@accounts/common" "^0.1.0-beta.3" babel-polyfill "^6.23.0" bcryptjs "^2.4.0" - crypto "^0.0.3" - jsonwebtoken "^7.2.1" + jsonwebtoken "^8.0.0" jwt-decode "^2.1.0" lodash "^4.16.4" @@ -71,9 +70,9 @@ version "8.0.10" resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.10.tgz#12efec9183b072d5f951cf86395a4c780f868a17" -"@types/node@8.9.4": - version "8.9.4" - resolved "https://registry.yarnpkg.com/@types/node/-/node-8.9.4.tgz#dfd327582a06c114eb6e0441fa3d6fab35edad48" +"@types/node@9.4.6": + version "9.4.6" + resolved "https://registry.yarnpkg.com/@types/node/-/node-9.4.6.tgz#d8176d864ee48753d053783e4e463aec86b8d82e" abab@^1.0.4: version "1.0.4" @@ -828,10 +827,6 @@ cryptiles@3.x.x: dependencies: boom "5.x.x" -crypto@^0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/crypto/-/crypto-0.0.3.tgz#470a81b86be4c5ee17acc8207a1f5315ae20dbb0" - cssom@0.3.x: version "0.3.1" resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.1.tgz#c9e37ef2490e64f6d1baa10fda852257082c25d3" @@ -1625,10 +1620,6 @@ isarray@1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" -isemail@1.x.x: - version "1.2.0" - resolved "https://registry.yarnpkg.com/isemail/-/isemail-1.2.0.tgz#be03df8cc3e29de4d2c5df6501263f1fa4595e9a" - isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" @@ -1987,15 +1978,6 @@ jodid25519@^1.0.0: dependencies: jsbn "~0.1.0" -joi@^6.10.1: - version "6.10.1" - resolved "https://registry.yarnpkg.com/joi/-/joi-6.10.1.tgz#4d50c318079122000fe5f16af1ff8e1917b77e06" - dependencies: - hoek "2.x.x" - isemail "1.x.x" - moment "2.x.x" - topo "1.x.x" - js-tokens@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-2.0.0.tgz#79903f5563ee778cc1162e6dcf1a0027c97f9cb5" @@ -2093,14 +2075,19 @@ jsonpointer@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.0.tgz#6661e161d2fc445f19f98430231343722e1fcbd5" -jsonwebtoken@^7.2.1: - version "7.2.1" - resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-7.2.1.tgz#0fc7217473fc02b4c9aa1e188aa70b51bba4fccb" +jsonwebtoken@^8.0.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-8.2.0.tgz#690ec3a9e7e95e2884347ce3e9eb9d389aa598b3" dependencies: - joi "^6.10.1" jws "^3.1.4" + 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 "^0.7.1" + ms "^2.1.1" xtend "^4.0.1" jsprim@^1.2.2: @@ -2184,6 +2171,30 @@ locate-path@^2.0.0: p-locate "^2.0.0" path-exists "^3.0.0" +lodash.includes@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f" + +lodash.isboolean@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz#6c2e171db2a257cd96802fd43b01b20d5f5870f6" + +lodash.isinteger@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz#619c0af3d03f8b04c31f5882840b77b11cd68343" + +lodash.isnumber@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz#3ce76810c5928d03352301ac287317f11c0b1ffc" + +lodash.isplainobject@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" + +lodash.isstring@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" + lodash.once@^4.0.0: version "4.1.1" resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" @@ -2315,10 +2326,6 @@ minimist@~0.0.1: dependencies: minimist "0.0.8" -moment@2.x.x: - version "2.11.2" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.11.2.tgz#87968e5f95ac038c2e42ac959c75819cd3f52901" - mongodb-core@3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/mongodb-core/-/mongodb-core-3.0.3.tgz#496d7dd0052dc3a2e213edf9ddcddc78b47a712c" @@ -2336,7 +2343,7 @@ mri@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/mri/-/mri-1.1.0.tgz#5c0a3f29c8ccffbbb1ec941dcec09d71fa32f36a" -ms@0.7.1, ms@^0.7.1: +ms@0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" @@ -2344,6 +2351,10 @@ ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" +ms@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + nan@^2.3.0: version "2.7.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.7.0.tgz#d95bf721ec877e08db276ed3fc6eb78f9083ad46" @@ -3238,12 +3249,6 @@ to-fast-properties@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.2.tgz#f3f5c0c3ba7299a7ef99427e44633257ade43320" -topo@1.x.x: - version "1.1.0" - resolved "https://registry.yarnpkg.com/topo/-/topo-1.1.0.tgz#e9d751615d1bb87dc865db182fa1ca0a5ef536d5" - dependencies: - hoek "2.x.x" - tough-cookie@>=2.3.3, tough-cookie@^2.3.3, tough-cookie@~2.3.3: version "2.3.4" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655" From 5af4816f0ffe69b78c820b8190237d3eef640d21 Mon Sep 17 00:00:00 2001 From: pradel Date: Wed, 7 Mar 2018 16:45:23 +0100 Subject: [PATCH 102/128] 0.1.0-beta.3 --- packages/accounts-mongo/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index bf11c4728..d153dc68e 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -1,6 +1,6 @@ { "name": "@accounts/mongo", - "version": "0.1.0-beta.2", + "version": "0.1.0-beta.3", "description": "MongoDB adaptor for accounts", "main": "lib/index.js", "typings": "lib/index.d.ts", From e0436b3c41ed6985a711ff95402d1873284e0f67 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 8 Mar 2018 23:59:01 +0000 Subject: [PATCH 103/128] Update dependency @types/node to v9.4.7 --- packages/accounts-mongo/package.json | 2 +- packages/accounts-mongo/yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index d153dc68e..14d8bdd0a 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -54,7 +54,7 @@ "@types/jest": "22.2.0", "@types/lodash": "4.14.104", "@types/mongodb": "3.0.7", - "@types/node": "9.4.6", + "@types/node": "9.4.7", "codecov": "3.0.0", "coveralls": "3.0.0", "husky": "0.14.3", diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index 1507feb69..062d27bfa 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -70,9 +70,9 @@ version "8.0.10" resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.10.tgz#12efec9183b072d5f951cf86395a4c780f868a17" -"@types/node@9.4.6": - version "9.4.6" - resolved "https://registry.yarnpkg.com/@types/node/-/node-9.4.6.tgz#d8176d864ee48753d053783e4e463aec86b8d82e" +"@types/node@9.4.7": + version "9.4.7" + resolved "https://registry.yarnpkg.com/@types/node/-/node-9.4.7.tgz#57d81cd98719df2c9de118f2d5f3b1120dcd7275" abab@^1.0.4: version "1.0.4" From ac96c25ce54dda868d725d08ec21d3d0701f0778 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 12 Mar 2018 12:00:03 +0000 Subject: [PATCH 104/128] Update dependency @accounts/tslint-config-accounts to v0.0.8 --- packages/accounts-mongo/package.json | 2 +- packages/accounts-mongo/yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index 14d8bdd0a..afa5ff847 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -50,7 +50,7 @@ "devDependencies": { "@accounts/common": "0.1.0-beta.3", "@accounts/server": "0.1.0-beta.3", - "@accounts/tslint-config-accounts": "0.0.6", + "@accounts/tslint-config-accounts": "0.0.8", "@types/jest": "22.2.0", "@types/lodash": "4.14.104", "@types/mongodb": "3.0.7", diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index 062d27bfa..039ccf028 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -19,9 +19,9 @@ jwt-decode "^2.1.0" lodash "^4.16.4" -"@accounts/tslint-config-accounts@0.0.6": - version "0.0.6" - resolved "https://registry.yarnpkg.com/@accounts/tslint-config-accounts/-/tslint-config-accounts-0.0.6.tgz#d2ab1480f0aff7c911b2bea9fb924d7f04328931" +"@accounts/tslint-config-accounts@0.0.8": + version "0.0.8" + resolved "https://registry.yarnpkg.com/@accounts/tslint-config-accounts/-/tslint-config-accounts-0.0.8.tgz#7dd1f23a8af48f62cbaebdecab5756ca0b51ed66" dependencies: tslint-config-prettier "^1.1.0" tslint-eslint-rules "^4.1.1" From faf84847fcc9948f50b3bc800bd5ea7b117f3f05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Pradel?= Date: Mon, 12 Mar 2018 13:58:24 +0100 Subject: [PATCH 105/128] Merge pull request #61 from accounts-js/feature/unset-service Add unsetService function --- packages/accounts-mongo/__tests__/index.ts | 20 ++++++++++++++++++++ packages/accounts-mongo/src/mongo.ts | 20 ++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/packages/accounts-mongo/__tests__/index.ts b/packages/accounts-mongo/__tests__/index.ts index d9b18ccf4..181d40df4 100644 --- a/packages/accounts-mongo/__tests__/index.ts +++ b/packages/accounts-mongo/__tests__/index.ts @@ -551,6 +551,26 @@ describe('Mongo', () => { }); }); + describe('unsetService', () => { + it('should not convert id', async () => { + const collection: any = { update: jest.fn() }; + const mockDb: any = { collection: () => collection }; + const mongoOptions = new Mongo(mockDb, { + convertUserIdToMongoObjectId: false, + }); + await mongoOptions.unsetService('toto', 'twitter'); + expect(collection.update.mock.calls[0][0]._id).toBe('toto'); + }); + + it('should unset service', async () => { + const userId = await mongo.createUser(user); + await mongo.setService(userId, 'telegram', { id: '1' }); + await mongo.unsetService(userId, 'telegram'); + const ret = await mongo.findUserByServiceId('telegram', '1'); + expect(ret).not.toBeTruthy(); + }); + }); + describe('createSession', () => { it('should create session', async () => { const token = generateRandomToken(); diff --git a/packages/accounts-mongo/src/mongo.ts b/packages/accounts-mongo/src/mongo.ts index 9f61b3031..854c5f316 100644 --- a/packages/accounts-mongo/src/mongo.ts +++ b/packages/accounts-mongo/src/mongo.ts @@ -348,6 +348,26 @@ export class Mongo implements DBInterface { ); } + public async unsetService( + userId: string, + serviceName: string + ): Promise { + const id = this.options.convertUserIdToMongoObjectId + ? toMongoID(userId) + : userId; + await this.collection.update( + { _id: id }, + { + $set: { + [this.options.timestamps.updatedAt]: this.options.dateProvider(), + }, + $unset: { + [`services.${serviceName}`]: '', + }, + } + ); + } + public async createSession( userId: string, token: string, From d31f86f569e66025ccac1dd88cf5f7b1da6f4230 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 13 Mar 2018 08:53:51 +0000 Subject: [PATCH 106/128] Update dependency @accounts/tslint-config-accounts to v0.0.9 --- packages/accounts-mongo/package.json | 2 +- packages/accounts-mongo/yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/accounts-mongo/package.json b/packages/accounts-mongo/package.json index afa5ff847..092474491 100644 --- a/packages/accounts-mongo/package.json +++ b/packages/accounts-mongo/package.json @@ -50,7 +50,7 @@ "devDependencies": { "@accounts/common": "0.1.0-beta.3", "@accounts/server": "0.1.0-beta.3", - "@accounts/tslint-config-accounts": "0.0.8", + "@accounts/tslint-config-accounts": "0.0.9", "@types/jest": "22.2.0", "@types/lodash": "4.14.104", "@types/mongodb": "3.0.7", diff --git a/packages/accounts-mongo/yarn.lock b/packages/accounts-mongo/yarn.lock index 039ccf028..28d47cf4f 100644 --- a/packages/accounts-mongo/yarn.lock +++ b/packages/accounts-mongo/yarn.lock @@ -19,9 +19,9 @@ jwt-decode "^2.1.0" lodash "^4.16.4" -"@accounts/tslint-config-accounts@0.0.8": - version "0.0.8" - resolved "https://registry.yarnpkg.com/@accounts/tslint-config-accounts/-/tslint-config-accounts-0.0.8.tgz#7dd1f23a8af48f62cbaebdecab5756ca0b51ed66" +"@accounts/tslint-config-accounts@0.0.9": + version "0.0.9" + resolved "https://registry.yarnpkg.com/@accounts/tslint-config-accounts/-/tslint-config-accounts-0.0.9.tgz#a2073361c4127ba7c8662cd72e08a28a794a44df" dependencies: tslint-config-prettier "^1.1.0" tslint-eslint-rules "^4.1.1" From d33724156b38adf57cc1f7c900ab4d3f69e4b6c8 Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Tue, 13 Mar 2018 11:05:30 +0100 Subject: [PATCH 107/128] @accounts/database-mongo : Rename folder + added circleCI mongo image --- .circleci/config.yml | 1 + packages/{accounts-mongo => database-mongo}/.circleci/config.yml | 0 packages/{accounts-mongo => database-mongo}/.gitignore | 0 packages/{accounts-mongo => database-mongo}/README.md | 0 packages/{accounts-mongo => database-mongo}/__tests__/index.ts | 0 packages/{accounts-mongo => database-mongo}/package.json | 0 packages/{accounts-mongo => database-mongo}/src/index.ts | 0 packages/{accounts-mongo => database-mongo}/src/mongo.ts | 0 packages/{accounts-mongo => database-mongo}/tsconfig.json | 0 packages/{accounts-mongo => database-mongo}/tslint.json | 0 packages/{accounts-mongo => database-mongo}/yarn.lock | 0 11 files changed, 1 insertion(+) rename packages/{accounts-mongo => database-mongo}/.circleci/config.yml (100%) rename packages/{accounts-mongo => database-mongo}/.gitignore (100%) rename packages/{accounts-mongo => database-mongo}/README.md (100%) rename packages/{accounts-mongo => database-mongo}/__tests__/index.ts (100%) rename packages/{accounts-mongo => database-mongo}/package.json (100%) rename packages/{accounts-mongo => database-mongo}/src/index.ts (100%) rename packages/{accounts-mongo => database-mongo}/src/mongo.ts (100%) rename packages/{accounts-mongo => database-mongo}/tsconfig.json (100%) rename packages/{accounts-mongo => database-mongo}/tslint.json (100%) rename packages/{accounts-mongo => database-mongo}/yarn.lock (100%) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1594d44d3..fa2bf469b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,6 +4,7 @@ jobs: build: docker: - image: circleci/node:8 + - image: circleci/mongo:3 steps: - checkout - run: yarn install --frozen-lockfile diff --git a/packages/accounts-mongo/.circleci/config.yml b/packages/database-mongo/.circleci/config.yml similarity index 100% rename from packages/accounts-mongo/.circleci/config.yml rename to packages/database-mongo/.circleci/config.yml diff --git a/packages/accounts-mongo/.gitignore b/packages/database-mongo/.gitignore similarity index 100% rename from packages/accounts-mongo/.gitignore rename to packages/database-mongo/.gitignore diff --git a/packages/accounts-mongo/README.md b/packages/database-mongo/README.md similarity index 100% rename from packages/accounts-mongo/README.md rename to packages/database-mongo/README.md diff --git a/packages/accounts-mongo/__tests__/index.ts b/packages/database-mongo/__tests__/index.ts similarity index 100% rename from packages/accounts-mongo/__tests__/index.ts rename to packages/database-mongo/__tests__/index.ts diff --git a/packages/accounts-mongo/package.json b/packages/database-mongo/package.json similarity index 100% rename from packages/accounts-mongo/package.json rename to packages/database-mongo/package.json diff --git a/packages/accounts-mongo/src/index.ts b/packages/database-mongo/src/index.ts similarity index 100% rename from packages/accounts-mongo/src/index.ts rename to packages/database-mongo/src/index.ts diff --git a/packages/accounts-mongo/src/mongo.ts b/packages/database-mongo/src/mongo.ts similarity index 100% rename from packages/accounts-mongo/src/mongo.ts rename to packages/database-mongo/src/mongo.ts diff --git a/packages/accounts-mongo/tsconfig.json b/packages/database-mongo/tsconfig.json similarity index 100% rename from packages/accounts-mongo/tsconfig.json rename to packages/database-mongo/tsconfig.json diff --git a/packages/accounts-mongo/tslint.json b/packages/database-mongo/tslint.json similarity index 100% rename from packages/accounts-mongo/tslint.json rename to packages/database-mongo/tslint.json diff --git a/packages/accounts-mongo/yarn.lock b/packages/database-mongo/yarn.lock similarity index 100% rename from packages/accounts-mongo/yarn.lock rename to packages/database-mongo/yarn.lock From 26a3a569b0f3fef4b8f71cf29e08facab6bce89f Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Tue, 13 Mar 2018 11:09:07 +0100 Subject: [PATCH 108/128] @accounts/mongo : package.json lerna ready --- packages/database-mongo/package.json | 38 +++++----------------------- 1 file changed, 6 insertions(+), 32 deletions(-) diff --git a/packages/database-mongo/package.json b/packages/database-mongo/package.json index 092474491..8fe0487ea 100644 --- a/packages/database-mongo/package.json +++ b/packages/database-mongo/package.json @@ -7,20 +7,10 @@ "scripts": { "start": "tsc --watch", "compile": "tsc", - "test": - "yarn lint && yarn coverage && yarn prettier-diff && yarn run compile", - "testonly": "jest --forceExit", - "lint": "tslint -c tslint.json '{src,__tests__}/**/*.ts'", - "prettier": "prettier '{src,__tests__}/**/*.ts' 'README.md'", - "prettier-diff": "yarn prettier --list-different", - "format": "yarn prettier --write", + "testonly": "jest", + "test:watch": "jest --watch", "coverage": "yarn testonly --coverage", - "codecov": "codecov", - "precommit": "pretty-quick --staged" - }, - "prettier": { - "singleQuote": true, - "trailingComma": "es5" + "prepublishOnly": "yarn compile" }, "renovate": { "extends": ["config:base"], @@ -32,38 +22,22 @@ "files": ["src", "lib"], "jest": { "transform": { - ".(ts|tsx)": "/node_modules/ts-jest/preprocessor.js" + ".(ts|tsx)": "/../../node_modules/ts-jest/preprocessor.js" }, "testRegex": "./__tests__/.*.ts$", "moduleFileExtensions": ["ts", "js"] }, "repository": { "type": "git", - "url": "https://github.com/js-accounts/mongo.git" + "url": "https://github.com/accounts-js/accounts/tree/master/packages/database-mongo" }, "author": "Leo Pradel", "license": "MIT", - "bugs": { - "url": "https://github.com/js-accounts/mongo/issues" - }, - "homepage": "https://github.com/js-accounts/mongo", "devDependencies": { "@accounts/common": "0.1.0-beta.3", "@accounts/server": "0.1.0-beta.3", - "@accounts/tslint-config-accounts": "0.0.9", - "@types/jest": "22.2.0", "@types/lodash": "4.14.104", - "@types/mongodb": "3.0.7", - "@types/node": "9.4.7", - "codecov": "3.0.0", - "coveralls": "3.0.0", - "husky": "0.14.3", - "jest": "22.4.2", - "prettier": "1.11.1", - "pretty-quick": "1.4.1", - "ts-jest": "22.4.1", - "tslint": "5.9.1", - "typescript": "2.7.2" + "@types/mongodb": "3.0.7" }, "peerDependencies": { "@accounts/common": "^0.1.0-beta.3", From d1fcd055269a87a59777b1866d184bbd8fc7cbbc Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Tue, 13 Mar 2018 11:09:48 +0100 Subject: [PATCH 109/128] @accounts/mongo : tsconfig.json lerna ready --- packages/database-mongo/tsconfig.json | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/packages/database-mongo/tsconfig.json b/packages/database-mongo/tsconfig.json index 7621d6196..823be082e 100644 --- a/packages/database-mongo/tsconfig.json +++ b/packages/database-mongo/tsconfig.json @@ -1,14 +1,12 @@ { + "extends": "../../tsconfig.json", "compilerOptions": { "rootDir": "./src", "outDir": "./lib", - "target": "es5", - "sourceMap": true, - "declaration": true, - "pretty": true, - "removeComments": true, - "lib": ["es6"], - "types": ["@types/node"] }, - "exclude": ["node_modules", "__tests__", "lib", "lib-es6"] + "exclude": [ + "node_modules", + "__tests__", + "lib" + ] } From 5fc0a303070e72b1268dec296a74895f5910f18c Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Tue, 13 Mar 2018 11:33:52 +0100 Subject: [PATCH 110/128] set dep tslint-config-accounts to ^0.0.9 --- package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index b24b020b7..169ae52c7 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ }, "license": "MIT", "devDependencies": { - "@accounts/tslint-config-accounts": "0.0.6", + "@accounts/tslint-config-accounts": "^0.0.9", "@types/jest": "22.2.0", "@types/node": "9.4.6", "codecov": "3.0.0", diff --git a/yarn.lock b/yarn.lock index 83b11189c..bb2552113 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,9 +2,9 @@ # yarn lockfile v1 -"@accounts/tslint-config-accounts@0.0.6": - version "0.0.6" - resolved "https://registry.yarnpkg.com/@accounts/tslint-config-accounts/-/tslint-config-accounts-0.0.6.tgz#d2ab1480f0aff7c911b2bea9fb924d7f04328931" +"@accounts/tslint-config-accounts@^0.0.9": + version "0.0.9" + resolved "https://registry.yarnpkg.com/@accounts/tslint-config-accounts/-/tslint-config-accounts-0.0.9.tgz#a2073361c4127ba7c8662cd72e08a28a794a44df" dependencies: tslint-config-prettier "^1.1.0" tslint-eslint-rules "^4.1.1" From 97cf808f67b76f39a1778c2b81f8c52d5943e70c Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Tue, 13 Mar 2018 11:35:07 +0100 Subject: [PATCH 111/128] yarn format --- .../oauth-twitter/src/accounts-oauth-twitter.ts | 1 - .../oauth-twitter/src/types/configuration.ts | 2 +- packages/oauth/__tests__/accounts-oauth.ts | 4 ++-- packages/oauth/src/accounts-oauth.ts | 2 +- packages/oauth/src/types/oauth-options.ts | 4 ++-- packages/oauth/src/types/oauth-user.ts | 2 +- packages/password/__tests__/utils/encryption.ts | 6 +++++- packages/password/src/accounts-password.ts | 17 ++++++++++------- .../password/src/types/password-login-type.ts | 4 ++-- packages/password/src/types/password-type.ts | 2 +- packages/password/src/utils/isEmail.ts | 2 +- packages/server/__tests__/account-server.ts | 2 +- packages/server/src/accounts-server.ts | 16 ++++++++-------- packages/server/src/index.ts | 8 ++++---- .../server/src/types/accounts-server-options.ts | 8 ++++---- packages/server/src/types/auth-service.ts | 4 ++-- .../src/types/connection-informations-type.ts | 2 +- packages/server/src/types/db-interface.ts | 2 +- .../server/src/types/email-template-type.ts | 2 +- .../server/src/types/email-templates-type.ts | 4 ++-- packages/server/src/types/email-type.ts | 4 ++-- packages/server/src/types/jwt-data.ts | 2 +- .../src/types/resume-session-validator.ts | 2 +- packages/server/src/types/send-mail-type.ts | 2 +- packages/server/src/types/token-record.ts | 2 +- .../src/types/user-object-sanitizer-function.ts | 2 +- packages/server/src/utils/server-hooks.ts | 2 +- 27 files changed, 58 insertions(+), 52 deletions(-) diff --git a/packages/oauth-twitter/src/accounts-oauth-twitter.ts b/packages/oauth-twitter/src/accounts-oauth-twitter.ts index ffad0ce6d..bbd31da4a 100644 --- a/packages/oauth-twitter/src/accounts-oauth-twitter.ts +++ b/packages/oauth-twitter/src/accounts-oauth-twitter.ts @@ -2,7 +2,6 @@ import * as oauth from 'oauth'; import { Configuration } from './types/configuration'; - export class AccountsOAuthTwitter { private config: Configuration; private oauth: any; diff --git a/packages/oauth-twitter/src/types/configuration.ts b/packages/oauth-twitter/src/types/configuration.ts index 7732cf914..f64a72efc 100644 --- a/packages/oauth-twitter/src/types/configuration.ts +++ b/packages/oauth-twitter/src/types/configuration.ts @@ -1,4 +1,4 @@ export interface Configuration { key: string; secret: string; -} \ No newline at end of file +} diff --git a/packages/oauth/__tests__/accounts-oauth.ts b/packages/oauth/__tests__/accounts-oauth.ts index 56993901c..e51791575 100644 --- a/packages/oauth/__tests__/accounts-oauth.ts +++ b/packages/oauth/__tests__/accounts-oauth.ts @@ -63,7 +63,7 @@ describe('AccountsOauth', () => { } }); - it('should call provider\'s authenticate method in order to get the user itself', async () => { + it("should call provider's authenticate method in order to get the user itself", async () => { const authSpy = jest.fn(() => ({ id: '312312', name: 'Mr. Anderson', @@ -150,7 +150,7 @@ describe('AccountsOauth', () => { }); }); - it('should update the user\'s profile if logged in after change in profile', async () => { + it("should update the user's profile if logged in after change in profile", async () => { const userChanged = { id: '312312', name: 'Mr. Anderson', diff --git a/packages/oauth/src/accounts-oauth.ts b/packages/oauth/src/accounts-oauth.ts index 2bafd2f2e..c3194f33f 100644 --- a/packages/oauth/src/accounts-oauth.ts +++ b/packages/oauth/src/accounts-oauth.ts @@ -2,7 +2,7 @@ import { UserObjectType } from '@accounts/common'; import { AccountsServer, DBInterface, AuthService } from '@accounts/server'; import * as requestPromise from 'request-promise'; -import { OAuthOptions } from './types/oauth-options' +import { OAuthOptions } from './types/oauth-options'; export class AccountsOauth implements AuthService { public server: AccountsServer; diff --git a/packages/oauth/src/types/oauth-options.ts b/packages/oauth/src/types/oauth-options.ts index b98bc99dd..d5c5deae0 100644 --- a/packages/oauth/src/types/oauth-options.ts +++ b/packages/oauth/src/types/oauth-options.ts @@ -1,7 +1,7 @@ -import { OAuthUser } from './oauth-user' +import { OAuthUser } from './oauth-user'; export interface OAuthOptions { [provider: string]: { authenticate: (params: any) => Promise; }; -} \ No newline at end of file +} diff --git a/packages/oauth/src/types/oauth-user.ts b/packages/oauth/src/types/oauth-user.ts index 00f91e28d..270c60f4f 100644 --- a/packages/oauth/src/types/oauth-user.ts +++ b/packages/oauth/src/types/oauth-user.ts @@ -2,4 +2,4 @@ export interface OAuthUser { id: string; email?: string; profile?: object; -} \ No newline at end of file +} diff --git a/packages/password/__tests__/utils/encryption.ts b/packages/password/__tests__/utils/encryption.ts index 9087f54bb..eb17e3f2d 100644 --- a/packages/password/__tests__/utils/encryption.ts +++ b/packages/password/__tests__/utils/encryption.ts @@ -1,4 +1,8 @@ -import { bcryptPassword, hashPassword, verifyPassword } from '../../src/utils/encryption'; +import { + bcryptPassword, + hashPassword, + verifyPassword, +} from '../../src/utils/encryption'; describe('encryption', () => { describe('bcryptPassword', () => { diff --git a/packages/password/src/accounts-password.ts b/packages/password/src/accounts-password.ts index ed143bfe9..bf2bace82 100644 --- a/packages/password/src/accounts-password.ts +++ b/packages/password/src/accounts-password.ts @@ -21,16 +21,19 @@ import { AccountsServer, generateRandomToken, AuthService, - getFirstUserEmail + getFirstUserEmail, } from '@accounts/server'; -import { hashPassword, bcryptPassword, verifyPassword } from './utils/encryption'; - +import { + hashPassword, + bcryptPassword, + verifyPassword, +} from './utils/encryption'; -import { PasswordCreateUserType } from './types/password-create-user-type' -import { PasswordLoginType } from './types/password-login-type' -import { PasswordType } from './types/password-type' +import { PasswordCreateUserType } from './types/password-create-user-type'; +import { PasswordLoginType } from './types/password-login-type'; +import { PasswordType } from './types/password-type'; -import { isEmail } from './utils/isEmail' +import { isEmail } from './utils/isEmail'; export interface AccountsPasswordOptions { passwordHashAlgorithm?: HashAlgorithm; diff --git a/packages/password/src/types/password-login-type.ts b/packages/password/src/types/password-login-type.ts index 52aa85740..f2aadf47f 100644 --- a/packages/password/src/types/password-login-type.ts +++ b/packages/password/src/types/password-login-type.ts @@ -1,7 +1,7 @@ import { LoginUserIdentityType } from '@accounts/common'; -import { PasswordType } from './password-type' +import { PasswordType } from './password-type'; export interface PasswordLoginType { user: string | LoginUserIdentityType; password: PasswordType; -} \ No newline at end of file +} diff --git a/packages/password/src/types/password-type.ts b/packages/password/src/types/password-type.ts index 6d91a07f2..0eede99bc 100644 --- a/packages/password/src/types/password-type.ts +++ b/packages/password/src/types/password-type.ts @@ -5,4 +5,4 @@ export type PasswordType = | { digest: string; algorithm: HashAlgorithm; - }; \ No newline at end of file + }; diff --git a/packages/password/src/utils/isEmail.ts b/packages/password/src/utils/isEmail.ts index 2fad4d43b..c3e096484 100644 --- a/packages/password/src/utils/isEmail.ts +++ b/packages/password/src/utils/isEmail.ts @@ -1,4 +1,4 @@ export const isEmail = (email?: string) => { const re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; return email && re.test(email); -}; \ No newline at end of file +}; diff --git a/packages/server/__tests__/account-server.ts b/packages/server/__tests__/account-server.ts index 621fada74..fc41ddf1d 100644 --- a/packages/server/__tests__/account-server.ts +++ b/packages/server/__tests__/account-server.ts @@ -1,6 +1,6 @@ import * as jwtDecode from 'jwt-decode'; import { AccountsServer } from '../src/accounts-server'; -import { JwtData } from '../src/types/jwt-data' +import { JwtData } from '../src/types/jwt-data'; import { bcryptPassword, hashPassword, diff --git a/packages/server/src/accounts-server.ts b/packages/server/src/accounts-server.ts index 5c03d01f2..13356125f 100644 --- a/packages/server/src/accounts-server.ts +++ b/packages/server/src/accounts-server.ts @@ -21,14 +21,14 @@ import { import { emailTemplates, sendMail } from './utils/email'; import { ServerHooks } from './utils/server-hooks'; -import { AccountsServerOptions } from './types/accounts-server-options' -import { ConnectionInformationsType } from './types/connection-informations-type' -import { AuthService } from './types/auth-service' -import { DBInterface } from './types/db-interface' -import { TokenRecord } from './types/token-record' -import { JwtData } from './types/jwt-data' -import { RemoveListenerHandle } from './types/remove-listener-handle' -import { EmailTemplateType } from './types/email-template-type' +import { AccountsServerOptions } from './types/accounts-server-options'; +import { ConnectionInformationsType } from './types/connection-informations-type'; +import { AuthService } from './types/auth-service'; +import { DBInterface } from './types/db-interface'; +import { TokenRecord } from './types/token-record'; +import { JwtData } from './types/jwt-data'; +import { RemoveListenerHandle } from './types/remove-listener-handle'; +import { EmailTemplateType } from './types/email-template-type'; const defaultOptions = { tokenSecret: 'secret', diff --git a/packages/server/src/index.ts b/packages/server/src/index.ts index 279dcc76f..492a03f1f 100644 --- a/packages/server/src/index.ts +++ b/packages/server/src/index.ts @@ -3,9 +3,9 @@ import * as encryption from './utils/encryption'; import { generateRandomToken } from './utils/tokens'; import { getFirstUserEmail } from './utils/get-first-user-email'; -import { ConnectionInformationsType } from './types/connection-informations-type' -import { AuthService } from './types/auth-service' -import { DBInterface } from './types/db-interface' +import { ConnectionInformationsType } from './types/connection-informations-type'; +import { AuthService } from './types/auth-service'; +import { DBInterface } from './types/db-interface'; export default AccountsServer; export { @@ -15,5 +15,5 @@ export { DBInterface, generateRandomToken, ConnectionInformationsType, - getFirstUserEmail + getFirstUserEmail, }; diff --git a/packages/server/src/types/accounts-server-options.ts b/packages/server/src/types/accounts-server-options.ts index 9b4657a21..62ed3024a 100644 --- a/packages/server/src/types/accounts-server-options.ts +++ b/packages/server/src/types/accounts-server-options.ts @@ -1,7 +1,7 @@ import { UserObjectType } from '@accounts/common'; -import { DBInterface } from './db-interface' -import { EmailTemplateType } from './email-template-type' -import { EmailTemplatesType } from './email-templates-type' +import { DBInterface } from './db-interface'; +import { EmailTemplateType } from './email-template-type'; +import { EmailTemplatesType } from './email-templates-type'; import { UserObjectSanitizerFunction } from './user-object-sanitizer-function'; import { ResumeSessionValidator } from './resume-session-validator'; import { PrepareMailFunction } from './prepare-mail-function'; @@ -31,4 +31,4 @@ export interface AccountsServerOptions { sendMail?: SendMailType; // https://github.com/eleith/emailjs#emailserverconnectoptions email?: object; -} \ No newline at end of file +} diff --git a/packages/server/src/types/auth-service.ts b/packages/server/src/types/auth-service.ts index 5edca8343..e3c8f769d 100644 --- a/packages/server/src/types/auth-service.ts +++ b/packages/server/src/types/auth-service.ts @@ -1,5 +1,5 @@ import { UserObjectType } from '@accounts/common'; -import { DBInterface } from './db-interface' +import { DBInterface } from './db-interface'; import { AccountsServer } from '../accounts-server'; @@ -8,4 +8,4 @@ export interface AuthService { serviceName: string; setStore(store: DBInterface): void; authenticate(params: any): Promise; -} \ No newline at end of file +} diff --git a/packages/server/src/types/connection-informations-type.ts b/packages/server/src/types/connection-informations-type.ts index 772704490..e563525d6 100644 --- a/packages/server/src/types/connection-informations-type.ts +++ b/packages/server/src/types/connection-informations-type.ts @@ -1,4 +1,4 @@ export interface ConnectionInformationsType { ip?: string; userAgent?: string; -} \ No newline at end of file +} diff --git a/packages/server/src/types/db-interface.ts b/packages/server/src/types/db-interface.ts index ce951b77d..f4e7ab8e1 100644 --- a/packages/server/src/types/db-interface.ts +++ b/packages/server/src/types/db-interface.ts @@ -64,4 +64,4 @@ export interface DBInterface { ): Promise; invalidateSession(sessionId: string): Promise; invalidateAllSessions(userId: string): Promise; -} \ No newline at end of file +} diff --git a/packages/server/src/types/email-template-type.ts b/packages/server/src/types/email-template-type.ts index 02563f032..c8ddfd6d8 100644 --- a/packages/server/src/types/email-template-type.ts +++ b/packages/server/src/types/email-template-type.ts @@ -1,5 +1,5 @@ import { UserObjectType } from '@accounts/common'; - + export interface EmailTemplateType { from?: string; subject: (user?: UserObjectType) => string; diff --git a/packages/server/src/types/email-templates-type.ts b/packages/server/src/types/email-templates-type.ts index 676ecb2e6..2c8f18d6a 100644 --- a/packages/server/src/types/email-templates-type.ts +++ b/packages/server/src/types/email-templates-type.ts @@ -1,8 +1,8 @@ -import { EmailTemplateType } from './email-template-type' +import { EmailTemplateType } from './email-template-type'; export interface EmailTemplatesType { from: string; verifyEmail: EmailTemplateType; resetPassword: EmailTemplateType; enrollAccount: EmailTemplateType; -} \ No newline at end of file +} diff --git a/packages/server/src/types/email-type.ts b/packages/server/src/types/email-type.ts index 577eb2807..b561ea33f 100644 --- a/packages/server/src/types/email-type.ts +++ b/packages/server/src/types/email-type.ts @@ -1,3 +1,3 @@ -import { EmailTemplateType } from './email-template-type' +import { EmailTemplateType } from './email-template-type'; -export type EmailType = EmailTemplateType & { to: string }; \ No newline at end of file +export type EmailType = EmailTemplateType & { to: string }; diff --git a/packages/server/src/types/jwt-data.ts b/packages/server/src/types/jwt-data.ts index f3c99e51f..c637c04ef 100644 --- a/packages/server/src/types/jwt-data.ts +++ b/packages/server/src/types/jwt-data.ts @@ -1,4 +1,4 @@ export interface JwtData { token: string; isImpersonated: boolean; -} \ No newline at end of file +} diff --git a/packages/server/src/types/resume-session-validator.ts b/packages/server/src/types/resume-session-validator.ts index 230cd12da..1ca60cee4 100644 --- a/packages/server/src/types/resume-session-validator.ts +++ b/packages/server/src/types/resume-session-validator.ts @@ -3,4 +3,4 @@ import { UserObjectType, SessionType } from '@accounts/common'; export type ResumeSessionValidator = ( user: UserObjectType, session: SessionType -) => Promise; \ No newline at end of file +) => Promise; diff --git a/packages/server/src/types/send-mail-type.ts b/packages/server/src/types/send-mail-type.ts index b8aab732d..a08d843f7 100644 --- a/packages/server/src/types/send-mail-type.ts +++ b/packages/server/src/types/send-mail-type.ts @@ -1 +1 @@ -export type SendMailType = (mail: object) => Promise; \ No newline at end of file +export type SendMailType = (mail: object) => Promise; diff --git a/packages/server/src/types/token-record.ts b/packages/server/src/types/token-record.ts index d68ecd50b..3df3ef3f6 100644 --- a/packages/server/src/types/token-record.ts +++ b/packages/server/src/types/token-record.ts @@ -3,4 +3,4 @@ export interface TokenRecord { address: string; when: number; reason: string; -} \ No newline at end of file +} diff --git a/packages/server/src/types/user-object-sanitizer-function.ts b/packages/server/src/types/user-object-sanitizer-function.ts index f83f191f0..14924489a 100644 --- a/packages/server/src/types/user-object-sanitizer-function.ts +++ b/packages/server/src/types/user-object-sanitizer-function.ts @@ -4,4 +4,4 @@ export type UserObjectSanitizerFunction = ( userObject: UserObjectType, omitFunction: (userDoc: object, fields: string[]) => UserObjectType, pickFunction: (userDoc: object, fields: string[]) => UserObjectType -) => any; \ No newline at end of file +) => any; diff --git a/packages/server/src/utils/server-hooks.ts b/packages/server/src/utils/server-hooks.ts index 18d76371f..f9d1b5e37 100644 --- a/packages/server/src/utils/server-hooks.ts +++ b/packages/server/src/utils/server-hooks.ts @@ -11,4 +11,4 @@ export const ServerHooks = { RefreshTokensError: 'RefreshTokensError', ImpersonationSuccess: 'ImpersonationSuccess', ImpersonationError: 'ImpersonationError', -}; \ No newline at end of file +}; From 857ba778293b7bc5c5217a3b7e1f0510a3cb7064 Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Tue, 13 Mar 2018 11:42:57 +0100 Subject: [PATCH 112/128] package.json tslint-config-accounts set to strict 0.0.9 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 169ae52c7..96e0c5f5b 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ }, "license": "MIT", "devDependencies": { - "@accounts/tslint-config-accounts": "^0.0.9", + "@accounts/tslint-config-accounts": "0.0.9", "@types/jest": "22.2.0", "@types/node": "9.4.6", "codecov": "3.0.0", From b4c6b6bcef793f62ca6a532caa104e45fd58ce32 Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Tue, 13 Mar 2018 11:44:24 +0100 Subject: [PATCH 113/128] updated yarn lockfile --- yarn.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn.lock b/yarn.lock index bb2552113..0c631f446 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,7 +2,7 @@ # yarn lockfile v1 -"@accounts/tslint-config-accounts@^0.0.9": +"@accounts/tslint-config-accounts@0.0.9": version "0.0.9" resolved "https://registry.yarnpkg.com/@accounts/tslint-config-accounts/-/tslint-config-accounts-0.0.9.tgz#a2073361c4127ba7c8662cd72e08a28a794a44df" dependencies: From 1fb9ffbb0667ba52450ce259008e2847d667a534 Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Tue, 13 Mar 2018 12:38:38 +0100 Subject: [PATCH 114/128] @accounts/mongo : removed renovate config + removed .gitignore + removed tslint.json + removed .circleci folder --- packages/database-mongo/.circleci/config.yml | 12 ------------ packages/database-mongo/.gitignore | 7 ------- packages/database-mongo/package.json | 7 ------- packages/database-mongo/tslint.json | 5 ----- 4 files changed, 31 deletions(-) delete mode 100644 packages/database-mongo/.circleci/config.yml delete mode 100644 packages/database-mongo/.gitignore delete mode 100644 packages/database-mongo/tslint.json diff --git a/packages/database-mongo/.circleci/config.yml b/packages/database-mongo/.circleci/config.yml deleted file mode 100644 index fa2bf469b..000000000 --- a/packages/database-mongo/.circleci/config.yml +++ /dev/null @@ -1,12 +0,0 @@ -version: 2 - -jobs: - build: - docker: - - image: circleci/node:8 - - image: circleci/mongo:3 - steps: - - checkout - - run: yarn install --frozen-lockfile - - run: yarn test - - run: yarn codecov diff --git a/packages/database-mongo/.gitignore b/packages/database-mongo/.gitignore deleted file mode 100644 index 8525e75e2..000000000 --- a/packages/database-mongo/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -lib/ -node_modules/ -coverage/ -npm-debug.log -yarn-error.log -.idea -lib-es6 diff --git a/packages/database-mongo/package.json b/packages/database-mongo/package.json index 8fe0487ea..b1e125452 100644 --- a/packages/database-mongo/package.json +++ b/packages/database-mongo/package.json @@ -12,13 +12,6 @@ "coverage": "yarn testonly --coverage", "prepublishOnly": "yarn compile" }, - "renovate": { - "extends": ["config:base"], - "automerge": true, - "major": { - "automerge": false - } - }, "files": ["src", "lib"], "jest": { "transform": { diff --git a/packages/database-mongo/tslint.json b/packages/database-mongo/tslint.json deleted file mode 100644 index 6de63f851..000000000 --- a/packages/database-mongo/tslint.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": [ - "@accounts/tslint-config-accounts" - ] -} From 4dbad787ba4c1cbd38cb76718dd7787f7df8855f Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Sat, 10 Mar 2018 14:17:37 +0100 Subject: [PATCH 115/128] AccountsServer : File Structure Changes ( types relocation and utils relocation ) --- packages/password/src/accounts-password.ts | 2 +- .../{accounts-server.ts => AccountsServer.ts} | 5 +- ...-server.ts.snap => AccountsServer.ts.snap} | 0 .../{ => utils}/__snapshots__/email.ts.snap | 0 .../server/__tests__/{ => utils}/email.ts | 2 +- .../__tests__/{ => utils}/encryption.ts | 2 +- .../{accounts-server.ts => AccountsServer.ts} | 58 +++++++--------- packages/server/src/index.ts | 13 ++-- .../server/src/types/AccountsServerOptions.ts | 34 ++++++++++ packages/server/src/types/AuthService.ts | 11 +++ .../src/types/ConnectionInformationsType.ts | 4 ++ .../src/{types.ts => types/DBInterface.ts} | 67 +------------------ .../server/src/types/EmailTemplateType.ts | 7 ++ .../server/src/types/EmailTemplatesType.ts | 8 +++ packages/server/src/types/EmailType.ts | 3 + packages/server/src/types/JwtData.ts | 4 ++ .../server/src/types/PrepareMailFunction.ts | 11 +++ .../server/src/types/RemoveListenerHandle.ts | 2 + .../src/types/ResumeSessionValidator.ts | 6 ++ packages/server/src/types/SendMailType.ts | 1 + packages/server/src/types/TokenRecord.ts | 6 ++ .../src/types/UserObjectSanitizerFunction.ts | 7 ++ packages/server/src/{ => utils}/email.ts | 15 +---- packages/server/src/{ => utils}/encryption.ts | 0 .../{utils.ts => utils/getFirstUserEmail.ts} | 0 packages/server/src/utils/serverHooks.ts | 14 ++++ packages/server/src/{ => utils}/tokens.ts | 0 27 files changed, 162 insertions(+), 120 deletions(-) rename packages/server/__tests__/{accounts-server.ts => AccountsServer.ts} (99%) rename packages/server/__tests__/__snapshots__/{accounts-server.ts.snap => AccountsServer.ts.snap} (100%) rename packages/server/__tests__/{ => utils}/__snapshots__/email.ts.snap (100%) rename packages/server/__tests__/{ => utils}/email.ts (92%) rename packages/server/__tests__/{ => utils}/encryption.ts (96%) rename packages/server/src/{accounts-server.ts => AccountsServer.ts} (94%) create mode 100644 packages/server/src/types/AccountsServerOptions.ts create mode 100644 packages/server/src/types/AuthService.ts create mode 100644 packages/server/src/types/ConnectionInformationsType.ts rename packages/server/src/{types.ts => types/DBInterface.ts} (55%) create mode 100644 packages/server/src/types/EmailTemplateType.ts create mode 100644 packages/server/src/types/EmailTemplatesType.ts create mode 100644 packages/server/src/types/EmailType.ts create mode 100644 packages/server/src/types/JwtData.ts create mode 100644 packages/server/src/types/PrepareMailFunction.ts create mode 100644 packages/server/src/types/RemoveListenerHandle.ts create mode 100644 packages/server/src/types/ResumeSessionValidator.ts create mode 100644 packages/server/src/types/SendMailType.ts create mode 100644 packages/server/src/types/TokenRecord.ts create mode 100644 packages/server/src/types/UserObjectSanitizerFunction.ts rename packages/server/src/{ => utils}/email.ts (75%) rename packages/server/src/{ => utils}/encryption.ts (100%) rename packages/server/src/{utils.ts => utils/getFirstUserEmail.ts} (100%) create mode 100644 packages/server/src/utils/serverHooks.ts rename packages/server/src/{ => utils}/tokens.ts (100%) diff --git a/packages/password/src/accounts-password.ts b/packages/password/src/accounts-password.ts index 4458f2b1e..78409ec0e 100644 --- a/packages/password/src/accounts-password.ts +++ b/packages/password/src/accounts-password.ts @@ -21,8 +21,8 @@ import { AccountsServer, generateRandomToken, AuthService, + getFirstUserEmail } from '@accounts/server'; -import { getFirstUserEmail } from '@accounts/server/lib/utils'; import { hashPassword, bcryptPassword, verifyPassword } from './encryption'; import { PasswordCreateUserType, diff --git a/packages/server/__tests__/accounts-server.ts b/packages/server/__tests__/AccountsServer.ts similarity index 99% rename from packages/server/__tests__/accounts-server.ts rename to packages/server/__tests__/AccountsServer.ts index f46d3c059..028833455 100644 --- a/packages/server/__tests__/accounts-server.ts +++ b/packages/server/__tests__/AccountsServer.ts @@ -1,10 +1,11 @@ import * as jwtDecode from 'jwt-decode'; -import { AccountsServer, JwtData } from '../src/accounts-server'; +import { AccountsServer } from '../src/AccountsServer'; +import { JwtData } from '../src/types/JwtData' import { bcryptPassword, hashPassword, verifyPassword, -} from '../src/encryption'; +} from '../src/utils/encryption'; describe('AccountsServer', () => { const db = { diff --git a/packages/server/__tests__/__snapshots__/accounts-server.ts.snap b/packages/server/__tests__/__snapshots__/AccountsServer.ts.snap similarity index 100% rename from packages/server/__tests__/__snapshots__/accounts-server.ts.snap rename to packages/server/__tests__/__snapshots__/AccountsServer.ts.snap diff --git a/packages/server/__tests__/__snapshots__/email.ts.snap b/packages/server/__tests__/utils/__snapshots__/email.ts.snap similarity index 100% rename from packages/server/__tests__/__snapshots__/email.ts.snap rename to packages/server/__tests__/utils/__snapshots__/email.ts.snap diff --git a/packages/server/__tests__/email.ts b/packages/server/__tests__/utils/email.ts similarity index 92% rename from packages/server/__tests__/email.ts rename to packages/server/__tests__/utils/email.ts index a9d8957de..344609535 100644 --- a/packages/server/__tests__/email.ts +++ b/packages/server/__tests__/utils/email.ts @@ -1,4 +1,4 @@ -import { emailTemplates } from '../src/email'; +import { emailTemplates } from '../../src/utils/email'; describe('email', () => { describe('emailTemplates', () => { diff --git a/packages/server/__tests__/encryption.ts b/packages/server/__tests__/utils/encryption.ts similarity index 96% rename from packages/server/__tests__/encryption.ts rename to packages/server/__tests__/utils/encryption.ts index 3143fc60a..c469fcd14 100644 --- a/packages/server/__tests__/encryption.ts +++ b/packages/server/__tests__/utils/encryption.ts @@ -2,7 +2,7 @@ import { bcryptPassword, hashPassword, verifyPassword, -} from '../src/encryption'; +} from '../../src/utils/encryption'; describe('bcryptPassword', () => { it('hashes password using bcrypt', async () => { diff --git a/packages/server/src/accounts-server.ts b/packages/server/src/AccountsServer.ts similarity index 94% rename from packages/server/src/accounts-server.ts rename to packages/server/src/AccountsServer.ts index 37fa56881..2c70115dd 100644 --- a/packages/server/src/accounts-server.ts +++ b/packages/server/src/AccountsServer.ts @@ -16,26 +16,18 @@ import { generateAccessToken, generateRefreshToken, generateRandomToken, -} from './tokens'; -import { emailTemplates, EmailTemplateType, sendMail } from './email'; -import { - AccountsServerOptions, - ConnectionInformationsType, - AuthService, - DBInterface, -} from './types'; - -export interface TokenRecord { - token: string; - address: string; - when: number; - reason: string; -} +} from './utils/tokens'; -export interface JwtData { - token: string; - isImpersonated: boolean; -} +import { emailTemplates, sendMail } from './utils/email'; + +import { AccountsServerOptions } from './types/AccountsServerOptions' +import { ConnectionInformationsType } from './types/ConnectionInformationsType' +import { AuthService } from './types/AuthService' +import { DBInterface } from './types/DBInterface' +import { TokenRecord } from './types/TokenRecord' +import { JwtData } from './types/JwtData' +import { RemoveListenerHandle } from './types/RemoveListenerHandle' +import { EmailTemplateType } from './types/EmailTemplateType' const defaultOptions = { tokenSecret: 'secret', @@ -53,8 +45,6 @@ const defaultOptions = { siteUrl: 'http://localhost:3000', }; -export type RemoveListnerHandle = () => EventEmitter; - export const ServerHooks = { LoginSuccess: 'LoginSuccess', LoginError: 'LoginError', @@ -105,51 +95,51 @@ export class AccountsServer { return this.options; } - public onLoginSuccess(callback: HookListener): RemoveListnerHandle { + public onLoginSuccess(callback: HookListener): RemoveListenerHandle { return this.on(ServerHooks.LoginSuccess, callback); } - public onLoginError(callback: HookListener): RemoveListnerHandle { + public onLoginError(callback: HookListener): RemoveListenerHandle { return this.on(ServerHooks.LoginError, callback); } - public onLogoutSuccess(callback: HookListener): RemoveListnerHandle { + public onLogoutSuccess(callback: HookListener): RemoveListenerHandle { return this.on(ServerHooks.LogoutSuccess, callback); } - public onLogoutError(callback: HookListener): RemoveListnerHandle { + public onLogoutError(callback: HookListener): RemoveListenerHandle { return this.on(ServerHooks.LogoutError, callback); } - public onCreateUserSuccess(callback: HookListener): RemoveListnerHandle { + public onCreateUserSuccess(callback: HookListener): RemoveListenerHandle { return this.on(ServerHooks.CreateUserSuccess, callback); } - public onCreateUserError(callback: HookListener): RemoveListnerHandle { + public onCreateUserError(callback: HookListener): RemoveListenerHandle { return this.on(ServerHooks.CreateUserError, callback); } - public onResumeSessionSuccess(callback: HookListener): RemoveListnerHandle { + public onResumeSessionSuccess(callback: HookListener): RemoveListenerHandle { return this.on(ServerHooks.ResumeSessionSuccess, callback); } - public onResumeSessionError(callback: HookListener): RemoveListnerHandle { + public onResumeSessionError(callback: HookListener): RemoveListenerHandle { return this.on(ServerHooks.ResumeSessionError, callback); } - public onRefreshTokensSuccess(callback: HookListener): RemoveListnerHandle { + public onRefreshTokensSuccess(callback: HookListener): RemoveListenerHandle { return this.on(ServerHooks.RefreshTokensSuccess, callback); } - public onRefreshTokensError(callback: HookListener): RemoveListnerHandle { + public onRefreshTokensError(callback: HookListener): RemoveListenerHandle { return this.on(ServerHooks.RefreshTokensError, callback); } - public onImpersonationSuccess(callback: HookListener): RemoveListnerHandle { + public onImpersonationSuccess(callback: HookListener): RemoveListenerHandle { return this.on(ServerHooks.ImpersonationSuccess, callback); } - public onImpersonationError(callback: HookListener): RemoveListnerHandle { + public onImpersonationError(callback: HookListener): RemoveListenerHandle { return this.on(ServerHooks.ImpersonationError, callback); } @@ -542,7 +532,7 @@ export class AccountsServer { return this.db.setProfile(userId, { ...user.profile, ...profile }); } - public on(eventName: string, callback: HookListener): RemoveListnerHandle { + public on(eventName: string, callback: HookListener): RemoveListenerHandle { this.hooks.on(eventName, callback); return () => this.hooks.removeListener(eventName, callback); diff --git a/packages/server/src/index.ts b/packages/server/src/index.ts index aaaa1073c..e3b25a9cf 100644 --- a/packages/server/src/index.ts +++ b/packages/server/src/index.ts @@ -1,7 +1,11 @@ -import { AccountsServer } from './accounts-server'; -import * as encryption from './encryption'; -import { generateRandomToken } from './tokens'; -import { AuthService, DBInterface, ConnectionInformationsType } from './types'; +import { AccountsServer } from './AccountsServer'; +import * as encryption from './utils/encryption'; +import { generateRandomToken } from './utils/tokens'; +import { getFirstUserEmail } from './utils/getFirstUserEmail'; + +import { ConnectionInformationsType } from './types/ConnectionInformationsType' +import { AuthService } from './types/AuthService' +import { DBInterface } from './types/DBInterface' export default AccountsServer; export { @@ -11,4 +15,5 @@ export { DBInterface, generateRandomToken, ConnectionInformationsType, + getFirstUserEmail }; diff --git a/packages/server/src/types/AccountsServerOptions.ts b/packages/server/src/types/AccountsServerOptions.ts new file mode 100644 index 000000000..4c6db8be1 --- /dev/null +++ b/packages/server/src/types/AccountsServerOptions.ts @@ -0,0 +1,34 @@ +import { UserObjectType } from '@accounts/common'; +import { DBInterface } from './DBInterface' +import { EmailTemplateType } from './EmailTemplateType' +import { EmailTemplatesType } from './EmailTemplatesType' +import { UserObjectSanitizerFunction } from './UserObjectSanitizerFunction'; +import { ResumeSessionValidator } from './ResumeSessionValidator'; +import { PrepareMailFunction } from './PrepareMailFunction'; +import { SendMailType } from './SendMailType'; + +export interface AccountsServerOptions { + db: DBInterface; + tokenSecret: string; + tokenConfigs?: { + accessToken?: { + expiresIn?: string; + }; + refreshToken?: { + expiresIn?: string; + }; + }; + emailTokensExpiry?: number; + emailTemplates?: EmailTemplatesType; + userObjectSanitizer?: UserObjectSanitizerFunction; + impersonationAuthorize?: ( + user: UserObjectType, + impersonateToUser: UserObjectType + ) => Promise; + resumeSessionValidator?: ResumeSessionValidator; + siteUrl?: string; + prepareMail?: PrepareMailFunction; + sendMail?: SendMailType; + // https://github.com/eleith/emailjs#emailserverconnectoptions + email?: object; +} \ No newline at end of file diff --git a/packages/server/src/types/AuthService.ts b/packages/server/src/types/AuthService.ts new file mode 100644 index 000000000..db09cd5be --- /dev/null +++ b/packages/server/src/types/AuthService.ts @@ -0,0 +1,11 @@ +import { UserObjectType } from '@accounts/common'; +import { DBInterface } from './DBInterface' + +import { AccountsServer } from '../AccountsServer'; + +export interface AuthService { + server: AccountsServer; + serviceName: string; + setStore(store: DBInterface): void; + authenticate(params: any): Promise; +} \ No newline at end of file diff --git a/packages/server/src/types/ConnectionInformationsType.ts b/packages/server/src/types/ConnectionInformationsType.ts new file mode 100644 index 000000000..772704490 --- /dev/null +++ b/packages/server/src/types/ConnectionInformationsType.ts @@ -0,0 +1,4 @@ +export interface ConnectionInformationsType { + ip?: string; + userAgent?: string; +} \ No newline at end of file diff --git a/packages/server/src/types.ts b/packages/server/src/types/DBInterface.ts similarity index 55% rename from packages/server/src/types.ts rename to packages/server/src/types/DBInterface.ts index e6f308c01..d25834e62 100644 --- a/packages/server/src/types.ts +++ b/packages/server/src/types/DBInterface.ts @@ -1,66 +1,5 @@ -import { UserObjectType, CreateUserType, SessionType } from '@accounts/common'; -import { EmailTemplatesType, EmailTemplateType, SendMailType } from './email'; -import { AccountsServer } from './accounts-server'; - -export interface AuthService { - server: AccountsServer; - serviceName: string; - setStore(store: DBInterface): void; - authenticate(params: any): Promise; -} - -export type UserObjectSanitizerFunction = ( - userObject: UserObjectType, - omitFunction: (userDoc: object, fields: string[]) => UserObjectType, - pickFunction: (userDoc: object, fields: string[]) => UserObjectType -) => any; - -export type ResumeSessionValidator = ( - user: UserObjectType, - session: SessionType -) => Promise; - -export type PrepareMailFunction = ( - to: string, - token: string, - user: UserObjectType, - pathFragment: string, - emailTemplate: EmailTemplateType, - from: string -) => object; - -export type EmailType = EmailTemplateType & { to: string }; - -export interface AccountsServerOptions { - db: DBInterface; - tokenSecret: string; - tokenConfigs?: { - accessToken?: { - expiresIn?: string; - }; - refreshToken?: { - expiresIn?: string; - }; - }; - emailTokensExpiry?: number; - emailTemplates?: EmailTemplatesType; - userObjectSanitizer?: UserObjectSanitizerFunction; - impersonationAuthorize?: ( - user: UserObjectType, - impersonateToUser: UserObjectType - ) => Promise; - resumeSessionValidator?: ResumeSessionValidator; - siteUrl?: string; - prepareMail?: PrepareMailFunction; - sendMail?: SendMailType; - // https://github.com/eleith/emailjs#emailserverconnectoptions - email?: object; -} - -export interface ConnectionInformationsType { - ip?: string; - userAgent?: string; -} +import { UserObjectType, SessionType, CreateUserType } from '@accounts/common'; +import { ConnectionInformationsType } from './ConnectionInformationsType'; export interface DBInterface { // Find user by identity fields @@ -125,4 +64,4 @@ export interface DBInterface { ): Promise; invalidateSession(sessionId: string): Promise; invalidateAllSessions(userId: string): Promise; -} +} \ No newline at end of file diff --git a/packages/server/src/types/EmailTemplateType.ts b/packages/server/src/types/EmailTemplateType.ts new file mode 100644 index 000000000..02563f032 --- /dev/null +++ b/packages/server/src/types/EmailTemplateType.ts @@ -0,0 +1,7 @@ +import { UserObjectType } from '@accounts/common'; + +export interface EmailTemplateType { + from?: string; + subject: (user?: UserObjectType) => string; + text: (user: UserObjectType, url: string) => string; +} diff --git a/packages/server/src/types/EmailTemplatesType.ts b/packages/server/src/types/EmailTemplatesType.ts new file mode 100644 index 000000000..99cb06661 --- /dev/null +++ b/packages/server/src/types/EmailTemplatesType.ts @@ -0,0 +1,8 @@ +import { EmailTemplateType } from './EmailTemplateType' + +export interface EmailTemplatesType { + from: string; + verifyEmail: EmailTemplateType; + resetPassword: EmailTemplateType; + enrollAccount: EmailTemplateType; +} \ No newline at end of file diff --git a/packages/server/src/types/EmailType.ts b/packages/server/src/types/EmailType.ts new file mode 100644 index 000000000..4dc2f3104 --- /dev/null +++ b/packages/server/src/types/EmailType.ts @@ -0,0 +1,3 @@ +import { EmailTemplateType } from './EmailTemplateType' + +export type EmailType = EmailTemplateType & { to: string }; \ No newline at end of file diff --git a/packages/server/src/types/JwtData.ts b/packages/server/src/types/JwtData.ts new file mode 100644 index 000000000..f3c99e51f --- /dev/null +++ b/packages/server/src/types/JwtData.ts @@ -0,0 +1,4 @@ +export interface JwtData { + token: string; + isImpersonated: boolean; +} \ No newline at end of file diff --git a/packages/server/src/types/PrepareMailFunction.ts b/packages/server/src/types/PrepareMailFunction.ts new file mode 100644 index 000000000..8165ead19 --- /dev/null +++ b/packages/server/src/types/PrepareMailFunction.ts @@ -0,0 +1,11 @@ +import { UserObjectType } from '@accounts/common'; +import { EmailTemplateType } from './EmailTemplateType'; + +export type PrepareMailFunction = ( + to: string, + token: string, + user: UserObjectType, + pathFragment: string, + emailTemplate: EmailTemplateType, + from: string +) => object; diff --git a/packages/server/src/types/RemoveListenerHandle.ts b/packages/server/src/types/RemoveListenerHandle.ts new file mode 100644 index 000000000..1368bb771 --- /dev/null +++ b/packages/server/src/types/RemoveListenerHandle.ts @@ -0,0 +1,2 @@ +import { EventEmitter } from 'events'; +export type RemoveListenerHandle = () => EventEmitter; diff --git a/packages/server/src/types/ResumeSessionValidator.ts b/packages/server/src/types/ResumeSessionValidator.ts new file mode 100644 index 000000000..230cd12da --- /dev/null +++ b/packages/server/src/types/ResumeSessionValidator.ts @@ -0,0 +1,6 @@ +import { UserObjectType, SessionType } from '@accounts/common'; + +export type ResumeSessionValidator = ( + user: UserObjectType, + session: SessionType +) => Promise; \ No newline at end of file diff --git a/packages/server/src/types/SendMailType.ts b/packages/server/src/types/SendMailType.ts new file mode 100644 index 000000000..b8aab732d --- /dev/null +++ b/packages/server/src/types/SendMailType.ts @@ -0,0 +1 @@ +export type SendMailType = (mail: object) => Promise; \ No newline at end of file diff --git a/packages/server/src/types/TokenRecord.ts b/packages/server/src/types/TokenRecord.ts new file mode 100644 index 000000000..d68ecd50b --- /dev/null +++ b/packages/server/src/types/TokenRecord.ts @@ -0,0 +1,6 @@ +export interface TokenRecord { + token: string; + address: string; + when: number; + reason: string; +} \ No newline at end of file diff --git a/packages/server/src/types/UserObjectSanitizerFunction.ts b/packages/server/src/types/UserObjectSanitizerFunction.ts new file mode 100644 index 000000000..f83f191f0 --- /dev/null +++ b/packages/server/src/types/UserObjectSanitizerFunction.ts @@ -0,0 +1,7 @@ +import { UserObjectType } from '@accounts/common'; + +export type UserObjectSanitizerFunction = ( + userObject: UserObjectType, + omitFunction: (userDoc: object, fields: string[]) => UserObjectType, + pickFunction: (userDoc: object, fields: string[]) => UserObjectType +) => any; \ No newline at end of file diff --git a/packages/server/src/email.ts b/packages/server/src/utils/email.ts similarity index 75% rename from packages/server/src/email.ts rename to packages/server/src/utils/email.ts index aa6764439..8ef70d593 100644 --- a/packages/server/src/email.ts +++ b/packages/server/src/utils/email.ts @@ -1,17 +1,6 @@ import { UserObjectType } from '@accounts/common'; - -export interface EmailTemplateType { - from?: string; - subject: (user?: UserObjectType) => string; - text: (user: UserObjectType, url: string) => string; -} - -export interface EmailTemplatesType { - from: string; - verifyEmail: EmailTemplateType; - resetPassword: EmailTemplateType; - enrollAccount: EmailTemplateType; -} +import { EmailTemplateType } from '../types/EmailTemplateType'; +import { EmailTemplatesType } from '../types/EmailTemplatesType'; export const emailTemplates = { from: 'js-accounts ', diff --git a/packages/server/src/encryption.ts b/packages/server/src/utils/encryption.ts similarity index 100% rename from packages/server/src/encryption.ts rename to packages/server/src/utils/encryption.ts diff --git a/packages/server/src/utils.ts b/packages/server/src/utils/getFirstUserEmail.ts similarity index 100% rename from packages/server/src/utils.ts rename to packages/server/src/utils/getFirstUserEmail.ts diff --git a/packages/server/src/utils/serverHooks.ts b/packages/server/src/utils/serverHooks.ts new file mode 100644 index 000000000..18d76371f --- /dev/null +++ b/packages/server/src/utils/serverHooks.ts @@ -0,0 +1,14 @@ +export const ServerHooks = { + LoginSuccess: 'LoginSuccess', + LoginError: 'LoginError', + LogoutSuccess: 'LogoutSuccess', + LogoutError: 'LogoutError', + CreateUserSuccess: 'CreateUserSuccess', + CreateUserError: 'CreateUserError', + ResumeSessionSuccess: 'ResumeSessionSuccess', + ResumeSessionError: 'ResumeSessionError', + RefreshTokensSuccess: 'RefreshTokensSuccess', + RefreshTokensError: 'RefreshTokensError', + ImpersonationSuccess: 'ImpersonationSuccess', + ImpersonationError: 'ImpersonationError', +}; \ No newline at end of file diff --git a/packages/server/src/tokens.ts b/packages/server/src/utils/tokens.ts similarity index 100% rename from packages/server/src/tokens.ts rename to packages/server/src/utils/tokens.ts From 945145892d39462cc78a31e9ec5a4b48f8ecac33 Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Sat, 10 Mar 2018 14:21:58 +0100 Subject: [PATCH 116/128] AccountsServer : ServerHooks object relocation under src/utils/serverHooks --- packages/server/src/AccountsServer.ts | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/packages/server/src/AccountsServer.ts b/packages/server/src/AccountsServer.ts index 2c70115dd..f3d94d349 100644 --- a/packages/server/src/AccountsServer.ts +++ b/packages/server/src/AccountsServer.ts @@ -19,6 +19,7 @@ import { } from './utils/tokens'; import { emailTemplates, sendMail } from './utils/email'; +import { ServerHooks } from './utils/serverHooks'; import { AccountsServerOptions } from './types/AccountsServerOptions' import { ConnectionInformationsType } from './types/ConnectionInformationsType' @@ -45,21 +46,6 @@ const defaultOptions = { siteUrl: 'http://localhost:3000', }; -export const ServerHooks = { - LoginSuccess: 'LoginSuccess', - LoginError: 'LoginError', - LogoutSuccess: 'LogoutSuccess', - LogoutError: 'LogoutError', - CreateUserSuccess: 'CreateUserSuccess', - CreateUserError: 'CreateUserError', - ResumeSessionSuccess: 'ResumeSessionSuccess', - ResumeSessionError: 'ResumeSessionError', - RefreshTokensSuccess: 'RefreshTokensSuccess', - RefreshTokensError: 'RefreshTokensError', - ImpersonationSuccess: 'ImpersonationSuccess', - ImpersonationError: 'ImpersonationError', -}; - export class AccountsServer { public options: AccountsServerOptions; private services: { [key: string]: AuthService }; From 35a46798012dd67f61a9b2c93812d2211c6f8a5a Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Sat, 10 Mar 2018 14:54:35 +0100 Subject: [PATCH 117/128] Password : relocate isEmail() to src/utils/isEmail --- packages/password/src/accounts-password.ts | 5 +---- packages/password/src/utils/isEmail.ts | 4 ++++ 2 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 packages/password/src/utils/isEmail.ts diff --git a/packages/password/src/accounts-password.ts b/packages/password/src/accounts-password.ts index 78409ec0e..2875a8045 100644 --- a/packages/password/src/accounts-password.ts +++ b/packages/password/src/accounts-password.ts @@ -30,10 +30,7 @@ import { PasswordType, } from './types'; -export const isEmail = (email?: string) => { - const re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; - return email && re.test(email); -}; +import { isEmail } from './utils/isEmail' export interface AccountsPasswordOptions { passwordHashAlgorithm?: HashAlgorithm; diff --git a/packages/password/src/utils/isEmail.ts b/packages/password/src/utils/isEmail.ts new file mode 100644 index 000000000..2fad4d43b --- /dev/null +++ b/packages/password/src/utils/isEmail.ts @@ -0,0 +1,4 @@ +export const isEmail = (email?: string) => { + const re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; + return email && re.test(email); +}; \ No newline at end of file From 508d8e765fe0a47a4af6169325354d1973cc69db Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Sat, 10 Mar 2018 14:55:34 +0100 Subject: [PATCH 118/128] Password : relocate encryption.ts to src/utils/encription --- packages/password/src/accounts-password.ts | 2 +- packages/password/src/{ => utils}/encryption.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename packages/password/src/{ => utils}/encryption.ts (93%) diff --git a/packages/password/src/accounts-password.ts b/packages/password/src/accounts-password.ts index 2875a8045..fc9878cbf 100644 --- a/packages/password/src/accounts-password.ts +++ b/packages/password/src/accounts-password.ts @@ -23,7 +23,7 @@ import { AuthService, getFirstUserEmail } from '@accounts/server'; -import { hashPassword, bcryptPassword, verifyPassword } from './encryption'; +import { hashPassword, bcryptPassword, verifyPassword } from './utils/encryption'; import { PasswordCreateUserType, PasswordLoginType, diff --git a/packages/password/src/encryption.ts b/packages/password/src/utils/encryption.ts similarity index 93% rename from packages/password/src/encryption.ts rename to packages/password/src/utils/encryption.ts index 5351e1d8d..02e3fdef9 100644 --- a/packages/password/src/encryption.ts +++ b/packages/password/src/utils/encryption.ts @@ -1,6 +1,6 @@ import * as bcrypt from 'bcryptjs'; import * as crypto from 'crypto'; -import { PasswordType } from './types'; +import { PasswordType } from '../types'; export const bcryptPassword = async (password: string): Promise => { const salt = await bcrypt.genSalt(10); From 30da5f81d44871bc1d709c22cbb16287115f7c55 Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Sat, 10 Mar 2018 15:14:28 +0100 Subject: [PATCH 119/128] Password : relocating types to src/types/[typeName] --- .../__tests__/{ => utils}/encryption.ts | 6 +----- packages/password/src/accounts-password.ts | 10 ++++----- packages/password/src/types.ts | 21 ------------------- .../src/types/PasswordCreateUserType.ts | 6 ++++++ .../password/src/types/PasswordLoginType.ts | 7 +++++++ packages/password/src/types/PasswordType.ts | 8 +++++++ packages/password/src/utils/encryption.ts | 2 +- 7 files changed, 28 insertions(+), 32 deletions(-) rename packages/password/__tests__/{ => utils}/encryption.ts (90%) delete mode 100644 packages/password/src/types.ts create mode 100644 packages/password/src/types/PasswordCreateUserType.ts create mode 100644 packages/password/src/types/PasswordLoginType.ts create mode 100644 packages/password/src/types/PasswordType.ts diff --git a/packages/password/__tests__/encryption.ts b/packages/password/__tests__/utils/encryption.ts similarity index 90% rename from packages/password/__tests__/encryption.ts rename to packages/password/__tests__/utils/encryption.ts index 035d6fda2..9087f54bb 100644 --- a/packages/password/__tests__/encryption.ts +++ b/packages/password/__tests__/utils/encryption.ts @@ -1,8 +1,4 @@ -import { - bcryptPassword, - hashPassword, - verifyPassword, -} from '../src/encryption'; +import { bcryptPassword, hashPassword, verifyPassword } from '../../src/utils/encryption'; describe('encryption', () => { describe('bcryptPassword', () => { diff --git a/packages/password/src/accounts-password.ts b/packages/password/src/accounts-password.ts index fc9878cbf..799ee0bb8 100644 --- a/packages/password/src/accounts-password.ts +++ b/packages/password/src/accounts-password.ts @@ -24,11 +24,11 @@ import { getFirstUserEmail } from '@accounts/server'; import { hashPassword, bcryptPassword, verifyPassword } from './utils/encryption'; -import { - PasswordCreateUserType, - PasswordLoginType, - PasswordType, -} from './types'; + + +import { PasswordCreateUserType } from './types/PasswordCreateUserType' +import { PasswordLoginType } from './types/PasswordLoginType' +import { PasswordType } from './types/PasswordType' import { isEmail } from './utils/isEmail' diff --git a/packages/password/src/types.ts b/packages/password/src/types.ts deleted file mode 100644 index c06c2fc5e..000000000 --- a/packages/password/src/types.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { - CreateUserType, - HashAlgorithm, - LoginUserIdentityType, -} from '@accounts/common'; - -export type PasswordType = - | string - | { - digest: string; - algorithm: HashAlgorithm; - }; - -export interface PasswordLoginType { - user: string | LoginUserIdentityType; - password: PasswordType; -} - -export interface PasswordCreateUserType extends CreateUserType { - password: PasswordType; -} diff --git a/packages/password/src/types/PasswordCreateUserType.ts b/packages/password/src/types/PasswordCreateUserType.ts new file mode 100644 index 000000000..5902ff792 --- /dev/null +++ b/packages/password/src/types/PasswordCreateUserType.ts @@ -0,0 +1,6 @@ +import { CreateUserType } from '@accounts/common'; +import { PasswordType } from './PasswordType'; + +export interface PasswordCreateUserType extends CreateUserType { + password: PasswordType; +} diff --git a/packages/password/src/types/PasswordLoginType.ts b/packages/password/src/types/PasswordLoginType.ts new file mode 100644 index 000000000..410e8ee3c --- /dev/null +++ b/packages/password/src/types/PasswordLoginType.ts @@ -0,0 +1,7 @@ +import { LoginUserIdentityType } from '@accounts/common'; +import { PasswordType } from './PasswordType' + +export interface PasswordLoginType { + user: string | LoginUserIdentityType; + password: PasswordType; +} \ No newline at end of file diff --git a/packages/password/src/types/PasswordType.ts b/packages/password/src/types/PasswordType.ts new file mode 100644 index 000000000..6d91a07f2 --- /dev/null +++ b/packages/password/src/types/PasswordType.ts @@ -0,0 +1,8 @@ +import { HashAlgorithm } from '@accounts/common'; + +export type PasswordType = + | string + | { + digest: string; + algorithm: HashAlgorithm; + }; \ No newline at end of file diff --git a/packages/password/src/utils/encryption.ts b/packages/password/src/utils/encryption.ts index 02e3fdef9..0dfa2442f 100644 --- a/packages/password/src/utils/encryption.ts +++ b/packages/password/src/utils/encryption.ts @@ -1,6 +1,6 @@ import * as bcrypt from 'bcryptjs'; import * as crypto from 'crypto'; -import { PasswordType } from '../types'; +import { PasswordType } from '../types/PasswordType'; export const bcryptPassword = async (password: string): Promise => { const salt = await bcrypt.genSalt(10); From acff24b55cbb7092a344a02afdde5644000e221d Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Sat, 10 Mar 2018 15:21:47 +0100 Subject: [PATCH 120/128] OAuthTwitter : relocating types to src/types/[typeName] --- packages/oauth-twitter/src/accounts-oauth-twitter.ts | 10 ++++------ packages/oauth-twitter/src/index.ts | 2 +- .../src/types/AccountsOAuthTwitterOptions.ts | 4 ++++ 3 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 packages/oauth-twitter/src/types/AccountsOAuthTwitterOptions.ts diff --git a/packages/oauth-twitter/src/accounts-oauth-twitter.ts b/packages/oauth-twitter/src/accounts-oauth-twitter.ts index 7961c4d51..4646d09cb 100644 --- a/packages/oauth-twitter/src/accounts-oauth-twitter.ts +++ b/packages/oauth-twitter/src/accounts-oauth-twitter.ts @@ -1,15 +1,13 @@ import * as oauth from 'oauth'; -export interface AccountsOauthTwitterOptions { - key: string; - secret: string; -} +import { AccountsOAuthTwitterOptions } from './types/AccountsOAuthTwitterOptions'; + export class AccountsOAuthTwitter { - private options: AccountsOauthTwitterOptions; + private options: AccountsOAuthTwitterOptions; private oauth: any; - constructor(options: AccountsOauthTwitterOptions) { + constructor(options: AccountsOAuthTwitterOptions) { this.options = options; this.oauth = new oauth.OAuth( 'https://twitter.com/oauth/request_token', diff --git a/packages/oauth-twitter/src/index.ts b/packages/oauth-twitter/src/index.ts index 49db7e5ff..e6f33d53d 100644 --- a/packages/oauth-twitter/src/index.ts +++ b/packages/oauth-twitter/src/index.ts @@ -1,4 +1,4 @@ import { AccountsOAuthTwitter } from './accounts-oauth-twitter'; -export { AccountsOauthTwitterOptions } from './accounts-oauth-twitter'; +export { AccountsOAuthTwitterOptions } from './types/AccountsOAuthTwitterOptions'; export default AccountsOAuthTwitter; diff --git a/packages/oauth-twitter/src/types/AccountsOAuthTwitterOptions.ts b/packages/oauth-twitter/src/types/AccountsOAuthTwitterOptions.ts new file mode 100644 index 000000000..68a916a2a --- /dev/null +++ b/packages/oauth-twitter/src/types/AccountsOAuthTwitterOptions.ts @@ -0,0 +1,4 @@ +export interface AccountsOAuthTwitterOptions { + key: string; + secret: string; +} \ No newline at end of file From d256d4f4ed20a4fe2269df84744a5e57edecd4a1 Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Sat, 10 Mar 2018 15:38:45 +0100 Subject: [PATCH 121/128] OAuth : relocating types to src/types/[typeName] --- packages/oauth/src/accounts-oauth.ts | 16 +++------------- packages/oauth/src/types/OAuthOptions.ts | 7 +++++++ packages/oauth/src/types/OAuthUser.ts | 5 +++++ 3 files changed, 15 insertions(+), 13 deletions(-) create mode 100644 packages/oauth/src/types/OAuthOptions.ts create mode 100644 packages/oauth/src/types/OAuthUser.ts diff --git a/packages/oauth/src/accounts-oauth.ts b/packages/oauth/src/accounts-oauth.ts index 2fa95cb88..2cfb504c6 100644 --- a/packages/oauth/src/accounts-oauth.ts +++ b/packages/oauth/src/accounts-oauth.ts @@ -2,25 +2,15 @@ import { UserObjectType } from '@accounts/common'; import { AccountsServer, DBInterface, AuthService } from '@accounts/server'; import * as requestPromise from 'request-promise'; -export interface OauthUser { - id: string; - email?: string; - profile?: object; -} - -export interface OauthOptions { - [provider: string]: { - authenticate: (params: any) => Promise; - }; -} +import { OAuthOptions } from './types/OAuthOptions' export class AccountsOauth implements AuthService { public server: AccountsServer; public serviceName = 'oauth'; private db: DBInterface; - private options: OauthOptions; + private options: OAuthOptions; - constructor(options) { + constructor(options: OAuthOptions) { this.options = options; } diff --git a/packages/oauth/src/types/OAuthOptions.ts b/packages/oauth/src/types/OAuthOptions.ts new file mode 100644 index 000000000..1fa5fcb66 --- /dev/null +++ b/packages/oauth/src/types/OAuthOptions.ts @@ -0,0 +1,7 @@ +import { OAuthUser } from './OAuthUser' + +export interface OAuthOptions { + [provider: string]: { + authenticate: (params: any) => Promise; + }; +} \ No newline at end of file diff --git a/packages/oauth/src/types/OAuthUser.ts b/packages/oauth/src/types/OAuthUser.ts new file mode 100644 index 000000000..00f91e28d --- /dev/null +++ b/packages/oauth/src/types/OAuthUser.ts @@ -0,0 +1,5 @@ +export interface OAuthUser { + id: string; + email?: string; + profile?: object; +} \ No newline at end of file From 977ae072e17458bc12e7dbd9c9e1cc3856ce65f2 Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Sat, 10 Mar 2018 16:09:37 +0100 Subject: [PATCH 122/128] AccountsServer : revert to kebab-case --- ...untsServer.ts.snap => account-server.ts.snap} | 0 .../{AccountsServer.ts => account-server.ts} | 4 ++-- .../{AccountsServer.ts => accounts-server.ts} | 16 ++++++++-------- packages/server/src/index.ts | 10 +++++----- ...rverOptions.ts => accounts-server-options.ts} | 14 +++++++------- .../types/{AuthService.ts => auth-service.ts} | 4 ++-- ...nsType.ts => connection-informations-type.ts} | 0 .../types/{DBInterface.ts => db-interface.ts} | 2 +- ...ailTemplateType.ts => email-template-type.ts} | 0 ...lTemplatesType.ts => email-templates-type.ts} | 2 +- .../src/types/{EmailType.ts => email-type.ts} | 2 +- .../server/src/types/{JwtData.ts => jwt-data.ts} | 0 ...eMailFunction.ts => prepare-mail-function.ts} | 2 +- ...stenerHandle.ts => remove-listener-handle.ts} | 0 ...nValidator.ts => resume-session-validator.ts} | 0 .../types/{SendMailType.ts => send-mail-type.ts} | 0 .../types/{TokenRecord.ts => token-record.ts} | 0 ...tion.ts => user-object-sanitizer-function.ts} | 0 packages/server/src/utils/email.ts | 4 ++-- ...FirstUserEmail.ts => get-first-user-email.ts} | 0 20 files changed, 30 insertions(+), 30 deletions(-) rename packages/server/__tests__/__snapshots__/{AccountsServer.ts.snap => account-server.ts.snap} (100%) rename packages/server/__tests__/{AccountsServer.ts => account-server.ts} (99%) rename packages/server/src/{AccountsServer.ts => accounts-server.ts} (97%) rename packages/server/src/types/{AccountsServerOptions.ts => accounts-server-options.ts} (62%) rename packages/server/src/types/{AuthService.ts => auth-service.ts} (70%) rename packages/server/src/types/{ConnectionInformationsType.ts => connection-informations-type.ts} (100%) rename packages/server/src/types/{DBInterface.ts => db-interface.ts} (96%) rename packages/server/src/types/{EmailTemplateType.ts => email-template-type.ts} (100%) rename packages/server/src/types/{EmailTemplatesType.ts => email-templates-type.ts} (73%) rename packages/server/src/types/{EmailType.ts => email-type.ts} (50%) rename packages/server/src/types/{JwtData.ts => jwt-data.ts} (100%) rename packages/server/src/types/{PrepareMailFunction.ts => prepare-mail-function.ts} (79%) rename packages/server/src/types/{RemoveListenerHandle.ts => remove-listener-handle.ts} (100%) rename packages/server/src/types/{ResumeSessionValidator.ts => resume-session-validator.ts} (100%) rename packages/server/src/types/{SendMailType.ts => send-mail-type.ts} (100%) rename packages/server/src/types/{TokenRecord.ts => token-record.ts} (100%) rename packages/server/src/types/{UserObjectSanitizerFunction.ts => user-object-sanitizer-function.ts} (100%) rename packages/server/src/utils/{getFirstUserEmail.ts => get-first-user-email.ts} (100%) diff --git a/packages/server/__tests__/__snapshots__/AccountsServer.ts.snap b/packages/server/__tests__/__snapshots__/account-server.ts.snap similarity index 100% rename from packages/server/__tests__/__snapshots__/AccountsServer.ts.snap rename to packages/server/__tests__/__snapshots__/account-server.ts.snap diff --git a/packages/server/__tests__/AccountsServer.ts b/packages/server/__tests__/account-server.ts similarity index 99% rename from packages/server/__tests__/AccountsServer.ts rename to packages/server/__tests__/account-server.ts index 028833455..621fada74 100644 --- a/packages/server/__tests__/AccountsServer.ts +++ b/packages/server/__tests__/account-server.ts @@ -1,6 +1,6 @@ import * as jwtDecode from 'jwt-decode'; -import { AccountsServer } from '../src/AccountsServer'; -import { JwtData } from '../src/types/JwtData' +import { AccountsServer } from '../src/accounts-server'; +import { JwtData } from '../src/types/jwt-data' import { bcryptPassword, hashPassword, diff --git a/packages/server/src/AccountsServer.ts b/packages/server/src/accounts-server.ts similarity index 97% rename from packages/server/src/AccountsServer.ts rename to packages/server/src/accounts-server.ts index f3d94d349..f4fa14dac 100644 --- a/packages/server/src/AccountsServer.ts +++ b/packages/server/src/accounts-server.ts @@ -21,14 +21,14 @@ import { import { emailTemplates, sendMail } from './utils/email'; import { ServerHooks } from './utils/serverHooks'; -import { AccountsServerOptions } from './types/AccountsServerOptions' -import { ConnectionInformationsType } from './types/ConnectionInformationsType' -import { AuthService } from './types/AuthService' -import { DBInterface } from './types/DBInterface' -import { TokenRecord } from './types/TokenRecord' -import { JwtData } from './types/JwtData' -import { RemoveListenerHandle } from './types/RemoveListenerHandle' -import { EmailTemplateType } from './types/EmailTemplateType' +import { AccountsServerOptions } from './types/accounts-server-options' +import { ConnectionInformationsType } from './types/connection-informations-type' +import { AuthService } from './types/auth-service' +import { DBInterface } from './types/db-interface' +import { TokenRecord } from './types/token-record' +import { JwtData } from './types/jwt-data' +import { RemoveListenerHandle } from './types/remove-listener-handle' +import { EmailTemplateType } from './types/email-template-type' const defaultOptions = { tokenSecret: 'secret', diff --git a/packages/server/src/index.ts b/packages/server/src/index.ts index e3b25a9cf..279dcc76f 100644 --- a/packages/server/src/index.ts +++ b/packages/server/src/index.ts @@ -1,11 +1,11 @@ -import { AccountsServer } from './AccountsServer'; +import { AccountsServer } from './accounts-server'; import * as encryption from './utils/encryption'; import { generateRandomToken } from './utils/tokens'; -import { getFirstUserEmail } from './utils/getFirstUserEmail'; +import { getFirstUserEmail } from './utils/get-first-user-email'; -import { ConnectionInformationsType } from './types/ConnectionInformationsType' -import { AuthService } from './types/AuthService' -import { DBInterface } from './types/DBInterface' +import { ConnectionInformationsType } from './types/connection-informations-type' +import { AuthService } from './types/auth-service' +import { DBInterface } from './types/db-interface' export default AccountsServer; export { diff --git a/packages/server/src/types/AccountsServerOptions.ts b/packages/server/src/types/accounts-server-options.ts similarity index 62% rename from packages/server/src/types/AccountsServerOptions.ts rename to packages/server/src/types/accounts-server-options.ts index 4c6db8be1..9b4657a21 100644 --- a/packages/server/src/types/AccountsServerOptions.ts +++ b/packages/server/src/types/accounts-server-options.ts @@ -1,11 +1,11 @@ import { UserObjectType } from '@accounts/common'; -import { DBInterface } from './DBInterface' -import { EmailTemplateType } from './EmailTemplateType' -import { EmailTemplatesType } from './EmailTemplatesType' -import { UserObjectSanitizerFunction } from './UserObjectSanitizerFunction'; -import { ResumeSessionValidator } from './ResumeSessionValidator'; -import { PrepareMailFunction } from './PrepareMailFunction'; -import { SendMailType } from './SendMailType'; +import { DBInterface } from './db-interface' +import { EmailTemplateType } from './email-template-type' +import { EmailTemplatesType } from './email-templates-type' +import { UserObjectSanitizerFunction } from './user-object-sanitizer-function'; +import { ResumeSessionValidator } from './resume-session-validator'; +import { PrepareMailFunction } from './prepare-mail-function'; +import { SendMailType } from './send-mail-type'; export interface AccountsServerOptions { db: DBInterface; diff --git a/packages/server/src/types/AuthService.ts b/packages/server/src/types/auth-service.ts similarity index 70% rename from packages/server/src/types/AuthService.ts rename to packages/server/src/types/auth-service.ts index db09cd5be..5edca8343 100644 --- a/packages/server/src/types/AuthService.ts +++ b/packages/server/src/types/auth-service.ts @@ -1,7 +1,7 @@ import { UserObjectType } from '@accounts/common'; -import { DBInterface } from './DBInterface' +import { DBInterface } from './db-interface' -import { AccountsServer } from '../AccountsServer'; +import { AccountsServer } from '../accounts-server'; export interface AuthService { server: AccountsServer; diff --git a/packages/server/src/types/ConnectionInformationsType.ts b/packages/server/src/types/connection-informations-type.ts similarity index 100% rename from packages/server/src/types/ConnectionInformationsType.ts rename to packages/server/src/types/connection-informations-type.ts diff --git a/packages/server/src/types/DBInterface.ts b/packages/server/src/types/db-interface.ts similarity index 96% rename from packages/server/src/types/DBInterface.ts rename to packages/server/src/types/db-interface.ts index d25834e62..ce951b77d 100644 --- a/packages/server/src/types/DBInterface.ts +++ b/packages/server/src/types/db-interface.ts @@ -1,5 +1,5 @@ import { UserObjectType, SessionType, CreateUserType } from '@accounts/common'; -import { ConnectionInformationsType } from './ConnectionInformationsType'; +import { ConnectionInformationsType } from './connection-informations-type'; export interface DBInterface { // Find user by identity fields diff --git a/packages/server/src/types/EmailTemplateType.ts b/packages/server/src/types/email-template-type.ts similarity index 100% rename from packages/server/src/types/EmailTemplateType.ts rename to packages/server/src/types/email-template-type.ts diff --git a/packages/server/src/types/EmailTemplatesType.ts b/packages/server/src/types/email-templates-type.ts similarity index 73% rename from packages/server/src/types/EmailTemplatesType.ts rename to packages/server/src/types/email-templates-type.ts index 99cb06661..676ecb2e6 100644 --- a/packages/server/src/types/EmailTemplatesType.ts +++ b/packages/server/src/types/email-templates-type.ts @@ -1,4 +1,4 @@ -import { EmailTemplateType } from './EmailTemplateType' +import { EmailTemplateType } from './email-template-type' export interface EmailTemplatesType { from: string; diff --git a/packages/server/src/types/EmailType.ts b/packages/server/src/types/email-type.ts similarity index 50% rename from packages/server/src/types/EmailType.ts rename to packages/server/src/types/email-type.ts index 4dc2f3104..577eb2807 100644 --- a/packages/server/src/types/EmailType.ts +++ b/packages/server/src/types/email-type.ts @@ -1,3 +1,3 @@ -import { EmailTemplateType } from './EmailTemplateType' +import { EmailTemplateType } from './email-template-type' export type EmailType = EmailTemplateType & { to: string }; \ No newline at end of file diff --git a/packages/server/src/types/JwtData.ts b/packages/server/src/types/jwt-data.ts similarity index 100% rename from packages/server/src/types/JwtData.ts rename to packages/server/src/types/jwt-data.ts diff --git a/packages/server/src/types/PrepareMailFunction.ts b/packages/server/src/types/prepare-mail-function.ts similarity index 79% rename from packages/server/src/types/PrepareMailFunction.ts rename to packages/server/src/types/prepare-mail-function.ts index 8165ead19..f79be4927 100644 --- a/packages/server/src/types/PrepareMailFunction.ts +++ b/packages/server/src/types/prepare-mail-function.ts @@ -1,5 +1,5 @@ import { UserObjectType } from '@accounts/common'; -import { EmailTemplateType } from './EmailTemplateType'; +import { EmailTemplateType } from './email-template-type'; export type PrepareMailFunction = ( to: string, diff --git a/packages/server/src/types/RemoveListenerHandle.ts b/packages/server/src/types/remove-listener-handle.ts similarity index 100% rename from packages/server/src/types/RemoveListenerHandle.ts rename to packages/server/src/types/remove-listener-handle.ts diff --git a/packages/server/src/types/ResumeSessionValidator.ts b/packages/server/src/types/resume-session-validator.ts similarity index 100% rename from packages/server/src/types/ResumeSessionValidator.ts rename to packages/server/src/types/resume-session-validator.ts diff --git a/packages/server/src/types/SendMailType.ts b/packages/server/src/types/send-mail-type.ts similarity index 100% rename from packages/server/src/types/SendMailType.ts rename to packages/server/src/types/send-mail-type.ts diff --git a/packages/server/src/types/TokenRecord.ts b/packages/server/src/types/token-record.ts similarity index 100% rename from packages/server/src/types/TokenRecord.ts rename to packages/server/src/types/token-record.ts diff --git a/packages/server/src/types/UserObjectSanitizerFunction.ts b/packages/server/src/types/user-object-sanitizer-function.ts similarity index 100% rename from packages/server/src/types/UserObjectSanitizerFunction.ts rename to packages/server/src/types/user-object-sanitizer-function.ts diff --git a/packages/server/src/utils/email.ts b/packages/server/src/utils/email.ts index 8ef70d593..573fedd31 100644 --- a/packages/server/src/utils/email.ts +++ b/packages/server/src/utils/email.ts @@ -1,6 +1,6 @@ import { UserObjectType } from '@accounts/common'; -import { EmailTemplateType } from '../types/EmailTemplateType'; -import { EmailTemplatesType } from '../types/EmailTemplatesType'; +import { EmailTemplateType } from '../types/email-template-type'; +import { EmailTemplatesType } from '../types/email-templates-type'; export const emailTemplates = { from: 'js-accounts ', diff --git a/packages/server/src/utils/getFirstUserEmail.ts b/packages/server/src/utils/get-first-user-email.ts similarity index 100% rename from packages/server/src/utils/getFirstUserEmail.ts rename to packages/server/src/utils/get-first-user-email.ts From 2ee784bba1e872e24fcd6bdd5912b5287a348c76 Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Sat, 10 Mar 2018 16:12:36 +0100 Subject: [PATCH 123/128] Password : revert to kebab-case --- packages/password/src/accounts-password.ts | 6 +++--- ...sswordCreateUserType.ts => password-create-user-type.ts} | 2 +- .../types/{PasswordLoginType.ts => password-login-type.ts} | 2 +- .../src/types/{PasswordType.ts => password-type.ts} | 0 4 files changed, 5 insertions(+), 5 deletions(-) rename packages/password/src/types/{PasswordCreateUserType.ts => password-create-user-type.ts} (75%) rename packages/password/src/types/{PasswordLoginType.ts => password-login-type.ts} (77%) rename packages/password/src/types/{PasswordType.ts => password-type.ts} (100%) diff --git a/packages/password/src/accounts-password.ts b/packages/password/src/accounts-password.ts index 799ee0bb8..ed143bfe9 100644 --- a/packages/password/src/accounts-password.ts +++ b/packages/password/src/accounts-password.ts @@ -26,9 +26,9 @@ import { import { hashPassword, bcryptPassword, verifyPassword } from './utils/encryption'; -import { PasswordCreateUserType } from './types/PasswordCreateUserType' -import { PasswordLoginType } from './types/PasswordLoginType' -import { PasswordType } from './types/PasswordType' +import { PasswordCreateUserType } from './types/password-create-user-type' +import { PasswordLoginType } from './types/password-login-type' +import { PasswordType } from './types/password-type' import { isEmail } from './utils/isEmail' diff --git a/packages/password/src/types/PasswordCreateUserType.ts b/packages/password/src/types/password-create-user-type.ts similarity index 75% rename from packages/password/src/types/PasswordCreateUserType.ts rename to packages/password/src/types/password-create-user-type.ts index 5902ff792..bd63bcef5 100644 --- a/packages/password/src/types/PasswordCreateUserType.ts +++ b/packages/password/src/types/password-create-user-type.ts @@ -1,5 +1,5 @@ import { CreateUserType } from '@accounts/common'; -import { PasswordType } from './PasswordType'; +import { PasswordType } from './password-type'; export interface PasswordCreateUserType extends CreateUserType { password: PasswordType; diff --git a/packages/password/src/types/PasswordLoginType.ts b/packages/password/src/types/password-login-type.ts similarity index 77% rename from packages/password/src/types/PasswordLoginType.ts rename to packages/password/src/types/password-login-type.ts index 410e8ee3c..52aa85740 100644 --- a/packages/password/src/types/PasswordLoginType.ts +++ b/packages/password/src/types/password-login-type.ts @@ -1,5 +1,5 @@ import { LoginUserIdentityType } from '@accounts/common'; -import { PasswordType } from './PasswordType' +import { PasswordType } from './password-type' export interface PasswordLoginType { user: string | LoginUserIdentityType; diff --git a/packages/password/src/types/PasswordType.ts b/packages/password/src/types/password-type.ts similarity index 100% rename from packages/password/src/types/PasswordType.ts rename to packages/password/src/types/password-type.ts From 646cfedc1f5201d80c68cd78ecaf6d47746061f9 Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Sat, 10 Mar 2018 16:15:48 +0100 Subject: [PATCH 124/128] OAuth & OAuthTwitter : revert to kebab-case --- packages/oauth-twitter/src/accounts-oauth-twitter.ts | 2 +- packages/oauth-twitter/src/index.ts | 2 +- ...OAuthTwitterOptions.ts => accounts-oauth-twitter-options.ts} | 0 packages/oauth/src/accounts-oauth.ts | 2 +- packages/oauth/src/types/{OAuthOptions.ts => oauth-options.ts} | 2 +- packages/oauth/src/types/{OAuthUser.ts => oauth-user.ts} | 0 6 files changed, 4 insertions(+), 4 deletions(-) rename packages/oauth-twitter/src/types/{AccountsOAuthTwitterOptions.ts => accounts-oauth-twitter-options.ts} (100%) rename packages/oauth/src/types/{OAuthOptions.ts => oauth-options.ts} (74%) rename packages/oauth/src/types/{OAuthUser.ts => oauth-user.ts} (100%) diff --git a/packages/oauth-twitter/src/accounts-oauth-twitter.ts b/packages/oauth-twitter/src/accounts-oauth-twitter.ts index 4646d09cb..1f22bd681 100644 --- a/packages/oauth-twitter/src/accounts-oauth-twitter.ts +++ b/packages/oauth-twitter/src/accounts-oauth-twitter.ts @@ -1,6 +1,6 @@ import * as oauth from 'oauth'; -import { AccountsOAuthTwitterOptions } from './types/AccountsOAuthTwitterOptions'; +import { AccountsOAuthTwitterOptions } from './types/accounts-oauth-twitter-options'; export class AccountsOAuthTwitter { diff --git a/packages/oauth-twitter/src/index.ts b/packages/oauth-twitter/src/index.ts index e6f33d53d..36d3876cb 100644 --- a/packages/oauth-twitter/src/index.ts +++ b/packages/oauth-twitter/src/index.ts @@ -1,4 +1,4 @@ import { AccountsOAuthTwitter } from './accounts-oauth-twitter'; -export { AccountsOAuthTwitterOptions } from './types/AccountsOAuthTwitterOptions'; +export { AccountsOAuthTwitterOptions } from './types/accounts-oauth-twitter-options'; export default AccountsOAuthTwitter; diff --git a/packages/oauth-twitter/src/types/AccountsOAuthTwitterOptions.ts b/packages/oauth-twitter/src/types/accounts-oauth-twitter-options.ts similarity index 100% rename from packages/oauth-twitter/src/types/AccountsOAuthTwitterOptions.ts rename to packages/oauth-twitter/src/types/accounts-oauth-twitter-options.ts diff --git a/packages/oauth/src/accounts-oauth.ts b/packages/oauth/src/accounts-oauth.ts index 2cfb504c6..2bafd2f2e 100644 --- a/packages/oauth/src/accounts-oauth.ts +++ b/packages/oauth/src/accounts-oauth.ts @@ -2,7 +2,7 @@ import { UserObjectType } from '@accounts/common'; import { AccountsServer, DBInterface, AuthService } from '@accounts/server'; import * as requestPromise from 'request-promise'; -import { OAuthOptions } from './types/OAuthOptions' +import { OAuthOptions } from './types/oauth-options' export class AccountsOauth implements AuthService { public server: AccountsServer; diff --git a/packages/oauth/src/types/OAuthOptions.ts b/packages/oauth/src/types/oauth-options.ts similarity index 74% rename from packages/oauth/src/types/OAuthOptions.ts rename to packages/oauth/src/types/oauth-options.ts index 1fa5fcb66..b98bc99dd 100644 --- a/packages/oauth/src/types/OAuthOptions.ts +++ b/packages/oauth/src/types/oauth-options.ts @@ -1,4 +1,4 @@ -import { OAuthUser } from './OAuthUser' +import { OAuthUser } from './oauth-user' export interface OAuthOptions { [provider: string]: { diff --git a/packages/oauth/src/types/OAuthUser.ts b/packages/oauth/src/types/oauth-user.ts similarity index 100% rename from packages/oauth/src/types/OAuthUser.ts rename to packages/oauth/src/types/oauth-user.ts From eb3a76bb24cdcf537118e351e513659a26c81362 Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Sat, 10 Mar 2018 16:22:41 +0100 Subject: [PATCH 125/128] Password : fix typo PasswordType --- packages/password/src/utils/encryption.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/password/src/utils/encryption.ts b/packages/password/src/utils/encryption.ts index 0dfa2442f..84fe520dd 100644 --- a/packages/password/src/utils/encryption.ts +++ b/packages/password/src/utils/encryption.ts @@ -1,6 +1,6 @@ import * as bcrypt from 'bcryptjs'; import * as crypto from 'crypto'; -import { PasswordType } from '../types/PasswordType'; +import { PasswordType } from '../types/password-type'; export const bcryptPassword = async (password: string): Promise => { const salt = await bcrypt.genSalt(10); From b4acef972ce91129b01c6a54db8a9f7307cf1164 Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Sat, 10 Mar 2018 18:53:16 +0100 Subject: [PATCH 126/128] AccountsServer : fix server-hooks kebeb-case --- packages/server/src/accounts-server.ts | 2 +- packages/server/src/utils/{serverHooks.ts => server-hooks.ts} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename packages/server/src/utils/{serverHooks.ts => server-hooks.ts} (100%) diff --git a/packages/server/src/accounts-server.ts b/packages/server/src/accounts-server.ts index f4fa14dac..5c03d01f2 100644 --- a/packages/server/src/accounts-server.ts +++ b/packages/server/src/accounts-server.ts @@ -19,7 +19,7 @@ import { } from './utils/tokens'; import { emailTemplates, sendMail } from './utils/email'; -import { ServerHooks } from './utils/serverHooks'; +import { ServerHooks } from './utils/server-hooks'; import { AccountsServerOptions } from './types/accounts-server-options' import { ConnectionInformationsType } from './types/connection-informations-type' diff --git a/packages/server/src/utils/serverHooks.ts b/packages/server/src/utils/server-hooks.ts similarity index 100% rename from packages/server/src/utils/serverHooks.ts rename to packages/server/src/utils/server-hooks.ts From 944cea6e9ebd6e7a28e9f5fc50342f81c4250eb8 Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Sat, 10 Mar 2018 18:59:57 +0100 Subject: [PATCH 127/128] OAuthProviderTwitter: options => config POC --- packages/oauth-twitter/src/accounts-oauth-twitter.ts | 12 ++++++------ packages/oauth-twitter/src/index.ts | 1 - .../src/types/accounts-oauth-twitter-options.ts | 4 ---- packages/oauth-twitter/src/types/configuration.ts | 4 ++++ 4 files changed, 10 insertions(+), 11 deletions(-) delete mode 100644 packages/oauth-twitter/src/types/accounts-oauth-twitter-options.ts create mode 100644 packages/oauth-twitter/src/types/configuration.ts diff --git a/packages/oauth-twitter/src/accounts-oauth-twitter.ts b/packages/oauth-twitter/src/accounts-oauth-twitter.ts index 1f22bd681..ffad0ce6d 100644 --- a/packages/oauth-twitter/src/accounts-oauth-twitter.ts +++ b/packages/oauth-twitter/src/accounts-oauth-twitter.ts @@ -1,19 +1,19 @@ import * as oauth from 'oauth'; -import { AccountsOAuthTwitterOptions } from './types/accounts-oauth-twitter-options'; +import { Configuration } from './types/configuration'; export class AccountsOAuthTwitter { - private options: AccountsOAuthTwitterOptions; + private config: Configuration; private oauth: any; - constructor(options: AccountsOAuthTwitterOptions) { - this.options = options; + constructor(config: Configuration) { + this.config = config; this.oauth = new oauth.OAuth( 'https://twitter.com/oauth/request_token', 'https://twitter.com/oauth/access_token', - this.options.key, - this.options.secret, + this.config.key, + this.config.secret, '1.0A', null, 'HMAC-SHA1' diff --git a/packages/oauth-twitter/src/index.ts b/packages/oauth-twitter/src/index.ts index 36d3876cb..b3fa767f8 100644 --- a/packages/oauth-twitter/src/index.ts +++ b/packages/oauth-twitter/src/index.ts @@ -1,4 +1,3 @@ import { AccountsOAuthTwitter } from './accounts-oauth-twitter'; -export { AccountsOAuthTwitterOptions } from './types/accounts-oauth-twitter-options'; export default AccountsOAuthTwitter; diff --git a/packages/oauth-twitter/src/types/accounts-oauth-twitter-options.ts b/packages/oauth-twitter/src/types/accounts-oauth-twitter-options.ts deleted file mode 100644 index 68a916a2a..000000000 --- a/packages/oauth-twitter/src/types/accounts-oauth-twitter-options.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface AccountsOAuthTwitterOptions { - key: string; - secret: string; -} \ No newline at end of file diff --git a/packages/oauth-twitter/src/types/configuration.ts b/packages/oauth-twitter/src/types/configuration.ts new file mode 100644 index 000000000..7732cf914 --- /dev/null +++ b/packages/oauth-twitter/src/types/configuration.ts @@ -0,0 +1,4 @@ +export interface Configuration { + key: string; + secret: string; +} \ No newline at end of file From e6bdcbfdd570b793b2f2efd24bc14cdbc1bb1c5d Mon Sep 17 00:00:00 2001 From: Elies Lou Date: Tue, 13 Mar 2018 11:35:07 +0100 Subject: [PATCH 128/128] yarn format --- .../oauth-twitter/src/accounts-oauth-twitter.ts | 1 - .../oauth-twitter/src/types/configuration.ts | 2 +- packages/oauth/__tests__/accounts-oauth.ts | 4 ++-- packages/oauth/src/accounts-oauth.ts | 2 +- packages/oauth/src/types/oauth-options.ts | 4 ++-- packages/oauth/src/types/oauth-user.ts | 2 +- packages/password/__tests__/utils/encryption.ts | 6 +++++- packages/password/src/accounts-password.ts | 17 ++++++++++------- .../password/src/types/password-login-type.ts | 4 ++-- packages/password/src/types/password-type.ts | 2 +- packages/password/src/utils/isEmail.ts | 2 +- packages/server/__tests__/account-server.ts | 2 +- packages/server/src/accounts-server.ts | 16 ++++++++-------- packages/server/src/index.ts | 8 ++++---- .../server/src/types/accounts-server-options.ts | 8 ++++---- packages/server/src/types/auth-service.ts | 4 ++-- .../src/types/connection-informations-type.ts | 2 +- packages/server/src/types/db-interface.ts | 2 +- .../server/src/types/email-template-type.ts | 2 +- .../server/src/types/email-templates-type.ts | 4 ++-- packages/server/src/types/email-type.ts | 4 ++-- packages/server/src/types/jwt-data.ts | 2 +- .../src/types/resume-session-validator.ts | 2 +- packages/server/src/types/send-mail-type.ts | 2 +- packages/server/src/types/token-record.ts | 2 +- .../src/types/user-object-sanitizer-function.ts | 2 +- packages/server/src/utils/server-hooks.ts | 2 +- 27 files changed, 58 insertions(+), 52 deletions(-) diff --git a/packages/oauth-twitter/src/accounts-oauth-twitter.ts b/packages/oauth-twitter/src/accounts-oauth-twitter.ts index ffad0ce6d..bbd31da4a 100644 --- a/packages/oauth-twitter/src/accounts-oauth-twitter.ts +++ b/packages/oauth-twitter/src/accounts-oauth-twitter.ts @@ -2,7 +2,6 @@ import * as oauth from 'oauth'; import { Configuration } from './types/configuration'; - export class AccountsOAuthTwitter { private config: Configuration; private oauth: any; diff --git a/packages/oauth-twitter/src/types/configuration.ts b/packages/oauth-twitter/src/types/configuration.ts index 7732cf914..f64a72efc 100644 --- a/packages/oauth-twitter/src/types/configuration.ts +++ b/packages/oauth-twitter/src/types/configuration.ts @@ -1,4 +1,4 @@ export interface Configuration { key: string; secret: string; -} \ No newline at end of file +} diff --git a/packages/oauth/__tests__/accounts-oauth.ts b/packages/oauth/__tests__/accounts-oauth.ts index 56993901c..e51791575 100644 --- a/packages/oauth/__tests__/accounts-oauth.ts +++ b/packages/oauth/__tests__/accounts-oauth.ts @@ -63,7 +63,7 @@ describe('AccountsOauth', () => { } }); - it('should call provider\'s authenticate method in order to get the user itself', async () => { + it("should call provider's authenticate method in order to get the user itself", async () => { const authSpy = jest.fn(() => ({ id: '312312', name: 'Mr. Anderson', @@ -150,7 +150,7 @@ describe('AccountsOauth', () => { }); }); - it('should update the user\'s profile if logged in after change in profile', async () => { + it("should update the user's profile if logged in after change in profile", async () => { const userChanged = { id: '312312', name: 'Mr. Anderson', diff --git a/packages/oauth/src/accounts-oauth.ts b/packages/oauth/src/accounts-oauth.ts index 2bafd2f2e..c3194f33f 100644 --- a/packages/oauth/src/accounts-oauth.ts +++ b/packages/oauth/src/accounts-oauth.ts @@ -2,7 +2,7 @@ import { UserObjectType } from '@accounts/common'; import { AccountsServer, DBInterface, AuthService } from '@accounts/server'; import * as requestPromise from 'request-promise'; -import { OAuthOptions } from './types/oauth-options' +import { OAuthOptions } from './types/oauth-options'; export class AccountsOauth implements AuthService { public server: AccountsServer; diff --git a/packages/oauth/src/types/oauth-options.ts b/packages/oauth/src/types/oauth-options.ts index b98bc99dd..d5c5deae0 100644 --- a/packages/oauth/src/types/oauth-options.ts +++ b/packages/oauth/src/types/oauth-options.ts @@ -1,7 +1,7 @@ -import { OAuthUser } from './oauth-user' +import { OAuthUser } from './oauth-user'; export interface OAuthOptions { [provider: string]: { authenticate: (params: any) => Promise; }; -} \ No newline at end of file +} diff --git a/packages/oauth/src/types/oauth-user.ts b/packages/oauth/src/types/oauth-user.ts index 00f91e28d..270c60f4f 100644 --- a/packages/oauth/src/types/oauth-user.ts +++ b/packages/oauth/src/types/oauth-user.ts @@ -2,4 +2,4 @@ export interface OAuthUser { id: string; email?: string; profile?: object; -} \ No newline at end of file +} diff --git a/packages/password/__tests__/utils/encryption.ts b/packages/password/__tests__/utils/encryption.ts index 9087f54bb..eb17e3f2d 100644 --- a/packages/password/__tests__/utils/encryption.ts +++ b/packages/password/__tests__/utils/encryption.ts @@ -1,4 +1,8 @@ -import { bcryptPassword, hashPassword, verifyPassword } from '../../src/utils/encryption'; +import { + bcryptPassword, + hashPassword, + verifyPassword, +} from '../../src/utils/encryption'; describe('encryption', () => { describe('bcryptPassword', () => { diff --git a/packages/password/src/accounts-password.ts b/packages/password/src/accounts-password.ts index ed143bfe9..bf2bace82 100644 --- a/packages/password/src/accounts-password.ts +++ b/packages/password/src/accounts-password.ts @@ -21,16 +21,19 @@ import { AccountsServer, generateRandomToken, AuthService, - getFirstUserEmail + getFirstUserEmail, } from '@accounts/server'; -import { hashPassword, bcryptPassword, verifyPassword } from './utils/encryption'; - +import { + hashPassword, + bcryptPassword, + verifyPassword, +} from './utils/encryption'; -import { PasswordCreateUserType } from './types/password-create-user-type' -import { PasswordLoginType } from './types/password-login-type' -import { PasswordType } from './types/password-type' +import { PasswordCreateUserType } from './types/password-create-user-type'; +import { PasswordLoginType } from './types/password-login-type'; +import { PasswordType } from './types/password-type'; -import { isEmail } from './utils/isEmail' +import { isEmail } from './utils/isEmail'; export interface AccountsPasswordOptions { passwordHashAlgorithm?: HashAlgorithm; diff --git a/packages/password/src/types/password-login-type.ts b/packages/password/src/types/password-login-type.ts index 52aa85740..f2aadf47f 100644 --- a/packages/password/src/types/password-login-type.ts +++ b/packages/password/src/types/password-login-type.ts @@ -1,7 +1,7 @@ import { LoginUserIdentityType } from '@accounts/common'; -import { PasswordType } from './password-type' +import { PasswordType } from './password-type'; export interface PasswordLoginType { user: string | LoginUserIdentityType; password: PasswordType; -} \ No newline at end of file +} diff --git a/packages/password/src/types/password-type.ts b/packages/password/src/types/password-type.ts index 6d91a07f2..0eede99bc 100644 --- a/packages/password/src/types/password-type.ts +++ b/packages/password/src/types/password-type.ts @@ -5,4 +5,4 @@ export type PasswordType = | { digest: string; algorithm: HashAlgorithm; - }; \ No newline at end of file + }; diff --git a/packages/password/src/utils/isEmail.ts b/packages/password/src/utils/isEmail.ts index 2fad4d43b..c3e096484 100644 --- a/packages/password/src/utils/isEmail.ts +++ b/packages/password/src/utils/isEmail.ts @@ -1,4 +1,4 @@ export const isEmail = (email?: string) => { const re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; return email && re.test(email); -}; \ No newline at end of file +}; diff --git a/packages/server/__tests__/account-server.ts b/packages/server/__tests__/account-server.ts index 621fada74..fc41ddf1d 100644 --- a/packages/server/__tests__/account-server.ts +++ b/packages/server/__tests__/account-server.ts @@ -1,6 +1,6 @@ import * as jwtDecode from 'jwt-decode'; import { AccountsServer } from '../src/accounts-server'; -import { JwtData } from '../src/types/jwt-data' +import { JwtData } from '../src/types/jwt-data'; import { bcryptPassword, hashPassword, diff --git a/packages/server/src/accounts-server.ts b/packages/server/src/accounts-server.ts index 5c03d01f2..13356125f 100644 --- a/packages/server/src/accounts-server.ts +++ b/packages/server/src/accounts-server.ts @@ -21,14 +21,14 @@ import { import { emailTemplates, sendMail } from './utils/email'; import { ServerHooks } from './utils/server-hooks'; -import { AccountsServerOptions } from './types/accounts-server-options' -import { ConnectionInformationsType } from './types/connection-informations-type' -import { AuthService } from './types/auth-service' -import { DBInterface } from './types/db-interface' -import { TokenRecord } from './types/token-record' -import { JwtData } from './types/jwt-data' -import { RemoveListenerHandle } from './types/remove-listener-handle' -import { EmailTemplateType } from './types/email-template-type' +import { AccountsServerOptions } from './types/accounts-server-options'; +import { ConnectionInformationsType } from './types/connection-informations-type'; +import { AuthService } from './types/auth-service'; +import { DBInterface } from './types/db-interface'; +import { TokenRecord } from './types/token-record'; +import { JwtData } from './types/jwt-data'; +import { RemoveListenerHandle } from './types/remove-listener-handle'; +import { EmailTemplateType } from './types/email-template-type'; const defaultOptions = { tokenSecret: 'secret', diff --git a/packages/server/src/index.ts b/packages/server/src/index.ts index 279dcc76f..492a03f1f 100644 --- a/packages/server/src/index.ts +++ b/packages/server/src/index.ts @@ -3,9 +3,9 @@ import * as encryption from './utils/encryption'; import { generateRandomToken } from './utils/tokens'; import { getFirstUserEmail } from './utils/get-first-user-email'; -import { ConnectionInformationsType } from './types/connection-informations-type' -import { AuthService } from './types/auth-service' -import { DBInterface } from './types/db-interface' +import { ConnectionInformationsType } from './types/connection-informations-type'; +import { AuthService } from './types/auth-service'; +import { DBInterface } from './types/db-interface'; export default AccountsServer; export { @@ -15,5 +15,5 @@ export { DBInterface, generateRandomToken, ConnectionInformationsType, - getFirstUserEmail + getFirstUserEmail, }; diff --git a/packages/server/src/types/accounts-server-options.ts b/packages/server/src/types/accounts-server-options.ts index 9b4657a21..62ed3024a 100644 --- a/packages/server/src/types/accounts-server-options.ts +++ b/packages/server/src/types/accounts-server-options.ts @@ -1,7 +1,7 @@ import { UserObjectType } from '@accounts/common'; -import { DBInterface } from './db-interface' -import { EmailTemplateType } from './email-template-type' -import { EmailTemplatesType } from './email-templates-type' +import { DBInterface } from './db-interface'; +import { EmailTemplateType } from './email-template-type'; +import { EmailTemplatesType } from './email-templates-type'; import { UserObjectSanitizerFunction } from './user-object-sanitizer-function'; import { ResumeSessionValidator } from './resume-session-validator'; import { PrepareMailFunction } from './prepare-mail-function'; @@ -31,4 +31,4 @@ export interface AccountsServerOptions { sendMail?: SendMailType; // https://github.com/eleith/emailjs#emailserverconnectoptions email?: object; -} \ No newline at end of file +} diff --git a/packages/server/src/types/auth-service.ts b/packages/server/src/types/auth-service.ts index 5edca8343..e3c8f769d 100644 --- a/packages/server/src/types/auth-service.ts +++ b/packages/server/src/types/auth-service.ts @@ -1,5 +1,5 @@ import { UserObjectType } from '@accounts/common'; -import { DBInterface } from './db-interface' +import { DBInterface } from './db-interface'; import { AccountsServer } from '../accounts-server'; @@ -8,4 +8,4 @@ export interface AuthService { serviceName: string; setStore(store: DBInterface): void; authenticate(params: any): Promise; -} \ No newline at end of file +} diff --git a/packages/server/src/types/connection-informations-type.ts b/packages/server/src/types/connection-informations-type.ts index 772704490..e563525d6 100644 --- a/packages/server/src/types/connection-informations-type.ts +++ b/packages/server/src/types/connection-informations-type.ts @@ -1,4 +1,4 @@ export interface ConnectionInformationsType { ip?: string; userAgent?: string; -} \ No newline at end of file +} diff --git a/packages/server/src/types/db-interface.ts b/packages/server/src/types/db-interface.ts index ce951b77d..f4e7ab8e1 100644 --- a/packages/server/src/types/db-interface.ts +++ b/packages/server/src/types/db-interface.ts @@ -64,4 +64,4 @@ export interface DBInterface { ): Promise; invalidateSession(sessionId: string): Promise; invalidateAllSessions(userId: string): Promise; -} \ No newline at end of file +} diff --git a/packages/server/src/types/email-template-type.ts b/packages/server/src/types/email-template-type.ts index 02563f032..c8ddfd6d8 100644 --- a/packages/server/src/types/email-template-type.ts +++ b/packages/server/src/types/email-template-type.ts @@ -1,5 +1,5 @@ import { UserObjectType } from '@accounts/common'; - + export interface EmailTemplateType { from?: string; subject: (user?: UserObjectType) => string; diff --git a/packages/server/src/types/email-templates-type.ts b/packages/server/src/types/email-templates-type.ts index 676ecb2e6..2c8f18d6a 100644 --- a/packages/server/src/types/email-templates-type.ts +++ b/packages/server/src/types/email-templates-type.ts @@ -1,8 +1,8 @@ -import { EmailTemplateType } from './email-template-type' +import { EmailTemplateType } from './email-template-type'; export interface EmailTemplatesType { from: string; verifyEmail: EmailTemplateType; resetPassword: EmailTemplateType; enrollAccount: EmailTemplateType; -} \ No newline at end of file +} diff --git a/packages/server/src/types/email-type.ts b/packages/server/src/types/email-type.ts index 577eb2807..b561ea33f 100644 --- a/packages/server/src/types/email-type.ts +++ b/packages/server/src/types/email-type.ts @@ -1,3 +1,3 @@ -import { EmailTemplateType } from './email-template-type' +import { EmailTemplateType } from './email-template-type'; -export type EmailType = EmailTemplateType & { to: string }; \ No newline at end of file +export type EmailType = EmailTemplateType & { to: string }; diff --git a/packages/server/src/types/jwt-data.ts b/packages/server/src/types/jwt-data.ts index f3c99e51f..c637c04ef 100644 --- a/packages/server/src/types/jwt-data.ts +++ b/packages/server/src/types/jwt-data.ts @@ -1,4 +1,4 @@ export interface JwtData { token: string; isImpersonated: boolean; -} \ No newline at end of file +} diff --git a/packages/server/src/types/resume-session-validator.ts b/packages/server/src/types/resume-session-validator.ts index 230cd12da..1ca60cee4 100644 --- a/packages/server/src/types/resume-session-validator.ts +++ b/packages/server/src/types/resume-session-validator.ts @@ -3,4 +3,4 @@ import { UserObjectType, SessionType } from '@accounts/common'; export type ResumeSessionValidator = ( user: UserObjectType, session: SessionType -) => Promise; \ No newline at end of file +) => Promise; diff --git a/packages/server/src/types/send-mail-type.ts b/packages/server/src/types/send-mail-type.ts index b8aab732d..a08d843f7 100644 --- a/packages/server/src/types/send-mail-type.ts +++ b/packages/server/src/types/send-mail-type.ts @@ -1 +1 @@ -export type SendMailType = (mail: object) => Promise; \ No newline at end of file +export type SendMailType = (mail: object) => Promise; diff --git a/packages/server/src/types/token-record.ts b/packages/server/src/types/token-record.ts index d68ecd50b..3df3ef3f6 100644 --- a/packages/server/src/types/token-record.ts +++ b/packages/server/src/types/token-record.ts @@ -3,4 +3,4 @@ export interface TokenRecord { address: string; when: number; reason: string; -} \ No newline at end of file +} diff --git a/packages/server/src/types/user-object-sanitizer-function.ts b/packages/server/src/types/user-object-sanitizer-function.ts index f83f191f0..14924489a 100644 --- a/packages/server/src/types/user-object-sanitizer-function.ts +++ b/packages/server/src/types/user-object-sanitizer-function.ts @@ -4,4 +4,4 @@ export type UserObjectSanitizerFunction = ( userObject: UserObjectType, omitFunction: (userDoc: object, fields: string[]) => UserObjectType, pickFunction: (userDoc: object, fields: string[]) => UserObjectType -) => any; \ No newline at end of file +) => any; diff --git a/packages/server/src/utils/server-hooks.ts b/packages/server/src/utils/server-hooks.ts index 18d76371f..f9d1b5e37 100644 --- a/packages/server/src/utils/server-hooks.ts +++ b/packages/server/src/utils/server-hooks.ts @@ -11,4 +11,4 @@ export const ServerHooks = { RefreshTokensError: 'RefreshTokensError', ImpersonationSuccess: 'ImpersonationSuccess', ImpersonationError: 'ImpersonationError', -}; \ No newline at end of file +};