dyna-record 0.1.0 → 0.1.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.
package/README.md CHANGED
@@ -134,8 +134,6 @@ class Course extends MyTable {
134
134
 
135
135
  ### Attributes
136
136
 
137
- For [natively supported data types](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes), define attributes using the [@Attribute](https://dyna-record.com/functions/Attribute.html) decorator. This decorator maps class properties to DynamoDB table attributes.
138
-
139
137
  Use the attribute decorators below to define attributes on a model. The decorator maps class properties to DynamoDB table attributes.
140
138
 
141
139
  - Attribute decorators
@@ -44,7 +44,7 @@ type IncludedKeys<T extends DynaRecord, Opts extends FindByIdOptions<T>> = Opts
44
44
  * @template P - The properties of the entity `T`.
45
45
  */
46
46
  type EntityKeysWithIncludedAssociations<T extends DynaRecord, P extends keyof T> = {
47
- [K in P]: T[K] extends DynaRecord ? EntityAttributes<T> : T[K] extends DynaRecord[] ? Array<EntityAttributes<T>> : T[K];
47
+ [K in P]: T[K] extends DynaRecord ? EntityAttributes<T> : T[K] extends DynaRecord[] ? Array<EntityAttributes<T[K][number]>> : T[K];
48
48
  };
49
49
  /**
50
50
  * Represents the result of a `FindById` operation, including the main entity and any specified associated entities.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/operations/FindById/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAC7E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAE3D;;;;;;GAMG;AACH,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,UAAU;IACnD,OAAO,CAAC,EAAE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,CAAC,SAAS,UAAU,EAAE,GACvB,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GACrC,CAAC,CAAC,CAAC,CAAC;CACX,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,CAC7B,CAAC,SAAS,UAAU,EACpB,IAAI,SAAS,eAAe,CAAC,CAAC,CAAC,IAC7B,kCAAkC,CACpC,CAAC,EACD,MAAM,gBAAgB,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,CAAC,EAAE,IAAI,CAAC,CAClD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dyna-record",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Typescript Object Relational Mapper (ORM) for Dynamo",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -8,6 +8,7 @@
8
8
  "build": "tsc",
9
9
  "watch": "tsc -w",
10
10
  "test": "jest",
11
+ "test:watch": "jest --watch",
11
12
  "eslint": "npx eslint . --ext .ts",
12
13
  "eslint-fix": "npx eslint . --ext .ts --fix",
13
14
  "prettier": "npx prettier . --write",