Re-templatize a Deployed Solution#1520
Conversation
delete items no longer valid add new items in the folder updated create demo app to only use 1 login.
MikeTschudi
left a comment
There was a problem hiding this comment.
- Perhaps it would be better to create a new demo, e.g., "recreateSolution" rather than modify "createSolution"?
- Is the speed for checking for existing items acceptable? For speed, you could push the promise for each item or group fetch into an array, and then use Promise.allSettled() to wait for all of the results.
|
The general approach sounds good to me. |
|
Ok, let me make a different demo for re-deployed solutions. I'll try adding a promises.all to the logic. |
|
For example, const itemFetchPromises = solutionData.templates.map((template: any) => {
return common.getItemBase(template.itemId as string, userSession);
});
const itemFetches = await Promise.allSettled(itemFetchPromises);
const items = itemFetches
.filter((item: any) => item.status === "fulfilled")
.map((item: any) => item.value); |
change to use promise and then added more parameters to searchItems
made a new demo for recreate workflow. also reverted create demo.
check for new groups added to the tag
replace tags and keywords
added extra properties to CreateOptions
adding additional information
code refined and tests added.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #1520 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 153 153
Lines 8301 8347 +46
Branches 1903 1920 +17
=========================================
+ Hits 8301 8347 +46 ☔ View full report in Codecov by Sentry. |
clean comment
|
@MikeTschudi @jmhauck can you guys review this for merging this time. Added a new demo so there's alot of files around that making it seem a bigger PR than it is. |
| } | ||
| } | ||
|
|
||
| export async function _updateCreateOptionForReDeployedTemplate( |
There was a problem hiding this comment.
Would you please add function documentation?
There was a problem hiding this comment.
right! thanks for the reminder.
There was a problem hiding this comment.
added function doc.
added function documentation
Hey guys,
This is more a review right now than a merge. Can you see if I forgot any gotchas in this work. Idea is that you can re-templatize a solution you deployed. And below is my assumptions
Also, in the Create JS Demo, I removed (hide) the destination credentials. It causes issues when destination is not the same as source for some items. Since Creation App only has one login, kept it the same way.
https://devtopia.esri.com/WebGIS/solution-deployment-apps/issues/268