testilo 25.0.0 → 25.0.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/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. Reports and their derivatives are saved in particular subdirectories of the `REPORTDIR` directory.
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 URLs by which scored reports and digests can be retrieved from the documents that link to them. Specifically, digests link to scored reports, and difgests 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. Testilo needs these variables so it can embed correct links into digests and difgests derived from reports. Since the `.env` file is excluded from the repository, importing modules need their own identically named environment variables.
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testilo",
3
- "version": "25.0.0",
3
+ "version": "25.0.1",
4
4
  "description": "Prepares and processes Testaro reports",
5
5
  "main": "aim.js",
6
6
  "scripts": {
@@ -12,14 +12,14 @@ const fs = require('fs/promises');
12
12
 
13
13
  // ########## CONSTANTS
14
14
 
15
- const reportDirScored = process.env.REPORTDIR_SCORED || 'reports/scored';
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}/../../../${reportDirScored}`;
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 reportDirScored = process.env.REPORTDIR_SCORED || 'reports/scored';
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}/../../../${reportDirScored}`;
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 REPORTDIR_SCORED: node digest dpA11yMessage 35k1r
5
- Usage example for all files in REPORTDIR_SCORED: node digest dpA11yMessage
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 REPORTDIR_SCORED: node digest dpA11yMessage 35k1r
5
- Usage example for all files in REPORTDIR_SCORED: node digest dpA11yMessage
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