Skip to content

Commit b04e507

Browse files
committed
feat(klesia sdk): optimize bundling
1 parent 50958d5 commit b04e507

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

packages/klesia-sdk/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,11 @@
1616
"test": "bun test --rerun-each 3",
1717
"cleanup": "rimraf dist .turbo"
1818
},
19-
"devDependencies": {
20-
"@mina-js/klesia": "workspace:*"
21-
},
2219
"peerDependencies": {
2320
"typescript": "^5.0.0"
2421
},
2522
"dependencies": {
23+
"@mina-js/klesia": "workspace:*",
2624
"micro-ftch": "^0.4.0",
2725
"ts-pattern": "^5.3.1"
2826
}

packages/klesia-sdk/src/client.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,14 @@ export const createClient = ({ network, customUrl }: CreateClientProps) => {
1717
const baseUrl = customUrl
1818
? customUrl
1919
: match(KlesiaNetwork.parse(network))
20-
.with("devnet", () => "https://devnet.klesia.palladians.xyz")
21-
.with("mainnet", () => "https://mainnet.klesia.palladians.xyz")
22-
.with("zeko_devnet", () => "https://zeko-devnet.klesia.palladians.xyz")
20+
.with("devnet", () => "https://devnet.klesia.palladians.xyz/api")
21+
.with("mainnet", () => "https://mainnet.klesia.palladians.xyz/api")
22+
.with(
23+
"zeko_devnet",
24+
() => "https://zeko-devnet.klesia.palladians.xyz/api",
25+
)
2326
.exhaustive();
24-
const rpc = jsonrpc(net, `${baseUrl}/api`);
27+
const rpc = jsonrpc(net, baseUrl);
2528
const request = async <T extends string>(req: RpcRequestType) => {
2629
const params = req.params ?? [];
2730
const json: Extract<RpcResponseType, { method: T }>["result"] =

packages/klesia-sdk/tsup.config.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
import { defineConfig } from "tsup";
22
import sharedConfig from "../utils/tsup.config";
33

4-
export default defineConfig({ ...sharedConfig, external: ["@mina-js/klesia"] });
4+
export default defineConfig({
5+
...sharedConfig,
6+
bundle: true,
7+
splitting: false,
8+
});

0 commit comments

Comments
 (0)