@@ -32,6 +32,7 @@ export function deploySolutionsInFolder(
3232 destAuthentication : common . UserSession ,
3333 progressCallback : common . ISolutionProgressCallback ,
3434 enableItemReuse : boolean ,
35+ dontCreateSolutionItem : boolean ,
3536 customParams : any
3637) : Promise < string > {
3738 const query = new common . SearchQueryBuilder ( )
@@ -53,7 +54,8 @@ export function deploySolutionsInFolder(
5354 } as ISolutionInfoCard ;
5455 }
5556 ) ;
56- return deployBatchOfSolutions ( solutionsToDeploy , solutionsToDeploy . length , srcAuthentication , destAuthentication , progressCallback , enableItemReuse , customParams ) ;
57+ return deployBatchOfSolutions ( solutionsToDeploy , solutionsToDeploy . length ,
58+ srcAuthentication , destAuthentication , progressCallback , enableItemReuse , dontCreateSolutionItem , customParams ) ;
5759 } else {
5860 return Promise . resolve ( "<i>No solutions found in folder</i>" ) ;
5961 }
@@ -67,6 +69,7 @@ function deployBatchOfSolutions(
6769 destAuthentication : common . UserSession ,
6870 progressCallback : common . ISolutionProgressCallback ,
6971 enableItemReuse : boolean ,
72+ dontCreateSolutionItem : boolean ,
7073 customParams : any
7174) : Promise < string > {
7275 // Deploy the first item in the list
@@ -83,6 +86,7 @@ function deployBatchOfSolutions(
8386 destAuthentication ,
8487 progressCallback ,
8588 enableItemReuse ,
89+ dontCreateSolutionItem ,
8690 customParams
8791 ) ;
8892 }
@@ -94,7 +98,7 @@ function deployBatchOfSolutions(
9498 let remainingDeployPromise = Promise . resolve ( "" ) ;
9599 if ( solutionsToDeploy . length > 0 ) {
96100 remainingDeployPromise = deployBatchOfSolutions ( solutionsToDeploy , totalNumberOfSolutions ,
97- srcAuthentication , destAuthentication , progressCallback , enableItemReuse , customParams ) ;
101+ srcAuthentication , destAuthentication , progressCallback , enableItemReuse , dontCreateSolutionItem , customParams ) ;
98102 }
99103 return remainingDeployPromise ;
100104 } )
@@ -110,6 +114,7 @@ export function deploySolution(
110114 destAuthentication : common . UserSession ,
111115 progressCallback : common . ISolutionProgressCallback ,
112116 enableItemReuse : boolean ,
117+ dontCreateSolutionItem : boolean ,
113118 customParams : any
114119) : Promise < string > {
115120 // Deploy a solution described by the supplied id
@@ -121,7 +126,8 @@ export function deploySolution(
121126 enableItemReuse,
122127 templateDictionary : isJsonStr ( customParams ) ? {
123128 params : JSON . parse ( customParams )
124- } : { }
129+ } : { } ,
130+ dontCreateSolutionItem
125131 } ;
126132 const itemUrlPrefix = destAuthentication . portal . replace ( "/sharing/rest" , "" ) ;
127133
@@ -138,6 +144,7 @@ export function deployAndDisplaySolution(
138144 destAuthentication : common . UserSession ,
139145 progressCallback : common . ISolutionProgressCallback ,
140146 enableItemReuse : boolean ,
147+ dontCreateSolutionItem : boolean ,
141148 customParams : any
142149) : Promise < string > {
143150 // Deploy a solution described by the supplied id
@@ -150,12 +157,17 @@ export function deployAndDisplaySolution(
150157 enableItemReuse,
151158 templateDictionary : isJsonStr ( customParams ) ? {
152159 params : JSON . parse ( customParams )
153- } : { }
160+ } : { } ,
161+ dontCreateSolutionItem
154162 } ;
155163
156164 return deployer . deploySolution ( templateSolutionId , destAuthentication , options )
157- . then ( ( deployedSolution : any ) => {
158- return getFormattedItemInfo . getFormattedItemInfo ( deployedSolution , destAuthentication ) ;
165+ . then ( ( createdSolutionId : string ) => {
166+ if ( dontCreateSolutionItem ) {
167+ return "Deployed solution" ;
168+ } else {
169+ return getFormattedItemInfo . getFormattedItemInfo ( createdSolutionId , destAuthentication ) ;
170+ }
159171 } ) ;
160172}
161173
0 commit comments