Socket
Socket
Sign inDemoInstall

botframework-streaming

Package Overview
Dependencies
Maintainers
3
Versions
508
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

botframework-streaming - npm Package Compare versions

Comparing version 4.23.0-dev.20240405 to 4.23.0-rc1

2

_ts3.4/lib/webSocket/nodeWebSocket.d.ts

@@ -8,3 +8,3 @@ /**

*/
import * as WebSocket from 'ws';
import WebSocket from 'ws';
import { INodeIncomingMessage, INodeBuffer, INodeSocket, ISocket } from '../interfaces';

@@ -11,0 +11,0 @@ /**

@@ -8,3 +8,3 @@ /**

*/
import * as WebSocket from 'ws';
import WebSocket from 'ws';
import { INodeIncomingMessage, INodeBuffer, INodeSocket, ISocket } from '../interfaces';

@@ -11,0 +11,0 @@ /**

@@ -18,2 +18,5 @@ "use strict";

};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -23,4 +26,4 @@ exports.NodeWebSocket = void 0;

const url_1 = require("url");
const crypto = require("crypto");
const WebSocket = require("ws");
const crypto_1 = __importDefault(require("crypto"));
const ws_1 = __importDefault(require("ws"));
const NONCE_LENGTH = 16;

@@ -49,3 +52,3 @@ /**

return __awaiter(this, void 0, void 0, function* () {
this.wsServer = new WebSocket.Server({ noServer: true });
this.wsServer = new ws_1.default.Server({ noServer: true });
return new Promise((resolve, reject) => {

@@ -70,3 +73,3 @@ try {

get isConnected() {
return this.wsSocket && this.wsSocket.readyState === WebSocket.OPEN;
return this.wsSocket && this.wsSocket.readyState === ws_1.default.OPEN;
}

@@ -98,3 +101,3 @@ /**

return new Promise((resolve, reject) => {
const ws = (this.wsSocket = new WebSocket(url));
const ws = (this.wsSocket = new ws_1.default(url));
ws.once('error', ({ message }) => reject(new Error(message)));

@@ -114,5 +117,5 @@ ws.once('open', () => resolve());

// More readings at https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_servers#client_handshake_request.
this.wsServer = new WebSocket.Server({ noServer: true });
this.wsServer = new ws_1.default.Server({ noServer: true });
// Key generation per https://tools.ietf.org/html/rfc6455#section-1.3 (pg. 7)
const wskey = crypto.randomBytes(NONCE_LENGTH).toString('base64');
const wskey = crypto_1.default.randomBytes(NONCE_LENGTH).toString('base64');
const options = {

@@ -119,0 +122,0 @@ port: port,

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

"description": "Streaming library for the Microsoft Bot Framework",
"version": "4.23.0-dev.20240405",
"version": "4.23.0-rc1",
"license": "MIT",

@@ -37,3 +37,3 @@ "keywords": [

"uuid": "^8.3.2",
"ws": "^7.1.2"
"ws": "^7.5.10"
},

@@ -40,0 +40,0 @@ "devDependencies": {

@@ -11,4 +11,4 @@ /**

import { URL } from 'url';
import * as crypto from 'crypto';
import * as WebSocket from 'ws';
import crypto from 'crypto';
import WebSocket from 'ws';

@@ -15,0 +15,0 @@ import { INodeIncomingMessage, INodeBuffer, INodeSocket, ISocket } from '../interfaces';

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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