proto.io 0.0.210 → 0.0.211
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/dist/adapters/file/aliyun-oss.d.ts +3 -3
- package/dist/adapters/file/database.d.ts +2 -2
- package/dist/adapters/file/filesystem.d.ts +3 -3
- package/dist/adapters/file/google-cloud-storage.d.ts +3 -3
- package/dist/adapters/storage/progres.d.ts +1 -1
- package/dist/client.d.ts +3 -3
- package/dist/client.js +1 -1
- package/dist/client.mjs +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +4 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -6
- package/dist/index.mjs.map +1 -1
- package/dist/internals/{base-C1ndp06_.d.ts → base-BCWOHUaQ.d.ts} +2 -2
- package/dist/internals/base-BCWOHUaQ.d.ts.map +1 -0
- package/dist/internals/{chunk-DF4KyvgB.d.ts → chunk-2pKgkO5-.d.ts} +3 -3
- package/dist/internals/chunk-2pKgkO5-.d.ts.map +1 -0
- package/dist/internals/{index-l-Mk0lCc.d.ts → index-8AdKlZUU.d.ts} +2 -2
- package/dist/internals/index-8AdKlZUU.d.ts.map +1 -0
- package/dist/internals/{index-Clo9hepf.js → index-Btxxs0KS.js} +8 -1
- package/dist/internals/index-Btxxs0KS.js.map +1 -0
- package/dist/internals/{index-BgSBzm-K.mjs → index-CoeDMG5V.mjs} +8 -1
- package/dist/internals/index-CoeDMG5V.mjs.map +1 -0
- package/dist/internals/{index-DIRjiWPh.d.ts → index-lTzbCO8S.d.ts} +6 -1
- package/dist/internals/index-lTzbCO8S.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/internals/base-C1ndp06_.d.ts.map +0 -1
- package/dist/internals/chunk-DF4KyvgB.d.ts.map +0 -1
- package/dist/internals/index-BgSBzm-K.mjs.map +0 -1
- package/dist/internals/index-Clo9hepf.js.map +0 -1
- package/dist/internals/index-DIRjiWPh.d.ts.map +0 -1
- package/dist/internals/index-l-Mk0lCc.d.ts.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -3,8 +3,8 @@ import { Server } from '@o2ter/server-js';
|
|
|
3
3
|
import { Q as QueryValidator, r as resolveColumn, a as resolveDataType, g as generateId } from './internals/random-ycCeBd0S.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-
|
|
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-
|
|
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';
|
|
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';
|
|
@@ -1077,14 +1077,13 @@ class ProtoInternal {
|
|
|
1077
1077
|
(async () => {
|
|
1078
1078
|
try {
|
|
1079
1079
|
const _roles = await roles;
|
|
1080
|
-
const payload = proto.rebind(_.filter(objects, object => {
|
|
1081
|
-
if (isMaster)
|
|
1082
|
-
return true;
|
|
1080
|
+
const payload = proto.rebind(isMaster ? objects : _.filter(objects, object => {
|
|
1083
1081
|
const acl = object.acl();
|
|
1084
1082
|
const clp = proto.schema[object.className].classLevelPermissions?.get ?? ['*'];
|
|
1085
1083
|
return _.some(_roles, x => _.includes(clp, x) && _.includes(acl.read, x));
|
|
1086
1084
|
}));
|
|
1087
|
-
|
|
1085
|
+
if (!_.isEmpty(payload))
|
|
1086
|
+
await callback(event, payload);
|
|
1088
1087
|
}
|
|
1089
1088
|
catch (e) {
|
|
1090
1089
|
proto.logger.error(e);
|