open-index/open-npm huggingface dataset:
npm package: @robotsandpencils/koa-errors
Description: Error handler middleware for koa
Author: Andy Wright
Latest version: 0.1.3

# koa-errors

[![tests](https://github.com/RobotsAndPencils/koa-errors/actions/workflows/pull-request.yml/badge.svg)](https://github.com/RobotsAndPencils/koa-errors/actions/workflows/pull-request.yml)
[![Coverage Status](https://coveralls.io/repos/github/RobotsAndPencils/koa-errors/badge.svg?branch=latest)](https://coveralls.io/github/RobotsAndPencils/koa-errors?branch=latest)

`@robotsandpencils/koa-errors` is a simple koa middleware for handling error states (i.e. 500 errors). It's primary usage is to produce human, and program readable 500 errors that only include stack traces in development environments.

## Usage

Using pnpm:

```Shell
$ pnpm add @robotsandpencils/koa-errors
```

Using npm:

```Shell
$ npm install --save @robotsandpencils/koa-errors
```

Using yarn:

```Shell
$ yarn add @robotsandpencils/koa-errors
```

```JavaScript
const { e500 } = require('@robotsandpencils/koa-errors')
const Koa = require('koa')
const Router = require('koa-router')

const app = new Koa()
const router = new Router()

app.on('error', (err, ctx) => {
  console.log('uncaught_koa_error', err, ctx)
})

app.use(e500({
  showStack: process.env.NODE_ENV === 'local',
}))

router.get('/boom', async (ctx) => {
  throw new Error('BOOM!')
})

app.use(router.routes())
app.listen(3000)
```

## Arguments

`@robotsandpencils/koa-errors` accepts the following arguments:

-   **showStack**: whether or not to show the stack trace in the response body. Always set this to false in publically accessible environments, such as production.
npm package: @robotsandpencils/parse-usdl
Description: parse Pdf417 barcode data from US driver licenses
Latest version: 2.0.6


# parse-usdl

parse Pdf417 barcode data from US driver licenses

## Usage

```js
import { parse } from 'parse-usdl'

const code =
`@

ANSI 636001070002DL00410392ZN04330047DLDCANONE
DCBNONE
DCDNONE
DBA08312013
DCSMichael
DACM
DADMotorist
DBD08312013
DBB08312013
DBC1
DAYBRO
DAU064 in
DAG2345 ANYWHERE STREET
DAIYOUR CITY
DAJNY
DAK123450000
DAQNONE
DCFNONE
DCGUSA
DDEN
DDFN
DDGN
`
const data = parse(code)
console.log(JSON.stringify(data, null, 2))

// {
//   "jurisdictionRestrictionCodes": "NONE",
//   "jurisdictionEndorsementCodes": "NONE",
//   "dateOfExpiry": 1377921600000,
//   "lastName": "Michael",
//   "firstName": "M",
//   "middleName": "Motorist",
//   "dateOfIssue": 1377921600000,
//   "dateOfBirth": 1377921600000,
//   "sex": "M",
//   "eyeColor": "BRO",
//   "height": "064 in",
//   "addressStreet": "2345 ANYWHERE STREET",
//   "addressCity": "YOUR CITY",
//   "addressState": "NY",
//   "addressPostalCode": "123450000",
//   "documentNumber": "NONE",
//   "documentDiscriminator": "NONE",
//   "issuer": "USA",
//   "lastNameTruncated": "N",
//   "firstNameTruncated": "N",
//   "middleNameTruncated": "N"
// }
// ~/Co
```

## Optional Parameters


#### suppressErrors
Prevent a hard error in the case of a bad code provided. All valid codes will be parsed and returned.

```javascript
const options = {
    suppressErrors: false
}
```
npm package: @robotti.io/render-mermaid
Description: A command-line tool to render Mermaid diagrams to PNG format.
Latest version: 1.0.0

# @robotti.io/render-mermaid

Render Mermaid diagrams found in a Markdown file to PNG images.

## Install

```bash
npm install @robotti.io/render-mermaid
```

## CLI

```bash
npx render-mermaid ./doc.md ./out
```

### Security note (untrusted input)

This tool renders Mermaid by spawning `mmdc` (Mermaid CLI), which typically runs headless Chromium. Treat rendering attacker-controlled Markdown/Mermaid (for example, CI on PRs from forks) as **high risk**.

If you must run on untrusted inputs, prefer running in a sandboxed environment (container/VM), with least privilege and restricted network egress.

This package is **hardened by default** (resource limits + non-inherited child output). Use `--mode lax` or `--mode unsafe only for trusted local documents.

### Options

- `--verbose`: inherit Mermaid CLI stdout/stderr (may leak sensitive info into logs)
- `--mode <string>`: base profile configuration [`hardened` (default), `lax`, `unsafe`]
- `--max-concurrency <n>`: maximum concurrent renders
- `--timeout-ms <ms>`: timeout per render
- `--max-blocks <n>`: maximum Mermaid blocks allowed
- `--max-file-bytes <n>`: maximum input Markdown size
- `--max-block-bytes <n>`: maximum Mermaid block size
- `--max-svg-bytes <n>`: maximum rendered SVG size (pre-rasterization)

### Default vs lax settings

Defaults apply to both the CLI and library unless you override options.

| Setting | hardened (default) | lax | unsafe |
| --- | ---: | ---: | ---: |
| `maxConcurrency` | 1 | 2 | `os.cpus().length` |
| `timeoutMs` | 15000 | 30000 | 60000 |
| `maxBlocks` | 25 | 50 | 250 |
| `maxFileBytes` | 1MB | 2MB | 10MB |
| `maxBlockBytes` | 64KB | 128KB | 512KB |
| `maxSvgBytes` | 2MB | 5MB | 20MB |
| `childOutput` | `capture` | `capture` | `capture` |

- `./doc.md` must contain one or more fenced Mermaid blocks:

  ````md
  ```mermaid
  graph TD
    A --> B
  ```
  ````

## Library

```js
import MermaidRenderer from '@robotti.io/render-mermaid';

// Uses hardened defaults unless overridden.
const renderer = new MermaidRenderer('./doc.md', './out');
await renderer.run();

// Lax example (trusted docs):
const laxRenderer = new MermaidRenderer('./doc.md', './out', {
  timeoutMs: 30_000,
  maxConcurrency: 2,
  maxBlocks: 50,
  maxFileBytes: 2 * 1024 * 1024,
  maxBlockBytes: 128 * 1024,
  maxSvgBytes: 5 * 1024 * 1024,
  childOutput: 'capture',
});
await laxRenderer.run();
```
npm package: @robotty/umzug-postgres-storage
Description: PostgreSQL connector for umzug
Author: Ruben Anders
Latest version: 3.0.4
Deprecated: No longer updated

# umzug-postgres-storage

![Build](https://github.com/robotty/umzug-postgres-storage/workflows/Build/badge.svg)

PostgreSQL connector for umzug

Also featuring a small utility function for running migrations atomically using transactions.

    npm i @robotty/umzug-postgres-storage

```javascript
import { Pool } from "pg";
import {
  PGStorage,
  migrateInTransaction,
} from "@robotty/umzug-postgres-storage";
import * as Umzug from "umzug";
// const { Pool } = require('pg');
// const { PGStorage, migrateInTransaction } = require('@robotty/umzug-postgres-storage');
// const Umzug = require('umzug');

async function runMigrations() {
  // for options, see: https://node-postgres.com/features/connecting
  let dbPool = new Pool({
    database: "testdb",
    host: "/var/run/postgresql",
  });

  // migrateInTransaction begins and commits/rollbacks a transaction for you
  // if undesired, omit this wrapper and use:
  // let db = await dbPool.connect();

  // whatever you return from the async function inside gets returned to here
  // (note that migrateInTransaction also accepts single connections, not only pools)
  let migrations = await migrateInTransaction(dbPool, async (db) => {
    let umzug = new Umzug({
      // second parameter (config) is entirely optional
      storage: new PGStorage(db, {
        tableName: "my_app_migration", // optional (default is schema_migration)
        columnName: "my_app_revision_id", // optional (default is revision_id)
      }),
      migrations: {
        // passes the db connection to use to the first parameter of all the up()/down() migrations
        // you defined for umzug to run
        params: [db],
      },
    });

    return await umzug.up();
  });

  console.log("Successfully ran these migrations:", migrations);
}

runMigrations().catch((e) => {
  console.error(e);
  process.exitCode = 1;
});
```
npm package: @robotxlu/form-create
Description: AntDesignVue版本Vue低代码可视化表单设计器，可以通过拖拽的方式快速创建表单，提高开发者对表单的开发效率。
Author: xaboy
Latest version: 3.4.1

<p align="center">
    <a href="https://www.form-create.com">
        <img width="300" alt="FormCreate" src="https://static.form-create.com/file/img/info-logo2.png">
    </a>
</p>

<p align="center">
    <a href="https://www.form-create.com/" target="_blank">官网</a>
    <span>&nbsp;|&nbsp;</span>
    <a href="https://view.form-create.com/" target="_blank">帮助文档</a>
    <span>&nbsp;|&nbsp;</span>
    <a href="https://form-create.com/v3/antd/designer" target="_blank">在线演示</a>
    <span>&nbsp;|&nbsp;</span>
    <a href="https://form-create.com/v3/" target="_blank">FormCreate 文档</a>
</p>

<p align="center">
  <a href="https://github.com/xaboy/form-create" target="_blank"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="TIM" /></a>
  <a href="https://github.com/xaboy/form-create" target="_blank"><img src="https://img.shields.io/npm/dt/@form-create/designer.svg" alt="dt" /></a>
</p>

**AntDesignVue 版本的 FcDesigner 是基于 [@form-create/ant-design-vue](https://github.com/xaboy/form-create) 实现的低代码表单设计器组件。可以通过拖拽的方式快速创建表单，提高开发者对表单的开发效率，节省开发者的时间。支持Vue3**

**AI 表单助理已开源:[GitHub](https://github.com/xaboy/form-create-assistant)，用于根据自然语言描述自动生成和修改 FormCreate 表单规则**

[![FcDesigner](https://static.form-create.com/file/img/banner-m2.jpg?20251027)](https://pro.form-create.com/view)

## 特点
- 使用JSON数据生成表单
- 支持扩展自定义组件
- 内置30+常用的表单组件和布局组件
- 提供丰富的表单操作API
- 支持子表单和分组
- 支持事件配置
- 支持样式配置
- 支持表格布局
- 支持表单验证
- 支持多语言
- 支持表单多语言
- 支持AI表单助理

## 支持的UI框架

[![FcDesigner](https://static.form-create.com/file/img/products.jpg)](https://form-create.com/)

> 如果对您有帮助，您可以点右上角 **"Star"** 支持一下 谢谢！本项目还在不断开发完善中,如有任何建议或问题[请在这里提出](https://github.com/xaboy/form-create-designer/issues/new)

> 开发者讨论群[629709230](https://jq.qq.com/?_wv=1027&k=F1FlEFIV)

- **预览**

![demo1](https://static.form-create.com/file/img/open-designer.jpg)

## 引入

**CDN:**

```html
<link rel="stylesheet" href="https://unpkg.com/ant-design-vue@4/dist/reset.css"></link>
<script src="https://unpkg.com/vue"></script>
<script src="https://unpkg.com/ant-design-vue@4/dist/antd.min.js"></script>
<script src="https://unpkg.com/@form-create/ant-design-vue@next/dist/form-create.min.js"></script>
<script src="https://unpkg.com/@form-create/antd-designer@next/dist/index.umd.js"></script>
```

**NodeJs:**

```shell
npm install @form-create/antd-designer@next
npm install @form-create/ant-design-vue@next
npm install ant-design-vue
```

```js
import FcDesigner from '@form-create/antd-designer'
import antd from 'ant-design-vue';
import 'ant-design-vue/dist/reset.css';

app.use(antd);
app.use(FcDesigner)
app.use(FcDesigner.formCreate)
```

## 使用

```html
<fc-designer ref="designer"/>
```

## 联系

![http://static.form-create.com/file/img/support.jpg](http://static.form-create.com/file/img/support.jpg)

## License

[MIT](http://opensource.org/licenses/MIT)

Copyright (c) 2021-present xaboy
npm package: @robowhale/phaser3-ninepatch-types-fix
Description: Typescript definitions for phaser3-ninepatch-plugin
Author: Vladislav Forsh
Latest version: 1.0.4

### General info

(Better) typescript definitions for the https://github.com/koreezgames/phaser3-ninepatch-plugin

The original plugin comes with the definitions, but they have some issues:
- `GameObjectFactory` and `GameObjectCreatore` are not properly patched
- some properties of the `NinePatch` marked as `private` and I need them to be `public` for my 9-patch editor


### Usage
Install the package
```
npm install @robowhale/phaser3-ninepatch-types-fix
```

Then add `index.d.ts` file to the `files` section of `tsconfig.json`
```
"files": [
    "node_modules/@robowhale/phaser3-ninepatch-types-fix/index.d.ts"
]
```


### Typescript compiler warnings
Typescript will throw some warnings because these types conflicts with the original types. 
To suppress them add `"skipLibCheck": true` to your `tsconfig.json`
npm package: @robrez/scoped-registry-polymer
Description: Scoped custom element registry for polymer
Author: robrez
Latest version: 0.1.0

# Scoped Elements for Polymer

A mixin for [Polymer](https://github.com/polymer/polymer) elements based on the [Scoped Custom Element Registry](https://github.com/WICG/webcomponents/blob/gh-pages/proposals/Scoped-Custom-Element-Registries.md) proposal

This mixin is inspired by the work of other which targets `Lit`

- [open-wc](https://www.npmjs.com/package/@open-wc/scoped-elements)
- [lit](https://www.npmjs.com/package/@lit-labs/scoped-registry-mixin)

## Usage

```ts
import { ScopedRegistryMixin } from '@robrez/scoped-registry-polymer';
import { html, PolymerElement } from '@polymer/polymer';

class FancyButton extends HTMLElement {
  /** */
}

export class MyElement extends ScopedRegistryMixin(PolymerElement) {
  static get scopedElements(): ElementDefinitionsMap {
    return {
      'fancy-button': FancyButton
    };
  }

  static get template() {
    return html`
      <div>
        <fancy-button>I am scoped!</fancy-button>
      </div>
    `;
  }
}
```

## Developing

```bash
# install deps
npm i

# compile
npm run build

# serve demos
npm run start

# run tests
npm run test
```

## TODO

- Downlevel types
- Nicer docs