@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.
- package/es/app/app.d.ts +7 -7
- package/es/app/index.d.ts +1 -1
- package/es/applicationManager/application.d.ts +2 -2
- package/es/cmd/const.d.ts +5 -5
- package/es/hooks/useStore/index.d.ts +1 -1
- package/es/indexDB/index.d.ts +2 -2
- package/es/indexDB/index.js +633 -572
- package/es/locales/type.d.ts +3 -3
- package/es/logger/index.d.ts +1 -1
- package/es/models/index.d.ts +4 -4
- package/es/pubsub/index.d.ts +1 -1
- package/es/request/cache.d.ts +1 -1
- package/es/request/pisell2Request.d.ts +1 -1
- package/es/request/type.d.ts +1 -1
- package/es/routes/index.d.ts +2 -2
- package/es/socket/monitor.js +2 -0
- package/es/socket/types.d.ts +4 -3
- package/es/tasks/index.d.ts +0 -1
- package/es/tasks/index.js +0 -1
- package/es/tasks/type.d.ts +4 -4
- package/es/variables/index.d.ts +3 -3
- package/lib/app/app.d.ts +7 -7
- package/lib/app/app.js +21 -51
- package/lib/app/index.d.ts +1 -1
- package/lib/applicationManager/application.d.ts +2 -2
- package/lib/applicationManager/application.js +6 -12
- package/lib/applicationManager/index.js +4 -2
- package/lib/aws/index.js +0 -3
- package/lib/cmd/const.d.ts +5 -5
- package/lib/cmd/const.js +5 -5
- package/lib/cmd/index.js +0 -2
- package/lib/cookie/index.js +4 -2
- package/lib/data/index.js +0 -3
- package/lib/history/index.js +22 -24
- package/lib/hooks/useStore/index.d.ts +1 -1
- package/lib/indexDB/index.d.ts +2 -2
- package/lib/indexDB/index.js +233 -327
- package/lib/locales/index.js +94 -95
- package/lib/locales/type.d.ts +3 -3
- package/lib/logger/index.d.ts +1 -1
- package/lib/logger/index.js +8 -18
- package/lib/menuManager/index.js +12 -9
- package/lib/models/index.d.ts +4 -4
- package/lib/pubsub/index.d.ts +1 -1
- package/lib/pubsub/index.js +3 -1
- package/lib/request/cache.d.ts +1 -1
- package/lib/request/pisell2Request.d.ts +1 -1
- package/lib/request/type.d.ts +1 -1
- package/lib/routes/index.d.ts +2 -2
- package/lib/routes/index.js +1 -3
- package/lib/socket/components/SocketMonitorPage.js +12 -6
- package/lib/socket/heartbeat.js +5 -10
- package/lib/socket/index.js +3 -1
- package/lib/socket/monitor.js +26 -26
- package/lib/socket/reconnect.js +3 -10
- package/lib/socket/socket.js +10 -12
- package/lib/socket/types.d.ts +4 -3
- package/lib/storage/index.js +24 -25
- package/lib/tasks/index.d.ts +0 -1
- package/lib/tasks/index.js +329 -334
- package/lib/tasks/type.d.ts +4 -4
- package/lib/variables/index.d.ts +3 -3
- package/package.json +3 -2
package/lib/storage/index.js
CHANGED
|
@@ -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 = {
|