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

botbuilder

Package Overview
Dependencies
Maintainers
1
Versions
631
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

botbuilder - npm Package Compare versions

Comparing version 4.0.0-m2.1 to 4.0.0-m2.2

tests/consoleAdapter.test.js

2

lib/consoleAdapter.d.ts

@@ -34,2 +34,4 @@ /// <reference types="node" />

protected createInterface(options: readline.ReadLineOptions): readline.ReadLine;
protected print(line: string): void;
protected printError(line: string): void;
}

21

lib/consoleAdapter.js

@@ -51,5 +51,5 @@ "use strict";

this.runMiddleware(context, logic)
.catch((err) => { console.error(err.toString()); });
.catch((err) => { this.printError(err.toString()); });
});
return function quit() {
return function close() {
rl.close();

@@ -59,2 +59,3 @@ };

sendActivity(activities) {
const that = this;
return new Promise((resolve, reject) => {

@@ -66,5 +67,5 @@ const responses = [];

let a = activities[i];
switch (a.type || botbuilder_core_1.ActivityTypes.Message) {
switch (a.type) {
case 'delay':
setTimeout(() => next(i + 1), a.value || 0);
setTimeout(() => next(i + 1), a.value);
break;

@@ -74,6 +75,6 @@ case botbuilder_core_1.ActivityTypes.Message:

const append = a.attachments.length == 1 ? `(1 attachment)` : `(${a.attachments.length} attachments)`;
console.log(`${a.text || ''} ${append}`);
that.print(`${a.text} ${append}`);
}
else {
console.log(a.text || '');
that.print(a.text);
}

@@ -83,3 +84,3 @@ next(i + 1);

default:
console.log(`[${a.type}]`);
that.print(`[${a.type}]`);
next(i + 1);

@@ -105,4 +106,10 @@ break;

}
print(line) {
console.log(line);
}
printError(line) {
console.error(line);
}
}
exports.ConsoleAdapter = ConsoleAdapter;
//# sourceMappingURL=consoleAdapter.js.map

@@ -5,3 +5,3 @@ {

"description": "Services for Microsoft BotBuilder.",
"version": "4.0.0-m2.1",
"version": "4.0.0-m2.2",
"license": "MIT",

@@ -24,6 +24,8 @@ "keywords": [

"dependencies": {
"@types/node": "^9.3.0",
"@types/filenamify": "^2.0.1",
"async-file": "^2.0.2",
"botbuilder-core": "4.0.0-m2.1",
"botbuilder-core-extensions": "4.0.0-m2.1",
"botframework-connector": "4.0.0-m2.1",
"botbuilder-core": "4.0.0-m2.2",
"botbuilder-core-extensions": "4.0.0-m2.2",
"botframework-connector": "4.0.0-m2.2",
"filenamify": "^2.0.0",

@@ -33,5 +35,3 @@ "readline": "^1.3.0"

"devDependencies": {
"@types/filenamify": "^2.0.1",
"@types/mocha": "^2.2.47",
"@types/node": "^9.3.0",
"codelyzer": "^4.1.0",

@@ -38,0 +38,0 @@ "mocha": "^5.0.0",

@@ -54,5 +54,5 @@ /**

this.runMiddleware(context, logic)
.catch((err) => { console.error(err.toString()) });
.catch((err) => { this.printError(err.toString()) });
});
return function quit() {
return function close() {
rl.close();

@@ -63,2 +63,3 @@ }

public sendActivity(activities: Partial<Activity>[]): Promise<ResourceResponse[]> {
const that = this;
return new Promise((resolve, reject) => {

@@ -70,5 +71,5 @@ const responses: ResourceResponse[] = [];

let a = activities[i];
switch (a.type || ActivityTypes.Message) {
switch (a.type) {
case <ActivityTypes>'delay':
setTimeout(() => next(i + 1), a.value || 0);
setTimeout(() => next(i + 1), a.value);
break;

@@ -78,5 +79,5 @@ case ActivityTypes.Message:

const append = a.attachments.length == 1 ? `(1 attachment)` : `(${a.attachments.length} attachments)`;
console.log(`${a.text || ''} ${append}`);
that.print(`${a.text} ${append}`);
} else {
console.log(a.text || '');
that.print(a.text);
}

@@ -86,3 +87,3 @@ next(i + 1);

default:
console.log(`[${a.type}]`);
that.print(`[${a.type}]`);
next(i + 1);

@@ -110,2 +111,10 @@ break;

}
protected print(line: string) {
console.log(line);
}
protected printError(line: string) {
console.error(line);
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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