open-index/open-npm huggingface dataset:
npm package: @smallbiz/errors
Description: Shared ApiError helpers.
Latest version: 0.1.0

---
title: '@smallbiz/errors'
description: Shared ApiError helpers for SmallBiz Innovation projects.
---

# @smallbiz/errors

Utility package providing `ApiError`, serialization helpers, and convenience factories for common HTTP scenarios.

## Installation

```bash
pnpm add @smallbiz/errors
```

## Usage

Throw an `ApiError` (or use one of the factories) inside Cloudflare Workers and return a serialized JSON response with
`handleApiError`:

```ts
import { badRequest, handleApiError } from '@smallbiz/errors';

export default {
  async fetch(request: Request): Promise<Response> {
    try {
      const payload = await request.json();
      if (!payload.imageId) {
        throw badRequest('imageId is required', 'missing_image_id');
      }
      return Response.json({ ok: true });
    } catch (error) {
      return handleApiError(error, { request });
    }
  },
};
```

`handleApiError` automatically attaches `cf-ray`/`x-request-id` headers, includes stack traces for server errors, and generates a
response body with the `status`, `code`, `message`, and optional `details` block.

Use `normalizeError` when you need to coerce user-supplied errors into the shared shape without sending a response immediately.

## Testing

Vitest suites cover serialization, helper factory behavior, and normalization logic:

```bash
pnpm test --filter @smallbiz/errors
```
npm package: @smallbiz/param-parser
Description: Utilities for parsing image transform parameters.
Latest version: 0.1.0

---
title: '@smallbiz/param-parser'
description: Helpers for parsing CF Images transformation parameters.
---

# @smallbiz/param-parser

Utilities to extract and build Cloudflare Images transformation strings.

## Installation

```bash
pnpm add @smallbiz/param-parser
```
npm package: @smallbiz/queue-utils
Description: Cloudflare Queues helpers.
Latest version: 0.1.0

---
title: '@smallbiz/queue-utils'
description: Cloudflare Queues helpers.
---

# @smallbiz/queue-utils

Cloudflare Queues helpers.

## Installation

```bash
pnpm add @smallbiz/queue-utils
```
npm package: @smallbiz/validator
Description: Shared zod schemas for SmallBiz services.
Latest version: 0.1.0

---
title: '@smallbiz/validator'
description: Shared zod schemas for SmallBiz Innovation services.
---

# @smallbiz/validator

Provides reusable zod schemas such as `UploadPayloadSchema`.

## Installation

```bash
pnpm add @smallbiz/validator
```
npm package: @smallcat/prisma-web3
Description: ```sh npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git] npm version patch npm publish
Latest version: 0.0.29

```sh
npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git]
npm version patch
npm publish

npm publish --otp=你的2FA验证码

```
npm package: @smallchen/rt-ui
Description: 大润发业务组件
Author: peng.chen
Latest version: 0.2.5

# ui

# 快速上手

1. 下载相关依赖

```
npm install @smallchen/rt-ui
yarn add @smallchen/rt-ui
```

2. 引入 rt-ui</br>
   将 rt-ui 引入到入口文件 main.js 中。
   ::: warning
   rt-ui的引入要在element-ui后面
   :::

   ```js
   import ElementUI from "element-ui";
   import "element-ui/lib/theme-chalk/index.css";

   import RtUI from "@smallchen/rt-ui";
   import "@smallchen/rt-ui/lib/index.css";
   Vue.use(RtUI);
   ```
3. 更多配置请查看文档。