@rpcbase/server 0.165.0 → 0.166.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
@@ -25,7 +25,7 @@ const get_env = () => {
25
25
  return env
26
26
  }
27
27
 
28
- const init_processes = (args) => {
28
+ const get_processes = (args) => {
29
29
  const env = get_env()
30
30
 
31
31
  const infrastructure_conf_dir = path.join(__dirname, "../infrastructure")
@@ -165,7 +165,9 @@ const init_processes = (args) => {
165
165
  const run_native = (infrastructure_dir, proj_prefix, args) => {
166
166
  console.log(`running in ${colors.bold(colors.magenta("NATIVE"))} mode`)
167
167
 
168
- const processes = init_processes(args)
168
+ console.log("args", args)
169
+
170
+ const processes = get_processes(args)
169
171
 
170
172
  const run_process = (item) => {
171
173
  // console.log("run_native:run_process:item", item)
@@ -12,6 +12,7 @@ const get_runtime = require("./get_runtime")
12
12
  const start_server = async(args) => {
13
13
  const infrastructure_dir = path.join(process.cwd(), "../infrastructure")
14
14
 
15
+ // TODO: remove and rely on container_mode only
15
16
  const runtime = get_runtime()
16
17
 
17
18
  // prefix
package/express/index.js CHANGED
@@ -9,7 +9,6 @@ const request_ip = require("request-ip")
9
9
  const auth = require("../src/auth")
10
10
 
11
11
  const dev_save_coverage = require("./dev_save_coverage")
12
- const dev_stop_timeout = require("./dev_stop_timeout")
13
12
  const session_middleware = require("./session_middleware")
14
13
 
15
14
 
@@ -83,7 +82,6 @@ module.exports = () => {
83
82
  auth(app)
84
83
 
85
84
  dev_save_coverage(app)
86
- dev_stop_timeout(app)
87
85
 
88
86
  return app
89
87
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/server",
3
- "version": "0.165.0",
3
+ "version": "0.166.0",
4
4
  "license": "SSPL-1.0",
5
5
  "main": "./index.js",
6
6
  "bin": {
@@ -1,27 +0,0 @@
1
- /* @flow */
2
-
3
- const DEFAULT_EMPTY_TIMEOUT = 1000 * 60 * 60 // 1h
4
- const is_production = process.env.NODE_ENV === "production"
5
-
6
- let _req_count = 0
7
-
8
-
9
- module.exports = (app) => {
10
-
11
- if (!is_production) {
12
- app.use((req, res, next) => {
13
- _req_count++
14
- next()
15
- })
16
-
17
- setInterval(() => {
18
- // no requests -> shutdown
19
- if (_req_count === 0) {
20
- console.log("dev::incoming requests 0, exiting due to timeout")
21
- process.exit(0)
22
- } else {
23
- _req_count = 0
24
- }
25
- }, DEFAULT_EMPTY_TIMEOUT)
26
- }
27
- }