@hazae41/glacier
Advanced tools
Comparing version 2.2.3 to 2.2.4
@@ -28,3 +28,3 @@ import * as index from './mods/index.js'; | ||
export { FetcherfulReactQuery, FetcherlessReactQuery, ReactQuery, ReactQueryLike, SkeletonReactQuery } from './mods/react/types/query.js'; | ||
export { JsonRequest, JsonRequestInit, TextRequest, TextRequestInit } from './mods/requests/index.js'; | ||
export { JsonRequest, JsonRequestInit, RequestLike, TextRequest, TextRequestInit } from './mods/requests/index.js'; | ||
export { Collected, Collector, KeyValueCoders, SeracQueryStorage, SeracQueryStorageParams, useSeracStorage } from './mods/storages/serac/index.js'; | ||
@@ -31,0 +31,0 @@ export { QueryStorage } from './mods/storages/storage.js'; |
@@ -26,3 +26,3 @@ export { AsyncBicoder, AsyncEncoder, AsyncPipeBicoder, AsyncPipeEncoder, Bicoder, Encoder, Identity, Jsoned, SyncBicoder, SyncEncoder, SyncPipeBicoder, SyncPipeEncoder } from './coders/coder.js'; | ||
export { FetcherfulReactQuery, FetcherlessReactQuery, ReactQuery, ReactQueryLike, SkeletonReactQuery } from './react/types/query.js'; | ||
export { JsonRequest, JsonRequestInit, TextRequest, TextRequestInit } from './requests/index.js'; | ||
export { JsonRequest, JsonRequestInit, RequestLike, TextRequest, TextRequestInit } from './requests/index.js'; | ||
export { Collected, Collector, KeyValueCoders, SeracQueryStorage, SeracQueryStorageParams, useSeracStorage } from './storages/serac/index.js'; | ||
@@ -29,0 +29,0 @@ export { QueryStorage } from './storages/storage.js'; |
@@ -0,1 +1,5 @@ | ||
interface RequestLike extends RequestInit { | ||
url: string; | ||
destination: RequestDestination; | ||
} | ||
interface TextRequestInit extends Omit<RequestInit, "body"> { | ||
@@ -6,5 +10,5 @@ body: string; | ||
/** | ||
* Hack to only allow TextRequest or regular Request but not any other variant | ||
* Hack to only allow TextRequest or Request-like but not any other variant | ||
*/ | ||
interface From extends Request { | ||
interface From extends RequestLike { | ||
bodyAsText?: string; | ||
@@ -17,19 +21,6 @@ bodyAsJson?: undefined; | ||
constructor(input: RequestInfo, init: TextRequestInit); | ||
static from(request: TextRequest.From): Promise<TextRequest>; | ||
static from(from: TextRequest.From): Promise<TextRequest>; | ||
get headersAsJson(): Record<string, string>; | ||
get bodyAsText(): string; | ||
toJSON(): { | ||
url: string; | ||
method: string; | ||
headers: Record<string, string>; | ||
body: string; | ||
keepalive: boolean; | ||
cache: RequestCache; | ||
credentials: RequestCredentials; | ||
destination: RequestDestination; | ||
integrity: string; | ||
mode: RequestMode; | ||
redirect: RequestRedirect; | ||
referrerPolicy: ReferrerPolicy; | ||
}; | ||
toJSON(): RequestLike; | ||
} | ||
@@ -41,5 +32,5 @@ interface JsonRequestInit<T> extends Omit<RequestInit, "body"> { | ||
/** | ||
* Hack to only allow JsonRequest<T> or regular Request but not any other variant or other T | ||
* Hack to only allow JsonRequest<T> or Request-like but not any other variant or other T | ||
*/ | ||
interface From<T> extends Request { | ||
interface From<T> extends RequestLike { | ||
bodyAsText?: string; | ||
@@ -52,22 +43,9 @@ bodyAsJson?: T; | ||
constructor(input: RequestInfo, init: JsonRequestInit<T>); | ||
static from<T>(request: JsonRequest.From<T>): Promise<JsonRequest<T>>; | ||
static from<T>(from: JsonRequest.From<T>): Promise<JsonRequest<T>>; | ||
get headersAsJson(): Record<string, string>; | ||
get bodyAsJson(): T; | ||
get bodyAsText(): string; | ||
toJSON(): { | ||
url: string; | ||
method: string; | ||
headers: Record<string, string>; | ||
body: string; | ||
keepalive: boolean; | ||
cache: RequestCache; | ||
credentials: RequestCredentials; | ||
destination: RequestDestination; | ||
integrity: string; | ||
mode: RequestMode; | ||
redirect: RequestRedirect; | ||
referrerPolicy: ReferrerPolicy; | ||
}; | ||
toJSON(): RequestLike; | ||
} | ||
export { JsonRequest, type JsonRequestInit, TextRequest, type TextRequestInit }; | ||
export { JsonRequest, type JsonRequestInit, type RequestLike, TextRequest, type TextRequestInit }; |
{ | ||
"type": "module", | ||
"name": "@hazae41/glacier", | ||
"version": "2.2.3", | ||
"version": "2.2.4", | ||
"author": "hazae41", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
648717
6373