open-index/open-npm huggingface dataset:
npm package: @harukoto/discord.jsk-selfbot
Description: This project is to make jishaku from discord.py available for discord.js.
Author: Harukoto
Latest version: 1.0.3

# discord.jsk, discord.js jishaku (jishaku for discord.js)

This project is to make jishaku from discord.py available for discord.js.

The original jishaku (discord.py) is here: https://github.com/Gorialis/jishaku
The original discord.jsk is here: https://www.npmjs.com/package/@uplc/discord.jsk

## Installation

1. install using npm, pnpm, or yarn
```sh
# npm
npm install @uplc/discord.jsk

# pnpm
pnpm install @uplc/discord.jsk

# yarn
yarn add @uplc/discord.jsk
```

2. add discord.jsk to discord.js

Here, a sample bot is created. **Discord.jsk requires Message Content Intent, please enable Message Content Intent on Discord Developer Portal before using discord.jsk.**

```js
// https://discordjs.guide/creating-your-bot/main-file.html
// Require the necessary discord.js classes
const { Client, Events, GatewayIntentBits } = require("discord.js");
const { token } = require("./config.json");

// Require the necessary discord.jsk class
const djsk = require("@uplc/discord.jsk");

// Create a new client instance
// Important! Message Content Intent must be enabled to use djsk.
const client = new Client({
  intents: [
    GatewayIntentBits.MessageContent,
    /* Required for guild use */
    GatewayIntentBits.Guilds,
    GatewayIntentBits.GuildMessages,
    GatewayIntentBits.GuildMessageReactions,
  ],
});

// discord.jsk object
let jsk = {};

// When the client is ready, run this code (only once).
// The distinction between `client: Client<boolean>` and `readyClient: Client<true>` is important for TypeScript developers.
// It makes some properties non-nullable.
client.once(Events.ClientReady, (readyClient) => {
  // init discord.jsk
  jsk = new djsk(client, {
    encoding: "UTF-8" /* Shift-JIS is recommended for Japanese environment */,
    useableUserId: ["0", "1"] /* Users who can use the bot */,
  });

  console.log(`Ready! Logged in as ${readyClient.user.tag}`);
});

client.on(Events.MessageCreate, (message) => jsk.onMessageCreated(message));

client.login(token)
```

## Usage

This section describes how to use each command.

### .jsk sh \<command\>

This command is a command to use shell commands. This feature currently only works on **Windows. **

<command> is the command to execute.

### .jsk js \<code\>

This command executes JavaScript code.

Please fill in the \<code\> with the code you want to run.

## Credits

| Name | Description |
| ---------- | -------------------------------- |
| discord.js | the base part of discord.jsk |
| jishaku | source of this project |
| TypeScript | Language used for discord.jsk |
npm package: @harun-ims/common
Description: Error class
Author: Md Harun Or Rashid
Latest version: 1.0.1

# @harun-ims/common

A simple yet powerful package for handling HTTP errors with custom error classes in Node.js applications.

## Installation

Install the package via npm:

```bash
npm install @harun-ims/common
```

### Usage

This package provides custom error classes that extend the base `ApiError` class, making it easy to manage and throw HTTP-related errors in your application.

### Importing

You can import the error classes directly:

```js
const { NotFoundException, BadRequestException } = require("@harun-ims/common");
```

Or, if you are using ES Modules:

```js
import { NotFoundException, BadRequestException } from "@harun-ims/common";
```

### Example

Here’s an example of how to use these error classes in an Express.js application:

```js
const express = require("express");
const { NotFoundException, BadRequestException } = require("@harun-ims/common");

const app = express();

app.get("/some-route", (req, res, next) => {
  try {
    // Some logic here...
    throw new NotFoundException("The requested resource was not found.");
  } catch (error) {
    next(error);
  }
});

app.use((err, req, res, next) => {
  if (err instanceof NotFoundException) {
    return res.status(err.httpStatusCode).json({
      message: err.message,
      details: err.details,
      appCode: err.appCode,
      timestamp: err.timestamp,
    });
  }

  // Handle other types of errors...
  res.status(500).json({ message: "Internal Server Error" });
});

app.listen(3000, () => {
  console.log("Server is running on port 3000");
});
```

### Available Exceptions

The following exception classes are available for use:

- `ApiError`: The base class for all errors.
- `BadGatewayException`: Corresponds to HTTP 502.
- `BadRequestException`: Corresponds to HTTP 400.
- `ConflictException`: Corresponds to HTTP 409.
- `ForbiddenException`: Corresponds to HTTP 403.
- `InternalServerErrorException`: Corresponds to HTTP 500.
- `NotFoundException`: Corresponds to HTTP 404.
- `NotImplementedException`: Corresponds to HTTP 501.
- `ServiceUnavailableException`: Corresponds to HTTP 503.
- `TooManyRequestsException`: Corresponds to HTTP 429.
- `UnauthorizedException`: Corresponds to HTTP 401.
- `UnprocessableEntityException`: Corresponds to HTTP 422.

### Dependency

This package depends on the `http-status-codes` library, which provides constants for HTTP status codes and reason phrases.

### Contributing

If you find any issues or have suggestions for improvements, feel free to create an issue or submit a pull request to the repository.

### License

This package is licensed under the MIT License. See the LICENSE file for more information.

### Author

- Md Harun Or Rashid
- harun.ru.cse@gmail.com
- https://harun-dev.vercel.app
npm package: @haruri/use-confirm
Description: React Hook to ask the user for a confirmation before executing a function.
Author: eunyoung
Latest version: 1.0.0

# @haruri/use-confirm

React Hook to ask the user for a confirmation before executing a function.

## Installation

#### yarn

`yarn add @haruri/use-confirm`

#### npm

`npm i @haruri/use-confirm`

## Usage

```js
import React from "react";
import useConfirm from "@haruri/use-confirm";

function App() {
  const deleteWorld = () => console.log("Deleting world...");
  const confirmDelete = useConfirm("Are you sure?", deleteWorld);
  return <button onClick={confirmDelete}>Delete the world</button>;
}
```

### Arguments

| Argument  | Type     | Description                                         | Required |
| --------- | -------- | --------------------------------------------------- | -------- |
| message   | string   | Message to show the user on the confirmation propmt | yes      |
| onConfirm | function | Function to be executed when the user confirms      | yes      |
| onCancel  | function | Function to be executed when the user cancels       | no       |

### Return

| Return value | Type     | Description                                    | Default value |
| ------------ | -------- | ---------------------------------------------- | ------------- |
| function     | function | Function wrapped around the confirmation logic | null          |
npm package: @harurow/icon-resize
Description: A CLI tool for resizing icon images with customizable dimensions and automatic file watching for changes. Ideal for managing and updating icon assets efficiently.
Author: Harurow
Latest version: 1.0.4

# @harurow/icon-resize

This project is a CLI tool for resizing images. It is designed to be simple and efficient, allowing you to resize images to various sizes. It also supports automatic processing when files are updated by monitoring changes.

## Features

- Resizes images to the specified size.
- Monitors file changes and automatically resizes on update.
- Supports overwriting existing files with the `--force` option.
- Allows specifying multiple sizes.
- Custom output directory configuration.

## Installation

To use this tool, you need to have [Node.js](https://nodejs.org/) installed. Once Node.js is set up, you can install the tool globally using the following command:

```bash
npm install -g icon-resize
```

Alternatively, you can run the tool using npx without installing it globally:

```bash
npx @harurow/icon-resize <file-path> [options]
```

## Usage

### Basic Command

```bash
npx icon-resize <file-path> [options]
```

### Options

- `--output-dir=<dir>`: Required. Specifies the output directory where the resized images will be saved.
- `--size=<size>`: Specifies the size for resizing (can be used multiple times). Example: `--size=32`. Default sizes are `16, 32, 64, 128`.
- `--force, -f`: Overwrites existing files in the output directory. Example: `--force`.
- `--watch, -w`: Watches for file changes and automatically resizes when the file changes. Example: `--watch`.
- `--help, -h`: Shows this help message.

### Examples

1. Resize an image to 32x32 pixels and save it to a directory:

```bash
npx icon-resize ./path/to/image.png --size=32 --output-dir=output-dir
```

2. Monitor an image file for changes and automatically resize on change:

```bash
npx icon-resize ./path/to/image.png --size=64 --output-dir=output-dir --watch
```

3. Resize an image to multiple sizes and overwrite existing files:

```bash
npx icon-resize ./path/to/image.png -s 16 -s 128 -o output-dir -f
```

## Development

### Prerequisites

* Node.js
* npm

### Setup

Clone the repository:

```bash
git clone https://github.com/yourusername/icon-resize.git
cd icon-resize
npm install
```

### Running Tests

You can run tests with the following command:

```bash
npm test
```

The tests are located in the tests directory. During testing, images are automatically copied to a temporary directory, and the output directory is cleared for each test.

## License

This project is licensed under the MIT License. See the LICENSE file for details.
npm package: @harurow/j-quants-doc-mcp
Description: J-Quants API documentation MCP server
Author: harurow
Latest version: 1.0.0

# @harurow/j-quants-doc-mcp

J-Quants APIのドキュメントを提供するMCPサーバー。Claude DesktopなどのMCPクライアントから、J-Quants APIのエンドポイント検索、詳細情報の取得、実装パターンの参照、FAQ回答などの機能を利用できます。

> **Note**
> 本プロジェクトは [J-Quants/j-quants-doc-mcp](https://github.com/J-Quants/j-quants-doc-mcp)（(株)JPX総研による公式リポジトリ）を fork し、Python 実装を Node.js (TypeScript) に書き換えたものです。
> 元プロジェクトは MIT License で公開されており、本リポジトリもそのライセンスを継承しています。

## 必須要件

- Node.js 18以上

## 起動方法

### npxで起動（推奨・インストール不要）

```bash
npx @harurow/j-quants-doc-mcp
```

インストールなしでそのまま実行できます。

### グローバルインストールして起動

```bash
npm install -g @harurow/j-quants-doc-mcp

j-quants-doc-mcp
```

### ローカルビルドで起動

```bash
git clone https://github.com/harurow/j-quants-doc-mcp.git
cd j-quants-doc-mcp
npm install
npm run build
node dist/index.js
```

## Claude Desktopから使用

`claude_desktop_config.json`に以下を追加:

```json
{
  "mcpServers": {
    "j-quants-doc-mcp": {
      "command": "npx",
      "args": ["-y", "@harurow/j-quants-doc-mcp"]
    }
  }
}
```

ローカルビルドを使用する場合:
```json
{
  "mcpServers": {
    "j-quants-doc-mcp": {
      "command": "node",
      "args": ["/path/to/j-quants-doc-mcp/dist/index.js"]
    }
  }
}
```

設定ファイルの場所:
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`

## Cursorから使用

メニューバー「Cursor」→「Preferences」→「Cursor Settings」を開き、\
左のメニュー「Tools & MCP」を選択し、「New MCP Server」をクリック。\
開かれたJSONファイル(`~/.cursor/mcp.json`)に以下を追加:

```json
{
  "mcpServers": {
    "j-quants-doc-mcp": {
      "command": "npx",
      "args": ["-y", "@harurow/j-quants-doc-mcp"]
    }
  }
}
```

以上の設定で、AIクライアントにてMCPサーバーを利用する準備が完了しました。

## 開発

```bash
# 依存関係のインストール
npm install

# ビルド
npm run build

# 開発用（tsx で直接実行）
npm run dev

# テスト
npm test
```

## トラブルシューティング

### Claude Desktopで認識されない

1. 設定ファイルのJSONが正しいか確認
2. Claude Desktopを再起動
3. `npx @harurow/j-quants-doc-mcp` をターミナルで直接実行してエラーがないか確認

### 環境変数

- `JQUANTS_BASE_URL`: APIドキュメントの取得元URLを上書きする場合に使用

## クレジット

本プロジェクトは以下のリポジトリを fork して作成されています:

- **元リポジトリ**: [J-Quants/j-quants-doc-mcp](https://github.com/J-Quants/j-quants-doc-mcp)
- **著作権者**: JPX Market Innovation & Research, Inc.
- **ライセンス**: MIT License

## 関連リンク

- [J-Quants API公式ドキュメント](https://jpx-jquants.com/spec)
- [Model Context Protocol (MCP)](https://modelcontextprotocol.io/)
- [Claude Desktop](https://claude.ai/download)
- [Cursor](https://cursor.com/ja)
npm package: @harusame0616/pino-newrelic-log-api-transport
Description: pino transport for newrelic log api
Author: harusame0616
Latest version: 0.1.0

# pino-newrelic-log-api-transport

A [Pino v7+ transport](https://getpino.io/#/docs/transports?id=v7-transports) to send log to newrelic with [Logs API](https://docs.newrelic.com/docs/logs/log-api/introduction-log-api/).

**Caution**

```
newrelic has an automatic log forwarding feature.
Consider using the official nodejs agent.
https://docs.newrelic.com/jp/docs/apm/agents/nodejs-agent/installation-configuration/install-nodejs-agent
```

If for some reason you cannot use the automatic log forwarding feature with nodejs agent, please use it.

## Installation

```bash
pnpm  @harusame0616/pino-newrelic-log-api-transport
```

## Usage

```ts
import pino from 'pino';
import {
  NewrelicLogAPITransportOption,
  endpointEnum,
} from '@harusame0616/pino-newrelic-log-api-transport';

const options: NewrelicLogAPITransportOption = {
  // licenseKey: <YOUR_LICENSE_KEY> or set NEWRELIC_LICENSE_KEY in environment variables
  endpoint: endpointEnum.us,
};

const logger = pino({
  messageKey: 'message',
  errorKey: 'error',
  level: 'info',
  base: {
    entity: {
      // your app name
      name: process.env.NEWRELIC_APP_NAME,
    },
  },
  formatters: {
    level: (label) => ({ level: label }),
  },
  transport: {
    target: '@harusame0616/pino-newrelic-log-api-transport',
    options: options,
  },
});

logger.info('info level log');
```

**※ If you are using the nextjs app router you may need to add "pino" to serverComponentsExternalPackages in next.config.**

https://github.com/vercel/next.js/discussions/46987#discussioncomment-6986115

and run bellow

```bash
NEWRELIC_LICENSE_KEY=YOUR_LICENSE NEWRELIC_APP_NAME=YOUR_APP_NAME node YOUR_APP
```
npm package: @harutakax/grpc-health-check
Description: A simple and efficient TypeScript package for performing gRPC health checks
Latest version: 0.2.0

# @harutakax/grpc-health-check

A simple and efficient TypeScript package for performing gRPC health checks using the standard "GRPC Health Checking
Protocol".

## Features

- Easy-to-use API for gRPC health checks
- Supports both secure and insecure connections
- Implements the standard gRPC health checking protocol
- Written in TypeScript for better type safety and developer experience

## Installation

There are NPM and JSR packages available.

- npm: https://www.npmjs.com/package/@harutakax/grpc-health-check
- JSR: https://jsr.io/@harutakax/grpc-health-check

````bash
# For Node.js
$ npm install @harutakax/grpc-health-check
# For Deno
$ deno add jsr:@harutakax/grpc-health-check

## Usage

```typescript
import { healthCheck } from "@harutakax/grpc-health-check"

async function checkServerHealth() {
  const result = await healthCheck("localhost:50051", true)
  if (result.success) {
    console.log("success")
  } else {
    console.log(`error: ${result.message}`)
  }
}

checkServerHealth()
````

Health checks are performed by calling the healthCheck function with a URL. The response includes success information,
and an error message if the check fails.

## API Reference

### healthCheck(url: string, insecure: boolean = false)

Performs a health check on the specified gRPC server.

- url: The address and port number of the gRPC server. The port number is optional; if omitted, 443 is used by default
  (e.g., 'localhost:50051').
- insecure(optional): Set to true to use an insecure connection. Default is false.

Returns a Promise that resolves to a Result object indicating the success or failure of the health check.

```typescript
type Result = {
  success: boolean
  message?: string
}
```

- success: Indicates whether the health check was successful.
- message: Error message (only present when success is false).

## Requirements

Node.js >= 22.x or Deno >= 2.x

## License

This project is licensed under the MIT License - see the LICENSE file for details.

## Acknowledgements

This package uses the standard gRPC health checking protocol as defined in the gRPC Health Checking Protocol.
npm package: @harv46/valid-input
Description: This npm package includes an input box with built-in validation and displays errors.
Latest version: 0.0.6

# valid-input

This npm package includes an input box with built-in validation and displays errors.

![Valid-Input demo](demo.gif)

## Installation

```
npm install @harv46/valid-input
```

You can import the library directly to components

```
<script>
import { VInput } from "@harv46/valid-input";
import "@harv46/valid-input/dist/style.css";
</script>

```

## Basic usage

```js
<template>
    <div>
        <VInput v-model="inputValue" :validationType="`email`">Email</VInput>
    </div>
</template>

<script>
import { VInput } from "@harv46/valid-input";
import "@harv46/valid-input/dist/style.css";

export default {
    components: {
        VInput,
    },

    data() {
        return {
            inputValue: "",
        };
    },
};
</script>
```

### Props

| Prop             | Description                                                                  | Default |
| ---------------- | ---------------------------------------------------------------------------- | ------- |
| `type`           | Input type                                                                   | `text`  |
| `minLength`      | Minimum length validation                                                    | `0`     |
| `maxLength`      | Maximum length validation                                                    | `500`   |
| `required`       | Required validation                                                          | `false` |
| `validationType` | Type of validation using                                                     |
| `regex`          | Validation regex - if `validationType = 'regex'` See [usage](#regex-example) |
| `placeholder`    | The input placeholder attribute                                              |

## validationType values

-   email - Accepts valid email addresses.
-   alpha -Accepts only alphabet characters.
-   alphaNum - Accepts only alphanumerics.
-   numeric - Accepts only numerics. String numbers are also numeric.
-   regex - Accepts valid regular expressions, also should provide :regex property.

### Regex example

```js
<template>
    <div>
        <VInput
            v-model="inputValue"
            :minLength="4"
            :maxLength="10"
            :placeholder="Username"
            :validationType="`regex`"
            :regex="/[a-z]+/g"
            >Username</VInput
        >
    </div>
</template>

<script>
import { VInput } from "../../src/main";
import "../../dist/style.css";

export default {
    components: {
        VInput,
    },

    data() {
        return {
            inputValue: "",
        };
    },
};
</script>
```
npm package: @harvard-dce/player-router
Description: Minimal module for the browser that sends seeking parameters from a hashtag route to a callback.
Author: Jim Kang
Latest version: 1.1.0

player-router
=============

Minimal module for the browser that handles hashtag routing for the Harvard DCE video player. (Currently only needs to handle seek-related routing.)

Intended for use with Browserify.

Installation
------------

    npm install player-router

Usage
-----


    var initPlayerRouter = require('player-router');

    initPlayerRouter({
      seeking: {
        seekParamName: 'range',
        seekResponder: seekToTime
      }
    });

    function seekToTime(startTime, endTime) {
      mediaElement.currentTime = startTime;
    }

Now when the user goes to yourserver.com/yourpath#range=10 in the browser, `seekToTime` will be called with 10 as the startTime.

If the user goes to yourserver.com/yourpath#range=10-16, 10 and 16 will be passed to seekToTime.

Tests
-----

Run tests with `make test`.

Run Chrome tests with `make test-chrome` and run Firefox tests with `make test-firefox`.

License
-------

The MIT License (MIT)

Copyright (c) 2016 President and Fellows of Harvard College

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.