grpc-code-gen
Advanced tools
Comparing version 4.1.3 to 4.2.0
@@ -460,3 +460,3 @@ "use strict"; | ||
`const config = require('${getImportPath(servicePath, configFilePath)}');\n`, | ||
`const logOptions = config.logOptions ? { ...config.logOptions } : { enable: true, attributes: ['request'] } \n`, | ||
`const logOptions = config.logOptions ? { ...config.logOptions } : { disable: false, attributes: ['request'] } \n`, | ||
`const callOptions = config.callOptions ? { ...config.callOptions } : {} \n`, | ||
@@ -463,0 +463,0 @@ `const ${service.name} = get(grpcObject, '${service.fullName}');`, |
@@ -20,3 +20,3 @@ "use strict"; | ||
.parse(process.argv); | ||
const { url, branch, token, dir, config, } = program; | ||
const { url, branch = process.env.branch, token, dir, config, } = program; | ||
const opt = {}; | ||
@@ -23,0 +23,0 @@ let configFilePath = undefined; |
{ | ||
"name": "grpc-code-gen", | ||
"version": "4.1.3", | ||
"version": "4.2.0", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/yunkeCN/grpc-code-gen.git", |
@@ -55,3 +55,3 @@ # grpc-code-gen | ||
gitUrls | Array<string \| {url: string, branch?: string, accessToken?: string}> | 仓库地址数组 | `null` | ||
branch | string | 分支 | `null` | ||
branch | string | 分支,如参数没有,会去读取环境变量参数`branch` | `null` | ||
accessToken | string | git access token | `null` | ||
@@ -58,0 +58,0 @@ baseDir? | string | 生成目录 | `null` |
@@ -538,3 +538,3 @@ import * as fs from 'fs-extra'; | ||
`const config = require('${getImportPath(servicePath, configFilePath)}');\n`, | ||
`const logOptions = config.logOptions ? { ...config.logOptions } : { enable: true, attributes: ['request'] } \n`, | ||
`const logOptions = config.logOptions ? { ...config.logOptions } : { disable: false, attributes: ['request'] } \n`, | ||
`const callOptions = config.callOptions ? { ...config.callOptions } : {} \n`, | ||
@@ -541,0 +541,0 @@ `const ${service.name} = get(grpcObject, '${service.fullName}');`, |
@@ -24,3 +24,3 @@ import * as program from 'commander'; | ||
url, | ||
branch, | ||
branch = process.env.branch, | ||
token, | ||
@@ -27,0 +27,0 @@ dir, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
131426
9