Skip to content

refactor(core): consolidate format-building logic in utils#195

Open
ayeshurun wants to merge 5 commits intomicrosoft:mainfrom
ayeshurun:copilot/refactor-get-payload-function
Open

refactor(core): consolidate format-building logic in utils#195
ayeshurun wants to merge 5 commits intomicrosoft:mainfrom
ayeshurun:copilot/refactor-get-payload-function

Conversation

@ayeshurun
Copy link
Collaborator

📥 Pull Request

Move get_payload and format-building logic from Item class to fab_cmd_import_utils

✨ Description of new changes

  • Moved get_payload from fab_item.py to get_payload_for_item_type in fab_cmd_import_utils.py with a simplified generic implementation
  • Moved _build_import_definition into _build_definition in fab_cmd_import_utils.py, using definition_format_mapping to resolve format values
  • Extracted shared resolve_definition_format util in fab_item_util.py used by both export and import
  • Unified error messages via ErrorMessages.Export.invalid_definition_format
  • Resolved merge conflict with main (MAP item type support already handled by generic implementation)
  • All 99 import/export tests passing

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

ayeshurun and others added 4 commits March 17, 2026 12:14
This script benchmarks the startup performance of the CLI by measuring module import times, CLI invocation times, and heavy dependency loading. It allows comparisons against a baseline branch or tag.
…cmd_import_utils

- Create shared resolve_definition_format utility in fab_item_util.py
- Update fab_fs_export_item.py and fab_fs_import_item.py to use shared function
- Add invalid_definition_format to ExportErrors with backward-compatible alias
- Consolidate common format validation pattern across export/import commands

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ayeshurun ayeshurun changed the title refactor(core): move get_payload and _build_import_definition to fab_cmd_import_utils refactor(core): consolidate format-building logic in utils Mar 22, 2026
@ayeshurun ayeshurun requested a review from a team as a code owner March 23, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants