@howone/sdk 0.2.16 → 0.2.18

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.mjs CHANGED
@@ -274,9 +274,9 @@ var FloatingButton = ({
274
274
  // src/services/unified-oauth.ts
275
275
  init_config();
276
276
  var API_BASE_URLS = {
277
- local: "https://create-x-backend-dev.fly.dev",
278
- dev: "https://create-x-backend-dev.fly.dev",
279
- prod: "https://create-x-backend.fly.dev"
277
+ local: "https://api.howone.dev",
278
+ dev: "https://api.howone.dev",
279
+ prod: "https://api.howone.ai"
280
280
  };
281
281
  var detectEnvironmentFromHostname = () => {
282
282
  try {
@@ -320,6 +320,7 @@ var UnifiedAuthService = class {
320
320
  };
321
321
  const stateString = encodeURIComponent(JSON.stringify(state));
322
322
  try {
323
+ console.log("Using API_BASE_URL:", this.API_BASE_URL);
323
324
  const response = await fetch(`${this.API_BASE_URL}/api/auth/google?state=${stateString}`);
324
325
  const data = await response.json();
325
326
  if (!data.data.success || !data.data.authUrl) {
@@ -383,11 +384,11 @@ var UnifiedAuthService = class {
383
384
  window.location.origin,
384
385
  this.API_BASE_URL,
385
386
  // 使用当前环境的 API_BASE_URL
386
- "https://create-x-backend-dev.fly.dev",
387
- "https://create-x-backend.fly.dev"
387
+ "https://api.howone.dev",
388
+ "https://api.howone.ai"
388
389
  ];
389
390
  const isValidOrigin = validOrigins.some(
390
- (origin) => event.origin === origin || event.origin.includes("localhost") || event.origin.includes("127.0.0.1") || event.origin.includes("fly.dev")
391
+ (origin) => event.origin === origin || event.origin.includes("localhost") || event.origin.includes("127.0.0.1") || event.origin.includes("fly.dev") || event.origin.includes("howone.dev") || event.origin.includes("howone.ai")
391
392
  );
392
393
  if (!isValidOrigin) {
393
394
  return;
@@ -3426,10 +3427,10 @@ var ErrorTracking = class {
3426
3427
  timestamp: Date.now()
3427
3428
  });
3428
3429
  if (payload.severity === "critical" || payload.severity === "high") {
3429
- this.internalLog("error", "[ErrorTracking] \u4E25\u91CD\u9519\u8BEF:", payload);
3430
+ this.internalLog("error", "[ErrorTracking]:", payload);
3430
3431
  }
3431
3432
  } catch (sendError) {
3432
- this.internalLog("error", "[ErrorTracking] \u9519\u8BEF\u53D1\u9001\u5931\u8D25:", sendError);
3433
+ this.internalLog("error", "[ErrorTracking]:", sendError);
3433
3434
  }
3434
3435
  }
3435
3436
  /**