in BuildTasks/PublishExtension/vsixeditor.ts [162:200]
public async endEdit(): Promise<string> {
this.validateEditMode();
if (!this.hasEdits()) { return Q(this.inputFile); }
temp.track();
return new Promise<string>((resolve) => {
temp.mkdir("vsixeditor", (ex, dirPath) => { resolve(dirPath); });
})
.then((dirPath) => {
tl.debug("Extracting files to " + dirPath);
this.extractArchive(this.inputFile, dirPath);
return dirPath;
})
.then(async dirPath => {
if (this.versionNumber && this.updateTasksVersion || this.updateTasksId) {
tl.debug("Look for build tasks manifest");
const extensionManifest = path.join(dirPath, "extension.vsomanifest");
await common.checkUpdateTasksManifests(extensionManifest);
}
return dirPath;
})
.then(dirPath => {
tl.debug("Editing VSIX manifest");
return this.editVsixManifest(dirPath).then((manifestData: ManifestData) => manifestData);
})
.then((manifestData: ManifestData) => {
manifestData.outputFileName = manifestData.createOutputFilePath(this.outputPath);
return manifestData;
})
.then((manifestData: ManifestData) => {
tl.debug(`Creating final archive file at ${this.outputPath}`);
this.createArchive(manifestData.dirPath, manifestData.outputFileName);
tl.debug("Final archive file created");
return Promise.resolve(manifestData.outputFileName);
}).catch(err => { return Promise.reject(err); });
}