add a bundle property to nlsmetadata uploader

pull/133292/head
Tyler Leonhardt 2021-09-16 14:41:25 -07:00
parent 9bb7ff495e
commit 9e78e8e2d9
No known key found for this signature in database
GPG Key ID: 1BC2B6244363E77E
2 changed files with 17 additions and 3 deletions

View File

@ -42,11 +42,15 @@ function main() {
const modules = Object.keys(parsedJson);
const json = {
keys: {},
messages: {}
messages: {},
bundles: {
main: []
}
};
for (const module of modules) {
json.messages[module] = parsedJson[module].messages;
json.keys[module] = parsedJson[module].keys;
json.bundles.main.push(module);
}
parsedJson = json;
break;

View File

@ -16,6 +16,12 @@ const azure = require('gulp-azure-storage');
const root = path.dirname(path.dirname(__dirname));
const commit = util.getVersion(root);
interface NlsMetadata {
keys: { [module: string]: string },
messages: { [module: string]: string },
bundles: { [bundle: string]: string[] },
}
function main() {
return es.merge(
vfs.src('out-vscode-min/nls.metadata.json', { base: 'out-vscode-min' }),
@ -52,13 +58,17 @@ function main() {
// put nls.metadata.json content in Core NlsMetadata format
const modules = Object.keys(parsedJson);
const json: { keys: { [module: string]: string }, messages: { [module: string]: string } } = {
const json: NlsMetadata = {
keys: {},
messages: {}
messages: {},
bundles: {
main: []
}
};
for (const module of modules) {
json.messages[module] = parsedJson[module].messages;
json.keys[module] = parsedJson[module].keys;
json.bundles.main.push(module);
}
parsedJson = json;
break;