@triagly/sdk 1.4.0-beta.3 → 1.4.0-beta.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.js CHANGED
@@ -2001,11 +2001,11 @@
2001
2001
  this.apiUrl = (apiUrl || API_URLS[environment]).replace(/\/$/, ''); // Remove trailing slash
2002
2002
  this.publishableKey = publishableKey;
2003
2003
  this.getToken = getToken;
2004
- // Always use Triagly's Turnstile site key (can be overridden for testing)
2005
- this.turnstileSiteKey = turnstileSiteKey || TriaglyAPI.DEFAULT_TURNSTILE_SITE_KEY;
2004
+ // Only enable Turnstile when explicitly configured
2005
+ this.turnstileSiteKey = turnstileSiteKey;
2006
2006
  }
2007
2007
  /**
2008
- * Get the Turnstile site key
2008
+ * Get the Turnstile site key (undefined if not configured)
2009
2009
  */
2010
2010
  getTurnstileSiteKey() {
2011
2011
  return this.turnstileSiteKey;
@@ -2117,8 +2117,6 @@
2117
2117
  return await response.json();
2118
2118
  }
2119
2119
  }
2120
- // Triagly's public Turnstile site key (safe to hardcode - client-side only)
2121
- TriaglyAPI.DEFAULT_TURNSTILE_SITE_KEY = '0x4AAAAAAB8Dc-Fl964Vp1Nn';
2122
2120
 
2123
2121
  // Utility functions
2124
2122
  /**
@@ -2392,8 +2390,6 @@
2392
2390
  publishableKey: apiKey, // Keep for backward compatibility
2393
2391
  };
2394
2392
  this.api = new TriaglyAPI(apiKey, this.config.environment || 'production', this.config.apiUrl, this.config.getToken, this.config.turnstileSiteKey);
2395
- // Always pass Turnstile site key to widget (from API which has default)
2396
- this.config.turnstileSiteKey = this.api.getTurnstileSiteKey();
2397
2393
  this.widget = new FeedbackWidget(this.config);
2398
2394
  this.rateLimiter = new RateLimiter(apiKey, 3, 5 * 60 * 1000);
2399
2395
  // Initialize console logger if enabled