Socket
Socket
Sign inDemoInstall

@oada/client

Package Overview
Dependencies
Maintainers
8
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@oada/client - npm Package Compare versions

Comparing version 2.1.2-beta.0 to 2.2.1

2

dist/client.js

@@ -104,3 +104,3 @@ "use strict";

let headers = {};
if (request.rev) {
if (typeof (request.rev) !== 'undefined') {
headers["x-oada-rev"] = request.rev;

@@ -107,0 +107,0 @@ }

@@ -35,2 +35,8 @@ "use strict";

})(ConnectionStatus || (ConnectionStatus = {}));
class BetterWebSocket extends WebSocket {
constructor(url, protocols = [], _a = {}) {
var { maxPayload = 0 } = _a, rest = __rest(_a, ["maxPayload"]);
super(url, protocols, Object.assign({ maxPayload }, rest));
}
}
class WebSocketClient extends events_1.EventEmitter {

@@ -44,3 +50,3 @@ constructor(domain, concurrency = 10) {

const ws = new reconnecting_websocket_1.default("wss://" + this._domain, [], {
WebSocket,
WebSocket: BetterWebSocket,
});

@@ -47,0 +53,0 @@ ws.onopen = () => {

{
"name": "@oada/client",
"version": "2.1.2-beta.0",
"version": "2.2.1",
"description": "A lightweight client tool to interact with an OADA-compliant server",

@@ -22,3 +22,3 @@ "repository": "https://github.com/OADA/client",

"dependencies": {
"@oada/types": "^1.2.0-beta.18",
"@oada/types": "^1.2.0",
"cross-fetch": "^3.0.6",

@@ -25,0 +25,0 @@ "debug": "^4.1.1",

@@ -5,9 +5,12 @@ # @oada/client

| | `@oada/client` | `@oada/oada-cache` |
| --- | --- | --- |
| Language | TypeScript | JavaScript |
| Supported protocols | websocket | websocket, HTTP |
| Internal cache | No | Yes |
[![npm](https://img.shields.io/npm/v/@oada/client)](https://www.npmjs.com/package/@oada/client)
## Installation
This module is available through npm. To install the module, simply run:
```bash
$ npm install @oada/client
```
## Usage

@@ -20,4 +23,4 @@

const connection = await client.connect({
domain: "api.oada.com",
token: "abc"
domain: "api.oada.com", // domain of OADA server
token: "abc" // token
})

@@ -24,0 +27,0 @@ ```

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