testilo 39.3.0 → 40.1.0

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/merge.js CHANGED
@@ -44,7 +44,7 @@ const contaminantNames = new Set([
44
44
  'testaro'
45
45
  ]);
46
46
  // Length of the random merger ID.
47
- const mergeIDLength = 2;
47
+ const mergeIDLength = 3;
48
48
 
49
49
  // ########## FUNCTIONS
50
50
 
@@ -102,6 +102,8 @@ exports.merge = (script, batch, executionTimeStamp) => {
102
102
  const jobs = [];
103
103
  const {targets} = batch;
104
104
  const targetIDs = Object.keys(targets);
105
+ const targetCount = targetIDs.length;
106
+ const targetSuffixWidth = Math.ceil(Math.pow(targetCount, 1 / 36));
105
107
  // For each target in the batch:
106
108
  targetIDs.forEach((what, index) => {
107
109
  const {actGroups, url} = targets[what];
@@ -111,7 +113,7 @@ exports.merge = (script, batch, executionTimeStamp) => {
111
113
  const job = JSON.parse(JSON.stringify(protoJob));
112
114
  const {sources, target} = job;
113
115
  // Make the job ID unique.
114
- const targetSuffix = alphaNumOf(index);
116
+ const targetSuffix = alphaNumOf(index).padStart(targetSuffixWidth, '0');
115
117
  job.id = `${executionTimeStamp}-${sources.mergeID}-${targetSuffix}`;
116
118
  // Populate the target-specific properties of the job.
117
119
  target.what = what;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testilo",
3
- "version": "39.3.0",
3
+ "version": "40.1.0",
4
4
  "description": "Prepares Testaro jobs and processes Testaro reports",
5
5
  "main": "call.js",
6
6
  "scripts": {