@abtnode/blocklet-services 1.8.16 → 1.8.17
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/api/state/index.js +7 -24
- package/api/state/message.js +6 -4
- package/build/asset-manifest.json +5 -5
- package/build/index.html +1 -1
- package/build/static/js/575.ceda4e9e.chunk.js +2 -0
- package/build/static/js/575.ceda4e9e.chunk.js.map +1 -0
- package/build/static/js/main.5cdb1ae7.js +3 -0
- package/build/static/js/{main.699663ce.js.LICENSE.txt → main.5cdb1ae7.js.LICENSE.txt} +0 -0
- package/build/static/js/{main.699663ce.js.map → main.5cdb1ae7.js.map} +1 -1
- package/package.json +29 -28
- package/build/static/js/575.e131ca88.chunk.js +0 -2
- package/build/static/js/575.e131ca88.chunk.js.map +0 -1
- package/build/static/js/main.699663ce.js +0 -3
package/api/state/index.js
CHANGED
|
@@ -1,30 +1,13 @@
|
|
|
1
|
-
const
|
|
2
|
-
const MessageState = require('./message');
|
|
1
|
+
const stateFactory = require('@abtnode/db/lib/factory');
|
|
3
2
|
|
|
4
|
-
const
|
|
3
|
+
const MessageState = require('./message');
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
const messageState = new MessageState(dataDir);
|
|
5
|
+
const init = (dataDir, options) => {
|
|
6
|
+
const messageState = new MessageState(dataDir, options);
|
|
9
7
|
|
|
10
|
-
|
|
8
|
+
return {
|
|
11
9
|
message: messageState,
|
|
12
|
-
}
|
|
10
|
+
};
|
|
13
11
|
};
|
|
14
12
|
|
|
15
|
-
module.exports =
|
|
16
|
-
{},
|
|
17
|
-
{
|
|
18
|
-
get(target, prop) {
|
|
19
|
-
if (prop === 'init') {
|
|
20
|
-
return init;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
if (states[prop] instanceof BaseState) {
|
|
24
|
-
return states[prop];
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
throw new Error(`State ${String(prop)} may not be initialized`);
|
|
28
|
-
},
|
|
29
|
-
}
|
|
30
|
-
);
|
|
13
|
+
module.exports = stateFactory(init);
|
package/api/state/message.js
CHANGED
|
@@ -5,10 +5,12 @@ class MessageState extends BaseState {
|
|
|
5
5
|
constructor(baseDir, options = {}) {
|
|
6
6
|
super(baseDir, { filename: 'message.db', ...options });
|
|
7
7
|
|
|
8
|
-
this.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
this.onReady(() => {
|
|
9
|
+
this.ensureIndex({ fieldName: 'did' }, (error) => {
|
|
10
|
+
if (error) {
|
|
11
|
+
logger.error('ensure index failed', { error });
|
|
12
|
+
}
|
|
13
|
+
});
|
|
12
14
|
});
|
|
13
15
|
}
|
|
14
16
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"files": {
|
|
3
3
|
"main.css": "/.blocklet/proxy/blocklet-service/static/css/main.632501d5.css",
|
|
4
|
-
"main.js": "/.blocklet/proxy/blocklet-service/static/js/main.
|
|
4
|
+
"main.js": "/.blocklet/proxy/blocklet-service/static/js/main.5cdb1ae7.js",
|
|
5
5
|
"static/js/560.60bd29f3.chunk.js": "/.blocklet/proxy/blocklet-service/static/js/560.60bd29f3.chunk.js",
|
|
6
6
|
"static/js/255.a8eba332.chunk.js": "/.blocklet/proxy/blocklet-service/static/js/255.a8eba332.chunk.js",
|
|
7
7
|
"static/js/472.c389b098.chunk.js": "/.blocklet/proxy/blocklet-service/static/js/472.c389b098.chunk.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"static/js/597.7fc9dfe2.chunk.js": "/.blocklet/proxy/blocklet-service/static/js/597.7fc9dfe2.chunk.js",
|
|
13
13
|
"static/js/244.6bfddb66.chunk.js": "/.blocklet/proxy/blocklet-service/static/js/244.6bfddb66.chunk.js",
|
|
14
14
|
"static/js/699.bd2c7001.chunk.js": "/.blocklet/proxy/blocklet-service/static/js/699.bd2c7001.chunk.js",
|
|
15
|
-
"static/js/575.
|
|
15
|
+
"static/js/575.ceda4e9e.chunk.js": "/.blocklet/proxy/blocklet-service/static/js/575.ceda4e9e.chunk.js",
|
|
16
16
|
"static/js/532.2768ffe6.chunk.js": "/.blocklet/proxy/blocklet-service/static/js/532.2768ffe6.chunk.js",
|
|
17
17
|
"static/media/ubuntu-mono-all-400-normal.woff": "/.blocklet/proxy/blocklet-service/static/media/ubuntu-mono-all-400-normal.c879328bc62e9c68268f.woff",
|
|
18
18
|
"static/media/lato-all-400-normal.woff": "/.blocklet/proxy/blocklet-service/static/media/lato-all-400-normal.3dc1eff492ab1f598560.woff",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"router-template-styles/styles.css": "/.blocklet/proxy/blocklet-service/router-template-styles/styles.css",
|
|
35
35
|
"index.html": "/.blocklet/proxy/blocklet-service/index.html",
|
|
36
36
|
"main.632501d5.css.map": "/.blocklet/proxy/blocklet-service/static/css/main.632501d5.css.map",
|
|
37
|
-
"main.
|
|
37
|
+
"main.5cdb1ae7.js.map": "/.blocklet/proxy/blocklet-service/static/js/main.5cdb1ae7.js.map",
|
|
38
38
|
"560.60bd29f3.chunk.js.map": "/.blocklet/proxy/blocklet-service/static/js/560.60bd29f3.chunk.js.map",
|
|
39
39
|
"255.a8eba332.chunk.js.map": "/.blocklet/proxy/blocklet-service/static/js/255.a8eba332.chunk.js.map",
|
|
40
40
|
"472.c389b098.chunk.js.map": "/.blocklet/proxy/blocklet-service/static/js/472.c389b098.chunk.js.map",
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
"597.7fc9dfe2.chunk.js.map": "/.blocklet/proxy/blocklet-service/static/js/597.7fc9dfe2.chunk.js.map",
|
|
46
46
|
"244.6bfddb66.chunk.js.map": "/.blocklet/proxy/blocklet-service/static/js/244.6bfddb66.chunk.js.map",
|
|
47
47
|
"699.bd2c7001.chunk.js.map": "/.blocklet/proxy/blocklet-service/static/js/699.bd2c7001.chunk.js.map",
|
|
48
|
-
"575.
|
|
48
|
+
"575.ceda4e9e.chunk.js.map": "/.blocklet/proxy/blocklet-service/static/js/575.ceda4e9e.chunk.js.map",
|
|
49
49
|
"532.2768ffe6.chunk.js.map": "/.blocklet/proxy/blocklet-service/static/js/532.2768ffe6.chunk.js.map"
|
|
50
50
|
},
|
|
51
51
|
"entrypoints": [
|
|
52
52
|
"static/css/main.632501d5.css",
|
|
53
|
-
"static/js/main.
|
|
53
|
+
"static/js/main.5cdb1ae7.js"
|
|
54
54
|
]
|
|
55
55
|
}
|
package/build/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="/.well-known/service/static/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"/><meta name="theme-color" content="#000000"/><title>Blocklet Service</title><script src=".well-known/service/api/env"></script><script defer="defer" src="/.blocklet/proxy/blocklet-service/static/js/main.
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="/.well-known/service/static/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"/><meta name="theme-color" content="#000000"/><title>Blocklet Service</title><script src=".well-known/service/api/env"></script><script defer="defer" src="/.blocklet/proxy/blocklet-service/static/js/main.5cdb1ae7.js"></script><link href="/.blocklet/proxy/blocklet-service/static/css/main.632501d5.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|