open-index/open-npm huggingface dataset:
npm package: @signadot/signadot-sdk
Description: Signadot Node SDK
Latest version: 0.3.5

# Signadot Sandboxes Node SDK

## Installation

#### npm
```shell
npm install @signadot/signadot-sdk --save
```

#### yarn
```shell
yarn add @signadot/signadot-sdk
```

## Sample code
Sample code to create sandbox using the SDK:

```javascript
import { ApiClient, SandboxesApi } from '@signadot/signadot-sdk';

const apiClient = new ApiClient();
apiClient.authentications.ApiKeyAuth.apiKey = 'SIGNADOT_API_KEY_HERE';
sandboxesApi = new SandboxesApi(apiClient);

const request = {}; // populate the request data object
sandboxesApi.createNewSandbox("my-company", request)
  .then(response => {
    console.log(response);
  }).catch(e => {
    console.log("Error: " + e);
  });
```
npm package: @signadot/signadot-sdk-snapshot
Description: Signadot Node SDK
Latest version: 0.3.6-SNAPSHOT.1

# Signadot Sandboxes Node SDK

## Installation

#### npm
```shell
npm install @signadot/signadot-sdk --save
```

#### yarn
```shell
yarn add @signadot/signadot-sdk
```

## Sample code
Sample code to create sandbox using the SDK:

```javascript
import { ApiClient, SandboxesApi } from '@signadot/signadot-sdk';

const apiClient = new ApiClient();
apiClient.authentications.ApiKeyAuth.apiKey = 'SIGNADOT_API_KEY_HERE';
sandboxesApi = new SandboxesApi(apiClient);

const request = {}; // populate the request data object
sandboxesApi.createNewSandbox("my-company", request)
  .then(response => {
    console.log(response);
  }).catch(e => {
    console.log("Error: " + e);
  });
```
npm package: @signageos/file
Description: A simple wrapper over file command available in Linux systems.
Author: signageOS.io
Latest version: 2.0.1

# File npm package

Determine type of FILEs.

A simple wrapper over file command available in Linux systems.

Package is supported for Windows (non-linux) as well.

## Installation
```sh
npm i @signageos/file
```

## Usage
```ts
import file from '@signageos/file';

(async function () {
	const result = await file('/tmp/file-to-determine');
	console.log(result); // { type: ['ASCII text'] }
})();
```

### Interface
```ts
function file(filePath: string, options?: Options): Promise<Result>;

interface Options {
	fileBinPath?: string; // path to file binary to be used instead of default
	mimeType?: boolean; // if set to true, result will contain detected mime-type of file. Default false.
	separator?: string; // default ':'
	alternativeSeparators?: string[]; // default [';', '$', '€', '>', '<']
}

interface Result {
	mimeType?: string; // detected mime-type of file (if option mimeType set to true)
	charset?: string; // detect charset of file (if option mimeType set to true)
	types?: string[]; // get all detected general types (if no mimeType set)
}
```

### Get version of file
```ts
import { getVersion } from '@signageos/file';

(async function () {
	const version = await getVersion();
	console.log(version); // file-5.32
})();
```

## Limitations

Currently only following features are supported:
- type: Returns default type of given file (without arguments)
- mimeType: Returns detected mime-type of given file.

## References

- https://www.darwinsys.com/file/
- http://gnuwin32.sourceforge.net/packages/file.htm

## License

- MIT
npm package: @signageos/front-applet-extension-nexmosphere
Description: Nexmosphere extension for signageOS Front Applet
Author: signageOS
Latest version: 0.1.3

# Nexmosphere extension for signageOS Front Applet
 
This library provides a seamless integration of npm modules @signageos/nexmosphere-sdk and @signageos/front-applet. 

@signageos/front-applet library provides a set of interfaces for sensors and actuators and this library wraps around
@signageos/nexmosphere-sdk library and exposes it as implementation of those interfaces.

That way, when you write an applet with @signageos/front-applet, you can use the sensors and actuators and if you later decide
to change the underlying hardware of those sensors/actuators, you only need to replace the factories of the sensors/actuators objects.

It's also useful if you want to implement multiple diferrent sensors/actuators from different providers but want to use them all
the same way in your code.

## Basics

Every application starts with creating a nexmosphere instance that needs a serial port.

```javascript
const sos = require('@signageos/front-applet');
const Nexmosphere = require('@signageos/front-applet-extension-nexmosphere');

sos.onReady().then(async () => {
    const serialPort = await sos.hardware.openSerialPort({
        device: '/dev/ttyUSB0',
        baudRate: 115200,
    });
    const nexmosphere = new Nexmosphere(serialPort);
});
```
 
## Example usage

This library is just a wrapper for [@signageos/nexmosphere-sdk](https://www.npmjs.com/package/@signageos/nexmosphere-sdk).
You can find more detail about the various APIs there.

### Button

```javascript
const buttonAddress = 2;
const buttonIndex = 0;
const button = nexmosphere.createButton(buttonAddress, buttonIndex);

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

### RFID Antenna

```javascript
const rfidAntennaAddress = 5;
const rfidAntenna = nexmosphere.createRfidAntenna(rfidAntennaAddress);

rfidAntenna.on('picked', (tag) => console.log(`tag ${tag} was picked`));
rfidAntenna.on('placed', (tag) => console.log(`tag ${tag} was placed`));
```
npm package: @signageos/front-display
Description: This library contains all the shared code that is common across all platforms (application types). It includes the business logic necessary for communicating with the `signageOS` platform service.
Author: Michael Zabka
Latest version: 14.34.1

# Front Display
This library contains all the shared code that is common across all platforms (application types).
It includes the business logic necessary for communicating with the `signageOS` platform service.

In addition, it includes the Emulator, an implementation of the display that can be conveniently used for development purposes in modern browsers such as Chrome.

## Developing
```bash
cp -n config/env.\{a\}.json  config/env.development.json # only for the first time
npm run develop
```

:exclamation: There is a known issue where files transpiled to ES5 during the build process are rewritten back to ES6 when using the `npm run develop` command. This issue does not block development with modern ES6-compliant browsers, but you must always verify functionality in the lowest version of the browser that the code targets. To address this, follow these steps:

```bash
# In one terminal window, run:
esbuild --serve=8080 --servedir=dist

# In a second terminal window, rebuild the code:
npm run build
```

Then, check the application in an older browser to ensure compatibility.

## Testing
To run **unit** and **integration** tests in Node.js environment use the following command:
```bash
npm test
```

To run **browser** tests in the Chrome Headless environment use the following command:
```bash
npm run test-browser
```
> By default, the browser tests run in single run mode.
> If you want to monitor changes and develop your code more quickly, use the following command: `npm run test-browser -- --no-single-run`.

The Browser environment only contains a subset of tests that are practical to run in a near-real browser environment (e.g., for using real browser APIs like CacheStorage, IndexedDB, ServiceWorkers, etc.).

Generally, the browser environment is slow and impractical for developing unit tests.