@rpcbase/server 0.99.0 → 0.101.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
@@ -11,6 +11,8 @@ const mkdirp = require("mkdirp")
11
11
  // TODO: verify mongod and redis-sever and elasticsearch executables are present
12
12
  // and have the right version
13
13
 
14
+ const is_production = process.env.NODE_ENV === "production"
15
+
14
16
  const NO_PRINT_LIST = [
15
17
  // "database",
16
18
  ]
@@ -119,6 +121,10 @@ const init_processes = (args) => {
119
121
  "-s",
120
122
  "-E", `path.logs=${logs_dir}`,
121
123
  "-E", `http.port=${env.SEARCH_INDEX_PORT}`,
124
+ ...(is_production ? [] : [
125
+ "-E", `http.cors.enabled=true`,
126
+ "-E", `http.cors.allow-origin=http://localhost:8080`,
127
+ ]),
122
128
  "-E", `path.data=${data_dir}`,
123
129
  "-E", "discovery.type=single-node",
124
130
  "-E", "ingest.geoip.downloader.enabled=false",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/server",
3
- "version": "0.99.0",
3
+ "version": "0.101.0",
4
4
  "license": "SSPL-1.0",
5
5
  "main": "./index.js",
6
6
  "bin": {
@@ -11,24 +11,24 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@rpcbase/agent": "0.11.0",
14
- "@rpcbase/std": "0.3.0",
15
- "body-parser": "1.20.0",
16
- "bull": "4.9.0",
14
+ "@rpcbase/std": "0.5.0",
15
+ "body-parser": "1.20.1",
16
+ "bull": "4.10.1",
17
17
  "connect-redis": "6.1.3",
18
18
  "cors": "2.8.5",
19
19
  "debug": "4.3.4",
20
- "dotenv": "16.0.2",
21
- "express": "4.18.1",
20
+ "dotenv": "16.0.3",
21
+ "express": "4.18.2",
22
22
  "express-session": "1.17.3",
23
23
  "glob": "8.0.3",
24
24
  "lodash": "4.17.21",
25
25
  "mkdirp": "1.0.4",
26
- "mongoose": "6.6.0",
26
+ "mongoose": "6.7.1",
27
27
  "picocolors": "1.0.0",
28
28
  "postmark": "3.0.14",
29
- "redis": "4.3.1",
29
+ "redis": "4.4.0",
30
30
  "request-ip": "3.3.0",
31
31
  "validator": "13.7.0",
32
- "yargs": "17.5.1"
32
+ "yargs": "17.6.2"
33
33
  }
34
34
  }
package/queue/index.js CHANGED
@@ -69,6 +69,10 @@ const get_instance = () => {
69
69
  return worker_queue
70
70
  }
71
71
 
72
+ // TMP used to create additional queues, should be implemented with a better API in the future
73
+ const get_url = () => {
74
+ return worker_queue_url
75
+ }
72
76
 
73
77
  module.exports = {
74
78
  start: start_worker,
@@ -76,4 +80,5 @@ module.exports = {
76
80
  get_tasks,
77
81
  add: worker_add,
78
82
  instance: get_instance,
83
+ get_url,
79
84
  }