Update dependencies to enable Greenkeeper 🌴 (#3940)

* chore(package): update dependencies

* docs(readme): add Greenkeeper badge

* Fix indent issues with eslint 4.0

see http://eslint.org/docs/user-guide/migrating-to-4.0.0\#-the-indent-rule-is-more-strict
This commit is contained in:
greenkeeper[bot]
2017-06-20 09:15:26 -07:00
committed by Arthur Cinader
parent 16954c2f74
commit e94991b368
62 changed files with 5416 additions and 5413 deletions

View File

@@ -130,10 +130,10 @@ export class FunctionsRouter extends PromiseRouter {
const cleanResult = logger.truncateLogMessage(JSON.stringify(result.response.result));
logger.info(`Ran cloud function ${functionName} for user ${userString} `
+ `with:\n Input: ${cleanInput }\n Result: ${cleanResult }`, {
functionName,
params,
user: userString,
});
functionName,
params,
user: userString,
});
resolve(result);
} catch (e) {
reject(e);
@@ -143,11 +143,11 @@ export class FunctionsRouter extends PromiseRouter {
logger.error(`Failed running cloud function ${functionName} for `
+ `user ${userString} with:\n Input: ${cleanInput}\n Error: `
+ JSON.stringify(error), {
functionName,
error,
params,
user: userString
});
functionName,
error,
params,
user: userString
});
reject(error);
} catch (e) {
reject(e);

View File

@@ -5,15 +5,15 @@ export class PurgeRouter extends PromiseRouter {
handlePurge(req) {
return req.config.database.purgeCollection(req.params.className)
.then(() => {
var cacheAdapter = req.config.cacheController;
if (req.params.className == '_Session') {
cacheAdapter.user.clear();
} else if (req.params.className == '_Role') {
cacheAdapter.role.clear();
}
return {response: {}};
});
.then(() => {
var cacheAdapter = req.config.cacheController;
if (req.params.className == '_Session') {
cacheAdapter.user.clear();
} else if (req.params.className == '_Role') {
cacheAdapter.role.clear();
}
return {response: {}};
});
}
mountRoutes() {

View File

@@ -15,22 +15,22 @@ function classNameMismatchResponse(bodyClass, pathClass) {
function getAllSchemas(req) {
return req.config.database.loadSchema({ clearCache: true})
.then(schemaController => schemaController.getAllClasses(true))
.then(schemas => ({ response: { results: schemas } }));
.then(schemaController => schemaController.getAllClasses(true))
.then(schemas => ({ response: { results: schemas } }));
}
function getOneSchema(req) {
const className = req.params.className;
return req.config.database.loadSchema({ clearCache: true})
.then(schemaController => schemaController.getOneSchema(className, true))
.then(schema => ({ response: schema }))
.catch(error => {
if (error === undefined) {
throw new Parse.Error(Parse.Error.INVALID_CLASS_NAME, `Class ${className} does not exist.`);
} else {
throw new Parse.Error(Parse.Error.INTERNAL_SERVER_ERROR, 'Database adapter error.');
}
});
.then(schemaController => schemaController.getOneSchema(className, true))
.then(schema => ({ response: schema }))
.catch(error => {
if (error === undefined) {
throw new Parse.Error(Parse.Error.INVALID_CLASS_NAME, `Class ${className} does not exist.`);
} else {
throw new Parse.Error(Parse.Error.INTERNAL_SERVER_ERROR, 'Database adapter error.');
}
});
}
function createSchema(req) {
@@ -59,8 +59,8 @@ function modifySchema(req) {
const className = req.params.className;
return req.config.database.loadSchema({ clearCache: true})
.then(schema => schema.updateClass(className, submittedFields, req.body.classLevelPermissions, req.config.database))
.then(result => ({response: result}));
.then(schema => schema.updateClass(className, submittedFields, req.body.classLevelPermissions, req.config.database))
.then(result => ({response: result}));
}
const deleteSchema = req => {
@@ -68,7 +68,7 @@ const deleteSchema = req => {
throw new Parse.Error(Parse.Error.INVALID_CLASS_NAME, SchemaController.invalidClassNameMessage(req.params.className));
}
return req.config.database.deleteSchema(req.params.className)
.then(() => ({ response: {} }));
.then(() => ({ response: {} }));
}
export class SchemasRouter extends PromiseRouter {