@@ -32,7 +32,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
3232 } ) ;
3333} ;
3434Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
35- exports . validatePackageInput = exports . validateContainerInputs = exports . validateSingleContainerInputs = exports . multiContainerNotAllowed = exports . packageNotAllowed = exports . startupCommandNotAllowed = exports . validateAppDetails = exports . containerInputsNotAllowed = exports . appNameIsRequired = void 0 ;
35+ exports . appNameIsRequired = appNameIsRequired ;
36+ exports . containerInputsNotAllowed = containerInputsNotAllowed ;
37+ exports . validateAppDetails = validateAppDetails ;
38+ exports . startupCommandNotAllowed = startupCommandNotAllowed ;
39+ exports . packageNotAllowed = packageNotAllowed ;
40+ exports . multiContainerNotAllowed = multiContainerNotAllowed ;
41+ exports . validateSingleContainerInputs = validateSingleContainerInputs ;
42+ exports . validateContainerInputs = validateContainerInputs ;
43+ exports . validatePackageInput = validatePackageInput ;
3644const core = __importStar ( require ( "@actions/core" ) ) ;
3745const packageUtility_1 = require ( "azure-actions-utility/packageUtility" ) ;
3846const PublishProfile_1 = require ( "../Utilities/PublishProfile" ) ;
@@ -44,14 +52,12 @@ function appNameIsRequired(appname) {
4452 throw new Error ( "app-name is a required input." ) ;
4553 }
4654}
47- exports . appNameIsRequired = appNameIsRequired ;
4855// Error if image info is provided
4956function containerInputsNotAllowed ( images , configFile , isPublishProfile = false ) {
5057 if ( ! ! images || ! ! configFile ) {
5158 throw new Error ( `This is not a container web app. Please remove inputs like images and configuration-file which are only relevant for container deployment.` ) ;
5259 }
5360}
54- exports . containerInputsNotAllowed = containerInputsNotAllowed ;
5561// Cross-validate provided app name and slot is same as that in publish profile
5662function validateAppDetails ( ) {
5763 let actionParams = actionparameters_1 . ActionParameters . getActionParams ( ) ;
@@ -66,36 +72,31 @@ function validateAppDetails() {
6672 }
6773 }
6874}
69- exports . validateAppDetails = validateAppDetails ;
7075// Error is startup command is provided
7176function startupCommandNotAllowed ( startupCommand ) {
7277 if ( ! ! startupCommand ) {
7378 throw new Error ( "startup-command is not a valid input for Windows web app or with publish-profile auth scheme." ) ;
7479 }
7580}
76- exports . startupCommandNotAllowed = startupCommandNotAllowed ;
7781// Error if package input is provided
7882function packageNotAllowed ( apppackage ) {
7983 if ( ! ! apppackage && apppackage !== '.' ) {
8084 throw new Error ( "package is not a valid input for container web app." ) ;
8185 }
8286}
83- exports . packageNotAllowed = packageNotAllowed ;
8487// Error if multi container config file is provided
8588function multiContainerNotAllowed ( configFile ) {
8689 if ( ! ! configFile ) {
8790 throw new Error ( "Multi container support is not available for windows containerized web app or with publish profile." ) ;
8891 }
8992}
90- exports . multiContainerNotAllowed = multiContainerNotAllowed ;
9193// Error if image name is not provided
9294function validateSingleContainerInputs ( ) {
9395 const actionParams = actionparameters_1 . ActionParameters . getActionParams ( ) ;
9496 if ( ! actionParams . images ) {
9597 throw new Error ( "Image name not provided for container. Provide a valid image name" ) ;
9698 }
9799}
98- exports . validateSingleContainerInputs = validateSingleContainerInputs ;
99100// Validate container inputs
100101function validateContainerInputs ( ) {
101102 let actionParams = actionparameters_1 . ActionParameters . getActionParams ( ) ;
@@ -123,7 +124,6 @@ function validateContainerInputs() {
123124 throw new Error ( "Multiple images indicate multi-container deployment type, but Docker-compose file is absent." ) ;
124125 }
125126}
126- exports . validateContainerInputs = validateContainerInputs ;
127127// validate package input
128128function validatePackageInput ( ) {
129129 return __awaiter ( this , void 0 , void 0 , function * ( ) {
@@ -136,4 +136,3 @@ function validatePackageInput() {
136136 }
137137 } ) ;
138138}
139- exports . validatePackageInput = validatePackageInput ;
0 commit comments