@adaptic/utils 0.0.994 → 0.0.995

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
@@ -9318,8 +9318,11 @@ const fetchTrades = async (symbol, options) => {
9318
9318
  *
9319
9319
  * This module provides functions to interact with the Massive.com Indices API.
9320
9320
  */
9321
- // Constants from environment variables
9322
- const { ALPACA_INDICES_API_KEY } = process.env;
9321
+ // Constants from environment variables.
9322
+ // Backward-compat: ALPACA_INDICES_API_KEY is the pre-2026-Q2 name (vendor was
9323
+ // renamed Alpaca → Massive); MASSIVE_INDICES_API_KEY is preferred. The fallback
9324
+ // stays so consumers that haven't migrated env vars don't break.
9325
+ const { MASSIVE_INDICES_API_KEY, ALPACA_INDICES_API_KEY } = process.env;
9323
9326
  // Define concurrency limits for API
9324
9327
  const MASSIVE_INDICES_CONCURRENCY_LIMIT = 5;
9325
9328
  const massiveIndicesLimit = pLimit(MASSIVE_INDICES_CONCURRENCY_LIMIT);
@@ -9331,7 +9334,7 @@ const MASSIVE_API_BASE_URL = "https://api.massive.com";
9331
9334
  * @throws {Error} If no API key is available
9332
9335
  */
9333
9336
  const validateApiKey = (apiKey) => {
9334
- const key = apiKey || ALPACA_INDICES_API_KEY;
9337
+ const key = apiKey || MASSIVE_INDICES_API_KEY || ALPACA_INDICES_API_KEY;
9335
9338
  if (!key) {
9336
9339
  throw new Error("Massive Indices API key is missing");
9337
9340
  }