@exabugs/dynamodb-client 0.3.1 → 0.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.
@@ -1,5 +1,5 @@
1
- // @exabugs/dynamodb-client v0.3.1
2
- // Built: 2025-12-02T03:53:33.771Z
1
+ // @exabugs/dynamodb-client v0.3.2
2
+ // Built: 2025-12-02T04:04:42.041Z
3
3
  "use strict";
4
4
  var __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exabugs/dynamodb-client",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "DynamoDB Single-Table Client SDK with MongoDB-like API, Shadow Records, and Lambda implementation for serverless applications",
5
5
  "author": "exabugs",
6
6
  "license": "MIT",
package/terraform/main.tf CHANGED
@@ -110,8 +110,12 @@ resource "aws_lambda_function" "records" {
110
110
  COGNITO_USER_POOL_ID = var.cognito_user_pool_id
111
111
  COGNITO_CLIENT_ID = var.cognito_client_id
112
112
  COGNITO_REGION = var.region
113
- SHADOW_CONFIG = var.shadow_config
114
113
  LOG_LEVEL = var.log_level
114
+ # シャドウ設定(環境変数ベース)
115
+ SHADOW_CREATED_AT_FIELD = var.shadow_created_at_field
116
+ SHADOW_UPDATED_AT_FIELD = var.shadow_updated_at_field
117
+ SHADOW_STRING_MAX_BYTES = var.shadow_string_max_bytes
118
+ SHADOW_NUMBER_PADDING = var.shadow_number_padding
115
119
  }
116
120
  }
117
121
 
@@ -53,7 +53,37 @@ variable "log_level" {
53
53
  }
54
54
  }
55
55
 
56
- variable "shadow_config" {
57
- description = "シャドー設定(base64エンコード済みJSON)"
56
+ # シャドウ設定(環境変数ベース)
57
+ variable "shadow_created_at_field" {
58
+ description = "作成日時フィールド名"
58
59
  type = string
60
+ default = "createdAt"
61
+ }
62
+
63
+ variable "shadow_updated_at_field" {
64
+ description = "更新日時フィールド名"
65
+ type = string
66
+ default = "updatedAt"
67
+ }
68
+
69
+ variable "shadow_string_max_bytes" {
70
+ description = "プリミティブ型の最大バイト数(array/objectは2倍)"
71
+ type = number
72
+ default = 100
73
+
74
+ validation {
75
+ condition = var.shadow_string_max_bytes > 0
76
+ error_message = "shadow_string_max_bytes は正の整数である必要があります。"
77
+ }
78
+ }
79
+
80
+ variable "shadow_number_padding" {
81
+ description = "数値のパディング桁数"
82
+ type = number
83
+ default = 15
84
+
85
+ validation {
86
+ condition = var.shadow_number_padding > 0 && var.shadow_number_padding <= 15
87
+ error_message = "shadow_number_padding は 1 から 15 の間である必要があります。"
88
+ }
59
89
  }