testilo 25.0.0 → 25.0.2
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/README.md
CHANGED
|
@@ -40,9 +40,9 @@ SCORED_REPORT_URL=../scored/__id__.json
|
|
|
40
40
|
DIGEST_URL=../digested/__id__.html
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
The first four variables above tell Testilo where to find or save files
|
|
43
|
+
The first four variables above tell Testilo where to find or save files when a user invokes a function. This decreases the count of arguments that the user would otherwise need to specify.
|
|
44
44
|
|
|
45
|
-
The other two variables specify the
|
|
45
|
+
The other two variables specify the destinations of links to scored reports and digests. Digests produced by Testilo digesters link to scored reports, and difgests produced by Testilo difgesters link to digests. The URLs can be absolute, or, if digests and difgests will be opened from a local filesystem, they can be relative to the linking document, as shown. They include the substring `__id__`. A function that needs the URL of a scored report or digest is expected to substitute the ID of that document for `__id__` to produce the URL. Since the `.env` file is excluded from the repository, importing modules that will use `digest()` need a `SCORED_REPORT_URL` environment variable, and importing modules that will use `difgest()` need a `DIGEST_URL` environment variable.
|
|
46
46
|
|
|
47
47
|
## Job preparation
|
|
48
48
|
|
package/call.js
CHANGED
|
@@ -242,13 +242,7 @@ const callCredit = async (tallyID, selector = '') => {
|
|
|
242
242
|
// ########## OPERATION
|
|
243
243
|
|
|
244
244
|
// Execute the requested function.
|
|
245
|
-
if (fn === '
|
|
246
|
-
callAim(... fnArgs)
|
|
247
|
-
.then(() => {
|
|
248
|
-
console.log('Execution completed');
|
|
249
|
-
});
|
|
250
|
-
}
|
|
251
|
-
else if (fn === 'batch' && fnArgs.length === 2) {
|
|
245
|
+
if (fn === 'batch' && fnArgs.length === 2) {
|
|
252
246
|
callBatch(... fnArgs)
|
|
253
247
|
.then(() => {
|
|
254
248
|
console.log('Execution completed');
|
package/package.json
CHANGED
|
@@ -12,14 +12,14 @@ const fs = require('fs/promises');
|
|
|
12
12
|
|
|
13
13
|
// ########## CONSTANTS
|
|
14
14
|
|
|
15
|
-
const
|
|
15
|
+
const reportDir = process.env.REPORTDIR;
|
|
16
16
|
const query = {};
|
|
17
17
|
|
|
18
18
|
// ########## FUNCTIONS
|
|
19
19
|
|
|
20
20
|
// Returns data on the hosts in the report directory.
|
|
21
21
|
const getData = async () => {
|
|
22
|
-
const reportDirAbs = `${__dirname}/../../../${
|
|
22
|
+
const reportDirAbs = `${__dirname}/../../../${reportDir}/scored`;
|
|
23
23
|
const reportFileNamesAll = await fs.readdir(reportDirAbs);
|
|
24
24
|
const reportFileNamesSource = reportFileNamesAll.filter(fileName => fileName.endsWith('.json'));
|
|
25
25
|
const pageCount = reportFileNamesSource.length;
|
|
@@ -12,14 +12,14 @@ const fs = require('fs/promises');
|
|
|
12
12
|
|
|
13
13
|
// ########## CONSTANTS
|
|
14
14
|
|
|
15
|
-
const
|
|
15
|
+
const reportDir = process.env.REPORTDIR;
|
|
16
16
|
const query = {};
|
|
17
17
|
|
|
18
18
|
// ########## FUNCTIONS
|
|
19
19
|
|
|
20
20
|
// Returns data on the hosts in the report directory.
|
|
21
21
|
const getData = async () => {
|
|
22
|
-
const reportDirAbs = `${__dirname}/../../../${
|
|
22
|
+
const reportDirAbs = `${__dirname}/../../../${reportDir}/scored`;
|
|
23
23
|
const reportFileNamesAll = await fs.readdir(reportDirAbs);
|
|
24
24
|
const reportFileNamesSource = reportFileNamesAll.filter(fileName => fileName.endsWith('.json'));
|
|
25
25
|
const pageCount = reportFileNamesSource.length;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
2
|
index: digester for scoring procedure spA11yMessage.
|
|
3
3
|
Creator of parameters for substitution into index.html.
|
|
4
|
-
Usage example for selected files in
|
|
5
|
-
Usage example for all files in
|
|
4
|
+
Usage example for selected files in REPORTDIR/scored: node digest dpA11yMessage 35k1r
|
|
5
|
+
Usage example for all files in REPORTDIR/scored: node digest dpA11yMessage
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
// CONSTANTS
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
/*
|
|
2
2
|
index: digester for scoring procedure spA11yMessage.
|
|
3
3
|
Creator of parameters for substitution into index.html.
|
|
4
|
-
Usage example for selected files in
|
|
5
|
-
Usage example for all files in
|
|
4
|
+
Usage example for selected files in REPORTDIR/scored: node digest dpA11yMessage 35k1r
|
|
5
|
+
Usage example for all files in REPORTDIR/scored: node digest dpA11yMessage
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
// CONSTANTS
|
|
9
9
|
|
|
10
10
|
// Newlines with indentations.
|
|
11
|
-
const joiner = '\n ';
|
|
12
11
|
const innerJoiner = '\n ';
|
|
13
12
|
|
|
14
13
|
// FUNCTIONS
|