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

introduce perses object in package.json and change the way the archives are created #7

Merged
merged 2 commits into from
Aug 6, 2024

Conversation

Nexucis
Copy link
Member

@Nexucis Nexucis commented Aug 5, 2024

This PR introduced a new file TYPE where you can write the type of the plugin (panel, query, datasource, variable)

It also changed a bit how the archive are built.
The archive contained now the file TYPE, the README.md and of course the content of the dist folder

And it also remove any additional folder that was at the root of the archive and that wasn't necessary.
The archive name contains also the version of the plugin.

Should be merged after #6

@Nexucis Nexucis requested a review from jgbernalp August 5, 2024 13:55
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
@@ -22,28 +22,30 @@ import (
"github.com/sirupsen/logrus"
)

var pluginFiles = []string{
"dist/",
"TYPE",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it be better to create a plugin.json file so we can include other metadata, such as author, version, etc?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if it makes sense since these metadata info can be found in the package.json already.
Perhaps we can include the package.json in the archive as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having a specific json file for the plugin could be interesting if we have info that cannot be found in the package.json or in the file mf-manifest.json

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then we could use the package.json with a custom field perses if we need to include more metadata as the package.json should hold already the version of the plugin and author. We can add there the plugin type like:

perses:{
  pluginType:"panel"
}

WDYT?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yeah I like this idea. Will make the changes ! Thanks 🙏

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@Nexucis Nexucis force-pushed the nexucis/rework-archive branch from 033cb55 to 688ad21 Compare August 5, 2024 15:37
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
@Nexucis Nexucis changed the title introduce a type file and change the way the archives are created introduce perses object in package.json and change the way the archives are created Aug 6, 2024
@Nexucis Nexucis merged commit e9b6a4a into main Aug 6, 2024
4 checks passed
@Nexucis Nexucis deleted the nexucis/rework-archive branch August 6, 2024 08:40
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

Successfully merging this pull request may close these issues.

2 participants