Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add manifest.json content as part of ConfigurationBuilder #120

Open
TylerLeonhardt opened this issue Feb 16, 2019 · 2 comments
Open

Add manifest.json content as part of ConfigurationBuilder #120

TylerLeonhardt opened this issue Feb 16, 2019 · 2 comments

Comments

@TylerLeonhardt
Copy link

TylerLeonhardt commented Feb 16, 2019

Is your feature request related to a problem? Please describe.

I want to be able to dynamically register actions based on the Actions that are present in the manifest.json.

It would be nice to already have an manifest object available at startup to interact with.

Describe the solution you'd like

The ConfigurationBuilder has a LoggerFactory today. It would be nice to expose the manifest.json as a part of the ConfigurationBuilder.

or

Let it be its own entity like ManifestParser or something like that that can supply you with a parsed Manifest object on start up.

I'd love to be able to do:

foreach( Action action in Manifest.Actions)
{
    cm.RegisterAction(new MyAction(action.uuid);
}

Additional context

My goal is to use StreamDeckToolkit to create a totally self contained PowerShell script runner. You will be able to do:

New-StreamDeckAction -X 3 -Y 4 -Icon foo.png -ScriptBlock {
   Write-Host "hello world"
}

and then once you restart StreamDeck.exe, it will show up.

To do this, I'd like to still only have 1 instance of the StreamDeckToolkit running so I need to be able to dynamically make Actions.

@csharpfritz
Copy link
Collaborator

Not sure this is the best approach, as the manifest is never used by our code and is an artifact used by the StreamDeck application.

Are you just looking for bootstrapping all of the actions?

@TylerLeonhardt
Copy link
Author

Yeah I mainly want this feature as an easy way to get the Actions field so I can dynamically register Action objects based on the Actions in the manifest.json.

new PowerShellAction(uuid: action.UUID)

The only reason I suggested the whole manifest.json in this issue is that it's probably not too much additional work than just getting the Actions

This would also mean a User's plugin could have access to the entire Stream Deck metadata of their plugin and Actions which seemed like something people may want, potentially.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants