cloudelements-cmtool
Advanced tools
+7
-15
@@ -23,17 +23,9 @@ // Generated by LiveScript 1.3.1 | ||
| jirRe = /[A-Z][A-Z]+-[0-9]+/g; | ||
| return [ | ||
| (function(){ | ||
| var results$ = []; | ||
| while ((res = pivRe.exec(text, pivRe.lastIndex)) != null) { | ||
| results$.push(compact(map(bind$(this, 'extractId'), split(',', res[1])))); | ||
| } | ||
| return results$; | ||
| }.call(this)), (function(){ | ||
| var results$ = []; | ||
| while ((res = jirRe.exec(text, jirRe.lastIndex)) != null) { | ||
| results$.push([res[0]]); | ||
| } | ||
| return results$; | ||
| }()) | ||
| ]; | ||
| return [(function(){ | ||
| var results$ = []; | ||
| while ((res = jirRe.exec(text, jirRe.lastIndex)) != null) { | ||
| results$.push([res[0]]); | ||
| } | ||
| return results$; | ||
| }())]; | ||
| }; | ||
@@ -40,0 +32,0 @@ prototype.extractId = function(text){ |
+19
-34
| // Generated by LiveScript 1.3.1 | ||
| (function(){ | ||
| var hrequest, ref$, uformat, uparse, compact, find, groupBy, map, aes, wrapname, Jira; | ||
| var async, hrequest, ref$, uformat, uparse, compact, find, groupBy, map, aes, wrapname, Jira; | ||
| async = require('async'); | ||
| hrequest = require('https').request; | ||
@@ -20,40 +21,23 @@ ref$ = require('url'), uformat = ref$.format, uparse = ref$.parse; | ||
| prototype.doneStories = function(ids, cb){ | ||
| var id; | ||
| return cb(null, { | ||
| issues: (function(){ | ||
| var i$, ref$, len$, results$ = []; | ||
| for (i$ = 0, len$ = (ref$ = ids).length; i$ < len$; ++i$) { | ||
| id = ref$[i$]; | ||
| if (id.match(/[A-Z]/)) { | ||
| results$.push({ | ||
| key: id, | ||
| fields: { | ||
| summary: "summary for " + id | ||
| } | ||
| }); | ||
| } | ||
| } | ||
| return results$; | ||
| }()) | ||
| }); | ||
| var this$ = this; | ||
| if (!(ids != null && ids.length)) { | ||
| return cb(null, []); | ||
| } | ||
| this.request('get', "search", function(err, stories){ | ||
| async.map(ids, function(id, cb){ | ||
| this$.request('get', "issue/" + id, function(err, story){ | ||
| cb(err, import$({ | ||
| key: id | ||
| }, story != null | ||
| ? story | ||
| : {})); | ||
| }); | ||
| }, function(err, stories){ | ||
| if (err != null) { | ||
| return cb(err); | ||
| } | ||
| cb(null, groupBy(function(it){ | ||
| return it.issuetype.id; | ||
| return cb(null, groupBy(function(it){ | ||
| return it.fields.issuetype.name; | ||
| }, stories)); | ||
| }, { | ||
| jql: 'statusCategory=3' | ||
| }); | ||
| }; | ||
| prototype.stories = function(ids, cb){ | ||
| if (!(ids != null && ids.length)) { | ||
| return cb(null, []); | ||
| } | ||
| this.request('get', "search", cb); | ||
| }; | ||
| prototype.gits = function(stid, cb){ | ||
@@ -67,7 +51,7 @@ ['9be2c4ed702dc64f9ce45d341b774246483d2d1b']; | ||
| pass = this.userpass.substr(colon + 1); | ||
| pass = new Buffer(pass, 'ascii').toString('base64'); | ||
| return user + ":" + pass; | ||
| pass = new Buffer(user + ":" + pass, 'ascii').toString('base64'); | ||
| return "Basic " + pass; | ||
| }; | ||
| prototype.request = function(method, api, cb, params, headers, files){ | ||
| var theurl, ref$, towrite, options, output, req; | ||
| var theurl, autht, ref$, towrite, options, output, req; | ||
| params == null && (params = {}); | ||
@@ -77,3 +61,4 @@ headers == null && (headers = {}); | ||
| theurl = this.apiEndpoint + "/" + api; | ||
| headers = (ref$ = import$({}, headers), ref$['Accept'] = '*/*', ref$['Authorization'] = this.authtoken(), ref$); | ||
| autht = this.authtoken(); | ||
| headers = (ref$ = import$({}, headers), ref$['Accept'] = '*/*', ref$['Authorization'] = autht, ref$); | ||
| if ((ref$ = method.toLowerCase()) === 'post' || ref$ === 'put') { | ||
@@ -80,0 +65,0 @@ towrite = JSON.stringify(params); |
+1
-1
| { | ||
| "name": "cloudelements-cmtool", | ||
| "version": "0.2.0", | ||
| "version": "0.2.1", | ||
| "description": "An integrated client for CE CM apps.", | ||
@@ -5,0 +5,0 @@ "main": "lib/cmtool", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 2 instances
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 2 instances
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
139503
-0.53%2643
-0.86%