@cloudpss/fetch 0.4.15 → 0.4.17

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
  if (typeof globalThis == 'undefined' || typeof globalThis.fetch != 'function') {
2
- throw new Error(`fetch is not defined on the global object, you should load polyfill of globalThis and fetch.`);
2
+ throw new TypeError(`fetch is not defined on the global object, you should load polyfill of globalThis and fetch.`);
3
3
  }
4
4
  export const fetch = globalThis.fetch;
5
5
  export const Headers = globalThis.Headers;
@@ -1 +1 @@
1
- {"version":3,"file":"index-browser.js","sourceRoot":"","sources":["../src/index-browser.ts"],"names":[],"mappings":"AAAA,IAAI,OAAO,UAAU,IAAI,WAAW,IAAI,OAAO,UAAU,CAAC,KAAK,IAAI,UAAU,EAAE;IAC3E,MAAM,IAAI,KAAK,CAAC,8FAA8F,CAAC,CAAC;CACnH;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;AACtC,MAAM,CAAC,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;AAC1C,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAC,QAAQ,CAAC;AAC5C,MAAM,CAAC,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;AAC1C,MAAM,CAAC,MAAM,KAAK,GAAY,SAAS,CAAC;AAExC,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"index-browser.js","sourceRoot":"","sources":["../src/index-browser.ts"],"names":[],"mappings":"AAAA,IAAI,OAAO,UAAU,IAAI,WAAW,IAAI,OAAO,UAAU,CAAC,KAAK,IAAI,UAAU,EAAE;IAC3E,MAAM,IAAI,SAAS,CAAC,8FAA8F,CAAC,CAAC;CACvH;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;AACtC,MAAM,CAAC,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;AAC1C,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAC,QAAQ,CAAC;AAC5C,MAAM,CAAC,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;AAC1C,MAAM,CAAC,MAAM,KAAK,GAAY,SAAS,CAAC;AAExC,eAAe,KAAK,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudpss/fetch",
3
- "version": "0.4.15",
3
+ "version": "0.4.17",
4
4
  "author": "CloudPSS",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,5 +1,5 @@
1
1
  if (typeof globalThis == 'undefined' || typeof globalThis.fetch != 'function') {
2
- throw new Error(`fetch is not defined on the global object, you should load polyfill of globalThis and fetch.`);
2
+ throw new TypeError(`fetch is not defined on the global object, you should load polyfill of globalThis and fetch.`);
3
3
  }
4
4
 
5
5
  export const fetch = globalThis.fetch;
package/tsconfig.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "extends": "../../tsconfig",
3
+ "include": ["./src/"],
4
+ "compilerOptions": {
5
+ "outDir": "./dist"
6
+ }
7
+ }