@lgriffin/esi.ts 10.2.0 → 10.2.1
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/CHANGELOG.md +16 -0
- package/dist/{chunk-D5L5HZVF.mjs → chunk-4W66ONJI.mjs} +2 -6
- package/dist/chunk-4W66ONJI.mjs.map +1 -0
- package/dist/{chunk-XIB2OXEZ.js → chunk-N3B65VLB.js} +2 -6
- package/dist/chunk-N3B65VLB.js.map +1 -0
- package/dist/core/constants.d.ts +2 -2
- package/dist/core/logger/resolveLogger.d.ts +3 -3
- package/dist/core/logger/resolveLogger.d.ts.map +1 -1
- package/dist/core/pagination/AsyncPaginationIterator.d.ts.map +1 -1
- package/dist/core/pagination/CursorPaginationHandler.d.ts.map +1 -1
- package/dist/core/util/concurrency.d.ts.map +1 -1
- package/dist/errors.js +2 -2
- package/dist/errors.mjs +1 -1
- package/dist/index.js +92 -93
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -4
- package/dist/index.mjs.map +1 -1
- package/dist/testing/index.js +2 -2
- package/dist/testing/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-D5L5HZVF.mjs.map +0 -1
- package/dist/chunk-XIB2OXEZ.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -206,7 +206,7 @@ var _chunkSAQBXXTMjs = require('./chunk-SAQBXXTM.js');
|
|
|
206
206
|
|
|
207
207
|
|
|
208
208
|
|
|
209
|
-
var
|
|
209
|
+
var _chunkN3B65VLBjs = require('./chunk-N3B65VLB.js');
|
|
210
210
|
require('./chunk-PZ5AY32C.js');
|
|
211
211
|
|
|
212
212
|
// src/core/middleware/Middleware.ts
|
|
@@ -444,7 +444,7 @@ function buildDedupeKey(endpoint, client, requiresAuth = false) {
|
|
|
444
444
|
|
|
445
445
|
// src/core/constants.ts
|
|
446
446
|
var PACKAGE_NAME = "esi.ts";
|
|
447
|
-
var PACKAGE_VERSION = "10.2.
|
|
447
|
+
var PACKAGE_VERSION = "10.2.1";
|
|
448
448
|
var USER_AGENT = `${PACKAGE_NAME}/${PACKAGE_VERSION}`;
|
|
449
449
|
var COMPATIBILITY_DATE = "2026-05-19";
|
|
450
450
|
|
|
@@ -469,7 +469,7 @@ function buildRequestHeaders(client, url, method, requiresAuth, useETag, body, r
|
|
|
469
469
|
if (requiresAuth) {
|
|
470
470
|
const authHeader = client.getAuthorizationHeader();
|
|
471
471
|
if (!authHeader) {
|
|
472
|
-
throw
|
|
472
|
+
throw _chunkN3B65VLBjs.buildError.call(void 0,
|
|
473
473
|
[
|
|
474
474
|
"Authorization header is required for this endpoint but no access token is configured",
|
|
475
475
|
"Fix: set ESI_ACCESS_TOKEN in your environment (see .env.example), or call client.setAccessToken(token), or pass accessToken to the EsiClient constructor"
|
|
@@ -485,7 +485,7 @@ function buildRequestHeaders(client, url, method, requiresAuth, useETag, body, r
|
|
|
485
485
|
const cachedETag = cache.getETag(key);
|
|
486
486
|
if (cachedETag) {
|
|
487
487
|
headers["If-None-Match"] = cachedETag;
|
|
488
|
-
|
|
488
|
+
_chunkN3B65VLBjs.logDebug2.call(void 0, client, `Adding If-None-Match header: ${cachedETag}`, {
|
|
489
489
|
etag: cachedETag
|
|
490
490
|
});
|
|
491
491
|
}
|
|
@@ -663,7 +663,7 @@ function trySpecAwareCacheHit(client, url, method, templatePath, resolveCache2,
|
|
|
663
663
|
if (!entry) return null;
|
|
664
664
|
const age = Date.now() - entry.timestamp;
|
|
665
665
|
if (age < specTtlMs) {
|
|
666
|
-
|
|
666
|
+
_chunkN3B65VLBjs.logDebug2.call(void 0,
|
|
667
667
|
client,
|
|
668
668
|
`Spec-aware cache hit for ${url} (age=${Math.round(age / 1e3)}s, ttl=${Math.round(specTtlMs / 1e3)}s)`,
|
|
669
669
|
{ method, templatePath }
|
|
@@ -724,7 +724,7 @@ function cacheResponse(client, url, method, endpoint, parsed, data, useETag, res
|
|
|
724
724
|
if (useETag && method === "GET" && cache && parsed.etag) {
|
|
725
725
|
const key = buildCacheKey(url, client, requiresAuth);
|
|
726
726
|
if (sentAtWriteGeneration !== void 0 && invalidatedSince(cache, sentAtWriteGeneration, key)) {
|
|
727
|
-
|
|
727
|
+
_chunkN3B65VLBjs.logDebug2.call(void 0,
|
|
728
728
|
client,
|
|
729
729
|
`Not caching ${url}: a write invalidated it while the request was in flight`,
|
|
730
730
|
{ method }
|
|
@@ -737,7 +737,7 @@ function cacheResponse(client, url, method, endpoint, parsed, data, useETag, res
|
|
|
737
737
|
const ttl = retentionTtl(freshnessTtl);
|
|
738
738
|
cache.set(key, parsed.etag, data, parsed.raw, ttl);
|
|
739
739
|
const ttlInfo = freshnessTtl !== void 0 ? ` (ttl=${freshnessTtl}ms, kept for ${ttl}ms)` : "";
|
|
740
|
-
|
|
740
|
+
_chunkN3B65VLBjs.logDebug2.call(void 0,
|
|
741
741
|
client,
|
|
742
742
|
`Cached response for ${url} with ETag ${parsed.etag}${ttlInfo}`,
|
|
743
743
|
{
|
|
@@ -753,7 +753,7 @@ function evictRejectedResponse(client, endpoint, requiresAuth, resolveCache2) {
|
|
|
753
753
|
if (!cache) return;
|
|
754
754
|
const url = `${client.getLink()}/${endpoint}`;
|
|
755
755
|
if (cache.delete(buildCacheKey(url, client, requiresAuth))) {
|
|
756
|
-
|
|
756
|
+
_chunkN3B65VLBjs.logDebug2.call(void 0,
|
|
757
757
|
client,
|
|
758
758
|
`Evicted cached response for ${url} after it failed validation`
|
|
759
759
|
);
|
|
@@ -799,7 +799,7 @@ function handleEarlyStatus(client, status, url, parsed, useETag, resolveCache2,
|
|
|
799
799
|
return { headers: parsed.raw, body: void 0, status: 201 };
|
|
800
800
|
}
|
|
801
801
|
if (status === 204) {
|
|
802
|
-
|
|
802
|
+
_chunkN3B65VLBjs.logInfo2.call(void 0, client, `No Content for endpoint: ${url}`, { status });
|
|
803
803
|
return { headers: parsed.raw, body: void 0, status: 204 };
|
|
804
804
|
}
|
|
805
805
|
if (status === 304) {
|
|
@@ -808,7 +808,7 @@ function handleEarlyStatus(client, status, url, parsed, useETag, resolveCache2,
|
|
|
808
808
|
const key = buildCacheKey(url, client, requiresAuth);
|
|
809
809
|
const cachedEntry = cache.get(key);
|
|
810
810
|
if (cachedEntry) {
|
|
811
|
-
|
|
811
|
+
_chunkN3B65VLBjs.logInfo2.call(void 0, client, `Cache hit (304) for endpoint: ${url}`, {
|
|
812
812
|
status,
|
|
813
813
|
cacheHitType: "etag-304"
|
|
814
814
|
});
|
|
@@ -833,7 +833,7 @@ function handleEarlyStatus(client, status, url, parsed, useETag, resolveCache2,
|
|
|
833
833
|
};
|
|
834
834
|
}
|
|
835
835
|
}
|
|
836
|
-
throw new (0,
|
|
836
|
+
throw new (0, _chunkN3B65VLBjs.EsiError)(
|
|
837
837
|
304,
|
|
838
838
|
"Not Modified \u2014 no cached data available",
|
|
839
839
|
url,
|
|
@@ -866,14 +866,14 @@ function handleErrorResponse(client, response, url, parsed, useETag, resolveCach
|
|
|
866
866
|
requiresAuth
|
|
867
867
|
);
|
|
868
868
|
if (staleResult) {
|
|
869
|
-
|
|
869
|
+
_chunkN3B65VLBjs.logWarn2.call(void 0, client, `${errorMessage} for ${url} \u2014 serving stale cache`, {
|
|
870
870
|
status: response.status
|
|
871
871
|
});
|
|
872
872
|
return { ...staleResult, status: response.status };
|
|
873
873
|
}
|
|
874
874
|
}
|
|
875
875
|
if (response.status === 420 || response.status === 429) {
|
|
876
|
-
|
|
876
|
+
_chunkN3B65VLBjs.logWarn2.call(void 0, client, `Rate limited (${response.status}) on ${url}`, {
|
|
877
877
|
status: response.status
|
|
878
878
|
});
|
|
879
879
|
}
|
|
@@ -883,7 +883,7 @@ function handleErrorResponse(client, response, url, parsed, useETag, resolveCach
|
|
|
883
883
|
} else if (response.status === 403) {
|
|
884
884
|
message = `${errorMessage} \u2014 your access token does not have the OAuth scopes required for this endpoint. Check the scopes on your EVE SSO application`;
|
|
885
885
|
}
|
|
886
|
-
throw new (0,
|
|
886
|
+
throw new (0, _chunkN3B65VLBjs.EsiError)(
|
|
887
887
|
response.status,
|
|
888
888
|
message,
|
|
889
889
|
url,
|
|
@@ -891,15 +891,15 @@ function handleErrorResponse(client, response, url, parsed, useETag, resolveCach
|
|
|
891
891
|
);
|
|
892
892
|
}
|
|
893
893
|
function wrapError(error, client) {
|
|
894
|
-
if (error instanceof
|
|
894
|
+
if (error instanceof _chunkN3B65VLBjs.EsiError || error instanceof _chunkN3B65VLBjs.CircuitOpenError) {
|
|
895
895
|
throw error;
|
|
896
896
|
}
|
|
897
897
|
if (error instanceof Error) {
|
|
898
|
-
|
|
899
|
-
throw
|
|
898
|
+
_chunkN3B65VLBjs.logError2.call(void 0, client, `Unexpected error: ${error.message}`);
|
|
899
|
+
throw _chunkN3B65VLBjs.buildError.call(void 0, error.message, "ESIJS_ERROR");
|
|
900
900
|
}
|
|
901
|
-
|
|
902
|
-
throw
|
|
901
|
+
_chunkN3B65VLBjs.logError2.call(void 0, client, `Unexpected error: ${String(error)}`);
|
|
902
|
+
throw _chunkN3B65VLBjs.buildError.call(void 0, String(error), "ESIJS_ERROR");
|
|
903
903
|
}
|
|
904
904
|
|
|
905
905
|
// src/core/util/retry.ts
|
|
@@ -934,38 +934,38 @@ var RetryStrategy = class {
|
|
|
934
934
|
try {
|
|
935
935
|
return await operation();
|
|
936
936
|
} catch (error) {
|
|
937
|
-
if (error instanceof
|
|
937
|
+
if (error instanceof _chunkN3B65VLBjs.CircuitOpenError) {
|
|
938
938
|
throw error;
|
|
939
939
|
}
|
|
940
|
-
if (!refreshAttempted && error instanceof
|
|
940
|
+
if (!refreshAttempted && error instanceof _chunkN3B65VLBjs.EsiError && error.statusCode === 401 && context.requiresAuth && context.refreshToken) {
|
|
941
941
|
refreshAttempted = true;
|
|
942
|
-
|
|
942
|
+
_chunkN3B65VLBjs.logInfo2.call(void 0, context.client, "Received 401, attempting token refresh...", {
|
|
943
943
|
endpoint: context.endpoint
|
|
944
944
|
});
|
|
945
945
|
try {
|
|
946
946
|
await context.refreshToken();
|
|
947
947
|
} catch (refreshError) {
|
|
948
|
-
if (refreshError instanceof
|
|
948
|
+
if (refreshError instanceof _chunkN3B65VLBjs.EsiError || refreshError instanceof _chunkN3B65VLBjs.CircuitOpenError) {
|
|
949
949
|
throw refreshError;
|
|
950
950
|
}
|
|
951
951
|
const msg = refreshError instanceof Error ? refreshError.message : String(refreshError);
|
|
952
|
-
|
|
952
|
+
_chunkN3B65VLBjs.logError2.call(void 0, context.client, `Token refresh failed: ${msg}`, {
|
|
953
953
|
endpoint: context.endpoint
|
|
954
954
|
});
|
|
955
|
-
throw
|
|
955
|
+
throw _chunkN3B65VLBjs.buildError.call(void 0,
|
|
956
956
|
`Token refresh failed: ${msg}`,
|
|
957
957
|
"TOKEN_REFRESH_FAILED"
|
|
958
958
|
);
|
|
959
959
|
}
|
|
960
|
-
|
|
960
|
+
_chunkN3B65VLBjs.logInfo2.call(void 0, context.client, "Token refreshed, retrying request", {
|
|
961
961
|
endpoint: context.endpoint
|
|
962
962
|
});
|
|
963
963
|
attempt--;
|
|
964
964
|
continue;
|
|
965
965
|
}
|
|
966
|
-
if (error instanceof
|
|
966
|
+
if (error instanceof _chunkN3B65VLBjs.EsiError && error.retryable && canRetryMethod && attempt < this.maxRetries) {
|
|
967
967
|
const delay = retryDelay(attempt, this.baseDelayMs, this.maxDelayMs);
|
|
968
|
-
|
|
968
|
+
_chunkN3B65VLBjs.logWarn2.call(void 0,
|
|
969
969
|
context.client,
|
|
970
970
|
`Request to ${context.endpoint} failed (${error.statusCode}), retrying in ${Math.round(delay)}ms (attempt ${attempt + 1}/${this.maxRetries})`,
|
|
971
971
|
{ method: context.method, statusCode: error.statusCode }
|
|
@@ -988,7 +988,7 @@ function resolveCache(client) {
|
|
|
988
988
|
function resolveRateLimiter(client) {
|
|
989
989
|
const limiter = client.getRateLimiter();
|
|
990
990
|
if (!limiter) {
|
|
991
|
-
throw
|
|
991
|
+
throw _chunkN3B65VLBjs.buildError.call(void 0,
|
|
992
992
|
"No rate limiter configured on ApiClient. Set one via apiClient.setRateLimiter(new RateLimiter()).",
|
|
993
993
|
"CONFIGURATION_ERROR"
|
|
994
994
|
);
|
|
@@ -1020,7 +1020,7 @@ var PaginationHandler = (_class3 = class {
|
|
|
1020
1020
|
if (effectiveMaxPage <= 1) {
|
|
1021
1021
|
return allData;
|
|
1022
1022
|
}
|
|
1023
|
-
|
|
1023
|
+
_chunkN3B65VLBjs.logInfo2.call(void 0, client, `Fetching pages 2-${effectiveMaxPage} for ${endpoint}...`, {
|
|
1024
1024
|
method,
|
|
1025
1025
|
totalPages
|
|
1026
1026
|
});
|
|
@@ -1036,19 +1036,19 @@ var PaginationHandler = (_class3 = class {
|
|
|
1036
1036
|
pageFetch
|
|
1037
1037
|
);
|
|
1038
1038
|
if (opts.stopOnEmptyPage && (!pageData || pageData.length === 0)) {
|
|
1039
|
-
|
|
1039
|
+
_chunkN3B65VLBjs.logWarn2.call(void 0, client, `Page ${page} is empty. Stopping pagination.`, {
|
|
1040
1040
|
page
|
|
1041
1041
|
});
|
|
1042
1042
|
break;
|
|
1043
1043
|
}
|
|
1044
1044
|
allData.push(...pageData);
|
|
1045
|
-
|
|
1045
|
+
_chunkN3B65VLBjs.logInfo2.call(void 0,
|
|
1046
1046
|
client,
|
|
1047
1047
|
`Fetched page ${page}/${effectiveMaxPage} (${pageData.length} items)`,
|
|
1048
1048
|
{ page, items: pageData.length }
|
|
1049
1049
|
);
|
|
1050
1050
|
} catch (error) {
|
|
1051
|
-
|
|
1051
|
+
_chunkN3B65VLBjs.logError2.call(void 0,
|
|
1052
1052
|
client,
|
|
1053
1053
|
`Failed to fetch page ${page}: ${error instanceof Error ? error.message : String(error)}`,
|
|
1054
1054
|
{ page }
|
|
@@ -1056,7 +1056,7 @@ var PaginationHandler = (_class3 = class {
|
|
|
1056
1056
|
throw error instanceof Error ? error : new Error(`Failed to fetch page ${page}: ${String(error)}`);
|
|
1057
1057
|
}
|
|
1058
1058
|
}
|
|
1059
|
-
|
|
1059
|
+
_chunkN3B65VLBjs.logInfo2.call(void 0,
|
|
1060
1060
|
client,
|
|
1061
1061
|
`Pagination complete. Fetched ${allData.length} total items from up to ${effectiveMaxPage} pages.`,
|
|
1062
1062
|
{ totalItems: allData.length }
|
|
@@ -1074,7 +1074,7 @@ var PaginationHandler = (_class3 = class {
|
|
|
1074
1074
|
const paginatedEndpoint = this.buildPaginatedEndpoint(endpoint, page);
|
|
1075
1075
|
return retryStrategy.execute(
|
|
1076
1076
|
() => {
|
|
1077
|
-
|
|
1077
|
+
_chunkN3B65VLBjs.logInfo2.call(void 0,
|
|
1078
1078
|
client,
|
|
1079
1079
|
`Fetching page ${page} via pipeline: ${paginatedEndpoint}`,
|
|
1080
1080
|
{ page }
|
|
@@ -1115,7 +1115,7 @@ async function handleOffsetPagination(client, endpoint, method, requiresAuth, pa
|
|
|
1115
1115
|
if (totalPages <= 1) {
|
|
1116
1116
|
return { headers: parsed.raw, body: data, status: 200 };
|
|
1117
1117
|
}
|
|
1118
|
-
|
|
1118
|
+
_chunkN3B65VLBjs.logInfo2.call(void 0,
|
|
1119
1119
|
client,
|
|
1120
1120
|
`Found ${totalPages} pages, fetching additional pages with rate limiting...`,
|
|
1121
1121
|
{ endpoint, totalPages }
|
|
@@ -1153,15 +1153,15 @@ async function handleOffsetPagination(client, endpoint, method, requiresAuth, pa
|
|
|
1153
1153
|
return { headers: parsed.raw, body: allData, status: 200 };
|
|
1154
1154
|
} catch (paginationError) {
|
|
1155
1155
|
const msg = paginationError instanceof Error ? paginationError.message : String(paginationError);
|
|
1156
|
-
|
|
1156
|
+
_chunkN3B65VLBjs.logWarn2.call(void 0, client, `Pagination failed for ${url}: ${msg}`, {
|
|
1157
1157
|
url,
|
|
1158
1158
|
endpoint,
|
|
1159
1159
|
error: msg
|
|
1160
1160
|
});
|
|
1161
|
-
if (paginationError instanceof
|
|
1161
|
+
if (paginationError instanceof _chunkN3B65VLBjs.EsiError || paginationError instanceof _chunkN3B65VLBjs.CircuitOpenError) {
|
|
1162
1162
|
throw paginationError;
|
|
1163
1163
|
}
|
|
1164
|
-
throw
|
|
1164
|
+
throw _chunkN3B65VLBjs.buildError.call(void 0,
|
|
1165
1165
|
`Pagination incomplete for ${url}: ${msg}`,
|
|
1166
1166
|
"PAGINATION_INCOMPLETE",
|
|
1167
1167
|
url
|
|
@@ -1249,7 +1249,7 @@ function isAbortError(err) {
|
|
|
1249
1249
|
function networkError(err, url) {
|
|
1250
1250
|
const reason = err instanceof Error ? err.message : String(err);
|
|
1251
1251
|
return Object.assign(
|
|
1252
|
-
new (0,
|
|
1252
|
+
new (0, _chunkN3B65VLBjs.EsiError)(0, `Network request failed: ${reason}`, url),
|
|
1253
1253
|
{ cause: err }
|
|
1254
1254
|
);
|
|
1255
1255
|
}
|
|
@@ -1289,7 +1289,7 @@ async function executeSingleFetch(client, endpoint, method, body, requiresAuth,
|
|
|
1289
1289
|
body: req.body ? JSON.stringify(req.body) : void 0
|
|
1290
1290
|
};
|
|
1291
1291
|
const url = req.url;
|
|
1292
|
-
|
|
1292
|
+
_chunkN3B65VLBjs.logInfo2.call(void 0, client, `Hitting endpoint: ${url}`, { method, endpoint });
|
|
1293
1293
|
const cb = resolveCircuitBreaker2(client);
|
|
1294
1294
|
const cbKey = cb && templatePath && _optionalChain([cb, 'access', _10 => _10.getKeyStrategy, 'optionalCall', _11 => _11()]) === "template" ? templatePath : endpoint;
|
|
1295
1295
|
if (cb) cb.checkCircuit(cbKey);
|
|
@@ -1312,7 +1312,7 @@ async function executeSingleFetch(client, endpoint, method, body, requiresAuth,
|
|
|
1312
1312
|
cbRecorded = true;
|
|
1313
1313
|
}
|
|
1314
1314
|
if (isAbortError(err)) {
|
|
1315
|
-
throw new (0,
|
|
1315
|
+
throw new (0, _chunkN3B65VLBjs.TimeoutError)(timeoutMs, url);
|
|
1316
1316
|
}
|
|
1317
1317
|
throw networkError(err, url);
|
|
1318
1318
|
}
|
|
@@ -1334,7 +1334,7 @@ async function executeSingleFetch(client, endpoint, method, body, requiresAuth,
|
|
|
1334
1334
|
cbRecorded = true;
|
|
1335
1335
|
}
|
|
1336
1336
|
if (parsed.warning) {
|
|
1337
|
-
|
|
1337
|
+
_chunkN3B65VLBjs.logWarn2.call(void 0,
|
|
1338
1338
|
client,
|
|
1339
1339
|
`ESI Warning ${parsed.warning.code}: ${parsed.warning.message}`,
|
|
1340
1340
|
{
|
|
@@ -1355,8 +1355,8 @@ async function parseJsonBody(client, response, _url) {
|
|
|
1355
1355
|
return await response.json();
|
|
1356
1356
|
} catch (jsonError) {
|
|
1357
1357
|
const msg = jsonError instanceof Error ? jsonError.message : String(jsonError);
|
|
1358
|
-
|
|
1359
|
-
throw
|
|
1358
|
+
_chunkN3B65VLBjs.logError2.call(void 0, client, `Failed to parse JSON response: ${msg}`, { url: _url });
|
|
1359
|
+
throw _chunkN3B65VLBjs.buildError.call(void 0, `Invalid JSON response: ${msg}`, "JSON_PARSE_ERROR");
|
|
1360
1360
|
}
|
|
1361
1361
|
}
|
|
1362
1362
|
async function fetchOnePage(client, endpoint, method, body, requiresAuth, useETag, resolveCache2, resolveRateLimiter2, resolveCircuitBreaker2, requestTimeout, templatePath) {
|
|
@@ -1376,7 +1376,7 @@ async function fetchOnePage(client, endpoint, method, body, requiresAuth, useETa
|
|
|
1376
1376
|
if (!response.ok) {
|
|
1377
1377
|
const text = statusMessage(response);
|
|
1378
1378
|
const reason = await readEsiErrorReason(response);
|
|
1379
|
-
throw new (0,
|
|
1379
|
+
throw new (0, _chunkN3B65VLBjs.EsiError)(
|
|
1380
1380
|
response.status,
|
|
1381
1381
|
reason ? `${text}: ${reason}` : text,
|
|
1382
1382
|
url,
|
|
@@ -1611,20 +1611,20 @@ var handleRequest = async (client, endpoint, method, body, requiresAuth = false,
|
|
|
1611
1611
|
var UNSAFE_PATH_CHARS = /[/\\?#@!$&'()*+,;=<>{}|^`]/;
|
|
1612
1612
|
function validatePathParam(paramName, value) {
|
|
1613
1613
|
if (value === null || value === void 0 || value === "") {
|
|
1614
|
-
throw
|
|
1614
|
+
throw _chunkN3B65VLBjs.buildError.call(void 0,
|
|
1615
1615
|
`Path parameter '${paramName}' must not be empty`,
|
|
1616
1616
|
"VALIDATION_ERROR"
|
|
1617
1617
|
);
|
|
1618
1618
|
}
|
|
1619
1619
|
const str = `${value}`;
|
|
1620
1620
|
if (UNSAFE_PATH_CHARS.test(str)) {
|
|
1621
|
-
throw
|
|
1621
|
+
throw _chunkN3B65VLBjs.buildError.call(void 0,
|
|
1622
1622
|
`Path parameter '${paramName}' contains invalid characters`,
|
|
1623
1623
|
"VALIDATION_ERROR"
|
|
1624
1624
|
);
|
|
1625
1625
|
}
|
|
1626
1626
|
if (typeof value === "number" && !Number.isFinite(value)) {
|
|
1627
|
-
throw
|
|
1627
|
+
throw _chunkN3B65VLBjs.buildError.call(void 0,
|
|
1628
1628
|
`Path parameter '${paramName}' must be a finite number`,
|
|
1629
1629
|
"VALIDATION_ERROR"
|
|
1630
1630
|
);
|
|
@@ -1637,13 +1637,13 @@ function validateBaseUrl(url, allowCustomHost) {
|
|
|
1637
1637
|
try {
|
|
1638
1638
|
parsed = new URL(url);
|
|
1639
1639
|
} catch (e3) {
|
|
1640
|
-
throw
|
|
1640
|
+
throw _chunkN3B65VLBjs.buildError.call(void 0, `Invalid base URL: ${url}`, "VALIDATION_ERROR");
|
|
1641
1641
|
}
|
|
1642
1642
|
if (parsed.protocol !== "https:") {
|
|
1643
|
-
throw
|
|
1643
|
+
throw _chunkN3B65VLBjs.buildError.call(void 0, "Base URL must use HTTPS protocol", "VALIDATION_ERROR");
|
|
1644
1644
|
}
|
|
1645
1645
|
if (!allowCustomHost && !ALLOWED_ESI_HOSTS.includes(parsed.hostname)) {
|
|
1646
|
-
throw
|
|
1646
|
+
throw _chunkN3B65VLBjs.buildError.call(void 0,
|
|
1647
1647
|
`Base URL host '${parsed.hostname}' is not in the allowlist. Allowed hosts: ${ALLOWED_ESI_HOSTS.join(", ")}. Set unsafeAllowCustomHost to bypass this check.`,
|
|
1648
1648
|
"VALIDATION_ERROR"
|
|
1649
1649
|
);
|
|
@@ -1652,20 +1652,20 @@ function validateBaseUrl(url, allowCustomHost) {
|
|
|
1652
1652
|
}
|
|
1653
1653
|
function validateQueryParam(paramName, value) {
|
|
1654
1654
|
if (value === null || value === void 0) {
|
|
1655
|
-
throw
|
|
1655
|
+
throw _chunkN3B65VLBjs.buildError.call(void 0,
|
|
1656
1656
|
`Query parameter '${paramName}' must not be null or undefined`,
|
|
1657
1657
|
"VALIDATION_ERROR"
|
|
1658
1658
|
);
|
|
1659
1659
|
}
|
|
1660
1660
|
const str = `${value}`;
|
|
1661
1661
|
if (typeof value === "number" && !Number.isFinite(value)) {
|
|
1662
|
-
throw
|
|
1662
|
+
throw _chunkN3B65VLBjs.buildError.call(void 0,
|
|
1663
1663
|
`Query parameter '${paramName}' must be a finite number`,
|
|
1664
1664
|
"VALIDATION_ERROR"
|
|
1665
1665
|
);
|
|
1666
1666
|
}
|
|
1667
1667
|
if (str.length > 2e3) {
|
|
1668
|
-
throw
|
|
1668
|
+
throw _chunkN3B65VLBjs.buildError.call(void 0,
|
|
1669
1669
|
`Query parameter '${paramName}' exceeds maximum length`,
|
|
1670
1670
|
"VALIDATION_ERROR"
|
|
1671
1671
|
);
|
|
@@ -1766,7 +1766,7 @@ function createClient(apiClient, endpoints, options) {
|
|
|
1766
1766
|
parts.push(`Use '${def.deprecated.replacedBy}' instead.`);
|
|
1767
1767
|
if (def.deprecated.sunsetDate)
|
|
1768
1768
|
parts.push(`Sunset date: ${def.deprecated.sunsetDate}.`);
|
|
1769
|
-
|
|
1769
|
+
_chunkN3B65VLBjs.logWarn2.call(void 0, apiClient, parts.join(" "), { endpoint: methodName });
|
|
1770
1770
|
}
|
|
1771
1771
|
const built = buildEndpointPath(def, args, apiClient.getDatasource());
|
|
1772
1772
|
let path2 = built.path;
|
|
@@ -1774,7 +1774,7 @@ function createClient(apiClient, endpoints, options) {
|
|
|
1774
1774
|
if (apiClient.getValidateRequest() && def.requestSchema && body != null) {
|
|
1775
1775
|
const reqResult = def.requestSchema.safeParse(body);
|
|
1776
1776
|
if (!reqResult.success) {
|
|
1777
|
-
throw new (0,
|
|
1777
|
+
throw new (0, _chunkN3B65VLBjs.EsiValidationError)(
|
|
1778
1778
|
`${apiClient.getLink()}/${path2}`,
|
|
1779
1779
|
reqResult.error,
|
|
1780
1780
|
void 0,
|
|
@@ -1815,7 +1815,7 @@ function createClient(apiClient, endpoints, options) {
|
|
|
1815
1815
|
def.requiresAuth,
|
|
1816
1816
|
resolveCache
|
|
1817
1817
|
);
|
|
1818
|
-
throw new (0,
|
|
1818
|
+
throw new (0, _chunkN3B65VLBjs.EsiValidationError)(
|
|
1819
1819
|
`${apiClient.getLink()}/${path2}`,
|
|
1820
1820
|
result.error
|
|
1821
1821
|
);
|
|
@@ -1862,7 +1862,7 @@ function createClient(apiClient, endpoints, options) {
|
|
|
1862
1862
|
def.requiresAuth,
|
|
1863
1863
|
resolveCache
|
|
1864
1864
|
);
|
|
1865
|
-
throw new (0,
|
|
1865
|
+
throw new (0, _chunkN3B65VLBjs.EsiValidationError)(
|
|
1866
1866
|
`${apiClient.getLink()}/${path2}`,
|
|
1867
1867
|
result.error
|
|
1868
1868
|
);
|
|
@@ -1878,7 +1878,7 @@ function createClient(apiClient, endpoints, options) {
|
|
|
1878
1878
|
return responseBody;
|
|
1879
1879
|
} catch (err) {
|
|
1880
1880
|
if (safeMode) {
|
|
1881
|
-
const error = err instanceof
|
|
1881
|
+
const error = err instanceof _chunkN3B65VLBjs.EsiError ? err : new (0, _chunkN3B65VLBjs.EsiError)(
|
|
1882
1882
|
0,
|
|
1883
1883
|
err instanceof Error ? err.message : String(err)
|
|
1884
1884
|
);
|
|
@@ -1922,7 +1922,7 @@ function validatePageBody(body, schema, url, validate) {
|
|
|
1922
1922
|
if (!schema || !validate) return body;
|
|
1923
1923
|
const result = schema.safeParse(body);
|
|
1924
1924
|
if (!result.success) {
|
|
1925
|
-
throw new (0,
|
|
1925
|
+
throw new (0, _chunkN3B65VLBjs.EsiValidationError)(url, result.error);
|
|
1926
1926
|
}
|
|
1927
1927
|
return result.data;
|
|
1928
1928
|
}
|
|
@@ -1944,7 +1944,6 @@ async function fetchAllPages(client, endpoint, method, requiresAuth = false, bod
|
|
|
1944
1944
|
);
|
|
1945
1945
|
const totalPages = parseInt(firstResponse.headers["x-pages"] || "1", 10);
|
|
1946
1946
|
const result = extractArray(firstBody);
|
|
1947
|
-
if (totalPages <= 1) return result;
|
|
1948
1947
|
const remaining = Array.from({ length: totalPages - 1 }, (_, i) => i + 2);
|
|
1949
1948
|
for (let i = 0; i < remaining.length; i += concurrency) {
|
|
1950
1949
|
const batch = remaining.slice(i, i + concurrency);
|
|
@@ -1952,7 +1951,7 @@ async function fetchAllPages(client, endpoint, method, requiresAuth = false, bod
|
|
|
1952
1951
|
batch.map(async (page) => {
|
|
1953
1952
|
const sep = endpoint.includes("?") ? "&" : "?";
|
|
1954
1953
|
const pagedEndpoint = `${endpoint}${sep}page=${page}`;
|
|
1955
|
-
|
|
1954
|
+
_chunkN3B65VLBjs.logInfo2.call(void 0,
|
|
1956
1955
|
client,
|
|
1957
1956
|
`Fetching page ${page}/${totalPages}: ${pagedEndpoint}`,
|
|
1958
1957
|
{ page, totalPages }
|
|
@@ -2000,7 +1999,7 @@ async function* fetchPages(client, endpoint, method, requiresAuth = false, body,
|
|
|
2000
1999
|
for (let page = 2; page <= totalPages; page++) {
|
|
2001
2000
|
const sep = endpoint.includes("?") ? "&" : "?";
|
|
2002
2001
|
const pagedEndpoint = `${endpoint}${sep}page=${page}`;
|
|
2003
|
-
|
|
2002
|
+
_chunkN3B65VLBjs.logInfo2.call(void 0, client, `Fetching page ${page}/${totalPages}: ${pagedEndpoint}`, {
|
|
2004
2003
|
page,
|
|
2005
2004
|
totalPages
|
|
2006
2005
|
});
|
|
@@ -2217,7 +2216,7 @@ var AllianceClient = class extends BaseEsiClient {
|
|
|
2217
2216
|
* @requires Authentication
|
|
2218
2217
|
*/
|
|
2219
2218
|
getContacts(allianceId) {
|
|
2220
|
-
|
|
2219
|
+
_chunkN3B65VLBjs.logWarn2.call(void 0,
|
|
2221
2220
|
this._client,
|
|
2222
2221
|
"AllianceClient.getContacts() is deprecated. Use ContactsClient.getAllianceContacts() instead. Planned removal in next major version.",
|
|
2223
2222
|
{ allianceId }
|
|
@@ -2233,7 +2232,7 @@ var AllianceClient = class extends BaseEsiClient {
|
|
|
2233
2232
|
* @requires Authentication
|
|
2234
2233
|
*/
|
|
2235
2234
|
getContactLabels(allianceId) {
|
|
2236
|
-
|
|
2235
|
+
_chunkN3B65VLBjs.logWarn2.call(void 0,
|
|
2237
2236
|
this._client,
|
|
2238
2237
|
"AllianceClient.getContactLabels() is deprecated. Use ContactsClient.getAllianceContactLabels() instead. Planned removal in next major version.",
|
|
2239
2238
|
{ allianceId }
|
|
@@ -6788,7 +6787,7 @@ var MetaClient = class extends BaseEsiClient {
|
|
|
6788
6787
|
*/
|
|
6789
6788
|
async getOpenApiYaml() {
|
|
6790
6789
|
const url = `${this._client.getLink()}/meta/openapi.yaml`;
|
|
6791
|
-
|
|
6790
|
+
_chunkN3B65VLBjs.logInfo2.call(void 0, this._client, `Hitting endpoint: ${url}`, { method: "GET" });
|
|
6792
6791
|
try {
|
|
6793
6792
|
const response = await fetch(url, {
|
|
6794
6793
|
method: "GET",
|
|
@@ -6804,12 +6803,12 @@ var MetaClient = class extends BaseEsiClient {
|
|
|
6804
6803
|
return await response.text();
|
|
6805
6804
|
} catch (error) {
|
|
6806
6805
|
if (error instanceof Error) {
|
|
6807
|
-
|
|
6806
|
+
_chunkN3B65VLBjs.logError2.call(void 0, this._client, `Error fetching YAML: ${error.message}`, {
|
|
6808
6807
|
url
|
|
6809
6808
|
});
|
|
6810
6809
|
throw error;
|
|
6811
6810
|
} else {
|
|
6812
|
-
|
|
6811
|
+
_chunkN3B65VLBjs.logError2.call(void 0, this._client, `Unexpected error: ${String(error)}`, { url });
|
|
6813
6812
|
throw new Error(String(error));
|
|
6814
6813
|
}
|
|
6815
6814
|
}
|
|
@@ -7523,7 +7522,7 @@ async function batchFetch(keys, fetcher, options = {}) {
|
|
|
7523
7522
|
let completed = 0;
|
|
7524
7523
|
let running = 0;
|
|
7525
7524
|
let index = 0;
|
|
7526
|
-
|
|
7525
|
+
_chunkN3B65VLBjs.logInfo2.call(void 0,
|
|
7527
7526
|
null,
|
|
7528
7527
|
`Batch fetch: ${keys.length} items, concurrency=${concurrency}`,
|
|
7529
7528
|
{
|
|
@@ -7540,7 +7539,7 @@ async function batchFetch(keys, fetcher, options = {}) {
|
|
|
7540
7539
|
fetcher(key).then((result) => {
|
|
7541
7540
|
results.set(key, result);
|
|
7542
7541
|
}).catch((err) => {
|
|
7543
|
-
const error = err instanceof
|
|
7542
|
+
const error = err instanceof _chunkN3B65VLBjs.EsiError || err instanceof Error ? err : new Error(String(err));
|
|
7544
7543
|
errors.set(key, error);
|
|
7545
7544
|
}).finally(() => {
|
|
7546
7545
|
running--;
|
|
@@ -7549,7 +7548,7 @@ async function batchFetch(keys, fetcher, options = {}) {
|
|
|
7549
7548
|
options.onProgress(completed, keys.length);
|
|
7550
7549
|
}
|
|
7551
7550
|
if (completed === keys.length) {
|
|
7552
|
-
|
|
7551
|
+
_chunkN3B65VLBjs.logDebug2.call(void 0,
|
|
7553
7552
|
null,
|
|
7554
7553
|
`Batch complete: ${results.size} succeeded, ${errors.size} failed`,
|
|
7555
7554
|
{ succeeded: results.size, failed: errors.size }
|
|
@@ -7573,7 +7572,7 @@ async function batchPost(ids, poster, chunkSize = 1e3) {
|
|
|
7573
7572
|
for (let i = 0; i < ids.length; i += chunkSize) {
|
|
7574
7573
|
chunks.push(ids.slice(i, i + chunkSize));
|
|
7575
7574
|
}
|
|
7576
|
-
|
|
7575
|
+
_chunkN3B65VLBjs.logInfo2.call(void 0,
|
|
7577
7576
|
null,
|
|
7578
7577
|
`Batch POST: ${ids.length} IDs in ${chunks.length} chunks of ${chunkSize}`,
|
|
7579
7578
|
{ total: ids.length, chunks: chunks.length, chunkSize }
|
|
@@ -7599,7 +7598,7 @@ var ETagCacheManager = (_class4 = class {
|
|
|
7599
7598
|
}
|
|
7600
7599
|
log(level, message, context) {
|
|
7601
7600
|
const ctx = context && Object.keys(context).length > 0 ? context : void 0;
|
|
7602
|
-
const emit = level === "info" ?
|
|
7601
|
+
const emit = level === "info" ? _chunkN3B65VLBjs.logInfo2 : _chunkN3B65VLBjs.logDebug2;
|
|
7603
7602
|
emit(this.client, message, ctx);
|
|
7604
7603
|
}
|
|
7605
7604
|
constructor(config = {}) {;_class4.prototype.__init15.call(this);_class4.prototype.__init16.call(this);_class4.prototype.__init17.call(this);_class4.prototype.__init18.call(this);
|
|
@@ -8150,7 +8149,7 @@ var RateLimiter = (_class5 = class _RateLimiter {
|
|
|
8150
8149
|
stillBlockedBucket = bucket2;
|
|
8151
8150
|
const waitedUntil = bucket2.blockedUntil;
|
|
8152
8151
|
const waitTime = waitedUntil - now;
|
|
8153
|
-
|
|
8152
|
+
_chunkN3B65VLBjs.logWarn2.call(void 0,
|
|
8154
8153
|
null,
|
|
8155
8154
|
`[ESI Rate Limit] Group '${bucket2.group}' blocked for ${Math.ceil(waitTime / 1e3)}s (420/429 received)`,
|
|
8156
8155
|
{ group: bucket2.group, waitMs: waitTime }
|
|
@@ -8162,12 +8161,12 @@ var RateLimiter = (_class5 = class _RateLimiter {
|
|
|
8162
8161
|
}
|
|
8163
8162
|
if (stillBlockedBucket && stillBlockedBucket.blockedUntil > Date.now()) {
|
|
8164
8163
|
const waitTime = stillBlockedBucket.blockedUntil - Date.now();
|
|
8165
|
-
|
|
8164
|
+
_chunkN3B65VLBjs.logWarn2.call(void 0,
|
|
8166
8165
|
null,
|
|
8167
8166
|
`[ESI Rate Limit] Group '${stillBlockedBucket.group}' still blocked after retry budget exhausted; aborting request instead of sending while blocked`,
|
|
8168
8167
|
{ group: stillBlockedBucket.group }
|
|
8169
8168
|
);
|
|
8170
|
-
throw new (0,
|
|
8169
|
+
throw new (0, _chunkN3B65VLBjs.EsiError)(
|
|
8171
8170
|
429,
|
|
8172
8171
|
`Rate limit group '${stillBlockedBucket.group}' still blocked for ${Math.ceil(waitTime / 1e3)}s`
|
|
8173
8172
|
);
|
|
@@ -8177,7 +8176,7 @@ var RateLimiter = (_class5 = class _RateLimiter {
|
|
|
8177
8176
|
const resetMs = errorLimit.reset * 1e3;
|
|
8178
8177
|
const delay = Math.min(resetMs, 5e3);
|
|
8179
8178
|
if (delay > 0) {
|
|
8180
|
-
|
|
8179
|
+
_chunkN3B65VLBjs.logWarn2.call(void 0,
|
|
8181
8180
|
null,
|
|
8182
8181
|
`[ESI Rate Limit] Legacy error limit low (${errorLimit.remain}), waiting ${delay}ms`,
|
|
8183
8182
|
{ errorLimitRemain: errorLimit.remain }
|
|
@@ -8186,7 +8185,7 @@ var RateLimiter = (_class5 = class _RateLimiter {
|
|
|
8186
8185
|
}
|
|
8187
8186
|
} else if (errorLimit.remain <= 0 && errorLimit.reset > 0) {
|
|
8188
8187
|
const waitTime = errorLimit.reset * 1e3;
|
|
8189
|
-
|
|
8188
|
+
_chunkN3B65VLBjs.logWarn2.call(void 0,
|
|
8190
8189
|
null,
|
|
8191
8190
|
`[ESI Rate Limit] Legacy error limit exhausted, waiting ${Math.ceil(waitTime / 1e3)}s`,
|
|
8192
8191
|
{ errorLimitReset: errorLimit.reset }
|
|
@@ -8197,7 +8196,7 @@ var RateLimiter = (_class5 = class _RateLimiter {
|
|
|
8197
8196
|
if (bucket.remaining >= 0 && bucket.limit > 0) {
|
|
8198
8197
|
const ratio = bucket.remaining / bucket.limit;
|
|
8199
8198
|
if (bucket.remaining <= 0) {
|
|
8200
|
-
|
|
8199
|
+
_chunkN3B65VLBjs.logWarn2.call(void 0,
|
|
8201
8200
|
null,
|
|
8202
8201
|
`[ESI Rate Limit] Group '${bucket.group}' token bucket empty, waiting 1s`,
|
|
8203
8202
|
{ group: bucket.group }
|
|
@@ -8335,7 +8334,7 @@ var RequestDeduplicator = (_class6 = class {constructor() { _class6.prototype.__
|
|
|
8335
8334
|
const existing = this.inflight.get(key);
|
|
8336
8335
|
if (existing) {
|
|
8337
8336
|
if (this.client) {
|
|
8338
|
-
|
|
8337
|
+
_chunkN3B65VLBjs.logDebug2.call(void 0, this.client, `[Dedup] Coalescing request: ${key}`);
|
|
8339
8338
|
}
|
|
8340
8339
|
return existing;
|
|
8341
8340
|
}
|
|
@@ -8364,7 +8363,7 @@ var RequestDeduplicator = (_class6 = class {constructor() { _class6.prototype.__
|
|
|
8364
8363
|
}
|
|
8365
8364
|
}
|
|
8366
8365
|
if (count > 0 && this.client) {
|
|
8367
|
-
|
|
8366
|
+
_chunkN3B65VLBjs.logDebug2.call(void 0,
|
|
8368
8367
|
this.client,
|
|
8369
8368
|
`[Dedup] Detached ${count} in-flight request(s) matching ${pathSegment} after a write`
|
|
8370
8369
|
);
|
|
@@ -8394,7 +8393,7 @@ function configureApiClient(client, config) {
|
|
|
8394
8393
|
client.setCache(cache);
|
|
8395
8394
|
}
|
|
8396
8395
|
if (_optionalChain([config, 'optionalAccess', _23 => _23.enableCircuitBreaker])) {
|
|
8397
|
-
const cb = new (0,
|
|
8396
|
+
const cb = new (0, _chunkN3B65VLBjs.CircuitBreaker)(config.circuitBreakerConfig);
|
|
8398
8397
|
cb.setClient(client);
|
|
8399
8398
|
client.setCircuitBreaker(cb);
|
|
8400
8399
|
}
|
|
@@ -8434,7 +8433,7 @@ function configureApiClient(client, config) {
|
|
|
8434
8433
|
if (_optionalChain([config, 'optionalAccess', _32 => _32.logger])) {
|
|
8435
8434
|
client.setLogger(config.logger);
|
|
8436
8435
|
} else if (_optionalChain([config, 'optionalAccess', _33 => _33.logLevel])) {
|
|
8437
|
-
client.setLogger(
|
|
8436
|
+
client.setLogger(_chunkN3B65VLBjs.createDefaultLogger.call(void 0, config.logLevel));
|
|
8438
8437
|
}
|
|
8439
8438
|
return { deduplicator };
|
|
8440
8439
|
}
|
|
@@ -8473,7 +8472,7 @@ var EsiClient = (_class7 = class {
|
|
|
8473
8472
|
const result = configureApiClient(this.apiClient, config);
|
|
8474
8473
|
this.deduplicator = result.deduplicator;
|
|
8475
8474
|
this.etagCacheEnabled = _optionalChain([config, 'optionalAccess', _42 => _42.enableETagCache]) !== false;
|
|
8476
|
-
const clientLogger = _nullishCoalesce(this.apiClient.getLogger(), () => (
|
|
8475
|
+
const clientLogger = _nullishCoalesce(this.apiClient.getLogger(), () => ( _chunkN3B65VLBjs.getLogger.call(void 0, )));
|
|
8477
8476
|
clientLogger.info("EsiClient initialized successfully", {
|
|
8478
8477
|
baseUrl,
|
|
8479
8478
|
clientId: _optionalChain([config, 'optionalAccess', _43 => _43.clientId])
|
|
@@ -8611,11 +8610,11 @@ var EsiClient = (_class7 = class {
|
|
|
8611
8610
|
}
|
|
8612
8611
|
setAccessToken(token) {
|
|
8613
8612
|
this.apiClient.setAccessToken(token);
|
|
8614
|
-
(_nullishCoalesce(this.apiClient.getLogger(), () => (
|
|
8613
|
+
(_nullishCoalesce(this.apiClient.getLogger(), () => ( _chunkN3B65VLBjs.getLogger.call(void 0, )))).info("Access token updated");
|
|
8615
8614
|
}
|
|
8616
8615
|
setTokenProvider(provider) {
|
|
8617
8616
|
this.apiClient.setTokenProvider(provider);
|
|
8618
|
-
(_nullishCoalesce(this.apiClient.getLogger(), () => (
|
|
8617
|
+
(_nullishCoalesce(this.apiClient.getLogger(), () => ( _chunkN3B65VLBjs.getLogger.call(void 0, )))).info(
|
|
8619
8618
|
provider ? "Token provider configured" : "Token provider removed"
|
|
8620
8619
|
);
|
|
8621
8620
|
}
|
|
@@ -8663,7 +8662,7 @@ var EsiClient = (_class7 = class {
|
|
|
8663
8662
|
this.deduplicator.clear();
|
|
8664
8663
|
}
|
|
8665
8664
|
this.clients.clear();
|
|
8666
|
-
(_nullishCoalesce(this.apiClient.getLogger(), () => (
|
|
8665
|
+
(_nullishCoalesce(this.apiClient.getLogger(), () => ( _chunkN3B65VLBjs.getLogger.call(void 0, )))).info(
|
|
8667
8666
|
"EsiClient shutdown completed"
|
|
8668
8667
|
);
|
|
8669
8668
|
}
|
|
@@ -8711,7 +8710,7 @@ var CustomEsiClient = (_class8 = class {
|
|
|
8711
8710
|
for (const name of this.enabledClients) {
|
|
8712
8711
|
this.clients.set(name, createClientInstance(name, this.apiClient));
|
|
8713
8712
|
}
|
|
8714
|
-
(_nullishCoalesce(this.apiClient.getLogger(), () => (
|
|
8713
|
+
(_nullishCoalesce(this.apiClient.getLogger(), () => ( _chunkN3B65VLBjs.getLogger.call(void 0, )))).info(
|
|
8715
8714
|
`CustomEsiClient initialized with clients: ${config.clients.join(", ")}`,
|
|
8716
8715
|
{ clients: config.clients }
|
|
8717
8716
|
);
|
|
@@ -8843,7 +8842,7 @@ var CustomEsiClient = (_class8 = class {
|
|
|
8843
8842
|
this.deduplicator.clear();
|
|
8844
8843
|
}
|
|
8845
8844
|
this.clients.clear();
|
|
8846
|
-
(_nullishCoalesce(this.apiClient.getLogger(), () => (
|
|
8845
|
+
(_nullishCoalesce(this.apiClient.getLogger(), () => ( _chunkN3B65VLBjs.getLogger.call(void 0, )))).info(
|
|
8847
8846
|
"CustomEsiClient shutdown completed"
|
|
8848
8847
|
);
|
|
8849
8848
|
}
|
|
@@ -9367,7 +9366,7 @@ function resolveLimit(requested) {
|
|
|
9367
9366
|
}
|
|
9368
9367
|
async function runWithConcurrency(items, worker, options = {}) {
|
|
9369
9368
|
const limit = resolveLimit(options.concurrency);
|
|
9370
|
-
const results =
|
|
9369
|
+
const results = [];
|
|
9371
9370
|
let nextIndex = 0;
|
|
9372
9371
|
let completed = 0;
|
|
9373
9372
|
async function runOne() {
|
|
@@ -9521,7 +9520,7 @@ var EsiTokenManager = (_class11 = class {
|
|
|
9521
9520
|
})));
|
|
9522
9521
|
this.refreshSkewMs = _nullishCoalesce(config.refreshSkewMs, () => ( 6e4));
|
|
9523
9522
|
this.autoRefresh = _nullishCoalesce(config.autoRefresh, () => ( true));
|
|
9524
|
-
this.logger = _nullishCoalesce(config.logger, () => (
|
|
9523
|
+
this.logger = _nullishCoalesce(config.logger, () => ( _chunkN3B65VLBjs.getLogger.call(void 0, )));
|
|
9525
9524
|
this.now = _nullishCoalesce(config.now, () => ( (() => Date.now())));
|
|
9526
9525
|
this.hooks = {
|
|
9527
9526
|
onRefresh: config.onRefresh,
|
|
@@ -10109,5 +10108,5 @@ function generateState() {
|
|
|
10109
10108
|
|
|
10110
10109
|
|
|
10111
10110
|
|
|
10112
|
-
exports.AccessListsClient = AccessListsClient; exports.AllianceClient = AllianceClient; exports.ApiClient = ApiClient; exports.ApiClientBuilder = ApiClientBuilder; exports.AssetsClient = AssetsClient; exports.AuthError = _chunkBBSHKVPIjs.AuthError; exports.BaseEsiClient = BaseEsiClient; exports.CalendarClient = CalendarClient; exports.CharacterClient = CharacterClient; exports.CharacterNotFoundError = _chunkBBSHKVPIjs.CharacterNotFoundError; exports.CharacterSkillsClient = CharacterSkillsClient; exports.CircuitBreaker =
|
|
10111
|
+
exports.AccessListsClient = AccessListsClient; exports.AllianceClient = AllianceClient; exports.ApiClient = ApiClient; exports.ApiClientBuilder = ApiClientBuilder; exports.AssetsClient = AssetsClient; exports.AuthError = _chunkBBSHKVPIjs.AuthError; exports.BaseEsiClient = BaseEsiClient; exports.CalendarClient = CalendarClient; exports.CharacterClient = CharacterClient; exports.CharacterNotFoundError = _chunkBBSHKVPIjs.CharacterNotFoundError; exports.CharacterSkillsClient = CharacterSkillsClient; exports.CircuitBreaker = _chunkN3B65VLBjs.CircuitBreaker; exports.CircuitOpenError = _chunkN3B65VLBjs.CircuitOpenError; exports.ClonesClient = ClonesClient; exports.ContactsClient = ContactsClient; exports.ContractsClient = ContractsClient; exports.CorporationProjectsClient = CorporationProjectsClient; exports.CorporationsClient = CorporationsClient; exports.CosmeticsClient = CosmeticsClient; exports.CustomEsiClient = CustomEsiClient; exports.DEFAULT_SSO_BASE_URL = DEFAULT_SSO_BASE_URL; exports.DogmaClient = DogmaClient; exports.ETagCacheManager = ETagCacheManager; exports.EsiApiFactory = EsiApiFactory; exports.EsiClient = EsiClient; exports.EsiClientBuilder = EsiClientBuilder; exports.EsiDiagnostics = EsiDiagnostics; exports.EsiError = _chunkN3B65VLBjs.EsiError; exports.EsiSpec = esi_spec_generated_exports; exports.EsiTokenManager = EsiTokenManager; exports.EsiValidationError = _chunkN3B65VLBjs.EsiValidationError; exports.EveSsoClient = EveSsoClient; exports.FactionClient = FactionClient; exports.FileTokenStorage = FileTokenStorage; exports.FittingsClient = FittingsClient; exports.FleetClient = FleetClient; exports.FreelanceJobsClient = FreelanceJobsClient; exports.IncursionsClient = IncursionsClient; exports.IndustryClient = IndustryClient; exports.InsuranceClient = InsuranceClient; exports.KillmailsClient = KillmailsClient; exports.LocationClient = LocationClient; exports.LoyaltyClient = LoyaltyClient; exports.MailClient = MailClient; exports.MarketClient = MarketClient; exports.MemoryTokenStorage = MemoryTokenStorage; exports.MercenaryClient = MercenaryClient; exports.MetaClient = MetaClient; exports.MilitaryCampaignsClient = MilitaryCampaignsClient; exports.ParagonHubClient = ParagonHubClient; exports.PiClient = PiClient; exports.RateLimiter = RateLimiter; exports.RequestDeduplicator = RequestDeduplicator; exports.RetryStrategy = RetryStrategy; exports.RouteClient = RouteClient; exports.SearchClient = SearchClient; exports.SkyhooksClient = SkyhooksClient; exports.SovereigntyClient = SovereigntyClient; exports.SsoError = _chunkBBSHKVPIjs.SsoError; exports.StatusClient = StatusClient; exports.TimeoutError = _chunkN3B65VLBjs.TimeoutError; exports.TokenDecodeError = _chunkBBSHKVPIjs.TokenDecodeError; exports.TokenRevokedError = _chunkBBSHKVPIjs.TokenRevokedError; exports.UiClient = UiClient; exports.UniverseClient = UniverseClient; exports.WalletClient = WalletClient; exports.WarsClient = WarsClient; exports.batchFetch = batchFetch; exports.batchPost = batchPost; exports.brand = brand; exports.buildEndpointPath = buildEndpointPath; exports.codeChallengeFromVerifier = codeChallengeFromVerifier; exports.configureApiClient = configureApiClient; exports.createDefaultLogger = _chunkN3B65VLBjs.createDefaultLogger; exports.createNoopLogger = createNoopLogger; exports.decodeAccessToken = decodeAccessToken; exports.decodeJwtPayload = decodeJwtPayload; exports.esiEndpointScopes = esiEndpointScopes; exports.fetchAllCursorPages = fetchAllCursorPages; exports.fetchAllPages = fetchAllPages; exports.fetchPages = fetchPages; exports.generateCodeVerifier = generateCodeVerifier; exports.generatePkcePair = generatePkcePair; exports.generateState = generateState; exports.getDefaultClient = getDefaultClient; exports.getLogger = _chunkN3B65VLBjs.getLogger; exports.isAuthError = _chunkBBSHKVPIjs.isAuthError; exports.isCharacterNotFound = _chunkBBSHKVPIjs.isCharacterNotFound; exports.isCircuitOpen = _chunkN3B65VLBjs.isCircuitOpen; exports.isEsiError = _chunkN3B65VLBjs.isEsiError; exports.isForbidden = _chunkN3B65VLBjs.isForbidden; exports.isNotFound = _chunkN3B65VLBjs.isNotFound; exports.isRateLimited = _chunkN3B65VLBjs.isRateLimited; exports.isRetryable = _chunkN3B65VLBjs.isRetryable; exports.isServerError = _chunkN3B65VLBjs.isServerError; exports.isSsoError = _chunkBBSHKVPIjs.isSsoError; exports.isTimeout = _chunkN3B65VLBjs.isTimeout; exports.isTokenRevoked = _chunkBBSHKVPIjs.isTokenRevoked; exports.isUnauthorized = _chunkN3B65VLBjs.isUnauthorized; exports.isValidationError = _chunkN3B65VLBjs.isValidationError; exports.logDebug = _chunkN3B65VLBjs.logDebug; exports.logError = _chunkN3B65VLBjs.logError; exports.logFatal = _chunkN3B65VLBjs.logFatal; exports.logInfo = _chunkN3B65VLBjs.logInfo; exports.logTrace = _chunkN3B65VLBjs.logTrace; exports.logWarn = _chunkN3B65VLBjs.logWarn; exports.parseCharacterId = parseCharacterId; exports.parseScopes = parseScopes; exports.sanitizeUrl = _chunkN3B65VLBjs.sanitizeUrl; exports.schemas = _chunkSAQBXXTMjs.schemas_exports; exports.setLogger = _chunkN3B65VLBjs.setLogger; exports.toPinoLogger = _chunkN3B65VLBjs.toPinoLogger;
|
|
10113
10112
|
//# sourceMappingURL=index.js.map
|