Skip to content

Commit a2e9f59

Browse files
author
Javier Acuna
committed
Merge branch 'develop' into 'master'
Develop See merge request prey/js/prey-node-client!1260
2 parents f3d2d06 + 388cbe1 commit a2e9f59

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Change Log
22

3+
## [v1.13.18](https://github.com/prey/prey-node-client/tree/v1.13.18) (2025-07-15)
4+
[Full Changelog](https://github.com/prey/prey-node-client/compare/v1.13.17..v1.13.18)
5+
6+
- Feat: Removes redundancy from the code to obtain the status report. ([SoraKenji](https://github.com/SoraKenji))
7+
38
## [v1.13.17](https://github.com/prey/prey-node-client/tree/v1.13.17) (2025-07-08)
49
[Full Changelog](https://github.com/prey/prey-node-client/compare/v1.13.16..v1.13.17)
510

lib/agent/triggers/status/index.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,12 @@ exports.get_status = (cb, nameCallBack = '') => {
7373
// eslint-disable-next-line max-len
7474
exports.statusCallbacks = exports.statusCallbacks.filter((el) => el.nameCallBack !== nameCallBack);
7575
}
76-
let statusToSend = exports.status;
7776
try {
78-
const xPreyStatus = exports.status;
79-
verifyContent(xPreyStatus);
80-
statusToSend = JSON.stringify(xPreyStatus);
77+
JSON.stringify(exports.status);
8178
} catch (e) {
8279
logger.debug(`Error verifying : ${e}`);
8380
}
84-
exports.status = statusToSend;
85-
return cb(null, statusToSend);
81+
return cb(null, exports.status);
8682
}
8783
if (!timeoutGetStatus) {
8884
timeoutGetStatus = setTimeout(() => {
@@ -114,9 +110,7 @@ exports.get_status = (cb, nameCallBack = '') => {
114110
timeoutGetStatus = null;
115111
let statusToSend;
116112
try {
117-
const xPreyStatus = statusInfo;
118-
verifyContent(xPreyStatus);
119-
statusToSend = JSON.stringify(xPreyStatus);
113+
verifyContent(statusInfo);
120114
} catch (e) {
121115
logger.debug(`Error verifying : ${e}`);
122116
}

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "prey",
3-
"version": "1.13.17",
3+
"version": "1.13.18",
44
"author": "Engineering <[email protected]>",
55
"keywords": [
66
"prey",

0 commit comments

Comments
 (0)