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

protogenjs

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

protogenjs

Utility for generating interfaces from *.proto schemes

  • 2.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

protogenjs

Circle CI Status npm

Utility for generating interfaces from *.proto schemes.

Eliminates hardcode paths to files and folders.

Recursively reads the paths to the schemes in the specified directory and generates the correct *.js and *.d.ts files.

A configuration file is required for operation (specified by the argument --config).

Sample configuration file:

{
    "srcPaths": ["./test/proto/**/*.proto"],
    "distDir": "./test/dist",
    "commonFiles": ["./test/common/**/*.proto"],
    "isolateModule": true
}

Description of parameters:

  • srcPaths - an array of paths where you need to look for *.proto schemes (supports glob syntax).
  • distDir - the directory in which you want to put the final *.js and *.d.ts files.
  • commonFiles - an array of paths to *.proto general purpose schemes that need to be included in all other *.proto schemes (supports glob syntax).
  • isolateModule - if it is set to true, then a directory with the name of the module will be created in the distDir directory.

Using

After installation, the utility will be available in 2 versions - in npm scripts and through the console indicating the full path.

Using the npm script:

// package.json
"scripts": {
    "generate": "protogenjs --config protobuf.json"
}
user@ubuntu$ npm run generate
user@ubuntu$ yarn run generate

Or directly from the terminal:

user@ubuntu$ $(npm bin)/protogenjs --help
Usage examples:
    protogenjs -h[--help]                  Print this message
    protogenjs -p[--progress]              Show progress
    protogenjs -c[--config] protobuf.json  Run with config file
Config file example:
{
    "srcPaths": ["./test/proto/**/*.proto"],
    "distDir": "./test/dist",
    "commonFiles": [
        "./test/common/**/*.proto"
    ],
    "isolateModule": true
}
user@ubuntu$ $(npm bin)/protogenjs --config protobuf.json

FAQs

Package last updated on 30 Oct 2018

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