@suffolklitlab/alkiln 4.9.0 → 4.9.3
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 +12 -0
- package/action.yml +1 -1
- package/lib/utils/session_vars.js +17 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -40,6 +40,18 @@ Format:
|
|
|
40
40
|
-->
|
|
41
41
|
<!-- ## [Unreleased] -->
|
|
42
42
|
|
|
43
|
+
## [4.9.3] - 2022-09-07
|
|
44
|
+
### Fixed
|
|
45
|
+
- `retry` of failed tests not implemented for developers. See https://github.com/SuffolkLITLab/ALKiln/issues/601.
|
|
46
|
+
|
|
47
|
+
## [4.9.2] - 2022-09-02
|
|
48
|
+
### Fixed
|
|
49
|
+
- 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.
|
|
50
|
+
|
|
51
|
+
## [4.9.1] - 2022-09-01
|
|
52
|
+
### Fixed
|
|
53
|
+
- runtime_config.json gets created when needed when artifacts folder is created. See https://github.com/SuffolkLITLab/ALKiln/issues/600.
|
|
54
|
+
|
|
43
55
|
## [4.9.0] - 2022-09-01
|
|
44
56
|
### Changed
|
|
45
57
|
- Allow devs to test an arbitrary interview. See https://github.com/SuffolkLITLab/ALKiln/issues/600.
|
package/action.yml
CHANGED
|
@@ -77,7 +77,7 @@ runs:
|
|
|
77
77
|
"scripts": {
|
|
78
78
|
"test": "npm run langs_setup && npm run cucumber -- $@",
|
|
79
79
|
"cucumber_base": "./node_modules/.bin/cucumber-js --require ./node_modules/@suffolklitlab/alkiln/lib/index.js",
|
|
80
|
-
"cucumber": "run_cucumber(){ npm run cucumber_base -- \"$@\" docassemble/*/data/sources/*.feature; }; run_cucumber",
|
|
80
|
+
"cucumber": "run_cucumber(){ npm run cucumber_base -- \"$@\" docassemble/*/data/sources/*.feature --retry 1; }; run_cucumber",
|
|
81
81
|
"langs": "npm run langs_setup && ./node_modules/.bin/cucumber-js --require ./node_modules/.bin/alkiln-cucumber docassemble/*/data/sources/*_lang*.feature",
|
|
82
82
|
"langs_setup": "node_modules/.bin/alkiln-langs 'docassemble/*/data/sources/*.feature'",
|
|
83
83
|
"setup": "node_modules/.bin/alkiln-setup",
|
|
@@ -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 ) {
|
|
@@ -147,6 +157,12 @@ const artifacts_path_key = `artifacts_path`;
|
|
|
147
157
|
session_vars.save_artifacts_path_name = function ( path_name ) {
|
|
148
158
|
/* Save a key with the name of the current artifacts folder in case it doesn't exist. */
|
|
149
159
|
|
|
160
|
+
// Ensure artifacts path file exists
|
|
161
|
+
if ( !fs.existsSync( runtime_config_path ) ) {
|
|
162
|
+
// If the file doesn't exist, make one because next we need to read it
|
|
163
|
+
fs.writeFileSync( runtime_config_path, JSON.stringify( {}, null, 2 ) );
|
|
164
|
+
}
|
|
165
|
+
|
|
150
166
|
// Get the json, changing it, and re-write the file from scratch
|
|
151
167
|
let json = JSON.parse( fs.readFileSync( runtime_config_path ) );
|
|
152
168
|
json[ artifacts_path_key ] = path_name;
|