open-index/open-npm huggingface dataset:
npm package: @hchordiya/soprano-sg
Description: Soprano UI Component Library
Author: Your Name
Latest version: 1.0.1

# Getting Started with Create React App

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Available Scripts

In the project directory, you can run:

### `npm start`

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.\
You will also see any lint errors in the console.

### `npm test`

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `npm run build`

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `npm run eject`

**Note: this is a one-way operation. Once you `eject`, you can’t go back!**

If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

## Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

To learn React, check out the [React documentation](https://reactjs.org/).
npm package: @hchordiya/soprano-style-guide
Description: Soprano UI Component Library
Author: Hrishikesh Chordiya
Latest version: 1.0.2

# Getting Started with Create React App

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Available Scripts

In the project directory, you can run:

### `npm start`

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.\
You will also see any lint errors in the console.

### `npm test`

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `npm run build`

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `npm run eject`

**Note: this is a one-way operation. Once you `eject`, you can’t go back!**

If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

## Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

To learn React, check out the [React documentation](https://reactjs.org/).
npm package: @hchordiya/style-guide
Description: Soprano React Component Library - A modern, accessible, and customizable component library
Author: hchordiya@concertai.com
Latest version: 1.0.2

# Getting Started with Create React App

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Available Scripts

In the project directory, you can run:

### `npm start`

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.\
You will also see any lint errors in the console.

### `npm test`

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `npm run build`

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `npm run eject`

**Note: this is a one-way operation. Once you `eject`, you can’t go back!**

If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

## Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

To learn React, check out the [React documentation](https://reactjs.org/).
npm package: @hcins/assistant-web-channel
Description: Claude Code channel plugin for web browser integration via WebSocket
Latest version: 1.1.0

# @hcins/assistant-web-channel

Claude Code channel plugin for web browser integration via WebSocket.

Connect your web app to Claude Code using the same pattern as the Telegram plugin.

## Installation

```bash
# Add to Claude Code
claude mcp add assistant-web -- npx @hcins/assistant-web-channel

# Or install globally
npm install -g @hcins/assistant-web-channel
claude mcp add assistant-web -- assistant-web-channel
```

## How it works

This plugin runs an MCP server with a WebSocket endpoint. Your web frontend connects to the WebSocket and exchanges messages with Claude Code in real-time.

```
[Web Browser] --WebSocket--> [assistant-web-channel :9100] --stdio--> [Claude Code CLI]
```

## MCP Tools

| Tool | Description |
|------|-------------|
| `reply` | Send text to the web app user |
| `stream_text` | Stream text in real-time (chunked) |
| `ask_question` | Ask a question with selectable options |
| `show_tool_status` | Show tool execution status |
| `react` | Add emoji reaction to a message |
| `edit_message` | Edit a previously sent reply |

## Environment Variables

| Variable | Default | Description |
|----------|---------|-------------|
| `ASSISTANT_WEB_WS_PORT` | `9100` | WebSocket server port |

## Access Control

By default, the plugin uses `open` policy (no pairing required). To enable pairing:

1. Edit `~/.claude/channels/assistant-web/access.json`
2. Set `"policy": "pairing"`
3. When a web client connects, a pairing code will be shown
4. Run `approve-pairing <code>` in Claude Code to approve

## License

MIT
npm package: @hck23/simple-q
Description: Simple-Q
Author: Hookdeck
Latest version: 1.1.0

# SimpleQ

Introducing Pub Sub: Streamline Your Development with Effortless Asynchronous Message Queues!

SimpleQ is the ultimate tool for developers who require an asynchronous message queue. With just two lines of code, you can create a complete queue.

Built with developers in mind, SimpleQ uses Hookdeck as a backend. Our intelligent proxy bridges the gap and serves as a receiver, ensuring reliable communication.

## Features

- Easy to use: With just two lines of code, you can create a complete queue.
- Real-time asynchronous applications: Perfect for chat applications, real-time notifications, and high-frequency trading applications.
- Observability: Enjoy observability and advanced filtering features native to Hookdeck to optimize your data streams.
- Intuitive implementation: Simplify your workflow with SimpleQ's intuitive implementation.
- Works from nodeJS process and browser applications.
- Uses hookdeck as a backend - Filtering, transformations, fan-out at with no extra code

## Pre-requisites
You'll need a [hookdeck.com](https://hookdeck.com) API key to use this package, since it uses Hookdeck as a backend.

Head over to Hookdeck.com, sign up for an account, and head over to:

`workspace settings (top left corner) > Secrets tab`

and get your `API Key` to use in the code below.

## Getting started

To get started with SimpleQ, follow these simple steps:

1. Install SimpleQ using npm
```
npm i @hck23/simple-q
```

Or yarn:
```
yarn add @hck23/simple-q
```

2. Initialize a new queue

```javascript
import simpleq from '@hck23/simple-q';

const q = simpleq.init('<api-key>');
```

3. Subscribe
```javascript
q.subscribe('hck2023-chnl1', (message) => {
  console.log('Received message:', message);
});
```

4. Publish a message to the queue:
```javascript
q.publish('hck2023-chnl1', 'Hello, World!');
```

That's it! With just these four simple steps, you can start using SimpleQ to for any application where real time messaging is needed.

## License
This project is licensed under the MIT License.
npm package: @hckj00/mcp-servers
Description: MCP Servers with date tool
Author: hckj00
Latest version: 1.0.1

# MCP Servers

这是一个基于 Node.js 的 MCP Servers 实现，提供了符合 MCP（模型上下文协议）标准的工具接口。

## 功能特性

- 符合 MCP 工具协议标准
- 提供日期时间工具
- 支持自定义日期格式
- 支持时区设置
- 返回时间戳和时区信息

## 安装

```bash
# 从 npm 安装
npm install @hckj00/mcp-servers

# 或者从源码安装
git clone <repository-url>
cd mcp-servers
npm install
```

## 运行服务器

```bash
# 开发模式运行（支持热重载）
npm run dev

# 生产模式运行
npm start
```

## MCP 工具使用说明

### 1. 获取可用工具列表

```http
GET /api/mcp/tools
```

响应示例：
```json
[
  {
    "name": "get_current_date",
    "description": "获取当前日期时间，支持自定义格式和时区",
    "parameters": {
      "type": "object",
      "properties": {
        "format": {
          "type": "string",
          "description": "日期格式，例如：YYYY-MM-DD HH:mm:ss、YYYY年MM月DD日等"
        },
        "timezone": {
          "type": "string",
          "description": "时区，例如：Asia/Shanghai、America/New_York 等"
        }
      }
    }
  }
]
```

### 2. 调用工具

```http
POST /api/mcp/invoke
```

请求体示例：
```json
{
  "tool": "get_current_date",
  "parameters": {
    "format": "YYYY年MM月DD日 HH:mm:ss",
    "timezone": "Asia/Shanghai"
  }
}
```

响应示例：
```json
{
  "date": "2024年03月20日 15:30:00",
  "timestamp": 1710932400000,
  "timezone": "Asia/Shanghai"
}
```

## 在模型中使用

在模型的工具配置中，可以这样定义：

```json
{
  "name": "get_current_date",
  "description": "获取当前日期时间，支持自定义格式和时区。可用于获取系统时间、格式化日期等场景。",
  "parameters": {
    "type": "object",
    "properties": {
      "format": {
        "type": "string",
        "description": "日期格式，例如：YYYY-MM-DD HH:mm:ss、YYYY年MM月DD日等"
      },
      "timezone": {
        "type": "string",
        "description": "时区，例如：Asia/Shanghai、America/New_York 等"
      }
    }
  }
}
```

## 日期格式说明

支持的格式标记：

- `YYYY`: 四位年份
- `MM`: 两位月份
- `DD`: 两位日期
- `HH`: 24小时制小时
- `mm`: 分钟
- `ss`: 秒钟

更多格式请参考 [Moment.js 文档](https://momentjs.com/docs/#/displaying/)

## 支持的时区

使用 IANA 时区数据库中的时区名称，例如：

- `Asia/Shanghai`
- `America/New_York`
- `Europe/London`
- `UTC`

完整的时区列表可以在 [这里](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) 查看。
npm package: @hckj00/mcp-time-tool
Description: MCP 时间工具服务器
Author: hckj00
Latest version: 1.0.1

# MCP 时间工具服务器

这是一个基于 Node.js 的 MCP（模型上下文协议）时间工具服务器，提供了获取当前时间的功能。

## 功能特性

- 符合 MCP 工具协议标准
- 提供 getCurrentTime 工具
- 返回 ISO 8601 格式的时间字符串

## 安装

```bash
# 从 npm 安装
npm install @hckj00/mcp-time-tool

# 或者从源码安装
git clone <repository-url>
cd mcp-time-tool
npm install
```

## 运行服务器

```bash
# 开发模式运行（支持热重载）
npm run dev

# 生产模式运行
npm start
```

## API 接口

### 1. 获取可用工具列表

```http
GET /api/mcp/tools
```

响应示例：
```json
[
  {
    "name": "getCurrentTime",
    "description": "获取当前服务器时间，返回 ISO 8601 格式的时间字符串",
    "parameters": {
      "type": "object",
      "properties": {},
      "required": []
    }
  }
]
```

### 2. 调用工具

```http
POST /api/mcp/invoke
```

请求体示例：
```json
{
  "tool": "getCurrentTime"
}
```

响应示例：
```json
{
  "currentTime": "2024-03-20T15:30:00.000Z"
}
```

### 3. 健康检查

```http
GET /health
```

响应示例：
```json
{
  "status": "ok"
}
```

## 在模型中使用

在模型的工具配置中，可以这样定义：

```json
{
  "name": "getCurrentTime",
  "description": "获取当前服务器时间，返回 ISO 8601 格式的时间字符串",
  "parameters": {
    "type": "object",
    "properties": {},
    "required": []
  }
}
```

## 时间格式说明

返回的时间格式遵循 ISO 8601 标准：
- `YYYY-MM-DD`: 日期部分
- `T`: 日期和时间的分隔符
- `HH:mm:ss.sss`: 时间部分（包含毫秒）
- `Z`: UTC 时区标识符

例如：`2024-03-20T15:30:00.000Z`
npm package: @hckj00/node-tools
Description: MCP Node.js Tools including time utilities and debugging tools
Author: Your Name
Latest version: 1.0.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @mcp/node-tools

这是一个基于Node.js的MCP（Multi-Cloud Platform）工具包，提供了调试工具和时间处理工具。

## 安装

```bash
npm install @mcp/node-tools
```

## 功能特点

- 调试工具（MCPDebugger）
- 时间工具（MCPTimeTools）
- Express服务器集成
- Jest测试框架
- ESLint代码检查
- Prettier代码格式化

## 使用方法

### 导入工具

```javascript
const { mcpDebugger, mcpTimeTools } = require('@mcp/node-tools');
```

### 调试工具使用

```javascript
// 测试连接
const connectionStatus = mcpDebugger.testConnection();

// 测试API调用
const apiResult = await mcpDebugger.testApiCall('/api/endpoint', {
  method: 'POST',
  data: { key: 'value' }
});

// 记录调试信息
mcpDebugger.log('Debug message', { key: 'value' });
```

### 时间工具使用

```javascript
// 获取当前时间信息
const timeInfo = mcpTimeTools.getCurrentTime({
  timezone: 'Asia/Shanghai' // 可选
});

// 比较两个时间
const compareResult = mcpTimeTools.compareTime('2024-01-01', '2024-01-02');

// 获取支持的时区列表
const timezones = mcpTimeTools.getSupportedTimezones();
```

### 创建Express应用

```javascript
const { createApp } = require('@mcp/node-tools');

const { app, port } = createApp();

app.listen(port, () => {
  console.log(`Server is running on port ${port}`);
});
```

### API端点

启动服务器后，可以访问以下端点：

1. 调试端点：
```
GET /debug
```

2. 健康检查：
```
GET /health
```

3. 时间相关：
```
GET /time?timezone=Asia/Shanghai
GET /time/compare?time1=2024-01-01&time2=2024-01-02
GET /time/zones
```

## 环境变量

- `PORT`: 服务器端口（默认：3000）
- `NODE_ENV`: 环境（development/production）
- `MCP_API_URL`: MCP API的基础URL

## 开发

1. 安装依赖：
```bash
npm install
```

2. 运行测试：
```bash
npm test
```

3. 代码检查：
```bash
npm run lint
```

4. 代码格式化：
```bash
npm run format
```

## 发布新版本

1. 更新版本号：
```bash
npm version patch  # 小版本更新
npm version minor  # 中版本更新
npm version major  # 大版本更新
```

2. 发布到npm：
```bash
npm publish
```

## 许可证

MIT
npm package: @hckrnews/auto-fetch
Description: Auto Fetch local/http
Author: Pieter Wigboldus
Latest version: 1.1.5

# Auto Fetch local/http

[![NPM version][npm-image]][npm-url] [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_auto-fetch&metric=coverage)](https://sonarcloud.io/summary/new_code?id=hckrnews_auto-fetch) [![Scrutinizer Code Quality][scrutinizer-image]][scrutinizer-url] [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_auto-fetch&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=hckrnews_auto-fetch) 
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_auto-fetch&metric=bugs)](https://sonarcloud.io/summary/new_code?id=hckrnews_auto-fetch) [![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_auto-fetch&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=hckrnews_auto-fetch) [![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_auto-fetch&metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=hckrnews_auto-fetch) [![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_auto-fetch&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=hckrnews_auto-fetch)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_auto-fetch&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=hckrnews_auto-fetch) [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_auto-fetch&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=hckrnews_auto-fetch) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_auto-fetch&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=hckrnews_auto-fetch)

With this package you can get local or remote file data like the fetch method.

## Example usage

```javascript
import fetch '@hckrnews/auto-fetch'

const responseLocal = await fetch('./src/__fixtures__/example.json')
const responseRemote = await fetch('https://example.com')
```

Returns the body as string. 
```javascript
await response.text()
```

Returns the body parsed as JSON. 
```javascript
await response.json()
```

Returns the body as [ReadableStream](https://nodejs.org/api/stream.html#stream_readable_streams). 
```javascript
let result = ''
response.body.on('data', (chunk) => {
    result += chunk
})

response.body.on('end', () => {
    const data = JSON.parse(result)
})
```

[npm-url]: https://www.npmjs.com/package/@hckrnews/auto-fetch
[npm-image]: https://img.shields.io/npm/v/@hckrnews/auto-fetch.svg
[travis-url]: https://app.travis-ci.com/hckrnews/auto-fetch
[travis-image]: https://app.travis-ci.com/hckrnews/auto-fetch.svg?branch=main
[coveralls-url]: https://coveralls.io/r/hckrnews/auto-fetch
[coveralls-image]: https://img.shields.io/coveralls/hckrnews/auto-fetch/main.svg
[scrutinizer-url]: https://scrutinizer-ci.com/g/hckrnews/auto-fetch/?branch=main
[scrutinizer-image]: https://scrutinizer-ci.com/g/hckrnews/auto-fetch/badges/quality-score.png?b=main
npm package: @hckrnews/converter
Description: Convert files
Author: Pieter Wigboldus
Latest version: 0.6.0

# @hckrnews/converter
Convert files.

If you want convert files, you can do it with this script.

## Installation

    npm install @hckrnews/converter

Debian/Ubuntu:

    sudo apt install imagemagick ghostscript

## Example usage

```
import Converter from '../src/converter.js';

const converter = Converter.create({
    file:  'test/xyz.pdf',
    output: 'output/',
    sync: true
});

const result = converter.convert();
```

## Props

file: path to the file.

output: Output folder.

customConverter: set a custom converter


## Test the package.

```
npm test
```

This will run all the tests in the test folder with mocha.

If you only want to check the eslint rules, just run.

```
npm run lint
```
npm package: @hckrnews/deep-merge
Description: Object deep merge
Author: Pieter Wigboldus
Latest version: 0.3.4
Deprecated: WARNING: This project has been renamed to @trojs/deep-merge. Install using @trojs/deep-merge instead.

# Object deep merge

[![NPM version][npm-image]][npm-url] [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_deep-merge&metric=coverage)](https://sonarcloud.io/summary/new_code?id=hckrnews_deep-merge) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_deep-merge&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=hckrnews_deep-merge) 
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_deep-merge&metric=bugs)](https://sonarcloud.io/summary/new_code?id=hckrnews_deep-merge) [![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_deep-merge&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=hckrnews_deep-merge) [![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_deep-merge&metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=hckrnews_deep-merge) [![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_deep-merge&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=hckrnews_deep-merge)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_deep-merge&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=hckrnews_deep-merge) [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_deep-merge&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=hckrnews_deep-merge) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_deep-merge&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=hckrnews_deep-merge)

Deep merge objects.

Zero dependencies.

## Installation

`npm install @hckrnews/deep-merge`
or
`yarn add @hckrnews/deep-merge`

## Test the package

`npm run test`
or
`yarn test`

## How to use


```javascript
npm i @hckrnews/deep-merge

```

```javascript
import { deepMerge } from '@hcklrnews/deep-merge';

const obj1 = {
    a: 1,
    b: 1,
    c: { x: 1, y: 1 },
    d: [1, 1]
}
const obj2 = {
    b: 2,
    c: { y: 2, z: 2 },
    d: [2, 2],
    e: 2
}
const result = deepMerge(obj1, obj2)

const expectedResult = {
    a: 1,
    b: 2,
    c: { x: 1, y: 2, z: 2 },
    d: [1, 1, 2, 2],
    e: 2
}
```


[npm-url]: https://www.npmjs.com/package/@hckrnews/deep-merge
[npm-image]: https://img.shields.io/npm/v/@hckrnews/deep-merge.svg
npm package: @hckrnews/error
Description: Extended Errors
Author: Pieter Wigboldus
Latest version: 2.0.3
Deprecated: WARNING: This project has been renamed to @trojs/error. Install using @trojs/error instead.

# @hckrnews/error

[![NPM version][npm-image]][npm-url] [![Build Status][build-image]][build-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Scrutinizer Code Quality][scrutinizer-image]][scrutinizer-url]

With this package you can throw a custom error with more details.
The object extends an Error object.

Types:

 * AppError
 * AuthenticationError
 * NoContent
 * NotFoundError
 * NotImplementedError
 * ServerError
 * TimeoutError
 * ValidationError
 * RateLimitError

You can send:

 * message (type: String)
 * value (type: mixed)
 * type (String|Array|Object|Number|Boolean|Date|...)
 * me (current method, no validation on the value)

It validate the values by this schema:
```javascript
{
    name: String,
    message: String,
    'value?': 'mixed',
    status: Number,
    'type?': Function,
    date: Date,
};
```

In the catch method, you can use these fields:

 * name (type: String)
 * message (type: String)
 * value (optional, type: mixed)
 * errorStatus (type: Number)
 * status (type: Number, like errorStatus, but it will return 500 if there are validation errors)
 * type (optional, type: Function)
 * date (type: Date, current timestamp)
 * me (type: mixed)
 * values (type: Object, all fields)
 * hasErrors (type: Boolean, returns true if there are validation errors)

Install the package:

`npm install @hckrnews/error`
or
`yarn add @hckrnews/error`

Example usage:

```javascript
import { NotFoundError } from '@hckrnews/error'

class Test {
    /**
     * Throw an error.
     */
    doSomethingWrong () {
        throw new NotFoundError({
            value: 'test',
            type: String,
            message: 'Example text',
            me: this.constructor,
        });
    }

    /**
     * Catch the error.
     */
    run() {
        try {
            this.doSomethingWrong()
        } catch(error) {
            console.error(error.message)
            console.log({ value: error.value })
        }
    }
}

```

[npm-url]: https://www.npmjs.com/package/@hckrnews/error
[npm-image]: https://img.shields.io/npm/v/@hckrnews/error.svg
[build-url]: https://scrutinizer-ci.com/g/hckrnews/error/build-status/main
[build-image]: https://scrutinizer-ci.com/g/hckrnews/error/badges/build.png?b=main
[coveralls-url]: https://coveralls.io/r/hckrnews/error
[coveralls-image]: https://img.shields.io/coveralls/hckrnews/error/master.svg
[scrutinizer-url]: https://scrutinizer-ci.com/g/hckrnews/error/?branch=main
[scrutinizer-image]: https://scrutinizer-ci.com/g/hckrnews/error/badges/quality-score.png?b=main
npm package: @hckrnews/eslint-code-quality
Description: Eslint config with code quality checks from hckr.news
Author: Pieter Wigboldus
Latest version: 0.2.2

# eslint-code-quality
Usefull non styling lint rules to check code quality

Here's an example usage:

```json
{
  "extends": [
    "@hckrnews/eslint-code-quality"
  ],
  "rules": {
    "no-console": "warn"
  }
}
```
npm package: @hckrnews/eslint-config
Description: ESLint and Prettier Config from hckr.news
Author: Pieter Wigboldus
Latest version: 3.1.1

# Eslint default by hckr.news
These are my settings for ESLint and Prettier.


Here's an example usage:

```json
{
  "extends": [
    "@hckrnews/eslint-config"
  ],
  "rules": {
    "no-console": 2,
    "prettier/prettier": [
      "error",
      {
        "trailingComma": "es5",
        "singleQuote": true,
        "printWidth": 120,
        "tabWidth": 8,
      }
    ]
  }
}
```
npm package: @hckrnews/express-callback
Description: Express callback
Author: Pieter Wigboldus
Latest version: 4.1.7

# Express callback

[![NPM version][npm-image]][npm-url]
[![Downloads][downloads-image]][npm-stats]
[![Build Status][travis-image]][travis-url]
[![Coveralls Status][coveralls-image]][coveralls-url]
[![Scrutinizer Code Quality][scrutinizer-image]][scrutinizer-url]


```javascript
import OpenAPIBackend from 'openapi-backend';
import { makeExpressCallback } from '@hckrnews/express-callback'

const specification = {
    info: {
        version: '1.2.3',
    }
}

const logger = {}

const meta = {}

const getPetsController = ({
    context,
    specification,
    logger,
    errorLogger,
    req,
    res,
    meta,
}) => {
    // do something

    return {
        headers: {
            'Content-Type': 'application/json',
            'Cache-Control': 'no-store, max-age=0',
        },
        statusCode: 200,
        body: {

        },
        attachment: false,
    }
}

const api = new OpenAPIBackend({ definition: specification });

api.register({
    getPets: makeExpressCallback({
        controller: getPetsController,
        specification,
        logger,
        errorLogger: { error: (error) => {} },
        meta
    })
});

api.init();

```

[downloads-image]: https://img.shields.io/npm/dm/@hckrnews/express-callback.svg
[npm-url]: https://www.npmjs.com/package/@hckrnews/express-callback
[npm-image]: https://img.shields.io/npm/v/@hckrnews/express-callback.svg
[npm-stats]: https://npm-stat.com/charts.html?package=@hckrnews/express-callback
[travis-url]: https://scrutinizer-ci.com/g/hckrnews/express-callback/build-status/main
[travis-image]: https://scrutinizer-ci.com/g/hckrnews/express-callback/badges/build.png?b=main
[coveralls-url]: https://scrutinizer-ci.com/g/hckrnews/express-callback/?branch=main
[coveralls-image]: https://scrutinizer-ci.com/g/hckrnews/express-callback/badges/coverage.png?b=main
[scrutinizer-url]: https://scrutinizer-ci.com/g/hckrnews/express-callback/?branch=main
[scrutinizer-image]: https://scrutinizer-ci.com/g/hckrnews/express-callback/badges/quality-score.png?b=main
npm package: @hckrnews/local-fetch
Description: Local Fetch
Author: Pieter Wigboldus
Latest version: 1.2.8

# Local Fetch

[![NPM version][npm-image]][npm-url] [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_local-fetch&metric=coverage)](https://sonarcloud.io/summary/new_code?id=hckrnews_local-fetch) [![Scrutinizer Code Quality][scrutinizer-image]][scrutinizer-url] [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_local-fetch&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=hckrnews_local-fetch) 
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_local-fetch&metric=bugs)](https://sonarcloud.io/summary/new_code?id=hckrnews_local-fetch) [![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_local-fetch&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=hckrnews_local-fetch) [![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_local-fetch&metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=hckrnews_local-fetch) [![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_local-fetch&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=hckrnews_local-fetch)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_local-fetch&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=hckrnews_local-fetch) [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_local-fetch&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=hckrnews_local-fetch) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_local-fetch&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=hckrnews_local-fetch)

With this package you can get local file data like the fetch method.

## Example usage

```javascript
import localFetchfrom '@hckrnews/local-fetch'

const fetch = await localFetcher('file:///Users/pieter.wigboldus/projects/local-fetch/src/__fixtures__/example.json')
```

Returns the body as string. 
```javascript
fetch.text()
```

Returns the body parsed as JSON. 
```javascript
fetch.json()
```

Returns the body as [ReadableStream](https://streams.spec.whatwg.org/#readablestream). 
```javascript
let result = ''
fetch.body.on('data', (chunk) => {
    result += chunk
})

fetch.body.on('end', () => {
    const data = JSON.parse(result)
})
```

[npm-url]: https://www.npmjs.com/package/@hckrnews/local-fetch
[npm-image]: https://img.shields.io/npm/v/@hckrnews/local-fetch.svg
[travis-url]: https://app.travis-ci.com/hckrnews/local-fetch
[travis-image]: https://app.travis-ci.com/hckrnews/local-fetch.svg?branch=main
[coveralls-url]: https://coveralls.io/r/hckrnews/local-fetch
[coveralls-image]: https://img.shields.io/coveralls/hckrnews/local-fetch/main.svg
[scrutinizer-url]: https://scrutinizer-ci.com/g/hckrnews/local-fetch/?branch=main
[scrutinizer-image]: https://scrutinizer-ci.com/g/hckrnews/local-fetch/badges/quality-score.png?b=main
npm package: @hckrnews/logger
Description: Winston logger for Hckrnews
Author: Pieter Wigboldus
Latest version: 0.3.4
Deprecated: WARNING: This project has been renamed to @trojs/logger. Install using @trojs/logger instead.

# logger
Generic logger with intergrations for e.g. Sentry

```javascript
import makeLogger from '@hckrnews/logger';

const logger = makeLogger({
  level: 'info', 
  service: 'user-service',
  loggers: [
    {
      type: 'console'
    },
    {
      type: 'sentry',
      level: 'error',
      location: 'https://12345678@234567151173.ingest.sentry.io/1234567'
    }
  ]
})

try {
  throw new Error('example')
} catch(error) {
  logger.error(error, { whatever: "is sent as extra" });
}
```

# level

default: info

Log only if [`info.level`](#streams-objectmode-and-info-objects) less than or equal to this level

More info see: https://www.npmjs.com/package/winston#logging-levels

# service

default: user-service

# Loggers:

Set of logging targets for `info` messages

default:
```javascript
[
  {
    type: 'console'
  }
]
```

Types:

 * sentry
 * errorFile
 * combinedFile
 * console

The default loggers are overruled by the loggers in the `loggers` array.

It use winston transports for all logger types.
More info see: https://www.npmjs.com/package/winston#transports

## sentry

* location (sentry.dsn)
* environment (default: production, sentry.environment)
* serverName (default: localhost, sentry.serverName)
* release (default: unknown, sentry.release)
* debug (default: false, sentry.debug)
* sampleRate (default: 1, sentry.sampleRate)
* tracesSampleRate (default: 1, senty.tracesSampleRate)
* level (default: info)

DSN:

The DSN tells the SDK where to send the events. If this value is not provided, the SDK will try to read it from the SENTRY_DSN environment variable. If that variable also does not exist, the SDK will just not send any events.

More info: 

* https://github.com/aandrewww/winston-transport-sentry-node
* https://docs.sentry.io/platforms/node/
* https://docs.sentry.io/platforms/javascript/

## errorFile

* location (default: error.log)
* level (default: error)

## combinedFile

* location (default: combined.log)

## console
npm package: @hckrnews/mutator
Description: Mutate the value when set some data
Author: Pieter Wigboldus
Latest version: 0.3.7
Deprecated: WARNING: This project has been renamed to @trojs/mutator. Install using @trojs/mutator instead.

# Mutate the value when set some data

[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Scrutinizer Code Quality][scrutinizer-image]][scrutinizer-url]

With this package you can define some setters that are optional.
So it change the value for the defined setters, but if you don't pass the key, it doesnt set the key.

## Installation

`npm install @hckrnews/objects`
or
`yarn add @hckrnews/objects`

## Test the package

`npm run test`
or
`yarn test`

## Example usage

```javascript
import DefaultMutator from '@hckrnews/mutator'

class ExampleMutator extends DefaultMutator {
  setSkuAttribute (sku) {
    return `*${sku}*`
  }
}

const result = ExampleMutator.create({ sku: '42', test: 'ok' })
{
    sku: '*42*',
    test: 'ok'
}

const result = ExampleMutator.create({ sku: '42' })
{
    sku: '*42*'
}

const result = ExampleMutator.create({ test: 'ok' })
{
    test: 'ok'
}
```

You can also hydrate the object with new data

```javascript
const result = ExampleMutator.create({ test: 'ok', test2: 'also ok' })
{
    test: 'ok',
    test2: 'also ok'
}

result.hydrate({ sku: 43})
{
    test: 'ok',
    test2: 'also ok',
    sku: '*43*'
}

result.hydrate({ test: 'another text'})
{
    test: 'another text',
    test2: 'also ok',
    sku: '*43*'
}
```

[npm-url]: https://www.npmjs.com/package/@hckrnews/mutator
[npm-image]: https://img.shields.io/npm/v/@hckrnews/mutator.svg
[travis-url]: https://travis-ci.org/hckrnews/mutator
[travis-image]: https://img.shields.io/travis/hckrnews/mutator/main.svg
[coveralls-url]: https://coveralls.io/r/hckrnews/mutator
[coveralls-image]: https://img.shields.io/coveralls/hckrnews/mutator/main.svg
[scrutinizer-url]: https://scrutinizer-ci.com/g/hckrnews/mutator/?branch=main
[scrutinizer-image]: https://scrutinizer-ci.com/g/hckrnews/mutator/badges/quality-score.png?b=main
npm package: @hckrnews/object-converter
Description: Usage: ```javascript import makeConverter from '@hckrnews/object-converter'
Author: Pieter Wigboldus
Latest version: 0.1.11

# object-converter

Usage:
```javascript
import makeConverter from '@hckrnews/object-converter'

const converter = makeConverter({ fields })
const result = converter({ data, type: 'csv', outputType: 'buffer', subField: 'quantities', subItems: 'battery' })
```

You can set some fields with a name and what field(s) it should return.
And then you can send some data to the converter. (array of objects)

Fields:
```javascript
{
    name: 'Order number',
    field: data => `${data.order_id} / ${data.order_row_id_parsed}`
}
```

Data:
```javascript
[
  {
    order_id: 42,
    ...
  }
]
```

Types:
json, csv, xlsx

Output types:
buffer (e.g. express), string, array, ...
(https://github.com/SheetJS/sheetjs#output-type)
npm package: @hckrnews/openapi-dereference
Description: OpenAPI dereference
Author: Pieter Wigboldus
Latest version: 0.1.5
Deprecated: WARNING: This project has been renamed to @trojs/openapi-dereference. Install using @trojs/openapi-dereference instead.

# OpenAPI dereference

[![NPM version][npm-image]][npm-url] [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_openapi-dereference&metric=coverage)](https://sonarcloud.io/summary/new_code?id=hckrnews_openapi-dereference) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_openapi-dereference&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=hckrnews_openapi-dereference) 
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_openapi-dereference&metric=bugs)](https://sonarcloud.io/summary/new_code?id=hckrnews_openapi-dereference) [![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_openapi-dereference&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=hckrnews_openapi-dereference) [![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_openapi-dereference&metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=hckrnews_openapi-dereference) [![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_openapi-dereference&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=hckrnews_openapi-dereference)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_openapi-dereference&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=hckrnews_openapi-dereference) [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_openapi-dereference&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=hckrnews_openapi-dereference) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=hckrnews_openapi-dereference&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=hckrnews_openapi-dereference)

Dereference $ref pointers in JSONSchema or OpenAPI documents.

Zero dependencies. Synchronous core. Handles circular refs.

## Installation

`npm install @hckrnews/openapi-dereference`
or
`yarn add @hckrnews/openapi-dereference`

## Test the package

`npm run test`
or
`yarn test`

## How to use


```javascript
npm i @hckrnews/openapi-dereference

```

```javascript
import { dereferenceSync } from '@hckrnews/openapi-dereference';

const schemaWithRefs = {
  schemas: {
    Person: {
      type: 'object',
      properties: {
        name: {
          $ref: '#/schemas/Name',
        },
      },
    },
    Name: {
      type: 'string',
    },
  },
};

const schemaWithNoRefs = dereferenceSync(schemaWithRefs);
```

[npm-url]: https://www.npmjs.com/package/@hckrnews/openapi-dereference
[npm-image]: https://img.shields.io/npm/v/@hckrnews/openapi-dereference.svg
npm package: @hckrnews/openapi-routes
Description: OpenAPI routes
Author: Pieter Wigboldus
Latest version: 1.3.4

# OpenAPI routes

[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-stats] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Codecov Status][codecov-image]][codecov-url] [![Scrutinizer Code Quality][scrutinizer-image]][scrutinizer-url]

...

[downloads-image]: https://img.shields.io/npm/dm/@hckrnews/openapi-routes.svg
[npm-url]: https://www.npmjs.com/package/@hckrnews/openapi-routes
[npm-image]: https://img.shields.io/npm/v/@hckrnews/openapi-routes.svg
[npm-stats]: https://npm-stat.com/charts.html?package=@hckrnews/openapi-routes
[travis-url]: https://travis-ci.org/hckrnews/openapi-routes
[travis-image]: https://img.shields.io/travis/hckrnews/openapi-routes/main.svg
[coveralls-url]: https://coveralls.io/r/hckrnews/openapi-routes
[coveralls-image]: https://img.shields.io/coveralls/hckrnews/openapi-routes/main.svg
[codecov-url]: https://codecov.io/gh/hckrnews/openapi-routes
[codecov-image]: https://img.shields.io/codecov/c/github/hckrnews/openapi-routes.svg
[scrutinizer-url]: https://scrutinizer-ci.com/g/hckrnews/openapi-routes/?branch=main
[scrutinizer-image]: https://scrutinizer-ci.com/g/hckrnews/openapi-routes/badges/quality-score.png?b=main
npm package: @hckrnews/pdf2png
Description: Convert pdf to images (png,jpg)
Author: Pieter Wigboldus
Latest version: 0.4.0

# @hckrnews/ppt2pdf
Convert pdf to png or jpg.

If you want convert powerpoint files to png or jpg images, you can do it with this script.

## Requirements

The package requires the following software to be installed:

* imagemagick
* ghostscript

## Installation

    npm install @hckrnews/pdf2png

Debian/Ubuntu:

    sudo apt install imagemagick ghostscript

## Example usage

```
import Converter from '@hckrnews/pdf2png';

const converter = Converter.create({
    file:   'test/OPW 733 Tienduizend redenen.pdf',
    output: 'output/'
});

const result = converter.convert();
```

## Props

files: Array with the files.

output: Output folder.

customConverter: set a custom converter


## Test the package.

```
npm test
```

This will run all the tests in the test folder with mocha.

If you only want to check the eslint rules, just run.

```
npm run lint
```
npm package: @hckrnews/ppt2pdf
Description: Convert ppt to pdf
Author: Pieter Wigboldus
Latest version: 0.4.0

# @hckrnews/ppt2pdf
Convert ppt to pdf.

If you want convert powerpoint files to pdf, you can do it with this script.

## Requirements

The package requires the following software to be installed:

* LibreOffice

## Installation

    npm install @hckrnews/ppt2pdf

Debian/Ubuntu:

    sudo apt install libreoffice

## Example usage

```
import Converter from '../src/converter.js';

const converter = Converter.create({
    file:   'test/OPW 733 Tienduizend redenen.ppt',
    output: 'output/'
});

const result = converter.convertPptToPdf();
```

## Props

file: path to the file.

output: Output folder.

customConverter: set a custom converter


## Test the package.

```
npm test
```

This will run all the tests in the test folder with mocha.

If you only want to check the eslint rules, just run.

```
npm run lint
```
npm package: @hckrnews/standard
Description: JavaScript Standard Style with custom Hckr.News tweaks
Author: Pieter Wigboldus
Latest version: 0.2.1

# hckrstandard

JavaScript Standard Style with custom Hckr.News tweaks

The default standardjs lint rules: https://github.com/standard/eslint-config-standard/blob/master/.eslintrc.json

## Install

```
npm install @hckrnews/standard --global
```

## Usage
Use `hckrstandard` on the command line the same way you use `standard`:

```
Usage:
    hckrstandard <flags> [FILES...]

    If FILES is omitted, then all JavaScript source files (*.js, *.jsx) in the current
    working directory are checked, recursively.

    Certain paths (node_modules/, coverage/, vendor/, *.min.js, bundle.js, and
    files/folders that begin with '.' like .git/) are automatically ignored.

    Paths in a project's root .gitignore file are also automatically ignored.

Flags:
        --fix       Automatically fix problems
    -v, --verbose   Show rule names for errors (to ignore specific rules)
        --version   Show current version
    -h, --help      Show usage information

Flags (advanced):
        --stdin     Read file text from stdin
        --global    Declare global variable
        --plugin    Use custom eslint plugin
        --env       Use custom eslint environment
        --parser    Use custom js parser (e.g. babel-eslint)
```
npm package: @hcl-cdp-ta/cdp-node-sdk
Description: This repo is a NodeJS wrapper around the HCL CDP API. It provides a simple interface to send events to the HCL CDP server.
Author: Simon Pallister, HCL Software
Latest version: 1.0.3

## HCL CDP Node SDK

This repo is a NodeJS wrapper around the HCL CDP API. It provides a simple interface to send events to the HCL CDP server.

## Installation

```
npm install hcl-cdp-node-sdk
```

## Usage

Data can be sent in individual requests or in batches. The `sendEvent` method sends a single event, while the `sendBatchEvents` method sends multiple events at sequentially. Each method returns a promise that resolves to both the request object as well as the response from the HCL CDP server.

### Example Response

```
{
  request: {
    type: 'track',
    eventname: 'Test Track Event',
    userid: 'user1',
    properties: { prop1: 'value' }
  },
  response: {
    message: 'Data Processed successfully',
    id: '3a8535eb-dee7-411a-8d9f-113b7e822f7f'
  }
}
```

### Example Usage

```
import { ApiClient, ApiConfiguration, ApiRequest, Batch, EventType } from "@simonpallisterhcl/hclcdp-node-sdk"

const api = new ApiClient(new ApiConfiguration("", "")) // Add your API Key and Passkey

// api.setEndpoint("<endpoint URL>") //Optional if different from default endpoint (https://crux.dev.hxcd.now.hclsoftware.cloud)

const batch = new Batch()

batch.add(new ApiRequest(EventType.Identify, "Test Identify Event", "user1", { source: "batch" }))
batch.add(new ApiRequest(EventType.Track, "Test Identify Track", "user1", { source: "batch" }))

const event = new ApiRequest(EventType.Track, "Test Track Event", "user1", { source: "single" })

const main = async () => {
  console.log(await api.sendBatchEvents(batch))
  console.log(await api.sendEvent(event))
}

main()

```