@seaverse/dataservice 1.6.0 → 1.6.1

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.js CHANGED
@@ -108,7 +108,8 @@ var HTTPClient = class {
108
108
  tokenPromise = null;
109
109
  constructor(config, token) {
110
110
  this.baseUrl = (config.url || "https://dataservice-api.seaverse.ai").replace(/\/$/, "");
111
- this.fetchFn = config.options?.fetch || globalThis.fetch;
111
+ const customFetch = config.options?.fetch;
112
+ this.fetchFn = customFetch ? customFetch.bind(customFetch) : globalThis.fetch.bind(globalThis);
112
113
  this.timeout = config.options?.timeout || 3e4;
113
114
  this.headers = {
114
115
  "Content-Type": "application/json",
package/dist/index.mjs CHANGED
@@ -79,7 +79,8 @@ var HTTPClient = class {
79
79
  tokenPromise = null;
80
80
  constructor(config, token) {
81
81
  this.baseUrl = (config.url || "https://dataservice-api.seaverse.ai").replace(/\/$/, "");
82
- this.fetchFn = config.options?.fetch || globalThis.fetch;
82
+ const customFetch = config.options?.fetch;
83
+ this.fetchFn = customFetch ? customFetch.bind(customFetch) : globalThis.fetch.bind(globalThis);
83
84
  this.timeout = config.options?.timeout || 3e4;
84
85
  this.headers = {
85
86
  "Content-Type": "application/json",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seaverse/dataservice",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "AI-Friendly Universal Data Storage SDK for TypeScript/JavaScript",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",