proto.io 0.0.145 → 0.0.146

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.
Files changed (42) hide show
  1. package/dist/adapters/file/database.d.ts +3 -3
  2. package/dist/adapters/file/database.js +1 -1
  3. package/dist/adapters/file/database.js.map +1 -1
  4. package/dist/adapters/file/database.mjs +1 -1
  5. package/dist/adapters/file/database.mjs.map +1 -1
  6. package/dist/adapters/file/filesystem.d.ts +3 -3
  7. package/dist/adapters/file/filesystem.js +1 -1
  8. package/dist/adapters/file/filesystem.js.map +1 -1
  9. package/dist/adapters/file/filesystem.mjs +1 -1
  10. package/dist/adapters/file/filesystem.mjs.map +1 -1
  11. package/dist/adapters/file/google-cloud-storage.d.ts +3 -3
  12. package/dist/adapters/file/google-cloud-storage.js +1 -1
  13. package/dist/adapters/file/google-cloud-storage.js.map +1 -1
  14. package/dist/adapters/file/google-cloud-storage.mjs +1 -1
  15. package/dist/adapters/file/google-cloud-storage.mjs.map +1 -1
  16. package/dist/adapters/storage/progres.d.ts +1 -1
  17. package/dist/client.d.ts +3 -3
  18. package/dist/client.js +1 -1
  19. package/dist/client.mjs +2 -2
  20. package/dist/index.d.ts +3 -3
  21. package/dist/index.js +9 -9
  22. package/dist/index.js.map +1 -1
  23. package/dist/index.mjs +10 -10
  24. package/dist/index.mjs.map +1 -1
  25. package/dist/internals/{index-i4lOAqi2.d.ts → index-BDB4idmt.d.ts} +3 -3
  26. package/dist/internals/index-BDB4idmt.d.ts.map +1 -0
  27. package/dist/internals/{index-DW9_3n_K.d.ts → index-BWztjrw_.d.ts} +4 -4
  28. package/dist/internals/index-BWztjrw_.d.ts.map +1 -0
  29. package/dist/internals/index-BqFdBhFc.js.map +1 -1
  30. package/dist/internals/index-C6zdNpc_.js.map +1 -1
  31. package/dist/internals/{index-D5nf79vF.js → index-CT01T3qs.js} +13 -13
  32. package/dist/internals/{index-D5nf79vF.js.map → index-CT01T3qs.js.map} +1 -1
  33. package/dist/internals/{index-ZIegYNKT.mjs → index-Do-zNOpD.mjs} +13 -13
  34. package/dist/internals/{index-ZIegYNKT.mjs.map → index-Do-zNOpD.mjs.map} +1 -1
  35. package/dist/internals/index-EOtjV6U_.mjs.map +1 -1
  36. package/dist/internals/{index-DWyLziGT.d.ts → index-bbPCIbir.d.ts} +3 -3
  37. package/dist/internals/index-bbPCIbir.d.ts.map +1 -0
  38. package/dist/internals/index-be1VYBY2.mjs.map +1 -1
  39. package/package.json +1 -1
  40. package/dist/internals/index-DW9_3n_K.d.ts.map +0 -1
  41. package/dist/internals/index-DWyLziGT.d.ts.map +0 -1
  42. package/dist/internals/index-i4lOAqi2.d.ts.map +0 -1
@@ -532,7 +532,7 @@ const applyObjectMethods = (object, proto) => {
532
532
  return proto[PVK].saveFile(proto, this, options);
533
533
  },
534
534
  },
535
- destory: {
535
+ destroy: {
536
536
  value(options) {
537
537
  return proto[PVK].deleteFile(proto, this, options);
538
538
  },
@@ -603,14 +603,14 @@ const applyObjectMethods = (object, proto) => {
603
603
  return this;
604
604
  },
605
605
  },
606
- destory: {
606
+ destroy: {
607
607
  async value(options) {
608
608
  const deleted = await query()
609
609
  .equalTo('_id', this.objectId)
610
610
  .includes(...this.keys())
611
611
  .deleteOne(options);
612
612
  if (!deleted)
613
- throw Error('Unable to destory document');
613
+ throw Error('Unable to destroy document');
614
614
  this[PVK].attributes = deleted.attributes;
615
615
  this[PVK].mutated = {};
616
616
  return this;
@@ -1052,7 +1052,7 @@ class Service {
1052
1052
  this.sockets.push(socket);
1053
1053
  let disconnect = false;
1054
1054
  let listeners = [];
1055
- let destoryCallbacks = [];
1055
+ let destroyCallbacks = [];
1056
1056
  socket.on('connect_error', () => {
1057
1057
  if (!disconnect && !socket.active)
1058
1058
  socket.connect();
@@ -1066,11 +1066,11 @@ class Service {
1066
1066
  callback(payload);
1067
1067
  }
1068
1068
  });
1069
- const destory = () => {
1069
+ const destroy = () => {
1070
1070
  disconnect = true;
1071
1071
  this.sockets = this.sockets.filter(x => x !== socket);
1072
1072
  socket.disconnect();
1073
- for (const callback of destoryCallbacks) {
1073
+ for (const callback of destroyCallbacks) {
1074
1074
  callback();
1075
1075
  }
1076
1076
  };
@@ -1081,11 +1081,11 @@ class Service {
1081
1081
  return () => {
1082
1082
  listeners = listeners.filter(x => x !== callback);
1083
1083
  if (_.isEmpty(listeners))
1084
- destory();
1084
+ destroy();
1085
1085
  };
1086
1086
  },
1087
- onDestory: (callback) => {
1088
- destoryCallbacks.push(callback);
1087
+ onDestroy: (callback) => {
1088
+ destroyCallbacks.push(callback);
1089
1089
  },
1090
1090
  };
1091
1091
  }
@@ -1344,10 +1344,10 @@ class ProtoClientInternal {
1344
1344
  });
1345
1345
  }
1346
1346
  listen(proto, callback) {
1347
- const { socket, listen, onDestory } = this.socket ?? this.service.socket();
1347
+ const { socket, listen, onDestroy } = this.socket ?? this.service.socket();
1348
1348
  if (_.isNil(this.socket)) {
1349
- this.socket = { socket, listen, onDestory };
1350
- onDestory(() => { this.socket = undefined; });
1349
+ this.socket = { socket, listen, onDestroy };
1350
+ onDestroy(() => { this.socket = undefined; });
1351
1351
  }
1352
1352
  return {
1353
1353
  socket,
@@ -1463,4 +1463,4 @@ class ProtoClient extends ProtoType {
1463
1463
  }
1464
1464
 
1465
1465
  export { AUTH_COOKIE_KEY as A, MASTER_USER_HEADER_NAME as M, ProtoType as P, TQuery as T, UPLOAD_TOKEN_HEADER_NAME as U, MASTER_PASS_HEADER_NAME as a, TUser as b, ProtoClient as c, deserialize as d, classExtends as e, isObject as f, isUser as g, isRole as h, isQuery as i, isFile as j, serialize as s };
1466
- //# sourceMappingURL=index-ZIegYNKT.mjs.map
1466
+ //# sourceMappingURL=index-Do-zNOpD.mjs.map