@exabugs/dynamodb-client 1.3.30 → 1.3.32
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 +17 -1087
- package/dist/server/handler.cjs +7 -3
- 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.map +1 -1
- package/dist/server/operations/parameterConverter.js +5 -0
- package/dist/server/operations/parameterConverter.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.3.32] - 2026-01-08
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **デバッグログ追加**: convertUpdateOneParamsにデバッグログを追加
|
|
15
|
+
- ゲストユーザーのデバイス登録失敗問題の調査のため
|
|
16
|
+
- filter.idが正しく渡されているかを確認
|
|
17
|
+
|
|
18
|
+
## [1.3.31] - 2026-01-08
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- **デプロイ問題の修正**: Lambda関数が古いコードを使用していた問題を修正
|
|
23
|
+
- handler.tsのバージョンコメントを1.3.31に更新
|
|
24
|
+
- デフォルトバージョンを1.3.31に更新
|
|
25
|
+
- v1.3.30のfilter対応コードが正しくデプロイされるようにビルド成果物を更新
|
|
26
|
+
|
|
10
27
|
## [1.3.30] - 2026-01-08
|
|
11
28
|
|
|
12
29
|
### Added
|
|
@@ -22,1090 +39,3 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
22
39
|
- **型定義の改善**: `SingleRecordSelector`と`MultipleRecordsSelector`型を導入し、共通部分を抽出
|
|
23
40
|
- `UpdateOneParams`、`DeleteOneParams`: `{ id: string } | { filter: Record<string, unknown> }`
|
|
24
41
|
- `UpdateManyParams`、`DeleteManyParams`: `{ ids: string[] } | { filter: Record<string, unknown> }`
|
|
25
|
-
|
|
26
|
-
## [1.3.29] - 2026-01-08
|
|
27
|
-
|
|
28
|
-
### Added
|
|
29
|
-
|
|
30
|
-
- **React-Admin多対多関係コンポーネント**: `ReferenceManyToManyField`に`_through`フィールドを追加
|
|
31
|
-
- 各ターゲットレコードに中間テーブルのデータを`_through`フィールドとして追加
|
|
32
|
-
- 中間テーブルのフィールドに直接アクセス可能(例: `source="_through.status"`)
|
|
33
|
-
- N+1問題を解消し、パフォーマンスを向上
|
|
34
|
-
- 使用例: `<StatusField source="_through.status" label="管理者ステータス" />`
|
|
35
|
-
|
|
36
|
-
## [1.3.28] - 2026-01-07
|
|
37
|
-
|
|
38
|
-
### Added
|
|
39
|
-
|
|
40
|
-
- **React-Admin多対多関係コンポーネント**: `ReferenceManyToManyInput`に`filter`プロパティを追加
|
|
41
|
-
- `filter?: Record<string, unknown>`プロパティで任意のフィルター条件を指定可能
|
|
42
|
-
- `$near`オペレータによる地理的近傍探査をサポート
|
|
43
|
-
- 使用例: `filter={{ location: { $near: { latitude: 35.6895, longitude: 139.6917, maxDistance: 5000 } } }}`
|
|
44
|
-
- `ReferenceArrayInput`に透過的に渡され、Records Lambda APIで処理される
|
|
45
|
-
|
|
46
|
-
## [1.3.27] - 2026-01-07
|
|
47
|
-
|
|
48
|
-
### Changed
|
|
49
|
-
|
|
50
|
-
- **React-Admin多対多関係コンポーネント**: DataProvider-level処理に変更
|
|
51
|
-
- `ReferenceManyToManyInput`: `__manyToMany_*`形式のフィールド名を使用
|
|
52
|
-
- `dataProvider`: `create`/`update`メソッドで自動的に中間テーブルを更新
|
|
53
|
-
- `useManyToManyTransform`フックを削除(不要になった)
|
|
54
|
-
- ユーザーは`transform`プロパティを書く必要がなくなった
|
|
55
|
-
- React-Admin Enterprise Editionと同様のシンプルなAPI
|
|
56
|
-
|
|
57
|
-
## [1.3.26] - 2026-01-07
|
|
58
|
-
|
|
59
|
-
### Changed
|
|
60
|
-
|
|
61
|
-
- **React-Admin多対多関係コンポーネント**: フォーム保存時にコミットする設計に変更
|
|
62
|
-
- `ReferenceManyToManyInput`: 選択時はフォーム状態のみ更新(DB更新なし)
|
|
63
|
-
- `useManyToManyTransform`: 親フォームの保存時に中間テーブルを更新する新しいフック
|
|
64
|
-
- キャンセル可能: 保存前にキャンセルすれば変更が破棄される
|
|
65
|
-
- トランザクション性: 親レコードと中間テーブルの更新が同時に行われる
|
|
66
|
-
|
|
67
|
-
### Fixed
|
|
68
|
-
|
|
69
|
-
- **React-Admin多対多関係コンポーネント**: `ListContextProvider`の追加
|
|
70
|
-
- `ReferenceManyToManyField`: 子コンポーネントに必要なListContextを提供
|
|
71
|
-
- "useListContext must be used inside a ListContextProvider"エラーを修正
|
|
72
|
-
|
|
73
|
-
## [1.3.25] - 2026-01-07
|
|
74
|
-
|
|
75
|
-
### Fixed
|
|
76
|
-
|
|
77
|
-
- **React-Admin多対多関係コンポーネント**: 無限ループの修正
|
|
78
|
-
- `ReferenceManyToManyField`: `useMemo`を使用してrecordIdを安定化し、無限再レンダリングを防止
|
|
79
|
-
- `ReferenceManyToManyInput`: 同様に`useMemo`を使用して無限ループを防止
|
|
80
|
-
- レート制限を追加(1秒間隔、最大10回のフェッチ)
|
|
81
|
-
- 依存配列を最適化(不要な依存を削除)
|
|
82
|
-
|
|
83
|
-
## [1.3.24] - 2026-01-06
|
|
84
|
-
|
|
85
|
-
### Added
|
|
86
|
-
|
|
87
|
-
- **React-Admin多対多関係コンポーネント**: 中間テーブルを使用した多対多関係をサポート
|
|
88
|
-
- `ReferenceManyToManyField`: Show/List画面で多対多関係を表示
|
|
89
|
-
- `ReferenceManyToManyInput`: Edit/Create画面で多対多関係を編集
|
|
90
|
-
- `createMany`: DataProviderに複数レコード一括作成メソッドを追加
|
|
91
|
-
- 完全なTypeScript型定義とエラーハンドリング
|
|
92
|
-
- パフォーマンス最適化(バッチ処理、リクエストキャンセル)
|
|
93
|
-
|
|
94
|
-
### Changed
|
|
95
|
-
|
|
96
|
-
- **ドキュメント**: `docs/react-admin-integration.md`に多対多関係の詳細セクションを追加
|
|
97
|
-
- **TypeScript設定**: `tsconfig.base.json`にJSXサポートを追加(`"jsx": "react-jsx"`)
|
|
98
|
-
- **Lint設定**: max-warningsを35から41に更新(React-Admin型制約による警告を許容)
|
|
99
|
-
|
|
100
|
-
## [1.3.23] - 2026-01-05
|
|
101
|
-
|
|
102
|
-
### Added
|
|
103
|
-
|
|
104
|
-
- **テストファイル**: `$setOnInsert`オペレータの包括的なテストを追加
|
|
105
|
-
- `__tests__/operations/updateOne-setOnInsert.test.ts` (279行)
|
|
106
|
-
- `__tests__/operations/updateMany-setOnInsert.test.ts` (166行)
|
|
107
|
-
|
|
108
|
-
## [1.3.22] - 2026-01-05
|
|
109
|
-
|
|
110
|
-
### Added
|
|
111
|
-
|
|
112
|
-
- **$setOnInsert オペレータ**: MongoDB互換のupsert専用フィールド設定機能
|
|
113
|
-
- upsert時のinsert専用フィールドを指定可能(`$setOnInsert`)
|
|
114
|
-
- update時は`$setOnInsert`が無視され、`$set`のみが適用される
|
|
115
|
-
- `$set`と`$setOnInsert`で同じフィールドを指定した場合、`$set`が優先
|
|
116
|
-
- タイムスタンプ管理(`createdAt`は初回のみ、`updatedAt`は常に更新)が明確に
|
|
117
|
-
- MongoDB公式ドキュメントと完全互換
|
|
118
|
-
|
|
119
|
-
### Changed
|
|
120
|
-
|
|
121
|
-
- **UpdateOperators型**: `$setOnInsert?: Partial<T>` フィールドを追加
|
|
122
|
-
- **handleUpsertCreate**: `$set`と`$setOnInsert`をマージして新規作成(`$set`が優先)
|
|
123
|
-
- **handleUpsertUpdate**: `$setOnInsert`を無視して`$set`のみを適用
|
|
124
|
-
|
|
125
|
-
### Documentation
|
|
126
|
-
|
|
127
|
-
- **API.md**: `$setOnInsert`オペレータの詳細な説明を追加
|
|
128
|
-
- 動作仕様(insert時/update時の挙動)
|
|
129
|
-
- 使用例とコードスニペット
|
|
130
|
-
- MongoDB互換性の説明
|
|
131
|
-
- ユースケース(タイムスタンプ管理、デフォルト値設定、初期ステータス)
|
|
132
|
-
|
|
133
|
-
### Technical
|
|
134
|
-
|
|
135
|
-
- **テスト**: 包括的なテストカバレッジ(単体テスト・統合テスト)
|
|
136
|
-
- insert時に`$set`と`$setOnInsert`の両方を適用するテスト
|
|
137
|
-
- update時に`$setOnInsert`を無視するテスト
|
|
138
|
-
- `$set`が`$setOnInsert`より優先されるテスト
|
|
139
|
-
- `createdAt`の保持テスト
|
|
140
|
-
- シャドウレコード生成の確認
|
|
141
|
-
- 後方互換性テスト(従来のパッチ形式)
|
|
142
|
-
|
|
143
|
-
## [1.3.21] - 2026-01-04
|
|
144
|
-
|
|
145
|
-
### Changed
|
|
146
|
-
|
|
147
|
-
- **Shadow仕様変更**: オブジェクト型はシャドウを作成しない仕様に変更
|
|
148
|
-
- `inferFieldType`: オブジェクト型に対して`null`を返すように変更
|
|
149
|
-
- `generateShadowRecords`: オブジェクト型を明示的にスキップ
|
|
150
|
-
- `formatFieldValue`: `object`型のケースを削除
|
|
151
|
-
- 理由: オブジェクトは構造が複雑で、シャドウキーとして適切でない
|
|
152
|
-
- 例外: GeoCoordinates型(`{latitude, longitude}`)は地理空間検索用にGeoHashシャドウを生成
|
|
153
|
-
|
|
154
|
-
## [1.3.20] - 2026-01-03
|
|
155
|
-
|
|
156
|
-
### Added
|
|
157
|
-
|
|
158
|
-
- **Geohash検索spec**: dynamodb-clientの汎用機能としてGeohash検索specを追加
|
|
159
|
-
- `.kiro/specs/dynamodb-client/geohash-search/` ディレクトリに移動
|
|
160
|
-
- requirements.md, design.md, tasks.md, verification-plan.mdを含む
|
|
161
|
-
|
|
162
|
-
### Changed
|
|
163
|
-
|
|
164
|
-
- **$nearクエリインターフェース**: 簡易形式のみに変更
|
|
165
|
-
- MongoDB互換のGeoJSON形式(`$geometry`)を削除
|
|
166
|
-
- 簡易形式(`latitude`, `longitude`直接指定)のみを推奨
|
|
167
|
-
- より直感的で使いやすいインターフェースに統一
|
|
168
|
-
|
|
169
|
-
## [1.3.19] - 2026-01-03
|
|
170
|
-
|
|
171
|
-
### Changed
|
|
172
|
-
|
|
173
|
-
- デバッグログを削除(v1.3.17で追加した調査用ログを削除)
|
|
174
|
-
|
|
175
|
-
## [1.3.18] - 2026-01-03
|
|
176
|
-
|
|
177
|
-
### Fixed
|
|
178
|
-
|
|
179
|
-
- **重要**: extractCleanRecord関数でdata属性が存在しない場合の処理を修正
|
|
180
|
-
- シャドーレコードにはdata属性がないため、item自体をフォールバックとして使用
|
|
181
|
-
- これにより$nearクエリでメインレコードが正しく抽出されるようになった
|
|
182
|
-
|
|
183
|
-
## [1.3.17] - 2026-01-03
|
|
184
|
-
|
|
185
|
-
### Fixed
|
|
186
|
-
|
|
187
|
-
- **デバッグ**: $nearクエリでextractCleanRecordの動作を確認するためのデバッグログを追加
|
|
188
|
-
- nearQuery.tsのsearchFunctionでextractCleanRecord前後のレコード構造をログ出力
|
|
189
|
-
- これにより、data属性からのフィールド抽出が正しく行われているかを確認可能に
|
|
190
|
-
|
|
191
|
-
## [1.3.16] - 2026-01-03
|
|
192
|
-
|
|
193
|
-
### Fixed
|
|
194
|
-
|
|
195
|
-
- **重要**: $nearクエリで本体レコードのdata属性からフィールドを正しく抽出するように修正
|
|
196
|
-
- `nearQuery.ts`で`extractCleanRecord()`を使用(`removeShadowKeys()`ではなく)
|
|
197
|
-
- 本体レコードは`{ PK, SK, data: { ...actual fields } }`という構造なので、`data`属性から実際のフィールドを取り出す必要がある
|
|
198
|
-
- これにより、$near検索で正しくレコードデータ(id, name, location等)を取得できるようになった
|
|
199
|
-
|
|
200
|
-
## [1.3.15] - 2026-01-03
|
|
201
|
-
|
|
202
|
-
### Fixed
|
|
203
|
-
|
|
204
|
-
- **重要**: $nearクエリでextractCleanRecordの誤用を修正
|
|
205
|
-
- nearQuery.tsのsearchFunctionでremoveShadowKeysを使用(extractCleanRecordではなく)
|
|
206
|
-
- searchFunctionが返すレコードは既にクリーンな形式(data属性なし)のため、extractCleanRecordを使用すると`undefined`になる問題を解決
|
|
207
|
-
- これにより、$near検索で正しくレコードが返されるようになった
|
|
208
|
-
|
|
209
|
-
## [1.3.14] - 2026-01-03
|
|
210
|
-
|
|
211
|
-
### Improved
|
|
212
|
-
|
|
213
|
-
- **コード品質**: $nearクエリの型定義を改善(`any` → `Record<string, unknown>`)
|
|
214
|
-
- **ドキュメント**: nearQuery.tsのコメントを明確化(SKの構造を正確に説明)
|
|
215
|
-
- **型安全性**: 型アサーションを改善して型安全性を向上
|
|
216
|
-
|
|
217
|
-
## [1.3.13] - 2026-01-03
|
|
218
|
-
|
|
219
|
-
### Fixed
|
|
220
|
-
|
|
221
|
-
- **重要**: $nearクエリでdata.\_\_shadowKeysが除外されない問題を修正
|
|
222
|
-
- nearQuery.tsでextractCleanRecordを使用(mainレコードのdata属性から\_\_shadowKeysを除外)
|
|
223
|
-
|
|
224
|
-
## [1.3.12] - 2026-01-02
|
|
225
|
-
|
|
226
|
-
### Fixed
|
|
227
|
-
|
|
228
|
-
- **重要**: /versionエンドポイントのデフォルトバージョンを1.3.12に更新
|
|
229
|
-
- esbuild設定でPACKAGE_VERSIONをdefineに追加(ビルド時にpackage.jsonのバージョンを埋め込み)
|
|
230
|
-
|
|
231
|
-
## [1.3.11] - 2026-01-02
|
|
232
|
-
|
|
233
|
-
### Fixed
|
|
234
|
-
|
|
235
|
-
- テストコードのモック設定を修正: removeShadowKeysをエクスポートに追加
|
|
236
|
-
|
|
237
|
-
## [1.3.10] - 2026-01-02
|
|
238
|
-
|
|
239
|
-
### Fixed
|
|
240
|
-
|
|
241
|
-
- **重要**: nearQuery.tsでextractCleanRecordの誤用を修正
|
|
242
|
-
- searchFunctionが返すレコードは既にクリーンな形式(data属性なし)
|
|
243
|
-
- extractCleanRecordではなくremoveShadowKeysを使用するように修正
|
|
244
|
-
- これにより、$near検索で0件が返される問題を解決
|
|
245
|
-
|
|
246
|
-
## [1.3.9] - 2026-01-02
|
|
247
|
-
|
|
248
|
-
### Added
|
|
249
|
-
|
|
250
|
-
- 自動テストケースを追加: DynamoDBレコード構造でのlocationフィールド取得テスト
|
|
251
|
-
- 自動テストケースを追加: DynamoDB内部フィールド(PK, SK)が含まれる場合のテスト
|
|
252
|
-
|
|
253
|
-
### Fixed
|
|
254
|
-
|
|
255
|
-
- nearSearch.tsのデバッグログを改善: locationフィールドが見つからない場合の詳細ログ
|
|
256
|
-
- nearSearch.tsのデバッグログを改善: 距離計算結果とフィルタリング判定のログ
|
|
257
|
-
|
|
258
|
-
## [1.3.8] - 2026-01-02
|
|
259
|
-
|
|
260
|
-
### Fixed
|
|
261
|
-
|
|
262
|
-
- $nearクエリのデバッグログを追加(locationフィールドと距離計算の詳細)
|
|
263
|
-
|
|
264
|
-
## [1.3.7] - 2026-01-02
|
|
265
|
-
|
|
266
|
-
### Fixed
|
|
267
|
-
|
|
268
|
-
- **$nearクエリのシャドーレコード検索**: SKプレフィックスパターンを修正
|
|
269
|
-
- 修正前: `${fieldName}#${geohashPrefix}` → 修正後: `${fieldName}#${geohashPrefix}#id#`
|
|
270
|
-
- シャドーレコードのSKパターン `location#<geohash>#id#<venue-id>` に正しく対応
|
|
271
|
-
- これにより、$nearクエリが正常に動作し、距離順にソートされた開催地一覧を取得可能に
|
|
272
|
-
|
|
273
|
-
### Added
|
|
274
|
-
|
|
275
|
-
- **$nearクエリのデバッグログ**: 各ステップでログを出力して問題追跡を容易に
|
|
276
|
-
- シャドーレコード検索時のSKプレフィックスをログ出力
|
|
277
|
-
- 検索結果の件数をログ出力
|
|
278
|
-
- 本体レコード取得時のIDリストをログ出力
|
|
279
|
-
|
|
280
|
-
## [1.3.6] - 2026-01-02
|
|
281
|
-
|
|
282
|
-
### Fixed
|
|
283
|
-
|
|
284
|
-
- **Lambda関数のデフォルトバージョン**: handler.tsのデフォルトバージョンを1.3.6に更新
|
|
285
|
-
- 環境変数`DYNAMODB_CLIENT_VERSION`が設定されていない場合のフォールバック値を修正
|
|
286
|
-
- これにより、Lambda関数のソースコードハッシュが確実に変更される
|
|
287
|
-
|
|
288
|
-
### Changed
|
|
289
|
-
|
|
290
|
-
- **パブリッシュ手順の改善**: コメントだけの変更ではビルド成果物が変わらないため、実際のコード変更が必要
|
|
291
|
-
|
|
292
|
-
## [1.3.5] - 2026-01-02
|
|
293
|
-
|
|
294
|
-
### Changed
|
|
295
|
-
|
|
296
|
-
- **テストリリース**: publish-and-deploy.mdの手順確認のためのテストリリース
|
|
297
|
-
- handler.tsのバージョンコメントを1.3.5に更新
|
|
298
|
-
- **注意**: コメントのみの変更のため、ビルド成果物は変わらず
|
|
299
|
-
|
|
300
|
-
## [1.3.4] - 2026-01-02
|
|
301
|
-
|
|
302
|
-
### Changed
|
|
303
|
-
|
|
304
|
-
- **手順書の改善**: Lambda関数のソースコードハッシュ変更を確実にするため、Phase 1の最初にソースコード変更ステップを追加
|
|
305
|
-
- バージョン番号だけの変更ではTerraformが更新を検知しないため、必ず`src/`配下のファイルに変更を加えることを明記
|
|
306
|
-
- handler.tsにバージョンコメントを追加する例を提示
|
|
307
|
-
|
|
308
|
-
## [1.3.3] - 2026-01-02
|
|
309
|
-
|
|
310
|
-
### Changed
|
|
311
|
-
|
|
312
|
-
- **手順書の追加**: dynamodb-clientパブリッシュとasanowaデプロイの標準手順を確立
|
|
313
|
-
- `.kiro/steering/publish-and-deploy.md`を追加
|
|
314
|
-
- npmパブリッシュからデプロイまでの完全な手順を文書化
|
|
315
|
-
- トラブルシューティングとチェックリストを含む
|
|
316
|
-
|
|
317
|
-
## [1.3.2] - 2026-01-02
|
|
318
|
-
|
|
319
|
-
### Added
|
|
320
|
-
|
|
321
|
-
- **バージョンエンドポイント**: `GET /version`エンドポイントを追加
|
|
322
|
-
- デプロイされたdynamodb-clientのバージョンを確認可能
|
|
323
|
-
- レスポンス形式: `{ "version": "1.3.2", "timestamp": "2026-01-02T..." }`
|
|
324
|
-
- Lambda関数のデバッグとバージョン確認に有用
|
|
325
|
-
|
|
326
|
-
## [1.3.1] - 2026-01-02
|
|
327
|
-
|
|
328
|
-
### Fixed
|
|
329
|
-
|
|
330
|
-
- **$nearオペレータ**: GeoHashシャドウレコード検索の修正
|
|
331
|
-
- フィールド名を直接使用するように変更(`_geohash`サフィックスを削除)
|
|
332
|
-
- シャドウレコードの実際の形式に合わせて修正(例: `location#xn74rnmx#id#...`)
|
|
333
|
-
- これにより$nearオペレータが正しく結果を返すようになりました
|
|
334
|
-
|
|
335
|
-
## [1.3.0] - 2026-01-02
|
|
336
|
-
|
|
337
|
-
### Added
|
|
338
|
-
|
|
339
|
-
- **$nearオペレータ**: MongoDB互換の地理空間検索機能
|
|
340
|
-
- 簡易形式とGeoJSON形式の両方をサポート
|
|
341
|
-
- 9ブロック検索アルゴリズム(中心 + 隣接8方向)
|
|
342
|
-
- 段階的精度緩和(precision 6→5→4)
|
|
343
|
-
- 距離フィルタリング(maxDistance、minDistance)
|
|
344
|
-
- 自動距離計算とソート(`__distance`フィールド)
|
|
345
|
-
- find操作との透過的な統合
|
|
346
|
-
|
|
347
|
-
- **包括的なテストカバレッジ**: 115の新規テスト追加(355→449テスト)
|
|
348
|
-
- nearQuery.ts: 100%カバレッジ(21テスト)
|
|
349
|
-
- filter.ts: 98.37%カバレッジ(54テスト)
|
|
350
|
-
- find/utils.ts: 100%カバレッジ(40テスト)
|
|
351
|
-
|
|
352
|
-
### Changed
|
|
353
|
-
|
|
354
|
-
- **find操作**: $nearオペレータの自動検出と実行
|
|
355
|
-
- **filter.ts**: 複雑なフィルター構文のサポート改善
|
|
356
|
-
|
|
357
|
-
### Technical
|
|
358
|
-
|
|
359
|
-
- **新規ファイル**:
|
|
360
|
-
- `src/server/operations/find/nearQuery.ts` - $near検索の実装
|
|
361
|
-
- `__tests__/near-query.test.ts` - nearQuery単体テスト
|
|
362
|
-
- `__tests__/near-search.test.ts` - 9ブロック検索テスト
|
|
363
|
-
- `__tests__/find-near.test.ts` - find統合テスト
|
|
364
|
-
- `__tests__/filter-comprehensive.test.ts` - filter包括テスト
|
|
365
|
-
- `__tests__/find-utils-comprehensive.test.ts` - find/utils包括テスト
|
|
366
|
-
|
|
367
|
-
## [1.2.6] - 2026-01-02
|
|
368
|
-
|
|
369
|
-
### Added
|
|
370
|
-
|
|
371
|
-
- **$nearオペレータの完全実装**: find操作での地理空間検索を完全サポート
|
|
372
|
-
- `detectNearQuery()`: $nearオペレータの自動検出(簡易形式・GeoJSON形式)
|
|
373
|
-
- `executeNearQuery()`: DynamoDB統合による$near検索の実行
|
|
374
|
-
- `handleFind()`: $near検出時の自動切り替えロジック
|
|
375
|
-
- 距離情報(`__distance`)の自動付与とソート
|
|
376
|
-
- `pagination.perPage`を$near検索のlimitとして使用
|
|
377
|
-
- 包括的なテストカバレッジ(19テスト追加)
|
|
378
|
-
|
|
379
|
-
### Changed
|
|
380
|
-
|
|
381
|
-
- **find操作**: $nearオペレータが含まれる場合、自動的に地理空間検索に切り替え
|
|
382
|
-
- 通常のfind操作との透過的な統合
|
|
383
|
-
- エラーハンドリングとログ記録の統一
|
|
384
|
-
|
|
385
|
-
### Technical
|
|
386
|
-
|
|
387
|
-
- **新規ファイル**: `src/server/operations/find/nearQuery.ts` - DynamoDB統合ロジック
|
|
388
|
-
- **新規ファイル**: `src/server/operations/find/utils.ts` - $near検出ユーティリティ
|
|
389
|
-
- **テスト**: `__tests__/near-search.test.ts` - executeNearSearchのユニットテスト(13テスト)
|
|
390
|
-
- **テスト**: `__tests__/find-near.test.ts` - find操作での$near統合テスト(6テスト)
|
|
391
|
-
- **全テスト**: 334テスト全てパス
|
|
392
|
-
|
|
393
|
-
## [1.2.5] - 2026-01-02
|
|
394
|
-
|
|
395
|
-
### Fixed
|
|
396
|
-
|
|
397
|
-
- **npmパブリッシュ再実行**: v1.2.4のパブリッシュ失敗により再パブリッシュ
|
|
398
|
-
- ビルド成果物(`dist/server/query/nearSearch.js`)が正しく含まれることを確認
|
|
399
|
-
- `$near`オペレータが正常に動作することを確認
|
|
400
|
-
|
|
401
|
-
## [1.2.3] - 2026-01-02
|
|
402
|
-
|
|
403
|
-
### Fixed
|
|
404
|
-
|
|
405
|
-
- **ビルド成果物の確実な更新**: v1.2.2で$nearオペレータのコードが含まれていなかった問題を修正
|
|
406
|
-
- ビルド後に確実にnpmパブリッシュを実行
|
|
407
|
-
- `dist/server/handler.cjs`に最新のコードが含まれることを確認
|
|
408
|
-
|
|
409
|
-
## [1.2.2] - 2026-01-02
|
|
410
|
-
|
|
411
|
-
### Fixed
|
|
412
|
-
|
|
413
|
-
- **Terraform設定のリバート**: `source_dir`から`source_file`に戻す
|
|
414
|
-
- dynamodb-clientはTerraformコードを内包して提供するライブラリ
|
|
415
|
-
- `source_file`で`handler.cjs`のみを監視するのが正しい設計
|
|
416
|
-
- asanowaプロジェクト側の変更(node_modules等)は、asanowa側のTerraformで検知すべき
|
|
417
|
-
- v1.2.1の変更(コミットd535ba3f9019fd9c178998988300c358b4634222)をリバート
|
|
418
|
-
|
|
419
|
-
## [1.2.0] - 2026-01-02
|
|
420
|
-
|
|
421
|
-
### Added
|
|
422
|
-
|
|
423
|
-
- **GeoHash地理空間検索**: MongoDB互換の`$near`オペレータを実装
|
|
424
|
-
- 自動GeoHash変換: `{latitude, longitude}`オブジェクトを自動検出してシャドウインデックス生成
|
|
425
|
-
- 9ブロック検索: 中心 + 隣接8方向の合計9ブロックを検索して境界をまたぐ検索漏れを防止
|
|
426
|
-
- 段階的精度緩和: precision 6→5→4と段階的に検索範囲を拡大
|
|
427
|
-
- 距離計算・ソート: Haversine公式による正確な距離計算と自動ソート
|
|
428
|
-
- `__distance`フィールド: 検索地点からの距離(メートル)を自動付与
|
|
429
|
-
- `__geohash`フィールド: 検出されたGeoHashを自動付与
|
|
430
|
-
- フィールド名非依存: `location`固定ではなく、任意のフィールド名を自動検出
|
|
431
|
-
- 透過的実装: クライアントはGeoHashを意識せず、通常のオブジェクトとして扱える
|
|
432
|
-
- 設定可能なパラメータ: `GeoHashConfig`で精度や反復回数をカスタマイズ可能
|
|
433
|
-
|
|
434
|
-
- **新しいユーティリティ関数**:
|
|
435
|
-
- `isGeoCoordinates()`: 地理座標オブジェクトの自動検出
|
|
436
|
-
- `encodeGeoHash()`: 緯度・経度からGeoHashを生成
|
|
437
|
-
- `decodeGeoHash()`: GeoHashから緯度・経度を復元
|
|
438
|
-
- `getNeighborGeoHashes()`: 隣接8方向のGeoHashを取得
|
|
439
|
-
- `calculateDistance()`: Haversine公式による2点間の距離計算
|
|
440
|
-
- `extractCoordinatesFromNearQuery()`: $nearクエリから座標を抽出
|
|
441
|
-
- `extractMaxDistanceFromNearQuery()`: $nearクエリから最大距離を抽出
|
|
442
|
-
- `extractMinDistanceFromNearQuery()`: $nearクエリから最小距離を抽出
|
|
443
|
-
|
|
444
|
-
- **新しい型定義**:
|
|
445
|
-
- `GeoCoordinates`: 地理座標オブジェクト型
|
|
446
|
-
- `NearQuery`: MongoDB互換の$nearクエリ型(GeoJSON形式と簡易形式をサポート)
|
|
447
|
-
- `DocumentWithDistance`: 距離情報付きドキュメント型
|
|
448
|
-
- `GeoHashConfig`: GeoHash検索の設定型
|
|
449
|
-
- `DEFAULT_GEOHASH_CONFIG`: デフォルト設定定数
|
|
450
|
-
|
|
451
|
-
### Changed
|
|
452
|
-
|
|
453
|
-
- **シャドウレコード生成**: `generator.ts`を更新して地理座標の自動検出とGeoHashシャドウレコード生成を追加
|
|
454
|
-
- シャドウインデックスは8文字精度(±19m)で保存
|
|
455
|
-
- 検索は6文字精度(±610m)で開始し、段階的に緩和
|
|
456
|
-
- 既存のシャドウ化機能(文字列フィールド等)と共存
|
|
457
|
-
|
|
458
|
-
### Dependencies
|
|
459
|
-
|
|
460
|
-
- **追加**: `ngeohash@^0.6.3` - GeoHashエンコード・デコードライブラリ
|
|
461
|
-
- **追加**: `@types/ngeohash@^0.6.8` - ngeohashの型定義
|
|
462
|
-
|
|
463
|
-
### Notes
|
|
464
|
-
|
|
465
|
-
- この機能は後方互換性があります。既存のコードは変更なしで動作します。
|
|
466
|
-
- GeoHash検索を使用するには、`{latitude, longitude}`オブジェクトを持つフィールドを作成するだけです。
|
|
467
|
-
- 詳細な使用方法は [GeoHash Search Guide](./docs/geohash-search.md) を参照してください。
|
|
468
|
-
|
|
469
|
-
## [1.1.2] - 2025-01-02
|
|
470
|
-
|
|
471
|
-
### Fixed
|
|
472
|
-
|
|
473
|
-
- **Parameter Store**: outputs.tfのパラメータ参照を修正
|
|
474
|
-
- 古いパラメータ名(`app_records_api_url`, `lambda_records_function_arn`)から新しい名前(`infra_dynamodb_client_api_url`, `infra_dynamodb_client_api_arn`)に更新
|
|
475
|
-
- v1.1.0で変更したパラメータ名に合わせてoutputsを修正
|
|
476
|
-
|
|
477
|
-
## [1.1.1] - 2025-01-02
|
|
478
|
-
|
|
479
|
-
### Fixed
|
|
480
|
-
|
|
481
|
-
- **Parameter Store**: DynamoDB Table ARNパラメータの作成を修正
|
|
482
|
-
- `dynamodb_table_arn`をParameter Storeモジュールに渡すように修正
|
|
483
|
-
- `/infra/dynamodb-table-arn`パラメータが正しく作成されるようになった
|
|
484
|
-
|
|
485
|
-
## [1.1.0] - 2025-01-02
|
|
486
|
-
|
|
487
|
-
### Changed
|
|
488
|
-
|
|
489
|
-
- **Parameter Store命名規則の統一**: すべてのパラメータを `/infra/` カテゴリに統一
|
|
490
|
-
- `/infra/dynamodb-client-api-url` - DynamoDB Client API URL(旧: `/app/records-api-url`)
|
|
491
|
-
- `/infra/dynamodb-client-api-arn` - Lambda ARN(旧: `/lambda/records-function-arn`)
|
|
492
|
-
- `/infra/dynamodb-table-name` - DynamoDB Table Name
|
|
493
|
-
- `/infra/dynamodb-table-arn` - DynamoDB Table ARN(新規追加)
|
|
494
|
-
- dynamodb-clientは**インフラ基盤**を提供するライブラリとして、すべて「インフラ情報」カテゴリに統一
|
|
495
|
-
|
|
496
|
-
### Breaking Changes
|
|
497
|
-
|
|
498
|
-
- Parameter Storeのパラメータ名が変更されました
|
|
499
|
-
- 既存プロジェクトは新しいパラメータ名に移行する必要があります
|
|
500
|
-
- 詳細は [Parameter Store Migration Guide](./docs/parameter-store-migration.md) を参照
|
|
501
|
-
|
|
502
|
-
## [1.0.3] - 2025-12-31
|
|
503
|
-
|
|
504
|
-
### Fixed
|
|
505
|
-
|
|
506
|
-
- **型安全性の向上**: `ParsedFilterField`の型定義を修正
|
|
507
|
-
- `find/types.ts`の重複した型定義を削除し、`filter.ts`からインポート
|
|
508
|
-
- `operator`フィールドを`string`型から`FilterOperator`型に変更
|
|
509
|
-
- TypeScriptコンパイラが`$`プレフィックスなしの演算子を検出できるように修正
|
|
510
|
-
|
|
511
|
-
- **ID最適化クエリ**: `$eq`演算子の比較を修正
|
|
512
|
-
- `idQuery.ts`で演算子比較が`'eq'`(`$`なし)になっていた問題を修正
|
|
513
|
-
- `getOne`操作で単一レコードが正しく取得できるように修正
|
|
514
|
-
- react-admin詳細画面が正常に動作するように修正
|
|
515
|
-
|
|
516
|
-
- **シャドウクエリ**: `$`プレフィックス付き演算子に統一
|
|
517
|
-
- `shadowQuery.ts`のswitch文で`'eq'`, `'gt'`, `'gte'`, `'lt'`, `'lte'`を`'$eq'`, `'$gt'`, `'$gte'`, `'$lt'`, `'$lte'`に修正
|
|
518
|
-
- すべてのクエリ最適化で一貫して`$`プレフィックス付き演算子を使用
|
|
519
|
-
|
|
520
|
-
## [1.0.2] - 2025-12-31
|
|
521
|
-
|
|
522
|
-
### Changed
|
|
523
|
-
|
|
524
|
-
- **BREAKING**: フィルター演算子を `$` プレフィックス必須に統一
|
|
525
|
-
- `FilterOperator` 型を `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$nin`, `$starts`, `$ends`, `$contains`, `$exists` に変更
|
|
526
|
-
- すべてのサーバー側フィルター処理で `$` プレフィックスを標準とする
|
|
527
|
-
- `$` なしの演算子はエラーとして扱う(明確なエラーメッセージ)
|
|
528
|
-
- MongoDB互換性を完全に保証
|
|
529
|
-
|
|
530
|
-
### Fixed
|
|
531
|
-
|
|
532
|
-
- **サーバーサイドフィルター処理**: `$` プレフィックス付き演算子を正しく処理
|
|
533
|
-
- `find` 操作で `{ id: { $in: [...] } }` 形式のフィルターが正常に動作
|
|
534
|
-
- react-admin統合からのフィルターが正常に動作
|
|
535
|
-
- 一貫性のある演算子処理(モンキーパッチなし)
|
|
536
|
-
|
|
537
|
-
## [1.0.1] - 2025-12-31
|
|
538
|
-
|
|
539
|
-
### Fixed
|
|
540
|
-
|
|
541
|
-
- **react-admin統合**: `convertFilter`関数が演算子に`$`プレフィックスを追加するように修正
|
|
542
|
-
- react-adminから送信される`{id: {in: [...]}}`を`{id: {$in: [...]}}`に自動変換
|
|
543
|
-
- `update`、`delete`、`getList`、`getManyReference`操作で正しくフィルタが適用されるように修正
|
|
544
|
-
- dynamodb-client 1.0.0のMongoDB互換性向上に対応
|
|
545
|
-
|
|
546
|
-
## [1.0.0] - 2025-01-01
|
|
547
|
-
|
|
548
|
-
### BREAKING CHANGES
|
|
549
|
-
|
|
550
|
-
- **MongoDB互換性向上**: すべての操作オペレータに `$` プレフィックスを追加
|
|
551
|
-
- **フィルタ演算子**: `eq` → `$eq`, `gt` → `$gt`, `gte` → `$gte`, `lt` → `$lt`, `lte` → `$lte`, `in` → `$in`, `nin` → `$nin`, `exists` → `$exists`, `regex` → `$regex`, `ne` → `$ne`
|
|
552
|
-
- **更新演算子**: `set` → `$set`, `unset` → `$unset`, `inc` → `$inc`
|
|
553
|
-
- **論理演算子**: `and` → `$and`, `or` → `$or`
|
|
554
|
-
- MongoDBの公式ドキュメントと完全に一致する構文を採用
|
|
555
|
-
- TypeScriptコンパイラが自動的にエラーを検出するため、移行は比較的容易
|
|
556
|
-
|
|
557
|
-
### Migration Guide
|
|
558
|
-
|
|
559
|
-
v0.xからv1.0.0へのアップグレードには、既存コードの更新が必要です。詳細なマイグレーションガイドは [docs/MIGRATION_v1.md](./docs/MIGRATION_v1.md) を参照してください。
|
|
560
|
-
|
|
561
|
-
**主な変更点**:
|
|
562
|
-
|
|
563
|
-
```typescript
|
|
564
|
-
// v0.x(旧)
|
|
565
|
-
collection.find({ age: { gte: 18 } });
|
|
566
|
-
collection.updateOne({ id: '123' }, { set: { name: 'John' } });
|
|
567
|
-
|
|
568
|
-
// v1.0.0(新)
|
|
569
|
-
collection.find({ age: { $gte: 18 } });
|
|
570
|
-
collection.updateOne({ id: '123' }, { $set: { name: 'John' } });
|
|
571
|
-
```
|
|
572
|
-
|
|
573
|
-
**自動マイグレーション**:
|
|
574
|
-
|
|
575
|
-
```bash
|
|
576
|
-
# 一括置換(推奨)
|
|
577
|
-
find src -name "*.ts" -type f -exec sed -i '' \
|
|
578
|
-
-e 's/{ eq:/{ $eq:/g' \
|
|
579
|
-
-e 's/{ gt:/{ $gt:/g' \
|
|
580
|
-
-e 's/{ gte:/{ $gte:/g' \
|
|
581
|
-
-e 's/{ lt:/{ $lt:/g' \
|
|
582
|
-
-e 's/{ lte:/{ $lte:/g' \
|
|
583
|
-
-e 's/{ in:/{ $in:/g' \
|
|
584
|
-
-e 's/{ nin:/{ $nin:/g' \
|
|
585
|
-
-e 's/{ exists:/{ $exists:/g' \
|
|
586
|
-
-e 's/{ regex:/{ $regex:/g' \
|
|
587
|
-
-e 's/{ ne:/{ $ne:/g' \
|
|
588
|
-
-e 's/{ set:/{ $set:/g' \
|
|
589
|
-
-e 's/{ unset:/{ $unset:/g' \
|
|
590
|
-
-e 's/{ inc:/{ $inc:/g' \
|
|
591
|
-
-e 's/{ and:/{ $and:/g' \
|
|
592
|
-
-e 's/{ or:/{ $or:/g' \
|
|
593
|
-
{} +
|
|
594
|
-
```
|
|
595
|
-
|
|
596
|
-
### Benefits
|
|
597
|
-
|
|
598
|
-
- **MongoDB互換性**: MongoDBの公式ドキュメントと完全に一致
|
|
599
|
-
- **学習コスト削減**: MongoDB経験者が即座に使用可能
|
|
600
|
-
- **エコシステム統合**: MongoDB関連ツールとの統合が容易
|
|
601
|
-
- **明確な意図**: `$` プレフィックスにより演算子であることが明確
|
|
602
|
-
- **将来の拡張性**: MongoDB互換の新しい演算子を追加しやすい
|
|
603
|
-
|
|
604
|
-
### Changed
|
|
605
|
-
|
|
606
|
-
- **型定義**: `FilterOperators`, `UpdateOperators`, `Filter` 型を更新
|
|
607
|
-
- **サーバー側**: クエリ変換と更新演算子処理を更新
|
|
608
|
-
- **クライアント側**: `Collection` と `FindCursor` の実装を更新
|
|
609
|
-
- **react-admin統合**: データプロバイダーを更新
|
|
610
|
-
- **テスト**: すべてのテストケース(314件)を更新し、全テストが通過
|
|
611
|
-
|
|
612
|
-
### Documentation
|
|
613
|
-
|
|
614
|
-
- **マイグレーションガイド**: 詳細な移行手順を `docs/MIGRATION_v1.md` に追加
|
|
615
|
-
- **APIリファレンス**: `docs/API.md` のオペレータ一覧を更新
|
|
616
|
-
- **使用例**: すべてのコード例を新しい構文に更新
|
|
617
|
-
|
|
618
|
-
## [0.9.3] - 2024-12-31
|
|
619
|
-
|
|
620
|
-
### Fixed
|
|
621
|
-
|
|
622
|
-
- **Lambda Handler**: Improved CORS and error handling
|
|
623
|
-
- Simplified CORS preflight handling with dedicated `createCorsResponse` function
|
|
624
|
-
- Improved error response structure with consistent CORS headers
|
|
625
|
-
- Enhanced error logging with request context
|
|
626
|
-
- Better separation of concerns between response builders and error handlers
|
|
627
|
-
|
|
628
|
-
## [0.9.2] - 2024-12-31
|
|
629
|
-
|
|
630
|
-
### Fixed
|
|
631
|
-
|
|
632
|
-
- **Parameter Converter**: Improved code formatting and maintainability
|
|
633
|
-
- Refactored multi-line ternary operators to single-line format for better readability
|
|
634
|
-
- Enhanced `convertUpdateOneParams` and `convertUpdateManyParams` to properly pass through `options` parameter
|
|
635
|
-
- Ensures upsert options are correctly propagated from MongoDB-style API to internal operations
|
|
636
|
-
- No functional changes - purely code quality improvements
|
|
637
|
-
|
|
638
|
-
## [0.9.1] - 2024-12-30
|
|
639
|
-
|
|
640
|
-
### Fixed
|
|
641
|
-
|
|
642
|
-
- **Filter Operator Support**: Added support for `in`, `nin`, `contains`, and `exists` operators
|
|
643
|
-
- Updated `FilterOperator` type to include all supported operators
|
|
644
|
-
- Enhanced `parseFilters` function to support nested object filter syntax: `{ id: { in: [...] } }`
|
|
645
|
-
- Added `contains` and `exists` operator handling in `matchesAllFilters` function
|
|
646
|
-
- Fixed react-admin integration: `getMany` operation now works correctly with `in` operator
|
|
647
|
-
- Backward compatible: Both filter syntaxes are supported (`"id:in"` and `{ id: { in: [...] } }`)
|
|
648
|
-
|
|
649
|
-
## [0.9.0] - 2024-12-29
|
|
650
|
-
|
|
651
|
-
### Added
|
|
652
|
-
|
|
653
|
-
- **Upsert Option for updateOne/updateMany**: MongoDB-compatible upsert functionality
|
|
654
|
-
- Added `UpdateOneOptions` and `UpdateManyOptions` types with `upsert` boolean option
|
|
655
|
-
- Added `upsertedId` field to `UpdateResult` type (set when a new document is created via upsert)
|
|
656
|
-
- Server-side implementation: `handleUpsertCreate` and `handleUpsertUpdate` functions
|
|
657
|
-
- Client-side implementation: Third parameter (options) for `updateOne` and `updateMany` methods
|
|
658
|
-
- Automatic timestamp management: `createdAt` and `updatedAt` are automatically set on upsert
|
|
659
|
-
- Automatic shadow record generation: Shadow records are created/updated during upsert operations
|
|
660
|
-
- Comprehensive test coverage: Unit tests and integration tests for upsert functionality
|
|
661
|
-
- Complete documentation: API reference, usage examples, and migration guide in `docs/API.md`
|
|
662
|
-
|
|
663
|
-
### Changed
|
|
664
|
-
|
|
665
|
-
- **API Enhancement**: `updateOne` and `updateMany` methods now accept an optional third parameter for options
|
|
666
|
-
- Backward compatible: Existing code continues to work without changes
|
|
667
|
-
- Default behavior unchanged: `upsert` defaults to `false`
|
|
668
|
-
|
|
669
|
-
### Documentation
|
|
670
|
-
|
|
671
|
-
- **API Reference**: Updated `docs/API.md` with detailed upsert option documentation
|
|
672
|
-
- Added UpdateOneOptions and UpdateManyOptions type definitions
|
|
673
|
-
- Added UpdateResult.upsertedId field explanation
|
|
674
|
-
- Added practical usage examples for upsert operations
|
|
675
|
-
- Added migration guide from v0.3.x to v0.4.x
|
|
676
|
-
- Added FAQ section for common upsert questions
|
|
677
|
-
|
|
678
|
-
## [0.8.1] - 2025-12-28
|
|
679
|
-
|
|
680
|
-
### Fixed
|
|
681
|
-
|
|
682
|
-
- **Terraform Outputs**: Removed deleted Cognito parameters from parameter-store module outputs
|
|
683
|
-
- Removed `cognito_user_pool_id`, `cognito_client_id`, `cognito_domain` from outputs.tf
|
|
684
|
-
- These parameters were removed in v0.8.0 but outputs.tf was not updated
|
|
685
|
-
- Fixes Terraform validation errors in consuming projects
|
|
686
|
-
|
|
687
|
-
## [0.8.0] - 2025-12-28
|
|
688
|
-
|
|
689
|
-
### BREAKING CHANGES
|
|
690
|
-
|
|
691
|
-
- **Removed asanowa-specific parameters for library generalization**
|
|
692
|
-
- Removed `cognito_client_id` parameter (aud verification not needed for generic library)
|
|
693
|
-
- Removed `cognito_admin_ui_client_id` parameter (asanowa-specific, moved to project-specific configuration)
|
|
694
|
-
- Removed `cognito_user_pool_domain` parameter (OAuth flow specific, not needed for JWT verification)
|
|
695
|
-
- Removed `COGNITO_CLIENT_ID` environment variable from Records Lambda
|
|
696
|
-
- Removed `COGNITO_REGION` environment variable (redundant, extracted from user pool ID)
|
|
697
|
-
- Removed Admin UI Cognito parameters from Parameter Store module (asanowa-specific)
|
|
698
|
-
|
|
699
|
-
### Migration Guide
|
|
700
|
-
|
|
701
|
-
If your project was using the removed parameters:
|
|
702
|
-
|
|
703
|
-
1. **cognito_client_id**: Remove from module call. JWT verification now works without aud validation for better generalization.
|
|
704
|
-
2. **cognito_admin_ui_client_id** and **cognito_user_pool_domain**: Move these to your project-specific Parameter Store configuration.
|
|
705
|
-
3. **COGNITO_REGION**: No longer needed. Region is automatically extracted from `cognito_user_pool_id`.
|
|
706
|
-
|
|
707
|
-
### What remains
|
|
708
|
-
|
|
709
|
-
- `cognito_user_pool_id`: Still required for JWT signature verification (JWKS endpoint construction)
|
|
710
|
-
|
|
711
|
-
## [0.7.5] - 2025-12-28
|
|
712
|
-
|
|
713
|
-
### Removed
|
|
714
|
-
|
|
715
|
-
- **All KMS Settings Verification**: Removed all KMS-related settings to verify if they were actually necessary
|
|
716
|
-
- Removed `aws_iam_role_policy.records_kms_default` IAM policy resource (Lambda execution environment)
|
|
717
|
-
- Removed `aws_iam_role_policy.records_kms` IAM policy resource (Parameter Store access)
|
|
718
|
-
- Removed `kms_key_arn = ""` setting from Lambda function
|
|
719
|
-
- Current Lambda function uses only environment variables, not Parameter Store SecureString
|
|
720
|
-
- This is part of ADR-005 verification to determine the true cause of Lambda Function URL issues
|
|
721
|
-
|
|
722
|
-
## [0.7.4] - 2025-12-28
|
|
723
|
-
|
|
724
|
-
### Fixed
|
|
725
|
-
|
|
726
|
-
- **Lambda KMS Encryption**: Disabled KMS encryption for Lambda function to resolve persistent KMSAccessDeniedException (ADR-004)
|
|
727
|
-
- **Lambda Startup**: Fixed Lambda function startup failure by explicitly setting `kms_key_arn = ""`
|
|
728
|
-
- **502 Bad Gateway**: Resolved Function URL errors caused by Lambda execution environment KMS issues
|
|
729
|
-
|
|
730
|
-
### Changed
|
|
731
|
-
|
|
732
|
-
- **Security Model**: Moved from KMS-encrypted Lambda environment to unencrypted for compatibility
|
|
733
|
-
- **ADR-003 Deprecated**: Replaced complex KMS permission approach with simpler encryption disable approach
|
|
734
|
-
|
|
735
|
-
### Technical
|
|
736
|
-
|
|
737
|
-
- **Terraform**: Added `kms_key_arn = ""` to Lambda function configuration
|
|
738
|
-
- **Architecture Decision**: Created ADR-004 to document KMS encryption disable decision
|
|
739
|
-
|
|
740
|
-
## [0.7.3] - 2025-12-28
|
|
741
|
-
|
|
742
|
-
### Fixed
|
|
743
|
-
|
|
744
|
-
- **Lambda KMS Access**: Added AWS default KMS key access permissions for Lambda execution environment (ADR-003)
|
|
745
|
-
- **KMSAccessDeniedException**: Resolved Lambda startup failure due to missing KMS permissions
|
|
746
|
-
- **Lambda Runtime**: Added conditional access to default KMS key used by Lambda service for function protection
|
|
747
|
-
|
|
748
|
-
### Security
|
|
749
|
-
|
|
750
|
-
- **KMS Permissions**: Limited KMS access to Lambda service only with conditional access control
|
|
751
|
-
- **Least Privilege**: Maintained security with service-specific KMS access restrictions
|
|
752
|
-
|
|
753
|
-
## [0.7.2] - 2024-12-28
|
|
754
|
-
|
|
755
|
-
### Fixed
|
|
756
|
-
|
|
757
|
-
- **Parameter Store**: Added overwrite=true to all SSM parameters to handle existing parameters
|
|
758
|
-
- Prevents ParameterAlreadyExists errors during Terraform apply
|
|
759
|
-
- Allows updating existing Parameter Store values without manual deletion
|
|
760
|
-
|
|
761
|
-
## [0.7.1] - 2024-12-28
|
|
762
|
-
|
|
763
|
-
### Fixed
|
|
764
|
-
|
|
765
|
-
- **CORS**: Removed OPTIONS method from allowMethods to comply with AWS Lambda Function URL constraints
|
|
766
|
-
- AWS Lambda Function URL has a 6-character limit per method name
|
|
767
|
-
- OPTIONS (7 characters) exceeded this limit causing ValidationException
|
|
768
|
-
- Preflight OPTIONS requests are handled automatically by Lambda Function URL
|
|
769
|
-
|
|
770
|
-
## [0.7.0] - 2024-12-28
|
|
771
|
-
|
|
772
|
-
### Added
|
|
773
|
-
|
|
774
|
-
- **Terraform**: KMS access policy for Parameter Store integration
|
|
775
|
-
- Lambda functions can now decrypt SecureString environment variables
|
|
776
|
-
- Added `kms:Decrypt` permission with SSM service condition
|
|
777
|
-
- Enables secure configuration management through Parameter Store
|
|
778
|
-
|
|
779
|
-
### Changed
|
|
780
|
-
|
|
781
|
-
- **CORS**: Expanded CORS configuration for comprehensive API support
|
|
782
|
-
- Added support for GET, PUT, DELETE, and OPTIONS methods
|
|
783
|
-
- Previously only supported POST method
|
|
784
|
-
- Enables full REST API functionality for react-admin integration
|
|
785
|
-
|
|
786
|
-
### Improved
|
|
787
|
-
|
|
788
|
-
- **Infrastructure**: Enhanced Lambda function permissions and dependencies
|
|
789
|
-
- Added proper dependency management for KMS policy
|
|
790
|
-
- Improved security with least-privilege access patterns
|
|
791
|
-
|
|
792
|
-
## [0.5.0] - 2024-12-23
|
|
793
|
-
|
|
794
|
-
### Added
|
|
795
|
-
|
|
796
|
-
- 包括的なAPIリファレンスドキュメント (`docs/API.md`)
|
|
797
|
-
- 3つの認証方式(IAM、Cognito、Token)の詳細な説明
|
|
798
|
-
- すべてのクライアントAPIメソッドの完全な仕様
|
|
799
|
-
- 型定義(Filter、UpdateOperators、結果型)の詳細
|
|
800
|
-
- react-admin統合の使用方法
|
|
801
|
-
- エラーハンドリングとベストプラクティス
|
|
802
|
-
- コントリビューションガイド (`CONTRIBUTING.md`)
|
|
803
|
-
- 開発環境のセットアップから本番リリースまでの完全なワークフロー
|
|
804
|
-
- TypeScript、命名規則、JSDocコメントのコーディング規約
|
|
805
|
-
- AAA パターンに基づくテストガイドライン
|
|
806
|
-
- Conventional Commitsに基づくコミットメッセージ規約
|
|
807
|
-
- セキュリティポリシー (`SECURITY.md`)
|
|
808
|
-
- GitHub Security Advisoriesを使用した脆弱性報告手順
|
|
809
|
-
- 責任ある開示プロセスと協調的開示タイムライン
|
|
810
|
-
- 開発者・利用者向けのセキュリティベストプラクティス
|
|
811
|
-
|
|
812
|
-
### Changed
|
|
813
|
-
|
|
814
|
-
- アーキテクチャリファクタリングによるコード構造の改善
|
|
815
|
-
- 共通モジュールの抽出 (`src/shared/` ディレクトリ構造)
|
|
816
|
-
- 大きな関数の分割(handler.ts ~520行 → 複数モジュール)
|
|
817
|
-
- コードの重複排除と共通定数の統一
|
|
818
|
-
- エラーハンドリングとログ記録の標準化
|
|
819
|
-
- 依存関係管理と循環依存の解決
|
|
820
|
-
|
|
821
|
-
### Improved
|
|
822
|
-
|
|
823
|
-
- コードの可読性と保守性の向上
|
|
824
|
-
- 単一責任原則に基づく関数分割(50行制限)
|
|
825
|
-
- 3回以上繰り返されるコードの共通関数化
|
|
826
|
-
- エラーコード列挙型の拡張
|
|
827
|
-
|
|
828
|
-
## [0.4.1] - 2024-12-23
|
|
829
|
-
|
|
830
|
-
### Fixed
|
|
831
|
-
|
|
832
|
-
- **Package**: Removed obsolete `bin` field for `generate-shadow-config`
|
|
833
|
-
- CLI tool was removed in v0.3.2 but bin field was not removed from package.json
|
|
834
|
-
- Eliminates pnpm warning about missing generate-shadow-config.js file
|
|
835
|
-
- No functional changes - purely cleanup
|
|
836
|
-
|
|
837
|
-
## [0.4.0] - 2024-12-23
|
|
838
|
-
|
|
839
|
-
### Changed
|
|
840
|
-
|
|
841
|
-
- **Architecture**: Major architecture refactoring for improved maintainability
|
|
842
|
-
- Extracted shared modules to `src/shared/` directory structure
|
|
843
|
-
- Organized dependencies and eliminated circular dependencies
|
|
844
|
-
- Split large functions into modular components following single responsibility principle
|
|
845
|
-
- Improved code organization with clear 5-layer architecture: integrations → client → server → shadows → shared
|
|
846
|
-
|
|
847
|
-
### Improved
|
|
848
|
-
|
|
849
|
-
- **Code Quality**: Enhanced maintainability and readability
|
|
850
|
-
- Split `handleFind` function (429 lines) into focused, testable modules
|
|
851
|
-
- Created unified error hierarchy and common utilities
|
|
852
|
-
- Standardized import paths and reduced code duplication
|
|
853
|
-
- Added architecture documentation and dependency validation tests
|
|
854
|
-
|
|
855
|
-
### Technical
|
|
856
|
-
|
|
857
|
-
- **Dependencies**: Established clear dependency direction without circular references
|
|
858
|
-
- **Testing**: All 266 tests continue to pass with improved architecture
|
|
859
|
-
- **Documentation**: Added comprehensive architecture documentation
|
|
860
|
-
- **Package**: Removed obsolete `bin` field for `generate-shadow-config` CLI tool
|
|
861
|
-
|
|
862
|
-
## [0.3.7] - 2024-12-19
|
|
863
|
-
|
|
864
|
-
### Removed
|
|
865
|
-
|
|
866
|
-
- **BREAKING CHANGE**: Complete removal of legacy shadow configuration support
|
|
867
|
-
- Removed `LegacyShadowConfig` and `ResourceShadowConfig` types from shadows module
|
|
868
|
-
- Removed duplicate shadow configuration types from server module
|
|
869
|
-
- Removed all shadow.config.json file support
|
|
870
|
-
- Only v0.3.x environment variable-based configuration is now supported
|
|
871
|
-
|
|
872
|
-
### Changed
|
|
873
|
-
|
|
874
|
-
- Simplified type exports to only include v0.3.x specification types
|
|
875
|
-
- Updated documentation to reflect complete v0.3.x migration
|
|
876
|
-
- Consolidated shadow configuration to single source (environment variables)
|
|
877
|
-
|
|
878
|
-
### Migration Guide
|
|
879
|
-
|
|
880
|
-
- Replace any usage of `ResourceShadowConfig` or `LegacyShadowConfig` with environment variables
|
|
881
|
-
- Use `SHADOW_CREATED_AT_FIELD`, `SHADOW_UPDATED_AT_FIELD`, `SHADOW_STRING_MAX_BYTES`, `SHADOW_NUMBER_PADDING`
|
|
882
|
-
- Remove any shadow.config.json files from your project
|
|
883
|
-
|
|
884
|
-
## [0.3.6] - 2024-12-02
|
|
885
|
-
|
|
886
|
-
### Changed
|
|
887
|
-
|
|
888
|
-
- **Shadow Records**: Exclude `id` field from shadow record generation
|
|
889
|
-
- `id` field no longer generates a shadow record
|
|
890
|
-
- Main record (`SK = id#{ULID}`) is used for id-based sorting
|
|
891
|
-
- Reduces redundant shadow records and improves performance
|
|
892
|
-
- `find()` operation already optimized to use main records for id sorting
|
|
893
|
-
|
|
894
|
-
## [0.3.5] - 2024-12-02
|
|
895
|
-
|
|
896
|
-
### Changed
|
|
897
|
-
|
|
898
|
-
- **Shadow Records**: Removed `data` field from shadow records
|
|
899
|
-
- Shadow records now only contain `PK` and `SK` fields
|
|
900
|
-
- Record ID is extracted from `SK` (format: `{field}#{value}#id#{recordId}`)
|
|
901
|
-
- Reduces storage cost and simplifies data structure
|
|
902
|
-
- No functional changes - ID extraction logic remains the same
|
|
903
|
-
|
|
904
|
-
## [0.3.4] - 2024-12-02
|
|
905
|
-
|
|
906
|
-
### Removed
|
|
907
|
-
|
|
908
|
-
- **Metadata**: Removed internal metadata fields from records
|
|
909
|
-
- Removed `__shadowKeys` field (no longer needed with auto-shadow)
|
|
910
|
-
- Removed `__configVersion` field (no config file to track)
|
|
911
|
-
- Removed `__configHash` field (no config file to track)
|
|
912
|
-
- Records are now cleaner and contain only user data
|
|
913
|
-
- **Terraform**: Removed `shadow_config` output from Terraform module
|
|
914
|
-
- No longer needed with environment variable-based configuration
|
|
915
|
-
|
|
916
|
-
## [0.3.3] - 2024-12-02
|
|
917
|
-
|
|
918
|
-
### Fixed
|
|
919
|
-
|
|
920
|
-
- **Types**: Made `shadows` property optional in `ResourceSchema` interface
|
|
921
|
-
- Allows schemas without `shadows.sortableFields` definition
|
|
922
|
-
- Maintains backward compatibility with v0.2.x schemas
|
|
923
|
-
- All fields are automatically shadowed in v0.3.x
|
|
924
|
-
|
|
925
|
-
## [0.3.2] - 2024-12-02
|
|
926
|
-
|
|
927
|
-
### Changed
|
|
928
|
-
|
|
929
|
-
- **Shadow Configuration**: Simplified shadow configuration (auto-shadow simplification)
|
|
930
|
-
- Removed `shadow.config.json` file requirement
|
|
931
|
-
- Removed `generate-shadow-config` CLI tool
|
|
932
|
-
- All fields are now automatically shadowed without configuration
|
|
933
|
-
- Simplified package structure and build process
|
|
934
|
-
|
|
935
|
-
## [0.3.1] - 2024-12-02
|
|
936
|
-
|
|
937
|
-
### Fixed
|
|
938
|
-
|
|
939
|
-
- **Build**: Fixed TypeScript compilation errors
|
|
940
|
-
- Fixed syntax errors in timestamps.ts and validation.ts
|
|
941
|
-
- Updated ShadowConfig type imports
|
|
942
|
-
- Removed unused getResourceSchema calls
|
|
943
|
-
- **ESLint**: Fixed ESLint parsing errors for test files
|
|
944
|
-
- Added separate ESLint configuration for test files
|
|
945
|
-
- Configured `project: false` for test files excluded from tsconfig.json
|
|
946
|
-
|
|
947
|
-
## [0.3.0] - 2024-12-01
|
|
948
|
-
|
|
949
|
-
### Added
|
|
950
|
-
|
|
951
|
-
- **Shadow Configuration**: Automatic field detection for all record types
|
|
952
|
-
- Support for 6 field types: string, number, boolean, datetime, array, object
|
|
953
|
-
- Automatic shadow generation for all fields in each record
|
|
954
|
-
- Environment variable-based configuration (4 variables)
|
|
955
|
-
- Comprehensive test suite (275 tests)
|
|
956
|
-
- Updated documentation with new configuration guide
|
|
957
|
-
|
|
958
|
-
### Changed
|
|
959
|
-
|
|
960
|
-
- **Shadow Configuration**: Simplified configuration management
|
|
961
|
-
- Replaced JSON configuration files with environment variables
|
|
962
|
-
- `SHADOW_CREATED_AT_FIELD` (default: `createdAt`)
|
|
963
|
-
- `SHADOW_UPDATED_AT_FIELD` (default: `updatedAt`)
|
|
964
|
-
- `SHADOW_STRING_MAX_BYTES` (default: `100`)
|
|
965
|
-
- `SHADOW_NUMBER_PADDING` (default: `15`)
|
|
966
|
-
- Primitive types truncated at 100 bytes
|
|
967
|
-
- Complex types (array/object) truncated at 200 bytes
|
|
968
|
-
- Number range: -10^15 to +10^15
|
|
969
|
-
|
|
970
|
-
### Removed
|
|
971
|
-
|
|
972
|
-
- **Shadow Configuration**: Removed schema-based configuration
|
|
973
|
-
- No longer requires `shadow.config.json` files
|
|
974
|
-
- No longer requires schema definitions for shadow fields
|
|
975
|
-
- Removed `generate-shadow-config` script
|
|
976
|
-
- Records are now independent and self-contained
|
|
977
|
-
|
|
978
|
-
### Breaking Changes
|
|
979
|
-
|
|
980
|
-
- **Shadow Configuration**: Configuration method has changed
|
|
981
|
-
- Old: JSON configuration files with schema definitions
|
|
982
|
-
- New: Environment variables with automatic field detection
|
|
983
|
-
- Migration: Set environment variables and remove JSON config files
|
|
984
|
-
- All fields are now automatically shadowed (no schema required)
|
|
985
|
-
|
|
986
|
-
## [0.2.2] - 2024-12-01
|
|
987
|
-
|
|
988
|
-
### Added
|
|
989
|
-
|
|
990
|
-
- **Types**: Export `ResultBase` and `InputBase` from `@exabugs/dynamodb-client/client`
|
|
991
|
-
- `ResultBase`: Base interface for document results (with required `id` field)
|
|
992
|
-
- `InputBase`: Base interface for document inputs (with optional `id` field)
|
|
993
|
-
- Allows users to extend `ResultBase` for type-safe collection definitions
|
|
994
|
-
- Improves type safety when defining custom document interfaces
|
|
995
|
-
|
|
996
|
-
### Changed
|
|
997
|
-
|
|
998
|
-
- **Client**: Updated `client/index.ts` to export base types
|
|
999
|
-
- `export { Collection, type InputBase, type ResultBase } from './Collection.js'`
|
|
1000
|
-
|
|
1001
|
-
## [0.2.1] - 2025-01-19
|
|
1002
|
-
|
|
1003
|
-
### Fixed
|
|
1004
|
-
|
|
1005
|
-
- **Server**: Removed `database` field validation from Lambda handler
|
|
1006
|
-
- Fixed runtime error: "Missing required field: database"
|
|
1007
|
-
- `MongoDBStyleRequest` interface no longer includes `database` field
|
|
1008
|
-
- `parseRequestBody()` function no longer validates `database` field
|
|
1009
|
-
- Completes the v0.2.0 breaking change implementation
|
|
1010
|
-
|
|
1011
|
-
### Added
|
|
1012
|
-
|
|
1013
|
-
- **Tests**: Added comprehensive unit tests for Lambda handler
|
|
1014
|
-
- Request body parsing tests (7 tests)
|
|
1015
|
-
- MongoDB-style API operation tests (8 tests)
|
|
1016
|
-
- v0.2.0 breaking change verification tests (2 tests)
|
|
1017
|
-
- CORS and method validation tests (2 tests)
|
|
1018
|
-
- Authentication header validation tests (2 tests)
|
|
1019
|
-
- Total: 21 new tests to prevent regression
|
|
1020
|
-
|
|
1021
|
-
## [0.2.0] - 2024-12-01
|
|
1022
|
-
|
|
1023
|
-
### Changed
|
|
1024
|
-
|
|
1025
|
-
- **BREAKING**: Removed `databaseName` parameter from all APIs
|
|
1026
|
-
- `DynamoClient.db()` no longer requires a database name argument
|
|
1027
|
-
- `createDataProvider()` no longer requires `databaseName` option
|
|
1028
|
-
- `Database` class no longer stores or uses database name
|
|
1029
|
-
- `Collection` and `FindCursor` no longer include database name in requests
|
|
1030
|
-
- Simplified architecture: DynamoDB table is 1:1 with Lambda function
|
|
1031
|
-
- For multi-tenant use cases, use separate DynamoDB tables instead
|
|
1032
|
-
|
|
1033
|
-
### Migration Guide
|
|
1034
|
-
|
|
1035
|
-
**Before (v0.1.x):**
|
|
1036
|
-
|
|
1037
|
-
```typescript
|
|
1038
|
-
const client = new DynamoClient(apiUrl);
|
|
1039
|
-
await client.connect();
|
|
1040
|
-
const db = client.db('myapp');
|
|
1041
|
-
const collection = db.collection('users');
|
|
1042
|
-
|
|
1043
|
-
const dataProvider = createDataProvider({
|
|
1044
|
-
apiUrl: 'https://...',
|
|
1045
|
-
databaseName: 'myapp',
|
|
1046
|
-
tokenProvider,
|
|
1047
|
-
});
|
|
1048
|
-
```
|
|
1049
|
-
|
|
1050
|
-
**After (v0.2.0):**
|
|
1051
|
-
|
|
1052
|
-
```typescript
|
|
1053
|
-
const client = new DynamoClient(apiUrl);
|
|
1054
|
-
await client.connect();
|
|
1055
|
-
const db = client.db();
|
|
1056
|
-
const collection = db.collection('users');
|
|
1057
|
-
|
|
1058
|
-
const dataProvider = createDataProvider({
|
|
1059
|
-
apiUrl: 'https://...',
|
|
1060
|
-
tokenProvider,
|
|
1061
|
-
});
|
|
1062
|
-
```
|
|
1063
|
-
|
|
1064
|
-
## [0.1.2] - 2024-11-30
|
|
1065
|
-
|
|
1066
|
-
### Added
|
|
1067
|
-
|
|
1068
|
-
- Boolean type support for shadow fields
|
|
1069
|
-
- Added `'boolean'` to `ShadowFieldType`
|
|
1070
|
-
- Added `formatBoolean()` function for boolean value formatting
|
|
1071
|
-
- Boolean values are formatted as `'true'` or `'false'` strings
|
|
1072
|
-
- Full test coverage for boolean shadow records
|
|
1073
|
-
|
|
1074
|
-
### Changed
|
|
1075
|
-
|
|
1076
|
-
- Updated `formatFieldValue()` to handle boolean type
|
|
1077
|
-
- Updated `generateShadowSK()` to support boolean values
|
|
1078
|
-
- Exported `formatBoolean` from shadows module
|
|
1079
|
-
|
|
1080
|
-
## [0.1.0] - 2024-11-29
|
|
1081
|
-
|
|
1082
|
-
### Added
|
|
1083
|
-
|
|
1084
|
-
- Initial release of @exabugs/dynamodb-client
|
|
1085
|
-
- MongoDB-like API for DynamoDB Single-Table Design
|
|
1086
|
-
- Shadow Records for efficient sorting and querying
|
|
1087
|
-
- Multiple authentication methods:
|
|
1088
|
-
- IAM authentication for server-side
|
|
1089
|
-
- Cognito authentication for web applications
|
|
1090
|
-
- Token authentication for custom scenarios
|
|
1091
|
-
- Lambda function implementation with Function URL support
|
|
1092
|
-
- react-admin integration for admin UIs
|
|
1093
|
-
- Terraform modules for infrastructure deployment
|
|
1094
|
-
- Comprehensive TypeScript support
|
|
1095
|
-
- Full test coverage with Vitest
|
|
1096
|
-
|
|
1097
|
-
### Features
|
|
1098
|
-
|
|
1099
|
-
- **Client SDK**: DynamoDB operations with MongoDB-like API
|
|
1100
|
-
- `insertOne`, `insertMany`
|
|
1101
|
-
- `findOne`, `find` with cursor support
|
|
1102
|
-
- `updateOne`, `updateMany`
|
|
1103
|
-
- `deleteOne`, `deleteMany`
|
|
1104
|
-
- **Server Implementation**: Lambda handler for serverless deployments
|
|
1105
|
-
- **Shadow Records**: Automatic generation and management for sorting
|
|
1106
|
-
- **Advanced Filtering**: 7 operators (eq, lt, lte, gt, gte, starts, ends)
|
|
1107
|
-
- **Bulk Operations**: Automatic chunking for large datasets
|
|
1108
|
-
- **TTL Support**: Automatic data expiration
|
|
1109
|
-
|
|
1110
|
-
[Unreleased]: https://github.com/exabugs/dynamodb-client/compare/v0.1.0...HEAD
|
|
1111
|
-
[0.1.0]: https://github.com/exabugs/dynamodb-client/releases/tag/v0.1.0
|