aiden-shared-calculations-unified 1.0.48 → 1.0.50

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.
@@ -10,10 +10,10 @@
10
10
 
11
11
  const { Firestore } = require('@google-cloud/firestore');
12
12
  const firestore = new Firestore();
13
- const { loadAllPriceData, getDailyPriceChange } = require('../../../utils/price_data_provider');
14
- const { loadInstrumentMappings, getInstrumentSectorMap } = require('../../../utils/sector_mapping_provider');
13
+ const { loadAllPriceData, getDailyPriceChange } = require('../../utils/price_data_provider');
14
+ const { loadInstrumentMappings, getInstrumentSectorMap } = require('../../utils/sector_mapping_provider');
15
15
  // NOTE: Corrected relative path for data_loader
16
- const { loadDataByRefs, getPortfolioPartRefs, loadFullDayMap } = require('../../../../bulltrackers-module/functions/computation-system/utils/data_loader');
16
+ const { loadDataByRefs, getPortfolioPartRefs, loadFullDayMap } = require('../../../bulltrackers-module/functions/computation-system/utils/data_loader');
17
17
 
18
18
  const COHORT_PERCENTILE = 0.2; // Bottom 20%
19
19
  const PROFILE_CALC_ID = 'user-investment-profile'; // The calc to read IS scores from
@@ -10,10 +10,10 @@
10
10
 
11
11
  const { Firestore } = require('@google-cloud/firestore');
12
12
  const firestore = new Firestore();
13
- const { loadAllPriceData, getDailyPriceChange } = require('../../../utils/price_data_provider');
14
- const { loadInstrumentMappings, getInstrumentSectorMap } = require('../../../utils/sector_mapping_provider');
13
+ const { loadAllPriceData, getDailyPriceChange } = require('../../utils/price_data_provider');
14
+ const { loadInstrumentMappings, getInstrumentSectorMap } = require('../../utils/sector_mapping_provider');
15
15
  // NOTE: Corrected relative path for data_loader
16
- const { loadDataByRefs, getPortfolioPartRefs, loadFullDayMap } = require('../../../../bulltrackers-module/functions/computation-system/utils/data_loader');
16
+ const { loadDataByRefs, getPortfolioPartRefs, loadFullDayMap } = require('../../../bulltrackers-module/functions/computation-system/utils/data_loader');
17
17
 
18
18
  const COHORT_PERCENTILE = 0.8; // Top 20%
19
19
  const PROFILE_CALC_ID = 'user-investment-profile'; // The calc to read IS scores from
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aiden-shared-calculations-unified",
3
- "version": "1.0.48",
3
+ "version": "1.0.50",
4
4
  "description": "Shared calculation modules for the BullTrackers Computation System.",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -1,14 +1,14 @@
1
1
  /**
2
2
  * @fileoverview Provides a resilient retry wrapper for Firestore operations.
3
3
  */
4
- const { logger } = require("sharedsetup")(__filename); // Note: In the package, you might need to adjust how the logger is obtained if sharedsetup isn't a direct dependency or passed in.
4
+ const { logger } = require("sharedsetup")(__filename);
5
5
 
6
6
  // Firestore error codes that are safe to retry
7
7
  const RETRYABLE_ERROR_CODES = new Set([
8
- 'DEADLINE_EXCEEDED',
9
- 'UNAVAILABLE',
10
- 'INTERNAL',
11
- 'RESOURCE_EXHAUSTED', // Can indicate contention
8
+ 'DEADLINE_EXCEEDED', 4,
9
+ 'UNAVAILABLE', 14,
10
+ 'INTERNAL', 13,
11
+ 'RESOURCE_EXHAUSTED', 8, // Can indicate contention
12
12
  ]);
13
13
 
14
14
  const MAX_RETRIES = 5;