open-index/open-npm huggingface dataset:
npm package: @signageos/lib
Description: This repository contains all sets of generic TypeScript tools and utils for different technologies, like databases: 'MongoDB', monitoring in Prometheus, wrappers and helpers for Azure SDK, Browser Storage, time management, observables, async iterators and
Author: Michael Zabka
Latest version: 23.20.2

# General Library

This repository contains all sets of generic TypeScript tools and utils for different technologies, like databases: 'MongoDB',
monitoring in Prometheus, wrappers and helpers for Azure SDK, Browser Storage, time management,
observables, async iterators and a lot more.

It's published as an npm library @signageos/lib that can be used in any project that requires and is using those technologies to simplify
the business logic.

Contents of this library should eventually be migrated into more granular packages in this repo.

> :information_source: If you are not logged in, run
> `docker login https://registry.gitlab.com/ -u YOUR_USERNAME@signageos.io -p YOUR_PERSONAL_ACCESS_TOKEN`

1. `docker-compose up -d`
2.

```
cat >> config/env.test.json << EOF
{
  "amqp_dsn": "amqp://guest:guest@localhost:5672/",
  "redis_dsn": "redis://localhost:6379",
  "mongo_db_dsn": "mongodb://localhost:27017/test",
}
EOF
```

3. `npm test`

# Limitations
This repository shouldn't have any `@signageos` dependencies. Otherwise there will be problem with cyclic dependencies

<!-- TODO: Remove when replaced with secret manager -->
## Tests

Some integration tests require secrets which are specified in the `.env.test.yaml`. These values can be exported to
the `.env.docker-compose` with running script `bash tools/get-test-env-variables.sh`.

## CI/CD

Required secrets from test needs to be added to the gitlab CI/CD variables

## Tools

`get-test-env-variables.sh` - exports environment variables from helm to `.env.docker-compose`. Must be run with `bash`
npm package: @signageos/metrics
Description: This library provides the metrics functionalities. A wrapper around [Prometheus Client for Node.js](https://github.com/siimon/prom-client).
Author: signageOS
Latest version: 1.0.0

# signageOS Metrics Library

This library provides the metrics functionalities. A wrapper around [Prometheus Client for Node.js](https://github.com/siimon/prom-client).
npm package: @signageos/nec-pd-sdk
Description: Node.js library interface for communication via RS232 with NEC large-screen displays.
Author: signageOS Inc.
Latest version: 0.2.0

# NEC PD SDK

Node.js library interface for communication via RS232 with NEC large-screen displays.

This library is a Node.js port of [NEC PD Python SDK](https://github.com/NECDisplaySolutions/necpdsdk). At the moment it doesn't implement the entire protocol, only functions that we needed for our project. Contributions are welcome.

## Installation

```
npm install @signageos/nec-pd-sdk
```

## Examples

Some examples can be found in [examples directory](examples).

## Contributing

To set up your development environment:

1. clone this repository
1. `cd` to the main folder
1. run `npm install`
1. run `npm run build`
1. Before you commit anything, run `npm run lint` and make sure it passes without errors

## License

[MIT](LICENSE)
npm package: @signageos/nexmosphere-sdk
Description: This library implements Nexmosphere serial communication protocol and exposes it as a collection of easy to use classes.
Author: signageOS
Latest version: 0.2.1

# Nexmosphere JavaScript SDK

This library implements Nexmosphere serial communication protocol and exposes it as a collection of easy to use classes.

## Requirements

Nexmosphere products communicate via UART and send/receive ASCII messages.

All the classes in this library expect an implementation of ISerialPort interface
that implements the low level communication with the Nexmosphere hardware.

A good option to implement the low level communication is to use [serialport](https://www.npmjs.com/package/serialport) module,
but you can implement however you like.

## Addressing

Nexmosphere X-Talk interface allows you to communicate with many sensors or actuators via a single interface.
It defines an addresing scheme that allows to reference a specific sensor/actuator.

The address is always a 3-digit number, for example 003 or 102.

**This library assumes that addresses are numbers, not strings, so 003 becomes 3, 040 becomes 40, etc.**

## Example usage

All the examples below assume you wrote your own implementation of ISerialPort interface.
In the examples it's returned by a function `createSerialPort()`.

### Button

Nexmosphere buttons controller can handle up to 4 buttons, and they're all referenced with the same address.
The controller numbers the buttons, starting from 1, so first button is no. 1, second button is no. 2, etc.

**Here we instead expect an index, starting from 0**, so first button is 0, second button is 1, etc.

```javascript
const serialPort = createSerialPort();
const address = 3; // this is equivalent to address 003
const index = 0; // button no. 1
const button = new Button(serialPort, address, index);

const isPressed = await button.isPressed();
if (isPressed) {
    console.log('button is pressed');
} else {
    console.log('button is not pressed');
}

button.on('pressed', () => console.log('button was pressed'));
button.on('released', () => console.log('button was released'));
```

### RFID Antenna

```javascript
const serialPort = createSerialPort();
const address = 50; // this is equivalent to address 050
const rfidAntenna = new RfidAntenna(serialPort, address);

const placedTags = await rfidAntenna.getPlacedTags();
console.log('placed tags: ' + placedTags.join(', '));

rfidAntenna.on('picked', (tag) => console.log(`tag ${tag} was picked`));
rfidAntenna.on('placed', (tag) => console.log(`tag ${tag} was placed`));
```