open-index/open-npm huggingface dataset:
npm package: @farjs/better-sqlite3-migrate
Description: Automates Sqlite DB schema versioning
Author: viktor-podzigun
Latest version: 3.0.0

[![CI](https://github.com/farjs/better-sqlite3-migrate/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/farjs/better-sqlite3-migrate/actions/workflows/ci.yml?query=workflow%3Aci+branch%3Amain)
[![Coverage Status](https://coveralls.io/repos/github/farjs/better-sqlite3-migrate/badge.svg?branch=main)](https://coveralls.io/github/farjs/better-sqlite3-migrate?branch=main)
[![npm version](https://img.shields.io/npm/v/@farjs/better-sqlite3-migrate)](https://www.npmjs.com/package/@farjs/better-sqlite3-migrate)

## @farjs/better-sqlite3-migrate

Automates Sqlite DB schema versioning.

Uses [wrapper](https://github.com/farjs/better-sqlite3-wrapper)
around [better-sqlite3](https://github.com/WiseLibs/better-sqlite3)
and [bun:sqlite](https://bun.sh/docs/api/sqlite)
to allow cross- runtime/engine usage.

### How to use it

#### 1. Add SQL Migrations Scripts

Add your `SQL` migrations scripts under dedicated project sub-folder, for ex. `./migrations`.

See example SQL migrations scripts:

- [V001\_\_initial_db_structure.sql](test/migrations/V001__initial_db_structure.sql)
- [V002\_\_rename_db_field.sql](test/migrations/V002__rename_db_field.sql)

#### 2. Generate `bundle.json` migrations file

To generate singe migrations bundle file you can use `sql-bundle` script and run it as part of build process.

For example, in your `package.json`:

```json
"scripts": {
  "sql-bundle": "npx sql-bundle ./migrations"
}
```

Then run it as follows:

```bash
npm run sql-bundle
```

`bundle.json` file will be (re)generated in the same `./migrations` folder.

#### 3. Exclude `bundle.json` file from `git`

Since it can be easily generated from the input `SQL` migrations files there is no need to commit this file.

You can exclude it by adding the following line to your
`.gitignore` file:

```bash
migrations/bundle.json
```

#### 4. Load and run migrations bundle

The final setup is to actually load and apply migrations on your `Sqlite` DB during app startup:

```javascript
import Database from "@farjs/better-sqlite3-wrapper";
import { readBundle, runBundle } from "@farjs/better-sqlite3-migrate";

// connect to your DB
const db = new Database(":memory:");

const bundleUrl = new URL("./migrations/bundle.json", import.meta.url);

// load migrations bundle
const bundle = await readBundle(bundleUrl);

// apply it
await runBundle(db, bundle);
```

This will create (or update existing) `schema_versions` DB table with the all SQL migrations that were applied.

So, next time it will only apply new SQL migrations, that were not applied before (not exist in `schema_versions` table yet).
npm package: @farjs/better-sqlite3-websql
Description: Cross-runtime implementation of WebSql api backed by better-sqlite3 and bun:sqlite
Author: viktor-podzigun
Latest version: 2.0.0


[![CI](https://github.com/farjs/better-sqlite3-websql/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/farjs/better-sqlite3-websql/actions/workflows/ci.yml?query=workflow%3Aci+branch%3Amain)
[![npm version](https://img.shields.io/npm/v/@farjs/better-sqlite3-websql)](https://www.npmjs.com/package/@farjs/better-sqlite3-websql)

## @farjs/better-sqlite3-websql

Cross-runtime implementation of [WebSql](https://www.npmjs.com/package/websql) api
backed by [better-sqlite3](https://github.com/WiseLibs/better-sqlite3)
and [bun:sqlite](https://bun.sh/docs/api/sqlite).
npm package: @farjs/better-sqlite3-wrapper
Description: Thin api wrapper around better-sqlite3 and bun:sqlite to allow cross- runtime/engine usage
Author: viktor-podzigun
Latest version: 3.0.0

[![CI](https://github.com/farjs/better-sqlite3-wrapper/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/farjs/better-sqlite3-wrapper/actions/workflows/ci.yml?query=workflow%3Aci+branch%3Amain)
[![npm version](https://img.shields.io/npm/v/@farjs/better-sqlite3-wrapper)](https://www.npmjs.com/package/@farjs/better-sqlite3-wrapper)

## @farjs/better-sqlite3-wrapper

Thin api wrapper around:

- [better-sqlite3](https://github.com/WiseLibs/better-sqlite3) on node version < 22
- [node:sqlite](https://nodejs.org/docs/latest-v22.x/api/sqlite.html) on node version >= 22
- and [bun:sqlite](https://bun.sh/docs/api/sqlite)

to allow cross- runtime/engine usage.

It exposes only [a subset](./index.d.ts) of `better-sqlite3` api because not everything
is available in `bun:sqlite`/`node:sqlite`.

For example, since `run` returns `undefined` you can use the following queries to get
`changes` and/or `lastInsertRowid`:

```javascript
const changes = db.prepare("SELECT changes() AS changes;").get().changes;
const lastInsertRowId = db
  .prepare("SELECT last_insert_rowid() AS id;")
  .get().id;
```

Also, since `db.pragma` is not available in `bun:sqlite`, you can run:

```javascript
// non-transactional
db.prepare("PRAGMA foreign_keys = ON;").run();
```
npm package: @farjs/blessed
Description: A high-level terminal interface library for node.js.
Author: Christopher Jeffrey
Latest version: 0.4.0


[![CI](https://github.com/farjs/blessed/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/farjs/blessed/actions/workflows/ci.yml?query=workflow%3Aci+branch%3Amaster)
[![npm version](https://img.shields.io/npm/v/@farjs/blessed)](https://www.npmjs.com/package/@farjs/blessed)
[![Rate on Openbase](https://badges.openbase.com/js/rating/@farjs/blessed.svg)](https://openbase.com/js/@farjs/blessed?utm_source=embedded&utm_medium=badge&utm_campaign=rate-badge)

# @farjs/blessed

This is a fork of original [blessed](https://github.com/chjj/blessed)

A curses-like library with a high level terminal interface API for node.js.

![blessed](https://raw.githubusercontent.com/chjj/blessed/master/img/v0.1.0-3.gif)

This fork includes few changes required by
[FAR.js](https://github.com/farjs) app.

## License

Copyright (c) 2013-2015, Christopher Jeffrey. (MIT License)

Copyright (c) 2022, FAR.js (MIT License)

See LICENSE for more info.
npm package: @farlend/ui
Description: UI library for Angular app.
Author: Mike Stotik
Latest version: 1.0.5

# Farlend UI
For complete documentation, visit the [Farlend UI](https://github.com/farlend/ui) website.

## Supported browsers
- Chrome (45+)
- Firefox (40+)
- IE (10+)
- Edge (20+)
- Safari (7+)

## Installation
```bash
npm install @farlend/ui --save
```

## Used
- Bootstrap grid

## Requirements
- Node.js
- TypeScript
- SCSS