@fuman/fetch 0.2.0 → 0.3.0

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/ffetch.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { CombineAddons, FfetchMiddleware } from './_types.js';
1
+ import { CombineAddons, FetchLike, FfetchMiddleware } from './_types.js';
2
2
  import { FfetchAddon } from './addons/types.js';
3
3
  export interface FfetchOptions {
4
4
  /**
@@ -55,7 +55,7 @@ export interface FfetchOptions {
55
55
  */
56
56
  baseUrl?: string;
57
57
  /** body to be passed to fetch() */
58
- body?: BodyInit;
58
+ body?: BodyInit | Uint8Array;
59
59
  /**
60
60
  * shorthand for sending json body.
61
61
  * mutually exclusive with `body`
@@ -70,7 +70,7 @@ export interface FfetchOptions {
70
70
  }
71
71
  export interface FfetchBaseOptions<Addons extends FfetchAddon<any, any>[] = FfetchAddon<any, any>[]> extends FfetchOptions {
72
72
  /** implementation of fetch() */
73
- fetch?: typeof fetch;
73
+ fetch?: FetchLike;
74
74
  /** addons for the request */
75
75
  addons?: Addons;
76
76
  /**
package/ffetch.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { CombineAddons, FfetchMiddleware } from './_types.js';
1
+ import { CombineAddons, FetchLike, FfetchMiddleware } from './_types.js';
2
2
  import { FfetchAddon } from './addons/types.js';
3
3
  export interface FfetchOptions {
4
4
  /**
@@ -55,7 +55,7 @@ export interface FfetchOptions {
55
55
  */
56
56
  baseUrl?: string;
57
57
  /** body to be passed to fetch() */
58
- body?: BodyInit;
58
+ body?: BodyInit | Uint8Array;
59
59
  /**
60
60
  * shorthand for sending json body.
61
61
  * mutually exclusive with `body`
@@ -70,7 +70,7 @@ export interface FfetchOptions {
70
70
  }
71
71
  export interface FfetchBaseOptions<Addons extends FfetchAddon<any, any>[] = FfetchAddon<any, any>[]> extends FfetchOptions {
72
72
  /** implementation of fetch() */
73
- fetch?: typeof fetch;
73
+ fetch?: FetchLike;
74
74
  /** addons for the request */
75
75
  addons?: Addons;
76
76
  /**
package/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- export type { FfetchMiddleware } from './_types.js';
1
+ export type { FetchLike, FfetchMiddleware } from './_types.js';
2
2
  export * from './addons/index.js';
3
3
  export * from './default.js';
4
4
  export * from './ffetch.js';
package/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export type { FfetchMiddleware } from './_types.js';
1
+ export type { FetchLike, FfetchMiddleware } from './_types.js';
2
2
  export * from './addons/index.js';
3
3
  export * from './default.js';
4
4
  export * from './ffetch.js';
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@fuman/fetch",
3
3
  "type": "module",
4
- "version": "0.2.0",
4
+ "version": "0.3.0",
5
5
  "description": "tiny wrapper over fetch",
6
6
  "license": "MIT",
7
7
  "dependencies": {
8
- "@fuman/utils": "^0.0.16",
8
+ "@fuman/utils": "^0.0.17",
9
9
  "@standard-schema/spec": "^1.0.0"
10
10
  },
11
11
  "peerDependencies": {