Compare commits

..

7 Commits

Author SHA1 Message Date
6843316518 version bump
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2021-04-29 20:18:47 +02:00
b393e09274 drone npm publish
All checks were successful
continuous-integration/drone/push Build is passing
2021-04-29 20:17:41 +02:00
84521c5130 fixed array paramter check
All checks were successful
continuous-integration/drone/push Build is passing
2021-04-29 20:14:02 +02:00
c1c16cdfe0 html cleanup
All checks were successful
continuous-integration/drone/push Build is passing
2021-04-29 18:25:59 +02:00
955e373261 set main in package.json 2021-04-28 18:07:15 +02:00
2c9dc7a3d2 added README 2021-04-28 17:54:01 +02:00
99c82ef173 added drone file 2021-04-27 23:19:32 +02:00
6 changed files with 196 additions and 161 deletions

21
.drone.yml Normal file
View File

@@ -0,0 +1,21 @@
kind: pipeline
name: default
steps:
- name: build
image: node
commands:
- yarn install
- yarn run build
- name: publish
image: plugins/npm
settings:
username:
from_secret: NPM_USERNAME
password:
from_secret: NPM_PASSWORD
email:
from_secret: NPM_EMAIL
when:
event:
- tag

13
README.md Normal file
View File

@@ -0,0 +1,13 @@
Node-RED nodes to interact with Teamspeaks query. Basicly it is a wrapper for [TS3-NodeJS-Library](https://github.com/multivit4min/TS3-NodeJS-Library).
It includes 3 nodes:
- TS3 config (stores connection information)
- TS3 call (Call any function on the query)
- TS3 event (Listen to any ts3 event)
To pass parameters to the "call" node simply put it as the `msg.payload` as an array. You can lookup the functions at the TS3-NodeJS-Library [documentation](https://multivit4min.github.io/TS3-NodeJS-Library/classes/teamspeak.teamspeak-2.html).
# Install
`npm i node-red-contrib-teamspeak --save` or via the Node-RED ui.
# Development
There is a docker-compose file that includes a Node-RED and a TS3 instance. To build and test changes simply execute the `docker-pack.sh` file.

View File

@@ -1,8 +1,8 @@
{
"name": "node-red-contrib-teamspeak",
"version": "1.0.0",
"description": "Node RED teamspeak node",
"main": "index.js",
"version": "1.0.1",
"description": "Node-RED teamspeak node",
"main": "dist/nodes/TS3Config/TS3Config.js",
"license": "MIT",
"scripts": {
"build": "tsc --build && copyfiles -u 2 './src/nodes/**/*.{png,svg}' ./dist/nodes/ && node build/build.js"

View File

@@ -32,7 +32,7 @@ const nodeInit: NodeInitializer = (RED): void => {
if (typeof member === "function"){
let args: any[] = []
if (msg.payload instanceof Array){
if (Array.isArray(msg.payload)){
args = msg.payload
}else{
args = [msg.payload]

View File

@@ -157,6 +157,7 @@
</select>
<div class="form-row">
You can find documentation for all functions
<a target="_blank" href="https://multivit4min.github.io/TS3-NodeJS-Library/classes/teamspeak.teamspeak-2.html#on"> here</a>
<a target="_blank"
href="https://multivit4min.github.io/TS3-NodeJS-Library/classes/teamspeak.teamspeak-2.html#on"> here</a>
</div>
</div>