Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grpc-web-generator

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grpc-web-generator - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

2

package.json
{
"name": "grpc-web-generator",
"version": "0.0.5",
"version": "0.0.6",
"license": "MIT",

@@ -5,0 +5,0 @@ "bin": {

@@ -243,6 +243,6 @@ const protobufjs = require('protobufjs');

const processArgv = {
protoDir: utils.getArgValue(process.argv, '--proto-dir'),
protoFile: utils.getArgValue(process.argv, '--proto-file'),
outputDir: utils.getArgValue(process.argv, '--output-dir'),
onlyProto: utils.getArgValue(process.argv, '--only-proto'),
protoDir: utils.getArgValue(process.argv, '--proto-dir', String),
protoFile: utils.getArgValue(process.argv, '--proto-file', String),
outputDir: utils.getArgValue(process.argv, '--output-dir', String),
onlyProto: utils.getArgValue(process.argv, '--only-proto', JSON.parse),
};

@@ -281,3 +281,3 @@

if (processArgv.onlyProto) {
if (!processArgv.onlyProto) {
const grpcServicesSource = generateGrpcServiceFile(jsonSchema, codegenDirectory);

@@ -284,0 +284,0 @@ const grpcServicesSourceFilename = path.resolve(processArgv.outputDir, 'GrpcService.ts');

@@ -1,5 +0,10 @@

const getArgValue = (args, arg) => {
const argValue = args.find(a => a.startsWith(`${arg}=`));
if (argValue) {
return argValue.slice(`${arg}=`.length);
const getArgValue = (args, arg, transformer = (v) => v) => {
const argValue = args.find((a) => a.startsWith(`${arg}=`));
let value = argValue.slice(`${arg}=`.length);
try {
if (value) {
return transformer(value);
}
} catch (error) {
return value;
}

@@ -9,3 +14,3 @@ };

module.exports = {
getArgValue
getArgValue,
};
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