universe-code 0.0.43 → 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,7 +35,15 @@ export const setDBConfig = ({
35
35
  if (storeName) STORE_NAME = storeName;
36
36
  if (version) DB_VERSION = version;
37
37
 
38
- connectDB();
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
+ });
39
47
  };
40
48
 
41
49
  // ✅ index db connection
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "universe-code",
3
- "version": "0.0.43",
3
+ "version": "0.0.45",
4
4
  "description": "Universal utility functions for all JS frameworks",
5
5
  "license": "ISC",
6
6
  "type": "module",