mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-10-07 22:57:07 +00:00
Remove Log and Database dependency injection
This commit is contained in:
@@ -1,15 +1,14 @@
|
||||
import { EventEmitter } from 'events'
|
||||
import PQueue from 'p-queue'
|
||||
import Sync from './sync.js'
|
||||
import { Log, Entry } from './oplog/index.js'
|
||||
import { ComposedStorage, LRUStorage, IPFSBlockStorage, LevelStorage } from './storage/index.js'
|
||||
import pathJoin from './utils/path-join.js'
|
||||
|
||||
const defaultReferencesCount = 16
|
||||
const defaultCacheSize = 1000
|
||||
|
||||
const Database = async ({ OpLog, ipfs, identity, address, name, access, directory, meta, headsStorage, entryStorage, indexStorage, referencesCount, syncAutomatically }) => {
|
||||
const { Log, Entry } = OpLog
|
||||
|
||||
const Database = async ({ ipfs, identity, address, name, access, directory, meta, headsStorage, entryStorage, indexStorage, referencesCount, syncAutomatically }) => {
|
||||
directory = pathJoin(directory || './orbitdb', `./${address}/`)
|
||||
meta = meta || {}
|
||||
referencesCount = referencesCount || defaultReferencesCount
|
||||
|
||||
Reference in New Issue
Block a user