@esri/solution-creator 6.5.0-next.20260120 → 6.5.0-next.20260123

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.
@@ -169,3 +169,10 @@ export declare function _templatizeSolutionIds(templates: IItemTemplate[]): void
169
169
  * @param templateDictionary Hash of key details used for variable replacement
170
170
  */
171
171
  export declare function _templatizeWorkflowConfig(templates: IItemTemplate[], templateDictionary: any): void;
172
+ /**
173
+ * Determines to use the Auth source portal or the portal in template dictionary
174
+ *
175
+ * @param sourcePortal THe portal information of the source authentication
176
+ * @param templateDictionary Hash of key details used for variable replacement
177
+ */
178
+ export declare function _getSourceBaseOrTemplateBaseURL(sourcePortal: any, templateDictionary: any): string;
@@ -15,7 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
- exports._templatizeWorkflowConfig = exports._templatizeSolutionIds = exports._templatizeOrgUrl = exports._simplifyUrlsInItemDescriptions = exports._restoreDataFilesToTemplates = exports._replaceRemainingIdsInString = exports._replaceRemainingIdsInObject = exports._replaceDictionaryItemsInObject = exports._getDataFilesFromTemplates = exports._postProcessIgnoredItems = exports._postProcessGroupDependencies = exports._postProcessTaskResource = exports._getTemplateVariables = exports._getSolutionItemUrls = exports._getOrgUrl = exports._getIdsOutOfTemplateVariables = exports._getDependencies = exports.addContentToSolution = void 0;
18
+ exports._getSourceBaseOrTemplateBaseURL = exports._templatizeWorkflowConfig = exports._templatizeSolutionIds = exports._templatizeOrgUrl = exports._simplifyUrlsInItemDescriptions = exports._restoreDataFilesToTemplates = exports._replaceRemainingIdsInString = exports._replaceRemainingIdsInObject = exports._replaceDictionaryItemsInObject = exports._getDataFilesFromTemplates = exports._postProcessIgnoredItems = exports._postProcessGroupDependencies = exports._postProcessTaskResource = exports._getTemplateVariables = exports._getSolutionItemUrls = exports._getOrgUrl = exports._getIdsOutOfTemplateVariables = exports._getDependencies = exports.addContentToSolution = void 0;
19
19
  const tslib_1 = require("tslib");
20
20
  const solution_common_1 = require("@esri/solution-common");
21
21
  const hub_common_1 = require("@esri/hub-common");
@@ -344,8 +344,10 @@ async function _postProcessTaskResource(templates, resourceItemFiles, templateDi
344
344
  "X-Esri-Authorization": `Bearer ${srcAuthentication.token}`,
345
345
  },
346
346
  };
347
+ const sourcePortal = await srcAuthentication.getPortal();
347
348
  const resourcePromises = taskKeys.map((k) => {
348
- return (0, solution_common_1.request)((0, solution_common_1.generateSourceResourceUrl)(`${templateDictionary.portalBaseUrl}/sharing/rest`, taskResources[k].itemId, taskResources[k].filename), requestOptions);
349
+ const baseURL = _getSourceBaseOrTemplateBaseURL(sourcePortal, templateDictionary);
350
+ return (0, solution_common_1.request)((0, solution_common_1.generateSourceResourceUrl)(baseURL, taskResources[k].itemId, taskResources[k].filename), requestOptions);
349
351
  });
350
352
  await Promise.all(resourcePromises).then(async (resources) => {
351
353
  resources.forEach((r) => {
@@ -671,3 +673,15 @@ function _templatizeWorkflowConfig(templates, templateDictionary) {
671
673
  });
672
674
  }
673
675
  exports._templatizeWorkflowConfig = _templatizeWorkflowConfig;
676
+ /**
677
+ * Determines to use the Auth source portal or the portal in template dictionary
678
+ *
679
+ * @param sourcePortal THe portal information of the source authentication
680
+ * @param templateDictionary Hash of key details used for variable replacement
681
+ */
682
+ function _getSourceBaseOrTemplateBaseURL(sourcePortal, templateDictionary) {
683
+ return sourcePortal.portalHostname
684
+ ? `https://${sourcePortal.portalHostname}/sharing/rest`
685
+ : `${templateDictionary.portalBaseUrl}/sharing/rest`;
686
+ }
687
+ exports._getSourceBaseOrTemplateBaseURL = _getSourceBaseOrTemplateBaseURL;
@@ -169,3 +169,10 @@ export declare function _templatizeSolutionIds(templates: IItemTemplate[]): void
169
169
  * @param templateDictionary Hash of key details used for variable replacement
170
170
  */
171
171
  export declare function _templatizeWorkflowConfig(templates: IItemTemplate[], templateDictionary: any): void;
172
+ /**
173
+ * Determines to use the Auth source portal or the portal in template dictionary
174
+ *
175
+ * @param sourcePortal THe portal information of the source authentication
176
+ * @param templateDictionary Hash of key details used for variable replacement
177
+ */
178
+ export declare function _getSourceBaseOrTemplateBaseURL(sourcePortal: any, templateDictionary: any): string;
@@ -334,8 +334,10 @@ export async function _postProcessTaskResource(templates, resourceItemFiles, tem
334
334
  "X-Esri-Authorization": `Bearer ${srcAuthentication.token}`,
335
335
  },
336
336
  };
337
+ const sourcePortal = await srcAuthentication.getPortal();
337
338
  const resourcePromises = taskKeys.map((k) => {
338
- return request(generateSourceResourceUrl(`${templateDictionary.portalBaseUrl}/sharing/rest`, taskResources[k].itemId, taskResources[k].filename), requestOptions);
339
+ const baseURL = _getSourceBaseOrTemplateBaseURL(sourcePortal, templateDictionary);
340
+ return request(generateSourceResourceUrl(baseURL, taskResources[k].itemId, taskResources[k].filename), requestOptions);
339
341
  });
340
342
  await Promise.all(resourcePromises).then(async (resources) => {
341
343
  resources.forEach((r) => {
@@ -649,3 +651,14 @@ export function _templatizeWorkflowConfig(templates, templateDictionary) {
649
651
  }
650
652
  });
651
653
  }
654
+ /**
655
+ * Determines to use the Auth source portal or the portal in template dictionary
656
+ *
657
+ * @param sourcePortal THe portal information of the source authentication
658
+ * @param templateDictionary Hash of key details used for variable replacement
659
+ */
660
+ export function _getSourceBaseOrTemplateBaseURL(sourcePortal, templateDictionary) {
661
+ return sourcePortal.portalHostname
662
+ ? `https://${sourcePortal.portalHostname}/sharing/rest`
663
+ : `${templateDictionary.portalBaseUrl}/sharing/rest`;
664
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/solution-creator",
3
- "version": "6.5.0-next.20260120",
3
+ "version": "6.5.0-next.20260123",
4
4
  "description": "Manages the creation of a Solution item for @esri/solution.js.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -25,18 +25,18 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@esri/hub-common": "^17.0.2",
28
- "@esri/solution-common": "^6.5.0-next.20260120",
29
- "@esri/solution-feature-layer": "^6.5.0-next.20260120",
30
- "@esri/solution-file": "^6.5.0-next.20260120",
31
- "@esri/solution-form": "^6.5.0-next.20260120",
32
- "@esri/solution-group": "^6.5.0-next.20260120",
33
- "@esri/solution-hub-types": "^6.5.0-next.20260120",
34
- "@esri/solution-simple-types": "^6.5.0-next.20260120",
35
- "@esri/solution-storymap": "^6.5.0-next.20260120",
36
- "@esri/solution-velocity": "^6.5.0-next.20260120",
37
- "@esri/solution-web-experience": "^6.5.0-next.20260120",
38
- "@esri/solution-web-tool": "^6.5.0-next.20260120",
39
- "@esri/solution-workflow": "^6.5.0-next.20260120",
28
+ "@esri/solution-common": "^6.5.0-next.20260123",
29
+ "@esri/solution-feature-layer": "^6.5.0-next.20260123",
30
+ "@esri/solution-file": "^6.5.0-next.20260123",
31
+ "@esri/solution-form": "^6.5.0-next.20260123",
32
+ "@esri/solution-group": "^6.5.0-next.20260123",
33
+ "@esri/solution-hub-types": "^6.5.0-next.20260123",
34
+ "@esri/solution-simple-types": "^6.5.0-next.20260123",
35
+ "@esri/solution-storymap": "^6.5.0-next.20260123",
36
+ "@esri/solution-velocity": "^6.5.0-next.20260123",
37
+ "@esri/solution-web-experience": "^6.5.0-next.20260123",
38
+ "@esri/solution-web-tool": "^6.5.0-next.20260123",
39
+ "@esri/solution-workflow": "^6.5.0-next.20260123",
40
40
  "tslib": "1.14.1"
41
41
  },
42
42
  "scripts": {
@@ -91,5 +91,5 @@
91
91
  "esri",
92
92
  "ES6"
93
93
  ],
94
- "gitHead": "63a939e1972eec7b4fb1a434aaa12646a45dffe0"
94
+ "gitHead": "2b5602e8c167919f76fc840ba3a53c2cfbd21533"
95
95
  }