@berachain/config 0.1.22-beta.1 → 0.1.23
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.
- package/dist/internal/edge-config/edgeConfig.codegen.d.ts +60 -2
- package/dist/internal/edge-config/edgeConfig.codegen.d.ts.map +1 -1
- package/dist/internal/nextjs/index.cjs +2 -2
- package/dist/internal/nextjs/index.mjs +1 -1
- package/dist/internal/nextjs/utils/index.cjs +3 -1
- package/dist/internal/nextjs/utils/index.d.ts.map +1 -1
- package/dist/internal/nextjs/utils/index.mjs +3 -1
- package/dist/internal/sentry/index.cjs +2 -2
- package/dist/internal/sentry/index.mjs +1 -1
- package/package.json +9 -8
- package/dist/internal/tsup/index.cjs +0 -99
- package/dist/internal/tsup/index.d.ts +0 -3
- package/dist/internal/tsup/index.d.ts.map +0 -1
- package/dist/internal/tsup/index.mjs +0 -99
- /package/dist/{chunk-UOFOM6N7.cjs → chunk-3NQ3NFWW.cjs} +0 -0
- /package/dist/{chunk-EGAVWXNC.mjs → chunk-4UCGQIWY.mjs} +0 -0
|
@@ -126,6 +126,10 @@ export interface EdgeConfigSchema {
|
|
|
126
126
|
unboost?: BgtMigrationStep;
|
|
127
127
|
redeemBGT?: BgtMigrationStep;
|
|
128
128
|
stakeBERA?: BgtMigrationStep;
|
|
129
|
+
unstake?: BgtMigrationStep;
|
|
130
|
+
unstakeExternal?: BgtMigrationStep;
|
|
131
|
+
withdraw?: BgtMigrationStep;
|
|
132
|
+
redeem?: BgtMigrationStep;
|
|
129
133
|
};
|
|
130
134
|
/**
|
|
131
135
|
* Copy for the Incentives tab.
|
|
@@ -157,6 +161,19 @@ export interface EdgeConfigSchema {
|
|
|
157
161
|
*/
|
|
158
162
|
bepolia?: BgtDerivative[];
|
|
159
163
|
};
|
|
164
|
+
/**
|
|
165
|
+
* Liquidity pools that use BGT-derivative tokens, listed in the 'BGT derivatives' tab (Withdraw step), configured per chain. When a chain has no entries, no LP positions are tracked for that chain. Omit a chain entirely to fall back to the in-code defaults for that chain.
|
|
166
|
+
*/
|
|
167
|
+
derivativePools?: {
|
|
168
|
+
/**
|
|
169
|
+
* Derivative pools for Berachain mainnet.
|
|
170
|
+
*/
|
|
171
|
+
mainnet?: DerivativePool[];
|
|
172
|
+
/**
|
|
173
|
+
* Derivative pools for the Bepolia testnet.
|
|
174
|
+
*/
|
|
175
|
+
bepolia?: DerivativePool[];
|
|
176
|
+
};
|
|
160
177
|
/**
|
|
161
178
|
* Copy for the site-wide nudge banner shown when a user has un-migrated BGT positions.
|
|
162
179
|
*/
|
|
@@ -241,18 +258,59 @@ export interface BgtDerivative {
|
|
|
241
258
|
* Token symbol shown in the UI (e.g. 'iBGT').
|
|
242
259
|
*/
|
|
243
260
|
symbol: string;
|
|
261
|
+
/**
|
|
262
|
+
* Human-readable token name (e.g. 'Infrared BGT').
|
|
263
|
+
*/
|
|
264
|
+
tokenName?: string;
|
|
244
265
|
/**
|
|
245
266
|
* Human-readable source protocol (e.g. 'Infrared'), shown on the 'Unstake on {protocol}' link.
|
|
246
267
|
*/
|
|
247
268
|
protocol: string;
|
|
248
269
|
/**
|
|
249
|
-
* ERC20 address of the derivative token; the in-wallet (idle) balance is read from here.
|
|
270
|
+
* ERC20 address of the derivative token; the in-wallet (idle) balance is read from here, and native redemption to BERA/WBERA is called on it.
|
|
250
271
|
*/
|
|
251
272
|
tokenAddress: string;
|
|
252
273
|
/**
|
|
253
|
-
*
|
|
274
|
+
* The derivative's own single-asset staking contract; its staked balance surfaces an Unstake row. Omit when the derivative has no native staking.
|
|
275
|
+
*/
|
|
276
|
+
stakingContract?: string;
|
|
277
|
+
/**
|
|
278
|
+
* External page where the user unstakes this derivative from its own staking (Unstake step, derivative-staking rows).
|
|
254
279
|
*/
|
|
255
280
|
unstakeUrl: string;
|
|
281
|
+
/**
|
|
282
|
+
* External page where the user redeems this derivative for BERA (Redeem step). Falls back to `unstakeUrl` when omitted.
|
|
283
|
+
*/
|
|
284
|
+
redeemUrl?: string;
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* A liquidity pool that uses a BGT-derivative token, surfaced in the migration widget's 'BGT derivatives' tab (Withdraw step). The user may hold the LP token idle, or have it staked in a reward vault and/or an Infrared vault. Addresses are chain-specific, so this list is configured per chain.
|
|
288
|
+
*/
|
|
289
|
+
export interface DerivativePool {
|
|
290
|
+
/**
|
|
291
|
+
* Pool display name (e.g. 'osBGT / sWBERA').
|
|
292
|
+
*/
|
|
293
|
+
name: string;
|
|
294
|
+
/**
|
|
295
|
+
* Pool protocol — determines the withdraw mechanism.
|
|
296
|
+
*/
|
|
297
|
+
protocol: "Kodiak" | "HUB";
|
|
298
|
+
/**
|
|
299
|
+
* Pool / LP-token address; the idle LP balance is read from here and liquidity is withdrawn from it.
|
|
300
|
+
*/
|
|
301
|
+
poolAddress: string;
|
|
302
|
+
/**
|
|
303
|
+
* Berachain Hub/Kodiak/Bera reward vault that stakes this pool's LP token. Omit when the pool has none.
|
|
304
|
+
*/
|
|
305
|
+
rewardVault?: string;
|
|
306
|
+
/**
|
|
307
|
+
* Infrared vault that stakes this pool's LP token. Omit when the pool has none.
|
|
308
|
+
*/
|
|
309
|
+
infraredVault?: string;
|
|
310
|
+
/**
|
|
311
|
+
* Infrared reward-vault page for `infraredVault` (Infrared uses slug URLs, not address-based). Falls back to the Infrared vaults list when omitted.
|
|
312
|
+
*/
|
|
313
|
+
infraredUrl?: string;
|
|
256
314
|
}
|
|
257
315
|
export interface BannerItemV2 {
|
|
258
316
|
text: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edgeConfig.codegen.d.ts","sourceRoot":"","sources":["../../../src/internal/edge-config/edgeConfig.codegen.ts"],"names":[],"mappings":"AACA;;;;GAIG;AAEH,MAAM,MAAM,cAAc,GACtB,OAAO,GACP;IACE,KAAK,CAAC,EAAE,CAAC,SAAS,GAAG,SAAS,CAAC,EAAE,CAAC;IAClC;;;;OAIG;IACH,MAAM,CAAC,EAAE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AK,CAAC,EAAE,MAAM,CAAC;SAChB,EAAE,CAAC;QACJ;;WAEG;QACH,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB;;WAEG;QACH,oBAAoB,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;QACnC;;WAEG;QACH,eAAe,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;QACjC;;WAEG;QACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,yBAAyB,EAAE;YACzB,eAAe,EAAE,MAAM,CAAC;YACxB,oBAAoB,EAAE,MAAM,CAAC;SAC9B,CAAC;QACF;;WAEG;QACH,kBAAkB,CAAC,EAAE;YACnB;;eAEG;YACH,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB;;eAEG;YACH,cAAc,CAAC,EAAE,MAAM,CAAC;YACxB;;eAEG;YACH,IAAI,CAAC,EAAE;gBACL,GAAG,CAAC,EAAE,MAAM,CAAC;gBACb,UAAU,CAAC,EAAE,MAAM,CAAC;gBACpB,WAAW,CAAC,EAAE,MAAM,CAAC;aACtB,CAAC;YACF;;eAEG;YACH,KAAK,CAAC,EAAE,MAAM,CAAC;YACf;;eAEG;YACH,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;YACvB;;eAEG;YACH,KAAK,CAAC,EAAE;gBACN,SAAS,CAAC,EAAE,gBAAgB,CAAC;gBAC7B,OAAO,CAAC,EAAE,gBAAgB,CAAC;gBAC3B,SAAS,CAAC,EAAE,gBAAgB,CAAC;gBAC7B,SAAS,CAAC,EAAE,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"edgeConfig.codegen.d.ts","sourceRoot":"","sources":["../../../src/internal/edge-config/edgeConfig.codegen.ts"],"names":[],"mappings":"AACA;;;;GAIG;AAEH,MAAM,MAAM,cAAc,GACtB,OAAO,GACP;IACE,KAAK,CAAC,EAAE,CAAC,SAAS,GAAG,SAAS,CAAC,EAAE,CAAC;IAClC;;;;OAIG;IACH,MAAM,CAAC,EAAE,CAAC,YAAY,G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,CAAC,EAAE,MAAM,CAAC;CACtB;AACD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,cAAc,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,CAAC;CACzD;AACD,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,cAAc,CAAC;IACxB,IAAI,EAAE,KAAK,GAAG,SAAS,GAAG,MAAM,CAAC;CAClC;AACD,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,cAAc,CAAC;CACzB;AACD,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,cAAc,CAAC;CACzB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk3NQ3NFWWcjs = require('../../chunk-3NQ3NFWW.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkOA5M6XYFcjs = require('../../chunk-OA5M6XYF.cjs');
|
|
@@ -77,7 +77,7 @@ function withBeraConfig(config, {
|
|
|
77
77
|
nextConfig.env.NEXT_PUBLIC_PH_REVERSE_PROXY_PATH = "/ph";
|
|
78
78
|
nextConfig.skipTrailingSlashRedirect = true;
|
|
79
79
|
}
|
|
80
|
-
if (withSentry) return
|
|
80
|
+
if (withSentry) return _chunk3NQ3NFWWcjs.withSentryConfig.call(void 0, nextConfig);
|
|
81
81
|
return nextConfig;
|
|
82
82
|
}
|
|
83
83
|
|
|
@@ -13,7 +13,9 @@ function globToRegExp(glob) {
|
|
|
13
13
|
if (!re.endsWith("$")) re = `${re}$`;
|
|
14
14
|
return new RegExp(re);
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
function normalizeHostname(hostname) {
|
|
17
|
+
return hostname.replace(/^https?:\/\//, "");
|
|
18
|
+
}
|
|
17
19
|
function isAllowedImageUrl(urlString) {
|
|
18
20
|
try {
|
|
19
21
|
if (!urlString) return false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/internal/nextjs/utils/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/internal/nextjs/utils/index.ts"],"names":[],"mappings":"AA6BA;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAgCxE"}
|
|
@@ -13,7 +13,9 @@ function globToRegExp(glob) {
|
|
|
13
13
|
if (!re.endsWith("$")) re = `${re}$`;
|
|
14
14
|
return new RegExp(re);
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
function normalizeHostname(hostname) {
|
|
17
|
+
return hostname.replace(/^https?:\/\//, "");
|
|
18
|
+
}
|
|
17
19
|
function isAllowedImageUrl(urlString) {
|
|
18
20
|
try {
|
|
19
21
|
if (!urlString) return false;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunk3NQ3NFWWcjs = require('../../chunk-3NQ3NFWW.cjs');
|
|
6
6
|
require('../../chunk-75ZPJI57.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.onRequestError =
|
|
11
|
+
exports.onRequestError = _chunk3NQ3NFWWcjs.onRequestError; exports.registerSentry = _chunk3NQ3NFWWcjs.registerSentry; exports.withSentryConfig = _chunk3NQ3NFWWcjs.withSentryConfig;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@berachain/config",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.23",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -15,27 +15,28 @@
|
|
|
15
15
|
"@tailwindcss/container-queries": "0.1.1",
|
|
16
16
|
"@tailwindcss/typography": "0.5.16",
|
|
17
17
|
"@types/node": "24.1.0",
|
|
18
|
-
"next": "16.2.6",
|
|
19
18
|
"json-schema-to-typescript": "15.0.4",
|
|
19
|
+
"next": "16.2.6",
|
|
20
20
|
"tailwindcss": "3.4.17",
|
|
21
21
|
"tailwindcss-animate": "1.0.7",
|
|
22
22
|
"tsup": "8.5.1",
|
|
23
23
|
"typescript": "5.5.4",
|
|
24
|
-
"vitest": "3.2.6"
|
|
24
|
+
"vitest": "3.2.6",
|
|
25
|
+
"@berachain/utils": "^0.1.0"
|
|
25
26
|
},
|
|
26
27
|
"peerDependencies": {
|
|
27
28
|
"@flags-sdk/edge-config": "0.1.0",
|
|
28
|
-
"@vercel/edge-config": "1.4.3",
|
|
29
29
|
"@sentry/nextjs": "^10.16",
|
|
30
30
|
"@tailwindcss/aspect-ratio": "~0.4.2",
|
|
31
31
|
"@tailwindcss/container-queries": "~0.4.1",
|
|
32
32
|
"@tailwindcss/typography": "~0.5.15",
|
|
33
|
-
"
|
|
34
|
-
"viem": "^2.41.2",
|
|
35
|
-
"flags": "4.0.6",
|
|
33
|
+
"@vercel/edge-config": "1.4.3",
|
|
36
34
|
"dotenv": "16.6.1",
|
|
35
|
+
"flags": "4.0.6",
|
|
36
|
+
"next": "^16.1",
|
|
37
37
|
"tailwindcss-animate": "1.0.7",
|
|
38
|
-
"tsup": "^8.4.0"
|
|
38
|
+
"tsup": "^8.4.0",
|
|
39
|
+
"viem": "^2.41.2"
|
|
39
40
|
},
|
|
40
41
|
"peerDependenciesMeta": {
|
|
41
42
|
"@flags-sdk/edge-config": {
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }require('../../chunk-75ZPJI57.cjs');
|
|
2
|
-
|
|
3
|
-
// src/internal/tsup/index.ts
|
|
4
|
-
var _child_process = require('child_process');
|
|
5
|
-
var _fs = require('fs');
|
|
6
|
-
var _tsup = require('tsup');
|
|
7
|
-
function applyDefaultConfig(userConfig, opts) {
|
|
8
|
-
if (Array.isArray(userConfig)) {
|
|
9
|
-
return userConfig.map((c) => applyDefaultConfig(c, opts));
|
|
10
|
-
}
|
|
11
|
-
const isPrepublish = process.argv.includes("--prepublish");
|
|
12
|
-
const sourcemap = process.argv.includes("--sourcemap");
|
|
13
|
-
const hasCjs = isPrepublish || process.argv.includes("--cjs");
|
|
14
|
-
const hasEsm = isPrepublish || !hasCjs || process.argv.includes("--esm");
|
|
15
|
-
const format = [];
|
|
16
|
-
if (hasEsm) {
|
|
17
|
-
format.push("esm");
|
|
18
|
-
}
|
|
19
|
-
if (hasCjs) {
|
|
20
|
-
format.push("cjs");
|
|
21
|
-
}
|
|
22
|
-
const minify = isPrepublish || process.argv.includes("--minify");
|
|
23
|
-
const isDeclarationOnly = typeof opts.dts === "object" && opts.dts.only;
|
|
24
|
-
const defaultConfig = {
|
|
25
|
-
format,
|
|
26
|
-
clean: !opts.watch && // if we're only running check-types, we won't clean dist so that running processes are not interrupted
|
|
27
|
-
!isDeclarationOnly,
|
|
28
|
-
splitting: true,
|
|
29
|
-
outExtension({ format: format2 }) {
|
|
30
|
-
return { js: format2 === "esm" ? ".mjs" : ".cjs" };
|
|
31
|
-
},
|
|
32
|
-
outDir: "dist",
|
|
33
|
-
skipNodeModulesBundle: true,
|
|
34
|
-
noExternal: ["@berachain/utils"],
|
|
35
|
-
minify,
|
|
36
|
-
// Whether to minify the output
|
|
37
|
-
sourcemap: process.env.UPLOAD_SOURCEMAPS === "true" || sourcemap,
|
|
38
|
-
// Whether to generate sourcemaps
|
|
39
|
-
// During normal builds, disable tsup's built-in dts and use tsc in
|
|
40
|
-
// onSuccess to generate declaration files with declarationMap so that
|
|
41
|
-
// IDE "Go to Source" points to the real .ts source.
|
|
42
|
-
// When --dtsOnly is passed (check-types), let tsup handle it.
|
|
43
|
-
// Be careful and add this to turbo.json or some builds might fail when using turbo remote cache.
|
|
44
|
-
dts: isDeclarationOnly ? opts.dts : false,
|
|
45
|
-
async onSuccess() {
|
|
46
|
-
if (isDeclarationOnly) return;
|
|
47
|
-
_child_process.execSync.call(void 0,
|
|
48
|
-
`find dist -name "*.cjs" -exec perl -pi -e 's/return await /return await /g' {} +`
|
|
49
|
-
);
|
|
50
|
-
if (process.env.VERCEL === "1") return;
|
|
51
|
-
try {
|
|
52
|
-
const project = _fs.existsSync.call(void 0, "tsconfig.build.json") ? "tsconfig.build.json" : "tsconfig.json";
|
|
53
|
-
_child_process.execSync.call(void 0, "rm -f tsconfig.tsbuildinfo", { stdio: "inherit" });
|
|
54
|
-
_child_process.execSync.call(void 0,
|
|
55
|
-
`tsc --project ${project} --emitDeclarationOnly --declarationMap`,
|
|
56
|
-
{ stdio: "inherit" }
|
|
57
|
-
);
|
|
58
|
-
_child_process.execSync.call(void 0,
|
|
59
|
-
"rsync -a --include='*/' --include='*.d.ts' --exclude='*' src/ dist/ 2>/dev/null || true",
|
|
60
|
-
{ stdio: "inherit" }
|
|
61
|
-
);
|
|
62
|
-
} catch (error) {
|
|
63
|
-
console.error("Declaration map generation failed:", error);
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
esbuildOptions: (esbuildOptions, o) => {
|
|
67
|
-
esbuildOptions.jsx = "automatic";
|
|
68
|
-
esbuildOptions.sourceRoot = "";
|
|
69
|
-
_optionalChain([userConfig, 'access', _ => _.esbuildOptions, 'optionalCall', _2 => _2(esbuildOptions, o)]);
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
return {
|
|
73
|
-
...defaultConfig,
|
|
74
|
-
...userConfig,
|
|
75
|
-
onSuccess: async () => {
|
|
76
|
-
await _optionalChain([defaultConfig, 'access', _3 => _3.onSuccess, 'optionalCall', _4 => _4()]);
|
|
77
|
-
if (typeof userConfig.onSuccess === "function") {
|
|
78
|
-
await userConfig.onSuccess();
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
var beraTsupConfig = (config) => {
|
|
84
|
-
return _tsup.defineConfig.call(void 0, async (opts) => {
|
|
85
|
-
let userConfig;
|
|
86
|
-
if (typeof config === "function") {
|
|
87
|
-
userConfig = await config(opts);
|
|
88
|
-
} else {
|
|
89
|
-
userConfig = config;
|
|
90
|
-
}
|
|
91
|
-
if (Array.isArray(userConfig)) {
|
|
92
|
-
return userConfig.map((c) => applyDefaultConfig(c, opts));
|
|
93
|
-
}
|
|
94
|
-
return applyDefaultConfig(userConfig, opts);
|
|
95
|
-
});
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
exports.beraTsupConfig = beraTsupConfig;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/internal/tsup/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAA6B,MAAM,MAAM,CAAC;AAuG/D,eAAO,MAAM,cAAc,EAAE,OAAO,YAgBnC,CAAC"}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import "../../chunk-7P6ASYW6.mjs";
|
|
2
|
-
|
|
3
|
-
// src/internal/tsup/index.ts
|
|
4
|
-
import { execSync } from "child_process";
|
|
5
|
-
import { existsSync } from "fs";
|
|
6
|
-
import { defineConfig } from "tsup";
|
|
7
|
-
function applyDefaultConfig(userConfig, opts) {
|
|
8
|
-
if (Array.isArray(userConfig)) {
|
|
9
|
-
return userConfig.map((c) => applyDefaultConfig(c, opts));
|
|
10
|
-
}
|
|
11
|
-
const isPrepublish = process.argv.includes("--prepublish");
|
|
12
|
-
const sourcemap = process.argv.includes("--sourcemap");
|
|
13
|
-
const hasCjs = isPrepublish || process.argv.includes("--cjs");
|
|
14
|
-
const hasEsm = isPrepublish || !hasCjs || process.argv.includes("--esm");
|
|
15
|
-
const format = [];
|
|
16
|
-
if (hasEsm) {
|
|
17
|
-
format.push("esm");
|
|
18
|
-
}
|
|
19
|
-
if (hasCjs) {
|
|
20
|
-
format.push("cjs");
|
|
21
|
-
}
|
|
22
|
-
const minify = isPrepublish || process.argv.includes("--minify");
|
|
23
|
-
const isDeclarationOnly = typeof opts.dts === "object" && opts.dts.only;
|
|
24
|
-
const defaultConfig = {
|
|
25
|
-
format,
|
|
26
|
-
clean: !opts.watch && // if we're only running check-types, we won't clean dist so that running processes are not interrupted
|
|
27
|
-
!isDeclarationOnly,
|
|
28
|
-
splitting: true,
|
|
29
|
-
outExtension({ format: format2 }) {
|
|
30
|
-
return { js: format2 === "esm" ? ".mjs" : ".cjs" };
|
|
31
|
-
},
|
|
32
|
-
outDir: "dist",
|
|
33
|
-
skipNodeModulesBundle: true,
|
|
34
|
-
noExternal: ["@berachain/utils"],
|
|
35
|
-
minify,
|
|
36
|
-
// Whether to minify the output
|
|
37
|
-
sourcemap: process.env.UPLOAD_SOURCEMAPS === "true" || sourcemap,
|
|
38
|
-
// Whether to generate sourcemaps
|
|
39
|
-
// During normal builds, disable tsup's built-in dts and use tsc in
|
|
40
|
-
// onSuccess to generate declaration files with declarationMap so that
|
|
41
|
-
// IDE "Go to Source" points to the real .ts source.
|
|
42
|
-
// When --dtsOnly is passed (check-types), let tsup handle it.
|
|
43
|
-
// Be careful and add this to turbo.json or some builds might fail when using turbo remote cache.
|
|
44
|
-
dts: isDeclarationOnly ? opts.dts : false,
|
|
45
|
-
async onSuccess() {
|
|
46
|
-
if (isDeclarationOnly) return;
|
|
47
|
-
execSync(
|
|
48
|
-
`find dist -name "*.cjs" -exec perl -pi -e 's/returnawait /return await /g' {} +`
|
|
49
|
-
);
|
|
50
|
-
if (process.env.VERCEL === "1") return;
|
|
51
|
-
try {
|
|
52
|
-
const project = existsSync("tsconfig.build.json") ? "tsconfig.build.json" : "tsconfig.json";
|
|
53
|
-
execSync("rm -f tsconfig.tsbuildinfo", { stdio: "inherit" });
|
|
54
|
-
execSync(
|
|
55
|
-
`tsc --project ${project} --emitDeclarationOnly --declarationMap`,
|
|
56
|
-
{ stdio: "inherit" }
|
|
57
|
-
);
|
|
58
|
-
execSync(
|
|
59
|
-
"rsync -a --include='*/' --include='*.d.ts' --exclude='*' src/ dist/ 2>/dev/null || true",
|
|
60
|
-
{ stdio: "inherit" }
|
|
61
|
-
);
|
|
62
|
-
} catch (error) {
|
|
63
|
-
console.error("Declaration map generation failed:", error);
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
esbuildOptions: (esbuildOptions, o) => {
|
|
67
|
-
esbuildOptions.jsx = "automatic";
|
|
68
|
-
esbuildOptions.sourceRoot = "";
|
|
69
|
-
userConfig.esbuildOptions?.(esbuildOptions, o);
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
return {
|
|
73
|
-
...defaultConfig,
|
|
74
|
-
...userConfig,
|
|
75
|
-
onSuccess: async () => {
|
|
76
|
-
await defaultConfig.onSuccess?.();
|
|
77
|
-
if (typeof userConfig.onSuccess === "function") {
|
|
78
|
-
await userConfig.onSuccess();
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
var beraTsupConfig = (config) => {
|
|
84
|
-
return defineConfig(async (opts) => {
|
|
85
|
-
let userConfig;
|
|
86
|
-
if (typeof config === "function") {
|
|
87
|
-
userConfig = await config(opts);
|
|
88
|
-
} else {
|
|
89
|
-
userConfig = config;
|
|
90
|
-
}
|
|
91
|
-
if (Array.isArray(userConfig)) {
|
|
92
|
-
return userConfig.map((c) => applyDefaultConfig(c, opts));
|
|
93
|
-
}
|
|
94
|
-
return applyDefaultConfig(userConfig, opts);
|
|
95
|
-
});
|
|
96
|
-
};
|
|
97
|
-
export {
|
|
98
|
-
beraTsupConfig
|
|
99
|
-
};
|
|
File without changes
|
|
File without changes
|