@quenty/influxdbclient 7.4.0 → 7.4.1-canary.472.c5ee856.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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [7.4.1-canary.472.c5ee856.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/influxdbclient@7.4.0...@quenty/influxdbclient@7.4.1-canary.472.c5ee856.0) (2024-05-13)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* Support HttpService secrets for InfluxDb ClientConfig ([#469](https://github.com/Quenty/NevermoreEngine/issues/469)) ([708f69b](https://github.com/Quenty/NevermoreEngine/commit/708f69bd8ac36ecd5d7f76918474db39efc3bd57))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [7.4.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/influxdbclient@7.3.0...@quenty/influxdbclient@7.4.0) (2024-05-09)
|
|
7
18
|
|
|
8
19
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/influxdbclient",
|
|
3
|
-
"version": "7.4.0",
|
|
3
|
+
"version": "7.4.1-canary.472.c5ee856.0",
|
|
4
4
|
"description": "Provides a Roblox Lua InfluxDB client",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -25,22 +25,22 @@
|
|
|
25
25
|
"Quenty"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@quenty/baseobject": "
|
|
29
|
-
"@quenty/httppromise": "
|
|
30
|
-
"@quenty/jsonutils": "
|
|
31
|
-
"@quenty/loader": "
|
|
32
|
-
"@quenty/maid": "
|
|
33
|
-
"@quenty/math": "
|
|
34
|
-
"@quenty/promise": "
|
|
35
|
-
"@quenty/rx": "
|
|
36
|
-
"@quenty/servicebag": "
|
|
37
|
-
"@quenty/signal": "
|
|
38
|
-
"@quenty/string": "
|
|
39
|
-
"@quenty/table": "
|
|
40
|
-
"@quenty/valueobject": "
|
|
28
|
+
"@quenty/baseobject": "10.3.0",
|
|
29
|
+
"@quenty/httppromise": "10.3.0",
|
|
30
|
+
"@quenty/jsonutils": "10.3.0",
|
|
31
|
+
"@quenty/loader": "10.3.0",
|
|
32
|
+
"@quenty/maid": "3.2.0",
|
|
33
|
+
"@quenty/math": "2.7.0",
|
|
34
|
+
"@quenty/promise": "10.3.0",
|
|
35
|
+
"@quenty/rx": "13.3.0",
|
|
36
|
+
"@quenty/servicebag": "11.4.0",
|
|
37
|
+
"@quenty/signal": "7.3.0",
|
|
38
|
+
"@quenty/string": "3.2.0",
|
|
39
|
+
"@quenty/table": "3.5.0",
|
|
40
|
+
"@quenty/valueobject": "13.3.0"
|
|
41
41
|
},
|
|
42
42
|
"publishConfig": {
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "c5ee856d8d75948a21e30b90872bbad28d09e23f"
|
|
46
46
|
}
|
|
@@ -7,7 +7,7 @@ local InfluxDBClientConfigUtils = {}
|
|
|
7
7
|
function InfluxDBClientConfigUtils.isClientConfig(config)
|
|
8
8
|
return type(config) == "table"
|
|
9
9
|
and type(config.url) == "string"
|
|
10
|
-
and
|
|
10
|
+
and (typeof(config.token) == "string" or typeof(config.token) == "Secret")
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
function InfluxDBClientConfigUtils.createClientConfig(config)
|
|
@@ -113,7 +113,15 @@ function InfluxDBWriteAPI:_promiseSendBatch(toSend)
|
|
|
113
113
|
return Promise.rejected("No client configuration")
|
|
114
114
|
end
|
|
115
115
|
|
|
116
|
-
|
|
116
|
+
-- Transform to "Token %s".
|
|
117
|
+
local authHeader: string | Secret
|
|
118
|
+
if typeof(clientConfig.token) == "string" and #clientConfig.token > 0 then
|
|
119
|
+
authHeader = "Token " .. clientConfig.token
|
|
120
|
+
elseif typeof(clientConfig.token) == "Secret" then
|
|
121
|
+
authHeader = clientConfig.token:AddPrefix("Token ")
|
|
122
|
+
else
|
|
123
|
+
error("Bad clientConfig.token")
|
|
124
|
+
end
|
|
117
125
|
|
|
118
126
|
local body = table.concat(toSend, "\n")
|
|
119
127
|
local request = {
|
|
@@ -121,7 +129,7 @@ function InfluxDBWriteAPI:_promiseSendBatch(toSend)
|
|
|
121
129
|
Headers = {
|
|
122
130
|
["Content-Type"] = "application/json";
|
|
123
131
|
["Accept"] = "application/json";
|
|
124
|
-
["Authorization"] =
|
|
132
|
+
["Authorization"] = authHeader;
|
|
125
133
|
};
|
|
126
134
|
Compress = Enum.HttpCompression.Gzip;
|
|
127
135
|
Url = self:_getWriteUrl();
|