@exabugs/dynamodb-client 1.3.12 → 1.3.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/CHANGELOG.md +24 -0
- package/dist/server/handler.cjs +12 -12
- package/dist/server/handler.cjs.map +2 -2
- package/dist/server/operations/find/nearQuery.d.ts.map +1 -1
- package/dist/server/operations/find/nearQuery.js +16 -15
- package/dist/server/operations/find/nearQuery.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.3.15] - 2026-01-03
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **重要**: $nearクエリでextractCleanRecordの誤用を修正
|
|
15
|
+
- nearQuery.tsのsearchFunctionでremoveShadowKeysを使用(extractCleanRecordではなく)
|
|
16
|
+
- searchFunctionが返すレコードは既にクリーンな形式(data属性なし)のため、extractCleanRecordを使用すると`undefined`になる問題を解決
|
|
17
|
+
- これにより、$near検索で正しくレコードが返されるようになった
|
|
18
|
+
|
|
19
|
+
## [1.3.14] - 2026-01-03
|
|
20
|
+
|
|
21
|
+
### Improved
|
|
22
|
+
|
|
23
|
+
- **コード品質**: $nearクエリの型定義を改善(`any` → `Record<string, unknown>`)
|
|
24
|
+
- **ドキュメント**: nearQuery.tsのコメントを明確化(SKの構造を正確に説明)
|
|
25
|
+
- **型安全性**: 型アサーションを改善して型安全性を向上
|
|
26
|
+
|
|
27
|
+
## [1.3.13] - 2026-01-03
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
|
|
31
|
+
- **重要**: $nearクエリでdata.\_\_shadowKeysが除外されない問題を修正
|
|
32
|
+
- nearQuery.tsでextractCleanRecordを使用(mainレコードのdata属性から\_\_shadowKeysを除外)
|
|
33
|
+
|
|
10
34
|
## [1.3.12] - 2026-01-02
|
|
11
35
|
|
|
12
36
|
### Fixed
|
package/dist/server/handler.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// @exabugs/dynamodb-client v1.3.
|
|
2
|
-
// Built: 2026-01-
|
|
1
|
+
// @exabugs/dynamodb-client v1.3.15
|
|
2
|
+
// Built: 2026-01-02T15:36:51.264Z
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
@@ -30563,6 +30563,7 @@ async function executeNearQuery(resource, fieldName, nearQuery, limit, requestId
|
|
|
30563
30563
|
KeyConditionExpression: "PK = :pk AND SK = :sk",
|
|
30564
30564
|
ExpressionAttributeValues: {
|
|
30565
30565
|
":pk": resource,
|
|
30566
|
+
// venues
|
|
30566
30567
|
":sk": `id#${id}`
|
|
30567
30568
|
},
|
|
30568
30569
|
ConsistentRead: true
|
|
@@ -30573,14 +30574,16 @@ async function executeNearQuery(resource, fieldName, nearQuery, limit, requestId
|
|
|
30573
30574
|
return result2.Items?.[0];
|
|
30574
30575
|
})
|
|
30575
30576
|
);
|
|
30576
|
-
const validRecords = mainRecords.filter(
|
|
30577
|
+
const validRecords = mainRecords.filter(
|
|
30578
|
+
(item) => item !== void 0
|
|
30579
|
+
);
|
|
30577
30580
|
logger9.debug("Main records retrieved", {
|
|
30578
30581
|
requestId,
|
|
30579
30582
|
resource,
|
|
30580
30583
|
geohashPrefix,
|
|
30581
30584
|
count: validRecords.length
|
|
30582
30585
|
});
|
|
30583
|
-
return validRecords;
|
|
30586
|
+
return validRecords.map((record) => removeShadowKeys(record));
|
|
30584
30587
|
}, "searchFunction");
|
|
30585
30588
|
const result = await executeNearSearch(
|
|
30586
30589
|
nearQuery,
|
|
@@ -30589,13 +30592,10 @@ async function executeNearQuery(resource, fieldName, nearQuery, limit, requestId
|
|
|
30589
30592
|
searchFunction,
|
|
30590
30593
|
DEFAULT_GEOHASH_CONFIG
|
|
30591
30594
|
);
|
|
30592
|
-
const items = result.documents.map((doc) => {
|
|
30593
|
-
|
|
30594
|
-
|
|
30595
|
-
|
|
30596
|
-
__distance: doc.__distance
|
|
30597
|
-
};
|
|
30598
|
-
});
|
|
30595
|
+
const items = result.documents.map((doc) => ({
|
|
30596
|
+
...doc,
|
|
30597
|
+
__distance: doc.__distance
|
|
30598
|
+
}));
|
|
30599
30599
|
logger9.info("$near query succeeded", {
|
|
30600
30600
|
requestId,
|
|
30601
30601
|
resource,
|
|
@@ -33453,7 +33453,7 @@ async function handler(event) {
|
|
|
33453
33453
|
return createCorsResponse(HTTP_STATUS.OK);
|
|
33454
33454
|
}
|
|
33455
33455
|
if (event.requestContext.http.method === "GET" && event.requestContext.http.path === "/version") {
|
|
33456
|
-
const version = "1.3.
|
|
33456
|
+
const version = "1.3.15";
|
|
33457
33457
|
return createSuccessResponse({ version, timestamp: (/* @__PURE__ */ new Date()).toISOString() }, requestId);
|
|
33458
33458
|
}
|
|
33459
33459
|
if (event.requestContext.http.method !== "POST") {
|