@factorearth/recordmiddleware-dataaccesslayer 0.0.1-y.13 → 0.0.1-y.15
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/getItem.js +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/lib/batchDeleteItems.ts +1 -1
- package/lib/batchGetItems.ts +1 -1
- package/lib/batchPutItems.ts +3 -3
- package/lib/deleteItem.ts +1 -1
- package/lib/getItem.ts +2 -2
- package/lib/index.ts +2 -1
- package/lib/putItem.ts +1 -1
- package/lib/updateItem.ts +1 -1
- package/package.json +2 -2
package/dist/getItem.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { dynamoDbDocClient } from "./aws-services";
|
|
1
|
+
import { dynamoDbDocClient } from "./aws-services.js";
|
|
2
2
|
import { GetCommand, QueryCommand } from "@aws-sdk/lib-dynamodb";
|
|
3
|
-
import { _columnsAndAttributeToReturn } from "utils";
|
|
3
|
+
import { _columnsAndAttributeToReturn } from "./utils.js";
|
|
4
4
|
export const getItem = async (id, tableName) => {
|
|
5
5
|
const params = {
|
|
6
6
|
TableName: tableName,
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/lib/batchDeleteItems.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BatchWriteCommand, BatchWriteCommandInput } from "@aws-sdk/lib-dynamodb";
|
|
2
|
-
import { dynamoDbDocClient } from "aws-services";
|
|
2
|
+
import { dynamoDbDocClient } from "./aws-services.js";
|
|
3
3
|
import chunkBatch from "chunkBatch";
|
|
4
4
|
import { BatchInput, MAX_ITEMS_BATCH_OPERATIONS } from "index";
|
|
5
5
|
|
package/lib/batchGetItems.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BatchGetCommand, BatchGetCommandInput } from "@aws-sdk/lib-dynamodb";
|
|
2
|
-
import { dynamoDbDocClient } from "aws-services";
|
|
2
|
+
import { dynamoDbDocClient } from "./aws-services.js";
|
|
3
3
|
import { BatchInput } from "index";
|
|
4
4
|
|
|
5
5
|
export async function batchGetItems(ids: BatchInput[], tableName: string) {
|
package/lib/batchPutItems.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BatchWriteCommand, BatchWriteCommandInput } from "@aws-sdk/lib-dynamodb";
|
|
2
|
-
import { dynamoDbDocClient } from "./aws-services";
|
|
3
|
-
import chunkBatch from "./chunkBatch";
|
|
4
|
-
import { BatchInput, MAX_ITEMS_BATCH_OPERATIONS } from "index";
|
|
2
|
+
import { dynamoDbDocClient } from "./aws-services.js";
|
|
3
|
+
import chunkBatch from "./chunkBatch.js";
|
|
4
|
+
import { BatchInput, MAX_ITEMS_BATCH_OPERATIONS } from "./index.js";
|
|
5
5
|
|
|
6
6
|
export async function batchPutItems(items: BatchInput[], tableName: string) {
|
|
7
7
|
const chunks = chunkBatch(items, MAX_ITEMS_BATCH_OPERATIONS);
|
package/lib/deleteItem.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DeleteCommand, DeleteCommandInput } from "@aws-sdk/lib-dynamodb";
|
|
2
|
-
import { dynamoDbDocClient } from "aws-services";
|
|
2
|
+
import { dynamoDbDocClient } from "./aws-services.js";
|
|
3
3
|
|
|
4
4
|
export async function deleteItem(id: string, tableName: string) {
|
|
5
5
|
const commandInput: DeleteCommandInput = {
|
package/lib/getItem.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { dynamoDbDocClient } from "./aws-services";
|
|
1
|
+
import { dynamoDbDocClient } from "./aws-services.js";
|
|
2
2
|
import { GetCommand, GetCommandInput, QueryCommand, QueryCommandInput } from "@aws-sdk/lib-dynamodb";
|
|
3
|
-
import { _columnsAndAttributeToReturn } from "utils";
|
|
3
|
+
import { _columnsAndAttributeToReturn } from "./utils.js";
|
|
4
4
|
|
|
5
5
|
export const getItem = async (id: string, tableName: string ) => {
|
|
6
6
|
const params: GetCommandInput = {
|
package/lib/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./aws-services";
|
|
1
|
+
export * from "./aws-services.js";
|
|
2
2
|
export * from "./batchDeleteItems";
|
|
3
3
|
export * from "./batchGetItems";
|
|
4
4
|
export * from "./batchPutItems";
|
|
@@ -7,6 +7,7 @@ export * from "./deleteItem";
|
|
|
7
7
|
export * from "./getItem";
|
|
8
8
|
export * from "./putItem";
|
|
9
9
|
export * from "./updateItem";
|
|
10
|
+
export * from "./utils";
|
|
10
11
|
|
|
11
12
|
export const MAX_ITEMS_BATCH_OPERATIONS = 25;
|
|
12
13
|
|
package/lib/putItem.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PutCommand, PutCommandInput } from "@aws-sdk/lib-dynamodb";
|
|
2
|
-
import { dynamoDbDocClient } from "aws-services";
|
|
2
|
+
import { dynamoDbDocClient } from "./aws-services.js";
|
|
3
3
|
|
|
4
4
|
export async function putItem(item: Record<string, any>, tableName: string) {
|
|
5
5
|
const commandInput: PutCommandInput = {
|
package/lib/updateItem.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UpdateCommand, UpdateCommandInput } from "@aws-sdk/lib-dynamodb";
|
|
2
|
-
import { dynamoDbDocClient } from "aws-services";
|
|
2
|
+
import { dynamoDbDocClient } from "./aws-services.js";
|
|
3
3
|
|
|
4
4
|
export async function updateItem(item: Record<string, any>, tableName: string) {
|
|
5
5
|
const commandInput: UpdateCommandInput = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@factorearth/recordmiddleware-dataaccesslayer",
|
|
3
|
-
"version": "0.0.1-y.
|
|
3
|
+
"version": "0.0.1-y.15",
|
|
4
4
|
"description": "A module for accessing dynamdb efficiently",
|
|
5
5
|
"author": "madtrx <marlin.makori@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/FactorEarth/RecordMiddleware#readme",
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"access": "public",
|
|
30
30
|
"registry": "https://registry.npmjs.org/"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "a16903190cf0716f888b0efe72dd40decfe979c1"
|
|
33
33
|
}
|