@exabugs/dynamodb-client 1.4.10 → 1.4.11

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.
@@ -1,5 +1,5 @@
1
- // @exabugs/dynamodb-client v1.4.10
2
- // Built: 2026-04-05T13:26:07.424Z
1
+ // @exabugs/dynamodb-client v1.4.11
2
+ // Built: 2026-04-06T23:11:39.347Z
3
3
  "use strict";
4
4
  var __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
@@ -28198,7 +28198,7 @@ var require_dist_cjs66 = __commonJS({
28198
28198
  return async () => handler2(this.clientCommand);
28199
28199
  }
28200
28200
  };
28201
- var BatchGetCommand6 = class extends DynamoDBDocumentClientCommand {
28201
+ var BatchGetCommand7 = class extends DynamoDBDocumentClientCommand {
28202
28202
  static {
28203
28203
  __name(this, "BatchGetCommand");
28204
28204
  }
@@ -28701,7 +28701,7 @@ var require_dist_cjs66 = __commonJS({
28701
28701
  }
28702
28702
  }
28703
28703
  batchGet(args, optionsOrCb, cb) {
28704
- const command = new BatchGetCommand6(args);
28704
+ const command = new BatchGetCommand7(args);
28705
28705
  if (typeof optionsOrCb === "function") {
28706
28706
  this.send(command, optionsOrCb);
28707
28707
  } else if (typeof cb === "function") {
@@ -28878,7 +28878,7 @@ var require_dist_cjs66 = __commonJS({
28878
28878
  }, "get")
28879
28879
  });
28880
28880
  exports2.BatchExecuteStatementCommand = BatchExecuteStatementCommand;
28881
- exports2.BatchGetCommand = BatchGetCommand6;
28881
+ exports2.BatchGetCommand = BatchGetCommand7;
28882
28882
  exports2.BatchWriteCommand = BatchWriteCommand;
28883
28883
  exports2.DeleteCommand = DeleteCommand;
28884
28884
  exports2.DynamoDBDocument = DynamoDBDocument;
@@ -30748,31 +30748,34 @@ async function executeNearQuery(resource, fieldName, nearQuery, limit, requestId
30748
30748
  geohashPrefix,
30749
30749
  ids: mainRecordIds
30750
30750
  });
30751
- const mainRecords = await Promise.all(
30752
- mainRecordIds.map(async (id) => {
30753
- const result2 = await executeDynamoDBOperation(
30754
- () => dbClient2.send(
30755
- new import_lib_dynamodb3.QueryCommand({
30756
- TableName: tableName,
30757
- KeyConditionExpression: "PK = :pk AND SK = :sk",
30758
- ExpressionAttributeValues: {
30759
- ":pk": resource,
30760
- // venues
30761
- ":sk": `id#${id}`
30762
- },
30763
- ConsistentRead: true,
30764
- ReturnConsumedCapacity: "TOTAL"
30765
- })
30766
- ),
30767
- "Query"
30768
- );
30769
- costTracker.add(result2.ConsumedCapacity);
30770
- return result2.Items?.[0];
30771
- })
30772
- );
30773
- const validRecords = mainRecords.filter(
30774
- (item) => item !== void 0
30775
- );
30751
+ const BATCH_SIZE = 100;
30752
+ const validRecords = [];
30753
+ for (let i4 = 0; i4 < mainRecordIds.length; i4 += BATCH_SIZE) {
30754
+ const chunk = mainRecordIds.slice(i4, i4 + BATCH_SIZE);
30755
+ const batchGetResult = await executeDynamoDBOperation(
30756
+ () => dbClient2.send(
30757
+ new import_lib_dynamodb3.BatchGetCommand({
30758
+ RequestItems: {
30759
+ [tableName]: {
30760
+ Keys: chunk.map((id) => ({
30761
+ PK: resource,
30762
+ SK: `id#${id}`
30763
+ })),
30764
+ ConsistentRead: false
30765
+ }
30766
+ },
30767
+ ReturnConsumedCapacity: "TOTAL"
30768
+ })
30769
+ ),
30770
+ "BatchGetItem"
30771
+ );
30772
+ if (batchGetResult.ConsumedCapacity) {
30773
+ for (const capacity of batchGetResult.ConsumedCapacity) {
30774
+ costTracker.add(capacity);
30775
+ }
30776
+ }
30777
+ validRecords.push(...batchGetResult.Responses?.[tableName] || []);
30778
+ }
30776
30779
  logger7.debug("Main records retrieved", {
30777
30780
  requestId,
30778
30781
  resource,
@@ -34500,7 +34503,7 @@ async function handler(event) {
34500
34503
  return createCorsResponse(HTTP_STATUS.OK);
34501
34504
  }
34502
34505
  if (event.requestContext.http.method === "GET" && event.requestContext.http.path === "/version") {
34503
- const version = "1.4.10";
34506
+ const version = "1.4.11";
34504
34507
  return createSuccessResponse({ version, timestamp: (/* @__PURE__ */ new Date()).toISOString() }, requestId);
34505
34508
  }
34506
34509
  if (event.requestContext.http.method !== "POST") {