azure-functions-core-tools
Advanced tools
Comparing version 2.0.1-beta.12 to 2.0.1-beta.13
@@ -11,2 +11,4 @@ #! /usr/bin/env node | ||
var rimraf = require('rimraf'); | ||
var glob = require('glob'); | ||
var execSync = require('child_process').execSync; | ||
@@ -21,10 +23,9 @@ function getPath() { | ||
var url = 'https://functionscdn.azureedge.net/public/' + version + '/Azure.Functions.Cli.zip'; | ||
https.get(url, function (response) { | ||
if (response.statusCode === 200) { | ||
response | ||
.pipe(unzipper.Extract({ | ||
path: getPath() | ||
})); | ||
var installPath = getPath(); | ||
var unzipStream = unzipper.Extract({ path: installPath }) | ||
.on('close', () => installWorkers(installPath)); | ||
response.pipe(unzipStream); | ||
} else { | ||
@@ -39,2 +40,17 @@ console.error(chalk.red('Error downloading zip file from ' + url)); | ||
process.exit(1); | ||
}); | ||
}); | ||
function installWorkers(installPath) { | ||
glob(`${installPath}/workers/*/*.targets`, (err, files) => { | ||
if (err) | ||
return console.error(chalk.red(err)); | ||
files.forEach(runTarget); | ||
}); | ||
} | ||
function runTarget(targetsFile) { | ||
var workingDirectory = path.dirname(targetsFile); | ||
console.log(`Language worker install targets found in '${workingDirectory}'.`); | ||
console.log(`Executing 'dotnet msbuild ${targetsFile}'.`); | ||
execSync(`dotnet msbuild ${targetsFile}`, { cwd: workingDirectory, stdio: [0, 1, 2] }); | ||
} |
{ | ||
"name": "azure-functions-core-tools", | ||
"version": "2.0.1-beta.12", | ||
"version": "2.0.1-beta.13", | ||
"description": "Azure Functions Core Tools", | ||
@@ -30,2 +30,3 @@ "scripts": { | ||
"command-exists": "^1.2.2", | ||
"glob": "^7.1.2", | ||
"rimraf": "^2.6.1", | ||
@@ -35,2 +36,2 @@ "tmp": "^0.0.33", | ||
} | ||
} | ||
} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
21358
7
306
6
5
+ Addedglob@^7.1.2