proto.io 0.0.144 → 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 (44) 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-C-Zg_JPT.js → index-CT01T3qs.js} +13 -18
  32. package/dist/internals/index-CT01T3qs.js.map +1 -0
  33. package/dist/internals/{index-_rUXjdeW.mjs → index-Do-zNOpD.mjs} +13 -18
  34. package/dist/internals/index-Do-zNOpD.mjs.map +1 -0
  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-C-Zg_JPT.js.map +0 -1
  41. package/dist/internals/index-DW9_3n_K.d.ts.map +0 -1
  42. package/dist/internals/index-DWyLziGT.d.ts.map +0 -1
  43. package/dist/internals/index-_rUXjdeW.mjs.map +0 -1
  44. package/dist/internals/index-i4lOAqi2.d.ts.map +0 -1
package/dist/index.mjs CHANGED
@@ -3,8 +3,8 @@ import { Server } from '@o2ter/server-js';
3
3
  import { Q as QueryValidator, g as generateId } from './internals/random-BjV_01xP.mjs';
4
4
  import { P as PVK } from './internals/private-BUpLAMZi.mjs';
5
5
  import { asyncStream, asyncIterableToArray, isBinaryData, base64ToBuffer } from '@o2ter/utils-js';
6
- import { T as TQuery, M as MASTER_USER_HEADER_NAME, a as MASTER_PASS_HEADER_NAME, A as AUTH_COOKIE_KEY, b as TUser, P as ProtoType, s as serialize, d as deserialize, U as UPLOAD_TOKEN_HEADER_NAME } from './internals/index-_rUXjdeW.mjs';
7
- export { c as ProtoClient, e as classExtends, j as isFile, f as isObject, i as isQuery, h as isRole, g as isUser } from './internals/index-_rUXjdeW.mjs';
6
+ import { T as TQuery, M as MASTER_USER_HEADER_NAME, a as MASTER_PASS_HEADER_NAME, A as AUTH_COOKIE_KEY, b as TUser, P as ProtoType, s as serialize, d as deserialize, U as UPLOAD_TOKEN_HEADER_NAME } from './internals/index-Do-zNOpD.mjs';
7
+ export { c as ProtoClient, e as classExtends, j as isFile, f as isObject, i as isQuery, h as isRole, g as isUser } from './internals/index-Do-zNOpD.mjs';
8
8
  import { d as decodeUpdateOp, T as TObject, i as isShape, a as isPointer, b as isRelation, c as defaultObjectKeyTypes, e as isPrimitive } from './internals/index-EOtjV6U_.mjs';
9
9
  import jwt from 'jsonwebtoken';
10
10
  import { Blob } from 'node:buffer';
@@ -918,7 +918,7 @@ class ProtoInternal {
918
918
  return object;
919
919
  }
920
920
  catch (e) {
921
- this.destoryFileData(proto, file._id);
921
+ this.destroyFileData(proto, file._id);
922
922
  throw e;
923
923
  }
924
924
  }
@@ -956,7 +956,7 @@ class ProtoInternal {
956
956
  object[PVK].mutated = {};
957
957
  object[PVK].extra = {};
958
958
  }
959
- this.destoryFileData(proto, object.token);
959
+ this.destroyFileData(proto, object.token);
960
960
  if (_.isFunction(afterDelete)) {
961
961
  await afterDelete(proxy(Object.setPrototypeOf({ object, context }, proto)));
962
962
  }
@@ -972,10 +972,10 @@ class ProtoInternal {
972
972
  }
973
973
  });
974
974
  }
975
- destoryFileData(proto, id) {
975
+ destroyFileData(proto, id) {
976
976
  (async () => {
977
977
  try {
978
- await proto.fileStorage.destory(proto, id);
978
+ await proto.fileStorage.destroy(proto, id);
979
979
  }
980
980
  catch (e) {
981
981
  console.error(e);
@@ -1199,7 +1199,7 @@ const scheduleOp = {
1199
1199
  for await (const item of found) {
1200
1200
  const token = item.get('token');
1201
1201
  if (!_.isEmpty(token))
1202
- await proto.fileStorage.destory(proto, token);
1202
+ await proto.fileStorage.destroy(proto, token);
1203
1203
  }
1204
1204
  }
1205
1205
  await proto.storage.deleteMany({
@@ -1233,7 +1233,7 @@ const schedule = (proto) => {
1233
1233
  const schedule = setInterval(execute, 60 * 1000);
1234
1234
  return {
1235
1235
  execute,
1236
- destory() { clearInterval(schedule); }
1236
+ destroy() { clearInterval(schedule); }
1237
1237
  };
1238
1238
  };
1239
1239
 
@@ -1295,7 +1295,7 @@ class ProtoService extends ProtoType {
1295
1295
  });
1296
1296
  }
1297
1297
  async shutdown() {
1298
- this._schedule.destory();
1298
+ this._schedule.destroy();
1299
1299
  }
1300
1300
  classes() {
1301
1301
  return _.keys(this[PVK].options.schema);
@@ -1826,7 +1826,7 @@ var filesRoute = (router, proto) => {
1826
1826
  }
1827
1827
  catch (e) {
1828
1828
  if (file?._id)
1829
- proto[PVK].destoryFileData(proto, file._id);
1829
+ proto[PVK].destroyFileData(proto, file._id);
1830
1830
  throw e;
1831
1831
  }
1832
1832
  });