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

grpc-code-gen

Package Overview
Dependencies
Maintainers
1
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grpc-code-gen - npm Package Compare versions

Comparing version 3.2.0 to 3.2.1

18

build/base.js

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

`import * as grpc from '@grpc/grpc-js';`,
`import { Metadata } from '@grpc/grpc-js/build/src/metadata';`,
`import * as fs from 'fs';`,
`import { forOwn } from 'lodash';`,
`import { loadFromJson } from 'load-proto';\n`,

@@ -251,3 +253,17 @@ `const root = require('${getImportPath(grpcObjPath, jsonPath)}');\n`,

` (config && config.loaderOptions) || { defaults: true },`,
`));`,
`));\n`,
`// fix: grpc-message header split by comma
Metadata.prototype.getMap = function() {
const result: any = {};
forOwn((this as any).internalRepr, (values, key) => {
if (values.length > 0) {
// const v = values[0];
result[key] = values.map((v: any) => {
return v instanceof Buffer ? v.slice() : v;
}).join(',')
}
});
return result;
}
`,
`export default grpcObject;`,

@@ -254,0 +270,0 @@ ].join('\n'));

2

package.json
{
"name": "grpc-code-gen",
"version": "3.2.0",
"version": "3.2.1",
"license": "MIT",

@@ -5,0 +5,0 @@ "repository": "https://github.com/yunkeCN/grpc-code-gen.git",

@@ -294,3 +294,5 @@ import * as fs from 'fs-extra';

`import * as grpc from '@grpc/grpc-js';`,
`import { Metadata } from '@grpc/grpc-js/build/src/metadata';`,
`import * as fs from 'fs';`,
`import { forOwn } from 'lodash';`,
`import { loadFromJson } from 'load-proto';\n`,

@@ -305,3 +307,17 @@ `const root = require('${getImportPath(grpcObjPath, jsonPath)}');\n`,

` (config && config.loaderOptions) || { defaults: true },`,
`));`,
`));\n`,
`// fix: grpc-message header split by comma
Metadata.prototype.getMap = function() {
const result: any = {};
forOwn((this as any).internalRepr, (values, key) => {
if (values.length > 0) {
// const v = values[0];
result[key] = values.map((v: any) => {
return v instanceof Buffer ? v.slice() : v;
}).join(',')
}
});
return result;
}
`,
`export default grpcObject;`,

@@ -308,0 +324,0 @@ ].join('\n'));

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