testilo 7.0.11 → 7.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 +1 -1
- package/merge.js +4 -2
- package/package.json +1 -1
package/call.js
CHANGED
|
@@ -216,7 +216,7 @@ if (fn === 'aim' && fnArgs.length === 5) {
|
|
|
216
216
|
console.log('Execution completed');
|
|
217
217
|
});
|
|
218
218
|
}
|
|
219
|
-
else if (fn === 'merge' && fnArgs.length
|
|
219
|
+
else if (fn === 'merge' && fnArgs.length > 1 && fnArgs.length < 4) {
|
|
220
220
|
callMerge(... fnArgs)
|
|
221
221
|
.then(() => {
|
|
222
222
|
console.log('Execution completed');
|
package/merge.js
CHANGED
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
0. base of name of script located in process.env.SCRIPTDIR.
|
|
6
6
|
1. base of name of batch located in process.env.BATCHDIR.
|
|
7
7
|
2. email address to be notified of completion.
|
|
8
|
-
Usage
|
|
8
|
+
Usage examples:
|
|
9
9
|
node call merge ts25 weborgs developer@w3.org
|
|
10
|
+
node call merge ts25 weborgs
|
|
10
11
|
Note: The subdirectory for jobs will be created if it does not exist.
|
|
11
12
|
*/
|
|
12
13
|
|
|
@@ -24,11 +25,12 @@ const {aim} = require('./aim');
|
|
|
24
25
|
const scriptDir = process.env.SCRIPTDIR || 'scripts';
|
|
25
26
|
const batchDir = process.env.BATCHDIR || 'batches';
|
|
26
27
|
const jobDir = process.env.JOBDIR || 'watch';
|
|
28
|
+
const stdRequester = process.env.REQUESTER;
|
|
27
29
|
|
|
28
30
|
// ########## FUNCTIONS
|
|
29
31
|
|
|
30
32
|
// Merges a batch into a script and writes jobs.
|
|
31
|
-
exports.merge = async (scriptName, batchName, requester) => {
|
|
33
|
+
exports.merge = async (scriptName, batchName, requester = stdRequester) => {
|
|
32
34
|
// Get the script and the batch.
|
|
33
35
|
const scriptJSON = await fs.readFile(`${scriptDir}/${scriptName}.json`, 'utf8');
|
|
34
36
|
const batchJSON = await fs.readFile(`${batchDir}/${batchName}.json`, 'utf8');
|