@secondlayer/sdk 11.0.0 → 12.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.
@@ -198,7 +198,6 @@ function raceAbort(promise, signal) {
198
198
  var LOCAL_API_URL = "http://127.0.0.1:3800";
199
199
  var INSTANCE_TOKEN_ENV = "INSTANCE_TOKEN";
200
200
  var ACCOUNT_KEY_ENV = "SECONDLAYER_API_KEY";
201
- var warnedUrlAlias = false;
202
201
  function resolveBaseUrl(explicit) {
203
202
  if (explicit && explicit.length > 0)
204
203
  return explicit.replace(/\/+$/, "");
@@ -206,14 +205,6 @@ function resolveBaseUrl(explicit) {
206
205
  const primary = process.env?.SECONDLAYER_API_URL || undefined;
207
206
  if (primary)
208
207
  return primary.replace(/\/+$/, "");
209
- const legacy = process.env?.SL_API_URL || undefined;
210
- if (legacy) {
211
- if (!warnedUrlAlias) {
212
- warnedUrlAlias = true;
213
- console.warn("[secondlayer] SL_API_URL is a legacy alias of SECONDLAYER_API_URL; using the alias this once.");
214
- }
215
- return legacy.replace(/\/+$/, "");
216
- }
217
208
  }
218
209
  return LOCAL_API_URL;
219
210
  }
@@ -225,26 +216,12 @@ function resolveApiKey(apiKey) {
225
216
  const token = process.env?.INSTANCE_TOKEN || undefined;
226
217
  return token;
227
218
  }
228
- var warnedArchiveAlias = false;
229
219
  function resolveAccountKey(accountKey) {
230
220
  if (accountKey !== undefined)
231
221
  return accountKey;
232
222
  if (typeof process === "undefined")
233
223
  return;
234
- const primary = process.env?.SECONDLAYER_API_KEY || undefined;
235
- const slAlias = process.env?.SL_API_KEY || undefined;
236
- const archiveAlias = process.env?.SL_ARCHIVE_API_KEY || undefined;
237
- if (primary)
238
- return primary;
239
- const legacy = slAlias ?? archiveAlias;
240
- if (legacy) {
241
- if (!warnedArchiveAlias) {
242
- warnedArchiveAlias = true;
243
- console.warn("[secondlayer] SL_API_KEY / SL_ARCHIVE_API_KEY are legacy aliases of SECONDLAYER_API_KEY; using the alias this once.");
244
- }
245
- return legacy;
246
- }
247
- return;
224
+ return process.env?.SECONDLAYER_API_KEY || undefined;
248
225
  }
249
226
  function seg(value) {
250
227
  return encodeURIComponent(String(value));
@@ -2692,5 +2669,5 @@ export {
2692
2669
  getSubgraph
2693
2670
  };
2694
2671
 
2695
- //# debugId=0162A8C28478658D64756E2164756E21
2672
+ //# debugId=351ADA07395C9F6764756E2164756E21
2696
2673
  //# sourceMappingURL=index.js.map