@suffolklitlab/alkiln 4.2.1-custom-setup-timeout.2 → 4.3.1

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
@@ -38,9 +38,11 @@ Format:
38
38
  ### Security
39
39
  -
40
40
  -->
41
- ## [Unreleased]
41
+ <!-- ## [Unreleased] -->
42
+
43
+ ## [4.3.0] - 2022-04-07
42
44
  ### Added
43
- - GitHub environment variable MAX_SECONDS_FOR_SETUP to set a custom maximum time for setup and takedown for packages that take a long time to load.
45
+ - GitHub environment variable `MAX_SECONDS_FOR_SETUP` to set a custom maximum time for setup and takedown for packages that take a long time to load.
44
46
 
45
47
  ## [4.2.0] - 2022-04-05
46
48
  ### Changed
package/action.yml CHANGED
@@ -29,7 +29,7 @@ inputs:
29
29
  required: false
30
30
  default: '^4.0.0'
31
31
  MAX_SECONDS_FOR_SETUP:
32
- description: 'Amount of time to give the Project to upload your package's GitHub code.'
32
+ description: "Amount of time to give the Project to upload your package's GitHub code."
33
33
  required: false
34
34
  default: '120'
35
35
 
@@ -181,10 +181,9 @@ da_i.loop_to_create_project = async function( creation_options ) {
181
181
 
182
182
  // Defaults
183
183
  creation_options = creation_options || {};
184
- let default_opts = { timeout: DEFAULT_MAX_REQUEST_MS, max_tries: 15, wait_seconds: 5 };
185
- let timeout = creation_options.timeout || default_opts.timeout;
186
- let max_tries = creation_options.max_tries || default_opts.max_tries;
187
- let wait_seconds = creation_options.wait_seconds || default_opts.wait_seconds;
184
+ let timeout = creation_options.timeout || DEFAULT_MAX_REQUEST_MS;
185
+ let max_tries = creation_options.max_tries || 15;
186
+ let wait_seconds = creation_options.wait_seconds || 5;
188
187
 
189
188
  let project_name = null;
190
189
  let name_incrementor = 0;
@@ -353,8 +352,7 @@ da_i.wait_for_server_to_restart = async ( task_id, options ) => {
353
352
  // Base default
354
353
  options = options || {};
355
354
  // Default timeout
356
- let default_timeout = DEFAULT_MAX_REQUEST_MS;
357
- let timeout = options.timeout || default_timeout;
355
+ let timeout = options.timeout || DEFAULT_MAX_REQUEST_MS;
358
356
  // Other defaults
359
357
  let default_wait_between_loops = 4 * 1000;
360
358
  let default_wait_for_response = 1 * 1000;
@@ -363,7 +361,6 @@ da_i.wait_for_server_to_restart = async ( task_id, options ) => {
363
361
  let wait_between_loops = options.wait_between_loops || default_wait_between_loops;
364
362
  let wait_for_response = options.wait_for_response || default_wait_for_response;
365
363
  let max_loops = options.max_loops || default_max_loops;
366
- let total_wait = wait_between_loops + wait_for_response;
367
364
 
368
365
  // Flags for stopping the `while` loop
369
366
  let num_tries = 0;
@@ -425,8 +422,6 @@ da_i.delete_project = async function ( delete_options ) {
425
422
  log.info({ pre: `Deleted Project "${ project_name }"` });
426
423
 
427
424
  } catch ( error ) {
428
- // TODO: Add more useful error messages, like project doesn't exist. The devs
429
- // shouldn't be deleting projects by hand, but it's still very possible they would
430
425
  // Status 400
431
426
  log.error({ pre: `Ran into an error when deleting Project "${ project_name }"` });
432
427
  log.debug({ pre: `See https://docassemble.org/docs/api.html#playground_delete_project.` });
@@ -20,7 +20,7 @@ const session_vars = {};
20
20
 
21
21
  module.exports = session_vars;
22
22
 
23
- // Default to null
23
+ // These default to null
24
24
  session_vars.get_debug = function () { return process.env.DEBUG || null; };
25
25
  session_vars.get_dev_api_key = function () { return process.env.DOCASSEMBLE_DEVELOPER_API_KEY || null; };
26
26
  session_vars.get_repo_url = function () { return process.env.REPO_URL || null; };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suffolklitlab/alkiln",
3
- "version": "4.2.1-custom-setup-timeout.2",
3
+ "version": "4.3.1",
4
4
  "description": "Integrated automated end-to-end testing with docassemble, puppeteer, and cucumber.",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {