open-index/open-npm huggingface dataset:
npm package: @feidao-factory/service
Description: Node.js Service, depending on RabbitMQ.
Latest version: 5.1.201902201406
Deprecated: deprecated

# Node.js Service

<!-- TOC -->

- [1. feidao.json](#1-feidaojson)
- [2. log4js.json](#2-log4jsjson)

<!-- /TOC -->

## 1. feidao.json

``` json
{
	"mqtt": "mqtt://192.168.40.196:1883",
	"REDIS": {
		"URL": "redis://172.16.12.2:6379",
		"EXPIRATION": 3600
	},
	"spaceid": "webtest",
	"KAFKA1": {
		"URI": "kafka://192.168.40.195:9092",
		"TOPIC": "feidao-soa-log-nodejs-server"
	},
	"RABBITMQ": "amqp://guest:guest@172.16.12.2:5672?heartbeat=5",
	"PREFETCH_COUNT": 4,
	"TIMEOUT": 5000,
	"EXPIRATION": 15000,
	"ZK_HOSTS": "172.16.12.2:2181",
	"ZK_OPTIONS": {
		"sessionTimeout": 30000,
		"spinDelay": 1000,
		"retries": 0
	},
	"SOA_ID": "soa_205_d161c9d7-85d6-4fe1-bd62-b6447fd52062"
}
```

## 2. log4js.json

日志配置，具体请参考官方说明：[log4js](https://github.com/nomiddlename/log4js-node)
npm package: @feidao-factory/swanapp
Description: feidao framework for swanapp
Author: taoqf
Latest version: 5.0.201901221120
Deprecated: deprecated

# swanapp

#### Description
{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**}

#### Software Architecture
Software architecture description

#### Installation

1. xxxx
2. xxxx
3. xxxx

#### Instructions

1. xxxx
2. xxxx
3. xxxx

#### Contribution

1. Fork the repository
2. Create Feat_xxx branch
3. Commit your code
4. Create Pull Request


#### Gitee Feature

1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
4. The most valuable open source project [GVP](https://gitee.com/gvp)
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
6. The most popular members  [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
npm package: @feidao-factory/web
Description: feidao framework for web
Author: taoqf
Latest version: 5.1.201902201621
Deprecated: deprecated

# web

## 基本功能

1.客户端的事件响应,客户端的组件、页面的初始化
2.数据会存放到当前页面的fd中
3.调用事件时如果有参数,参数可以在args中获取到

#### Description
{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**}

#### Software Architecture
Software architecture description

#### Installation

1. xxxx
2. xxxx
3. xxxx

#### Instructions

1. xxxx
2. xxxx
3. xxxx

#### Contribution

1. Fork the repository
2. Create Feat_xxx branch
3. Commit your code
4. Create Pull Request


#### Gitee Feature

1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
4. The most valuable open source project [GVP](https://gitee.com/gvp)
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
6. The most popular members  [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
npm package: @feidao-msz/baidu-aip-sdk
Description: 百度AI开放平台Nodejs SDK, 文档以及详情请访问官网: https://ai.baidu.com
Author: baidu-aip
Latest version: 1.0.201910111510

[![Build Status](https://travis-ci.org/Baidu-AIP/nodejs-sdk.svg?branch=master)](https://travis-ci.org/Baidu-AIP/nodejs-sdk)
[![npm](https://img.shields.io/npm/v/baidu-aip-sdk.svg)](https://www.npmjs.com/package/baidu-aip-sdk)

# 安装百度AI开放平台 Node.js SDK

**Node.js SDK目录结构**

        ├── src
        │  ├── auth                                //授权相关类
        │  ├── http                                //Http通信相关类
        │  ├── client                              //公用类
        │  ├── util                                //工具类
        │  └── const                               //常量类
        ├── AipOcr.js                              //文字识别交互类
        ├── AipFace.js                             //人脸识别交互类
        ├── AipNlp.js                              //语言处理基础技术交互类
        ├── AipContentCensor.js                    //内容审核交互类
        ├── AipImageClassify.js                    //图像识别交互类
        ├── AipImageSearch.js                      //图像搜索交互类
        ├── AipKg.js                               //知识图谱交互类
        ├── AipSpeech.js                           //语音合成&语音识别交互类
        ├── index.js                               //入口文件
        └── package.json                           //npm包描述文件

**支持 node 版本 4.0+**

**直接使用Node.js开发包步骤如下：**

1.在[官方网站](http://ai.baidu.com/sdk)下载Node.js SDK压缩包。

2.将下载的`aip-node-sdk-version.zip`解压后，复制到工程文件夹中。

3.进入目录，运行npm install安装sdk依赖库

4.把目录当做模块依赖

其中，`version`为版本号，添加完成后，用户就可以在工程中使用百度AI开放平台 Node.js SDK。

**直接使用npm安装依赖：**

```
npm install baidu-aip-sdk
```

# 详细使用文档

参考[百度AI开放平台官方文档](http://ai.baidu.com/docs)
npm package: @feidao-msz/fd-an000002
Description: 百度智能云-身份证识别
Author: msz
Latest version: 4.6.201907051736

# 百度智能云-身份证识别

## Installation

```sh
yarn add --dev @dfeidao/fd-an000002
```

## 参数

参数 | 描述
--|--
app_id | 从百度智能云申请的AppID
api_key | 从百度智能云获取的ApiKey
secret_key | 从百度智能云获取的Secret Key
images | 图像数据，base64编码，要求base64编码后大小不超过4M，最短边至少15px，最长边最大4096px,支持jpg/png/bmp格式
id_card_side|front：身份证含照片的一面；back：身份证带国徽的一面
detect_direction |是否检测图像朝向，默认为false不检测。朝向是指输入图像是正常方向、逆时针旋转90/180/270度。
detect_risk|是否开启身份证风险类型(身份证复印件、临时身份证、身份证翻拍、修改过的身份证)功能，默认false不开启

## 正面返回值

 名称 | 说明
------|-----
address|住址
birthday|出生日期
id_number|公民身份证
name|姓名
nation|民族
sex|性别

## 反面返回值

 名称 | 说明
------|-----
invalid_date | 失效日期
issue_date | 签发日期
issue_office | 签发机关

## Example

1. 客户端通过调用 `import img2base64 from '@dfeidao/atom-web/file/img2base64';` 原子操作，把base64格式的图片传到服务端
2. 服务端调用 `@dfeidao/fd-an000002` 身份证识别原子操作进行识别
3. 需要注意的是 app_id, api_key, secret_key 不要出现在客户端，仅限在服务端出现

```ts
import an002 from '@dfeidao/fd-an000002';

export default async function atom(message: Message, action_id: string, session_id: string, headers: IncomingHttpHeaders): Promise<IWebResult> {
	const img = message.img;
	const res = await an002('app_id', 'api_key', 'secret_key', message.img, 'front');
}
```

## ChangeLogs

## latest

修复识别身份证背面报错

## 4.6.201907040922
npm package: @feidao-msz/fd-m000016
Description: 层级选择器
Author: taoqf
Latest version: 4.6.201907311436

# fd-m000016 层级选择器

## Installation

```sh
yarn add --dev @dfeidao/fd-m000016
```

## Attributes

属性 | 描述 | 示例  
-----|------|-----
show | 设置显示 | show={true}
data | 数据源或数据源地址，第一层的数据的父级标示请设置为'root'，如果设置为数据源地址，需要配置post自定义路由 | data={[{ no: '1', parent: 'root', name: 'AAAA' }, { no: '8', parent: 'root', name: '&&&&' }, { no: '2', parent: '0', name: 'BBBB' }, { no: '11', parent: '1', name: 'CCCC' }, { no: '12', parent: '1', name: 'DDDD' }, { no: '111', parent: '11', name: 'EEEE' }, { no: '112', parent: '11', name: 'FFFF' }, { no: '211', parent: '2', name: 'GGGG' }]} <br/> data='http://172.16.15.22:8889/get-data'
use_cache | 是否使用缓存，仅当data为数据源地址时有效 <br/> 注： <br/> 控件内保存数据使用的key为'fd-m000016-data' | use_cache={true}
id_field | 提供的数据中可以作为id的字段名, 该字段用来标识每一条结点数据 | id_field='no'
pid_field | 提供的数据中可以作为pid的字段名，该字段用来标识该结点的父结点 | pid_field='parent'
text_field | 提供的数据中可以作为text的字段名，该字段用来在结点上显示 | text_field='name'
select_address | 设置选中值 | select_address=['AAAA','CCCC','EEEE']
title | 选择器标题 | title='自定义标题'
prompt | 设置选择引导文字 | prompt='请选择'
active_color | 设置选中的颜色 | active_color={'#D0648F'}
content_style | 设置列表样式 | content_style={{ backgroundColor: '#F2F2F2' }}
onSelected | 选择回调 | onSelected={(address) => { console.log('address: ', address);}}

## Example

```tsx
import RelationPicker from '@dfeidao/fd-m000016';


<RelationPicker
	show={this.state.show}
	select_address={this.state.address}
	id_field='no'
	pid_field='parent'
	title='自定义标题'
	text_field='name'
	// data='http://172.16.15.22:8889/get-data'
	data={[{ no: '1', parent: 'root', name: 'AAAA' }, { no: '8', parent: 'root', name: '&&&&' }, { no: '2', parent: '0', name: 'BBBB' }, { no: '11', parent: '1', name: 'CCCC' }, { no: '12', parent: '1', name: 'DDDD' }, { no: '111', parent: '11', name: 'EEEE' }, { no: '112', parent: '11', name: 'FFFF' }, { no: '211', parent: '2', name: 'GGGG' }]}
	onSelected={(address) => {
		console.log('address: ', address);
		this.setState({
			address
		});
	}}
/>
<Button onPress={() => {
	this.setState({ show: true });
}} title={this.state.address.toString()}></Button>
```

## ChangeLogs

### latest

存在不兼容的调整！

1. data可以传递为数据，也可以设置为数据源地址（post）。设置为数据源地址时，渲染的数据要在服务处理好。
2. 增加use_cache属性，设置使用缓存，缓存的key为fd-m000016-data。仅当设置为数据源地址时有效
3. 添加控件依赖 @react-native-community/async-storage，如果项目中没有link此库，需要执行 `react-native link @react-native-community/async-storage`

### 4.6.201907041838