Skip to content

Add getDefaultInitInfo option in run command#91

Open
jonsnyder wants to merge 5 commits intoadobe:masterfrom
jonsnyder:getDefaultInitInfoOption
Open

Add getDefaultInitInfo option in run command#91
jonsnyder wants to merge 5 commits intoadobe:masterfrom
jonsnyder:getDefaultInitInfoOption

Conversation

@jonsnyder
Copy link

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

1 participant