testilo 6.1.0 → 6.1.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.
Files changed (2) hide show
  1. package/call.js +5 -2
  2. package/package.json +1 -1
package/call.js CHANGED
@@ -20,6 +20,7 @@
20
20
  // Module to keep secrets.
21
21
  require('dotenv').config();
22
22
  // Function to process a script aiming.
23
+ const fs = require('fs/promises');
23
24
  const {aim} = require('./aim');
24
25
  // Function to process a script-batch merger.
25
26
  const {merge} = require('./merge');
@@ -43,7 +44,7 @@ const fnArgs = process.argv.slice(3);
43
44
 
44
45
  // Fulfills an aiming request.
45
46
  const callAim = async (scriptName, hostURL, hostName, hostID, notifyee) => {
46
- await aim(
47
+ const aimedScript = await aim(
47
48
  scriptName,
48
49
  {
49
50
  id: hostID,
@@ -52,7 +53,9 @@ const callAim = async (scriptName, hostURL, hostName, hostID, notifyee) => {
52
53
  },
53
54
  notifyee
54
55
  );
55
- console.log(`Script ${scriptID}.json has been aimed at ${hostName}`);
56
+ const aimedScriptID = aimedScript.id;
57
+ await fs.writeFile(`${jobDir}/${aimedScriptID}.json`, JSON.stringify(aimedScript, null, 2));
58
+ console.log(`Script ${aimedScriptID}.json has been aimed at ${hostName} and saved in ${jobDir}`);
56
59
  };
57
60
  // Fulfills a merger request.
58
61
  const callMerge = async (scriptName, batchName) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testilo",
3
- "version": "6.1.0",
3
+ "version": "6.1.1",
4
4
  "description": "Client that scores and digests Testaro reports",
5
5
  "main": "aim.js",
6
6
  "scripts": {