diff --git a/package.json b/package.json index c3c6150..7bbe704 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "eslint": "^5.7.0", "jest": "^23.6.0", "lerna": "^3.13.1", - "prettier": "^1.14.3" + "prettier": "^1.14.3", + "sequelize": "^5.18.4" } } diff --git a/packages/fhir-json-schema-validator/index.js b/packages/fhir-json-schema-validator/index.js index 23bd2eb..20a8dc1 100644 --- a/packages/fhir-json-schema-validator/index.js +++ b/packages/fhir-json-schema-validator/index.js @@ -51,7 +51,9 @@ class JSONSchemaValidator { if (verbose) { errors = this.validator.errors; } else { - let resourceValidate = this.ajv.compile(this.getSubSchema(resourceType)); + let resourceValidate = this.ajv.compile( + this.getSubSchema(resourceType), + ); resourceValidate(resource); errors = resourceValidate.errors; } diff --git a/packages/fhir-qb-mongo/index.js b/packages/fhir-qb-mongo/index.js index 96b0007..c544537 100644 --- a/packages/fhir-qb-mongo/index.js +++ b/packages/fhir-qb-mongo/index.js @@ -208,9 +208,11 @@ let assembleSearchQuery = function({ let toSuppress = {}; // Check that the necessary implementation parameters were passed through - let {archivedParamPath} = implementationParameters; + let { archivedParamPath } = implementationParameters; if (!archivedParamPath) { - throw new Error('Missing required implementation parameter \'archivedParamPath\''); + throw new Error( + "Missing required implementation parameter 'archivedParamPath'", + ); } // Construct the necessary joins and add them to the aggregate pipeline. Also follow each $lookup with an $unwind diff --git a/packages/fhir-qb-mongo/index.test.js b/packages/fhir-qb-mongo/index.test.js index c3c6ffe..a0364d6 100644 --- a/packages/fhir-qb-mongo/index.test.js +++ b/packages/fhir-qb-mongo/index.test.js @@ -215,7 +215,7 @@ describe('Mongo Query Builder Tests', () => { joinsToPerform: [], matchesToPerform: [], searchResultTransformations: {}, - implementationParameters: {archivedParamPath: 'meta._isArchived'}, + implementationParameters: { archivedParamPath: 'meta._isArchived' }, includeArchived: false, pageNumber: 1, resultsPerPage: 10, @@ -254,7 +254,7 @@ describe('Mongo Query Builder Tests', () => { joinsToPerform: [{ from: 'foo', localKey: 'bar', foreignKey: 'baz' }], matchesToPerform: [], searchResultTransformations: {}, - implementationParameters: {archivedParamPath: 'meta._isArchived'}, + implementationParameters: { archivedParamPath: 'meta._isArchived' }, includeArchived: false, pageNumber: 1, resultsPerPage: 10, @@ -284,7 +284,7 @@ describe('Mongo Query Builder Tests', () => { joinsToPerform: [], matchesToPerform: [[]], searchResultTransformations: {}, - implementationParameters: {archivedParamPath: 'meta._isArchived'}, + implementationParameters: { archivedParamPath: 'meta._isArchived' }, includeArchived: false, pageNumber: 1, resultsPerPage: 10, @@ -314,7 +314,7 @@ describe('Mongo Query Builder Tests', () => { joinsToPerform: [], matchesToPerform: [[{ foo: { $gte: 1, $lte: 10 } }]], searchResultTransformations: {}, - implementationParameters: {archivedParamPath: 'meta._isArchived'}, + implementationParameters: { archivedParamPath: 'meta._isArchived' }, includeArchived: false, pageNumber: 1, resultsPerPage: 10, @@ -346,7 +346,7 @@ describe('Mongo Query Builder Tests', () => { joinsToPerform: [], matchesToPerform: [], searchResultTransformations: { _count: 3 }, - implementationParameters: {archivedParamPath: 'meta._isArchived'}, + implementationParameters: { archivedParamPath: 'meta._isArchived' }, includeArchived: false, pageNumber: 1, resultsPerPage: 10, @@ -387,7 +387,7 @@ describe('Mongo Query Builder Tests', () => { joinsToPerform: [], matchesToPerform: [], searchResultTransformations: {}, - implementationParameters: {archivedParamPath: 'meta._isArchived'}, + implementationParameters: { archivedParamPath: 'meta._isArchived' }, includeArchived: false, pageNumber: 1, }); @@ -409,20 +409,22 @@ describe('Mongo Query Builder Tests', () => { } catch (err) { error = err; } - expect(error.message).toContain('Missing required implementation parameter \'archivedParamPath\''); + expect(error.message).toContain( + "Missing required implementation parameter 'archivedParamPath'", + ); }); test('Should return input query as is if we are not filtering out archived results', () => { const expectedResult = [ { $facet: { - data: [{ $skip: 0 }, {$limit: 10}], + data: [{ $skip: 0 }, { $limit: 10 }], metadata: [ { $count: 'total', }, { $addFields: { - numberOfPages: {$ceil: {$divide:['$total',10]}}, + numberOfPages: { $ceil: { $divide: ['$total', 10] } }, }, }, { @@ -438,10 +440,10 @@ describe('Mongo Query Builder Tests', () => { joinsToPerform: [], matchesToPerform: [], searchResultTransformations: {}, - implementationParameters: {archivedParamPath: 'meta._isArchived'}, + implementationParameters: { archivedParamPath: 'meta._isArchived' }, includeArchived: true, pageNumber: 1, - resultsPerPage: 10 + resultsPerPage: 10, }); expect(observedResult).toEqual(expectedResult); }); diff --git a/packages/fhir-qb-sql/CHANGELOG.md b/packages/fhir-qb-sql/CHANGELOG.md new file mode 100644 index 0000000..e4d87c4 --- /dev/null +++ b/packages/fhir-qb-sql/CHANGELOG.md @@ -0,0 +1,4 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. diff --git a/packages/fhir-qb-sql/README.md b/packages/fhir-qb-sql/README.md new file mode 100644 index 0000000..474ff4f --- /dev/null +++ b/packages/fhir-qb-sql/README.md @@ -0,0 +1,23 @@ +# FHIR-Query-Builder-SQL +> Utility for building SQL queries based on incoming requests. + +## Install +```shell +yarn add @asymmetrik/fhir-qb-sql +``` + +## Usage +This module is meant to be imported and used by the fhir-qb. Included are implementations of the following methods: +``` + assembleSearchQuery, + buildAndQuery, + buildComparatorQuery, + buildContainsQuery, + buildEndsWithQuery, + buildEqualToQuery, + buildExistsQuery, + buildOrQuery, + buildInRangeQuery, + buildStartsWithQuery, +``` +These are used by the fhir-qb to build a query that will work in the sql aggregation pipeline. diff --git a/packages/fhir-qb-sql/index.js b/packages/fhir-qb-sql/index.js new file mode 100644 index 0000000..1e23f6c --- /dev/null +++ b/packages/fhir-qb-sql/index.js @@ -0,0 +1,212 @@ +const Sequelize = require('sequelize'); +const Op = Sequelize.Op; + +let supportedSearchTransformations = {}; + +let formDateComparison = function(comparator, date, colName = 'value') { + return Sequelize.where( + Sequelize.fn('date', Sequelize.col(colName)), + comparator, + date, + ); +}; + +/** + * Takes in a list of queries and wraps them in an $and block + */ +let buildAndQuery = function(queries) { + return { [Op.and]: queries }; +}; + +/** + * Takes in a list of queries and wraps them in an $or block + */ +let buildOrQuery = function({ queries, invert = false }) { + if (invert) { + return { [Op.not]: { [Op.or]: queries } }; + } else { + return { [Op.or]: queries }; + } +}; + +/** + * Builds query to get records where the value of the field equal to the value. + * Setting invert to true will get records that are NOT equal instead. + */ +let buildEqualToQuery = function({ + field, + value, + invert = false, + isDate = false, +}) { + if (isDate) { + const comparator = invert ? '!=' : '='; + return { + [Op.and]: [{ name: field }, formDateComparison(comparator, value)], + }; + } else { + return { name: field, value: invert ? { [Op.ne]: value } : value }; + } +}; + +/** + * Builds query to get records where the value of the field is [<,<=,>,>=,!=] to the value. + */ +let buildComparatorQuery = function({ + field, + value, + comparator, + isDate = false, +}) { + const sqlComparators = { + gt: Op.gt, + ge: Op.gte, + lt: Op.lt, + le: Op.lte, + ne: Op.ne, + sa: Op.gt, + eb: Op.lt, + }; + const sqlComparator = sqlComparators[comparator]; + if (isDate) { + return { + [Op.and]: [{ name: field }, formDateComparison(sqlComparator, value)], + }; + } else { + return { name: field, value: { [sqlComparator]: value } }; + } +}; + +/** + * Builds query to get records where the value of the field is in the specified range + * Setting invert to true will get records that are NOT in the specified range. + */ +let buildInRangeQuery = function({ + field, + lowerBound, + upperBound, + invert = false, + isDate = false, +}) { + if (invert) { + if (isDate) { + return { + [Op.and]: [ + { name: field }, + formDateComparison('<=', lowerBound), + formDateComparison('>=', upperBound), + ], + }; + } + return { + name: field, + value: { [Op.notBetween]: [lowerBound, upperBound] }, + }; + } else { + if (isDate) { + return { + [Op.and]: [ + { name: field }, + formDateComparison('>=', lowerBound), + formDateComparison('<=', upperBound), + ], + }; + } + return { name: field, value: { [Op.between]: [lowerBound, upperBound] } }; + } +}; + +/** + * Builds query to retrieve records where the field exists (or not). + */ +// TODO: Need to figure out how to do exist check. +let buildExistsQuery = function({ field, exists }) { + return 'NOT IMPLEMENTED'; +}; + +/** + * Builds query to get records where the value of the field contains the value. + * Setting caseSensitive to true will cause the regex to be case insensitive + */ +let buildContainsQuery = function({ field, value, caseSensitive = false }) { + // TODO: contains is not working as expected, like is for string matching - doublecheck this + if (caseSensitive) { + return { name: field, value: { [Op.like]: value } }; + } else { + return { name: field, value: { [Op.iLike]: value } }; + } +}; + +/** + * Builds query to get records where the value of the field starts with the value. + * Setting caseSensitive to true will cause the regex to be case insensitive + */ +let buildStartsWithQuery = function({ field, value, caseSensitive = false }) { + if (caseSensitive) { + return { name: field, value: { [Op.startsWith]: value } }; + } else { + return { name: field, value: { [Op.iRegexp]: `^${value}` } }; + } +}; + +/** + * Builds query to get records where the value of the field ends with the value. + * Setting caseSensitive to true will cause the regex to be case insensitive + */ +let buildEndsWithQuery = function({ field, value, caseSensitive = false }) { + if (caseSensitive) { + return { name: field, value: { [Op.endsWith]: value } }; + } else { + return { name: field, value: { [Op.iRegexp]: `${value}$` } }; + } +}; + +/** + * Assembles a mongo aggregation pipeline + * @param joinsToPerform - List of joins to perform first through lookups + * @param matchesToPerform - List of matches to perform + * @param implementationParameters + * @returns {Array} + */ +let assembleSearchQuery = function({ + matchesToPerform, + implementationParameters, +}) { + let query = []; + + // Check that the necessary implementation parameters were passed through + let { archivedParamPath } = implementationParameters; + if (!archivedParamPath) { + throw new Error( + "Missing required implementation parameter 'archivedParamPath'", + ); + } + + // Construct the necessary queries for each match and add them the pipeline. + if (matchesToPerform.length > 0) { + let listOfOrs = []; + for (let match of matchesToPerform) { + if (match.length === 0) { + match.push({}); + } + listOfOrs.push(buildOrQuery({ queries: match })); + } + query.push({ where: buildAndQuery(listOfOrs) }); + } + return query; +}; + +module.exports = { + assembleSearchQuery, + buildAndQuery, + buildComparatorQuery, + buildContainsQuery, + buildEndsWithQuery, + buildEqualToQuery, + buildExistsQuery, + buildOrQuery, + buildInRangeQuery, + buildStartsWithQuery, + supportedSearchTransformations, + formDateComparison, +}; diff --git a/packages/fhir-qb-sql/index.test.js b/packages/fhir-qb-sql/index.test.js new file mode 100644 index 0000000..411668f --- /dev/null +++ b/packages/fhir-qb-sql/index.test.js @@ -0,0 +1,397 @@ +const sqlQB = require('./index'); +const Sequelize = require('sequelize'); +const Op = Sequelize.Op; + +describe('SQL Query Builder Tests', () => { + describe('buildEqualToQuery Tests', () => { + test('Should return sequelize equals query given a key and a value', () => { + const expectedResult = { name: 'foo', value: 'bar' }; + let observedResult = sqlQB.buildEqualToQuery({ + field: 'foo', + value: 'bar', + }); + expect(observedResult).toEqual(expectedResult); + }); + test('Should return sequelize $ne query given a key, value, and invert = true', () => { + const expectedResult = { name: 'foo', value: { [Op.ne]: 'bar' } }; + let observedResult = sqlQB.buildEqualToQuery({ + field: 'foo', + value: 'bar', + invert: true, + }); + expect(observedResult).toEqual(expectedResult); + }); + test('Should return sequelize equals date query given a key and a value with an isDate flag', () => { + const expectedResult = { + [Op.and]: [ + { + name: 'foo', + }, + Sequelize.where( + Sequelize.fn('date', Sequelize.col('value')), + '=', + '2015', + ), + ], + }; + let observedResult = sqlQB.buildEqualToQuery({ + field: 'foo', + value: '2015', + isDate: true, + }); + expect(observedResult).toEqual(expectedResult); + }); + test('Should return sequelize ne date query given a key and a value with isDate and invert flags', () => { + const expectedResult = { + [Op.and]: [ + { + name: 'foo', + }, + Sequelize.where( + Sequelize.fn('date', Sequelize.col('value')), + '!=', + '2015', + ), + ], + }; + let observedResult = sqlQB.buildEqualToQuery({ + field: 'foo', + value: '2015', + isDate: true, + invert: true, + }); + expect(observedResult).toEqual(expectedResult); + }); + }); + describe('buildComparatorQuery Tests', () => { + test('Should return sequelize $gt query given a key, value, and gt', () => { + const expectedResult = { name: 'foo', value: { [Op.gt]: 'bar' } }; + let observedResult = sqlQB.buildComparatorQuery({ + field: 'foo', + value: 'bar', + comparator: 'gt', + }); + expect(observedResult).toEqual(expectedResult); + }); + test('Should return sequelize greater than query given a key, value, and ge', () => { + const expectedResult = { name: 'foo', value: { [Op.gte]: 'bar' } }; + let observedResult = sqlQB.buildComparatorQuery({ + field: 'foo', + value: 'bar', + comparator: 'ge', + }); + expect(observedResult).toEqual(expectedResult); + }); + test('Should return sequelize less than query given a key, value, and lt', () => { + const expectedResult = { name: 'foo', value: { [Op.lt]: 'bar' } }; + let observedResult = sqlQB.buildComparatorQuery({ + field: 'foo', + value: 'bar', + comparator: 'lt', + }); + expect(observedResult).toEqual(expectedResult); + }); + test('Should return sequelize less than or equal to query given a key, value, and le', () => { + const expectedResult = { name: 'foo', value: { [Op.lte]: 'bar' } }; + let observedResult = sqlQB.buildComparatorQuery({ + field: 'foo', + value: 'bar', + comparator: 'le', + }); + expect(observedResult).toEqual(expectedResult); + }); + test('Should return sequelize greater than query given a key, value, and sa', () => { + const expectedResult = { name: 'foo', value: { [Op.gt]: 'bar' } }; + let observedResult = sqlQB.buildComparatorQuery({ + field: 'foo', + value: 'bar', + comparator: 'sa', + }); + expect(observedResult).toEqual(expectedResult); + }); + test('Should return sequelize less than query given a key, value, and eb', () => { + const expectedResult = { name: 'foo', value: { [Op.lt]: 'bar' } }; + let observedResult = sqlQB.buildComparatorQuery({ + field: 'foo', + value: 'bar', + comparator: 'eb', + }); + expect(observedResult).toEqual(expectedResult); + }); + test('Should return sequelize not equal query given a key, value, and ne', () => { + const expectedResult = { name: 'foo', value: { [Op.ne]: 'bar' } }; + let observedResult = sqlQB.buildComparatorQuery({ + field: 'foo', + value: 'bar', + comparator: 'ne', + }); + expect(observedResult).toEqual(expectedResult); + }); + test('Should return sequelize comparator query given a key, value, comparator, and isDate flag', () => { + const expectedResult = { + [Op.and]: [ + { + name: 'foo', + }, + Sequelize.where( + Sequelize.fn('date', Sequelize.col('value')), + Op.ne, + '2016', + ), + ], + }; + let observedResult = sqlQB.buildComparatorQuery({ + field: 'foo', + value: '2016', + comparator: 'ne', + isDate: true, + }); + expect(observedResult).toEqual(expectedResult); + }); + }); + describe('buildOrQuery Tests', () => { + test('Should return $or of given queries', () => { + const expectedResult = { [Op.or]: [{ foo: 'bar' }, { bar: 'foo' }] }; + let observedResult = sqlQB.buildOrQuery({ + queries: [{ foo: 'bar' }, { bar: 'foo' }], + }); + expect(observedResult).toEqual(expectedResult); + }); + test('Should return $nor of given queries if invert option is true', () => { + const expectedResult = { + [Op.not]: { [Op.or]: [{ foo: 'bar' }, { bar: 'foo' }] }, + }; + let observedResult = sqlQB.buildOrQuery({ + queries: [{ foo: 'bar' }, { bar: 'foo' }], + invert: true, + }); + expect(observedResult).toEqual(expectedResult); + }); + }); + describe('buildContainsQuery Tests', () => { + test('Should return case sensitive match regex query', () => { + const expectedResult = { name: 'foo', value: { [Op.like]: 'bar' } }; + let observedResult = sqlQB.buildContainsQuery({ + field: 'foo', + value: 'bar', + caseSensitive: true, + }); + expect(observedResult).toEqual(expectedResult); + console.log(observedResult); + }); + test('Should return case insensitive match regex query', () => { + const expectedResult = { name: 'foo', value: { [Op.iLike]: 'bar' } }; + let observedResult = sqlQB.buildContainsQuery({ + field: 'foo', + value: 'bar', + }); + expect(observedResult).toEqual(expectedResult); + console.log(observedResult); + }); + }); + describe('buildStartsWithQuery Tests', () => { + test('Should return case sensitive front of word match regex query', () => { + const expectedResult = { name: 'foo', value: { [Op.startsWith]: 'bar' } }; + let observedResult = sqlQB.buildStartsWithQuery({ + field: 'foo', + value: 'bar', + caseSensitive: true, + }); + expect(observedResult).toEqual(expectedResult); + }); + test('Should return case insensitive front of word match regex query', () => { + const expectedResult = { name: 'foo', value: { [Op.iRegexp]: '^bar' } }; + let observedResult = sqlQB.buildStartsWithQuery({ + field: 'foo', + value: 'bar', + }); + expect(observedResult).toEqual(expectedResult); + }); + }); + describe('buildEndsWithQuery Tests', () => { + test('Should return case sensitive front of word match regex query', () => { + const expectedResult = { name: 'foo', value: { [Op.endsWith]: 'bar' } }; + let observedResult = sqlQB.buildEndsWithQuery({ + field: 'foo', + value: 'bar', + caseSensitive: true, + }); + expect(observedResult).toEqual(expectedResult); + }); + test('Should return case insensitive front of word match regex query', () => { + const expectedResult = { name: 'foo', value: { [Op.iRegexp]: 'bar$' } }; + let observedResult = sqlQB.buildEndsWithQuery({ + field: 'foo', + value: 'bar', + }); + expect(observedResult).toEqual(expectedResult); + }); + }); + describe('buildExistsQuery Tests', () => { + test('Should return a range query', () => { + const expectedResult = 'NOT IMPLEMENTED'; + let observedResult = sqlQB.buildExistsQuery({ + field: 'foo', + exists: true, + }); + expect(observedResult).toEqual(expectedResult); + }); + }); + describe('buildInRangeQuery Tests', () => { + test('Should return a range query', () => { + const expectedResult = { name: 'foo', value: { [Op.between]: [1, 10] } }; + let observedResult = sqlQB.buildInRangeQuery({ + field: 'foo', + lowerBound: 1, + upperBound: 10, + }); + expect(observedResult).toEqual(expectedResult); + }); + test('Should return an exclusive range query if given an invert flag', () => { + const expectedResult = { + name: 'foo', + value: { [Op.notBetween]: [1, 10] }, + }; + let observedResult = sqlQB.buildInRangeQuery({ + field: 'foo', + lowerBound: 1, + upperBound: 10, + invert: true, + }); + expect(observedResult).toEqual(expectedResult); + }); + test('Should return a date range query if given an isDate flag', () => { + const expectedResult = { + [Op.and]: [ + { + name: 'foo', + }, + Sequelize.where( + Sequelize.fn('date', Sequelize.col('value')), + '>=', + '2013', + ), + Sequelize.where( + Sequelize.fn('date', Sequelize.col('value')), + '<=', + '2014', + ), + ], + }; + let observedResult = sqlQB.buildInRangeQuery({ + field: 'foo', + lowerBound: '2013', + upperBound: '2014', + isDate: true, + }); + expect(observedResult).toEqual(expectedResult); + }); + test('Should return an exclusive date range query if given an invert flag and an isDate flag', () => { + const expectedResult = { + [Op.and]: [ + { + name: 'foo', + }, + Sequelize.where( + Sequelize.fn('date', Sequelize.col('value')), + '<=', + '2013', + ), + Sequelize.where( + Sequelize.fn('date', Sequelize.col('value')), + '>=', + '2014', + ), + ], + }; + let observedResult = sqlQB.buildInRangeQuery({ + field: 'foo', + lowerBound: '2013', + upperBound: '2014', + invert: true, + isDate: true, + }); + expect(observedResult).toEqual(expectedResult); + }); + }); + describe('assembleSearchQuery Tests', () => { + test('Should return empty pipeline (except for archival and paging) if no matches or joins to perform', () => { + const expectedResult = []; + let observedResult = sqlQB.assembleSearchQuery({ + joinsToPerform: [], + matchesToPerform: [], + searchResultTransformations: {}, + implementationParameters: { archivedParamPath: 'meta._isArchived' }, + includeArchived: false, + pageNumber: 1, + resultsPerPage: 10, + }); + expect(observedResult).toEqual(expectedResult); + }); + test('Should push lookups to front of pipeline if they are there', () => { + const expectedResult = []; + let observedResult = sqlQB.assembleSearchQuery({ + joinsToPerform: [{ from: 'foo', localKey: 'bar', foreignKey: 'baz' }], + matchesToPerform: [], + searchResultTransformations: {}, + implementationParameters: { archivedParamPath: 'meta._isArchived' }, + includeArchived: false, + pageNumber: 1, + resultsPerPage: 10, + }); + expect(observedResult).toEqual(expectedResult); + }); + test('Should fill in empty matches with empty objects to keep queries valid', () => { + const expectedResult = [{ where: { [Op.and]: [{ [Op.or]: [{}] }] } }]; + let observedResult = sqlQB.assembleSearchQuery({ + joinsToPerform: [], + matchesToPerform: [[]], + searchResultTransformations: {}, + implementationParameters: { archivedParamPath: 'meta._isArchived' }, + includeArchived: false, + pageNumber: 1, + resultsPerPage: 10, + }); + expect(observedResult).toEqual(expectedResult); + }); + test('Should handle matches appropriately', () => { + const expectedResult = [ + { + where: { + [Op.and]: [{ [Op.or]: [{ foo: { [Op.gte]: 1, [Op.lte]: 10 } }] }], + }, + }, + ]; + let observedResult = sqlQB.assembleSearchQuery({ + joinsToPerform: [], + matchesToPerform: [[{ foo: { [Op.gte]: 1, [Op.lte]: 10 } }]], + searchResultTransformations: {}, + implementationParameters: { archivedParamPath: 'meta._isArchived' }, + includeArchived: false, + pageNumber: 1, + resultsPerPage: 10, + }); + expect(observedResult).toEqual(expectedResult); + }); + test("Should throw an error if required implementation parameter 'archivedParamPath' is missing", () => { + const expectedError = new Error( + "Missing required implementation parameter 'archivedParamPath'", + ); + let observedError; + try { + sqlQB.assembleSearchQuery({ + joinsToPerform: [], + matchesToPerform: [], + searchResultTransformations: {}, + implementationParameters: {}, + includeArchived: false, + pageNumber: 1, + resultsPerPage: 10, + }); + } catch (err) { + observedError = err; + } + expect(observedError).toEqual(expectedError); + }); + }); +}); diff --git a/packages/fhir-qb-sql/package.json b/packages/fhir-qb-sql/package.json new file mode 100644 index 0000000..4cb280a --- /dev/null +++ b/packages/fhir-qb-sql/package.json @@ -0,0 +1,41 @@ +{ + "name": "@asymmetrik/fhir-qb-sql", + "version": "0.1.0", + "description": "FHIR query builder for SQL", + "main": "index.js", + "repository": { + "type": "git", + "url": "https://github.com/Asymmetrik/phx-tools.git" + }, + "homepage": "https://github.com/Asymmetrik/phx-tools", + "author": "Sumeet-S ", + "contributors": [ + "Shane O'Neill ", + "Sumeet-S ", + "Tracy Nguyen " + ], + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "jest": { + "verbose": true, + "testEnvironment": "node", + "collectCoverage": false, + "coverageReporters": [ + "text", + "lcov", + "json" + ], + "coveragePathIgnorePatterns": [ + "/src/testutils/" + ] + }, + "dependencies": { + "sequelize": "^5.18.4", + "xregexp": "^4.2.0" + }, + "devDependencies": { + "jest": "^24.5.0" + } +} diff --git a/packages/fhir-qb-sql/yarn.lock b/packages/fhir-qb-sql/yarn.lock new file mode 100644 index 0000000..3d42591 --- /dev/null +++ b/packages/fhir-qb-sql/yarn.lock @@ -0,0 +1,3669 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.5.5.tgz#bc0782f6d69f7b7d49531219699b988f669a8f9d" + integrity sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw== + dependencies: + "@babel/highlight" "^7.0.0" + +"@babel/core@^7.1.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.6.0.tgz#9b00f73554edd67bebc86df8303ef678be3d7b48" + integrity sha512-FuRhDRtsd6IptKpHXAa+4WPZYY2ZzgowkbLBecEDDSje1X/apG7jQM33or3NdOmjXBKWGOg4JmSiRfUfuTtHXw== + dependencies: + "@babel/code-frame" "^7.5.5" + "@babel/generator" "^7.6.0" + "@babel/helpers" "^7.6.0" + "@babel/parser" "^7.6.0" + "@babel/template" "^7.6.0" + "@babel/traverse" "^7.6.0" + "@babel/types" "^7.6.0" + convert-source-map "^1.1.0" + debug "^4.1.0" + json5 "^2.1.0" + lodash "^4.17.13" + resolve "^1.3.2" + semver "^5.4.1" + source-map "^0.5.0" + +"@babel/generator@^7.4.0", "@babel/generator@^7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.6.0.tgz#e2c21efbfd3293ad819a2359b448f002bfdfda56" + integrity sha512-Ms8Mo7YBdMMn1BYuNtKuP/z0TgEIhbcyB8HVR6PPNYp4P61lMsABiS4A3VG1qznjXVCf3r+fVHhm4efTYVsySA== + dependencies: + "@babel/types" "^7.6.0" + jsesc "^2.5.1" + lodash "^4.17.13" + source-map "^0.5.0" + trim-right "^1.0.1" + +"@babel/helper-function-name@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz#a0ceb01685f73355d4360c1247f582bfafc8ff53" + integrity sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw== + dependencies: + "@babel/helper-get-function-arity" "^7.0.0" + "@babel/template" "^7.1.0" + "@babel/types" "^7.0.0" + +"@babel/helper-get-function-arity@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz#83572d4320e2a4657263734113c42868b64e49c3" + integrity sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ== + dependencies: + "@babel/types" "^7.0.0" + +"@babel/helper-plugin-utils@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250" + integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA== + +"@babel/helper-split-export-declaration@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz#ff94894a340be78f53f06af038b205c49d993677" + integrity sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q== + dependencies: + "@babel/types" "^7.4.4" + +"@babel/helpers@^7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.6.0.tgz#21961d16c6a3c3ab597325c34c465c0887d31c6e" + integrity sha512-W9kao7OBleOjfXtFGgArGRX6eCP0UEcA2ZWEWNkJdRZnHhW4eEbeswbG3EwaRsnQUAEGWYgMq1HsIXuNNNy2eQ== + dependencies: + "@babel/template" "^7.6.0" + "@babel/traverse" "^7.6.0" + "@babel/types" "^7.6.0" + +"@babel/highlight@^7.0.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.5.0.tgz#56d11312bd9248fa619591d02472be6e8cb32540" + integrity sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ== + dependencies: + chalk "^2.0.0" + esutils "^2.0.2" + js-tokens "^4.0.0" + +"@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.6.0.tgz#3e05d0647432a8326cb28d0de03895ae5a57f39b" + integrity sha512-+o2q111WEx4srBs7L9eJmcwi655eD8sXniLqMB93TBK9GrNzGrxDWSjiqz2hLU0Ha8MTXFIP0yd9fNdP+m43ZQ== + +"@babel/plugin-syntax-object-rest-spread@^7.0.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz#3b7a3e733510c57e820b9142a6579ac8b0dfad2e" + integrity sha512-t0JKGgqk2We+9may3t0xDdmneaXmyxq0xieYcKHxIsrJO64n1OiMWNUtc5gQK1PA0NpdCRrtZp4z+IUaKugrSA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/runtime-corejs2@^7.2.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/runtime-corejs2/-/runtime-corejs2-7.6.0.tgz#6fcd37c2580070817d62f219db97f67e26f50f9c" + integrity sha512-zbPQzlbyJab2xCYb6VaESn8Tk/XiVpQJU7WvIKiQCwlFyc2NSCzKjqtBXCvpZBbiTOHCx10s2656REVnySwb+A== + dependencies: + core-js "^2.6.5" + regenerator-runtime "^0.13.2" + +"@babel/template@^7.1.0", "@babel/template@^7.4.0", "@babel/template@^7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.6.0.tgz#7f0159c7f5012230dad64cca42ec9bdb5c9536e6" + integrity sha512-5AEH2EXD8euCk446b7edmgFdub/qfH1SN6Nii3+fyXP807QRx9Q73A2N5hNwRRslC2H9sNzaFhsPubkS4L8oNQ== + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/parser" "^7.6.0" + "@babel/types" "^7.6.0" + +"@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.6.0.tgz#389391d510f79be7ce2ddd6717be66d3fed4b516" + integrity sha512-93t52SaOBgml/xY74lsmt7xOR4ufYvhb5c5qiM6lu4J/dWGMAfAh6eKw4PjLes6DI6nQgearoxnFJk60YchpvQ== + dependencies: + "@babel/code-frame" "^7.5.5" + "@babel/generator" "^7.6.0" + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.4.4" + "@babel/parser" "^7.6.0" + "@babel/types" "^7.6.0" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.13" + +"@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.6.0": + version "7.6.1" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.6.1.tgz#53abf3308add3ac2a2884d539151c57c4b3ac648" + integrity sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g== + dependencies: + esutils "^2.0.2" + lodash "^4.17.13" + to-fast-properties "^2.0.0" + +"@cnakazawa/watch@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.3.tgz#099139eaec7ebf07a27c1786a3ff64f39464d2ef" + integrity sha512-r5160ogAvGyHsal38Kux7YYtodEKOj89RGb28ht1jh3SJb08VwRwAKKJL0bGb04Zd/3r9FL3BFIc3bBidYffCA== + dependencies: + exec-sh "^0.3.2" + minimist "^1.2.0" + +"@jest/console@^24.7.1", "@jest/console@^24.9.0": + version "24.9.0" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-24.9.0.tgz#79b1bc06fb74a8cfb01cbdedf945584b1b9707f0" + integrity sha512-Zuj6b8TnKXi3q4ymac8EQfc3ea/uhLeCGThFqXeC8H9/raaH8ARPUTdId+XyGd03Z4In0/VjD2OYFcBF09fNLQ== + dependencies: + "@jest/source-map" "^24.9.0" + chalk "^2.0.1" + slash "^2.0.0" + +"@jest/core@^24.9.0": + version "24.9.0" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-24.9.0.tgz#2ceccd0b93181f9c4850e74f2a9ad43d351369c4" + integrity sha512-Fogg3s4wlAr1VX7q+rhV9RVnUv5tD7VuWfYy1+whMiWUrvl7U3QJSJyWcDio9Lq2prqYsZaeTv2Rz24pWGkJ2A== + dependencies: + "@jest/console" "^24.7.1" + "@jest/reporters" "^24.9.0" + "@jest/test-result" "^24.9.0" + "@jest/transform" "^24.9.0" + "@jest/types" "^24.9.0" + ansi-escapes "^3.0.0" + chalk "^2.0.1" + exit "^0.1.2" + graceful-fs "^4.1.15" + jest-changed-files "^24.9.0" + jest-config "^24.9.0" + jest-haste-map "^24.9.0" + jest-message-util "^24.9.0" + jest-regex-util "^24.3.0" + jest-resolve "^24.9.0" + jest-resolve-dependencies "^24.9.0" + jest-runner "^24.9.0" + jest-runtime "^24.9.0" + jest-snapshot "^24.9.0" + jest-util "^24.9.0" + jest-validate "^24.9.0" + jest-watcher "^24.9.0" + micromatch "^3.1.10" + p-each-series "^1.0.0" + realpath-native "^1.1.0" + rimraf "^2.5.4" + slash "^2.0.0" + strip-ansi "^5.0.0" + +"@jest/environment@^24.9.0": + version "24.9.0" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-24.9.0.tgz#21e3afa2d65c0586cbd6cbefe208bafade44ab18" + integrity sha512-5A1QluTPhvdIPFYnO3sZC3smkNeXPVELz7ikPbhUj0bQjB07EoE9qtLrem14ZUYWdVayYbsjVwIiL4WBIMV4aQ== + dependencies: + "@jest/fake-timers" "^24.9.0" + "@jest/transform" "^24.9.0" + "@jest/types" "^24.9.0" + jest-mock "^24.9.0" + +"@jest/fake-timers@^24.9.0": + version "24.9.0" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-24.9.0.tgz#ba3e6bf0eecd09a636049896434d306636540c93" + integrity sha512-eWQcNa2YSwzXWIMC5KufBh3oWRIijrQFROsIqt6v/NS9Io/gknw1jsAC9c+ih/RQX4A3O7SeWAhQeN0goKhT9A== + dependencies: + "@jest/types" "^24.9.0" + jest-message-util "^24.9.0" + jest-mock "^24.9.0" + +"@jest/reporters@^24.9.0": + version "24.9.0" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-24.9.0.tgz#86660eff8e2b9661d042a8e98a028b8d631a5b43" + integrity sha512-mu4X0yjaHrffOsWmVLzitKmmmWSQ3GGuefgNscUSWNiUNcEOSEQk9k3pERKEQVBb0Cnn88+UESIsZEMH3o88Gw== + dependencies: + "@jest/environment" "^24.9.0" + "@jest/test-result" "^24.9.0" + "@jest/transform" "^24.9.0" + "@jest/types" "^24.9.0" + chalk "^2.0.1" + exit "^0.1.2" + glob "^7.1.2" + istanbul-lib-coverage "^2.0.2" + istanbul-lib-instrument "^3.0.1" + istanbul-lib-report "^2.0.4" + istanbul-lib-source-maps "^3.0.1" + istanbul-reports "^2.2.6" + jest-haste-map "^24.9.0" + jest-resolve "^24.9.0" + jest-runtime "^24.9.0" + jest-util "^24.9.0" + jest-worker "^24.6.0" + node-notifier "^5.4.2" + slash "^2.0.0" + source-map "^0.6.0" + string-length "^2.0.0" + +"@jest/source-map@^24.3.0", "@jest/source-map@^24.9.0": + version "24.9.0" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-24.9.0.tgz#0e263a94430be4b41da683ccc1e6bffe2a191714" + integrity sha512-/Xw7xGlsZb4MJzNDgB7PW5crou5JqWiBQaz6xyPd3ArOg2nfn/PunV8+olXbbEZzNl591o5rWKE9BRDaFAuIBg== + dependencies: + callsites "^3.0.0" + graceful-fs "^4.1.15" + source-map "^0.6.0" + +"@jest/test-result@^24.9.0": + version "24.9.0" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-24.9.0.tgz#11796e8aa9dbf88ea025757b3152595ad06ba0ca" + integrity sha512-XEFrHbBonBJ8dGp2JmF8kP/nQI/ImPpygKHwQ/SY+es59Z3L5PI4Qb9TQQMAEeYsThG1xF0k6tmG0tIKATNiiA== + dependencies: + "@jest/console" "^24.9.0" + "@jest/types" "^24.9.0" + "@types/istanbul-lib-coverage" "^2.0.0" + +"@jest/test-sequencer@^24.9.0": + version "24.9.0" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-24.9.0.tgz#f8f334f35b625a4f2f355f2fe7e6036dad2e6b31" + integrity sha512-6qqsU4o0kW1dvA95qfNog8v8gkRN9ph6Lz7r96IvZpHdNipP2cBcb07J1Z45mz/VIS01OHJ3pY8T5fUY38tg4A== + dependencies: + "@jest/test-result" "^24.9.0" + jest-haste-map "^24.9.0" + jest-runner "^24.9.0" + jest-runtime "^24.9.0" + +"@jest/transform@^24.9.0": + version "24.9.0" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-24.9.0.tgz#4ae2768b296553fadab09e9ec119543c90b16c56" + integrity sha512-TcQUmyNRxV94S0QpMOnZl0++6RMiqpbH/ZMccFB/amku6Uwvyb1cjYX7xkp5nGNkbX4QPH/FcB6q1HBTHynLmQ== + dependencies: + "@babel/core" "^7.1.0" + "@jest/types" "^24.9.0" + babel-plugin-istanbul "^5.1.0" + chalk "^2.0.1" + convert-source-map "^1.4.0" + fast-json-stable-stringify "^2.0.0" + graceful-fs "^4.1.15" + jest-haste-map "^24.9.0" + jest-regex-util "^24.9.0" + jest-util "^24.9.0" + micromatch "^3.1.10" + pirates "^4.0.1" + realpath-native "^1.1.0" + slash "^2.0.0" + source-map "^0.6.1" + write-file-atomic "2.4.1" + +"@jest/types@^24.9.0": + version "24.9.0" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-24.9.0.tgz#63cb26cb7500d069e5a389441a7c6ab5e909fc59" + integrity sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^1.1.1" + "@types/yargs" "^13.0.0" + +"@types/babel__core@^7.1.0": + version "7.1.3" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.3.tgz#e441ea7df63cd080dfcd02ab199e6d16a735fc30" + integrity sha512-8fBo0UR2CcwWxeX7WIIgJ7lXjasFxoYgRnFHUj+hRvKkpiBJbxhdAPTCY6/ZKM0uxANFVzt4yObSLuTiTnazDA== + dependencies: + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + "@types/babel__generator" "*" + "@types/babel__template" "*" + "@types/babel__traverse" "*" + +"@types/babel__generator@*": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.0.2.tgz#d2112a6b21fad600d7674274293c85dce0cb47fc" + integrity sha512-NHcOfab3Zw4q5sEE2COkpfXjoE7o+PmqD9DQW4koUT3roNxwziUdXGnRndMat/LJNUtePwn1TlP4do3uoe3KZQ== + dependencies: + "@babel/types" "^7.0.0" + +"@types/babel__template@*": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.0.2.tgz#4ff63d6b52eddac1de7b975a5223ed32ecea9307" + integrity sha512-/K6zCpeW7Imzgab2bLkLEbz0+1JlFSrUMdw7KoIIu+IUdu51GWaBZpd3y1VXGVXzynvGa4DaIaxNZHiON3GXUg== + dependencies: + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + +"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": + version "7.0.7" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.7.tgz#2496e9ff56196cc1429c72034e07eab6121b6f3f" + integrity sha512-CeBpmX1J8kWLcDEnI3Cl2Eo6RfbGvzUctA+CjZUhOKDFbLfcr7fc4usEqLNWetrlJd7RhAkyYe2czXop4fICpw== + dependencies: + "@babel/types" "^7.3.0" + +"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz#42995b446db9a48a11a07ec083499a860e9138ff" + integrity sha512-hRJD2ahnnpLgsj6KWMYSrmXkM3rm2Dl1qkx6IOFD5FnuNPXJIG5L0dhgKXCYTRMGzU4n0wImQ/xfmRc4POUFlg== + +"@types/istanbul-lib-report@*": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-1.1.1.tgz#e5471e7fa33c61358dd38426189c037a58433b8c" + integrity sha512-3BUTyMzbZa2DtDI2BkERNC6jJw2Mr2Y0oGI7mRxYNBPxppbtEK1F66u3bKwU2g+wxwWI7PAoRpJnOY1grJqzHg== + dependencies: + "@types/istanbul-lib-coverage" "*" + +"@types/istanbul-reports@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-1.1.1.tgz#7a8cbf6a406f36c8add871625b278eaf0b0d255a" + integrity sha512-UpYjBi8xefVChsCoBpKShdxTllC9pwISirfoZsUa2AAdQg/Jd2KQGtSbw+ya7GPo7x/wAPlH6JBhKhAsXUEZNA== + dependencies: + "@types/istanbul-lib-coverage" "*" + "@types/istanbul-lib-report" "*" + +"@types/node@*": + version "12.7.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.7.5.tgz#e19436e7f8e9b4601005d73673b6dc4784ffcc2f" + integrity sha512-9fq4jZVhPNW8r+UYKnxF1e2HkDWOWKM5bC2/7c9wPV835I0aOrVbS/Hw/pWPk2uKrNXQqg9Z959Kz+IYDd5p3w== + +"@types/stack-utils@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-1.0.1.tgz#0a851d3bd96498fa25c33ab7278ed3bd65f06c3e" + integrity sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw== + +"@types/yargs-parser@*": + version "13.1.0" + resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-13.1.0.tgz#c563aa192f39350a1d18da36c5a8da382bbd8228" + integrity sha512-gCubfBUZ6KxzoibJ+SCUc/57Ms1jz5NjHe4+dI2krNmU5zCPAphyLJYyTOg06ueIyfj+SaCUqmzun7ImlxDcKg== + +"@types/yargs@^13.0.0": + version "13.0.2" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-13.0.2.tgz#a64674fc0149574ecd90ba746e932b5a5f7b3653" + integrity sha512-lwwgizwk/bIIU+3ELORkyuOgDjCh7zuWDFqRtPPhhVgq9N1F7CvLNKg1TX4f2duwtKQ0p044Au9r1PLIXHrIzQ== + dependencies: + "@types/yargs-parser" "*" + +abab@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.1.tgz#3fa17797032b71410ec372e11668f4b4ffc86a82" + integrity sha512-1zSbbCuoIjafKZ3mblY5ikvAb0ODUbqBnFuUb7f6uLeQhhGJ0vEV4ntmtxKLT2WgXCO94E07BjunsIw1jOMPZw== + +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== + +acorn-globals@^4.1.0: + version "4.3.4" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.3.4.tgz#9fa1926addc11c97308c4e66d7add0d40c3272e7" + integrity sha512-clfQEh21R+D0leSbUdWf3OcfqyaCSAQ8Ryq00bofSekfr9W8u1jyYZo6ir0xu9Gtcf7BjcHJpnbZH7JOCpP60A== + dependencies: + acorn "^6.0.1" + acorn-walk "^6.0.1" + +acorn-walk@^6.0.1: + version "6.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.2.0.tgz#123cb8f3b84c2171f1f7fb252615b1c78a6b1a8c" + integrity sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA== + +acorn@^5.5.3: + version "5.7.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" + integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw== + +acorn@^6.0.1: + version "6.3.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.3.0.tgz#0087509119ffa4fc0a0041d1e93a417e68cb856e" + integrity sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA== + +ajv@^6.5.5: + version "6.10.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.2.tgz#d3cea04d6b017b2894ad69040fec8b623eb4bd52" + integrity sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw== + dependencies: + fast-deep-equal "^2.0.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ansi-escapes@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" + integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + +ansi-regex@^4.0.0, ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" + integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== + +ansi-styles@^3.2.0, ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +any-promise@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" + integrity sha1-q8av7tzqUugJzcA3au0845Y10X8= + +anymatch@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" + integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== + dependencies: + micromatch "^3.1.4" + normalize-path "^2.1.1" + +aproba@^1.0.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== + +are-we-there-yet@~1.1.2: + version "1.1.5" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" + integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.6" + +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= + +arr-flatten@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== + +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= + +array-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" + integrity sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM= + +array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= + +asn1@~0.2.3: + version "0.2.4" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" + integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== + dependencies: + safer-buffer "~2.1.0" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= + +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= + +astral-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" + integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== + +async-limiter@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" + integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + +atob@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" + integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== + +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= + +aws4@^1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" + integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== + +babel-jest@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-24.9.0.tgz#3fc327cb8467b89d14d7bc70e315104a783ccd54" + integrity sha512-ntuddfyiN+EhMw58PTNL1ph4C9rECiQXjI4nMMBKBaNjXvqLdkXpPRcMSr4iyBrJg/+wz9brFUD6RhOAT6r4Iw== + dependencies: + "@jest/transform" "^24.9.0" + "@jest/types" "^24.9.0" + "@types/babel__core" "^7.1.0" + babel-plugin-istanbul "^5.1.0" + babel-preset-jest "^24.9.0" + chalk "^2.4.2" + slash "^2.0.0" + +babel-plugin-istanbul@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-5.2.0.tgz#df4ade83d897a92df069c4d9a25cf2671293c854" + integrity sha512-5LphC0USA8t4i1zCtjbbNb6jJj/9+X6P37Qfirc/70EQ34xKlMW+a1RHGwxGI+SwWpNwZ27HqvzAobeqaXwiZw== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + find-up "^3.0.0" + istanbul-lib-instrument "^3.3.0" + test-exclude "^5.2.3" + +babel-plugin-jest-hoist@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-24.9.0.tgz#4f837091eb407e01447c8843cbec546d0002d756" + integrity sha512-2EMA2P8Vp7lG0RAzr4HXqtYwacfMErOuv1U3wrvxHX6rD1sV6xS3WXG3r8TRQ2r6w8OhvSdWt+z41hQNwNm3Xw== + dependencies: + "@types/babel__traverse" "^7.0.6" + +babel-preset-jest@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-24.9.0.tgz#192b521e2217fb1d1f67cf73f70c336650ad3cdc" + integrity sha512-izTUuhE4TMfTRPF92fFwD2QfdXaZW08qvWTFCI51V8rW5x00UuPgc3ajRoWofXOuxjfcOM5zzSYsQS3H8KGCAg== + dependencies: + "@babel/plugin-syntax-object-rest-spread" "^7.0.0" + babel-plugin-jest-hoist "^24.9.0" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + +base@^0.11.1: + version "0.11.2" + resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== + dependencies: + cache-base "^1.0.1" + class-utils "^0.3.5" + component-emitter "^1.2.1" + define-property "^1.0.0" + isobject "^3.0.1" + mixin-deep "^1.2.0" + pascalcase "^0.1.1" + +bcrypt-pbkdf@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= + dependencies: + tweetnacl "^0.14.3" + +bluebird@^3.5.0: + version "3.5.5" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.5.tgz#a8d0afd73251effbbd5fe384a77d73003c17a71f" + integrity sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w== + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== + dependencies: + arr-flatten "^1.1.0" + array-unique "^0.3.2" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" + +browser-process-hrtime@^0.1.2: + version "0.1.3" + resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz#616f00faef1df7ec1b5bf9cfe2bdc3170f26c7b4" + integrity sha512-bRFnI4NnjO6cnyLmOV/7PVoDEMJChlcfN0z4s1YMBY989/SvlfMI1lgCnkFUs53e9gQF+w7qu7XdllSTiSl8Aw== + +browser-resolve@^1.11.3: + version "1.11.3" + resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.3.tgz#9b7cbb3d0f510e4cb86bdbd796124d28b5890af6" + integrity sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ== + dependencies: + resolve "1.1.7" + +bser@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.0.tgz#65fc784bf7f87c009b973c12db6546902fa9c7b5" + integrity sha512-8zsjWrQkkBoLK6uxASk1nJ2SKv97ltiGDo6A3wA0/yRPz+CwmEyDo0hUrhIuukG2JHpAl3bvFIixw2/3Hi0DOg== + dependencies: + node-int64 "^0.4.0" + +buffer-from@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" + integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== + +cache-base@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== + dependencies: + collection-visit "^1.0.0" + component-emitter "^1.2.1" + get-value "^2.0.6" + has-value "^1.0.0" + isobject "^3.0.1" + set-value "^2.0.0" + to-object-path "^0.3.0" + union-value "^1.0.0" + unset-value "^1.0.0" + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +camelcase@^5.0.0, camelcase@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + +capture-exit@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4" + integrity sha512-PiT/hQmTonHhl/HFGN+Lx3JJUznrVYJ3+AQsnthneZbvW7x+f08Tk7yLJTLEOUvBTbduLeeBkxEaYXUOUrRq6g== + dependencies: + rsvp "^4.8.4" + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= + +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chownr@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.2.tgz#a18f1e0b269c8a6a5d3c86eb298beb14c3dd7bf6" + integrity sha512-GkfeAQh+QNy3wquu9oIZr6SS5x7wGdSgNQvD10X3r+AZr1Oys22HW8kAmDMvNg2+Dm0TeGaEuO8gFwdBXxwO8A== + +ci-info@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" + integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== + +class-utils@^0.3.5: + version "0.3.6" + resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + static-extend "^0.1.1" + +cliui@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" + integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== + dependencies: + string-width "^3.1.0" + strip-ansi "^5.2.0" + wrap-ansi "^5.1.0" + +cls-bluebird@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cls-bluebird/-/cls-bluebird-2.1.0.tgz#37ef1e080a8ffb55c2f4164f536f1919e7968aee" + integrity sha1-N+8eCAqP+1XC9BZPU28ZGeeWiu4= + dependencies: + is-bluebird "^1.0.2" + shimmer "^1.1.0" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= + +collection-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= + dependencies: + map-visit "^1.0.0" + object-visit "^1.0.0" + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + +combined-stream@^1.0.6, combined-stream@~1.0.6: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + +commander@~2.20.0: + version "2.20.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" + integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== + +component-emitter@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" + integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= + +convert-source-map@^1.1.0, convert-source-map@^1.4.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20" + integrity sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A== + dependencies: + safe-buffer "~5.1.1" + +copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= + +core-js@^2.6.5: + version "2.6.9" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.9.tgz#6b4b214620c834152e179323727fc19741b084f2" + integrity sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A== + +core-util-is@1.0.2, core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + +cross-spawn@^6.0.0: + version "6.0.5" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== + dependencies: + nice-try "^1.0.4" + path-key "^2.0.1" + semver "^5.5.0" + shebang-command "^1.2.0" + which "^1.2.9" + +cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": + version "0.3.8" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" + integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== + +cssstyle@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-1.4.0.tgz#9d31328229d3c565c61e586b02041a28fccdccf1" + integrity sha512-GBrLZYZ4X4x6/QEoBnIrqb8B/f5l4+8me2dkom/j1Gtbxy0kBv6OGzKuAsGM75bkGwGAFkt56Iwg28S3XTZgSA== + dependencies: + cssom "0.3.x" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= + dependencies: + assert-plus "^1.0.0" + +data-urls@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-1.1.0.tgz#15ee0582baa5e22bb59c77140da8f9c76963bbfe" + integrity sha512-YTWYI9se1P55u58gL5GkQHW4P6VJBJ5iBT+B5a7i2Tjadhv52paJG0qHX4A0OR6/t52odI64KP2YvFpkDOi3eQ== + dependencies: + abab "^2.0.0" + whatwg-mimetype "^2.2.0" + whatwg-url "^7.0.0" + +debug@^2.2.0, debug@^2.3.3: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@^3.2.6: + version "3.2.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" + integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== + dependencies: + ms "^2.1.1" + +debug@^4.1.0, debug@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== + dependencies: + ms "^2.1.1" + +decamelize@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= + +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= + +deep-extend@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + +deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= + +define-properties@^1.1.2, define-properties@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== + dependencies: + object-keys "^1.0.12" + +define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= + dependencies: + is-descriptor "^0.1.0" + +define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= + dependencies: + is-descriptor "^1.0.0" + +define-property@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== + dependencies: + is-descriptor "^1.0.2" + isobject "^3.0.1" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= + +detect-libc@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= + +detect-newline@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" + integrity sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I= + +diff-sequences@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-24.9.0.tgz#5715d6244e2aa65f48bba0bc972db0b0b11e95b5" + integrity sha512-Dj6Wk3tWyTE+Fo1rW8v0Xhwk80um6yFYKbuAxc9c3EZxIHFDYwbi34Uk42u1CdnIiVorvt4RmlSDjIPyzGC2ew== + +domexception@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90" + integrity sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug== + dependencies: + webidl-conversions "^4.0.2" + +dottie@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/dottie/-/dottie-2.0.1.tgz#697ad9d72004db7574d21f892466a3c285893659" + integrity sha512-ch5OQgvGDK2u8pSZeSYAQaV/lczImd7pMJ7BcEPXmnFVjy4yJIzP6CsODJUTH8mg1tyH1Z2abOiuJO3DjZ/GBw== + +ecc-jsbn@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= + dependencies: + jsbn "~0.1.0" + safer-buffer "^2.1.0" + +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + +end-of-stream@^1.1.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43" + integrity sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q== + dependencies: + once "^1.4.0" + +error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +es-abstract@^1.5.1: + version "1.14.2" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.14.2.tgz#7ce108fad83068c8783c3cdf62e504e084d8c497" + integrity sha512-DgoQmbpFNOofkjJtKwr87Ma5EW4Dc8fWhD0R+ndq7Oc456ivUfGOOP6oAZTTKl5/CcNMP+EN+e3/iUzgE0veZg== + dependencies: + es-to-primitive "^1.2.0" + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.0" + is-callable "^1.1.4" + is-regex "^1.0.4" + object-inspect "^1.6.0" + object-keys "^1.1.1" + string.prototype.trimleft "^2.0.0" + string.prototype.trimright "^2.0.0" + +es-to-primitive@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.0.tgz#edf72478033456e8dda8ef09e00ad9650707f377" + integrity sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + +escodegen@^1.9.1: + version "1.12.0" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.12.0.tgz#f763daf840af172bb3a2b6dd7219c0e17f7ff541" + integrity sha512-TuA+EhsanGcme5T3R0L80u4t8CpbXQjegRmf7+FPTJrtCTErXFeelblRgHQa1FofEzqYYJmJ/OqjTwREp9qgmg== + dependencies: + esprima "^3.1.3" + estraverse "^4.2.0" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.6.1" + +esprima@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" + integrity sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM= + +estraverse@^4.2.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +exec-sh@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.2.tgz#6738de2eb7c8e671d0366aea0b0db8c6f7d7391b" + integrity sha512-9sLAvzhI5nc8TpuQUh4ahMdCrWT00wPWz7j47/emR5+2qEfoZP5zzUXvx+vdx+H6ohhnsYC31iX04QLYJK8zTg== + +execa@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" + integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== + dependencies: + cross-spawn "^6.0.0" + get-stream "^4.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +exit@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" + integrity sha1-BjJjj42HfMghB9MKD/8aF8uhzQw= + +expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= + dependencies: + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +expect@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-24.9.0.tgz#b75165b4817074fa4a157794f46fe9f1ba15b6ca" + integrity sha512-wvVAx8XIol3Z5m9zvZXiyZOQ+sRJqNTIm6sGjdWlaZIeupQGO3WbYI+15D/AmEwZywL6wtJkbAbJtzkOfBuR0Q== + dependencies: + "@jest/types" "^24.9.0" + ansi-styles "^3.2.0" + jest-get-type "^24.9.0" + jest-matcher-utils "^24.9.0" + jest-message-util "^24.9.0" + jest-regex-util "^24.9.0" + +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= + dependencies: + is-extendable "^0.1.0" + +extend-shallow@^3.0.0, extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + +extend@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + +extglob@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== + dependencies: + array-unique "^0.3.2" + define-property "^1.0.0" + expand-brackets "^2.1.4" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= + +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= + +fast-deep-equal@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" + integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= + +fast-json-stable-stringify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" + integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= + +fast-levenshtein@~2.0.4: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= + +fb-watchman@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58" + integrity sha1-VOmr99+i8mzZsWNsWIwa/AXeXVg= + dependencies: + bser "^2.0.0" + +fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= + dependencies: + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" + +find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + dependencies: + locate-path "^3.0.0" + +for-in@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= + +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + +fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= + dependencies: + map-cache "^0.2.2" + +fs-minipass@^1.2.5: + version "1.2.7" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" + integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== + dependencies: + minipass "^2.6.0" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +fsevents@^1.2.7: + version "1.2.9" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.9.tgz#3f5ed66583ccd6f400b5a00db6f7e861363e388f" + integrity sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw== + dependencies: + nan "^2.12.1" + node-pre-gyp "^0.12.0" + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +get-caller-file@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-stream@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" + integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== + dependencies: + pump "^3.0.0" + +get-value@^2.0.3, get-value@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= + dependencies: + assert-plus "^1.0.0" + +glob@^7.1.1, glob@^7.1.2, glob@^7.1.3: + version "7.1.4" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" + integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^11.1.0: + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + +graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.2.tgz#6f0952605d0140c1cfdb138ed005775b92d67b02" + integrity sha512-IItsdsea19BoLC7ELy13q1iJFNmd7ofZH5+X/pJr90/nRoPEX0DJo1dHDbgtYWOhJhcCgMDTOw84RZ72q6lB+Q== + +growly@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" + integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= + +handlebars@^4.1.2: + version "4.2.0" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.2.0.tgz#57ce8d2175b9bbb3d8b3cf3e4217b1aec8ddcb2e" + integrity sha512-Kb4xn5Qh1cxAKvQnzNWZ512DhABzyFNmsaJf3OAkWNa4NkaqWcNI8Tao8Tasi0/F4JD9oyG0YxuFyvyR57d+Gw== + dependencies: + neo-async "^2.6.0" + optimist "^0.6.1" + source-map "^0.6.1" + optionalDependencies: + uglify-js "^3.1.4" + +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= + +har-validator@~5.1.0: + version "5.1.3" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080" + integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g== + dependencies: + ajv "^6.5.5" + har-schema "^2.0.0" + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + +has-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" + integrity sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q= + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= + +has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= + dependencies: + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" + +has-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= + dependencies: + get-value "^2.0.6" + has-values "^1.0.0" + isobject "^3.0.0" + +has-values@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= + +has-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +has@^1.0.1, has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +hosted-git-info@^2.1.4: + version "2.8.4" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.4.tgz#44119abaf4bc64692a16ace34700fed9c03e2546" + integrity sha512-pzXIvANXEFrc5oFFXRMkbLPQ2rXRoDERwDLyrcUxGhaZhgP54BBSl9Oheh7Vv0T090cszWBxPjkQQ5Sq1PbBRQ== + +html-encoding-sniffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz#e70d84b94da53aa375e11fe3a351be6642ca46f8" + integrity sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw== + dependencies: + whatwg-encoding "^1.0.1" + +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +iconv-lite@0.4.24, iconv-lite@^0.4.4: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +ignore-walk@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.2.tgz#99d83a246c196ea5c93ef9315ad7b0819c35069b" + integrity sha512-EXyErtpHbn75ZTsOADsfx6J/FPo6/5cjev46PXrcTpd8z3BoRkXgYu9/JVqrI7tusjmwCZutGeRJeU0Wo1e4Cw== + dependencies: + minimatch "^3.0.4" + +import-local@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-2.0.0.tgz#55070be38a5993cf18ef6db7e961f5bee5c5a09d" + integrity sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ== + dependencies: + pkg-dir "^3.0.0" + resolve-cwd "^2.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= + +inflection@1.12.0: + version "1.12.0" + resolved "https://registry.yarnpkg.com/inflection/-/inflection-1.12.0.tgz#a200935656d6f5f6bc4dc7502e1aecb703228416" + integrity sha1-ogCTVlbW9fa8TcdQLhrstwMihBY= + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +ini@~1.3.0: + version "1.3.5" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" + integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== + +invariant@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== + dependencies: + loose-envify "^1.0.0" + +is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= + dependencies: + kind-of "^3.0.2" + +is-accessor-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== + dependencies: + kind-of "^6.0.0" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= + +is-bluebird@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-bluebird/-/is-bluebird-1.0.2.tgz#096439060f4aa411abee19143a84d6a55346d6e2" + integrity sha1-CWQ5Bg9KpBGr7hkUOoTWpVNG1uI= + +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== + +is-callable@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" + integrity sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA== + +is-ci@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" + integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w== + dependencies: + ci-info "^2.0.0" + +is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= + dependencies: + kind-of "^3.0.2" + +is-data-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== + dependencies: + kind-of "^6.0.0" + +is-date-object@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" + integrity sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY= + +is-descriptor@^0.1.0: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + +is-descriptor@^1.0.0, is-descriptor@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== + dependencies: + is-accessor-descriptor "^1.0.0" + is-data-descriptor "^1.0.0" + kind-of "^6.0.2" + +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= + +is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== + dependencies: + is-plain-object "^2.0.4" + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + +is-generator-fn@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" + integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= + dependencies: + kind-of "^3.0.2" + +is-plain-object@^2.0.3, is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== + dependencies: + isobject "^3.0.1" + +is-regex@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" + integrity sha1-VRdIm1RwkbCTDglWVM7SXul+lJE= + dependencies: + has "^1.0.1" + +is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= + +is-symbol@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.2.tgz#a055f6ae57192caee329e7a860118b497a950f38" + integrity sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw== + dependencies: + has-symbols "^1.0.0" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= + +is-windows@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== + +is-wsl@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" + integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= + +isarray@1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= + dependencies: + isarray "1.0.0" + +isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= + +istanbul-lib-coverage@^2.0.2, istanbul-lib-coverage@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz#675f0ab69503fad4b1d849f736baaca803344f49" + integrity sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA== + +istanbul-lib-instrument@^3.0.1, istanbul-lib-instrument@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz#a5f63d91f0bbc0c3e479ef4c5de027335ec6d630" + integrity sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA== + dependencies: + "@babel/generator" "^7.4.0" + "@babel/parser" "^7.4.3" + "@babel/template" "^7.4.0" + "@babel/traverse" "^7.4.3" + "@babel/types" "^7.4.0" + istanbul-lib-coverage "^2.0.5" + semver "^6.0.0" + +istanbul-lib-report@^2.0.4: + version "2.0.8" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz#5a8113cd746d43c4889eba36ab10e7d50c9b4f33" + integrity sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ== + dependencies: + istanbul-lib-coverage "^2.0.5" + make-dir "^2.1.0" + supports-color "^6.1.0" + +istanbul-lib-source-maps@^3.0.1: + version "3.0.6" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz#284997c48211752ec486253da97e3879defba8c8" + integrity sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw== + dependencies: + debug "^4.1.1" + istanbul-lib-coverage "^2.0.5" + make-dir "^2.1.0" + rimraf "^2.6.3" + source-map "^0.6.1" + +istanbul-reports@^2.2.6: + version "2.2.6" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-2.2.6.tgz#7b4f2660d82b29303a8fe6091f8ca4bf058da1af" + integrity sha512-SKi4rnMyLBKe0Jy2uUdx28h8oG7ph2PPuQPvIAh31d+Ci+lSiEu4C+h3oBPuJ9+mPKhOyW0M8gY4U5NM1WLeXA== + dependencies: + handlebars "^4.1.2" + +jest-changed-files@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-24.9.0.tgz#08d8c15eb79a7fa3fc98269bc14b451ee82f8039" + integrity sha512-6aTWpe2mHF0DhL28WjdkO8LyGjs3zItPET4bMSeXU6T3ub4FPMw+mcOcbdGXQOAfmLcxofD23/5Bl9Z4AkFwqg== + dependencies: + "@jest/types" "^24.9.0" + execa "^1.0.0" + throat "^4.0.0" + +jest-cli@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-24.9.0.tgz#ad2de62d07472d419c6abc301fc432b98b10d2af" + integrity sha512-+VLRKyitT3BWoMeSUIHRxV/2g8y9gw91Jh5z2UmXZzkZKpbC08CSehVxgHUwTpy+HwGcns/tqafQDJW7imYvGg== + dependencies: + "@jest/core" "^24.9.0" + "@jest/test-result" "^24.9.0" + "@jest/types" "^24.9.0" + chalk "^2.0.1" + exit "^0.1.2" + import-local "^2.0.0" + is-ci "^2.0.0" + jest-config "^24.9.0" + jest-util "^24.9.0" + jest-validate "^24.9.0" + prompts "^2.0.1" + realpath-native "^1.1.0" + yargs "^13.3.0" + +jest-config@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-24.9.0.tgz#fb1bbc60c73a46af03590719efa4825e6e4dd1b5" + integrity sha512-RATtQJtVYQrp7fvWg6f5y3pEFj9I+H8sWw4aKxnDZ96mob5i5SD6ZEGWgMLXQ4LE8UurrjbdlLWdUeo+28QpfQ== + dependencies: + "@babel/core" "^7.1.0" + "@jest/test-sequencer" "^24.9.0" + "@jest/types" "^24.9.0" + babel-jest "^24.9.0" + chalk "^2.0.1" + glob "^7.1.1" + jest-environment-jsdom "^24.9.0" + jest-environment-node "^24.9.0" + jest-get-type "^24.9.0" + jest-jasmine2 "^24.9.0" + jest-regex-util "^24.3.0" + jest-resolve "^24.9.0" + jest-util "^24.9.0" + jest-validate "^24.9.0" + micromatch "^3.1.10" + pretty-format "^24.9.0" + realpath-native "^1.1.0" + +jest-diff@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-24.9.0.tgz#931b7d0d5778a1baf7452cb816e325e3724055da" + integrity sha512-qMfrTs8AdJE2iqrTp0hzh7kTd2PQWrsFyj9tORoKmu32xjPjeE4NyjVRDz8ybYwqS2ik8N4hsIpiVTyFeo2lBQ== + dependencies: + chalk "^2.0.1" + diff-sequences "^24.9.0" + jest-get-type "^24.9.0" + pretty-format "^24.9.0" + +jest-docblock@^24.3.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-24.9.0.tgz#7970201802ba560e1c4092cc25cbedf5af5a8ce2" + integrity sha512-F1DjdpDMJMA1cN6He0FNYNZlo3yYmOtRUnktrT9Q37njYzC5WEaDdmbynIgy0L/IvXvvgsG8OsqhLPXTpfmZAA== + dependencies: + detect-newline "^2.1.0" + +jest-each@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-24.9.0.tgz#eb2da602e2a610898dbc5f1f6df3ba86b55f8b05" + integrity sha512-ONi0R4BvW45cw8s2Lrx8YgbeXL1oCQ/wIDwmsM3CqM/nlblNCPmnC3IPQlMbRFZu3wKdQ2U8BqM6lh3LJ5Bsog== + dependencies: + "@jest/types" "^24.9.0" + chalk "^2.0.1" + jest-get-type "^24.9.0" + jest-util "^24.9.0" + pretty-format "^24.9.0" + +jest-environment-jsdom@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-24.9.0.tgz#4b0806c7fc94f95edb369a69cc2778eec2b7375b" + integrity sha512-Zv9FV9NBRzLuALXjvRijO2351DRQeLYXtpD4xNvfoVFw21IOKNhZAEUKcbiEtjTkm2GsJ3boMVgkaR7rN8qetA== + dependencies: + "@jest/environment" "^24.9.0" + "@jest/fake-timers" "^24.9.0" + "@jest/types" "^24.9.0" + jest-mock "^24.9.0" + jest-util "^24.9.0" + jsdom "^11.5.1" + +jest-environment-node@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-24.9.0.tgz#333d2d2796f9687f2aeebf0742b519f33c1cbfd3" + integrity sha512-6d4V2f4nxzIzwendo27Tr0aFm+IXWa0XEUnaH6nU0FMaozxovt+sfRvh4J47wL1OvF83I3SSTu0XK+i4Bqe7uA== + dependencies: + "@jest/environment" "^24.9.0" + "@jest/fake-timers" "^24.9.0" + "@jest/types" "^24.9.0" + jest-mock "^24.9.0" + jest-util "^24.9.0" + +jest-get-type@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-24.9.0.tgz#1684a0c8a50f2e4901b6644ae861f579eed2ef0e" + integrity sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q== + +jest-haste-map@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-24.9.0.tgz#b38a5d64274934e21fa417ae9a9fbeb77ceaac7d" + integrity sha512-kfVFmsuWui2Sj1Rp1AJ4D9HqJwE4uwTlS/vO+eRUaMmd54BFpli2XhMQnPC2k4cHFVbB2Q2C+jtI1AGLgEnCjQ== + dependencies: + "@jest/types" "^24.9.0" + anymatch "^2.0.0" + fb-watchman "^2.0.0" + graceful-fs "^4.1.15" + invariant "^2.2.4" + jest-serializer "^24.9.0" + jest-util "^24.9.0" + jest-worker "^24.9.0" + micromatch "^3.1.10" + sane "^4.0.3" + walker "^1.0.7" + optionalDependencies: + fsevents "^1.2.7" + +jest-jasmine2@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-24.9.0.tgz#1f7b1bd3242c1774e62acabb3646d96afc3be6a0" + integrity sha512-Cq7vkAgaYKp+PsX+2/JbTarrk0DmNhsEtqBXNwUHkdlbrTBLtMJINADf2mf5FkowNsq8evbPc07/qFO0AdKTzw== + dependencies: + "@babel/traverse" "^7.1.0" + "@jest/environment" "^24.9.0" + "@jest/test-result" "^24.9.0" + "@jest/types" "^24.9.0" + chalk "^2.0.1" + co "^4.6.0" + expect "^24.9.0" + is-generator-fn "^2.0.0" + jest-each "^24.9.0" + jest-matcher-utils "^24.9.0" + jest-message-util "^24.9.0" + jest-runtime "^24.9.0" + jest-snapshot "^24.9.0" + jest-util "^24.9.0" + pretty-format "^24.9.0" + throat "^4.0.0" + +jest-leak-detector@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-24.9.0.tgz#b665dea7c77100c5c4f7dfcb153b65cf07dcf96a" + integrity sha512-tYkFIDsiKTGwb2FG1w8hX9V0aUb2ot8zY/2nFg087dUageonw1zrLMP4W6zsRO59dPkTSKie+D4rhMuP9nRmrA== + dependencies: + jest-get-type "^24.9.0" + pretty-format "^24.9.0" + +jest-matcher-utils@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-24.9.0.tgz#f5b3661d5e628dffe6dd65251dfdae0e87c3a073" + integrity sha512-OZz2IXsu6eaiMAwe67c1T+5tUAtQyQx27/EMEkbFAGiw52tB9em+uGbzpcgYVpA8wl0hlxKPZxrly4CXU/GjHA== + dependencies: + chalk "^2.0.1" + jest-diff "^24.9.0" + jest-get-type "^24.9.0" + pretty-format "^24.9.0" + +jest-message-util@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-24.9.0.tgz#527f54a1e380f5e202a8d1149b0ec872f43119e3" + integrity sha512-oCj8FiZ3U0hTP4aSui87P4L4jC37BtQwUMqk+zk/b11FR19BJDeZsZAvIHutWnmtw7r85UmR3CEWZ0HWU2mAlw== + dependencies: + "@babel/code-frame" "^7.0.0" + "@jest/test-result" "^24.9.0" + "@jest/types" "^24.9.0" + "@types/stack-utils" "^1.0.1" + chalk "^2.0.1" + micromatch "^3.1.10" + slash "^2.0.0" + stack-utils "^1.0.1" + +jest-mock@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-24.9.0.tgz#c22835541ee379b908673ad51087a2185c13f1c6" + integrity sha512-3BEYN5WbSq9wd+SyLDES7AHnjH9A/ROBwmz7l2y+ol+NtSFO8DYiEBzoO1CeFc9a8DYy10EO4dDFVv/wN3zl1w== + dependencies: + "@jest/types" "^24.9.0" + +jest-pnp-resolver@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.1.tgz#ecdae604c077a7fbc70defb6d517c3c1c898923a" + integrity sha512-pgFw2tm54fzgYvc/OHrnysABEObZCUNFnhjoRjaVOCN8NYc032/gVjPaHD4Aq6ApkSieWtfKAFQtmDKAmhupnQ== + +jest-regex-util@^24.3.0, jest-regex-util@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-24.9.0.tgz#c13fb3380bde22bf6575432c493ea8fe37965636" + integrity sha512-05Cmb6CuxaA+Ys6fjr3PhvV3bGQmO+2p2La4hFbU+W5uOc479f7FdLXUWXw4pYMAhhSZIuKHwSXSu6CsSBAXQA== + +jest-resolve-dependencies@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-24.9.0.tgz#ad055198959c4cfba8a4f066c673a3f0786507ab" + integrity sha512-Fm7b6AlWnYhT0BXy4hXpactHIqER7erNgIsIozDXWl5dVm+k8XdGVe1oTg1JyaFnOxarMEbax3wyRJqGP2Pq+g== + dependencies: + "@jest/types" "^24.9.0" + jest-regex-util "^24.3.0" + jest-snapshot "^24.9.0" + +jest-resolve@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-24.9.0.tgz#dff04c7687af34c4dd7e524892d9cf77e5d17321" + integrity sha512-TaLeLVL1l08YFZAt3zaPtjiVvyy4oSA6CRe+0AFPPVX3Q/VI0giIWWoAvoS5L96vj9Dqxj4fB5p2qrHCmTU/MQ== + dependencies: + "@jest/types" "^24.9.0" + browser-resolve "^1.11.3" + chalk "^2.0.1" + jest-pnp-resolver "^1.2.1" + realpath-native "^1.1.0" + +jest-runner@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-24.9.0.tgz#574fafdbd54455c2b34b4bdf4365a23857fcdf42" + integrity sha512-KksJQyI3/0mhcfspnxxEOBueGrd5E4vV7ADQLT9ESaCzz02WnbdbKWIf5Mkaucoaj7obQckYPVX6JJhgUcoWWg== + dependencies: + "@jest/console" "^24.7.1" + "@jest/environment" "^24.9.0" + "@jest/test-result" "^24.9.0" + "@jest/types" "^24.9.0" + chalk "^2.4.2" + exit "^0.1.2" + graceful-fs "^4.1.15" + jest-config "^24.9.0" + jest-docblock "^24.3.0" + jest-haste-map "^24.9.0" + jest-jasmine2 "^24.9.0" + jest-leak-detector "^24.9.0" + jest-message-util "^24.9.0" + jest-resolve "^24.9.0" + jest-runtime "^24.9.0" + jest-util "^24.9.0" + jest-worker "^24.6.0" + source-map-support "^0.5.6" + throat "^4.0.0" + +jest-runtime@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-24.9.0.tgz#9f14583af6a4f7314a6a9d9f0226e1a781c8e4ac" + integrity sha512-8oNqgnmF3v2J6PVRM2Jfuj8oX3syKmaynlDMMKQ4iyzbQzIG6th5ub/lM2bCMTmoTKM3ykcUYI2Pw9xwNtjMnw== + dependencies: + "@jest/console" "^24.7.1" + "@jest/environment" "^24.9.0" + "@jest/source-map" "^24.3.0" + "@jest/transform" "^24.9.0" + "@jest/types" "^24.9.0" + "@types/yargs" "^13.0.0" + chalk "^2.0.1" + exit "^0.1.2" + glob "^7.1.3" + graceful-fs "^4.1.15" + jest-config "^24.9.0" + jest-haste-map "^24.9.0" + jest-message-util "^24.9.0" + jest-mock "^24.9.0" + jest-regex-util "^24.3.0" + jest-resolve "^24.9.0" + jest-snapshot "^24.9.0" + jest-util "^24.9.0" + jest-validate "^24.9.0" + realpath-native "^1.1.0" + slash "^2.0.0" + strip-bom "^3.0.0" + yargs "^13.3.0" + +jest-serializer@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-24.9.0.tgz#e6d7d7ef96d31e8b9079a714754c5d5c58288e73" + integrity sha512-DxYipDr8OvfrKH3Kel6NdED3OXxjvxXZ1uIY2I9OFbGg+vUkkg7AGvi65qbhbWNPvDckXmzMPbK3u3HaDO49bQ== + +jest-snapshot@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-24.9.0.tgz#ec8e9ca4f2ec0c5c87ae8f925cf97497b0e951ba" + integrity sha512-uI/rszGSs73xCM0l+up7O7a40o90cnrk429LOiK3aeTvfC0HHmldbd81/B7Ix81KSFe1lwkbl7GnBGG4UfuDew== + dependencies: + "@babel/types" "^7.0.0" + "@jest/types" "^24.9.0" + chalk "^2.0.1" + expect "^24.9.0" + jest-diff "^24.9.0" + jest-get-type "^24.9.0" + jest-matcher-utils "^24.9.0" + jest-message-util "^24.9.0" + jest-resolve "^24.9.0" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + pretty-format "^24.9.0" + semver "^6.2.0" + +jest-util@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-24.9.0.tgz#7396814e48536d2e85a37de3e4c431d7cb140162" + integrity sha512-x+cZU8VRmOJxbA1K5oDBdxQmdq0OIdADarLxk0Mq+3XS4jgvhG/oKGWcIDCtPG0HgjxOYvF+ilPJQsAyXfbNOg== + dependencies: + "@jest/console" "^24.9.0" + "@jest/fake-timers" "^24.9.0" + "@jest/source-map" "^24.9.0" + "@jest/test-result" "^24.9.0" + "@jest/types" "^24.9.0" + callsites "^3.0.0" + chalk "^2.0.1" + graceful-fs "^4.1.15" + is-ci "^2.0.0" + mkdirp "^0.5.1" + slash "^2.0.0" + source-map "^0.6.0" + +jest-validate@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-24.9.0.tgz#0775c55360d173cd854e40180756d4ff52def8ab" + integrity sha512-HPIt6C5ACwiqSiwi+OfSSHbK8sG7akG8eATl+IPKaeIjtPOeBUd/g3J7DghugzxrGjI93qS/+RPKe1H6PqvhRQ== + dependencies: + "@jest/types" "^24.9.0" + camelcase "^5.3.1" + chalk "^2.0.1" + jest-get-type "^24.9.0" + leven "^3.1.0" + pretty-format "^24.9.0" + +jest-watcher@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-24.9.0.tgz#4b56e5d1ceff005f5b88e528dc9afc8dd4ed2b3b" + integrity sha512-+/fLOfKPXXYJDYlks62/4R4GoT+GU1tYZed99JSCOsmzkkF7727RqKrjNAxtfO4YpGv11wybgRvCjR73lK2GZw== + dependencies: + "@jest/test-result" "^24.9.0" + "@jest/types" "^24.9.0" + "@types/yargs" "^13.0.0" + ansi-escapes "^3.0.0" + chalk "^2.0.1" + jest-util "^24.9.0" + string-length "^2.0.0" + +jest-worker@^24.6.0, jest-worker@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-24.9.0.tgz#5dbfdb5b2d322e98567898238a9697bcce67b3e5" + integrity sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw== + dependencies: + merge-stream "^2.0.0" + supports-color "^6.1.0" + +jest@^24.5.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-24.9.0.tgz#987d290c05a08b52c56188c1002e368edb007171" + integrity sha512-YvkBL1Zm7d2B1+h5fHEOdyjCG+sGMz4f8D86/0HiqJ6MB4MnDc8FgP5vdWsGnemOQro7lnYo8UakZ3+5A0jxGw== + dependencies: + import-local "^2.0.0" + jest-cli "^24.9.0" + +"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= + +jsdom@^11.5.1: + version "11.12.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.12.0.tgz#1a80d40ddd378a1de59656e9e6dc5a3ba8657bc8" + integrity sha512-y8Px43oyiBM13Zc1z780FrfNLJCXTL40EWlty/LXUtcjykRBNgLlCjWXpfSPBl2iv+N7koQN+dvqszHZgT/Fjw== + dependencies: + abab "^2.0.0" + acorn "^5.5.3" + acorn-globals "^4.1.0" + array-equal "^1.0.0" + cssom ">= 0.3.2 < 0.4.0" + cssstyle "^1.0.0" + data-urls "^1.0.0" + domexception "^1.0.1" + escodegen "^1.9.1" + html-encoding-sniffer "^1.0.2" + left-pad "^1.3.0" + nwsapi "^2.0.7" + parse5 "4.0.0" + pn "^1.1.0" + request "^2.87.0" + request-promise-native "^1.0.5" + sax "^1.2.4" + symbol-tree "^3.2.2" + tough-cookie "^2.3.4" + w3c-hr-time "^1.0.1" + webidl-conversions "^4.0.2" + whatwg-encoding "^1.0.3" + whatwg-mimetype "^2.1.0" + whatwg-url "^6.4.1" + ws "^5.2.0" + xml-name-validator "^3.0.0" + +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== + +json-parse-better-errors@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= + +json5@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.0.tgz#e7a0c62c48285c628d20a10b85c89bb807c32850" + integrity sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ== + dependencies: + minimist "^1.2.0" + +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= + dependencies: + is-buffer "^1.1.5" + +kind-of@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== + +kind-of@^6.0.0, kind-of@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" + integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA== + +kleur@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" + integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== + +left-pad@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e" + integrity sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA== + +leven@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" + integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== + +levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +load-json-file@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" + integrity sha1-L19Fq5HjMhYjT9U62rZo607AmTs= + dependencies: + graceful-fs "^4.1.2" + parse-json "^4.0.0" + pify "^3.0.0" + strip-bom "^3.0.0" + +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + +lodash.sortby@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" + integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= + +lodash@^4.17.11, lodash@^4.17.13: + version "4.17.15" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" + integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== + +loose-envify@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +make-dir@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" + integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== + dependencies: + pify "^4.0.1" + semver "^5.6.0" + +makeerror@1.0.x: + version "1.0.11" + resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" + integrity sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw= + dependencies: + tmpl "1.0.x" + +map-cache@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= + +map-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= + dependencies: + object-visit "^1.0.0" + +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +micromatch@^3.1.10, micromatch@^3.1.4: + version "3.1.10" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.1" + define-property "^2.0.2" + extend-shallow "^3.0.2" + extglob "^2.0.4" + fragment-cache "^0.2.1" + kind-of "^6.0.2" + nanomatch "^1.2.9" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.2" + +mime-db@1.40.0: + version "1.40.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.40.0.tgz#a65057e998db090f732a68f6c276d387d4126c32" + integrity sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA== + +mime-types@^2.1.12, mime-types@~2.1.19: + version "2.1.24" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.24.tgz#b6f8d0b3e951efb77dedeca194cff6d16f676f81" + integrity sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ== + dependencies: + mime-db "1.40.0" + +minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= + +minimist@^1.1.1, minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= + +minimist@~0.0.1: + version "0.0.10" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= + +minipass@^2.2.1, minipass@^2.6.0, minipass@^2.6.4: + version "2.6.5" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.6.5.tgz#1c245f9f2897f70fd4a219066261ce6c29f80b18" + integrity sha512-ewSKOPFH9blOLXx0YSE+mbrNMBFPS+11a2b03QZ+P4LVrUHW/GAlqeYC7DBknDyMWkHzrzTpDhUvy7MUxqyrPA== + dependencies: + safe-buffer "^5.1.2" + yallist "^3.0.0" + +minizlib@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.2.2.tgz#6f0ccc82fa53e1bf2ff145f220d2da9fa6e3a166" + integrity sha512-hR3At21uSrsjjDTWrbu0IMLTpnkpv8IIMFDFaoz43Tmu4LkmAXfH44vNNzpTnf+OAQQCHrb91y/wc2J4x5XgSQ== + dependencies: + minipass "^2.2.1" + +mixin-deep@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" + integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== + dependencies: + for-in "^1.0.2" + is-extendable "^1.0.1" + +mkdirp@^0.5.0, mkdirp@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= + dependencies: + minimist "0.0.8" + +moment-timezone@^0.5.21: + version "0.5.26" + resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.26.tgz#c0267ca09ae84631aa3dc33f65bedbe6e8e0d772" + integrity sha512-sFP4cgEKTCymBBKgoxZjYzlSovC20Y6J7y3nanDc5RoBIXKlZhoYwBoZGe3flwU6A372AcRwScH8KiwV6zjy1g== + dependencies: + moment ">= 2.9.0" + +"moment@>= 2.9.0", moment@^2.24.0: + version "2.24.0" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b" + integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg== + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + +ms@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +nan@^2.12.1: + version "2.14.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c" + integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg== + +nanomatch@^1.2.9: + version "1.2.13" + resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" + integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^2.0.2" + extend-shallow "^3.0.2" + fragment-cache "^0.2.1" + is-windows "^1.0.2" + kind-of "^6.0.2" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= + +needle@^2.2.1: + version "2.4.0" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.4.0.tgz#6833e74975c444642590e15a750288c5f939b57c" + integrity sha512-4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg== + dependencies: + debug "^3.2.6" + iconv-lite "^0.4.4" + sax "^1.2.4" + +neo-async@^2.6.0: + version "2.6.1" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" + integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw== + +nice-try@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" + integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== + +node-int64@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" + integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs= + +node-modules-regexp@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" + integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= + +node-notifier@^5.4.2: + version "5.4.3" + resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.4.3.tgz#cb72daf94c93904098e28b9c590fd866e464bd50" + integrity sha512-M4UBGcs4jeOK9CjTsYwkvH6/MzuUmGCyTW+kCY7uO+1ZVr0+FHGdPdIf5CCLqAaxnRrWidyoQlNkMIIVwbKB8Q== + dependencies: + growly "^1.3.0" + is-wsl "^1.1.0" + semver "^5.5.0" + shellwords "^0.1.1" + which "^1.3.0" + +node-pre-gyp@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz#39ba4bb1439da030295f899e3b520b7785766149" + integrity sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A== + dependencies: + detect-libc "^1.0.2" + mkdirp "^0.5.1" + needle "^2.2.1" + nopt "^4.0.1" + npm-packlist "^1.1.6" + npmlog "^4.0.2" + rc "^1.2.7" + rimraf "^2.6.1" + semver "^5.3.0" + tar "^4" + +nopt@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" + integrity sha1-0NRoWv1UFRk8jHUFYC0NF81kR00= + dependencies: + abbrev "1" + osenv "^0.1.4" + +normalize-package-data@^2.3.2: + version "2.5.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== + dependencies: + hosted-git-info "^2.1.4" + resolve "^1.10.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= + dependencies: + remove-trailing-separator "^1.0.1" + +npm-bundled@^1.0.1: + version "1.0.6" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.6.tgz#e7ba9aadcef962bb61248f91721cd932b3fe6bdd" + integrity sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g== + +npm-packlist@^1.1.6: + version "1.4.4" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.4.tgz#866224233850ac534b63d1a6e76050092b5d2f44" + integrity sha512-zTLo8UcVYtDU3gdeaFu2Xu0n0EvelfHDGuqtNIn5RO7yQj4H1TqNdBc/yZjxnWA0PVB8D3Woyp0i5B43JwQ6Vw== + dependencies: + ignore-walk "^3.0.1" + npm-bundled "^1.0.1" + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= + dependencies: + path-key "^2.0.0" + +npmlog@^4.0.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= + +nwsapi@^2.0.7: + version "2.1.4" + resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.1.4.tgz#e006a878db23636f8e8a67d33ca0e4edf61a842f" + integrity sha512-iGfd9Y6SFdTNldEy2L0GUhcarIutFmk+MPWIn9dmj8NMIup03G08uUF2KGbbmv/Ux4RT0VZJoP/sVbWA6d/VIw== + +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== + +object-assign@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + +object-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + +object-inspect@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.6.0.tgz#c70b6cbf72f274aab4c34c0c82f5167bf82cf15b" + integrity sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ== + +object-keys@^1.0.12, object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +object-visit@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= + dependencies: + isobject "^3.0.0" + +object.getownpropertydescriptors@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16" + integrity sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY= + dependencies: + define-properties "^1.1.2" + es-abstract "^1.5.1" + +object.pick@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= + dependencies: + isobject "^3.0.1" + +once@^1.3.0, once@^1.3.1, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +optimist@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + integrity sha1-2j6nRob6IaGaERwybpDrFaAZZoY= + dependencies: + minimist "~0.0.1" + wordwrap "~0.0.2" + +optionator@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" + integrity sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q= + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.4" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + wordwrap "~1.0.0" + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= + +os-tmpdir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= + +osenv@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + +p-each-series@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-each-series/-/p-each-series-1.0.0.tgz#930f3d12dd1f50e7434457a22cd6f04ac6ad7f71" + integrity sha1-kw89Et0fUOdDRFeiLNbwSsatf3E= + dependencies: + p-reduce "^1.0.0" + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= + +p-limit@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.1.tgz#aa07a788cc3151c939b5131f63570f0dd2009537" + integrity sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg== + dependencies: + p-try "^2.0.0" + +p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + dependencies: + p-limit "^2.0.0" + +p-reduce@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa" + integrity sha1-GMKw3ZNqRpClKfgjH1ig/bakffo= + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +parse-json@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" + integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= + dependencies: + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + +parse5@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" + integrity sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA== + +pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +path-key@^2.0.0, path-key@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= + +path-parse@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" + integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + +path-type@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" + integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== + dependencies: + pify "^3.0.0" + +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= + +pify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= + +pify@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== + +pirates@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.1.tgz#643a92caf894566f91b2b986d2c66950a8e2fb87" + integrity sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA== + dependencies: + node-modules-regexp "^1.0.0" + +pkg-dir@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" + integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== + dependencies: + find-up "^3.0.0" + +pn@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" + integrity sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA== + +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= + +pretty-format@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-24.9.0.tgz#12fac31b37019a4eea3c11aa9a959eb7628aa7c9" + integrity sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA== + dependencies: + "@jest/types" "^24.9.0" + ansi-regex "^4.0.0" + ansi-styles "^3.2.0" + react-is "^16.8.4" + +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + +prompts@^2.0.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.2.1.tgz#f901dd2a2dfee080359c0e20059b24188d75ad35" + integrity sha512-VObPvJiWPhpZI6C5m60XOzTfnYg/xc/an+r9VYymj9WJW3B/DIH+REzjpAACPf8brwPeP+7vz3bIim3S+AaMjw== + dependencies: + kleur "^3.0.3" + sisteransi "^1.0.3" + +psl@^1.1.24, psl@^1.1.28: + version "1.4.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.4.0.tgz#5dd26156cdb69fa1fdb8ab1991667d3f80ced7c2" + integrity sha512-HZzqCGPecFLyoRj5HLfuDSKYTJkAfB5thKBIkRHtGjWwY7p1dAyveIbXIq4tO0KYfDF2tHqPUgY9SDnGm00uFw== + +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= + +punycode@^2.1.0, punycode@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +qs@~6.5.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== + +rc@^1.2.7: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +react-is@^16.8.4: + version "16.9.0" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.9.0.tgz#21ca9561399aad0ff1a7701c01683e8ca981edcb" + integrity sha512-tJBzzzIgnnRfEm046qRcURvwQnZVXmuCbscxUO5RWrGTXpon2d4c8mI0D8WE6ydVIm29JiLB6+RslkIvym9Rjw== + +read-pkg-up@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-4.0.0.tgz#1b221c6088ba7799601c808f91161c66e58f8978" + integrity sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA== + dependencies: + find-up "^3.0.0" + read-pkg "^3.0.0" + +read-pkg@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" + integrity sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k= + dependencies: + load-json-file "^4.0.0" + normalize-package-data "^2.3.2" + path-type "^3.0.0" + +readable-stream@^2.0.6: + version "2.3.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" + integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +realpath-native@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-1.1.0.tgz#2003294fea23fb0672f2476ebe22fcf498a2d65c" + integrity sha512-wlgPA6cCIIg9gKz0fgAPjnzh4yR/LnXovwuo9hvyGvx3h8nX4+/iLZplfUWasXpqD8BdnGnP5njOFjkUwPzvjA== + dependencies: + util.promisify "^1.0.0" + +regenerator-runtime@^0.13.2: + version "0.13.3" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz#7cf6a77d8f5c6f60eb73c5fc1955b2ceb01e6bf5" + integrity sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw== + +regex-not@^1.0.0, regex-not@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== + dependencies: + extend-shallow "^3.0.2" + safe-regex "^1.1.0" + +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= + +repeat-element@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" + integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== + +repeat-string@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= + +request-promise-core@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.2.tgz#339f6aababcafdb31c799ff158700336301d3346" + integrity sha512-UHYyq1MO8GsefGEt7EprS8UrXsm1TxEvFUX1IMTuSLU2Rh7fTIdFtl8xD7JiEYiWU2dl+NYAjCTksTehQUxPag== + dependencies: + lodash "^4.17.11" + +request-promise-native@^1.0.5: + version "1.0.7" + resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.7.tgz#a49868a624bdea5069f1251d0a836e0d89aa2c59" + integrity sha512-rIMnbBdgNViL37nZ1b3L/VfPOpSi0TqVDQPAvO6U14lMzOLrt5nilxCQqtDKhZeDiW0/hkCXGoQjhgJd/tCh6w== + dependencies: + request-promise-core "1.1.2" + stealthy-require "^1.1.1" + tough-cookie "^2.3.3" + +request@^2.87.0: + version "2.88.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" + integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg== + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + har-validator "~5.1.0" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.4.3" + tunnel-agent "^0.6.0" + uuid "^3.3.2" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== + +resolve-cwd@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" + integrity sha1-AKn3OHVW4nA46uIyyqNypqWbZlo= + dependencies: + resolve-from "^3.0.0" + +resolve-from@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + integrity sha1-six699nWiBvItuZTM17rywoYh0g= + +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= + +resolve@1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= + +resolve@^1.10.0, resolve@^1.3.2: + version "1.12.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.12.0.tgz#3fc644a35c84a48554609ff26ec52b66fa577df6" + integrity sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w== + dependencies: + path-parse "^1.0.6" + +ret@~0.1.10: + version "0.1.15" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== + +retry-as-promised@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/retry-as-promised/-/retry-as-promised-3.2.0.tgz#769f63d536bec4783549db0777cb56dadd9d8543" + integrity sha512-CybGs60B7oYU/qSQ6kuaFmRd9sTZ6oXSc0toqePvV74Ac6/IFZSI1ReFQmtCN+uvW1Mtqdwpvt/LGOiCBAY2Mg== + dependencies: + any-promise "^1.3.0" + +rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.3: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + +rsvp@^4.8.4: + version "4.8.5" + resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" + integrity sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA== + +safe-buffer@^5.0.1, safe-buffer@^5.1.2: + version "5.2.0" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" + integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== + +safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safe-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= + dependencies: + ret "~0.1.10" + +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +sane@^4.0.3: + version "4.1.0" + resolved "https://registry.yarnpkg.com/sane/-/sane-4.1.0.tgz#ed881fd922733a6c461bc189dc2b6c006f3ffded" + integrity sha512-hhbzAgTIX8O7SHfp2c8/kREfEn4qO/9q8C9beyY6+tvZ87EpoZ3i1RIEvp27YBswnNbY9mWd6paKVmKbAgLfZA== + dependencies: + "@cnakazawa/watch" "^1.0.3" + anymatch "^2.0.0" + capture-exit "^2.0.0" + exec-sh "^0.3.2" + execa "^1.0.0" + fb-watchman "^2.0.0" + micromatch "^3.1.4" + minimist "^1.1.1" + walker "~1.0.5" + +sax@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== + +"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.6.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +semver@^6.0.0, semver@^6.1.1, semver@^6.2.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + +sequelize-pool@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/sequelize-pool/-/sequelize-pool-2.3.0.tgz#64f1fe8744228172c474f530604b6133be64993d" + integrity sha512-Ibz08vnXvkZ8LJTiUOxRcj1Ckdn7qafNZ2t59jYHMX1VIebTAOYefWdRYFt6z6+hy52WGthAHAoLc9hvk3onqA== + +sequelize@^5.18.4: + version "5.18.4" + resolved "https://registry.yarnpkg.com/sequelize/-/sequelize-5.18.4.tgz#1e2c7eabe4c554fa257a0115fad39f271bd56150" + integrity sha512-bBmJqpO1H8Z7L0xzITqVo5KHXFI7GmKfGl/5SIPDKsuUMbuZT98s+gyGeaLXpOWGH1ZUO79hvJ8z74vNcxBWHg== + dependencies: + bluebird "^3.5.0" + cls-bluebird "^2.1.0" + debug "^4.1.1" + dottie "^2.0.0" + inflection "1.12.0" + lodash "^4.17.11" + moment "^2.24.0" + moment-timezone "^0.5.21" + retry-as-promised "^3.1.0" + semver "^6.1.1" + sequelize-pool "^2.3.0" + toposort-class "^1.0.1" + uuid "^3.2.1" + validator "^10.11.0" + wkx "^0.4.6" + +set-blocking@^2.0.0, set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + +set-value@^2.0.0, set-value@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" + integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.3" + split-string "^3.0.1" + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= + dependencies: + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= + +shellwords@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" + integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww== + +shimmer@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" + integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== + +signal-exit@^3.0.0, signal-exit@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= + +sisteransi@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.3.tgz#98168d62b79e3a5e758e27ae63c4a053d748f4eb" + integrity sha512-SbEG75TzH8G7eVXFSN5f9EExILKfly7SUvVY5DhhYLvfhKqhDFY0OzevWa/zwak0RLRfWS5AvfMWpd9gJvr5Yg== + +slash@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" + integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== + +snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" + +snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== + dependencies: + kind-of "^3.2.0" + +snapdragon@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" + source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^3.1.0" + +source-map-resolve@^0.5.0: + version "0.5.2" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" + integrity sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA== + dependencies: + atob "^2.1.1" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + +source-map-support@^0.5.6: + version "0.5.13" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" + integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map-url@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" + integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= + +source-map@^0.5.0, source-map@^0.5.6: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= + +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +spdx-correct@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" + integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" + integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA== + +spdx-expression-parse@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" + integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.5" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" + integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q== + +split-string@^3.0.1, split-string@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== + dependencies: + extend-shallow "^3.0.0" + +sshpk@^1.7.0: + version "1.16.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" + integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" + ecc-jsbn "~0.1.1" + getpass "^0.1.1" + jsbn "~0.1.0" + safer-buffer "^2.0.2" + tweetnacl "~0.14.0" + +stack-utils@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.2.tgz#33eba3897788558bebfc2db059dc158ec36cebb8" + integrity sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA== + +static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + +stealthy-require@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" + integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= + +string-length@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed" + integrity sha1-1A27aGo6zpYMHP/KVivyxF+DY+0= + dependencies: + astral-regex "^1.0.0" + strip-ansi "^4.0.0" + +string-width@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +"string-width@^1.0.2 || 2": + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string-width@^3.0.0, string-width@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + +string.prototype.trimleft@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz#6cc47f0d7eb8d62b0f3701611715a3954591d634" + integrity sha512-FJ6b7EgdKxxbDxc79cOlok6Afd++TTs5szo+zJTUyow3ycrRfJVE2pq3vcN53XexvKZu/DJMDfeI/qMiZTrjTw== + dependencies: + define-properties "^1.1.3" + function-bind "^1.1.1" + +string.prototype.trimright@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/string.prototype.trimright/-/string.prototype.trimright-2.1.0.tgz#669d164be9df9b6f7559fa8e89945b168a5a6c58" + integrity sha512-fXZTSV55dNBwv16uw+hh5jkghxSnc5oHq+5K/gXgizHwAvMetdAJlHqqoFC1FSDVPYWLkAKl2cxpUT41sV7nSg== + dependencies: + define-properties "^1.1.3" + function-bind "^1.1.1" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= + dependencies: + ansi-regex "^3.0.0" + +strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + dependencies: + ansi-regex "^4.1.0" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= + +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= + +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" + integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== + dependencies: + has-flag "^3.0.0" + +symbol-tree@^3.2.2: + version "3.2.4" + resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" + integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== + +tar@^4: + version "4.4.11" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.11.tgz#7ac09801445a3cf74445ed27499136b5240ffb73" + integrity sha512-iI4zh3ktLJKaDNZKZc+fUONiQrSn9HkCFzamtb7k8FFmVilHVob7QsLX/VySAW8lAviMzMbFw4QtFb4errwgYA== + dependencies: + chownr "^1.1.1" + fs-minipass "^1.2.5" + minipass "^2.6.4" + minizlib "^1.2.1" + mkdirp "^0.5.0" + safe-buffer "^5.1.2" + yallist "^3.0.3" + +test-exclude@^5.2.3: + version "5.2.3" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-5.2.3.tgz#c3d3e1e311eb7ee405e092dac10aefd09091eac0" + integrity sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g== + dependencies: + glob "^7.1.3" + minimatch "^3.0.4" + read-pkg-up "^4.0.0" + require-main-filename "^2.0.0" + +throat@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a" + integrity sha1-iQN8vJLFarGJJua6TLsgDhVnKmo= + +tmpl@1.0.x: + version "1.0.4" + resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" + integrity sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE= + +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= + +to-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= + dependencies: + kind-of "^3.0.2" + +to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" + +to-regex@^3.0.1, to-regex@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== + dependencies: + define-property "^2.0.2" + extend-shallow "^3.0.2" + regex-not "^1.0.2" + safe-regex "^1.1.0" + +toposort-class@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/toposort-class/-/toposort-class-1.0.1.tgz#7ffd1f78c8be28c3ba45cd4e1a3f5ee193bd9988" + integrity sha1-f/0feMi+KMO6Rc1OGj9e4ZO9mYg= + +tough-cookie@^2.3.3, tough-cookie@^2.3.4: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== + dependencies: + psl "^1.1.28" + punycode "^2.1.1" + +tough-cookie@~2.4.3: + version "2.4.3" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" + integrity sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ== + dependencies: + psl "^1.1.24" + punycode "^1.4.1" + +tr46@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" + integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk= + dependencies: + punycode "^2.1.0" + +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= + dependencies: + prelude-ls "~1.1.2" + +uglify-js@^3.1.4: + version "3.6.0" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.6.0.tgz#704681345c53a8b2079fb6cec294b05ead242ff5" + integrity sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg== + dependencies: + commander "~2.20.0" + source-map "~0.6.1" + +union-value@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" + integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== + dependencies: + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^2.0.1" + +unset-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + +uri-js@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" + integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== + dependencies: + punycode "^2.1.0" + +urix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= + +use@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" + integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + +util.promisify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030" + integrity sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA== + dependencies: + define-properties "^1.1.2" + object.getownpropertydescriptors "^2.0.3" + +uuid@^3.2.1, uuid@^3.3.2: + version "3.3.3" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.3.tgz#4568f0216e78760ee1dbf3a4d2cf53e224112866" + integrity sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ== + +validate-npm-package-license@^3.0.1: + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +validator@^10.11.0: + version "10.11.0" + resolved "https://registry.yarnpkg.com/validator/-/validator-10.11.0.tgz#003108ea6e9a9874d31ccc9e5006856ccd76b228" + integrity sha512-X/p3UZerAIsbBfN/IwahhYaBbY68EN/UQBWHtsbXGT5bfrH/p4NQzUCG1kF/rtKaNpnJ7jAu6NGTdSNtyNIXMw== + +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +w3c-hr-time@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz#82ac2bff63d950ea9e3189a58a65625fedf19045" + integrity sha1-gqwr/2PZUOqeMYmlimViX+3xkEU= + dependencies: + browser-process-hrtime "^0.1.2" + +walker@^1.0.7, walker@~1.0.5: + version "1.0.7" + resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" + integrity sha1-L3+bj9ENZ3JisYqITijRlhjgKPs= + dependencies: + makeerror "1.0.x" + +webidl-conversions@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" + integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== + +whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3: + version "1.0.5" + resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" + integrity sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw== + dependencies: + iconv-lite "0.4.24" + +whatwg-mimetype@^2.1.0, whatwg-mimetype@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" + integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== + +whatwg-url@^6.4.1: + version "6.5.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.5.0.tgz#f2df02bff176fd65070df74ad5ccbb5a199965a8" + integrity sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ== + dependencies: + lodash.sortby "^4.7.0" + tr46 "^1.0.1" + webidl-conversions "^4.0.2" + +whatwg-url@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.0.0.tgz#fde926fa54a599f3adf82dff25a9f7be02dc6edd" + integrity sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ== + dependencies: + lodash.sortby "^4.7.0" + tr46 "^1.0.1" + webidl-conversions "^4.0.2" + +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= + +which@^1.2.9, which@^1.3.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +wide-align@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" + integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== + dependencies: + string-width "^1.0.2 || 2" + +wkx@^0.4.6: + version "0.4.8" + resolved "https://registry.yarnpkg.com/wkx/-/wkx-0.4.8.tgz#a092cf088d112683fdc7182fd31493b2c5820003" + integrity sha512-ikPXMM9IR/gy/LwiOSqWlSL3X/J5uk9EO2hHNRXS41eTLXaUFEVw9fn/593jW/tE5tedNg8YjT5HkCa4FqQZyQ== + dependencies: + "@types/node" "*" + +wordwrap@~0.0.2: + version "0.0.3" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" + integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc= + +wordwrap@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= + +wrap-ansi@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" + integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== + dependencies: + ansi-styles "^3.2.0" + string-width "^3.0.0" + strip-ansi "^5.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +write-file-atomic@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.1.tgz#d0b05463c188ae804396fd5ab2a370062af87529" + integrity sha512-TGHFeZEZMnv+gBFRfjAcxL5bPHrsGKtnb4qsFAws7/vlh+QfwAaySIw4AXP9ZskTTh5GWu3FLuJhsWVdiJPGvg== + dependencies: + graceful-fs "^4.1.11" + imurmurhash "^0.1.4" + signal-exit "^3.0.2" + +ws@^5.2.0: + version "5.2.2" + resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.2.tgz#dffef14866b8e8dc9133582514d1befaf96e980f" + integrity sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA== + dependencies: + async-limiter "~1.0.0" + +xml-name-validator@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" + integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== + +xregexp@^4.2.0: + version "4.2.4" + resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-4.2.4.tgz#02a4aea056d65a42632c02f0233eab8e4d7e57ed" + integrity sha512-sO0bYdYeJAJBcJA8g7MJJX7UrOZIfJPd8U2SC7B2Dd/J24U0aQNoGp33shCaBSWeb0rD5rh6VBUIXOkGal1TZA== + dependencies: + "@babel/runtime-corejs2" "^7.2.0" + +y18n@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" + integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== + +yallist@^3.0.0, yallist@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" + integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A== + +yargs-parser@^13.1.1: + version "13.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.1.tgz#d26058532aa06d365fe091f6a1fc06b2f7e5eca0" + integrity sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs@^13.3.0: + version "13.3.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.0.tgz#4c657a55e07e5f2cf947f8a366567c04a0dedc83" + integrity sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA== + dependencies: + cliui "^5.0.0" + find-up "^3.0.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 "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.1" diff --git a/packages/fhir-qb/README.md b/packages/fhir-qb/README.md index 0b9b8de..cb562bd 100644 --- a/packages/fhir-qb/README.md +++ b/packages/fhir-qb/README.md @@ -1,7 +1,9 @@ # FHIR-QB + > Utility for standard rest API's to build search queries from incoming requests. ## Install + ```shell yarn add @asymmetrik/fhir-qb ``` @@ -11,52 +13,67 @@ yarn add @asymmetrik/fhir-qb `@asymmetrik/fhir-qb` exports a single class called QueryBuilder. The QueryBuilder constructor takes 4 arguments: #### `packageName` + Query builder implementation package to be required. Default: `@asymmetrik/fhir-qb-mongo` #### `globalParameterDefinitions` -Parameter definitions for global parameters that apply to all resources. Defined by the fhir 'resource' resource + +Parameter definitions for global parameters that apply to all resources. Defined by the fhir 'resource' resource parameters. Default: `{}` #### `pageParam` + Query parameter used to indicate which page of results is being requested. Default: `page` #### `resultsPerPage` + How many results should be returned per page. Default: `10` #### `implementationParameters` + Object to be passed through to the DB-specific implementation with whatever information from the server the implementation may need. Default: `{}` - See [DB Specific Implementations](#db-specific-implementations) below. +#### `columnIdentifierStrategy` + +Defaults to determining the column/path to the variable through it's xpath within its parameter definition. The string "parameter" can be passed to make it so that the +raw parameter name is used as the lookup column. ## Usage + The QueryBuilder class has a method called `buildSearchQuery` which takes two arguments. It takes an Express request object and an object containing argument definitions. The allowed arguments are generated per resource and have the following properties: #### `type` + Data type we expect the parameter to be in. We will try to coerce the value into these types to an extent. See [Valid Types](#valid-types) below. #### `fhirtype` + Data type we expect the parameter to be in of the types listed in the FHIR specification. Currently being used to specify what type of token token parameters are. #### `xpath` + Path to the parameter within the resource #### `definition` + Link to the full parameter structure definition on the hl7 website -#### `description` #### `description` + Description of the parameter/argument The `buildSearchQuery` method returns a search query for the configured db implementation that can be passed of to the database service and executed. ### DB Specific Implementations + The FHIR-QB relies on a database specific implementation to enable it to properly construct queries for the chosen database. An implementation must include the following methods: + ``` assembleSearchQuery, buildAndQuery, diff --git a/packages/fhir-qb/index.js b/packages/fhir-qb/index.js index 904e48e..c424804 100644 --- a/packages/fhir-qb/index.js +++ b/packages/fhir-qb/index.js @@ -32,6 +32,8 @@ const matchModifiers = { '': '', }; +const supportedColumnIdentifierStrategies = ['xpath', 'parameter']; + /* TODO * Need to add ability to get destination field's type for chained queries. * Add support for Chained Queries of depth > 1 (if necessary) @@ -47,13 +49,25 @@ class QueryBuilder { globalParameterDefinitions = {}, pageParam = 'page', resultsPerPage = 10, - implementationParameters = {} + implementationParameters = {}, + columnIdentifierStrategy = 'xpath', }) { this.qb = require(packageName); this.globalParameterDefinitions = globalParameterDefinitions; this.pageParam = pageParam; this.resultsPerPage = resultsPerPage; this.implementationParameters = implementationParameters; + if ( + supportedColumnIdentifierStrategies.includes(columnIdentifierStrategy) + ) { + this.columnIdentifierStrategy = columnIdentifierStrategy; + } else { + throw new Error( + `Supplied columnIdentifierStrategy value '${columnIdentifierStrategy}' not one of currently supported columnIdentifierStrategy values: ${supportedColumnIdentifierStrategies.join( + ', ', + )}`, + ); + } } /** @@ -104,6 +118,7 @@ class QueryBuilder { buildDateQuery({ field, value }) { // Sanitize the request value let prefix; + let isDate = true; ({ prefix, value } = sanitize.sanitizeDate({ field, value })); // Create a UTC moment of the supplied date value = moment.utc(value); @@ -143,6 +158,7 @@ class QueryBuilder { lowerBound, upperBound, invert, + isDate, }); } else { // Else, we have an exact datetime, so query it directly @@ -151,6 +167,7 @@ class QueryBuilder { field, value, invert, + isDate, }); } } else if (prefix === prefixes.APPROXIMATELY) { @@ -165,7 +182,12 @@ class QueryBuilder { let upperBound = moment(value) .add(difference, timeUnits.SECOND) .toISOString(); - dateQuery = this.qb.buildInRangeQuery({ field, lowerBound, upperBound }); + dateQuery = this.qb.buildInRangeQuery({ + field, + lowerBound, + upperBound, + isDate, + }); } else { // Construct a query for the relevant comparison operator (>, >=, <, <=) // If the modifier is for 'greater than' or 'starts after' and we have an interval scale, change the target @@ -181,6 +203,7 @@ class QueryBuilder { field, value, comparator: prefix, + isDate, }); } return dateQuery; @@ -528,6 +551,20 @@ class QueryBuilder { return subQuery; } + /** + * Parse the xpath to the data in the resource + * @parameter xpath + * @returns {*|string} + */ + static parseXPath(xpaths) { + xpaths = Array.isArray(xpaths) ? xpaths : [xpaths]; + let parsedXPaths = []; + xpaths.forEach(xpath => { + parsedXPaths.push(xpath.split(/\.(.+)/)[1]); + }); + return parsedXPaths; + } + /** * @function parseArguments * @description Parse only arguments needed for this type of request @@ -551,20 +588,6 @@ class QueryBuilder { return Object.assign(args, req.params); } - /** - * Parse the xpath to the data in the resource - * @parameter xpath - * @returns {*|string} - */ - static parseXPath(xpaths) { - xpaths = Array.isArray(xpaths) ? xpaths : [xpaths]; - let parsedXPaths = []; - xpaths.forEach((xpath) => { - parsedXPaths.push(xpath.split(/\.(.+)/)[1]); - }); - return parsedXPaths; - } - /** * Given an http request and parameter definitions of a resource, construct a search query. * @parameter req @@ -635,8 +658,14 @@ class QueryBuilder { throw new Error(`Unknown parameter '${parameter}'`); } + let field; let { type, fhirtype, xpath } = parameterDefinition; - let field = QueryBuilder.parseXPath(xpath); + + if (this.columnIdentifierStrategy === 'parameter') { + field = [parameter]; + } else { + field = QueryBuilder.parseXPath(xpath); + } // Handle implicit URI logic before handling explicit modifiers if (type === 'uri') { @@ -678,16 +707,16 @@ class QueryBuilder { // For each match to perform, transform them into the appropriate format using the db specific qb; let matchesToPerform = []; - rawMatchesToPerform.forEach((rawMatch) =>{ + rawMatchesToPerform.forEach(rawMatch => { let orStatements = []; // Because there can be multiple fields to check for a given parameter, account for all of them in the // or statement being constructed. - rawMatch.field.forEach((field) => { + rawMatch.field.forEach(field => { // Make a copy of the rawMatch that's only specific to one of the possible fields let fieldRawMatch = Object.assign({}, rawMatch); fieldRawMatch.field = field; // For each value, add to the or statement for the given field - rawMatch.values.forEach((value) => { + rawMatch.values.forEach(value => { fieldRawMatch.value = value; orStatements.push(this.getSubSearchQuery(fieldRawMatch)); }); diff --git a/packages/fhir-qb/index.test.js b/packages/fhir-qb/index.test.js index 6b99840..8fa8495 100644 --- a/packages/fhir-qb/index.test.js +++ b/packages/fhir-qb/index.test.js @@ -75,7 +75,7 @@ describe('Mongo Tests', () => { }; const qb = new QueryBuilder({ globalParameterDefinitions, - implementationParameters: {archivedParamPath: 'meta._isArchived'} + implementationParameters: { archivedParamPath: 'meta._isArchived' }, }); describe('Build Date Query Tests', () => { describe('eq Modifier Tests', () => { @@ -6563,7 +6563,14 @@ describe('Mongo Tests', () => { const expectedResult = [ { $match: { - $and: [{ $or: [{ foo: { $regex: '^Eve', $options: 'i' } }, { bar: { $regex: '^Eve', $options: 'i' } }] }], + $and: [ + { + $or: [ + { foo: { $regex: '^Eve', $options: 'i' } }, + { bar: { $regex: '^Eve', $options: 'i' } }, + ], + }, + ], }, }, { $match: { 'meta._isArchived': false } }, @@ -6605,13 +6612,18 @@ describe('Mongo Tests', () => { { $match: { $and: [ - { $or: [{ foo: { $options: 'i', $regex: '^foo' } }, { qux: { $options: 'i', $regex: '^foo' } }] }, + { + $or: [ + { foo: { $options: 'i', $regex: '^foo' } }, + { qux: { $options: 'i', $regex: '^foo' } }, + ], + }, { $or: [ { foo: { $options: 'i', $regex: '^bar' } }, { foo: { $options: 'i', $regex: '^baz' } }, { qux: { $options: 'i', $regex: '^bar' } }, - { qux: { $options: 'i', $regex: '^baz' } } + { qux: { $options: 'i', $regex: '^baz' } }, ], }, ], @@ -6638,3 +6650,5942 @@ describe('Mongo Tests', () => { }); }); }); + +describe('SQL Tests', () => { + beforeAll(() => { + // Do this for tests only + moment.suppressDeprecationWarnings = true; + }); + const Sequelize = require('sequelize'); + const { formDateComparison } = require('../fhir-qb-sql/index'); + const Op = Sequelize.Op; + const globalParameterDefinitions = { + _content: { + type: 'string', + fhirtype: 'string', + xpath: '', + definition: 'http://hl7.org/fhir/SearchParameter/Resource-content', + description: 'Search on the entire content of the resource', + modifier: 'missing,exact,contains', + }, + _id: { + type: 'token', + fhirtype: 'token', + xpath: 'Resource.id', + definition: 'http://hl7.org/fhir/SearchParameter/Resource-id', + description: 'Logical id of this artifact', + modifier: 'missing,text,not,in,not-in,below,above,ofType', + }, + _lastUpdated: { + type: 'date', + fhirtype: 'date', + xpath: 'Resource.meta.lastUpdated', + definition: 'http://hl7.org/fhir/SearchParameter/Resource-lastUpdated', + description: 'When the resource version last changed', + modifier: 'missing', + }, + _profile: { + type: 'reference', + fhirtype: 'reference', + xpath: 'Resource.meta.profile', + definition: 'http://hl7.org/fhir/SearchParameter/Resource-profile', + description: 'Profiles this resource claims to conform to', + modifier: 'missing,type,identifier', + }, + _query: { + type: 'token', + fhirtype: 'token', + xpath: '', + definition: 'http://hl7.org/fhir/SearchParameter/Resource-query', + description: + 'A custom search profile that describes a specific defined query operation', + modifier: 'missing,text,not,in,not-in,below,above,ofType', + }, + _security: { + type: 'token', + fhirtype: 'token', + xpath: 'Resource.meta.security', + definition: 'http://hl7.org/fhir/SearchParameter/Resource-security', + description: 'Security Labels applied to this resource', + modifier: 'missing,text,not,in,not-in,below,above,ofType', + }, + _source: { + type: 'uri', + fhirtype: 'uri', + xpath: 'Resource.meta.source', + definition: 'http://hl7.org/fhir/SearchParameter/Resource-source', + description: 'Identifies where the resource comes from', + modifier: 'missing,below,above', + }, + _tag: { + type: 'token', + fhirtype: 'token', + xpath: 'Resource.meta.tag', + definition: 'http://hl7.org/fhir/SearchParameter/Resource-tag', + description: 'Tags applied to this resource', + modifier: 'missing,text,not,in,not-in,below,above,ofType', + }, + }; + const qb = new QueryBuilder({ + packageName: '../fhir-qb-sql/index.js', + globalParameterDefinitions, + implementationParameters: { archivedParamPath: 'meta._isArchived' }, + }); + describe('Build Date Query Tests', () => { + describe('eq Modifier Tests', () => { + test("Should return the ISO String if the given a full ISO String 'yyyy-mm-ddThh:mm:ss.###Z'", () => { + const req = { + method: 'GET', + query: { + foo: 'eq2018-10-31T17:49:29.000Z', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison('=', '2018-10-31T17:49:29.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return the ISO String if given a partial ISO string of format 'yyyy-mm-ddThh:mm:ss'", () => { + const req = { + method: 'GET', + query: { + foo: 'eq2018-10-31T17:49:29', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison('>=', '2018-10-31T17:49:29.000Z'), + formDateComparison('<=', '2018-10-31T17:49:29.999Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return a 1 minute range if given a partial ISO string of format 'yyyy-mm-ddThh:mm'", () => { + const req = { + method: 'GET', + query: { + foo: 'eq2018-10-31T17:49', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison('>=', '2018-10-31T17:49:00.000Z'), + formDateComparison('<=', '2018-10-31T17:49:59.999Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return a 1 hour range if given a partial ISO string of format 'yyyy-mm-ddThh'", () => { + const req = { + method: 'GET', + query: { + foo: 'eq2018-10-31T17', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison('>=', '2018-10-31T17:00:00.000Z'), + formDateComparison('<=', '2018-10-31T17:59:59.999Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return a 1 day range if given a partial ISO string of format 'yyyy-mm-dd'", () => { + const req = { + method: 'GET', + query: { + foo: 'eq2018-10-31', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison('>=', '2018-10-31T00:00:00.000Z'), + formDateComparison('<=', '2018-10-31T23:59:59.999Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return a 1 month range if given a partial ISO string of format 'yyyy-mm'", () => { + const req = { + method: 'GET', + query: { + foo: 'eq2018-10', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison('>=', '2018-10-01T00:00:00.000Z'), + formDateComparison('<=', '2018-10-31T23:59:59.999Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return a 1 year range if given a partial ISO string of format 'yyyy'", () => { + const req = { + method: 'GET', + query: { + foo: 'eq2018', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison('>=', '2018-01-01T00:00:00.000Z'), + formDateComparison('<=', '2018-12-31T23:59:59.999Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should implicitly use 'eq' prefix if one is not supplied in the request", () => { + const req = { + method: 'GET', + query: { + foo: '2018', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison('>=', '2018-01-01T00:00:00.000Z'), + formDateComparison('<=', '2018-12-31T23:59:59.999Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + }); + describe('ne Modifier Tests', () => { + // TODO - Should I throw an error in this situation? Providing ms is not allowed. + test("Should return a $ne of the given full ISO String 'yyyy-mm-ddThh:mm:ss.###Z'", () => { + const req = { + method: 'GET', + query: { + foo: 'ne2018-10-31T17:49:29.000Z', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison('!=', '2018-10-31T17:49:29.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return a $ne of the given partial ISO String of format 'yyyy-mm-ddThh:mm:ss'", () => { + const req = { + method: 'GET', + query: { + foo: 'ne2018-10-31T17:49:29', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison('<=', '2018-10-31T17:49:29.000Z'), + formDateComparison('>=', '2018-10-31T17:49:29.999Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return an $or that fully excludes the specified minute in given partial ISO String of format 'yyyy-mm-ddThh:mm'", () => { + const req = { + method: 'GET', + query: { + foo: 'ne2018-10-31T17:49', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison('<=', '2018-10-31T17:49:00.000Z'), + formDateComparison('>=', '2018-10-31T17:49:59.999Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + // TODO - Should I throw an error in this situation? Hours without minutes is not allowed. + test("Should return an $or that fully excludes the specified hour in given partial ISO String of format 'yyyy-mm-ddThh'", () => { + const req = { + method: 'GET', + query: { + foo: 'ne2018-10-31T17', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison('<=', '2018-10-31T17:00:00.000Z'), + formDateComparison('>=', '2018-10-31T17:59:59.999Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return an $or that fully excludes the specified day in given partial ISO String of format 'yyyy-mm-dd'", () => { + const req = { + method: 'GET', + query: { + foo: 'ne2018-10-31', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison('<=', '2018-10-31T00:00:00.000Z'), + formDateComparison('>=', '2018-10-31T23:59:59.999Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return an $or that fully excludes the specified month in given partial ISO String of format 'yyyy-mm'", () => { + const req = { + method: 'GET', + query: { + foo: 'ne2018-10', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison('<=', '2018-10-01T00:00:00.000Z'), + formDateComparison('>=', '2018-10-31T23:59:59.999Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return an $or that fully excludes the specified year in given partial ISO String of format 'yyyy'", () => { + const req = { + method: 'GET', + query: { + foo: 'ne2018', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison('<=', '2018-01-01T00:00:00.000Z'), + formDateComparison('>=', '2018-12-31T23:59:59.999Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + }); + describe('gt Modifier Tests', () => { + // TODO - Should I throw an error in this situation? Providing ms is not allowed. + test("Should return $gt ISO String if given a full ISO String 'yyyy-mm-ddThh:mm:ss.###Z'", () => { + const req = { + method: 'GET', + query: { + foo: 'gt2018-10-31T17:49:29.000Z', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.gt, '2018-10-31T17:49:29.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return $gt ISO String if given a partial ISO String of format 'yyyy-mm-ddThh:mm:ss'", () => { + const req = { + method: 'GET', + query: { + foo: 'gt2018-10-31T17:49:29', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.gt, '2018-10-31T17:49:29.999Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return $gt end of minute if given a partial ISO String 'yyyy-mm-ddThh:mm'", () => { + const req = { + method: 'GET', + query: { + foo: 'gt2018-10-31T17:49', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.gt, '2018-10-31T17:49:59.999Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + // TODO - Should I throw an error in this situation? Hours without minutes is not allowed. + test("Should return $gt end of hour if given a partial ISO String 'yyyy-mm-ddThh'", () => { + const req = { + method: 'GET', + query: { + foo: 'gt2018-10-31T17', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.gt, '2018-10-31T17:59:59.999Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return $gt end of day if given a partial ISO String 'yyyy-mm-dd'", () => { + const req = { + method: 'GET', + query: { + foo: 'gt2018-10-31', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.gt, '2018-10-31T23:59:59.999Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return $gt end of month if given a partial ISO String 'yyyy-mm'", () => { + const req = { + method: 'GET', + query: { + foo: 'gt2018-10', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.gt, '2018-10-31T23:59:59.999Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return $gt end of year if given a partial ISO String 'yyyy'", () => { + const req = { + method: 'GET', + query: { + foo: 'gt2018', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.gt, '2018-12-31T23:59:59.999Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + }); + describe('gte Modifier Tests', () => { + // TODO - Should I throw an error in this situation? Providing ms is not allowed. + test("Should return $gte ISO String if given a full ISO String 'yyyy-mm-ddThh:mm:ss.###Z'", () => { + const req = { + method: 'GET', + query: { + foo: 'ge2018-10-31T17:49:29.000Z', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.gte, '2018-10-31T17:49:29.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return $gte ISO String if given a partial ISO String of format 'yyyy-mm-ddThh:mm:ss'", () => { + const req = { + method: 'GET', + query: { + foo: 'ge2018-10-31T17:49:29', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.gte, '2018-10-31T17:49:29.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return $gte start of minute if given a partial ISO String 'yyyy-mm-ddThh:mm'", () => { + const req = { + method: 'GET', + query: { + foo: 'ge2018-10-31T17:49', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.gte, '2018-10-31T17:49:00.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + // TODO - Should I throw an error in this situation? Hours without minutes is not allowed. + test("Should return $gte start of hour if given a partial ISO String 'yyyy-mm-ddThh'", () => { + const req = { + method: 'GET', + query: { + foo: 'ge2018-10-31T17', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.gte, '2018-10-31T17:00:00.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return $gte start of day if given a partial ISO String 'yyyy-mm-dd'", () => { + const req = { + method: 'GET', + query: { + foo: 'ge2018-10-31', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.gte, '2018-10-31T00:00:00.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return $gte start of month if given a partial ISO String 'yyyy-mm'", () => { + const req = { + method: 'GET', + query: { + foo: 'ge2018-10', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.gte, '2018-10-01T00:00:00.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return $gte start of year if given a partial ISO String 'yyyy'", () => { + const req = { + method: 'GET', + query: { + foo: 'ge2018', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.gte, '2018-01-01T00:00:00.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + }); + describe('lt Modifier Tests', () => { + // TODO - Note that the sanitizer should stop this situation from ever occurring, as providing milliseconds is not allowed. + test("Should return $lt ISO String if given a full ISO String 'yyyy-mm-ddThh:mm:ss.###Z'", () => { + const req = { + method: 'GET', + query: { + foo: 'lt2018-10-31T17:49:29.000Z', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.lt, '2018-10-31T17:49:29.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return $lt ISO String if given a partial ISO String of format 'yyyy-mm-ddThh:mm:ss'", () => { + const req = { + method: 'GET', + query: { + foo: 'lt2018-10-31T17:49:29', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.lt, '2018-10-31T17:49:29.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return $lt start of minute if given a partial ISO String 'yyyy-mm-ddThh:mm'", () => { + const req = { + method: 'GET', + query: { + foo: 'lt2018-10-31T17:49', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.lt, '2018-10-31T17:49:00.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + // TODO - Should I throw an error in this situation? Hours without minutes is not allowed. + test("Should return $lt start of hour if given a partial ISO String 'yyyy-mm-ddThh'", () => { + const req = { + method: 'GET', + query: { + foo: 'lt2018-10-31T17', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.lt, '2018-10-31T17:00:00.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return $lt start of day if given a partial ISO String 'yyyy-mm-dd'", () => { + const req = { + method: 'GET', + query: { + foo: 'lt2018-10-31', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.lt, '2018-10-31T00:00:00.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return $lt start of month if given a partial ISO String 'yyyy-mm'", () => { + const req = { + method: 'GET', + query: { + foo: 'lt2018-10', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.lt, '2018-10-01T00:00:00.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return $lt start of year if given a partial ISO String 'yyyy'", () => { + const req = { + method: 'GET', + query: { + foo: 'lt2018', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.lt, '2018-01-01T00:00:00.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + }); + describe('lte Modifier Tests', () => { + // TODO - Should I throw an error in this situation? Providing ms is not allowed. + test("Should return $lte ISO String if given a full ISO String 'yyyy-mm-ddThh:mm:ss.###Z'", () => { + const req = { + method: 'GET', + query: { + foo: 'le2018-10-31T17:49:29.000Z', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.lte, '2018-10-31T17:49:29.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return $lte ISO String if given a partial ISO String of format 'yyyy-mm-ddThh:mm:ss'", () => { + const req = { + method: 'GET', + query: { + foo: 'le2018-10-31T17:49:29', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.lte, '2018-10-31T17:49:29.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return $lte start of minute if given a partial ISO String 'yyyy-mm-ddThh:mm'", () => { + const req = { + method: 'GET', + query: { + foo: 'le2018-10-31T17:49', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.lte, '2018-10-31T17:49:00.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + // TODO - Should I throw an error in this situation? Hours without minutes is not allowed. + test("Should return $lte start of hour if given a partial ISO String 'yyyy-mm-ddThh'", () => { + const req = { + method: 'GET', + query: { + foo: 'le2018-10-31T17', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.lte, '2018-10-31T17:00:00.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return $lte start of day if given a partial ISO String 'yyyy-mm-dd'", () => { + const req = { + method: 'GET', + query: { + foo: 'le2018-10-31', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.lte, '2018-10-31T00:00:00.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return $lte start of month if given a partial ISO String 'yyyy-mm'", () => { + const req = { + method: 'GET', + query: { + foo: 'le2018-10', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.lte, '2018-10-01T00:00:00.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return $lte start of year if given a partial ISO String 'yyyy'", () => { + const req = { + method: 'GET', + query: { + foo: 'le2018', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.lte, '2018-01-01T00:00:00.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + }); + describe('sa Modifier Tests', () => { + // TODO - Should I throw an error in this situation? Providing ms is not allowed. + test("Should return $gt ISO String if given a full ISO String 'yyyy-mm-ddThh:mm:ss.###Z'", () => { + const req = { + method: 'GET', + query: { + foo: 'sa2018-10-31T17:49:29.000Z', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.gt, '2018-10-31T17:49:29.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return $gt ISO String if given a partial ISO String of format 'yyyy-mm-ddThh:mm:ss'", () => { + const req = { + method: 'GET', + query: { + foo: 'sa2018-10-31T17:49:29', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.gt, '2018-10-31T17:49:29.999Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return $gt end of minute if given a partial ISO String 'yyyy-mm-ddThh:mm'", () => { + const req = { + method: 'GET', + query: { + foo: 'sa2018-10-31T17:49', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.gt, '2018-10-31T17:49:59.999Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + // TODO - Should I throw an error in this situation? Hours without minutes is not allowed. + test("Should return $gt end of hour if given a partial ISO String 'yyyy-mm-ddThh'", () => { + const req = { + method: 'GET', + query: { + foo: 'sa2018-10-31T17', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.gt, '2018-10-31T17:59:59.999Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return $gt end of day if given a partial ISO String 'yyyy-mm-dd'", () => { + const req = { + method: 'GET', + query: { + foo: 'sa2018-10-31', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.gt, '2018-10-31T23:59:59.999Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return $gt end of month if given a partial ISO String 'yyyy-mm'", () => { + const req = { + method: 'GET', + query: { + foo: 'sa2018-10', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.gt, '2018-10-31T23:59:59.999Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return $gt end of year if given a partial ISO String 'yyyy'", () => { + const req = { + method: 'GET', + query: { + foo: 'sa2018', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.gt, '2018-12-31T23:59:59.999Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + }); + describe('eb Modifier Tests', () => { + // TODO - Should I throw an error in this situation? Providing ms is not allowed. + test("Should return $lt ISO String if given a full ISO String 'yyyy-mm-ddThh:mm:ss.###Z'", () => { + const req = { + method: 'GET', + query: { + foo: 'eb2018-10-31T17:49:29.000Z', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.lt, '2018-10-31T17:49:29.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return $lt ISO String if given a partial ISO String of format 'yyyy-mm-ddThh:mm:ss'", () => { + const req = { + method: 'GET', + query: { + foo: 'eb2018-10-31T17:49:29', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.lt, '2018-10-31T17:49:29.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return $lt start of minute if given a partial ISO String 'yyyy-mm-ddThh:mm'", () => { + const req = { + method: 'GET', + query: { + foo: 'eb2018-10-31T17:49', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.lt, '2018-10-31T17:49:00.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + // TODO - Should I throw an error in this situation? Hours without minutes is not allowed. + test("Should return $lt start of hour if given a partial ISO String 'yyyy-mm-ddThh'", () => { + const req = { + method: 'GET', + query: { + foo: 'eb2018-10-31T17', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.lt, '2018-10-31T17:00:00.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return $lt start of day if given a partial ISO String 'yyyy-mm-dd'", () => { + const req = { + method: 'GET', + query: { + foo: 'eb2018-10-31', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.lt, '2018-10-31T00:00:00.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return $lt start of month if given a partial ISO String 'yyyy-mm'", () => { + const req = { + method: 'GET', + query: { + foo: 'eb2018-10', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.lt, '2018-10-01T00:00:00.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test("Should return $lt start of year if given a partial ISO String 'yyyy'", () => { + const req = { + method: 'GET', + query: { + foo: 'eb2018', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison(Op.lt, '2018-01-01T00:00:00.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + }); + describe('ap Modifier Tests', () => { + // TODO - Should I throw an error in this situation? Providing ms is not allowed. + test( + 'Should return range with upper lower bounds equal to the target date +/- 0.1 * the amount of time ' + + "between now and the target date if given a full ISO String 'yyyy-mm-ddThh:mm:ss.###Z'", + () => { + const testDate = '2018-10-31T17:49:29.000Z'; + const req = { + method: 'GET', + query: { + foo: 'ap' + testDate, + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const targetDate = moment.utc(testDate); + const rangePadding = 0.1; + const currentDateTime = moment.utc(); + let difference = + moment.duration(currentDateTime.diff(targetDate)).asSeconds() * + rangePadding; + let expectedLowerBound = moment(targetDate).subtract( + difference, + 'seconds', + ); + let expectedUpperBound = moment(targetDate).add( + difference, + 'seconds', + ); + + const includeArchived = false; + let { query, errors } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + + let observedLowerBound = moment( + query[0].where[Op.and][0][Op.or][0][Op.and][1].logic, + ); + let observedUpperBound = moment( + query[0].where[Op.and][0][Op.or][0][Op.and][2].logic, + ); + + let lowerBoundDifference = moment + .duration(observedLowerBound.diff(expectedLowerBound)) + .asSeconds(); + let upperBoundDifference = moment + .duration(observedUpperBound.diff(expectedUpperBound)) + .asSeconds(); + + // Fail if the observed upper or lower bounds are more than a hundredth of a second off the expected + let correctLowerBound = Math.abs(lowerBoundDifference) <= 0.01; + let correctUpperBound = Math.abs(upperBoundDifference) <= 0.01; + expect(correctLowerBound).toBe(true); + expect(correctUpperBound).toBe(true); + expect(errors).toHaveLength(0); + }, + ); + test( + 'Should return range with upper lower bounds equal to the target date +/- 0.1 * the amount of time ' + + "between now and the target date if given a partial ISO String of format 'yyyy-mm-ddThh:mm:ss'", + () => { + const testDate = '2018-10-31T17:49:29'; + const req = { + method: 'GET', + query: { + foo: 'ap' + testDate, + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const targetDate = moment.utc(testDate); + const rangePadding = 0.1; + const currentDateTime = moment.utc(); + let difference = + moment.duration(currentDateTime.diff(targetDate)).asSeconds() * + rangePadding; + let expectedLowerBound = moment(targetDate).subtract( + difference, + 'seconds', + ); + let expectedUpperBound = moment(targetDate).add( + difference, + 'seconds', + ); + + const includeArchived = false; + let { query, errors } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + let observedLowerBound = moment( + query[0].where[Op.and][0][Op.or][0][Op.and][1].logic, + ); + let observedUpperBound = moment( + query[0].where[Op.and][0][Op.or][0][Op.and][2].logic, + ); + + let lowerBoundDifference = moment + .duration(observedLowerBound.diff(expectedLowerBound)) + .asSeconds(); + let upperBoundDifference = moment + .duration(observedUpperBound.diff(expectedUpperBound)) + .asSeconds(); + + // Fail if the observed upper or lower bounds are more than a hundredth of a second off the expected + let correctLowerBound = Math.abs(lowerBoundDifference) <= 0.01; + let correctUpperBound = Math.abs(upperBoundDifference) <= 0.01; + expect(correctLowerBound).toBe(true); + expect(correctUpperBound).toBe(true); + expect(errors).toHaveLength(0); + }, + ); + test( + 'Should return range with upper lower bounds equal to the target date +/- 0.1 * the amount of time ' + + "between now and the start of the specified minute if given a partial ISO String of format 'yyyy-mm-ddThh:mm'", + () => { + const testDate = '2018-10-31T17:49'; + const req = { + method: 'GET', + query: { + foo: 'ap' + testDate, + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const targetDate = moment.utc(testDate); + const rangePadding = 0.1; + const currentDateTime = moment.utc(); + let difference = + moment.duration(currentDateTime.diff(targetDate)).asSeconds() * + rangePadding; + let expectedLowerBound = moment(targetDate).subtract( + difference, + 'seconds', + ); + let expectedUpperBound = moment(targetDate).add( + difference, + 'seconds', + ); + + const includeArchived = false; + let { query, errors } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + + let observedLowerBound = moment( + query[0].where[Op.and][0][Op.or][0][Op.and][1].logic, + ); + let observedUpperBound = moment( + query[0].where[Op.and][0][Op.or][0][Op.and][2].logic, + ); + + let lowerBoundDifference = moment + .duration(observedLowerBound.diff(expectedLowerBound)) + .asSeconds(); + let upperBoundDifference = moment + .duration(observedUpperBound.diff(expectedUpperBound)) + .asSeconds(); + + // Fail if the observed upper or lower bounds are more than a hundredth of a second off the expected + let correctLowerBound = Math.abs(lowerBoundDifference) <= 0.01; + let correctUpperBound = Math.abs(upperBoundDifference) <= 0.01; + expect(correctLowerBound).toBe(true); + expect(correctUpperBound).toBe(true); + expect(errors).toHaveLength(0); + }, + ); + // TODO - Should I throw an error in this situation? Hours without minutes is not allowed. + test( + 'Should return range with upper lower bounds equal to the target date +/- 0.1 * the amount of time ' + + "between currentDateTimeOverride and the start of the specified hour if given a partial ISO String of format 'yyyy-mm-ddThh'", + () => { + const testDate = '2018-10-31T17'; + const req = { + method: 'GET', + query: { + foo: 'ap' + testDate, + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const targetDate = moment.utc(testDate); + const rangePadding = 0.1; + const currentDateTime = moment.utc(); + let difference = + moment.duration(currentDateTime.diff(targetDate)).asSeconds() * + rangePadding; + let expectedLowerBound = moment(targetDate).subtract( + difference, + 'seconds', + ); + let expectedUpperBound = moment(targetDate).add( + difference, + 'seconds', + ); + + const includeArchived = false; + let { query, errors } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + + let observedLowerBound = moment( + query[0].where[Op.and][0][Op.or][0][Op.and][1].logic, + ); + let observedUpperBound = moment( + query[0].where[Op.and][0][Op.or][0][Op.and][2].logic, + ); + + let lowerBoundDifference = moment + .duration(observedLowerBound.diff(expectedLowerBound)) + .asSeconds(); + let upperBoundDifference = moment + .duration(observedUpperBound.diff(expectedUpperBound)) + .asSeconds(); + + // Fail if the observed upper or lower bounds are more than a hundredth of a second off the expected + let correctLowerBound = Math.abs(lowerBoundDifference) <= 0.01; + let correctUpperBound = Math.abs(upperBoundDifference) <= 0.01; + expect(correctLowerBound).toBe(true); + expect(correctUpperBound).toBe(true); + expect(errors).toHaveLength(0); + }, + ); + test( + 'Should return range with upper lower bounds equal to the target date +/- 0.1 * the amount of time ' + + "between currentDateTimeOverride and the start of the specified day if given a partial ISO String of format 'yyyy-mm-dd'", + () => { + const testDate = '2018-10-31'; + const req = { + method: 'GET', + query: { + foo: 'ap' + testDate, + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const targetDate = moment.utc(testDate); + const rangePadding = 0.1; + const currentDateTime = moment.utc(); + let difference = + moment.duration(currentDateTime.diff(targetDate)).asSeconds() * + rangePadding; + let expectedLowerBound = moment(targetDate).subtract( + difference, + 'seconds', + ); + let expectedUpperBound = moment(targetDate).add( + difference, + 'seconds', + ); + + const includeArchived = false; + let { query, errors } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + + let observedLowerBound = moment( + query[0].where[Op.and][0][Op.or][0][Op.and][1].logic, + ); + let observedUpperBound = moment( + query[0].where[Op.and][0][Op.or][0][Op.and][2].logic, + ); + + let lowerBoundDifference = moment + .duration(observedLowerBound.diff(expectedLowerBound)) + .asSeconds(); + let upperBoundDifference = moment + .duration(observedUpperBound.diff(expectedUpperBound)) + .asSeconds(); + + // Fail if the observed upper or lower bounds are more than a hundredth of a second off the expected + let correctLowerBound = Math.abs(lowerBoundDifference) <= 0.01; + let correctUpperBound = Math.abs(upperBoundDifference) <= 0.01; + expect(correctLowerBound).toBe(true); + expect(correctUpperBound).toBe(true); + expect(errors).toHaveLength(0); + }, + ); + test( + 'Should return range with upper lower bounds equal to the target date +/- 0.1 * the amount of time ' + + "between currentDateTimeOverride and the start of the specified month if given a partial ISO String of format 'yyyy-mm'", + () => { + const testDate = '2018-10'; + const req = { + method: 'GET', + query: { + foo: 'ap' + testDate, + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const targetDate = moment.utc(testDate); + const rangePadding = 0.1; + const currentDateTime = moment.utc(); + let difference = + moment.duration(currentDateTime.diff(targetDate)).asSeconds() * + rangePadding; + let expectedLowerBound = moment(targetDate).subtract( + difference, + 'seconds', + ); + let expectedUpperBound = moment(targetDate).add( + difference, + 'seconds', + ); + + const includeArchived = false; + let { query, errors } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + + let observedLowerBound = moment( + query[0].where[Op.and][0][Op.or][0][Op.and][1].logic, + ); + let observedUpperBound = moment( + query[0].where[Op.and][0][Op.or][0][Op.and][2].logic, + ); + + let lowerBoundDifference = moment + .duration(observedLowerBound.diff(expectedLowerBound)) + .asSeconds(); + let upperBoundDifference = moment + .duration(observedUpperBound.diff(expectedUpperBound)) + .asSeconds(); + + // Fail if the observed upper or lower bounds are more than a hundredth of a second off the expected + let correctLowerBound = Math.abs(lowerBoundDifference) <= 0.01; + let correctUpperBound = Math.abs(upperBoundDifference) <= 0.01; + expect(correctLowerBound).toBe(true); + expect(correctUpperBound).toBe(true); + expect(errors).toHaveLength(0); + }, + ); + test( + 'Should return range with upper lower bounds equal to the target date +/- 0.1 * the amount of time ' + + "between currentDateTime and the start of the specified year if given a partial ISO String of format 'yyyy'", + () => { + const testDate = '2018'; + const req = { + method: 'GET', + query: { + foo: 'ap' + testDate, + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const targetDate = moment.utc(testDate); + const rangePadding = 0.1; + const currentDateTime = moment.utc(); + let difference = + moment.duration(currentDateTime.diff(targetDate)).asSeconds() * + rangePadding; + let expectedLowerBound = moment(targetDate).subtract( + difference, + 'seconds', + ); + let expectedUpperBound = moment(targetDate).add( + difference, + 'seconds', + ); + + const includeArchived = false; + let { query, errors } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + + let observedLowerBound = moment( + query[0].where[Op.and][0][Op.or][0][Op.and][1].logic, + ); + let observedUpperBound = moment( + query[0].where[Op.and][0][Op.or][0][Op.and][2].logic, + ); + + let lowerBoundDifference = moment + .duration(observedLowerBound.diff(expectedLowerBound)) + .asSeconds(); + let upperBoundDifference = moment + .duration(observedUpperBound.diff(expectedUpperBound)) + .asSeconds(); + + // Fail if the observed upper or lower bounds are more than a hundredth of a second off the expected + let correctLowerBound = Math.abs(lowerBoundDifference) <= 0.01; + let correctUpperBound = Math.abs(upperBoundDifference) <= 0.01; + expect(correctLowerBound).toBe(true); + expect(correctUpperBound).toBe(true); + expect(errors).toHaveLength(0); + }, + ); + }); + }); + + describe('Build Number Query Tests', () => { + describe('eq Modifier Tests', () => { + test('Should return range with upper lower bounds equal to +/- 0.5 given an integer', () => { + const req = { + method: 'GET', + query: { + foo: 'eq100', + }, + }; + const parameterDefinitions = { + foo: { type: 'number', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: { [Op.between]: [99.5, 100.5] }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test( + 'Should return range with upper lower bounds equal to +/- 0.5 * the most significant digit given a number with' + + 'significant decimal places.', + () => { + const req = { + method: 'GET', + query: { + foo: 'eq100.000', + }, + }; + const parameterDefinitions = { + foo: { type: 'number', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: { [Op.between]: [99.9995, 100.0005] }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }, + ); + test("Should default to 'eq' prefix.", () => { + const req = { + method: 'GET', + query: { + foo: '100', + }, + }; + const parameterDefinitions = { + foo: { type: 'number', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: { [Op.between]: [99.5, 100.5] }, + }, + ], + }, + ], + }, + }, + ]; + expect(query).toEqual(expectedResult); + }); + }); + describe('ne Modifier Tests', () => { + test('Should return $or that fully excludes range with upper lower bounds equal to +/- 0.5 given an integer', () => { + const req = { + method: 'GET', + query: { + foo: 'ne100', + }, + }; + const parameterDefinitions = { + foo: { type: 'number', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: { [Op.notBetween]: [99.5, 100.5] }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test( + 'Should return $or that fully excludes range with upper lower bounds equal to +/- 0.5 * the most significant ' + + 'digit given a number with significant decimal places.', + () => { + const req = { + method: 'GET', + query: { + foo: 'ne100.000', + }, + }; + const parameterDefinitions = { + foo: { type: 'number', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: { [Op.notBetween]: [99.9995, 100.0005] }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }, + ); + }); + describe('lt, le, gt, ge Modifier Tests', () => { + test('Should return $lt a given target value', () => { + const req = { + method: 'GET', + query: { + foo: 'lt100.0000001', + }, + }; + const parameterDefinitions = { + foo: { type: 'number', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: { [Op.lt]: 100.0000001 }, + }, + ], + }, + ], + }, + }, + ]; + + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should return $lte a given target value', () => { + const req = { + method: 'GET', + query: { + foo: 'le100.0000001', + }, + }; + const parameterDefinitions = { + foo: { type: 'number', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: { [Op.lte]: 100.0000001 }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should return $gt a given target value', () => { + const req = { + method: 'GET', + query: { + foo: 'gt100.0000001', + }, + }; + const parameterDefinitions = { + foo: { type: 'number', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: { [Op.gt]: 100.0000001 }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should return $gte a given target value', () => { + const req = { + method: 'GET', + query: { + foo: 'ge100.0000001', + }, + }; + const parameterDefinitions = { + foo: { type: 'number', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: { [Op.gte]: 100.0000001 }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + }); + describe('ap Prefix Tests', () => { + test('Should return range with upper lower bounds equal to +/- 0.1 * a given input', () => { + const req = { + method: 'GET', + query: { + foo: 'ap-10', + }, + }; + const parameterDefinitions = { + foo: { type: 'number', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: { [Op.between]: [-11, -9] }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + }); + describe('Signed Number Tests', () => { + test('Should return range with upper lower bounds equal to +/- 0.5 given a negative number', () => { + const req = { + method: 'GET', + query: { + foo: 'eq-10', + }, + }; + const parameterDefinitions = { + foo: { type: 'number', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: { [Op.between]: [-10.5, -9.5] }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should return range with upper lower bounds equal to +/- 0.5 given a signed positive number', () => { + const req = { + method: 'GET', + query: { + foo: 'eq+10', + }, + }; + const parameterDefinitions = { + foo: { type: 'number', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: { [Op.between]: [9.5, 10.5] }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + }); + }); + + describe('Build String Query Tests', () => { + describe('No Modifier Tests', () => { + test('Should return case and accent insensitive regex matching start of string for input target value', () => { + const req = { + method: 'GET', + query: { + foo: 'Evé', + }, + }; + const parameterDefinitions = { + foo: { type: 'string', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: { [Op.iRegexp]: '^Eve' }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + }); + describe('contains Modifier Tests', () => { + test('Should return case and accent insensitive regex matching any part of string for input target value', () => { + const req = { + method: 'GET', + query: { + 'foo:contains': 'Evê', + }, + }; + const parameterDefinitions = { + foo: { type: 'string', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: { [Op.iLike]: 'Eve' }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + }); + describe('exact Modifier Tests', () => { + test('Should return case and accent sensitive regex exactly matching input target value', () => { + const req = { + method: 'GET', + query: { + 'foo:exact': 'Evë', + }, + }; + const parameterDefinitions = { + foo: { type: 'string', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: 'Evë', + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + }); + }); + + describe('Build Quantity Query Tests', () => { + describe('eq Modifier Tests', () => { + test('Should return range with upper lower bounds equal to +/- 0.5 given an integer quantity of SI unit', () => { + const req = { + method: 'GET', + query: { + foo: 'eq1||kg', + }, + }; + const parameterDefinitions = { + foo: { type: 'quantity', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo.value', + value: { + [Op.between]: [0.5, 1.5], + }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should return range with upper lower bounds equal to +/- 0.5 * the most significant digit of a given SI quantity', () => { + const req = { + method: 'GET', + query: { + foo: 'eq1.00||kg', + }, + }; + const parameterDefinitions = { + foo: { type: 'quantity', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo.value', + value: { + [Op.between]: [0.995, 1.005], + }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test( + 'Should return range with upper lower bounds equal to +/- 0.5 * the most significant digit of a given number ' + + 'converted to SI units', + () => { + const req = { + method: 'GET', + query: { + foo: 'eq20.00||mg', + }, + }; + const parameterDefinitions = { + foo: { type: 'quantity', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo.value', + value: { + [Op.between]: [0.000019995, 0.000020005], + }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }, + ); + }); + describe('ne Modifier Tests', () => { + test('Should return $or that fully excludes range with upper lower bounds equal to +/- 0.5 given an integer quantity of SI unit', () => { + const req = { + method: 'GET', + query: { + foo: 'ne1||kg', + }, + }; + const parameterDefinitions = { + foo: { type: 'quantity', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo.value', + value: { + [Op.notBetween]: [0.5, 1.5], + }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test( + 'Should return $or that fully excludes range with upper lower bounds equal to +/- 0.5 * the most significant ' + + 'digit given a SI quantity with significant decimal places.', + () => { + const req = { + method: 'GET', + query: { + foo: 'ne1.00||kg', + }, + }; + const parameterDefinitions = { + foo: { type: 'quantity', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo.value', + value: { + [Op.notBetween]: [0.995, 1.005], + }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }, + ); + test( + 'Should return $or that fully excludes range with upper lower bounds equal to +/- 0.5 * the most significant ' + + 'digit given a quantity converted to SI units.', + () => { + const req = { + method: 'GET', + query: { + foo: 'ne20.00||mg', + }, + }; + const parameterDefinitions = { + foo: { type: 'quantity', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo.value', + value: { + [Op.notBetween]: [0.000019995, 0.000020005], + }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }, + ); + }); + describe('lt, le, gt, ge Modifier Tests', () => { + test('Should return $lt a given target value in SI units', () => { + const req = { + method: 'GET', + query: { + foo: 'lt2.4||kg', + }, + }; + const parameterDefinitions = { + foo: { type: 'quantity', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo.value', + value: { + [Op.lt]: 2.4, + }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should return $lt a given target value converted to SI units', () => { + const req = { + method: 'GET', + query: { + foo: 'lt2.4||mg', + }, + }; + const parameterDefinitions = { + foo: { type: 'quantity', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo.value', + value: { + [Op.lt]: 0.0000024, + }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should return $lte a given target value in SI units', () => { + const req = { + method: 'GET', + query: { + foo: 'le2.4||kg', + }, + }; + const parameterDefinitions = { + foo: { type: 'quantity', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo.value', + value: { + [Op.lte]: 2.4, + }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should return $lte a given target value converted to SI units', () => { + const req = { + method: 'GET', + query: { + foo: 'le2.4||mg', + }, + }; + const parameterDefinitions = { + foo: { type: 'quantity', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo.value', + value: { + [Op.lte]: 0.0000024, + }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should return $gt a given target value in SI units', () => { + const req = { + method: 'GET', + query: { + foo: 'gt2.4||kg', + }, + }; + const parameterDefinitions = { + foo: { type: 'quantity', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo.value', + value: { + [Op.gt]: 2.4, + }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should return $gt a given target value converted to SI units', () => { + const req = { + method: 'GET', + query: { + foo: 'gt2.4||mg', + }, + }; + const parameterDefinitions = { + foo: { type: 'quantity', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo.value', + value: { + [Op.gt]: 0.0000024, + }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should return $gte a given target value in SI units', () => { + const req = { + method: 'GET', + query: { + foo: 'ge2.4||kg', + }, + }; + const parameterDefinitions = { + foo: { type: 'quantity', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo.value', + value: { + [Op.gte]: 2.4, + }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should return $gte a given target value converted to SI units', () => { + const req = { + method: 'GET', + query: { + foo: 'ge2.4||mg', + }, + }; + const parameterDefinitions = { + foo: { type: 'quantity', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo.value', + value: { + [Op.gte]: 0.0000024, + }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + }); + describe('ap Prefix Tests', () => { + test('Should return range with upper lower bounds equal to +/- 10% given an integer quantity of SI unit', () => { + const req = { + method: 'GET', + query: { + foo: 'ap1||kg', + }, + }; + const parameterDefinitions = { + foo: { type: 'quantity', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo.value', + value: { + [Op.between]: [0.9, 1.1], + }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test( + 'Should return range with upper lower bounds equal to +/- 10% given a SI quantity with significant decimal ' + + 'places.', + () => { + const req = { + method: 'GET', + query: { + foo: 'ap1.00||kg', + }, + }; + const parameterDefinitions = { + foo: { type: 'quantity', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo.value', + value: { + [Op.between]: [0.9, 1.1], + }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }, + ); + //TODO: This seems a bit off - come back and verify calculation. + test( + 'Should return range with upper lower bounds equal to +/- 10% * the most significant given a quantity' + + ' converted to SI units.', + () => { + const req = { + method: 'GET', + query: { + foo: 'ap20.00||mg', + }, + }; + const parameterDefinitions = { + foo: { type: 'quantity', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo.value', + value: { + [Op.between]: [0.000018, 0.000022], + }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }, + ); + }); + describe('System Parameter Tests', () => { + test( + 'Should return $and with range with upper lower bounds equal to +/- 0.5 given an integer quantity of SI unit AND ' + + 'the provided system', + () => { + const req = { + method: 'GET', + query: { + foo: 'eq1|http://unitsofmeasure.org|kg', + }, + }; + const parameterDefinitions = { + foo: { type: 'quantity', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { + name: 'foo.value', + value: { + [Op.between]: [0.5, 1.5], + }, + }, + { + name: 'foo.system', + value: 'http://unitsofmeasure.org', + }, + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }, + ); + }); + }); + + describe('Build URI Query Tests', () => { + describe('above Prefix Tests', () => { + test('Should return regex query matching anything ending with the given input string', () => { + const req = { + method: 'GET', + query: { + 'foo:above': 'endWithMe', + }, + }; + const parameterDefinitions = { + foo: { type: 'uri', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: { + [Op.endsWith]: 'endWithMe', + }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + }); + describe('below Prefix Tests', () => { + test('Should return regex query matching anything starting with the given input string', () => { + const req = { + method: 'GET', + query: { + 'foo:below': 'startWithMe', + }, + }; + const parameterDefinitions = { + foo: { type: 'uri', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: { + [Op.startsWith]: 'startWithMe', + }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should implicitly use below suffix if value ends with trailing slash.', () => { + const req = { + method: 'GET', + query: { + foo: 'startWithMe/', + }, + }; + const parameterDefinitions = { + foo: { type: 'uri', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: { + [Op.startsWith]: 'startWithMe/', + }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should throw an error if given a urn with a suffix', () => { + const req = { + method: 'GET', + query: { + 'foo:above': 'urn:oid:1.2.3.4.5', + }, + }; + const parameterDefinitions = { + foo: { type: 'uri', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + expect(errors).toHaveLength(1); + expect(errors[0].message).toContain( + "Search modifiers are not supported for parameter 'foo' as a URN of type uri", + ); + }); + }); + describe('no Prefix Tests', () => { + test('Should return regex query matching anything exactly matching given input string', () => { + const req = { + method: 'GET', + query: { + foo: 'equalMe', + }, + }; + const parameterDefinitions = { + foo: { type: 'uri', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: 'equalMe', + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + }); + }); + + /** TODO: Exists does not work yet.*/ + + describe('Build Reference Query Tests', () => { + test('Should return a query with the [parameter].reference equal to the supplied value of format [type]/[id]', () => { + const req = { + method: 'GET', + query: { + foo: 'Patient/123', + }, + }; + const parameterDefinitions = { + foo: { type: 'reference', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo.reference', + value: 'Patient/123', + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should return a query with the [parameter].reference equal to the supplied value of format http.*/[type]/[id]', () => { + const req = { + method: 'GET', + query: { + foo: 'http://example.fhir.org/foo/bar/Patient/123', + }, + }; + const parameterDefinitions = { + foo: { type: 'reference', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo.reference', + value: 'Patient/123', + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + }); + + describe('Build And/Or Query Tests', () => { + test('Should return a query that matches foo AND bar', () => { + const req = { + method: 'GET', + query: { + foo: ['foo', 'bar'], + }, + }; + const parameterDefinitions = { + foo: { type: 'string', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: { + [Op.iRegexp]: '^foo', + }, + }, + ], + }, + { + [Op.or]: [ + { + name: 'foo', + value: { + [Op.iRegexp]: '^bar', + }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should return a query that matches foo AND (bar OR baz)', () => { + const req = { + method: 'GET', + query: { + foo: ['foo', 'bar,baz'], + }, + }; + const parameterDefinitions = { + foo: { type: 'string', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: { + [Op.iRegexp]: '^foo', + }, + }, + ], + }, + { + [Op.or]: [ + { + name: 'foo', + value: { + [Op.iRegexp]: '^bar', + }, + }, + { + name: 'foo', + value: { + [Op.iRegexp]: '^baz', + }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + }); + + describe('Build Token Query Tests', () => { + describe('Coding Token Tests', () => { + test('Should return an and query with 1 equal to condition when given just a system', () => { + const req = { + method: 'GET', + query: { + foo: 'bar|', + }, + }; + const parameterDefinitions = { + foo: { type: 'token', fhirtype: 'Coding', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { + name: 'foo.system', + value: 'bar', + }, + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should return an and query with 1 equal to condition when given just a code', () => { + const req = { + method: 'GET', + query: { + foo: 'bar', + }, + }; + const parameterDefinitions = { + foo: { type: 'token', fhirtype: 'Coding', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { + name: 'foo.code', + value: 'bar', + }, + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should return an and query with 1 equal to condition when given just a code', () => { + const req = { + method: 'GET', + query: { + foo: '|bar', + }, + }; + const parameterDefinitions = { + foo: { type: 'token', fhirtype: 'Coding', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { + name: 'foo.code', + value: 'bar', + }, + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should return an and query with 2 equal to conditions when given a system and code', () => { + const req = { + method: 'GET', + query: { + foo: 'bar|baz', + }, + }; + const parameterDefinitions = { + foo: { type: 'token', fhirtype: 'Coding', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { + name: 'foo.system', + value: 'bar', + }, + { + name: 'foo.code', + value: 'baz', + }, + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + }); + describe('CodableConcept Token Tests', () => { + test('Should return an and query with 1 equal to condition when given just a system', () => { + const req = { + method: 'GET', + query: { + foo: 'bar|', + }, + }; + const parameterDefinitions = { + foo: { + type: 'token', + fhirtype: 'CodableConcept', + xpath: 'Resource.foo', + }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { + name: 'foo.coding.system', + value: 'bar', + }, + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should return an and query with 1 equal to condition when given just a code', () => { + const req = { + method: 'GET', + query: { + foo: 'bar', + }, + }; + const parameterDefinitions = { + foo: { + type: 'token', + fhirtype: 'CodableConcept', + xpath: 'Resource.foo', + }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { + name: 'foo.coding.code', + value: 'bar', + }, + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should return an and query with 2 equal to conditions when given a system and code', () => { + const req = { + method: 'GET', + query: { + foo: 'bar|baz', + }, + }; + const parameterDefinitions = { + foo: { + type: 'token', + fhirtype: 'CodableConcept', + xpath: 'Resource.foo', + }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { + name: 'foo.coding.system', + value: 'bar', + }, + { name: 'foo.coding.code', value: 'baz' }, + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + }); + describe('Identifier Token Tests', () => { + test('Should return an and query with 1 equal to condition when given just a system', () => { + const req = { + method: 'GET', + query: { + foo: 'bar|', + }, + }; + const parameterDefinitions = { + foo: { type: 'token', fhirtype: 'Identifier', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { + name: 'foo.system', + value: 'bar', + }, + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should return an and query with 1 equal to condition when given just a code', () => { + const req = { + method: 'GET', + query: { + foo: 'bar', + }, + }; + const parameterDefinitions = { + foo: { type: 'token', fhirtype: 'Identifier', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { + name: 'foo.value', + value: 'bar', + }, + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should return an and query with 2 equal to conditions when given a system and code', () => { + const req = { + method: 'GET', + query: { + foo: 'bar|baz', + }, + }; + const parameterDefinitions = { + foo: { type: 'token', fhirtype: 'Identifier', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { + name: 'foo.system', + value: 'bar', + }, + { + name: 'foo.value', + value: 'baz', + }, + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + }); + describe('ContactPoint Token Tests', () => { + test('Should return an or query with an equal to condition for each of the ContactPoint fields given a code', () => { + const req = { + method: 'GET', + query: { + foo: 'bar', + }, + }; + const parameterDefinitions = { + foo: { + type: 'token', + fhirtype: 'ContactPoint', + xpath: 'Resource.foo', + }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.or]: [ + { + name: 'foo.system', + value: 'bar', + }, + { + name: 'foo.value', + value: 'bar', + }, + { + name: 'foo.use', + value: 'bar', + }, + { + name: 'foo.rank', + value: 'bar', + }, + { + name: 'foo.period', + value: 'bar', + }, + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should return an or query with an equal to condition for each of the ContactPoint fields given a code |', () => { + const req = { + method: 'GET', + query: { + foo: '|bar', + }, + }; + const parameterDefinitions = { + foo: { + type: 'token', + fhirtype: 'ContactPoint', + xpath: 'Resource.foo', + }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.or]: [ + { + name: 'foo.system', + value: 'bar', + }, + { + name: 'foo.value', + value: 'bar', + }, + { + name: 'foo.use', + value: 'bar', + }, + { + name: 'foo.rank', + value: 'bar', + }, + { + name: 'foo.period', + value: 'bar', + }, + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should return an or query with an equal to condition for each of the ContactPoint fields given two | codes', () => { + const req = { + method: 'GET', + query: { + foo: 'bar|baz', + }, + }; + const parameterDefinitions = { + foo: { + type: 'token', + fhirtype: 'ContactPoint', + xpath: 'Resource.foo', + }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.or]: [ + { + name: 'foo.system', + value: 'baz', + }, + { + name: 'foo.value', + value: 'baz', + }, + { + name: 'foo.use', + value: 'baz', + }, + { + name: 'foo.rank', + value: 'baz', + }, + { + name: 'foo.period', + value: 'baz', + }, + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + }); + describe('code Token Tests', () => { + test('Should return an equal to query given a code', () => { + const req = { + method: 'GET', + query: { + foo: 'bar', + }, + }; + const parameterDefinitions = { + foo: { type: 'token', fhirtype: 'code', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: 'bar', + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should return an equal to query given a code', () => { + const req = { + method: 'GET', + query: { + foo: '|bar', + }, + }; + const parameterDefinitions = { + foo: { type: 'token', fhirtype: 'code', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: 'bar', + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should return an equal to query given a system and code (ignore the system)', () => { + const req = { + method: 'GET', + query: { + foo: 'bar|baz', + }, + }; + const parameterDefinitions = { + foo: { type: 'token', fhirtype: 'code', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: 'baz', + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + }); + describe('boolean Token Tests', () => { + test('Should throw an error if given just a system and no code', () => { + const req = { + method: 'GET', + query: { + foo: 'bar|', + }, + }; + const parameterDefinitions = { + foo: { type: 'token', fhirtype: 'boolean', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + expect(errors).toHaveLength(1); + expect(errors[0].message).toContain( + 'Type mismatch, expected boolean for parameter foo', + ); + }); + test('Should throw an error if given just a non boolean code', () => { + const req = { + method: 'GET', + query: { + foo: 'bar', + }, + }; + const parameterDefinitions = { + foo: { type: 'token', fhirtype: 'boolean', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + expect(errors).toHaveLength(1); + expect(errors[0].message).toContain( + 'Type mismatch, expected boolean for parameter foo', + ); + }); + test('Should return an equal to query given a code', () => { + const req = { + method: 'GET', + query: { + foo: 'true', + }, + }; + const parameterDefinitions = { + foo: { type: 'token', fhirtype: 'boolean', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: 'true', + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should return an equal to query given a code |', () => { + const req = { + method: 'GET', + query: { + foo: '|false', + }, + }; + const parameterDefinitions = { + foo: { type: 'token', fhirtype: 'boolean', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: 'false', + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should return an equal to query given a system and code (ignore the system)', () => { + const req = { + method: 'GET', + query: { + foo: 'bar|false', + }, + }; + const parameterDefinitions = { + foo: { type: 'token', fhirtype: 'boolean', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: 'false', + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + }); + describe('uri Token Tests', () => { + test('Should return an equal to query given a code', () => { + const req = { + method: 'GET', + query: { + foo: 'bar', + }, + }; + const parameterDefinitions = { + foo: { type: 'token', fhirtype: 'uri', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: 'bar', + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should return an equal to query given a code', () => { + const req = { + method: 'GET', + query: { + foo: '|bar', + }, + }; + const parameterDefinitions = { + foo: { type: 'token', fhirtype: 'uri', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: 'bar', + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should return an equal to query given a system and code (ignore the system)', () => { + const req = { + method: 'GET', + query: { + foo: 'bar|baz', + }, + }; + const parameterDefinitions = { + foo: { type: 'token', fhirtype: 'uri', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: 'baz', + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + }); + describe('string Token Tests', () => { + test('Should return an equal to query given a code', () => { + const req = { + method: 'GET', + query: { + foo: 'bar', + }, + }; + const parameterDefinitions = { + foo: { type: 'token', fhirtype: 'string', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: 'bar', + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should return an equal to query given a code |', () => { + const req = { + method: 'GET', + query: { + foo: '|bar', + }, + }; + const parameterDefinitions = { + foo: { type: 'token', fhirtype: 'string', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: 'bar', + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should return an equal to query given a system and code (ignore the system)', () => { + const req = { + method: 'GET', + query: { + foo: 'bar|baz', + }, + }; + const parameterDefinitions = { + foo: { type: 'token', fhirtype: 'string', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: 'baz', + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + }); + describe('invalid fhirtype Token Tests', () => { + test('Should throw an error if given an unsupported fhirtype', () => { + const req = { + method: 'GET', + query: { + foo: 'bar', + }, + }; + const parameterDefinitions = { + foo: { + type: 'token', + fhirtype: 'unsupported', + xpath: 'Resource.foo', + }, + }; + const includeArchived = false; + let { errors } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + expect(errors).toHaveLength(1); + expect(errors[0].message).toContain( + "Unsupported fhirtype 'unsupported' supplied for token parameter 'foo'", + ); + }); + }); + }); + + describe('Error Handling Tests', () => { + test('Should throw and catch an error and add it to the errors array if a parameter is invalid.', () => { + const req = { + method: 'GET', + query: { + foo: 'foo', + }, + }; + const parameterDefinitions = { + foo: { type: 'number', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + expect(errors).toHaveLength(1); + expect(errors[0].message).toContain('expected number for parameter foo'); + }); + test('Should throw and catch an error and add it to the errors array if a parameter is not defined in the config.', () => { + const req = { + method: 'GET', + query: { + foo: 'foo', + }, + }; + const parameterDefinitions = { + bar: { type: 'number', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + expect(errors).toHaveLength(1); + expect(errors[0].message).toContain("Unknown parameter 'foo'"); + }); + test('Should throw and catch an error and add it to the errors array if a parameter has an invalid type.', () => { + const req = { + method: 'GET', + query: { + foo: 'foo', + }, + }; + const parameterDefinitions = { + foo: { type: 'unsupported', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + expect(errors).toHaveLength(1); + expect(errors[0].message).toContain( + "Unsupported type 'unsupported' supplied for parameter 'foo'", + ); + }); + }); + + describe('Request Type Tests', () => { + test('Should use the request query for parameters', () => { + const req = { + method: 'GET', + query: { + foo: 'eq2018-10-31T17:49:29.000Z', + }, + body: { + foo: 'eq2017-10-31T17:49:29.000Z', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison('=', '2018-10-31T17:49:29.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should use the request body for parameters', () => { + const req = { + method: 'POST', + query: { + foo: 'eq2018-10-31T17:49:29.000Z', + }, + body: { + foo: 'eq2017-10-31T17:49:29.000Z', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison('=', '2017-10-31T17:49:29.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should merge the request body with request.params for parameters', () => { + const req = { + method: 'POST', + body: { + foo: 'eq2017-10-31T17:49:29.000Z', + }, + params: { + bar: 'eq2018-10-31T17:49:29.000Z', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + bar: { type: 'date', xpath: 'Resource.bar' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'foo' }, + formDateComparison('=', '2017-10-31T17:49:29.000Z'), + ], + }, + ], + }, + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'bar' }, + formDateComparison('=', '2018-10-31T17:49:29.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should throw an error for unsupported request types', () => { + const req = { + method: 'PUT', + query: { + foo: 'eq2018-10-31T17:49:29.000Z', + }, + }; + const parameterDefinitions = { + foo: { type: 'date', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + expect(errors).toHaveLength(1); + expect(errors[0].message).toContain("Unsupported request method 'PUT'"); + }); + test('Should throw an error for unsupported modifiers', () => { + const req = { + method: 'GET', + query: { + 'foo:unsupportedModifier': 'bar', + }, + }; + const parameterDefinitions = { + foo: { type: 'string', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + expect(errors).toHaveLength(1); + expect(errors[0].message).toContain( + "Search modifier 'unsupportedModifier' is not currently supported", + ); + }); + }); + + describe('Global Parameter Query Tests', () => { + test('Test for global param _id', () => { + const req = { + method: 'GET', + query: { + _id: 'foo', + }, + }; + const parameterDefinitions = undefined; + const includeArchived = false; + let { query, errors } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'id', + value: 'foo', + }, + ], + }, + ], + }, + }, + ]; + + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Test for global param _lastUpdated', () => { + const req = { + method: 'GET', + query: { + _lastUpdated: '2018-10-31T17:49:29.000Z', + }, + }; + const parameterDefinitions = undefined; + const includeArchived = false; + let { query, errors } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + [Op.and]: [ + { name: 'meta.lastUpdated' }, + formDateComparison('=', '2018-10-31T17:49:29.000Z'), + ], + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should be able to initialize a new qb without supplying global parameters', () => { + const noGlobalQB = new QueryBuilder({ + packageName: '@asymmetrik/fhir-qb-mongo', + }); + expect(noGlobalQB).toBeDefined(); + }); + }); + + /** TODO: Look into _count param. Currently not handling it. Search transformations not implemented. */ + + /** TODO: Paging is currently handled in the server - think about migrating this? + /** We would just need to calculate the offset + limit. */ + + describe('Parameter Definition Tests', () => { + test('TODO - test multiple xpaths', () => { + const req = { + method: 'GET', + query: { + foo: 'Evé', + }, + }; + const parameterDefinitions = { + foo: { type: 'string', xpath: ['Resource.foo', 'Resource.bar'] }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: { + [Op.iRegexp]: '^Eve', + }, + }, + { + name: 'bar', + value: { + [Op.iRegexp]: '^Eve', + }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + test('Should return a query that matches foo AND (bar OR baz) in field foo or qux', () => { + const req = { + method: 'GET', + query: { + foo: ['foo', 'bar,baz'], + }, + }; + const parameterDefinitions = { + foo: { type: 'string', xpath: ['Resource.foo', 'Resource.qux'] }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foo', + value: { + [Op.iRegexp]: '^foo', + }, + }, + { + name: 'qux', + value: { + [Op.iRegexp]: '^foo', + }, + }, + ], + }, + { + [Op.or]: [ + { + name: 'foo', + value: { + [Op.iRegexp]: '^bar', + }, + }, + { + name: 'foo', + value: { + [Op.iRegexp]: '^baz', + }, + }, + { + name: 'qux', + value: { + [Op.iRegexp]: '^bar', + }, + }, + { + name: 'qux', + value: { + [Op.iRegexp]: '^baz', + }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + }); +}); + +describe('Constructor Tests', () => { + beforeAll(() => { + // Do this for tests only + moment.suppressDeprecationWarnings = true; + }); + const Sequelize = require('sequelize'); + const Op = Sequelize.Op; + const globalParameterDefinitions = { + _content: { + type: 'string', + fhirtype: 'string', + xpath: '', + definition: 'http://hl7.org/fhir/SearchParameter/Resource-content', + description: 'Search on the entire content of the resource', + modifier: 'missing,exact,contains', + }, + _id: { + type: 'token', + fhirtype: 'token', + xpath: 'Resource.id', + definition: 'http://hl7.org/fhir/SearchParameter/Resource-id', + description: 'Logical id of this artifact', + modifier: 'missing,text,not,in,not-in,below,above,ofType', + }, + _lastUpdated: { + type: 'date', + fhirtype: 'date', + xpath: 'Resource.meta.lastUpdated', + definition: 'http://hl7.org/fhir/SearchParameter/Resource-lastUpdated', + description: 'When the resource version last changed', + modifier: 'missing', + }, + _profile: { + type: 'reference', + fhirtype: 'reference', + xpath: 'Resource.meta.profile', + definition: 'http://hl7.org/fhir/SearchParameter/Resource-profile', + description: 'Profiles this resource claims to conform to', + modifier: 'missing,type,identifier', + }, + _query: { + type: 'token', + fhirtype: 'token', + xpath: '', + definition: 'http://hl7.org/fhir/SearchParameter/Resource-query', + description: + 'A custom search profile that describes a specific defined query operation', + modifier: 'missing,text,not,in,not-in,below,above,ofType', + }, + _security: { + type: 'token', + fhirtype: 'token', + xpath: 'Resource.meta.security', + definition: 'http://hl7.org/fhir/SearchParameter/Resource-security', + description: 'Security Labels applied to this resource', + modifier: 'missing,text,not,in,not-in,below,above,ofType', + }, + _source: { + type: 'uri', + fhirtype: 'uri', + xpath: 'Resource.meta.source', + definition: 'http://hl7.org/fhir/SearchParameter/Resource-source', + description: 'Identifies where the resource comes from', + modifier: 'missing,below,above', + }, + _tag: { + type: 'token', + fhirtype: 'token', + xpath: 'Resource.meta.tag', + definition: 'http://hl7.org/fhir/SearchParameter/Resource-tag', + description: 'Tags applied to this resource', + modifier: 'missing,text,not,in,not-in,below,above,ofType', + }, + }; + describe('columnIdentifierStrategy Tests', () => { + test('Should throw error when given unsupported columnIdentifierStrategy', () => { + let expectedError = new Error( + "Supplied columnIdentifierStrategy value 'foo' not one of currently " + + 'supported columnIdentifierStrategy values: xpath, parameter', + ); + let qb; + let observedError; + try { + qb = new QueryBuilder({ + packageName: '../fhir-qb-sql/index.js', + globalParameterDefinitions, + implementationParameters: { archivedParamPath: 'meta._isArchived' }, + columnIdentifierStrategy: 'foo', + }); + } catch (err) { + observedError = err; + } + expect(observedError).toEqual(expectedError); + expect(qb).toBe(undefined); + }); + test('Should use parameter instead of xpath when given columnIdentifierStrategy: parameter', () => { + let qb = new QueryBuilder({ + packageName: '../fhir-qb-sql/index.js', + globalParameterDefinitions, + implementationParameters: { archivedParamPath: 'meta._isArchived' }, + columnIdentifierStrategy: 'parameter', + }); + const req = { + method: 'GET', + query: { + foobar: 'eq100', + }, + }; + const parameterDefinitions = { + foobar: { type: 'number', xpath: 'Resource.foo' }, + }; + const includeArchived = false; + let { errors, query } = qb.buildSearchQuery({ + req, + parameterDefinitions, + includeArchived, + }); + const expectedResult = [ + { + where: { + [Op.and]: [ + { + [Op.or]: [ + { + name: 'foobar', + value: { [Op.between]: [99.5, 100.5] }, + }, + ], + }, + ], + }, + }, + ]; + expect(errors).toHaveLength(0); + expect(query).toEqual(expectedResult); + }); + }); +}); diff --git a/packages/fhir-qb/package.json b/packages/fhir-qb/package.json index 60f0e10..e66c07b 100644 --- a/packages/fhir-qb/package.json +++ b/packages/fhir-qb/package.json @@ -9,6 +9,11 @@ }, "homepage": "https://github.com/Asymmetrik/phx-tools", "author": "Sumeet-S ", + "contributors": [ + "Shane O'Neill ", + "Sumeet-S ", + "Tracy Nguyen " + ], "license": "MIT", "publishConfig": { "access": "public" @@ -30,7 +35,8 @@ "@asymmetrik/fhir-qb-mongo": "^0.10.3", "@asymmetrik/fhir-sanitize-param": "^1.1.2", "mathjs": "^5.2.3", - "moment": "^2.22.2", + "moment": "^2.24.0", + "sequelize": "^5.19.0", "xregexp": "^4.2.0" }, "devDependencies": { diff --git a/packages/fhir-qb/yarn.lock b/packages/fhir-qb/yarn.lock index dcae375..6eb5431 100644 --- a/packages/fhir-qb/yarn.lock +++ b/packages/fhir-qb/yarn.lock @@ -2,17 +2,17 @@ # yarn lockfile v1 -"@asymmetrik/fhir-qb-mongo@^0.10.1": - version "0.10.1" - resolved "https://registry.yarnpkg.com/@asymmetrik/fhir-qb-mongo/-/fhir-qb-mongo-0.10.1.tgz#24634ee97965788c6faa57ab4f2e5fcf8af99473" - integrity sha512-mF8Ozul/w/Awm9PY6zYWJE+u81sZf8ILY848Aj4DPcpk1CgRoJwPU8oUQNoRkwjkXHRN8LcwBNTbdV+PRq+BYg== +"@asymmetrik/fhir-qb-mongo@^0.10.3": + version "0.10.3" + resolved "https://registry.yarnpkg.com/@asymmetrik/fhir-qb-mongo/-/fhir-qb-mongo-0.10.3.tgz#0a5bc4d00c9014acf74a139ee26db2ae760bb9a1" + integrity sha512-cFccR4dPahkgIhrCPGFrNrENSOocM3xFOIs9j0wLU1Vzin/BfXX2Uaf8xaWmwQIJRD4GDyRAndxL8SGJ2NyE/g== dependencies: xregexp "^4.2.0" -"@asymmetrik/fhir-sanitize-param@^1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@asymmetrik/fhir-sanitize-param/-/fhir-sanitize-param-1.1.1.tgz#1a845cd38e2703021f7368872b3da59eaf6d32a0" - integrity sha512-XnV8+AMsNzCNZvnaQo79bnvRSaxVP7n6NZ40ySr0EcX4CHsrpf7QSpPBjOd+HoaKmR3yihSeIru+2ybNjk2zew== +"@asymmetrik/fhir-sanitize-param@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@asymmetrik/fhir-sanitize-param/-/fhir-sanitize-param-1.1.2.tgz#a0bf01bd5d1db5700ff4d176d091996aa6b021d3" + integrity sha512-WExlaWFwkfOuKaX2M5aYdmNgVyCfukAxAeVZrbtieobtmxwX60IzzKeGTKf6kHc243QPA04CCul9CMIys9feNQ== dependencies: moment-timezone "^0.5.21" sanitize-html "^1.20.0" @@ -419,6 +419,11 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" +any-promise@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" + integrity sha1-q8av7tzqUugJzcA3au0845Y10X8= + anymatch@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" @@ -592,6 +597,11 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" +bluebird@^3.5.0: + version "3.5.5" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.5.tgz#a8d0afd73251effbbd5fe384a77d73003c17a71f" + integrity sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w== + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -710,6 +720,14 @@ cliui@^4.0.0: strip-ansi "^4.0.0" wrap-ansi "^2.0.0" +cls-bluebird@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cls-bluebird/-/cls-bluebird-2.1.0.tgz#37ef1e080a8ffb55c2f4164f536f1919e7968aee" + integrity sha1-N+8eCAqP+1XC9BZPU28ZGeeWiu4= + dependencies: + is-bluebird "^1.0.2" + shimmer "^1.1.0" + co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" @@ -963,6 +981,11 @@ domutils@^1.5.1: dom-serializer "0" domelementtype "1" +dottie@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/dottie/-/dottie-2.0.1.tgz#697ad9d72004db7574d21f892466a3c285893659" + integrity sha512-ch5OQgvGDK2u8pSZeSYAQaV/lczImd7pMJ7BcEPXmnFVjy4yJIzP6CsODJUTH8mg1tyH1Z2abOiuJO3DjZ/GBw== + ecc-jsbn@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" @@ -1409,6 +1432,11 @@ imurmurhash@^0.1.4: resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= +inflection@1.12.0: + version "1.12.0" + resolved "https://registry.yarnpkg.com/inflection/-/inflection-1.12.0.tgz#a200935656d6f5f6bc4dc7502e1aecb703228416" + integrity sha1-ogCTVlbW9fa8TcdQLhrstwMihBY= + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -1453,6 +1481,11 @@ is-arrayish@^0.2.1: resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= +is-bluebird@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-bluebird/-/is-bluebird-1.0.2.tgz#096439060f4aa411abee19143a84d6a55346d6e2" + integrity sha1-CWQ5Bg9KpBGr7hkUOoTWpVNG1uI= + is-buffer@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" @@ -2386,7 +2419,7 @@ moment-timezone@^0.5.21: dependencies: moment ">= 2.9.0" -"moment@>= 2.9.0", moment@^2.22.2: +"moment@>= 2.9.0", moment@^2.24.0: version "2.24.0" resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b" integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg== @@ -2920,6 +2953,13 @@ ret@~0.1.10: resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== +retry-as-promised@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/retry-as-promised/-/retry-as-promised-3.2.0.tgz#769f63d536bec4783549db0777cb56dadd9d8543" + integrity sha512-CybGs60B7oYU/qSQ6kuaFmRd9sTZ6oXSc0toqePvV74Ac6/IFZSI1ReFQmtCN+uvW1Mtqdwpvt/LGOiCBAY2Mg== + dependencies: + any-promise "^1.3.0" + rimraf@^2.5.4, rimraf@^2.6.2: version "2.6.3" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" @@ -2995,6 +3035,37 @@ seed-random@2.2.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== +semver@^6.1.1: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + +sequelize-pool@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/sequelize-pool/-/sequelize-pool-2.3.0.tgz#64f1fe8744228172c474f530604b6133be64993d" + integrity sha512-Ibz08vnXvkZ8LJTiUOxRcj1Ckdn7qafNZ2t59jYHMX1VIebTAOYefWdRYFt6z6+hy52WGthAHAoLc9hvk3onqA== + +sequelize@^5.19.0: + version "5.19.0" + resolved "https://registry.yarnpkg.com/sequelize/-/sequelize-5.19.0.tgz#96d610cf3afc499fb1ba27c77a9eb3c6e7060812" + integrity sha512-1LsPa++R37USE3LWYKkw//kSAKORXogItoSrPahOTVEuCj+v+/BxGX+49M2d9oYtkxvwUnHgCFMx2Kzku9RhSg== + dependencies: + bluebird "^3.5.0" + cls-bluebird "^2.1.0" + debug "^4.1.1" + dottie "^2.0.0" + inflection "1.12.0" + lodash "^4.17.11" + moment "^2.24.0" + moment-timezone "^0.5.21" + retry-as-promised "^3.1.0" + semver "^6.1.1" + sequelize-pool "^2.3.0" + toposort-class "^1.0.1" + uuid "^3.2.1" + validator "^10.11.0" + wkx "^0.4.6" + set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -3037,6 +3108,11 @@ shellwords@^0.1.1: resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww== +shimmer@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" + integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== + signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" @@ -3339,6 +3415,11 @@ to-regex@^3.0.1, to-regex@^3.0.2: regex-not "^1.0.2" safe-regex "^1.1.0" +toposort-class@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/toposort-class/-/toposort-class-1.0.1.tgz#7ffd1f78c8be28c3ba45cd4e1a3f5ee193bd9988" + integrity sha1-f/0feMi+KMO6Rc1OGj9e4ZO9mYg= + tough-cookie@^2.3.3, tough-cookie@^2.3.4: version "2.5.0" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" @@ -3447,6 +3528,11 @@ util.promisify@^1.0.0: define-properties "^1.1.2" object.getownpropertydescriptors "^2.0.3" +uuid@^3.2.1: + version "3.3.3" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.3.tgz#4568f0216e78760ee1dbf3a4d2cf53e224112866" + integrity sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ== + uuid@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" @@ -3460,7 +3546,7 @@ validate-npm-package-license@^3.0.1: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" -validator@^10.8.0: +validator@^10.11.0, validator@^10.8.0: version "10.11.0" resolved "https://registry.yarnpkg.com/validator/-/validator-10.11.0.tgz#003108ea6e9a9874d31ccc9e5006856ccd76b228" integrity sha512-X/p3UZerAIsbBfN/IwahhYaBbY68EN/UQBWHtsbXGT5bfrH/p4NQzUCG1kF/rtKaNpnJ7jAu6NGTdSNtyNIXMw== @@ -3535,6 +3621,13 @@ which@^1.2.9, which@^1.3.0: dependencies: isexe "^2.0.0" +wkx@^0.4.6: + version "0.4.8" + resolved "https://registry.yarnpkg.com/wkx/-/wkx-0.4.8.tgz#a092cf088d112683fdc7182fd31493b2c5820003" + integrity sha512-ikPXMM9IR/gy/LwiOSqWlSL3X/J5uk9EO2hHNRXS41eTLXaUFEVw9fn/593jW/tE5tedNg8YjT5HkCa4FqQZyQ== + dependencies: + "@types/node" "*" + wordwrap@~0.0.2: version "0.0.3" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" diff --git a/yarn.lock b/yarn.lock index 819c03e..afcf445 100644 --- a/yarn.lock +++ b/yarn.lock @@ -696,6 +696,11 @@ universal-user-agent "^2.0.0" url-template "^2.0.8" +"@types/node@*": + version "12.7.4" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.7.4.tgz#64db61e0359eb5a8d99b55e05c729f130a678b04" + integrity sha512-W0+n1Y+gK/8G2P/piTkBBN38Qc5Q1ZSO6B5H3QmPCUewaiXOo2GCAWZ4ElZCcNhjJuBSUSLGFUJnmlCn5+nxOQ== + JSONStream@^1.0.4, JSONStream@^1.3.4: version "1.3.5" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" @@ -798,6 +803,11 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" +any-promise@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" + integrity sha1-q8av7tzqUugJzcA3au0845Y10X8= + anymatch@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" @@ -1169,6 +1179,11 @@ block-stream@*: dependencies: inherits "~2.0.0" +bluebird@^3.5.0: + version "3.5.5" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.5.tgz#a8d0afd73251effbbd5fe384a77d73003c17a71f" + integrity sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w== + bluebird@^3.5.1, bluebird@^3.5.3: version "3.5.3" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.3.tgz#7d01c6f9616c9a51ab0f8c549a79dfe6ec33efa7" @@ -1467,6 +1482,14 @@ clone@^1.0.2: resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= +cls-bluebird@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cls-bluebird/-/cls-bluebird-2.1.0.tgz#37ef1e080a8ffb55c2f4164f536f1919e7968aee" + integrity sha1-N+8eCAqP+1XC9BZPU28ZGeeWiu4= + dependencies: + is-bluebird "^1.0.2" + shimmer "^1.1.0" + cmd-shim@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-2.0.2.tgz#6fcbda99483a8fd15d7d30a196ca69d688a2efdb" @@ -1805,6 +1828,13 @@ debug@^4.0.1: dependencies: ms "^2.1.1" +debug@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== + dependencies: + ms "^2.1.1" + debuglog@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" @@ -1977,6 +2007,11 @@ dot-prop@^4.2.0: dependencies: is-obj "^1.0.0" +dottie@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/dottie/-/dottie-2.0.1.tgz#697ad9d72004db7574d21f892466a3c285893659" + integrity sha512-ch5OQgvGDK2u8pSZeSYAQaV/lczImd7pMJ7BcEPXmnFVjy4yJIzP6CsODJUTH8mg1tyH1Z2abOiuJO3DjZ/GBw== + duplexer@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" @@ -2972,6 +3007,11 @@ indent-string@^3.0.0: resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289" integrity sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok= +inflection@1.12.0: + version "1.12.0" + resolved "https://registry.yarnpkg.com/inflection/-/inflection-1.12.0.tgz#a200935656d6f5f6bc4dc7502e1aecb703228416" + integrity sha1-ogCTVlbW9fa8TcdQLhrstwMihBY= + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -3064,6 +3104,11 @@ is-arrayish@^0.2.1: resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= +is-bluebird@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-bluebird/-/is-bluebird-1.0.2.tgz#096439060f4aa411abee19143a84d6a55346d6e2" + integrity sha1-CWQ5Bg9KpBGr7hkUOoTWpVNG1uI= + is-buffer@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" @@ -4353,6 +4398,18 @@ modify-values@^1.0.0: resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022" integrity sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw== +moment-timezone@^0.5.21: + version "0.5.26" + resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.26.tgz#c0267ca09ae84631aa3dc33f65bedbe6e8e0d772" + integrity sha512-sFP4cgEKTCymBBKgoxZjYzlSovC20Y6J7y3nanDc5RoBIXKlZhoYwBoZGe3flwU6A372AcRwScH8KiwV6zjy1g== + dependencies: + moment ">= 2.9.0" + +"moment@>= 2.9.0", moment@^2.24.0: + version "2.24.0" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b" + integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg== + move-concurrently@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" @@ -5493,6 +5550,13 @@ ret@~0.1.10: resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== +retry-as-promised@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/retry-as-promised/-/retry-as-promised-3.2.0.tgz#769f63d536bec4783549db0777cb56dadd9d8543" + integrity sha512-CybGs60B7oYU/qSQ6kuaFmRd9sTZ6oXSc0toqePvV74Ac6/IFZSI1ReFQmtCN+uvW1Mtqdwpvt/LGOiCBAY2Mg== + dependencies: + any-promise "^1.3.0" + retry@^0.10.0: version "0.10.1" resolved "https://registry.yarnpkg.com/retry/-/retry-0.10.1.tgz#e76388d217992c252750241d3d3956fed98d8ff4" @@ -5574,11 +5638,42 @@ sax@^1.2.4: resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== +semver@^6.1.1: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + semver@~5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" integrity sha1-myzl094C0XxgEq0yaqa00M9U+U8= +sequelize-pool@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/sequelize-pool/-/sequelize-pool-2.3.0.tgz#64f1fe8744228172c474f530604b6133be64993d" + integrity sha512-Ibz08vnXvkZ8LJTiUOxRcj1Ckdn7qafNZ2t59jYHMX1VIebTAOYefWdRYFt6z6+hy52WGthAHAoLc9hvk3onqA== + +sequelize@^5.18.4: + version "5.18.4" + resolved "https://registry.yarnpkg.com/sequelize/-/sequelize-5.18.4.tgz#1e2c7eabe4c554fa257a0115fad39f271bd56150" + integrity sha512-bBmJqpO1H8Z7L0xzITqVo5KHXFI7GmKfGl/5SIPDKsuUMbuZT98s+gyGeaLXpOWGH1ZUO79hvJ8z74vNcxBWHg== + dependencies: + bluebird "^3.5.0" + cls-bluebird "^2.1.0" + debug "^4.1.1" + dottie "^2.0.0" + inflection "1.12.0" + lodash "^4.17.11" + moment "^2.24.0" + moment-timezone "^0.5.21" + retry-as-promised "^3.1.0" + semver "^6.1.1" + sequelize-pool "^2.3.0" + toposort-class "^1.0.1" + uuid "^3.2.1" + validator "^10.11.0" + wkx "^0.4.6" + set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -5621,6 +5716,11 @@ shellwords@^0.1.1: resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww== +shimmer@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" + integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== + signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" @@ -6104,6 +6204,11 @@ to-regex@^3.0.1, to-regex@^3.0.2: regex-not "^1.0.2" safe-regex "^1.1.0" +toposort-class@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/toposort-class/-/toposort-class-1.0.1.tgz#7ffd1f78c8be28c3ba45cd4e1a3f5ee193bd9988" + integrity sha1-f/0feMi+KMO6Rc1OGj9e4ZO9mYg= + tough-cookie@>=2.3.3, tough-cookie@^2.3.4: version "2.5.0" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" @@ -6278,6 +6383,11 @@ uuid@^3.0.1, uuid@^3.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== +uuid@^3.2.1: + version "3.3.3" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.3.tgz#4568f0216e78760ee1dbf3a4d2cf53e224112866" + integrity sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ== + validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.3: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" @@ -6293,6 +6403,11 @@ validate-npm-package-name@^3.0.0: dependencies: builtins "^1.0.3" +validator@^10.11.0: + version "10.11.0" + resolved "https://registry.yarnpkg.com/validator/-/validator-10.11.0.tgz#003108ea6e9a9874d31ccc9e5006856ccd76b228" + integrity sha512-X/p3UZerAIsbBfN/IwahhYaBbY68EN/UQBWHtsbXGT5bfrH/p4NQzUCG1kF/rtKaNpnJ7jAu6NGTdSNtyNIXMw== + verror@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" @@ -6392,6 +6507,13 @@ windows-release@^3.1.0: dependencies: execa "^1.0.0" +wkx@^0.4.6: + version "0.4.8" + resolved "https://registry.yarnpkg.com/wkx/-/wkx-0.4.8.tgz#a092cf088d112683fdc7182fd31493b2c5820003" + integrity sha512-ikPXMM9IR/gy/LwiOSqWlSL3X/J5uk9EO2hHNRXS41eTLXaUFEVw9fn/593jW/tE5tedNg8YjT5HkCa4FqQZyQ== + dependencies: + "@types/node" "*" + wordwrap@~0.0.2: version "0.0.3" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107"