@modern-js/create-request 2.0.0-beta.7 → 2.0.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.
@@ -1,5 +1,5 @@
1
1
  import type nodeFetch from 'node-fetch';
2
- export declare type BFFRequestPayload = {
2
+ export type BFFRequestPayload = {
3
3
  params?: Record<string, any>;
4
4
  query?: Record<string, any>;
5
5
  body?: string;
@@ -9,12 +9,12 @@ export declare type BFFRequestPayload = {
9
9
  headers?: Record<string, any>;
10
10
  cookies?: Record<string, any>;
11
11
  };
12
- export declare type Fetch = typeof fetch | typeof nodeFetch;
13
- export declare type Sender = ((...args: any[]) => Promise<any>) & {
12
+ export type Fetch = typeof fetch | typeof nodeFetch;
13
+ export type Sender = ((...args: any[]) => Promise<any>) & {
14
14
  fetch?: Fetch;
15
15
  };
16
- export declare type RequestCreator = (path: string, method: string, port: number, fetch?: Fetch, headerWhiteList?: string[]) => Sender;
17
- export declare type IOptions<F = Fetch> = {
16
+ export type RequestCreator = (path: string, method: string, port: number, fetch?: Fetch, headerWhiteList?: string[]) => Sender;
17
+ export type IOptions<F = Fetch> = {
18
18
  request?: F;
19
19
  interceptor?: (request: F) => F;
20
20
  allowedHeaders?: string[];
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "2.0.0-beta.7",
14
+ "version": "2.0.0",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/js/node/index.js",
@@ -66,7 +66,7 @@
66
66
  "node-fetch": "^2.6.1",
67
67
  "path-to-regexp": "^6.2.0",
68
68
  "query-string": "^7.1.1",
69
- "@modern-js/utils": "2.0.0-beta.7"
69
+ "@modern-js/utils": "2.0.0"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@types/jest": "^27",
@@ -76,8 +76,8 @@
76
76
  "jest": "^27",
77
77
  "nock": "^13.2.1",
78
78
  "typescript": "^4",
79
- "@scripts/jest-config": "2.0.0-beta.7",
80
- "@scripts/build": "2.0.0-beta.7"
79
+ "@scripts/build": "2.0.0",
80
+ "@scripts/jest-config": "2.0.0"
81
81
  },
82
82
  "sideEffects": false,
83
83
  "publishConfig": {