update cloudapi-graphql dependencies

This commit is contained in:
Sérgio Ramos 2017-04-13 18:33:59 +01:00
parent ef8089ea70
commit 8968e529df
5 changed files with 1308 additions and 1380 deletions

View File

@ -9,26 +9,26 @@
"test": "make test" "test": "make test"
}, },
"dependencies": { "dependencies": {
"bunyan": "^1.8.5", "bunyan": "^1.8.10",
"dotenv": "^2.0.0", "dotenv": "^4.0.0",
"express": "^4.14.0", "express": "^4.15.2",
"express-graphql": "^0.6.1", "express-graphql": "^0.6.4",
"got": "^6.6.3", "got": "^6.7.1",
"graphql": "^0.8.2", "graphql": "^0.9.3",
"inherits": "^2.0.3", "inherits": "^2.0.3",
"moment": "^2.17.1", "moment": "^2.18.1",
"smartdc-auth": "^2.5.2", "smartdc-auth": "^2.5.2",
"triton": "https://github.com/tomgco/node-triton.git#45bf5cb70deaf2ae43d2fb69965705550d261616", "triton": "^5.2.0",
"user-home": "^2.0.0" "user-home": "^2.0.0"
}, },
"devDependencies": { "devDependencies": {
"ava": "^0.17.0", "ava": "^0.19.1",
"eslint": "3.12.2", "eslint": "3.19.0",
"eslint-config-semistandard": "^7.0.0", "eslint-config-semistandard": "^8.0.0",
"eslint-config-standard": "^6.2.1", "eslint-config-standard": "^10.2.0",
"eslint-plugin-promise": "^3.4.0", "eslint-plugin-promise": "^3.5.0",
"eslint-plugin-standard": "^2.0.1", "eslint-plugin-standard": "^3.0.1",
"nyc": "^10.0.0", "nyc": "^10.2.0",
"tap-xunit": "^1.5.0" "tap-xunit": "^1.7.0"
} }
} }

View File

@ -1,9 +1,13 @@
const json = (() => { const json = (() => {
try { try {
require('dotenv').config({ const res = require('dotenv').config({
path: '../.env', path: '../.env',
silent: true silent: true
}); });
if (res.error) {
throw error;
}
} catch (err) { } catch (err) {
try { try {
return require('../credentials.json'); return require('../credentials.json');
@ -11,6 +15,7 @@ const json = (() => {
return {}; return {};
} }
} }
return {}; return {};
})(); })();

View File

@ -4,11 +4,11 @@ const app = express();
app.use('/graphql', require('./endpoint')); app.use('/graphql', require('./endpoint'));
app.listen(3000, (err) => { const server = app.listen((err) => {
if (err) { if (err) {
console.log(err); console.log(err);
throw err; throw err;
} }
console.log('Listening at localhost:3000'); console.log(`Listening at http://localhost:${server.address().port}`);
}); });

View File

@ -155,10 +155,7 @@ module.exports.locality = new GraphQLInputObjectType({
name: 'LocalityType', name: 'LocalityType',
fields: { fields: {
strict: { strict: {
type: GraphQLBoolean, type: GraphQLBoolean
resolve: (root) => {
return !!root.strict;
}
}, },
near: { near: {
type: new GraphQLList(GraphQLID) type: new GraphQLList(GraphQLID)

File diff suppressed because it is too large Load Diff