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

@totto2727/reylo

v0.7.1

Published

Import SQL files as fully typed queries. A TypeScript content mapper plus a runtime loader.

Readme

Reylo: SQLite and HCL

This fork of Reylo imports .sql files as typed TypeScript queries. It maintains only the runtime @totto2727/reylo and the SQLite/HCL tooling @totto2727/reylo-sqlite. Analysis reads a local SQLite database or a static Atlas HCL schema. The application supplies its own SQLite driver for execution.

Setup

Use Node 24 or later and TypeScript 7.1 with content mapper support. Install the two fork packages, runtime and SQLite/HCL tooling, at the same version:

nub add @totto2727/reylo
nub add -D @totto2727/reylo-sqlite [email protected]

Configure the content mapper in tsconfig.json:

{
  "compilerOptions": {
    "target": "esnext",
    "module": "nodenext",
    "strict": true,
    "noEmit": true
  },
  "contentMappers": [
    {
      "package": "@totto2727/reylo",
      "extensions": [".sql", ".reylo.yaml", ".reylo.yml"]
    }
  ]
}

Choose one analysis source in .reylo.yaml:

# A local database that already contains the schema:
direct_url: file:./app.db
# Or a local static Atlas SQLite schema:
direct_url: hcl:./schema.hcl

HCL analysis needs no Atlas executable, database server, or migration execution. It supports static SQLite main schemas, not arbitrary HCL evaluation. The schema is an analysis input, not a runtime connection or a migration. The application must create and maintain its runtime database separately.

Use typed SQL

-- get_user.sql
select id, name from users where id = :id
import { DatabaseSync } from "node:sqlite";
import getUser from "./get_user.sql";

const db = new DatabaseSync("app.db");
const user = getUser.runSync(db, { id: 1 });
console.log(user);
db.close();

Enable the loader with node --import @totto2727/reylo/register main.ts, or use the preload configuration in the nub example. Run the type check with nubx tsc --noEmit --runExternalCode. See the examples for complete SQLite and HCL projects, and the usage skill for configuration and native-driver guidance.

Effect execution

Use the optional @totto2727/reylo/effect entry point to run a typed query with a Layer-provided QueryExecutor. The application adapts its existing Effect-native client; Reylo owns parameter encoding, row decoding, and cardinality. Client-specific transactions and batches remain in the application. See Effect query execution for the service contract and dependency composition.

Version 0.7 compatibility

Unconstrained JSON values use the exported Json union rather than unknown. The previous generic Json<T> row-to-JSON utility is now named AsJson<T>. Date and timestamp values outside years 0000 through 9999 use ISO 8601 extended years. The fork keeps the two scoped packages above and reuses upstream @reylosql/engine-* native binaries, pinned to 0.7.0. The fork packages are 0.7.1; this fork-only patch does not change the required native release. The package manager installs the binary for the host platform through optional dependencies. Do not omit optional dependencies when installing analysis tooling. Analysis starts the engine as a child process, including when its schema comes from HCL. The fork no longer ships a WebAssembly component or needs Rust to build its npm distributions. Native engine sources, build configuration, and source-level oracle cases are maintained only upstream, not in this fork. See the tooling package for supported platforms and missing-binary guidance.

Maintenance

Read AGENTS.md before changing this repository. The upstream differences record the exact upstream base and retained shared code. The publishing guide describes the two-package release. Upstream's documentation describes a broader product and is not this fork's support matrix.

Local development with Nix

Enter the default development shell to obtain Nub 0.9.6 from the official Nub flake:

nix develop
nub --version

Nub manages the Node runtime required by the project; the shell does not install a separate Node package. CI uses the empty ci shell and continues to install Nub through its existing setup action.

License

Reylo retains its MIT license. The translated native HCL parser carries MPL-2.0, with additional notices in licenses/. See the upstream source and this fork's source.