@discomedia/utils 1.0.22 → 1.0.23

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/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.0.22",
6
+ "version": "1.0.23",
7
7
  "author": "Disco Media",
8
8
  "description": "Utility functions used in Disco Media apps",
9
9
  "always-build-npm": true,
package/dist/test.js CHANGED
@@ -13622,9 +13622,7 @@ class AlpacaMarketDataAPI extends EventEmitter {
13622
13622
  const dateRangeStr = earliestTimestamp && latestTimestamp
13623
13623
  ? `${earliestTimestamp.toLocaleDateString('en-US', { timeZone: 'America/New_York' })} to ${latestTimestamp.toLocaleDateString('en-US', { timeZone: 'America/New_York' })}`
13624
13624
  : 'unknown range';
13625
- log(`Page ${pageCount}: Fetched ${pageBarsCount.toLocaleString()} bars (total: ${totalBarsCount.toLocaleString()}) for ${symbolsStr}, date range: ${dateRangeStr}${hasMorePages ? ', more pages available' : ', complete'}`, {
13626
- type: 'info',
13627
- });
13625
+ log(`Page ${pageCount}: Fetched ${pageBarsCount.toLocaleString()} bars (total: ${totalBarsCount.toLocaleString()}) for ${symbols.length} symbols, date range: ${dateRangeStr}${hasMorePages ? ', more pages available' : ', complete'}`);
13628
13626
  // Prevent infinite loops
13629
13627
  if (pageCount > 1000) {
13630
13628
  log(`Stopping pagination after ${pageCount} pages to prevent infinite loop`, { type: 'warn' });
@@ -13632,12 +13630,10 @@ class AlpacaMarketDataAPI extends EventEmitter {
13632
13630
  }
13633
13631
  }
13634
13632
  // Final summary
13635
- const symbolCounts = Object.entries(allBars)
13633
+ const symbolsJoined = Object.entries(allBars)
13636
13634
  .map(([symbol, bars]) => `${symbol}: ${bars.length}`)
13637
13635
  .join(', ');
13638
- log(`Historical bars fetch complete: ${totalBarsCount.toLocaleString()} total bars across ${pageCount} pages (${symbolCounts})`, {
13639
- type: 'info',
13640
- });
13636
+ log(`Historical bars fetch complete: ${totalBarsCount.toLocaleString()} total bars across ${pageCount} pages for ${symbolsJoined.length} symbols'}`);
13641
13637
  return {
13642
13638
  bars: allBars,
13643
13639
  next_page_token: null, // Always null since we fetch all pages