@@ -40,11 +40,8 @@ export class BuildTaskUpload extends tasksBase.BuildTaskBase<agentContracts.Task
40
40
}
41
41
42
42
if ( taskZipPath ) {
43
- //var readStream = fs.createReadStream(taskZipPath);
44
-
45
43
// User provided an already zipped task, upload that.
46
44
const data : Buffer = fs . readFileSync ( taskZipPath ) ;
47
- console . log ( `initial file buffer size: ${ data . byteLength } ` ) ;
48
45
const z : zip = await zip . loadAsync ( data ) ;
49
46
50
47
// find task.json inside zip, make sure its there then deserialize content
@@ -53,14 +50,7 @@ export class BuildTaskUpload extends tasksBase.BuildTaskBase<agentContracts.Task
53
50
54
51
sourceLocation = taskZipPath ;
55
52
taskId = taskJson . id ;
56
- //taskStream = z.generateNodeStream();
57
53
taskStream = fs . createReadStream ( taskZipPath ) ;
58
-
59
- // console.log('writing new stream to file');
60
- // const reloadedZip: string = 'D:\\reloaded.zip';
61
- // fs.writeFileSync(reloadedZip, taskStream);
62
- // const reloadedData = fs.readFileSync(reloadedZip);
63
- // console.log(`reloaded file buffer size: ${reloadedData.byteLength}`);
64
54
} else {
65
55
// User provided the path to a directory with the task content
66
56
const taskPath : string = taskPaths [ 0 ] ;
@@ -87,9 +77,6 @@ export class BuildTaskUpload extends tasksBase.BuildTaskBase<agentContracts.Task
87
77
trace . info ( "Collection URL: " + collectionUrl ) ;
88
78
const agentApi : ITaskAgentApi = await this . webApi . getTaskAgentApi ( collectionUrl ) ;
89
79
90
- // console.log('returning early');
91
- // return <agentContracts.TaskDefinition> { sourceLocation: sourceLocation, };
92
-
93
80
await agentApi . uploadTaskDefinition ( null , taskStream , taskId , overwrite ) ;
94
81
trace . debug ( "Success" ) ;
95
82
return < agentContracts . TaskDefinition > { sourceLocation : sourceLocation , } ;
0 commit comments