open-index/open-npm huggingface dataset:
npm package: @kazeusagi/chat-app-types
Description: [![npm version](https://img.shields.io/npm/v/@kazeusagi/chat-app-types.svg)](https://www.npmjs.com/package/@kazeusagi/chat-app-types)
Latest version: 0.0.4

[![npm version](https://img.shields.io/npm/v/@kazeusagi/chat-app-types.svg)](https://www.npmjs.com/package/@kazeusagi/chat-app-types)

![skill icons](https://skillicons.dev/icons?i=nodejs,ts)

# Chat App Types

chat-app全体で利用する型情報を定義するパッケージ

> [!NOTE]
> 主に、APIコールに必要な引数の型やAPIのレスポンスの値の型等を定義する

## パッケージのインストール

`npm i @kazeusagi/chat-app-types`

## パッケージの更新

1. パッケージの内容を更新
1. `package.json` の `version` を更新
1. `cd package`
1. `npm login`
1. `npm publish`
npm package: @kazhord/node-async-retry
Description: Retry a function multiple times if it fails.
Author: Kazhord
Latest version: 1.0.0

# @kazhord/node-async-retry

Retry a function multiple times if it fails. 

## Installation
```sh
$ npm install @kazhord/node-async-retry
```

## Features
Usable in two ways :
- Until max retries is reached
- Until a condition is true

## To do
- Add more tests
- Add comments

## API
```js
import { retry } from '@kazhord/node-async-retry'
```

### Retry N times
```js
await retry(
    async () => {
      return 'test'
    },
    {
      retries: 3
    }
)
/*
'test'
*/
```

### Retry N times waiting T ms between each retry
```js
await retry(
    async () => {
      return 'test'
    },
    {
      retries: 3,
      delay: 1000,
    }
)
/*
'test'
*/
```

### Retry un condition is true
```js
await retry(
    async () => {
      return 'test'
    },
    {
      until: (e) => {
        return true
      }
    }
)
/*
'test'
*/
```

### Retry un condition is true waiting T ms between each retry
```js
await retry(
    async () => {
      return 'test'
    },
    {
      delay: 1000,
      until: (e) => {
        return true
      }
    }
)
/*
'test'
*/
```
npm package: @kazhord/node-clamav
Description: Heavily inspired from [kylefarris/clamscan](https://github.com/kylefarris/clamscan) and [NingLin-P/clamdjs](https://github.com/NingLin-P/clamdjs). Made to match my project needs.
Author: Kazhord
Latest version: 1.0.2

# @kazhord/node-clamav
Heavily inspired from [kylefarris/clamscan](https://github.com/kylefarris/clamscan) and [NingLin-P/clamdjs](https://github.com/NingLin-P/clamdjs). Made to match my project needs.


## Installation
```sh
$ npm install @kazhord/node-clamav
```

## Features
- Get ClamAV version
- Get ClamAV stats
- Update ClamAV
- Check ClamAV state
- Scan `Stream` and `Buffer`

## To do
- Add tests
- Add comments

## API
```js
import { Clamav } from '@kazhord/node-clamav'
[...]
const clamav = new Clamav({ host: '127.0.0.1', port: 3310 })
```

### Get ClamAV version
```js
await clamav.version([timeout=180000])
/*
{
  product: 'ClamAV 0.104.3',
  build: 26596,
  date: 2022-07-07T05:53:54.000Z
}
*/
```

### Get ClamAV stats
```js
await clamav.stats([timeout=180000])
/*
{
  pools: 1,
  state: 'VALID PRIMARY',
  threads: 'live 1  idle 0 max 10 idle-timeout 30',
  queue: 0,
  memstats: 'heap N/A mmap N/A used N/A free N/A releasable N/A pools 1 pools_used 1267.845M pools_total 1267.894M'
}
*/
```

### Update ClamAV
```js
await clamav.reload([timeout=180000])
/*
{
  reloading: true
}
*/
```

### Get ClamAV state
```js
await clamav.ping([timeout=180000])
/*
{ 
  alive: true, 
  latency: 4 
}
*/
```

### Scan `Stream`
```js
await clamav.scanner.scanStream(stream, [timeout=180000])
/*
{
  isInfected: false,
  viruses: [],
  raw: 'stream: OK\x00',
  timeout: false
}
*/
```

### Scan `Buffer`
```js
await clamav.scanner.scanBuffer(buffer, [chunkSize=64*1024], [timeout=180000])
/*
{
  isInfected: false,
  viruses: [],
  raw: 'stream: OK\x00',
  timeout: false
}
*/
```
npm package: @kazhord/node-isofs
Description: IsoFS extracted from [jvilk/BrowserFS](https://github.com/jvilk/BrowserFS) and adapted for NodeJS backend.
Author: Kazhord
Latest version: 1.0.0

# @kazhord/node-isofs
IsoFS extracted from [jvilk/BrowserFS](https://github.com/jvilk/BrowserFS) and adapted for NodeJS backend.

## Installation
```sh
$ npm install @kazhord/node-isofs
```

## Features
- Mount ISO file
- Unmount ISO file
- Read directory in ISO file
- Read file in ISO file

## To do
- Add more tests
- Add comments
- Fix and optimize some issues

## API
```js
import { IsoFS } from '@kazhord/node-isofs'
[...]
const isoFS = new IsoFS(filename)
```

### Mount/Unmount ISO
```js
let isoFS: IsoFS | undefined
try {
  isoFS = new IsoFS(filename)
  await isoFS.mountIso()
} finally {
  if (isoFS) {
    await isoFS.unmountIso()
  }
}
```

### Mount/Unmount ISO
```js
let isoFS: IsoFS | undefined
try {
  isoFS = new IsoFS(filename)
  await isoFS.mountIso()
} finally {
  if (isoFS) {
    await isoFS.unmountIso()
  }
}
```

### Get all files in selected directory and nested directories
```js
const fileFlatTree = isoFS.fileFlatTree('/')
/*
[
  {
    type: 'File',
    name: 'LICENSE',
    size: 6211,
    content: [Function: content]
  },
  [...]
  {
    type: 'File',
    name: 'README.md',
    size: 9494,
    content: [Function: content]
  },
  {
    type: 'File',
    name: '.gitignore',
    size: 431,
    content: [Function: content]
  }
]
*/
```

### Read specified directory or file
```js
const fileOrDirectory = isoFS.read('/')
/*
{
  type: 'Directory',
  name: '\x00',
  size: 2048,
  content: [Function: content] => Return a new directory item or a `Readable` if it's a file
}
*/
```
npm package: @kazhord/node-pdf-processor
Description: Generate PDF using HTML template and Chrome renderer.
Author: Kazhord
Latest version: 1.0.3

# @kazhord/node-pdf-processor
Generate PDF using HTML template and Chrome renderer.


## Installation
```sh
$ npm install @kazhord/node-pdf-processor
```

## Features
- Generate PDF from HTML template
- Beautiful report with CSS
- Inject dynamic content

## API
```js
import { PdfProcessor } from '@kazhord/node-pdf-processor'
[...]
const processor = new PdfProcessor()
```

### Process PDF
```js
const buffer = await processor.process(
            `<!DOCTYPE html>
            <html>
              <head>
                <meta charset="utf-8" />
              </head>
              <body>
                <h1>Test #{{ testNumber }}</h1>
              </body>
            </html>`,
            {
                testNumber: 12345,
            },
            `body {
                background-color: red;
                color: yellow;
            }
            `
        )
/*
<PDF buffer>
*/
```

### Close processor
```js
await processor.stop()
```
npm package: @kazion/create-app
Description: A cli tool to help you get started with graphql and rest api's with typescript
Author: Patrick
Latest version: 1.3.0

![alt text](create-app.png "Create App")

# Create App Cli

A nodejs cli tool that help generate Rest, Graphql, etc. backend application

## Contribute

Feel free to contribute to the repo on [Contribute](https://github.com/Kazion500/create-app-cli)

## General usage:

Using npm:

```shell
$ npx @kazion/create-app
```

Thanks for using the cli tool 🚀
npm package: @kazion/drizzle-utils
Description: A collection of utilities for working with Drizzle ORM
Author: Patrick Kabwe
Latest version: 1.0.0

# @kazion/drizzle-utils

This is a React package that provides a simple way to add Facebook login to your React application.

[![Release](https://github.com/patrickkabwe/drizzle-utils/actions/workflows/release.yml/badge.svg)](https://github.com/patrickkabwe/drizzle-utils/actions/workflows/release.yml)

### Installation

To install this package, run the following command in your terminal:

```bash
pnpm install @kazion/drizzle-utils
```

### Usage

To use this package in your application, follow the steps below:

#### Drizzle `or` Filter Query

```typescript
import { drizzleOrFilterQuery } from "@kazion/drizzle-utils";

// using the query builder
const [staff] = await db
  .update(staffs)
  .set(payload)
  .where(drizzleOrFilterQuery(staffs, { id }))
  .returning();

// using the query api
return db.query.staffs.findMany({
  where: drizzleOrFilterQuery(staffs, where),
});
```

#### Drizzle `and` Filter Query

```typescript
import { drizzleAndFilterQuery } from "@kazion/drizzle-utils";

// using the query builder
const [staff] = await db
  .update(staffs)
  .set(payload)
  .where(drizzleAndFilterQuery(staffs, { id }))
  .returning();

// using the query api
return db.query.staffs.findMany({
  where: drizzleAndFilterQuery(staffs, where),
});
```

### Testing

To run the tests for this package, use the following command:

```bash
pnpm test
```

### Contributing

If you want to contribute to this project, please follow the steps below:

1. Fork this repository.
2. Create a new branch: `git checkout -b your-branch-name`.
3. Make your changes and commit them: `git commit -m 'your message'`.
4. Push to the original branch: `git push origin your-branch-name`.
5. Create a pull request.

### License

This project is licensed under the MIT license.
npm package: @kazion/fcm-node-http
Description: A Node.js client for the [FCM HTTP v1 API](https://firebase.google.com/docs/cloud-messaging/http-server-ref).
Latest version: 1.1.1

# fcm-node-http

A Node.js client for the [FCM HTTP v1 API](https://firebase.google.com/docs/cloud-messaging/http-server-ref).

[![Build Status](https://travis-ci.org/cedadev/fcm-node-http.svg?branch=main)](https://travis-ci.org/cedadev/fcm-node-http)
[![Coverage Status](https://coveralls.io/repos/github/cedadev/fcm-node-http/badge.svg?branch=master)](https://coveralls.io/github/cedadev/fcm-node-http?branch=main)

## Installation

npm

```bash
npm install @kazion/fcm-node-http
```

yarn

```bash
yarn add @kazion/fcm-node-http
```

## Usage

Example usage of the library [Demo](https://github.com/Kazion500/fcm-node-http/tree/main/example)

```js
import { FCM } from "@kazion/fcm-node-http";

const path_to_private_key = "path/to/private_key.json";

const fcm = new FCM(path_to_private_key);
```

### Send a message

```ts
const fcmToken = "ee8-TV2BT7ucVYjesxPXdD:APA91bFQvY5sZdn6n1PW3kr...";

const message = {
  notification: {
    body: "body",
    title: "title",
    image:
      "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a7/React-icon.svg/120px-React-icon.svg.png",
  },
};
await fcm.send(fcmToken, message);
```

### Send a message to multiple tokens

```ts

const fcmToken1 = "ee8-TV2BT7ucVYjesxPXdD:APA91bFQvY5sZdn6n1PW3kr...";
const fcmToken2 = "ee8-TV2BT7ucVYjesxPXdD:APA91bFQvY5sZdn6n1PW3kr...";

const message = {
  notification: {
    body: "body",
    title: "title",
    image:
      "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a7/React-icon.svg/120px-React-icon.svg.png",
  },
};
await fcm.sendAll([fcmToken1, fcmToken2], message);

main();
```

Feel free to contribute to this project by submitting a [pull request](https://github.com/Kazion500/fcm-node-http).

## Acknowledgements

This project was inspired by [fcm-node](https://www.npmjs.com/package/fcm-node)

## License

This project is licensed under the terms of the MIT license.

## Support

If you have any questions, please [open an issue](https://github.com/Kazion500/fcm-node-http/issues)

## Author & Maintainer

This project was created by [Patrick Kabwe](https://github.com/Kazion500)
npm package: @kazion/react-facebook-login
Description: Facebook OAuth login  using the Facebook Javascript SDK
Author: Patrick Kabwe
Latest version: 1.1.0

# @kazion/react-facebook-login

This is a React package that provides a simple way to add Facebook login to your React application.

[![Release](https://github.com/patrickkabwe/react-facebook-login/actions/workflows/release.yml/badge.svg)](https://github.com/patrickkabwe/react-facebook-login/actions/workflows/release.yml)
[![Coverage](https://github.com/patrickkabwe/react-facebook-login/actions/workflows/test.yml/badge.svg)](https://github.com/patrickkabwe/react-facebook-login/actions/workflows/test.yml)
<br>
[![mit licence](https://img.shields.io/dub/l/vibe-d.svg?style=for-the-badge)](https://github.com/patrickkabwe/react-facebook-login/blob/main/LICENSE)
[![npm version](https://img.shields.io/npm/v/@kazion/react-facebook-login?style=for-the-badge)](https://www.npmjs.com/package/@kazion/react-facebook-login)

### Installation

To install this package, run the following command in your terminal:

```bash
pnpm install @kazion/react-facebook-login
```

### Usage

To use this package in your React application, import it as follows:

#### Wrap your app with FacebookProvider

```javascript
import { FacebookProvider } from "@kazion/react-facebook-login";
import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App.tsx";
import "./index.css";

ReactDOM.createRoot(document.getElementById("root")!).render(
  <React.StrictMode>
    <FacebookProvider
      appId="your-app-id"
      version="v19.0"
    >
      <App />
    </FacebookProvider>
  </React.StrictMode>
);

```

#### Login Button

```javascript
import FacebookLogin from "@kazion/react-facebook-login";
```

Then, you can use the `FacebookLogin` component in your application as follows:

```javascript
const App = () => {
  const handleResponse = (response) => {
    console.log(response);
  };

  return <FacebookLogin onSuccess={handleResponse} />;
};

export default App;
```

#### Login using Hook

```javascript
import { useFacebookLogin } from "@kazion/react-facebook-login";

const App = () => {
  const login = useFacebookLogin({
    onSuccess: (response) => {
      console.log(response);
    },
  });

  return <button onClick={() => login()}>Login</button>;
};

export default App;
```

### Testing

To run the tests for this package, use the following command:

```bash
pnpm test
```

### Contributing

If you want to contribute to this project, please follow the steps below:

1. Fork this repository.
2. Create a new branch: `git checkout -b your-branch-name`.
3. Make your changes and commit them: `git commit -m 'your message'`.
4. Push to the original branch: `git push origin your-branch-name`.
5. Create a pull request.

### License

This project is licensed under the MIT license.