open-index/open-npm huggingface dataset:
npm package: @shubuzuo/grpc-promise-ts
Description: Type safe GRPC with a modern API
Author: @shubuzuo/grpcjs-promise-ts
Latest version: 0.2.2

# Typescript gRPC stubs with a Promise API

> This package is under development and should not be used
> by anyone for any reason at this time. _Only client Unary RPCs are
> implemented._ If you'd like to add support for streaming RPCs,
> I'd love it, especially later in the summer, if you'd
> [grab](./grpc-promise-ts/issues/1) [an](./grpc-promise-ts/issues/2) [issue](./grpc-promise-ts/issues/3).

_A Typescript fork of [`grpc-promise`](../carlessistare/grpc-promise)_

## Usage

**View the [example app](https://github.com/rhinodavid/grpc-promise-ts-example-app)
for motivation and implementation details.**
npm package: @shubuzuo/nestjs-email
Description: 对项目中 第三方 邮箱服务 进行包装
Author: 1409458062@qq.com
Latest version: 0.0.5


# nest-email email 封装
注意：<font color="#dd0000">仍在开发中，目前仅在内部使用</font><br /> 
[Nest](https://github.com/nestjs/nest)框架 短信服务 插件

## 使用说明
外部人员仅供参考，请不要用于生产环境，因此导致的事故后果请自行承担。

## 安装

```bash
$ npm i @shubuzuo/nestjs-email
```
or 
```bash
$ yarn add @shubuzuo/nestjs-email 
```

## 用法
config.js ??
```javascript
export const config = {
	"ApiKeyPublic": "-------",
  "ApiKeyPrivate": "-------"
};
```

module.ts
```javascript
import { AppController } from './test.controller';
import { EmailModule } from '@shubuzuo/nestjs-email';

const config = {
                apiKey: '-------------------',
                apiSecret: '-----------------------'
              }

@Module({
	imports: [ 
		EmailModule.forRoot(config)
	],
	controllers: [AppController],
})

export class AppModule{}

```
controller.ts
```javascript
import { Controller, Get } from '@nestjs/common';
import { AppService } from './app.service';
import { EmailService } from '@shubuzuo/nestjs-email';

@Controller()
export class AppController {
  constructor(
    private readonly emailService: EmailService
  ) {}

  @Get('email')
  async setEmali(): Promise<any> {

    await this.emailService.send(
      // 此项 马上 加入 配置项 和key一起配置
      {
        Email: '邮箱地址',
        Name: '邮箱名字'
      },
      {
        emailAddress: '目的邮箱地址',
        name: '邮件名字'
      },
      {
        subject: '副标题',
        text: '文本',
        html: `html 片段`
      }
    )
  }
}

```
npm package: @shubuzuo/nestjs-oss
Description: 对需要及可能用到的 第三方 OSS 模块进行封装, 降低对项目的侵入
Author: shubuzuo
Latest version: 0.0.7


# nest-oss OSS 封装
注意：<font color="#dd0000">仍在开发中，目前仅在内部使用</font><br /> 
[Nest](https://github.com/nestjs/nest)框架 云 OSS (暂有 ali) 上传插件

## 使用说明
外部人员仅供参考，请不要用于生产环境，因此导致的事故后果请自行承担。

## 安装

```bash
$ npm i @shubuzuo/nestjs-oss 
```
or 
```bash
$ yarn add @shubuzuo/nestjs-oss 
```

## 用法
config.js 配置
```javascript
export const config = {
	client: {
		endpoint: 'oss-cn-shenzhen.aliyuncs.com', // endpoint域名
		accessKeyId: 'xxxxxxxxxxxx', // 账号
		accessKeySecret: 'xxxxxxx', // 密码
		bucket: 'xxxxxx', // 存储桶
		internal: false, // 是否使用阿里云内部网访问
		secure: true, // 使用 HTTPS
		cname: false, // 自定义endpoint
		timeout: '90s'
	},
	domain: '', // 自定义域名
};
```

module.ts
```javascript
import { AppController } from './test.controller';
import { IninderOssModule } from '@shubuzuo/nestjs-oss';

const config = {}

@Module({
	imports: [ 
		IninderOssModule.forRoot(config)
	],
	controllers: [AppController],
})

export class AppModule{}

```
controller.ts
```javascript
import { Controller, Req, Post, Get, UseInterceptors, UploadedFiles } from '@nestjs/common';
import { FilesInterceptor } from '@nestjs/platform-express';
import { AliOssService } from '@shubuzuo/nestjs-oss';

/**
 * AppController
 * @export
 * @class AppControllerr
 */
@Controller()
export class AppController {
    constructor(private readonly aliOssService: AliOssService) {}

   /**
    * 多文件上传oss
    */
    @Post('uploadOSS')
    @UseInterceptors(FilesInterceptor('files'))
	public async uploadOSS(@UploadedFiles() file) {
		const result = await this.aliOssService.upload(file);

		return result;
		// result [
		// 	{
		// 		uploaded: true,
		// 		path: 'images/20191115/16420962.png',
		// 		src: 'http://xxxx.oss-cn-shenzhen.aliyuncs.com/images/20191115/16420962.png',
		// 		srcSign: 'https://xxx.oss-cn-shenzhen.aliyuncs.com/images/20191115/16420962.png?OSSAccessKeyId=LTAI6lgwcBcCbiKX&Expires=1573814530&Signature=brYN7qbDdyxGARc%2BdoRsnblJx2w%3D',
		// 		message: '上传成功'
		// 	}
		// ]
    }
    
    /**
     * 对oss文件签名
     */
    @Get('getUrl')
    public async uploadOSS(@Req() request) {
        const url = req.query.url; // 原始oss url
        const width = req.query.width; // 设置返回图片宽度
        const height = req.query.height; // 设置返回图片高度
        const result = await this.aliOssService.getOssSign(file, width, height);

        return result;
	}
	
	/**
	 * 前端获取签名
	 */
	@Get('uploadSgin')
	public getUploadSgin() {
		const result = this.aliOssService.getUploadSgin();

		return result;

        // result {
		// 	policy: 'xxxxxxxxxxxxxx';
		// 	OSSAccessKeyId: 'xxxxxxxxxxxxxx'
		// 	signature: 'xxxxxxxxxxxxxx'
		// }
	}

    /**
     * 批量删除图片
     */
    @Get('delete')
    public async deleteOSS(@Req() request) {
        const uploadUrl = ['images/20191115/16420962.png'];
		const result = await this.aliOssService.deleteMulti([uploadUrl]);

		return result;
		// result {
		// 	res: {
		// 		status: 200,
		// 		statusCode: 200,
		// 		statusMessage: 'OK',
		// 		// ....
		// 	},
		//  deleted: [ 'images/20191115/16420962.png' ]
		// }
    }
}
```
npm package: @shubuzuo/nestjs-sms
Description: 对项目中 第三方短信 (aws) 服务 进行包装
Author: 1409458062@qq.com
Latest version: 0.0.6


# nest-sms SMS 封装
注意：<font color="#dd0000">仍在开发中，目前仅在内部使用</font><br /> 
[Nest](https://github.com/nestjs/nest)框架 短信服务 插件

## 使用说明
外部人员仅供参考，请不要用于生产环境，因此导致的事故后果请自行承担。

## 安装

```bash
$ npm i @shubuzuo/nestjs-sms
```
or 
```bash
$ yarn add @shubuzuo/nestjs-sms 
```

## 用法
config.js 配置
```javascript

export const config = {
	"ApiKeyPublic": "-------",
  "ApiKeyPrivate": "-------"
};

```

module.ts
```javascript
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AwsSmsModule } from '@shubuzuo/nestjs-sms'

@Module({
  imports: [
    AwsSmsModule.forRoot({
      accessKeyId: '------',
      secretAccessKey: '------',
      apiVersion: '------',
      region: '-----',
    })
  ],
  controllers: [AppController],
  providers: [],
})
export class AppModule {}

```
controller.ts
```javascript
import { Controller, Get } from '@nestjs/common';
import { AwsSmsService, PublishResponse } from '@shubuzuo/nestjs-sms';

@Controller()
export class AppController {
  constructor(
    private readonly awsSmsService: AwsSmsService
  ) {}

  @Get('sms')
  async setSms(): Promise<PublishResponse> {
    return  await this.awsSmsService.send('17630802711', '短信内容')
  }
}

```