@esri/solution-creator 6.5.0-next.20260122 → 6.5.0-next.20260124
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
|
-
|
|
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
|
-
|
|
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.
|
|
3
|
+
"version": "6.5.0-next.20260124",
|
|
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.
|
|
29
|
-
"@esri/solution-feature-layer": "^6.5.0-next.
|
|
30
|
-
"@esri/solution-file": "^6.5.0-next.
|
|
31
|
-
"@esri/solution-form": "^6.5.0-next.
|
|
32
|
-
"@esri/solution-group": "^6.5.0-next.
|
|
33
|
-
"@esri/solution-hub-types": "^6.5.0-next.
|
|
34
|
-
"@esri/solution-simple-types": "^6.5.0-next.
|
|
35
|
-
"@esri/solution-storymap": "^6.5.0-next.
|
|
36
|
-
"@esri/solution-velocity": "^6.5.0-next.
|
|
37
|
-
"@esri/solution-web-experience": "^6.5.0-next.
|
|
38
|
-
"@esri/solution-web-tool": "^6.5.0-next.
|
|
39
|
-
"@esri/solution-workflow": "^6.5.0-next.
|
|
28
|
+
"@esri/solution-common": "^6.5.0-next.20260124",
|
|
29
|
+
"@esri/solution-feature-layer": "^6.5.0-next.20260124",
|
|
30
|
+
"@esri/solution-file": "^6.5.0-next.20260124",
|
|
31
|
+
"@esri/solution-form": "^6.5.0-next.20260124",
|
|
32
|
+
"@esri/solution-group": "^6.5.0-next.20260124",
|
|
33
|
+
"@esri/solution-hub-types": "^6.5.0-next.20260124",
|
|
34
|
+
"@esri/solution-simple-types": "^6.5.0-next.20260124",
|
|
35
|
+
"@esri/solution-storymap": "^6.5.0-next.20260124",
|
|
36
|
+
"@esri/solution-velocity": "^6.5.0-next.20260124",
|
|
37
|
+
"@esri/solution-web-experience": "^6.5.0-next.20260124",
|
|
38
|
+
"@esri/solution-web-tool": "^6.5.0-next.20260124",
|
|
39
|
+
"@esri/solution-workflow": "^6.5.0-next.20260124",
|
|
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": "
|
|
94
|
+
"gitHead": "a3b2c1ab10c75058a4cc75cdb5ee6e67a8149a4a"
|
|
95
95
|
}
|