@buoy-gg/storage 7.0.6 → 7.0.8
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/lib/typescript/storage/sync/storageSyncAdapter.d.ts +1 -1
- package/package.json +5 -5
- package/lib/commonjs/storage/components/GameUIStorageStats.js +0 -746
- package/lib/commonjs/storage/components/StorageActions.js +0 -178
- package/lib/commonjs/storage/components/StorageEventListener.js +0 -357
- package/lib/commonjs/storage/components/StorageFilterViewV2.js +0 -42
- package/lib/commonjs/storage/hooks/useMeasuredWidth.js +0 -74
- package/lib/commonjs/storage/hooks/useTickEverySecond.js +0 -21
- package/lib/commonjs/storage/index.js +0 -258
- package/lib/commonjs/storage/utils/index.js +0 -230
- package/lib/commonjs/storage/utils/objectDiff.js +0 -157
- package/lib/commonjs/storage/utils/safeAsyncStorage.js +0 -140
- package/lib/module/storage/components/GameUIStorageStats.js +0 -743
- package/lib/module/storage/components/StorageActions.js +0 -174
- package/lib/module/storage/components/StorageEventListener.js +0 -354
- package/lib/module/storage/components/StorageFilterViewV2.js +0 -38
- package/lib/module/storage/hooks/useMeasuredWidth.js +0 -71
- package/lib/module/storage/hooks/useTickEverySecond.js +0 -18
- package/lib/module/storage/index.js +0 -34
- package/lib/module/storage/utils/index.js +0 -28
- package/lib/module/storage/utils/objectDiff.js +0 -153
- package/lib/module/storage/utils/safeAsyncStorage.js +0 -134
- package/lib/typescript/storage/components/GameUIStorageStats.d.ts +0 -7
- package/lib/typescript/storage/components/GameUIStorageStats.d.ts.map +0 -1
- package/lib/typescript/storage/components/StorageActions.d.ts +0 -10
- package/lib/typescript/storage/components/StorageActions.d.ts.map +0 -1
- package/lib/typescript/storage/components/StorageEventListener.d.ts +0 -6
- package/lib/typescript/storage/components/StorageEventListener.d.ts.map +0 -1
- package/lib/typescript/storage/components/StorageFilterViewV2.d.ts +0 -9
- package/lib/typescript/storage/components/StorageFilterViewV2.d.ts.map +0 -1
- package/lib/typescript/storage/hooks/useMeasuredWidth.d.ts +0 -37
- package/lib/typescript/storage/hooks/useMeasuredWidth.d.ts.map +0 -1
- package/lib/typescript/storage/hooks/useTickEverySecond.d.ts +0 -6
- package/lib/typescript/storage/hooks/useTickEverySecond.d.ts.map +0 -1
- package/lib/typescript/storage/index.d.ts +0 -21
- package/lib/typescript/storage/index.d.ts.map +0 -1
- package/lib/typescript/storage/utils/index.d.ts +0 -10
- package/lib/typescript/storage/utils/index.d.ts.map +0 -1
- package/lib/typescript/storage/utils/objectDiff.d.ts +0 -35
- package/lib/typescript/storage/utils/objectDiff.d.ts.map +0 -1
- package/lib/typescript/storage/utils/safeAsyncStorage.d.ts +0 -56
- package/lib/typescript/storage/utils/safeAsyncStorage.d.ts.map +0 -1
|
@@ -1,258 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _exportNames = {
|
|
7
|
-
StorageSection: true,
|
|
8
|
-
StorageModalWithTabs: true,
|
|
9
|
-
StorageKeyCard: true,
|
|
10
|
-
StorageKeyStatsSection: true,
|
|
11
|
-
StorageKeySection: true,
|
|
12
|
-
StorageBrowserMode: true,
|
|
13
|
-
StorageEventsSection: true,
|
|
14
|
-
STORAGE_OPS: true,
|
|
15
|
-
storageOpOf: true,
|
|
16
|
-
storageOpDot: true,
|
|
17
|
-
isInitialScan: true,
|
|
18
|
-
StorageEventCard: true,
|
|
19
|
-
getValueType: true,
|
|
20
|
-
StorageEventDetailContent: true,
|
|
21
|
-
StorageEventDetailFooter: true,
|
|
22
|
-
useAsyncStorageKeys: true,
|
|
23
|
-
useMMKVKeys: true,
|
|
24
|
-
useMultiMMKVKeys: true,
|
|
25
|
-
useMMKVInstances: true,
|
|
26
|
-
useMMKVInstance: true,
|
|
27
|
-
useMMKVInstanceExists: true,
|
|
28
|
-
useStorageEvents: true,
|
|
29
|
-
MMKVInstanceSelector: true,
|
|
30
|
-
MMKVInstanceInfoPanel: true,
|
|
31
|
-
storageEventStore: true,
|
|
32
|
-
subscribeToStorageEvents: true,
|
|
33
|
-
onStorageEvent: true,
|
|
34
|
-
getStorageEvents: true,
|
|
35
|
-
clearStorageEvents: true,
|
|
36
|
-
isStorageCapturing: true
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "MMKVInstanceInfoPanel", {
|
|
39
|
-
enumerable: true,
|
|
40
|
-
get: function () {
|
|
41
|
-
return _MMKVInstanceInfoPanel.MMKVInstanceInfoPanel;
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
Object.defineProperty(exports, "MMKVInstanceSelector", {
|
|
45
|
-
enumerable: true,
|
|
46
|
-
get: function () {
|
|
47
|
-
return _MMKVInstanceSelector.MMKVInstanceSelector;
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
Object.defineProperty(exports, "STORAGE_OPS", {
|
|
51
|
-
enumerable: true,
|
|
52
|
-
get: function () {
|
|
53
|
-
return _storageOps.STORAGE_OPS;
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
Object.defineProperty(exports, "StorageBrowserMode", {
|
|
57
|
-
enumerable: true,
|
|
58
|
-
get: function () {
|
|
59
|
-
return _StorageBrowserMode.StorageBrowserMode;
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
Object.defineProperty(exports, "StorageEventCard", {
|
|
63
|
-
enumerable: true,
|
|
64
|
-
get: function () {
|
|
65
|
-
return _StorageEventCard.StorageEventCard;
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
Object.defineProperty(exports, "StorageEventDetailContent", {
|
|
69
|
-
enumerable: true,
|
|
70
|
-
get: function () {
|
|
71
|
-
return _StorageEventDetailContent.StorageEventDetailContent;
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
Object.defineProperty(exports, "StorageEventDetailFooter", {
|
|
75
|
-
enumerable: true,
|
|
76
|
-
get: function () {
|
|
77
|
-
return _StorageEventDetailContent.StorageEventDetailFooter;
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
Object.defineProperty(exports, "StorageEventsSection", {
|
|
81
|
-
enumerable: true,
|
|
82
|
-
get: function () {
|
|
83
|
-
return _StorageEventsSection.StorageEventsSection;
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
Object.defineProperty(exports, "StorageKeyCard", {
|
|
87
|
-
enumerable: true,
|
|
88
|
-
get: function () {
|
|
89
|
-
return _StorageKeyCard.StorageKeyCard;
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
Object.defineProperty(exports, "StorageKeySection", {
|
|
93
|
-
enumerable: true,
|
|
94
|
-
get: function () {
|
|
95
|
-
return _StorageKeySection.StorageKeySection;
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
Object.defineProperty(exports, "StorageKeyStatsSection", {
|
|
99
|
-
enumerable: true,
|
|
100
|
-
get: function () {
|
|
101
|
-
return _StorageKeyStats.StorageKeyStatsSection;
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
Object.defineProperty(exports, "StorageModalWithTabs", {
|
|
105
|
-
enumerable: true,
|
|
106
|
-
get: function () {
|
|
107
|
-
return _StorageModalWithTabs.StorageModalWithTabs;
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
Object.defineProperty(exports, "StorageSection", {
|
|
111
|
-
enumerable: true,
|
|
112
|
-
get: function () {
|
|
113
|
-
return _StorageSection.StorageSection;
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
Object.defineProperty(exports, "clearStorageEvents", {
|
|
117
|
-
enumerable: true,
|
|
118
|
-
get: function () {
|
|
119
|
-
return _storageEventStore.clearStorageEvents;
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
Object.defineProperty(exports, "getStorageEvents", {
|
|
123
|
-
enumerable: true,
|
|
124
|
-
get: function () {
|
|
125
|
-
return _storageEventStore.getStorageEvents;
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
Object.defineProperty(exports, "getValueType", {
|
|
129
|
-
enumerable: true,
|
|
130
|
-
get: function () {
|
|
131
|
-
return _StorageEventCard.getValueType;
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
Object.defineProperty(exports, "isInitialScan", {
|
|
135
|
-
enumerable: true,
|
|
136
|
-
get: function () {
|
|
137
|
-
return _storageOps.isInitialScan;
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
Object.defineProperty(exports, "isStorageCapturing", {
|
|
141
|
-
enumerable: true,
|
|
142
|
-
get: function () {
|
|
143
|
-
return _storageEventStore.isStorageCapturing;
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
Object.defineProperty(exports, "onStorageEvent", {
|
|
147
|
-
enumerable: true,
|
|
148
|
-
get: function () {
|
|
149
|
-
return _storageEventStore.onStorageEvent;
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
Object.defineProperty(exports, "storageEventStore", {
|
|
153
|
-
enumerable: true,
|
|
154
|
-
get: function () {
|
|
155
|
-
return _storageEventStore.storageEventStore;
|
|
156
|
-
}
|
|
157
|
-
});
|
|
158
|
-
Object.defineProperty(exports, "storageOpDot", {
|
|
159
|
-
enumerable: true,
|
|
160
|
-
get: function () {
|
|
161
|
-
return _storageOps.storageOpDot;
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
Object.defineProperty(exports, "storageOpOf", {
|
|
165
|
-
enumerable: true,
|
|
166
|
-
get: function () {
|
|
167
|
-
return _storageOps.storageOpOf;
|
|
168
|
-
}
|
|
169
|
-
});
|
|
170
|
-
Object.defineProperty(exports, "subscribeToStorageEvents", {
|
|
171
|
-
enumerable: true,
|
|
172
|
-
get: function () {
|
|
173
|
-
return _storageEventStore.subscribeToStorageEvents;
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
|
-
Object.defineProperty(exports, "useAsyncStorageKeys", {
|
|
177
|
-
enumerable: true,
|
|
178
|
-
get: function () {
|
|
179
|
-
return _useAsyncStorageKeys.useAsyncStorageKeys;
|
|
180
|
-
}
|
|
181
|
-
});
|
|
182
|
-
Object.defineProperty(exports, "useMMKVInstance", {
|
|
183
|
-
enumerable: true,
|
|
184
|
-
get: function () {
|
|
185
|
-
return _useMMKVInstances.useMMKVInstance;
|
|
186
|
-
}
|
|
187
|
-
});
|
|
188
|
-
Object.defineProperty(exports, "useMMKVInstanceExists", {
|
|
189
|
-
enumerable: true,
|
|
190
|
-
get: function () {
|
|
191
|
-
return _useMMKVInstances.useMMKVInstanceExists;
|
|
192
|
-
}
|
|
193
|
-
});
|
|
194
|
-
Object.defineProperty(exports, "useMMKVInstances", {
|
|
195
|
-
enumerable: true,
|
|
196
|
-
get: function () {
|
|
197
|
-
return _useMMKVInstances.useMMKVInstances;
|
|
198
|
-
}
|
|
199
|
-
});
|
|
200
|
-
Object.defineProperty(exports, "useMMKVKeys", {
|
|
201
|
-
enumerable: true,
|
|
202
|
-
get: function () {
|
|
203
|
-
return _useMMKVKeys.useMMKVKeys;
|
|
204
|
-
}
|
|
205
|
-
});
|
|
206
|
-
Object.defineProperty(exports, "useMultiMMKVKeys", {
|
|
207
|
-
enumerable: true,
|
|
208
|
-
get: function () {
|
|
209
|
-
return _useMMKVKeys.useMultiMMKVKeys;
|
|
210
|
-
}
|
|
211
|
-
});
|
|
212
|
-
Object.defineProperty(exports, "useStorageEvents", {
|
|
213
|
-
enumerable: true,
|
|
214
|
-
get: function () {
|
|
215
|
-
return _useStorageEvents.useStorageEvents;
|
|
216
|
-
}
|
|
217
|
-
});
|
|
218
|
-
var _StorageSection = require("./components/StorageSection");
|
|
219
|
-
var _StorageModalWithTabs = require("./components/StorageModalWithTabs");
|
|
220
|
-
var _StorageKeyCard = require("./components/StorageKeyCard");
|
|
221
|
-
var _StorageKeyStats = require("./components/StorageKeyStats");
|
|
222
|
-
var _StorageKeySection = require("./components/StorageKeySection");
|
|
223
|
-
var _StorageBrowserMode = require("./components/StorageBrowserMode");
|
|
224
|
-
var _StorageEventsSection = require("./components/StorageEventsSection");
|
|
225
|
-
var _storageOps = require("./utils/storageOps");
|
|
226
|
-
var _StorageEventCard = require("./components/StorageEventCard");
|
|
227
|
-
var _StorageEventDetailContent = require("./components/StorageEventDetailContent");
|
|
228
|
-
var _useAsyncStorageKeys = require("./hooks/useAsyncStorageKeys");
|
|
229
|
-
var _useMMKVKeys = require("./hooks/useMMKVKeys");
|
|
230
|
-
var _useMMKVInstances = require("./hooks/useMMKVInstances");
|
|
231
|
-
var _useStorageEvents = require("./hooks/useStorageEvents");
|
|
232
|
-
var _MMKVInstanceSelector = require("./components/MMKVInstanceSelector");
|
|
233
|
-
var _MMKVInstanceInfoPanel = require("./components/MMKVInstanceInfoPanel");
|
|
234
|
-
var _types = require("./types");
|
|
235
|
-
Object.keys(_types).forEach(function (key) {
|
|
236
|
-
if (key === "default" || key === "__esModule") return;
|
|
237
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
238
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
239
|
-
Object.defineProperty(exports, key, {
|
|
240
|
-
enumerable: true,
|
|
241
|
-
get: function () {
|
|
242
|
-
return _types[key];
|
|
243
|
-
}
|
|
244
|
-
});
|
|
245
|
-
});
|
|
246
|
-
var _utils = require("./utils");
|
|
247
|
-
Object.keys(_utils).forEach(function (key) {
|
|
248
|
-
if (key === "default" || key === "__esModule") return;
|
|
249
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
250
|
-
if (key in exports && exports[key] === _utils[key]) return;
|
|
251
|
-
Object.defineProperty(exports, key, {
|
|
252
|
-
enumerable: true,
|
|
253
|
-
get: function () {
|
|
254
|
-
return _utils[key];
|
|
255
|
-
}
|
|
256
|
-
});
|
|
257
|
-
});
|
|
258
|
-
var _storageEventStore = require("./stores/storageEventStore");
|
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "addListener", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _AsyncStorageListener.addListener;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "addMMKVInstance", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _MMKVListener.addMMKVInstance;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "addMMKVListener", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return _MMKVListener.addMMKVListener;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "asyncStorageListener", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function () {
|
|
27
|
-
return _AsyncStorageListener.default;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, "canUndo", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function () {
|
|
33
|
-
return _storageTimeTravelUtils.canUndo;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, "clearAllAppStorage", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function () {
|
|
39
|
-
return _clearAllStorage.clearAllAppStorage;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
Object.defineProperty(exports, "detectMMKVType", {
|
|
43
|
-
enumerable: true,
|
|
44
|
-
get: function () {
|
|
45
|
-
return _mmkvTypeDetection.detectMMKVType;
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
Object.defineProperty(exports, "formatMMKVValue", {
|
|
49
|
-
enumerable: true,
|
|
50
|
-
get: function () {
|
|
51
|
-
return _mmkvTypeDetection.formatMMKVValue;
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
Object.defineProperty(exports, "getListenerCount", {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function () {
|
|
57
|
-
return _AsyncStorageListener.getListenerCount;
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
Object.defineProperty(exports, "getMMKVClass", {
|
|
61
|
-
enumerable: true,
|
|
62
|
-
get: function () {
|
|
63
|
-
return _mmkvAvailability.getMMKVClass;
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
Object.defineProperty(exports, "getMMKVInstanceCount", {
|
|
67
|
-
enumerable: true,
|
|
68
|
-
get: function () {
|
|
69
|
-
return _MMKVListener.getMMKVInstanceCount;
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
Object.defineProperty(exports, "getMMKVListenerCount", {
|
|
73
|
-
enumerable: true,
|
|
74
|
-
get: function () {
|
|
75
|
-
return _MMKVListener.getMMKVListenerCount;
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
Object.defineProperty(exports, "getMMKVUnavailableMessage", {
|
|
79
|
-
enumerable: true,
|
|
80
|
-
get: function () {
|
|
81
|
-
return _mmkvAvailability.getMMKVUnavailableMessage;
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
Object.defineProperty(exports, "getMonitoredMMKVInstances", {
|
|
85
|
-
enumerable: true,
|
|
86
|
-
get: function () {
|
|
87
|
-
return _MMKVListener.getMonitoredMMKVInstances;
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
Object.defineProperty(exports, "isListening", {
|
|
91
|
-
enumerable: true,
|
|
92
|
-
get: function () {
|
|
93
|
-
return _AsyncStorageListener.isListening;
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
Object.defineProperty(exports, "isMMKVAvailable", {
|
|
97
|
-
enumerable: true,
|
|
98
|
-
get: function () {
|
|
99
|
-
return _mmkvAvailability.isMMKVAvailable;
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
Object.defineProperty(exports, "isMMKVInstanceMonitored", {
|
|
103
|
-
enumerable: true,
|
|
104
|
-
get: function () {
|
|
105
|
-
return _MMKVListener.isMMKVInstanceMonitored;
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
Object.defineProperty(exports, "isMMKVListening", {
|
|
109
|
-
enumerable: true,
|
|
110
|
-
get: function () {
|
|
111
|
-
return _MMKVListener.isMMKVListening;
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
Object.defineProperty(exports, "isPaused", {
|
|
115
|
-
enumerable: true,
|
|
116
|
-
get: function () {
|
|
117
|
-
return _AsyncStorageListener.isPaused;
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
Object.defineProperty(exports, "isTypeMatch", {
|
|
121
|
-
enumerable: true,
|
|
122
|
-
get: function () {
|
|
123
|
-
return _mmkvTypeDetection.isTypeMatch;
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
Object.defineProperty(exports, "jumpToState", {
|
|
127
|
-
enumerable: true,
|
|
128
|
-
get: function () {
|
|
129
|
-
return _storageTimeTravelUtils.jumpToState;
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
Object.defineProperty(exports, "mmkvInstanceRegistry", {
|
|
133
|
-
enumerable: true,
|
|
134
|
-
get: function () {
|
|
135
|
-
return _MMKVInstanceRegistry.mmkvInstanceRegistry;
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
Object.defineProperty(exports, "mmkvListener", {
|
|
139
|
-
enumerable: true,
|
|
140
|
-
get: function () {
|
|
141
|
-
return _MMKVListener.mmkvListener;
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
Object.defineProperty(exports, "onStorageBrowserRefresh", {
|
|
145
|
-
enumerable: true,
|
|
146
|
-
get: function () {
|
|
147
|
-
return _storageBrowserRefresh.onStorageBrowserRefresh;
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
Object.defineProperty(exports, "pauseCapture", {
|
|
151
|
-
enumerable: true,
|
|
152
|
-
get: function () {
|
|
153
|
-
return _AsyncStorageListener.pauseCapture;
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
Object.defineProperty(exports, "registerMMKVInstance", {
|
|
157
|
-
enumerable: true,
|
|
158
|
-
get: function () {
|
|
159
|
-
return _MMKVInstanceRegistry.registerMMKVInstance;
|
|
160
|
-
}
|
|
161
|
-
});
|
|
162
|
-
Object.defineProperty(exports, "removeAllListeners", {
|
|
163
|
-
enumerable: true,
|
|
164
|
-
get: function () {
|
|
165
|
-
return _AsyncStorageListener.removeAllListeners;
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
Object.defineProperty(exports, "removeAllMMKVInstances", {
|
|
169
|
-
enumerable: true,
|
|
170
|
-
get: function () {
|
|
171
|
-
return _MMKVListener.removeAllMMKVInstances;
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
|
-
Object.defineProperty(exports, "removeAllMMKVListeners", {
|
|
175
|
-
enumerable: true,
|
|
176
|
-
get: function () {
|
|
177
|
-
return _MMKVListener.removeAllMMKVListeners;
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
|
-
Object.defineProperty(exports, "removeMMKVInstance", {
|
|
181
|
-
enumerable: true,
|
|
182
|
-
get: function () {
|
|
183
|
-
return _MMKVListener.removeMMKVInstance;
|
|
184
|
-
}
|
|
185
|
-
});
|
|
186
|
-
Object.defineProperty(exports, "requestStorageBrowserRefresh", {
|
|
187
|
-
enumerable: true,
|
|
188
|
-
get: function () {
|
|
189
|
-
return _storageBrowserRefresh.requestStorageBrowserRefresh;
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
Object.defineProperty(exports, "resumeCapture", {
|
|
193
|
-
enumerable: true,
|
|
194
|
-
get: function () {
|
|
195
|
-
return _AsyncStorageListener.resumeCapture;
|
|
196
|
-
}
|
|
197
|
-
});
|
|
198
|
-
Object.defineProperty(exports, "startListening", {
|
|
199
|
-
enumerable: true,
|
|
200
|
-
get: function () {
|
|
201
|
-
return _AsyncStorageListener.startListening;
|
|
202
|
-
}
|
|
203
|
-
});
|
|
204
|
-
Object.defineProperty(exports, "stopListening", {
|
|
205
|
-
enumerable: true,
|
|
206
|
-
get: function () {
|
|
207
|
-
return _AsyncStorageListener.stopListening;
|
|
208
|
-
}
|
|
209
|
-
});
|
|
210
|
-
Object.defineProperty(exports, "undoOperation", {
|
|
211
|
-
enumerable: true,
|
|
212
|
-
get: function () {
|
|
213
|
-
return _storageTimeTravelUtils.undoOperation;
|
|
214
|
-
}
|
|
215
|
-
});
|
|
216
|
-
Object.defineProperty(exports, "unregisterMMKVInstance", {
|
|
217
|
-
enumerable: true,
|
|
218
|
-
get: function () {
|
|
219
|
-
return _MMKVInstanceRegistry.unregisterMMKVInstance;
|
|
220
|
-
}
|
|
221
|
-
});
|
|
222
|
-
var _clearAllStorage = require("./clearAllStorage");
|
|
223
|
-
var _mmkvAvailability = require("./mmkvAvailability");
|
|
224
|
-
var _AsyncStorageListener = _interopRequireWildcard(require("./AsyncStorageListener"));
|
|
225
|
-
var _storageTimeTravelUtils = require("./storageTimeTravelUtils");
|
|
226
|
-
var _MMKVInstanceRegistry = require("./MMKVInstanceRegistry");
|
|
227
|
-
var _MMKVListener = require("./MMKVListener");
|
|
228
|
-
var _storageBrowserRefresh = require("./storageBrowserRefresh");
|
|
229
|
-
var _mmkvTypeDetection = require("./mmkvTypeDetection");
|
|
230
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.objectDiff = objectDiff;
|
|
7
|
-
/**
|
|
8
|
-
* Type guard to check if a value is a plain object (not array or null)
|
|
9
|
-
*
|
|
10
|
-
* @param obj - Value to check
|
|
11
|
-
* @returns True if the value is a plain object
|
|
12
|
-
*/
|
|
13
|
-
function isObject(obj) {
|
|
14
|
-
return obj !== null && typeof obj === "object" && !Array.isArray(obj);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Type guard to check if a value is an array
|
|
19
|
-
*
|
|
20
|
-
* @param obj - Value to check
|
|
21
|
-
* @returns True if the value is an array
|
|
22
|
-
*/
|
|
23
|
-
function isArray(obj) {
|
|
24
|
-
return Array.isArray(obj);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Recursively compare two values and collect differences
|
|
29
|
-
*
|
|
30
|
-
* This function handles deep comparison of objects, arrays, and primitive values,
|
|
31
|
-
* building a comprehensive diff that tracks the exact path of each change.
|
|
32
|
-
*
|
|
33
|
-
* @param oldVal - The original value to compare from
|
|
34
|
-
* @param newVal - The new value to compare to
|
|
35
|
-
* @param path - Current path in the object structure (for nested properties)
|
|
36
|
-
* @param diffs - Array to collect difference items
|
|
37
|
-
*
|
|
38
|
-
* @performance Uses recursive traversal with path tracking for memory efficiency
|
|
39
|
-
* @performance Handles large nested structures without stack overflow concerns for typical use cases
|
|
40
|
-
*/
|
|
41
|
-
function compareValues(oldVal, newVal, path, diffs) {
|
|
42
|
-
// Both are objects
|
|
43
|
-
if (isObject(oldVal) && isObject(newVal)) {
|
|
44
|
-
const allKeys = new Set([...Object.keys(oldVal), ...Object.keys(newVal)]);
|
|
45
|
-
for (const key of allKeys) {
|
|
46
|
-
const newPath = [...path, key];
|
|
47
|
-
if (!(key in oldVal)) {
|
|
48
|
-
// Key was added
|
|
49
|
-
diffs.push({
|
|
50
|
-
type: "CREATE",
|
|
51
|
-
path: newPath,
|
|
52
|
-
value: newVal[key]
|
|
53
|
-
});
|
|
54
|
-
} else if (!(key in newVal)) {
|
|
55
|
-
// Key was removed
|
|
56
|
-
diffs.push({
|
|
57
|
-
type: "REMOVE",
|
|
58
|
-
path: newPath,
|
|
59
|
-
oldValue: oldVal[key]
|
|
60
|
-
});
|
|
61
|
-
} else {
|
|
62
|
-
// Key exists in both, compare values
|
|
63
|
-
compareValues(oldVal[key], newVal[key], newPath, diffs);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
// Both are arrays
|
|
68
|
-
else if (isArray(oldVal) && isArray(newVal)) {
|
|
69
|
-
const maxLength = Math.max(oldVal.length, newVal.length);
|
|
70
|
-
for (let i = 0; i < maxLength; i++) {
|
|
71
|
-
const newPath = [...path, i];
|
|
72
|
-
if (i >= oldVal.length) {
|
|
73
|
-
// Item was added
|
|
74
|
-
diffs.push({
|
|
75
|
-
type: "CREATE",
|
|
76
|
-
path: newPath,
|
|
77
|
-
value: newVal[i]
|
|
78
|
-
});
|
|
79
|
-
} else if (i >= newVal.length) {
|
|
80
|
-
// Item was removed
|
|
81
|
-
diffs.push({
|
|
82
|
-
type: "REMOVE",
|
|
83
|
-
path: newPath,
|
|
84
|
-
oldValue: oldVal[i]
|
|
85
|
-
});
|
|
86
|
-
} else {
|
|
87
|
-
// Item exists in both, compare values
|
|
88
|
-
compareValues(oldVal[i], newVal[i], newPath, diffs);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
// Values are different types or primitives
|
|
93
|
-
else if (oldVal !== newVal) {
|
|
94
|
-
diffs.push({
|
|
95
|
-
type: "CHANGE",
|
|
96
|
-
path,
|
|
97
|
-
oldValue: oldVal,
|
|
98
|
-
value: newVal
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Generate a comprehensive diff between two objects or values
|
|
105
|
-
*
|
|
106
|
-
* This function performs a deep comparison between two values and returns
|
|
107
|
-
* a detailed list of all differences, including additions, removals, and changes.
|
|
108
|
-
* Each difference includes the exact path where the change occurred.
|
|
109
|
-
*
|
|
110
|
-
* @param oldObj - The original object/value to compare from
|
|
111
|
-
* @param newObj - The new object/value to compare to
|
|
112
|
-
* @returns Array of DiffItem objects describing all differences
|
|
113
|
-
*
|
|
114
|
-
* @example
|
|
115
|
-
* ```typescript
|
|
116
|
-
* const oldData = { user: { name: "John", age: 30 }, items: [1, 2] };
|
|
117
|
-
* const newData = { user: { name: "Jane", age: 30 }, items: [1, 2, 3] };
|
|
118
|
-
*
|
|
119
|
-
* const diffs = objectDiff(oldData, newData);
|
|
120
|
-
* // Returns:
|
|
121
|
-
* // [
|
|
122
|
-
* // { type: "CHANGE", path: ["user", "name"], oldValue: "John", value: "Jane" },
|
|
123
|
-
* // { type: "CREATE", path: ["items", 2], value: 3 }
|
|
124
|
-
* // ]
|
|
125
|
-
* ```
|
|
126
|
-
*
|
|
127
|
-
* @performance Handles circular references and deep nesting efficiently
|
|
128
|
-
* @performance Uses Set for key deduplication to optimize comparison speed
|
|
129
|
-
*/
|
|
130
|
-
function objectDiff(oldObj, newObj) {
|
|
131
|
-
const diffs = [];
|
|
132
|
-
|
|
133
|
-
// Handle null/undefined cases
|
|
134
|
-
if (oldObj === newObj) {
|
|
135
|
-
return diffs;
|
|
136
|
-
}
|
|
137
|
-
if (oldObj === null || oldObj === undefined) {
|
|
138
|
-
if (newObj !== null && newObj !== undefined) {
|
|
139
|
-
diffs.push({
|
|
140
|
-
type: "CREATE",
|
|
141
|
-
path: [],
|
|
142
|
-
value: newObj
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
return diffs;
|
|
146
|
-
}
|
|
147
|
-
if (newObj === null || newObj === undefined) {
|
|
148
|
-
diffs.push({
|
|
149
|
-
type: "REMOVE",
|
|
150
|
-
path: [],
|
|
151
|
-
oldValue: oldObj
|
|
152
|
-
});
|
|
153
|
-
return diffs;
|
|
154
|
-
}
|
|
155
|
-
compareValues(oldObj, newObj, [], diffs);
|
|
156
|
-
return diffs;
|
|
157
|
-
}
|