@omnibase/core-js 0.5.5 → 0.5.7

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.cjs CHANGED
@@ -1258,7 +1258,9 @@ var OmnibaseClient = class {
1258
1258
  tenants = new TenantHandler(this);
1259
1259
  permissions;
1260
1260
  async fetch(endpoint, options = {}) {
1261
- return await fetch(this.config.api_url + endpoint, options);
1261
+ if (this.config.fetch)
1262
+ return this.fetch(this.config.api_url + endpoint, options);
1263
+ return fetch(this.config.api_url + endpoint, options);
1262
1264
  }
1263
1265
  };
1264
1266
  // Annotate the CommonJS export names for ESM import in node:
package/dist/index.js CHANGED
@@ -43,7 +43,9 @@ var OmnibaseClient = class {
43
43
  tenants = new TenantHandler(this);
44
44
  permissions;
45
45
  async fetch(endpoint, options = {}) {
46
- return await fetch(this.config.api_url + endpoint, options);
46
+ if (this.config.fetch)
47
+ return this.fetch(this.config.api_url + endpoint, options);
48
+ return fetch(this.config.api_url + endpoint, options);
47
49
  }
48
50
  };
49
51
  export {
@@ -1923,6 +1923,7 @@ declare class TenantHandler {
1923
1923
 
1924
1924
  type OmnibaseClientConfig = {
1925
1925
  api_url: string;
1926
+ fetch?: (endpoint: string, options: RequestInit) => Promise<Response>;
1926
1927
  };
1927
1928
  declare class OmnibaseClient {
1928
1929
  private config;
@@ -1923,6 +1923,7 @@ declare class TenantHandler {
1923
1923
 
1924
1924
  type OmnibaseClientConfig = {
1925
1925
  api_url: string;
1926
+ fetch?: (endpoint: string, options: RequestInit) => Promise<Response>;
1926
1927
  };
1927
1928
  declare class OmnibaseClient {
1928
1929
  private config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omnibase/core-js",
3
- "version": "0.5.5",
3
+ "version": "0.5.7",
4
4
  "description": "OmniBase core Javascript SDK - framework agnostic",
5
5
  "files": [
6
6
  "dist/**/*"