proto.io 0.0.149 → 0.0.150

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/client.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { P as ProtoClient } from './internals/index-CKgKjs8z.js';
2
- export { c as classExtends, e as isFile, a as isObject, i as isQuery, d as isRole, b as isUser } from './internals/index-CKgKjs8z.js';
1
+ import { P as ProtoClient } from './internals/index-CsRN32Jf.js';
2
+ export { c as classExtends, e as isFile, a as isObject, i as isQuery, d as isRole, b as isUser } from './internals/index-CsRN32Jf.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-DnREUbmG.js';
4
+ export { D as DeserializeOptions, S as SerializeOptions, d as TSerializable, e as deserialize, s as serialize } from './internals/index-013pxZ3P.js';
5
5
  import '@o2ter/utils-js';
6
6
  import 'socket.io-client';
7
7
  import '@socket.io/component-emitter';
package/dist/index.d.ts CHANGED
@@ -2,11 +2,11 @@ import * as socket_io from 'socket.io';
2
2
  import * as socket_io_dist_typed_events from 'socket.io/dist/typed-events';
3
3
  import * as express_serve_static_core from 'express-serve-static-core';
4
4
  import { Server, RequestHandler } from '@o2ter/server-js';
5
- import { T as TSchema, _ as _TValue, P as ProtoService, a as ProtoServiceOptions, b as ProtoServiceKeyOptions } from './internals/index-DnREUbmG.js';
6
- export { D as DeserializeOptions, S as SerializeOptions, c as TFileStorage, d as TSerializable, e as deserialize, s as serialize } from './internals/index-DnREUbmG.js';
5
+ import { T as TSchema, _ as _TValue, P as ProtoService, a as ProtoServiceOptions, b as ProtoServiceKeyOptions } from './internals/index-013pxZ3P.js';
6
+ export { D as DeserializeOptions, S as SerializeOptions, c as TFileStorage, d as TSerializable, e as deserialize, s as serialize } from './internals/index-013pxZ3P.js';
7
7
  import Decimal from 'decimal.js';
8
8
  export { Decimal } from 'decimal.js';
9
- export { P as ProtoClient, c as classExtends, e as isFile, a as isObject, i as isQuery, d as isRole, b as isUser } from './internals/index-CKgKjs8z.js';
9
+ export { P as ProtoClient, c as classExtends, e as isFile, a as isObject, i as isQuery, d as isRole, b as isUser } from './internals/index-CsRN32Jf.js';
10
10
  import '@o2ter/utils-js';
11
11
  import 'jsonwebtoken';
12
12
  import 'lodash';
package/dist/index.js CHANGED
@@ -146,7 +146,7 @@ const dispatcher = (proto, options, disableSecurity) => {
146
146
  includes: _includes,
147
147
  matches: _matches,
148
148
  objectIdSize: proto[_private.PVK].options.objectIdSize
149
- }, _attrs), { lockTable: options.className });
149
+ }, _attrs), { lockTable: options.className, retry: true });
150
150
  }
151
151
  catch (e) {
152
152
  if (proto.storage.isDuplicateIdError(e))
@@ -170,7 +170,7 @@ const dispatcher = (proto, options, disableSecurity) => {
170
170
  includes: _includes,
171
171
  matches: _matches,
172
172
  objectIdSize: proto[_private.PVK].options.objectIdSize
173
- }, _attrs), { lockTable: options.className });
173
+ }, _attrs), { lockTable: options.className, retry: true });
174
174
  }
175
175
  catch (e) {
176
176
  if (proto.storage.isDuplicateIdError(e))
@@ -196,7 +196,7 @@ const dispatcher = (proto, options, disableSecurity) => {
196
196
  const _setOnInsert = normalize(_validator.validateFields(query.className, setOnInsert, 'create', random.QueryValidator.patterns.name));
197
197
  while (true) {
198
198
  try {
199
- return await proto.storage.atomic((storage) => storage.upsertOne(_query, _update, _setOnInsert));
199
+ return await proto.storage.atomic((storage) => storage.upsertOne(_query, _update, _setOnInsert), { lockTable: query.className, retry: true });
200
200
  }
201
201
  catch (e) {
202
202
  if (proto.storage.isDuplicateIdError(e))