🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

cf-common

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cf-common - npm Package Compare versions

Comparing version

to
0.0.11

31

analysis-utils.js

@@ -6,13 +6,25 @@ var crypto = require('crypto');

console.log(new Date() + ': Get latest sha - started');
return user.provider.getCommits(repoOwner, repoName, branch, 1)
.then(function (commitInfo) {
console.log(new Date() + ': Get latest sha - ended - success');
return (commitInfo && commitInfo.length === 1) ?
commitInfo[0].sha :
branch;
return getLatestSha(user, repoOwner, repoName, branch)
.then(function (commit) {
if (commit === null) {
return branch;
}
else {
return commit.sha;
}
});
}
function getLatestCommit(user, repoOwner, repoName, branch) {
console.log(new Date() + ': Get latest commit - started');
return user.provider.getCommits(repoOwner, repoName, branch, 1)
.then(function (commitInfo) {
console.log(new Date() + ': Get latest commit - ended - success');
return (commitInfo && commitInfo.length === 1) ?
commitInfo[0] : null;
});
}
var prepareHashInfo = function(repoOwner, repoName, branch, latestSha, settings) {

@@ -69,3 +81,4 @@

prepareHashInfo: prepareHashInfo,
getLatestSha: getLatestSha
getLatestSha: getLatestSha,
getLatestCommit: getLatestCommit
};
{
"name": "cf-common",
"version": "0.0.10",
"version": "0.0.11",
"description": "common modules for codefresh runtime and api",

@@ -5,0 +5,0 @@ "main": "index.js",