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

@ospin/pusher

Package Overview
Dependencies
Maintainers
4
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ospin/pusher

OSPIN package for communcation to the pusher channels of the OSPIN cloud

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

codecov

Documentation can be found here.


Table of Contents


Overview

@ospin/pusher is a JavaScript SDK to communicate to Ospin's pusher channel for real time information on devices and processes. It is build on top of pusher-js. To use it the user has to be registered at OSPIN.

Configuration
// connect to the client

const userId = "a3339d89-345b-4baf-9859-46a4542a505a"
pusher.OspinClient.connect({
  env: 'prod',
  userId,
  /* using the default auth methods provided in the @ospin/nexus package */
  authDeviceSubscriptions: nexus.user.pusher.subscriptions.device.authorizeMany,
  authDeviceProcessSubscriptions: nexus.user.pusher.subscriptions.device.process.authorizeMany,
})

Use Example


// subscribe

const deviceId = "b3249d89-345b-4baf-9859-46a4542a505a"
const handlers = {
  "device-state-update": data => console.log(data)
}

pusher.DevicePusherChannel.subscribe({ deviceId }, handlers)

// unsubscribe

pusher.DevicePusherChannel.unsubscribe({ deviceId })

// disconnect

pusher.OspinClient.disconnect()

Contributing

This repo employs the github action semantic-release, which, on approved PRs to main, sniffs the PR title/commit message to automatically bump the semantic versioning and publish the package to NPM.

All PRs to the main branch should indicate the semantic version change via the following options:

Available types:

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation only changes (unclear if this bumps version)
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
  • refactor: A code change that neither fixes a bug nor adds a feature
  • perf: A code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
  • ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit

Add BREAKING CHANGE into the commit message body (!) to indicate a major version release.

FAQs

Package last updated on 20 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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