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.
@@ -1,5 +1,5 @@
1
- import { T as TSchema, P as ProtoService } from '../../internals/index-BDHXW8gd.js';
2
- import { F as FileStorageBase, a as FileStorageOptions } from '../../internals/index-DIRRQ7jd.js';
1
+ import { T as TSchema, P as ProtoService } from '../../internals/index-CqunpmT-.js';
2
+ import { F as FileStorageBase, a as FileStorageOptions } from '../../internals/index-DjHHDI1M.js';
3
3
  import '@o2ter/utils-js';
4
4
  import 'jsonwebtoken';
5
5
  import '@o2ter/server-js';
@@ -1,5 +1,5 @@
1
- import { P as ProtoService } from '../../internals/index-BDHXW8gd.js';
2
- import { F as FileStorageBase, a as FileStorageOptions } from '../../internals/index-DIRRQ7jd.js';
1
+ import { P as ProtoService } from '../../internals/index-CqunpmT-.js';
2
+ import { F as FileStorageBase, a as FileStorageOptions } from '../../internals/index-DjHHDI1M.js';
3
3
  import '@o2ter/utils-js';
4
4
  import 'jsonwebtoken';
5
5
  import '@o2ter/server-js';
@@ -1,7 +1,7 @@
1
1
  import * as _google_cloud_storage from '@google-cloud/storage';
2
2
  import { Storage } from '@google-cloud/storage';
3
- import { P as ProtoService } from '../../internals/index-BDHXW8gd.js';
4
- import { F as FileStorageBase, a as FileStorageOptions } from '../../internals/index-DIRRQ7jd.js';
3
+ import { P as ProtoService } from '../../internals/index-CqunpmT-.js';
4
+ import { F as FileStorageBase, a as FileStorageOptions } from '../../internals/index-DjHHDI1M.js';
5
5
  import '@o2ter/utils-js';
6
6
  import 'jsonwebtoken';
7
7
  import '@o2ter/server-js';
@@ -1,5 +1,5 @@
1
1
  import { Pool, PoolClient, PoolConfig } from 'pg';
2
- import { _ as _TValue, T as TSchema, Q as QuerySelector, q as DecodedQuery, F as FindOptions, R as RelationOptions, r as DecodedSortOption, I as InsertOptions, t as TValue, u as FindOneOptions, v as TUpdateOp, w as FieldSelectorExpression, x as QueryExpression, y as TStorage, z as TransactionOptions, h as TObject, A as TQueryRandomOptions, B as TPubSub } from '../../internals/index-BDHXW8gd.js';
2
+ import { _ as _TValue, T as TSchema, Q as QuerySelector, q as DecodedQuery, F as FindOptions, R as RelationOptions, r as DecodedSortOption, I as InsertOptions, t as TValue, u as FindOneOptions, v as TUpdateOp, w as FieldSelectorExpression, x as QueryExpression, y as TStorage, z as TransactionOptions, h as TObject, A as TQueryRandomOptions, B as TPubSub } from '../../internals/index-CqunpmT-.js';
3
3
  import * as _o2ter_utils_js from '@o2ter/utils-js';
4
4
  import { asyncStream } from '@o2ter/utils-js';
5
5
  import 'jsonwebtoken';
package/dist/client.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { P as ProtoClient } from './internals/index-z8mWupzT.js';
2
- export { c as classExtends, e as isFile, f as isJob, a as isObject, i as isQuery, d as isRole, b as isUser } from './internals/index-z8mWupzT.js';
1
+ import { P as ProtoClient } from './internals/index-ClOV7WJp.js';
2
+ export { c as classExtends, e as isFile, f as isJob, a as isObject, i as isQuery, d as isRole, b as isUser } from './internals/index-ClOV7WJp.js';
3
3
  export { Decimal } from 'decimal.js';
4
- export { D as DeserializeOptions, S as SerializeOptions, d as TSerializable, e as deserialize, s as serialize } from './internals/index-BDHXW8gd.js';
4
+ export { D as DeserializeOptions, S as SerializeOptions, d as TSerializable, e as deserialize, s as serialize } from './internals/index-CqunpmT-.js';
5
5
  import '@o2ter/utils-js';
6
6
  import 'socket.io-client';
7
7
  import '@socket.io/component-emitter';
package/dist/client.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('./internals/index-M-VqTiz9.js');
5
+ var index = require('./internals/index-DbXVThGW.js');
6
6
  var Decimal = require('decimal.js');
7
7
  require('@o2ter/utils-js');
8
8
  require('./internals/private-Ciddhure.js');
package/dist/client.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { e as ProtoClient } from './internals/index-BAbXyJEC.mjs';
2
- export { f as classExtends, d as deserialize, k as isFile, l as isJob, g as isObject, i as isQuery, j as isRole, h as isUser, s as serialize } from './internals/index-BAbXyJEC.mjs';
1
+ import { e as ProtoClient } from './internals/index-C9eiMOSP.mjs';
2
+ export { f as classExtends, d as deserialize, k as isFile, l as isJob, g as isObject, i as isQuery, j as isRole, h as isUser, s as serialize } from './internals/index-C9eiMOSP.mjs';
3
3
  export { Decimal } from 'decimal.js';
4
4
  import '@o2ter/utils-js';
5
5
  import './internals/private-CNw40LZ7.mjs';
package/dist/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  import * as socket_io from 'socket.io';
2
2
  import { Router } from 'express';
3
3
  import { Server } from '@o2ter/server-js';
4
- import { T as TSchema, _ as _TValue, P as ProtoService, a as ProtoServiceOptions, b as ProtoServiceKeyOptions } from './internals/index-BDHXW8gd.js';
5
- export { D as DeserializeOptions, S as SerializeOptions, c as TFileStorage, d as TSerializable, e as deserialize, s as serialize } from './internals/index-BDHXW8gd.js';
4
+ import { T as TSchema, _ as _TValue, P as ProtoService, a as ProtoServiceOptions, b as ProtoServiceKeyOptions } from './internals/index-CqunpmT-.js';
5
+ export { D as DeserializeOptions, S as SerializeOptions, c as TFileStorage, d as TSerializable, e as deserialize, s as serialize } from './internals/index-CqunpmT-.js';
6
6
  import Decimal from 'decimal.js';
7
7
  export { Decimal } from 'decimal.js';
8
- export { P as ProtoClient, c as classExtends, e as isFile, f as isJob, a as isObject, i as isQuery, d as isRole, b as isUser } from './internals/index-z8mWupzT.js';
8
+ export { P as ProtoClient, c as classExtends, e as isFile, f as isJob, a as isObject, i as isQuery, d as isRole, b as isUser } from './internals/index-ClOV7WJp.js';
9
9
  import '@o2ter/utils-js';
10
10
  import 'jsonwebtoken';
11
11
  import 'lodash';
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ var serverJs = require('@o2ter/server-js');
7
7
  var random = require('./internals/random-CObICDCy.js');
8
8
  var _private = require('./internals/private-Ciddhure.js');
9
9
  var utilsJs = require('@o2ter/utils-js');
10
- var index = require('./internals/index-M-VqTiz9.js');
10
+ var index = require('./internals/index-DbXVThGW.js');
11
11
  var index$1 = require('./internals/index-Dej3GgVf.js');
12
12
  var jwt = require('jsonwebtoken');
13
13
  var node_buffer = require('node:buffer');
@@ -1145,7 +1145,7 @@ class JobRunner {
1145
1145
  async getNextJob(proto) {
1146
1146
  const availableJobs = await this.getAvailableJobs(proto);
1147
1147
  return await proto.Query('_Job')
1148
- .containsIn('name', availableJobs)
1148
+ .containedIn('name', availableJobs)
1149
1149
  .or(q => q.lessThan('startedAt', new Date(Date.now() - JobRunner.TIMEOUT)), q => q.equalTo('startedAt', null))
1150
1150
  .equalTo('completedAt', null)
1151
1151
  .empty('locks')
@@ -1562,7 +1562,7 @@ class ProtoService extends index.ProtoType {
1562
1562
  while (!_.isEmpty(queue)) {
1563
1563
  queue = await self.Query('Role')
1564
1564
  .or(_.map(_.uniq(['roles', ...roleKeys]), k => q => q.isIntersect(k, queue)))
1565
- .notContainsIn('_id', _.compact(_.map(roles, x => x.objectId)))
1565
+ .notContainedIn('_id', _.compact(_.map(roles, x => x.objectId)))
1566
1566
  .includes('name')
1567
1567
  .find({ master: true });
1568
1568
  roles = _.uniqBy([...roles, ...queue], x => x.objectId);