@sonarwatch/portfolio-plugins 0.12.95 → 0.12.97

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.12.97](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.96...plugins-0.12.97) (2024-07-27)
6
+
7
+
8
+
9
+ ## [0.12.96](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.95...plugins-0.12.96) (2024-07-27)
10
+
11
+
12
+
5
13
  ## [0.12.95](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.94...plugins-0.12.95) (2024-07-26)
6
14
 
7
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonarwatch/portfolio-plugins",
3
- "version": "0.12.95",
3
+ "version": "0.12.97",
4
4
  "type": "commonjs",
5
5
  "types": "./src/index.d.ts",
6
6
  "peerDependencies": {
package/src/Cache.js CHANGED
@@ -259,6 +259,19 @@ function getDriverFromCacheConfig(cacheConfig) {
259
259
  tls: cacheConfig.params.tls ? {} : undefined,
260
260
  db: cacheConfig.params.db,
261
261
  ttl: cacheConfig.params.ttl,
262
+ connectTimeout: 20000,
263
+ keepAlive: 10000,
264
+ retryStrategy: (times) => {
265
+ const delay = Math.min(times * 50, 2000);
266
+ // eslint-disable-next-line no-console
267
+ console.error(`PortfolioCache redis reconnecting in ${delay} ms...`);
268
+ return delay;
269
+ },
270
+ reconnectOnError: (err) => {
271
+ // eslint-disable-next-line no-console
272
+ console.error('PortfolioCache redis error:', err);
273
+ return true;
274
+ },
262
275
  });
263
276
  case 'http':
264
277
  return (0, http_1.default)({
package/src/Cache.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Cache.js","sourceRoot":"","sources":["../../../../packages/plugins/src/Cache.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAyE;AACzE,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F,CAAC;QACJ,KAAK,MAAM;YACT,OAAO;gBACL,IAAI,EAAE,MAAM;gBACZ,MAAM,EAAE;oBACN,IAAI,EACF,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC;wBACrC,6DAA6D;oBAC/D,OAAO,EAAE;wBACP,aAAa,EAAE,UACb,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,IAAI,kCAC7C,EAAE;qBACH;iBACF;aACF,CAAC;QACJ;YACE,OAAO;gBACL,IAAI,EAAE,QAAQ;gBACd,MAAM,EAAE,EAAE;aACX,CAAC;IACN,CAAC;AACH,CAAC;AAlED,wCAkEC;AAED,SAAgB,QAAQ;IACtB,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;IACrC,OAAO,IAAI,KAAK,CAAC,WAAW,CAAC,CAAC;AAChC,CAAC;AAHD,4BAGC"}
1
+ {"version":3,"file":"Cache.js","sourceRoot":"","sources":["../../../../packages/plugins/src/Cache.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAyE;AACzE,8DAA4C;AAC5C,oEAAkD;AAClD,kEAAgD;AAChD,+DAUoC;AACpC,oEAA4C;AAC5C,+DAGwB;AACxB,yEAAiD;AACjD,wDAAqD;AAiBrD,MAAM,sBAAsB,GAAG,kBAAkB,CAAC;AAgElD,MAAa,KAAK;IAKhB,YAAY,WAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,wBAAwB,CAAC,WAAW,CAAC,CAAC;QACpD,IAAI,CAAC,OAAO,GAAG,IAAA,yBAAa,EAAC;YAC3B,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC,CAAC;QACH,IAAI,CAAC,iBAAiB,GAAG,IAAA,yBAAa,EAAC;YACrC,MAAM,EAAE,IAAA,sBAAY,EAAC;gBACnB,GAAG,EAAE,KAAK;aACX,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED,UAAU,CAAC,IAAyB;QAClC,IAAI,IAAI,CAAC,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AAO,CAAC,GAAG,CAAC,wBAAwB,CAAC;wBACrC,6DAA6D;oBAC/D,OAAO,EAAE;wBACP,aAAa,EAAE,UACb,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,IAAI,kCAC7C,EAAE;qBACH;iBACF;aACF,CAAC;QACJ;YACE,OAAO;gBACL,IAAI,EAAE,QAAQ;gBACd,MAAM,EAAE,EAAE;aACX,CAAC;IACN,CAAC;AACH,CAAC;AAlED,wCAkEC;AAED,SAAgB,QAAQ;IACtB,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;IACrC,OAAO,IAAI,KAAK,CAAC,WAAW,CAAC,CAAC;AAChC,CAAC;AAHD,4BAGC"}
@@ -19,24 +19,23 @@ const clients_1 = require("../../../utils/clients");
19
19
  const solana_1 = require("../../../utils/solana");
20
20
  const filters_1 = require("../filters");
21
21
  const helpers_1 = require("../../../utils/solana/pyth/helpers");
22
- const constants_1 = require("../../tokens/constants");
23
- const constants_2 = require("./constants");
22
+ const constants_1 = require("./constants");
24
23
  const structs_1 = require("./structs");
25
24
  const usdFactor = new bignumber_js_1.default(Math.pow(10, 6));
26
25
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
27
26
  const client = (0, clients_1.getClientSolana)();
28
- const positionAccounts = yield (0, solana_1.getParsedProgramAccounts)(client, structs_1.positionStruct, constants_2.perpsProgramId, (0, filters_1.perpetualsPositionsFilter)(owner));
27
+ const positionAccounts = yield (0, solana_1.getParsedProgramAccounts)(client, structs_1.positionStruct, constants_1.perpsProgramId, (0, filters_1.perpetualsPositionsFilter)(owner));
29
28
  if (positionAccounts.length === 0 ||
30
29
  positionAccounts.every((perp) => perp.sizeUsd.isLessThanOrEqualTo(0)))
31
30
  return [];
32
- const custodiesAccounts = yield cache.getItem(constants_2.custodiesKey, {
33
- prefix: constants_2.platformId,
31
+ const custodiesAccounts = yield cache.getItem(constants_1.custodiesKey, {
32
+ prefix: constants_1.platformId,
34
33
  networkId: portfolio_core_1.NetworkId.solana,
35
34
  });
36
35
  if (!custodiesAccounts)
37
36
  return [];
38
- const perpPoolsArr = yield cache.getItem(constants_2.perpPoolsKey, {
39
- prefix: constants_2.platformId,
37
+ const perpPoolsArr = yield cache.getItem(constants_1.perpPoolsKey, {
38
+ prefix: constants_1.platformId,
40
39
  networkId: portfolio_core_1.NetworkId.solana,
41
40
  });
42
41
  if (!perpPoolsArr)
@@ -52,9 +51,6 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
52
51
  custodyById.set(a.pubkey, a);
53
52
  });
54
53
  const pythPricesByAccount = yield (0, helpers_1.getPythPricesAsMap)(client, oraclesPubkeys);
55
- const tokensDetailsById = new Map();
56
- const tokensDetails = yield cache.getItems(custodiesAccounts.map((acc) => acc.mint), { prefix: constants_1.tokenListsDetailsPrefix, networkId: portfolio_core_1.NetworkId.solana });
57
- tokensDetails.forEach((tD) => tD ? tokensDetailsById.set(tD.address, tD) : undefined);
58
54
  const levPositions = [];
59
55
  for (const position of positionAccounts) {
60
56
  const { collateralUsd, sizeUsd, price, side, cumulativeInterestSnapshot } = position;
@@ -120,13 +116,13 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
120
116
  },
121
117
  label: 'Leverage',
122
118
  networkId: portfolio_core_1.NetworkId.solana,
123
- platformId: constants_2.platformId,
119
+ platformId: constants_1.platformId,
124
120
  value,
125
121
  },
126
122
  ];
127
123
  });
128
124
  const fetcher = {
129
- id: `${constants_2.platformId}-perpetual`,
125
+ id: `${constants_1.platformId}-perpetual`,
130
126
  networkId: portfolio_core_1.NetworkId.solana,
131
127
  executor,
132
128
  };
@@ -1 +1 @@
1
- {"version":3,"file":"perpetualFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/perpetualFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAQoC;AACpC,gEAAqC;AACrC,6CAA4C;AAG5C,oDAAyD;AACzD,kDAAgF;AAChF,wCAAuD;A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CAAC,QAAQ,EAAE;YAC/B,QAAQ,EAAE,WAAW,CAAC,QAAQ,EAAE;YAChC,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE;SACxB,CAAC,CAAC;IACL,CAAC;IAED,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACzC,MAAM,KAAK,GAAG,IAAA,+BAAc,EAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;IAC/D,OAAO;QACL;YACE,IAAI,EAAE,qCAAoB,CAAC,QAAQ;YACnC,IAAI,EAAE;gBACJ,SAAS,EAAE,YAAY;gBACvB,KAAK;aACN;YACD,KAAK,EAAE,UAAU;YACjB,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,KAAK;SACN;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,YAAY;IAC7B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"perpetualFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/perpetualFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,gEAAqC;AACrC,6CAA4C;AAG5C,oDAAyD;AACzD,kDAAgF;AAChF,wCAAuD;AAEvD,gEAAwE;AACxE,2CAKqB;AACrB,uCAAiD;AAEjD,MAAM,SAAS,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,CAAC,CAAA,CAAC,CAAC;AACzC,MAAM,QAAQ,GAAoB,CAChC,KAAa,EACb,KAAY,EACyB,EAAE;IACvC,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,gBAAgB,GAAG,MAAM,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