@suffolklitlab/alkiln 4.9.1 → 4.9.2

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/CHANGELOG.md CHANGED
@@ -40,6 +40,10 @@ Format:
40
40
  -->
41
41
  <!-- ## [Unreleased] -->
42
42
 
43
+ ## [4.9.2] - 2022-09-02
44
+ ### Fixed
45
+ - Environment variables `SERVER_RELOAD_TIMEOUT_SECONDS` and `MAX_SECONDS_FOR_SERVER_RELOAD` were being used as milliseconds instead of seconds. See https://github.com/SuffolkLITLab/ALKiln/issues/606.
46
+
43
47
  ## [4.9.1] - 2022-09-01
44
48
  ### Fixed
45
49
  - runtime_config.json gets created when needed when artifacts folder is created. See https://github.com/SuffolkLITLab/ALKiln/issues/600.
@@ -25,10 +25,20 @@ module.exports = session_vars;
25
25
  session_vars.get_debug = function () { return process.env.DEBUG || null; };
26
26
  session_vars.get_dev_api_key = function () { return process.env.DOCASSEMBLE_DEVELOPER_API_KEY || null; };
27
27
  session_vars.get_repo_url = function () { return process.env.REPO_URL || null; };
28
- session_vars.get_server_reload_timeout = function () { return process.env.SERVER_RELOAD_TIMEOUT_SECONDS || null; };
29
28
  session_vars.is_dev_env = function () { return process.env.DEV || null; }
30
29
 
31
30
  // More complex logic
31
+ session_vars.get_server_reload_timeout = function () {
32
+ /** Return a custom server reload timeout after converting it to seconds.
33
+ * If there is no custom reload timeout, return null. */
34
+ let env_timeout = process.env.SERVER_RELOAD_TIMEOUT_SECONDS || process.env.MAX_SECONDS_FOR_SERVER_RELOAD;
35
+ if ( env_timeout ) {
36
+ return parseFloat( env_timeout ) * 1000;
37
+ } else {
38
+ return null;
39
+ }
40
+ };
41
+
32
42
  session_vars.get_setup_timeout_ms = function () {
33
43
  let timeout = 120 * 1000;
34
44
  if ( process.env.MAX_SECONDS_FOR_SETUP ) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suffolklitlab/alkiln",
3
- "version": "4.9.1",
3
+ "version": "4.9.2",
4
4
  "description": "Integrated automated end-to-end testing with docassemble, puppeteer, and cucumber.",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {