Documentation
    Preparing search index...

    Global registry and utility class for managing multiple storage backends. Follows the Quatrain Core convention of centralizing dependency access via aliases.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _storages: StorageBackendRegistry<any> = {}
    classRegistry: { [key: string]: any } = {}

    Dictionary holding registered active Quatrain models/components.

    defaultStorage: string = ''

    The fallback storage alias used when none is explicitly requested.

    defaultUpsert: boolean = true

    Global configuration flag to control whether uploads overwrite existing files by default (upsert).

    logger: any = ...

    Central logger scope dedicated to the Storage subsystem.

    logLevel: DEBUG = LogLevel.DEBUG

    System-wide base log verbosity.

    me: string = ...

    Identifying namespace for this core component.

    storage: typeof NodePersist = persist

    Persistent key-value storage engine reference.

    storagePrefix: "core" = 'core'

    Context prefix string for scoped storage keys.

    Accessors

    • get userClass(): any

      Returns any

    • set userClass(cls: any): void

      Parameters

      • cls: any

      Returns void

    Methods

    • Maps a specific entity class to an active name so the factory reflection can locate it.

      Parameters

      • name: string

        Semantic registry name.

      • obj: any

        Class constructor.

      Returns void

    • Stores a primitive value durably in the core storage instance.

      Parameters

      • key: string

        Identification string.

      • value: any

        Value.

      Returns Promise<void>

    • Injects a new logger block under a specific namespace alias.

      Parameters

      • alias: string = ...

        The logging context name.

      Returns any

      Instantiated LoggerAdapter.

    • Registers an instantiated storage adapter into the global registry.

      Parameters

      • adapter: AbstractStorageAdapter

        The initialized adapter (e.g. S3StorageAdapter).

      • alias: string

        The string identifier to register it under.

      • setDefault: boolean = false

        Whether this should become the global default backend.

      Returns void

    • Triggers a debug log on the core logger.

      Parameters

      • ...message: any

        Content to log.

      Returns void

    • Deprecated: Reserved schema definition hook.

      Parameters

      • key: string

        The property block to generate.

      Returns { manifest: { mandatory: boolean; type: StringConstructor } }

      Field definitions block.

    • Triggers an error log on the core logger.

      Parameters

      • ...message: any

        Content to log.

      Returns void

    • Returns an injected class constructor by its registry identifier.

      Parameters

      • name: string

        The semantic name to resolve.

      Returns any

      Class definition.

    • Recovers a durably persisted value from the storage layer.

      Parameters

      • key: string

        The target identifier.

      Returns Promise<any>

      The recovered value.

    • Retrieves a previously registered storage adapter by its alias.

      Type Parameters

      Parameters

      • alias: string = ...

        The target registry identifier. Defaults to defaultStorage.

      Returns T

      The adapter instance.

      If the alias is not registered.

    • Utility lookup to find executable paths in the system using which.

      Parameters

      • command: string

        The executable.

      Returns Promise<string>

      The resolved system path.

    • Triggers an info log on the core logger.

      Parameters

      • ...message: any

        Content to log.

      Returns void

    • Triggers a standard log on the core logger.

      Parameters

      • ...message: any

        Content to log.

      Returns void

    • Mutates the underlying verbosity constraints.

      Parameters

      Returns void

    • Execution suspension utility blocking the event loop context.

      Parameters

      • seconds: number = 1

        Duration count.

      Returns Promise<unknown>

      The promise to await.

    • Returns an ISO string representing the current time.

      Returns string

    • Triggers a trace log on the core logger.

      Parameters

      • ...message: any

        Content to log.

      Returns void

    • Triggers a warning log on the core logger.

      Parameters

      • ...message: any

        Content to log.

      Returns void