Skip to content
Classplugin-mongoosev0.5.4

Mongoose

MongoDB integration plugin for Seedcord.

Manages MongoDB connections, service loading, and provides type-safe access to database services through service registration decorators.

class Mongoose extends Plugin<{
    transport: "any";
    runtime: "server";
}>

Member visibility

Filter class members by access level.

Showing members with Protected visibility and higher.

connection

Exposed Mongoose instance once init completes.

public connection: Mongoose

core

The host, typed to the transport whose Plugin base this class extends.

protected core: TCore

Inherited from:Plugin

logger

Logs under the plugin's class name, on the channel its attach key sets.

protected readonly logger: Logger

Inherited from:Plugin

services

Map of all loaded services. Keys come from @RegisterMongooseService('key').

public get services(): MongooseServices

Throws:

A SeedcordError if accessed before the plugin finishes initializing.

dispose()

public override async dispose(): Promise<void>

ready()

Runs in the Ready phase, after every attached plugin's init() has resolved. The other Ready tasks run alongside it, including the http server binding its port.

Override it when your work needs a logged-in client or a resolved application id.

async ready?(): Promise<void>

Inherited from:Plugin

registerCriticalFiles()

Registers critical file patterns that should trigger a full restart when changed in Dev HMR.

protected registerCriticalFiles(
    patterns: string[]
): void
Parameter: patterns

Glob patterns relative to the project root

Inherited from:Plugin

rejectOptions()

Throws a SeedcordError that contains the plugin class name and the reason.

protected rejectOptions(reason: string): never
Parameter: reason

Why the options are invalid.

Inherited from:Plugin