node-red-contrib-influxdb3 1.0.7 → 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/influxdb3.js +4 -2
- package/package.json +9 -1
- package/__tests__/influxdb3.test.js +0 -1294
- package/renovate.json +0 -14
- package/test/line-protocol-validation.test.js +0 -61
- package/test/point-api.test.js +0 -69
package/influxdb3.js
CHANGED
|
@@ -396,8 +396,10 @@ module.exports = function(RED) {
|
|
|
396
396
|
try {
|
|
397
397
|
const client = node.influxdb.getClient();
|
|
398
398
|
|
|
399
|
-
// Determine the database to use
|
|
400
|
-
|
|
399
|
+
// Determine the database to use. Trim each source before the fallback so a
|
|
400
|
+
// blank/whitespace-only msg.database falls back instead of being used verbatim.
|
|
401
|
+
const trimDb = (d) => (typeof d === 'string' ? d.trim() : d);
|
|
402
|
+
const targetDatabase = trimDb(msg.database) || trimDb(node.database) || trimDb(node.influxdb.database);
|
|
401
403
|
|
|
402
404
|
if (!targetDatabase) {
|
|
403
405
|
throw new Error('Database not specified');
|
package/package.json
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-influxdb3",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "Node-RED nodes for InfluxDB v3 integration",
|
|
5
5
|
"main": "influxdb3.js",
|
|
6
|
+
"files": [
|
|
7
|
+
"influxdb3.js",
|
|
8
|
+
"influxdb3.html",
|
|
9
|
+
"lib/",
|
|
10
|
+
"examples/",
|
|
11
|
+
"README.md",
|
|
12
|
+
"LICENSE"
|
|
13
|
+
],
|
|
6
14
|
"scripts": {
|
|
7
15
|
"lint": "eslint .",
|
|
8
16
|
"test": "jest"
|