@ywfe/fe-tools 1.2.1-beta.37 → 1.2.1-beta.39

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@ywfe/fe-tools",
4
- "version": "1.2.1-beta.37",
4
+ "version": "1.2.1-beta.39",
5
5
  "description": "工具函数库",
6
6
  "main": "./lib/ywfe-tools.cjs",
7
7
  "module": "./lib/ywfe-tools.esm.js",
package/request.ts CHANGED
@@ -23,7 +23,6 @@ async function request({ input }: { input: RequestOptions }) {
23
23
  };
24
24
  const prefix = getBasePath();
25
25
  let requestUrl = isValidURL(input.url) ? input.url : `${prefix}${input.url}`;
26
- console.log('requestUrl',requestUrl,isValidURL(input.url))
27
26
  const fetchOption: { [key: string]: any } = {
28
27
  method: method,
29
28
  headers: {
@@ -39,9 +38,11 @@ async function request({ input }: { input: RequestOptions }) {
39
38
  const response = await fetch(requestUrl, fetchOption);
40
39
  if (!response.ok) {
41
40
  const message = `An error has occured: ${response.status}`;
41
+ console.log('req result', message);
42
42
  return { success: false, message };
43
43
  }
44
44
  const result = await response.json();
45
+ console.log('req result',result);
45
46
  return result;
46
47
  }
47
48
 
package/tsconfig.json CHANGED
@@ -4,7 +4,9 @@
4
4
  "module": "commonjs",
5
5
  "allowSyntheticDefaultImports": true,
6
6
  "allowImportingTsExtensions": true,
7
- "esModuleInterop": true
7
+ "esModuleInterop": true,
8
+ "include": ["**/*"],
9
+ "exclude": []
8
10
  }
9
11
  }
10
- }
12
+ }