npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

bibliograph-storage-meadow

v0.0.2

Published

Bibliograph storage provider backed by Meadow DAL. Supports SQLite, PostgreSQL, MySQL, MSSQL, and other Meadow providers.

Readme

bibliograph-storage-meadow

Meadow DAL-backed storage provider for Bibliograph. Enables Bibliograph to persist records, metadata, and change deltas across any Meadow-supported database backend.

License: MIT

Features

  • Multi-Backend Persistence -- supports SQLite, PostgreSQL, MySQL, MSSQL, and any other Meadow provider
  • Bibliograph Storage Interface -- implements the full BibliographStorageBase contract
  • Record CRUD -- create, read, update (upsert), and soft-delete records
  • Metadata Management -- per-record metadata storage (MD5 hashes, ingest timestamps, etc.)
  • Delta Tracking -- change history containers for record versioning
  • Temporal Queries -- enumerate record keys within a timestamp range
  • Soft Delete -- Meadow-managed delete tracking with audit fields
  • Auto-Schema for SQLite -- automatic table creation when using the SQLite provider

Installation

npm install bibliograph-storage-meadow

Quick Start

const libPict = require('pict');
const libBibliographStorageMeadow = require('bibliograph-storage-meadow');
const libMeadowConnectionSQLite = require('meadow-connection-sqlite');

let _Pict = new libPict(
	{
		"Product": "MyApp",
		"SQLite": { "DatabaseFileName": "./data/myapp.db" },
		"Meadow-Provider": "SQLite"
	});

_Pict.serviceManager.addAndInstantiateServiceType(
	'MeadowSQLiteProvider', libMeadowConnectionSQLite);

_Pict.MeadowSQLiteProvider.connectAsync(
	(pError) =>
	{
		if (pError) { return console.error(pError); }

		let tmpStorage = _Pict.serviceManager.instantiateServiceProvider(
			'BibliographStorageMeadow',
			{ 'Meadow-Provider': 'SQLite' });

		tmpStorage.initialize(
			(pInitError) =>
			{
				if (pInitError) { return console.error(pInitError); }

				// Ready for record operations
				tmpStorage.persistRecord('my-source', 'record-001',
					JSON.stringify({ title: 'Hello', body: 'World' }),
					(pErr) =>
					{
						console.log('Record persisted!');
					});
			});
	});

Configuration

| Setting | Default | Description | |---------|---------|-------------| | Meadow-Provider | SQLite | Meadow backend provider name |

The provider name determines which Meadow connection service is used. The corresponding connection service must be registered and connected before calling initialize().

API

Lifecycle

| Method | Description | |--------|-------------| | initialize(fCallback) | Create Meadow entities and ensure tables exist |

Source Operations

| Method | Description | |--------|-------------| | sourceExists(hash, fCallback) | Check if a source exists | | sourceCreate(hash, fCallback) | Create a new source record |

Record Operations

| Method | Description | |--------|-------------| | exists(hash, guid, fCallback) | Check if a record exists | | read(hash, guid, fCallback) | Read and parse a record | | persistRecord(hash, guid, json, fCallback) | Create or update a record | | persistDelete(hash, guid, fCallback) | Soft-delete a record |

Metadata Operations

| Method | Description | |--------|-------------| | readRecordMetadata(hash, guid, fCallback) | Read record metadata | | persistRecordMetadata(hash, guid, meta, fCallback) | Create or update metadata |

Timestamp Operations

| Method | Description | |--------|-------------| | stampRecordTimestamp(hash, guid, fCallback) | Update record timestamp to now |

Delta Operations

| Method | Description | |--------|-------------| | readRecordDelta(hash, guid, fCallback) | Read change history | | persistRecordDelta(hash, meta, delta, fCallback) | Save change history |

Key Enumeration

| Method | Description | |--------|-------------| | readRecordKeys(hash, fCallback) | List all record GUIDs for a source | | readRecordKeysByTimestamp(hash, from, to, fCallback) | List record GUIDs in time range |

Database Tables

The storage provider manages three database tables:

| Table | Purpose | |-------|---------| | BibliographSource | Data source registry (SourceHash) | | BibliographRecord | Record storage (RecordData, MetadataJSON, RecordTimestamp) | | BibliographDelta | Change history (DeltaJSON) |

Part of the Retold Framework

This module bridges the Bibliograph record management system with the Meadow data access layer, enabling multi-backend database storage within the Retold application framework.

Testing

npm test

Coverage:

npm run coverage

Related Packages

License

MIT

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.