proto.io 0.0.166 → 0.0.167

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.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('./internals/index-B-pq8xkP.js');
5
+ var index = require('./internals/index-CyzpkgJB.js');
6
6
  var Decimal = require('decimal.js');
7
7
  require('./internals/index-CVutVPmd.js');
8
8
  require('lodash');
package/dist/client.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { c as ProtoClient } from './internals/index-CUJMde7V.mjs';
2
- export { e as classExtends, d as deserialize, j as isFile, f as isObject, i as isQuery, h as isRole, g as isUser, s as serialize } from './internals/index-CUJMde7V.mjs';
1
+ import { c as ProtoClient } from './internals/index-Dyfia5Om.mjs';
2
+ export { e as classExtends, d as deserialize, j as isFile, f as isObject, i as isQuery, h as isRole, g as isUser, s as serialize } from './internals/index-Dyfia5Om.mjs';
3
3
  export { Decimal } from 'decimal.js';
4
4
  import './internals/index-BYbMU-Ao.mjs';
5
5
  import 'lodash';
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ var serverJs = require('@o2ter/server-js');
7
7
  var random = require('./internals/random-q0PeamQE.js');
8
8
  var _private = require('./internals/private-CSB1Ep4g.js');
9
9
  var utilsJs = require('@o2ter/utils-js');
10
- var index = require('./internals/index-B-pq8xkP.js');
10
+ var index = require('./internals/index-CyzpkgJB.js');
11
11
  var index$1 = require('./internals/index-CVutVPmd.js');
12
12
  var jwt = require('jsonwebtoken');
13
13
  var node_buffer = require('node:buffer');
@@ -249,14 +249,7 @@ const dispatcher = (proto, options, disableSecurity) => {
249
249
  const proxy = (x) => {
250
250
  const self = x;
251
251
  const proxy = _.create(self);
252
- const _prototypes = (x) => {
253
- const prototype = Object.getPrototypeOf(x);
254
- if (_.isNil(prototype) || prototype === Object.prototype)
255
- return [];
256
- return [prototype, ..._prototypes(prototype)];
257
- };
258
- const prototypes = _prototypes(proxy);
259
- for (const name of _.uniq(_.flatMap(prototypes, x => Object.getOwnPropertyNames(x)))) {
252
+ for (const name of _.uniq(_.flatMap(utilsJs.prototypes(proxy), x => Object.getOwnPropertyNames(x)))) {
260
253
  if (name === 'constructor')
261
254
  continue;
262
255
  if (_.isFunction(self[name])) {
@@ -1671,7 +1664,7 @@ const encodeError = (error) => {
1671
1664
  if (error instanceof String)
1672
1665
  return { message: error };
1673
1666
  if (error instanceof Error)
1674
- return { ...error, message: error.message };
1667
+ return { message: error.message };
1675
1668
  return error;
1676
1669
  };
1677
1670
  const response = async (res, callback) => {