@bubblesjs/request 0.0.11 → 0.0.12
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/dist/index.d.ts +0 -2
- package/dist/index.js +1 -2
- package/package.json +6 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AlovaGlobalCacheAdapter, AlovaRequestAdapter, GlobalCacheConfig, StatesExport, StatesHook } from "alova";
|
|
2
2
|
import { FetchRequestInit } from "alova/fetch";
|
|
3
|
-
//#region src/index.d.ts
|
|
4
3
|
type MaybePromise<T> = T | Promise<T>;
|
|
5
4
|
type HeaderValue = string | number | boolean | null | undefined | (() => MaybePromise<string | number | boolean | null | undefined>);
|
|
6
5
|
type StatusMatcher<RE> = number | number[] | ((status: number, response: RE) => boolean);
|
|
@@ -47,5 +46,4 @@ export declare function createInstance<RC extends object = FetchRequestInit, RE
|
|
|
47
46
|
export type RequestInstance<RC extends object = FetchRequestInit, RE = Response, RH = Headers, SE extends StatesExport<any> = StatesExport<any>> = ReturnType<typeof createInstance<RC, RE, RH, SE>>;
|
|
48
47
|
export type DualCallInstance<RC extends object = FetchRequestInit, RE = Response, RH = Headers, SE extends StatesExport<any> = StatesExport<any>> = RequestInstance<RC, RE, RH, SE> & ((option?: RequestOption<RC, RE, RH, SE>) => RequestInstance<RC, RE, RH, SE>);
|
|
49
48
|
export declare function createDualCallInstance<RC extends object = FetchRequestInit, RE = Response, RH = Headers, SE extends StatesExport<any> = StatesExport<any>>(baseConfig: BaseRequestOption<RC, RE, RH, SE>): DualCallInstance<RC, RE, RH, SE>;
|
|
50
|
-
//#endregion
|
|
51
49
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { deepMergeObject, isPlainObject, isReadableStream, tryParseJsonString } from "@bubblesjs/utils";
|
|
2
2
|
import { createAlova } from "alova";
|
|
3
3
|
import adapterFetch from "alova/fetch";
|
|
4
|
-
|
|
4
|
+
// src/index.ts
|
|
5
5
|
const defaultRequestOption = {
|
|
6
6
|
baseUrl: "/",
|
|
7
7
|
timeout: void 0,
|
|
@@ -176,5 +176,4 @@ function createDualCallInstance(baseConfig) {
|
|
|
176
176
|
dualInstance.Request = defaultInstance.Request.bind(defaultInstance);
|
|
177
177
|
return dualInstance;
|
|
178
178
|
}
|
|
179
|
-
//#endregion
|
|
180
179
|
export { createDualCallInstance, createInstance };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bubblesjs/request",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
4
4
|
"private": false,
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "git+https://github.com/435012357/bubblesjs/issues"
|
|
@@ -26,12 +26,13 @@
|
|
|
26
26
|
"registry": "https://registry.npmjs.org/"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@bubblesjs/utils": "^0.0.
|
|
29
|
+
"@bubblesjs/utils": "^0.0.14"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"
|
|
33
|
-
"vite
|
|
34
|
-
"
|
|
32
|
+
"typescript": "^6.0.3",
|
|
33
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@1.4.0",
|
|
34
|
+
"vite-plus": "1.4.0",
|
|
35
|
+
"vitest": "^5.0.5"
|
|
35
36
|
},
|
|
36
37
|
"peerDependencies": {
|
|
37
38
|
"alova": "^3.5.1"
|