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

grpc-code-gen

Package Overview
Dependencies
Maintainers
2
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 6.0.10 to 6.1.0

yarn-error.log

17

build/base.js

@@ -33,8 +33,23 @@ "use strict";

const firstUrl = gitUrls.splice(0, 1);
// 检测是否有依赖proto配置,先匹配出依赖项
const libs = gitUrls.reduce((prev, next, index) => {
if (typeof (next) === 'object' && next.type === 'lib') {
gitUrls.splice(index, 1);
return Object.assign({}, prev, { [next.url]: next });
}
return Object.assign({}, prev);
}, {});
let allResult = [];
let alljson = {};
yield Promise.all(gitUrls.map((url) => __awaiter(this, void 0, void 0, function* () {
// 检测是否有依赖
let libUrl;
if (typeof (url) === 'object' && url.deps && url.deps.length) {
libUrl = url.deps.reduce((prev, next) => {
return libs[next] ? [...prev, libs[next]] : [...prev];
}, []);
}
const newUrl = typeof url === 'string' ? url : url.url;
const root = yield load_proto_1.loadProto({
gitUrls: [...firstUrl, url],
gitUrls: libUrl && libUrl.length ? [...firstUrl, ...libUrl, url] : [...firstUrl, url],
branch,

@@ -41,0 +56,0 @@ accessToken,

2

package.json
{
"name": "grpc-code-gen",
"version": "6.0.10",
"version": "6.1.0",
"license": "MIT",

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

@@ -21,3 +21,13 @@ # grpc-code-gen

},
'git@git.myscrm.cn:2c/panther-statistics-proto.git',
// 服务依赖proto
{
url: 'git@git.myscrm.cn:ykcommon/common-proto.git',
branch: 'master',
type:'lib'
},
{
url: 'git@git.myscrm.cn:2c/panther-statistics-proto.git',
// panther-statistics 服务proto依赖于 common-proto
deps:['git@git.myscrm.cn:ykcommon/common.git']
},
'git@git.myscrm.cn:2c/panther-third-proto.git',

@@ -118,2 +128,5 @@ ],

### 版本说明
- v6.1.0 版本
gitUrls配置新增依赖项
- v6.0.6 版本

@@ -120,0 +133,0 @@ 新增 access 日志链路

@@ -54,2 +54,13 @@ import * as fs from 'fs-extra';

const firstUrl = gitUrls.splice(0, 1)
// 检测是否有依赖proto配置,先匹配出依赖项
const libs:any = (gitUrls as any).reduce((prev: (GitUrlsItem|string)[], next: GitUrlsItem | string, index: number)=>{
if (typeof (next) === 'object' && next.type === 'lib') {
gitUrls.splice(index,1)
return { ...prev, [next.url]: next }
}
return { ...prev}
},{})
let allResult: Array<{ result: any, root: any, [propname: string]: any }> = []

@@ -59,5 +70,13 @@ let alljson: { [propname: string]: any } = {}

await Promise.all(gitUrls.map(async (url: GitUrlsItem | string) => {
// 检测是否有依赖
let libUrl:any
if (typeof (url) === 'object' && url.deps && url.deps.length) {
libUrl = url.deps.reduce((prev:string[], next:string)=>{
return libs[next] ? [...prev, libs[next]] : [...prev]
},[])
}
const newUrl: string = typeof url === 'string' ? url : url.url
const root = await loadProto({
gitUrls: [...firstUrl, url],
gitUrls: libUrl && libUrl.length ? [...firstUrl, ...libUrl, url] : [...firstUrl, url],
branch,

@@ -64,0 +83,0 @@ accessToken,

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