open-index/open-npm huggingface dataset:
npm package: @pinhadev/pinha-quiz-builder-pkg
Description: Quiz and QuizBuilder components for Next.js projects
Latest version: 0.1.3

# pinha-quiz-builder

Quiz and QuizBuilder components for Next.js projects.

## Install

```bash
npm install pinha-quiz-builder
```

## Usage

### QuizBuilder

Build a quiz and get JSON. Use `onChange` to capture the quiz data.

```tsx
import { QuizBuilder } from "pinha-quiz-builder";

export default function BuilderPage() {
  const handleChange = (data) => {
    console.log(data);
    // Save to file, API, or state
  };
  return <QuizBuilder onChange={handleChange} />;
}
```

### Quiz

Render a quiz from JSON produced by QuizBuilder.

```tsx
import { Quiz } from "pinha-quiz-builder";
import quizData from "./my-quiz.json";

export default function QuizPage() {
  return (
    <Quiz
      data={quizData}
      onSubmit={(answers) => console.log(answers)}
    />
  );
}
```

## Quiz JSON shape

```json
{
  "id": "uuid",
  "config": {},
  "quizes": [
    {
      "id": 1,
      "title": "Question title",
      "subtitle": "Optional subtitle",
      "type": "basic-numeric"
    },
    {
      "id": 2,
      "title": "Slider question",
      "subtitle": "subtitle",
      "type": "basic-slider",
      "sliderParams": {
        "min": 0,
        "max": 100,
        "inputType": "int",
        "prefix": "Rp.",
        "suffix": "/unit"
      }
    }
  ]
}
```

Question types: `basic-numeric`, `basic-text`, `basic-options`, `basic-slider`.

## Tailwind CSS

The package uses **Tailwind utility classes** for styling. It does **not** bundle Tailwind or list it as a dependency.

- **Your app** must have Tailwind installed and configured.
- **Include the package in Tailwind’s `content`** so the classes used by the package are generated:

```js
// tailwind.config.js
module.exports = {
  content: [
    "./app/**/*.{js,ts,jsx,tsx}",
    "./node_modules/pinha-quiz-builder/dist/**/*.{js,mjs}",
  ],
  theme: { extend: {} },
  plugins: [],
};
```

The package “inherits” your project’s Tailwind version; no separate Tailwind dependency is needed in the package.

## Build

```bash
cd pinha-quiz-builder
npm install
npm run build
```
npm package: @pinheng/yanxuan-plugin
Description: [![NPM version](https://img.shields.io/npm/v/@pinheng/yanxuan-plugin.svg?style=flat)](https://npmjs.org/package/@pinheng/yanxuan-plugin) [![NPM downloads](http://img.shields.io/npm/dm/@pinheng/yanxuan-plugin.svg?style=flat)](https://npmjs.org/package/@pin
Latest version: 0.0.3

# @pinheng/yanxuan-plugin

[![NPM version](https://img.shields.io/npm/v/@pinheng/yanxuan-plugin.svg?style=flat)](https://npmjs.org/package/@pinheng/yanxuan-plugin)
[![NPM downloads](http://img.shields.io/npm/dm/@pinheng/yanxuan-plugin.svg?style=flat)](https://npmjs.org/package/@pinheng/yanxuan-plugin)

## 构建目的

### 构建符合标准的制品 

after_build.ts

### 应用各个环境的参数

MUSE_ENV

## Install

```bash
$ npm install
```

```bash
$ npm run dev
$ npm run build
```

## Options

TODO

## LICENSE

MIT
npm package: @pinia-plugin-persistedstate/hmr
Description: > Override for Pinia's `acceptHMRUpdate`
Latest version: 0.2.0
Deprecated: HMR support is now natively supported since ^3.2.0

# `@pinia-plugin-persistedstate/hmr`

> Override for Pinia's `acceptHMRUpdate`

## 🚀 Quickstart

1. Install with your favorite package manager:
   - **pnpm** : `pnpm i -D @pinia-plugin-persistedstate/hmr`
   - npm : `npm i -D @pinia-plugin-persistedstate/hmr`
   - yarn : `yarn add -D @pinia-plugin-persistedstate/hmr`

2. Replace `acceptHMRUpdate` in your store definition file with:
```ts
import { defineStore } from 'pinia'
import { acceptHMRUpdateWithHydration } from '@pinia-plugin-persistedstate/hmr'

const useStore = defineStore('store', {
  // ...
})

if (import.meta.hot)
  import.meta.hot.accept(acceptHMRUpdateWithHydration(useStore, import.meta.hot))
```

## ⚠️ Warning

This is a copy/paste of Pinia's `acceptHMRUpdate` function that triggers `$hydrate` on HMR update. Use at your own risk. :)

## 📝 License

Copyright © 2022 [Sacha Bouillez](https://github.com/prazdevs).  
This project is under [MIT](https://github.com/prazdevs/pinia-plugin-persistedstate/blob/main/LICENSE) license.
npm package: @pinia-plugin-persistedstate/nuxt
Description: > Nuxt 3 module
Latest version: 1.2.1
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# `@pinia-plugin-persistedstate/nuxt`

> Nuxt 3 module

## 🚀 Quickstart

1. Install with your favorite package manager:
   - **pnpm** : `pnpm i -D @pinia-plugin-persistedstate/nuxt`
   - npm : `npm i -D @pinia-plugin-persistedstate/nuxt`
   - yarn : `yarn add -D @pinia-plugin-persistedstate/nuxt`

2. Add the plugin to nuxt config:
```ts
export default defineNuxtConfig({
  modules: [
    '@pinia/nuxt', // needed
    '@pinia-plugin-persistedstate/nuxt',
  ]
})
```

## 🔧 Configuration

Usage and configuration informations can be found in [the documentation](https://prazdevs.github.io/pinia-plugin-persistedstate/frameworks/nuxt-3.html)

## 📝 License

Copyright © 2022 [Sacha Bouillez](https://github.com/prazdevs).
This project is under [MIT](https://github.com/prazdevs/pinia-plugin-persistedstate/blob/main/LICENSE) license.
npm package: @pinia/colada-devtools
Description: Devtools for Pinia Colada
Author: Eduardo San Martin Morote
Latest version: 0.4.5

# Pinia Colada Devtools

## Development

```sh
pnpm run dev
```

## Build and test

Build the package:

```sh
pnpm run build
```

Then test it on the playground (root folder):

```sh
pnpm run play # at root
```
npm package: @pinia/colada-nuxt
Description: Pinia Colada Nuxt module
Latest version: 0.3.2

<h1>
  <img width="64" src="https://github.com/posva/pinia-colada/assets/664177/02011637-f94d-4a35-854a-02f7aed86a3c" alt="Pinia Colada logo">
  Pinia Colada
</h1>

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![License][license-src]][license-href]
[![Nuxt][nuxt-src]][nuxt-href]

- [✨ &nbsp;Release Notes](/nuxt/CHANGELOG.md)
- [📚 &nbsp;Documentation](https://pinia-colada.esm.dev/nuxt.html)
<!-- - [🏀 Online playground](https://stackblitz.com/github/your-org/@pinia/colada-nuxt?file=playground%2Fapp.vue) -->

Add the Pinia Colada Module to handle SSR and install Pinia Colada in your Nuxt application.

## Quick Setup

Install the module to your Nuxt application with one command:

```bash
npx nuxi module add @pinia/colada-nuxt
```

That's it! You can now use Pinia Colada in your Nuxt app ✨

## Contribution

<details>
  <summary>Local development</summary>

```bash
# Install dependencies
pnpm install

# Generate type stubs
pnpm run dev:prepare

# Develop with the playground
pnpm run dev

# Build the playground
pnpm run dev:build

# Run ESLint
pnpm run lint

# Run Vitest
pnpm run test
pnpm run test:watch

# Release new version
pnpm run release
```

</details>

<!-- Badges -->

[npm-version-src]: https://img.shields.io/npm/v/@pinia/colada-nuxt/latest.svg?style=flat&colorA=020420&colorB=00DC82
[npm-version-href]: https://npmjs.com/package/@pinia/colada-nuxt
[npm-downloads-src]: https://img.shields.io/npm/dm/@pinia/colada-nuxt.svg?style=flat&colorA=020420&colorB=00DC82
[npm-downloads-href]: https://npmjs.com/package/@pinia/colada-nuxt
[license-src]: https://img.shields.io/npm/l/@pinia/colada-nuxt.svg?style=flat&colorA=020420&colorB=00DC82
[license-href]: https://npmjs.com/package/@pinia/colada-nuxt
[nuxt-src]: https://img.shields.io/badge/Nuxt-020420?logo=nuxt.js
[nuxt-href]: https://nuxt.com
npm package: @pinia/colada-plugin-auto-invalidate
Description: Automatically invalidate queries after mutations in Pinia Colada
Author: Eduardo San Martin Morote
Latest version: 0.0.2

<h1>
  <img height="76" src="https://github.com/posva/pinia-colada/assets/664177/02011637-f94d-4a35-854a-02f7aed86a3c" alt="Pinia Colada logo">
  Pinia Colada Retry
</h1>

<a href="https://npmjs.com/package/@pinia/colada-plugin-retry">
  <img src="https://badgen.net/npm/v/@pinia/colada-plugin-retry/latest" alt="npm package">
</a>

Retry failed queries or mutations with your Pinia Colada.

## Installation

```sh
npm install @pinia/colada-plugin-retry
```

## Usage

```js
import { PiniaColadaRetry } from '@pinia/colada-plugin-retry'

// Pass the plugin to Pinia Colada options
app.use(PiniaColadaRetry, {
  // ...
  plugins: [
    PiniaColadaRetry({
      // Pinia Colada Retry options
    }),
  ],
})
```

You can customize the retry behavior individually for each query/mutation with the `retry` option:

```ts
// TODO:
```

## License

[MIT](http://opensource.org/licenses/MIT)
npm package: @pinia/colada-plugin-auto-refetch
Description: Automatically refetch queries when they become stale in Pinia Colada
Author: Eduardo San Martin Morote
Latest version: 0.2.6

<h1>
  <img height="76" src="https://github.com/posva/pinia-colada/assets/664177/02011637-f94d-4a35-854a-02f7aed86a3c" alt="Pinia Colada logo">
  Pinia Colada Auto Refetch
</h1>

<a href="https://npmjs.com/package/@pinia/colada-plugin-auto-refetch">
  <img src="https://badgen.net/npm/v/@pinia/colada-plugin-auto-refetch/latest" alt="npm package">
</a>

Automatically refetch queries when they become stale in Pinia Colada.

## Installation

```sh
npm install @pinia/colada-plugin-auto-refetch
```

## Usage

```js
import { PiniaColadaAutoRefetch } from '@pinia/colada-plugin-auto-refetch'

// Pass the plugin to Pinia Colada options
app.use(PiniaColada, {
  // ...
  plugins: [
    PiniaColadaAutoRefetch({ autoRefetch: true }), // enable globally
  ],
})
```

You can customize the refetch behavior individually for each query with the `autoRefetch` option:

```ts
// true: use existing staleTime
useQuery({
  key: ['todos'],
  query: getTodos,
  staleTime: 10000,
  autoRefetch: true, // refetch every 10 seconds
})

// Number: custom interval in milliseconds
useQuery({
  key: ['posts'],
  query: getPosts,
  staleTime: 5000,
  autoRefetch: 10000, // refetch every 10 seconds
})

// Function: conditional refetching based on query state
useQuery({
  key: () => ['tasks', id.value],
  query: getDocuments,
  autoRefetch: (state) => {
    // Polling based on data state
    return state.data?.running ? 5000 : false
  },
})
```

## License

[MIT](http://opensource.org/licenses/MIT)
npm package: @pinia/colada-plugin-cache-persister
Description: Persists Pinia Colada's cache in the client
Author: Eduardo San Martin Morote
Latest version: 0.1.4

<h1>
  <img height="76" src="https://github.com/posva/pinia-colada/assets/664177/02011637-f94d-4a35-854a-02f7aed86a3c" alt="Pinia Colada logo">
  Pinia Colada Cache Persister
</h1>

<a href="https://npmjs.com/package/@pinia/colada-plugin-cache-persister">
  <img src="https://badgen.net/npm/v/@pinia/colada-plugin-cache-persister/latest" alt="npm package">
</a>

Persist the query cache to storage and restore it on page load.

## Installation

```sh
npm install @pinia/colada-plugin-cache-persister
```

## Usage

```ts
import { PiniaColadaCachePersister, isCacheReady } from '@pinia/colada-plugin-cache-persister'

app.use(PiniaColada, {
  plugins: [
    PiniaColadaCachePersister({
      // Options (all optional)
      key: 'pinia-colada-cache', // Storage key
      storage: localStorage, // Storage backend
      debounce: 1000, // Persist delay in ms
    }),
  ],
})

// if using async storage, wait for cache to be restored before mounting the app
// (not needed with localStorage)
await isCacheReady()
app.mount('#app')
```

## GC Time

Queries are removed from storage when they are garbage collected. Increase `gcTime` to keep data longer:

```ts
useQuery({
  key: ['users'],
  query: fetchUsers,
  gcTime: 1000 * 60 * 60 * 24, // 24 hours
})
```

## Options

| Option     | Type                            | Default                | Description                     |
| ---------- | ------------------------------- | ---------------------- | ------------------------------- |
| `key`      | `string`                        | `'pinia-colada-cache'` | Storage key                     |
| `storage`  | `Storage \| PiniaColadaStorage` | `localStorage`         | Storage backend (sync or async) |
| `filter`   | `UseQueryEntryFilter`           | -                      | Filter which queries to persist |
| `debounce` | `number`                        | `1000`                 | Debounce time in ms             |

## Filtering Queries

Only persist specific queries using a filter:

```ts
PiniaColadaCachePersister({
  filter: { key: ['users'] }, // Only persist queries starting with 'users'
})
```

Or use a predicate function:

```ts
PiniaColadaCachePersister({
  filter: {
    predicate: (entry) => entry.key[0] === 'important',
  },
})
```

## Async Storage

Works with async storage backends like IndexedDB, compatible with [unstorage](https://github.com/unjs/unstorage):

```ts
import { get, set } from 'idb-keyval'

PiniaColadaCachePersister({
  storage: {
    getItem: (key) => get(key),
    setItem: (key, value) => set(key, value),
  },
})
```

## License

[MIT](http://opensource.org/licenses/MIT)
npm package: @pinia/colada-plugin-debug
Description: Debug plugin for Pinia Colada
Author: Eduardo San Martin Morote
Latest version: 0.0.8

<h1>
  <img height="76" src="https://github.com/posva/pinia-colada/assets/664177/02011637-f94d-4a35-854a-02f7aed86a3c" alt="Pinia Colada logo">
  Pinia Colada Debug Plugin
</h1>

<a href="https://npmjs.com/package/@pinia/colada-plugin-retry">
  <img src="https://badgen.net/npm/v/@pinia/colada-plugin-retry/latest" alt="npm package">
</a>

Debug plugin for Pinia Colada. This is mostly a playground for plugins, it logs out the queries and mutations but it's better to use devtools instead.

## Installation

```sh
npm install @pinia/colada-plugin-debug
```

## Usage

```js
import { PiniaColadaDebug } from '@pinia/colada-plugin-debug'

// Pass the plugin to Pinia Colada options
app.use(PiniaColada, {
  // ...
  plugins: [PiniaColadaDebug()],
})
```

## License

[MIT](http://opensource.org/licenses/MIT)
npm package: @pinia/colada-plugin-delay
Description: Delay async status in Pinia Colada
Author: Eduardo San Martin Morote
Latest version: 0.2.1

<h1>
  <img height="76" src="https://github.com/posva/pinia-colada/assets/664177/02011637-f94d-4a35-854a-02f7aed86a3c" alt="Pinia Colada logo">
  Pinia Colada Delay
</h1>

<a href="https://npmjs.com/package/@pinia/colada-plugin-delay">
  <img src="https://badgen.net/npm/v/@pinia/colada-plugin-delay/latest" alt="npm package">
</a>

Delay the `asyncStatus` of a query to avoid flickering when refreshing data. The perfect addition to `placeholderData` in your paginated queries 💪.

## Installation

```sh
npm install @pinia/colada-plugin-delay
```

## Usage

```js
import { PiniaColadaDelay } from '@pinia/colada-plugin-delay'

// Pass the plugin to Pinia Colada options
app.use(PiniaColada, {
  // ...
  plugins: [
    PiniaColadaDelay({
      delay: 200, // default delay
    }),
  ],
})
```

You can customize the delay behavior individually for each query with the `delay` option:

```ts
useQuery({
  key: ['todos'],
  query: getTodos,
  delay: false, // disable delay
})
```

## License

[MIT](http://opensource.org/licenses/MIT)
npm package: @pinia/colada-plugin-retry
Description: Retry failed requests with Pinia Colada
Author: Eduardo San Martin Morote
Latest version: 0.2.3

<h1>
  <img height="76" src="https://github.com/posva/pinia-colada/assets/664177/02011637-f94d-4a35-854a-02f7aed86a3c" alt="Pinia Colada logo">
  Pinia Colada Retry
</h1>

<a href="https://npmjs.com/package/@pinia/colada-plugin-retry">
  <img src="https://badgen.net/npm/v/@pinia/colada-plugin-retry/latest" alt="npm package">
</a>

Retry failed queries or mutations with your Pinia Colada.

## Installation

```sh
npm install @pinia/colada-plugin-retry
```

## Usage

```js
import { PiniaColadaRetry } from '@pinia/colada-plugin-retry'

// Pass the plugin to Pinia Colada options
app.use(PiniaColada, {
  // ...
  plugins: [
    PiniaColadaRetry({
      // Pinia Colada Retry options
    }),
  ],
})
```

You can customize the retry behavior individually for each query/mutation with the `retry` option:

```ts
useQuery({
  key: ['todos'],
  query: getTodos,
  retry: {
    // Number of retries, can also be a function
    retry: 3,
    // Delay between retries, can also be a function
    delay: 1000,
  },
})
```

## License

[MIT](http://opensource.org/licenses/MIT)
npm package: @pinia/colada-plugin-tanstack-compat
Description: TanStack Query compatibility layer for Pinia Colada
Author: Eduardo San Martin Morote
Latest version: 0.1.0

# @pinia/colada-plugin-tanstack-compat

TanStack Query compatibility layer for Pinia Colada. Adds TanStack Query Vue v5 compatible properties to `useQuery` and `useMutation`, making migration from TanStack Query easier.

## Installation

```bash
# pnpm
pnpm add @pinia/colada-plugin-tanstack-compat

# npm
npm install @pinia/colada-plugin-tanstack-compat

# yarn
yarn add @pinia/colada-plugin-tanstack-compat
```

## Setup

Register the plugin when installing Pinia Colada:

```ts
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import { PiniaColada } from '@pinia/colada'
import { PiniaColadaTanStackCompat } from '@pinia/colada-plugin-tanstack-compat'

const app = createApp(App)
const pinia = createPinia()

app.use(pinia)
app.use(PiniaColada, {
  plugins: [PiniaColadaTanStackCompat()],
})
```

## Quick Example

```vue
<script setup>
import { useQuery } from '@pinia/colada'

const { data, isSuccess, isError, isFetching, isStale } = useQuery({
  key: ['todos'],
  query: () => fetch('/api/todos').then((r) => r.json()),
})
</script>

<template>
  <div v-if="isFetching">Loading...</div>
  <div v-else-if="isError">Error!</div>
  <div v-else-if="isSuccess">
    <span v-if="isStale">(stale)</span>
    {{ data }}
  </div>
</template>
```

## Documentation

For full documentation including all features, API reference, and migration guide, see the [TanStack Query Compatibility cookbook](https://pinia-colada.esm.dev/cookbook/tanstack-compat.html).

## License

MIT
npm package: @pinia/nuxt
Description: Nuxt Module for pinia
Author: Eduardo San Martin Morote
Latest version: 0.11.3

# `@pinia/nuxt`

> Nuxt module for Pinia

## Automatic Installation

Use `nuxi` to automatically add this module to your Nuxt project:

```shell
npx nuxi@latest module add pinia
```

## Manual Installation

Add dependencies to your Nuxt project:

```shell
npm i pinia @pinia/nuxt
```

Enable the `@pinia/nuxt` module in `nuxt.config.ts`:

```js
export default defineNuxtConfig({
    modules: ['@pinia/nuxt'],
})
```

## Configuring the Module

By default, this module adds `stores` folder to auto imports, in which you can organize code related to Pinia stores in one place.
> [!TIP]
> In the new directory structure introduced since Nuxt 4, this directory is `app/stores`.

You can customize this behaviour using the `pinia` property in `nuxt.config.ts`:

```js
export default defineNuxtConfig({
    modules: ['@pinia/nuxt'],
    // configure the module using `pinia` property
    pinia: {
      /**
       * Automatically add stores dirs to the auto imports. This is the same as
       * directly adding the dirs to the `imports.dirs` option. If you want to
       * also import nested stores, you can use the glob pattern `./stores/**`
       * (on Nuxt 3) or `app/stores/**` (on Nuxt 4+)
       *
       * @default `['stores']`
       */
        storesDirs: []
    }
})
```

## License

[MIT](http://opensource.org/licenses/MIT)
npm package: @pinia/plugin-debounce
Description: Debounce any action in your pinia 🍍 store!
Author: Eduardo San Martin Morote
Latest version: 1.0.1

<h1>
  <img height="64" src="https://pinia.esm.dev/logo.svg" alt="Pinia logo">
  Pinia Debounce
</h1>

<a href="https://npmjs.com/package/@pinia/plugin-debounce">
  <img src="https://badgen.net/npm/v/@pinia/plugin-debounce/latest" alt="npm package">
</a>
<a href="https://github.com/posva/pinia-plugin-debounce/actions/workflows/test.yml">
  <img src="https://github.com/posva/pinia-plugin-debounce/workflows/test/badge.svg" alt="build status">
</a>
<a href="https://codecov.io/gh/posva/pinia-plugin-debounce">
  <img src="https://codecov.io/gh/posva/pinia-plugin-debounce/branch/main/graph/badge.svg?token=9WqnRrLf1Q"/>
</a>

Debounce any action in your pinia 🍍 store!

This is also a very good example of **how to create a pinia plugin and how to type it**.

## Installation

```sh
npm install @pinia/plugin-debounce
```

You also need to use a `debounce` function like [lodash.debounce](https://lodash.com/docs/4.17.15#debounce) or [ts-debounce](https://github.com/chodorowicz/ts-debounce)

## Usage

```js
import { debounce } from 'ts-debounce'
import { PiniaDebounce } from '@pinia/plugin-debounce'

// Pass the plugin to your application's pinia plugin
pinia.use(PiniaDebounce(debounce))
```

You can then use a `debounce` option in your stores:

```js
defineStore('id', {
  actions: {
    someSearch() {
      // ...
    },
    other() {
      // ...
    },
  },
  debounce: {
    // debounce all `someSearch` calls by 300ms
    someSearch: 300,
    // you can pass an array of arguments if your debounce implementation accepts extra arguments
    someSearch: [
      300,
      {
        // options passed to debounce
        isImmediate: true,
      },
    ],
  },
})
```

For setup stores, options are in a second arugment:

```js
defineStore(
  'id',
  () => {
    // ...the store

    return { someSearch }
  },
  {
    debounce: {
      // debounce all `someSearch` calls by 300ms
      someSearch: 300,
    },
  }
)
```

### Extended TypeScript support

By default, extra arguments passed to your `debounce` implementation are not typed. This can be changed by extending the `Config` interface in any of your ts files:

```ts
import { debounce } from 'ts-debounce'

declare module '@pinia/plugin-debounce' {
  export interface Config {
    Debounce: typeof debounce
  }
}
```

## License

[MIT](http://opensource.org/licenses/MIT)
npm package: @pinixai/core
Description: Clip framework for Pinix — define once, run as CLI / MCP / Pinix bridge
Latest version: 0.12.2

# pinixai-core

To install dependencies:

```bash
bun install
```

To run:

```bash
bun run index.ts
```

This project was created using `bun init` in bun v1.3.11. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime.
npm package: @pinixai/weixin-bot
Description: WeChat iLink Bot SDK for Node.js
Latest version: 1.2.0

# @pinixai/weixin-bot

Zero-dependency Node.js SDK for the WeChat iLink Bot API.

## Install

```bash
npm install @pinixai/weixin-bot
```

## Quick start

```typescript
import { WeixinBot } from '@pinixai/weixin-bot'

const bot = new WeixinBot()
await bot.login()

bot.onMessage(async (msg) => {
  console.log(`[${msg.timestamp.toLocaleTimeString()}] ${msg.userId}: ${msg.text}`)
  await bot.reply(msg, `你说了: ${msg.text}`)
})

await bot.run()
```

## API reference

### `new WeixinBot(options?)`

Creates a bot client.

- `baseUrl?: string` Override the iLink API base URL.
- `tokenPath?: string` Override the credential file path. Default: `~/.weixin-bot/credentials.json`
- `onError?: (error: unknown) => void` Receive polling or handler errors.

### `await bot.login(options?)`

Starts QR login if needed, stores credentials locally, and returns the active session.

- `force?: boolean` Ignore cached credentials and require a fresh QR login.

### `bot.onMessage(handler)`

Registers an async or sync message handler. Each inbound user message is converted into:

```typescript
interface IncomingMessage {
  userId: string
  text: string
  type: 'text' | 'image' | 'voice' | 'file' | 'video'
  raw: WeixinMessage
  _contextToken: string
  timestamp: Date
}
```

### `await bot.reply(msg, text)`

Replies to an inbound message using that message's `context_token`.

### `await bot.sendTyping(userId)`

Shows "对方正在输入中..." (typing indicator) in the WeChat chat. Automatically fetches the required `typing_ticket` via `getconfig`. Only works after the SDK has seen at least one inbound message from that user.

### `await bot.stopTyping(userId)`

Cancels the typing indicator.

### `await bot.send(userId, text)`

Sends a proactive text message using the latest cached `context_token` for that user. This only works after the SDK has seen at least one inbound message from that user.

### `await bot.run()`

Starts the long-poll loop, dispatches incoming messages to registered handlers, reconnects on transient failures, and triggers re-login if the session expires.

### `bot.stop()`

Stops the long-poll loop gracefully.

## How it works

1. `login()` fetches a QR login URL, waits for WeChat confirmation, and saves the returned bot token.
2. `run()` performs long polling against `getupdates`.
3. Each inbound message is normalized into `IncomingMessage` and sent to your callbacks.
4. `reply()` and `send()` reuse the internally managed `context_token` required by the protocol.

## Protocol

See [../PROTOCOL.md](../PROTOCOL.md) for the wire protocol reference used by this SDK.

## License

MIT
npm package: @pinjs/cf-scraper-bypass
Description: <!-- automd:badges color=yellow -->
Latest version: 0.0.4

# @pinjs/cf-scraper-bypass

<!-- automd:badges color=yellow -->

[![npm version](https://img.shields.io/npm/v/@pinjs/cf-scraper-bypass?color=yellow)](https://npmjs.com/package/@pinjs/cf-scraper-bypass)
[![npm downloads](https://img.shields.io/npm/dm/@pinjs/cf-scraper-bypass?color=yellow)](https://npmjs.com/package/@pinjs/cf-scraper-bypass)

<!-- /automd -->

A simple tool to scrape Cloudflare clearance cookies (cf_clearance) from websites with Cloudflare challenges.

## Usage

Install package:

<!-- automd:pm-install -->

```sh
# ✨ Auto-detect
npx nypm install @pinjs/cf-scraper-bypass

# npm
npm install @pinjs/cf-scraper-bypass

# yarn
yarn add @pinjs/cf-scraper-bypass

# pnpm
pnpm install @pinjs/cf-scraper-bypass

# bun
bun install @pinjs/cf-scraper-bypass
```

```js
import Scraper from "@pinjs/cf-scraper-bypass";

const scraper = new Scraper({
  headless: false,
  skip_chromium_download: false,
  chromium_path: "/usr/bin/chromium-browser",
  wait_for_network_idle: false,
  PUP_TIMEOUT: 16_000,
});

scraper
    .proxy("https://google.com", {})
    .then((res) => console.log(res));
```

<!-- /automd -->

Import:

<!-- automd:jsimport cjs cdn name="@pinjs/cf-scraper-bypass" -->

**ESM** (Node.js, Bun)

```js
import Scraper from "@pinjs/cf-scraper-bypass";
```

**CommonJS** (Legacy Node.js)

```js
const Scraper = require("@pinjs/cf-scraper-bypass");
```

**CDN** (Deno, Bun and Browsers)

```js
import Scraper from "https://esm.sh/@pinjs/cf-scraper-bypass";
```

<!-- /automd -->

## Development

<details>

<summary>local development</summary>

- Clone this repository
- Install latest LTS version of [Node.js](https://nodejs.org/en/)
- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable`
- Install dependencies using `pnpm install`
- Run interactive tests using `pnpm dev`

</details>

## License

<!-- automd:contributors license=MIT -->

Published under the [MIT](https://github.com/pin705/cf-scraper-bypass/blob/main/LICENSE) license.
Made by [community](https://github.com/pin705/cf-scraper-bypass/graphs/contributors) 💛
<br><br>
<a href="https://github.com/pin705/cf-scraper-bypass/graphs/contributors">
<img src="https://contrib.rocks/image?repo=pin705/cf-scraper-bypass" />
</a>

<!-- /automd -->

<!-- automd:with-automd -->

---

_🤖 auto updated with [automd](https://automd.unjs.io)_

<!-- /automd -->
npm package: @pinjs/gem-cli
Description: ⚡️ Gempages Generation CLI Experience
Author: pin705
Latest version: 0.0.9

## Installation
```
$ npm install -g @pinjs/gem-cli
```
## Usage
```
Usage:
	$ gem-cli <command>

Commands:
	--init-template     Create base template

```
## Example
```
npm run gem-cli --init-template
yarn gem-cli --init-template
pnpm gem-cli --init-template
```
npm package: @pinjs/gempages-cli
Description: ⚡️ Gempages Generation CLI Experience
Author: pin705
Latest version: 0.0.16

## Installation
```
$ npm install -g @pinjs/gempages-cli
```
## Usage
```
Usage:
	$ gempages-cli <command>

Commands:
	--init-template     Create base template

```
## Example
```
gempages-cli init-template
```
npm package: @pink-dolphin/rich-editor
Description: A Cutorial for creating a rich text editor,Based on plate.js
Latest version: 0.0.7

# Rich Editor

> @pink-dolphin/rich-editor

### Usage:

`npm i @pink-dolphin/rich-editor`

```ts
<EditorBox>
  <EditorMenu />
  <Editor onChange={(v) => console.log(v)} initialVals={initialValue} />
</EditorBox>
```

![image](https://user-images.githubusercontent.com/22195007/173784929-a871d315-47db-42e3-b01e-949f9fc7cfcb.png)
npm package: @pinkbin/storage
Description: storage
Author: levi
Latest version: 0.1.7

# storage
seeing the name of a thing one thinks of its function o(´^｀)o

## Basic Usage

```bash
# if you use npm
npm install @pinkbin/storage --save-dev
# or if you use yarn
yarn add @pinbin/storage
```

### Get Start

```js
import storage from '@pinkbin/storage'

storage.local.set('name', 'your value')

storage.session.set('name', 'your value')

// cookie api is the same as 'js-cookie'
storage.cookie.set('name', 'your value')

```
npm package: @pinkel/ui-datepicker
Description: adMarketplace date picker library
Author: Pinkel Gurung
Latest version: 1.0.10

# ui-datepicker

> adMarketplace date picker library

[![NPM](https://img.shields.io/npm/v/ui-datepicker.svg)](https://www.npmjs.com/package/ui-datepicker) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm install --save ui-datepicker
```

## Usage

```tsx
import React, { Component } from 'react'

import MyComponent from 'ui-datepicker'
import 'ui-datepicker/dist/index.css'

class Example extends Component {
  render() {
    return <MyComponent />
  }
}
```

## License

MIT © [Pinkel Gurung](https://github.com/Pinkel Gurung)