-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JSCLient]Improve CLI Script on adding encoding source string feature. #2102
Conversation
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## g11n-js-client #2102 +/- ##
===============================================
Coverage 77.10% 77.10%
===============================================
Files 20 20
Lines 1559 1559
Branches 627 627
===============================================
Hits 1202 1202
Misses 249 249
Partials 108 108
Flags with carried forward coverage won't be shown. Click here to find out more. Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
logger.error("The encoding type '" + encode + "' is not supported."); | ||
return; | ||
} | ||
const cliOptions = { |
Check notice
Code scanning / Jshint (reported by Codacy)
Prohibits the use of __iterator__ property due to compatibility issues
encode: encode, | ||
}; | ||
|
||
let collectSourceBundle = new CollectSourceBundle(logger, vipService, vipConfig, cliOptions); |
Check notice
Code scanning / Jshint (reported by Codacy)
Prohibits the use of __iterator__ property due to compatibility issues
@@ -30,16 +31,22 @@ | |||
return this.vipService.collectSources(sourceSet); | |||
} | |||
convertDataForVIP(data) { | |||
const isEncode = this.cliOptions.encode ? true : false; |
Check notice
Code scanning / Jshint (reported by Codacy)
Prohibits the use of __iterator__ property due to compatibility issues
@@ -163,7 +178,16 @@ | |||
try { | |||
let vipConfig = new VIPConfig(args.host, args.product, args.version, args.component); | |||
let vipService = new VIPService(vipConfig, logger, null); | |||
let collectSourceBundle = new CollectSourceBundle(logger, vipService, vipConfig); | |||
let encode = args.encode && args.encode.toUpperCase(); |
Check notice
Code scanning / Jshint (reported by Codacy)
Prohibits the use of __iterator__ property due to compatibility issues
@@ -30,16 +31,25 @@ | |||
return this.vipService.collectSources(sourceSet); | |||
} | |||
convertDataForVIP(data) { | |||
const isEncode = this.cliOptions.encode ? true : false; | |||
const sourceFormat = isEncode ? this.cliOptions.encode + ",STRING" : "STRING"; |
Check notice
Code scanning / Jshint (reported by Codacy)
Prohibits the use of __iterator__ property due to compatibility issues
sourceSet.push({ | ||
commentForSource: '', | ||
key: i, | ||
source: data[i] | ||
source, | ||
sourceFormat, |
Check notice
Code scanning / Jshint (reported by Codacy)
Prohibits the use of __iterator__ property due to compatibility issues
sourceSet.push({ | ||
commentForSource: '', | ||
key: i, | ||
source: data[i] | ||
source, |
Check notice
Code scanning / Jshint (reported by Codacy)
Prohibits the use of __iterator__ property due to compatibility issues
var sourceSet = []; | ||
for (let i in data) { | ||
const source = isEncode ? this.encodeString(data[i]) : data[i]; |
Check notice
Code scanning / Jshint (reported by Codacy)
Prohibits the use of __iterator__ property due to compatibility issues
No description provided.