@exabugs/dynamodb-client 1.3.16 → 1.3.18

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/CHANGELOG.md CHANGED
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.3.18] - 2026-01-03
11
+
12
+ ### Fixed
13
+
14
+ - **重要**: extractCleanRecord関数でdata属性が存在しない場合の処理を修正
15
+ - シャドーレコードにはdata属性がないため、item自体をフォールバックとして使用
16
+ - これにより$nearクエリでメインレコードが正しく抽出されるようになった
17
+
18
+ ## [1.3.17] - 2026-01-03
19
+
20
+ ### Fixed
21
+
22
+ - **デバッグ**: $nearクエリでextractCleanRecordの動作を確認するためのデバッグログを追加
23
+ - nearQuery.tsのsearchFunctionでextractCleanRecord前後のレコード構造をログ出力
24
+ - これにより、data属性からのフィールド抽出が正しく行われているかを確認可能に
25
+
10
26
  ## [1.3.16] - 2026-01-03
11
27
 
12
28
  ### Fixed
@@ -1,5 +1,5 @@
1
- // @exabugs/dynamodb-client v1.3.16
2
- // Built: 2026-01-02T16:08:08.383Z
1
+ // @exabugs/dynamodb-client v1.3.18
2
+ // Built: 2026-01-02T16:39:22.578Z
3
3
  "use strict";
4
4
  var __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
@@ -29773,7 +29773,7 @@ function removeShadowKeys(record) {
29773
29773
  }
29774
29774
  __name(removeShadowKeys, "removeShadowKeys");
29775
29775
  function extractCleanRecord(item) {
29776
- const data2 = item.data;
29776
+ const data2 = item.data || item;
29777
29777
  return removeShadowKeys(data2);
29778
29778
  }
29779
29779
  __name(extractCleanRecord, "extractCleanRecord");
@@ -30583,7 +30583,30 @@ async function executeNearQuery(resource, fieldName, nearQuery, limit, requestId
30583
30583
  geohashPrefix,
30584
30584
  count: validRecords.length
30585
30585
  });
30586
- return validRecords.map((record) => extractCleanRecord(record));
30586
+ const cleanRecords = validRecords.map((record) => {
30587
+ logger9.debug("Before extractCleanRecord", {
30588
+ requestId,
30589
+ resource,
30590
+ recordKeys: Object.keys(record),
30591
+ hasData: "data" in record
30592
+ });
30593
+ const clean = extractCleanRecord(record);
30594
+ logger9.debug("After extractCleanRecord", {
30595
+ requestId,
30596
+ resource,
30597
+ cleanKeys: Object.keys(clean),
30598
+ hasLocation: "location" in clean
30599
+ });
30600
+ return clean;
30601
+ });
30602
+ logger9.debug("Clean records extracted", {
30603
+ requestId,
30604
+ resource,
30605
+ geohashPrefix,
30606
+ count: cleanRecords.length,
30607
+ sampleKeys: cleanRecords[0] ? Object.keys(cleanRecords[0]) : []
30608
+ });
30609
+ return cleanRecords;
30587
30610
  }, "searchFunction");
30588
30611
  const result = await executeNearSearch(
30589
30612
  nearQuery,
@@ -30592,10 +30615,7 @@ async function executeNearQuery(resource, fieldName, nearQuery, limit, requestId
30592
30615
  searchFunction,
30593
30616
  DEFAULT_GEOHASH_CONFIG
30594
30617
  );
30595
- const items = result.documents.map((doc) => ({
30596
- ...doc,
30597
- __distance: doc.__distance
30598
- }));
30618
+ const items = result.documents;
30599
30619
  logger9.info("$near query succeeded", {
30600
30620
  requestId,
30601
30621
  resource,
@@ -33453,7 +33473,7 @@ async function handler(event) {
33453
33473
  return createCorsResponse(HTTP_STATUS.OK);
33454
33474
  }
33455
33475
  if (event.requestContext.http.method === "GET" && event.requestContext.http.path === "/version") {
33456
- const version = "1.3.16";
33476
+ const version = "1.3.18";
33457
33477
  return createSuccessResponse({ version, timestamp: (/* @__PURE__ */ new Date()).toISOString() }, requestId);
33458
33478
  }
33459
33479
  if (event.requestContext.http.method !== "POST") {