Comparing version 0.7.0 to 0.8.0
@@ -129,3 +129,4 @@ const got = require('got') | ||
if(progress.percent === 1){ | ||
emitter.emit('finish', progress) | ||
emitter.emit('finish', progress); | ||
fs.unlinkSync(compressedSource); | ||
} | ||
@@ -192,3 +193,3 @@ }).catch(e => { | ||
*/ | ||
getLogs: async ({service_name, token}) => { | ||
getServiceLogs: async ({service_name, token}) => { | ||
try { | ||
@@ -200,2 +201,17 @@ let headers = client.tokenHeader(token) | ||
} | ||
}, | ||
/** | ||
* | ||
* @param service_name | ||
* @param token | ||
* @returns {Promise<*>} | ||
*/ | ||
getVersionLogs: async ({image, version, token}) => { | ||
try { | ||
let headers = client.tokenHeader(token) | ||
return await client.request({api:`images/${image}/versions/${version}/builds`, method:'GET', headers}) | ||
} catch(e) { | ||
return Promise.reject(e) | ||
} | ||
} | ||
@@ -202,0 +218,0 @@ } |
@@ -1,2 +0,2 @@ | ||
const {getToken, getImages, postImage, getVersions, postVersion, getServices, postService, getLogs, postManifest} = require('./client') | ||
const {getToken, getImages, postImage, getVersions, postVersion, getServices, postService, getServiceLogs, getVersionLogs, postManifest} = require('./client') | ||
const helpers = require('./helpers') | ||
@@ -66,4 +66,7 @@ const {readYamlFile, createYamlFile} = helpers; | ||
createVersion: async ({name, version, source, token}) => { | ||
return await postVersion({token,version, source, name}) | ||
try { | ||
return await postVersion({token,version, source, name}) | ||
} catch(e) { | ||
return Promise.reject(e) | ||
} | ||
}, | ||
@@ -107,5 +110,5 @@ /** | ||
*/ | ||
logs : async ({token, service_name}) => { | ||
serviceLogs : async ({token, service_name}) => { | ||
try { | ||
return await getLogs({token, service_name}) | ||
return await getServiceLogs({token, service_name}) | ||
} catch(e) { | ||
@@ -115,2 +118,15 @@ return Promise.reject(e) | ||
}, | ||
/** | ||
* | ||
* @param token | ||
* @param service_name | ||
* @returns {Promise<never>} | ||
*/ | ||
versionLogs : async ({token, image, version}) => { | ||
try { | ||
return await getVersionLogs({token, image, version}) | ||
} catch(e) { | ||
return Promise.reject(e) | ||
} | ||
}, | ||
@@ -117,0 +133,0 @@ /** |
{ | ||
"name": "fandogh", | ||
"version": "0.7.0", | ||
"version": "0.8.0", | ||
"description": "fandogh node client", | ||
@@ -5,0 +5,0 @@ "main": "fandogh.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13263
474