@opra/mongodb 1.5.1 → 1.5.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.
@@ -245,8 +245,10 @@ class MongoService extends core_1.ServiceBase {
245
245
  let validator = this._inputCodecs[operation];
246
246
  if (validator)
247
247
  return validator;
248
- const options = { projection: '*' };
249
- options.scope = this._dataTypeScope;
248
+ const options = {
249
+ projection: '*',
250
+ scope: this._dataTypeScope,
251
+ };
250
252
  if (operation === 'update') {
251
253
  options.partial = 'deep';
252
254
  options.allowPatchOperators = true;
@@ -242,8 +242,10 @@ export class MongoService extends ServiceBase {
242
242
  let validator = this._inputCodecs[operation];
243
243
  if (validator)
244
244
  return validator;
245
- const options = { projection: '*' };
246
- options.scope = this._dataTypeScope;
245
+ const options = {
246
+ projection: '*',
247
+ scope: this._dataTypeScope,
248
+ };
247
249
  if (operation === 'update') {
248
250
  options.partial = 'deep';
249
251
  options.allowPatchOperators = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opra/mongodb",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "description": "Opra MongoDB adapter package",
5
5
  "author": "Panates",
6
6
  "license": "MIT",
@@ -10,9 +10,9 @@
10
10
  "valgen": "^5.12.0"
11
11
  },
12
12
  "peerDependencies": {
13
- "@opra/common": "^1.5.1",
14
- "@opra/core": "^1.5.1",
15
- "@opra/http": "^1.5.1",
13
+ "@opra/common": "^1.5.2",
14
+ "@opra/core": "^1.5.2",
15
+ "@opra/http": "^1.5.2",
16
16
  "mongodb": ">= 6.0.0"
17
17
  },
18
18
  "type": "module",
@@ -18,6 +18,7 @@ export declare namespace MongoService {
18
18
  documentFilter?: MongoService<any>['documentFilter'];
19
19
  interceptor?: MongoService<any>['interceptor'];
20
20
  idGenerator?: MongoService<any>['idGenerator'];
21
+ scope?: MongoService<any>['scope'];
21
22
  onError?: MongoService<any>['onError'];
22
23
  }
23
24
  type CrudOp = 'create' | 'read' | 'replace' | 'update' | 'delete';