artifact-engine
Advanced tools
Comparing version 0.1.15 to 0.1.16
@@ -17,2 +17,3 @@ "use strict"; | ||
var artifactDownloadTicketsPromise = new Promise((resolve, reject) => { | ||
tl.setResourcePath(path.join(path.dirname(__dirname), 'lib.json')); | ||
const workers = []; | ||
@@ -68,3 +69,3 @@ artifactEngineOptions = artifactEngineOptions || new artifactEngineOptions_1.ArtifactEngineOptions(); | ||
this.artifactItemStore.increaseRetryCount(item); | ||
logger_1.Logger.logMessage("Retrying download of " + item.path + ", retry count: " + (retryCount + 1)); | ||
logger_1.Logger.logMessage(tl.loc("RetryingDownload", item.path, (retryCount + 1))); | ||
setTimeout(() => this | ||
@@ -92,3 +93,3 @@ .processArtifactItemImplementation(sourceProvider, item, destProvider, artifactEngineOptions, resolve, reject, retryCount + 1), artifactEngineOptions.retryIntervalInSeconds * 1000); | ||
else { | ||
logger_1.Logger.logMessage("Skipped processing item " + item.path); | ||
logger_1.Logger.logMessage(tl.loc("SkippingItem", item.path)); | ||
this.artifactItemStore.updateState(item, models.TicketState.Skipped); | ||
@@ -127,3 +128,3 @@ resolve(); | ||
ci.publishEvent('reliability', { issueType: 'unhandledRejection', errorMessage: JSON.stringify(err, Object.getOwnPropertyNames(err)) }); | ||
logger_1.Logger.logError("artifact-engine: unhandled rejection " + err); | ||
logger_1.Logger.logError(tl.loc("UnhandledRejection", err)); | ||
throw err; | ||
@@ -133,5 +134,5 @@ }); | ||
ci.publishEvent('reliability', { issueType: 'uncaughtException', errorMessage: JSON.stringify(err, Object.getOwnPropertyNames(err)) }); | ||
logger_1.Logger.logError("artifact-engine: unhandled exception " + err); | ||
logger_1.Logger.logError(tl.loc("UnhandledException", err)); | ||
throw err; | ||
}); | ||
//# sourceMappingURL=artifactEngine.js.map |
@@ -68,8 +68,3 @@ "use strict"; | ||
var downloadTime = (endTime.valueOf() - this.startTime.valueOf()) / 1000; | ||
console.log("Total Files: " + fileTickets.length | ||
+ ", Processed: " + processedItems.length | ||
+ ", Skipped: " + skippedItems.length | ||
+ ", Failed: " + failedItems.length | ||
+ ", Download time: " + downloadTime + "secs" | ||
+ (downloadSizeInMB > 1 ? ", Download size: " + downloadSizeInMB.toFixed(3) + "MB" : "")); | ||
console.log(tl.loc("DownloadSummary", fileTickets.length, processedItems.length, skippedItems.length, failedItems.length, downloadTime, (downloadSizeInMB > 1 ? downloadSizeInMB.toFixed(3) + "MB" : downloadSizeInBytes + "Bytes"))); | ||
ci.publishEvent('performance', { | ||
@@ -76,0 +71,0 @@ location: this.store.getRootLocation(), |
{ | ||
"name": "artifact-engine", | ||
"version": "0.1.15", | ||
"version": "0.1.16", | ||
"description": "Artifact Engine to download artifacts from jenkins, teamcity, vsts", | ||
@@ -21,3 +21,3 @@ "repository": { | ||
"minimatch": "3.0.2", | ||
"vsts-task-lib": "^2.1.0", | ||
"vsts-task-lib": "2.2.1", | ||
"tunnel": "0.0.4" | ||
@@ -31,2 +31,3 @@ }, | ||
"@types/node": "6.0.31", | ||
"@types/xml2js": "^0.4.0", | ||
"assert": "1.4.1", | ||
@@ -40,3 +41,4 @@ "mocha": "2.3.3", | ||
"nock": "9.1.0", | ||
"nconf": "0.10.0" | ||
"nconf": "0.10.0", | ||
"xml2js": "^0.4.17" | ||
}, | ||
@@ -55,3 +57,5 @@ "files": [ | ||
"README.md", | ||
"ThirdPartyNotices.txt" | ||
"ThirdPartyNotices.txt", | ||
"lib.json", | ||
"Strings/**" | ||
], | ||
@@ -58,0 +62,0 @@ "scripts": { |
@@ -44,7 +44,7 @@ "use strict"; | ||
tl.mkdirP(folder); | ||
logger_1.Logger.logMessage('Downloading ' + item.path + ' to ' + outputFilename); | ||
logger_1.Logger.logMessage(tl.loc("DownloadingTo", item.path, outputFilename)); | ||
const outputStream = fs.createWriteStream(outputFilename); | ||
stream.pipe(outputStream); | ||
stream.on("end", () => { | ||
logger_1.Logger.logMessage(`Downloaded '${item.path}' to '${outputFilename}'`); | ||
logger_1.Logger.logMessage(tl.loc("DownloadedTo", item.path, outputFilename)); | ||
if (!item.metadata) { | ||
@@ -75,3 +75,3 @@ item.metadata = {}; | ||
if (!!error) { | ||
logger_1.Logger.logMessage("Unable to read directory " + itemsPath + ". Error: " + error); | ||
logger_1.Logger.logMessage(tl.loc("UnableToReadDirectory", itemsPath, error)); | ||
reject(error); | ||
@@ -78,0 +78,0 @@ return; |
@@ -10,2 +10,3 @@ "use strict"; | ||
var handlebars = require('handlebars'); | ||
var tl = require('vsts-task-lib/task'); | ||
class WebProvider { | ||
@@ -87,3 +88,3 @@ constructor(rootItemsLocation, templateFile, variables, handler, requestOptions) { | ||
catch (error) { | ||
logger_1.Logger.logMessage("Failed to parse response body: " + body + " , got error : " + error); | ||
logger_1.Logger.logMessage(tl.loc("FailedToParseResponse", body, error)); | ||
reject(error); | ||
@@ -90,0 +91,0 @@ } |
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
90
146374
16
2007
+ Addedvsts-task-lib@2.2.1(transitive)
- Removedminimatch@3.0.4(transitive)
- Removedvsts-task-lib@2.7.0(transitive)
Updatedvsts-task-lib@2.2.1