-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add sendTelegramMessage function
- Loading branch information
0 parents
commit 5f652ab
Showing
19 changed files
with
5,302 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM docker.io/node:22.4.1 | ||
|
||
USER node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"build": { | ||
"context": ".", | ||
"dockerfile": "./Dockerfile" | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode", | ||
"streetsidesoftware.code-spell-checker" | ||
] | ||
} | ||
}, | ||
"name": "Node.js 22" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
publish-npm: | ||
runs-on: ubuntu-latest | ||
env: | ||
ANCA_CI: true | ||
name: "Publish package to npm registry" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
name: "Checkout repo" | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22.4.1 | ||
registry-url: https://registry.npmjs.org/ | ||
name: "Install Node.js" | ||
- run: npm ci | ||
name: "Install dependencies" | ||
- run: npm test | ||
name: "Run tests" | ||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.npm_token}} | ||
name: "Build distribution bundle and publish to registry" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: ["**"] | ||
|
||
jobs: | ||
test-commit: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node: [18.20.4, 20.15.1, 22.4.1] | ||
name: Test repo on Node.js ${{ matrix.node }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
name: "Checkout repo" | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
registry-url: https://registry.npmjs.org/ | ||
name: "Install Node.js" | ||
- run: npm ci | ||
name: "Install dependencies" | ||
- run: npm test | ||
name: "Run tests" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Editor directories and files | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
.vscode | ||
|
||
# Logs | ||
logs | ||
*.log | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
*.lock | ||
|
||
# Temp folder | ||
tmp | ||
|
||
# Built sources | ||
/dist | ||
/build | ||
*.spec | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
.yarn/cache | ||
.yarn/unplugged | ||
.yarn/build-state.yml | ||
.yarn/install-state.gz | ||
.pnp.* | ||
.yarn-integrity | ||
|
||
# Local settings | ||
.env | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
.env.local | ||
|
||
# Node.js logs | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Output of 'npm pack' | ||
*.tgz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# General | ||
**/.git | ||
**/.svn | ||
**/.hg | ||
|
||
# Binaries | ||
/bin | ||
|
||
# Devcontainer | ||
.devcontainer | ||
|
||
# Node.js | ||
**/node_modules | ||
package-lock.json | ||
|
||
# Distributions | ||
/build | ||
/dist | ||
|
||
# Cinnabar Meta | ||
**/cinnabar.js | ||
**/cinnabar.ts | ||
cinnabar.json | ||
CHANGELOG.md | ||
|
||
# Anca | ||
anca.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Contributing | ||
|
||
Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or create a pull request. | ||
|
||
## Installation | ||
|
||
We support [Devcontainers](https://containers.dev/). You can use the provided development container to work on this project. The development container includes all the necessary tools and dependencies to work on this project. | ||
|
||
Otherwise, download, install and configure [Node.js](https://nodejs.org/en/download/). | ||
|
||
Then, run the following commands to install the dependencies and run the tests: | ||
|
||
```bash | ||
npm ci | ||
npm test | ||
``` | ||
|
||
## Authors | ||
|
||
### Maintainers | ||
|
||
- Timur Moziev ([@TimurRin](https://github.com/TimurRin)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
ISC License | ||
|
||
Copyright (c) 2024 Timur Moziev | ||
|
||
Permission to use, copy, modify, and/or distribute this software for any | ||
purpose with or without fee is hereby granted, provided that the above | ||
copyright notice and this permission notice appear in all copies. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | ||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | ||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | ||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR | ||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | ||
PERFORMANCE OF THIS SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Cinnagram | ||
|
||
> **DISCLAIMER**: This project is not production ready. All versions below 1.0.0 should be considered unstable | ||
Simple Telegram API handler | ||
|
||
## Installation | ||
|
||
### npm | ||
|
||
```bash | ||
npm install cinnagram | ||
``` | ||
|
||
## Usage | ||
|
||
### Send message | ||
|
||
```javascript | ||
sendTelegramMessage( | ||
"TELEGRAM_BOT_TOKEN", | ||
1234, | ||
"Hello, my *dear* friends!", | ||
"markdown", | ||
); | ||
``` | ||
|
||
## Contributing | ||
|
||
Visit [`CONTRIBUTING.md`](CONTRIBUTING.md). | ||
|
||
Current maintainers: | ||
|
||
- Timur Moziev ([@TimurRin](https://github.com/TimurRin)) | ||
|
||
## License | ||
|
||
Visit [`LICENSE`](LICENSE). | ||
|
||
## Anca | ||
|
||
This repository is a part of [Anca](https://github.com/cinnabar-forge/anca) standardization project. Parts of the files and code are generated by Anca. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"authors": [ | ||
{ | ||
"name": "Timur Moziev", | ||
"github": "TimurRin", | ||
"email": "timur.moziev@gmail.com", | ||
"type": "maintainer", | ||
"url": "https://timurrin.github.io/" | ||
} | ||
], | ||
"cinnabarMeta": { | ||
"dataVersion": 0, | ||
"version": { | ||
"latest": "0.0.0", | ||
"timestamp": 0 | ||
}, | ||
"files": [ | ||
{ | ||
"path": "./package.json", | ||
"type": "nodejs-package-json" | ||
}, | ||
{ | ||
"path": "./package-lock.json", | ||
"type": "nodejs-package-lock-json" | ||
} | ||
], | ||
"repo": { | ||
"type": "github", | ||
"value": "cinnabar-forge/cinnagram" | ||
}, | ||
"updateChangelog": true | ||
}, | ||
"development": { | ||
"readme": {} | ||
}, | ||
"type": "library", | ||
"stack": "nodejs" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import cinnabarPlugin from "@cinnabar-forge/eslint-plugin"; | ||
|
||
const files = ["src/**/*.ts"]; | ||
const ignores = ["bin/**/*", "build/**/*", "dist/**/*"]; | ||
|
||
export default [ | ||
...cinnabarPlugin.default.map((config) => ({ | ||
...config, | ||
files, | ||
})), | ||
{ | ||
files, | ||
rules: { | ||
"jsdoc/require-param-description": "off", | ||
"jsdoc/require-param-type": "off", | ||
"jsdoc/require-returns": "off", | ||
"jsdoc/require-returns-type": "off", | ||
"security/detect-non-literal-fs-filename": "off", | ||
"security/detect-object-injection": "off", | ||
}, | ||
}, | ||
{ | ||
ignores, | ||
}, | ||
]; |
Oops, something went wrong.