@esri/solution-hub-types 5.2.1 → 5.2.3

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.
Files changed (32) hide show
  1. package/README.md +4 -7
  2. package/dist/esm/hub-page-processor.d.ts +1 -2
  3. package/dist/esm/hub-page-processor.js +1 -2
  4. package/dist/esm/hub-page-processor.js.map +1 -1
  5. package/dist/esm/hub-site-processor.d.ts +1 -2
  6. package/dist/esm/hub-site-processor.js +1 -2
  7. package/dist/esm/hub-site-processor.js.map +1 -1
  8. package/package.json +4 -4
  9. package/dist/cjs/helpers/_post-process-page.d.ts +0 -17
  10. package/dist/cjs/helpers/_post-process-page.js +0 -33
  11. package/dist/cjs/helpers/_post-process-page.js.map +0 -1
  12. package/dist/cjs/helpers/_post-process-site.d.ts +0 -29
  13. package/dist/cjs/helpers/_post-process-site.js +0 -53
  14. package/dist/cjs/helpers/_post-process-site.js.map +0 -1
  15. package/dist/cjs/helpers/_update-site-pages.d.ts +0 -24
  16. package/dist/cjs/helpers/_update-site-pages.js +0 -43
  17. package/dist/cjs/helpers/_update-site-pages.js.map +0 -1
  18. package/dist/cjs/helpers/move-model-to-folder.d.ts +0 -26
  19. package/dist/cjs/helpers/move-model-to-folder.js +0 -50
  20. package/dist/cjs/helpers/move-model-to-folder.js.map +0 -1
  21. package/dist/cjs/helpers/replace-item-ids.d.ts +0 -17
  22. package/dist/cjs/helpers/replace-item-ids.js +0 -37
  23. package/dist/cjs/helpers/replace-item-ids.js.map +0 -1
  24. package/dist/cjs/hub-page-processor.d.ts +0 -63
  25. package/dist/cjs/hub-page-processor.js +0 -228
  26. package/dist/cjs/hub-page-processor.js.map +0 -1
  27. package/dist/cjs/hub-site-processor.d.ts +0 -65
  28. package/dist/cjs/hub-site-processor.js +0 -232
  29. package/dist/cjs/hub-site-processor.js.map +0 -1
  30. package/dist/cjs/index.d.ts +0 -23
  31. package/dist/cjs/index.js +0 -29
  32. package/dist/cjs/index.js.map +0 -1
package/README.md CHANGED
@@ -1,16 +1,13 @@
1
1
  [![npm status][npm-img]][npm-url]
2
2
  [![Build status][travis-img]][travis-url]
3
3
  [![gzip bundle size][gzip-img]][npm-url]
4
- [![Coverage status][coverage-img]][coverage-url]
5
4
  [![Apache 2.0 licensed][license-img]][license-url]
6
5
 
7
6
  [npm-img]: https://img.shields.io/npm/v/@esri/solution-storymap.svg?style=round-square&color=blue
8
7
  [npm-url]: https://www.npmjs.com/package/@esri/solution-storymap
9
- [travis-img]: https://img.shields.io/travis/Esri/solution.js/develop.svg
8
+ [travis-img]: https://img.shields.io/travis/com/Esri/solution.js/develop.svg
10
9
  [travis-url]: https://travis-ci.org/Esri/solution.js
11
- [gzip-img]: https://img.badgesize.io/https://unpkg.com/@esri/solution-storymap/dist/umd/storymap.umd.min.js?compression=gzip
12
- [coverage-img]: https://coveralls.io/repos/github/Esri/solution.js/badge.svg
13
- [coverage-url]: https://coveralls.io/github/Esri/solution.js
10
+ [gzip-img]: https://img.badgesize.io/https://unpkg.com/@esri/solution-storymap/dist/esm/index.js?compression=gzip
14
11
  [license-img]: https://img.shields.io/badge/license-Apache%202.0-blue.svg
15
12
  [license-url]: #license
16
13
 
@@ -18,7 +15,7 @@
18
15
 
19
16
  > Manages the creation and deployment of Story Map item types for [`@esri/solution-*`](https://github.com/Esri/solution.js).
20
17
 
21
- ### [API Reference](https://esri.github.io/solution.js/api/storymap/)
18
+ ### [API Reference](https://esri.github.io/solution.js/modules/storymap_src.html)
22
19
 
23
20
  ### Issues
24
21
 
@@ -36,7 +33,7 @@ Esri welcomes contributions from anyone and everyone. Please see our [guidelines
36
33
 
37
34
  ### License
38
35
 
39
- Copyright © 2018-2020 Esri
36
+ Copyright © 2018 Esri
40
37
 
41
38
  Licensed under the Apache License, Version 2.0 (the "License");
42
39
  you may not use this file except in compliance with the License.
@@ -22,13 +22,12 @@ import { IItemTemplate, IItemProgressCallback, ICreateItemFromTemplateResponse,
22
22
  /**
23
23
  * Converts a Hub Page item into a template.
24
24
  *
25
- * @param solutionItemId The solution to contain the template
26
25
  * @param itemInfo Info about the item
27
26
  * @param destAuthentication Credentials for requests to the destination organization
28
27
  * @param srcAuthentication Credentials for requests to source items (placeholder--not used)
29
28
  * @returns A promise that will resolve when the template has been created
30
29
  */
31
- export declare function convertItemToTemplate(solutionItemId: string, itemInfo: any, destAuthentication: UserSession, srcAuthentication?: UserSession): Promise<IItemTemplate>;
30
+ export declare function convertItemToTemplate(itemInfo: any, destAuthentication: UserSession, srcAuthentication?: UserSession): Promise<IItemTemplate>;
32
31
  /**
33
32
  * Handle deployment of Page item templates
34
33
  *
@@ -28,13 +28,12 @@ import { moveModelToFolder } from "./helpers/move-model-to-folder";
28
28
  /**
29
29
  * Converts a Hub Page item into a template.
30
30
  *
31
- * @param solutionItemId The solution to contain the template
32
31
  * @param itemInfo Info about the item
33
32
  * @param destAuthentication Credentials for requests to the destination organization
34
33
  * @param srcAuthentication Credentials for requests to source items (placeholder--not used)
35
34
  * @returns A promise that will resolve when the template has been created
36
35
  */
37
- export function convertItemToTemplate(solutionItemId, itemInfo, destAuthentication, srcAuthentication = null // eslint-disable-line @typescript-eslint/no-unused-vars
36
+ export function convertItemToTemplate(itemInfo, destAuthentication, srcAuthentication = null // eslint-disable-line @typescript-eslint/no-unused-vars
38
37
  ) {
39
38
  let created = 0;
40
39
  let modified = 0;
@@ -1 +1 @@
1
- {"version":3,"file":"hub-page-processor.js","sourceRoot":"","sources":["../../src/hub-page-processor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;GAIG;AAEH,OAAO,EAIL,mBAAmB,EAEnB,aAAa,EACb,uBAAuB,EACvB,6BAA6B,EAC9B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAsB,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAGL,QAAQ,EACR,QAAQ,EAER,OAAO,EACP,OAAO,EACR,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,2B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IAAI,KAA6B,CAAC;IAClC,wBAAwB;IACxB,OAAO,uBAAuB,CAAC,cAAc,CAAC;SAC3C,IAAI,CAAC,EAAE,CAAC,EAAE;QACT,KAAK,GAAG,EAAE,CAAC;QACX,qBAAqB;QACrB,OAAO,QAAQ,CAAC,EAAE,EAAE,EAAE,cAAc,EAAE,CAAC,CAAC;IAC1C,CAAC,CAAC;SACD,IAAI,CAAC,SAAS,CAAC,EAAE;QAChB,wBAAwB;QACxB,OAAO,gBAAgB,CAAC,SAAS,EAAE,SAAS,EAAE,kBAAkB,EAAE,KAAK,CAAC,CAAC;IAC3E,CAAC,CAAC,CAAC;AACP,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,OAAO,CAAC,QAAgB;IACtC,IAAI,MAAM,GAAG,KAAK,CAAC;IAEnB,IAAI,QAAQ,KAAK,UAAU,IAAI,QAAQ,KAAK,WAAW,EAAE;QACvD,MAAM,GAAG,IAAI,CAAC;KACf;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -22,13 +22,12 @@ import { IItemTemplate, IItemProgressCallback, ICreateItemFromTemplateResponse,
22
22
  /**
23
23
  * Converts a Site item into a template.
24
24
  *
25
- * @param solutionItemId The solution to contain the template
26
25
  * @param itemInfo Info about the item
27
26
  * @param destAuthentication Credentials for requests to the destination organization
28
27
  * @param srcAuthentication Credentials for requests to source items (placeholder--not used)
29
28
  * @returns A promise that will resolve when the template has been created
30
29
  */
31
- export declare function convertItemToTemplate(solutionItemId: string, itemInfo: any, destAuthentication: UserSession, srcAuthentication?: UserSession): Promise<IItemTemplate>;
30
+ export declare function convertItemToTemplate(itemInfo: any, destAuthentication: UserSession, srcAuthentication?: UserSession): Promise<IItemTemplate>;
32
31
  /**
33
32
  * Handle deployment of Site item templates
34
33
  *
@@ -28,13 +28,12 @@ import { replaceItemIds } from "./helpers/replace-item-ids";
28
28
  /**
29
29
  * Converts a Site item into a template.
30
30
  *
31
- * @param solutionItemId The solution to contain the template
32
31
  * @param itemInfo Info about the item
33
32
  * @param destAuthentication Credentials for requests to the destination organization
34
33
  * @param srcAuthentication Credentials for requests to source items (placeholder--not used)
35
34
  * @returns A promise that will resolve when the template has been created
36
35
  */
37
- export function convertItemToTemplate(solutionItemId, itemInfo, destAuthentication, srcAuthentication = null // eslint-disable-line @typescript-eslint/no-unused-vars
36
+ export function convertItemToTemplate(itemInfo, destAuthentication, srcAuthentication = null // eslint-disable-line @typescript-eslint/no-unused-vars
38
37
  ) {
39
38
  let created = 0;
40
39
  let modified = 0;
@@ -1 +1 @@
1
- {"version":3,"file":"hub-site-processor.js","sourceRoot":"","sources":["../../src/hub-site-processor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;GAIG;AAEH,OAAO,EAIL,mBAAmB,EAEnB,aAAa,EACb,uBAAuB,EACvB,MAAM,EACN,6BAA6B,EAC7B,OAAO,EACR,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAsB,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EACL,2BAA2B,EAC3B,UAAU,EACV,WAAW,EACX,UAAU,EACV,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAEL,QAAQ,EAER,OAAO,EACR,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D;;;;;;;;GAQG;AACH,MAAM,UAAU,qBAAqB,CACnC,cAAsB,EACtB,QAAa,EACb,kBAA+B,EAC/B,oBAAiC,IAAI,CAAC,wDAAwD;;IAE9F,IAAI,OAAO,GAAW,CAAC,CAAC;IACxB,IAAI,QAAQ,GAAW,CAAC,CAAC;IAEzB,IAAI,KAA6B,CAAC;IAClC,wBAAwB;IACxB,OAAO,uBAAuB,CAAC,kBAAkB,CAAC;S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AAQ,KAAK,kBAAkB,EAAE;QAC1E,MAAM,GAAG,IAAI,CAAC;KACf;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/solution-hub-types",
3
- "version": "5.2.1",
3
+ "version": "5.2.3",
4
4
  "description": "Manages the creation and deployment of Hub Site and Hub Page item types for @esri/solution.js.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -23,11 +23,11 @@
23
23
  "@esri/arcgis-rest-portal": "^3.7.0",
24
24
  "@esri/arcgis-rest-request": "^3.7.0",
25
25
  "@esri/arcgis-rest-service-admin": "^3.7.0",
26
- "@esri/hub-common": "^14.74.1",
26
+ "@esri/hub-common": "^14.97.0",
27
27
  "@esri/hub-initiatives": "^14.0.0",
28
28
  "@esri/hub-sites": "^14.2.2",
29
29
  "@esri/hub-teams": "^14.1.0",
30
- "@esri/solution-common": "^5.2.1",
30
+ "@esri/solution-common": "^5.2.3",
31
31
  "@types/jasmine": "^5.1.4",
32
32
  "fetch-mock": "^7.7.3",
33
33
  "jasmine": "^5.1.0",
@@ -88,5 +88,5 @@
88
88
  "esri",
89
89
  "ES6"
90
90
  ],
91
- "gitHead": "0f2bb444de46482baa42621310bc4e8d94bcd11a"
91
+ "gitHead": "bcf0907f47cf8a2970f8da38f8e1e2a4ac7beccb"
92
92
  }
@@ -1,17 +0,0 @@
1
- /** @license
2
- * Copyright 2020 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 { IModel, IHubUserRequestOptions } from "@esri/hub-common";
17
- export declare function _postProcessPage(pageModel: IModel, itemInfos: any[], templateDictionary: any, hubRequestOptions: IHubUserRequestOptions): Promise<boolean>;
@@ -1,33 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports._postProcessPage = void 0;
4
- /** @license
5
- * Copyright 2020 Esri
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
18
- */
19
- const hub_common_1 = require("@esri/hub-common");
20
- const hub_sites_1 = require("@esri/hub-sites");
21
- //TODO: function doc
22
- function _postProcessPage(pageModel, itemInfos, templateDictionary, hubRequestOptions) {
23
- // re-interpolate the siteModel using the itemInfos; no patches supplied
24
- pageModel = (0, hub_common_1.interpolate)(pageModel, templateDictionary, {});
25
- return (0, hub_sites_1.updatePage)(pageModel, {
26
- ...hubRequestOptions,
27
- allowList: []
28
- }).then(() => {
29
- return true;
30
- });
31
- }
32
- exports._postProcessPage = _postProcessPage;
33
- //# sourceMappingURL=_post-process-page.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_post-process-page.js","sourceRoot":"","sources":["../../../src/helpers/_post-process-page.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,iDAA+E;AAC/E,+CAA6C;AAE7C,oBAAoB;AACpB,SAAgB,gBAAgB,CAC9B,SAAiB,EACjB,SAAgB,EAChB,kBAAuB,EACvB,iBAAyC;IAEzC,wEAAwE;IACxE,SAAS,GAAG,IAAA,wBAAW,EAAC,SAAS,EAAE,kBAAkB,EAAE,EAAE,CAAC,CAAC;IAC3D,OAAO,IAAA,sBAAU,EAAC,SAAS,EAAE;QAC3B,GAAG,iBAAiB;QACpB,SAAS,EAAE,EAAE;KACd,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;QACX,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC;AAdD,4CAcC"}
@@ -1,29 +0,0 @@
1
- /** @license
2
- * Copyright 2020 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 { IModel, IHubUserRequestOptions } from "@esri/hub-common";
17
- /**
18
- * Post Process a Site
19
- * - share all items to the Hub teams created as part of the site
20
- * - link any created page to the site item
21
- * - re-interpolate any remaining item ids that were not direct deps of the site
22
- *
23
- * @param siteModel
24
- * @param itemInfos
25
- * @param templateDictionary
26
- * @param hubRequestOptions
27
- * @private
28
- */
29
- export declare function _postProcessSite(siteModel: IModel, itemInfos: any[], templateDictionary: any, hubRequestOptions: IHubUserRequestOptions): Promise<boolean>;
@@ -1,53 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports._postProcessSite = void 0;
4
- const hub_sites_1 = require("@esri/hub-sites");
5
- const _update_site_pages_1 = require("./_update-site-pages");
6
- /**
7
- * Post Process a Site
8
- * - share all items to the Hub teams created as part of the site
9
- * - link any created page to the site item
10
- * - re-interpolate any remaining item ids that were not direct deps of the site
11
- *
12
- * @param siteModel
13
- * @param itemInfos
14
- * @param templateDictionary
15
- * @param hubRequestOptions
16
- * @private
17
- */
18
- function _postProcessSite(siteModel, itemInfos, templateDictionary, hubRequestOptions) {
19
- const infosWithoutSite = itemInfos.filter(info => info.id !== siteModel.item.id);
20
- // convert the itemInfo's into things that look enough like a model
21
- // that we can call shareItemsToSiteGroups
22
- const pseudoModels = infosWithoutSite.map(e => {
23
- return {
24
- item: {
25
- id: e.id,
26
- type: e.type
27
- }
28
- };
29
- });
30
- let secondPassPromises = [];
31
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
32
- secondPassPromises = secondPassPromises.concat((0, hub_sites_1.shareItemsToSiteGroups)(siteModel, pseudoModels, hubRequestOptions));
33
- // we can't use that same trick w/ the page sharing
34
- // because we really need the models themselves
35
- // so we delegate to a local function
36
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
37
- secondPassPromises = secondPassPromises.concat((0, _update_site_pages_1._updateSitePages)(siteModel, infosWithoutSite, hubRequestOptions));
38
- // need to get all the child items and add into site.item.properties.children
39
- const childItemIds = infosWithoutSite.map(i => i.id);
40
- siteModel.item.properties.children = childItemIds;
41
- // re-interpolate the siteModel using the itemInfos
42
- siteModel = (0, hub_sites_1.interpolateSite)(siteModel, templateDictionary, {});
43
- // and update the model
44
- secondPassPromises.push((0, hub_sites_1.updateSite)(siteModel, {
45
- ...hubRequestOptions,
46
- allowList: null
47
- }));
48
- return Promise.all(secondPassPromises).then(() => {
49
- return true;
50
- });
51
- }
52
- exports._postProcessSite = _postProcessSite;
53
- //# sourceMappingURL=_post-process-site.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_post-process-site.js","sourceRoot":"","sources":["../../../src/helpers/_post-process-site.ts"],"names":[],"mappings":";;;AAiBA,+CAAsF;AAEtF,6DAAwD;AAExD;;;;;;;;;;;GAWG;AACH,SAAgB,gBAAgB,CAC9B,SAAiB,EACjB,SAAgB,EAChB,kBAAuB,EACvB,iBAAyC;IAEzC,MAAM,gBAAgB,GAAG,SAAS,CAAC,MAAM,CACvC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,SAAS,CAAC,IAAI,CAAC,EAAE,CACtC,CAAC;IAEF,mEAAmE;IACnE,0CAA0C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.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 { IModel, IHubUserRequestOptions } from "@esri/hub-common";
17
- /**
18
- *
19
- * @param siteModel
20
- * @param itemInfos
21
- * @param hubRequestOptions
22
- * @private
23
- */
24
- export declare function _updateSitePages(siteModel: IModel, itemInfos: any[], hubRequestOptions: IHubUserRequestOptions): Promise<any>;
@@ -1,43 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports._updateSitePages = void 0;
4
- /** @license
5
- * Copyright 2020 Esri
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
18
- */
19
- const hub_common_1 = require("@esri/hub-common");
20
- const hub_sites_1 = require("@esri/hub-sites");
21
- /**
22
- *
23
- * @param siteModel
24
- * @param itemInfos
25
- * @param hubRequestOptions
26
- * @private
27
- */
28
- function _updateSitePages(siteModel, itemInfos, hubRequestOptions) {
29
- const pageIds = itemInfos
30
- .filter(e => {
31
- return e.type.indexOf("Page") > -1;
32
- })
33
- .map(e => e.id);
34
- // now get all those models
35
- return Promise.all(pageIds.map(id => {
36
- return (0, hub_common_1.getModel)(id, hubRequestOptions);
37
- })).then((pageModels) => {
38
- // now delegate back to hub.js internal _updatePages fn
39
- return (0, hub_sites_1._updatePages)(siteModel, pageModels, hubRequestOptions);
40
- });
41
- }
42
- exports._updateSitePages = _updateSitePages;
43
- //# sourceMappingURL=_update-site-pages.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_update-site-pages.js","sourceRoot":"","sources":["../../../src/helpers/_update-site-pages.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,iDAA4E;AAC5E,+CAA+C;AAC/C;;;;;;GAMG;AACH,SAAgB,gBAAgB,CAC9B,SAAiB,EACjB,SAAgB,EAChB,iBAAyC;IAEzC,MAAM,OAAO,GAAG,SAAS;SACtB,MAAM,CAAC,CAAC,CAAC,EAAE;QACV,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IACrC,CAAC,CAAC;SACD,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAElB,2BAA2B;IAC3B,OAAO,OAAO,CAAC,GAAG,CAChB,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE;QACf,OAAO,IAAA,qBAAQ,EAAC,EAAE,EAAE,iBAAiB,CAAC,CAAC;IACzC,CAAC,CAAC,CACH,CAAC,IAAI,CAAC,CAAC,UAAe,EAAE,EAAE;QACzB,uDAAuD;QACvD,OAAO,IAAA,wBAAY,EAAC,SAAS,EAAE,UAAU,EAAE,iBAAiB,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;AACL,CAAC;AApBD,4CAoBC"}
@@ -1,26 +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 { IModel } from "@esri/hub-common";
17
- import { UserSession } from "@esri/solution-common";
18
- /**
19
- * Move the created site item, and optionally the Initiative, into
20
- * the solution folder
21
- *
22
- * @param siteModel
23
- * @param folderId
24
- * @param authentication
25
- */
26
- export declare function moveModelToFolder(siteModel: IModel, folderId: string, authentication: UserSession): Promise<any>;
@@ -1,50 +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.moveModelToFolder = void 0;
19
- const hub_common_1 = require("@esri/hub-common");
20
- const arcgis_rest_portal_1 = require("@esri/arcgis-rest-portal");
21
- /**
22
- * Move the created site item, and optionally the Initiative, into
23
- * the solution folder
24
- *
25
- * @param siteModel
26
- * @param folderId
27
- * @param authentication
28
- */
29
- function moveModelToFolder(siteModel, folderId, authentication) {
30
- // Fail-Safe the move call as it's not critical if it fails
31
- const failSafeMove = (0, hub_common_1.failSafe)(arcgis_rest_portal_1.moveItem, { success: true });
32
- const movePromises = [
33
- failSafeMove({
34
- itemId: siteModel.item.id,
35
- folderId,
36
- authentication
37
- })
38
- ];
39
- // if an initiative was created...
40
- if ((0, hub_common_1.getProp)(siteModel, "item.properties.parentInitiativeId")) {
41
- movePromises.push(failSafeMove({
42
- itemId: siteModel.item.properties.parentInitiativeId,
43
- folderId,
44
- authentication
45
- }));
46
- }
47
- return Promise.all(movePromises);
48
- }
49
- exports.moveModelToFolder = moveModelToFolder;
50
- //# sourceMappingURL=move-model-to-folder.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"move-model-to-folder.js","sourceRoot":"","sources":["../../../src/helpers/move-model-to-folder.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,iDAA6D;AAE7D,iEAAoD;AAEpD;;;;;;;GAOG;AACH,SAAgB,iBAAiB,CAC/B,SAAiB,EACjB,QAAgB,EAChB,cAA2B;IAE3B,2DAA2D;IAC3D,MAAM,YAAY,GAAG,IAAA,qBAAQ,EAAC,6BAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IAE3D,MAAM,YAAY,GAAG;QACnB,YAAY,CAAC;YACX,MAAM,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE;YACzB,QAAQ;YACR,cAAc;SACf,CAAC;KACH,CAAC;IACF,kCAAkC;IAClC,IAAI,IAAA,oBAAO,EAAC,SAAS,EAAE,oCAAoC,CAAC,EAAE;QAC5D,YAAY,CAAC,IAAI,CACf,YAAY,CAAC;YACX,MAAM,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,kBAAkB;YACpD,QAAQ;YACR,cAAc;SACf,CAAC,CACH,CAAC;KACH;IAED,OAAO,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;AACnC,CAAC;AA3BD,8CA2BC"}
@@ -1,17 +0,0 @@
1
- /** @license
2
- * Copyright 2020 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 { IModelTemplate } from "@esri/hub-common";
17
- export declare function replaceItemIds(template: IModelTemplate): IModelTemplate;
@@ -1,37 +0,0 @@
1
- "use strict";
2
- /** @license
3
- * Copyright 2020 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.replaceItemIds = void 0;
19
- const hub_common_1 = require("@esri/hub-common");
20
- function replaceItemIds(template) {
21
- const clone = (0, hub_common_1.cloneObject)(template);
22
- const deps = template.dependencies || [];
23
- // iterate the dependencies
24
- deps.forEach(depId => {
25
- const re = new RegExp(depId, "g");
26
- const replacement = `{{${depId}.itemId}}`;
27
- // we have to do this property-by-property or we would replace the `itemId` prop itself
28
- clone.item = (0, hub_common_1.deepStringReplace)(clone.item, re, replacement);
29
- clone.data = (0, hub_common_1.deepStringReplace)(clone.data, re, replacement);
30
- if (template.properties) {
31
- clone.properties = (0, hub_common_1.deepStringReplace)(clone.properties, re, replacement);
32
- }
33
- });
34
- return clone;
35
- }
36
- exports.replaceItemIds = replaceItemIds;
37
- //# sourceMappingURL=replace-item-ids.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"replace-item-ids.js","sourceRoot":"","sources":["../../../src/helpers/replace-item-ids.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,iDAI0B;AAE1B,SAAgB,cAAc,CAAC,QAAwB;IACrD,MAAM,KAAK,GAAG,IAAA,wBAAW,EAAC,QAAQ,CAAC,CAAC;IACpC,MAAM,IAAI,GAAG,QAAQ,CAAC,YAAY,IAAI,EAAE,CAAC;IACzC,2BAA2B;IAC3B,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACnB,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAClC,MAAM,WAAW,GAAG,KAAK,KAAK,WAAW,CAAC;QAC1C,uFAAuF;QACvF,KAAK,CAAC,IAAI,GAAG,IAAA,8BAAiB,EAAC,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,CAAC,CAAC;QAC5D,KAAK,CAAC,IAAI,GAAG,IAAA,8BAAiB,EAAC,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,CAAC,CAAC;QAC5D,IAAI,QAAQ,CAAC,UAAU,EAAE;YACvB,KAAK,CAAC,UAAU,GAAG,IAAA,8BAAiB,EAAC,KAAK,CAAC,UAAU,EAAE,EAAE,EAAE,WAAW,CAAC,CAAC;SACzE;IACH,CAAC,CAAC,CAAC;IACH,OAAO,KAAK,CAAC;AACf,CAAC;AAfD,wCAeC"}
@@ -1,63 +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 the creation and deployment of Hub Page item types.
18
- *
19
- * @module hub-page-processor
20
- */
21
- import { IItemTemplate, IItemProgressCallback, ICreateItemFromTemplateResponse, UserSession } from "@esri/solution-common";
22
- /**
23
- * Converts a Hub Page item into a template.
24
- *
25
- * @param solutionItemId The solution to contain the template
26
- * @param itemInfo Info about the item
27
- * @param destAuthentication Credentials for requests to the destination organization
28
- * @param srcAuthentication Credentials for requests to source items (placeholder--not used)
29
- * @returns A promise that will resolve when the template has been created
30
- */
31
- export declare function convertItemToTemplate(solutionItemId: string, itemInfo: any, destAuthentication: UserSession, srcAuthentication?: UserSession): Promise<IItemTemplate>;
32
- /**
33
- * Handle deployment of Page item templates
34
- *
35
- * @export
36
- * @param {IItemTemplate} template
37
- * @param {*} templateDictionary
38
- * @param {UserSession} destinationAuthentication
39
- * @param {IItemProgressCallback} itemProgressCallback
40
- * @returns {Promise<ICreateItemFromTemplateResponse>}
41
- */
42
- export declare function createItemFromTemplate(template: IItemTemplate, templateDictionary: any, destinationAuthentication: UserSession, itemProgressCallback: IItemProgressCallback): Promise<ICreateItemFromTemplateResponse>;
43
- /**
44
- * Post-Process a Page
45
- * Re-interpolate the page item + data w/ the full template dictionary hash
46
- *
47
- * @param id
48
- * @param type
49
- * @param itemInfos
50
- * @param template
51
- * @param templates
52
- * @param templateDictionary
53
- * @param authentication
54
- */
55
- export declare function postProcess(id: string, type: string, itemInfos: any[], template: any, templates: IItemTemplate[], templateDictionary: any, authentication: UserSession): Promise<boolean>;
56
- /**
57
- * Check of an item type is a Page
58
- * Hub Page is for ArcGIS Online
59
- * Site Page is for ArcGIS Enterprise
60
- *
61
- * @param itemType
62
- */
63
- export declare function isAPage(itemType: string): boolean;
@@ -1,228 +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.isAPage = exports.postProcess = exports.createItemFromTemplate = exports.convertItemToTemplate = void 0;
19
- /**
20
- * Manages the creation and deployment of Hub Page item types.
21
- *
22
- * @module hub-page-processor
23
- */
24
- const solution_common_1 = require("@esri/solution-common");
25
- const arcgis_rest_portal_1 = require("@esri/arcgis-rest-portal");
26
- const hub_common_1 = require("@esri/hub-common");
27
- const hub_sites_1 = require("@esri/hub-sites");
28
- const _post_process_page_1 = require("./helpers/_post-process-page");
29
- const replace_item_ids_1 = require("./helpers/replace-item-ids");
30
- const move_model_to_folder_1 = require("./helpers/move-model-to-folder");
31
- /**
32
- * Converts a Hub Page item into a template.
33
- *
34
- * @param solutionItemId The solution to contain the template
35
- * @param itemInfo Info about the item
36
- * @param destAuthentication Credentials for requests to the destination organization
37
- * @param srcAuthentication Credentials for requests to source items (placeholder--not used)
38
- * @returns A promise that will resolve when the template has been created
39
- */
40
- function convertItemToTemplate(solutionItemId, itemInfo, destAuthentication, srcAuthentication = null // eslint-disable-line @typescript-eslint/no-unused-vars
41
- ) {
42
- let created = 0;
43
- let modified = 0;
44
- // get the page model and hubRequestOptions
45
- return Promise.all([
46
- (0, hub_common_1.getModel)(itemInfo.id, { authentication: destAuthentication }),
47
- (0, solution_common_1.createHubRequestOptions)(destAuthentication)
48
- ])
49
- .then(([pageModel, ro]) => {
50
- // We need to save these properties in order to restore them after hub.js deletes them
51
- created = pageModel.item.created;
52
- modified = pageModel.item.modified;
53
- return (0, hub_sites_1.convertPageToTemplate)(pageModel, ro);
54
- })
55
- .then(tmpl => {
56
- // add in some stuff Hub.js does not yet add
57
- tmpl.item.created = created;
58
- tmpl.item.modified = modified;
59
- tmpl.item.typeKeywords = (0, hub_common_1.without)(tmpl.item.typeKeywords, "doNotDelete");
60
- tmpl.groups = [];
61
- tmpl.estimatedDeploymentCostFactor = 2;
62
- tmpl.resources = [];
63
- if (!(0, hub_common_1.getProp)(tmpl, "properties")) {
64
- tmpl.properties = {};
65
- }
66
- // swap out dependency id's to {{<depid>.itemId}}
67
- // so it will be re-interpolated
68
- tmpl = (0, replace_item_ids_1.replaceItemIds)(tmpl);
69
- // and return it
70
- return tmpl;
71
- });
72
- }
73
- exports.convertItemToTemplate = convertItemToTemplate;
74
- /**
75
- * Handle deployment of Page item templates
76
- *
77
- * @export
78
- * @param {IItemTemplate} template
79
- * @param {*} templateDictionary
80
- * @param {UserSession} destinationAuthentication
81
- * @param {IItemProgressCallback} itemProgressCallback
82
- * @returns {Promise<ICreateItemFromTemplateResponse>}
83
- */
84
- function createItemFromTemplate(template, templateDictionary, destinationAuthentication, itemProgressCallback) {
85
- // let the progress system know we've started...
86
- const startStatus = itemProgressCallback(template.itemId, solution_common_1.EItemProgressStatus.Started, 0);
87
- // and if it returned false, just resolve out
88
- if (!startStatus) {
89
- return Promise.resolve((0, solution_common_1.generateEmptyCreationResponse)(template.type));
90
- }
91
- // TODO: Reassess with resource unification
92
- if (template.assets && template.resources) {
93
- delete template.assets;
94
- }
95
- // solutionItemExtent is in geographic, but it's a string, and we want/need a bbox
96
- // and Hub templates expect it in organization.defaultExtentBBox
97
- if (templateDictionary.solutionItemExtent) {
98
- const parts = templateDictionary.solutionItemExtent.split(",");
99
- templateDictionary.organization.defaultExtentBBox = [
100
- [parts[0], parts[1]],
101
- [parts[2], parts[3]]
102
- ];
103
- }
104
- // TODO: Determine if we need any transforms in this new env
105
- const transforms = {};
106
- // create an object to hold the created site through
107
- // subsequent promise calls
108
- let pageModel;
109
- let hubRo;
110
- const thumbnail = template.item.thumbnail; // createPageModelFromTemplate trashes thumbnail
111
- return (0, solution_common_1.createHubRequestOptions)(destinationAuthentication, templateDictionary)
112
- .then(ro => {
113
- hubRo = ro;
114
- return (0, hub_sites_1.createPageModelFromTemplate)(template, templateDictionary, transforms, hubRo);
115
- })
116
- .then((interpolated) => {
117
- // --------------------------------------------
118
- // TODO: Update hub.js to take an IModel in createPage
119
- // then remove this silliness
120
- const modelTmpl = interpolated;
121
- const options = {
122
- assets: modelTmpl.assets || []
123
- };
124
- // --------------------------------------------
125
- return (0, hub_sites_1.createPage)(modelTmpl, options, hubRo);
126
- })
127
- .then(page => {
128
- pageModel = page;
129
- // Move the site and initiative to the solution folder
130
- // this is essentially fire and forget. We fail-safe the actual moveItem
131
- // call since it's not critical to the outcome
132
- return (0, move_model_to_folder_1.moveModelToFolder)(page, templateDictionary.folderId, destinationAuthentication);
133
- })
134
- .then(() => {
135
- // Fix the thumbnail
136
- const updateOptions = {
137
- item: {
138
- id: pageModel.item.id
139
- },
140
- params: {
141
- // Pass thumbnail in via params because item property is serialized, which discards a blob
142
- thumbnail
143
- },
144
- authentication: destinationAuthentication
145
- };
146
- return (0, arcgis_rest_portal_1.updateItem)(updateOptions);
147
- })
148
- .then(() => {
149
- // Update the template dictionary
150
- // TODO: This should be done in whatever recieves
151
- // the outcome of this promise chain
152
- templateDictionary[template.itemId] = {
153
- itemId: pageModel.item.id
154
- };
155
- // call the progress callback, which also mutates templateDictionary
156
- const finalStatus = itemProgressCallback(template.itemId, solution_common_1.EItemProgressStatus.Finished, template.estimatedDeploymentCostFactor || 2, pageModel.item.id);
157
- if (!finalStatus) {
158
- // clean up the site we just created
159
- const failSafeRemove = (0, hub_common_1.failSafe)(hub_sites_1.removePage, { success: true });
160
- return failSafeRemove(pageModel, hubRo).then(() => {
161
- return Promise.resolve((0, solution_common_1.generateEmptyCreationResponse)(template.type));
162
- });
163
- }
164
- else {
165
- // finally, return ICreateItemFromTemplateResponse
166
- const response = {
167
- item: {
168
- ...template,
169
- ...(0, solution_common_1.convertIModel)(pageModel)
170
- },
171
- id: pageModel.item.id,
172
- type: template.type,
173
- postProcess: true
174
- };
175
- response.item.itemId = pageModel.item.id;
176
- return response;
177
- }
178
- })
179
- .catch(ex => {
180
- itemProgressCallback(template.itemId, solution_common_1.EItemProgressStatus.Failed, 0);
181
- throw ex;
182
- });
183
- }
184
- exports.createItemFromTemplate = createItemFromTemplate;
185
- /**
186
- * Post-Process a Page
187
- * Re-interpolate the page item + data w/ the full template dictionary hash
188
- *
189
- * @param id
190
- * @param type
191
- * @param itemInfos
192
- * @param template
193
- * @param templates
194
- * @param templateDictionary
195
- * @param authentication
196
- */
197
- function postProcess(id, type, itemInfos, template, templates, templateDictionary, authentication) {
198
- // create the requestOptions
199
- let hubRo;
200
- // get hubRequestOptions
201
- return (0, solution_common_1.createHubRequestOptions)(authentication)
202
- .then(ro => {
203
- hubRo = ro;
204
- // get the site model
205
- return (0, hub_common_1.getModel)(id, { authentication });
206
- })
207
- .then(pageModel => {
208
- // post process the page
209
- return (0, _post_process_page_1._postProcessPage)(pageModel, itemInfos, templateDictionary, hubRo);
210
- });
211
- }
212
- exports.postProcess = postProcess;
213
- /**
214
- * Check of an item type is a Page
215
- * Hub Page is for ArcGIS Online
216
- * Site Page is for ArcGIS Enterprise
217
- *
218
- * @param itemType
219
- */
220
- function isAPage(itemType) {
221
- let result = false;
222
- if (itemType === "Hub Page" || itemType === "Site Page") {
223
- result = true;
224
- }
225
- return result;
226
- }
227
- exports.isAPage = isAPage;
228
- //# sourceMappingURL=hub-page-processor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hub-page-processor.js","sourceRoot":"","sources":["../../src/hub-page-processor.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH;;;;GAIG;AAEH,2DAS+B;AAC/B,iEAA0E;AAC1E,iDAQ0B;AAC1B,+CAKyB;AAEzB,qEAAgE;AAChE,iEAA4D;AAC5D,yEAAmE;AAEnE;;;;;;;;GAQG;AACH,SAAgB,qBAAqB,CACnC,cAAsB,EACtB,QAAa,EACb,kBAA+B,EAC/B,oBAAiC,IAAI,CAAC,wDAAwD;;IAE9F,IAAI,OAAO,GAAW,CAAC,CAAC;IACxB,IAAI,QAAQ,GAAW,CAAC,CAAC;IAEzB,2CAA2C;IAC3C,OAAO,OAAO,CAAC,GAAG,CAAC;QACjB,IAAA,qBAAQ,EAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE,CAAC;QAC7D,IAAA,yCAAuB,EAAC,kBAAkB,CAAC;KAC5C,CAAC;SACC,IAAI,CAAC,CAAC,CAAC,S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C;AACP,CAAC;AAtBD,kCAsBC;AAED;;;;;;GAMG;AACH,SAAgB,OAAO,CAAC,QAAgB;IACtC,IAAI,MAAM,GAAG,KAAK,CAAC;IAEnB,IAAI,QAAQ,KAAK,UAAU,IAAI,QAAQ,KAAK,WAAW,EAAE;QACvD,MAAM,GAAG,IAAI,CAAC;KACf;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAPD,0BAOC"}
@@ -1,65 +0,0 @@
1
- /** @license
2
- * Copyright 2020 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 the creation and deployment of Hub Site item types.
18
- *
19
- * @module hub-site-processor
20
- */
21
- import { IItemTemplate, IItemProgressCallback, ICreateItemFromTemplateResponse, UserSession } from "@esri/solution-common";
22
- /**
23
- * Converts a Site item into a template.
24
- *
25
- * @param solutionItemId The solution to contain the template
26
- * @param itemInfo Info about the item
27
- * @param destAuthentication Credentials for requests to the destination organization
28
- * @param srcAuthentication Credentials for requests to source items (placeholder--not used)
29
- * @returns A promise that will resolve when the template has been created
30
- */
31
- export declare function convertItemToTemplate(solutionItemId: string, itemInfo: any, destAuthentication: UserSession, srcAuthentication?: UserSession): Promise<IItemTemplate>;
32
- /**
33
- * Handle deployment of Site item templates
34
- *
35
- * @export
36
- * @param {IItemTemplate} template
37
- * @param {*} templateDictionary
38
- * @param {UserSession} destinationAuthentication
39
- * @param {IItemProgressCallback} itemProgressCallback
40
- * @returns {Promise<ICreateItemFromTemplateResponse>}
41
- */
42
- export declare function createItemFromTemplate(template: IItemTemplate, templateDictionary: any, destinationAuthentication: UserSession, itemProgressCallback: IItemProgressCallback): Promise<ICreateItemFromTemplateResponse>;
43
- /**
44
- * Deployer life-cycle hook allowing the Site Processor
45
- * a chance to apply final processes to all the items that
46
- * were created as part of the solution.
47
- * Specifically this will:
48
- * - share all items to the content team, and (if created)
49
- * the core team (depends on user privs)
50
- * - link all Page items that were created, to the Site
51
- *
52
- * @param model
53
- * @param items
54
- * @param authentication
55
- * @param templateDictionary
56
- */
57
- export declare function postProcess(id: string, type: string, itemInfos: any[], template: any, templates: IItemTemplate[], templateDictionary: any, authentication: UserSession): Promise<boolean>;
58
- /**
59
- * Check of an item type is a Site
60
- * Hub Site Application is for ArcGIS Online
61
- * Site Application is for ArcGIS Enterprise
62
- *
63
- * @param itemType
64
- */
65
- export declare function isASite(itemType: string): boolean;
@@ -1,232 +0,0 @@
1
- "use strict";
2
- /** @license
3
- * Copyright 2020 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.isASite = exports.postProcess = exports.createItemFromTemplate = exports.convertItemToTemplate = void 0;
19
- /**
20
- * Manages the creation and deployment of Hub Site item types.
21
- *
22
- * @module hub-site-processor
23
- */
24
- const solution_common_1 = require("@esri/solution-common");
25
- const arcgis_rest_portal_1 = require("@esri/arcgis-rest-portal");
26
- const hub_sites_1 = require("@esri/hub-sites");
27
- const hub_common_1 = require("@esri/hub-common");
28
- const move_model_to_folder_1 = require("./helpers/move-model-to-folder");
29
- const _post_process_site_1 = require("./helpers/_post-process-site");
30
- const replace_item_ids_1 = require("./helpers/replace-item-ids");
31
- /**
32
- * Converts a Site item into a template.
33
- *
34
- * @param solutionItemId The solution to contain the template
35
- * @param itemInfo Info about the item
36
- * @param destAuthentication Credentials for requests to the destination organization
37
- * @param srcAuthentication Credentials for requests to source items (placeholder--not used)
38
- * @returns A promise that will resolve when the template has been created
39
- */
40
- function convertItemToTemplate(solutionItemId, itemInfo, destAuthentication, srcAuthentication = null // eslint-disable-line @typescript-eslint/no-unused-vars
41
- ) {
42
- let created = 0;
43
- let modified = 0;
44
- let hubRo;
45
- // get hubRequestOptions
46
- return (0, solution_common_1.createHubRequestOptions)(destAuthentication)
47
- .then(ro => {
48
- hubRo = ro;
49
- return (0, hub_sites_1.getSiteById)(itemInfo.id, hubRo);
50
- })
51
- .then(siteModel => {
52
- // We need to save these properties in order to restore them after hub.js deletes them
53
- created = siteModel.item.created;
54
- modified = siteModel.item.modified;
55
- return (0, hub_sites_1.convertSiteToTemplate)(siteModel, hubRo);
56
- })
57
- .then(tmpl => {
58
- // add in some stuff Hub.js does not yet add
59
- tmpl.item.created = created;
60
- tmpl.item.modified = modified;
61
- tmpl.item.typeKeywords = (0, hub_common_1.without)(tmpl.item.typeKeywords, "doNotDelete");
62
- tmpl.groups = [];
63
- tmpl.estimatedDeploymentCostFactor = 2;
64
- tmpl.resources = [];
65
- if (!(0, solution_common_1.getProp)(tmpl, "properties")) {
66
- tmpl.properties = {};
67
- }
68
- // swap out dependency id's to {{<depid>.itemId}}
69
- // so it will be re-interpolated
70
- tmpl.dependencies = (0, solution_common_1.dedupe)(tmpl.dependencies);
71
- tmpl = (0, replace_item_ids_1.replaceItemIds)(tmpl);
72
- // and return it
73
- return tmpl;
74
- });
75
- }
76
- exports.convertItemToTemplate = convertItemToTemplate;
77
- /**
78
- * Handle deployment of Site item templates
79
- *
80
- * @export
81
- * @param {IItemTemplate} template
82
- * @param {*} templateDictionary
83
- * @param {UserSession} destinationAuthentication
84
- * @param {IItemProgressCallback} itemProgressCallback
85
- * @returns {Promise<ICreateItemFromTemplateResponse>}
86
- */
87
- function createItemFromTemplate(template, templateDictionary, destinationAuthentication, itemProgressCallback) {
88
- // let the progress system know we've started...
89
- const startStatus = itemProgressCallback(template.itemId, solution_common_1.EItemProgressStatus.Started, 0);
90
- // if it returned false, just resolve out
91
- if (!startStatus) {
92
- return Promise.resolve((0, solution_common_1.generateEmptyCreationResponse)(template.type));
93
- }
94
- // TODO: Reassess with resource unification
95
- if (template.assets && template.resources) {
96
- delete template.assets;
97
- }
98
- // ensure we have a solution object in the templateDictionary hash
99
- if (!templateDictionary.solution) {
100
- templateDictionary.solution = {};
101
- }
102
- // .title should always be set on the templateDictionary
103
- templateDictionary.solution.title = templateDictionary.title;
104
- // TODO: Determine if we need any transforms in this new env
105
- const transforms = {};
106
- // create an object to hold the created site through
107
- // subsequent promise calls
108
- let siteModel;
109
- // Create the "siteModel" from the template. Does not save the site item yet
110
- // Note: depending on licensing and user privs, will also create the team groups
111
- // and initiative item.
112
- let hubRo;
113
- const thumbnail = template.item.thumbnail; // createSiteModelFromTemplate trashes thumbnail
114
- return (0, solution_common_1.createHubRequestOptions)(destinationAuthentication, templateDictionary)
115
- .then(ro => {
116
- hubRo = ro;
117
- return (0, hub_sites_1.createSiteModelFromTemplate)(template, templateDictionary, transforms, hubRo);
118
- })
119
- .then(interpolated => {
120
- const options = {
121
- assets: interpolated.assets || []
122
- };
123
- // Now create the item, register for oAuth, register domain etc
124
- return (0, hub_sites_1.createSite)(interpolated, options, hubRo);
125
- })
126
- .then(site => {
127
- // hold onto the site
128
- siteModel = site;
129
- // Move the site and initiative to the solution folder
130
- // this is essentially fire and forget. We fail-safe the actual moveItem
131
- // call since it's not critical to the outcome
132
- return (0, move_model_to_folder_1.moveModelToFolder)(site, templateDictionary.folderId, destinationAuthentication);
133
- })
134
- .then(() => {
135
- // Fix the thumbnail
136
- const updateOptions = {
137
- item: {
138
- id: siteModel.item.id
139
- },
140
- params: {
141
- // Pass thumbnail in via params because item property is serialized, which discards a blob
142
- thumbnail
143
- },
144
- authentication: destinationAuthentication
145
- };
146
- return (0, arcgis_rest_portal_1.updateItem)(updateOptions);
147
- })
148
- .then(() => {
149
- // Update the template dictionary
150
- // TODO: This should be done in whatever recieves
151
- // the outcome of this promise chain
152
- templateDictionary[template.itemId] = {
153
- itemId: siteModel.item.id
154
- };
155
- // call the progress callback, which also mutates templateDictionary
156
- const finalStatus = itemProgressCallback(template.itemId, solution_common_1.EItemProgressStatus.Finished, template.estimatedDeploymentCostFactor || 2, siteModel.item.id);
157
- if (!finalStatus) {
158
- // clean up the site we just created
159
- const failSafeRemove = (0, hub_common_1.failSafe)(hub_sites_1.removeSite, { success: true });
160
- return failSafeRemove(siteModel, hubRo).then(() => {
161
- return Promise.resolve((0, solution_common_1.generateEmptyCreationResponse)(template.type));
162
- });
163
- }
164
- else {
165
- // finally, return ICreateItemFromTemplateResponse
166
- const response = {
167
- item: {
168
- ...template,
169
- ...(0, solution_common_1.convertIModel)(siteModel)
170
- },
171
- id: siteModel.item.id,
172
- type: template.type,
173
- postProcess: true
174
- };
175
- response.item.itemId = siteModel.item.id;
176
- return response;
177
- }
178
- })
179
- .catch(ex => {
180
- itemProgressCallback(template.itemId, solution_common_1.EItemProgressStatus.Failed, 0);
181
- throw ex;
182
- });
183
- }
184
- exports.createItemFromTemplate = createItemFromTemplate;
185
- /**
186
- * Deployer life-cycle hook allowing the Site Processor
187
- * a chance to apply final processes to all the items that
188
- * were created as part of the solution.
189
- * Specifically this will:
190
- * - share all items to the content team, and (if created)
191
- * the core team (depends on user privs)
192
- * - link all Page items that were created, to the Site
193
- *
194
- * @param model
195
- * @param items
196
- * @param authentication
197
- * @param templateDictionary
198
- */
199
- function postProcess(id, type, itemInfos, template, templates, templateDictionary, authentication) {
200
- let hubRo;
201
- return (0, solution_common_1.createHubRequestOptions)(authentication, templateDictionary)
202
- .then(ro => {
203
- hubRo = ro;
204
- // get the site model
205
- return (0, hub_sites_1.getSiteById)(id, hubRo);
206
- })
207
- .then(siteModel => {
208
- // Hub.js does not expect the same structures, so we delegat to a local fn
209
- return (0, _post_process_site_1._postProcessSite)(siteModel, itemInfos, templateDictionary, hubRo);
210
- })
211
- .then(() => {
212
- // resolve w/ a boolean
213
- return Promise.resolve(true);
214
- });
215
- }
216
- exports.postProcess = postProcess;
217
- /**
218
- * Check of an item type is a Site
219
- * Hub Site Application is for ArcGIS Online
220
- * Site Application is for ArcGIS Enterprise
221
- *
222
- * @param itemType
223
- */
224
- function isASite(itemType) {
225
- let result = false;
226
- if (itemType === "Hub Site Application" || itemType === "Site Application") {
227
- result = true;
228
- }
229
- return result;
230
- }
231
- exports.isASite = isASite;
232
- //# sourceMappingURL=hub-site-processor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hub-site-processor.js","sourceRoot":"","sources":["../../src/hub-site-processor.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH;;;;GAIG;AAEH,2DAW+B;AAC/B,iEAA0E;AAC1E,+CAMyB;AAEzB,iDAK0B;AAE1B,yEAAmE;AACnE,qEAAgE;AAChE,iEAA4D;AAE5D;;;;;;;;GAQG;AACH,SAAgB,qBAAqB,CACnC,cAAsB,EACtB,QAAa,EACb,kBAA+B,EAC/B,oBAAiC,IAAI,CAAC,wDAAwD;;IAE9F,IAAI,OAAO,GAAW,CAAC,CAAC;IACxB,IAAI,QAAQ,GAAW,CAAC,CAAC;IAEzB,IAAI,KAA6B,CAAC;IAClC,wBAAwB;IACxB,OAAO,IAAA,yCAAuB,EAAC,kBAAkB,CAAC;SAC/C,IAAI,CAAC,EAAE,CAAC,EAAE;QACT,KAAK,GAAG,EAAE,CAAC;QACX,OAAO,IAAA,uBAAW,EAAC,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;IACzC,CAAC,CAAC;SACD,IAAI,CAAC,SAAS,CAAC,EAAE;QAChB,sFAAsF;QACtF,OAAO,GAAG,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC;QACjC,QAAQ,GAAG,SAAS,CAAC,I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,kBAAkB,EAAE;QAC1E,MAAM,GAAG,IAAI,CAAC;KACf;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAND,0BAMC"}
@@ -1,23 +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 the creation and deployment of Hub Site and Page item types.
18
- *
19
- * @module hubTypes
20
- */
21
- import * as HubPageProcessor from "./hub-page-processor";
22
- import * as HubSiteProcessor from "./hub-site-processor";
23
- export { HubPageProcessor, HubSiteProcessor };
package/dist/cjs/index.js DELETED
@@ -1,29 +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.HubSiteProcessor = exports.HubPageProcessor = void 0;
19
- const tslib_1 = require("tslib");
20
- /**
21
- * Manages the creation and deployment of Hub Site and Page item types.
22
- *
23
- * @module hubTypes
24
- */
25
- const HubPageProcessor = tslib_1.__importStar(require("./hub-page-processor"));
26
- exports.HubPageProcessor = HubPageProcessor;
27
- const HubSiteProcessor = tslib_1.__importStar(require("./hub-site-processor"));
28
- exports.HubSiteProcessor = HubSiteProcessor;
29
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;AAEH;;;;GAIG;AAEH,+EAAyD;AAGhD,4CAAgB;AAFzB,+EAAyD;AAE9B,4CAAgB"}