@rpcbase/server 0.239.0 → 0.240.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/server",
3
- "version": "0.239.0",
3
+ "version": "0.240.0",
4
4
  "license": "SSPL-1.0",
5
5
  "main": "./index.js",
6
6
  "bin": {
@@ -6,14 +6,15 @@ const debug = require("debug")
6
6
 
7
7
  const async_wrapper = require("../helpers/async_wrapper")
8
8
 
9
+
9
10
  const src_path = path.join(process.cwd(), "./src/")
10
11
  const build_dir = path.join(process.cwd(), "build/")
11
12
 
13
+ const log = debug("rb:rpc")
12
14
 
13
- const rpc_router = (app) => {
14
- const rpc_routes = glob.sync(path.join(build_dir, "./rpc/*"))
15
15
 
16
- // console.log("rpc_routes", rpc_routes)
16
+ const rpc_router = (app) => {
17
+ const rpc_routes = glob.sync(path.join(build_dir, "./client/rpc/*"))
17
18
 
18
19
  rpc_routes.forEach((file_path) => {
19
20
  const basename = path.basename(file_path)
@@ -29,7 +30,7 @@ const rpc_router = (app) => {
29
30
  const rpc_fn = require(module_path)
30
31
  app.post(`/rpc/${route_path}`, async_wrapper(async(req, res) => {
31
32
 
32
- console.log(`POST /rpc/${route_path}`)
33
+ log(`POST /rpc/${route_path}`)
33
34
 
34
35
  // TODO: add jaegerclient / opentelemetry
35
36
  const result = await rpc_fn(req.body, {req, res})