@berachain/config 0.1.14 → 0.1.15-beta.2

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.
Files changed (101) hide show
  1. package/dist/bepolia.cjs +8 -1
  2. package/dist/bepolia.d.cts +2 -1
  3. package/dist/bepolia.d.ts +2 -1
  4. package/dist/bepolia.mjs +8 -1
  5. package/dist/chunk-2JZ7QJEW.cjs +84 -0
  6. package/dist/chunk-2XYRGOX3.mjs +64 -0
  7. package/dist/chunk-3K6IUX3G.mjs +25 -0
  8. package/dist/chunk-5CDP36UE.cjs +170 -0
  9. package/dist/chunk-5NCT3VFG.cjs +159 -0
  10. package/dist/chunk-6TL5ZQOM.cjs +75 -0
  11. package/dist/chunk-6WGFZPEJ.cjs +138 -0
  12. package/dist/chunk-75ZPJI57.cjs +9 -0
  13. package/dist/chunk-7P6ASYW6.mjs +9 -0
  14. package/dist/chunk-ADH7F47T.cjs +26 -0
  15. package/dist/chunk-AP2XG6GJ.mjs +84 -0
  16. package/dist/chunk-BM46XQJA.mjs +55 -0
  17. package/dist/chunk-CAOMAWN5.mjs +26 -0
  18. package/dist/chunk-CP24SAWQ.mjs +159 -0
  19. package/dist/chunk-EYYJ2UZT.cjs +10 -0
  20. package/dist/chunk-KJXYSGNH.mjs +10 -0
  21. package/dist/chunk-KKJ2Z3OM.mjs +138 -0
  22. package/dist/chunk-LALEUPWL.mjs +8 -0
  23. package/dist/chunk-NQ3UKQHW.mjs +75 -0
  24. package/dist/chunk-NX4FI7G3.cjs +64 -0
  25. package/dist/chunk-ONKAV4AG.cjs +25 -0
  26. package/dist/chunk-R7ARMQ76.mjs +170 -0
  27. package/dist/chunk-WRTYGXJM.cjs +55 -0
  28. package/dist/chunk-YT7WZDGI.cjs +8 -0
  29. package/dist/index.cjs +11 -1
  30. package/dist/index.d.cts +2 -2
  31. package/dist/index.d.ts +2 -2
  32. package/dist/index.mjs +11 -1
  33. package/dist/internal/edge-config/index.cjs +37 -1
  34. package/dist/internal/edge-config/index.d.cts +1 -1
  35. package/dist/internal/edge-config/index.d.ts +1 -1
  36. package/dist/internal/edge-config/index.mjs +37 -1
  37. package/dist/internal/flags/index.cjs +199 -1
  38. package/dist/internal/flags/index.mjs +199 -1
  39. package/dist/internal/header-sources.cjs +283 -11
  40. package/dist/internal/header-sources.mjs +283 -11
  41. package/dist/internal/index.cjs +40 -1
  42. package/dist/internal/index.d.cts +6 -2
  43. package/dist/internal/index.d.ts +6 -2
  44. package/dist/internal/index.mjs +40 -1
  45. package/dist/internal/maintenance.cjs +26 -1
  46. package/dist/internal/maintenance.mjs +26 -1
  47. package/dist/internal/nextjs/index.cjs +85 -1
  48. package/dist/internal/nextjs/index.d.cts +1 -1
  49. package/dist/internal/nextjs/index.d.ts +1 -1
  50. package/dist/internal/nextjs/index.mjs +85 -1
  51. package/dist/internal/nextjs/utils/index.cjs +39 -1
  52. package/dist/internal/nextjs/utils/index.mjs +39 -1
  53. package/dist/internal/sentry/index.cjs +11 -1
  54. package/dist/internal/sentry/index.mjs +11 -1
  55. package/dist/internal/sentry/sentry.client.config.cjs +59 -1
  56. package/dist/internal/sentry/sentry.client.config.mjs +59 -1
  57. package/dist/internal/tailwind/index.cjs +239 -1
  58. package/dist/internal/tailwind/index.mjs +239 -1
  59. package/dist/internal/tsup/index.cjs +73 -1
  60. package/dist/internal/tsup/index.mjs +73 -1
  61. package/dist/internal/wagmi/index.cjs +60 -1
  62. package/dist/internal/wagmi/index.mjs +60 -1
  63. package/dist/mainnet.cjs +10 -1
  64. package/dist/mainnet.d.cts +2 -1
  65. package/dist/mainnet.d.ts +2 -1
  66. package/dist/mainnet.mjs +10 -1
  67. package/dist/sentry.edge.config-F4334LEP.cjs +24 -0
  68. package/dist/sentry.edge.config-JU55FF2U.mjs +24 -0
  69. package/dist/sentry.server.config-KFRT37Q3.cjs +24 -0
  70. package/dist/sentry.server.config-M77KFJ6J.mjs +24 -0
  71. package/dist/{types-ClIxAUdh.d.cts → types-CiVVc4zX.d.cts} +1 -0
  72. package/dist/{types-ClIxAUdh.d.ts → types-CiVVc4zX.d.ts} +1 -0
  73. package/package.json +2 -2
  74. package/dist/chunk-276AZYTL.cjs +0 -1
  75. package/dist/chunk-2CDUNDHZ.cjs +0 -1
  76. package/dist/chunk-2OLL4MUY.cjs +0 -1
  77. package/dist/chunk-3KQLFIHT.cjs +0 -2
  78. package/dist/chunk-3L2GIQ45.mjs +0 -1
  79. package/dist/chunk-3MY6PKNR.cjs +0 -1
  80. package/dist/chunk-3WZ7JUD6.cjs +0 -1
  81. package/dist/chunk-4EBBM3AH.mjs +0 -1
  82. package/dist/chunk-4VDLQK6F.cjs +0 -1
  83. package/dist/chunk-6PCXTZ6I.mjs +0 -1
  84. package/dist/chunk-DL645PXT.mjs +0 -1
  85. package/dist/chunk-DUO7UEQD.cjs +0 -1
  86. package/dist/chunk-DVULZ7ID.cjs +0 -1
  87. package/dist/chunk-E44WM6MG.cjs +0 -1
  88. package/dist/chunk-FVNATITS.mjs +0 -1
  89. package/dist/chunk-HVJ4YIQJ.mjs +0 -1
  90. package/dist/chunk-JYSZ2GU3.cjs +0 -1
  91. package/dist/chunk-JZXLCA2E.mjs +0 -1
  92. package/dist/chunk-MS6UGFXI.mjs +0 -1
  93. package/dist/chunk-O243TIHY.mjs +0 -1
  94. package/dist/chunk-S2A3Z34I.mjs +0 -2
  95. package/dist/chunk-SU5YRBAA.mjs +0 -1
  96. package/dist/chunk-XO2H4NRK.mjs +0 -1
  97. package/dist/chunk-YQK5O5ZL.cjs +0 -1
  98. package/dist/sentry.edge.config-DS2KE3CX.cjs +0 -1
  99. package/dist/sentry.edge.config-OEQTPQ2L.mjs +0 -1
  100. package/dist/sentry.server.config-KRS7OUMO.mjs +0 -1
  101. package/dist/sentry.server.config-RNY6FTJT.cjs +0 -1
@@ -1,5 +1,5 @@
1
- import { C as ChainId, a as AppName, A as Address } from '../types-ClIxAUdh.cjs';
2
- export { B as BeraConfig, H as HttpLink, P as ProjectName } from '../types-ClIxAUdh.cjs';
1
+ import { C as ChainId, a as AppName, A as Address } from '../types-CiVVc4zX.cjs';
2
+ export { B as BeraConfig, H as HttpLink, P as ProjectName } from '../types-CiVVc4zX.cjs';
3
3
 
4
4
  declare const defaultChainId: ChainId;
5
5
 
@@ -62,6 +62,7 @@ declare const chainConfigs: {
62
62
  } | undefined;
63
63
  };
64
64
  readonly bribeBoostApi: string;
65
+ readonly supplyMonitorApi: string;
65
66
  readonly bgtIncentiveDistributor: "0x77DA09bC82652f9A14d1b170a001e759640298e6";
66
67
  readonly lstStakerVaultFactory: "0xc41bbD6695AB6bdc6D04701b15f4CE5EbA2e2500";
67
68
  };
@@ -213,6 +214,7 @@ declare const chainConfigs: {
213
214
  } | undefined;
214
215
  };
215
216
  readonly bribeBoostApi: string;
217
+ readonly supplyMonitorApi: string;
216
218
  readonly bgtIncentiveDistributor: "0xb0d005Fe83E3F1ec876C1a64700c5F0d6265d9E3";
217
219
  readonly lstStakerVaultFactory: "0xAf10B532cCC25B26a8e28913D5C4056a77e7a178";
218
220
  };
@@ -471,6 +473,7 @@ declare const config: {
471
473
  } | undefined;
472
474
  };
473
475
  readonly bribeBoostApi: string;
476
+ readonly supplyMonitorApi: string;
474
477
  readonly bgtIncentiveDistributor: "0x77DA09bC82652f9A14d1b170a001e759640298e6";
475
478
  readonly lstStakerVaultFactory: "0xc41bbD6695AB6bdc6D04701b15f4CE5EbA2e2500";
476
479
  };
@@ -621,6 +624,7 @@ declare const config: {
621
624
  } | undefined;
622
625
  };
623
626
  readonly bribeBoostApi: string;
627
+ readonly supplyMonitorApi: string;
624
628
  readonly bgtIncentiveDistributor: "0xb0d005Fe83E3F1ec876C1a64700c5F0d6265d9E3";
625
629
  readonly lstStakerVaultFactory: "0xAf10B532cCC25B26a8e28913D5C4056a77e7a178";
626
630
  };
@@ -1,5 +1,5 @@
1
- import { C as ChainId, a as AppName, A as Address } from '../types-ClIxAUdh.js';
2
- export { B as BeraConfig, H as HttpLink, P as ProjectName } from '../types-ClIxAUdh.js';
1
+ import { C as ChainId, a as AppName, A as Address } from '../types-CiVVc4zX.js';
2
+ export { B as BeraConfig, H as HttpLink, P as ProjectName } from '../types-CiVVc4zX.js';
3
3
 
4
4
  declare const defaultChainId: ChainId;
5
5
 
@@ -62,6 +62,7 @@ declare const chainConfigs: {
62
62
  } | undefined;
63
63
  };
64
64
  readonly bribeBoostApi: string;
65
+ readonly supplyMonitorApi: string;
65
66
  readonly bgtIncentiveDistributor: "0x77DA09bC82652f9A14d1b170a001e759640298e6";
66
67
  readonly lstStakerVaultFactory: "0xc41bbD6695AB6bdc6D04701b15f4CE5EbA2e2500";
67
68
  };
@@ -213,6 +214,7 @@ declare const chainConfigs: {
213
214
  } | undefined;
214
215
  };
215
216
  readonly bribeBoostApi: string;
217
+ readonly supplyMonitorApi: string;
216
218
  readonly bgtIncentiveDistributor: "0xb0d005Fe83E3F1ec876C1a64700c5F0d6265d9E3";
217
219
  readonly lstStakerVaultFactory: "0xAf10B532cCC25B26a8e28913D5C4056a77e7a178";
218
220
  };
@@ -471,6 +473,7 @@ declare const config: {
471
473
  } | undefined;
472
474
  };
473
475
  readonly bribeBoostApi: string;
476
+ readonly supplyMonitorApi: string;
474
477
  readonly bgtIncentiveDistributor: "0x77DA09bC82652f9A14d1b170a001e759640298e6";
475
478
  readonly lstStakerVaultFactory: "0xc41bbD6695AB6bdc6D04701b15f4CE5EbA2e2500";
476
479
  };
@@ -621,6 +624,7 @@ declare const config: {
621
624
  } | undefined;
622
625
  };
623
626
  readonly bribeBoostApi: string;
627
+ readonly supplyMonitorApi: string;
624
628
  readonly bgtIncentiveDistributor: "0xb0d005Fe83E3F1ec876C1a64700c5F0d6265d9E3";
625
629
  readonly lstStakerVaultFactory: "0xAf10B532cCC25B26a8e28913D5C4056a77e7a178";
626
630
  };
@@ -1 +1,40 @@
1
- import{a as k,b as l,c as m}from"../chunk-HVJ4YIQJ.mjs";import"../chunk-6PCXTZ6I.mjs";import"../chunk-3L2GIQ45.mjs";import{a as d,b as e,c as f,d as g,e as h,f as i,g as j}from"../chunk-4EBBM3AH.mjs";import{a as b,f as c}from"../chunk-S2A3Z34I.mjs";import{a}from"../chunk-MS6UGFXI.mjs";import"../chunk-JZXLCA2E.mjs";export{a as ChainId,i as alchemyJsonRpcUrl,l as appConfig,k as chainConfigs,b as chainId,m as config,c as currentDapp,b as defaultChainId,f as getRpcUrls,e as goldskyBaseUrl,d as imageBaseUrl,h as jsonRpcUrl,j as privateRcpUrl,g as publicJsonRpcUrl};
1
+ import {
2
+ appConfig,
3
+ chainConfigs,
4
+ config
5
+ } from "../chunk-KKJ2Z3OM.mjs";
6
+ import "../chunk-R7ARMQ76.mjs";
7
+ import "../chunk-CP24SAWQ.mjs";
8
+ import {
9
+ alchemyJsonRpcUrl,
10
+ getRpcUrls,
11
+ goldskyBaseUrl,
12
+ imageBaseUrl,
13
+ jsonRpcUrl,
14
+ privateRcpUrl,
15
+ publicJsonRpcUrl
16
+ } from "../chunk-BM46XQJA.mjs";
17
+ import {
18
+ currentDapp,
19
+ defaultChainId
20
+ } from "../chunk-CAOMAWN5.mjs";
21
+ import {
22
+ ChainId
23
+ } from "../chunk-KJXYSGNH.mjs";
24
+ import "../chunk-7P6ASYW6.mjs";
25
+ export {
26
+ ChainId,
27
+ alchemyJsonRpcUrl,
28
+ appConfig,
29
+ chainConfigs,
30
+ defaultChainId as chainId,
31
+ config,
32
+ currentDapp,
33
+ defaultChainId,
34
+ getRpcUrls,
35
+ goldskyBaseUrl,
36
+ imageBaseUrl,
37
+ jsonRpcUrl,
38
+ privateRcpUrl,
39
+ publicJsonRpcUrl
40
+ };
@@ -1 +1,26 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-4VDLQK6F.cjs');var _server = require('next/server');var o=["/maintenance","/_next","/api"];function p(e,n){let{isMaintenance:t,exemptPaths:a=o,maintenancePath:i="/maintenance"}=n;return t&&!a.some(s=>e.nextUrl.pathname.startsWith(s))?_server.NextResponse.redirect(new URL(i,e.url),{status:307}):null}exports.DEFAULT_MAINTENANCE_EXEMPT_PATHS = o; exports.checkMaintenanceMode = p;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-75ZPJI57.cjs');
2
+
3
+ // src/internal/maintenance.ts
4
+ var _server = require('next/server');
5
+ var DEFAULT_MAINTENANCE_EXEMPT_PATHS = [
6
+ "/maintenance",
7
+ "/_next",
8
+ "/api"
9
+ ];
10
+ function checkMaintenanceMode(req, config) {
11
+ const {
12
+ isMaintenance,
13
+ exemptPaths = DEFAULT_MAINTENANCE_EXEMPT_PATHS,
14
+ maintenancePath = "/maintenance"
15
+ } = config;
16
+ if (isMaintenance && !exemptPaths.some((path) => req.nextUrl.pathname.startsWith(path))) {
17
+ return _server.NextResponse.redirect(new URL(maintenancePath, req.url), {
18
+ status: 307
19
+ });
20
+ }
21
+ return null;
22
+ }
23
+
24
+
25
+
26
+ exports.DEFAULT_MAINTENANCE_EXEMPT_PATHS = DEFAULT_MAINTENANCE_EXEMPT_PATHS; exports.checkMaintenanceMode = checkMaintenanceMode;
@@ -1 +1,26 @@
1
- import"../chunk-JZXLCA2E.mjs";import{NextResponse as c}from"next/server";var o=["/maintenance","/_next","/api"];function p(e,n){let{isMaintenance:t,exemptPaths:a=o,maintenancePath:i="/maintenance"}=n;return t&&!a.some(s=>e.nextUrl.pathname.startsWith(s))?c.redirect(new URL(i,e.url),{status:307}):null}export{o as DEFAULT_MAINTENANCE_EXEMPT_PATHS,p as checkMaintenanceMode};
1
+ import "../chunk-7P6ASYW6.mjs";
2
+
3
+ // src/internal/maintenance.ts
4
+ import { NextResponse } from "next/server";
5
+ var DEFAULT_MAINTENANCE_EXEMPT_PATHS = [
6
+ "/maintenance",
7
+ "/_next",
8
+ "/api"
9
+ ];
10
+ function checkMaintenanceMode(req, config) {
11
+ const {
12
+ isMaintenance,
13
+ exemptPaths = DEFAULT_MAINTENANCE_EXEMPT_PATHS,
14
+ maintenancePath = "/maintenance"
15
+ } = config;
16
+ if (isMaintenance && !exemptPaths.some((path) => req.nextUrl.pathname.startsWith(path))) {
17
+ return NextResponse.redirect(new URL(maintenancePath, req.url), {
18
+ status: 307
19
+ });
20
+ }
21
+ return null;
22
+ }
23
+ export {
24
+ DEFAULT_MAINTENANCE_EXEMPT_PATHS,
25
+ checkMaintenanceMode
26
+ };
@@ -1 +1,85 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunk3WZ7JUD6cjs = require('../../chunk-3WZ7JUD6.cjs');var _chunkYQK5O5ZLcjs = require('../../chunk-YQK5O5ZL.cjs');var _chunk3MY6PKNRcjs = require('../../chunk-3MY6PKNR.cjs');require('../../chunk-2CDUNDHZ.cjs');require('../../chunk-E44WM6MG.cjs');require('../../chunk-276AZYTL.cjs');require('../../chunk-3KQLFIHT.cjs');require('../../chunk-2OLL4MUY.cjs');require('../../chunk-4VDLQK6F.cjs');var _dotenv = require('dotenv'); var _dotenv2 = _interopRequireDefault(_dotenv);_dotenv2.default.config({path:["../../.env.local","../../.env"]});function c(r,{withSentry:a=!0,withPostHogReverseProxy:o=!0,appName:s}){let t={reactStrictMode:!0,trailingSlash:!0,pageExtensions:["ts","tsx"],env:{NEXT_PUBLIC_IS_NEXTJS:"true",NEXT_PUBLIC_BERA_APP_NAME:s},turbopack:{rules:{"*.svg":{as:"*.js",loaders:["@svgr/webpack"]}}},experimental:{webpackBuildWorker:!0},typescript:{ignoreBuildErrors:!0},...r,images:{...r.images,remotePatterns:[..._chunkYQK5O5ZLcjs.a]},async rewrites(){return o?[{source:"/ph/static/:path*",destination:`https://${_chunk3MY6PKNRcjs.b.urls.postHog.region}-assets.i.posthog.com/static/:path*`},{source:"/ph/:path*",destination:`https://${_chunk3MY6PKNRcjs.b.urls.postHog.region}.i.posthog.com/:path*`}]:[]}};return o&&(t.env.NEXT_PUBLIC_PH_REVERSE_PROXY_PATH="/ph",t.skipTrailingSlashRedirect=!0),a?_chunk3WZ7JUD6cjs.b.call(void 0, t):t}exports.withBeraConfig = c;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
+
3
+ var _chunk6TL5ZQOMcjs = require('../../chunk-6TL5ZQOM.cjs');
4
+
5
+
6
+ var _chunk2JZ7QJEWcjs = require('../../chunk-2JZ7QJEW.cjs');
7
+
8
+
9
+ var _chunk6WGFZPEJcjs = require('../../chunk-6WGFZPEJ.cjs');
10
+ require('../../chunk-5CDP36UE.cjs');
11
+ require('../../chunk-5NCT3VFG.cjs');
12
+ require('../../chunk-WRTYGXJM.cjs');
13
+ require('../../chunk-ADH7F47T.cjs');
14
+ require('../../chunk-EYYJ2UZT.cjs');
15
+ require('../../chunk-75ZPJI57.cjs');
16
+
17
+ // src/internal/nextjs/index.ts
18
+ var _dotenv = require('dotenv'); var _dotenv2 = _interopRequireDefault(_dotenv);
19
+ _dotenv2.default.config({ path: ["../../.env.local", "../../.env"] });
20
+ function withBeraConfig(config, {
21
+ withSentry = true,
22
+ withPostHogReverseProxy = true,
23
+ appName
24
+ }) {
25
+ const nextConfig = {
26
+ reactStrictMode: true,
27
+ trailingSlash: true,
28
+ pageExtensions: ["ts", "tsx"],
29
+ env: {
30
+ // this is used to check if component is running in nextjs inside the package folder
31
+ NEXT_PUBLIC_IS_NEXTJS: "true",
32
+ NEXT_PUBLIC_BERA_APP_NAME: appName
33
+ },
34
+ turbopack: {
35
+ rules: {
36
+ "*.svg": {
37
+ as: "*.js",
38
+ loaders: ["@svgr/webpack"]
39
+ }
40
+ }
41
+ },
42
+ experimental: {
43
+ webpackBuildWorker: true
44
+ // optimizePackageImports: [
45
+ // "@berachain/ui",
46
+ // "@berachain/shared-ui",
47
+ // "@berachain/berajs",
48
+ // "@berachain/wagmi",
49
+ // "@berachain/config",
50
+ // "@berachain/graphql",
51
+ // ],
52
+ },
53
+ /** We already do linting and typechecking as separate tasks in CI */
54
+ typescript: { ignoreBuildErrors: true },
55
+ ...config,
56
+ images: {
57
+ ...config.images,
58
+ remotePatterns: [..._chunk2JZ7QJEWcjs.IMAGE_REMOTE_PATTERNS]
59
+ },
60
+ async rewrites() {
61
+ if (!withPostHogReverseProxy) {
62
+ return [];
63
+ }
64
+ return [
65
+ {
66
+ source: "/ph/static/:path*",
67
+ destination: `https://${_chunk6WGFZPEJcjs.appConfig.urls.postHog.region}-assets.i.posthog.com/static/:path*`
68
+ },
69
+ {
70
+ source: "/ph/:path*",
71
+ destination: `https://${_chunk6WGFZPEJcjs.appConfig.urls.postHog.region}.i.posthog.com/:path*`
72
+ }
73
+ ];
74
+ }
75
+ };
76
+ if (withPostHogReverseProxy) {
77
+ nextConfig.env.NEXT_PUBLIC_PH_REVERSE_PROXY_PATH = "/ph";
78
+ nextConfig.skipTrailingSlashRedirect = true;
79
+ }
80
+ if (withSentry) return _chunk6TL5ZQOMcjs.withSentryConfig.call(void 0, nextConfig);
81
+ return nextConfig;
82
+ }
83
+
84
+
85
+ exports.withBeraConfig = withBeraConfig;
@@ -1,5 +1,5 @@
1
1
  import { NextConfig } from 'next';
2
- import { a as AppName } from '../../types-ClIxAUdh.cjs';
2
+ import { a as AppName } from '../../types-CiVVc4zX.cjs';
3
3
 
4
4
  /**
5
5
  * The images config for Bera.
@@ -1,5 +1,5 @@
1
1
  import { NextConfig } from 'next';
2
- import { a as AppName } from '../../types-ClIxAUdh.js';
2
+ import { a as AppName } from '../../types-CiVVc4zX.js';
3
3
 
4
4
  /**
5
5
  * The images config for Bera.
@@ -1 +1,85 @@
1
- import{b as i}from"../../chunk-XO2H4NRK.mjs";import{a as n}from"../../chunk-SU5YRBAA.mjs";import{b as e}from"../../chunk-HVJ4YIQJ.mjs";import"../../chunk-6PCXTZ6I.mjs";import"../../chunk-3L2GIQ45.mjs";import"../../chunk-4EBBM3AH.mjs";import"../../chunk-S2A3Z34I.mjs";import"../../chunk-MS6UGFXI.mjs";import"../../chunk-JZXLCA2E.mjs";import p from"dotenv";p.config({path:["../../.env.local","../../.env"]});function c(r,{withSentry:a=!0,withPostHogReverseProxy:o=!0,appName:s}){let t={reactStrictMode:!0,trailingSlash:!0,pageExtensions:["ts","tsx"],env:{NEXT_PUBLIC_IS_NEXTJS:"true",NEXT_PUBLIC_BERA_APP_NAME:s},turbopack:{rules:{"*.svg":{as:"*.js",loaders:["@svgr/webpack"]}}},experimental:{webpackBuildWorker:!0},typescript:{ignoreBuildErrors:!0},...r,images:{...r.images,remotePatterns:[...n]},async rewrites(){return o?[{source:"/ph/static/:path*",destination:`https://${e.urls.postHog.region}-assets.i.posthog.com/static/:path*`},{source:"/ph/:path*",destination:`https://${e.urls.postHog.region}.i.posthog.com/:path*`}]:[]}};return o&&(t.env.NEXT_PUBLIC_PH_REVERSE_PROXY_PATH="/ph",t.skipTrailingSlashRedirect=!0),a?i(t):t}export{c as withBeraConfig};
1
+ import {
2
+ withSentryConfig
3
+ } from "../../chunk-NQ3UKQHW.mjs";
4
+ import {
5
+ IMAGE_REMOTE_PATTERNS
6
+ } from "../../chunk-AP2XG6GJ.mjs";
7
+ import {
8
+ appConfig
9
+ } from "../../chunk-KKJ2Z3OM.mjs";
10
+ import "../../chunk-R7ARMQ76.mjs";
11
+ import "../../chunk-CP24SAWQ.mjs";
12
+ import "../../chunk-BM46XQJA.mjs";
13
+ import "../../chunk-CAOMAWN5.mjs";
14
+ import "../../chunk-KJXYSGNH.mjs";
15
+ import "../../chunk-7P6ASYW6.mjs";
16
+
17
+ // src/internal/nextjs/index.ts
18
+ import dotenv from "dotenv";
19
+ dotenv.config({ path: ["../../.env.local", "../../.env"] });
20
+ function withBeraConfig(config, {
21
+ withSentry = true,
22
+ withPostHogReverseProxy = true,
23
+ appName
24
+ }) {
25
+ const nextConfig = {
26
+ reactStrictMode: true,
27
+ trailingSlash: true,
28
+ pageExtensions: ["ts", "tsx"],
29
+ env: {
30
+ // this is used to check if component is running in nextjs inside the package folder
31
+ NEXT_PUBLIC_IS_NEXTJS: "true",
32
+ NEXT_PUBLIC_BERA_APP_NAME: appName
33
+ },
34
+ turbopack: {
35
+ rules: {
36
+ "*.svg": {
37
+ as: "*.js",
38
+ loaders: ["@svgr/webpack"]
39
+ }
40
+ }
41
+ },
42
+ experimental: {
43
+ webpackBuildWorker: true
44
+ // optimizePackageImports: [
45
+ // "@berachain/ui",
46
+ // "@berachain/shared-ui",
47
+ // "@berachain/berajs",
48
+ // "@berachain/wagmi",
49
+ // "@berachain/config",
50
+ // "@berachain/graphql",
51
+ // ],
52
+ },
53
+ /** We already do linting and typechecking as separate tasks in CI */
54
+ typescript: { ignoreBuildErrors: true },
55
+ ...config,
56
+ images: {
57
+ ...config.images,
58
+ remotePatterns: [...IMAGE_REMOTE_PATTERNS]
59
+ },
60
+ async rewrites() {
61
+ if (!withPostHogReverseProxy) {
62
+ return [];
63
+ }
64
+ return [
65
+ {
66
+ source: "/ph/static/:path*",
67
+ destination: `https://${appConfig.urls.postHog.region}-assets.i.posthog.com/static/:path*`
68
+ },
69
+ {
70
+ source: "/ph/:path*",
71
+ destination: `https://${appConfig.urls.postHog.region}.i.posthog.com/:path*`
72
+ }
73
+ ];
74
+ }
75
+ };
76
+ if (withPostHogReverseProxy) {
77
+ nextConfig.env.NEXT_PUBLIC_PH_REVERSE_PROXY_PATH = "/ph";
78
+ nextConfig.skipTrailingSlashRedirect = true;
79
+ }
80
+ if (withSentry) return withSentryConfig(nextConfig);
81
+ return nextConfig;
82
+ }
83
+ export {
84
+ withBeraConfig
85
+ };
@@ -1 +1,39 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkYQK5O5ZLcjs = require('../../../chunk-YQK5O5ZL.cjs');require('../../../chunk-4VDLQK6F.cjs');function a(t){let e=t.replace(/([.+?^=!:${}()|[\]/\\])/g,"\\$1");return e=e.replace(/\*\*/g,"___DOUBLE_STAR___"),e=e.replace(/\*/g,"[^/]+"),e=e.replace(/___DOUBLE_STAR___/g,".*"),e.startsWith("^")||(e=`^${e}`),e.endsWith("$")||(e=`${e}$`),new RegExp(e)}var o=t=>t.replace(/^https?:\/\//,"");function i(t){try{if(!t)return!1;let e=new URL(t);for(let n of _chunkYQK5O5ZLcjs.a){if(n.protocol&&e.protocol.replace(":","")!==n.protocol||o(e.hostname)!==o(n.hostname))continue;if(!n.pathname||a(n.pathname).test(e.pathname))return!0}return!1}catch (e2){return!1}}exports.isAllowedImageUrl = i;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunk2JZ7QJEWcjs = require('../../../chunk-2JZ7QJEW.cjs');
4
+ require('../../../chunk-75ZPJI57.cjs');
5
+
6
+ // src/internal/nextjs/utils/index.ts
7
+ function globToRegExp(glob) {
8
+ let re = glob.replace(/([.+?^=!:${}()|[\]/\\])/g, "\\$1");
9
+ re = re.replace(/\*\*/g, "___DOUBLE_STAR___");
10
+ re = re.replace(/\*/g, "[^/]+");
11
+ re = re.replace(/___DOUBLE_STAR___/g, ".*");
12
+ if (!re.startsWith("^")) re = `^${re}`;
13
+ if (!re.endsWith("$")) re = `${re}$`;
14
+ return new RegExp(re);
15
+ }
16
+ var normalizeHostname = (hostname) => hostname.replace(/^https?:\/\//, "");
17
+ function isAllowedImageUrl(urlString) {
18
+ try {
19
+ if (!urlString) return false;
20
+ const url = new URL(urlString);
21
+ for (const pattern of _chunk2JZ7QJEWcjs.IMAGE_REMOTE_PATTERNS) {
22
+ if (pattern.protocol && url.protocol.replace(":", "") !== pattern.protocol)
23
+ continue;
24
+ if (normalizeHostname(url.hostname) !== normalizeHostname(pattern.hostname))
25
+ continue;
26
+ if (!pattern.pathname) return true;
27
+ const pathnameRegex = globToRegExp(pattern.pathname);
28
+ if (pathnameRegex.test(url.pathname)) {
29
+ return true;
30
+ }
31
+ }
32
+ return false;
33
+ } catch (e) {
34
+ return false;
35
+ }
36
+ }
37
+
38
+
39
+ exports.isAllowedImageUrl = isAllowedImageUrl;
@@ -1 +1,39 @@
1
- import{a as r}from"../../../chunk-SU5YRBAA.mjs";import"../../../chunk-JZXLCA2E.mjs";function a(t){let e=t.replace(/([.+?^=!:${}()|[\]/\\])/g,"\\$1");return e=e.replace(/\*\*/g,"___DOUBLE_STAR___"),e=e.replace(/\*/g,"[^/]+"),e=e.replace(/___DOUBLE_STAR___/g,".*"),e.startsWith("^")||(e=`^${e}`),e.endsWith("$")||(e=`${e}$`),new RegExp(e)}var o=t=>t.replace(/^https?:\/\//,"");function i(t){try{if(!t)return!1;let e=new URL(t);for(let n of r){if(n.protocol&&e.protocol.replace(":","")!==n.protocol||o(e.hostname)!==o(n.hostname))continue;if(!n.pathname||a(n.pathname).test(e.pathname))return!0}return!1}catch{return!1}}export{i as isAllowedImageUrl};
1
+ import {
2
+ IMAGE_REMOTE_PATTERNS
3
+ } from "../../../chunk-AP2XG6GJ.mjs";
4
+ import "../../../chunk-7P6ASYW6.mjs";
5
+
6
+ // src/internal/nextjs/utils/index.ts
7
+ function globToRegExp(glob) {
8
+ let re = glob.replace(/([.+?^=!:${}()|[\]/\\])/g, "\\$1");
9
+ re = re.replace(/\*\*/g, "___DOUBLE_STAR___");
10
+ re = re.replace(/\*/g, "[^/]+");
11
+ re = re.replace(/___DOUBLE_STAR___/g, ".*");
12
+ if (!re.startsWith("^")) re = `^${re}`;
13
+ if (!re.endsWith("$")) re = `${re}$`;
14
+ return new RegExp(re);
15
+ }
16
+ var normalizeHostname = (hostname) => hostname.replace(/^https?:\/\//, "");
17
+ function isAllowedImageUrl(urlString) {
18
+ try {
19
+ if (!urlString) return false;
20
+ const url = new URL(urlString);
21
+ for (const pattern of IMAGE_REMOTE_PATTERNS) {
22
+ if (pattern.protocol && url.protocol.replace(":", "") !== pattern.protocol)
23
+ continue;
24
+ if (normalizeHostname(url.hostname) !== normalizeHostname(pattern.hostname))
25
+ continue;
26
+ if (!pattern.pathname) return true;
27
+ const pathnameRegex = globToRegExp(pattern.pathname);
28
+ if (pathnameRegex.test(url.pathname)) {
29
+ return true;
30
+ }
31
+ }
32
+ return false;
33
+ } catch {
34
+ return false;
35
+ }
36
+ }
37
+ export {
38
+ isAllowedImageUrl
39
+ };
@@ -1 +1,11 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk3WZ7JUD6cjs = require('../../chunk-3WZ7JUD6.cjs');require('../../chunk-4VDLQK6F.cjs');exports.onRequestError = _chunk3WZ7JUD6cjs.c; exports.registerSentry = _chunk3WZ7JUD6cjs.a; exports.withSentryConfig = _chunk3WZ7JUD6cjs.b;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+ var _chunk6TL5ZQOMcjs = require('../../chunk-6TL5ZQOM.cjs');
6
+ require('../../chunk-75ZPJI57.cjs');
7
+
8
+
9
+
10
+
11
+ exports.onRequestError = _chunk6TL5ZQOMcjs.onRequestError; exports.registerSentry = _chunk6TL5ZQOMcjs.registerSentry; exports.withSentryConfig = _chunk6TL5ZQOMcjs.withSentryConfig;
@@ -1 +1,11 @@
1
- import{a,b,c}from"../../chunk-XO2H4NRK.mjs";import"../../chunk-JZXLCA2E.mjs";export{c as onRequestError,a as registerSentry,b as withSentryConfig};
1
+ import {
2
+ onRequestError,
3
+ registerSentry,
4
+ withSentryConfig
5
+ } from "../../chunk-NQ3UKQHW.mjs";
6
+ import "../../chunk-7P6ASYW6.mjs";
7
+ export {
8
+ onRequestError,
9
+ registerSentry,
10
+ withSentryConfig
11
+ };
@@ -1 +1,59 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _chunkJYSZ2GU3cjs = require('../../chunk-JYSZ2GU3.cjs');require('../../chunk-276AZYTL.cjs');require('../../chunk-3KQLFIHT.cjs');require('../../chunk-2OLL4MUY.cjs');require('../../chunk-4VDLQK6F.cjs');_chunkJYSZ2GU3cjs.d&&console.log("[@berachain/config] sentryDebug init",process.env.NEXT_PUBLIC_SENTRY_DSN);function s(r,n={}){return r.init({dsn:process.env.NEXT_PUBLIC_SENTRY_DSN,tunnel:"/monitoring-tunnel",tracesSampleRate:_chunkJYSZ2GU3cjs.b,debug:_chunkJYSZ2GU3cjs.d,environment:_chunkJYSZ2GU3cjs.a,...n,ignoreErrors:[..._nullishCoalesce(n.ignoreErrors, () => ([])),/Cannot (set|assign to read only) property .+ of (object )?'?#<Window>/,/'set' on proxy: trap returned falsish for property/,/Invalid property descriptor\. Cannot both specify accessors and a value or writable attribute/,/chrome\.runtime\.sendMessage\(\) called from a webpage/,"Could not establish connection. Receiving end does not exist.","Attempting to use a disconnected port object",/The source .+ has not been authorized yet/,/No matching key\. session topic doesn't exist/,/Failed to connect to MetaMask/,"not found rainbowkit","Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing.","The provider is disconnected from all chains.","Cannot destructure property 'register' of 'undefined' as it is undefined."]})}exports.initSentryClient = s;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
+
3
+
4
+
5
+ var _chunkONKAV4AGcjs = require('../../chunk-ONKAV4AG.cjs');
6
+ require('../../chunk-WRTYGXJM.cjs');
7
+ require('../../chunk-ADH7F47T.cjs');
8
+ require('../../chunk-EYYJ2UZT.cjs');
9
+ require('../../chunk-75ZPJI57.cjs');
10
+
11
+ // src/internal/sentry/sentry.client.config.ts
12
+ if (_chunkONKAV4AGcjs.sentryDebug) {
13
+ console.log(
14
+ "[@berachain/config] sentryDebug init",
15
+ process.env.NEXT_PUBLIC_SENTRY_DSN
16
+ );
17
+ }
18
+ function initSentryClient(Sentry, opt = {}) {
19
+ return Sentry.init({
20
+ dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
21
+ tunnel: "/monitoring-tunnel",
22
+ // Adjust this value in production, or use tracesSampler for greater control
23
+ tracesSampleRate: _chunkONKAV4AGcjs.tracesSampleRate,
24
+ // Setting this option to true will print useful information to the console while you're setting up Sentry.
25
+ debug: _chunkONKAV4AGcjs.sentryDebug,
26
+ environment: _chunkONKAV4AGcjs.sentryEnvironment,
27
+ ...opt,
28
+ // You can remove this option if you're not planning to use the Sentry Session Replay feature:
29
+ // integrations: [],
30
+ ignoreErrors: [
31
+ ..._nullishCoalesce(opt.ignoreErrors, () => ( [])),
32
+ // Browser extension - window global injection conflicts (ethereum, tron, solana, etc.)
33
+ /Cannot (set|assign to read only) property .+ of (object )?'?#<Window>/,
34
+ // Browser extension - proxy trap conflicts (e.g. TronLink tronlinkParams)
35
+ /'set' on proxy: trap returned falsish for property/,
36
+ // Browser extension - property descriptor redefinition
37
+ /Invalid property descriptor\. Cannot both specify accessors and a value or writable attribute/,
38
+ // Chrome extension messaging called from page context
39
+ /chrome\.runtime\.sendMessage\(\) called from a webpage/,
40
+ // Chrome extension port errors
41
+ "Could not establish connection. Receiving end does not exist.",
42
+ "Attempting to use a disconnected port object",
43
+ // WalletConnect authorization / session errors
44
+ /The source .+ has not been authorized yet/,
45
+ /No matching key\. session topic doesn't exist/,
46
+ // Wallet connection failures
47
+ /Failed to connect to MetaMask/,
48
+ "not found rainbowkit",
49
+ // WalletConnect
50
+ "Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing.",
51
+ // wagmi
52
+ "The provider is disconnected from all chains.",
53
+ "Cannot destructure property 'register' of 'undefined' as it is undefined."
54
+ ]
55
+ });
56
+ }
57
+
58
+
59
+ exports.initSentryClient = initSentryClient;
@@ -1 +1,59 @@
1
- import{a as t,b as o,d as e}from"../../chunk-DL645PXT.mjs";import"../../chunk-4EBBM3AH.mjs";import"../../chunk-S2A3Z34I.mjs";import"../../chunk-MS6UGFXI.mjs";import"../../chunk-JZXLCA2E.mjs";e&&console.log("[@berachain/config] sentryDebug init",process.env.NEXT_PUBLIC_SENTRY_DSN);function s(r,n={}){return r.init({dsn:process.env.NEXT_PUBLIC_SENTRY_DSN,tunnel:"/monitoring-tunnel",tracesSampleRate:o,debug:e,environment:t,...n,ignoreErrors:[...n.ignoreErrors??[],/Cannot (set|assign to read only) property .+ of (object )?'?#<Window>/,/'set' on proxy: trap returned falsish for property/,/Invalid property descriptor\. Cannot both specify accessors and a value or writable attribute/,/chrome\.runtime\.sendMessage\(\) called from a webpage/,"Could not establish connection. Receiving end does not exist.","Attempting to use a disconnected port object",/The source .+ has not been authorized yet/,/No matching key\. session topic doesn't exist/,/Failed to connect to MetaMask/,"not found rainbowkit","Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing.","The provider is disconnected from all chains.","Cannot destructure property 'register' of 'undefined' as it is undefined."]})}export{s as initSentryClient};
1
+ import {
2
+ sentryDebug,
3
+ sentryEnvironment,
4
+ tracesSampleRate
5
+ } from "../../chunk-3K6IUX3G.mjs";
6
+ import "../../chunk-BM46XQJA.mjs";
7
+ import "../../chunk-CAOMAWN5.mjs";
8
+ import "../../chunk-KJXYSGNH.mjs";
9
+ import "../../chunk-7P6ASYW6.mjs";
10
+
11
+ // src/internal/sentry/sentry.client.config.ts
12
+ if (sentryDebug) {
13
+ console.log(
14
+ "[@berachain/config] sentryDebug init",
15
+ process.env.NEXT_PUBLIC_SENTRY_DSN
16
+ );
17
+ }
18
+ function initSentryClient(Sentry, opt = {}) {
19
+ return Sentry.init({
20
+ dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
21
+ tunnel: "/monitoring-tunnel",
22
+ // Adjust this value in production, or use tracesSampler for greater control
23
+ tracesSampleRate,
24
+ // Setting this option to true will print useful information to the console while you're setting up Sentry.
25
+ debug: sentryDebug,
26
+ environment: sentryEnvironment,
27
+ ...opt,
28
+ // You can remove this option if you're not planning to use the Sentry Session Replay feature:
29
+ // integrations: [],
30
+ ignoreErrors: [
31
+ ...opt.ignoreErrors ?? [],
32
+ // Browser extension - window global injection conflicts (ethereum, tron, solana, etc.)
33
+ /Cannot (set|assign to read only) property .+ of (object )?'?#<Window>/,
34
+ // Browser extension - proxy trap conflicts (e.g. TronLink tronlinkParams)
35
+ /'set' on proxy: trap returned falsish for property/,
36
+ // Browser extension - property descriptor redefinition
37
+ /Invalid property descriptor\. Cannot both specify accessors and a value or writable attribute/,
38
+ // Chrome extension messaging called from page context
39
+ /chrome\.runtime\.sendMessage\(\) called from a webpage/,
40
+ // Chrome extension port errors
41
+ "Could not establish connection. Receiving end does not exist.",
42
+ "Attempting to use a disconnected port object",
43
+ // WalletConnect authorization / session errors
44
+ /The source .+ has not been authorized yet/,
45
+ /No matching key\. session topic doesn't exist/,
46
+ // Wallet connection failures
47
+ /Failed to connect to MetaMask/,
48
+ "not found rainbowkit",
49
+ // WalletConnect
50
+ "Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing.",
51
+ // wagmi
52
+ "The provider is disconnected from all chains.",
53
+ "Cannot destructure property 'register' of 'undefined' as it is undefined."
54
+ ]
55
+ });
56
+ }
57
+ export {
58
+ initSentryClient
59
+ };