storyblok-cli
storyblok-cli copied to clipboard
Introduce Datasource Filtering on sync command based on Name and Slug
Pull request type
Jira Link: INT-
- [ ] Bugfix
- [X] Feature
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Other (please describe):
How to test this PR
-
Run the following command to test the datasource filtering feature by slug:
./cli.js sync --type datasources <source-space-id> --target <target-space-id> --datasources-starts-with-slug global
An example of the terminal output: datasources where the slug starts with "global": global-translations-Mobility, global-projects. -
Test the datasource filtering feature by name using the following command:
./cli.js sync --type datasources <source-space-id> --target <target-space-id> --datasources-starts-with-name global
An example of the terminal output: datasources where the slug starts with "global": Global Translations Mobility, Global Projects. -
Verify that only the datasources belonging to the specified name and/or slug are synchronized between the source and target. Datasources that do not match the specified name and/or slug should not be synchronized.
-
Experiment with different combinations of name and/or slug to ensure that the filtering feature functions as expected.
Please note that the --datasources-starts-with-slug and --datasources-starts-with-name options enable filtering based on the provided name and/or slug. Replace
What is the new behavior?
This pull request introduces a new feature that enhances the datasource synchronization by allowing filtering based on the name and/or slug of the datasources. With this feature, users can selectively synchronize only the datasources that match the specified name and/or slug, providing a more efficient way to manage a large number of data sources across different projects.