Background
Currently, the @startupjs-ui/file-input package does not include any provider packages as dependencies, which can lead to issues when deploying applications across different storage environments. This setup requires manual installation of the necessary provider packages, which can result in version conflicts and broken APIs over time.
Task
- Objective: Refactor
file-input to use a modular plugin system for providers, allowing each provider to be a separate package with fixed dependencies.
Proposed Solution
-
Create a Core file-input Package:
- Develop a generic core package that acts as a wrapper for the file input functionality.
- This package should be independent of any specific storage provider.
-
Develop Provider Plugins:
- Implement each storage provider (e.g., Azure, S3) as a separate plugin package.
- Each plugin should have its own fixed dependencies, ensuring compatibility with the core package and avoiding future breaking changes.
-
Plugin Architecture:
- Define a clear API for how plugins should interact with the core package.
- Allow dynamic loading of plugins based on environment variables or configuration settings.
-
Version Management:
- Fix the versions of dependencies within each provider plugin to prevent breaking changes.
- Ensure that the core package and plugins are versioned independently to facilitate updates and maintenance.
Background
Currently, the
@startupjs-ui/file-inputpackage does not include any provider packages as dependencies, which can lead to issues when deploying applications across different storage environments. This setup requires manual installation of the necessary provider packages, which can result in version conflicts and broken APIs over time.Task
file-inputto use a modular plugin system for providers, allowing each provider to be a separate package with fixed dependencies.Proposed Solution
Create a Core
file-inputPackage:Develop Provider Plugins:
Plugin Architecture:
Version Management: