@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 CHANGED
@@ -96,6 +96,8 @@ const init = (_options = {}) => {
96
96
  const context = await (0, core_1.createContext)({
97
97
  parentContext,
98
98
  token,
99
+ request,
100
+ response,
99
101
  });
100
102
  if (options.callback) {
101
103
  const result = await options.callback(context);
package/dist/init.mjs CHANGED
@@ -89,7 +89,9 @@ export const init = (_options = {}) => {
89
89
  }
90
90
  const context = await createContext({
91
91
  parentContext,
92
- token
92
+ token,
93
+ request,
94
+ response
93
95
  });
94
96
  if (options.callback) {
95
97
  const result = await options.callback(context);
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)(['yellow'], 'x');
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)(['grey'], `[${roles.join('|')}]`)}`;
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)(['green'], '✓');
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)(['grey'], ` ${config.baseUrl === '/'
39
+ line += (0, node_util_1.styleText)('grey', ` ${config.baseUrl === '/'
40
40
  ? ''
41
41
  : config.baseUrl}`);
42
- line += (0, node_util_1.styleText)(['bold'], endpointUri);
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(["yellow"], "x");
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(["grey"], `[${roles.join("|")}]`)}`;
27
+ rolesLine = ` ${styleText("grey", `[${roles.join("|")}]`)}`;
28
28
  }
29
29
  if ("response" in endpoint || endpoint.builtin) {
30
- hasContractLine = styleText(["green"], "\u2713");
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(["grey"], ` ${config.baseUrl === "/" ? "" : config.baseUrl}`);
39
- line += styleText(["bold"], endpointUri);
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.271",
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.269",
37
- "@aeriajs/builtins": "^0.0.269",
38
- "@aeriajs/common": "^0.0.151",
39
- "@aeriajs/entrypoint": "^0.0.157",
40
- "@aeriajs/http": "^0.0.185",
41
- "@aeriajs/node-http": "^0.0.185",
42
- "@aeriajs/server": "^0.0.271",
43
- "@aeriajs/types": "^0.0.129",
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": {