1
0
mirror of https://github.com/yldio/copilot.git synced 2024-12-29 05:10:05 +02:00

run prettier

This commit is contained in:
Sérgio Ramos 2017-04-27 23:11:12 +01:00
parent d5ecdd1cbc
commit 5e59690ca8
7 changed files with 24 additions and 50 deletions

View File

@ -20,28 +20,8 @@ const json = (() => {
})();
module.exports = {
url: (
process.env.SDC_URL ||
json.SDC_URL ||
json.url ||
''
),
account: (
process.env.SDC_ACCOUNT ||
json.SDC_ACCOUNT ||
json.account ||
''
),
user: (
process.env.SDC_USER ||
json.SDC_USER ||
json.user ||
''
),
keyId: (
process.env.SDC_KEY_ID ||
json.SDC_KEY_ID ||
json.keyId ||
''
)
url: process.env.SDC_URL || json.SDC_URL || json.url || '',
account: process.env.SDC_ACCOUNT || json.SDC_ACCOUNT || json.account || '',
user: process.env.SDC_USER || json.SDC_USER || json.user || '',
keyId: process.env.SDC_KEY_ID || json.SDC_KEY_ID || json.keyId || ''
};

View File

@ -20,28 +20,17 @@ const json = (() => {
})();
module.exports = {
cert: (
process.env.DOCKER_CERT_PATH ||
cert: process.env.DOCKER_CERT_PATH ||
json.DOCKER_CERT_PATH ||
json.cert ||
''
),
host: (
process.env.DOCKER_HOST ||
json.DOCKER_HOST ||
json.host ||
''
),
tls_verify: (
process.env.DOCKER_TLS_VERIFY ||
'',
host: process.env.DOCKER_HOST || json.DOCKER_HOST || json.host || '',
tls_verify: process.env.DOCKER_TLS_VERIFY ||
json.DOCKER_TLS_VERIFY ||
json.tls_verify ||
''
),
timeout: (
process.env.DOCKER_CLIENT_TIMEOUT ||
'',
timeout: process.env.DOCKER_CLIENT_TIMEOUT ||
json.DOCKER_CLIENT_TIMEOUT ||
json.timeout ||
''
)
};

View File

@ -1,5 +1,5 @@
const graphql = require('graphql');
const mutation = require('./mutations');
// const mutation = require('./mutations');
const query = require('./queries');
const { GraphQLSchema } = graphql;

View File

@ -1,9 +1,13 @@
const graphql = require('graphql');
const DynamicObjectType = require('../types/dynamic-object');
const ContainerType = require('../types/container');
const api = require('../../api');
const { GraphQLInt, GraphQLList, GraphQLString, GraphQLID, GraphQLBoolean } = graphql;
const {
GraphQLInt,
GraphQLList,
GraphQLID,
GraphQLBoolean
} = require('graphql');
module.exports = {
type: new GraphQLList(ContainerType),
@ -35,8 +39,7 @@ module.exports = {
}
},
resolve(root, args) {
const { list, inspect } = api.containers;
const { list } = api.containers;
return list(args);
//
// const { after, first } = args;
@ -52,4 +55,4 @@ module.exports = {
// }).then(machine => [machine])
// : list(newArgs);
}
};
};

View File

@ -1,4 +1,5 @@
const pascalCase = require('pascal-case');
const upperCase = require('upper-case');
module.exports = (root, ctx, req, { fieldName }) => root[pascalCase(fieldName)] || root[upperCase(fieldName)];
module.exports = (root, ctx, req, { fieldName }) =>
root[pascalCase(fieldName)] || root[upperCase(fieldName)];

View File

@ -1,5 +1,4 @@
const { GraphQLString, GraphQLObjectType, GraphQLInt } = require('graphql');
const DynamicObjectType = require('./dynamic-object');
const fromPascalCase = require('./from-pascal-case');
module.exports = new GraphQLObjectType({

View File

@ -36,7 +36,9 @@ const plugins = [
},
{
register: PortalApi,
routes: { prefix: '/api' }
routes: {
prefix: '/api'
}
}
];