Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

minor api refactor - just an initial PR as a test#531

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
jaggederest wants to merge2 commits intomain
base:main
Choose a base branch
Loading
fromjaggederest/api_refactor

Conversation

jaggederest
Copy link

No description provided.

@jaggederestjaggederest self-assigned thisJun 13, 2025
Copy link

@CopilotCopilotAI left a 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 API module by centralizing configuration access, extracting helper routines for file/path management, and unifying streaming logic.

  • Addedconfig, path, cert/key getters, andreadFile helpers to reduce repetition
  • RefactoredneedToken andcreateHttpAgent to use new helpers
  • Extracted shared stream‐to‐ReadableStream code intogetStreamFromResponse and updated the fetch adapter
Comments suppressed due to low confidence (2)

src/api.ts:41

  • [nitpick] The namecheckEmptyString suggests a boolean return; rename this to something likenonEmptyStringOrUndefined to clarify its behavior.
function checkEmptyString(str: string): string | undefined {

src/api.ts:187

  • [nitpick] Indentation here is inconsistent with surrounding code; aligning this block will improve readability.
const getHeaderFromResponse = (name: string) => {

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

At least 1 approving review is required to merge this pull request.

Assignees

@jaggederestjaggederest

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@jaggederest

[8]ページ先頭

©2009-2025 Movatter.jp