diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index e6ffbbbc..9a00928e 100755 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -109,6 +109,17 @@ services: volumes: - './services/client:/usr/src/app' + lambdas-test: + container_name: lambdas-test + build: + context: ./lambdas + dockerfile: Dockerfile-test + environment: + - NODE_ENV=development + - CI=${CI:-false} + volumes: + - './lambdas:/usr/src/app' + swagger: container_name: swagger build: diff --git a/docker-compose-prod.yml b/docker-compose-prod.yml index 95521262..02cf55e1 100755 --- a/docker-compose-prod.yml +++ b/docker-compose-prod.yml @@ -103,6 +103,17 @@ services: - NODE_ENV=production - CI=${CI:-false} + lambdas-test: + container_name: lambdas-test + build: + context: ./lambdas + dockerfile: Dockerfile-test + environment: + - NODE_ENV=production + - CI=${CI:-false} + volumes: + - './lambdas:/usr/src/app' + swagger: container_name: swagger build: diff --git a/docker-compose-stage.yml b/docker-compose-stage.yml index 72a3bedf..8b48c843 100755 --- a/docker-compose-stage.yml +++ b/docker-compose-stage.yml @@ -103,6 +103,17 @@ services: - NODE_ENV=staging - CI=${CI:-false} + lambdas-test: + container_name: lambdas-test + build: + context: ./lambdas + dockerfile: Dockerfile-test + environment: + - NODE_ENV=staging + - CI=${CI:-false} + volumes: + - './lambdas:/usr/src/app' + swagger: container_name: swagger build: diff --git a/lambdas/Dockerfile-test b/lambdas/Dockerfile-test new file mode 100644 index 00000000..ff114b8a --- /dev/null +++ b/lambdas/Dockerfile-test @@ -0,0 +1,9 @@ +FROM node:8.10-alpine + +ENV NPM_CONFIG_LOGLEVEL warn + +COPY package.json package-lock.json /lambdas-test/ +WORKDIR /lambdas-test/ +RUN npm install + +COPY . /lambdas-test/ diff --git a/lambdas/eventbrite/config.js b/lambdas/eventbrite/config.js index 86ce43e7..f9062241 100644 --- a/lambdas/eventbrite/config.js +++ b/lambdas/eventbrite/config.js @@ -10,7 +10,17 @@ const eventsParams = page => "location.longitude": -6.762739, "location.latitude": 54.6425126, // Cookstown "location.within": "60mi", // 60 mile radius (all of Northern Ireland) - expand: "logo,venue,organizer,format,category,subcategory,bookmark_info,refund_policy,ticket_availability", + expand: [ + "logo", + "venue", + "organizer", + "format", + "category", + "subcategory", + "bookmark_info", + "refund_policy", + "ticket_availability" + ].join(","), categories: EVENTBRITE_TECH_CATEGORY, token: process.env.EVENTBRITE_API_TOKEN }); diff --git a/lambdas/eventbrite/handlers/producer.js b/lambdas/eventbrite/handlers/producer.js index d644aa28..f7d99641 100644 --- a/lambdas/eventbrite/handlers/producer.js +++ b/lambdas/eventbrite/handlers/producer.js @@ -48,9 +48,11 @@ module.exports.produce = async (event, context, callback) => { // Write captured data to S3 const { producerBucket } = buckets(); - const filePaths = await Promise.all(await eventsPages.map(async function (eventsPage, index) { - return (await uploadData(producerBucket, eventsPage, { index })).key; - })); + const filePaths = await Promise.all( + await eventsPages.map(async function(eventsPage, index) { + return (await uploadData(producerBucket, eventsPage, { index })).key; + }) + ); callback(null, { message: filePaths }); } catch (err) { diff --git a/lambdas/eventbrite/handlers/transformer.js b/lambdas/eventbrite/handlers/transformer.js index 33454b9b..dbc77d20 100644 --- a/lambdas/eventbrite/handlers/transformer.js +++ b/lambdas/eventbrite/handlers/transformer.js @@ -6,23 +6,26 @@ const eventSchema = require("./schemas/event-schema"); const { buckets } = require("../config"); const { uploadTo } = require("../utils"); -const getLogoFrom = function ({ logo }) { +const getLogoFrom = function({ logo }) { if (!logo) return undefined; return { high: logo.original ? logo.original.url.trim() : undefined, regular: logo.url.trim() - } + }; }; -const getTopicsFrom = function ({ category, subcategory }) { +const getTopicsFrom = function({ category, subcategory }) { return [category, subcategory].reduce( - (topics, source) => !source ? topics : topics.concat(source.name.trim()), + (topics, source) => (!source ? topics : topics.concat(source.name.trim())), [] ); }; -const getChargeFrom = function ({ is_free: isFree, ticket_availability: tickets }) { +const getChargeFrom = function({ + is_free: isFree, + ticket_availability: tickets +}) { if (isFree) return { is_free: true }; return { @@ -31,10 +34,10 @@ const getChargeFrom = function ({ is_free: isFree, ticket_availability: tickets currency: tickets.minimum_ticket_price.currency.trim(), value: tickets.minimum_ticket_price.value } - } + }; }; -const transformEvent = function (defaults, event) { +const transformEvent = function(defaults, event) { const { id, name, @@ -45,7 +48,7 @@ const transformEvent = function (defaults, event) { venue, organizer, created, - changed, + changed } = event; const startDate = new Date(start.utc); const endDate = new Date(end.utc); @@ -85,16 +88,15 @@ const transformEvent = function (defaults, event) { name: "eventbrite", id } - } + }; }; -const isValidEvent = (event) => validate(event, eventSchema).errors.length === 0; +const isValidEvent = event => validate(event, eventSchema).errors.length === 0; const uploadData = function(bucketName, eventsPage) { return uploadTo( bucketName, - (today, hash) => - `eventbrite-events__${today.valueOf()}__${hash}.json`, + (today, hash) => `eventbrite-events__${today.valueOf()}__${hash}.json`, eventsPage ); }; @@ -103,29 +105,31 @@ module.exports.transform = async (event, context, callback) => { try { const records = event.Records; - const transformedFiles = await Promise.all(await records.map(async function ({ - s3: { bucket, object: file } - }) { - const data = await getFromS3(bucket.name, file.key); - const response = JSON.parse(data.Body.toString()); + const transformedFiles = await Promise.all( + await records.map(async function({ s3: { bucket, object: file } }) { + const data = await getFromS3(bucket.name, file.key); + const response = JSON.parse(data.Body.toString()); - const transformedEvents = response.events.map((event) => ( - transformEvent({ country: "GB" }, event) - )); + const transformedEvents = response.events.map(rawEvent => + transformEvent({ country: "GB" }, rawEvent) + ); - const validEvents = transformedEvents.filter(isValidEvent) + const validEvents = transformedEvents.filter(isValidEvent); - if (validEvents.length !== transformedEvents.length) { - console.log('WARNING: some events generated were not valid!') - } + if (validEvents.length !== transformedEvents.length) { + console.log("WARNING: some events generated were not valid!"); + } - return validEvents; - })); + return validEvents; + }) + ); const { eventsBucket } = buckets(); - const filePaths = await Promise.all(await transformedFiles.map(async function (transformedFile) { - return (await uploadData(eventsBucket, transformedFile)).key; - })); + const filePaths = await Promise.all( + await transformedFiles.map(async function(transformedFile) { + return (await uploadData(eventsBucket, transformedFile)).key; + }) + ); callback(null, { message: filePaths }); } catch (err) { diff --git a/lambdas/eventbrite/package.json b/lambdas/eventbrite/package.json index c077bb80..9b7715fd 100644 --- a/lambdas/eventbrite/package.json +++ b/lambdas/eventbrite/package.json @@ -1,7 +1,12 @@ { "name": "muxer-pull-events-eventbrite", - "version": "1.0.0", "description": "Pull eventbrite.com events data", + "license": "MIT", + "repository": { + "type" : "git", + "url" : "https://github.com/apoclyps/my-dev-space.git" + }, + "private": true, "dependencies": { "aws-lambda-data-utils": "^1.0.0", "jsonschema": "^1.2.4" diff --git a/lambdas/eventbrite/utils.js b/lambdas/eventbrite/utils.js index 085b47a2..2884e007 100644 --- a/lambdas/eventbrite/utils.js +++ b/lambdas/eventbrite/utils.js @@ -23,4 +23,4 @@ const convert = params => module.exports = { uploadTo, convert -} +}; diff --git a/lambdas/farsetlabs/config.js b/lambdas/farsetlabs/config.js index 9d94b73d..68abf6ef 100644 --- a/lambdas/farsetlabs/config.js +++ b/lambdas/farsetlabs/config.js @@ -1,13 +1,14 @@ const { addYear, convert } = require("./utils"); -const CALENDAR_ID = 'farsetlabs.org.uk_srmqnkn373auq51u00s2nijrq8%40group.calendar.google.com' +const CALENDAR_ID = + "farsetlabs.org.uk_srmqnkn373auq51u00s2nijrq8%40group.calendar.google.com"; const eventsApi = `https://www.googleapis.com/calendar/v3/calendars/${CALENDAR_ID}/events`; const eventsParams = () => convert({ maxResults: 2500, singleEvents: true, - orderBy: 'startTime', + orderBy: "startTime", timeMin: new Date().toISOString(), timeMax: addYear(new Date()).toISOString(), key: process.env.GOOGLE_CALENDAR_API_TOKEN diff --git a/lambdas/farsetlabs/handlers/producer.js b/lambdas/farsetlabs/handlers/producer.js index 201a91d7..71c27fe2 100644 --- a/lambdas/farsetlabs/handlers/producer.js +++ b/lambdas/farsetlabs/handlers/producer.js @@ -7,8 +7,7 @@ const { uploadTo } = require("../utils"); const uploadData = function(bucketName, calendarData) { return uploadTo( bucketName, - (today, hash) => - `farset-labs-calendar__${today.valueOf()}__${hash}.json`, + (today, hash) => `farset-labs-calendar__${today.valueOf()}__${hash}.json`, calendarData ); }; diff --git a/lambdas/farsetlabs/handlers/transformer.js b/lambdas/farsetlabs/handlers/transformer.js index 1ef1ba08..acde1704 100644 --- a/lambdas/farsetlabs/handlers/transformer.js +++ b/lambdas/farsetlabs/handlers/transformer.js @@ -6,9 +6,10 @@ const eventSchema = require("./schemas/event-schema"); const { buckets } = require("../config"); const { uploadTo } = require("../utils"); -const transformEvent = function (defaults, { - id, summary, description, start, end, created, updated -}) { +const transformEvent = function( + defaults, + { id, summary, description, start, end, created, updated } +) { const startDate = new Date(start.dateTime); const endDate = new Date(end.dateTime); @@ -45,13 +46,12 @@ const transformEvent = function (defaults, { }; }; -const isValidEvent = (event) => validate(event, eventSchema).errors.length === 0; +const isValidEvent = event => validate(event, eventSchema).errors.length === 0; const uploadData = function(bucketName, calendarData) { return uploadTo( bucketName, - (today, hash) => - `farset-labs-calendar__${today.valueOf()}__${hash}.json`, + (today, hash) => `farset-labs-calendar__${today.valueOf()}__${hash}.json`, calendarData ); }; @@ -60,29 +60,31 @@ module.exports.transform = async (event, context, callback) => { try { const records = event.Records; - const transformedCalendars = await Promise.all(await records.map(async function ({ - s3: { bucket, object: file } - }) { - const calendarData = await getFromS3(bucket.name, file.key); - const calendar = JSON.parse(calendarData.Body.toString()); + const transformedCalendars = await Promise.all( + await records.map(async function({ s3: { bucket, object: file } }) { + const calendarData = await getFromS3(bucket.name, file.key); + const calendar = JSON.parse(calendarData.Body.toString()); - const transformedEvents = calendar.items.map((event) => ( - transformEvent({ timeZone: calendar.timeZone }, event) - )); + const transformedEvents = calendar.items.map(rawEvent => + transformEvent({ timeZone: calendar.timeZone }, rawEvent) + ); - const validEvents = transformedEvents.filter(isValidEvent) + const validEvents = transformedEvents.filter(isValidEvent); - if (validEvents.length !== transformedEvents.length) { - console.log('WARNING: some events generated were not valid!') - } + if (validEvents.length !== transformedEvents.length) { + console.log("WARNING: some events generated were not valid!"); + } - return validEvents; - })); + return validEvents; + }) + ); const { eventsBucket } = buckets(); - const filePaths = await Promise.all(await transformedCalendars.map(async function (transformedCalendar) { - return (await uploadData(eventsBucket, transformedCalendar)).key; - })); + const filePaths = await Promise.all( + await transformedCalendars.map(async function(transformedCalendar) { + return (await uploadData(eventsBucket, transformedCalendar)).key; + }) + ); callback(null, { message: filePaths }); } catch (err) { diff --git a/lambdas/farsetlabs/package.json b/lambdas/farsetlabs/package.json index 676bc952..366b6bfc 100644 --- a/lambdas/farsetlabs/package.json +++ b/lambdas/farsetlabs/package.json @@ -1,7 +1,12 @@ { "name": "muxer-pull-events-farsetlabs", - "version": "1.0.0", "description": "Pull Farset Labs events data", + "license": "MIT", + "repository": { + "type" : "git", + "url" : "https://github.com/apoclyps/my-dev-space.git" + }, + "private": true, "dependencies": { "aws-lambda-data-utils": "^1.0.0", "jsonschema": "^1.2.4" diff --git a/lambdas/farsetlabs/utils.js b/lambdas/farsetlabs/utils.js index dc5f85ba..16002b09 100644 --- a/lambdas/farsetlabs/utils.js +++ b/lambdas/farsetlabs/utils.js @@ -15,7 +15,7 @@ const uploadTo = function(bucketName, createFilename, data) { return setInS3(prefix, bucketName, filePath, fileContents); }; -const addYear = (date) => new Date(date.setFullYear(date.getFullYear() + 1)); +const addYear = date => new Date(date.setFullYear(date.getFullYear() + 1)); const convert = params => Object.entries(params) @@ -26,4 +26,4 @@ module.exports = { uploadTo, addYear, convert -} +}; diff --git a/lambdas/meetupcom/config.js b/lambdas/meetupcom/config.js index 1126f888..d285813b 100644 --- a/lambdas/meetupcom/config.js +++ b/lambdas/meetupcom/config.js @@ -18,7 +18,7 @@ const groupsParams = convert({ "plain_text_description", "plain_text_no_images_description", "topics" - ].join(','), + ].join(","), fallback_suggestions: false, category: MEETUPCOM_TECH_CATEGORY, page: 200, @@ -29,13 +29,7 @@ const groupsParams = convert({ const eventsApi = slug => `https://api.meetup.com/${slug}/events`; const eventsParams = convert({ "photo-host": "public", - status: [ - "cancelled", - "past", - "proposed", - "suggested", - "upcoming" - ].join(','), + status: ["cancelled", "past", "proposed", "suggested", "upcoming"].join(","), page: 200 }); diff --git a/lambdas/meetupcom/handlers/transformer.js b/lambdas/meetupcom/handlers/transformer.js index 9c1cffba..3c18ba2b 100644 --- a/lambdas/meetupcom/handlers/transformer.js +++ b/lambdas/meetupcom/handlers/transformer.js @@ -8,15 +8,18 @@ const eventSchema = require("./schemas/event-schema"); const { buckets } = require("../config"); const { uploadTo } = require("../utils"); -const meetupGroupsFilePrefix = 'meetupcom-groups__'; -const meetupGroupsDirectory = 'groups-events'; +const meetupGroupsFilePrefix = "meetupcom-groups__"; +const meetupGroupsDirectory = "groups-events"; -const getDescriptionFrom = function ({ plain_text_no_images_description: strippedDescription, description }) { +const getDescriptionFrom = function({ + plain_text_no_images_description: strippedDescription, + description +}) { if (strippedDescription) return strippedDescription; - return striptags(striptags(description, ['p', 'div']), [], '\n').trim(); + return striptags(striptags(description, ["p", "div"]), [], "\n").trim(); }; -const getChargeFrom = function ({ fee }) { +const getChargeFrom = function({ fee }) { if (!fee) return { is_free: true }; return { @@ -25,10 +28,10 @@ const getChargeFrom = function ({ fee }) { currency: fee.currency.trim(), value: fee.amount } - } + }; }; -const getVenueFrom = function ({ venue, group }, defaults) { +const getVenueFrom = function({ venue, group }, defaults) { if (!venue) { return { name: "No Venue", @@ -47,26 +50,31 @@ const getVenueFrom = function ({ venue, group }, defaults) { address: venue.address_1.trim(), city: venue.city.trim(), country: venue.country.trim().toUpperCase() - } + }; }; -const getLogoFrom = function ({ group_photo, key_photo, meta_category }) { - const imageSet = group_photo || key_photo || (meta_category || {}).photo; +const getLogoFrom = function({ + group_photo: groupPhoto, + key_photo: keyPhoto, + meta_category: metaCategory +}) { + const imageSet = groupPhoto || keyPhoto || (metaCategory || {}).photo; if (!imageSet) { return { - regular: 'https://secure.meetupstatic.com/s/img/3825254008927924706/logo/svg/logo--mSwarm.svg' - } + regular: + "https://secure.meetupstatic.com/s/img/3825254008927924706/logo/svg/logo--mSwarm.svg" + }; } return { high: imageSet.highres_link, regular: imageSet.photo_link, thumbnail: imageSet.thumb_link - } + }; }; -const transformEvent = function (defaults, event, group) { +const transformEvent = function(defaults, event, group) { const { id, name, @@ -78,10 +86,10 @@ const transformEvent = function (defaults, event, group) { yes_rsvp_count: responses, waitlist_count: waitlist, created, - updated, + updated } = event; - const duration = (meetupDuration || 0); + const duration = meetupDuration || 0; const start = new Date(time); const end = new Date(time + duration); @@ -100,7 +108,7 @@ const transformEvent = function (defaults, event, group) { }, duration }, - topics: group.topics.map(({ name }) => name), + topics: group.topics.map(topic => topic.name), venue: getVenueFrom(event, group), organiser: { name: organiser.name.trim(), @@ -121,21 +129,21 @@ const transformEvent = function (defaults, event, group) { }; }; -const isUpcomingEvent = ({ status }) => status === 'upcoming'; +const isUpcomingEvent = ({ status }) => status === "upcoming"; -const isValidEvent = (event) => validate(event, eventSchema).errors.length === 0; +const isValidEvent = event => validate(event, eventSchema).errors.length === 0; -const getGroupsFile = async function ([{ filePath, bucket }]) { +const getGroupsFile = async function([{ filePath, bucket }]) { const bucketDirectory = filePath.split(meetupGroupsDirectory)[0]; const fileList = await getListFromS3(bucket, bucketDirectory); - const groupsFilePath = fileList.find( - ({ Key: bucketFilepath }) => bucketFilepath.includes(meetupGroupsFilePrefix) + const groupsFilePath = fileList.find(({ Key: bucketFilepath }) => + bucketFilepath.includes(meetupGroupsFilePrefix) ); const data = await getFromS3(bucket, groupsFilePath.Key); return JSON.parse(data.Body.toString()); }; -const getGroupData = function (events, groups) { +const getGroupData = function(events, groups) { if (events.length === 0) return null; return groups.find(({ id }) => events[0].group.id === id); }; @@ -143,8 +151,7 @@ const getGroupData = function (events, groups) { const uploadData = function(bucketName, eventsPage) { return uploadTo( bucketName, - (today, hash) => - `meetupcom-events__${today.valueOf()}__${hash}.json`, + (today, hash) => `meetupcom-events__${today.valueOf()}__${hash}.json`, eventsPage ); }; @@ -154,46 +161,52 @@ module.exports.transform = async (event, context, callback) => { const newFiles = event.Records.map(({ s3: { bucket, object: file } }) => ({ bucket: bucket.name, filePath: file.key - })).filter(({ filePath }) => !path.basename(filePath).startsWith(meetupGroupsFilePrefix)); + })).filter( + ({ filePath }) => + !path.basename(filePath).startsWith(meetupGroupsFilePrefix) + ); if (newFiles.length === 0) { callback(null, { message: [] }); - return + return; } - const groupsData = await getGroupsFile(newFiles);; + const groupsData = await getGroupsFile(newFiles); - const transformedFiles = await Promise.all(await newFiles.map(async function ({ - bucket, filePath - }) { - const data = await getFromS3(bucket, filePath); - const events = JSON.parse(data.Body.toString()); + const transformedFiles = await Promise.all( + await newFiles.map(async function({ bucket, filePath }) { + const data = await getFromS3(bucket, filePath); + const events = JSON.parse(data.Body.toString()); - const upcomingEvents = events.filter(isUpcomingEvent); - if (upcomingEvents.length === 0) { - console.log(`No upcoming events from ${filePath}`); - callback(null, []); - return; - } + const upcomingEvents = events.filter(isUpcomingEvent); + if (upcomingEvents.length === 0) { + console.log(`No upcoming events from ${filePath}`); + return []; + } - const groupData = getGroupData(upcomingEvents, groupsData); - const transformedEvents = upcomingEvents.map((event) => ( - transformEvent({}, event, groupData) - )); + const groupData = getGroupData(upcomingEvents, groupsData); + const transformedEvents = upcomingEvents.map(rawEvent => + transformEvent({}, rawEvent, groupData) + ); - const validEvents = transformedEvents.filter(isValidEvent); + const validEvents = transformedEvents.filter(isValidEvent); - if (validEvents.length !== transformedEvents.length) { - console.log('WARNING: some events generated were not valid!') - } + if (validEvents.length !== transformedEvents.length) { + console.log("WARNING: some events generated were not valid!"); + } - return validEvents; - })); + return validEvents; + }) + ); const { eventsBucket } = buckets(); - const filePaths = await Promise.all(await transformedFiles.map(async function (transformedFile) { - return (await uploadData(eventsBucket, transformedFile)).key; - })); + const filePaths = await Promise.all( + await transformedFiles + .filter(transformedFile => transformedFile.lenth > 0) + .map(async function(transformedFile) { + return (await uploadData(eventsBucket, transformedFile)).key; + }) + ); callback(null, { message: filePaths }); } catch (err) { diff --git a/lambdas/meetupcom/package.json b/lambdas/meetupcom/package.json index 8333a295..aa1e15c4 100644 --- a/lambdas/meetupcom/package.json +++ b/lambdas/meetupcom/package.json @@ -1,7 +1,12 @@ { "name": "muxer-pull-events-meetupcom", - "version": "1.0.0", "description": "Pull meetup.com events data", + "license": "MIT", + "repository": { + "type" : "git", + "url" : "https://github.com/apoclyps/my-dev-space.git" + }, + "private": true, "dependencies": { "aws-lambda-data-utils": "^1.0.0", "jsonschema": "^1.2.4", diff --git a/lambdas/meetupcom/utils.js b/lambdas/meetupcom/utils.js index 085b47a2..2884e007 100644 --- a/lambdas/meetupcom/utils.js +++ b/lambdas/meetupcom/utils.js @@ -23,4 +23,4 @@ const convert = params => module.exports = { uploadTo, convert -} +}; diff --git a/lambdas/package-lock.json b/lambdas/package-lock.json index bec41bb2..04a5875f 100644 --- a/lambdas/package-lock.json +++ b/lambdas/package-lock.json @@ -3,6 +3,26 @@ "requires": true, "lockfileVersion": 1, "dependencies": { + "@babel/code-frame": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", + "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", + "dev": true, + "requires": { + "@babel/highlight": "^7.0.0" + } + }, + "@babel/highlight": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", + "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" + } + }, "@serverless/platform-sdk": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/@serverless/platform-sdk/-/platform-sdk-0.2.1.tgz", @@ -31,26 +51,18 @@ } }, "acorn": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.2.tgz", - "integrity": "sha512-cJrKCNcr2kv8dlDnbw+JPUGjHZzo4myaxOLmpOX8a+rgX94YeTcTMv/LFJUSByRpc+i4GgVnnhLxvMu/2Y+rqw==", + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", + "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", "dev": true }, "acorn-jsx": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", - "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-4.1.1.tgz", + "integrity": "sha512-JY+iV6r+cO21KtntVvFkD+iqjtdpRUpGqKWgfkCdZq1R+kbreEl8EcdcJR4SmiIgsIQT33s6QzheQ9a275Q8xw==", "dev": true, "requires": { - "acorn": "^3.0.4" - }, - "dependencies": { - "acorn": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", - "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", - "dev": true - } + "acorn": "^5.0.3" } }, "agent-base": { @@ -62,23 +74,34 @@ } }, "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.4.tgz", + "integrity": "sha512-4Wyjt8+t6YszqaXnLDfMmG/8AlO5Zbcsy3ATHncCzjW/NoPzAId8AK6749Ybjmdt+kUY1gP60fCu46oDxPv/mg==", "dev": true, "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", + "fast-deep-equal": "^2.0.1", "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "dependencies": { + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + } } }, - "ajv-keywords": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz", - "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=", - "dev": true - }, "ansi": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz", @@ -267,44 +290,6 @@ } } }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "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" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, "babel-polyfill": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz", @@ -520,9 +505,9 @@ } }, "chardet": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", - "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", "dev": true }, "ci-info": { @@ -554,12 +539,6 @@ "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=" }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "dev": true - }, "code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", @@ -1017,49 +996,49 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "eslint": { - "version": "4.19.1", - "resolved": "http://registry.npmjs.org/eslint/-/eslint-4.19.1.tgz", - "integrity": "sha512-bT3/1x1EbZB7phzYu7vCr1v3ONuzDtX8WjuM9c0iYxe+cq+pwcKEoQjl7zd3RpC6YOLgnSy3cTN58M2jcoPDIQ==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.7.0.tgz", + "integrity": "sha512-zYCeFQahsxffGl87U2aJ7DPyH8CbWgxBC213Y8+TCanhUTf2gEvfq3EKpHmEcozTLyPmGe9LZdMAwC/CpJBM5A==", "dev": true, "requires": { - "ajv": "^5.3.0", - "babel-code-frame": "^6.22.0", + "@babel/code-frame": "^7.0.0", + "ajv": "^6.5.3", "chalk": "^2.1.0", - "concat-stream": "^1.6.0", - "cross-spawn": "^5.1.0", - "debug": "^3.1.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", "doctrine": "^2.1.0", - "eslint-scope": "^3.7.1", + "eslint-scope": "^4.0.0", + "eslint-utils": "^1.3.1", "eslint-visitor-keys": "^1.0.0", - "espree": "^3.5.4", - "esquery": "^1.0.0", + "espree": "^4.0.0", + "esquery": "^1.0.1", "esutils": "^2.0.2", "file-entry-cache": "^2.0.0", "functional-red-black-tree": "^1.0.1", "glob": "^7.1.2", - "globals": "^11.0.1", - "ignore": "^3.3.3", + "globals": "^11.7.0", + "ignore": "^4.0.6", "imurmurhash": "^0.1.4", - "inquirer": "^3.0.6", - "is-resolvable": "^1.0.0", - "js-yaml": "^3.9.1", + "inquirer": "^6.1.0", + "is-resolvable": "^1.1.0", + "js-yaml": "^3.12.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.3.0", - "lodash": "^4.17.4", - "minimatch": "^3.0.2", + "lodash": "^4.17.5", + "minimatch": "^3.0.4", "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", "optionator": "^0.8.2", "path-is-inside": "^1.0.2", "pluralize": "^7.0.0", "progress": "^2.0.0", - "regexpp": "^1.0.1", + "regexpp": "^2.0.1", "require-uncached": "^1.0.3", - "semver": "^5.3.0", + "semver": "^5.5.1", "strip-ansi": "^4.0.0", - "strip-json-comments": "~2.0.1", - "table": "4.0.2", - "text-table": "~0.2.0" + "strip-json-comments": "^2.0.1", + "table": "^5.0.2", + "text-table": "^0.2.0" }, "dependencies": { "ansi-escapes": { @@ -1083,23 +1062,36 @@ "restore-cursor": "^2.0.0" } }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz", + "integrity": "sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==", "dev": true, "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } }, "external-editor": { - "version": "2.2.0", - "resolved": "http://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", - "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", + "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", "dev": true, "requires": { - "chardet": "^0.4.0", - "iconv-lite": "^0.4.17", + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", "tmp": "^0.0.33" } }, @@ -1112,23 +1104,31 @@ "escape-string-regexp": "^1.0.5" } }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, "inquirer": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", - "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.0.tgz", + "integrity": "sha512-QIEQG4YyQ2UYZGDC4srMZ7BjHOmNk1lR2JQj5UknBapklm6WHA+VVH7N+sUdX3A7NeCfGF8o4X1S3Ao7nAcIeg==", "dev": true, "requires": { "ansi-escapes": "^3.0.0", "chalk": "^2.0.0", "cli-cursor": "^2.1.0", "cli-width": "^2.0.0", - "external-editor": "^2.0.4", + "external-editor": "^3.0.0", "figures": "^2.0.0", - "lodash": "^4.3.0", + "lodash": "^4.17.10", "mute-stream": "0.0.7", "run-async": "^2.2.0", - "rx-lite": "^4.0.8", - "rx-lite-aggregates": "^4.0.8", + "rxjs": "^6.1.0", "string-width": "^2.1.0", "strip-ansi": "^4.0.0", "through": "^2.3.6" @@ -1140,6 +1140,12 @@ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, "mute-stream": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", @@ -1207,12 +1213,20 @@ } }, "eslint-config-prettier": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-2.10.0.tgz", - "integrity": "sha512-Mhl90VLucfBuhmcWBgbUNtgBiK955iCDK1+aHAz7QfDQF6wuzWZ6JjihZ3ejJoGlJWIuko7xLqNm8BA5uenKhA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-3.1.0.tgz", + "integrity": "sha512-QYGfmzuc4q4J6XIhlp8vRKdI/fI0tQfQPy1dME3UOLprE+v4ssH/3W9LM2Q7h5qBcy5m0ehCrBDU2YF8q6OY8w==", "dev": true, "requires": { - "get-stdin": "^5.0.1" + "get-stdin": "^6.0.0" + }, + "dependencies": { + "get-stdin": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", + "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", + "dev": true + } } }, "eslint-import-resolver-node": { @@ -1266,13 +1280,12 @@ } }, "eslint-plugin-prettier": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-2.6.2.tgz", - "integrity": "sha512-tGek5clmW5swrAx1mdPYM8oThrBE83ePh7LeseZHBWfHVGrHPhKn7Y5zgRMbU/9D5Td9K4CEmUPjGxA7iw98Og==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.0.0.tgz", + "integrity": "sha512-4g11opzhqq/8+AMmo5Vc2Gn7z9alZ4JqrbZ+D4i8KlSyxeQhZHlmIrY8U9Akf514MoEhogPa87Jgkq87aZ2Ohw==", "dev": true, "requires": { - "fast-diff": "^1.1.1", - "jest-docblock": "^21.0.0" + "prettier-linter-helpers": "^1.0.0" } }, "eslint-restricted-globals": { @@ -1282,15 +1295,21 @@ "dev": true }, "eslint-scope": { - "version": "3.7.3", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.3.tgz", - "integrity": "sha512-W+B0SvF4gamyCTmUc+uITPY0989iXVfKvhwtmJocTaYoc/3khEHmEmvfY/Gn9HA9VV75jrQECsHizkNw1b68FA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", + "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", "dev": true, "requires": { "esrecurse": "^4.1.0", "estraverse": "^4.1.1" } }, + "eslint-utils": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", + "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", + "dev": true + }, "eslint-visitor-keys": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", @@ -1298,13 +1317,13 @@ "dev": true }, "espree": { - "version": "3.5.4", - "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", - "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-4.0.0.tgz", + "integrity": "sha512-kapdTCt1bjmspxStVKX6huolXVV5ZfyZguY1lcfhVVZstce3bqxH9mcLzNn3/mlgW6wQ732+0fuG9v7h0ZQoKg==", "dev": true, "requires": { - "acorn": "^5.5.0", - "acorn-jsx": "^3.0.0" + "acorn": "^5.6.0", + "acorn-jsx": "^4.1.1" } }, "esprima": { @@ -1492,15 +1511,15 @@ } }, "fast-deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", "dev": true }, "fast-diff": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.1.2.tgz", - "integrity": "sha512-KaJUt+M9t1qaIteSvjc6P3RbMdXsNhK61GRftR6SNxqmhthcd9MGIi4T+o0jD8LUSpSnSKXE20nLtJ3fOHxQig==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", "dev": true }, "fast-json-stable-stringify": { @@ -1720,9 +1739,9 @@ } }, "globals": { - "version": "11.7.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.7.0.tgz", - "integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==", + "version": "11.8.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.8.0.tgz", + "integrity": "sha512-io6LkyPVuzCHBSQV9fmOwxZkUk6nIaGmxheLDgmuFv89j0fm2aqDbIXKAGfzCMHqz3HLF2Zf8WSG6VqMh2qFmA==", "dev": true }, "globby": { @@ -1869,9 +1888,9 @@ "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==" }, "ignore": { - "version": "3.3.10", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", - "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true }, "import-lazy": { @@ -2127,21 +2146,15 @@ "is-object": "^1.0.1" } }, - "jest-docblock": { - "version": "21.2.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-21.2.0.tgz", - "integrity": "sha512-5IZ7sY9dBAYSV+YjQ0Ovb540Ku7AO9Z5o2Cg789xj167iQuZ2cG+z0f3Uct6WeYLbU6aQiM2pCs7sZ+4dotydw==", - "dev": true - }, "jmespath": { "version": "0.15.0", "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz", "integrity": "sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc=" }, "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, "js-yaml": { @@ -2180,9 +2193,9 @@ } }, "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, "json-stable-stringify-without-jsonify": { @@ -2435,6 +2448,12 @@ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, "node-fetch": { "version": "1.7.3", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", @@ -2753,20 +2772,29 @@ "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" }, "prettier": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.14.2.tgz", - "integrity": "sha512-McHPg0n1pIke+A/4VcaS2en+pTNjy4xF+Uuq86u/5dyDO59/TtFZtQ708QIRkEZ3qwKz3GVkVa6mpxK/CpB8Rg==", + "version": "1.14.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.14.3.tgz", + "integrity": "sha512-qZDVnCrnpsRJJq5nSsiHCE3BYMED2OtsI+cmzIzF1QIfqm5ALf8tEJcO27zV1gKNKRPdhjO0dNWnrzssDQ1tFg==", "dev": true }, + "prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "requires": { + "fast-diff": "^1.1.2" + } + }, "process-nextick-args": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" }, "progress": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", - "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.1.tgz", + "integrity": "sha512-OE+a6vzqazc+K6LxJrX5UPyKFvGnL5CYmq2jFGNIBWHpc4QyE49/YOumcrpQFJpfejmvRtbJzgO1zPmMCqlbBg==", "dev": true }, "promise-queue": { @@ -2911,9 +2939,9 @@ "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=" }, "regexpp": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-1.1.0.tgz", - "integrity": "sha512-LOPw8FpgdQF9etWMaAfG/WRthIdXJGYp4mJ2Jgn/2lpkbod9jPn0t9UqN7AxBOKNfzRbYyVfgc7Vk4t/MpnXgw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", "dev": true }, "registry-auth-token": { @@ -2998,19 +3026,13 @@ "resolved": "https://registry.npmjs.org/rx/-/rx-4.1.0.tgz", "integrity": "sha1-pfE/957zt0D+MKqAP7CfmIBdR4I=" }, - "rx-lite": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", - "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", - "dev": true - }, - "rx-lite-aggregates": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", - "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", + "rxjs": { + "version": "6.3.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz", + "integrity": "sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==", "dev": true, "requires": { - "rx-lite": "*" + "tslib": "^1.9.0" } }, "safe-buffer": { @@ -3344,15 +3366,13 @@ } }, "table": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz", - "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/table/-/table-5.1.0.tgz", + "integrity": "sha512-e542in22ZLhD/fOIuXs/8yDZ9W61ltF8daM88rkRNtgTIct+vI2fTnAyu/Db2TCfEcI8i7mjZz6meLq0nW7TYg==", "dev": true, "requires": { - "ajv": "^5.2.3", - "ajv-keywords": "^2.1.0", - "chalk": "^2.1.0", - "lodash": "^4.17.4", + "ajv": "^6.5.3", + "lodash": "^4.17.10", "slice-ansi": "1.0.0", "string-width": "^2.1.1" }, @@ -3464,6 +3484,12 @@ "escape-string-regexp": "^1.0.2" } }, + "tslib": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", + "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", + "dev": true + }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", diff --git a/lambdas/package.json b/lambdas/package.json index 27664e5b..34754d93 100644 --- a/lambdas/package.json +++ b/lambdas/package.json @@ -1,7 +1,12 @@ { "name": "muxer-lambdas", "description": "Tooling for developing and running lambdas", - "main": "index.js", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/apoclyps/my-dev-space.git" + }, + "private": true, "scripts": { "lint": "eslint .", "meetupcom:deploy": "cd meetupcom && serverless deploy -v --aws-profile meetupcomEvents", @@ -36,11 +41,11 @@ "serverless": "^1.30.3" }, "devDependencies": { - "eslint": "^4.19.1", - "eslint-config-airbnb-base": "^13.0.0", - "eslint-config-prettier": "^2.9.0", - "eslint-plugin-import": "^2.11.0", - "eslint-plugin-prettier": "^2.4.0", - "prettier": "^1.12.1" + "eslint": "^5.7.0", + "eslint-config-airbnb-base": "^13.1.0", + "eslint-config-prettier": "^3.1.0", + "eslint-plugin-import": "^2.14.0", + "eslint-plugin-prettier": "^3.0.0", + "prettier": "^1.14.3" } } diff --git a/package-lock.json b/package-lock.json index 52b60267..3ccee402 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1808,7 +1808,7 @@ }, "external-editor": { "version": "2.2.0", - "resolved": "http://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", "dev": true, "requires": { @@ -4249,7 +4249,7 @@ }, "through": { "version": "2.3.8", - "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, diff --git a/test.sh b/test.sh index 6bd87cbf..376368d3 100755 --- a/test.sh +++ b/test.sh @@ -29,18 +29,27 @@ if [[ "${env}" != "dev" ]]; then sleep 15 fi - +# Users service docker-compose -f $file run users-service py.test --black --pep8 --flakes -vv --mccabe --cov=project --cov-report=term-missing --junitxml=test-results/results.xml inspect $? users-test + +# Events service docker-compose -f $file run events-service py.test --black --pep8 --flakes -vv --mccabe --cov=project --cov-report=term-missing --junitxml=test-results/results.xml inspect $? events-test +# Client docker-compose -f $file build client-test docker-compose -f $file run client-test npm run lint inspect $? client-lint CI=true docker-compose -f $file run client-test npm test -- --coverage inspect $? client-test +# Lambdas +docker-compose -f $file build lambdas-test +docker-compose -f $file run lambdas-test npm run lint +inspect $? lambdas-lint + +# Integration tests if [[ "${env}" != "stage" ]]; then testcafe chrome e2e inspect $? e2e