@esri/solution-deployer 6.6.1-next.2 → 6.6.1-next.20

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.
@@ -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 && (kwds.indexOf("Template") > -1 || kwds.indexOf("solutionTemplate") > -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 && (kwds.indexOf("Template") > -1 || kwds.indexOf("solutionTemplate") > -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.2",
3
+ "version": "6.6.1-next.20",
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,28 +24,28 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@esri/hub-common": "^17.0.2",
27
- "@esri/solution-common": "^6.6.1-next.2",
28
- "@esri/solution-feature-layer": "^6.6.1-next.2",
29
- "@esri/solution-file": "^6.6.1-next.2",
30
- "@esri/solution-form": "^6.6.1-next.2",
31
- "@esri/solution-group": "^6.6.1-next.2",
32
- "@esri/solution-hub-types": "^6.6.1-next.2",
33
- "@esri/solution-simple-types": "^6.6.1-next.2",
34
- "@esri/solution-storymap": "^6.6.1-next.2",
35
- "@esri/solution-velocity": "^6.6.1-next.2",
36
- "@esri/solution-web-experience": "^6.6.1-next.2",
37
- "@esri/solution-web-tool": "^6.6.1-next.2",
38
- "@esri/solution-workflow": "^6.6.1-next.2",
27
+ "@esri/solution-common": "^6.6.1-next.20",
28
+ "@esri/solution-feature-layer": "^6.6.1-next.20",
29
+ "@esri/solution-file": "^6.6.1-next.20",
30
+ "@esri/solution-form": "^6.6.1-next.20",
31
+ "@esri/solution-group": "^6.6.1-next.20",
32
+ "@esri/solution-hub-types": "^6.6.1-next.20",
33
+ "@esri/solution-simple-types": "^6.6.1-next.20",
34
+ "@esri/solution-storymap": "^6.6.1-next.20",
35
+ "@esri/solution-velocity": "^6.6.1-next.20",
36
+ "@esri/solution-web-experience": "^6.6.1-next.20",
37
+ "@esri/solution-web-tool": "^6.6.1-next.20",
38
+ "@esri/solution-workflow": "^6.6.1-next.20",
39
39
  "tslib": "1.14.1"
40
40
  },
41
41
  "scripts": {
42
42
  "build": "npm-run-all --parallel build:*",
43
- "build:cjs": "tsc --outDir ./dist/cjs -m commonjs",
43
+ "build:cjs": "tsc --outDir ./dist/cjs -m commonjs --moduleResolution node",
44
44
  "postbuild:cjs": "node ../../scripts/create-dist-package-jsons.mjs",
45
45
  "build:esm": "tsc --outDir ./dist/esm --declaration",
46
46
  "postbuild:esm": "node ../../scripts/create-dist-package-jsons.mjs",
47
47
  "dev": "npm-run-all --parallel dev:*",
48
- "dev:cjs": "tsc -w --outDir ./dist/cjs -m commonjs",
48
+ "dev:cjs": "tsc -w --outDir ./dist/cjs -m commonjs --moduleResolution node",
49
49
  "dev:esm": "tsc -w --outDir ./dist/esm --declaration",
50
50
  "getupdates": "npm-check-updates --upgrade"
51
51
  },
@@ -90,5 +90,5 @@
90
90
  "esri",
91
91
  "ES6"
92
92
  ],
93
- "gitHead": "13cd04bd6e80454612e0d7a67af136d0f603e9f4"
93
+ "gitHead": "a29e6bb53d93ca13f9115b80bfda71cbe6ff0e17"
94
94
  }