diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 0b2bf49b..a81ca9cb 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -11,8 +11,8 @@ jobs: - name: Install Dependencies run: npm ci - # - name: Code Linting - # run: npm run lint + - name: Code Linting + run: npm run lint - name: Start Redis uses: superchargejs/redis-github-action@master @@ -22,7 +22,7 @@ jobs: - name: Unit testing run: npm test env: - GLIDER_ORGID: '0x71cd1781a3082f33d2521ac8290c9d4b3b3b116e4e8548a4914b71a1f7201da0' + GLIDER_ORGID: '0x94bf5a57b850a35b4d1d7b59f663ce3a8a76fd9928ef2067cc772fc97fb0ad75' INFURA_ENDPOINT: wss://ropsten.infura.io/ws/v3 INFURA_PROJECT_ID: ${{ secrets.INFURA_PROJECT_ID }} REDIS_URL: redis://localhost:6379 \ No newline at end of file diff --git a/.nycrc.json b/.nycrc.json new file mode 100644 index 00000000..0c19910c --- /dev/null +++ b/.nycrc.json @@ -0,0 +1,10 @@ +{ + "all": true, + "extension": [ + ".js" + ], + "include": [ + "api/**", + "helpers/**" + ] +} \ No newline at end of file diff --git a/admin/v1/config/env.js b/admin/v1/config/env.js index a85694a5..59844147 100644 --- a/admin/v1/config/env.js +++ b/admin/v1/config/env.js @@ -2,9 +2,9 @@ const { basicDecorator } = require('../../../decorators/basic'); const { debugInfo } = require('../../../config'); module.exports = basicDecorator(async (req, res) => { - res.json({ - code: 200, - message: "OK", - data: debugInfo(), - }); + res.json({ + code: 200, + message: 'OK', + data: debugInfo(), + }); }, true); // true - means administrative route diff --git a/api/v1/index.js b/api/v1/index.js index 8a51335e..27326b54 100644 --- a/api/v1/index.js +++ b/api/v1/index.js @@ -1,3 +1,4 @@ +/* istanbul ignore file */ const { name, description, version } = require('../package.json'); module.exports = async (req, res) => { diff --git a/api/v1/offers.js b/api/v1/offers.js index a3bb7d65..7117944c 100644 --- a/api/v1/offers.js +++ b/api/v1/offers.js @@ -1,3 +1,4 @@ +/* istanbul ignore file */ const GliderError = require('../../helpers/error'); const { basicDecorator } = require('../../decorators/basic'); const { offerPriceRQ } = require('../../helpers/resolvers/flight/offerPrice'); diff --git a/api/v1/orders/createWithOffer.js b/api/v1/orders/createWithOffer.js index 696bc5c1..b57217ad 100644 --- a/api/v1/orders/createWithOffer.js +++ b/api/v1/orders/createWithOffer.js @@ -12,7 +12,7 @@ const { } = require('../../../helpers/guarantee'); const hotelResolver = require('../../../helpers/resolvers/hotel/orderCreateWithOffer'); const flightResolver = require('../../../helpers/resolvers/flight/orderCreateWithOffer'); -const { setOrderStatus, assertOrgerStatus } = require('../../../helpers/resolvers/utils/offers'); +const { setOrderStatus, assertOrderStatus } = require('../../../helpers/resolvers/utils/offers'); module.exports = basicDecorator(async (req, res) => { const requestBody = req.body; @@ -28,8 +28,13 @@ module.exports = basicDecorator(async (req, res) => { const storedOffer = await offerManager.getOffer(requestBody.offerId); let originOffers = []; - - if (storedOffer instanceof FlightOffer) { + + // in case of not priced offer + // there possible situation when storedOffer.extraData.originOffers is undefined + if (storedOffer instanceof FlightOffer && + storedOffer.extraData && + storedOffer.extraData.originOffers) { + originOffers = await Promise.all( storedOffer.extraData.originOffers.map( offerId => offerManager.getOffer(offerId) @@ -42,7 +47,7 @@ module.exports = basicDecorator(async (req, res) => { ...originOffers ]; - assertOrgerStatus(allOffers); + assertOrderStatus(allOffers); try { await setOrderStatus(allOffers, 'CREATING'); @@ -59,7 +64,7 @@ module.exports = basicDecorator(async (req, res) => { guaranteeClaim = await claimGuaranteeWithCard(requestBody.guaranteeId); } - // Handle an Accomodation offer + // Handle an Accommodation offer if (storedOffer instanceof AccommodationOffer) { if (!guaranteeClaim) { diff --git a/api/v1/searchOffers.js b/api/v1/searchOffers.js index 843249fb..463263db 100644 --- a/api/v1/searchOffers.js +++ b/api/v1/searchOffers.js @@ -1,3 +1,4 @@ +/* istanbul ignore file */ const { basicDecorator } = require('../../decorators/basic'); const GliderError = require('../../helpers/error'); const { searchHotel } = require('../../helpers/resolvers/searchHotel'); diff --git a/api/v1/seatmap.js b/api/v1/seatmap.js index fc277e75..49a428b5 100644 --- a/api/v1/seatmap.js +++ b/api/v1/seatmap.js @@ -1,3 +1,4 @@ +/* istanbul ignore file */ const GliderError = require('../../helpers/error'); const { basicDecorator } = require('../../decorators/basic'); const { seatMapRQ } = require('../../helpers/resolvers/flight/seatAvailability'); diff --git a/config.js b/config.js index 4c92003c..a35cc0e8 100644 --- a/config.js +++ b/config.js @@ -11,9 +11,12 @@ * - The Github's branch, if the deployment is made using the Vercel/Github integration * - Defaults to 'staging', including local */ -var buildEnv = require('./env.json'); +let buildEnv; +try { + buildEnv = require('./env.json'); +} catch (err) {} -// Define the current enviroment +// Define the current environment const determineEnviroment = () => { // If defined, use the Glider environment variable if(process.env.GLIDER_ENV) { @@ -35,12 +38,12 @@ const determineEnviroment = () => { } } -const enviroment = determineEnviroment(); +const environment = determineEnviroment(); // Get an an environment variable const getConfigKey = (key) => { // Return environment specific variable if any - const envKey = `${enviroment.toUpperCase()}_${key}`; + const envKey = `${environment.toUpperCase()}_${key}`; if(process.env.hasOwnProperty(envKey)) { return process.env[envKey]; } @@ -91,8 +94,8 @@ const airFranceConfig = { const airCanadaConfig = { apiKey: getConfigKey('AC_API_KEY'), commission: getConfigKey('AC_COMISSION') || '0', - baseUrl: getConfigKey('AC_BASEURL') || (enviroment === 'production' ? 'https://ndcexchange.mconnect.aero/messaging/v2/ndc-exchange/' : 'https://ndchub.mconnect.aero/messaging/v2/ndc-exchange/'), - baseUrlPci: getConfigKey('AC_BASEURL_PCI') || (enviroment === 'production' ? 'https://pci.ndcexchange.mconnect.aero/messaging/v2/ndc-exchange/' : 'https://pci.ndchub.mconnect.aero/messaging/v2/ndc-exchange/'), + baseUrl: getConfigKey('AC_BASEURL') || (environment === 'production' ? 'https://ndcexchange.mconnect.aero/messaging/v2/ndc-exchange/' : 'https://ndchub.mconnect.aero/messaging/v2/ndc-exchange/'), + baseUrlPci: getConfigKey('AC_BASEURL_PCI') || (environment === 'production' ? 'https://pci.ndcexchange.mconnect.aero/messaging/v2/ndc-exchange/' : 'https://pci.ndchub.mconnect.aero/messaging/v2/ndc-exchange/'), AirlineID: getConfigKey('AC_PARTICIPANT_RECIPENT_AIRLINE_ID') || 'AC', PointOfSale: { Location: { @@ -136,7 +139,7 @@ const erevmax = { module.exports.debugInfo = () => { return { - enviroment: enviroment, + environment: environment, erevmax: erevmax, env: process.env, buildEnv: buildEnv, @@ -152,10 +155,10 @@ module.exports.elasticUrl = getConfigKey('ELASTIC_URL') || 'http://localhost:920 module.exports.INFURA_URI = `${getConfigKey('INFURA_ENDPOINT')}/${getConfigKey('INFURA_PROJECT_ID')}`; module.exports.GLIDER_DID = `did:orgid:${getConfigKey('GLIDER_ORGID') || '0x71cd1781a3082f33d2521ac8290c9d4b3b3b116e4e8548a4914b71a1f7201da0'}`; module.exports.GLIDER_ADMIN_DID = `did:orgid:${getConfigKey('GLIDER_ORGID') || '0x71cd1781a3082f33d2521ac8290c9d4b3b3b116e4e8548a4914b71a1f7201da0'}#${getConfigKey('GLIDER_ADMIN_KEY') || ''}`; -module.exports.SIMARD_URL = getConfigKey('SIMARD_URL') || `https://${enviroment}.api.simard.io/api/v1`; +module.exports.SIMARD_URL = getConfigKey('SIMARD_URL') || `https://${environment}.api.simard.io/api/v1`; module.exports.SIMARD_JWT = getConfigKey('SIMARD_JWT') || getConfigKey('JWT'); module.exports.LIF_MIN_DEPOSIT = getConfigKey('LIF_MIN_DEPOSIT') || '0'; module.exports.expirationTime = 30 * 60; // 30 min in seconds module.exports.expirationLong = 60 * 60 * 24 * 365 * 7; // 7 years in seconds module.exports.ETHEREUM_NETWORK = getConfigKey('ETHEREUM_NETWORK') || 'ropsten'; -module.exports.enviroment = enviroment; \ No newline at end of file +module.exports.environment = environment; diff --git a/helpers/jwt.js b/helpers/jwt.js index fdb31e65..312d2fa6 100644 --- a/helpers/jwt.js +++ b/helpers/jwt.js @@ -58,7 +58,10 @@ module.exports.verifyJWT = async (type, jwt, isAdmin = false) => { let didResult; const cachedDidResult = JSON.parse(await redisClient.asyncGet(`didResult_${did}`)); - if (cachedDidResult && typeof cachedDidResult.didDocument === 'object') { + if (!process.env.TESTING && + cachedDidResult && + typeof cachedDidResult.didDocument === 'object') { + /* istanbul ignore next */ didResult = cachedDidResult; } else { didResult = await orgIdResolver.resolve(did); diff --git a/helpers/models/mongo/hotels.js b/helpers/models/mongo/hotels.js index 8e0421d4..8983cfed 100644 --- a/helpers/models/mongo/hotels.js +++ b/helpers/models/mongo/hotels.js @@ -198,6 +198,14 @@ class HotelsManager { // Search for hotel by the given location searchByLocation (location, skip = 0, limit = null) { + if (process.env.TESTING) { + /* istanbul ignore next */ + const mockHotelsEmpty = require('../../../test/mocks/hotelsEmpty.json'); + const mockHotels = require('../../../test/mocks/hotels.json'); + return process.env.TESTING_EMPTY_RESULT === '1' + ? mockHotelsEmpty + : mockHotels; + } return this.get( { location: { @@ -219,6 +227,14 @@ class HotelsManager { // Search for hotel within the given polygon of coordinates searchWithin (polygon, skip = 0, limit = null) { + if (process.env.TESTING) { + /* istanbul ignore next */ + const mockHotelsEmpty = require('../../../test/mocks/hotelsEmpty.json'); + const mockHotels = require('../../../test/mocks/hotels.json'); + return process.env.TESTING_EMPTY_RESULT === '1' + ? mockHotelsEmpty + : mockHotels; + } return this.get( { location: { diff --git a/helpers/mongo/index.js b/helpers/mongo/index.js index 636b4d33..7b141204 100644 --- a/helpers/mongo/index.js +++ b/helpers/mongo/index.js @@ -1,3 +1,4 @@ +/* istanbul ignore file */ const mongoose = require('mongoose'); const config = require('../../config'); diff --git a/helpers/parsers/index.js b/helpers/parsers/index.js index faeed8ae..11aeb49a 100644 --- a/helpers/parsers/index.js +++ b/helpers/parsers/index.js @@ -2,7 +2,7 @@ const { zonedTimeToUtc } = require('date-fns-tz'); const { airports } = require('./timeZoneByAirportCode'); -module.exports.reduceObjectToProperty = (object, property) => Object.entries(object) +module.exports.reduceObjectToProperty = (array, property) => Object.entries(array) .reduce( (result, [key, value])=> ({ ...result, @@ -68,7 +68,7 @@ module.exports.mergeHourAndDate = array => array }) ); -module.exports.convertDateToIrportTime = (date, time, iataCode) => zonedTimeToUtc( +module.exports.convertDateToAirportTime = (date, time, iataCode) => zonedTimeToUtc( `${date} ${time}:00.000`, airports[iataCode] ); @@ -80,6 +80,7 @@ module.exports.reduceToProperty = (object, property) => Object.keys(object) }; }); +/* istanbul ignore next */ module.exports.splitSegments = (combinations) => combinations .map( ({ _items_, ...others }) => ({ @@ -108,7 +109,7 @@ module.exports.roundCommissionDecimals = (offers) => offers }) ); -module.exports.reduceAcomodation = (accommodation) => accommodation +module.exports.reduceAccommodation = (accommodation) => accommodation .reduce( (ac, { _provider_, _id_, ...others }) => { const key = `${_provider_}.${_id_}`; @@ -120,6 +121,7 @@ module.exports.reduceAcomodation = (accommodation) => accommodation {} ); +/* istanbul ignore next */ module.exports.reduceRoomStays = (_roomStays_ => { // The offer dicts will contain all offers let offers = {}; diff --git a/helpers/parsers/responseKeys.js b/helpers/parsers/responseKeys.js index 624a2664..644eb4cb 100644 --- a/helpers/parsers/responseKeys.js +++ b/helpers/parsers/responseKeys.js @@ -1,3 +1,4 @@ +/* istanbul ignore file */ const parseKeys = obj => { Object.keys(obj).forEach((v) => { diff --git a/helpers/redis/index.js b/helpers/redis/index.js index 9610f7ea..9ff838b0 100644 --- a/helpers/redis/index.js +++ b/helpers/redis/index.js @@ -1,3 +1,4 @@ +/* istanbul ignore file */ const redis = require('redis'); const config = require('../../config'); diff --git a/helpers/resolvers/flight/offerPrice.js b/helpers/resolvers/flight/offerPrice.js index a4cffeea..ac0a6f1a 100644 --- a/helpers/resolvers/flight/offerPrice.js +++ b/helpers/resolvers/flight/offerPrice.js @@ -27,7 +27,7 @@ const { FaultsTransformTemplate_AC, ErrorsTransformTemplate_AC } = require('../../camaroTemplates/provideOfferPrice'); -const { setOrderStatus, assertOrgerStatus } = require('../utils/offers'); +const { setOrderStatus, assertOrderStatus } = require('../utils/offers'); // Convert response data to the object form const processResponse = async (data, template) => { @@ -167,7 +167,7 @@ module.exports.offerPriceRQ = async ( const offers = await fetchFlightsOffersByIds(offerIds); // Assert order status in offers - assertOrgerStatus(offers); + assertOrderStatus(offers); try { await setOrderStatus(offers, 'CREATING'); @@ -255,7 +255,7 @@ module.exports.offerPriceRQ = async ( } ); - // Update serments Ids to initially obtained with original offers + // Update segments Ids to initially obtained with original offers const newSegmentsChanged = Object.entries(offerResult.offer.itinerary.segments) .reduce( (a, v) => { @@ -276,7 +276,7 @@ module.exports.offerPriceRQ = async ( offerResult.offer.itinerary.segments = newSegmentsChanged.segments; - // Update serments refs to initially obtained with original offers + // Update segments refs to initially obtained with original offers const newDestinationsChanged = offerResult.offer.destinations .map(d => ({ ...d, @@ -287,7 +287,7 @@ module.exports.offerPriceRQ = async ( })); delete offerResult.offer.destinations; - // Update passengers Ids to initally assigned during offers search + // Update passengers Ids to initially assigned during offers search const newPassengersChanged = Object.entries(offerResult.offer.passengers) .reduce( (a, v) => { diff --git a/helpers/resolvers/flight/seatAvailability.js b/helpers/resolvers/flight/seatAvailability.js index 0b80fe22..210b137c 100644 --- a/helpers/resolvers/flight/seatAvailability.js +++ b/helpers/resolvers/flight/seatAvailability.js @@ -81,7 +81,7 @@ const processResponse = async (data, offers, template) => { prices }; } - + return a; }, {}); diff --git a/helpers/resolvers/hotel/orderCreateWithOffer.js b/helpers/resolvers/hotel/orderCreateWithOffer.js index fc8afbe9..e0108227 100644 --- a/helpers/resolvers/hotel/orderCreateWithOffer.js +++ b/helpers/resolvers/hotel/orderCreateWithOffer.js @@ -9,30 +9,48 @@ const GliderError = require('../../error'); const responseTemplate = require('../../camaroTemplates/hotelResNotifRS').otaHotelResNotifRSTemplate; const hotelResNotif = require('../../transformInputData/hotelResNotif'); -const mapOTAHotelResNotifSoap = require('../../soapTemplates/ota/otaHotelResNotifRQ'); +const { + mapHotelResNotifSoap +} = require('../../soapTemplates/ota/otaHotelResNotifRQ'); const { v4: uuidv4 } = require('uuid'); module.exports = async (offer, passengers, card) => { // Build the request const otaHotelResNotifRQData = hotelResNotif.mapFromOffer(offer, passengers, card); - const otaRequestBody = mapOTAHotelResNotifSoap(otaHotelResNotifRQData); - - const response = await axios({ - method: 'post', - url: config.erevmax.reservationUrl, - headers: { - 'Content-Type': 'text/xml;charset=UTF-8', - 'Accept': '*/*', - 'Accept-Encoding': 'gzip, deflate, br', - 'SOAPAction': 'http://www.opentravel.org/OTA/2003/05/getOTAHotelAvailability', - }, - data: otaRequestBody - }); + const otaRequestBody = mapHotelResNotifSoap(otaHotelResNotifRQData); + + let response; + + if (!process.env.TESTING) { + /* istanbul ignore next */ + response = await axios({ + method: 'post', + url: config.erevmax.reservationUrl, + headers: { + 'Content-Type': 'text/xml;charset=UTF-8', + 'Accept': '*/*', + 'Accept-Encoding': 'gzip, deflate, br', + 'SOAPAction': 'http://www.opentravel.org/OTA/2003/05/getOTAHotelAvailability', + }, + data: otaRequestBody + }); + } else { + response = process.env.TESTING_PROVIDER_ERRORS === '1' + ? { + status: 502, + data: {} + } + : require('../../../test/mocks/erevmaxOrder.json'); + } + // console.log('@@@', require('../../json').stringifyCircular(response)); // Handle error from reservation if(response.status !== 200 || !response.data) { - console.log(JSON.stringify(otaRequestBody)); - response.data && console.log(JSON.stringify(response.data)); + /* istanbul ignore if */ + if (!process.env.TESTING) { + console.log(JSON.stringify(otaRequestBody)); + response.data && console.log(JSON.stringify(response.data)); + } throw new GliderError( `[erevmax:${response.status}] Booking creation failed`, 502 diff --git a/helpers/resolvers/searchFlight.js b/helpers/resolvers/searchFlight.js index 90de9486..4f6b73ca 100644 --- a/helpers/resolvers/searchFlight.js +++ b/helpers/resolvers/searchFlight.js @@ -102,7 +102,7 @@ const transformResponse = async ( offer.pricePlansReferences = pricePlansReferences; delete(offer.flightsReferences); } else if (offer.pricePlansReferences) { - + for (const priceRef of offer.pricePlansReferences) { priceRef.flights = priceRef.flights.split(' '); } @@ -119,7 +119,7 @@ const transformResponse = async ( type: p.type })) ); - + if (searchResults.checkedBaggages) { searchResults.checkedBaggages = reduceToObjectByKey(searchResults.checkedBaggages); searchResults.pricePlans = useDictionary( @@ -135,7 +135,7 @@ const transformResponse = async ( if (!searchResults.pricePlans[plan].checkedBaggages && searchResults.pricePlans[plan].amenities) { - + if (searchResults.pricePlans[plan].amenities.includes('Checked bags for a fee')) { searchResults.pricePlans[plan].checkedBaggages = { quantity: 0 @@ -159,11 +159,11 @@ const transformResponse = async ( } let overriddenOffers = {}; - + // Store the offers let indexedOffers = {}; let expirationDate = new Date(Date.now() + 60 * 30 * 1000).toISOString();// now + 30 min - + // Process offers for (let offerId in searchResults.offers) { @@ -179,7 +179,7 @@ const transformResponse = async ( if (provider === 'AC') { let segments; let destinations; - + // Extract segments and destinations associated with the offer for (const pricePlanId in searchResults.offers[offerId].pricePlansReferences) { const pricePlan = searchResults.offers[offerId].pricePlansReferences[pricePlanId]; @@ -283,7 +283,7 @@ const transformResponse = async ( delete segment.aggregationKey; } searchResults.itineraries.segments = aggregatedSegments; - + const updatedCombinations = {}; const combinationsKeys= {}; @@ -301,7 +301,7 @@ const transformResponse = async ( // Flights aggregation const aggregatedCombinations = {}; const aggregatedCombinationsKeys = {}; - + for (const origCombinationId in searchResults.itineraries.combinations) { let combination = searchResults.itineraries.combinations[origCombinationId]; @@ -421,6 +421,7 @@ module.exports.searchFlight = async (body) => { ndcRequestData = mapNdcRequestData_AC(airCanadaConfig, body, requestDocumentId); providerUrl = `${airCanadaConfig.baseUrl}/AirShopping`; apiKey = airCanadaConfig.apiKey; + console.log(JSON.stringify(ndcRequestData, null, 2)); ndcBody = provideShoppingRequestTemplate_AC(ndcRequestData); // console.log('@@@', ndcBody); templates = { @@ -474,7 +475,7 @@ module.exports.searchFlight = async (body) => { .map(async ({ provider, response, error, templates }) => { // fs.writeFileSync(`/home/kostysh/dev/glider-fork/temp/${provider}-shp-rs.xml`, response.data); - + if (error && !error.isAxiosError) { // Request error @@ -530,7 +531,7 @@ module.exports.searchFlight = async (body) => { }) )) .filter(e => e !== null); - + let searchResult = {}; if (responseErrors.length === providers.length) { diff --git a/helpers/resolvers/searchHotel.js b/helpers/resolvers/searchHotel.js index cc77f233..1648b96b 100644 --- a/helpers/resolvers/searchHotel.js +++ b/helpers/resolvers/searchHotel.js @@ -10,7 +10,7 @@ const { const { reduceToObjectByKey, reduceObjectToProperty, - reduceAcomodation + reduceAccommodation } = require('../parsers'); const { manager: hotelsManager } = require('../models/mongo/hotels'); @@ -18,32 +18,75 @@ const GliderError = require('../error'); const offer = require('../models/offer'); const config = require('../../config'); -const searchHotel = async (body) => { +// Convert rectangle coordinates to polygon +const rectangleToPolygon = rectangle => [ + [ + rectangle.west, + rectangle.north + ], + [ + rectangle.east, + rectangle.north + ], + [ + rectangle.east, + rectangle.south + ], + [ + rectangle.west, + rectangle.south + ] +].map(c => [Number(c[0]), Number(c[1])]); +module.exports.rectangleToPolygon = rectangleToPolygon; + +// Get the Guest count +const getGuestCounts = passengers => { + if (!passengers || !Array.isArray(passengers) || passengers.length === 0) { + throw new GliderError('Passengers search property is required', 400); + } + + const guestCounts = [ + new offer.GuestCount('ADT', 0), + new offer.GuestCount('CHD', 0), + ]; + + for (let p of passengers) { + let newCount = p.count === undefined ? 1 : Number(p.count); + if (p.type === 'ADT') { + guestCounts[0].count += newCount; + } else if (p.type === 'CHD') { + guestCounts[1].count += newCount; + } else { + throw new GliderError('Unsupported passenger type', 400); + } + } + + if (guestCounts[0].count === 0) { + throw new GliderError( + 'At least one adult passenger is required to search properties', + 400 + ); + } + + return guestCounts; +}; +module.exports.getGuestCounts = getGuestCounts; + +module.exports.searchHotel = async (body) => { let hotels; + + if (!body.passengers || !body.passengers.length) { + throw new GliderError('Missing passenger types', 400); + } + + const guestCounts = getGuestCounts(body.passengers); if (typeof body.accommodation.location.circle === 'object') { hotels = await hotelsManager.searchByLocation(body.accommodation.location.circle); } else if (Array.isArray(body.accommodation.location.polygon)) { hotels = await hotelsManager.searchWithin(body.accommodation.location.polygon); } else if (typeof body.accommodation.location.rectangle === 'object') { - const polygon = [ - [ - body.accommodation.location.rectangle.west, - body.accommodation.location.rectangle.north - ], - [ - body.accommodation.location.rectangle.east, - body.accommodation.location.rectangle.north - ], - [ - body.accommodation.location.rectangle.east, - body.accommodation.location.rectangle.south - ], - [ - body.accommodation.location.rectangle.west, - body.accommodation.location.rectangle.south - ] - ].map(c => [Number(c[0]), Number(c[1])]); + const polygon = rectangleToPolygon(body.accommodation.location.rectangle); hotels = await hotelsManager.searchWithin(polygon); } else { throw new GliderError( @@ -51,61 +94,47 @@ const searchHotel = async (body) => { 400 ); } - + if (hotels.total === 0) { throw new GliderError( 'No Hotels were found with the provided criteria', 404 ); } - + const hotelCodes = hotels.records.map(r => r.ref); if (!hotelCodes.length) { throw new GliderError('No matching hotels', 404); } - // Get the Guest count - var guestCounts = [ - new offer.GuestCount('ADT', 0), - new offer.GuestCount('CHD', 0), - ]; - - if (!body.passengers.length) { - throw new GliderError('Missing passenger types', 400); - } - - for (let p of body.passengers) { - let newCount = p.count === undefined ? 1 : Number(p.count); - if (p.type === 'ADT') { - guestCounts[0].count += newCount; - } else if (p.type === 'CHD') { - guestCounts[1].count += newCount; - } else { - throw new GliderError('Unsupported passenger type', 400); - } - } - - if (guestCounts[0].count === 0) { - throw new GliderError( - 'At least one adult passenger is required to search properties', - 400 - ); - } - // Build the request const requestData = mapRequestData(hotelCodes, body); const requestBody = hotelAvailRequestTemplate(requestData); // Fire the request - const response = await axios.post( - config.erevmax.availabilityUrl, - requestBody, { - headers: { - 'Content-Type': 'application/xml', - SOAPAction: 'http://www.opentravel.org/OTA/2003/05/getOTAHotelAvailability', - }, - }); + let response; + + if (!process.env.TESTING) { + /* istanbul ignore next */ + response = await axios.post( + config.erevmax.availabilityUrl, + requestBody, + { + headers: { + 'Content-Type': 'application/xml', + SOAPAction: 'http://www.opentravel.org/OTA/2003/05/getOTAHotelAvailability', + }, + } + ); + // console.log(require('../json').stringifyCircular(response)); + } else { + const erevmaxResponse = require('../../test/mocks/erevmax.json'); + const erevmaxErrorsResponse = require('../../test/mocks/erevmaxErrors.json'); + response = process.env.TESTING_PROVIDER_ERRORS === '1' + ? erevmaxErrorsResponse + : erevmaxResponse; + } // Handle any errors returned from the API const { errors } = await transform(response.data, errorsTransformTemplate); @@ -121,7 +150,7 @@ const searchHotel = async (body) => { const searchResults = await transform(response.data, hotelAvailTransformTemplate); // Go through the Room Stays to build the offers and gather the room types - var accomodationRoomTypes = {}; + var accommodationRoomTypes = {}; var offers = {}; let offersToStore = {}; searchResults._roomStays_.forEach(roomStay => { @@ -135,12 +164,12 @@ const searchHotel = async (body) => { roomType.policies = reduceToObjectByKey(roomType.policies); roomType.policies = reduceObjectToProperty(roomType.policies, '_value_'); - // Add the room type to the dict that will be used when building accomodation - if (!(accomodationRoomTypes[accommodationReference])) { - accomodationRoomTypes[accommodationReference] = {}; + // Add the room type to the dict that will be used when building accommodation + if (!(accommodationRoomTypes[accommodationReference])) { + accommodationRoomTypes[accommodationReference] = {}; } - accomodationRoomTypes[accommodationReference][roomType._id_] = roomType; - delete(accomodationRoomTypes[accommodationReference][roomType._id_]._id_); + accommodationRoomTypes[accommodationReference][roomType._id_] = roomType; + delete(accommodationRoomTypes[accommodationReference][roomType._id_]._id_); } // Handle the Rate Plans @@ -204,10 +233,10 @@ const searchHotel = async (body) => { }); }); - // Parse the accomodations + // Parse the accommodations for (var accommodation of searchResults.accommodations) { - // Build the accomodation reference key + // Build the accommodation reference key var accommodationReference = `${accommodation._provider_}.${accommodation._id_}`; // Reduce the policies @@ -215,16 +244,20 @@ const searchHotel = async (body) => { accommodation.otherPolicies = reduceObjectToProperty(accommodation.otherPolicies, '_value_'); // Add the room types gathered from Room Rates - accommodation.roomTypes = accomodationRoomTypes[accommodationReference]; + accommodation.roomTypes = accommodationRoomTypes[accommodationReference]; } - searchResults.accommodations = reduceAcomodation(searchResults.accommodations); + + searchResults.accommodations = reduceAccommodation(searchResults.accommodations); searchResults.offers = offers; delete(searchResults._roomStays_); // Store the offers - await offer.offerManager.storeOffers(offersToStore); + if (!process.env.TESTING) { + /* istanbul ignore next */ + await offer.offerManager.storeOffers(offersToStore); + } // Hotels require only the main passenger searchResults.passengers = { @@ -235,7 +268,3 @@ const searchHotel = async (body) => { return searchResults; }; - -module.exports = { - searchHotel, -}; diff --git a/helpers/resolvers/utils/offers.js b/helpers/resolvers/utils/offers.js index 84421f51..797ffdb1 100644 --- a/helpers/resolvers/utils/offers.js +++ b/helpers/resolvers/utils/offers.js @@ -28,7 +28,7 @@ module.exports.setOrderStatus = async (offers, orderStatus) => Promise.all( ) ); -module.exports.assertOrgerStatus = offers => offers.forEach(offer => { +module.exports.assertOrderStatus = offers => offers.forEach(offer => { if (offer.extraData && offer.extraData.orderStatus === 'CREATING') { throw new GliderError( 'Order creation ongoing for this offer', diff --git a/helpers/soapTemplates/hotelAvail.js b/helpers/soapTemplates/hotelAvail.js index 5f3e8093..aa2ae6e3 100644 --- a/helpers/soapTemplates/hotelAvail.js +++ b/helpers/soapTemplates/hotelAvail.js @@ -41,7 +41,7 @@ const mapCriterions = ( '' ); -const hotelAvailRequestTemplate = ({ OTA_HotelAvailRQ }) => ` +module.exports.hotelAvailRequestTemplate = ({ OTA_HotelAvailRQ }) => ` @@ -71,7 +71,3 @@ const hotelAvailRequestTemplate = ({ OTA_HotelAvailRQ }) => ` `.trim(); - -module.exports = { - hotelAvailRequestTemplate, -}; diff --git a/helpers/soapTemplates/ota/otaHotelAvailRQ.js b/helpers/soapTemplates/ota/otaHotelAvailRQ.js index 11b0bcfe..5d5587df 100644 --- a/helpers/soapTemplates/ota/otaHotelAvailRQ.js +++ b/helpers/soapTemplates/ota/otaHotelAvailRQ.js @@ -10,6 +10,7 @@ const mapGuestCounts = (guests) => guests `, '' ); +module.exports.mapGuestCounts = mapGuestCounts; const mapCriterions = ( HotelSearchCriteria, @@ -39,9 +40,9 @@ const mapCriterions = ( `, '' ); +module.exports.mapCriterions = mapCriterions; - -const hotelAvailRequestTemplate = ({ OTA_HotelAvailRQ }) => ` +module.exports.hotelAvailRequestTemplate = ({ OTA_HotelAvailRQ }) => ` @@ -71,7 +72,3 @@ const hotelAvailRequestTemplate = ({ OTA_HotelAvailRQ }) => ` `.trim(); - -module.exports = { - hotelAvailRequestTemplate -}; diff --git a/helpers/soapTemplates/ota/otaHotelResNotifRQ.js b/helpers/soapTemplates/ota/otaHotelResNotifRQ.js index 7d59d380..60b99ecb 100644 --- a/helpers/soapTemplates/ota/otaHotelResNotifRQ.js +++ b/helpers/soapTemplates/ota/otaHotelResNotifRQ.js @@ -10,12 +10,14 @@ const mapGuestCount = OTA_GuestCount => { guestCount += ` Count="${OTA_GuestCount.Count}"`; return ``; }; +module.exports.mapGuestCount = mapGuestCount; const mapGuestCounts = OTA_GuestCounts => ` ${OTA_GuestCounts.reduce((guestCounts, guestCount) => guestCounts + mapGuestCount(guestCount), '')} `.trim(); +module.exports.mapGuestCounts = mapGuestCounts; /* Mapping for Rates */ const mapRate = OTA_Rate => ` @@ -31,12 +33,14 @@ const mapRate = OTA_Rate => ` /> `.trim(); +module.exports.mapRate = mapRate; const mapRates = OTA_Rates => ` ${OTA_Rates.reduce((rates, rate) => rates + mapRate(rate), '')} `.trim(); +module.exports.mapRates = mapRates; const mapRoomRate = OTA_RoomRate => ` ` ${mapRates(OTA_RoomRate.Rates)} `.trim(); +module.exports.mapRoomRate = mapRoomRate; /* Mapping for Guarantee */ const mapPaymentCard = OTA_PaymentCard => { @@ -75,6 +80,7 @@ const mapPaymentCard = OTA_PaymentCard => { return paymentCard; }; +module.exports.mapPaymentCard = mapPaymentCard; const mapGuarantee = OTA_Guarantee => ` ` `.trim(); +module.exports.mapGuarantee = mapGuarantee; const mapRoomStay = OTA_RoomStay => ` @@ -136,6 +143,7 @@ const mapRoomStay = OTA_RoomStay => ` `.trim(); +module.exports.mapRoomStay = mapRoomStay; const mapPOS = OTA_POS => ` @@ -153,6 +161,7 @@ const mapPOS = OTA_POS => ` `.trim(); +module.exports.mapPOS = mapPOS; const mapAddress = OTA_Address => { if (OTA_Address === undefined) { @@ -160,8 +169,8 @@ const mapAddress = OTA_Address => { } return `
- ${OTA_Address.AddressLines[0]} - ${OTA_Address.AddressLines[1]} + ${OTA_Address.AddressLines ? OTA_Address.AddressLines[0] : ''} + ${OTA_Address.AddressLines ? OTA_Address.AddressLines[1] : ''} ${OTA_Address.CityName} ${OTA_Address.PostalCode} ${OTA_Address.StateProv} @@ -169,6 +178,7 @@ const mapAddress = OTA_Address => {
`.trim(); }; +module.exports.mapAddress = mapAddress; const mapPersonName = OTA_PersonName => { let personName = ''; @@ -182,6 +192,7 @@ const mapPersonName = OTA_PersonName => { personName += `${OTA_PersonName.Surname}`; return `${personName}`.trim(); }; +module.exports.mapPersonName = mapPersonName; const mapProfile = OTA_Profile => ` ` `.trim(); +module.exports.mapProfile = mapProfile; const mapResGuest = OTA_ResGuest => ` ` `.trim(); +module.exports.mapResGuest = mapResGuest; const mapHotelReservationID = OTA_HotelReservationID => ` ` ResID_Value="${OTA_HotelReservationID.ResID_Value}" /> `.trim(); +module.exports.mapHotelReservationID = mapHotelReservationID; const mapHotelReservation = OTA_HotelReservation => ` ` `.trim(); +module.exports.mapHotelReservation = mapHotelReservation; const mapHotelResNotif = OTA_HotelResNotifRQ => ` ` `.trim(); +module.exports.mapHotelResNotif = mapHotelResNotif; const mapSoapHeader = uuid => ` @@ -282,6 +298,7 @@ const mapSoapHeader = uuid => ` `.trim(); +module.exports.mapSoapHeader = mapSoapHeader; const mapHotelResNotifSoap = ({ OTA_HotelResNotifRQ }) => ` @@ -296,5 +313,4 @@ const mapHotelResNotifSoap = ({ OTA_HotelResNotifRQ }) => .replace(/(\s{4})/g, '') .replace(/ >/g, '>') .replace(/ \/>/g, '/>'); - -module.exports = mapHotelResNotifSoap; +module.exports.mapHotelResNotifSoap = mapHotelResNotifSoap; diff --git a/helpers/soapTemplates/ota/otaUtils.js b/helpers/soapTemplates/ota/otaUtils.js index e84a03bf..d831dcc3 100644 --- a/helpers/soapTemplates/ota/otaUtils.js +++ b/helpers/soapTemplates/ota/otaUtils.js @@ -6,7 +6,6 @@ module.exports.mapGuestCounts = (guests) => guests AgeQualifyingCode, Count } - ) => `${guestCounts} - `, + ) => `${guestCounts}`, '' ); diff --git a/helpers/soapTemplates/searchOffers.js b/helpers/soapTemplates/searchOffers.js index f2fde581..5ddb4e66 100644 --- a/helpers/soapTemplates/searchOffers.js +++ b/helpers/soapTemplates/searchOffers.js @@ -2,9 +2,10 @@ const { convertObjectToXML, getACSystemId } = require('./utils/xmlUtils'); // For documentation, https://github.com/windingtree/simard-schemas/blob/master/ndc/data-mapping.mds // The Passenger object +/* istanbul ignore next */ const mapPassengers = (passengers) => passengers.reduce( (list, { Passenger }) => { - return `${list} + return `${list} ${Passenger.PTC} @@ -14,9 +15,10 @@ const mapPassengers = (passengers) => passengers.reduce( ); // The OriginDestination object +/* istanbul ignore next */ const mapOriginDestinations = (OriginDestinations) => OriginDestinations.reduce( (list, { OriginDestination }) => { - return `${list} + return `${list} ${OriginDestination.Departure.AirportCode} @@ -33,6 +35,7 @@ const mapOriginDestinations = (OriginDestinations) => OriginDestinations.reduce( ); // The AirFrance request template +/* istanbul ignore next */ module.exports.provideShoppingRequestTemplate_AF = data => ` diff --git a/helpers/soapTemplates/utils/xmlUtils.js b/helpers/soapTemplates/utils/xmlUtils.js index cfb8a859..c2e6e722 100644 --- a/helpers/soapTemplates/utils/xmlUtils.js +++ b/helpers/soapTemplates/utils/xmlUtils.js @@ -1,4 +1,4 @@ -const { enviroment } = require("../../../config"); +const { environment } = require('../../../config'); // Convert the given formatted object to the XML form const convertObjectToXML = data => Object.entries(JSON.parse(JSON.stringify(data))).map(p => { @@ -66,11 +66,11 @@ module.exports.convertObjectToXML = convertObjectToXML; // Determine the AC NDC System ID const getACSystemId = (isPCI) => { - switch(enviroment) { + switch(process.env.TESTING_ENV !== undefined ? process.env.TESTING_ENV : environment) { case 'production': return (isPCI ? 'PROD-PCI' : 'PROD'); default: return (isPCI ? 'DEV-PCI' : 'DEV'); } -} +}; module.exports.getACSystemId = getACSystemId; diff --git a/helpers/transformInputData/createOrder.js b/helpers/transformInputData/createOrder.js index ee36036c..0473b535 100644 --- a/helpers/transformInputData/createOrder.js +++ b/helpers/transformInputData/createOrder.js @@ -2,6 +2,7 @@ const format = require('date-fns/format'); const { getCardCode } = require('./utils/cardUtils'); const { getACSystemId } = require('../soapTemplates/utils/xmlUtils'); +/* istanbul ignore next */ module.exports.mapNdcRequestData_AF = (config, { offerId, offerItems, passengers }) => ({ ...(JSON.parse(JSON.stringify(config))), trackingMessageHeader: { @@ -28,10 +29,11 @@ const getACSystemIdOrderCreateRQ = (isPci) => { let systemId = getACSystemId(isPci); // Exception case for OrderCreateRQ if(systemId === 'PROD-PCI') { - systemId = 'PROD' + systemId = 'PROD'; } return systemId; -} +}; +module.exports.getACSystemIdOrderCreateRQ = getACSystemIdOrderCreateRQ; module.exports.mapNdcRequestHeaderData_AC = guaranteeClaim => ({ Function: 'OrderCreateRQ', diff --git a/helpers/transformInputData/fulfillOrder.js b/helpers/transformInputData/fulfillOrder.js index db70f2fb..9f3cdf5f 100644 --- a/helpers/transformInputData/fulfillOrder.js +++ b/helpers/transformInputData/fulfillOrder.js @@ -2,6 +2,7 @@ const { getCardCode } = require('./utils/cardUtils'); const { getACSystemId } = require('../soapTemplates/utils/xmlUtils'); +/* istanbul ignore next */ module.exports.mapNdcRequestData_AF = (config, { orderItems, passengerReferences }, { orderId }) => ({ ...(JSON.parse(JSON.stringify(config))), requestTime: (new Date(Date.now())).toISOString(), diff --git a/helpers/transformInputData/hotelAvail.js b/helpers/transformInputData/hotelAvail.js index 1686d65f..ab674632 100644 --- a/helpers/transformInputData/hotelAvail.js +++ b/helpers/transformInputData/hotelAvail.js @@ -2,7 +2,26 @@ const format = require('date-fns/format'); const differenceInCalendarDays = require('date-fns/differenceInCalendarDays'); const parseISO = require('date-fns/parseISO'); -const mapRequestData = (hotelCodes, { accommodation: { arrival, departure }, passengers }) => { +const buildHotelRef = ( + hotelCode, arrival, duration, guestCounts +) => ({ + HotelRef: { + HotelCode: hotelCode, + StayDateRange: { + Start: format(new Date(arrival), 'yyyy-MM-dd'), + Duration: duration, + RoomStayCandidates: { + RoomStayCandidate: { + Quantity: '1', + GuestCounts: guestCounts, + } + } + } + } +}); +module.exports.buildHotelRef = buildHotelRef; + +module.exports.mapRequestData = (hotelCodes, { accommodation: { arrival, departure }, passengers }) => { const duration = differenceInCalendarDays(parseISO(departure), parseISO(arrival)); const guestCounts = passengers .map( @@ -14,21 +33,9 @@ const mapRequestData = (hotelCodes, { accommodation: { arrival, departure }, pas const hotelSearchCriteria = hotelCodes .map( - hotelCode => ({ - HotelRef: { - HotelCode: hotelCode, - StayDateRange: { - Start: format(new Date(arrival), 'yyyy-MM-dd'), - Duration: duration, - RoomStayCandidates: { - RoomStayCandidate: { - Quantity: '1', - GuestCounts: guestCounts, - } - } - } - } - }) + hotelCode => buildHotelRef( + hotelCode, arrival, duration, guestCounts + ) ); return { @@ -81,7 +88,3 @@ const mapRequestData = (hotelCodes, { accommodation: { arrival, departure }, pas } }; }; - -module.exports = { - mapRequestData -}; diff --git a/helpers/transformInputData/hotelResNotif.js b/helpers/transformInputData/hotelResNotif.js index 3e56b5b0..c4f2e8fb 100644 --- a/helpers/transformInputData/hotelResNotif.js +++ b/helpers/transformInputData/hotelResNotif.js @@ -5,6 +5,34 @@ const { v4: uuidv4 } = require('uuid'); const emailValidator = require('email-validator'); const { getCardCode } = require('./utils/cardUtils'); +const buildCustomerAddress = pax => { + let address; + + if (pax.address) { + address = {}; + address.Type = '1'; + + if (pax.address.lines !== undefined) { + address.AddressLines = pax.address.lines; + } + if (pax.address.city !== undefined) { + address.CityName = pax.address.city; + } + if (pax.address.postalCode !== undefined) { + address.PostalCode = pax.address.postalCode; + } + if (pax.address.subdivision !== undefined) { + address.StateProv = pax.address.subdivision; + } + if (pax.address.country !== undefined) address.CountryName = { + Code: pax.address.country + }; + } + + return address; +}; +module.exports.buildCustomerAddress = buildCustomerAddress; + /* Maps an offer and passengers to an OTA HotelResNotifRQ structure */ @@ -136,18 +164,8 @@ const mapFromOffer = (offer, passengers, card) => { } // Handle the passenger address - if (pax.address !== undefined) { - customer.Address = {}; - customer.Address.Type = '1'; - if (pax.address.lines !== undefined) customer.Address.AddressLines = pax.address.lines; - if (pax.address.city !== undefined) customer.Address.CityName = pax.address.city; - if (pax.address.postalCode !== undefined) customer.Address.PostalCode = pax.address.postalCode; - if (pax.address.subdivision !== undefined) customer.Address.StateProv = pax.address.subdivision; - if (pax.address.country !== undefined) customer.Address.CountryName = { - Code: pax.address.country - }; - } - + customer.Address = buildCustomerAddress(pax); + return { 'OTA_HotelResNotifRQ': { ResStatus: 'Commit', diff --git a/helpers/transformInputData/searchOffers.js b/helpers/transformInputData/searchOffers.js index 907e3e2a..c0d8efe1 100644 --- a/helpers/transformInputData/searchOffers.js +++ b/helpers/transformInputData/searchOffers.js @@ -11,7 +11,9 @@ const expandPassengers = (passengers) => { // Otherwise create one for each count else { - for(let i=0; i { return res; }; +module.exports.expandPassengers = expandPassengers; // Build request data for the request to the AirFrance provider +/* istanbul ignore next */ module.exports.mapNdcRequestData_AF = (config, { itinerary, passengers }) => ({ ...(JSON.parse(JSON.stringify(config))), PointOfSale: { diff --git a/helpers/transformInputData/utils/cardUtils.js b/helpers/transformInputData/utils/cardUtils.js index 9bc21450..9d1161b2 100644 --- a/helpers/transformInputData/utils/cardUtils.js +++ b/helpers/transformInputData/utils/cardUtils.js @@ -13,6 +13,7 @@ const cardCodesOTA = { unionpay: 'CU', electron: 'VE' }; +module.exports.cardCodesOTA = cardCodesOTA; const cardCodesIATA = { visa: 'VI', @@ -23,23 +24,20 @@ const cardCodesIATA = { jcb: 'JC', uatp: 'TP', }; +module.exports.cardCodesIATA = cardCodesIATA; module.exports.getCardCode = (card, type) => { let cardCode; switch(type) { - case 'iata': + case 'iata': cardCode = cardCodesIATA[card.brand.toLowerCase()]; break; - case 'ota': + case 'ota': cardCode = cardCodesOTA[card.brand.toLowerCase()]; break; default: throw new GliderError('Missing Card Code type', 500); } - if (!cardCode) { - throw new GliderError('Unknown claimed card brand', 500); - } - return cardCode; }; diff --git a/package-lock.json b/package-lock.json index b67d8d6d..e6780aff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,14 +20,15 @@ } }, "@actions/github": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@actions/github/-/github-2.2.0.tgz", - "integrity": "sha512-9UAZqn8ywdR70n3GwVle4N8ALosQs4z50N7XMXrSTUVOmVpaBC5kE3TRTT7qQdi3OaQV24mjGuJZsHUmhD+ZXw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@actions/github/-/github-4.0.0.tgz", + "integrity": "sha512-Ej/Y2E+VV6sR9X7pWL5F3VgEWrABaT292DRqRU6R4hnQjPtC/zD3nagxVdXWiRQvYDh8kHXo7IDmG42eJ/dOMA==", "dev": true, "requires": { - "@actions/http-client": "^1.0.3", - "@octokit/graphql": "^4.3.1", - "@octokit/rest": "^16.43.1" + "@actions/http-client": "^1.0.8", + "@octokit/core": "^3.0.0", + "@octokit/plugin-paginate-rest": "^2.2.3", + "@octokit/plugin-rest-endpoint-methods": "^4.0.0" } }, "@actions/http-client": { @@ -46,27 +47,196 @@ "dev": true }, "@babel/code-frame": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.3.tgz", - "integrity": "sha512-fDx9eNW0qz0WkUeqL6tXEXzVlPh6Y5aCDEZesl0xBGA8ndRukX91Uk44ZqnkECp01NAZUdCAl+aiQNGi0k88Eg==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "@babel/core": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.10.5.tgz", + "integrity": "sha512-O34LQooYVDXPl7QWCdW9p4NR+QlzOr7xShPPJz8GsuCU3/8ua/wqTr7gmnxXv+WBESiGU/G5s16i6tUvHkNb+w==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.10.5", + "@babel/helper-module-transforms": "^7.10.5", + "@babel/helpers": "^7.10.4", + "@babel/parser": "^7.10.5", + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.10.5", + "@babel/types": "^7.10.5", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", + "json5": "^2.1.2", + "lodash": "^4.17.19", + "resolve": "^1.3.2", + "semver": "^5.4.1", + "source-map": "^0.5.0" + }, + "dependencies": { + "lodash": { + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "@babel/generator": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.10.5.tgz", + "integrity": "sha512-3vXxr3FEW7E7lJZiWQ3bM4+v/Vyr9C+hpolQ8BGFr9Y8Ri2tFLWTixmwKBafDujO1WVah4fhZBeU1bieKdghig==", + "dev": true, + "requires": { + "@babel/types": "^7.10.5", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "@babel/helper-function-name": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", + "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", + "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", + "dev": true, + "requires": { + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.10.5.tgz", + "integrity": "sha512-HiqJpYD5+WopCXIAbQDG0zye5XYVvcO9w/DHp5GsaGkRUaamLj2bEtu6i8rnGGprAhHM3qidCMgp71HF4endhA==", + "dev": true, + "requires": { + "@babel/types": "^7.10.5" + } + }, + "@babel/helper-module-imports": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.10.4.tgz", + "integrity": "sha512-nEQJHqYavI217oD9+s5MUBzk6x1IlvoS9WTPfgG43CbMEeStE0v+r+TucWdx8KFGowPGvyOkDT9+7DHedIDnVw==", + "dev": true, + "requires": { + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-module-transforms": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.10.5.tgz", + "integrity": "sha512-4P+CWMJ6/j1W915ITJaUkadLObmCRRSC234uctJfn/vHrsLNxsR8dwlcXv9ZhJWzl77awf+mWXSZEKt5t0OnlA==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.10.4", + "@babel/helper-replace-supers": "^7.10.4", + "@babel/helper-simple-access": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.5", + "lodash": "^4.17.19" + }, + "dependencies": { + "lodash": { + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", + "dev": true + } + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz", + "integrity": "sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg==", + "dev": true, + "requires": { + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-replace-supers": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.10.4.tgz", + "integrity": "sha512-sPxZfFXocEymYTdVK1UNmFPBN+Hv5mJkLPsYWwGBxZAxaWfFu+xqp7b6qWD0yjNuNL2VKc6L5M18tOXUP7NU0A==", + "dev": true, + "requires": { + "@babel/helper-member-expression-to-functions": "^7.10.4", + "@babel/helper-optimise-call-expression": "^7.10.4", + "@babel/traverse": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-simple-access": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.10.4.tgz", + "integrity": "sha512-0fMy72ej/VEvF8ULmX6yb5MtHG4uH4Dbd6I/aHDb/JVg0bbivwt9Wg+h3uMvX+QSFtwr5MeItvazbrc4jtRAXw==", + "dev": true, + "requires": { + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.10.4.tgz", + "integrity": "sha512-pySBTeoUff56fL5CBU2hWm9TesA4r/rOkI9DyJLvvgz09MB9YtfIYe3iBriVaYNaPe+Alua0vBIOVOLs2buWhg==", "dev": true, "requires": { - "@babel/highlight": "^7.10.3" + "@babel/types": "^7.10.4" } }, "@babel/helper-validator-identifier": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.3.tgz", - "integrity": "sha512-bU8JvtlYpJSBPuj1VUmKpFGaDZuLxASky3LhaKj3bmpSTY6VWooSM8msk+Z0CZoErFye2tlABF6yDkT3FOPAXw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", + "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==", "dev": true }, + "@babel/helpers": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.10.4.tgz", + "integrity": "sha512-L2gX/XeUONeEbI78dXSrJzGdz4GQ+ZTA/aazfUsFaWjSe95kiCuOZ5HsXvkiw3iwF+mFHSRUfJU8t6YavocdXA==", + "dev": true, + "requires": { + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, "@babel/highlight": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.3.tgz", - "integrity": "sha512-Ih9B/u7AtgEnySE2L2F0Xm0GaM729XqqLfHkalTsbjXGyqmf/6M0Cu0WpvqueUlW+xk88BHw9Nkpj49naU+vWw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.3", + "@babel/helper-validator-identifier": "^7.10.4", "chalk": "^2.0.0", "js-tokens": "^4.0.0" }, @@ -84,15 +254,82 @@ } } }, + "@babel/parser": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.5.tgz", + "integrity": "sha512-wfryxy4bE1UivvQKSQDU4/X6dr+i8bctjUjj8Zyt3DQy7NtPizJXT8M52nqpNKL+nq2PW8lxk4ZqLj0fD4B4hQ==", + "dev": true + }, "@babel/polyfill": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.10.1.tgz", - "integrity": "sha512-TviueJ4PBW5p48ra8IMtLXVkDucrlOZAIZ+EXqS3Ot4eukHbWiqcn7DcqpA1k5PcKtmJ4Xl9xwdv6yQvvcA+3g==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.10.4.tgz", + "integrity": "sha512-8BYcnVqQ5kMD2HXoHInBH7H1b/uP3KdnwCYXOqFnXqguOyuu443WXusbIUbWEfY3Z0Txk0M1uG/8YuAMhNl6zg==", "requires": { "core-js": "^2.6.5", "regenerator-runtime": "^0.13.4" } }, + "@babel/template": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", + "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/parser": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/traverse": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.10.5.tgz", + "integrity": "sha512-yc/fyv2gUjPqzTz0WHeRJH2pv7jA9kA7mBX2tXl/x5iOE81uaVPuGPtaYk7wmkx4b67mQ7NqI8rmT2pF47KYKQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.10.5", + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.10.4", + "@babel/parser": "^7.10.5", + "@babel/types": "^7.10.5", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.19" + }, + "dependencies": { + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "lodash": { + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", + "dev": true + } + } + }, + "@babel/types": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.5.tgz", + "integrity": "sha512-ixV66KWfCI6GKoA/2H9v6bQdbfXEwwpOdQ8cRvb4F+eyvhlaHxWFMQB4+3d9QFJXZsiiiqVrewNV0DFEQpyT4Q==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + }, + "dependencies": { + "lodash": { + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", + "dev": true + } + } + }, "@elastic/elasticsearch": { "version": "7.8.0", "resolved": "https://registry.npmjs.org/@elastic/elasticsearch/-/elasticsearch-7.8.0.tgz", @@ -122,9 +359,9 @@ } }, "@ethersproject/address": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.1.tgz", - "integrity": "sha512-kfQtXpBP2pI2TfoRRAYv8grHGiYw8U0c1KbMsC58/W33TIBy7gFSf/oAzOd94lNzdIUenKU0OuSzrHQfVcDDDA==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.2.tgz", + "integrity": "sha512-+rz26RKj7ujGfQynys4V9VJRbR+wpC6eL8F22q3raWMH3152Ha31GwJPWzxE/bEA+43M/zTNVwY0R53gn53L2Q==", "requires": { "@ethersproject/bignumber": "^5.0.0", "@ethersproject/bytes": "^5.0.0", @@ -135,36 +372,35 @@ } }, "@ethersproject/bignumber": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.1.tgz", - "integrity": "sha512-srGDO7ksT0avdDw5pBtj6F81psv5xiJMInwSSatfIKplitubFb6yVwoHGObGRd0Pp3TvrkIDfJkuskoSMj4OHQ==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.5.tgz", + "integrity": "sha512-24ln7PV0g8ZzjcVZiLW9Wod0i+XCmK6zKkAaxw5enraTIT1p7gVOcSXFSzNQ9WYAwtiFQPvvA+TIO2oEITZNJA==", "requires": { "@ethersproject/bytes": "^5.0.0", "@ethersproject/logger": "^5.0.0", - "@ethersproject/properties": "^5.0.0", "bn.js": "^4.4.0" } }, "@ethersproject/bytes": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.1.tgz", - "integrity": "sha512-Y198536UW9Jb9RBXuqmCsCa9mYJUsxJn+5aGr2XjNMpLBc6vEn/44GHnbQXYgRCzh4rnWtJ9bTgSwDjme9Hgnw==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.3.tgz", + "integrity": "sha512-AyPMAlY+Amaw4Zfp8OAivm1xYPI8mqiUYmEnSUk1CnS2NrQGHEMmFJFiOJdS3gDDpgSOFhWIjZwxKq2VZpqNTA==", "requires": { "@ethersproject/logger": "^5.0.0" } }, "@ethersproject/constants": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.1.tgz", - "integrity": "sha512-Xec07hFCPN4wfC3WDiRay7KipkApl2msiKTrBHCuAwNMOM8M92+mlQp8tgfEL51DPwCZkmdk1f02kArc6caVSw==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.2.tgz", + "integrity": "sha512-nNoVlNP6bgpog7pQ2EyD1xjlaXcy1Cl4kK5v1KoskHj58EtB6TK8M8AFGi3GgHTdMldfT4eN3OsoQ/CdOTVNFA==", "requires": { "@ethersproject/bignumber": "^5.0.0" } }, "@ethersproject/hash": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.0.1.tgz", - "integrity": "sha512-1ByUXYvkszrSSks07xctBtZfpFnIVmftxWlAAnguxh6Q65vKECd/EPi5uI5xVOvnrYMH9Vb8MK1SofPX/6fArQ==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.0.2.tgz", + "integrity": "sha512-dWGvNwmVRX2bxoQQ3ciMw46Vzl1nqfL+5R8+2ZxsRXD3Cjgw1dL2mdjJF7xMMWPvPdrlhKXWSK0gb8VLwHZ8Cw==", "requires": { "@ethersproject/bytes": "^5.0.0", "@ethersproject/keccak256": "^5.0.0", @@ -173,51 +409,67 @@ } }, "@ethersproject/keccak256": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.1.tgz", - "integrity": "sha512-AtFm/4qHRQUvZcG3WYmaT7zV79dz72+N01w0XphcIBaD/7UZXyW85Uf08sirVlckHmh9fvc4UDWyHiroKsBT6Q==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.2.tgz", + "integrity": "sha512-MbroXutc0gPNYIrUjS4Aw0lDuXabdzI7+l7elRWr1G6G+W0v00e/3gbikWkCReGtt2Jnt4lQSgnflhDwQGcIhA==", "requires": { "@ethersproject/bytes": "^5.0.0", "js-sha3": "0.5.7" } }, "@ethersproject/logger": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.2.tgz", - "integrity": "sha512-NQe3O1/Nwkcp6bto6hsTvrcCeR/cOGK+RhOMn0Zi2FND6gdWsf1g+5ie8gQ1REqDX4MTGP/Y131dZas985ls/g==" + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.4.tgz", + "integrity": "sha512-alA2LiAy1LdQ/L1SA9ajUC7MvGAEQLsICEfKK4erX5qhkXE1LwLSPIzobtOWFsMHf2yrXGKBLnnpuVHprI3sAw==" }, "@ethersproject/properties": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.1.tgz", - "integrity": "sha512-b3VZ/NpYIf64/hFXeWNxVCbY1xoMPIYM3n6Qnu6Ayr3bLt1olFPQfAaaRB0aOsLz7tMtmkT3DrA1KG/IrOgBRw==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.2.tgz", + "integrity": "sha512-FxAisPGAOACQjMJzewl9OJG6lsGCPTm5vpUMtfeoxzAlAb2lv+kHzQPUh9h4jfAILzE8AR1jgXMzRmlhwyra1Q==", "requires": { "@ethersproject/logger": "^5.0.0" } }, "@ethersproject/rlp": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.0.1.tgz", - "integrity": "sha512-3F8XE1zS4w8w4xiK1hMtFuVs6UnhQlmrEHLT85GanqK8vG5wGi81IQmkukL9tQIu2a5jykoO46ibja+6N1fpFg==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.0.2.tgz", + "integrity": "sha512-oE0M5jqQ67fi2SuMcrpoewOpEuoXaD8M9JeR9md1bXRMvDYgKXUtDHs22oevpEOdnO2DPIRabp6MVHa4aDuWmw==", "requires": { "@ethersproject/bytes": "^5.0.0", "@ethersproject/logger": "^5.0.0" } }, "@ethersproject/signing-key": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.0.1.tgz", - "integrity": "sha512-Z3yMPFFf4KkWltndDNi/tpese7qZh6ZWKbGu3DHd8xOX0PJqbScdAs6gCfFeMatO06qyX307Y52soc/Ayf8ZSg==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.0.3.tgz", + "integrity": "sha512-5QPZaBRGCLzfVMbFb3LcVjNR0UbTXnwDHASnQYfbzwUOnFYHKxHsrcbl/5ONGoppgi8yXgOocKqlPCFycJJVWQ==", "requires": { "@ethersproject/bytes": "^5.0.0", "@ethersproject/logger": "^5.0.0", "@ethersproject/properties": "^5.0.0", - "elliptic": "6.5.2" + "elliptic": "6.5.3" + }, + "dependencies": { + "elliptic": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", + "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + } + } } }, "@ethersproject/strings": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.1.tgz", - "integrity": "sha512-N8LxdHGBT7GZdogkEOV5xKXYTz5PNHuNzcxLNPYfH3kpvWSyXshZBgAz8YE1a8sMZagGj+Ic6d3mHijdCTSkGA==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.2.tgz", + "integrity": "sha512-oNa+xvSqsFU96ndzog0IBTtsRFGOqGpzrXJ7shXLBT7juVeSEyZA/sYs0DMZB5mJ9FEjHdZKxR/rTyBY91vuXg==", "requires": { "@ethersproject/bytes": "^5.0.0", "@ethersproject/constants": "^5.0.0", @@ -225,9 +477,9 @@ } }, "@ethersproject/transactions": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.0.1.tgz", - "integrity": "sha512-IGc6/5hri3PrqR/ZCj89osDiq3Lt0CSrycn6vlRl8SjpBKYDdcT+Ru5xkeC7YcsnqcdBmTL+jyR3SLudU+x2Kw==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.0.2.tgz", + "integrity": "sha512-jZp0ZbbJlq4JLZY6qoMzNtp2HQsX6USQposi3ns0MPUdn3OdZJBDtrcO15r/2VS5t/K1e1GE5MI1HmMKlcTbbQ==", "requires": { "@ethersproject/address": "^5.0.0", "@ethersproject/bignumber": "^5.0.0", @@ -240,71 +492,106 @@ "@ethersproject/signing-key": "^5.0.0" } }, + "@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "requires": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + } + } + }, + "@istanbuljs/schema": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.2.tgz", + "integrity": "sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw==", + "dev": true + }, "@octokit/auth-token": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.0.tgz", - "integrity": "sha512-eoOVMjILna7FVQf96iWc3+ZtE/ZT6y8ob8ZzcqKY1ibSQCnu4O/B7pJvzMx5cyZ/RjAff6DAdEb0O0Cjcxidkg==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.2.tgz", + "integrity": "sha512-jE/lE/IKIz2v1+/P0u4fJqv0kYwXOTujKemJMFr6FeopsxlIK3+wKDCJGnysg81XID5TgZQbIfuJ5J0lnTiuyQ==", "dev": true, "requires": { - "@octokit/types": "^2.0.0" + "@octokit/types": "^5.0.0" + } + }, + "@octokit/core": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.1.0.tgz", + "integrity": "sha512-yPyQSmxIXLieEIRikk2w8AEtWkFdfG/LXcw1KvEtK3iP0ENZLW/WYQmdzOKqfSaLhooz4CJ9D+WY79C8ZliACw==", + "dev": true, + "requires": { + "@octokit/auth-token": "^2.4.0", + "@octokit/graphql": "^4.3.1", + "@octokit/request": "^5.4.0", + "@octokit/types": "^5.0.0", + "before-after-hook": "^2.1.0", + "universal-user-agent": "^5.0.0" } }, "@octokit/endpoint": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.1.tgz", - "integrity": "sha512-pOPHaSz57SFT/m3R5P8MUu4wLPszokn5pXcB/pzavLTQf2jbU+6iayTvzaY6/BiotuRS0qyEUkx3QglT4U958A==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.3.tgz", + "integrity": "sha512-Y900+r0gIz+cWp6ytnkibbD95ucEzDSKzlEnaWS52hbCDNcCJYO5mRmWW7HRAnDc7am+N/5Lnd8MppSaTYx1Yg==", "dev": true, "requires": { - "@octokit/types": "^2.11.1", + "@octokit/types": "^5.0.0", "is-plain-object": "^3.0.0", "universal-user-agent": "^5.0.0" } }, "@octokit/graphql": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.4.0.tgz", - "integrity": "sha512-Du3hAaSROQ8EatmYoSAJjzAz3t79t9Opj/WY1zUgxVUGfIKn0AEjg+hlOLscF6fv6i/4y/CeUvsWgIfwMkTccw==", + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.5.1.tgz", + "integrity": "sha512-qgMsROG9K2KxDs12CO3bySJaYoUu2aic90qpFrv7A8sEBzZ7UFGvdgPKiLw5gOPYEYbS0Xf8Tvf84tJutHPulQ==", "dev": true, "requires": { "@octokit/request": "^5.3.0", - "@octokit/types": "^2.0.0", + "@octokit/types": "^5.0.0", "universal-user-agent": "^5.0.0" } }, "@octokit/plugin-paginate-rest": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-1.1.2.tgz", - "integrity": "sha512-jbsSoi5Q1pj63sC16XIUboklNw+8tL9VOnJsWycWYR78TKss5PVpIPb1TUUcMQ+bBh7cY579cVAWmf5qG+dw+Q==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.2.3.tgz", + "integrity": "sha512-eKTs91wXnJH8Yicwa30jz6DF50kAh7vkcqCQ9D7/tvBAP5KKkg6I2nNof8Mp/65G0Arjsb4QcOJcIEQY+rK1Rg==", "dev": true, "requires": { - "@octokit/types": "^2.0.1" + "@octokit/types": "^5.0.0" } }, - "@octokit/plugin-request-log": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.0.tgz", - "integrity": "sha512-ywoxP68aOT3zHCLgWZgwUJatiENeHE7xJzYjfz8WI0goynp96wETBF+d95b8g/uL4QmS6owPVlaxiz3wyMAzcw==", - "dev": true - }, "@octokit/plugin-rest-endpoint-methods": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-2.4.0.tgz", - "integrity": "sha512-EZi/AWhtkdfAYi01obpX0DF7U6b1VRr30QNQ5xSFPITMdLSfhcBqjamE3F+sKcxPbD7eZuMHu3Qkk2V+JGxBDQ==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.1.0.tgz", + "integrity": "sha512-zbRTjm+xplSNlixotTVMvLJe8aRogUXS+r37wZK5EjLsNYH4j02K5XLMOWyYaSS4AJEZtPmzCcOcui4VzVGq+A==", "dev": true, "requires": { - "@octokit/types": "^2.0.1", + "@octokit/types": "^5.1.0", "deprecation": "^2.3.1" } }, "@octokit/request": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.4.2.tgz", - "integrity": "sha512-zKdnGuQ2TQ2vFk9VU8awFT4+EYf92Z/v3OlzRaSh4RIP0H6cvW1BFPXq4XYvNez+TPQjqN+0uSkCYnMFFhcFrw==", + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.4.5.tgz", + "integrity": "sha512-atAs5GAGbZedvJXXdjtKljin+e2SltEs48B3naJjqWupYl2IUBbB/CJisyjbNHcKpHzb3E+OYEZ46G8eakXgQg==", "dev": true, "requires": { "@octokit/endpoint": "^6.0.1", "@octokit/request-error": "^2.0.0", - "@octokit/types": "^2.11.1", + "@octokit/types": "^5.0.0", "deprecation": "^2.0.0", "is-plain-object": "^3.0.0", "node-fetch": "^2.3.0", @@ -313,66 +600,20 @@ } }, "@octokit/request-error": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.0.0.tgz", - "integrity": "sha512-rtYicB4Absc60rUv74Rjpzek84UbVHGHJRu4fNVlZ1mCcyUPPuzFfG9Rn6sjHrd95DEsmjSt1Axlc699ZlbDkw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.0.2.tgz", + "integrity": "sha512-2BrmnvVSV1MXQvEkrb9zwzP0wXFNbPJij922kYBTLIlIafukrGOb+ABBT2+c6wZiuyWDH1K1zmjGQ0toN/wMWw==", "dev": true, "requires": { - "@octokit/types": "^2.0.0", + "@octokit/types": "^5.0.1", "deprecation": "^2.0.0", "once": "^1.4.0" } }, - "@octokit/rest": { - "version": "16.43.1", - "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-16.43.1.tgz", - "integrity": "sha512-gfFKwRT/wFxq5qlNjnW2dh+qh74XgTQ2B179UX5K1HYCluioWj8Ndbgqw2PVqa1NnVJkGHp2ovMpVn/DImlmkw==", - "dev": true, - "requires": { - "@octokit/auth-token": "^2.4.0", - "@octokit/plugin-paginate-rest": "^1.1.1", - "@octokit/plugin-request-log": "^1.0.0", - "@octokit/plugin-rest-endpoint-methods": "2.4.0", - "@octokit/request": "^5.2.0", - "@octokit/request-error": "^1.0.2", - "atob-lite": "^2.0.0", - "before-after-hook": "^2.0.0", - "btoa-lite": "^1.0.0", - "deprecation": "^2.0.0", - "lodash.get": "^4.4.2", - "lodash.set": "^4.3.2", - "lodash.uniq": "^4.5.0", - "octokit-pagination-methods": "^1.1.0", - "once": "^1.4.0", - "universal-user-agent": "^4.0.0" - }, - "dependencies": { - "@octokit/request-error": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-1.2.1.tgz", - "integrity": "sha512-+6yDyk1EES6WK+l3viRDElw96MvwfJxCt45GvmjDUKWjYIb3PJZQkq3i46TwGwoPD4h8NmTrENmtyA1FwbmhRA==", - "dev": true, - "requires": { - "@octokit/types": "^2.0.0", - "deprecation": "^2.0.0", - "once": "^1.4.0" - } - }, - "universal-user-agent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-4.0.1.tgz", - "integrity": "sha512-LnST3ebHwVL2aNe4mejI9IQh2HfZ1RLo8Io2HugSif8ekzD1TlWpHpColOB/eh8JHMLkGH3Akqf040I+4ylNxg==", - "dev": true, - "requires": { - "os-name": "^3.1.0" - } - } - } - }, "@octokit/types": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-2.14.0.tgz", - "integrity": "sha512-1w2wxpN45rEXPDFeB7rGain7wcJ/aTRg8bdILITVnS0O7a4zEGELa3JmIe+jeLdekQjvZRbVfNPqS+mi5fKCKQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-5.1.0.tgz", + "integrity": "sha512-OFxUBgrEllAbdEmWp/wNmKIu5EuumKHG4sgy56vjZ8lXPgMhF05c76hmulfOdFHHYRpPj49ygOZJ8wgVsPecuA==", "dev": true, "requires": { "@types/node": ">= 8" @@ -440,28 +681,44 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.21.tgz", "integrity": "sha512-PQKsydPxYxF1DsAFWmunaxd3sOi3iMt6Zmx/tgaagHYmwJ/9cRH91hQkeJZaUGWbvn0K5HlSVEXkn5U/llWPpQ==" }, + "@types/pbkdf2": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.0.tgz", + "integrity": "sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==", + "requires": { + "@types/node": "*" + } + }, + "@types/secp256k1": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.1.tgz", + "integrity": "sha512-+ZjSA8ELlOp8SlKi0YLB2tz9d5iPNEmOBd+8Rz21wTMdaXQIa9b6TEnD6l5qKOCypE7FSyPyck12qZJxSDNoog==", + "requires": { + "@types/node": "*" + } + }, "@vercel/build-utils": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@vercel/build-utils/-/build-utils-2.4.0.tgz", - "integrity": "sha512-VRXMLBPDcpFUHQMgHdgYHBl9SRwqNFb43tgkMdTYaNml2HgqlLNvNuINKlqwB2/Q/tARIWcm4jmPKR0gu1CaEQ==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@vercel/build-utils/-/build-utils-2.4.2.tgz", + "integrity": "sha512-9KymcPgUYkPxt4VK7HepM7yWN1ZUt3XzNKn5ECkGhHAHF31rmr9gEGlZZlq5KcXPsBps4A/BOuSBwK8EFOXP/w==", "dev": true }, "@vercel/go": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@vercel/go/-/go-1.1.2.tgz", - "integrity": "sha512-1k7w6gY2Uj4DVqvvqm5VXZZeCqmzV5Fw3T3hjfgt13WVXPVwYfXf50ya4VvwpF9/IEvXpAhXLRcHD7ZTCMoXKA==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@vercel/go/-/go-1.1.4.tgz", + "integrity": "sha512-HAUFjs+K/MkPrRuUwK3/2TIDAJP582b1pBNHrq1DGp8mOft/xKYIiOVh6h9PHxOeFRPCdwB3bPaAovj6jSVCZw==", "dev": true }, "@vercel/next": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/@vercel/next/-/next-2.6.7.tgz", - "integrity": "sha512-zzcalT/TRpI7EH4glRqhD09jkeGqbjZ4JbiOkCdwTAMJDme8bf6wsYffBGu92DLv/2zDFPLj0EcNsGVhb7bk0w==", + "version": "2.6.13", + "resolved": "https://registry.npmjs.org/@vercel/next/-/next-2.6.13.tgz", + "integrity": "sha512-ZF2+wy7J1okgF984AR3nBV/u0DqsDK+TFe2U5ucPUrM9pFlVdWi88FZY2OTrH0ke5dgGXanJQlfW28PvlOAUbA==", "dev": true }, "@vercel/node": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@vercel/node/-/node-1.7.1.tgz", - "integrity": "sha512-Lp6l3526xQ/srCqkXE9/E+gykAcpM/vut4zFo5NA9+syGxZt1nlVAznhNVkgsSW4mbRIE67KIfi7SII55dW7uw==", + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/@vercel/node/-/node-1.7.3.tgz", + "integrity": "sha512-bENPZRdmOSlHn4eZpfps1nZtwVuQbZj5vgt2FKa1gT/Uiy3zo5BPB+ANINNC+qcCXHxUdS50XKB2m4VvtVLY1w==", "dev": true, "requires": { "@types/node": "*", @@ -476,15 +733,15 @@ "dev": true }, "@vercel/ruby": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@vercel/ruby/-/ruby-1.2.2.tgz", - "integrity": "sha512-5kKFNS84EvjHRI/umZqL31KdyvoWO05qbIeR3YHHJBCPSBIUlGimM0Wx7OsdAK+TMDzpWszBF/6bgk//KpmYbg==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@vercel/ruby/-/ruby-1.2.3.tgz", + "integrity": "sha512-WvtImWLdIo4bB0f2Pgc+P7KdgVVsPSMEVEtk4ZJnKkhU7IsCn/UnlovOsZeP6Qw/Bwqv84KrNm+nNRte648aew==", "dev": true }, "@vercel/static-build": { - "version": "0.17.3", - "resolved": "https://registry.npmjs.org/@vercel/static-build/-/static-build-0.17.3.tgz", - "integrity": "sha512-Xf4b6AEVl5EnTSecG0p9hwi3F4MuvwsYyGmvhbNfoV5c8T4Q9gPgTY0f738OAUv1f81DdzRXcgijK4rFQ1ysTQ==", + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@vercel/static-build/-/static-build-0.17.6.tgz", + "integrity": "sha512-zSyNyXwH3RPd0owiwaS2yv+js3Rwi/0y6BOiWLr6mkqkDe7YRIYsYrX7GD08Hx5Na6f1RnmnHCneTyzBXpuuBg==", "dev": true }, "@windingtree/org.id": { @@ -504,33 +761,32 @@ } }, "@windingtree/org.id-resolver": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@windingtree/org.id-resolver/-/org.id-resolver-1.3.1.tgz", - "integrity": "sha512-lKm9nHHemEmjjoxJri4llO5hyMdZmCvI7afHQ6YsXs2K2jUGfbpDPw4w264KT56eku7tzaepri/YAcJV7+Z+Sw==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@windingtree/org.id-resolver/-/org.id-resolver-1.4.0.tgz", + "integrity": "sha512-KVYLuSik9JGbG/b60qEa5XMdrRBS0VFZyOlLXzxAcq3cfgr2ISmnIe7lRVdlv4QlBXkrmXDuQHK7MJpYLrXjbQ==", "requires": { - "@babel/polyfill": "7.10.1", + "@babel/polyfill": "7.10.4", "@windingtree/org.id": "1.1.0", "@windingtree/org.id-lif-deposit": "1.0.2", - "@windingtree/org.json-schema": "0.3.0", - "ajv": "6.12.2", - "axios": "0.19.2" + "ajv": "6.12.3", + "axios": "0.19.2", + "org.json-schema-0.3": "npm:@windingtree/org.json-schema@0.3.4", + "org.json-schema-0.4": "npm:@windingtree/org.json-schema@0.4.3" }, "dependencies": { - "@windingtree/org.id-lif-deposit": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@windingtree/org.id-lif-deposit/-/org.id-lif-deposit-1.0.2.tgz", - "integrity": "sha512-z4LIPYcjmqkMu4Esn9WW6pKDLGQuzw3FilwqYubHx1Lawud9JDjv+fWrJ5ZrRB1to2RSK8gEhliT0ggbU1nZhw==", + "ajv": { + "version": "6.12.3", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.3.tgz", + "integrity": "sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA==", "requires": { - "@openzeppelin/contracts": "2.5.0" + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" } } } }, - "@windingtree/org.json-schema": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@windingtree/org.json-schema/-/org.json-schema-0.3.0.tgz", - "integrity": "sha512-Jon/xwkwSKv9SM2USXTnaVPQvXiTWdZjZSlBxfvWmTaH4VmwUuGe7I4AVjWKZ6rB1cf5izYYVqIAQ8wqFAIO7Q==" - }, "accepts": { "version": "1.3.7", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", @@ -557,6 +813,16 @@ "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=" }, + "aggregate-error": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.0.1.tgz", + "integrity": "sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA==", + "dev": true, + "requires": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + } + }, "ajv": { "version": "6.12.2", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz", @@ -568,10 +834,19 @@ "uri-js": "^4.2.2" } }, + "ansi-align": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz", + "integrity": "sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw==", + "dev": true, + "requires": { + "string-width": "^3.0.0" + } + }, "ansi-colors": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", - "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true }, "ansi-regex": { @@ -599,6 +874,21 @@ "picomatch": "^2.0.4" } }, + "append-transform": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", + "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", + "dev": true, + "requires": { + "default-require-extensions": "^3.0.0" + } + }, + "archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "dev": true + }, "arg": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", @@ -688,12 +978,6 @@ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, - "atob-lite": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/atob-lite/-/atob-lite-2.0.0.tgz", - "integrity": "sha1-D+9a1G8b16hQLGVyfwNn1e5D1pY=", - "dev": true - }, "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -756,22 +1040,6 @@ "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==", "dev": true }, - "bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "requires": { - "file-uri-to-path": "1.0.0" - } - }, - "bip66": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", - "integrity": "sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI=", - "requires": { - "safe-buffer": "^5.0.1" - } - }, "bl": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.0.tgz", @@ -781,6 +1049,11 @@ "safe-buffer": "^5.1.1" } }, + "blakejs": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.0.tgz", + "integrity": "sha1-ad+S75U6qIylGjLfarHFShVfx6U=" + }, "bluebird": { "version": "3.5.1", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", @@ -823,6 +1096,97 @@ } } }, + "boxen": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz", + "integrity": "sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ==", + "dev": true, + "requires": { + "ansi-align": "^3.0.0", + "camelcase": "^5.3.1", + "chalk": "^3.0.0", + "cli-boxes": "^2.2.0", + "string-width": "^4.1.0", + "term-size": "^2.1.0", + "type-fest": "^0.8.1", + "widest-line": "^3.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -943,17 +1307,29 @@ } } }, + "bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", + "requires": { + "base-x": "^3.0.2" + } + }, + "bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "requires": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, "bson": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.4.tgz", "integrity": "sha512-S/yKGU1syOMzO86+dGpg2qGoDL0zvzcb262G+gqEy6TgP6rt6z6qxSFX/8X6vLC91P7G7C3nLs0+bvDzmvBA3Q==" }, - "btoa-lite": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/btoa-lite/-/btoa-lite-1.0.0.tgz", - "integrity": "sha1-M3dm2hWAEhD92VbCLpxokaudAzc=", - "dev": true - }, "buffer": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", @@ -1013,6 +1389,18 @@ } } }, + "caching-transform": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", + "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", + "dev": true, + "requires": { + "hasha": "^5.0.0", + "make-dir": "^3.0.0", + "package-hash": "^4.0.0", + "write-file-atomic": "^3.0.0" + } + }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -1020,11 +1408,11 @@ "dev": true }, "camaro": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/camaro/-/camaro-6.0.2.tgz", - "integrity": "sha512-5iLxpsSLBAnkRqvu84pMsQ3bFspY2lJo4SSL5Z97nKsdzkDd/ocbgCoGVQc8aG/QK91hXY1y9ycRPLrUjmkglQ==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/camaro/-/camaro-6.0.3.tgz", + "integrity": "sha512-hcXqg5IcHWhnO6KTx8mwejKEcVZyVMZEc/ePwj2OATSceBoacvrW4mbjnV0sDVk1JkAFXKATCw+Q3Mm+s4rJ1A==", "requires": { - "piscina": "^1.4.0" + "piscina": "^1.6.3" } }, "camelcase": { @@ -1105,9 +1493,9 @@ } }, "chardet": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-1.1.0.tgz", - "integrity": "sha512-K6BWWdt9ncg6TDTX42J57s9zZWVI1DXVYQ6zUM8dZUB2TDeV5ia4kDei19r/pMxNzSGYYf6LqHsyvEybvTPHuA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-1.2.1.tgz", + "integrity": "sha512-bnDt+69nS8Hi7Xmt0uDiQ32/hRpMK/0pc4lc32Y87voBgdsz26VZXOyo5VNQWQfe7rUsevZIfWB82C5QSpCXcQ==", "dev": true }, "charset": { @@ -1143,6 +1531,12 @@ "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" }, + "ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true + }, "cids": { "version": "0.7.5", "resolved": "https://registry.npmjs.org/cids/-/cids-0.7.5.tgz", @@ -1156,9 +1550,9 @@ }, "dependencies": { "multicodec": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-1.0.2.tgz", - "integrity": "sha512-IcTBw34qiRGHsEDKlWp2yLQDVZKzRZWjAfUeCYZSqHWszyCAM1o5R9YLLLV1SQVPAa9AVnXKfAA6sjyYZC/2LQ==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-1.0.4.tgz", + "integrity": "sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg==", "requires": { "buffer": "^5.6.0", "varint": "^5.0.0" @@ -1180,6 +1574,18 @@ "resolved": "https://registry.npmjs.org/class-is/-/class-is-1.1.0.tgz", "integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==" }, + "clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true + }, + "cli-boxes": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.0.tgz", + "integrity": "sha512-gpaBrMAizVEANOpfZp/EEUixTXDyGt7DFzdK5hU+UbWt/J0lB0w20ncZj59Z9a93xHb9u12zF5BS6i9RKbtg4w==", + "dev": true + }, "cli-progress": { "version": "3.8.2", "resolved": "https://registry.npmjs.org/cli-progress/-/cli-progress-3.8.2.tgz", @@ -1329,12 +1735,32 @@ "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", "dev": true }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, + "configstore": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", + "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", + "dev": true, + "requires": { + "dot-prop": "^5.2.0", + "graceful-fs": "^4.1.2", + "make-dir": "^3.0.0", + "unique-string": "^2.0.0", + "write-file-atomic": "^3.0.0", + "xdg-basedir": "^4.0.0" + } + }, "content-disposition": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", @@ -1358,6 +1784,15 @@ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" }, + "convert-source-map": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, "cookie": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", @@ -1457,6 +1892,12 @@ "randomfill": "^1.0.3" } }, + "crypto-random-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", + "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", + "dev": true + }, "csv-parse": { "version": "4.10.1", "resolved": "https://registry.npmjs.org/csv-parse/-/csv-parse-4.10.1.tgz", @@ -1532,12 +1973,27 @@ "type-detect": "^4.0.0" } }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true + }, "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, + "default-require-extensions": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz", + "integrity": "sha512-ek6DpXq/SCpvjhpFsLFRVtIxJCRw6fUR42lYMVZuUMK7n8eMz4Uh5clckdBjEpLhn/gEBZo7hDJnJcwdKLKQjg==", + "dev": true, + "requires": { + "strip-bom": "^4.0.0" + } + }, "defer-to-connect": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", @@ -1666,22 +2122,21 @@ "domelementtype": "1" } }, + "dot-prop": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.2.0.tgz", + "integrity": "sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A==", + "dev": true, + "requires": { + "is-obj": "^2.0.0" + } + }, "dotenv": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==", "dev": true }, - "drbg.js": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz", - "integrity": "sha1-Pja2xCs3BDgjzbwzLVjzHiRFSAs=", - "requires": { - "browserify-aes": "^1.0.6", - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4" - } - }, "duplexer3": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", @@ -1740,12 +2195,12 @@ } }, "enquirer": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.5.tgz", - "integrity": "sha512-BNT1C08P9XD0vNg3J475yIUG+mVdp9T6towYFHUv897X0KoHBjB1shyrNmhmtHWKP17iSWgo7Gqh7BBuzLZMSA==", + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", "dev": true, "requires": { - "ansi-colors": "^3.2.1" + "ansi-colors": "^4.1.1" } }, "entities": { @@ -1823,6 +2278,12 @@ "next-tick": "~1.0.0" } }, + "es6-error": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", + "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", + "dev": true + }, "es6-iterator": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", @@ -1842,6 +2303,12 @@ "ext": "^1.1.2" } }, + "escape-goat": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", + "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", + "dev": true + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -1854,9 +2321,9 @@ "dev": true }, "eslint": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.3.1.tgz", - "integrity": "sha512-cQC/xj9bhWUcyi/RuMbRtC3I0eW8MH0jhRELSvpKYkWep3C6YZ2OkvcvJVUeO6gcunABmzptbXBuDoXsjHmfTA==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.4.0.tgz", + "integrity": "sha512-gU+lxhlPHu45H3JkEGgYhWhkR9wLHHEXC9FbWFnTlEkbKyZKWgWRLgf61E8zWmBuI6g5xKBph9ltg3NtZMVF8g==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -2068,6 +2535,49 @@ } } }, + "ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "requires": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + }, + "dependencies": { + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + } + } + }, "ethereumjs-common": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/ethereumjs-common/-/ethereumjs-common-1.5.1.tgz", @@ -2083,17 +2593,17 @@ } }, "ethereumjs-util": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.0.tgz", - "integrity": "sha512-vb0XN9J2QGdZGIEKG2vXM+kUdEivUfU6Wmi5y0cg+LRhDYKnXIZ/Lz7XjFbHRR9VIKq2lVGLzGBkA++y2nOdOQ==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", "requires": { "@types/bn.js": "^4.11.3", "bn.js": "^4.11.0", "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", "ethjs-util": "0.1.6", - "keccak": "^2.0.0", - "rlp": "^2.2.3", - "secp256k1": "^3.0.1" + "rlp": "^2.2.3" } }, "ethers": { @@ -2150,9 +2660,9 @@ "integrity": "sha512-39F7TBIV0G7gTelxwbEqnwhp90eqCPON1k0NwNfwhgKn4Co4ybUbj2pECcXT0B3ztRKZ7Pw1JujUUgmQJHcVAQ==" }, "eventemitter3": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", - "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==" + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", + "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==" }, "evp_bytestokey": { "version": "1.0.3", @@ -2292,11 +2802,6 @@ "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=", "dev": true }, - "file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" - }, "filesize": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/filesize/-/filesize-6.1.0.tgz", @@ -2341,6 +2846,17 @@ } } }, + "find-cache-dir": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", + "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + } + }, "find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -2390,13 +2906,66 @@ "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", "requires": { - "ms": "2.0.0" + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, + "foreground-child": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", + "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0", + "signal-exit": "^3.0.2" + }, + "dependencies": { + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" } }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } } } }, @@ -2425,6 +2994,12 @@ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" }, + "fromentries": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.2.1.tgz", + "integrity": "sha512-Xu2Qh8yqYuDhQGOhD5iJGninErSfI9A3FrriD3tjUgV5VbJFeH8vfgZ9HnC6jWN80QDVNQK5vmxRAmEAp7Mevw==", + "dev": true + }, "fs-extra": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", @@ -2468,6 +3043,12 @@ "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, + "gensync": { + "version": "1.0.0-beta.1", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", + "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==", + "dev": true + }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -2480,6 +3061,12 @@ "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", "dev": true }, + "get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true + }, "get-stream": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", @@ -2528,6 +3115,15 @@ "process": "~0.5.1" } }, + "global-dirs": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.0.1.tgz", + "integrity": "sha512-5HqUqdhkEovj2Of/ms3IeS/EekcO54ytHRLV4PEY2rhRwrHXLQjeVEES0Lhka0xwNDtGYn58wyC4s5+MHsOO6A==", + "dev": true, + "requires": { + "ini": "^1.3.5" + } + }, "globals": { "version": "12.4.0", "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", @@ -2659,6 +3255,12 @@ "has-symbol-support-x": "^1.4.1" } }, + "has-yarn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", + "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", + "dev": true + }, "hash-base": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", @@ -2695,6 +3297,24 @@ "minimalistic-assert": "^1.0.0" } }, + "hasha": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.0.tgz", + "integrity": "sha512-2W+jKdQbAdSIrggA8Q35Br8qKadTrqCTC8+XZvBWepKDK6m9XkX6Iz1a2yh2KP01kzAR/dpuMeUnocoLYDcskw==", + "dev": true, + "requires": { + "is-stream": "^2.0.0", + "type-fest": "^0.8.0" + }, + "dependencies": { + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "dev": true + } + } + }, "hdr-histogram-js": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/hdr-histogram-js/-/hdr-histogram-js-1.2.0.tgz", @@ -2728,6 +3348,12 @@ "minimalistic-crypto-utils": "^1.0.1" } }, + "html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, "htmlparser2": { "version": "3.10.1", "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", @@ -2876,12 +3502,24 @@ } } }, + "import-lazy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", + "dev": true + }, "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true }, + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true + }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -2897,6 +3535,12 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true + }, "intel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/intel/-/intel-1.2.0.tgz", @@ -2991,6 +3635,15 @@ "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==", "dev": true }, + "is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", + "dev": true, + "requires": { + "ci-info": "^2.0.0" + } + }, "is-date-object": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", @@ -3023,109 +3676,297 @@ "is-extglob": "^2.1.1" } }, - "is-hex-prefixed": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", - "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=" - }, - "is-map": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.1.tgz", - "integrity": "sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw==", - "dev": true - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "is-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz", - "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=" - }, - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" - }, - "is-plain-object": { + "is-hex-prefixed": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", + "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=" + }, + "is-installed-globally": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.3.2.tgz", + "integrity": "sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g==", + "dev": true, + "requires": { + "global-dirs": "^2.0.1", + "is-path-inside": "^3.0.1" + } + }, + "is-map": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.1.tgz", + "integrity": "sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw==", + "dev": true + }, + "is-npm": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-4.0.0.tgz", + "integrity": "sha512-96ECIfh9xtDDlPylNPXhzjsykHsMJZ18ASpaWzQyBr4YRTcVjUvzaHayDAES2oU/3KpljhHUjtSRNiDwi0F0ig==", + "dev": true + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", + "dev": true + }, + "is-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz", + "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=" + }, + "is-path-inside": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.2.tgz", + "integrity": "sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg==", + "dev": true + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" + }, + "is-plain-object": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.1.tgz", + "integrity": "sha512-Xnpx182SBMrr/aBik8y+GuR4U1L9FqMSojwDQwPMmxyC6bvEqly9UBCxhauBF5vNh2gwWJNX6oDV7O+OM4z34g==", + "dev": true + }, + "is-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.0.tgz", + "integrity": "sha512-iI97M8KTWID2la5uYXlkbSDQIg4F6o1sYboZKKTDpnDQMLtUL86zxhgDet3Q2SriaYsyGqZ6Mn2SjbRKeLHdqw==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "is-retry-allowed": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", + "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==" + }, + "is-set": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.1.tgz", + "integrity": "sha512-eJEzOtVyenDs1TMzSQ3kU3K+E0GUS9sno+F0OBT97xsgcJsF9nXMBtkT9/kut5JEpM7oL7X/0qxR17K3mcwIAA==", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "is-string": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", + "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", + "dev": true + }, + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "is-yarn-global": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", + "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "istanbul-lib-coverage": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", + "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", + "dev": true + }, + "istanbul-lib-hook": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", + "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", + "dev": true, + "requires": { + "append-transform": "^2.0.0" + } + }, + "istanbul-lib-instrument": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", + "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", + "dev": true, + "requires": { + "@babel/core": "^7.7.5", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.0.0", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "istanbul-lib-processinfo": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz", + "integrity": "sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw==", + "dev": true, + "requires": { + "archy": "^1.0.0", + "cross-spawn": "^7.0.0", + "istanbul-lib-coverage": "^3.0.0-alpha.1", + "make-dir": "^3.0.0", + "p-map": "^3.0.0", + "rimraf": "^3.0.0", + "uuid": "^3.3.3" + }, + "dependencies": { + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "istanbul-lib-report": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.0.tgz", - "integrity": "sha512-tZIpofR+P05k8Aocp7UI/2UTa9lTJSebCXpFFoR9aibpokDj/uXBsJ8luUu0tTVYKkMU6URDUuOfJZ7koewXvg==", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", "dev": true, "requires": { - "isobject": "^4.0.0" + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, - "is-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.0.tgz", - "integrity": "sha512-iI97M8KTWID2la5uYXlkbSDQIg4F6o1sYboZKKTDpnDQMLtUL86zxhgDet3Q2SriaYsyGqZ6Mn2SjbRKeLHdqw==", + "istanbul-lib-source-maps": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", + "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", "dev": true, "requires": { - "has-symbols": "^1.0.1" + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" } }, - "is-retry-allowed": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", - "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==" - }, - "is-set": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.1.tgz", - "integrity": "sha512-eJEzOtVyenDs1TMzSQ3kU3K+E0GUS9sno+F0OBT97xsgcJsF9nXMBtkT9/kut5JEpM7oL7X/0qxR17K3mcwIAA==", - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" - }, - "is-string": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", - "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", - "dev": true - }, - "is-symbol": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", - "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "istanbul-reports": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", + "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", "dev": true, "requires": { - "has-symbols": "^1.0.1" + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" } }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isobject": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-4.0.0.tgz", - "integrity": "sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA==", - "dev": true - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" - }, "isurl": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", @@ -3152,9 +3993,9 @@ } }, "jose": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/jose/-/jose-1.27.1.tgz", - "integrity": "sha512-VyHM6IJPw0TTGqHVNlPWg16/ASDPAmcChcLqSb3WNBvwWFoWPeFqlmAUCm8/oIG1GjZwAlUDuRKFfycowarcVA==", + "version": "1.27.2", + "resolved": "https://registry.npmjs.org/jose/-/jose-1.27.2.tgz", + "integrity": "sha512-zLIwnMa8dh5A2jFo56KvhiXCaW0hFjdNvG0I5GScL8Wro+/r/SnyIYTbnX3fYztPNSfgQp56sDMHUuS9c3e6bw==", "requires": { "@panva/asn1.js": "^1.0.0" } @@ -3191,6 +4032,12 @@ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, "json-buffer": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", @@ -3217,6 +4064,15 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, + "json5": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", + "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, "jsonfile": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", @@ -3242,20 +4098,18 @@ "integrity": "sha512-l3hLhffs9zqoDe8zjmb/mAN4B8VT3L56EUvKNqLFVs9YlFA+zx7ke1DO8STAdDyYNkeSo1nKmjuvQeI12So8Xw==" }, "keccak": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-2.1.0.tgz", - "integrity": "sha512-m1wbJRTo+gWbctZWay9i26v5fFnYkOn7D5PCxJ3fZUGUEb49dE1Pm4BREUYCt/aoO6di7jeoGmhvqN9Nzylm3Q==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.1.tgz", + "integrity": "sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA==", "requires": { - "bindings": "^1.5.0", - "inherits": "^2.0.4", - "nan": "^2.14.0", - "safe-buffer": "^5.2.0" + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" }, "dependencies": { - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + "node-addon-api": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", + "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==" } } }, @@ -3267,6 +4121,15 @@ "json-buffer": "3.0.0" } }, + "latest-version": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", + "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", + "dev": true, + "requires": { + "package-json": "^6.3.0" + } + }, "levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -3310,10 +4173,10 @@ "integrity": "sha1-ZHYsSGGAglGKw99Mz11YhtriA0c=", "dev": true }, - "lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "lodash.flattendeep": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", + "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", "dev": true }, "lodash.isplainobject": { @@ -3334,18 +4197,6 @@ "integrity": "sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==", "dev": true }, - "lodash.set": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz", - "integrity": "sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM=", - "dev": true - }, - "lodash.uniq": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", - "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", - "dev": true - }, "log-symbols": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", @@ -3374,11 +4225,28 @@ "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==" }, "macos-release": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/macos-release/-/macos-release-2.3.0.tgz", - "integrity": "sha512-OHhSbtcviqMPt7yfw5ef5aghS2jzFVKEFyCJndQt2YpSQ9qRVSEv2axSJI1paVThEu+FFGs584h/1YhxjVqajA==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/macos-release/-/macos-release-2.4.0.tgz", + "integrity": "sha512-ko6deozZYiAkqa/0gmcsz+p4jSy3gY7/ZsCEokPaYd8k+6/aXGkiTgr61+Owup7Sf+xjqW8u2ElhoM9SEcEfuA==", "dev": true }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "requires": { + "semver": "^6.0.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, "make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", @@ -3634,9 +4502,9 @@ } }, "mongoose": { - "version": "5.9.20", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.9.20.tgz", - "integrity": "sha512-vRP6Csu2obzSl3ed7kTQMrolBNgweiRJ/eBU1PSe/rJfjqWS1oqDE2D1ZPGxkVOsKXs7Gyd84GAXerj8IB2UWg==", + "version": "5.9.24", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.9.24.tgz", + "integrity": "sha512-uxTLy/ExYmOfKvvbjn1PHbjSJg0SQzff+dW6jbnywtbBcfPRC/3etnG9hPv6KJe/5TFZQGxCyiSezkqa0+iJAQ==", "requires": { "bson": "^1.1.4", "kareem": "2.3.1", @@ -3646,9 +4514,16 @@ "mquery": "3.2.2", "ms": "2.1.2", "regexp-clone": "1.0.0", - "safe-buffer": "5.1.2", + "safe-buffer": "5.2.1", "sift": "7.0.1", "sliced": "1.0.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + } } }, "mongoose-legacy-pluralize": { @@ -3753,19 +4628,19 @@ "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" }, "neo-async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", - "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "dev": true }, "newman": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/newman/-/newman-5.1.0.tgz", - "integrity": "sha512-V3HrweC3t7tsHshOiu8cG2dbHvJwMf5/rxwqBHAK/fZq/H1CGPSLM/T6IhbTpbPqIs+GpklQXO9VsFFuUf7Nfw==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/newman/-/newman-5.1.2.tgz", + "integrity": "sha512-4lojj/MCxK51IJdk1Gfh4yaiy+Hzp89NUUSBRJb8nr+4cYGW+Df8FU7MVk8nt2Fz2J40Lj02Nj6B9Lh3WpPZrg==", "dev": true, "requires": { "async": "3.2.0", - "chardet": "1.1.0", + "chardet": "1.2.1", "cli-progress": "3.8.2", "cli-table3": "0.6.0", "colors": "1.4.0", @@ -3773,12 +4648,12 @@ "csv-parse": "4.10.1", "eventemitter3": "4.0.4", "filesize": "6.1.0", - "lodash": "4.17.15", + "lodash": "4.17.19", "mkdirp": "1.0.4", - "postman-collection": "3.6.2", - "postman-collection-transformer": "3.3.2", + "postman-collection": "3.6.4", + "postman-collection-transformer": "3.3.3", "postman-request": "2.88.1-postman.23", - "postman-runtime": "7.26.0", + "postman-runtime": "7.26.2", "pretty-ms": "7.0.0", "semver": "7.3.2", "serialised-error": "1.1.3", @@ -3792,6 +4667,12 @@ "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==", "dev": true }, + "lodash": { + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", + "dev": true + }, "semver": { "version": "7.3.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", @@ -3822,9 +4703,9 @@ "dev": true }, "node-addon-api": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.0.0.tgz", - "integrity": "sha512-sSHCgWfJ+Lui/u+0msF3oyCgvdkhxDbkCS6Q8uiJquzOimkJBvX6hl5aSSA7DR1XbMpdM8r7phjcF63sF4rkKg==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.0.1.tgz", + "integrity": "sha512-YUpjl57P55u2yUaKX5Bgy4t5s6SCNYMg+62XNg+k41aYbBL1NgWrZfcgljR5MxDxHDjzl0qHDNtH6SkW4DXNCA==", "optional": true }, "node-fetch": { @@ -3836,8 +4717,7 @@ "node-gyp-build": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.2.2.tgz", - "integrity": "sha512-Lqh7mrByWCM8Cf9UPqpeoVBBo5Ugx+RKu885GAzmLBVYjeywScxHXPGLa4JfYNZmcNGwzR0Glu5/9GaQZMFqyA==", - "optional": true + "integrity": "sha512-Lqh7mrByWCM8Cf9UPqpeoVBBo5Ugx+RKu885GAzmLBVYjeywScxHXPGLa4JfYNZmcNGwzR0Glu5/9GaQZMFqyA==" }, "node-oauth1": { "version": "1.3.0", @@ -3845,6 +4725,15 @@ "integrity": "sha512-0yggixNfrA1KcBwvh/Hy2xAS1Wfs9dcg6TdFf2zN7gilcAigMdrtZ4ybrBSXBgLvGDw9V1p2MRnGBMq7XjTWLg==", "dev": true }, + "node-preload": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", + "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", + "dev": true, + "requires": { + "process-on-spawn": "^1.0.0" + } + }, "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -3857,18 +4746,19 @@ "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==" }, "now": { - "version": "19.1.1", - "resolved": "https://registry.npmjs.org/now/-/now-19.1.1.tgz", - "integrity": "sha512-rRnPdv0yH+/bn2KaqS8XnPcUz0d762t9dGtPOQhX60kN5i8JT2ms3fW8hJ30Y3ziO2EBqHQdGyYcj9Mt3jcMdQ==", + "version": "19.2.0", + "resolved": "https://registry.npmjs.org/now/-/now-19.2.0.tgz", + "integrity": "sha512-YNdDQ7MEaRAiwPtdNFk1ACu0gnbnZFLoWX7f4fpwhp/Zsups64vncFpLWkXihKJpNnofQiviruJbv0AVZYJuuA==", "dev": true, "requires": { - "@vercel/build-utils": "2.4.0", - "@vercel/go": "1.1.2", - "@vercel/next": "2.6.7", - "@vercel/node": "1.7.1", + "@vercel/build-utils": "2.4.2", + "@vercel/go": "1.1.4", + "@vercel/next": "2.6.13", + "@vercel/node": "1.7.3", "@vercel/python": "1.2.2", - "@vercel/ruby": "1.2.2", - "@vercel/static-build": "0.17.3" + "@vercel/ruby": "1.2.3", + "@vercel/static-build": "0.17.6", + "update-notifier": "4.1.0" } }, "npm-run-path": { @@ -3902,6 +4792,157 @@ } } }, + "nyc": { + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", + "integrity": "sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==", + "dev": true, + "requires": { + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "caching-transform": "^4.0.0", + "convert-source-map": "^1.7.0", + "decamelize": "^1.2.0", + "find-cache-dir": "^3.2.0", + "find-up": "^4.1.0", + "foreground-child": "^2.0.0", + "get-package-type": "^0.1.0", + "glob": "^7.1.6", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-hook": "^3.0.0", + "istanbul-lib-instrument": "^4.0.0", + "istanbul-lib-processinfo": "^2.0.2", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.0.2", + "make-dir": "^3.0.0", + "node-preload": "^0.2.1", + "p-map": "^3.0.0", + "process-on-spawn": "^1.0.0", + "resolve-from": "^5.0.0", + "rimraf": "^3.0.0", + "signal-exit": "^3.0.2", + "spawn-wrap": "^2.0.0", + "test-exclude": "^6.0.0", + "yargs": "^15.0.2" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dev": true, + "requires": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + } + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, "oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", @@ -3950,12 +4991,6 @@ "http-https": "^1.0.0" } }, - "octokit-pagination-methods": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/octokit-pagination-methods/-/octokit-pagination-methods-1.1.0.tgz", - "integrity": "sha512-fZ4qZdQ2nxJvtcasX7Ghl+WlWS/d9IgnBIwFZXVNNZUmzpno91SX5bc5vuxiuKoCtK78XxGGNuSCrDC7xYB3OQ==", - "dev": true - }, "on-finished": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", @@ -3986,6 +5021,16 @@ "word-wrap": "^1.2.3" } }, + "org.json-schema-0.3": { + "version": "npm:@windingtree/org.json-schema@0.3.4", + "resolved": "https://registry.npmjs.org/@windingtree/org.json-schema/-/org.json-schema-0.3.4.tgz", + "integrity": "sha512-cOznD4NlEnKb/B7ZfB2wjkbZHOGvj38rETxWFE12n9SePLY7yoEQzkoO6Y1n8Dt2Kb8KloB91IGi0aBOZYFz5A==" + }, + "org.json-schema-0.4": { + "version": "npm:@windingtree/org.json-schema@0.4.3", + "resolved": "https://registry.npmjs.org/@windingtree/org.json-schema/-/org.json-schema-0.4.3.tgz", + "integrity": "sha512-hfu1TWMC6OObmgqBPgFoyCx0RFqUEpHKlUHK9B5XJGPECORZWJHrghWy9H7ZTZ3Jz/ZEfFZgl0uWmrPSp11FTA==" + }, "os-name": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/os-name/-/os-name-3.1.0.tgz", @@ -4024,6 +5069,15 @@ "p-limit": "^2.2.0" } }, + "p-map": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", + "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", + "dev": true, + "requires": { + "aggregate-error": "^3.0.0" + } + }, "p-timeout": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", @@ -4038,6 +5092,38 @@ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, + "package-hash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", + "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.15", + "hasha": "^5.0.0", + "lodash.flattendeep": "^4.4.0", + "release-zalgo": "^1.0.0" + } + }, + "package-json": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", + "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", + "dev": true, + "requires": { + "got": "^9.6.0", + "registry-auth-token": "^4.0.0", + "registry-url": "^5.0.0", + "semver": "^6.2.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, "pako": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", @@ -4099,6 +5185,12 @@ "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", "dev": true }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", @@ -4134,9 +5226,9 @@ "dev": true }, "piscina": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/piscina/-/piscina-1.6.2.tgz", - "integrity": "sha512-4HPe+BXAzurOEcs3dGtDRocy09Gfly/aPLj3gyYz47B8DnLwokyvWlHDekLM1lqyfUYpZ4VUQc3iduj8BFQlCw==", + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/piscina/-/piscina-1.6.3.tgz", + "integrity": "sha512-I8aoBroMD6cRGYFsW1oN3X5YfJAyuT4pn+P2Tnk8ZYQ134ZqaQ0mjUztm9+NmKKawd0XlTY8wvz6bMxckrJX6g==", "requires": { "eventemitter-asyncresource": "^1.0.0", "hdr-histogram-js": "^1.2.0", @@ -4144,6 +5236,15 @@ "nice-napi": "^1.0.2" } }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } + }, "postcss": { "version": "7.0.32", "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.32.tgz", @@ -4189,36 +5290,42 @@ } }, "postman-collection": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/postman-collection/-/postman-collection-3.6.2.tgz", - "integrity": "sha512-daouhC0qe9ThF0EgIgWSJQxEj1fLctRREnWpSC+Tg2Sel/9keEho9zyWET5dYHPisPZcxGCqS3Q+BN/WQO+SAg==", + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/postman-collection/-/postman-collection-3.6.4.tgz", + "integrity": "sha512-chnMai59BIPLk/QEGrqn5o+38whjeL+LFn40fW0pUZxxFbyhSLjt315nZ9NAYSKxkR9UZ4elZX0PHt6jCZqyeA==", "dev": true, "requires": { "escape-html": "1.0.3", "faker": "4.1.0", "file-type": "3.9.0", "http-reasons": "0.1.0", - "iconv-lite": "0.5.1", + "iconv-lite": "0.6.2", "liquid-json": "0.3.1", - "lodash": "4.17.15", + "lodash": "4.17.19", "marked": "1.1.0", "mime-format": "2.0.0", "mime-types": "2.1.27", - "postman-url-encoder": "2.1.1", + "postman-url-encoder": "2.1.2", "sanitize-html": "1.20.1", "semver": "7.3.2", "uuid": "3.4.0" }, "dependencies": { "iconv-lite": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.5.1.tgz", - "integrity": "sha512-ONHr16SQvKZNSqjQT9gy5z24Jw+uqfO02/ngBSBoqChZ+W8qXX7GPRa1RoUnzGADw8K63R1BXUMzarCVQBpY8Q==", + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.2.tgz", + "integrity": "sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ==", "dev": true, "requires": { - "safer-buffer": ">= 2.1.2 < 3" + "safer-buffer": ">= 2.1.2 < 3.0.0" } }, + "lodash": { + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", + "dev": true + }, "semver": { "version": "7.3.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", @@ -4234,19 +5341,25 @@ } }, "postman-collection-transformer": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/postman-collection-transformer/-/postman-collection-transformer-3.3.2.tgz", - "integrity": "sha512-ZhhmrOZvAGZkPaX6r4j8G4vR1LHSSHXsGIxyQfMCdzSZqaW0H/d/4L0jqTYqjktb9aTkgHh61jKguM1HQ/L4Cw==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/postman-collection-transformer/-/postman-collection-transformer-3.3.3.tgz", + "integrity": "sha512-Ra0hfljwB6xnGJ7a638K0TkXTf5BuwGNo1Ahpa9ECehOTOlUFisE8dqX5VZl04QGbpvN5nmr0rwrtLXtK53Abg==", "dev": true, "requires": { "commander": "5.1.0", "inherits": "2.0.4", "intel": "1.2.0", - "lodash": "4.17.15", + "lodash": "4.17.19", "semver": "7.3.2", - "strip-json-comments": "3.1.0" + "strip-json-comments": "3.1.1" }, "dependencies": { + "lodash": { + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", + "dev": true + }, "semver": { "version": "7.3.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", @@ -4311,9 +5424,9 @@ } }, "postman-runtime": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/postman-runtime/-/postman-runtime-7.26.0.tgz", - "integrity": "sha512-ueQdLL1PtvfVbzg46eKSy/9tpJz1nIDrJVRabpTph3j6Uz4otB5oC63SW8c50QcOGOn1Q1MlNDYN8mWjvRyPgg==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/postman-runtime/-/postman-runtime-7.26.2.tgz", + "integrity": "sha512-0KJ2oRbEhxYNq+n1d58+7zTq/46ASVW/j6J0gvQMX7vjaLX9BE4wwt1m04it326psAQdMkRd8hWDLKaxTIgk/Q==", "dev": true, "requires": { "async": "2.6.3", @@ -4324,13 +5437,13 @@ "httpntlm": "1.7.6", "inherits": "2.0.4", "js-sha512": "0.8.0", - "lodash": "4.17.15", + "lodash": "4.17.19", "node-oauth1": "1.3.0", "performance-now": "2.1.0", - "postman-collection": "3.6.2", + "postman-collection": "3.6.4", "postman-request": "2.88.1-postman.23", - "postman-sandbox": "3.5.4", - "postman-url-encoder": "2.1.1", + "postman-sandbox": "3.5.7", + "postman-url-encoder": "2.1.2", "resolve-from": "5.0.0", "serialised-error": "1.1.3", "tough-cookie": "3.0.1", @@ -4352,6 +5465,12 @@ "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==", "dev": true }, + "lodash": { + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", + "dev": true + }, "resolve-from": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", @@ -4378,19 +5497,25 @@ } }, "postman-sandbox": { - "version": "3.5.4", - "resolved": "https://registry.npmjs.org/postman-sandbox/-/postman-sandbox-3.5.4.tgz", - "integrity": "sha512-spo4UudKdHZ7GsTpkg+fDgwWAYuSaR7pOaMRHkIWR7IArG4iTf1Rm9BDe+vyy8ACFWtOLFWAnOYqPKnLhN6DVA==", + "version": "3.5.7", + "resolved": "https://registry.npmjs.org/postman-sandbox/-/postman-sandbox-3.5.7.tgz", + "integrity": "sha512-+fUyy4uQ4GnYu+UB4zasLVZEosoxlYlqzndaP1iJoF09nMy/G9n5xPkveICC1++Q1Ydfv521bWxsPIujX4qtBg==", "dev": true, "requires": { "inherits": "2.0.4", - "lodash": "4.17.15", + "lodash": "4.17.19", "teleport-javascript": "1.0.0", "tough-cookie": "3.0.1", "uuid": "3.4.0", - "uvm": "1.7.8" + "uvm": "1.7.9" }, "dependencies": { + "lodash": { + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", + "dev": true + }, "tough-cookie": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-3.0.1.tgz", @@ -4411,12 +5536,12 @@ } }, "postman-url-encoder": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/postman-url-encoder/-/postman-url-encoder-2.1.1.tgz", - "integrity": "sha512-WxXvA3pWupcboNylMpBRO3U3aUmPP6kIftN9GtNOEoXiHWx5vuCHTSw1+eQDj4vHWe4UuwJYN3K0BLAqTsXi8w==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/postman-url-encoder/-/postman-url-encoder-2.1.2.tgz", + "integrity": "sha512-/ECLaAQPVOlYyrWj5wzj2S0Ke+kXAXCDzvmixit4mBlNy2R8VaHUdNh6M7kRDT0td7bDRhQc+PCHzNME0+7VNA==", "dev": true, "requires": { - "postman-collection": "^3.6.0", + "postman-collection": "^3.6.3", "punycode": "^2.1.1" } }, @@ -4450,6 +5575,15 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, + "process-on-spawn": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", + "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", + "dev": true, + "requires": { + "fromentries": "^1.2.0" + } + }, "progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", @@ -4510,6 +5644,15 @@ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, + "pupa": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.0.1.tgz", + "integrity": "sha512-hEJH0s8PXLY/cdXh66tNEQGndDrIKNqNC5xmrysZy3i5C3oEoLna7YAOad+7u125+zH1HNXUmGEkrhb3c2VriA==", + "dev": true, + "requires": { + "escape-goat": "^2.0.0" + } + }, "qs": { "version": "6.7.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", @@ -4558,6 +5701,26 @@ "unpipe": "1.0.0" } }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + } + } + }, "readable-stream": { "version": "2.3.7", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", @@ -4611,9 +5774,9 @@ } }, "regenerator-runtime": { - "version": "0.13.5", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz", - "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==" + "version": "0.13.6", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.6.tgz", + "integrity": "sha512-GmwlGiazQEbOwQWDdbbaP10i15pGtScYWLbMZuu+RKRz0cZ+g8IUONazBnaZqe7j1670IV1HgE4/8iy7CQPf4Q==" }, "regexp-clone": { "version": "1.0.0", @@ -4626,6 +5789,33 @@ "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", "dev": true }, + "registry-auth-token": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.0.tgz", + "integrity": "sha512-P+lWzPrsgfN+UEpDS3U8AQKg/UjZX6mQSJueZj3EK+vNESoqBSpBUD3gmu4sF9lOsjXWjF11dQKUqemf3veq1w==", + "dev": true, + "requires": { + "rc": "^1.2.8" + } + }, + "registry-url": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", + "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", + "dev": true, + "requires": { + "rc": "^1.2.8" + } + }, + "release-zalgo": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", + "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", + "dev": true, + "requires": { + "es6-error": "^4.0.1" + } + }, "request": { "version": "2.88.2", "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", @@ -4686,6 +5876,15 @@ "semver": "^5.1.0" } }, + "resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, "resolve-from": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", @@ -4718,9 +5917,9 @@ } }, "rlp": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.5.tgz", - "integrity": "sha512-y1QxTQOp0OZnjn19FxBmped4p+BSKPHwGndaqrESseyd2xXZtcgR3yuTIosh8CaMaOii9SKIYerBXnV/CpJ3qw==", + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.6.tgz", + "integrity": "sha512-HAfAmL6SDYNWPUOJNrM500x4Thn4PZsEy5pijPh40U9WfNk0z15hUYzO9xVIMAdIHdFtD8CBDHd75Td1g36Mjg==", "requires": { "bn.js": "^4.11.1" } @@ -4781,18 +5980,20 @@ "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==" }, "secp256k1": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.8.0.tgz", - "integrity": "sha512-k5ke5avRZbtl9Tqx/SA7CbY3NF6Ro+Sj9cZxezFzuBlLDmyqPiL8hJJ+EmzD8Ig4LUDByHJ3/iPOVoRixs/hmw==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.2.tgz", + "integrity": "sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg==", "requires": { - "bindings": "^1.5.0", - "bip66": "^1.1.5", - "bn.js": "^4.11.8", - "create-hash": "^1.2.0", - "drbg.js": "^1.0.1", "elliptic": "^6.5.2", - "nan": "^2.14.0", - "safe-buffer": "^5.1.2" + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + }, + "dependencies": { + "node-addon-api": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", + "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==" + } } }, "secure-json-parse": { @@ -4805,6 +6006,23 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" }, + "semver-diff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", + "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", + "dev": true, + "requires": { + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, "send": { "version": "0.17.1", "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", @@ -4953,9 +6171,9 @@ "dev": true }, "simple-concat": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", - "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==" }, "simple-get": { "version": "2.8.1", @@ -5023,6 +6241,40 @@ "memory-pager": "^1.0.2" } }, + "spawn-wrap": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", + "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", + "dev": true, + "requires": { + "foreground-child": "^2.0.0", + "is-windows": "^1.0.2", + "make-dir": "^3.0.0", + "rimraf": "^3.0.0", + "signal-exit": "^3.0.2", + "which": "^2.0.1" + }, + "dependencies": { + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -5159,6 +6411,12 @@ "ansi-regex": "^5.0.0" } }, + "strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true + }, "strip-eof": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", @@ -5174,9 +6432,9 @@ } }, "strip-json-comments": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz", - "integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true }, "supports-color": { @@ -5318,6 +6576,23 @@ "integrity": "sha512-j1llvWVFyEn/6XIFDfX5LAU43DXe0GCt3NfXDwJ8XpRRMkS+i50SAkonAONBy+vxwPFBd50MFU8a2uj8R/ccLg==", "dev": true }, + "term-size": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.0.tgz", + "integrity": "sha512-a6sumDlzyHVJWb8+YofY4TW112G6p2FCPEAFk+59gIYHv3XHRhm9ltVQ9kli4hNWeQBwSpe8cRN25x0ROunMOw==", + "dev": true + }, + "test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "requires": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + } + }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -5329,6 +6604,12 @@ "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=" }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + }, "to-readable-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", @@ -5455,6 +6736,15 @@ "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==" }, + "unique-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", + "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", + "dev": true, + "requires": { + "crypto-random-string": "^2.0.0" + } + }, "universal-user-agent": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-5.0.0.tgz", @@ -5474,6 +6764,79 @@ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" }, + "update-notifier": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.0.tgz", + "integrity": "sha512-w3doE1qtI0/ZmgeoDoARmI5fjDoT93IfKgEGqm26dGUOh8oNpaSTsGNdYRN/SjOuo10jcJGwkEL3mroKzktkew==", + "dev": true, + "requires": { + "boxen": "^4.2.0", + "chalk": "^3.0.0", + "configstore": "^5.0.1", + "has-yarn": "^2.1.0", + "import-lazy": "^2.1.0", + "is-ci": "^2.0.0", + "is-installed-globally": "^0.3.1", + "is-npm": "^4.0.0", + "is-yarn-global": "^0.3.0", + "latest-version": "^5.0.0", + "pupa": "^2.0.1", + "semver-diff": "^3.1.1", + "xdg-basedir": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "uri-js": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", @@ -5522,19 +6885,19 @@ "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" }, "uuid": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.1.0.tgz", - "integrity": "sha512-CI18flHDznR0lq54xBycOVmphdCYnQLKn8abKn7PXUiKUGdEd+/l9LWNJmugXel4hXq7S+RMNl34ecyC9TntWg==" + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.2.0.tgz", + "integrity": "sha512-CYpGiFTUrmI6OBMkAdjSDM0k5h8SkkiTP4WAjQgDgNB1S3Ou9VBEvr6q0Kv2H1mMk7IWfxYGpMH5sd5AvcIV2Q==" }, "uvm": { - "version": "1.7.8", - "resolved": "https://registry.npmjs.org/uvm/-/uvm-1.7.8.tgz", - "integrity": "sha512-Uasp7fsWQBo+pZbtlA0C464vYC6uHDdSVbX08vIinvi7r/k1R9sSs7n2/rf8lHkYRR6l4I46i7/xsWdqvLKDVQ==", + "version": "1.7.9", + "resolved": "https://registry.npmjs.org/uvm/-/uvm-1.7.9.tgz", + "integrity": "sha512-Z3Uf7Jm8Cpvxf8FMjE7cFBaXsXzKu2n3kFqV23pQNLg8rrZqi6fmLFnLCn5EhiEC94XdcQCCNjrGeOnFdy1xsA==", "dev": true, "requires": { "flatted": "2.0.1", "inherits": "2.0.4", - "lodash": "4.17.15", + "lodash": "4.17.19", "uuid": "3.3.2" }, "dependencies": { @@ -5544,6 +6907,12 @@ "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==", "dev": true }, + "lodash": { + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", + "dev": true + }, "uuid": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", @@ -5579,150 +6948,157 @@ } }, "web3": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/web3/-/web3-1.2.9.tgz", - "integrity": "sha512-Mo5aBRm0JrcNpN/g4VOrDzudymfOnHRC3s2VarhYxRA8aWgF5rnhQ0ziySaugpic1gksbXPe105pUWyRqw8HUA==", + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.2.11.tgz", + "integrity": "sha512-mjQ8HeU41G6hgOYm1pmeH0mRAeNKJGnJEUzDMoerkpw7QUQT4exVREgF1MYPvL/z6vAshOXei25LE/t/Bxl8yQ==", "requires": { - "web3-bzz": "1.2.9", - "web3-core": "1.2.9", - "web3-eth": "1.2.9", - "web3-eth-personal": "1.2.9", - "web3-net": "1.2.9", - "web3-shh": "1.2.9", - "web3-utils": "1.2.9" + "web3-bzz": "1.2.11", + "web3-core": "1.2.11", + "web3-eth": "1.2.11", + "web3-eth-personal": "1.2.11", + "web3-net": "1.2.11", + "web3-shh": "1.2.11", + "web3-utils": "1.2.11" } }, "web3-bzz": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.2.9.tgz", - "integrity": "sha512-ogVQr9jHodu9HobARtvUSmWG22cv2EUQzlPeejGWZ7j5h20HX40EDuWyomGY5VclIj5DdLY76Tmq88RTf/6nxA==", + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.2.11.tgz", + "integrity": "sha512-XGpWUEElGypBjeFyUhTkiPXFbDVD6Nr/S5jznE3t8cWUA0FxRf1n3n/NuIZeb0H9RkN2Ctd/jNma/k8XGa3YKg==", "requires": { - "@types/node": "^10.12.18", + "@types/node": "^12.12.6", "got": "9.6.0", "swarm-js": "^0.1.40", "underscore": "1.9.1" + }, + "dependencies": { + "@types/node": { + "version": "12.12.51", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.51.tgz", + "integrity": "sha512-6ILqt8iNThALrxDv2Q4LyYFQxULQz96HKNIFd4s9QRQaiHINYeUpLqeU/2IU7YMtvipG1fQVAy//vY8/fX1Y9w==" + } } }, "web3-core": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.2.9.tgz", - "integrity": "sha512-fSYv21IP658Ty2wAuU9iqmW7V+75DOYMVZsDH/c14jcF/1VXnedOcxzxSj3vArsCvXZNe6XC5/wAuGZyQwR9RA==", + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.2.11.tgz", + "integrity": "sha512-CN7MEYOY5ryo5iVleIWRE3a3cZqVaLlIbIzDPsvQRUfzYnvzZQRZBm9Mq+ttDi2STOOzc1MKylspz/o3yq/LjQ==", "requires": { - "@types/bn.js": "^4.11.4", - "@types/node": "^12.6.1", + "@types/bn.js": "^4.11.5", + "@types/node": "^12.12.6", "bignumber.js": "^9.0.0", - "web3-core-helpers": "1.2.9", - "web3-core-method": "1.2.9", - "web3-core-requestmanager": "1.2.9", - "web3-utils": "1.2.9" + "web3-core-helpers": "1.2.11", + "web3-core-method": "1.2.11", + "web3-core-requestmanager": "1.2.11", + "web3-utils": "1.2.11" }, "dependencies": { "@types/node": { - "version": "12.12.47", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.47.tgz", - "integrity": "sha512-yzBInQFhdY8kaZmqoL2+3U5dSTMrKaYcb561VU+lDzAYvqt+2lojvBEy+hmpSNuXnPTx7m9+04CzWYOUqWME2A==" + "version": "12.12.51", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.51.tgz", + "integrity": "sha512-6ILqt8iNThALrxDv2Q4LyYFQxULQz96HKNIFd4s9QRQaiHINYeUpLqeU/2IU7YMtvipG1fQVAy//vY8/fX1Y9w==" } } }, "web3-core-helpers": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.2.9.tgz", - "integrity": "sha512-t0WAG3orLCE3lqi77ZoSRNFok3VQWZXTniZigDQjyOJYMAX7BU3F3js8HKbjVnAxlX3tiKoDxI0KBk9F3AxYuw==", + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.2.11.tgz", + "integrity": "sha512-PEPoAoZd5ME7UfbnCZBdzIerpe74GEvlwT4AjOmHeCVZoIFk7EqvOZDejJHt+feJA6kMVTdd0xzRNN295UhC1A==", "requires": { "underscore": "1.9.1", - "web3-eth-iban": "1.2.9", - "web3-utils": "1.2.9" + "web3-eth-iban": "1.2.11", + "web3-utils": "1.2.11" } }, "web3-core-method": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.2.9.tgz", - "integrity": "sha512-bjsIoqP3gs7A/gP8+QeLUCyOKJ8bopteCSNbCX36Pxk6TYfYWNuC6hP+2GzUuqdP3xaZNe+XEElQFUNpR3oyAg==", + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.2.11.tgz", + "integrity": "sha512-ff0q76Cde94HAxLDZ6DbdmKniYCQVtvuaYh+rtOUMB6kssa5FX0q3vPmixi7NPooFnbKmmZCM6NvXg4IreTPIw==", "requires": { "@ethersproject/transactions": "^5.0.0-beta.135", "underscore": "1.9.1", - "web3-core-helpers": "1.2.9", - "web3-core-promievent": "1.2.9", - "web3-core-subscriptions": "1.2.9", - "web3-utils": "1.2.9" + "web3-core-helpers": "1.2.11", + "web3-core-promievent": "1.2.11", + "web3-core-subscriptions": "1.2.11", + "web3-utils": "1.2.11" } }, "web3-core-promievent": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.2.9.tgz", - "integrity": "sha512-0eAUA2zjgXTleSrnc1wdoKQPPIHU6KHf4fAscu4W9kKrR+mqP1KsjYrxY9wUyjNnXxfQ+5M29ipvbiaK8OqdOw==", + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.2.11.tgz", + "integrity": "sha512-il4McoDa/Ox9Agh4kyfQ8Ak/9ABYpnF8poBLL33R/EnxLsJOGQG2nZhkJa3I067hocrPSjEdlPt/0bHXsln4qA==", "requires": { - "eventemitter3": "3.1.2" + "eventemitter3": "4.0.4" } }, "web3-core-requestmanager": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.2.9.tgz", - "integrity": "sha512-1PwKV2m46ALUnIN5VPPgjOj8yMLJhhqZYvYJE34hTN5SErOkwhzx5zScvo5MN7v7KyQGFnpVCZKKGCiEnDmtFA==", + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.2.11.tgz", + "integrity": "sha512-oFhBtLfOiIbmfl6T6gYjjj9igOvtyxJ+fjS+byRxiwFJyJ5BQOz4/9/17gWR1Cq74paTlI7vDGxYfuvfE/mKvA==", "requires": { "underscore": "1.9.1", - "web3-core-helpers": "1.2.9", - "web3-providers-http": "1.2.9", - "web3-providers-ipc": "1.2.9", - "web3-providers-ws": "1.2.9" + "web3-core-helpers": "1.2.11", + "web3-providers-http": "1.2.11", + "web3-providers-ipc": "1.2.11", + "web3-providers-ws": "1.2.11" } }, "web3-core-subscriptions": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.2.9.tgz", - "integrity": "sha512-Y48TvXPSPxEM33OmXjGVDMzTd0j8X0t2+sDw66haeBS8eYnrEzasWuBZZXDq0zNUsqyxItgBGDn+cszkgEnFqg==", + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.2.11.tgz", + "integrity": "sha512-qEF/OVqkCvQ7MPs1JylIZCZkin0aKK9lDxpAtQ1F8niEDGFqn7DT8E/vzbIa0GsOjL2fZjDhWJsaW+BSoAW1gg==", "requires": { - "eventemitter3": "3.1.2", + "eventemitter3": "4.0.4", "underscore": "1.9.1", - "web3-core-helpers": "1.2.9" + "web3-core-helpers": "1.2.11" } }, "web3-eth": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.2.9.tgz", - "integrity": "sha512-sIKO4iE9FEBa/CYUd6GdPd7GXt/wISqxUd8PlIld6+hvMJj02lgO7Z7p5T9mZIJcIZJGvZX81ogx8oJ9yif+Ag==", + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.2.11.tgz", + "integrity": "sha512-REvxW1wJ58AgHPcXPJOL49d1K/dPmuw4LjPLBPStOVkQjzDTVmJEIsiLwn2YeuNDd4pfakBwT8L3bz1G1/wVsQ==", "requires": { "underscore": "1.9.1", - "web3-core": "1.2.9", - "web3-core-helpers": "1.2.9", - "web3-core-method": "1.2.9", - "web3-core-subscriptions": "1.2.9", - "web3-eth-abi": "1.2.9", - "web3-eth-accounts": "1.2.9", - "web3-eth-contract": "1.2.9", - "web3-eth-ens": "1.2.9", - "web3-eth-iban": "1.2.9", - "web3-eth-personal": "1.2.9", - "web3-net": "1.2.9", - "web3-utils": "1.2.9" + "web3-core": "1.2.11", + "web3-core-helpers": "1.2.11", + "web3-core-method": "1.2.11", + "web3-core-subscriptions": "1.2.11", + "web3-eth-abi": "1.2.11", + "web3-eth-accounts": "1.2.11", + "web3-eth-contract": "1.2.11", + "web3-eth-ens": "1.2.11", + "web3-eth-iban": "1.2.11", + "web3-eth-personal": "1.2.11", + "web3-net": "1.2.11", + "web3-utils": "1.2.11" } }, "web3-eth-abi": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.2.9.tgz", - "integrity": "sha512-3YwUYbh/DMfDbhMWEebAdjSd5bj3ZQieOjLzWFHU23CaLEqT34sUix1lba+hgUH/EN6A7bKAuKOhR3p0OvTn7Q==", + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.2.11.tgz", + "integrity": "sha512-PkRYc0+MjuLSgg03QVWqWlQivJqRwKItKtEpRUaxUAeLE7i/uU39gmzm2keHGcQXo3POXAbOnMqkDvOep89Crg==", "requires": { "@ethersproject/abi": "5.0.0-beta.153", "underscore": "1.9.1", - "web3-utils": "1.2.9" + "web3-utils": "1.2.11" } }, "web3-eth-accounts": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.2.9.tgz", - "integrity": "sha512-jkbDCZoA1qv53mFcRHCinoCsgg8WH+M0YUO1awxmqWXRmCRws1wW0TsuSQ14UThih5Dxolgl+e+aGWxG58LMwg==", + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.2.11.tgz", + "integrity": "sha512-6FwPqEpCfKIh3nSSGeo3uBm2iFSnFJDfwL3oS9pyegRBXNsGRVpgiW63yhNzL0796StsvjHWwQnQHsZNxWAkGw==", "requires": { "crypto-browserify": "3.12.0", - "eth-lib": "^0.2.8", + "eth-lib": "0.2.8", "ethereumjs-common": "^1.3.2", "ethereumjs-tx": "^2.1.1", "scrypt-js": "^3.0.1", "underscore": "1.9.1", "uuid": "3.3.2", - "web3-core": "1.2.9", - "web3-core-helpers": "1.2.9", - "web3-core-method": "1.2.9", - "web3-utils": "1.2.9" + "web3-core": "1.2.11", + "web3-core-helpers": "1.2.11", + "web3-core-method": "1.2.11", + "web3-utils": "1.2.11" }, "dependencies": { "eth-lib": { @@ -5748,131 +7124,131 @@ } }, "web3-eth-contract": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.2.9.tgz", - "integrity": "sha512-PYMvJf7EG/HyssUZa+pXrc8IB06K/YFfWYyW4R7ed3sab+9wWUys1TlWxBCBuiBXOokSAyM6H6P6/cKEx8FT8Q==", + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.2.11.tgz", + "integrity": "sha512-MzYuI/Rq2o6gn7vCGcnQgco63isPNK5lMAan2E51AJLknjSLnOxwNY3gM8BcKoy4Z+v5Dv00a03Xuk78JowFow==", "requires": { - "@types/bn.js": "^4.11.4", + "@types/bn.js": "^4.11.5", "underscore": "1.9.1", - "web3-core": "1.2.9", - "web3-core-helpers": "1.2.9", - "web3-core-method": "1.2.9", - "web3-core-promievent": "1.2.9", - "web3-core-subscriptions": "1.2.9", - "web3-eth-abi": "1.2.9", - "web3-utils": "1.2.9" + "web3-core": "1.2.11", + "web3-core-helpers": "1.2.11", + "web3-core-method": "1.2.11", + "web3-core-promievent": "1.2.11", + "web3-core-subscriptions": "1.2.11", + "web3-eth-abi": "1.2.11", + "web3-utils": "1.2.11" } }, "web3-eth-ens": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.2.9.tgz", - "integrity": "sha512-kG4+ZRgZ8I1WYyOBGI8QVRHfUSbbJjvJAGA1AF/NOW7JXQ+x7gBGeJw6taDWJhSshMoEKWcsgvsiuoG4870YxQ==", + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.2.11.tgz", + "integrity": "sha512-dbW7dXP6HqT1EAPvnniZVnmw6TmQEKF6/1KgAxbo8iBBYrVTMDGFQUUnZ+C4VETGrwwaqtX4L9d/FrQhZ6SUiA==", "requires": { "content-hash": "^2.5.2", "eth-ens-namehash": "2.0.8", "underscore": "1.9.1", - "web3-core": "1.2.9", - "web3-core-helpers": "1.2.9", - "web3-core-promievent": "1.2.9", - "web3-eth-abi": "1.2.9", - "web3-eth-contract": "1.2.9", - "web3-utils": "1.2.9" + "web3-core": "1.2.11", + "web3-core-helpers": "1.2.11", + "web3-core-promievent": "1.2.11", + "web3-eth-abi": "1.2.11", + "web3-eth-contract": "1.2.11", + "web3-utils": "1.2.11" } }, "web3-eth-iban": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.2.9.tgz", - "integrity": "sha512-RtdVvJE0pyg9dHLy0GzDiqgnLnssSzfz/JYguhC1wsj9+Gnq1M6Diy3NixACWUAp6ty/zafyOaZnNQ+JuH9TjQ==", + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.2.11.tgz", + "integrity": "sha512-ozuVlZ5jwFC2hJY4+fH9pIcuH1xP0HEFhtWsR69u9uDIANHLPQQtWYmdj7xQ3p2YT4bQLq/axKhZi7EZVetmxQ==", "requires": { - "bn.js": "4.11.8", - "web3-utils": "1.2.9" + "bn.js": "^4.11.9", + "web3-utils": "1.2.11" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + } } }, "web3-eth-personal": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.2.9.tgz", - "integrity": "sha512-cFiNrktxZ1C/rIdJFzQTvFn3/0zcsR3a+Jf8Y3KxeQDHszQtosjLWptP7bsUmDwEh4hzh0Cy3KpOxlYBWB8bJQ==", - "requires": { - "@types/node": "^12.6.1", - "web3-core": "1.2.9", - "web3-core-helpers": "1.2.9", - "web3-core-method": "1.2.9", - "web3-net": "1.2.9", - "web3-utils": "1.2.9" + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.2.11.tgz", + "integrity": "sha512-42IzUtKq9iHZ8K9VN0vAI50iSU9tOA1V7XU2BhF/tb7We2iKBVdkley2fg26TxlOcKNEHm7o6HRtiiFsVK4Ifw==", + "requires": { + "@types/node": "^12.12.6", + "web3-core": "1.2.11", + "web3-core-helpers": "1.2.11", + "web3-core-method": "1.2.11", + "web3-net": "1.2.11", + "web3-utils": "1.2.11" }, "dependencies": { "@types/node": { - "version": "12.12.47", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.47.tgz", - "integrity": "sha512-yzBInQFhdY8kaZmqoL2+3U5dSTMrKaYcb561VU+lDzAYvqt+2lojvBEy+hmpSNuXnPTx7m9+04CzWYOUqWME2A==" + "version": "12.12.51", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.51.tgz", + "integrity": "sha512-6ILqt8iNThALrxDv2Q4LyYFQxULQz96HKNIFd4s9QRQaiHINYeUpLqeU/2IU7YMtvipG1fQVAy//vY8/fX1Y9w==" } } }, "web3-net": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.2.9.tgz", - "integrity": "sha512-d2mTn8jPlg+SI2hTj2b32Qan6DmtU9ap/IUlJTeQbZQSkTLf0u9suW8Vjwyr4poJYXTurdSshE7OZsPNn30/ZA==", + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.2.11.tgz", + "integrity": "sha512-sjrSDj0pTfZouR5BSTItCuZ5K/oZPVdVciPQ6981PPPIwJJkCMeVjD7I4zO3qDPCnBjBSbWvVnLdwqUBPtHxyg==", "requires": { - "web3-core": "1.2.9", - "web3-core-method": "1.2.9", - "web3-utils": "1.2.9" + "web3-core": "1.2.11", + "web3-core-method": "1.2.11", + "web3-utils": "1.2.11" } }, "web3-providers-http": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.2.9.tgz", - "integrity": "sha512-F956tCIj60Ttr0UvEHWFIhx+be3He8msoPzyA44/kfzzYoMAsCFRn5cf0zQG6al0znE75g6HlWVSN6s3yAh51A==", + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.2.11.tgz", + "integrity": "sha512-psh4hYGb1+ijWywfwpB2cvvOIMISlR44F/rJtYkRmQ5jMvG4FOCPlQJPiHQZo+2cc3HbktvvSJzIhkWQJdmvrA==", "requires": { - "web3-core-helpers": "1.2.9", + "web3-core-helpers": "1.2.11", "xhr2-cookies": "1.1.0" } }, "web3-providers-ipc": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.2.9.tgz", - "integrity": "sha512-NQ8QnBleoHA2qTJlqoWu7EJAD/FR5uimf7Ielzk4Z2z+m+6UAuJdJMSuQNj+Umhz9L/Ys6vpS1vHx9NizFl+aQ==", + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.2.11.tgz", + "integrity": "sha512-yhc7Y/k8hBV/KlELxynWjJDzmgDEDjIjBzXK+e0rHBsYEhdCNdIH5Psa456c+l0qTEU2YzycF8VAjYpWfPnBpQ==", "requires": { "oboe": "2.1.4", "underscore": "1.9.1", - "web3-core-helpers": "1.2.9" + "web3-core-helpers": "1.2.11" } }, "web3-providers-ws": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.2.9.tgz", - "integrity": "sha512-6+UpvINeI//dglZoAKStUXqxDOXJy6Iitv2z3dbgInG4zb8tkYl/VBDL80UjUg3ZvzWG0g7EKY2nRPEpON2TFA==", + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.2.11.tgz", + "integrity": "sha512-ZxnjIY1Er8Ty+cE4migzr43zA/+72AF1myzsLaU5eVgdsfV7Jqx7Dix1hbevNZDKFlSoEyq/3j/jYalh3So1Zg==", "requires": { - "eventemitter3": "^4.0.0", + "eventemitter3": "4.0.4", "underscore": "1.9.1", - "web3-core-helpers": "1.2.9", + "web3-core-helpers": "1.2.11", "websocket": "^1.0.31" - }, - "dependencies": { - "eventemitter3": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", - "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==" - } } }, "web3-shh": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.2.9.tgz", - "integrity": "sha512-PWa8b/EaxaMinFaxy6cV0i0EOi2M7a/ST+9k9nhyhCjVa2vzXuNoBNo2IUOmeZ0WP2UQB8ByJ2+p4htlJaDOjA==", + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.2.11.tgz", + "integrity": "sha512-B3OrO3oG1L+bv3E1sTwCx66injW1A8hhwpknDUbV+sw3fehFazA06z9SGXUefuFI1kVs4q2vRi0n4oCcI4dZDg==", "requires": { - "web3-core": "1.2.9", - "web3-core-method": "1.2.9", - "web3-core-subscriptions": "1.2.9", - "web3-net": "1.2.9" + "web3-core": "1.2.11", + "web3-core-method": "1.2.11", + "web3-core-subscriptions": "1.2.11", + "web3-net": "1.2.11" } }, "web3-utils": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.9.tgz", - "integrity": "sha512-9hcpuis3n/LxFzEVjwnVgvJzTirS2S9/MiNAa7l4WOEoywY+BSNwnRX4MuHnjkh9NY25B6QOjuNG6FNnSjTw1w==", + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.11.tgz", + "integrity": "sha512-3Tq09izhD+ThqHEaWYX4VOT7dNPdZiO+c/1QMA0s5X2lDFKK/xHJb7cyTRRVzN2LvlHbR7baS1tmQhSua51TcQ==", "requires": { - "bn.js": "4.11.8", - "eth-lib": "0.2.7", + "bn.js": "^4.11.9", + "eth-lib": "0.2.8", "ethereum-bloom-filters": "^1.0.6", "ethjs-unit": "0.1.6", "number-to-bn": "1.7.0", @@ -5881,10 +7257,15 @@ "utf8": "3.0.0" }, "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + }, "eth-lib": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", - "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", + "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", "requires": { "bn.js": "^4.11.6", "elliptic": "^6.4.0", @@ -5971,10 +7352,44 @@ } } }, + "widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "dev": true, + "requires": { + "string-width": "^4.0.0" + }, + "dependencies": { + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + } + } + }, "windows-release": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/windows-release/-/windows-release-3.3.0.tgz", - "integrity": "sha512-2HetyTg1Y+R+rUgrKeUEhAG/ZuOmTrI1NBb3ZyAGQMYmOJjBBPe4MTodghRkmLJZHwkuPi02anbeGP+Zf401LQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/windows-release/-/windows-release-3.3.1.tgz", + "integrity": "sha512-Pngk/RDCaI/DkuHPlGTdIkDiTAnAkyMjoQMZqRsxydNl1qGXNIoZrB7RK8g53F2tEgQBMqQJHQdYZuQEEAu54A==", "dev": true, "requires": { "execa": "^1.0.0" @@ -6051,6 +7466,18 @@ } } }, + "write-file-atomic": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, "ws": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", @@ -6061,6 +7488,12 @@ "ultron": "~1.1.0" } }, + "xdg-basedir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", + "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", + "dev": true + }, "xhr": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.5.0.tgz", diff --git a/package.json b/package.json index 680370ff..b68a6666 100644 --- a/package.json +++ b/package.json @@ -24,36 +24,38 @@ "dev": "npx now dev", "test": "./scripts/test.sh", "test:newman": "node ./test/newman/run.js", + "coverage": "COVERAGE=true ./scripts/test.sh", "lint": "npx eslint test admin api decorators helpers", "now-build": "node ./scripts/build/now-build.js" }, "dependencies": { "axios": "0.19.2", - "camaro": "6.0.2", + "camaro": "6.0.3", "date-fns": "2.14.0", "date-fns-tz": "1.0.10", "email-validator": "2.0.4", "ethers": "4.0.47", "express": "4.17.1", "redis": "3.0.2", - "uuid": "8.1.0", - "web3": "1.2.9", + "uuid": "8.2.0", + "web3": "1.2.11", "@windingtree/org.id": "1.1.0", - "@windingtree/org.id-resolver": "1.3.1", + "@windingtree/org.id-resolver": "1.4.0", "@windingtree/org.id-lif-deposit": "1.0.2", - "jose": "1.27.1", - "mongoose": "5.9.20", + "jose": "1.27.2", + "mongoose": "5.9.24", "@elastic/elasticsearch": "7.8.0" }, "devDependencies": { - "now": "19.1.1", - "eslint": "7.3.1", + "now": "19.2.0", + "eslint": "7.4.0", "mocha": "8.0.1", "chai": "4.2.0", + "nyc": "15.1.0", "dotenv": "8.2.0", - "newman": "5.1.0", + "newman": "5.1.2", "@actions/core": "1.2.4", - "@actions/github": "2.2.0", + "@actions/github": "4.0.0", "@actions/exec": "1.0.4" }, "engines": { diff --git a/scripts/test.sh b/scripts/test.sh index d7fd5a1b..9ea593f5 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -10,6 +10,7 @@ trap cleanup EXIT cleanup() { # cleanup logic + rm -rf .nyc_output echo "Testing environment is cleaned" } @@ -20,4 +21,22 @@ else testDir="$@" fi -npx mocha --exit -R spec --timeout 70000 --recursive "$testDir" +if [ "$COVERAGE" = true ]; then + echo "Running tests with coverage" + npx nyc --reporter lcov mocha -r ./node_modules/dotenv/config --exit -R spec --timeout 70000 --recursive ./test/spec + + if [ "$CONTINUOUS_INTEGRATION" = true ]; then + cat coverage/lcov.info | npx coveralls + fi + +else + echo "Running tests without coverage" + + if [ -z "$@" ]; then + testDir="./test/spec/**/*.js" + else + testDir="$@" + fi + + npx mocha -r ./node_modules/dotenv/config --exit -R spec --timeout 70000 --recursive "$testDir" +fi diff --git a/test/helpers/assertions.js b/test/helpers/assertions.js index 8cfe1ce3..b74ca434 100644 --- a/test/helpers/assertions.js +++ b/test/helpers/assertions.js @@ -8,12 +8,22 @@ const assert = require('assert'); module.exports.assertFailure = async (promise, reason = false, code = null) => { try { - await promise; + + if (typeof promise.then === 'function') { + await promise; + } else if (typeof promise === 'function') { + promise(); + } else { + assert.fail( + 'First parameter of the "assertFailure" expected to be a promise or function' + ); + } + assert.fail('The assertion is fulfilled although failure was expected'); } catch (error) { if (reason) { - const reasonFoundByString = error.message + const reasonFoundByString = error.message === reason || error.message .toLowerCase().search(reason.toLowerCase()) >= 0; assert( diff --git a/test/helpers/matches.js b/test/helpers/matches.js new file mode 100644 index 00000000..5b7d3b9e --- /dev/null +++ b/test/helpers/matches.js @@ -0,0 +1,5 @@ +module.exports.dateISO = /^(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+)|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d)|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d)$/; +module.exports.currencyCode = /^[A-Z]{3}$/; +module.exports.langCode = /^[a-z]{2}$/; +module.exports.dotVersioning = /^(\d+\.)?(\d+\.)?(\*|\d+)$/; +module.exports.uuid = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/; diff --git a/test/helpers/soapTemplates.js b/test/helpers/soapTemplates.js new file mode 100644 index 00000000..95beba7f --- /dev/null +++ b/test/helpers/soapTemplates.js @@ -0,0 +1,5 @@ +require('chai').should(); + +describe('Helpers/soapTemplates', () => { + +}); diff --git a/test/mocks/erevmax.json b/test/mocks/erevmax.json new file mode 100644 index 00000000..9fba12fa --- /dev/null +++ b/test/mocks/erevmax.json @@ -0,0 +1 @@ +{"status":200,"statusText":"OK","headers":{"content-type":"text/xml;charset=UTF-8","connection":"close","content-length":"13674","date":"Mon, 20 Jul 2020 15:09:54 GMT","x-vercel-cache":"MISS","server":"Vercel","x-vercel-id":"cdg1::sfo1::fl6z9-1595257794014-9a6a61eb378c","strict-transport-security":"max-age=63072000; includeSubDomains; preload","cache-control":"s-maxage=0"},"config":{"url":"https://ota-simulator.now.sh/api?ota=getOTAHotelAvailability","method":"post","data":"\n\n\t\n\t\t\n\t\t\t\n\t\t\n\t\thttp://www.opentravel.org/OTA/2003/05/getOTAHotelAvailability\n\t\tuuid:91a83ac1-8931-4618-ab49-692a25fa5a17\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tWindingtree\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\n","headers":{"Accept":"application/json, text/plain, */*","Content-Type":"application/xml","SOAPAction":"http://www.opentravel.org/OTA/2003/05/getOTAHotelAvailability","User-Agent":"axios/0.19.2","Content-Length":2072},"transformRequest":[null],"transformResponse":[null],"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1},"request":{"_events":{},"_eventsCount":6,"outputData":[],"outputSize":0,"writable":true,"_last":true,"chunkedEncoding":false,"shouldKeepAlive":false,"useChunkedEncodingByDefault":true,"sendDate":false,"_removedConnection":false,"_removedContLen":false,"_removedTE":false,"_contentLength":null,"_hasBody":true,"_trailer":"","finished":true,"_headerSent":true,"socket":{"_tlsOptions":{"pipe":false,"secureContext":{"context":{},"singleUse":true},"isServer":false,"requestCert":true,"rejectUnauthorized":true},"_secureEstablished":true,"_securePending":false,"_newSessionPending":false,"_controlReleased":true,"secureConnecting":true,"_SNICallback":null,"servername":"ota-simulator.now.sh","alpnProtocol":false,"authorized":true,"authorizationError":null,"encrypted":true,"_events":{"close":[null,null,null,null]},"_eventsCount":10,"connecting":false,"_hadError":false,"_parent":null,"_host":"ota-simulator.now.sh","_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":null,"pipesCount":0,"flowing":true,"ended":false,"endEmitted":false,"reading":true,"sync":false,"needReadable":true,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null},"readable":true,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":true,"needDrain":false,"ending":true,"ended":true,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":false,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"bufferedRequest":null,"lastBufferedRequest":null,"pendingcb":1,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"bufferedRequestCount":0,"corkedRequestsFree":{"next":{"next":null,"entry":null},"entry":null}},"writable":false,"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","_server":null,"ssl":{"_parent":{"reading":true,"onconnection":null},"reading":true},"_requestCert":true,"_rejectUnauthorized":true,"parser":null},"_header":"POST /api?ota=getOTAHotelAvailability HTTP/1.1\r\nAccept: application/json, text/plain, */*\r\nContent-Type: application/xml\r\nSOAPAction: http://www.opentravel.org/OTA/2003/05/getOTAHotelAvailability\r\nUser-Agent: axios/0.19.2\r\nContent-Length: 2072\r\nHost: ota-simulator.now.sh\r\nConnection: close\r\n\r\n","agent":{"_events":{},"_eventsCount":2,"defaultPort":443,"protocol":"https:","options":{"path":null},"requests":{},"sockets":{"ota-simulator.now.sh:443::::::::::::::::::":[null]},"freeSockets":{},"keepAliveMsecs":1000,"keepAlive":false,"maxSockets":null,"maxFreeSockets":256,"maxCachedSessions":100,"_sessionCache":{"map":{"ota-simulator.now.sh:443::::::::::::::::::":{"type":"Buffer","data":[48,130,6,229,2,1,1,2,2,3,4,4,2,19,2,4,32,189,139,245,243,85,165,43,47,186,167,231,181,234,206,92,185,239,35,218,169,21,77,116,153,216,125,196,117,169,18,98,116,4,48,61,207,124,55,89,190,229,95,64,150,112,169,125,65,135,80,144,63,190,227,154,199,24,246,70,220,219,105,37,93,102,18,31,86,245,72,137,151,33,63,121,93,121,122,38,94,91,227,161,6,2,4,95,21,179,194,162,4,2,2,28,32,163,130,5,84,48,130,5,80,48,130,4,56,160,3,2,1,2,2,18,4,206,21,118,160,84,101,97,249,11,221,231,187,153,112,160,92,36,48,13,6,9,42,134,72,134,247,13,1,1,11,5,0,48,74,49,11,48,9,6,3,85,4,6,19,2,85,83,49,22,48,20,6,3,85,4,10,19,13,76,101,116,39,115,32,69,110,99,114,121,112,116,49,35,48,33,6,3,85,4,3,19,26,76,101,116,39,115,32,69,110,99,114,121,112,116,32,65,117,116,104,111,114,105,116,121,32,88,51,48,30,23,13,50,48,48,54,48,52,50,51,53,56,49,52,90,23,13,50,48,48,57,48,50,50,51,53,56,49,52,90,48,19,49,17,48,15,6,3,85,4,3,12,8,42,46,110,111,119,46,115,104,48,130,1,34,48,13,6,9,42,134,72,134,247,13,1,1,1,5,0,3,130,1,15,0,48,130,1,10,2,130,1,1,0,239,90,74,48,119,60,52,89,56,58,188,73,195,46,193,247,11,42,206,249,226,147,23,224,57,40,193,177,253,104,144,75,22,66,168,102,137,19,49,96,98,213,131,18,169,255,194,20,12,160,65,29,214,104,237,63,44,0,10,88,150,197,126,122,123,247,29,19,58,162,41,174,5,162,137,197,254,27,243,1,56,130,99,130,80,5,183,13,76,247,125,74,193,18,219,251,98,250,64,41,7,77,110,144,112,7,8,30,197,50,186,203,72,0,160,12,16,55,157,238,5,218,238,56,216,193,20,75,138,58,168,230,147,212,217,237,39,146,217,201,229,95,146,144,99,248,176,202,237,67,86,94,49,79,205,84,138,225,1,75,90,168,130,123,226,240,189,112,246,49,9,225,243,143,92,180,27,102,100,26,16,161,94,110,4,49,32,57,180,151,16,195,117,230,83,88,27,101,188,237,29,252,82,24,75,246,127,234,249,51,3,156,210,175,88,30,152,55,224,15,93,113,46,2,32,127,155,129,197,140,145,2,209,190,124,208,43,30,113,186,120,85,194,23,113,225,144,131,202,152,95,179,136,135,247,125,2,3,1,0,1,163,130,2,101,48,130,2,97,48,14,6,3,85,29,15,1,1,255,4,4,3,2,5,160,48,29,6,3,85,29,37,4,22,48,20,6,8,43,6,1,5,5,7,3,1,6,8,43,6,1,5,5,7,3,2,48,12,6,3,85,29,19,1,1,255,4,2,48,0,48,29,6,3,85,29,14,4,22,4,20,148,158,100,24,91,144,105,85,19,184,61,225,57,92,67,82,185,171,18,7,48,31,6,3,85,29,35,4,24,48,22,128,20,168,74,106,99,4,125,221,186,230,209,57,183,166,69,101,239,243,168,236,161,48,111,6,8,43,6,1,5,5,7,1,1,4,99,48,97,48,46,6,8,43,6,1,5,5,7,48,1,134,34,104,116,116,112,58,47,47,111,99,115,112,46,105,110,116,45,120,51,46,108,101,116,115,101,110,99,114,121,112,116,46,111,114,103,48,47,6,8,43,6,1,5,5,7,48,2,134,35,104,116,116,112,58,47,47,99,101,114,116,46,105,110,116,45,120,51,46,108,101,116,115,101,110,99,114,121,112,116,46,111,114,103,47,48,27,6,3,85,29,17,4,20,48,18,130,8,42,46,110,111,119,46,115,104,130,6,110,111,119,46,115,104,48,76,6,3,85,29,32,4,69,48,67,48,8,6,6,103,129,12,1,2,1,48,55,6,11,43,6,1,4,1,130,223,19,1,1,1,48,40,48,38,6,8,43,6,1,5,5,7,2,1,22,26,104,116,116,112,58,47,47,99,112,115,46,108,101,116,115,101,110,99,114,121,112,116,46,111,114,103,48,130,1,4,6,10,43,6,1,4,1,214,121,2,4,2,4,129,245,4,129,242,0,240,0,118,0,231,18,242,176,55,126,26,98,251,142,201,12,97,132,241,234,123,55,203,86,29,17,38,91,243,224,243,75,242,65,84,110,0,0,1,114,129,252,75,29,0,0,4,3,0,71,48,69,2,32,65,14,160,14,81,107,95,231,5,68,118,31,93,57,217,189,134,174,245,172,134,131,254,24,24,28,51,166,68,106,124,30,2,33,0,191,37,222,185,129,46,221,162,7,241,124,135,151,69,133,245,247,130,57,168,54,105,128,90,38,74,36,160,1,59,40,189,0,118,0,178,30,5,204,139,162,205,138,32,78,135,102,249,43,185,138,37,32,103,107,218,250,112,231,178,73,83,45,239,139,144,94,0,0,1,114,129,252,75,20,0,0,4,3,0,71,48,69,2,33,0,169,193,253,81,34,243,120,235,185,213,139,74,204,171,140,126,218,30,160,108,216,174,168,220,90,191,156,44,24,18,220,196,2,32,111,86,245,138,214,252,156,82,13,216,65,33,253,173,179,52,104,146,241,224,224,135,189,196,165,248,82,26,98,68,241,176,48,13,6,9,42,134,72,134,247,13,1,1,11,5,0,3,130,1,1,0,26,130,151,29,92,51,8,156,90,62,126,64,178,226,147,101,125,177,211,44,37,76,180,75,228,167,43,156,153,18,96,132,212,49,151,58,252,189,103,23,157,170,162,58,10,182,8,250,40,199,123,150,92,115,143,192,222,61,30,69,57,52,148,228,42,66,38,110,251,8,180,163,88,79,224,249,231,229,132,31,97,56,249,134,47,109,169,141,212,182,66,140,247,133,41,102,241,79,69,88,28,104,63,5,50,68,141,110,236,182,93,95,232,194,21,176,162,153,188,121,59,178,234,16,221,110,171,106,38,7,229,181,87,96,210,219,253,197,112,42,105,28,80,243,112,82,8,31,162,214,19,50,200,132,169,249,56,147,211,51,38,238,90,142,201,31,213,230,5,89,73,115,62,121,3,201,12,195,72,29,225,149,165,218,244,44,177,41,78,95,86,95,169,162,101,114,233,209,150,21,227,208,21,165,235,166,132,252,159,87,153,170,6,246,31,119,230,241,190,212,101,36,201,141,207,95,72,149,191,206,58,177,105,66,142,8,250,141,201,44,70,181,108,107,207,174,136,124,67,139,115,166,216,208,88,168,164,2,4,0,166,22,4,20,111,116,97,45,115,105,109,117,108,97,116,111,114,46,110,111,119,46,115,104,169,4,2,2,11,184,170,129,243,4,129,240,208,78,203,44,244,28,207,186,34,53,255,222,196,241,124,8,31,130,164,210,168,126,152,163,4,64,40,163,254,232,247,215,143,127,188,18,188,43,170,2,208,245,209,196,94,177,73,172,98,125,206,90,2,249,202,38,123,164,250,152,7,22,160,84,253,76,40,213,238,185,214,103,130,108,114,76,63,247,120,125,69,214,241,91,42,207,72,128,96,241,195,243,176,86,216,87,94,79,92,5,51,73,239,185,6,124,44,151,96,250,223,222,253,107,144,241,40,100,68,123,193,159,166,69,33,84,42,68,253,235,65,248,231,136,6,255,102,200,81,248,36,162,84,44,34,85,150,9,14,192,106,19,163,72,79,252,9,254,244,143,152,150,167,106,113,135,126,31,35,127,179,142,118,94,18,248,238,189,53,150,86,30,166,12,27,142,180,129,125,80,81,130,72,199,49,250,189,5,126,19,90,163,5,96,79,200,185,54,108,30,254,61,170,41,244,32,115,152,161,185,49,12,98,177,237,131,176,142,152,116,27,227,152,29,60,83,102,0,89,91,174,6,2,4,102,172,121,69]}},"list":["ota-simulator.now.sh:443::::::::::::::::::"]}},"method":"POST","path":"/api?ota=getOTAHotelAvailability","_ended":true,"res":{"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":null,"pipesCount":0,"flowing":true,"ended":true,"endEmitted":true,"reading":false,"sync":true,"needReadable":false,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"emitClose":true,"autoDestroy":false,"destroyed":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":true,"decoder":null,"encoding":null},"readable":false,"_events":{"end":[null,null]},"_eventsCount":3,"httpVersionMajor":1,"httpVersionMinor":1,"httpVersion":"1.1","complete":true,"rawHeaders":["Content-Type","text/xml;charset=UTF-8","Connection","close","content-length","13674","date","Mon, 20 Jul 2020 15:09:54 GMT","x-vercel-cache","MISS","server","Vercel","x-vercel-id","cdg1::sfo1::fl6z9-1595257794014-9a6a61eb378c","strict-transport-security","max-age=63072000; includeSubDomains; preload","cache-control","s-maxage=0"],"trailers":{},"rawTrailers":[],"aborted":false,"upgrade":false,"url":"","method":null,"statusCode":200,"statusMessage":"OK","_consuming":false,"_dumped":false,"responseUrl":"https://ota-simulator.now.sh/api?ota=getOTAHotelAvailability","redirects":[]},"aborted":false,"timeoutCb":null,"upgradeOrConnect":false,"parser":null,"maxHeadersCount":null,"reusedSocket":false,"_redirectable":{"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":true,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":true,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"bufferedRequest":null,"lastBufferedRequest":null,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":true,"autoDestroy":false,"bufferedRequestCount":0,"corkedRequestsFree":{"next":null,"entry":null}},"writable":true,"_events":{},"_eventsCount":2,"_options":{"protocol":"https:","maxRedirects":21,"maxBodyLength":10485760,"path":"/api?ota=getOTAHotelAvailability","method":"POST","agents":{},"hostname":"ota-simulator.now.sh","port":null,"nativeProtocols":{"http:":{"METHODS":["ACL","BIND","CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LINK","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCALENDAR","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REBIND","REPORT","SEARCH","SOURCE","SUBSCRIBE","TRACE","UNBIND","UNLINK","UNLOCK","UNSUBSCRIBE"],"STATUS_CODES":{"100":"Continue","101":"Switching Protocols","102":"Processing","103":"Early Hints","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I'm a Teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Unordered Collection","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"},"maxHeaderSize":8192,"globalAgent":{"_events":{},"_eventsCount":2,"defaultPort":80,"protocol":"http:","options":{"path":null},"requests":{},"sockets":{"127.0.0.1:39413:":[{"connecting":false,"_hadError":false,"_parent":null,"_host":null,"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":null,"pipesCount":0,"flowing":true,"ended":false,"endEmitted":false,"reading":true,"sync":false,"needReadable":true,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null},"readable":true,"_events":{"end":[null,null],"close":[null,null]},"_eventsCount":8,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":false,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"bufferedRequest":null,"lastBufferedRequest":null,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"bufferedRequestCount":0,"corkedRequestsFree":{"next":{"next":null,"entry":null},"entry":null}},"writable":true,"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null,"parser":{"4":null,"_headers":[],"_url":"","incoming":null,"outgoing":{"_events":{},"_eventsCount":2,"outputData":[],"outputSize":0,"writable":true,"_last":true,"chunkedEncoding":false,"shouldKeepAlive":false,"useChunkedEncodingByDefault":true,"sendDate":false,"_removedConnection":false,"_removedContLen":false,"_removedTE":false,"_contentLength":null,"_hasBody":true,"_trailer":"","finished":true,"_headerSent":true,"_header":"POST /api/v1/offers/search HTTP/1.1\r\nhost: localhost:37985\r\nx-forwarded-host: localhost:3000\r\nx-forwarded-proto: http\r\nx-forwarded-port: 3000\r\nx-forwarded-for: ::1\r\naccept-language: ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7\r\naccept-encoding: gzip, deflate, br\r\nreferer: http://localhost:3000/api/docs/\r\nsec-fetch-dest: empty\r\nsec-fetch-mode: cors\r\nsec-fetch-site: same-origin\r\norigin: http://localhost:3000\r\ncontent-type: application/json\r\nuser-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36\r\nauthorization: Bearer eyJhbGciOiJFUzI1NksiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJkaWQ6b3JnaWQ6MHhkMjhlZDY2MWE4NjE5MzAxZWQ2Y2I3MDQ4MTQyYzFhMzU2YzY2MmJiOTZiYTlkMWMwYjRjODhmMTM1MzYzZDI2I3Rlc3QiLCJhdWQiOiJkaWQ6b3JnaWQ6MHg5NGJmNWE1N2I4NTBhMzViNGQxZDdiNTlmNjYzY2UzYThhNzZmZDk5MjhlZjIwNjdjYzc3MmZjOTdmYjBhZDc1IiwiZXhwIjoxNjMxMjQ1MzM2LCJzY29wZSI6IiJ9.sJZvp86tchjrWTWCJXtNS1g8gi7UY9TDvXPhE5-R8OGCyVNj71chQvTtsIOB89OisqvivxIbqp5lrScNYQV_EQ\r\ndnt: 1\r\naccept: application/json\r\ncontent-length: 229\r\nconnection: close\r\nx-now-bridge-request-id: 1\r\n\r\n","method":"POST","path":"/api/v1/offers/search","_ended":false,"res":null,"aborted":false,"timeoutCb":null,"upgradeOrConnect":false,"maxHeadersCount":null,"reusedSocket":false},"maxHeaderPairs":2000,"_consumed":false}}]},"freeSockets":{},"keepAliveMsecs":1000,"keepAlive":false,"maxSockets":null,"maxFreeSockets":256}},"https:":{}},"pathname":"/api","search":"?ota=getOTAHotelAvailability"},"_redirectCount":0,"_requestBodyLength":2072,"_requestBodyBuffers":[],"_currentUrl":"https://ota-simulator.now.sh/api?ota=getOTAHotelAvailability"}},"data":"Standard Double2020-07-02Sq.M.Superior Double2020-07-02Sq.M.Modrate Double2020-07-02Sq.M.Web Price Prepaid100% cancellation penalty is applicable if cancelled 1 day before arrivalWinding Tree BAR100% cancellation penalty is applicable if cancelled 1 day before arrival
Stockholm111 22SEThe Comfort Hotel Xpress Stockholm Central enjoys a fabulous location right next to Stockholm Central Station. The citys amazing range of restaurants, shops, museums and nightclubs are all within easy reach! This is a cash-free hotel. The Comfort Hotel Xpress Stockholm Central is located within Stockholms World Trade Center, with a direct link to Stockholm Central Station. Stockholms amazing restaurants, shopping, night clubs and sights are all within easy walking distance. If you arrive by car, you can easily park in the parking garage right next door to the hotel.
AmericanExpressDiners ClubMasterCardVisa
"} \ No newline at end of file diff --git a/test/mocks/erevmaxErrors.json b/test/mocks/erevmaxErrors.json new file mode 100644 index 00000000..3038c4ee --- /dev/null +++ b/test/mocks/erevmaxErrors.json @@ -0,0 +1 @@ +{"status":200,"statusText":"","headers":{"x-frame-options":"SAMEORIGIN, DENY","x-content-type-options":"nosniff, nosniff","x-xss-protection":"1; mode=block","content-type":"text/xml;charset=ISO-8859-1","content-length":"388","date":"Mon, 20 Jul 2020 15:35:32 GMT","server":"","strict-transport-security":"max-age=31536000, max-age=31536000; includeSubDomains"},"config":{"url":"https://searchnbook.ratetiger.com/ARIShopService-WS/services/ARIShopService","method":"post","data":"\n\n\t\n\t\t\n\t\t\t\n\t\t\n\t\thttp://www.opentravel.org/OTA/2003/05/getOTAHotelAvailability\n\t\tuuid:91a83ac1-8931-4618-ab49-692a25fa5a17\n\t\n\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tWindingtree\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\n","headers":{"Accept":"application/json, text/plain, */*","Content-Type":"application/xml","SOAPAction":"http://www.opentravel.org/OTA/2003/05/getOTAHotelAvailability","User-Agent":"axios/0.19.2","Content-Length":2072},"transformRequest":[null],"transformResponse":[null],"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1},"request":{"_events":{},"_eventsCount":6,"outputData":[],"outputSize":0,"writable":true,"_last":true,"chunkedEncoding":false,"shouldKeepAlive":false,"useChunkedEncodingByDefault":true,"sendDate":false,"_removedConnection":false,"_removedContLen":false,"_removedTE":false,"_contentLength":null,"_hasBody":true,"_trailer":"","finished":true,"_headerSent":true,"socket":{"_tlsOptions":{"pipe":false,"secureContext":{"context":{},"singleUse":true},"isServer":false,"requestCert":true,"rejectUnauthorized":true},"_secureEstablished":true,"_securePending":false,"_newSessionPending":false,"_controlReleased":true,"secureConnecting":true,"_SNICallback":null,"servername":"searchnbook.ratetiger.com","alpnProtocol":false,"authorized":true,"authorizationError":null,"encrypted":true,"_events":{"close":[null,null,null,null]},"_eventsCount":10,"connecting":false,"_hadError":false,"_parent":null,"_host":"searchnbook.ratetiger.com","_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":null,"pipesCount":0,"flowing":true,"ended":false,"endEmitted":false,"reading":true,"sync":false,"needReadable":true,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null},"readable":true,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":true,"needDrain":false,"ending":true,"ended":true,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":false,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"bufferedRequest":null,"lastBufferedRequest":null,"pendingcb":1,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"bufferedRequestCount":0,"corkedRequestsFree":{"next":{"next":null,"entry":null},"entry":null}},"writable":false,"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","_server":null,"ssl":{"_parent":{"reading":true,"onconnection":null},"reading":true},"_requestCert":true,"_rejectUnauthorized":true,"parser":null},"_header":"POST /ARIShopService-WS/services/ARIShopService HTTP/1.1\r\nAccept: application/json, text/plain, */*\r\nContent-Type: application/xml\r\nSOAPAction: http://www.opentravel.org/OTA/2003/05/getOTAHotelAvailability\r\nUser-Agent: axios/0.19.2\r\nContent-Length: 2072\r\nHost: searchnbook.ratetiger.com\r\nConnection: close\r\n\r\n","agent":{"_events":{},"_eventsCount":2,"defaultPort":443,"protocol":"https:","options":{"path":null},"requests":{},"sockets":{"searchnbook.ratetiger.com:443::::::::::::::::::":[null]},"freeSockets":{},"keepAliveMsecs":1000,"keepAlive":false,"maxSockets":null,"maxFreeSockets":256,"maxCachedSessions":100,"_sessionCache":{"map":{"searchnbook.ratetiger.com:443::::::::::::::::::":{"type":"Buffer","data":[48,130,7,46,2,1,1,2,2,3,3,4,2,0,53,4,32,44,67,30,37,135,44,191,79,68,244,40,30,241,21,158,254,185,247,72,203,29,168,159,235,165,110,242,207,128,225,131,3,4,48,42,12,219,141,105,232,76,54,114,137,88,58,116,174,245,0,234,173,84,43,118,17,93,116,37,178,31,183,21,180,79,30,109,168,15,62,192,226,57,214,34,205,212,32,188,142,249,41,161,6,2,4,95,21,188,128,162,4,2,2,28,32,163,130,6,185,48,130,6,181,48,130,5,157,160,3,2,1,2,2,9,0,203,191,32,95,94,152,84,13,48,13,6,9,42,134,72,134,247,13,1,1,11,5,0,48,129,180,49,11,48,9,6,3,85,4,6,19,2,85,83,49,16,48,14,6,3,85,4,8,19,7,65,114,105,122,111,110,97,49,19,48,17,6,3,85,4,7,19,10,83,99,111,116,116,115,100,97,108,101,49,26,48,24,6,3,85,4,10,19,17,71,111,68,97,100,100,121,46,99,111,109,44,32,73,110,99,46,49,45,48,43,6,3,85,4,11,19,36,104,116,116,112,58,47,47,99,101,114,116,115,46,103,111,100,97,100,100,121,46,99,111,109,47,114,101,112,111,115,105,116,111,114,121,47,49,51,48,49,6,3,85,4,3,19,42,71,111,32,68,97,100,100,121,32,83,101,99,117,114,101,32,67,101,114,116,105,102,105,99,97,116,101,32,65,117,116,104,111,114,105,116,121,32,45,32,71,50,48,30,23,13,49,57,48,57,51,48,49,53,50,54,50,54,90,23,13,50,49,49,49,50,57,49,53,52,49,52,53,90,48,61,49,33,48,31,6,3,85,4,11,19,24,68,111,109,97,105,110,32,67,111,110,116,114,111,108,32,86,97,108,105,100,97,116,101,100,49,24,48,22,6,3,85,4,3,12,15,42,46,114,97,116,101,116,105,103,101,114,46,99,111,109,48,130,1,34,48,13,6,9,42,134,72,134,247,13,1,1,1,5,0,3,130,1,15,0,48,130,1,10,2,130,1,1,0,158,43,66,72,119,57,129,125,216,81,25,51,139,222,236,78,189,212,40,75,96,79,90,106,228,97,79,102,231,130,131,53,70,80,155,225,70,171,198,213,179,177,123,62,32,176,131,34,28,153,18,81,203,63,65,114,167,250,157,212,95,215,84,127,137,207,75,179,159,166,152,230,75,76,127,78,103,165,37,235,35,180,85,155,149,97,41,206,205,192,39,249,143,127,154,76,81,21,134,221,249,77,250,191,72,215,191,97,45,13,125,158,87,129,176,141,63,182,226,109,37,72,27,137,97,162,76,82,182,248,36,156,213,108,2,108,160,92,1,196,214,157,61,69,216,7,140,80,223,172,196,251,135,199,253,125,192,227,21,65,99,54,141,33,204,46,34,158,66,181,214,127,54,232,55,140,94,0,185,12,122,148,137,159,126,83,80,38,236,186,101,86,14,53,89,16,53,140,9,115,132,183,68,74,50,146,142,158,79,30,35,30,88,128,139,178,94,255,181,95,249,99,142,110,156,164,10,255,112,210,206,222,104,218,116,249,108,188,230,115,190,212,210,126,109,15,58,196,53,5,29,23,52,122,202,223,2,3,1,0,1,163,130,3,62,48,130,3,58,48,12,6,3,85,29,19,1,1,255,4,2,48,0,48,29,6,3,85,29,37,4,22,48,20,6,8,43,6,1,5,5,7,3,1,6,8,43,6,1,5,5,7,3,2,48,14,6,3,85,29,15,1,1,255,4,4,3,2,5,160,48,56,6,3,85,29,31,4,49,48,47,48,45,160,43,160,41,134,39,104,116,116,112,58,47,47,99,114,108,46,103,111,100,97,100,100,121,46,99,111,109,47,103,100,105,103,50,115,49,45,49,52,49,57,46,99,114,108,48,93,6,3,85,29,32,4,86,48,84,48,72,6,11,96,134,72,1,134,253,109,1,7,23,1,48,57,48,55,6,8,43,6,1,5,5,7,2,1,22,43,104,116,116,112,58,47,47,99,101,114,116,105,102,105,99,97,116,101,115,46,103,111,100,97,100,100,121,46,99,111,109,47,114,101,112,111,115,105,116,111,114,121,47,48,8,6,6,103,129,12,1,2,1,48,118,6,8,43,6,1,5,5,7,1,1,4,106,48,104,48,36,6,8,43,6,1,5,5,7,48,1,134,24,104,116,116,112,58,47,47,111,99,115,112,46,103,111,100,97,100,100,121,46,99,111,109,47,48,64,6,8,43,6,1,5,5,7,48,2,134,52,104,116,116,112,58,47,47,99,101,114,116,105,102,105,99,97,116,101,115,46,103,111,100,97,100,100,121,46,99,111,109,47,114,101,112,111,115,105,116,111,114,121,47,103,100,105,103,50,46,99,114,116,48,31,6,3,85,29,35,4,24,48,22,128,20,64,194,189,39,142,204,52,131,48,162,51,215,251,108,179,240,180,44,128,206,48,41,6,3,85,29,17,4,34,48,32,130,15,42,46,114,97,116,101,116,105,103,101,114,46,99,111,109,130,13,114,97,116,101,116,105,103,101,114,46,99,111,109,48,29,6,3,85,29,14,4,22,4,20,121,112,98,24,17,75,233,154,236,116,61,35,155,251,196,81,225,158,167,18,48,130,1,125,6,10,43,6,1,4,1,214,121,2,4,2,4,130,1,109,4,130,1,105,1,103,0,118,0,164,185,9,144,180,24,88,20,135,187,19,162,204,103,112,10,60,53,152,4,249,27,223,184,227,119,205,14,200,13,220,16,0,0,1,109,130,199,181,130,0,0,4,3,0,71,48,69,2,32,89,204,102,74,53,45,62,177,199,59,91,112,173,122,221,144,114,181,95,175,218,213,196,83,195,103,139,192,131,227,200,169,2,33,0,130,205,146,91,153,109,29,125,159,169,157,197,165,110,9,90,103,157,106,209,179,155,245,226,210,204,156,253,97,161,58,60,0,117,0,238,75,189,183,117,206,96,186,225,66,105,31,171,225,158,102,163,15,126,95,176,114,216,131,0,196,123,137,122,168,253,203,0,0,1,109,130,199,187,95,0,0,4,3,0,70,48,68,2,32,90,220,95,33,72,191,139,123,119,176,213,144,48,65,36,3,243,179,198,217,183,237,40,99,130,226,97,108,88,57,213,160,2,32,17,193,21,11,209,233,123,57,209,236,114,195,114,176,17,144,222,9,100,91,128,48,69,66,195,120,185,197,86,240,127,54,0,118,0,68,148,101,46,176,238,206,175,196,64,7,216,168,254,40,192,218,230,130,190,216,203,49,181,63,211,51,150,181,182,129,168,0,0,1,109,130,199,192,123,0,0,4,3,0,71,48,69,2,33,0,132,52,64,128,231,50,138,201,198,243,212,233,136,85,11,151,206,189,32,187,13,135,10,51,254,124,168,51,63,200,229,114,2,32,116,151,114,76,229,203,217,229,152,254,22,126,19,105,135,231,127,76,165,18,174,137,229,212,59,147,127,206,156,67,63,64,48,13,6,9,42,134,72,134,247,13,1,1,11,5,0,3,130,1,1,0,126,127,80,158,215,167,248,118,38,9,176,134,50,96,30,42,221,50,112,95,141,238,55,200,72,61,92,157,55,185,190,223,103,94,214,67,131,176,109,119,49,223,69,132,182,40,191,245,223,81,218,138,222,143,70,156,171,43,58,123,68,39,237,237,197,218,240,144,16,2,57,127,199,8,239,44,207,217,188,37,84,208,250,143,84,173,52,155,33,198,254,56,241,182,111,1,180,170,24,41,247,140,81,70,147,13,42,134,130,159,197,226,119,243,127,220,19,191,180,253,126,232,185,34,54,214,75,34,172,138,123,157,128,13,159,250,13,184,159,143,39,216,58,116,151,222,117,118,237,177,78,162,124,24,149,22,160,80,93,70,201,158,238,15,234,91,240,134,185,87,120,89,222,138,43,93,142,27,204,243,60,238,224,117,207,193,244,19,47,189,73,164,94,218,152,135,144,80,4,26,233,14,8,247,143,91,6,137,175,87,119,151,146,116,208,95,138,89,123,215,28,39,149,24,132,126,242,222,229,42,77,232,219,108,88,9,82,157,63,50,179,44,146,62,28,144,4,230,226,142,111,83,175,151,38,6,164,2,4,0]}},"list":["searchnbook.ratetiger.com:443::::::::::::::::::"]}},"method":"POST","path":"/ARIShopService-WS/services/ARIShopService","_ended":true,"res":{"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":null,"pipesCount":0,"flowing":true,"ended":true,"endEmitted":true,"reading":false,"sync":true,"needReadable":false,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"emitClose":true,"autoDestroy":false,"destroyed":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":true,"decoder":null,"encoding":null},"readable":false,"_events":{"end":[null,null]},"_eventsCount":3,"httpVersionMajor":1,"httpVersionMinor":1,"httpVersion":"1.1","complete":true,"rawHeaders":["X-Frame-Options","SAMEORIGIN","X-Content-Type-Options","nosniff","X-XSS-Protection","1; mode=block","Content-Type","text/xml;charset=ISO-8859-1","Content-Length","388","Date","Mon, 20 Jul 2020 15:35:32 GMT","Server","","Strict-Transport-Security","max-age=31536000","X-Content-Type-Options","nosniff","X-Frame-Options","DENY","Strict-Transport-Security","max-age=31536000; includeSubDomains"],"trailers":{},"rawTrailers":[],"aborted":false,"upgrade":false,"url":"","method":null,"statusCode":200,"statusMessage":"","_consuming":false,"_dumped":false,"responseUrl":"https://searchnbook.ratetiger.com/ARIShopService-WS/services/ARIShopService","redirects":[]},"aborted":false,"timeoutCb":null,"upgradeOrConnect":false,"parser":null,"maxHeadersCount":null,"reusedSocket":false,"_redirectable":{"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":true,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":true,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"bufferedRequest":null,"lastBufferedRequest":null,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":true,"autoDestroy":false,"bufferedRequestCount":0,"corkedRequestsFree":{"next":null,"entry":null}},"writable":true,"_events":{},"_eventsCount":2,"_options":{"protocol":"https:","maxRedirects":21,"maxBodyLength":10485760,"path":"/ARIShopService-WS/services/ARIShopService","method":"POST","agents":{},"hostname":"searchnbook.ratetiger.com","port":null,"nativeProtocols":{"http:":{"METHODS":["ACL","BIND","CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LINK","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCALENDAR","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REBIND","REPORT","SEARCH","SOURCE","SUBSCRIBE","TRACE","UNBIND","UNLINK","UNLOCK","UNSUBSCRIBE"],"STATUS_CODES":{"100":"Continue","101":"Switching Protocols","102":"Processing","103":"Early Hints","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I'm a Teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Unordered Collection","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"},"maxHeaderSize":8192,"globalAgent":{"_events":{},"_eventsCount":2,"defaultPort":80,"protocol":"http:","options":{"path":null},"requests":{},"sockets":{"127.0.0.1:40187:":[{"connecting":false,"_hadError":false,"_parent":null,"_host":null,"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":null,"pipesCount":0,"flowing":true,"ended":false,"endEmitted":false,"reading":true,"sync":false,"needReadable":true,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null},"readable":true,"_events":{"end":[null,null],"close":[null,null]},"_eventsCount":8,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":false,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"bufferedRequest":null,"lastBufferedRequest":null,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"bufferedRequestCount":0,"corkedRequestsFree":{"next":{"next":null,"entry":null},"entry":null}},"writable":true,"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null,"parser":{"4":null,"_headers":[],"_url":"","incoming":null,"outgoing":{"_events":{},"_eventsCount":2,"outputData":[],"outputSize":0,"writable":true,"_last":true,"chunkedEncoding":false,"shouldKeepAlive":false,"useChunkedEncodingByDefault":true,"sendDate":false,"_removedConnection":false,"_removedContLen":false,"_removedTE":false,"_contentLength":null,"_hasBody":true,"_trailer":"","finished":true,"_headerSent":true,"_header":"POST /api/v1/offers/search HTTP/1.1\r\nhost: localhost:33265\r\nx-forwarded-host: localhost:3000\r\nx-forwarded-proto: http\r\nx-forwarded-port: 3000\r\nx-forwarded-for: ::1\r\naccept-language: ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7\r\naccept-encoding: gzip, deflate, br\r\nreferer: http://localhost:3000/api/docs/\r\nsec-fetch-dest: empty\r\nsec-fetch-mode: cors\r\nsec-fetch-site: same-origin\r\norigin: http://localhost:3000\r\ncontent-type: application/json\r\nuser-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36\r\nauthorization: Bearer eyJhbGciOiJFUzI1NksiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJkaWQ6b3JnaWQ6MHhkMjhlZDY2MWE4NjE5MzAxZWQ2Y2I3MDQ4MTQyYzFhMzU2YzY2MmJiOTZiYTlkMWMwYjRjODhmMTM1MzYzZDI2I3Rlc3QiLCJhdWQiOiJkaWQ6b3JnaWQ6MHg5NGJmNWE1N2I4NTBhMzViNGQxZDdiNTlmNjYzY2UzYThhNzZmZDk5MjhlZjIwNjdjYzc3MmZjOTdmYjBhZDc1IiwiZXhwIjoxNjMxMjQ1MzM2LCJzY29wZSI6IiJ9.sJZvp86tchjrWTWCJXtNS1g8gi7UY9TDvXPhE5-R8OGCyVNj71chQvTtsIOB89OisqvivxIbqp5lrScNYQV_EQ\r\ndnt: 1\r\naccept: application/json\r\ncontent-length: 229\r\nconnection: close\r\nx-now-bridge-request-id: 1\r\n\r\n","method":"POST","path":"/api/v1/offers/search","_ended":false,"res":null,"aborted":false,"timeoutCb":null,"upgradeOrConnect":false,"maxHeadersCount":null,"reusedSocket":false},"maxHeaderPairs":2000,"_consumed":false}}]},"freeSockets":{},"keepAliveMsecs":1000,"keepAlive":false,"maxSockets":null,"maxFreeSockets":256}},"https:":{}},"pathname":"/ARIShopService-WS/services/ARIShopService"},"_redirectCount":0,"_requestBodyLength":2072,"_requestBodyBuffers":[],"_currentUrl":"https://searchnbook.ratetiger.com/ARIShopService-WS/services/ARIShopService"}},"data":""} \ No newline at end of file diff --git a/test/mocks/erevmaxOrder.json b/test/mocks/erevmaxOrder.json new file mode 100644 index 00000000..0da1a0f5 --- /dev/null +++ b/test/mocks/erevmaxOrder.json @@ -0,0 +1 @@ +{"status":200,"statusText":"OK","headers":{"content-type":"text/xml;charset=UTF-8","connection":"close","content-length":"1045","date":"Mon, 20 Jul 2020 18:43:48 GMT","x-vercel-cache":"MISS","server":"Vercel","x-vercel-id":"cdg1::sfo1::fl6z9-1595270628903-4afa47b63b40","strict-transport-security":"max-age=63072000; includeSubDomains; preload","cache-control":"s-maxage=0"},"config":{"url":"https://ota-simulator.now.sh/api?ota=getOTAHotelReservation","method":"post","data":" 598281b4-5df1-476f-85b6-411768af6a9a 598281b4-5df1-476f-85b6-411768af6a9a OTA_HotelResNotifRQ http://www.w3.org/2005/08/addressing/anonymous https://glider.travel https://res-listener3.ratetiger.com/ReservationListener/HTNGGenericListenerService https://glider.travel Windingtree WT@RT985 2020-01-28T01:01:48.9445401-05:00 Windingtree Credit Card Guarantee Booked via Winding Tree MRBobMarleycontact@org.co.uk
","headers":{"Accept":"*/*","Content-Type":"text/xml;charset=UTF-8","Accept-Encoding":"gzip, deflate, br","SOAPAction":"http://www.opentravel.org/OTA/2003/05/getOTAHotelAvailability","User-Agent":"axios/0.19.2","Content-Length":4538},"transformRequest":[null],"transformResponse":[null],"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1},"request":{"_events":{},"_eventsCount":6,"outputData":[],"outputSize":0,"writable":true,"_last":true,"chunkedEncoding":false,"shouldKeepAlive":false,"useChunkedEncodingByDefault":true,"sendDate":false,"_removedConnection":false,"_removedContLen":false,"_removedTE":false,"_contentLength":null,"_hasBody":true,"_trailer":"","finished":true,"_headerSent":true,"socket":{"_tlsOptions":{"pipe":false,"secureContext":{"context":{},"singleUse":true},"isServer":false,"requestCert":true,"rejectUnauthorized":true},"_secureEstablished":true,"_securePending":false,"_newSessionPending":false,"_controlReleased":true,"secureConnecting":true,"_SNICallback":null,"servername":"ota-simulator.now.sh","alpnProtocol":false,"authorized":true,"authorizationError":null,"encrypted":true,"_events":{"close":[null,null,null,null]},"_eventsCount":10,"connecting":false,"_hadError":false,"_parent":null,"_host":"ota-simulator.now.sh","_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":null,"pipesCount":0,"flowing":true,"ended":false,"endEmitted":false,"reading":true,"sync":false,"needReadable":true,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null},"readable":true,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":true,"needDrain":false,"ending":true,"ended":true,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":false,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"bufferedRequest":null,"lastBufferedRequest":null,"pendingcb":1,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"bufferedRequestCount":0,"corkedRequestsFree":{"next":{"next":null,"entry":null},"entry":null}},"writable":false,"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","_server":null,"ssl":{"_parent":{"reading":true,"onconnection":null},"reading":true},"_requestCert":true,"_rejectUnauthorized":true,"parser":null},"_header":"POST /api?ota=getOTAHotelReservation HTTP/1.1\r\nAccept: */*\r\nContent-Type: text/xml;charset=UTF-8\r\nAccept-Encoding: gzip, deflate, br\r\nSOAPAction: http://www.opentravel.org/OTA/2003/05/getOTAHotelAvailability\r\nUser-Agent: axios/0.19.2\r\nContent-Length: 4538\r\nHost: ota-simulator.now.sh\r\nConnection: close\r\n\r\n","agent":{"_events":{},"_eventsCount":2,"defaultPort":443,"protocol":"https:","options":{"path":null},"requests":{},"sockets":{"ota-simulator.now.sh:443::::::::::::::::::":[null]},"freeSockets":{},"keepAliveMsecs":1000,"keepAlive":false,"maxSockets":null,"maxFreeSockets":256,"maxCachedSessions":100,"_sessionCache":{"map":{"staging.api.simard.io:443::::::::::::::::::":{"type":"Buffer","data":[48,130,6,205,2,1,1,2,2,3,4,4,2,19,2,4,32,68,174,217,134,234,179,146,69,173,154,62,242,246,90,151,100,71,201,79,223,204,115,54,71,28,22,4,89,102,118,37,121,4,48,206,146,204,73,163,29,133,88,219,9,250,209,53,180,2,191,148,104,123,182,120,35,235,90,163,137,109,175,93,183,56,37,119,12,36,4,29,159,157,138,219,198,12,148,173,186,192,104,161,6,2,4,95,21,229,225,162,4,2,2,28,32,163,130,5,100,48,130,5,96,48,130,4,72,160,3,2,1,2,2,18,3,204,180,172,46,149,165,162,92,214,79,202,4,67,51,71,88,169,48,13,6,9,42,134,72,134,247,13,1,1,11,5,0,48,74,49,11,48,9,6,3,85,4,6,19,2,85,83,49,22,48,20,6,3,85,4,10,19,13,76,101,116,39,115,32,69,110,99,114,121,112,116,49,35,48,33,6,3,85,4,3,19,26,76,101,116,39,115,32,69,110,99,114,121,112,116,32,65,117,116,104,111,114,105,116,121,32,88,51,48,30,23,13,50,48,48,55,48,57,48,56,48,49,51,50,90,23,13,50,48,49,48,48,55,48,56,48,49,51,50,90,48,32,49,30,48,28,6,3,85,4,3,19,21,115,116,97,103,105,110,103,46,97,112,105,46,115,105,109,97,114,100,46,105,111,48,130,1,34,48,13,6,9,42,134,72,134,247,13,1,1,1,5,0,3,130,1,15,0,48,130,1,10,2,130,1,1,0,187,136,244,100,180,194,4,178,152,113,234,208,220,116,193,31,218,61,102,183,122,84,186,134,22,89,7,159,109,152,169,27,129,122,82,67,168,119,121,56,234,141,139,248,180,90,35,240,138,175,182,191,223,53,85,239,151,149,216,100,176,255,243,75,132,158,111,76,219,48,79,82,228,106,235,36,227,136,89,232,180,147,44,139,202,185,93,8,88,54,246,230,124,183,147,118,44,121,115,241,78,191,24,144,253,248,65,208,32,199,162,217,173,154,48,118,122,89,168,219,25,96,248,122,52,156,252,23,133,22,148,169,250,217,186,67,222,77,1,81,148,240,144,111,155,236,164,240,197,186,216,175,145,107,14,143,29,226,150,174,181,51,16,33,78,114,135,105,83,183,45,179,155,96,219,83,62,247,194,205,201,72,211,35,235,212,77,157,182,76,92,101,202,169,55,151,135,149,227,130,173,92,34,143,91,92,159,53,35,189,213,167,186,229,208,27,239,34,69,229,169,110,231,182,141,63,62,236,201,182,203,71,105,89,49,186,9,240,100,113,54,29,0,84,52,44,162,75,214,193,253,86,87,190,30,203,2,3,1,0,1,163,130,2,104,48,130,2,100,48,14,6,3,85,29,15,1,1,255,4,4,3,2,5,160,48,29,6,3,85,29,37,4,22,48,20,6,8,43,6,1,5,5,7,3,1,6,8,43,6,1,5,5,7,3,2,48,12,6,3,85,29,19,1,1,255,4,2,48,0,48,29,6,3,85,29,14,4,22,4,20,104,247,206,24,85,71,20,13,217,73,134,114,195,171,27,71,117,148,37,226,48,31,6,3,85,29,35,4,24,48,22,128,20,168,74,106,99,4,125,221,186,230,209,57,183,166,69,101,239,243,168,236,161,48,111,6,8,43,6,1,5,5,7,1,1,4,99,48,97,48,46,6,8,43,6,1,5,5,7,48,1,134,34,104,116,116,112,58,47,47,111,99,115,112,46,105,110,116,45,120,51,46,108,101,116,115,101,110,99,114,121,112,116,46,111,114,103,48,47,6,8,43,6,1,5,5,7,48,2,134,35,104,116,116,112,58,47,47,99,101,114,116,46,105,110,116,45,120,51,46,108,101,116,115,101,110,99,114,121,112,116,46,111,114,103,47,48,32,6,3,85,29,17,4,25,48,23,130,21,115,116,97,103,105,110,103,46,97,112,105,46,115,105,109,97,114,100,46,105,111,48,76,6,3,85,29,32,4,69,48,67,48,8,6,6,103,129,12,1,2,1,48,55,6,11,43,6,1,4,1,130,223,19,1,1,1,48,40,48,38,6,8,43,6,1,5,5,7,2,1,22,26,104,116,116,112,58,47,47,99,112,115,46,108,101,116,115,101,110,99,114,121,112,116,46,111,114,103,48,130,1,2,6,10,43,6,1,4,1,214,121,2,4,2,4,129,243,4,129,240,0,238,0,117,0,178,30,5,204,139,162,205,138,32,78,135,102,249,43,185,138,37,32,103,107,218,250,112,231,178,73,83,45,239,139,144,94,0,0,1,115,50,206,253,86,0,0,4,3,0,70,48,68,2,32,10,35,123,136,14,223,213,17,67,68,218,75,252,138,39,108,154,210,2,121,91,137,87,136,62,21,76,90,1,5,240,121,2,32,114,207,40,166,60,209,88,148,197,7,15,94,247,158,96,48,248,28,188,2,78,74,0,87,206,3,246,106,214,26,40,13,0,117,0,111,83,118,172,49,240,49,25,216,153,0,164,81,21,255,119,21,28,17,217,2,193,0,41,6,141,178,8,154,55,217,19,0,0,1,115,50,206,253,179,0,0,4,3,0,70,48,68,2,32,80,189,28,183,141,0,116,223,91,243,77,249,12,114,251,171,214,107,29,69,200,181,251,19,213,27,162,213,122,250,74,161,2,32,65,91,160,100,77,255,115,168,106,209,139,207,142,235,207,161,75,180,234,136,58,183,44,22,232,6,11,163,64,143,131,147,48,13,6,9,42,134,72,134,247,13,1,1,11,5,0,3,130,1,1,0,1,238,147,120,239,187,98,107,136,1,250,102,158,185,43,169,207,133,26,134,194,77,31,201,150,185,209,235,238,246,179,229,16,227,213,121,85,65,164,57,233,163,157,97,171,242,134,163,113,30,69,164,140,245,134,105,67,164,64,145,11,246,72,18,226,34,182,105,242,88,145,130,135,204,218,44,207,224,201,70,130,226,27,246,110,25,140,77,179,78,201,114,252,249,41,191,97,215,27,77,118,141,207,13,103,90,52,178,158,236,165,154,22,98,26,163,210,140,69,123,117,202,22,212,102,102,98,4,248,249,127,212,80,183,136,180,98,11,95,5,47,89,81,40,92,198,105,71,139,55,162,128,89,89,242,29,176,54,232,129,209,129,88,173,182,59,82,152,32,182,209,229,95,60,173,48,22,139,72,191,6,190,170,181,121,125,78,40,221,240,10,240,171,134,127,232,192,74,150,168,75,48,24,64,51,148,96,108,1,156,0,175,76,204,100,138,127,214,173,112,222,46,9,145,120,133,100,139,145,145,139,62,204,239,204,232,13,58,242,26,245,102,79,141,237,100,173,3,10,224,232,153,133,67,77,230,164,2,4,0,169,4,2,2,11,184,170,129,227,4,129,224,173,240,14,223,77,42,71,1,191,204,245,3,19,156,251,168,145,18,97,5,74,91,83,53,166,95,1,16,155,248,201,133,237,50,116,249,158,50,110,61,163,10,213,152,189,62,16,89,200,18,236,198,233,215,64,61,172,2,156,213,188,185,239,95,56,66,0,133,153,176,191,203,120,204,139,230,197,237,9,50,196,218,80,36,79,9,106,23,228,245,76,8,134,228,127,64,229,150,248,108,7,69,183,144,120,16,246,55,15,104,24,185,144,138,59,1,16,87,163,97,231,57,253,137,242,36,137,134,162,22,52,10,195,204,46,98,48,31,240,26,129,64,36,147,171,108,53,145,195,55,246,214,110,15,136,67,55,188,211,212,138,185,134,249,4,148,204,11,198,105,222,170,176,142,56,70,163,217,94,219,212,210,154,84,167,146,163,93,198,35,154,102,30,224,194,211,200,74,197,70,52,242,155,110,240,22,188,253,101,217,40,128,208,50,6,49,195,92,132,167,54,104,217,2,174,6,2,4,126,229,38,97]},"ota-simulator.now.sh:443::::::::::::::::::":{"type":"Buffer","data":[48,130,6,229,2,1,1,2,2,3,4,4,2,19,2,4,32,192,41,149,239,65,195,224,178,233,205,101,254,41,64,14,96,101,73,223,45,99,33,29,236,48,125,196,109,86,124,69,253,4,48,177,60,211,124,119,158,171,115,131,24,244,232,79,209,71,229,228,146,148,90,204,84,244,25,192,218,1,45,175,4,34,143,102,200,74,8,171,248,30,39,42,0,64,24,30,7,238,89,161,6,2,4,95,21,229,228,162,4,2,2,28,32,163,130,5,84,48,130,5,80,48,130,4,56,160,3,2,1,2,2,18,4,206,21,118,160,84,101,97,249,11,221,231,187,153,112,160,92,36,48,13,6,9,42,134,72,134,247,13,1,1,11,5,0,48,74,49,11,48,9,6,3,85,4,6,19,2,85,83,49,22,48,20,6,3,85,4,10,19,13,76,101,116,39,115,32,69,110,99,114,121,112,116,49,35,48,33,6,3,85,4,3,19,26,76,101,116,39,115,32,69,110,99,114,121,112,116,32,65,117,116,104,111,114,105,116,121,32,88,51,48,30,23,13,50,48,48,54,48,52,50,51,53,56,49,52,90,23,13,50,48,48,57,48,50,50,51,53,56,49,52,90,48,19,49,17,48,15,6,3,85,4,3,12,8,42,46,110,111,119,46,115,104,48,130,1,34,48,13,6,9,42,134,72,134,247,13,1,1,1,5,0,3,130,1,15,0,48,130,1,10,2,130,1,1,0,239,90,74,48,119,60,52,89,56,58,188,73,195,46,193,247,11,42,206,249,226,147,23,224,57,40,193,177,253,104,144,75,22,66,168,102,137,19,49,96,98,213,131,18,169,255,194,20,12,160,65,29,214,104,237,63,44,0,10,88,150,197,126,122,123,247,29,19,58,162,41,174,5,162,137,197,254,27,243,1,56,130,99,130,80,5,183,13,76,247,125,74,193,18,219,251,98,250,64,41,7,77,110,144,112,7,8,30,197,50,186,203,72,0,160,12,16,55,157,238,5,218,238,56,216,193,20,75,138,58,168,230,147,212,217,237,39,146,217,201,229,95,146,144,99,248,176,202,237,67,86,94,49,79,205,84,138,225,1,75,90,168,130,123,226,240,189,112,246,49,9,225,243,143,92,180,27,102,100,26,16,161,94,110,4,49,32,57,180,151,16,195,117,230,83,88,27,101,188,237,29,252,82,24,75,246,127,234,249,51,3,156,210,175,88,30,152,55,224,15,93,113,46,2,32,127,155,129,197,140,145,2,209,190,124,208,43,30,113,186,120,85,194,23,113,225,144,131,202,152,95,179,136,135,247,125,2,3,1,0,1,163,130,2,101,48,130,2,97,48,14,6,3,85,29,15,1,1,255,4,4,3,2,5,160,48,29,6,3,85,29,37,4,22,48,20,6,8,43,6,1,5,5,7,3,1,6,8,43,6,1,5,5,7,3,2,48,12,6,3,85,29,19,1,1,255,4,2,48,0,48,29,6,3,85,29,14,4,22,4,20,148,158,100,24,91,144,105,85,19,184,61,225,57,92,67,82,185,171,18,7,48,31,6,3,85,29,35,4,24,48,22,128,20,168,74,106,99,4,125,221,186,230,209,57,183,166,69,101,239,243,168,236,161,48,111,6,8,43,6,1,5,5,7,1,1,4,99,48,97,48,46,6,8,43,6,1,5,5,7,48,1,134,34,104,116,116,112,58,47,47,111,99,115,112,46,105,110,116,45,120,51,46,108,101,116,115,101,110,99,114,121,112,116,46,111,114,103,48,47,6,8,43,6,1,5,5,7,48,2,134,35,104,116,116,112,58,47,47,99,101,114,116,46,105,110,116,45,120,51,46,108,101,116,115,101,110,99,114,121,112,116,46,111,114,103,47,48,27,6,3,85,29,17,4,20,48,18,130,8,42,46,110,111,119,46,115,104,130,6,110,111,119,46,115,104,48,76,6,3,85,29,32,4,69,48,67,48,8,6,6,103,129,12,1,2,1,48,55,6,11,43,6,1,4,1,130,223,19,1,1,1,48,40,48,38,6,8,43,6,1,5,5,7,2,1,22,26,104,116,116,112,58,47,47,99,112,115,46,108,101,116,115,101,110,99,114,121,112,116,46,111,114,103,48,130,1,4,6,10,43,6,1,4,1,214,121,2,4,2,4,129,245,4,129,242,0,240,0,118,0,231,18,242,176,55,126,26,98,251,142,201,12,97,132,241,234,123,55,203,86,29,17,38,91,243,224,243,75,242,65,84,110,0,0,1,114,129,252,75,29,0,0,4,3,0,71,48,69,2,32,65,14,160,14,81,107,95,231,5,68,118,31,93,57,217,189,134,174,245,172,134,131,254,24,24,28,51,166,68,106,124,30,2,33,0,191,37,222,185,129,46,221,162,7,241,124,135,151,69,133,245,247,130,57,168,54,105,128,90,38,74,36,160,1,59,40,189,0,118,0,178,30,5,204,139,162,205,138,32,78,135,102,249,43,185,138,37,32,103,107,218,250,112,231,178,73,83,45,239,139,144,94,0,0,1,114,129,252,75,20,0,0,4,3,0,71,48,69,2,33,0,169,193,253,81,34,243,120,235,185,213,139,74,204,171,140,126,218,30,160,108,216,174,168,220,90,191,156,44,24,18,220,196,2,32,111,86,245,138,214,252,156,82,13,216,65,33,253,173,179,52,104,146,241,224,224,135,189,196,165,248,82,26,98,68,241,176,48,13,6,9,42,134,72,134,247,13,1,1,11,5,0,3,130,1,1,0,26,130,151,29,92,51,8,156,90,62,126,64,178,226,147,101,125,177,211,44,37,76,180,75,228,167,43,156,153,18,96,132,212,49,151,58,252,189,103,23,157,170,162,58,10,182,8,250,40,199,123,150,92,115,143,192,222,61,30,69,57,52,148,228,42,66,38,110,251,8,180,163,88,79,224,249,231,229,132,31,97,56,249,134,47,109,169,141,212,182,66,140,247,133,41,102,241,79,69,88,28,104,63,5,50,68,141,110,236,182,93,95,232,194,21,176,162,153,188,121,59,178,234,16,221,110,171,106,38,7,229,181,87,96,210,219,253,197,112,42,105,28,80,243,112,82,8,31,162,214,19,50,200,132,169,249,56,147,211,51,38,238,90,142,201,31,213,230,5,89,73,115,62,121,3,201,12,195,72,29,225,149,165,218,244,44,177,41,78,95,86,95,169,162,101,114,233,209,150,21,227,208,21,165,235,166,132,252,159,87,153,170,6,246,31,119,230,241,190,212,101,36,201,141,207,95,72,149,191,206,58,177,105,66,142,8,250,141,201,44,70,181,108,107,207,174,136,124,67,139,115,166,216,208,88,168,164,2,4,0,166,22,4,20,111,116,97,45,115,105,109,117,108,97,116,111,114,46,110,111,119,46,115,104,169,4,2,2,11,184,170,129,243,4,129,240,173,240,14,223,77,42,71,1,191,204,245,3,19,156,251,168,71,91,122,101,179,217,159,163,53,172,155,186,19,190,37,249,48,207,173,162,239,224,46,249,207,188,222,52,77,129,25,253,99,27,202,30,51,204,73,19,158,128,31,39,63,103,107,102,102,175,70,191,121,106,143,129,29,239,122,248,61,64,172,44,43,36,72,86,104,101,236,70,108,172,138,167,170,190,93,192,112,207,2,106,188,121,121,147,130,208,122,241,27,11,167,235,6,129,170,3,236,4,22,14,173,236,196,15,184,55,249,178,16,233,212,170,176,9,133,34,162,164,144,81,254,244,122,79,147,174,105,28,32,210,144,11,77,31,35,233,48,233,227,28,31,32,139,68,116,55,85,96,148,4,76,244,58,197,71,129,112,152,144,6,40,27,116,238,116,227,175,167,25,207,139,26,212,253,149,154,175,52,63,16,233,65,227,193,205,142,79,197,143,80,105,230,9,16,129,216,240,208,128,208,198,62,34,243,225,34,208,77,171,131,2,179,203,24,218,220,58,105,130,105,174,6,2,4,65,210,102,219]}},"list":["staging.api.simard.io:443::::::::::::::::::","ota-simulator.now.sh:443::::::::::::::::::"]}},"method":"POST","path":"/api?ota=getOTAHotelReservation","_ended":true,"res":{"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":null,"pipesCount":0,"flowing":true,"ended":true,"endEmitted":true,"reading":false,"sync":true,"needReadable":false,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"emitClose":true,"autoDestroy":false,"destroyed":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":true,"decoder":null,"encoding":null},"readable":false,"_events":{"end":[null,null]},"_eventsCount":3,"httpVersionMajor":1,"httpVersionMinor":1,"httpVersion":"1.1","complete":true,"rawHeaders":["Content-Type","text/xml;charset=UTF-8","Connection","close","content-length","1045","date","Mon, 20 Jul 2020 18:43:48 GMT","x-vercel-cache","MISS","server","Vercel","x-vercel-id","cdg1::sfo1::fl6z9-1595270628903-4afa47b63b40","strict-transport-security","max-age=63072000; includeSubDomains; preload","cache-control","s-maxage=0"],"trailers":{},"rawTrailers":[],"aborted":false,"upgrade":false,"url":"","method":null,"statusCode":200,"statusMessage":"OK","_consuming":false,"_dumped":false,"responseUrl":"https://ota-simulator.now.sh/api?ota=getOTAHotelReservation","redirects":[]},"aborted":false,"timeoutCb":null,"upgradeOrConnect":false,"parser":null,"maxHeadersCount":null,"reusedSocket":false,"_redirectable":{"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":true,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":true,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"bufferedRequest":null,"lastBufferedRequest":null,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":true,"autoDestroy":false,"bufferedRequestCount":0,"corkedRequestsFree":{"next":null,"entry":null}},"writable":true,"_events":{},"_eventsCount":2,"_options":{"protocol":"https:","maxRedirects":21,"maxBodyLength":10485760,"path":"/api?ota=getOTAHotelReservation","method":"POST","agents":{},"hostname":"ota-simulator.now.sh","port":null,"nativeProtocols":{"http:":{"METHODS":["ACL","BIND","CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LINK","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCALENDAR","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REBIND","REPORT","SEARCH","SOURCE","SUBSCRIBE","TRACE","UNBIND","UNLINK","UNLOCK","UNSUBSCRIBE"],"STATUS_CODES":{"100":"Continue","101":"Switching Protocols","102":"Processing","103":"Early Hints","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I'm a Teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Unordered Collection","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"},"maxHeaderSize":8192,"globalAgent":{"_events":{},"_eventsCount":2,"defaultPort":80,"protocol":"http:","options":{"path":null},"requests":{},"sockets":{"127.0.0.1:42085:":[{"connecting":false,"_hadError":false,"_parent":null,"_host":null,"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":null,"pipesCount":0,"flowing":true,"ended":false,"endEmitted":false,"reading":true,"sync":false,"needReadable":true,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"emitClose":false,"autoDestroy":false,"destroyed":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null},"readable":true,"_events":{"end":[null,null],"close":[null,null]},"_eventsCount":8,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":false,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"bufferedRequest":null,"lastBufferedRequest":null,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":false,"autoDestroy":false,"bufferedRequestCount":0,"corkedRequestsFree":{"next":{"next":null,"entry":null},"entry":null}},"writable":true,"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","server":null,"_server":null,"parser":{"4":null,"_headers":[],"_url":"","incoming":null,"outgoing":{"_events":{},"_eventsCount":2,"outputData":[],"outputSize":0,"writable":true,"_last":true,"chunkedEncoding":false,"shouldKeepAlive":false,"useChunkedEncodingByDefault":true,"sendDate":false,"_removedConnection":false,"_removedContLen":false,"_removedTE":false,"_contentLength":null,"_hasBody":true,"_trailer":"","finished":true,"_headerSent":true,"_header":"POST /api/v1/orders/createWithOffer HTTP/1.1\r\nhost: localhost:38131\r\nx-forwarded-host: localhost:3000\r\nx-forwarded-proto: http\r\nx-forwarded-port: 3000\r\nx-forwarded-for: ::1\r\naccept-language: ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7\r\naccept-encoding: gzip, deflate, br\r\nreferer: http://localhost:3000/api/docs/\r\nsec-fetch-dest: empty\r\nsec-fetch-mode: cors\r\nsec-fetch-site: same-origin\r\norigin: http://localhost:3000\r\ncontent-type: application/json\r\nuser-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36\r\nauthorization: Bearer eyJhbGciOiJFUzI1NksiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJkaWQ6b3JnaWQ6MHhjZjMwZGVmYWU0MjlmYjQwYjMwZTQzZTFjYmYxZmVlZmFmNjY5M2E3YTVkZDRjMzkwNzM1MTk0NmJmYWMzYTI0I3Rlc3QiLCJhdWQiOiJkaWQ6b3JnaWQ6MHg5NGJmNWE1N2I4NTBhMzViNGQxZDdiNTlmNjYzY2UzYThhNzZmZDk5MjhlZjIwNjdjYzc3MmZjOTdmYjBhZDc1IiwiZXhwIjoxNjMxMjY5NTkwLCJzY29wZSI6IiJ9.IbjiuNdk0Hq48XQxr98TxeSqWmB_EFKIyg1I1FTtiw0Y_g0-BYiSw88IpKdhMJkSdq7ZclojZTz96ygPDmGsCA\r\ndnt: 1\r\naccept: application/json\r\ncontent-length: 309\r\nconnection: close\r\nx-now-bridge-request-id: 1\r\n\r\n","method":"POST","path":"/api/v1/orders/createWithOffer","_ended":false,"res":null,"aborted":false,"timeoutCb":null,"upgradeOrConnect":false,"maxHeadersCount":null,"reusedSocket":false},"maxHeaderPairs":2000,"_consumed":false}}]},"freeSockets":{},"keepAliveMsecs":1000,"keepAlive":false,"maxSockets":null,"maxFreeSockets":256}},"https:":{}},"pathname":"/api","search":"?ota=getOTAHotelReservation"},"_redirectCount":0,"_requestBodyLength":4538,"_requestBodyBuffers":[],"_currentUrl":"https://ota-simulator.now.sh/api?ota=getOTAHotelReservation"}},"data":"\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n"} \ No newline at end of file diff --git a/test/mocks/hotels.json b/test/mocks/hotels.json new file mode 100644 index 00000000..5c71f6a5 --- /dev/null +++ b/test/mocks/hotels.json @@ -0,0 +1,15 @@ +{ + "records": [ + { + "id": "5e7cf0d4d8d8d45aeeac7890", + "provider": "EREVMAX", + "ref": "02034", + "longitude": 11.91391245, + "latitude": 57.70109464, + "currency": "SEK" + } + ], + "total": 1, + "skip": 0, + "limit": null +} \ No newline at end of file diff --git a/test/mocks/hotelsEmpty.json b/test/mocks/hotelsEmpty.json new file mode 100644 index 00000000..30348be8 --- /dev/null +++ b/test/mocks/hotelsEmpty.json @@ -0,0 +1,6 @@ +{ + "records": [], + "total": 0, + "skip": 0, + "limit": null +} \ No newline at end of file diff --git a/test/mocks/searchFlightOffers.json b/test/mocks/searchFlightOffers.json new file mode 100644 index 00000000..ff21571a --- /dev/null +++ b/test/mocks/searchFlightOffers.json @@ -0,0 +1,60 @@ +{ + "PointOfSale": { + "Location": { + "CountryCode": { + "@value": "CA" + } + }, + "TouchPoint": { + "Device": { + "Code": "0.AAA.X", + "TableName": {} + } + } + }, + "Party": { + "Participants": { + "Participant": { + "EnabledSystemParticipant": { + "@SequenceNumber": "1", + "Name": "WindingTreePOSCA", + "Category": "DC", + "SystemID": { + "@Owner": "ADS", + "@value": "mcmEL4qB" + } + } + } + } + }, + "Document": { + "@id": "OneWay", + "Name": "NDC-Exchange", + "ReferenceVersion": "UAT-OTA-2010B" + }, + "CoreQuery": { + "OriginDestinations": [ + { + "OriginDestination": { + "Departure": { + "AirportCode": "YYC", + "Date": "2020-09-14", + "Time": "03:00" + }, + "Arrival": { + "AirportCode": "YYT" + } + } + } + ] + }, + "DataLists": { + "PassengerList": [ + { + "Passenger": { + "PTC": "ADT" + } + } + ] + } +} \ No newline at end of file diff --git a/test/mocks/seatmap.json b/test/mocks/seatmap.json new file mode 100644 index 00000000..00ca3346 --- /dev/null +++ b/test/mocks/seatmap.json @@ -0,0 +1,161 @@ +{ + "PointOfSale": { + "Location": { + "CountryCode": { + "@value": "CA" + } + }, + "TouchPoint": { + "Device": { + "Code": "0.AAA.X", + "TableName": {} + } + } + }, + "Party": { + "Participants": { + "Participant": { + "EnabledSystemParticipant": { + "@SequenceNumber": "1", + "Name": "WindingTreePOSCA", + "Category": "DC", + "SystemID": { + "@Owner": "ADS", + "@value": "mcmEL4qB" + } + } + } + } + }, + "Document": { + "@id": "OneWay", + "Name": "NDC-Exchange", + "ReferenceVersion": "UAT-OTA-2010B" + }, + "Query": { + "Offer": [ + { + "@Owner": "AC", + "@OfferID": "HOT4YXITL4-OfferID-1", + "@ResponseID": "", + "PassengerID": [ + { + "@value": "B1E9EC6A" + } + ], + "SegmentID": [ + { + "@value": "Z6AG2A6ZJL-SEG1" + }, + { + "@value": "TY7A1U7AIM-SEG2" + } + ] + } + ] + }, + "DataLists": { + "PassengerList": { + "Passenger": [ + [ + { + "@PassengerID": "B1E9EC6A", + "PTC": "ADT" + } + ] + ] + }, + "FlightSegmentList": { + "FlightSegment": [ + { + "@SegmentKey": "Z6AG2A6ZJL-SEG1", + "@refs": "M5E6W3S3VY-OD1", + "Departure": { + "AirportCode": "YYC", + "Date": "2020-09-14", + "Time": "07:00" + }, + "Arrival": { + "AirportCode": "YYZ", + "Date": "2020-09-14", + "Time": "12:50", + "Terminal": { + "Name": "1" + } + }, + "MarketingCarrier": { + "AirlineID": "AC", + "Name": "Air Canada", + "FlightNumber": "134", + "ResBookDesigCode": "T" + }, + "OperatingCarrier": { + "Disclosures": { + "Description": { + "Text": "pJyAxvTLWDVvF8SySYd5TW2hGD96yqr9UnlLUkThnLG/17BjuAKyJQLIS8+5KZ+nWZ+eCqjGklc8V50L+k74WbqNq9ZO3IpGls6u+xccVld4Gup4vlJ+Oye7VT9dQMN4k79o+QVRFEynPWYDs9X8BA==" + } + } + }, + "Equipment": { + "AircraftCode": "7M8" + }, + "ClassOfService": { + "Code": "T" + }, + "FlightDetail": { + "FlightDuration": { + "Value": "" + }, + "Stops": { + "StopQuantity": "0" + } + } + }, + { + "@SegmentKey": "TY7A1U7AIM-SEG2", + "@refs": "M5E6W3S3VY-OD1", + "Departure": { + "AirportCode": "YYZ", + "Date": "2020-09-14", + "Time": "14:50", + "Terminal": { + "Name": "1" + } + }, + "Arrival": { + "AirportCode": "YYT", + "Date": "2020-09-14", + "Time": "19:19" + }, + "MarketingCarrier": { + "AirlineID": "AC", + "Name": "Air Canada", + "FlightNumber": "1544", + "ResBookDesigCode": "T" + }, + "OperatingCarrier": { + "Disclosures": { + "Description": { + "Text": "pJyAxvTLWDVvF8SySYd5TV8dpcsYUV67DAplC3QvK8JCV20YIAxokyvip2BMSJ7daGtED8EIJYrlpn8XB8pRX6r+QhxHHDS4OduCOeU5xip/veYLBfhQ9w==" + } + } + }, + "Equipment": { + "AircraftCode": "321" + }, + "ClassOfService": { + "Code": "T" + }, + "FlightDetail": { + "FlightDuration": { + "Value": "" + }, + "Stops": { + "StopQuantity": "0" + } + } + } + ] + } + } +} \ No newline at end of file diff --git a/test/spec/error.js b/test/spec/error.js new file mode 100644 index 00000000..b72cd2da --- /dev/null +++ b/test/spec/error.js @@ -0,0 +1,20 @@ +const GliderError = require('../../helpers/error'); +require('chai').should(); + +describe('Helpers/error', () => { + const message = 'Error message'; + const status = 404; + const code = 'KIND_OF_ERROR'; + + it('should create a proper error object', async () => { + const result = new GliderError( + message, + status, + code + ); + (result).should.an.instanceOf(GliderError) + .to.have.property('message').to.equal(message); + (result).should.to.have.property('status').to.equal(status); + (result).should.to.have.property('code').to.equal(code); + }); +}); diff --git a/test/spec/flightUtils.js b/test/spec/flightUtils.js deleted file mode 100644 index 9e8d9a4d..00000000 --- a/test/spec/flightUtils.js +++ /dev/null @@ -1,41 +0,0 @@ -require('chai').should(); -const { convertObjectToXML } = require('../../helpers/soapTemplates/utils/xmlUtils'); - -describe('XML Utils', () => { - - describe('#convertObjectToXML', () => { - const xml = 'tag112'; - - const obj = { - Test: { - '@id': 123456, - tag1: 'tag1', - tags: { - tag2: [ - { - '@param1': 'param1', - '@param2': 'param2', - '@value': 1 - }, - { - '@param1': 'param1', - '@param2': 'param2', - '@value': 2 - } - ] - } - } - }; - - it('should convert object to XML', async () => { - const result = convertObjectToXML(obj).join(''); - (result).should.equal(xml); - }); - - it('should not mutate source object', async () => { - const objOrig = JSON.stringify(obj); - convertObjectToXML(obj).join(''); - (JSON.stringify(obj)).should.equal(objOrig); - }); - }); -}); diff --git a/test/spec/jwt.js b/test/spec/jwt.js index b6da3dfb..a3e315fe 100644 --- a/test/spec/jwt.js +++ b/test/spec/jwt.js @@ -9,8 +9,8 @@ const { verifyJWT } = require('../../helpers/jwt'); require('chai').should(); describe('JWT', () => { - const aud = 'did:orgid:0x71cd1781a3082f33d2521ac8290c9d4b3b3b116e4e8548a4914b71a1f7201da0'; - const iss = 'did:orgid:0x71cd1781a3082f33d2521ac8290c9d4b3b3b116e4e8548a4914b71a1f7201da0'; + const aud = 'did:orgid:0x94bf5a57b850a35b4d1d7b59f663ce3a8a76fd9928ef2067cc772fc97fb0ad75'; + const iss = 'did:orgid:0xd28ed661a8619301ed6cb7048142c1a356c662bb96ba9d1c0b4c88f135363d26'; const exp = '24 hours'; let priv = privPem; let pub = pubPem; @@ -25,7 +25,7 @@ describe('JWT', () => { alg: 'ES256K', aud, iss, - fragment: 'secondkey', + fragment: 'test', exp }; @@ -61,7 +61,7 @@ describe('JWT', () => { alg: 'ES256K', aud, iss, - fragment: 'secondkey', + fragment: 'test', exp }; let secp256k1Jwt; diff --git a/test/spec/parsers.js b/test/spec/parsers.js new file mode 100644 index 00000000..a9593d81 --- /dev/null +++ b/test/spec/parsers.js @@ -0,0 +1,541 @@ +// const { assertFailure } = require('../../helpers/assertions'); +const { zonedTimeToUtc } = require('date-fns-tz'); +const { airports } = require('../../helpers/parsers/timeZoneByAirportCode'); +const { + reduceObjectToProperty, + splitPropertyBySpace, + reduceToObjectByKey, + reduceAccommodation, + reduceContactInformation, + useDictionary, + mergeHourAndDate, + convertDateToAirportTime, + reduceToProperty, + roundCommissionDecimals, + deepMerge +} = require('../../helpers/parsers'); + +require('chai').should(); + +describe('Helpers/parsers', () => { + + describe('#reduceObjectToProperty', () => { + const arr = [ + { + prop: 'prop1' + }, + { + prop: 'prop2' + } + ]; + + it('should trow if wrong array of objects has been provided', async () => { + (() => reduceObjectToProperty(undefined, 'prop')).should.to.throw; + (() => reduceObjectToProperty('notAnArray', 'prop')).should.to.throw; + (() => reduceObjectToProperty([], 'prop')).should.to.throw; + }); + + it('should return undefined properties if unknown property has been provided', async () => { + const result = reduceObjectToProperty(arr, 'unknownProp'); + arr.forEach((a, index) => { + (typeof result[String(index)]).should.equal('undefined'); + }); + }); + + it('should fulfill', async () => { + const result = reduceObjectToProperty(arr, 'prop'); + arr.forEach((a, index) => { + (result[String(index)]).should.equal(a.prop); + }); + }); + }); + + describe('#splitPropertyBySpace', () => { + const arr = [ + { + prop: 'prop1 prop2 prop3' + }, + { + prop: 'prop4 prop5' + } + ]; + + it('should trow if wrong array of objects has been provided', async () => { + (() => splitPropertyBySpace(undefined, 'prop')).should.to.throw; + (() => splitPropertyBySpace('notAnArray', 'prop')).should.to.throw; + (() => splitPropertyBySpace([], 'prop')).should.to.throw; + }); + + it('should return undefined properties if unknown property has been provided', async () => { + (() => splitPropertyBySpace(arr, 'unknownProp')).should.to.throw; + }); + + it('should fulfill', async () => { + const result = splitPropertyBySpace(arr, 'prop'); + result.forEach((r, i) => { + (r.prop.length).should.equal(arr[i].prop.split(' ').length); + }); + }); + }); + + describe('#reduceToObjectByKey', () => { + const arr = [ + { + _id_: 'prop1', + data: 1 + }, + { + _id_: 'prop2', + data: 2 + } + ]; + + it('should trow if wrong array value has been provided', async () => { + (() => reduceToObjectByKey(undefined)).should.to.throw; + (() => reduceToObjectByKey('notAnArray')).should.to.throw; + (() => reduceToObjectByKey([])).should.to.throw; + }); + + it('should fulfill', async () => { + const result = reduceToObjectByKey(arr); + arr.forEach(a => { + (result[a._id_]).should.be.an('object').to.have.property('data').to.equal(a.data); + }); + }); + }); + + describe('#reduceAccommodation', () => { + const accommodations = [ + { + _provider_: 'provider', + _id_: '07001', + data: 1 + }, + { + _provider_: 'provider', + _id_: '07002', + data: 2 + } + ]; + + it('should trow if wrong array value has been provided', async () => { + (() => reduceAccommodation(undefined)).should.to.throw; + (() => reduceAccommodation('notAnArray')).should.to.throw; + (() => reduceAccommodation([])).should.to.throw; + }); + + it('should fulfill', async () => { + const result = reduceAccommodation(accommodations); + accommodations.forEach(a => { + (result[`${a._provider_}.${a._id_}`]).should.be.an('object').to.have.property('data').to.equal(a.data); + }); + }); + }); + + describe('#reduceContactInformation', () => { + const passengers = [ + { + _id_: 'TravelerRefNumber2', + type: 'ADT', + gender: 'Male', + civility: 'MR', + lastnames: [ + 'MARLEY' + ], + firstnames: [ + 'BOB' + ], + birthdate: '1980-03-21', + contactInformation: { + emails: [ + { + value: 'CONTACT@ORG.CO.UK' + } + ], + phones: [ + { + value: '+32123456789' + } + ] + } + } + ]; + + it('should throw of wrong passengers has been provided', async () => { + (() => reduceContactInformation(undefined)).should.to.throw; + (() => reduceContactInformation('notAnArray')).should.to.throw; + (() => reduceContactInformation({})).should.to.throw; + }); + + it('should reduce contact information', async () => { + const result = reduceContactInformation(passengers); + (result).should.be.an('array'); + result.forEach(t => { + (t).should.be.an('object'); + (t).should.to.have.property('_id_').to.be.a('string'); + (t).should.to.have.property('type').to.be.a('string'); + (t).should.to.have.property('gender').to.be.a('string'); + (t).should.to.have.property('civility').to.be.a('string'); + (t).should.to.have.property('lastnames').to.be.an('array'); + (t).should.to.have.property('firstnames').to.be.an('array'); + (t).should.to.have.property('birthdate').to.be.a('string'); + (t).should.to.have.property('contactInformation').to.be.an('array'); + }); + }); + }); + + describe('#useDictionary', () => { + const passengers = [ + { + _id_: 'TravelerRefNumber2', + contactInformation: 'CONTACT_For_TravelerRefNumber2' + } + ]; + const contacList = { + 'CONTACT_For_TravelerRefNumber2': { + emails: [ + { + value: 'CONTACT@ORG.CO.UK' + } + ] + } + }; + const word = 'contactInformation'; + + it('should to trow if wrong array has been provided', async () => { + (() => useDictionary(undefined, contacList, word)).should.to.throw; + (() => useDictionary('wrongType', contacList, word)).should.to.throw; + (() => useDictionary({}, contacList, word)).should.to.throw; + }); + + it('should to trow if wrong dictionary has been provided', async () => { + (() => useDictionary(passengers, undefined, word)).should.to.throw; + (() => useDictionary(passengers, 'wrongType', word)).should.to.throw; + (() => useDictionary(passengers, {}, word)).should.to.throw; + }); + + it('should to trow if undefined word has been provided', async () => { + (() => useDictionary(passengers, contacList, undefined)).should.to.throw; + }); + + it('should produce broken array if unknown word has been provided', async () => { + const word = 'unknownWord'; + const result = useDictionary(passengers, contacList, word); + (result).should.be.an('array'); + result.forEach(t => { + (t).should.to.have.property(word).to.equal(undefined); + }); + }); + + it('should transform array with dictionary', async () => { + const result = useDictionary(passengers, contacList, word); + (result).should.be.an('array'); + result.forEach((t, i) => { + (t).should.to.have.property('_id_').to.equal(passengers[i]._id_); + (t).should.to.have.property('contactInformation') + .to.deep.equal(contacList[passengers[i][word]]); + }); + }); + }); + + describe('#mergeHourAndDate', () => { + const segments = [ + { + '_id_': 'HWYTY2RNMT-SEG291', + 'operator': { + 'operatorType': 'airline', + 'iataCode': '', + 'iataCodeM': 'AC', + 'flightNumber': '164' + }, + 'origin': { + 'locationType': 'airport', + 'iataCode': 'YEG' + }, + 'destination': { + 'locationType': 'airport', + 'iataCode': 'YYZ' + }, + 'splittedDepartureTime': '09:00', + 'splittedDepartureDate': '2020-09-14', + 'splittedArrivalTime': '14:35', + 'splittedArrivalDate': '2020-09-14', + 'Departure': { + 'AirportCode': 'YEG', + 'Date': '2020-09-14', + 'Time': '09:00', + 'Terminal': { + 'Name': '' + } + }, + 'Arrival': { + 'AirportCode': 'YYZ', + 'Date': '2020-09-14', + 'Time': '14:35', + 'Terminal': { + 'Name': '1' + } + }, + 'MarketingCarrier': { + 'AirlineID': 'AC', + 'Name': 'Air Canada', + 'FlightNumber': '164', + 'ResBookDesigCode': 'B' + }, + 'OperatingCarrier': { + 'Disclosures': { + 'Description': { + 'Text': 'yfq7H2nszqdvF8SySYd5TV8dpcsYUV67hhsPQkG0KtuMa/AmJRTN4jT+fplmszbFaGtED8EIJYrbScfNk5TdE2NWN/9d2yHWak/vPCpyfdjBFHiM+rPeiQ==' + } + } + }, + 'Equipment': { + 'AircraftCode': '321' + }, + 'ClassOfService': { + 'Code': 'B' + }, + 'FlightDetail': { + 'FlightDuration': { + 'Value': 'PT03H35M' + }, + 'Stops': { + 'StopQuantity': '0' + } + } + } + ]; + + it('should to throw if wrong array has been passed', async () => { + (() => mergeHourAndDate(undefined)).should.to.throw; + (() => mergeHourAndDate('wrongType')).should.to.throw; + (() => mergeHourAndDate({})).should.to.throw; + (() => mergeHourAndDate([])).should.to.throw; + }); + + it('should merge hour and date', async () => { + const result = mergeHourAndDate(segments); + (result).should.be.an('array'); + result.forEach((s, i) => { + const keys = Object.keys(s); + keys.forEach(k => { + if (!['departureTime', 'arrivalTime'].includes(k)) { + (s).should.to.have.property(k).to.deep.equal(segments[i][k]); + } else if (k === 'departureTime') { + const time = zonedTimeToUtc( + `${segments[i].splittedDepartureDate} ${segments[i].splittedDepartureTime}:00.000`, + airports[s.origin.iataCode] + ).toISOString(); + (s.departureTime).should.to.equal(time); + } else if (k === 'arrivalTime') { + const time = zonedTimeToUtc( + `${segments[i].splittedArrivalDate} ${segments[i].splittedArrivalTime}:00.000`, + airports[s.destination.iataCode] + ).toISOString(); + (s.arrivalTime).should.to.equal(time); + } + }); + }); + }); + }); + + describe('#convertDateToAirportTime', () => { + const date = '2020-09-14'; + const time = '14:30'; + const iataCode = 'YYZ'; + + it('should to throw if wrong data has been passed', async () => { + (() => convertDateToAirportTime(undefined, time, iataCode)).should.to.throw; + (() => convertDateToAirportTime('wrongString', time, iataCode)).should.to.throw; + (() => convertDateToAirportTime('', time, iataCode)).should.to.throw; + (() => convertDateToAirportTime([], time, iataCode)).should.to.throw; + (() => convertDateToAirportTime({}, time, iataCode)).should.to.throw; + }); + + it('should to throw if wrong time has been passed', async () => { + (() => convertDateToAirportTime(date, undefined, iataCode)).should.to.throw; + (() => convertDateToAirportTime(date, 'wrongString', iataCode)).should.to.throw; + (() => convertDateToAirportTime(date, '', iataCode)).should.to.throw; + (() => convertDateToAirportTime(date, [], iataCode)).should.to.throw; + (() => convertDateToAirportTime(date, {}, iataCode)).should.to.throw; + }); + + it('should to throw if wrong iataCode has been passed', async () => { + (() => convertDateToAirportTime(date, time, undefined)).should.to.throw; + (() => convertDateToAirportTime(date, time, '0000')).should.to.throw; + (() => convertDateToAirportTime(date, time, '')).should.to.throw; + (() => convertDateToAirportTime(date, time, [])).should.to.throw; + (() => convertDateToAirportTime(date, time, {})).should.to.throw; + }); + + it('should covert date', async () => { + const result = convertDateToAirportTime(date, time, iataCode); + const airportTime = zonedTimeToUtc( + `${date} ${time}:00.000`, + airports[iataCode] + ).toISOString(); + (result.toISOString()).should.to.equal(airportTime); + }); + }); + + describe('#reduceToProperty', () => { + const data = { + one: { + prop: { + value: 1 + } + }, + two: { + prop: { + value: 2 + } + } + }; + + it('should to throw if wrong object has been provided', async () => { + (() => reduceToProperty(undefined, 'prop')).should.to.throw; + (() => reduceToProperty('wrongType', 'prop')).should.to.throw; + (() => reduceToProperty([], 'prop')).should.to.throw; + (() => reduceToProperty({}, 'prop')).should.to.throw; + }); + + it('should to throw if wrong property has been provided', async () => { + (() => reduceToProperty(data, undefined)).should.to.throw; + (() => reduceToProperty(data, [])).should.to.throw; + (() => reduceToProperty(data, {})).should.to.throw; + }); + + it('should return broken array if unknown property has been provided', async () => { + const result = reduceToProperty(data, 'unknownProperty'); + result.forEach(a => { + const prop = Object.keys(a)[0]; + (data).should.to.have.property(prop); + (typeof a[prop]).should.to.equal('undefined'); + }); + }); + + it('should fulfill', async () => { + const result = reduceToProperty(data, 'prop'); + result.forEach(a => { + const prop = Object.keys(a)[0]; + (data).should.to.have.property(prop); + (a[prop]).should.to.deep.equal(data[prop].prop); + }); + }); + }); + + describe('#roundCommissionDecimals', () => { + const offers = [ + { + '_id_': 'T4B56FYQEH-OfferID-42', + 'offerItems': { + 'HAS54TFEWO-OfferItemID-83': { + 'passengerReferences': '5B628F25 84B3E141' + }, + 'KPIC3IX1DH-OfferItemID-84': { + 'passengerReferences': 'E32E17CB' + } + }, + 'expiration': '', + 'price': { + 'currency': 'CAD', + 'public': '3666.90', + 'commission': 0, + 'taxes': '135.30' + }, + 'pricePlansReferences': { + 'G9I3YBZWA4-BusinessClassflexible': { + 'flights': [ + 'FFCQV2B62M-OD120', + 'GOKZJ5PLMB-OD121' + ] + } + } + }, + { + '_id_': 'Q2T85YX2T0-OfferID-43', + 'offerItems': { + 'AQ7HWZ2LXH-OfferItemID-85': { + 'passengerReferences': '5B628F25 84B3E141' + }, + 'Y5OU8TUXKZ-OfferItemID-86': { + 'passengerReferences': 'E32E17CB' + } + }, + 'expiration': '', + 'price': { + 'currency': 'CAD', + 'public': '3671.49', + 'commission': 0, + 'taxes': '136.83' + }, + 'pricePlansReferences': { + 'G9I3YBZWA4-BusinessClassflexible': { + 'flights': [ + 'F7RWILPCNQ-OD122' + ] + } + } + } + ]; + + it('should to throw if wrong array has been provided', async () => { + (() => roundCommissionDecimals(undefined)).should.to.throw; + (() => roundCommissionDecimals('wrongType')).should.to.throw; + (() => roundCommissionDecimals([])).should.to.throw; + (() => roundCommissionDecimals({})).should.to.throw; + }); + + it('should round commission decimals in offers', async () => { + const result = roundCommissionDecimals(offers); + (result).should.be.an('array'); + result.forEach((o, i) => { + (o).should.to.have.property('price').to.be.an('object').to.have.property('commission'); + (o.price.commission).should.to.equal(offers[i].price.commission.toFixed(2).toString()); + }); + }); + }); + + describe('#deepMerge', () => { + const obj1 = { + prop1: { + value1: 1, + value2: { + value3: 3 + } + }, + prop2: { + value4: 4 + } + }; + const obj2 = { + prop1: { + value4: 'new4', + value2: { + value3: 'new3', + value5: 5 + } + }, + prop2: { + value6: 6 + } + }; + + it('should to throw if wrong object has been provided', async () => { + (() => deepMerge(undefined, obj2)).should.to.throw; + (() => deepMerge(obj1, undefined)).should.to.throw; + (() => deepMerge('obj1', obj2)).should.to.throw; + (() => deepMerge(obj1, 'obj2')).should.to.throw; + (() => deepMerge([], obj2)).should.to.throw; + (() => deepMerge(obj1, [])).should.to.throw; + }); + + it('should create merged object', async () => { + const result = deepMerge(obj1, obj2); + (result).should.be.an('object').to.have.property('prop1') + .to.deep.equal({ value4: 'new4', value2: { value3: 'new3', value5: 5 }, value1: 1 }); + (result).should.property('prop2') + .to.deep.equal({ value6: 6, value4: 4 }); + }); + }); +}); diff --git a/test/spec/resolvers.js b/test/spec/resolvers.js new file mode 100644 index 00000000..a89fc27f --- /dev/null +++ b/test/spec/resolvers.js @@ -0,0 +1,295 @@ +const { assertFailure } = require('../helpers/assertions'); +const { + searchHotel, + rectangleToPolygon, + getGuestCounts +} = require('../../helpers/resolvers/searchHotel'); +const orderCreateWithOffer = require('../../helpers/resolvers/hotel/orderCreateWithOffer'); +const { selectProvider } = require('../../helpers/resolvers/utils/flightUtils'); +const { + GuestCount +} = require('../../helpers/models/offer'); + +require('chai').should(); + +describe('Helpers/resolvers', () => { + + describe('#selectProvider', () => { + + it('should select AirCanada operator for proper orgin and destination', async () => { + const providers = selectProvider('YEA', 'YYC'); + (providers).should.be.an('array').to.have.length(1); + // (providers).should.be.an('array').to.have.length(2); + (providers).should.include('AC'); + }); + + it('should fetch an empty array in wrong origin and provided', async () => { + let providers; + providers = selectProvider('UNKNOWN', 'UNKNOWN'); + (providers).should.be.an('array').to.have.length(0); + // (providers).should.be.an('array').to.have.length(1); + }); + }); + + describe('#searchHotel', () => { + const rectangleRequest = { + accommodation: { + location: { + rectangle: { + north: '59', + south: '57', + west: '11', + east: '20' + } + }, + arrival: '2020-09-02T00:00:00Z', + departure: '2020-09-03T00:00:00Z' + }, + passengers: [ + { + type: 'ADT', + count: 2 + }, + { + type: 'CHD', + count: 1 + } + ] + }; + + it('should fail if passengers has not been provided in request', async () => { + await assertFailure( + searchHotel(Object.assign({}, rectangleRequest, { passengers: undefined })), + 'Missing passenger types', + 400 + ); + }); + + it('should fail if unknown location area type has been provided', async () => { + await assertFailure( + searchHotel(Object.assign({}, rectangleRequest, { accommodation: { + location: { + 'unknownType': [] + } + } })), + 'A location area of type rectangle, circle or polygon is required', + 400 + ); + }); + + describe('Tests with empty result', () => { + before(async () => { + process.env.TESTING_EMPTY_RESULT = '1'; + }); + after(async () => { + process.env.TESTING_EMPTY_RESULT = '0'; + }); + + it('should fail if no hotels found', async () => { + await assertFailure( + searchHotel(rectangleRequest), + 'No Hotels were found with the provided criteria', + 404 + ); + }); + }); + + describe('Tests with erevmax errors', () => { + before(async () => { + process.env.TESTING_PROVIDER_ERRORS = '1'; + }); + after(async () => { + process.env.TESTING_PROVIDER_ERRORS = '0'; + }); + + it('should fail if errors gets with erevmax response', async () => { + await assertFailure( + searchHotel(rectangleRequest), + 'Request Could Not Be Processed At This Moment', + 502 + ); + }); + }); + + it('should resolve hotels by rectangle request', async () => { + const result = await searchHotel(rectangleRequest); + (result).should.be.an('object').to.have.property('accommodations').to.be.an('object'); + (result).should.to.have.property('pricePlans').to.be.an('object'); + (result).should.to.have.property('offers').to.be.an('object'); + (result).should.to.have.property('passengers').to.be.an('object'); + }); + }); + + describe('#orderCreateWithOffer', () => { + const offer = { + provider: 'erevmax', + hotelCode: '07119', + rateCode: 'LSAVE', + roomTypeCode: 'ND', + rates: [ + { + effectiveDate: '2020-07-02', + expireDate: '2020-07-03', + timeUnit: 'Day', + unitMultiplier: '1', + currency: 'SEK', + amountAfterTax: '776.0' + } + ], + guestCounts: [ { type: 'ADT', count: 2 }, { type: 'CHD', count: 1 } ], + effectiveDate: '2020-07-02', + expireDate: '2020-07-03', + amountBeforeTax: '640.0', + amountAfterTax: '776.0', + currency: 'SEK' + }; + const passengers = { + PAX1: { + type: 'ADT', + civility: 'MR', + lastnames: [ 'Marley' ], + firstnames: [ 'Bob' ], + gender: 'Male', + birthdate: '1980-03-21T00:00:00Z', + contactInformation: [ '+32123456789', 'contact@org.co.uk' ] + } + }; + const card = { + accountNumber: '4444333322221111', + brand: 'visa', + cvv: '737', + expiryMonth: '10', + expiryYear: '2020', + id: 'e6266e16-eb45-4781-9788-271553dc6657', + type: 'debit' + }; + + describe('Tests with erevmax errors', () => { + before(async () => { + process.env.TESTING_PROVIDER_ERRORS = '1'; + }); + after(async () => { + process.env.TESTING_PROVIDER_ERRORS = '0'; + }); + + it('should fail if errors gets with erevmax response', async () => { + await assertFailure( + orderCreateWithOffer(offer, passengers, card), + '[erevmax:502] Booking creation failed', + 502 + ); + }); + }); + + it('should create an order', async () => { + const result = await orderCreateWithOffer(offer, passengers, card); + (result).should.be.an('object').to.have.property('orderId').to.be.a('string'); + (result).should.to.have.property('order').to.be.an('object'); + (result.order).should.to.have.property('response').to.be.a('string'); + (result.order).should.to.have.property('reservationNumber').to.be.a('string'); + (result.order).should.to.have.property('errors').to.be.an('array').to.have.property('length').to.equal(0); + (result.order).should.to.have.property('passengers').to.be.a('object').to.deep.equal(passengers); + }); + }); + + describe('#rectangleToPolygon', () => { + const rectangle = { + south: '50.0929802', + west: '14.4012451', + north: '50.0812615', + east: '14.4394467' + }; + + it('should throw if wrong rectangle has been provided', async () => { + (() => rectangleToPolygon([])).should.to.throw; + (() => rectangleToPolygon( + Object.assign({}, rectangle, { north: undefined }) + )).should.to.throw; + (() => rectangleToPolygon( + Object.assign({}, rectangle, { north: 'NaN' }) + )).should.to.throw; + }); + + it('should convert rectangle coordinates to polygon', async () => { + const result = rectangleToPolygon(rectangle); + (result[0][0]).should.equal(Number(rectangle.west)); + (result[0][1]).should.equal(Number(rectangle.north)); + (result[1][0]).should.equal(Number(rectangle.east)); + (result[1][1]).should.equal(Number(rectangle.north)); + (result[2][0]).should.equal(Number(rectangle.east)); + (result[2][1]).should.equal(Number(rectangle.south)); + (result[3][0]).should.equal(Number(rectangle.west)); + (result[3][1]).should.equal(Number(rectangle.south)); + }); + }); + + describe('#getGuestCounts', () => { + const passengers = [ + { + type: 'ADT', + count: 2 + }, + { + type: 'CHD', + count: 1 + }, + ]; + + const validateGuestCounts = gc => { + (gc).should.to.be.an('array'); + gc.forEach(g => { + (g).should.be.an.instanceOf(GuestCount); + }); + }; + + it('should fail if passengers not defined or wrong array has been provided', async () => { + await assertFailure( + () => getGuestCounts(undefined), + 'Passengers search property is required', + 400 + ); + await assertFailure( + () => getGuestCounts({}), + 'Passengers search property is required', + 400 + ); + await assertFailure( + () => getGuestCounts([]), + 'Passengers search property is required', + 400 + ); + }); + + it('should throw if passengers property has wrong type', async () => { + await assertFailure( + () => getGuestCounts([ + { + type: 'UNKNOWN', + count: 2 + } + ]), + 'Unsupported passenger type', + 400 + ); + }); + + it('should fail if at least one adult passenger', async () => { + await assertFailure( + () => getGuestCounts([ + { + type: 'CHD', + count: 1 + } + ]), + 'At least one adult passenger is required to search properties', + 400 + ); + }); + + it('should return passengers counts', async () => { + const result = getGuestCounts(passengers); + (result.length).should.equal(passengers.length); + validateGuestCounts(result); + }); + }); +}); diff --git a/test/spec/soapTemplates.js b/test/spec/soapTemplates.js new file mode 100644 index 00000000..fa027d58 --- /dev/null +++ b/test/spec/soapTemplates.js @@ -0,0 +1,283 @@ +const { + mapGuestCount, + mapGuestCounts, + mapRate, + mapRates, + mapRoomRate, + mapPaymentCard, + mapGuarantee, + // mapRoomStay, + // mapPOS, + // mapAddress, + // mapPersonName, + // mapProfile, + // mapResGuest, + // mapHotelReservationID, + // mapHotelReservation, + // mapHotelResNotif, + // mapSoapHeader, + // mapHotelResNotifSoap +} = require('../../helpers/soapTemplates/ota/otaHotelResNotifRQ'); +const { + mapGuestCounts: mapGuestCountsHotelAvail, + mapCriterions, + hotelAvailRequestTemplate +} = require('../../helpers/soapTemplates/ota/otaHotelAvailRQ'); +const { + seatAvailabilityRequestTemplate_AC +} = require('../../helpers/soapTemplates/seatAvailability'); +const seatmapJson = require('../mocks/seatmap.json'); +const { + provideShoppingRequestTemplate_AC +} = require('../../helpers/soapTemplates/searchOffers'); +const searchFlightsJson = require('../mocks/searchFlightOffers.json'); + +require('chai').should(); + +describe('soapTemplates', () => { + // const ageCodes = [10, 8]; + + describe('otaHotelResNotifRQ', () => { + const OTA_GuestCount = { + Count: 1, + AgeQualifyingCode: 10 + }; + const OTA_Rate = { + EffectiveDate: '2020-07-02', + ExpireDate: '2020-07-03', + RateTimeUnit: 'Day', + UnitMultiplier: '0.0', + Base: { + AmountAfterTax: '776.0', + CurrencyCode: 'SEK' + } + }; + const OTA_RoomRate = { + NumberOfUnits: 2, + RatePlanCode: 'LSAVE', + RoomTypeCode: 'ND1', + Rates: [ + OTA_Rate, + OTA_Rate + ] + }; + const OTA_PaymentCard = { + CardType: '1', + CardCode: 'VI', + CardNumber: '4444333322221111', + ExpireDate: '1024', + CardHolderName: 'TEST', + SeriesCode: '111' + }; + const OTA_Guarantee = { + GuaranteeType: 'GuaranteeRequired', + GuaranteeCode: 'GCC', + PaymentCard: OTA_PaymentCard, + GuaranteeDescription: 'Credit Card Guarantee' + }; + + describe('#mapGuestCount', () => { + + it('should map data', async () => { + const result = mapGuestCount(OTA_GuestCount); + (result).should.equal(''); + }); + + it('should return empty string if count equal to 0', async () => { + const result = mapGuestCount({ + Count: 0 + }); + (result).should.equal(''); + }); + }); + + describe('#mapGuestCounts', () => { + + it('should map data', async () => { + const result = mapGuestCounts([ + OTA_GuestCount, + OTA_GuestCount + ]); + (result).should.equal('\n \n'); + }); + }); + + describe('#mapRate', () => { + + it('should map data', async () => { + const result = mapRate(OTA_Rate); + (result).should.equal('\n \n'); + }); + }); + + describe('#mapRates', () => { + + it('should map data', async () => { + const result = mapRates([ + OTA_Rate, + OTA_Rate + ]); + (result).should.equal('\n \n \n\n \n\n'); + }); + }); + + describe('#mapRoomRate', () => { + + it('should map data', async () => { + const result = mapRoomRate(OTA_RoomRate); + (result).should.equal('\n \n \n \n\n \n\n\n'); + }); + }); + + describe('#mapPaymentCard', () => { + + it('should map data', async () => { + const result = mapPaymentCard(OTA_PaymentCard); + (result).should.equal('TEST'); + }); + }); + + describe('#mapGuarantee', () => { + + it('should map data', async () => { + const result = mapGuarantee(OTA_Guarantee); + (result).should.equal('\n \n TEST\n \n \n Credit Card Guarantee\n \n'); + }); + }); + }); + + describe('otaHotelAvailRQ', () => { + const guestCounts = [ + { + AgeQualifyingCode: 10, + Count: 2 + }, + { + AgeQualifyingCode: 8, + Count: 1 + } + ]; + const hotelSearchCriteria = [ + { + HotelRef: { + HotelCode: '02034', + StayDateRange: { + Start: '2020-09-02', + Duration: 1, + RoomStayCandidates: { + RoomStayCandidate: { + Quantity: 3, + GuestCounts: guestCounts + } + } + } + } + } + ]; + const tpaExtensions = { + isDeepLinkRequired: { + DeepLinkType: 'URL', + isDeepLinkRequired: true + }, + isContentRequired: { + isAmenityRequired: true, + isContentRequired: true + }, + isCancellationPolicyRequired: { + isCancellationPolicyRequired: true + } + }; + const hotelAvailRequest = { + OTA_HotelAvailRQ: { + AvailRatesOnly: true, + PrimaryLangID: 'EN', + RequestedCurrency: 'USD', + TimeStamp: '1980-03-21T00:00:00Z', + Version: '1.1', + xmlns: 'http://www.domain.com/soa/xsd/MessageHeader-V1_0', + POS: { + Source: { + RequestorID: { + ID: '17', + MessagePassword: 'Windingtree', + Name: 'Windingtree', + Type: '13', + }, + BookingChannel: { + Primary: 'true', + Type: '2', + CompanyName: { + name: 'Windingtree', + Code: '245800' + } + } + } + }, + AvailRequestSegments: { + AvailRequestSegment: { + AvailReqType: 'Both', + HotelSearchCriteria: hotelSearchCriteria, + } + }, + TPA_Extensions: tpaExtensions + } + }; + + describe('#mapGuestCounts', () => { + + it('should produce broken xml data if wrong count object has been provided', async () => { + const wrongGuestCounts1 = [ + { + Count: 2 + } + ]; + const wrongGuestCounts2 = [ + { + AgeQualifyingCode: 10 + } + ]; + let result = mapGuestCountsHotelAvail(wrongGuestCounts1); + (result).should.equal('\n '); + result = mapGuestCountsHotelAvail(wrongGuestCounts2); + (result).should.equal('\n '); + }); + + it('should map query to xml data', async () => { + const result = mapGuestCountsHotelAvail(guestCounts); + (result).should.equal('\n \n '); + }); + }); + + describe('#mapCriterions', () => { + + it('should map query to xml data', async () => { + const result = mapCriterions(hotelSearchCriteria, tpaExtensions); + (result).should.equal('\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n '); + }); + }); + + describe('#hotelAvailRequestTemplate', () => { + + it('should map query to xml data', async () => { + const result = hotelAvailRequestTemplate(hotelAvailRequest); + (result).should.equal('\n\n\n \n \n \n http://www.opentravel.org/OTA/2003/05/getOTAHotelAvailability\n uuid:91a83ac1-8931-4618-ab49-692a25fa5a17\n\n\n \n \n \n \n \n Windingtree\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n'); + }); + }); + }); + + describe('seatAvailability', () => { + + describe('#seatAvailabilityRequestTemplate_AC', () => { + const result = seatAvailabilityRequestTemplate_AC(seatmapJson); + (result).should.equal('\n\n\n \n \n SeatAvailabilityRQ\n NDC\n YY.2017.2\n true\n \n
\n WindingTree\n DEV\n
\n
\n \n
\n AC\n DEV\n
\n
\n
\n \n \n \n CA0.AAA.XWindingTreePOSCADCmcmEL4qBNDC-ExchangeUAT-OTA-2010BB1E9EC6AZ6AG2A6ZJL-SEG1TY7A1U7AIM-SEG2ADTYYC2020-09-14YYZ2020-09-141ACAir Canada134TpJyAxvTLWDVvF8SySYd5TW2hGD96yqr9UnlLUkThnLG/17BjuAKyJQLIS8+5KZ+nWZ+eCqjGklc8V50L+k74WbqNq9ZO3IpGls6u+xccVld4Gup4vlJ+Oye7VT9dQMN4k79o+QVRFEynPWYDs9X8BA==7M8T0YYZ2020-09-141YYT2020-09-14ACAir Canada1544TpJyAxvTLWDVvF8SySYd5TV8dpcsYUV67DAplC3QvK8JCV20YIAxokyvip2BMSJ7daGtED8EIJYrlpn8XB8pRX6r+QhxHHDS4OduCOeU5xip/veYLBfhQ9w==321T0\n \n \n \n
\n
\n
'); + }); + }); + + describe('searchOffers', () => { + + describe('#provideShoppingRequestTemplate_AC', () => { + const result = provideShoppingRequestTemplate_AC(searchFlightsJson); + (result).should.equal('\n\n\n \n \n AirShoppingRQ\n NDC\n YY.2017.2\n true\n \n
\n WindingTree\n DEV\n
\n
\n \n
\n AC\n DEV\n
\n
\n
\n \n \n \n CA0.AAA.XWindingTreePOSCADCmcmEL4qBNDC-ExchangeUAT-OTA-2010BYYC2020-09-14YYTADT\n \n \n \n
\n
\n
'); + }); + }); +}); diff --git a/test/spec/transformInputData.js b/test/spec/transformInputData.js new file mode 100644 index 00000000..91bb45f1 --- /dev/null +++ b/test/spec/transformInputData.js @@ -0,0 +1,1139 @@ +const regex = require('../helpers/matches'); +const { + airCanadaConfig +} = require('../../config'); +const { + mapRequestData +} = require('../../helpers/transformInputData/hotelAvail'); +const { + mapFromOffer, + buildCustomerAddress +} = require('../../helpers/transformInputData/hotelResNotif'); +const { + expandPassengers, + mapNdcRequestData_AC +} = require('../../helpers/transformInputData/searchOffers'); +const { + mapNdcRequestData_AC: mapNdcRequestData_AC_offerPrice +} = require('../../helpers/transformInputData/offerPrice'); +const { + mapNdcRequestData_AC: mapNdcRequestData_AC_seatAvailability +} = require('../../helpers/transformInputData/seatAvailability'); +const { + mapNdcRequestData_AC: mapNdcRequestData_AC_fulfillOrder +} = require('../../helpers/transformInputData/fulfillOrder'); +const { + getACSystemIdOrderCreateRQ, + mapNdcRequestHeaderData_AC, + mapNdcRequestData_AC: mapNdcRequestData_AC_createOrder +} = require('../../helpers/transformInputData/createOrder'); + +require('chai').should(); + +const validateHotelRef = hr => { + (hr).should.to.have.property('HotelCode').to.be.a('string'); + (hr).should.to.have.property('StayDateRange').to.be.an('object'); + (hr.StayDateRange).should.to.have.property('Start'); + (hr.StayDateRange).should.to.have.property('Duration'); + (hr.StayDateRange).should.to.have.property('RoomStayCandidates').to.be.an('object'); + (hr.StayDateRange.RoomStayCandidates).should.to.have.property('RoomStayCandidate').to.be.an('object'); + (hr.StayDateRange.RoomStayCandidates.RoomStayCandidate).should.to.have.property('Quantity'); + (hr.StayDateRange.RoomStayCandidates.RoomStayCandidate).should.to.have.property('GuestCounts').to.be.an('array'); + + hr.StayDateRange.RoomStayCandidates.RoomStayCandidate.GuestCounts.forEach(g => { + (g).should.be.an('object'); + (g).should.to.have.property('AgeQualifyingCode').to.be.a('number'); + (g).should.to.have.property('Count').to.be.a('number'); + }); +}; + +describe('transformInputData', () => { + const docIds = [ + 'OneWay', + 'Return' + ]; + const body = [ + { + 'code': 'divNonAir11.LGAC1', + 'name': 'Lounge Access', + 'description': 'An access to the Exclusive Lounge Access at the departure', + 'segment': 'HW9EJ7XAC7-SEG1', + 'passenger': 'PAX1', + 'seatNumber': '12C', + 'price': { + 'currency': 'EUR', + 'private': '40.00', + 'public': '40.00', + 'commission': '40.00', + 'taxes': '40.00' + }, + 'taxes': [ + { + 'amount': '40.00', + 'code': 'CA', + 'description': 'Air Travellers Security Charge (ATSC)' + } + ] + } + ]; + const offers = [ + { + 'provider': 'AC', + 'airlineCode': 'AC', + 'expiration': '2020-08-03T18:11:53.723Z', + 'offerItems': { + 'X77M7SVPDA-OfferItemID-1': { + 'passengerReferences': '3E6B41DD ' + }, + 'HFPDQ29PH7-OfferItemID-2': { + 'passengerReferences': '1C966E35' + } + }, + 'amountAfterTax': '1036.83', + 'currency': 'CAD', + 'extraData': { + 'offerId': 'H8Z42IS0F2-OfferID-1', + 'segments': [ + { + 'id': 'B69B4WF4RW-SEG1', + 'operator': { + 'operatorType': 'airline', + 'iataCode': 'AC', + 'flightNumber': 'AC0134' + }, + 'Departure': { + 'AirportCode': 'YYC', + 'Date': '2020-09-14', + 'Time': '07:00' + }, + 'Arrival': { + 'AirportCode': 'YYZ', + 'Date': '2020-09-14', + 'Time': '12:50', + 'Terminal': { + 'Name': '1' + } + }, + 'MarketingCarrier': { + 'AirlineID': 'AC', + 'Name': 'Air Canada', + 'FlightNumber': '134', + 'ResBookDesigCode': 'L' + }, + 'OperatingCarrier': { + 'Disclosures': { + 'Description': { + 'Text': 'ssGCPeUH4oRvF8SySYd5TW2hGD96yqr9UnlLUkThnLG/17BjuAKyJRzQOOvKf1zI8ekioOTIFxjLK2Q44/2u8oD0eWQcKaLQSVSp+soTuqMcep+YABFdWqrYvC1N3Gl/5mTFuZAO5Ed6Ja5ZbLy4rw==' + } + } + }, + 'Equipment': { + 'AircraftCode': '7M8' + }, + 'ClassOfService': { + 'Code': 'L' + }, + 'FlightDetail': { + 'FlightDuration': { + 'Value': '' + }, + 'Stops': { + 'StopQuantity': '0' + } + }, + 'origin': { + 'locationType': 'airport', + 'iataCode': 'YYC' + }, + 'destination': { + 'locationType': 'airport', + 'iataCode': 'YYZ' + }, + 'departureTime': '2020-09-14T13:00:00.000Z', + 'arrivalTime': '2020-09-14T16:50:00.000Z', + 'aggregationKey': 'ACAC01342020-09-14T13:00:00.000Z2020-09-14T16:50:00.000Z' + }, + { + 'id': 'G9OG66SX2J-SEG2', + 'operator': { + 'operatorType': 'airline', + 'iataCode': 'RV', + 'flightNumber': 'AC1544' + }, + 'Departure': { + 'AirportCode': 'YYZ', + 'Date': '2020-09-14', + 'Time': '14:50', + 'Terminal': { + 'Name': '1' + } + }, + 'Arrival': { + 'AirportCode': 'YYT', + 'Date': '2020-09-14', + 'Time': '19:19' + }, + 'MarketingCarrier': { + 'AirlineID': 'AC', + 'Name': 'Air Canada', + 'FlightNumber': '1544', + 'ResBookDesigCode': 'L' + }, + 'OperatingCarrier': { + 'Disclosures': { + 'Description': { + 'Text': 'ssGCPeUH4oRvF8SySYd5TV8dpcsYUV67DAplC3QvK8JRyNVshs872/HE8VDWF/tNaGtED8EIJYrlpn8XB8pRX6r+QhxHHDS4OduCOeU5xip/veYLBfhQ9w==' + } + } + }, + 'Equipment': { + 'AircraftCode': '321' + }, + 'ClassOfService': { + 'Code': 'L' + }, + 'FlightDetail': { + 'FlightDuration': { + 'Value': '' + }, + 'Stops': { + 'StopQuantity': '0' + } + }, + 'origin': { + 'locationType': 'airport', + 'iataCode': 'YYZ' + }, + 'destination': { + 'locationType': 'airport', + 'iataCode': 'YYT' + }, + 'departureTime': '2020-09-14T18:50:00.000Z', + 'arrivalTime': '2020-09-14T21:49:00.000Z', + 'aggregationKey': 'ACAC15442020-09-14T18:50:00.000Z2020-09-14T21:49:00.000Z' + } + ], + 'destinations': [ + { + 'id': 'ZDD89UNQMB-OD1', + 'DepartureCode': 'YYC', + 'ArrivalCode': 'YYT', + 'FlightReferences': 'B69B4WF4RW-SEG1 G9OG66SX2J-SEG2' + } + ], + 'passengers': { + 'ADT': ['3E6B41DD'], + 'CHD': ['1C966E35'] + }, + 'mappedPassengers': { + '3E6B41DD': 'HZVZHYSXJY-T1', + 'undefined': 'M70ZNQOMCV-T2', + '1C966E35': 'HPGK78FGON-T3' + } + } + } + ]; + const card = { + accountNumber: '4444333322221111', + brand: 'visa', + cvv: '737', + expiryMonth: '10', + expiryYear: '2020', + id: 'e6266e16-eb45-4781-9788-271553dc6657', + type: 'debit' + }; + + describe('#mapRequestData', () => { + const hotelCodes = [ + '02034', + '02035', + '02036' + ]; + + const body = { + accommodation: { + location: { + rectangle: { + north: '59', + south: '57', + west: '11', + east: '20' + } + }, + arrival: '2020-09-02T00:00:00Z', + departure: '2020-09-03T00:00:00Z' + }, + passengers: [ + { + type: 'ADT', + count: 2 + }, + { + type: 'CHD', + count: 1 + } + ] + }; + + it('should throw if wrong hotelCodes property has been provided', async () => { + (() => mapRequestData(undefined, body)).should.to.throw; + (() => mapRequestData({}, body)).should.to.throw; + (() => mapRequestData([], body)).should.to.throw; + }); + + it('should throw if wrong accommodation property has been provided', async () => { + // undefined accommodation + (() => mapRequestData( + hotelCodes, + Object.assign({}, body, { accommodation: undefined }) + )).should.to.throw; + // undefined arrival + (() => mapRequestData( + hotelCodes, + Object.assign({}, body, { accommodation: { + arrival: undefined, + departure: '2020-09-03T00:00:00Z' + } }) + )).should.to.throw; + // empty arrival + (() => mapRequestData( + hotelCodes, + Object.assign({}, body, { accommodation: { + arrival: '', + departure: '2020-09-03T00:00:00Z' + } }) + )).should.to.throw; + }); + + it('should throw if wrong passengers property has been provided', async () => { + // undefined passengers + (() => mapRequestData( + hotelCodes, + Object.assign({}, body, { passengers: undefined }) + )).should.to.throw; + // broken passengers + (() => mapRequestData( + hotelCodes, + Object.assign({}, body, { passengers: {} }) + )).should.to.throw; + // empty passengers + (() => mapRequestData( + hotelCodes, + Object.assign({}, body, { passengers: [] }) + )).should.to.throw; + }); + + it('should map request data', async () => { + const result = mapRequestData(hotelCodes, body); + + (result).should.be.an('object').to.have.property('OTA_HotelAvailRQ').to.be.an('object'); + (result.OTA_HotelAvailRQ).should.to.have.property('TimeStamp').to.match(regex.dateISO); + (result.OTA_HotelAvailRQ).should.to.have.property('Version').to.match(regex.dotVersioning); + (result.OTA_HotelAvailRQ).should.to.have.property('PrimaryLangID').to.match(regex.langCode); + (result.OTA_HotelAvailRQ).should.to.have.property('AvailRatesOnly').to.be.a('boolean'); + (result.OTA_HotelAvailRQ).should.to.have.property('RequestedCurrency').to.match(regex.currencyCode);; + (result.OTA_HotelAvailRQ).should.to.have.property('Type').to.be.a('string'); + (result.OTA_HotelAvailRQ).should.to.have.property('ID').to.be.a('string'); + (result.OTA_HotelAvailRQ).should.to.have.property('xmlns').to.equal('http://www.opentravel.org/OTA/2003/05'); + (result.OTA_HotelAvailRQ).should.to.have.property('POS').to.be.an('object'); + (result.OTA_HotelAvailRQ).should.to.have.property('AvailRequestSegments').to.be.an('object'); + (result.OTA_HotelAvailRQ).should.to.have.property('TPA_Extensions').to.be.an('object'); + + (result.OTA_HotelAvailRQ.POS).should.to.have.property('Source').to.be.an('object'); + (result.OTA_HotelAvailRQ.POS.Source).should.to.have.property('RequestorID').to.be.an('object'); + (result.OTA_HotelAvailRQ.POS.Source).should.to.have.property('BookingChannel').to.be.an('object'); + (result.OTA_HotelAvailRQ.POS.Source.RequestorID).should.to.have.property('ID').to.be.a('string'); + (result.OTA_HotelAvailRQ.POS.Source.RequestorID).should.to.have.property('MessagePassword').to.be.a('string'); + (result.OTA_HotelAvailRQ.POS.Source.RequestorID).should.to.have.property('Name').to.be.a('string'); + (result.OTA_HotelAvailRQ.POS.Source.RequestorID).should.to.have.property('Type').to.be.a('string'); + + (result.OTA_HotelAvailRQ.AvailRequestSegments).should.to.have.property('AvailRequestSegment').to.be.an('object'); + (result.OTA_HotelAvailRQ.AvailRequestSegments.AvailRequestSegment).should.to.have.property('AvailReqType').to.be.a('string'); + (result.OTA_HotelAvailRQ.AvailRequestSegments.AvailRequestSegment).should.to.have.property('HotelSearchCriteria').to.be.an('array'); + + // HotelRef + result.OTA_HotelAvailRQ.AvailRequestSegments.AvailRequestSegment.HotelSearchCriteria.forEach(h => { + (h).should.be.an('object').to.have.property('HotelRef').be.an('object'); + validateHotelRef(h.HotelRef); + }); + }); + }); + + describe('#hotelAvailRequestTemplate', () => { + // decide is it required to test this function + }); + + describe('#mapFromOffer', () => { + const offer = { + provider: 'erevmax', + hotelCode: '07119', + rateCode: 'LSAVE', + roomTypeCode: 'ND', + rates: [ + { + effectiveDate: '2020-07-02', + expireDate: '2020-07-03', + timeUnit: 'Day', + unitMultiplier: '1', + currency: 'SEK', + amountAfterTax: '776.0' + } + ], + guestCounts: [ { type: 'ADT', count: 2 }, { type: 'CHD', count: 1 } ], + effectiveDate: '2020-07-02', + expireDate: '2020-07-03', + amountBeforeTax: '640.0', + amountAfterTax: '776.0', + currency: 'SEK' + }; + const passengers = { + PAX1: { + type: 'ADT', + civility: 'MR', + lastnames: [ 'Marley' ], + firstnames: [ 'Bob' ], + gender: 'Male', + birthdate: '1980-03-21T00:00:00Z', + contactInformation: [ '+32123456789', 'contact@org.co.uk' ] + } + }; + + it('should to trow if offer has not been provided', async () => { + (() => mapFromOffer(undefined, passengers, card)).should.to.throw; + (() => mapFromOffer({}, passengers, card)).should.to.throw; + (() => mapFromOffer([], passengers, card)).should.to.throw; + }); + + it('should to trow if passengers has not been provided', async () => { + (() => mapFromOffer(offer, undefined, card)).should.to.throw; + (() => mapFromOffer(offer, {}, card)).should.to.throw; + (() => mapFromOffer(offer, [], card)).should.to.throw; + }); + + it('should to trow if card has not been provided', async () => { + (() => mapFromOffer(offer, passengers, undefined)).should.to.throw; + (() => mapFromOffer(offer, passengers, {})).should.to.throw; + (() => mapFromOffer(offer, passengers, [])).should.to.throw; + }); + + it('should fulfill', async () => { + const result = mapFromOffer(offer, passengers, card); + (result).should.be.an('object').to.have.property('OTA_HotelResNotifRQ').to.be.an('object'); + (result.OTA_HotelResNotifRQ).should.to.have.property('ResStatus').to.be.a('string'); + (result.OTA_HotelResNotifRQ).should.to.have.property('Version').to.be.a('string'); + (result.OTA_HotelResNotifRQ).should.to.have.property('TimeStamp').to.be.a('string'); + (result.OTA_HotelResNotifRQ).should.to.have.property('xmlns').to.equal('http://www.opentravel.org/OTA/2003/05'); + (result.OTA_HotelResNotifRQ).should.to.have.property('EchoToken').to.be.a('string'); + (result.OTA_HotelResNotifRQ).should.to.have.property('POS').to.be.an('object'); + (result.OTA_HotelResNotifRQ).should.to.have.property('HotelReservations').to.be.an('object'); + + (result.OTA_HotelResNotifRQ.POS).should.to.have.property('Source').to.be.an('object'); + (result.OTA_HotelResNotifRQ.POS.Source).should.to.have.property('RequestorID').to.be.an('object'); + (result.OTA_HotelResNotifRQ.POS.Source).should.to.have.property('BookingChannel').to.be.an('object'); + (result.OTA_HotelResNotifRQ.POS.Source.RequestorID).should.to.have.property('ID').to.be.a('string'); + (result.OTA_HotelResNotifRQ.POS.Source.RequestorID).should.to.have.property('Type').to.be.a('string'); + + (result.OTA_HotelResNotifRQ.HotelReservations).should.to.have.property('HotelReservation'); + (result.OTA_HotelResNotifRQ.HotelReservations.HotelReservation).should.to.have.property('CreateDateTime').to.match(regex.dateISO); + (result.OTA_HotelResNotifRQ.HotelReservations.HotelReservation).should.to.have.property('CreatorID').to.be.a('string'); + (result.OTA_HotelResNotifRQ.HotelReservations.HotelReservation).should.to.have.property('ResStatus').to.be.a('string'); + (result.OTA_HotelResNotifRQ.HotelReservations.HotelReservation).should.to.have.property('UniqueID').to.be.an('object'); + (result.OTA_HotelResNotifRQ.HotelReservations.HotelReservation).should.to.have.property('RoomStays').to.be.an('object'); + (result.OTA_HotelResNotifRQ.HotelReservations.HotelReservation).should.to.have.property('ResGuests').to.be.an('object'); + (result.OTA_HotelResNotifRQ.HotelReservations.HotelReservation).should.to.have.property('ResGlobalInfo').to.be.an('object'); + }); + }); + + describe('#buildCustomerAddress', () => { + const pax = { + type: 'ADT', + civility: 'MR', + lastnames: [ 'Marley' ], + firstnames: [ 'Bob' ], + gender: 'Male', + birthdate: '1980-03-21T00:00:00Z', + contactInformation: [ '+32123456789', 'contact@org.co.uk' ], + address: { + lines: [ + 'str. One', + 'flat 2' + ], + city: 'City', + postalCode: '1234567', + subdivision: '', + country: 'PL' + } + }; + + it('should to throw if wrong pax has been provided', async () => { + (() => buildCustomerAddress(Object.assign({}, pax, { address: 'wrongType' }))).should.to.throw; + }); + + it('should build customer address', async () => { + const result = buildCustomerAddress(pax); + (result).should.be.an('object').to.have.property('Type').to.equal('1'); + (result).should.to.have.property('AddressLines').to.deep.equal(pax.address.lines); + (result).should.to.have.property('CityName').to.equal(pax.address.city); + (result).should.to.have.property('PostalCode').to.equal(pax.address.postalCode); + (result).should.to.have.property('StateProv').to.equal(pax.address.subdivision); + (result).should.to.have.property('CountryName').to.be.an('object') + .to.have.property('Code').to.equal(pax.address.country); + }); + }); + + describe('#expandPassengers', () => { + const passengers = [ + { + type: 'ADT', + count: 2 + }, + { + type: 'CHD' + } + ]; + + it('should to throw if wrong passengers provided', async () => { + (() => expandPassengers(undefined)).should.to.throw; + (() => expandPassengers('wrongType')).should.to.throw; + (() => expandPassengers({})).should.to.throw; + }); + + it('should expand passengers from request', async () => { + const result = expandPassengers(passengers); + (result).should.be.an('array'); + result.forEach(p => { + (p).should.be.an('object').to.have.property('type').to.match(/^ADT|CHD$/); + }); + }); + }); + + describe('#mapNdcRequestData_AC', () => { + const body = { + 'itinerary': { + 'segments': [ + { + 'origin': { + 'locationType': 'airport', + 'iataCode': 'YYC' + }, + 'destination': { + 'locationType': 'airport', + 'iataCode': 'YYT' + }, + 'departureTime': '2020-09-14T00:00:00Z' + } + ] + }, + 'passengers': [ + { + 'type': 'ADT', + 'count': 2 + }, + { + 'type': 'CHD' + } + ] + }; + + it('should to throw if wrong config has been provided', async () => { + docIds.forEach(docType => { + (() => mapNdcRequestData_AC(undefined, body, docType)).should.to.throw; + (() => mapNdcRequestData_AC('', body, docType)).should.to.throw; + (() => mapNdcRequestData_AC([], body, docType)).should.to.throw; + }); + }); + + it('should to throw if wrong body has been provided', async () => { + const brokenBody = Object.assign({}, body, { + itinerary: undefined + }); + docIds.forEach(docType => { + (() => mapNdcRequestData_AC(airCanadaConfig, undefined, docType)).should.to.throw; + (() => mapNdcRequestData_AC(airCanadaConfig, [], docType)).should.to.throw; + (() => mapNdcRequestData_AC(airCanadaConfig, brokenBody, docType)).should.to.throw; + }); + }); + + it('should produce broken data if wrong docType has been provided', async () => { + const result = mapNdcRequestData_AC(airCanadaConfig, body, 'unknownType'); + (result).should.to.have.property('Document').to.be.an('object') + .to.have.property('@id').to.not.be.oneOf(docIds); + }); + + it('should map request data', async () => { + docIds.forEach(docType => { + const result = mapNdcRequestData_AC(airCanadaConfig, body, docType); + // validate first level only + (result).should.to.be.an('object'); + (result).should.to.have.property('PointOfSale').to.be.an('object'); + (result).should.to.have.property('Party').to.be.an('object'); + (result).should.to.have.property('Document').to.be.an('object') + .to.have.property('@id').to.equal(docType) + .to.be.oneOf(docIds); + (result).should.to.have.property('CoreQuery').to.be.an('object'); + (result).should.to.have.property('DataLists').to.be.an('object'); + }); + }); + }); + + describe('offerPrice', () => { + + describe('#mapNdcRequestData_AC:offerPrice', () => { + + it('should to throw if wrong config has been provided', async () => { + docIds.forEach(docType => { + (() => mapNdcRequestData_AC_offerPrice(undefined, offers, body, docType)).should.to.throw; + (() => mapNdcRequestData_AC_offerPrice('', offers, body, docType)).should.to.throw; + (() => mapNdcRequestData_AC_offerPrice([], offers, body, docType)).should.to.throw; + }); + }); + + it('should to throw if wrong offers object has been provided', async () => { + docIds.forEach(docType => { + (() => mapNdcRequestData_AC_offerPrice(airCanadaConfig, undefined, body, docType)).should.to.throw; + (() => mapNdcRequestData_AC_offerPrice(airCanadaConfig, '', body, docType)).should.to.throw; + (() => mapNdcRequestData_AC_offerPrice(airCanadaConfig, {}, body, docType)).should.to.throw; + }); + }); + + it('should to throw if wrong body has been provided', async () => { + const brokenBody = Object.assign({}, body, { + itinerary: undefined + }); + docIds.forEach(docType => { + (() => mapNdcRequestData_AC_offerPrice(airCanadaConfig, offers, undefined, docType)).should.to.throw; + (() => mapNdcRequestData_AC_offerPrice(airCanadaConfig, offers, [], docType)).should.to.throw; + (() => mapNdcRequestData_AC_offerPrice(airCanadaConfig, offers, brokenBody, docType)).should.to.throw; + }); + }); + + it('should map request data', async () => { + docIds.forEach(docType => { + const result = mapNdcRequestData_AC_offerPrice( + airCanadaConfig, + offers, + body, + docType + ); + // validate first level only + (result).should.to.be.an('object'); + (result).should.to.have.property('PointOfSale').to.be.an('object'); + (result).should.to.have.property('Party').to.be.an('object'); + (result).should.to.have.property('Document').to.be.an('object') + .to.have.property('@id').to.equal(docType) + .to.be.oneOf(docIds); + (result).should.to.have.property('Query').to.be.an('object') + .to.have.property('Offer'); + (result).should.to.have.property('DataLists').to.be.an('object'); + }); + }); + }); + }); + + describe('seatAvailability', () => { + + describe('#mapNdcRequestData_AC:seatAvailability', () => { + + it('should to throw if wrong config has been provided', async () => { + docIds.forEach(docType => { + (() => mapNdcRequestData_AC_seatAvailability(undefined, offers, docType)).should.to.throw; + (() => mapNdcRequestData_AC_seatAvailability('', offers, docType)).should.to.throw; + (() => mapNdcRequestData_AC_seatAvailability([], offers, docType)).should.to.throw; + }); + }); + + it('should to throw if wrong offers object has been provided', async () => { + docIds.forEach(docType => { + (() => mapNdcRequestData_AC_seatAvailability(airCanadaConfig, undefined, docType)).should.to.throw; + (() => mapNdcRequestData_AC_seatAvailability(airCanadaConfig, '', docType)).should.to.throw; + (() => mapNdcRequestData_AC_seatAvailability(airCanadaConfig, {}, docType)).should.to.throw; + }); + }); + + it('should map request data', async () => { + docIds.forEach(docType => { + const result = mapNdcRequestData_AC_seatAvailability( + airCanadaConfig, + offers, + docType + ); + // validate first level only + (result).should.to.be.an('object'); + (result).should.to.have.property('PointOfSale').to.be.an('object'); + (result).should.to.have.property('Party').to.be.an('object'); + (result).should.to.have.property('Document').to.be.an('object') + .to.have.property('@id').to.equal(docType) + .to.be.oneOf(docIds); + (result).should.to.have.property('Query').to.be.an('object') + .to.have.property('Offer'); + (result).should.to.have.property('DataLists').to.be.an('object'); + }); + }); + }); + }); + + describe('fulfillOrder', () => { + + describe('#mapNdcRequestData_AC:fulfillOrder', () => { + const guaranteeClaim = { + card + }; + const order = { + orderId: 'e6266e16-eb45-4781-9788-271553dc6657', + order: { + order: { + price: { + currency: 'EN', + public: '' + } + } + } + }; + + it('should to throw if wrong config has been provided', async () => { + (() => mapNdcRequestData_AC_fulfillOrder(undefined, order, {}, guaranteeClaim)).should.to.throw; + (() => mapNdcRequestData_AC_fulfillOrder('', order, {}, guaranteeClaim)).should.to.throw; + (() => mapNdcRequestData_AC_fulfillOrder([], order, {}, guaranteeClaim)).should.to.throw; + }); + + it('should to throw if wrong order object has been provided', async () => { + (() => mapNdcRequestData_AC_fulfillOrder(airCanadaConfig, undefined, {}, guaranteeClaim)).should.to.throw; + (() => mapNdcRequestData_AC_fulfillOrder(airCanadaConfig, '', {}, guaranteeClaim)).should.to.throw; + (() => mapNdcRequestData_AC_fulfillOrder(airCanadaConfig, {}, {}, guaranteeClaim)).should.to.throw; + }); + + it('should to throw if wrong guaranteeClaim object has been provided', async () => { + (() => mapNdcRequestData_AC_fulfillOrder(airCanadaConfig, order, {}, undefined)).should.to.throw; + (() => mapNdcRequestData_AC_fulfillOrder(airCanadaConfig, order, {}, '')).should.to.throw; + (() => mapNdcRequestData_AC_fulfillOrder(airCanadaConfig, order, {}, {})).should.to.throw; + }); + + it('should map request data', async () => { + const result = mapNdcRequestData_AC_fulfillOrder( + airCanadaConfig, + order, + {}, + guaranteeClaim + ); + // validate first level only + (result).should.to.be.an('object'); + (result).should.to.have.property('apiKey').to.be.a('string'); + (result).should.to.have.property('commission').to.be.a('string'); + (result).should.to.have.property('baseUrl').to.be.a('string') + .to.equal('https://ndchub.mconnect.aero/messaging/v2/ndc-exchange/'); + (result).should.to.have.property('baseUrlPci').to.be.a('string') + .to.equal('https://pci.ndchub.mconnect.aero/messaging/v2/ndc-exchange/'); + (result).should.to.have.property('PointOfSale').to.be.an('object'); + (result).should.to.have.property('Document').to.be.an('object') + .to.have.property('@id').to.be.oneOf(docIds); + (result).should.to.have.property('Party').to.be.an('object'); + (result).should.to.have.property('Query').to.be.an('object') + .to.have.property('OrderID').to.match(regex.uuid); + (result.Query).should.to.have.property('ActionContext').to.be.a('number'); + (result.Query).should.to.have.property('Payments').to.be.an('object'); + }); + }); + }); + + describe('createOrder', () => { + const guaranteeClaim = { + card + }; + + describe('#getACSystemIdOrderCreateRQ', () => { + const environments = [ + { + value: 'development', + pci: true, + res: 'DEV-PCI' + }, + { + value: 'staging', + pci: true, + res: 'DEV-PCI' + }, + { + value: 'production', + pci: true, + res: 'PROD' + }, + { + value: 'development', + pci: false, + res: 'DEV' + }, + { + value: 'staging', + pci: false, + res: 'DEV' + }, + { + value: 'production', + pci: false, + res: 'PROD' + } + ]; + + after(async () => { + process.env.TESTING_ENV = undefined; + }); + + it('should map request data', async () => { + environments.forEach(env => { + process.env.TESTING_ENV = env.value; + const result = getACSystemIdOrderCreateRQ(env.pci); + (result).should.to.equal(env.res); + }); + }); + }); + + describe('#mapNdcRequestHeaderData_AC', () => { + const environments = [ + { + value: 'development', + guaranteeClaim, + res: 'DEV-PCI' + }, + { + value: 'staging', + guaranteeClaim, + res: 'DEV-PCI' + }, + { + value: 'production', + guaranteeClaim, + res: 'PROD-PCI' + }, + { + value: 'development', + guaranteeClaim: undefined, + res: 'DEV' + }, + { + value: 'staging', + guaranteeClaim: undefined, + res: 'DEV' + }, + { + value: 'production', + guaranteeClaim: undefined, + res: 'PROD' + } + ]; + + after(async () => { + process.env.TESTING_ENV = undefined; + }); + + it('should to throw if wrong guaranteeClaim has been provided', async () => { + (() => mapNdcRequestHeaderData_AC('')).should.to.throw; + (() => mapNdcRequestHeaderData_AC([])).should.to.throw; + (() => mapNdcRequestHeaderData_AC({})).should.to.throw; + }); + + it('should map request data', async () => { + environments.forEach(env => { + process.env.TESTING_ENV = env.value; + const result = mapNdcRequestHeaderData_AC(env.guaranteeClaim); + (result).should.to.be.an('object'); + (result).should.to.have.property('Function').to.equal('OrderCreateRQ'); + (result).should.to.have.property('SchemaType').to.equal('NDC'); + (result).should.to.have.property('SchemaVersion').to.equal('YY.2017.2'); + (result).should.to.have.property('Sender').to.be.an('object'); + (result.Sender).should.to.have.property('Address').to.be.an('object') + .to.have.property('Company').to.equal('WindingTree'); + (result.Sender.Address).should.to.have.property('NDCSystemId') + .to.equal(env.res); + }); + }); + }); + + describe('#mapNdcRequestData_AC:createOrder', () => { + const offer = { + provider: 'erevmax', + hotelCode: '07119', + rateCode: 'LSAVE', + roomTypeCode: 'ND', + rates: [ + { + effectiveDate: '2020-07-02', + expireDate: '2020-07-03', + timeUnit: 'Day', + unitMultiplier: '1', + currency: 'SEK', + amountAfterTax: '776.0' + } + ], + guestCounts: [ { type: 'ADT', count: 2 }, { type: 'CHD', count: 1 } ], + effectiveDate: '2020-07-02', + expireDate: '2020-07-03', + amountBeforeTax: '640.0', + amountAfterTax: '776.0', + currency: 'SEK', + 'offerItems': { + 'HAS54TFEWO-OfferItemID-83': { + 'passengerReferences': '2251290F 94E54927' + }, + 'KPIC3IX1DH-OfferItemID-84': { + 'passengerReferences': '2251290F' + } + }, + extraData: { + 'offerId': 'M8RJJL3J8X-OfferID-1', + 'segments': [ + { + 'id': 'HIXRSLG2KS-SEG1', + 'operator': { + 'operatorType': 'airline', + 'iataCode': 'AC', + 'flightNumber': 'AC0134' + }, + 'Departure': { + 'AirportCode': 'YYC', + 'Date': '2020-09-14', + 'Time': '07:00' + }, + 'Arrival': { + 'AirportCode': 'YYZ', + 'Date': '2020-09-14', + 'Time': '12:50', + 'Terminal': { + 'Name': '1' + } + }, + 'MarketingCarrier': { + 'AirlineID': 'AC', + 'Name': 'Air Canada', + 'FlightNumber': '134', + 'ResBookDesigCode': 'L' + }, + 'OperatingCarrier': { + 'Disclosures': { + 'Description': { + 'Text': 'R43JX9KFlNGatxTgPk4W7tezJWT2Vuj8UnlLUkThnLG/17BjuAKyJRzQOOvKf1zI8ekioOTIFxjLK2Q44/2u8oD0eWQcKaLQSVSp+soTuqMcep+YABFdWqrYvC1N3Gl/5mTFuZAO5Ed6Ja5ZbLy4rw==' + } + } + }, + 'Equipment': { + 'AircraftCode': '7M8' + }, + 'ClassOfService': { + 'Code': 'L' + }, + 'FlightDetail': { + 'FlightDuration': { + 'Value': '' + }, + 'Stops': { + 'StopQuantity': '0' + } + }, + 'origin': { + 'locationType': 'airport', + 'iataCode': 'YYC' + }, + 'destination': { + 'locationType': 'airport', + 'iataCode': 'YYZ' + }, + 'departureTime': '2020-09-14T13:00:00.000Z', + 'arrivalTime': '2020-09-14T16:50:00.000Z', + 'aggregationKey': 'ACAC01342020-09-14T13:00:00.000Z2020-09-14T16:50:00.000Z' + }, + { + 'id': 'DK5P6ZER15-SEG2', + 'operator': { + 'operatorType': 'airline', + 'iataCode': 'RV', + 'flightNumber': 'AC1544' + }, + 'Departure': { + 'AirportCode': 'YYZ', + 'Date': '2020-09-14', + 'Time': '14:50', + 'Terminal': { + 'Name': '1' + } + }, + 'Arrival': { + 'AirportCode': 'YYT', + 'Date': '2020-09-14', + 'Time': '19:19' + }, + 'MarketingCarrier': { + 'AirlineID': 'AC', + 'Name': 'Air Canada', + 'FlightNumber': '1544', + 'ResBookDesigCode': 'L' + }, + 'OperatingCarrier': { + 'Disclosures': { + 'Description': { + 'Text': 'R43JX9KFlNGatxTgPk4W7jNn8zCOXqoJDAplC3QvK8JRyNVshs872/HE8VDWF/tNaGtED8EIJYrlpn8XB8pRX6r+QhxHHDS4OduCOeU5xip/veYLBfhQ9w==' + } + } + }, + 'Equipment': { + 'AircraftCode': '321' + }, + 'ClassOfService': { + 'Code': 'L' + }, + 'FlightDetail': { + 'FlightDuration': { + 'Value': '' + }, + 'Stops': { + 'StopQuantity': '0' + } + }, + 'origin': { + 'locationType': 'airport', + 'iataCode': 'YYZ' + }, + 'destination': { + 'locationType': 'airport', + 'iataCode': 'YYT' + }, + 'departureTime': '2020-09-14T18:50:00.000Z', + 'arrivalTime': '2020-09-14T21:49:00.000Z', + 'aggregationKey': 'ACAC15442020-09-14T18:50:00.000Z2020-09-14T21:49:00.000Z' + } + ], + 'destinations': [ + { + 'id': 'V1I4BXC0HW-OD1', + 'DepartureCode': 'YYC', + 'ArrivalCode': 'YYT', + 'FlightReferences': 'HIXRSLG2KS-SEG1 DK5P6ZER15-SEG2' + } + ], + 'passengers': { + 'ADT': ['2251290F'], + 'CHD': ['94E54927'] + }, + 'mappedPassengers': { + '2251290F': 'GS6AQGWK16-T1', + '94E54927': 'V2BNN2YR9L-T3' + }, + 'options': [], + 'seats': [ + { + 'code': 'divNonAir05.ASPW_0', + 'name': 'Lounge Access', + 'description': 'An access to the Exclusive Lounge Access at the departure', + 'segment': 'QUFRM4G5V4-SEG1', + 'passenger': 'PAX1', + 'seatNumber': '12A', + 'price': { + 'currency': 'CAD', + 'public': '50.40', + 'commission': '0.00', + 'taxes': '2.40' + }, + 'taxes': [] + }, + { + 'code': 'divNonAir15.ASPW_1', + 'name': 'Lounge Access', + 'description': 'An access to the Exclusive Lounge Access at the departure', + 'segment': 'QUFRM4G5V4-SEG1', + 'passenger': 'PAX1', + 'seatNumber': '12A', + 'price': { + 'currency': 'CAD', + 'public': '43.05', + 'commission': '0.00', + 'taxes': '2.05' + }, + 'taxes': [] + } + ] + } + }; + const body = { + 'offerId': '11111111-2222-3333-4444-000000000001', + 'guaranteeId': '02a1a7c0-3ff8-4e12-a3ba-65d57e1e9276', + 'passengers': { + 'PAX1': { + 'type': 'ADT', + 'civility': 'MR', + 'lastnames': [ + 'Marley' + ], + 'firstnames': [ + 'Bob' + ], + 'gender': 'Male', + 'birthdate': '1980-03-21T00:00:00Z', + 'contactInformation': [ + '+32123456789', + 'contact@org.co.uk' + ] + } + } + }; + + it('should to throw if wrong config has been provided', async () => { + (() => mapNdcRequestData_AC_createOrder('', offer, body, guaranteeClaim, true)).should.to.throw; + (() => mapNdcRequestData_AC_createOrder([], offer, body, guaranteeClaim, true)).should.to.throw; + (() => mapNdcRequestData_AC_createOrder({}, offer, body, guaranteeClaim, true)).should.to.throw; + }); + + it('should to throw if wrong offer has been provided', async () => { + (() => mapNdcRequestData_AC_createOrder(airCanadaConfig, '', body, guaranteeClaim, true)).should.to.throw; + (() => mapNdcRequestData_AC_createOrder(airCanadaConfig, [], body, guaranteeClaim, true)).should.to.throw; + (() => mapNdcRequestData_AC_createOrder(airCanadaConfig, {}, body, guaranteeClaim, true)).should.to.throw; + }); + + it('should to throw if wrong body has been provided', async () => { + (() => mapNdcRequestData_AC_createOrder(airCanadaConfig, body, '', guaranteeClaim, true)).should.to.throw; + (() => mapNdcRequestData_AC_createOrder(airCanadaConfig, body, [], guaranteeClaim, true)).should.to.throw; + (() => mapNdcRequestData_AC_createOrder(airCanadaConfig, body, {}, guaranteeClaim, true)).should.to.throw; + }); + + it('should map request data', async () => { + docIds.forEach(docType => { + const noSeatsOffer = JSON.parse(JSON.stringify(offer)); + noSeatsOffer.extraData.seats = undefined; + let result = mapNdcRequestData_AC_createOrder( + airCanadaConfig, + noSeatsOffer, + body, + guaranteeClaim, + docType + ); + // validate first level only + (result).should.to.be.an('object'); + (result).should.to.have.property('PointOfSale').to.be.an('object'); + (result).should.to.have.property('Party').to.be.an('object'); + (result).should.to.have.property('Document').to.be.an('object') + .to.have.property('@id').to.equal(docType) + .to.be.oneOf(docIds); + (result).should.to.have.property('Query').to.be.an('object') + .to.have.property('Order') + .to.be.an('object') + .to.have.property('Offer') + .to.be.an('object') + .to.have.property('OfferItem') + .to.be.an('array'); + (result.Query).should.to.have.property('Payments').to.be.an('object'); + (result.Query).should.to.have.property('DataLists').to.be.an('object'); + + result = mapNdcRequestData_AC_createOrder( + airCanadaConfig, + offer, + body, + guaranteeClaim, + docType + ); + (result).should.to.have.property('Query').to.be.an('object') + .to.have.property('Order') + .to.be.an('object') + .to.have.property('OrderItem') + .to.be.an('array'); + }); + }); + }); + }); +}); diff --git a/test/spec/utils.js b/test/spec/utils.js new file mode 100644 index 00000000..71fa18f6 --- /dev/null +++ b/test/spec/utils.js @@ -0,0 +1,154 @@ +const GliderError = require('../../helpers/error'); +const { + getCardCode, + cardCodesOTA, + cardCodesIATA +} = require('../../helpers/transformInputData/utils/cardUtils'); +const { + uniqueObjectsList, + flatOneDepth +} = require('../../helpers/transformInputData/utils/collections'); +const { + mapGuestCounts +} = require('../../helpers/soapTemplates/ota/otaUtils'); + +require('chai').should(); + +describe('Utils', () => { + + describe('Helpers/**/utils', () => { + + describe('#getCardCode', () => { + const cardsSet = [ + { + type: 'ota', + source: cardCodesOTA + }, + { + type: 'iata', + source: cardCodesIATA + } + ]; + + it('should to throw if wrong card has been provided', async () => { + cardsSet.forEach(({ type }) => { + (() => getCardCode({ + brand: undefined + }, type)).should.to.throw; + (() => getCardCode({ + brand: 'UNKNOWN_CARD' + }, type)).should.to.throw; + (() => getCardCode({ + brand: [] + }, type)).should.to.throw; + (() => getCardCode({ + brand: {} + }, type)).should.to.throw; + }); + }); + + it('should to throw if wrong type has been provided', async () => { + cardsSet.forEach(({ source }) => { + Object.keys(source).forEach(c => { + (() => getCardCode({ + brand: c + }, undefined)).should + .to.throw(GliderError, 'Missing Card Code type') + .with.property('status', 500); + (() => getCardCode({ + brand: c + }, 'UNKNOWN_TYPE')).should + .to.throw(GliderError, 'Missing Card Code type') + .with.property('status', 500); + }); + }); + }); + + it('should return card codes by type', async () => { + cardsSet.forEach(({ type, source }) => { + Object.keys(source).forEach(c => { + const result = getCardCode({ + brand: c + }, type); + (result).should.to.equal(source[c]); + }); + }); + }); + }); + + describe('#uniqueObjectsList', () => { + const arrayOfObjects = [ + { + a: 1 + }, + { + a: 2 + }, + { + c: 1 + }, + { + a: 1 + } + ]; + + it('should to throw if wrong array has been provided', async () => { + (() => uniqueObjectsList(undefined)).should.to.throw; + (() => uniqueObjectsList('wrongType')).should.to.throw; + (() => uniqueObjectsList({})).should.to.throw; + }); + + it('should return unique objects array', async () => { + const result = uniqueObjectsList(arrayOfObjects); + const uniquesSet = new Set(result); + (Array.from(uniquesSet)).should.to.deep.equal(result); + }); + }); + + describe('#flatOneDepth', () => { + const deepArray = [ + 1, + 2, + [ 3, 4, 5, [ 6 ] ], + [ 7 ], + 8 + ]; + const flatArray = [ + 1, 2, 3, + 4, 5, [ 6 ], + 7, 8 + ]; + + it('should to throw if wrong array has been provided', async () => { + (() => flatOneDepth(undefined)).should.to.throw; + (() => flatOneDepth('wrongType')).should.to.throw; + (() => flatOneDepth({})).should.to.throw; + }); + + it('should return flat array', async () => { + const result = flatOneDepth(deepArray); + (result).should.to.be.an('array').to.deep.equal(flatArray); + }); + }); + }); + + describe('soapTemplates/ota', () => { + + describe('#mapGuestCounts', () => { + const OTA_GuestCount = { + Count: 1, + AgeQualifyingCode: 10 + }; + + it('should map data', async () => { + const result = mapGuestCounts([ + OTA_GuestCount, + OTA_GuestCount + ]); + (result).should.equal(''); + }); + }); + }); +}); + + diff --git a/test/spec/xmlUtils.js b/test/spec/xmlUtils.js index 2b47e5e4..ec0909b7 100644 --- a/test/spec/xmlUtils.js +++ b/test/spec/xmlUtils.js @@ -1,22 +1,65 @@ require('chai').should(); -const { selectProvider } = require('../../helpers/resolvers/utils/flightUtils'); +const { + convertObjectToXML, + getACSystemId +} = require('../../helpers/soapTemplates/utils/xmlUtils'); -describe('Flight Utils', () => { +describe('XML Utils', () => { - describe('#selectProvider', () => { + describe('#convertObjectToXML', () => { + const xml = 'tag112'; + + const obj = { + Test: { + '@id': 123456, + tag1: 'tag1', + tags: { + tag2: [ + { + '@param1': 'param1', + '@param2': 'param2', + '@value': 1 + }, + { + '@param1': 'param1', + '@param2': 'param2', + '@value': 2 + } + ] + } + } + }; - it('should select AirCanada operator for proper orgin and destination', async () => { - const providers = selectProvider('YEA', 'YYC'); - (providers).should.be.an('array').to.have.length(1); - // (providers).should.be.an('array').to.have.length(2); - (providers).should.include('AC'); + it('should convert object to XML', async () => { + const result = convertObjectToXML(obj).join(''); + (result).should.equal(xml); + }); + + it('should not mutate source object', async () => { + const objOrig = JSON.stringify(obj); + convertObjectToXML(obj).join(''); + (JSON.stringify(obj)).should.equal(objOrig); + }); + }); + + describe('#getACSystemId', () => { + afterEach(async () => { + process.env.TESTING_ENV = undefined; + }); + + it('should return PROD on production env', async () => { + process.env.TESTING_ENV = 'production'; + (getACSystemId(true)).should.to.equal('PROD-PCI'); + (getACSystemId(false)).should.to.equal('PROD'); }); - it('should fetch an empty array in wrong origin and provided', async () => { - let providers; - providers = selectProvider('UNKNOWN', 'UNKNOWN'); - (providers).should.be.an('array').to.have.length(0); - // (providers).should.be.an('array').to.have.length(1); + it('should return DEV on development or staging env', async () => { + process.env.TESTING_ENV = 'development'; + (getACSystemId(true)).should.to.equal('DEV-PCI'); + (getACSystemId(false)).should.to.equal('DEV'); + process.env.TESTING_ENV = 'staging'; + (getACSystemId(true)).should.to.equal('DEV-PCI'); + (getACSystemId(false)).should.to.equal('DEV'); }); }); });