New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

grunt-tx

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-tx - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

152

lib/grunt_tx.js

@@ -49,5 +49,27 @@ 'use strict';

_createClass(GruntTx, [{
key: 'availableLanguageCodesFor',
value: function availableLanguageCodesFor(resource) {
var remoteResource;
return regeneratorRuntime.async(function availableLanguageCodesFor$(context$2$0) {
while (1) switch (context$2$0.prev = context$2$0.next) {
case 0:
context$2$0.next = 2;
return regeneratorRuntime.awrap(this.transifex.getResource(resource.slug));
case 2:
remoteResource = context$2$0.sent;
return context$2$0.abrupt('return', remoteResource.available_languages.map(function (language) {
return language.code;
}));
case 4:
case 'end':
return context$2$0.stop();
}
}, null, this);
}
}, {
key: 'downloadResources',
value: function downloadResources() {
var remoteResources, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, localResource, remoteResourceForLocal, remoteResource, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, language, translations, filePath;
var remoteResources, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, localResource, remoteResource, languageCodes, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, languageCode, translations, filePath;

@@ -70,3 +92,3 @@ return regeneratorRuntime.async(function downloadResources$(context$2$0) {

if (_iteratorNormalCompletion = (_step = _iterator.next()).done) {
context$2$0.next = 47;
context$2$0.next = 53;
break;

@@ -76,49 +98,69 @@ }

localResource = _step.value;
remoteResourceForLocal = remoteResourceFor(localResource, remoteResources);
context$2$0.next = 13;
return regeneratorRuntime.awrap(this.transifex.getResource(remoteResourceForLocal.slug));
remoteResource = remoteResourceFor(localResource, remoteResources);
context$2$0.t0 = localResource.languages;
case 13:
remoteResource = context$2$0.sent;
if (context$2$0.t0) {
context$2$0.next = 16;
break;
}
context$2$0.next = 15;
return regeneratorRuntime.awrap(this.availableLanguageCodesFor(remoteResource));
case 15:
context$2$0.t0 = context$2$0.sent;
case 16:
languageCodes = context$2$0.t0;
if (!(!languageCodes || languageCodes.length === 0)) {
context$2$0.next = 20;
break;
}
this.grunt.log.error('[' + this.project + '] No languages found for ' + localResource.sourceFile);
return context$2$0.abrupt('continue', 50);
case 20:
_iteratorNormalCompletion2 = true;
_didIteratorError2 = false;
_iteratorError2 = undefined;
context$2$0.prev = 17;
_iterator2 = remoteResource.available_languages[Symbol.iterator]();
context$2$0.prev = 23;
_iterator2 = languageCodes[Symbol.iterator]();
case 19:
case 25:
if (_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done) {
context$2$0.next = 30;
context$2$0.next = 36;
break;
}
language = _step2.value;
context$2$0.next = 23;
return regeneratorRuntime.awrap(this.transifex.getTranslations(remoteResource.slug, language.code));
languageCode = _step2.value;
context$2$0.next = 29;
return regeneratorRuntime.awrap(this.transifex.getTranslations(remoteResource.slug, languageCode));
case 23:
case 29:
translations = context$2$0.sent;
filePath = targetPathFor(localResource, language.code);
filePath = targetPathFor(localResource, languageCode);
this.grunt.file.write(filePath, translations);
this.grunt.log.ok('[' + this.project + '] Downloaded ' + language.code + ' to ' + filePath);
this.grunt.log.ok('[' + this.project + '] Downloaded ' + languageCode + ' to ' + filePath);
case 27:
case 33:
_iteratorNormalCompletion2 = true;
context$2$0.next = 19;
context$2$0.next = 25;
break;
case 30:
context$2$0.next = 36;
case 36:
context$2$0.next = 42;
break;
case 32:
context$2$0.prev = 32;
context$2$0.t0 = context$2$0['catch'](17);
case 38:
context$2$0.prev = 38;
context$2$0.t1 = context$2$0['catch'](23);
_didIteratorError2 = true;
_iteratorError2 = context$2$0.t0;
_iteratorError2 = context$2$0.t1;
case 36:
context$2$0.prev = 36;
context$2$0.prev = 37;
case 42:
context$2$0.prev = 42;
context$2$0.prev = 43;

@@ -129,7 +171,7 @@ if (!_iteratorNormalCompletion2 && _iterator2['return']) {

case 39:
context$2$0.prev = 39;
case 45:
context$2$0.prev = 45;
if (!_didIteratorError2) {
context$2$0.next = 42;
context$2$0.next = 48;
break;

@@ -140,9 +182,9 @@ }

case 42:
return context$2$0.finish(39);
case 48:
return context$2$0.finish(45);
case 43:
return context$2$0.finish(36);
case 49:
return context$2$0.finish(42);
case 44:
case 50:
_iteratorNormalCompletion = true;

@@ -152,15 +194,15 @@ context$2$0.next = 8;

case 47:
context$2$0.next = 53;
case 53:
context$2$0.next = 59;
break;
case 49:
context$2$0.prev = 49;
context$2$0.t1 = context$2$0['catch'](6);
case 55:
context$2$0.prev = 55;
context$2$0.t2 = context$2$0['catch'](6);
_didIteratorError = true;
_iteratorError = context$2$0.t1;
_iteratorError = context$2$0.t2;
case 53:
context$2$0.prev = 53;
context$2$0.prev = 54;
case 59:
context$2$0.prev = 59;
context$2$0.prev = 60;

@@ -171,7 +213,7 @@ if (!_iteratorNormalCompletion && _iterator['return']) {

case 56:
context$2$0.prev = 56;
case 62:
context$2$0.prev = 62;
if (!_didIteratorError) {
context$2$0.next = 59;
context$2$0.next = 65;
break;

@@ -182,13 +224,13 @@ }

case 59:
return context$2$0.finish(56);
case 65:
return context$2$0.finish(62);
case 60:
return context$2$0.finish(53);
case 66:
return context$2$0.finish(59);
case 61:
case 67:
case 'end':
return context$2$0.stop();
}
}, null, this, [[6, 49, 53, 61], [17, 32, 36, 44], [37,, 39, 43], [54,, 56, 60]]);
}, null, this, [[6, 55, 59, 67], [23, 38, 42, 50], [43,, 45, 49], [60,, 62, 66]]);
}

@@ -280,2 +322,2 @@ }, {

})();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9saWIvZ3J1bnRfdHguanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQUEsSUFBTSxJQUFJLEdBQUcsT0FBTyxDQUFDLE1BQU0sQ0FBQyxDQUFBOztBQU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ZXNvdXJjZXMoKVxuXG4gICAgZm9yIChsZXQgbG9jYWxSZXNvdXJjZSBvZiB0aGlzLmxvY2FsUmVzb3VyY2VzKSB7XG4gICAgICBjb25zdCByZW1vdGVSZXNvdXJjZUZvckxvY2FsID0gcmVtb3RlUmVzb3VyY2VGb3IobG9jYWxSZXNvdXJjZSwgcmVtb3RlUmVzb3VyY2VzKVxuICAgICAgY29uc3QgY29udGVudCA9IHRoaXMuZ3J1bnQuZmlsZS5yZWFkKGxvY2FsUmVzb3VyY2Uuc291cmNlRmlsZSlcbiAgICAgIGNvbnN0IHJlc3VsdCA9IGF3YWl0IHRoaXMudHJhbnNpZmV4LnVwbG9hZFJlc291cmNlKHJlbW90ZVJlc291cmNlRm9yTG9jYWwuc2x1ZywgbG9jYWxSZXNvdXJjZS50eXBlLCBjb250ZW50KVxuXG4gICAgICB0aGlzLmdydW50LmxvZy5vayhcbiAgICAgICAgYFske3RoaXMucHJvamVjdH1dIFVwbG9hZGVkICR7bG9jYWxSZXNvdXJjZS5zb3VyY2VGaWxlfS4gQWRkZWQgJHtyZXN1bHQuc3RyaW5nc19hZGRlZH0uIFVwZGF0ZWQgJHtyZXN1bHQuc3RyaW5nc191cGRhdGVkfS4gRGVsZXRlZCAke3Jlc3VsdC5zdHJpbmdzX2RlbGV0ZX0uYFxuICAgICAgKVxuICAgIH1cbiAgfVxufVxuIl19
{
"name": "grunt-tx",
"description": "Grunt tasks to download translations & upload resources from/to Transifex",
"version": "1.0.0",
"version": "1.1.0",
"homepage": "https://github.com/eHealthAfrica/grunt-tx",

@@ -6,0 +6,0 @@ "author": {

@@ -43,3 +43,6 @@ [![Build Status](https://travis-ci.org/eHealthAfrica/grunt-tx.svg?branch=master)](https://travis-ci.org/eHealthAfrica/grunt-tx)

// See http://docs.transifex.com/formats
type: 'PO'
type: 'PO',
// this is completely optional. If not set, we default to download
// every available language for the resource
languages: ['en', 'fr']
}

@@ -46,0 +49,0 @@ ]

@@ -124,2 +124,29 @@ 'use strict';

});
it('only downloads the configured languages', function callee$2$0() {
var localResources, gruntTx;
return regeneratorRuntime.async(function callee$2$0$(context$3$0) {
while (1) switch (context$3$0.prev = context$3$0.next) {
case 0:
localResources = [{
sourceFile: './po/template.pot',
targetFilePath: './po/_lang_._type_',
type: 'PO',
languages: ['fr']
}];
gruntTx = new GruntTx({ project: project, localResources: localResources, transifex: this.transifex, grunt: this.grunt });
context$3$0.next = 4;
return regeneratorRuntime.awrap(gruntTx.downloadResources());
case 4:
assert(this.transifex.getTranslations.calledWith('templatepot', 'fr'));
assert(this.transifex.getTranslations.neverCalledWith('templatepot', 'en'));
case 6:
case 'end':
return context$3$0.stop();
}
}, null, this);
});
});

@@ -157,2 +184,2 @@

});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9zcGVjL2dydW50X3R4X3NwZWMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxPQUFPLENBQUMsZUFBZSxDQUFDLENBQUE7QUFDeEIsSUFBTSxNQUFNLEdBQUcsT0FBTyxDQUFDLFFBQVEsQ0FBQyxDQUFBO0FBQ2hDLElBQU0sS0FBSyxHQUFHLE9BQU8sQ0FBQyxPQUFPLENBQUMsQ0FBQTtBQUM5QixJQUFNLE9BQU8sR0FBRyxPQUFPLENBQUMsaUJBQWlCLENBQUMsQ0FBQTs7QUFFMUMsUUFBUSxDQUFDLFNBQVMsRUFBRSxZQUFNO0FBQ3hCLE1BQU0sT0FBTyxHQUFHLGVBQWUsQ0FBQTs7QUFFL0IsWUFBVSxDQUFDLFlBQVc7O0FBRXBCLFFBQUksQ0FBQyxTQUFTLEdBQUc7QUFDZixrQkFBWSxFQUFFLEtBQUssQ0FBQyxJQUFJLEVBQUUsQ0FBQyxPQUFPLENBQ2hDLENBQUM7QUFDQyw0QkFBb0IsRUFBRSxJQUFJO0FBQzFCLFlBQUksRUFBRSxjQUFjO0FBQ3BCLGlCQUFTLEVBQ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bXBsYXRlLnBvdCcsXG4gICAgICAgICAgdGFyZ2V0RmlsZVBhdGg6ICcuL3BvL19sYW5nXy5fdHlwZV8nLFxuICAgICAgICAgIHR5cGU6ICdQTydcbiAgICAgICAgfVxuICAgICAgXVxuXG4gICAgICB0aGlzLmdydW50LmZpbGUucmVhZC53aXRoQXJncygnLi9wby90ZW1wbGF0ZS5wb3QnKS5yZXR1cm5zKCdjb250ZW50cyBvZiB0ZW1wbGF0ZS5wb3QnKVxuXG4gICAgICBjb25zdCBncnVudFR4ID0gbmV3IEdydW50VHgoe3Byb2plY3QsIGxvY2FsUmVzb3VyY2VzLCB0cmFuc2lmZXg6IHRoaXMudHJhbnNpZmV4LCBncnVudDogdGhpcy5ncnVudH0pXG4gICAgICBhd2FpdCBncnVudFR4LnVwbG9hZFJlc291cmNlcygpXG5cbiAgICAgIGFzc2VydCh0aGlzLnRyYW5zaWZleC51cGxvYWRSZXNvdXJjZS5jYWxsZWRXaXRoKCd0ZW1wbGF0ZXBvdCcsICdQTycsICdjb250ZW50cyBvZiB0ZW1wbGF0ZS5wb3QnKSlcbiAgICB9KVxuICB9KVxufSlcbiJdfQ==
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