Skip to main content
Home

Built and signed on GitHub Actions

Zanix Datamaster provides unified database and cache connectors for the Zanix ecosystem. Includes MongoDB support, schema tools, and data access policies — built for Deno and micro-applications.

This package works with Node.js, Deno, BrowsersIt is unknown whether this package works with Cloudflare Workers, Bun
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
It is unknown whether this package works with Bun
This package works with Browsers
JSR Score
88%
Published
a day ago (0.4.0)
f
createDecryptableObject

Creates a decryptable object for data protection.

f
createUnmaskableObject

Creates an unmaskable object for data protection.

f
createVerifiableObject

Creates a verifiable object for hashed data.

f
dataAccessGetter

Set the access policy for a given data field (string or string array), applying the specified base getter function.

f
datamasterDecrypt

Decrypts a message using either AES-GCM (symmetric) or RSA-OAEP (asymmetric) encryption.

f
datamasterEncrypt

Encrypts a message using either AES-GCM (symmetric) or RSA-OAEP (asymmetric) encryption.

f
datamasterHash

Hash a message using unidirectional encryption (Base64 SHA).

f
datamasterMask

Masks the provided message(s) using a secret key for obfuscation or reversible masking.

f
datamasterUnmask

Unmasks (reverses) the provided masked message(s) using the same secret key and configuration that were used during masking.

f
dataPoliciesGetter

Defines the data protection and access control behavior for a specific data field (either a single string field or an array of strings).

f
dataProtectionGetter

Creates a schema accessor that transparently applies data protection operations (such as decrypt or unmask) when reading a protected field.

T
DecryptableObject

Represents a string that may have been protected through encryption.

v
defineModelHOC

A higher-order component (HOC) that adds a model to the ProgramModule's model registry. This function enhances the given model by adding it to a collection or registry of models, optionally specifying the database type (defaulting to 'mongo').

f
findPathsWithAccessorsDeep

Recursively finds all paths in a schema that have getters or setters defined.

f
getAllSubschemas

Recursively collects all nested (sub)schemas from a given Mongoose schema.

c
c
LockManager

Manages keyed locks using semaphores to ensure controlled, concurrent access to resources identified by a specific key.

T
MongoConnectorOptions

Configuration for connecting to MongoDB.

T
MongoSeeder

Type representing a single seeder handler function for Mongo.

v
ProgramModule

A frozen singleton instance of the Program.

f
scanKeys

Returns all keys currently stored in the redis cache. Uses SCAN for efficiency instead of KEYS, so it works well with large datasets.

f
seedByIdIfMissing

Seeder handler that ensures a single document exists in the collection, identified by its id. If the document does not exist, it will be inserted; if it exists, it remains unchanged.

f
seedManyByIdIfMissing

Seeder handler that ensures multiple documents exist in the collection, each identified by its id. If a document does not exist, it will be inserted; if it exists, it remains unchanged.

f
seedRotateProtectionKeys

Rotates data protection keys across the database by re-encrypting or re-masking all protected fields using the new set of secrets or keys.

c
Semaphore

A Semaphore implementation that controls access to a shared resource by multiple concurrent processes or tasks, allowing a fixed number of permits for resource access.

f
transformByDataAccess

Enables and applies the data access policy during Mongoose document transformation (toJSON or toObject).

f
transformByDataProtection

Reverses the data protection policy during Mongoose document transformations (toJSON or toObject).

f
transformDeepByPaths

Transforms a data structure by applying the provided transformation functions to specific paths.

f
transformRecursively

Recursively transforms a data structure (object, array, Map, etc.) by applying the provided transformation functions.

f
transformShallowByPaths

Applies a transformation function to specific paths in a data structure at a shallow (superficial) level.

T
UnmaskableObject

Represents a string that may have been protected through masking.

T
VerifiableObject

Represents a string that may have been protected through hashing.

c
ZanixCacheCoreProvider

Core cache provider with multi-level caching (local + external).

c
ZanixKVStoreConnector

A lightweight and fast key-value local store backed by SQLite, with optional TTL (Time-To-Live) support.

c
ZanixMongoConnector

Manages the connection lifecycle with a MongoDB database using Mongoose, providing utilities for model retrieval, schema processing, and connector customization.

c
ZanixQLRUConnector

A fast and lightweight Least Recently Used (LRU) cache with optional TTL (Time-To-Live) support.

v
cacheProvider

Core cache provider loader for Zanix.

v
mongoCore

Core database connector loader for Zanix.

v
znxKeyValue

Core Zanix KV connector loader for the Zanix framework.

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.