museria 0.2.49 → 0.3.2
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/.eslintrc +10 -2
- package/.github/workflows/build.yml +3 -3
- package/.github/workflows/publish.yml +3 -3
- package/README.md +55 -59
- package/bin/actions.js +28 -28
- package/bin/index.js +4 -4
- package/bin/runner.js +1 -1
- package/bin/utils.js +6 -2
- package/dist/client/museria.client.js +7 -7
- package/dist/face/45a265d0f07b31cde85f.ttf +0 -0
- package/dist/face/6205fd00fb1b573e9f0f.ttf +0 -0
- package/dist/face/8d3cabfc66809162fb4d.woff2 +0 -0
- package/dist/face/fb8184add5a3101ad0a3.woff2 +0 -0
- package/dist/face/museria.face.js +33 -13
- package/dist/face/style.css +13 -11
- package/package.json +41 -40
- package/src/browser/client/index.js +2 -1
- package/src/browser/face/client.js +2 -1
- package/src/browser/face/controllers/app/app.html +77 -69
- package/src/browser/face/controllers/app/app.js +14 -7
- package/src/browser/face/controllers/app/app.scss +2 -22
- package/src/browser/face/index.js +3 -3
- package/src/browser/face/styles/main.scss +91 -11
- package/src/browser/face/styles/vars.scss +0 -1
- package/src/client.js +73 -74
- package/src/collection/transports/music/index.js +20 -18
- package/src/db/transports/database/index.js +7 -5
- package/src/db/transports/loki/index.js +30 -25
- package/src/errors.js +2 -1
- package/src/index.js +8 -6
- package/src/node.js +312 -323
- package/src/schema.js +27 -29
- package/src/server/transports/express/api/butler/controllers.js +7 -10
- package/src/server/transports/express/api/butler/routes.js +5 -5
- package/src/server/transports/express/api/master/controllers.js +7 -10
- package/src/server/transports/express/api/master/routes.js +5 -5
- package/src/server/transports/express/api/node/controllers.js +52 -61
- package/src/server/transports/express/api/node/routes.js +10 -10
- package/src/server/transports/express/api/routes.js +1 -1
- package/src/server/transports/express/api/slave/controllers.js +7 -10
- package/src/server/transports/express/api/slave/routes.js +6 -6
- package/src/server/transports/express/client/controllers.js +40 -61
- package/src/server/transports/express/client/routes.js +33 -39
- package/src/server/transports/express/controllers.js +10 -21
- package/src/server/transports/express/index.js +23 -20
- package/src/server/transports/express/midds.js +67 -67
- package/src/server/transports/express/routes.js +12 -12
- package/src/utils.js +175 -184
- package/test/client.js +311 -305
- package/test/db/database.js +32 -28
- package/test/db/loki.js +78 -74
- package/test/group.js +161 -156
- package/test/index.js +20 -10
- package/test/node.js +461 -460
- package/test/routes.js +404 -399
- package/test/server/express.js +35 -31
- package/test/services.js +25 -18
- package/test/tools.js +8 -6
- package/test/utils.js +236 -234
- package/webpack.client.js +9 -7
- package/webpack.face.js +8 -6
- package/dist/face/fa-brands-400.eot +0 -0
- package/dist/face/fa-brands-400.svg +0 -3717
- package/dist/face/fa-brands-400.ttf +0 -0
- package/dist/face/fa-brands-400.woff +0 -0
- package/dist/face/fa-brands-400.woff2 +0 -0
- package/dist/face/fa-solid-900.eot +0 -0
- package/dist/face/fa-solid-900.svg +0 -5034
- package/dist/face/fa-solid-900.ttf +0 -0
- package/dist/face/fa-solid-900.woff +0 -0
- package/dist/face/fa-solid-900.woff2 +0 -0
- /package/dist/face/{open-sans.ttf → 17e98b9e5586529b13cc.ttf} +0 -0
- /package/dist/face/{proxima-nova.ttf → 326601dfabd91e3f016c.ttf} +0 -0
- /package/dist/face/{logo.svg → ee9c6af64aa224827cec.svg} +0 -0
package/test/server/express.js
CHANGED
@@ -1,41 +1,45 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
import { assert } from "chai";
|
2
|
+
import express from "../../src/server/transports/express/index.js";
|
3
3
|
|
4
|
-
|
5
|
-
let server;
|
6
|
-
let nodeServer;
|
4
|
+
const ServerExpressMuseria = express();
|
7
5
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
6
|
+
export default function () {
|
7
|
+
describe('ServerExpressMetastocle', () => {
|
8
|
+
let server;
|
9
|
+
let nodeServer;
|
10
|
+
|
11
|
+
describe('instance creation', function () {
|
12
|
+
it('should create an instance', function () {
|
13
|
+
assert.doesNotThrow(() => server = new ServerExpressMuseria());
|
14
|
+
server.node = this.node;
|
15
|
+
nodeServer = this.node.server;
|
16
|
+
this.node.server = server;
|
17
|
+
});
|
14
18
|
});
|
15
|
-
});
|
16
19
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
+
describe('.init()', function () {
|
21
|
+
it('should not throw an exception', async function () {
|
22
|
+
await server.init();
|
23
|
+
});
|
20
24
|
});
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
25
|
+
|
26
|
+
describe('.deinit()', function () {
|
27
|
+
it('should not throw an exception', async function () {
|
28
|
+
await server.deinit();
|
29
|
+
});
|
26
30
|
});
|
27
|
-
});
|
28
31
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
+
describe('reinitialization', () => {
|
33
|
+
it('should not throw an exception', async function () {
|
34
|
+
await server.init();
|
35
|
+
});
|
32
36
|
});
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
37
|
+
|
38
|
+
describe('.destroy()', function () {
|
39
|
+
it('should not throw an exception', async function () {
|
40
|
+
await server.destroy();
|
41
|
+
this.node.server = nodeServer;
|
42
|
+
});
|
39
43
|
});
|
40
44
|
});
|
41
|
-
}
|
45
|
+
}
|
package/test/services.js
CHANGED
@@ -1,22 +1,29 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
import node from "../src/node.js";
|
2
|
+
import tools from "./tools.js";
|
3
|
+
import database from "./db/database.js";
|
4
|
+
import loki from "./db/loki.js";
|
5
|
+
import express from "./server/express.js";
|
3
6
|
|
4
|
-
|
5
|
-
before(async function () {
|
6
|
-
this.node = new Node(await tools.createNodeOptions({ server: false }));
|
7
|
-
await this.node.init();
|
8
|
-
});
|
7
|
+
const Node = node();
|
9
8
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
9
|
+
export default function () {
|
10
|
+
describe('services', () => {
|
11
|
+
before(async function () {
|
12
|
+
this.node = new Node(await tools.createNodeOptions({ server: false }));
|
13
|
+
await this.node.init();
|
14
|
+
});
|
15
|
+
|
16
|
+
after(async function () {
|
17
|
+
await this.node.destroy();
|
18
|
+
});
|
19
|
+
|
20
|
+
describe('db', () => {
|
21
|
+
describe('database', database.bind(this));
|
22
|
+
describe('loki', loki.bind(this));
|
23
|
+
});
|
18
24
|
|
19
|
-
|
20
|
-
|
25
|
+
describe('server', () => {
|
26
|
+
describe('express', express.bind(this));
|
27
|
+
});
|
21
28
|
});
|
22
|
-
}
|
29
|
+
}
|
package/test/tools.js
CHANGED
@@ -1,19 +1,21 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
import toolsMetastocle from "metastocle/test/tools.js";
|
2
|
+
import toolsStoracle from "storacle/test/tools.js";
|
3
|
+
|
4
|
+
const _tools = Object.assign({}, toolsMetastocle, toolsStoracle);
|
5
|
+
const tools = Object.assign({}, _tools);
|
3
6
|
|
4
7
|
/**
|
5
8
|
* Create the node options
|
6
|
-
*
|
9
|
+
*
|
7
10
|
* @async
|
8
11
|
* @param {object} [options]
|
9
12
|
* @returns {object}
|
10
13
|
*/
|
11
14
|
tools.createNodeOptions = async function (options = {}) {
|
12
|
-
options = await _tools.createNodeOptions(options);
|
15
|
+
options = await _tools.createNodeOptions(options);
|
13
16
|
options.storage.dataSize = '90%';
|
14
17
|
options.storage.tempSize = '5%';
|
15
18
|
options.file = { minSize: 0 };
|
16
19
|
return options;
|
17
20
|
};
|
18
|
-
|
19
|
-
module.exports = tools;
|
21
|
+
export default tools;
|