@lafken/dynamo 0.13.4 → 0.14.0
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/lib/resolver/table/internal/internal.js +12 -25
- package/package.json +11 -11
|
@@ -158,34 +158,21 @@ class InternalTable extends resolver_1.lafkenResource.make(dynamodb_table_1.Dyna
|
|
|
158
158
|
for (const attribute of [...partitionKeys, ...sortKeys]) {
|
|
159
159
|
indexAttributes.add(attribute);
|
|
160
160
|
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
if (partitionKeys.length > 4 || sortKeys.length > 4) {
|
|
164
|
-
throw new Error(`A multi-attribute index supports up to 4 partition and 4 sort attributes. Check the index "${index.name}".`);
|
|
165
|
-
}
|
|
166
|
-
globalIndexes.push({
|
|
167
|
-
name: index.name,
|
|
168
|
-
keySchema: [
|
|
169
|
-
...partitionKeys.map((attributeName) => ({
|
|
170
|
-
attributeName,
|
|
171
|
-
keyType: 'HASH',
|
|
172
|
-
})),
|
|
173
|
-
...sortKeys.map((attributeName) => ({
|
|
174
|
-
attributeName,
|
|
175
|
-
keyType: 'RANGE',
|
|
176
|
-
})),
|
|
177
|
-
],
|
|
178
|
-
projectionType,
|
|
179
|
-
nonKeyAttributes,
|
|
180
|
-
readCapacity: index.readCapacity,
|
|
181
|
-
writeCapacity: index.writeCapacity,
|
|
182
|
-
});
|
|
183
|
-
continue;
|
|
161
|
+
if (partitionKeys.length > 4 || sortKeys.length > 4) {
|
|
162
|
+
throw new Error(`A multi-attribute index supports up to 4 partition and 4 sort attributes. Check the index "${index.name}".`);
|
|
184
163
|
}
|
|
185
164
|
globalIndexes.push({
|
|
186
165
|
name: index.name,
|
|
187
|
-
|
|
188
|
-
|
|
166
|
+
keySchema: [
|
|
167
|
+
...partitionKeys.map((attributeName) => ({
|
|
168
|
+
attributeName,
|
|
169
|
+
keyType: 'HASH',
|
|
170
|
+
})),
|
|
171
|
+
...sortKeys.map((attributeName) => ({
|
|
172
|
+
attributeName,
|
|
173
|
+
keyType: 'RANGE',
|
|
174
|
+
})),
|
|
175
|
+
],
|
|
189
176
|
projectionType,
|
|
190
177
|
nonKeyAttributes,
|
|
191
178
|
readCapacity: index.readCapacity,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lafken/dynamo",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Define DynamoDB tables using TypeScript decorators - type-safe, declarative infrastructure with Lafken",
|
|
6
6
|
"keywords": [
|
|
@@ -56,30 +56,30 @@
|
|
|
56
56
|
"lib"
|
|
57
57
|
],
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@aws-sdk/client-dynamodb": "^3.
|
|
59
|
+
"@aws-sdk/client-dynamodb": "^3.1106.0",
|
|
60
60
|
"@aws-sdk/util-dynamodb": "^3.996.7",
|
|
61
61
|
"reflect-metadata": "^0.2.2",
|
|
62
|
-
"@lafken/resolver": "0.
|
|
62
|
+
"@lafken/resolver": "0.14.0"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@cdktn/provider-aws": "^
|
|
66
|
-
"@swc/core": "^1.15.
|
|
65
|
+
"@cdktn/provider-aws": "^25.0.0",
|
|
66
|
+
"@swc/core": "^1.15.47",
|
|
67
67
|
"@swc/helpers": "^0.5.23",
|
|
68
68
|
"@vitest/runner": "^4.1.10",
|
|
69
69
|
"aws-sdk-client-mock": "^4.1.0",
|
|
70
|
-
"cdktn": "^0.
|
|
70
|
+
"cdktn": "^0.24.0",
|
|
71
71
|
"cdktn-vitest": "^1.0.0",
|
|
72
|
-
"constructs": "^10.
|
|
72
|
+
"constructs": "^10.8.0",
|
|
73
73
|
"typescript": "7.0.2",
|
|
74
|
-
"unplugin-swc": "^1.5.
|
|
74
|
+
"unplugin-swc": "^1.5.10",
|
|
75
75
|
"vitest": "^4.1.10",
|
|
76
|
-
"@lafken/common": "0.
|
|
76
|
+
"@lafken/common": "0.14.0"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
79
|
"@cdktn/provider-aws": ">=23.0.0",
|
|
80
80
|
"cdktn": ">=0.22.0",
|
|
81
|
-
"constructs": "
|
|
82
|
-
"@lafken/common": "0.
|
|
81
|
+
"constructs": ">=10.7.0",
|
|
82
|
+
"@lafken/common": "0.14.0"
|
|
83
83
|
},
|
|
84
84
|
"engines": {
|
|
85
85
|
"node": ">=20.19"
|