From 5fd2d40333f2558b706176ed1dee90212d0fe06f Mon Sep 17 00:00:00 2001 From: zetlen Date: Sun, 26 Aug 2018 23:36:58 -0500 Subject: [PATCH] feat(upward): test suite and reference impl --- jest.config.js | 2 +- packages/express-upward/package-lock.json | 665 -- packages/express-upward/package.json | 38 - packages/upward-js/bin/server | 35 + packages/upward-js/jest.config.js | 5 + packages/upward-js/lib/Context.js | 102 + packages/upward-js/lib/ContextPath.js | 79 + packages/upward-js/lib/IOAdapter.js | 60 + packages/upward-js/lib/ResolverVisitor.js | 78 + packages/upward-js/lib/UpwardServerError.js | 11 + .../upward-js/lib/__tests__/Context.test.js | 40 + .../lib/__tests__/ResolverVisitor.test.js | 91 + .../lib/__tests__/buildResponse.test.js | 137 + .../upward-js/lib/__tests__/server.test.js | 31 + packages/upward-js/lib/buildResponse.js | 25 + .../AbstractCompiledResource.js | 34 + .../lib/compiledResources/GraphQLDocument.js | 16 + .../lib/compiledResources/MustacheTemplate.js | 100 + .../AbstractCompiledResource.test.js | 35 + .../__tests__/GraphQLDocument.test.js | 97 + .../__tests__/MustacheTemplate.test.js | 145 + .../__tests__/forFileOfType.test.js | 17 + .../upward-js/lib/compiledResources/index.js | 23 + packages/upward-js/lib/index.js | 5 + packages/upward-js/lib/isPrimitive.js | 4 + packages/upward-js/lib/middleware.js | 94 + .../lib/resolvers/AbstractResolver.js | 17 + .../lib/resolvers/ConditionalResolver.js | 54 + .../upward-js/lib/resolvers/FileResolver.js | 101 + .../upward-js/lib/resolvers/InlineResolver.js | 39 + .../lib/resolvers/ServiceResolver.js | 109 + .../lib/resolvers/TemplateResolver.js | 106 + .../__tests__/AbstractResolver.test.js | 9 + .../__tests__/ConditionalResolver.test.js | 157 + .../resolvers/__tests__/FileResolver.test.js | 253 + .../__tests__/InlineResolver.test.js | 34 + .../__tests__/ServiceResolver.test.js | 240 + .../__tests__/TemplateResolver.test.js | 204 + .../lib/resolvers/__tests__/index.test.js | 20 + packages/upward-js/lib/resolvers/index.js | 15 + packages/upward-js/lib/server.js | 29 + packages/upward-js/package-lock.json | 6425 +++++++++++++++++ packages/upward-js/package.json | 57 + packages/upward-js/test_spec.sh | 5 + packages/upward-spec/README.md | 424 +- packages/upward-spec/bin/upward-spec | 67 + packages/upward-spec/package-lock.json | 1617 +++++ packages/upward-spec/package.json | 37 + packages/upward-spec/suite/MockGQLService.js | 19 + .../upward-spec/suite/assertOnResponse.js | 73 + packages/upward-spec/suite/getScenarios.js | 52 + packages/upward-spec/suite/index.js | 6 + packages/upward-spec/suite/runServer.js | 172 + .../001-unknown-config/only-status.yml | 1 + .../scenarios/001-unknown-config/tests.js | 34 + .../001-unknown-config/unparseable.yml | 1 + .../context-is-hello-env-is-world.mst | 1 + .../hello-context-inline-template-json.yml | 15 + .../hello-env-context-file-template.yml | 23 + .../hello-env-inline-template.yml | 10 + .../hello-env-interpolation.yml | 5 + .../hello-file-shortcut.yml | 8 + .../hello-inline-implicit-resolvers.yml | 6 + .../002-static-servers/hello-inline-only.yml | 12 + .../002-static-servers/json-subject.tpt | 1 + .../renders-addressee-alone.mustache | 1 + .../scenarios/002-static-servers/swords.csv | 4 + .../scenarios/002-static-servers/tests.js | 229 + .../cyclic-dependencies.yml | 16 + .../003-request-handling/island-summary.mst | 4 + .../003-request-handling/reflect-request.yml | 32 + .../003-request-handling/route-requests.yml | 64 + .../scenarios/003-request-handling/tests.js | 35 + .../articles-and-authors-schema.graphql | 18 + .../articles-and-authors.yml | 65 + .../scenarios/005-many-resolvers/footer.mst | 1 + .../005-many-resolvers/getArticle.graphql | 10 + .../005-many-resolvers/getAuthor.graphql | 9 + .../scenarios/005-many-resolvers/head.mst | 1 + .../scenarios/005-many-resolvers/header.mst | 2 + .../scenarios/005-many-resolvers/menu.mst | 1 + .../scenarios/005-many-resolvers/notFound.mst | 9 + packages/upward-spec/test_upward_server.sh | 17 +- 83 files changed, 12139 insertions(+), 806 deletions(-) delete mode 100644 packages/express-upward/package-lock.json delete mode 100644 packages/express-upward/package.json create mode 100755 packages/upward-js/bin/server create mode 100644 packages/upward-js/jest.config.js create mode 100644 packages/upward-js/lib/Context.js create mode 100644 packages/upward-js/lib/ContextPath.js create mode 100644 packages/upward-js/lib/IOAdapter.js create mode 100644 packages/upward-js/lib/ResolverVisitor.js create mode 100644 packages/upward-js/lib/UpwardServerError.js create mode 100644 packages/upward-js/lib/__tests__/Context.test.js create mode 100644 packages/upward-js/lib/__tests__/ResolverVisitor.test.js create mode 100644 packages/upward-js/lib/__tests__/buildResponse.test.js create mode 100644 packages/upward-js/lib/__tests__/server.test.js create mode 100644 packages/upward-js/lib/buildResponse.js create mode 100644 packages/upward-js/lib/compiledResources/AbstractCompiledResource.js create mode 100644 packages/upward-js/lib/compiledResources/GraphQLDocument.js create mode 100644 packages/upward-js/lib/compiledResources/MustacheTemplate.js create mode 100644 packages/upward-js/lib/compiledResources/__tests__/AbstractCompiledResource.test.js create mode 100644 packages/upward-js/lib/compiledResources/__tests__/GraphQLDocument.test.js create mode 100644 packages/upward-js/lib/compiledResources/__tests__/MustacheTemplate.test.js create mode 100644 packages/upward-js/lib/compiledResources/__tests__/forFileOfType.test.js create mode 100644 packages/upward-js/lib/compiledResources/index.js create mode 100644 packages/upward-js/lib/index.js create mode 100644 packages/upward-js/lib/isPrimitive.js create mode 100644 packages/upward-js/lib/middleware.js create mode 100644 packages/upward-js/lib/resolvers/AbstractResolver.js create mode 100644 packages/upward-js/lib/resolvers/ConditionalResolver.js create mode 100644 packages/upward-js/lib/resolvers/FileResolver.js create mode 100644 packages/upward-js/lib/resolvers/InlineResolver.js create mode 100644 packages/upward-js/lib/resolvers/ServiceResolver.js create mode 100644 packages/upward-js/lib/resolvers/TemplateResolver.js create mode 100644 packages/upward-js/lib/resolvers/__tests__/AbstractResolver.test.js create mode 100644 packages/upward-js/lib/resolvers/__tests__/ConditionalResolver.test.js create mode 100644 packages/upward-js/lib/resolvers/__tests__/FileResolver.test.js create mode 100644 packages/upward-js/lib/resolvers/__tests__/InlineResolver.test.js create mode 100644 packages/upward-js/lib/resolvers/__tests__/ServiceResolver.test.js create mode 100644 packages/upward-js/lib/resolvers/__tests__/TemplateResolver.test.js create mode 100644 packages/upward-js/lib/resolvers/__tests__/index.test.js create mode 100644 packages/upward-js/lib/resolvers/index.js create mode 100644 packages/upward-js/lib/server.js create mode 100644 packages/upward-js/package-lock.json create mode 100644 packages/upward-js/package.json create mode 100755 packages/upward-js/test_spec.sh create mode 100755 packages/upward-spec/bin/upward-spec create mode 100644 packages/upward-spec/package-lock.json create mode 100644 packages/upward-spec/package.json create mode 100644 packages/upward-spec/suite/MockGQLService.js create mode 100644 packages/upward-spec/suite/assertOnResponse.js create mode 100644 packages/upward-spec/suite/getScenarios.js create mode 100644 packages/upward-spec/suite/index.js create mode 100644 packages/upward-spec/suite/runServer.js create mode 100644 packages/upward-spec/suite/scenarios/001-unknown-config/only-status.yml create mode 100644 packages/upward-spec/suite/scenarios/001-unknown-config/tests.js create mode 100644 packages/upward-spec/suite/scenarios/001-unknown-config/unparseable.yml create mode 100644 packages/upward-spec/suite/scenarios/002-static-servers/context-is-hello-env-is-world.mst create mode 100644 packages/upward-spec/suite/scenarios/002-static-servers/hello-context-inline-template-json.yml create mode 100644 packages/upward-spec/suite/scenarios/002-static-servers/hello-env-context-file-template.yml create mode 100644 packages/upward-spec/suite/scenarios/002-static-servers/hello-env-inline-template.yml create mode 100644 packages/upward-spec/suite/scenarios/002-static-servers/hello-env-interpolation.yml create mode 100644 packages/upward-spec/suite/scenarios/002-static-servers/hello-file-shortcut.yml create mode 100644 packages/upward-spec/suite/scenarios/002-static-servers/hello-inline-implicit-resolvers.yml create mode 100644 packages/upward-spec/suite/scenarios/002-static-servers/hello-inline-only.yml create mode 100644 packages/upward-spec/suite/scenarios/002-static-servers/json-subject.tpt create mode 100644 packages/upward-spec/suite/scenarios/002-static-servers/renders-addressee-alone.mustache create mode 100644 packages/upward-spec/suite/scenarios/002-static-servers/swords.csv create mode 100644 packages/upward-spec/suite/scenarios/002-static-servers/tests.js create mode 100644 packages/upward-spec/suite/scenarios/003-request-handling/cyclic-dependencies.yml create mode 100644 packages/upward-spec/suite/scenarios/003-request-handling/island-summary.mst create mode 100644 packages/upward-spec/suite/scenarios/003-request-handling/reflect-request.yml create mode 100644 packages/upward-spec/suite/scenarios/003-request-handling/route-requests.yml create mode 100644 packages/upward-spec/suite/scenarios/003-request-handling/tests.js create mode 100644 packages/upward-spec/suite/scenarios/005-many-resolvers/articles-and-authors-schema.graphql create mode 100644 packages/upward-spec/suite/scenarios/005-many-resolvers/articles-and-authors.yml create mode 100644 packages/upward-spec/suite/scenarios/005-many-resolvers/footer.mst create mode 100644 packages/upward-spec/suite/scenarios/005-many-resolvers/getArticle.graphql create mode 100644 packages/upward-spec/suite/scenarios/005-many-resolvers/getAuthor.graphql create mode 100644 packages/upward-spec/suite/scenarios/005-many-resolvers/head.mst create mode 100644 packages/upward-spec/suite/scenarios/005-many-resolvers/header.mst create mode 100644 packages/upward-spec/suite/scenarios/005-many-resolvers/menu.mst create mode 100644 packages/upward-spec/suite/scenarios/005-many-resolvers/notFound.mst diff --git a/jest.config.js b/jest.config.js index 4be4f553a2..73b22d0824 100644 --- a/jest.config.js +++ b/jest.config.js @@ -2,9 +2,9 @@ const testPathRE = /(^\/packages\/[^\/]+\/|\.spec|\/__tests?__)/g; const testPathToFilePath = filepath => filepath.replace(testPathRE, ''); module.exports = { projects: [ - 'packages/express-upward', 'packages/peregrine', 'packages/pwa-buildpack', + 'packages/upward-js', 'packages/venia-concept', 'scripts' ], diff --git a/packages/express-upward/package-lock.json b/packages/express-upward/package-lock.json deleted file mode 100644 index bbc3838f0a..0000000000 --- a/packages/express-upward/package-lock.json +++ /dev/null @@ -1,665 +0,0 @@ -{ - "name": "@magento/express-upward", - "version": "0.1.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@types/async": { - "version": "2.0.49", - "resolved": "https://registry.npmjs.org/@types/async/-/async-2.0.49.tgz", - "integrity": "sha512-Benr3i5odUkvpFkOpzGqrltGdbSs+EVCkEBGXbuR7uT0VzhXKIkhem6PDzHdx5EonA+rfbB3QvP6aDOw5+zp5Q==", - "optional": true - }, - "@types/graphql": { - "version": "0.12.6", - "resolved": "https://registry.npmjs.org/@types/graphql/-/graphql-0.12.6.tgz", - "integrity": "sha512-wXAVyLfkG1UMkKOdMijVWFky39+OD/41KftzqfX1Oejd0Gm6dOIKjCihSVECg6X7PHjftxXmfOKA/d1H79ZfvQ==" - }, - "@types/zen-observable": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@types/zen-observable/-/zen-observable-0.8.0.tgz", - "integrity": "sha512-te5lMAWii1uEJ4FwLjzdlbw3+n0FZNOvFXHxQDKeT0dilh7HOzdMzV2TrJVUzq8ep7J4Na8OUYPRLSQkJHAlrg==" - }, - "accepts": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", - "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", - "dev": true, - "requires": { - "mime-types": "~2.1.18", - "negotiator": "0.6.1" - } - }, - "apollo-boost": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/apollo-boost/-/apollo-boost-0.1.13.tgz", - "integrity": "sha512-oaAHQO6xBPLtK3cK4+FYT3/BR3RFUYvldlK3zTn6JD7AL4lMovvvV68S+AZyQlECS7Cy3EjFqsANmAMbvvJxSA==", - "requires": { - "apollo-cache": "^1.1.14", - "apollo-cache-inmemory": "^1.2.7", - "apollo-client": "^2.3.8", - "apollo-link": "^1.0.6", - "apollo-link-error": "^1.0.3", - "apollo-link-http": "^1.3.1", - "apollo-link-state": "^0.4.0", - "graphql-tag": "^2.4.2" - } - }, - "apollo-cache": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/apollo-cache/-/apollo-cache-1.1.14.tgz", - "integrity": "sha512-Zmo9nVqpWFogki2QyulX6Xx6KYXMyYWX74grwgsYYUOukl4pIAdtYyK8e874o0QDgzSOq5AYPXjtfkoVpqhCRw==", - "requires": { - "apollo-utilities": "^1.0.18" - } - }, - "apollo-cache-inmemory": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/apollo-cache-inmemory/-/apollo-cache-inmemory-1.2.7.tgz", - "integrity": "sha512-ikL3hWsd1DejiZSAuiGnX6TG3cKAZmkMTZZfNZggp9vcTa47kfPqms/pX0F4iajCJP/p7/AllhbpsQ3zVMOZGg==", - "requires": { - "apollo-cache": "^1.1.14", - "apollo-utilities": "^1.0.18", - "graphql-anywhere": "^4.1.16" - } - }, - "apollo-client": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/apollo-client/-/apollo-client-2.3.8.tgz", - "integrity": "sha512-X5wsBD1be1P/mScGsH5H+2hIE8d78WAfqOvFvBpP+C+jzJ9387uHLyFmYYMLRRqDQ3ihjI4iSID7KEOW2gyCcQ==", - "requires": { - "@types/async": "2.0.49", - "@types/zen-observable": "^0.8.0", - "apollo-cache": "^1.1.14", - "apollo-link": "^1.0.0", - "apollo-link-dedup": "^1.0.0", - "apollo-utilities": "^1.0.18", - "symbol-observable": "^1.0.2", - "zen-observable": "^0.8.0" - } - }, - "apollo-link": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/apollo-link/-/apollo-link-1.2.2.tgz", - "integrity": "sha512-Uk/BC09dm61DZRDSu52nGq0nFhq7mcBPTjy5EEH1eunJndtCaNXQhQz/BjkI2NdrfGI+B+i5he6YSoRBhYizdw==", - "requires": { - "@types/graphql": "0.12.6", - "apollo-utilities": "^1.0.0", - "zen-observable-ts": "^0.8.9" - } - }, - "apollo-link-dedup": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/apollo-link-dedup/-/apollo-link-dedup-1.0.9.tgz", - "integrity": "sha512-RbuEKpmSHVMtoREMPh2wUFTeh65q+0XPVeqgaOP/rGEAfvLyOMvX0vT2nVaejMohoMxuUnfZwpldXaDFWnlVbg==", - "requires": { - "apollo-link": "^1.2.2" - } - }, - "apollo-link-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/apollo-link-error/-/apollo-link-error-1.1.0.tgz", - "integrity": "sha512-4Vu/IUn6Kn6+Fthym4iuqypCKcLdwTg3MaCvtLdaLbt9X2hNCq3y8mv6vuWIlAY51X8wKhCgYghQSOs5R/embQ==", - "requires": { - "apollo-link": "^1.2.2" - } - }, - "apollo-link-http": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/apollo-link-http/-/apollo-link-http-1.5.4.tgz", - "integrity": "sha512-e9Ng3HfnW00Mh3TI6DhNRfozmzQOtKgdi+qUAsHBOEcTP0PTAmb+9XpeyEEOueLyO0GXhB92HUCIhzrWMXgwyg==", - "requires": { - "apollo-link": "^1.2.2", - "apollo-link-http-common": "^0.2.4" - } - }, - "apollo-link-http-common": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/apollo-link-http-common/-/apollo-link-http-common-0.2.4.tgz", - "integrity": "sha512-4j6o6WoXuSPen9xh4NBaX8/vL98X1xY2cYzUEK1F8SzvHe2oFONfxJBTekwU8hnvapcuq8Qh9Uct+gelu8T10g==", - "requires": { - "apollo-link": "^1.2.2" - } - }, - "apollo-link-state": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/apollo-link-state/-/apollo-link-state-0.4.1.tgz", - "integrity": "sha512-69/til4ENfl/Fvf7br2xSsLSBcxcXPbOHVNkzLLejvUZickl93HLO4/fO+uvoBi4dCYRgN17Zr8FwI41ueRx0g==", - "requires": { - "apollo-utilities": "^1.0.8", - "graphql-anywhere": "^4.1.0-alpha.0" - } - }, - "apollo-utilities": { - "version": "1.0.18", - "resolved": "https://registry.npmjs.org/apollo-utilities/-/apollo-utilities-1.0.18.tgz", - "integrity": "sha512-hHrmsoMYzzzfUlTOPpxr0qRpTLotMkBIQ93Ub7ki2SWdLfYYKrp6/KB8YOUkbCwXxSFvYSV24ccuwUEqZIaHIA==", - "requires": { - "fast-json-stable-stringify": "^2.0.0" - } - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", - "dev": true - }, - "body-parser": { - "version": "1.18.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz", - "integrity": "sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=", - "dev": true, - "requires": { - "bytes": "3.0.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.1", - "http-errors": "~1.6.2", - "iconv-lite": "0.4.19", - "on-finished": "~2.3.0", - "qs": "6.5.1", - "raw-body": "2.3.2", - "type-is": "~1.6.15" - } - }, - "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", - "dev": true - }, - "connect": { - "version": "3.6.6", - "resolved": "https://registry.npmjs.org/connect/-/connect-3.6.6.tgz", - "integrity": "sha1-Ce/2xVr3I24TcTWnJXSFi2eG9SQ=", - "requires": { - "debug": "2.6.9", - "finalhandler": "1.1.0", - "parseurl": "~1.3.2", - "utils-merge": "1.0.1" - }, - "dependencies": { - "finalhandler": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz", - "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.1", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "statuses": "~1.3.1", - "unpipe": "~1.0.0" - } - }, - "statuses": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", - "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=" - } - } - }, - "content-disposition": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", - "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=", - "dev": true - }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", - "dev": true - }, - "cookie": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", - "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", - "dev": true - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", - "dev": true - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", - "dev": true - }, - "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", - "dev": true - }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" - }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", - "dev": true - }, - "express": { - "version": "4.16.3", - "resolved": "https://registry.npmjs.org/express/-/express-4.16.3.tgz", - "integrity": "sha1-avilAjUNsyRuzEvs9rWjTSL37VM=", - "dev": true, - "requires": { - "accepts": "~1.3.5", - "array-flatten": "1.1.1", - "body-parser": "1.18.2", - "content-disposition": "0.5.2", - "content-type": "~1.0.4", - "cookie": "0.3.1", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.1.1", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.3", - "qs": "6.5.1", - "range-parser": "~1.2.0", - "safe-buffer": "5.1.1", - "send": "0.16.2", - "serve-static": "1.13.2", - "setprototypeof": "1.1.0", - "statuses": "~1.4.0", - "type-is": "~1.6.16", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - } - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" - }, - "finalhandler": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", - "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", - "dev": true, - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "statuses": "~1.4.0", - "unpipe": "~1.0.0" - } - }, - "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", - "dev": true - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", - "dev": true - }, - "graphql": { - "version": "0.13.2", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-0.13.2.tgz", - "integrity": "sha512-QZ5BL8ZO/B20VA8APauGBg3GyEgZ19eduvpLWoq5x7gMmWnHoy8rlQWPLmWgFvo1yNgjSEFMesmS4R6pPr7xog==", - "requires": { - "iterall": "^1.2.1" - } - }, - "graphql-anywhere": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/graphql-anywhere/-/graphql-anywhere-4.1.16.tgz", - "integrity": "sha512-DNQGxrh2p8w4vQwHIW1Sw65ZDbOr6ktQCeol6itH3LeWy1a3IoZ67jxrhgrHM+Upg8oiazvteSr64VRxJ8n5+g==", - "requires": { - "apollo-utilities": "^1.0.18" - } - }, - "graphql-tag": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.9.2.tgz", - "integrity": "sha512-qnNmof9pAqj/LUzs3lStP0Gw1qhdVCUS7Ab7+SUB6KD5aX1uqxWQRwMnOGTkhKuLvLNIs1TvNz+iS9kUGl1MhA==" - }, - "http-errors": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", - "dev": true, - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" - } - }, - "iconv-lite": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", - "dev": true - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "ipaddr.js": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz", - "integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4=", - "dev": true - }, - "iterall": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.2.2.tgz", - "integrity": "sha512-yynBb1g+RFUPY64fTrFv7nsjRrENBQJaX2UL+2Szc9REFrSNm1rpSXHGzhmAy7a9uv3vlvgBlXnf9RqmPH1/DA==" - }, - "js-yaml": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", - "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", - "dev": true - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", - "dev": true - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", - "dev": true - }, - "mime": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", - "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==", - "dev": true - }, - "mime-db": { - "version": "1.35.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.35.0.tgz", - "integrity": "sha512-JWT/IcCTsB0Io3AhWUMjRqucrHSPsSf2xKLaRldJVULioggvkJvggZ3VXNNSRkCddE6D+BUI4HEIZIA2OjwIvg==", - "dev": true - }, - "mime-types": { - "version": "2.1.19", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.19.tgz", - "integrity": "sha512-P1tKYHVSZ6uFo26mtnve4HQFE3koh1UWVkp8YUC+ESBHe945xWSoXuHHiGarDqcEZ+whpCDnlNw5LON0kLo+sw==", - "dev": true, - "requires": { - "mime-db": "~1.35.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "negotiator": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", - "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=", - "dev": true - }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "requires": { - "ee-first": "1.1.1" - } - }, - "parseurl": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", - "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=" - }, - "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", - "dev": true - }, - "proxy-addr": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz", - "integrity": "sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==", - "dev": true, - "requires": { - "forwarded": "~0.1.2", - "ipaddr.js": "1.8.0" - } - }, - "qs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", - "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==", - "dev": true - }, - "range-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=", - "dev": true - }, - "raw-body": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", - "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", - "dev": true, - "requires": { - "bytes": "3.0.0", - "http-errors": "1.6.2", - "iconv-lite": "0.4.19", - "unpipe": "1.0.0" - }, - "dependencies": { - "depd": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", - "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=", - "dev": true - }, - "http-errors": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", - "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", - "dev": true, - "requires": { - "depd": "1.1.1", - "inherits": "2.0.3", - "setprototypeof": "1.0.3", - "statuses": ">= 1.3.1 < 2" - } - }, - "setprototypeof": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", - "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=", - "dev": true - } - } - }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", - "dev": true - }, - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" - }, - "send": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", - "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", - "dev": true, - "requires": { - "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "~1.6.2", - "mime": "1.4.1", - "ms": "2.0.0", - "on-finished": "~2.3.0", - "range-parser": "~1.2.0", - "statuses": "~1.4.0" - } - }, - "serve-static": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", - "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", - "dev": true, - "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.2", - "send": "0.16.2" - } - }, - "setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", - "dev": true - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" - }, - "statuses": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==", - "dev": true - }, - "symbol-observable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", - "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==" - }, - "type-is": { - "version": "1.6.16", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", - "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", - "dev": true, - "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.18" - } - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" - }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" - }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", - "dev": true - }, - "xml2js": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", - "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", - "requires": { - "sax": ">=0.6.0", - "xmlbuilder": "~9.0.1" - } - }, - "xmlbuilder": { - "version": "9.0.7", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", - "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=" - }, - "zen-observable": { - "version": "0.8.9", - "resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.8.9.tgz", - "integrity": "sha512-Y9kPzjGvIZ5jchSlqlCpBW3I82zBBL4z+ulXDRVA1NwsKzjt5kwAi+gOYIy0htNkfuehGZZtP5mRXHRV6TjDWw==" - }, - "zen-observable-ts": { - "version": "0.8.9", - "resolved": "https://registry.npmjs.org/zen-observable-ts/-/zen-observable-ts-0.8.9.tgz", - "integrity": "sha512-KJz2O8FxbAdAU5CSc8qZ1K2WYEJb1HxS6XDRF+hOJ1rOYcg6eTMmS9xYHCXzqZZzKw6BbXWyF4UpwSsBQnHJeA==", - "requires": { - "zen-observable": "^0.8.0" - } - } - } -} diff --git a/packages/express-upward/package.json b/packages/express-upward/package.json deleted file mode 100644 index 32cb3f3bf6..0000000000 --- a/packages/express-upward/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "@magento/express-upward", - "version": "0.1.0", - "description": "Implementation of the UPWARD spec in NodeJS as an Express middleware", - "main": "./lib/express-upward.js", - "files": [ - "./lib" - ], - "engines": { - "node": ">=8.0.0" - }, - "repository": "github:magento-research/pwa-studio", - "keywords": [ - "magento", - "pwa", - "express", - "upward" - ], - "author": "Magento Commerce", - "license": "SEE LICENSE IN LICENSE.txt", - "bugs": { - "url": "https://github.com/magento-research/pwa-studio/issues" - }, - "homepage": "https://github.com/magento-research/pwa-studio/tree/master/packages/express-upward#readme", - "dependencies": { - "apollo-boost": "^0.1.13", - "connect": "^3.6.6", - "graphql": "^0.13.2", - "js-yaml": "^3.12.0", - "xml2js": "^0.4.19" - }, - "devDependencies": { - "express": "^4.16.3" - }, - "peerDependencies": { - "express": "^4.16.3" - } -} diff --git a/packages/upward-js/bin/server b/packages/upward-js/bin/server new file mode 100755 index 0000000000..1b94fdd3b8 --- /dev/null +++ b/packages/upward-js/bin/server @@ -0,0 +1,35 @@ +#!/usr/bin/env node + +function castValue(value) { + const mapping = { + false: false, + true: true + }; + const lowered = value.toString().toLowerCase(); + if (mapping.hasOwnProperty(lowered)) { + return mapping[lowered]; + } + if (value.match(/^\d*\.?\d+$/)) { + return Number(value); + } + return value; +} + +function envToConfig(envPrefix) { + return Object.entries(process.env).reduce((cfg, [key, value]) => { + if (key.startsWith(envPrefix)) { + const camelCased = key + .slice(envPrefix.length) + .toLowerCase() + .replace(/_[a-z]/g, match => match.charAt(1).toUpperCase()); + cfg[camelCased] = castValue(value); + } + return cfg; + }, {}); +} + +const config = envToConfig('UPWARD_JS_'); +require('../lib/server.js')(config).catch(e => { + console.error(e.stack); + process.exit(e.errno || 1); +}); diff --git a/packages/upward-js/jest.config.js b/packages/upward-js/jest.config.js new file mode 100644 index 0000000000..79d403e2ba --- /dev/null +++ b/packages/upward-js/jest.config.js @@ -0,0 +1,5 @@ +module.exports = { + collectCoverage: true, + collectCoverageFrom: ['/lib/**/*.js'], + coverageReporters: ['text'] +}; diff --git a/packages/upward-js/lib/Context.js b/packages/upward-js/lib/Context.js new file mode 100644 index 0000000000..0890d77103 --- /dev/null +++ b/packages/upward-js/lib/Context.js @@ -0,0 +1,102 @@ +const debug = require('debug')('upward-js:Context'); +const { pick } = require('lodash'); +const { URL } = require('url'); + +const ContextPath = require('./ContextPath'); + +const statusCodes = Array.from({ length: 600 }, (_, i) => i + 100); +const constants = new Set([ + 'GET', + 'POST', + 'mustache', + 'text/html', + 'text/plain', + 'application/json', + 'utf-8', + 'utf8', + 'latin-1', + 'base64', + 'hex', + ...statusCodes, + ...statusCodes.map(code => code.toString()) +]); + +class Context { + static fromRequest(env, request) { + debug('generating from request: %O', request); + const hostedUrl = new URL(request.url, `http://${request.get('host')}`); + debug('url derived from host is %O', hostedUrl); + const url = pick(hostedUrl, [ + 'host', + 'hostname', + 'port', + 'pathname', + 'path', + 'search', + 'searchParams' + ]); + url.query = request.query; + return new Context({ + env, + request: { + url, + headers: request.headers, + headerEntries: Object.entries(request.headers).map( + ([name, value]) => ({ name, value }) + ), + queryEntries: Object.entries(url.query).map( + ([name, value]) => ({ name, value }) + ) + } + }); + } + + constructor(data) { + this._data = data; + this._promises = new Map(); + } + + setVisitor(visitor) { + this.visitor = visitor; + } + + async get(lookup) { + debug('lookup %s', lookup); + const path = ContextPath.from(lookup); + if (constants.has(path.toString())) { + debug('%s is a constant', lookup); + return lookup; + } + const base = path.base(); + debug('%s is from context base %s', lookup, base); + if (!this._data.hasOwnProperty(base)) { + debug('%s not yet assigned, acquiring promise handle', base); + let promise = this._promises.get(base); + if (!promise) { + debug('%s has never been requested, visiting from root', base); + promise = this.visitor + .downward(base) + .then(value => this.set(base, value)); + this._promises.set(base, promise); + } + await promise; + } + return path.getFrom(this._data); + } + + set(base, value, override) { + const isSet = constants.has(base) || this._data.hasOwnProperty(base); + if (isSet && !override) { + throw new Error( + `Attempted to reassign context property '${base}' to '${value}'. Context properties cannot be reassigned.` + ); + } + this._data[base] = value; + } + + forget(base) { + delete this._data[base]; + } +} + +module.exports = Context; diff --git a/packages/upward-js/lib/ContextPath.js b/packages/upward-js/lib/ContextPath.js new file mode 100644 index 0000000000..a041a6213c --- /dev/null +++ b/packages/upward-js/lib/ContextPath.js @@ -0,0 +1,79 @@ +const debug = require('debug')('upward-js:ContextPath'); +const illegalPathChars = /(^\.+)|[^\.\w\/]/; +const contextPathCache = new Map(); +class ContextPath { + static from(lookup) { + if (lookup instanceof ContextPath) { + return lookup; + } + if (typeof lookup !== 'string') { + throw new Error( + `Internal error: Cannot build ContextPath from non-string ${lookup}` + ); + } + if (illegalPathChars.test(lookup)) { + throw new Error( + `Illegal context property name found: ${lookup}\nContext properties must be dot-separated strings and contain no special characters, and cannot begin with a dot.` + ); + } + if (contextPathCache.has(lookup)) { + return contextPathCache.get(lookup); + } + const segments = lookup.split('.'); + const path = segments.reduce( + (parent, newSegment) => parent.extend(newSegment), + ContextPath.root + ); + contextPathCache.set(lookup, path); + return path; + } + extend(newSegment) { + const fullPath = this._segments.concat(newSegment); + const fullPathString = fullPath.join('.'); + let path = contextPathCache.get(fullPathString); + if (!path) { + path = new ContextPath(fullPath); + contextPathCache.set(fullPathString, path); + } + return path; + } + constructor(segments) { + this._segments = segments; + } + base() { + return this._segments[0]; + } + getFrom(obj) { + let current = obj; + for (const segment of this._segments) { + debug('traverse %o for %s', current, segment); + if (!current || !current.hasOwnProperty(segment)) { + return; + } + current = current[segment]; + } + return current; + } + // contains(otherPath) { + // return this._segments.every((segment, i) => otherPath.keyAt(i) === i); + // } + // containsSegment(segment) { + // return this._segments.some(mySegment => mySegment === segment); + // } + // depth() { + // return this._segments.length; + // } + // keyAt(index) { + // return this._segments[index]; + // } + // relative(ancestor) { + // return this._segments.slice(ancestor.depth()); + // } + toString() { + return this._segments.join('.'); + } +} + +ContextPath.root = new ContextPath([]); + +module.exports = ContextPath; diff --git a/packages/upward-js/lib/IOAdapter.js b/packages/upward-js/lib/IOAdapter.js new file mode 100644 index 0000000000..939312fe6f --- /dev/null +++ b/packages/upward-js/lib/IOAdapter.js @@ -0,0 +1,60 @@ +const debug = require('debug')('upward-js:IOAdapter'); +const containsPath = require('contains-path'); +const { resolve, dirname } = require('path'); +const { readFile: fsReadFile } = require('fs'); +const { join } = require('path'); +const { promisify } = require('util'); + +const readFile = promisify(fsReadFile); +class IOAdapter { + static default(upwardPath) { + debug(`creating default IO from ${upwardPath}`); + const baseDir = dirname(upwardPath); + debug(`baseDir ${baseDir}`); + return new IOAdapter({ + networkFetch: require('node-fetch'), + readFile: (filePath, enc) => { + // prevent path traversal above baseDir + const resolvedPath = resolve(baseDir, filePath); + if (!containsPath(resolvedPath, baseDir)) { + throw new Error( + `Cannot read ${resolvedPath} because it is outside ${baseDir}` + ); + } + return readFile(resolvedPath, enc); + } + }); + } + constructor(implementations) { + const missingImpls = ['readFile', 'networkFetch'].reduce( + (missing, method) => + method in implementations + ? missing + : missing + + `Must provide an implementation of '${method}\n`, + '' + ); + if (missingImpls) { + throw new Error(`Error creating IOAdapter:\n${missingImpls}`); + } + Object.assign(this, implementations); + } + /** + * Works like promisified Node `fs.readFile`. (Injected for testability.) + * Cannot traverse below working directory. + * @param {string} path Path of file to read. + * @param {string} [charset] Character set, e.g. 'utf-8'. + * @return {Promise} Promise for file contents. + */ + async readFile(filePath, charset) {} + + /** + * Works like `node-fetch`. (Injected for testability.) + * @param {string|URL} URL URL to fetch. + * @param {object} options Fetch options, see node-fetch docs. + * @return {Promise} + */ + async networkFetch(url, options) {} +} + +module.exports = IOAdapter; diff --git a/packages/upward-js/lib/ResolverVisitor.js b/packages/upward-js/lib/ResolverVisitor.js new file mode 100644 index 0000000000..6f46797ef0 --- /dev/null +++ b/packages/upward-js/lib/ResolverVisitor.js @@ -0,0 +1,78 @@ +const debug = require('debug')('upward-js:ResolverVisitor'); +const { inspect } = require('util'); +const { ResolverList, ResolversByType } = require('./resolvers'); +const isPrimitive = require('./isPrimitive'); + +class ResolverVisitor { + constructor(io, rootDefinition, context) { + this.io = io; + this.rootDefinition = rootDefinition; + this.context = context; + this.context.setVisitor(this); + } + async downward(contextName) { + debug('resolving downward: %s', contextName); + return this.upward(this.rootDefinition, contextName); + } + async upward(definition, propertyName) { + debug('resolving upward: %s from %o', propertyName, definition); + if (!definition.hasOwnProperty(propertyName)) { + throw new Error(`Context value '${propertyName}' not defined.`); + } + const defined = definition[propertyName]; + + const resolver = this.getResolverFor(defined, propertyName); + + if (resolver) { + return resolver.resolve(defined); + } + + if (isPrimitive(defined)) { + const definedString = defined.toString(); + debug( + 'defined: %s is primitive, yielding to context.get("%s")', + definedString, + definedString + ); + return this.context.get(definedString); + } + + if (typeof defined !== 'object' || !this.getResolverFailure) { + throw new Error(`Unexpected value in config: ${defined}`); + } else { + throw new Error(this.getResolverFailure); + } + } + getResolverFor(defined, propertyName) { + let Resolver; + for (Resolver of ResolverList) { + const recognized = + Resolver.recognize && Resolver.recognize(defined); + if (recognized) { + return { + resolve: () => new Resolver(this).resolve(recognized) + }; + } + } + if (defined.resolver) { + Resolver = ResolversByType[defined.resolver]; + if (!Resolver) { + this.getResolverFailure = `Unrecognized resolver type: ${ + defined.resolver + }`; + } + } else { + Resolver = ResolverList.find(({ telltale }) => + defined.hasOwnProperty(telltale) + ); + if (!Resolver) { + this.getResolverFailure = `Unrecognized configuration. Could not match a resolver to ${propertyName}: ${inspect( + defined + )}`; + } + } + if (Resolver) return new Resolver(this); + } +} + +module.exports = ResolverVisitor; diff --git a/packages/upward-js/lib/UpwardServerError.js b/packages/upward-js/lib/UpwardServerError.js new file mode 100644 index 0000000000..a7a4ffeac9 --- /dev/null +++ b/packages/upward-js/lib/UpwardServerError.js @@ -0,0 +1,11 @@ +class UpwardServerError extends Error { + get name() { + return 'UpwardServerError'; + } + constructor(originalError, message) { + super(originalError); + this.message += ' -- ' + message; + } +} + +module.exports = UpwardServerError; diff --git a/packages/upward-js/lib/__tests__/Context.test.js b/packages/upward-js/lib/__tests__/Context.test.js new file mode 100644 index 0000000000..ed85d59ecd --- /dev/null +++ b/packages/upward-js/lib/__tests__/Context.test.js @@ -0,0 +1,40 @@ +const Context = require('../Context'); + +test('promises are cached', async () => { + const context = new Context({}); + const downward = jest.fn(async () => 'same'); + context.setVisitor({ downward }); + + await Promise.all([ + expect(context.get('identity')).resolves.toBe('same'), + expect(context.get('identity')).resolves.toBe('same') + ]); + expect(context._promises.size).toBe(1); +}); + +test('cannot set context property twice', () => { + const context = new Context({ immu: 'table' }); + expect(() => + context.set('immu', 'nized') + ).toThrowErrorMatchingInlineSnapshot( + `"Attempted to reassign context property 'immu' to 'nized'. Context properties cannot be reassigned."` + ); +}); + +test('forget() deletes ephemeral data', async () => { + const context = new Context({ mu: 'table' }); + const downward = jest.fn(async () => 'nificent'); + context.setVisitor({ downward }); + + await expect(context.get('mu')).resolves.toBe('table'); + expect(downward).not.toHaveBeenCalled(); + context.forget('mu'); + await expect(context.get('mu')).resolves.toBe('nificent'); + expect(downward).toHaveBeenCalledWith('mu'); +}); + +test('constants are always present', async () => { + const context = new Context({}); + await expect(context.get('text/plain')).resolves.toBe('text/plain'); + await expect(context.get('208')).resolves.toBe('208'); +}); diff --git a/packages/upward-js/lib/__tests__/ResolverVisitor.test.js b/packages/upward-js/lib/__tests__/ResolverVisitor.test.js new file mode 100644 index 0000000000..fdd8d6464a --- /dev/null +++ b/packages/upward-js/lib/__tests__/ResolverVisitor.test.js @@ -0,0 +1,91 @@ +const ResolverVisitor = require('../ResolverVisitor'); + +const mockIO = () => ({ + readFile: jest.fn(), + networkFetch: jest.fn() +}); + +const mockContext = () => ({ + setVisitor: jest.fn(), + get: jest.fn() +}); + +test('binds itself to supplied context', async () => { + const context = mockContext(); + const visitor = new ResolverVisitor(null, null, context); + expect(context.setVisitor).toHaveBeenCalledWith(visitor); +}); + +test('.upward() errors on a value not found in definition', async () => { + const visitor = new ResolverVisitor(null, null, mockContext()); + await expect(visitor.upward({}, 'foo')).rejects.toThrow( + "Context value 'foo' not defined." + ); +}); + +test('.upward() derives resolvers from shortcut strings', async () => { + const io = mockIO(); + const context = mockContext(); + context.get.mockRejectedValue('Should have resolved FileResolver shortcut'); + io.readFile.mockReturnValueOnce('sepia'); + const visitor = new ResolverVisitor(io, null, context); + await expect( + visitor.upward({ cuttlefish: './ink' }, 'cuttlefish') + ).resolves.toEqual('sepia'); + expect(io.readFile).toHaveBeenCalledWith('./ink', 'utf8'); + expect(context.get).not.toHaveBeenCalled(); +}); + +test('.upward() gets primitive from context', async () => { + const context = mockContext(); + context.get.mockResolvedValueOnce('green'); + const visitor = new ResolverVisitor(null, null, context); + await expect(visitor.upward({ foo: 'bar' }, 'foo')).resolves.toBe('green'); + expect(context.get).toHaveBeenCalledWith('bar'); +}); + +test('.upward() errors on a non-primitive, non-object value', async () => { + const visitor = new ResolverVisitor(null, null, mockContext()); + await expect(visitor.upward({ foo: () => {} }, 'foo')).rejects.toThrow( + 'Unexpected value' + ); +}); + +test('.upward() finds resolvers using `resolver` property', async () => { + const visitor = new ResolverVisitor(mockIO(), null, mockContext()); + await expect( + visitor.upward( + { foo: { resolver: 'inline', inline: 'fighters' } }, + 'foo' + ) + ).resolves.toEqual('fighters'); +}); + +test('.upward() throws on an unrecognized `resolver` property', async () => { + const visitor = new ResolverVisitor(mockIO(), null, mockContext()); + await expect( + visitor.upward({ foo: { resolver: 'wat', no: 'really?' } }, 'foo') + ).rejects.toThrow('Unrecognized resolver type'); +}); + +test('.upward() derives resolver from telltale property', async () => { + const visitor = new ResolverVisitor(mockIO(), null, mockContext()); + await expect( + visitor.upward({ foo: { inline: 'fighters' } }, 'foo') + ).resolves.toEqual('fighters'); +}); + +test('.upward() throws if it cannot derive a resolver strategy', async () => { + const visitor = new ResolverVisitor(mockIO(), null, mockContext()); + await expect( + visitor.upward({ foo: { hopeless: 'case' } }, 'foo') + ).rejects.toThrow('Unrecognized configuration. Could not match a resolver'); +}); + +test('.downward() calls visitor.upward() with root definition', async () => { + const context = mockContext(); + context.get.mockResolvedValueOnce('green'); + const visitor = new ResolverVisitor(null, { frog: 'kermit' }, context); + await expect(visitor.downward('frog')).resolves.toBe('green'); + expect(context.get).toHaveBeenCalledWith('kermit'); +}); diff --git a/packages/upward-js/lib/__tests__/buildResponse.test.js b/packages/upward-js/lib/__tests__/buildResponse.test.js new file mode 100644 index 0000000000..d1384228fc --- /dev/null +++ b/packages/upward-js/lib/__tests__/buildResponse.test.js @@ -0,0 +1,137 @@ +const buildResponse = require('../buildResponse'); +const { getScenarios } = require('@magento/upward-spec'); + +let scenarios, mockIO; +beforeAll(async () => { + scenarios = await getScenarios(/static\-servers/); + mockIO = { + readFile: jest.fn(scenarios.getResource) + }; +}); + +const stubRequest = () => ({ + url: 'http://example.com/nowhere?special', + query: { + special: undefined + }, + headers: { + host: 'example.com', + 'content-type': 'text/plain' + }, + get(header) { + return this.headers[header]; + } +}); + +test('builds a response from a static definition', async () => { + const definition = await scenarios.getDefinition('hello-inline-only'); + return expect( + buildResponse(mockIO, process.env, definition, stubRequest()) + ).resolves.toMatchObject({ + status: 200, + headers: { + 'content-type': 'text/plain' + }, + body: 'Hello World!!' + }); +}); + +test('handles implicit resolvers', async () => { + const definition = await scenarios.getDefinition( + 'hello-inline-implicit-resolvers' + ); + return expect( + buildResponse(mockIO, process.env, definition, stubRequest()) + ).resolves.toMatchObject({ + status: 200, + headers: { + 'content-type': 'text/plain' + }, + body: 'Hello World, concisely!!' + }); +}); + +test('handles env interpolation', async () => { + const definition = await scenarios.getDefinition('hello-env-interpolation'); + return expect( + buildResponse( + mockIO, + { UPWARD_TEST_RESPONSE_BODY: 'Hello, environment!' }, + definition, + stubRequest() + ) + ).resolves.toMatchObject({ + status: 200, + headers: { + 'content-type': 'text/plain' + }, + body: 'Hello, environment!' + }); +}); + +test('handles inline templates', async () => { + const definition = await scenarios.getDefinition( + 'hello-env-inline-template' + ); + return expect( + buildResponse(mockIO, { ADDRESSEE: 'Earth' }, definition, stubRequest()) + ).resolves.toMatchObject({ + status: 200, + headers: { + 'content-type': 'text/plain' + }, + body: 'Hello, environment of Earth!!' + }); +}); + +test('handles file resolvers and context interpolation', async () => { + const definition = await scenarios.getDefinition( + 'hello-env-context-file-template' + ); + return expect( + buildResponse(mockIO, { sender: 'world' }, definition, stubRequest()) + ).resolves.toMatchObject({ + status: 200, + headers: { + 'content-type': 'text/plain' + }, + body: 'Hello from a world of external templates!!' + }); +}); + +test('handles deep template resolvers, can return json', async () => { + const definition = await scenarios.getDefinition( + 'hello-context-inline-template-json' + ); + const response = await buildResponse( + mockIO, + { + ADDRESSEE: 'deep space' + }, + definition, + stubRequest() + ); + expect(response).toMatchObject({ + status: 200, + headers: { + 'content-type': 'application/json' + } + }); + expect(response.body).toEqual( + JSON.stringify({ + greeting: 'Hello', + subject: 'the depths of deep space...', + shouldYouReallyHandwriteJSON: 'no' + }) + ); +}); + +// test.skip('makes GQL queries'); + +// test.skip('conditionally resolves'); + +// test.skip('conditional resolution falls through in order'); + +// test.skip('conditional resolution yields to default'); + +// test.skip('responds to request data'); diff --git a/packages/upward-js/lib/__tests__/server.test.js b/packages/upward-js/lib/__tests__/server.test.js new file mode 100644 index 0000000000..c622f64d1a --- /dev/null +++ b/packages/upward-js/lib/__tests__/server.test.js @@ -0,0 +1,31 @@ +const { Server } = require('http'); +const supertest = require('supertest'); +const { getScenarios } = require('@magento/upward-spec'); +const upwardServer = require('../server'); + +let upwardPath; +beforeAll(async () => { + upwardPath = (await getScenarios(/static\-servers/)).getResourcePath( + 'hello-inline-only.yml' + ); +}); + +test('returns app alone if bindLocal is false', async () => { + const { app, server } = await upwardServer({ upwardPath }); + expect(app).toBeTruthy(); + expect(server).not.toBeDefined(); +}); + +test('returns app and server if bindLocal is true', async () => { + const { app, server } = await upwardServer({ upwardPath, bindLocal: true }); + expect(app).toBeTruthy(); + expect(server).toBeInstanceOf(Server); + await server.close(); +}); + +test.skip('responds to requests based on UPWARD config', async () => { + const { app } = await upwardServer({ upwardPath }); + const response = await supertest(app).get('/article?articleId=1'); + expect(response.statusCode).toBe(200); + expect(response.body).toMatchInlineSnapshot(); +}); diff --git a/packages/upward-js/lib/buildResponse.js b/packages/upward-js/lib/buildResponse.js new file mode 100644 index 0000000000..efe77220c7 --- /dev/null +++ b/packages/upward-js/lib/buildResponse.js @@ -0,0 +1,25 @@ +const debug = require('debug')('upward-js:buildResponse'); +const ResolverVisitor = require('./ResolverVisitor'); +const Context = require('./Context'); + +async function buildResponse(io, env, rootDefinition, request) { + const response = new Map(); + debug('creating Context'); + const requestContext = Context.fromRequest(env, request); + debug('creating ResolverVisitor'); + const visitor = new ResolverVisitor(io, rootDefinition, requestContext); + debug('visiting for status, headers, and body'); + try { + const [status, headers, body] = await Promise.all([ + visitor.downward('status').then(Number), + visitor.downward('headers'), + visitor.downward('body') + ]); + debug('successfully built response, %O', { status, headers, body }); + return { status, headers, body }; + } catch (e) { + throw new Error(e.stack); + } +} + +module.exports = buildResponse; diff --git a/packages/upward-js/lib/compiledResources/AbstractCompiledResource.js b/packages/upward-js/lib/compiledResources/AbstractCompiledResource.js new file mode 100644 index 0000000000..c53105b799 --- /dev/null +++ b/packages/upward-js/lib/compiledResources/AbstractCompiledResource.js @@ -0,0 +1,34 @@ +const debug = require('debug')('upward-js:AbstractCompiledResource'); +class AbstractCompiledResource { + static get supportedExtensions() { + throw new Error( + 'Internal error: CompiledResources must define static supported file extensions.' + ); + } + constructor(source, io) { + if (this.constructor === AbstractCompiledResource) { + throw new Error( + 'Internal error: Cannot instantiate AbstractCompiledResource directly' + ); + } + if (typeof source !== 'string') { + throw new Error( + `Must construct a CompiledResource with string source. Was supplied a ${typeof source}: ${source}` + ); + } + this.source = source; + this.io = io; + } + async compile() { + throw new Error( + 'Internal error: CompiledResources must define a compile method.' + ); + } + async render() { + throw new Error( + 'Internal error: CompiledResources must define a render method.' + ); + } +} + +module.exports = AbstractCompiledResource; diff --git a/packages/upward-js/lib/compiledResources/GraphQLDocument.js b/packages/upward-js/lib/compiledResources/GraphQLDocument.js new file mode 100644 index 0000000000..ebe78608b4 --- /dev/null +++ b/packages/upward-js/lib/compiledResources/GraphQLDocument.js @@ -0,0 +1,16 @@ +const AbstractCompiledResource = require('./AbstractCompiledResource'); +const gql = require('graphql-tag'); + +class GraphQLDocument extends AbstractCompiledResource { + static get supportedExtensions() { + return ['.graphql', '.gql']; + } + async compile() { + this._contents = gql(this.source); + } + async render() { + return this._contents; + } +} + +module.exports = GraphQLDocument; diff --git a/packages/upward-js/lib/compiledResources/MustacheTemplate.js b/packages/upward-js/lib/compiledResources/MustacheTemplate.js new file mode 100644 index 0000000000..f0bc0eedda --- /dev/null +++ b/packages/upward-js/lib/compiledResources/MustacheTemplate.js @@ -0,0 +1,100 @@ +const { inspect } = require('util'); +const AbstractCompiledResource = require('./AbstractCompiledResource'); +const Hogan = require('hogan.js'); + +class MustacheTemplate extends AbstractCompiledResource { + static get supportedExtensions() { + return ['.mst', '.mustache', '.tpt']; + } + constructor(...args) { + super(...args); + if (!this.io) { + throw new Error('IOInterface as second argument'); + } + if (typeof this.io.readFile !== 'function') { + throw new Error( + `IOInterface missing readFile method: ${inspect(this.io)}` + ); + } + this._loadedPartials = new Map(); + } + _tryLoadAllExtensions( + name, + extensions = MustacheTemplate.supportedExtensions + ) { + return this.io.readFile(name + extensions[0], 'utf8').catch(e => { + if (e.code !== 'ENOENT' || extensions.length === 1) { + throw e; + } + return this._tryLoadAllExtensions(name, extensions.slice(1)); + }); + } + _findUnloadedPartialNames(template) { + const partialNames = Object.values(template.partials).map( + ({ name }) => name + ); + const uniquePartialNames = [...new Set(partialNames)]; + return uniquePartialNames.filter( + name => !this._loadedPartials.has(name) + ); + } + async _loadPartial(name) { + let partial = this._loadedPartials.get(name); + if (!partial) { + try { + partial = Hogan.compile( + (await this._tryLoadAllExtensions(name)).trim() + ); + this._loadedPartials.set(name, partial); + } catch (error) { + return { badPartial: { name, error } }; + } + } + return partial; + } + async _loadPartials(partialNames) { + const loadedPartials = await Promise.all( + partialNames.map(name => this._loadPartial(name)) + ); + + const badPartials = loadedPartials.filter( + ({ badPartial }) => badPartial + ); + if (badPartials.length > 0) { + const partialErrors = badPartials.map( + ({ badPartial: { name, error } }) => + `'${name}: ${error.stack}\n` + ); + throw new Error(`Error in template partials: ${partialErrors}`); + } + + const foundDescendentPartials = loadedPartials.reduce( + (found, tpt) => found.concat(this._findUnloadedPartialNames(tpt)), + [] + ); + + if (foundDescendentPartials.length > 0) { + return await this._loadPartials([ + ...new Set(foundDescendentPartials) + ]); + } + } + async compile() { + this._template = Hogan.compile(this.source); + + // recursively load all descendent partials ahead of time + await this._loadPartials( + this._findUnloadedPartialNames(this._template) + ); + + this._partials = {}; + for (const [name, tpt] of this._loadedPartials.entries()) { + this._partials[name] = tpt; + } + } + async render(context) { + return this._template.render(context, this._partials, '').trim(); + } +} + +module.exports = MustacheTemplate; diff --git a/packages/upward-js/lib/compiledResources/__tests__/AbstractCompiledResource.test.js b/packages/upward-js/lib/compiledResources/__tests__/AbstractCompiledResource.test.js new file mode 100644 index 0000000000..39ff3e27ca --- /dev/null +++ b/packages/upward-js/lib/compiledResources/__tests__/AbstractCompiledResource.test.js @@ -0,0 +1,35 @@ +const AbstractCompiledResource = require('../AbstractCompiledResource'); + +test('requires override to static supportedExtensions getter', () => { + expect(() => AbstractCompiledResource.supportedExtensions).toThrow( + 'must define static supported' + ); +}); + +test('cannot be directly instantiated', () => { + expect(() => new AbstractCompiledResource()).toThrow('Cannot instantiate'); +}); + +test('sets source and io properties from constructor args', () => { + const source = ''; + const io = {}; + const compiler = new class extends AbstractCompiledResource {}('', io); + expect(compiler.source).toBe(''); + expect(compiler.io).toBe(io); +}); + +test('throws if it receives no source argument', () => { + expect(() => new class extends AbstractCompiledResource {}()).toThrow( + 'string source' + ); +}); + +test('requires override to compile method', () => { + const rsrc = new class extends AbstractCompiledResource {}(''); + expect(rsrc.compile()).rejects.toThrow('must define a compile'); +}); + +test('requires override to render method', () => { + const rsrc = new class extends AbstractCompiledResource {}(''); + expect(rsrc.render()).rejects.toThrow('must define a render'); +}); diff --git a/packages/upward-js/lib/compiledResources/__tests__/GraphQLDocument.test.js b/packages/upward-js/lib/compiledResources/__tests__/GraphQLDocument.test.js new file mode 100644 index 0000000000..bef6e2d235 --- /dev/null +++ b/packages/upward-js/lib/compiledResources/__tests__/GraphQLDocument.test.js @@ -0,0 +1,97 @@ +const GraphQLDocument = require('../GraphQLDocument'); +const AbstractCompiledResource = require('../AbstractCompiledResource'); + +test('extends AbstractCompiledResource concretely', () => { + const instantiate = () => new GraphQLDocument('', {}); + expect(instantiate).not.toThrow(); + expect(instantiate()).toBeInstanceOf(AbstractCompiledResource); +}); + +test('supported extensions include standard .graphql', () => { + expect(GraphQLDocument.supportedExtensions).toContain('.graphql'); +}); + +test('compiles GraphQL documents', async () => { + const doc = new GraphQLDocument(` + { + foos(bar: 1) { + mahna + } + } + `); + await expect(doc.compile()).resolves.not.toThrow(); + await expect(doc.render()).resolves.toMatchInlineSnapshot(` +Object { + "definitions": Array [ + Object { + "directives": Array [], + "kind": "OperationDefinition", + "name": undefined, + "operation": "query", + "selectionSet": Object { + "kind": "SelectionSet", + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [ + Object { + "kind": "Argument", + "name": Object { + "kind": "Name", + "value": "bar", + }, + "value": Object { + "kind": "IntValue", + "value": "1", + }, + }, + ], + "directives": Array [], + "kind": "Field", + "name": Object { + "kind": "Name", + "value": "foos", + }, + "selectionSet": Object { + "kind": "SelectionSet", + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", + "name": Object { + "kind": "Name", + "value": "mahna", + }, + "selectionSet": undefined, + }, + ], + }, + }, + ], + }, + "variableDefinitions": Array [], + }, + ], + "kind": "Document", + "loc": Object { + "end": 112, + "start": 0, + }, +} +`); +}); + +test('fails on illegal graphql documents', async () => { + const compiler = new GraphQLDocument(` + # missing open curly + foos(bar: 1) { + mahna + } + } + `); + await expect(compiler.compile()).rejects.toThrowErrorMatchingInlineSnapshot( + `"Syntax Error: Unexpected Name \\"foos\\""` + ); +}); diff --git a/packages/upward-js/lib/compiledResources/__tests__/MustacheTemplate.test.js b/packages/upward-js/lib/compiledResources/__tests__/MustacheTemplate.test.js new file mode 100644 index 0000000000..2fa5e72bc8 --- /dev/null +++ b/packages/upward-js/lib/compiledResources/__tests__/MustacheTemplate.test.js @@ -0,0 +1,145 @@ +const MustacheTemplate = require('../MustacheTemplate'); +const AbstractCompiledResource = require('../AbstractCompiledResource'); + +test('supported extensions include standard .mst and .mustache', () => { + expect(MustacheTemplate.supportedExtensions).toEqual( + expect.arrayContaining(['.mst', '.mustache']) + ); +}); + +test('extends AbstractCompiledResource concretely', () => { + const io = { + readFile: () => {} + }; + const instantiate = () => new MustacheTemplate('', io); + expect(instantiate).not.toThrow(); + expect(instantiate()).toBeInstanceOf(AbstractCompiledResource); +}); + +test('throws if IOInterface is not present or lacks methods at constructor time', () => { + expect(() => new MustacheTemplate('')).toThrow( + 'IOInterface as second argument' + ); + expect(() => new MustacheTemplate('', { networkFetch() {} })).toThrow( + 'missing readFile' + ); +}); + +test('compiles Mustache ', async () => { + const template = new MustacheTemplate( + ` + {{#existenz}} + Existenz is {{status}}! + {{/existenz}} + {{^existenz}} + What, you hate Cronenberg? + {{/existenz}} + `, + { readFile: () => {} } + ); + await expect(template.compile()).resolves.not.toThrow(); + await expect( + template.render({ existenz: { status: 'paused' } }) + ).resolves.toMatchInlineSnapshot(`"Existenz is paused!"`); + await expect( + template.render({ + existenz: [ + { status: 'a movie with a weird goop gun in it' }, + { status: 'overshadowed by The Matrix' } + ] + }) + ).resolves.toMatchInlineSnapshot(` +"Existenz is a movie with a weird goop gun in it! + Existenz is overshadowed by The Matrix!" +`); + await expect(template.render({})).resolves.toMatchInlineSnapshot( + `"What, you hate Cronenberg?"` + ); + await expect(template.render()).resolves.toMatchInlineSnapshot( + `"What, you hate Cronenberg?"` + ); +}); + +test('loads Mustache partials using io', async () => { + const io = { + readFile: jest.fn( + async (name, encoding) => + `

Hello {{addressee}}, I am the template called ${name}!

` + ) + }; + const template = new MustacheTemplate( + ` +

Important announcements!

+ {{> firstPartial}} + {{> secondPartial}} + `, + io + ); + await expect(template.compile()).resolves.not.toThrow(); + await expect(template.render({ addressee: 'unit test' })).resolves + .toMatchInlineSnapshot(` +"

Important announcements!

+

Hello unit test, I am the template called firstPartial.mst!

Hello unit test, I am the template called secondPartial.mst!

" +`); + expect(io.readFile).toHaveBeenCalledTimes(2); + expect(io.readFile.mock.calls).toMatchObject([ + ['firstPartial.mst', 'utf8'], + ['secondPartial.mst', 'utf8'] + ]); +}); + +test('loads descendent partials using io', async () => { + const io = { + readFile: jest.fn(async (name, encoding) => { + if (name.indexOf('subPartial') !== -1) { + return `I'm a subpartial, {{addressee}}!!`; + } + return `

Hello {{addressee}}, I am the template called ${name}, and I have sub-partials!

{{> subPartial}}`; + }) + }; + const template = new MustacheTemplate( + ` +

Important announcements!

+ {{> firstPartial}} + {{> secondPartial}} +`, + io + ); + await expect(template.compile()).resolves.not.toThrow(); + await expect(template.render({ addressee: 'unit test' })).resolves + .toMatchInlineSnapshot(` +"

Important announcements!

+

Hello unit test, I am the template called firstPartial.mst, and I have sub-partials!

I'm a subpartial, unit test!!

Hello unit test, I am the template called secondPartial.mst, and I have sub-partials!

I'm a subpartial, unit test!!" +`); + expect(io.readFile).toHaveBeenCalledTimes(3); + expect(io.readFile.mock.calls).toMatchObject([ + ['firstPartial.mst', 'utf8'], + ['secondPartial.mst', 'utf8'], + ['subPartial.mst', 'utf8'] + ]); +}); + +test('handles missing partials', async () => { + const io = { + readFile: jest.fn(async () => + Promise.reject(new Error('Everything is very bad')) + ) + }; + const template = new MustacheTemplate( + `{{> aPartial}} will never exist`, + io + ); + await expect(template.compile()).rejects.toThrowError( + 'Error in template partials' + ); +}); + +test('handles partial errors', async () => { + const io = { + readFile: jest.fn(async name => '{{/katzs}} never closes!i809ula/sn') + }; + const template = new MustacheTemplate(`{{> aPartial }} ought to close`, io); + await expect(template.compile()).rejects.toThrowError( + 'Error in template partials' + ); +}); diff --git a/packages/upward-js/lib/compiledResources/__tests__/forFileOfType.test.js b/packages/upward-js/lib/compiledResources/__tests__/forFileOfType.test.js new file mode 100644 index 0000000000..aad0bc5217 --- /dev/null +++ b/packages/upward-js/lib/compiledResources/__tests__/forFileOfType.test.js @@ -0,0 +1,17 @@ +const { forFileOfType, GraphQLDocument, MustacheTemplate } = require('../'); + +test('returns constructor for a given file extension', () => { + expect(forFileOfType('.graphql')).toBe(GraphQLDocument); + expect(forFileOfType('.gql')).toBe(GraphQLDocument); + expect(forFileOfType('.mst')).toBe(MustacheTemplate); +}); + +test('returns constructor for a filename', () => { + expect(forFileOfType('/Somewhere/somequery.graphql')).toBe(GraphQLDocument); + expect(forFileOfType('/SomewhereElse/document.gql')).toBe(GraphQLDocument); + expect(forFileOfType('someTpt.mst')).toBe(MustacheTemplate); +}); + +test('returns undefined for unsupported file type', () => { + expect(forFileOfType('.pif')).toBeUndefined(); +}); diff --git a/packages/upward-js/lib/compiledResources/index.js b/packages/upward-js/lib/compiledResources/index.js new file mode 100644 index 0000000000..c1f042a379 --- /dev/null +++ b/packages/upward-js/lib/compiledResources/index.js @@ -0,0 +1,23 @@ +const { extname, normalize } = require('path'); +const CompiledResources = { + GraphQLDocument: require('./GraphQLDocument'), + MustacheTemplate: require('./MustacheTemplate') +}; + +const byExtension = new Map(); + +for (const Resource of Object.values(CompiledResources)) { + for (const extension of Resource.supportedExtensions) { + byExtension.set(extension, Resource); + } +} + +module.exports = Object.assign(CompiledResources, { + forFileOfType(filenameOrExtension) { + const normalized = normalize(filenameOrExtension); + const extension = normalized.startsWith('.') + ? normalized + : extname(normalized); + return byExtension.get(extension); + } +}); diff --git a/packages/upward-js/lib/index.js b/packages/upward-js/lib/index.js new file mode 100644 index 0000000000..8026806e5e --- /dev/null +++ b/packages/upward-js/lib/index.js @@ -0,0 +1,5 @@ +module.exports = { + IOAdapter: require('./IOAdapter'), + middleware: require('./middleware'), + server: require('./server') +}; diff --git a/packages/upward-js/lib/isPrimitive.js b/packages/upward-js/lib/isPrimitive.js new file mode 100644 index 0000000000..9fb1c8dffd --- /dev/null +++ b/packages/upward-js/lib/isPrimitive.js @@ -0,0 +1,4 @@ +const { isBoolean, isFinite, isString } = require('lodash'); + +const isPrimitive = v => isBoolean(v) || isString(v) || isFinite(v); +module.exports = isPrimitive; diff --git a/packages/upward-js/lib/middleware.js b/packages/upward-js/lib/middleware.js new file mode 100644 index 0000000000..e47e704785 --- /dev/null +++ b/packages/upward-js/lib/middleware.js @@ -0,0 +1,94 @@ +const debug = require('debug')('upward-js:middleware'); +const jsYaml = require('js-yaml'); +const UpwardServerError = require('./UpwardServerError'); +const IOAdapter = require('./IOAdapter'); +const buildResponse = require('./buildResponse'); + +class UpwardMiddleware { + constructor(upwardPath, io) { + this.upwardPath = upwardPath; + debug(`created for path ${upwardPath}`); + this.io = io; + } + async load() { + const { upwardPath } = this; + try { + this.yamlTxt = await this.io.readFile(upwardPath); + } catch (e) { + throw new UpwardServerError(e, `unable to read file ${upwardPath}`); + } + debug(`read upward.yml file successfully`); + try { + this.definition = await jsYaml.safeLoad(this.yamlTxt); + } catch (e) { + throw new UpwardServerError( + e, + `error parsing ${upwardPath} contents: \n\n${this.yamlTxt}` + ); + } + debug(`parsed upward.yml file successfully: %o`, this.definition); + } + async getHandler() { + return async (req, res, next) => { + const errors = []; + let response; + try { + response = await buildResponse( + this.io, + process.env, + this.definition, + req + ); + if (isNaN(response.status)) { + errors.push( + `Non-numeric status! Status was '${response.status}'` + ); + } + if (typeof response.headers !== 'object') { + errors.push( + `Resolved with a non-compliant headers object! Headers are: ${ + response.headers + }` + ); + } + if (typeof response.body !== 'string') { + errors.push( + `Resolved with a non-string body! Body was '${ + response.body + }'` + ); + } + } catch (e) { + errors.push(e); + } + if (errors.length > 0) { + res.status(500).send( + new UpwardServerError( + `Request did not evaluate to a valid response, because: \n${errors.join( + '\n' + )}` + ).toString() + ); + } else { + debug('status, headers, and body valid. responding'); + debugger; + res.status(response.status) + .set(response.headers) + .send(response.body); + } + }; + } +} + +async function upwardJSMiddlewareFactory( + upwardPath, + io = IOAdapter.default(upwardPath) +) { + const middleware = new UpwardMiddleware(upwardPath, io); + await middleware.load(); + return middleware.getHandler(); +} + +upwardJSMiddlewareFactory.UpwardMiddleware = UpwardMiddleware; + +module.exports = upwardJSMiddlewareFactory; diff --git a/packages/upward-js/lib/resolvers/AbstractResolver.js b/packages/upward-js/lib/resolvers/AbstractResolver.js new file mode 100644 index 0000000000..4f250953e7 --- /dev/null +++ b/packages/upward-js/lib/resolvers/AbstractResolver.js @@ -0,0 +1,17 @@ +class AbstractResolver { + static get resolverType() { + throw new Error( + 'Internal error: Resolvers must define a static resolverType getter' + ); + } + constructor(visitor) { + this.visitor = visitor; + } + resolve() { + throw new Error( + 'Internal error: Resolvers must define a resolve() method' + ); + } +} + +module.exports = AbstractResolver; diff --git a/packages/upward-js/lib/resolvers/ConditionalResolver.js b/packages/upward-js/lib/resolvers/ConditionalResolver.js new file mode 100644 index 0000000000..f2addb6789 --- /dev/null +++ b/packages/upward-js/lib/resolvers/ConditionalResolver.js @@ -0,0 +1,54 @@ +const debug = require('debug')('upward-js:ConditionalResolver'); +const AbstractResolver = require('./AbstractResolver'); + +class ConditionalResolver extends AbstractResolver { + static get resolverType() { + return 'conditional'; + } + static get telltale() { + return 'when'; + } + async resolve(definition) { + if ( + !definition.when || + !Array.isArray(definition.when) || + definition.when.length === 0 + ) { + throw new Error( + `ConditionalResolver must a 'when' list, with at least one matcher.` + ); + } + if (!definition.default) { + throw new Error( + `ConditionalResolver must have a 'default' condition.` + ); + } + this.default = definition.default; + + return this.tryMatchers(definition.when); + } + async tryMatchers([top, ...rest]) { + debug('matching %o with %d left to go', top, rest.length); + const regex = new RegExp(top.pattern); + const candidate = await this.visitor.context.get(top.matches); + debug('regex is %s, candidate is %s', regex, candidate); + const regexMatch = candidate.match(regex); + + if (regexMatch) { + const match = regexMatch.reduce((contextMatch, group, index) => { + contextMatch[`$${index}`] = group; + return contextMatch; + }, {}); + this.visitor.context.set('$match', match, true); + const yielded = await this.visitor.upward(top, 'use'); + this.visitor.context.forget('$match'); + return yielded; + } + if (rest.length === 0) { + return this.visitor.upward(this, 'default'); + } + return this.tryMatchers(rest); + } +} + +module.exports = ConditionalResolver; diff --git a/packages/upward-js/lib/resolvers/FileResolver.js b/packages/upward-js/lib/resolvers/FileResolver.js new file mode 100644 index 0000000000..4e769cf53d --- /dev/null +++ b/packages/upward-js/lib/resolvers/FileResolver.js @@ -0,0 +1,101 @@ +const debug = require('debug')('upward-js:FileResolver'); +const AbstractResolver = require('./AbstractResolver'); +const { forFileOfType } = require('../compiledResources'); + +class FileResolver extends AbstractResolver { + static get resolverType() { + return 'file'; + } + static get telltale() { + return 'file'; + } + static get paramTypes() { + return { + file: { + type: 'string', + required: true + }, + charset: { + type: 'oneOf', + oneOf: ['utf-8', 'utf8', 'latin1', 'base64'], + default: 'utf-8' + }, + parse: { + type: 'oneOf', + oneOf: ['auto', 'text'], + default: 'auto' + } + }; + } + static recognize(value) { + const str = value.toString(); + const derivedConfig = { file: {} }; + if (str.startsWith('file://')) { + derivedConfig.file.inline = str.slice(7); + } else if (str.startsWith('./') || str.startsWith('../')) { + derivedConfig.file.inline = str; + } + if (derivedConfig.file.inline) { + return derivedConfig; + } + } + async resolve(definition) { + if (!definition.file) { + throw new Error( + `File argument is required: ${JSON.stringify(definition)}` + ); + } + const toResolve = [ + this.visitor.upward(definition, 'file'), + definition.charset + ? this.visitor.upward(definition, 'charset') + : 'utf8', + definition.parse ? this.visitor.upward(definition, 'parse') : 'auto' + ]; + const [file, charset, parse] = await Promise.all(toResolve); + debug( + 'resolved file %s, charset %s, parse mode %s', + file, + charset, + parse + ); + const { paramTypes } = this.constructor; + const allowedCharsets = paramTypes.charset.oneOf; + if (!allowedCharsets.some(value => charset === value)) { + throw new Error( + `Invalid 'charset': ${charset}. Must be one of ${allowedCharsets}` + ); + } + debug('charset %s is valid', charset); + const fileText = await this.visitor.io.readFile(file, charset); + debug('retrieved file text %s', fileText); + if (parse === 'text') { + debug('parse === text, returning file text directly'); + return fileText; + } + let Resource; + if (parse === 'auto') { + debug('parse === auto, detecting from filename %s\n\n\n\n', file); + Resource = forFileOfType(file); + if (!Resource) { + debug( + 'autoparse found no parser for %s, returning text instead', + file + ); + return fileText; + } + } else { + const extension = parse.startsWith('.') ? parse : '.' + parse; + Resource = forFileOfType(extension); + if (!Resource) { + throw new Error(`Unsupported parse type '${parse}'`); + } + } + debug('parse === %s, found %s to compile', parse, Resource.name); + const rsrc = new Resource(fileText, this.visitor.io); + await rsrc.compile(); + return rsrc; + } +} + +module.exports = FileResolver; diff --git a/packages/upward-js/lib/resolvers/InlineResolver.js b/packages/upward-js/lib/resolvers/InlineResolver.js new file mode 100644 index 0000000000..b54eb681ec --- /dev/null +++ b/packages/upward-js/lib/resolvers/InlineResolver.js @@ -0,0 +1,39 @@ +const debug = require('debug')('upward-js:InlineResolver'); +const { + fromPairs, + isBoolean, + isFinite, + isString, + isPlainObject +} = require('lodash'); +const AbstractResolver = require('./AbstractResolver'); +const isPrimitive = require('../isPrimitive'); + +class InlineResolver extends AbstractResolver { + static get resolverType() { + return 'inline'; + } + static get telltale() { + return 'inline'; + } + async resolve({ inline }) { + if (isPrimitive(inline)) { + debug('quick-resolving primitive %s', inline); + return inline; + } else if (isPlainObject(inline)) { + debug('resolving object %o', inline); + const resolvedEntries = await Promise.all( + Object.keys(inline).map(async key => [ + key, + await this.visitor.upward(inline, key) + ]) + ); + return fromPairs(resolvedEntries); + } + throw new Error( + `Internal error: Invalid value supplied to InlineResolver: ${inline}` + ); + } +} + +module.exports = InlineResolver; diff --git a/packages/upward-js/lib/resolvers/ServiceResolver.js b/packages/upward-js/lib/resolvers/ServiceResolver.js new file mode 100644 index 0000000000..d7a573e29b --- /dev/null +++ b/packages/upward-js/lib/resolvers/ServiceResolver.js @@ -0,0 +1,109 @@ +const debug = require('debug')('upward-js:ServiceResolver'); +const { inspect } = require('util'); +const { execute, makePromise } = require('apollo-link'); +const { HttpLink } = require('apollo-link-http'); +const { isPlainObject, fromPairs } = require('lodash'); +const AbstractResolver = require('./AbstractResolver'); +const GraphQLDocument = require('../compiledResources/GraphQLDocument'); +class ServiceResolver extends AbstractResolver { + static get resolverType() { + return 'service'; + } + static get telltale() { + return 'url'; + } + async resolve(definition) { + const die = msg => { + throw new Error( + `Invalid arguments to ServiceResolver: ${inspect(definition, { + compact: false + })}.\n\n${msg}` + ); + }; + if (!definition.url) { + die('No URL specified.'); + } + if (!definition.query) { + die('No GraphQL query document specified.'); + } + if ( + definition.variables && + (!isPlainObject(definition.variables) || + Object.values(definition.variables).some( + value => typeof value !== 'string' + )) + ) { + die( + `Variables must be a simple object of keys to context lookups.` + ); + } + debug('validated config %o', definition); + const toResolve = [ + this.visitor.upward(definition, 'url'), + this.visitor.upward(definition, 'query'), + definition.method + ? this.visitor.upward(definition, 'method') + : 'POST', + definition.headers + ? this.visitor.upward(definition, 'headers') + : {}, + definition.variables + ? Promise.all( + Object.entries(definition.variables).map( + async ([key, value]) => [ + key, + await this.visitor.context.get(value) + ] + ) + ) + : {} + ]; + + const [ + url, + query, + method, + headers, + variableEntries + ] = await Promise.all(toResolve); + + const variables = fromPairs(variableEntries); + + debug( + 'url retrieved: "%s", query resolved: "%s", creating link', + url, + query + ); + + const link = new HttpLink({ + uri: url, + fetch: this.visitor.io.networkFetch, + headers, + useGETForQueries: method === 'GET' + }); + + let parsedQuery; + if (typeof query === 'string') { + parsedQuery = new GraphQLDocument(query, this.visitor.io); + await parsedQuery.compile(); + } else if (query instanceof GraphQLDocument) { + parsedQuery = query; + } else { + throw new Error(`Unknown type passed to 'query'.`); + } + + debug('running query with %o', variables); + + return makePromise( + execute(link, { query: await parsedQuery.render(), variables }) + ).then(({ data, errors }) => { + if (errors && errors.length > 0) { + throw new Error(errors[0].message); + } else { + return { data }; + } + }); + } +} + +module.exports = ServiceResolver; diff --git a/packages/upward-js/lib/resolvers/TemplateResolver.js b/packages/upward-js/lib/resolvers/TemplateResolver.js new file mode 100644 index 0000000000..29e450c556 --- /dev/null +++ b/packages/upward-js/lib/resolvers/TemplateResolver.js @@ -0,0 +1,106 @@ +const debug = require('debug')('upward-js:TemplateResolver'); +const { inspect } = require('util'); +const { fromPairs, isPlainObject } = require('lodash'); +const AbstractResolver = require('./AbstractResolver'); +const MustacheTemplate = require('../compiledResources/MustacheTemplate'); +const Engines = { + mustache: MustacheTemplate +}; +const supportedEngines = new Set(['mustache']); +module.exports = class TemplateResolver extends AbstractResolver { + static get resolverType() { + return 'template'; + } + static get telltale() { + return 'engine'; + } + async resolve(definition) { + let providePromise; + const die = msg => { + throw new Error( + `Invalid arguments to TemplateResolver: ${inspect(definition, { + compact: false + })}.\n\n${msg}` + ); + }; + if (!definition.engine) { + die('No template engine specified.'); + } + if (!definition.template) { + die('No template specified.'); + } + if (!definition.provide) { + die( + `'provide' property must be an array or object of string context values, was ${definition}` + ); + } else if (Array.isArray(definition.provide)) { + if (definition.provide.some(value => typeof value != 'string')) { + die( + `'provide' property must be an array or object of string context values, was ${definition}` + ); + } else { + providePromise = Promise.all( + definition.provide.map(async name => [ + name, + await this.visitor.context.get(name) + ]) + ); + } + } else if (isPlainObject(definition.provide)) { + providePromise = Promise.all( + Object.entries(definition.provide).map( + async ([alias, name]) => [ + alias, + await this.visitor.context.get(name) + ] + ) + ); + } else { + die(`Unrecognized 'provide' configuration: ${definition.provide}`); + } + debug('validated config %o', definition); + const toResolve = [ + this.visitor.upward(definition, 'engine'), + this.visitor.upward(definition, 'template'), + providePromise + ]; + + const [engine, template, rootEntries] = await Promise.all(toResolve); + debug('template retrieved, "%s"', template); + debug('rootEntries retrieved, %o', rootEntries); + + const Engine = Engines[engine]; + + if (!Engine) { + throw new Error(`Template engine '${engine}' unsupported`); + } + debug('got template engine %s', Engine.name); + + let renderer; + if (template instanceof Engine) { + debug( + 'how nice, the template is already resolved into a %s for us', + Engine.name + ); + renderer = template; + } else if (typeof template === 'string') { + debug('template is a string, creating %s', Engine.name); + renderer = new Engine(template, this.visitor.io); + } else { + throw new Error( + `Expected string or ${ + Engine.name + }-compatible template and received a foreign object ${ + template.constructor.name + }!` + ); + } + + debug('created renderer'); + + await renderer.compile(); + debug('renderer compiled'); + + return renderer.render(fromPairs(rootEntries)); + } +}; diff --git a/packages/upward-js/lib/resolvers/__tests__/AbstractResolver.test.js b/packages/upward-js/lib/resolvers/__tests__/AbstractResolver.test.js new file mode 100644 index 0000000000..f7b104e5a5 --- /dev/null +++ b/packages/upward-js/lib/resolvers/__tests__/AbstractResolver.test.js @@ -0,0 +1,9 @@ +const AbstractResolver = require('../AbstractResolver'); + +test('static resolverType must be implemented', () => { + expect(() => AbstractResolver.resolverType).toThrow('static resolverType'); +}); + +test('resolve must be implemented', () => { + expect(() => new AbstractResolver().resolve()).toThrow('resolve'); +}); diff --git a/packages/upward-js/lib/resolvers/__tests__/ConditionalResolver.test.js b/packages/upward-js/lib/resolvers/__tests__/ConditionalResolver.test.js new file mode 100644 index 0000000000..b4fa4e62c5 --- /dev/null +++ b/packages/upward-js/lib/resolvers/__tests__/ConditionalResolver.test.js @@ -0,0 +1,157 @@ +const ConditionalResolver = require('../ConditionalResolver'); + +test('resolverType is conditional', () => + expect(ConditionalResolver.resolverType).toBe('conditional')); + +test('telltale exists', () => + expect(ConditionalResolver.telltale).toBe('when')); + +test(`throws if the when list is absent or empty`, async () => + expect(new ConditionalResolver().resolve({})).rejects.toThrow( + "'when' list" + )); + +test(`throws if the default is not present`, async () => + await expect( + new ConditionalResolver().resolve({ + when: [ + { matches: 'request.url.pathname', pattern: '^/derp' }, + { use: { inline: 'lerp' } } + ] + }) + ).rejects.toThrow('default')); + +test(`resolves a matcher and yields a value`, async () => { + const visitor = { + upward: jest.fn((x, y) => [x, y]), + context: { + get: jest.fn( + name => + ({ + 'one.fish': 'blue', + 'red.fish': 'two' + }[name]) + ), + set: jest.fn(), + forget: jest.fn() + } + }; + await expect( + new ConditionalResolver(visitor).resolve({ + when: [ + { + matches: 'one.fish', + pattern: 'green', + use: { inline: '#00FF00' } + }, + { + matches: 'red.fish', + pattern: 'tw.', + use: { inline: '#FF0000' } + } + ], + default: { inline: 'chum' } + }) + ).resolves.toMatchObject([ + { + matches: 'red.fish', + pattern: 'tw.', + use: { inline: '#FF0000' } + }, + 'use' + ]); +}); + +test(`when no matchers match, yields default`, async () => { + const visitor = { + upward: jest.fn((x, y) => [x, y]), + context: { + get: jest.fn( + name => + ({ + 'one.fish': 'blue', + 'red.fish': 'two' + }[name]) + ), + set: jest.fn(), + forget: jest.fn() + } + }; + await expect( + new ConditionalResolver(visitor).resolve({ + when: [ + { + matches: 'one.fish', + pattern: 'green', + use: { inline: '#00FF00' } + }, + { + matches: 'red.fish', + pattern: 'thr', + use: { inline: '#FF0000' } + }, + { + matches: 'one.fish', + pattern: 'lemons', + use: { inline: '#00FF00' } + }, + { + matches: 'red.fish', + pattern: 'noooo', + use: { inline: '#FF0000' } + } + ], + default: { inline: 'chum' } + }) + ).resolves.toMatchObject([ + { + default: { inline: 'chum' } + }, + 'default' + ]); +}); + +test(`context values for match are temporarily present`, async () => { + const visitor = { + upward: jest.fn(() => { + expect(visitor.context.set).toHaveBeenCalledWith( + '$match', + expect.objectContaining({ + $0: 'blu', + $1: 'l', + $2: 'u' + }) + ); + return 'match set'; + }), + context: { + get: jest.fn( + name => + ({ + 'one.fish': 'blue', + 'red.fish': 'two' + }[name]) + ), + set: jest.fn(), + forget: jest.fn() + } + }; + await expect( + new ConditionalResolver(visitor).resolve({ + when: [ + { + matches: 'one.fish', + pattern: 'b(l)(u)', + use: { inline: '#00FF00' } + }, + { + matches: 'red.fish', + pattern: 'noooo', + use: { inline: '#FF0000' } + } + ], + default: { inline: 'chum' } + }) + ).resolves.toEqual('match set'); + expect(visitor.context.forget).toHaveBeenCalledWith('$match'); +}); diff --git a/packages/upward-js/lib/resolvers/__tests__/FileResolver.test.js b/packages/upward-js/lib/resolvers/__tests__/FileResolver.test.js new file mode 100644 index 0000000000..f0aacbadf4 --- /dev/null +++ b/packages/upward-js/lib/resolvers/__tests__/FileResolver.test.js @@ -0,0 +1,253 @@ +const FileResolver = require('../FileResolver'); + +test('resolverType is file', () => + expect(FileResolver.resolverType).toBe('file')); + +test('telltale exists', () => expect(FileResolver.telltale).toBeDefined()); + +test('resolve() throws error if no definition provided', async () => { + expect(new FileResolver().resolve({})).rejects.toThrow( + 'File argument is required' + ); +}); + +test('resolves filename and uses default charset and parse', async () => { + const visitor = { + upward: jest.fn(() => 'in-the-way'), + io: { + readFile: jest.fn(() => 'ooh') + } + }; + await expect( + new FileResolver(visitor).resolve({ file: 'something' }) + ).resolves.toEqual('ooh'); + expect(visitor.upward).toHaveBeenCalledTimes(1); + expect(visitor.upward).toHaveBeenCalledWith( + expect.objectContaining({ + file: 'something' + }), + + 'file' + ); + expect(visitor.io.readFile).toHaveBeenCalledWith('in-the-way', 'utf8'); +}); + +test('uses custom charset', async () => { + const visitor = { + upward: jest.fn(), + io: { + readFile: jest.fn(() => 'whats going on') + } + }; + visitor.upward + .mockResolvedValueOnce('i-said') + .mockResolvedValueOnce('latin1'); + await expect( + new FileResolver(visitor).resolve({ + file: 'something', + charset: 'hey' + }) + ).resolves.toEqual('whats going on'); + expect(visitor.upward).toHaveBeenCalledTimes(2); + expect(visitor.upward.mock.calls).toMatchObject([ + [{ charset: 'hey', file: 'something' }, 'file'], + [{ charset: 'hey', file: 'something' }, 'charset'] + ]); + expect(visitor.io.readFile).toHaveBeenCalledWith('i-said', 'latin1'); +}); + +test('throws on invalid charset', async () => { + const visitor = { + upward: jest.fn(), + io: { + readFile: jest.fn(() => 'whats going on') + } + }; + visitor.upward + .mockResolvedValueOnce('i-said') + .mockResolvedValueOnce('bad-charset'); + await expect( + new FileResolver(visitor).resolve({ + file: 'something', + charset: 'hey' + }) + ).rejects.toThrow("Invalid 'charset'"); +}); + +test('parse === "text" shortcuts parse', async () => { + const visitor = { + upward: jest.fn(), + io: { + readFile: jest.fn(() => '{{curlies}}') + } + }; + visitor.upward + .mockResolvedValueOnce('bristly.mustache') + .mockResolvedValueOnce('text'); + await expect( + new FileResolver(visitor).resolve({ + file: 'something', + parse: 'text' + }) + ).resolves.toEqual('{{curlies}}'); + expect(visitor.upward).toHaveBeenCalledWith( + expect.objectContaining({ + parse: 'text' + }), + 'parse' + ); +}); + +test('auto-parses a file from extension', async () => { + const visitor = { + upward: jest.fn(() => 'bristly.mustache'), + io: { + readFile: jest.fn(() => '{{curlies}}') + } + }; + const tpt = await new FileResolver(visitor).resolve({ + file: 'aTemplate' + }); + expect(visitor.io.readFile).toHaveBeenCalledWith( + 'bristly.mustache', + 'utf8' + ); + expect(tpt).toHaveProperty('compile', expect.any(Function)); +}); + +test('falls back silently to text for an unrecognized file type', async () => { + const visitor = { + upward: jest.fn(() => 'bristly.porcupine'), + io: { + readFile: jest.fn(() => '\\||||////') + } + }; + const txt = await new FileResolver(visitor).resolve({ + file: 'aFile' + }); + expect(visitor.io.readFile).toHaveBeenCalledWith( + 'bristly.porcupine', + 'utf8' + ); + expect(txt).toEqual('\\||||////'); +}); + +test('force parses a specific file type', async () => { + const visitor = { + upward: jest.fn(), + io: { + readFile: jest.fn(() => '{ foo { bar } }') + } + }; + visitor.upward + .mockResolvedValueOnce('graphql-disguised-by.mustache') + .mockResolvedValueOnce('graphql'); + const gqlDoc = await new FileResolver(visitor).resolve({ + file: 'anything', + parse: 'turns-into-graphql' + }); + expect(gqlDoc).toMatchObject({ + compile: expect.any(Function), + render: expect.any(Function) + }); + expect(gqlDoc.compile()).resolves.not.toThrow(); + expect(gqlDoc.render()).resolves.toMatchInlineSnapshot(` +Object { + "definitions": Array [ + Object { + "directives": Array [], + "kind": "OperationDefinition", + "name": undefined, + "operation": "query", + "selectionSet": Object { + "kind": "SelectionSet", + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", + "name": Object { + "kind": "Name", + "value": "foo", + }, + "selectionSet": Object { + "kind": "SelectionSet", + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", + "name": Object { + "kind": "Name", + "value": "bar", + }, + "selectionSet": undefined, + }, + ], + }, + }, + ], + }, + "variableDefinitions": Array [], + }, + ], + "kind": "Document", + "loc": Object { + "end": 15, + "start": 0, + }, +} +`); +}); + +test('force parses throws on unrecognized file type', async () => { + const visitor = { + upward: jest.fn(), + io: { + readFile: jest.fn(() => 'an executable lol') + } + }; + visitor.upward + .mockResolvedValueOnce('exe-disguised-by.mustache') + .mockResolvedValueOnce('.exe') + // should add a dot where necessary + .mockResolvedValueOnce('exe-disguised-by.mustache') + .mockResolvedValueOnce('exe'); + await expect( + new FileResolver(visitor).resolve({ + file: 'afile', + parse: 'aparser' + }) + ).rejects.toThrow('Unsupported parse type'); + await expect( + new FileResolver(visitor).resolve({ + file: 'afile', + parse: 'aparser' + }) + ).rejects.toThrow('Unsupported parse type'); +}); + +test('recognizes file paths', async () => { + expect(FileResolver.recognize('not a file')).toBeFalsy(); + expect(FileResolver.recognize('./a-file')).toBeTruthy(); + expect(FileResolver.recognize('../../..//a-file')).toBeTruthy(); + const config = FileResolver.recognize('file:///a-file'); + const visitor = { + upward: jest.fn(() => Promise.resolve('/a-file')), + io: { + readFile: () => + Promise.resolve('goodness gracious, great text of file') + } + }; + await expect(new FileResolver(visitor).resolve(config)).resolves.toEqual( + 'goodness gracious, great text of file' + ); + expect(visitor.upward).toHaveBeenCalledWith( + { + file: { inline: '/a-file' } + }, + 'file' + ); +}); diff --git a/packages/upward-js/lib/resolvers/__tests__/InlineResolver.test.js b/packages/upward-js/lib/resolvers/__tests__/InlineResolver.test.js new file mode 100644 index 0000000000..b11e77dc68 --- /dev/null +++ b/packages/upward-js/lib/resolvers/__tests__/InlineResolver.test.js @@ -0,0 +1,34 @@ +const InlineResolver = require('../InlineResolver'); + +test('resolverType is inline', () => + expect(InlineResolver.resolverType).toBe('inline')); + +test('telltale exists', () => expect(InlineResolver.telltale).toBeDefined()); + +test('primitive resolves with no visitor calls', async () => { + const visitor = { + upward: jest.fn() + }; + const resolver = new InlineResolver(visitor); + expect(resolver.resolve({ inline: 'a string' })).resolves.toBe('a string'); + expect(visitor.upward).not.toHaveBeenCalled(); +}); + +test('plain object calls visitor.upward to traverse', async () => { + const visitor = { + upward: jest.fn(() => 'a resolved string') + }; + const resolver = new InlineResolver(visitor); + expect( + resolver.resolve({ inline: { resolvedString: 'a resolved string' } }) + ).resolves.toEqual({ resolvedString: 'a resolved string' }); + expect(visitor.upward).toHaveBeenCalledWith( + expect.objectContaining({ resolvedString: 'a resolved string' }), + 'resolvedString' + ); +}); + +test('non-primitive and non-plain object inline argument throws error', async () => { + const resolver = new InlineResolver(); + expect(resolver.resolve([])).rejects.toThrow('Invalid value'); +}); diff --git a/packages/upward-js/lib/resolvers/__tests__/ServiceResolver.test.js b/packages/upward-js/lib/resolvers/__tests__/ServiceResolver.test.js new file mode 100644 index 0000000000..0baf9ebafe --- /dev/null +++ b/packages/upward-js/lib/resolvers/__tests__/ServiceResolver.test.js @@ -0,0 +1,240 @@ +const fetch = require('node-fetch'); +const ServiceResolver = require('../ServiceResolver'); +const GraphQLDocument = require('../../compiledResources/GraphQLDocument'); + +test('resolverType is file', () => + expect(ServiceResolver.resolverType).toBe('service')); + +test('telltale exists', () => expect(ServiceResolver.telltale).toBeDefined()); + +test('places a server call and returns results', async () => { + const res = { data: { foo: { bar: 'exam' } } }; + const visitor = { + upward: jest.fn( + (dfn, name) => + ({ + theUrl: 'https://example.com/graphql', + theQuery: '{ foo { bar } }' + }[dfn[name]]) + ), + io: { + networkFetch: jest.fn(async () => ({ + json: async () => res, + text: async () => JSON.stringify(res) + })) + } + }; + + await expect( + new ServiceResolver(visitor).resolve({ + url: 'theUrl', + query: 'theQuery' + }) + ).resolves.toEqual(res); + + expect(visitor.io.networkFetch).toHaveBeenCalledWith( + 'https://example.com/graphql', + expect.objectContaining({ + body: expect.stringMatching('"query":') + }) + ); +}); + +test('places a server call with custom method and headers', async () => { + const res = { data: { foo: { bar: 'exam' } } }; + const visitor = { + upward: jest.fn( + (dfn, name) => + ({ + theUrl: 'https://example.com/graphql', + theHeaders: { Authorization: 'Bear OMG' }, + theMethod: 'GET', + theQuery: '{ foo { bar } }' + }[dfn[name]]) + ), + io: { + networkFetch: jest.fn(async () => ({ + json: async () => res, + text: async () => JSON.stringify(res) + })) + } + }; + + await expect( + new ServiceResolver(visitor).resolve({ + url: 'theUrl', + query: 'theQuery', + headers: 'theHeaders', + method: 'theMethod' + }) + ).resolves.toEqual(res); + + expect(visitor.io.networkFetch).toHaveBeenCalledWith( + expect.stringContaining('https://example.com/graphql?query'), + expect.objectContaining({ + method: 'GET' + }) + ); +}); + +test('places a server call with variables', async () => { + const res = { data: { foo: { bar: 'nothing' } } }; + const visitor = { + upward: jest.fn( + (dfn, name) => + ({ + theUrl: 'https://example.com/graphql', + theQuery: + 'query getFoo($id: String!) { foo(id: $id) { bar } }' + }[dfn[name]]) + ), + context: { + get: jest.fn(() => '12345') + }, + io: { + networkFetch: jest.fn(async () => ({ + json: async () => res, + text: async () => JSON.stringify(res) + })) + } + }; + + await expect( + new ServiceResolver(visitor).resolve({ + url: 'theUrl', + query: 'theQuery', + variables: { + id: 'combination.to.my.luggage' + } + }) + ).resolves.toEqual(res); + + expect(visitor.io.networkFetch).toHaveBeenCalledWith( + 'https://example.com/graphql', + expect.objectContaining({ + body: expect.stringMatching('12345') + }) + ); +}); + +test('throws if variables are in an unacceptable format', async () => { + const visitor = { + io: { + networkFetch: jest.fn(async () => ({ + json: async () => res, + text: async () => JSON.stringify(res) + })) + } + }; + + await expect( + new ServiceResolver(visitor).resolve({ + url: 'theUrl', + query: 'theQuery', + variables: 'combination.to.my.luggage' + }) + ).rejects.toThrow('Variables must be a simple object'); +}); + +test('throws if variables are in an unacceptable format', async () => { + const visitor = { + io: { + networkFetch: jest.fn(async () => ({ + json: async () => res, + text: async () => JSON.stringify(res) + })) + } + }; + + await expect( + new ServiceResolver(visitor).resolve({ + url: 'theUrl', + query: 'theQuery', + variables: 'combination.to.my.luggage' + }) + ).rejects.toThrow('Variables must be a simple object'); +}); + +test('throws if query is missing', async () => { + const visitor = { + io: { + networkFetch: jest.fn(async () => ({ + json: async () => res, + text: async () => JSON.stringify(res) + })) + } + }; + + await expect( + new ServiceResolver(visitor).resolve({ + url: 'theUrl' + }) + ).rejects.toThrow('No GraphQL query'); +}); + +test('throws if url is missing', async () => { + const visitor = { + io: { + networkFetch: jest.fn(async () => ({ + json: async () => res, + text: async () => JSON.stringify(res) + })) + } + }; + + await expect( + new ServiceResolver(visitor).resolve({ + query: 'theQuery' + }) + ).rejects.toThrow('No URL'); +}); + +test('accepts a precompiled GraphQLDocument', async () => { + const res = { data: { foo: { bar: 'exam' } } }; + const gqlDoc = new GraphQLDocument('{ foo { bar } }'); + await gqlDoc.compile(); + const visitor = { + upward: jest.fn( + (dfn, name) => + ({ + theUrl: 'https://example.com/graphql', + theQuery: gqlDoc + }[dfn[name]]) + ), + io: { + networkFetch: jest.fn(async () => ({ + json: async () => res, + text: async () => JSON.stringify(res) + })) + } + }; + + await expect( + new ServiceResolver(visitor).resolve({ + url: 'theUrl', + query: 'theQuery' + }) + ).resolves.toEqual(res); +}); + +test('throws if the query is neither a string nor a GraphQLDocument', async () => { + const visitor = { + upward: jest.fn( + (dfn, name) => + ({ + theUrl: 'https://example.com/graphql', + theQuery: {} + }[dfn[name]]) + ), + io: { + networkFetch: jest.fn() + } + }; + + await expect( + new ServiceResolver(visitor).resolve({ + url: 'theUrl', + query: 'theQuery' + }) + ).rejects.toThrowError('Unknown type'); +}); diff --git a/packages/upward-js/lib/resolvers/__tests__/TemplateResolver.test.js b/packages/upward-js/lib/resolvers/__tests__/TemplateResolver.test.js new file mode 100644 index 0000000000..aa0438c417 --- /dev/null +++ b/packages/upward-js/lib/resolvers/__tests__/TemplateResolver.test.js @@ -0,0 +1,204 @@ +const TemplateResolver = require('../TemplateResolver'); +const MustacheTemplate = require('../../compiledResources/MustacheTemplate'); + +test('resolverType is file', () => + expect(TemplateResolver.resolverType).toBe('template')); + +test('telltale exists', () => expect(TemplateResolver.telltale).toBeDefined()); + +test('throws if no engine specified', async () => { + await expect(new TemplateResolver().resolve({})).rejects + .toThrowErrorMatchingInlineSnapshot(` +"Invalid arguments to TemplateResolver: {}. + +No template engine specified." +`); +}); + +test('throws if no template specified', async () => { + await expect(new TemplateResolver().resolve({ engine: 'mustache' })).rejects + .toThrowErrorMatchingInlineSnapshot(` +"Invalid arguments to TemplateResolver: { engine: 'mustache' }. + +No template specified." +`); +}); + +test('throws if no provide arg specified', async () => { + await expect( + new TemplateResolver().resolve({ + engine: 'mustache', + template: './some-template' + }) + ).rejects.toThrow( + `'provide' property must be an array or object of string context values` + ); +}); + +test('throws if provide arg is invalid', async () => { + await expect( + new TemplateResolver().resolve({ + engine: 'mustache', + template: './some-template', + provide: [{}] + }) + ).rejects.toThrow(`'provide' property must be an array or object`); +}); + +test('throws if template engine is unsupported', async () => { + const visitor = { + upward: jest.fn( + (dfn, name) => + ({ + anEngine: 'beard', + aTemplate: 'some-template' + }[dfn[name]]) + ), + context: { + get: jest.fn(() => { + ENV_VAR: 'ENV_VALUE'; + }) + } + }; + await expect( + new TemplateResolver(visitor).resolve({ + engine: 'anEngine', + template: 'aTemplate', + provide: ['env'] + }) + ).rejects.toThrow(`Template engine 'beard' unsupported`); + expect(visitor.context.get).toHaveBeenCalledWith('env'); +}); + +test('accepts a template engine instance as the template arg', async () => { + const io = { readFile() {} }; + const visitor = { + upward: jest.fn( + (dfn, name) => + ({ + anEngine: 'mustache', + aTemplate: new MustacheTemplate('{{ env.ENV_VAR }}', io) + }[dfn[name]]) + ), + context: { + get: jest.fn(() => ({ + ENV_VAR: 'ENV_VALUE' + })) + }, + io + }; + await expect( + new TemplateResolver(visitor).resolve({ + engine: 'anEngine', + template: 'aTemplate', + provide: ['env'] + }) + ).resolves.toEqual('ENV_VALUE'); + expect(visitor.context.get).toHaveBeenCalledWith('env'); +}); + +test('accepts a template string as the template arg', async () => { + const io = { readFile() {} }; + const visitor = { + upward: jest.fn( + (dfn, name) => + ({ + anEngine: 'mustache', + aTemplate: + '{{ env.ENV_VAR }} see the {{#arbitrary}}{{animal}}{{/arbitrary}}' + }[dfn[name]]) + ), + context: { + get: jest.fn( + name => + ({ + env: { ENV_VAR: 'come and' }, + arbitrary: { + animal: 'horsie' + } + }[name]) + ) + }, + io + }; + await expect( + new TemplateResolver(visitor).resolve({ + engine: 'anEngine', + template: 'aTemplate', + provide: ['env', 'arbitrary'] + }) + ).resolves.toEqual('come and see the horsie'); + expect(visitor.context.get).toHaveBeenCalledWith('env'); +}); + +test('throws if template argument is not an enging instance or a string', async () => { + const io = { readFile() {} }; + const visitor = { + upward: jest.fn( + (dfn, name) => + ({ + anEngine: 'mustache', + aTemplate: [] + }[dfn[name]]) + ), + context: { + get: jest.fn(() => ({ + ENV_VAR: 'ANOTHER_VALUE' + })) + }, + io + }; + await expect( + new TemplateResolver(visitor).resolve({ + engine: 'anEngine', + template: 'aTemplate', + provide: ['env'] + }) + ).rejects.toThrowErrorMatchingInlineSnapshot( + `"Expected string or MustacheTemplate-compatible template and received a foreign object Array!"` + ); +}); + +test('"provide" accepts an object mapping of string => contextValue also', async () => { + const io = { readFile() {} }; + const visitor = { + upward: jest.fn( + (dfn, name) => + ({ + anEngine: 'mustache', + aTemplate: 'how {{flavor}} it is to be {{quality}} like you' + }[dfn[name]]) + ), + context: { + get: jest.fn( + name => + ({ + 'env.ENV_VAR': 'sweet', + 'deep.structure.isNot': 'flat' + }[name]) + ) + }, + io + }; + await expect( + new TemplateResolver(visitor).resolve({ + engine: 'anEngine', + template: 'aTemplate', + provide: { + flavor: 'env.ENV_VAR', + quality: 'deep.structure.isNot' + } + }) + ).resolves.toEqual('how sweet it is to be flat like you'); + expect(visitor.context.get).toHaveBeenCalledWith('deep.structure.isNot'); +}); + +test('throws if "provide" is unrecognized', async () => { + await expect( + new TemplateResolver().resolve({ + engine: 'anEngine', + template: 'aTemplate', + provide: 54332 + }) + ).rejects.toThrow("Unrecognized 'provide' configuration"); +}); diff --git a/packages/upward-js/lib/resolvers/__tests__/index.test.js b/packages/upward-js/lib/resolvers/__tests__/index.test.js new file mode 100644 index 0000000000..7eb38533bc --- /dev/null +++ b/packages/upward-js/lib/resolvers/__tests__/index.test.js @@ -0,0 +1,20 @@ +const { ResolverList, ResolversByType } = require('../'); +const AbstractResolver = require('../AbstractResolver'); + +test('Resolvers exports', () => { + expect(ResolverList).toBeInstanceOf(Array); + expect( + ResolverList.every(resolver => + AbstractResolver.prototype.isPrototypeOf(resolver.prototype) + ) + ).toBeTruthy(); + expect(ResolversByType).toMatchInlineSnapshot(` +Object { + "conditional": [Function], + "file": [Function], + "inline": [Function], + "service": [Function], + "template": [Function], +} +`); +}); diff --git a/packages/upward-js/lib/resolvers/index.js b/packages/upward-js/lib/resolvers/index.js new file mode 100644 index 0000000000..2db2939cda --- /dev/null +++ b/packages/upward-js/lib/resolvers/index.js @@ -0,0 +1,15 @@ +// const debug = require('debug')('upward-js:resolvers'); +const ResolverList = [ + require('./InlineResolver'), + require('./FileResolver'), + require('./TemplateResolver'), + require('./ServiceResolver'), + require('./ConditionalResolver') +]; + +const ResolversByType = ResolverList.reduce((out, Resolver) => { + out[Resolver.resolverType] = Resolver; + return out; +}, {}); + +module.exports = { ResolverList, ResolversByType }; diff --git a/packages/upward-js/lib/server.js b/packages/upward-js/lib/server.js new file mode 100644 index 0000000000..a373fc17e1 --- /dev/null +++ b/packages/upward-js/lib/server.js @@ -0,0 +1,29 @@ +const { resolve } = require('path'); +const express = require('express'); +const middleware = require('./middleware'); +const morgan = require('morgan'); +module.exports = async function upwardServer({ + bindLocal, + logUrl, + upwardPath +}) { + if (!upwardPath) { + throw new Error(`upwardPath is required`); + } + const app = express(); + const loggerConfig = + process.env.NODE_ENV === 'production' ? 'combined' : 'dev'; + app.use(morgan(loggerConfig)); + app.use(await middleware(resolve(upwardPath))); + if (bindLocal) { + const server = app.listen(0, '0.0.0.0'); + if (logUrl) { + server.on('listening', () => { + const { address, port } = server.address(); + console.log(`http://${address}:${port}/`); + }); + } + return { app, server }; + } + return { app }; +}; diff --git a/packages/upward-js/package-lock.json b/packages/upward-js/package-lock.json new file mode 100644 index 0000000000..73dddcfcd0 --- /dev/null +++ b/packages/upward-js/package-lock.json @@ -0,0 +1,6425 @@ +{ + "name": "@magento/upward-js", + "version": "0.1.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/code-frame": { + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.51.tgz", + "integrity": "sha1-vXHZsZKvl435FYKdOdQJRFZDmgw=", + "dev": true, + "requires": { + "@babel/highlight": "7.0.0-beta.51" + } + }, + "@babel/generator": { + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.0.0-beta.51.tgz", + "integrity": "sha1-bHV1/952HQdIXgS67cA5LG2eMPY=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.51", + "jsesc": "^2.5.1", + "lodash": "^4.17.5", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" + } + }, + "@babel/helper-function-name": { + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.51.tgz", + "integrity": "sha1-IbSHSiJ8+Z7K/MMKkDAtpaJkBWE=", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "7.0.0-beta.51", + "@babel/template": "7.0.0-beta.51", + "@babel/types": "7.0.0-beta.51" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.51.tgz", + "integrity": "sha1-MoGy0EWvlcFyzpGyCCXYXqRnZBE=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.51" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.51.tgz", + "integrity": "sha1-imw/ZsTSZTUvwHdIT59ugKUauXg=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.51" + } + }, + "@babel/highlight": { + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.51.tgz", + "integrity": "sha1-6IRK4loVlcz9QriWI7Q3bKBtIl0=", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^3.0.0" + } + }, + "@babel/parser": { + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.0.0-beta.51.tgz", + "integrity": "sha1-J87C30Cd9gr1gnDtj2qlVAnqhvY=", + "dev": true + }, + "@babel/template": { + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.51.tgz", + "integrity": "sha1-lgKkCuvPNXrpZ34lMu9fyBD1+/8=", + "dev": true, + "requires": { + "@babel/code-frame": "7.0.0-beta.51", + "@babel/parser": "7.0.0-beta.51", + "@babel/types": "7.0.0-beta.51", + "lodash": "^4.17.5" + } + }, + "@babel/traverse": { + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.0.0-beta.51.tgz", + "integrity": "sha1-mB2vLOw0emIx06odnhgDsDqqpKg=", + "dev": true, + "requires": { + "@babel/code-frame": "7.0.0-beta.51", + "@babel/generator": "7.0.0-beta.51", + "@babel/helper-function-name": "7.0.0-beta.51", + "@babel/helper-split-export-declaration": "7.0.0-beta.51", + "@babel/parser": "7.0.0-beta.51", + "@babel/types": "7.0.0-beta.51", + "debug": "^3.1.0", + "globals": "^11.1.0", + "invariant": "^2.2.0", + "lodash": "^4.17.5" + } + }, + "@babel/types": { + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.51.tgz", + "integrity": "sha1-2AK3tUO1g2x3iqaReXq/APPZfqk=", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.5", + "to-fast-properties": "^2.0.0" + } + }, + "@types/async": { + "version": "2.0.49", + "resolved": "https://registry.npmjs.org/@types/async/-/async-2.0.49.tgz", + "integrity": "sha512-Benr3i5odUkvpFkOpzGqrltGdbSs+EVCkEBGXbuR7uT0VzhXKIkhem6PDzHdx5EonA+rfbB3QvP6aDOw5+zp5Q==", + "optional": true + }, + "@types/graphql": { + "version": "0.12.6", + "resolved": "https://registry.npmjs.org/@types/graphql/-/graphql-0.12.6.tgz", + "integrity": "sha512-wXAVyLfkG1UMkKOdMijVWFky39+OD/41KftzqfX1Oejd0Gm6dOIKjCihSVECg6X7PHjftxXmfOKA/d1H79ZfvQ==" + }, + "@types/zen-observable": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@types/zen-observable/-/zen-observable-0.8.0.tgz", + "integrity": "sha512-te5lMAWii1uEJ4FwLjzdlbw3+n0FZNOvFXHxQDKeT0dilh7HOzdMzV2TrJVUzq8ep7J4Na8OUYPRLSQkJHAlrg==" + }, + "abab": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.0.tgz", + "integrity": "sha512-sY5AXXVZv4Y1VACTtR11UJCPHHudgY5i26Qj5TypE6DKlIApbwb5uqhXcJ5UUGbvZNRh7EeIoW+LrJumBsKp7w==", + "dev": true + }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" + }, + "accepts": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", + "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", + "dev": true, + "requires": { + "mime-types": "~2.1.18", + "negotiator": "0.6.1" + } + }, + "acorn": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.2.tgz", + "integrity": "sha512-cJrKCNcr2kv8dlDnbw+JPUGjHZzo4myaxOLmpOX8a+rgX94YeTcTMv/LFJUSByRpc+i4GgVnnhLxvMu/2Y+rqw==", + "dev": true + }, + "acorn-globals": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.1.0.tgz", + "integrity": "sha512-KjZwU26uG3u6eZcfGbTULzFcsoz6pegNKtHPksZPOUsiKo5bUmiBPa38FuHZ/Eun+XYh/JCCkS9AS3Lu4McQOQ==", + "dev": true, + "requires": { + "acorn": "^5.0.0" + } + }, + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "dev": true, + "requires": { + "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": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "dev": true, + "requires": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + } + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true + }, + "ansi-escapes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + } + } + }, + "apollo-boost": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/apollo-boost/-/apollo-boost-0.1.13.tgz", + "integrity": "sha512-oaAHQO6xBPLtK3cK4+FYT3/BR3RFUYvldlK3zTn6JD7AL4lMovvvV68S+AZyQlECS7Cy3EjFqsANmAMbvvJxSA==", + "requires": { + "apollo-cache": "^1.1.14", + "apollo-cache-inmemory": "^1.2.7", + "apollo-client": "^2.3.8", + "apollo-link": "^1.0.6", + "apollo-link-error": "^1.0.3", + "apollo-link-http": "^1.3.1", + "apollo-link-state": "^0.4.0", + "graphql-tag": "^2.4.2" + } + }, + "apollo-cache": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/apollo-cache/-/apollo-cache-1.1.14.tgz", + "integrity": "sha512-Zmo9nVqpWFogki2QyulX6Xx6KYXMyYWX74grwgsYYUOukl4pIAdtYyK8e874o0QDgzSOq5AYPXjtfkoVpqhCRw==", + "requires": { + "apollo-utilities": "^1.0.18" + } + }, + "apollo-cache-inmemory": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/apollo-cache-inmemory/-/apollo-cache-inmemory-1.2.7.tgz", + "integrity": "sha512-ikL3hWsd1DejiZSAuiGnX6TG3cKAZmkMTZZfNZggp9vcTa47kfPqms/pX0F4iajCJP/p7/AllhbpsQ3zVMOZGg==", + "requires": { + "apollo-cache": "^1.1.14", + "apollo-utilities": "^1.0.18", + "graphql-anywhere": "^4.1.16" + } + }, + "apollo-client": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/apollo-client/-/apollo-client-2.3.8.tgz", + "integrity": "sha512-X5wsBD1be1P/mScGsH5H+2hIE8d78WAfqOvFvBpP+C+jzJ9387uHLyFmYYMLRRqDQ3ihjI4iSID7KEOW2gyCcQ==", + "requires": { + "@types/async": "2.0.49", + "@types/zen-observable": "^0.8.0", + "apollo-cache": "^1.1.14", + "apollo-link": "^1.0.0", + "apollo-link-dedup": "^1.0.0", + "apollo-utilities": "^1.0.18", + "symbol-observable": "^1.0.2", + "zen-observable": "^0.8.0" + } + }, + "apollo-link": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/apollo-link/-/apollo-link-1.2.2.tgz", + "integrity": "sha512-Uk/BC09dm61DZRDSu52nGq0nFhq7mcBPTjy5EEH1eunJndtCaNXQhQz/BjkI2NdrfGI+B+i5he6YSoRBhYizdw==", + "requires": { + "@types/graphql": "0.12.6", + "apollo-utilities": "^1.0.0", + "zen-observable-ts": "^0.8.9" + } + }, + "apollo-link-dedup": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/apollo-link-dedup/-/apollo-link-dedup-1.0.9.tgz", + "integrity": "sha512-RbuEKpmSHVMtoREMPh2wUFTeh65q+0XPVeqgaOP/rGEAfvLyOMvX0vT2nVaejMohoMxuUnfZwpldXaDFWnlVbg==", + "requires": { + "apollo-link": "^1.2.2" + } + }, + "apollo-link-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/apollo-link-error/-/apollo-link-error-1.1.0.tgz", + "integrity": "sha512-4Vu/IUn6Kn6+Fthym4iuqypCKcLdwTg3MaCvtLdaLbt9X2hNCq3y8mv6vuWIlAY51X8wKhCgYghQSOs5R/embQ==", + "requires": { + "apollo-link": "^1.2.2" + } + }, + "apollo-link-http": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/apollo-link-http/-/apollo-link-http-1.5.4.tgz", + "integrity": "sha512-e9Ng3HfnW00Mh3TI6DhNRfozmzQOtKgdi+qUAsHBOEcTP0PTAmb+9XpeyEEOueLyO0GXhB92HUCIhzrWMXgwyg==", + "requires": { + "apollo-link": "^1.2.2", + "apollo-link-http-common": "^0.2.4" + } + }, + "apollo-link-http-common": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/apollo-link-http-common/-/apollo-link-http-common-0.2.4.tgz", + "integrity": "sha512-4j6o6WoXuSPen9xh4NBaX8/vL98X1xY2cYzUEK1F8SzvHe2oFONfxJBTekwU8hnvapcuq8Qh9Uct+gelu8T10g==", + "requires": { + "apollo-link": "^1.2.2" + } + }, + "apollo-link-state": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/apollo-link-state/-/apollo-link-state-0.4.1.tgz", + "integrity": "sha512-69/til4ENfl/Fvf7br2xSsLSBcxcXPbOHVNkzLLejvUZickl93HLO4/fO+uvoBi4dCYRgN17Zr8FwI41ueRx0g==", + "requires": { + "apollo-utilities": "^1.0.8", + "graphql-anywhere": "^4.1.0-alpha.0" + } + }, + "apollo-utilities": { + "version": "1.0.18", + "resolved": "https://registry.npmjs.org/apollo-utilities/-/apollo-utilities-1.0.18.tgz", + "integrity": "sha512-hHrmsoMYzzzfUlTOPpxr0qRpTLotMkBIQ93Ub7ki2SWdLfYYKrp6/KB8YOUkbCwXxSFvYSV24ccuwUEqZIaHIA==", + "requires": { + "fast-json-stable-stringify": "^2.0.0" + } + }, + "append-transform": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-1.0.0.tgz", + "integrity": "sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw==", + "dev": true, + "requires": { + "default-require-extensions": "^2.0.0" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz", + "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=", + "dev": true + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", + "dev": true + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dev": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, + "async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "dev": true, + "requires": { + "lodash": "^4.17.10" + } + }, + "async-limiter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", + "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", + "dev": true + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "babel-core": { + "version": "6.26.3", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", + "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", + "dev": true, + "requires": { + "babel-code-frame": "^6.26.0", + "babel-generator": "^6.26.0", + "babel-helpers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-register": "^6.26.0", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "convert-source-map": "^1.5.1", + "debug": "^2.6.9", + "json5": "^0.5.1", + "lodash": "^4.17.4", + "minimatch": "^3.0.4", + "path-is-absolute": "^1.0.1", + "private": "^0.1.8", + "slash": "^1.0.0", + "source-map": "^0.5.7" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "babel-generator": { + "version": "6.26.1", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", + "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", + "dev": true, + "requires": { + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.7", + "trim-right": "^1.0.1" + }, + "dependencies": { + "jsesc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", + "dev": true + } + } + }, + "babel-helpers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", + "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-jest": { + "version": "23.4.2", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-23.4.2.tgz", + "integrity": "sha512-wg1LJ2tzsafXqPFVgAsYsMCVD5U7kwJZAvbZIxVm27iOewsQw1BR7VZifDlMTEWVo3wasoPPyMdKXWCsfFPr3Q==", + "dev": true, + "requires": { + "babel-plugin-istanbul": "^4.1.6", + "babel-preset-jest": "^23.2.0" + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-istanbul": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz", + "integrity": "sha512-PWP9FQ1AhZhS01T/4qLSKoHGY/xvkZdVBGlKM/HuxxS3+sC66HhTNR7+MpbO/so/cz/wY94MeSWJuP1hXIPfwQ==", + "dev": true, + "requires": { + "babel-plugin-syntax-object-rest-spread": "^6.13.0", + "find-up": "^2.1.0", + "istanbul-lib-instrument": "^1.10.1", + "test-exclude": "^4.2.1" + } + }, + "babel-plugin-jest-hoist": { + "version": "23.2.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-23.2.0.tgz", + "integrity": "sha1-5h+uBaHKiAGq3uV6bWa4zvr0QWc=", + "dev": true + }, + "babel-plugin-syntax-object-rest-spread": { + "version": "6.13.0", + "resolved": "http://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", + "integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=", + "dev": true + }, + "babel-preset-jest": { + "version": "23.2.0", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-23.2.0.tgz", + "integrity": "sha1-jsegOhOPABoaj7HoETZSvxpV2kY=", + "dev": true, + "requires": { + "babel-plugin-jest-hoist": "^23.2.0", + "babel-plugin-syntax-object-rest-spread": "^6.13.0" + } + }, + "babel-register": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", + "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", + "dev": true, + "requires": { + "babel-core": "^6.26.0", + "babel-runtime": "^6.26.0", + "core-js": "^2.5.0", + "home-or-tmp": "^2.0.0", + "lodash": "^4.17.4", + "mkdirp": "^0.5.1", + "source-map-support": "^0.4.15" + }, + "dependencies": { + "mkdirp": { + "version": "0.5.1", + "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + } + } + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "dev": true, + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "babel-template": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" + } + }, + "babel-traverse": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "dev": true, + "requires": { + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "dev": true + } + } + }, + "babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + }, + "dependencies": { + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "dev": true + } + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "basic-auth": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.0.tgz", + "integrity": "sha1-AV2z81PgLlY3d1X5YnQuiYHnu7o=", + "requires": { + "safe-buffer": "5.1.1" + } + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "optional": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "body-parser": { + "version": "1.18.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz", + "integrity": "sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=", + "dev": true, + "requires": { + "bytes": "3.0.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.1", + "http-errors": "~1.6.2", + "iconv-lite": "0.4.19", + "on-finished": "~2.3.0", + "qs": "6.5.1", + "raw-body": "2.3.2", + "type-is": "~1.6.15" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "browser-process-hrtime": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-0.1.2.tgz", + "integrity": "sha1-Ql1opY00R/AqBKqJQYf86K+Le44=", + "dev": true + }, + "browser-resolve": { + "version": "1.11.3", + "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz", + "integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==", + "dev": true, + "requires": { + "resolve": "1.1.7" + } + }, + "bser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.0.0.tgz", + "integrity": "sha1-mseNPtXZFYBP2HrLFYvHlxR6Fxk=", + "dev": true, + "requires": { + "node-int64": "^0.4.0" + } + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", + "dev": true + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "callsites": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", + "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", + "dev": true + }, + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "dev": true, + "optional": true + }, + "capture-exit": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/capture-exit/-/capture-exit-1.2.0.tgz", + "integrity": "sha1-HF/MSJ/QqwDU8ax64QcuMXP7q28=", + "dev": true, + "requires": { + "rsvp": "^3.3.3" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "dev": true, + "optional": true, + "requires": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "ci-info": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.4.0.tgz", + "integrity": "sha512-Oqmw2pVfCl8sCL+1QgMywPfdxPJPkC51y4usw0iiE2S9qnEOAqXy8bwl1CpMpnoU39g4iKJTz6QZj+28FvOnjQ==", + "dev": true + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "dev": true, + "optional": true, + "requires": { + "center-align": "^0.1.1", + "right-align": "^0.1.1", + "wordwrap": "0.0.2" + }, + "dependencies": { + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "dev": true, + "optional": true + } + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "combined-stream": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", + "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "compare-versions": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.4.0.tgz", + "integrity": "sha512-tK69D7oNXXqUW3ZNo/z7NXTEz22TCF0pTE+YF9cxvaAM9XnkLo1fV621xCLrRR6aevJlKxExkss0vWqUCUpqdg==", + "dev": true + }, + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "contains-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-1.0.0.tgz", + "integrity": "sha1-NFizMhhWA+ju0Y9RjUoQiIo6vJE=", + "requires": { + "normalize-path": "^2.1.1", + "path-starts-with": "^1.0.0" + } + }, + "content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=", + "dev": true + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "dev": true + }, + "convert-source-map": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", + "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", + "dev": true + }, + "cookie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", + "dev": true + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", + "dev": true + }, + "cookiejar": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", + "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==", + "dev": true + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "core-js": { + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "cssom": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.4.tgz", + "integrity": "sha512-+7prCSORpXNeR4/fUP3rL+TzqtiFfhMvTd7uEqMdgPvLPt4+uzFUeufx5RHjGTACCargg/DiEt/moMQmvnfkog==", + "dev": true + }, + "cssstyle": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.1.1.tgz", + "integrity": "sha512-364AI1l/M5TYcFH83JnOH/pSqgaNnKmYgKrm0didZMGKWjQB60dymwWy1rKUgL3J1ffdq9xVi2yGLHdSjjSNog==", + "dev": true, + "requires": { + "cssom": "0.3.x" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "data-urls": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-1.0.1.tgz", + "integrity": "sha512-0HdcMZzK6ubMUnsMmQmG0AcLQPvbvb47R0+7CCZQCYgcd8OUWG91CG7sM6GoXgjz+WLl4ArFzHtBMy/QqSF4eg==", + "dev": true, + "requires": { + "abab": "^2.0.0", + "whatwg-mimetype": "^2.1.0", + "whatwg-url": "^7.0.0" + }, + "dependencies": { + "whatwg-url": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.0.0.tgz", + "integrity": "sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ==", + "dev": true, + "requires": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + } + } + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "default-require-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-2.0.0.tgz", + "integrity": "sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc=", + "dev": true, + "requires": { + "strip-bom": "^3.0.0" + } + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "dev": true + }, + "detect-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "detect-newline": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz", + "integrity": "sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I=", + "dev": true + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "domexception": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/domexception/-/domexception-1.0.1.tgz", + "integrity": "sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug==", + "dev": true, + "requires": { + "webidl-conversions": "^4.0.2" + } + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "optional": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "dev": true + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es-abstract": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", + "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", + "dev": true, + "requires": { + "es-to-primitive": "^1.1.1", + "function-bind": "^1.1.1", + "has": "^1.0.1", + "is-callable": "^1.1.3", + "is-regex": "^1.0.4" + } + }, + "es-to-primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", + "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", + "dev": true, + "requires": { + "is-callable": "^1.1.1", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.1" + } + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "escodegen": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.0.tgz", + "integrity": "sha512-IeMV45ReixHS53K/OmfKAIztN/igDHzTJUhZM3k1jMhIZWjk45SMwAtBsEXiJp3vSPmTcu6CXn7mDvFHRN66fw==", + "dev": true, + "requires": { + "esprima": "^3.1.3", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.6.1" + }, + "dependencies": { + "esprima": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", + "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "optional": true + } + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "dev": true + }, + "exec-sh": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.2.2.tgz", + "integrity": "sha512-FIUCJz1RbuS0FKTdaAafAByGS0CPvU3R0MeHxgtl+djzCc//F8HakL8GzmVNZanasTbTAY/3DRFA0KpVqj/eAw==", + "dev": true, + "requires": { + "merge": "^1.2.0" + } + }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "dev": true + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "dev": true, + "requires": { + "fill-range": "^2.1.0" + } + }, + "expect": { + "version": "23.5.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-23.5.0.tgz", + "integrity": "sha512-aG083W63tBloy8YgafWuC44EakjYe0Q6Mg35aujBPvyNU38DvLat9BVzOihNP2NZDLaCJiFNe0vejbtO6knnlA==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "jest-diff": "^23.5.0", + "jest-get-type": "^22.1.0", + "jest-matcher-utils": "^23.5.0", + "jest-message-util": "^23.4.0", + "jest-regex-util": "^23.3.0" + } + }, + "express": { + "version": "4.16.3", + "resolved": "https://registry.npmjs.org/express/-/express-4.16.3.tgz", + "integrity": "sha1-avilAjUNsyRuzEvs9rWjTSL37VM=", + "dev": true, + "requires": { + "accepts": "~1.3.5", + "array-flatten": "1.1.1", + "body-parser": "1.18.2", + "content-disposition": "0.5.2", + "content-type": "~1.0.4", + "cookie": "0.3.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.1.1", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.3", + "qs": "6.5.1", + "range-parser": "~1.2.0", + "safe-buffer": "5.1.1", + "send": "0.16.2", + "serve-static": "1.13.2", + "setprototypeof": "1.1.0", + "statuses": "~1.4.0", + "type-is": "~1.6.16", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "fast-deep-equal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "fb-watchman": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.0.tgz", + "integrity": "sha1-VOmr99+i8mzZsWNsWIwa/AXeXVg=", + "dev": true, + "requires": { + "bser": "^2.0.0" + } + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "dev": true + }, + "fileset": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz", + "integrity": "sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA=", + "dev": true, + "requires": { + "glob": "^7.0.3", + "minimatch": "^3.0.3" + } + }, + "fill-range": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", + "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", + "dev": true, + "requires": { + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^3.0.0", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" + } + }, + "finalhandler": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", + "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.4.0", + "unpipe": "~1.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", + "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "1.0.6", + "mime-types": "^2.1.12" + } + }, + "formidable": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.1.tgz", + "integrity": "sha512-Fs9VRguL0gqGHkXS5GQiMCr1VhZBxz0JnJs4JmMp/2jL18Fmbzvv7vOFRU+U8TBkHEE/CX1qDXzJplVULgsLeg==", + "dev": true + }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", + "dev": true + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", + "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", + "dev": true, + "optional": true, + "requires": { + "nan": "^2.9.2", + "node-pre-gyp": "^0.10.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.21", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safer-buffer": "^2.1.0" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "minipass": { + "version": "2.2.4", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "^5.1.1", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "needle": { + "version": "2.2.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "^2.1.2", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.10.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.0", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.1.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.1.10", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.7", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "^0.5.1", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.6.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "glob": "^7.0.5" + } + }, + "safe-buffer": { + "version": "5.1.1", + "bundled": true, + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "dev": true, + "optional": true + }, + "semver": { + "version": "5.5.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "chownr": "^1.0.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.2.4", + "minizlib": "^1.1.0", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.1", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "yallist": { + "version": "3.0.2", + "bundled": true, + "dev": true + } + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "dev": true + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "dev": true, + "requires": { + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "^2.0.0" + } + }, + "globals": { + "version": "11.7.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.7.0.tgz", + "integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==", + "dev": true + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "graphql": { + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-0.13.2.tgz", + "integrity": "sha512-QZ5BL8ZO/B20VA8APauGBg3GyEgZ19eduvpLWoq5x7gMmWnHoy8rlQWPLmWgFvo1yNgjSEFMesmS4R6pPr7xog==", + "requires": { + "iterall": "^1.2.1" + } + }, + "graphql-anywhere": { + "version": "4.1.16", + "resolved": "https://registry.npmjs.org/graphql-anywhere/-/graphql-anywhere-4.1.16.tgz", + "integrity": "sha512-DNQGxrh2p8w4vQwHIW1Sw65ZDbOr6ktQCeol6itH3LeWy1a3IoZ67jxrhgrHM+Upg8oiazvteSr64VRxJ8n5+g==", + "requires": { + "apollo-utilities": "^1.0.18" + } + }, + "graphql-tag": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.9.2.tgz", + "integrity": "sha512-qnNmof9pAqj/LUzs3lStP0Gw1qhdVCUS7Ab7+SUB6KD5aX1uqxWQRwMnOGTkhKuLvLNIs1TvNz+iS9kUGl1MhA==" + }, + "growly": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", + "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=", + "dev": true + }, + "handlebars": { + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", + "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", + "dev": true, + "requires": { + "async": "^1.4.0", + "optimist": "^0.6.1", + "source-map": "^0.4.4", + "uglify-js": "^2.6" + }, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "dev": true, + "requires": { + "amdefine": ">=0.0.4" + } + } + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true + }, + "har-validator": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.0.tgz", + "integrity": "sha512-+qnmNjI4OfH2ipQ9VQOw23bBd/ibtfbVdK2fYbY4acTDqKTW/YDp9McimZdDbG8iV9fZizUqQMD5xvriB146TA==", + "dev": true, + "requires": { + "ajv": "^5.3.0", + "har-schema": "^2.0.0" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hogan.js": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/hogan.js/-/hogan.js-3.0.2.tgz", + "integrity": "sha1-TNnhq9QpQUbnZ55B14mHMrAse/0=", + "requires": { + "mkdirp": "0.3.0", + "nopt": "1.0.10" + } + }, + "home-or-tmp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", + "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", + "dev": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.1" + } + }, + "hosted-git-info": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", + "dev": true + }, + "html-encoding-sniffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz", + "integrity": "sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw==", + "dev": true, + "requires": { + "whatwg-encoding": "^1.0.1" + } + }, + "http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "dev": true, + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "iconv-lite": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", + "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", + "dev": true + }, + "import-local": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz", + "integrity": "sha512-vAaZHieK9qjGo58agRBg+bhHX3hoTZU/Oa3GESWLz7t1U62fk63aHuDJJEteXoDeTCcPmUT+z38gkHPZkkmpmQ==", + "dev": true, + "requires": { + "pkg-dir": "^2.0.0", + "resolve-cwd": "^2.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dev": true, + "requires": { + "loose-envify": "^1.0.0" + } + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "ipaddr.js": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz", + "integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4=", + "dev": true + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true, + "requires": { + "builtin-modules": "^1.0.0" + } + }, + "is-callable": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", + "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", + "dev": true + }, + "is-ci": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.0.tgz", + "integrity": "sha512-plgvKjQtalH2P3Gytb7L61Lmz95g2DlpzFiQyRSFew8WoJKxtKRzrZMeyRN2supblm3Psc8OQGy7Xjb6XG11jw==", + "dev": true, + "requires": { + "ci-info": "^1.3.0" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-date-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", + "dev": true + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "dev": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "dev": true, + "requires": { + "is-primitive": "^2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-generator-fn": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-1.0.0.tgz", + "integrity": "sha1-lp1J4bszKfa7fwkIm+JleLLd1Go=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", + "dev": true + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", + "dev": true + }, + "is-regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "dev": true, + "requires": { + "has": "^1.0.1" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-symbol": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", + "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=", + "dev": true + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "istanbul-api": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.3.6.tgz", + "integrity": "sha512-luJDnB1uJ5Qsg/WwusGfNXayQ4598yDgW5S0nUS85T576m1LVJzSqLrCDULkT6sTQXVKHa54093gNuCKumMCjQ==", + "dev": true, + "requires": { + "async": "^2.1.4", + "compare-versions": "^3.1.0", + "fileset": "^2.0.2", + "istanbul-lib-coverage": "^1.2.0", + "istanbul-lib-hook": "^1.2.0", + "istanbul-lib-instrument": "^2.1.0", + "istanbul-lib-report": "^1.1.4", + "istanbul-lib-source-maps": "^1.2.5", + "istanbul-reports": "^1.4.1", + "js-yaml": "^3.7.0", + "mkdirp": "^0.5.1", + "once": "^1.4.0" + }, + "dependencies": { + "istanbul-lib-instrument": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-2.3.2.tgz", + "integrity": "sha512-l7TD/VnBsIB2OJvSyxaLW/ab1+92dxZNH9wLH7uHPPioy3JZ8tnx2UXUdKmdkgmP2EFPzg64CToUP6dAS3U32Q==", + "dev": true, + "requires": { + "@babel/generator": "7.0.0-beta.51", + "@babel/parser": "7.0.0-beta.51", + "@babel/template": "7.0.0-beta.51", + "@babel/traverse": "7.0.0-beta.51", + "@babel/types": "7.0.0-beta.51", + "istanbul-lib-coverage": "^2.0.1", + "semver": "^5.5.0" + }, + "dependencies": { + "istanbul-lib-coverage": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz", + "integrity": "sha512-nPvSZsVlbG9aLhZYaC3Oi1gT/tpyo3Yt5fNyf6NmcKIayz4VV/txxJFFKAK/gU4dcNn8ehsanBbVHVl0+amOLA==", + "dev": true + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + } + } + }, + "istanbul-lib-coverage": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.0.tgz", + "integrity": "sha512-GvgM/uXRwm+gLlvkWHTjDAvwynZkL9ns15calTrmhGgowlwJBbWMYzWbKqE2DT6JDP1AFXKa+Zi0EkqNCUqY0A==", + "dev": true + }, + "istanbul-lib-hook": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-1.2.1.tgz", + "integrity": "sha512-eLAMkPG9FU0v5L02lIkcj/2/Zlz9OuluaXikdr5iStk8FDbSwAixTK9TkYxbF0eNnzAJTwM2fkV2A1tpsIp4Jg==", + "dev": true, + "requires": { + "append-transform": "^1.0.0" + } + }, + "istanbul-lib-instrument": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.1.tgz", + "integrity": "sha512-1dYuzkOCbuR5GRJqySuZdsmsNKPL3PTuyPevQfoCXJePT9C8y1ga75neU+Tuy9+yS3G/dgx8wgOmp2KLpgdoeQ==", + "dev": true, + "requires": { + "babel-generator": "^6.18.0", + "babel-template": "^6.16.0", + "babel-traverse": "^6.18.0", + "babel-types": "^6.18.0", + "babylon": "^6.18.0", + "istanbul-lib-coverage": "^1.2.0", + "semver": "^5.3.0" + } + }, + "istanbul-lib-report": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.1.4.tgz", + "integrity": "sha512-Azqvq5tT0U09nrncK3q82e/Zjkxa4tkFZv7E6VcqP0QCPn6oNljDPfrZEC/umNXds2t7b8sRJfs6Kmpzt8m2kA==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "^1.2.0", + "mkdirp": "^0.5.1", + "path-parse": "^1.0.5", + "supports-color": "^3.1.2" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "^1.0.0" + } + } + } + }, + "istanbul-lib-source-maps": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.5.tgz", + "integrity": "sha512-8O2T/3VhrQHn0XcJbP1/GN7kXMiRAlPi+fj3uEHrjBD8Oz7Py0prSC25C09NuAZS6bgW1NNKAvCSHZXB0irSGA==", + "dev": true, + "requires": { + "debug": "^3.1.0", + "istanbul-lib-coverage": "^1.2.0", + "mkdirp": "^0.5.1", + "rimraf": "^2.6.1", + "source-map": "^0.5.3" + }, + "dependencies": { + "mkdirp": { + "version": "0.5.1", + "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + } + } + }, + "istanbul-reports": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.5.0.tgz", + "integrity": "sha512-HeZG0WHretI9FXBni5wZ9DOgNziqDCEwetxnme5k1Vv5e81uTqcsy3fMH99gXGDGKr1ea87TyGseDMa2h4HEUA==", + "dev": true, + "requires": { + "handlebars": "^4.0.11" + } + }, + "iterall": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.2.2.tgz", + "integrity": "sha512-yynBb1g+RFUPY64fTrFv7nsjRrENBQJaX2UL+2Szc9REFrSNm1rpSXHGzhmAy7a9uv3vlvgBlXnf9RqmPH1/DA==" + }, + "jest": { + "version": "23.5.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-23.5.0.tgz", + "integrity": "sha512-+X3Fk4rD8dTnHoIxHJymZthbtYllvSOnXAApQltvyLkHsv+fqyC/SZptUJDbXkFsqZJyyIXMySkdzerz3fv4oQ==", + "dev": true, + "requires": { + "import-local": "^1.0.0", + "jest-cli": "^23.5.0" + }, + "dependencies": { + "jest-cli": { + "version": "23.5.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-23.5.0.tgz", + "integrity": "sha512-Kxi2QH8s6NkpPgboza/plpmQ2bjUQ+MwYv7vM5rDwJz/x+NB4YoLXFikPXLWNP0JuYpMvYwITKneFljnNKhq2Q==", + "dev": true, + "requires": { + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.1", + "exit": "^0.1.2", + "glob": "^7.1.2", + "graceful-fs": "^4.1.11", + "import-local": "^1.0.0", + "is-ci": "^1.0.10", + "istanbul-api": "^1.3.1", + "istanbul-lib-coverage": "^1.2.0", + "istanbul-lib-instrument": "^1.10.1", + "istanbul-lib-source-maps": "^1.2.4", + "jest-changed-files": "^23.4.2", + "jest-config": "^23.5.0", + "jest-environment-jsdom": "^23.4.0", + "jest-get-type": "^22.1.0", + "jest-haste-map": "^23.5.0", + "jest-message-util": "^23.4.0", + "jest-regex-util": "^23.3.0", + "jest-resolve-dependencies": "^23.5.0", + "jest-runner": "^23.5.0", + "jest-runtime": "^23.5.0", + "jest-snapshot": "^23.5.0", + "jest-util": "^23.4.0", + "jest-validate": "^23.5.0", + "jest-watcher": "^23.4.0", + "jest-worker": "^23.2.0", + "micromatch": "^2.3.11", + "node-notifier": "^5.2.1", + "prompts": "^0.1.9", + "realpath-native": "^1.0.0", + "rimraf": "^2.5.4", + "slash": "^1.0.0", + "string-length": "^2.0.0", + "strip-ansi": "^4.0.0", + "which": "^1.2.12", + "yargs": "^11.0.0" + } + } + } + }, + "jest-changed-files": { + "version": "23.4.2", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-23.4.2.tgz", + "integrity": "sha512-EyNhTAUWEfwnK0Is/09LxoqNDOn7mU7S3EHskG52djOFS/z+IT0jT3h3Ql61+dklcG7bJJitIWEMB4Sp1piHmA==", + "dev": true, + "requires": { + "throat": "^4.0.0" + } + }, + "jest-config": { + "version": "23.5.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-23.5.0.tgz", + "integrity": "sha512-JENhQpLaVwXWPLUkhPYgIfecHKsU8GR1vj79rS4n0LSRsHx/U2wItZKoKAd5vtt2J58JPxRq4XheG79jd4fI7Q==", + "dev": true, + "requires": { + "babel-core": "^6.0.0", + "babel-jest": "^23.4.2", + "chalk": "^2.0.1", + "glob": "^7.1.1", + "jest-environment-jsdom": "^23.4.0", + "jest-environment-node": "^23.4.0", + "jest-get-type": "^22.1.0", + "jest-jasmine2": "^23.5.0", + "jest-regex-util": "^23.3.0", + "jest-resolve": "^23.5.0", + "jest-util": "^23.4.0", + "jest-validate": "^23.5.0", + "micromatch": "^2.3.11", + "pretty-format": "^23.5.0" + } + }, + "jest-diff": { + "version": "23.5.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-23.5.0.tgz", + "integrity": "sha512-Miz8GakJIz443HkGpVOAyHQgSYqcgs2zQmDJl4oV7DYrFotchdoQvxceF6LhfpRBV1LOUGcFk5Dd/ffSXVwMsA==", + "dev": true, + "requires": { + "chalk": "^2.0.1", + "diff": "^3.2.0", + "jest-get-type": "^22.1.0", + "pretty-format": "^23.5.0" + } + }, + "jest-docblock": { + "version": "23.2.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-23.2.0.tgz", + "integrity": "sha1-8IXh8YVI2Z/dabICB+b9VdkTg6c=", + "dev": true, + "requires": { + "detect-newline": "^2.1.0" + } + }, + "jest-each": { + "version": "23.5.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-23.5.0.tgz", + "integrity": "sha512-8BgebQgAJmWXpYp4Qt9l3cn1Xei0kZ7JL4cs/NXh7750ATlPGzRRYbutFVJTk5B/Lt3mjHP3G3tLQLyBOCSHGA==", + "dev": true, + "requires": { + "chalk": "^2.0.1", + "pretty-format": "^23.5.0" + } + }, + "jest-environment-jsdom": { + "version": "23.4.0", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-23.4.0.tgz", + "integrity": "sha1-BWp5UrP+pROsYqFAosNox52eYCM=", + "dev": true, + "requires": { + "jest-mock": "^23.2.0", + "jest-util": "^23.4.0", + "jsdom": "^11.5.1" + } + }, + "jest-environment-node": { + "version": "23.4.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-23.4.0.tgz", + "integrity": "sha1-V+gO0IQd6jAxZ8zozXlSHeuv3hA=", + "dev": true, + "requires": { + "jest-mock": "^23.2.0", + "jest-util": "^23.4.0" + } + }, + "jest-get-type": { + "version": "22.4.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-22.4.3.tgz", + "integrity": "sha512-/jsz0Y+V29w1chdXVygEKSz2nBoHoYqNShPe+QgxSNjAuP1i8+k4LbQNrfoliKej0P45sivkSCh7yiD6ubHS3w==", + "dev": true + }, + "jest-haste-map": { + "version": "23.5.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-23.5.0.tgz", + "integrity": "sha512-bt9Swigb6KZ6ZQq/fQDUwdUeHenVvZ6G/lKwJjwRGp+Fap8D4B3bND3FaeJg7vXVsLX8hXshRArbVxLop/5wLw==", + "dev": true, + "requires": { + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.1.11", + "invariant": "^2.2.4", + "jest-docblock": "^23.2.0", + "jest-serializer": "^23.0.1", + "jest-worker": "^23.2.0", + "micromatch": "^2.3.11", + "sane": "^2.0.0" + } + }, + "jest-jasmine2": { + "version": "23.5.0", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-23.5.0.tgz", + "integrity": "sha512-xMgvDUvgqKpilsGnneC9Qr+uIlROxKI3UoJcHZeUlu6AKpQyEkGh0hKbfM0NaEjX5sy7WeFQEhcp/AiWlHcc0A==", + "dev": true, + "requires": { + "babel-traverse": "^6.0.0", + "chalk": "^2.0.1", + "co": "^4.6.0", + "expect": "^23.5.0", + "is-generator-fn": "^1.0.0", + "jest-diff": "^23.5.0", + "jest-each": "^23.5.0", + "jest-matcher-utils": "^23.5.0", + "jest-message-util": "^23.4.0", + "jest-snapshot": "^23.5.0", + "jest-util": "^23.4.0", + "pretty-format": "^23.5.0" + } + }, + "jest-leak-detector": { + "version": "23.5.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-23.5.0.tgz", + "integrity": "sha512-40VsHQCIEslxg91Zg5NiZGtPeWSBLXiD6Ww+lhHlIF6u8uSQ+xgiD6NbWHFOYs1VBRI+V/ym7Q1aOtVg9tqMzQ==", + "dev": true, + "requires": { + "pretty-format": "^23.5.0" + } + }, + "jest-matcher-utils": { + "version": "23.5.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-23.5.0.tgz", + "integrity": "sha512-hmQUKUKYOExp3T8dNYK9A9copCFYKoRLcY4WDJJ0Z2u3oF6rmAhHuZtmpHBuGpASazobBxm3TXAfAXDvz2T7+Q==", + "dev": true, + "requires": { + "chalk": "^2.0.1", + "jest-get-type": "^22.1.0", + "pretty-format": "^23.5.0" + } + }, + "jest-message-util": { + "version": "23.4.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-23.4.0.tgz", + "integrity": "sha1-F2EMUJQjSVCNAaPR4L2iwHkIap8=", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0-beta.35", + "chalk": "^2.0.1", + "micromatch": "^2.3.11", + "slash": "^1.0.0", + "stack-utils": "^1.0.1" + } + }, + "jest-mock": { + "version": "23.2.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-23.2.0.tgz", + "integrity": "sha1-rRxg8p6HGdR8JuETgJi20YsmETQ=", + "dev": true + }, + "jest-regex-util": { + "version": "23.3.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-23.3.0.tgz", + "integrity": "sha1-X4ZylUfCeFxAAs6qj4Sf6MpHG8U=", + "dev": true + }, + "jest-resolve": { + "version": "23.5.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-23.5.0.tgz", + "integrity": "sha512-CRPc0ebG3baNKz/QicIy5rGfzYpMNm8AjEl/tDQhehq/QC4ttyauZdvAXel3qo+4Gri9ljajnxW+hWyxZbbcnQ==", + "dev": true, + "requires": { + "browser-resolve": "^1.11.3", + "chalk": "^2.0.1", + "realpath-native": "^1.0.0" + } + }, + "jest-resolve-dependencies": { + "version": "23.5.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-23.5.0.tgz", + "integrity": "sha512-APZc/CjfzL8rH/wr+Gh7XJJygYaDjMQsWaJy4ZR1WaHWKude4WcfdU8xjqaNbx5NsVF2P2tVvsLbumlPXCdJOw==", + "dev": true, + "requires": { + "jest-regex-util": "^23.3.0", + "jest-snapshot": "^23.5.0" + } + }, + "jest-runner": { + "version": "23.5.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-23.5.0.tgz", + "integrity": "sha512-cpBvkBTVmW1ab1thbtoh2m6VnnM0BYKhj3MEzbOTZjPfzoIjUVIxLUTDobVNOvEK7aTEb/2oiPlNoOTSNJx8mw==", + "dev": true, + "requires": { + "exit": "^0.1.2", + "graceful-fs": "^4.1.11", + "jest-config": "^23.5.0", + "jest-docblock": "^23.2.0", + "jest-haste-map": "^23.5.0", + "jest-jasmine2": "^23.5.0", + "jest-leak-detector": "^23.5.0", + "jest-message-util": "^23.4.0", + "jest-runtime": "^23.5.0", + "jest-util": "^23.4.0", + "jest-worker": "^23.2.0", + "source-map-support": "^0.5.6", + "throat": "^4.0.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-support": { + "version": "0.5.9", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.9.tgz", + "integrity": "sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + } + } + }, + "jest-runtime": { + "version": "23.5.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-23.5.0.tgz", + "integrity": "sha512-WzzYxYtoU8S1MJns0G4E3BsuFUTFBiu1qsk3iC9OTugzNQcQKt0BoOGsT7wXCKqkw/09QdV77vvaeJXST2Efgg==", + "dev": true, + "requires": { + "babel-core": "^6.0.0", + "babel-plugin-istanbul": "^4.1.6", + "chalk": "^2.0.1", + "convert-source-map": "^1.4.0", + "exit": "^0.1.2", + "fast-json-stable-stringify": "^2.0.0", + "graceful-fs": "^4.1.11", + "jest-config": "^23.5.0", + "jest-haste-map": "^23.5.0", + "jest-message-util": "^23.4.0", + "jest-regex-util": "^23.3.0", + "jest-resolve": "^23.5.0", + "jest-snapshot": "^23.5.0", + "jest-util": "^23.4.0", + "jest-validate": "^23.5.0", + "micromatch": "^2.3.11", + "realpath-native": "^1.0.0", + "slash": "^1.0.0", + "strip-bom": "3.0.0", + "write-file-atomic": "^2.1.0", + "yargs": "^11.0.0" + } + }, + "jest-serializer": { + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-23.0.1.tgz", + "integrity": "sha1-o3dq6zEekP6D+rnlM+hRAr0WQWU=", + "dev": true + }, + "jest-snapshot": { + "version": "23.5.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-23.5.0.tgz", + "integrity": "sha512-NYg8MFNVyPXmnnihiltasr4t1FJEXFbZFaw1vZCowcnezIQ9P1w+yxTwjWT564QP24Zbn5L9cjxLs8d6K+pNlw==", + "dev": true, + "requires": { + "babel-types": "^6.0.0", + "chalk": "^2.0.1", + "jest-diff": "^23.5.0", + "jest-matcher-utils": "^23.5.0", + "jest-message-util": "^23.4.0", + "jest-resolve": "^23.5.0", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "pretty-format": "^23.5.0", + "semver": "^5.5.0" + }, + "dependencies": { + "mkdirp": { + "version": "0.5.1", + "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + } + } + }, + "jest-util": { + "version": "23.4.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-23.4.0.tgz", + "integrity": "sha1-TQY8uSe68KI4Mf9hvsLLv0l5NWE=", + "dev": true, + "requires": { + "callsites": "^2.0.0", + "chalk": "^2.0.1", + "graceful-fs": "^4.1.11", + "is-ci": "^1.0.10", + "jest-message-util": "^23.4.0", + "mkdirp": "^0.5.1", + "slash": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "mkdirp": { + "version": "0.5.1", + "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "jest-validate": { + "version": "23.5.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-23.5.0.tgz", + "integrity": "sha512-XmStdYhfdiDKacXX5sNqEE61Zz4/yXaPcDsKvVA0429RBu2pkQyIltCVG7UitJIEAzSs3ociQTdyseAW8VGPiA==", + "dev": true, + "requires": { + "chalk": "^2.0.1", + "jest-get-type": "^22.1.0", + "leven": "^2.1.0", + "pretty-format": "^23.5.0" + } + }, + "jest-watcher": { + "version": "23.4.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-23.4.0.tgz", + "integrity": "sha1-0uKM50+NrWxq/JIrksq+9u0FyRw=", + "dev": true, + "requires": { + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.1", + "string-length": "^2.0.0" + } + }, + "jest-worker": { + "version": "23.2.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-23.2.0.tgz", + "integrity": "sha1-+vcGqNo2+uYOsmlXJX+ntdjqArk=", + "dev": true, + "requires": { + "merge-stream": "^1.0.1" + } + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "js-yaml": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", + "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true, + "optional": true + }, + "jsdom": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-11.12.0.tgz", + "integrity": "sha512-y8Px43oyiBM13Zc1z780FrfNLJCXTL40EWlty/LXUtcjykRBNgLlCjWXpfSPBl2iv+N7koQN+dvqszHZgT/Fjw==", + "dev": true, + "requires": { + "abab": "^2.0.0", + "acorn": "^5.5.3", + "acorn-globals": "^4.1.0", + "array-equal": "^1.0.0", + "cssom": ">= 0.3.2 < 0.4.0", + "cssstyle": "^1.0.0", + "data-urls": "^1.0.0", + "domexception": "^1.0.1", + "escodegen": "^1.9.1", + "html-encoding-sniffer": "^1.0.2", + "left-pad": "^1.3.0", + "nwsapi": "^2.0.7", + "parse5": "4.0.0", + "pn": "^1.1.0", + "request": "^2.87.0", + "request-promise-native": "^1.0.5", + "sax": "^1.2.4", + "symbol-tree": "^3.2.2", + "tough-cookie": "^2.3.4", + "w3c-hr-time": "^1.0.1", + "webidl-conversions": "^4.0.2", + "whatwg-encoding": "^1.0.3", + "whatwg-mimetype": "^2.1.0", + "whatwg-url": "^6.4.1", + "ws": "^5.2.0", + "xml-name-validator": "^3.0.0" + } + }, + "jsesc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.1.tgz", + "integrity": "sha1-5CGiqOINawgZ3yiQj3glJrlt0f4=", + "dev": true + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "kleur": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-2.0.2.tgz", + "integrity": "sha512-77XF9iTllATmG9lSlIv0qdQ2BQ/h9t0bJllHlbvsQ0zUWfU7Yi0S8L5JXzPZgkefIiajLmBJJ4BsMJmqcf7oxQ==", + "dev": true + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "dev": true, + "optional": true + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "^1.0.0" + } + }, + "left-pad": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/left-pad/-/left-pad-1.3.0.tgz", + "integrity": "sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA==", + "dev": true + }, + "leven": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", + "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=", + "dev": true + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==" + }, + "lodash.sortby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", + "dev": true + }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "dev": true + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "lru-cache": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", + "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "makeerror": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.11.tgz", + "integrity": "sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw=", + "dev": true, + "requires": { + "tmpl": "1.0.x" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "math-random": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", + "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", + "dev": true + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "dev": true + }, + "mem": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "merge": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/merge/-/merge-1.2.0.tgz", + "integrity": "sha1-dTHjnUlJwoGma4xabgJl6LBYlNo=", + "dev": true + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", + "dev": true + }, + "merge-stream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz", + "integrity": "sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE=", + "dev": true, + "requires": { + "readable-stream": "^2.0.1" + } + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "dev": true + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + } + }, + "mime": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==", + "dev": true + }, + "mime-db": { + "version": "1.35.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.35.0.tgz", + "integrity": "sha512-JWT/IcCTsB0Io3AhWUMjRqucrHSPsSf2xKLaRldJVULioggvkJvggZ3VXNNSRkCddE6D+BUI4HEIZIA2OjwIvg==", + "dev": true + }, + "mime-types": { + "version": "2.1.19", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.19.tgz", + "integrity": "sha512-P1tKYHVSZ6uFo26mtnve4HQFE3koh1UWVkp8YUC+ESBHe945xWSoXuHHiGarDqcEZ+whpCDnlNw5LON0kLo+sw==", + "dev": true, + "requires": { + "mime-db": "~1.35.0" + } + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "mixin-deep": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz", + "integrity": "sha1-G79asbqCevI1dRQ0kEJkVfSB/h4=" + }, + "morgan": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.9.0.tgz", + "integrity": "sha1-0B+mxlhZt2/PMbPLU6OCGjEdgFE=", + "requires": { + "basic-auth": "~2.0.0", + "debug": "2.6.9", + "depd": "~1.1.1", + "on-finished": "~2.3.0", + "on-headers": "~1.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + } + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "mustache": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/mustache/-/mustache-2.3.2.tgz", + "integrity": "sha512-KpMNwdQsYz3O/SBS1qJ/o3sqUJ5wSb8gb0pul8CO0S56b9Y2ALm8zCfsjPXsqGFfoNBkDwZuZIAjhsZI03gYVQ==" + }, + "nan": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.0.tgz", + "integrity": "sha512-F4miItu2rGnV2ySkXOQoA8FKz/SR2Q2sWP0sbTxNxz/tuokeC8WxOhPMcwi0qIyGtVn/rrSeLbvVkznqCdwYnw==", + "dev": true, + "optional": true + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "negotiator": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", + "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=", + "dev": true + }, + "node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=", + "dev": true + }, + "node-notifier": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-5.2.1.tgz", + "integrity": "sha512-MIBs+AAd6dJ2SklbbE8RUDRlIVhU8MaNLh1A9SUZDUHPiZkWLFde6UNwG41yQHZEToHgJMXqyVZ9UcS/ReOVTg==", + "dev": true, + "requires": { + "growly": "^1.3.0", + "semver": "^5.4.1", + "shellwords": "^0.1.1", + "which": "^1.3.0" + } + }, + "nopt": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", + "requires": { + "abbrev": "1" + } + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "nwsapi": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.0.8.tgz", + "integrity": "sha512-7RZ+qbFGiVc6v14Y8DSZjPN1wZPOaMbiiP4tzf5eNuyOITAeOIA3cMhjuKUypVIqBgCSg1KaSyAv8Ocq/0ZJ1A==", + "dev": true + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "object-keys": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", + "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==", + "dev": true + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "object.getownpropertydescriptors": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", + "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.5.1" + } + }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "dev": true, + "requires": { + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, + "on-headers": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz", + "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c=" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, + "requires": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + }, + "dependencies": { + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + } + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "dev": true, + "requires": { + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "dev": true, + "requires": { + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" + } + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "parse5": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", + "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==", + "dev": true + }, + "parseurl": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", + "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=", + "dev": true + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "path-starts-with": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/path-starts-with/-/path-starts-with-1.0.0.tgz", + "integrity": "sha1-soJDAV6LE43lcmgqxS2kLmRq2E4=", + "requires": { + "normalize-path": "^2.1.1" + } + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", + "dev": true + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "requires": { + "find-up": "^2.1.0" + } + }, + "pn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz", + "integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==", + "dev": true + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", + "dev": true + }, + "pretty-format": { + "version": "23.5.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-23.5.0.tgz", + "integrity": "sha512-iFLvYTXOn+C/s7eV+pr4E8DD7lYa2/klXMEz+lvH14qSDWAJ7S+kFmMe1SIWesATHQxopHTxRcB2nrpExhzaBA==", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0", + "ansi-styles": "^3.2.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + } + } + }, + "private": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", + "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true + }, + "prompts": { + "version": "0.1.14", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-0.1.14.tgz", + "integrity": "sha512-rxkyiE9YH6zAz/rZpywySLKkpaj0NMVyNw1qhsubdbjjSgcayjTShDreZGlFMcGSu5sab3bAKPfFk78PB90+8w==", + "dev": true, + "requires": { + "kleur": "^2.0.1", + "sisteransi": "^0.1.1" + } + }, + "proxy-addr": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz", + "integrity": "sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==", + "dev": true, + "requires": { + "forwarded": "~0.1.2", + "ipaddr.js": "1.8.0" + } + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "psl": { + "version": "1.1.29", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz", + "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==", + "dev": true + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "qs": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==", + "dev": true + }, + "randomatic": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.0.tgz", + "integrity": "sha512-KnGPVE0lo2WoXxIZ7cPR8YBpiol4gsSuOwDSg410oHh80ZMp5EiypNqL2K4Z77vJn6lB5rap7IkAmcUlalcnBQ==", + "dev": true, + "requires": { + "is-number": "^4.0.0", + "kind-of": "^6.0.0", + "math-random": "^1.0.1" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=", + "dev": true + }, + "raw-body": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", + "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", + "dev": true, + "requires": { + "bytes": "3.0.0", + "http-errors": "1.6.2", + "iconv-lite": "0.4.19", + "unpipe": "1.0.0" + }, + "dependencies": { + "depd": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", + "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=", + "dev": true + }, + "http-errors": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", + "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", + "dev": true, + "requires": { + "depd": "1.1.1", + "inherits": "2.0.3", + "setprototypeof": "1.0.3", + "statuses": ">= 1.3.1 < 2" + } + }, + "setprototypeof": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", + "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=", + "dev": true + } + } + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "read-pkg-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^3.0.0" + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "realpath-native": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/realpath-native/-/realpath-native-1.0.1.tgz", + "integrity": "sha512-W14EcXuqUvKP8dkWkD7B95iMy77lpMnlFXbbk409bQtNCbeu0kvRE5reo+yIZ3JXxg6frbGsz2DLQ39lrCB40g==", + "dev": true, + "requires": { + "util.promisify": "^1.0.0" + } + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "dev": true + }, + "regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "dev": true, + "requires": { + "is-equal-shallow": "^0.1.3" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" + }, + "repeat-element": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "^1.0.0" + } + }, + "request": { + "version": "2.88.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } + } + }, + "request-promise-core": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.1.tgz", + "integrity": "sha1-Pu4AssWqgyOc+wTFcA2jb4HNCLY=", + "dev": true, + "requires": { + "lodash": "^4.13.1" + } + }, + "request-promise-native": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.5.tgz", + "integrity": "sha1-UoF3D2jgyXGeUWP9P6tIIhX0/aU=", + "dev": true, + "requires": { + "request-promise-core": "1.1.1", + "stealthy-require": "^1.1.0", + "tough-cookie": ">=2.3.3" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true + }, + "resolve-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", + "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", + "dev": true, + "requires": { + "resolve-from": "^3.0.0" + } + }, + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "dev": true, + "optional": true, + "requires": { + "align-text": "^0.1.1" + } + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "requires": { + "glob": "^7.0.5" + } + }, + "rsvp": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/rsvp/-/rsvp-3.6.2.tgz", + "integrity": "sha512-OfWGQTb9vnwRjwtA2QwpG2ICclHC3pgXZO5xt8H2EfgDquO0qVdSb5T88L4qJVAEugbS56pAuV4XZM58UX8ulw==", + "dev": true + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "sane": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/sane/-/sane-2.5.2.tgz", + "integrity": "sha1-tNwYYcIbQn6SlQej51HiosuKs/o=", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "capture-exit": "^1.2.0", + "exec-sh": "^0.2.0", + "fb-watchman": "^2.0.0", + "fsevents": "^1.2.3", + "micromatch": "^3.1.4", + "minimist": "^1.1.1", + "walker": "~1.0.5", + "watch": "~0.18.0" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + }, + "semver": { + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz", + "integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==", + "dev": true + }, + "send": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", + "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", + "dev": true, + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.6.2", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "~2.3.0", + "range-parser": "~1.2.0", + "statuses": "~1.4.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "serve-static": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", + "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", + "dev": true, + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.2", + "send": "0.16.2" + } + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-value": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "shellwords": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", + "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "sisteransi": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-0.1.1.tgz", + "integrity": "sha512-PmGOd02bM9YO5ifxpw36nrNMBTptEtfRl4qUYl9SndkolplkrZZOW7PGHjrZL53QvMVj9nQ+TKqUnRsw4tJa4g==", + "dev": true + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "dev": true, + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "dev": true, + "requires": { + "source-map": "^0.5.6" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, + "spdx-correct": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", + "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", + "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", + "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", + "dev": true + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, + "sshpk": { + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", + "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", + "dev": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "stack-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.1.tgz", + "integrity": "sha1-1PM6tU6OOHeLDKXP07OvsS22hiA=", + "dev": true + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==", + "dev": true + }, + "stealthy-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", + "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=", + "dev": true + }, + "string-length": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-2.0.0.tgz", + "integrity": "sha1-1A27aGo6zpYMHP/KVivyxF+DY+0=", + "dev": true, + "requires": { + "astral-regex": "^1.0.0", + "strip-ansi": "^4.0.0" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + } + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "superagent": { + "version": "3.8.2", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.2.tgz", + "integrity": "sha512-gVH4QfYHcY3P0f/BZzavLreHW3T1v7hG9B+hpMQotGQqurOvhv87GcMCd6LWySmBuf+BDR44TQd0aISjVHLeNQ==", + "dev": true, + "requires": { + "component-emitter": "^1.2.0", + "cookiejar": "^2.1.0", + "debug": "^3.1.0", + "extend": "^3.0.0", + "form-data": "^2.3.1", + "formidable": "^1.1.1", + "methods": "^1.1.1", + "mime": "^1.4.1", + "qs": "^6.5.1", + "readable-stream": "^2.0.5" + } + }, + "supertest": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/supertest/-/supertest-3.1.0.tgz", + "integrity": "sha512-O44AMnmJqx294uJQjfUmEyYOg7d9mylNFsMw/Wkz4evKd1njyPrtCN+U6ZIC7sKtfEVQhfTqFFijlXx8KP/Czw==", + "dev": true, + "requires": { + "methods": "~1.1.2", + "superagent": "3.8.2" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "symbol-observable": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", + "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==" + }, + "symbol-tree": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.2.tgz", + "integrity": "sha1-rifbOPZgp64uHDt9G8KQgZuFGeY=", + "dev": true + }, + "test-exclude": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-4.2.2.tgz", + "integrity": "sha512-2kTGf+3tykCfrWVREgyTR0bmVO0afE6i7zVXi/m+bZZ8ujV89Aulxdcdv32yH+unVFg3Y5o6GA8IzsHnGQuFgQ==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "minimatch": "^3.0.4", + "read-pkg-up": "^3.0.0", + "require-main-filename": "^1.0.1" + } + }, + "throat": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/throat/-/throat-4.1.0.tgz", + "integrity": "sha1-iQN8vJLFarGJJua6TLsgDhVnKmo=", + "dev": true + }, + "tmpl": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.4.tgz", + "integrity": "sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=", + "dev": true + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + } + } + }, + "tough-cookie": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "dev": true, + "requires": { + "psl": "^1.1.24", + "punycode": "^1.4.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + } + } + }, + "tr46": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", + "integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "traverse": { + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", + "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=" + }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true, + "optional": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "type-is": { + "version": "1.6.16", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", + "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", + "dev": true, + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.18" + } + }, + "uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "dev": true, + "optional": true, + "requires": { + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" + }, + "dependencies": { + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "dev": true, + "optional": true, + "requires": { + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" + } + } + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "dev": true, + "optional": true + }, + "union-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" + } + } + } + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "util.promisify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", + "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "object.getownpropertydescriptors": "^2.0.3" + } + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", + "dev": true + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "dev": true + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "w3c-hr-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz", + "integrity": "sha1-gqwr/2PZUOqeMYmlimViX+3xkEU=", + "dev": true, + "requires": { + "browser-process-hrtime": "^0.1.2" + } + }, + "walker": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz", + "integrity": "sha1-L3+bj9ENZ3JisYqITijRlhjgKPs=", + "dev": true, + "requires": { + "makeerror": "1.0.x" + } + }, + "watch": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/watch/-/watch-0.18.0.tgz", + "integrity": "sha1-KAlUdsbffJDJYxOJkMClQj60uYY=", + "dev": true, + "requires": { + "exec-sh": "^0.2.0", + "minimist": "^1.2.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, + "webidl-conversions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", + "dev": true + }, + "whatwg-encoding": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.4.tgz", + "integrity": "sha512-vM9KWN6MP2mIHZ86ytcyIv7e8Cj3KTfO2nd2c8PFDqcI4bxFmQp83ibq4wadq7rL9l9sZV6o9B0LTt8ygGAAXg==", + "dev": true, + "requires": { + "iconv-lite": "0.4.23" + }, + "dependencies": { + "iconv-lite": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", + "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + } + } + }, + "whatwg-mimetype": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.1.0.tgz", + "integrity": "sha512-FKxhYLytBQiUKjkYteN71fAUA3g6KpNXoho1isLiLSB3N1G4F35Q5vUxWfKFhBwi5IWF27VE6WxhrnnC+m0Mew==", + "dev": true + }, + "whatwg-url": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-6.5.0.tgz", + "integrity": "sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ==", + "dev": true, + "requires": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "dev": true, + "optional": true + }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write-file-atomic": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", + "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" + } + }, + "ws": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", + "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==", + "dev": true, + "requires": { + "async-limiter": "~1.0.0" + } + }, + "xml-name-validator": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", + "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", + "dev": true + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, + "yargs": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.1.0.tgz", + "integrity": "sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A==", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^9.0.2" + }, + "dependencies": { + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + } + } + }, + "yargs-parser": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", + "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + }, + "dependencies": { + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + } + } + }, + "zen-observable": { + "version": "0.8.9", + "resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.8.9.tgz", + "integrity": "sha512-Y9kPzjGvIZ5jchSlqlCpBW3I82zBBL4z+ulXDRVA1NwsKzjt5kwAi+gOYIy0htNkfuehGZZtP5mRXHRV6TjDWw==" + }, + "zen-observable-ts": { + "version": "0.8.9", + "resolved": "https://registry.npmjs.org/zen-observable-ts/-/zen-observable-ts-0.8.9.tgz", + "integrity": "sha512-KJz2O8FxbAdAU5CSc8qZ1K2WYEJb1HxS6XDRF+hOJ1rOYcg6eTMmS9xYHCXzqZZzKw6BbXWyF4UpwSsBQnHJeA==", + "requires": { + "zen-observable": "^0.8.0" + } + } + } +} diff --git a/packages/upward-js/package.json b/packages/upward-js/package.json new file mode 100644 index 0000000000..eccc54c0b9 --- /dev/null +++ b/packages/upward-js/package.json @@ -0,0 +1,57 @@ +{ + "name": "@magento/upward-js", + "version": "0.1.0", + "description": "Implementation of the UPWARD spec as a NodeJS server", + "main": "./lib/index.js", + "bin": { + "upward-js-server": "./bin/server" + }, + "files": [ + "./lib", + "./bin" + ], + "engines": { + "node": ">=8.0.0" + }, + "scripts": { + "test": "jest", + "test:spec": "upward-spec ./test_spec.sh" + }, + "repository": "github:magento-research/pwa-studio", + "keywords": [ + "magento", + "pwa", + "express", + "upward" + ], + "author": "Magento Commerce", + "license": "SEE LICENSE IN LICENSE.txt", + "bugs": { + "url": "https://github.com/magento-research/pwa-studio/issues" + }, + "homepage": "https://github.com/magento-research/pwa-studio/tree/master/packages/upward-js#readme", + "dependencies": { + "apollo-boost": "^0.1.13", + "apollo-link": "^1.2.2", + "apollo-link-http": "^1.5.4", + "contains-path": "^1.0.0", + "debug": "^3.1.0", + "graphql": "^0.13.2", + "graphql-tag": "^2.9.2", + "hogan.js": "^3.0.2", + "js-yaml": "^3.12.0", + "lodash": "^4.17.10", + "morgan": "^1.9.0", + "mustache": "^2.3.2", + "traverse": "^0.6.6" + }, + "devDependencies": { + "@magento/upward-spec": "*", + "express": "^4.16.3", + "jest": "^23.5.0", + "supertest": "^3.1.0" + }, + "peerDependencies": { + "express": "^4.16.3" + } +} diff --git a/packages/upward-js/test_spec.sh b/packages/upward-js/test_spec.sh new file mode 100755 index 0000000000..d48818d2d4 --- /dev/null +++ b/packages/upward-js/test_spec.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +UPWARD_JS_BIND_LOCAL=1 \ +UPWARD_JS_LOG_URL=1 \ +UPWARD_JS_UPWARD_PATH="$UPWARD_PATH" exec ./bin/server diff --git a/packages/upward-spec/README.md b/packages/upward-spec/README.md index fe76475910..7ef7cef57e 100644 --- a/packages/upward-spec/README.md +++ b/packages/upward-spec/README.md @@ -19,7 +19,8 @@ See [UPWARD_MAGENTO.md](UPWARD_MAGENTO.md) for context on how UPWARD fills a nee - [Response flush triggering](#response-flush-triggering) - [Context Reference](#context-reference) - [Initial context](#initial-context) - - [Augmenting the initial context](#augmenting-the-initial-context) + - [Context Path Syntax](#context-path-syntax) + - [Using context](#using-context) - [Context persistence and size](#context-persistence-and-size) - [Resolver Reference](#resolver-reference) - [InlineResolver](#inlineresolver) @@ -36,6 +37,7 @@ See [UPWARD_MAGENTO.md](UPWARD_MAGENTO.md) for context on how UPWARD fills a nee - [ServiceResolver Error Handling](#serviceresolver-error-handling) - [TemplateResolver](#templateresolver) - [TemplateResolver Configuration Options](#templateresolver-configuration-options) + - [Template Context](#template-context) - [Template Engines](#template-engines) - [Example React DOM Server support](#example-react-dom-server-support) - [TemplateResolver Error Handling](#templateresolver-error-handling) @@ -54,8 +56,6 @@ See [UPWARD_MAGENTO.md](UPWARD_MAGENTO.md) for context on how UPWARD fills a nee This repository is a test suite for UPWARD compliance, testing several scenarios and features on a live web server. It requires NodeJS v8 LTS or later. To test an UPWARD server: -:warning: _(This feature is not yet implemented.)_ - 1. Install the `npx` utility to run global NPM commands: ```sh @@ -64,7 +64,7 @@ This repository is a test suite for UPWARD compliance, testing several scenarios 2. Write or obtain a POSIX shell script which: - - gets the path to an `upward.yml` file from the environment variable `UPWARD_YAML_PATH` + - gets the path to an UPWARD definition file from the environment variable `UPWARD_PATH` - launches and/or binds the UPWARD server under test and runs it in the foreground (not as a daemon process). - prints the hostname and port of the now-running server instance to standard out - responds to SIGTERM by gracefully closing the server @@ -77,23 +77,25 @@ This repository is a test suite for UPWARD compliance, testing several scenarios npx upward-spec ./test_my_upward.sh ``` -4. The shell script will run for each test suite with the environment variable `UPWARD_YAML` set to the path of a fixture `upward.yml` file for configuring a server instance. The script should launch a server (on a local port or a remote port, but resolvable to the local system) and print its host to standard out, staying in the foreground. +4. The shell script will run for each test suite with the environment variable `UPWARD_YAML` set to the path of a fixture YAML file for configuring a server instance. The script should launch a server (on a local port or a remote port, but resolvable to the local system) and print its host to standard out, staying in the foreground. + + The tests may run in parallel, so the server or launch script should seek open ports to bind to. When each test suite is over, the script will receive a SIGTERM or SIGKILL. - The tests run in parallel. When each test suite is over, the script will receive a SIGTERM or SIGKILL. +5. By default, the test runner will print human-readable results to stdout; the argument `--xunit` will make it print XUnit-compatible (and therefore JUnit-compatible) test result XML. The argument `--tap` will make it print [Test Anything Protocol](https://testanything.org/)-compatible text. Under the hood, this uses [tape](https://github.com/substack/tape) and it can be piped to [any number of open-source TAP reporters](https://github.com/sindresorhus/awesome-tap#javascript). -5. The test suite will print results to stdout; the argument `--junit` will make it print JUnit-compatible test result XML to stdout. +:information_source: _(The `npx` tool above is not required; it's a convenience script to avoid installing global NPM dependencies. You can also install `upward-spec` permanently using `npm install -g upward-spec`, and then simply invoke `upward-spec ./test_my_upward.sh` from that point forward.)_ ## Summary -UPWARD files are XML, YAML or JSON files which declare the behavior of an [application shell][application shell] server. An application shell server implements a strict subset of HTTP functionality: it handles an HTTP GET request for a resource and delivers enough code and data to bootstrap a Progressive Web App which displays that resource. +UPWARD definitions are YAML files which declare the behavior of an [application shell][application shell] server. An application shell server implements a strict subset of HTTP functionality: it handles an HTTP GET request for a resource and delivers enough code and data to bootstrap a Progressive Web App which displays that resource. An App Shell is purposefully minimal, and so is an UPWARD server. It is meant to initialize or refresh sessions, deliver small HTML documents with enough server-side rendering for initial display and SEO, and then hand off subsequent request handling to the PWA running in the client. -The declarative format of UPWARD means that an UPWARD-compliant server may be written in any programming language and run on any tech stack; therefore, a PWA can declare its own runtime network dependency by including an UPWARD file. +The declarative format of UPWARD means that an UPWARD-compliant server may be written in any programming language and run on any tech stack; therefore, a PWA can declare the URIs and behavior of the network endpoints it depends on by including an UPWARD file. ### Simple example -This example `upward.yml` echoes request data as text back to the client. +This example definition file echoes request data as text back to the client. ```yaml status: @@ -106,60 +108,78 @@ headers: body: resolver: template engine: mustache + provide: + - request template: resolver: inline inline: | {{#request}} Headers: {{#headerEntries}} - {{key}}: {{value}} + {{name}}: {{value}} {{/headerEntries}} URL: - {{#url}} - protocol: {{protocol}} - host: {{host}} - hostname: {{hostname}} - port: {{port}} - pathname: {{pathname}} + {{#url}}{{#?protocol}}protocol: {{protocol}} + {{/?protocol}}{{#?host}}host: {{host}} + {{/?host}}{{#?hostname}}hostname: {{hostname}} + {{/?hostname}}{{#?port}}port: {{port}} + {{/?port}}pathname: {{pathname}} {{/url}} URL Query: - {{#url.queryEntries}} - {{key}}: {{value}} - {{/url.queryEntries}} + {{#queryEntries}} + {{name}}: {{value}} + {{/queryEntries}} {{/request}} + ``` -This trivial example demonstrates the initial properties of the context object, populated by the originating HTTP request. describes a server which always returns status 200 with a single header, `content-type`, and a text body which is a plaintext summary of the GET request properties. +This trivial example demonstrates the initial properties of the context object, populated by the originating HTTP request. describes a server which always returns status 200 with a single header, `content-type`, and a text body which is a plaintext summary of the GET request properties. An example request to such a server results in: + +```sh +$ curl 'http://localhost:54422/head/shoulders?and=knees&and=toes' + +Headers: + host: localhost:54422 + user-agent: curl/7.54.0 + accept: */* +URL: + host: localhost:54422 + hostname: localhost + port: 54422 + pathname: /head/shoulders +URL Query: + and: knees,toes +``` ## Configuration -A spec-compliant UPWARD server should be configurable with a runtime parameter: the location of the `upward.yml` file. The file references external resources using [Resolvers](#resolvers). +A spec-compliant UPWARD server should be configurable with a runtime parameter: the location of the UPWARD definition YML file. The file references external resources using [Resolvers](#resolvers). ## Responding to requests -**An `upward.yml` file is an instruction manual for building an HTTP response.** It assembles values in a global namespace hereafter called the **context**. The context object begins with the incoming `Request` assigned to the context value `request`, and current environment variables assigned to the context value `env`. Root properties of `upward.yml` represent other named values in the context, which Resolvers populate. Resolvers can use other context properties as input, and they can also use other Resolvers directly; in this way, the context itself can be considered a decision tree. +**An UPWARD definition file is an instruction manual for building an HTTP response.** It links values together in a global namespace hereafter called the **context**. Each request handling cycle begins with with a new context object, with the incoming `Request` assigned to the context value `request`, and current environment variables assigned to the context value `env`. Root properties of the definition file represent other named values in the context, which Resolvers populate. Resolvers can use other context properties as input, and they can also use other Resolvers directly; in this way, the definition itself can be considered an abstract decision tree, from which code could be statically generated. ### Execution scheduling and ordering 1. **Resolvers must execute only when needed.** If a request handling cycle moves through ConditionalResolver branches in a way that never requires a particular context value, then that context value must never be resolved during that execution cycle. -1. **Resolvers must execute as concurrently as possible**. The maximum concurrency is left to the implementation. A compliant server detects when a Resolver uses a context value, and delays its execution until that context value becomes available, via [topological sorting][topological ordering] of resolver execution. To manually design serial workflows, you must use `after` properties in Resolvers to delay their execution until a given context value is available. +2. **Resolvers must execute as concurrently as possible**. The maximum concurrency is left to the implementation. A compliant server detects when a Resolver uses a context value, and delays its execution until that context value becomes available, via [topological sorting][topological sorting] of resolver execution. See [EXECUTION_SCHEDULING_STRATEGIES.md](EXECUTION_SCHEDULING_STRATEGIES.md) for an example of how this could be implemented. ### Cyclic dependencies -**An UPWARD server must detect cyclic dependencies, and should detect them as soon as possible**. Only bare string literals can be used to reference context objects in `upward.yml`, so it should be possible to detect potential cyclic dependencies upon first processing the configuration file, before any requests are made. If a cyclic dependency is detected in this manner, the server should raise an error on startup. If a cyclic dependency occurs at runtime, the server should return a 500 error. +**An UPWARD server must detect cyclic dependencies, and should detect them as soon as possible**. Only bare string literals can be used to reference context objects in a definition file, so it should be possible to detect potential cyclic dependencies upon first processing the configuration file, before any requests are made. If a cyclic dependency is detected in this manner, the server should raise an error on startup. If a cyclic dependency occurs at runtime, the server should return a 500 error. ### Response flush triggering -**The root context must always eventually have `status`, `headers`, and `body` properties.** Once the context has these three properties, the UPWARD-compliant server should immediately use those three values to create an HTTP response and flush it to the client. No streaming or buffering interface should be provided; UPWARD servers should not deal in data large enough to require streaming. **If all resolvers finish executing and the response is lacking any of the `status`, `headers`, or `body` properties, the server should emit a 500 error.** If it is possible at startup time to trace a path through the decision tree where this occurs, the implementation should do so and raise an error on startup. +**The root context must always eventually have non-null `status`, `headers`, and `body` properties.** Once the resolution path has assigned these three values fo context, the UPWARD-compliant server should immediately use those three values to create an HTTP response and flush it to the client. No streaming or buffering interface should be provided; UPWARD servers should not deal in data large enough to require streaming. **If all resolvers finish executing and the response is lacking any of the `status`, `headers`, or `body` properties, the server should emit a 500 error.** If it is possible at startup time to trace a path through the decision tree where this occurs, the implementation may use static analysis to do so and raise an error on startup. ## Context Reference The context is a global namespace created for each request. It is a dictionary of values, like a JSON object. A typical response cycle may append intermediate values to the context, like a query result or a template string. Those values do not emit as part of the response. Only the `status`, `headers`, and `body` properties of the context will be flushed to the client. Since the context is the global namespace and the means of sharing values between resolvers, it may become a large object at some points in the cycle, but this should not affect performance on the client. -Context values cannot be overwritten. A resolver which attempts to overwrite an already-set context value must raise a context conflict error. UPWARD-compliant servers should be able to identify potential context conflict errors during static analysis of the `upward.yml` file and raise an error on launch. UPWARD-compliant servers must be able to identify a context conflict during runtime execution and respond with a 500 error. +Context values cannot be overwritten. A resolver which attempts to overwrite an already-set context value must raise a context conflict error. UPWARD-compliant servers should be able to identify potential context conflict errors during static analysis of the definition file and raise an error on launch. UPWARD-compliant servers must be able to identify a context conflict during runtime execution and respond with a 500 error. ### Initial context @@ -184,24 +204,21 @@ When an UPWARD-compliant server receives an HTTP GET request, it must populate a ] ``` - - `url`: A [URL record][url spec] as specified by WHATWG, consisting of: + - `url`: A subset of a [URL record][url spec] as specified by WHATWG. The following properties should at least be populated; the Host header can be used to infer the origin. | Attribute | Example | --------- | ------- - | `href` | `https://admin:12345@example.com:8080/foo/bar?baby=beluga` - | `origin` | `https://example.com:8080` - | `protocol`| `https:` - | `username`| `admin` - | `password`| `12345` | `host` | `example.com:8080` | `hostname`| `example.com` | `port` | `8080` - | `pathname`| `/foo/bar` + | `pathname`| `/deep/blue/sea` | `search` | `?baby=beluga` | `query` | `{ "baby": "beluga" }` | `queryEntries` | `[{ "name": "baby", "value": "beluga" }]` - The `query` and `queryEntries` properties are not prt of the WHATWG specification, but they must be included in the `url` object nevertheless. Much like the `headers` and `headerEntries` properties, these objects exist for property lookup and iteration, respectively. + Because HTTP servers are sometimes unable to ascertain their own domain names or origins, it is acceptable for one or more of the `href`, `origin`, `protocol`, `username`, `password`, `host`, `hostname`, and `port` properties to be undefined. However, a compliant server MUST provide `pathname`, `search`, `query`, and `queryEntries`. + + The `query` and `queryEntries` properties are not part of the WHATWG specification, but they must be included in the `url` object nevertheless. Much like the `headers` and `headerEntries` properties, these objects exist for property lookup and iteration in logic-less templates, respectively. - `env`: an object containing the environment variables set when the server was launched. For instance, if a Dockerfile launches the server through Apache, with an environment variable MAGENTO_GRAPHQL_ENDPOINT: @@ -212,9 +229,11 @@ When an UPWARD-compliant server receives an HTTP GET request, it must populate a then the context value `env.MAGENTO_GRAPHQL_ENDPOINT` would equal `"https://m2host.com/graphql"`. -- `GET`: the string `'GET'`, included in the global context for convenience, to [reduce boilerplate](#reducing-boilerplate) +For convenience and concision, frequently used strings should be registered as self-referential top-level context objects. Examples include: + +- `GET`: the string `'GET'` must be included in the global context for convenience, to [reduce boilerplate](#reducing-boilerplate) -- `POST`: the string `'POST'`, included in the global context for convenience, to [reduce boilerplate](#reducing-boilerplate) +- `POST`: the string `'POST'` must be included in the global context for convenience, to [reduce boilerplate](#reducing-boilerplate) - `mustache`: the string `'mustache'`, included in the global context for convenience, to [reduce boilerplate](#reducing-boilerplate) @@ -229,68 +248,239 @@ When an UPWARD-compliant server receives an HTTP GET request, it must populate a - `hex` - All valid HTTP response codes, i.e. `200`, `404`, `500`, and all others. -#### Augmenting the initial context +#### Context Path Syntax + +In UPWARD configuration, **a bare string is treated as a context lookup by default.** Some resolver configuration properties must treat bare strings as literal strings, and the default contains many constants for common strings, as mentioned earlier, so a definition file may appear to use many literal strings, but almost all string values are context lookups. -All operations and resolvers augment the initial context. Legal context property names must follow the same rules as [JavaScript identifiers][js identifiers]; they must consist of alphanumeric characters, `$` or `_`, and they must not begin with a number. +A context lookup resembles "dot lookup" notation in JavaSript or Python, though it has simpler rules and cannot be dynamically generated. -Include context values by simply setting them with inline resolvers at the top level: +Rules: + +- **Valid characters**: A context lookup may contain any UTF-8 characters except control characters, whitespace, or newlines. All characters that are not lookup operators must be treated as part of a property name. _For the sake of easier manipulation in common programming languages, it is a best to use context names which are legal identifiers in those languages.)_ + - A context lookup cannot begin with the lookup operators: a dot ., an opening square bracket [, or a closing square bracket ]. +- **Lookup operators**: The dot . denotes a named property lookup on an object. The square brackets surrounding a signed integer [int] denote array access by index. An index must be a positive integer; it must be specified literally and cannot be derived. +- A context lookup always starts with a **basename**. This may be any string that can be a valid YAML property name. The basename has special significance; when a top-level resolver completes resolution, it assigns a value to this name in the global context, which should trigger resolution of all paths beginning with that name. +- **Behavior for undeclared properties**: Undeclared property lookup should silently fail, resolving the empty string. If the **basename** `foo` is assigned, but it is not an object or it does not contain the property `bar`, then the context lookup `foo.bar` should wait until `foo` is assigned, and then yield the empty string. + +Parts of a context lookup: + +```txt + string property names +basename | | + | | array index | + | | | | + uxbridges.characters[0].name + | | + named property lookups +``` + +The above context lookup behaves at runtime as an instruction to wait until the `uxbridges` basename has been assigned. There must be a definition elsewhere in the definition file which assigns this property, e.g. ```yaml -react: - resolver: inline - inline: react +uxbridges: + resolver: service + method: POST + resolver: inline + inline: false + url: + resolver: inline + inline: http://stapi.co/api/v1/rest/character/search + headers: + resolver: inline + inline: + content-type: application/x-www-form-urlencoded + query: + resolver: inline + inline: '{ + characters @rest(type: "Character", path: ) + }' ``` -Now, you can name the template engine directly instead of resolving the name as a literal string. In UPWARD configuration, **a bare string represents the context value by that name.** +The above definition would assign an [`HttpResponse`](#http-response) to the `uxbridges` basename once it has run. An HTTP response has no `characters` property, so the example context lookup would resolve to the empty string. However, an HTTP response does have a `body` property, so the lookup `uxbridges.body.characters[0].name` would resolve to `Kevin Uxbridge`. -```diff -body: - resolver: template -+ engine: react -- engine: -- resolver: inline -- inline: react +:information_source: _(Array and list handling is intentionally rudimentary in UPWARD, because of the potential for scope confusion, performance and security issues in iteration. The only recommended use case for list lookup is when a web service returns a list of items expected to have only one result, so that the result may be lifted out into a scalar value.)_ + +Since arbitrary property lookups do not through exceptions and instead return a default empty string, use [pattern matching](#conditional-resolver) to test the success or failure of requests and responses: + +```yaml +matches: uxbridges.body.characters[0].name +pattern: '.' ``` -THe context may be augmented with complex values as well: +The regex dot character will pass if the string is non-empty, and fail if it is empty. This pattern should be common in UPWARD definitions. + +#### Using context + +Anywhere a in the definition file where a resolver is allowed, you may substitute a **context lookup** instead. A context path indicates a dependency on another root context value, which causes the current branch to wait until that value is resolved. In this example: ```yaml -customRenderers: - resolver: inline - inline: - react: - resolver: inline - inline: reactDOMServer - vue: - resolver: inline - inline: vuejs +body: + resolver: conditional + when: + - matches: request.url.query.shipmentId + pattern: '\d+' + use: + resolver: template + engine: mustache + template: + resolver: file + file: + resolver: inline + inline: './renderShipment.mst' + provide: + shipment: + resolver: service + query: + resolver: file + file: + resolver: inline + inline: './getShipment.graphql' + variables: + id: request.url.query.shipmentId + - matches: request.url.query.shipmentName + pattern: '\w+' + use: + resolver: template + engine: mustache + template: + resolver: file + file: + resolver: inline + inline: './renderShipment.mst' + provide: + shipment: + resolver: service + url: env.SHIPMENTS_SVC + query: + resolver: file + file: + resolver: inline + inline: './getShipment.graphql' + variables: + name: request.url.query.shipmentName + - matches: request.url.query.shipmentTrackingNumber + pattern: '[\w\d\.]+' + use: + resolver: template + engine: mustache + template: + resolver: file + file: + resolver: inline + inline: './renderShipment.mst' + provide: + shipment: + resolver: service + url: env.SHIPMENTS_SVC + query: + resolver: file + file: + resolver: inline + inline: './getShipment.graphql' + variables: + trackingNumber: request.url.query.shipmentTrackingNumber + default: + inline: 'Please provide a query' ``` -The context will include the property `customRenderers`, whose value matches the JSON object: +The matchers use the context lookups `request.url.query.shipmentId`, `request.url.query.shipmentName`, and `request.url.query.shipmentTrackingNumber` to obtain values for comparison. The request object is part of the initial context, but you can also declare dependencies on other context values you have defined. The above definition could be more concisely expressed using intermediate values and more context lookups: -```json -{ - "react": "reactDOMServer", - "vue": "vuejs" -} +```yaml + +body: + resolver: conditional + when: + - matches: gqlVariables + pattern: null + use: + inline: 'Please provide a query' + default: + resolver: template + engine: mustache + template: + resolver: file + file: + resolver: inline + inline: './renderShipment.mst' + provide: + shipment: + resolver: service + url: env.SHIPMENTS_SVC + query: + resolver: file + file: + resolver: inline + inline: './getShipment.graphql' + variables: gqlVariables +gqlVariables: + resolver: conditional + when: + - matches: request.url.query.shipmentId + pattern: '\d+' + use: + resolver: inline + inline: + id: request.url.query.shipmentId + - matches: request.url.query.shipmentName + pattern: '\w+' + use: + resolver: inline + inline: + name: request.url.query.shipmentName + - matches: request.url.query.shipmentTrackingNumber + pattern: '[\w\d\.]+' + use: + resolver: inline + inline: + trackingNumber: request.url.query.trackingNumber + default: null ``` -In UPWARD configuration, **a bare string with dots, e.g. `customRenderers.react`, should perform lookup on nested context values.** _(In contrast, UPWARD context lookup cannot refer to individual list items.)_ +The above definition produces a server with identical behavior to the previous query, in 30% fewer lines. This is not the only way to use context values to reduce the first, repetitive definition, but it demonstrates the idea. If the GraphQL service set an order of precedence for the shipment query which used the same priority logic as the ConditionalResolver, the definition could be further reduced to use the same variable set in all cases: -```diff +```yaml body: + resolver: conditional + when: + - matches: request.url.query.shipmentId + pattern: '\d+' + use: getShipment + - matches: request.url.query.shipmentName + pattern: '\w+' + use: getShipment + - matches: request.url.query.shipmentTrackingNumber + pattern: '[\w\d\.]+' + use: getShipment + default: + inline: 'Please provide a query' +getShipment: resolver: template -+ engine: customRenderers.react -- engine: -- resolver: inline -- inline: react + engine: mustache + template: + resolver: file + file: + resolver: inline + inline: './renderShipment.mst' + provide: + shipment: + resolver: service + url: env.SHIPMENTS_SVC + query: + resolver: file + file: + resolver: inline + inline: './getShipment.graphql' + variables: + id: request.url.query.shipmentId + name: request.url.query.shipmentName + trackingNumber: request.url.query.trackingNumber ``` -See [Reducing boilerplate](#reducing-boilerplate) for more practices to reduce verbosity in `upward.yml`. +Setting top-level context properties for reusable values is an important way to reduce verbosity and code duplication in the definition file. See [Reducing boilerplate](#reducing-boilerplate) for more practices to reduce verbosity in a definition file. #### Context persistence and size -When writing `upward.yml`, no distinction needs to be made between "persistent" context values that should be the same for each request, and other values that may differ for each request. An UPWARD server must do topological sorting to determine the order in which to run Resolvers, so an efficient implementation can identify the parts of the root context that are not dependent on the incoming request and cache or discard them. +When writing UPWARD definitions, no distinction needs to be made between "persistent" context values that should be the same for each request, and other values that may differ for each request. An UPWARD server must do topological sorting to determine the order in which to run Resolvers, so an efficient implementation can identify the parts of the root context that are not dependent on the incoming request and cache or discard them. ## Resolver Reference @@ -302,7 +492,7 @@ A Resolver is an object which describes how a value is obtained. There are five - `TemplateResolver` renders a template string against the context - `ConditionalResolver` does branch logic using pattern matching on context values -Each Resolver takes different configuration parameters. +Each Resolver takes different configuration parameters. Like a context lookup string, a resolver represents an operation which will execute and then deliver its results upward in the tree, until all dependencies of the top-level `status`, `headers`, and `body` definitions are resolved. ### InlineResolver @@ -343,21 +533,19 @@ query: inline: 'utf-8' ``` -The above expression loads the content of the file `./productDetail.graphql` and sets it as the property `query`. The file path is resolved relative to the location of the `upward.yml` file. The `charset` property is optional. +The above expression loads the content of the file `./productDetail.graphql` and sets it as the property `query`. The file path is resolved relative to the location of the definition file. The `charset` property is optional. #### FileResolver Configuration Options | Property | Type | Default | Description | -------- | ---------- | ------- | --------------------------------------------- -| `file` | `Resolved` | | _Required_. Path to the file to be read. Resolved relative to the `upward.yml` file. +| `file` | `Resolved` | | _Required_. Path to the file to be read. Resolved relative to the definition file. | `charset` | `Resolved` | `utf-8` | Character set to use when reading the file as text. Can be `utf-8`, `latin-1`, or `binary`. -| `parse` | `Resolved` | `auto` | Attempt to parse the file as a given file type. The default of `auto` should attempt to determine the file type from its extension. The value `text` will effectively disable parsing. The values `graphql`, `mustache`, `yaml`, and `json` should force parsing the file as those respective file types. -| `fallback` | `Resolved` | | If this value is set, it will be used if there is a problem reading or parsing the file. Errors will be swallowed instead of surfaced. -| `after` | `string` | | Manually override topological sorting. If this value is set to a string, the resolver will not run until the named context value is set, or until all pending Resolvers have run. +| `parse` | `Resolved` | `auto` | Attempt to parse the file as a given file type. The default of `auto` should attempt to determine the file type from its extension. The value `text` will effectively disable parsing. #### Parsing -An UPWARD server must support pre-parsing of `graphql`, `mustache`, `yaml`, and `json` files, but should support as many filetypes as possible and may support custom filetypes. +An UPWARD server must support pre-parsing of `graphql` and `mustache` files according to their respective specifications, but should support as many filetypes as necessary and may support custom filetypes. #### FileResolver Error Handling @@ -367,7 +555,7 @@ If the file cannot be found or there were any other failures reading the file, t #### FileResolver shorthand -Filenames will usually be specified as literals, rather than dynamically resolved out of context. For readability and convenience, a "shorthand syntax" must be available to imply a FileResolver that loads and parses a UTF-8 encoded file from a string filesystem path. Instead of explicitly resolving a filepath as an inline string: +Filenames are usually not variable; they will usually be specified as literals, rather than dynamically resolved out of context. For readability and convenience, a "shorthand syntax" must be available to imply a FileResolver that loads and parses a UTF-8 encoded file from a string filesystem path. Instead of explicitly resolving a filepath as an inline string: ```yaml query: @@ -452,7 +640,6 @@ documentResult: | `headers` | `Resolved>` | | Additional HTTP headers to send with the GraphQL request. Some headers are set automatically, but the `headers` configuration can append to headers that can have multiple values. | `query` | `Resolved` | | _Required_. The GraphQL query object. Can either be a parsed query, or a string that can be parsed as a valid query. | `variables` | `Object>` | `{}` | Variables to use with the GraphQL query. Must be an object with literal keys; the names of variables cannot be dynamically resolved, since a GraphQL query's possible variables are known ahead of time. -| `after` | `string` | | Manually override topological sorting. If this value is set to a string, the resolver will not run until the named context value is set, or until all pending Resolvers have run. **ServiceResolvers always use GraphQL.** To obtain data from a non-GraphQL service, an UPWARD server may implement client-side directives which change the behavior of a GraphQL query, such as [apollo-link-rest][apollo-link-rest], and place the directives in the query itself. This should be transparent to the UPWARD server itself, which delegates the service call to a GraphQL client. If an UPWARD server's GraphQL client has no implementation for such a directive, then it must pass the query unmodified to the backing service to handle the directive. @@ -533,7 +720,7 @@ body: {{> footer}} ``` -The above configuration resolves into an HTML document displaying content from the `documentResult.data.document` context value. Its use of [Mustache partials][mustache partials] implies that additional files called `headtag.mst`, `header.mst`, and `footer.mst` exist in the directory containing `upward.yml`. Attempting to include a missing partial should raise an error as soon as the template is resolved, ideally at server startup time. +The above configuration resolves into an HTML document displaying content from the `documentResult.data.document` context value. Its use of [Mustache partials][mustache partials] implies that additional files called `headtag.mst`, `header.mst`, and `footer.mst` exist in the directory containing the definition file. Attempting to include a missing partial should raise an error as soon as the template is resolved, ideally at server startup time. :information_source: _(For illustrative purposes, the above uses an InlineResolver where it would be more appropriate to use a FileResolver to obtain the template, as with the query in the ServiceResolver example.)_ @@ -542,13 +729,56 @@ The above configuration resolves into an HTML document displaying content from t | Property | Type | Default | Description | --------- | ------------------ | --------------------------- | --------------- | `engine` | `Resolved` | | _Required_. The label of the template engine to use. -| `root` | `Resolved` | _[context]_ | The root value to use as context when rendering the template. +| `provide` | `Resolved>` | | A list, or an object mapping, of values to make available in the template. | `template` | `Resolved` | | The template to render. Required by the `mustache` engine. -| `after` | `string` | | Manually override topological sorting. If this value is set to a string, the resolver will not run until the named context value is set, or until all pending Resolvers have run. + +#### Template Context + +The entire context cannot be available for template render; that would cause an immediate circular dependency, since the template's output is added to context! Instead, use the `provide` argument to select what values the template actually needs. They will be available, at root, inside the template. + +The `provide` argument can be a list: + +```yaml +provide: + - env + - articleResult +``` + +The resulting template eval context might look like this: + +```json +"env": { + "envVars": "here" +}, +"articleResult": { + "data": { + "article": { + articleContents: 'here' + } + } +} +``` + +*Lists may only inject "base" context properties.* The above `articleResult` could not be `articleResult.data.article` when using the list format. + +The other, more powerful option for the `provide` argument is to provide a `mapping`, as a simple object. A mapping is a plain object of string keys and context values. It might appear as: + +```yaml +provide: + article: articleResult.data.article +``` + +This would give the template a single root property "article", thus flatting out the template tree and making templates more readable. + +```json +"article": { + articleContents: 'here' +} +``` #### Template Engines -The `engine` property must resolve to a string labeling a supported template engine. The only required template engine is Mustache, and its label must be `mustache`. An UPWARD server may support additional template engines. For instance, an UPWARD server may support [ReactJS server-side rendering][react dom server]. Such a template engine may require additional properties, which can be added to the TemplateResolver object itself. +The `engine` property must resolve to a string labeling a supported template engine. The only required template engine is Mustache, and its label must be `mustache`. An UPWARD server may support additional template engines. For instance, an UPWARD server may support [ReactJS server-side rendering][react dom server]. ##### Example React DOM Server support @@ -558,17 +788,17 @@ body: engine: resolver: inline inline: react - props: + provide: document: documentResult.data.document query: request.url.query - component: + template: resolver: file file: resolver: inline inline: './build/RootComponents/Document.js' ``` -The above configuration assumes support for a template engine labeled `react`. Where the `mustache` template engine takes `root` and `template` properties, the `react` template engine takes `props` and `component` properties. The underlying template engine could be a simple Node module: +The above configuration assumes support for a template engine labeled `react`. The underlying template engine could be a simple Node module: ```js const { createElement } = require('react'); @@ -657,7 +887,6 @@ If some other configuration provides a different `status`, such as `200`, then n | --------- | ------------------ | ----------- | --------------- | `when` | `Matcher[]` | | | _Required_. The list of matchers to test against context. | `default` | `Resolved` | | _Required_. The default resolver to use if no matcher succeeds. -| `after` | `string` | | Manually override topological sorting. If this value is set to a string, the resolver will not run until the named context value is set, or until all pending Resolvers have run. #### Matchers @@ -673,10 +902,10 @@ A `Matcher` is an object which can only be used as an item in a ConditionalResol During the resolution of a matcher's `use` resolver, properties from the match object are temporarily added to the context. Using these temporary context values, resolvers can extract matching text, or capture groups, from the match itself. -- `match.$0` - The full text of the last matched value. -- `match.$1` - The string captured in the first backreference the regex declared. +- `$match.$0` - The full text of the last matched value. +- `$match.$1` - The string captured in the first backreference the regex declared. -The `match` object must have additional numbered properties for each backreference. +The `$match` object must have additional numbered properties for each backreference. #### ConditionalResolver notes @@ -753,14 +982,15 @@ headers: body: resolver: template engine: 'mustache' - root: documentResult.data.document + provide: + model: documentResult.data.document template: resolver: inline inline: | {{> headtag}} {{> header}}
-

{{title}}

+

{{model.title}}

{{& contents}}
diff --git a/packages/upward-spec/bin/upward-spec b/packages/upward-spec/bin/upward-spec new file mode 100755 index 0000000000..c11f7aa88d --- /dev/null +++ b/packages/upward-spec/bin/upward-spec @@ -0,0 +1,67 @@ +#!/usr/bin/env node +const path = require('path'); +const fs = require('fs'); + +const providedScriptPath = path.resolve(process.argv[2]); + +/** + * Unix permissions Bitmask to check if the script is + * readable and executable. + */ +const accessible = fs.constants.F_OK | fs.constants.X_OK; +try { + fs.accessSync(providedScriptPath, accessible); +} catch (e) { + throw Error( + e.message + + `\n\n\tMake sure ${providedScriptPath} exists and has executable permissions.` + ); +} + +/** + * Pass args to node-tap to expose its options. + */ +const otherArgs = process.argv.slice(3); +const hasArg = wanted => otherArgs.some(arg => arg === wanted); + +const useXunit = hasArg('--xunit'); +const useTap = hasArg('--tap'); + +if (useXunit && useTap) { + console.error( + 'Cannot use both --xunit and --tap flags. Please choose either XUnit output, TAP output, or no arguments for default human-readable output.' + ); +} + +const isPiped = !process.stdout.isTTY; + +const raw = useTap || isPiped; + +// Run tap and pass stdout. +const scenariosDir = path.resolve(__dirname, '../suite/scenarios/'); +const testProcess = require('child_process').spawn( + path.resolve(__dirname, '../node_modules/.bin/tape'), + ['*/tests.js'], + { + cwd: scenariosDir, + env: Object.assign( + { + UPWARD_SERVER_SCRIPT_PATH: providedScriptPath + }, + process.env + ) + } +); + +if (raw) { + testProcess.stdout.pipe(process.stdout); +} else if (useXunit) { + const tapXunit = require('tap-xunit'); + testProcess.stdout + .pipe(tapXunit({ package: 'UPWARD spec' })) + .pipe(process.stdout); +} else { + const tapDiff = require('tap-diff'); + testProcess.stdout.pipe(tapDiff()).pipe(process.stdout); +} +testProcess.stderr.pipe(process.stderr); diff --git a/packages/upward-spec/package-lock.json b/packages/upward-spec/package-lock.json new file mode 100644 index 0000000000..f1c7950a7d --- /dev/null +++ b/packages/upward-spec/package-lock.json @@ -0,0 +1,1617 @@ +{ + "name": "@magento/upward-spec", + "version": "0.1.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@apollographql/apollo-upload-server": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@apollographql/apollo-upload-server/-/apollo-upload-server-5.0.3.tgz", + "integrity": "sha512-tGAp3ULNyoA8b5o9LsU2Lq6SwgVPUOKAqKywu2liEtTvrFSGPrObwanhYwArq3GPeOqp2bi+JknSJCIU3oQN1Q==", + "requires": { + "@babel/runtime-corejs2": "^7.0.0-rc.1", + "busboy": "^0.2.14", + "object-path": "^0.11.4" + } + }, + "@apollographql/graphql-playground-html": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@apollographql/graphql-playground-html/-/graphql-playground-html-1.6.0.tgz", + "integrity": "sha512-QAZIFrfVRkjvMkUHIQKZXZ3La0V5t12w5PWrhihYEabHwzIZV/txQd/kSYHgYPXC4s5OURxsXZop9f0BzI2QIQ==" + }, + "@babel/runtime-corejs2": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs2/-/runtime-corejs2-7.0.0.tgz", + "integrity": "sha512-Yww0jXgolNtkhcK+Txo5JN+DjBpNmmAtD7G99HOebhEjBzjnACG09Tip9C8lSOF6PrhA56OeJWeOZduNJaKxBA==", + "requires": { + "core-js": "^2.5.7", + "regenerator-runtime": "^0.12.0" + } + }, + "@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78=" + }, + "@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + }, + "@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + }, + "@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A=" + }, + "@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", + "requires": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E=" + }, + "@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik=" + }, + "@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0=" + }, + "@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q=" + }, + "@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" + }, + "@types/accepts": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/accepts/-/accepts-1.3.5.tgz", + "integrity": "sha512-jOdnI/3qTpHABjM5cx1Hc0sKsPoYCp+DP/GJRGtDlPd7fiV9oXGGIcjW/ZOxLIvjGz8MA+uMZI9metHlgqbgwQ==", + "requires": { + "@types/node": "*" + } + }, + "@types/body-parser": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.17.0.tgz", + "integrity": "sha512-a2+YeUjPkztKJu5aIF2yArYFQQp8d51wZ7DavSHjFuY1mqVgidGyzEQ41JIVNy82fXj8yPgy2vJmfIywgESW6w==", + "requires": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "@types/connect": { + "version": "3.4.32", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.32.tgz", + "integrity": "sha512-4r8qa0quOvh7lGD0pre62CAb1oni1OO6ecJLGCezTmhQ8Fz50Arx9RUszryR8KlgK6avuSXvviL6yWyViQABOg==", + "requires": { + "@types/node": "*" + } + }, + "@types/cors": { + "version": "2.8.4", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.4.tgz", + "integrity": "sha512-ipZjBVsm2tF/n8qFGOuGBkUij9X9ZswVi9G3bx/6dz7POpVa6gVHcj1wsX/LVEn9MMF41fxK/PnZPPoTD1UFPw==", + "requires": { + "@types/express": "*" + } + }, + "@types/events": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@types/events/-/events-1.2.0.tgz", + "integrity": "sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA==" + }, + "@types/express": { + "version": "4.16.0", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.16.0.tgz", + "integrity": "sha512-TtPEYumsmSTtTetAPXlJVf3kEqb6wZK0bZojpJQrnD/djV4q1oB6QQ8aKvKqwNPACoe02GNiy5zDzcYivR5Z2w==", + "requires": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "*", + "@types/serve-static": "*" + } + }, + "@types/express-serve-static-core": { + "version": "4.16.0", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.16.0.tgz", + "integrity": "sha512-lTeoCu5NxJU4OD9moCgm0ESZzweAx0YqsAcab6OB0EB3+As1OaHtKnaGJvcngQxYsi9UNv0abn4/DRavrRxt4w==", + "requires": { + "@types/events": "*", + "@types/node": "*", + "@types/range-parser": "*" + } + }, + "@types/graphql": { + "version": "0.12.6", + "resolved": "https://registry.npmjs.org/@types/graphql/-/graphql-0.12.6.tgz", + "integrity": "sha512-wXAVyLfkG1UMkKOdMijVWFky39+OD/41KftzqfX1Oejd0Gm6dOIKjCihSVECg6X7PHjftxXmfOKA/d1H79ZfvQ==" + }, + "@types/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.0.tgz", + "integrity": "sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q==" + }, + "@types/mime": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-2.0.0.tgz", + "integrity": "sha512-A2TAGbTFdBw9azHbpVd+/FkdW2T6msN1uct1O9bH3vTerEHKZhTXJUQXy+hNq1B0RagfU8U+KBdqiZpxjhOUQA==" + }, + "@types/node": { + "version": "10.9.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.9.4.tgz", + "integrity": "sha512-fCHV45gS+m3hH17zgkgADUSi2RR1Vht6wOZ0jyHP8rjiQra9f+mIcgwPQHllmDocYOstIEbKlxbFDYlgrTPYqw==" + }, + "@types/range-parser": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.2.tgz", + "integrity": "sha512-HtKGu+qG1NPvYe1z7ezLsyIaXYyi8SoAVqWDZgDQ8dLrsZvSzUNCwZyfX33uhWxL/SU0ZDQZ3nwZ0nimt507Kw==" + }, + "@types/serve-static": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.2.tgz", + "integrity": "sha512-/BZ4QRLpH/bNYgZgwhKEh+5AsboDBcUdlBYgzoLX0fpj3Y2gp6EApyOlM3bK53wQS/OE1SrdSYBAbux2D1528Q==", + "requires": { + "@types/express-serve-static-core": "*", + "@types/mime": "*" + } + }, + "@types/ws": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-5.1.2.tgz", + "integrity": "sha512-NkTXUKTYdXdnPE2aUUbGOXE1XfMK527SCvU/9bj86kyFF6kZ9ZnOQ3mK5jADn98Y2vEUD/7wKDgZa7Qst2wYOg==", + "requires": { + "@types/events": "*", + "@types/node": "*" + } + }, + "accepts": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", + "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", + "requires": { + "mime-types": "~2.1.18", + "negotiator": "0.6.1" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "apollo-cache-control": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/apollo-cache-control/-/apollo-cache-control-0.2.2.tgz", + "integrity": "sha512-N5A1hO6nHZBCR+OCV58IlE7k6hZrFJZTf/Ab2WD8wduLSa0qLLRlCp3rXvD05+jpWa6sdKw03whW2omJ+SyT+w==", + "requires": { + "apollo-server-env": "2.0.2", + "graphql-extensions": "0.1.2" + } + }, + "apollo-datasource": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/apollo-datasource/-/apollo-datasource-0.1.2.tgz", + "integrity": "sha512-AbUxS7Qkz9+T+g19zKRJiA+tBVGVVunzXwd4ftDSYGx1VrF5LJJO7Gc57bk719gWIZneZ02HsVCEZd6NxFF8RQ==", + "requires": { + "apollo-server-caching": "0.1.2", + "apollo-server-env": "2.0.2" + } + }, + "apollo-engine-reporting": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/apollo-engine-reporting/-/apollo-engine-reporting-0.0.2.tgz", + "integrity": "sha512-Fe/1oxC8rUXRrBTMUiqs5PSb6hnMOJHuttJMhs83u5POfplc4QrKJZtEEU4Ui8mxeJGaGNWbWf+D4q645xdQLA==", + "requires": { + "apollo-engine-reporting-protobuf": "0.0.1", + "apollo-server-env": "2.0.2", + "async-retry": "^1.2.1", + "graphql-extensions": "0.1.2", + "lodash": "^4.17.10" + } + }, + "apollo-engine-reporting-protobuf": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/apollo-engine-reporting-protobuf/-/apollo-engine-reporting-protobuf-0.0.1.tgz", + "integrity": "sha512-AySoDgog2p1Nph44FyyqaU4AfRZOXx8XZxRsVHvYY4dHlrMmDDhhjfF3Jswa7Wr8X/ivvx3xA0jimRn6rsG8Ew==", + "requires": { + "protobufjs": "^6.8.6" + } + }, + "apollo-link": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/apollo-link/-/apollo-link-1.2.2.tgz", + "integrity": "sha512-Uk/BC09dm61DZRDSu52nGq0nFhq7mcBPTjy5EEH1eunJndtCaNXQhQz/BjkI2NdrfGI+B+i5he6YSoRBhYizdw==", + "requires": { + "@types/graphql": "0.12.6", + "apollo-utilities": "^1.0.0", + "zen-observable-ts": "^0.8.9" + } + }, + "apollo-server": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/apollo-server/-/apollo-server-2.0.5.tgz", + "integrity": "sha512-Li840fL17GGQWnTi6HpzmzgQb3MbBtJLmKzWgbXU9FJQsp1ZbiLnOgT136DeBf7n1gbvgLuxlLGgfYrD3QAwnA==", + "requires": { + "apollo-server-core": "2.0.4", + "apollo-server-express": "2.0.4", + "express": "^4.0.0", + "graphql-subscriptions": "^0.5.8", + "graphql-tools": "^3.0.4" + } + }, + "apollo-server-caching": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/apollo-server-caching/-/apollo-server-caching-0.1.2.tgz", + "integrity": "sha512-jBRnsTgXN0m8yVpumoelaUq9mXR7YpJ3EE+y/alI7zgXY+0qFDqksRApU8dEfg3q6qUnO7rFxRhdG5eyc0+1ig==", + "requires": { + "lru-cache": "^4.1.3" + } + }, + "apollo-server-core": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/apollo-server-core/-/apollo-server-core-2.0.4.tgz", + "integrity": "sha512-6kNaQYZfX2GvAT1g9ih0rodfRl4hPL1jXb7b+FvQ1foFR5Yyb3oqL2DOcP65gQi/7pGhyNRUAncPU18Vo3u9rQ==", + "requires": { + "@apollographql/apollo-upload-server": "^5.0.3", + "@types/ws": "^5.1.2", + "apollo-cache-control": "0.2.2", + "apollo-datasource": "0.1.2", + "apollo-engine-reporting": "0.0.2", + "apollo-server-caching": "0.1.2", + "apollo-server-env": "2.0.2", + "apollo-server-errors": "2.0.2", + "apollo-tracing": "0.2.2", + "graphql-extensions": "0.1.2", + "graphql-subscriptions": "^0.5.8", + "graphql-tag": "^2.9.2", + "graphql-tools": "^3.0.4", + "hash.js": "^1.1.3", + "lodash": "^4.17.10", + "subscriptions-transport-ws": "^0.9.11", + "ws": "^5.2.0" + } + }, + "apollo-server-env": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/apollo-server-env/-/apollo-server-env-2.0.2.tgz", + "integrity": "sha512-LsSh2TSF1Sh+TnKxCv2To+UNTnoPpBGCXn6fPsmiNqVaBaSagfZEU/aaSu3ftMlmfXr4vXAfYNUDMKEi+7E6Bg==", + "requires": { + "node-fetch": "^2.1.2", + "util.promisify": "^1.0.0" + } + }, + "apollo-server-errors": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/apollo-server-errors/-/apollo-server-errors-2.0.2.tgz", + "integrity": "sha512-zyWDqAVDCkj9espVsoUpZr9PwDznM8UW6fBfhV+i1br//s2AQb07N6ektZ9pRIEvkhykDZW+8tQbDwAO0vUROg==" + }, + "apollo-server-express": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/apollo-server-express/-/apollo-server-express-2.0.4.tgz", + "integrity": "sha512-9mxcFpnTgQTmrsvVRRofEY7N1bJYholjv99IfN8puu5lhNqj8ZbOPZYrw+zd+Yh4rZSonwx76ZzTRzM00Yllfw==", + "requires": { + "@apollographql/apollo-upload-server": "^5.0.3", + "@apollographql/graphql-playground-html": "^1.6.0", + "@types/accepts": "^1.3.5", + "@types/body-parser": "1.17.0", + "@types/cors": "^2.8.4", + "@types/express": "4.16.0", + "accepts": "^1.3.5", + "apollo-server-core": "2.0.4", + "body-parser": "^1.18.3", + "cors": "^2.8.4", + "graphql-subscriptions": "^0.5.8", + "graphql-tools": "^3.0.4", + "type-is": "^1.6.16" + }, + "dependencies": { + "body-parser": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz", + "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=", + "requires": { + "bytes": "3.0.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "~1.6.3", + "iconv-lite": "0.4.23", + "on-finished": "~2.3.0", + "qs": "6.5.2", + "raw-body": "2.3.3", + "type-is": "~1.6.16" + } + }, + "iconv-lite": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", + "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "raw-body": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", + "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", + "requires": { + "bytes": "3.0.0", + "http-errors": "1.6.3", + "iconv-lite": "0.4.23", + "unpipe": "1.0.0" + } + } + } + }, + "apollo-tracing": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/apollo-tracing/-/apollo-tracing-0.2.2.tgz", + "integrity": "sha512-zrpLRvaAqtzGufc1GfV+691xQtzq5elfBydg/7wzuaFszlMH66hkLas5Dw36drUX21CbCljOuGYvYzqSiKykuQ==", + "requires": { + "apollo-server-env": "2.0.2", + "graphql-extensions": "0.1.2" + } + }, + "apollo-utilities": { + "version": "1.0.19", + "resolved": "https://registry.npmjs.org/apollo-utilities/-/apollo-utilities-1.0.19.tgz", + "integrity": "sha512-pyVxizjIevHFfKhtc9FLEsGHmqiK0kHx1aBdJRUXDt+X+yjoVa/fVeCEo9t0NddGximemxxrQnq6lSkbIQvDlA==", + "requires": { + "fast-json-stable-stringify": "^2.0.0" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + }, + "async-limiter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", + "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==" + }, + "async-retry": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/async-retry/-/async-retry-1.2.1.tgz", + "integrity": "sha512-FadV8UDcyZDjzb6eV7MCJj0bfrNjwKw7/X0QHPFCbYP6T20FXgZCYXpJKlQC8RxEQP1E6Xs8pNHdh3bcrZAuAw==", + "requires": { + "retry": "0.10.1" + } + }, + "backo2": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", + "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "body-parser": { + "version": "1.18.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz", + "integrity": "sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=", + "requires": { + "bytes": "3.0.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.1", + "http-errors": "~1.6.2", + "iconv-lite": "0.4.19", + "on-finished": "~2.3.0", + "qs": "6.5.1", + "raw-body": "2.3.2", + "type-is": "~1.6.15" + }, + "dependencies": { + "qs": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" + } + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "busboy": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/busboy/-/busboy-0.2.14.tgz", + "integrity": "sha1-bCpiLvz0fFe7vh4qnDetNseSVFM=", + "requires": { + "dicer": "0.2.5", + "readable-stream": "1.1.x" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.2.tgz", + "integrity": "sha512-3NUJZdhMhcdPn8vJ9v2UQJoH0qqoGUkYTgFEPZaPjEtwmmKUfNV46zZmgB2M5M4DCEQHMaCfWHCxiBflLm04Tg==", + "requires": { + "color-name": "1.1.1" + } + }, + "color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok=" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=" + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + }, + "cookie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + }, + "core-js": { + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "cors": { + "version": "2.8.4", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.4.tgz", + "integrity": "sha1-K9OB8usgECAQXNUOpZ2mMJBpRoY=", + "requires": { + "object-assign": "^4", + "vary": "^1" + } + }, + "csv-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/csv-parse/-/csv-parse-3.0.0.tgz", + "integrity": "sha512-h58BzkfwYNY1gyfl6NUZe1OKxXy/Pn6ZeXlkz3fdLdg/r3Om+lgMySw9SxH7rDs8ARFFyIc6UI6fLnaeRkjNPQ==" + }, + "death": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/death/-/death-1.1.0.tgz", + "integrity": "sha1-AaqcQB7dknUFFEcLgmY5DGbGcxg=" + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "deep-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", + "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=" + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "requires": { + "object-keys": "^1.0.12" + } + }, + "defined": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", + "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=" + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + }, + "deprecated-decorator": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/deprecated-decorator/-/deprecated-decorator-0.1.6.tgz", + "integrity": "sha1-AJZjF7ehL+kvPMgx91g68ym4bDc=" + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, + "dicer": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/dicer/-/dicer-0.2.5.tgz", + "integrity": "sha1-WZbAhrszIYyBLAkL3cCc0S+stw8=", + "requires": { + "readable-stream": "1.1.x", + "streamsearch": "0.1.2" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, + "diff": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/diff/-/diff-2.2.3.tgz", + "integrity": "sha1-YOr9DSjukG5Oj/ClLBIpUhAzv5k=" + }, + "duplexer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", + "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=" + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + }, + "es-abstract": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", + "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", + "requires": { + "es-to-primitive": "^1.1.1", + "function-bind": "^1.1.1", + "has": "^1.0.1", + "is-callable": "^1.1.3", + "is-regex": "^1.0.4" + } + }, + "es-to-primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", + "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", + "requires": { + "is-callable": "^1.1.1", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.1" + } + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, + "eventemitter3": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz", + "integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA==" + }, + "events-to-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/events-to-array/-/events-to-array-1.1.2.tgz", + "integrity": "sha1-LUH1Y+H+QA7Uli/hpNXGp1Od9/Y=" + }, + "express": { + "version": "4.16.3", + "resolved": "https://registry.npmjs.org/express/-/express-4.16.3.tgz", + "integrity": "sha1-avilAjUNsyRuzEvs9rWjTSL37VM=", + "requires": { + "accepts": "~1.3.5", + "array-flatten": "1.1.1", + "body-parser": "1.18.2", + "content-disposition": "0.5.2", + "content-type": "~1.0.4", + "cookie": "0.3.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.1.1", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.3", + "qs": "6.5.1", + "range-parser": "~1.2.0", + "safe-buffer": "5.1.1", + "send": "0.16.2", + "serve-static": "1.13.2", + "setprototypeof": "1.1.0", + "statuses": "~1.4.0", + "type-is": "~1.6.16", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "dependencies": { + "finalhandler": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", + "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.4.0", + "unpipe": "~1.0.0" + } + }, + "qs": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + }, + "statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" + } + } + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + }, + "figures": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "requires": { + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" + } + }, + "for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "requires": { + "is-callable": "^1.1.3" + } + }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "graphql": { + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-0.13.2.tgz", + "integrity": "sha512-QZ5BL8ZO/B20VA8APauGBg3GyEgZ19eduvpLWoq5x7gMmWnHoy8rlQWPLmWgFvo1yNgjSEFMesmS4R6pPr7xog==", + "requires": { + "iterall": "^1.2.1" + } + }, + "graphql-extensions": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/graphql-extensions/-/graphql-extensions-0.1.2.tgz", + "integrity": "sha512-A81kfGtOKG0/1sDQGm23u60bkTuk9VDof0SrQrz7yNpPLY48JF11b8+4LNlYfEBVvceDbLAs1KRfyLQskJjJSg==", + "requires": { + "apollo-server-env": "2.0.2" + } + }, + "graphql-subscriptions": { + "version": "0.5.8", + "resolved": "https://registry.npmjs.org/graphql-subscriptions/-/graphql-subscriptions-0.5.8.tgz", + "integrity": "sha512-0CaZnXKBw2pwnIbvmVckby5Ge5e2ecmjofhYCdyeACbCly2j3WXDP/pl+s+Dqd2GQFC7y99NB+53jrt55CKxYQ==", + "requires": { + "iterall": "^1.2.1" + } + }, + "graphql-tag": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.9.2.tgz", + "integrity": "sha512-qnNmof9pAqj/LUzs3lStP0Gw1qhdVCUS7Ab7+SUB6KD5aX1uqxWQRwMnOGTkhKuLvLNIs1TvNz+iS9kUGl1MhA==" + }, + "graphql-tools": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/graphql-tools/-/graphql-tools-3.1.1.tgz", + "integrity": "sha512-yHvPkweUB0+Q/GWH5wIG60bpt8CTwBklCSzQdEHmRUgAdEQKxw+9B7zB3dG7wB3Ym7M7lfrS4Ej+jtDZfA2UXg==", + "requires": { + "apollo-link": "^1.2.2", + "apollo-utilities": "^1.0.1", + "deprecated-decorator": "^0.1.6", + "iterall": "^1.1.3", + "uuid": "^3.1.0" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "hash.js": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.5.tgz", + "integrity": "sha512-eWI5HG9Np+eHV1KQhisXWwM+4EPPYe5dFX1UZZH7k/E3JzDEazVH+VGlZi6R94ZqImq+A3D1mCEtrFIfg/E7sA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + }, + "dependencies": { + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" + } + } + }, + "iconv-lite": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", + "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ipaddr.js": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz", + "integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4=" + }, + "is-callable": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", + "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==" + }, + "is-date-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "requires": { + "has": "^1.0.1" + } + }, + "is-symbol": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", + "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "iterall": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.2.2.tgz", + "integrity": "sha512-yynBb1g+RFUPY64fTrFv7nsjRrENBQJaX2UL+2Szc9REFrSNm1rpSXHGzhmAy7a9uv3vlvgBlXnf9RqmPH1/DA==" + }, + "js-yaml": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", + "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "lodash": { + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==" + }, + "long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, + "lru-cache": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", + "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + }, + "mime": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" + }, + "mime-db": { + "version": "1.35.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.35.0.tgz", + "integrity": "sha512-JWT/IcCTsB0Io3AhWUMjRqucrHSPsSf2xKLaRldJVULioggvkJvggZ3VXNNSRkCddE6D+BUI4HEIZIA2OjwIvg==" + }, + "mime-types": { + "version": "2.1.19", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.19.tgz", + "integrity": "sha512-P1tKYHVSZ6uFo26mtnve4HQFE3koh1UWVkp8YUC+ESBHe945xWSoXuHHiGarDqcEZ+whpCDnlNw5LON0kLo+sw==", + "requires": { + "mime-db": "~1.35.0" + } + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "negotiator": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", + "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" + }, + "node-fetch": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.2.0.tgz", + "integrity": "sha512-OayFWziIxiHY8bCUyLX6sTpDH8Jsbp4FfYd1j1f7vZyfgkcOnAyM4oQR16f8a0s7Gl/viMGRey8eScYk4V4EZA==" + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "object-inspect": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.6.0.tgz", + "integrity": "sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ==" + }, + "object-keys": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", + "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==" + }, + "object-path": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/object-path/-/object-path-0.11.4.tgz", + "integrity": "sha1-NwrnUvvzfePqcKhhwju6iRVpGUk=" + }, + "object.getownpropertydescriptors": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", + "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.5.1" + } + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "parse-ms": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-1.0.1.tgz", + "integrity": "sha1-VjRtR0nXjyNDDKDHE4UK75GqNh0=" + }, + "parseurl": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", + "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + }, + "plur": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/plur/-/plur-1.0.0.tgz", + "integrity": "sha1-24XGgU9eXlo7Se/CjWBP7GKXUVY=" + }, + "pretty-ms": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-2.1.0.tgz", + "integrity": "sha1-QlfCVt8/sLRR1q/6qwIYhBJpgdw=", + "requires": { + "is-finite": "^1.0.1", + "parse-ms": "^1.0.0", + "plur": "^1.0.0" + } + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" + }, + "protobufjs": { + "version": "6.8.8", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.8.8.tgz", + "integrity": "sha512-AAmHtD5pXgZfi7GMpllpO3q1Xw1OYldr+dMUlAnffGTAhqkg72WdmSY71uKBF/JuyiKs8psYbtKrhi0ASCD8qw==", + "requires": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.0", + "@types/node": "^10.1.0", + "long": "^4.0.0" + } + }, + "proxy-addr": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz", + "integrity": "sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==", + "requires": { + "forwarded": "~0.1.2", + "ipaddr.js": "1.8.0" + } + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + }, + "range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" + }, + "raw-body": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", + "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", + "requires": { + "bytes": "3.0.0", + "http-errors": "1.6.2", + "iconv-lite": "0.4.19", + "unpipe": "1.0.0" + }, + "dependencies": { + "depd": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", + "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=" + }, + "http-errors": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", + "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", + "requires": { + "depd": "1.1.1", + "inherits": "2.0.3", + "setprototypeof": "1.0.3", + "statuses": ">= 1.3.1 < 2" + } + }, + "setprototypeof": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", + "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=" + } + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "regenerator-runtime": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz", + "integrity": "sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==" + }, + "resolve": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz", + "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==", + "requires": { + "path-parse": "^1.0.5" + } + }, + "resumer": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/resumer/-/resumer-0.0.0.tgz", + "integrity": "sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k=", + "requires": { + "through": "~2.3.4" + } + }, + "retry": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz", + "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=" + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "send": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", + "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.6.2", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "~2.3.0", + "range-parser": "~1.2.0", + "statuses": "~1.4.0" + }, + "dependencies": { + "statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" + } + } + }, + "serve-static": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", + "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.2", + "send": "0.16.2" + } + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, + "statuses": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", + "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=" + }, + "streamsearch": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-0.1.2.tgz", + "integrity": "sha1-gIudDlb8Jz2Am6VzOOkpkZoanxo=" + }, + "string.prototype.trim": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz", + "integrity": "sha1-0E3iyJ4Tf019IG8Ia17S+ua+jOo=", + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.5.0", + "function-bind": "^1.0.2" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "subscriptions-transport-ws": { + "version": "0.9.14", + "resolved": "https://registry.npmjs.org/subscriptions-transport-ws/-/subscriptions-transport-ws-0.9.14.tgz", + "integrity": "sha512-n1+mgupVdJn1MIls1ZhSJurJjc+islp7Tv9EIaEJ3HAd9DaINneKq0KRqOYNOrvUI7orVWGomEnlIxoudjfbeA==", + "requires": { + "backo2": "^1.0.2", + "eventemitter3": "^3.1.0", + "iterall": "^1.2.1", + "symbol-observable": "^1.0.4", + "ws": "^5.2.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + }, + "symbol-observable": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", + "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==" + }, + "tap-diff": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/tap-diff/-/tap-diff-0.1.1.tgz", + "integrity": "sha1-j78zM9hWQ/7qG/F1m5CCCwSjfd8=", + "requires": { + "chalk": "^1.1.1", + "diff": "^2.2.1", + "duplexer": "^0.1.1", + "figures": "^1.4.0", + "pretty-ms": "^2.1.0", + "tap-parser": "^1.2.2", + "through2": "^2.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "tap-parser": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-1.3.2.tgz", + "integrity": "sha1-EgxQiciMPIp5PvKIhn3jIeGPjCI=", + "requires": { + "events-to-array": "^1.0.1", + "inherits": "~2.0.1", + "js-yaml": "^3.2.7", + "readable-stream": "^2" + } + }, + "tap-xunit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tap-xunit/-/tap-xunit-2.3.0.tgz", + "integrity": "sha512-YVsURNvn1wfVUWb5wjansxhfbfeo2hOBTUbVgZoaMO8lyZzpiSi9IiZTZ7JG56m6A49LeWjfJIx/SnAre41V/A==", + "requires": { + "duplexer": "~0.1.1", + "minimist": "~1.2.0", + "tap-parser": "~1.2.2", + "through2": "~2.0.0", + "xmlbuilder": "~4.2.0", + "xtend": "~4.0.0" + }, + "dependencies": { + "tap-parser": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-1.2.2.tgz", + "integrity": "sha1-Xi9pcGEfB5x8+FfeHceqG0gN56U=", + "requires": { + "events-to-array": "^1.0.1", + "inherits": "~2.0.1", + "js-yaml": "^3.2.7", + "readable-stream": "^2" + } + } + } + }, + "tape": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/tape/-/tape-4.9.1.tgz", + "integrity": "sha512-6fKIXknLpoe/Jp4rzHKFPpJUHDHDqn8jus99IfPnHIjyz78HYlefTGD3b5EkbQzuLfaEvmfPK3IolLgq2xT3kw==", + "requires": { + "deep-equal": "~1.0.1", + "defined": "~1.0.0", + "for-each": "~0.3.3", + "function-bind": "~1.1.1", + "glob": "~7.1.2", + "has": "~1.0.3", + "inherits": "~2.0.3", + "minimist": "~1.2.0", + "object-inspect": "~1.6.0", + "resolve": "~1.7.1", + "resumer": "~0.0.0", + "string.prototype.trim": "~1.1.2", + "through": "~2.3.8" + } + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, + "through2": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "requires": { + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" + } + }, + "type-is": { + "version": "1.6.16", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", + "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.18" + } + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "util.promisify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", + "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", + "requires": { + "define-properties": "^1.1.2", + "object.getownpropertydescriptors": "^2.0.3" + } + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "ws": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", + "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==", + "requires": { + "async-limiter": "~1.0.0" + } + }, + "xmlbuilder": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-4.2.1.tgz", + "integrity": "sha1-qlijBBoGb5DqoWwvU4n/GfP0YaU=", + "requires": { + "lodash": "^4.0.0" + } + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" + }, + "zen-observable": { + "version": "0.8.9", + "resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.8.9.tgz", + "integrity": "sha512-Y9kPzjGvIZ5jchSlqlCpBW3I82zBBL4z+ulXDRVA1NwsKzjt5kwAi+gOYIy0htNkfuehGZZtP5mRXHRV6TjDWw==" + }, + "zen-observable-ts": { + "version": "0.8.9", + "resolved": "https://registry.npmjs.org/zen-observable-ts/-/zen-observable-ts-0.8.9.tgz", + "integrity": "sha512-KJz2O8FxbAdAU5CSc8qZ1K2WYEJb1HxS6XDRF+hOJ1rOYcg6eTMmS9xYHCXzqZZzKw6BbXWyF4UpwSsBQnHJeA==", + "requires": { + "zen-observable": "^0.8.0" + } + } + } +} diff --git a/packages/upward-spec/package.json b/packages/upward-spec/package.json new file mode 100644 index 0000000000..92937027c7 --- /dev/null +++ b/packages/upward-spec/package.json @@ -0,0 +1,37 @@ +{ + "name": "@magento/upward-spec", + "version": "0.1.0", + "description": "UPWARD specification, guide, and test suite.", + "main": "./suite/index.js", + "bin": { + "upward-spec": "./bin/upward-spec" + }, + "engines": { + "node": ">=8.0.0" + }, + "repository": "github:magento-research/pwa-studio", + "keywords": [ + "magento", + "pwa", + "specification", + "upward" + ], + "author": "Magento Commerce", + "license": "SEE LICENSE IN LICENSE.txt", + "bugs": { + "url": "https://github.com/magento-research/pwa-studio/issues" + }, + "homepage": "https://github.com/magento-research/pwa-studio/tree/master/packages/upward-spec#readme", + "dependencies": { + "apollo-server": "^2.0.5", + "chalk": "^2.4.1", + "csv-parse": "^3.0.0", + "death": "^1.1.0", + "graphql": "^0.13.2", + "graphql-tag": "^2.9.2", + "js-yaml": "^3.12.0", + "tap-diff": "^0.1.1", + "tap-xunit": "^2.3.0", + "tape": "^4.9.1" + } +} diff --git a/packages/upward-spec/suite/MockGQLService.js b/packages/upward-spec/suite/MockGQLService.js new file mode 100644 index 0000000000..e7ff6d1a97 --- /dev/null +++ b/packages/upward-spec/suite/MockGQLService.js @@ -0,0 +1,19 @@ +const { ApolloServer, gql } = require('apollo-server'); +module.exports = async function(schema, Query) { + const typeDefs = gql(schema); + const server = new ApolloServer({ + typeDefs, + resolvers: { Query } + }); + const { url } = server.listen(); + return { + url, + server, + async close() { + return new Promise(resolve => { + server.on('close', resolve); + server.close(); + }); + } + }; +}; diff --git a/packages/upward-spec/suite/assertOnResponse.js b/packages/upward-spec/suite/assertOnResponse.js new file mode 100644 index 0000000000..3de81a3600 --- /dev/null +++ b/packages/upward-spec/suite/assertOnResponse.js @@ -0,0 +1,73 @@ +const { inspect } = require('util'); + +module.exports = async (t, response, expected) => { + // lift up as useful a stack trace as possible for the most common case, + // which is a server-side error at runtime for an unsupported scenario + if (response.status >= 400 && expected.status !== response.status) { + const errorText = await response.clone().text(); + let errors; + try { + errors = JSON.parse(errorText).errors; + } catch (e) {} + if (!errors || !Array.isArray(errors) || errors.length === 0) { + return t.fail( + `Error: Expected ${inspect( + expected + )}, server responded with a NON-COMPLIANT ERROR: (Server errors should emit GraphQL-compliant error JSON.) Received status ${ + response.status + }: ${errorText}` + ); + } + return t.fail( + 'Server reported errors: ' + + errors.map(({ message }, i) => `[Error ${i + 1}: ${message}]\t`) + ); + } + + const responseHeaders = {}; + response.headers.forEach((value, name) => { + responseHeaders[name] = value; + responseHeaders[name.toLowerCase()] = value.toString(); + }); + + t.equal(response.status, expected.status, `status code ${expected.status}`); + + Object.entries(expected.headers).forEach(([header, start]) => { + const value = responseHeaders[header.toLowerCase()]; + if (!value) { + t.fail( + `header ${header} not present in ${inspect(responseHeaders)}` + ); + } else { + t.ok(value.startsWith(start), `header ${header} is ${value}`); + } + }); + try { + const body = await response.clone().text(); + if (expected.text) { + const msg = `body should match '${expected.text}': ${body}`; + if (body.includes(expected.text)) { + t.pass(msg); + } else { + t.fail(msg); + } + } + if (expected.json) { + let parsed; + try { + parsed = JSON.parse(body); + } catch (e) { + t.fail(e.message); + } + Object.entries(expected.json).forEach(([name, value]) => + t.equal( + value, + parsed[name], + `JSON ${name} === ${JSON.stringify(parsed[name])}` + ) + ); + } + } catch (e) { + t.error(e); + } +}; diff --git a/packages/upward-spec/suite/getScenarios.js b/packages/upward-spec/suite/getScenarios.js new file mode 100644 index 0000000000..109efcc5c9 --- /dev/null +++ b/packages/upward-spec/suite/getScenarios.js @@ -0,0 +1,52 @@ +const { resolve, extname } = require('path'); +const { readdir: fsReaddir, readFile: fsReadFile } = require('fs'); +const { promisify } = require('util'); +const jsYaml = require('js-yaml'); +const readdir = promisify(fsReaddir); +const readFile = promisify(fsReadFile); + +const dirsPromise = readdir(resolve(__dirname, './scenarios')); + +function getOneMatch(candidates, pattern) { + const matching = candidates.filter(candidate => pattern.test(candidate)); + if (matching.length > 1) { + throw new Error( + `${pattern.toString()} returned multiple results: ${matching.join()}` + ); + } + if (matching.length === 0) { + throw new Error(`${pattern.toString()} returned no results`); + } + return matching[0]; +} + +async function getScenarios(pattern) { + if (!pattern || typeof pattern.test !== 'function') { + throw new Error( + `UpwardSpec.getScenarios() requires a regular expression, or an object with a 'test' method` + ); + } + const baseDir = await resolve( + __dirname, + './scenarios', + getOneMatch(await dirsPromise, pattern) + ); + + function getResourcePath(name) { + return resolve(baseDir, name); + } + + function getResource(name, enc = 'utf8') { + return readFile(getResourcePath(name), enc); + } + return { + baseDir, + getResourcePath, + getResource, + async getDefinition(name) { + return jsYaml.safeLoad(await getResource(name + '.yml')); + } + }; +} + +module.exports = getScenarios; diff --git a/packages/upward-spec/suite/index.js b/packages/upward-spec/suite/index.js new file mode 100644 index 0000000000..bbf7945005 --- /dev/null +++ b/packages/upward-spec/suite/index.js @@ -0,0 +1,6 @@ +module.exports = { + assertOnResponse: require('./assertOnResponse'), + getScenarios: require('./getScenarios'), + mockGQLService: require('./mockGQLService'), + runServer: require('./runServer') +}; diff --git a/packages/upward-spec/suite/runServer.js b/packages/upward-spec/suite/runServer.js new file mode 100644 index 0000000000..d9fd41d2b0 --- /dev/null +++ b/packages/upward-spec/suite/runServer.js @@ -0,0 +1,172 @@ +const fs = require('fs'); +const path = require('path'); +const { spawn } = require('child_process'); +const { promisify } = require('util'); +const { URL } = require('url'); +const access = promisify(fs.access); + +const script = process.env.UPWARD_SERVER_SCRIPT_PATH; + +module.exports = async function runServer( + test, + configFile, + env, + customTimeout +) { + let terminator; + let timeout = Number(customTimeout || process.env.TAP_TIMEOUT); + if (isNaN(timeout)) { + timeout = 5; + } else { + timeout = Math.max(timeout - 1, Math.min(timeout - 1, 2)); + } + // Create a child process and resolve the Promise if: + // - the process exits (with any code) + // - the process stays alive and echoes a URL + + // Reject only if: + // - the process throws an error and cannot start + // - the process takes too long without echoing a valid URL + let server; + try { + server = await new Promise((resolve, reject) => { + let child; + const flags = { + crashed: false, + launched: false, + running: false + }; + let stderr = ''; + let url; + + function terminateClean() { + child.removeAllListeners(); + child.on('error', () => { + child.kill('SIGKILL'); + }); + return new Promise((innerResolve, innerReject) => { + child.on('close', (_, signal) => { + flags.running = false; + return signal === 'SIGKILL' + ? innerReject(signal) + : innerResolve(signal); + }); + child.kill('SIGTERM'); + }); + } + + try { + child = spawn(path.resolve(script), { + cwd: path.dirname(script), + env: Object.assign( + {}, + process.env, + { + UPWARD_PATH: configFile + }, + env + ) + }); + } catch (e) { + reject(e); + return; + } + + child.stderr.on('data', chunk => { + stderr += chunk.toString('utf8'); + }); + + if (timeout > 0) { + terminator = setTimeout(() => { + const message = `Timed out. Spawning a server with ${script} took over ${timeout} seconds.`; + terminateClean() + .then( + signal => ` Killed with ${signal}`, + signal => + `\n\nAdditionally, the process did not respond to SIGTERM, and had to be killed with ${signal}.` + ) + .then(notice => reject(new Error(message + notice))); + }, timeout * 1000); + } + + function emitServer() { + clearTimeout(terminator); + resolve({ + stderr, + url, + hasCrashed() { + return flags.crashed; + }, + hasLaunched() { + return flags.launched; + }, + isRunning() { + return flags.running; + }, + async close() { + if (flags.running) { + return terminateClean().catch(e => test.error(e)); + } + }, + assert(flag, expected = true, msg) { + const extra = msg ? `\n\n${msg}` : ''; + let message = 'server '; + if (!flags[flag]) { + message += 'not '; + } + message += flag; + if (flag === 'launched' && url) { + message += `, listening at ${url}`; + } + if (stderr) { + message += `, emitting stderr ${stderr.slice( + 0, + 50 + )}[...]`; + } + const status = + flags[flag] === expected ? 'pass' : 'fail'; + test[status](message); + return status === 'pass'; + } + }); + } + + child.on('error', reject); + child.on('exit', (code, signal) => { + flags.running = false; + if (code !== 0) { + flags.crashed = true; + } + emitServer(); + }); + + let outText = ''; + child.stdout.on('data', function waitingForUrl(chunk) { + const newChunk = chunk.toString('utf8'); + outText += newChunk; + if (outText.includes('\n')) { + child.stdout.removeListener('data', waitingForUrl); + try { + url = new URL(outText.trim()); + flags.launched = true; + flags.running = true; + emitServer(); + } catch (e) { + reject( + new Error( + `Could not parse first line of server stdout as a URL: ${e} ${outText}` + ) + ); + } + } + }); + }); + } catch (e) { + clearTimeout(terminator); + test.threw(e); + throw e; + } + + return server; +}; diff --git a/packages/upward-spec/suite/scenarios/001-unknown-config/only-status.yml b/packages/upward-spec/suite/scenarios/001-unknown-config/only-status.yml new file mode 100644 index 0000000000..62e205234c --- /dev/null +++ b/packages/upward-spec/suite/scenarios/001-unknown-config/only-status.yml @@ -0,0 +1 @@ +status: 200 diff --git a/packages/upward-spec/suite/scenarios/001-unknown-config/tests.js b/packages/upward-spec/suite/scenarios/001-unknown-config/tests.js new file mode 100644 index 0000000000..1e30cceb66 --- /dev/null +++ b/packages/upward-spec/suite/scenarios/001-unknown-config/tests.js @@ -0,0 +1,34 @@ +const os = require('os'); +const fs = require('fs'); +const path = require('path'); +const tape = require('tape'); + +const { getScenarios, runServer } = require('../../'); + +const gettingScenarios = getScenarios(/unknown\-config/); + +tape.test('Crashes if config file is missing', async t => { + const scenarios = await gettingScenarios; + const server = await runServer( + t, + scenarios.getResourcePath('./absolutely-no-way-this-file-exists') + ); + + server.assert('crashed'); + + await server.close(); + t.end(); +}); + +tape.test('Crashes if config file is unparseable', async t => { + const scenarios = await gettingScenarios; + const server = await runServer( + t, + scenarios.getResourcePath('./unparseable.yml') + ); + + server.assert('crashed'); + + await server.close(); + t.end(); +}); diff --git a/packages/upward-spec/suite/scenarios/001-unknown-config/unparseable.yml b/packages/upward-spec/suite/scenarios/001-unknown-config/unparseable.yml new file mode 100644 index 0000000000..d172ef309f --- /dev/null +++ b/packages/upward-spec/suite/scenarios/001-unknown-config/unparseable.yml @@ -0,0 +1 @@ +!!!!THATasda SomE BAD yAML! diff --git a/packages/upward-spec/suite/scenarios/002-static-servers/context-is-hello-env-is-world.mst b/packages/upward-spec/suite/scenarios/002-static-servers/context-is-hello-env-is-world.mst new file mode 100644 index 0000000000..9cd622813a --- /dev/null +++ b/packages/upward-spec/suite/scenarios/002-static-servers/context-is-hello-env-is-world.mst @@ -0,0 +1 @@ +{{communique}} from a {{env.sender}} of external templates!! diff --git a/packages/upward-spec/suite/scenarios/002-static-servers/hello-context-inline-template-json.yml b/packages/upward-spec/suite/scenarios/002-static-servers/hello-context-inline-template-json.yml new file mode 100644 index 0000000000..8f2b4c3034 --- /dev/null +++ b/packages/upward-spec/suite/scenarios/002-static-servers/hello-context-inline-template-json.yml @@ -0,0 +1,15 @@ +status: 200 +headers: + inline: + content-type: application/json +body: + engine: mustache + provide: + - salutation + - addressee + template: + inline: '{"greeting":"{{ salutation }}","subject":{{>json-subject}},"shouldYouReallyHandwriteJSON":"no"}' + +salutation: + inline: 'Hello' +addressee: env.ADDRESSEE diff --git a/packages/upward-spec/suite/scenarios/002-static-servers/hello-env-context-file-template.yml b/packages/upward-spec/suite/scenarios/002-static-servers/hello-env-context-file-template.yml new file mode 100644 index 0000000000..e866a071f1 --- /dev/null +++ b/packages/upward-spec/suite/scenarios/002-static-servers/hello-env-context-file-template.yml @@ -0,0 +1,23 @@ +status: + resolver: inline + inline: 200 +headers: + resolver: inline + inline: + content-type: + resolver: inline + inline: text/plain +body: + resolver: template + engine: mustache + provide: + - env + - communique + template: + resolver: file + file: + resolver: inline + inline: './context-is-hello-env-is-world.mst' +communique: + resolver: inline + inline: 'Hello' diff --git a/packages/upward-spec/suite/scenarios/002-static-servers/hello-env-inline-template.yml b/packages/upward-spec/suite/scenarios/002-static-servers/hello-env-inline-template.yml new file mode 100644 index 0000000000..2a50b4c402 --- /dev/null +++ b/packages/upward-spec/suite/scenarios/002-static-servers/hello-env-inline-template.yml @@ -0,0 +1,10 @@ +status: 200 +headers: + inline: + content-type: text/plain +body: + engine: mustache + provide: + - env + template: + inline: 'Hello, environment of {{env.ADDRESSEE}}!!' diff --git a/packages/upward-spec/suite/scenarios/002-static-servers/hello-env-interpolation.yml b/packages/upward-spec/suite/scenarios/002-static-servers/hello-env-interpolation.yml new file mode 100644 index 0000000000..859d939d03 --- /dev/null +++ b/packages/upward-spec/suite/scenarios/002-static-servers/hello-env-interpolation.yml @@ -0,0 +1,5 @@ +status: 200 +headers: + inline: + content-type: text/plain +body: env.UPWARD_TEST_RESPONSE_BODY diff --git a/packages/upward-spec/suite/scenarios/002-static-servers/hello-file-shortcut.yml b/packages/upward-spec/suite/scenarios/002-static-servers/hello-file-shortcut.yml new file mode 100644 index 0000000000..7d9a71c7bc --- /dev/null +++ b/packages/upward-spec/suite/scenarios/002-static-servers/hello-file-shortcut.yml @@ -0,0 +1,8 @@ +status: 201 +headers: + inline: + content-type: + inline: 'text/csv' + x-is-cool-swords: + inline: 'yep' +body: './swords.csv' diff --git a/packages/upward-spec/suite/scenarios/002-static-servers/hello-inline-implicit-resolvers.yml b/packages/upward-spec/suite/scenarios/002-static-servers/hello-inline-implicit-resolvers.yml new file mode 100644 index 0000000000..8a8e0acad5 --- /dev/null +++ b/packages/upward-spec/suite/scenarios/002-static-servers/hello-inline-implicit-resolvers.yml @@ -0,0 +1,6 @@ +status: 200 +headers: + inline: + content-type: text/plain +body: + inline: 'Hello World, concisely!!' diff --git a/packages/upward-spec/suite/scenarios/002-static-servers/hello-inline-only.yml b/packages/upward-spec/suite/scenarios/002-static-servers/hello-inline-only.yml new file mode 100644 index 0000000000..86468525b7 --- /dev/null +++ b/packages/upward-spec/suite/scenarios/002-static-servers/hello-inline-only.yml @@ -0,0 +1,12 @@ +status: + resolver: inline + inline: 200 +headers: + resolver: inline + inline: + content-type: + resolver: inline + inline: text/plain +body: + resolver: inline + inline: 'Hello World!!' diff --git a/packages/upward-spec/suite/scenarios/002-static-servers/json-subject.tpt b/packages/upward-spec/suite/scenarios/002-static-servers/json-subject.tpt new file mode 100644 index 0000000000..41ad552449 --- /dev/null +++ b/packages/upward-spec/suite/scenarios/002-static-servers/json-subject.tpt @@ -0,0 +1 @@ +"{{>renders-addressee-alone}}" diff --git a/packages/upward-spec/suite/scenarios/002-static-servers/renders-addressee-alone.mustache b/packages/upward-spec/suite/scenarios/002-static-servers/renders-addressee-alone.mustache new file mode 100644 index 0000000000..afe4522bc3 --- /dev/null +++ b/packages/upward-spec/suite/scenarios/002-static-servers/renders-addressee-alone.mustache @@ -0,0 +1 @@ +the depths of {{ addressee }}... diff --git a/packages/upward-spec/suite/scenarios/002-static-servers/swords.csv b/packages/upward-spec/suite/scenarios/002-static-servers/swords.csv new file mode 100644 index 0000000000..41cbb682e4 --- /dev/null +++ b/packages/upward-spec/suite/scenarios/002-static-servers/swords.csv @@ -0,0 +1,4 @@ +name,origin +claymore,scotland +jian,china +shotel,egypt diff --git a/packages/upward-spec/suite/scenarios/002-static-servers/tests.js b/packages/upward-spec/suite/scenarios/002-static-servers/tests.js new file mode 100644 index 0000000000..a8dfaf9f37 --- /dev/null +++ b/packages/upward-spec/suite/scenarios/002-static-servers/tests.js @@ -0,0 +1,229 @@ +const fetch = require('node-fetch'); +const path = require('path'); +const tape = require('tape'); +const csvParse = require('csv-parse/lib/sync'); + +// tap-diff needs object keys lexically sorted to be accurate +const sortKeys = o => + Object.keys(o) + .sort() + .reduce((acc, key) => ((acc[key] = o[key]), acc), {}); +const deepEqualObj = (t, o1, o2, msg) => + t.deepEqual(sortKeys(o1), sortKeys(o2), msg); + +const { getScenarios, runServer, assertOnResponse } = require('../../'); + +const gettingScenarios = getScenarios(/static\-servers/); + +tape.test('Static Hello World with only inline deps', async t => { + const scenarios = await gettingScenarios; + const server = await runServer( + t, + scenarios.getResourcePath('./hello-inline-only.yml') + ); + + if (server.assert('launched')) { + const response = await fetch(server.url); + + await assertOnResponse(t, response, { + status: 200, + headers: { + 'content-type': 'text/plain' + }, + text: 'Hello World!!' + }); + + server.assert('crashed', false); + } + + await server.close(); + t.end(); +}); + +tape.test('Static Hello World with implicit resolvers', async t => { + const scenarios = await gettingScenarios; + const server = await runServer( + t, + scenarios.getResourcePath('./hello-inline-implicit-resolvers.yml') + ); + + if (server.assert('launched')) { + const response = await fetch(server.url); + + await assertOnResponse(t, response, { + status: 200, + headers: { + 'content-type': 'text/plain' + }, + text: 'Hello World, concisely!!' + }); + + server.assert('crashed', false); + } + + await server.close(); + t.end(); +}); + +tape.test('Static Hello World with env interpolation', async t => { + const scenarios = await gettingScenarios; + const server = await runServer( + t, + scenarios.getResourcePath('./hello-env-interpolation.yml'), + { + UPWARD_TEST_RESPONSE_BODY: 'Hello, environment!!' + } + ); + + if (server.assert('launched')) { + const response = await fetch(server.url); + + await assertOnResponse(t, response, { + status: 200, + headers: { + 'content-type': 'text/plain' + }, + text: 'Hello, environment!!' + }); + + server.assert('crashed', false); + } + await server.close(); + t.end(); +}); + +tape.test('Static Hello World with env dep and inline template', async t => { + const scenarios = await gettingScenarios; + const server = await runServer( + t, + scenarios.getResourcePath('./hello-env-inline-template.yml'), + { + ADDRESSEE: 'Terra' + } + ); + + if (server.assert('launched')) { + const response = await fetch(server.url); + + await assertOnResponse(t, response, { + status: 200, + headers: { + 'content-type': 'text/plain' + }, + text: 'Hello, environment of Terra!!' + }); + + server.assert('crashed', false); + } + + await server.close(); + t.end(); +}); + +tape.test( + 'Static Hello World with env, context, and file template', + async t => { + const scenarios = await gettingScenarios; + const server = await runServer( + t, + scenarios.getResourcePath('./hello-env-context-file-template.yml'), + { + sender: 'planet' + } + ); + + if (server.assert('launched')) { + const response = await fetch(server.url); + + await assertOnResponse(t, response, { + status: 200, + headers: { + 'content-type': 'text/plain' + }, + text: 'Hello from a planet of external templates!!' + }); + + server.assert('crashed', false); + } + + await server.close(); + t.end(); + } +); +tape.test( + 'Static JSON Hello World with template partial resolution', + async t => { + const scenarios = await gettingScenarios; + const server = await runServer( + t, + scenarios.getResourcePath( + './hello-context-inline-template-json.yml' + ), + { + ADDRESSEE: 'deep space' + } + ); + if (server.assert('launched')) { + const response = await fetch(server.url); + + await assertOnResponse(t, response, { + status: 200, + headers: { + 'content-type': 'application/json' + }, + json: { + greeting: 'Hello', + subject: 'the depths of deep space...' + } + }); + + server.assert('crashed', false); + } + + await server.close(); + t.end(); + } +); +tape.test('File shortcut resolution', async t => { + const scenarios = await gettingScenarios; + const server = await runServer( + t, + scenarios.getResourcePath('./hello-file-shortcut.yml') + ); + if (server.assert('launched')) { + const response = await fetch(server.url); + + await assertOnResponse(t, response, { + status: 201, + headers: { + 'content-type': 'text/csv', + 'x-is-cool-swords': 'yep' + } + }); + + const swordsCSV = await response.text(); + try { + const swords = csvParse(swordsCSV, { columns: true }).reduce( + (acc, { name, origin }) => ((acc[origin] = name), acc), + {} + ); + + t.deepEqual(swords, { + scotland: 'claymore', + china: 'jian', + egypt: 'shotel' + }); + } catch (e) { + t.fail( + `swords.csv is valid CSV, but server emitted ${swordsCSV}, which did not parse: ${ + e.message + }` + ); + } + + server.assert('crashed', false); + } + + await server.close(); + t.end(); +}); diff --git a/packages/upward-spec/suite/scenarios/003-request-handling/cyclic-dependencies.yml b/packages/upward-spec/suite/scenarios/003-request-handling/cyclic-dependencies.yml new file mode 100644 index 0000000000..86f6252f6f --- /dev/null +++ b/packages/upward-spec/suite/scenarios/003-request-handling/cyclic-dependencies.yml @@ -0,0 +1,16 @@ +status: 200 +headers: + inline: + content-type: + when: + matches: + content-disposition: + when: + matches: headers.content-type + pattern: text/html + use: + inline: + inline + default: + inline: + attachment diff --git a/packages/upward-spec/suite/scenarios/003-request-handling/island-summary.mst b/packages/upward-spec/suite/scenarios/003-request-handling/island-summary.mst new file mode 100644 index 0000000000..e2e2d8b802 --- /dev/null +++ b/packages/upward-spec/suite/scenarios/003-request-handling/island-summary.mst @@ -0,0 +1,4 @@ +{{title}}, an island in the {{group}} +===================================== + +{{description}} diff --git a/packages/upward-spec/suite/scenarios/003-request-handling/reflect-request.yml b/packages/upward-spec/suite/scenarios/003-request-handling/reflect-request.yml new file mode 100644 index 0000000000..b4d9773e7d --- /dev/null +++ b/packages/upward-spec/suite/scenarios/003-request-handling/reflect-request.yml @@ -0,0 +1,32 @@ +status: + resolver: inline + inline: 200 +headers: + resolver: inline + inline: + content-type: text/plain +body: + resolver: template + engine: mustache + provide: + - request + template: + resolver: inline + inline: | + {{#request}} + Headers: + {{#headerEntries}} + {{name}}: {{value}} + {{/headerEntries}} + URL: + {{#url}}{{#?protocol}}protocol: {{protocol}} + {{/?protocol}}{{#?host}}host: {{host}} + {{/?host}}{{#?hostname}}hostname: {{hostname}} + {{/?hostname}}{{#?port}}port: {{port}} + {{/?port}}pathname: {{pathname}} + {{/url}} + URL Query: + {{#queryEntries}} + {{name}}: {{value}} + {{/queryEntries}} + {{/request}} diff --git a/packages/upward-spec/suite/scenarios/003-request-handling/route-requests.yml b/packages/upward-spec/suite/scenarios/003-request-handling/route-requests.yml new file mode 100644 index 0000000000..5332023843 --- /dev/null +++ b/packages/upward-spec/suite/scenarios/003-request-handling/route-requests.yml @@ -0,0 +1,64 @@ +status: + when: + matches: island.name + pattern: '.' + use: 200 + default: 404 + +headers: + inline: + content-type: text/plain + +body: + when: + - matches: island.name + pattern: '.' + use: + engine: mustache + provide: + title: island.name + group: island.group + body: island.description + template: ./island-summary + default: notFound + +island: islandResult.data.islands:first + +islandResult: + when: + - matches: request.url.pathname + pattern: '^\/inmost-sea/([A-Za-z\-]+\/?$' + use: + url: env.EARTHSEA_API + query: './getIslands' + variables: + group: + inline: Inmost Sea + nameNormalized: $match.$1 + + - matches: request.url.pathname + pattern: '^\/north-reach/([A-Za-z\-]+\/?$' + use: + url: env.EARTHSEA_API + query: './getIslands' + variables: + group: + inline: North Reach + nameNormalized: $match.$1 + + - matches: request.url.pathname + pattern: '^\/kargad-lands/([A-Za-z\-]+\/?$' + use: + url: env.EARTHSEA_API + query: './getIslands' + variables: + group: + inline: Kargad Lands + nameNormalized: $match.$1 + + default: + inline: '' + +notFound: + inline: | + No such island exists here. diff --git a/packages/upward-spec/suite/scenarios/003-request-handling/tests.js b/packages/upward-spec/suite/scenarios/003-request-handling/tests.js new file mode 100644 index 0000000000..8db129e4df --- /dev/null +++ b/packages/upward-spec/suite/scenarios/003-request-handling/tests.js @@ -0,0 +1,35 @@ +const { URL } = require('url'); +const fetch = require('node-fetch'); +const path = require('path'); +const tape = require('tape'); + +const { getScenarios, runServer, assertOnResponse } = require('../../'); + +const gettingScenarios = getScenarios(/request\-handling/); + +tape.test('Reflect request', async t => { + const scenarios = await gettingScenarios; + const server = await runServer( + t, + scenarios.getResourcePath('./reflect-request.yml') + ); + + if (server.assert('launched')) { + const response = await fetch( + new URL('/some/path?query=parameters', server.url) + ); + + await assertOnResponse(t, response, { + status: 200, + headers: { + 'content-type': 'text/plain' + }, + text: 'some/path' + }); + + server.assert('crashed', false); + } + + await server.close(); + t.end(); +}); diff --git a/packages/upward-spec/suite/scenarios/005-many-resolvers/articles-and-authors-schema.graphql b/packages/upward-spec/suite/scenarios/005-many-resolvers/articles-and-authors-schema.graphql new file mode 100644 index 0000000000..4f67b49cbd --- /dev/null +++ b/packages/upward-spec/suite/scenarios/005-many-resolvers/articles-and-authors-schema.graphql @@ -0,0 +1,18 @@ +type Author { + id: Int + name: String + bio: String +} +type Article { + id: Int + title: String + text: String + author: Author +} +type Query { + author(id: Int): Author + article(id: ): Article +} +schema { + query: Query +} diff --git a/packages/upward-spec/suite/scenarios/005-many-resolvers/articles-and-authors.yml b/packages/upward-spec/suite/scenarios/005-many-resolvers/articles-and-authors.yml new file mode 100644 index 0000000000..5dd064b302 --- /dev/null +++ b/packages/upward-spec/suite/scenarios/005-many-resolvers/articles-and-authors.yml @@ -0,0 +1,65 @@ +status: page.status +headers: page.headers +body: page.body + +articleResult: + url: env.LIBRARY_SVC + query: './getArticle.graphql' + variables: + articleId: request.url.query.articleID + +authorBioResult: + url: env.LIBRARY_SVC + query: './getAuthor.graphql' + variables: + authorId: request.url.query.authorID + +textHtml: + inline: + 'content-type': 'text/html' + +notFound: + inline: + status: 404 + headers: textHtml + body: + engine: mustache + template: './notFound.mst' + +page: + when: + - matches: request.url.pathname + pattern: '/article' + use: + when: + - matches: articleResult.data.article.id + pattern: '.' + use: + inline: + title: + engine: mustache + template: 'Article {{authorBioResult.data.author.name}}' + status: 200 + headers: textHtml + body: + engine: mustache + template: './article.mst' + default: notFound + - matches: request.url.pathname + pattern: '/author' + use: + when: + - matches: authorBioResult.data.author.id + pattern: '.' + use: + inline: + title: + engine: mustache + template: 'Author {{authorBioResult.data.author.name}}' + status: 200 + headers: textHtml + body: + engine: mustache + template: './authorBio.mst' + default: notFound + default: notFound diff --git a/packages/upward-spec/suite/scenarios/005-many-resolvers/footer.mst b/packages/upward-spec/suite/scenarios/005-many-resolvers/footer.mst new file mode 100644 index 0000000000..99b9cdc53a --- /dev/null +++ b/packages/upward-spec/suite/scenarios/005-many-resolvers/footer.mst @@ -0,0 +1 @@ +
Copyright © Current Year
diff --git a/packages/upward-spec/suite/scenarios/005-many-resolvers/getArticle.graphql b/packages/upward-spec/suite/scenarios/005-many-resolvers/getArticle.graphql new file mode 100644 index 0000000000..b563ec8662 --- /dev/null +++ b/packages/upward-spec/suite/scenarios/005-many-resolvers/getArticle.graphql @@ -0,0 +1,10 @@ +{ + query getArticle($articleId: Number!) { + article(id: $articleId) { + id + title + author + body + } + } +} diff --git a/packages/upward-spec/suite/scenarios/005-many-resolvers/getAuthor.graphql b/packages/upward-spec/suite/scenarios/005-many-resolvers/getAuthor.graphql new file mode 100644 index 0000000000..0577618093 --- /dev/null +++ b/packages/upward-spec/suite/scenarios/005-many-resolvers/getAuthor.graphql @@ -0,0 +1,9 @@ +{ + query getAuthor($authorId: Number!) { + author(id: $authorId) { + firstName + lastName + bio + } + } +} diff --git a/packages/upward-spec/suite/scenarios/005-many-resolvers/head.mst b/packages/upward-spec/suite/scenarios/005-many-resolvers/head.mst new file mode 100644 index 0000000000..bad62a74ab --- /dev/null +++ b/packages/upward-spec/suite/scenarios/005-many-resolvers/head.mst @@ -0,0 +1 @@ +{{#page}}{{#title}}{{title}}{{/title}}{{^title}}404: Not Found{{/title}}{{{/page}} diff --git a/packages/upward-spec/suite/scenarios/005-many-resolvers/header.mst b/packages/upward-spec/suite/scenarios/005-many-resolvers/header.mst new file mode 100644 index 0000000000..9102bf4a43 --- /dev/null +++ b/packages/upward-spec/suite/scenarios/005-many-resolvers/header.mst @@ -0,0 +1,2 @@ +
Page Header
+{{> menu}} diff --git a/packages/upward-spec/suite/scenarios/005-many-resolvers/menu.mst b/packages/upward-spec/suite/scenarios/005-many-resolvers/menu.mst new file mode 100644 index 0000000000..446ce145f0 --- /dev/null +++ b/packages/upward-spec/suite/scenarios/005-many-resolvers/menu.mst @@ -0,0 +1 @@ +Navigation diff --git a/packages/upward-spec/suite/scenarios/005-many-resolvers/notFound.mst b/packages/upward-spec/suite/scenarios/005-many-resolvers/notFound.mst new file mode 100644 index 0000000000..fe9a0b206a --- /dev/null +++ b/packages/upward-spec/suite/scenarios/005-many-resolvers/notFound.mst @@ -0,0 +1,9 @@ + + + {{> head}} + + {{> header}} +

404: Not Found

+ {{> footer }} + + diff --git a/packages/upward-spec/test_upward_server.sh b/packages/upward-spec/test_upward_server.sh index 074bcfba3a..6a68e455b2 100644 --- a/packages/upward-spec/test_upward_server.sh +++ b/packages/upward-spec/test_upward_server.sh @@ -1,8 +1,15 @@ #!/bin/sh -# This simple script assumes that the server will stay in the foreground, -# that it will echo its full host (e.g. http://localhost:8919) to stdout -# as part of its initial logging, and that it will gracefully exit on -# receiving SIGTERM, which are good # habits for a web server to have anyway. +# This simple script assumes that the server will stay in the foreground, that +# it will echo its full host (e.g. http://localhost:8919) to stdout (with a +# line feed to trigger consumption of the URL) as part of its initial logging, +# and that it will gracefully exit on receiving SIGTERM, which are good # +# habits for a web server to have anyway. -./path_to_upward_server/bin/upward --config "$UPWARD_YAML_PATH" | grep -ioE '\bhttps?://[a-z0-9][a-z0-9-\.]*\b' +# The `exec` ensures that the server process will receive signals sent to this +# script, such as SIGTERM, which the test harness uses to gracefully close. + +# The `grep` ensures that if more than just a URL is echoed to standard output, +# the URL be parsed out of it. + +exec ./path_to_upward_server/bin/upward --config "$UPWARD_PATH" | grep -ioE '\bhttps?://[a-z0-9][a-z0-9-\.]*\n'