modal 0.10.2-dev.3 → 0.10.2-dev.4

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
@@ -73372,7 +73372,7 @@ var AuthTokenManager = class {
73372
73372
  };
73373
73373
 
73374
73374
  // src/version.ts
73375
- var SDK_VERSION = "0.10.2-dev.3";
73375
+ var SDK_VERSION = "0.10.2-dev.4";
73376
73376
  function getSDKVersion() {
73377
73377
  return SDK_VERSION;
73378
73378
  }
@@ -73812,6 +73812,7 @@ var ModalClient = class {
73812
73812
  return this.authTokenManager;
73813
73813
  };
73814
73814
  const oauthJwtKey = this.oauthJwtKey;
73815
+ const host = new URL(profile.serverUrl).hostname;
73815
73816
  return async function* authMiddleware(call, options) {
73816
73817
  const hasOAuthCredentials = Boolean(
73817
73818
  profile.oauthRefreshToken && profile.oauthClientId && (profile.oauthClientSecret || oauthJwtKey)
@@ -73852,6 +73853,7 @@ var ModalClient = class {
73852
73853
  options.metadata.set("x-modal-token-id", profile.tokenId);
73853
73854
  options.metadata.set("x-modal-token-secret", profile.tokenSecret);
73854
73855
  }
73856
+ options.metadata.set("x-modal-host", host);
73855
73857
  if (call.method.path !== "/modal.client.ModalClient/AuthTokenGet") {
73856
73858
  const tokenManager = getOrCreateAuthTokenManager();
73857
73859
  const token = await tokenManager.getToken();
package/dist/index.js CHANGED
@@ -73292,7 +73292,7 @@ var AuthTokenManager = class {
73292
73292
  };
73293
73293
 
73294
73294
  // src/version.ts
73295
- var SDK_VERSION = "0.10.2-dev.3";
73295
+ var SDK_VERSION = "0.10.2-dev.4";
73296
73296
  function getSDKVersion() {
73297
73297
  return SDK_VERSION;
73298
73298
  }
@@ -73737,6 +73737,7 @@ var ModalClient = class {
73737
73737
  return this.authTokenManager;
73738
73738
  };
73739
73739
  const oauthJwtKey = this.oauthJwtKey;
73740
+ const host = new URL(profile.serverUrl).hostname;
73740
73741
  return async function* authMiddleware(call, options) {
73741
73742
  const hasOAuthCredentials = Boolean(
73742
73743
  profile.oauthRefreshToken && profile.oauthClientId && (profile.oauthClientSecret || oauthJwtKey)
@@ -73777,6 +73778,7 @@ var ModalClient = class {
73777
73778
  options.metadata.set("x-modal-token-id", profile.tokenId);
73778
73779
  options.metadata.set("x-modal-token-secret", profile.tokenSecret);
73779
73780
  }
73781
+ options.metadata.set("x-modal-host", host);
73780
73782
  if (call.method.path !== "/modal.client.ModalClient/AuthTokenGet") {
73781
73783
  const tokenManager = getOrCreateAuthTokenManager();
73782
73784
  const token = await tokenManager.getToken();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "modal",
3
- "version": "0.10.2-dev.3",
3
+ "version": "0.10.2-dev.4",
4
4
  "description": "Modal SDK for JavaScript/TypeScript",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://modal.com/docs/guide/sdk-javascript-go",