@esri/solution-common 3.0.0 → 3.1.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.
- package/dist/esm/featureServiceHelpers.js +20 -2
- package/dist/esm/featureServiceHelpers.js.map +1 -1
- package/dist/esm/resourceHelpers.d.ts +3 -2
- package/dist/esm/resourceHelpers.js +4 -3
- package/dist/esm/resourceHelpers.js.map +1 -1
- package/dist/esm/resources/copyAssociatedFiles.d.ts +17 -2
- package/dist/esm/resources/copyAssociatedFiles.js +106 -42
- package/dist/esm/resources/copyAssociatedFiles.js.map +1 -1
- package/dist/esm/resources/copyResourceIntoZip.js +8 -1
- package/dist/esm/resources/copyResourceIntoZip.js.map +1 -1
- package/dist/esm/resources/getItemResourcesPaths.js +9 -2
- package/dist/esm/resources/getItemResourcesPaths.js.map +1 -1
- package/package.json +3 -3
- package/dist/node/completeItem.d.ts +0 -29
- package/dist/node/completeItem.js +0 -82
- package/dist/node/completeItem.js.map +0 -1
- package/dist/node/create-hub-request-options.d.ts +0 -29
- package/dist/node/create-hub-request-options.js +0 -64
- package/dist/node/create-hub-request-options.js.map +0 -1
- package/dist/node/deleteHelpers/deleteEmptyGroups.d.ts +0 -24
- package/dist/node/deleteHelpers/deleteEmptyGroups.js +0 -42
- package/dist/node/deleteHelpers/deleteEmptyGroups.js.map +0 -1
- package/dist/node/deleteHelpers/deleteGroupIfEmpty.d.ts +0 -27
- package/dist/node/deleteHelpers/deleteGroupIfEmpty.js +0 -97
- package/dist/node/deleteHelpers/deleteGroupIfEmpty.js.map +0 -1
- package/dist/node/deleteHelpers/deleteSolutionContents.d.ts +0 -38
- package/dist/node/deleteHelpers/deleteSolutionContents.js +0 -130
- package/dist/node/deleteHelpers/deleteSolutionContents.js.map +0 -1
- package/dist/node/deleteHelpers/deleteSolutionFolder.d.ts +0 -29
- package/dist/node/deleteHelpers/deleteSolutionFolder.js +0 -79
- package/dist/node/deleteHelpers/deleteSolutionFolder.js.map +0 -1
- package/dist/node/deleteHelpers/deleteSolutionItem.d.ts +0 -30
- package/dist/node/deleteHelpers/deleteSolutionItem.js +0 -54
- package/dist/node/deleteHelpers/deleteSolutionItem.js.map +0 -1
- package/dist/node/deleteHelpers/index.d.ts +0 -22
- package/dist/node/deleteHelpers/index.js +0 -26
- package/dist/node/deleteHelpers/index.js.map +0 -1
- package/dist/node/deleteHelpers/reconstructBuildOrderIds.d.ts +0 -27
- package/dist/node/deleteHelpers/reconstructBuildOrderIds.js +0 -34
- package/dist/node/deleteHelpers/reconstructBuildOrderIds.js.map +0 -1
- package/dist/node/deleteHelpers/removeItems.d.ts +0 -34
- package/dist/node/deleteHelpers/removeItems.js +0 -112
- package/dist/node/deleteHelpers/removeItems.js.map +0 -1
- package/dist/node/deleteHelpers/reportProgress.d.ts +0 -27
- package/dist/node/deleteHelpers/reportProgress.js +0 -46
- package/dist/node/deleteHelpers/reportProgress.js.map +0 -1
- package/dist/node/deleteSolution.d.ts +0 -55
- package/dist/node/deleteSolution.js +0 -107
- package/dist/node/deleteSolution.js.map +0 -1
- package/dist/node/dependencies.d.ts +0 -26
- package/dist/node/dependencies.js +0 -171
- package/dist/node/dependencies.js.map +0 -1
- package/dist/node/featureServiceHelpers.d.ts +0 -791
- package/dist/node/featureServiceHelpers.js +0 -2403
- package/dist/node/featureServiceHelpers.js.map +0 -1
- package/dist/node/generalHelpers.d.ts +0 -372
- package/dist/node/generalHelpers.js +0 -842
- package/dist/node/generalHelpers.js.map +0 -1
- package/dist/node/get-subscription-info.d.ts +0 -27
- package/dist/node/get-subscription-info.js +0 -39
- package/dist/node/get-subscription-info.js.map +0 -1
- package/dist/node/getDeletableSolutionInfo.d.ts +0 -29
- package/dist/node/getDeletableSolutionInfo.js +0 -53
- package/dist/node/getDeletableSolutionInfo.js.map +0 -1
- package/dist/node/getItemTypeAbbrev.d.ts +0 -19
- package/dist/node/getItemTypeAbbrev.js +0 -184
- package/dist/node/getItemTypeAbbrev.js.map +0 -1
- package/dist/node/getSolutionSummary.d.ts +0 -27
- package/dist/node/getSolutionSummary.js +0 -101
- package/dist/node/getSolutionSummary.js.map +0 -1
- package/dist/node/index.d.ts +0 -44
- package/dist/node/index.js +0 -48
- package/dist/node/index.js.map +0 -1
- package/dist/node/interfaces.d.ts +0 -1321
- package/dist/node/interfaces.js +0 -75
- package/dist/node/interfaces.js.map +0 -1
- package/dist/node/libConnectors.d.ts +0 -73
- package/dist/node/libConnectors.js +0 -115
- package/dist/node/libConnectors.js.map +0 -1
- package/dist/node/migrations/apply-schema.d.ts +0 -24
- package/dist/node/migrations/apply-schema.js +0 -36
- package/dist/node/migrations/apply-schema.js.map +0 -1
- package/dist/node/migrations/is-legacy-solution.d.ts +0 -24
- package/dist/node/migrations/is-legacy-solution.js +0 -40
- package/dist/node/migrations/is-legacy-solution.js.map +0 -1
- package/dist/node/migrations/upgrade-three-dot-one.d.ts +0 -27
- package/dist/node/migrations/upgrade-three-dot-one.js +0 -49
- package/dist/node/migrations/upgrade-three-dot-one.js.map +0 -1
- package/dist/node/migrations/upgrade-three-dot-zero.d.ts +0 -27
- package/dist/node/migrations/upgrade-three-dot-zero.js +0 -43
- package/dist/node/migrations/upgrade-three-dot-zero.js.map +0 -1
- package/dist/node/migrations/upgrade-two-dot-five.d.ts +0 -24
- package/dist/node/migrations/upgrade-two-dot-five.js +0 -73
- package/dist/node/migrations/upgrade-two-dot-five.js.map +0 -1
- package/dist/node/migrations/upgrade-two-dot-four.d.ts +0 -24
- package/dist/node/migrations/upgrade-two-dot-four.js +0 -72
- package/dist/node/migrations/upgrade-two-dot-four.js.map +0 -1
- package/dist/node/migrations/upgrade-two-dot-one.d.ts +0 -7
- package/dist/node/migrations/upgrade-two-dot-one.js +0 -39
- package/dist/node/migrations/upgrade-two-dot-one.js.map +0 -1
- package/dist/node/migrations/upgrade-two-dot-seven.d.ts +0 -23
- package/dist/node/migrations/upgrade-two-dot-seven.js +0 -58
- package/dist/node/migrations/upgrade-two-dot-seven.js.map +0 -1
- package/dist/node/migrations/upgrade-two-dot-six.d.ts +0 -27
- package/dist/node/migrations/upgrade-two-dot-six.js +0 -61
- package/dist/node/migrations/upgrade-two-dot-six.js.map +0 -1
- package/dist/node/migrations/upgrade-two-dot-three.d.ts +0 -23
- package/dist/node/migrations/upgrade-two-dot-three.js +0 -55
- package/dist/node/migrations/upgrade-two-dot-three.js.map +0 -1
- package/dist/node/migrations/upgrade-two-dot-two.d.ts +0 -23
- package/dist/node/migrations/upgrade-two-dot-two.js +0 -58
- package/dist/node/migrations/upgrade-two-dot-two.js.map +0 -1
- package/dist/node/migrations/upgrade-two-dot-zero.d.ts +0 -44
- package/dist/node/migrations/upgrade-two-dot-zero.js +0 -95
- package/dist/node/migrations/upgrade-two-dot-zero.js.map +0 -1
- package/dist/node/migrator.d.ts +0 -25
- package/dist/node/migrator.js +0 -77
- package/dist/node/migrator.js.map +0 -1
- package/dist/node/polyfills.d.ts +0 -40
- package/dist/node/polyfills.js +0 -98
- package/dist/node/polyfills.js.map +0 -1
- package/dist/node/resourceHelpers.d.ts +0 -190
- package/dist/node/resourceHelpers.js +0 -390
- package/dist/node/resourceHelpers.js.map +0 -1
- package/dist/node/resources/add-resource-from-blob.d.ts +0 -26
- package/dist/node/resources/add-resource-from-blob.js +0 -52
- package/dist/node/resources/add-resource-from-blob.js.map +0 -1
- package/dist/node/resources/addMetadataFromBlob.d.ts +0 -25
- package/dist/node/resources/addMetadataFromBlob.js +0 -43
- package/dist/node/resources/addMetadataFromBlob.js.map +0 -1
- package/dist/node/resources/convert-item-resource-to-storage-resource.d.ts +0 -32
- package/dist/node/resources/convert-item-resource-to-storage-resource.js +0 -70
- package/dist/node/resources/convert-item-resource-to-storage-resource.js.map +0 -1
- package/dist/node/resources/convert-storage-resource-to-item-resource.d.ts +0 -29
- package/dist/node/resources/convert-storage-resource-to-item-resource.js +0 -70
- package/dist/node/resources/convert-storage-resource-to-item-resource.js.map +0 -1
- package/dist/node/resources/copyAssociatedFiles.d.ts +0 -52
- package/dist/node/resources/copyAssociatedFiles.js +0 -237
- package/dist/node/resources/copyAssociatedFiles.js.map +0 -1
- package/dist/node/resources/copyDataIntoItem.d.ts +0 -33
- package/dist/node/resources/copyDataIntoItem.js +0 -63
- package/dist/node/resources/copyDataIntoItem.js.map +0 -1
- package/dist/node/resources/copyMetadataIntoItem.d.ts +0 -26
- package/dist/node/resources/copyMetadataIntoItem.js +0 -46
- package/dist/node/resources/copyMetadataIntoItem.js.map +0 -1
- package/dist/node/resources/copyResourceIntoZip.d.ts +0 -33
- package/dist/node/resources/copyResourceIntoZip.js +0 -71
- package/dist/node/resources/copyResourceIntoZip.js.map +0 -1
- package/dist/node/resources/copyZipIntoItem.d.ts +0 -25
- package/dist/node/resources/copyZipIntoItem.js +0 -54
- package/dist/node/resources/copyZipIntoItem.js.map +0 -1
- package/dist/node/resources/createCopyResults.d.ts +0 -25
- package/dist/node/resources/createCopyResults.js +0 -36
- package/dist/node/resources/createCopyResults.js.map +0 -1
- package/dist/node/resources/get-blob.d.ts +0 -26
- package/dist/node/resources/get-blob.js +0 -27
- package/dist/node/resources/get-blob.js.map +0 -1
- package/dist/node/resources/getItemResourcesFilesFromPaths.d.ts +0 -24
- package/dist/node/resources/getItemResourcesFilesFromPaths.js +0 -49
- package/dist/node/resources/getItemResourcesFilesFromPaths.js.map +0 -1
- package/dist/node/resources/getItemResourcesPaths.d.ts +0 -26
- package/dist/node/resources/getItemResourcesPaths.js +0 -66
- package/dist/node/resources/getItemResourcesPaths.js.map +0 -1
- package/dist/node/resources/index.d.ts +0 -29
- package/dist/node/resources/index.js +0 -33
- package/dist/node/resources/index.js.map +0 -1
- package/dist/node/resources/solution-resource.d.ts +0 -35
- package/dist/node/resources/solution-resource.js +0 -31
- package/dist/node/resources/solution-resource.js.map +0 -1
- package/dist/node/resources/transform-resource-paths-to-solution-resources.d.ts +0 -56
- package/dist/node/resources/transform-resource-paths-to-solution-resources.js +0 -146
- package/dist/node/resources/transform-resource-paths-to-solution-resources.js.map +0 -1
- package/dist/node/restHelpers.d.ts +0 -585
- package/dist/node/restHelpers.js +0 -1887
- package/dist/node/restHelpers.js.map +0 -1
- package/dist/node/restHelpersGet.d.ts +0 -288
- package/dist/node/restHelpersGet.js +0 -804
- package/dist/node/restHelpersGet.js.map +0 -1
- package/dist/node/sharing/index.d.ts +0 -16
- package/dist/node/sharing/index.js +0 -20
- package/dist/node/sharing/index.js.map +0 -1
- package/dist/node/sharing/share-item-to-groups.d.ts +0 -26
- package/dist/node/sharing/share-item-to-groups.js +0 -44
- package/dist/node/sharing/share-item-to-groups.js.map +0 -1
- package/dist/node/templatization.d.ts +0 -139
- package/dist/node/templatization.js +0 -314
- package/dist/node/templatization.js.map +0 -1
- package/dist/node/trackingHelpers.d.ts +0 -116
- package/dist/node/trackingHelpers.js +0 -217
- package/dist/node/trackingHelpers.js.map +0 -1
- package/dist/node/velocityHelpers.d.ts +0 -57
- package/dist/node/velocityHelpers.js +0 -135
- package/dist/node/velocityHelpers.js.map +0 -1
- package/dist/node/workforceHelpers.d.ts +0 -115
- package/dist/node/workforceHelpers.js +0 -747
- package/dist/node/workforceHelpers.js.map +0 -1
- package/dist/umd/common.umd.js +0 -15471
- package/dist/umd/common.umd.js.map +0 -1
- package/dist/umd/common.umd.min.js +0 -19
- package/dist/umd/common.umd.min.js.map +0 -1
- package/dist/umd/src/completeItem.d.ts +0 -29
- package/dist/umd/src/create-hub-request-options.d.ts +0 -29
- package/dist/umd/src/deleteHelpers/deleteEmptyGroups.d.ts +0 -24
- package/dist/umd/src/deleteHelpers/deleteGroupIfEmpty.d.ts +0 -27
- package/dist/umd/src/deleteHelpers/deleteSolutionContents.d.ts +0 -38
- package/dist/umd/src/deleteHelpers/deleteSolutionFolder.d.ts +0 -29
- package/dist/umd/src/deleteHelpers/deleteSolutionItem.d.ts +0 -30
- package/dist/umd/src/deleteHelpers/index.d.ts +0 -22
- package/dist/umd/src/deleteHelpers/reconstructBuildOrderIds.d.ts +0 -27
- package/dist/umd/src/deleteHelpers/removeItems.d.ts +0 -34
- package/dist/umd/src/deleteHelpers/reportProgress.d.ts +0 -27
- package/dist/umd/src/deleteSolution.d.ts +0 -55
- package/dist/umd/src/dependencies.d.ts +0 -26
- package/dist/umd/src/featureServiceHelpers.d.ts +0 -791
- package/dist/umd/src/generalHelpers.d.ts +0 -372
- package/dist/umd/src/get-subscription-info.d.ts +0 -27
- package/dist/umd/src/getDeletableSolutionInfo.d.ts +0 -29
- package/dist/umd/src/getItemTypeAbbrev.d.ts +0 -19
- package/dist/umd/src/getSolutionSummary.d.ts +0 -27
- package/dist/umd/src/index.d.ts +0 -44
- package/dist/umd/src/interfaces.d.ts +0 -1321
- package/dist/umd/src/libConnectors.d.ts +0 -73
- package/dist/umd/src/migrations/apply-schema.d.ts +0 -24
- package/dist/umd/src/migrations/is-legacy-solution.d.ts +0 -24
- package/dist/umd/src/migrations/upgrade-three-dot-one.d.ts +0 -27
- package/dist/umd/src/migrations/upgrade-three-dot-zero.d.ts +0 -27
- package/dist/umd/src/migrations/upgrade-two-dot-five.d.ts +0 -24
- package/dist/umd/src/migrations/upgrade-two-dot-four.d.ts +0 -24
- package/dist/umd/src/migrations/upgrade-two-dot-one.d.ts +0 -7
- package/dist/umd/src/migrations/upgrade-two-dot-seven.d.ts +0 -23
- package/dist/umd/src/migrations/upgrade-two-dot-six.d.ts +0 -27
- package/dist/umd/src/migrations/upgrade-two-dot-three.d.ts +0 -23
- package/dist/umd/src/migrations/upgrade-two-dot-two.d.ts +0 -23
- package/dist/umd/src/migrations/upgrade-two-dot-zero.d.ts +0 -44
- package/dist/umd/src/migrator.d.ts +0 -25
- package/dist/umd/src/polyfills.d.ts +0 -40
- package/dist/umd/src/resourceHelpers.d.ts +0 -190
- package/dist/umd/src/resources/add-resource-from-blob.d.ts +0 -26
- package/dist/umd/src/resources/addMetadataFromBlob.d.ts +0 -25
- package/dist/umd/src/resources/convert-item-resource-to-storage-resource.d.ts +0 -32
- package/dist/umd/src/resources/convert-storage-resource-to-item-resource.d.ts +0 -29
- package/dist/umd/src/resources/copyAssociatedFiles.d.ts +0 -52
- package/dist/umd/src/resources/copyDataIntoItem.d.ts +0 -33
- package/dist/umd/src/resources/copyMetadataIntoItem.d.ts +0 -26
- package/dist/umd/src/resources/copyResourceIntoZip.d.ts +0 -33
- package/dist/umd/src/resources/copyZipIntoItem.d.ts +0 -25
- package/dist/umd/src/resources/createCopyResults.d.ts +0 -25
- package/dist/umd/src/resources/get-blob.d.ts +0 -26
- package/dist/umd/src/resources/getItemResourcesFilesFromPaths.d.ts +0 -24
- package/dist/umd/src/resources/getItemResourcesPaths.d.ts +0 -26
- package/dist/umd/src/resources/index.d.ts +0 -29
- package/dist/umd/src/resources/solution-resource.d.ts +0 -35
- package/dist/umd/src/resources/transform-resource-paths-to-solution-resources.d.ts +0 -56
- package/dist/umd/src/restHelpers.d.ts +0 -585
- package/dist/umd/src/restHelpersGet.d.ts +0 -288
- package/dist/umd/src/sharing/index.d.ts +0 -16
- package/dist/umd/src/sharing/share-item-to-groups.d.ts +0 -26
- package/dist/umd/src/templatization.d.ts +0 -139
- package/dist/umd/src/trackingHelpers.d.ts +0 -116
- package/dist/umd/src/velocityHelpers.d.ts +0 -57
- package/dist/umd/src/workforceHelpers.d.ts +0 -115
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copyAssociatedFiles.js","sourceRoot":"","sources":["../../../src/resources/copyAssociatedFiles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;GAEG;AAEH,OAAO,EACL,SAAS,
|
|
1
|
+
{"version":3,"file":"copyAssociatedFiles.js","sourceRoot":"","sources":["../../../src/resources/copyAssociatedFiles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;GAEG;AAEH,OAAO,EACL,SAAS,EAQV,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,M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+46,14 @@ export function copyResourceIntoZip(file, zipInfo) {
|
|
|
46
46
|
*/
|
|
47
47
|
export function copyResourceIntoZipFromInfo(fileInfo, sourceAuthentication, zipInfo) {
|
|
48
48
|
return new Promise(resolve => {
|
|
49
|
-
|
|
49
|
+
let filePromise;
|
|
50
|
+
if (fileInfo.file) {
|
|
51
|
+
filePromise = Promise.resolve(fileInfo.file);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
filePromise = getBlobAsFile(fileInfo.url, fileInfo.filename, sourceAuthentication);
|
|
55
|
+
}
|
|
56
|
+
filePromise.then((file) => {
|
|
50
57
|
// And add it to the zip
|
|
51
58
|
if (fileInfo.folder) {
|
|
52
59
|
zipInfo.zip
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copyResourceIntoZip.js","sourceRoot":"","sources":["../../../src/resources/copyResourceIntoZip.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AASH,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,wHAAwH;AAExH;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CACjC,IAAiB,EACjB,OAAiB;IAEjB,oBAAoB;IACpB,IAAI,IAAI,CAAC,MAAM,EAAE;QACf,OAAO,CAAC,GAAG;aACR,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;aACnB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;KACrD;SAAM;QACL,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;KAC9D;IACD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5B,OAAO,iBA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AC,EAAE;QACvD,IAAI,WAAyB,CAAC;QAC9B,IAAI,QAAQ,CAAC,IAAI,EAAE;YACjB,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;SAC9C;aAAM;YACL,WAAW,GAAG,aAAa,CAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,QAAQ,EAAE,oBAAoB,CAAC,CAAC;SACpF;QAED,WAAW,CAAC,IAAI,CACd,CAAC,IAAS,EAAE,EAAE;YACZ,wBAAwB;YACxB,IAAI,QAAQ,CAAC,MAAM,EAAE;gBACnB,OAAO,CAAC,GAAG;qBACR,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;qBACvB,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;aACpD;iBAAM;gBACL,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;aAC7D;YACD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAChC,OAAO,CACL,iBAAiB,CAAC,QAAQ,EAAE,IAAI,CAA+B,CAChE,CAAC;QACJ,CAAC,EACD,GAAG,EAAE,CACH,OAAO;QACL,yBAAyB;QACzB,iBAAiB,CAAC,QAAQ,EAAE,KAAK,CAA+B,CACjE,CACJ,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -34,10 +34,17 @@ export function getItemResourcesPaths(itemTemplate, solutionItemId, authenticati
|
|
|
34
34
|
.map((r) => r.resource)
|
|
35
35
|
.filter((res) => {
|
|
36
36
|
let result = true;
|
|
37
|
-
//
|
|
37
|
+
// Certain types have resources that must be interpolated or removed and can not be
|
|
38
38
|
// directly copied, so they must be filtered out. Sub-optimal as it spreads
|
|
39
39
|
// type specific logic around the app, but until we refactor how resources
|
|
40
40
|
// are handled, this is necessary
|
|
41
|
+
// Hub Sites
|
|
42
|
+
if (itemTemplate.type === "Hub Site Application") {
|
|
43
|
+
if (res.match(/^draft-(\d+).json$/)) {
|
|
44
|
+
result = false;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
// Storymaps
|
|
41
48
|
if (itemTemplate.type === "StoryMap") {
|
|
42
49
|
if (["oembed.json", "oembed.xml"].indexOf(res) !== -1) {
|
|
43
50
|
result = false;
|
|
@@ -46,7 +53,7 @@ export function getItemResourcesPaths(itemTemplate, solutionItemId, authenticati
|
|
|
46
53
|
result = false;
|
|
47
54
|
}
|
|
48
55
|
}
|
|
49
|
-
// Web
|
|
56
|
+
// Web Experiences
|
|
50
57
|
if (itemTemplate.type === "Web Experience") {
|
|
51
58
|
if (res === "config/config.json") {
|
|
52
59
|
result = false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getItemResourcesPaths.js","sourceRoot":"","sources":["../../../src/resources/getItemResourcesPaths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAG7D,wHAAwH;AAExH;;;;;;;;GAQG;AACH,MAAM,UAAU,qBAAqB,CACnC,YAA2B,EAC3B,cAAsB,EACtB,cAA2B,EAC3B,cAAc,GAAG,CAAC;IAElB,iCAAiC;IACjC,OAAO,gBAAgB,CAAC,YAAY,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,IAAI,CAC/D,gBAAgB,CAAC,EAAE;QACjB,sDAAsD;QACtD,sCAAsC;QACtC,MAAM,aAAa,GAAG,gBAAgB,CAAC,SAAS;aAC7C,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;aAC3B,MAAM,CAAC,CAAC,GAAQ,EAAE,EAAE;YACnB,IA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,KAAK,CAAC;iBAChB;aACF;YAED,kBAAkB;YAClB,IAAI,YAAY,CAAC,IAAI,KAAK,gBAAgB,EAAE;gBAC1C,IAAI,GAAG,KAAK,oBAAoB,EAAE;oBAChC,MAAM,GAAG,KAAK,CAAC;iBAChB;aACF;YAED,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC,CAAC;QACL,uBAAuB;QACvB,MAAM,qBAAqB,GAA0B,uBAAuB,CAC1E,cAAc,CAAC,MAAM,EACrB,YAAY,CAAC,MAAM,EACnB,YAAY,CAAC,IAAI,CAAC,SAAS,EAC3B,aAAa,EACb,YAAY,CAAC,IAAI,KAAK,OAAO,EAC7B,cAAc,CACf,CAAC;QACF,OAAO,OAAO,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAChD,CAAC,CACF,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@esri/solution-common",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "Provides general helper functions for @esri/solution.js.",
|
|
5
5
|
"main": "dist/node/index.js",
|
|
6
6
|
"unpkg": "dist/umd/common.umd.min.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@esri/arcgis-html-sanitizer": "3.0.1",
|
|
33
|
-
"@esri/hub-common": "^12.
|
|
33
|
+
"@esri/hub-common": "^12.37.1",
|
|
34
34
|
"@esri/hub-initiatives": "^12.4.1",
|
|
35
35
|
"@esri/hub-sites": "^12.6.0",
|
|
36
36
|
"@esri/hub-teams": "^12.4.1",
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"esri",
|
|
88
88
|
"ES6"
|
|
89
89
|
],
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "d7bddb4b7c7b98ef00eac060c639a22d0654a03f"
|
|
91
91
|
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/** @license
|
|
2
|
-
* Copyright 2021 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
|
-
* Provides functions for accessing a complete item.
|
|
18
|
-
*
|
|
19
|
-
* @module completeItem
|
|
20
|
-
*/
|
|
21
|
-
import { ICompleteItem, UserSession } from "./interfaces";
|
|
22
|
-
/**
|
|
23
|
-
* Gets everything about an item.
|
|
24
|
-
*
|
|
25
|
-
* @param itemId Id of an item whose information is sought
|
|
26
|
-
* @param authentication Credentials for the request
|
|
27
|
-
* @returns Promise that will resolve with everything known about the item
|
|
28
|
-
*/
|
|
29
|
-
export declare function getCompleteItem(itemId: string, authentication: UserSession): Promise<ICompleteItem>;
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/** @license
|
|
3
|
-
* Copyright 2021 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.getCompleteItem = void 0;
|
|
19
|
-
const tslib_1 = require("tslib");
|
|
20
|
-
const restHelpers = tslib_1.__importStar(require("./restHelpers"));
|
|
21
|
-
const restHelpersGet = tslib_1.__importStar(require("./restHelpersGet"));
|
|
22
|
-
// ------------------------------------------------------------------------------------------------------------------ //
|
|
23
|
-
/**
|
|
24
|
-
* Gets everything about an item.
|
|
25
|
-
*
|
|
26
|
-
* @param itemId Id of an item whose information is sought
|
|
27
|
-
* @param authentication Credentials for the request
|
|
28
|
-
* @returns Promise that will resolve with everything known about the item
|
|
29
|
-
*/
|
|
30
|
-
function getCompleteItem(itemId, authentication) {
|
|
31
|
-
let itemBase;
|
|
32
|
-
let completeItem;
|
|
33
|
-
return restHelpersGet
|
|
34
|
-
.getItemBase(itemId, authentication)
|
|
35
|
-
.then((response) => {
|
|
36
|
-
itemBase = response;
|
|
37
|
-
return Promise.all([
|
|
38
|
-
restHelpersGet.getItemDataAsFile(itemId, itemBase.name, authentication),
|
|
39
|
-
restHelpersGet.getItemThumbnailAsFile(itemId, itemBase.thumbnail, false, authentication),
|
|
40
|
-
restHelpersGet.getItemMetadataAsFile(itemId, authentication),
|
|
41
|
-
restHelpersGet.getItemResourcesFiles(itemId, authentication),
|
|
42
|
-
restHelpersGet.getItemRelatedItemsInSameDirection(itemId, "forward", authentication),
|
|
43
|
-
restHelpersGet.getItemRelatedItemsInSameDirection(itemId, "reverse", authentication)
|
|
44
|
-
]);
|
|
45
|
-
})
|
|
46
|
-
.then(responses => {
|
|
47
|
-
const [itemData, itemThumbnail, itemMetadata, itemResources, itemFwdRelatedItems, itemRevRelatedItems] = responses;
|
|
48
|
-
// Summarize what we have
|
|
49
|
-
// ----------------------
|
|
50
|
-
// (itemBase: IItem) text/plain JSON
|
|
51
|
-
// (itemData: File) */*
|
|
52
|
-
// (itemThumbnail: File) image/*
|
|
53
|
-
// (itemMetadata: File) application/xml
|
|
54
|
-
// (itemResources: File[]) list of */*
|
|
55
|
-
// (itemFwdRelatedItems: IRelatedItems[]) list of forward relationshipType/relatedItems[] pairs
|
|
56
|
-
// (itemRevRelatedItems: IRelatedItems[]) list of reverse relationshipType/relatedItems[] pairs
|
|
57
|
-
completeItem = {
|
|
58
|
-
base: itemBase,
|
|
59
|
-
data: itemData,
|
|
60
|
-
thumbnail: itemThumbnail,
|
|
61
|
-
metadata: itemMetadata,
|
|
62
|
-
resources: itemResources,
|
|
63
|
-
fwdRelatedItems: itemFwdRelatedItems,
|
|
64
|
-
revRelatedItems: itemRevRelatedItems
|
|
65
|
-
};
|
|
66
|
-
if (itemBase.type === "Feature Service") {
|
|
67
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
68
|
-
return restHelpers.getFeatureServiceProperties(itemBase.url, authentication);
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
return Promise.resolve(null);
|
|
72
|
-
}
|
|
73
|
-
})
|
|
74
|
-
.then((properties) => {
|
|
75
|
-
if (properties) {
|
|
76
|
-
completeItem.featureServiceProperties = properties;
|
|
77
|
-
}
|
|
78
|
-
return Promise.resolve(completeItem);
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
exports.getCompleteItem = getCompleteItem;
|
|
82
|
-
//# sourceMappingURL=completeItem.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"completeItem.js","sourceRoot":"","sources":["../../src/completeItem.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;AAaH,mEAA6C;AAC7C,yEAAmD;AAEnD,wHAAwH;AAExH;;;;;;GAMG;AACH,SAAgB,eAAe,CAC7B,MAAc,EACd,cAA2B;IAE3B,IAAI,QAAa,CAAC;IAClB,IAAI,YAAiB,CAAC;IAEtB,OAAO,cAAc;SAClB,WAAW,CAAC,MAAM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AO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;SAC9B;IACH,CAAC,CAAC;SACD,IAAI,CAAC,CAAC,UAAqC,EAAE,EAAE;QAC9C,IAAI,UAAU,EAAE;YACd,YAAY,CAAC,wBAAwB,GAAG,UAAU,CAAC;SACpD;QACD,OAAO,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;AACP,CAAC;AA9ED,0CA8EC"}
|
|
@@ -1,29 +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 { UserSession } from "./interfaces";
|
|
17
|
-
import { IHubUserRequestOptions } from "@esri/hub-common";
|
|
18
|
-
/**
|
|
19
|
-
* Create a IHubUserRequestOptions object from
|
|
20
|
-
* the UserSession
|
|
21
|
-
* If passed, it will use `templateDictionary`
|
|
22
|
-
* values instead of making additional requests
|
|
23
|
-
*
|
|
24
|
-
* @export
|
|
25
|
-
* @param {UserSession} authentication
|
|
26
|
-
* @param {*} templateDictionary
|
|
27
|
-
* @returns {IHubUserRequestOptions}
|
|
28
|
-
*/
|
|
29
|
-
export declare function createHubRequestOptions(authentication: UserSession, templateDictionary?: any): Promise<IHubUserRequestOptions>;
|
|
@@ -1,64 +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.createHubRequestOptions = void 0;
|
|
19
|
-
const hub_common_1 = require("@esri/hub-common");
|
|
20
|
-
const arcgis_rest_portal_1 = require("@esri/arcgis-rest-portal");
|
|
21
|
-
/**
|
|
22
|
-
* Create a IHubUserRequestOptions object from
|
|
23
|
-
* the UserSession
|
|
24
|
-
* If passed, it will use `templateDictionary`
|
|
25
|
-
* values instead of making additional requests
|
|
26
|
-
*
|
|
27
|
-
* @export
|
|
28
|
-
* @param {UserSession} authentication
|
|
29
|
-
* @param {*} templateDictionary
|
|
30
|
-
* @returns {IHubUserRequestOptions}
|
|
31
|
-
*/
|
|
32
|
-
function createHubRequestOptions(authentication, templateDictionary = {}) {
|
|
33
|
-
// We used to pull the user
|
|
34
|
-
// the template dictionary, but ran into issues
|
|
35
|
-
// with the user.groups being filtered to groups
|
|
36
|
-
// the user owns, vs all groups the user belongs to
|
|
37
|
-
// this was problematic as we need to check if the user
|
|
38
|
-
// can add more groups, based on how close they are to
|
|
39
|
-
// the max 512 group limit.
|
|
40
|
-
// At this time we are simply fetching the user directly
|
|
41
|
-
const promises = [];
|
|
42
|
-
if (templateDictionary.organization) {
|
|
43
|
-
promises.push(Promise.resolve(templateDictionary.organization));
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
promises.push((0, arcgis_rest_portal_1.getSelf)({ authentication }));
|
|
47
|
-
}
|
|
48
|
-
// always get the user
|
|
49
|
-
promises.push((0, arcgis_rest_portal_1.getUser)({ authentication }));
|
|
50
|
-
return Promise.all(promises).then(([pSelf, user]) => {
|
|
51
|
-
pSelf.user = user;
|
|
52
|
-
const ro = {
|
|
53
|
-
authentication,
|
|
54
|
-
portalSelf: pSelf,
|
|
55
|
-
isPortal: pSelf.isPortal
|
|
56
|
-
};
|
|
57
|
-
if (!pSelf.isPortal) {
|
|
58
|
-
ro.hubApiUrl = (0, hub_common_1.getHubUrlFromPortal)(pSelf);
|
|
59
|
-
}
|
|
60
|
-
return ro;
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
exports.createHubRequestOptions = createHubRequestOptions;
|
|
64
|
-
//# sourceMappingURL=create-hub-request-options.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-hub-request-options.js","sourceRoot":"","sources":["../../src/create-hub-request-options.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAIH,iDAA+E;AAE/E,iEAA4D;AAE5D;;;;;;;;;;GAUG;AACH,SAAgB,uBAAuB,CACrC,cAA2B,EAC3B,qBAA0B,EAAE;IAE5B,2BAA2B;IAC3B,+CAA+C;IAC/C,gDAAgD;IAChD,mDAAmD;IACnD,uDAAuD;IACvD,sDAAsD;IACtD,2BAA2B;IAE3B,wDAAwD;IACxD,MAAM,QAAQ,GAAG,EAAE,CAAC;IACpB,IAAI,kBAAkB,CAAC,YAAY,EAAE;QACnC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC,CAAC;KACjE;SAAM;QACL,QAAQ,CAAC,IAAI,CAAC,IAAA,4BAAO,EAAC,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC;KAC5C;IACD,sBAAsB;IACtB,QAAQ,CAAC,IAAI,CAAC,IAAA,4BAAO,EAAC,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC;IAE3C,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE;QAClD,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;QAClB,MAAM,EAAE,GAAG;YACT,cAAc;YACd,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK,CAAC,QAAQ;SACC,CAAC;QAE5B,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;YACnB,EAAE,CAAC,SAAS,GAAG,IAAA,gCAAmB,EAAC,KAAK,CAAC,CAAC;SAC3C;QAED,OAAO,EAAE,CAAC;IACZ,CAAC,CAAC,CAAC;AACL,CAAC;AApCD,0DAoCC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/** @license
|
|
2
|
-
* Copyright 2021 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 { UserSession } from "../interfaces";
|
|
17
|
-
/**
|
|
18
|
-
* Deletes a set of empty groups if they're empty and belong to the user in the authentication.
|
|
19
|
-
*
|
|
20
|
-
* @param groups Ids of the groups to be deleted
|
|
21
|
-
* @param authentication Credentials for the request
|
|
22
|
-
* @returns Promise that will resolve with the list of successfully deleted groups
|
|
23
|
-
*/
|
|
24
|
-
export declare function deleteEmptyGroups(groups: string[], authentication: UserSession): Promise<string[]>;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/** @license
|
|
3
|
-
* Copyright 2021 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.deleteEmptyGroups = void 0;
|
|
19
|
-
/**
|
|
20
|
-
* @module deleteEmptyGroups
|
|
21
|
-
*/
|
|
22
|
-
const deleteGroupIfEmpty_1 = require("./deleteGroupIfEmpty");
|
|
23
|
-
// ------------------------------------------------------------------------------------------------------------------ //
|
|
24
|
-
/**
|
|
25
|
-
* Deletes a set of empty groups if they're empty and belong to the user in the authentication.
|
|
26
|
-
*
|
|
27
|
-
* @param groups Ids of the groups to be deleted
|
|
28
|
-
* @param authentication Credentials for the request
|
|
29
|
-
* @returns Promise that will resolve with the list of successfully deleted groups
|
|
30
|
-
*/
|
|
31
|
-
function deleteEmptyGroups(groups, authentication) {
|
|
32
|
-
if (groups.length === 0) {
|
|
33
|
-
return Promise.resolve([]);
|
|
34
|
-
}
|
|
35
|
-
// Attempt to delete each group
|
|
36
|
-
return Promise.all(groups.map(groupId => (0, deleteGroupIfEmpty_1.deleteGroupIfEmpty)(groupId, authentication))).then((responses) => {
|
|
37
|
-
// Return just the group ids that succeeded
|
|
38
|
-
return groups.filter((groupId, index) => responses[index]);
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
exports.deleteEmptyGroups = deleteEmptyGroups;
|
|
42
|
-
//# sourceMappingURL=deleteEmptyGroups.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deleteEmptyGroups.js","sourceRoot":"","sources":["../../../src/deleteHelpers/deleteEmptyGroups.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH;;GAEG;AAEH,6DAA0D;AAG1D,wHAAwH;AAExH;;;;;;GAMG;AACH,SAAgB,iBAAiB,CAC/B,MAAgB,EAChB,cAA2B;IAE3B,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;QACvB,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;KAC5B;IAED,+BAA+B;IAC/B,OAAO,OAAO,CAAC,GAAG,CAChB,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,IAAA,uCAAkB,EAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CACnE,CAAC,IAAI,CAAC,CAAC,SAAoB,EAAE,EAAE;QAC9B,2CAA2C;QAC3C,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,OAAe,EAAE,KAAa,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7E,CAAC,CAAC,CAAC;AACL,CAAC;AAfD,8CAeC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/** @license
|
|
2
|
-
* Copyright 2021 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
|
-
* @module deleteGroupIfEmpty
|
|
18
|
-
*/
|
|
19
|
-
import { UserSession } from "../interfaces";
|
|
20
|
-
/**
|
|
21
|
-
* Deletes a group if it's empty and belongs to the specified user.
|
|
22
|
-
*
|
|
23
|
-
* @param groupId Id of the group to be deleted
|
|
24
|
-
* @param authentication Credentials for the request
|
|
25
|
-
* @returns Promise indicating if group was deleted
|
|
26
|
-
*/
|
|
27
|
-
export declare function deleteGroupIfEmpty(groupId: string, authentication: UserSession): Promise<boolean>;
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/** @license
|
|
3
|
-
* Copyright 2021 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.deleteGroupIfEmpty = void 0;
|
|
19
|
-
const tslib_1 = require("tslib");
|
|
20
|
-
const portal = tslib_1.__importStar(require("@esri/arcgis-rest-portal"));
|
|
21
|
-
// ------------------------------------------------------------------------------------------------------------------ //
|
|
22
|
-
/**
|
|
23
|
-
* Deletes a group if it's empty and belongs to the specified user.
|
|
24
|
-
*
|
|
25
|
-
* @param groupId Id of the group to be deleted
|
|
26
|
-
* @param authentication Credentials for the request
|
|
27
|
-
* @returns Promise indicating if group was deleted
|
|
28
|
-
*/
|
|
29
|
-
function deleteGroupIfEmpty(groupId, authentication) {
|
|
30
|
-
let username;
|
|
31
|
-
let isGroupProtected;
|
|
32
|
-
// Get the owner tied to the authentication
|
|
33
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
34
|
-
return authentication
|
|
35
|
-
.getUsername()
|
|
36
|
-
.then(response => {
|
|
37
|
-
username = response;
|
|
38
|
-
// We need to know the owner and protection status of the group
|
|
39
|
-
return portal.getGroup(groupId, { authentication });
|
|
40
|
-
})
|
|
41
|
-
.then((group) => {
|
|
42
|
-
if (group.owner !== username) {
|
|
43
|
-
return Promise.resolve(null); // don't delete a group we don't own
|
|
44
|
-
}
|
|
45
|
-
isGroupProtected = group.protected; // do we need to unprotect before deleting?
|
|
46
|
-
// Get the number of items in the group
|
|
47
|
-
const groupContentOptions = {
|
|
48
|
-
paging: {
|
|
49
|
-
num: 1 // only need 1 item to show that group is not empty
|
|
50
|
-
},
|
|
51
|
-
authentication
|
|
52
|
-
};
|
|
53
|
-
return portal.getGroupContent(groupId, groupContentOptions);
|
|
54
|
-
})
|
|
55
|
-
.then((groupContent) => {
|
|
56
|
-
// should be IGroupContentResult; see https://github.com/Esri/arcgis-rest-js/pull/858/files
|
|
57
|
-
// If groupContent is null, then we don't own the group; if the group is not empty, then we can't delete it
|
|
58
|
-
if (!groupContent || groupContent.total > 0) {
|
|
59
|
-
return Promise.resolve({ success: false }); // don't delete a group that's not empty
|
|
60
|
-
}
|
|
61
|
-
// We're going ahead with deletion; first unprotect it if necessary
|
|
62
|
-
if (isGroupProtected) {
|
|
63
|
-
const groupOptions = {
|
|
64
|
-
id: groupId,
|
|
65
|
-
authentication
|
|
66
|
-
};
|
|
67
|
-
return portal.unprotectGroup(groupOptions);
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
return Promise.resolve({ success: true });
|
|
71
|
-
}
|
|
72
|
-
})
|
|
73
|
-
.then(response => {
|
|
74
|
-
if (response.success) {
|
|
75
|
-
// All is good so far: we own the group, it's empty, and it's unprotected; proceed with deletion
|
|
76
|
-
const groupOptions = {
|
|
77
|
-
id: groupId,
|
|
78
|
-
authentication
|
|
79
|
-
};
|
|
80
|
-
return portal.removeGroup(groupOptions);
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
// We should not delete the group
|
|
84
|
-
return Promise.resolve({ success: false });
|
|
85
|
-
}
|
|
86
|
-
})
|
|
87
|
-
.then((response) => {
|
|
88
|
-
// Return a simple response
|
|
89
|
-
return Promise.resolve(response.success);
|
|
90
|
-
})
|
|
91
|
-
.catch(() => {
|
|
92
|
-
// In case getGroup or getGroupContent fails
|
|
93
|
-
return Promise.resolve(false);
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
exports.deleteGroupIfEmpty = deleteGroupIfEmpty;
|
|
97
|
-
//# sourceMappingURL=deleteGroupIfEmpty.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deleteGroupIfEmpty.js","sourceRoot":"","sources":["../../../src/deleteHelpers/deleteGroupIfEmpty.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;AAOH,yEAAmD;AAEnD,wHAAwH;AAExH;;;;;;GAMG;AACH,SAAgB,kBAAkB,CAChC,OAAe,EACf,cAA2B;IAE3B,IAAI,QAAgB,CAAC;IACrB,IAAI,gBAAyB,CAAC;IAE9B,2CAA2C;IAC3C,mEAAmE;IACnE,OAAO,cAAc;SAClB,WAAW,EAAE;SACb,IAAI,CAAC,QAAQ,CAAC,EAAE;QACf,QAAQ,GAAG,QAAQ,CAAC;QAEpB,+DAA+D;QAC/D,OAAO,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE,cAAc,EAAE,CAAC,CAAC;IACtD,CAAC,CAAC;SACD,IAAI,CAAC,CAAC,KAAoB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AK,EAAE,CAAC,CAAC;SAC5C;IACH,CAAC,CAAC;SACD,IAAI,CAAC,CAAC,QAA8B,EAAE,EAAE;QACvC,2BAA2B;QAC3B,OAAO,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC3C,CAAC,CAAC;SACD,KAAK,CAAC,GAAG,EAAE;QACV,4CAA4C;QAC5C,OAAO,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;AACP,CAAC;AAvED,gDAuEC"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/** @license
|
|
2
|
-
* Copyright 2021 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
|
-
* Provides a function for deleting a deployed Solution item and all of the items that were created
|
|
18
|
-
* as part of that deployment.
|
|
19
|
-
*
|
|
20
|
-
* @module deleteSolution
|
|
21
|
-
*/
|
|
22
|
-
import { IDeleteSolutionOptions, ISolutionPrecis, UserSession } from "../interfaces";
|
|
23
|
-
/**
|
|
24
|
-
* Deletes a deployed Solution item and and all of the items that were created
|
|
25
|
-
* as part of that deployment.
|
|
26
|
-
*
|
|
27
|
-
* @param solutionItemId Id of a deployed Solution
|
|
28
|
-
* @param solutionSummary List of items in the solution that would be deleted
|
|
29
|
-
* @param authentication Credentials for the request
|
|
30
|
-
* @param options Progress reporting options
|
|
31
|
-
* @returns Promise that will resolve with a list of two solution summaries: successful deletions
|
|
32
|
-
* and failed deletions. Ignored items (e.g., already deleted) and items shared with more than
|
|
33
|
-
* one Solution will not be in either list.
|
|
34
|
-
* Note that Solution item and its deployment folder will only be deleted if all of its deployed
|
|
35
|
-
* items were deleted (the failure list is empty). This makes it possible to re-attempted
|
|
36
|
-
* deletion using the solutionItemId.
|
|
37
|
-
*/
|
|
38
|
-
export declare function deleteSolutionContents(solutionItemId: string, solutionSummary: ISolutionPrecis, authentication: UserSession, options?: IDeleteSolutionOptions): Promise<ISolutionPrecis[]>;
|