universe-code 0.0.44 → 0.0.45
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.
|
@@ -9,7 +9,7 @@ let store = null;
|
|
|
9
9
|
let manager = null; // ⬅️ IMPORTANT
|
|
10
10
|
|
|
11
11
|
// ✅ set index db config from outside
|
|
12
|
-
export const setDBConfig = ({
|
|
12
|
+
export const setDBConfig = async ({
|
|
13
13
|
dbName,
|
|
14
14
|
storeName,
|
|
15
15
|
version,
|
|
@@ -35,8 +35,15 @@ export const setDBConfig = ({
|
|
|
35
35
|
if (storeName) STORE_NAME = storeName;
|
|
36
36
|
if (version) DB_VERSION = version;
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
await DB.put(dbName, storeName, {
|
|
39
|
+
id: 'config',
|
|
40
|
+
data: {
|
|
41
|
+
DB_NAME: dbName,
|
|
42
|
+
STORE_NAME: storeName,
|
|
43
|
+
DB_VERSION: version
|
|
44
|
+
},
|
|
45
|
+
timestamp: now
|
|
46
|
+
});
|
|
40
47
|
};
|
|
41
48
|
|
|
42
49
|
// ✅ index db connection
|