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.
- package/call.js +5 -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
|
-
|
|
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) => {
|