Merge branch 'master' of bitbucket.org:robotmafia-inc/nestjs-telegraf into feature/merge-repos

 Conflicts:
	package-lock.json
	package.json
This commit is contained in:
donbot 2020-03-31 18:30:49 +03:00
commit 63a5ed3b17
9 changed files with 1623 additions and 270 deletions

27
.eslintrc.js Normal file
View File

@ -0,0 +1,27 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'prettier/@typescript-eslint',
],
root: true,
env: {
node: true,
jest: true,
},
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/ban-types': 'off',
},
};

View File

@ -2,6 +2,6 @@
lib lib
index.ts index.ts
package-lock.json package-lock.json
tslint.json
tsconfig.json tsconfig.json
.prettierrc .prettierrc
.eslintrc.js

View File

@ -1,15 +0,0 @@
language: node_js
node_js:
- '8'
- '10'
cache: yarn
script: yarn ci
deploy:
provider: npm
email: igor@kamyshev.me
skip_cleanup: true
api_key:
secure: rJmwaR1wtXZQCN0acIJy0vZ19idA7DHa72TOVUGNsYbvX6OhYyXOwU4eftRKXgjESg8IG5jF0jAN2PEHfSyLnl08qkFsv7+pzEnE+LnDcfsw4VAtNE2b2BvAlbUDYzR4l6QR1n/lvRxAitqBa05rLxtfrkXj0jTiZlRbT1TtMzN5MzHg4xFyGbENoTndRd9AiQwFU3Ham3yZT0OZDb5EtKO5CoZrdO4eNVrJTiT/KSi3JIRGkPvj6AbVr0ku93G+93+IcrNQw8qm3R9++SxvKAIh5aOyMXIOAlT/CIAhi/4CXtMa1IJW2EwStrHZymvw0hx2HXixmiHvRT0wMYgQqPJyHYEqO8ikQBPqskn7oFiZItoHvdg/W2Jb3QVOV4sywjXRlbbOQmAXQg9WK5+qvM8nmg5sfKSLqI/1NWrutlgsoyfo6bZ7xf8IWi5Os7MTp8p1B4YoLQOO1b3lbZ6tGL7TaJn3n0d0cPu2hSzmj39Pr9lMyVdA8iHeS9LyfIfNiRKZ546TsJO/UuojibBy696jjOWdradnW+bpHUNQ3a4lM6f4HjtcAgm3YeRwkPWGTcuMAObh15aHJuB3DGiqqplD6QhQZgz1/urW9f4u4I46QnVp24hKXun/ee58Rv7hLLB9rvvTGIEAbTZtMongWa7jdUH7QKD5/M/2iS1Hxcs=
on:
tags: true
repo: igorkamyshev/nest-telegram

View File

@ -1,153 +0,0 @@
# Change Log
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [0.5.1](https://github.com/igorkamyshev/nest-telegram/compare/v0.5.0...v0.5.1) (2019-07-26)
### Bug Fixes
* add removing webhook before start pooling ([b9d659e](https://github.com/igorkamyshev/nest-telegram/commit/b9d659e))
# Change Log
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
# [0.5.0](https://github.com/igorkamyshev/nest-telegram/compare/v0.4.0...v0.5.0) (2019-07-18)
### Features
* add method for sending markdown ([9be7bdc](https://github.com/igorkamyshev/nest-telegram/commit/9be7bdc))
# Change Log
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
# [0.4.0](https://github.com/igorkamyshev/nest-telegram/compare/v0.3.2...v0.4.0) (2019-05-20)
### Features
* add on message decorator handler ([c47c055](https://github.com/igorkamyshev/nest-telegram/commit/c47c055))
# Change Log
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [0.3.2](https://github.com/igorkamyshev/nest-telegram/compare/v0.3.1...v0.3.2) (2019-05-11)
### Bug Fixes
* **client:** fix import and export ([303caea](https://github.com/igorkamyshev/nest-telegram/commit/303caea))
# Change Log
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [0.3.1](https://github.com/igorkamyshev/nest-telegram/compare/v0.3.0...v0.3.1) (2019-05-11)
### Bug Fixes
* **client:** add miss export ([a5a9c07](https://github.com/igorkamyshev/nest-telegram/commit/a5a9c07))
# Change Log
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
# [0.3.0](https://github.com/igorkamyshev/nest-telegram/compare/v0.2.3...v0.3.0) (2019-05-11)
### Features
* **client:** add simple telegram client ([d2aa6eb](https://github.com/igorkamyshev/nest-telegram/commit/d2aa6eb))
# Change Log
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [0.2.3](https://github.com/igorkamyshev/nest-telegram/compare/v0.2.2...v0.2.3) (2019-03-03)
### Bug Fixes
* fix path for webhook ([8bfcc76](https://github.com/igorkamyshev/nest-telegram/commit/8bfcc76))
# Change Log
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [0.2.2](https://github.com/igorkamyshev/nest-telegram/compare/v0.2.1...v0.2.2) (2019-03-03)
### Bug Fixes
* initiate bot in costructor ([bbc1d1d](https://github.com/igorkamyshev/nest-telegram/commit/bbc1d1d))
# Change Log
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [0.2.1](https://github.com/igorkamyshev/nest-telegram/compare/v0.2.0...v0.2.1) (2019-03-03)
### Bug Fixes
* fix auto-import ([27ca6c2](https://github.com/igorkamyshev/nest-telegram/commit/27ca6c2))
# Change Log
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
# [0.2.0](https://github.com/igorkamyshev/nest-telegram/compare/v0.1.1...v0.2.0) (2019-03-03)
### Features
* add ability to use webhook ([c546b17](https://github.com/igorkamyshev/nest-telegram/commit/c546b17))
# Change Log
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [0.1.1](https://github.com/igorkamyshev/nest-telegram/compare/v0.1.0...v0.1.1) (2019-02-28)
### Bug Fixes
* fix typo in import ([45c0e89](https://github.com/igorkamyshev/nest-telegram/commit/45c0e89))
# Change Log
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
# 0.1.0 (2019-02-28)
### Features
* add initial code ([4324f0f](https://github.com/igorkamyshev/nest-telegram/commit/4324f0f))

View File

@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2019 Bukhalo Aleksandr Aleksandrovich & Igor Kamyshev Copyright (c) 2019 - present robotmafia Inc. & Bukhalo Aleksandr Aleksandrovich & Igor Kamyshev
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@ -1,28 +1,6 @@
<p align="center">
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
</p>
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
[circleci-url]: https://circleci.com/gh/nestjs/nest
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
<p align="center">
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/core.svg" alt="NPM Downloads" /></a>
<a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a>
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg" alt="Support us"></a>
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
</p>
## Description ## Description
[Telegraf](https://github.com/telegraf/telegraf) module for [Nest](https://github.com/nestjs/nest). [Telegraf](https://github.com/telegraf/telegraf) module for [NestJS](https://github.com/nestjs/nest).
## Installation ## Installation
@ -111,7 +89,7 @@ Like other [factory providers](https://docs.nestjs.com/fundamentals/custom-provi
TelegrafModule.forRootAsync({ TelegrafModule.forRootAsync({
imports: [ConfigModule], imports: [ConfigModule],
useFactory: async (configService: ConfigService) => ({ useFactory: async (configService: ConfigService) => ({
token: configService.getString('TELEGRAM_BOT_TOKEN'), token: configService.get<string>('TELEGRAM_BOT_TOKEN'),
}), }),
inject: [ConfigService], inject: [ConfigService],
}); });
@ -147,16 +125,7 @@ TelegrafModule.forRootAsync({
}); });
``` ```
## Support
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
## People ## People
- Authors - [Aleksandr Bukhalo](https://bukhalo.com/) & [Igor Kamyshev](https://kamyshev.me/) - Authors - [robotmafia Inc.](https://robotmafia.io) & [Aleksandr Bukhalo](https://bukhalo.com/) & [Igor Kamyshev](https://kamyshev.me/)
- Maintainers - [Aleksandr Bukhalo](https://bukhalo.com/) - Maintainers - [robotmafia Inc.](https://robotmafia.io/)
- Website - [https://nestjs.com](https://nestjs.com/)
## License
Nest is [MIT licensed](https://github.com/nestjs/nest/blob/master/LICENSE).

1589
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +1,11 @@
{ {
"name": "nestjs-telegraf", "name": "@robotmafia-inc/nestjs-telegraf",
"version": "1.0.0-alpha.1", "version": "1.0.1",
"description": "Telegraf module for Nest framework", "description": "Telegraf module for NestJS",
"keywords": [ "keywords": [
"nest", "nest",
"nestjs", "nestjs",
"nodejs", "nestjs-module",
"typescript",
"telegraf", "telegraf",
"telegram", "telegram",
"telegram bot", "telegram bot",
@ -15,33 +14,37 @@
"bot api", "bot api",
"bot framework" "bot framework"
], ],
"homepage": "https://github.com/bukhalo/nestjs-telegraf#readme", "homepage": "https://bitbucket.org/robotmafia-inc/nestjs-telegraf",
"bugs": { "bugs": {
"url": "https://github.com/bukhalo/nestjs-telegraf/issues", "url": "https://bitbucket.org/robotmafia-inc/nestjs-telegraf/issues"
"email": "aleksandr@bukhalo.com"
}, },
"license": "MIT", "license": "MIT",
"author": "Aleksandr Bukhalo <aleksandr@bukhalo.com>", "author": "robotmafia Inc. <hello@robotmafia.io>",
"contributors": [ "contributors": [
"donbot <donbot@robotmafia.io>",
"Aleksandr Bukhalo <aleksandr@bukhalo.com> (https://bukhalo.com/)", "Aleksandr Bukhalo <aleksandr@bukhalo.com> (https://bukhalo.com/)",
"Igor Kamyshev <igor@kamyshev.me> (https://kamyshev.me/)" "Igor Kamyshev <igor@kamyshev.me> (https://kamyshev.me/)"
], ],
"repository": "git@github.com:bukhalo/nestjs-telegraf.git", "repository": "git@bitbucket.org:robotmafia-inc/nestjs-telegraf.git",
"scripts": { "scripts": {
"build": "rm -rf dist && tsc -p tsconfig.json", "build": "rm -rf dist && tsc -p tsconfig.json",
"precommit": "lint-staged", "precommit": "lint-staged",
"prepublish:npm": "npm run build", "prepublish:npm": "npm run build",
"publish:npm": "npm publish --access public", "publish:npm": "npm publish --access public"
"test": ""
}, },
"dependencies": { "dependencies": {
"telegraf": "3.37.0" "telegraf": "3.36.0"
}, },
"devDependencies": { "devDependencies": {
"@nestjs/common": "7.0.7", "@nestjs/common": "7.0.6",
"@nestjs/core": "7.0.7", "@nestjs/core": "7.0.6",
"@typescript-eslint/eslint-plugin": "2.25.0",
"@typescript-eslint/parser": "2.25.0",
"eslint": "6.8.0",
"eslint-config-prettier": "6.10.1",
"eslint-plugin-import": "2.20.1",
"husky": "4.2.3", "husky": "4.2.3",
"lint-staged": "10.1.1", "lint-staged": "10.0.9",
"prettier": "2.0.2", "prettier": "2.0.2",
"reflect-metadata": "0.1.13", "reflect-metadata": "0.1.13",
"typescript": "3.8.3" "typescript": "3.8.3"

View File

@ -1,29 +0,0 @@
{
"defaultSeverity": "error",
"extends": ["tslint:recommended"],
"jsRules": {},
"rules": {
"quotemark": [true, "single", "avoid-escape"],
"object-literal-sort-keys": false,
"ordered-imports": [
true,
{
"import-sources-order": "any",
"named-imports-order": "any"
}
],
"no-console": [false],
"interface-name": [true, "never-prefix"],
"eofline": false,
"linebreak-style": [false],
"indent": false,
"member-access": false,
"ban-types": false,
"max-classes-per-file": [false],
"member-ordering": [false],
"no-var-requires": false,
"one-line": [false],
"array-type": [false]
},
"rulesDirectory": []
}