-
Notifications
You must be signed in to change notification settings - Fork 127
Change getFileDataURI to getFileObject #1212
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the file content API by replacing getFileDataURI with a more comprehensive getFileObject function, while simplifying getFileContent to only return string content. The new getFileObject returns a structured object containing base64-encoded data along with file type metadata (MIME type, type identifier, and filename extension).
Changes:
- Replaced
getFileDataURIwithgetFileObjectthat returns structured metadata about files - Simplified
getFileContentto remove thebase64Encodedparameter and only return string content - Updated the markedit-api dependency from v0.19.0 to v0.20.0
Reviewed changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| MarkEditKit/Sources/Bridge/Native/Modules/EditorModuleAPI.swift | Added UniformTypeIdentifiers import; simplified getFileContent; implemented new getFileObject with metadata |
| MarkEditKit/Sources/Bridge/Native/Generated/NativeModuleAPI.swift | Updated protocol and bridge to include getFileObject method and removed base64Encoded parameter from getFileContent |
| CoreEditor/src/bridge/native/api.ts | Updated TypeScript interface to match new Swift API signatures |
| CoreEditor/src/api/modules.ts | Updated export from getFileDataURI to getFileObject |
| CoreEditor/src/api/files.ts | Implemented new getFileObject function that parses JSON response; simplified getFileContent |
| CoreEditor/package.json | Bumped markedit-api dependency to v0.20.0 |
| CoreEditor/yarn.lock | Updated markedit-api lockfile entry with new version and checksum |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 5 out of 7 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@cyanzhong I've opened a new pull request, #1213, to work on those changes. Once the pull request is ready, I'll request review from you. |
No description provided.