@esri/solution-creator 0.24.0 → 1.1.4
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 +5 -4
- package/dist/esm/createItemTemplate.js +89 -87
- package/dist/esm/createItemTemplate.js.map +1 -1
- package/dist/esm/creator.d.ts +10 -8
- package/dist/esm/creator.js +78 -72
- package/dist/esm/creator.js.map +1 -1
- package/dist/esm/helpers/add-content-to-solution.d.ts +5 -4
- package/dist/esm/helpers/add-content-to-solution.js +100 -92
- package/dist/esm/helpers/add-content-to-solution.js.map +1 -1
- package/dist/esm/module-map.js +7 -6
- package/dist/esm/module-map.js.map +1 -1
- package/dist/node/createItemTemplate.d.ts +5 -4
- package/dist/node/createItemTemplate.js +102 -100
- package/dist/node/createItemTemplate.js.map +1 -1
- package/dist/node/creator.d.ts +10 -8
- package/dist/node/creator.js +80 -74
- package/dist/node/creator.js.map +1 -1
- package/dist/node/helpers/add-content-to-solution.d.ts +5 -4
- package/dist/node/helpers/add-content-to-solution.js +112 -104
- package/dist/node/helpers/add-content-to-solution.js.map +1 -1
- package/dist/node/index.js +4 -4
- package/dist/node/index.js.map +1 -1
- package/dist/node/module-map.js +13 -12
- package/dist/node/module-map.js.map +1 -1
- package/dist/umd/createItemTemplate.d.ts +5 -4
- package/dist/umd/creator.d.ts +10 -8
- package/dist/umd/creator.umd.js +1240 -1271
- package/dist/umd/creator.umd.js.map +1 -1
- package/dist/umd/creator.umd.min.js +3 -3
- package/dist/umd/creator.umd.min.js.map +1 -1
- package/dist/umd/helpers/add-content-to-solution.d.ts +5 -4
- package/package.json +31 -30
|
@@ -16,15 +16,14 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports._getWebMapFSDependencies = exports._addMapLayerIds = exports._addLayerIdToDatasourceUrl = exports._updateWebMapHashInfo = exports._getTemplateTypeHash = exports._getDatasourceInfos = exports.postProcessFieldReferences = exports.createItemTemplate = void 0;
|
|
19
|
-
var tslib_1 = require("tslib");
|
|
20
19
|
/**
|
|
21
20
|
* Manages creation of the template of a Solution item via the REST API.
|
|
22
21
|
*
|
|
23
22
|
* @module createItemTemplate
|
|
24
23
|
*/
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
const solution_common_1 = require("@esri/solution-common");
|
|
25
|
+
const hub_common_1 = require("@esri/hub-common");
|
|
26
|
+
const module_map_1 = require("./module-map");
|
|
28
27
|
// ------------------------------------------------------------------------------------------------------------------ //
|
|
29
28
|
/**
|
|
30
29
|
* Creates template for an AGO item and its dependencies
|
|
@@ -32,53 +31,50 @@ var module_map_1 = require("./module-map");
|
|
|
32
31
|
* @param solutionItemId The solution to contain the item
|
|
33
32
|
* @param itemId AGO id string
|
|
34
33
|
* @param templateDictionary Hash of facts
|
|
35
|
-
* @param
|
|
34
|
+
* @param srcAuthentication Credentials for requests to source items
|
|
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
|
-
* @return A promise
|
|
37
|
+
* @return A promise which resolves with an array of resources for the item and its dependencies
|
|
38
38
|
* @protected
|
|
39
39
|
*/
|
|
40
|
-
function createItemTemplate(solutionItemId, itemId, templateDictionary,
|
|
41
|
-
return new Promise(
|
|
40
|
+
function createItemTemplate(solutionItemId, itemId, templateDictionary, srcAuthentication, destAuthentication, existingTemplates, itemProgressCallback) {
|
|
41
|
+
return new Promise(resolve => {
|
|
42
42
|
// Check if item and its dependents are already in list or are queued
|
|
43
|
-
if (solution_common_1.findTemplateInList(existingTemplates, itemId)) {
|
|
44
|
-
resolve(
|
|
43
|
+
if ((0, solution_common_1.findTemplateInList)(existingTemplates, itemId)) {
|
|
44
|
+
resolve([]);
|
|
45
45
|
}
|
|
46
46
|
else {
|
|
47
47
|
// Add the id as a placeholder to show that it is being fetched
|
|
48
|
-
existingTemplates.push(solution_common_1.createPlaceholderTemplate(itemId));
|
|
48
|
+
existingTemplates.push((0, solution_common_1.createPlaceholderTemplate)(itemId));
|
|
49
49
|
itemProgressCallback(itemId, solution_common_1.EItemProgressStatus.Started, 0);
|
|
50
50
|
// Fetch the item
|
|
51
|
-
solution_common_1.getItemBase(itemId,
|
|
52
|
-
.catch(
|
|
51
|
+
(0, solution_common_1.getItemBase)(itemId, srcAuthentication)
|
|
52
|
+
.catch(() => {
|
|
53
53
|
// If item query fails, try fetching item as a group
|
|
54
54
|
// Change its placeholder from an empty type to the Group type so that we can later distinguish
|
|
55
55
|
// between items and groups (the base info for a group doesn't include a type property)
|
|
56
|
-
solution_common_1.replaceTemplate(existingTemplates, itemId, solution_common_1.createPlaceholderTemplate(itemId, "Group"));
|
|
57
|
-
return solution_common_1.getGroupBase(itemId,
|
|
56
|
+
(0, solution_common_1.replaceTemplate)(existingTemplates, itemId, (0, solution_common_1.createPlaceholderTemplate)(itemId, "Group"));
|
|
57
|
+
return (0, solution_common_1.getGroupBase)(itemId, srcAuthentication);
|
|
58
58
|
})
|
|
59
|
-
.then(
|
|
60
|
-
itemInfo = solution_common_1.sanitizeJSONAndReportChanges(itemInfo);
|
|
59
|
+
.then(itemInfo => {
|
|
60
|
+
itemInfo = (0, solution_common_1.sanitizeJSONAndReportChanges)(itemInfo);
|
|
61
61
|
// Save the URL as a symbol
|
|
62
62
|
if (itemInfo.url) {
|
|
63
63
|
templateDictionary[itemInfo.url] = "{{" + itemInfo.id + ".url}}";
|
|
64
64
|
itemInfo.origUrl = itemInfo.url;
|
|
65
65
|
}
|
|
66
|
-
|
|
66
|
+
const idTest = /^source-[0-9A-F]{32}/i;
|
|
67
67
|
// Remove any source-itemId type keywords
|
|
68
68
|
if (Array.isArray(itemInfo.typeKeywords)) {
|
|
69
|
-
itemInfo.typeKeywords = itemInfo.typeKeywords.filter(
|
|
70
|
-
return idTest.test(v) ? false : true;
|
|
71
|
-
});
|
|
69
|
+
itemInfo.typeKeywords = itemInfo.typeKeywords.filter(v => idTest.test(v) ? false : true);
|
|
72
70
|
}
|
|
73
71
|
// Remove any source-itemId tags
|
|
74
72
|
/* istanbul ignore else */
|
|
75
73
|
if (Array.isArray(itemInfo.tags)) {
|
|
76
|
-
itemInfo.tags = itemInfo.tags.filter(
|
|
77
|
-
return idTest.test(v) ? false : true;
|
|
78
|
-
});
|
|
74
|
+
itemInfo.tags = itemInfo.tags.filter(v => idTest.test(v) ? false : true);
|
|
79
75
|
}
|
|
80
|
-
|
|
81
|
-
|
|
76
|
+
const placeholder = (0, solution_common_1.findTemplateInList)(existingTemplates, itemId);
|
|
77
|
+
let itemType = placeholder.type;
|
|
82
78
|
if (!itemType) {
|
|
83
79
|
// Groups have this defined when their placeholder is created
|
|
84
80
|
itemType = itemInfo.type;
|
|
@@ -87,24 +83,26 @@ function createItemTemplate(solutionItemId, itemId, templateDictionary, authenti
|
|
|
87
83
|
if (!itemInfo.type) {
|
|
88
84
|
itemInfo.type = itemType; // Groups don't have this property, so we'll patch it in
|
|
89
85
|
}
|
|
90
|
-
placeholder.item =
|
|
86
|
+
placeholder.item = {
|
|
87
|
+
...itemInfo
|
|
88
|
+
};
|
|
91
89
|
// Interrupt process if progress callback returns `false`
|
|
92
90
|
if (!itemProgressCallback(itemId, solution_common_1.EItemProgressStatus.Created, 1)) {
|
|
93
91
|
itemProgressCallback(itemId, solution_common_1.EItemProgressStatus.Cancelled, 1);
|
|
94
|
-
resolve(solution_common_1.fail("Cancelled"));
|
|
92
|
+
resolve((0, solution_common_1.fail)("Cancelled"));
|
|
95
93
|
return;
|
|
96
94
|
}
|
|
97
|
-
|
|
95
|
+
const itemHandler = module_map_1.moduleMap[itemType];
|
|
98
96
|
if (!itemHandler || itemHandler === module_map_1.UNSUPPORTED) {
|
|
99
97
|
if (itemHandler === module_map_1.UNSUPPORTED) {
|
|
100
98
|
itemProgressCallback(itemId, solution_common_1.EItemProgressStatus.Ignored, 1);
|
|
101
|
-
resolve(
|
|
99
|
+
resolve([]);
|
|
102
100
|
}
|
|
103
101
|
else {
|
|
104
102
|
itemProgressCallback(itemId, solution_common_1.EItemProgressStatus.Failed, 1);
|
|
105
103
|
placeholder.properties["failed"] = true;
|
|
106
|
-
solution_common_1.replaceTemplate(existingTemplates, itemId, placeholder);
|
|
107
|
-
resolve(solution_common_1.fail("The type of AGO item " +
|
|
104
|
+
(0, solution_common_1.replaceTemplate)(existingTemplates, itemId, placeholder);
|
|
105
|
+
resolve((0, solution_common_1.fail)("The type of AGO item " +
|
|
108
106
|
itemId +
|
|
109
107
|
" ('" +
|
|
110
108
|
itemType +
|
|
@@ -120,50 +118,54 @@ function createItemTemplate(solutionItemId, itemId, templateDictionary, authenti
|
|
|
120
118
|
} */
|
|
121
119
|
// Delegate the creation of the item to the handler
|
|
122
120
|
itemHandler
|
|
123
|
-
.convertItemToTemplate(solutionItemId, itemInfo,
|
|
124
|
-
.then(
|
|
121
|
+
.convertItemToTemplate(solutionItemId, itemInfo, destAuthentication, templateDictionary)
|
|
122
|
+
.then(itemTemplate => {
|
|
125
123
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
126
|
-
solution_common_1.
|
|
127
|
-
//
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}
|
|
137
|
-
else {
|
|
138
|
-
// Get its dependencies, asking each to get its dependents via
|
|
139
|
-
// recursive calls to this function
|
|
140
|
-
var dependentDfds_1 = [];
|
|
141
|
-
itemTemplate.dependencies.forEach(function (dependentId) {
|
|
142
|
-
if (!solution_common_1.findTemplateInList(existingTemplates, dependentId)) {
|
|
143
|
-
dependentDfds_1.push(createItemTemplate(solutionItemId, dependentId, templateDictionary, authentication, existingTemplates, itemProgressCallback));
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
147
|
-
Promise.all(dependentDfds_1).then(function () {
|
|
148
|
-
// Templatization of item and its dependencies done
|
|
124
|
+
(0, solution_common_1.getItemResourcesPaths)(itemTemplate, solutionItemId, srcAuthentication, solution_common_1.SolutionTemplateFormatVersion).then((resourceItemFilePaths) => {
|
|
125
|
+
itemTemplate.item.thumbnail = null; // not needed in this property; handled as a resource
|
|
126
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
127
|
+
(0, solution_common_1.getItemResourcesFilesFromPaths)(resourceItemFilePaths, srcAuthentication).then((resourceItemFiles) => {
|
|
128
|
+
// update the template's resources
|
|
129
|
+
itemTemplate.resources = itemTemplate.resources.concat(resourceItemFiles.map((file) => file.folder + "/" + file.filename));
|
|
130
|
+
// Set the value keyed by the id to the created template, replacing the placeholder template
|
|
131
|
+
(0, solution_common_1.replaceTemplate)(existingTemplates, itemTemplate.itemId, itemTemplate);
|
|
132
|
+
// Trace item dependencies
|
|
133
|
+
if (itemTemplate.dependencies.length === 0) {
|
|
149
134
|
itemProgressCallback(itemId, solution_common_1.EItemProgressStatus.Finished, 1);
|
|
150
|
-
resolve(
|
|
151
|
-
}
|
|
152
|
-
|
|
135
|
+
resolve(resourceItemFiles);
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
// Get its dependencies, asking each to get its dependents via
|
|
139
|
+
// recursive calls to this function
|
|
140
|
+
const dependentDfds = [];
|
|
141
|
+
itemTemplate.dependencies.forEach(dependentId => {
|
|
142
|
+
if (!(0, solution_common_1.findTemplateInList)(existingTemplates, dependentId)) {
|
|
143
|
+
dependentDfds.push(createItemTemplate(solutionItemId, dependentId, templateDictionary, srcAuthentication, destAuthentication, existingTemplates, itemProgressCallback));
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
147
|
+
Promise.all(dependentDfds).then((dependentResourceItemFiles) => {
|
|
148
|
+
// Templatization of item and its dependencies done
|
|
149
|
+
itemProgressCallback(itemId, solution_common_1.EItemProgressStatus.Finished, 1);
|
|
150
|
+
resourceItemFiles = dependentResourceItemFiles.reduce((accumulator, currentValue) => accumulator.concat(currentValue), resourceItemFiles);
|
|
151
|
+
resolve(resourceItemFiles);
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
});
|
|
153
155
|
});
|
|
154
|
-
},
|
|
156
|
+
}, error => {
|
|
155
157
|
placeholder.properties["error"] = JSON.stringify(error);
|
|
156
|
-
solution_common_1.replaceTemplate(existingTemplates, itemId, placeholder);
|
|
158
|
+
(0, solution_common_1.replaceTemplate)(existingTemplates, itemId, placeholder);
|
|
157
159
|
itemProgressCallback(itemId, solution_common_1.EItemProgressStatus.Failed, 1);
|
|
158
|
-
resolve(
|
|
160
|
+
resolve([]);
|
|
159
161
|
});
|
|
160
162
|
}
|
|
161
163
|
},
|
|
162
164
|
// Id not found or item is not accessible
|
|
163
|
-
|
|
165
|
+
() => {
|
|
164
166
|
itemProgressCallback(itemId, solution_common_1.EItemProgressStatus.Failed, 1);
|
|
165
167
|
itemProgressCallback(itemId, solution_common_1.EItemProgressStatus.Failed, 1);
|
|
166
|
-
resolve(
|
|
168
|
+
resolve([]);
|
|
167
169
|
});
|
|
168
170
|
}
|
|
169
171
|
});
|
|
@@ -177,20 +179,20 @@ exports.createItemTemplate = createItemTemplate;
|
|
|
177
179
|
* @return A list of templates that have templatized field references
|
|
178
180
|
*/
|
|
179
181
|
function postProcessFieldReferences(templates) {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
return templates.map(
|
|
182
|
+
const datasourceInfos = _getDatasourceInfos(templates);
|
|
183
|
+
const templateTypeHash = _getTemplateTypeHash(templates);
|
|
184
|
+
return templates.map(template => {
|
|
183
185
|
/* istanbul ignore else */
|
|
184
186
|
if (template.type === "Web Mapping Application" ||
|
|
185
187
|
template.type === "Dashboard" ||
|
|
186
188
|
template.type === "Web Map") {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
+
const webMapFSDependencies = _getWebMapFSDependencies(template, templateTypeHash);
|
|
190
|
+
const itemHandler = module_map_1.moduleMap[template.item.type];
|
|
189
191
|
/* istanbul ignore else */
|
|
190
192
|
if (itemHandler) {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
if (
|
|
193
|
+
const dependencies = webMapFSDependencies.concat(template.dependencies);
|
|
194
|
+
let dependantDatasources = datasourceInfos.filter(ds => {
|
|
195
|
+
if (dependencies.indexOf(ds.itemId) > -1) {
|
|
194
196
|
return ds;
|
|
195
197
|
}
|
|
196
198
|
});
|
|
@@ -212,21 +214,21 @@ exports.postProcessFieldReferences = postProcessFieldReferences;
|
|
|
212
214
|
* @return A list of IDataSourceInfo objects with key properties
|
|
213
215
|
*/
|
|
214
216
|
function _getDatasourceInfos(templates) {
|
|
215
|
-
|
|
216
|
-
templates.forEach(
|
|
217
|
+
const datasourceInfos = [];
|
|
218
|
+
templates.forEach(t => {
|
|
217
219
|
if (t.type === "Feature Service") {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
layersAndTables.forEach(
|
|
220
|
+
const layers = (0, hub_common_1.getProp)(t, "properties.layers") || [];
|
|
221
|
+
const tables = (0, hub_common_1.getProp)(t, "properties.tables") || [];
|
|
222
|
+
const layersAndTables = layers.concat(tables);
|
|
223
|
+
layersAndTables.forEach(obj => {
|
|
222
224
|
/* istanbul ignore else */
|
|
223
|
-
if (!solution_common_1.hasDatasource(datasourceInfos, t.itemId, obj.id)) {
|
|
225
|
+
if (!(0, solution_common_1.hasDatasource)(datasourceInfos, t.itemId, obj.id)) {
|
|
224
226
|
datasourceInfos.push({
|
|
225
227
|
itemId: t.itemId,
|
|
226
228
|
layerId: obj.id,
|
|
227
229
|
fields: obj.fields,
|
|
228
230
|
basePath: t.itemId + ".layer" + obj.id + ".fields",
|
|
229
|
-
url: hub_common_1.getProp(t, "item.url"),
|
|
231
|
+
url: (0, hub_common_1.getProp)(t, "item.url"),
|
|
230
232
|
ids: [],
|
|
231
233
|
relationships: obj.relationships || [],
|
|
232
234
|
adminLayerInfo: obj.adminLayerInfo || {}
|
|
@@ -246,8 +248,8 @@ exports._getDatasourceInfos = _getDatasourceInfos;
|
|
|
246
248
|
* @return The lookup object with type, dependencies, and webmap layer info
|
|
247
249
|
*/
|
|
248
250
|
function _getTemplateTypeHash(templates) {
|
|
249
|
-
|
|
250
|
-
templates.forEach(
|
|
251
|
+
const templateTypeHash = {};
|
|
252
|
+
templates.forEach(template => {
|
|
251
253
|
templateTypeHash[template.itemId] = {
|
|
252
254
|
type: template.type,
|
|
253
255
|
dependencies: template.dependencies
|
|
@@ -267,21 +269,21 @@ exports._getTemplateTypeHash = _getTemplateTypeHash;
|
|
|
267
269
|
* @return The lookup object with webmap layer info added
|
|
268
270
|
*/
|
|
269
271
|
function _updateWebMapHashInfo(template, hashItem) {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
272
|
+
const operationalLayers = (0, hub_common_1.getProp)(template, "data.operationalLayers") || [];
|
|
273
|
+
const tables = (0, hub_common_1.getProp)(template, "data.tables") || [];
|
|
274
|
+
const layersAndTables = operationalLayers.concat(tables);
|
|
273
275
|
if (layersAndTables && layersAndTables.length > 0) {
|
|
274
276
|
hashItem.layersAndTables = [];
|
|
275
|
-
layersAndTables.forEach(
|
|
276
|
-
|
|
277
|
-
|
|
277
|
+
layersAndTables.forEach(layer => {
|
|
278
|
+
const obj = {};
|
|
279
|
+
let itemId;
|
|
278
280
|
/* istanbul ignore else */
|
|
279
281
|
if (layer.itemId) {
|
|
280
282
|
itemId = layer.itemId;
|
|
281
283
|
}
|
|
282
284
|
/* istanbul ignore else */
|
|
283
285
|
if (itemId) {
|
|
284
|
-
obj[solution_common_1.cleanLayerBasedItemId(itemId)] = {
|
|
286
|
+
obj[(0, solution_common_1.cleanLayerBasedItemId)(itemId)] = {
|
|
285
287
|
id: layer.id,
|
|
286
288
|
url: layer.url
|
|
287
289
|
};
|
|
@@ -313,16 +315,16 @@ exports._addLayerIdToDatasourceUrl = _addLayerIdToDatasourceUrl;
|
|
|
313
315
|
* @return The updated datasource infos
|
|
314
316
|
*/
|
|
315
317
|
function _addMapLayerIds(datasourceInfos, templateTypeHash) {
|
|
316
|
-
|
|
318
|
+
const webMapIds = Object.keys(templateTypeHash).filter(k => {
|
|
317
319
|
if (templateTypeHash[k].type === "Web Map") {
|
|
318
320
|
return templateTypeHash[k];
|
|
319
321
|
}
|
|
320
322
|
});
|
|
321
|
-
return datasourceInfos.map(
|
|
322
|
-
webMapIds.forEach(
|
|
323
|
-
templateTypeHash[webMapId].layersAndTables.forEach(
|
|
324
|
-
|
|
325
|
-
|
|
323
|
+
return datasourceInfos.map(ds => {
|
|
324
|
+
webMapIds.forEach(webMapId => {
|
|
325
|
+
templateTypeHash[webMapId].layersAndTables.forEach((opLayer) => {
|
|
326
|
+
const opLayerInfo = opLayer[ds.itemId];
|
|
327
|
+
const url = _addLayerIdToDatasourceUrl(ds.url, ds.layerId);
|
|
326
328
|
if (opLayerInfo &&
|
|
327
329
|
url === opLayerInfo.url &&
|
|
328
330
|
ds.ids.indexOf(opLayerInfo.id) < 0) {
|
|
@@ -343,11 +345,11 @@ exports._addMapLayerIds = _addMapLayerIds;
|
|
|
343
345
|
* @return A lsit of feature service item IDs
|
|
344
346
|
*/
|
|
345
347
|
function _getWebMapFSDependencies(template, templateTypeHash) {
|
|
346
|
-
|
|
347
|
-
template.dependencies.forEach(
|
|
348
|
-
|
|
348
|
+
const webMapFSDependencies = [];
|
|
349
|
+
template.dependencies.forEach(dep => {
|
|
350
|
+
const depObj = templateTypeHash[dep];
|
|
349
351
|
if (depObj.type === "Web Map") {
|
|
350
|
-
depObj.dependencies.forEach(
|
|
352
|
+
depObj.dependencies.forEach((depObjDependency) => {
|
|
351
353
|
/* istanbul ignore else */
|
|
352
354
|
if (templateTypeHash[depObjDependency].type === "Feature Service") {
|
|
353
355
|
webMapFSDependencies.push(depObjDependency);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createItemTemplate.js","sourceRoot":"","sources":["../../src/createItemTemplate.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG
|
|
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;YACjD,OAAO,CAAC,EAAE,CAAC,CAAC;SACb;aAAM;YACL,+DAA+D;YAC/D,iBAAiB,CAAC,IAAI,CAAC,IAAA,2CAAyB,EAAC,MAAM,CAAC,CAAC,CAAC;YAE1D,oBAAoB,CAAC,MAAM,EAAE,qCAAmB,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;YAE7D,iBAAiB;YACjB,IAAA,6BAAW,EAAC,MAAM,EAAE,iBAAiB,CAAC;iBACnC,KAAK,CAAC,GAAG,EAAE;gBACV,oDAAoD;gBACpD,+FAA+F;gBAC/F,uFAAuF;gBACvF,IAAA,iCAAe,EACb,iBAAiB,EACjB,MAAM,EACN,IAAA,2CAAyB,EAAC,MAAM,EAAE,OAAO,CAAC,CAC3C,CAAC;gBACF,OAAO,IAAA,8BAAY,EAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;YACjD,CAAC,CAAC;iBACD,IAAI,CACH,QAAQ,CAAC,EAAE;gBACT,QAAQ,GAAG,IAAA,8CAA4B,EAAC,QAAQ,CAAC,CAAC;gBAElD,2BAA2B;gBAC3B,IAAI,QAAQ,CAAC,GAAG,EAAE;oBACh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O,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
|
@@ -24,11 +24,12 @@ import { IModel } from "@esri/hub-common";
|
|
|
24
24
|
* Creates a solution item.
|
|
25
25
|
*
|
|
26
26
|
* @param sourceId AGO id of group whose contents are to be added to solution or of an item to convert into a solution
|
|
27
|
-
* @param
|
|
27
|
+
* @param srcAuthentication Credentials for requests to source items
|
|
28
|
+
* @param destAuthentication Credentials for the requests to destination solution
|
|
28
29
|
* @param options Customizations for creating the solution
|
|
29
30
|
* @return A promise that resolves with the AGO id of the new solution
|
|
30
31
|
*/
|
|
31
|
-
export declare function createSolution(sourceId: string,
|
|
32
|
+
export declare function createSolution(sourceId: string, srcAuthentication: UserSession, destAuthentication: UserSession, options?: ICreateSolutionOptions): Promise<string>;
|
|
32
33
|
/**
|
|
33
34
|
* Update the createOptions with the group properties
|
|
34
35
|
*
|
|
@@ -38,25 +39,26 @@ export declare function createSolution(sourceId: string, authentication: UserSes
|
|
|
38
39
|
* @param isGroup Boolean to indicate if the files are associated with a group or item
|
|
39
40
|
* @internal
|
|
40
41
|
*/
|
|
41
|
-
export declare function _applySourceToCreateOptions(createOptions: ICreateSolutionOptions, sourceInfo: IGroup | IItem,
|
|
42
|
+
export declare function _applySourceToCreateOptions(createOptions: ICreateSolutionOptions, sourceInfo: IGroup | IItem, srcAuthentication: UserSession, isGroup?: boolean): ICreateSolutionOptions;
|
|
42
43
|
/**
|
|
43
44
|
* Update the createOptions with the thumbnail file
|
|
44
45
|
*
|
|
45
46
|
* @param createOptions
|
|
46
|
-
* @param
|
|
47
|
+
* @param srcAuthentication
|
|
47
48
|
* @internal
|
|
48
49
|
*/
|
|
49
|
-
export declare function _addThumbnailFileToCreateOptions(createOptions: ICreateSolutionOptions,
|
|
50
|
+
export declare function _addThumbnailFileToCreateOptions(createOptions: ICreateSolutionOptions, srcAuthentication: UserSession): Promise<ICreateSolutionOptions>;
|
|
50
51
|
/**
|
|
51
52
|
* Creates a solution item using a list of AGO item ids.
|
|
52
53
|
*
|
|
53
54
|
* @param options Customizations for creating the solution
|
|
54
|
-
* @param
|
|
55
|
+
* @param srcAuthentication Credentials for requests to source items
|
|
56
|
+
* @param destAuthentication Credentials for the requests to destination solution
|
|
55
57
|
* @return A promise that resolves with the AGO id of the new solution; solution item is deleted if its
|
|
56
58
|
* there is a problem updating it
|
|
57
59
|
* @internal
|
|
58
60
|
*/
|
|
59
|
-
export declare function _createSolutionFromItemIds(options: ICreateSolutionOptions,
|
|
61
|
+
export declare function _createSolutionFromItemIds(options: ICreateSolutionOptions, srcAuthentication: UserSession, destAuthentication: UserSession): Promise<string>;
|
|
60
62
|
/**
|
|
61
63
|
* Creates an empty solution item.
|
|
62
64
|
*
|
|
@@ -79,7 +81,7 @@ export declare function _createSolutionItemModel(options: any): IModel;
|
|
|
79
81
|
* Gets the deploy.id and deploy.version tag values.
|
|
80
82
|
*
|
|
81
83
|
* @param tags A list of item tags
|
|
82
|
-
* @return A list
|
|
84
|
+
* @return A list containing the two values found in the tags, or defaulting to a new GUID and "1.0", respectively,
|
|
83
85
|
* as needed
|
|
84
86
|
* @internal
|
|
85
87
|
*/
|