open-index/open-npm huggingface dataset:
npm package: @product-hackers/neerd
Description: neerd is an event emitter for nodejs around redis pubsub
Author: jorchg
Latest version: 1.1.0

# neerd - Node Event Emitter Redis

[![Build Status](https://travis-ci.org/ProductHackers/neerd.svg?branch=master)](https://travis-ci.org/ProductHackers/neerd)
[![Coverage Status](https://coveralls.io/repos/github/ProductHackers/neerd/badge.svg?branch=master)](https://coveralls.io/github/ProductHackers/neerd?branch=master)

Neerd is a little wrapper around `node_redis` pub/sub feature, which essentially emit events to other node modules on subscriptions messages.

## Install
`npm i --save @product-hackers/neerd`

## Usage
```js
const Neerd = require('@product-hackers/neerd');

// All config from node_redis is available to pass in the constructor.
// See https://github.com/NodeRedis/node_redis
const redisConfig = {
  host: 'localhost',
  port: 6379,
};

const neerd = new Neerd(redisConfig);

neerd.on('connection', async (message) => {
  console.log(`Connected: ${message}`);
  testSub();
  testPub();
});

neerd.on('error', (error) => {
  console.error(`There was an error connecting to redis: ${error}`);
});

const testSub = () => {
  neerd.on('test-channel', (message) => {
    console.log(`Message received on test-channel: ${message}`);
  });
  neerd.startSub('test-channel');
};

const testPub = (message = '') => {
  const neerdPub = new Neerd(redisConfig);
  neerdPub.publish('test-channel', 'This is a test message sent via redis pubsub');
  neerdPub.publish('test-channel', JSON.stringify({ message: 'You can also serialize messages' }));
};
```

## Testing
Running `npm t` builds the library, runs the tests and report coverage.

## License
[MIT](LICENSE).
npm package: @product-intelligence-hub/sdk-node
Description: Node.js Server SDK for Product Intelligence Hub
Latest version: 0.4.0

# @product-intelligence-hub/sdk-node

Node.js Server SDK for [Product Intelligence Hub](https://github.com/product-intelligence-hub/product-intelligence-hub).

## Installation

```bash
npm install @product-intelligence-hub/sdk-node
# or
pnpm add @product-intelligence-hub/sdk-node
# or
yarn add @product-intelligence-hub/sdk-node
```

## Quick Start

```typescript
import PIHNode from "@product-intelligence-hub/sdk-node";

// Initialize (once at server startup)
const pih = PIHNode.init({
  apiKey: "your-environment-api-key",
  projectId: "your-project-id",
  environment: "prod",
  tenantId: "tenant_abc", // optional, can also use setTenant()
});

// Track an event
pih.capture("user-42", "purchase_completed", {
  amount: 99.99,
  currency: "USD",
  plan: "pro",
});

// Identify a user with traits
await pih.identify("user-42", {
  name: "Jane Doe",
  email: "jane@example.com",
  plan: "pro",
});

// Force flush queued events
await pih.flush();

// Graceful shutdown (flush + cleanup)
await pih.shutdown();
```

## API

### `PIHNode.init(config)`

Initialize the SDK singleton. Returns a `NodePIHClient` instance.

| Option | Type | Default | Description |
|---|---|---|---|
| `apiKey` | `string` | **required** | Environment API key |
| `projectId` | `string` | **required** | Project identifier |
| `environment` | `"dev" \| "staging" \| "prod"` | **required** | Environment name |
| `tenantId` | `string` | `""` | Tenant identifier |
| `apiUrl` | `string` | `"https://repoingest-production.up.railway.app"` | Ingest API URL |
| `appVersion` | `string` | `undefined` | Application version |
| `debug` | `boolean` | `false` | Enable debug logging |
| `flushAt` | `number` | `20` | Events before auto-flush |
| `flushInterval` | `number` | `10000` | Ms between auto-flushes |

### `client.capture(distinctId, event, properties?)`

Track a server-side event. Queues the event internally (non-blocking).

### `client.identify(userId, traits?)`

Identify a user and merge traits. Sends an identify call to the server.

### `client.flush()`

Force flush all queued events to the ingest API.

### `client.shutdown()`

Graceful shutdown: flushes the queue, detaches process listeners, and destroys the client. Call this before your server process exits.

### `PIHNode.getInstance()`

Returns the current singleton instance, or `null` if not initialized.

### `PIHNode.resetInstance()`

Destroys and resets the singleton. Useful for testing.

## Graceful Shutdown

The SDK automatically listens for the `beforeExit` process event and flushes remaining events. For explicit control, call `shutdown()` in your server's cleanup handler:

```typescript
process.on("SIGTERM", async () => {
  await pih.shutdown();
  process.exit(0);
});
```

## License

MIT
npm package: @product-live/fs.hash
Description: ![GitHub Actions status | linter](https://github.com/anzerr/fs.hash/workflows/linter/badge.svg) ![GitHub Actions status | publish](https://github.com/anzerr/fs.hash/workflows/publish/badge.svg) ![GitHub Actions status | test](https://github.com/anzerr/fs.
Author: anzerr
Latest version: 1.0.10


### `Intro`
![GitHub Actions status | linter](https://github.com/anzerr/fs.hash/workflows/linter/badge.svg)
![GitHub Actions status | publish](https://github.com/anzerr/fs.hash/workflows/publish/badge.svg)
![GitHub Actions status | test](https://github.com/anzerr/fs.hash/workflows/test/badge.svg)

hash a directory or file

#### `Install`
``` bash
npm install --save git+https://git@github.com/anzerr/fs.hash.git
npm install --save @anzerr/fs.hash
```

### `Example`
``` javascript
const hash = require('fs.hash');

hash('./node_modules', {raw: true, max: 5, type: 'sha256'}).then((res) => {
	console.log(res);
});
```
npm package: @product-live/fs.mkdirp
Description: ![GitHub Actions status | linter](https://github.com/anzerr/fs.mkdirp/workflows/linter/badge.svg) ![GitHub Actions status | publish](https://github.com/anzerr/fs.mkdirp/workflows/publish/badge.svg) ![GitHub Actions status | test](https://github.com/anzerr
Author: anzerr
Latest version: 1.0.10


### `Intro`
![GitHub Actions status | linter](https://github.com/anzerr/fs.mkdirp/workflows/linter/badge.svg)
![GitHub Actions status | publish](https://github.com/anzerr/fs.mkdirp/workflows/publish/badge.svg)
![GitHub Actions status | test](https://github.com/anzerr/fs.mkdirp/workflows/test/badge.svg)

mkdir with 'p' on the base mkdir '{recursive: true}' doesn't seem to work so here's this little util

#### `Install`
``` bash
npm install --save git+https://github.com/anzerr/fs.mkdirp.git
npm install --save @anzerr/fs.mkdirp
```

### `Example`
``` javascript
const mkdir = require('fs.mkdirp');

mkdir('foo/bar/cat/dog').catch(console.log);
```
npm package: @product-live/fs.promisify
Description: Wrap all fs functions to be promisify.
Author: anzerr
Latest version: 1.0.9


### `Intro`
Wrap all fs functions to be promisify.

``` bash
npm install --save git+https://github.com/anzerr/fs.promisify.git
npm install --save @anzerr/fs.promisify
```
npm package: @product-live/fs.remove
Description: ![GitHub Actions status | linter](https://github.com/anzerr/fs.remove/workflows/linter/badge.svg) ![GitHub Actions status | publish](https://github.com/anzerr/fs.remove/workflows/publish/badge.svg) ![GitHub Actions status | test](https://github.com/anzerr
Author: anzerr
Latest version: 1.0.13


### `Intro`
![GitHub Actions status | linter](https://github.com/anzerr/fs.remove/workflows/linter/badge.svg)
![GitHub Actions status | publish](https://github.com/anzerr/fs.remove/workflows/publish/badge.svg)
![GitHub Actions status | test](https://github.com/anzerr/fs.remove/workflows/test/badge.svg)

perform a "rm -Rf" on a directory/file using the core node libary

#### `Install`
``` bash
npm install --save git+https://github.com/anzerr/fs.remove.git
npm install --save @anzerr/fs.remove
```

### `Example`
``` javascript
require('fs.remove')('./node_modules').then(() => {
	console.log('done');
});
```
npm package: @product-live/mime.util
Description: Util to find the Content-Type for a extension
Author: anzerr
Latest version: 1.0.7


### `Intro`
Util to find the Content-Type for a extension

#### `Install`
``` bash
npm install --save git+https://github.com/anzerr/mime.util.git
npm install --save @anzerr/mime.util
```

### `Example`
``` javascript
const mime = require('mime.util');
mime.lookup('json') // application/json
```
npm package: @product-live/promise.util
Description: ![GitHub Actions status | linter](https://github.com/anzerr/promise.util/workflows/linter/badge.svg) ![GitHub Actions status | publish](https://github.com/anzerr/promise.util/workflows/publish/badge.svg) ![GitHub Actions status | test](https://github.com/
Author: anzerr
Latest version: 1.0.4


### `Intro`
![GitHub Actions status | linter](https://github.com/anzerr/promise.util/workflows/linter/badge.svg)
![GitHub Actions status | publish](https://github.com/anzerr/promise.util/workflows/publish/badge.svg)
![GitHub Actions status | test](https://github.com/anzerr/promise.util/workflows/test/badge.svg)

simple es6 promise util.

#### `Install`
``` bash
npm install --save git+https://git@github.com/Product-Live/promise.util.git
```

### `Example`
``` javascript
const promise = require('@product-live/promise.util');
const data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];

promise.measure(() => {
	return promise.each(data, () => promise.delay(1000), 5);
}).then((res) => {
	console.log(Math.round(res / 1e9)) // 2
});
```
npm package: @product-live/request.libary
Description: http request util
Author: anzerr
Latest version: 1.0.13


### `Intro`
![GitHub Actions status | linter](https://github.com/anzerr/request.libary/workflows/linter/badge.svg)
![GitHub Actions status | publish](https://github.com/anzerr/request.libary/workflows/publish/badge.svg)
![GitHub Actions status | test](https://github.com/anzerr/request.libary/workflows/test/badge.svg)

Simple request object without having to pull 47 extra packages

#### `Install`
``` bash
npm install --save git+https://github.com/anzerr/request.libary.git
npm install --save @anzerr/request.libary
```

### `Example`
``` javascript
const Request = require('request.libary');

new Request('https://google.com').get('/').then((res) => {
	console.log(res.status(), res.body().toString());
});
```
npm package: @product-live/unique.util
Description: Unique key generation util.
Author: anzerr
Latest version: 1.0.7


### `Intro`
Unique key generation util.

#### `Install`
``` bash
npm install --save git+https://github.com/anzerr/unique.util.git
npm install --save @anzerr/unique.util
```

### `Example`

``` javascript
const key = require('unique.util');
console.log(key.long());
console.log(key.number());
console.log(key.random());
console.log(key.plain());
console.log(key.seed(1).next());
console.log(key.short()); // crypto safe?
console.log(key.simple()); // not crypto safe
```
npm package: @product-partner/pp-chatbot
Description: A React chat component for product partner applications
Author: Product Partner Team
Latest version: 1.0.2

# Chat Component PP React
## Development
comment out the App in App.tsx and import it as {App} in main.tsx and it would start working
check your .env file for the VITE_SITE_URL
the dev environment uses a proxy to go to stage.productpartner.ai

## Usage

```js
import { ChatBot } from "pp-chatbot";

const App = () => {
  return <ChatBot />;
};
```

---

### 📦 Props Table – `ChatBot`

| **Prop**       | **Type**                                           | **Required** | **Description**                                                              |
| -------------- | -------------------------------------------------- | ------------ | ---------------------------------------------------------------------------- |
| `messages`     | `{ id: string; content: string; role?: string }[]` | No           | Array of message objects, each with an `id`, `content`, and optional `role`. |
| `suggestions`  | `string[]`                                         | No           | Optional array of suggestion strings.                                        |
| `loading`      | `boolean`                                          | Yes          | Indicates if a loading state is active.                                      |
| `onSubmit`     | `(val: string) => void`                            | Yes          | Callback triggered when a message is submitted.                              |
| `onFileChange` | `(val: File[]) => void`                            | Yes          | Callback triggered when files are added.                                     |
| `files`        | `File[]`                                           | Yes          | Array of currently selected files.                                           |
| `removeFile`   | `(val: File) => void`                              | Yes          | Callback to remove a selected file.                                          |

---