open-index/open-npm huggingface dataset:
npm package: @pokt/vite-plugin-git-info
Description: inject git info (dev & build)
Author: songlary
Latest version: 0.0.1

# @pokt/vite-plugin-git-info

> 页面显示 git 信息; 开发时 - 不重启 dev server 情况下 - 更新 git info

## Features

- [x] sync git-info on change
    - [x] sync to js via hmr api
- [ ] js runtime adapt
    - [x] prepare initial git-info
- [ ] enable adapters
    - [ ] auto inject for vue3
        - [ ] virtual module?
    - [ ] auto inject for vue2
    - [ ] auto inject for react
    - [ ] auto inject for raw js
- [ ] webpack?
- [x] inject floating info UX
    - [x] import a webcomponent as overlay wrapper
- 项目中可引用的虚拟模块
    - [x] import gitInfo from "virtual:git-info:vue";
    - [ ] import gitInfo from "virtual:git-info";

## Development

```bash
# 本地开发 
# 1. 先构建依赖的仓库
# 2. 启动本项目 - 
#   2.1 本项目显示内容 - 当前内容为 vue 引用已构建的 lit-element
#   TODO 改为纯 lit-element?
pnpm dev:lib 
#   2.1 本项目显示内容 - 当前内容为 vue 引用已构建的 lit-element
pnpm dev

# 本项目单独测试 client 部分
pnpm dev:client


```
npm package: @pokujs/docker
Description: 🐳 A minimal API to assist tests that require containers or tests that run inside containers.
Author: https://github.com/wellwelwel
Latest version: 1.0.0

<div align="center">
<img height="180" alt="Poku's Logo" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/poku.svg">

# @pokujs/docker

Enjoying **Poku**? [Give him a star to show your support](https://github.com/wellwelwel/poku) 🌟

---

📘 [**Documentation**](https://poku.io/docs/documentation/helpers/containers)

</div>

---

🐳 [**@pokujs/docker**](https://github.com/pokujs/docker) is a minimal API to assist tests that require containers or tests that run inside containers.

> [!TIP]
>
> It can be used both with or without [**Poku**](https://github.com/wellwelwel/poku) test runner.

---

## Quickstart

### Install

<table>
<tr>
<td width="225">

```bash
# Node.js
npm i -D @pokujs/docker
```

</td>
<td width="225">

```bash
# Bun
bun add -d @pokujs/docker
```

</td>
<td width="225">

```bash
# Deno (optional)
deno add npm:@pokujs/docker
```

</td>
</tr>
</table>

### Docker Compose

```js
import { docker } from '@pokujs/docker';

const compose = docker.compose();

// Starts the container(s)
await compose.up();

/**
 * Tests come here 🧪
 */

// Stops the container(s)
await compose.down();
```

### Dockerfile

```js
import { docker } from '@pokujs/docker';

const dockerfile = docker.dockerfile({
  containerName: 'container-name',
  tagName: 'image-name',
});

// Builds the image from the Dockerfile
await dockerfile.build();

// Starts the container
await dockerfile.start();

/**
 * Tests come here 🧪
 */

// Stops and removes both the container and image
await dockerfile.remove();
```
npm package: @pokujs/multi-suite
Description: A Poku plugin to run multiple independent test suites as a single, unified execution.
Author: https://github.com/wellwelwel
Latest version: 1.0.1

<div align="center">
<img height="180" alt="Poku's Logo" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/poku.svg">

# @pokujs/multi-suite

Enjoying **Poku**? [Give him a star to show your support](https://github.com/wellwelwel/poku) 🌟

---

📚 [**Documentation**](https://poku.io/docs/documentation/helpers/multi-suite)

</div>

---

🧬 [**@pokujs/multi-suite**](https://github.com/pokujs/multi-suite) is a **Poku** plugin to run multiple independent test suites (each with its own configuration) as a single, unified execution.

> [!TIP]
>
> Run multiple suites as one: independent concurrency, reporters, plugins, and quiet mode per suite, with isolated executions and a single consolidated report at the end.

---

## Quickstart

### Install

<table>
<tr>
<td width="225">

```bash
# Node.js
npm i -D @pokujs/multi-suite
```

</td>
<td width="225">

```bash
# Bun
bun add -d @pokujs/multi-suite
```

</td>
<td width="225">

```bash
# Deno (optional)
deno add npm:@pokujs/multi-suite
```

</td>
</tr>
</table>

### Enable the Plugin

```js
// poku.config.js
import { multiSuite } from '@pokujs/multi-suite';
import { defineConfig } from 'poku';

export default defineConfig({
  plugins: [
    multiSuite([
      { include: 'test/unit', concurrency: 8 },
      { include: 'test/integration', sequential: true },
    ]),
  ],
});
```

---

## Suite Options

Each suite accepts all [**poku config file options**](https://poku.io/docs/documentation/poku/config-files), applied independently.

---

## Examples

### Different concurrency per suite

```js
multiSuite([
  { include: 'test/unit', concurrency: 16 },
  { include: 'test/e2e', sequential: true },
]);
```

### Load env files per suite

```js
multiSuite([
  { include: 'test/unit', envFile: '.env.test' },
  { include: 'test/integration', envFile: '.env.integration' },
]);
```

### Scoped plugins per suite

```js
multiSuite([
  { include: 'test/unit' },
  { include: 'test/integration', plugins: [myPlugin()] },
]);
```

### Different reporter per suite

```js
multiSuite([
  { include: 'test/unit', reporter: 'dot' },
  { include: 'test/integration', reporter: 'compact' },
]);
```

### Kill ports before a suite

```js
multiSuite([
  { include: 'test/unit' },
  {
    include: 'test/integration',
    kill: { port: [3000, 5432] },
  },
]);
```

---

## How It Works

- Suites run **sequentially**, one after the other
- Each suite is a fully independent `poku` execution with its own configuration
- Live file results are shown as they happen, using each suite's configured reporter
- A single consolidated failure report and summary badge are shown at the end
- `Ctrl+C` stops everything immediately

---

## License

MIT © [wellwelwel](https://github.com/wellwelwel)
npm package: @pokujs/react
Description: React testing helpers and Poku plugin for DOM-backed component tests.
Author: Lojhan
Latest version: 1.4.0

<div align="center">
<img height="180" alt="Poku's Logo" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/poku.svg">

# @pokujs/react

Enjoying **Poku**? [Give him a star to show your support](https://github.com/wellwelwel/poku) 🌟

---

📘 [**Documentation**](https://github.com/pokujs/react#readme)

</div>

---

🧪 [**@pokujs/react**](https://github.com/pokujs/react) is a **Poku** plugin for React component testing with DOM adapters.

> [!TIP]
>
> Render React components in isolated test files — automatic TSX loader injection, DOM environment setup, and optional render metrics included.

---

## Quickstart

### Install

<table>
<tr>
<td width="225">

```bash
# Node.js
npm i -D @pokujs/react
```

</td>
<td width="225">

```bash
# Bun
bun add -d @pokujs/react
```

</td>
<td width="225">

```bash
# Deno (optional)
deno add npm:@pokujs/react
```

</td>
</tr>
</table>

Install a DOM adapter (at least one is required):

<table>
<tr>
<td width="225">

```bash
# happy-dom (recommended)
npm i -D happy-dom \
  @happy-dom/global-registrator
```

</td>
<td width="225">

```bash
# jsdom
npm i -D jsdom
```

</td>
</tr>
</table>

### Enable the Plugin

```js
// poku.config.js
import { defineConfig } from 'poku';
import { reactTestingPlugin } from '@pokujs/react/plugin';

export default defineConfig({
  plugins: [
    reactTestingPlugin({
      dom: 'happy-dom',
    }),
  ],
});
```

### Write Tests

```tsx
// tests/my-component.test.tsx
import { afterEach, assert, test } from 'poku';
import { cleanup, render, screen } from '@pokujs/react';

afterEach(cleanup);

test('renders a heading', () => {
  render(<h1>Hello</h1>);
  assert.strictEqual(screen.getByRole('heading').textContent, 'Hello');
});
```

---

## Compatibility

### Runtime × DOM Adapter

|                  | Node.js ≥ 20 | Bun ≥ 1 | Deno ≥ 2 |
| ---------------- | :----------: | :-----: | :------: |
| **happy-dom**    |      ✅      |   ✅    |    ✅    |
| **jsdom**        |      ✅      |   ✅    |    ⚠️    |
| **custom setup** |      ✅      |   ✅    |    ✅    |

> [!NOTE]
>
> `jsdom` under Deno may be unstable depending on Deno's npm compatibility layer for the current `jsdom` version. For Deno projects, prefer `happy-dom`.

---

## Options

```ts
reactTestingPlugin({
  /**
   * DOM adapter to use. Defaults to 'happy-dom'.
   * - 'happy-dom'       — fast, recommended for most tests
   * - 'jsdom'           — broader browser API coverage
   * - { setupModule }   — path to a custom DOM setup module
   */
  dom: 'happy-dom',

  /** Base URL assigned to the DOM environment. */
  domUrl: 'http://localhost:3000/',

  /**
   * Render metrics. Disabled by default.
   * Pass `true` for defaults, or an object for fine-grained control.
   */
  metrics: {
    enabled: true,
    topN: 5,
    minDurationMs: 0,
    reporter(summary) {
      console.log(summary.topSlowest);
    },
  },
});
```

---

## License

[MIT](./LICENSE)
npm package: @pokujs/scope-hooks
Description: Generic per-test scope hook composition utilities for Poku plugins.
Author: Lojhan
Latest version: 1.0.0-rc.1

# @pokujs/scope-hooks

Generic per-test scope hook composition utilities for Poku plugins.

## Install

```bash
npm install @pokujs/scope-hooks poku
```

## Usage

```ts
import { composeScopeHooks, getScopeHooks } from '@pokujs/scope-hooks';
import { SCOPE_HOOKS_KEY } from 'poku/plugins';

console.log(typeof SCOPE_HOOKS_KEY === 'symbol');

composeScopeHooks({
  name: '@acme/my-plugin.scope-hooks',
  createHolder: () => ({ scope: undefined }),
  runScoped: async (holder, fn) => {
    const result = fn();
    if (result instanceof Promise) await result;
  },
});

console.log(getScopeHooks());
```
npm package: @pokujs/shared-resources
Description: 🪢 A Poku plugin for shared resources across isolated tests.
Author: https://github.com/wellwelwel
Latest version: 1.1.2

<div align="center">
<img height="180" alt="Poku's Logo" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/poku.svg">

# @pokujs/shared-resources

Enjoying **Poku**? [Give him a star to show your support](https://github.com/wellwelwel/poku) 🌟

---

📘 [**Documentation**](https://poku.io/docs/documentation/helpers/shared-resources)

</div>

---

🪢 [**@pokujs/shared-resources**](https://github.com/pokujs/shared-resources) is a **Poku** plugin for shared resources across isolated tests.

> [!TIP]
>
> Share state, servers, database connections, and more between parallel test files — no duplicated setup, no conflicts.

---

## Quickstart

### Install

<table>
<tr>
<td width="225">

```bash
# Node.js
npm i -D @pokujs/shared-resources
```

</td>
<td width="225">

```bash
# Bun
bun add -d @pokujs/shared-resources
```

</td>
<td width="225">

```bash
# Deno (optional)
deno add npm:@pokujs/shared-resources
```

</td>
</tr>
</table>

### Enable the Plugin

```js
// poku.config.js
import { sharedResources } from '@pokujs/shared-resources';
import { defineConfig } from 'poku';

export default defineConfig({
  plugins: [sharedResources()],
});
```

### Define a Shared Resource

```js
// resources/counter.js
import { resource } from '@pokujs/shared-resources';

export const Counter = resource.create(() => ({
  count: 0,
  increment() {
    this.count++;
    return this.count;
  },
  getCount() {
    return this.count;
  },
}));
```

### Use in Your Tests

```js
// tests/my-test.test.js
import { resource } from '@pokujs/shared-resources';
import { assert, test } from 'poku';
import { Counter } from '../resources/counter.js';

test('Shared Counter', async () => {
  const counter = await resource.use(Counter);

  await counter.increment();
  assert.strictEqual(await counter.getCount(), 1);
});
```
npm package: @pokujs/vue
Description: Vue testing helpers and Poku plugin for DOM-backed component tests.
Author: Lojhan
Latest version: 1.0.1

<div align="center">
<img height="180" alt="Poku's Logo" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/poku.svg">

# @pokujs/vue

Enjoying **Poku**? [Give him a star to show your support](https://github.com/wellwelwel/poku) 🌟

---

📘 [**Documentation**](https://github.com/pokujs/vue#readme)

</div>

---

🧪 [**@pokujs/vue**](https://github.com/pokujs/vue) is a **Poku** plugin for Vue component testing with DOM adapters.

> [!TIP]
>
> Render Vue components in isolated test files — automatic TSX loader injection, DOM environment setup, and optional render metrics included.

---

## Quickstart

### Install

<table>
<tr>
<td width="225">

```bash
# Node.js
npm i -D @pokujs/vue
```

</td>
<td width="225">

```bash
# Bun
bun add -d @pokujs/vue
```

</td>
<td width="225">

```bash
# Deno (optional)
deno add npm:@pokujs/vue
```

</td>
</tr>
</table>

Install a DOM adapter (at least one is required):

<table>
<tr>
<td width="225">

```bash
# happy-dom (recommended)
npm i -D happy-dom \
  @happy-dom/global-registrator
```

</td>
<td width="225">

```bash
# jsdom
npm i -D jsdom
```

</td>
</tr>
</table>

### Enable the Plugin

```js
// poku.config.js
import { defineConfig } from 'poku';
import { vueTestingPlugin } from '@pokujs/vue/plugin';

export default defineConfig({
  plugins: [
    vueTestingPlugin({
      dom: 'happy-dom',
    }),
  ],
});
```

### Write Tests

```tsx
// tests/my-component.test.tsx
import { afterEach, assert, test } from 'poku';
import { cleanup, render, screen } from '@pokujs/vue';

afterEach(cleanup);

test('renders a heading', () => {
  render(<h1>Hello</h1>);
  assert.strictEqual(screen.getByRole('heading').textContent, 'Hello');
});
```

---

## Compatibility

### Runtime × DOM Adapter

|                  | Node.js ≥ 20 | Bun ≥ 1 | Deno ≥ 2 |
| ---------------- | :----------: | :-----: | :------: |
| **happy-dom**    |      ✅      |   ✅    |    ✅    |
| **jsdom**        |      ✅      |   ✅    |    ⚠️    |
| **custom setup** |      ✅      |   ✅    |    ✅    |

> [!NOTE]
>
> `jsdom` under Deno may be unstable depending on Deno's npm compatibility layer for the current `jsdom` version. For Deno projects, prefer `happy-dom`.

---

## Options

```ts
vueTestingPlugin({
  /**
   * DOM adapter to use. Defaults to 'happy-dom'.
   * - 'happy-dom'       — fast, recommended for most tests
   * - 'jsdom'           — broader browser API coverage
   * - { setupModule }   — path to a custom DOM setup module
   */
  dom: 'happy-dom',

  /** Base URL assigned to the DOM environment. */
  domUrl: 'http://localhost:3000/',

  /**
   * Render metrics. Disabled by default.
   * Pass `true` for defaults, or an object for fine-grained control.
   */
  metrics: {
    enabled: true,
    topN: 5,
    minDurationMs: 0,
    reporter(summary) {
      console.log(summary.topSlowest);
    },
  },
});
```

---

## License

[MIT](./LICENSE)
npm package: @pokusew/escpos
Description: ESC/POS Printer driver for Node.js
Author: lsong
Latest version: 3.0.8

# ESCPOS

[![npm](https://img.shields.io/npm/v/@pokusew/escpos.svg?maxAge=2592000)](https://www.npmjs.com/package/@pokusew/escpos)
[![escpos channel on discord](https://img.shields.io/badge/discord-join%20chat-61dafb.svg)](https://discord.gg/bg3yazg)

ESC/POS Printer driver for Node.js

This is a fork of [song940/node-escpos](https://github.com/song940/node-escpos). It is partially rewritten to ES6 but currently it is not actively updated.


## Installation

Using npm

````bash
npm install @pokusew/escpos --save
````

If you use USBAdapter:

+ On Linux, you'll need `libudev` to build libusb.
+ On Ubuntu/Debian: `sudo apt-get install build-essential libudev-dev`.
+ On Windows, Use [Zadig](http://sourceforge.net/projects/libwdi/files/zadig/) to install the WinUSB driver for your USB device.

Otherwise you will get `LIBUSB_ERROR_NOT_SUPPORTED` when attempting to open devices.

## Example

see [example here](/examples/index.js)

## API


### USBAdapter

#### open


### Printer


#### text("text")

Prints raw text. Raises TextError exception.

#### control("align")

Carrier feed and tabs.

align is a string which takes any of the following values:

+ LF for Line Feed
+ FF for Form Feed
+ CR for Carriage Return
+ HT for Horizontal Tab
+ VT for Vertical Tab


#### align("align")

Set text properties.

align set horizontal position for text, the possible values are:

+ CENTER
+ LEFT
+ RIGHT

Default: left

font type could be A or B. Default: A
width is a numeric value, 1 is for regular size, and 2 is twice the standard size. Default: 1
height is a numeric value, 1 is for regular size and 2 is twice the standard size. Default: 1

#### barcode("code", "barcode_type", width, height, "position", "font")

Prints a barcode.

code is an alphanumeric code to be printed as bar code
barcode_type must be one of the following type of codes:

+ UPC-A
+ UPC-E
+ EAN13
+ EAN8
+ CODE39
+ ITF
+ NW7

width is a numeric value in the range between (1,255) Default: 64
height is a numeric value in the range between (2,6) Default: 3
position is where to place the code around the bars, could be one of the following values:

+ ABOVE
+ BELOW
+ BOTH
+ OFF

Default: BELOW

font is one of the 2 type of fonts, values could be:

+ A
+ B

Default: A

Raises BarcodeTypeError, BarcodeSizeError, BarcodeCodeError exceptions.

#### cut("mode")

Cut paper.

mode set a full or partial cut. Default: full
Partial cut is not implemented in all printers.

#### cashdraw(pin)

Sends a pulse to the cash drawer in the specified pin.

pin is a numeric value which defines the pin to be used to send the pulse, it could be 2 or 5.
Raises `CashDrawerError()``


## Thanks

+ Part of code from [@taoyuan](https://github.com/taoyuan)


## License

[MIT](/LICENSE.md)
npm package: @pokutuna/firestore-to-bigquery
Description: A utility for periodically export Cloud Firestore & Datastore and load to BigQuery.
Author: pokutuna
Latest version: 0.0.2

@pokutuna/firestore-to-bigquery
===

[![Actions Status](https://github.com/pokutuna/firestore-to-bigquery/workflows/test/badge.svg)](https://github.com/pokutuna/firestore-to-bigquery/actions)
[![npm (scoped)](https://img.shields.io/npm/v/@pokutuna/firestore-to-bigquery)](https://www.npmjs.com/package/@pokutuna/firestore-to-bigquery)

A utility for periodically export Cloud Firestore & Datastore and load to BigQuery.

![sequence](misc/sequence.png)

## Create a bucket on Cloud Storage

- The locations must be same as Cloud Firestore (Datastore).
- (Recommend) Set the TTL rule to the bucket to delete exported objects.
  - [Object Lifecycle Management  |  Cloud Storage  |  Google Cloud](https://cloud.google.com/storage/docs/lifecycle)

## Create a function on Cloud Functions

```js
const { makeFunction } = require('@pokutuna/firestore-to-biguqery');

// Function to deploy Cloud Functions with http trigger
export const app = makeFunction({
  // Your projectId.
  projectId: "my-project",
  // Names of kind (Datastore mode) or collection (Firestore mode).
  kinds: ["foo", "bar"],
  // GCS Bucket. Must be same location as Firestore.
  exportBucket: "my-bucket",

  // BigQuery
  destination: {
    datasetId: "datastore",
    // The location for creating dataset if not present.
    location: "asia-northeast1",
  },
  // Callback for partitioning.
  timePartitionedBy: (kind) => {
    if (kind === "foo") return { field: "createdAt" };
    return undefined;
  },
});
```

`$ gcloud functions deploy firestore-to-bigquery --entry-point=app --runtime=nodejs10 --trigger-http`

### Required Roles

- `roles/datastore.importExportAdmin`
- `roles/storage.admin`
- `roles/bigquery.user`

Give these roles to runtime service account on Cloud IAM.  
Use the default service account `PROJECT_ID@appspot.gserviceaccount.com` OR create and deploy with another service account `--service-account=...`

[Function Identity  |  Cloud Functions Documentation  |  Google Cloud](https://cloud.google.com/functions/docs/securing/function-identity)


## Create 2 schedulers on Create Scheduler

### Export Firestore
```
$ gcloud scheduler jobs create http kick-export \
  --time-zone "Asia/Tokyo" \
  --schedule="17 2 * * *" \
  --uri="{YOUR_FUNCTION_URL}" \
  --headers="Content-Type=application/json" \
  --http-method="POST" \
  --message-body='{ "action": "export" }'
```

### Load to BigQuery
```
$ gcloud scheduler jobs create http kick-load \
  --time-zone "Asia/Tokyo" \
  --schedule="23 4 * * *" \
  --uri="{YOUR_FUNCTION_URL}" \
  --headers="Content-Type=application/json" \
  --http-method="POST" \
  --message-body='{ "action": "load" }'
```

See also [Creating and configuring cron jobs  |  Cloud Scheduler Documentation](https://cloud.google.com/scheduler/docs/creating)