Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

winston-telegram

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

winston-telegram - npm Package Compare versions

Comparing version 2.6.0 to 2.7.0

33

CHANGELOG.md

@@ -10,2 +10,6 @@ # Changelog

## [v2.7.0] - 2024-01-06
### Added
- [#40](https://github.com/ivanmarban/winston-telegram/issues/40) Support for chats with threads enabled.
## [v2.6.0] - 2022-05-15

@@ -89,2 +93,24 @@ ### Fixed

## [v1.4.2] - 2019-12-11
### Fixed
- [#16](https://github.com/ivanmarban/winston-telegram/issues/16) Use `Buffer.byteLength` to compute the `Content-Length` header.
## [v1.4.1] - 2019-06-22
### Fixed
- Fix custom-format example.
### Changed
- Code refactoring.
## [v1.4.0] - 2019-05-26
### Fixed
- Fix custom-format example.
### Changed
- Replace [Request](https://github.com/request/request) by standard https Node.js lib.
## [v1.3.2] - 2019-05-04
### Changed
- Code style & JSDoc
## [v1.3.1] - 2019-01-07

@@ -156,3 +182,4 @@ ### Fixed

[unreleased]: https://github.com/ivanmarban/winston-telegram/compare/v2.6.0...develop
[unreleased]: https://github.com/ivanmarban/winston-telegram/compare/v2.7.0...develop
[v2.7.0]: https://github.com/ivanmarban/winston-telegram/compare/v2.6.0...v2.7.0
[v2.6.0]: https://github.com/ivanmarban/winston-telegram/compare/v2.5.0...v2.6.0

@@ -174,2 +201,6 @@ [v2.5.0]: https://github.com/ivanmarban/winston-telegram/compare/v2.4.1...v2.5.0

[v2.0.0]: https://github.com/ivanmarban/winston-telegram/compare/v1.3.1...v2.0.0
[v1.4.2]: https://github.com/ivanmarban/winston-telegram/compare/v1.4.1...v1.4.2
[v1.4.1]: https://github.com/ivanmarban/winston-telegram/compare/v1.4.0...v1.4.1
[v1.4.0]: https://github.com/ivanmarban/winston-telegram/compare/v1.3.2...v1.4.0
[v1.3.2]: https://github.com/ivanmarban/winston-telegram/compare/v1.3.1...v1.3.2
[v1.3.1]: https://github.com/ivanmarban/winston-telegram/compare/v1.3.0...v1.3.1

@@ -176,0 +207,0 @@ [v1.3.0]: https://github.com/ivanmarban/winston-telegram/compare/v1.2.1...v1.3.0

@@ -13,2 +13,4 @@ import TransportStream = require("winston-transport")

chatId: number
/** The Telegram identifier of a message thread to which the message belongs. */
messageThreadId?: number
/** The Telegram mode for parsing entities in the message text. */

@@ -15,0 +17,0 @@ parseMode?: string

@@ -18,2 +18,3 @@ /*

* @param {string} options.chatId - Telegram unique identifier for chat.
* @param {string} [options.messageThreadId=''] - Telegram unique identifier of a message thread to which the message belongs.
* @param {string} [options.parseMode=''] - Telegram mode for parsing entities in the message text.

@@ -45,2 +46,3 @@ * @param {string} [options.level='info'] - Level of messages that this transport should log.

this.chatId = options.chatId
this.messageThreadId = options.messageThreadId || ''
this.parseMode = options.parseMode || ''

@@ -141,2 +143,3 @@ this.level = options.level || 'info'

chat_id: this.chatId,
message_thread_id: this.messageThreadId,
text: messageText,

@@ -143,0 +146,0 @@ disable_notification: this.disableNotification,

27

package.json
{
"name": "winston-telegram",
"description": "A Telegram transport for winston",
"version": "2.6.0",
"version": "2.7.0",
"author": "Ivan Marban",

@@ -34,17 +34,17 @@ "repository": {

"devDependencies": {
"chai": "^4.3.6",
"chai": "^4.3.10",
"coveralls": "^3.1.1",
"eslint": "^8.15.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsdoc": "^39.2.9",
"eslint-plugin-mocha": "^10.0.4",
"eslint-plugin-n": "^15.2.0",
"eslint": "^8.56.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsdoc": "^48.0.2",
"eslint-plugin-mocha": "^10.2.0",
"eslint-plugin-n": "^16.6.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.0.0",
"mocha": "^10.0.0",
"nock": "^13.2.4",
"eslint-plugin-promise": "^6.1.1",
"mocha": "^10.2.0",
"nock": "^13.4.0",
"nyc": "^15.1.0",
"prettier-standard": "^16.4.1",
"sinon": "^14.0.0",
"sinon": "^17.0.1",
"winston": "^3.7.2"

@@ -55,4 +55,5 @@ },

"format": "prettier-standard 'lib/**/*.js' 'test/**/*.js' 'examples/**/*.js'",
"test": "nyc --reporter=text --reporter=html --reporter=lcovonly mocha"
"test": "mocha",
"test:coverage": "nyc npm run test"
}
}

@@ -9,7 +9,5 @@ # winston-telegram

[![npm Downloads](https://img.shields.io/npm/dw/winston-telegram.svg)](https://npmcharts.com/compare/winston-telegram?minimal=true)
[![Tests Status](https://github.com/ivanmarban/winston-telegram/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/ivanmarban/winston-telegram/actions/workflows/tests.yml)
[![CI Status](https://github.com/ivanmarban/winston-telegram/actions/workflows/ci.yaml/badge.svg?branch=master)](https://github.com/ivanmarban/winston-telegram/actions/workflows/ci.yaml)
[![Coverage Status](https://coveralls.io/repos/github/ivanmarban/winston-telegram/badge.svg?branch=master)](https://coveralls.io/github/ivanmarban/winston-telegram?branch=master)
[![dependencies Status](https://david-dm.org/ivanmarban/winston-telegram/status.svg)](https://david-dm.org/ivanmarban/winston-telegram)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
[![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=SJLW6PTHQQNBS)

@@ -40,14 +38,15 @@ ## winston-telegram@2

* __token:__ The Telegram bot authentication token. *[required]*
* __chatId:__ The Telegram chatid you want to send to. *[required]*
* __parseMode:__ The Telegram mode for parsing entities in the message text. See [formatting options][4] for more details. *[optional]*
* __level:__ Level of messages that this transport should log. *[optional]* *[default info]*
* __unique:__ Whether to log only the declared level and none above. *[boolean]* *[optional]*
* __silent:__ Whether to suppress output. *[boolean]* *[optional]*
* __disableNotification:__ Sends the message silently. *[boolean]* *[optional]*
* __template:__ Format output message. *[string]* *[optional]*
* __formatMessage:__ Format output message by own method. *[function]* *[optional]*
* __handleExceptions:__ Handle uncaught exceptions. *[boolean]* *[optional]*
* __batchingDelay:__ Time in ms within which to batch messages together. *[integer]* *[optional]* *[default 0 or disabled]*
* __batchingSeparator:__ String with which to join batched messages with *[string]* *[default "\n\n"]*
* `token` The Telegram bot authentication token. *[required]*
* `chatId` The Telegram chatid you want to send to. *[required]*
* `messageThreadId` The Telegram unique identifier of a message thread to which the message belongs. *[optional]*
* `parseMode` The Telegram mode for parsing entities in the message text. See [formatting options][4] for more details. *[optional]*
* `level` Level of messages that this transport should log. *[optional]* *[default info]*
* `unique` Whether to log only the declared level and none above. *[boolean]* *[optional]*
* `silent` Whether to suppress output. *[boolean]* *[optional]*
* `disableNotification` Sends the message silently. *[boolean]* *[optional]*
* `template` Format output message. *[string]* *[optional]*
* `formatMessage` Format output message by own method. *[function]* *[optional]*
* `handleExceptions` Handle uncaught exceptions. *[boolean]* *[optional]*
* `batchingDelay` Time in ms within which to batch messages together. *[integer]* *[optional]* *[default 0 or disabled]*
* `batchingSeparator` String with which to join batched messages with *[string]* *[default "\n\n"]*

@@ -54,0 +53,0 @@ String template is based on named arguments:

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc