@esri/solution-deployer 6.6.1-next.6 → 6.6.1-next.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/deploySolutionFromTemplate.d.ts +8 -0
- package/dist/cjs/deploySolutionFromTemplate.js +16 -1
- package/dist/cjs/deployerUtils.js +2 -1
- package/dist/esm/deploySolutionFromTemplate.d.ts +8 -0
- package/dist/esm/deploySolutionFromTemplate.js +14 -0
- package/dist/esm/deployerUtils.js +2 -1
- package/package.json +14 -14
|
@@ -39,6 +39,14 @@ export declare function _addSourceId(templates: common.IItemTemplate[]): common.
|
|
|
39
39
|
* @private
|
|
40
40
|
*/
|
|
41
41
|
export declare function _applySourceToDeployOptions(deployOptions: common.IDeploySolutionOptions, solutionTemplateBase: any, templateDictionary: any, authentication: common.UserSession): common.IDeploySolutionOptions;
|
|
42
|
+
/**
|
|
43
|
+
* Update the custom parameters in template base
|
|
44
|
+
*
|
|
45
|
+
* @param solutionTemplateBase the item base to replace
|
|
46
|
+
* @param templateDictionary the template with substitution values
|
|
47
|
+
* @private
|
|
48
|
+
*/
|
|
49
|
+
export declare function _replaceBaseParamVariables(solutionTemplateBase: any, templateDictionary: any): any;
|
|
42
50
|
export declare function _replaceParamVariables(solutionTemplateData: any, templateDictionary: any): void;
|
|
43
51
|
export declare function _updateProp(template: common.IItemTemplate, path: string, lookup: string, templateDictionary: any): common.IItemTemplate;
|
|
44
52
|
export declare function _checkedReplaceAll(template: string, oldValue: string, newValue: string): string;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports._getNewItemId = exports._purgeTemplateProperties = exports._updateGroupReferences = exports._getPortalBaseUrl = exports._checkedReplaceAll = exports._updateProp = exports._replaceParamVariables = exports._applySourceToDeployOptions = exports._addSourceId = exports._handleWorkflowManagedTemplates = exports.deploySolutionFromTemplate = void 0;
|
|
18
|
+
exports._getNewItemId = exports._purgeTemplateProperties = exports._updateGroupReferences = exports._getPortalBaseUrl = exports._checkedReplaceAll = exports._updateProp = exports._replaceParamVariables = exports._replaceBaseParamVariables = exports._applySourceToDeployOptions = exports._addSourceId = exports._handleWorkflowManagedTemplates = exports.deploySolutionFromTemplate = void 0;
|
|
19
19
|
const tslib_1 = require("tslib");
|
|
20
20
|
const common = tslib_1.__importStar(require("@esri/solution-common"));
|
|
21
21
|
const deployItems = tslib_1.__importStar(require("./deploySolutionItems"));
|
|
@@ -62,6 +62,7 @@ async function deploySolutionFromTemplate(templateSolutionId, solutionTemplateBa
|
|
|
62
62
|
// Fetch the thumbnail
|
|
63
63
|
thumbDef = common.getBlobAsFile(thumbnailurl, thumbFilename, storageAuthentication, [400]);
|
|
64
64
|
}
|
|
65
|
+
solutionTemplateBase = _replaceBaseParamVariables(solutionTemplateBase, templateDictionary);
|
|
65
66
|
_replaceParamVariables(solutionTemplateData, templateDictionary);
|
|
66
67
|
// Get information about deployment environment
|
|
67
68
|
const environResponses = await Promise.all([
|
|
@@ -252,6 +253,20 @@ function _applySourceToDeployOptions(deployOptions, solutionTemplateBase, templa
|
|
|
252
253
|
return deployOptions;
|
|
253
254
|
}
|
|
254
255
|
exports._applySourceToDeployOptions = _applySourceToDeployOptions;
|
|
256
|
+
/**
|
|
257
|
+
* Update the custom parameters in template base
|
|
258
|
+
*
|
|
259
|
+
* @param solutionTemplateBase the item base to replace
|
|
260
|
+
* @param templateDictionary the template with substitution values
|
|
261
|
+
* @private
|
|
262
|
+
*/
|
|
263
|
+
function _replaceBaseParamVariables(solutionTemplateBase, templateDictionary) {
|
|
264
|
+
// a custom params object can be passed in with the options to deploy a solution
|
|
265
|
+
// to replace parameters in the based such has title, description and tags
|
|
266
|
+
solutionTemplateBase = common.replaceInTemplate(solutionTemplateBase, templateDictionary);
|
|
267
|
+
return solutionTemplateBase;
|
|
268
|
+
}
|
|
269
|
+
exports._replaceBaseParamVariables = _replaceBaseParamVariables;
|
|
255
270
|
//TODO: function doc
|
|
256
271
|
function _replaceParamVariables(solutionTemplateData, templateDictionary) {
|
|
257
272
|
// a custom params object can be passed in with the options to deploy a solution
|
|
@@ -104,7 +104,8 @@ function isSolutionTemplateItem(item) {
|
|
|
104
104
|
// Solution items
|
|
105
105
|
let result = false;
|
|
106
106
|
if (item.type === "Solution") {
|
|
107
|
-
if (kwds.indexOf("Solution") > -1 &&
|
|
107
|
+
if (kwds.indexOf("Solution") > -1 &&
|
|
108
|
+
(kwds.indexOf("Template") > -1 || kwds.indexOf("solutionTemplate") > -1 || kwds.indexOf("Build") > -1)) {
|
|
108
109
|
result = true;
|
|
109
110
|
}
|
|
110
111
|
}
|
|
@@ -39,6 +39,14 @@ export declare function _addSourceId(templates: common.IItemTemplate[]): common.
|
|
|
39
39
|
* @private
|
|
40
40
|
*/
|
|
41
41
|
export declare function _applySourceToDeployOptions(deployOptions: common.IDeploySolutionOptions, solutionTemplateBase: any, templateDictionary: any, authentication: common.UserSession): common.IDeploySolutionOptions;
|
|
42
|
+
/**
|
|
43
|
+
* Update the custom parameters in template base
|
|
44
|
+
*
|
|
45
|
+
* @param solutionTemplateBase the item base to replace
|
|
46
|
+
* @param templateDictionary the template with substitution values
|
|
47
|
+
* @private
|
|
48
|
+
*/
|
|
49
|
+
export declare function _replaceBaseParamVariables(solutionTemplateBase: any, templateDictionary: any): any;
|
|
42
50
|
export declare function _replaceParamVariables(solutionTemplateData: any, templateDictionary: any): void;
|
|
43
51
|
export declare function _updateProp(template: common.IItemTemplate, path: string, lookup: string, templateDictionary: any): common.IItemTemplate;
|
|
44
52
|
export declare function _checkedReplaceAll(template: string, oldValue: string, newValue: string): string;
|
|
@@ -58,6 +58,7 @@ export async function deploySolutionFromTemplate(templateSolutionId, solutionTem
|
|
|
58
58
|
// Fetch the thumbnail
|
|
59
59
|
thumbDef = common.getBlobAsFile(thumbnailurl, thumbFilename, storageAuthentication, [400]);
|
|
60
60
|
}
|
|
61
|
+
solutionTemplateBase = _replaceBaseParamVariables(solutionTemplateBase, templateDictionary);
|
|
61
62
|
_replaceParamVariables(solutionTemplateData, templateDictionary);
|
|
62
63
|
// Get information about deployment environment
|
|
63
64
|
const environResponses = await Promise.all([
|
|
@@ -244,6 +245,19 @@ export function _applySourceToDeployOptions(deployOptions, solutionTemplateBase,
|
|
|
244
245
|
}
|
|
245
246
|
return deployOptions;
|
|
246
247
|
}
|
|
248
|
+
/**
|
|
249
|
+
* Update the custom parameters in template base
|
|
250
|
+
*
|
|
251
|
+
* @param solutionTemplateBase the item base to replace
|
|
252
|
+
* @param templateDictionary the template with substitution values
|
|
253
|
+
* @private
|
|
254
|
+
*/
|
|
255
|
+
export function _replaceBaseParamVariables(solutionTemplateBase, templateDictionary) {
|
|
256
|
+
// a custom params object can be passed in with the options to deploy a solution
|
|
257
|
+
// to replace parameters in the based such has title, description and tags
|
|
258
|
+
solutionTemplateBase = common.replaceInTemplate(solutionTemplateBase, templateDictionary);
|
|
259
|
+
return solutionTemplateBase;
|
|
260
|
+
}
|
|
247
261
|
//TODO: function doc
|
|
248
262
|
export function _replaceParamVariables(solutionTemplateData, templateDictionary) {
|
|
249
263
|
// a custom params object can be passed in with the options to deploy a solution
|
|
@@ -97,7 +97,8 @@ export function isSolutionTemplateItem(item) {
|
|
|
97
97
|
// Solution items
|
|
98
98
|
let result = false;
|
|
99
99
|
if (item.type === "Solution") {
|
|
100
|
-
if (kwds.indexOf("Solution") > -1 &&
|
|
100
|
+
if (kwds.indexOf("Solution") > -1 &&
|
|
101
|
+
(kwds.indexOf("Template") > -1 || kwds.indexOf("solutionTemplate") > -1 || kwds.indexOf("Build") > -1)) {
|
|
101
102
|
result = true;
|
|
102
103
|
}
|
|
103
104
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@esri/solution-deployer",
|
|
3
|
-
"version": "6.6.1-next.
|
|
3
|
+
"version": "6.6.1-next.8",
|
|
4
4
|
"description": "Manages the deployment of a Solution for @esri/solution.js.",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -24,18 +24,18 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@esri/hub-common": "^17.0.2",
|
|
27
|
-
"@esri/solution-common": "^6.6.1-next.
|
|
28
|
-
"@esri/solution-feature-layer": "^6.6.1-next.
|
|
29
|
-
"@esri/solution-file": "^6.6.1-next.
|
|
30
|
-
"@esri/solution-form": "^6.6.1-next.
|
|
31
|
-
"@esri/solution-group": "^6.6.1-next.
|
|
32
|
-
"@esri/solution-hub-types": "^6.6.1-next.
|
|
33
|
-
"@esri/solution-simple-types": "^6.6.1-next.
|
|
34
|
-
"@esri/solution-storymap": "^6.6.1-next.
|
|
35
|
-
"@esri/solution-velocity": "^6.6.1-next.
|
|
36
|
-
"@esri/solution-web-experience": "^6.6.1-next.
|
|
37
|
-
"@esri/solution-web-tool": "^6.6.1-next.
|
|
38
|
-
"@esri/solution-workflow": "^6.6.1-next.
|
|
27
|
+
"@esri/solution-common": "^6.6.1-next.8",
|
|
28
|
+
"@esri/solution-feature-layer": "^6.6.1-next.8",
|
|
29
|
+
"@esri/solution-file": "^6.6.1-next.8",
|
|
30
|
+
"@esri/solution-form": "^6.6.1-next.8",
|
|
31
|
+
"@esri/solution-group": "^6.6.1-next.8",
|
|
32
|
+
"@esri/solution-hub-types": "^6.6.1-next.8",
|
|
33
|
+
"@esri/solution-simple-types": "^6.6.1-next.8",
|
|
34
|
+
"@esri/solution-storymap": "^6.6.1-next.8",
|
|
35
|
+
"@esri/solution-velocity": "^6.6.1-next.8",
|
|
36
|
+
"@esri/solution-web-experience": "^6.6.1-next.8",
|
|
37
|
+
"@esri/solution-web-tool": "^6.6.1-next.8",
|
|
38
|
+
"@esri/solution-workflow": "^6.6.1-next.8",
|
|
39
39
|
"tslib": "1.14.1"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
"esri",
|
|
91
91
|
"ES6"
|
|
92
92
|
],
|
|
93
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "8814f2ac401b02f60559d7007e180cc17c321473"
|
|
94
94
|
}
|