@exabugs/dynamodb-client 1.3.0 → 1.3.2

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,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.3.2] - 2026-01-02
11
+
12
+ ### Added
13
+
14
+ - **バージョンエンドポイント**: `GET /version`エンドポイントを追加
15
+ - デプロイされたdynamodb-clientのバージョンを確認可能
16
+ - レスポンス形式: `{ "version": "1.3.2", "timestamp": "2026-01-02T..." }`
17
+ - Lambda関数のデバッグとバージョン確認に有用
18
+
19
+ ## [1.3.1] - 2026-01-02
20
+
21
+ ### Fixed
22
+
23
+ - **$nearオペレータ**: GeoHashシャドウレコード検索の修正
24
+ - フィールド名を直接使用するように変更(`_geohash`サフィックスを削除)
25
+ - シャドウレコードの実際の形式に合わせて修正(例: `location#xn74rnmx#id#...`)
26
+ - これにより$nearオペレータが正しく結果を返すようになりました
27
+
10
28
  ## [1.3.0] - 2026-01-02
11
29
 
12
30
  ### Added
@@ -1,5 +1,5 @@
1
- // @exabugs/dynamodb-client v1.3.0
2
- // Built: 2026-01-02T08:24:53.062Z
1
+ // @exabugs/dynamodb-client v1.3.2
2
+ // Built: 2026-01-02T09:52:23.365Z
3
3
  "use strict";
4
4
  var __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
@@ -28926,6 +28926,18 @@ __export(handler_exports, {
28926
28926
  });
28927
28927
  module.exports = __toCommonJS(handler_exports);
28928
28928
 
28929
+ // src/shared/constants/http.ts
28930
+ var HTTP_STATUS = {
28931
+ OK: 200,
28932
+ BAD_REQUEST: 400,
28933
+ UNAUTHORIZED: 401,
28934
+ FORBIDDEN: 403,
28935
+ NOT_FOUND: 404,
28936
+ METHOD_NOT_ALLOWED: 405,
28937
+ INTERNAL_SERVER_ERROR: 500,
28938
+ NOT_IMPLEMENTED: 501
28939
+ };
28940
+
28929
28941
  // src/shared/errors/index.ts
28930
28942
  var AppError = class extends Error {
28931
28943
  constructor(code, message, statusCode = 500, details) {
@@ -29178,18 +29190,6 @@ function createDynamoDBClient(config = {}) {
29178
29190
  }
29179
29191
  __name(createDynamoDBClient, "createDynamoDBClient");
29180
29192
 
29181
- // src/shared/constants/http.ts
29182
- var HTTP_STATUS = {
29183
- OK: 200,
29184
- BAD_REQUEST: 400,
29185
- UNAUTHORIZED: 401,
29186
- FORBIDDEN: 403,
29187
- NOT_FOUND: 404,
29188
- METHOD_NOT_ALLOWED: 405,
29189
- INTERNAL_SERVER_ERROR: 500,
29190
- NOT_IMPLEMENTED: 501
29191
- };
29192
-
29193
29193
  // src/shared/constants/dynamodb.ts
29194
29194
  var DYNAMODB_TRANSACT_WRITE_MAX_ITEMS = 100;
29195
29195
  var DYNAMODB_QUERY_MAX_SIZE_BYTES = 1024 * 1024;
@@ -30497,7 +30497,6 @@ async function executeNearQuery(resource, fieldName, nearQuery, limit, requestId
30497
30497
  nearQuery,
30498
30498
  limit
30499
30499
  });
30500
- const geohashFieldName = `${fieldName}_geohash`;
30501
30500
  const searchFunction = /* @__PURE__ */ __name(async (geohashPrefix) => {
30502
30501
  const dbClient2 = getDBClient();
30503
30502
  const tableName = getTableName();
@@ -30508,7 +30507,7 @@ async function executeNearQuery(resource, fieldName, nearQuery, limit, requestId
30508
30507
  KeyConditionExpression: "PK = :pk AND begins_with(SK, :skPrefix)",
30509
30508
  ExpressionAttributeValues: {
30510
30509
  ":pk": resource,
30511
- ":skPrefix": `${geohashFieldName}#${geohashPrefix}`
30510
+ ":skPrefix": `${fieldName}#${geohashPrefix}`
30512
30511
  },
30513
30512
  ConsistentRead: false
30514
30513
  // シャドウレコードは結果整合性で十分
@@ -33413,6 +33412,10 @@ async function handler(event) {
33413
33412
  if (event.requestContext.http.method === "OPTIONS") {
33414
33413
  return createCorsResponse(HTTP_STATUS.OK);
33415
33414
  }
33415
+ if (event.requestContext.http.method === "GET" && event.requestContext.http.path === "/version") {
33416
+ const version = process.env.DYNAMODB_CLIENT_VERSION || "1.3.2";
33417
+ return createSuccessResponse({ version, timestamp: (/* @__PURE__ */ new Date()).toISOString() }, requestId);
33418
+ }
33416
33419
  if (event.requestContext.http.method !== "POST") {
33417
33420
  throw new Error("Only POST method is allowed");
33418
33421
  }