@esri/solution-deployer 6.0.4-alpha.0 → 6.1.0-alpha.0

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.
Files changed (55) hide show
  1. package/package.json +15 -15
  2. package/dist/cjs/deploySolutionFromTemplate.d.ts +0 -55
  3. package/dist/cjs/deploySolutionFromTemplate.js +0 -334
  4. package/dist/cjs/deploySolutionFromTemplate.js.map +0 -1
  5. package/dist/cjs/deploySolutionItems.d.ts +0 -224
  6. package/dist/cjs/deploySolutionItems.js +0 -876
  7. package/dist/cjs/deploySolutionItems.js.map +0 -1
  8. package/dist/cjs/deployer.d.ts +0 -34
  9. package/dist/cjs/deployer.js +0 -99
  10. package/dist/cjs/deployer.js.map +0 -1
  11. package/dist/cjs/deployerUtils.d.ts +0 -47
  12. package/dist/cjs/deployerUtils.js +0 -120
  13. package/dist/cjs/deployerUtils.js.map +0 -1
  14. package/dist/cjs/helpers/post-process.d.ts +0 -29
  15. package/dist/cjs/helpers/post-process.js +0 -63
  16. package/dist/cjs/helpers/post-process.js.map +0 -1
  17. package/dist/cjs/helpers/share-templates-to-groups.d.ts +0 -24
  18. package/dist/cjs/helpers/share-templates-to-groups.js +0 -65
  19. package/dist/cjs/helpers/share-templates-to-groups.js.map +0 -1
  20. package/dist/cjs/helpers/sortTemplates.d.ts +0 -23
  21. package/dist/cjs/helpers/sortTemplates.js +0 -14
  22. package/dist/cjs/helpers/sortTemplates.js.map +0 -1
  23. package/dist/cjs/index.d.ts +0 -24
  24. package/dist/cjs/index.js +0 -28
  25. package/dist/cjs/index.js.map +0 -1
  26. package/dist/cjs/module-map.d.ts +0 -23
  27. package/dist/cjs/module-map.js +0 -234
  28. package/dist/cjs/module-map.js.map +0 -1
  29. package/dist/esm/deploySolutionFromTemplate.d.ts +0 -55
  30. package/dist/esm/deploySolutionFromTemplate.js +0 -319
  31. package/dist/esm/deploySolutionFromTemplate.js.map +0 -1
  32. package/dist/esm/deploySolutionItems.d.ts +0 -224
  33. package/dist/esm/deploySolutionItems.js +0 -853
  34. package/dist/esm/deploySolutionItems.js.map +0 -1
  35. package/dist/esm/deployer.d.ts +0 -34
  36. package/dist/esm/deployer.js +0 -94
  37. package/dist/esm/deployer.js.map +0 -1
  38. package/dist/esm/deployerUtils.d.ts +0 -47
  39. package/dist/esm/deployerUtils.js +0 -112
  40. package/dist/esm/deployerUtils.js.map +0 -1
  41. package/dist/esm/helpers/post-process.d.ts +0 -29
  42. package/dist/esm/helpers/post-process.js +0 -59
  43. package/dist/esm/helpers/post-process.js.map +0 -1
  44. package/dist/esm/helpers/share-templates-to-groups.d.ts +0 -24
  45. package/dist/esm/helpers/share-templates-to-groups.js +0 -61
  46. package/dist/esm/helpers/share-templates-to-groups.js.map +0 -1
  47. package/dist/esm/helpers/sortTemplates.d.ts +0 -23
  48. package/dist/esm/helpers/sortTemplates.js +0 -10
  49. package/dist/esm/helpers/sortTemplates.js.map +0 -1
  50. package/dist/esm/index.d.ts +0 -24
  51. package/dist/esm/index.js +0 -25
  52. package/dist/esm/index.js.map +0 -1
  53. package/dist/esm/module-map.d.ts +0 -23
  54. package/dist/esm/module-map.js +0 -230
  55. package/dist/esm/module-map.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/solution-deployer",
3
- "version": "6.0.4-alpha.0",
3
+ "version": "6.1.0-alpha.0",
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",
@@ -23,19 +23,19 @@
23
23
  "sinon": "^15.2.0"
24
24
  },
25
25
  "dependencies": {
26
- "@esri/hub-common": "https://hub-library-preview.s3.amazonaws.com/@esri/hub-common/PR-1850/86607069d967e4c20d11826a50faeb711bf6f437.tgz",
27
- "@esri/solution-common": "^6.0.4-alpha.0",
28
- "@esri/solution-feature-layer": "^6.0.4-alpha.0",
29
- "@esri/solution-file": "^6.0.4-alpha.0",
30
- "@esri/solution-form": "^6.0.4-alpha.0",
31
- "@esri/solution-group": "^6.0.4-alpha.0",
32
- "@esri/solution-hub-types": "^6.0.4-alpha.0",
33
- "@esri/solution-simple-types": "^6.0.4-alpha.0",
34
- "@esri/solution-storymap": "^6.0.4-alpha.0",
35
- "@esri/solution-velocity": "^6.0.4-alpha.0",
36
- "@esri/solution-web-experience": "^6.0.4-alpha.0",
37
- "@esri/solution-web-tool": "^6.0.4-alpha.0",
38
- "@esri/solution-workflow": "^6.0.4-alpha.0",
26
+ "@esri/hub-common": "^17.0.2",
27
+ "@esri/solution-common": "^6.1.0-alpha.0",
28
+ "@esri/solution-feature-layer": "^6.1.0-alpha.0",
29
+ "@esri/solution-file": "^6.1.0-alpha.0",
30
+ "@esri/solution-form": "^6.1.0-alpha.0",
31
+ "@esri/solution-group": "^6.1.0-alpha.0",
32
+ "@esri/solution-hub-types": "^6.1.0-alpha.0",
33
+ "@esri/solution-simple-types": "^6.1.0-alpha.0",
34
+ "@esri/solution-storymap": "^6.1.0-alpha.0",
35
+ "@esri/solution-velocity": "^6.1.0-alpha.0",
36
+ "@esri/solution-web-experience": "^6.1.0-alpha.0",
37
+ "@esri/solution-web-tool": "^6.1.0-alpha.0",
38
+ "@esri/solution-workflow": "^6.1.0-alpha.0",
39
39
  "tslib": "1.14.1"
40
40
  },
41
41
  "scripts": {
@@ -89,5 +89,5 @@
89
89
  "esri",
90
90
  "ES6"
91
91
  ],
92
- "gitHead": "bcb7bdb81c58fc94f1dc497547bb8dbffb85fdbd"
92
+ "gitHead": "19cbc20f4da03baa4676b3fad82abcea533432c3"
93
93
  }
@@ -1,55 +0,0 @@
1
- /** @license
2
- * Copyright 2018 Esri
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import * as common from "@esri/solution-common";
17
- export declare function deploySolutionFromTemplate(templateSolutionId: string, solutionTemplateBase: any, solutionTemplateData: any, authentication: common.UserSession, options: common.IDeploySolutionOptions): Promise<string>;
18
- /**
19
- * Add templates for the items that were automatically created by workflow
20
- *
21
- * @param preProcessResponse response from pre processing of workflow items
22
- * @param solutionTemplateData the current solution template data that will be used to show item details
23
- */
24
- export declare function _handleWorkflowManagedTemplates(preProcessResponse: common.IPreProcessWorkflowTemplatesResponse, solutionTemplateData: any): void;
25
- /**
26
- * Add source-id to items/groups typeKeywords
27
- *
28
- * @param template the array of solution data templates
29
- * @private
30
- */
31
- export declare function _addSourceId(templates: common.IItemTemplate[]): common.IItemTemplate[];
32
- /**
33
- * Update the deployOptions with the group properties
34
- *
35
- * @param deployOptions
36
- * @param sourceInfo
37
- * @param authentication
38
- * @param isGroup Boolean to indicate if the files are associated with a group or item
39
- * @private
40
- */
41
- export declare function _applySourceToDeployOptions(deployOptions: common.IDeploySolutionOptions, solutionTemplateBase: any, templateDictionary: any, authentication: common.UserSession): common.IDeploySolutionOptions;
42
- export declare function _replaceParamVariables(solutionTemplateData: any, templateDictionary: any): void;
43
- export declare function _updateProp(template: common.IItemTemplate, path: string, lookup: string, templateDictionary: any): common.IItemTemplate;
44
- export declare function _checkedReplaceAll(template: string, oldValue: string, newValue: string): string;
45
- export declare function _getPortalBaseUrl(portalResponse: common.IPortal, authentication: common.UserSession): string;
46
- export declare function _updateGroupReferences(itemTemplates: any[], templateDictionary: any): any[];
47
- export declare function _purgeTemplateProperties(itemTemplate: any): any;
48
- /**
49
- * Returns a match of a supplied id with the suffix ".itemId" in the template dictionary.
50
- *
51
- * @param id Id to look for
52
- * @param templateDictionary Hash mapping property names to replacement values
53
- * @returns Match in template dictionary or original id
54
- */
55
- export declare function _getNewItemId(id: string, templateDictionary: any): string;
@@ -1,334 +0,0 @@
1
- "use strict";
2
- /** @license
3
- * Copyright 2018 Esri
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
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;
19
- const tslib_1 = require("tslib");
20
- const common = tslib_1.__importStar(require("@esri/solution-common"));
21
- const deployItems = tslib_1.__importStar(require("./deploySolutionItems"));
22
- const hub_common_1 = require("@esri/hub-common");
23
- const post_process_1 = require("./helpers/post-process");
24
- const sortTemplates_1 = require("./helpers/sortTemplates");
25
- // NOTE: Moved to separate file to allow stubbing in main deploySolution tests
26
- async function deploySolutionFromTemplate(templateSolutionId, solutionTemplateBase, solutionTemplateData, authentication, options) {
27
- options.storageVersion = common.extractSolutionVersion(solutionTemplateData);
28
- // It is possible to provide a separate authentication for the source
29
- const storageAuthentication = options.storageAuthentication
30
- ? options.storageAuthentication
31
- : authentication;
32
- // Replacement dictionary and high-level deployment ids for cleanup
33
- // TODO: Extract all templateDictionary prep into a separate function
34
- const templateDictionary = options.templateDictionary ?? {};
35
- const preProcessResponse = common.preprocessWorkflowTemplates(solutionTemplateData.templates, templateDictionary);
36
- solutionTemplateData.templates = preProcessResponse.deployTemplates;
37
- _applySourceToDeployOptions(options, solutionTemplateBase, templateDictionary, authentication);
38
- if (options.additionalTypeKeywords) {
39
- solutionTemplateBase.typeKeywords = [].concat(solutionTemplateBase.typeKeywords, options.additionalTypeKeywords);
40
- }
41
- // Get the thumbnail file
42
- let thumbFilename = "thumbnail";
43
- let thumbDef = Promise.resolve(null);
44
- if (!options.thumbnail && options.thumbnailurl) {
45
- // Figure out the thumbnail's filename
46
- thumbFilename = common.getFilenameFromUrl(options.thumbnailurl) || thumbFilename;
47
- const thumbnailurl = common.appendQueryParam(options.thumbnailurl, "w=400");
48
- delete options.thumbnailurl;
49
- // Fetch the thumbnail
50
- thumbDef = common.getBlobAsFile(thumbnailurl, thumbFilename, storageAuthentication, [400]);
51
- }
52
- _replaceParamVariables(solutionTemplateData, templateDictionary);
53
- // Get information about deployment environment
54
- const environResponses = await Promise.all([
55
- common.getPortal("", authentication),
56
- common.getPortalUrls(authentication),
57
- common.getUser(authentication),
58
- common.getFoldersAndGroups(authentication),
59
- thumbDef,
60
- ]);
61
- const [portalResponse, portalUrlsResponse, userResponse, foldersAndGroupsResponse, thumbnailFile] = environResponses;
62
- if (!options.thumbnail && thumbnailFile) {
63
- options.thumbnail = thumbnailFile;
64
- }
65
- // update template items with source-itemId type keyword
66
- solutionTemplateData.templates = _addSourceId(solutionTemplateData.templates);
67
- templateDictionary.isPortal = portalResponse.isPortal;
68
- templateDictionary.organization = Object.assign(templateDictionary.organization || {}, portalResponse);
69
- // TODO: Add more computed properties here
70
- // portal: portalResponse
71
- // orgextent as bbox for assignment onto items
72
- // more info in #266 https://github.com/Esri/solution.js/issues/266
73
- templateDictionary.portalUrls = portalUrlsResponse.urls;
74
- templateDictionary.portalBaseUrl = _getPortalBaseUrl(portalResponse, authentication);
75
- templateDictionary.user = userResponse;
76
- templateDictionary.user.folders = foldersAndGroupsResponse.folders;
77
- templateDictionary.user.groups = foldersAndGroupsResponse.groups.filter((group) => group.owner === templateDictionary.user.username);
78
- // Add information needed for workflow manager
79
- const user = await common.getUser(authentication);
80
- templateDictionary.workflowBaseUrl = await common.getWorkflowBaseURL(authentication, portalResponse, user.orgId);
81
- // if we have tracking views and the user is not admin or the org doesn't support tracking an error is thrown
82
- common.setLocationTrackingEnabled(portalResponse, userResponse, templateDictionary, solutionTemplateData.templates);
83
- const trackingOwnerPromise = common.getTackingServiceOwner(templateDictionary, authentication);
84
- // Create a folder to hold the deployed solution. We use the solution name, appending a sequential
85
- // suffix if the folder exists, e.g.,
86
- // * Manage Right of Way Activities
87
- // * Manage Right of Way Activities 1
88
- // * Manage Right of Way Activities 2
89
- const folderPromise = common.createUniqueFolder(solutionTemplateBase.title, templateDictionary, authentication);
90
- // Apply the portal extents to the solution
91
- const portalExtent = portalResponse.defaultExtent;
92
- const extentsPromise = common.convertExtentWithFallback(portalExtent, undefined, { wkid: 4326 }, portalResponse.helperServices.geometry.url, authentication);
93
- // Await completion of async actions: folder creation & extents conversion
94
- const folderExtentsResponses = await Promise.all([folderPromise, extentsPromise, trackingOwnerPromise]);
95
- const [folderResponse, wgs84Extent, trackingOwnerResponse] = folderExtentsResponses;
96
- const deployedFolderId = folderResponse.folder.id;
97
- templateDictionary.folderId = deployedFolderId;
98
- templateDictionary.solutionItemExtent =
99
- wgs84Extent.xmin + "," + wgs84Extent.ymin + "," + wgs84Extent.xmax + "," + wgs84Extent.ymax;
100
- // Hub Solutions depend on organization defaultExtentBBox as a nested array not a string
101
- templateDictionary.organization.defaultExtentBBox = [
102
- [wgs84Extent.xmin, wgs84Extent.ymin],
103
- [wgs84Extent.xmax, wgs84Extent.ymax],
104
- ];
105
- // update templateDictionary to indicate if the user owns the tracking service
106
- // this will affect how we handle group sharing
107
- /* istanbul ignore else */
108
- if (templateDictionary.locationTrackingEnabled) {
109
- common.setCreateProp(templateDictionary, "locationTracking.userIsOwner", trackingOwnerResponse);
110
- }
111
- let deployedSolutionId;
112
- if (!options.dontCreateSolutionItem) {
113
- // Create a deployed Solution item
114
- solutionTemplateBase.categories = []; // we don't want to carry over categories from the template
115
- const createSolutionItemBase = {
116
- ...common.sanitizeJSON(solutionTemplateBase),
117
- type: "Solution",
118
- typeKeywords: ["Solution"],
119
- };
120
- if (options.additionalTypeKeywords) {
121
- createSolutionItemBase.typeKeywords = ["Solution"].concat(options.additionalTypeKeywords);
122
- }
123
- // Create deployed solution item
124
- createSolutionItemBase.thumbnail = options.thumbnail;
125
- const createSolutionResponse = await common.createItemWithData(createSolutionItemBase, {}, authentication, deployedFolderId);
126
- deployedSolutionId = createSolutionResponse.id;
127
- // Protect the solution item
128
- const protectOptions = {
129
- id: deployedSolutionId,
130
- authentication,
131
- };
132
- await common.protectItem(protectOptions);
133
- // TODO: Attach the whole solution model so we can
134
- // have stuff like `{{solution.item.title}}
135
- templateDictionary.solutionItemId = deployedSolutionId;
136
- solutionTemplateBase.id = deployedSolutionId;
137
- solutionTemplateBase.tryitUrl = _checkedReplaceAll(solutionTemplateBase.tryitUrl, templateSolutionId, deployedSolutionId);
138
- solutionTemplateBase.url = _checkedReplaceAll(solutionTemplateBase.url, templateSolutionId, deployedSolutionId);
139
- }
140
- // Handle the contained item templates
141
- const clonedSolutionsResponse = await deployItems.deploySolutionItems(storageAuthentication.portal, templateSolutionId, solutionTemplateData.templates, storageAuthentication, templateDictionary, deployedSolutionId, authentication, options);
142
- solutionTemplateData.templates = solutionTemplateData.templates.map((itemTemplate) => {
143
- // Update ids present in template dictionary
144
- itemTemplate.itemId = common.getProp(templateDictionary, `${itemTemplate.itemId}.itemId`);
145
- // Update the dependencies hash to point to the new item ids
146
- itemTemplate.dependencies = itemTemplate.dependencies.map((id) => (0, hub_common_1.getWithDefault)(templateDictionary, `${id}.itemId`, id));
147
- return itemTemplate;
148
- });
149
- // Sort the templates into build order, which is provided by clonedSolutionsResponse
150
- (0, sortTemplates_1.sortTemplates)(solutionTemplateData.templates, clonedSolutionsResponse.map((response) => response.id));
151
- // Wrap up with post-processing, in which we deal with groups and cycle remnants
152
- await (0, post_process_1.postProcess)(deployedSolutionId, solutionTemplateData.templates, clonedSolutionsResponse, authentication, templateDictionary);
153
- if (!options.dontCreateSolutionItem) {
154
- // Update solution item using internal representation & and the updated data JSON
155
- solutionTemplateBase.typeKeywords = [].concat(solutionTemplateBase.typeKeywords, ["Deployed"]);
156
- const iTemplateKeyword = solutionTemplateBase.typeKeywords.indexOf("Template");
157
- /* istanbul ignore else */
158
- if (iTemplateKeyword >= 0) {
159
- solutionTemplateBase.typeKeywords.splice(iTemplateKeyword, 1);
160
- }
161
- solutionTemplateData.templates = solutionTemplateData.templates.map((itemTemplate) => _purgeTemplateProperties(itemTemplate));
162
- _handleWorkflowManagedTemplates(preProcessResponse, solutionTemplateData);
163
- solutionTemplateData.templates = _updateGroupReferences(solutionTemplateData.templates, templateDictionary);
164
- solutionTemplateData.templates = common.updateWorkflowTemplateIds(solutionTemplateData.templates, templateDictionary);
165
- // Update solution items data using template dictionary, and then update the
166
- // itemId & dependencies in each item template
167
- solutionTemplateBase.data = common.replaceInTemplate(solutionTemplateData, templateDictionary);
168
- // Write any user defined params to the solution
169
- /* istanbul ignore else */
170
- if (templateDictionary.params) {
171
- solutionTemplateBase.data.params = templateDictionary.params;
172
- }
173
- await common.updateItem(solutionTemplateBase, authentication, deployedFolderId);
174
- }
175
- return solutionTemplateBase.id;
176
- }
177
- exports.deploySolutionFromTemplate = deploySolutionFromTemplate;
178
- /**
179
- * Add templates for the items that were automatically created by workflow
180
- *
181
- * @param preProcessResponse response from pre processing of workflow items
182
- * @param solutionTemplateData the current solution template data that will be used to show item details
183
- */
184
- function _handleWorkflowManagedTemplates(preProcessResponse, solutionTemplateData) {
185
- preProcessResponse.workflowManagedTemplates.forEach((itemTemplate) => {
186
- solutionTemplateData.templates.push(_purgeTemplateProperties(itemTemplate));
187
- });
188
- }
189
- exports._handleWorkflowManagedTemplates = _handleWorkflowManagedTemplates;
190
- /**
191
- * Add source-id to items/groups typeKeywords
192
- *
193
- * @param template the array of solution data templates
194
- * @private
195
- */
196
- function _addSourceId(templates) {
197
- return templates.map((template) => {
198
- /* istanbul ignore else */
199
- if (template.item) {
200
- const typeKeywords = template.item.typeKeywords || [];
201
- typeKeywords.push("source-" + template.itemId);
202
- template.item.typeKeywords = typeKeywords;
203
- }
204
- return template;
205
- });
206
- }
207
- exports._addSourceId = _addSourceId;
208
- /**
209
- * Update the deployOptions with the group properties
210
- *
211
- * @param deployOptions
212
- * @param sourceInfo
213
- * @param authentication
214
- * @param isGroup Boolean to indicate if the files are associated with a group or item
215
- * @private
216
- */
217
- function _applySourceToDeployOptions(deployOptions, solutionTemplateBase, templateDictionary, authentication) {
218
- // Deploy a solution from the template's contents,
219
- // using the template's information as defaults for the deployed solution item
220
- ["title", "snippet", "description", "tags"].forEach((prop) => {
221
- deployOptions[prop] = deployOptions[prop] ?? solutionTemplateBase[prop];
222
- if (deployOptions[prop]) {
223
- solutionTemplateBase[prop] = deployOptions[prop];
224
- // carry these options forward on the templateDict
225
- templateDictionary[prop] = deployOptions[prop];
226
- }
227
- });
228
- if (!deployOptions.thumbnailurl && solutionTemplateBase.thumbnail) {
229
- // Get the full path to the thumbnail
230
- deployOptions.thumbnailurl = common.generateSourceThumbnailUrl(authentication.portal, solutionTemplateBase.id, solutionTemplateBase.thumbnail);
231
- delete solutionTemplateBase.thumbnail;
232
- }
233
- return deployOptions;
234
- }
235
- exports._applySourceToDeployOptions = _applySourceToDeployOptions;
236
- //TODO: function doc
237
- function _replaceParamVariables(solutionTemplateData, templateDictionary) {
238
- // a custom params object can be passed in with the options to deploy a solution
239
- // in most cases we can defer to the item type handlers to use these values
240
- // for variable replacement
241
- // for spatial reference specifically we need to replace up front so the default extent
242
- // logic can execute as expected
243
- solutionTemplateData.templates = solutionTemplateData.templates.map((template) => {
244
- // can't do this as it causes other values that don't exist in the dict yet to revert to defaults they may have defined
245
- // return common.replaceInTemplate(template, templateDictionary);
246
- /* istanbul ignore else */
247
- if (template.type === "Feature Service") {
248
- const paramsLookup = "params.";
249
- const wkidItemPath = "item.spatialReference.wkid";
250
- template = _updateProp(template, wkidItemPath, paramsLookup, templateDictionary);
251
- const wkidServicePath = "properties.service.spatialReference.wkid";
252
- template = _updateProp(template, wkidServicePath, paramsLookup, templateDictionary);
253
- }
254
- return template;
255
- });
256
- }
257
- exports._replaceParamVariables = _replaceParamVariables;
258
- //TODO: function doc
259
- function _updateProp(template, path, lookup, templateDictionary) {
260
- const wkid = common.getProp(template, path);
261
- /* istanbul ignore else */
262
- if (wkid && typeof wkid === "string" && wkid.indexOf(lookup) > -1) {
263
- common.setProp(template, path, common.replaceInTemplate(wkid, templateDictionary));
264
- }
265
- return template;
266
- }
267
- exports._updateProp = _updateProp;
268
- //TODO: function doc
269
- function _checkedReplaceAll(template, oldValue, newValue) {
270
- let newTemplate;
271
- if (template && template.indexOf(oldValue) > -1) {
272
- const re = new RegExp(oldValue, "g");
273
- newTemplate = template.replace(re, newValue);
274
- }
275
- else {
276
- newTemplate = template;
277
- }
278
- return newTemplate;
279
- }
280
- exports._checkedReplaceAll = _checkedReplaceAll;
281
- //TODO: function doc
282
- function _getPortalBaseUrl(portalResponse, authentication) {
283
- // As of Spring 2020, only HTTPS (see
284
- // https://www.esri.com/arcgis-blog/products/product/administration/2019-arcgis-transport-security-improvements/)
285
- const scheme = "https"; // portalResponse.allSSL ? "https" : "http";
286
- const urlKey = common.getProp(portalResponse, "urlKey");
287
- const customBaseUrl = common.getProp(portalResponse, "customBaseUrl");
288
- const enterpriseBaseUrl = common.getProp(portalResponse, "portalHostname");
289
- return urlKey && customBaseUrl
290
- ? `${scheme}://${urlKey}.${customBaseUrl}`
291
- : enterpriseBaseUrl
292
- ? `${scheme}://${enterpriseBaseUrl}`
293
- : authentication.portal.replace("/sharing/rest", "");
294
- }
295
- exports._getPortalBaseUrl = _getPortalBaseUrl;
296
- //TODO: function doc
297
- function _updateGroupReferences(itemTemplates, templateDictionary) {
298
- const groupIds = itemTemplates.reduce((result, t) => {
299
- if (t.type === "Group") {
300
- result.push(t.itemId);
301
- }
302
- return result;
303
- }, []);
304
- Object.keys(templateDictionary).forEach((k) => {
305
- const newId = templateDictionary[k].itemId;
306
- if (groupIds.indexOf(newId) > -1) {
307
- itemTemplates.forEach((t) => {
308
- t.groups = t.groups.map((id) => (id === k ? newId : id));
309
- });
310
- }
311
- });
312
- return itemTemplates;
313
- }
314
- exports._updateGroupReferences = _updateGroupReferences;
315
- //TODO: function doc
316
- function _purgeTemplateProperties(itemTemplate) {
317
- const retainProps = ["itemId", "type", "dependencies", "groups"];
318
- const deleteProps = Object.keys(itemTemplate).filter((k) => retainProps.indexOf(k) < 0);
319
- common.deleteProps(itemTemplate, deleteProps);
320
- return itemTemplate;
321
- }
322
- exports._purgeTemplateProperties = _purgeTemplateProperties;
323
- /**
324
- * Returns a match of a supplied id with the suffix ".itemId" in the template dictionary.
325
- *
326
- * @param id Id to look for
327
- * @param templateDictionary Hash mapping property names to replacement values
328
- * @returns Match in template dictionary or original id
329
- */
330
- function _getNewItemId(id, templateDictionary) {
331
- return common.getProp(templateDictionary, id + ".itemId") ?? id;
332
- }
333
- exports._getNewItemId = _getNewItemId;
334
- //# sourceMappingURL=deploySolutionFromTemplate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deploySolutionFromTemplate.js","sourceRoot":"","sources":["../../src/deploySolutionFromTemplate.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;AAEH,sEAAgD;AAChD,2EAAqD;AACrD,iDAAkD;AAClD,yDAAqD;AACrD,2DAAwD;AAExD,8EAA8E;AAEvE,KAAK,UAAU,0BAA0B,CAC9C,kBAA0B,EAC1B,oBAAyB,EACzB,oBAAyB,EACzB,cAAkC,EAClC,OAAsC;IAEtC,OAAO,CAAC,cAAc,GAAG,MAAM,CAAC,sBAAsB,CAAC,oBAAoB,CAAC,CAAC;IAE7E,qEAAqE;IACrE,MAAM,qBAAqB,GAAuB,OAAO,CAAC,qBAAqB;QAC7E,CAAC,CAAC,OAAO,CAAC,qBAAqB;QAC/B,CAAC,CAAC,cAAc,CAAC;IAEnB,mEAAmE;IAEnE,qEAAqE;IACrE,MAAM,k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