proto.io 0.0.211 → 0.0.213

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 (48) hide show
  1. package/dist/adapters/file/aliyun-oss.d.ts +3 -3
  2. package/dist/adapters/file/database.d.ts +2 -2
  3. package/dist/adapters/file/database.js +1 -1
  4. package/dist/adapters/file/database.js.map +1 -1
  5. package/dist/adapters/file/database.mjs +2 -2
  6. package/dist/adapters/file/database.mjs.map +1 -1
  7. package/dist/adapters/file/filesystem.d.ts +3 -3
  8. package/dist/adapters/file/google-cloud-storage.d.ts +3 -3
  9. package/dist/adapters/storage/progres.d.ts +8 -6
  10. package/dist/adapters/storage/progres.js +148 -80
  11. package/dist/adapters/storage/progres.js.map +1 -1
  12. package/dist/adapters/storage/progres.mjs +149 -81
  13. package/dist/adapters/storage/progres.mjs.map +1 -1
  14. package/dist/client.d.ts +3 -3
  15. package/dist/client.js +1 -1
  16. package/dist/client.mjs +2 -2
  17. package/dist/index.d.ts +3 -3
  18. package/dist/index.js +8 -8
  19. package/dist/index.js.map +1 -1
  20. package/dist/index.mjs +10 -10
  21. package/dist/index.mjs.map +1 -1
  22. package/dist/internals/{base-BCWOHUaQ.d.ts → base-CZGalGrd.d.ts} +2 -2
  23. package/dist/internals/base-CZGalGrd.d.ts.map +1 -0
  24. package/dist/internals/{chunk-2pKgkO5-.d.ts → chunk-BsT9SYny.d.ts} +3 -3
  25. package/dist/internals/chunk-BsT9SYny.d.ts.map +1 -0
  26. package/dist/internals/{index-lTzbCO8S.d.ts → index-Boxwkqe0.d.ts} +32 -15
  27. package/dist/internals/index-Boxwkqe0.d.ts.map +1 -0
  28. package/dist/internals/{index-DPPLcZx8.mjs → index-DG9HHO_U.mjs} +2 -2
  29. package/dist/internals/{index-DPPLcZx8.mjs.map → index-DG9HHO_U.mjs.map} +1 -1
  30. package/dist/internals/{index-Btxxs0KS.js → index-DfnPpl1I.js} +16 -10
  31. package/dist/internals/index-DfnPpl1I.js.map +1 -0
  32. package/dist/internals/{index-8AdKlZUU.d.ts → index-NF-U_3zG.d.ts} +2 -2
  33. package/dist/internals/index-NF-U_3zG.d.ts.map +1 -0
  34. package/dist/internals/{index-CoeDMG5V.mjs → index-ZPbBr9Db.mjs} +16 -10
  35. package/dist/internals/index-ZPbBr9Db.mjs.map +1 -0
  36. package/dist/internals/{random-ycCeBd0S.mjs → random-CufRbivU.mjs} +121 -19
  37. package/dist/internals/random-CufRbivU.mjs.map +1 -0
  38. package/dist/internals/{random-CyU_Y2Ay.js → random-DzvxbWAc.js} +161 -58
  39. package/dist/internals/random-DzvxbWAc.js.map +1 -0
  40. package/package.json +1 -1
  41. package/dist/internals/base-BCWOHUaQ.d.ts.map +0 -1
  42. package/dist/internals/chunk-2pKgkO5-.d.ts.map +0 -1
  43. package/dist/internals/index-8AdKlZUU.d.ts.map +0 -1
  44. package/dist/internals/index-Btxxs0KS.js.map +0 -1
  45. package/dist/internals/index-CoeDMG5V.mjs.map +0 -1
  46. package/dist/internals/index-lTzbCO8S.d.ts.map +0 -1
  47. package/dist/internals/random-CyU_Y2Ay.js.map +0 -1
  48. package/dist/internals/random-ycCeBd0S.mjs.map +0 -1
package/dist/index.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  import _ from 'lodash';
2
2
  import { Server } from '@o2ter/server-js';
3
- import { Q as QueryValidator, r as resolveColumn, a as resolveDataType, g as generateId } from './internals/random-ycCeBd0S.mjs';
3
+ import { Q as QueryValidator, r as resolveColumn, a as resolveDataType, g as generateId } from './internals/random-CufRbivU.mjs';
4
4
  import { P as PVK } from './internals/private-CNw40LZ7.mjs';
5
5
  import { prototypes, asyncStream, isBinaryData, base64ToBuffer } from '@o2ter/utils-js';
6
- import { L as LiveQuerySubscription, T as TQuery, d as deserialize, s as serialize, a as TUser, P as ProtoType, _ as _logLevels } from './internals/index-CoeDMG5V.mjs';
7
- export { b as ProtoClient, c as classExtends, h as isFile, j as isJob, e as isObject, i as isQuery, g as isRole, f as isUser } from './internals/index-CoeDMG5V.mjs';
6
+ import { L as LiveQuerySubscription, T as TQuery, d as deserialize, s as serialize, a as TUser, P as ProtoType, _ as _logLevels } from './internals/index-ZPbBr9Db.mjs';
7
+ export { b as ProtoClient, c as classExtends, h as isFile, j as isJob, e as isObject, i as isQuery, g as isRole, f as isUser } from './internals/index-ZPbBr9Db.mjs';
8
8
  import { i as isPointer, a as isRelation, T as TObject, b as isShape, d as defaultObjectKeyTypes, c as isPrimitive } from './internals/index-al1N-qi7.mjs';
9
9
  import jwt from 'jsonwebtoken';
10
10
  import { Blob } from 'node:buffer';
@@ -13,7 +13,7 @@ import { scrypt } from 'node:crypto';
13
13
  import { promisify } from 'util';
14
14
  import { randomBytes, randomUUID } from '@o2ter/crypto-js';
15
15
  import { P as PROTO_NOTY_MSG, a as PROTO_LIVEQUERY_MSG, M as MASTER_USER_HEADER_NAME, b as MASTER_PASS_HEADER_NAME, A as AUTH_COOKIE_KEY, U as UPLOAD_TOKEN_HEADER_NAME } from './internals/const-Dkp7Nsv5.mjs';
16
- import { Q as QuerySelector } from './internals/index-DPPLcZx8.mjs';
16
+ import { Q as QuerySelector } from './internals/index-DG9HHO_U.mjs';
17
17
  export { Decimal } from 'decimal.js';
18
18
  import queryType from 'query-types';
19
19
  import busboy from 'busboy';
@@ -138,8 +138,8 @@ const dispatcher = (proto, options) => {
138
138
  throw Error('File is not support insert');
139
139
  QueryValidator.recursiveCheck(values);
140
140
  const _validator = await validator();
141
- _validator.validateCountMatches(options.className, options.countMatches ?? []);
142
- const _includes = _validator.decodeIncludes(options.className, options.includes ?? ['*']);
141
+ const _groupMatches = _validator.decodeGroupMatches(options.className, options.groupMatches ?? {});
142
+ const _includes = _validator.decodeIncludes(options.className, options.includes ?? ['*'], _groupMatches);
143
143
  const _matches = _validator.decodeMatches(options.className, options.matches ?? {}, _includes);
144
144
  if (!_validator.validateCLPs(options.className, 'create'))
145
145
  throw Error('No permission');
@@ -150,7 +150,7 @@ const dispatcher = (proto, options) => {
150
150
  className: options.className,
151
151
  includes: _includes,
152
152
  matches: _matches,
153
- countMatches: options.countMatches ?? [],
153
+ groupMatches: _groupMatches,
154
154
  objectIdSize: proto[PVK].options.objectIdSize
155
155
  }, _attrs), { lockTable: options.className, retry: true });
156
156
  }
@@ -378,7 +378,7 @@ class _ProtoQuery extends TQuery {
378
378
  className: this.className,
379
379
  includes: this[PVK].options.includes,
380
380
  matches: this[PVK].options.matches,
381
- countMatches: this[PVK].options.countMatches,
381
+ groupMatches: this[PVK].options.groupMatches,
382
382
  }, values));
383
383
  if (!options?.silent)
384
384
  this._on_upsert(objs);
@@ -1739,7 +1739,7 @@ class ProtoService extends ProtoType {
1739
1739
  className: 'File',
1740
1740
  filter: QuerySelector.decode({ _expired_at: { $lt: time } }),
1741
1741
  matches: {},
1742
- countMatches: [],
1742
+ groupMatches: {},
1743
1743
  includes: ['_id', '_expired_at', 'token'],
1744
1744
  objectIdSize: 0
1745
1745
  });
@@ -1754,7 +1754,7 @@ class ProtoService extends ProtoType {
1754
1754
  filter: QuerySelector.decode({ _expired_at: { $lt: time } }),
1755
1755
  includes: ['_id', '_expired_at'],
1756
1756
  matches: {},
1757
- countMatches: [],
1757
+ groupMatches: {},
1758
1758
  objectIdSize: 0
1759
1759
  });
1760
1760
  }