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

nocloud-proto

v1.0.1

Published

Buf generated Protobufs and API services for EcmaScript

Downloads

14

Readme

NoCloud API Proto

This repo containes protobuf files and Go generated code for the NoCloud APIs.

Install

Go

At your project(where go.mod is):

go get github.com/slntopp/nocloud-proto@latest

How to use

Generating

  1. Clone this repo
  2. Navigate to cloned repo directory

Docker

Just run:

docker run -it \
  -v $(pwd):/go/src/github.com/slntopp/nocloud-proto \
  ghcr.io/slntopp/nocloud/buf:latest

Buf

Set up buf, follow Dockerfile for additional dependencies.

Run buf generate

How to generate code for you language

Check according module for buf, add it to buf.gen.yaml, run buf generate.

If you're generating using Docker, you'd have to build image first.

JavaScript/Typescript

buf.gen.ts.yaml as well as generated code can be found in this repo. To regenerate code, you would need to have dependencies listed in dependencies.json installed, as well as protoc-gen-js, which can either be installed using brew install protobuf@3 or downloaded as binary from Releases here.

Once you're all set up, run:

buf generate --template buf.gen.ts.yaml

How to Use

See examples/ts for Example in TypeScript.

PHP

buf.gen.php.yaml as well as generated code can be found in this repo. In order to regenerate code, you would need to have grpc_php_plugin.

PHP gRPC

Follow the offical manual from Google to install all the necessary tools

grpc_php_plugin

You need the grpc_php_plugin to generate the PHP client stub classes. This plugin works with the main protoc binary to generate classes that you can import into your project.

You can build grpc_php_plugin with cmake (mind that you have to replace RELEASE_TAG_HERE):

git clone -b RELEASE_TAG_HERE https://github.com/grpc/grpc
cd grpc
git submodule update --init
mkdir -p cmake/build
cd cmake/build
cmake ../..
make protoc grpc_php_plugin

Put grpc_php_plugin to /usr/local/bin or another directory

It is necessary to change the path option in buf.gen.php.yaml if grpc_php_plugin location differs from /usr/local/bin

Source

Dart/Flutter

buf.gen.ts.yaml can be found in this repo. In order to regenerate code, you would need to have protoc_gen_dart which can be obtained with dart pub.