@uns-kit/cli 0.0.30 → 0.0.31

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uns-kit/cli",
3
- "version": "0.0.30",
3
+ "version": "0.0.31",
4
4
  "description": "Command line scaffolding tool for UNS applications",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -26,7 +26,7 @@
26
26
  ],
27
27
  "dependencies": {
28
28
  "azure-devops-node-api": "^15.1.1",
29
- "@uns-kit/core": "0.0.29"
29
+ "@uns-kit/core": "0.0.30"
30
30
  },
31
31
  "scripts": {
32
32
  "build": "tsc -p tsconfig.build.json",
@@ -36,12 +36,22 @@ const mqttOutput = await unsProxyProcess.createUnsMqttProxy((config.output?.host
36
36
  mqttInput.event.on("input", async (event) => {
37
37
  try {
38
38
  if (event.topic === "integration/raw-table") {
39
- const jsonObject = JSON.parse(event.message);
39
+ const x = 10;
40
+ const a = `{
41
+ "kolona_a": "${x}",
42
+ "kolona_b": "1",
43
+ "kolona_c"; "${x}",
44
+ "kolona_d": 3
45
+ }`;
46
+ type questDbCoulmnTypes = "number" | "float" | "string";
47
+ const columnTypes:questDbCoulmnTypes[] = ['number', 'float', 'string', 'number', 'number'];
48
+
49
+ const jsonObject = JSON.parse(a);
40
50
  const timestamp = jsonObject.Timestamp;
41
- delete(jsonObject.Timestamp);
51
+ // delete(jsonObject.Timestamp);
42
52
 
43
53
  const time = UnsPacket.formatToISO8601(new Date(timestamp));
44
- const message: IUnsMessage = { table: {dataGroup:"demo_table", values:jsonObject, time}};
54
+ const message: IUnsMessage = { table: {dataGroup:"demo_table", values:jsonObject, columnTypes, time}};
45
55
  const topic: UnsTopics = "example/factory-a/line-1/";
46
56
  const tags: UnsTags[] = [];
47
57
  const packet = await UnsPacket.unsPacketFromUnsMessage(message);