@esri/solution-creator 1.3.10 → 1.3.13
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/esm/createItemTemplate.d.ts +15 -9
- package/dist/esm/createItemTemplate.js +15 -9
- package/dist/esm/createItemTemplate.js.map +1 -1
- package/dist/esm/creator.d.ts +12 -12
- package/dist/esm/creator.js +12 -12
- package/dist/esm/helpers/add-content-to-solution.d.ts +9 -9
- package/dist/esm/helpers/add-content-to-solution.js +9 -9
- package/dist/node/createItemTemplate.d.ts +15 -9
- package/dist/node/createItemTemplate.js +15 -9
- package/dist/node/createItemTemplate.js.map +1 -1
- package/dist/node/creator.d.ts +12 -12
- package/dist/node/creator.js +12 -12
- package/dist/node/helpers/add-content-to-solution.d.ts +9 -9
- package/dist/node/helpers/add-content-to-solution.js +9 -9
- package/dist/umd/createItemTemplate.d.ts +15 -9
- package/dist/umd/creator.d.ts +12 -12
- package/dist/umd/creator.umd.js +38 -32
- package/dist/umd/creator.umd.js.map +1 -1
- package/dist/umd/creator.umd.min.js +2 -2
- package/dist/umd/creator.umd.min.js.map +1 -1
- package/dist/umd/helpers/add-content-to-solution.d.ts +9 -9
- package/package.json +24 -23
|
@@ -34,8 +34,8 @@ const module_map_1 = require("./module-map");
|
|
|
34
34
|
* @param srcAuthentication Credentials for requests to source items
|
|
35
35
|
* @param destAuthentication Authentication for requesting information from AGO about items to be included in solution item
|
|
36
36
|
* @param existingTemplates A collection of AGO item templates that can be referenced by newly-created templates
|
|
37
|
-
* @
|
|
38
|
-
* @
|
|
37
|
+
* @returns A promise which resolves with an array of resources for the item and its dependencies
|
|
38
|
+
* @private
|
|
39
39
|
*/
|
|
40
40
|
function createItemTemplate(solutionItemId, itemId, templateDictionary, srcAuthentication, destAuthentication, existingTemplates, itemProgressCallback) {
|
|
41
41
|
return new Promise(resolve => {
|
|
@@ -177,7 +177,7 @@ exports.createItemTemplate = createItemTemplate;
|
|
|
177
177
|
* Currently only handles web applications
|
|
178
178
|
*
|
|
179
179
|
* @param templates List of solution templates
|
|
180
|
-
* @
|
|
180
|
+
* @returns A list of templates that have templatized field references
|
|
181
181
|
*/
|
|
182
182
|
function postProcessFieldReferences(templates) {
|
|
183
183
|
const datasourceInfos = _getDatasourceInfos(templates);
|
|
@@ -212,7 +212,8 @@ exports.postProcessFieldReferences = postProcessFieldReferences;
|
|
|
212
212
|
* Get common properties that will support the templatization of field references
|
|
213
213
|
*
|
|
214
214
|
* @param templates List of solution templates
|
|
215
|
-
* @
|
|
215
|
+
* @returns A list of IDataSourceInfo objects with key properties
|
|
216
|
+
* @private
|
|
216
217
|
*/
|
|
217
218
|
function _getDatasourceInfos(templates) {
|
|
218
219
|
const datasourceInfos = [];
|
|
@@ -246,7 +247,8 @@ exports._getDatasourceInfos = _getDatasourceInfos;
|
|
|
246
247
|
* and associated web map layer ids based on itemId
|
|
247
248
|
*
|
|
248
249
|
* @param templates List of solution templates
|
|
249
|
-
* @
|
|
250
|
+
* @returns The lookup object with type, dependencies, and webmap layer info
|
|
251
|
+
* @private
|
|
250
252
|
*/
|
|
251
253
|
function _getTemplateTypeHash(templates) {
|
|
252
254
|
const templateTypeHash = {};
|
|
@@ -267,7 +269,8 @@ exports._getTemplateTypeHash = _getTemplateTypeHash;
|
|
|
267
269
|
* so we can know the id used within a map for a given feature service
|
|
268
270
|
*
|
|
269
271
|
* @param template A webmap solution template
|
|
270
|
-
* @
|
|
272
|
+
* @returns The lookup object with webmap layer info added
|
|
273
|
+
* @private
|
|
271
274
|
*/
|
|
272
275
|
function _updateWebMapHashInfo(template, hashItem) {
|
|
273
276
|
const operationalLayers = (0, hub_common_1.getProp)(template, "data.operationalLayers") || [];
|
|
@@ -299,7 +302,8 @@ exports._updateWebMapHashInfo = _updateWebMapHashInfo;
|
|
|
299
302
|
*
|
|
300
303
|
* @param dataSourceUrl Templatized datasource URL
|
|
301
304
|
* @param layerId Layer id
|
|
302
|
-
* @
|
|
305
|
+
* @returns string Amended datasource URL
|
|
306
|
+
* @private
|
|
303
307
|
*/
|
|
304
308
|
function _addLayerIdToDatasourceUrl(datasourceUrl, layerId) {
|
|
305
309
|
return datasourceUrl && !isNaN(layerId)
|
|
@@ -313,7 +317,8 @@ exports._addLayerIdToDatasourceUrl = _addLayerIdToDatasourceUrl;
|
|
|
313
317
|
*
|
|
314
318
|
* @param datasourceInfos A webmap solution template
|
|
315
319
|
* @param templateTypeHash A simple lookup object populated with key item info
|
|
316
|
-
* @
|
|
320
|
+
* @returns The updated datasource infos
|
|
321
|
+
* @private
|
|
317
322
|
*/
|
|
318
323
|
function _addMapLayerIds(datasourceInfos, templateTypeHash) {
|
|
319
324
|
const webMapIds = Object.keys(templateTypeHash).filter(k => {
|
|
@@ -343,7 +348,8 @@ exports._addMapLayerIds = _addMapLayerIds;
|
|
|
343
348
|
*
|
|
344
349
|
* @param template A webmap solution template
|
|
345
350
|
* @param templateTypeHash A simple lookup object populated with key item info
|
|
346
|
-
* @
|
|
351
|
+
* @returns A lsit of feature service item IDs
|
|
352
|
+
* @private
|
|
347
353
|
*/
|
|
348
354
|
function _getWebMapFSDependencies(template, templateTypeHash) {
|
|
349
355
|
const webMapFSDependencies = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createItemTemplate.js","sourceRoot":"","sources":["../../src/createItemTemplate.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH;;;;GAIG;AAEH,2DAqB+B;AAC/B,iDAA2C;AAC3C,6CAAsD;AAEtD,wHAAwH;AAExH;;;;;;;;;;;GAWG;AACH,SAAgB,kBAAkB,CAChC,cAAsB,EACtB,MAAc,EACd,kBAAuB,EACvB,iBAA8B,EAC9B,kBAA+B,EAC/B,iBAAkC,EAClC,oBAA2C;IAE3C,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;QAC3B,qEAAqE;QACrE,IAAI,IAAA,oCAAkB,EAAC,iBAAiB,EAAE,MAAM,CAAC,EAAE;Y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G;oBACvB,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC,GAAG,CAAC,EAClC;oBACA,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;iBAC7B;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QACH,OAAO,EAAE,CAAC;IACZ,CAAC,CAAC,CAAC;AACL,CAAC;AA1BD,0CA0BC;AAED;;;;;;;;GAQG;AACH,SAAgB,wBAAwB,CACtC,QAAuB,EACvB,gBAAqB;IAErB,MAAM,oBAAoB,GAAa,EAAE,CAAC;IAC1C,QAAQ,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;QAClC,MAAM,MAAM,GAAQ,gBAAgB,CAAC,GAAG,CAAC,CAAC;QAC1C,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS,EAAE;YAC7B,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,gBAAwB,EAAE,EAAE;gBACvD,0BAA0B;gBAC1B,IAAI,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,IAAI,KAAK,iBAAiB,EAAE;oBACjE,oBAAoB,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;iBAC7C;YACH,CAAC,CAAC,CAAC;SACJ;IACH,CAAC,CAAC,CAAC;IACH,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AAjBD,4DAiBC"}
|
package/dist/node/creator.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ import { IModel } from "@esri/hub-common";
|
|
|
27
27
|
* @param srcAuthentication Credentials for requests to source items
|
|
28
28
|
* @param destAuthentication Credentials for the requests to destination solution
|
|
29
29
|
* @param options Customizations for creating the solution
|
|
30
|
-
* @
|
|
30
|
+
* @returns A promise that resolves with the AGO id of the new solution
|
|
31
31
|
*/
|
|
32
32
|
export declare function createSolution(sourceId: string, srcAuthentication: UserSession, destAuthentication: UserSession, options?: ICreateSolutionOptions): Promise<string>;
|
|
33
33
|
/**
|
|
@@ -37,7 +37,7 @@ export declare function createSolution(sourceId: string, srcAuthentication: User
|
|
|
37
37
|
* @param sourceInfo
|
|
38
38
|
* @param authentication
|
|
39
39
|
* @param isGroup Boolean to indicate if the files are associated with a group or item
|
|
40
|
-
* @
|
|
40
|
+
* @private
|
|
41
41
|
*/
|
|
42
42
|
export declare function _applySourceToCreateOptions(createOptions: ICreateSolutionOptions, sourceInfo: IGroup | IItem, srcAuthentication: UserSession, isGroup?: boolean): ICreateSolutionOptions;
|
|
43
43
|
/**
|
|
@@ -45,7 +45,7 @@ export declare function _applySourceToCreateOptions(createOptions: ICreateSoluti
|
|
|
45
45
|
*
|
|
46
46
|
* @param createOptions
|
|
47
47
|
* @param srcAuthentication
|
|
48
|
-
* @
|
|
48
|
+
* @private
|
|
49
49
|
*/
|
|
50
50
|
export declare function _addThumbnailFileToCreateOptions(createOptions: ICreateSolutionOptions, srcAuthentication: UserSession): Promise<ICreateSolutionOptions>;
|
|
51
51
|
/**
|
|
@@ -54,9 +54,9 @@ export declare function _addThumbnailFileToCreateOptions(createOptions: ICreateS
|
|
|
54
54
|
* @param options Customizations for creating the solution
|
|
55
55
|
* @param srcAuthentication Credentials for requests to source items
|
|
56
56
|
* @param destAuthentication Credentials for the requests to destination solution
|
|
57
|
-
* @
|
|
57
|
+
* @returns A promise that resolves with the AGO id of the new solution; solution item is deleted if its
|
|
58
58
|
* there is a problem updating it
|
|
59
|
-
* @
|
|
59
|
+
* @private
|
|
60
60
|
*/
|
|
61
61
|
export declare function _createSolutionFromItemIds(options: ICreateSolutionOptions, srcAuthentication: UserSession, destAuthentication: UserSession): Promise<string>;
|
|
62
62
|
/**
|
|
@@ -64,9 +64,9 @@ export declare function _createSolutionFromItemIds(options: ICreateSolutionOptio
|
|
|
64
64
|
*
|
|
65
65
|
* @param authentication Credentials for the request
|
|
66
66
|
* @param options Customizations for creating the solution
|
|
67
|
-
* @
|
|
67
|
+
* @returns A promise that resolves with the AGO id of the new solution; solution item is deleted if its
|
|
68
68
|
* there is a problem updating its thumbnail
|
|
69
|
-
* @
|
|
69
|
+
* @private
|
|
70
70
|
*/
|
|
71
71
|
export declare function _createSolutionItem(authentication: UserSession, options?: ICreateSolutionOptions): Promise<string>;
|
|
72
72
|
/**
|
|
@@ -74,16 +74,16 @@ export declare function _createSolutionItem(authentication: UserSession, options
|
|
|
74
74
|
* the Solution Item itself
|
|
75
75
|
*
|
|
76
76
|
* @param options
|
|
77
|
-
* @
|
|
77
|
+
* @private
|
|
78
78
|
*/
|
|
79
79
|
export declare function _createSolutionItemModel(options: any): IModel;
|
|
80
80
|
/**
|
|
81
81
|
* Gets the deploy.id and deploy.version tag values.
|
|
82
82
|
*
|
|
83
83
|
* @param tags A list of item tags
|
|
84
|
-
* @
|
|
84
|
+
* @returns A list containing the two values found in the tags, or defaulting to a new GUID and "1.0", respectively,
|
|
85
85
|
* as needed
|
|
86
|
-
* @
|
|
86
|
+
* @private
|
|
87
87
|
*/
|
|
88
88
|
export declare function _getDeploymentProperties(tags: string[]): string[];
|
|
89
89
|
/**
|
|
@@ -91,7 +91,7 @@ export declare function _getDeploymentProperties(tags: string[]): string[];
|
|
|
91
91
|
*
|
|
92
92
|
* @param desiredTagPrefix Tag prefix to look for
|
|
93
93
|
* @param tags A list of item tags
|
|
94
|
-
* @
|
|
95
|
-
* @
|
|
94
|
+
* @returns The extracted value of the first matching tag or null if a tag with the specified prefix is not found
|
|
95
|
+
* @private
|
|
96
96
|
*/
|
|
97
97
|
export declare function _getDeploymentProperty(desiredTagPrefix: string, tags: string[]): string | null;
|
package/dist/node/creator.js
CHANGED
|
@@ -33,7 +33,7 @@ const noOp = () => { };
|
|
|
33
33
|
* @param srcAuthentication Credentials for requests to source items
|
|
34
34
|
* @param destAuthentication Credentials for the requests to destination solution
|
|
35
35
|
* @param options Customizations for creating the solution
|
|
36
|
-
* @
|
|
36
|
+
* @returns A promise that resolves with the AGO id of the new solution
|
|
37
37
|
*/
|
|
38
38
|
function createSolution(sourceId, srcAuthentication, destAuthentication, options) {
|
|
39
39
|
const createOptions = options || {};
|
|
@@ -109,7 +109,7 @@ exports.createSolution = createSolution;
|
|
|
109
109
|
* @param sourceInfo
|
|
110
110
|
* @param authentication
|
|
111
111
|
* @param isGroup Boolean to indicate if the files are associated with a group or item
|
|
112
|
-
* @
|
|
112
|
+
* @private
|
|
113
113
|
*/
|
|
114
114
|
function _applySourceToCreateOptions(createOptions, sourceInfo, srcAuthentication, isGroup = false) {
|
|
115
115
|
// Create a solution from the group's or item's contents,
|
|
@@ -130,7 +130,7 @@ exports._applySourceToCreateOptions = _applySourceToCreateOptions;
|
|
|
130
130
|
*
|
|
131
131
|
* @param createOptions
|
|
132
132
|
* @param srcAuthentication
|
|
133
|
-
* @
|
|
133
|
+
* @private
|
|
134
134
|
*/
|
|
135
135
|
function _addThumbnailFileToCreateOptions(createOptions, srcAuthentication) {
|
|
136
136
|
return new Promise(resolve => {
|
|
@@ -159,9 +159,9 @@ exports._addThumbnailFileToCreateOptions = _addThumbnailFileToCreateOptions;
|
|
|
159
159
|
* @param options Customizations for creating the solution
|
|
160
160
|
* @param srcAuthentication Credentials for requests to source items
|
|
161
161
|
* @param destAuthentication Credentials for the requests to destination solution
|
|
162
|
-
* @
|
|
162
|
+
* @returns A promise that resolves with the AGO id of the new solution; solution item is deleted if its
|
|
163
163
|
* there is a problem updating it
|
|
164
|
-
* @
|
|
164
|
+
* @private
|
|
165
165
|
*/
|
|
166
166
|
function _createSolutionFromItemIds(options, srcAuthentication, destAuthentication) {
|
|
167
167
|
let solutionId = "";
|
|
@@ -191,9 +191,9 @@ exports._createSolutionFromItemIds = _createSolutionFromItemIds;
|
|
|
191
191
|
*
|
|
192
192
|
* @param authentication Credentials for the request
|
|
193
193
|
* @param options Customizations for creating the solution
|
|
194
|
-
* @
|
|
194
|
+
* @returns A promise that resolves with the AGO id of the new solution; solution item is deleted if its
|
|
195
195
|
* there is a problem updating its thumbnail
|
|
196
|
-
* @
|
|
196
|
+
* @private
|
|
197
197
|
*/
|
|
198
198
|
function _createSolutionItem(authentication, options) {
|
|
199
199
|
const model = _createSolutionItemModel(options);
|
|
@@ -210,7 +210,7 @@ exports._createSolutionItem = _createSolutionItem;
|
|
|
210
210
|
* the Solution Item itself
|
|
211
211
|
*
|
|
212
212
|
* @param options
|
|
213
|
-
* @
|
|
213
|
+
* @private
|
|
214
214
|
*/
|
|
215
215
|
function _createSolutionItemModel(options) {
|
|
216
216
|
// Solution uses all supplied tags but for deploy.* tags; that information goes into properties
|
|
@@ -245,9 +245,9 @@ exports._createSolutionItemModel = _createSolutionItemModel;
|
|
|
245
245
|
* Gets the deploy.id and deploy.version tag values.
|
|
246
246
|
*
|
|
247
247
|
* @param tags A list of item tags
|
|
248
|
-
* @
|
|
248
|
+
* @returns A list containing the two values found in the tags, or defaulting to a new GUID and "1.0", respectively,
|
|
249
249
|
* as needed
|
|
250
|
-
* @
|
|
250
|
+
* @private
|
|
251
251
|
*/
|
|
252
252
|
function _getDeploymentProperties(tags) {
|
|
253
253
|
return [
|
|
@@ -263,8 +263,8 @@ exports._getDeploymentProperties = _getDeploymentProperties;
|
|
|
263
263
|
*
|
|
264
264
|
* @param desiredTagPrefix Tag prefix to look for
|
|
265
265
|
* @param tags A list of item tags
|
|
266
|
-
* @
|
|
267
|
-
* @
|
|
266
|
+
* @returns The extracted value of the first matching tag or null if a tag with the specified prefix is not found
|
|
267
|
+
* @private
|
|
268
268
|
*/
|
|
269
269
|
function _getDeploymentProperty(desiredTagPrefix, tags) {
|
|
270
270
|
const foundTagAsList = tags.filter(tag => tag.startsWith(desiredTagPrefix));
|
|
@@ -21,7 +21,7 @@ import { ICreateSolutionOptions, IItemTemplate, UserSession } from "@esri/soluti
|
|
|
21
21
|
* @param options Customizations for creating the solution
|
|
22
22
|
* @param srcAuthentication Credentials for requests to source items
|
|
23
23
|
* @param destAuthentication Credentials for the requests to destination solution
|
|
24
|
-
* @
|
|
24
|
+
* @returns A promise that resolves with the AGO id of the updated solution
|
|
25
25
|
* @internal
|
|
26
26
|
*/
|
|
27
27
|
export declare function addContentToSolution(solutionItemId: string, options: ICreateSolutionOptions, srcAuthentication: UserSession, destAuthentication: UserSession): Promise<string>;
|
|
@@ -29,7 +29,7 @@ export declare function addContentToSolution(solutionItemId: string, options: IC
|
|
|
29
29
|
* Gets the dependencies of an item by merging its dependencies list with item references in template variables.
|
|
30
30
|
*
|
|
31
31
|
* @param template Template to examine
|
|
32
|
-
* @
|
|
32
|
+
* @returns List of dependency ids
|
|
33
33
|
* @private
|
|
34
34
|
*/
|
|
35
35
|
export declare function _getDependencies(template: IItemTemplate): string[];
|
|
@@ -37,7 +37,7 @@ export declare function _getDependencies(template: IItemTemplate): string[];
|
|
|
37
37
|
* Extracts AGO ids out of template variables.
|
|
38
38
|
*
|
|
39
39
|
* @param variables List of template variables to examine
|
|
40
|
-
* @
|
|
40
|
+
* @returns List of AGO ids referenced in `variables`
|
|
41
41
|
* @private
|
|
42
42
|
*/
|
|
43
43
|
export declare function _getIdsOutOfTemplateVariables(variables: string[]): string[];
|
|
@@ -45,7 +45,7 @@ export declare function _getIdsOutOfTemplateVariables(variables: string[]): stri
|
|
|
45
45
|
* Creates a list of item URLs.
|
|
46
46
|
*
|
|
47
47
|
* @param templates Templates to check for URLs
|
|
48
|
-
* @
|
|
48
|
+
* @returns List of URLs
|
|
49
49
|
* @private
|
|
50
50
|
*/
|
|
51
51
|
export declare function _getSolutionItemUrls(templates: IItemTemplate[]): string[][];
|
|
@@ -53,7 +53,7 @@ export declare function _getSolutionItemUrls(templates: IItemTemplate[]): string
|
|
|
53
53
|
* Extracts template variables out of a string.
|
|
54
54
|
*
|
|
55
55
|
* @param text String to examine
|
|
56
|
-
* @
|
|
56
|
+
* @returns List of template variables found in string
|
|
57
57
|
* @private
|
|
58
58
|
*/
|
|
59
59
|
export declare function _getTemplateVariables(text: string): string[];
|
|
@@ -61,7 +61,7 @@ export declare function _getTemplateVariables(text: string): string[];
|
|
|
61
61
|
* Update the items dependencies and groups arrays
|
|
62
62
|
*
|
|
63
63
|
* @param templates The array of templates to evaluate
|
|
64
|
-
* @
|
|
64
|
+
* @returns Updated version of the templates
|
|
65
65
|
* @private
|
|
66
66
|
*/
|
|
67
67
|
export declare function _postProcessGroupDependencies(templates: IItemTemplate[]): IItemTemplate[];
|
|
@@ -71,7 +71,7 @@ export declare function _postProcessGroupDependencies(templates: IItemTemplate[]
|
|
|
71
71
|
* Clean up any references to items with invalid designations in the other templates.
|
|
72
72
|
*
|
|
73
73
|
* @param templates The array of templates to evaluate
|
|
74
|
-
* @
|
|
74
|
+
* @returns Updated version of the templates
|
|
75
75
|
* @private
|
|
76
76
|
*/
|
|
77
77
|
export declare function _postProcessIgnoredItems(templates: IItemTemplate[]): IItemTemplate[];
|
|
@@ -96,7 +96,7 @@ export declare function _replaceRemainingIdsInObject(ids: string[], obj: any): a
|
|
|
96
96
|
*
|
|
97
97
|
* @param ids Ids to be replaced in source string
|
|
98
98
|
* @param str Source string to be examined
|
|
99
|
-
* @
|
|
99
|
+
* @returns A copy of the source string with any templatization changes
|
|
100
100
|
* @private
|
|
101
101
|
*/
|
|
102
102
|
export declare function _replaceRemainingIdsInString(ids: string[], str: string): string;
|
|
@@ -112,7 +112,7 @@ export declare function _simplifyUrlsInItemDescriptions(templates: IItemTemplate
|
|
|
112
112
|
*
|
|
113
113
|
* @param templates The array of templates to evaluate; templates is modified in place
|
|
114
114
|
* @param destAuthentication Credentials for request organization info
|
|
115
|
-
* @
|
|
115
|
+
* @returns Promise resolving with `templates`
|
|
116
116
|
* @private
|
|
117
117
|
*/
|
|
118
118
|
export declare function _templatizeOrgUrl(templates: IItemTemplate[], destAuthentication: UserSession): Promise<IItemTemplate[]>;
|
|
@@ -26,7 +26,7 @@ const createItemTemplate_1 = require("../createItemTemplate");
|
|
|
26
26
|
* @param options Customizations for creating the solution
|
|
27
27
|
* @param srcAuthentication Credentials for requests to source items
|
|
28
28
|
* @param destAuthentication Credentials for the requests to destination solution
|
|
29
|
-
* @
|
|
29
|
+
* @returns A promise that resolves with the AGO id of the updated solution
|
|
30
30
|
* @internal
|
|
31
31
|
*/
|
|
32
32
|
function addContentToSolution(solutionItemId, options, srcAuthentication, destAuthentication) {
|
|
@@ -158,7 +158,7 @@ exports.addContentToSolution = addContentToSolution;
|
|
|
158
158
|
* Gets the dependencies of an item by merging its dependencies list with item references in template variables.
|
|
159
159
|
*
|
|
160
160
|
* @param template Template to examine
|
|
161
|
-
* @
|
|
161
|
+
* @returns List of dependency ids
|
|
162
162
|
* @private
|
|
163
163
|
*/
|
|
164
164
|
function _getDependencies(template) {
|
|
@@ -184,7 +184,7 @@ exports._getDependencies = _getDependencies;
|
|
|
184
184
|
* Extracts AGO ids out of template variables.
|
|
185
185
|
*
|
|
186
186
|
* @param variables List of template variables to examine
|
|
187
|
-
* @
|
|
187
|
+
* @returns List of AGO ids referenced in `variables`
|
|
188
188
|
* @private
|
|
189
189
|
*/
|
|
190
190
|
function _getIdsOutOfTemplateVariables(variables) {
|
|
@@ -205,7 +205,7 @@ exports._getIdsOutOfTemplateVariables = _getIdsOutOfTemplateVariables;
|
|
|
205
205
|
* Creates a list of item URLs.
|
|
206
206
|
*
|
|
207
207
|
* @param templates Templates to check for URLs
|
|
208
|
-
* @
|
|
208
|
+
* @returns List of URLs
|
|
209
209
|
* @private
|
|
210
210
|
*/
|
|
211
211
|
function _getSolutionItemUrls(templates) {
|
|
@@ -223,7 +223,7 @@ exports._getSolutionItemUrls = _getSolutionItemUrls;
|
|
|
223
223
|
* Extracts template variables out of a string.
|
|
224
224
|
*
|
|
225
225
|
* @param text String to examine
|
|
226
|
-
* @
|
|
226
|
+
* @returns List of template variables found in string
|
|
227
227
|
* @private
|
|
228
228
|
*/
|
|
229
229
|
function _getTemplateVariables(text) {
|
|
@@ -235,7 +235,7 @@ exports._getTemplateVariables = _getTemplateVariables;
|
|
|
235
235
|
* Update the items dependencies and groups arrays
|
|
236
236
|
*
|
|
237
237
|
* @param templates The array of templates to evaluate
|
|
238
|
-
* @
|
|
238
|
+
* @returns Updated version of the templates
|
|
239
239
|
* @private
|
|
240
240
|
*/
|
|
241
241
|
function _postProcessGroupDependencies(templates) {
|
|
@@ -279,7 +279,7 @@ exports._postProcessGroupDependencies = _postProcessGroupDependencies;
|
|
|
279
279
|
* Clean up any references to items with invalid designations in the other templates.
|
|
280
280
|
*
|
|
281
281
|
* @param templates The array of templates to evaluate
|
|
282
|
-
* @
|
|
282
|
+
* @returns Updated version of the templates
|
|
283
283
|
* @private
|
|
284
284
|
*/
|
|
285
285
|
function _postProcessIgnoredItems(templates) {
|
|
@@ -354,7 +354,7 @@ exports._replaceRemainingIdsInObject = _replaceRemainingIdsInObject;
|
|
|
354
354
|
*
|
|
355
355
|
* @param ids Ids to be replaced in source string
|
|
356
356
|
* @param str Source string to be examined
|
|
357
|
-
* @
|
|
357
|
+
* @returns A copy of the source string with any templatization changes
|
|
358
358
|
* @private
|
|
359
359
|
*/
|
|
360
360
|
function _replaceRemainingIdsInString(ids, str) {
|
|
@@ -408,7 +408,7 @@ exports._simplifyUrlsInItemDescriptions = _simplifyUrlsInItemDescriptions;
|
|
|
408
408
|
*
|
|
409
409
|
* @param templates The array of templates to evaluate; templates is modified in place
|
|
410
410
|
* @param destAuthentication Credentials for request organization info
|
|
411
|
-
* @
|
|
411
|
+
* @returns Promise resolving with `templates`
|
|
412
412
|
* @private
|
|
413
413
|
*/
|
|
414
414
|
function _templatizeOrgUrl(templates, destAuthentication) {
|
|
@@ -28,8 +28,8 @@ import { IDatasourceInfo, IItemProgressCallback, IItemTemplate, ISourceFile, Use
|
|
|
28
28
|
* @param srcAuthentication Credentials for requests to source items
|
|
29
29
|
* @param destAuthentication Authentication for requesting information from AGO about items to be included in solution item
|
|
30
30
|
* @param existingTemplates A collection of AGO item templates that can be referenced by newly-created templates
|
|
31
|
-
* @
|
|
32
|
-
* @
|
|
31
|
+
* @returns A promise which resolves with an array of resources for the item and its dependencies
|
|
32
|
+
* @private
|
|
33
33
|
*/
|
|
34
34
|
export declare function createItemTemplate(solutionItemId: string, itemId: string, templateDictionary: any, srcAuthentication: UserSession, destAuthentication: UserSession, existingTemplates: IItemTemplate[], itemProgressCallback: IItemProgressCallback): Promise<ISourceFile[]>;
|
|
35
35
|
/**
|
|
@@ -37,14 +37,15 @@ export declare function createItemTemplate(solutionItemId: string, itemId: strin
|
|
|
37
37
|
* Currently only handles web applications
|
|
38
38
|
*
|
|
39
39
|
* @param templates List of solution templates
|
|
40
|
-
* @
|
|
40
|
+
* @returns A list of templates that have templatized field references
|
|
41
41
|
*/
|
|
42
42
|
export declare function postProcessFieldReferences(templates: IItemTemplate[]): IItemTemplate[];
|
|
43
43
|
/**
|
|
44
44
|
* Get common properties that will support the templatization of field references
|
|
45
45
|
*
|
|
46
46
|
* @param templates List of solution templates
|
|
47
|
-
* @
|
|
47
|
+
* @returns A list of IDataSourceInfo objects with key properties
|
|
48
|
+
* @private
|
|
48
49
|
*/
|
|
49
50
|
export declare function _getDatasourceInfos(templates: IItemTemplate[]): IDatasourceInfo[];
|
|
50
51
|
/**
|
|
@@ -52,7 +53,8 @@ export declare function _getDatasourceInfos(templates: IItemTemplate[]): IDataso
|
|
|
52
53
|
* and associated web map layer ids based on itemId
|
|
53
54
|
*
|
|
54
55
|
* @param templates List of solution templates
|
|
55
|
-
* @
|
|
56
|
+
* @returns The lookup object with type, dependencies, and webmap layer info
|
|
57
|
+
* @private
|
|
56
58
|
*/
|
|
57
59
|
export declare function _getTemplateTypeHash(templates: IItemTemplate[]): any;
|
|
58
60
|
/**
|
|
@@ -60,7 +62,8 @@ export declare function _getTemplateTypeHash(templates: IItemTemplate[]): any;
|
|
|
60
62
|
* so we can know the id used within a map for a given feature service
|
|
61
63
|
*
|
|
62
64
|
* @param template A webmap solution template
|
|
63
|
-
* @
|
|
65
|
+
* @returns The lookup object with webmap layer info added
|
|
66
|
+
* @private
|
|
64
67
|
*/
|
|
65
68
|
export declare function _updateWebMapHashInfo(template: IItemTemplate, hashItem: any): void;
|
|
66
69
|
/**
|
|
@@ -68,7 +71,8 @@ export declare function _updateWebMapHashInfo(template: IItemTemplate, hashItem:
|
|
|
68
71
|
*
|
|
69
72
|
* @param dataSourceUrl Templatized datasource URL
|
|
70
73
|
* @param layerId Layer id
|
|
71
|
-
* @
|
|
74
|
+
* @returns string Amended datasource URL
|
|
75
|
+
* @private
|
|
72
76
|
*/
|
|
73
77
|
export declare function _addLayerIdToDatasourceUrl(datasourceUrl?: string, layerId?: any): string;
|
|
74
78
|
/**
|
|
@@ -77,7 +81,8 @@ export declare function _addLayerIdToDatasourceUrl(datasourceUrl?: string, layer
|
|
|
77
81
|
*
|
|
78
82
|
* @param datasourceInfos A webmap solution template
|
|
79
83
|
* @param templateTypeHash A simple lookup object populated with key item info
|
|
80
|
-
* @
|
|
84
|
+
* @returns The updated datasource infos
|
|
85
|
+
* @private
|
|
81
86
|
*/
|
|
82
87
|
export declare function _addMapLayerIds(datasourceInfos: IDatasourceInfo[], templateTypeHash: any): IDatasourceInfo[];
|
|
83
88
|
/**
|
|
@@ -86,6 +91,7 @@ export declare function _addMapLayerIds(datasourceInfos: IDatasourceInfo[], temp
|
|
|
86
91
|
*
|
|
87
92
|
* @param template A webmap solution template
|
|
88
93
|
* @param templateTypeHash A simple lookup object populated with key item info
|
|
89
|
-
* @
|
|
94
|
+
* @returns A lsit of feature service item IDs
|
|
95
|
+
* @private
|
|
90
96
|
*/
|
|
91
97
|
export declare function _getWebMapFSDependencies(template: IItemTemplate, templateTypeHash: any): string[];
|
package/dist/umd/creator.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ import { IModel } from "@esri/hub-common";
|
|
|
27
27
|
* @param srcAuthentication Credentials for requests to source items
|
|
28
28
|
* @param destAuthentication Credentials for the requests to destination solution
|
|
29
29
|
* @param options Customizations for creating the solution
|
|
30
|
-
* @
|
|
30
|
+
* @returns A promise that resolves with the AGO id of the new solution
|
|
31
31
|
*/
|
|
32
32
|
export declare function createSolution(sourceId: string, srcAuthentication: UserSession, destAuthentication: UserSession, options?: ICreateSolutionOptions): Promise<string>;
|
|
33
33
|
/**
|
|
@@ -37,7 +37,7 @@ export declare function createSolution(sourceId: string, srcAuthentication: User
|
|
|
37
37
|
* @param sourceInfo
|
|
38
38
|
* @param authentication
|
|
39
39
|
* @param isGroup Boolean to indicate if the files are associated with a group or item
|
|
40
|
-
* @
|
|
40
|
+
* @private
|
|
41
41
|
*/
|
|
42
42
|
export declare function _applySourceToCreateOptions(createOptions: ICreateSolutionOptions, sourceInfo: IGroup | IItem, srcAuthentication: UserSession, isGroup?: boolean): ICreateSolutionOptions;
|
|
43
43
|
/**
|
|
@@ -45,7 +45,7 @@ export declare function _applySourceToCreateOptions(createOptions: ICreateSoluti
|
|
|
45
45
|
*
|
|
46
46
|
* @param createOptions
|
|
47
47
|
* @param srcAuthentication
|
|
48
|
-
* @
|
|
48
|
+
* @private
|
|
49
49
|
*/
|
|
50
50
|
export declare function _addThumbnailFileToCreateOptions(createOptions: ICreateSolutionOptions, srcAuthentication: UserSession): Promise<ICreateSolutionOptions>;
|
|
51
51
|
/**
|
|
@@ -54,9 +54,9 @@ export declare function _addThumbnailFileToCreateOptions(createOptions: ICreateS
|
|
|
54
54
|
* @param options Customizations for creating the solution
|
|
55
55
|
* @param srcAuthentication Credentials for requests to source items
|
|
56
56
|
* @param destAuthentication Credentials for the requests to destination solution
|
|
57
|
-
* @
|
|
57
|
+
* @returns A promise that resolves with the AGO id of the new solution; solution item is deleted if its
|
|
58
58
|
* there is a problem updating it
|
|
59
|
-
* @
|
|
59
|
+
* @private
|
|
60
60
|
*/
|
|
61
61
|
export declare function _createSolutionFromItemIds(options: ICreateSolutionOptions, srcAuthentication: UserSession, destAuthentication: UserSession): Promise<string>;
|
|
62
62
|
/**
|
|
@@ -64,9 +64,9 @@ export declare function _createSolutionFromItemIds(options: ICreateSolutionOptio
|
|
|
64
64
|
*
|
|
65
65
|
* @param authentication Credentials for the request
|
|
66
66
|
* @param options Customizations for creating the solution
|
|
67
|
-
* @
|
|
67
|
+
* @returns A promise that resolves with the AGO id of the new solution; solution item is deleted if its
|
|
68
68
|
* there is a problem updating its thumbnail
|
|
69
|
-
* @
|
|
69
|
+
* @private
|
|
70
70
|
*/
|
|
71
71
|
export declare function _createSolutionItem(authentication: UserSession, options?: ICreateSolutionOptions): Promise<string>;
|
|
72
72
|
/**
|
|
@@ -74,16 +74,16 @@ export declare function _createSolutionItem(authentication: UserSession, options
|
|
|
74
74
|
* the Solution Item itself
|
|
75
75
|
*
|
|
76
76
|
* @param options
|
|
77
|
-
* @
|
|
77
|
+
* @private
|
|
78
78
|
*/
|
|
79
79
|
export declare function _createSolutionItemModel(options: any): IModel;
|
|
80
80
|
/**
|
|
81
81
|
* Gets the deploy.id and deploy.version tag values.
|
|
82
82
|
*
|
|
83
83
|
* @param tags A list of item tags
|
|
84
|
-
* @
|
|
84
|
+
* @returns A list containing the two values found in the tags, or defaulting to a new GUID and "1.0", respectively,
|
|
85
85
|
* as needed
|
|
86
|
-
* @
|
|
86
|
+
* @private
|
|
87
87
|
*/
|
|
88
88
|
export declare function _getDeploymentProperties(tags: string[]): string[];
|
|
89
89
|
/**
|
|
@@ -91,7 +91,7 @@ export declare function _getDeploymentProperties(tags: string[]): string[];
|
|
|
91
91
|
*
|
|
92
92
|
* @param desiredTagPrefix Tag prefix to look for
|
|
93
93
|
* @param tags A list of item tags
|
|
94
|
-
* @
|
|
95
|
-
* @
|
|
94
|
+
* @returns The extracted value of the first matching tag or null if a tag with the specified prefix is not found
|
|
95
|
+
* @private
|
|
96
96
|
*/
|
|
97
97
|
export declare function _getDeploymentProperty(desiredTagPrefix: string, tags: string[]): string | null;
|