@xube/kit-aws-hooks 0.0.72 → 0.0.74
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/dist/transform.js +4 -4
- package/package.json +8 -8
- package/src/transform.test.ts +2 -2
- package/src/transform.ts +2 -2
- package/tsconfig.json +1 -1
package/dist/transform.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getTimeSeriesDataFromData = exports.stageDataForSend = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const kit_aws_data_schema_1 = require("@xube/kit-aws-data-schema");
|
|
5
|
+
const kit_aws_data_schema_2 = require("@xube/kit-aws-data-schema");
|
|
6
6
|
const kit_log_1 = require("@xube/kit-log");
|
|
7
7
|
const stageDataForSend = (items) => {
|
|
8
8
|
const timeSeries = (0, exports.getTimeSeriesDataFromData)(items);
|
|
@@ -16,7 +16,7 @@ const getTimeSeriesDataFromData = (items, log = kit_log_1.XubeLog.getInstance())
|
|
|
16
16
|
log.info(`Staging data for send based on ${items.length} items.`);
|
|
17
17
|
log.info(JSON.stringify(items, null, 2));
|
|
18
18
|
for (const item of itemsOrderedByMicrosecondsSinceEpoch) {
|
|
19
|
-
if (!(0,
|
|
19
|
+
if (!(0, kit_aws_data_schema_1.isReadingV1)(item)) {
|
|
20
20
|
console.log(`${item.type} is not a currently supported type.`);
|
|
21
21
|
continue;
|
|
22
22
|
}
|
|
@@ -26,7 +26,7 @@ const getTimeSeriesDataFromData = (items, log = kit_log_1.XubeLog.getInstance())
|
|
|
26
26
|
v: "1",
|
|
27
27
|
m: {
|
|
28
28
|
id: item.id,
|
|
29
|
-
trigger:
|
|
29
|
+
trigger: kit_aws_data_schema_2.DATA_TYPE,
|
|
30
30
|
source: "device",
|
|
31
31
|
},
|
|
32
32
|
t0: isoDateTimeWithMicroseconds(microsSinceEpoch),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xube/kit-aws-hooks",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.74",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -17,15 +17,15 @@
|
|
|
17
17
|
},
|
|
18
18
|
"homepage": "https://github.com/XubeLtd/dev-kit#readme",
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@xube/kit-build": "^0.0.
|
|
20
|
+
"@xube/kit-build": "^0.0.74"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@xube/kit-aws": "^0.0.
|
|
24
|
-
"@xube/kit-aws-schema": "^0.0.
|
|
25
|
-
"@xube/kit-
|
|
26
|
-
"@xube/kit-log": "^0.0.
|
|
27
|
-
"@xube/kit-request": "^0.0.
|
|
28
|
-
"@xube/kit-schema": "^0.0.
|
|
23
|
+
"@xube/kit-aws": "^0.0.74",
|
|
24
|
+
"@xube/kit-aws-data-schema": "^0.0.74",
|
|
25
|
+
"@xube/kit-aws-schema": "^0.0.74",
|
|
26
|
+
"@xube/kit-log": "^0.0.74",
|
|
27
|
+
"@xube/kit-request": "^0.0.74",
|
|
28
|
+
"@xube/kit-schema": "^0.0.74",
|
|
29
29
|
"zod": "^3.22.4"
|
|
30
30
|
}
|
|
31
31
|
}
|
package/src/transform.test.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DATA_TYPE, ReadingV1 } from "@xube/kit-data-schema";
|
|
2
|
-
import { getTimeSeriesDataFromData
|
|
1
|
+
import { DATA_TYPE, ReadingV1 } from "@xube/kit-aws-data-schema";
|
|
2
|
+
import { getTimeSeriesDataFromData } from "./transform";
|
|
3
3
|
import { TableItem } from "@xube/kit-aws-schema";
|
|
4
4
|
import { TimeSeries } from "@xube/kit-schema";
|
|
5
5
|
|
package/src/transform.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TableItem } from "@xube/kit-aws-schema";
|
|
2
|
-
import { isReadingV1 } from "@xube/kit-data-schema";
|
|
3
|
-
import { DATA_TYPE } from "@xube/kit-data-schema";
|
|
2
|
+
import { isReadingV1 } from "@xube/kit-aws-data-schema";
|
|
3
|
+
import { DATA_TYPE } from "@xube/kit-aws-data-schema";
|
|
4
4
|
import { XubeLog } from "@xube/kit-log";
|
|
5
5
|
import { TimeSeries, TimeSeriesEntry, TimeUnit } from "@xube/kit-schema";
|
|
6
6
|
|