@stardust-collective/dag4-core
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -6,2 +6,4 @@ "use strict"; | ||
const cross_platform_di_1 = require("./cross-platform/cross-platform-di"); | ||
const fetch_http_1 = require("./cross-platform/clients/fetch.http"); | ||
const local_storage_db_1 = require("./cross-platform/clients/local-storage-db"); | ||
class DagDi { | ||
@@ -11,2 +13,8 @@ createRestApi(baseUrl) { | ||
} | ||
useFetchHttpClient(fetchClient) { | ||
this.registerHttpClient(new fetch_http_1.FetchRestService(fetchClient)); | ||
} | ||
useLocalStorageClient(storageClient) { | ||
this.registerKeyValueDbClient(new local_storage_db_1.LocalStorageDb(storageClient)); | ||
} | ||
registerHttpClient(client, baseUrl) { | ||
@@ -13,0 +21,0 @@ cross_platform_di_1.crossPlatformDi.registerHttpClient(client, baseUrl); |
import { RestApi } from './cross-platform/api/rest.api'; | ||
import { crossPlatformDi } from './cross-platform/cross-platform-di'; | ||
import { FetchRestService } from './cross-platform/clients/fetch.http'; | ||
import { LocalStorageDb } from './cross-platform/clients/local-storage-db'; | ||
export class DagDi { | ||
@@ -7,2 +9,8 @@ createRestApi(baseUrl) { | ||
} | ||
useFetchHttpClient(fetchClient) { | ||
this.registerHttpClient(new FetchRestService(fetchClient)); | ||
} | ||
useLocalStorageClient(storageClient) { | ||
this.registerKeyValueDbClient(new LocalStorageDb(storageClient)); | ||
} | ||
registerHttpClient(client, baseUrl) { | ||
@@ -9,0 +17,0 @@ crossPlatformDi.registerHttpClient(client, baseUrl); |
{ | ||
"name": "@stardust-collective/dag4-core", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Constellation HyperGraph JavaScript API", | ||
@@ -5,0 +5,0 @@ "author": "Frank Fox", |
@@ -6,2 +6,4 @@ import { RestApi } from './cross-platform/api/rest.api'; | ||
createRestApi(baseUrl: string): RestApi; | ||
useFetchHttpClient(fetchClient?: any): void; | ||
useLocalStorageClient(storageClient?: any): void; | ||
registerHttpClient(client: IHttpClient, baseUrl?: string): void; | ||
@@ -8,0 +10,0 @@ registerKeyValueDbClient(client: IKeyValueDb): void; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
55104
66
912