npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@iotics/grpc-client

v4.2.0

Published

Library for making gRPC-Web requests to IOTICSpace from a browser.

Downloads

151

Readme

Iotics gRPC-Web

A JavaScript/TypeScript client for interacting with Iotics API.

Usage and Version Compatibility with Iotics host:

| iotics-grpc-client-ts | iotics-host | |----------------------| ----------- | | yarn add @iotics/grpc-client@^4 | >= 5 | | yarn add @iotics/grpc-client@^3 | >= 5 | | yarn add @iotics/grpc-client@^2 | >= 5 | | yarn add @iotics/grpc-client@^1 | >= 4 |

gRPC-Web transports

Iotics client can be run over WebSocket in case HTTP2 is not available or bidirectional streaming is required. To use WebSockets instead of HTTP, import the grpc from the Iotics client and set the default transport like so:

import { grpc } from '@iotics/grpc-client';
grpc.setDefaultTransport(grpc.WebsocketTransport());

Additionally, to be able to run Iotics client using Node.js (see Examples section below), the transport could be set to:

grpc.setDefaultTransport(NodeHttpTransport());

By default, the transport is set to cross browser:

grpc.setDefaultTransport(grpc.CrossBrowserHttpTransport({ withCredentials: false }));

Examples

  • ts-node - example usages within Node.js runtime environment.

Contributing

Installing dependencies and generating gRPC client

  • To satisfy all dependencies and generate client - in a fresh clone of this repo:
    make build
  • To update dependencies and regenerate files - in already existing local repo:
    make clean build
  • To update the Iotics API version and regenerate client
    (proto files are submoduled in ./iotics-api.git/ from Iotics API repo)
    use the following as guidelines:
    git submodule update --init
    _ver=vX.X.X
    pushd iotics-api.git
    git fetch --tags
    git checkout "tags/$_ver"
    popd
    make generate-update
    # After addressing the changes of the new client in `src`, please update "Unreleased" section in CHANGELOG.md
    git add CHANGELOG.md iotics-api.git src
    git commit -m "Update Iotics API to $_ver"
    git push

PRs

Should contain a summary of the changes in CHANGELOG.md under the "Unreleased" section.

Releasing

Note: Currently this package is not easy to use, hence it may contain breaking changes between patches until v2 is realeased.

  • Update package version in package.json for the release:
    yarn version --no-git-tag-version --patch
    • For release candidates:
      yarn version --no-git-tag-version --preid rc --prerelease
    • More about updating version: https://classic.yarnpkg.com/en/docs/cli/version
  • Update CHANGELOG.md (move notes from unreleased section, ensure right tags are used, etc.) and any other files as needed.
  • Commit changes and create a PR.
  • Once PR is merged, tag the commit:
    _ver=vX.X.X  # _ver="v$(grep version package.json |cut -d'"' -f4)"
    git tag -a "$_ver" -m "$_ver"
    git push origin "$_ver"
  • The Draft Release GitHub Action will pick it up and create a draft release in releases.
  • Update the release's information and publish it.
  • The Publish GitHub Action will create a package and will publish it to the NPM. Note that at this point, the package for the specified version can no longer be changed. To learn more about how the npm registry treats versions, see their unpublish policies.