diff --git a/.eslintrc b/.eslintrc index 85ab771b..44a8d5ac 100644 --- a/.eslintrc +++ b/.eslintrc @@ -28,6 +28,17 @@ "no-constant-condition": 0, "no-useless-escape": 0, "no-console": "error", + "no-restricted-globals": [ + "error", + { + "name": "global", + "message": "Use `globalThis` instead" + }, + { + "name": "window", + "message": "Use `globalThis` instead" + } + ], "require-yield": 0, "eqeqeq": ["error", "smart"], "spaced-comment": [ @@ -39,7 +50,8 @@ }, "block": { "exceptions": ["*"] - } + }, + "markers": ["/"] } ], "capitalized-comments": [ @@ -80,7 +92,8 @@ ], "pathGroupsExcludedImportTypes": [ "type" - ] + ], + "newlines-between": "never" } ], "@typescript-eslint/no-namespace": 0, @@ -102,7 +115,7 @@ "@typescript-eslint/consistent-type-imports": ["error"], "@typescript-eslint/consistent-type-exports": ["error"], "no-throw-literal": "off", - "@typescript-eslint/no-throw-literal": ["error"], + "@typescript-eslint/no-throw-literal": "off", "@typescript-eslint/no-floating-promises": ["error", { "ignoreVoid": true, "ignoreIIFE": true diff --git a/.github/workflows/codesee-arch-diagram.yml b/.github/workflows/codesee-arch-diagram.yml index 63c68485..80f58e63 100644 --- a/.github/workflows/codesee-arch-diagram.yml +++ b/.github/workflows/codesee-arch-diagram.yml @@ -1,7 +1,9 @@ +# This workflow was added by CodeSee. Learn more at https://codesee.io/ +# This is v2.0 of this workflow file on: push: branches: - - master + - staging pull_request_target: types: [opened, synchronize, reopened] @@ -18,3 +20,4 @@ jobs: - uses: Codesee-io/codesee-action@v2 with: codesee-token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }} + codesee-url: https://app.codesee.io diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a38c5a36..3f96e07f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -184,7 +184,7 @@ build:windows: - ./scripts/choco-install.ps1 - refreshenv - npm install --ignore-scripts - - $env:Path = "$(npm bin);" + $env:Path + - $env:Path = "$(npm root)\.bin;" + $env:Path - npm run prebuild --verbose - npm test -- --ci --coverage - npm run bench @@ -221,7 +221,7 @@ build:macos: - ./scripts/brew-install.sh - hash -r - npm install --ignore-scripts - - export PATH="$(npm bin):$PATH" + - export PATH="$(npm root)/.bin:$PATH" - npm run prebuild --verbose - npm test -- --ci --coverage - npm run bench diff --git a/benches/results/db_1KiB.chart.html b/benches/results/db_1KiB.chart.html index 003f2201..c29540ff 100644 --- a/benches/results/db_1KiB.chart.html +++ b/benches/results/db_1KiB.chart.html @@ -28,7 +28,7 @@
- +
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • CreateDestroyStartStop
    • DB

Index

Constructors

  • new DB(__namedParameters: { dbPath: string; fs: FileSystem; logger: Logger }): DB
  • Parameters

    • __namedParameters: { dbPath: string; fs: FileSystem; logger: Logger }

    Returns DB

Properties

[initLock]: RWLockWriter
_iteratorRefs: Set<DBIterator<any, any>> = ...
-

References to iterators

-
_lockBox: LockBox<RWLockWriter> = ...
_transactionRefs: Set<DBTransaction> = ...
-

References to transactions

-
crypto?: { key: Buffer; ops: Crypto }

Type declaration

dbPath: string
logger: Logger
workerManager?: DBWorkerManagerInterface

Accessors

  • get [destroyed](): boolean
  • Returns boolean

  • get [running](): boolean
  • Returns boolean

  • get [status](): Status
  • Returns Status

  • get lockBox(): Readonly<LockBox<RWLockWriter>>

Methods

  • batch(ops: readonly DBOp[], sync?: boolean): Promise<void>
  • -

    Batches operations together atomically

    -

    Parameters

    • ops: readonly DBOp[]
    • sync: boolean = false

    Returns Promise<void>

  • canaryCheck(): Promise<void>
  • -

    Clear all key values for a specific level +DB | @matrixai/db

    +
    + +
    +
    +
    +
    + +

    Class DB

    +
    +

    Hierarchy

    +
      +
    • CreateDestroyStartStop +
        +
      • DB
    +
    +
    +
    + +
    +
    +

    Constructors

    +
    + +
      + +
    • +
      +

      Parameters

      +
        +
      • +
        __namedParameters: {
            dbPath: string;
            deadlock: boolean;
            fs: FileSystem;
            logger: Logger;
        }
        +
          +
        • +
          dbPath: string
        • +
        • +
          deadlock: boolean
        • +
        • +
          fs: FileSystem
        • +
        • +
          logger: Logger
      +

      Returns DB

    +
    +

    Properties

    +
    + +
    [initLock]: RWLockWriter
    +
    + +
    +
    + +
    _iteratorRefs: Set<DBIterator<any, any>> = ...
    +

    References to iterators

    +
    +
    + +
    _lockBox: LockBox<RWLockWriter> = ...
    +
    + +
    _locksPending?: Map<string, {
        count: number;
    }>
    +
    + +
    _transactionRefs: Set<DBTransaction> = ...
    +

    References to transactions

    +
    +
    + +
    crypto?: {
        key: Buffer;
        ops: Crypto;
    }
    +
    +

    Type declaration

    +
      +
    • +
      key: Buffer
    • +
    • +
      ops: Crypto
    +
    + +
    dbPath: string
    +
    + +
    +
    + +
    logger: Logger
    +
    + +
    workerManager?: DBWorkerManagerInterface
    +
    +

    Accessors

    +
    + +
      +
    • get [destroyed](): boolean
    • +
    • +

      Returns boolean

    +
    + +
      +
    • get [running](): boolean
    • +
    • +

      Returns boolean

    +
    + +
      +
    • get [status](): Status
    • +
    • +

      Returns Status

    +
    + +
    +
    + +
      +
    • get lockBox(): Readonly<LockBox<RWLockWriter>>
    • +
    • +

      Returns Readonly<LockBox<RWLockWriter>>

    +
    +

    Methods

    +
    + +
      + +
    • +

      Batches operations together atomically

      +
      +
      +

      Parameters

      +
        +
      • +
        ops: readonly DBOp[]
      • +
      • +
        sync: boolean = false
      +

      Returns Promise<void>

    +
    + +
      + +
    • +

      Returns Promise<void>

    +
    + +
      + +
    • +

      Clear all key values for a specific level This is not atomic, it will iterate over a snapshot of the DB

      -

    Parameters

    Returns Promise<void>

  • del(keyPath: string | Buffer | readonly (string | Buffer)[], sync?: boolean): Promise<void>
  • -

    Deletes a key from the DB

    -

    Parameters

    • keyPath: string | Buffer | readonly (string | Buffer)[]
    • sync: boolean = false

    Returns Promise<void>

  • deserializeDecrypt<T>(cipherTextBuf: Buffer, raw: false): Promise<T>
  • deserializeDecrypt(cipherTextBuf: Buffer, raw: true): Promise<Buffer>
  • Type parameters

    • T

    Parameters

    • cipherTextBuf: Buffer
    • raw: false

    Returns Promise<T>

  • Parameters

    • cipherTextBuf: Buffer
    • raw: true

    Returns Promise<Buffer>

  • destroy(): Promise<void>
  • Returns Promise<void>

  • dump<V>(levelPath?: readonly (string | Buffer)[], raw?: false, root?: boolean): Promise<[readonly (string | Buffer)[], V][]>
  • dump(levelPath: undefined | readonly (string | Buffer)[], raw: true, root?: boolean): Promise<[readonly (string | Buffer)[], Buffer][]>
+
+ +
+
+ +
    + +
  • +

    Deletes a key from the DB

    +
    +
    +

    Parameters

    +
      +
    • +
      keyPath: string | Buffer | readonly (string | Buffer)[]
    • +
    • +
      sync: boolean = false
    +

    Returns Promise<void>

+
+ +
    + +
  • +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Parameters

    +
      +
    • +
      cipherTextBuf: Buffer
    • +
    • +
      raw: false
    +

    Returns Promise<T>

  • + +
  • +
    +

    Parameters

    +
      +
    • +
      cipherTextBuf: Buffer
    • +
    • +
      raw: true
    +

    Returns Promise<Buffer>

+
+ +
    + +
  • +

    Returns Promise<void>

+
+ +
    + +
  • +

    Dump from DB This will show entries from all levels It is intended for diagnostics Use console.dir instead of console.log to debug the result Set root to true if you want to dump from root levels

    -

Type parameters

Parameters

Returns Promise<[readonly (string | Buffer)[], V][]>

  • Parameters

    • levelPath: undefined | readonly (string | Buffer)[]
    • raw: true
    • Optional root: boolean

    Returns Promise<[readonly (string | Buffer)[], Buffer][]>

    • get<T>(keyPath: string | Buffer | readonly (string | Buffer)[], raw?: false): Promise<undefined | T>
    • get(keyPath: string | Buffer | readonly (string | Buffer)[], raw: true): Promise<undefined | Buffer>
    • -

      Gets a value from the DB +

      +
      +

      Type Parameters

      +
        +
      • +

        V

      +
      +

      Parameters

      +
        +
      • +
        Optional levelPath: readonly (string | Buffer)[]
      • +
      • +
        Optional raw: false
      • +
      • +
        Optional root: boolean
      +

      Returns Promise<[readonly (string | Buffer)[], V][]>

    • + +
    • +
      +

      Parameters

      +
        +
      • +
        levelPath: undefined | readonly (string | Buffer)[]
      • +
      • +
        raw: true
      • +
      • +
        Optional root: boolean
      +

      Returns Promise<[readonly (string | Buffer)[], Buffer][]>

    +
    + +
      + +
    • +

      Gets a value from the DB Use raw to return the raw decrypted buffer

      -

    Type parameters

    Parameters

    Returns Promise<undefined | T>

  • Parameters

    Returns Promise<undefined | Buffer>

  • +
    + +

    Parameters

    Returns DBIterator<undefined, undefined>

  • Type parameters

    Parameters

    Returns DBIterator<undefined, V>

  • Parameters

    Returns DBIterator<undefined, Buffer>

  • Parameters

    Returns DBIterator<readonly (string | Buffer)[], undefined>

  • Type parameters

    Parameters

    Returns DBIterator<readonly (string | Buffer)[], V>

  • Parameters

    Returns DBIterator<readonly (string | Buffer)[], Buffer>

  • +
    + +

    Generated using TypeDoc

    \ No newline at end of file + +
    +

    Parameters

    +
    +

    Returns Promise<void>

    + +
  • +
    +

    Parameters

    +
    +

    Returns Promise<void>

  • +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    + +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/classes/DBIterator.html b/docs/classes/DBIterator.html index d6921c12..8ab79f9e 100644 --- a/docs/classes/DBIterator.html +++ b/docs/classes/DBIterator.html @@ -1 +1,348 @@ -DBIterator | @matrixai/db
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class DBIterator<K, V>

    Type parameters

    Hierarchy

    • CreateDestroy
      • DBIterator

    Index

    Constructors

    Properties

    [initLock]: RWLockWriter
    _db: DB
    _iterator: RocksDBIterator<Buffer, Buffer>
    _options: Merge<DBIteratorOptions<any>, { gt?: Buffer; gte?: Buffer; keyEncoding: "buffer"; lt?: Buffer; lte?: Buffer; valueEncoding: "buffer" }>
    _transaction?: DBTransaction
    cache: [Buffer, Buffer][] = []
    cachePos: number = 0
    finished: boolean = false
    first: boolean = true
    levelPath: readonly (string | Buffer)[]
    lock: Lock = ...
    logger: Logger

    Accessors

    • get [destroyed](): boolean
    • Returns boolean

    • get [status](): Status
    • Returns Status

    • get db(): Readonly<DB>

    Methods

    • [asyncIterator](): AsyncGenerator<[K, V], void, void>
    • _next(): Promise<undefined | [K, V]>
    • destroy(): Promise<void>
    • next(): Promise<undefined | [K, V]>
    • processEntry(entry: [Buffer, Buffer]): Promise<[K, V]>
    • seek(keyPath: string | Buffer | readonly (string | Buffer)[]): void
    • Parameters

      • keyPath: string | Buffer | readonly (string | Buffer)[]

      Returns void

    Generated using TypeDoc

    \ No newline at end of file +DBIterator | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Class DBIterator<K, V>

    +
    +

    Type Parameters

    +
      +
    • +

      K extends KeyPath | undefined

    • +
    • +

      V

    +
    +

    Hierarchy

    +
      +
    • CreateDestroy +
        +
      • DBIterator
    +
    +
    +
    + +
    +
    +

    Constructors

    +
    + +
    +
    +

    Properties

    +
    + +
    [initLock]: RWLockWriter
    +
    + +
    _db: DB
    +
    + +
    _iterator: RocksDBIterator<Buffer, Buffer>
    +
    + +
    _options: Merge<DBIteratorOptions<any>, {
        gt?: Buffer;
        gte?: Buffer;
        keyEncoding: "buffer";
        lt?: Buffer;
        lte?: Buffer;
        valueEncoding: "buffer";
    }>
    +
    + +
    _transaction?: DBTransaction
    +
    + +
    cache: [Buffer, Buffer][] = []
    +
    + +
    cachePos: number = 0
    +
    + +
    finished: boolean = false
    +
    + +
    first: boolean = true
    +
    + +
    levelPath: readonly (string | Buffer)[]
    +
    + +
    lock: Lock = ...
    +
    + +
    logger: Logger
    +
    +

    Accessors

    +
    + +
      +
    • get [destroyed](): boolean
    • +
    • +

      Returns boolean

    +
    + +
      +
    • get [status](): Status
    • +
    • +

      Returns Status

    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +

    Methods

    +
    + +
      + +
    • +

      Returns AsyncGenerator<[K, V], void, void>

    +
    + +
      + +
    • +

      Returns Promise<undefined | [K, V]>

    +
    + +
      + +
    • +

      Returns Promise<void>

    +
    + +
      + +
    • +

      Returns Promise<undefined | [K, V]>

    +
    + +
      + +
    • +
      +

      Parameters

      +
        +
      • +
        entry: [Buffer, Buffer]
      +

      Returns Promise<[K, V]>

    +
    + +
      + +
    • +
      +

      Parameters

      +
        +
      • +
        keyPath: string | Buffer | readonly (string | Buffer)[]
      +

      Returns void

    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/classes/DBTransaction.html b/docs/classes/DBTransaction.html index 9a6b5e1c..027bbeeb 100644 --- a/docs/classes/DBTransaction.html +++ b/docs/classes/DBTransaction.html @@ -1,47 +1,798 @@ -DBTransaction | @matrixai/db
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class DBTransaction

    Hierarchy

    • CreateDestroy
      • DBTransaction

    Index

    Constructors

    Properties

    [initLock]: RWLockWriter
    _callbacksFailure: ((e?: Error) => any)[] = []
    _callbacksFinally: ((e?: Error) => any)[] = []
    _callbacksSuccess: (() => any)[] = []
    _committed: boolean = false
    _committing: boolean = false
    _db: DB
    _iteratorRefs: Set<DBIterator<any, any>> = ...
    _locks: Map<string, { lock: RWLockWriter; release: ResourceRelease; type: "read" | "write" }> = ...
    _rollbacked: boolean = false
    _rollbacking: boolean = false
    _transaction: RocksDBTransaction
    commitOrRollbackLock: Lock = ...
    id: number
    lockBox: LockBox<RWLockWriter>
    logger: Logger

    Accessors

    • get [destroyed](): boolean
    • Returns boolean

    • get [status](): Status
    • Returns Status

    • get callbacksFailure(): readonly (() => any)[]
    • get callbacksFinally(): readonly (() => any)[]
    • get callbacksSuccess(): readonly (() => any)[]
    • get committed(): boolean
    • get committing(): boolean
    • get db(): Readonly<DB>
    • get locks(): ReadonlyMap<string, { lock: RWLockWriter; release: ResourceRelease; type: "read" | "write" }>
    • Returns ReadonlyMap<string, { lock: RWLockWriter; release: ResourceRelease; type: "read" | "write" }>

    • get rollbacked(): boolean
    • get rollbacking(): boolean

    Methods

    • commit(): Promise<void>
    • del(keyPath: string | Buffer | readonly (string | Buffer)[]): Promise<void>
    • Parameters

      • keyPath: string | Buffer | readonly (string | Buffer)[]

      Returns Promise<void>

    • destroy(): Promise<void>
    • dump<V>(levelPath?: readonly (string | Buffer)[], raw?: false): Promise<[readonly (string | Buffer)[], V][]>
    • dump(levelPath: undefined | readonly (string | Buffer)[], raw: true): Promise<[readonly (string | Buffer)[], Buffer][]>
    +
    + +
      + +
    • +

      Dump from transaction level path This will only show entries for the current transaction It is intended for diagnostics

      -

    Type parameters

    Parameters

    Returns Promise<[readonly (string | Buffer)[], V][]>

  • Parameters

    • levelPath: undefined | readonly (string | Buffer)[]
    • raw: true

    Returns Promise<[readonly (string | Buffer)[], Buffer][]>

    • get<T>(keyPath: string | Buffer | readonly (string | Buffer)[], raw?: false): Promise<undefined | T>
    • get(keyPath: string | Buffer | readonly (string | Buffer)[], raw: true): Promise<undefined | Buffer>
    • Type parameters

      • T

      Parameters

      • keyPath: string | Buffer | readonly (string | Buffer)[]
      • Optional raw: false

      Returns Promise<undefined | T>

    • Parameters

      • keyPath: string | Buffer | readonly (string | Buffer)[]
      • raw: true

      Returns Promise<undefined | Buffer>

    • getForUpdate<T>(keyPath: string | Buffer | readonly (string | Buffer)[], raw?: false): Promise<undefined | T>
    • getForUpdate(keyPath: string | Buffer | readonly (string | Buffer)[], raw: true): Promise<undefined | Buffer>
    • -

      Use this for to address write skews

      -

      Type parameters

      • T

      Parameters

      • keyPath: string | Buffer | readonly (string | Buffer)[]
      • Optional raw: false

      Returns Promise<undefined | T>

    • Parameters

      • keyPath: string | Buffer | readonly (string | Buffer)[]
      • raw: true

      Returns Promise<undefined | Buffer>

    • lock(...requests: (ToString | [key: ToString, type?: "read" | "write", timeout?: number])[]): Promise<void>
    • -

      Lock a sequence of lock requests -If the lock request doesn't specify, it -defaults to using RWLockWriter with write type -Keys are locked in string sorted order -Even though keys can be arbitrary strings, by convention, you should use -keys that correspond to keys in the database -Locking with the same key is idempotent therefore lock re-entrancy is enabled -Keys are automatically unlocked in reverse sorted order -when the transaction is destroyed -There is no support for lock upgrading or downgrading -There is no deadlock detection

      -

      Parameters

      • Rest ...requests: (ToString | [key: ToString, type?: "read" | "write", timeout?: number])[]

      Returns Promise<void>

    • put(keyPath: string | Buffer | readonly (string | Buffer)[], value: any, raw?: false): Promise<void>
    • put(keyPath: string | Buffer | readonly (string | Buffer)[], value: Buffer, raw: true): Promise<void>
    • Parameters

      • keyPath: string | Buffer | readonly (string | Buffer)[]
      • value: any
      • Optional raw: false

      Returns Promise<void>

    • Parameters

      • keyPath: string | Buffer | readonly (string | Buffer)[]
      • value: Buffer
      • raw: true

      Returns Promise<void>

    • queueFailure(f: (e?: Error) => any): void
    • Parameters

      • f: (e?: Error) => any
          • (e?: Error): any
          • Parameters

            • Optional e: Error

            Returns any

      Returns void

    • queueFinally(f: (e?: Error) => any): void
    • Parameters

      • f: (e?: Error) => any
          • (e?: Error): any
          • Parameters

            • Optional e: Error

            Returns any

      Returns void

    • queueSuccess(f: () => any): void
    • rollback(e?: Error): Promise<void>
    • setSnapshot(): void
    • -

      Set the snapshot manually +

      +
      +

      Type Parameters

      +
        +
      • +

        V

      +
      +

      Parameters

      +
        +
      • +
        Optional levelPath: readonly (string | Buffer)[]
      • +
      • +
        Optional raw: false
      +

      Returns Promise<[readonly (string | Buffer)[], V][]>

    • + +
    • +
      +

      Parameters

      +
        +
      • +
        levelPath: undefined | readonly (string | Buffer)[]
      • +
      • +
        raw: true
      +

      Returns Promise<[readonly (string | Buffer)[], Buffer][]>

    +
    + +
      + +
    • +
      +

      Type Parameters

      +
        +
      • +

        T

      +
      +

      Parameters

      +
        +
      • +
        keyPath: string | Buffer | readonly (string | Buffer)[]
      • +
      • +
        Optional raw: false
      +

      Returns Promise<undefined | T>

    • + +
    • +
      +

      Parameters

      +
        +
      • +
        keyPath: string | Buffer | readonly (string | Buffer)[]
      • +
      • +
        raw: true
      +

      Returns Promise<undefined | Buffer>

    +
    + +
      + +
    • +

      Use this for to address write skews

      +
      +
      +

      Type Parameters

      +
        +
      • +

        T

      +
      +

      Parameters

      +
        +
      • +
        keyPath: string | Buffer | readonly (string | Buffer)[]
      • +
      • +
        Optional raw: false
      +

      Returns Promise<undefined | T>

    • + +
    • +
      +

      Parameters

      +
        +
      • +
        keyPath: string | Buffer | readonly (string | Buffer)[]
      • +
      • +
        raw: true
      +

      Returns Promise<undefined | Buffer>

    +
    + +
    +
    + +
      + +
    • +
      +

      Parameters

      +
        +
      • +
        Rest ...params: (string | RWLockRequest)[] | [...requests: (string | RWLockRequest)[], ctx: Partial<ContextTimedInput>] | [ctx?: Partial<ContextTimedInput>]
      +

      Returns Promise<void>

    +
    + +
      + +
    • +
      +

      Parameters

      +
        +
      • +
        keyPath: string | Buffer | readonly (string | Buffer)[]
      • +
      • +
        value: any
      • +
      • +
        Optional raw: false
      +

      Returns Promise<void>

    • + +
    • +
      +

      Parameters

      +
        +
      • +
        keyPath: string | Buffer | readonly (string | Buffer)[]
      • +
      • +
        value: Buffer
      • +
      • +
        raw: true
      +

      Returns Promise<void>

    +
    + +
      + +
    • +
      +

      Parameters

      +
        +
      • +
        f: ((e?: Error) => any)
        +
          +
        • +
            +
          • (e?: Error): any
          • +
          • +
            +

            Parameters

            +
              +
            • +
              Optional e: Error
            +

            Returns any

      +

      Returns void

    +
    + +
      + +
    • +
      +

      Parameters

      +
        +
      • +
        f: ((e?: Error) => any)
        +
          +
        • +
            +
          • (e?: Error): any
          • +
          • +
            +

            Parameters

            +
              +
            • +
              Optional e: Error
            +

            Returns any

      +

      Returns void

    +
    + +
      + +
    • +
      +

      Parameters

      +
        +
      • +
        f: (() => any)
        +
          +
        • +
            +
          • (): any
          • +
          • +

            Returns any

      +

      Returns void

    +
    + +
      + +
    • +
      +

      Parameters

      +
        +
      • +
        Optional e: Error
      +

      Returns Promise<void>

    +
    + +
      + +
    • +

      Set the snapshot manually This ensures that consistent reads and writes start after this method is executed This is idempotent Note that normally snapshots are set lazily upon the first transaction db operation

      -

    Returns void

    +
    + +

    Returns RocksDBTransactionSnapshot

    Generated using TypeDoc

    \ No newline at end of file + +

    Returns RocksDBTransactionSnapshot

    +
    + +
    + +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/classes/errors.ErrorDB.html b/docs/classes/errors.ErrorDB.html index 5846576a..eb7f7043 100644 --- a/docs/classes/errors.ErrorDB.html +++ b/docs/classes/errors.ErrorDB.html @@ -1,29 +1,307 @@ -ErrorDB | @matrixai/db
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class ErrorDB<T>

    Type parameters

    • T

    Hierarchy

    Index

    Constructors

    • new ErrorDB<T>(message?: string, options?: { cause?: T; data?: POJO; timestamp?: Date }): ErrorDB<T>
    • Type parameters

      • T

      Parameters

      • Optional message: string
      • Optional options: { cause?: T; data?: POJO; timestamp?: Date }
        • Optional cause?: T
        • Optional data?: POJO
        • Optional timestamp?: Date

      Returns ErrorDB<T>

    Properties

    cause: T
    -

    Causation of the exception +ErrorDB | @matrixai/db

    +
    + +
    +
    +
    +
    + +

    Class ErrorDB<T>

    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Hierarchy

    +
    +
    +
    +
    + +
    +
    +

    Constructors

    +
    +
    +

    Properties

    +
    +
    +

    Accessors

    +
    +
    +

    Methods

    +
    +
    +

    Constructors

    +
    + +
      + +
    • +
      +

      Type Parameters

      +
        +
      • +

        T

      +
      +

      Parameters

      +
        +
      • +
        Optional message: string
      • +
      • +
        Optional options: {
            cause?: T;
            data?: POJO;
            timestamp?: Date;
        }
        +
          +
        • +
          Optional cause?: T
        • +
        • +
          Optional data?: POJO
        • +
        • +
          Optional timestamp?: Date
      +

      Returns ErrorDB<T>

    +
    +

    Properties

    +
    + +
    cause: T
    +

    Causation of the exception Can be used to know what caused this exception

    -
    data: POJO
    -

    Arbitrary data

    -
    message: string
    name: string
    stack?: string
    timestamp: Date
    -

    Timestamp when exception was constructed in milliseconds -May contain microseconds in the fractional part +

    +
    + +
    data: POJO
    +

    Arbitrary data

    +
    +
    + +
    message: string
    +
    + +
    name: string
    +
    + +
    stack?: string
    +
    + +
    timestamp: Date
    +

    Timestamp when exception was constructed in milliseconds Guaranteed to be weakly monotonic

    -
    description: string = 'DB error'
    prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

    Type declaration

    stackTraceLimit: number

    Accessors

    • get description(): string
    • Returns string

    Methods

    • toJSON(): any
    • -

      Encoding to JSON pojo +

    +
    + +
    description: string = 'DB error'
    +
    + +
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)
    +
    +

    Type declaration

    +
    +
    + +
    stackTraceLimit: number
    +
    +

    Accessors

    +
    + +
      +
    • get description(): string
    • +
    • +

      Returns string

    +
    +

    Methods

    +
    + +
      + +
    • +

      Encoding to JSON pojo When overriding this, you can use super.toJSON The replacer will:

      • delete undefined values in objects
      • replace undefined values for null in arrays
      -

    Returns any

    +
    + +
    +
    + +

    Type parameters

    Parameters

    Returns InstanceType<T>

    Generated using TypeDoc

    \ No newline at end of file + +
    +

    Type Parameters

    +
    +
    +

    Parameters

    +
    +

    Returns InstanceType<T>

    + +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/classes/errors.ErrorDBCreate.html b/docs/classes/errors.ErrorDBCreate.html index 263e73bf..431b6d53 100644 --- a/docs/classes/errors.ErrorDBCreate.html +++ b/docs/classes/errors.ErrorDBCreate.html @@ -1,29 +1,295 @@ -ErrorDBCreate | @matrixai/db
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class ErrorDBCreate<T>

    Type parameters

    • T

    Hierarchy

    Index

    Constructors

    • new ErrorDBCreate<T>(message?: string, options?: { cause?: T; data?: POJO; timestamp?: Date }): ErrorDBCreate<T>
    • Type parameters

      • T

      Parameters

      • Optional message: string
      • Optional options: { cause?: T; data?: POJO; timestamp?: Date }
        • Optional cause?: T
        • Optional data?: POJO
        • Optional timestamp?: Date

      Returns ErrorDBCreate<T>

    Properties

    cause: T
    -

    Causation of the exception +ErrorDBCreate | @matrixai/db

    +
    + +
    +
    +
    +
    + +

    Class ErrorDBCreate<T>

    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Hierarchy

    +
    +
    +
    +
    + +
    +
    +

    Constructors

    +
    +
    +

    Properties

    +
    +
    +

    Accessors

    +
    +
    +

    Methods

    +
    +
    +

    Constructors

    +
    + +
      + +
    • +
      +

      Type Parameters

      +
        +
      • +

        T

      +
      +

      Parameters

      +
        +
      • +
        Optional message: string
      • +
      • +
        Optional options: {
            cause?: T;
            data?: POJO;
            timestamp?: Date;
        }
        +
          +
        • +
          Optional cause?: T
        • +
        • +
          Optional data?: POJO
        • +
        • +
          Optional timestamp?: Date
      +

      Returns ErrorDBCreate<T>

    +
    +

    Properties

    +
    + +
    cause: T
    +

    Causation of the exception Can be used to know what caused this exception

    -
    data: POJO
    -

    Arbitrary data

    -
    message: string
    name: string
    stack?: string
    timestamp: Date
    -

    Timestamp when exception was constructed in milliseconds -May contain microseconds in the fractional part +

    +
    + +
    data: POJO
    +

    Arbitrary data

    +
    +
    + +
    message: string
    +
    + +
    name: string
    +
    + +
    stack?: string
    +
    + +
    timestamp: Date
    +

    Timestamp when exception was constructed in milliseconds Guaranteed to be weakly monotonic

    -
    description: string = 'DB cannot be created'
    prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

    Type declaration

    stackTraceLimit: number

    Accessors

    • get description(): string
    • Returns string

    Methods

    • toJSON(): any
    • -

      Encoding to JSON pojo +

    +
    + +
    description: string = 'DB cannot be created'
    +
    + +
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)
    +
    +

    Type declaration

    +
    +
    + +
    stackTraceLimit: number
    +
    +

    Accessors

    +
    + +
      +
    • get description(): string
    • +
    • +

      Returns string

    +
    +

    Methods

    +
    + +
      + +
    • +

      Encoding to JSON pojo When overriding this, you can use super.toJSON The replacer will:

      • delete undefined values in objects
      • replace undefined values for null in arrays
      -

    Returns any

    +
    + +
    +
    + +

    Type parameters

    Parameters

    Returns InstanceType<T>

    Generated using TypeDoc

    \ No newline at end of file + +
    +

    Type Parameters

    +
    +
    +

    Parameters

    +
    +

    Returns InstanceType<T>

    + +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/classes/errors.ErrorDBDecrypt.html b/docs/classes/errors.ErrorDBDecrypt.html index 631d8b64..8d7f8b10 100644 --- a/docs/classes/errors.ErrorDBDecrypt.html +++ b/docs/classes/errors.ErrorDBDecrypt.html @@ -1,29 +1,295 @@ -ErrorDBDecrypt | @matrixai/db
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class ErrorDBDecrypt<T>

    Type parameters

    • T

    Hierarchy

    Index

    Constructors

    • new ErrorDBDecrypt<T>(message?: string, options?: { cause?: T; data?: POJO; timestamp?: Date }): ErrorDBDecrypt<T>
    • Type parameters

      • T

      Parameters

      • Optional message: string
      • Optional options: { cause?: T; data?: POJO; timestamp?: Date }
        • Optional cause?: T
        • Optional data?: POJO
        • Optional timestamp?: Date

      Returns ErrorDBDecrypt<T>

    Properties

    cause: T
    -

    Causation of the exception +ErrorDBDecrypt | @matrixai/db

    +
    + +
    +
    +
    +
    + +

    Class ErrorDBDecrypt<T>

    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Hierarchy

    +
    +
    +
    +
    + +
    +
    +

    Constructors

    +
    +
    +

    Properties

    +
    +
    +

    Accessors

    +
    +
    +

    Methods

    +
    +
    +

    Constructors

    +
    + +
      + +
    • +
      +

      Type Parameters

      +
        +
      • +

        T

      +
      +

      Parameters

      +
        +
      • +
        Optional message: string
      • +
      • +
        Optional options: {
            cause?: T;
            data?: POJO;
            timestamp?: Date;
        }
        +
          +
        • +
          Optional cause?: T
        • +
        • +
          Optional data?: POJO
        • +
        • +
          Optional timestamp?: Date
      +

      Returns ErrorDBDecrypt<T>

    +
    +

    Properties

    +
    + +
    cause: T
    +

    Causation of the exception Can be used to know what caused this exception

    -
    data: POJO
    -

    Arbitrary data

    -
    message: string
    name: string
    stack?: string
    timestamp: Date
    -

    Timestamp when exception was constructed in milliseconds -May contain microseconds in the fractional part +

    +
    + +
    data: POJO
    +

    Arbitrary data

    +
    +
    + +
    message: string
    +
    + +
    name: string
    +
    + +
    stack?: string
    +
    + +
    timestamp: Date
    +

    Timestamp when exception was constructed in milliseconds Guaranteed to be weakly monotonic

    -
    description: string = 'DB failed decryption'
    prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

    Type declaration

    stackTraceLimit: number

    Accessors

    • get description(): string
    • Returns string

    Methods

    • toJSON(): any
    • -

      Encoding to JSON pojo +

    +
    + +
    description: string = 'DB failed decryption'
    +
    + +
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)
    +
    +

    Type declaration

    +
    +
    + +
    stackTraceLimit: number
    +
    +

    Accessors

    +
    + +
      +
    • get description(): string
    • +
    • +

      Returns string

    +
    +

    Methods

    +
    + +
      + +
    • +

      Encoding to JSON pojo When overriding this, you can use super.toJSON The replacer will:

      • delete undefined values in objects
      • replace undefined values for null in arrays
      -

    Returns any

    +
    + +
    +
    + +

    Type parameters

    Parameters

    Returns InstanceType<T>

    Generated using TypeDoc

    \ No newline at end of file + +
    +

    Type Parameters

    +
    +
    +

    Parameters

    +
    +

    Returns InstanceType<T>

    + +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/classes/errors.ErrorDBDelete.html b/docs/classes/errors.ErrorDBDelete.html index 11776877..e8af11c3 100644 --- a/docs/classes/errors.ErrorDBDelete.html +++ b/docs/classes/errors.ErrorDBDelete.html @@ -1,29 +1,295 @@ -ErrorDBDelete | @matrixai/db
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class ErrorDBDelete<T>

    Type parameters

    • T

    Hierarchy

    Index

    Constructors

    • new ErrorDBDelete<T>(message?: string, options?: { cause?: T; data?: POJO; timestamp?: Date }): ErrorDBDelete<T>
    • Type parameters

      • T

      Parameters

      • Optional message: string
      • Optional options: { cause?: T; data?: POJO; timestamp?: Date }
        • Optional cause?: T
        • Optional data?: POJO
        • Optional timestamp?: Date

      Returns ErrorDBDelete<T>

    Properties

    cause: T
    -

    Causation of the exception +ErrorDBDelete | @matrixai/db

    +
    + +
    +
    +
    +
    + +

    Class ErrorDBDelete<T>

    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Hierarchy

    +
    +
    +
    +
    + +
    +
    +

    Constructors

    +
    +
    +

    Properties

    +
    +
    +

    Accessors

    +
    +
    +

    Methods

    +
    +
    +

    Constructors

    +
    + +
      + +
    • +
      +

      Type Parameters

      +
        +
      • +

        T

      +
      +

      Parameters

      +
        +
      • +
        Optional message: string
      • +
      • +
        Optional options: {
            cause?: T;
            data?: POJO;
            timestamp?: Date;
        }
        +
          +
        • +
          Optional cause?: T
        • +
        • +
          Optional data?: POJO
        • +
        • +
          Optional timestamp?: Date
      +

      Returns ErrorDBDelete<T>

    +
    +

    Properties

    +
    + +
    cause: T
    +

    Causation of the exception Can be used to know what caused this exception

    -
    data: POJO
    -

    Arbitrary data

    -
    message: string
    name: string
    stack?: string
    timestamp: Date
    -

    Timestamp when exception was constructed in milliseconds -May contain microseconds in the fractional part +

    +
    + +
    data: POJO
    +

    Arbitrary data

    +
    +
    + +
    message: string
    +
    + +
    name: string
    +
    + +
    stack?: string
    +
    + +
    timestamp: Date
    +

    Timestamp when exception was constructed in milliseconds Guaranteed to be weakly monotonic

    -
    description: string = 'DB cannot be deleted'
    prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

    Type declaration

    stackTraceLimit: number

    Accessors

    • get description(): string
    • Returns string

    Methods

    • toJSON(): any
    • -

      Encoding to JSON pojo +

    +
    + +
    description: string = 'DB cannot be deleted'
    +
    + +
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)
    +
    +

    Type declaration

    +
    +
    + +
    stackTraceLimit: number
    +
    +

    Accessors

    +
    + +
      +
    • get description(): string
    • +
    • +

      Returns string

    +
    +

    Methods

    +
    + +
      + +
    • +

      Encoding to JSON pojo When overriding this, you can use super.toJSON The replacer will:

      • delete undefined values in objects
      • replace undefined values for null in arrays
      -

    Returns any

    +
    + +
    +
    + +

    Type parameters

    Parameters

    Returns InstanceType<T>

    Generated using TypeDoc

    \ No newline at end of file + +
    +

    Type Parameters

    +
    +
    +

    Parameters

    +
    +

    Returns InstanceType<T>

    + +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/classes/errors.ErrorDBDestroyed.html b/docs/classes/errors.ErrorDBDestroyed.html index 87607531..39642e81 100644 --- a/docs/classes/errors.ErrorDBDestroyed.html +++ b/docs/classes/errors.ErrorDBDestroyed.html @@ -1,29 +1,295 @@ -ErrorDBDestroyed | @matrixai/db
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class ErrorDBDestroyed<T>

    Type parameters

    • T

    Hierarchy

    Index

    Constructors

    • new ErrorDBDestroyed<T>(message?: string, options?: { cause?: T; data?: POJO; timestamp?: Date }): ErrorDBDestroyed<T>
    • Type parameters

      • T

      Parameters

      • Optional message: string
      • Optional options: { cause?: T; data?: POJO; timestamp?: Date }
        • Optional cause?: T
        • Optional data?: POJO
        • Optional timestamp?: Date

      Returns ErrorDBDestroyed<T>

    Properties

    cause: T
    -

    Causation of the exception +ErrorDBDestroyed | @matrixai/db

    +
    + +
    +
    +
    +
    + +

    Class ErrorDBDestroyed<T>

    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Hierarchy

    +
    +
    +
    +
    + +
    +
    +

    Constructors

    +
    +
    +

    Properties

    +
    +
    +

    Accessors

    +
    +
    +

    Methods

    +
    +
    +

    Constructors

    +
    + +
      + +
    • +
      +

      Type Parameters

      +
        +
      • +

        T

      +
      +

      Parameters

      +
        +
      • +
        Optional message: string
      • +
      • +
        Optional options: {
            cause?: T;
            data?: POJO;
            timestamp?: Date;
        }
        +
          +
        • +
          Optional cause?: T
        • +
        • +
          Optional data?: POJO
        • +
        • +
          Optional timestamp?: Date
      +

      Returns ErrorDBDestroyed<T>

    +
    +

    Properties

    +
    + +
    cause: T
    +

    Causation of the exception Can be used to know what caused this exception

    -
    data: POJO
    -

    Arbitrary data

    -
    message: string
    name: string
    stack?: string
    timestamp: Date
    -

    Timestamp when exception was constructed in milliseconds -May contain microseconds in the fractional part +

    +
    + +
    data: POJO
    +

    Arbitrary data

    +
    +
    + +
    message: string
    +
    + +
    name: string
    +
    + +
    stack?: string
    +
    + +
    timestamp: Date
    +

    Timestamp when exception was constructed in milliseconds Guaranteed to be weakly monotonic

    -
    description: string = 'DB is destroyed'
    prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

    Type declaration

    stackTraceLimit: number

    Accessors

    • get description(): string
    • Returns string

    Methods

    • toJSON(): any
    • -

      Encoding to JSON pojo +

    +
    + +
    description: string = 'DB is destroyed'
    +
    + +
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)
    +
    +

    Type declaration

    +
    +
    + +
    stackTraceLimit: number
    +
    +

    Accessors

    +
    + +
      +
    • get description(): string
    • +
    • +

      Returns string

    +
    +

    Methods

    +
    + +
      + +
    • +

      Encoding to JSON pojo When overriding this, you can use super.toJSON The replacer will:

      • delete undefined values in objects
      • replace undefined values for null in arrays
      -

    Returns any

    +
    + +
    +
    + +

    Type parameters

    Parameters

    Returns InstanceType<T>

    Generated using TypeDoc

    \ No newline at end of file + +
    +

    Type Parameters

    +
    +
    +

    Parameters

    +
    +

    Returns InstanceType<T>

    + +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/classes/errors.ErrorDBIterator.html b/docs/classes/errors.ErrorDBIterator.html index e83628cb..199ed203 100644 --- a/docs/classes/errors.ErrorDBIterator.html +++ b/docs/classes/errors.ErrorDBIterator.html @@ -1,29 +1,298 @@ -ErrorDBIterator | @matrixai/db
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class ErrorDBIterator<T>

    Type parameters

    • T

    Hierarchy

    Index

    Constructors

    • new ErrorDBIterator<T>(message?: string, options?: { cause?: T; data?: POJO; timestamp?: Date }): ErrorDBIterator<T>
    • Type parameters

      • T

      Parameters

      • Optional message: string
      • Optional options: { cause?: T; data?: POJO; timestamp?: Date }
        • Optional cause?: T
        • Optional data?: POJO
        • Optional timestamp?: Date

      Returns ErrorDBIterator<T>

    Properties

    cause: T
    -

    Causation of the exception +ErrorDBIterator | @matrixai/db

    +
    + +
    +
    +
    +
    + +

    Class ErrorDBIterator<T>

    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Hierarchy

    +
    +
    +
    +
    + +
    +
    +

    Constructors

    +
    +
    +

    Properties

    +
    +
    +

    Accessors

    +
    +
    +

    Methods

    +
    +
    +

    Constructors

    +
    + +
      + +
    • +
      +

      Type Parameters

      +
        +
      • +

        T

      +
      +

      Parameters

      +
        +
      • +
        Optional message: string
      • +
      • +
        Optional options: {
            cause?: T;
            data?: POJO;
            timestamp?: Date;
        }
        +
          +
        • +
          Optional cause?: T
        • +
        • +
          Optional data?: POJO
        • +
        • +
          Optional timestamp?: Date
      +

      Returns ErrorDBIterator<T>

    +
    +

    Properties

    +
    + +
    cause: T
    +

    Causation of the exception Can be used to know what caused this exception

    -
    data: POJO
    -

    Arbitrary data

    -
    message: string
    name: string
    stack?: string
    timestamp: Date
    -

    Timestamp when exception was constructed in milliseconds -May contain microseconds in the fractional part +

    +
    + +
    data: POJO
    +

    Arbitrary data

    +
    +
    + +
    message: string
    +
    + +
    name: string
    +
    + +
    stack?: string
    +
    + +
    timestamp: Date
    +

    Timestamp when exception was constructed in milliseconds Guaranteed to be weakly monotonic

    -
    description: string = 'DBIterator error'
    prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

    Type declaration

    stackTraceLimit: number

    Accessors

    • get description(): string
    • Returns string

    Methods

    • toJSON(): any
    • -

      Encoding to JSON pojo +

    +
    + +
    description: string = 'DBIterator error'
    +
    + +
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)
    +
    +

    Type declaration

    +
    +
    + +
    stackTraceLimit: number
    +
    +

    Accessors

    +
    + +
      +
    • get description(): string
    • +
    • +

      Returns string

    +
    +

    Methods

    +
    + +
      + +
    • +

      Encoding to JSON pojo When overriding this, you can use super.toJSON The replacer will:

      • delete undefined values in objects
      • replace undefined values for null in arrays
      -

    Returns any

    +
    + +
    +
    + +

    Type parameters

    Parameters

    Returns InstanceType<T>

    Generated using TypeDoc

    \ No newline at end of file + +
    +

    Type Parameters

    +
    +
    +

    Parameters

    +
    +

    Returns InstanceType<T>

    + +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/classes/errors.ErrorDBIteratorBusy.html b/docs/classes/errors.ErrorDBIteratorBusy.html index 39ee44ed..72c44679 100644 --- a/docs/classes/errors.ErrorDBIteratorBusy.html +++ b/docs/classes/errors.ErrorDBIteratorBusy.html @@ -1,29 +1,295 @@ -ErrorDBIteratorBusy | @matrixai/db
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class ErrorDBIteratorBusy<T>

    Type parameters

    • T

    Hierarchy

    Index

    Constructors

    • new ErrorDBIteratorBusy<T>(message?: string, options?: { cause?: T; data?: POJO; timestamp?: Date }): ErrorDBIteratorBusy<T>
    • Type parameters

      • T

      Parameters

      • Optional message: string
      • Optional options: { cause?: T; data?: POJO; timestamp?: Date }
        • Optional cause?: T
        • Optional data?: POJO
        • Optional timestamp?: Date

      Returns ErrorDBIteratorBusy<T>

    Properties

    cause: T
    -

    Causation of the exception +ErrorDBIteratorBusy | @matrixai/db

    +
    + +
    +
    +
    +
    + +

    Class ErrorDBIteratorBusy<T>

    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Hierarchy

    +
    +
    +
    +
    + +
    +
    +

    Constructors

    +
    +
    +

    Properties

    +
    +
    +

    Accessors

    +
    +
    +

    Methods

    +
    +
    +

    Constructors

    +
    + +
      + +
    • +
      +

      Type Parameters

      +
        +
      • +

        T

      +
      +

      Parameters

      +
        +
      • +
        Optional message: string
      • +
      • +
        Optional options: {
            cause?: T;
            data?: POJO;
            timestamp?: Date;
        }
        +
          +
        • +
          Optional cause?: T
        • +
        • +
          Optional data?: POJO
        • +
        • +
          Optional timestamp?: Date
      +

      Returns ErrorDBIteratorBusy<T>

    +
    +

    Properties

    +
    + +
    cause: T
    +

    Causation of the exception Can be used to know what caused this exception

    -
    data: POJO
    -

    Arbitrary data

    -
    message: string
    name: string
    stack?: string
    timestamp: Date
    -

    Timestamp when exception was constructed in milliseconds -May contain microseconds in the fractional part +

    +
    + +
    data: POJO
    +

    Arbitrary data

    +
    +
    + +
    message: string
    +
    + +
    name: string
    +
    + +
    stack?: string
    +
    + +
    timestamp: Date
    +

    Timestamp when exception was constructed in milliseconds Guaranteed to be weakly monotonic

    -
    description: string = 'DBIterator is busy'
    prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

    Type declaration

    stackTraceLimit: number

    Accessors

    • get description(): string
    • Returns string

    Methods

    • toJSON(): any
    • -

      Encoding to JSON pojo +

    +
    + +
    description: string = 'DBIterator is busy'
    +
    + +
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)
    +
    +

    Type declaration

    +
    +
    + +
    stackTraceLimit: number
    +
    +

    Accessors

    +
    + +
      +
    • get description(): string
    • +
    • +

      Returns string

    +
    +

    Methods

    +
    + +
      + +
    • +

      Encoding to JSON pojo When overriding this, you can use super.toJSON The replacer will:

      • delete undefined values in objects
      • replace undefined values for null in arrays
      -

    Returns any

    +
    + +
    +
    + +

    Type parameters

    Parameters

    Returns InstanceType<T>

    Generated using TypeDoc

    \ No newline at end of file + +
    +

    Type Parameters

    +
    +
    +

    Parameters

    +
    +

    Returns InstanceType<T>

    + +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/classes/errors.ErrorDBIteratorDestroyed.html b/docs/classes/errors.ErrorDBIteratorDestroyed.html index 22fd7e47..4f5c1b3d 100644 --- a/docs/classes/errors.ErrorDBIteratorDestroyed.html +++ b/docs/classes/errors.ErrorDBIteratorDestroyed.html @@ -1,29 +1,295 @@ -ErrorDBIteratorDestroyed | @matrixai/db
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class ErrorDBIteratorDestroyed<T>

    Type parameters

    • T

    Hierarchy

    Index

    Constructors

    • new ErrorDBIteratorDestroyed<T>(message?: string, options?: { cause?: T; data?: POJO; timestamp?: Date }): ErrorDBIteratorDestroyed<T>
    • Type parameters

      • T

      Parameters

      • Optional message: string
      • Optional options: { cause?: T; data?: POJO; timestamp?: Date }
        • Optional cause?: T
        • Optional data?: POJO
        • Optional timestamp?: Date

      Returns ErrorDBIteratorDestroyed<T>

    Properties

    cause: T
    -

    Causation of the exception +ErrorDBIteratorDestroyed | @matrixai/db

    +
    + +
    +
    +
    +
    + +

    Class ErrorDBIteratorDestroyed<T>

    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Hierarchy

    +
    +
    +
    +
    + +
    +
    +

    Constructors

    +
    +
    +

    Properties

    +
    +
    +

    Accessors

    +
    +
    +

    Methods

    +
    +
    +

    Constructors

    +
    + +
      + +
    • +
      +

      Type Parameters

      +
        +
      • +

        T

      +
      +

      Parameters

      +
        +
      • +
        Optional message: string
      • +
      • +
        Optional options: {
            cause?: T;
            data?: POJO;
            timestamp?: Date;
        }
        +
          +
        • +
          Optional cause?: T
        • +
        • +
          Optional data?: POJO
        • +
        • +
          Optional timestamp?: Date
      +

      Returns ErrorDBIteratorDestroyed<T>

    +
    +

    Properties

    +
    + +
    cause: T
    +

    Causation of the exception Can be used to know what caused this exception

    -
    data: POJO
    -

    Arbitrary data

    -
    message: string
    name: string
    stack?: string
    timestamp: Date
    -

    Timestamp when exception was constructed in milliseconds -May contain microseconds in the fractional part +

    +
    + +
    data: POJO
    +

    Arbitrary data

    +
    +
    + +
    message: string
    +
    + +
    name: string
    +
    + +
    stack?: string
    +
    + +
    timestamp: Date
    +

    Timestamp when exception was constructed in milliseconds Guaranteed to be weakly monotonic

    -
    description: string = 'DBIterator is destroyed'
    prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

    Type declaration

    stackTraceLimit: number

    Accessors

    • get description(): string
    • Returns string

    Methods

    • toJSON(): any
    • -

      Encoding to JSON pojo +

    +
    + +
    description: string = 'DBIterator is destroyed'
    +
    + +
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)
    +
    +

    Type declaration

    +
    +
    + +
    stackTraceLimit: number
    +
    +

    Accessors

    +
    + +
      +
    • get description(): string
    • +
    • +

      Returns string

    +
    +

    Methods

    +
    + +
      + +
    • +

      Encoding to JSON pojo When overriding this, you can use super.toJSON The replacer will:

      • delete undefined values in objects
      • replace undefined values for null in arrays
      -

    Returns any

    +
    + +
    +
    + +

    Type parameters

    Parameters

    Returns InstanceType<T>

    Generated using TypeDoc

    \ No newline at end of file + +
    +

    Type Parameters

    +
    +
    +

    Parameters

    +
    +

    Returns InstanceType<T>

    + +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/classes/errors.ErrorDBKey.html b/docs/classes/errors.ErrorDBKey.html index 3e858db4..49236422 100644 --- a/docs/classes/errors.ErrorDBKey.html +++ b/docs/classes/errors.ErrorDBKey.html @@ -1,29 +1,295 @@ -ErrorDBKey | @matrixai/db
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class ErrorDBKey<T>

    Type parameters

    • T

    Hierarchy

    Index

    Constructors

    • new ErrorDBKey<T>(message?: string, options?: { cause?: T; data?: POJO; timestamp?: Date }): ErrorDBKey<T>
    • Type parameters

      • T

      Parameters

      • Optional message: string
      • Optional options: { cause?: T; data?: POJO; timestamp?: Date }
        • Optional cause?: T
        • Optional data?: POJO
        • Optional timestamp?: Date

      Returns ErrorDBKey<T>

    Properties

    cause: T
    -

    Causation of the exception +ErrorDBKey | @matrixai/db

    +
    + +
    +
    +
    +
    + +

    Class ErrorDBKey<T>

    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Hierarchy

    +
    +
    +
    +
    + +
    +
    +

    Constructors

    +
    +
    +

    Properties

    +
    +
    +

    Accessors

    +
    +
    +

    Methods

    +
    +
    +

    Constructors

    +
    + +
      + +
    • +
      +

      Type Parameters

      +
        +
      • +

        T

      +
      +

      Parameters

      +
        +
      • +
        Optional message: string
      • +
      • +
        Optional options: {
            cause?: T;
            data?: POJO;
            timestamp?: Date;
        }
        +
          +
        • +
          Optional cause?: T
        • +
        • +
          Optional data?: POJO
        • +
        • +
          Optional timestamp?: Date
      +

      Returns ErrorDBKey<T>

    +
    +

    Properties

    +
    + +
    cause: T
    +

    Causation of the exception Can be used to know what caused this exception

    -
    data: POJO
    -

    Arbitrary data

    -
    message: string
    name: string
    stack?: string
    timestamp: Date
    -

    Timestamp when exception was constructed in milliseconds -May contain microseconds in the fractional part +

    +
    + +
    data: POJO
    +

    Arbitrary data

    +
    +
    + +
    message: string
    +
    + +
    name: string
    +
    + +
    stack?: string
    +
    + +
    timestamp: Date
    +

    Timestamp when exception was constructed in milliseconds Guaranteed to be weakly monotonic

    -
    description: string = 'DB key is incorrect'
    prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

    Type declaration

    stackTraceLimit: number

    Accessors

    • get description(): string
    • Returns string

    Methods

    • toJSON(): any
    • -

      Encoding to JSON pojo +

    +
    + +
    description: string = 'DB key is incorrect'
    +
    + +
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)
    +
    +

    Type declaration

    +
    +
    + +
    stackTraceLimit: number
    +
    +

    Accessors

    +
    + +
      +
    • get description(): string
    • +
    • +

      Returns string

    +
    +

    Methods

    +
    + +
      + +
    • +

      Encoding to JSON pojo When overriding this, you can use super.toJSON The replacer will:

      • delete undefined values in objects
      • replace undefined values for null in arrays
      -

    Returns any

    +
    + +
    +
    + +

    Type parameters

    Parameters

    Returns InstanceType<T>

    Generated using TypeDoc

    \ No newline at end of file + +
    +

    Type Parameters

    +
    +
    +

    Parameters

    +
    +

    Returns InstanceType<T>

    + +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/classes/errors.ErrorDBNotRunning.html b/docs/classes/errors.ErrorDBNotRunning.html index 415ed8ba..52255a69 100644 --- a/docs/classes/errors.ErrorDBNotRunning.html +++ b/docs/classes/errors.ErrorDBNotRunning.html @@ -1,29 +1,295 @@ -ErrorDBNotRunning | @matrixai/db
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class ErrorDBNotRunning<T>

    Type parameters

    • T

    Hierarchy

    Index

    Constructors

    • new ErrorDBNotRunning<T>(message?: string, options?: { cause?: T; data?: POJO; timestamp?: Date }): ErrorDBNotRunning<T>
    • Type parameters

      • T

      Parameters

      • Optional message: string
      • Optional options: { cause?: T; data?: POJO; timestamp?: Date }
        • Optional cause?: T
        • Optional data?: POJO
        • Optional timestamp?: Date

      Returns ErrorDBNotRunning<T>

    Properties

    cause: T
    -

    Causation of the exception +ErrorDBNotRunning | @matrixai/db

    +
    + +
    +
    +
    +
    + +

    Class ErrorDBNotRunning<T>

    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Hierarchy

    +
    +
    +
    +
    + +
    +
    +

    Constructors

    +
    +
    +

    Properties

    +
    +
    +

    Accessors

    +
    +
    +

    Methods

    +
    +
    +

    Constructors

    +
    + +
      + +
    • +
      +

      Type Parameters

      +
        +
      • +

        T

      +
      +

      Parameters

      +
        +
      • +
        Optional message: string
      • +
      • +
        Optional options: {
            cause?: T;
            data?: POJO;
            timestamp?: Date;
        }
        +
          +
        • +
          Optional cause?: T
        • +
        • +
          Optional data?: POJO
        • +
        • +
          Optional timestamp?: Date
      +

      Returns ErrorDBNotRunning<T>

    +
    +

    Properties

    +
    + +
    cause: T
    +

    Causation of the exception Can be used to know what caused this exception

    -
    data: POJO
    -

    Arbitrary data

    -
    message: string
    name: string
    stack?: string
    timestamp: Date
    -

    Timestamp when exception was constructed in milliseconds -May contain microseconds in the fractional part +

    +
    + +
    data: POJO
    +

    Arbitrary data

    +
    +
    + +
    message: string
    +
    + +
    name: string
    +
    + +
    stack?: string
    +
    + +
    timestamp: Date
    +

    Timestamp when exception was constructed in milliseconds Guaranteed to be weakly monotonic

    -
    description: string = 'DB is not running'
    prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

    Type declaration

    stackTraceLimit: number

    Accessors

    • get description(): string
    • Returns string

    Methods

    • toJSON(): any
    • -

      Encoding to JSON pojo +

    +
    + +
    description: string = 'DB is not running'
    +
    + +
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)
    +
    +

    Type declaration

    +
    +
    + +
    stackTraceLimit: number
    +
    +

    Accessors

    +
    + +
      +
    • get description(): string
    • +
    • +

      Returns string

    +
    +

    Methods

    +
    + +
      + +
    • +

      Encoding to JSON pojo When overriding this, you can use super.toJSON The replacer will:

      • delete undefined values in objects
      • replace undefined values for null in arrays
      -

    Returns any

    +
    + +
    +
    + +

    Type parameters

    Parameters

    Returns InstanceType<T>

    Generated using TypeDoc

    \ No newline at end of file + +
    +

    Type Parameters

    +
    +
    +

    Parameters

    +
    +

    Returns InstanceType<T>

    + +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/classes/errors.ErrorDBParseKey.html b/docs/classes/errors.ErrorDBParseKey.html index 271ffcf5..9fd04291 100644 --- a/docs/classes/errors.ErrorDBParseKey.html +++ b/docs/classes/errors.ErrorDBParseKey.html @@ -1,29 +1,295 @@ -ErrorDBParseKey | @matrixai/db
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class ErrorDBParseKey<T>

    Type parameters

    • T

    Hierarchy

    Index

    Constructors

    • new ErrorDBParseKey<T>(message?: string, options?: { cause?: T; data?: POJO; timestamp?: Date }): ErrorDBParseKey<T>
    • Type parameters

      • T

      Parameters

      • Optional message: string
      • Optional options: { cause?: T; data?: POJO; timestamp?: Date }
        • Optional cause?: T
        • Optional data?: POJO
        • Optional timestamp?: Date

      Returns ErrorDBParseKey<T>

    Properties

    cause: T
    -

    Causation of the exception +ErrorDBParseKey | @matrixai/db

    +
    + +
    +
    +
    +
    + +

    Class ErrorDBParseKey<T>

    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Hierarchy

    +
    +
    +
    +
    + +
    +
    +

    Constructors

    +
    +
    +

    Properties

    +
    +
    +

    Accessors

    +
    +
    +

    Methods

    +
    +
    +

    Constructors

    +
    + +
      + +
    • +
      +

      Type Parameters

      +
        +
      • +

        T

      +
      +

      Parameters

      +
        +
      • +
        Optional message: string
      • +
      • +
        Optional options: {
            cause?: T;
            data?: POJO;
            timestamp?: Date;
        }
        +
          +
        • +
          Optional cause?: T
        • +
        • +
          Optional data?: POJO
        • +
        • +
          Optional timestamp?: Date
      +

      Returns ErrorDBParseKey<T>

    +
    +

    Properties

    +
    + +
    cause: T
    +

    Causation of the exception Can be used to know what caused this exception

    -
    data: POJO
    -

    Arbitrary data

    -
    message: string
    name: string
    stack?: string
    timestamp: Date
    -

    Timestamp when exception was constructed in milliseconds -May contain microseconds in the fractional part +

    +
    + +
    data: POJO
    +

    Arbitrary data

    +
    +
    + +
    message: string
    +
    + +
    name: string
    +
    + +
    stack?: string
    +
    + +
    timestamp: Date
    +

    Timestamp when exception was constructed in milliseconds Guaranteed to be weakly monotonic

    -
    description: string = 'DB key parsing failed'
    prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

    Type declaration

    stackTraceLimit: number

    Accessors

    • get description(): string
    • Returns string

    Methods

    • toJSON(): any
    • -

      Encoding to JSON pojo +

    +
    + +
    description: string = 'DB key parsing failed'
    +
    + +
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)
    +
    +

    Type declaration

    +
    +
    + +
    stackTraceLimit: number
    +
    +

    Accessors

    +
    + +
      +
    • get description(): string
    • +
    • +

      Returns string

    +
    +

    Methods

    +
    + +
      + +
    • +

      Encoding to JSON pojo When overriding this, you can use super.toJSON The replacer will:

      • delete undefined values in objects
      • replace undefined values for null in arrays
      -

    Returns any

    +
    + +
    +
    + +

    Type parameters

    Parameters

    Returns InstanceType<T>

    Generated using TypeDoc

    \ No newline at end of file + +
    +

    Type Parameters

    +
    +
    +

    Parameters

    +
    +

    Returns InstanceType<T>

    + +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/classes/errors.ErrorDBParseValue.html b/docs/classes/errors.ErrorDBParseValue.html index 6920edfa..ba38ad52 100644 --- a/docs/classes/errors.ErrorDBParseValue.html +++ b/docs/classes/errors.ErrorDBParseValue.html @@ -1,29 +1,295 @@ -ErrorDBParseValue | @matrixai/db
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class ErrorDBParseValue<T>

    Type parameters

    • T

    Hierarchy

    Index

    Constructors

    • new ErrorDBParseValue<T>(message?: string, options?: { cause?: T; data?: POJO; timestamp?: Date }): ErrorDBParseValue<T>
    • Type parameters

      • T

      Parameters

      • Optional message: string
      • Optional options: { cause?: T; data?: POJO; timestamp?: Date }
        • Optional cause?: T
        • Optional data?: POJO
        • Optional timestamp?: Date

      Returns ErrorDBParseValue<T>

    Properties

    cause: T
    -

    Causation of the exception +ErrorDBParseValue | @matrixai/db

    +
    + +
    +
    +
    +
    + +

    Class ErrorDBParseValue<T>

    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Hierarchy

    +
    +
    +
    +
    + +
    +
    +

    Constructors

    +
    +
    +

    Properties

    +
    +
    +

    Accessors

    +
    +
    +

    Methods

    +
    +
    +

    Constructors

    +
    + +
      + +
    • +
      +

      Type Parameters

      +
        +
      • +

        T

      +
      +

      Parameters

      +
        +
      • +
        Optional message: string
      • +
      • +
        Optional options: {
            cause?: T;
            data?: POJO;
            timestamp?: Date;
        }
        +
          +
        • +
          Optional cause?: T
        • +
        • +
          Optional data?: POJO
        • +
        • +
          Optional timestamp?: Date
      +

      Returns ErrorDBParseValue<T>

    +
    +

    Properties

    +
    + +
    cause: T
    +

    Causation of the exception Can be used to know what caused this exception

    -
    data: POJO
    -

    Arbitrary data

    -
    message: string
    name: string
    stack?: string
    timestamp: Date
    -

    Timestamp when exception was constructed in milliseconds -May contain microseconds in the fractional part +

    +
    + +
    data: POJO
    +

    Arbitrary data

    +
    +
    + +
    message: string
    +
    + +
    name: string
    +
    + +
    stack?: string
    +
    + +
    timestamp: Date
    +

    Timestamp when exception was constructed in milliseconds Guaranteed to be weakly monotonic

    -
    description: string = 'DB value parsing failed'
    prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

    Type declaration

    stackTraceLimit: number

    Accessors

    • get description(): string
    • Returns string

    Methods

    • toJSON(): any
    • -

      Encoding to JSON pojo +

    +
    + +
    description: string = 'DB value parsing failed'
    +
    + +
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)
    +
    +

    Type declaration

    +
    +
    + +
    stackTraceLimit: number
    +
    +

    Accessors

    +
    + +
      +
    • get description(): string
    • +
    • +

      Returns string

    +
    +

    Methods

    +
    + +
      + +
    • +

      Encoding to JSON pojo When overriding this, you can use super.toJSON The replacer will:

      • delete undefined values in objects
      • replace undefined values for null in arrays
      -

    Returns any

    +
    + +
    +
    + +

    Type parameters

    Parameters

    Returns InstanceType<T>

    Generated using TypeDoc

    \ No newline at end of file + +
    +

    Type Parameters

    +
    +
    +

    Parameters

    +
    +

    Returns InstanceType<T>

    + +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/classes/errors.ErrorDBRunning.html b/docs/classes/errors.ErrorDBRunning.html index 65411d01..0395a453 100644 --- a/docs/classes/errors.ErrorDBRunning.html +++ b/docs/classes/errors.ErrorDBRunning.html @@ -1,29 +1,302 @@ -ErrorDBRunning | @matrixai/db
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class ErrorDBRunning<T>

    Type parameters

    • T

    Hierarchy

    Index

    Constructors

    • new ErrorDBRunning<T>(message?: string, options?: { cause?: T; data?: POJO; timestamp?: Date }): ErrorDBRunning<T>
    • Type parameters

      • T

      Parameters

      • Optional message: string
      • Optional options: { cause?: T; data?: POJO; timestamp?: Date }
        • Optional cause?: T
        • Optional data?: POJO
        • Optional timestamp?: Date

      Returns ErrorDBRunning<T>

    Properties

    cause: T
    -

    Causation of the exception +ErrorDBRunning | @matrixai/db

    +
    + +
    +
    +
    +
    + +

    Class ErrorDBRunning<T>

    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Hierarchy

    +
    +
    +
    +
    + +
    +
    +

    Constructors

    +
    + +
      + +
    • +
      +

      Type Parameters

      +
        +
      • +

        T

      +
      +

      Parameters

      +
        +
      • +
        Optional message: string
      • +
      • +
        Optional options: {
            cause?: T;
            data?: POJO;
            timestamp?: Date;
        }
        +
          +
        • +
          Optional cause?: T
        • +
        • +
          Optional data?: POJO
        • +
        • +
          Optional timestamp?: Date
      +

      Returns ErrorDBRunning<T>

    +
    +

    Properties

    +
    + +
    cause: T
    +

    Causation of the exception Can be used to know what caused this exception

    -
    data: POJO
    -

    Arbitrary data

    -
    message: string
    name: string
    stack?: string
    timestamp: Date
    -

    Timestamp when exception was constructed in milliseconds -May contain microseconds in the fractional part +

    +
    + +
    data: POJO
    +

    Arbitrary data

    +
    +
    + +
    message: string
    +
    + +
    name: string
    +
    + +
    stack?: string
    +
    + +
    timestamp: Date
    +

    Timestamp when exception was constructed in milliseconds Guaranteed to be weakly monotonic

    -
    description: string = 'DB error'
    desription: string = 'DB is running'
    prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

    Type declaration

    stackTraceLimit: number

    Accessors

    • get description(): string
    • Returns string

    Methods

    • toJSON(): any
    • -

      Encoding to JSON pojo +

    +
    + +
    description: string = 'DB error'
    +
    + +
    desription: string = 'DB is running'
    +
    + +
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)
    +
    +

    Type declaration

    +
    +
    + +
    stackTraceLimit: number
    +
    +

    Accessors

    +
    + +
      +
    • get description(): string
    • +
    • +

      Returns string

    +
    +

    Methods

    +
    + +
      + +
    • +

      Encoding to JSON pojo When overriding this, you can use super.toJSON The replacer will:

      • delete undefined values in objects
      • replace undefined values for null in arrays
      -

    Returns any

    +
    + +
    +
    + +

    Type parameters

    Parameters

    Returns InstanceType<T>

    Generated using TypeDoc

    \ No newline at end of file + +
    +

    Type Parameters

    +
    +
    +

    Parameters

    +
    +

    Returns InstanceType<T>

    + +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/classes/errors.ErrorDBTransaction.html b/docs/classes/errors.ErrorDBTransaction.html index fed0f2cc..cfe01abb 100644 --- a/docs/classes/errors.ErrorDBTransaction.html +++ b/docs/classes/errors.ErrorDBTransaction.html @@ -1,29 +1,304 @@ -ErrorDBTransaction | @matrixai/db
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class ErrorDBTransaction<T>

    Type parameters

    • T

    Hierarchy

    Index

    Constructors

    • new ErrorDBTransaction<T>(message?: string, options?: { cause?: T; data?: POJO; timestamp?: Date }): ErrorDBTransaction<T>
    • Type parameters

      • T

      Parameters

      • Optional message: string
      • Optional options: { cause?: T; data?: POJO; timestamp?: Date }
        • Optional cause?: T
        • Optional data?: POJO
        • Optional timestamp?: Date

      Returns ErrorDBTransaction<T>

    Properties

    cause: T
    -

    Causation of the exception +ErrorDBTransaction | @matrixai/db

    +
    + +
    +
    +
    +
    + +

    Class ErrorDBTransaction<T>

    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Hierarchy

    +
    +
    +
    +
    + +
    +
    +

    Constructors

    +
    +
    +

    Properties

    +
    +
    +

    Accessors

    +
    +
    +

    Methods

    +
    +
    +

    Constructors

    +
    + +
      + +
    • +
      +

      Type Parameters

      +
        +
      • +

        T

      +
      +

      Parameters

      +
        +
      • +
        Optional message: string
      • +
      • +
        Optional options: {
            cause?: T;
            data?: POJO;
            timestamp?: Date;
        }
        +
          +
        • +
          Optional cause?: T
        • +
        • +
          Optional data?: POJO
        • +
        • +
          Optional timestamp?: Date
      +

      Returns ErrorDBTransaction<T>

    +
    +

    Properties

    +
    + +
    cause: T
    +

    Causation of the exception Can be used to know what caused this exception

    -
    data: POJO
    -

    Arbitrary data

    -
    message: string
    name: string
    stack?: string
    timestamp: Date
    -

    Timestamp when exception was constructed in milliseconds -May contain microseconds in the fractional part +

    +
    + +
    data: POJO
    +

    Arbitrary data

    +
    +
    + +
    message: string
    +
    + +
    name: string
    +
    + +
    stack?: string
    +
    + +
    timestamp: Date
    +

    Timestamp when exception was constructed in milliseconds Guaranteed to be weakly monotonic

    -
    description: string = 'DBTransaction error'
    prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

    Type declaration

    stackTraceLimit: number

    Accessors

    • get description(): string
    • Returns string

    Methods

    • toJSON(): any
    • -

      Encoding to JSON pojo +

    +
    + +
    description: string = 'DBTransaction error'
    +
    + +
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)
    +
    +

    Type declaration

    +
    +
    + +
    stackTraceLimit: number
    +
    +

    Accessors

    +
    + +
      +
    • get description(): string
    • +
    • +

      Returns string

    +
    +

    Methods

    +
    + +
      + +
    • +

      Encoding to JSON pojo When overriding this, you can use super.toJSON The replacer will:

      • delete undefined values in objects
      • replace undefined values for null in arrays
      -

    Returns any

    +
    + +
    +
    + +

    Type parameters

    Parameters

    Returns InstanceType<T>

    Generated using TypeDoc

    \ No newline at end of file + +
    +

    Type Parameters

    +
    +
    +

    Parameters

    +
    +

    Returns InstanceType<T>

    + +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/classes/errors.ErrorDBTransactionCommitted.html b/docs/classes/errors.ErrorDBTransactionCommitted.html index 505afafe..ae25b4b7 100644 --- a/docs/classes/errors.ErrorDBTransactionCommitted.html +++ b/docs/classes/errors.ErrorDBTransactionCommitted.html @@ -1,29 +1,295 @@ -ErrorDBTransactionCommitted | @matrixai/db
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class ErrorDBTransactionCommitted<T>

    Type parameters

    • T

    Hierarchy

    Index

    Constructors

    • new ErrorDBTransactionCommitted<T>(message?: string, options?: { cause?: T; data?: POJO; timestamp?: Date }): ErrorDBTransactionCommitted<T>
    • Type parameters

      • T

      Parameters

      • Optional message: string
      • Optional options: { cause?: T; data?: POJO; timestamp?: Date }
        • Optional cause?: T
        • Optional data?: POJO
        • Optional timestamp?: Date

      Returns ErrorDBTransactionCommitted<T>

    Properties

    cause: T
    -

    Causation of the exception +ErrorDBTransactionCommitted | @matrixai/db

    +
    + +
    +
    +
    +
    + +

    Class ErrorDBTransactionCommitted<T>

    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Hierarchy

    +
    +
    +
    +
    + +
    +
    +

    Constructors

    +
    +
    +

    Properties

    +
    +
    +

    Accessors

    +
    +
    +

    Methods

    +
    +
    +

    Constructors

    +
    + +
      + +
    • +
      +

      Type Parameters

      +
        +
      • +

        T

      +
      +

      Parameters

      +
        +
      • +
        Optional message: string
      • +
      • +
        Optional options: {
            cause?: T;
            data?: POJO;
            timestamp?: Date;
        }
        +
          +
        • +
          Optional cause?: T
        • +
        • +
          Optional data?: POJO
        • +
        • +
          Optional timestamp?: Date
      +

      Returns ErrorDBTransactionCommitted<T>

    +
    +

    Properties

    +
    + +
    cause: T
    +

    Causation of the exception Can be used to know what caused this exception

    -
    data: POJO
    -

    Arbitrary data

    -
    message: string
    name: string
    stack?: string
    timestamp: Date
    -

    Timestamp when exception was constructed in milliseconds -May contain microseconds in the fractional part +

    +
    + +
    data: POJO
    +

    Arbitrary data

    +
    +
    + +
    message: string
    +
    + +
    name: string
    +
    + +
    stack?: string
    +
    + +
    timestamp: Date
    +

    Timestamp when exception was constructed in milliseconds Guaranteed to be weakly monotonic

    -
    description: string = 'DBTransaction is committed'
    prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

    Type declaration

    stackTraceLimit: number

    Accessors

    • get description(): string
    • Returns string

    Methods

    • toJSON(): any
    +
    + +
    description: string = 'DBTransaction is committed'
    +
    + +
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)
    +
    +

    Type declaration

    +
    +
    + +
    stackTraceLimit: number
    +
    +

    Accessors

    +
    + +
      +
    • get description(): string
    • +
    • +

      Returns string

    +
    +

    Methods

    +
    + +
      + +
    • +

      Encoding to JSON pojo When overriding this, you can use super.toJSON The replacer will:

      • delete undefined values in objects
      • replace undefined values for null in arrays
      -

    Returns any

    +
    + +
    +
    + +

    Type parameters

    Parameters

    Returns InstanceType<T>

    Generated using TypeDoc

    \ No newline at end of file + +
    +

    Type Parameters

    +
    +
    +

    Parameters

    +
    +

    Returns InstanceType<T>

    + +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/classes/errors.ErrorDBTransactionConflict.html b/docs/classes/errors.ErrorDBTransactionConflict.html index 3585826c..49af6821 100644 --- a/docs/classes/errors.ErrorDBTransactionConflict.html +++ b/docs/classes/errors.ErrorDBTransactionConflict.html @@ -1,29 +1,295 @@ -ErrorDBTransactionConflict | @matrixai/db
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class ErrorDBTransactionConflict<T>

    Type parameters

    • T

    Hierarchy

    Index

    Constructors

    • new ErrorDBTransactionConflict<T>(message?: string, options?: { cause?: T; data?: POJO; timestamp?: Date }): ErrorDBTransactionConflict<T>
    • Type parameters

      • T

      Parameters

      • Optional message: string
      • Optional options: { cause?: T; data?: POJO; timestamp?: Date }
        • Optional cause?: T
        • Optional data?: POJO
        • Optional timestamp?: Date

      Returns ErrorDBTransactionConflict<T>

    Properties

    cause: T
    -

    Causation of the exception +ErrorDBTransactionConflict | @matrixai/db

    +
    + +
    +
    +
    +
    + +

    Class ErrorDBTransactionConflict<T>

    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Hierarchy

    +
    +
    +
    +
    + +
    +
    +

    Constructors

    +
    +
    +

    Properties

    +
    +
    +

    Accessors

    +
    +
    +

    Methods

    +
    +
    +

    Constructors

    +
    + +
      + +
    • +
      +

      Type Parameters

      +
        +
      • +

        T

      +
      +

      Parameters

      +
        +
      • +
        Optional message: string
      • +
      • +
        Optional options: {
            cause?: T;
            data?: POJO;
            timestamp?: Date;
        }
        +
          +
        • +
          Optional cause?: T
        • +
        • +
          Optional data?: POJO
        • +
        • +
          Optional timestamp?: Date
      +

      Returns ErrorDBTransactionConflict<T>

    +
    +

    Properties

    +
    + +
    cause: T
    +

    Causation of the exception Can be used to know what caused this exception

    -
    data: POJO
    -

    Arbitrary data

    -
    message: string
    name: string
    stack?: string
    timestamp: Date
    -

    Timestamp when exception was constructed in milliseconds -May contain microseconds in the fractional part +

    +
    + +
    data: POJO
    +

    Arbitrary data

    +
    +
    + +
    message: string
    +
    + +
    name: string
    +
    + +
    stack?: string
    +
    + +
    timestamp: Date
    +

    Timestamp when exception was constructed in milliseconds Guaranteed to be weakly monotonic

    -
    description: string = 'DBTransaction cannot commit due to conflicting writes'
    prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

    Type declaration

    stackTraceLimit: number

    Accessors

    • get description(): string
    • Returns string

    Methods

    • toJSON(): any
    +
    + +
    description: string = 'DBTransaction cannot commit due to conflicting writes'
    +
    + +
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)
    +
    +

    Type declaration

    +
    +
    + +
    stackTraceLimit: number
    +
    +

    Accessors

    +
    + +
      +
    • get description(): string
    • +
    • +

      Returns string

    +
    +

    Methods

    +
    + +
      + +
    • +

      Encoding to JSON pojo When overriding this, you can use super.toJSON The replacer will:

      • delete undefined values in objects
      • replace undefined values for null in arrays
      -

    Returns any

    +
    + +
    +
    + +

    Type parameters

    Parameters

    Returns InstanceType<T>

    Generated using TypeDoc

    \ No newline at end of file + +
    +

    Type Parameters

    +
    +
    +

    Parameters

    +
    +

    Returns InstanceType<T>

    + +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/classes/errors.ErrorDBTransactionDeadlock.html b/docs/classes/errors.ErrorDBTransactionDeadlock.html new file mode 100644 index 00000000..f0a8606d --- /dev/null +++ b/docs/classes/errors.ErrorDBTransactionDeadlock.html @@ -0,0 +1,295 @@ +ErrorDBTransactionDeadlock | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Class ErrorDBTransactionDeadlock<T>

    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Hierarchy

    +
    +
    +
    +
    + +
    +
    +

    Constructors

    +
    +
    +

    Properties

    +
    +
    +

    Accessors

    +
    +
    +

    Methods

    +
    +
    +

    Constructors

    +
    + +
      + +
    • +
      +

      Type Parameters

      +
        +
      • +

        T

      +
      +

      Parameters

      +
        +
      • +
        Optional message: string
      • +
      • +
        Optional options: {
            cause?: T;
            data?: POJO;
            timestamp?: Date;
        }
        +
          +
        • +
          Optional cause?: T
        • +
        • +
          Optional data?: POJO
        • +
        • +
          Optional timestamp?: Date
      +

      Returns ErrorDBTransactionDeadlock<T>

    +
    +

    Properties

    +
    + +
    cause: T
    +

    Causation of the exception +Can be used to know what caused this exception

    +
    +
    + +
    data: POJO
    +

    Arbitrary data

    +
    +
    + +
    message: string
    +
    + +
    name: string
    +
    + +
    stack?: string
    +
    + +
    timestamp: Date
    +

    Timestamp when exception was constructed in milliseconds +Guaranteed to be weakly monotonic

    +
    +
    + +
    description: string = 'DBTransaction encountered a pessimistic deadlock'
    +
    + +
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)
    +
    +

    Type declaration

    +
    +
    + +
    stackTraceLimit: number
    +
    +

    Accessors

    +
    + +
      +
    • get description(): string
    • +
    • +

      Returns string

    +
    +

    Methods

    +
    + +
      + +
    • +

      Encoding to JSON pojo +When overriding this, you can use super.toJSON +The replacer will:

      +
        +
      • delete undefined values in objects
      • +
      • replace undefined values for null in arrays
      • +
      +
      +

      Returns any

    +
    + +
      + +
    • +

      Create .stack property on a target object

      +
      +
      +

      Parameters

      +
        +
      • +
        targetObject: object
      • +
      • +
        Optional constructorOpt: Function
      +

      Returns void

    +
    + +
      + +
    • +

      Runtime decoding of JSON POJO to exception instance +When overriding this, you cannot use super.fromJSON +You must write it fully, and use the same type-hacks +to support polymorphic this in static methods +https://github.com/microsoft/TypeScript/issues/5863

      +
      +
      +

      Type Parameters

      +
        +
      • +

        T extends Class<any>

      +
      +

      Parameters

      +
        +
      • +
        this: T
      • +
      • +
        json: any
      +

      Returns InstanceType<T>

    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/classes/errors.ErrorDBTransactionDestroyed.html b/docs/classes/errors.ErrorDBTransactionDestroyed.html index 67593465..b9a5e4b0 100644 --- a/docs/classes/errors.ErrorDBTransactionDestroyed.html +++ b/docs/classes/errors.ErrorDBTransactionDestroyed.html @@ -1,29 +1,295 @@ -ErrorDBTransactionDestroyed | @matrixai/db
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class ErrorDBTransactionDestroyed<T>

    Type parameters

    • T

    Hierarchy

    Index

    Constructors

    • new ErrorDBTransactionDestroyed<T>(message?: string, options?: { cause?: T; data?: POJO; timestamp?: Date }): ErrorDBTransactionDestroyed<T>
    • Type parameters

      • T

      Parameters

      • Optional message: string
      • Optional options: { cause?: T; data?: POJO; timestamp?: Date }
        • Optional cause?: T
        • Optional data?: POJO
        • Optional timestamp?: Date

      Returns ErrorDBTransactionDestroyed<T>

    Properties

    cause: T
    -

    Causation of the exception +ErrorDBTransactionDestroyed | @matrixai/db

    +
    + +
    +
    +
    +
    + +

    Class ErrorDBTransactionDestroyed<T>

    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Hierarchy

    +
    +
    +
    +
    + +
    +
    +

    Constructors

    +
    +
    +

    Properties

    +
    +
    +

    Accessors

    +
    +
    +

    Methods

    +
    +
    +

    Constructors

    +
    + +
      + +
    • +
      +

      Type Parameters

      +
        +
      • +

        T

      +
      +

      Parameters

      +
        +
      • +
        Optional message: string
      • +
      • +
        Optional options: {
            cause?: T;
            data?: POJO;
            timestamp?: Date;
        }
        +
          +
        • +
          Optional cause?: T
        • +
        • +
          Optional data?: POJO
        • +
        • +
          Optional timestamp?: Date
      +

      Returns ErrorDBTransactionDestroyed<T>

    +
    +

    Properties

    +
    + +
    cause: T
    +

    Causation of the exception Can be used to know what caused this exception

    -
    data: POJO
    -

    Arbitrary data

    -
    message: string
    name: string
    stack?: string
    timestamp: Date
    -

    Timestamp when exception was constructed in milliseconds -May contain microseconds in the fractional part +

    +
    + +
    data: POJO
    +

    Arbitrary data

    +
    +
    + +
    message: string
    +
    + +
    name: string
    +
    + +
    stack?: string
    +
    + +
    timestamp: Date
    +

    Timestamp when exception was constructed in milliseconds Guaranteed to be weakly monotonic

    -
    description: string = 'DBTransaction is destroyed'
    prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

    Type declaration

    stackTraceLimit: number

    Accessors

    • get description(): string
    • Returns string

    Methods

    • toJSON(): any
    +
    + +
    description: string = 'DBTransaction is destroyed'
    +
    + +
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)
    +
    +

    Type declaration

    +
    +
    + +
    stackTraceLimit: number
    +
    +

    Accessors

    +
    + +
      +
    • get description(): string
    • +
    • +

      Returns string

    +
    +

    Methods

    +
    + +
      + +
    • +

      Encoding to JSON pojo When overriding this, you can use super.toJSON The replacer will:

      • delete undefined values in objects
      • replace undefined values for null in arrays
      -

    Returns any

    +
    + +
    +
    + +

    Type parameters

    Parameters

    Returns InstanceType<T>

    Generated using TypeDoc

    \ No newline at end of file + +
    +

    Type Parameters

    +
    +
    +

    Parameters

    +
    +

    Returns InstanceType<T>

    + +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/classes/errors.ErrorDBTransactionLockType.html b/docs/classes/errors.ErrorDBTransactionLockType.html index 99dc78a9..767dcc3a 100644 --- a/docs/classes/errors.ErrorDBTransactionLockType.html +++ b/docs/classes/errors.ErrorDBTransactionLockType.html @@ -1,29 +1,295 @@ -ErrorDBTransactionLockType | @matrixai/db
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class ErrorDBTransactionLockType<T>

    Type parameters

    • T

    Hierarchy

    Index

    Constructors

    • new ErrorDBTransactionLockType<T>(message?: string, options?: { cause?: T; data?: POJO; timestamp?: Date }): ErrorDBTransactionLockType<T>
    • Type parameters

      • T

      Parameters

      • Optional message: string
      • Optional options: { cause?: T; data?: POJO; timestamp?: Date }
        • Optional cause?: T
        • Optional data?: POJO
        • Optional timestamp?: Date

      Returns ErrorDBTransactionLockType<T>

    Properties

    cause: T
    -

    Causation of the exception +ErrorDBTransactionLockType | @matrixai/db

    +
    + +
    +
    +
    +
    + +

    Class ErrorDBTransactionLockType<T>

    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Hierarchy

    +
    +
    +
    +
    + +
    +
    +

    Constructors

    +
    +
    +

    Properties

    +
    +
    +

    Accessors

    +
    +
    +

    Methods

    +
    +
    +

    Constructors

    +
    + +
      + +
    • +
      +

      Type Parameters

      +
        +
      • +

        T

      +
      +

      Parameters

      +
        +
      • +
        Optional message: string
      • +
      • +
        Optional options: {
            cause?: T;
            data?: POJO;
            timestamp?: Date;
        }
        +
          +
        • +
          Optional cause?: T
        • +
        • +
          Optional data?: POJO
        • +
        • +
          Optional timestamp?: Date
      +

      Returns ErrorDBTransactionLockType<T>

    +
    +

    Properties

    +
    + +
    cause: T
    +

    Causation of the exception Can be used to know what caused this exception

    -
    data: POJO
    -

    Arbitrary data

    -
    message: string
    name: string
    stack?: string
    timestamp: Date
    -

    Timestamp when exception was constructed in milliseconds -May contain microseconds in the fractional part +

    +
    + +
    data: POJO
    +

    Arbitrary data

    +
    +
    + +
    message: string
    +
    + +
    name: string
    +
    + +
    stack?: string
    +
    + +
    timestamp: Date
    +

    Timestamp when exception was constructed in milliseconds Guaranteed to be weakly monotonic

    -
    description: string = 'DBTransaction does not support upgrading or downgrading the lock type'
    prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

    Type declaration

    stackTraceLimit: number

    Accessors

    • get description(): string
    • Returns string

    Methods

    • toJSON(): any
    +
    + +
    description: string = 'DBTransaction does not support upgrading or downgrading the lock type'
    +
    + +
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)
    +
    +

    Type declaration

    +
    +
    + +
    stackTraceLimit: number
    +
    +

    Accessors

    +
    + +
      +
    • get description(): string
    • +
    • +

      Returns string

    +
    +

    Methods

    +
    + +
      + +
    • +

      Encoding to JSON pojo When overriding this, you can use super.toJSON The replacer will:

      • delete undefined values in objects
      • replace undefined values for null in arrays
      -

    Returns any

    +
    + +
    +
    + +

    Type parameters

    Parameters

    Returns InstanceType<T>

    Generated using TypeDoc

    \ No newline at end of file + +
    +

    Type Parameters

    +
    +
    +

    Parameters

    +
    +

    Returns InstanceType<T>

    + +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/classes/errors.ErrorDBTransactionNotCommitted.html b/docs/classes/errors.ErrorDBTransactionNotCommitted.html index bff4c542..4439209b 100644 --- a/docs/classes/errors.ErrorDBTransactionNotCommitted.html +++ b/docs/classes/errors.ErrorDBTransactionNotCommitted.html @@ -1,29 +1,295 @@ -ErrorDBTransactionNotCommitted | @matrixai/db
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class ErrorDBTransactionNotCommitted<T>

    Type parameters

    • T

    Hierarchy

    Index

    Constructors

    • Type parameters

      • T

      Parameters

      • Optional message: string
      • Optional options: { cause?: T; data?: POJO; timestamp?: Date }
        • Optional cause?: T
        • Optional data?: POJO
        • Optional timestamp?: Date

      Returns ErrorDBTransactionNotCommitted<T>

    Properties

    cause: T
    -

    Causation of the exception +ErrorDBTransactionNotCommitted | @matrixai/db

    +
    + +
    +
    +
    +
    + +

    Class ErrorDBTransactionNotCommitted<T>

    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Hierarchy

    +
    +
    +
    +
    + +
    +
    +

    Constructors

    +
    +
    +

    Properties

    +
    +
    +

    Accessors

    +
    +
    +

    Methods

    +
    +
    +

    Constructors

    +
    + +
      + +
    • +
      +

      Type Parameters

      +
        +
      • +

        T

      +
      +

      Parameters

      +
        +
      • +
        Optional message: string
      • +
      • +
        Optional options: {
            cause?: T;
            data?: POJO;
            timestamp?: Date;
        }
        +
          +
        • +
          Optional cause?: T
        • +
        • +
          Optional data?: POJO
        • +
        • +
          Optional timestamp?: Date
      +

      Returns ErrorDBTransactionNotCommitted<T>

    +
    +

    Properties

    +
    + +
    cause: T
    +

    Causation of the exception Can be used to know what caused this exception

    -
    data: POJO
    -

    Arbitrary data

    -
    message: string
    name: string
    stack?: string
    timestamp: Date
    -

    Timestamp when exception was constructed in milliseconds -May contain microseconds in the fractional part +

    +
    + +
    data: POJO
    +

    Arbitrary data

    +
    +
    + +
    message: string
    +
    + +
    name: string
    +
    + +
    stack?: string
    +
    + +
    timestamp: Date
    +

    Timestamp when exception was constructed in milliseconds Guaranteed to be weakly monotonic

    -
    description: string = 'DBTransaction is not comitted'
    prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

    Type declaration

    stackTraceLimit: number

    Accessors

    • get description(): string
    • Returns string

    Methods

    • toJSON(): any
    +
    + +
    description: string = 'DBTransaction is not comitted'
    +
    + +
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)
    +
    +

    Type declaration

    +
    +
    + +
    stackTraceLimit: number
    +
    +

    Accessors

    +
    + +
      +
    • get description(): string
    • +
    • +

      Returns string

    +
    +

    Methods

    +
    + +
      + +
    • +

      Encoding to JSON pojo When overriding this, you can use super.toJSON The replacer will:

      • delete undefined values in objects
      • replace undefined values for null in arrays
      -

    Returns any

    +
    + +
    +
    + +

    Type parameters

    Parameters

    Returns InstanceType<T>

    Generated using TypeDoc

    \ No newline at end of file + +
    +

    Type Parameters

    +
    +
    +

    Parameters

    +
    +

    Returns InstanceType<T>

    + +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/classes/errors.ErrorDBTransactionNotCommittedNorRollbacked.html b/docs/classes/errors.ErrorDBTransactionNotCommittedNorRollbacked.html index aae0517e..35bdb963 100644 --- a/docs/classes/errors.ErrorDBTransactionNotCommittedNorRollbacked.html +++ b/docs/classes/errors.ErrorDBTransactionNotCommittedNorRollbacked.html @@ -1,29 +1,295 @@ -ErrorDBTransactionNotCommittedNorRollbacked | @matrixai/db
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class ErrorDBTransactionNotCommittedNorRollbacked<T>

    Type parameters

    • T

    Hierarchy

    Index

    Constructors

    Properties

    cause: T
    -

    Causation of the exception +ErrorDBTransactionNotCommittedNorRollbacked | @matrixai/db

    +
    + +
    +
    +
    +
    + +

    Class ErrorDBTransactionNotCommittedNorRollbacked<T>

    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Hierarchy

    +
    +
    +
    +
    + +
    +
    +

    Constructors

    +
    +
    +

    Properties

    +
    +
    +

    Accessors

    +
    +
    +

    Methods

    +
    +
    +

    Constructors

    +
    + +
      + +
    • +
      +

      Type Parameters

      +
        +
      • +

        T

      +
      +

      Parameters

      +
        +
      • +
        Optional message: string
      • +
      • +
        Optional options: {
            cause?: T;
            data?: POJO;
            timestamp?: Date;
        }
        +
          +
        • +
          Optional cause?: T
        • +
        • +
          Optional data?: POJO
        • +
        • +
          Optional timestamp?: Date
      +

      Returns ErrorDBTransactionNotCommittedNorRollbacked<T>

    +
    +

    Properties

    +
    + +
    cause: T
    +

    Causation of the exception Can be used to know what caused this exception

    -
    data: POJO
    -

    Arbitrary data

    -
    message: string
    name: string
    stack?: string
    timestamp: Date
    -

    Timestamp when exception was constructed in milliseconds -May contain microseconds in the fractional part +

    +
    + +
    data: POJO
    +

    Arbitrary data

    +
    +
    + +
    message: string
    +
    + +
    name: string
    +
    + +
    stack?: string
    +
    + +
    timestamp: Date
    +

    Timestamp when exception was constructed in milliseconds Guaranteed to be weakly monotonic

    -
    description: string = 'DBTransaction is not comitted nor rollbacked'
    prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

    Type declaration

    stackTraceLimit: number

    Accessors

    • get description(): string
    • Returns string

    Methods

    • toJSON(): any
    +
    + +
    description: string = 'DBTransaction is not comitted nor rollbacked'
    +
    + +
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)
    +
    +

    Type declaration

    +
    +
    + +
    stackTraceLimit: number
    +
    +

    Accessors

    +
    + +
      +
    • get description(): string
    • +
    • +

      Returns string

    +
    +

    Methods

    +
    + +
      + +
    • +

      Encoding to JSON pojo When overriding this, you can use super.toJSON The replacer will:

      • delete undefined values in objects
      • replace undefined values for null in arrays
      -

    Returns any

    +
    + +
    +
    + +

    Type parameters

    Parameters

    Returns InstanceType<T>

    Generated using TypeDoc

    \ No newline at end of file + +
    +

    Type Parameters

    +
    +
    +

    Parameters

    +
    +

    Returns InstanceType<T>

    + +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/classes/errors.ErrorDBTransactionRollbacked.html b/docs/classes/errors.ErrorDBTransactionRollbacked.html index 248503a8..18ada822 100644 --- a/docs/classes/errors.ErrorDBTransactionRollbacked.html +++ b/docs/classes/errors.ErrorDBTransactionRollbacked.html @@ -1,29 +1,295 @@ -ErrorDBTransactionRollbacked | @matrixai/db
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class ErrorDBTransactionRollbacked<T>

    Type parameters

    • T

    Hierarchy

    Index

    Constructors

    • new ErrorDBTransactionRollbacked<T>(message?: string, options?: { cause?: T; data?: POJO; timestamp?: Date }): ErrorDBTransactionRollbacked<T>
    • Type parameters

      • T

      Parameters

      • Optional message: string
      • Optional options: { cause?: T; data?: POJO; timestamp?: Date }
        • Optional cause?: T
        • Optional data?: POJO
        • Optional timestamp?: Date

      Returns ErrorDBTransactionRollbacked<T>

    Properties

    cause: T
    -

    Causation of the exception +ErrorDBTransactionRollbacked | @matrixai/db

    +
    + +
    +
    +
    +
    + +

    Class ErrorDBTransactionRollbacked<T>

    +
    +

    Type Parameters

    +
      +
    • +

      T

    +
    +

    Hierarchy

    +
    +
    +
    +
    + +
    +
    +

    Constructors

    +
    +
    +

    Properties

    +
    +
    +

    Accessors

    +
    +
    +

    Methods

    +
    +
    +

    Constructors

    +
    + +
      + +
    • +
      +

      Type Parameters

      +
        +
      • +

        T

      +
      +

      Parameters

      +
        +
      • +
        Optional message: string
      • +
      • +
        Optional options: {
            cause?: T;
            data?: POJO;
            timestamp?: Date;
        }
        +
          +
        • +
          Optional cause?: T
        • +
        • +
          Optional data?: POJO
        • +
        • +
          Optional timestamp?: Date
      +

      Returns ErrorDBTransactionRollbacked<T>

    +
    +

    Properties

    +
    + +
    cause: T
    +

    Causation of the exception Can be used to know what caused this exception

    -
    data: POJO
    -

    Arbitrary data

    -
    message: string
    name: string
    stack?: string
    timestamp: Date
    -

    Timestamp when exception was constructed in milliseconds -May contain microseconds in the fractional part +

    +
    + +
    data: POJO
    +

    Arbitrary data

    +
    +
    + +
    message: string
    +
    + +
    name: string
    +
    + +
    stack?: string
    +
    + +
    timestamp: Date
    +

    Timestamp when exception was constructed in milliseconds Guaranteed to be weakly monotonic

    -
    description: string = 'DBTransaction is rollbacked'
    prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

    Type declaration

    stackTraceLimit: number

    Accessors

    • get description(): string
    • Returns string

    Methods

    • toJSON(): any
    +
    + +
    description: string = 'DBTransaction is rollbacked'
    +
    + +
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)
    +
    +

    Type declaration

    +
    +
    + +
    stackTraceLimit: number
    +
    +

    Accessors

    +
    + +
      +
    • get description(): string
    • +
    • +

      Returns string

    +
    +

    Methods

    +
    + +
      + +
    • +

      Encoding to JSON pojo When overriding this, you can use super.toJSON The replacer will:

      • delete undefined values in objects
      • replace undefined values for null in arrays
      -

    Returns any

    +
    + +
    +
    + +

    Type parameters

    Parameters

    Returns InstanceType<T>

    Generated using TypeDoc

    \ No newline at end of file + +
    +

    Type Parameters

    +
    +
    +

    Parameters

    +
    +

    Returns InstanceType<T>

    + +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/functions/utils.decodePart.html b/docs/functions/utils.decodePart.html new file mode 100644 index 00000000..69294e46 --- /dev/null +++ b/docs/functions/utils.decodePart.html @@ -0,0 +1,77 @@ +decodePart | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Function decodePart

    +
    +
      + +
    • +

      Decode level or key part from base 128 +The special empty symbol is decoded as an empty buffer

      +
      +
      +

      Parameters

      +
        +
      • +
        data: Buffer
      +

      Returns Buffer

    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/functions/utils.deserialize.html b/docs/functions/utils.deserialize.html new file mode 100644 index 00000000..a34e893b --- /dev/null +++ b/docs/functions/utils.deserialize.html @@ -0,0 +1,79 @@ +deserialize | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Function deserialize

    +
    +
      + +
    • +
      +

      Type Parameters

      +
        +
      • +

        T

      +
      +

      Parameters

      +
        +
      • +
        value_: Buffer
      +

      Returns T

    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/functions/utils.encodePart.html b/docs/functions/utils.encodePart.html new file mode 100644 index 00000000..9a208fb6 --- /dev/null +++ b/docs/functions/utils.encodePart.html @@ -0,0 +1,77 @@ +encodePart | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Function encodePart

    +
    +
      + +
    • +

      Encode level or key part using base 128 encoding +Empty parts are encoded with the special empty symbol

      +
      +
      +

      Parameters

      +
        +
      • +
        part: Buffer
      +

      Returns Buffer

    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/functions/utils.filterUndefined.html b/docs/functions/utils.filterUndefined.html new file mode 100644 index 00000000..90dcf06f --- /dev/null +++ b/docs/functions/utils.filterUndefined.html @@ -0,0 +1,78 @@ +filterUndefined | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Function filterUndefined

    +
    +
      + +
    • +

      Native addons expect strict optional properties +Properties that have the value undefined may be misinterpreted +Apply these to options objects before passing them to the native addon

      +
      +
      +

      Parameters

      +
        +
      • +
        o: object
      +

      Returns void

    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/functions/utils.fromArrayBuffer.html b/docs/functions/utils.fromArrayBuffer.html new file mode 100644 index 00000000..f4b2a53f --- /dev/null +++ b/docs/functions/utils.fromArrayBuffer.html @@ -0,0 +1,80 @@ +fromArrayBuffer | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Function fromArrayBuffer

    +
    +
      + +
    • +

      Wraps ArrayBuffer in Node Buffer with zero copy

      +
      +
      +

      Parameters

      +
        +
      • +
        b: ArrayBuffer
      • +
      • +
        Optional offset: number
      • +
      • +
        Optional length: number
      +

      Returns Buffer

    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/functions/utils.iterationOptions.html b/docs/functions/utils.iterationOptions.html new file mode 100644 index 00000000..eb9b552b --- /dev/null +++ b/docs/functions/utils.iterationOptions.html @@ -0,0 +1,81 @@ +iterationOptions | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Function iterationOptions

    +
    +
      + +
    • +
      +

      Type Parameters

      +
        +
      • +

        O extends {
            gt?: string | Buffer | readonly (string | Buffer)[];
            gte?: string | Buffer | readonly (string | Buffer)[];
            lt?: string | Buffer | readonly (string | Buffer)[];
            lte?: string | Buffer | readonly (string | Buffer)[];
        }

      +
      +

      Parameters

      +
        +
      • +
        options: O
      • +
      • +
        levelPath: readonly (string | Buffer)[]
      +

      Returns Merge<O, {
          gt?: Buffer;
          gte?: Buffer;
          keyEncoding: "buffer";
          lt?: Buffer;
          lte?: Buffer;
          valueEncoding: "buffer";
      }>

    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/functions/utils.keyPathToKey.html b/docs/functions/utils.keyPathToKey.html new file mode 100644 index 00000000..1975ea91 --- /dev/null +++ b/docs/functions/utils.keyPathToKey.html @@ -0,0 +1,80 @@ +keyPathToKey | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Function keyPathToKey

    +
    +
      + +
    • +

      Converts KeyPath to key buffer +e.g. ['A', 'B'] => !A!B (where ! is the sep) +An empty key path is converted to [''] +Level parts is allowed to contain the separator +Key actual part is allowed to contain the separator

      +
      +
      +

      Parameters

      +
        +
      • +
        keyPath: readonly (string | Buffer)[]
      +

      Returns Buffer

    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/functions/utils.levelPathToKey.html b/docs/functions/utils.levelPathToKey.html new file mode 100644 index 00000000..94c1bdc5 --- /dev/null +++ b/docs/functions/utils.levelPathToKey.html @@ -0,0 +1,78 @@ +levelPathToKey | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Function levelPathToKey

    +
    +
      + +
    • +

      Converts LevelPath to key buffer +e.g. ['A', 'B'] => !A!!B! (where ! is the sep) +Level parts are allowed to contain the separator before encoding

      +
      +
      +

      Parameters

      +
        +
      • +
        levelPath: readonly (string | Buffer)[]
      +

      Returns Buffer

    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/functions/utils.parseKey.html b/docs/functions/utils.parseKey.html new file mode 100644 index 00000000..019c10d1 --- /dev/null +++ b/docs/functions/utils.parseKey.html @@ -0,0 +1,84 @@ +parseKey | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Function parseKey

    +
    +
      + +
    • +

      Converts key buffer back into KeyPath +e.g. !A!!B!C => ['A', 'B', 'C'] (where ! is the sep) +Returned parts are always buffers

      +

      BNF grammar of key buffer: + path => levels:ls keyActual:k -> [...ls, k] | keyActual:k -> [k] + levels => level:l levels:ls -> [l, ...ls] | '' -> [] + level => sep .?:l sep -> l + sep => 0x00 + keyActual => .:k -> [k]

      +
      +
      +

      Parameters

      +
        +
      • +
        key: Buffer
      +

      Returns KeyPath

    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/functions/utils.promisify.html b/docs/functions/utils.promisify.html new file mode 100644 index 00000000..6054210a --- /dev/null +++ b/docs/functions/utils.promisify.html @@ -0,0 +1,109 @@ +promisify | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Function promisify

    +
    +
      + +
    • +

      Convert callback-style to promise-style +If this is applied to overloaded function +it will only choose one of the function signatures to use

      +
      +
      +

      Type Parameters

      +
        +
      • +

        T extends unknown[]

      • +
      • +

        P extends unknown[]

      • +
      • +

        R extends unknown[]

      +
      +

      Parameters

      +
        +
      • +
        f: ((...args: [...params: P[], callback: Callback<T, any, Error>]) => unknown)
        +
          +
        • +
            +
          • (...args: [...params: P[], callback: Callback<T, any, Error>]): unknown
          • +
          • +
            +

            Parameters

            +
              +
            • +
              Rest ...args: [...params: P[], callback: Callback<T, any, Error>]
            +

            Returns unknown

      +

      Returns ((...params: P) => Promise<R>)

      +
        +
      • +
          +
        • (...params: P): Promise<R>
        • +
        • +
          +

          Parameters

          +
            +
          • +
            Rest ...params: P
          +

          Returns Promise<R>

    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/functions/utils.sepExists.html b/docs/functions/utils.sepExists.html new file mode 100644 index 00000000..fea1851f --- /dev/null +++ b/docs/functions/utils.sepExists.html @@ -0,0 +1,77 @@ +sepExists | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Function sepExists

    +
    +
      + +
    • +

      Checks if the separator exists in a string or buffer +This only needs to applied to the LevelPath, not the final key

      +
      +
      +

      Parameters

      +
        +
      • +
        data: string | Buffer
      +

      Returns boolean

    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/functions/utils.serialize.html b/docs/functions/utils.serialize.html new file mode 100644 index 00000000..095306b3 --- /dev/null +++ b/docs/functions/utils.serialize.html @@ -0,0 +1,79 @@ +serialize | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Function serialize

    +
    +
      + +
    • +
      +

      Type Parameters

      +
        +
      • +

        T

      +
      +

      Parameters

      +
        +
      • +
        value: T
      +

      Returns Buffer

    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/functions/utils.toArrayBuffer.html b/docs/functions/utils.toArrayBuffer.html new file mode 100644 index 00000000..5791ff76 --- /dev/null +++ b/docs/functions/utils.toArrayBuffer.html @@ -0,0 +1,76 @@ +toArrayBuffer | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Function toArrayBuffer

    +
    +
      + +
    • +

      Slice-copies the Node Buffer to a new ArrayBuffer

      +
      +
      +

      Parameters

      +
        +
      • +
        b: Buffer
      +

      Returns ArrayBuffer

    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/functions/utils.toKeyPath.html b/docs/functions/utils.toKeyPath.html new file mode 100644 index 00000000..124f3680 --- /dev/null +++ b/docs/functions/utils.toKeyPath.html @@ -0,0 +1,77 @@ +toKeyPath | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Function toKeyPath

    +
    +
      + +
    • +

      Used to convert possible KeyPath into legal KeyPath +Returns a copy which can be mutated

      +
      +
      +

      Parameters

      +
        +
      • +
        keyPath: string | Buffer | readonly (string | Buffer)[]
      +

      Returns KeyPath

    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 3c3e5264..e494fb74 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,4 +1,18 @@ -@matrixai/db
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    @matrixai/db

    +@matrixai/db
    +
    + +
    +
    +
    +
    +

    @matrixai/db

    +

    js-db

    @@ -17,34 +31,35 @@

    js-db

    Installation

    -
    npm install --save @matrixai/db
    +
    npm install --save @matrixai/db
     

    Usage

    -
    import { DB } from '@matrixai/db';

    async function main () {

    const key = Buffer.from([
    0x00, 0x01, 0x02, 0x03, 0x00, 0x01, 0x02, 0x03,
    0x00, 0x01, 0x02, 0x03, 0x00, 0x01, 0x02, 0x03,
    ]);

    const encrypt = async (
    key: ArrayBuffer,
    plainText: ArrayBuffer
    ): Promise<ArrayBuffer> {
    return plainText;
    };

    const decrypt = async (
    key: ArrayBuffer,
    cipherText: ArrayBuffer
    ): Promise<ArrayBuffer | undefined> {
    return cipherText;
    }

    const db = await DB.createDB({
    dbPath: './tmp/db',
    crypto: {
    key,
    ops: { encrypt, decrypt },
    },
    fresh: true,
    });

    await db.put(['level', Buffer.from([0x30, 0x30]), 'a'], 'value');
    await db.put(['level', Buffer.from([0x30, 0x31]), 'b'], 'value');
    await db.put(['level', Buffer.from([0x30, 0x32]), 'c'], 'value');
    await db.put(['level', Buffer.from([0x30, 0x33]), 'c'], 'value');

    console.log(await db.get(['level', Buffer.from([0x30, 0x32]), 'c']));

    await db.del(['level', Buffer.from([0x30, 0x32]), 'c']);

    for await (const [kP, v] of db.iterator({
    lt: [Buffer.from([0x30, 0x32]), ''],
    }, ['level'])) {
    console.log(kP, v);
    }

    await db.stop();
    }

    main(); +
    import { DB } from '@matrixai/db';

    async function main () {

    const key = Buffer.from([
    0x00, 0x01, 0x02, 0x03, 0x00, 0x01, 0x02, 0x03,
    0x00, 0x01, 0x02, 0x03, 0x00, 0x01, 0x02, 0x03,
    ]);

    const encrypt = async (
    key: ArrayBuffer,
    plainText: ArrayBuffer
    ): Promise<ArrayBuffer> => {
    return plainText;
    };

    const decrypt = async (
    key: ArrayBuffer,
    cipherText: ArrayBuffer
    ): Promise<ArrayBuffer | undefined> => {
    return cipherText;
    }

    const db = await DB.createDB({
    dbPath: './tmp/db',
    crypto: {
    key,
    ops: { encrypt, decrypt },
    },
    fresh: true,
    });

    await db.put(['level', Buffer.from([0x30, 0x30]), 'a'], 'value');
    await db.put(['level', Buffer.from([0x30, 0x31]), 'b'], 'value');
    await db.put(['level', Buffer.from([0x30, 0x32]), 'c'], 'value');
    await db.put(['level', Buffer.from([0x30, 0x33]), 'c'], 'value');

    console.log(await db.get(['level', Buffer.from([0x30, 0x32]), 'c']));

    await db.del(['level', Buffer.from([0x30, 0x32]), 'c']);

    for await (const [kP, v] of db.iterator(
    ['level'],
    {
    lt: [Buffer.from([0x30, 0x32]), ''],
    })) {
    console.log(kP, v);
    }

    await db.stop();
    }

    main();

    If you created the DB with a crypto object, then upon restarting the DB, you must pass in the same crypto object.

    Development

    +

    This project uses Git submodules to bring in rocksdb. Make sure to clone recursively.

    Run nix-shell, and once you're inside, you can use:

    -
    # install (or reinstall packages from package.json)
    npm install
    # build the dist
    npm run build
    # run the repl (this allows you to import from ./src)
    npm run ts-node
    # run the tests
    npm run test
    # lint the source code
    npm run lint
    # automatically fix the source
    npm run lintfix +
    # install (or reinstall packages from package.json)
    npm install
    # build the dist
    npm run build
    # run the repl (this allows you to import from ./src)
    npm run ts-node
    # run the tests
    npm run test
    # lint the source code
    npm run lint
    # automatically fix the source
    npm run lintfix

    Benchmarks

    -
    npm run bench
    +
    npm run bench
     

    View benchmarks here: https://github.com/MatrixAI/js-db/blob/master/benches/results with https://raw.githack.com/

    Docs Generation

    -
    npm run docs
    +
    npm run docs
     

    See the docs at: https://matrixai.github.io/js-db/

    @@ -53,12 +68,60 @@

    Publishing

    Publishing is handled automatically by the staging pipeline.

    Prerelease:

    -
    # npm login
    npm version prepatch --preid alpha # premajor/preminor/prepatch
    git push --follow-tags +
    # npm login
    npm version prepatch --preid alpha # premajor/preminor/prepatch
    git push --follow-tags

    Release:

    -
    # npm login
    npm version patch # major/minor/patch
    git push --follow-tags +
    # npm login
    npm version patch # major/minor/patch
    git push --follow-tags

    Manually:

    -
    # npm login
    npm version patch # major/minor/patch
    npm run build
    npm publish --access public
    git push
    git push --tags +
    # npm login
    npm version patch # major/minor/patch
    npm run build
    npm publish --access public
    git push
    git push --tags
    -

    Legend

    • Property
    • Method
    • Property
    • Method
    • Inherited constructor
    • Inherited method
    • Protected property
    • Protected method
    • Static method

    Settings

    Theme

    Generated using TypeDoc

    \ No newline at end of file +
    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/interfaces/FileSystem.html b/docs/interfaces/FileSystem.html index 58310d15..8795cda3 100644 --- a/docs/interfaces/FileSystem.html +++ b/docs/interfaces/FileSystem.html @@ -1,27 +1,154 @@ -FileSystem | @matrixai/db
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Interface FileSystem

    Hierarchy

    • FileSystem

    Index

    Properties

    Properties

    promises: { mkdir: { (path: PathLike, options: MakeDirectoryOptions & { recursive: true }): Promise<string | undefined>; (path: PathLike, options?: null | Mode | (MakeDirectoryOptions & { recursive?: false })): Promise<void>; (path: PathLike, options?: null | MakeDirectoryOptions | Mode): Promise<string | undefined> }; rm: (path: PathLike, options?: RmOptions) => Promise<void> }

    Type declaration

    • mkdir: { (path: PathLike, options: MakeDirectoryOptions & { recursive: true }): Promise<string | undefined>; (path: PathLike, options?: null | Mode | (MakeDirectoryOptions & { recursive?: false })): Promise<void>; (path: PathLike, options?: null | MakeDirectoryOptions | Mode): Promise<string | undefined> }
        • (path: PathLike, options: MakeDirectoryOptions & { recursive: true }): Promise<string | undefined>
        • (path: PathLike, options?: null | Mode | (MakeDirectoryOptions & { recursive?: false })): Promise<void>
        • (path: PathLike, options?: null | MakeDirectoryOptions | Mode): Promise<string | undefined>
        • -

          Asynchronously creates a directory.

          -

          The optional options argument can be an integer specifying mode (permission +FileSystem | @matrixai/db

          +
          + +
          +
          +
          +
          + +

          Interface FileSystem

          +
          +

          Hierarchy

          +
            +
          • FileSystem
          +
          +
          +
          + +
          +
          +

          Properties

          +
          +
          +

          Properties

          +
          + +
          promises: {
              mkdir: {
                  (path: PathLike, options: MakeDirectoryOptions & {
                      recursive: true;
                  }): Promise<string | undefined>;
                  (path: PathLike, options?: null | Mode | MakeDirectoryOptions & {
                      recursive?: false;
                  }): Promise<void>;
                  (path: PathLike, options?: null | MakeDirectoryOptions | Mode): Promise<string | undefined>;
              };
              rm: ((path: PathLike, options?: RmOptions) => Promise<void>);
          }
          +
          +

          Type declaration

          +
            +
          • +
            mkdir: {
                (path: PathLike, options: MakeDirectoryOptions & {
                    recursive: true;
                }): Promise<string | undefined>;
                (path: PathLike, options?: null | Mode | MakeDirectoryOptions & {
                    recursive?: false;
                }): Promise<void>;
                (path: PathLike, options?: null | MakeDirectoryOptions | Mode): Promise<string | undefined>;
            }
            +
              +
            • +
                +
              • (path: PathLike, options: MakeDirectoryOptions & {
                    recursive: true;
                }): Promise<string | undefined>
              • +
              • +

                Asynchronously creates a directory.

                +

                The optional options argument can be an integer specifying mode (permission and sticky bits), or an object with a mode property and a recursiveproperty indicating whether parent directories should be created. CallingfsPromises.mkdir() when path is a directory that exists results in a rejection only when recursive is false.

                -
                since

                v10.0.0

                -

          Parameters

          • path: PathLike
          • options: MakeDirectoryOptions & { recursive: true }

          Returns Promise<string | undefined>

          Upon success, fulfills with undefined if recursive is false, or the first directory path created if recursive is true.

          -
        • -

          Asynchronous mkdir(2) - create a directory.

          -

          Parameters

          • path: PathLike
            -

            A path to a file. If a URL is provided, it must use the file: protocol.

            -
          • Optional options: null | Mode | (MakeDirectoryOptions & { recursive?: false })
            -

            Either the file mode, or an object optionally specifying the file mode and whether parent folders + +

            Since

            v10.0.0

            + +

            Returns

            Upon success, fulfills with undefined if recursive is false, or the first directory path created if recursive is true.

            +
            +
            +

            Parameters

            +
              +
            • +
              path: PathLike
            • +
            • +
              options: MakeDirectoryOptions & {
                  recursive: true;
              }
            +

            Returns Promise<string | undefined>

          • +
          • (path: PathLike, options?: null | Mode | MakeDirectoryOptions & {
                recursive?: false;
            }): Promise<void>
          • +
          • +

            Asynchronous mkdir(2) - create a directory.

            +
            +
            +

            Parameters

            +
              +
            • +
              path: PathLike
              +

              A path to a file. If a URL is provided, it must use the file: protocol.

              +
            • +
            • +
              Optional options: null | Mode | MakeDirectoryOptions & {
                  recursive?: false;
              }
              +

              Either the file mode, or an object optionally specifying the file mode and whether parent folders should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to 0o777.

              -

          Returns Promise<void>

        • -

          Asynchronous mkdir(2) - create a directory.

          -

          Parameters

          • path: PathLike
            -

            A path to a file. If a URL is provided, it must use the file: protocol.

            -
          • Optional options: null | MakeDirectoryOptions | Mode
            -

            Either the file mode, or an object optionally specifying the file mode and whether parent folders +

    +

    Returns Promise<void>

    +
  • (path: PathLike, options?: null | MakeDirectoryOptions | Mode): Promise<string | undefined>
  • +
  • +

    Asynchronous mkdir(2) - create a directory.

    +
    +
    +

    Parameters

    +
      +
    • +
      path: PathLike
      +

      A path to a file. If a URL is provided, it must use the file: protocol.

      +
    • +
    • +
      Optional options: null | MakeDirectoryOptions | Mode
      +

      Either the file mode, or an object optionally specifying the file mode and whether parent folders should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to 0o777.

      -
  • Returns Promise<string | undefined>

  • rm: (path: PathLike, options?: RmOptions) => Promise<void>
      • (path: PathLike, options?: RmOptions): Promise<void>
      • -

        Removes files and directories (modeled on the standard POSIX rm utility).

        -
        since

        v14.14.0

        -

        Parameters

        • path: PathLike
        • Optional options: RmOptions

        Returns Promise<void>

        Fulfills with undefined upon success.

        -
  • Legend

    • Property
    • Method
    • Property
    • Method
    • Inherited constructor
    • Inherited method
    • Protected property
    • Protected method
    • Static method

    Settings

    Theme

    Generated using TypeDoc

    \ No newline at end of file + +

    Returns Promise<string | undefined>

    +
  • +
    rm: ((path: PathLike, options?: RmOptions) => Promise<void>)
    +
      +
    • +
        +
      • (path: PathLike, options?: RmOptions): Promise<void>
      • +
      • +

        Removes files and directories (modeled on the standard POSIX rm utility).

        + +

        Since

        v14.14.0

        + +

        Returns

        Fulfills with undefined upon success.

        +
        +
        +

        Parameters

        +
          +
        • +
          path: PathLike
        • +
        • +
          Optional options: RmOptions
        +

        Returns Promise<void>

  • + +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/interfaces/ToString.html b/docs/interfaces/ToString.html deleted file mode 100644 index f253b2fd..00000000 --- a/docs/interfaces/ToString.html +++ /dev/null @@ -1,3 +0,0 @@ -ToString | @matrixai/db
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Interface ToString

    -

    Any type that can be turned into a string

    -

    Hierarchy

    • ToString

    Index

    Methods

    Methods

    • toString(): string

    Legend

    • Property
    • Method
    • Property
    • Method
    • Inherited constructor
    • Inherited method
    • Protected property
    • Protected method
    • Static method

    Settings

    Theme

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/native.RocksDB.html b/docs/interfaces/native.RocksDB.html index 32e14284..fc792b1e 100644 --- a/docs/interfaces/native.RocksDB.html +++ b/docs/interfaces/native.RocksDB.html @@ -1 +1,978 @@ -RocksDB | @matrixai/db
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Interface RocksDB

    Hierarchy

    • RocksDB

    Index

    Methods

    • batchPut(batch: RocksDBBatch, key: string | Buffer, value: string | Buffer): void
    • dbApproximateSize(database: RocksDBDatabase, start: string | Buffer, end: string | Buffer, callback: Callback<[number], void, Error>): void
    • dbCompactRange(database: RocksDBDatabase, start: string | Buffer, end: string | Buffer, callback: Callback<[], void, Error>): void
    • destroyDb(location: string, callback: Callback<[], void, Error>): void
    • iteratorClose(iterator: RocksDBIterator<string | Buffer, string | Buffer>, callback: Callback<[], void, Error>): void
    • iteratorNextv<K, V>(iterator: RocksDBIterator<K, V>, size: number, callback: Callback<[[K, V][], boolean], void, Error>): void
    • iteratorSeek<K>(iterator: RocksDBIterator<K, string | Buffer>, target: K): void
    • repairDb(location: string, callback: Callback<[], void, Error>): void
    • transactionPut(transaction: RocksDBTransaction, key: string | Buffer, value: string | Buffer, callback: Callback<[], void, Error>): void

    Legend

    • Property
    • Method
    • Property
    • Method
    • Inherited constructor
    • Inherited method
    • Protected property
    • Protected method
    • Static method

    Settings

    Theme

    Generated using TypeDoc

    \ No newline at end of file +RocksDB | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Interface RocksDB

    +
    +

    Hierarchy

    +
      +
    • RocksDB
    +
    +
    +
    + +
    +
    +

    Methods

    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
      + +
    • +
      +

      Parameters

      +
        +
      • +
        location: string
      • +
      • +
        callback: Callback<[], void, Error>
      +

      Returns void

    +
    + +
    +
    + +
    +
    + +
      + +
    • +
      +

      Type Parameters

      +
        +
      • +

        K extends string | Buffer

      • +
      • +

        V extends string | Buffer

      +
      +

      Parameters

      +
      +

      Returns void

    +
    + +
    +
    + +
      + +
    • +
      +

      Parameters

      +
        +
      • +
        location: string
      • +
      • +
        callback: Callback<[], void, Error>
      +

      Returns void

    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/interfaces/native.RocksDBP.html b/docs/interfaces/native.RocksDBP.html index 8a5545a2..5bc6c14d 100644 --- a/docs/interfaces/native.RocksDBP.html +++ b/docs/interfaces/native.RocksDBP.html @@ -1 +1,912 @@ -RocksDBP | @matrixai/db
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Interface RocksDBP

    Hierarchy

    • RocksDBP

    Index

    Methods

    • batchPut(batch: RocksDBBatch, key: string | Buffer, value: string | Buffer): void
    • dbApproximateSize(database: RocksDBDatabase, start: string | Buffer, end: string | Buffer): Promise<number>
    • dbCompactRange(database: RocksDBDatabase, start: string | Buffer, end: string | Buffer): Promise<void>
    • destroyDb(location: string): Promise<void>
    • iteratorClose(iterator: RocksDBIterator<string | Buffer, string | Buffer>): Promise<void>
    • iteratorNextv<K, V>(iterator: RocksDBIterator<K, V>, size: number): Promise<[[K, V][], boolean]>
    • iteratorSeek<K>(iterator: RocksDBIterator<K, string | Buffer>, target: K): void
    • repairDb(location: string): Promise<void>
    • transactionPut(transaction: RocksDBTransaction, key: string | Buffer, value: string | Buffer): Promise<void>

    Legend

    • Property
    • Method
    • Property
    • Method
    • Inherited constructor
    • Inherited method
    • Protected property
    • Protected method
    • Static method

    Settings

    Theme

    Generated using TypeDoc

    \ No newline at end of file +RocksDBP | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Interface RocksDBP

    +
    +

    Hierarchy

    +
      +
    • RocksDBP
    +
    +
    +
    + +
    +
    +

    Methods

    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
      + +
    • +
      +

      Parameters

      +
        +
      • +
        location: string
      +

      Returns Promise<void>

    +
    + +
    +
    + +
    +
    + +
      + +
    • +
      +

      Type Parameters

      +
        +
      • +

        K extends string | Buffer

      • +
      • +

        V extends string | Buffer

      +
      +

      Parameters

      +
      +

      Returns Promise<[[K, V][], boolean]>

    +
    + +
    +
    + +
      + +
    • +
      +

      Parameters

      +
        +
      • +
        location: string
      +

      Returns Promise<void>

    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/modules.html b/docs/modules.html index a6be2c20..af0d5aa2 100644 --- a/docs/modules.html +++ b/docs/modules.html @@ -1,29 +1,99 @@ -@matrixai/db
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    @matrixai/db

    Index

    Type aliases

    Callback<P, R, E>: { (e: E, ...params: Partial<P>): R; (e?: null, ...params: P): R }

    Type parameters

    • P: any[] = []

    • R = any

    • E: Error = Error

    Type declaration

      • (e: E, ...params: Partial<P>): R
      • (e?: null, ...params: P): R
      • -

        Generic callback

        -

        Parameters

        • e: E
        • Rest ...params: Partial<P>

        Returns R

      • -

        Generic callback

        -

        Parameters

        • Optional e: null
        • Rest ...params: P

        Returns R

    Crypto: { decrypt: any; encrypt: any }
    -

    Crypto utility object -Remember ever Node Buffer is an ArrayBuffer

    -

    Type declaration

    • decrypt:function
      • decrypt(key: ArrayBuffer, cipherText: ArrayBuffer): Promise<undefined | ArrayBuffer>
      • Parameters

        • key: ArrayBuffer
        • cipherText: ArrayBuffer

        Returns Promise<undefined | ArrayBuffer>

    • encrypt:function
      • encrypt(key: ArrayBuffer, plainText: ArrayBuffer): Promise<ArrayBuffer>
      • Parameters

        • key: ArrayBuffer
        • plainText: ArrayBuffer

        Returns Promise<ArrayBuffer>

    DBClearOptions<S>: Merge<RocksDBClearOptions<S>, { gt?: KeyPath | Buffer | string; gte?: KeyPath | Buffer | string; lt?: KeyPath | Buffer | string; lte?: KeyPath | Buffer | string }>

    Type parameters

    DBCountOptions<S>: Merge<RocksDBCountOptions<S>, { gt?: KeyPath | Buffer | string; gte?: KeyPath | Buffer | string; lt?: KeyPath | Buffer | string; lte?: KeyPath | Buffer | string }>

    Type parameters

    DBIteratorOptions<S>: Merge<Omit<RocksDBIteratorOptions<S>, "keyEncoding" | "valueEncoding">, { gt?: KeyPath | Buffer | string; gte?: KeyPath | Buffer | string; keyAsBuffer?: boolean; lt?: KeyPath | Buffer | string; lte?: KeyPath | Buffer | string; valueAsBuffer?: boolean }>
    -

    Iterator options -The keyAsBuffer property controls -whether DBIterator returns KeyPath as buffers or as strings -It should be considered to default to true -The valueAsBuffer property controls value type -It should be considered to default to true

    -

    Type parameters

    DBOp: ({ type: "put" } & DBOp_) | ({ type: "del" } & Omit<DBOp_, "value" | "raw">)
    DBOps: DBOp[]
    DBOptions: Omit<RocksDBDatabaseOptions, "createIfMissing" | "errorIfExists">
    DBWorkerManagerInterface: WorkerManagerInterface<Crypto>
    KeyPath: Readonly<(string | Buffer)[]>
    -

    Path to a key -This must be an non-empty array

    -
    LevelPath: Readonly<(string | Buffer)[]>
    -

    Path to a DB level -Empty level path refers to the root level

    -
    Merge<A, B>: { [ K in keyof A & B]: K extends keyof B ? B[K] : K extends keyof A ? A[K] : never }
    -

    Merge A property types with B property types -while B's property types override A's property types

    -

    Type parameters

    • A

    • B

    MultiLockRequest: [key: ToString, lockingParams: Parameters<RWLockWriter["lock"]>]
    Opaque<K, T>: T & { [brand]: K }
    -

    Opaque types are wrappers of existing types -that require smart constructors

    -

    Type parameters

    • K

    • T

    POJO: {}
    -

    Plain data dictionary

    -

    Type declaration

    • [key: string]: any

    Legend

    • Property
    • Method
    • Property
    • Method
    • Inherited constructor
    • Inherited method
    • Protected property
    • Protected method
    • Static method

    Settings

    Theme

    Generated using TypeDoc

    \ No newline at end of file +@matrixai/db
    +
    + +
    +
    +
    +
    +

    @matrixai/db

    +
    +
    +

    Index

    +
    +

    Namespaces

    +
    +
    +

    Classes

    +
    +
    +

    Interfaces

    +
    +
    +

    Type Aliases

    +
    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/modules/errors.html b/docs/modules/errors.html index 8c094ab4..fb0af23f 100644 --- a/docs/modules/errors.html +++ b/docs/modules/errors.html @@ -1 +1,98 @@ -errors | @matrixai/db
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Namespace errors

    Legend

    • Property
    • Method
    • Property
    • Method
    • Inherited constructor
    • Inherited method
    • Protected property
    • Protected method
    • Static method

    Settings

    Theme

    Generated using TypeDoc

    \ No newline at end of file +errors | @matrixai/db
    +
    + +
    + +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/modules/native.html b/docs/modules/native.html index 81f21d78..c49b47a5 100644 --- a/docs/modules/native.html +++ b/docs/modules/native.html @@ -1,51 +1,104 @@ -native | @matrixai/db
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Namespace native

    Index

    Type aliases

    RocksDBBatch: Opaque<"RocksDBBatch", object>
    -

    RocksDBBatch object -A napi_external type

    -
    RocksDBBatchDelOperation: { key: string | Buffer; type: "del" }

    Type declaration

    • key: string | Buffer
    • type: "del"
    RocksDBBatchOptions: RocksDBPutOptions
    -

    Batch options

    -
    RocksDBBatchPutOperation: { key: string | Buffer; type: "put"; value: string | Buffer }

    Type declaration

    • key: string | Buffer
    • type: "put"
    • value: string | Buffer
    RocksDBClearOptions<S>: Omit<RocksDBRangeOptions, "reverse"> & { snapshot?: S; sync?: S extends RocksDBSnapshot ? boolean : void }
    -

    Clear options

    -

    Type parameters

    RocksDBCountOptions<S>: Omit<RocksDBRangeOptions, "reverse"> & { snapshot?: S }
    -

    Count options

    -

    Type parameters

    RocksDBDatabase: Opaque<"RocksDBDatabase", object>
    -

    RocksDBDatabase object -A napi_external type

    -
    RocksDBDatabaseOptions: { blockRestartInterval?: number; blockSize?: number; cacheSize?: number; compression?: boolean; createIfMissing?: boolean; errorIfExists?: boolean; infoLogLevel?: "debug" | "info" | "warn" | "error" | "fatal" | "header"; maxFileSize?: number; maxOpenFiles?: number; writeBufferSize?: number }
    -

    RocksDB database options

    -

    Type declaration

    • Optional blockRestartInterval?: number
    • Optional blockSize?: number
    • Optional cacheSize?: number
    • Optional compression?: boolean
    • Optional createIfMissing?: boolean
    • Optional errorIfExists?: boolean
    • Optional infoLogLevel?: "debug" | "info" | "warn" | "error" | "fatal" | "header"
    • Optional maxFileSize?: number
    • Optional maxOpenFiles?: number
    • Optional writeBufferSize?: number
    RocksDBDelOptions: RocksDBPutOptions
    -

    Del options

    -
    RocksDBGetOptions<S>: { fillCache?: boolean; snapshot?: S; valueEncoding?: "utf8" | "buffer" }
    -

    Get options

    -

    Type parameters

    Type declaration

    • Optional fillCache?: boolean
    • Optional snapshot?: S
    • Optional valueEncoding?: "utf8" | "buffer"
    RocksDBIterator<K, V>: Opaque<"RocksDBIterator", object> & { [brandRocksDBIteratorK]: K; [brandRocksDBIteratorV]: V }
    -

    RocksDBIterator object -A napi_external type -If keys or values is set to false then -K and V will be an empty buffer -If keys and values is set to false, the iterator will -give back empty array as entries

    -

    Type parameters

    • K: string | Buffer = string | Buffer

    • V: string | Buffer = string | Buffer

    RocksDBIteratorOptions<S>: RocksDBGetOptions<S> & RocksDBRangeOptions & { highWaterMarkBytes?: number; keyEncoding?: "utf8" | "buffer"; keys?: boolean; values?: boolean }
    -

    Iterator options

    -

    Type parameters

    RocksDBPutOptions: { sync?: boolean }
    -

    Put options

    -

    Type declaration

    • Optional sync?: boolean
      -

      If true, rocksdb will perform fsync() before completing operation -It is still asynchronous relative to Node.js -If the operating system crashes, writes may be lost -Prefer to flip this to be true when a transaction batch is written -This will amortize the cost of fsync() across the entire transaction

      -
    RocksDBRangeOptions: { gt?: string | Buffer; gte?: string | Buffer; limit?: number; lt?: string | Buffer; lte?: string | Buffer; reverse?: boolean }
    -

    Range options

    -

    Type declaration

    • Optional gt?: string | Buffer
    • Optional gte?: string | Buffer
    • Optional limit?: number
    • Optional lt?: string | Buffer
    • Optional lte?: string | Buffer
    • Optional reverse?: boolean
    RocksDBSnapshot: Opaque<"RocksDBSnapshot", object>
    -

    RocksDBSnapshot object -A napi_external type

    -
    RocksDBTransaction: Opaque<"RocksDBTransaction", object>
    -

    RocksDBTransaction object -A napi_external type

    -
    RocksDBTransactionOptions: RocksDBPutOptions
    -

    Transaction options

    -
    RocksDBTransactionSnapshot: Opaque<"RocksDBTransactionSnapshot", object>
    -

    RocksDBTransactionSnapshot object -A napi_external type

    -

    Variables

    rocksdb: RocksDB = ...
    rocksdbP: RocksDBP = ...
    -

    Promisified version of RocksDB

    -

    Legend

    • Property
    • Method
    • Property
    • Method
    • Inherited constructor
    • Inherited method
    • Protected property
    • Protected method
    • Static method

    Settings

    Theme

    Generated using TypeDoc

    \ No newline at end of file +native | @matrixai/db
    +
    + +
    + +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/modules/utils.html b/docs/modules/utils.html index 149b0c62..ad1de6bd 100644 --- a/docs/modules/utils.html +++ b/docs/modules/utils.html @@ -1,52 +1,87 @@ -utils | @matrixai/db
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Namespace utils

    Index

    Variables

    sep: Buffer = ...
    -

    Separator is a single null byte -This special symbol must not appear in the encoded parts

    -

    Functions

    • decodePart(data: Buffer): Buffer
    • -

      Decode level or key part from base 128 -The special empty symbol is decoded as an empty buffer

      -

      Parameters

      • data: Buffer

      Returns Buffer

    • deserialize<T>(value_: Buffer): T
    • encodePart(part: Buffer): Buffer
    • -

      Encode level or key part using base 128 encoding -Empty parts are encoded with the special empty symbol

      -

      Parameters

      • part: Buffer

      Returns Buffer

    • filterUndefined(o: object): void
    • -

      Native addons expect strict optional properties -Properties that have the value undefined may be misinterpreted -Apply these to options objects before passing them to the native addon

      -

      Parameters

      • o: object

      Returns void

    • fromArrayBuffer(b: ArrayBuffer, offset?: number, length?: number): Buffer
    • -

      Wraps ArrayBuffer in Node Buffer with zero copy

      -

      Parameters

      • b: ArrayBuffer
      • Optional offset: number
      • Optional length: number

      Returns Buffer

    • iterationOptions<O>(options: O, levelPath: readonly (string | Buffer)[]): Merge<O, { gt?: Buffer; gte?: Buffer; keyEncoding: "buffer"; lt?: Buffer; lte?: Buffer; valueEncoding: "buffer" }>
    • Type parameters

      • O: { gt?: string | Buffer | readonly (string | Buffer)[]; gte?: string | Buffer | readonly (string | Buffer)[]; lt?: string | Buffer | readonly (string | Buffer)[]; lte?: string | Buffer | readonly (string | Buffer)[] }

      Parameters

      • options: O
      • levelPath: readonly (string | Buffer)[]

      Returns Merge<O, { gt?: Buffer; gte?: Buffer; keyEncoding: "buffer"; lt?: Buffer; lte?: Buffer; valueEncoding: "buffer" }>

    • keyPathToKey(keyPath: readonly (string | Buffer)[]): Buffer
    • -

      Converts KeyPath to key buffer -e.g. ['A', 'B'] => !A!B (where ! is the sep) -An empty key path is converted to [''] -Level parts is allowed to contain the separator -Key actual part is allowed to contain the separator

      -

      Parameters

      • keyPath: readonly (string | Buffer)[]

      Returns Buffer

    • levelPathToKey(levelPath: readonly (string | Buffer)[]): Buffer
    • -

      Converts LevelPath to key buffer -e.g. ['A', 'B'] => !A!!B! (where ! is the sep) -Level parts are allowed to contain the separator before encoding

      -

      Parameters

      • levelPath: readonly (string | Buffer)[]

      Returns Buffer

    • -

      Converts key buffer back into KeyPath -e.g. !A!!B!C => ['A', 'B', 'C'] (where ! is the sep) -Returned parts are always buffers

      -

      BNF grammar of key buffer: - path => levels:ls keyActual:k -> [...ls, k] | keyActual:k -> [k] - levels => level:l levels:ls -> [l, ...ls] | '' -> [] - level => sep .?:l sep -> l - sep => 0x00 - keyActual => .:k -> [k]

      -

      Parameters

      • key: Buffer

      Returns KeyPath

    • promisify<T, P, R>(f: (...args: [...params: P[], callback: Callback<T, any, Error>]) => unknown): (...params: P) => Promise<R>
    • -

      Convert callback-style to promise-style -If this is applied to overloaded function -it will only choose one of the function signatures to use

      -

      Type parameters

      • T: unknown[]

      • P: unknown[]

      • R: unknown[]

      Parameters

      • f: (...args: [...params: P[], callback: Callback<T, any, Error>]) => unknown
          • (...args: [...params: P[], callback: Callback<T, any, Error>]): unknown
          • Parameters

            • Rest ...args: [...params: P[], callback: Callback<T, any, Error>]

            Returns unknown

      Returns (...params: P) => Promise<R>

        • (...params: P): Promise<R>
        • -

          Convert callback-style to promise-style -If this is applied to overloaded function -it will only choose one of the function signatures to use

          -

          Parameters

          • Rest ...params: P

          Returns Promise<R>

    • sepExists(data: string | Buffer): boolean
    • -

      Checks if the separator exists in a string or buffer -This only needs to applied to the LevelPath, not the final key

      -

      Parameters

      • data: string | Buffer

      Returns boolean

    • serialize<T>(value: T): Buffer
    • toArrayBuffer(b: Buffer): ArrayBuffer
    • -

      Slice-copies the Node Buffer to a new ArrayBuffer

      -

      Parameters

      • b: Buffer

      Returns ArrayBuffer

    • toKeyPath(keyPath: string | Buffer | readonly (string | Buffer)[]): KeyPath
    • -

      Used to convert possible KeyPath into legal KeyPath -Returns a copy which can be mutated

      -

      Parameters

      • keyPath: string | Buffer | readonly (string | Buffer)[]

      Returns KeyPath

    Legend

    • Property
    • Method
    • Property
    • Method
    • Inherited constructor
    • Inherited method
    • Protected property
    • Protected method
    • Static method

    Settings

    Theme

    Generated using TypeDoc

    \ No newline at end of file +utils | @matrixai/db
    +
    + +
    +
    + +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/types/Callback.html b/docs/types/Callback.html new file mode 100644 index 00000000..f2f86917 --- /dev/null +++ b/docs/types/Callback.html @@ -0,0 +1,106 @@ +Callback | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Type alias Callback<P, R, E>

    +
    Callback<P, R, E>: {
        (e: E, ...params: Partial<P>): R;
        (e?: null, ...params: P): R;
    }
    +
    +

    Type Parameters

    +
      +
    • +

      P extends any[] = []

    • +
    • +

      R = any

    • +
    • +

      E extends Error = Error

    +
    +

    Type declaration

    +
      +
    • +
        +
      • (e: E, ...params: Partial<P>): R
      • +
      • +

        Generic callback

        +
        +
        +

        Parameters

        +
          +
        • +
          e: E
        • +
        • +
          Rest ...params: Partial<P>
        +

        Returns R

      • +
      • (e?: null, ...params: P): R
      • +
      • +

        Generic callback

        +
        +
        +

        Parameters

        +
          +
        • +
          Optional e: null
        • +
        • +
          Rest ...params: P
        +

        Returns R

    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/types/Crypto.html b/docs/types/Crypto.html new file mode 100644 index 00000000..7806c39f --- /dev/null +++ b/docs/types/Crypto.html @@ -0,0 +1,104 @@ +Crypto | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Type alias Crypto

    +
    Crypto: {
        decrypt(key: ArrayBuffer, cipherText: ArrayBuffer): Promise<undefined | ArrayBuffer>;
        encrypt(key: ArrayBuffer, plainText: ArrayBuffer): Promise<ArrayBuffer>;
    }
    +

    Crypto utility object +Remember ever Node Buffer is an ArrayBuffer

    +
    +
    +

    Type declaration

    +
      +
    • +
      decrypt:function
      +
        + +
      • +
        +

        Parameters

        +
          +
        • +
          key: ArrayBuffer
        • +
        • +
          cipherText: ArrayBuffer
        +

        Returns Promise<undefined | ArrayBuffer>

    • +
    • +
      encrypt:function
      +
        + +
      • +
        +

        Parameters

        +
          +
        • +
          key: ArrayBuffer
        • +
        • +
          plainText: ArrayBuffer
        +

        Returns Promise<ArrayBuffer>

    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/types/DBBatch.html b/docs/types/DBBatch.html new file mode 100644 index 00000000..f45ec828 --- /dev/null +++ b/docs/types/DBBatch.html @@ -0,0 +1,68 @@ +DBBatch | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Type alias DBBatch

    +
    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/types/DBClearOptions.html b/docs/types/DBClearOptions.html new file mode 100644 index 00000000..1a9eb405 --- /dev/null +++ b/docs/types/DBClearOptions.html @@ -0,0 +1,73 @@ +DBClearOptions | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Type alias DBClearOptions<S>

    +
    DBClearOptions<S>: Merge<RocksDBClearOptions<S>, {
        gt?: KeyPath | Buffer | string;
        gte?: KeyPath | Buffer | string;
        lt?: KeyPath | Buffer | string;
        lte?: KeyPath | Buffer | string;
    }>
    +
    +

    Type Parameters

    +
    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/types/DBCountOptions.html b/docs/types/DBCountOptions.html new file mode 100644 index 00000000..e0520ebe --- /dev/null +++ b/docs/types/DBCountOptions.html @@ -0,0 +1,73 @@ +DBCountOptions | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Type alias DBCountOptions<S>

    +
    DBCountOptions<S>: Merge<RocksDBCountOptions<S>, {
        gt?: KeyPath | Buffer | string;
        gte?: KeyPath | Buffer | string;
        lt?: KeyPath | Buffer | string;
        lte?: KeyPath | Buffer | string;
    }>
    +
    +

    Type Parameters

    +
    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/types/DBIteratorOptions.html b/docs/types/DBIteratorOptions.html new file mode 100644 index 00000000..3ff6a409 --- /dev/null +++ b/docs/types/DBIteratorOptions.html @@ -0,0 +1,80 @@ +DBIteratorOptions | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Type alias DBIteratorOptions<S>

    +
    DBIteratorOptions<S>: Merge<Omit<RocksDBIteratorOptions<S>, "keyEncoding" | "valueEncoding">, {
        gt?: KeyPath | Buffer | string;
        gte?: KeyPath | Buffer | string;
        keyAsBuffer?: boolean;
        lt?: KeyPath | Buffer | string;
        lte?: KeyPath | Buffer | string;
        valueAsBuffer?: boolean;
    }>
    +

    Iterator options +The keyAsBuffer property controls +whether DBIterator returns KeyPath as buffers or as strings +It should be considered to default to true +The valueAsBuffer property controls value type +It should be considered to default to true

    +
    +
    +

    Type Parameters

    +
    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/types/DBOp.html b/docs/types/DBOp.html new file mode 100644 index 00000000..a6eec981 --- /dev/null +++ b/docs/types/DBOp.html @@ -0,0 +1,68 @@ +DBOp | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Type alias DBOp

    +
    DBOp: {
        type: "put";
    } & DBOp_ | {
        type: "del";
    } & Omit<DBOp_, "value" | "raw">
    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/types/DBOps.html b/docs/types/DBOps.html new file mode 100644 index 00000000..1fbd6f3f --- /dev/null +++ b/docs/types/DBOps.html @@ -0,0 +1,68 @@ +DBOps | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Type alias DBOps

    +
    DBOps: DBOp[]
    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/types/DBOptions.html b/docs/types/DBOptions.html new file mode 100644 index 00000000..4e2be642 --- /dev/null +++ b/docs/types/DBOptions.html @@ -0,0 +1,68 @@ +DBOptions | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Type alias DBOptions

    +
    DBOptions: Omit<RocksDBDatabaseOptions, "createIfMissing" | "errorIfExists">
    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/types/DBWorkerManagerInterface.html b/docs/types/DBWorkerManagerInterface.html new file mode 100644 index 00000000..cd2c87f8 --- /dev/null +++ b/docs/types/DBWorkerManagerInterface.html @@ -0,0 +1,68 @@ +DBWorkerManagerInterface | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Type alias DBWorkerManagerInterface

    +
    DBWorkerManagerInterface: WorkerManagerInterface<Crypto>
    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/types/KeyPath.html b/docs/types/KeyPath.html new file mode 100644 index 00000000..c53706f4 --- /dev/null +++ b/docs/types/KeyPath.html @@ -0,0 +1,71 @@ +KeyPath | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Type alias KeyPath

    +
    KeyPath: Readonly<(string | Buffer)[]>
    +

    Path to a key +This must be an non-empty array

    +
    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/types/LevelPath.html b/docs/types/LevelPath.html new file mode 100644 index 00000000..f4c7da40 --- /dev/null +++ b/docs/types/LevelPath.html @@ -0,0 +1,71 @@ +LevelPath | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Type alias LevelPath

    +
    LevelPath: Readonly<(string | Buffer)[]>
    +

    Path to a DB level +Empty level path refers to the root level

    +
    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/types/Merge.html b/docs/types/Merge.html new file mode 100644 index 00000000..e8879801 --- /dev/null +++ b/docs/types/Merge.html @@ -0,0 +1,78 @@ +Merge | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Type alias Merge<A, B>

    +
    Merge<A, B>: { [ K in keyof (A & B)]: K extends keyof B ? B[K] : K extends keyof A ? A[K] : never }
    +

    Merge A property types with B property types +while B's property types override A's property types

    +
    +
    +

    Type Parameters

    +
      +
    • +

      A

    • +
    • +

      B

    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/types/Opaque.html b/docs/types/Opaque.html new file mode 100644 index 00000000..c5ed08f4 --- /dev/null +++ b/docs/types/Opaque.html @@ -0,0 +1,78 @@ +Opaque | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Type alias Opaque<K, T>

    +
    Opaque<K, T>: T & {
        [brand]: K;
    }
    +

    Opaque types are wrappers of existing types +that require smart constructors

    +
    +
    +

    Type Parameters

    +
      +
    • +

      K

    • +
    • +

      T

    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/types/POJO.html b/docs/types/POJO.html new file mode 100644 index 00000000..7dfc5281 --- /dev/null +++ b/docs/types/POJO.html @@ -0,0 +1,75 @@ +POJO | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Type alias POJO

    +
    POJO: {
        [key: string]: any;
    }
    +

    Plain data dictionary

    +
    +
    +

    Type declaration

    +
      +
    • +
      [key: string]: any
    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/types/native.RocksDBBatch.html b/docs/types/native.RocksDBBatch.html new file mode 100644 index 00000000..447f36ba --- /dev/null +++ b/docs/types/native.RocksDBBatch.html @@ -0,0 +1,75 @@ +RocksDBBatch | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Type alias RocksDBBatch

    +
    RocksDBBatch: Opaque<"RocksDBBatch", object>
    +

    RocksDBBatch object +A napi_external type

    +
    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/types/native.RocksDBBatchDelOperation.html b/docs/types/native.RocksDBBatchDelOperation.html new file mode 100644 index 00000000..3ed8f479 --- /dev/null +++ b/docs/types/native.RocksDBBatchDelOperation.html @@ -0,0 +1,79 @@ +RocksDBBatchDelOperation | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Type alias RocksDBBatchDelOperation

    +
    RocksDBBatchDelOperation: {
        key: string | Buffer;
        type: "del";
    }
    +
    +

    Type declaration

    +
      +
    • +
      key: string | Buffer
    • +
    • +
      type: "del"
    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/types/native.RocksDBBatchOptions.html b/docs/types/native.RocksDBBatchOptions.html new file mode 100644 index 00000000..c0041141 --- /dev/null +++ b/docs/types/native.RocksDBBatchOptions.html @@ -0,0 +1,74 @@ +RocksDBBatchOptions | @matrixai/db
    +
    + +
    + +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/types/native.RocksDBBatchPutOperation.html b/docs/types/native.RocksDBBatchPutOperation.html new file mode 100644 index 00000000..9617e8dc --- /dev/null +++ b/docs/types/native.RocksDBBatchPutOperation.html @@ -0,0 +1,81 @@ +RocksDBBatchPutOperation | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Type alias RocksDBBatchPutOperation

    +
    RocksDBBatchPutOperation: {
        key: string | Buffer;
        type: "put";
        value: string | Buffer;
    }
    +
    +

    Type declaration

    +
      +
    • +
      key: string | Buffer
    • +
    • +
      type: "put"
    • +
    • +
      value: string | Buffer
    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/types/native.RocksDBClearOptions.html b/docs/types/native.RocksDBClearOptions.html new file mode 100644 index 00000000..5acb9381 --- /dev/null +++ b/docs/types/native.RocksDBClearOptions.html @@ -0,0 +1,79 @@ +RocksDBClearOptions | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Type alias RocksDBClearOptions<S>

    +
    RocksDBClearOptions<S>: Omit<RocksDBRangeOptions, "reverse"> & {
        snapshot?: S;
        sync?: S extends RocksDBSnapshot ? boolean : void;
    }
    +

    Clear options

    +
    +
    +

    Type Parameters

    +
    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/types/native.RocksDBCountOptions.html b/docs/types/native.RocksDBCountOptions.html new file mode 100644 index 00000000..dee837d4 --- /dev/null +++ b/docs/types/native.RocksDBCountOptions.html @@ -0,0 +1,79 @@ +RocksDBCountOptions | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Type alias RocksDBCountOptions<S>

    +
    RocksDBCountOptions<S>: Omit<RocksDBRangeOptions, "reverse"> & {
        snapshot?: S;
    }
    +

    Count options

    +
    +
    +

    Type Parameters

    +
    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/types/native.RocksDBDatabase.html b/docs/types/native.RocksDBDatabase.html new file mode 100644 index 00000000..3af25ab9 --- /dev/null +++ b/docs/types/native.RocksDBDatabase.html @@ -0,0 +1,75 @@ +RocksDBDatabase | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Type alias RocksDBDatabase

    +
    RocksDBDatabase: Opaque<"RocksDBDatabase", object>
    +

    RocksDBDatabase object +A napi_external type

    +
    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/types/native.RocksDBDatabaseOptions.html b/docs/types/native.RocksDBDatabaseOptions.html new file mode 100644 index 00000000..31298cc2 --- /dev/null +++ b/docs/types/native.RocksDBDatabaseOptions.html @@ -0,0 +1,97 @@ +RocksDBDatabaseOptions | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Type alias RocksDBDatabaseOptions

    +
    RocksDBDatabaseOptions: {
        blockRestartInterval?: number;
        blockSize?: number;
        cacheSize?: number;
        compression?: boolean;
        createIfMissing?: boolean;
        errorIfExists?: boolean;
        infoLogLevel?: "debug" | "info" | "warn" | "error" | "fatal" | "header";
        maxFileSize?: number;
        maxOpenFiles?: number;
        writeBufferSize?: number;
    }
    +

    RocksDB database options

    +
    +
    +

    Type declaration

    +
      +
    • +
      Optional blockRestartInterval?: number
    • +
    • +
      Optional blockSize?: number
    • +
    • +
      Optional cacheSize?: number
    • +
    • +
      Optional compression?: boolean
    • +
    • +
      Optional createIfMissing?: boolean
    • +
    • +
      Optional errorIfExists?: boolean
    • +
    • +
      Optional infoLogLevel?: "debug" | "info" | "warn" | "error" | "fatal" | "header"
    • +
    • +
      Optional maxFileSize?: number
    • +
    • +
      Optional maxOpenFiles?: number
    • +
    • +
      Optional writeBufferSize?: number
    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/types/native.RocksDBDelOptions.html b/docs/types/native.RocksDBDelOptions.html new file mode 100644 index 00000000..33b16677 --- /dev/null +++ b/docs/types/native.RocksDBDelOptions.html @@ -0,0 +1,74 @@ +RocksDBDelOptions | @matrixai/db
    +
    + +
    + +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/types/native.RocksDBGetOptions.html b/docs/types/native.RocksDBGetOptions.html new file mode 100644 index 00000000..37f89a72 --- /dev/null +++ b/docs/types/native.RocksDBGetOptions.html @@ -0,0 +1,88 @@ +RocksDBGetOptions | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Type alias RocksDBGetOptions<S>

    +
    RocksDBGetOptions<S>: {
        fillCache?: boolean;
        snapshot?: S;
        valueEncoding?: "utf8" | "buffer";
    }
    +

    Get options

    +
    +
    +

    Type Parameters

    +
    +
    +

    Type declaration

    +
      +
    • +
      Optional fillCache?: boolean
    • +
    • +
      Optional snapshot?: S
    • +
    • +
      Optional valueEncoding?: "utf8" | "buffer"
    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/types/native.RocksDBIterator.html b/docs/types/native.RocksDBIterator.html new file mode 100644 index 00000000..dae134d4 --- /dev/null +++ b/docs/types/native.RocksDBIterator.html @@ -0,0 +1,86 @@ +RocksDBIterator | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Type alias RocksDBIterator<K, V>

    +
    RocksDBIterator<K, V>: Opaque<"RocksDBIterator", object> & {
        [brandRocksDBIteratorK]: K;
        [brandRocksDBIteratorV]: V;
    }
    +

    RocksDBIterator object +A napi_external type +If keys or values is set to false then +K and V will be an empty buffer +If keys and values is set to false, the iterator will +give back empty array as entries

    +
    +
    +

    Type Parameters

    +
      +
    • +

      K extends string | Buffer = string | Buffer

    • +
    • +

      V extends string | Buffer = string | Buffer

    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/types/native.RocksDBIteratorOptions.html b/docs/types/native.RocksDBIteratorOptions.html new file mode 100644 index 00000000..6befca27 --- /dev/null +++ b/docs/types/native.RocksDBIteratorOptions.html @@ -0,0 +1,79 @@ +RocksDBIteratorOptions | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Type alias RocksDBIteratorOptions<S>

    +
    RocksDBIteratorOptions<S>: RocksDBGetOptions<S> & RocksDBRangeOptions & {
        highWaterMarkBytes?: number;
        keyEncoding?: "utf8" | "buffer";
        keys?: boolean;
        values?: boolean;
    }
    +

    Iterator options

    +
    +
    +

    Type Parameters

    +
    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/types/native.RocksDBPutOptions.html b/docs/types/native.RocksDBPutOptions.html new file mode 100644 index 00000000..3245dd55 --- /dev/null +++ b/docs/types/native.RocksDBPutOptions.html @@ -0,0 +1,85 @@ +RocksDBPutOptions | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Type alias RocksDBPutOptions

    +
    RocksDBPutOptions: {
        sync?: boolean;
    }
    +

    Put options

    +
    +
    +

    Type declaration

    +
      +
    • +
      Optional sync?: boolean
      +

      If true, rocksdb will perform fsync() before completing operation +It is still asynchronous relative to Node.js +If the operating system crashes, writes may be lost +Prefer to flip this to be true when a transaction batch is written +This will amortize the cost of fsync() across the entire transaction

      +
    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/types/native.RocksDBRangeOptions.html b/docs/types/native.RocksDBRangeOptions.html new file mode 100644 index 00000000..8302226f --- /dev/null +++ b/docs/types/native.RocksDBRangeOptions.html @@ -0,0 +1,89 @@ +RocksDBRangeOptions | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Type alias RocksDBRangeOptions

    +
    RocksDBRangeOptions: {
        gt?: string | Buffer;
        gte?: string | Buffer;
        limit?: number;
        lt?: string | Buffer;
        lte?: string | Buffer;
        reverse?: boolean;
    }
    +

    Range options

    +
    +
    +

    Type declaration

    +
      +
    • +
      Optional gt?: string | Buffer
    • +
    • +
      Optional gte?: string | Buffer
    • +
    • +
      Optional limit?: number
    • +
    • +
      Optional lt?: string | Buffer
    • +
    • +
      Optional lte?: string | Buffer
    • +
    • +
      Optional reverse?: boolean
    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/types/native.RocksDBSnapshot.html b/docs/types/native.RocksDBSnapshot.html new file mode 100644 index 00000000..02b26964 --- /dev/null +++ b/docs/types/native.RocksDBSnapshot.html @@ -0,0 +1,75 @@ +RocksDBSnapshot | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Type alias RocksDBSnapshot

    +
    RocksDBSnapshot: Opaque<"RocksDBSnapshot", object>
    +

    RocksDBSnapshot object +A napi_external type

    +
    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/types/native.RocksDBTransaction.html b/docs/types/native.RocksDBTransaction.html new file mode 100644 index 00000000..1c7223a8 --- /dev/null +++ b/docs/types/native.RocksDBTransaction.html @@ -0,0 +1,75 @@ +RocksDBTransaction | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Type alias RocksDBTransaction

    +
    RocksDBTransaction: Opaque<"RocksDBTransaction", object>
    +

    RocksDBTransaction object +A napi_external type

    +
    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/types/native.RocksDBTransactionOptions.html b/docs/types/native.RocksDBTransactionOptions.html new file mode 100644 index 00000000..b9fb7d56 --- /dev/null +++ b/docs/types/native.RocksDBTransactionOptions.html @@ -0,0 +1,74 @@ +RocksDBTransactionOptions | @matrixai/db
    +
    + +
    + +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/types/native.RocksDBTransactionSnapshot.html b/docs/types/native.RocksDBTransactionSnapshot.html new file mode 100644 index 00000000..d1feccb6 --- /dev/null +++ b/docs/types/native.RocksDBTransactionSnapshot.html @@ -0,0 +1,75 @@ +RocksDBTransactionSnapshot | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Type alias RocksDBTransactionSnapshot

    +
    RocksDBTransactionSnapshot: Opaque<"RocksDBTransactionSnapshot", object>
    +

    RocksDBTransactionSnapshot object +A napi_external type

    +
    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/variables/native.rocksdb-1.html b/docs/variables/native.rocksdb-1.html new file mode 100644 index 00000000..5c8d5e59 --- /dev/null +++ b/docs/variables/native.rocksdb-1.html @@ -0,0 +1,72 @@ +rocksdb | @matrixai/db
    +
    + +
    + +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/variables/native.rocksdbP-1.html b/docs/variables/native.rocksdbP-1.html new file mode 100644 index 00000000..48b932d0 --- /dev/null +++ b/docs/variables/native.rocksdbP-1.html @@ -0,0 +1,74 @@ +rocksdbP | @matrixai/db
    +
    + +
    + +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/docs/variables/utils.sep.html b/docs/variables/utils.sep.html new file mode 100644 index 00000000..dc530ee1 --- /dev/null +++ b/docs/variables/utils.sep.html @@ -0,0 +1,68 @@ +sep | @matrixai/db
    +
    + +
    +
    +
    +
    + +

    Variable sepConst

    +
    sep: Buffer = ...
    +

    Separator is a single null byte +This special symbol must not appear in the encoded parts

    +
    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/jest.config.js b/jest.config.js index cccfc2f8..58d32f3c 100644 --- a/jest.config.js +++ b/jest.config.js @@ -33,8 +33,21 @@ module.exports = { roots: ['/tests'], testMatch: ['**/?(*.)+(spec|test|unit.test).+(ts|tsx|js|jsx)'], transform: { - '^.+\\.tsx?$': 'ts-jest', - '^.+\\.jsx?$': 'babel-jest', + "^.+\\.(t|j)sx?$": [ + "@swc/jest", + { + jsc: { + parser: { + syntax: "typescript", + tsx: true, + decorators: compilerOptions.experimentalDecorators, + dynamicImport: true, + }, + target: compilerOptions.target.toLowerCase(), + keepClassNames: true, + }, + } + ], }, reporters: [ 'default', @@ -60,6 +73,9 @@ module.exports = { // Setup files after env are executed before each test file // after the jest test environment is installed // Can access globals - setupFilesAfterEnv: ['/tests/setupAfterEnv.ts'], + setupFilesAfterEnv: [ + 'jest-extended/all', + '/tests/setupAfterEnv.ts' + ], moduleNameMapper: moduleNameMapper, }; diff --git a/package-lock.json b/package-lock.json index a7ae11fb..1ee54d70 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,22 +10,22 @@ "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { - "@matrixai/async-init": "^1.8.1", - "@matrixai/async-locks": "^3.1.1", - "@matrixai/errors": "^1.1.2", - "@matrixai/logger": "^3.0.0", - "@matrixai/resources": "^1.1.3", - "@matrixai/workers": "^1.3.5", + "@matrixai/async-init": "^1.8.4", + "@matrixai/async-locks": "^4.0.0", + "@matrixai/errors": "^1.1.7", + "@matrixai/logger": "^3.1.0", + "@matrixai/resources": "^1.1.5", + "@matrixai/workers": "^1.3.7", "node-gyp-build": "4.4.0", "threads": "^1.6.5" }, "devDependencies": { - "@swc/core": "^1.2.215", + "@swc/core": "^1.3.62", + "@swc/jest": "^0.2.26", "@types/jest": "^28.1.3", - "@types/node": "^16.11.7", - "@types/node-forge": "^0.10.4", - "@typescript-eslint/eslint-plugin": "^5.23.0", - "@typescript-eslint/parser": "^5.23.0", + "@types/node": "^18.15.0", + "@typescript-eslint/eslint-plugin": "^5.45.1", + "@typescript-eslint/parser": "^5.45.1", "benny": "^3.7.1", "common-tags": "^1.8.2", "eslint": "^8.15.0", @@ -33,24 +33,25 @@ "eslint-plugin-import": "^2.26.0", "eslint-plugin-prettier": "^4.0.0", "jest": "^28.1.1", + "jest-extended": "^3.0.1", "jest-junit": "^14.0.0", "lexicographic-integer": "^1.1.0", "napi-macros": "^2.0.0", "node-forge": "^1.3.1", "node-gyp": "9.0.0", "prettier": "^2.6.2", - "rimraf": "^3.0.2", "semver": "^7.3.7", + "shx": "^0.3.4", "systeminformation": "^5.12.1", "ts-jest": "^28.0.5", "ts-node": "^10.9.1", "tsconfig-paths": "^3.9.0", - "typedoc": "^0.22.15", - "typescript": "^4.5.2" + "typedoc": "^0.23.21", + "typescript": "^4.9.3" }, "engines": { "msvs": "2019", - "node": "^16.15.0" + "node": "^18.15.0" } }, "node_modules/@ampproject/remapping": { @@ -692,6 +693,30 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.1.tgz", + "integrity": "sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, "node_modules/@eslint/eslintrc": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", @@ -855,6 +880,43 @@ } } }, + "node_modules/@jest/create-cache-key-function": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/create-cache-key-function/-/create-cache-key-function-27.5.1.tgz", + "integrity": "sha512-dmH1yW+makpTSURTy8VzdUwFnfQh1G8R+DxO2Ho2FFmBbKFEVm+3jWdvFhE2VqB/LATCTokkP0dotjyQyw5/AQ==", + "dev": true, + "dependencies": { + "@jest/types": "^27.5.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@jest/create-cache-key-function/node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@jest/create-cache-key-function/node_modules/@types/yargs": { + "version": "16.0.5", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.5.tgz", + "integrity": "sha512-AxO/ADJOBFJScHbWhq2xAhlWP24rY4aCEG/NFaMvbT3X2MgRsLjhjQwsn0Zi5zn0LG9jUhCCZMeX9Dkuw6k+vQ==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, "node_modules/@jest/environment": { "version": "28.1.3", "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-28.1.3.tgz", @@ -1116,61 +1178,66 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, - "node_modules/@matrixai/async-init": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/@matrixai/async-init/-/async-init-1.8.1.tgz", - "integrity": "sha512-ZAS1yd/PC+r3NwvT9fEz3OtAm68A8mKXXGdZRcYQF1ajl43jsV8/B4aDwr2oLFlV+RYZgWl7UwjZj4rtoZSycQ==", - "dependencies": { - "@matrixai/async-locks": "^2.3.1", - "@matrixai/errors": "^1.1.1" - } + "node_modules/@matrixai/async-cancellable": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@matrixai/async-cancellable/-/async-cancellable-1.1.1.tgz", + "integrity": "sha512-f0yxu7dHwvffZ++7aCm2WIcCJn18uLcOTdCCwEA3R3KVHYE3TG/JNoTWD9/mqBkAV1AI5vBfJzg27WnF9rOUXQ==" }, - "node_modules/@matrixai/async-init/node_modules/@matrixai/async-locks": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@matrixai/async-locks/-/async-locks-2.3.1.tgz", - "integrity": "sha512-STz8VyiIXleaa72zMsq01x/ZO1gPzukUgMe25+uqMWn/nPrC9EtJOR7e3CW0DODfYDZ0748z196GeOjS3jh+4g==", + "node_modules/@matrixai/async-init": { + "version": "1.8.4", + "resolved": "https://registry.npmjs.org/@matrixai/async-init/-/async-init-1.8.4.tgz", + "integrity": "sha512-33cGC7kHTs9KKwMHJA5d5XURWhx3QUq7lLxPEXLoVfWdTHixcWNvtfshAOso0hbRfx1P3ZSgsb+ZHaIASHhWfg==", "dependencies": { - "@matrixai/errors": "^1.1.1", - "@matrixai/resources": "^1.1.3", - "async-mutex": "^0.3.2" + "@matrixai/async-locks": "^4.0.0", + "@matrixai/errors": "^1.1.7" } }, "node_modules/@matrixai/async-locks": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@matrixai/async-locks/-/async-locks-3.1.1.tgz", - "integrity": "sha512-0PS0WxR+CkxxULbCDficQ9VfrVnS5a+Qm5HxV7ZkhXlEOlZb+tiFGKkqc1mTB7k7cNzEBWZ01qi8bJiKcpkQmA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@matrixai/async-locks/-/async-locks-4.0.0.tgz", + "integrity": "sha512-u/3fOdtjOKcDYF8dDoPR1/+7nmOkhxo42eBpXTEgfI0hLPGI37PoW7tjLvwy+O51Quy1HGOwhsR/Dgr4x+euug==", "dependencies": { - "@matrixai/errors": "^1.1.2", - "@matrixai/resources": "^1.1.3", - "async-mutex": "^0.3.2" + "@matrixai/async-cancellable": "^1.1.1", + "@matrixai/errors": "^1.1.7", + "@matrixai/resources": "^1.1.5", + "@matrixai/timer": "^1.1.1" } }, "node_modules/@matrixai/errors": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@matrixai/errors/-/errors-1.1.2.tgz", - "integrity": "sha512-JSi2SIqdlqqDruANrTG8RMvLrJZAwduY19y26LZHx7DDkqhkqzF9fblbWaE9Fo1lhSTGk65oKRx2UjGn3v5gWw==", + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/@matrixai/errors/-/errors-1.1.7.tgz", + "integrity": "sha512-WD6MrlfgtNSTfXt60lbMgwasS5T7bdRgH4eYSOxV+KWngqlkEij9EoDt5LwdvcMD1yuC33DxPTnH4Xu2XV3nMw==", "dependencies": { - "ts-custom-error": "^3.2.0" + "ts-custom-error": "3.2.2" } }, "node_modules/@matrixai/logger": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@matrixai/logger/-/logger-3.0.0.tgz", - "integrity": "sha512-J2KMMw4FCHHmIacRfbU3mBPMvGxxwRc4Y8eFEtzkOcL8WhqBfWKiZ96xNduJGxUo+nfTlj+Q2Ep9RwRw3FCxMw==" + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@matrixai/logger/-/logger-3.1.0.tgz", + "integrity": "sha512-C4JWpgbNik3V99bfGfDell5cH3JULD67eEq9CeXl4rYgsvanF8hhuY84ZYvndPhimt9qjA9/Z8uExKGoiv1zVw==" }, "node_modules/@matrixai/resources": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@matrixai/resources/-/resources-1.1.3.tgz", - "integrity": "sha512-9zbA0NtgCtA+2hILpojshH6Pd679bIPtB8DcsPLVDzvGZP1TDwvtvZWCC3SG7oJUTzxqBI2Bfe+hypqwpvYPCw==" + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@matrixai/resources/-/resources-1.1.5.tgz", + "integrity": "sha512-m/DEZEe3wHqWEPTyoBtzFF6U9vWYhEnQtGgwvqiAlTxTM0rk96UBpWjDZCTF/vYG11ZlmlQFtg5H+zGgbjaB3Q==" + }, + "node_modules/@matrixai/timer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@matrixai/timer/-/timer-1.1.1.tgz", + "integrity": "sha512-8UKDoGuwKC6BvrY/yANJVH29v71wgQKH/tJlxMPohGxmzVUQO5+JeI4lUYVHTs2vq1AyKAWloF5fOig+I1dyGA==", + "dependencies": { + "@matrixai/async-cancellable": "^1.1.1", + "@matrixai/errors": "^1.1.7" + } }, "node_modules/@matrixai/workers": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/@matrixai/workers/-/workers-1.3.5.tgz", - "integrity": "sha512-Ty0miJGbH2PitfgiAbCaS2YIVonRDexzzPisOV0Evd5uWSL6NKBwPwma23NdkqiUyuqlOzzZtcgtYTpdWbflsQ==", + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/@matrixai/workers/-/workers-1.3.7.tgz", + "integrity": "sha512-37Zm8OqrhLzcPY8uBWBhleN0THOxC49SwtkqTw8Ettb/Csm51MlGoa05NJa0NcBCsYfPucLK/qn1yFIGFrqWhw==", "dependencies": { - "@matrixai/async-init": "^1.8.1", - "@matrixai/errors": "^1.1.2", - "@matrixai/logger": "^3.0.0", + "@matrixai/async-init": "^1.8.4", + "@matrixai/errors": "^1.1.7", + "@matrixai/logger": "^3.1.0", "threads": "^1.6.5" } }, @@ -1260,14 +1327,11 @@ } }, "node_modules/@swc/core": { - "version": "1.2.218", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.2.218.tgz", - "integrity": "sha512-wzXTeBUi3YAHr305lCo1tlxRj5Zpk7hu6rmulngH06NgrH7fS6bj8IaR7K2QPZ4ZZ4U+TGS2tOKbXBmqeMRUtg==", + "version": "1.3.66", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.66.tgz", + "integrity": "sha512-Hpf91kH5ly7fHkWnApwryTQryT+TO4kMMPH3WyciUSQOWLE3UuQz1PtETHQQk7PZ/b1QF0qQurJrgfBr5bSKUA==", "dev": true, "hasInstallScript": true, - "bin": { - "swcx": "run_swcx.js" - }, "engines": { "node": ">=10" }, @@ -1276,57 +1340,30 @@ "url": "https://opencollective.com/swc" }, "optionalDependencies": { - "@swc/core-android-arm-eabi": "1.2.218", - "@swc/core-android-arm64": "1.2.218", - "@swc/core-darwin-arm64": "1.2.218", - "@swc/core-darwin-x64": "1.2.218", - "@swc/core-freebsd-x64": "1.2.218", - "@swc/core-linux-arm-gnueabihf": "1.2.218", - "@swc/core-linux-arm64-gnu": "1.2.218", - "@swc/core-linux-arm64-musl": "1.2.218", - "@swc/core-linux-x64-gnu": "1.2.218", - "@swc/core-linux-x64-musl": "1.2.218", - "@swc/core-win32-arm64-msvc": "1.2.218", - "@swc/core-win32-ia32-msvc": "1.2.218", - "@swc/core-win32-x64-msvc": "1.2.218" - } - }, - "node_modules/@swc/core-android-arm-eabi": { - "version": "1.2.218", - "resolved": "https://registry.npmjs.org/@swc/core-android-arm-eabi/-/core-android-arm-eabi-1.2.218.tgz", - "integrity": "sha512-Q/uLCh262t3xxNzhCz+ZW9t+g2nWd0gZZO4jMYFWJs7ilKVNsBfRtfnNGGACHzkVuWLNDIWtAS2PSNodl7VUHQ==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-android-arm64": { - "version": "1.2.218", - "resolved": "https://registry.npmjs.org/@swc/core-android-arm64/-/core-android-arm64-1.2.218.tgz", - "integrity": "sha512-dy+8lUHUcyrkfPcl7azEQ4M44duRo1Uibz1E5/tltXCGoR6tu2ZN2VkqEKgA2a9XR3UD8/x4lv2r5evwJWy+uQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=10" + "@swc/core-darwin-arm64": "1.3.66", + "@swc/core-darwin-x64": "1.3.66", + "@swc/core-linux-arm-gnueabihf": "1.3.66", + "@swc/core-linux-arm64-gnu": "1.3.66", + "@swc/core-linux-arm64-musl": "1.3.66", + "@swc/core-linux-x64-gnu": "1.3.66", + "@swc/core-linux-x64-musl": "1.3.66", + "@swc/core-win32-arm64-msvc": "1.3.66", + "@swc/core-win32-ia32-msvc": "1.3.66", + "@swc/core-win32-x64-msvc": "1.3.66" + }, + "peerDependencies": { + "@swc/helpers": "^0.5.0" + }, + "peerDependenciesMeta": { + "@swc/helpers": { + "optional": true + } } }, "node_modules/@swc/core-darwin-arm64": { - "version": "1.2.218", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.2.218.tgz", - "integrity": "sha512-aTpFjWio8G0oukN76VtXCBPtFzH0PXIQ+1dFjGGkzrBcU5suztCCbhPBGhKRoWp3NJBwfPDwwWzmG+ddXrVAKg==", + "version": "1.3.66", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.66.tgz", + "integrity": "sha512-UijJsvuLy73vxeVYEy7urIHksXS+3BdvJ9s9AY+bRMSQW483NO7RLp8g4FdTyJbRaN0BH15SQnY0dcjQBkVuHw==", "cpu": [ "arm64" ], @@ -1340,9 +1377,9 @@ } }, "node_modules/@swc/core-darwin-x64": { - "version": "1.2.218", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.2.218.tgz", - "integrity": "sha512-H3w/gNzROE6gVPZCAg5qvvPihzlg88Yi7HWb/mowfpNqH9/iJ8XMdwqJyovnfUeUXsuJQBFv6uXv/ri7qhGMHA==", + "version": "1.3.66", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.66.tgz", + "integrity": "sha512-xGsHKvViQnwTNLF30Y/5OqWdnN6RsiyUI8awZXfz1sHcXCEaLe+v+WLQ+/E8sgw0YUkYVHzzfV/sAN2CezJK5Q==", "cpu": [ "x64" ], @@ -1355,26 +1392,10 @@ "node": ">=10" } }, - "node_modules/@swc/core-freebsd-x64": { - "version": "1.2.218", - "resolved": "https://registry.npmjs.org/@swc/core-freebsd-x64/-/core-freebsd-x64-1.2.218.tgz", - "integrity": "sha512-kkch07yCSlpUrSMp0FZPWtMHJjh3lfHiwp7JYNf6CUl5xXlgT19NeomPYq31dbTzPV2VnE7TVVlAawIjuuOH4g==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=10" - } - }, "node_modules/@swc/core-linux-arm-gnueabihf": { - "version": "1.2.218", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.2.218.tgz", - "integrity": "sha512-vwEgvtD9f/+0HFxYD5q4sd8SG6zd0cxm17cwRGZ6jWh/d4Ninjht3CpDGE1ffh9nJ+X3Mb/7rjU/kTgWFz5qfg==", + "version": "1.3.66", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.66.tgz", + "integrity": "sha512-gNbLcSIV2pq90BkMSpzvK4xPXOl8GEF3YR4NaqF0CYSzQsVXXTTqMuX/r26xNYudBKzH0345S1MpoRk2qricnA==", "cpu": [ "arm" ], @@ -1388,9 +1409,9 @@ } }, "node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.2.218", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.2.218.tgz", - "integrity": "sha512-g5PQI6COUHV7x7tyaZQn6jXWtOLXXNIEQK1HS5/e+6kqqsM2NsndE9bjLhoH1EQuXiN2eUjAR/ZDOFAg102aRw==", + "version": "1.3.66", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.66.tgz", + "integrity": "sha512-cJSQ0oplyWbJqy4rzVcnBYLAi6z1QT3QCcR7iAey0aAmCvfRBZJfXlyjggMjn4iosuadkauwCZR1xYNhBDRn7w==", "cpu": [ "arm64" ], @@ -1404,9 +1425,9 @@ } }, "node_modules/@swc/core-linux-arm64-musl": { - "version": "1.2.218", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.2.218.tgz", - "integrity": "sha512-IETYHB6H01NmVmlw+Ng8nkjdFBv1exGQRR74GAnHis1bVx1Uq14hREIF6XT3I1Aj26nRwlGkIYQuEKnFO5/j3Q==", + "version": "1.3.66", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.66.tgz", + "integrity": "sha512-GDQZpcB9aGxG9PTA2shdIkoMZlGK5omJ8NR49uoBTtLBVYiGeXAwV0U1Uaw8kXEZj9i7wZDkvjzjSaNH3evRsg==", "cpu": [ "arm64" ], @@ -1420,9 +1441,9 @@ } }, "node_modules/@swc/core-linux-x64-gnu": { - "version": "1.2.218", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.2.218.tgz", - "integrity": "sha512-PK39Zg4/YZbfchQRw77iVfB7Qat7QaK58sQt8enH39CUMXlJ+GSfC0Fqw2mtZ12sFGwmsGrK9yBy3ZVoOws5Ng==", + "version": "1.3.66", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.66.tgz", + "integrity": "sha512-lg8E4O/Pd9KfK0lajdinVMuGME8dSv7V9arhEpmlfGE2eXSDCWqDn5Htk5QVBstt9lt1lsRhWHJ/YYc2eQY30Q==", "cpu": [ "x64" ], @@ -1436,9 +1457,9 @@ } }, "node_modules/@swc/core-linux-x64-musl": { - "version": "1.2.218", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.2.218.tgz", - "integrity": "sha512-SNjrzORJYiKTSmFbaBkKZAf5B/PszwoZoFZOcd86AG192zsvQBSvKjQzMjT5rDZxB+sOnhRE7wH/bvqxZishQQ==", + "version": "1.3.66", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.66.tgz", + "integrity": "sha512-lo8ZcAO/zL2pZWH+LZIyge8u2MklaeuT6+FpVVpBFktMVdYXbaVtzpvWbgRFBZHvL3SRDF+u8jxjtkXhvGUpTw==", "cpu": [ "x64" ], @@ -1452,9 +1473,9 @@ } }, "node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.2.218", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.2.218.tgz", - "integrity": "sha512-lVXFWkYl+w8+deq9mgGsfvSY5Gr1RRjFgqZ+0wMZgyaonfx7jNn3TILUwc7egumEwxK0anNriVZCyKfcO3ZIjA==", + "version": "1.3.66", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.66.tgz", + "integrity": "sha512-cQoVwBuJY5WkHbfpCOlndNwYr1ZThatRjQQvKy540NUIeAEk9Fa6ozlDBtU75UdaWKtUG6YQ/bWz+KTemheVxw==", "cpu": [ "arm64" ], @@ -1468,9 +1489,9 @@ } }, "node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.2.218", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.2.218.tgz", - "integrity": "sha512-jgP+NZsHUh9Cp8PcXznnkpJTW3hPDLUgsXI0NKfE+8+Xvc6hALHxl6K46IyPYU67FfFlegYcBSNkOgpc85gk0A==", + "version": "1.3.66", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.66.tgz", + "integrity": "sha512-y/FrAIINK4UBeUQQknGlWXEyjo+MBvjF7WkUf2KP7sNr9EHHy8+dXohAGd5Anz0eJrqOM1ZXR/GEjxRp7bGQ1Q==", "cpu": [ "ia32" ], @@ -1484,9 +1505,9 @@ } }, "node_modules/@swc/core-win32-x64-msvc": { - "version": "1.2.218", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.2.218.tgz", - "integrity": "sha512-XYLjX00KV4ft324Q3QDkw61xHkoN7EKkVvIpb0wXaf6wVshwU+BCDyPw2CSg4PQecNP8QGgMRQf9QM7xNtEM7A==", + "version": "1.3.66", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.66.tgz", + "integrity": "sha512-yI64ACzS14qFLrfyO12qW+f/UROTotzDeEbuyJAaPD2IZexoT1cICznI3sBmIfrSt33mVuW8eF5m3AG/NUImzw==", "cpu": [ "x64" ], @@ -1499,6 +1520,22 @@ "node": ">=10" } }, + "node_modules/@swc/jest": { + "version": "0.2.26", + "resolved": "https://registry.npmjs.org/@swc/jest/-/jest-0.2.26.tgz", + "integrity": "sha512-7lAi7q7ShTO3E5Gt1Xqf3pIhRbERxR1DUxvtVa9WKzIB+HGQ7wZP5sYx86zqnaEoKKGhmOoZ7gyW0IRu8Br5+A==", + "dev": true, + "dependencies": { + "@jest/create-cache-key-function": "^27.4.2", + "jsonc-parser": "^3.2.0" + }, + "engines": { + "npm": ">= 7.0.0" + }, + "peerDependencies": { + "@swc/core": "*" + } + }, "node_modules/@tsconfig/node10": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", @@ -1608,9 +1645,9 @@ } }, "node_modules/@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "version": "7.0.12", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz", + "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==", "dev": true }, "node_modules/@types/json5": { @@ -1620,25 +1657,23 @@ "dev": true }, "node_modules/@types/node": { - "version": "16.11.36", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.36.tgz", - "integrity": "sha512-FR5QJe+TaoZ2GsMHkjuwoNabr+UrJNRr2HNOo+r/7vhcuntM6Ee/pRPOnRhhL2XE9OOvX9VLEq+BcXl3VjNoWA==", + "version": "18.16.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.18.tgz", + "integrity": "sha512-/aNaQZD0+iSBAGnvvN2Cx92HqE5sZCPZtx2TsK+4nvV23fFe09jVDvpArXr2j9DnYlzuU9WuoykDDc6wqvpNcw==", "dev": true }, - "node_modules/@types/node-forge": { - "version": "0.10.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/prettier": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.6.3.tgz", "integrity": "sha512-ymZk3LEC/fsut+/Q5qejp6R9O1rMxz3XaRHDV6kX8MrGAhOSPqVARbDi+EZvInBpw+BnCX3TD240byVkOfQsHg==", "dev": true }, + "node_modules/@types/semver": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", + "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==", + "dev": true + }, "node_modules/@types/stack-utils": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", @@ -1661,18 +1696,19 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.26.0.tgz", - "integrity": "sha512-oGCmo0PqnRZZndr+KwvvAUvD3kNE4AfyoGCwOZpoCncSh4MVD06JTE8XQa2u9u+NX5CsyZMBTEc2C72zx38eYA==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.60.0.tgz", + "integrity": "sha512-78B+anHLF1TI8Jn/cD0Q00TBYdMgjdOn980JfAVa9yw5sop8nyTfVOQAv6LWywkOGLclDBtv5z3oxN4w7jxyNg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.26.0", - "@typescript-eslint/type-utils": "5.26.0", - "@typescript-eslint/utils": "5.26.0", + "@eslint-community/regexpp": "^4.4.0", + "@typescript-eslint/scope-manager": "5.60.0", + "@typescript-eslint/type-utils": "5.60.0", + "@typescript-eslint/utils": "5.60.0", "debug": "^4.3.4", - "functional-red-black-tree": "^1.0.1", + "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", - "regexpp": "^3.2.0", + "natural-compare-lite": "^1.4.0", "semver": "^7.3.7", "tsutils": "^3.21.0" }, @@ -1694,14 +1730,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.26.0.tgz", - "integrity": "sha512-n/IzU87ttzIdnAH5vQ4BBDnLPly7rC5VnjN3m0xBG82HK6rhRxnCb3w/GyWbNDghPd+NktJqB/wl6+YkzZ5T5Q==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.60.0.tgz", + "integrity": "sha512-jBONcBsDJ9UoTWrARkRRCgDz6wUggmH5RpQVlt7BimSwaTkTjwypGzKORXbR4/2Hqjk9hgwlon2rVQAjWNpkyQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.26.0", - "@typescript-eslint/types": "5.26.0", - "@typescript-eslint/typescript-estree": "5.26.0", + "@typescript-eslint/scope-manager": "5.60.0", + "@typescript-eslint/types": "5.60.0", + "@typescript-eslint/typescript-estree": "5.60.0", "debug": "^4.3.4" }, "engines": { @@ -1721,13 +1757,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.26.0.tgz", - "integrity": "sha512-gVzTJUESuTwiju/7NiTb4c5oqod8xt5GhMbExKsCTp6adU3mya6AGJ4Pl9xC7x2DX9UYFsjImC0mA62BCY22Iw==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.60.0.tgz", + "integrity": "sha512-hakuzcxPwXi2ihf9WQu1BbRj1e/Pd8ZZwVTG9kfbxAMZstKz8/9OoexIwnmLzShtsdap5U/CoQGRCWlSuPbYxQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.26.0", - "@typescript-eslint/visitor-keys": "5.26.0" + "@typescript-eslint/types": "5.60.0", + "@typescript-eslint/visitor-keys": "5.60.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1738,12 +1774,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.26.0.tgz", - "integrity": "sha512-7ccbUVWGLmcRDSA1+ADkDBl5fP87EJt0fnijsMFTVHXKGduYMgienC/i3QwoVhDADUAPoytgjbZbCOMj4TY55A==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.60.0.tgz", + "integrity": "sha512-X7NsRQddORMYRFH7FWo6sA9Y/zbJ8s1x1RIAtnlj6YprbToTiQnM6vxcMu7iYhdunmoC0rUWlca13D5DVHkK2g==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "5.26.0", + "@typescript-eslint/typescript-estree": "5.60.0", + "@typescript-eslint/utils": "5.60.0", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -1764,9 +1801,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.26.0.tgz", - "integrity": "sha512-8794JZFE1RN4XaExLWLI2oSXsVImNkl79PzTOOWt9h0UHROwJedNOD2IJyfL0NbddFllcktGIO2aOu10avQQyA==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.60.0.tgz", + "integrity": "sha512-ascOuoCpNZBccFVNJRSC6rPq4EmJ2NkuoKnd6LDNyAQmdDnziAtxbCGWCbefG1CNzmDvd05zO36AmB7H8RzKPA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1777,13 +1814,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.26.0.tgz", - "integrity": "sha512-EyGpw6eQDsfD6jIqmXP3rU5oHScZ51tL/cZgFbFBvWuCwrIptl+oueUZzSmLtxFuSOQ9vDcJIs+279gnJkfd1w==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.60.0.tgz", + "integrity": "sha512-R43thAuwarC99SnvrBmh26tc7F6sPa2B3evkXp/8q954kYL6Ro56AwASYWtEEi+4j09GbiNAHqYwNNZuNlARGQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.26.0", - "@typescript-eslint/visitor-keys": "5.26.0", + "@typescript-eslint/types": "5.60.0", + "@typescript-eslint/visitor-keys": "5.60.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1804,17 +1841,19 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.26.0.tgz", - "integrity": "sha512-PJFwcTq2Pt4AMOKfe3zQOdez6InIDOjUJJD3v3LyEtxHGVVRK3Vo7Dd923t/4M9hSH2q2CLvcTdxlLPjcIk3eg==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.60.0.tgz", + "integrity": "sha512-ba51uMqDtfLQ5+xHtwlO84vkdjrqNzOnqrnwbMHMRY8Tqeme8C2Q8Fc7LajfGR+e3/4LoYiWXUM6BpIIbHJ4hQ==", "dev": true, "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.26.0", - "@typescript-eslint/types": "5.26.0", - "@typescript-eslint/typescript-estree": "5.26.0", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.60.0", + "@typescript-eslint/types": "5.60.0", + "@typescript-eslint/typescript-estree": "5.60.0", "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" + "semver": "^7.3.7" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1828,12 +1867,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.26.0.tgz", - "integrity": "sha512-wei+ffqHanYDOQgg/fS6Hcar6wAWv0CUPQ3TZzOWd2BLfgP539rb49bwua8WRAs7R6kOSLn82rfEu2ro6Llt8Q==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.60.0.tgz", + "integrity": "sha512-wm9Uz71SbCyhUKgcaPRauBdTegUyY/ZWl8gLwD/i/ybJqscrrdVSFImpvUz16BLPChIeKBK5Fa9s6KDQjsjyWw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.26.0", + "@typescript-eslint/types": "5.60.0", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -1968,6 +2007,12 @@ "node": ">=8" } }, + "node_modules/ansi-sequence-parser": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.0.tgz", + "integrity": "sha512-lEm8mt52to2fT8GhciPCGeCXACSz2UwIN4X2e2LJSnZ5uAbn2/dsYdOmUXq0AtWS5cpAupysIneExOgH0Vd2TQ==", + "dev": true + }, "node_modules/ansi-styles": { "version": "4.3.0", "dev": true, @@ -2080,19 +2125,6 @@ "node": ">=8" } }, - "node_modules/async-mutex": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.3.2.tgz", - "integrity": "sha512-HuTK7E7MT7jZEh1P9GtRW9+aTWiDWWi9InbZ5hjxrnRa39KS4BW04+xLBhYNS2aXhHUIKZSw3gj4Pn1pj+qGAA==", - "dependencies": { - "tslib": "^2.3.1" - } - }, - "node_modules/async-mutex/node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" - }, "node_modules/babel-jest": { "version": "28.1.3", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-28.1.3.tgz", @@ -3351,9 +3383,9 @@ "license": "Apache-2.0" }, "node_modules/fast-glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", - "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", @@ -3389,9 +3421,9 @@ "license": "MIT" }, "node_modules/fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", "dev": true, "dependencies": { "reusify": "^1.0.4" @@ -3671,6 +3703,12 @@ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true }, + "node_modules/grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, "node_modules/has": { "version": "1.0.3", "dev": true, @@ -3864,6 +3902,15 @@ "node": ">= 0.4" } }, + "node_modules/interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, "node_modules/ip": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz", @@ -4387,6 +4434,104 @@ "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, + "node_modules/jest-extended": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/jest-extended/-/jest-extended-3.2.4.tgz", + "integrity": "sha512-lSEYhSmvXZG/7YXI7KO3LpiUiQ90gi5giwCJNDMMsX5a+/NZhdbQF2G4ALOBN+KcXVT3H6FPVPohAuMXooaLTQ==", + "dev": true, + "dependencies": { + "jest-diff": "^29.0.0", + "jest-get-type": "^29.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "jest": ">=27.2.5" + }, + "peerDependenciesMeta": { + "jest": { + "optional": true + } + } + }, + "node_modules/jest-extended/node_modules/@jest/schemas": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.4.3.tgz", + "integrity": "sha512-VLYKXQmtmuEz6IxJsrZwzG9NvtkQsWNnWMsKxqWNu3+CnfzJQhp0WDDKWLVV9hLKr0l3SLLFRqcYHjhtyuDVxg==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.25.16" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-extended/node_modules/@sinclair/typebox": { + "version": "0.25.24", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.25.24.tgz", + "integrity": "sha512-XJfwUVUKDHF5ugKwIcxEgc9k8b7HbznCp6eUfWgu710hMPNIO4aw4/zB5RogDQz8nd6gyCDpU9O/m6qYEWY6yQ==", + "dev": true + }, + "node_modules/jest-extended/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-extended/node_modules/diff-sequences": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.4.3.tgz", + "integrity": "sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-extended/node_modules/jest-diff": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.5.0.tgz", + "integrity": "sha512-LtxijLLZBduXnHSniy0WMdaHjmQnt3g5sa16W4p0HqukYTTsyTW3GD1q41TyGl5YFXj/5B2U6dlh5FM1LIMgxw==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^29.4.3", + "jest-get-type": "^29.4.3", + "pretty-format": "^29.5.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-extended/node_modules/jest-get-type": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.4.3.tgz", + "integrity": "sha512-J5Xez4nRRMjk8emnTpWrlkyb9pfRQQanDrvWHhsR1+VUfbwxi30eVcZFlcdGInRibU4G5LwHXpI7IRHU0CY+gg==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-extended/node_modules/pretty-format": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.5.0.tgz", + "integrity": "sha512-V2mGkI31qdttvTFX7Mt4efOqHXqJWMu4/r66Xh3Z3BwZaPfPJgp6/gbwoujRpPUtfEF6AUUWx3Jim3GCw5g/Qw==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.4.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/jest-get-type": { "version": "28.0.2", "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", @@ -4827,9 +4972,10 @@ } }, "node_modules/jsonc-parser": { - "version": "3.0.0", - "dev": true, - "license": "MIT" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", + "dev": true }, "node_modules/jsonfile": { "version": "6.1.0", @@ -5055,9 +5201,10 @@ } }, "node_modules/marked": { - "version": "4.0.15", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", + "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", "dev": true, - "license": "MIT", "bin": { "marked": "bin/marked.js" }, @@ -5235,6 +5382,12 @@ "dev": true, "license": "MIT" }, + "node_modules/natural-compare-lite": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", + "dev": true + }, "node_modules/negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", @@ -5722,6 +5875,8 @@ }, "node_modules/queue-microtask": { "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true, "funding": [ { @@ -5736,8 +5891,7 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/react-is": { "version": "18.2.0", @@ -5758,6 +5912,18 @@ "node": ">= 6" } }, + "node_modules/rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", + "dev": true, + "dependencies": { + "resolve": "^1.1.6" + }, + "engines": { + "node": ">= 0.10" + } + }, "node_modules/regexpp": { "version": "3.2.0", "dev": true, @@ -5967,14 +6133,49 @@ "node": ">=8" } }, + "node_modules/shelljs": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "dev": true, + "dependencies": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + }, + "bin": { + "shjs": "bin/shjs" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/shiki": { - "version": "0.10.1", + "version": "0.14.2", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.2.tgz", + "integrity": "sha512-ltSZlSLOuSY0M0Y75KA+ieRaZ0Trf5Wl3gutE7jzLuIcWxLp5i/uEnLoQWNvgKXQ5OMpGkJnVMRLAuzjc0LJ2A==", + "dev": true, + "dependencies": { + "ansi-sequence-parser": "^1.1.0", + "jsonc-parser": "^3.2.0", + "vscode-oniguruma": "^1.7.0", + "vscode-textmate": "^8.0.0" + } + }, + "node_modules/shx": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/shx/-/shx-0.3.4.tgz", + "integrity": "sha512-N6A9MLVqjxZYcVn8hLmtneQWIJtp8IKzMP4eMnx+nqkvXoqinUPCbUFLp2UcWTEIUONhlk0ewxr/jaVGlc+J+g==", "dev": true, - "license": "MIT", "dependencies": { - "jsonc-parser": "^3.0.0", - "vscode-oniguruma": "^1.6.1", - "vscode-textmate": "5.2.0" + "minimist": "^1.2.3", + "shelljs": "^0.8.5" + }, + "bin": { + "shx": "lib/cli.js" + }, + "engines": { + "node": ">=6" } }, "node_modules/side-channel": { @@ -6387,10 +6588,11 @@ } }, "node_modules/ts-custom-error": { - "version": "3.2.0", - "license": "MIT", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/ts-custom-error/-/ts-custom-error-3.2.2.tgz", + "integrity": "sha512-u0YCNf2lf6T/vHm+POKZK1yFKWpSpJitcUN3HxqyEcFuNnHIDbyuIQC7QDy/PsBX3giFyk9rt6BFqBAh2lsDZQ==", "engines": { - "node": ">=8.0.0" + "node": ">=14.0.0" } }, "node_modules/ts-jest": { @@ -6563,79 +6765,55 @@ } }, "node_modules/typedoc": { - "version": "0.22.15", + "version": "0.23.28", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.23.28.tgz", + "integrity": "sha512-9x1+hZWTHEQcGoP7qFmlo4unUoVJLB0H/8vfO/7wqTnZxg4kPuji9y3uRzEu0ZKez63OJAUmiGhUrtukC6Uj3w==", "dev": true, - "license": "Apache-2.0", "dependencies": { - "glob": "^7.2.0", "lunr": "^2.3.9", - "marked": "^4.0.12", - "minimatch": "^5.0.1", - "shiki": "^0.10.1" + "marked": "^4.2.12", + "minimatch": "^7.1.3", + "shiki": "^0.14.1" }, "bin": { "typedoc": "bin/typedoc" }, "engines": { - "node": ">= 12.10.0" + "node": ">= 14.14" }, "peerDependencies": { - "typescript": "4.0.x || 4.1.x || 4.2.x || 4.3.x || 4.4.x || 4.5.x || 4.6.x" + "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x" } }, - "node_modules/typedoc/node_modules/glob": { - "version": "7.2.0", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/typedoc/node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", + "node_modules/typedoc/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, - "license": "ISC", "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" + "balanced-match": "^1.0.0" } }, "node_modules/typedoc/node_modules/minimatch": { - "version": "5.0.1", + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.6.tgz", + "integrity": "sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, "engines": { "node": ">=10" - } - }, - "node_modules/typedoc/node_modules/minimatch/node_modules/brace-expansion": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/typescript": { - "version": "4.6.4", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true, - "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -6760,14 +6938,16 @@ } }, "node_modules/vscode-oniguruma": { - "version": "1.6.2", - "dev": true, - "license": "MIT" + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", + "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==", + "dev": true }, "node_modules/vscode-textmate": { - "version": "5.2.0", - "dev": true, - "license": "MIT" + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz", + "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==", + "dev": true }, "node_modules/walker": { "version": "1.0.8", @@ -7420,6 +7600,21 @@ } } }, + "@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^3.3.0" + } + }, + "@eslint-community/regexpp": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.1.tgz", + "integrity": "sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==", + "dev": true + }, "@eslint/eslintrc": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", @@ -7555,6 +7750,39 @@ "strip-ansi": "^6.0.0" } }, + "@jest/create-cache-key-function": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/create-cache-key-function/-/create-cache-key-function-27.5.1.tgz", + "integrity": "sha512-dmH1yW+makpTSURTy8VzdUwFnfQh1G8R+DxO2Ho2FFmBbKFEVm+3jWdvFhE2VqB/LATCTokkP0dotjyQyw5/AQ==", + "dev": true, + "requires": { + "@jest/types": "^27.5.1" + }, + "dependencies": { + "@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" + } + }, + "@types/yargs": { + "version": "16.0.5", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.5.tgz", + "integrity": "sha512-AxO/ADJOBFJScHbWhq2xAhlWP24rY4aCEG/NFaMvbT3X2MgRsLjhjQwsn0Zi5zn0LG9jUhCCZMeX9Dkuw6k+vQ==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + } + } + }, "@jest/environment": { "version": "28.1.3", "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-28.1.3.tgz", @@ -7763,63 +7991,66 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "@matrixai/async-cancellable": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@matrixai/async-cancellable/-/async-cancellable-1.1.1.tgz", + "integrity": "sha512-f0yxu7dHwvffZ++7aCm2WIcCJn18uLcOTdCCwEA3R3KVHYE3TG/JNoTWD9/mqBkAV1AI5vBfJzg27WnF9rOUXQ==" + }, "@matrixai/async-init": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/@matrixai/async-init/-/async-init-1.8.1.tgz", - "integrity": "sha512-ZAS1yd/PC+r3NwvT9fEz3OtAm68A8mKXXGdZRcYQF1ajl43jsV8/B4aDwr2oLFlV+RYZgWl7UwjZj4rtoZSycQ==", + "version": "1.8.4", + "resolved": "https://registry.npmjs.org/@matrixai/async-init/-/async-init-1.8.4.tgz", + "integrity": "sha512-33cGC7kHTs9KKwMHJA5d5XURWhx3QUq7lLxPEXLoVfWdTHixcWNvtfshAOso0hbRfx1P3ZSgsb+ZHaIASHhWfg==", "requires": { - "@matrixai/async-locks": "^2.3.1", - "@matrixai/errors": "^1.1.1" - }, - "dependencies": { - "@matrixai/async-locks": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@matrixai/async-locks/-/async-locks-2.3.1.tgz", - "integrity": "sha512-STz8VyiIXleaa72zMsq01x/ZO1gPzukUgMe25+uqMWn/nPrC9EtJOR7e3CW0DODfYDZ0748z196GeOjS3jh+4g==", - "requires": { - "@matrixai/errors": "^1.1.1", - "@matrixai/resources": "^1.1.3", - "async-mutex": "^0.3.2" - } - } + "@matrixai/async-locks": "^4.0.0", + "@matrixai/errors": "^1.1.7" } }, "@matrixai/async-locks": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@matrixai/async-locks/-/async-locks-3.1.1.tgz", - "integrity": "sha512-0PS0WxR+CkxxULbCDficQ9VfrVnS5a+Qm5HxV7ZkhXlEOlZb+tiFGKkqc1mTB7k7cNzEBWZ01qi8bJiKcpkQmA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@matrixai/async-locks/-/async-locks-4.0.0.tgz", + "integrity": "sha512-u/3fOdtjOKcDYF8dDoPR1/+7nmOkhxo42eBpXTEgfI0hLPGI37PoW7tjLvwy+O51Quy1HGOwhsR/Dgr4x+euug==", "requires": { - "@matrixai/errors": "^1.1.2", - "@matrixai/resources": "^1.1.3", - "async-mutex": "^0.3.2" + "@matrixai/async-cancellable": "^1.1.1", + "@matrixai/errors": "^1.1.7", + "@matrixai/resources": "^1.1.5", + "@matrixai/timer": "^1.1.1" } }, "@matrixai/errors": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@matrixai/errors/-/errors-1.1.2.tgz", - "integrity": "sha512-JSi2SIqdlqqDruANrTG8RMvLrJZAwduY19y26LZHx7DDkqhkqzF9fblbWaE9Fo1lhSTGk65oKRx2UjGn3v5gWw==", + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/@matrixai/errors/-/errors-1.1.7.tgz", + "integrity": "sha512-WD6MrlfgtNSTfXt60lbMgwasS5T7bdRgH4eYSOxV+KWngqlkEij9EoDt5LwdvcMD1yuC33DxPTnH4Xu2XV3nMw==", "requires": { - "ts-custom-error": "^3.2.0" + "ts-custom-error": "3.2.2" } }, "@matrixai/logger": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@matrixai/logger/-/logger-3.0.0.tgz", - "integrity": "sha512-J2KMMw4FCHHmIacRfbU3mBPMvGxxwRc4Y8eFEtzkOcL8WhqBfWKiZ96xNduJGxUo+nfTlj+Q2Ep9RwRw3FCxMw==" + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@matrixai/logger/-/logger-3.1.0.tgz", + "integrity": "sha512-C4JWpgbNik3V99bfGfDell5cH3JULD67eEq9CeXl4rYgsvanF8hhuY84ZYvndPhimt9qjA9/Z8uExKGoiv1zVw==" }, "@matrixai/resources": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@matrixai/resources/-/resources-1.1.3.tgz", - "integrity": "sha512-9zbA0NtgCtA+2hILpojshH6Pd679bIPtB8DcsPLVDzvGZP1TDwvtvZWCC3SG7oJUTzxqBI2Bfe+hypqwpvYPCw==" + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@matrixai/resources/-/resources-1.1.5.tgz", + "integrity": "sha512-m/DEZEe3wHqWEPTyoBtzFF6U9vWYhEnQtGgwvqiAlTxTM0rk96UBpWjDZCTF/vYG11ZlmlQFtg5H+zGgbjaB3Q==" + }, + "@matrixai/timer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@matrixai/timer/-/timer-1.1.1.tgz", + "integrity": "sha512-8UKDoGuwKC6BvrY/yANJVH29v71wgQKH/tJlxMPohGxmzVUQO5+JeI4lUYVHTs2vq1AyKAWloF5fOig+I1dyGA==", + "requires": { + "@matrixai/async-cancellable": "^1.1.1", + "@matrixai/errors": "^1.1.7" + } }, "@matrixai/workers": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/@matrixai/workers/-/workers-1.3.5.tgz", - "integrity": "sha512-Ty0miJGbH2PitfgiAbCaS2YIVonRDexzzPisOV0Evd5uWSL6NKBwPwma23NdkqiUyuqlOzzZtcgtYTpdWbflsQ==", + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/@matrixai/workers/-/workers-1.3.7.tgz", + "integrity": "sha512-37Zm8OqrhLzcPY8uBWBhleN0THOxC49SwtkqTw8Ettb/Csm51MlGoa05NJa0NcBCsYfPucLK/qn1yFIGFrqWhw==", "requires": { - "@matrixai/async-init": "^1.8.1", - "@matrixai/errors": "^1.1.2", - "@matrixai/logger": "^3.0.0", + "@matrixai/async-init": "^1.8.4", + "@matrixai/errors": "^1.1.7", + "@matrixai/logger": "^3.1.0", "threads": "^1.6.5" } }, @@ -7894,117 +8125,103 @@ } }, "@swc/core": { - "version": "1.2.218", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.2.218.tgz", - "integrity": "sha512-wzXTeBUi3YAHr305lCo1tlxRj5Zpk7hu6rmulngH06NgrH7fS6bj8IaR7K2QPZ4ZZ4U+TGS2tOKbXBmqeMRUtg==", - "dev": true, - "requires": { - "@swc/core-android-arm-eabi": "1.2.218", - "@swc/core-android-arm64": "1.2.218", - "@swc/core-darwin-arm64": "1.2.218", - "@swc/core-darwin-x64": "1.2.218", - "@swc/core-freebsd-x64": "1.2.218", - "@swc/core-linux-arm-gnueabihf": "1.2.218", - "@swc/core-linux-arm64-gnu": "1.2.218", - "@swc/core-linux-arm64-musl": "1.2.218", - "@swc/core-linux-x64-gnu": "1.2.218", - "@swc/core-linux-x64-musl": "1.2.218", - "@swc/core-win32-arm64-msvc": "1.2.218", - "@swc/core-win32-ia32-msvc": "1.2.218", - "@swc/core-win32-x64-msvc": "1.2.218" - } - }, - "@swc/core-android-arm-eabi": { - "version": "1.2.218", - "resolved": "https://registry.npmjs.org/@swc/core-android-arm-eabi/-/core-android-arm-eabi-1.2.218.tgz", - "integrity": "sha512-Q/uLCh262t3xxNzhCz+ZW9t+g2nWd0gZZO4jMYFWJs7ilKVNsBfRtfnNGGACHzkVuWLNDIWtAS2PSNodl7VUHQ==", + "version": "1.3.66", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.66.tgz", + "integrity": "sha512-Hpf91kH5ly7fHkWnApwryTQryT+TO4kMMPH3WyciUSQOWLE3UuQz1PtETHQQk7PZ/b1QF0qQurJrgfBr5bSKUA==", "dev": true, - "optional": true - }, - "@swc/core-android-arm64": { - "version": "1.2.218", - "resolved": "https://registry.npmjs.org/@swc/core-android-arm64/-/core-android-arm64-1.2.218.tgz", - "integrity": "sha512-dy+8lUHUcyrkfPcl7azEQ4M44duRo1Uibz1E5/tltXCGoR6tu2ZN2VkqEKgA2a9XR3UD8/x4lv2r5evwJWy+uQ==", - "dev": true, - "optional": true + "requires": { + "@swc/core-darwin-arm64": "1.3.66", + "@swc/core-darwin-x64": "1.3.66", + "@swc/core-linux-arm-gnueabihf": "1.3.66", + "@swc/core-linux-arm64-gnu": "1.3.66", + "@swc/core-linux-arm64-musl": "1.3.66", + "@swc/core-linux-x64-gnu": "1.3.66", + "@swc/core-linux-x64-musl": "1.3.66", + "@swc/core-win32-arm64-msvc": "1.3.66", + "@swc/core-win32-ia32-msvc": "1.3.66", + "@swc/core-win32-x64-msvc": "1.3.66" + } }, "@swc/core-darwin-arm64": { - "version": "1.2.218", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.2.218.tgz", - "integrity": "sha512-aTpFjWio8G0oukN76VtXCBPtFzH0PXIQ+1dFjGGkzrBcU5suztCCbhPBGhKRoWp3NJBwfPDwwWzmG+ddXrVAKg==", + "version": "1.3.66", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.66.tgz", + "integrity": "sha512-UijJsvuLy73vxeVYEy7urIHksXS+3BdvJ9s9AY+bRMSQW483NO7RLp8g4FdTyJbRaN0BH15SQnY0dcjQBkVuHw==", "dev": true, "optional": true }, "@swc/core-darwin-x64": { - "version": "1.2.218", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.2.218.tgz", - "integrity": "sha512-H3w/gNzROE6gVPZCAg5qvvPihzlg88Yi7HWb/mowfpNqH9/iJ8XMdwqJyovnfUeUXsuJQBFv6uXv/ri7qhGMHA==", - "dev": true, - "optional": true - }, - "@swc/core-freebsd-x64": { - "version": "1.2.218", - "resolved": "https://registry.npmjs.org/@swc/core-freebsd-x64/-/core-freebsd-x64-1.2.218.tgz", - "integrity": "sha512-kkch07yCSlpUrSMp0FZPWtMHJjh3lfHiwp7JYNf6CUl5xXlgT19NeomPYq31dbTzPV2VnE7TVVlAawIjuuOH4g==", + "version": "1.3.66", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.66.tgz", + "integrity": "sha512-xGsHKvViQnwTNLF30Y/5OqWdnN6RsiyUI8awZXfz1sHcXCEaLe+v+WLQ+/E8sgw0YUkYVHzzfV/sAN2CezJK5Q==", "dev": true, "optional": true }, "@swc/core-linux-arm-gnueabihf": { - "version": "1.2.218", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.2.218.tgz", - "integrity": "sha512-vwEgvtD9f/+0HFxYD5q4sd8SG6zd0cxm17cwRGZ6jWh/d4Ninjht3CpDGE1ffh9nJ+X3Mb/7rjU/kTgWFz5qfg==", + "version": "1.3.66", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.66.tgz", + "integrity": "sha512-gNbLcSIV2pq90BkMSpzvK4xPXOl8GEF3YR4NaqF0CYSzQsVXXTTqMuX/r26xNYudBKzH0345S1MpoRk2qricnA==", "dev": true, "optional": true }, "@swc/core-linux-arm64-gnu": { - "version": "1.2.218", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.2.218.tgz", - "integrity": "sha512-g5PQI6COUHV7x7tyaZQn6jXWtOLXXNIEQK1HS5/e+6kqqsM2NsndE9bjLhoH1EQuXiN2eUjAR/ZDOFAg102aRw==", + "version": "1.3.66", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.66.tgz", + "integrity": "sha512-cJSQ0oplyWbJqy4rzVcnBYLAi6z1QT3QCcR7iAey0aAmCvfRBZJfXlyjggMjn4iosuadkauwCZR1xYNhBDRn7w==", "dev": true, "optional": true }, "@swc/core-linux-arm64-musl": { - "version": "1.2.218", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.2.218.tgz", - "integrity": "sha512-IETYHB6H01NmVmlw+Ng8nkjdFBv1exGQRR74GAnHis1bVx1Uq14hREIF6XT3I1Aj26nRwlGkIYQuEKnFO5/j3Q==", + "version": "1.3.66", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.66.tgz", + "integrity": "sha512-GDQZpcB9aGxG9PTA2shdIkoMZlGK5omJ8NR49uoBTtLBVYiGeXAwV0U1Uaw8kXEZj9i7wZDkvjzjSaNH3evRsg==", "dev": true, "optional": true }, "@swc/core-linux-x64-gnu": { - "version": "1.2.218", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.2.218.tgz", - "integrity": "sha512-PK39Zg4/YZbfchQRw77iVfB7Qat7QaK58sQt8enH39CUMXlJ+GSfC0Fqw2mtZ12sFGwmsGrK9yBy3ZVoOws5Ng==", + "version": "1.3.66", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.66.tgz", + "integrity": "sha512-lg8E4O/Pd9KfK0lajdinVMuGME8dSv7V9arhEpmlfGE2eXSDCWqDn5Htk5QVBstt9lt1lsRhWHJ/YYc2eQY30Q==", "dev": true, "optional": true }, "@swc/core-linux-x64-musl": { - "version": "1.2.218", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.2.218.tgz", - "integrity": "sha512-SNjrzORJYiKTSmFbaBkKZAf5B/PszwoZoFZOcd86AG192zsvQBSvKjQzMjT5rDZxB+sOnhRE7wH/bvqxZishQQ==", + "version": "1.3.66", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.66.tgz", + "integrity": "sha512-lo8ZcAO/zL2pZWH+LZIyge8u2MklaeuT6+FpVVpBFktMVdYXbaVtzpvWbgRFBZHvL3SRDF+u8jxjtkXhvGUpTw==", "dev": true, "optional": true }, "@swc/core-win32-arm64-msvc": { - "version": "1.2.218", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.2.218.tgz", - "integrity": "sha512-lVXFWkYl+w8+deq9mgGsfvSY5Gr1RRjFgqZ+0wMZgyaonfx7jNn3TILUwc7egumEwxK0anNriVZCyKfcO3ZIjA==", + "version": "1.3.66", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.66.tgz", + "integrity": "sha512-cQoVwBuJY5WkHbfpCOlndNwYr1ZThatRjQQvKy540NUIeAEk9Fa6ozlDBtU75UdaWKtUG6YQ/bWz+KTemheVxw==", "dev": true, "optional": true }, "@swc/core-win32-ia32-msvc": { - "version": "1.2.218", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.2.218.tgz", - "integrity": "sha512-jgP+NZsHUh9Cp8PcXznnkpJTW3hPDLUgsXI0NKfE+8+Xvc6hALHxl6K46IyPYU67FfFlegYcBSNkOgpc85gk0A==", + "version": "1.3.66", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.66.tgz", + "integrity": "sha512-y/FrAIINK4UBeUQQknGlWXEyjo+MBvjF7WkUf2KP7sNr9EHHy8+dXohAGd5Anz0eJrqOM1ZXR/GEjxRp7bGQ1Q==", "dev": true, "optional": true }, "@swc/core-win32-x64-msvc": { - "version": "1.2.218", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.2.218.tgz", - "integrity": "sha512-XYLjX00KV4ft324Q3QDkw61xHkoN7EKkVvIpb0wXaf6wVshwU+BCDyPw2CSg4PQecNP8QGgMRQf9QM7xNtEM7A==", + "version": "1.3.66", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.66.tgz", + "integrity": "sha512-yI64ACzS14qFLrfyO12qW+f/UROTotzDeEbuyJAaPD2IZexoT1cICznI3sBmIfrSt33mVuW8eF5m3AG/NUImzw==", "dev": true, "optional": true }, + "@swc/jest": { + "version": "0.2.26", + "resolved": "https://registry.npmjs.org/@swc/jest/-/jest-0.2.26.tgz", + "integrity": "sha512-7lAi7q7ShTO3E5Gt1Xqf3pIhRbERxR1DUxvtVa9WKzIB+HGQ7wZP5sYx86zqnaEoKKGhmOoZ7gyW0IRu8Br5+A==", + "dev": true, + "requires": { + "@jest/create-cache-key-function": "^27.4.2", + "jsonc-parser": "^3.2.0" + } + }, "@tsconfig/node10": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", @@ -8114,9 +8331,9 @@ } }, "@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "version": "7.0.12", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz", + "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==", "dev": true }, "@types/json5": { @@ -8126,24 +8343,23 @@ "dev": true }, "@types/node": { - "version": "16.11.36", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.36.tgz", - "integrity": "sha512-FR5QJe+TaoZ2GsMHkjuwoNabr+UrJNRr2HNOo+r/7vhcuntM6Ee/pRPOnRhhL2XE9OOvX9VLEq+BcXl3VjNoWA==", + "version": "18.16.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.18.tgz", + "integrity": "sha512-/aNaQZD0+iSBAGnvvN2Cx92HqE5sZCPZtx2TsK+4nvV23fFe09jVDvpArXr2j9DnYlzuU9WuoykDDc6wqvpNcw==", "dev": true }, - "@types/node-forge": { - "version": "0.10.4", - "dev": true, - "requires": { - "@types/node": "*" - } - }, "@types/prettier": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.6.3.tgz", "integrity": "sha512-ymZk3LEC/fsut+/Q5qejp6R9O1rMxz3XaRHDV6kX8MrGAhOSPqVARbDi+EZvInBpw+BnCX3TD240byVkOfQsHg==", "dev": true }, + "@types/semver": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", + "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==", + "dev": true + }, "@types/stack-utils": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", @@ -8166,69 +8382,71 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.26.0.tgz", - "integrity": "sha512-oGCmo0PqnRZZndr+KwvvAUvD3kNE4AfyoGCwOZpoCncSh4MVD06JTE8XQa2u9u+NX5CsyZMBTEc2C72zx38eYA==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.60.0.tgz", + "integrity": "sha512-78B+anHLF1TI8Jn/cD0Q00TBYdMgjdOn980JfAVa9yw5sop8nyTfVOQAv6LWywkOGLclDBtv5z3oxN4w7jxyNg==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.26.0", - "@typescript-eslint/type-utils": "5.26.0", - "@typescript-eslint/utils": "5.26.0", + "@eslint-community/regexpp": "^4.4.0", + "@typescript-eslint/scope-manager": "5.60.0", + "@typescript-eslint/type-utils": "5.60.0", + "@typescript-eslint/utils": "5.60.0", "debug": "^4.3.4", - "functional-red-black-tree": "^1.0.1", + "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", - "regexpp": "^3.2.0", + "natural-compare-lite": "^1.4.0", "semver": "^7.3.7", "tsutils": "^3.21.0" } }, "@typescript-eslint/parser": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.26.0.tgz", - "integrity": "sha512-n/IzU87ttzIdnAH5vQ4BBDnLPly7rC5VnjN3m0xBG82HK6rhRxnCb3w/GyWbNDghPd+NktJqB/wl6+YkzZ5T5Q==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.60.0.tgz", + "integrity": "sha512-jBONcBsDJ9UoTWrARkRRCgDz6wUggmH5RpQVlt7BimSwaTkTjwypGzKORXbR4/2Hqjk9hgwlon2rVQAjWNpkyQ==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.26.0", - "@typescript-eslint/types": "5.26.0", - "@typescript-eslint/typescript-estree": "5.26.0", + "@typescript-eslint/scope-manager": "5.60.0", + "@typescript-eslint/types": "5.60.0", + "@typescript-eslint/typescript-estree": "5.60.0", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.26.0.tgz", - "integrity": "sha512-gVzTJUESuTwiju/7NiTb4c5oqod8xt5GhMbExKsCTp6adU3mya6AGJ4Pl9xC7x2DX9UYFsjImC0mA62BCY22Iw==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.60.0.tgz", + "integrity": "sha512-hakuzcxPwXi2ihf9WQu1BbRj1e/Pd8ZZwVTG9kfbxAMZstKz8/9OoexIwnmLzShtsdap5U/CoQGRCWlSuPbYxQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.26.0", - "@typescript-eslint/visitor-keys": "5.26.0" + "@typescript-eslint/types": "5.60.0", + "@typescript-eslint/visitor-keys": "5.60.0" } }, "@typescript-eslint/type-utils": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.26.0.tgz", - "integrity": "sha512-7ccbUVWGLmcRDSA1+ADkDBl5fP87EJt0fnijsMFTVHXKGduYMgienC/i3QwoVhDADUAPoytgjbZbCOMj4TY55A==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.60.0.tgz", + "integrity": "sha512-X7NsRQddORMYRFH7FWo6sA9Y/zbJ8s1x1RIAtnlj6YprbToTiQnM6vxcMu7iYhdunmoC0rUWlca13D5DVHkK2g==", "dev": true, "requires": { - "@typescript-eslint/utils": "5.26.0", + "@typescript-eslint/typescript-estree": "5.60.0", + "@typescript-eslint/utils": "5.60.0", "debug": "^4.3.4", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.26.0.tgz", - "integrity": "sha512-8794JZFE1RN4XaExLWLI2oSXsVImNkl79PzTOOWt9h0UHROwJedNOD2IJyfL0NbddFllcktGIO2aOu10avQQyA==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.60.0.tgz", + "integrity": "sha512-ascOuoCpNZBccFVNJRSC6rPq4EmJ2NkuoKnd6LDNyAQmdDnziAtxbCGWCbefG1CNzmDvd05zO36AmB7H8RzKPA==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.26.0.tgz", - "integrity": "sha512-EyGpw6eQDsfD6jIqmXP3rU5oHScZ51tL/cZgFbFBvWuCwrIptl+oueUZzSmLtxFuSOQ9vDcJIs+279gnJkfd1w==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.60.0.tgz", + "integrity": "sha512-R43thAuwarC99SnvrBmh26tc7F6sPa2B3evkXp/8q954kYL6Ro56AwASYWtEEi+4j09GbiNAHqYwNNZuNlARGQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.26.0", - "@typescript-eslint/visitor-keys": "5.26.0", + "@typescript-eslint/types": "5.60.0", + "@typescript-eslint/visitor-keys": "5.60.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -8237,26 +8455,28 @@ } }, "@typescript-eslint/utils": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.26.0.tgz", - "integrity": "sha512-PJFwcTq2Pt4AMOKfe3zQOdez6InIDOjUJJD3v3LyEtxHGVVRK3Vo7Dd923t/4M9hSH2q2CLvcTdxlLPjcIk3eg==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.60.0.tgz", + "integrity": "sha512-ba51uMqDtfLQ5+xHtwlO84vkdjrqNzOnqrnwbMHMRY8Tqeme8C2Q8Fc7LajfGR+e3/4LoYiWXUM6BpIIbHJ4hQ==", "dev": true, "requires": { + "@eslint-community/eslint-utils": "^4.2.0", "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.26.0", - "@typescript-eslint/types": "5.26.0", - "@typescript-eslint/typescript-estree": "5.26.0", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.60.0", + "@typescript-eslint/types": "5.60.0", + "@typescript-eslint/typescript-estree": "5.60.0", "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" + "semver": "^7.3.7" } }, "@typescript-eslint/visitor-keys": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.26.0.tgz", - "integrity": "sha512-wei+ffqHanYDOQgg/fS6Hcar6wAWv0CUPQ3TZzOWd2BLfgP539rb49bwua8WRAs7R6kOSLn82rfEu2ro6Llt8Q==", + "version": "5.60.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.60.0.tgz", + "integrity": "sha512-wm9Uz71SbCyhUKgcaPRauBdTegUyY/ZWl8gLwD/i/ybJqscrrdVSFImpvUz16BLPChIeKBK5Fa9s6KDQjsjyWw==", "dev": true, "requires": { - "@typescript-eslint/types": "5.26.0", + "@typescript-eslint/types": "5.60.0", "eslint-visitor-keys": "^3.3.0" } }, @@ -8344,6 +8564,12 @@ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, + "ansi-sequence-parser": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.0.tgz", + "integrity": "sha512-lEm8mt52to2fT8GhciPCGeCXACSz2UwIN4X2e2LJSnZ5uAbn2/dsYdOmUXq0AtWS5cpAupysIneExOgH0Vd2TQ==", + "dev": true + }, "ansi-styles": { "version": "4.3.0", "dev": true, @@ -8422,21 +8648,6 @@ "version": "2.0.0", "dev": true }, - "async-mutex": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.3.2.tgz", - "integrity": "sha512-HuTK7E7MT7jZEh1P9GtRW9+aTWiDWWi9InbZ5hjxrnRa39KS4BW04+xLBhYNS2aXhHUIKZSw3gj4Pn1pj+qGAA==", - "requires": { - "tslib": "^2.3.1" - }, - "dependencies": { - "tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" - } - } - }, "babel-jest": { "version": "28.1.3", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-28.1.3.tgz", @@ -9369,9 +9580,9 @@ "dev": true }, "fast-glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", - "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", "dev": true, "requires": { "@nodelib/fs.stat": "^2.0.2", @@ -9401,9 +9612,9 @@ "dev": true }, "fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", "dev": true, "requires": { "reusify": "^1.0.4" @@ -9600,6 +9811,12 @@ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true }, + "grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, "has": { "version": "1.0.3", "dev": true, @@ -9728,6 +9945,12 @@ "side-channel": "^1.0.4" } }, + "interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "dev": true + }, "ip": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz", @@ -10071,6 +10294,74 @@ "jest-util": "^28.1.3" } }, + "jest-extended": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/jest-extended/-/jest-extended-3.2.4.tgz", + "integrity": "sha512-lSEYhSmvXZG/7YXI7KO3LpiUiQ90gi5giwCJNDMMsX5a+/NZhdbQF2G4ALOBN+KcXVT3H6FPVPohAuMXooaLTQ==", + "dev": true, + "requires": { + "jest-diff": "^29.0.0", + "jest-get-type": "^29.0.0" + }, + "dependencies": { + "@jest/schemas": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.4.3.tgz", + "integrity": "sha512-VLYKXQmtmuEz6IxJsrZwzG9NvtkQsWNnWMsKxqWNu3+CnfzJQhp0WDDKWLVV9hLKr0l3SLLFRqcYHjhtyuDVxg==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.25.16" + } + }, + "@sinclair/typebox": { + "version": "0.25.24", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.25.24.tgz", + "integrity": "sha512-XJfwUVUKDHF5ugKwIcxEgc9k8b7HbznCp6eUfWgu710hMPNIO4aw4/zB5RogDQz8nd6gyCDpU9O/m6qYEWY6yQ==", + "dev": true + }, + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + }, + "diff-sequences": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.4.3.tgz", + "integrity": "sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA==", + "dev": true + }, + "jest-diff": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.5.0.tgz", + "integrity": "sha512-LtxijLLZBduXnHSniy0WMdaHjmQnt3g5sa16W4p0HqukYTTsyTW3GD1q41TyGl5YFXj/5B2U6dlh5FM1LIMgxw==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "diff-sequences": "^29.4.3", + "jest-get-type": "^29.4.3", + "pretty-format": "^29.5.0" + } + }, + "jest-get-type": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.4.3.tgz", + "integrity": "sha512-J5Xez4nRRMjk8emnTpWrlkyb9pfRQQanDrvWHhsR1+VUfbwxi30eVcZFlcdGInRibU4G5LwHXpI7IRHU0CY+gg==", + "dev": true + }, + "pretty-format": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.5.0.tgz", + "integrity": "sha512-V2mGkI31qdttvTFX7Mt4efOqHXqJWMu4/r66Xh3Z3BwZaPfPJgp6/gbwoujRpPUtfEF6AUUWx3Jim3GCw5g/Qw==", + "dev": true, + "requires": { + "@jest/schemas": "^29.4.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + } + } + } + }, "jest-get-type": { "version": "28.0.2", "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", @@ -10416,7 +10707,9 @@ "dev": true }, "jsonc-parser": { - "version": "3.0.0", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", "dev": true }, "jsonfile": { @@ -10589,7 +10882,9 @@ } }, "marked": { - "version": "4.0.15", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", + "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", "dev": true }, "merge-stream": { @@ -10717,6 +11012,12 @@ "version": "1.4.0", "dev": true }, + "natural-compare-lite": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", + "dev": true + }, "negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", @@ -11043,6 +11344,8 @@ }, "queue-microtask": { "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true }, "react-is": { @@ -11060,6 +11363,15 @@ "util-deprecate": "^1.0.1" } }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", + "dev": true, + "requires": { + "resolve": "^1.1.6" + } + }, "regexpp": { "version": "3.2.0", "dev": true @@ -11181,13 +11493,37 @@ "version": "3.0.0", "dev": true }, + "shelljs": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "dev": true, + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, "shiki": { - "version": "0.10.1", + "version": "0.14.2", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.2.tgz", + "integrity": "sha512-ltSZlSLOuSY0M0Y75KA+ieRaZ0Trf5Wl3gutE7jzLuIcWxLp5i/uEnLoQWNvgKXQ5OMpGkJnVMRLAuzjc0LJ2A==", + "dev": true, + "requires": { + "ansi-sequence-parser": "^1.1.0", + "jsonc-parser": "^3.2.0", + "vscode-oniguruma": "^1.7.0", + "vscode-textmate": "^8.0.0" + } + }, + "shx": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/shx/-/shx-0.3.4.tgz", + "integrity": "sha512-N6A9MLVqjxZYcVn8hLmtneQWIJtp8IKzMP4eMnx+nqkvXoqinUPCbUFLp2UcWTEIUONhlk0ewxr/jaVGlc+J+g==", "dev": true, "requires": { - "jsonc-parser": "^3.0.0", - "vscode-oniguruma": "^1.6.1", - "vscode-textmate": "5.2.0" + "minimist": "^1.2.3", + "shelljs": "^0.8.5" } }, "side-channel": { @@ -11473,7 +11809,9 @@ } }, "ts-custom-error": { - "version": "3.2.0" + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/ts-custom-error/-/ts-custom-error-3.2.2.tgz", + "integrity": "sha512-u0YCNf2lf6T/vHm+POKZK1yFKWpSpJitcUN3HxqyEcFuNnHIDbyuIQC7QDy/PsBX3giFyk9rt6BFqBAh2lsDZQ==" }, "ts-jest": { "version": "28.0.7", @@ -11570,57 +11908,41 @@ "dev": true }, "typedoc": { - "version": "0.22.15", + "version": "0.23.28", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.23.28.tgz", + "integrity": "sha512-9x1+hZWTHEQcGoP7qFmlo4unUoVJLB0H/8vfO/7wqTnZxg4kPuji9y3uRzEu0ZKez63OJAUmiGhUrtukC6Uj3w==", "dev": true, "requires": { - "glob": "^7.2.0", "lunr": "^2.3.9", - "marked": "^4.0.12", - "minimatch": "^5.0.1", - "shiki": "^0.10.1" + "marked": "^4.2.12", + "minimatch": "^7.1.3", + "shiki": "^0.14.1" }, "dependencies": { - "glob": { - "version": "7.2.0", + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "dependencies": { - "minimatch": { - "version": "3.1.2", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - } + "balanced-match": "^1.0.0" } }, "minimatch": { - "version": "5.0.1", + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.6.tgz", + "integrity": "sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw==", "dev": true, "requires": { "brace-expansion": "^2.0.1" - }, - "dependencies": { - "brace-expansion": { - "version": "2.0.1", - "dev": true, - "requires": { - "balanced-match": "^1.0.0" - } - } } } } }, "typescript": { - "version": "4.6.4", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true }, "unbox-primitive": { @@ -11708,11 +12030,15 @@ } }, "vscode-oniguruma": { - "version": "1.6.2", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", + "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==", "dev": true }, "vscode-textmate": { - "version": "5.2.0", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz", + "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==", "dev": true }, "walker": { diff --git a/package.json b/package.json index c3fc7b6a..7206b085 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "prepare": "tsc -p ./tsconfig.build.json", "install": "node-gyp-build", "prebuild": "node ./scripts/prebuild.js", - "build": "rimraf ./dist && tsc -p ./tsconfig.build.json", + "build": "shx rm -rf ./dist && tsc -p ./tsconfig.build.json", "postversion": "npm install --package-lock-only --ignore-scripts --silent", "ts-node": "ts-node", "test": "jest", @@ -24,26 +24,26 @@ "lint-native": "find ./src ./tests -type f -regextype posix-extended -regex '.*\\.(c|cc|cpp|h|hh|hpp)' -exec clang-format --dry-run -Werror {} +", "lintfix-native": "find ./src ./tests -type f -regextype posix-extended -regex '.*\\.(c|cc|cpp|h|hh|hpp)' -exec clang-format -i {} +", "lint-shell": "find ./src ./tests ./scripts -type f -regextype posix-extended -regex '.*\\.(sh)' -exec shellcheck {} +", - "docs": "rimraf ./docs && typedoc --gitRevision master --tsconfig ./tsconfig.build.json --out ./docs src", - "bench": "rimraf ./benches/results && ts-node ./benches" + "docs": "shx rm -rf ./docs && typedoc --gitRevision master --tsconfig ./tsconfig.build.json --out ./docs src", + "bench": "shx rm -rf ./benches/results && ts-node ./benches" }, "dependencies": { - "@matrixai/async-init": "^1.8.1", - "@matrixai/async-locks": "^3.1.1", - "@matrixai/errors": "^1.1.2", - "@matrixai/logger": "^3.0.0", - "@matrixai/resources": "^1.1.3", - "@matrixai/workers": "^1.3.5", + "@matrixai/async-init": "^1.8.4", + "@matrixai/async-locks": "^4.0.0", + "@matrixai/errors": "^1.1.7", + "@matrixai/logger": "^3.1.0", + "@matrixai/resources": "^1.1.5", + "@matrixai/workers": "^1.3.7", "node-gyp-build": "4.4.0", "threads": "^1.6.5" }, "devDependencies": { - "@swc/core": "^1.2.215", + "@swc/core": "^1.3.62", + "@swc/jest": "^0.2.26", "@types/jest": "^28.1.3", - "@types/node": "^16.11.7", - "@types/node-forge": "^0.10.4", - "@typescript-eslint/eslint-plugin": "^5.23.0", - "@typescript-eslint/parser": "^5.23.0", + "@types/node": "^18.15.0", + "@typescript-eslint/eslint-plugin": "^5.45.1", + "@typescript-eslint/parser": "^5.45.1", "benny": "^3.7.1", "common-tags": "^1.8.2", "eslint": "^8.15.0", @@ -51,23 +51,24 @@ "eslint-plugin-import": "^2.26.0", "eslint-plugin-prettier": "^4.0.0", "jest": "^28.1.1", + "jest-extended": "^3.0.1", "jest-junit": "^14.0.0", "lexicographic-integer": "^1.1.0", "napi-macros": "^2.0.0", "node-forge": "^1.3.1", "node-gyp": "9.0.0", "prettier": "^2.6.2", - "rimraf": "^3.0.2", "semver": "^7.3.7", + "shx": "^0.3.4", "systeminformation": "^5.12.1", "ts-jest": "^28.0.5", "ts-node": "^10.9.1", "tsconfig-paths": "^3.9.0", - "typedoc": "^0.22.15", - "typescript": "^4.5.2" + "typedoc": "^0.23.21", + "typescript": "^4.9.3" }, "engines": { - "node": "^16.15.0", + "node": "^18.15.0", "msvs": "2019" } } diff --git a/pkgs.nix b/pkgs.nix index a41cd7fc..bb501409 100644 --- a/pkgs.nix +++ b/pkgs.nix @@ -1,4 +1,4 @@ import ( - let rev = "ce6aa13369b667ac2542593170993504932eb836"; in + let rev = "f294325aed382b66c7a188482101b0f336d1d7db"; in builtins.fetchTarball "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz" ) diff --git a/scripts/brew-install.sh b/scripts/brew-install.sh index ac17c20a..5e0f1478 100755 --- a/scripts/brew-install.sh +++ b/scripts/brew-install.sh @@ -10,7 +10,7 @@ export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 export HOMEBREW_NO_AUTO_UPDATE=1 export HOMEBREW_NO_ANALYTICS=1 -brew install node@16 -brew link --overwrite node@16 +brew install node@18 +brew link --overwrite node@18 brew install python@3.9 brew link --overwrite python@3.9 diff --git a/scripts/choco-install.ps1 b/scripts/choco-install.ps1 index 074edcb7..e3b1c6ea 100755 --- a/scripts/choco-install.ps1 +++ b/scripts/choco-install.ps1 @@ -21,11 +21,11 @@ if ( $null -eq $env:ChocolateyInstall ) { New-Item -Path "${PSScriptRoot}\..\tmp\chocolatey" -ItemType "directory" -ErrorAction:SilentlyContinue choco source add --name="cache" --source="${PSScriptRoot}\..\tmp\chocolatey" --priority=1 -# Install nodejs v16.15.1 (will use cache if exists) +# Install nodejs v18.15.0 (will use cache if exists) $nodejs = "nodejs.install" -choco install "$nodejs" --version="16.15.1" --require-checksums -y +choco install "$nodejs" --version="18.15.0" --require-checksums -y # Internalise nodejs to cache if doesn't exist -if ( -not (Test-Path -Path "${PSScriptRoot}\..\tmp\chocolatey\$nodejs\$nodejs.16.15.1.nupkg" -PathType Leaf) ) { +if ( -not (Test-Path -Path "${PSScriptRoot}\..\tmp\chocolatey\$nodejs\$nodejs.18.15.0.nupkg" -PathType Leaf) ) { Save-ChocoPackage -PackageName $nodejs } diff --git a/shell.nix b/shell.nix index 9d1083cd..a0d4aaa6 100644 --- a/shell.nix +++ b/shell.nix @@ -30,7 +30,7 @@ mkShell { mkdir --parents "$(pwd)/tmp" # Built executables and NPM executables - export PATH="$(pwd)/dist/bin:$(npm bin):$PATH" + export PATH="$(pwd)/dist/bin:$(npm root)/.bin:$PATH" # Path to headers used by node-gyp for native addons export npm_config_nodedir="${nodejs}" diff --git a/src/DB.ts b/src/DB.ts index cb9fadd9..9d307b6e 100644 --- a/src/DB.ts +++ b/src/DB.ts @@ -37,6 +37,7 @@ class DB { public static async createDB({ dbPath, crypto, + deadlock = false, fs = require('fs'), logger = new Logger(this.name), fresh = false, @@ -47,6 +48,7 @@ class DB { key: Buffer; ops: Crypto; }; + deadlock?: boolean; fs?: FileSystem; logger?: Logger; fresh?: boolean; @@ -54,6 +56,7 @@ class DB { logger.info(`Creating ${this.name}`); const db = new this({ dbPath, + deadlock, fs, logger, }); @@ -75,6 +78,7 @@ class DB { protected logger: Logger; protected workerManager?: DBWorkerManagerInterface; protected _lockBox: LockBox = new LockBox(); + protected _locksPending?: Map; protected _db: RocksDBDatabase; /** * References to iterators @@ -109,15 +113,20 @@ class DB { constructor({ dbPath, + deadlock, fs, logger, }: { dbPath: string; + deadlock: boolean; fs: FileSystem; logger: Logger; }) { this.logger = logger; this.dbPath = dbPath; + if (deadlock) { + this._locksPending = new Map(); + } this.fs = fs; } @@ -213,6 +222,7 @@ class DB { const tran = new DBTransaction({ db: this, lockBox: this._lockBox, + locksPending: this._locksPending, logger: this.logger, }); return [ diff --git a/src/DBTransaction.ts b/src/DBTransaction.ts index c7b3e309..26797c30 100644 --- a/src/DBTransaction.ts +++ b/src/DBTransaction.ts @@ -1,17 +1,11 @@ -import type { ResourceRelease } from '@matrixai/resources'; -import type { - LockBox, - MultiLockRequest as AsyncLocksMultiLockRequest, -} from '@matrixai/async-locks'; +import type { LockBox } from '@matrixai/async-locks'; import type DB from './DB'; import type { - ToString, KeyPath, LevelPath, DBIteratorOptions, DBClearOptions, DBCountOptions, - MultiLockRequest, } from './types'; import type { RocksDBTransaction, @@ -20,7 +14,12 @@ import type { } from './native/types'; import Logger from '@matrixai/logger'; import { CreateDestroy, ready } from '@matrixai/async-init/dist/CreateDestroy'; -import { Lock, RWLockWriter } from '@matrixai/async-locks'; +import { + Monitor, + Lock, + RWLockWriter, + errors as asyncLocksErrors, +} from '@matrixai/async-locks'; import DBIterator from './DBIterator'; import { rocksdbP } from './native'; import * as utils from './utils'; @@ -33,15 +32,7 @@ class DBTransaction { protected _db: DB; protected logger: Logger; - protected lockBox: LockBox; - protected _locks: Map< - string, - { - lock: RWLockWriter; - type: 'read' | 'write'; - release: ResourceRelease; - } - > = new Map(); + protected monitor: Monitor; protected _options: RocksDBTransactionOptions; protected _transaction: RocksDBTransaction; protected _snapshot: RocksDBTransactionSnapshot; @@ -58,18 +49,20 @@ class DBTransaction { public constructor({ db, lockBox, + locksPending, logger, ...options }: { db: DB; lockBox: LockBox; + locksPending?: Map; logger?: Logger; } & RocksDBTransactionOptions) { logger = logger ?? new Logger(this.constructor.name); logger.debug(`Constructing ${this.constructor.name}`); this.logger = logger; this._db = db; - this.lockBox = lockBox; + this.monitor = new Monitor(lockBox, RWLockWriter, locksPending); const options_ = { ...options, // Transactions should be synchronous @@ -96,9 +89,7 @@ class DBTransaction { // this then allows the destruction to proceed await this.commitOrRollbackLock.waitForUnlock(); this._db.transactionRefs.delete(this); - // Unlock all locked keys in reverse - const lockedKeys = [...this._locks.keys()].reverse(); - await this.unlock(...lockedKeys); + await this.monitor.unlockAll(); this.logger.debug(`Destroyed ${this.constructor.name} ${this.id}`); } @@ -150,15 +141,8 @@ class DBTransaction { return this._rollbacked; } - get locks(): ReadonlyMap< - string, - { - lock: RWLockWriter; - type: 'read' | 'write'; - release: ResourceRelease; - } - > { - return this._locks; + get locks(): Monitor['locks'] { + return this.monitor.locks; } /** @@ -168,78 +152,26 @@ class DBTransaction { return this._iteratorRefs; } - /** - * Lock a sequence of lock requests - * If the lock request doesn't specify, it - * defaults to using `RWLockWriter` with `write` type - * Keys are locked in string sorted order - * Even though keys can be arbitrary strings, by convention, you should use - * keys that correspond to keys in the database - * Locking with the same key is idempotent therefore lock re-entrancy is enabled - * Keys are automatically unlocked in reverse sorted order - * when the transaction is destroyed - * There is no support for lock upgrading or downgrading - * There is no deadlock detection - */ public async lock( - ...requests: Array + ...params: Parameters['lock']> ): Promise { - const requests_: Array> = []; - for (const request of requests) { - if (Array.isArray(request)) { - const [key, ...lockingParams] = request; - const key_ = key.toString(); - const lock = this._locks.get(key_); - // Default the lock type to `write` - const lockType = (lockingParams[0] = lockingParams[0] ?? 'write'); - if (lock == null) { - requests_.push([key_, RWLockWriter, ...lockingParams]); - } else if (lock.type !== lockType) { - throw new errors.ErrorDBTransactionLockType(); - } - } else { - const key_ = request.toString(); - const lock = this._locks.get(key_); - if (lock == null) { - // Default to using `RWLockWriter` write lock for just string keys - requests_.push([key_, RWLockWriter, 'write']); - } else if (lock.type !== 'write') { - throw new errors.ErrorDBTransactionLockType(); - } + try { + await this.monitor.lock(...params)(); + } catch (e) { + if (e instanceof asyncLocksErrors.ErrorAsyncLocksMonitorLockType) { + throw new errors.ErrorDBTransactionLockType(undefined, { cause: e }); } - } - if (requests_.length > 0) { - // Duplicates are eliminated, and the returned acquisitions are sorted - const lockAcquires = this.lockBox.lockMulti(...requests_); - for (const [key, lockAcquire, ...lockingParams] of lockAcquires) { - const [lockRelease, lock] = await lockAcquire(); - // The `Map` will maintain insertion order - // these must be unlocked in reverse order - // when the transaction is destroyed - this._locks.set(key as string, { - lock: lock!, - type: lockingParams[0]!, // The `type` is defaulted to `write` - release: lockRelease, - }); + if (e instanceof asyncLocksErrors.ErrorAsyncLocksMonitorDeadlock) { + throw new errors.ErrorDBTransactionDeadlock(undefined, { cause: e }); } + throw e; } } - /** - * Unlock a sequence of lock keys - * Unlocking will be done in the order of the keys - * A transaction instance is only allowed to unlock keys that it previously - * locked, all keys that are not part of the `this._locks` is ignored - * Unlocking the same keys is idempotent - */ - public async unlock(...keys: Array): Promise { - for (const key of keys) { - const key_ = key.toString(); - const lock = this._locks.get(key_); - if (lock == null) continue; - this._locks.delete(key_); - await lock.release(); - } + public async unlock( + ...params: Parameters['unlock']> + ): Promise { + await this.monitor.unlock(...params); } public async get( diff --git a/src/errors.ts b/src/errors.ts index 52f3a8aa..e676e332 100644 --- a/src/errors.ts +++ b/src/errors.ts @@ -87,6 +87,10 @@ class ErrorDBTransactionLockType extends ErrorDBTransaction { 'DBTransaction does not support upgrading or downgrading the lock type'; } +class ErrorDBTransactionDeadlock extends ErrorDBTransaction { + static description = 'DBTransaction encountered a pessimistic deadlock'; +} + export { ErrorDB, ErrorDBRunning, @@ -109,4 +113,5 @@ export { ErrorDBTransactionNotCommittedNorRollbacked, ErrorDBTransactionConflict, ErrorDBTransactionLockType, + ErrorDBTransactionDeadlock, }; diff --git a/src/types.ts b/src/types.ts index ad700ec6..fc5839fc 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,5 +1,4 @@ import type fs from 'fs'; -import type { RWLockWriter } from '@matrixai/async-locks'; import type { WorkerManagerInterface } from '@matrixai/workers'; import type { RocksDBDatabaseOptions, @@ -17,13 +16,6 @@ import type { */ type POJO = { [key: string]: any }; -/** - * Any type that can be turned into a string - */ -interface ToString { - toString(): string; -} - /** * Opaque types are wrappers of existing types * that require smart constructors @@ -159,14 +151,8 @@ type DBOp = type DBOps = Array; -type MultiLockRequest = [ - key: ToString, - ...lockingParams: Parameters, -]; - export type { POJO, - ToString, Opaque, Callback, Merge, @@ -182,5 +168,4 @@ export type { DBBatch, DBOp, DBOps, - MultiLockRequest, }; diff --git a/tests/DBTransaction.test.ts b/tests/DBTransaction.test.ts index 4236a613..c2d84107 100644 --- a/tests/DBTransaction.test.ts +++ b/tests/DBTransaction.test.ts @@ -1035,9 +1035,9 @@ describe(DBTransaction.name, () => { ); await db.withTransactionF(async (tran2) => { await tran2.lock(['foo', 'read']); - await expect(tran2.lock(['bar', 'write', 0])).rejects.toThrow( - locksErrors.ErrorAsyncLocksTimeout, - ); + await expect( + tran2.lock(['bar', 'write', { timer: 0 }]), + ).rejects.toThrow(locksErrors.ErrorAsyncLocksTimeout); expect(tran1.locks.size).toBe(2); expect(tran1.locks.has('foo')).toBe(true); expect(tran1.locks.get('foo')!.type).toBe('read'); @@ -1097,9 +1097,9 @@ describe(DBTransaction.name, () => { // This is a noop, because `tran1` owns `key1` and `key2` await tran2.unlock('key1', 'key2'); // This fails because `key1` is still locked by `tran1` - await expect(tran2.lock(['key1', 'write', 0])).rejects.toThrow( - locksErrors.ErrorAsyncLocksTimeout, - ); + await expect( + tran2.lock(['key1', 'write', { timer: 0 }]), + ).rejects.toThrow(locksErrors.ErrorAsyncLocksTimeout); await tran1.unlock('key1'); expect(tran1.locks.size).toBe(1); // This succeeds because `key1` is now unlocked @@ -1109,9 +1109,9 @@ describe(DBTransaction.name, () => { await tran1.unlock('key1'); expect(tran2.locks.has('key1')).toBe(true); expect(tran1.locks.has('key1')).toBe(false); - await expect(tran1.lock(['key1', 'write', 0])).rejects.toThrow( - locksErrors.ErrorAsyncLocksTimeout, - ); + await expect( + tran1.lock(['key1', 'write', { timer: 0 }]), + ).rejects.toThrow(locksErrors.ErrorAsyncLocksTimeout); }); await tran1.lock('key1'); expect(tran1.locks.has('key1')).toBe(true); @@ -1126,8 +1126,8 @@ describe(DBTransaction.name, () => { // Currently a deadlock can happen, and the only way to avoid is to use timeouts // In the future, we want to have `DBTransaction` detect deadlocks // and automatically give us `ErrorDBTransactionDeadlock` exception - const p1 = tran1.lock(['bar', 'write', 50]); - const p2 = tran2.lock(['foo', 'write', 50]); + const p1 = tran1.lock(['bar', 'write', { timer: 50 }]); + const p2 = tran2.lock(['foo', 'write', { timer: 50 }]); const results = await Promise.allSettled([p1, p2]); expect( results.every( @@ -1139,4 +1139,30 @@ describe(DBTransaction.name, () => { }); }); }); + test('deadlock detection', async () => { + const dbPath = `${dataDir}/db2`; + const db = await DB.createDB({ dbPath, crypto, deadlock: true, logger }); + const barrier = await Barrier.createBarrier(2); + const results = await Promise.allSettled([ + db.withTransactionF(async (tran1) => { + await tran1.lock('foo'); + await barrier.wait(); + await tran1.lock('bar'); + }), + db.withTransactionF(async (tran2) => { + await tran2.lock('bar'); + await barrier.wait(); + await tran2.lock('foo'); + }), + ]); + expect( + results.some( + (r) => + r.status === 'rejected' && + r.reason instanceof errors.ErrorDBTransactionDeadlock, + ), + ).toBe(true); + expect(results.some((r) => r.status === 'fulfilled')).toBe(true); + await db.stop(); + }); }); diff --git a/tests/global.d.ts b/tests/global.d.ts index 85365f16..5342a191 100644 --- a/tests/global.d.ts +++ b/tests/global.d.ts @@ -1,4 +1,7 @@ /* eslint-disable no-var */ + +/// + /** * Follows the globals in jest.config.ts * @module diff --git a/tests/setupAfterEnv.ts b/tests/setupAfterEnv.ts index 6d49ee9a..8ea8279e 100644 --- a/tests/setupAfterEnv.ts +++ b/tests/setupAfterEnv.ts @@ -1,4 +1,4 @@ // Default timeout per test // some tests may take longer in which case you should specify the timeout // explicitly for each test by using the third parameter of test function -jest.setTimeout(global.defaultTimeout); +jest.setTimeout(globalThis.defaultTimeout); diff --git a/tests/workers/dbWorker.ts b/tests/workers/dbWorker.ts index 68f02bbc..5b032245 100644 --- a/tests/workers/dbWorker.ts +++ b/tests/workers/dbWorker.ts @@ -1,6 +1,5 @@ import type { DBWorkerModule } from './dbWorkerModule'; import { expose } from 'threads/worker'; - import dbWorker from './dbWorkerModule'; expose(dbWorker); diff --git a/tests/workers/dbWorkerModule.ts b/tests/workers/dbWorkerModule.ts index fc9dd574..80bffdd4 100644 --- a/tests/workers/dbWorkerModule.ts +++ b/tests/workers/dbWorkerModule.ts @@ -1,5 +1,4 @@ import type { TransferDescriptor } from 'threads'; - import { Transfer } from 'threads'; import * as utils from '../utils'; diff --git a/tsconfig.json b/tsconfig.json index 2fffd283..a1204365 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -14,7 +14,7 @@ "resolveJsonModule": true, "moduleResolution": "node", "module": "CommonJS", - "target": "ES2021", + "target": "ES2022", "baseUrl": "./src", "paths": { "@": ["index"],