Registry / database / calustra

calustra

JSON →
library0.15.3jsnpmunverified

Calustra is a Node.js library (v0.15.3) that synchronizes database schemas and data to web-based formats, such as JSON and Markdown. It supports multiple databases including PostgreSQL, MySQL, SQLite, and MariaDB. Key differentiators include its focus on bidirectional syncing and real-time updates via change tracking. The library is under active development with weekly releases, emphasizing simplicity and extensibility through a plugin system. It is ESM-only and requires Node.js 18+.

npm install calustra
INSTALL
IMPORT
SIG · CALUSTRA
C
calustra
databasejavascriptv0.15.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Calustra
import { Calustra } from 'calustra'
const Calustra = require('calustra')
ESM-only since v0.10; requires Node 18+.
sync
import { sync } from 'calustra'
import sync from 'calustra'
Named export, not default.
createConfig
import { createConfig } from 'calustra'
Available from v0.12.
types
import type { SyncConfig } from 'calustra'
import { SyncConfig } from 'calustra'
Types exported separately for TypeScript users.

Initializes Calustra with SQLite database, syncs to JSON output, and logs sync events.

import { Calustra } from 'calustra'; const calustra = new Calustra({ database: 'sqlite://mydb.sqlite', outputDir: './output', format: 'json' }); calustra.on('sync', (data) => { console.log('Synced:', data); }); await calustra.sync(); console.log('Sync complete.');
Debug
Known issues
breakingIn v0.15, the `sync` method returns a Promise instead of using a callback.
fix
Use async/await or .then() for sync calls.
affects: >=0.15
breakingESM-only since v0.10. CommonJS require() will fail.
fix
Use import syntax and ensure Node 18+ and "type": "module" in package.json.
affects: >=0.10
deprecatedThe `onComplete` option has been deprecated in favor of the 'sync' event.
fix
Use `calustra.on('sync', callback)` instead.
affects: >=0.13
gotchaDatabase drivers are peer dependencies and must be installed separately.
fix
Install the appropriate driver package (e.g., `npm install pg` for PostgreSQL).
affects: >=0.12
Errors
Common errors & fixes
Error: Cannot find module 'calustra'
Package not installed or incorrect import path.
fix
Run `npm install calustra` and verify import as `import { Calustra } from 'calustra'`.
TypeError: calustra.sync is not a function
Using an older version where sync was a property, not a method.
fix
Upgrade to >=0.15 and use `await calustra.sync()`.
Error: No database driver found for 'mysql'
Missing peer dependency for MySQL.
fix
Run `npm install mysql2`.
Upgrade
Version history
0.15.3latest on npm
Audit
Dependencies
pgoptionalPostgreSQL driver for database connections
mysql2optionalMySQL/MariaDB driver for database connections
better-sqlite3optionalSQLite driver for database connections
Agent activity
14 hits · last 30 days
node
12
OpenAI (training)
1
Resources
calustra — npm install calustra · libregistry