open-index/open-npm huggingface dataset:
npm package: @spotlightdata/nanowire-extensions
Description: utilities and components used in nanowire platform
Author: Augustinas
Latest version: 2.0.0-alpha.14

# nanowire-extensions

[![Build Status](https://travis-ci.com/SpotlightData/nanowire-extensions.svg?branch=master)](https://travis-ci.com/SpotlightData/nanowire-extensions)

## Installation

`yarn add @spotlightdata/nanowire-extensions` or `npm install @spotlightdata/nanowire-extensions`

## Testing

Run `yarn test` to start. We use `jest` as our test runner together with `react-testing-library`.

### Notes on peerDependencies

Because some of the dependencies are listed as peerDependencies, we require to manually install them as neither npm or yarn have a solution as of this time.
Run `yarn prepare` to run installation script for them.
npm package: @spotlightdata/nanowire-plugin-js
Description: A Node.js client for Spotlight's Redis Pipeline
Author: Will Evans
Latest version: 9.0.19

# Node.js Nanowire Library

[![Build Status](https://travis-ci.com/SpotlightData/nanowire-plugin-js.svg?branch=master)](https://travis-ci.com/SpotlightData/nanowire-plugin-js)

This is a node.js library which provides a wrapper around Nanowire's controller service. It allows the user to easily fetch and process tasks from Nanowire's pipeline. If you are starting a new project from scratch it is recommended that you use the [Nanowire Python Skeleton Plugin](https://github.com/SpotlightData/nanowire-python-plugin-skeleton) as the basis for your plugin as it is already set up and ready to use.

## Details on how to run

First install the dependencies with:

`yarn install`

The following environment variables need to be set:

```
CONTROLLER_BASE_URI
POD_NAME
PLUGIN_ID
```

Then the library can be built with:

`yarn build`

## Usage

```javascript
import SpotlightPipeline from '@spotlightdata/nanowire-plugin-js';
import { name as pluginName } from '../package.json';

const processMessage = async (nmo, jsonld, url) => {
  return {
    '@type': 'TextDigitalDocument',
  };
};

const client = new SpotlightPipeline({
  taskHandler: processMessage,
  pluginName,
});

client.start();
```

## Task handling

Your handler function must take 3 parameters, 1 the NMO, 2 the jsonld (if any otherwise this will be undefined) and 3 a Minio presigned URL which you can use to get the original file.

Your function must return the JSON-LD that you want to be stored/passed along.
npm package: @spotlightdata/node-logger
Description: A Node.js logger for Spotlight Data's Node.js projects
Author: Will Evans
Latest version: 0.2.2

# Node logger

Wrapper for [winston](https://github.com/winstonjs/winston)

## Usage

```javascript
// cjs const logger = require('@spotlightdata/node-logger').default
import logger from '@spotlightdata/node-logger';

logger.error('Unknown error occurred handling task.');
logger.log('info', 'Hello distributed log files!');
logger.info('Hello again distributed logs');
```

## Development

- Install packages using `yarn install`
- Start in development mode by using `yarn dev`
- Finally build with `yarn build`
- Run tests using `yarn test`

All versions will automatically be deployed using travis when tagged on master.