diff --git a/docker-compose.cypress.yml b/docker-compose.cypress.yml new file mode 100644 index 000000000..3d577e638 --- /dev/null +++ b/docker-compose.cypress.yml @@ -0,0 +1,18 @@ +version: "3.7" + +services: + neo4j: + environment: + - NEO4J_AUTH=none + ports: + - 7687:7687 + - 7474:7474 + backend: + ports: + - 4001:4001 + - 4123:4123 + image: humanconnection/nitro-backend:builder + build: + context: . + target: builder + command: yarn run test:cypress diff --git a/package.json b/package.json index 39c9c14c6..173f1ced7 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,7 @@ "babel-eslint": "~10.0.1", "babel-jest": "~24.1.0", "chai": "~4.2.0", - "eslint": "~5.13.0", + "eslint": "~5.14.1", "eslint-config-standard": "~12.0.0", "eslint-plugin-import": "~2.16.0", "eslint-plugin-jest": "~22.3.0", diff --git a/src/graphql-schema.spec.js b/src/graphql-schema.spec.js index 3d259ab42..7aa47835f 100644 --- a/src/graphql-schema.spec.js +++ b/src/graphql-schema.spec.js @@ -6,7 +6,7 @@ import { host, login } from './jest/helpers' const factory = Factory() beforeEach(async () => { - await factory.create('user', { + await factory.create('User', { email: 'test@example.org', password: '1234' }) @@ -122,11 +122,11 @@ describe('CreatePost', () => { describe('report', () => { beforeEach(async () => { - await factory.create('user', { + await factory.create('User', { email: 'test@example.org', password: '1234' }) - await factory.create('user', { + await factory.create('User', { id: 'u2', name: 'abusive-user', role: 'user', diff --git a/src/middleware/permissionsMiddleware.spec.js b/src/middleware/permissionsMiddleware.spec.js index a22f2bb72..78766aad2 100644 --- a/src/middleware/permissionsMiddleware.spec.js +++ b/src/middleware/permissionsMiddleware.spec.js @@ -7,12 +7,12 @@ const factory = Factory() describe('authorization', () => { describe('given two existing users', () => { beforeEach(async () => { - await factory.create('user', { + await factory.create('User', { email: 'owner@example.org', name: 'Owner', password: 'iamtheowner' }) - await factory.create('user', { + await factory.create('User', { email: 'someone@example.org', name: 'Someone else', password: 'else' diff --git a/src/middleware/slugifyMiddleware.spec.js b/src/middleware/slugifyMiddleware.spec.js index aaa09d29a..c7cd9806f 100644 --- a/src/middleware/slugifyMiddleware.spec.js +++ b/src/middleware/slugifyMiddleware.spec.js @@ -7,8 +7,8 @@ let headers const factory = Factory() beforeEach(async () => { - await factory.create('user', { email: 'user@example.org', password: '1234' }) - await factory.create('user', { email: 'someone@example.org', password: '1234' }) + await factory.create('User', { email: 'user@example.org', password: '1234' }) + await factory.create('User', { email: 'someone@example.org', password: '1234' }) headers = await login({ email: 'user@example.org', password: '1234' }) authenticatedClient = new GraphQLClient(host, { headers }) }) @@ -35,7 +35,7 @@ describe('slugify', () => { email: 'someone@example.org', password: '1234' }) - await asSomeoneElse.create('post', { + await asSomeoneElse.create('Post', { title: 'Pre-existing post', slug: 'pre-existing-post' }) diff --git a/src/seed/factories/comments.js b/src/seed/factories/comments.js index acf493f6d..92dca5b14 100644 --- a/src/seed/factories/comments.js +++ b/src/seed/factories/comments.js @@ -23,15 +23,3 @@ export default function (params) { } ` } - -export function relate (type, params) { - const { from, to } = params - return ` - mutation { - ${from}_${type}_${to}: AddComment${type}( - from: { id: "${from}" }, - to: { id: "${to}" } - ) { from { id } } - } - ` -} diff --git a/src/seed/factories/index.js b/src/seed/factories/index.js index a107fc6b7..d9bbd700c 100644 --- a/src/seed/factories/index.js +++ b/src/seed/factories/index.js @@ -1,6 +1,15 @@ import { GraphQLClient, request } from 'graphql-request' import { getDriver } from '../../bootstrap/neo4j' +import createBadge from './badges.js' +import createUser from './users.js' +import createOrganization from './organizations.js' +import createPost from './posts.js' +import createComment from './comments.js' +import createCategory from './categories.js' +import createTag from './tags.js' +import createReport from './reports.js' + export const seedServerHost = 'http://127.0.0.1:4001' const authenticatedHeaders = async ({ email, password }, host) => { @@ -15,35 +24,15 @@ const authenticatedHeaders = async ({ email, password }, host) => { authorization: `Bearer ${response.login.token}` } } - const factories = { - 'badge': require('./badges.js').default, - 'user': require('./users.js').default, - 'organization': require('./organizations.js').default, - 'post': require('./posts.js').default, - 'comment': require('./comments.js').default, - 'category': require('./categories.js').default, - 'tag': require('./tags.js').default, - 'report': require('./reports.js').default -} - -const relationFactories = { - 'user': require('./users.js').relate, - 'organization': require('./organizations.js').relate, - 'post': require('./posts.js').relate, - 'comment': require('./comments.js').relate -} - -export const create = (model, parameters, options) => { - const graphQLClient = new GraphQLClient(seedServerHost, options) - const mutation = factories[model](parameters) - return graphQLClient.request(mutation) -} - -export const relate = (model, type, parameters, options) => { - const graphQLClient = new GraphQLClient(seedServerHost, options) - const mutation = relationFactories[model](type, parameters) - return graphQLClient.request(mutation) + 'Badge': createBadge, + 'User': createUser, + 'Organization': createOrganization, + 'Post': createPost, + 'Comment': createComment, + 'Category': createCategory, + 'Tag': createTag, + 'Report': createReport } export const cleanDatabase = async (options = {}) => { @@ -73,6 +62,7 @@ export default function Factory (options = {}) { neo4jDriver, seedServerHost, graphQLClient, + factories, lastResponse: null, async authenticateAs ({ email, password }) { const headers = await authenticatedHeaders({ email, password }, seedServerHost) @@ -81,12 +71,20 @@ export default function Factory (options = {}) { return this }, async create (node, properties) { - const mutation = factories[node](properties) + const mutation = this.factories[node](properties) this.lastResponse = await this.graphQLClient.request(mutation) return this }, async relate (node, relationship, properties) { - const mutation = relationFactories[node](relationship, properties) + const { from, to } = properties + const mutation = ` + mutation { + Add${node}${relationship}( + from: { id: "${from}" }, + to: { id: "${to}" } + ) { from { id } } + } + ` this.lastResponse = await this.graphQLClient.request(mutation) return this }, diff --git a/src/seed/factories/organizations.js b/src/seed/factories/organizations.js index 0ab73beb8..783edac26 100644 --- a/src/seed/factories/organizations.js +++ b/src/seed/factories/organizations.js @@ -22,15 +22,3 @@ export default function create (params) { } ` } - -export function relate (type, params) { - const { from, to } = params - return ` - mutation { - ${from}_${type}_${to}: AddOrganization${type}( - from: { id: "${from}" }, - to: { id: "${to}" } - ) { from { id } } - } - ` -} diff --git a/src/seed/factories/posts.js b/src/seed/factories/posts.js index 80f5e289d..d96cf4f73 100644 --- a/src/seed/factories/posts.js +++ b/src/seed/factories/posts.js @@ -32,15 +32,3 @@ export default function (params) { } ` } - -export function relate (type, params) { - const { from, to } = params - return ` - mutation { - ${from}_${type}_${to}: AddPost${type}( - from: { id: "${from}" }, - to: { id: "${to}" } - ) { from { id } } - } - ` -} diff --git a/src/seed/factories/users.js b/src/seed/factories/users.js index b3a6e83c1..8e0ee693c 100644 --- a/src/seed/factories/users.js +++ b/src/seed/factories/users.js @@ -33,15 +33,3 @@ export default function create (params) { } ` } - -export function relate (type, params) { - const { from, to } = params - return ` - mutation { - ${from}_${type}_${to}: AddUser${type}( - from: { id: "${from}" }, - to: { id: "${to}" } - ) { from { id } } - } - ` -} diff --git a/src/seed/seed-db.js b/src/seed/seed-db.js index 58984b12a..b2ee8fbdb 100644 --- a/src/seed/seed-db.js +++ b/src/seed/seed-db.js @@ -1,72 +1,73 @@ -import Factory, { create, relate } from './factories' +import Factory from './factories' /* eslint-disable no-multi-spaces */ (async function () { try { + const f = Factory() await Promise.all([ - create('badge', { id: 'b1', key: 'indiegogo_en_racoon', type: 'crowdfunding', status: 'permanent', icon: '/img/badges/indiegogo_en_racoon.svg' }), - create('badge', { id: 'b2', key: 'indiegogo_en_rabbit', type: 'crowdfunding', status: 'permanent', icon: '/img/badges/indiegogo_en_rabbit.svg' }), - create('badge', { id: 'b3', key: 'indiegogo_en_wolf', type: 'crowdfunding', status: 'permanent', icon: '/img/badges/indiegogo_en_wolf.svg' }), - create('badge', { id: 'b4', key: 'indiegogo_en_bear', type: 'crowdfunding', status: 'permanent', icon: '/img/badges/indiegogo_en_bear.svg' }), - create('badge', { id: 'b5', key: 'indiegogo_en_turtle', type: 'crowdfunding', status: 'permanent', icon: '/img/badges/indiegogo_en_turtle.svg' }), - create('badge', { id: 'b6', key: 'indiegogo_en_rhino', type: 'crowdfunding', status: 'permanent', icon: '/img/badges/indiegogo_en_rhino.svg' }) + f.create('Badge', { id: 'b1', key: 'indiegogo_en_racoon', type: 'crowdfunding', status: 'permanent', icon: '/img/badges/indiegogo_en_racoon.svg' }), + f.create('Badge', { id: 'b2', key: 'indiegogo_en_rabbit', type: 'crowdfunding', status: 'permanent', icon: '/img/badges/indiegogo_en_rabbit.svg' }), + f.create('Badge', { id: 'b3', key: 'indiegogo_en_wolf', type: 'crowdfunding', status: 'permanent', icon: '/img/badges/indiegogo_en_wolf.svg' }), + f.create('Badge', { id: 'b4', key: 'indiegogo_en_bear', type: 'crowdfunding', status: 'permanent', icon: '/img/badges/indiegogo_en_bear.svg' }), + f.create('Badge', { id: 'b5', key: 'indiegogo_en_turtle', type: 'crowdfunding', status: 'permanent', icon: '/img/badges/indiegogo_en_turtle.svg' }), + f.create('Badge', { id: 'b6', key: 'indiegogo_en_rhino', type: 'crowdfunding', status: 'permanent', icon: '/img/badges/indiegogo_en_rhino.svg' }) ]) await Promise.all([ - create('user', { id: 'u1', name: 'Peter Lustig', role: 'admin', email: 'admin@example.org' }), - create('user', { id: 'u2', name: 'Bob der Baumeister', role: 'moderator', email: 'moderator@example.org' }), - create('user', { id: 'u3', name: 'Jenny Rostock', role: 'user', email: 'user@example.org' }), - create('user', { id: 'u4', name: 'Tick', role: 'user', email: 'tick@example.org' }), - create('user', { id: 'u5', name: 'Trick', role: 'user', email: 'trick@example.org' }), - create('user', { id: 'u6', name: 'Track', role: 'user', email: 'track@example.org' }), - create('user', { id: 'u7', name: 'Dagobert', role: 'user', email: 'dagobert@example.org' }) + f.create('User', { id: 'u1', name: 'Peter Lustig', role: 'admin', email: 'admin@example.org' }), + f.create('User', { id: 'u2', name: 'Bob der Baumeister', role: 'moderator', email: 'moderator@example.org' }), + f.create('User', { id: 'u3', name: 'Jenny Rostock', role: 'user', email: 'user@example.org' }), + f.create('User', { id: 'u4', name: 'Tick', role: 'user', email: 'tick@example.org' }), + f.create('User', { id: 'u5', name: 'Trick', role: 'user', email: 'trick@example.org' }), + f.create('User', { id: 'u6', name: 'Track', role: 'user', email: 'track@example.org' }), + f.create('User', { id: 'u7', name: 'Dagobert', role: 'user', email: 'dagobert@example.org' }) ]) await Promise.all([ - relate('user', 'Badges', { from: 'b6', to: 'u1' }), - relate('user', 'Badges', { from: 'b5', to: 'u2' }), - relate('user', 'Badges', { from: 'b4', to: 'u3' }), - relate('user', 'Badges', { from: 'b3', to: 'u4' }), - relate('user', 'Badges', { from: 'b2', to: 'u5' }), - relate('user', 'Badges', { from: 'b1', to: 'u6' }), - relate('user', 'Following', { from: 'u1', to: 'u2' }), - relate('user', 'Following', { from: 'u2', to: 'u3' }), - relate('user', 'Following', { from: 'u3', to: 'u4' }), - relate('user', 'Following', { from: 'u4', to: 'u5' }), - relate('user', 'Following', { from: 'u5', to: 'u6' }), - relate('user', 'Following', { from: 'u6', to: 'u7' }), - relate('user', 'Friends', { from: 'u1', to: 'u2' }), - relate('user', 'Friends', { from: 'u1', to: 'u3' }), - relate('user', 'Friends', { from: 'u2', to: 'u3' }), - relate('user', 'Blacklisted', { from: 'u7', to: 'u4' }), - relate('user', 'Blacklisted', { from: 'u7', to: 'u5' }), - relate('user', 'Blacklisted', { from: 'u7', to: 'u6' }) + f.relate('User', 'Badges', { from: 'b6', to: 'u1' }), + f.relate('User', 'Badges', { from: 'b5', to: 'u2' }), + f.relate('User', 'Badges', { from: 'b4', to: 'u3' }), + f.relate('User', 'Badges', { from: 'b3', to: 'u4' }), + f.relate('User', 'Badges', { from: 'b2', to: 'u5' }), + f.relate('User', 'Badges', { from: 'b1', to: 'u6' }), + f.relate('User', 'Following', { from: 'u1', to: 'u2' }), + f.relate('User', 'Following', { from: 'u2', to: 'u3' }), + f.relate('User', 'Following', { from: 'u3', to: 'u4' }), + f.relate('User', 'Following', { from: 'u4', to: 'u5' }), + f.relate('User', 'Following', { from: 'u5', to: 'u6' }), + f.relate('User', 'Following', { from: 'u6', to: 'u7' }), + f.relate('User', 'Friends', { from: 'u1', to: 'u2' }), + f.relate('User', 'Friends', { from: 'u1', to: 'u3' }), + f.relate('User', 'Friends', { from: 'u2', to: 'u3' }), + f.relate('User', 'Blacklisted', { from: 'u7', to: 'u4' }), + f.relate('User', 'Blacklisted', { from: 'u7', to: 'u5' }), + f.relate('User', 'Blacklisted', { from: 'u7', to: 'u6' }) ]) await Promise.all([ - create('category', { id: 'cat1', name: 'Just For Fun', slug: 'justforfun', icon: 'smile' }), - create('category', { id: 'cat2', name: 'Happyness & Values', slug: 'happyness-values', icon: 'heart-o' }), - create('category', { id: 'cat3', name: 'Health & Wellbeing', slug: 'health-wellbeing', icon: 'medkit' }), - create('category', { id: 'cat4', name: 'Environment & Nature', slug: 'environment-nature', icon: 'tree' }), - create('category', { id: 'cat5', name: 'Animal Protection', slug: 'animalprotection', icon: 'paw' }), - create('category', { id: 'cat6', name: 'Humanrights Justice', slug: 'humanrights-justice', icon: 'balance-scale' }), - create('category', { id: 'cat7', name: 'Education & Sciences', slug: 'education-sciences', icon: 'graduation-cap' }), - create('category', { id: 'cat8', name: 'Cooperation & Development', slug: 'cooperation-development', icon: 'users' }), - create('category', { id: 'cat9', name: 'Democracy & Politics', slug: 'democracy-politics', icon: 'university' }), - create('category', { id: 'cat10', name: 'Economy & Finances', slug: 'economy-finances', icon: 'money' }), - create('category', { id: 'cat11', name: 'Energy & Technology', slug: 'energy-technology', icon: 'flash' }), - create('category', { id: 'cat12', name: 'IT, Internet & Data Privacy', slug: 'it-internet-dataprivacy', icon: 'mouse-pointer' }), - create('category', { id: 'cat13', name: 'Art, Curlure & Sport', slug: 'art-culture-sport', icon: 'paint-brush' }), - create('category', { id: 'cat14', name: 'Freedom of Speech', slug: 'freedomofspeech', icon: 'bullhorn' }), - create('category', { id: 'cat15', name: 'Consumption & Sustainability', slug: 'consumption-sustainability', icon: 'shopping-cart' }), - create('category', { id: 'cat16', name: 'Global Peace & Nonviolence', slug: 'globalpeace-nonviolence', icon: 'angellist' }) + f.create('Category', { id: 'cat1', name: 'Just For Fun', slug: 'justforfun', icon: 'smile' }), + f.create('Category', { id: 'cat2', name: 'Happyness & Values', slug: 'happyness-values', icon: 'heart-o' }), + f.create('Category', { id: 'cat3', name: 'Health & Wellbeing', slug: 'health-wellbeing', icon: 'medkit' }), + f.create('Category', { id: 'cat4', name: 'Environment & Nature', slug: 'environment-nature', icon: 'tree' }), + f.create('Category', { id: 'cat5', name: 'Animal Protection', slug: 'animalprotection', icon: 'paw' }), + f.create('Category', { id: 'cat6', name: 'Humanrights Justice', slug: 'humanrights-justice', icon: 'balance-scale' }), + f.create('Category', { id: 'cat7', name: 'Education & Sciences', slug: 'education-sciences', icon: 'graduation-cap' }), + f.create('Category', { id: 'cat8', name: 'Cooperation & Development', slug: 'cooperation-development', icon: 'users' }), + f.create('Category', { id: 'cat9', name: 'Democracy & Politics', slug: 'democracy-politics', icon: 'university' }), + f.create('Category', { id: 'cat10', name: 'Economy & Finances', slug: 'economy-finances', icon: 'money' }), + f.create('Category', { id: 'cat11', name: 'Energy & Technology', slug: 'energy-technology', icon: 'flash' }), + f.create('Category', { id: 'cat12', name: 'IT, Internet & Data Privacy', slug: 'it-internet-dataprivacy', icon: 'mouse-pointer' }), + f.create('Category', { id: 'cat13', name: 'Art, Curlure & Sport', slug: 'art-culture-sport', icon: 'paint-brush' }), + f.create('Category', { id: 'cat14', name: 'Freedom of Speech', slug: 'freedomofspeech', icon: 'bullhorn' }), + f.create('Category', { id: 'cat15', name: 'Consumption & Sustainability', slug: 'consumption-sustainability', icon: 'shopping-cart' }), + f.create('Category', { id: 'cat16', name: 'Global Peace & Nonviolence', slug: 'globalpeace-nonviolence', icon: 'angellist' }) ]) await Promise.all([ - create('tag', { id: 't1', name: 'Umwelt' }), - create('tag', { id: 't2', name: 'Naturschutz' }), - create('tag', { id: 't3', name: 'Demokratie' }), - create('tag', { id: 't4', name: 'Freiheit' }) + f.create('Tag', { id: 't1', name: 'Umwelt' }), + f.create('Tag', { id: 't2', name: 'Naturschutz' }), + f.create('Tag', { id: 't3', name: 'Demokratie' }), + f.create('Tag', { id: 't4', name: 'Freiheit' }) ]) const [ asAdmin, asModerator, asUser, asTick, asTrick, asTrack ] = await Promise.all([ @@ -79,113 +80,113 @@ import Factory, { create, relate } from './factories' ]) await Promise.all([ - asAdmin.create('post', { id: 'p0' }), - asModerator.create('post', { id: 'p1' }), - asUser.create('post', { id: 'p2' }), - asTick.create('post', { id: 'p3' }), - asTrick.create('post', { id: 'p4' }), - asTrack.create('post', { id: 'p5' }), - asAdmin.create('post', { id: 'p6' }), - asModerator.create('post', { id: 'p7' }), - asUser.create('post', { id: 'p8' }), - asTick.create('post', { id: 'p9' }), - asTrick.create('post', { id: 'p10' }), - asTrack.create('post', { id: 'p11' }), - asAdmin.create('post', { id: 'p12' }), - asModerator.create('post', { id: 'p13' }), - asUser.create('post', { id: 'p14' }), - asTick.create('post', { id: 'p15' }) + asAdmin.create('Post', { id: 'p0' }), + asModerator.create('Post', { id: 'p1' }), + asUser.create('Post', { id: 'p2' }), + asTick.create('Post', { id: 'p3' }), + asTrick.create('Post', { id: 'p4' }), + asTrack.create('Post', { id: 'p5' }), + asAdmin.create('Post', { id: 'p6' }), + asModerator.create('Post', { id: 'p7' }), + asUser.create('Post', { id: 'p8' }), + asTick.create('Post', { id: 'p9' }), + asTrick.create('Post', { id: 'p10' }), + asTrack.create('Post', { id: 'p11' }), + asAdmin.create('Post', { id: 'p12' }), + asModerator.create('Post', { id: 'p13' }), + asUser.create('Post', { id: 'p14' }), + asTick.create('Post', { id: 'p15' }) ]) await Promise.all([ - relate('post', 'Categories', { from: 'p0', to: 'cat16' }), - relate('post', 'Categories', { from: 'p1', to: 'cat1' }), - relate('post', 'Categories', { from: 'p2', to: 'cat2' }), - relate('post', 'Categories', { from: 'p3', to: 'cat3' }), - relate('post', 'Categories', { from: 'p4', to: 'cat4' }), - relate('post', 'Categories', { from: 'p5', to: 'cat5' }), - relate('post', 'Categories', { from: 'p6', to: 'cat6' }), - relate('post', 'Categories', { from: 'p7', to: 'cat7' }), - relate('post', 'Categories', { from: 'p8', to: 'cat8' }), - relate('post', 'Categories', { from: 'p9', to: 'cat9' }), - relate('post', 'Categories', { from: 'p10', to: 'cat10' }), - relate('post', 'Categories', { from: 'p11', to: 'cat11' }), - relate('post', 'Categories', { from: 'p12', to: 'cat12' }), - relate('post', 'Categories', { from: 'p13', to: 'cat13' }), - relate('post', 'Categories', { from: 'p14', to: 'cat14' }), - relate('post', 'Categories', { from: 'p15', to: 'cat15' }), + f.relate('Post', 'Categories', { from: 'p0', to: 'cat16' }), + f.relate('Post', 'Categories', { from: 'p1', to: 'cat1' }), + f.relate('Post', 'Categories', { from: 'p2', to: 'cat2' }), + f.relate('Post', 'Categories', { from: 'p3', to: 'cat3' }), + f.relate('Post', 'Categories', { from: 'p4', to: 'cat4' }), + f.relate('Post', 'Categories', { from: 'p5', to: 'cat5' }), + f.relate('Post', 'Categories', { from: 'p6', to: 'cat6' }), + f.relate('Post', 'Categories', { from: 'p7', to: 'cat7' }), + f.relate('Post', 'Categories', { from: 'p8', to: 'cat8' }), + f.relate('Post', 'Categories', { from: 'p9', to: 'cat9' }), + f.relate('Post', 'Categories', { from: 'p10', to: 'cat10' }), + f.relate('Post', 'Categories', { from: 'p11', to: 'cat11' }), + f.relate('Post', 'Categories', { from: 'p12', to: 'cat12' }), + f.relate('Post', 'Categories', { from: 'p13', to: 'cat13' }), + f.relate('Post', 'Categories', { from: 'p14', to: 'cat14' }), + f.relate('Post', 'Categories', { from: 'p15', to: 'cat15' }), - relate('post', 'Tags', { from: 'p0', to: 't4' }), - relate('post', 'Tags', { from: 'p1', to: 't1' }), - relate('post', 'Tags', { from: 'p2', to: 't2' }), - relate('post', 'Tags', { from: 'p3', to: 't3' }), - relate('post', 'Tags', { from: 'p4', to: 't4' }), - relate('post', 'Tags', { from: 'p5', to: 't1' }), - relate('post', 'Tags', { from: 'p6', to: 't2' }), - relate('post', 'Tags', { from: 'p7', to: 't3' }), - relate('post', 'Tags', { from: 'p8', to: 't4' }), - relate('post', 'Tags', { from: 'p9', to: 't1' }), - relate('post', 'Tags', { from: 'p10', to: 't2' }), - relate('post', 'Tags', { from: 'p11', to: 't3' }), - relate('post', 'Tags', { from: 'p12', to: 't4' }), - relate('post', 'Tags', { from: 'p13', to: 't1' }), - relate('post', 'Tags', { from: 'p14', to: 't2' }), - relate('post', 'Tags', { from: 'p15', to: 't3' }) + f.relate('Post', 'Tags', { from: 'p0', to: 't4' }), + f.relate('Post', 'Tags', { from: 'p1', to: 't1' }), + f.relate('Post', 'Tags', { from: 'p2', to: 't2' }), + f.relate('Post', 'Tags', { from: 'p3', to: 't3' }), + f.relate('Post', 'Tags', { from: 'p4', to: 't4' }), + f.relate('Post', 'Tags', { from: 'p5', to: 't1' }), + f.relate('Post', 'Tags', { from: 'p6', to: 't2' }), + f.relate('Post', 'Tags', { from: 'p7', to: 't3' }), + f.relate('Post', 'Tags', { from: 'p8', to: 't4' }), + f.relate('Post', 'Tags', { from: 'p9', to: 't1' }), + f.relate('Post', 'Tags', { from: 'p10', to: 't2' }), + f.relate('Post', 'Tags', { from: 'p11', to: 't3' }), + f.relate('Post', 'Tags', { from: 'p12', to: 't4' }), + f.relate('Post', 'Tags', { from: 'p13', to: 't1' }), + f.relate('Post', 'Tags', { from: 'p14', to: 't2' }), + f.relate('Post', 'Tags', { from: 'p15', to: 't3' }) ]) await Promise.all([ - relate('user', 'Shouted', { from: 'u1', to: 'p2' }), - relate('user', 'Shouted', { from: 'u1', to: 'p3' }), - relate('user', 'Shouted', { from: 'u2', to: 'p1' }), - relate('user', 'Shouted', { from: 'u3', to: 'p1' }), - relate('user', 'Shouted', { from: 'u3', to: 'p4' }), - relate('user', 'Shouted', { from: 'u4', to: 'p1' }) + f.relate('User', 'Shouted', { from: 'u1', to: 'p2' }), + f.relate('User', 'Shouted', { from: 'u1', to: 'p3' }), + f.relate('User', 'Shouted', { from: 'u2', to: 'p1' }), + f.relate('User', 'Shouted', { from: 'u3', to: 'p1' }), + f.relate('User', 'Shouted', { from: 'u3', to: 'p4' }), + f.relate('User', 'Shouted', { from: 'u4', to: 'p1' }) ]) await Promise.all([ - create('comment', { id: 'c1' }), - create('comment', { id: 'c2' }), - create('comment', { id: 'c3' }), - create('comment', { id: 'c4' }), - create('comment', { id: 'c5' }), - create('comment', { id: 'c6' }), - create('comment', { id: 'c7' }) + f.create('Comment', { id: 'c1' }), + f.create('Comment', { id: 'c2' }), + f.create('Comment', { id: 'c3' }), + f.create('Comment', { id: 'c4' }), + f.create('Comment', { id: 'c5' }), + f.create('Comment', { id: 'c6' }), + f.create('Comment', { id: 'c7' }) ]) await Promise.all([ - relate('comment', 'Author', { from: 'u3', to: 'c1' }), - relate('comment', 'Post', { from: 'c1', to: 'p1' }), - relate('comment', 'Author', { from: 'u1', to: 'c2' }), - relate('comment', 'Post', { from: 'c2', to: 'p1' }), - relate('comment', 'Author', { from: 'u1', to: 'c3' }), - relate('comment', 'Post', { from: 'c3', to: 'p3' }), - relate('comment', 'Author', { from: 'u4', to: 'c4' }), - relate('comment', 'Post', { from: 'c4', to: 'p2' }), - relate('comment', 'Author', { from: 'u4', to: 'c5' }), - relate('comment', 'Post', { from: 'c5', to: 'p3' }), - relate('comment', 'Author', { from: 'u3', to: 'c6' }), - relate('comment', 'Post', { from: 'c6', to: 'p4' }), - relate('comment', 'Author', { from: 'u2', to: 'c7' }), - relate('comment', 'Post', { from: 'c7', to: 'p2' }) + f.relate('Comment', 'Author', { from: 'u3', to: 'c1' }), + f.relate('Comment', 'Post', { from: 'c1', to: 'p1' }), + f.relate('Comment', 'Author', { from: 'u1', to: 'c2' }), + f.relate('Comment', 'Post', { from: 'c2', to: 'p1' }), + f.relate('Comment', 'Author', { from: 'u1', to: 'c3' }), + f.relate('Comment', 'Post', { from: 'c3', to: 'p3' }), + f.relate('Comment', 'Author', { from: 'u4', to: 'c4' }), + f.relate('Comment', 'Post', { from: 'c4', to: 'p2' }), + f.relate('Comment', 'Author', { from: 'u4', to: 'c5' }), + f.relate('Comment', 'Post', { from: 'c5', to: 'p3' }), + f.relate('Comment', 'Author', { from: 'u3', to: 'c6' }), + f.relate('Comment', 'Post', { from: 'c6', to: 'p4' }), + f.relate('Comment', 'Author', { from: 'u2', to: 'c7' }), + f.relate('Comment', 'Post', { from: 'c7', to: 'p2' }) ]) await Promise.all([ - asTick.create('report', { description: 'I don\'t like this comment', resource: { id: 'c1', type: 'comment' } }), - asTrick.create('report', { description: 'I don\'t like this post', resource: { id: 'p1', type: 'contribution' } }), - asTrack.create('report', { description: 'I don\'t like this user', resource: { id: 'u1', type: 'user' } }) + asTick.create('Report', { description: 'I don\'t like this comment', resource: { id: 'c1', type: 'comment' } }), + asTrick.create('Report', { description: 'I don\'t like this post', resource: { id: 'p1', type: 'contribution' } }), + asTrack.create('Report', { description: 'I don\'t like this user', resource: { id: 'u1', type: 'user' } }) ]) await Promise.all([ - create('organization', { id: 'o1', name: 'Democracy Deutschland', description: 'Description for democracy-deutschland.' }), - create('organization', { id: 'o2', name: 'Human-Connection', description: 'Description for human-connection.' }), - create('organization', { id: 'o3', name: 'Pro Veg', description: 'Description for pro-veg.' }), - create('organization', { id: 'o4', name: 'Greenpeace', description: 'Description for greenpeace.' }) + f.create('Organization', { id: 'o1', name: 'Democracy Deutschland', description: 'Description for democracy-deutschland.' }), + f.create('Organization', { id: 'o2', name: 'Human-Connection', description: 'Description for human-connection.' }), + f.create('Organization', { id: 'o3', name: 'Pro Veg', description: 'Description for pro-veg.' }), + f.create('Organization', { id: 'o4', name: 'Greenpeace', description: 'Description for greenpeace.' }) ]) await Promise.all([ - relate('organization', 'CreatedBy', { from: 'u1', to: 'o1' }), - relate('organization', 'CreatedBy', { from: 'u1', to: 'o2' }), - relate('organization', 'OwnedBy', { from: 'u2', to: 'o2' }), - relate('organization', 'OwnedBy', { from: 'u2', to: 'o3' }) + f.relate('Organization', 'CreatedBy', { from: 'u1', to: 'o1' }), + f.relate('Organization', 'CreatedBy', { from: 'u1', to: 'o2' }), + f.relate('Organization', 'OwnedBy', { from: 'u2', to: 'o2' }), + f.relate('Organization', 'OwnedBy', { from: 'u2', to: 'o3' }) ]) /* eslint-disable-next-line no-console */ console.log('Seeded Data...') diff --git a/yarn.lock b/yarn.lock index 2fe610fee..91e971746 100644 --- a/yarn.lock +++ b/yarn.lock @@ -871,15 +871,20 @@ acorn@^5.5.3: resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw== -acorn@^6.0.1, acorn@^6.0.2: +acorn@^6.0.1: version "6.0.4" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.0.4.tgz#77377e7353b72ec5104550aa2d2097a2fd40b754" integrity sha512-VY4i5EKSKkofY2I+6QLTbTTN/UvEQPCo6eiwzzSaSWfpaDhOmStMCMod6wmuPciNq+XS0faCglFu2lHZpdHUtg== -ajv@^6.5.3, ajv@^6.5.5, ajv@^6.6.1: - version "6.6.1" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.6.1.tgz#6360f5ed0d80f232cc2b294c362d5dc2e538dd61" - integrity sha512-ZoJjft5B+EJBjUyu9C9Hc0OZyPZSSlOF+plzouTrg6UlA8f+e/n8NIgBFG/9tppJtpPWfthHakK7juJdNDODww== +acorn@^6.0.7: + version "6.1.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.1.0.tgz#b0a3be31752c97a0f7013c5f4903b71a05db6818" + integrity sha512-MW/FjM+IvU9CgBzjO3UIPCE2pyEwUsoFl+VGdczOPEdxfGFjuKny/gN54mOuX7Qxmb9Rg9MCn2oKiSUeW+pjrw== + +ajv@^6.5.5, ajv@^6.9.1: + version "6.9.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.9.2.tgz#4927adb83e7f48e5a32b45729744c71ec39c9c7b" + integrity sha512-4UFy0/LgDo7Oa/+wOAlj44tp9K78u38E5/359eSrqEp1Z5PdVfimCcs7SluXMP755RUQu6d2b4AvF0R1C9RZjg== dependencies: fast-deep-equal "^2.0.1" fast-json-stable-stringify "^2.0.0" @@ -898,6 +903,11 @@ ansi-escapes@^3.0.0: resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30" integrity sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw== +ansi-escapes@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" + integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== + ansi-regex@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" @@ -1693,16 +1703,7 @@ chai@~4.2.0: pathval "^1.1.0" type-detect "^4.0.5" -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" - integrity sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@^2.4.2: +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -1767,11 +1768,6 @@ ci-info@^2.0.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== -circular-json@^0.3.1: - version "0.3.3" - resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" - integrity sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A== - class-utils@^0.3.5: version "0.3.6" resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" @@ -2225,10 +2221,10 @@ doctrine@1.5.0: esutils "^2.0.2" isarray "^1.0.0" -doctrine@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" - integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== dependencies: esutils "^2.0.2" @@ -2327,6 +2323,11 @@ electron-to-chromium@^1.3.86: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.88.tgz#f36ab32634f49ef2b0fdc1e82e2d1cc17feb29e7" integrity sha512-UPV4NuQMKeUh1S0OWRvwg0PI8ASHN9kBC8yDTk1ROXLC85W5GnhTRu/MZu3Teqx3JjlQYuckuHYXSUSgtb3J+A== +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + encodeurl@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" @@ -2508,35 +2509,35 @@ eslint-visitor-keys@^1.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" integrity sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ== -eslint@~5.13.0: - version "5.13.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.13.0.tgz#ce71cc529c450eed9504530939aa97527861ede9" - integrity sha512-nqD5WQMisciZC5EHZowejLKQjWGuFS5c70fxqSKlnDME+oz9zmE8KTlX+lHSg+/5wsC/kf9Q9eMkC8qS3oM2fg== +eslint@~5.14.1: + version "5.14.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.14.1.tgz#490a28906be313685c55ccd43a39e8d22efc04ba" + integrity sha512-CyUMbmsjxedx8B0mr79mNOqetvkbij/zrXnFeK2zc3pGRn3/tibjiNAv/3UxFEyfMDjh+ZqTrJrEGBFiGfD5Og== dependencies: "@babel/code-frame" "^7.0.0" - ajv "^6.5.3" + ajv "^6.9.1" chalk "^2.1.0" cross-spawn "^6.0.5" debug "^4.0.1" - doctrine "^2.1.0" + doctrine "^3.0.0" eslint-scope "^4.0.0" eslint-utils "^1.3.1" eslint-visitor-keys "^1.0.0" - espree "^5.0.0" + espree "^5.0.1" esquery "^1.0.1" esutils "^2.0.2" - file-entry-cache "^2.0.0" + file-entry-cache "^5.0.1" functional-red-black-tree "^1.0.1" glob "^7.1.2" globals "^11.7.0" ignore "^4.0.6" import-fresh "^3.0.0" imurmurhash "^0.1.4" - inquirer "^6.1.0" + inquirer "^6.2.2" js-yaml "^3.12.0" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.3.0" - lodash "^4.17.5" + lodash "^4.17.11" minimatch "^3.0.4" mkdirp "^0.5.1" natural-compare "^1.4.0" @@ -2547,15 +2548,15 @@ eslint@~5.13.0: semver "^5.5.1" strip-ansi "^4.0.0" strip-json-comments "^2.0.1" - table "^5.0.2" + table "^5.2.3" text-table "^0.2.0" -espree@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/espree/-/espree-5.0.0.tgz#fc7f984b62b36a0f543b13fb9cd7b9f4a7f5b65c" - integrity sha512-1MpUfwsdS9MMoN7ZXqAr9e9UKdVHDcvrJpyx7mm1WuQlx/ygErEQBzgi5Nh5qBHIoYweprhtMkTCb9GhcAIcsA== +espree@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-5.0.1.tgz#5d6526fa4fc7f0788a5cf75b15f30323e2f81f7a" + integrity sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A== dependencies: - acorn "^6.0.2" + acorn "^6.0.7" acorn-jsx "^5.0.0" eslint-visitor-keys "^1.0.0" @@ -2726,7 +2727,7 @@ extend@^3.0.0, extend@~3.0.2: resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== -external-editor@^3.0.0: +external-editor@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.0.3.tgz#5866db29a97826dbe4bf3afd24070ead9ea43a27" integrity sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA== @@ -2793,13 +2794,12 @@ figures@^2.0.0: dependencies: escape-string-regexp "^1.0.5" -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" - integrity sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E= +file-entry-cache@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c" + integrity sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g== dependencies: - flat-cache "^1.2.1" - object-assign "^4.0.1" + flat-cache "^2.0.1" fileset@^2.0.3: version "2.0.3" @@ -2864,15 +2864,19 @@ find-up@^3.0.0: dependencies: locate-path "^3.0.0" -flat-cache@^1.2.1: - version "1.3.4" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.3.4.tgz#2c2ef77525cc2929007dfffa1dd314aa9c9dee6f" - integrity sha512-VwyB3Lkgacfik2vhqR4uv2rvebqmDvFu4jlN/C1RzWoJEo8I7z4Q404oiqYCkq41mni8EzQnm95emU9seckwtg== +flat-cache@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" + integrity sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA== dependencies: - circular-json "^0.3.1" - graceful-fs "^4.1.2" - rimraf "~2.6.2" - write "^0.2.1" + flatted "^2.0.0" + rimraf "2.6.3" + write "1.0.3" + +flatted@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.0.tgz#55122b6536ea496b4b44893ee2608141d10d9916" + integrity sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg== fn-name@~2.0.1: version "2.0.1" @@ -3509,21 +3513,21 @@ ini@^1.3.4, ini@~1.3.0: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== -inquirer@^6.1.0: - version "6.2.1" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.2.1.tgz#9943fc4882161bdb0b0c9276769c75b32dbfcd52" - integrity sha512-088kl3DRT2dLU5riVMKKr1DlImd6X7smDhpXUCkJDCKvTEJeRiXh0G132HG9u5a+6Ylw9plFRY7RuTnwohYSpg== +inquirer@^6.2.2: + version "6.2.2" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.2.2.tgz#46941176f65c9eb20804627149b743a218f25406" + integrity sha512-Z2rREiXA6cHRR9KBOarR3WuLlFzlIfAEIiB45ll5SSadMg7WqOh1MKEjjndfuH5ewXdixWCxqnVfGOQzPeiztA== dependencies: - ansi-escapes "^3.0.0" - chalk "^2.0.0" + ansi-escapes "^3.2.0" + chalk "^2.4.2" cli-cursor "^2.1.0" cli-width "^2.0.0" - external-editor "^3.0.0" + external-editor "^3.0.3" figures "^2.0.0" - lodash "^4.17.10" + lodash "^4.17.11" mute-stream "0.0.7" run-async "^2.2.0" - rxjs "^6.1.0" + rxjs "^6.4.0" string-width "^2.1.0" strip-ansi "^5.0.0" through "^2.3.6" @@ -5079,7 +5083,7 @@ oauth-sign@~0.9.0: resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== -object-assign@^4, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: +object-assign@^4, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= @@ -5970,7 +5974,7 @@ retry@0.12.0: resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs= -rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3, rimraf@~2.6.2: +rimraf@2.6.3, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3: version "2.6.3" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== @@ -5994,10 +5998,10 @@ rx@^4.1.0: resolved "https://registry.yarnpkg.com/rx/-/rx-4.1.0.tgz#a5f13ff79ef3b740fe30aa803fb09f98805d4782" integrity sha1-pfE/957zt0D+MKqAP7CfmIBdR4I= -rxjs@^6.1.0: - version "6.3.3" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.3.3.tgz#3c6a7fa420e844a81390fb1158a9ec614f4bad55" - integrity sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw== +rxjs@^6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.4.0.tgz#f3bb0fe7bda7fb69deac0c16f17b50b0b8790504" + integrity sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw== dependencies: tslib "^1.9.0" @@ -6195,10 +6199,10 @@ slash@^2.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== -slice-ansi@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.0.0.tgz#5373bdb8559b45676e8541c66916cdd6251612e7" - integrity sha512-4j2WTWjp3GsZ+AOagyzVbzp4vWGtZ0hEZ/gDY/uTvm6MTxUfTUIsnMIFb1bn8o0RuXiqUw15H1bue8f22Vw2oQ== +slice-ansi@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" + integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ== dependencies: ansi-styles "^3.2.0" astral-regex "^1.0.0" @@ -6406,6 +6410,15 @@ string-width@^1.0.1: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" +string-width@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.0.0.tgz#5a1690a57cc78211fffd9bf24bbe24d090604eb1" + integrity sha512-rr8CUxBbvOZDUvc5lNIJ+OC1nPVpz+Siw9VBtUjB9b6jZehZLFt0JMCZzShFHIsI8cbhm0EsNIfWJMFV3cu3Ew== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.0.0" + string.prototype.padend@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.0.0.tgz#f3aaef7c1719f170c5eab1c32bf780d96e21f2f0" @@ -6534,15 +6547,15 @@ synchronous-promise@^2.0.5: resolved "https://registry.yarnpkg.com/synchronous-promise/-/synchronous-promise-2.0.6.tgz#de76e0ea2b3558c1e673942e47e714a930fa64aa" integrity sha512-TyOuWLwkmtPL49LHCX1caIwHjRzcVd62+GF6h8W/jHOeZUFHpnd2XJDVuUlaTaLPH1nuu2M69mfHr5XbQJnf/g== -table@^5.0.2: - version "5.1.1" - resolved "https://registry.yarnpkg.com/table/-/table-5.1.1.tgz#92030192f1b7b51b6eeab23ed416862e47b70837" - integrity sha512-NUjapYb/qd4PeFW03HnAuOJ7OMcBkJlqeClWxeNlQ0lXGSb52oZXGzkO0/I0ARegQ2eUT1g2VDJH0eUxDRcHmw== +table@^5.2.3: + version "5.2.3" + resolved "https://registry.yarnpkg.com/table/-/table-5.2.3.tgz#cde0cc6eb06751c009efab27e8c820ca5b67b7f2" + integrity sha512-N2RsDAMvDLvYwFcwbPyF3VmVSSkuF+G1e+8inhBLtHpvwXGw4QRPEZhihQNeEN0i1up6/f6ObCJXNdlRG3YVyQ== dependencies: - ajv "^6.6.1" + ajv "^6.9.1" lodash "^4.17.11" - slice-ansi "2.0.0" - string-width "^2.1.1" + slice-ansi "^2.1.0" + string-width "^3.0.0" tar@^4: version "4.4.8" @@ -7081,10 +7094,10 @@ write-file-atomic@^2.3.0: imurmurhash "^0.1.4" signal-exit "^3.0.2" -write@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" - integrity sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c= +write@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3" + integrity sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig== dependencies: mkdirp "^0.5.1"