-
Notifications
You must be signed in to change notification settings - Fork 68
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
[Feat] Removing Axios for Native Fetch #1278
Conversation
url: downloadUri, | ||
responseType: 'stream', | ||
}) | ||
|
||
const { data: checksum }: { data: string } = await sendHttpRequest({ | ||
const { data: downloadStream } = (await resp.json()) as { data: Stream } |
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.
I think we can get stream from resp.body
instead of resp.json()
?
ref https://developer.mozilla.org/en-US/docs/Web/API/Streams_API/Using_readable_streams
} | ||
|
||
private async report(): Promise<void> { | ||
// Create a task data object | ||
const taskData = { | ||
apiKey: this.apiKey, | ||
httpClient: this.httpClient, | ||
// httpClient: this.httpClient, |
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.
dead code ?
} | ||
|
||
function mapInsomniaToConfig(data: unknown): Config { | ||
function mapInsomniaToConfig( |
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.
for effectivity mapInsomniaToConfig and mapInsomniaRequestToConfig can be merged. By making mapInsomniaToConfig as a pure function that return insomniaRequests array, then call it from inside mapInsomniaRequestToConfig rather than just passing parameters to the next function.
@sapiderman theres snapcraft-credential file committed |
Monika Pull Request (PR)
What feature/issue does this PR add
How did you implement / how did you fix it
How to test
npm start -- -c test.yaml
should worknpm test
should all passmonika -c https://raw.githubusercontent.com/hyperjumptech/monika/main/config_sample/config.desktop.example.yml
should be fetched properlymonika --auto-update patch
should work