adobe / reactor-sandbox

Tasks for creating a sandbox for manually testing Adobe Experience Platform Tags extensions.
Apache License 2.0
7 stars 15 forks source link

Add getDefaultInitInfo option in run command #91

Open jonsnyder opened 1 year ago

jonsnyder commented 1 year ago

Description

This adds a new api endpoint "/defaultInitInfo/:type/:name" which returns the default init info for a component. This api endpoint calls a user specified callback to modify the initInfo, getDefaultInitInfo. This is useful for generating and setting an access token or setting up custom defaults for extensionSettings or other properties in the initInfo.

Related Issue

Motivation and Context

I got tired of manually adding an access token and IMS orgId when developing the Tags extension for AEP Web SDK. Also we have a drop down that gets data from the extensionSettings part of initInfo to select the Alloy instance. This errors out when the extensionSettings is {"foo": "bar }.

This change will save our team lots of time and frustration as before now we have had to copy and paste tokens, and remember how to get the instance name picker to work.

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

Checklist: