@exabugs/dynamodb-client 1.3.33 → 1.3.34

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,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.3.34] - 2026-01-08
11
+
12
+ ### Fixed
13
+
14
+ - **$setOnInsert対応修正**: `convertUpdateOneParams`が`$setOnInsert`を正しく処理するように修正
15
+ - デバイス登録時に`token`と`userId`が保存されない問題を解決
16
+ - `$set`のみを抽出していたが、`$setOnInsert`も含めるように修正
17
+ - UpdateOperators形式(`{ $set, $setOnInsert }`)の場合、update全体を`handleUpdateOne`に渡す
18
+ - `handleUpsertCreate`で`$set`と`$setOnInsert`を正しくマージできるようになった
19
+
10
20
  ## [1.3.33] - 2026-01-08
11
21
 
12
22
  ### Fixed
@@ -1,5 +1,5 @@
1
- // @exabugs/dynamodb-client v1.3.33
2
- // Built: 2026-01-08T12:17:07.872Z
1
+ // @exabugs/dynamodb-client v1.3.34
2
+ // Built: 2026-01-08T13:09:01.510Z
3
3
  "use strict";
4
4
  var __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
@@ -33245,7 +33245,16 @@ function convertUpdateOneParams(mongoParams) {
33245
33245
  if (!mongoParams.filter) {
33246
33246
  throw new Error("updateOne requires filter");
33247
33247
  }
33248
- const updateData = mongoParams.update && typeof mongoParams.update === "object" ? "$set" in mongoParams.update ? mongoParams.update.$set || {} : mongoParams.update : {};
33248
+ let updateData;
33249
+ if (mongoParams.update && typeof mongoParams.update === "object") {
33250
+ if ("$set" in mongoParams.update || "$setOnInsert" in mongoParams.update) {
33251
+ updateData = mongoParams.update;
33252
+ } else {
33253
+ updateData = mongoParams.update;
33254
+ }
33255
+ } else {
33256
+ updateData = {};
33257
+ }
33249
33258
  const id = typeof mongoParams.filter.id === "string" ? mongoParams.filter.id : void 0;
33250
33259
  if (id) {
33251
33260
  return {
@@ -34798,7 +34807,7 @@ async function handler(event) {
34798
34807
  return createCorsResponse(HTTP_STATUS.OK);
34799
34808
  }
34800
34809
  if (event.requestContext.http.method === "GET" && event.requestContext.http.path === "/version") {
34801
- const version = "1.3.33";
34810
+ const version = "1.3.34";
34802
34811
  return createSuccessResponse({ version, timestamp: (/* @__PURE__ */ new Date()).toISOString() }, requestId);
34803
34812
  }
34804
34813
  if (event.requestContext.http.method !== "POST") {