Skip to content

Commit 05959a0

Browse files
committed
fix(xc-admin-proposer-server): fixed build
1 parent b75ec2d commit 05959a0

File tree

3 files changed

+19
-6
lines changed

3 files changed

+19
-6
lines changed

governance/xc_admin/packages/proposer_server/package.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"author": "",
77
"homepage": "https://github.com/pyth-network/pyth-crosschain",
88
"license": "ISC",
9-
"main": "dist/index.ts",
9+
"main": "./dist/index.js",
10+
"type": "module",
1011
"repository": {
1112
"type": "git",
1213
"url": "git+https://github.com/pyth-network/pyth-crosschain.git"
@@ -40,5 +41,13 @@
4041
"node": ">=22.16.0",
4142
"pnpm": ">=10.19.0"
4243
},
43-
"packageManager": "[email protected]"
44+
"packageManager": "[email protected]",
45+
"exports": {
46+
".": {
47+
"default": "./dist/index.js",
48+
"types": "./dist/index.d.ts"
49+
},
50+
"./package.json": "./package.json"
51+
},
52+
"types": "./dist/index.d.ts"
4453
}

governance/xc_admin/packages/proposer_server/src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import express, { Request, Response } from "express";
1+
import express, { type Request, type Response } from "express";
22
import cors from "cors";
33
import {
4-
Cluster,
4+
type Cluster,
55
Connection,
66
Keypair,
77
PublicKey,
@@ -14,7 +14,7 @@ import {
1414
PRICE_FEED_MULTISIG,
1515
} from "@pythnetwork/xc-admin-common";
1616
import * as fs from "fs";
17-
import { getPythClusterApiUrl, PythCluster } from "@pythnetwork/client";
17+
import { getPythClusterApiUrl, type PythCluster } from "@pythnetwork/client";
1818
import SquadsMesh from "@sqds/mesh";
1919
import NodeWallet from "@coral-xyz/anchor/dist/cjs/nodewallet";
2020

@@ -84,7 +84,7 @@ app.post("/api/propose", async (req: Request, res: Response) => {
8484
// preserve the existing API by returning only the first pubkey
8585
const proposalPubkey = (
8686
await vault.proposeInstructions(instructions, cluster, {
87-
computeUnitPriceMicroLamports: COMPUTE_UNIT_PRICE_MICROLAMPORTS,
87+
computeUnitPriceMicroLamports: COMPUTE_UNIT_PRICE_MICROLAMPORTS!,
8888
})
8989
)[0];
9090
res.status(200).json({ proposalPubkey: proposalPubkey });
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{
22
"extends": "@cprussin/tsconfig/base.json",
33
"include": ["src"],
4+
"compilerOptions": {
5+
"module": "preserve",
6+
"moduleResolution": "node"
7+
},
48
"exclude": ["dist", "node_modules", "**/__tests__/*"]
59
}

0 commit comments

Comments
 (0)