@signageos/lib 23.18.0-master.4515 → 23.18.0-master.4522
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/package.json +2 -4
- package/dist/InfluxDB/IInfluxDB.d.ts +0 -5
- package/dist/InfluxDB/IInfluxDB.js +0 -3
- package/dist/InfluxDB/IInfluxDB.js.map +0 -1
- package/dist/InfluxDB/influxDBConnectionFactory.d.ts +0 -9
- package/dist/InfluxDB/influxDBConnectionFactory.js +0 -83
- package/dist/InfluxDB/influxDBConnectionFactory.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# General Library
|
|
2
2
|
|
|
3
|
-
This repository contains all sets of generic TypeScript tools and utils for different technologies, like databases: 'MongoDB
|
|
3
|
+
This repository contains all sets of generic TypeScript tools and utils for different technologies, like databases: 'MongoDB',
|
|
4
4
|
monitoring in Prometheus, wrappers and helpers for Azure SDK, Browser Storage, time management,
|
|
5
5
|
observables, async iterators and a lot more.
|
|
6
6
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signageos/lib",
|
|
3
|
-
"version": "23.18.0-master.
|
|
3
|
+
"version": "23.18.0-master.4522",
|
|
4
4
|
"main": "./dist",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"files": [
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@signageos/amqp": "^0.2.1",
|
|
41
41
|
"@signageos/core": "^1.3.0",
|
|
42
|
-
"@signageos/lib-ci": "23.18.0-master.
|
|
42
|
+
"@signageos/lib-ci": "23.18.0-master.4522",
|
|
43
43
|
"@signageos/metrics": "^1.0.0",
|
|
44
44
|
"@signageos/redis": "^2.2.0",
|
|
45
45
|
"async-lock": "1.4.0",
|
|
@@ -77,7 +77,6 @@
|
|
|
77
77
|
"@aws-sdk/lib-storage": "3.489.0",
|
|
78
78
|
"@aws-sdk/s3-request-presigner": "3.489.0",
|
|
79
79
|
"aws-sdk": "^2.1472.0",
|
|
80
|
-
"@influxdata/influxdb-client": "1.16.0",
|
|
81
80
|
"mocha": "^3.1.2",
|
|
82
81
|
"mongoose": "^8.0.0",
|
|
83
82
|
"mongodb": "6.2.0",
|
|
@@ -98,7 +97,6 @@
|
|
|
98
97
|
"@aws-sdk/s3-request-presigner": "3.489.0",
|
|
99
98
|
"@aws-sdk/types": "^3.489.0",
|
|
100
99
|
"@faker-js/faker": "8.3.1",
|
|
101
|
-
"@influxdata/influxdb-client": "1.16.0",
|
|
102
100
|
"@istanbuljs/nyc-config-typescript": "1.0.2",
|
|
103
101
|
"@types/async-lock": "1.4.2",
|
|
104
102
|
"@types/basic-auth": "1.1.8",
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { QueryApi, QueryOptions, WriteApi, WriteOptions, WritePrecisionType } from '@influxdata/influxdb-client';
|
|
2
|
-
export interface IInfluxDB {
|
|
3
|
-
getWriteApi(org: string, bucket: string, precision?: WritePrecisionType, writeOptions?: Partial<WriteOptions>): WriteApi;
|
|
4
|
-
getQueryApi(org: string | QueryOptions): QueryApi;
|
|
5
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IInfluxDB.js","sourceRoot":"","sources":["../../src/InfluxDB/IInfluxDB.ts"],"names":[],"mappings":""}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { IInfluxDB } from './IInfluxDB';
|
|
2
|
-
export interface IInfluxdbConnection {
|
|
3
|
-
connect: (timeout?: number) => Promise<void>;
|
|
4
|
-
getClient: () => IInfluxDB;
|
|
5
|
-
getOrganization: () => string;
|
|
6
|
-
getBucket: () => string;
|
|
7
|
-
close: () => Promise<void>;
|
|
8
|
-
}
|
|
9
|
-
export declare function createInfluxdbConnection(baseUrl: string, token: string, organization: string, bucket: string): IInfluxdbConnection;
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
39
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
40
|
-
if (ar || !(i in from)) {
|
|
41
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
42
|
-
ar[i] = from[i];
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
46
|
-
};
|
|
47
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.createInfluxdbConnection = createInfluxdbConnection;
|
|
49
|
-
var influxdb_client_1 = require("@influxdata/influxdb-client");
|
|
50
|
-
function createInfluxdbConnection(baseUrl, token, organization, bucket) {
|
|
51
|
-
var _this = this;
|
|
52
|
-
var influxDBClient = null;
|
|
53
|
-
return {
|
|
54
|
-
connect: function () {
|
|
55
|
-
var args_1 = [];
|
|
56
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
57
|
-
args_1[_i] = arguments[_i];
|
|
58
|
-
}
|
|
59
|
-
return __awaiter(_this, __spreadArray([], args_1, true), void 0, function (timeout) {
|
|
60
|
-
if (timeout === void 0) { timeout = 30e3; }
|
|
61
|
-
return __generator(this, function (_a) {
|
|
62
|
-
influxDBClient = new influxdb_client_1.InfluxDB({ url: baseUrl, token: token, timeout: timeout });
|
|
63
|
-
return [2 /*return*/];
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
},
|
|
67
|
-
getClient: function () {
|
|
68
|
-
if (influxDBClient) {
|
|
69
|
-
return influxDBClient;
|
|
70
|
-
}
|
|
71
|
-
throw new Error('Client was closed.');
|
|
72
|
-
},
|
|
73
|
-
close: function () { return __awaiter(_this, void 0, void 0, function () {
|
|
74
|
-
return __generator(this, function (_a) {
|
|
75
|
-
influxDBClient = null;
|
|
76
|
-
return [2 /*return*/];
|
|
77
|
-
});
|
|
78
|
-
}); },
|
|
79
|
-
getOrganization: function () { return organization; },
|
|
80
|
-
getBucket: function () { return bucket; },
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
//# sourceMappingURL=influxDBConnectionFactory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"influxDBConnectionFactory.js","sourceRoot":"","sources":["../../src/InfluxDB/influxDBConnectionFactory.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,4DAmBC;AA9BD,+DAAuD;AAWvD,SAAgB,wBAAwB,CAAC,OAAe,EAAE,KAAa,EAAE,YAAoB,EAAE,MAAc;IAA7G,iBAmBC;IAlBA,IAAI,cAAc,GAAqB,IAAI,CAAC;IAE5C,OAAO;QACN,OAAO,EAAE;;;;;uFAAO,OAAsB;gBAAtB,wBAAA,EAAA,cAAsB;;oBACrC,cAAc,GAAG,IAAI,0BAAQ,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,SAAA,EAAE,CAAC,CAAC;;;;SACvE;QACD,SAAS,EAAE;YACV,IAAI,cAAc,EAAE,CAAC;gBACpB,OAAO,cAAc,CAAC;YACvB,CAAC;YACD,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;QACvC,CAAC;QACD,KAAK,EAAE;;gBACN,cAAc,GAAG,IAAI,CAAC;;;aACtB;QACD,eAAe,EAAE,cAAM,OAAA,YAAY,EAAZ,CAAY;QACnC,SAAS,EAAE,cAAM,OAAA,MAAM,EAAN,CAAM;KACvB,CAAC;AACH,CAAC"}
|