-
Notifications
You must be signed in to change notification settings - Fork 73
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
Remember installed verbs for a container #1824
Comments
Any preferred technical solution how to store this? Is there maybe a standard solution for this problem? |
I don't think that there is a standard solution. I think the easiest and best fitting way in our case is in a plain text file, maybe using the |
We need a bean to read and write into a global configuration file. The implementation is nor important, it could be a local json file as long as we take care about race conditions |
Global? Wouldn't it be better per container? |
Yep, same principle. We already have a config file per container |
Just to be sure ;) |
I would like to implement this soon. I think the issue can be divided in two parts:
Open issues: @ImperatorS79 do you want to help with the necessary script changes? |
If a verb installation fails somehow, I would like to be possible to reinstall the verb. Maybe add a v next to the verb to say it is already installed ? |
I would suggest to call I think a |
I just opened a PR with the Java/Phoenicis part (#2070). @ImperatorS79 do you want to give the JS part a try? |
The new engine methods look like: /**
* Registers as verb as being "installed"
*
* @param verbId The ID of the verb
* @param container The container where the verb has been installed
*/
void registerVerb(String verbId, String container);
/**
* Checks whether a given verb has been registered as being "installed"
*
* @param verbId The ID of the verb
* @param container The container where the verb has been installed
* @return True if the verb has been registered as being "installed", false otherwise
*/
boolean isVerbRegistered(String verbId, String container); |
We could add the verb to phoenicis.cfg inside a container: verb: [verb1, verb2]. what the verb ID looks like ? I would like this to be still readable. |
The verb id is the script id, e.g. for adobeair it is |
I don't think it's a good idea to hard code the script IDs. This issue applies to all scripts. Maybe we could solve it with a |
We need a universal applicable solution that not only works for the I think your idea is quite could, let me extend it a bit. We could add an additional input to our module lambda function in: Line 35 in 4fd516e
We could change this to: String extendedString = String.format("(module, ModuleInfo) => { %s }", script);
I think for completeness we should also change our installer scripts to be modules. |
Could you give an example how this would look like in Javascript?
Yes. |
Inside the scripts you could access the module infos then like the following:
|
see #1242 |
Currently Phoenicis doesn't remember which verbs were installed in a container. This contains both the verbs installed via a script and the ones installed via the container tab.
To help the user know the current state of his container(s) it is a good idea to save the installed verbs for each container in a file in the container folder. The content of this file could then be used to:
The text was updated successfully, but these errors were encountered: