@rpcbase/server 0.108.0 → 0.110.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/cli/run_native.js CHANGED
@@ -56,9 +56,9 @@ const init_processes = (args) => {
56
56
  cmd: ["yarn", ["dev"]]
57
57
  },
58
58
  {
59
- name: "queue",
59
+ name: "worker",
60
60
  dirs: [],
61
- cmd: ["yarn", ["dev-queue"]]
61
+ cmd: ["yarn", ["dev-worker"]]
62
62
  },
63
63
  // mongodb database
64
64
  {
@@ -91,6 +91,20 @@ const init_processes = (args) => {
91
91
  ...(args.verbose ? [] : ["--logfile", session_store_logs_path]),
92
92
  ]]
93
93
  },
94
+ // server-store
95
+ {
96
+ name: "server-store",
97
+ dirs: [
98
+ session_store_dir,
99
+ path.dirname(session_store_logs_path),
100
+ ],
101
+ cmd: ["redis-server", [
102
+ path.join(infrastructure_conf_dir, "./redis/redis.conf"),
103
+ "--dir", session_store_dir,
104
+ "--port", env.SERVER_STORE_PORT,
105
+ ...(args.verbose ? [] : ["--logfile", session_store_logs_path]),
106
+ ]]
107
+ },
94
108
  // worker-queue
95
109
  {
96
110
  name: "worker-queue",
package/express/index.js CHANGED
@@ -48,6 +48,8 @@ module.exports = () => {
48
48
  // local dev origins
49
49
  [
50
50
  `http://localhost:${CLIENT_PORT}`,
51
+ `http://192.168.1.83:${CLIENT_PORT}`,
52
+ `http://192.168.1.140:${CLIENT_PORT}`,
51
53
  `http://admin.localhost:${CLIENT_PORT}`,
52
54
  // WARNING: hardcoded port
53
55
  "http://localhost:8090", // TMP: used by inspected app from admin
@@ -55,11 +57,10 @@ module.exports = () => {
55
57
  "localhost",
56
58
  ]
57
59
 
58
-
59
60
  app.use(cors({
60
61
  origin: cors_origins,
61
62
  methods: ["GET", "POST"],
62
- credentials: true // enable set-cookie
63
+ credentials: true // IMPORTANT: required to enable set-cookie
63
64
  }))
64
65
 
65
66
  app.use(session_middleware)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/server",
3
- "version": "0.108.0",
3
+ "version": "0.110.0",
4
4
  "license": "SSPL-1.0",
5
5
  "main": "./index.js",
6
6
  "bin": {
@@ -11,7 +11,7 @@ const dispatch_queue = (queue, model_name, op, doc) => {
11
11
  const tasks = queue.get_tasks()
12
12
 
13
13
  const handler_name = `on_${op_names[op]}_${model_name.toLowerCase()}`
14
-
14
+ console.log("dispatch", handler_name)
15
15
  // skip if there's no matching handler
16
16
  if (!Object.keys(tasks).includes(handler_name)) return
17
17