open-index/open-npm huggingface dataset:
npm package: @shumih/rollup-plugin-polyfill-node
Description: rollup-plugin-polyfill-node ===
Latest version: 0.6.3

rollup-plugin-polyfill-node
===

🔩 A modern Node.js polyfill for your Rollup bundle.

> This repo is an updated, maintained fork of https://github.com/ionic-team/rollup-plugin-node-polyfills to support better Node.js polyfills in Snowpack and all other Rollup projects. See this thread for discussion on moving this plugin into the official Rollup org: https://github.com/rollup/plugins/pull/51#issuecomment-747489334


## Quickstart

```
npm install --save-dev @shumih/rollup-plugin-polyfill-node
```

```js
import nodePolyfills from '@shumih/rollup-plugin-polyfill-node';
rollup({
  entry: 'main.js',
  plugins: [
    nodePolyfills( /* options */ )
  ]
})
```

## Options

*All options are optional.*

- `include: Array<string | RegExp> | string | RegExp | null;`: Defaults to transforming Node.js builtins in all `node_modules/**/*.js` files only. Pass in `null` to transform all files, including all files including any source files.
- `exclude: Array<string | RegExp> | string | RegExp | null;`: Exclude files from transformation. 
- `sourceMap: boolean`: True to get source maps, false otherwise.


## Node.js Builtin Support Table

The following modules include ES6 specific version which allow you to do named imports in addition to the default import and should work fine if you only use this plugin.

- process*
- events
- stream*
- util*
- path
- buffer*
- querystring
- url*
- string_decoder*
- punycode
- http*†
- https*†
- os*
- assert*
- constants
- timers*
- console*‡
- vm*§
- zlib*
- tty
- domain
- dns∆
- dgram∆
- child_process∆
- cluster∆
- module∆
- net∆
- readline∆
- repl∆
- tls∆
- fs˚
- crypto˚
- perf_hooks˚ - **New:* just an empty shim for now, but would love help building a true polyfill!*


† the http and https modules are actually the same and don't differentiate based on protocol

‡ default export only, because it's console, seriously just use the global

§ vm does not have all corner cases and has less of them in a web worker

∆ not shimmed, just returns mock

˚ shimmed, but too complex to polyfill fully. Avoid if at all possible. Some bugs and partial support expected. 

Not all included modules rollup equally, streams (and by extension anything that requires it like http) are a mess of circular references that are pretty much impossible to tree-shake out, similarly url methods are actually a shortcut to a url object so those methods don't tree shake out very well, punycode, path, querystring, events, util, and process tree shake very well especially if you do named imports.
npm package: @shumoku/core
Description: Core library for shumoku network topology visualization
Author: konoe-akitoshi
Latest version: 0.2.23

# @shumoku/core

Core library for Shumoku network topology visualization.

## Installation

```bash
npm install @shumoku/core
```

## Features

- **Data models** - Type-safe network topology models (Device, Port, Link, Module)
- **Layout engines** - Automatic positioning with ELK.js (hierarchical layout)
- **SVG renderer** - High-quality vector output
- **Themes** - Built-in modern and dark themes

## Usage

```typescript
import { NetworkGraph, HierarchicalLayoutEngine, SvgRenderer } from '@shumoku/core'

// Create a network graph
const graph: NetworkGraph = {
  version: '1.0.0',
  devices: [
    { id: 'router1', name: 'Router', type: 'router' },
    { id: 'switch1', name: 'Switch', type: 'l2-switch' }
  ],
  links: [
    { id: 'link1', source: 'router1', target: 'switch1' }
  ]
}

// Layout the graph
const engine = new HierarchicalLayoutEngine()
const layout = await engine.layout(graph)

// Render to SVG
const renderer = new SvgRenderer()
const svg = renderer.render(layout)
```

## Related Packages

- [`@shumoku/parser-yaml`](https://www.npmjs.com/package/@shumoku/parser-yaml) - YAML parser for network definitions
- [`@shumoku/icons`](https://www.npmjs.com/package/@shumoku/icons) - Vendor-specific icons (Yamaha, Aruba, AWS, Juniper)

## Documentation

- [Playground](https://shumoku.packof.me/) - Interactive demo
- [GitHub](https://github.com/konoe-akitoshi/shumoku)

## License

MIT
npm package: @shumoku/icons
Description: Vendor-specific icons for Shumoku network diagrams
Author: konoe-akitoshi
Latest version: 0.2.4

# @shumoku/icons

Vendor-specific icons for Shumoku network diagrams.

## Installation

```bash
npm install @shumoku/icons @shumoku/core
```

## Supported Vendors

| Vendor | Icons | Description |
|--------|-------|-------------|
| Yamaha | 103 | Network equipment (RTX, SWX, WLX series) |
| Aruba | 55 | Wireless and switching |
| AWS | 477 | Cloud services icons |
| Juniper | 343 | Network equipment |

## Usage

```typescript
import { registerAllVendorIcons } from '@shumoku/icons'

// Register all vendor icons with @shumoku/core
registerAllVendorIcons()
```

Then use vendor icons in your YAML:

```yaml
nodes:
  - id: rt-01
    label: "Router"
    type: router
    vendor: yamaha
    model: rtx3510

  - id: ap-01
    label: "Access Point"
    type: access-point
    vendor: aruba
    model: ap-505

  - id: ec2-01
    label: "Web Server"
    vendor: aws
    service: ec2
    resource: instance
```

## Related Packages

- [`@shumoku/core`](https://www.npmjs.com/package/@shumoku/core) - Core library
- [`@shumoku/parser-yaml`](https://www.npmjs.com/package/@shumoku/parser-yaml) - YAML parser

## Documentation

- [Vendor Icons Reference](https://shumoku.packof.me/docs/vendor-icons) - Available icons
- [Playground](https://shumoku.packof.me/) - Interactive demo

## License

MIT
npm package: @shumoku/parser-yaml
Description: YAML parser for shumoku network topology definitions
Author: konoe-akitoshi
Latest version: 0.2.15

# @shumoku/parser-yaml

YAML parser for Shumoku network topology definitions.

## Installation

```bash
npm install @shumoku/parser-yaml @shumoku/core
```

## Usage

```typescript
import { YamlParser } from '@shumoku/parser-yaml'

const yaml = `
name: "Simple Network"

settings:
  direction: TB
  theme: light

nodes:
  - id: rt-01
    label: "Router 01"
    type: router

  - id: sw-01
    label: "Switch 01"
    type: l2-switch

links:
  - from:
      node: rt-01
      port: lan1
    to:
      node: sw-01
      port: ge-0/0/0
    bandwidth: 10G
`

const parser = new YamlParser()
const graph = parser.parse(yaml)
```

## YAML Schema

### Nodes

```yaml
nodes:
  - id: router-01
    label: "Core Router"
    type: router          # router, l2-switch, l3-switch, firewall, server, etc.
    vendor: yamaha        # Optional: yamaha, aruba, aws, juniper
    model: rtx3510        # Optional: vendor-specific model
    parent: core-layer    # Optional: subgraph ID
```

### Links

```yaml
links:
  - from:
      node: router-01
      port: lan1
    to:
      node: switch-01
      port: ge-0/0/0
    bandwidth: 10G        # Optional
    label: "Uplink"       # Optional
```

### Subgraphs

```yaml
subgraphs:
  - id: core-layer
    label: "Core Layer"
```

## Related Packages

- [`@shumoku/core`](https://www.npmjs.com/package/@shumoku/core) - Core library
- [`@shumoku/icons`](https://www.npmjs.com/package/@shumoku/icons) - Vendor icons

## Documentation

- [YAML Reference](https://shumoku.packof.me/docs/yaml-reference) - Full syntax reference
- [Playground](https://shumoku.packof.me/) - Interactive demo

## License

MIT
npm package: @shun-js/app
Description: app
Author: uikoo9
Latest version: 0.3.6

# @shun-js/app

shun.js服务：app服务

## 配置文件

以`app.json`命名

```json
{
  "port": 8007,
  "db": {
    "connectionLimit": 20,
    "host": "127.0.0.1",
    "port": 3306,
    "database": "db_app",
    "user": "root",
    "password": "xx",
    "timezone": "Asia/Shanghai",
    "charset": "utf8mb4"
  }
}
```

## 启动

```shell
# 全局安装该服务
npm i -g @shun-js/user

# 安装shun-cli
npm i -g @shun-js/shun-cli

# 启动，在app.json所在目录下
shunjs start @shun-js/app
```

## 请求

```shell
# add
curl --location --request POST 'http://localhost:8007/app/update' \
--data-urlencode 'appName=1'
```
npm package: @shun-js/config
Description: config
Author: uikoo9
Latest version: 0.3.5

# @shun-js/config

shun.js服务：配置服务

## 配置文件

以`config.json`命名

```json
{
  "port": 8006
}
```

## 启动

```shell
# 全局安装该服务
npm i -g @shun-js/user

# 安装shun-cli
npm i -g @shun-js/shun-cli

# 启动，在config.json所在目录下
shunjs start @shun-js/config
```

## 请求

```shell
curl --location --request POST 'http://localhost:8006/config' \
--data-urlencode 'type=mp-xiaolouai'
```
npm package: @shun-js/cos
Description: cos
Author: uikoo9
Latest version: 0.3.4

# @shun-js/cos

shun.js服务：推荐服务

## 配置文件

以`cos.json`命名

```json
{
  "port": 8005
}
```

## 启动

```shell
# 全局安装该服务
npm i -g @shun-js/user

# 安装shun-cli
npm i -g @shun-js/shun-cli

# 启动，在cos.json所在目录下
shunjs start @shun-js/cos
```

## 请求

```shell
# cos token
curl --location --request POST 'http://localhost:8005/cos/token' \
--data-urlencode 'cosSecretId=xx' \
--data-urlencode 'cosSecretKey=xx' \
--data-urlencode 'cosBucket=xx' \
--data-urlencode 'cosRegion=ap-beijing' \
--data-urlencode 'durationSeconds=1800' \
--data-urlencode 'allowPrefix=models/*'

# cos sign
curl --location --request POST 'http://localhost:8005/cos/sign' \
--data-urlencode 'cosSecretId=xx' \
--data-urlencode 'cosSecretKey=xx' \
--data-urlencode 'cosBucket=xx' \
--data-urlencode 'cosRegion=ap-beijing' \
--data-urlencode 'signKey=xx' \
--data-urlencode 'signTimeout=60' \
--data-urlencode 'cdnHost=1800' \
--data-urlencode 'filePath=models/*' \
--data-urlencode 'formatWebp=no' \
--data-urlencode 'formatWidth=150'
```
npm package: @shun-js/feishu-bot
Description: feishu bot
Author: uikoo9
Latest version: 0.3.1

# @shun-js/feishu-bot

shun.js服务：飞书机器人消息

## 配置文件

以`feishu-bot.json`命名

```json
{
  "port": 8001
}
```

## 启动

```shell
# 全局安装该服务
npm i -g @shun-js/feishu-bot

# 安装shun-cli
npm i -g @shun-js/shun-cli

# 启动，在feishu-bot.json所在目录下
shunjs start @shun-js/feishu-bot
```

## 请求

```shell
curl --location --request POST 'http://127.0.0.1:8001/feishu/bot' \
--data-urlencode 'content={ "post": { "zh_cn": { "content": [[{ "tag": "text", "text": "【告警】测试" }]] } } }' \
--data-urlencode 'url=https://open.feishu.cn/open-apis/bot/v2/hook/xx'
```
npm package: @shun-js/feishu-grafana-alert
Description: feishu grafana alert
Author: uikoo9
Latest version: 0.3.2

# @shun-js/feishu-grafana-alert

shun.js服务：grafana的飞书webhook

## 配置文件

以`feishu-grafana-alert.json`命名

```json
{
  "port": 7001,
  "grafanaDomain": "domain grafana.xxx.ai"
}
```

## 启动

```shell
# 全局安装该服务
npm i -g @shun-js/feishu-grafana-alert

# 安装shun-cli
npm i -g @shun-js/shun-cli

# 启动，在feishu-grafana-alert.json所在目录下
shunjs start @shun-js/feishu-grafana-alert
```

## 请求

```shell
curl --location --request POST 'http://127.0.0.1:7001/grafana/alert' \
--header 'authorization: domain grafana.xxx.ai' \
--data-urlencode 'alerts=1'
```
npm package: @shun-js/recommend
Description: recommend
Author: uikoo9
Latest version: 0.3.4

# @shun-js/recommend

shun.js服务：推荐服务

## 配置文件

以`recommend.json`命名

```json
{
  "port": 8004,
  "db": {
    "connectionLimit": 20,
    "host": "127.0.0.1",
    "port": 3306,
    "database": "db_recommend",
    "user": "root",
    "password": "xx",
    "timezone": "Asia/Shanghai",
    "charset": "utf8mb4"
  },
  "feishu": {
    "url": "http://127.0.0.1:8001/feishu/bot",
    "feishuUrl": "https://open.feishu.cn/open-apis/bot/v2/hook/2cd0xx"
  }
}
```

## 启动

```shell
# 全局安装该服务
npm i -g @shun-js/user

# 安装shun-cli
npm i -g @shun-js/shun-cli

# 启动，在recommend.json所在目录下
shunjs start @shun-js/recommend
```

## 请求

```shell
# add
curl --location --request POST 'http://localhost:8004/recommend/add' \
--data-urlencode 'userId=1' \
--data-urlencode 'newUserId=2'

# list
curl --location --request POST 'http://localhost:8004/recommend/list' \
--data-urlencode 'userId=1'

# change
curl --location --request POST 'http://localhost:8004/recommend/change' \
--data-urlencode 'userId=1' \
--data-urlencode 'newUserId=2'
```
npm package: @shun-js/shun-cli
Description: shun.js cli
Author: uikoo9
Latest version: 1.0.1

# @shun-js/shun-cli

shun.js cli tool

## Install

```shell
npm i -g @shun-js/shun-cli
```

## Start servers

```shell
# start a server (version is required), run in the directory containing config json files
shunjs start @shun-js/feishu-bot@0.3.1

# start multiple servers
shunjs start @shun-js/feishu-bot@0.3.1 @shun-js/aitubiao-server@0.3.8
```
npm package: @shun-js/shun-config
Description: shun.js get server config
Author: uikoo9
Latest version: 0.3.1

# @shun-js/shun-config

shun.js 服务启动前后去配置文件的工具类

## 示例

```js
// config
const { parseServerConfig } = require('@shun-js/shun-config');

// init
(async () => {
  // config
  const config = await parseServerConfig(process.argv);
  if (!config) {
    console.log('read server config fail');
    return;
  }

  // start app
})();
```