Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/six-bobcats-draw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@redocly/cli": patch
---

Increased the default fetch timeout used by the `push` command to better support slower uploads.
3 changes: 1 addition & 2 deletions packages/cli/src/reunite/api/api-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { yellow, red } from 'colorette';
import fetchWithTimeout, {
type FetchWithTimeoutOptions,
DEFAULT_FETCH_TIMEOUT,
SOURCE_FETCH_TIMEOUT,
} from '../../utils/fetch-with-timeout';

import type { ReadStream } from 'fs';
Expand Down Expand Up @@ -110,7 +109,7 @@ class RemotesApi {
const response = await this.client.request(
`${this.domain}/api/orgs/${organizationId}/projects/${projectId}/source`,
{
timeout: SOURCE_FETCH_TIMEOUT,
timeout: DEFAULT_FETCH_TIMEOUT,
method: 'GET',
headers: {
'Content-Type': 'application/json',
Expand Down
3 changes: 1 addition & 2 deletions packages/cli/src/utils/fetch-with-timeout.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { getProxyAgent } from '@redocly/openapi-core';

export const DEFAULT_FETCH_TIMEOUT = 3000;
export const SOURCE_FETCH_TIMEOUT = 6000;
export const DEFAULT_FETCH_TIMEOUT = 6000;

export type FetchWithTimeoutOptions = RequestInit & {
timeout?: number;
Expand Down
Loading