@flowfuse/nr-mqtt-nodes 0.1.0
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/.eslintrc +21 -0
- package/.github/dependabot.yml +15 -0
- package/.github/workflows/project-automation.yml +10 -0
- package/.github/workflows/publish.yml +51 -0
- package/.github/workflows/release-publish.yml +21 -0
- package/CHANGELOG.md +3 -0
- package/LICENSE +178 -0
- package/README.md +29 -0
- package/nodes/ff-mqtt.html +488 -0
- package/nodes/ff-mqtt.js +1826 -0
- package/nodes/icons/ff-logo.svg +6 -0
- package/nodes/lib/TeamBrokerApi.js +83 -0
- package/nodes/lib/proxyHelper.js +301 -0
- package/nodes/lib/util.js +112 -0
- package/nodes/locales/en-US/ff-mqtt.html +121 -0
- package/nodes/locales/en-US/ff-mqtt.json +136 -0
- package/npmignore +5 -0
- package/package.json +54 -0
- package/test/unit/ff-mqtt_spec.js +920 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
{
|
|
2
|
+
"common": {
|
|
3
|
+
"label": {
|
|
4
|
+
"payload": "Payload",
|
|
5
|
+
"topic": "Topic",
|
|
6
|
+
"name": "Name",
|
|
7
|
+
"username": "Username",
|
|
8
|
+
"password": "Password",
|
|
9
|
+
"property": "Property",
|
|
10
|
+
"selectNodes": "Select nodes...",
|
|
11
|
+
"expand": "Expand"
|
|
12
|
+
},
|
|
13
|
+
"status": {
|
|
14
|
+
"connected": "connected",
|
|
15
|
+
"not-connected": "not connected",
|
|
16
|
+
"disconnected": "disconnected",
|
|
17
|
+
"connecting": "connecting",
|
|
18
|
+
"error": "error",
|
|
19
|
+
"ok": "OK",
|
|
20
|
+
"featureDisabled": "feature not enabled"
|
|
21
|
+
},
|
|
22
|
+
"notification": {
|
|
23
|
+
"error": "<strong>Error</strong>: __message__",
|
|
24
|
+
"errors": {
|
|
25
|
+
"not-deployed": "node not deployed",
|
|
26
|
+
"no-response": "no response from server",
|
|
27
|
+
"unexpected": "unexpected error (__status__) __message__"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"errors": {
|
|
31
|
+
"nooverride": "Warning: msg properties can no longer override set node properties. See bit.ly/nr-override-msg-props"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"ff-mqtt": {
|
|
35
|
+
"label": {
|
|
36
|
+
"broker": "Server",
|
|
37
|
+
"example": "e.g. localhost",
|
|
38
|
+
"output": "Output",
|
|
39
|
+
"qos": "QoS",
|
|
40
|
+
"retain": "Retain",
|
|
41
|
+
"clientid": "Client ID",
|
|
42
|
+
"port": "Port",
|
|
43
|
+
"keepalive": "Keep Alive",
|
|
44
|
+
"cleansession": "Use clean session",
|
|
45
|
+
"autoUnsubscribe": "Automatically unsubscribe when disconnecting",
|
|
46
|
+
"cleanstart": "Use clean start",
|
|
47
|
+
"use-tls": "Use TLS",
|
|
48
|
+
"tls-config": "TLS Configuration",
|
|
49
|
+
"verify-server-cert": "Verify server certificate",
|
|
50
|
+
"compatmode": "Use legacy MQTT 3.1 support",
|
|
51
|
+
"userProperties": "User Properties",
|
|
52
|
+
"subscriptionIdentifier": "Subscription ID",
|
|
53
|
+
"flags": "Flags",
|
|
54
|
+
"nl": "Do not receive messages published by this client",
|
|
55
|
+
"rap": "Keep retain flag of original publish",
|
|
56
|
+
"rh": "Retained message handling ",
|
|
57
|
+
"rh0": "Send retained messages",
|
|
58
|
+
"rh1": "Only send for new subscriptions",
|
|
59
|
+
"rh2": "Do not send",
|
|
60
|
+
"responseTopic": "Response topic",
|
|
61
|
+
"contentType": "Content Type",
|
|
62
|
+
"correlationData": "Correlation Data",
|
|
63
|
+
"expiry": "Expiry (secs)",
|
|
64
|
+
"sessionExpiry": "Session Expiry (secs)",
|
|
65
|
+
"topicAlias": "Alias",
|
|
66
|
+
"payloadFormatIndicator": "Format",
|
|
67
|
+
"payloadFormatIndicatorFalse": "unspecified bytes (Default)",
|
|
68
|
+
"payloadFormatIndicatorTrue": "UTF-8 encoded payload",
|
|
69
|
+
"protocolVersion": "Protocol",
|
|
70
|
+
"protocolVersion3": "MQTT V3.1 (legacy)",
|
|
71
|
+
"protocolVersion4": "MQTT V3.1.1",
|
|
72
|
+
"protocolVersion5": "MQTT V5",
|
|
73
|
+
"topicAliasMaximum": "Alias Max",
|
|
74
|
+
"maximumPacketSize": "Max Packet Size",
|
|
75
|
+
"receiveMaximum": "Receive Max",
|
|
76
|
+
"session": "Session",
|
|
77
|
+
"delay": "Delay",
|
|
78
|
+
"action": "Action",
|
|
79
|
+
"staticTopic": "Subscribe to single topic",
|
|
80
|
+
"dynamicTopic": "Dynamic subscription",
|
|
81
|
+
"auto-connect": "Connect automatically",
|
|
82
|
+
"auto-mode-depreciated": "This option is deprecated. Please use the new auto-detect mode.",
|
|
83
|
+
"none": "none",
|
|
84
|
+
"other": "other"
|
|
85
|
+
},
|
|
86
|
+
"sections-label": {
|
|
87
|
+
"birth-message": "Message sent on connection (birth message)",
|
|
88
|
+
"will-message": "Message sent on an unexpected disconnection (will message)",
|
|
89
|
+
"close-message": "Message sent before disconnecting (close message)"
|
|
90
|
+
},
|
|
91
|
+
"tabs-label": {
|
|
92
|
+
"connection": "Connection",
|
|
93
|
+
"security": "Security",
|
|
94
|
+
"messages": "Messages"
|
|
95
|
+
},
|
|
96
|
+
"placeholder": {
|
|
97
|
+
"clientid": "Leave blank for auto generated",
|
|
98
|
+
"clientid-nonclean": "Must be set for non-clean sessions",
|
|
99
|
+
"will-topic": "Leave blank to disable will message",
|
|
100
|
+
"birth-topic": "Leave blank to disable birth message",
|
|
101
|
+
"close-topic": "Leave blank to disable close message"
|
|
102
|
+
},
|
|
103
|
+
"state": {
|
|
104
|
+
"connected": "Connected to broker: __broker__",
|
|
105
|
+
"disconnected": "Disconnected from broker: __broker__",
|
|
106
|
+
"connect-failed": "Connection failed to broker: __broker__",
|
|
107
|
+
"broker-disconnected": "Broker __broker__ disconnected client: __reasonCode__ __reasonString__"
|
|
108
|
+
},
|
|
109
|
+
"retain": "Retain",
|
|
110
|
+
"output": {
|
|
111
|
+
"buffer": "a Buffer",
|
|
112
|
+
"string": "a String",
|
|
113
|
+
"base64": "a Base64 encoded string",
|
|
114
|
+
"auto": "auto-detect (string or buffer)",
|
|
115
|
+
"auto-detect": "auto-detect (parsed JSON object, string or buffer)",
|
|
116
|
+
"json": "a parsed JSON object"
|
|
117
|
+
},
|
|
118
|
+
"true": "true",
|
|
119
|
+
"false": "false",
|
|
120
|
+
"tip": "Tip: Leave topic, qos or retain blank if you want to set them via msg properties.",
|
|
121
|
+
"errors": {
|
|
122
|
+
"not-defined": "topic not defined",
|
|
123
|
+
"missing-config": "missing broker configuration",
|
|
124
|
+
"invalid-topic": "Invalid topic specified",
|
|
125
|
+
"nonclean-missingclientid": "No client ID set, using clean session",
|
|
126
|
+
"invalid-json-string": "Invalid JSON string",
|
|
127
|
+
"invalid-json-parse": "Failed to parse JSON string",
|
|
128
|
+
"invalid-action-action": "Invalid action specified",
|
|
129
|
+
"invalid-action-alreadyconnected": "Disconnect from broker before connecting",
|
|
130
|
+
"invalid-action-badsubscription": "msg.topic is missing or invalid",
|
|
131
|
+
"invalid-client-id": "Missing Client ID",
|
|
132
|
+
"subscription-failed": "Failed to subscribe to topic: __topic__",
|
|
133
|
+
"featureDisabled": "FlowFuse Broker Feature not enabled for this instance"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
package/npmignore
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@flowfuse/nr-mqtt-nodes",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "MQTT nodes for FlowFuse",
|
|
5
|
+
"main": "nodes/ff-mqtt.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "mocha test/unit/**/*_spec.js --timeout 5000",
|
|
8
|
+
"lint": "eslint -c .eslintrc --ext js,html \"nodes/**/*.js\" \"nodes/**/*.html\" \"test/**/*.js\"",
|
|
9
|
+
"lint:fix": "eslint -c .eslintrc --ext js,html \"nodes/**/*.js\" \"nodes/**/*.html\" \"test/**/*.js\" --fix"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/FlowFuse/nr-mqtt-nodes.git"
|
|
14
|
+
},
|
|
15
|
+
"author": {
|
|
16
|
+
"name": "FlowFuse Inc."
|
|
17
|
+
},
|
|
18
|
+
"license": "Apache-2.0",
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/FlowFuse/nr-mqtt-nodes/issues"
|
|
21
|
+
},
|
|
22
|
+
"homepage": "https://github.com/FlowFuse/nr-mqtt-nodes#readme",
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"got": "^11.8.6",
|
|
25
|
+
"http-proxy-agent": "^7.0.2",
|
|
26
|
+
"https-proxy-agent": "^7.0.6",
|
|
27
|
+
"mqtt": "^4.3.7",
|
|
28
|
+
"proxy-from-env": "^1.1.0"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"eslint": "^8.25.0",
|
|
32
|
+
"eslint-config-standard": "^17.0.0",
|
|
33
|
+
"eslint-plugin-html": "8.1.3",
|
|
34
|
+
"eslint-plugin-no-only-tests": "^3.1.0",
|
|
35
|
+
"mocha": "^11.6.0",
|
|
36
|
+
"mocha-cli": "^1.0.1",
|
|
37
|
+
"node-red": "^4.1.0",
|
|
38
|
+
"node-red-node-test-helper": "^0.3.5",
|
|
39
|
+
"sinon": "^21.0.0"
|
|
40
|
+
},
|
|
41
|
+
"keywords": [
|
|
42
|
+
"node-red",
|
|
43
|
+
"flowfuse",
|
|
44
|
+
"mqtt"
|
|
45
|
+
],
|
|
46
|
+
"node-red": {
|
|
47
|
+
"nodes": {
|
|
48
|
+
"ff-mqtt": "nodes/ff-mqtt.js"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"engines": {
|
|
52
|
+
"node": ">=16.x"
|
|
53
|
+
}
|
|
54
|
+
}
|