mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-09 20:12:10 +10:00
FlatLibrary provider (#127)
This commit is contained in:
@ -2,10 +2,11 @@ import { LibraryBackend } from "~/prisma/client";
|
||||
import prisma from "../internal/db/database";
|
||||
import type { JsonValue } from "@prisma/client/runtime/library";
|
||||
import type { LibraryProvider } from "../internal/library/provider";
|
||||
import type { FilesystemProviderConfig } from "../internal/library/filesystem";
|
||||
import { FilesystemProvider } from "../internal/library/filesystem";
|
||||
import type { FilesystemProviderConfig } from "../internal/library/providers/filesystem";
|
||||
import { FilesystemProvider } from "../internal/library/providers/filesystem";
|
||||
import libraryManager from "../internal/library";
|
||||
import path from "path";
|
||||
import { FlatFilesystemProvider } from "../internal/library/providers/flat";
|
||||
|
||||
export const libraryConstructors: {
|
||||
[key in LibraryBackend]: (
|
||||
@ -19,6 +20,12 @@ export const libraryConstructors: {
|
||||
): LibraryProvider<unknown> {
|
||||
return new FilesystemProvider(value, id);
|
||||
},
|
||||
FlatFilesystem: function (
|
||||
value: JsonValue,
|
||||
id: string,
|
||||
): LibraryProvider<unknown> {
|
||||
return new FlatFilesystemProvider(value, id);
|
||||
},
|
||||
};
|
||||
|
||||
export default defineNitroPlugin(async () => {
|
||||
|
||||
Reference in New Issue
Block a user