refactor(): update typings, code style update, remove typo

This commit is contained in:
Kamil Myśliwiec
2019-02-17 10:57:37 +01:00
parent 7c82521e54
commit b80c33aa55
19 changed files with 844 additions and 94 deletions

3
.gitignore vendored
View File

@@ -28,5 +28,6 @@ yarn-error.log
/test
/coverage
/.nyc_output
/packages/graphql
/benchmarks/memory
build/config\.gypi
build/config\.gypi

View File

@@ -34,8 +34,6 @@ export class CatsResolvers {
@Subscription('catCreated')
catCreated() {
return {
subscribe: () => pubSub.asyncIterator('catCreated'),
};
return pubSub.asyncIterator('catCreated');
}
}

View File

@@ -1,6 +1,6 @@
import * as request from 'supertest';
import { HttpStatus, INestApplication } from '@nestjs/common';
import { Test } from '@nestjs/testing';
import { INestApplication, HttpStatus } from '@nestjs/common';
import * as request from 'supertest';
import { ErrorsController } from '../src/errors/errors.controller';
describe('Error messages', () => {
@@ -10,8 +10,7 @@ describe('Error messages', () => {
beforeEach(async () => {
const module = await Test.createTestingModule({
controllers: [ErrorsController],
})
.compile();
}).compile();
app = module.createNestApplication();
server = app.getHttpServer();
@@ -25,7 +24,7 @@ describe('Error messages', () => {
.expect({
statusCode: 400,
error: 'Bad Request',
message: 'Integration test'
message: 'Integration test',
});
});
@@ -36,7 +35,7 @@ describe('Error messages', () => {
.expect({
statusCode: 400,
error: 'Bad Request',
message: 'Integration test'
message: 'Integration test',
});
});

746
package-lock.json generated
View File

@@ -4,6 +4,19 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@apollographql/apollo-tools": {
"version": "0.3.3",
"resolved": "https://registry.npmjs.org/@apollographql/apollo-tools/-/apollo-tools-0.3.3.tgz",
"integrity": "sha512-/vLzZjloWB4xzgw2MRs9TUDIdCzS+No1hEClkEKqcnH86c2EgE/W0Dv2nkCTH9WxDrfryziJWbNMurYYkm61Zw==",
"requires": {
"apollo-env": "0.3.3"
}
},
"@apollographql/graphql-playground-html": {
"version": "1.6.6",
"resolved": "https://registry.npmjs.org/@apollographql/graphql-playground-html/-/graphql-playground-html-1.6.6.tgz",
"integrity": "sha512-lqK94b+caNtmKFs5oUVXlSpN3sm5IXZ+KfhMxOtr0LR2SqErzkoJilitjDvJ1WbjHlxLI7WtCjRmOLdOGJqtMQ=="
},
"@arr/every": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@arr/every/-/every-1.0.0.tgz",
@@ -484,6 +497,14 @@
"any-observable": "^0.3.0"
}
},
"@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/amqplib": {
"version": "0.5.8",
"resolved": "https://registry.npmjs.org/@types/amqplib/-/amqplib-0.5.8.tgz",
@@ -532,6 +553,14 @@
"@types/chai": "*"
}
},
"@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.3",
"resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.3.tgz",
@@ -561,11 +590,20 @@
"version": "4.0.57",
"resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.0.57.tgz",
"integrity": "sha512-QLAHjdLwEICm3thVbXSKRoisjfgMVI4xJH/HU8F385BR2HI7PmM6ax4ELXf8Du6sLmSpySXMYaI+xc//oQ/IFw==",
"dev": true,
"requires": {
"@types/node": "*"
}
},
"@types/glob": {
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz",
"integrity": "sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w==",
"requires": {
"@types/events": "*",
"@types/minimatch": "*",
"@types/node": "*"
}
},
"@types/kafka-node": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/@types/kafka-node/-/kafka-node-2.0.6.tgz",
@@ -588,8 +626,12 @@
"@types/mime": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@types/mime/-/mime-2.0.0.tgz",
"integrity": "sha1-WnMG42fFObn2VDSZ3o3VGfrDeos=",
"dev": true
"integrity": "sha1-WnMG42fFObn2VDSZ3o3VGfrDeos="
},
"@types/minimatch": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz",
"integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA=="
},
"@types/mocha": {
"version": "2.2.44",
@@ -626,11 +668,15 @@
"integrity": "sha1-nAQr+pgD1Xeq1PV9+8pLfK5Chv4=",
"dev": true
},
"@types/semver": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-5.5.0.tgz",
"integrity": "sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ=="
},
"@types/serve-static": {
"version": "1.13.1",
"resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.1.tgz",
"integrity": "sha1-HSgB+mNdJ0zZfU7AfiayG0QSdJI=",
"dev": true,
"requires": {
"@types/express-serve-static-core": "*",
"@types/mime": "*"
@@ -962,6 +1008,296 @@
}
}
},
"apollo-cache-control": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/apollo-cache-control/-/apollo-cache-control-0.5.1.tgz",
"integrity": "sha512-82hzX7/fFiu5dODLS8oGieEE4jLjMIhIkQ4JTsWj9drv8PZJltl0xqORtU2jA/FottjxfYab8+ebi3BgGPOaqw==",
"requires": {
"apollo-server-env": "2.2.0",
"graphql-extensions": "0.5.2"
}
},
"apollo-datasource": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/apollo-datasource/-/apollo-datasource-0.3.1.tgz",
"integrity": "sha512-qdEUeonc9pPZvYwXK36h2NZoT7Pddmy0HYOzdV0ON5pcG1YtNmUyyYi83Q60V5wTWjuaCjyJ9hOY6wr0BMvQuA==",
"requires": {
"apollo-server-caching": "0.3.1",
"apollo-server-env": "2.2.0"
}
},
"apollo-engine-reporting": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/apollo-engine-reporting/-/apollo-engine-reporting-1.0.2.tgz",
"integrity": "sha512-g6JkO5WaMuqXfn3WoZMQyyFzpxfHsw/f7P7XTHSEqTSd/M4uk7/uih/xcqmgBGt4ET30KbaGFz2l4FJzO06A5w==",
"requires": {
"apollo-engine-reporting-protobuf": "0.2.1",
"apollo-graphql": "^0.1.0",
"apollo-server-core": "2.4.2",
"apollo-server-env": "2.2.0",
"async-retry": "^1.2.1",
"graphql-extensions": "0.5.2"
}
},
"apollo-engine-reporting-protobuf": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/apollo-engine-reporting-protobuf/-/apollo-engine-reporting-protobuf-0.2.1.tgz",
"integrity": "sha512-5pYR84uWeylRS2OJowtkTczT3bWTwOErWtfnkRKccUi/wZ/AZJBP+D5HKNzM7xoFcz9XvrJyS+wBTz1oBi0Jiw==",
"requires": {
"protobufjs": "^6.8.6"
},
"dependencies": {
"long": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz",
"integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA=="
},
"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"
}
}
}
},
"apollo-env": {
"version": "0.3.3",
"resolved": "https://registry.npmjs.org/apollo-env/-/apollo-env-0.3.3.tgz",
"integrity": "sha512-VsUX14bfQCJpKmTyYNBTeLrdeFabjmpSPVQ2y4IKnwqaxVqZuRca3WFE8ercszO1tLwS6HMM7mFw+IIbtQXo/w==",
"requires": {
"core-js": "3.0.0-beta.13",
"node-fetch": "^2.2.0"
},
"dependencies": {
"core-js": {
"version": "3.0.0-beta.13",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.0.0-beta.13.tgz",
"integrity": "sha512-16Q43c/3LT9NyePUJKL8nRIQgYWjcBhjJSMWg96PVSxoS0PeE0NHitPI3opBrs9MGGHjte1KoEVr9W63YKlTXQ=="
}
}
},
"apollo-graphql": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/apollo-graphql/-/apollo-graphql-0.1.1.tgz",
"integrity": "sha512-UImgDIeB0n0fryYqtdz0CwJ9uDtXwg/3Q6rXzRAqgqBYz46VkmWa7nu2LX9GmDtiXB5VUOVCtyMEnvFwC3o27g==",
"requires": {
"lodash.sortby": "^4.7.0"
}
},
"apollo-link": {
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/apollo-link/-/apollo-link-1.2.8.tgz",
"integrity": "sha512-lfzGRxhK9RmiH3HPFi7TIEBhhDY9M5a2ZDnllcfy5QDk7cCQHQ1WQArcw1FK0g1B+mV4Kl72DSrlvZHZJEolrA==",
"requires": {
"zen-observable-ts": "^0.8.15"
}
},
"apollo-server-caching": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/apollo-server-caching/-/apollo-server-caching-0.3.1.tgz",
"integrity": "sha512-mfxzikYXbB/OoEms77AGYwRh7FF3Oim5v5XWAL+VL49FrkbZt5lopVa4bABi7Mz8Nt3Htl9EBJN8765s/yh8IA==",
"requires": {
"lru-cache": "^5.0.0"
},
"dependencies": {
"lru-cache": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
"integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
"requires": {
"yallist": "^3.0.2"
}
},
"yallist": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz",
"integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A=="
}
}
},
"apollo-server-core": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/apollo-server-core/-/apollo-server-core-2.4.2.tgz",
"integrity": "sha512-IOWhqjjI1sH38sj7ycjke0dXXEgaqOkb2hDpLBTSiVWKBIqFfo4gchWK5wcWW9jReDpf/+G2wogH+UvONs2ejg==",
"requires": {
"@apollographql/apollo-tools": "^0.3.3",
"@apollographql/graphql-playground-html": "^1.6.6",
"@types/ws": "^6.0.0",
"apollo-cache-control": "0.5.1",
"apollo-datasource": "0.3.1",
"apollo-engine-reporting": "1.0.2",
"apollo-server-caching": "0.3.1",
"apollo-server-env": "2.2.0",
"apollo-server-errors": "2.2.0",
"apollo-server-plugin-base": "0.3.2",
"apollo-tracing": "0.5.1",
"fast-json-stable-stringify": "^2.0.0",
"graphql-extensions": "0.5.2",
"graphql-subscriptions": "^1.0.0",
"graphql-tag": "^2.9.2",
"graphql-tools": "^4.0.0",
"graphql-upload": "^8.0.2",
"sha.js": "^2.4.11",
"subscriptions-transport-ws": "^0.9.11",
"ws": "^6.0.0"
},
"dependencies": {
"@types/ws": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-6.0.1.tgz",
"integrity": "sha512-EzH8k1gyZ4xih/MaZTXwT2xOkPiIMSrhQ9b8wrlX88L0T02eYsddatQlwVFlEPyEqV0ChpdpNnE51QPH6NVT4Q==",
"requires": {
"@types/events": "*",
"@types/node": "*"
}
},
"ws": {
"version": "6.1.4",
"resolved": "https://registry.npmjs.org/ws/-/ws-6.1.4.tgz",
"integrity": "sha512-eqZfL+NE/YQc1/ZynhojeV8q+H050oR8AZ2uIev7RU10svA9ZnJUddHcOUZTJLinZ9yEfdA2kSATS2qZK5fhJA==",
"requires": {
"async-limiter": "~1.0.0"
}
}
}
},
"apollo-server-env": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/apollo-server-env/-/apollo-server-env-2.2.0.tgz",
"integrity": "sha512-wjJiI5nQWPBpNmpiLP389Ezpstp71szS6DHAeTgYLb/ulCw3CTuuA+0/E1bsThVWiQaDeHZE0sE3yI8q2zrYiA==",
"requires": {
"node-fetch": "^2.1.2",
"util.promisify": "^1.0.0"
}
},
"apollo-server-errors": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/apollo-server-errors/-/apollo-server-errors-2.2.0.tgz",
"integrity": "sha512-gV9EZG2tovFtT1cLuCTavnJu2DaKxnXPRNGSTo+SDI6IAk6cdzyW0Gje5N2+3LybI0Wq5KAbW6VLei31S4MWmg=="
},
"apollo-server-express": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/apollo-server-express/-/apollo-server-express-2.4.2.tgz",
"integrity": "sha512-Q5/unCAi6a2dT39LQaIiLC1d8O4fmBDU2CrRhVhPWP8I344xPgNOcrs7MsNN7Ecb56UGbgDKxBoWowFG65ulKw==",
"requires": {
"@apollographql/graphql-playground-html": "^1.6.6",
"@types/accepts": "^1.3.5",
"@types/body-parser": "1.17.0",
"@types/cors": "^2.8.4",
"@types/express": "4.16.1",
"accepts": "^1.3.5",
"apollo-server-core": "2.4.2",
"body-parser": "^1.18.3",
"cors": "^2.8.4",
"graphql-subscriptions": "^1.0.0",
"graphql-tools": "^4.0.0",
"type-is": "^1.6.16"
},
"dependencies": {
"@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/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/express": {
"version": "4.16.1",
"resolved": "https://registry.npmjs.org/@types/express/-/express-4.16.1.tgz",
"integrity": "sha512-V0clmJow23WeyblmACoxbHBu2JKlE5TiIme6Lem14FnPW9gsttyHtk6wq7njcdIWH1njAaFgR8gW09lgY98gQg==",
"requires": {
"@types/body-parser": "*",
"@types/express-serve-static-core": "*",
"@types/serve-static": "*"
}
},
"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"
}
},
"mime-db": {
"version": "1.38.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz",
"integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg=="
},
"mime-types": {
"version": "2.1.22",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz",
"integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==",
"requires": {
"mime-db": "~1.38.0"
}
},
"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"
}
}
}
},
"apollo-server-plugin-base": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/apollo-server-plugin-base/-/apollo-server-plugin-base-0.3.2.tgz",
"integrity": "sha512-yzXrkVSPBoux2uPgbTGROGh7W0axRWopMZM+KT9aF9H/+yMCwtt0EhGOGyNUDMOFA4rT3z+cLVvYuZr1rSQWcg=="
},
"apollo-tracing": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/apollo-tracing/-/apollo-tracing-0.5.1.tgz",
"integrity": "sha512-5gb8OWzkGaJFsmQdyMyZnOjcq6weMTkqJSGj0hfR7uX99X4SBFAzZV4nTeK4z0XkXO2I12xSTJoS4gxbFjgeaA==",
"requires": {
"apollo-server-env": "2.2.0",
"graphql-extensions": "0.5.2"
}
},
"apollo-utilities": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/apollo-utilities/-/apollo-utilities-1.1.3.tgz",
"integrity": "sha512-pF9abhiClX5gfj/WFWZh8DiI33nOLGxRhXH9ZMquaM1V8bhq1WLFPt2QjShWH3kGQVeIGUK+FQefnhe+ZaaAYg==",
"requires": {
"fast-json-stable-stringify": "^2.0.0",
"tslib": "^1.9.3"
},
"dependencies": {
"tslib": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
}
}
},
"append-buffer": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/append-buffer/-/append-buffer-1.0.2.tgz",
@@ -1728,6 +2064,14 @@
"resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz",
"integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg=="
},
"async-retry": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/async-retry/-/async-retry-1.2.3.tgz",
"integrity": "sha512-tfDb02Th6CE6pJUF2gjW5ZVjsgwlucVXOEQMvEX9JgSJMs9gAX+Nz3xRuJBKuUYjTSYORqvDBORdAQ3LU59g7Q==",
"requires": {
"retry": "0.12.0"
}
},
"async-settle": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/async-settle/-/async-settle-1.0.0.tgz",
@@ -4406,7 +4750,6 @@
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz",
"integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=",
"dev": true,
"requires": {
"foreach": "^2.0.5",
"object-keys": "^1.0.8"
@@ -4453,6 +4796,11 @@
"resolved": "https://registry.npmjs.org/deprecate/-/deprecate-1.0.0.tgz",
"integrity": "sha1-ZhSQ7SQokWpsiIPYg05WRvTkpKg="
},
"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",
@@ -4859,6 +5207,29 @@
"is-arrayish": "^0.2.1"
}
},
"es-abstract": {
"version": "1.13.0",
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz",
"integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==",
"requires": {
"es-to-primitive": "^1.2.0",
"function-bind": "^1.1.1",
"has": "^1.0.3",
"is-callable": "^1.1.4",
"is-regex": "^1.0.4",
"object-keys": "^1.0.12"
}
},
"es-to-primitive": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz",
"integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==",
"requires": {
"is-callable": "^1.1.4",
"is-date-object": "^1.0.1",
"is-symbol": "^1.0.2"
}
},
"es5-ext": {
"version": "0.10.37",
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.37.tgz",
@@ -5027,6 +5398,11 @@
}
}
},
"eventemitter3": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz",
"integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA=="
},
"execa": {
"version": "0.8.0",
"resolved": "https://registry.npmjs.org/execa/-/execa-0.8.0.tgz",
@@ -5936,8 +6312,7 @@
"foreach": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz",
"integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=",
"dev": true
"integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k="
},
"forever-agent": {
"version": "0.6.1",
@@ -6005,6 +6380,11 @@
"readable-stream": "^2.0.0"
}
},
"fs-capacitor": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/fs-capacitor/-/fs-capacitor-2.0.0.tgz",
"integrity": "sha512-CIJZpxbVWhO+qyODeCR55Q+6vj0p2oL8DAWd/DZi3Ev+25PimUoScw07K0fPgluaH3lFoqNvwW13BDYfHWFQJw=="
},
"fs-extra": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.2.tgz",
@@ -6636,8 +7016,7 @@
"function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
"dev": true
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
},
"gauge": {
"version": "2.7.4",
@@ -7708,6 +8087,11 @@
"sparkles": "^1.0.0"
}
},
"google-libphonenumber": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.2.tgz",
"integrity": "sha512-ubjGeosYPeusjYbUHy76lCniGTTI0k1rIFc+uKBX+jHQLDmWOSUtlFUxaeoLJ+Y+PAMM6dWp+C1HjHx5BI8kEw=="
},
"got": {
"version": "6.7.1",
"resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz",
@@ -7738,6 +8122,111 @@
"integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=",
"dev": true
},
"graphql": {
"version": "14.1.1",
"resolved": "https://registry.npmjs.org/graphql/-/graphql-14.1.1.tgz",
"integrity": "sha512-C5zDzLqvfPAgTtP8AUPIt9keDabrdRAqSWjj2OPRKrKxI9Fb65I36s1uCs1UUBFnSWTdO7hyHi7z1ZbwKMKF6Q==",
"requires": {
"iterall": "^1.2.2"
}
},
"graphql-extensions": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/graphql-extensions/-/graphql-extensions-0.5.2.tgz",
"integrity": "sha512-D/FAvjYEZ8GM3vfALxRvItozy5iLUfzyoauE2lli+0OuUBCAZDLP0fgqeTFK93NnQX/XSjBVGhcuDWBB7JesEw==",
"requires": {
"@apollographql/apollo-tools": "^0.3.3"
}
},
"graphql-query-complexity": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/graphql-query-complexity/-/graphql-query-complexity-0.2.3.tgz",
"integrity": "sha512-XLvEsqGTJmJmgof8u5NjIkBHL75b4Inw1F8JQ3jGRBhr3hVFx6aWOTL7C2aknp1uIh8dRmqwzrb9gas2NLHnfA==",
"requires": {
"lodash.get": "^4.4.2"
}
},
"graphql-subscriptions": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/graphql-subscriptions/-/graphql-subscriptions-1.0.0.tgz",
"integrity": "sha512-+ytmryoHF1LVf58NKEaNPRUzYyXplm120ntxfPcgOBC7TnK7Tv/4VRHeh4FAR9iL+O1bqhZs4nkibxQ+OA5cDQ==",
"requires": {
"iterall": "^1.2.1"
}
},
"graphql-tag": {
"version": "2.10.1",
"resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.10.1.tgz",
"integrity": "sha512-jApXqWBzNXQ8jYa/HLkZJaVw9jgwNqZkywa2zfFn16Iv1Zb7ELNHkJaXHR7Quvd5SIGsy6Ny7SUKATgnu05uEg=="
},
"graphql-tools": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/graphql-tools/-/graphql-tools-4.0.4.tgz",
"integrity": "sha512-chF12etTIGVVGy3fCTJ1ivJX2KB7OSG4c6UOJQuqOHCmBQwTyNgCDuejZKvpYxNZiEx7bwIjrodDgDe9RIkjlw==",
"requires": {
"apollo-link": "^1.2.3",
"apollo-utilities": "^1.0.1",
"deprecated-decorator": "^0.1.6",
"iterall": "^1.1.3",
"uuid": "^3.1.0"
}
},
"graphql-upload": {
"version": "8.0.4",
"resolved": "https://registry.npmjs.org/graphql-upload/-/graphql-upload-8.0.4.tgz",
"integrity": "sha512-jsTfVYXJ5mU6BXiiJ20CUCAcf41ICCQJ2ltwQFUuaFKiY4JhlG99uZZp5S3hbpQ/oA1kS7hz4pRtsnxPCa7Yfg==",
"requires": {
"busboy": "^0.3.0",
"fs-capacitor": "^2.0.0",
"http-errors": "^1.7.1",
"object-path": "^0.11.4"
},
"dependencies": {
"busboy": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/busboy/-/busboy-0.3.0.tgz",
"integrity": "sha512-e+kzZRAbbvJPLjQz2z+zAyr78BSi9IFeBTyLwF76g78Q2zRt/RZ1NtS3MS17v2yLqYfLz69zHdC+1L4ja8PwqQ==",
"requires": {
"dicer": "0.3.0"
}
},
"depd": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
"integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak="
},
"dicer": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/dicer/-/dicer-0.3.0.tgz",
"integrity": "sha512-MdceRRWqltEG2dZqO769g27N/3PXfcKl04VhYnBlo2YhH7zPi88VebsjTKclaOyiuMaGU72hTfw3VkUitGcVCA==",
"requires": {
"streamsearch": "0.1.2"
}
},
"http-errors": {
"version": "1.7.1",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.1.tgz",
"integrity": "sha512-jWEUgtZWGSMba9I1N3gc1HmvpBUaNC9vDdA46yScAdp+C5rdEuKWUBLWTQpW9FwSWSbYYs++b6SDCxf9UEJzfw==",
"requires": {
"depd": "~1.1.2",
"inherits": "2.0.3",
"setprototypeof": "1.1.0",
"statuses": ">= 1.5.0 < 2",
"toidentifier": "1.0.0"
}
},
"setprototypeof": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz",
"integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ=="
},
"statuses": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
"integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow="
}
}
},
"growl": {
"version": "1.9.2",
"resolved": "https://registry.npmjs.org/growl/-/growl-1.9.2.tgz",
@@ -8952,6 +9441,14 @@
}
}
},
"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",
@@ -8992,8 +9489,7 @@
"has-symbols": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz",
"integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=",
"dev": true
"integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q="
},
"has-unicode": {
"version": "2.0.1",
@@ -9440,6 +9936,11 @@
"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=="
},
"is-ci": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.0.10.tgz",
@@ -9467,6 +9968,11 @@
}
}
},
"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-descriptor": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.1.tgz",
@@ -9658,6 +10164,14 @@
"integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=",
"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=",
"requires": {
"has": "^1.0.1"
}
},
"is-regexp": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz",
@@ -9690,6 +10204,14 @@
"integrity": "sha1-ilkRfZMt4d4A8kX83TnOQ/HpOaY=",
"dev": true
},
"is-symbol": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz",
"integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==",
"requires": {
"has-symbols": "^1.0.0"
}
},
"is-text-path": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz",
@@ -9845,6 +10367,11 @@
}
}
},
"iterall": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/iterall/-/iterall-1.2.2.tgz",
"integrity": "sha512-yynBb1g+RFUPY64fTrFv7nsjRrENBQJaX2UL+2Szc9REFrSNm1rpSXHGzhmAy7a9uv3vlvgBlXnf9RqmPH1/DA=="
},
"iterare": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/iterare/-/iterare-0.0.8.tgz",
@@ -11115,6 +11642,11 @@
"lodash._root": "^3.0.0"
}
},
"lodash.get": {
"version": "4.4.2",
"resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz",
"integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk="
},
"lodash.isarguments": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz",
@@ -11150,6 +11682,11 @@
"integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=",
"dev": true
},
"lodash.sortby": {
"version": "4.7.0",
"resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz",
"integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg="
},
"lodash.template": {
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz",
@@ -11509,6 +12046,49 @@
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
"integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E="
},
"merge-graphql-schemas": {
"version": "1.5.8",
"resolved": "https://registry.npmjs.org/merge-graphql-schemas/-/merge-graphql-schemas-1.5.8.tgz",
"integrity": "sha512-0TGOKebltvmWR9h9dPYS2vAqMPThXwJ6gVz7O5MtpBp2sunAg/M25iMSNI7YhU6PDJVtGtldTfqV9a+55YhB+A==",
"requires": {
"deepmerge": "^2.2.1",
"glob": "^7.1.3",
"is-glob": "^4.0.0"
},
"dependencies": {
"deepmerge": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-2.2.1.tgz",
"integrity": "sha512-R9hc1Xa/NOBi9WRVUWg19rl1UB7Tt4kuPd+thNJgFZoxXsTz7ncaPaeIm+40oSGuP33DfMb4sZt1QIGiJzC4EA=="
},
"glob": {
"version": "7.1.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
"integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
"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"
}
},
"is-extglob": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
"integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI="
},
"is-glob": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz",
"integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=",
"requires": {
"is-extglob": "^2.1.1"
}
}
}
},
"merge-stream": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz",
@@ -11714,7 +12294,6 @@
"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"
}
@@ -12132,6 +12711,11 @@
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz",
"integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk="
},
"node-fetch": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.3.0.tgz",
"integrity": "sha512-MOd8pV3fxENbryESLgVIeaGKrdl+uaYhCSSVkjeOb/31/njTpcis5aWfdqgNlHIrKOLRbMnfPINPOML2CIFeXA=="
},
"nodemon": {
"version": "1.18.4",
"resolved": "https://registry.npmjs.org/nodemon/-/nodemon-1.18.4.tgz",
@@ -13780,8 +14364,12 @@
"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
"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-visit": {
"version": "1.0.1",
@@ -13826,6 +14414,15 @@
}
}
},
"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"
}
},
"object.map": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz",
@@ -15141,6 +15738,11 @@
"resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz",
"integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg=="
},
"retry": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz",
"integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs="
},
"reusify": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
@@ -15361,6 +15963,15 @@
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz",
"integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ="
},
"sha.js": {
"version": "2.4.11",
"resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
"integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==",
"requires": {
"inherits": "^2.0.1",
"safe-buffer": "^5.0.1"
}
},
"shebang-command": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
@@ -16097,6 +16708,28 @@
}
}
},
"subscriptions-transport-ws": {
"version": "0.9.15",
"resolved": "https://registry.npmjs.org/subscriptions-transport-ws/-/subscriptions-transport-ws-0.9.15.tgz",
"integrity": "sha512-f9eBfWdHsePQV67QIX+VRhf++dn1adyC/PZHP6XI5AfKnZ4n0FW+v5omxwdHVpd4xq2ZijaHEcmlQrhBY79ZWQ==",
"requires": {
"backo2": "^1.0.2",
"eventemitter3": "^3.1.0",
"iterall": "^1.2.1",
"symbol-observable": "^1.0.4",
"ws": "^5.2.0"
},
"dependencies": {
"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"
}
}
}
},
"success-symbol": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/success-symbol/-/success-symbol-0.1.0.tgz",
@@ -16187,8 +16820,7 @@
"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==",
"dev": true
"integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ=="
},
"tapable": {
"version": "0.2.8",
@@ -16429,6 +17061,11 @@
"through2": "^2.0.3"
}
},
"toidentifier": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
"integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw=="
},
"touch": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz",
@@ -16738,6 +17375,56 @@
"integrity": "sha1-diIXzAbbJY7EiQihKY6LlRIejqI=",
"dev": true
},
"type-graphql": {
"version": "0.17.0-beta.7",
"resolved": "https://registry.npmjs.org/type-graphql/-/type-graphql-0.17.0-beta.7.tgz",
"integrity": "sha512-z6bV6SWbv8IV9QlrAov+kdJFO4uWL6KE9tNd4hrXN/YT9RAm6Swyzewsk4FuYKRc0gkTKLWfa0RddgUCn2KKVQ==",
"requires": {
"@types/glob": "^7.1.1",
"@types/node": "*",
"@types/semver": "^5.5.0",
"class-validator": ">=0.9.1",
"glob": "^7.1.3",
"graphql-query-complexity": "^0.2.2",
"graphql-subscriptions": "^1.0.0",
"semver": "^5.6.0",
"tslib": "^1.9.3"
},
"dependencies": {
"class-validator": {
"version": "0.9.1",
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.9.1.tgz",
"integrity": "sha512-3wApflrd3ywVZyx4jaasGoFt8pmo4aGLPPAEKCKCsTRWVGPilahD88q3jQjRQwja50rl9a7rsP5LAxJYwGK8/Q==",
"requires": {
"google-libphonenumber": "^3.1.6",
"validator": "10.4.0"
}
},
"glob": {
"version": "7.1.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
"integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
"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"
}
},
"semver": {
"version": "5.6.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
"integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg=="
},
"tslib": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
}
}
},
"type-is": {
"version": "1.6.15",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz",
@@ -17031,6 +17718,15 @@
"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",
@@ -17066,6 +17762,11 @@
"spdx-expression-parse": "~1.0.0"
}
},
"validator": {
"version": "10.4.0",
"resolved": "https://registry.npmjs.org/validator/-/validator-10.4.0.tgz",
"integrity": "sha512-Q/wBy3LB1uOyssgNlXSRmaf22NxjvDNZM2MtIQ4jaEOAB61xsh1TQxsq1CgzUMBV1lDrVMogIh8GjG1DYW0zLg=="
},
"value-or-function": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/value-or-function/-/value-or-function-3.0.0.tgz",
@@ -17519,6 +18220,19 @@
"resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz",
"integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=",
"dev": true
},
"zen-observable": {
"version": "0.8.13",
"resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.8.13.tgz",
"integrity": "sha512-fa+6aDUVvavYsefZw0zaZ/v3ckEtMgCFi30sn91SEZea4y/6jQp05E3omjkX91zV6RVdn15fqnFZ6RKjRGbp2g=="
},
"zen-observable-ts": {
"version": "0.8.15",
"resolved": "https://registry.npmjs.org/zen-observable-ts/-/zen-observable-ts-0.8.15.tgz",
"integrity": "sha512-sXKPWiw6JszNEkRv5dQ+lQCttyjHM2Iks74QU5NP8mMPS/NrzTlHDr780gf/wOBqmHkPO6NCLMlsa+fAQ8VE8w==",
"requires": {
"zen-observable": "^0.8.0"
}
}
}
}

View File

@@ -40,6 +40,7 @@
"@nuxtjs/opencollective": "^0.1.0",
"amqp-connection-manager": "^2.2.0",
"amqplib": "^0.5.2",
"apollo-server-express": "^2.4.2",
"axios": "^0.17.1",
"cache-manager": "^2.9.0",
"class-transformer": "^0.1.8",
@@ -55,10 +56,12 @@
"fastify-cors": "^0.2.0",
"fastify-formbody": "^2.0.0",
"fastify-multipart": "^0.4.1",
"graphql": "^14.1.1",
"grpc": "^1.14.1",
"http2": "^3.3.7",
"iterare": "0.0.8",
"json-socket": "^0.2.1",
"merge-graphql-schemas": "^1.5.8",
"mqtt": "^2.16.0",
"multer": "^1.3.0",
"nats": "^0.8.4",
@@ -73,6 +76,7 @@
"socket.io": "^2.1.1",
"trouter": "^1.0.0",
"ts-simple-ast": "^14.4.3",
"type-graphql": "^0.17.0-beta.7",
"uuid": "^3.3.2"
},
"devDependencies": {

View File

@@ -72,8 +72,8 @@ export abstract class AbstractHttpAdapter<
this.httpServer = httpServer;
}
public getInstance(): any {
return this.instance;
public getInstance<T = any>(): T {
return this.instance as T;
}
abstract close();

View File

@@ -1,6 +1,8 @@
import { AbstractHttpAdapter } from '../adapters/http-adapter';
export class HttpAdapterHost<T extends AbstractHttpAdapter = any> {
export class HttpAdapterHost<
T extends AbstractHttpAdapter = AbstractHttpAdapter
> {
private _httpAdapter: T;
set httpAdapter(httpAdapter: T) {

View File

@@ -1,18 +1,21 @@
import iterate from 'iterare';
import { isUndefined, isNil } from '@nestjs/common/utils/shared.utils';
import { OnApplicationBootstrap } from '@nestjs/common';
import { Module } from '../injector/module';
import { isNil, isUndefined } from '@nestjs/common/utils/shared.utils';
import iterate from 'iterare';
import { InstanceWrapper } from '../injector/instance-wrapper';
import { getTransientInstances, getNonTransientInstances } from '../injector/instance-trancient';
import { Module } from '../injector/module';
import {
getNonTransientInstances,
getTransientInstances,
} from '../injector/transient-instances';
/**
* Checks if the given instance has the `onApplicationBootstrap` function
*
* @param instance The instance which should be checked
*/
function hasOnAppBootstrapHook(instance: unknown): instance is OnApplicationBootstrap {
function hasOnAppBootstrapHook(
instance: unknown,
): instance is OnApplicationBootstrap {
return !isUndefined(
(instance as OnApplicationBootstrap).onApplicationBootstrap,
);
@@ -25,7 +28,9 @@ function callOperator(instances: InstanceWrapper[]): Promise<any>[] {
return iterate(instances)
.filter(instance => !isNil(instance))
.filter(hasOnAppBootstrapHook)
.map(async instance => (instance as any as OnApplicationBootstrap).onApplicationBootstrap())
.map(async instance =>
((instance as any) as OnApplicationBootstrap).onApplicationBootstrap(),
)
.toArray();
}

View File

@@ -1,18 +1,21 @@
import iterate from 'iterare';
import { isUndefined, isNil } from '@nestjs/common/utils/shared.utils';
import { OnApplicationShutdown } from '@nestjs/common';
import { Module } from '../injector/module';
import { isNil, isUndefined } from '@nestjs/common/utils/shared.utils';
import iterate from 'iterare';
import { InstanceWrapper } from '../injector/instance-wrapper';
import { getTransientInstances, getNonTransientInstances } from '../injector/instance-trancient';
import { Module } from '../injector/module';
import {
getNonTransientInstances,
getTransientInstances,
} from '../injector/transient-instances';
/**
* Checks if the given instance has the `onApplicationShutdown` function
*
* @param instance The instance which should be checked
*/
function hasOnAppBootstrapHook(instance: unknown): instance is OnApplicationShutdown {
function hasOnAppBootstrapHook(
instance: unknown,
): instance is OnApplicationShutdown {
return !isUndefined(
(instance as OnApplicationShutdown).onApplicationShutdown,
);
@@ -21,11 +24,18 @@ function hasOnAppBootstrapHook(instance: unknown): instance is OnApplicationShut
/**
* Calls the given instances
*/
function callOperator(instances: InstanceWrapper[], signal?: string): Promise<any>[] {
function callOperator(
instances: InstanceWrapper[],
signal?: string,
): Promise<any>[] {
return iterate(instances)
.filter(instance => !isNil(instance))
.filter(hasOnAppBootstrapHook)
.map(async instance => (instance as any as OnApplicationShutdown).onApplicationShutdown(signal))
.map(async instance =>
((instance as any) as OnApplicationShutdown).onApplicationShutdown(
signal,
),
)
.toArray();
}
@@ -35,7 +45,10 @@ function callOperator(instances: InstanceWrapper[], signal?: string): Promise<an
*
* @param module The module which will be initialized
*/
export async function callAppShutdownHook(module: Module, signal?: string): Promise<any> {
export async function callAppShutdownHook(
module: Module,
signal?: string,
): Promise<any> {
const providers = [...module.providers];
// Module (class) instance is the first element of the providers array
// Lifecycle hook has to be called once all classes are properly initialized
@@ -49,6 +62,8 @@ export async function callAppShutdownHook(module: Module, signal?: string): Prom
// Call the instance itself
if (moduleClassInstance && hasOnAppBootstrapHook(moduleClassInstance)) {
await (moduleClassInstance as OnApplicationShutdown).onApplicationShutdown(signal);
await (moduleClassInstance as OnApplicationShutdown).onApplicationShutdown(
signal,
);
}
}

View File

@@ -1,18 +1,21 @@
import iterate from 'iterare';
import { isUndefined, isNil } from '@nestjs/common/utils/shared.utils';
import { OnModuleDestroy } from '@nestjs/common';
import { Module } from '../injector/module';
import { isNil, isUndefined } from '@nestjs/common/utils/shared.utils';
import iterate from 'iterare';
import { InstanceWrapper } from '../injector/instance-wrapper';
import { getTransientInstances, getNonTransientInstances } from '../injector/instance-trancient';
import { Module } from '../injector/module';
import {
getNonTransientInstances,
getTransientInstances,
} from '../injector/transient-instances';
/**
* Returns true or false if the given instance has a `onModuleDestroy` function
*
* @param instance The instance which should be checked
*/
function hasOnModuleDestroyHook(instance: unknown): instance is OnModuleDestroy {
function hasOnModuleDestroyHook(
instance: unknown,
): instance is OnModuleDestroy {
return !isUndefined((instance as OnModuleDestroy).onModuleDestroy);
}
@@ -23,7 +26,9 @@ function callOperator(instances: InstanceWrapper[]): Promise<any>[] {
return iterate(instances)
.filter(instance => !isNil(instance))
.filter(hasOnModuleDestroyHook)
.map(async instance => (instance as any as OnModuleDestroy).onModuleDestroy())
.map(async instance =>
((instance as any) as OnModuleDestroy).onModuleDestroy(),
)
.toArray();
}
@@ -47,10 +52,7 @@ export async function callModuleDestroyHook(module: Module): Promise<any> {
await Promise.all(callOperator(transientInstances));
// Call the module instance itself
if (
moduleClassInstance &&
hasOnModuleDestroyHook(moduleClassInstance)
) {
if (moduleClassInstance && hasOnModuleDestroyHook(moduleClassInstance)) {
await (moduleClassInstance as OnModuleDestroy).onModuleDestroy();
}
}

View File

@@ -1,11 +1,12 @@
import iterate from 'iterare';
import { OnModuleInit } from '@nestjs/common';
import { isNil, isUndefined } from '@nestjs/common/utils/shared.utils';
import { Module } from '../injector/module';
import iterate from 'iterare';
import { InstanceWrapper } from '../injector/instance-wrapper';
import { getTransientInstances, getNonTransientInstances } from '../injector/instance-trancient';
import { Module } from '../injector/module';
import {
getNonTransientInstances,
getTransientInstances,
} from '../injector/transient-instances';
/**
* Returns true or false if the given instance has a `onModuleInit` function
@@ -23,7 +24,7 @@ function callOperator(instances: InstanceWrapper[]): Promise<any>[] {
return iterate(instances)
.filter(instance => !isNil(instance))
.filter(hasOnModuleInitHook)
.map(async instance => (instance as any as OnModuleInit).onModuleInit())
.map(async instance => ((instance as any) as OnModuleInit).onModuleInit())
.toArray();
}

View File

@@ -1,13 +1,13 @@
import {
CanActivate,
ExceptionFilter,
HttpServer,
INestApplication,
INestMicroservice,
NestInterceptor,
PipeTransform,
WebSocketAdapter,
} from '@nestjs/common';
import { HttpServer } from '@nestjs/common/interfaces';
import { CorsOptions } from '@nestjs/common/interfaces/external/cors-options.interface';
import { MicroserviceOptions } from '@nestjs/common/interfaces/microservices/microservice-configuration.interface';
import { NestApplicationOptions } from '@nestjs/common/interfaces/nest-application-options.interface';
@@ -16,6 +16,7 @@ import { loadPackage } from '@nestjs/common/utils/load-package.util';
import { isObject, validatePath } from '@nestjs/common/utils/shared.utils';
import iterate from 'iterare';
import * as optional from 'optional';
import { AbstractHttpAdapter } from './adapters';
import { ApplicationConfig } from './application-config';
import { MESSAGES } from './constants';
import { NestContainer } from './injector/container';
@@ -65,8 +66,8 @@ export class NestApplication extends NestApplicationContext
);
}
public getHttpAdapter(): HttpServer {
return this.httpAdapter;
public getHttpAdapter(): AbstractHttpAdapter {
return this.httpAdapter as AbstractHttpAdapter;
}
public registerHttpServer() {

View File

@@ -11,6 +11,7 @@ import { NestApplicationOptions } from '@nestjs/common/interfaces/nest-applicati
import { Logger } from '@nestjs/common/services/logger.service';
import { loadPackage } from '@nestjs/common/utils/load-package.util';
import { isFunction, isNil } from '@nestjs/common/utils/shared.utils';
import { AbstractHttpAdapter } from './adapters/http-adapter';
import { ApplicationConfig } from './application-config';
import { MESSAGES } from './constants';
import { ExceptionsZone } from './errors/exceptions-zone';
@@ -34,12 +35,12 @@ export class NestFactoryStatic {
): Promise<T>;
public async create<T extends INestApplication = INestApplication>(
module: any,
httpServer: HttpServer,
httpAdapter: AbstractHttpAdapter,
options?: NestApplicationOptions,
): Promise<T>;
public async create<T extends INestApplication = INestApplication>(
module: any,
serverOrOptions?: HttpServer | NestApplicationOptions,
serverOrOptions?: AbstractHttpAdapter | NestApplicationOptions,
options?: NestApplicationOptions,
): Promise<T> {
// tslint:disable-next-line:prefer-const
@@ -183,15 +184,17 @@ export class NestFactoryStatic {
!isNil(options.logger) && Logger.overrideLogger(options.logger);
}
private createHttpAdapter<T = any>(httpServer?: T): HttpServer {
private createHttpAdapter<T = any>(httpServer?: T): AbstractHttpAdapter {
const { ExpressAdapter } = loadAdapter('@nestjs/platform-express', 'HTTP');
return new ExpressAdapter(httpServer);
}
private isHttpServer(
serverOrOptions: HttpServer | NestApplicationOptions,
): serverOrOptions is HttpServer {
return !!(serverOrOptions && (serverOrOptions as HttpServer).patch);
serverOrOptions: AbstractHttpAdapter | NestApplicationOptions,
): serverOrOptions is AbstractHttpAdapter {
return !!(
serverOrOptions && (serverOrOptions as AbstractHttpAdapter).patch
);
}
private createAdapterProxy<T>(app: NestApplication, adapter: HttpServer): T {

View File

@@ -1,6 +1,5 @@
import { Module } from '@nestjs/common';
import { GraphQLModule } from '@nestjs/graphql';
import { join } from 'path';
import { CatsModule } from './cats/cats.module';
@Module({
@@ -9,10 +8,6 @@ import { CatsModule } from './cats/cats.module';
GraphQLModule.forRoot({
typePaths: ['./**/*.graphql'],
installSubscriptionHandlers: true,
definitions: {
path: join(process.cwd(), 'src/graphql.schema.ts'),
outputAs: 'class',
},
}),
],
})

View File

@@ -0,0 +1,9 @@
import { GraphQLDefinitionsFactory } from '@nestjs/graphql';
import { join } from 'path';
const definitionsFactory = new GraphQLDefinitionsFactory();
definitionsFactory.generate({
typePaths: ['./src/**/*.graphql'],
path: join(process.cwd(), 'src/graphql.schema.ts'),
outputAs: 'class',
});

View File

@@ -1,32 +1,33 @@
/** ------------------------------------------------------
* THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)
* -------------------------------------------------------
*/
/* tslint:disable */
export class CreateCatInput {
name?: string;
age?: number;
export abstract class CreateCatInput {
name?: string;
age?: number;
}
export class Cat {
id?: number;
name?: string;
age?: number;
export abstract class Cat {
id?: number;
name?: string;
age?: number;
}
export abstract class IMutation {
abstract createCat(createCatInput?: CreateCatInput): Cat | Promise<Cat>;
abstract createCat(createCatInput?: CreateCatInput): Cat | Promise<Cat>;
}
export abstract class IQuery {
abstract getCats(): Cat[] | Promise<Cat[]>;
abstract getCats(): Cat[] | Promise<Cat[]>;
abstract cat(id: string): Cat | Promise<Cat>;
abstract cat(id: string): Cat | Promise<Cat>;
abstract temp__(): boolean | Promise<boolean>;
abstract temp__(): boolean | Promise<boolean>;
}
export abstract class ISubscription {
abstract catCreated(): Cat | Promise<Cat>;
abstract catCreated(): Cat | Promise<Cat>;
}

View File

@@ -3,7 +3,7 @@
# !!! DO NOT MODIFY THIS FILE BY YOURSELF !!!
# -----------------------------------------------
# Date custom scalar type
"""Date custom scalar type"""
scalar Date
type Mutation {

View File

@@ -7,7 +7,7 @@ import { RecipesModule } from './recipes/recipes.module';
RecipesModule,
GraphQLModule.forRoot({
installSubscriptionHandlers: true,
autoGeneratedSchema: 'schema.gql',
autoSchemaFile: 'schema.gql',
}),
],
})