@perforce-perfecto/scriptless-helpers 1.69.0 → 1.69.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/package.json
CHANGED
|
@@ -11,38 +11,42 @@ class ExitExecutionHelper extends scriptless_helper_1.ScriptlessHelper {
|
|
|
11
11
|
}
|
|
12
12
|
gracefullyBlockExecution(parentExecutionId, executionMode, getOpenWebdriverSessions, reportName, runningScriptStaticInfo, userDefinedVariables, scriptError) {
|
|
13
13
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
14
|
+
this.logger.debug(`gracefullyBlockExecution invoked for parentExecutionId='${parentExecutionId}', executionMode='${executionMode}', reportName='${reportName}', scriptError='${scriptError}'`);
|
|
14
15
|
yield this.gracefullyExitExecution(parentExecutionId, executionMode, getOpenWebdriverSessions, reportName, runningScriptStaticInfo, userDefinedVariables, {
|
|
15
16
|
actionError: scriptError
|
|
16
17
|
});
|
|
18
|
+
this.logger.debug(`gracefullyBlockExecution completed for parentExecutionId='${parentExecutionId}'`);
|
|
17
19
|
});
|
|
18
20
|
}
|
|
19
|
-
gracefullyExitExecution(
|
|
20
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
21
|
-
_parentExecutionId,
|
|
22
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
23
|
-
_executionMode, getOpenWebdriverSessions,
|
|
21
|
+
gracefullyExitExecution(_parentExecutionId, _executionMode, getOpenWebdriverSessions,
|
|
24
22
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
25
23
|
_reportName,
|
|
26
24
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
27
25
|
_runningScriptStaticInfo,
|
|
28
26
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
29
|
-
_userDefinedVariables,
|
|
30
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
31
|
-
_activeScriptFunctionData) {
|
|
27
|
+
_userDefinedVariables, _activeScriptFunctionData) {
|
|
32
28
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
this.logger.debug(`gracefullyExitExecution invoked for parentExecutionId='${_parentExecutionId}', executionMode='${_executionMode}', hasActionError=${!!(_activeScriptFunctionData === null || _activeScriptFunctionData === void 0 ? void 0 : _activeScriptFunctionData.actionError)}`);
|
|
33
30
|
const openedDriverSessions = getOpenWebdriverSessions
|
|
34
31
|
? getOpenWebdriverSessions()
|
|
35
32
|
: [];
|
|
33
|
+
this.logger.debug(`Resolved ${openedDriverSessions.length} open WebDriver session(s) for parentExecutionId='${_parentExecutionId}' (getOpenWebdriverSessions provided=${!!getOpenWebdriverSessions})`);
|
|
36
34
|
this.logger.log(`Gracefully exiting execution...`);
|
|
37
35
|
if (openedDriverSessions.length > 0) {
|
|
38
36
|
try {
|
|
37
|
+
this.logger.debug(`Closing ${openedDriverSessions.length} WebDriver session(s) in parallel for parentExecutionId='${_parentExecutionId}'`);
|
|
39
38
|
yield this.webdriverSessionHelper.closeWebdriverSessionsInParallel(openedDriverSessions);
|
|
39
|
+
this.logger.debug(`Finished closing WebDriver session(s) for parentExecutionId='${_parentExecutionId}'`);
|
|
40
40
|
}
|
|
41
41
|
catch (error) {
|
|
42
42
|
this.logger.error(`Error occurred while closing WebDriver sessions`, error);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
+
else {
|
|
46
|
+
this.logger.debug(`No open WebDriver sessions to close for parentExecutionId='${_parentExecutionId}'`);
|
|
47
|
+
}
|
|
45
48
|
this.logger.log(`Gracefully exiting execution...`);
|
|
49
|
+
this.logger.debug(`gracefullyExitExecution completed for parentExecutionId='${_parentExecutionId}'`);
|
|
46
50
|
});
|
|
47
51
|
}
|
|
48
52
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exit-execution-helper.js","sourceRoot":"","sources":["../../../../../libs/execution-helpers-public/src/lib/exit-execution-helper.ts"],"names":[],"mappings":";;;;AAEA,kEAA8D;AAC9D,yEAAoE;AAGpE,MAAa,mBAAoB,SAAQ,oCAAgB;IAEvD,YAAY,MAAe;QACzB,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,sBAAsB,GAAG,IAAI,iDAAsB,CAAC,MAAM,CAAC,CAAC;IACnE,CAAC;IAEK,wBAAwB,CAC5B,iBAAyB,EACzB,aAAqB,EACrB,wBAAyC,EACzC,UAAkB,EAClB,uBAAgC,EAChC,oBAA0C,EAC1C,WAAmB;;YAEnB,MAAM,IAAI,CAAC,uBAAuB,CAChC,iBAAiB,EACjB,aAAa,EACb,wBAAwB,EACxB,UAAU,EACV,uBAAuB,EACvB,oBAAoB,EACpB;gBACE,WAAW,EAAE,WAAW;aACzB,CACF,CAAC;QACJ,CAAC;KAAA;IAEK,uBAAuB
|
|
1
|
+
{"version":3,"file":"exit-execution-helper.js","sourceRoot":"","sources":["../../../../../libs/execution-helpers-public/src/lib/exit-execution-helper.ts"],"names":[],"mappings":";;;;AAEA,kEAA8D;AAC9D,yEAAoE;AAGpE,MAAa,mBAAoB,SAAQ,oCAAgB;IAEvD,YAAY,MAAe;QACzB,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,sBAAsB,GAAG,IAAI,iDAAsB,CAAC,MAAM,CAAC,CAAC;IACnE,CAAC;IAEK,wBAAwB,CAC5B,iBAAyB,EACzB,aAAqB,EACrB,wBAAyC,EACzC,UAAkB,EAClB,uBAAgC,EAChC,oBAA0C,EAC1C,WAAmB;;YAEnB,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,2DAA2D,iBAAiB,qBAAqB,aAAa,kBAAkB,UAAU,mBAAmB,WAAW,GAAG,CAC5K,CAAC;YACF,MAAM,IAAI,CAAC,uBAAuB,CAChC,iBAAiB,EACjB,aAAa,EACb,wBAAwB,EACxB,UAAU,EACV,uBAAuB,EACvB,oBAAoB,EACpB;gBACE,WAAW,EAAE,WAAW;aACzB,CACF,CAAC;YACF,IAAI,CAAC,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