@rpcbase/server 0.341.0 → 0.343.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/boot/shared.js CHANGED
@@ -3,6 +3,8 @@ if (typeof __RB_IS_WEBPACK__ === "undefined") {
3
3
  throw new Error("cannot run outside of webpack bundling")
4
4
  }
5
5
 
6
+ require("source-map-support").install()
7
+
6
8
  require("./setup_env")
7
9
 
8
10
  require("../extend-expect")
package/express/index.js CHANGED
@@ -79,7 +79,7 @@ module.exports = () => {
79
79
 
80
80
  sessions(app)
81
81
 
82
- const pong_res = {app: process.env.RB_APP_NAME, message: "pong"}
82
+ const pong_res = {app: `app_name:${JSON.stringify(process.env.RB_APP_NAME)}`, message: "pong"}
83
83
  app.get("/__ping", (req, res) => res.json(pong_res))
84
84
  app.post("/__ping", (req, res) => res.json(pong_res))
85
85
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/server",
3
- "version": "0.341.0",
3
+ "version": "0.343.0",
4
4
  "license": "SSPL-1.0",
5
5
  "main": "./index.js",
6
6
  "scripts": {
@@ -84,6 +84,7 @@
84
84
  "request-ip": "3.3.0",
85
85
  "sift": "17.0.1",
86
86
  "socket.io": "4.7.4",
87
+ "source-map-support": "0.5.21",
87
88
  "validator": "13.11.0"
88
89
  }
89
90
  }
@@ -58,6 +58,8 @@ const serve_file = (req, res, full_path) => {
58
58
  const client_router = (app) => {
59
59
  const client_routes = get_client_routes()
60
60
 
61
+
62
+
61
63
  const index_file_path = path.join(client_build_dir, "./index.html")
62
64
  if (fs.existsSync(index_file_path)) {
63
65
  const index_file_buffer = fs.readFileSync(index_file_path)
@@ -1,2 +0,0 @@
1
- client router serves the client from the server
2
- in production the client could be served from the CDN, but the server is also suitable