@suffolklitlab/alkiln 5.12.0-delete4 → 5.12.0-delete5

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.
@@ -280,11 +280,10 @@ da_i.quietly_try_to_delete_interviews = async function ({ interviews = {}, api_k
280
280
  });
281
281
  responses.push( sub_responses );
282
282
  } else {
283
- log.debug({ type: `da api info`, code: `ALK0191`, pre: `There is no interview to delete.` });
283
+ log.info({ type: `da api info`, code: `ALK0191`, pre: `There is no interview to delete.` });
284
284
  }
285
285
  }
286
286
  return responses;
287
-
288
287
  }; // Ends da_i.quietly_try_to_delete_interviews()
289
288
 
290
289
  // node -e 'require("./lib/docassemble/docassemble_api_interface.js").quietly_delete_one_interview(...)'
@@ -296,7 +295,7 @@ da_i.quietly_delete_one_interview = async function ( timeout, { interview = {},
296
295
  let responses = [];
297
296
  for ( let api_key of api_keys ) {
298
297
  try {
299
- log.debug({ type: `da api info`, code: `ALK0188`,
298
+ log.info({ type: `da api info`, code: `ALK0188`,
300
299
  pre: `Trying to delete the interview with the id ${ interview.uid } and an API key.`
301
300
  });
302
301
 
@@ -307,13 +306,13 @@ da_i.quietly_delete_one_interview = async function ( timeout, { interview = {},
307
306
  });
308
307
  responses.push( response );
309
308
 
310
- log.debug({ type: `da api info`, code: `ALK0189`,
309
+ log.info({ type: `da api info`, code: `ALK0189`,
311
310
  pre: `No error when trying to delete interview ${ interview.uid } at ${ interview.i }.`
312
311
  });
313
312
  } catch ( error ) {
314
313
  error.interview = interview;
315
314
  let msg = `Error when deleting the interview. See https://docassemble.org/docs/api.html#session_delete.`
316
- log.debug({ type: `da api info`, code: `ALK0190`, pre: msg, data: error });
315
+ log.info({ type: `da api info`, code: `ALK0190`, pre: msg, data: error });
317
316
  }
318
317
  } // ends for api keys
319
318
  return responses;
@@ -348,7 +347,7 @@ da_i.get_interview = async function ({ interview = {}, api_keys = [], options =
348
347
  if ( interview && interview.uid ) {
349
348
  for ( let api_key of api_keys ) {
350
349
  try {
351
- log.debug({ type: `da api info`, code: `ALK0192`, pre: `Trying to get the interview with the id ${ interview.uid } and an API key.` });
350
+ log.info({ type: `da api info`, code: `ALK0192`, pre: `Trying to get the interview with the id ${ interview.uid } and an API key.` });
352
351
 
353
352
  // Actual work:
354
353
  let response = await _da_REST.get_interview( timeout, {
@@ -357,22 +356,21 @@ da_i.get_interview = async function ({ interview = {}, api_keys = [], options =
357
356
  });
358
357
 
359
358
  if ( response && response.data && response.data.items && response.data.items[0] && response.data.items[0].session ) {
360
- log.debug({ type: `da api info`, code: `ALK0193`, pre: `Status ${ response.status }. Got ${ response.data.items[0].session }.`});
359
+ log.info({ type: `da api info`, code: `ALK0193`, pre: `Status ${ response.status }. Got ${ response.data.items[0].session }.`});
361
360
  return response.data.items[0];
362
361
  } else {
363
- log.debug({ type: `da api info`, code: `ALK0194`, pre: `Status ${ response.status }. Cannot find ${ interview.uid }`});
362
+ log.info({ type: `da api info`, code: `ALK0194`, pre: `Status ${ response.status }. Cannot find ${ interview.uid }`});
364
363
  }
365
364
 
366
365
  } catch ( error ) {
367
366
  error.interview = interview;
368
367
  let msg = `${ error.status || `No error.status.` } ${ error.statusText || error.data || `No error.statusText.` } Ran into an error when getting the interview ${ interview.uid }. See https://docassemble.org/docs/api.html#interviews.`
369
- log.debug({ type: `da api info`, code: `ALK0195`, pre: msg, data: error });
368
+ log.info({ type: `da api info`, code: `ALK0195`, pre: msg, data: error });
370
369
  }
371
370
  } // ends for api_keys
372
371
  } else {
373
- log.debug({ type: `da api info`, code: `ALK0196`, pre: `There is no interview to get.` });
372
+ log.info({ type: `da api info`, code: `ALK0196`, pre: `There is no interview to get.` });
374
373
  }
375
374
 
376
375
  return null;
377
-
378
376
  }; // Ends da_i.get_interview()
package/lib/steps.js CHANGED
@@ -1481,7 +1481,7 @@ After(async function(scenario) {
1481
1481
  // going to the wrong file). If it becomes a problem we can track it down later.
1482
1482
  if ( visible_keys.length > 0 ) {
1483
1483
  // Can an API key ever see an interview that it can't delete?
1484
- log.debug({ type: `internal warning`, code: `ALK0197`,
1484
+ log.info({ type: `internal warning`, code: `ALK0197`,
1485
1485
  pre: `The API key can see ${ visible_keys.length } interviews that were not deleted: ${ visible_keys.join( ', ' ) }`
1486
1486
  });
1487
1487
  }
@@ -1493,7 +1493,7 @@ After(async function(scenario) {
1493
1493
  // interview. If it becomes a problem we can track it down later.
1494
1494
  // Consider add "internal" to docs: "If you see this, make an
1495
1495
  // issue in ALKiln with your debug/verbose log"
1496
- log.debug({ type: `internal warning`, code: `ALK0198`, pre: `Error while cleaning up interviews.`, data: error });
1496
+ log.info({ type: `internal warning`, code: `ALK0198`, pre: `Error while cleaning up interviews.`, data: error });
1497
1497
  }
1498
1498
  }
1499
1499
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suffolklitlab/alkiln",
3
- "version": "5.12.0-delete4",
3
+ "version": "5.12.0-delete5",
4
4
  "description": "Integrated automated end-to-end testing with docassemble, puppeteer, and cucumber.",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {