New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

botpress-hitl

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

botpress-hitl - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

28

bin/node.bundle.js

@@ -196,3 +196,3 @@ module.exports =

pause: function pause(platform, userId) {
db.setSessionPaused(true, platform, userId, 'code').then(function (sessionId) {
return db.setSessionPaused(true, platform, userId, 'code').then(function (sessionId) {
bp.events.emit('hitl.session', { id: sessionId });

@@ -203,6 +203,9 @@ bp.events.emit('hitl.session.changed', { id: sessionId, paused: 1 });

unpause: function unpause(platform, userId) {
db.setSessionPaused(false, platform, userId, 'code').then(function (sessionId) {
return db.setSessionPaused(false, platform, userId, 'code').then(function (sessionId) {
bp.events.emit('hitl.session', { id: sessionId });
bp.events.emit('hitl.session.changed', { id: sessionId, paused: 0 });
});
},
isPaused: function isPaused(platform, userId) {
return db.isSessionPaused(platform, userId);
}

@@ -417,2 +420,20 @@ };

function isSessionPaused(platform, userId) {
var sessionId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
var toBool = function toBool(s) {
return (0, _botpress.DatabaseHelpers)(knex).bool.parse(s);
};
if (sessionId) {
return knex('hitl_sessions').where({ id: sessionId }).select('paused').then().get(0).then(function (s) {
return s && toBool(s.paused);
});
} else {
return knex('hitl_sessions').where({ userId: userId, platform: platform }).select('paused').then().get(0).then(function (s) {
return s && toBool(s.paused);
});
}
}
function getAllSessions(onlyPaused) {

@@ -451,3 +472,4 @@ var condition = '';

getSessionData: getSessionData,
getSession: getSession
getSession: getSession,
isSessionPaused: isSessionPaused
};

@@ -454,0 +476,0 @@ };

2

package.json
{
"name": "botpress-hitl",
"version": "1.0.8",
"version": "1.0.9",
"description": "Official HITL (Human In The Loop) module for Botpress",

@@ -5,0 +5,0 @@ "main": "bin/node.bundle.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc