kuduscript
Advanced tools
Comparing version 1.0.16 to 1.0.17
@@ -10,26 +10,26 @@ var commander = require('commander'); | ||
command | ||
.usage('[options]') | ||
.description('Generate custom deployment script') | ||
.option('-r, --repositoryRoot [dir path]', 'The root path for the repository (default: .)') | ||
.option('--aspWAP <projectFilePath>', 'Create a deployment script for .NET web application, specify the project file path') | ||
.option('--aspNetCore <projectFilePath>', 'Create a deployment script for ASP.NET Core web application, specify the project file path') // could be project.json, xproj, csproj | ||
.option('--aspWebSite', 'Create a deployment script for basic website') | ||
.option('--go', 'Create a deployment script for Go website') | ||
.option('--node', 'Create a deployment script for node.js website') | ||
.option('--ruby', 'Create a deployment script for ruby website') | ||
.option('--php', 'Create a deployment script for php website') | ||
.option('--python', 'Create a deployment script for python website') | ||
.option('--functionApp [projectFilePath]', 'Create a deployment script for function App, specify the project file path if using msbuild') | ||
.option('--basic', 'Create a deployment script for any other website') | ||
.option('--dotNetConsole <projectFilePath>', 'Create a deployment script for .NET console application, specify the project file path') | ||
.option('-s, --solutionFile <file path>', 'The solution file path (sln)') | ||
.option('-p, --sitePath <directory path>', 'The path to the site being deployed (default: same as repositoryRoot)') | ||
.option('-t, --scriptType <batch|bash|posh>', 'The script output type (default: batch)') | ||
.option('-o, --outputPath <output path>', 'The path to output generated script (default: same as repository root)') | ||
.option('-y, --suppressPrompt', 'Suppresses prompting to confirm you want to overwrite an existing destination file.') | ||
.option('--no-dot-deployment', 'Do not generate the .deployment file.') | ||
.option('--no-solution', 'Do not require a solution file path (only for --aspWAP otherwise ignored).'); | ||
.usage('[options]') | ||
.description('Generate custom deployment script') | ||
.option('-r, --repositoryRoot [dir path]', 'The root path for the repository (default: .)') | ||
.option('--aspWAP <projectFilePath>', 'Create a deployment script for .NET web application, specify the project file path') | ||
.option('--aspNetCore <projectFilePath>', 'Create a deployment script for ASP.NET Core web application, specify the project file path') // could be project.json, xproj, csproj | ||
.option('--aspWebSite', 'Create a deployment script for basic website') | ||
.option('--go', 'Create a deployment script for Go website') | ||
.option('--node', 'Create a deployment script for node.js website') | ||
.option('--ruby', 'Create a deployment script for ruby website') | ||
.option('--php', 'Create a deployment script for php website') | ||
.option('--python', 'Create a deployment script for python website') | ||
.option('--functionApp [projectFilePath]', 'Create a deployment script for function App, specify the project file path if using msbuild') | ||
.option('--basic', 'Create a deployment script for any other website') | ||
.option('--dotNetConsole <projectFilePath>', 'Create a deployment script for .NET console application, specify the project file path') | ||
.option('-s, --solutionFile <file path>', 'The solution file path (sln)') | ||
.option('-p, --sitePath <directory path>', 'The path to the site being deployed (default: same as repositoryRoot)') | ||
.option('-t, --scriptType <batch|bash|posh>', 'The script output type (default: batch)') | ||
.option('-o, --outputPath <output path>', 'The path to output generated script (default: same as repository root)') | ||
.option('-y, --suppressPrompt', 'Suppresses prompting to confirm you want to overwrite an existing destination file.') | ||
.option('--no-dot-deployment', 'Do not generate the .deployment file.') | ||
.option('--no-solution', 'Do not require a solution file path (only for --aspWAP otherwise ignored).'); | ||
} | ||
function tryOptionalInput(argument){ | ||
function tryOptionalInput(argument) { | ||
// if argument == true, means option is specified, but optional input IS NOT provided | ||
@@ -71,6 +71,6 @@ // if argument != true, value of its optional input is stored in argument | ||
} else if (options.aspNetCore) { | ||
projectType = generator.ProjectType.aspNetCore | ||
projectType = generator.ProjectType.aspNetCore; | ||
} else if (options.aspWebSite) { | ||
projectType = generator.ProjectType.website; | ||
}else if (options.go) { | ||
} else if (options.go) { | ||
projectType = generator.ProjectType.go; | ||
@@ -80,3 +80,3 @@ } else if (options.node) { | ||
} else if (options.python) { | ||
projectType = generator.ProjectType.python; | ||
projectType = generator.ProjectType.python; | ||
} else if (options.dotNetConsole) { | ||
@@ -83,0 +83,0 @@ projectType = generator.ProjectType.dotNetConsole; |
@@ -64,3 +64,3 @@ /*** Generated by streamline 0.4.11 (callbacks) - DO NOT EDIT ***/ var __rt=require('streamline/lib/callbacks/runtime').runtime(__filename),__func=__rt.__func,__cb=__rt.__cb; var package = require("../package.json"); | ||
if (((((projectType === ProjectType.wap) || (projectType === ProjectType.website)) || (projectType === ProjectType.python)) || (projectType === ProjectType.go))) { | ||
if ((((projectType === ProjectType.wap) || (projectType === ProjectType.website)) || (projectType === ProjectType.python))) { | ||
@@ -181,3 +181,3 @@ scriptType = ScriptType.batch; } | ||
function generateFunctionAppDeploymentScript(scriptGenerator, _) { var __frame = { name: "generateFunctionAppDeploymentScript", line: 179 }; return __func(_, this, arguments, generateFunctionAppDeploymentScript, 1, __frame, function __$generateFunctionAppDeploymentScript() { | ||
return scriptGenerator.generateFunctionAppDeploymentScript(__cb(_, __frame, 1, 4, _, true)); });}; | ||
return scriptGenerator.generateFunctionAppDeploymentScript(__cb(_, __frame, 1, 2, _, true)); });}; | ||
@@ -225,6 +225,10 @@ | ||
options.solutionPath = fixPathSeparatorToWindows(__this.solutionPath); | ||
options.projectPath = fixPathSeparatorToWindows(__this.projectPath); | ||
return __this.generateFunctionAppScript("functionmsbuild.template", options, __cb(_, __frame, 11, 4, __then, true)); } else { | ||
if (__this.solutionPath) { | ||
options.RestoreArguments = fixPathSeparatorToWindows(__this.solutionPath); } | ||
else { | ||
options.RestoreArguments = options.projectPath; } ; | ||
return __this.generateFunctionAppScript("functionmsbuild.template", options, __cb(_, __frame, 15, 4, __then, true)); } else { | ||
if ((__this.scriptType == ScriptType.bash)) { | ||
@@ -237,3 +241,3 @@ | ||
return __this.generateFunctionAppScript("functionbasic.template", options, __cb(_, __frame, 20, 4, __then, true)); } ; })(_); });}; | ||
return __this.generateFunctionAppScript("functionbasic.template", options, __cb(_, __frame, 24, 4, __then, true)); } ; })(_); });}; | ||
@@ -243,3 +247,3 @@ | ||
ScriptGenerator.prototype.generatePythonDeploymentScript = function ScriptGenerator_prototype_generatePythonDeploymentScript__5(_) { var __this = this; var __frame = { name: "ScriptGenerator_prototype_generatePythonDeploymentScript__5", line: 239 }; return __func(_, this, arguments, ScriptGenerator_prototype_generatePythonDeploymentScript__5, 0, __frame, function __$ScriptGenerator_prototype_generatePythonDeploymentScript__5() { | ||
ScriptGenerator.prototype.generatePythonDeploymentScript = function ScriptGenerator_prototype_generatePythonDeploymentScript__5(_) { var __this = this; var __frame = { name: "ScriptGenerator_prototype_generatePythonDeploymentScript__5", line: 243 }; return __func(_, this, arguments, ScriptGenerator_prototype_generatePythonDeploymentScript__5, 0, __frame, function __$ScriptGenerator_prototype_generatePythonDeploymentScript__5() { | ||
log.info("Generating deployment script for python Web Site"); | ||
@@ -254,3 +258,3 @@ | ||
ScriptGenerator.prototype.generateRubyDeploymentScript = function ScriptGenerator_prototype_generateRubyDeploymentScript__6(_) { var __this = this; var __frame = { name: "ScriptGenerator_prototype_generateRubyDeploymentScript__6", line: 249 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateRubyDeploymentScript__6, 0, __frame, function __$ScriptGenerator_prototype_generateRubyDeploymentScript__6() { | ||
ScriptGenerator.prototype.generateRubyDeploymentScript = function ScriptGenerator_prototype_generateRubyDeploymentScript__6(_) { var __this = this; var __frame = { name: "ScriptGenerator_prototype_generateRubyDeploymentScript__6", line: 253 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateRubyDeploymentScript__6, 0, __frame, function __$ScriptGenerator_prototype_generateRubyDeploymentScript__6() { | ||
log.info("Generating deployment script for Ruby Web Site"); | ||
@@ -261,3 +265,3 @@ | ||
ScriptGenerator.prototype.generatePHPDeploymentScript = function ScriptGenerator_prototype_generatePHPDeploymentScript__7(_) { var __this = this; var __frame = { name: "ScriptGenerator_prototype_generatePHPDeploymentScript__7", line: 255 }; return __func(_, this, arguments, ScriptGenerator_prototype_generatePHPDeploymentScript__7, 0, __frame, function __$ScriptGenerator_prototype_generatePHPDeploymentScript__7() { | ||
ScriptGenerator.prototype.generatePHPDeploymentScript = function ScriptGenerator_prototype_generatePHPDeploymentScript__7(_) { var __this = this; var __frame = { name: "ScriptGenerator_prototype_generatePHPDeploymentScript__7", line: 259 }; return __func(_, this, arguments, ScriptGenerator_prototype_generatePHPDeploymentScript__7, 0, __frame, function __$ScriptGenerator_prototype_generatePHPDeploymentScript__7() { | ||
log.info("Generating deployment script for PHP Web Site"); | ||
@@ -268,3 +272,3 @@ | ||
ScriptGenerator.prototype.generateWapDeploymentScript = function ScriptGenerator_prototype_generateWapDeploymentScript__8(_) { var msbuildArguments, msbuildArgumentsForInPlace, solutionDir, solutionArgs, options, __this = this; var __frame = { name: "ScriptGenerator_prototype_generateWapDeploymentScript__8", line: 261 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateWapDeploymentScript__8, 0, __frame, function __$ScriptGenerator_prototype_generateWapDeploymentScript__8() { | ||
ScriptGenerator.prototype.generateWapDeploymentScript = function ScriptGenerator_prototype_generateWapDeploymentScript__8(_) { var msbuildArguments, msbuildArgumentsForInPlace, solutionDir, solutionArgs, options, __this = this; var __frame = { name: "ScriptGenerator_prototype_generateWapDeploymentScript__8", line: 265 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateWapDeploymentScript__8, 0, __frame, function __$ScriptGenerator_prototype_generateWapDeploymentScript__8() { | ||
argNotNull(__this.projectPath, "projectPath"); | ||
@@ -320,3 +324,3 @@ | ||
ScriptGenerator.prototype.generateAspNetCoreDeploymentScript = function ScriptGenerator_prototype_generateAspNetCoreDeploymentScript__9(_) { var options, __this = this; var __frame = { name: "ScriptGenerator_prototype_generateAspNetCoreDeploymentScript__9", line: 312 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateAspNetCoreDeploymentScript__9, 0, __frame, function __$ScriptGenerator_prototype_generateAspNetCoreDeploymentScript__9() { | ||
ScriptGenerator.prototype.generateAspNetCoreDeploymentScript = function ScriptGenerator_prototype_generateAspNetCoreDeploymentScript__9(_) { var options, __this = this; var __frame = { name: "ScriptGenerator_prototype_generateAspNetCoreDeploymentScript__9", line: 316 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateAspNetCoreDeploymentScript__9, 0, __frame, function __$ScriptGenerator_prototype_generateAspNetCoreDeploymentScript__9() { | ||
argNotNull(__this.absoluteProjectPath, "absoluteProjectPath"); | ||
@@ -334,3 +338,3 @@ | ||
ScriptGenerator.prototype.generateDotNetConsoleDeploymentScript = function ScriptGenerator_prototype_generateDotNetConsoleDeploymentScript__10(_) { var msbuildArguments, solutionDir, solutionArgs, options, __this = this; var __frame = { name: "ScriptGenerator_prototype_generateDotNetConsoleDeploymentScript__10", line: 325 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateDotNetConsoleDeploymentScript__10, 0, __frame, function __$ScriptGenerator_prototype_generateDotNetConsoleDeploymentScript__10() { | ||
ScriptGenerator.prototype.generateDotNetConsoleDeploymentScript = function ScriptGenerator_prototype_generateDotNetConsoleDeploymentScript__10(_) { var msbuildArguments, solutionDir, solutionArgs, options, __this = this; var __frame = { name: "ScriptGenerator_prototype_generateDotNetConsoleDeploymentScript__10", line: 329 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateDotNetConsoleDeploymentScript__10, 0, __frame, function __$ScriptGenerator_prototype_generateDotNetConsoleDeploymentScript__10() { | ||
argNotNull(__this.projectPath, "projectPath"); | ||
@@ -380,3 +384,3 @@ | ||
ScriptGenerator.prototype.generateWebSiteDeploymentScript = function ScriptGenerator_prototype_generateWebSiteDeploymentScript__11(_) { var msbuildArguments, __this = this; var __frame = { name: "ScriptGenerator_prototype_generateWebSiteDeploymentScript__11", line: 370 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateWebSiteDeploymentScript__11, 0, __frame, function __$ScriptGenerator_prototype_generateWebSiteDeploymentScript__11() { return (function __$ScriptGenerator_prototype_generateWebSiteDeploymentScript__11(__then) { | ||
ScriptGenerator.prototype.generateWebSiteDeploymentScript = function ScriptGenerator_prototype_generateWebSiteDeploymentScript__11(_) { var msbuildArguments, __this = this; var __frame = { name: "ScriptGenerator_prototype_generateWebSiteDeploymentScript__11", line: 374 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateWebSiteDeploymentScript__11, 0, __frame, function __$ScriptGenerator_prototype_generateWebSiteDeploymentScript__11() { return (function __$ScriptGenerator_prototype_generateWebSiteDeploymentScript__11(__then) { | ||
if (__this.solutionPath) { | ||
@@ -406,3 +410,3 @@ | ||
ScriptGenerator.prototype.generateBasicDeploymentScript = function ScriptGenerator_prototype_generateBasicDeploymentScript__12(templateFileName, _) { var lowerCaseScriptType, fixedSitePath, templateContent, __this = this; var __frame = { name: "ScriptGenerator_prototype_generateBasicDeploymentScript__12", line: 395 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateBasicDeploymentScript__12, 1, __frame, function __$ScriptGenerator_prototype_generateBasicDeploymentScript__12() { | ||
ScriptGenerator.prototype.generateBasicDeploymentScript = function ScriptGenerator_prototype_generateBasicDeploymentScript__12(templateFileName, _) { var lowerCaseScriptType, fixedSitePath, templateContent, __this = this; var __frame = { name: "ScriptGenerator_prototype_generateBasicDeploymentScript__12", line: 399 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateBasicDeploymentScript__12, 1, __frame, function __$ScriptGenerator_prototype_generateBasicDeploymentScript__12() { | ||
argNotNull(templateFileName, "templateFileName"); | ||
@@ -421,3 +425,3 @@ | ||
ScriptGenerator.prototype.generateFunctionAppScript = function ScriptGenerator_prototype_generateFunctionAppScript__13(templateFileName, options, _) { var lowerCaseScriptType, templateContent, __this = this; var __frame = { name: "ScriptGenerator_prototype_generateFunctionAppScript__13", line: 409 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateFunctionAppScript__13, 2, __frame, function __$ScriptGenerator_prototype_generateFunctionAppScript__13() { | ||
ScriptGenerator.prototype.generateFunctionAppScript = function ScriptGenerator_prototype_generateFunctionAppScript__13(templateFileName, options, _) { var lowerCaseScriptType, templateContent, __this = this; var __frame = { name: "ScriptGenerator_prototype_generateFunctionAppScript__13", line: 413 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateFunctionAppScript__13, 2, __frame, function __$ScriptGenerator_prototype_generateFunctionAppScript__13() { | ||
argNotNull(templateFileName, "templateFileName"); | ||
@@ -432,3 +436,3 @@ | ||
templateContent = getTemplatesContent([(("deploy." + lowerCaseScriptType) + ".prefix.template"),((("deploy." + lowerCaseScriptType) + ".") + templateFileName),(("deploy." + lowerCaseScriptType) + ".postfix.template"),]).replace(/{SitePath}/g, options.sitePath).replace(/{SolutionPath}/g, options.solutionPath).replace(/{ProjectPath}/g, options.projectPath); | ||
templateContent = getTemplatesContent([(("deploy." + lowerCaseScriptType) + ".prefix.template"),((("deploy." + lowerCaseScriptType) + ".") + templateFileName),(("deploy." + lowerCaseScriptType) + ".postfix.template"),]).replace(/{SitePath}/g, options.sitePath).replace(/{RestoreArguments}/g, options.RestoreArguments).replace(/{ProjectPath}/g, options.projectPath); | ||
@@ -438,3 +442,3 @@ return __this.writeDeploymentFiles(templateContent, __cb(_, __frame, 12, 2, _, true)); });}; | ||
ScriptGenerator.prototype.generateDotNetDeploymentScript = function ScriptGenerator_prototype_generateDotNetDeploymentScript__14(templateFileName, options, _) { var lowerCaseScriptType, solutionDir, templateContent, __this = this; var __frame = { name: "ScriptGenerator_prototype_generateDotNetDeploymentScript__14", line: 424 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateDotNetDeploymentScript__14, 2, __frame, function __$ScriptGenerator_prototype_generateDotNetDeploymentScript__14() { | ||
ScriptGenerator.prototype.generateDotNetDeploymentScript = function ScriptGenerator_prototype_generateDotNetDeploymentScript__14(templateFileName, options, _) { var lowerCaseScriptType, solutionDir, templateContent, __this = this; var __frame = { name: "ScriptGenerator_prototype_generateDotNetDeploymentScript__14", line: 428 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateDotNetDeploymentScript__14, 2, __frame, function __$ScriptGenerator_prototype_generateDotNetDeploymentScript__14() { | ||
argNotNull(templateFileName, "templateFileName"); | ||
@@ -459,3 +463,3 @@ | ||
ScriptGenerator.prototype.generateAspNetCoreScript = function ScriptGenerator_prototype_generateAspNetCoreScript__15(templateFileName, options, _) { var prop, lowerCaseScriptType, templateContent, __this = this; var __frame = { name: "ScriptGenerator_prototype_generateAspNetCoreScript__15", line: 444 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateAspNetCoreScript__15, 2, __frame, function __$ScriptGenerator_prototype_generateAspNetCoreScript__15() { | ||
ScriptGenerator.prototype.generateAspNetCoreScript = function ScriptGenerator_prototype_generateAspNetCoreScript__15(templateFileName, options, _) { var prop, lowerCaseScriptType, templateContent, __this = this; var __frame = { name: "ScriptGenerator_prototype_generateAspNetCoreScript__15", line: 448 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateAspNetCoreScript__15, 2, __frame, function __$ScriptGenerator_prototype_generateAspNetCoreScript__15() { | ||
argNotNull(templateFileName, "templateFileName"); | ||
@@ -513,3 +517,3 @@ | ||
ScriptGenerator.prototype.writeDeploymentFiles = function ScriptGenerator_prototype_writeDeploymentFiles__16(templateContent, _) { var deployScriptFileName, deploymentCommand, deployScriptPath, deploymentFilePath, __this = this; var __frame = { name: "ScriptGenerator_prototype_writeDeploymentFiles__16", line: 497 }; return __func(_, this, arguments, ScriptGenerator_prototype_writeDeploymentFiles__16, 1, __frame, function __$ScriptGenerator_prototype_writeDeploymentFiles__16() { | ||
ScriptGenerator.prototype.writeDeploymentFiles = function ScriptGenerator_prototype_writeDeploymentFiles__16(templateContent, _) { var deployScriptFileName, deploymentCommand, deployScriptPath, deploymentFilePath, __this = this; var __frame = { name: "ScriptGenerator_prototype_writeDeploymentFiles__16", line: 501 }; return __func(_, this, arguments, ScriptGenerator_prototype_writeDeploymentFiles__16, 1, __frame, function __$ScriptGenerator_prototype_writeDeploymentFiles__16() { | ||
argNotNull(templateContent, "templateContent"); | ||
@@ -555,3 +559,3 @@ | ||
function writeContentToFile(path, content, _) { var __frame = { name: "writeContentToFile", line: 538 }; return __func(_, this, arguments, writeContentToFile, 2, __frame, function __$writeContentToFile() { return (function __$writeContentToFile(__then) { | ||
function writeContentToFile(path, content, _) { var __frame = { name: "writeContentToFile", line: 542 }; return __func(_, this, arguments, writeContentToFile, 2, __frame, function __$writeContentToFile() { return (function __$writeContentToFile(__then) { | ||
@@ -558,0 +562,0 @@ if (fs.existsSync(path)) { |
{ | ||
"name": "kuduscript", | ||
"author": "Outercurve Foundation", | ||
"version": "1.0.16", | ||
"version": "1.0.17", | ||
"description": "Tool for generating deployment scripts for Azure Websites", | ||
@@ -6,0 +6,0 @@ "tags": [ |
Sorry, the diff of this file is not supported yet
644
84424