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

@ibm-watson/assistant-intermediate

Package Overview
Dependencies
Maintainers
6
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ibm-watson/assistant-intermediate - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

6

package.json
{
"name": "@ibm-watson/assistant-intermediate",
"description": "A simple Node.js based web app which shows how to use the Watson Assistant API to recognize user intents.",
"version": "2.0.0",
"version": "2.0.1",
"main": "server.js",

@@ -31,2 +31,6 @@ "scripts": {

},
"engines": {
"node": ">=8.15.0"
},
"engineStrict": true,
"devDependencies": {

@@ -33,0 +37,0 @@ "babel-eslint": "^10.0.1",

@@ -6,2 +6,3 @@ // The Api module is designed to handle all interactions with the server

var responsePayload;
var messageEndpoint = '/api/message';

@@ -31,2 +32,4 @@

responsePayload = JSON.parse(newPayloadStr);
},
setErrorPayload: function() {
}

@@ -40,3 +43,3 @@ };

http.onreadystatechange = function () {
if (http.readyState == XMLHttpRequest.DONE) {
if (http.readyState === XMLHttpRequest.DONE) {
var res = JSON.parse(http.responseText);

@@ -70,5 +73,16 @@ sessionId = res.session_id;

http.setRequestHeader('Content-type', 'application/json');
http.onreadystatechange = function() {
if (http.readyState === 4 && http.status === 200 && http.responseText) {
http.onreadystatechange = function () {
if (http.readyState === XMLHttpRequest.DONE && http.status === 200 && http.responseText) {
Api.setResponsePayload(http.responseText);
} else if (http.readyState === XMLHttpRequest.DONE && http.status !== 200) {
Api.setErrorPayload({
'output': {
'generic': [
{
'response_type': 'text',
'text': 'I\'m having trouble connecting to the server, please refresh the page'
}
],
}
});
}

@@ -75,0 +89,0 @@ };

@@ -51,2 +51,6 @@ // The ConversationPanel module is designed to handle

};
Api.setErrorPayload = function (newPayload) {
displayMessage(newPayload, settings.authorTypes.watson);
};
}

@@ -53,0 +57,0 @@

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