mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-24 19:56:00 +00:00
frontend - removed references to dbgate-engines
This commit is contained in:
@@ -10,11 +10,21 @@ export function ExtensionsProvider({ children }) {
|
||||
return <ExtensionsContext.Provider value={extensions}>{children}</ExtensionsContext.Provider>;
|
||||
}
|
||||
|
||||
function buildDrivers(plugins) {
|
||||
const res = [];
|
||||
for (const { content } of plugins) {
|
||||
if (content.driver) res.push(content.driver);
|
||||
if (content.drivers) res.push(...content.drivers);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
export function buildExtensions(plugins) {
|
||||
/** @type {import('dbgate-types').ExtensionsDirectory} */
|
||||
const extensions = {
|
||||
plugins,
|
||||
fileFormats: buildFileFormats(plugins),
|
||||
drivers: buildDrivers(plugins),
|
||||
};
|
||||
return extensions;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user