@aeriajs/server 0.0.271 → 0.0.273
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/dist/init.js +2 -0
- package/dist/init.mjs +3 -1
- package/dist/warmup.js +5 -5
- package/dist/warmup.mjs +5 -5
- package/package.json +9 -9
package/dist/init.js
CHANGED
package/dist/init.mjs
CHANGED
package/dist/warmup.js
CHANGED
|
@@ -10,7 +10,7 @@ const colorizedRoute = async (method, endpointUri, endpoint) => {
|
|
|
10
10
|
const color = method in types_1.METHOD_COLORS
|
|
11
11
|
? types_1.METHOD_COLORS[method]
|
|
12
12
|
: 'white';
|
|
13
|
-
let rolesLine = '', hasContractLine = (0, node_util_1.styleText)(
|
|
13
|
+
let rolesLine = '', hasContractLine = (0, node_util_1.styleText)('yellow', 'x');
|
|
14
14
|
if (endpoint) {
|
|
15
15
|
if ('roles' in endpoint) {
|
|
16
16
|
const roles = await (async () => {
|
|
@@ -25,10 +25,10 @@ const colorizedRoute = async (method, endpointUri, endpoint) => {
|
|
|
25
25
|
}
|
|
26
26
|
return endpoint.roles;
|
|
27
27
|
})();
|
|
28
|
-
rolesLine = ` ${(0, node_util_1.styleText)(
|
|
28
|
+
rolesLine = ` ${(0, node_util_1.styleText)('grey', `[${roles.join('|')}]`)}`;
|
|
29
29
|
}
|
|
30
30
|
if ('response' in endpoint || endpoint.builtin) {
|
|
31
|
-
hasContractLine = (0, node_util_1.styleText)(
|
|
31
|
+
hasContractLine = (0, node_util_1.styleText)('green', '✓');
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
let line = (0, node_util_1.styleText)([
|
|
@@ -36,10 +36,10 @@ const colorizedRoute = async (method, endpointUri, endpoint) => {
|
|
|
36
36
|
color,
|
|
37
37
|
], method) + '\t';
|
|
38
38
|
line += hasContractLine;
|
|
39
|
-
line += (0, node_util_1.styleText)(
|
|
39
|
+
line += (0, node_util_1.styleText)('grey', ` ${config.baseUrl === '/'
|
|
40
40
|
? ''
|
|
41
41
|
: config.baseUrl}`);
|
|
42
|
-
line += (0, node_util_1.styleText)(
|
|
42
|
+
line += (0, node_util_1.styleText)('bold', endpointUri);
|
|
43
43
|
line += rolesLine;
|
|
44
44
|
return line;
|
|
45
45
|
};
|
package/dist/warmup.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { styleText } from "node:util";
|
|
|
6
6
|
const colorizedRoute = async (method, endpointUri, endpoint) => {
|
|
7
7
|
const config = await getConfig();
|
|
8
8
|
const color = method in METHOD_COLORS ? METHOD_COLORS[method] : "white";
|
|
9
|
-
let rolesLine = "", hasContractLine = styleText(
|
|
9
|
+
let rolesLine = "", hasContractLine = styleText("yellow", "x");
|
|
10
10
|
if (endpoint) {
|
|
11
11
|
if ("roles" in endpoint) {
|
|
12
12
|
const roles = await (async () => {
|
|
@@ -24,10 +24,10 @@ const colorizedRoute = async (method, endpointUri, endpoint) => {
|
|
|
24
24
|
}
|
|
25
25
|
return endpoint.roles;
|
|
26
26
|
})();
|
|
27
|
-
rolesLine = ` ${styleText(
|
|
27
|
+
rolesLine = ` ${styleText("grey", `[${roles.join("|")}]`)}`;
|
|
28
28
|
}
|
|
29
29
|
if ("response" in endpoint || endpoint.builtin) {
|
|
30
|
-
hasContractLine = styleText(
|
|
30
|
+
hasContractLine = styleText("green", "\u2713");
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
let line = styleText([
|
|
@@ -35,8 +35,8 @@ const colorizedRoute = async (method, endpointUri, endpoint) => {
|
|
|
35
35
|
color
|
|
36
36
|
], method) + " ";
|
|
37
37
|
line += hasContractLine;
|
|
38
|
-
line += styleText(
|
|
39
|
-
line += styleText(
|
|
38
|
+
line += styleText("grey", ` ${config.baseUrl === "/" ? "" : config.baseUrl}`);
|
|
39
|
+
line += styleText("bold", endpointUri);
|
|
40
40
|
line += rolesLine;
|
|
41
41
|
return line;
|
|
42
42
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aeriajs/server",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.273",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
"mongodb": "^6.17.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@aeriajs/core": "^0.0.
|
|
37
|
-
"@aeriajs/builtins": "^0.0.
|
|
38
|
-
"@aeriajs/common": "^0.0.
|
|
39
|
-
"@aeriajs/entrypoint": "^0.0.
|
|
40
|
-
"@aeriajs/http": "^0.0.
|
|
41
|
-
"@aeriajs/node-http": "^0.0.
|
|
42
|
-
"@aeriajs/server": "^0.0.
|
|
43
|
-
"@aeriajs/types": "^0.0.
|
|
36
|
+
"@aeriajs/core": "^0.0.271",
|
|
37
|
+
"@aeriajs/builtins": "^0.0.271",
|
|
38
|
+
"@aeriajs/common": "^0.0.153",
|
|
39
|
+
"@aeriajs/entrypoint": "^0.0.159",
|
|
40
|
+
"@aeriajs/http": "^0.0.187",
|
|
41
|
+
"@aeriajs/node-http": "^0.0.187",
|
|
42
|
+
"@aeriajs/server": "^0.0.273",
|
|
43
|
+
"@aeriajs/types": "^0.0.131",
|
|
44
44
|
"mongodb": "^6.17.0"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|