From 6548f5061589c01f1d7039f32124a186e214b499 Mon Sep 17 00:00:00 2001 From: Jonathan Montane Date: Fri, 4 Aug 2017 10:57:36 +0200 Subject: [PATCH 01/18] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4e0b4f2..9c013d2 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ PRs are welcomed! Our sole requirement is that organizations that want to extend API-Flow to support their format write both a parser and a serializer, and not simply a serializer. ## Documentation -You can find more information about the internal structure of API-Flow in [src](https://github.com/luckymarmot/API-Flow/tree/develop/src). We've also created a set of templates to help speed up the extension process: [loader](https://github.com/luckymarmot/API-Flow/tree/develop/src/loaders/template/v1.0), [parser](https://github.com/luckymarmot/API-Flow/tree/develop/src/parsers/template/v1.0/), and [environment](https://github.com/luckymarmot/API-Flow/tree/develop/src/environments/template) +You can find more information about the internal structure of API-Flow in [src](https://github.com/JonathanMontane/API-Flow/tree/develop/src). We've also created a set of templates to help speed up the extension process: [loader](https://github.com/JonathanMontane/API-Flow/tree/develop/src/loaders/template/v1.0), [parser](https://github.com/JonathanMontane/API-Flow/tree/develop/src/parsers/template/v1.0/), and [environment](https://github.com/JonathanMontane/API-Flow/tree/develop/src/environments/template) ## License @@ -104,4 +104,4 @@ Copyright © 2016 Paw Inc. ## Contributors -See [Contributors](https://github.com/luckymarmot/API-Flow/graphs/contributors). +See [Contributors](https://github.com/JonathanMontane/API-Flow/graphs/contributors). From 117f3de5d7993d8fe94d77617729d210372581fe Mon Sep 17 00:00:00 2001 From: JonathanMontane Date: Wed, 16 Aug 2017 10:41:52 +0200 Subject: [PATCH 02/18] fixed a bug where a single slash between two components was removed from paths --- src/parsers/paw/Parser.js | 28 +++++++++++++++++++----- src/parsers/paw/__tests__/Parser.spec.js | 21 +++++++++++++++--- 2 files changed, 41 insertions(+), 8 deletions(-) diff --git a/src/parsers/paw/Parser.js b/src/parsers/paw/Parser.js index 59e75a3..321e05b 100644 --- a/src/parsers/paw/Parser.js +++ b/src/parsers/paw/Parser.js @@ -421,10 +421,25 @@ methods.isPartOfBaseUrl = (defaultUrl, defaultSecureUrl, urlPart) => { return defaultUrl.indexOf(urlPart) >= 0 || defaultSecureUrl.indexOf(urlPart) >= 0 } -// NOTE: we assume that the urlPart is after the protocol -methods.findIntersection = (defaultUrl, urlPart) => { - const match = (defaultUrl + '####' + urlPart).match(/^.*?(.*)####\1(.*)$/) +/** + * finds the intersection between two strings, and returns the intersection, as well as the right- + * most exclusion. This is used to find the overlap between a host url and a part of a url + * associated with that host. + * @param {string} defaultUrl: the default url to test against. + * @param {string} defaultSecureUrl: the default secure url to test against. + * @param {string} urlPart: the part of url to test + * @returns {{ inside: string, outside: string }} + * + * Note: this assumes Paw only supports http and https. + * Note: this may work incorrectly if url is as follow: http://example.com/example.com/ (not tested) + */ +methods.findIntersection = (defaultUrl, defaultSecureUrl, urlPart) => { + let baseUrl = defaultUrl + if (urlPart.match(/^[^:]*s:\/\//)) { + baseUrl = defaultSecureUrl + } + const match = (baseUrl + '####' + urlPart).match(/^.*?(.*)####\1(.*)$/) // always matches return { inside: match[1], outside: match[2] } } @@ -452,7 +467,10 @@ methods.addComponentToBaseOrPath = ( { baseComponents, pathComponents }, { key: urlPart, value: component } ) => { - if (methods.isPartOfBaseUrl(defaultUrl, defaultSecureUrl, urlPart)) { + if ( + pathComponents.length === 0 && + methods.isPartOfBaseUrl(defaultUrl, defaultSecureUrl, urlPart) + ) { // component is member of base url baseComponents.push({ key: urlPart, value: component }) return { baseComponents, pathComponents } @@ -460,7 +478,7 @@ methods.addComponentToBaseOrPath = ( if (pathComponents.length === 0) { // component may be split between base url and path - const { inside, outside } = methods.findIntersection(defaultUrl, urlPart) + const { inside, outside } = methods.findIntersection(defaultUrl, defaultSecureUrl, urlPart) baseComponents.push({ key: inside, value: inside }) pathComponents.push({ key: outside, value: outside }) } diff --git a/src/parsers/paw/__tests__/Parser.spec.js b/src/parsers/paw/__tests__/Parser.spec.js index 0c9479e..a56da6f 100644 --- a/src/parsers/paw/__tests__/Parser.spec.js +++ b/src/parsers/paw/__tests__/Parser.spec.js @@ -595,13 +595,28 @@ describe('parsers/paw/Parser.js', () => { describe('@findIntersection', () => { it('should work', () => { const defaultUrl = 'http://echo.paw.cloud/pets' - const inputs = [ '/pets', '/pets/234', '/234' ] + const defaultSecureUrl = 'https://echo.paw.cloud/pets' + const inputs = [ + '/pets', + '/pets/234', + '/234', + // this one should be outside, because our intersection method tries to place strings so + // that they overlap from the right + 'http://echo.paw.cloud', + 'http://echo.paw.cloud/pets', + 'https://echo.paw.cloud/pets' + ] const expected = [ { inside: '/pets', outside: '' }, { inside: '/pets', outside: '/234' }, - { inside: '', outside: '/234' } + { inside: '', outside: '/234' }, + { inside: '', outside: 'http://echo.paw.cloud' }, + { inside: 'http://echo.paw.cloud/pets', outside: '' }, + { inside: 'https://echo.paw.cloud/pets', outside: '' } ] - const actual = inputs.map(input => __internals__.findIntersection(defaultUrl, input)) + const actual = inputs.map( + input => __internals__.findIntersection(defaultUrl, defaultSecureUrl, input) + ) expect(actual).toEqual(expected) }) }) From f6317415c8448d267d96cbd7b84f6d849cf71725 Mon Sep 17 00:00:00 2001 From: JonathanMontane Date: Sun, 20 Aug 2017 11:21:31 +0200 Subject: [PATCH 03/18] added support for custom headers for api key auths --- .gitignore | 1 + src/serializers/paw/Serializer.js | 21 ++++++++++------ .../paw/__tests__/Serializer.spec.js | 25 +++++++++++++++---- 3 files changed, 35 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index c07f7e1..0859556 100644 --- a/.gitignore +++ b/.gitignore @@ -56,3 +56,4 @@ lib/ .DS_Store deploy-script.sh coverage/ +.nyc_output/ diff --git a/src/serializers/paw/Serializer.js b/src/serializers/paw/Serializer.js index 23297a1..a5f0ff1 100644 --- a/src/serializers/paw/Serializer.js +++ b/src/serializers/paw/Serializer.js @@ -442,7 +442,7 @@ methods.convertAuthIntoDynamicValue = (auth) => { * @param {Environment} environment: the environment in which this auth value is applicable. * @param {Auth} auth: the auth to add to the domain * @param {string} key: the name of the auth - * @returns {EnvironmentVariable} the newly created environment variable. + * @returns {{ variable: EnvironmentVariable, auth: Auth }} the newly created environment variable. */ methods.addAuthToDomain = (domain, environment, auth, key) => { const variable = domain.createEnvironmentVariable(key) @@ -450,7 +450,7 @@ methods.addAuthToDomain = (domain, environment, auth, key) => { const ds = methods.wrapDV(dv) variable.setValue(ds, environment) - return variable + return { variable, auth } } /** @@ -1041,7 +1041,7 @@ methods.convertAuthFromReference = (store, reference) => { * converts a reference or an auth into a DynamicString Entry. * @param {Store} store: the store used to resolve references * @param {Auth|Reference} authOrReference: the record to convert into a DynamicString - * @returns {DynamicString} the corresponding DynamicString + * @returns {{ variable: DynamicString, auth: Auth }} the corresponding DynamicString */ methods.convertReferenceOrAuthToDsEntry = (store, authOrReference) => { if (authOrReference instanceof Reference) { @@ -1049,18 +1049,25 @@ methods.convertReferenceOrAuthToDsEntry = (store, authOrReference) => { } const dv = methods.convertAuthIntoDynamicValue(authOrReference) - return methods.wrapDV(dv) + return { variable: methods.wrapDV(dv), auth: authOrReference } } // TODO create Variable DS that has enum with all auth possible /** * sets the Auth DynamicString as am Authorization Header. * @param {PawRequest} pawRequest: the paw request to update - * @param {DynamicString} auth: the DynamicString representing an auth + * @param {Objecti} authData: the object containing the auth representation as a DynamicString and + * the original auth Record. + * @param {DynamicString} variable: the DynamicString representing an auth + * @param {Auth} auth: the original auth * @returns {PawRequest} the update paw request */ -methods.addAuthToRequest = (pawRequest, auth) => { - pawRequest.setHeader('Authorization', auth) +methods.addAuthToRequest = (pawRequest, { variable, auth }) => { + let authName = 'Authorization' + if (auth instanceof Auth.ApiKey) { + authName = auth.get('name') + } + pawRequest.setHeader(authName, variable) return pawRequest } diff --git a/src/serializers/paw/__tests__/Serializer.spec.js b/src/serializers/paw/__tests__/Serializer.spec.js index ccd6baf..1eb1c31 100644 --- a/src/serializers/paw/__tests__/Serializer.spec.js +++ b/src/serializers/paw/__tests__/Serializer.spec.js @@ -746,7 +746,7 @@ describe('serializers/paw/Serializer.js', () => { spyOn(__internals__, 'convertAuthIntoDynamicValue').andReturn(123) spyOn(__internals__, 'wrapDV').andReturn('123') - const expected = variable + const expected = { variable, auth } const actual = __internals__.addAuthToDomain(domain, environment, auth, key) expect(domain.createEnvironmentVariable).toHaveBeenCalledWith(key) @@ -2040,7 +2040,7 @@ describe('serializers/paw/Serializer.js', () => { const store = new Store() const auth = new Auth.Basic() - const expected = '123' + const expected = { variable: '123', auth } const actual = __internals__.convertReferenceOrAuthToDsEntry(store, auth) expect(actual).toEqual(expected) @@ -2051,12 +2051,27 @@ describe('serializers/paw/Serializer.js', () => { it('should work', () => { const pawReq = { setHeader: () => {} } spyOn(pawReq, 'setHeader').andReturn(123) - const auth = 'some dynamic string' + const authData = { variable: 'some dynamic string', auth: new Auth.Basic() } + + const expected = pawReq + const actual = __internals__.addAuthToRequest(pawReq, authData) + + expect(pawReq.setHeader).toHaveBeenCalledWith('Authorization', authData.variable) + expect(actual).toEqual(expected) + }) + + it('should work with ApiKeys custom headers', () => { + const pawReq = { setHeader: () => {} } + spyOn(pawReq, 'setHeader').andReturn(123) + const authData = { + variable: 'some dynamic string', + auth: new Auth.ApiKey({ name: 'X-Auth-Token' }) + } const expected = pawReq - const actual = __internals__.addAuthToRequest(pawReq, auth) + const actual = __internals__.addAuthToRequest(pawReq, authData) - expect(pawReq.setHeader).toHaveBeenCalledWith('Authorization', auth) + expect(pawReq.setHeader).toHaveBeenCalledWith('X-Auth-Token', authData.variable) expect(actual).toEqual(expected) }) }) From ada2adbae3affb8f3b870c052a15717dea76651a Mon Sep 17 00:00:00 2001 From: JonathanMontane Date: Thu, 14 Sep 2017 10:49:15 +0200 Subject: [PATCH 04/18] fixed pathname bug for very weird urls --- src/parsers/postman/v2.0/Parser.js | 2 +- .../postman/v2.0/__tests__/Parser.spec.js | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/parsers/postman/v2.0/Parser.js b/src/parsers/postman/v2.0/Parser.js index 52b8980..401546f 100644 --- a/src/parsers/postman/v2.0/Parser.js +++ b/src/parsers/postman/v2.0/Parser.js @@ -478,7 +478,7 @@ methods.addHostEntryToHostMap = (hostMap, { key, value }) => { const hostname = key.get('hostname') ? key.get('hostname').generate(List([ '{{', '}}' ])) : '' const port = key.get('port') ? ':' + key.get('port').generate(List([ '{{', '}}' ])) : '' const host = hostname + port - const pathname = key.get('pathname').generate(List([ '{{', '}}' ])) + const pathname = key.get('pathname') ? key.get('pathname').generate(List([ '{{', '}}' ])) : '' if (!hostMap[host]) { hostMap[host] = { entries: [], lcPathname: pathname.split('/') } diff --git a/src/parsers/postman/v2.0/__tests__/Parser.spec.js b/src/parsers/postman/v2.0/__tests__/Parser.spec.js index dd36787..b2cb0c1 100644 --- a/src/parsers/postman/v2.0/__tests__/Parser.spec.js +++ b/src/parsers/postman/v2.0/__tests__/Parser.spec.js @@ -960,6 +960,13 @@ describe('parsers/postman/v2.0/Parser.js', () => { variableDelimiters: List([ '{{', '}}', ':' ]) }), value: 321 + }, + { + key: new URL({ + url: 'staging.paw.cloud', + variableDelimiters: List([ '{{', '}}', ':' ]) + }), + value: 123 } ] const expected = { @@ -1017,6 +1024,18 @@ describe('parsers/postman/v2.0/Parser.js', () => { } ], lcPathname: [ '', 'users', '321' ] + }, + 'staging.paw.cloud': { + entries: [ + { + key: new URL({ + url: 'staging.paw.cloud', + variableDelimiters: List([ '{{', '}}', ':' ]) + }), + value: 123 + } + ], + lcPathname: [ '' ] } } From ea91a4709e67cd10adf21acb2e1f7a60572ea757 Mon Sep 17 00:00:00 2001 From: Jonathan Montane Date: Thu, 28 Sep 2017 07:53:11 +0200 Subject: [PATCH 05/18] Fixed wrong folder for webworker output --- configs/webworker/webpack.config.babel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/webworker/webpack.config.babel.js b/configs/webworker/webpack.config.babel.js index f47ef76..df6072b 100644 --- a/configs/webworker/webpack.config.babel.js +++ b/configs/webworker/webpack.config.babel.js @@ -4,7 +4,7 @@ const config = { target: 'webworker', entry: path.resolve(__dirname, './api-flow.js'), output: { - path: path.resolve(__dirname, '../../../dist/node/'), + path: path.resolve(__dirname, '../../../dist/webworker/'), filename: 'api-flow.js', libraryTarget: 'umd' }, From 3df668055db70d693a5e5b2f7a1ba6a6ddfe2a66 Mon Sep 17 00:00:00 2001 From: JonathanMontane Date: Thu, 5 Oct 2017 23:40:15 +0200 Subject: [PATCH 06/18] fixed missing postman loader, parser, and serializers from configs --- configs/node/api-flow-config.js | 12 +++++++++--- configs/web/api-flow-config.js | 12 +++++++++--- configs/webworker/api-flow-config.js | 12 +++++++++--- src/serializers/postman/v2.0/Serializer.js | 2 +- 4 files changed, 28 insertions(+), 10 deletions(-) diff --git a/configs/node/api-flow-config.js b/configs/node/api-flow-config.js index 97b2d80..f6cad0f 100644 --- a/configs/node/api-flow-config.js +++ b/configs/node/api-flow-config.js @@ -2,28 +2,34 @@ import Environment from '../../src/environments/node/Environment' import SwaggerLoader from '../../src/loaders/swagger/Loader' import RAMLLoader from '../../src/loaders/raml/Loader' +import PostmanV2Loader from '../../src/loaders/postman/v2.0/Loader' import SwaggerV2Parser from '../../src/parsers/swagger/v2.0/Parser' import RAMLV1Parser from '../../src/parsers/raml/v1.0/Parser' +import PostmanV2Parser from '../../src/loaders/postman/v2.0/Parser' import SwaggerV2Serializer from '../../src/serializers/swagger/v2.0/Serializer' import RAMLV1Serializer from '../../src/serializers/raml/v1.0/Serializer' +import PostmanV2Serializer from '../../src/serializers/postman/v2.0/Serializer' import InternalSerializer from '../../src/serializers/internal/Serializer' export const loaders = [ SwaggerLoader, - RAMLLoader + RAMLLoader, + PostmanV2Loader ] export const parsers = [ SwaggerV2Parser, - RAMLV1Parser + RAMLV1Parser, + PostmanV2Parser ] export const serializers = [ SwaggerV2Serializer, RAMLV1Serializer, - InternalSerializer + InternalSerializer, + PostmanV2Serializer ] export const environment = Environment diff --git a/configs/web/api-flow-config.js b/configs/web/api-flow-config.js index 81aa211..12e25e9 100644 --- a/configs/web/api-flow-config.js +++ b/configs/web/api-flow-config.js @@ -2,28 +2,34 @@ import Environment from '../../src/environments/web/Environment' import SwaggerLoader from '../../src/loaders/swagger/Loader' import RAMLLoader from '../../src/loaders/raml/Loader' +import PostmanV2Loader from '../../src/loaders/postman/v2.0/Loader' import SwaggerV2Parser from '../../src/parsers/swagger/v2.0/Parser' import RAMLV1Parser from '../../src/parsers/raml/v1.0/Parser' +import PostmanV2Parser from '../../src/loaders/postman/v2.0/Parser' import SwaggerV2Serializer from '../../src/serializers/swagger/v2.0/Serializer' import RAMLV1Serializer from '../../src/serializers/raml/v1.0/Serializer' +import PostmanV2Serializer from '../../src/serializers/postman/v2.0/Serializer' import InternalSerializer from '../../src/serializers/internal/Serializer' export const loaders = [ SwaggerLoader, - RAMLLoader + RAMLLoader, + PostmanV2Loader ] export const parsers = [ SwaggerV2Parser, - RAMLV1Parser + RAMLV1Parser, + PostmanV2Parser ] export const serializers = [ SwaggerV2Serializer, RAMLV1Serializer, - InternalSerializer + InternalSerializer, + PostmanV2Serializer ] export const environment = Environment diff --git a/configs/webworker/api-flow-config.js b/configs/webworker/api-flow-config.js index 81aa211..12e25e9 100644 --- a/configs/webworker/api-flow-config.js +++ b/configs/webworker/api-flow-config.js @@ -2,28 +2,34 @@ import Environment from '../../src/environments/web/Environment' import SwaggerLoader from '../../src/loaders/swagger/Loader' import RAMLLoader from '../../src/loaders/raml/Loader' +import PostmanV2Loader from '../../src/loaders/postman/v2.0/Loader' import SwaggerV2Parser from '../../src/parsers/swagger/v2.0/Parser' import RAMLV1Parser from '../../src/parsers/raml/v1.0/Parser' +import PostmanV2Parser from '../../src/loaders/postman/v2.0/Parser' import SwaggerV2Serializer from '../../src/serializers/swagger/v2.0/Serializer' import RAMLV1Serializer from '../../src/serializers/raml/v1.0/Serializer' +import PostmanV2Serializer from '../../src/serializers/postman/v2.0/Serializer' import InternalSerializer from '../../src/serializers/internal/Serializer' export const loaders = [ SwaggerLoader, - RAMLLoader + RAMLLoader, + PostmanV2Loader ] export const parsers = [ SwaggerV2Parser, - RAMLV1Parser + RAMLV1Parser, + PostmanV2Parser ] export const serializers = [ SwaggerV2Serializer, RAMLV1Serializer, - InternalSerializer + InternalSerializer, + PostmanV2Serializer ] export const environment = Environment diff --git a/src/serializers/postman/v2.0/Serializer.js b/src/serializers/postman/v2.0/Serializer.js index 1920695..70f68f1 100644 --- a/src/serializers/postman/v2.0/Serializer.js +++ b/src/serializers/postman/v2.0/Serializer.js @@ -35,7 +35,7 @@ import Auth from '../../../models/Auth' import { convertEntryListInMap } from '../../../utils/fp-utils' const __meta__ = { - format: 'postman', + format: 'postman-collection', version: 'v2.0' } From 3ef1dca03a066522449e5299bbd6f37e738a40ec Mon Sep 17 00:00:00 2001 From: JonathanMontane Date: Thu, 5 Oct 2017 23:56:42 +0200 Subject: [PATCH 07/18] loaders now defaults to fsResolution instead of httpResolution --- src/loaders/internal/Loader.js | 7 ++++--- src/loaders/postman/v2.0/Loader.js | 6 +++--- src/loaders/swagger/Loader.js | 7 ++++--- src/loaders/template/v1.0/Loader.js | 6 +++--- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/loaders/internal/Loader.js b/src/loaders/internal/Loader.js index efdf747..cabd751 100644 --- a/src/loaders/internal/Loader.js +++ b/src/loaders/internal/Loader.js @@ -70,11 +70,12 @@ methods.parseJSON = (str) => { methods.resolve = (options, uri, { $ref = '' } = {}) => { const uriToLoad = resolve(uri, $ref) - if (parse(uriToLoad).protocol === 'file:') { - return options.fsResolver.resolve(uriToLoad.split('#')[0]) + const protocol = parse(uriToLoad).protocol + if (protocol && protocol.substr(0,4) === 'http') { + return options.httpResolver.resolve(uriToLoad.split('#')[0]) } - return options.httpResolver.resolve(uriToLoad.split('#')[0]) + return options.fsResolver.resolve(uriToLoad.split('#')[0]) } diff --git a/src/loaders/postman/v2.0/Loader.js b/src/loaders/postman/v2.0/Loader.js index 237398d..8865593 100644 --- a/src/loaders/postman/v2.0/Loader.js +++ b/src/loaders/postman/v2.0/Loader.js @@ -87,11 +87,11 @@ methods.isParsable = (content) => { methods.resolve = (options, uri, { $ref = '' } = {}) => { const uriToLoad = resolve(uri, $ref) const protocol = parse(uriToLoad).protocol - if (protocol === 'file:' || protocol === 'file') { - return options.fsResolver.resolve(uriToLoad.split('#')[0]) + if (protocol && protocol.substr(0,4) === 'http') { + return options.httpResolver.resolve(uriToLoad.split('#')[0]) } - return options.httpResolver.resolve(uriToLoad.split('#')[0]) + return options.fsResolver.resolve(uriToLoad.split('#')[0]) } methods.normalizeRequestItem = (item) => { diff --git a/src/loaders/swagger/Loader.js b/src/loaders/swagger/Loader.js index ff66f33..0bfd644 100644 --- a/src/loaders/swagger/Loader.js +++ b/src/loaders/swagger/Loader.js @@ -122,11 +122,12 @@ methods.traverse = (content, { $ref = '#/' } = {}) => { methods.resolve = (options, uri, { $ref = '' } = {}) => { const uriToLoad = resolve(uri, $ref) - if (parse(uriToLoad).protocol === 'file:') { - return options.fsResolver.resolve(uriToLoad.split('#')[0]) + const protocol = parse(uriToLoad).protocol + if (protocol && protocol.substr(0,4) === 'http') { + return options.httpResolver.resolve(uriToLoad.split('#')[0]) } - return options.httpResolver.resolve(uriToLoad.split('#')[0]) + return options.fsResolver.resolve(uriToLoad.split('#')[0]) } methods.objectMap = (obj, func) => { diff --git a/src/loaders/template/v1.0/Loader.js b/src/loaders/template/v1.0/Loader.js index 1509f5d..4846aa6 100644 --- a/src/loaders/template/v1.0/Loader.js +++ b/src/loaders/template/v1.0/Loader.js @@ -125,11 +125,11 @@ methods.isParsable = (content) => { methods.resolve = (options, uri, { $ref = '' } = {}) => { const uriToLoad = resolve(uri, $ref) const protocol = parse(uriToLoad).protocol - if (protocol === 'file:' || protocol === 'file' || !protocol) { - return options.fsResolver.resolve(uriToLoad.split('#')[0]) + if (protocol && protocol.substr(0,4) === 'http') { + return options.httpResolver.resolve(uriToLoad.split('#')[0]) } - return options.httpResolver.resolve(uriToLoad.split('#')[0]) + return options.fsResolver.resolve(uriToLoad.split('#')[0]) } /** From aba4a50c659d1486e71d8f43088038263edc08fa Mon Sep 17 00:00:00 2001 From: JonathanMontane Date: Fri, 6 Oct 2017 00:06:58 +0200 Subject: [PATCH 08/18] linting --- src/loaders/internal/Loader.js | 2 +- src/loaders/postman/v2.0/Loader.js | 2 +- src/loaders/swagger/Loader.js | 2 +- src/loaders/template/v1.0/Loader.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/loaders/internal/Loader.js b/src/loaders/internal/Loader.js index cabd751..c4e033c 100644 --- a/src/loaders/internal/Loader.js +++ b/src/loaders/internal/Loader.js @@ -71,7 +71,7 @@ methods.parseJSON = (str) => { methods.resolve = (options, uri, { $ref = '' } = {}) => { const uriToLoad = resolve(uri, $ref) const protocol = parse(uriToLoad).protocol - if (protocol && protocol.substr(0,4) === 'http') { + if (protocol && protocol.substr(0, 4) === 'http') { return options.httpResolver.resolve(uriToLoad.split('#')[0]) } diff --git a/src/loaders/postman/v2.0/Loader.js b/src/loaders/postman/v2.0/Loader.js index 8865593..96f8481 100644 --- a/src/loaders/postman/v2.0/Loader.js +++ b/src/loaders/postman/v2.0/Loader.js @@ -87,7 +87,7 @@ methods.isParsable = (content) => { methods.resolve = (options, uri, { $ref = '' } = {}) => { const uriToLoad = resolve(uri, $ref) const protocol = parse(uriToLoad).protocol - if (protocol && protocol.substr(0,4) === 'http') { + if (protocol && protocol.substr(0, 4) === 'http') { return options.httpResolver.resolve(uriToLoad.split('#')[0]) } diff --git a/src/loaders/swagger/Loader.js b/src/loaders/swagger/Loader.js index 0bfd644..159e516 100644 --- a/src/loaders/swagger/Loader.js +++ b/src/loaders/swagger/Loader.js @@ -123,7 +123,7 @@ methods.traverse = (content, { $ref = '#/' } = {}) => { methods.resolve = (options, uri, { $ref = '' } = {}) => { const uriToLoad = resolve(uri, $ref) const protocol = parse(uriToLoad).protocol - if (protocol && protocol.substr(0,4) === 'http') { + if (protocol && protocol.substr(0, 4) === 'http') { return options.httpResolver.resolve(uriToLoad.split('#')[0]) } diff --git a/src/loaders/template/v1.0/Loader.js b/src/loaders/template/v1.0/Loader.js index 4846aa6..7ca25c7 100644 --- a/src/loaders/template/v1.0/Loader.js +++ b/src/loaders/template/v1.0/Loader.js @@ -125,7 +125,7 @@ methods.isParsable = (content) => { methods.resolve = (options, uri, { $ref = '' } = {}) => { const uriToLoad = resolve(uri, $ref) const protocol = parse(uriToLoad).protocol - if (protocol && protocol.substr(0,4) === 'http') { + if (protocol && protocol.substr(0, 4) === 'http') { return options.httpResolver.resolve(uriToLoad.split('#')[0]) } From 905b69f33f9ac43f6b03641ea001ed42b9da799b Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Tue, 10 Oct 2017 14:21:33 -0400 Subject: [PATCH 09/18] Postman Collection loaders, serializers and parsers Still not entirely working but its closer --- configs/node/api-flow-config.js | 12 ++++++------ configs/web/api-flow-config.js | 12 ++++++------ configs/webworker/api-flow-config.js | 12 ++++++------ src/api-flow-config.js | 4 ++-- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/configs/node/api-flow-config.js b/configs/node/api-flow-config.js index f6cad0f..66b58de 100644 --- a/configs/node/api-flow-config.js +++ b/configs/node/api-flow-config.js @@ -2,34 +2,34 @@ import Environment from '../../src/environments/node/Environment' import SwaggerLoader from '../../src/loaders/swagger/Loader' import RAMLLoader from '../../src/loaders/raml/Loader' -import PostmanV2Loader from '../../src/loaders/postman/v2.0/Loader' +import PostmanCollectionV2Loader from '../../src/loaders/postman/v2.0/Loader' import SwaggerV2Parser from '../../src/parsers/swagger/v2.0/Parser' import RAMLV1Parser from '../../src/parsers/raml/v1.0/Parser' -import PostmanV2Parser from '../../src/loaders/postman/v2.0/Parser' +import PostmanCollectionV2Parser from '../../src/parsers/postman/v2.0/Parser' import SwaggerV2Serializer from '../../src/serializers/swagger/v2.0/Serializer' import RAMLV1Serializer from '../../src/serializers/raml/v1.0/Serializer' -import PostmanV2Serializer from '../../src/serializers/postman/v2.0/Serializer' +import PostmanCollectionV2Serializer from '../../src/serializers/postman/v2.0/Serializer' import InternalSerializer from '../../src/serializers/internal/Serializer' export const loaders = [ SwaggerLoader, RAMLLoader, - PostmanV2Loader + PostmanCollectionV2Loader ] export const parsers = [ SwaggerV2Parser, RAMLV1Parser, - PostmanV2Parser + PostmanCollectionV2Parser ] export const serializers = [ SwaggerV2Serializer, RAMLV1Serializer, InternalSerializer, - PostmanV2Serializer + PostmanCollectionV2Serializer ] export const environment = Environment diff --git a/configs/web/api-flow-config.js b/configs/web/api-flow-config.js index 12e25e9..25a0ace 100644 --- a/configs/web/api-flow-config.js +++ b/configs/web/api-flow-config.js @@ -2,34 +2,34 @@ import Environment from '../../src/environments/web/Environment' import SwaggerLoader from '../../src/loaders/swagger/Loader' import RAMLLoader from '../../src/loaders/raml/Loader' -import PostmanV2Loader from '../../src/loaders/postman/v2.0/Loader' +import PostmanCollectionV2Loader from '../../src/loaders/postman/v2.0/Loader' import SwaggerV2Parser from '../../src/parsers/swagger/v2.0/Parser' import RAMLV1Parser from '../../src/parsers/raml/v1.0/Parser' -import PostmanV2Parser from '../../src/loaders/postman/v2.0/Parser' +import PostmanCollectionV2Parser from '../../src/parsers/postman/v2.0/Parser' import SwaggerV2Serializer from '../../src/serializers/swagger/v2.0/Serializer' import RAMLV1Serializer from '../../src/serializers/raml/v1.0/Serializer' -import PostmanV2Serializer from '../../src/serializers/postman/v2.0/Serializer' +import PostmanCollectionV2Serializer from '../../src/serializers/postman/v2.0/Serializer' import InternalSerializer from '../../src/serializers/internal/Serializer' export const loaders = [ SwaggerLoader, RAMLLoader, - PostmanV2Loader + PostmanCollectionV2Loader ] export const parsers = [ SwaggerV2Parser, RAMLV1Parser, - PostmanV2Parser + PostmanCollectionV2Parser ] export const serializers = [ SwaggerV2Serializer, RAMLV1Serializer, InternalSerializer, - PostmanV2Serializer + PostmanCollectionV2Serializer ] export const environment = Environment diff --git a/configs/webworker/api-flow-config.js b/configs/webworker/api-flow-config.js index 12e25e9..25a0ace 100644 --- a/configs/webworker/api-flow-config.js +++ b/configs/webworker/api-flow-config.js @@ -2,34 +2,34 @@ import Environment from '../../src/environments/web/Environment' import SwaggerLoader from '../../src/loaders/swagger/Loader' import RAMLLoader from '../../src/loaders/raml/Loader' -import PostmanV2Loader from '../../src/loaders/postman/v2.0/Loader' +import PostmanCollectionV2Loader from '../../src/loaders/postman/v2.0/Loader' import SwaggerV2Parser from '../../src/parsers/swagger/v2.0/Parser' import RAMLV1Parser from '../../src/parsers/raml/v1.0/Parser' -import PostmanV2Parser from '../../src/loaders/postman/v2.0/Parser' +import PostmanCollectionV2Parser from '../../src/parsers/postman/v2.0/Parser' import SwaggerV2Serializer from '../../src/serializers/swagger/v2.0/Serializer' import RAMLV1Serializer from '../../src/serializers/raml/v1.0/Serializer' -import PostmanV2Serializer from '../../src/serializers/postman/v2.0/Serializer' +import PostmanCollectionV2Serializer from '../../src/serializers/postman/v2.0/Serializer' import InternalSerializer from '../../src/serializers/internal/Serializer' export const loaders = [ SwaggerLoader, RAMLLoader, - PostmanV2Loader + PostmanCollectionV2Loader ] export const parsers = [ SwaggerV2Parser, RAMLV1Parser, - PostmanV2Parser + PostmanCollectionV2Parser ] export const serializers = [ SwaggerV2Serializer, RAMLV1Serializer, InternalSerializer, - PostmanV2Serializer + PostmanCollectionV2Serializer ] export const environment = Environment diff --git a/src/api-flow-config.js b/src/api-flow-config.js index f7500aa..5d7b0ce 100644 --- a/src/api-flow-config.js +++ b/src/api-flow-config.js @@ -13,7 +13,7 @@ import PostmanCollectionV2Parser from './parsers/postman/v2.0/Parser' import SwaggerV2Serializer from './serializers/swagger/v2.0/Serializer' import RAMLV1Serializer from './serializers/raml/v1.0/Serializer' import InternalSerializer from './serializers/internal/Serializer' -import PostmanV2Serializer from './serializers/postman/v2.0/Serializer' +import PostmanCollectionV2Serializer from './serializers/postman/v2.0/Serializer' import ApiBlueprint1ASerializer from './serializers/api-blueprint/1A/Serializer' export const loaders = [ @@ -34,7 +34,7 @@ export const serializers = [ SwaggerV2Serializer, RAMLV1Serializer, InternalSerializer, - PostmanV2Serializer, + PostmanCollectionV2Serializer, ApiBlueprint1ASerializer ] From 1b8beb2b5e33c5447df81967660b07f34b9e558a Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Sat, 26 Aug 2017 08:30:59 +0100 Subject: [PATCH 10/18] Fixed the installation instructions The README talked a bit too much about Paw, which is not what this library is going to be used for by the community at large. It also focused on compile instructions over recommending npm/yarn installation. ALSO the compile instructions were invalid, and talked about make install (doesnt exist!). --- README.md | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 4e0b4f2..8b45947 100644 --- a/README.md +++ b/README.md @@ -21,43 +21,52 @@ We intend to support: - and many more. ## Installation -### from a cloned repository -just run +You can install this library in two different ways. + + +### Install via NPM/Yarn + +```shell +$ yarn add api-flow +# or +$ npm install api-flow +``` + +### Install from source + +Just run: ```sh git clone https://github.com/luckymarmot/API-Flow.git cd API-Flow -make install +yarn install +make ``` -This will install the node module dependencies - -## Building the different libraries -### node, web, and webworker - -run the following command to build API-Flow for the different environments that you need +This will install the node module dependencies, but you will need to build API-Flow for the different [environments](src/environments) that you need: ```sh # use TARGET="node" if you only want the node library make runners TARGET="node web webworker" ``` -### Paw - -You can use the following command to add the different extensions to Paw +You can use the following command to compile different extensions. ```sh # use TARGET="swagger" if you only want the swagger bindings make transfer TARGET="swagger raml1 postman2" ``` -## Using the npm module -### as a standard library +## Usage + +### Standard Library ```js -const ApiFlow = require('api-flow'); // if from npm -const ApiFlow = require('./dist/node/api-flow.js'); // if from `make runners TARGET="node"` +const ApiFlow = require('api-flow').default; // if from yarn/npm +const ApiFlow = require('./dist/node/api-flow.js').default; // if from `make runners TARGET="node"` + +const path = require('path'); const options = { source: { From e0eaf63b30ef94cc9144f054d8f9d5af208af3bf Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Tue, 5 Dec 2017 12:56:52 -0500 Subject: [PATCH 11/18] Created a clear TODO for anyone looking Linked to issues where they exist, and removed CLI usage (as it does not exist). --- README.md | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 8b45947..3a370af 100644 --- a/README.md +++ b/README.md @@ -4,20 +4,23 @@ A flow written in ES6 using Immutable to convert between API description formats (Swagger, etc.) and other programs such as cURL command lines. -## What formats are supported and what will be in the future +## Format Support + We currently support: -- `Swagger v2.0 (in/out)` -- `RAML v1.0 (in/out)` -- `Postman Collection v2.0 (in/out)` -- `Paw v3.1 (in/out)` + +- Swagger v2.0 (in/out) +- RAML v1.0 (in/out) +- Postman Collection v2.0 (in/out) +- Paw v3.1 (in/out) We intend to support: -- `Swagger v3.0` -- `RAML v0.8` -- `Postman Collection v1.0` -- `Postman Dump v1.0` -- `Insomnia v3.0` -- `Api-Blueprint` + +- Swagger v3.0 +- RAML v0.8 +- Postman Collection v1.0 +- Postman Dump v1.0 +- Insomnia v3.0 +- API Blueprint - and many more. ## Installation @@ -89,11 +92,6 @@ promise.then((data) => { }) ``` -### Using as a CLI (coming soon) -```sh -node ./bin/api-flow.js some_swagger.json -f swagger -t raml > converted.yml -``` - ### User Interface API-Flow is one of the main components of [Console.REST](https://github.com/luckymarmot/console-rest). If you're an API user, you can easily use [https://console.rest/](https://console.rest/) to convert API description files. If you're an API provider, you can add a button to your API docs to let your users open and play with your API in client apps including Paw or Postman. From 0cca354a329eeea1b21ea5f02f3294247078f3e8 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Thu, 30 Nov 2017 12:49:10 -0500 Subject: [PATCH 12/18] Hunting through travis.yml isnt ideal --- CONTRIBUTING.md | 14 ++++++++++++++ README.md | 4 +++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..59ab549 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,14 @@ +PRs are always welcome, and we'll be happy to merge them if the test suite passes. + +To run the entire test suite would take a long time, so we've broken it down into various groups: + +``` shell +TEST_TARGET=lint make test +TEST_TARGET=unit make test +TEST_TARGET=e2e make test +TEST_TARGET=cov make test +``` + +All of these will be run by Travis, but you could save the ice caps from melting a little by running at least `unit` and `e2e` before you push. + +Our sole requirement is that organizations that want to extend API-Flow to support their format write both a parser and a serializer, and not simply a serializer. diff --git a/README.md b/README.md index 4e0b4f2..cbe9e28 100644 --- a/README.md +++ b/README.md @@ -91,10 +91,12 @@ API-Flow is one of the main components of [Console.REST](https://github.com/luck ## Contributing -PRs are welcomed! +Read [CONTRIBUTING.md](CONTRIBUTING.md) for more tips on testing and contributing. + Our sole requirement is that organizations that want to extend API-Flow to support their format write both a parser and a serializer, and not simply a serializer. ## Documentation + You can find more information about the internal structure of API-Flow in [src](https://github.com/luckymarmot/API-Flow/tree/develop/src). We've also created a set of templates to help speed up the extension process: [loader](https://github.com/luckymarmot/API-Flow/tree/develop/src/loaders/template/v1.0), [parser](https://github.com/luckymarmot/API-Flow/tree/develop/src/parsers/template/v1.0/), and [environment](https://github.com/luckymarmot/API-Flow/tree/develop/src/environments/template) ## License From 4cd8c6a5b55412253031d080a53d22babecc713c Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Tue, 5 Dec 2017 13:16:40 -0500 Subject: [PATCH 13/18] Local links work well for GitHub READMEs A few forks were updating these links and causing conflicts, so lets just use local links :D --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cbe9e28..a71bca8 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ Our sole requirement is that organizations that want to extend API-Flow to suppo ## Documentation -You can find more information about the internal structure of API-Flow in [src](https://github.com/luckymarmot/API-Flow/tree/develop/src). We've also created a set of templates to help speed up the extension process: [loader](https://github.com/luckymarmot/API-Flow/tree/develop/src/loaders/template/v1.0), [parser](https://github.com/luckymarmot/API-Flow/tree/develop/src/parsers/template/v1.0/), and [environment](https://github.com/luckymarmot/API-Flow/tree/develop/src/environments/template) +You can find more information about the internal structure of API-Flow in [src](src). We've also created a set of templates to help speed up the extension process: [loader](src/loaders/template/v1.0), [parser](src/parsers/template/v1.0/), and [environment](src/environments/template) ## License From 833f96c0d5a91e7394945ef16635b0c3da6f4fd9 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Wed, 6 Dec 2017 16:07:06 -0500 Subject: [PATCH 14/18] For some reason the tests still pass --- testing/e2e/internal-postman2/test-case-0/output.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/e2e/internal-postman2/test-case-0/output.json b/testing/e2e/internal-postman2/test-case-0/output.json index 91c1177..8759556 100644 --- a/testing/e2e/internal-postman2/test-case-0/output.json +++ b/testing/e2e/internal-postman2/test-case-0/output.json @@ -170,7 +170,7 @@ "header": [ { "key": "api_key", - "value": null + "value": "" }, { "key": "Content-Type", @@ -362,4 +362,4 @@ "name": "Content-Type" } ] -} \ No newline at end of file +} From 13576bbac0cb784dce0fbc843bf01370dab5b6b7 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Wed, 6 Dec 2017 16:11:39 -0500 Subject: [PATCH 15/18] Never make a header with value: null Empty string is valid, null is invalid. --- src/serializers/postman/v2.0/Serializer.js | 2 +- src/serializers/postman/v2.0/__tests__/Serializer.spec.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/serializers/postman/v2.0/Serializer.js b/src/serializers/postman/v2.0/Serializer.js index 1920695..812e59b 100644 --- a/src/serializers/postman/v2.0/Serializer.js +++ b/src/serializers/postman/v2.0/Serializer.js @@ -620,7 +620,7 @@ methods.createHeaderFromParameter = (param) => { return { key, value: schema.enum[0] } } - return { key, value: null } + return { key, value: '' } } /** diff --git a/src/serializers/postman/v2.0/__tests__/Serializer.spec.js b/src/serializers/postman/v2.0/__tests__/Serializer.spec.js index 94ffeb4..711d41e 100644 --- a/src/serializers/postman/v2.0/__tests__/Serializer.spec.js +++ b/src/serializers/postman/v2.0/__tests__/Serializer.spec.js @@ -844,7 +844,7 @@ describe('serializers/swagger/v2.0/Serializer.js', () => { ] const expected = [ null, - { key: 123, value: null }, + { key: 123, value: '' }, { key: 234, value: 'abc' }, { key: 345, value: 'def' } ] From 6b5d75d5ea16f363fb1bc54fa7152f18075f8ddf Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Wed, 6 Dec 2017 17:01:44 -0500 Subject: [PATCH 16/18] Just be inconsistent like before --- configs/node/api-flow-config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/node/api-flow-config.js b/configs/node/api-flow-config.js index e575fc1..66b58de 100644 --- a/configs/node/api-flow-config.js +++ b/configs/node/api-flow-config.js @@ -1,7 +1,7 @@ import Environment from '../../src/environments/node/Environment' import SwaggerLoader from '../../src/loaders/swagger/Loader' -import RAMLV1Loader from '../../src/loaders/raml/Loader' +import RAMLLoader from '../../src/loaders/raml/Loader' import PostmanCollectionV2Loader from '../../src/loaders/postman/v2.0/Loader' import SwaggerV2Parser from '../../src/parsers/swagger/v2.0/Parser' From a2c79efbf7bf40395bd84281d1ec05597b9203ea Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Mon, 11 Dec 2017 17:18:20 -0500 Subject: [PATCH 17/18] Support example and x-example in Swagger Properties --- src/parsers/swagger/v2.0/Parser.js | 6 ++ .../swagger/v2.0/__tests__/Parser.spec.js | 70 ++++++++++++++++++- 2 files changed, 74 insertions(+), 2 deletions(-) diff --git a/src/parsers/swagger/v2.0/Parser.js b/src/parsers/swagger/v2.0/Parser.js index a2f9043..5c30291 100644 --- a/src/parsers/swagger/v2.0/Parser.js +++ b/src/parsers/swagger/v2.0/Parser.js @@ -1252,6 +1252,12 @@ methods.convertParameterObjectIntoParameter = (parameterEntry) => { applicableContexts } + if (typeof parameter.example !== 'undefined') { + paramInstance.examples = List([parameter.example]) + } else if (typeof parameter['x-example'] !== 'undefined') { + paramInstance.examples = List([parameter['x-example']]) + } + if (parameter.type === 'array' && parameter.items) { const { value } = methods.convertParameterObjectIntoParameter({ key: null, diff --git a/src/parsers/swagger/v2.0/__tests__/Parser.spec.js b/src/parsers/swagger/v2.0/__tests__/Parser.spec.js index cd2469d..fa7faa7 100644 --- a/src/parsers/swagger/v2.0/__tests__/Parser.spec.js +++ b/src/parsers/swagger/v2.0/__tests__/Parser.spec.js @@ -2772,7 +2772,8 @@ describe('parsers/swagger/v2.0/Parser.js', () => { maximum: 321, minimum: 123, multipleOf: 5, - default: 100 + default: 100, + example: 12345 } } @@ -2787,6 +2788,9 @@ describe('parsers/swagger/v2.0/Parser.js', () => { required: true, type: 'integer', default: 100, + examples: List([ + 12345 + ]), constraints: List([ new Constraint.Maximum(321), new Constraint.Minimum(123), @@ -2816,7 +2820,8 @@ describe('parsers/swagger/v2.0/Parser.js', () => { maximum: 321, minimum: 123, multipleOf: 5, - default: 100 + default: 100, + example: 12345 } } } @@ -2838,6 +2843,7 @@ describe('parsers/swagger/v2.0/Parser.js', () => { required: true, type: 'integer', default: 100, + examples: List([12345]), constraints: List([ new Constraint.Maximum(321), new Constraint.Minimum(123), @@ -2920,6 +2926,66 @@ describe('parsers/swagger/v2.0/Parser.js', () => { const actual = inputs.map(input => __internals__.convertParameterObjectIntoParameter(input)) expect(actual).toEqual(expected) }) + + it('should respect x-example too', () => { + const inputs = [ + { + key: 'UserId', + value: { + name: 'userId', + in: 'query', + type: 'integer', + required: true, + 'x-example': 23456 + } + }, + { + key: 'ShowThing', + value: { + name: 'showThing', + in: 'query', + type: 'boolean', + 'x-example': false + } + } + ] + + const expected = [ + { + key: 'UserId', + value: new Parameter({ + key: 'userId', + name: 'userId', + in: 'queries', + uuid: 'UserId', + required: true, + type: 'integer', + examples: List([ + 23456 + ]), + constraints: List() + }) + }, + { + key: 'ShowThing', + value: new Parameter({ + key: 'showThing', + name: 'showThing', + in: 'queries', + uuid: 'ShowThing', + required: false, + type: 'boolean', + examples: List([ + false + ]), + constraints: List() + }) + } + ] + + const actual = inputs.map(input => __internals__.convertParameterObjectIntoParameter(input)) + expect(actual).toEqual(expected) + }) }) describe('@convertParameterObjectArrayIntoParameterMap', () => { From d304d4b4758b6d668bf862e328ea40868f4b71d9 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Mon, 18 Dec 2017 16:42:19 -0500 Subject: [PATCH 18/18] Validate Postman Input and Outut --- package.json | 1 + testing/e2e/internal-postman2/e2e.spec.js | 30 + .../postman-collection2-internal/e2e.spec.js | 29 + testing/schemas/postman-collection-v2-0.json | 1284 +++++++++++++++++ yarn.lock | 394 ++--- 5 files changed, 1552 insertions(+), 186 deletions(-) create mode 100644 testing/schemas/postman-collection-v2-0.json diff --git a/package.json b/package.json index 2070b35..fdc9616 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "colors": "^1.1.2", "cross-env": "^4.0.0", "diff": "^3.2.0", + "ajv": "^5.0.0", "eslint": "^3.3.1", "eslint-loader": "^1.5.0", "eslint-plugin-flowtype": "^2.29.1", diff --git a/testing/e2e/internal-postman2/e2e.spec.js b/testing/e2e/internal-postman2/e2e.spec.js index 715e234..ef79ad8 100644 --- a/testing/e2e/internal-postman2/e2e.spec.js +++ b/testing/e2e/internal-postman2/e2e.spec.js @@ -5,6 +5,8 @@ import { resolve } from 'path' import expect from 'expect' const diff = require('diff') +const Ajv = require('ajv'); + import ApiFlow from '../../../src/api-flow' const compare = (actual, expected = '{}') => { @@ -44,6 +46,34 @@ const fixDiff = (actual, index) => { } } + +// Postman's JSON Schema comes from http://schema.getpostman.com/ +describe('postman collection v2 example outputs are valid', () => { + const jsonSchema = fs.readFileSync( + resolve(__dirname, '../../schemas/postman-collection-v2-0.json'), + 'utf-8' + ).toString() + + const ajv = new Ajv(); + + // Postman is still on JSON Schema Draft 04 + ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json')); + + for (let index = 0; index < 1; index += 1) { + it('should validate against postman collection v2 JSON Schema ' + index, (done) => { + const inputJson = fs.readFileSync( + resolve(__dirname, './test-case-' + index + '/output.json'), + 'utf-8' + ).toString() + + ajv.validate(JSON.parse(jsonSchema), JSON.parse(inputJson)); + + expect(ajv.errors).toBe(null) + done() + }) + } +}) + describe('internal -> postman v2', () => { for (let index = 0; index < 2; index += 1) { it('should match expected output for test case #' + index, (done) => { diff --git a/testing/e2e/postman-collection2-internal/e2e.spec.js b/testing/e2e/postman-collection2-internal/e2e.spec.js index a02acd9..1f7aad4 100644 --- a/testing/e2e/postman-collection2-internal/e2e.spec.js +++ b/testing/e2e/postman-collection2-internal/e2e.spec.js @@ -5,6 +5,8 @@ import { resolve } from 'path' import expect from 'expect' const diff = require('diff') +const Ajv = require('ajv'); + import ApiFlow from '../../../src/api-flow' const compare = (actual, expected) => { @@ -44,6 +46,33 @@ const fixDiff = (actual, index) => { } } +// Postman's JSON Schema comes from http://schema.getpostman.com/ +describe('postman collection v2 example inputs are valid', () => { + const jsonSchema = fs.readFileSync( + resolve(__dirname, '../../schemas/postman-collection-v2-0.json'), + 'utf-8' + ).toString() + + const ajv = new Ajv(); + + // Postman is still on JSON Schema Draft 04 + ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json')); + + for (let index = 0; index < 1; index += 1) { + it('should validate against postman collection v2 JSON Schema ' + index, (done) => { + const inputJson = fs.readFileSync( + resolve(__dirname, './test-case-' + index + '/input.json'), + 'utf-8' + ).toString() + + ajv.validate(JSON.parse(jsonSchema), JSON.parse(inputJson)); + + expect(ajv.errors).toBe(null) + done() + }) + } +}) + describe('postman collection v2 -> internal', () => { for (let index = 0; index < 1; index += 1) { it('should match expected output for test case #' + index, (done) => { diff --git a/testing/schemas/postman-collection-v2-0.json b/testing/schemas/postman-collection-v2-0.json new file mode 100644 index 0000000..e3d6423 --- /dev/null +++ b/testing/schemas/postman-collection-v2-0.json @@ -0,0 +1,1284 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://schema.getpostman.com/json/collection/v2.0.0/", + "type": "object", + "properties": { + "info": { + "$ref": "#/definitions/info" + }, + "item": { + "type": "array", + "description": "Items are the basic unit for a Postman collection. You can think of them as corresponding to a single API endpoint. Each Item has one request and may have multiple API responses associated with it.", + "items": { + "title": "Items", + "oneOf": [ + { + "$ref": "#/definitions/item" + }, + { + "$ref": "#/definitions/item-group" + } + ] + } + }, + "event": { + "$ref": "#/definitions/event-list" + }, + "variable": { + "$ref": "#/definitions/variable-list" + }, + "auth": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/auth" + } + ] + } + }, + "required": [ + "info", + "item" + ], + "definitions": { + "auth": { + "type": "object", + "title": "Auth", + "id": "#/definitions/auth", + "description": "Represents authentication helpers provided by Postman", + "properties": { + "type": { + "type": "string", + "enum": [ + "awsv4", + "basic", + "bearer", + "digest", + "hawk", + "ntlm", + "noauth", + "oauth1", + "oauth2" + ] + }, + "awsv4": { + "type": "object", + "title": "AWS Signature v4", + "description": "This helper attributes for [AWS Auth](http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html)", + "properties": { + "accessKey": { + "type": "string", + "description": "AWS Signature V4 calculation requires the AWS Access Key of the AWS IAM user being used. This key is stored in this field.\n *Note: Do not use your AWS root credentials here.*" + }, + "secretKey": { + "type": "string", + "description": "The AWS Secret key associated with the Access Key is stored in this field.\n *Note: Do not use your AWS root credentials here.*" + }, + "region": { + "type": "string", + "description": "The AWS region code, must be one of the ones mentioned in the [AWS Documentation](http://docs.aws.amazon.com/general/latest/gr/rande.html)" + }, + "service": { + "type": "string", + "description": "The AWS Service endpoint. Refer to the [AWS Documentation](http://docs.aws.amazon.com/general/latest/gr/rande.html) for possible values." + } + } + }, + "basic": { + "type": "object", + "title": "Basic Authentication", + "description": "The helper attributes for [Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication)", + "properties": { + "username": { + "type": "string", + "description": "The username to be used for Basic Authentication is stored in this field." + }, + "password": { + "type": "string", + "description": "The password to be used for Basic Authentication is stored in this field." + } + } + }, + "bearer": { + "type": "object", + "title": "Bearer Token Authentication", + "description": "The helper attributes for [Bearer Token Authentication](https://tools.ietf.org/html/rfc6750)", + "properties": { + "token": { + "type": "string", + "description": "The token to be used for Bearer Authentication is stored in this field." + } + } + }, + "digest": { + "type": "object", + "title": "Digest Authentication", + "description": "The helper attributes for [Digest Authentication](https://en.wikipedia.org/wiki/Digest_access_authentication).", + "properties": { + "username": { + "type": "string", + "description": "The username to be used for digest Authentication is stored in this field." + }, + "realm": { + "type": "string", + "description": "The authentication 'realm' is stored in this field. Refer to [RFC 2617](https://tools.ietf.org/html/rfc2617) for details." + }, + "password": { + "type": "string", + "description": "The password to be used for digest Authentication is stored in this field." + }, + "nonce": { + "type": "string", + "description": "The Digest server challenges clients. A nonce is a part of that challenge, stored in this field." + }, + "nonceCount": { + "type": "string", + "description": "The nonceCount is the hexadecimal count of the number of requests (including the current request) that the client has sent with the nonce value in this request." + }, + "algorithm": { + "type": "string", + "description": "The algorithm to be used to sign the request." + }, + "qop": { + "type": "string", + "description": "Indicates the 'quality of protection' applied by the client to the message." + }, + "opaque": { + "type": "string", + "description": "A string of data, specified by the server, which should be returned by the client unchanged." + }, + "clientNonce": { + "type": "string", + "description": "A client nonce enhances the security of HTTP Digest Authentication, and it is stored in this field." + }, + "disableRetryRequest": { + "type": "boolean", + "default": false, + "description": "When set to true, disables interactive replay mode for the parent request." + } + } + }, + "hawk": { + "type": "object", + "title": "Hawk Authentication", + "description": "Helper attributes for [Hawk Authentication](https://github.com/hueniverse/hawk)", + "properties": { + "authId": { + "type": "string", + "description": "Hawk Authentication requires a client identifier to be passed to the server. This field contains that identifier." + }, + "authKey": { + "type": "string", + "description": "The secret that's shared by the server and the client. It is recommended to use an environment variable here, and set the value in your environment." + }, + "algorithm": { + "type": "string", + "description": "The hashing algorithm used in this Hawk authentication request is stored in this field." + }, + "user": { + "type": "string", + "description": "One can optionally send their username (if available) to the Hawk protected endpoint. This field holds the value, if given." + }, + "nonce": { + "type": "string", + "description": "The Hawk server challenges clients. A nonce is a part of that challenge, stored in this field." + }, + "extraData": { + "type": "string", + "description": "This field stores metadata for the current authentication request." + }, + "appId": { + "type": "string", + "description": "Serves to identify the backend app in case multiple ones are supported. This field is optional." + }, + "delegation": { + "type": "string", + "description": "This field is used when Hawk auth is used as a part of a larger protocol and serves as a place for handling complex scenarios such as access delegation." + }, + "timestamp": { + "type": "string", + "description": "The timestamp for the current Hawk authentication request." + } + } + }, + "noauth": {}, + "ntlm": { + "type": "object", + "title": "NTLM Authentication", + "description": "Helper attributes for [NTLM Authentication](https://msdn.microsoft.com/en-us/library/cc237488.aspx)", + "properties": { + "username": { + "type": "string", + "description": "The username to be used for NTLM Authentication is stored in this field." + }, + "password": { + "type": "string", + "description": "The password to be used for NTLM Authentication is stored in this field." + }, + "domain": { + "type": "string", + "description": "The domain to be used for NTLM Authentication is stored in this field." + }, + "workstation": { + "type": "string", + "description": "The workstation to be used for NTLM Authentication is stored in this field." + }, + "disableRetryRequest": { + "type": "boolean", + "description": "When set to true, disables interactive replay mode for the parent request." + } + } + }, + "oauth1": { + "type": "object", + "title": "OAuth1", + "description": "Helper attributes for [OAuth2](https://oauth.net/1/)", + "properties": { + "consumerKey": { + "type": "string", + "description": "The oAuth1 Consumer Secret, along with the Consumer Key authenticates the client. This field holds the oAuth1 Consumer Key." + }, + "consumerSecret": { + "type": "string", + "description": "The oAuth1 Consumer Secret, along with the Consumer Key authenticates the client. The consumer secret is stored in this field." + }, + "token": { + "type": "string", + "description": "The request token is a temporary credential, and is stored by Postman in this field." + }, + "tokenSecret": { + "type": "string", + "description": "Like the token, the request token secret is a temporary credential stored for the current authentication request." + }, + "signatureMethod": { + "type": "string", + "description": "The name of the signature method used by the client to sign the request." + }, + "timestamp": { + "type": "string", + "description": "The timestamp associated with the current authentication request is stored in this field." + }, + "nonce": { + "type": "string", + "description": "A nonce is a random string, uniquely generated by the client to allow the server to verify that a request has never been made before and helps prevent replay attacks when requests are made over a non-secure channel." + }, + "version": { + "type": "string", + "description": "The oAuth version, usually, this is ``1.0`` for OAuth-1. For OAuth 2, use the dedicated OAuth 2.0 authentication helper instead." + }, + "realm": { + "type": "string", + "description": "The realm directive is required for all authentication schemes that issue a challenge. Refer to [RFC 2617](http://tools.ietf.org/html/rfc2617#section-1.2) for more details." + }, + "encodeOAuthSign": { + "type": "string", + "description": "This indicates whether or not to encode the request signature." + }, + "addParamsToHeader": { + "type": "boolean", + "default": false, + "description": "This indicates whether or not to add the authorization params to the Authorization header." + }, + "addEmptyParamsToSign": { + "type": "boolean", + "default": false, + "description": "This indicates whether or not to include empty valued parameters in the request signature." + } + } + }, + "oauth2": { + "type": "object", + "title": "OAuth2", + "description": "Helper attributes for [OAuth2](https://oauth.net/2/)", + "properties": { + "accessToken": { + "type": "string", + "description": "The access token for the current request is stored in this field." + }, + "addTokenTo": { + "type": "string", + "enum": [ + "header", + "queryParams" + ], + "description": "The specifier for token handling behaviour is stored in this field." + }, + "callBackUrl": { + "type": "string", + "description": "This field contains the URL that has to be hit when the authentication process has completed." + }, + "authUrl": { + "type": "string", + "description": "The OAuth2 providers URL is stored in this field." + }, + "accessTokenUrl": { + "type": "string", + "description": "The URL to fetch access tokens is stored in this field." + }, + "clientId": { + "type": "string", + "description": "The unique client ID associated with the authentication request is stored in this field." + }, + "clientSecret": { + "type": "string", + "description": "The client secret associated with the current authentication request is stored in this field." + }, + "clientAuth": { + "type": "string", + "enum": [ + "body", + "header" + ], + "description": "The client authentication associated with the current request request is stored in this field." + }, + "grantType": { + "type": "string", + "enum": [ + "authorization_code", + "implicit", + "password_credentials", + "client_credentials" + ], + "description": "The grant type associated with the current authentication request is stored in this field." + }, + "scope": { + "type": "string", + "description": "This field is used to specify the access privileges requested from the OAuth provider by the authentication request." + }, + "username": { + "type": "string", + "description": "This field is used to specify the OAuth2 provider username for the current request." + }, + "password": { + "type": "string", + "description": "This field is used to specify the OAuth2 provider password for the current request." + }, + "tokenType": { + "type": "string", + "description": "This field is used to specify the OAuth2 token type for the current request." + }, + "redirectUri": { + "type": "string", + "description": "This field is used to specify the redirection URL for OAuth2 authentication." + }, + "refreshToken": { + "type": "string", + "description": "This field is used to specify the refresh token for OAuth2 authentication." + } + } + } + }, + "required": [ + "type" + ] + }, + "certificate-list": { + "id": "#/definitions/certificate-list", + "title": "Certificate List", + "description": "A representation of a list of ssl certificates", + "type": "array", + "items": { + "$ref": "#/definitions/certificate" + } + }, + "certificate": { + "id": "#/definitions/certificate", + "title": "Certificate", + "description": "A representation of an ssl certificate", + "type": "object", + "properties": { + "name": { + "description": "A name for the certificate for user reference", + "type": "string" + }, + "matches": { + "description": "A list of Url match pattern strings, to identify Urls this certificate can be used for.", + "type": "array", + "item": { + "type": "string", + "description": "An Url match pattern string" + } + }, + "key": { + "description": "An object containing path to file containing private key, on the file system", + "type": "object", + "properties": { + "src": { + "description": "The path to file containing key for certificate, on the file system" + } + } + }, + "cert": { + "description": "An object containing path to file certificate, on the file system", + "type": "object", + "properties": { + "src": { + "description": "The path to file containing key for certificate, on the file system" + } + } + }, + "passphrase": { + "description": "The passphrase for the certificate", + "type": "string" + } + } + }, + "cookie-list": { + "id": "#/definitions/cookie-list", + "title": "Certificate List", + "description": "A representation of a list of cookies", + "type": "array", + "items": { + "$ref": "#/definitions/cookie" + } + }, + "cookie": { + "type": "object", + "title": "Cookie", + "id": "#/definitions/cookie", + "description": "A Cookie, that follows the [Google Chrome format](https://developer.chrome.com/extensions/cookies)", + "properties": { + "domain": { + "type": "string", + "description": "The domain for which this cookie is valid." + }, + "expires": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ], + "description": "When the cookie expires." + }, + "maxAge": { + "type": "string" + }, + "hostOnly": { + "type": "boolean", + "description": "True if the cookie is a host-only cookie. (i.e. a request's URL domain must exactly match the domain of the cookie)." + }, + "httpOnly": { + "type": "boolean", + "description": "Indicates if this cookie is HTTP Only. (if True, the cookie is inaccessible to client-side scripts)" + }, + "name": { + "type": "string", + "description": "This is the name of the Cookie." + }, + "path": { + "type": "string", + "description": "The path associated with the Cookie." + }, + "secure": { + "type": "boolean", + "description": "Indicates if the 'secure' flag is set on the Cookie, meaning that it is transmitted over secure connections only. (typically HTTPS)" + }, + "session": { + "type": "boolean", + "description": "True if the cookie is a session cookie." + }, + "value": { + "type": "string", + "description": "The value of the Cookie." + }, + "extensions": { + "type": "array", + "description": "Custom attributes for a cookie go here, such as the [Priority Field](https://code.google.com/p/chromium/issues/detail?id=232693)" + } + }, + "required": [ + "domain", + "path" + ] + }, + "description": { + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "#/definitions/description", + "description": "A Description can be a raw text, or be an object, which holds the description along with its format.", + "oneOf": [ + { + "type": "object", + "title": "Description", + "properties": { + "content": { + "type": "string", + "description": "The content of the description goes here, as a raw string." + }, + "type": { + "type": "string", + "description": "Holds the mime type of the raw description content. E.g: 'text/markdown' or 'text/html'.\nThe type is used to correctly render the description when generating documentation, or in the Postman app." + }, + "version": { + "description": "Description can have versions associated with it, which should be put in this property." + } + } + }, + { + "type": "string" + } + ] + }, + "event-list": { + "id": "#/definitions/event-list", + "title": "Event List", + "type": "array", + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "Postman allows you to configure scripts to run when specific events occur. These scripts are stored here, and can be referenced in the collection by their ID.", + "items": { + "$ref": "#/definitions/event" + } + }, + "event": { + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "#/definitions/event", + "title": "Event", + "description": "Defines a script associated with an associated event name", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier for the enclosing event." + }, + "listen": { + "type": "string", + "description": "Can be set to `test` or `prerequest` for test scripts or pre-request scripts respectively." + }, + "script": { + "$ref": "#/definitions/script" + }, + "disabled": { + "type": "boolean", + "default": false, + "description": "Indicates whether the event is disabled. If absent, the event is assumed to be enabled." + } + }, + "required": [ + "listen" + ] + }, + "header-list": { + "id": "#/definitions/header-list", + "title": "Header List", + "description": "A representation for a list of headers", + "type": "array", + "items": { + "$ref": "#/definitions/header" + } + }, + "header": { + "type": "object", + "title": "Header", + "id": "#/definitions/header", + "description": "Represents a single HTTP Header", + "properties": { + "key": { + "description": "This holds the LHS of the HTTP Header, e.g ``Content-Type`` or ``X-Custom-Header``", + "type": "string" + }, + "value": { + "type": "string", + "description": "The value (or the RHS) of the Header is stored in this field." + }, + "disabled": { + "type": "boolean", + "default": false, + "description": "If set to true, the current header will not be sent with requests." + }, + "description": { + "$ref": "#/definitions/description" + } + }, + "required": [ + "key", + "value" + ] + }, + "info": { + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "#/definitions/info", + "title": "Information", + "description": "Detailed description of the info block", + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "Name of the collection", + "description": "A collection's friendly name is defined by this field. You would want to set this field to a value that would allow you to easily identify this collection among a bunch of other collections, as such outlining its usage or content." + }, + "_postman_id": { + "type": "string", + "description": "Every collection is identified by the unique value of this field. The value of this field is usually easiest to generate using a UID generator function. If you already have a collection, it is recommended that you maintain the same id since changing the id usually implies that is a different collection than it was originally.\n *Note: This field exists for compatibility reasons with Collection Format V1.*" + }, + "description": { + "$ref": "#/definitions/description" + }, + "version": { + "$ref": "#/definitions/version" + }, + "schema": { + "description": "This should ideally hold a link to the Postman schema that is used to validate this collection. E.g: https://schema.getpostman.com/collection/v1", + "type": "string" + } + }, + "required": [ + "name", + "schema" + ] + }, + "item-group": { + "title": "Folder", + "id": "#/definitions/item-group", + "description": "One of the primary goals of Postman is to organize the development of APIs. To this end, it is necessary to be able to group requests together. This can be achived using 'Folders'. A folder just is an ordered set of requests.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "A folder's friendly name is defined by this field. You would want to set this field to a value that would allow you to easily identify this folder." + }, + "description": { + "$ref": "#/definitions/description" + }, + "variable": { + "$ref": "#/definitions/variable-list" + }, + "item": { + "description": "Items are entities which contain an actual HTTP request, and sample responses attached to it. Folders may contain many items.", + "type": "array", + "items": { + "title": "Items", + "anyOf": [ + { + "$ref": "#/definitions/item" + }, + { + "$ref": "#/definitions/item-group" + } + ] + } + }, + "event": { + "$ref": "#/definitions/event-list" + }, + "auth": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/auth" + } + ] + } + }, + "required": [ + "item" + ] + }, + "item": { + "type": "object", + "title": "Item", + "id": "#/definitions/item", + "description": "Items are entities which contain an actual HTTP request, and sample responses attached to it.", + "properties": { + "id": { + "type": "string", + "description": "A unique ID that is used to identify collections internally" + }, + "name": { + "type": "string", + "description": "A human readable identifier for the current item." + }, + "description": { + "$ref": "#/definitions/description" + }, + "variable": { + "$ref": "#/definitions/variable-list" + }, + "event": { + "$ref": "#/definitions/event-list" + }, + "request": { + "$ref": "#/definitions/request" + }, + "response": { + "type": "array", + "title": "Responses", + "items": { + "$ref": "#/definitions/response" + } + } + }, + "required": [ + "request" + ] + }, + "proxy-config": { + "id": "#/definitions/proxy-config", + "title": "Proxy Config", + "description": "Using the Proxy, you can configure your custom proxy into the postman for particular url match", + "type": "object", + "properties": { + "match": { + "default": "http+https://*/*", + "description": "The Url match for which the proxy config is defined", + "type": "string" + }, + "host": { + "type": "string", + "description": "The proxy server host" + }, + "port": { + "type": "integer", + "minimum": 0, + "default": 8080, + "description": "The proxy server port" + }, + "tunnel": { + "description": "The tunneling details for the proxy config", + "default": false, + "type": "boolean" + }, + "disabled": { + "type": "boolean", + "default": false, + "description": "When set to true, ignores this proxy configuration entity" + } + } + }, + "request": { + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "#/definitions/request", + "title": "Request", + "description": "A request represents an HTTP request. If a string, the string is assumed to be the request URL and the method is assumed to be 'GET'.", + "oneOf": [ + { + "type": "object", + "title": "Request", + "properties": { + "url": { + "$ref": "#/definitions/url" + }, + "auth": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/auth" + } + ] + }, + "proxy": { + "$ref": "#/definitions/proxy-config" + }, + "certificate": { + "$ref": "#/definitions/certificate" + }, + "method": { + "description": "The HTTP method associated with this request.", + "type": "string", + "enum": [ + "GET", + "PUT", + "POST", + "PATCH", + "DELETE", + "COPY", + "HEAD", + "OPTIONS", + "LINK", + "UNLINK", + "PURGE", + "LOCK", + "UNLOCK", + "PROPFIND", + "VIEW" + ] + }, + "description": { + "$ref": "#/definitions/description" + }, + "header": { + "oneOf": [ + { + "$ref": "#/definitions/header-list" + }, + { + "type": "string" + } + ] + }, + "body": { + "type": "object", + "description": "This field contains the data usually contained in the request body.", + "properties": { + "mode": { + "description": "Postman stores the type of data associated with this request in this field.", + "enum": [ + "raw", + "urlencoded", + "formdata", + "file" + ] + }, + "raw": { + "type": "string" + }, + "urlencoded": { + "type": "array", + "items": { + "type": "object", + "title": "UrlEncodedParameter", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + }, + "disabled": { + "type": "boolean", + "default": false + }, + "description": { + "$ref": "#/definitions/description" + } + }, + "required": [ + "key" + ] + } + }, + "formdata": { + "type": "array", + "items": { + "type": "object", + "title": "FormParameter", + "oneOf": [ + { + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + }, + "disabled": { + "type": "boolean", + "default": false, + "description": "When set to true, prevents this form data entity from being sent." + }, + "type": { + "type": "string", + "enum": [ + "text" + ] + }, + "description": { + "$ref": "#/definitions/description" + } + }, + "required": [ + "key" + ] + }, + { + "properties": { + "key": { + "type": "string" + }, + "src": { + "type": "string" + }, + "disabled": { + "type": "boolean", + "default": false, + "description": "When set to true, prevents this form data entity from being sent." + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "description": { + "$ref": "#/definitions/description" + } + }, + "required": [ + "key" + ] + } + ] + } + }, + "file": { + "type": "object", + "properties": { + "src": { + "type": "string", + "description": "Contains the name of the file to upload. _Not the path_." + }, + "content": { + "type": "string" + } + } + } + } + } + } + }, + { + "type": "string" + } + ] + }, + "response": { + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "#/definitions/response", + "title": "Response", + "description": "A response represents an HTTP response.", + "properties": { + "id": { + "description": "A unique, user defined identifier that can be used to refer to this response from requests.", + "type": "string" + }, + "originalRequest": { + "$ref": "#/definitions/request" + }, + "responseTime": { + "title": "ResponseTime", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ], + "description": "The time taken by the request to complete. If a number, the unit is milliseconds." + }, + "header": { + "title": "Headers", + "oneOf": [ + { + "type": "array", + "title": "Header", + "description": "No HTTP request is complete without its headers, and the same is true for a Postman request. This field is an array containing all the headers.", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/header" + }, + { + "title": "Header", + "type": "string" + } + ] + } + }, + { + "type": "string" + } + ] + }, + "cookie": { + "type": "array", + "items": { + "$ref": "#/definitions/cookie" + } + }, + "body": { + "type": "string", + "description": "The raw text of the response." + }, + "status": { + "type": "string", + "description": "The response status, e.g: '200 OK'" + }, + "code": { + "type": "integer", + "description": "The numerical response code, example: 200, 201, 404, etc." + } + } + }, + "script": { + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "#/definitions/script", + "title": "Script", + "type": "object", + "description": "A script is a snippet of Javascript code that can be used to to perform setup or teardown operations on a particular response.", + "properties": { + "id": { + "description": "A unique, user defined identifier that can be used to refer to this script from requests.", + "type": "string" + }, + "type": { + "description": "Type of the script. E.g: 'text/javascript'", + "type": "string" + }, + "exec": { + "oneOf": [ + { + "type": "array", + "description": "This is an array of strings, where each line represents a single line of code. Having lines separate makes it possible to easily track changes made to scripts.", + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ] + }, + "src": { + "$ref": "#/definitions/url" + }, + "name": { + "type": "string", + "description": "Script name" + } + } + }, + "url": { + "description": "If object, contains the complete broken-down URL for this request. If string, contains the literal request URL.", + "id": "#/definitions/url", + "title": "Url", + "oneOf": [ + { + "type": "object", + "properties": { + "raw": { + "type": "string", + "description": "The string representation of the request URL, including the protocol, host, path, hash, query parameter(s) and path variable(s)." + }, + "protocol": { + "type": "string", + "description": "The protocol associated with the request, E.g: 'http'" + }, + "host": { + "title": "Host", + "description": "The host for the URL, E.g: api.yourdomain.com. Can be stored as a string or as an array of strings.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "The host, split into subdomain strings." + } + ] + }, + "path": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "description": "The complete path of the current url, broken down into segments. A segment could be a string, or a path variable.", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + } + } + ] + } + } + ] + }, + "port": { + "type": "string", + "description": "The port number present in this URL. An empty value implies 80/443 depending on whether the protocol field contains http/https." + }, + "query": { + "type": "array", + "description": "An array of QueryParams, which is basically the query string part of the URL, parsed into separate variables", + "items": { + "type": "object", + "title": "QueryParam", + "properties": { + "key": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "value": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "disabled": { + "type": "boolean", + "default": false, + "description": "If set to true, the current query parameter will not be sent with the request." + }, + "description": { + "$ref": "#/definitions/description" + } + } + } + }, + "hash": { + "description": "Contains the URL fragment (if any). Usually this is not transmitted over the network, but it could be useful to store this in some cases.", + "type": "string" + }, + "variable": { + "type": "array", + "description": "Postman supports path variables with the syntax `/path/:variableName/to/somewhere`. These variables are stored in this field.", + "items": { + "$ref": "#/definitions/variable" + } + } + } + }, + { + "type": "string" + } + ] + }, + "variable-list": { + "id": "#/definitions/variable-list", + "title": "Variable List", + "description": "Collection variables allow you to define a set of variables, that are a *part of the collection*, as opposed to environments, which are separate entities.\n*Note: Collection variables must not contain any sensitive information.*", + "type": "array", + "items": { + "$ref": "#/definitions/variable" + } + }, + "variable": { + "id": "#/definitions/variable", + "title": "Variable", + "description": "Using variables in your Postman requests eliminates the need to duplicate requests, which can save a lot of time. Variables can be defined, and referenced to from any part of a request.", + "type": "object", + "properties": { + "id": { + "description": "A variable ID is a unique user-defined value that identifies the variable within a collection. In traditional terms, this would be a variable name.", + "type": "string" + }, + "key": { + "description": "A variable key is a human friendly value that identifies the variable within a collection. In traditional terms, this would be a variable name.", + "type": "string" + }, + "value": { + "description": "The value that a variable holds in this collection. Ultimately, the variables will be replaced by this value, when say running a set of requests from a collection" + }, + "type": { + "description": "A variable may have multiple types. This field specifies the type of the variable.", + "type": "string", + "enum": [ + "string", + "boolean", + "any", + "number" + ] + }, + "name": { + "type": "string", + "description": "Variable name" + }, + "description": { + "$ref": "#/definitions/description" + }, + "system": { + "type": "boolean", + "default": false, + "description": "When set to true, indicates that this variable has been set by Postman" + }, + "disabled": { + "type": "boolean", + "default": false + } + }, + "anyOf": [ + { + "required": [ + "id" + ] + }, + { + "required": [ + "key" + ] + }, + { + "required": [ + "id", + "key" + ] + } + ] + }, + "version": { + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "#/definitions/version", + "title": "Collection Version", + "description": "Postman allows you to version your collections as they grow, and this field holds the version number. While optional, it is recommended that you use this field to its fullest extent!", + "oneOf": [ + { + "type": "object", + "properties": { + "major": { + "description": "Increment this number if you make changes to the collection that changes its behaviour. E.g: Removing or adding new test scripts. (partly or completely).", + "minimum": 0, + "type": "integer" + }, + "minor": { + "description": "You should increment this number if you make changes that will not break anything that uses the collection. E.g: removing a folder.", + "minimum": 0, + "type": "integer" + }, + "patch": { + "description": "Ideally, minor changes to a collection should result in the increment of this number.", + "minimum": 0, + "type": "integer" + }, + "identifier": { + "description": "A human friendly identifier to make sense of the version numbers. E.g: 'beta-3'", + "type": "string", + "maxLength": 10 + }, + "meta": {} + }, + "required": [ + "major", + "minor", + "patch" + ] + }, + { + "type": "string" + } + ] + } + } +} diff --git a/yarn.lock b/yarn.lock index 8955699..5f76d71 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1,5 +1,7 @@ # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. # yarn lockfile v1 + + abbrev@1: version "1.1.0" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.0.tgz#d0554c2256636e2f56e7c2e5ad183f859428d81f" @@ -16,6 +18,10 @@ acorn-jsx@^3.0.0: dependencies: acorn "^3.0.4" +acorn@4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.4.tgz#17a8d6a7a6c4ef538b814ec9abac2779293bf30a" + acorn@^3.0.4: version "3.3.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" @@ -24,10 +30,6 @@ acorn@^4.0.3, acorn@^4.0.4: version "4.0.11" resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.11.tgz#edcda3bd937e7556410d42ed5860f67399c794c0" -acorn@4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.4.tgz#17a8d6a7a6c4ef538b814ec9abac2779293bf30a" - ajv-keywords@^1.0.0, ajv-keywords@^1.1.1: version "1.5.1" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" @@ -39,6 +41,15 @@ ajv@^4.7.0: co "^4.6.0" json-stable-stringify "^1.0.1" +ajv@^5.0.0: + version "5.5.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" + dependencies: + co "^4.6.0" + fast-deep-equal "^1.0.0" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.3.0" + align-text@^0.1.1, align-text@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" @@ -231,30 +242,6 @@ babel-code-frame@^6.16.0, babel-code-frame@^6.22.0, babel-code-frame@^6.3.13: esutils "^2.0.2" js-tokens "^3.0.0" -babel-core@^6.23.0, babel-core@^6.3.13, babel-core@^6.6.5: - version "6.23.1" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.23.1.tgz#c143cb621bb2f621710c220c5d579d15b8a442df" - dependencies: - babel-code-frame "^6.22.0" - babel-generator "^6.23.0" - babel-helpers "^6.23.0" - babel-messages "^6.23.0" - babel-register "^6.23.0" - babel-runtime "^6.22.0" - babel-template "^6.23.0" - babel-traverse "^6.23.1" - babel-types "^6.23.0" - babylon "^6.11.0" - convert-source-map "^1.1.0" - debug "^2.1.1" - json5 "^0.5.0" - lodash "^4.2.0" - minimatch "^3.0.2" - path-is-absolute "^1.0.0" - private "^0.1.6" - slash "^1.0.0" - source-map "^0.5.0" - babel-core@6.4.0: version "6.4.0" resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.4.0.tgz#648dfae98d2bc92ed57d4050d462a82c8c218474" @@ -281,6 +268,30 @@ babel-core@6.4.0: slash "^1.0.0" source-map "^0.5.0" +babel-core@^6.23.0, babel-core@^6.3.13, babel-core@^6.6.5: + version "6.23.1" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.23.1.tgz#c143cb621bb2f621710c220c5d579d15b8a442df" + dependencies: + babel-code-frame "^6.22.0" + babel-generator "^6.23.0" + babel-helpers "^6.23.0" + babel-messages "^6.23.0" + babel-register "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.23.0" + babel-traverse "^6.23.1" + babel-types "^6.23.0" + babylon "^6.11.0" + convert-source-map "^1.1.0" + debug "^2.1.1" + json5 "^0.5.0" + lodash "^4.2.0" + minimatch "^3.0.2" + path-is-absolute "^1.0.0" + private "^0.1.6" + slash "^1.0.0" + source-map "^0.5.0" + babel-eslint@^6.1.2: version "6.1.2" resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-6.1.2.tgz#5293419fe3672d66598d327da9694567ba6a5f2f" @@ -559,16 +570,6 @@ babel-plugin-transform-decorators-legacy@1.3.2: babel-runtime "^6.2.0" babel-template "^6.3.0" -babel-plugin-transform-decorators@^6.22.0, babel-plugin-transform-decorators@^6.3.13: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.22.0.tgz#c03635b27a23b23b7224f49232c237a73988d27c" - dependencies: - babel-helper-explode-class "^6.22.0" - babel-plugin-syntax-decorators "^6.13.0" - babel-runtime "^6.22.0" - babel-template "^6.22.0" - babel-types "^6.22.0" - babel-plugin-transform-decorators@6.3.13: version "6.3.13" resolved "https://registry.yarnpkg.com/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.3.13.tgz#e1f168f10271eb0cb5c13da661f06d4cc48aec60" @@ -580,6 +581,16 @@ babel-plugin-transform-decorators@6.3.13: babel-template "^6.3.13" babel-types "^6.3.13" +babel-plugin-transform-decorators@^6.22.0, babel-plugin-transform-decorators@^6.3.13: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.22.0.tgz#c03635b27a23b23b7224f49232c237a73988d27c" + dependencies: + babel-helper-explode-class "^6.22.0" + babel-plugin-syntax-decorators "^6.13.0" + babel-runtime "^6.22.0" + babel-template "^6.22.0" + babel-types "^6.22.0" + babel-plugin-transform-do-expressions@^6.3.13: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-do-expressions/-/babel-plugin-transform-do-expressions-6.22.0.tgz#28ccaf92812d949c2cd1281f690c8fdc468ae9bb" @@ -779,14 +790,6 @@ babel-plugin-transform-strict-mode@^6.22.0: babel-runtime "^6.22.0" babel-types "^6.22.0" -babel-polyfill@^6.6.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.23.0.tgz#8364ca62df8eafb830499f699177466c3b03499d" - dependencies: - babel-runtime "^6.22.0" - core-js "^2.4.0" - regenerator-runtime "^0.10.0" - babel-polyfill@6.3.14: version "6.3.14" resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.3.14.tgz#1872298ede5b9f7b02ec7807bd3dd301c189c440" @@ -795,6 +798,14 @@ babel-polyfill@6.3.14: babel-runtime "^5.0.0" core-js "^1.0.1" +babel-polyfill@^6.6.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.23.0.tgz#8364ca62df8eafb830499f699177466c3b03499d" + dependencies: + babel-runtime "^6.22.0" + core-js "^2.4.0" + regenerator-runtime "^0.10.0" + babel-preset-es2015@6.3.13: version "6.3.13" resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.3.13.tgz#97dce7ef292e18cb9b2b7545d80c593c28d9517f" @@ -828,6 +839,16 @@ babel-preset-stage-0@6.3.13: babel-plugin-transform-function-bind "^6.3.13" babel-preset-stage-1 "^6.3.13" +babel-preset-stage-1@6.3.13: + version "6.3.13" + resolved "https://registry.yarnpkg.com/babel-preset-stage-1/-/babel-preset-stage-1-6.3.13.tgz#e41df518d20c8dcc2cb7dae5a6c078c8c7dcfbd9" + dependencies: + babel-plugin-transform-class-constructor-call "^6.3.13" + babel-plugin-transform-class-properties "^6.3.13" + babel-plugin-transform-decorators "^6.3.13" + babel-plugin-transform-export-extensions "^6.3.13" + babel-preset-stage-2 "^6.3.13" + babel-preset-stage-1@^6.3.13: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-preset-stage-1/-/babel-preset-stage-1-6.22.0.tgz#7da05bffea6ad5a10aef93e320cfc6dd465dbc1a" @@ -836,15 +857,13 @@ babel-preset-stage-1@^6.3.13: babel-plugin-transform-export-extensions "^6.22.0" babel-preset-stage-2 "^6.22.0" -babel-preset-stage-1@6.3.13: +babel-preset-stage-2@6.3.13: version "6.3.13" - resolved "https://registry.yarnpkg.com/babel-preset-stage-1/-/babel-preset-stage-1-6.3.13.tgz#e41df518d20c8dcc2cb7dae5a6c078c8c7dcfbd9" + resolved "https://registry.yarnpkg.com/babel-preset-stage-2/-/babel-preset-stage-2-6.3.13.tgz#3657db63d11806456f64d4d0b0e9a817837aeea7" dependencies: - babel-plugin-transform-class-constructor-call "^6.3.13" - babel-plugin-transform-class-properties "^6.3.13" - babel-plugin-transform-decorators "^6.3.13" - babel-plugin-transform-export-extensions "^6.3.13" - babel-preset-stage-2 "^6.3.13" + babel-plugin-syntax-trailing-function-commas "^6.3.13" + babel-plugin-transform-object-rest-spread "^6.3.13" + babel-preset-stage-3 "^6.3.13" babel-preset-stage-2@^6.22.0, babel-preset-stage-2@^6.3.13: version "6.22.0" @@ -855,13 +874,12 @@ babel-preset-stage-2@^6.22.0, babel-preset-stage-2@^6.3.13: babel-plugin-transform-decorators "^6.22.0" babel-preset-stage-3 "^6.22.0" -babel-preset-stage-2@6.3.13: +babel-preset-stage-3@6.3.13: version "6.3.13" - resolved "https://registry.yarnpkg.com/babel-preset-stage-2/-/babel-preset-stage-2-6.3.13.tgz#3657db63d11806456f64d4d0b0e9a817837aeea7" + resolved "https://registry.yarnpkg.com/babel-preset-stage-3/-/babel-preset-stage-3-6.3.13.tgz#5f0aa70e3d4176ffab08b1d5cc1cb8210777ba3e" dependencies: - babel-plugin-syntax-trailing-function-commas "^6.3.13" - babel-plugin-transform-object-rest-spread "^6.3.13" - babel-preset-stage-3 "^6.3.13" + babel-plugin-transform-async-to-generator "^6.3.13" + babel-plugin-transform-exponentiation-operator "^6.3.13" babel-preset-stage-3@^6.22.0, babel-preset-stage-3@^6.3.13: version "6.22.0" @@ -873,17 +891,22 @@ babel-preset-stage-3@^6.22.0, babel-preset-stage-3@^6.3.13: babel-plugin-transform-exponentiation-operator "^6.22.0" babel-plugin-transform-object-rest-spread "^6.22.0" -babel-preset-stage-3@6.3.13: - version "6.3.13" - resolved "https://registry.yarnpkg.com/babel-preset-stage-3/-/babel-preset-stage-3-6.3.13.tgz#5f0aa70e3d4176ffab08b1d5cc1cb8210777ba3e" - dependencies: - babel-plugin-transform-async-to-generator "^6.3.13" - babel-plugin-transform-exponentiation-operator "^6.3.13" - babel-regenerator-runtime@^6.3.13: version "6.5.0" resolved "https://registry.yarnpkg.com/babel-regenerator-runtime/-/babel-regenerator-runtime-6.5.0.tgz#0e41cd1c9f80442466f015c749fff8ba98f8e110" +babel-register@6.3.13: + version "6.3.13" + resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.3.13.tgz#858b77cd7765aa5a82a33c26bbb1bc7b264713bf" + dependencies: + babel-core "^6.3.13" + babel-runtime "^5.0.0" + core-js "^1.0.0" + home-or-tmp "^1.0.0" + lodash "^3.10.0" + path-exists "^1.0.0" + source-map-support "^0.2.10" + babel-register@^6.23.0, babel-register@^6.3.13, babel-register@^6.6.5: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.23.0.tgz#c9aa3d4cca94b51da34826c4a0f9e08145d74ff3" @@ -896,17 +919,11 @@ babel-register@^6.23.0, babel-register@^6.3.13, babel-register@^6.6.5: mkdirp "^0.5.1" source-map-support "^0.4.2" -babel-register@6.3.13: - version "6.3.13" - resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.3.13.tgz#858b77cd7765aa5a82a33c26bbb1bc7b264713bf" +babel-runtime@6.3.19: + version "6.3.19" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.3.19.tgz#f2db696c3c8c379881e2a53665e02187074dc681" dependencies: - babel-core "^6.3.13" - babel-runtime "^5.0.0" - core-js "^1.0.0" - home-or-tmp "^1.0.0" - lodash "^3.10.0" - path-exists "^1.0.0" - source-map-support "^0.2.10" + core-js "^1.2.0" babel-runtime@^5.0.0: version "5.8.38" @@ -921,12 +938,6 @@ babel-runtime@^6.18.0, babel-runtime@^6.2.0, babel-runtime@^6.22.0: core-js "^2.4.0" regenerator-runtime "^0.10.0" -babel-runtime@6.3.19: - version "6.3.19" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.3.19.tgz#f2db696c3c8c379881e2a53665e02187074dc681" - dependencies: - core-js "^1.2.0" - babel-template@^6.16.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.24.1.tgz#04ae514f1f93b3a2537f2a0f60a5a45fb8308333" @@ -1221,21 +1232,21 @@ chai@3.4.1: deep-eql "^0.1.3" type-detect "^1.0.0" -chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" +chalk@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.1.tgz#509afb67066e7499f7eb3535c77445772ae2d019" dependencies: - ansi-styles "^2.2.1" + ansi-styles "^2.1.0" escape-string-regexp "^1.0.2" has-ansi "^2.0.0" strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.1.tgz#509afb67066e7499f7eb3535c77445772ae2d019" +chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" dependencies: - ansi-styles "^2.1.0" + ansi-styles "^2.2.1" escape-string-regexp "^1.0.2" has-ansi "^2.0.0" strip-ansi "^3.0.0" @@ -1335,12 +1346,6 @@ combined-stream@^1.0.5, combined-stream@~1.0.5: dependencies: delayed-stream "~1.0.0" -commander@^2.7.1, commander@^2.8.1, commander@^2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" - dependencies: - graceful-readlink ">= 1.0.0" - commander@0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/commander/-/commander-0.6.1.tgz#fa68a14f6a945d54dbbe50d8cdb3320e9e3b1a06" @@ -1349,6 +1354,12 @@ commander@2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.3.0.tgz#fd430e889832ec353b9acd1de217c11cb3eef873" +commander@^2.7.1, commander@^2.8.1, commander@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" + dependencies: + graceful-readlink ">= 1.0.0" + commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" @@ -1510,18 +1521,18 @@ debug-log@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/debug-log/-/debug-log-1.0.1.tgz#2307632d4c04382b8df8a32f70b895046d52745f" +debug@2.2.0, debug@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" + dependencies: + ms "0.7.1" + debug@^2.1.1, debug@^2.2.0: version "2.6.1" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.1.tgz#79855090ba2c4e3115cc7d8769491d58f0491351" dependencies: ms "0.7.2" -debug@~2.2.0, debug@2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" - dependencies: - ms "0.7.1" - decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" @@ -1592,14 +1603,14 @@ detect-indent@^4.0.0: dependencies: repeating "^2.0.0" -diff@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9" - diff@1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/diff/-/diff-1.4.0.tgz#7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf" +diff@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9" + diffie-hellman@^5.0.0: version "5.0.2" resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.2.tgz#b5835739270cfe26acf632099fded2a07f209e5e" @@ -1744,7 +1755,7 @@ es6-set@~0.1.3: es6-symbol "3" event-emitter "~0.3.4" -es6-symbol@~3.1, es6-symbol@~3.1.0, es6-symbol@3: +es6-symbol@3, es6-symbol@~3.1, es6-symbol@~3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.0.tgz#94481c655e7a7cad82eba832d97d5433496d7ffa" dependencies: @@ -1760,14 +1771,14 @@ es6-weak-map@^2.0.1: es6-iterator "2" es6-symbol "3" -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - escape-string-regexp@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz#4dbc2fe674e71949caf3fb2695ce7f2dc1d9a8d1" +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + escope@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" @@ -1928,6 +1939,14 @@ faker@~3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/faker/-/faker-3.1.0.tgz#0f908faf4e6ec02524e54a57e432c5c013e08c9f" +fast-deep-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff" + +fast-json-stable-stringify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" + fast-levenshtein@~2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" @@ -2122,6 +2141,14 @@ glob-parent@^2.0.0: dependencies: is-glob "^2.0.0" +glob@3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-3.2.3.tgz#e313eeb249c7affaa5c475286b0e115b59839467" + dependencies: + graceful-fs "~2.0.0" + inherits "2" + minimatch "~0.2.11" + glob@^5.0.5: version "5.0.15" resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" @@ -2143,14 +2170,6 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6: once "^1.3.0" path-is-absolute "^1.0.0" -glob@3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-3.2.3.tgz#e313eeb249c7affaa5c475286b0e115b59839467" - dependencies: - graceful-fs "~2.0.0" - inherits "2" - minimatch "~0.2.11" - globals@^9.0.0, globals@^9.14.0: version "9.16.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.16.0.tgz#63e903658171ec2d9f51b1d31de5e2b8dc01fb80" @@ -2349,7 +2368,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@2: +inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" @@ -2586,14 +2605,14 @@ is-windows@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.0.tgz#c61d61020c3ebe99261b781bd3d1622395f547f8" -isarray@^1.0.0, isarray@~1.0.0, isarray@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - isarray@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" @@ -2675,13 +2694,6 @@ js-tokens@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" -js-yaml@^3.5.1: - version "3.8.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.1.tgz#782ba50200be7b9e5a8537001b7804db3ad02628" - dependencies: - argparse "^1.0.7" - esprima "^3.1.1" - js-yaml@3.5.5: version "3.5.5" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.5.5.tgz#0377c38017cabc7322b0d1fbcd25a491641f2fbe" @@ -2689,6 +2701,13 @@ js-yaml@3.5.5: argparse "^1.0.2" esprima "^2.6.0" +js-yaml@^3.5.1: + version "3.8.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.1.tgz#782ba50200be7b9e5a8537001b7804db3ad02628" + dependencies: + argparse "^1.0.7" + esprima "^3.1.1" + jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" @@ -2701,7 +2720,7 @@ jsesc@~0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" -json-loader@^0.5.4, json-loader@0.5.4: +json-loader@0.5.4, json-loader@^0.5.4: version "0.5.4" resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.4.tgz#8baa1365a632f58a3c46d20175fc6002c96e37de" @@ -2718,6 +2737,10 @@ json-schema-faker@^0.3.7: faker "~3.1.0" randexp "~0.4.3" +json-schema-traverse@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" + json-schema@0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" @@ -2888,6 +2911,10 @@ lowercase-keys@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.0.tgz#4e3366b39e7f5457e35f1324bdf6f88d0bfc7306" +lru-cache@2: + version "2.7.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952" + lru-cache@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.0.2.tgz#1d17679c069cda5d040991a09dbc2c0db377e55e" @@ -2895,10 +2922,6 @@ lru-cache@^4.0.1: pseudomap "^1.0.1" yallist "^2.0.0" -lru-cache@2: - version "2.7.3" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952" - lrucache@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/lrucache/-/lrucache-0.2.0.tgz#1edc7dc845454a5c7b6bd0cf302f13b85b3f06da" @@ -3009,15 +3032,15 @@ minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" -minimatch@^2.0.3: - version "2.0.10" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7" +"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" dependencies: brace-expansion "^1.0.0" -minimatch@^3.0.0, minimatch@^3.0.2, "minimatch@2 || 3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" +minimatch@^2.0.3: + version "2.0.10" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7" dependencies: brace-expansion "^1.0.0" @@ -3028,6 +3051,10 @@ minimatch@~0.2.11: lru-cache "2" sigmund "~1.0.0" +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + minimist@^1.1.0, minimist@^1.1.3, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" @@ -3036,16 +3063,6 @@ minimist@~0.0.1: version "0.0.10" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - -mkdirp@^0.5.0, mkdirp@^0.5.1, "mkdirp@>=0.5 0", mkdirp@~0.5.0, mkdirp@~0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - dependencies: - minimist "0.0.8" - mkdirp@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.3.0.tgz#1bbf5ab1ba827af23575143490426455f481fe1e" @@ -3056,6 +3073,12 @@ mkdirp@0.5.0: dependencies: minimist "0.0.8" +"mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + mocha@2.3.4: version "2.3.4" resolved "https://registry.yarnpkg.com/mocha/-/mocha-2.3.4.tgz#8629a6fb044f2d225aa4b81a2ae2d001699eb266" @@ -3486,22 +3509,22 @@ public-encrypt@^4.0.0: parse-asn1 "^5.0.0" randombytes "^2.0.1" -punycode@^1.2.4, punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - punycode@1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" -q@^1.0.0: +punycode@^1.2.4, punycode@^1.4.1: version "1.4.1" - resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" q@0.9.7: version "0.9.7" resolved "https://registry.yarnpkg.com/q/-/q-0.9.7.tgz#4de2e6cb3b29088c9e4cbc03bf9d42fb96ce2f75" +q@^1.0.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e" + qs@^6.1.0, qs@~6.3.0: version "6.3.1" resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.1.tgz#918c0b3bcd36679772baf135b1acb4c1651ed79d" @@ -3832,7 +3855,7 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" -rimraf@^2.2.8, rimraf@^2.3.3, rimraf@^2.4.4, rimraf@^2.5.4, rimraf@2: +rimraf@2, rimraf@^2.2.8, rimraf@^2.3.3, rimraf@^2.4.4, rimraf@^2.5.4: version "2.6.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" dependencies: @@ -3876,14 +3899,14 @@ semver-truncate@^1.0.0: dependencies: semver "^5.3.0" +"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@~5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" + semver@^4.0.3: version "4.3.6" resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da" -semver@^5.3.0, semver@~5.3.0, "semver@2 || 3 || 4 || 5": - version "5.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" - sentence-case@^1.1.1, sentence-case@^1.1.2: version "1.1.3" resolved "https://registry.yarnpkg.com/sentence-case/-/sentence-case-1.1.3.tgz#8034aafc2145772d3abe1509aa42c9e1042dc139" @@ -3978,6 +4001,12 @@ source-map-support@^0.4.2: dependencies: source-map "^0.5.3" +source-map@0.1.32: + version "0.1.32" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.32.tgz#c8b6c167797ba4740a8ea33252162ff08591b266" + dependencies: + amdefine ">=0.0.4" + source-map@^0.4.4: version "0.4.4" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" @@ -3988,12 +4017,6 @@ source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1, sour version "0.5.6" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" -source-map@0.1.32: - version "0.1.32" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.32.tgz#c8b6c167797ba4740a8ea33252162ff08591b266" - dependencies: - amdefine ">=0.0.4" - spawn-wrap@1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-1.2.4.tgz#920eb211a769c093eebfbd5b0e7a5d2e68ab2e40" @@ -4063,10 +4086,6 @@ stream-shift@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" -string_decoder@^0.10.25, string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - string-width@^1.0.1, string-width@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" @@ -4082,6 +4101,10 @@ string-width@^2.0.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^3.0.0" +string_decoder@^0.10.25, string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + stringstream@~0.0.4: version "0.0.5" resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" @@ -4112,6 +4135,10 @@ strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" +supports-color@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-1.2.0.tgz#ff1ed1e61169d06b3cf2d588e188b18d8847e17e" + supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" @@ -4122,10 +4149,6 @@ supports-color@^3.1.0, supports-color@^3.1.2: dependencies: has-flag "^1.0.0" -supports-color@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-1.2.0.tgz#ff1ed1e61169d06b3cf2d588e188b18d8847e17e" - swagger-schema-official@2.0.0-bab6bed: version "2.0.0-bab6bed" resolved "https://registry.yarnpkg.com/swagger-schema-official/-/swagger-schema-official-2.0.0-bab6bed.tgz#70070468d6d2977ca5237b2e519ca7d06a2ea3fd" @@ -4284,14 +4307,14 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" -type-detect@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-1.0.0.tgz#762217cc06db258ec48908a1298e8b95121e8ea2" - type-detect@0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-0.1.1.tgz#0ba5ec2a885640e470ea4e8505971900dac58822" +type-detect@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-1.0.0.tgz#762217cc06db258ec48908a1298e8b95121e8ea2" + typedarray@^0.0.6, typedarray@~0.0.5: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" @@ -4376,7 +4399,7 @@ util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" -util@^0.10.3, util@0.10.3: +util@0.10.3, util@^0.10.3: version "0.10.3" resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" dependencies: @@ -4475,6 +4498,10 @@ window-size@0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" +wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + wordwrap@~0.0.2: version "0.0.3" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" @@ -4483,10 +4510,6 @@ wordwrap@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" -wordwrap@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" - wrap-ansi@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" @@ -4627,4 +4650,3 @@ z-schema@^3.16.1: validator "^6.0.0" optionalDependencies: commander "^2.7.1" -