@secondlayer/sdk 16.0.0 → 16.1.0

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.
@@ -210,6 +210,7 @@ function raceAbort(promise, signal) {
210
210
  });
211
211
  }
212
212
  var LOCAL_API_URL = "http://127.0.0.1:3800";
213
+ var HOSTED_API_URL = "https://api.secondlayer.tools";
213
214
  var INSTANCE_TOKEN_ENV = "INSTANCE_TOKEN";
214
215
  var ACCOUNT_KEY_ENV = "SECONDLAYER_API_KEY";
215
216
  function resolveBaseUrl(explicit) {
@@ -219,6 +220,9 @@ function resolveBaseUrl(explicit) {
219
220
  const primary = process.env?.SECONDLAYER_API_URL || undefined;
220
221
  if (primary)
221
222
  return primary.replace(/\/+$/, "");
223
+ if (process.env?.[ACCOUNT_KEY_ENV]?.startsWith("sk-sl_") && !process.env?.[INSTANCE_TOKEN_ENV]) {
224
+ return HOSTED_API_URL;
225
+ }
222
226
  }
223
227
  return LOCAL_API_URL;
224
228
  }
@@ -1572,5 +1576,5 @@ export {
1572
1576
  decode
1573
1577
  };
1574
1578
 
1575
- //# debugId=BAF7AFEF510AE0F364756E2164756E21
1579
+ //# debugId=8888B6D720E4ED2E64756E2164756E21
1576
1580
  //# sourceMappingURL=index.js.map