@globalbrain/sefirot 4.35.3 → 4.35.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/http/Http.ts +3 -1
- package/lib/stores/HttpConfig.ts +1 -1
- package/package.json +1 -1
package/lib/http/Http.ts
CHANGED
|
@@ -61,7 +61,9 @@ export class Http {
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
private async performRequestRaw<T>(url: string, options: FetchOptions = {}): Promise<FetchResponse<T>> {
|
|
64
|
-
|
|
64
|
+
// 'raw' is unavailable in useRequestFetch() during SSR, but performRequestRaw is only
|
|
65
|
+
// called by download, which runs client-side, so asserting raw's existence is safe
|
|
66
|
+
return this.config.client.raw!(...(await this.buildRequest(url, options)))
|
|
65
67
|
}
|
|
66
68
|
|
|
67
69
|
async get<T = any>(url: string, options?: FetchOptions): Promise<T> {
|
package/lib/stores/HttpConfig.ts
CHANGED
|
@@ -8,7 +8,7 @@ type Awaitable<T> = T | PromiseLike<T>
|
|
|
8
8
|
|
|
9
9
|
export interface HttpClient {
|
|
10
10
|
(request: FetchRequest, options?: Omit<FetchOptions, 'method'>): Promise<any>
|
|
11
|
-
raw(request: FetchRequest, options?: Omit<FetchOptions, 'method'>): Promise<FetchResponse<any>>
|
|
11
|
+
raw?(request: FetchRequest, options?: Omit<FetchOptions, 'method'>): Promise<FetchResponse<any>>
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export interface HttpOptions {
|