@exabugs/dynamodb-client 1.3.5 → 1.3.7
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 +29 -0
- package/dist/server/handler.cjs +32 -6
- package/dist/server/handler.cjs.map +2 -2
- package/dist/server/handler.d.ts +1 -1
- package/dist/server/handler.js +1 -1
- package/dist/server/operations/find/nearQuery.d.ts.map +1 -1
- package/dist/server/operations/find/nearQuery.js +32 -4
- package/dist/server/operations/find/nearQuery.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,12 +7,41 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.3.7] - 2026-01-02
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **$nearクエリのシャドーレコード検索**: SKプレフィックスパターンを修正
|
|
15
|
+
- 修正前: `${fieldName}#${geohashPrefix}` → 修正後: `${fieldName}#${geohashPrefix}#id#`
|
|
16
|
+
- シャドーレコードのSKパターン `location#<geohash>#id#<venue-id>` に正しく対応
|
|
17
|
+
- これにより、$nearクエリが正常に動作し、距離順にソートされた開催地一覧を取得可能に
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- **$nearクエリのデバッグログ**: 各ステップでログを出力して問題追跡を容易に
|
|
22
|
+
- シャドーレコード検索時のSKプレフィックスをログ出力
|
|
23
|
+
- 検索結果の件数をログ出力
|
|
24
|
+
- 本体レコード取得時のIDリストをログ出力
|
|
25
|
+
|
|
26
|
+
## [1.3.6] - 2026-01-02
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
|
|
30
|
+
- **Lambda関数のデフォルトバージョン**: handler.tsのデフォルトバージョンを1.3.6に更新
|
|
31
|
+
- 環境変数`DYNAMODB_CLIENT_VERSION`が設定されていない場合のフォールバック値を修正
|
|
32
|
+
- これにより、Lambda関数のソースコードハッシュが確実に変更される
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- **パブリッシュ手順の改善**: コメントだけの変更ではビルド成果物が変わらないため、実際のコード変更が必要
|
|
37
|
+
|
|
10
38
|
## [1.3.5] - 2026-01-02
|
|
11
39
|
|
|
12
40
|
### Changed
|
|
13
41
|
|
|
14
42
|
- **テストリリース**: publish-and-deploy.mdの手順確認のためのテストリリース
|
|
15
43
|
- handler.tsのバージョンコメントを1.3.5に更新
|
|
44
|
+
- **注意**: コメントのみの変更のため、ビルド成果物は変わらず
|
|
16
45
|
|
|
17
46
|
## [1.3.4] - 2026-01-02
|
|
18
47
|
|
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.7
|
|
2
|
+
// Built: 2026-01-02T13:40:18.082Z
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
@@ -30500,6 +30500,13 @@ async function executeNearQuery(resource, fieldName, nearQuery, limit, requestId
|
|
|
30500
30500
|
const searchFunction = /* @__PURE__ */ __name(async (geohashPrefix) => {
|
|
30501
30501
|
const dbClient2 = getDBClient();
|
|
30502
30502
|
const tableName = getTableName();
|
|
30503
|
+
logger9.debug("Searching shadow records", {
|
|
30504
|
+
requestId,
|
|
30505
|
+
resource,
|
|
30506
|
+
fieldName,
|
|
30507
|
+
geohashPrefix,
|
|
30508
|
+
skPrefix: `${fieldName}#${geohashPrefix}`
|
|
30509
|
+
});
|
|
30503
30510
|
const queryResult = await executeDynamoDBOperation(
|
|
30504
30511
|
() => dbClient2.send(
|
|
30505
30512
|
new import_lib_dynamodb5.QueryCommand({
|
|
@@ -30516,11 +30523,23 @@ async function executeNearQuery(resource, fieldName, nearQuery, limit, requestId
|
|
|
30516
30523
|
"Query"
|
|
30517
30524
|
);
|
|
30518
30525
|
const shadowRecords = queryResult.Items || [];
|
|
30526
|
+
logger9.debug("Shadow records found", {
|
|
30527
|
+
requestId,
|
|
30528
|
+
resource,
|
|
30529
|
+
geohashPrefix,
|
|
30530
|
+
count: shadowRecords.length
|
|
30531
|
+
});
|
|
30519
30532
|
const mainRecordIds = shadowRecords.map((item) => {
|
|
30520
30533
|
const sk = item.SK;
|
|
30521
|
-
const
|
|
30522
|
-
return
|
|
30534
|
+
const parts = sk.split("#id#");
|
|
30535
|
+
return parts.length === 2 ? parts[1] : null;
|
|
30523
30536
|
}).filter((id) => id !== null);
|
|
30537
|
+
logger9.debug("Main record IDs extracted", {
|
|
30538
|
+
requestId,
|
|
30539
|
+
resource,
|
|
30540
|
+
geohashPrefix,
|
|
30541
|
+
ids: mainRecordIds
|
|
30542
|
+
});
|
|
30524
30543
|
const mainRecords = await Promise.all(
|
|
30525
30544
|
mainRecordIds.map(async (id) => {
|
|
30526
30545
|
const result2 = await executeDynamoDBOperation(
|
|
@@ -30540,7 +30559,14 @@ async function executeNearQuery(resource, fieldName, nearQuery, limit, requestId
|
|
|
30540
30559
|
return result2.Items?.[0];
|
|
30541
30560
|
})
|
|
30542
30561
|
);
|
|
30543
|
-
|
|
30562
|
+
const validRecords = mainRecords.filter((item) => item !== void 0);
|
|
30563
|
+
logger9.debug("Main records retrieved", {
|
|
30564
|
+
requestId,
|
|
30565
|
+
resource,
|
|
30566
|
+
geohashPrefix,
|
|
30567
|
+
count: validRecords.length
|
|
30568
|
+
});
|
|
30569
|
+
return validRecords;
|
|
30544
30570
|
}, "searchFunction");
|
|
30545
30571
|
const result = await executeNearSearch(
|
|
30546
30572
|
nearQuery,
|
|
@@ -33413,7 +33439,7 @@ async function handler(event) {
|
|
|
33413
33439
|
return createCorsResponse(HTTP_STATUS.OK);
|
|
33414
33440
|
}
|
|
33415
33441
|
if (event.requestContext.http.method === "GET" && event.requestContext.http.path === "/version") {
|
|
33416
|
-
const version = process.env.DYNAMODB_CLIENT_VERSION || "1.3.
|
|
33442
|
+
const version = process.env.DYNAMODB_CLIENT_VERSION || "1.3.6";
|
|
33417
33443
|
return createSuccessResponse({ version, timestamp: (/* @__PURE__ */ new Date()).toISOString() }, requestId);
|
|
33418
33444
|
}
|
|
33419
33445
|
if (event.requestContext.http.method !== "POST") {
|