-
Notifications
You must be signed in to change notification settings - Fork 4
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
V3 export import #3
Open
Moonlight63
wants to merge
13
commits into
Prototypr:main
Choose a base branch
from
Moonlight63:v3-export-import
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…t controllers - Improved error handling in ExportModal and error utility functions to better manage FetchError types. - Updated Editor component to include TypeScript types for props. - Removed deprecated models.js utility file and adjusted imports across services and controllers. - Cleaned up error messages in export controllers for better clarity. - Standardized import statements for consistency.
- Updated ExportModal and ImportModal components to include the exportAllLocales option. - Modified export and import controllers to handle the new exportAllLocales flag. - Enhanced data processing in export services to support exporting all locales. - Improved handling of localizations in import services to align with the new exportAllLocales feature. - Refactored related functions for better clarity and maintainability.
- Added error handling for import processes, including detailed error reporting in the ImportModal. - Updated ImportModal component to display errors and failures using new UI elements like Accordion and Tabs. - Enhanced server-side import logic to capture and return errors during data parsing and processing. - Improved translation strings for error messages in the import process. - Refactored import services to support structured error reporting and validation of file content.
…provements - Added checkboxes for 'updateExisting' and 'ignoreMissingRelations' in the ImportEditor component to allow users to customize import behavior. - Updated the ImportModal to reset upload state upon data source reset. - Enhanced server-side import logic to handle new options and improve validation of imported data. - Refactored validation functions to support new options and ensure better error reporting. - Improved logging for debugging purposes during import processes.
…ed validation - Added new export options in ExportModal for 'exportRelations', 'deepPopulateRelations', and 'deepPopulateComponentRelations'. - Updated ImportEditor to include 'existingAction' options for handling existing entries during import. - Enhanced server-side export and import logic to support new options and improve data processing. - Refactored validation functions to accommodate new import options and ensure better error reporting. - Improved handling of relations in export services to ensure accurate data processing and integrity.
…essing - Introduced new import options: 'allowLocaleUpdates' and 'disallowNewRelations' to provide more control over import behavior. - Refactored ImportContext and ImportProcessor classes to better manage processed records and improve error handling. - Enhanced validation and processing logic to accommodate new options, ensuring robust data integrity during imports. - Improved logging for better debugging and tracking of import processes. - Updated interfaces for ImportFailure and ImportError to maintain consistency and clarity in error reporting.
…rovements - Updated ExportModal and ImportModal components to include new options for handling relations and export formats. - Refactored shouldShowOption logic to accommodate new conditions for displaying options based on selected formats. - Enhanced ImportEditor to support versioning and improved error handling during data import. - Improved user interface with hints and structured layouts for better user experience. - Added new translation strings for enhanced clarity in export/import options. - Cleaned up and optimized import/export processing logic for better performance and maintainability.
…on details - Enhanced README.md with comprehensive plugin configuration instructions, key features of the v3 format, and detailed import/export processes. - Added troubleshooting tips and best practices for using the plugin effectively. - Updated About component to reflect changes in Strapi 5 versions and provide links to original repositories. - Removed outdated references and improved clarity in documentation for better user guidance.
…ed error handling - Added new parameters to export and import controllers, including 'documentIds', 'exportAllLocales', 'exportRelations', and 'deepPopulateRelations' for more granular control over data processing. - Updated exportData and importData functions to accommodate new options and improve data handling. - Enhanced error handling during data import to provide clearer feedback on failures and issues. - Refactored validation logic to ensure robust processing and integrity of imported/exported data.
…ecide to do a pretty big refactor and commit and push without testing to make sure you didn't forget anything? Yeah, that was me. I think I fixed it now.
- Updated validation for ID fields to ensure 'uid' type attributes are handled correctly, requiring them to be optional. - Refactored error messages for clarity, specifying requirements based on attribute types. - Integrated the validateIdField function into the import validation process to centralize ID field checks and enhance consistency across services.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
JSON v3 Format
The v3 format is a complete rewrite that focuses on properly handling draft/published content in Strapi 5:
Key Features
Export Options
Import Options
ID Field Configuration
The v3 format uses a unique identifier field to track and match entries during import/export. This field must be both required and unique in your schema.
Setting Custom ID Field
You can configure which field to use as the identifier in your schema's plugin options:
Automatic ID Field Selection
If no idField is configured, the plugin will automatically look for fields in this order:
uid
- Typically a UUID from a custom field like Advanced-UUIDname
- If the content type is a single entry type, this is a good defaulttitle
- Another common identifier fieldid
- Falls back to Strapi's internal ID as last resort, but will not be exported with the dataHow It Works
Bulk Actions
The plugin adds an "Export" button to Strapi's bulk actions menu. This appears when you select one or more entries in the content manager:
Export Process
Initial Export
Relation Processing
Media Handling
Import Process
Validation
Entry Processing
Media Import
Troubleshooting
Common Issues
serverPublicHostname
is configured correctlyImport Validation Errors
The plugin performs several validations before import:
Best Practices