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

protoc-gen-grpc-js

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

protoc-gen-grpc-js - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

4

dist/cli.js

@@ -5,4 +5,4 @@ "use strict";

const generate_1 = require("./generate");
const logger_1 = tslib_1.__importDefault(require("./logger"));
generate_1.generate().catch((err) => {
const logger_1 = (0, tslib_1.__importDefault)(require("./logger"));
(0, generate_1.generate)().catch((err) => {
logger_1.default.error(err);

@@ -9,0 +9,0 @@ process.exitCode = 1;

@@ -5,3 +5,3 @@ "use strict";

const tslib_1 = require("tslib");
const get_stdin_1 = tslib_1.__importDefault(require("get-stdin"));
const get_stdin_1 = (0, tslib_1.__importDefault)(require("get-stdin"));
const plugin_pb_1 = require("google-protobuf/google/protobuf/compiler/plugin_pb");

@@ -28,4 +28,4 @@ const types_1 = require("./types");

for (const [key, value] of Object.entries(deps)) {
const alias = utils_1.getModuleAlias(key);
const path = utils_1.getRelativePath(file.name, value);
const alias = (0, utils_1.getModuleAlias)(key);
const path = (0, utils_1.getRelativePath)(file.name, value);
output.push(`const ${alias} = require(${JSON.stringify(path)});`);

@@ -79,4 +79,4 @@ }

for (const method of service.methods) {
const name = utils_1.lowerCaseFirstLetter(method.name);
output.push(` ${name}: ${utils_1.indent(printMethod(method), " ").trim()},`);
const name = (0, utils_1.lowerCaseFirstLetter)(method.name);
output.push(` ${name}: ${(0, utils_1.indent)(printMethod(method), " ").trim()},`);
}

@@ -114,2 +114,3 @@ output.push("};\n");

const response = new plugin_pb_1.CodeGeneratorResponse();
response.setSupportedFeatures(plugin_pb_1.CodeGeneratorResponse.Feature.FEATURE_PROTO3_OPTIONAL);
for (const file of ctx.files) {

@@ -116,0 +117,0 @@ const content = generateFile(ctx, file);

@@ -41,6 +41,6 @@ "use strict";

get jsServiceFileName() {
return utils_1.getJSServiceFileName(this.name);
return (0, utils_1.getJSServiceFileName)(this.name);
}
get jsMessageFileName() {
return utils_1.getJSMessageFileName(this.name);
return (0, utils_1.getJSMessageFileName)(this.name);
}

@@ -76,10 +76,10 @@ get messages() {

get fullName() {
return utils_1.getMessageFullName(this.file.descriptor, this.descriptor);
return (0, utils_1.getMessageFullName)(this.file.descriptor, this.descriptor);
}
get identifierName() {
return utils_1.getMessageIdentifierName(this.fullName);
return (0, utils_1.getMessageIdentifierName)(this.fullName);
}
get nodeObjectPath() {
const alias = utils_1.getModuleAlias(this.file.name);
const name = utils_1.trimPrefix(this.fullName, this.package + ".");
const alias = (0, utils_1.getModuleAlias)(this.file.name);
const name = (0, utils_1.trimPrefix)(this.fullName, this.package + ".");
return alias + "." + name;

@@ -102,3 +102,3 @@ }

get fullName() {
return utils_1.getMessageFullName(this.file.descriptor, this.descriptor);
return (0, utils_1.getMessageFullName)(this.file.descriptor, this.descriptor);
}

@@ -129,3 +129,3 @@ get methods() {

get jsMessageFileName() {
return utils_1.getJSMessageFileName(this.name);
return (0, utils_1.getJSMessageFileName)(this.name);
}

@@ -158,3 +158,3 @@ }

return;
return this.context.findMessageByFullName(utils_1.trimPrefix(name, "."));
return this.context.findMessageByFullName((0, utils_1.trimPrefix)(name, "."));
}

@@ -161,0 +161,0 @@ }

{
"name": "protoc-gen-grpc-js",
"version": "0.2.0",
"version": "0.3.0",
"description": "Generate client and service objects for use with Node.js gRPC libraries.",

@@ -12,3 +12,4 @@ "main": "dist/index.js",

"build": "tsc",
"clean": "rm -rf dist"
"clean": "rm -rf dist",
"lint": "eslint --ext .js,.ts ."
},

@@ -47,18 +48,18 @@ "files": [

"get-stdin": "^8.0.0",
"tslib": "^1.14.1"
"tslib": "^2.3.1"
},
"devDependencies": {
"@grpc/grpc-js": "^1.2.5",
"@types/google-protobuf": "^3.7.4",
"@typescript-eslint/eslint-plugin": "^4.14.1",
"@typescript-eslint/parser": "^4.14.1",
"eslint": "^7.18.0",
"eslint-config-prettier": "^7.2.0",
"@grpc/grpc-js": "^1.5.7",
"@tsconfig/node10": "^1.0.8",
"@types/google-protobuf": "^3.15.5",
"@typescript-eslint/eslint-plugin": "^5.13.0",
"@typescript-eslint/parser": "^5.13.0",
"eslint": "^8.10.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.3.1",
"google-protobuf": "^3.14.0",
"google-protobuf": "^3.19.4",
"husky": "^4.3.8",
"lint-staged": "^10.5.3",
"prettier": "^2.2.1",
"typescript": "^4.1.3"
"prettier": "^2.5.1",
"typescript": "~4.5.5"
},

@@ -65,0 +66,0 @@ "peerDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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