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

@dreygur/td365

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dreygur/td365 - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

2

example.ts

@@ -7,2 +7,4 @@ import express from 'express';

// process.env.PROXY
const auth: Auth = {

@@ -9,0 +11,0 @@ "action": "authentication",

@@ -11,2 +11,3 @@ "use strict";

const subscribe = () => subscriptions.forEach(subscription => ws.send(JSON.stringify(subscription)));
const login = () => startListening(auth, subscriptions, allEvents, callback, secondCallBack);
// On Error

@@ -19,3 +20,3 @@ ws.on('error', console.error);

// Subscribe
subscribe();
// subscribe()
});

@@ -25,7 +26,16 @@ // On Event/Response

const event = JSON.parse(data.toString());
console.log(event);
if (event.t === 'heartbeat')
ws.send(JSON.stringify(event.d));
else if (event.t === 'authenticationResponse' && event.d.HasError)
login();
else if (event.t === 'authenticationResponse' && !event.d.HasError) {
subscribe();
secondCallBack();
}
else
callback(allEvents, event, subscribe);
if (event.t === 'heartbeat')
ws.send(JSON.stringify(event.d));
else
callback(allEvents, event, subscribe);
// Unnecessary But Asked by @jayeen28

@@ -32,0 +42,0 @@ if (event.t === 'authenticationResponse' && !event.d.HasError) {

@@ -7,2 +7,3 @@ "use strict";

const axios_1 = __importDefault(require("axios"));
const https_proxy_agent_1 = require("https-proxy-agent");
const BASE_URL = 'https://demo.tradedirect365.com';

@@ -17,2 +18,3 @@ async function request(path, cookie, reqBody) {

method: 'POST',
httpsAgent: new https_proxy_agent_1.HttpsProxyAgent(process.env.PROXY || ''),
headers: {

@@ -19,0 +21,0 @@ cookie,

3

package.json
{
"name": "@dreygur/td365",
"version": "1.0.5",
"version": "1.0.6",
"description": "A wraper for tradedirect365.com",

@@ -32,2 +32,3 @@ "main": "lib/index.js",

"express": "^4.18.2",
"https-proxy-agent": "^7.0.1",
"node-fetch": "^3.3.2",

@@ -34,0 +35,0 @@ "ws": "^8.13.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