@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.
@@ -1,7 +1,7 @@
1
1
  /* @preserve
2
- * @esri/solution-creator - v1.3.10 - Apache-2.0
2
+ * @esri/solution-creator - v1.3.13 - Apache-2.0
3
3
  * Copyright (c) 2018-2022 Esri, Inc.
4
- * Tue Mar 29 2022 11:39:36 GMT-0700 (Pacific Daylight Time)
4
+ * Tue Apr 26 2022 15:05:56 GMT-0700 (Pacific Daylight Time)
5
5
  *
6
6
  * Licensed under the Apache License, Version 2.0 (the "License");
7
7
  * you may not use this file except in compliance with the License.
@@ -251,8 +251,8 @@
251
251
  * @param srcAuthentication Credentials for requests to source items
252
252
  * @param destAuthentication Authentication for requesting information from AGO about items to be included in solution item
253
253
  * @param existingTemplates A collection of AGO item templates that can be referenced by newly-created templates
254
- * @return A promise which resolves with an array of resources for the item and its dependencies
255
- * @protected
254
+ * @returns A promise which resolves with an array of resources for the item and its dependencies
255
+ * @private
256
256
  */
257
257
  function createItemTemplate(solutionItemId, itemId, templateDictionary, srcAuthentication, destAuthentication, existingTemplates, itemProgressCallback) {
258
258
  return new Promise(resolve => {
@@ -393,7 +393,7 @@
393
393
  * Currently only handles web applications
394
394
  *
395
395
  * @param templates List of solution templates
396
- * @return A list of templates that have templatized field references
396
+ * @returns A list of templates that have templatized field references
397
397
  */
398
398
  function postProcessFieldReferences(templates) {
399
399
  const datasourceInfos = _getDatasourceInfos(templates);
@@ -427,7 +427,8 @@
427
427
  * Get common properties that will support the templatization of field references
428
428
  *
429
429
  * @param templates List of solution templates
430
- * @return A list of IDataSourceInfo objects with key properties
430
+ * @returns A list of IDataSourceInfo objects with key properties
431
+ * @private
431
432
  */
432
433
  function _getDatasourceInfos(templates) {
433
434
  const datasourceInfos = [];
@@ -460,7 +461,8 @@
460
461
  * and associated web map layer ids based on itemId
461
462
  *
462
463
  * @param templates List of solution templates
463
- * @return The lookup object with type, dependencies, and webmap layer info
464
+ * @returns The lookup object with type, dependencies, and webmap layer info
465
+ * @private
464
466
  */
465
467
  function _getTemplateTypeHash(templates) {
466
468
  const templateTypeHash = {};
@@ -480,7 +482,8 @@
480
482
  * so we can know the id used within a map for a given feature service
481
483
  *
482
484
  * @param template A webmap solution template
483
- * @return The lookup object with webmap layer info added
485
+ * @returns The lookup object with webmap layer info added
486
+ * @private
484
487
  */
485
488
  function _updateWebMapHashInfo(template, hashItem) {
486
489
  const operationalLayers = hubCommon.getProp(template, "data.operationalLayers") || [];
@@ -511,7 +514,8 @@
511
514
  *
512
515
  * @param dataSourceUrl Templatized datasource URL
513
516
  * @param layerId Layer id
514
- * @return string Amended datasource URL
517
+ * @returns string Amended datasource URL
518
+ * @private
515
519
  */
516
520
  function _addLayerIdToDatasourceUrl(datasourceUrl, layerId) {
517
521
  return datasourceUrl && !isNaN(layerId)
@@ -524,7 +528,8 @@
524
528
  *
525
529
  * @param datasourceInfos A webmap solution template
526
530
  * @param templateTypeHash A simple lookup object populated with key item info
527
- * @return The updated datasource infos
531
+ * @returns The updated datasource infos
532
+ * @private
528
533
  */
529
534
  function _addMapLayerIds(datasourceInfos, templateTypeHash) {
530
535
  const webMapIds = Object.keys(templateTypeHash).filter(k => {
@@ -553,7 +558,8 @@
553
558
  *
554
559
  * @param template A webmap solution template
555
560
  * @param templateTypeHash A simple lookup object populated with key item info
556
- * @return A lsit of feature service item IDs
561
+ * @returns A lsit of feature service item IDs
562
+ * @private
557
563
  */
558
564
  function _getWebMapFSDependencies(template, templateTypeHash) {
559
565
  const webMapFSDependencies = [];
@@ -593,7 +599,7 @@
593
599
  * @param options Customizations for creating the solution
594
600
  * @param srcAuthentication Credentials for requests to source items
595
601
  * @param destAuthentication Credentials for the requests to destination solution
596
- * @return A promise that resolves with the AGO id of the updated solution
602
+ * @returns A promise that resolves with the AGO id of the updated solution
597
603
  * @internal
598
604
  */
599
605
  function addContentToSolution(solutionItemId, options, srcAuthentication, destAuthentication) {
@@ -724,7 +730,7 @@
724
730
  * Gets the dependencies of an item by merging its dependencies list with item references in template variables.
725
731
  *
726
732
  * @param template Template to examine
727
- * @return List of dependency ids
733
+ * @returns List of dependency ids
728
734
  * @private
729
735
  */
730
736
  function _getDependencies(template) {
@@ -749,7 +755,7 @@
749
755
  * Extracts AGO ids out of template variables.
750
756
  *
751
757
  * @param variables List of template variables to examine
752
- * @return List of AGO ids referenced in `variables`
758
+ * @returns List of AGO ids referenced in `variables`
753
759
  * @private
754
760
  */
755
761
  function _getIdsOutOfTemplateVariables(variables) {
@@ -769,7 +775,7 @@
769
775
  * Creates a list of item URLs.
770
776
  *
771
777
  * @param templates Templates to check for URLs
772
- * @return List of URLs
778
+ * @returns List of URLs
773
779
  * @private
774
780
  */
775
781
  function _getSolutionItemUrls(templates) {
@@ -786,7 +792,7 @@
786
792
  * Extracts template variables out of a string.
787
793
  *
788
794
  * @param text String to examine
789
- * @return List of template variables found in string
795
+ * @returns List of template variables found in string
790
796
  * @private
791
797
  */
792
798
  function _getTemplateVariables(text) {
@@ -797,7 +803,7 @@
797
803
  * Update the items dependencies and groups arrays
798
804
  *
799
805
  * @param templates The array of templates to evaluate
800
- * @return Updated version of the templates
806
+ * @returns Updated version of the templates
801
807
  * @private
802
808
  */
803
809
  function _postProcessGroupDependencies(templates) {
@@ -840,7 +846,7 @@
840
846
  * Clean up any references to items with invalid designations in the other templates.
841
847
  *
842
848
  * @param templates The array of templates to evaluate
843
- * @return Updated version of the templates
849
+ * @returns Updated version of the templates
844
850
  * @private
845
851
  */
846
852
  function _postProcessIgnoredItems(templates) {
@@ -912,7 +918,7 @@
912
918
  *
913
919
  * @param ids Ids to be replaced in source string
914
920
  * @param str Source string to be examined
915
- * @return A copy of the source string with any templatization changes
921
+ * @returns A copy of the source string with any templatization changes
916
922
  * @private
917
923
  */
918
924
  function _replaceRemainingIdsInString(ids, str) {
@@ -964,7 +970,7 @@
964
970
  *
965
971
  * @param templates The array of templates to evaluate; templates is modified in place
966
972
  * @param destAuthentication Credentials for request organization info
967
- * @return Promise resolving with `templates`
973
+ * @returns Promise resolving with `templates`
968
974
  * @private
969
975
  */
970
976
  function _templatizeOrgUrl(templates, destAuthentication) {
@@ -1028,7 +1034,7 @@
1028
1034
  * @param srcAuthentication Credentials for requests to source items
1029
1035
  * @param destAuthentication Credentials for the requests to destination solution
1030
1036
  * @param options Customizations for creating the solution
1031
- * @return A promise that resolves with the AGO id of the new solution
1037
+ * @returns A promise that resolves with the AGO id of the new solution
1032
1038
  */
1033
1039
  function createSolution(sourceId, srcAuthentication, destAuthentication, options) {
1034
1040
  const createOptions = options || {};
@@ -1103,7 +1109,7 @@
1103
1109
  * @param sourceInfo
1104
1110
  * @param authentication
1105
1111
  * @param isGroup Boolean to indicate if the files are associated with a group or item
1106
- * @internal
1112
+ * @private
1107
1113
  */
1108
1114
  function _applySourceToCreateOptions(createOptions, sourceInfo, srcAuthentication, isGroup = false) {
1109
1115
  // Create a solution from the group's or item's contents,
@@ -1123,7 +1129,7 @@
1123
1129
  *
1124
1130
  * @param createOptions
1125
1131
  * @param srcAuthentication
1126
- * @internal
1132
+ * @private
1127
1133
  */
1128
1134
  function _addThumbnailFileToCreateOptions(createOptions, srcAuthentication) {
1129
1135
  return new Promise(resolve => {
@@ -1151,9 +1157,9 @@
1151
1157
  * @param options Customizations for creating the solution
1152
1158
  * @param srcAuthentication Credentials for requests to source items
1153
1159
  * @param destAuthentication Credentials for the requests to destination solution
1154
- * @return A promise that resolves with the AGO id of the new solution; solution item is deleted if its
1160
+ * @returns A promise that resolves with the AGO id of the new solution; solution item is deleted if its
1155
1161
  * there is a problem updating it
1156
- * @internal
1162
+ * @private
1157
1163
  */
1158
1164
  function _createSolutionFromItemIds(options, srcAuthentication, destAuthentication) {
1159
1165
  let solutionId = "";
@@ -1182,9 +1188,9 @@
1182
1188
  *
1183
1189
  * @param authentication Credentials for the request
1184
1190
  * @param options Customizations for creating the solution
1185
- * @return A promise that resolves with the AGO id of the new solution; solution item is deleted if its
1191
+ * @returns A promise that resolves with the AGO id of the new solution; solution item is deleted if its
1186
1192
  * there is a problem updating its thumbnail
1187
- * @internal
1193
+ * @private
1188
1194
  */
1189
1195
  function _createSolutionItem(authentication, options) {
1190
1196
  const model = _createSolutionItemModel(options);
@@ -1200,7 +1206,7 @@
1200
1206
  * the Solution Item itself
1201
1207
  *
1202
1208
  * @param options
1203
- * @internal
1209
+ * @private
1204
1210
  */
1205
1211
  function _createSolutionItemModel(options) {
1206
1212
  // Solution uses all supplied tags but for deploy.* tags; that information goes into properties
@@ -1234,9 +1240,9 @@
1234
1240
  * Gets the deploy.id and deploy.version tag values.
1235
1241
  *
1236
1242
  * @param tags A list of item tags
1237
- * @return A list containing the two values found in the tags, or defaulting to a new GUID and "1.0", respectively,
1243
+ * @returns A list containing the two values found in the tags, or defaulting to a new GUID and "1.0", respectively,
1238
1244
  * as needed
1239
- * @internal
1245
+ * @private
1240
1246
  */
1241
1247
  function _getDeploymentProperties(tags) {
1242
1248
  return [
@@ -1251,8 +1257,8 @@
1251
1257
  *
1252
1258
  * @param desiredTagPrefix Tag prefix to look for
1253
1259
  * @param tags A list of item tags
1254
- * @return The extracted value of the first matching tag or null if a tag with the specified prefix is not found
1255
- * @internal
1260
+ * @returns The extracted value of the first matching tag or null if a tag with the specified prefix is not found
1261
+ * @private
1256
1262
  */
1257
1263
  function _getDeploymentProperty(desiredTagPrefix, tags) {
1258
1264
  const foundTagAsList = tags.filter(tag => tag.startsWith(desiredTagPrefix));