@spoketech/hub-client 0.1.3 → 0.1.5

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
@@ -3764,7 +3764,7 @@ function signRequestWithPrivateKey(input) {
3764
3764
  function configureSignedHttpClient(client, options) {
3765
3765
  return client.pipe(
3766
3766
  HttpClient.mapRequest((request) => {
3767
- const url = new URL(request.url);
3767
+ const url = new URL(request.url, options.apiBaseUrl);
3768
3768
  for (const [key, value] of request.urlParams) {
3769
3769
  url.searchParams.append(key, value);
3770
3770
  }
@@ -3802,6 +3802,7 @@ var makeHubApiClient = (options) => HttpApiClient.make(HubApi, {
3802
3802
  transformResponse: options.transformResponse
3803
3803
  }).pipe(Effect.provide(FetchHttpClient.layer));
3804
3804
  var makeServiceHubApiClient = (options) => Effect.gen(function* () {
3805
+ const apiBaseUrl = resolveHubApiBaseUrl(options.baseUrl, options.apiBasePath);
3805
3806
  const client = yield* makeHubApiClient({
3806
3807
  baseUrl: options.baseUrl,
3807
3808
  apiBasePath: options.apiBasePath,
@@ -3809,7 +3810,8 @@ var makeServiceHubApiClient = (options) => Effect.gen(function* () {
3809
3810
  transformClient: (client2) => {
3810
3811
  const configured = configureSignedHttpClient(client2, {
3811
3812
  clientId: options.clientId,
3812
- privateKey: options.privateKey
3813
+ privateKey: options.privateKey,
3814
+ apiBaseUrl
3813
3815
  });
3814
3816
  return options.transformClient ? options.transformClient(configured) : configured;
3815
3817
  },