@steerprotocol/data-connector-loader 5.0.0-next.8 → 5.0.0-next.9

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.
@@ -8,6 +8,24 @@ export class SubgraphUrlReplacer {
8
8
  if (subgraphUrl) {
9
9
  return subgraphUrl.newUrl;
10
10
  }
11
+ // This retired Arbitrum Uniswap subgraph also appears in credential-bearing
12
+ // gateway URLs. Replace only its exact ID; never carry the embedded key over.
13
+ if (url) {
14
+ try {
15
+ const source = new URL(url);
16
+ if ((source.origin === "https://gateway.thegraph.com" ||
17
+ source.origin ===
18
+ "https://gateway-arbitrum.network.thegraph.com") &&
19
+ !source.username &&
20
+ !source.password &&
21
+ /^\/api\/(?:[^/]+\/)?subgraphs\/id\/Fo8QBLpEGfXHWkGMD3jSM4vVLk4JxvxxQD3v3U4fsrbh$/.test(source.pathname)) {
22
+ return this.getArbitrumSubgraphUrl("FbCGRftH4a3yZugY7TnbYgPJVEv2LvMT6oF1fxPe9aJM", false);
23
+ }
24
+ }
25
+ catch {
26
+ // Leave malformed or relative URLs for the request handler to process.
27
+ }
28
+ }
11
29
  return url;
12
30
  }
13
31
  getArbitrumSubgraphUrl(subgraphId, isDeploymentId) {
@@ -12,6 +12,24 @@ class SubgraphUrlReplacer {
12
12
  if (subgraphUrl) {
13
13
  return subgraphUrl.newUrl;
14
14
  }
15
+ // This retired Arbitrum Uniswap subgraph also appears in credential-bearing
16
+ // gateway URLs. Replace only its exact ID; never carry the embedded key over.
17
+ if (url) {
18
+ try {
19
+ const source = new URL(url);
20
+ if ((source.origin === "https://gateway.thegraph.com" ||
21
+ source.origin ===
22
+ "https://gateway-arbitrum.network.thegraph.com") &&
23
+ !source.username &&
24
+ !source.password &&
25
+ /^\/api\/(?:[^/]+\/)?subgraphs\/id\/Fo8QBLpEGfXHWkGMD3jSM4vVLk4JxvxxQD3v3U4fsrbh$/.test(source.pathname)) {
26
+ return this.getArbitrumSubgraphUrl("FbCGRftH4a3yZugY7TnbYgPJVEv2LvMT6oF1fxPe9aJM", false);
27
+ }
28
+ }
29
+ catch (_a) {
30
+ // Leave malformed or relative URLs for the request handler to process.
31
+ }
32
+ }
15
33
  return url;
16
34
  }
17
35
  getArbitrumSubgraphUrl(subgraphId, isDeploymentId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steerprotocol/data-connector-loader",
3
- "version": "5.0.0-next.8",
3
+ "version": "5.0.0-next.9",
4
4
  "description": "App Loader for Steer Protocol",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",