testilo 13.10.2 → 13.10.4
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 +3 -3
- package/merge.js +1 -1
- package/package.json +1 -1
- package/procs/score/tic30.js +1 -1
- package/script.js +4 -4
package/call.js
CHANGED
|
@@ -57,11 +57,11 @@ const callBatch = async (listID, what) => {
|
|
|
57
57
|
// Fulfills a script-creation request.
|
|
58
58
|
const callScript = async (scriptID, classificationID = null, ... issueIDs) => {
|
|
59
59
|
// Get any issue classification.
|
|
60
|
-
const
|
|
61
|
-
? require(`${functionDir}/score/${classificationID}`).
|
|
60
|
+
const issues = classificationID
|
|
61
|
+
? require(`${functionDir}/score/${classificationID}`).issues
|
|
62
62
|
: null;
|
|
63
63
|
// Create a script.
|
|
64
|
-
const scriptObj = script(scriptID,
|
|
64
|
+
const scriptObj = script(scriptID, issues, ... issueIDs);
|
|
65
65
|
// Save the script.
|
|
66
66
|
const scriptJSON = JSON.stringify(scriptObj, null, 2);
|
|
67
67
|
await fs.writeFile(`${specDir}/scripts/${scriptID}.json`, scriptJSON);
|
package/merge.js
CHANGED
|
@@ -38,7 +38,7 @@ exports.merge = (script, batch, requester, isolate = false) => {
|
|
|
38
38
|
// If the requester is unspecified, make it the standard requester.
|
|
39
39
|
requester ||= stdRequester;
|
|
40
40
|
// Create a timestamp.
|
|
41
|
-
const timeStamp = Math.floor((Date.now() - Date.UTC(2023,
|
|
41
|
+
const timeStamp = Math.floor((Date.now() - Date.UTC(2023, 6)) / 2000).toString(36);
|
|
42
42
|
// Create a time description.
|
|
43
43
|
const creationTime = (new Date()).toISOString().slice(0, 19);
|
|
44
44
|
// Initialize a target-independent job.
|
package/package.json
CHANGED
package/procs/score/tic30.js
CHANGED
package/script.js
CHANGED
|
@@ -20,15 +20,15 @@ let toolIDs = [
|
|
|
20
20
|
// ########## FUNCTIONS
|
|
21
21
|
|
|
22
22
|
// Creates and returns a script.
|
|
23
|
-
exports.script = (id,
|
|
23
|
+
exports.script = (id, issues = null, ... issueIDs) => {
|
|
24
24
|
// Initialize data on the tools and rules for the specified issues.
|
|
25
25
|
const neededTools = {};
|
|
26
26
|
// If an issue classification and any issues were specified:
|
|
27
|
-
if (
|
|
27
|
+
if (issues && issueIDs.length) {
|
|
28
28
|
// For each specified issue:
|
|
29
29
|
issueIDs.forEach(issueID => {
|
|
30
30
|
// If it exists in the classification:
|
|
31
|
-
const issueData =
|
|
31
|
+
const issueData = issues[issueID];
|
|
32
32
|
if (issueData) {
|
|
33
33
|
// For each tool that tests for the issue:
|
|
34
34
|
const issueToolIDs = Object.keys(issueData.tools);
|
|
@@ -97,7 +97,7 @@ exports.script = (id, issueClasses = null, ... issueIDs) => {
|
|
|
97
97
|
which: toolID
|
|
98
98
|
};
|
|
99
99
|
// If rules were specified:
|
|
100
|
-
if (
|
|
100
|
+
if (issues && issueIDs.length) {
|
|
101
101
|
// Add a rules property to the act.
|
|
102
102
|
toolAct.rules = neededTools[toolID];
|
|
103
103
|
// If the tool is Testaro:
|