Debian Codegraph @

util/build/transforms/dojoReport.js

raw symbols SCIP
1 define([
2 "../buildControl",
3 "../version",
4 "../fileUtils"
5 ], function(bc, version, fileUtils) {
6 var dir = bc.buildReportDir || ".",
7 filename = bc.buildReportFilename || "build-report.txt";
8
9 return function(resource, callback) {
10 resource.reports.push({
11 dir:dir,
12 filename:filename,
13 content: function(){
14 var result= "";
15
16 result+= "Build started: " + bc.startTimestamp + "\n";
17 result+= "Build application version: " + version + "\n";
18
19 result+= "Messages:\n" + bc.getAllNonreportMessages();
20
21 result+= "Layer Contents:\n";
22 for(var p in bc.resources){
23 resource= bc.resources[p];
24 if(resource.moduleSet){
25 result+= resource.mid + ":\n";
26 var moduleSet= resource.moduleSet;
27 for(var q in moduleSet){
28 result+= "\t" + moduleSet[q].mid + "\n";
29 }
30 result+= "\n";
31 }
32 }
33
34 var optimizerOutput = bc.getOptimizerOutput();
35 if(optimizerOutput.length){
36 result+= "Optimizer Messages:\n" + optimizerOutput;
37 }
38
39 result+= bc.getAllReportMessages();
40
41 bc.log("pacify", "Report written to " + fileUtils.computePath(fileUtils.catPath(dir, filename), bc.destBasePath));
42
43 result+= "\n\nProcess finished normally\n";
44 result+= "\terrors: " + bc.getErrorCount() + "\n\twarnings: " + bc.getWarnCount() + "\n\tbuild time: " + ((new Date()).getTime() - bc.startTimestamp.getTime()) / 1000 + " seconds";
45 return result;
46 }
47 });
48 return 0;
49 };
50 });