@exabugs/dynamodb-client 1.3.32 → 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 +20 -0
- package/dist/server/handler.cjs +24 -12
- 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/parameterConverter.d.ts +1 -1
- package/dist/server/operations/parameterConverter.d.ts.map +1 -1
- package/dist/server/operations/parameterConverter.js +31 -15
- package/dist/server/operations/parameterConverter.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,26 @@ 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
|
+
|
|
20
|
+
## [1.3.33] - 2026-01-08
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- **filterによるupdateOne修正**: `convertUpdateOneParams`が`filter.id`以外のフィールドを正しく処理するように修正
|
|
25
|
+
- ゲストユーザーのデバイス登録失敗問題を解決
|
|
26
|
+
- `updateOne({ filter: { token: 'xxx' } }, ...)`が正しく動作するように修正
|
|
27
|
+
- `filter.id`が存在する場合は従来通り`{ id, data, options }`を返す(後方互換性)
|
|
28
|
+
- `filter.id`が存在しない場合は`{ filter, data, options }`を返す(新しいfilter対応)
|
|
29
|
+
|
|
10
30
|
## [1.3.32] - 2026-01-08
|
|
11
31
|
|
|
12
32
|
### Added
|
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.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;
|
|
@@ -33242,17 +33242,29 @@ function convertInsertOneParams(mongoParams) {
|
|
|
33242
33242
|
}
|
|
33243
33243
|
__name(convertInsertOneParams, "convertInsertOneParams");
|
|
33244
33244
|
function convertUpdateOneParams(mongoParams) {
|
|
33245
|
-
|
|
33246
|
-
|
|
33247
|
-
|
|
33248
|
-
|
|
33249
|
-
|
|
33250
|
-
|
|
33251
|
-
|
|
33245
|
+
if (!mongoParams.filter) {
|
|
33246
|
+
throw new Error("updateOne requires filter");
|
|
33247
|
+
}
|
|
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
|
+
}
|
|
33258
|
+
const id = typeof mongoParams.filter.id === "string" ? mongoParams.filter.id : void 0;
|
|
33259
|
+
if (id) {
|
|
33260
|
+
return {
|
|
33261
|
+
id,
|
|
33262
|
+
data: updateData,
|
|
33263
|
+
options: mongoParams.options
|
|
33264
|
+
};
|
|
33252
33265
|
}
|
|
33253
|
-
const updateData = mongoParams.update && typeof mongoParams.update === "object" ? "$set" in mongoParams.update ? mongoParams.update.$set || {} : mongoParams.update : {};
|
|
33254
33266
|
return {
|
|
33255
|
-
|
|
33267
|
+
filter: mongoParams.filter,
|
|
33256
33268
|
data: updateData,
|
|
33257
33269
|
options: mongoParams.options
|
|
33258
33270
|
};
|
|
@@ -34795,7 +34807,7 @@ async function handler(event) {
|
|
|
34795
34807
|
return createCorsResponse(HTTP_STATUS.OK);
|
|
34796
34808
|
}
|
|
34797
34809
|
if (event.requestContext.http.method === "GET" && event.requestContext.http.path === "/version") {
|
|
34798
|
-
const version = "1.3.
|
|
34810
|
+
const version = "1.3.34";
|
|
34799
34811
|
return createSuccessResponse({ version, timestamp: (/* @__PURE__ */ new Date()).toISOString() }, requestId);
|
|
34800
34812
|
}
|
|
34801
34813
|
if (event.requestContext.http.method !== "POST") {
|