@pisell/core 1.0.33 → 1.0.35

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 (63) hide show
  1. package/es/app/app.d.ts +7 -7
  2. package/es/app/index.d.ts +1 -1
  3. package/es/applicationManager/application.d.ts +2 -2
  4. package/es/cmd/const.d.ts +5 -5
  5. package/es/hooks/useStore/index.d.ts +1 -1
  6. package/es/indexDB/index.d.ts +2 -2
  7. package/es/indexDB/index.js +633 -572
  8. package/es/locales/type.d.ts +3 -3
  9. package/es/logger/index.d.ts +1 -1
  10. package/es/models/index.d.ts +4 -4
  11. package/es/pubsub/index.d.ts +1 -1
  12. package/es/request/cache.d.ts +1 -1
  13. package/es/request/pisell2Request.d.ts +1 -1
  14. package/es/request/type.d.ts +1 -1
  15. package/es/routes/index.d.ts +2 -2
  16. package/es/socket/monitor.js +2 -0
  17. package/es/socket/types.d.ts +4 -3
  18. package/es/tasks/index.d.ts +0 -1
  19. package/es/tasks/index.js +0 -1
  20. package/es/tasks/type.d.ts +4 -4
  21. package/es/variables/index.d.ts +3 -3
  22. package/lib/app/app.d.ts +7 -7
  23. package/lib/app/app.js +21 -51
  24. package/lib/app/index.d.ts +1 -1
  25. package/lib/applicationManager/application.d.ts +2 -2
  26. package/lib/applicationManager/application.js +6 -12
  27. package/lib/applicationManager/index.js +4 -2
  28. package/lib/aws/index.js +0 -3
  29. package/lib/cmd/const.d.ts +5 -5
  30. package/lib/cmd/const.js +5 -5
  31. package/lib/cmd/index.js +0 -2
  32. package/lib/cookie/index.js +4 -2
  33. package/lib/data/index.js +0 -3
  34. package/lib/history/index.js +22 -24
  35. package/lib/hooks/useStore/index.d.ts +1 -1
  36. package/lib/indexDB/index.d.ts +2 -2
  37. package/lib/indexDB/index.js +233 -327
  38. package/lib/locales/index.js +94 -95
  39. package/lib/locales/type.d.ts +3 -3
  40. package/lib/logger/index.d.ts +1 -1
  41. package/lib/logger/index.js +8 -18
  42. package/lib/menuManager/index.js +12 -9
  43. package/lib/models/index.d.ts +4 -4
  44. package/lib/pubsub/index.d.ts +1 -1
  45. package/lib/pubsub/index.js +3 -1
  46. package/lib/request/cache.d.ts +1 -1
  47. package/lib/request/pisell2Request.d.ts +1 -1
  48. package/lib/request/type.d.ts +1 -1
  49. package/lib/routes/index.d.ts +2 -2
  50. package/lib/routes/index.js +1 -3
  51. package/lib/socket/components/SocketMonitorPage.js +12 -6
  52. package/lib/socket/heartbeat.js +5 -10
  53. package/lib/socket/index.js +3 -1
  54. package/lib/socket/monitor.js +26 -26
  55. package/lib/socket/reconnect.js +3 -10
  56. package/lib/socket/socket.js +10 -12
  57. package/lib/socket/types.d.ts +4 -3
  58. package/lib/storage/index.js +24 -25
  59. package/lib/tasks/index.d.ts +0 -1
  60. package/lib/tasks/index.js +329 -334
  61. package/lib/tasks/type.d.ts +4 -4
  62. package/lib/variables/index.d.ts +3 -3
  63. package/package.json +3 -2
@@ -23,10 +23,31 @@ __export(storage_exports, {
23
23
  });
24
24
  module.exports = __toCommonJS(storage_exports);
25
25
  var Storage = class {
26
- storageKey = "CapacitorStorage.native_";
27
- app;
28
- options = {};
29
26
  constructor(app, options) {
27
+ this.storageKey = "CapacitorStorage.native_";
28
+ this.options = {};
29
+ this.createKey = (key) => {
30
+ if (key.indexOf(this.storageKey) !== -1) {
31
+ return key;
32
+ }
33
+ return this.storageKey + key;
34
+ };
35
+ this.setStorage = (key, value) => {
36
+ var _a, _b;
37
+ localStorage.setItem(this.createKey(key), value);
38
+ (_b = (_a = this.options) == null ? void 0 : _a.setStorageAfter) == null ? void 0 : _b.call(_a, key, value);
39
+ };
40
+ this.getStorage = (key) => {
41
+ return localStorage.getItem(this.createKey(key));
42
+ };
43
+ this.removeStorage = (key) => {
44
+ var _a, _b;
45
+ localStorage.removeItem(this.createKey(key));
46
+ (_b = (_a = this.options) == null ? void 0 : _a.removeStorageAfter) == null ? void 0 : _b.call(_a, key);
47
+ };
48
+ this.clear = () => {
49
+ localStorage.clear();
50
+ };
30
51
  this.app = app;
31
52
  if (options) {
32
53
  this.options = options;
@@ -35,28 +56,6 @@ var Storage = class {
35
56
  this.storageKey = options.storageKey;
36
57
  }
37
58
  }
38
- createKey = (key) => {
39
- if (key.indexOf(this.storageKey) !== -1) {
40
- return key;
41
- }
42
- return this.storageKey + key;
43
- };
44
- setStorage = (key, value) => {
45
- var _a, _b;
46
- localStorage.setItem(this.createKey(key), value);
47
- (_b = (_a = this.options) == null ? void 0 : _a.setStorageAfter) == null ? void 0 : _b.call(_a, key, value);
48
- };
49
- getStorage = (key) => {
50
- return localStorage.getItem(this.createKey(key));
51
- };
52
- removeStorage = (key) => {
53
- var _a, _b;
54
- localStorage.removeItem(this.createKey(key));
55
- (_b = (_a = this.options) == null ? void 0 : _a.removeStorageAfter) == null ? void 0 : _b.call(_a, key);
56
- };
57
- clear = () => {
58
- localStorage.clear();
59
- };
60
59
  };
61
60
  // Annotate the CommonJS export names for ESM import in node:
62
61
  0 && (module.exports = {
@@ -34,7 +34,6 @@ export declare class TasksManager {
34
34
  private runTask;
35
35
  /**
36
36
  * @title: 清除任务定时器
37
- * @param {NodeJS.Timeout} timerId
38
37
  */
39
38
  private clearTaskTimer;
40
39
  /**