open-index/open-npm huggingface dataset:
npm package: @openquantum/asset-generator
Description: a simple commandline asset generator for iOS and Android
Author: Tobias Zeising
Latest version: 2.5.0

# asset-generator

This is a cheap asset resizer for Android and iOS. It takes an image in @3x or xxhdpi size and resize it:

- Android: mdpi, ldpi, hdpi, xhdpi, xxhdpi
- iOS: @1x, @2x, @3x

## Installation

```
npm install asset-generator -g
```

## Usage

```
asset-generator <files> --android <target-dir-android> --ios <target-dir-ios>
```

android or ios option is optional. Only use --android if you need only android assets.

example:

```
asset-generator *.png --android ./my-android-project/app/src/main/res --ios ./my-ios-project/app/assets
```

example:

```
asset-generator *.png --android ./my-android-project/app/src/main/res --ios ./my-ios-project/app/assets
```

---

Credit:
Originally created by [SSilence](https://github.com/SSilence/asset-generator)
npm package: @openquantum/honey-pager
Description: A Relay-style cursor pagination tool for mongoose schema.
Author: Louis Bodart
Latest version: 0.2.8

Fork from https://github.com/codeinbrain/honey-pager that uses Base64 instead of JWT.

<p align="center">
  <img src="https://github.com/codeinbrain/honey-pager/blob/master/docs/honeypager.png" width="700" title="HoneyPager">
</p>

<p align="center">
  <a href="https://travis-ci.org/codeinbrain/honey-pager"><img src="https://img.shields.io/travis/codeinbrain/honey-pager.svg" title="Travis (.org)"></a>
  <img src="https://img.shields.io/badge/status-experimental-orange.svg" title="Status">
</p>

A [Relay-style](https://facebook.github.io/relay/graphql/connections.htm) cursor pagination tool for [mongoose](https://github.com/Automattic/mongoose) schema. Designed to work with GraphQL.

## Quick view

```javascript
// User.js
import mongoose, { Schema } from 'mongoose';
import { honeypager } from 'honey-pager';

const schema = Schema({
  firstName:  { type: String },
  lastName:   { type: String },
  email:      { type: String }
});

schema.plugin(honeypager);

export default schema;
```

```javascript
// server.js
import express from 'express';
import User from './User';

let app = express();
// ...
app.get('/users', (req, res) => {
  const result = User.paginateResult();
  res.status(200).json(result);
});
```
This will gives you the following response:
```
{
  "totalCount": 10,
  "edges": [
    {
      "cursor": "...",
      "node": {
        "firstName": "John",
        "lastName": "Doe",
        "email": "jdoe@test.com"
      }
    },
    ...
  ],
  "pageInfo": {
    "startCursor": "...",
    "endCursor": "...",
    "hasNextPage": false,
    "hasPreviousPage": false
  }
}
```

Made with :heart: by [lobodart](https://github.com/lobodart).
npm package: @openquantum/mongoose-cursor-pagination
Description: Easy-to-use, scalable, cursor pagination plugin for mongoose
Author: Mother Co
Latest version: 0.2.8

# mongoose-cursor-pagination

[![Build Status](https://travis-ci.org/mother/mongoose-cursor-pagination.svg?branch=master)](https://travis-ci.org/mother/mongoose-cursor-pagination)

This small plugin makes it easy to use cursor-based pagination in your app, without changing the way you use queries in mongoose.

## Installation

```npm install @mother/mongoose-cursor-pagination --save```

Node.js 10.x or higher is required.

## Usage

In your schema:

```javascript
import mongoose from 'mongoose'
import paginationPlugin from '@mother/mongoose-cursor-pagination'

const CommentSchema = new mongoose.Schema({
  date: { type: Date },
  body: { type: String },
  author: {
     firstName: { type: String },
     lastName: { type: String }
  }
})

CommentSchema.plugin(paginationPlugin)
```

In your application code:

```javascript
const { results, pageInfo } = await Comment
   .find({})                 // Whatever filter you want
   .limit(30)                // Use limit and other Query options as you normally would
   .sort('author.lastName')  // Use sort as you would normally do
   .paginate(startCursor)    // startCursor optional
   .exec()                   // Required
```

`results` will be the results that you would expect from a normal mongoose `find` query

`pageInfo` will have two properties: `hasNext` and `nextCursor`

Be sure to index correctly. Note that this plugin always add `_id` to the sort key to ensure cursors are unique, so include that in your index as well. For example, say you are using the `date` field for pagination, then you would want to setup the index:

```js
commentSchema.index({ date: -1, _id: -1 })
```

## Plugin Options

You can optionally pass an options object to this plugin:

```js
CommentSchema.plugin(paginationPlugin, {
   // If no limit is specified, and paginate() is being used,
   // what should the default limit be.
   defaultLimit: 100
})
```

## Tests

Numerous tests are included in the `tests` directory, and can be run using the command `npm test`.

## To Do
- Test against older versions of mongoose
- Support for search with pagination
- Support for aggregation with pagination
- Support for `hasPrev` and `prevCursor`
- Support `exec` calls that use callbacks instead of promises

## License

MIT
npm package: @openrail/eslint-config
Description: An ESLint configuration for use with OpenRail packages
Author: Steven Collins
Latest version: 1.4.1
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @openrail/eslint-config

[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://choosealicense.com/licenses/mit/)
[![npm (scoped)](https://img.shields.io/npm/v/@openrail/eslint-config.svg)](https://www.npmjs.com/package/@openrail/eslint-config)
[![Discord](https://img.shields.io/discord/478848557089030144.svg)](https://discord.gg/N9CPKaY)

A default ESLint configuration for use within OpenRail packages

## usage

run the following command to add this package to your devDependencies:
```bash
yarn add @openrail/eslint-config --dev
```

ontop of this you may have to install this packages peerDependencies which can be done by running the following command:
```bash
yarn add eslint eslint-config-airbnb-base eslint-plugin-import eslint-plugin-mocha eslint-plugin-node --dev 
```

and then create a `.eslint` file in the root of your project with the following contents:
```json
{
  "extends": "@openrail"
}
```
npm package: @openrailuk/stomp-client
Description: A stomp client used for accessing National Rail UK Datafeeds
Author: Steven Collins
Latest version: 1.0.1
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

<!-- ![](https://gitlab.com/openrail/uk/darwin-nodejs/uploads/0ef819a8fbad3601e15c967effd4c442/stomp-client-banner.svg) -->

stomp-client

[![country](https://img.shields.io/badge/country-UK-blue.svg)](https://gitlab.com/groups/openrail/uk)
[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://choosealicense.com/licenses/mit/)
[![npm (scoped)](https://img.shields.io/npm/v/@openrailuk/stomp-client.svg)](https://www.npmjs.com/package/@openrailuk/stomp-client)
[![status](https://img.shields.io/badge/status-WIP-yellow.svg)](https://gitlab.com/openrail/uk/stomp-client-nodejs)
[![pipeline](https://gitlab.com/openrail/uk/stomp-client-nodejs/badges/master/pipeline.svg)](https://gitlab.com/openrail/uk/stomp-client-nodejs/commits/master)
[![coverage](https://gitlab.com/openrail/uk/stomp-client-nodejs/badges/master/coverage.svg)](https://gitlab.com/openrail/uk/stomp-client-nodejs/commits/master)
[![Discord](https://img.shields.io/discord/478848557089030144.svg)](https://discord.gg/N9CPKaY)


## info

This repository is hosted on [GitLab as stomp-client-nodejs](https://gitlab.com/openrail/uk/stomp-client-nodejs). There is no downstream GitHub repository currently. Please raise any issues or pull requests on the GitLab repository.

## usage

To use the stomp-client-nodejs package you first need to add it as a dependency to your project by running:

```shell
yarn add @openrailuk/stomp-client --save
```

Once added and installed to your project you can import the client model by using:

```javascript
import { StompClient } from '@openrailuk/stomp-client';
```

To begin receiving live Darwin data you need to initialise the client and subscribe to a queue. The queue name can be found on the [National Rail Data Portal](https://datafeeds.nationalrail.co.uk/) on the [My Feeds](https://datafeeds.nationalrail.co.uk/#/filter) page under the `Real Time Feed Information` section.

This is an example on how to initialise and subscribe to a queue:

```javascript
import { StompClient } from '@openrailuk/stomp-client';

const client = new StompClient();

client.initialise()
  .then(() => {
    client.on('error', (err) => {
      console.error(err);
    });

    client.on('message', (data) => {
      console.log(data);
    });

    return client.subscribe(QUEUE_NAME);
  })
  .then(() => {
    console.log('subscribed');
  })
  .catch((err) => {
    
  });
```

## documentation 

You might be wondering where to find information about how to use this package, fear not all documentation for open rail packages can be found on the doc site and documentation specific to this package can be found under [@openrailuk/stomp-client](https://openrail.gitlab.io/docs/uk/stompclient)
npm package: @openral/core
Description: Javascript and Typescript package that contains the core functionality to work with the openRAL.
Author: Permarobotics GmbH
Latest version: 0.0.3

# openRAL Core package

Javascript and Typescript package that contains the core functionality to work with the openRAL.

For more informations about the openRAL please visit the [openRAL website](https://open-ral.io).

## Installation

```bash
npm install @openral/core
```

## Notes about the architecture

### Why do you use classes instead of interfaces for the models?

The syntax for defining models with interfaces is lightweight, but it has some drawbacks. 
Instead of using interfaces, we use TypeScript classes to define our models. This is because our models not only represent data structures but may also contain some methods that work with the data.

Using classes allows us to validate the input data in the constructor beyond the type system. 
This validation can be done during runtime in the transpiled JavaScript code as well, which is crucial for parsing JSON data securly.
npm package: @openrc/react-native-mqtt
Description: A library for the MQTT protocol
Latest version: 3.0.8

[English](README.md)&nbsp;&nbsp;&nbsp;&nbsp;

这是一个支持 react-native 的极简 mqtt 协议库, , 与[MQTT](github.com/mqttjs/MQTT.js)保持同步, 支持[Emq](https://github.com/emqx/emqx)和[mosquitto](https://github.com/eclipse/mosquitto)

## 安装

```bash
npm i --save @openrc/react-native-mqtt
yarn add @openrc/react-native-mqtt
```

## 用法（websocket）

```js
import MQTT from '@openrc/react-native-mqtt';

const client = MQTT.connect('ws://car.openrc.top/mqtt', {
  port: 8083,
  protocol: 'ws',
  username: 'your username',
  password: 'your password',
  reconnectPeriod: 30 * 1000,
  qos: 2,
});

client.on('closed', function () {
  console.log('mqtt event closed');
});

client.on('error', function (msg) {
  console.log('mqtt event error', msg);
});

client.on('connect', function () {
  console.log('connected mqtt');
});

export default client;
```

<a name="api"></a>

## API

- <a href="#connect"><code>mqtt.<b>connect()</b></code></a>
- <a href="#client"><code>mqtt.<b>Client()</b></code></a>
- <a href="#publish"><code>mqtt.Client#<b>publish()</b></code></a>
- <a href="#subscribe"><code>mqtt.Client#<b>subscribe()</b></code></a>
- <a href="#unsubscribe"><code>mqtt.Client#<b>unsubscribe()</b></code></a>
- <a href="#end"><code>mqtt.Client#<b>end()</b></code></a>
- <a href="#removeOutgoingMessage"><code>mqtt.Client#<b>removeOutgoingMessage()</b></code></a>
- <a href="#reconnect"><code>mqtt.Client#<b>reconnect()</b></code></a>
- <a href="#handleMessage"><code>mqtt.Client#<b>handleMessage()</b></code></a>
- <a href="#connected"><code>mqtt.Client#<b>connected</b></code></a>
- <a href="#reconnecting"><code>mqtt.Client#<b>reconnecting</b></code></a>
- <a href="#getLastMessageId"><code>mqtt.Client#<b>getLastMessageId()</b></code></a>
- <a href="#store"><code>mqtt.<b>Store()</b></code></a>
- <a href="#put"><code>mqtt.Store#<b>put()</b></code></a>
- <a href="#del"><code>mqtt.Store#<b>del()</b></code></a>
- <a href="#createStream"><code>mqtt.Store#<b>createStream()</b></code></a>
- <a href="#close"><code>mqtt.Store#<b>close()</b></code></a>

[了解更多](README.more.md)

## License

MIT
npm package: @openrealm/hub-node
Description: A lightweight, fast Typescript interface for Openrealm Hubs. Designed to work with [Hub](https://github.com/openrealmxyz/hub/) and any other Hub that implements the [Openrealm protocol](https://github.com/openrealmxyz/protocol).
Latest version: 0.10.18

# @openrealm/hub-nodejs

A lightweight, fast Typescript interface for Openrealm Hubs. Designed to work with [Hub](https://github.com/openrealmxyz/hub/) and any other Hub that implements the [Openrealm protocol](https://github.com/openrealmxyz/protocol).

## Features

- Call any Hub endpoint from a NodeJS environment.
- Serializes and deserializes Openrealm protobufs into Javascript objects.
- Has helpers to create and sign Openrealm messages.
- Written entirely in TypeScript, with strict types for safety.

## Installation

Install @openrealm/hub-nodejs with the package manager of your choice

```bash
npm install @openrealm/hub-nodejs
yarn add @openrealm/hub-nodejs
pnpm install @openrealm/hub-nodejs
```

## Quickstart

### Fetching Data from Hubs

```typescript
import { getSSLHubRpcClient } from '@openrealm/hub-nodejs';

client.$.waitForReady(Date.now() + 5000, async (e) => {
  if (e) {
    console.error(`Failed to connect to ${hubRpcEndpoint}:`, e);
    process.exit(1);
  } else {
    console.log(`Connected to ${hubRpcEndpoint}`);
    const castsResult = await client.getCastsByQid({ qid: 8928 });
    castsResult.map((casts) => casts.messages.map((cast) => console.log(cast.data?.castAddBody?.text)));
    client.close();
  }
});
```

## License

MIT License
npm package: @openrealm/rocksdb
Description: A low-level Node.js RocksDB binding
Latest version: 5.5.0

# rocksdb

This fork's sole purpose is to add prebuilds for Linux ARM to reduce install time on ARM-based systems.

Add to your project using:

```bash
yarn add @openrealm/rocksdb
```

```typescript
import AbstractRocksDB from '@openrealm/rocksdb';
```

### Git Submodules

This project uses Git Submodules. This means that you should clone it recursively if you're planning on working on it:

```bash
$ git clone --recurse-submodules https://github.com/Level/rocksdb.git
```

Alternatively, you can initialize submodules after cloning:

```bash
$ git submodule update --progress --init --recursive
```

### Publishing

1. Increment the version: `npm version ..`
2. Push to GitHub: `git push --follow-tags`
3. Wait for CI to complete
4. Download prebuilds into `./prebuilds`: `npm run download-prebuilds`
5. Optionally verify loading a prebuild: `npm run test-prebuild`
6. Optionally verify which files npm will include: `canadian-pub`
7. Finally: `npm publish`

## License

[MIT](LICENSE)

_`rocksdb` builds on the excellent work of the LevelDB and Snappy teams from Google and additional contributors to the LevelDB fork by Facebook. LevelDB and Snappy are both issued under the [New BSD License](http://opensource.org/licenses/BSD-3-Clause). A large portion of `rocksdb` Windows support comes from the [Windows LevelDB port](http://code.google.com/r/kkowalczyk-leveldb/) (archived) by [Krzysztof Kowalczyk](http://blog.kowalczyk.info/) ([`@kjk`](https://twitter.com/kjk)). If you're using `rocksdb` on Windows, you should give him your thanks!_
npm package: @openrealms/cli
Description: OpenRealms command-line tools for setting up and compiling JavaScript Minecraft plugins.
Author: HyperDondon
Latest version: 2.1.2

# @openrealms/cli

OpenRealms command-line tools for setting up and compiling JavaScript Minecraft plugins.

### Installation

Install the CLI on your computer:

```sh
npm install -g @openrealms/cli
```

Then, you can use the OpenRealms CLI using the `crx` command in your terminal.

### Start a project

```sh
mkdir my-plugin
cd my-plugin
crx init
```

That's it! You now have a plugin project ready to develop!

### Build a JAR file

Compile your plugin project to a JAR file:

If you used `crx init` above to create your project, you can compile a JAR file using:

```sh
npm run build:jar
```

If you used a different method to create your project, use this instead:

```sh
crx build -o ./dist/my-plugin.jar
```
npm package: @openrealms/core
Description: Core library for the OpenRealms runtime
Author: HyperDondon
Latest version: 2.0.2

# @openrealms/core

<img src="https://github.com/projopenrealms/brand/blob/master/icon-solid/icon-solid.png" width="200" alt="OpenRealms Logo" />

This repo contains the core library for OpenRealms, the JavaScript runtime for Minecraft server plugins.

### Installation

```sh
npm install --save @openrealms/core
```

### Example #1 - Events

```ts
import { ServerEvents } from '@openrealms/core';

// Send a welcome message when a player joins the server
ServerEvents.register(org.bukkit.event.player.PlayerJoinEvent, (event) => {
	const player = event.getPlayer();
	event.setJoinMessage(`${player.getName()} joined the server!`);
});
```

### Example #2 - Commands

```ts
import { ServerCommands } from '@openrealms/core';

// Strike lightning where the player is looking
ServerCommands.register('/strike', (player) => {
	const block = player.getTargetBlockExact(100);
	if (!block) return;
	const location = block.getLocation();
	location.getWorld()?.strikeLightning(location);
});
```

## How it works

By default, without this library, the OpenRealms JavaScript runtime has access to all of the Java and Bukkit classes and functions.

This library serves several important purposes:

-   Provides TypeScript type declarations for the native Java / Bukkit types.
-   Implements a clean abstraction layer to make certain common tasks easier (such as commands, events, etc.)
-   Adds polyfills to support modern ES6+ features.

## Contributing

We need your help to implement new features, fix bugs, and optimize the entire system. If you want to help, please join our [Discord](https://discord.gg/bsTearKQsm) and/or check out the [Issues tab](https://github.com/openrealms/core/issues).
npm package: @openreasoning/fol-types
Description: Types of First-Order Logic formula
Author: Matthew Peveler
Latest version: 0.0.2

fol-types
=========

[![Build Status](https://travis-ci.com/OpenReasoning/fol-types-js.svg?branch=master)](https://travis-ci.com/OpenReasoning/fol-types-js)
![NPM Version](https://img.shields.io/npm/v/@openreasoning/fol-types.svg)
npm package: @openreasoning/parser
Description: Parser for various forms of logical statements
Author: Matthew Peveler
Latest version: 0.1.0

parser.js
=========

[![Build Status](https://travis-ci.com/OpenReasoning/parser.js.svg?branch=master)](https://travis-ci.com/OpenReasoning/parser.js)
[![Coverage Status](https://coveralls.io/repos/github/OpenReasoning/parser.js/badge.svg?branch=master)](https://coveralls.io/github/OpenReasoning/parser.js?branch=master)

A parser to be used in logic programs.

This parses formulas within three styles (prefix, infix, and functional) returning
a tree structure of the captured elements.

Installation
------------
```bash
npm install @openreasoning/parser
```

Usage
-----
```typescript
import {prefixParser, infixParser, functionalParser, Node} from '@openreasoning/parser'

let parsed = prefixParser('(and a b)');
let parsed2 = infixParser('(a and b)');
let parsed3 = functionalParser('and(a, b)');

function isEqual(a: Node, b: Node): bool {
    if (a.value !== b.value || a.children.length !== b.children.length) {
        return false;
    }
    for (let i = 0; i < a.children.length; i++) {
        if (!isEqual(a.children[i], b.children[i])) {
            return false;
        }
    }
    return true;
}

console.log(isEqual(parsed, parsed2)); // true
console.log(isEqual(parsed2, parsed3)); // true
```

License
-------

This is uses the [MIT License](./LICENSE.md)
npm package: @openreasoning/predicate-types
Description: Types of Predicate Logic
Author: Matthew Peveler
Latest version: 0.2.0

# predicate-types.js

[![Test](https://github.com/OpenReasoning/predicate-types.js/workflows/Test/badge.svg?branch=master&event=push)](https://github.com/OpenReasoning/predicate-types.js/actions?query=workflow%3ATest+event%3Apush+branch%3Amaster)
[![codecov](https://codecov.io/gh/OpenReasoning/predicate-types.js/branch/master/graph/badge.svg)](https://codecov.io/gh/OpenReasoning/predicate-types.js)
[![NPM Version](https://img.shields.io/npm/v/@openreasoning/predicate-types.svg)](https://npmjs.com/package/@openreasoning/predicate-types)

## Install

```bash
npm install @openreasoning/predicate-types
```

## Usage

```js
// cjs
const getTypes = require('@openreasoning/predicate-types');

// esm
import getTypes from '@openReasoning/predicate-types';

const node;

// fill in value of node of structure:
/*
{
    "value": string,
    "children": Node[]
}
*/
const type = getTypes(node);
```
npm package: @openreceipt/cli
Description: CLI package for OpenReceipt
Author: OpenReceipt
Latest version: 0.3.0

# @openreceipt/cli

[![NPM Version][icon-npm]][link-npm]
[![Jest][icon-jest]][link-jest]
[![Prettier][icon-prettier]][link-prettier]

CLI package for OpenReceipt

[icon-npm]: https://img.shields.io/npm/v/@openreceipt/cli.svg?longCache=true&style=flat-square
[link-npm]: https://www.npmjs.com/package/@openreceipt/cli

[icon-jest]: https://img.shields.io/badge/tested_with-jest-99424f.svg?longCache=true&style=flat-square
[link-jest]: https://jestjs.io/

[icon-prettier]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?longCache=true&style=flat-square
[link-prettier]: https://prettier.io/
npm package: @openreceipt/core
Description: Core engine for OpenReceipt
Author: OpenReceipt
Latest version: 0.3.0

# @openreceipt/core

[![NPM Version][icon-npm]][link-npm]
[![Jest][icon-jest]][link-jest]
[![Prettier][icon-prettier]][link-prettier]

Core engine for OpenReceipt

[icon-npm]: https://img.shields.io/npm/v/@openreceipt/core.svg?longCache=true&style=flat-square
[link-npm]: https://www.npmjs.com/package/@openreceipt/core

[icon-jest]: https://img.shields.io/badge/tested_with-jest-99424f.svg?longCache=true&style=flat-square
[link-jest]: https://jestjs.io/

[icon-prettier]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?longCache=true&style=flat-square
[link-prettier]: https://prettier.io/
npm package: @openreceipt/countries
Description: World countries library for OpenReceipt
Author: OpenReceipt
Latest version: 0.3.0

# @openreceipt/countries

[![NPM Version][icon-npm]][link-npm]
[![Jest][icon-jest]][link-jest]
[![Prettier][icon-prettier]][link-prettier]

World countries library for OpenReceipt

[icon-npm]: https://img.shields.io/npm/v/@openreceipt/countries.svg?longCache=true&style=flat-square
[link-npm]: https://www.npmjs.com/package/@openreceipt/countries

[icon-jest]: https://img.shields.io/badge/tested_with-jest-99424f.svg?longCache=true&style=flat-square
[link-jest]: https://jestjs.io/

[icon-prettier]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?longCache=true&style=flat-square
[link-prettier]: https://prettier.io/
npm package: @openreceipt/currency
Description: Currency library for OpenReceipt
Author: OpenReceipt
Latest version: 0.3.0

# @openreceipt/currency

[![NPM Version][icon-npm]][link-npm]
[![Jest][icon-jest]][link-jest]
[![Prettier][icon-prettier]][link-prettier]

Currency library for OpenReceipt

[icon-npm]: https://img.shields.io/npm/v/@openreceipt/currency.svg?longCache=true&style=flat-square
[link-npm]: https://www.npmjs.com/package/@openreceipt/currency

[icon-jest]: https://img.shields.io/badge/tested_with-jest-99424f.svg?longCache=true&style=flat-square
[link-jest]: https://jestjs.io/

[icon-prettier]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?longCache=true&style=flat-square
[link-prettier]: https://prettier.io/
npm package: @openreceipt/dom
Description: DOM parser for OpenReceipt
Author: OpenReceipt
Latest version: 0.3.0

# @openreceipt/dom

[![NPM Version][icon-npm]][link-npm]
[![Jest][icon-jest]][link-jest]
[![Prettier][icon-prettier]][link-prettier]

DOM parser for OpenReceipt

[icon-npm]: https://img.shields.io/npm/v/@openreceipt/dom.svg?longCache=true&style=flat-square
[link-npm]: https://www.npmjs.com/package/@openreceipt/dom

[icon-jest]: https://img.shields.io/badge/tested_with-jest-99424f.svg?longCache=true&style=flat-square
[link-jest]: https://jestjs.io/

[icon-prettier]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?longCache=true&style=flat-square
[link-prettier]: https://prettier.io/
npm package: @openreceipt/events
Description: Events system for OpenReceipt
Author: OpenReceipt
Latest version: 0.3.0

# @openreceipt/events

[![NPM Version][icon-npm]][link-npm]
[![Jest][icon-jest]][link-jest]
[![Prettier][icon-prettier]][link-prettier]

Events system for OpenReceipt

[icon-npm]: https://img.shields.io/npm/v/@openreceipt/events.svg?longCache=true&style=flat-square
[link-npm]: https://www.npmjs.com/package/@openreceipt/events

[icon-jest]: https://img.shields.io/badge/tested_with-jest-99424f.svg?longCache=true&style=flat-square
[link-jest]: https://jestjs.io/

[icon-prettier]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?longCache=true&style=flat-square
[link-prettier]: https://prettier.io/
npm package: @openreceipt/mail
Description: Mail parser for OpenReceipt
Author: OpenReceipt
Latest version: 0.3.0

# @openreceipt/mail

[![NPM Version][icon-npm]][link-npm]
[![Jest][icon-jest]][link-jest]
[![Prettier][icon-prettier]][link-prettier]

Mail parser for OpenReceipt

[icon-npm]: https://img.shields.io/npm/v/@openreceipt/mail.svg?longCache=true&style=flat-square
[link-npm]: https://www.npmjs.com/package/@openreceipt/mail

[icon-jest]: https://img.shields.io/badge/tested_with-jest-99424f.svg?longCache=true&style=flat-square
[link-jest]: https://jestjs.io/

[icon-prettier]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?longCache=true&style=flat-square
[link-prettier]: https://prettier.io/
npm package: @openreceipt/plugin-best-buy-usa
Description: Best Buy USA plugin for OpenReceipt
Author: OpenReceipt
Latest version: 0.3.0

# @openreceipt/plugin-best-buy-usa

[![NPM Version][icon-npm]][link-npm]
[![Jest][icon-jest]][link-jest]
[![Prettier][icon-prettier]][link-prettier]

Best Buy USA plugin for OpenReceipt

[icon-npm]: https://img.shields.io/npm/v/@openreceipt/plugin-best-buy-usa.svg?longCache=true&style=flat-square
[link-npm]: https://www.npmjs.com/package/@openreceipt/plugin-best-buy-usa

[icon-jest]: https://img.shields.io/badge/tested_with-jest-99424f.svg?longCache=true&style=flat-square
[link-jest]: https://jestjs.io/

[icon-prettier]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?longCache=true&style=flat-square
[link-prettier]: https://prettier.io/
npm package: @openreceipt/plugin-console
Description: Console plugin for OpenReceipt
Author: OpenReceipt
Latest version: 0.3.0

# @openreceipt/plugin-console

[![NPM Version][icon-npm]][link-npm]
[![Jest][icon-jest]][link-jest]
[![Prettier][icon-prettier]][link-prettier]

Console plugin for OpenReceipt

[icon-npm]: https://img.shields.io/npm/v/@openreceipt/plugin-console.svg?longCache=true&style=flat-square
[link-npm]: https://www.npmjs.com/package/@openreceipt/plugin-console

[icon-jest]: https://img.shields.io/badge/tested_with-jest-99424f.svg?longCache=true&style=flat-square
[link-jest]: https://jestjs.io/

[icon-prettier]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?longCache=true&style=flat-square
[link-prettier]: https://prettier.io/
npm package: @openreceipt/plugin-just-eat-uk
Description: Just Eat UK plugin for OpenReceipt
Author: OpenReceipt
Latest version: 0.3.1

# @openreceipt/plugin-just-eat-uk

[![NPM Version][icon-npm]][link-npm]
[![Jest][icon-jest]][link-jest]
[![Prettier][icon-prettier]][link-prettier]

Just Eat UK plugin for OpenReceipt

[icon-npm]: https://img.shields.io/npm/v/@openreceipt/plugin-just-eat-uk.svg?longCache=true&style=flat-square
[link-npm]: https://www.npmjs.com/package/@openreceipt/plugin-just-eat-uk

[icon-jest]: https://img.shields.io/badge/tested_with-jest-99424f.svg?longCache=true&style=flat-square
[link-jest]: https://jestjs.io/

[icon-prettier]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?longCache=true&style=flat-square
[link-prettier]: https://prettier.io/
npm package: @openreceipt/plugin-mail
Description: Mail plugin for OpenReceipt
Author: OpenReceipt
Latest version: 0.3.0

# @openreceipt/plugin-mail

[![NPM Version][icon-npm]][link-npm]
[![Jest][icon-jest]][link-jest]
[![Prettier][icon-prettier]][link-prettier]

Mail plugin for OpenReceipt

[icon-npm]: https://img.shields.io/npm/v/@openreceipt/plugin-mail.svg?longCache=true&style=flat-square
[link-npm]: https://www.npmjs.com/package/@openreceipt/plugin-mail

[icon-jest]: https://img.shields.io/badge/tested_with-jest-99424f.svg?longCache=true&style=flat-square
[link-jest]: https://jestjs.io/

[icon-prettier]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?longCache=true&style=flat-square
[link-prettier]: https://prettier.io/
npm package: @openreceipt/plugin-steam
Description: Steam plugin for OpenReceipt
Author: OpenReceipt
Latest version: 0.3.0

# @openreceipt/plugin-steam

[![NPM Version][icon-npm]][link-npm]
[![Jest][icon-jest]][link-jest]
[![Prettier][icon-prettier]][link-prettier]

Steam plugin for OpenReceipt

[icon-npm]: https://img.shields.io/npm/v/@openreceipt/plugin-steam.svg?longCache=true&style=flat-square
[link-npm]: https://www.npmjs.com/package/@openreceipt/plugin-steam

[icon-jest]: https://img.shields.io/badge/tested_with-jest-99424f.svg?longCache=true&style=flat-square
[link-jest]: https://jestjs.io/

[icon-prettier]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?longCache=true&style=flat-square
[link-prettier]: https://prettier.io/
npm package: @openreceipt/plugin-ubereats-uk
Description: UberEats UK plugin for OpenReceipt
Author: OpenReceipt
Latest version: 0.3.0

# @openreceipt/plugin-ubereats-uk

[![NPM Version][icon-npm]][link-npm]
[![Jest][icon-jest]][link-jest]
[![Prettier][icon-prettier]][link-prettier]

UberEats UK plugin for OpenReceipt

[icon-npm]: https://img.shields.io/npm/v/@openreceipt/plugin-ubereats-uk.svg?longCache=true&style=flat-square
[link-npm]: https://www.npmjs.com/package/@openreceipt/plugin-ubereats-uk

[icon-jest]: https://img.shields.io/badge/tested_with-jest-99424f.svg?longCache=true&style=flat-square
[link-jest]: https://jestjs.io/

[icon-prettier]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?longCache=true&style=flat-square
[link-prettier]: https://prettier.io/
npm package: @openreceipt/plugin-vapeclub-uk
Description: VapeClub UK plugin for OpenReceipt
Author: OpenReceipt
Latest version: 0.3.0

# @openreceipt/plugin-vapeclub-uk

[![NPM Version][icon-npm]][link-npm]
[![Jest][icon-jest]][link-jest]
[![Prettier][icon-prettier]][link-prettier]

VapeClub UK plugin for OpenReceipt

[icon-npm]: https://img.shields.io/npm/v/@openreceipt/plugin-vapeclub-uk.svg?longCache=true&style=flat-square
[link-npm]: https://www.npmjs.com/package/@openreceipt/plugin-vapeclub-uk

[icon-jest]: https://img.shields.io/badge/tested_with-jest-99424f.svg?longCache=true&style=flat-square
[link-jest]: https://jestjs.io/

[icon-prettier]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?longCache=true&style=flat-square
[link-prettier]: https://prettier.io/
npm package: @openreceipt/plugin-zooplus-uk
Description: Zooplus UK plugin for OpenReceipt
Author: OpenReceipt
Latest version: 0.3.0

# @openreceipt/plugin-zooplus-uk

[![NPM Version][icon-npm]][link-npm]
[![Jest][icon-jest]][link-jest]
[![Prettier][icon-prettier]][link-prettier]

Zooplus UK plugin for OpenReceipt

[icon-npm]: https://img.shields.io/npm/v/@openreceipt/plugin-zooplus-uk.svg?longCache=true&style=flat-square
[link-npm]: https://www.npmjs.com/package/@openreceipt/plugin-zooplus-uk

[icon-jest]: https://img.shields.io/badge/tested_with-jest-99424f.svg?longCache=true&style=flat-square
[link-jest]: https://jestjs.io/

[icon-prettier]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?longCache=true&style=flat-square
[link-prettier]: https://prettier.io/
npm package: @openregion/eslint-config
Description: ESLint shared config
Author: Alexander Kupriyanov
Latest version: 1.0.0

# ESLint shared config
Open Region ESLint shared config

## Usage
Install package

```shell
npm install --save-dev @openregion/eslint-config
```

Create `.eslintrc` file with this content

```json
{
  "extends": [
    "@openregion"
  ]
}
```
npm package: @openregion/prettier-config
Description: Prettier shared config
Author: Alexander Kupriyanov
Latest version: 1.0.1

# Prettier shared config
Open Region Prettier shared config

## Usage
Install package

```shell
npm install --save-dev @openregion/prettier-config
```

Create `.prettierrc.mjs` file with this content

```javascript
import openRegionPrettierConfig from '@openregion/prettier-config';

export default {
  ...openRegionPrettierConfig,
};
```

### ESLint
To use this package with ESLint, install

```shell
npm install --save-dev eslint-config-prettier
```

Extend ESLint config (`.eslintrc`) with `prettier`. Example:

```json
{
  "extends": [
    "@openregion",
    "prettier"
  ]
}
```

This will turn off all rules that are unnecessary or might conflict with Prettier.
npm package: @openregion/stylelint-config
Description: Stylelint shared config
Author: Alexander Kupriyanov
Latest version: 1.0.0

# Stylelint shared config
Open Region Stylelint shared config

## Usage
Install package

```shell
npm install --save-dev @openregion/stylelint-config
```

Create `.stylelintrc.json` file with this content

```json
{
  "extends": [
    "@openregion/stylelint-config"
  ]
}
```
npm package: @openregion/stylelint-config-prettier
Description: Stylelint Prettier shared config
Author: Alexander Kupriyanov
Latest version: 1.0.0

# Stylelint shared config to use with Prettier
Open Region Stylelint shared config with turned off rules that are unnecessary or might conflict with Prettier.

## Usage
Install package

```shell
npm install --save-dev @openregion/stylelint-config-prettier
```

Create `.stylelintrc.json` file with this content

```json
{
  "extends": ["@openregion/stylelint-config-prettier"]
}
```

> [!IMPORTANT]
> This config already includes `@openregion/stylelint-config`.
npm package: @openrelayai/connector
Description: OpenRelay connector CLI — bridge your local services to the cloud via the OpenRelay relay.
Latest version: 1.1.2

# openrelayai

CLI tool to connect your local services to the cloud via [OpenRelay](https://openrelay.lovable.app).

## Quick Start

```bash
# Connect directly with your API key (recommended)
npx @openrelayai/connector --api-key YOUR_API_KEY

# Or pair using a code from the OpenRelay dashboard
npx @openrelayai/connector --code ABC12345

# Specify a custom local port
npx @openrelayai/connector --api-key YOUR_API_KEY --port 8080

# Start with saved config
npx @openrelayai/connector --start

# Check status
npx @openrelayai/connector --status
```

## How It Works

1. **Get your API key** from the [OpenRelay dashboard](https://openrelay.lovable.app) (or generate a pairing code)
2. **Run the connector** with `npx @openrelayai/connector --api-key <KEY>` (or `--code <CODE>`)
3. The connector validates your key, connects to the relay, and forwards incoming requests to your local service
4. Your local service is now accessible from the cloud ✨

## Options

| Flag | Short | Description | Default |
|------|-------|-------------|---------|
| `--api-key` | `-k` | API key from dashboard (no expiration) | — |
| `--code` | `-c` | Pairing code from dashboard (expires in 10 min) | — |
| `--port` | `-p` | Local port to forward to | `18789` |
| `--host` | | Local host to forward to | `127.0.0.1` |
| `--start` | | Start with saved config | — |
| `--status` | | Show current config | — |
| `--api-url` | | Custom API endpoint | production |

## Configuration

Config is saved to `~/.openrelayai/config.json` after connecting. You can edit this file directly or reconnect with a new key.

## License

MIT
npm package: @openrent/react-timeline
Description: A react management timeline component.
Author: OpenRent
Latest version: 0.0.2
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# React Timeline
A react component of a timeline to manage resources easily.

Inspired by [react-calendar-timeline](https://github.com/namespace-ee/react-calendar-timeline)
npm package: @openreplay/network-proxy
Description: this library helps us to create proxy objects for fetch, XHR and beacons for proper request tracking.
Author: Nikita
Latest version: 1.2.2

this tiny library helps us (OpenReplay folks) to create proxy objects for fetch,
XHR and beacons for proper request tracking in @openreplay/tracker and Spot extension.

example usage:
```
import createNetworkProxy from '@openreplay/network-proxy';

const context = this;
const ignoreHeaders = ['Authorization'];
const tokenUrlMatcher = /\/auth\/token/;
function setSessionTokenHeader(setRequestHeader: (name: string, value: string) => void) {
  const header = 'X-Session-Token
  const sessionToken = getToken() // for exmaple, => `session #123123`;
  if (sessionToken) {
    setRequestHeader(header, sessionToken)
  }
}
function sanitize(reqResInfo) {
  if (reqResInfo.request) {
    delete reqResInfo.request.body
  }
  return reqResInfo
}

const onMsg = (networkReq) => console.log(networkReq)
const isIgnoredUrl = (url) => url.includes('google.com')

// Gets current tracker request’s url and returns boolean. If present,
// sessionTokenHeader will only be applied when this function returns true.
// Default: undefined
const tokenUrlMatcher = (url) => url.includes('google.com');

// this will observe global network requests
createNetworkProxy(
  context,
  options.ignoreHeaders,
  setSessionTokenHeader,
  sanitize,
  (message) => app.send(message),
  (url) => app.isServiceURL(url),
  options.tokenUrlMatcher,
)

// to stop it, you can save this.fetch/other apis before appliying the proxy
// and then restore them
```
npm package: @openreplay/react-native
Description: Openreplay React-native connector for iOS applications
Author: nick-delirium
Latest version: 0.7.0

# @openreplay/react-native

Openreplay React-native connector for mobile applications.

## Installation

```sh
npm install @openreplay/react-native
```

Please see [the documentation](https://docs.openreplay.com/en/rn-sdk/) for more information about usage.

### React Native and GraphQL

You can use [@openreplay/tracker-graphql](https://www.npmjs.com/package/@openreplay/tracker-graphql) to handle graphql events in react-native applications as well, via

```js
import { createRelayMiddleware } from '@openreplay/tracker-graphql';

const appWrapper = {
  active: () => true,
  send: (gqlMsg) => {
    const type = 'gql';
    const msg = JSON.stringify({
      operationKind: gqlMsg[1],
      operationName: gqlMsg[2],
      variables: gqlMsg[3],
      response: gqlMsg[4],
      duration: gqlMsg[5],
    });
    Openreplay.sendCustomMessage(type, msg);
  },
};

// @ts-ignore - emulating web tracker here for middleware
const middleware = createRelayMiddleware(appWrapper);

// .. connect to relay network layer
```
npm package: @openreplay/sourcemap-uploader
Description: NPM module to upload your JS sourcemaps files to OpenReplay
Author: Alex Tsokurov
Latest version: 3.0.13

# sourcemap-uploader

An NPM module to upload your JS sourcemap files to your OpenReplay instance.

## Installation

```
npm i -D @openreplay/sourcemap-uploader
```

## CLI

### Upload a sourcemap for one file:

```
sourcemap-uploader -s https://opnereplay.mycompany.com/api -k API_KEY -p PROJECT_KEY file -m ./dist/index.js.map -u https://myapp.com/index.js
```

### Upload all sourcemaps in a given directory. 
The URL must correspond to the root where you upload JS files from the directory. In other words, if you have your `app-42.js` along with  the `app-42.js.map` in the `./build` folder and then want to upload it to your OpenReplay instance so it can be reachable through the link `https://myapp.com/static/app-42.js`, then the command should be like:

```
sourcemap-uploader -s https://opnereplay.mycompany.com/api -k API_KEY -p PROJECT_KEY dir -m ./build -u https://myapp.com/static
```

- Use `-s` (`--server`) to specify the URL of your OpenReplay instance (append it with /api).
**Do not use this parameter if you use SaaS version of the OpenRplay**

- Use `-v` (`--verbose`) to see the logs.

## NPM

There are two functions you can export from the package:

```
uploadFile(api_key, project_key, sourcemap_file_path, js_file_url, [server])
uploadDir(api_key, project_key, sourcemap_dir_path, js_dir_url, [server])
```

Both functions return Promise with a result value to be the list of files for which sourcemaps were uploaded.

## Dev

```
npm install
bash run-dev.sh
```
npm package: @openreplay/tracker
Description: The OpenReplay tracker main package
Author: Alex Tsokurov
Latest version: 17.2.6

# OpenReplay Tracker

The main package of the [OpenReplay](https://openreplay.com/) tracker.

## Development & Contribution

Please use [bun](https://bun.sh/) to install and build this library. Any submitted pull request must pass **all tests** and should have positive test coverage diff %.

## Documentation

For launch options and available public methods, [refer to the documentation](https://docs.openreplay.com/en/sdk/methods)

## Installation

```bash
npm i @openreplay/tracker
```

## Usage

Initialize the package from your codebase entry point and start the tracker. You must set the `projectKey` option in the constructor. Its value can can be found in your OpenReplay dashboard under [Preferences -> Projects](https://app.openreplay.com/client/projects).

```js
import Tracker from '@openreplay/tracker'

const tracker = new Tracker({
  projectKey: YOUR_PROJECT_KEY,
})
tracker
  .start({
    userID: 'Mr.Smith',
    metadata: {
      version: '3.5.0',
      balance: '10M',
      role: 'admin',
    },
  })
  .then((startedSession) => {
    if (startedSession.success) {
      console.log(startedSession)
    }
  })
```

Then you can use OpenReplay JavaScript API anywhere in your code.

```js
tracker.setUserID('my_user_id')
tracker.setMetadata('env', 'prod')
```
npm package: @openreplay/tracker-mobx
Description: Tracker plugin for MobX events recording
Author: Alex Tsokurov
Latest version: 4.0.2

# OpenReplay Tracker MobX plugin
A MobX plugin for OpenReplay Tracker. 
This plugin allows you to see the MobX events during session replay.

## Installation
```bash
npm i @openreplay/tracker-mobx
```

## Usage
Initialize the `@openreplay/tracker` package as usual and load the plugin into it.
Then put is as a second argument to `observe` function from `mobx` package.

```js
import Tracker from '@openreplay/tracker';
import trackerMobX from '@openreplay/tracker-mobx';
import { observe } from 'mobx';

const tracker = new Tracker({
  projectKey: YOUR_PROJECT_KEY,
});

const mobxTrackerInstance = tracker.use(trackerMobX(options)); // look below for available options
observe(yourMobxStore, mobxTrackerInstance)
```

Options: 

```js
interface Options {
    predicate?: (observeEvent: { type: string; name: string; object: any; debugObjectName: string }) => boolean;
    sanitize?: (resultAction: { state: any; type: string; property: string }) => { state: any; type: string; property: string };
    update?: boolean;
    add?: boolean;
    delete?: boolean;
}

trackerMobX({
  predicate: () => true,
  sanitize: (event) => event
})
```

Where `predicate` can be used to dynamically turn off capturing and `sanitize` can be used to modify the payload before sending it to backend.
Most of the actions fall into `update` type, refer to mobx documentation for more details about add and delete (mostly for Maps)
npm package: @openreplay/tracker-ngrx
Description: Tracker plugin for NgRx state recording
Author: Alex Tsokurov
Latest version: 3.4.9

# OpenReplay Tracker NgRx plugin

A NgRx meta-reducer for OpenReplay Tracker. This plugin allows you to see the application state during session replay.

## Installation

```bash
npm i @openreplay/tracker-ngrx
```

## Usage

Initialize the `@openreplay/tracker` package as usual and load the plugin into it.
Then put the generated meta-reducer into your `imports`.
See [NgRx documentation](https://ngrx.io/guide/store/metareducers) for details.

```js
import { StoreModule } from '@ngrx/store';
import { reducers } from './reducers';
import Tracker from '@openreplay/tracker';
import trackerNgRx from '@openreplay/tracker-ngrx';

const tracker = new Tracker({
  projectKey: YOUR_PROJECT_KEY,
});

const metaReducers = [tracker.plugin(trackerNgRx())];

@NgModule({
  imports: [StoreModule.forRoot(reducers, { metaReducers })],
})
export class AppModule {}
```

You can customize the middleware behavior with options to sanitize your data.

```js
trackerNgRx({
  actionFilter: action => action.type !== 'DRAW', // only actions which pass this test will be recorded
  actionTransformer: action => action.type === 'LOGIN' ? null : action,
  actionType: action => action.type // action type for search, that's the default one
  stateTransformer: state => {
    const { jwt, ..._state } = state;
    return _state;
  },
})
```
npm package: @openreplay/tracker-profiler
Description: Tracker plugin for profiling JS function calls
Author: Alex Tsokurov
Latest version: 3.0.1

# OpenReplay Tracker profiler plugin

The profiler plugin allows you to measure function performance and
capture the arguments and result for each function call.

## Installation

```bash
npm i @openreplay/tracker-profiler
```

## Usage

Initialize the `@openreplay/tracker` package as usual and load the plugin into it.
Then decorate any function inside your code with the generated function.

```js
import Tracker from '@openreplay/tracker';
import trackerProfiler from '@openreplay/tracker-profiler';

const tracker = new Tracker({
  projectKey: YOUR_PROJECT_KEY,
});
tracker.start();

export const profiler = tracker.plugin(trackerProfiler());

const fn = profiler('call_name')(() => {
  // ...
}, thisArg); // thisArg is optional
```
npm package: @openreplay/tracker-redux
Description: Tracker plugin for Redux state recording
Author: Alex Tsokurov
Latest version: 4.0.1

# OpenReplay Tracker Redux plugin

A Redux middleware for OpenReplay Tracker. This middleware allows you to see the application state during session replay.

## Installation

```bash
npm i @openreplay/tracker-redux
```

## Usage

Initialize the `@openreplay/tracker` package as usual and load the plugin into it.
Then put the generated middleware into your Redux chain.

```js
import { applyMiddleware, createStore } from 'redux';
import Tracker from '@openreplay/tracker';
import trackerRedux from '@openreplay/tracker-redux';

const tracker = new Tracker({
  projectKey: YOUR_PROJECT_KEY,
});

const openReplayMiddleware = tracker.use(trackerRedux());

const store = createStore(
  reducer,
  applyMiddleware(openReplayMiddleware),
);
```

You can customize the middleware behavior with options to sanitize your data.

```js
trackerRedux({
  actionFilter: action => action.type !== 'DRAW', // only actions which pass this test will be recorded
  actionTransformer: action => action.type === 'LOGIN' ? null : action,
  actionType: action => action.type // action type for search, that's the default one
  stateTransformer: state => {
    const { jwt, ..._state } = state;
    return _state;
  },
})
```