@opentermsarchive/engine 5.0.5 → 5.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/package.json
CHANGED
|
@@ -21,7 +21,7 @@ export default async function fetch(url, cssSelectors, config) {
|
|
|
21
21
|
await page.setDefaultNavigationTimeout(config.navigationTimeout);
|
|
22
22
|
await page.setExtraHTTPHeaders({ 'Accept-Language': config.language });
|
|
23
23
|
|
|
24
|
-
response = await page.goto(url, { waitUntil: '
|
|
24
|
+
response = await page.goto(url, { waitUntil: 'load' }); // Using `load` instead of `networkidle0` as it's more reliable and faster. The 'load' event fires when the page and all its resources (stylesheets, scripts, images) have finished loading. `networkidle0` can be problematic as it waits for 500ms of network inactivity, which may never occur on dynamic pages and then triggers a navigation timeout.
|
|
25
25
|
|
|
26
26
|
if (!response) {
|
|
27
27
|
throw new Error(`Response is empty when trying to fetch '${url}'`);
|
package/src/reporter/index.js
CHANGED
|
@@ -147,7 +147,7 @@ No changes were found in the last run, so no new version has been recorded.`,
|
|
|
147
147
|
return `
|
|
148
148
|
### No version of the \`${terms.type}\` of service \`${terms.service.name}\` is recorded anymore since ${currentFormattedDate}
|
|
149
149
|
|
|
150
|
-
The source document${terms.hasMultipleSourceDocuments ? 's have' : ' has'}${hasSnapshots ? ' ' : ' not '}been recorded
|
|
150
|
+
The source document${terms.hasMultipleSourceDocuments ? 's have' : ' has'}${hasSnapshots ? ' ' : ' not '}been recorded as ${terms.hasMultipleSourceDocuments ? 'snapshots' : 'a snapshot'}, ${hasSnapshots ? 'but ' : 'thus '} no version can be [extracted](${DOC_URL}/concepts/main/#tracking-terms).
|
|
151
151
|
${hasSnapshots ? 'After correction, it might still be possible to recover the missed versions.' : ''}
|
|
152
152
|
|
|
153
153
|
### What went wrong
|
|
@@ -169,7 +169,7 @@ First of all, check if the source documents are accessible through a web browser
|
|
|
169
169
|
#### If the source documents are not accessible anymore
|
|
170
170
|
|
|
171
171
|
- If the source documents have moved, find their new location and [update it](${contributionToolUrl}).
|
|
172
|
-
- If these terms have been removed, move them from the declaration to its [history file](${DOC_URL}/
|
|
172
|
+
- If these terms have been removed, move them from the declaration to its [history file](${DOC_URL}/terms/explanation/declarations-maintenance/#service-history-reference), using \`${validUntil}\` as the \`validUntil\` value.
|
|
173
173
|
- If the service has closed, move the entire contents of the declaration to its [history file](${DOC_URL}/contributing-terms/#service-history), using \`${validUntil}\` as the \`validUntil\` value.
|
|
174
174
|
|
|
175
175
|
#### If none of the above works
|