@patricktobias86/node-red-telegram-account 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/nodes/auth.js +4 -4
- package/nodes/command.js +1 -1
- package/nodes/iter-dialogs.html +1 -1
- package/nodes/receiver.js +1 -1
- package/nodes/send-file.html +1 -1
- package/nodes/send-file.js +1 -1
- package/package.json +7 -9
- package/.github/workflows/npm-publish.yml +0 -33
package/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Node-
|
|
1
|
+
### Node-RED nodes to communicate with GramJS.
|
package/nodes/auth.js
CHANGED
|
@@ -32,20 +32,20 @@ module.exports = function (RED) {
|
|
|
32
32
|
context.set("phoneCode", resolvePhoneCode);
|
|
33
33
|
})
|
|
34
34
|
},
|
|
35
|
-
onError: (err) => node.error(
|
|
35
|
+
onError: (err) => node.error(`Error: ${err.message}`),
|
|
36
36
|
});
|
|
37
37
|
|
|
38
|
-
const stringSession = client.session.save(); //
|
|
38
|
+
const stringSession = client.session.save(); // Save session
|
|
39
39
|
node.send({
|
|
40
40
|
topic: "auth_success",
|
|
41
41
|
payload: {
|
|
42
42
|
stringSession,
|
|
43
|
-
message: "
|
|
43
|
+
message: "Authorization successful!",
|
|
44
44
|
},
|
|
45
45
|
});
|
|
46
46
|
|
|
47
47
|
} catch (error) {
|
|
48
|
-
node.error(
|
|
48
|
+
node.error(`Authorization error: ${error.message}`);
|
|
49
49
|
node.send({
|
|
50
50
|
topic: "auth_error",
|
|
51
51
|
payload: {
|
package/nodes/command.js
CHANGED
package/nodes/iter-dialogs.html
CHANGED
package/nodes/receiver.js
CHANGED
package/nodes/send-file.html
CHANGED
package/nodes/send-file.js
CHANGED
package/package.json
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patricktobias86/node-red-telegram-account",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "",
|
|
3
|
+
"version": "1.0.8",
|
|
4
|
+
"description": "Node-RED nodes to communicate with GramJS.",
|
|
5
5
|
"main": "nodes/config.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"dev": "npm install /home/user/Desktop/node-red-telegram-account -g & node-red"
|
|
8
|
-
},
|
|
9
6
|
"keywords": [
|
|
10
7
|
"node-red",
|
|
11
8
|
"telegram"
|
|
@@ -41,10 +38,11 @@
|
|
|
41
38
|
"telegram-account-promote-admin": "nodes/promote-admin.js"
|
|
42
39
|
}
|
|
43
40
|
},
|
|
44
|
-
"publishConfig": {
|
|
45
|
-
"access": "public"
|
|
46
|
-
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "public",
|
|
43
|
+
"registry": "https://registry.npmjs.org"
|
|
44
|
+
},
|
|
47
45
|
"dependencies": {
|
|
48
46
|
"telegram": "^2.17.10"
|
|
49
47
|
}
|
|
50
|
-
}
|
|
48
|
+
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
|
2
|
-
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
|
|
3
|
-
|
|
4
|
-
name: Node.js Package
|
|
5
|
-
|
|
6
|
-
on:
|
|
7
|
-
release:
|
|
8
|
-
types: [created]
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
build:
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
steps:
|
|
14
|
-
- uses: actions/checkout@v4
|
|
15
|
-
- uses: actions/setup-node@v4
|
|
16
|
-
with:
|
|
17
|
-
node-version: 20
|
|
18
|
-
- run: npm ci
|
|
19
|
-
- run: npm test
|
|
20
|
-
|
|
21
|
-
publish-npm:
|
|
22
|
-
needs: build
|
|
23
|
-
runs-on: ubuntu-latest
|
|
24
|
-
steps:
|
|
25
|
-
- uses: actions/checkout@v4
|
|
26
|
-
- uses: actions/setup-node@v4
|
|
27
|
-
with:
|
|
28
|
-
node-version: 20
|
|
29
|
-
registry-url: https://registry.npmjs.org/
|
|
30
|
-
- run: npm ci
|
|
31
|
-
- run: npm publish
|
|
32
|
-
env:
|
|
33
|
-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|