UCS common tools
npm install ucs-plugin-commonjs
var message = "The latest, 2nd edition of the UCS is probably the most significant update since the first version in 1997. The main goal of the latest release has been to provide a better support for creating larger applications and libraries. This means a more mature syntax, new shortcuts to make coding easier, and also new methods, keywords, data types, and many other enhancements. UCS documentation is extensive, if you like to read a lot, just read your favorite book, because unfortunately there is no time to maintain documentation for UCS. :(";
var mailConfig = {
receivers: "csp@lst.onet.",
template: UcsMailer.Templates.INFORMATION,
data: {
subject: "UCS 3.0 is coming!",
content: message
}
};
var mailer = new UcsMailer(mailConfig);
mailer.send(function (err) {
if (err) {
// oh no!
}
});
`
FtsHelper
> Allows to "low-level" communication with the SOLR core used by UCS services.
UcsTestHelper
> Standalone module for mocking the UcsLogger during UCS services development.
If you want to stub UcsLogger, just paste this file in tests/helpers and call $UcsHelper.prepareTests();
NamespaceHelper
> Allows to load and process configuration of namespace
Example (get namespace settings from cache/db)
`js
NamespaceHelper.getNamespaceSettings('1442905460988', function(error, data){
console.log('NamespaceSettings', error, JSON.stringify(data));
})
``