@travetto/model-dynamodb 3.0.2-rc.1 → 3.0.3
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/README.md +6 -11
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<!-- This file was generated by @travetto/doc and should not be modified directly -->
|
|
2
|
-
<!-- Please modify https://github.com/travetto/travetto/tree/main/module/model-dynamodb/DOC.
|
|
2
|
+
<!-- Please modify https://github.com/travetto/travetto/tree/main/module/model-dynamodb/DOC.tsx and execute "npx trv doc" to rebuild -->
|
|
3
3
|
# DynamoDB Model Support
|
|
4
|
+
|
|
4
5
|
## DynamoDB backing for the travetto model module.
|
|
5
6
|
|
|
6
7
|
**Install: @travetto/model-dynamodb**
|
|
@@ -12,18 +13,14 @@ npm install @travetto/model-dynamodb
|
|
|
12
13
|
yarn add @travetto/model-dynamodb
|
|
13
14
|
```
|
|
14
15
|
|
|
15
|
-
This module provides an [DynamoDB](https://aws.amazon.com/dynamodb/)-based implementation for the [Data Modeling Support](https://github.com/travetto/travetto/tree/main/module/model#readme "Datastore abstraction for core operations."). This source allows the [Data Modeling Support](https://github.com/travetto/travetto/tree/main/module/model#readme "Datastore abstraction for core operations.") module to read, write and query against [DynamoDB](https://aws.amazon.com/dynamodb/). The entire document is stored as a single value, so nothing is needed to handle schema updates in real time. Indices on the other hand are more complicated, and will not be retroactively computed for new values.
|
|
16
|
+
This module provides an [DynamoDB](https://aws.amazon.com/dynamodb/)-based implementation for the [Data Modeling Support](https://github.com/travetto/travetto/tree/main/module/model#readme "Datastore abstraction for core operations."). This source allows the [Data Modeling Support](https://github.com/travetto/travetto/tree/main/module/model#readme "Datastore abstraction for core operations.") module to read, write and query against [DynamoDB](https://aws.amazon.com/dynamodb/). The entire document is stored as a single value, so nothing is needed to handle schema updates in real time. Indices on the other hand are more complicated, and will not be retroactively computed for new values.
|
|
16
17
|
|
|
17
18
|
Supported features:
|
|
18
|
-
|
|
19
19
|
* [CRUD](https://github.com/travetto/travetto/tree/main/module/model/src/service/crud.ts#L11)
|
|
20
20
|
* [Expiry](https://github.com/travetto/travetto/tree/main/module/model/src/service/expiry.ts#L11)
|
|
21
21
|
* [Indexed](https://github.com/travetto/travetto/tree/main/module/model/src/service/indexed.ts#L12)
|
|
22
|
+
Out of the box, by installing the module, everything should be wired up by default.If you need to customize any aspect of the source or config, you can override and register it with the [Dependency Injection](https://github.com/travetto/travetto/tree/main/module/di#readme "Dependency registration/management and injection support.") module.
|
|
22
23
|
|
|
23
|
-
Out of the box, by installing the module, everything should be wired up by default.If you need to customize any aspect of the source
|
|
24
|
-
or config, you can override and register it with the [Dependency Injection](https://github.com/travetto/travetto/tree/main/module/di#readme "Dependency registration/management and injection support.") module.
|
|
25
|
-
|
|
26
|
-
|
|
27
24
|
**Code: Wiring up a custom Model Source**
|
|
28
25
|
```typescript
|
|
29
26
|
import { InjectableFactory } from '@travetto/di';
|
|
@@ -38,9 +35,8 @@ export class Init {
|
|
|
38
35
|
}
|
|
39
36
|
```
|
|
40
37
|
|
|
41
|
-
|
|
38
|
+
where the [DynamoDBModelConfig](https://github.com/travetto/travetto/tree/main/module/model-dynamodb/src/config.ts#L7) is defined by:
|
|
42
39
|
|
|
43
|
-
|
|
44
40
|
**Code: Structure of DynamoDBModelConfig**
|
|
45
41
|
```typescript
|
|
46
42
|
import type dynamodb from '@aws-sdk/client-dynamodb';
|
|
@@ -59,5 +55,4 @@ export class DynamoDBModelConfig {
|
|
|
59
55
|
}
|
|
60
56
|
```
|
|
61
57
|
|
|
62
|
-
|
|
63
|
-
standard [Configuration](https://github.com/travetto/travetto/tree/main/module/config#readme "Configuration support")resolution paths.
|
|
58
|
+
Additionally, you can see that the class is registered with the [@Config](https://github.com/travetto/travetto/tree/main/module/config/src/decorator.ts#L13) annotation, and so these values can be overridden using the standard [Configuration](https://github.com/travetto/travetto/tree/main/module/config#readme "Configuration support") resolution paths.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/model-dynamodb",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.3",
|
|
4
4
|
"description": "DynamoDB backing for the travetto model module.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@aws-sdk/client-dynamodb": "^3.272.0",
|
|
29
|
-
"@travetto/config": "^3.0.
|
|
30
|
-
"@travetto/model": "^3.0.
|
|
29
|
+
"@travetto/config": "^3.0.3",
|
|
30
|
+
"@travetto/model": "^3.0.3"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@travetto/command": "^3.0.
|
|
33
|
+
"@travetto/command": "^3.0.3"
|
|
34
34
|
},
|
|
35
35
|
"peerDependenciesMeta": {
|
|
36
36
|
"@travetto/command": {
|