4 Commits

Author SHA1 Message Date
Yeuoly 7f463e32f6 feat(plugin_decoder): add support for internationalized readme files (#393)
* feat(plugin_decoder): add support for internationalized readme files

- Introduced the AvailableI18nReadme method in the PluginDecoder interface to retrieve available readme files in multiple languages.
- Implemented the method in FSPluginDecoder and ZipPluginDecoder to read localized readme files from the filesystem and zip archives.
- Enhanced UnixPluginDecoder to handle readme files in a structured manner, including support for reading from a dedicated "readme" directory.
- Added unit tests to verify the functionality of the AvailableI18nReadme method and ensure correct retrieval of localized readme content.

* feat(plugin): add support for multilingual README generation

- Introduced functionality to create README files in multiple languages (Simplified Chinese, Japanese, Portuguese) based on user selection.
- Enhanced the profile management to include options for enabling internationalized README and selecting languages.
- Added new language choice structure to manage language options and their selection state.
- Implemented rendering and writing of language-specific README files during plugin creation.
- Included new README template files for each supported language.

* feat(plugin): add README command and list functionality

- Introduced a new `readme` command to the plugin CLI for managing README files.
- Added `list` subcommand to display available README languages for a specified plugin path.
- Implemented functionality to read and list supported README languages in a tabular format.
- Enhanced error handling for plugin file reading and decoding processes.
2025-07-21 16:02:26 +08:00
Yeuoly 478c98da5c fix: signature dose not work as expected, if upload new pkg to old dify (#311)
- Updated the  method in the  interface to remove the  parameter, simplifying its usage.
- Introduced a new  function to provide a default verification structure.
- Added a  file to store verification data, improving the plugin signing process.
- Enhanced tests in  to validate the verification process, ensuring proper handling of success and failure scenarios.
- Refactored related code to accommodate the new verification structure and improve overall maintainability.
2025-05-26 13:10:34 +08:00
Yeuoly 9a1da25d59 feat: Enhance plugin signing with authorized category verification (#293)
* feat: Enhance plugin signing with authorized category verification

- Added support for an `authorized_category` flag in the signature command to validate the category before signing.
- Updated the `Sign` function to accept a verification parameter, allowing for category-based signing.
- Enhanced error handling for invalid categories during the signing process.
- Updated tests to cover new verification scenarios and ensure proper functionality with the authorized category.

* fix

* fix

* test

* test: Add unit test for plugin verification without verification field

- Introduced a new test case to verify the behavior of plugins that lack a verification field.
- Updated the signature_test.go file to include the test, ensuring proper functionality of the signing process.
- Removed the outdated verifier_test.go file and associated test data to streamline the codebase.
2025-05-21 20:05:45 +08:00
Yeuoly 975f9d5c31 fix: move packager to pkg 2025-02-06 18:16:49 +08:00