npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@horat1us/release-utils

v4.0.1

Published

## Telegram-notify Поддерживает отправку сообщений 2 вариантами:

Downloads

265

Readme

Release Utils

Telegram-notify

Поддерживает отправку сообщений 2 вариантами:

  1. Когда в текущей папке есть файл env.json и в нем лежат все переменные, полученные путем выполнения файла https://gist.githubusercontent.com/Horat1us/8ffc5814b0f3c5fbf95370ac8b778455/raw/1b234ab19ca514caa8e098736493b3795781203e/codebuild-git-env.sh на стадии билда проекта на AWS Codebuild. А также существуют переменные REPO_OWNER (владелец репозитория) и GITHUB_AUTH_TOKEN (токен авторизации к github).
  2. При наличии переменных окружения таких как: GIT_COMMIT_MESSAGE, GIT_COMMIT_AUTHOR, GIT_COMMIT_URL, GITHUB_REPOSITORY (например: "facebook/react"), FAILURE (0 | 1).

Также в обоих случаях нужны переменные окружения BOT_API_KEY (ключ телеграм бота), CHAT_ID.

Examples

AWS CodeBuild

curl -O https://gist.githubusercontent.com/Horat1us/8ffc5814b0f3c5fbf95370ac8b778455/raw/1b234ab19ca514caa8e098736493b3795781203e/codebuild-git-env.sh
chmod +x ./codebuild-git-env.sh
./codebuild-git-env.sh > ./env.json
if [[ "$CODEBUILD_BUILD_SUCCEEDING" == "0" ]]; then
  npm i -g @horat1us/[email protected];
  telegram-notify-deploy;
fi;

GitHub Actions

name: Set commit variables
if: ${{ always() }}
run: |
  echo "GIT_COMMIT_MESSAGE=$(git log --format=%B -n 1 ${{ github.event.after }})" >> $GITHUB_ENV
  echo "GIT_COMMIT_AUTHOR=$(git log --format=%an -n 1 ${{ github.event.after }})" >> $GITHUB_ENV
  echo "GIT_COMMIT_URL=https://github.com/${GITHUB_REPOSITORY}/commit/${{ github.event.after }}" >> $GITHUB_ENV
name: Send deploy notification
if: ${{ always() }}
env:
  FAILURE: ${{ env.FAILURE }}
  GIT_COMMIT_MESSAGE: ${{ env.GIT_COMMIT_MESSAGE }}
  GIT_COMMIT_AUTHOR: ${{ env.GIT_COMMIT_AUTHOR }}
  GIT_COMMIT_URL: ${{ env.GIT_COMMIT_URL }}
run: |
  npm i -g @horat1us/[email protected]
  telegram-notify-deploy