open-index/open-npm huggingface dataset:
npm package: @qc-hlp/ts-ocpp
Description: Customization of @voltbras/ts-ocpp
Latest version: 0.0.18

# ts-ocpp

:zap: OCPP (Open Charge Point Protocol) implemented in Typescript. Supports OCPP-JSON v1.6 and OCPP-SOAP v1.5.

## install

```bash
yarn add @qc-hlp/ts-ocpp
# OR
npm install @qc-hlp/ts-ocpp --save
```

## instruction

### central system

defining a central system that accepts OCPP requests:

```typescript
// port and request handler as arguments
const centralSystem = new CentralSystem(3000, (req, { chargePointId }) => {
  switch (req.action) {
    case 'Heartbeat':
      // returns a successful response
      // (we pass the action and ocpp version so typescript knows which fields are needed)
      return {
        action: req.action,
        ocppVersion: req.ocppVersion,
        currentTime: new Date().toISOString()
      };
  }
  throw new Error('message not supported');
});
```

sending a request to the chargepoint "123":

```typescript
// Returns a Either(Error or Success) object(functional, will not throw on error)
const response = await centralSystem.sendRequest({ chargePointId: '123', ocppVersion: 'v1.6-json', action: 'GetConfiguration', payload: {} });
// it can be used in a functional way
response.map(({ configurationKey }) => configurationKey[0].key);
// or can be used in the standard JS way(will throw if there was an error)
const unsafeResponse = response.unsafeCoerce();
```

### chargepoint

defining a chargepoint that accepts OCPP requests:

```typescript
// port, request handler and central system URL as arguments
const chargepoint = new ChargePoint(3001, req => {
  switch (action) {
    case 'GetConfiguration':
      // returns a successful response
      // (we pass the action and ocpp version so typescript knows which fields are needed)
      return {
        action: req.action,
        ocppVersion: req.ocppVersion,
        configurationKey: [],
      };
  }
  throw new Error('message not supported');
});
```

sending a request to the central system(see central system's section to understand the return type):
```typescript
const response = await chargepoint.sendRequest({ action: 'Heartbeat', ocppVersion: '1.6-json', payload: {} );
```

### troubleshooting

Set the environment variable `DEBUG` to `ts-ocpp:*` to enable troubleshooting.
npm package: @qc2168/mib
Description: data backup tool
Author: QC2168
Latest version: 1.6.0

# mib-cli
一款基于`Node.js`和`ADB`的开发的备份工具（命令行），根据你的配置自动将移动设备上的数据文件迁移备份至电脑上，支持增量备份。
> 图形化版本请前往 [mib repo](https://github.com/QC2168/mib)
## 功能
- [x] USB连接备份数据
- [x] 增量备份
- [x] 多设备备份选择
- [x] 单节点全量备份

## 安装mib-cli

```
npm install -g @qc2168/mib
```
## 使用
> 在使用此插件之前，你需要在你的设备上安装`Node.js`和`ADB`（并添加设置为全局变量中）
## 如何开启adb模式
[在设备上启用 adb 调试](https://developer.android.com/studio/command-line/adb?hl=zh-cn#Enabling)
## 执行备份

根据你的配置文件，快速的备份你移动设备中的数据到本地磁盘中

```
mib
```
## MIB 配置文件 （.mibrc）

> 默认配置文件存放在用户目录下

``` JSON
{
    "backups": [
        {
            "path": "/sdcard/DCIM/Camera/",
            "comment": "本地相册"
        },
        {
            "path": "/sdcard/DCIM/Screenshots/",
            "comment": "屏幕截屏"
        },
        {
            "path": "/sdcard/MIUI/sound_recorder/",
            "comment": "录音"
        },
        {
            "path": "/sdcard/MIUI/sound_recorder/app_rec/",
            "comment": "应用录音"
        },
        {
            "path": "/sdcard/MIUI/sound_recorder/call_rec/",
            "comment": "通话录音"
        }
        // 添加更多的备份节点
    ],
  // 推荐使用绝对路径
  "output": "E:/files"
}
```

### 节点选项

| 属性    | 类型    | 描述                 | 是否必选 |
| ------- | ------- | -------------------- | -------- |
| path    | String  | 设备备份路径         | 是       |
| comment | String  | 节点说明             | 是       |
| full    | Boolean | 当前节点全量备份     | 否       |
| output  | Boolean | 指定当前节点导出路径 | 否       |

### 命令行参数

| 属性     | 类型   | 描述                                     | 是否必选 |
| -------- | ------ | ---------------------------------------- | -------- |
| --config | String | 指定配置文件路径（默认存放在用户目录下/.mibrc） | 否       |
npm package: @qc2168/use-charts
Description: Using usecharts can make it easier to create chart components
Author: QC2168
Latest version: 1.2.4

# useCharts

## 📖 Introduction

Using usecharts can make it easier to create chart components

## 🌈 Feature

- auto resize chart
- Loading effect before rendering
- custom theme
- custom renderer

## 📦 Installation

```
# pnpm (recommend)
pnpm add echarts @qc2168/use-charts

# yarn
yarn add echarts @qc2168/use-charts

# npm
npm install echarts @qc2168/use-charts

```

## 🤖 Usage

```typescript

// template

<!-- width height must be provided for element -->

<div ref="chartEl" style="height:200px;width:200px;"><div>


// script setup
import useChart from "@qc2168/use-charts"
//  provide a element
const chartEl = ref<HTMLDivElement | null>(null)

const {
    setOption,
    showLoading,
} = useChart(chartEl as Ref<HTMLDivElement>)

onMounted(() => {
    onMounted(() => {
    nextTick(() => {
        // turn on chart loading ~
        showLoading()
        // setOption
        setOption({
            /* set data ... */
        })
    })
})
}),
```
> example https://github.com/QC2168/useCharts/tree/main/example

## 🛠️ Argument

| Name    | Description       | Type                  | required |
| ------- | ----------------- | --------------------- | -------- |
| elRef   | echart dom        | `Ref<HTMLDivElement>` | `true`     |
| Options | see options below | `OptionsType`         | `false`    |

### OptionsType
| Name          | Description               | Type                                               | required | Default                  |
| ------------- | ------------------------- | -------------------------------------------------- | -------- | ------------------------ |
| render        | echart render mode        | `RenderType.SVGRenderer/RenderType.CanvasRenderer` | `false`  | `RenderType.SVGRenderer` |
| autoChartSize | watch chart size changes  | `boolean`                                          | `false`  | `false`                    |
| animation     | Define transition effects | `AnimationType`                                    | `false`  | `{}`                       |
| theme         | echart theme              | `ThemeType.Light/ThemeType.Dark/ThemeType.Default` | `false`  | `ThemeType.Default`        |

### AnimationType
| Name   | Description                                                 | Type    | required | Default |
| ------ | ----------------------------------------------------------- | ------- | -------- | ------- |
| enable | set to false to prevent the transition effects from showing | `boolean` | `false`   |         |
| styles | styles object                                               | `Object`  | `false`   |         |
npm package: @qc2168/vite-plugin-utools
Description: quickly building utools files
Author: QC2168
Latest version: 1.7.0

# vite-plugin-utools

Easier to develop utools plugin

## Usage

Install the plugin

```bash
npm i @qc2168/vite-plugin-utools -D
```

In the vite config file, add the vite-plugin-utools

```typescript
// vite.config.ts
plugins: [
  utools({ entry: [
    { entry: 'utools/main.ts' },
    { entry: 'utools/preload.ts' }
  ] })
]
```

Create a `main.js` file and pass the file path to plugin

```javascript
// main.js
window.exports = {
  // plugin entrance
  demo: {
    mode: 'none',
    args: {
      enter: async () => {
        // some things
      }
    }
  }
}
```

### HMR Inject

You can using auto inject `development.main`, to achieve hot updates

```typescript
utools({
  hmr: {
    pluginJsonPath: 'your plugin.json path'
  }
})
```

## Options Type

```typescript
import type { InlineConfig } from 'vite'

export enum BuildMode { IncludeDependencies, ExcludeDependencies }

export interface BuildFileType {
  entry: string | string[]
  vite?: InlineConfig
  mode?: BuildMode
}

export interface BuildJsonType {
  outdir?: string
  entry: string
  address: string
}

export interface OptionsType {
  entry: BuildFileType | BuildFileType[]
  hmr?: boolean | { pluginJsonPath?: string }
}
```

## Example

[utools-plugin-template](https://github.com/QC2168/utools-plugin-template)
npm package: @qc315/node-server-exe
Description: 一个基于 Express 托管静态文件的exe应用服务端包
Author: qc315
Latest version: 1.0.0

# @qc315/node-server-exe

一个轻量级的 Express 服务端包，用于快速托管 Vue 打包后的静态文件，支持将服务打包为可执行文件（exe）。

[![npm version](https://img.shields.io/npm/v/@你的npm用户名/vue-app-server.svg)](https://www.npmjs.com/package/@你的npm用户名/vue-app-server)
[![license](https://img.shields.io/npm/l/@你的npm用户名/vue-app-server.svg)](LICENSE)

## 🌟 特性
- 一键启动 Express 服务，托管 Vue 静态文件
- 支持通过 pkg 将服务打包为 Windows 可执行文件（exe）
- 轻量无冗余，仅依赖 Express 核心库

## 📦 安装
### 1. 本地安装（项目内使用）
```bash
npm install @qc315/node-server-exe --save
npm package: @qc315/qc-cli
Description: 一个快速创建 Vue/React 项目的前端脚手架 CLI 工具
Author: qc
Latest version: 1.0.1

# 写着玩的
## 📦 安装
### 1. 本地安装（项目内使用）
```bash
npm install @qc315/qc-cli -D
```
### 在项目根目录执行，全局链接测试
```bash
npm link
npm unlink -g qc-cli
```

### 在项目根目录执行
```bash
qc -v
qc init test-project
```