testaro 65.0.3 → 65.0.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/package.json +1 -1
- package/procs/tellServer.js +4 -2
- package/run.js +2 -2
package/package.json
CHANGED
package/procs/tellServer.js
CHANGED
|
@@ -23,10 +23,12 @@ const agent = process.env.AGENT;
|
|
|
23
23
|
// Sends a notice to an observer.
|
|
24
24
|
exports.tellServer = (report, messageParams, logMessage) => {
|
|
25
25
|
const {serverID} = report.sources;
|
|
26
|
-
const observerURL = typeof serverID === 'number'
|
|
26
|
+
const observerURL = typeof serverID === 'number'
|
|
27
|
+
? process.env[`NETWATCH_URL_${serverID}_OBSERVE`]
|
|
28
|
+
: '';
|
|
27
29
|
if (observerURL) {
|
|
28
30
|
const whoParams = `agent=${agent}&jobID=${report.id || ''}`;
|
|
29
|
-
const wholeURL = `${
|
|
31
|
+
const wholeURL = `${observerURL}?${whoParams}&${messageParams}`;
|
|
30
32
|
const client = wholeURL.startsWith('https://') ? httpsClient : httpClient;
|
|
31
33
|
client.request(wholeURL)
|
|
32
34
|
// If the notification threw an error:
|
package/run.js
CHANGED
|
@@ -1731,7 +1731,7 @@ const doActs = async (report, opts = {}) => {
|
|
|
1731
1731
|
}
|
|
1732
1732
|
// Notify the observer and log the start of identification.
|
|
1733
1733
|
tellServer(report, '', 'Starting element identification');
|
|
1734
|
-
// For each of
|
|
1734
|
+
// For each of the standard instances of the act:
|
|
1735
1735
|
for (const instance of act.standardResult.instances) {
|
|
1736
1736
|
let {boxID, pathID} = instance;
|
|
1737
1737
|
// If the instance does not have both a box ID and a valid path ID:
|
|
@@ -1773,7 +1773,7 @@ const doActs = async (report, opts = {}) => {
|
|
|
1773
1773
|
excerpt && ! ['<', '>', '=', '#'].some(markupChar => excerpt.includes(markupChar))
|
|
1774
1774
|
) {
|
|
1775
1775
|
// Add the excerpt (up to any ellipsis) to the text property.
|
|
1776
|
-
instance.text = excerpt.split(
|
|
1776
|
+
instance.text = excerpt.split(/ … | *\.\.\./)[0];
|
|
1777
1777
|
}
|
|
1778
1778
|
// Otherwise, i.e. if it has no markup-free excerpt but has a non-empty path ID:
|
|
1779
1779
|
else if (pathID) {
|