@kravc/dos 1.9.4 → 1.9.5

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/Document.js +6 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kravc/dos",
3
- "version": "1.9.4",
3
+ "version": "1.9.5",
4
4
  "description": "Convention-based, easy-to-use library for building API-driven serverless services.",
5
5
  "keywords": [
6
6
  "Service",
@@ -26,7 +26,7 @@
26
26
  "author": "Alexander Kravets <a@kra.vc>",
27
27
  "license": "ISC",
28
28
  "dependencies": {
29
- "@kravc/schema": "^2.7.1",
29
+ "@kravc/schema": "^2.7.2",
30
30
  "cookie": "^1.0.1",
31
31
  "js-yaml": "^4.1.0",
32
32
  "jsonwebtoken": "^9.0.2",
package/src/Document.js CHANGED
@@ -136,6 +136,8 @@ class Document extends Component {
136
136
  }
137
137
 
138
138
  static async read(context, query, options) {
139
+ this._extendWithPartition(context, query)
140
+
139
141
  const item = await this._read(query, options)
140
142
 
141
143
  if (!item) {
@@ -197,6 +199,8 @@ class Document extends Component {
197
199
  originalDocument = await this.read(context, query)
198
200
  }
199
201
 
202
+ this._extendWithPartition(context, query)
203
+
200
204
  const updatedItem = await this._update(query, mutation)
201
205
 
202
206
  const document = new this(context, updatedItem)
@@ -232,6 +236,8 @@ class Document extends Component {
232
236
  context so can be referenced in the after action helper */
233
237
  const originalDocument = await this.read(context, query)
234
238
 
239
+ this._extendWithPartition(context, query)
240
+
235
241
  await this._delete(query)
236
242
 
237
243
  if (this.afterDelete) {