@esri/solution-deployer 6.0.2-alpha.24 → 6.0.2-alpha.250423
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/package.json +14 -14
- package/dist/cjs/deploySolutionFromTemplate.d.ts +0 -55
- package/dist/cjs/deploySolutionFromTemplate.js +0 -334
- package/dist/cjs/deploySolutionFromTemplate.js.map +0 -1
- package/dist/cjs/deploySolutionItems.d.ts +0 -224
- package/dist/cjs/deploySolutionItems.js +0 -876
- package/dist/cjs/deploySolutionItems.js.map +0 -1
- package/dist/cjs/deployer.d.ts +0 -34
- package/dist/cjs/deployer.js +0 -99
- package/dist/cjs/deployer.js.map +0 -1
- package/dist/cjs/deployerUtils.d.ts +0 -47
- package/dist/cjs/deployerUtils.js +0 -120
- package/dist/cjs/deployerUtils.js.map +0 -1
- package/dist/cjs/helpers/post-process.d.ts +0 -29
- package/dist/cjs/helpers/post-process.js +0 -63
- package/dist/cjs/helpers/post-process.js.map +0 -1
- package/dist/cjs/helpers/share-templates-to-groups.d.ts +0 -24
- package/dist/cjs/helpers/share-templates-to-groups.js +0 -65
- package/dist/cjs/helpers/share-templates-to-groups.js.map +0 -1
- package/dist/cjs/helpers/sortTemplates.d.ts +0 -23
- package/dist/cjs/helpers/sortTemplates.js +0 -14
- package/dist/cjs/helpers/sortTemplates.js.map +0 -1
- package/dist/cjs/index.d.ts +0 -24
- package/dist/cjs/index.js +0 -28
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/module-map.d.ts +0 -23
- package/dist/cjs/module-map.js +0 -234
- package/dist/cjs/module-map.js.map +0 -1
- package/dist/esm/deploySolutionFromTemplate.d.ts +0 -55
- package/dist/esm/deploySolutionFromTemplate.js +0 -319
- package/dist/esm/deploySolutionFromTemplate.js.map +0 -1
- package/dist/esm/deploySolutionItems.d.ts +0 -224
- package/dist/esm/deploySolutionItems.js +0 -853
- package/dist/esm/deploySolutionItems.js.map +0 -1
- package/dist/esm/deployer.d.ts +0 -34
- package/dist/esm/deployer.js +0 -94
- package/dist/esm/deployer.js.map +0 -1
- package/dist/esm/deployerUtils.d.ts +0 -47
- package/dist/esm/deployerUtils.js +0 -112
- package/dist/esm/deployerUtils.js.map +0 -1
- package/dist/esm/helpers/post-process.d.ts +0 -29
- package/dist/esm/helpers/post-process.js +0 -59
- package/dist/esm/helpers/post-process.js.map +0 -1
- package/dist/esm/helpers/share-templates-to-groups.d.ts +0 -24
- package/dist/esm/helpers/share-templates-to-groups.js +0 -61
- package/dist/esm/helpers/share-templates-to-groups.js.map +0 -1
- package/dist/esm/helpers/sortTemplates.d.ts +0 -23
- package/dist/esm/helpers/sortTemplates.js +0 -10
- package/dist/esm/helpers/sortTemplates.js.map +0 -1
- package/dist/esm/index.d.ts +0 -24
- package/dist/esm/index.js +0 -25
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/module-map.d.ts +0 -23
- package/dist/esm/module-map.js +0 -230
- package/dist/esm/module-map.js.map +0 -1
|
@@ -1,224 +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
|
-
/**
|
|
17
|
-
* Manages deployment of items via the REST API.
|
|
18
|
-
*
|
|
19
|
-
* @module deployItems
|
|
20
|
-
*/
|
|
21
|
-
import * as common from "@esri/solution-common";
|
|
22
|
-
/**
|
|
23
|
-
* Deploys a set of items defined by templates.
|
|
24
|
-
*
|
|
25
|
-
* @param portalSharingUrl Server/sharing
|
|
26
|
-
* @param storageItemId Id of storage item
|
|
27
|
-
* @param templates A collection of AGO item templates
|
|
28
|
-
* @param storageAuthentication Credentials for the organization with the source items
|
|
29
|
-
* @param templateDictionary Hash of facts: org URL, adlib replacements
|
|
30
|
-
* @param deployedSolutionId Id of deployed Solution item
|
|
31
|
-
* @param destinationAuthentication Credentials for the destination organization
|
|
32
|
-
* @param options Options to tune deployment
|
|
33
|
-
* @returns A promise that will resolve with the list of information about the created items
|
|
34
|
-
*/
|
|
35
|
-
export declare function deploySolutionItems(portalSharingUrl: string, storageItemId: string, templates: common.IItemTemplate[], storageAuthentication: common.UserSession, templateDictionary: any, deployedSolutionId: string, destinationAuthentication: common.UserSession, options: common.IDeploySolutionOptions): Promise<common.ICreateItemFromTemplateResponse[]>;
|
|
36
|
-
/**
|
|
37
|
-
* For each item to be patched, convert it to its cloned id and mark the item as needing post processing.
|
|
38
|
-
*
|
|
39
|
-
* @param itemsToBePatched List of items that need to have their dependencies patched
|
|
40
|
-
* @param templateDictionary Hash of facts: org URL, adlib replacements
|
|
41
|
-
* @param templates A collection of AGO item templates
|
|
42
|
-
* @private
|
|
43
|
-
*/
|
|
44
|
-
export declare function _flagPatchItemsForPostProcessing(itemsToBePatched: common.IKeyedListsOfStrings, templateDictionary: any, templates: common.ICreateItemFromTemplateResponse[]): void;
|
|
45
|
-
/**
|
|
46
|
-
* Portal does not allow views of a single source to be created at the same time.
|
|
47
|
-
*
|
|
48
|
-
* Update view templates with an array of other view template ids that it should wait on.
|
|
49
|
-
*
|
|
50
|
-
* @param templates a collection of AGO item templates
|
|
51
|
-
*
|
|
52
|
-
* @returns An updated array of item templates
|
|
53
|
-
* @private
|
|
54
|
-
*/
|
|
55
|
-
export declare function _evaluateSharedViewSources(templates: common.IItemTemplate[]): common.IItemTemplate[];
|
|
56
|
-
/**
|
|
57
|
-
* Add a syncViews array to each template that will hold all other view ids that
|
|
58
|
-
* have the same FS dependency.
|
|
59
|
-
* These arrays will be processed later to only contain ids that each view will need to wait on.
|
|
60
|
-
*
|
|
61
|
-
* @param templates a collection of AGO item templates
|
|
62
|
-
* @param views an array of view template details
|
|
63
|
-
*
|
|
64
|
-
* @returns An updated array of item templates
|
|
65
|
-
* @private
|
|
66
|
-
*/
|
|
67
|
-
export declare function _updateViewTemplates(templates: common.IItemTemplate[], views: any[]): common.IItemTemplate[];
|
|
68
|
-
/**
|
|
69
|
-
* Get all view templates from the source templates collection
|
|
70
|
-
*
|
|
71
|
-
* @param views A collection of view ID and dependencies
|
|
72
|
-
*
|
|
73
|
-
* @returns an array of objects with the source FS id as the key and a list of views that are
|
|
74
|
-
* dependant upon it
|
|
75
|
-
*
|
|
76
|
-
* @private
|
|
77
|
-
*/
|
|
78
|
-
export declare function _getViewHash(views: any[]): any;
|
|
79
|
-
/**
|
|
80
|
-
* Get all view templates from the source templates collection
|
|
81
|
-
*
|
|
82
|
-
* @param templates A collection of AGO item templates
|
|
83
|
-
*
|
|
84
|
-
* @returns an array with the view id and its dependencies
|
|
85
|
-
*
|
|
86
|
-
* @private
|
|
87
|
-
*/
|
|
88
|
-
export declare function _getViews(templates: common.IItemTemplate[]): any[];
|
|
89
|
-
/**
|
|
90
|
-
* Search for existing items and update the templateDictionary with key details
|
|
91
|
-
*
|
|
92
|
-
* @param templates A collection of AGO item templates
|
|
93
|
-
* @param reuseItems Option to search for existing items
|
|
94
|
-
* @param templateDictionary Hash of facts: org URL, adlib replacements, deferreds for dependencies
|
|
95
|
-
* @param authentication Credentials for the requests
|
|
96
|
-
*
|
|
97
|
-
* @returns A Promise that will resolve once existing items have been evaluated
|
|
98
|
-
*
|
|
99
|
-
* @private
|
|
100
|
-
*/
|
|
101
|
-
export declare function _reuseDeployedItems(templates: common.IItemTemplate[], reuseItems: boolean, templateDictionary: any, authentication: common.UserSession): Promise<any>;
|
|
102
|
-
/**
|
|
103
|
-
* Search for existing items and update the templateDictionary with key details
|
|
104
|
-
*
|
|
105
|
-
* Subtle difference between _reuseDeployedItems and _useExistingItems
|
|
106
|
-
* _reuseDeployedItems: will search all existing items based on specific type keywords
|
|
107
|
-
* that would have been added by a previous deployment
|
|
108
|
-
* _useExistingItems: will search for an existing item that the user provided
|
|
109
|
-
* the item id for while configuring in the deployment app.
|
|
110
|
-
* This type of item would not necessarily have been laid down by a previous deployment and
|
|
111
|
-
* can thus not expect that it will have the type keywords
|
|
112
|
-
*
|
|
113
|
-
* @param templates A collection of AGO item templates
|
|
114
|
-
* @param useExisting Option to search for existing items
|
|
115
|
-
* @param templateDictionary Hash of facts: org URL, adlib replacements, deferreds for dependencies
|
|
116
|
-
* @param authentication Credentials for the requests
|
|
117
|
-
*
|
|
118
|
-
* @returns A Promise that will resolve once existing items have been evaluated
|
|
119
|
-
*
|
|
120
|
-
* @private
|
|
121
|
-
*/
|
|
122
|
-
export declare function _useExistingItems(templates: common.IItemTemplate[], useExisting: boolean, templateDictionary: any, authentication: common.UserSession): Promise<any>;
|
|
123
|
-
/**
|
|
124
|
-
* Verify if the existing item has the source-<itemId> typeKeyword and set it if not
|
|
125
|
-
* This allows items that did not come from deployment to be found for reuse after they
|
|
126
|
-
* have been used once via a custom itemId param
|
|
127
|
-
*
|
|
128
|
-
* @param itemDefs
|
|
129
|
-
* @param sourceIdHash key value pairs..actual itemId is the key and the source itemId is the value
|
|
130
|
-
* @param authentication credentials for the requests
|
|
131
|
-
*
|
|
132
|
-
* @returns a promise to indicate when the requests are complete
|
|
133
|
-
* @private
|
|
134
|
-
*/
|
|
135
|
-
export declare function _setTypekeywordForExisting(itemDefs: Array<Promise<any>>, sourceIdHash: any, authentication: common.UserSession): Promise<any>;
|
|
136
|
-
/**
|
|
137
|
-
* Update the templateDictionary with key details by item type
|
|
138
|
-
*
|
|
139
|
-
* @param templates A collection of AGO item templates
|
|
140
|
-
* @param templateDictionary Hash of facts: org URL, adlib replacements, deferreds for dependencies
|
|
141
|
-
*
|
|
142
|
-
* @private
|
|
143
|
-
*/
|
|
144
|
-
export declare function _updateTemplateDictionary(templates: common.IItemTemplate[], templateDictionary: any, authentication: common.UserSession): Promise<any>;
|
|
145
|
-
/**
|
|
146
|
-
* Add the fields from the source layer to the template dictionary for any required replacements
|
|
147
|
-
*
|
|
148
|
-
* @param templateDictionary Hash of facts: org URL, adlib replacements, deferreds for dependencies
|
|
149
|
-
* @param itemId the id for the item
|
|
150
|
-
* @param layerId the id for the layer
|
|
151
|
-
* @param fields the fields to transfer
|
|
152
|
-
*
|
|
153
|
-
* @private
|
|
154
|
-
*/
|
|
155
|
-
export declare function _setFields(templateDictionary: any, itemId: string, layerId: string, fields: any[]): void;
|
|
156
|
-
/**
|
|
157
|
-
* In some cases an item id search will return a stale item reference
|
|
158
|
-
* it will subsequently fail when we try to fetch the underlying service.
|
|
159
|
-
*
|
|
160
|
-
* We need to remove the item info that has been added to the template dictionary
|
|
161
|
-
* and treat the item as we do other items that don't already exist on deployment.
|
|
162
|
-
*
|
|
163
|
-
* @param result the service request result
|
|
164
|
-
* @param templateDictionary Hash of facts: org URL, adlib replacements, deferreds for dependencies
|
|
165
|
-
*
|
|
166
|
-
* @private
|
|
167
|
-
*/
|
|
168
|
-
export declare function _updateTemplateDictionaryForError(templateDictionary: any, itemId: string): any;
|
|
169
|
-
/**
|
|
170
|
-
* Optionally search by tags and then update the templateDictionary based on the search results
|
|
171
|
-
*
|
|
172
|
-
* @param existingItemsResponse response object from search by typeKeyword and type
|
|
173
|
-
* @param existingItemIds list of the template ids we have queried
|
|
174
|
-
* @param templateDictionary Hash of facts: org URL, adlib replacements, deferreds for dependencies
|
|
175
|
-
* @param authentication Credentials for the request
|
|
176
|
-
* @param addTagQuery Boolean to indicate if a search by tag should happen
|
|
177
|
-
* @returns IFindExistingItemsResponse object with promise that will resolve with an array of results
|
|
178
|
-
* and an array of item ids
|
|
179
|
-
* @private
|
|
180
|
-
*/
|
|
181
|
-
export declare function _handleExistingItems(existingItemsResponse: any[], existingItemInfos: common.IFindExistingItemInfos[], templateDictionary: any, authentication: common.UserSession, addTagQuery: boolean): common.IFindExistingItemsResponse;
|
|
182
|
-
export declare function _updateTemplateDictionaryById(templateDictionary: any, sourceId: string, itemId: string, v: any): void;
|
|
183
|
-
/**
|
|
184
|
-
* Search items based on user query
|
|
185
|
-
*
|
|
186
|
-
* @param templates Templates to examine
|
|
187
|
-
* @param templateDictionary Hash of facts: org URL, adlib replacements, deferreds for dependencies
|
|
188
|
-
* @param authentication Credentials for the request
|
|
189
|
-
* @returns IFindExistingItemsResponse object with promise that will resolve with an array of results
|
|
190
|
-
* and an array of item ids
|
|
191
|
-
* @private
|
|
192
|
-
*/
|
|
193
|
-
export declare function _findExistingItemByKeyword(templates: common.IItemTemplate[], templateDictionary: any, authentication: common.UserSession): common.IFindExistingItemsResponse;
|
|
194
|
-
/**
|
|
195
|
-
* Search items based on user query
|
|
196
|
-
*
|
|
197
|
-
* @param query Query string to use
|
|
198
|
-
* @param authentication Credentials for the request
|
|
199
|
-
* @returns A promise that will resolve with an array of results
|
|
200
|
-
* @private
|
|
201
|
-
*/
|
|
202
|
-
export declare function _findExistingItem(query: string, authentication: common.UserSession): Promise<any>;
|
|
203
|
-
/**
|
|
204
|
-
* Creates an item from a template once the item's dependencies have been created.
|
|
205
|
-
*
|
|
206
|
-
* @param template Template of item to deploy
|
|
207
|
-
* @param resourceFilePaths URL, folder, and filename for each item resource/metadata/thumbnail
|
|
208
|
-
* @param templateDictionary Hash of facts: org URL, adlib replacements, deferreds for dependencies
|
|
209
|
-
* @param userSession Options for the request
|
|
210
|
-
* @param itemProgressCallback Function for reporting progress updates from type-specific template handlers
|
|
211
|
-
* @returns A promise that will resolve with the id of the deployed item (which is simply returned if it's
|
|
212
|
-
* already in the templates list
|
|
213
|
-
* @private
|
|
214
|
-
*/
|
|
215
|
-
export declare function _createItemFromTemplateWhenReady(template: common.IItemTemplate, resourceFilePaths: common.IDeployFileCopyPath[], storageAuthentication: common.UserSession, templateDictionary: any, destinationAuthentication: common.UserSession, itemProgressCallback: common.IItemProgressCallback): Promise<common.ICreateItemFromTemplateResponse>;
|
|
216
|
-
/**
|
|
217
|
-
* Accumulates the estimated deployment cost of a set of templates.
|
|
218
|
-
*
|
|
219
|
-
* @param templates Templates to examine
|
|
220
|
-
* @returns Sum of estimated deployment costs
|
|
221
|
-
* @private
|
|
222
|
-
*/
|
|
223
|
-
export declare function _estimateDeploymentCost(templates: common.IItemTemplate[]): number;
|
|
224
|
-
export declare function _getGroupUpdates(template: common.IItemTemplate, authentication: common.UserSession, templateDictionary: any): Array<Promise<any>>;
|