@xube/kit-aws-data-infrastructure 0.0.74 → 0.0.76

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.
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DataManagement = void 0;
4
4
  const aws_dynamodb_1 = require("aws-cdk-lib/aws-dynamodb");
5
5
  const constructs_1 = require("constructs");
6
- const src_1 = require("../../kit-aws-schema/src");
6
+ const kit_aws_schema_1 = require("@xube/kit-aws-schema");
7
7
  const data_api_1 = require("./api/data-api");
8
8
  class DataManagement extends constructs_1.Construct {
9
9
  table;
@@ -14,11 +14,11 @@ class DataManagement extends constructs_1.Construct {
14
14
  new aws_dynamodb_1.Table(scope, id + "-table", {
15
15
  tableName: (props.name ?? `data-management`) + "-table",
16
16
  partitionKey: {
17
- name: src_1.PARTITION_KEY,
17
+ name: kit_aws_schema_1.PARTITION_KEY,
18
18
  type: aws_dynamodb_1.AttributeType.STRING,
19
19
  },
20
20
  sortKey: {
21
- name: src_1.SORT_KEY,
21
+ name: kit_aws_schema_1.SORT_KEY,
22
22
  type: aws_dynamodb_1.AttributeType.STRING,
23
23
  },
24
24
  });
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.handler = void 0;
4
4
  const kit_aws_data_schema_1 = require("@xube/kit-aws-data-schema");
5
- const src_1 = require("../../../kit-constants/src");
6
- const get_data_1 = require("@xube/kit-aws-data/src/get/get-data");
5
+ const kit_constants_1 = require("@xube/kit-constants");
6
+ const kit_aws_data_1 = require("@xube/kit-aws-data");
7
7
  const kit_log_1 = require("@xube/kit-log");
8
8
  const dataTableName = process.env[kit_aws_data_schema_1.DATA_TABLE_NAME_ENV_VAR] ?? "";
9
9
  const handler = async (event) => {
@@ -12,14 +12,14 @@ const handler = async (event) => {
12
12
  log.error(`Could not find data table name in environment variables`);
13
13
  return {
14
14
  body: `Could not find data table name in environment variables`,
15
- statusCode: src_1.StatusCode.InternalError,
15
+ statusCode: kit_constants_1.StatusCode.InternalError,
16
16
  };
17
17
  }
18
18
  if (!event.body) {
19
19
  log.warn(`No body provided`);
20
20
  return {
21
21
  body: `No body provided`,
22
- statusCode: src_1.StatusCode.BadRequest,
22
+ statusCode: kit_constants_1.StatusCode.BadRequest,
23
23
  };
24
24
  }
25
25
  const request = JSON.parse(event.body);
@@ -27,10 +27,10 @@ const handler = async (event) => {
27
27
  log.warn(`Request body is not a valid Get Data By Date Range request`);
28
28
  return {
29
29
  body: `Request body is not a valid Get Data By Date Range request`,
30
- statusCode: src_1.StatusCode.BadRequest,
30
+ statusCode: kit_constants_1.StatusCode.BadRequest,
31
31
  };
32
32
  }
33
- const response = await (0, get_data_1.getDataForDateRange)(request, dataTableName, log);
33
+ const response = await (0, kit_aws_data_1.getDataForDateRange)(request, dataTableName, log);
34
34
  return {
35
35
  body: JSON.stringify(response),
36
36
  statusCode: response.statusCode,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xube/kit-aws-data-infrastructure",
3
- "version": "0.0.74",
3
+ "version": "0.0.76",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -19,17 +19,17 @@
19
19
  "homepage": "https://github.com/XubeLtd/dev-kit#readme",
20
20
  "devDependencies": {
21
21
  "@types/node": "^20.4.7",
22
- "@xube/kit-build": "^0.0.74",
22
+ "@xube/kit-build": "^0.0.76",
23
23
  "ts-node": "^10.9.1",
24
24
  "typescript": "^5.1.6"
25
25
  },
26
26
  "dependencies": {
27
- "@xube/kit-aws": "^0.0.74",
28
- "@xube/kit-aws-data": "^0.0.74",
29
- "@xube/kit-aws-data-schema": "^0.0.74",
30
- "@xube/kit-aws-infrastructure": "^0.0.74",
31
- "@xube/kit-constants": "^0.0.74",
32
- "@xube/kit-log": "^0.0.74",
27
+ "@xube/kit-aws": "^0.0.76",
28
+ "@xube/kit-aws-data": "^0.0.76",
29
+ "@xube/kit-aws-data-schema": "^0.0.76",
30
+ "@xube/kit-aws-infrastructure": "^0.0.76",
31
+ "@xube/kit-constants": "^0.0.76",
32
+ "@xube/kit-log": "^0.0.76",
33
33
  "aws-cdk-lib": "^2.100.0",
34
34
  "aws-lambda": "^1.0.7",
35
35
  "constructs": "^10.3.0"
@@ -1,7 +1,7 @@
1
1
  import { XubeRestAPIProps } from "@xube/kit-aws-infrastructure";
2
2
  import { AttributeType, ITable, Table } from "aws-cdk-lib/aws-dynamodb";
3
3
  import { Construct } from "constructs";
4
- import { PARTITION_KEY, SORT_KEY } from "../../kit-aws-schema/src";
4
+ import { PARTITION_KEY, SORT_KEY } from "@xube/kit-aws-schema";
5
5
  import { DataAPIManager } from "./api/data-api";
6
6
 
7
7
  export interface DataManagementProps extends XubeRestAPIProps {
@@ -6,8 +6,8 @@ import {
6
6
  APIGatewayProxyResult,
7
7
  APIGatewayProxyWithCognitoAuthorizerEvent,
8
8
  } from "aws-lambda";
9
- import { StatusCode } from "../../../kit-constants/src";
10
- import { getDataForDateRange } from "@xube/kit-aws-data/src/get/get-data";
9
+ import { StatusCode } from "@xube/kit-constants";
10
+ import { getDataForDateRange } from "@xube/kit-aws-data";
11
11
  import { XubeLog } from "@xube/kit-log";
12
12
 
13
13
  const dataTableName = process.env[DATA_TABLE_NAME_ENV_VAR] ?? "";
package/tsconfig.json CHANGED
@@ -27,6 +27,9 @@
27
27
  {
28
28
  "path": "../kit-aws-infrastructure"
29
29
  },
30
+ {
31
+ "path": "../kit-aws-data-schema"
32
+ },
30
33
  {
31
34
  "path": "../kit-aws-data"
32
35
  },