@berachain/config 0.1.13 → 0.1.15-beta.1

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 (103) hide show
  1. package/dist/bepolia.cjs +8 -1
  2. package/dist/bepolia.d.cts +4 -5
  3. package/dist/bepolia.d.ts +4 -5
  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-3XMRQ4AF.cjs +169 -0
  9. package/dist/chunk-6TL5ZQOM.cjs +75 -0
  10. package/dist/chunk-75ZPJI57.cjs +9 -0
  11. package/dist/chunk-7P6ASYW6.mjs +9 -0
  12. package/dist/chunk-ADH7F47T.cjs +26 -0
  13. package/dist/chunk-AMUU2OH4.cjs +158 -0
  14. package/dist/chunk-AP2XG6GJ.mjs +84 -0
  15. package/dist/chunk-BM46XQJA.mjs +55 -0
  16. package/dist/chunk-CAOMAWN5.mjs +26 -0
  17. package/dist/chunk-EYYJ2UZT.cjs +10 -0
  18. package/dist/chunk-JHPXZOPW.mjs +158 -0
  19. package/dist/chunk-JZA34W4G.cjs +138 -0
  20. package/dist/chunk-KJXYSGNH.mjs +10 -0
  21. package/dist/chunk-KYJQS3T5.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-SWEAJ6OD.mjs +169 -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 +206 -1
  38. package/dist/internal/flags/index.d.cts +3 -1
  39. package/dist/internal/flags/index.d.ts +3 -1
  40. package/dist/internal/flags/index.mjs +206 -1
  41. package/dist/internal/header-sources.cjs +283 -11
  42. package/dist/internal/header-sources.mjs +283 -11
  43. package/dist/internal/index.cjs +40 -1
  44. package/dist/internal/index.d.cts +14 -18
  45. package/dist/internal/index.d.ts +14 -18
  46. package/dist/internal/index.mjs +40 -1
  47. package/dist/internal/maintenance.cjs +26 -1
  48. package/dist/internal/maintenance.mjs +26 -1
  49. package/dist/internal/nextjs/index.cjs +85 -1
  50. package/dist/internal/nextjs/index.d.cts +1 -1
  51. package/dist/internal/nextjs/index.d.ts +1 -1
  52. package/dist/internal/nextjs/index.mjs +85 -1
  53. package/dist/internal/nextjs/utils/index.cjs +39 -1
  54. package/dist/internal/nextjs/utils/index.mjs +39 -1
  55. package/dist/internal/sentry/index.cjs +11 -1
  56. package/dist/internal/sentry/index.mjs +11 -1
  57. package/dist/internal/sentry/sentry.client.config.cjs +59 -1
  58. package/dist/internal/sentry/sentry.client.config.mjs +59 -1
  59. package/dist/internal/tailwind/index.cjs +239 -1
  60. package/dist/internal/tailwind/index.mjs +239 -1
  61. package/dist/internal/tsup/index.cjs +73 -1
  62. package/dist/internal/tsup/index.mjs +73 -1
  63. package/dist/internal/wagmi/index.cjs +60 -1
  64. package/dist/internal/wagmi/index.mjs +60 -1
  65. package/dist/mainnet.cjs +10 -1
  66. package/dist/mainnet.d.cts +4 -5
  67. package/dist/mainnet.d.ts +4 -5
  68. package/dist/mainnet.mjs +10 -1
  69. package/dist/sentry.edge.config-F4334LEP.cjs +24 -0
  70. package/dist/sentry.edge.config-JU55FF2U.mjs +24 -0
  71. package/dist/sentry.server.config-KFRT37Q3.cjs +24 -0
  72. package/dist/sentry.server.config-M77KFJ6J.mjs +24 -0
  73. package/dist/{types-MT3NuQb7.d.cts → types-ClIxAUdh.d.cts} +0 -5
  74. package/dist/{types-MT3NuQb7.d.ts → types-ClIxAUdh.d.ts} +0 -5
  75. package/package.json +2 -2
  76. package/dist/chunk-276AZYTL.cjs +0 -1
  77. package/dist/chunk-2OLL4MUY.cjs +0 -1
  78. package/dist/chunk-3KQLFIHT.cjs +0 -2
  79. package/dist/chunk-3WZ7JUD6.cjs +0 -1
  80. package/dist/chunk-4EBBM3AH.mjs +0 -1
  81. package/dist/chunk-4VDLQK6F.cjs +0 -1
  82. package/dist/chunk-7BJPOGJ3.cjs +0 -1
  83. package/dist/chunk-DL645PXT.mjs +0 -1
  84. package/dist/chunk-DUO7UEQD.cjs +0 -1
  85. package/dist/chunk-DVULZ7ID.cjs +0 -1
  86. package/dist/chunk-FVNATITS.mjs +0 -1
  87. package/dist/chunk-JW76KOHH.mjs +0 -1
  88. package/dist/chunk-JYSZ2GU3.cjs +0 -1
  89. package/dist/chunk-JZXLCA2E.mjs +0 -1
  90. package/dist/chunk-MS6UGFXI.mjs +0 -1
  91. package/dist/chunk-O243TIHY.mjs +0 -1
  92. package/dist/chunk-S2A3Z34I.mjs +0 -2
  93. package/dist/chunk-SU5YRBAA.mjs +0 -1
  94. package/dist/chunk-TQ67UFXV.cjs +0 -1
  95. package/dist/chunk-VWV244JK.mjs +0 -1
  96. package/dist/chunk-XBV7BAIE.cjs +0 -1
  97. package/dist/chunk-XO2H4NRK.mjs +0 -1
  98. package/dist/chunk-YQK5O5ZL.cjs +0 -1
  99. package/dist/chunk-ZA2X4K7Z.mjs +0 -1
  100. package/dist/sentry.edge.config-DS2KE3CX.cjs +0 -1
  101. package/dist/sentry.edge.config-OEQTPQ2L.mjs +0 -1
  102. package/dist/sentry.server.config-KRS7OUMO.mjs +0 -1
  103. 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-MT3NuQb7.cjs';
2
- export { B as BeraConfig, H as HttpLink, P as ProjectName } from '../types-MT3NuQb7.cjs';
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';
3
3
 
4
4
  declare const defaultChainId: ChainId;
5
5
 
@@ -57,10 +57,9 @@ declare const chainConfigs: {
57
57
  readonly subgraph: {
58
58
  readonly name: "pol-subgraph";
59
59
  readonly uri: string;
60
- };
61
- readonly feesSubgraph: {
62
- readonly name: "pol-fees-subgraph";
63
- readonly uri: string;
60
+ readonly headers: {
61
+ Authorization: string;
62
+ } | undefined;
64
63
  };
65
64
  readonly bribeBoostApi: string;
66
65
  readonly bgtIncentiveDistributor: "0x77DA09bC82652f9A14d1b170a001e759640298e6";
@@ -209,10 +208,9 @@ declare const chainConfigs: {
209
208
  readonly subgraph: {
210
209
  readonly name: "pol-subgraph";
211
210
  readonly uri: string;
212
- };
213
- readonly feesSubgraph: {
214
- readonly name: "pol-fees-subgraph";
215
- readonly uri: string;
211
+ readonly headers: {
212
+ Authorization: string;
213
+ } | undefined;
216
214
  };
217
215
  readonly bribeBoostApi: string;
218
216
  readonly bgtIncentiveDistributor: "0xb0d005Fe83E3F1ec876C1a64700c5F0d6265d9E3";
@@ -468,10 +466,9 @@ declare const config: {
468
466
  readonly subgraph: {
469
467
  readonly name: "pol-subgraph";
470
468
  readonly uri: string;
471
- };
472
- readonly feesSubgraph: {
473
- readonly name: "pol-fees-subgraph";
474
- readonly uri: string;
469
+ readonly headers: {
470
+ Authorization: string;
471
+ } | undefined;
475
472
  };
476
473
  readonly bribeBoostApi: string;
477
474
  readonly bgtIncentiveDistributor: "0x77DA09bC82652f9A14d1b170a001e759640298e6";
@@ -619,10 +616,9 @@ declare const config: {
619
616
  readonly subgraph: {
620
617
  readonly name: "pol-subgraph";
621
618
  readonly uri: string;
622
- };
623
- readonly feesSubgraph: {
624
- readonly name: "pol-fees-subgraph";
625
- readonly uri: string;
619
+ readonly headers: {
620
+ Authorization: string;
621
+ } | undefined;
626
622
  };
627
623
  readonly bribeBoostApi: string;
628
624
  readonly bgtIncentiveDistributor: "0xb0d005Fe83E3F1ec876C1a64700c5F0d6265d9E3";
@@ -1,5 +1,5 @@
1
- import { C as ChainId, a as AppName, A as Address } from '../types-MT3NuQb7.js';
2
- export { B as BeraConfig, H as HttpLink, P as ProjectName } from '../types-MT3NuQb7.js';
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';
3
3
 
4
4
  declare const defaultChainId: ChainId;
5
5
 
@@ -57,10 +57,9 @@ declare const chainConfigs: {
57
57
  readonly subgraph: {
58
58
  readonly name: "pol-subgraph";
59
59
  readonly uri: string;
60
- };
61
- readonly feesSubgraph: {
62
- readonly name: "pol-fees-subgraph";
63
- readonly uri: string;
60
+ readonly headers: {
61
+ Authorization: string;
62
+ } | undefined;
64
63
  };
65
64
  readonly bribeBoostApi: string;
66
65
  readonly bgtIncentiveDistributor: "0x77DA09bC82652f9A14d1b170a001e759640298e6";
@@ -209,10 +208,9 @@ declare const chainConfigs: {
209
208
  readonly subgraph: {
210
209
  readonly name: "pol-subgraph";
211
210
  readonly uri: string;
212
- };
213
- readonly feesSubgraph: {
214
- readonly name: "pol-fees-subgraph";
215
- readonly uri: string;
211
+ readonly headers: {
212
+ Authorization: string;
213
+ } | undefined;
216
214
  };
217
215
  readonly bribeBoostApi: string;
218
216
  readonly bgtIncentiveDistributor: "0xb0d005Fe83E3F1ec876C1a64700c5F0d6265d9E3";
@@ -468,10 +466,9 @@ declare const config: {
468
466
  readonly subgraph: {
469
467
  readonly name: "pol-subgraph";
470
468
  readonly uri: string;
471
- };
472
- readonly feesSubgraph: {
473
- readonly name: "pol-fees-subgraph";
474
- readonly uri: string;
469
+ readonly headers: {
470
+ Authorization: string;
471
+ } | undefined;
475
472
  };
476
473
  readonly bribeBoostApi: string;
477
474
  readonly bgtIncentiveDistributor: "0x77DA09bC82652f9A14d1b170a001e759640298e6";
@@ -619,10 +616,9 @@ declare const config: {
619
616
  readonly subgraph: {
620
617
  readonly name: "pol-subgraph";
621
618
  readonly uri: string;
622
- };
623
- readonly feesSubgraph: {
624
- readonly name: "pol-fees-subgraph";
625
- readonly uri: string;
619
+ readonly headers: {
620
+ Authorization: string;
621
+ } | undefined;
626
622
  };
627
623
  readonly bribeBoostApi: string;
628
624
  readonly bgtIncentiveDistributor: "0xb0d005Fe83E3F1ec876C1a64700c5F0d6265d9E3";
@@ -1 +1,40 @@
1
- import{a as k,b as l,c as m}from"../chunk-ZA2X4K7Z.mjs";import"../chunk-JW76KOHH.mjs";import"../chunk-VWV244JK.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-KYJQS3T5.mjs";
6
+ import "../chunk-SWEAJ6OD.mjs";
7
+ import "../chunk-JHPXZOPW.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 _chunk7BJPOGJ3cjs = require('../../chunk-7BJPOGJ3.cjs');require('../../chunk-XBV7BAIE.cjs');require('../../chunk-TQ67UFXV.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://${_chunk7BJPOGJ3cjs.b.urls.postHog.region}-assets.i.posthog.com/static/:path*`},{source:"/ph/:path*",destination:`https://${_chunk7BJPOGJ3cjs.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 _chunkJZA34W4Gcjs = require('../../chunk-JZA34W4G.cjs');
10
+ require('../../chunk-3XMRQ4AF.cjs');
11
+ require('../../chunk-AMUU2OH4.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://${_chunkJZA34W4Gcjs.appConfig.urls.postHog.region}-assets.i.posthog.com/static/:path*`
68
+ },
69
+ {
70
+ source: "/ph/:path*",
71
+ destination: `https://${_chunkJZA34W4Gcjs.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-MT3NuQb7.cjs';
2
+ import { a as AppName } from '../../types-ClIxAUdh.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-MT3NuQb7.js';
2
+ import { a as AppName } from '../../types-ClIxAUdh.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-ZA2X4K7Z.mjs";import"../../chunk-JW76KOHH.mjs";import"../../chunk-VWV244JK.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-KYJQS3T5.mjs";
10
+ import "../../chunk-SWEAJ6OD.mjs";
11
+ import "../../chunk-JHPXZOPW.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
+ };