Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,15 @@
}

async function loadPlugins ({ pluginTree, options, opts, fastify }) {
const nodes = []
const pluginsMeta = {}
for (const key in pluginTree) {
const node = {
...pluginTree[key],
pluginsMeta: {},
pluginsMeta,
hooksMeta: {}
}
nodes.push(node)

await Promise.all(node.plugins.map(({ file, type, prefix }) => {
return loadPlugin({ file, type, directoryPrefix: prefix, options: opts, log: fastify.log })
Expand All @@ -54,8 +57,11 @@
.catch((err) => {
throw enrichError(err)
})
}))

Check failure on line 60 in index.js

View workflow job for this annotation

GitHub Actions / test / Lint Code

Block must not be padded by blank lines

}

for (const node of nodes) {
registerNode(node, fastify)
}
}
Expand Down
Loading