proto.io 0.0.194 → 0.0.195

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/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-uHM4KXoV.mjs';
4
4
  import { P as PVK } from './internals/private-CNw40LZ7.mjs';
5
5
  import { asyncStream, prototypes, isBinaryData, base64ToBuffer } from '@o2ter/utils-js';
6
- import { T as TQuery, d as deserialize, P as PROTO_NOTY_MSG, M as MASTER_USER_HEADER_NAME, a as MASTER_PASS_HEADER_NAME, A as AUTH_COOKIE_KEY, b as TUser, c as ProtoType, s as serialize, U as UPLOAD_TOKEN_HEADER_NAME } from './internals/index-BAbXyJEC.mjs';
7
- export { e as ProtoClient, f as classExtends, k as isFile, l as isJob, g as isObject, i as isQuery, j as isRole, h as isUser } from './internals/index-BAbXyJEC.mjs';
6
+ import { T as TQuery, d as deserialize, P as PROTO_NOTY_MSG, M as MASTER_USER_HEADER_NAME, a as MASTER_PASS_HEADER_NAME, A as AUTH_COOKIE_KEY, b as TUser, c as ProtoType, s as serialize, U as UPLOAD_TOKEN_HEADER_NAME } from './internals/index-C9eiMOSP.mjs';
7
+ export { e as ProtoClient, f as classExtends, k as isFile, l as isJob, g as isObject, i as isQuery, j as isRole, h as isUser } from './internals/index-C9eiMOSP.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-j8PFq8Ci.mjs';
9
9
  import jwt from 'jsonwebtoken';
10
10
  import { Blob } from 'node:buffer';
@@ -1142,7 +1142,7 @@ class JobRunner {
1142
1142
  async getNextJob(proto) {
1143
1143
  const availableJobs = await this.getAvailableJobs(proto);
1144
1144
  return await proto.Query('_Job')
1145
- .containsIn('name', availableJobs)
1145
+ .containedIn('name', availableJobs)
1146
1146
  .or(q => q.lessThan('startedAt', new Date(Date.now() - JobRunner.TIMEOUT)), q => q.equalTo('startedAt', null))
1147
1147
  .equalTo('completedAt', null)
1148
1148
  .empty('locks')
@@ -1559,7 +1559,7 @@ class ProtoService extends ProtoType {
1559
1559
  while (!_.isEmpty(queue)) {
1560
1560
  queue = await self.Query('Role')
1561
1561
  .or(_.map(_.uniq(['roles', ...roleKeys]), k => q => q.isIntersect(k, queue)))
1562
- .notContainsIn('_id', _.compact(_.map(roles, x => x.objectId)))
1562
+ .notContainedIn('_id', _.compact(_.map(roles, x => x.objectId)))
1563
1563
  .includes('name')
1564
1564
  .find({ master: true });
1565
1565
  roles = _.uniqBy([...roles, ...queue], x => x.objectId);