mirror of
https://github.com/wassname/talk.git
synced 2026-07-04 09:54:48 +08:00
Merge branch 'master' into stream-refetch-tweak
This commit is contained in:
@@ -49,10 +49,10 @@ let resolvers = {
|
||||
* plugin based ones. This allows plugins to extend existing resolvers as well
|
||||
* as provide new ones.
|
||||
*/
|
||||
resolvers = plugins.get('server', 'resolvers').reduce((resolvers, {plugin}) => {
|
||||
resolvers = plugins.get('server', 'resolvers').reduce((acc, {plugin, resolvers}) => {
|
||||
debug(`added plugin '${plugin.name}'`);
|
||||
|
||||
return _.merge(resolvers, plugin.resolvers);
|
||||
return _.merge(acc, resolvers);
|
||||
}, resolvers);
|
||||
|
||||
module.exports = resolvers;
|
||||
|
||||
+8
-8
@@ -23,9 +23,9 @@ try {
|
||||
|
||||
/**
|
||||
* isInternal checks to see if a given plugin is internal, and returns true
|
||||
* if it is.
|
||||
*
|
||||
* @param {String} name
|
||||
* if it is.
|
||||
*
|
||||
* @param {String} name
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
function isInternal(name) {
|
||||
@@ -38,9 +38,9 @@ function isInternal(name) {
|
||||
|
||||
/**
|
||||
* Returns the plugin path for the given plugin name.
|
||||
*
|
||||
* @param {any} name
|
||||
* @returns
|
||||
*
|
||||
* @param {any} name
|
||||
* @returns
|
||||
*/
|
||||
function pluginPath(name) {
|
||||
if (isInternal(name)) {
|
||||
@@ -59,9 +59,9 @@ function itteratePlugins(plugins) {
|
||||
let plugin = {};
|
||||
|
||||
// This checks to see if the structure for this entry is an object:
|
||||
//
|
||||
//
|
||||
// {"people": "^1.2.0"}
|
||||
//
|
||||
//
|
||||
// otherwise it's checked whether it matches the local version:
|
||||
//
|
||||
// "people"
|
||||
|
||||
Reference in New Issue
Block a user